easy-email-pro-theme 1.47.0 → 1.48.0

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/index.js CHANGED
@@ -61,10 +61,10 @@ import React__default, { useRef, useState, useEffect, useCallback, useMemo, crea
61
61
  import { NodeUtils, BlockManager, ElementType, EditorCore, t, ElementCategory, classnames as classnames$1, StandardType, PluginManager, EditorAuth, HtmlNodeAdapter, ConditionOperator, ConditionOperatorSymbol, EmailRenderProvider, components, I18nManager } from "easy-email-pro-core";
62
62
  import { Editor, Range, Node, Transforms, Path, Text as Text$2, createEditor } from "slate";
63
63
  import { createPortal, unstable_batchedUpdates } from "react-dom";
64
- import { cloneDeep, get, isEqual, set, omit as omit$2, merge as merge$1, debounce as debounce$2, isUndefined as isUndefined$1, uniqueId, isString as isString$1, isFunction as isFunction$4, isNumber as isNumber$1, upperFirst, sum, flatMap } from "lodash";
65
- import { Form, Input, Modal, Collapse, Space, Empty, Card, Grid, Button as Button$2, Drawer, Switch, Typography as Typography$1, Tabs, Radio, Divider as Divider$2, Alert, Popconfirm, Tooltip, Message, PageHeader, Spin, Layout as Layout$2, Popover, Select as Select$1, Slider, InputNumber, Tag, Link as Link$3, List as List$1, Skeleton } from "@arco-design/web-react";
66
64
  import { nanoid } from "nanoid";
67
- import { IconDelete, IconEdit, IconLeft, IconCopy, IconUndo, IconRedo, IconPlus, IconMinus, IconEye, IconSubscribeAdd, IconClose, IconCheckCircleFill, IconDragArrow, IconLock, IconUnlock, IconQuestionCircle, IconLink, IconCloud, IconSend, IconDown } from "@arco-design/web-react/icon";
65
+ import { cloneDeep, get, isEqual, set, omit as omit$2, merge as merge$1, debounce as debounce$2, isUndefined as isUndefined$1, uniqueId, isString as isString$1, isFunction as isFunction$4, isNumber as isNumber$1, upperFirst, sum, flatMap } from "lodash";
66
+ import { Form, Input, Modal, Collapse, Space, Empty, Card, Grid, Button as Button$2, Drawer, Switch, Typography as Typography$1, Tabs, Radio, Divider as Divider$2, Alert, Popconfirm, Tooltip, Message, PageHeader, Spin, Layout as Layout$2, Popover, Select as Select$1, Slider, InputNumber, Tag, Link as Link$3, List as List$1, Skeleton, Trigger } from "@arco-design/web-react";
67
+ import { IconPlus, IconDelete, IconEdit, IconLeft, IconCopy, IconUndo, IconRedo, IconMinus, IconEye, IconSubscribeAdd, IconClose, IconCheckCircleFill, IconDragArrow, IconLock, IconUnlock, IconQuestionCircle, IconLink, IconCloud, IconSend, IconDown } from "@arco-design/web-react/icon";
68
68
  import mjml from "mjml-browser";
69
69
  import { renderToStaticMarkup } from "react-dom/server";
70
70
  import { HistoryEditor } from "slate-history";
@@ -677,6 +677,23 @@ function IconFont(props) {
677
677
  }
678
678
  );
679
679
  }
680
+ const assignIdsToElementTree = (element, overwrite = false) => {
681
+ const newElement = cloneDeep(element);
682
+ const loop2 = (node) => {
683
+ if (NodeUtils.isElement(node)) {
684
+ if (overwrite) {
685
+ node.id = nanoid();
686
+ } else {
687
+ node.id = node.id || nanoid();
688
+ }
689
+ if (node.children) {
690
+ node.children.forEach(loop2);
691
+ }
692
+ }
693
+ };
694
+ loop2(newElement);
695
+ return newElement;
696
+ };
680
697
  const DraggingProviderContext = React__default.createContext({});
681
698
  const DraggingProvider = ({
682
699
  children
@@ -693,6 +710,7 @@ const DraggingProvider = ({
693
710
  const quantityLimitCheck = useRefState(editorProps.quantityLimitCheck);
694
711
  const editor = useSlate();
695
712
  const [inited, setInited] = useState(false);
713
+ const [isDragging, setIsDragging] = useState(false);
696
714
  let root2 = null;
697
715
  try {
698
716
  root2 = ReactEditor.getWindow(editor).document;
@@ -720,7 +738,7 @@ const DraggingProvider = ({
720
738
  clearInterval(timer);
721
739
  };
722
740
  }, [editor]);
723
- const isDragging = useRefState(dragNodePath);
741
+ const isElementDragging = useRefState(dragNodePath);
724
742
  const removePlaceholder = useCallback(() => {
725
743
  var _a;
726
744
  const rootDoc = ReactEditor.getWindow(editor).document;
@@ -862,6 +880,7 @@ const DraggingProvider = ({
862
880
  };
863
881
  const onDrop = (ev) => {
864
882
  removePlaceholder();
883
+ setIsDragging(false);
865
884
  const propsData = propsDataRef.current;
866
885
  if (!propsData)
867
886
  return;
@@ -993,7 +1012,10 @@ const DraggingProvider = ({
993
1012
  }, 0);
994
1013
  }
995
1014
  } else {
996
- const cloneElement2 = cloneDeep(propsData.element);
1015
+ const cloneElement2 = assignIdsToElementTree(
1016
+ cloneDeep(propsData.element),
1017
+ true
1018
+ );
997
1019
  if (isInsert) {
998
1020
  targetPath = [...targetPath, 0];
999
1021
  Transforms.insertNodes(editor, cloneElement2, {
@@ -1015,7 +1037,7 @@ const DraggingProvider = ({
1015
1037
  setHoverNodePath(null);
1016
1038
  };
1017
1039
  const onMousemove = (event) => {
1018
- if (isDragging.current) {
1040
+ if (isElementDragging.current) {
1019
1041
  removeDraggingStyle();
1020
1042
  setHoverNodePath(null);
1021
1043
  removePlaceholder();
@@ -1033,7 +1055,7 @@ const DraggingProvider = ({
1033
1055
  editor,
1034
1056
  editorProps.readOnly,
1035
1057
  inited,
1036
- isDragging,
1058
+ isElementDragging,
1037
1059
  quantityLimitCheck,
1038
1060
  removeDraggingStyle,
1039
1061
  removePlaceholder,
@@ -1075,11 +1097,13 @@ const DraggingProvider = ({
1075
1097
  if ((propsData == null ? void 0 : propsData.action) === "move") {
1076
1098
  setDragNodePath(ReactEditor.findPath(editor, propsData.element));
1077
1099
  }
1100
+ setIsDragging(true);
1078
1101
  },
1079
1102
  onDragEnd() {
1080
1103
  removeDraggingStyle();
1081
1104
  setHoverNodePath(null);
1082
1105
  removePlaceholder();
1106
+ setIsDragging(false);
1083
1107
  },
1084
1108
  draggable: true
1085
1109
  };
@@ -1094,9 +1118,10 @@ const DraggingProvider = ({
1094
1118
  const value = useMemo(() => {
1095
1119
  return {
1096
1120
  propsDataRef,
1097
- dragHandle
1121
+ dragHandle,
1122
+ isDragging
1098
1123
  };
1099
- }, [dragHandle]);
1124
+ }, [dragHandle, isDragging]);
1100
1125
  return /* @__PURE__ */ React__default.createElement(DraggingProviderContext.Provider, { value }, children);
1101
1126
  };
1102
1127
  const loop$1 = () => {
@@ -1581,23 +1606,6 @@ const useElementDefault = ({
1581
1606
  mobileAttributes
1582
1607
  };
1583
1608
  };
1584
- const assignIdsToElementTree = (element, overwrite = false) => {
1585
- const newElement = cloneDeep(element);
1586
- const loop2 = (node) => {
1587
- if (NodeUtils.isElement(node)) {
1588
- if (overwrite) {
1589
- node.id = nanoid();
1590
- } else {
1591
- node.id = node.id || nanoid();
1592
- }
1593
- if (node.children) {
1594
- node.children.forEach(loop2);
1595
- }
1596
- }
1597
- };
1598
- loop2(newElement);
1599
- return newElement;
1600
- };
1601
1609
  const useElementInteract = () => {
1602
1610
  const editor = useSlate();
1603
1611
  const { setSelectedNodePath, setHoverNodePath, selectedNodePath, lock } = useEditorState();
@@ -2182,7 +2190,7 @@ const UniversalListItem = ({
2182
2190
  )
2183
2191
  );
2184
2192
  };
2185
- const index$c = "";
2193
+ const index$d = "";
2186
2194
  function BlockItem({
2187
2195
  type,
2188
2196
  payload,
@@ -2203,9 +2211,28 @@ function BlockItem({
2203
2211
  });
2204
2212
  if (universalElementEditing && !NodeUtils.isContentElement(element))
2205
2213
  return null;
2206
- return /* @__PURE__ */ React__default.createElement("div", __spreadValues({ className: "block-list-grid-item" }, dragHandle), /* @__PURE__ */ React__default.createElement("div", { className: "blockItemContainer" }, /* @__PURE__ */ React__default.createElement("div", null, icon), /* @__PURE__ */ React__default.createElement("div", { style: { width: "100%" } }, !isUndefined$1(title) ? title : block == null ? void 0 : block.name)));
2214
+ const displayTitle = !isUndefined$1(title) ? title : block == null ? void 0 : block.name;
2215
+ return /* @__PURE__ */ React__default.createElement("div", { className: "block-list-grid-item" }, /* @__PURE__ */ React__default.createElement("div", __spreadValues({ className: "blockItemContainer" }, dragHandle), /* @__PURE__ */ React__default.createElement("div", null, icon), /* @__PURE__ */ React__default.createElement("div", { style: { width: "100%" } }, displayTitle)), /* @__PURE__ */ React__default.createElement(
2216
+ SharedComponents.ElementStyleGallery,
2217
+ {
2218
+ type,
2219
+ payload,
2220
+ title: displayTitle
2221
+ },
2222
+ /* @__PURE__ */ React__default.createElement(
2223
+ "div",
2224
+ {
2225
+ className: "block-list-grid-item-more",
2226
+ onPointerDown: (e) => {
2227
+ e.stopPropagation();
2228
+ e.preventDefault();
2229
+ }
2230
+ },
2231
+ /* @__PURE__ */ React__default.createElement(IconPlus, null)
2232
+ )
2233
+ ));
2207
2234
  }
2208
- const index$b = "";
2235
+ const index$c = "";
2209
2236
  const LayoutItem = ({
2210
2237
  columns,
2211
2238
  title
@@ -2262,7 +2289,7 @@ const ColumnElement = ({ column: column2 }) => {
2262
2289
  );
2263
2290
  }))));
2264
2291
  };
2265
- const index$a = "";
2292
+ const index$b = "";
2266
2293
  const defaultCategories = [
2267
2294
  {
2268
2295
  get label() {
@@ -7180,7 +7207,7 @@ const BlockSideBar = ({ height }) => {
7180
7207
  widgetMode
7181
7208
  ]);
7182
7209
  };
7183
- const index$9 = "";
7210
+ const index$a = "";
7184
7211
  const LayoutItemList = ({
7185
7212
  columns,
7186
7213
  onSelect,
@@ -7297,7 +7324,7 @@ const ColumnLayout = ({
7297
7324
  }
7298
7325
  ));
7299
7326
  };
7300
- const index$8 = "";
7327
+ const index$9 = "";
7301
7328
  const UniversalElementPanel = () => {
7302
7329
  const { selectedNodePath } = useSelectedNode();
7303
7330
  const { setUniversalElementPath } = useEditorState();
@@ -7417,7 +7444,18 @@ const ConfigurationPanel = ({
7417
7444
  )
7418
7445
  }
7419
7446
  ),
7420
- /* @__PURE__ */ React__default.createElement("div", { style: { flex: 1 } }, " ", BlockManager.getBlockTitle(element)),
7447
+ /* @__PURE__ */ React__default.createElement(
7448
+ "div",
7449
+ {
7450
+ style: {
7451
+ flex: 1,
7452
+ textOverflow: "ellipsis",
7453
+ overflow: "hidden",
7454
+ whiteSpace: "nowrap"
7455
+ }
7456
+ },
7457
+ BlockManager.getBlockTitle(element)
7458
+ ),
7421
7459
  !isSelectedUniversalElement && /* @__PURE__ */ React__default.createElement(Space, null, /* @__PURE__ */ React__default.createElement(
7422
7460
  Button$2,
7423
7461
  {
@@ -7489,7 +7527,7 @@ const ConfigurationPanel = ({
7489
7527
  deleteBlock
7490
7528
  ]);
7491
7529
  };
7492
- const index$7 = "";
7530
+ const index$8 = "";
7493
7531
  const Controller = () => {
7494
7532
  const editor = useSlate();
7495
7533
  const getRoot = () => {
@@ -8155,9 +8193,10 @@ const Hotkeys = () => {
8155
8193
  ]);
8156
8194
  return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null);
8157
8195
  };
8158
- const index$6 = "";
8196
+ const index$7 = "";
8159
8197
  const UniversalElementEditorDrawer = ({ children }) => {
8160
8198
  const [loading, setLoading] = React__default.useState(false);
8199
+ const [isEditing, setIsEditing] = React__default.useState(false);
8161
8200
  const editor = useSlate();
8162
8201
  const {
8163
8202
  universalElementEditing,
@@ -8280,24 +8319,26 @@ const UniversalElementEditorDrawer = ({ children }) => {
8280
8319
  style: {
8281
8320
  height: 40,
8282
8321
  position: "absolute",
8283
- width: 300,
8322
+ width: 500,
8284
8323
  top: 18,
8285
8324
  display: "flex"
8286
8325
  }
8287
8326
  },
8288
- /* @__PURE__ */ React__default.createElement(
8289
- Typography$1.Title,
8327
+ /* @__PURE__ */ React__default.createElement(Space, { style: { width: "100%" } }, isEditing ? /* @__PURE__ */ React__default.createElement(
8328
+ Input,
8290
8329
  {
8291
- heading: 5,
8292
- style: {
8293
- margin: 0
8294
- },
8295
- editable: {
8296
- onChange: onChangeTitle
8297
- }
8330
+ value: universalElement ? BlockManager.getBlockTitle(universalElement) : "",
8331
+ onChange: onChangeTitle,
8332
+ onBlur: () => setIsEditing(false)
8333
+ }
8334
+ ) : /* @__PURE__ */ React__default.createElement("div", null, universalElement ? BlockManager.getBlockTitle(universalElement) : ""), /* @__PURE__ */ React__default.createElement(Tooltip, { content: t("Edit") }, /* @__PURE__ */ React__default.createElement(
8335
+ "div",
8336
+ {
8337
+ style: { cursor: "pointer" },
8338
+ onClick: () => setIsEditing((d) => !d)
8298
8339
  },
8299
- universalElement && BlockManager.getBlockTitle(universalElement)
8300
- )
8340
+ /* @__PURE__ */ React__default.createElement(IconEdit, null)
8341
+ )))
8301
8342
  ),
8302
8343
  extra: /* @__PURE__ */ React__default.createElement("div", null, /* @__PURE__ */ React__default.createElement(Space, null, hasChanged ? /* @__PURE__ */ React__default.createElement(
8303
8344
  Popconfirm,
@@ -8343,7 +8384,8 @@ const UniversalElementEditorDrawer = ({ children }) => {
8343
8384
  onChangeTitle,
8344
8385
  onPublishElement,
8345
8386
  universalElement,
8346
- visible
8387
+ visible,
8388
+ isEditing
8347
8389
  ]);
8348
8390
  };
8349
8391
  const PreviewEmail = ({
@@ -24080,7 +24122,7 @@ lib.exports = MasonryComponent;
24080
24122
  lib.exports.default = MasonryComponent;
24081
24123
  var libExports = lib.exports;
24082
24124
  const Masonry$1 = /* @__PURE__ */ getDefaultExportFromCjs(libExports);
24083
- const index$5 = "";
24125
+ const index$6 = "";
24084
24126
  const defaultQueryList = [
24085
24127
  {
24086
24128
  query: "Staff Favorites",
@@ -29084,7 +29126,7 @@ function Iteration({
29084
29126
  )))))
29085
29127
  ));
29086
29128
  }
29087
- const index$4 = "";
29129
+ const index$5 = "";
29088
29130
  const DisplayOptions = ({
29089
29131
  enabledResponsive
29090
29132
  }) => {
@@ -29820,7 +29862,7 @@ const defaultAttributeFields = {
29820
29862
  FieldItem
29821
29863
  };
29822
29864
  const AttributeField = __spreadValues({}, defaultAttributeFields);
29823
- const index$3 = "";
29865
+ const index$4 = "";
29824
29866
  const AttributesPanelWrapper = (props) => {
29825
29867
  return /* @__PURE__ */ React__default.createElement("div", { id: "AttributesPanelWrapper", className: "AttributesPanelWrapper" }, /* @__PURE__ */ React__default.createElement("div", { style: __spreadValues({ padding: "1px 0px" }, props.style) }, props.children));
29826
29868
  };
@@ -30917,6 +30959,20 @@ function SocialItem$1({ index: index2, path: path2 }) {
30917
30959
  name: `attributes.src`
30918
30960
  }
30919
30961
  ), /* @__PURE__ */ React__default.createElement(Divider$2, null), /* @__PURE__ */ React__default.createElement(
30962
+ AttributeField.ColorPickerField,
30963
+ {
30964
+ path: path2,
30965
+ label: t("Background color"),
30966
+ name: `attributes.background-color`
30967
+ }
30968
+ ), /* @__PURE__ */ React__default.createElement(
30969
+ AttributeField.BorderRadius,
30970
+ {
30971
+ path: path2,
30972
+ label: t("Border radius"),
30973
+ name: `attributes.border-radius`
30974
+ }
30975
+ ), /* @__PURE__ */ React__default.createElement(
30920
30976
  AttributeField.TextField,
30921
30977
  {
30922
30978
  path: [...path2, 0],
@@ -32460,7 +32516,7 @@ const MergeTagComponent = React__default.memo((props) => {
32460
32516
  )
32461
32517
  );
32462
32518
  });
32463
- const index$2 = "";
32519
+ const index$3 = "";
32464
32520
  const SvgMoreIcon = (props) => /* @__PURE__ */ React$2.createElement("svg", __spreadValues({ viewBox: "0 0 13 3", style: {
32465
32521
  display: "block",
32466
32522
  fill: "currentColor"
@@ -33248,7 +33304,7 @@ const EditorTopBar = () => {
33248
33304
  )), /* @__PURE__ */ React__default.createElement(Space, null, /* @__PURE__ */ React__default.createElement(Button$2.Group, null, /* @__PURE__ */ React__default.createElement(Button$2, { disabled: !undoable }, /* @__PURE__ */ React__default.createElement(Tooltip, { position: "top", content: t("Undo") }, /* @__PURE__ */ React__default.createElement(IconUndo, { width: 40, onClick: editor.undo }))), /* @__PURE__ */ React__default.createElement(Button$2, { disabled: !redoable }, /* @__PURE__ */ React__default.createElement(Tooltip, { position: "top", content: t("Redo") }, /* @__PURE__ */ React__default.createElement(IconRedo, { onClick: editor.redo })))), canPreview && (lock ? /* @__PURE__ */ React__default.createElement(Tooltip, { content: t("Email preview") }, /* @__PURE__ */ React__default.createElement(Button$2, { disabled: lock }, /* @__PURE__ */ React__default.createElement(IconEye, null))) : /* @__PURE__ */ React__default.createElement(SharedComponents.PreviewEmailDrawer, null, /* @__PURE__ */ React__default.createElement(Tooltip, { content: t("Email preview") }, /* @__PURE__ */ React__default.createElement(Button$2, { disabled: lock }, /* @__PURE__ */ React__default.createElement(IconEye, null)))))), /* @__PURE__ */ React__default.createElement("div", null)))
33249
33305
  ), /* @__PURE__ */ React__default.createElement("style", null, styleText$6));
33250
33306
  };
33251
- const index$1 = "";
33307
+ const index$2 = "";
33252
33308
  const PopupCard = (props) => {
33253
33309
  return /* @__PURE__ */ React__default.createElement(
33254
33310
  Popover,
@@ -33627,7 +33683,7 @@ const Link$1 = ({ path: path2, name }) => {
33627
33683
  ))
33628
33684
  );
33629
33685
  };
33630
- const index = "";
33686
+ const index$1 = "";
33631
33687
  const ConfigurationToolbarAttributeField = {
33632
33688
  Image: Image$3,
33633
33689
  Link: Link$1,
@@ -35933,6 +35989,68 @@ const ElementIcon = (_i) => {
35933
35989
  const Icon2 = getElementIcon(type);
35934
35990
  return /* @__PURE__ */ React__default.createElement(Icon2, __spreadValues({}, props));
35935
35991
  };
35992
+ const index = "";
35993
+ const ElementStyles = {};
35994
+ function ElementStyleGallery({
35995
+ type,
35996
+ payload,
35997
+ title,
35998
+ children
35999
+ }) {
36000
+ const { selectedNodePath } = useSelectedNode();
36001
+ const [popupVisible, setPopupVisible] = useState(false);
36002
+ const { isDragging } = useContext(DraggingProviderContext);
36003
+ useEffect(() => {
36004
+ if (isDragging || selectedNodePath) {
36005
+ setPopupVisible(false);
36006
+ }
36007
+ }, [isDragging, selectedNodePath]);
36008
+ const MatchedElement = get(ElementStyles, type);
36009
+ if (!MatchedElement) {
36010
+ console.warn(`ElementStyles: ${type} not found`);
36011
+ return null;
36012
+ }
36013
+ const renderMenu = () => {
36014
+ return /* @__PURE__ */ React__default.createElement(
36015
+ Card,
36016
+ {
36017
+ title: title ? /* @__PURE__ */ React__default.createElement("p", { style: { textAlign: "left" } }, title) : void 0,
36018
+ bodyStyle: { padding: 0 },
36019
+ style: { borderRadius: 4, padding: 0 }
36020
+ },
36021
+ /* @__PURE__ */ React__default.createElement("div", { className: "block-list-menu-item-card-wrapper" }, /* @__PURE__ */ React__default.createElement(FullHeightOverlayScrollbars, { maxHeight: "60vh" }, /* @__PURE__ */ React__default.createElement("div", { className: "block-list-menu-item-card" }, /* @__PURE__ */ React__default.createElement(MatchedElement, null))))
36022
+ );
36023
+ };
36024
+ return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(
36025
+ Trigger,
36026
+ {
36027
+ popupVisible,
36028
+ popupStyle: {
36029
+ transform: "translate(10px)"
36030
+ },
36031
+ popup: renderMenu,
36032
+ trigger: ["click"],
36033
+ clickToClose: true,
36034
+ position: "rt",
36035
+ autoFitPosition: true,
36036
+ onVisibleChange: setPopupVisible
36037
+ },
36038
+ children
36039
+ ));
36040
+ }
36041
+ const DragItem = ({
36042
+ element,
36043
+ children,
36044
+ style
36045
+ }) => {
36046
+ const { dragHandle } = useDragging({
36047
+ element,
36048
+ nodeElement: null,
36049
+ action: "copy",
36050
+ cloneGhost: false
36051
+ });
36052
+ return /* @__PURE__ */ React__default.createElement("div", __spreadProps(__spreadValues({}, dragHandle), { style }), children);
36053
+ };
35936
36054
  const SharedComponents = {
35937
36055
  PreviewEmailDrawer,
35938
36056
  PreviewEmail,
@@ -35966,7 +36084,9 @@ const SharedComponents = {
35966
36084
  ConfigurationToolbar,
35967
36085
  AIAssistant,
35968
36086
  AIPromptModal,
35969
- SourceCodePanel
36087
+ SourceCodePanel,
36088
+ DragItem,
36089
+ ElementStyleGallery
35970
36090
  };
35971
36091
  const table2SelectedDataType = "data-standard-table2-selected";
35972
36092
  const table2TdSelectedDataType = "data-standard-table2-td-selected";
@@ -38681,6 +38801,7 @@ export {
38681
38801
  ControllerProvider,
38682
38802
  DraggingProvider,
38683
38803
  DraggingProviderContext,
38804
+ ElementStyles,
38684
38805
  IconFont,
38685
38806
  Minimalist,
38686
38807
  PluginsProvider,
package/lib/style.css CHANGED
@@ -60,10 +60,31 @@
60
60
  border-radius: 4px;
61
61
  box-sizing: border-box;
62
62
  background-color: #fff;
63
+ position: relative;
64
+ }
65
+ .block-list-grid-item .block-list-grid-item-more {
66
+ position: absolute;
67
+ top: -8px;
68
+ right: -8px;
69
+ width: 20px;
70
+ height: 20px;
71
+ display: flex;
72
+ align-items: center;
73
+ justify-content: center;
74
+ background-color: rgb(var(--primary-4, #1890ff));
75
+ color: white;
76
+ border-radius: 50%;
77
+ font-size: 16px;
78
+ opacity: 0;
79
+ transition: opacity 0.2s;
80
+ cursor: pointer;
63
81
  }
64
82
  .block-list-grid-item:hover {
65
83
  box-shadow: 0px 0px 2px 2px rgb(var(--primary-4, #1890ff)) !important;
66
84
  }
85
+ .block-list-grid-item:hover .block-list-grid-item-more {
86
+ opacity: 1;
87
+ }
67
88
  .block-list-grid-item .blockItemContainer {
68
89
  text-align: center;
69
90
  display: flex;
@@ -1395,6 +1416,55 @@ THEMES:
1395
1416
 
1396
1417
  .ConfigurationToolbarAttributeField-Link-content {
1397
1418
  font-size: 14px;
1419
+ }.block-list-menu-item-card-wrapper {
1420
+ border-radius: 8px;
1421
+ overflow: hidden;
1422
+ }
1423
+
1424
+ .block-list-menu-item-card {
1425
+ width: 400px;
1426
+ padding: 16px;
1427
+ background-color: #fff;
1428
+ }
1429
+
1430
+ .block-list-menu-cart-item {
1431
+ overflow: hidden;
1432
+ border-radius: 4px;
1433
+ }
1434
+ .block-list-menu-cart-item .image-container {
1435
+ width: 100%;
1436
+ height: 128px;
1437
+ overflow: hidden;
1438
+ margin-bottom: 12px;
1439
+ position: relative;
1440
+ background-color: #e5e7eb;
1441
+ }
1442
+ .block-list-menu-cart-item .image-container img {
1443
+ width: 100%;
1444
+ height: 100%;
1445
+ object-fit: cover;
1446
+ }
1447
+ .block-list-menu-cart-item .text {
1448
+ color: #333;
1449
+ font-size: 16px;
1450
+ line-height: 16px;
1451
+ padding: 0 8px 8px 8px;
1452
+ transition: color 0.3s ease;
1453
+ }
1454
+
1455
+ .block-list-menu-popover-item {
1456
+ position: relative;
1457
+ cursor: grab;
1458
+ }
1459
+ .block-list-menu-popover-item:hover::before {
1460
+ content: "";
1461
+ position: absolute;
1462
+ top: 0;
1463
+ left: 0;
1464
+ width: 100%;
1465
+ height: 100%;
1466
+ background-color: rgba(0, 0, 0, 0.1);
1467
+ z-index: 1;
1398
1468
  }/*---------------------------------------------------------------------------------------------
1399
1469
  * Copyright (c) Microsoft Corporation. All rights reserved.
1400
1470
  * Licensed under the MIT License. See License.txt in the project root for license information.
@@ -0,0 +1,7 @@
1
+ import { Element } from "slate";
2
+ import React from "react";
3
+ export declare const DragItem: ({ element, children, style, }: {
4
+ element: Element;
5
+ children: React.ReactNode;
6
+ style?: React.CSSProperties | undefined;
7
+ }) => React.JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { Element } from "easy-email-pro-core";
2
+ import React from "react";
3
+ import "./index.scss";
4
+ declare const ElementStyles: Record<string, React.FC>;
5
+ export declare function ElementStyleGallery({ type, payload, title, children, }: {
6
+ type: Element["type"];
7
+ payload?: Partial<Element>;
8
+ title?: string | null;
9
+ children: React.ReactNode;
10
+ }): React.JSX.Element | null;
11
+ export { ElementStyles };
@@ -14,6 +14,7 @@ export declare const DraggingProviderContext: React.Context<{
14
14
  onDragEnd(): void;
15
15
  draggable: boolean;
16
16
  };
17
+ isDragging: boolean;
17
18
  }>;
18
19
  export declare const DraggingProvider: React.FC<{
19
20
  children: React.ReactNode;
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { WidgetConfigPanel, WidgetTypeOptions } from "./ConfigurationPanel/components/WidgetConfigPanel";
3
3
  import { AIAssistant } from "./HoveringToolbar/componens/AIAssistant";
4
+ import { ElementStyleGallery } from "./ElementStyleGallery";
4
5
  export { enhancer } from "./Form";
5
6
  export * from "./Providers";
6
7
  export declare const SharedComponents: {
@@ -125,11 +126,18 @@ export declare const SharedComponents: {
125
126
  onRetry: () => void;
126
127
  }) => import("react").JSX.Element;
127
128
  SourceCodePanel: () => import("react").JSX.Element;
129
+ DragItem: ({ element, children, style, }: {
130
+ element: import("../easy-email-pro-core/lib/typings").Element;
131
+ children: import("react").ReactNode;
132
+ style?: import("react").CSSProperties | undefined;
133
+ }) => import("react").JSX.Element;
134
+ ElementStyleGallery: typeof ElementStyleGallery;
128
135
  };
129
136
  export { CollapseWrapper } from "./ConfigurationPanel/components/CollapseWrapper";
130
137
  export { AttributesPanelWrapper } from "./ConfigurationPanel/components/AttributesPanelWrapper";
131
138
  export { AttributeField } from "./ConfigurationPanel/components/AttributeField";
132
139
  export { ConfigPanelsMap } from "./ConfigurationPanel/Elements";
133
140
  export { WidgetTypeOptions };
141
+ export { ElementStyles } from "./ElementStyleGallery";
134
142
  export { ResponsiveField, ResponsiveTabs, } from "./ConfigurationPanel/components/ResponsiveTabs";
135
143
  export { IconFont } from "./IconFont";
@@ -41,7 +41,23 @@ export interface CategoryGridItem<T extends keyof ElementMap = any> {
41
41
  }>;
42
42
  displayType?: "grid";
43
43
  }
44
- export type Categories = Array<CategoryGridItem | {
44
+ export interface CategoryMenuItem<T extends keyof ElementMap = any> {
45
+ label: string;
46
+ active?: boolean;
47
+ blocks: Array<{
48
+ type: Element["type"];
49
+ payload?: Partial<ElementMap[T]>;
50
+ title?: string | undefined | null;
51
+ icon?: React.ReactNode;
52
+ blocks?: Array<{
53
+ payload?: Partial<ElementMap[T]>;
54
+ title?: string | undefined | null;
55
+ image?: string;
56
+ }>;
57
+ }>;
58
+ displayType?: "menu";
59
+ }
60
+ export type Categories = Array<CategoryGridItem | CategoryMenuItem | {
45
61
  label: string;
46
62
  active?: boolean;
47
63
  blocks: Array<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easy-email-pro-theme",
3
- "version": "1.47.0",
3
+ "version": "1.48.0",
4
4
  "description": "",
5
5
  "files": [
6
6
  "lib"