easy-email-extensions 3.1.9 → 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 +323 -293
- 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,11 +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({
|
39237
39252
|
onChange: props.onChange,
|
39238
39253
|
isSelect: props.isSelect,
|
39239
39254
|
value: props.value
|
39240
|
-
}), [renderMergeTagContent, props.onChange, props.isSelect, props.value]);
|
39255
|
+
}) : /* @__PURE__ */ React__default.createElement(React__default.Fragment, null), [renderMergeTagContent, props.onChange, props.isSelect, props.value]);
|
39241
39256
|
if (renderMergeTagContent) {
|
39242
39257
|
return mergeTagContent;
|
39243
39258
|
}
|
@@ -40155,8 +40170,289 @@ function Group() {
|
|
40155
40170
|
span: 11
|
40156
40171
|
})))));
|
40157
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
|
+
}
|
40158
40450
|
function Button() {
|
40159
40451
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
40452
|
+
const { input } = useField(`${focusIdx2}.data.value.content`, {
|
40453
|
+
parse: (v) => v
|
40454
|
+
});
|
40455
|
+
const { mergeTags: mergeTags2 } = useEditorProps();
|
40160
40456
|
return /* @__PURE__ */ React__default.createElement(AttributesPanelWrapper, null, /* @__PURE__ */ React__default.createElement(Collapse$1, {
|
40161
40457
|
defaultActiveKey: ["-1", "0", "1", "2", "3"]
|
40162
40458
|
}, /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
@@ -40165,7 +40461,18 @@ function Button() {
|
|
40165
40461
|
}, /* @__PURE__ */ React__default.createElement(Space$1, {
|
40166
40462
|
direction: "vertical"
|
40167
40463
|
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
40168
|
-
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
|
+
}))),
|
40169
40476
|
name: `${focusIdx2}.data.value.content`
|
40170
40477
|
}), /* @__PURE__ */ React__default.createElement(Link, null))), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
40171
40478
|
name: "0",
|
@@ -40226,69 +40533,6 @@ function Button() {
|
|
40226
40533
|
header: "Border"
|
40227
40534
|
}, /* @__PURE__ */ React__default.createElement(Border, null))));
|
40228
40535
|
}
|
40229
|
-
function BorderWidth() {
|
40230
|
-
const { focusIdx: focusIdx2 } = useFocusIdx();
|
40231
|
-
return useMemo(() => {
|
40232
|
-
return /* @__PURE__ */ React__default.createElement(TextField, {
|
40233
|
-
label: "Width",
|
40234
|
-
quickchange: true,
|
40235
|
-
name: `${focusIdx2}.attributes.border-width`
|
40236
|
-
});
|
40237
|
-
}, [focusIdx2]);
|
40238
|
-
}
|
40239
|
-
const borderStyleOptions = [
|
40240
|
-
{
|
40241
|
-
value: "dashed",
|
40242
|
-
label: "Dashed"
|
40243
|
-
},
|
40244
|
-
{
|
40245
|
-
value: "dotted",
|
40246
|
-
label: "Dotted"
|
40247
|
-
},
|
40248
|
-
{
|
40249
|
-
value: "solid",
|
40250
|
-
label: "Solid"
|
40251
|
-
},
|
40252
|
-
{
|
40253
|
-
value: "double",
|
40254
|
-
label: "double"
|
40255
|
-
},
|
40256
|
-
{
|
40257
|
-
value: "ridge",
|
40258
|
-
label: "ridge"
|
40259
|
-
},
|
40260
|
-
{
|
40261
|
-
value: "groove",
|
40262
|
-
label: "groove"
|
40263
|
-
},
|
40264
|
-
{
|
40265
|
-
value: "inset",
|
40266
|
-
label: "inset"
|
40267
|
-
},
|
40268
|
-
{
|
40269
|
-
value: "outset",
|
40270
|
-
label: "outset"
|
40271
|
-
}
|
40272
|
-
];
|
40273
|
-
function BorderStyle() {
|
40274
|
-
const { focusIdx: focusIdx2 } = useFocusIdx();
|
40275
|
-
return useMemo(() => {
|
40276
|
-
return /* @__PURE__ */ React__default.createElement(SelectField, {
|
40277
|
-
label: "Style",
|
40278
|
-
name: `${focusIdx2}.attributes.border-style`,
|
40279
|
-
options: borderStyleOptions
|
40280
|
-
});
|
40281
|
-
}, [focusIdx2]);
|
40282
|
-
}
|
40283
|
-
function BorderColor() {
|
40284
|
-
const { focusIdx: focusIdx2 } = useFocusIdx();
|
40285
|
-
return useMemo(() => {
|
40286
|
-
return /* @__PURE__ */ React__default.createElement(ColorPickerField, {
|
40287
|
-
label: "Color",
|
40288
|
-
name: `${focusIdx2}.attributes.border-color`
|
40289
|
-
});
|
40290
|
-
}, [focusIdx2]);
|
40291
|
-
}
|
40292
40536
|
function Divider() {
|
40293
40537
|
return /* @__PURE__ */ React__default.createElement(AttributesPanelWrapper, null, /* @__PURE__ */ React__default.createElement(Collapse$1, {
|
40294
40538
|
defaultActiveKey: ["-1", "0", "1", "2", "3"]
|
@@ -40467,58 +40711,6 @@ function Accordion() {
|
|
40467
40711
|
name: `${focusIdx2}.attributes.border`
|
40468
40712
|
})))));
|
40469
40713
|
}
|
40470
|
-
const options$5 = [
|
40471
|
-
{
|
40472
|
-
value: "left",
|
40473
|
-
label: "Left"
|
40474
|
-
},
|
40475
|
-
{
|
40476
|
-
value: "center",
|
40477
|
-
label: "Center"
|
40478
|
-
},
|
40479
|
-
{
|
40480
|
-
value: "right",
|
40481
|
-
label: "Right"
|
40482
|
-
}
|
40483
|
-
];
|
40484
|
-
function TextAlign() {
|
40485
|
-
const { focusIdx: focusIdx2 } = useFocusIdx();
|
40486
|
-
return useMemo(() => {
|
40487
|
-
return /* @__PURE__ */ React__default.createElement(Stack$6, null, /* @__PURE__ */ React__default.createElement(RadioGroupField, {
|
40488
|
-
label: "Text align",
|
40489
|
-
name: `${focusIdx2}.attributes.text-align`,
|
40490
|
-
options: options$5
|
40491
|
-
}));
|
40492
|
-
}, [focusIdx2]);
|
40493
|
-
}
|
40494
|
-
const options$4 = [
|
40495
|
-
{
|
40496
|
-
value: "",
|
40497
|
-
label: "none"
|
40498
|
-
},
|
40499
|
-
{
|
40500
|
-
value: "uppercase",
|
40501
|
-
label: "uppercase"
|
40502
|
-
},
|
40503
|
-
{
|
40504
|
-
value: "lowercase",
|
40505
|
-
label: "lowercase"
|
40506
|
-
},
|
40507
|
-
{
|
40508
|
-
value: "capitalize",
|
40509
|
-
label: "capitalize"
|
40510
|
-
}
|
40511
|
-
];
|
40512
|
-
function TextTransform() {
|
40513
|
-
const { focusIdx: focusIdx2 } = useFocusIdx();
|
40514
|
-
return useMemo(() => {
|
40515
|
-
return /* @__PURE__ */ React__default.createElement(SelectField, {
|
40516
|
-
label: "Text transform",
|
40517
|
-
name: `${focusIdx2}.attributes.text-transform`,
|
40518
|
-
options: options$4
|
40519
|
-
});
|
40520
|
-
}, [focusIdx2]);
|
40521
|
-
}
|
40522
40714
|
function AccordionElement() {
|
40523
40715
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
40524
40716
|
return /* @__PURE__ */ React__default.createElement(AttributesPanelWrapper, null, /* @__PURE__ */ React__default.createElement(Collapse$1, {
|
@@ -40638,7 +40830,7 @@ function AccordionText() {
|
|
40638
40830
|
attributeName: "padding"
|
40639
40831
|
})))));
|
40640
40832
|
}
|
40641
|
-
const options$
|
40833
|
+
const options$2 = [
|
40642
40834
|
{
|
40643
40835
|
value: "hidden",
|
40644
40836
|
label: "hidden"
|
@@ -40667,7 +40859,7 @@ function Carousel() {
|
|
40667
40859
|
}), /* @__PURE__ */ React__default.createElement(RadioGroupField, {
|
40668
40860
|
label: "Thumbnails",
|
40669
40861
|
name: `${focusIdx2}.attributes.thumbnails`,
|
40670
|
-
options: options$
|
40862
|
+
options: options$2,
|
40671
40863
|
inline: true
|
40672
40864
|
}), /* @__PURE__ */ React__default.createElement(Align, {
|
40673
40865
|
inline: true
|
@@ -40783,7 +40975,7 @@ function CarouselImage({
|
|
40783
40975
|
name: `${focusIdx2}.data.value.image.[${index2}].title`
|
40784
40976
|
}));
|
40785
40977
|
}
|
40786
|
-
const options$
|
40978
|
+
const options$1 = [
|
40787
40979
|
{
|
40788
40980
|
value: "fluid-height",
|
40789
40981
|
label: "Fluid height"
|
@@ -40806,7 +40998,7 @@ function Hero() {
|
|
40806
40998
|
}, /* @__PURE__ */ React__default.createElement(RadioGroupField, {
|
40807
40999
|
label: "Mode",
|
40808
41000
|
name: `${focusIdx2}.attributes.mode`,
|
40809
|
-
options: options$
|
41001
|
+
options: options$1
|
40810
41002
|
}), /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
40811
41003
|
span: 11
|
40812
41004
|
}, /* @__PURE__ */ React__default.createElement(Width, null)), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
@@ -40849,74 +41041,6 @@ function Hero() {
|
|
40849
41041
|
span: 11
|
40850
41042
|
}, /* @__PURE__ */ React__default.createElement(BackgroundColor, null)))))));
|
40851
41043
|
}
|
40852
|
-
function NavbarLinkPadding({ name }) {
|
40853
|
-
const { values: values2 } = useBlock();
|
40854
|
-
const getVal = useCallback((index2) => {
|
40855
|
-
return () => {
|
40856
|
-
var _a;
|
40857
|
-
return ((_a = lodash.exports.get(values2, name)) == null ? void 0 : _a.split(" ")[index2]) || "";
|
40858
|
-
};
|
40859
|
-
}, [name, values2]);
|
40860
|
-
const setVal = useCallback((index2) => {
|
40861
|
-
return (newVal) => {
|
40862
|
-
if (newVal === "") {
|
40863
|
-
newVal = "0px";
|
40864
|
-
}
|
40865
|
-
const vals = [
|
40866
|
-
getVal(0)(),
|
40867
|
-
getVal(1)(),
|
40868
|
-
getVal(2)(),
|
40869
|
-
getVal(3)()
|
40870
|
-
];
|
40871
|
-
vals[index2] = newVal;
|
40872
|
-
return vals.join(" ");
|
40873
|
-
};
|
40874
|
-
}, [getVal]);
|
40875
|
-
return useMemo(() => {
|
40876
|
-
return /* @__PURE__ */ React__default.createElement(Stack$6, {
|
40877
|
-
vertical: true,
|
40878
|
-
spacing: "extraTight"
|
40879
|
-
}, /* @__PURE__ */ React__default.createElement(TextStyle, {
|
40880
|
-
variation: "strong"
|
40881
|
-
}, "Padding"), /* @__PURE__ */ React__default.createElement(Stack$6, {
|
40882
|
-
wrap: false
|
40883
|
-
}, /* @__PURE__ */ React__default.createElement(Stack$6.Item, {
|
40884
|
-
fill: true
|
40885
|
-
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
40886
|
-
label: /* @__PURE__ */ React__default.createElement("span", null, "Top"),
|
40887
|
-
quickchange: true,
|
40888
|
-
name,
|
40889
|
-
valueAdapter: getVal(0),
|
40890
|
-
onChangeAdapter: setVal(0)
|
40891
|
-
})), /* @__PURE__ */ React__default.createElement(Stack$6.Item, {
|
40892
|
-
fill: true
|
40893
|
-
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
40894
|
-
label: "Bottom",
|
40895
|
-
quickchange: true,
|
40896
|
-
name,
|
40897
|
-
valueAdapter: getVal(2),
|
40898
|
-
onChangeAdapter: setVal(2)
|
40899
|
-
}))), /* @__PURE__ */ React__default.createElement(Stack$6, {
|
40900
|
-
wrap: false
|
40901
|
-
}, /* @__PURE__ */ React__default.createElement(Stack$6.Item, {
|
40902
|
-
fill: true
|
40903
|
-
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
40904
|
-
label: /* @__PURE__ */ React__default.createElement("span", null, "Left"),
|
40905
|
-
quickchange: true,
|
40906
|
-
name,
|
40907
|
-
valueAdapter: getVal(3),
|
40908
|
-
onChangeAdapter: setVal(3)
|
40909
|
-
})), /* @__PURE__ */ React__default.createElement(Stack$6.Item, {
|
40910
|
-
fill: true
|
40911
|
-
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
40912
|
-
label: /* @__PURE__ */ React__default.createElement("span", null, "Right\xA0"),
|
40913
|
-
quickchange: true,
|
40914
|
-
name,
|
40915
|
-
valueAdapter: getVal(1),
|
40916
|
-
onChangeAdapter: setVal(1)
|
40917
|
-
}))));
|
40918
|
-
}, [getVal, name, setVal]);
|
40919
|
-
}
|
40920
41044
|
function Navbar() {
|
40921
41045
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
40922
41046
|
return /* @__PURE__ */ React__default.createElement(AttributesPanelWrapper, {
|
@@ -41001,7 +41125,7 @@ function NavbarLink({
|
|
41001
41125
|
name: `${focusIdx2}.data.value.links.[${index2}].padding`
|
41002
41126
|
}));
|
41003
41127
|
}
|
41004
|
-
const options
|
41128
|
+
const options = [
|
41005
41129
|
{
|
41006
41130
|
value: "vertical",
|
41007
41131
|
label: "vertical"
|
@@ -41027,7 +41151,7 @@ function Social() {
|
|
41027
41151
|
}, /* @__PURE__ */ React__default.createElement(RadioGroupField, {
|
41028
41152
|
label: "Mode",
|
41029
41153
|
name: `${focusIdx2}.attributes.mode`,
|
41030
|
-
options
|
41154
|
+
options
|
41031
41155
|
})), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
41032
41156
|
offset: 1,
|
41033
41157
|
span: 11
|
@@ -41236,100 +41360,6 @@ function AttributePanel() {
|
|
41236
41360
|
}
|
41237
41361
|
`), shadowRoot));
|
41238
41362
|
}
|
41239
|
-
function Decoration() {
|
41240
|
-
const { focusIdx: focusIdx2 } = useFocusIdx();
|
41241
|
-
return useMemo(() => {
|
41242
|
-
return /* @__PURE__ */ React__default.createElement(Stack$6, {
|
41243
|
-
key: focusIdx2,
|
41244
|
-
vertical: true,
|
41245
|
-
spacing: "extraTight"
|
41246
|
-
}, /* @__PURE__ */ React__default.createElement(TextStyle, {
|
41247
|
-
variation: "strong",
|
41248
|
-
size: "large"
|
41249
|
-
}, "Decoration"), /* @__PURE__ */ React__default.createElement(TextField, {
|
41250
|
-
label: "Border radius",
|
41251
|
-
name: `${focusIdx2}.attributes.borderRadius`,
|
41252
|
-
inline: true
|
41253
|
-
}), /* @__PURE__ */ React__default.createElement(TextField, {
|
41254
|
-
label: "Border",
|
41255
|
-
name: `${focusIdx2}.attributes.border`,
|
41256
|
-
inline: true,
|
41257
|
-
alignment: "center"
|
41258
|
-
}), /* @__PURE__ */ React__default.createElement(NumberField, {
|
41259
|
-
label: "Opacity",
|
41260
|
-
max: 1,
|
41261
|
-
min: 0,
|
41262
|
-
step: 0.1,
|
41263
|
-
name: `${focusIdx2}.attributes.opacity`,
|
41264
|
-
inline: true,
|
41265
|
-
alignment: "center"
|
41266
|
-
}));
|
41267
|
-
}, [focusIdx2]);
|
41268
|
-
}
|
41269
|
-
const options = [
|
41270
|
-
{
|
41271
|
-
value: "ltr",
|
41272
|
-
label: "ltr"
|
41273
|
-
},
|
41274
|
-
{
|
41275
|
-
value: "rtl",
|
41276
|
-
label: "rtl"
|
41277
|
-
}
|
41278
|
-
];
|
41279
|
-
function Direction() {
|
41280
|
-
const { focusIdx: focusIdx2 } = useFocusIdx();
|
41281
|
-
return useMemo(() => {
|
41282
|
-
return /* @__PURE__ */ React__default.createElement(Stack$6, null, /* @__PURE__ */ React__default.createElement(RadioGroupField, {
|
41283
|
-
label: "Direction",
|
41284
|
-
name: `${focusIdx2}.attributes.direction`,
|
41285
|
-
options,
|
41286
|
-
inline: true
|
41287
|
-
}));
|
41288
|
-
}, [focusIdx2]);
|
41289
|
-
}
|
41290
|
-
function Margin() {
|
41291
|
-
const { focusIdx: focusIdx2 } = useFocusIdx();
|
41292
|
-
return useMemo(() => {
|
41293
|
-
return /* @__PURE__ */ React__default.createElement(Stack$6, {
|
41294
|
-
vertical: true,
|
41295
|
-
spacing: "extraTight"
|
41296
|
-
}, /* @__PURE__ */ React__default.createElement(TextStyle, {
|
41297
|
-
size: "large"
|
41298
|
-
}, "Margin"), /* @__PURE__ */ React__default.createElement(Stack$6, {
|
41299
|
-
wrap: false
|
41300
|
-
}, /* @__PURE__ */ React__default.createElement(Stack$6.Item, {
|
41301
|
-
fill: true
|
41302
|
-
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
41303
|
-
label: "Top",
|
41304
|
-
quickchange: true,
|
41305
|
-
name: `${focusIdx2}.attributes.marginTop`,
|
41306
|
-
inline: true
|
41307
|
-
})), /* @__PURE__ */ React__default.createElement(Stack$6.Item, {
|
41308
|
-
fill: true
|
41309
|
-
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
41310
|
-
label: "Bottom",
|
41311
|
-
quickchange: true,
|
41312
|
-
name: `${focusIdx2}.attributes.marginBottom`,
|
41313
|
-
inline: true
|
41314
|
-
}))), /* @__PURE__ */ React__default.createElement(Stack$6, {
|
41315
|
-
wrap: false
|
41316
|
-
}, /* @__PURE__ */ React__default.createElement(Stack$6.Item, {
|
41317
|
-
fill: true
|
41318
|
-
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
41319
|
-
label: "Left",
|
41320
|
-
quickchange: true,
|
41321
|
-
name: `${focusIdx2}.attributes.marginLeft`,
|
41322
|
-
inline: true
|
41323
|
-
})), /* @__PURE__ */ React__default.createElement(Stack$6.Item, {
|
41324
|
-
fill: true
|
41325
|
-
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
41326
|
-
label: "Right",
|
41327
|
-
quickchange: true,
|
41328
|
-
name: `${focusIdx2}.attributes.marginRight`,
|
41329
|
-
inline: true
|
41330
|
-
}))));
|
41331
|
-
}, [focusIdx2]);
|
41332
|
-
}
|
41333
41363
|
function Tools(props) {
|
41334
41364
|
const { container: container2 } = props;
|
41335
41365
|
const { mergeTags: mergeTags2 } = useEditorProps();
|