easy-email-pro-theme 1.54.2 → 1.55.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 +1380 -310
- package/lib/style.css +344 -0
- package/lib/typings/components/BlocksDrawer/index.d.ts +2 -0
- package/lib/typings/components/BlocksModal/index.d.ts +2 -0
- package/lib/typings/components/ConfigurationPanel/Elements/PageFooter/index.d.ts +5 -0
- package/lib/typings/components/ConfigurationPanel/Elements/PageHeader/index.d.ts +5 -0
- package/lib/typings/components/Form/index.d.ts +1 -0
- package/lib/typings/components/index.d.ts +13 -0
- package/lib/typings/hooks/index.d.ts +1 -0
- package/lib/typings/hooks/useBlocksDrawer.d.ts +9 -0
- package/lib/typings/hooks/useElementInteract.d.ts +6 -0
- package/lib/typings/index.d.ts +2 -0
- package/lib/typings/utils/index.d.ts +1 -0
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -54,16 +54,16 @@ var __async = (__this, __arguments, generator) => {
|
|
|
54
54
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
55
55
|
});
|
|
56
56
|
};
|
|
57
|
-
import { classnames, useEditorActions, useDragNodePath, useStandaloneElementEditing, useEditorProps, useRefState, isDOMElement, useMergeTagsData, useLockState, useEventCallback, useSelectedNodePath, useSelectedNode, useSetSelectedNodePath, useSetHoverNodePath, useUniversalElementEditing, useUniversalElementPath, useStandaloneElementPath, useStandaloneElement, useEditorState, useActiveTab, ActiveTabKeys, toggleFormat, TextFormat, useUniversalElement, isFormatActive, validation, CustomEvent, getDynamicImagePlaceholder, EmailEditorProvider, EmailEditor, useForceUpdate, useEqualState, IframeComponent, HtmlStringToReactNodes, useStandaloneElementSaveButton, ExternalComponents, useDragoverDirection } from "easy-email-pro-editor";
|
|
57
|
+
import { classnames, useEditorActions, useDragNodePath, useStandaloneElementEditing, useEditorProps, useRefState, isDOMElement, useMergeTagsData, useLockState, useEventCallback, useSelectedNodePath, useSelectedNode, useSetSelectedNodePath, useSetHoverNodePath, useEditorStateStore, useUniversalElementEditing, useUniversalElementPath, useStandaloneElementPath, useStandaloneElement, useEditorState, useActiveTab, ActiveTabKeys, toggleFormat, TextFormat, useUniversalElement, isFormatActive, validation, CustomEvent, getDynamicImagePlaceholder, EmailEditorProvider, EmailEditor, useForceUpdate, useEqualState, IframeComponent, HtmlStringToReactNodes, useStandaloneElementSaveButton, ExternalComponents, useDragoverDirection } from "easy-email-pro-editor";
|
|
58
58
|
import { useSlate, ReactEditor, useSlateStatic, useSelected } from "slate-react";
|
|
59
59
|
import * as React$2 from "react";
|
|
60
60
|
import React__default, { useRef, useState, useEffect, useCallback, useMemo, createContext, useContext, useLayoutEffect, memo, useReducer, cloneElement, forwardRef, Suspense, Component, createElement } from "react";
|
|
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 { 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";
|
|
63
|
-
import { Editor, Range, Node, Transforms, Path, Text as Text$
|
|
63
|
+
import { Editor, Range, Node, Transforms, Path, Text as Text$4, createEditor } from "slate";
|
|
64
64
|
import { nanoid } from "nanoid";
|
|
65
|
-
import { Form, Input, Modal, Collapse, Space, Empty, Card, Grid, Button as Button$2, Drawer, Switch, Typography as Typography$1, Tabs, Radio, Tooltip, Divider as Divider$2, Alert, Popconfirm, 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";
|
|
66
|
-
import { IconPlus, IconCopy, IconDelete, IconEdit, IconLeft, IconDownload, IconUndo, IconRedo, IconMinus, IconEye, IconSubscribeAdd, IconClose, IconCheckCircleFill, IconDragArrow, IconPalette, IconLock, IconUnlock, IconImage, IconQuestionCircle, IconLink, IconCloud, IconDragDotVertical, IconSend, IconDown } from "@arco-design/web-react/icon";
|
|
65
|
+
import { Form, Input, Modal, Collapse, Space, Empty, Card, Grid, Button as Button$2, Drawer, Switch, Typography as Typography$1, Tabs, Radio, Tooltip, Divider as Divider$2, Alert, Popconfirm, Message, PageHeader as PageHeader$1, 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";
|
|
66
|
+
import { IconPlus, IconCopy, IconDelete, IconEdit, IconLeft, IconDownload, IconUndo, IconRedo, IconMinus, IconEye, IconSubscribeAdd, IconClose, IconCheckCircleFill, IconDragArrow, IconPalette, IconLock, IconUnlock, IconImage, IconQuestionCircle, IconLink, IconCloud, IconDragDotVertical, IconSend, IconDown, IconCheck, IconSearch } from "@arco-design/web-react/icon";
|
|
67
67
|
import { unstable_batchedUpdates, createPortal } from "react-dom";
|
|
68
68
|
import mjml from "mjml-browser";
|
|
69
69
|
import { HistoryEditor } from "slate-history";
|
|
@@ -512,7 +512,7 @@ const styleText$h = `@font-face {
|
|
|
512
512
|
}
|
|
513
513
|
|
|
514
514
|
`;
|
|
515
|
-
const RetroStyleText = '[data-slate-block=page] {\n min-height: 300px;\n}\n\n[data-slate-category=navbar]::after,\n[data-slate-category=social]::after {\n content: "";\n left: 0;\n top: 0;\n position: absolute;\n width: 100%;\n height: 100%;\n z-index: 1;\n cursor: default;\n}\n\n[data-slate-hover=true] {\n z-index:
|
|
515
|
+
const RetroStyleText = '[data-slate-block=page] {\n min-height: 300px;\n}\n\n[data-slate-category=navbar]::after,\n[data-slate-category=social]::after {\n content: "";\n left: 0;\n top: 0;\n position: absolute;\n width: 100%;\n height: 100%;\n z-index: 1;\n cursor: default;\n}\n\n[data-slate-hover=true] {\n z-index: 3;\n}\n\n[data-slate-focus=true] {\n z-index: 4;\n}\n\n[data-slate-selected=true] {\n z-index: 4;\n}\n\n[data-slate-hover=true] .element-tools-container {\n z-index: 3;\n}\n\n[data-slate-selected=true] .element-tools-container {\n z-index: 4;\n}\n\n[data-slate-void=true] [data-slate-node=element][data-slate-block=button]:hover,\n[data-slate-void=true] [data-slate-node=element][data-slate-block=text]:hover {\n outline: 2px solid var(--hover-color);\n}\n\n.text-mergetag {\n outline: 1px solid rgb(78, 89, 105);\n outline-offset: 1px;\n padding: 0 2px;\n border-radius: 2px;\n cursor: pointer;\n transition: all 0.1s linear;\n border: none;\n font-weight: inherit;\n outline-color: #00a0ac;\n color: inherit;\n background-color: #ebf9fc;\n max-width: 10em;\n font-style: inherit;\n text-decoration-line: inherit;\n position: relative;\n}\n\n.text-mergetag [data-slate-string=true] {\n font-size: 0px;\n}\n\nbody .element-tools-container {\n outline: 2px solid var(--hover-color);\n z-index: 1;\n}\n\nbody .element-tools-container .element-tools {\n color: #fff;\n background-color: var(--hover-color);\n}\n\nbody .element-tools-container .element-drag-button {\n background-color: var(--hover-color);\n}\n\n[data-layer-dragging=true] .element-tools-container {\n opacity: 0;\n}\n\n[data-is-dragging=true] .element-tools-container {\n opacity: 0;\n}\n\n#dragging-placeholder .element-tools-container {\n opacity: 1 !important;\n}\n\n[data-slate-type=placeholder] {\n min-height: 64px;\n position: relative;\n background-color: rgba(242, 244, 245, 0.64);\n outline: rgb(43, 152, 211) dashed 1px;\n outline-offset: -1px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 14px;\n font-weight: 400;\n line-height: 1.3;\n color: rgb(48, 59, 67);\n margin: 0 20px;\n}\n\n[data-slate-type=placeholder] .element-delete {\n border-radius: 2px;\n padding: 0px;\n cursor: pointer;\n height: 28px;\n width: 28px;\n background-color: rgb(223, 227, 230);\n color: rgb(96, 106, 114);\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n left: 10px;\n top: 10px;\n opacity: 0.8;\n}\n\n[data-slate-type=placeholder] .element-delete:hover {\n background-color: rgb(180, 187, 195);\n opacity: 1;\n}\n\n[data-slate-type=placeholder] .element-delete svg {\n width: 20px;\n height: 20px;\n}\n\n[data-slate-universal-editing=true] {\n z-index: 2;\n}\n\n.standalone-element-mask,\n.universal-element-mask {\n position: absolute;\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n z-index: 10;\n}\n\n.unset-element-mask {\n position: absolute;\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n z-index: 10;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n[data-slate-universal-editing=true] .universal-element-mask,\n[data-slate-standalone-editing=true] .standalone-element-mask {\n display: none;\n}\n\n[data-slate-universal-editing=true] .universal-element-editing-mask,\n[data-slate-standalone-editing=true] .standalone-element-editing-mask {\n z-index: 0;\n position: absolute;\n width: 100%;\n height: 100%;\n inset: 0px;\n}\n\n[data-slate-universal-editing=true] .universal-element-editing-mask::before,\n[data-slate-standalone-editing=true] .standalone-element-editing-mask::before {\n content: " ";\n width: 10000px;\n height: 10000px;\n position: fixed;\n left: 0;\n top: 0;\n transform: translate(-50%, -50%);\n z-index: 10;\n}\n\n[data-slate-universal-editing=true] .universal-element-editing-mask::after,\n[data-slate-standalone-editing=true] .standalone-element-editing-mask::after {\n position: absolute;\n content: " ";\n width: 100%;\n height: 100%;\n inset: 0px;\n pointer-events: none;\n outline: 9999px solid rgba(255, 255, 255, 0.6);\n}\n\n.element-tools-container[data-category=page] .element-tools {\n display: none;\n}\n\n.element-tools-container[data-category=page] .element-drag-button {\n display: none;\n}\n\n.element-tools-container[data-category=page] .element-tools-move-handle {\n display: none;\n}\n\n[data-slate-block][data-slate-selected] {\n z-index: 4;\n}\n\n[data-slate-block]:has([data-slate-selected]) {\n z-index: 4;\n}';
|
|
516
516
|
const withTheme$1 = (editor) => {
|
|
517
517
|
const { insertBreak, normalizeNode, deleteBackward, apply: apply2, insertSoftBreak } = editor;
|
|
518
518
|
editor.insertBreak = (...args) => {
|
|
@@ -623,11 +623,14 @@ const withTheme$1 = (editor) => {
|
|
|
623
623
|
return;
|
|
624
624
|
}
|
|
625
625
|
}
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
626
|
+
try {
|
|
627
|
+
apply2({
|
|
628
|
+
type: "remove_node",
|
|
629
|
+
path: removePath,
|
|
630
|
+
node: Node.get(editor, removePath)
|
|
631
|
+
});
|
|
632
|
+
} catch (error2) {
|
|
633
|
+
}
|
|
631
634
|
};
|
|
632
635
|
editor.normalizeNode = (entry) => {
|
|
633
636
|
const [node, path2] = entry;
|
|
@@ -1853,6 +1856,30 @@ const useCopyBlock = () => {
|
|
|
1853
1856
|
[editor, lock, setSelectedNodePath]
|
|
1854
1857
|
);
|
|
1855
1858
|
};
|
|
1859
|
+
const useAddBlock = () => {
|
|
1860
|
+
const editor = useSlate();
|
|
1861
|
+
const lock = useLockState();
|
|
1862
|
+
const setSelectedNodePath = useSetSelectedNodePath();
|
|
1863
|
+
return useCallback(
|
|
1864
|
+
(block, path2, toNext = true) => {
|
|
1865
|
+
if (lock)
|
|
1866
|
+
return;
|
|
1867
|
+
const next = toNext ? Path.next(path2) : path2;
|
|
1868
|
+
const blockDefinition = BlockManager.getBlockByType(block.type);
|
|
1869
|
+
const newBlock = assignIdsToElementTree(
|
|
1870
|
+
blockDefinition.create(block)
|
|
1871
|
+
);
|
|
1872
|
+
Transforms.insertNodes(editor, newBlock, {
|
|
1873
|
+
at: next
|
|
1874
|
+
});
|
|
1875
|
+
try {
|
|
1876
|
+
setSelectedNodePath(next);
|
|
1877
|
+
} catch (error2) {
|
|
1878
|
+
}
|
|
1879
|
+
},
|
|
1880
|
+
[editor, lock, setSelectedNodePath]
|
|
1881
|
+
);
|
|
1882
|
+
};
|
|
1856
1883
|
const useMoveUp = () => {
|
|
1857
1884
|
const editor = useSlate();
|
|
1858
1885
|
const lock = useLockState();
|
|
@@ -2003,6 +2030,7 @@ const useElementInteract = () => {
|
|
|
2003
2030
|
const clearCanvas = useClearCanvas();
|
|
2004
2031
|
const resetSelectedNode = useResetSelectedNode();
|
|
2005
2032
|
const { isChanged } = useLastSelectedNode();
|
|
2033
|
+
const addBlock = useAddBlock();
|
|
2006
2034
|
return {
|
|
2007
2035
|
copyBlock,
|
|
2008
2036
|
deleteBlock,
|
|
@@ -2010,7 +2038,8 @@ const useElementInteract = () => {
|
|
|
2010
2038
|
isChanged,
|
|
2011
2039
|
resetSelectedNode,
|
|
2012
2040
|
moveUp,
|
|
2013
|
-
moveDown
|
|
2041
|
+
moveDown,
|
|
2042
|
+
addBlock
|
|
2014
2043
|
};
|
|
2015
2044
|
};
|
|
2016
2045
|
const defaultFontList = [
|
|
@@ -2235,6 +2264,29 @@ const MinimalistProvider = ({ children }) => {
|
|
|
2235
2264
|
const useMinimalistContext = () => {
|
|
2236
2265
|
return useContext(MinimalistContext);
|
|
2237
2266
|
};
|
|
2267
|
+
const useBlocksDrawer = () => {
|
|
2268
|
+
const context = useEditorStateStore();
|
|
2269
|
+
const openBlocksDrawer = useCallback(
|
|
2270
|
+
(insertPath, parentCategory) => {
|
|
2271
|
+
context.setBlocksDrawerInsertPath(insertPath);
|
|
2272
|
+
context.setBlocksDrawerVisible(true);
|
|
2273
|
+
context.setBlocksDrawerParentCategory(parentCategory);
|
|
2274
|
+
},
|
|
2275
|
+
[context]
|
|
2276
|
+
);
|
|
2277
|
+
const closeBlocksDrawer = useCallback(() => {
|
|
2278
|
+
context.setBlocksDrawerVisible(false);
|
|
2279
|
+
context.setBlocksDrawerInsertPath(void 0);
|
|
2280
|
+
context.setBlocksDrawerParentCategory(void 0);
|
|
2281
|
+
}, [context]);
|
|
2282
|
+
return {
|
|
2283
|
+
openBlocksDrawer,
|
|
2284
|
+
closeBlocksDrawer,
|
|
2285
|
+
visible: context.blocksDrawerVisible,
|
|
2286
|
+
insertPath: context.blocksDrawerInsertPath,
|
|
2287
|
+
parentCategory: context.blocksDrawerParentCategory
|
|
2288
|
+
};
|
|
2289
|
+
};
|
|
2238
2290
|
const ElementTools$1 = ({ element, nodeElement, path: path2 }) => {
|
|
2239
2291
|
const editor = useSlate();
|
|
2240
2292
|
const { copyBlock, deleteBlock } = useElementInteract();
|
|
@@ -2432,8 +2484,6 @@ const ElementSelected = ({ element, nodeElement, path: path2 }) => {
|
|
|
2432
2484
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, renderContent);
|
|
2433
2485
|
};
|
|
2434
2486
|
const styleText$d = "body {\n --sectionElementOffset: 100px;\n --wrapperElementOffset: 150px;\n}\n\n@media screen and (max-width: 850px) {\n [data-slate-block=page] {\n --sectionElementOffset: 70px;\n --wrapperElementOffset: 100px;\n }\n}\n.section-category-hover {\n height: 100%;\n position: absolute;\n top: 0;\n left: 0;\n width: calc(100% + 2 * var(--sectionElementOffset));\n transform: translate(calc(-1 * var(--sectionElementOffset)), 0);\n}\n\n.hero-category-hover {\n height: 100%;\n position: absolute;\n top: 0;\n left: 0;\n width: calc(100% + 2 * var(--sectionElementOffset));\n transform: translate(calc(-1 * var(--sectionElementOffset)), 0);\n}\n\n[data-is-full-width=true].section-category-hover {\n width: calc(100% - 4px);\n transform: none;\n}\n\n[data-is-hero-category=true].element-tools-container {\n width: calc(100% + 2 * var(--sectionElementOffset));\n transform: translate(calc(-1 * var(--sectionElementOffset)), 0);\n}\n\n[data-is-section-category=true].element-tools-container {\n width: calc(100% + 2 * var(--sectionElementOffset));\n transform: translate(calc(-1 * var(--sectionElementOffset)), 0);\n}\n\n[data-is-section-category=true][data-is-full-width=true].element-tools-container {\n width: calc(100% - 4px - 16px);\n transform: none;\n}\n\n.wrapper-category-hover {\n height: 100%;\n position: absolute;\n top: 0;\n left: 0;\n width: calc(100% + 2 * var(--wrapperElementOffset));\n transform: translate(calc(-1 * var(--wrapperElementOffset)), 0);\n}\n\n[data-is-full-width=true].wrapper-category-hover {\n width: calc(100% - 4px - 16px);\n transform: none;\n}\n\n[data-is-wrapper-category=true].element-tools-container {\n width: calc(100% + 2 * var(--wrapperElementOffset));\n transform: translate(calc(-1 * var(--wrapperElementOffset)), 0);\n position: absolute;\n}\n\n[data-is-wrapper-category=true][data-is-full-width=true].element-tools-container {\n width: calc(100% - 4px);\n transform: none;\n}\n\n.wrapper-category-hover {\n height: 100%;\n position: absolute;\n top: 0;\n left: 0;\n width: calc(100% + 2 * var(--wrapperElementOffset));\n transform: translate(calc(-1 * var(--wrapperElementOffset)), 0);\n}\n\n[data-is-wrapper-category=true].element-tools-container {\n width: calc(100% + 2 * var(--wrapperElementOffset));\n transform: translate(calc(-1 * var(--wrapperElementOffset)), 0);\n position: absolute;\n}";
|
|
2435
|
-
const styleText$c = "[data-standard-table2-selected=true] ::selection {\n background: none !important;\n}\n\n[data-standard-table2-selected=true] [data-standard-table2-td-selected=true] {\n background-color: rgba(199, 199, 199, 0.4) !important;\n}";
|
|
2436
|
-
const styleText$b = ".easy-email-pro-table-operation-menu {\n position: fixed;\n z-index: 999999;\n background-color: #fff;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\n font-size: 14px;\n z-index: 100;\n overflow: hidden;\n border-radius: 4px;\n padding: 4px 0;\n}\n.easy-email-pro-table-operation-menu .easy-email-pro-table-operation-menu-dividing {\n height: 1px;\n background-color: #efefef;\n}\n.easy-email-pro-table-operation-menu .easy-email-pro-table-operation-menu-item {\n display: flex;\n align-items: center;\n padding: 10px 16px;\n line-height: 18px;\n background-color: #fff;\n cursor: pointer;\n color: #595959;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.easy-email-pro-table-operation-menu .easy-email-pro-table-operation-menu-item:hover {\n background-color: #efefef;\n}\n.easy-email-pro-table-operation-menu .easy-email-pro-table-operation-menu-item .easy-email-pro-table-operation-menu-icon {\n margin-right: 8px;\n height: 20px;\n width: 20px;\n font-size: 0;\n}";
|
|
2437
2487
|
const stylesText$1 = '.BlockSideBar .arco-tabs-header {\n display: flex;\n width: 100%;\n}\n.BlockSideBar .arco-tabs-header .arco-tabs-header-title {\n flex: 1;\n margin: 0px !important;\n padding: 0 !important;\n height: 60px;\n line-height: 60px;\n position: relative;\n}\n.BlockSideBar .arco-tabs-header .arco-tabs-header-title:hover::after {\n content: "";\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n top: initial;\n height: 2px;\n background-color: var(--color-border-3);\n transition: left 0.2s cubic-bezier(0.34, 0.69, 0.1, 1), width 0.2s cubic-bezier(0.34, 0.69, 0.1, 1);\n}\n.BlockSideBar .arco-tabs-header .arco-tabs-header-title .arco-tabs-header-title-text {\n display: block;\n text-align: center;\n width: 100%;\n}\n.BlockSideBar .arco-tabs-header .arco-tabs-header-title .arco-tabs-header-title-text::before {\n display: none;\n}\n.BlockSideBar .arco-tabs-content {\n padding-top: 0;\n}\n\n.ConfigurationSideBar {\n height: 60px;\n line-height: 60px;\n position: relative;\n border-bottom: 1px solid #e5e7eb;\n display: flex;\n align-items: center;\n justify-content: center;\n color: rgb(var(--primary-6));\n font-weight: 500;\n}';
|
|
2438
2488
|
const UniversalList = () => {
|
|
2439
2489
|
const { universalElementSetting } = useEditorProps();
|
|
@@ -7161,7 +7211,7 @@ const action = "_action_7uv5l_56";
|
|
|
7161
7211
|
const itemTitle = "_itemTitle_7uv5l_73";
|
|
7162
7212
|
const itemCollapse = "_itemCollapse_7uv5l_79";
|
|
7163
7213
|
const itemChildren = "_itemChildren_7uv5l_100";
|
|
7164
|
-
const styles$
|
|
7214
|
+
const styles$6 = {
|
|
7165
7215
|
item: item$2,
|
|
7166
7216
|
itemContent,
|
|
7167
7217
|
itemActions,
|
|
@@ -7353,7 +7403,7 @@ function SortableComponentItem({
|
|
|
7353
7403
|
const isVoid = BlockManager.getBlockByType(component.block.type).void;
|
|
7354
7404
|
const hasBlockChildren = !isVoid && component.block.children.every((child) => NodeUtils.isBlockElement(child));
|
|
7355
7405
|
const hideWhenDragging = isDraggingLevel && !isCurrentDragging;
|
|
7356
|
-
return /* @__PURE__ */ React__default.createElement("div", { ref: setNodeRef, style, className: styles$
|
|
7406
|
+
return /* @__PURE__ */ React__default.createElement("div", { ref: setNodeRef, style, className: styles$6.sortableItem }, /* @__PURE__ */ React__default.createElement(
|
|
7357
7407
|
ComponentItem,
|
|
7358
7408
|
{
|
|
7359
7409
|
component,
|
|
@@ -7363,7 +7413,7 @@ function SortableComponentItem({
|
|
|
7363
7413
|
onToggleCollapse,
|
|
7364
7414
|
dragHandleProps: __spreadValues(__spreadValues({}, attributes), listeners)
|
|
7365
7415
|
}
|
|
7366
|
-
), hasBlockChildren && !isCollapsed && !isDragging && !hideWhenDragging && /* @__PURE__ */ React__default.createElement("div", { className: styles$
|
|
7416
|
+
), hasBlockChildren && !isCollapsed && !isDragging && !hideWhenDragging && /* @__PURE__ */ React__default.createElement("div", { className: styles$6.itemChildren }, /* @__PURE__ */ React__default.createElement(
|
|
7367
7417
|
ElementList,
|
|
7368
7418
|
{
|
|
7369
7419
|
blocks: component.block.children,
|
|
@@ -7467,11 +7517,11 @@ function ComponentItem({
|
|
|
7467
7517
|
setHoverNodePath(null);
|
|
7468
7518
|
};
|
|
7469
7519
|
const itemClassName = useMemo(() => {
|
|
7470
|
-
const classes = [styles$
|
|
7520
|
+
const classes = [styles$6.item];
|
|
7471
7521
|
if (isHovered)
|
|
7472
|
-
classes.push(styles$
|
|
7522
|
+
classes.push(styles$6.itemHovered);
|
|
7473
7523
|
if (isSelected)
|
|
7474
|
-
classes.push(styles$
|
|
7524
|
+
classes.push(styles$6.itemSelected);
|
|
7475
7525
|
return classes.join(" ");
|
|
7476
7526
|
}, [isHovered, isSelected]);
|
|
7477
7527
|
return /* @__PURE__ */ React__default.createElement(
|
|
@@ -7482,10 +7532,10 @@ function ComponentItem({
|
|
|
7482
7532
|
onMouseEnter: handleMouseEnter,
|
|
7483
7533
|
onMouseLeave: handleMouseLeave
|
|
7484
7534
|
},
|
|
7485
|
-
/* @__PURE__ */ React__default.createElement("div", { className: styles$
|
|
7535
|
+
/* @__PURE__ */ React__default.createElement("div", { className: styles$6.itemContent }, /* @__PURE__ */ React__default.createElement("div", { className: styles$6.itemTitle }, /* @__PURE__ */ React__default.createElement(
|
|
7486
7536
|
"div",
|
|
7487
7537
|
{
|
|
7488
|
-
className: styles$
|
|
7538
|
+
className: styles$6.itemCollapse,
|
|
7489
7539
|
style: { opacity: hasBlockChildren ? 1 : 0 },
|
|
7490
7540
|
onClick: handleCollapseClick
|
|
7491
7541
|
},
|
|
@@ -7499,28 +7549,28 @@ function ComponentItem({
|
|
|
7499
7549
|
},
|
|
7500
7550
|
collapseIcon
|
|
7501
7551
|
)
|
|
7502
|
-
), /* @__PURE__ */ React__default.createElement("div", { className: styles$
|
|
7552
|
+
), /* @__PURE__ */ React__default.createElement("div", { className: styles$6.itemLabelWrapper }, /* @__PURE__ */ React__default.createElement(
|
|
7503
7553
|
SharedComponents.ElementIcon,
|
|
7504
7554
|
{
|
|
7505
7555
|
type: component.block.type,
|
|
7506
7556
|
width: 16,
|
|
7507
7557
|
height: 16
|
|
7508
7558
|
}
|
|
7509
|
-
), /* @__PURE__ */ React__default.createElement("div", { className: styles$
|
|
7559
|
+
), /* @__PURE__ */ React__default.createElement("div", { className: styles$6.itemLabel }, displayLabel))), /* @__PURE__ */ React__default.createElement(
|
|
7510
7560
|
"div",
|
|
7511
7561
|
{
|
|
7512
|
-
className: styles$
|
|
7562
|
+
className: styles$6.itemActions,
|
|
7513
7563
|
onClick: (e) => e.stopPropagation()
|
|
7514
7564
|
},
|
|
7515
|
-
/* @__PURE__ */ React__default.createElement("div", { className: styles$
|
|
7516
|
-
/* @__PURE__ */ React__default.createElement("div", { className: styles$
|
|
7565
|
+
/* @__PURE__ */ React__default.createElement("div", { className: styles$6.action, onClick: onCopy }, /* @__PURE__ */ React__default.createElement(IconCopy, null)),
|
|
7566
|
+
/* @__PURE__ */ React__default.createElement("div", { className: styles$6.action, onClick: onRemove }, /* @__PURE__ */ React__default.createElement(IconDelete, null)),
|
|
7517
7567
|
/* @__PURE__ */ React__default.createElement(
|
|
7518
7568
|
"div",
|
|
7519
7569
|
__spreadValues({
|
|
7520
7570
|
style: {
|
|
7521
7571
|
cursor: "grab"
|
|
7522
7572
|
},
|
|
7523
|
-
className: styles$
|
|
7573
|
+
className: styles$6.action
|
|
7524
7574
|
}, dragHandleProps),
|
|
7525
7575
|
/* @__PURE__ */ React__default.createElement("svg", { viewBox: "0 0 20 20", width: "12" }, /* @__PURE__ */ React__default.createElement("path", { d: "M7 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 2zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 14zm6-8a2 2 0 1 0-.001-4.001A2 2 0 0 0 13 6zm0 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 14z" }))
|
|
7526
7576
|
)
|
|
@@ -7683,7 +7733,7 @@ function HeaderFooterItem({ element }) {
|
|
|
7683
7733
|
return /* @__PURE__ */ React__default.createElement(
|
|
7684
7734
|
"div",
|
|
7685
7735
|
{
|
|
7686
|
-
className: styles$
|
|
7736
|
+
className: styles$6.item,
|
|
7687
7737
|
onClick,
|
|
7688
7738
|
onMouseEnter: handleMouseEnter,
|
|
7689
7739
|
onMouseLeave: handleMouseLeave,
|
|
@@ -7699,28 +7749,28 @@ function HeaderFooterItem({ element }) {
|
|
|
7699
7749
|
/* @__PURE__ */ React__default.createElement(
|
|
7700
7750
|
"div",
|
|
7701
7751
|
{
|
|
7702
|
-
className: styles$
|
|
7752
|
+
className: styles$6.itemContent,
|
|
7703
7753
|
style: {
|
|
7704
7754
|
backgroundColor: "transparent",
|
|
7705
7755
|
padding: "8px 10px"
|
|
7706
7756
|
}
|
|
7707
7757
|
},
|
|
7708
|
-
/* @__PURE__ */ React__default.createElement("div", { className: styles$
|
|
7758
|
+
/* @__PURE__ */ React__default.createElement("div", { className: styles$6.itemTitle }, /* @__PURE__ */ React__default.createElement("div", { className: styles$6.itemLabelWrapper }, /* @__PURE__ */ React__default.createElement(
|
|
7709
7759
|
SharedComponents.ElementIcon,
|
|
7710
7760
|
{
|
|
7711
7761
|
type: element.type,
|
|
7712
7762
|
width: 16,
|
|
7713
7763
|
height: 16
|
|
7714
7764
|
}
|
|
7715
|
-
), /* @__PURE__ */ React__default.createElement("div", { className: styles$
|
|
7765
|
+
), /* @__PURE__ */ React__default.createElement("div", { className: styles$6.itemLabel }, label))),
|
|
7716
7766
|
/* @__PURE__ */ React__default.createElement(
|
|
7717
7767
|
"div",
|
|
7718
7768
|
{
|
|
7719
|
-
className: styles$
|
|
7769
|
+
className: styles$6.itemActions,
|
|
7720
7770
|
style: { opacity: 1 },
|
|
7721
7771
|
onClick: (e) => e.stopPropagation()
|
|
7722
7772
|
},
|
|
7723
|
-
/* @__PURE__ */ React__default.createElement("div", { className: styles$
|
|
7773
|
+
/* @__PURE__ */ React__default.createElement("div", { className: styles$6.action }, /* @__PURE__ */ React__default.createElement(
|
|
7724
7774
|
"svg",
|
|
7725
7775
|
{
|
|
7726
7776
|
viewBox: "0 0 1024 1024",
|
|
@@ -8102,6 +8152,7 @@ const ConfigurationPanel = ({
|
|
|
8102
8152
|
return useMemo(() => {
|
|
8103
8153
|
if (!element || !selectedNodePath)
|
|
8104
8154
|
return null;
|
|
8155
|
+
const isPageHeaderOrFooter = NodeUtils.isPageHeaderElement(element) || NodeUtils.isPageFooterElement(element);
|
|
8105
8156
|
const isSelectedUniversalElement = universalElementPath && Path.equals(selectedNodePath, universalElementPath);
|
|
8106
8157
|
const isSelectedStandaloneElement = standaloneElementPath && Path.equals(selectedNodePath, standaloneElementPath);
|
|
8107
8158
|
const isHideBackIcon = (universalElementEditing || standaloneElementEditing) && compact;
|
|
@@ -8168,7 +8219,7 @@ const ConfigurationPanel = ({
|
|
|
8168
8219
|
onClick: generateImage
|
|
8169
8220
|
}
|
|
8170
8221
|
)
|
|
8171
|
-
), !isSelectedUniversalElement && !isSelectedStandaloneElement && /* @__PURE__ */ React__default.createElement(Space, null, /* @__PURE__ */ React__default.createElement(
|
|
8222
|
+
), !isSelectedUniversalElement && !isSelectedStandaloneElement && !isPageHeaderOrFooter && /* @__PURE__ */ React__default.createElement(Space, null, /* @__PURE__ */ React__default.createElement(
|
|
8172
8223
|
Button$2,
|
|
8173
8224
|
{
|
|
8174
8225
|
onClick: () => onCopy(selectedNodePath),
|
|
@@ -8389,7 +8440,7 @@ const TabHeader = (props) => {
|
|
|
8389
8440
|
));
|
|
8390
8441
|
};
|
|
8391
8442
|
const hoverUnderline = "_hoverUnderline_8d8dl_1";
|
|
8392
|
-
const styles$
|
|
8443
|
+
const styles$5 = {
|
|
8393
8444
|
hoverUnderline
|
|
8394
8445
|
};
|
|
8395
8446
|
function BlockPaths({
|
|
@@ -8451,7 +8502,7 @@ function BlockPaths({
|
|
|
8451
8502
|
/* @__PURE__ */ React__default.createElement(
|
|
8452
8503
|
"span",
|
|
8453
8504
|
{
|
|
8454
|
-
className: styles$
|
|
8505
|
+
className: styles$5.hoverUnderline,
|
|
8455
8506
|
onClick: () => setSelectedNodePath(item2.path)
|
|
8456
8507
|
},
|
|
8457
8508
|
item2.name
|
|
@@ -9042,7 +9093,7 @@ const UniversalElementEditorDrawer = ({ children }) => {
|
|
|
9042
9093
|
footer: null
|
|
9043
9094
|
},
|
|
9044
9095
|
/* @__PURE__ */ React__default.createElement(
|
|
9045
|
-
PageHeader,
|
|
9096
|
+
PageHeader$1,
|
|
9046
9097
|
{
|
|
9047
9098
|
backIcon: hasChanged ? /* @__PURE__ */ React__default.createElement(
|
|
9048
9099
|
Popconfirm,
|
|
@@ -9154,9 +9205,9 @@ const PreviewEmail = ({
|
|
|
9154
9205
|
const [html, setHtml] = useState("");
|
|
9155
9206
|
const mjmlString = useMemo(() => {
|
|
9156
9207
|
try {
|
|
9157
|
-
let
|
|
9208
|
+
let content2 = values.content;
|
|
9158
9209
|
if (widgetMode) {
|
|
9159
|
-
|
|
9210
|
+
content2 = __spreadProps(__spreadValues({}, content2), {
|
|
9160
9211
|
children: [
|
|
9161
9212
|
__spreadProps(__spreadValues({}, values.widgetElement), {
|
|
9162
9213
|
children: values.content.children
|
|
@@ -9165,7 +9216,7 @@ const PreviewEmail = ({
|
|
|
9165
9216
|
});
|
|
9166
9217
|
}
|
|
9167
9218
|
return EditorCore.toMJML({
|
|
9168
|
-
element:
|
|
9219
|
+
element: content2,
|
|
9169
9220
|
mode: "production",
|
|
9170
9221
|
universalElements: universalElementSetting,
|
|
9171
9222
|
mergetagsData: cloneDeep(mergetagsData),
|
|
@@ -13677,7 +13728,7 @@ var OverlayScrollbars$1 = { exports: {} };
|
|
|
13677
13728
|
function getContentMeasureElement() {
|
|
13678
13729
|
return _isTextarea ? _textareaCoverElement[0] : _contentElementNative;
|
|
13679
13730
|
}
|
|
13680
|
-
function generateDiv(classesOrAttrs,
|
|
13731
|
+
function generateDiv(classesOrAttrs, content2) {
|
|
13681
13732
|
return "<div " + (classesOrAttrs ? type(classesOrAttrs) == TYPES.s ? 'class="' + classesOrAttrs + '"' : function() {
|
|
13682
13733
|
var key2;
|
|
13683
13734
|
var attrs = _strEmpty;
|
|
@@ -13686,7 +13737,7 @@ var OverlayScrollbars$1 = { exports: {} };
|
|
|
13686
13737
|
attrs += (key2 === "c" ? "class" : key2) + '="' + classesOrAttrs[key2] + '" ';
|
|
13687
13738
|
}
|
|
13688
13739
|
return attrs;
|
|
13689
|
-
}() : _strEmpty) + ">" + (
|
|
13740
|
+
}() : _strEmpty) + ">" + (content2 || _strEmpty) + "</div>";
|
|
13690
13741
|
}
|
|
13691
13742
|
function selectOrGenerateDivByClass(className, selectParentOrOnlyChildren) {
|
|
13692
13743
|
var onlyChildren = type(selectParentOrOnlyChildren) == TYPES.b;
|
|
@@ -14934,9 +14985,9 @@ const HoveringToolbar = () => {
|
|
|
14934
14985
|
]);
|
|
14935
14986
|
if (!isShowHoveringBar || !list.length)
|
|
14936
14987
|
return null;
|
|
14937
|
-
const
|
|
14988
|
+
const content2 = /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, hoveringToolbar == null ? void 0 : hoveringToolbar.prefix, /* @__PURE__ */ React__default.createElement(SharedComponents.RichTextBar, { list }), hoveringToolbar == null ? void 0 : hoveringToolbar.subfix, /* @__PURE__ */ React__default.createElement("style", null, styleText$h));
|
|
14938
14989
|
if (hoveringToolbar == null ? void 0 : hoveringToolbar.fixed) {
|
|
14939
|
-
return /* @__PURE__ */ React__default.createElement("div", null,
|
|
14990
|
+
return /* @__PURE__ */ React__default.createElement("div", null, content2);
|
|
14940
14991
|
}
|
|
14941
14992
|
const editorContainer = document.getElementById(EDITOR_CONTAINER);
|
|
14942
14993
|
return createPortal(
|
|
@@ -14969,7 +15020,7 @@ const HoveringToolbar = () => {
|
|
|
14969
15020
|
className: "HoveringToolbar-list",
|
|
14970
15021
|
style: { visibility: lock ? "hidden" : "visible" }
|
|
14971
15022
|
},
|
|
14972
|
-
|
|
15023
|
+
content2
|
|
14973
15024
|
),
|
|
14974
15025
|
/* @__PURE__ */ React__default.createElement("style", null, `#HoveringToolbar {
|
|
14975
15026
|
--hovering-bar-icon-size: ${(hoveringToolbar == null ? void 0 : hoveringToolbar.iconSize) || 12}px;
|
|
@@ -15077,7 +15128,7 @@ const BgColor = () => {
|
|
|
15077
15128
|
if (editor.selection && Node.has(editor, editor.selection.anchor.path)) {
|
|
15078
15129
|
const nodes = Editor.nodes(editor, {
|
|
15079
15130
|
match: (node) => {
|
|
15080
|
-
return Text$
|
|
15131
|
+
return Text$4.isText(node);
|
|
15081
15132
|
},
|
|
15082
15133
|
mode: "lowest",
|
|
15083
15134
|
voids: true
|
|
@@ -15147,7 +15198,7 @@ const BgColor = () => {
|
|
|
15147
15198
|
[TextFormat.BACKGROUND_COLOR]: val
|
|
15148
15199
|
},
|
|
15149
15200
|
{
|
|
15150
|
-
match: Text$
|
|
15201
|
+
match: Text$4.isText,
|
|
15151
15202
|
split: true,
|
|
15152
15203
|
at: mergeNodeEntry ? mergeNodeEntry[1] : void 0,
|
|
15153
15204
|
voids: true
|
|
@@ -15223,7 +15274,7 @@ const FontColor = () => {
|
|
|
15223
15274
|
if (editor.selection && Node.has(editor, editor.selection.anchor.path)) {
|
|
15224
15275
|
const [entry] = Editor.nodes(editor, {
|
|
15225
15276
|
match: (node) => {
|
|
15226
|
-
return Text$
|
|
15277
|
+
return Text$4.isText(node);
|
|
15227
15278
|
},
|
|
15228
15279
|
mode: "lowest",
|
|
15229
15280
|
voids: true
|
|
@@ -15287,7 +15338,7 @@ const FontColor = () => {
|
|
|
15287
15338
|
[TextFormat.TEXT_COLOR]: val
|
|
15288
15339
|
},
|
|
15289
15340
|
{
|
|
15290
|
-
match: Text$
|
|
15341
|
+
match: Text$4.isText,
|
|
15291
15342
|
split: true,
|
|
15292
15343
|
at: mergeNodeEntry ? mergeNodeEntry[1] : void 0,
|
|
15293
15344
|
voids: true
|
|
@@ -15498,7 +15549,7 @@ const getLinkNode = (editor) => {
|
|
|
15498
15549
|
try {
|
|
15499
15550
|
const [match] = Editor.nodes(editor, {
|
|
15500
15551
|
match: (n) => {
|
|
15501
|
-
return Text$
|
|
15552
|
+
return Text$4.isText(n) && Boolean(n[TextFormat.LINK]);
|
|
15502
15553
|
},
|
|
15503
15554
|
mode: "lowest",
|
|
15504
15555
|
voids: true
|
|
@@ -15766,18 +15817,18 @@ function basicElementToStandardElement(element) {
|
|
|
15766
15817
|
}
|
|
15767
15818
|
return element;
|
|
15768
15819
|
}
|
|
15769
|
-
const mjmlToJson = (
|
|
15770
|
-
if (!isString$1(
|
|
15771
|
-
return mjmlTransform(
|
|
15820
|
+
const mjmlToJson = (content2) => {
|
|
15821
|
+
if (!isString$1(content2)) {
|
|
15822
|
+
return mjmlTransform(content2);
|
|
15772
15823
|
}
|
|
15773
15824
|
const domParser = new DOMParser();
|
|
15774
|
-
const dom = domParser.parseFromString(
|
|
15825
|
+
const dom = domParser.parseFromString(content2, "text/xml");
|
|
15775
15826
|
const root2 = dom.firstChild;
|
|
15776
15827
|
if (root2.tagName !== "mjml") {
|
|
15777
15828
|
throw new Error("mjmlToJson: invalid mjml. First node must be mjml");
|
|
15778
15829
|
}
|
|
15779
15830
|
if (root2.tagName === "mjml") {
|
|
15780
|
-
const { json } = mjml(
|
|
15831
|
+
const { json } = mjml(content2, {
|
|
15781
15832
|
validationLevel: "soft"
|
|
15782
15833
|
});
|
|
15783
15834
|
const parseValue = mjmlTransform(json);
|
|
@@ -15947,6 +15998,12 @@ const getMergeTagsByType = (mergetags, type) => {
|
|
|
15947
15998
|
});
|
|
15948
15999
|
return list;
|
|
15949
16000
|
};
|
|
16001
|
+
const getFallbackValue = (params) => {
|
|
16002
|
+
const { mode, name, defaultElement } = params;
|
|
16003
|
+
if (!defaultElement)
|
|
16004
|
+
return void 0;
|
|
16005
|
+
return mode === ActiveTabKeys.DESKTOP ? get(defaultElement, "attributes." + name) : get(defaultElement, "mobileAttributes." + name);
|
|
16006
|
+
};
|
|
15950
16007
|
function isValidHttpUrl(str) {
|
|
15951
16008
|
let url;
|
|
15952
16009
|
try {
|
|
@@ -15962,6 +16019,7 @@ function isValidHttpUrl(str) {
|
|
|
15962
16019
|
const TextLink = () => {
|
|
15963
16020
|
const editor = useSlate();
|
|
15964
16021
|
const linkNodeEntry = getLinkNode(editor);
|
|
16022
|
+
const { getPopupContainer } = useContext(RichTextBarContext);
|
|
15965
16023
|
const ref = useRef(null);
|
|
15966
16024
|
const linkNode = linkNodeEntry == null ? void 0 : linkNodeEntry[0];
|
|
15967
16025
|
const selectedNodePath = useSelectedNodePath();
|
|
@@ -16044,7 +16102,7 @@ const TextLink = () => {
|
|
|
16044
16102
|
} : null
|
|
16045
16103
|
},
|
|
16046
16104
|
{
|
|
16047
|
-
match: Text$
|
|
16105
|
+
match: Text$4.isText,
|
|
16048
16106
|
split: true,
|
|
16049
16107
|
at: mergeNodeEntry ? mergeNodeEntry[1] : void 0,
|
|
16050
16108
|
voids: true
|
|
@@ -16078,6 +16136,9 @@ const TextLink = () => {
|
|
|
16078
16136
|
popupStyle: { padding: "10px 0px 0px 0px", width: 400 }
|
|
16079
16137
|
},
|
|
16080
16138
|
getPopupContainer: (node) => {
|
|
16139
|
+
if (getPopupContainer) {
|
|
16140
|
+
return getPopupContainer(node);
|
|
16141
|
+
}
|
|
16081
16142
|
return Array.from(document.querySelectorAll(".RichTextBar")).find(
|
|
16082
16143
|
(item2) => item2.contains(node)
|
|
16083
16144
|
);
|
|
@@ -16518,7 +16579,7 @@ const FontSize$2 = () => {
|
|
|
16518
16579
|
const selection = editor.selection;
|
|
16519
16580
|
if (selection && Range.isCollapsed(selection) && Node.has(editor, selection.anchor.path)) {
|
|
16520
16581
|
const entries = Editor.nodes(editor, {
|
|
16521
|
-
match: (node) => Text$
|
|
16582
|
+
match: (node) => Text$4.isText(node),
|
|
16522
16583
|
mode: "lowest",
|
|
16523
16584
|
voids: true
|
|
16524
16585
|
});
|
|
@@ -16592,7 +16653,7 @@ const FontSize$2 = () => {
|
|
|
16592
16653
|
[TextFormat.FONT_SIZE]: val
|
|
16593
16654
|
},
|
|
16594
16655
|
{
|
|
16595
|
-
match: Text$
|
|
16656
|
+
match: Text$4.isText,
|
|
16596
16657
|
split: true,
|
|
16597
16658
|
at: mergeNodeEntry ? mergeNodeEntry[1] : void 0,
|
|
16598
16659
|
voids: true
|
|
@@ -16639,7 +16700,7 @@ const FontFamily$2 = () => {
|
|
|
16639
16700
|
const selection = editor.selection;
|
|
16640
16701
|
if (selection && Range.isCollapsed(selection) && Node.has(editor, selection.anchor.path)) {
|
|
16641
16702
|
const entries = Editor.nodes(editor, {
|
|
16642
|
-
match: (node) => Text$
|
|
16703
|
+
match: (node) => Text$4.isText(node),
|
|
16643
16704
|
voids: true,
|
|
16644
16705
|
mode: "lowest"
|
|
16645
16706
|
});
|
|
@@ -16700,7 +16761,7 @@ const FontFamily$2 = () => {
|
|
|
16700
16761
|
[TextFormat.FONT_FAMILY]: val
|
|
16701
16762
|
},
|
|
16702
16763
|
{
|
|
16703
|
-
match: Text$
|
|
16764
|
+
match: Text$4.isText,
|
|
16704
16765
|
split: true,
|
|
16705
16766
|
at: mergeNodeEntry ? mergeNodeEntry[1] : void 0,
|
|
16706
16767
|
voids: true
|
|
@@ -16858,7 +16919,7 @@ const Image$5 = () => {
|
|
|
16858
16919
|
}
|
|
16859
16920
|
);
|
|
16860
16921
|
Transforms.insertNodes(editor, imageNode, {
|
|
16861
|
-
match: Text$
|
|
16922
|
+
match: Text$4.isText
|
|
16862
16923
|
});
|
|
16863
16924
|
(_a = ref.current) == null ? void 0 : _a.click();
|
|
16864
16925
|
};
|
|
@@ -17016,7 +17077,7 @@ const RichTextBar = ({
|
|
|
17016
17077
|
},
|
|
17017
17078
|
[editor, mergetagNode]
|
|
17018
17079
|
);
|
|
17019
|
-
const
|
|
17080
|
+
const content2 = useMemo(() => {
|
|
17020
17081
|
const toolsMapping = {
|
|
17021
17082
|
[TextFormat.TURN_INTO]: /* @__PURE__ */ React__default.createElement(PreventFocusWrapper, null, /* @__PURE__ */ React__default.createElement(TurnInto, null)),
|
|
17022
17083
|
[TextFormat.AI_ASSISTANT]: AIAssistant2 && !mergetagNode ? /* @__PURE__ */ React__default.createElement(SharedComponents.AIAssistant, null) : /* @__PURE__ */ React__default.createElement(React__default.Fragment, null),
|
|
@@ -17087,7 +17148,7 @@ const RichTextBar = ({
|
|
|
17087
17148
|
rowGap: "4px"
|
|
17088
17149
|
}
|
|
17089
17150
|
},
|
|
17090
|
-
|
|
17151
|
+
content2
|
|
17091
17152
|
), /* @__PURE__ */ React__default.createElement("div", { className: "mergtag-popover" }, mergetagNode && MergetagPopover2 && /* @__PURE__ */ React__default.createElement(
|
|
17092
17153
|
MergetagPopover2,
|
|
17093
17154
|
{
|
|
@@ -17223,11 +17284,11 @@ const extend = (a, b, thisArg, { allOwnKeys } = {}) => {
|
|
|
17223
17284
|
}, { allOwnKeys });
|
|
17224
17285
|
return a;
|
|
17225
17286
|
};
|
|
17226
|
-
const stripBOM = (
|
|
17227
|
-
if (
|
|
17228
|
-
|
|
17287
|
+
const stripBOM = (content2) => {
|
|
17288
|
+
if (content2.charCodeAt(0) === 65279) {
|
|
17289
|
+
content2 = content2.slice(1);
|
|
17229
17290
|
}
|
|
17230
|
-
return
|
|
17291
|
+
return content2;
|
|
17231
17292
|
};
|
|
17232
17293
|
const inherits = (constructor, superConstructor, props, descriptors2) => {
|
|
17233
17294
|
constructor.prototype = Object.create(superConstructor.prototype, descriptors2);
|
|
@@ -27317,6 +27378,45 @@ const JsonAdapter = {
|
|
|
27317
27378
|
return val;
|
|
27318
27379
|
}
|
|
27319
27380
|
};
|
|
27381
|
+
const pixelAdapter = {
|
|
27382
|
+
formatter(val) {
|
|
27383
|
+
if (!isString$1(val) && !val)
|
|
27384
|
+
return "";
|
|
27385
|
+
val = val.toString();
|
|
27386
|
+
if (/^\d+px$/.test(val.trim()))
|
|
27387
|
+
return val.replace("px", "");
|
|
27388
|
+
return val;
|
|
27389
|
+
},
|
|
27390
|
+
normalize(val) {
|
|
27391
|
+
if (!isString$1(val))
|
|
27392
|
+
return void 0;
|
|
27393
|
+
val = val.toString().trim();
|
|
27394
|
+
if (!val)
|
|
27395
|
+
return void 0;
|
|
27396
|
+
if (/^\d+$/.test(val))
|
|
27397
|
+
return val + "px";
|
|
27398
|
+
return val;
|
|
27399
|
+
}
|
|
27400
|
+
};
|
|
27401
|
+
const sliderAdapter = {
|
|
27402
|
+
formatter(val) {
|
|
27403
|
+
if (!val)
|
|
27404
|
+
return 0;
|
|
27405
|
+
val = val.toString();
|
|
27406
|
+
if (/^\d+px$/.test(val.trim()))
|
|
27407
|
+
return +val.replace("px", "");
|
|
27408
|
+
return +val;
|
|
27409
|
+
},
|
|
27410
|
+
normalize(val) {
|
|
27411
|
+
if (!isNumber$1(val))
|
|
27412
|
+
return void 0;
|
|
27413
|
+
if (!val)
|
|
27414
|
+
return void 0;
|
|
27415
|
+
if (/^\d+$/.test(val))
|
|
27416
|
+
return val + "px";
|
|
27417
|
+
return val;
|
|
27418
|
+
}
|
|
27419
|
+
};
|
|
27320
27420
|
const colorAdapter = {
|
|
27321
27421
|
formatter(val) {
|
|
27322
27422
|
if (!isString$1(val) && !val)
|
|
@@ -27363,6 +27463,18 @@ const pixelNumberAdapter = {
|
|
|
27363
27463
|
return val;
|
|
27364
27464
|
}
|
|
27365
27465
|
};
|
|
27466
|
+
const fontStyleAdapter = {
|
|
27467
|
+
formatter(val) {
|
|
27468
|
+
if (!val)
|
|
27469
|
+
return "normal";
|
|
27470
|
+
return val;
|
|
27471
|
+
},
|
|
27472
|
+
normalize(val) {
|
|
27473
|
+
if (val === "normal")
|
|
27474
|
+
return void 0;
|
|
27475
|
+
return val;
|
|
27476
|
+
}
|
|
27477
|
+
};
|
|
27366
27478
|
const fontWeightAdapter = {
|
|
27367
27479
|
formatter(val) {
|
|
27368
27480
|
if (!val)
|
|
@@ -27661,7 +27773,7 @@ function EditPanelList(props) {
|
|
|
27661
27773
|
},
|
|
27662
27774
|
[list, props, prevActiveKey, itemIds]
|
|
27663
27775
|
);
|
|
27664
|
-
const
|
|
27776
|
+
const content2 = /* @__PURE__ */ React__default.createElement("div", null, /* @__PURE__ */ React__default.createElement(
|
|
27665
27777
|
Collapse,
|
|
27666
27778
|
{
|
|
27667
27779
|
activeKey,
|
|
@@ -27705,7 +27817,7 @@ function EditPanelList(props) {
|
|
|
27705
27817
|
}
|
|
27706
27818
|
)
|
|
27707
27819
|
},
|
|
27708
|
-
list.length === 0 ? /* @__PURE__ */ React__default.createElement(Empty, { description: t("No data") }) :
|
|
27820
|
+
list.length === 0 ? /* @__PURE__ */ React__default.createElement(Empty, { description: t("No data") }) : content2
|
|
27709
27821
|
);
|
|
27710
27822
|
}
|
|
27711
27823
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(
|
|
@@ -27740,7 +27852,7 @@ function EditPanelList(props) {
|
|
|
27740
27852
|
),
|
|
27741
27853
|
contentStyle: { padding: 10 }
|
|
27742
27854
|
},
|
|
27743
|
-
list.length === 0 ? /* @__PURE__ */ React__default.createElement(Empty, { description: t("No data") }) :
|
|
27855
|
+
list.length === 0 ? /* @__PURE__ */ React__default.createElement(Empty, { description: t("No data") }) : content2
|
|
27744
27856
|
)),
|
|
27745
27857
|
/* @__PURE__ */ React__default.createElement(DragOverlay, null, activeId && activeItem ? /* @__PURE__ */ React__default.createElement(
|
|
27746
27858
|
"div",
|
|
@@ -27889,7 +28001,7 @@ const cardItemLeft = "_cardItemLeft_8uw8m_71";
|
|
|
27889
28001
|
const cardItemRight = "_cardItemRight_8uw8m_85";
|
|
27890
28002
|
const selectImage = "_selectImage_8uw8m_93";
|
|
27891
28003
|
const exportFreeImage = "_exportFreeImage_8uw8m_110";
|
|
27892
|
-
const styles$
|
|
28004
|
+
const styles$4 = {
|
|
27893
28005
|
container,
|
|
27894
28006
|
error,
|
|
27895
28007
|
item,
|
|
@@ -28102,9 +28214,9 @@ function ImageUploader(props) {
|
|
|
28102
28214
|
},
|
|
28103
28215
|
[props]
|
|
28104
28216
|
);
|
|
28105
|
-
const
|
|
28217
|
+
const content2 = useMemo(() => {
|
|
28106
28218
|
if (isUploading) {
|
|
28107
|
-
return /* @__PURE__ */ React__default.createElement("div", { className: styles$
|
|
28219
|
+
return /* @__PURE__ */ React__default.createElement("div", { className: styles$4["item"] }, /* @__PURE__ */ React__default.createElement("div", { className: classnames$1(styles$4["info"]) }, /* @__PURE__ */ React__default.createElement(Spin, { size: 60 }), /* @__PURE__ */ React__default.createElement("div", { className: styles$4["btn-wrap"] })));
|
|
28108
28220
|
}
|
|
28109
28221
|
if (!props.value) {
|
|
28110
28222
|
return /* @__PURE__ */ React__default.createElement("div", null, /* @__PURE__ */ React__default.createElement(
|
|
@@ -28125,10 +28237,10 @@ function ImageUploader(props) {
|
|
|
28125
28237
|
lineHeight: "22px"
|
|
28126
28238
|
}
|
|
28127
28239
|
},
|
|
28128
|
-
unsplashClientId ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement("div", { className: styles$
|
|
28240
|
+
unsplashClientId ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement("div", { className: styles$4.selectImage, onClick: onUpload }, t("Select image")), /* @__PURE__ */ React__default.createElement(
|
|
28129
28241
|
"div",
|
|
28130
28242
|
{
|
|
28131
|
-
className: styles$
|
|
28243
|
+
className: styles$4.exportFreeImage,
|
|
28132
28244
|
onClick: () => {
|
|
28133
28245
|
setUnsplashVisible(true);
|
|
28134
28246
|
setLock(true);
|
|
@@ -28175,14 +28287,14 @@ function ImageUploader(props) {
|
|
|
28175
28287
|
backgroundPosition: "0 0, 10px 10px"
|
|
28176
28288
|
}
|
|
28177
28289
|
},
|
|
28178
|
-
|
|
28290
|
+
content2
|
|
28179
28291
|
)), image2 && !onlyPreview && /* @__PURE__ */ React__default.createElement(Grid.Col, { span: 11, offset: 1 }, /* @__PURE__ */ React__default.createElement("div", null, imgDetail.width, " ", /* @__PURE__ */ React__default.createElement("span", null, " x "), " ", imgDetail.height, " "), /* @__PURE__ */ React__default.createElement("div", { style: { marginTop: 10 } }, imgDetail.size, "k"), /* @__PURE__ */ React__default.createElement("div", { style: { marginTop: 10, whiteSpace: "nowrap" } }, enableUnsplash && unsplashClientId ? /* @__PURE__ */ React__default.createElement(
|
|
28180
28292
|
Select$1,
|
|
28181
28293
|
{
|
|
28182
28294
|
triggerProps: {
|
|
28183
28295
|
popupStyle: { display: "inline-flex" }
|
|
28184
28296
|
},
|
|
28185
|
-
triggerElement: /* @__PURE__ */ React__default.createElement("span", { className: styles$
|
|
28297
|
+
triggerElement: /* @__PURE__ */ React__default.createElement("span", { className: styles$4.actionItem }, t("Replace"))
|
|
28186
28298
|
},
|
|
28187
28299
|
/* @__PURE__ */ React__default.createElement(Select$1.Option, { value: "1", onClick: onUpload }, t("Select image")),
|
|
28188
28300
|
/* @__PURE__ */ React__default.createElement(
|
|
@@ -28196,10 +28308,10 @@ function ImageUploader(props) {
|
|
|
28196
28308
|
},
|
|
28197
28309
|
t("Export free images")
|
|
28198
28310
|
)
|
|
28199
|
-
) : /* @__PURE__ */ React__default.createElement("span", { className: styles$
|
|
28311
|
+
) : /* @__PURE__ */ React__default.createElement("span", { className: styles$4.actionItem, onClick: onUpload }, t("Replace")), enablePreview && /* @__PURE__ */ React__default.createElement("span", null, " ∙ "), enablePreview && /* @__PURE__ */ React__default.createElement(
|
|
28200
28312
|
"span",
|
|
28201
28313
|
{
|
|
28202
|
-
className: styles$
|
|
28314
|
+
className: styles$4.actionItem,
|
|
28203
28315
|
onClick: () => setPreview(true)
|
|
28204
28316
|
},
|
|
28205
28317
|
t("Preview")
|
|
@@ -28423,7 +28535,7 @@ function EditPanelTabs(props) {
|
|
|
28423
28535
|
}
|
|
28424
28536
|
};
|
|
28425
28537
|
const list = useMemo(() => Array.isArray(value) ? value : [], [value]);
|
|
28426
|
-
const
|
|
28538
|
+
const content2 = /* @__PURE__ */ React__default.createElement(
|
|
28427
28539
|
Tabs,
|
|
28428
28540
|
{
|
|
28429
28541
|
activeTab: activeKey,
|
|
@@ -28454,7 +28566,7 @@ function EditPanelTabs(props) {
|
|
|
28454
28566
|
props.renderItem(item2, index2)
|
|
28455
28567
|
))
|
|
28456
28568
|
);
|
|
28457
|
-
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, list.length === 0 ? /* @__PURE__ */ React__default.createElement(Empty, null) :
|
|
28569
|
+
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, list.length === 0 ? /* @__PURE__ */ React__default.createElement(Empty, null) : content2);
|
|
28458
28570
|
}
|
|
28459
28571
|
const DefaultEditPanelTabsField = enhancer(EditPanelTabs);
|
|
28460
28572
|
const EditPanelTabsField = (props) => {
|
|
@@ -28536,7 +28648,7 @@ const RichtextBar = (props) => {
|
|
|
28536
28648
|
const calculateData = useMemo(() => {
|
|
28537
28649
|
if (!props.pageElement) {
|
|
28538
28650
|
const path22 = [0, 0, 0, 0];
|
|
28539
|
-
const
|
|
28651
|
+
const content2 = BlockManager.getBlockByType(ElementType.PAGE).create({
|
|
28540
28652
|
attributes: {
|
|
28541
28653
|
"background-color": "#ffffff"
|
|
28542
28654
|
},
|
|
@@ -28566,7 +28678,7 @@ const RichtextBar = (props) => {
|
|
|
28566
28678
|
})
|
|
28567
28679
|
]
|
|
28568
28680
|
});
|
|
28569
|
-
return [{ subject: "", content }, path22];
|
|
28681
|
+
return [{ subject: "", content: content2 }, path22];
|
|
28570
28682
|
}
|
|
28571
28683
|
const pageElement = cloneDeep(omit$2(props.pageElement, "children"));
|
|
28572
28684
|
pageElement.attributes["margin-top"] = "0px";
|
|
@@ -28657,6 +28769,9 @@ const RichtextBar = (props) => {
|
|
|
28657
28769
|
console.error("Element not found");
|
|
28658
28770
|
return;
|
|
28659
28771
|
}
|
|
28772
|
+
if (isEqual(JSON.stringify(currentElement), JSON.stringify(props.value))) {
|
|
28773
|
+
return;
|
|
28774
|
+
}
|
|
28660
28775
|
debouncedChange(cloneDeep(currentElement));
|
|
28661
28776
|
} catch (error2) {
|
|
28662
28777
|
}
|
|
@@ -28674,7 +28789,8 @@ const RichtextBar = (props) => {
|
|
|
28674
28789
|
EnhanceProvider: PluginsProvider,
|
|
28675
28790
|
onSubmit: loop,
|
|
28676
28791
|
onPageChange,
|
|
28677
|
-
newLineWithBr: true
|
|
28792
|
+
newLineWithBr: true,
|
|
28793
|
+
readOnly: false
|
|
28678
28794
|
},
|
|
28679
28795
|
/* @__PURE__ */ React__default.createElement("div", { className: "RichTextField-fixed-toolbar" }, /* @__PURE__ */ React__default.createElement(
|
|
28680
28796
|
SharedComponents.RichTextBar,
|
|
@@ -28707,10 +28823,12 @@ const RichtextBar = (props) => {
|
|
|
28707
28823
|
),
|
|
28708
28824
|
/* @__PURE__ */ React__default.createElement(SharedComponents.Hotkeys, null),
|
|
28709
28825
|
/* @__PURE__ */ React__default.createElement("style", null, styleText$h),
|
|
28710
|
-
/* @__PURE__ */ React__default.createElement(
|
|
28826
|
+
/* @__PURE__ */ React__default.createElement(AutoSelectBlockPath, { path: calculateData[1] }),
|
|
28827
|
+
/* @__PURE__ */ React__default.createElement(AutoSyncAttributes, { path: calculateData[1], element: props.value })
|
|
28711
28828
|
);
|
|
28712
28829
|
}, [
|
|
28713
28830
|
props.height,
|
|
28831
|
+
props.value,
|
|
28714
28832
|
clientId,
|
|
28715
28833
|
initialValue,
|
|
28716
28834
|
editor,
|
|
@@ -28718,13 +28836,36 @@ const RichtextBar = (props) => {
|
|
|
28718
28836
|
calculateData
|
|
28719
28837
|
]);
|
|
28720
28838
|
};
|
|
28721
|
-
const
|
|
28839
|
+
const AutoSelectBlockPath = ({ path: path2 }) => {
|
|
28722
28840
|
const setSelectedNodePath = useSetSelectedNodePath();
|
|
28723
28841
|
useEffect(() => {
|
|
28724
28842
|
setSelectedNodePath(path2);
|
|
28725
28843
|
}, [path2, setSelectedNodePath]);
|
|
28726
28844
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null);
|
|
28727
28845
|
};
|
|
28846
|
+
const AutoSyncAttributes = ({
|
|
28847
|
+
path: path2,
|
|
28848
|
+
element
|
|
28849
|
+
}) => {
|
|
28850
|
+
const { setFieldValue, getFieldValue } = useEditorContext();
|
|
28851
|
+
console.log("element", element);
|
|
28852
|
+
useEffect(() => {
|
|
28853
|
+
const attributes = get(element, "attributes");
|
|
28854
|
+
const mobileAttributes = get(element, "mobileAttributes");
|
|
28855
|
+
const currentAttributes = getFieldValue(path2, "attributes");
|
|
28856
|
+
const currentMobileAttributes = getFieldValue(path2, "mobileAttributes");
|
|
28857
|
+
if (!isEqual(JSON.stringify(attributes), JSON.stringify(currentAttributes))) {
|
|
28858
|
+
setFieldValue(path2, "attributes", cloneDeep(attributes));
|
|
28859
|
+
}
|
|
28860
|
+
if (!isEqual(
|
|
28861
|
+
JSON.stringify(mobileAttributes),
|
|
28862
|
+
JSON.stringify(currentMobileAttributes)
|
|
28863
|
+
)) {
|
|
28864
|
+
setFieldValue(path2, "mobileAttributes", cloneDeep(mobileAttributes));
|
|
28865
|
+
}
|
|
28866
|
+
}, [element.attributes, path2, setFieldValue, getFieldValue, element]);
|
|
28867
|
+
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null);
|
|
28868
|
+
};
|
|
28728
28869
|
const DefaultRichTextField = enhancer(RichtextBar);
|
|
28729
28870
|
const RichTextField = (props) => {
|
|
28730
28871
|
return /* @__PURE__ */ React__default.createElement(DefaultRichTextField, __spreadProps(__spreadValues({}, props), { formItem: { noStyle: true } }));
|
|
@@ -28756,7 +28897,7 @@ const positionControl = "_positionControl_1t3ne_44";
|
|
|
28756
28897
|
const percentSign = "_percentSign_1t3ne_50";
|
|
28757
28898
|
const deleteButton = "_deleteButton_1t3ne_55";
|
|
28758
28899
|
const sizeInputs = "_sizeInputs_1t3ne_62";
|
|
28759
|
-
const styles$
|
|
28900
|
+
const styles$3 = {
|
|
28760
28901
|
controlSection,
|
|
28761
28902
|
controlGroup,
|
|
28762
28903
|
colorHeader,
|
|
@@ -29170,7 +29311,7 @@ function GradientGenerator(props) {
|
|
|
29170
29311
|
)
|
|
29171
29312
|
))
|
|
29172
29313
|
}
|
|
29173
|
-
), /* @__PURE__ */ React__default.createElement("div", { className: styles$
|
|
29314
|
+
), /* @__PURE__ */ React__default.createElement("div", { className: styles$3.controlSection }, /* @__PURE__ */ React__default.createElement("div", { className: styles$3.controlGroup }, /* @__PURE__ */ React__default.createElement(
|
|
29174
29315
|
Form.Item,
|
|
29175
29316
|
{
|
|
29176
29317
|
label: /* @__PURE__ */ React__default.createElement("div", null, /* @__PURE__ */ React__default.createElement(
|
|
@@ -29255,7 +29396,7 @@ function GradientGenerator(props) {
|
|
|
29255
29396
|
)
|
|
29256
29397
|
)))
|
|
29257
29398
|
)
|
|
29258
|
-
)), /* @__PURE__ */ React__default.createElement(Divider$2, { style: { margin: "0px 0 10px 0" } }), /* @__PURE__ */ React__default.createElement("div", { className: styles$
|
|
29399
|
+
)), /* @__PURE__ */ React__default.createElement(Divider$2, { style: { margin: "0px 0 10px 0" } }), /* @__PURE__ */ React__default.createElement("div", { className: styles$3.controlGroup }, /* @__PURE__ */ React__default.createElement(Form.Item, { label: t(`Gradient Type`), layout: "vertical" }, /* @__PURE__ */ React__default.createElement(
|
|
29259
29400
|
Select$1,
|
|
29260
29401
|
{
|
|
29261
29402
|
style: { width: "100%" },
|
|
@@ -29276,7 +29417,7 @@ function GradientGenerator(props) {
|
|
|
29276
29417
|
}));
|
|
29277
29418
|
}
|
|
29278
29419
|
}
|
|
29279
|
-
))), /* @__PURE__ */ React__default.createElement("div", { className: styles$
|
|
29420
|
+
))), /* @__PURE__ */ React__default.createElement("div", { className: styles$3.controlGroup }, /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, { span: 11 }, /* @__PURE__ */ React__default.createElement(Form.Item, { label: t(`Width`), layout: "vertical" }, /* @__PURE__ */ React__default.createElement(
|
|
29280
29421
|
InputNumber,
|
|
29281
29422
|
{
|
|
29282
29423
|
style: { width: "100%" },
|
|
@@ -29294,7 +29435,7 @@ function GradientGenerator(props) {
|
|
|
29294
29435
|
setData(__spreadProps(__spreadValues({}, data), { height: value }));
|
|
29295
29436
|
}
|
|
29296
29437
|
}
|
|
29297
|
-
))))), /* @__PURE__ */ React__default.createElement(Divider$2, null), data.type === "linear" && /* @__PURE__ */ React__default.createElement("div", { className: styles$
|
|
29438
|
+
))))), /* @__PURE__ */ React__default.createElement(Divider$2, null), data.type === "linear" && /* @__PURE__ */ React__default.createElement("div", { className: styles$3.controlGroup }, /* @__PURE__ */ React__default.createElement(Form.Item, { label: t(`Angle`), layout: "vertical" }, /* @__PURE__ */ React__default.createElement(
|
|
29298
29439
|
Slider,
|
|
29299
29440
|
{
|
|
29300
29441
|
value: data.angle,
|
|
@@ -29307,7 +29448,7 @@ function GradientGenerator(props) {
|
|
|
29307
29448
|
step: 1,
|
|
29308
29449
|
showInput: true
|
|
29309
29450
|
}
|
|
29310
|
-
))), /* @__PURE__ */ React__default.createElement(Divider$2, null), /* @__PURE__ */ React__default.createElement("div", { className: styles$
|
|
29451
|
+
))), /* @__PURE__ */ React__default.createElement(Divider$2, null), /* @__PURE__ */ React__default.createElement("div", { className: styles$3.controlGroup }, /* @__PURE__ */ React__default.createElement("div", { className: styles$3.colorHeader }, /* @__PURE__ */ React__default.createElement("div", { className: styles$3.label }, t(`Colors`), " (", colors.length, "/", MAX_COLORS, ")"), /* @__PURE__ */ React__default.createElement(
|
|
29311
29452
|
Button$2,
|
|
29312
29453
|
{
|
|
29313
29454
|
type: "text",
|
|
@@ -29317,7 +29458,7 @@ function GradientGenerator(props) {
|
|
|
29317
29458
|
disabled: colors.length >= MAX_COLORS
|
|
29318
29459
|
},
|
|
29319
29460
|
t(`Add Color`)
|
|
29320
|
-
)), /* @__PURE__ */ React__default.createElement("div", { className: styles$
|
|
29461
|
+
)), /* @__PURE__ */ React__default.createElement("div", { className: styles$3.colorList }, colors.map((color2, index2) => /* @__PURE__ */ React__default.createElement("div", { key: color2.id, className: styles$3.colorItem }, /* @__PURE__ */ React__default.createElement("div", { className: styles$3.colorInputs }, /* @__PURE__ */ React__default.createElement(
|
|
29321
29462
|
ColorPicker$1,
|
|
29322
29463
|
{
|
|
29323
29464
|
value: color2.color,
|
|
@@ -29329,7 +29470,7 @@ function GradientGenerator(props) {
|
|
|
29329
29470
|
}));
|
|
29330
29471
|
}
|
|
29331
29472
|
}
|
|
29332
|
-
)), /* @__PURE__ */ React__default.createElement("div", { className: styles$
|
|
29473
|
+
)), /* @__PURE__ */ React__default.createElement("div", { className: styles$3.positionControl }, /* @__PURE__ */ React__default.createElement(
|
|
29333
29474
|
InputNumber,
|
|
29334
29475
|
{
|
|
29335
29476
|
value: color2.position,
|
|
@@ -29344,13 +29485,13 @@ function GradientGenerator(props) {
|
|
|
29344
29485
|
min: 0,
|
|
29345
29486
|
max: 100
|
|
29346
29487
|
}
|
|
29347
|
-
), /* @__PURE__ */ React__default.createElement("span", { className: styles$
|
|
29488
|
+
), /* @__PURE__ */ React__default.createElement("span", { className: styles$3.percentSign }, "%"), colors.length > MIN_COLORS && /* @__PURE__ */ React__default.createElement(
|
|
29348
29489
|
Button$2,
|
|
29349
29490
|
{
|
|
29350
29491
|
type: "text",
|
|
29351
29492
|
icon: /* @__PURE__ */ React__default.createElement(IconDelete, null),
|
|
29352
29493
|
onClick: () => removeColor(index2),
|
|
29353
|
-
className: styles$
|
|
29494
|
+
className: styles$3.deleteButton
|
|
29354
29495
|
}
|
|
29355
29496
|
)))))))),
|
|
29356
29497
|
/* @__PURE__ */ React__default.createElement("canvas", { ref: canvasRef, style: { display: "none" } })
|
|
@@ -29629,12 +29770,6 @@ function FontWeight(props) {
|
|
|
29629
29770
|
[props]
|
|
29630
29771
|
);
|
|
29631
29772
|
}
|
|
29632
|
-
const getFallbackValue = (params) => {
|
|
29633
|
-
const { mode, name, defaultElement } = params;
|
|
29634
|
-
if (!defaultElement)
|
|
29635
|
-
return void 0;
|
|
29636
|
-
return mode === ActiveTabKeys.DESKTOP ? get(defaultElement, "attributes." + name) : get(defaultElement, "mobileAttributes." + name);
|
|
29637
|
-
};
|
|
29638
29773
|
function Typography(props) {
|
|
29639
29774
|
const { showTextDirectionMode } = useEditorProps();
|
|
29640
29775
|
const { label = t("Font"), path: path2, defaultElement } = props;
|
|
@@ -30253,7 +30388,7 @@ function Height(props) {
|
|
|
30253
30388
|
);
|
|
30254
30389
|
}, [label, props]);
|
|
30255
30390
|
}
|
|
30256
|
-
const category = ElementCategory.BUTTON;
|
|
30391
|
+
const category$2 = ElementCategory.BUTTON;
|
|
30257
30392
|
const path$1 = [0];
|
|
30258
30393
|
function ButtonCategory(props) {
|
|
30259
30394
|
const element = useElementDefault({
|
|
@@ -30268,7 +30403,7 @@ function ButtonCategory(props) {
|
|
|
30268
30403
|
defaultElement: element,
|
|
30269
30404
|
path: path$1
|
|
30270
30405
|
}, props), {
|
|
30271
|
-
name: `data.categoryAttributes.${category}`
|
|
30406
|
+
name: `data.categoryAttributes.${category$2}`
|
|
30272
30407
|
})
|
|
30273
30408
|
));
|
|
30274
30409
|
}, [element, props]);
|
|
@@ -32210,16 +32345,16 @@ const ResponsiveTabs = ({
|
|
|
32210
32345
|
showSourceCode
|
|
32211
32346
|
]);
|
|
32212
32347
|
};
|
|
32213
|
-
const Text$
|
|
32348
|
+
const Text$3 = ({ nodePath }) => {
|
|
32214
32349
|
const desktop = useMemo(() => {
|
|
32215
|
-
return /* @__PURE__ */ React__default.createElement(AttributesContainer$
|
|
32350
|
+
return /* @__PURE__ */ React__default.createElement(AttributesContainer$h, { mode: ActiveTabKeys.DESKTOP, nodePath });
|
|
32216
32351
|
}, [nodePath]);
|
|
32217
32352
|
const mobile = useMemo(() => {
|
|
32218
|
-
return /* @__PURE__ */ React__default.createElement(AttributesContainer$
|
|
32353
|
+
return /* @__PURE__ */ React__default.createElement(AttributesContainer$h, { mode: ActiveTabKeys.MOBILE, nodePath });
|
|
32219
32354
|
}, [nodePath]);
|
|
32220
32355
|
return /* @__PURE__ */ React__default.createElement(AttributesPanelWrapper, null, /* @__PURE__ */ React__default.createElement(ResponsiveTabs, { desktop, mobile }));
|
|
32221
32356
|
};
|
|
32222
|
-
function AttributesContainer$
|
|
32357
|
+
function AttributesContainer$h({
|
|
32223
32358
|
nodePath,
|
|
32224
32359
|
mode
|
|
32225
32360
|
}) {
|
|
@@ -32291,14 +32426,14 @@ const Section$1 = ({ nodePath }) => {
|
|
|
32291
32426
|
ResponsiveTabs,
|
|
32292
32427
|
{
|
|
32293
32428
|
desktop: /* @__PURE__ */ React__default.createElement(
|
|
32294
|
-
AttributesContainer$
|
|
32429
|
+
AttributesContainer$g,
|
|
32295
32430
|
{
|
|
32296
32431
|
mode: ActiveTabKeys.DESKTOP,
|
|
32297
32432
|
nodePath
|
|
32298
32433
|
}
|
|
32299
32434
|
),
|
|
32300
32435
|
mobile: /* @__PURE__ */ React__default.createElement(
|
|
32301
|
-
AttributesContainer$
|
|
32436
|
+
AttributesContainer$g,
|
|
32302
32437
|
{
|
|
32303
32438
|
mode: ActiveTabKeys.MOBILE,
|
|
32304
32439
|
nodePath
|
|
@@ -32307,7 +32442,7 @@ const Section$1 = ({ nodePath }) => {
|
|
|
32307
32442
|
}
|
|
32308
32443
|
));
|
|
32309
32444
|
};
|
|
32310
|
-
function AttributesContainer$
|
|
32445
|
+
function AttributesContainer$g({
|
|
32311
32446
|
nodePath,
|
|
32312
32447
|
mode
|
|
32313
32448
|
}) {
|
|
@@ -32449,14 +32584,14 @@ const Button$1 = ({ nodePath }) => {
|
|
|
32449
32584
|
ResponsiveTabs,
|
|
32450
32585
|
{
|
|
32451
32586
|
desktop: /* @__PURE__ */ React__default.createElement(
|
|
32452
|
-
AttributesContainer$
|
|
32587
|
+
AttributesContainer$f,
|
|
32453
32588
|
{
|
|
32454
32589
|
mode: ActiveTabKeys.DESKTOP,
|
|
32455
32590
|
nodePath
|
|
32456
32591
|
}
|
|
32457
32592
|
),
|
|
32458
32593
|
mobile: /* @__PURE__ */ React__default.createElement(
|
|
32459
|
-
AttributesContainer$
|
|
32594
|
+
AttributesContainer$f,
|
|
32460
32595
|
{
|
|
32461
32596
|
mode: ActiveTabKeys.MOBILE,
|
|
32462
32597
|
nodePath
|
|
@@ -32465,7 +32600,7 @@ const Button$1 = ({ nodePath }) => {
|
|
|
32465
32600
|
}
|
|
32466
32601
|
));
|
|
32467
32602
|
};
|
|
32468
|
-
function AttributesContainer$
|
|
32603
|
+
function AttributesContainer$f({
|
|
32469
32604
|
nodePath,
|
|
32470
32605
|
mode
|
|
32471
32606
|
}) {
|
|
@@ -32579,14 +32714,14 @@ const Image$4 = ({ nodePath }) => {
|
|
|
32579
32714
|
ResponsiveTabs,
|
|
32580
32715
|
{
|
|
32581
32716
|
desktop: /* @__PURE__ */ React__default.createElement(
|
|
32582
|
-
AttributesContainer$
|
|
32717
|
+
AttributesContainer$e,
|
|
32583
32718
|
{
|
|
32584
32719
|
mode: ActiveTabKeys.DESKTOP,
|
|
32585
32720
|
nodePath
|
|
32586
32721
|
}
|
|
32587
32722
|
),
|
|
32588
32723
|
mobile: /* @__PURE__ */ React__default.createElement(
|
|
32589
|
-
AttributesContainer$
|
|
32724
|
+
AttributesContainer$e,
|
|
32590
32725
|
{
|
|
32591
32726
|
mode: ActiveTabKeys.MOBILE,
|
|
32592
32727
|
nodePath
|
|
@@ -32595,7 +32730,7 @@ const Image$4 = ({ nodePath }) => {
|
|
|
32595
32730
|
}
|
|
32596
32731
|
));
|
|
32597
32732
|
};
|
|
32598
|
-
function AttributesContainer$
|
|
32733
|
+
function AttributesContainer$e({
|
|
32599
32734
|
nodePath,
|
|
32600
32735
|
mode
|
|
32601
32736
|
}) {
|
|
@@ -32703,14 +32838,14 @@ const Divider$1 = ({ nodePath }) => {
|
|
|
32703
32838
|
ResponsiveTabs,
|
|
32704
32839
|
{
|
|
32705
32840
|
desktop: /* @__PURE__ */ React__default.createElement(
|
|
32706
|
-
AttributesContainer$
|
|
32841
|
+
AttributesContainer$d,
|
|
32707
32842
|
{
|
|
32708
32843
|
mode: ActiveTabKeys.DESKTOP,
|
|
32709
32844
|
nodePath
|
|
32710
32845
|
}
|
|
32711
32846
|
),
|
|
32712
32847
|
mobile: /* @__PURE__ */ React__default.createElement(
|
|
32713
|
-
AttributesContainer$
|
|
32848
|
+
AttributesContainer$d,
|
|
32714
32849
|
{
|
|
32715
32850
|
mode: ActiveTabKeys.MOBILE,
|
|
32716
32851
|
nodePath
|
|
@@ -32719,7 +32854,7 @@ const Divider$1 = ({ nodePath }) => {
|
|
|
32719
32854
|
}
|
|
32720
32855
|
));
|
|
32721
32856
|
};
|
|
32722
|
-
function AttributesContainer$
|
|
32857
|
+
function AttributesContainer$d({
|
|
32723
32858
|
nodePath,
|
|
32724
32859
|
mode
|
|
32725
32860
|
}) {
|
|
@@ -32785,14 +32920,14 @@ const Spacer$1 = ({ nodePath }) => {
|
|
|
32785
32920
|
ResponsiveTabs,
|
|
32786
32921
|
{
|
|
32787
32922
|
desktop: /* @__PURE__ */ React__default.createElement(
|
|
32788
|
-
AttributesContainer$
|
|
32923
|
+
AttributesContainer$c,
|
|
32789
32924
|
{
|
|
32790
32925
|
mode: ActiveTabKeys.DESKTOP,
|
|
32791
32926
|
nodePath
|
|
32792
32927
|
}
|
|
32793
32928
|
),
|
|
32794
32929
|
mobile: /* @__PURE__ */ React__default.createElement(
|
|
32795
|
-
AttributesContainer$
|
|
32930
|
+
AttributesContainer$c,
|
|
32796
32931
|
{
|
|
32797
32932
|
mode: ActiveTabKeys.MOBILE,
|
|
32798
32933
|
nodePath
|
|
@@ -32801,7 +32936,7 @@ const Spacer$1 = ({ nodePath }) => {
|
|
|
32801
32936
|
}
|
|
32802
32937
|
));
|
|
32803
32938
|
};
|
|
32804
|
-
function AttributesContainer$
|
|
32939
|
+
function AttributesContainer$c({
|
|
32805
32940
|
nodePath,
|
|
32806
32941
|
mode
|
|
32807
32942
|
}) {
|
|
@@ -32826,14 +32961,14 @@ const Navbar$1 = ({ nodePath }) => {
|
|
|
32826
32961
|
ResponsiveTabs,
|
|
32827
32962
|
{
|
|
32828
32963
|
desktop: /* @__PURE__ */ React__default.createElement(
|
|
32829
|
-
AttributesContainer$
|
|
32964
|
+
AttributesContainer$b,
|
|
32830
32965
|
{
|
|
32831
32966
|
mode: ActiveTabKeys.DESKTOP,
|
|
32832
32967
|
nodePath
|
|
32833
32968
|
}
|
|
32834
32969
|
),
|
|
32835
32970
|
mobile: /* @__PURE__ */ React__default.createElement(
|
|
32836
|
-
AttributesContainer$
|
|
32971
|
+
AttributesContainer$b,
|
|
32837
32972
|
{
|
|
32838
32973
|
mode: ActiveTabKeys.MOBILE,
|
|
32839
32974
|
nodePath
|
|
@@ -32842,7 +32977,7 @@ const Navbar$1 = ({ nodePath }) => {
|
|
|
32842
32977
|
}
|
|
32843
32978
|
));
|
|
32844
32979
|
};
|
|
32845
|
-
function AttributesContainer$
|
|
32980
|
+
function AttributesContainer$b({
|
|
32846
32981
|
nodePath,
|
|
32847
32982
|
mode
|
|
32848
32983
|
}) {
|
|
@@ -33029,14 +33164,14 @@ const Social$1 = ({ nodePath }) => {
|
|
|
33029
33164
|
ResponsiveTabs,
|
|
33030
33165
|
{
|
|
33031
33166
|
desktop: /* @__PURE__ */ React__default.createElement(
|
|
33032
|
-
AttributesContainer$
|
|
33167
|
+
AttributesContainer$a,
|
|
33033
33168
|
{
|
|
33034
33169
|
mode: ActiveTabKeys.DESKTOP,
|
|
33035
33170
|
nodePath
|
|
33036
33171
|
}
|
|
33037
33172
|
),
|
|
33038
33173
|
mobile: /* @__PURE__ */ React__default.createElement(
|
|
33039
|
-
AttributesContainer$
|
|
33174
|
+
AttributesContainer$a,
|
|
33040
33175
|
{
|
|
33041
33176
|
mode: ActiveTabKeys.MOBILE,
|
|
33042
33177
|
nodePath
|
|
@@ -33045,7 +33180,7 @@ const Social$1 = ({ nodePath }) => {
|
|
|
33045
33180
|
}
|
|
33046
33181
|
));
|
|
33047
33182
|
};
|
|
33048
|
-
function AttributesContainer$
|
|
33183
|
+
function AttributesContainer$a({
|
|
33049
33184
|
nodePath,
|
|
33050
33185
|
mode
|
|
33051
33186
|
}) {
|
|
@@ -33286,14 +33421,14 @@ const Hero = ({ nodePath }) => {
|
|
|
33286
33421
|
ResponsiveTabs,
|
|
33287
33422
|
{
|
|
33288
33423
|
desktop: /* @__PURE__ */ React__default.createElement(
|
|
33289
|
-
AttributesContainer$
|
|
33424
|
+
AttributesContainer$9,
|
|
33290
33425
|
{
|
|
33291
33426
|
mode: ActiveTabKeys.DESKTOP,
|
|
33292
33427
|
nodePath
|
|
33293
33428
|
}
|
|
33294
33429
|
),
|
|
33295
33430
|
mobile: /* @__PURE__ */ React__default.createElement(
|
|
33296
|
-
AttributesContainer$
|
|
33431
|
+
AttributesContainer$9,
|
|
33297
33432
|
{
|
|
33298
33433
|
mode: ActiveTabKeys.MOBILE,
|
|
33299
33434
|
nodePath
|
|
@@ -33302,7 +33437,7 @@ const Hero = ({ nodePath }) => {
|
|
|
33302
33437
|
}
|
|
33303
33438
|
));
|
|
33304
33439
|
};
|
|
33305
|
-
function AttributesContainer$
|
|
33440
|
+
function AttributesContainer$9({
|
|
33306
33441
|
nodePath,
|
|
33307
33442
|
mode
|
|
33308
33443
|
}) {
|
|
@@ -33444,14 +33579,14 @@ const Column = ({ nodePath }) => {
|
|
|
33444
33579
|
ResponsiveTabs,
|
|
33445
33580
|
{
|
|
33446
33581
|
desktop: /* @__PURE__ */ React__default.createElement(
|
|
33447
|
-
AttributesContainer$
|
|
33582
|
+
AttributesContainer$8,
|
|
33448
33583
|
{
|
|
33449
33584
|
mode: ActiveTabKeys.DESKTOP,
|
|
33450
33585
|
nodePath
|
|
33451
33586
|
}
|
|
33452
33587
|
),
|
|
33453
33588
|
mobile: /* @__PURE__ */ React__default.createElement(
|
|
33454
|
-
AttributesContainer$
|
|
33589
|
+
AttributesContainer$8,
|
|
33455
33590
|
{
|
|
33456
33591
|
mode: ActiveTabKeys.MOBILE,
|
|
33457
33592
|
nodePath
|
|
@@ -33460,7 +33595,7 @@ const Column = ({ nodePath }) => {
|
|
|
33460
33595
|
}
|
|
33461
33596
|
));
|
|
33462
33597
|
};
|
|
33463
|
-
function AttributesContainer$
|
|
33598
|
+
function AttributesContainer$8({
|
|
33464
33599
|
nodePath,
|
|
33465
33600
|
mode
|
|
33466
33601
|
}) {
|
|
@@ -33518,14 +33653,14 @@ const Wrapper = ({ nodePath }) => {
|
|
|
33518
33653
|
ResponsiveTabs,
|
|
33519
33654
|
{
|
|
33520
33655
|
desktop: /* @__PURE__ */ React__default.createElement(
|
|
33521
|
-
AttributesContainer$
|
|
33656
|
+
AttributesContainer$7,
|
|
33522
33657
|
{
|
|
33523
33658
|
mode: ActiveTabKeys.DESKTOP,
|
|
33524
33659
|
nodePath
|
|
33525
33660
|
}
|
|
33526
33661
|
),
|
|
33527
33662
|
mobile: /* @__PURE__ */ React__default.createElement(
|
|
33528
|
-
AttributesContainer$
|
|
33663
|
+
AttributesContainer$7,
|
|
33529
33664
|
{
|
|
33530
33665
|
mode: ActiveTabKeys.MOBILE,
|
|
33531
33666
|
nodePath
|
|
@@ -33534,7 +33669,7 @@ const Wrapper = ({ nodePath }) => {
|
|
|
33534
33669
|
}
|
|
33535
33670
|
));
|
|
33536
33671
|
};
|
|
33537
|
-
function AttributesContainer$
|
|
33672
|
+
function AttributesContainer$7({
|
|
33538
33673
|
nodePath,
|
|
33539
33674
|
mode
|
|
33540
33675
|
}) {
|
|
@@ -33583,14 +33718,14 @@ const Widget = ({ nodePath }) => {
|
|
|
33583
33718
|
ResponsiveTabs,
|
|
33584
33719
|
{
|
|
33585
33720
|
desktop: /* @__PURE__ */ React__default.createElement(
|
|
33586
|
-
AttributesContainer$
|
|
33721
|
+
AttributesContainer$6,
|
|
33587
33722
|
{
|
|
33588
33723
|
mode: ActiveTabKeys.DESKTOP,
|
|
33589
33724
|
nodePath
|
|
33590
33725
|
}
|
|
33591
33726
|
),
|
|
33592
33727
|
mobile: /* @__PURE__ */ React__default.createElement(
|
|
33593
|
-
AttributesContainer$
|
|
33728
|
+
AttributesContainer$6,
|
|
33594
33729
|
{
|
|
33595
33730
|
mode: ActiveTabKeys.MOBILE,
|
|
33596
33731
|
nodePath
|
|
@@ -33599,7 +33734,7 @@ const Widget = ({ nodePath }) => {
|
|
|
33599
33734
|
}
|
|
33600
33735
|
));
|
|
33601
33736
|
};
|
|
33602
|
-
function AttributesContainer$
|
|
33737
|
+
function AttributesContainer$6({
|
|
33603
33738
|
nodePath,
|
|
33604
33739
|
mode
|
|
33605
33740
|
}) {
|
|
@@ -33758,14 +33893,14 @@ const Blockquote = ({ nodePath }) => {
|
|
|
33758
33893
|
ResponsiveTabs,
|
|
33759
33894
|
{
|
|
33760
33895
|
desktop: /* @__PURE__ */ React__default.createElement(
|
|
33761
|
-
AttributesContainer$
|
|
33896
|
+
AttributesContainer$5,
|
|
33762
33897
|
{
|
|
33763
33898
|
mode: ActiveTabKeys.DESKTOP,
|
|
33764
33899
|
nodePath
|
|
33765
33900
|
}
|
|
33766
33901
|
),
|
|
33767
33902
|
mobile: /* @__PURE__ */ React__default.createElement(
|
|
33768
|
-
AttributesContainer$
|
|
33903
|
+
AttributesContainer$5,
|
|
33769
33904
|
{
|
|
33770
33905
|
mode: ActiveTabKeys.MOBILE,
|
|
33771
33906
|
nodePath
|
|
@@ -33774,7 +33909,7 @@ const Blockquote = ({ nodePath }) => {
|
|
|
33774
33909
|
}
|
|
33775
33910
|
));
|
|
33776
33911
|
};
|
|
33777
|
-
function AttributesContainer$
|
|
33912
|
+
function AttributesContainer$5({
|
|
33778
33913
|
nodePath,
|
|
33779
33914
|
mode
|
|
33780
33915
|
}) {
|
|
@@ -33847,14 +33982,14 @@ const Table = ({ nodePath }) => {
|
|
|
33847
33982
|
ResponsiveTabs,
|
|
33848
33983
|
{
|
|
33849
33984
|
desktop: /* @__PURE__ */ React__default.createElement(
|
|
33850
|
-
AttributesContainer$
|
|
33985
|
+
AttributesContainer$4,
|
|
33851
33986
|
{
|
|
33852
33987
|
mode: ActiveTabKeys.DESKTOP,
|
|
33853
33988
|
nodePath
|
|
33854
33989
|
}
|
|
33855
33990
|
),
|
|
33856
33991
|
mobile: /* @__PURE__ */ React__default.createElement(
|
|
33857
|
-
AttributesContainer$
|
|
33992
|
+
AttributesContainer$4,
|
|
33858
33993
|
{
|
|
33859
33994
|
mode: ActiveTabKeys.MOBILE,
|
|
33860
33995
|
nodePath
|
|
@@ -33863,7 +33998,7 @@ const Table = ({ nodePath }) => {
|
|
|
33863
33998
|
}
|
|
33864
33999
|
));
|
|
33865
34000
|
};
|
|
33866
|
-
function AttributesContainer$
|
|
34001
|
+
function AttributesContainer$4({
|
|
33867
34002
|
nodePath,
|
|
33868
34003
|
mode
|
|
33869
34004
|
}) {
|
|
@@ -33950,14 +34085,14 @@ const Group = ({ nodePath }) => {
|
|
|
33950
34085
|
ResponsiveTabs,
|
|
33951
34086
|
{
|
|
33952
34087
|
desktop: /* @__PURE__ */ React__default.createElement(
|
|
33953
|
-
AttributesContainer$
|
|
34088
|
+
AttributesContainer$3,
|
|
33954
34089
|
{
|
|
33955
34090
|
mode: ActiveTabKeys.DESKTOP,
|
|
33956
34091
|
nodePath
|
|
33957
34092
|
}
|
|
33958
34093
|
),
|
|
33959
34094
|
mobile: /* @__PURE__ */ React__default.createElement(
|
|
33960
|
-
AttributesContainer$
|
|
34095
|
+
AttributesContainer$3,
|
|
33961
34096
|
{
|
|
33962
34097
|
mode: ActiveTabKeys.MOBILE,
|
|
33963
34098
|
nodePath
|
|
@@ -33966,7 +34101,7 @@ const Group = ({ nodePath }) => {
|
|
|
33966
34101
|
}
|
|
33967
34102
|
));
|
|
33968
34103
|
};
|
|
33969
|
-
function AttributesContainer$
|
|
34104
|
+
function AttributesContainer$3({
|
|
33970
34105
|
nodePath,
|
|
33971
34106
|
mode
|
|
33972
34107
|
}) {
|
|
@@ -33994,14 +34129,14 @@ const Table2 = ({ nodePath }) => {
|
|
|
33994
34129
|
ResponsiveTabs,
|
|
33995
34130
|
{
|
|
33996
34131
|
desktop: /* @__PURE__ */ React__default.createElement(
|
|
33997
|
-
AttributesContainer,
|
|
34132
|
+
AttributesContainer$2,
|
|
33998
34133
|
{
|
|
33999
34134
|
mode: ActiveTabKeys.DESKTOP,
|
|
34000
34135
|
nodePath
|
|
34001
34136
|
}
|
|
34002
34137
|
),
|
|
34003
34138
|
mobile: /* @__PURE__ */ React__default.createElement(
|
|
34004
|
-
AttributesContainer,
|
|
34139
|
+
AttributesContainer$2,
|
|
34005
34140
|
{
|
|
34006
34141
|
mode: ActiveTabKeys.MOBILE,
|
|
34007
34142
|
nodePath
|
|
@@ -34010,7 +34145,7 @@ const Table2 = ({ nodePath }) => {
|
|
|
34010
34145
|
}
|
|
34011
34146
|
));
|
|
34012
34147
|
};
|
|
34013
|
-
function AttributesContainer({
|
|
34148
|
+
function AttributesContainer$2({
|
|
34014
34149
|
nodePath,
|
|
34015
34150
|
mode
|
|
34016
34151
|
}) {
|
|
@@ -34101,6 +34236,113 @@ function AttributesContainer({
|
|
|
34101
34236
|
}
|
|
34102
34237
|
))));
|
|
34103
34238
|
}
|
|
34239
|
+
const PageHeader = ({ nodePath }) => {
|
|
34240
|
+
return /* @__PURE__ */ React__default.createElement(AttributesPanelWrapper, null, /* @__PURE__ */ React__default.createElement(
|
|
34241
|
+
ResponsiveTabs,
|
|
34242
|
+
{
|
|
34243
|
+
desktop: /* @__PURE__ */ React__default.createElement(
|
|
34244
|
+
AttributesContainer$1,
|
|
34245
|
+
{
|
|
34246
|
+
mode: ActiveTabKeys.DESKTOP,
|
|
34247
|
+
nodePath
|
|
34248
|
+
}
|
|
34249
|
+
),
|
|
34250
|
+
mobile: /* @__PURE__ */ React__default.createElement(
|
|
34251
|
+
AttributesContainer$1,
|
|
34252
|
+
{
|
|
34253
|
+
mode: ActiveTabKeys.MOBILE,
|
|
34254
|
+
nodePath
|
|
34255
|
+
}
|
|
34256
|
+
)
|
|
34257
|
+
}
|
|
34258
|
+
));
|
|
34259
|
+
};
|
|
34260
|
+
function AttributesContainer$1({
|
|
34261
|
+
nodePath,
|
|
34262
|
+
mode
|
|
34263
|
+
}) {
|
|
34264
|
+
const { selectedNode } = useSelectedNode();
|
|
34265
|
+
if (!selectedNode)
|
|
34266
|
+
return null;
|
|
34267
|
+
return /* @__PURE__ */ React__default.createElement(CollapseWrapper$1, { defaultActiveKey: ["0", "1", "2", "3", "4"] }, /* @__PURE__ */ React__default.createElement(Collapse.Item, { name: "3", header: t("Content") }, /* @__PURE__ */ React__default.createElement(
|
|
34268
|
+
AttributeField.ImageUrl,
|
|
34269
|
+
{
|
|
34270
|
+
path: nodePath,
|
|
34271
|
+
name: "data.content.0.attributes.src",
|
|
34272
|
+
label: t("Text")
|
|
34273
|
+
}
|
|
34274
|
+
), /* @__PURE__ */ React__default.createElement(
|
|
34275
|
+
AttributeField.BackgroundColor,
|
|
34276
|
+
{
|
|
34277
|
+
path: nodePath,
|
|
34278
|
+
name: "attributes.background-color",
|
|
34279
|
+
label: t("Background color")
|
|
34280
|
+
}
|
|
34281
|
+
)), /* @__PURE__ */ React__default.createElement(Collapse.Item, { name: "0", header: t("Dimension") }, /* @__PURE__ */ React__default.createElement(
|
|
34282
|
+
AttributeField.SliderField,
|
|
34283
|
+
{
|
|
34284
|
+
label: t("Width"),
|
|
34285
|
+
path: nodePath,
|
|
34286
|
+
name: "data.content.0.attributes.width",
|
|
34287
|
+
formItem: sliderAdapter,
|
|
34288
|
+
max: 300,
|
|
34289
|
+
min: 100
|
|
34290
|
+
}
|
|
34291
|
+
), /* @__PURE__ */ React__default.createElement(AttributeField.Padding, { path: nodePath, name: "attributes" })));
|
|
34292
|
+
}
|
|
34293
|
+
const PageFooter = ({ nodePath }) => {
|
|
34294
|
+
return /* @__PURE__ */ React__default.createElement(AttributesPanelWrapper, null, /* @__PURE__ */ React__default.createElement(
|
|
34295
|
+
ResponsiveTabs,
|
|
34296
|
+
{
|
|
34297
|
+
desktop: /* @__PURE__ */ React__default.createElement(
|
|
34298
|
+
AttributesContainer,
|
|
34299
|
+
{
|
|
34300
|
+
mode: ActiveTabKeys.DESKTOP,
|
|
34301
|
+
nodePath
|
|
34302
|
+
}
|
|
34303
|
+
),
|
|
34304
|
+
mobile: /* @__PURE__ */ React__default.createElement(
|
|
34305
|
+
AttributesContainer,
|
|
34306
|
+
{
|
|
34307
|
+
mode: ActiveTabKeys.MOBILE,
|
|
34308
|
+
nodePath
|
|
34309
|
+
}
|
|
34310
|
+
)
|
|
34311
|
+
}
|
|
34312
|
+
));
|
|
34313
|
+
};
|
|
34314
|
+
function AttributesContainer({
|
|
34315
|
+
nodePath,
|
|
34316
|
+
mode
|
|
34317
|
+
}) {
|
|
34318
|
+
const { selectedNode } = useSelectedNode();
|
|
34319
|
+
if (!selectedNode)
|
|
34320
|
+
return null;
|
|
34321
|
+
return /* @__PURE__ */ React__default.createElement(CollapseWrapper$1, { defaultActiveKey: ["0", "1", "2", "3", "4"] }, /* @__PURE__ */ React__default.createElement(Collapse.Item, { name: "3", header: t("Content") }, /* @__PURE__ */ React__default.createElement(
|
|
34322
|
+
AttributeField.TextAreaField,
|
|
34323
|
+
{
|
|
34324
|
+
path: nodePath,
|
|
34325
|
+
name: "data.content.0.children.0.children.0.children.0.text",
|
|
34326
|
+
label: t("Text")
|
|
34327
|
+
}
|
|
34328
|
+
), /* @__PURE__ */ React__default.createElement(
|
|
34329
|
+
AttributeField.BackgroundColor,
|
|
34330
|
+
{
|
|
34331
|
+
path: nodePath,
|
|
34332
|
+
name: "attributes.background-color",
|
|
34333
|
+
label: t("Background color")
|
|
34334
|
+
}
|
|
34335
|
+
)), /* @__PURE__ */ React__default.createElement(Collapse.Item, { name: "0", header: t("Dimension") }, /* @__PURE__ */ React__default.createElement(
|
|
34336
|
+
ResponsiveField,
|
|
34337
|
+
{
|
|
34338
|
+
label: t("Width"),
|
|
34339
|
+
component: AttributeField.Width,
|
|
34340
|
+
path: nodePath,
|
|
34341
|
+
name: "width",
|
|
34342
|
+
formItem: pixelNumberAdapter
|
|
34343
|
+
}
|
|
34344
|
+
)));
|
|
34345
|
+
}
|
|
34104
34346
|
const ConfigPanelsMap = {
|
|
34105
34347
|
[ElementType.PAGE]: Page$1,
|
|
34106
34348
|
[ElementType.STANDARD_NAVBAR]: Navbar$1,
|
|
@@ -34118,65 +34360,21 @@ const ConfigPanelsMap = {
|
|
|
34118
34360
|
[ElementType.SECTION_WIDGET]: Widget,
|
|
34119
34361
|
[ElementType.WRAPPER_WIDGET]: Widget,
|
|
34120
34362
|
[ElementType.DANGEROUS_CODE]: Code,
|
|
34363
|
+
[ElementType.PAGE_HEADER]: PageHeader,
|
|
34364
|
+
[ElementType.PAGE_FOOTER]: PageFooter,
|
|
34121
34365
|
//text
|
|
34122
|
-
[ElementType.TEXT]: Text$
|
|
34123
|
-
[ElementType.STANDARD_TEXT]: Text$
|
|
34124
|
-
[ElementType.STANDARD_PARAGRAPH]: Text$
|
|
34125
|
-
[ElementType.STANDARD_TEXT_LIST]: Text$
|
|
34126
|
-
[ElementType.STANDARD_H1]: Text$
|
|
34127
|
-
[ElementType.STANDARD_H2]: Text$
|
|
34128
|
-
[ElementType.STANDARD_H3]: Text$
|
|
34129
|
-
[ElementType.STANDARD_H4]: Text$
|
|
34366
|
+
[ElementType.TEXT]: Text$3,
|
|
34367
|
+
[ElementType.STANDARD_TEXT]: Text$3,
|
|
34368
|
+
[ElementType.STANDARD_PARAGRAPH]: Text$3,
|
|
34369
|
+
[ElementType.STANDARD_TEXT_LIST]: Text$3,
|
|
34370
|
+
[ElementType.STANDARD_H1]: Text$3,
|
|
34371
|
+
[ElementType.STANDARD_H2]: Text$3,
|
|
34372
|
+
[ElementType.STANDARD_H3]: Text$3,
|
|
34373
|
+
[ElementType.STANDARD_H4]: Text$3,
|
|
34130
34374
|
[ElementType.STANDARD_TABLE]: Table,
|
|
34131
34375
|
[ElementType.STANDARD_TABLE2]: Table2,
|
|
34132
34376
|
[ElementType.STANDARD_BLOCK_QUOTE]: Blockquote
|
|
34133
34377
|
};
|
|
34134
|
-
const PageHeaderSchema = [
|
|
34135
|
-
{
|
|
34136
|
-
type: "CollapseGroup",
|
|
34137
|
-
name: "0",
|
|
34138
|
-
header: t("Logo"),
|
|
34139
|
-
defaultActive: true,
|
|
34140
|
-
children: [
|
|
34141
|
-
{
|
|
34142
|
-
type: "ImageUrl",
|
|
34143
|
-
// section->column->image
|
|
34144
|
-
name: "data.content.0.children.0.children.0.attributes.src",
|
|
34145
|
-
label: t("Logo")
|
|
34146
|
-
},
|
|
34147
|
-
{
|
|
34148
|
-
type: "PixelField",
|
|
34149
|
-
name: "data.content.0.children.0.children.0.attributes.width",
|
|
34150
|
-
label: t("Width")
|
|
34151
|
-
},
|
|
34152
|
-
{
|
|
34153
|
-
type: "BackgroundColor",
|
|
34154
|
-
name: "attributes.background-color",
|
|
34155
|
-
label: t("Background color")
|
|
34156
|
-
}
|
|
34157
|
-
]
|
|
34158
|
-
}
|
|
34159
|
-
];
|
|
34160
|
-
const PageFooterSchema = [
|
|
34161
|
-
{
|
|
34162
|
-
type: "CollapseGroup",
|
|
34163
|
-
name: "0",
|
|
34164
|
-
header: t("Footer"),
|
|
34165
|
-
defaultActive: true,
|
|
34166
|
-
children: [
|
|
34167
|
-
{
|
|
34168
|
-
type: "TextField",
|
|
34169
|
-
name: "data.content.0.children.0.children.0.children.0.text",
|
|
34170
|
-
label: t("Text")
|
|
34171
|
-
},
|
|
34172
|
-
{
|
|
34173
|
-
type: "BackgroundColor",
|
|
34174
|
-
name: "attributes.background-color",
|
|
34175
|
-
label: t("Background color")
|
|
34176
|
-
}
|
|
34177
|
-
]
|
|
34178
|
-
}
|
|
34179
|
-
];
|
|
34180
34378
|
const BlockSchemasMap = {
|
|
34181
34379
|
// // Text elements
|
|
34182
34380
|
// [ElementType.TEXT]: TextSchema,
|
|
@@ -34218,8 +34416,8 @@ const BlockSchemasMap = {
|
|
|
34218
34416
|
// [ElementType.STANDARD_SOCIAL]: SocialSchema,
|
|
34219
34417
|
// Note: Code and Widget components are too complex for schema-based approach
|
|
34220
34418
|
// They will continue to use component-based configuration
|
|
34221
|
-
[ElementType.PAGE_HEADER]: PageHeaderSchema,
|
|
34222
|
-
[ElementType.PAGE_FOOTER]: PageFooterSchema
|
|
34419
|
+
// [ElementType.PAGE_HEADER]: PageHeaderSchema,
|
|
34420
|
+
// [ElementType.PAGE_FOOTER]: PageFooterSchema,
|
|
34223
34421
|
};
|
|
34224
34422
|
const SchemaPanelRenderer = ({
|
|
34225
34423
|
schema,
|
|
@@ -34636,7 +34834,7 @@ const ConfigurationSideBar = ({ height }) => {
|
|
|
34636
34834
|
));
|
|
34637
34835
|
};
|
|
34638
34836
|
const largeTabsHeader = "_largeTabsHeader_d2sio_1";
|
|
34639
|
-
const styles = {
|
|
34837
|
+
const styles$2 = {
|
|
34640
34838
|
largeTabsHeader
|
|
34641
34839
|
};
|
|
34642
34840
|
function AddItems(props) {
|
|
@@ -34920,7 +35118,7 @@ function WidgetConfigPanel({
|
|
|
34920
35118
|
renderTabHeader: (_, DefaultHeader) => /* @__PURE__ */ React__default.createElement(
|
|
34921
35119
|
"div",
|
|
34922
35120
|
{
|
|
34923
|
-
className: styles.largeTabsHeader,
|
|
35121
|
+
className: styles$2.largeTabsHeader,
|
|
34924
35122
|
style: { display: "flex", alignItems: "center" }
|
|
34925
35123
|
},
|
|
34926
35124
|
/* @__PURE__ */ React__default.createElement(DefaultHeader, { style: { flex: 1 } })
|
|
@@ -35082,7 +35280,7 @@ function WidgetConfigPanel({
|
|
|
35082
35280
|
/* @__PURE__ */ React__default.createElement(DragOverlay, null, overlayContent)
|
|
35083
35281
|
));
|
|
35084
35282
|
}
|
|
35085
|
-
const styleText$
|
|
35283
|
+
const styleText$c = ".MergeTagComponent-image {\n max-width: 150px;\n}";
|
|
35086
35284
|
const MergeTagComponent = React__default.memo((props) => {
|
|
35087
35285
|
const ref = useRef(null);
|
|
35088
35286
|
const onCloseRef = useRefState(props.onClose);
|
|
@@ -35146,7 +35344,7 @@ const MergeTagComponent = React__default.memo((props) => {
|
|
|
35146
35344
|
onPointerDown: (e) => e.stopPropagation(),
|
|
35147
35345
|
onClick: (e) => e.stopPropagation()
|
|
35148
35346
|
},
|
|
35149
|
-
/* @__PURE__ */ React__default.createElement("style", null, styleText$
|
|
35347
|
+
/* @__PURE__ */ React__default.createElement("style", null, styleText$c),
|
|
35150
35348
|
/* @__PURE__ */ React__default.createElement(
|
|
35151
35349
|
Select$1,
|
|
35152
35350
|
__spreadProps(__spreadValues({
|
|
@@ -35220,8 +35418,8 @@ const SvgMoreIcon = (props) => /* @__PURE__ */ React$2.createElement("svg", __sp
|
|
|
35220
35418
|
display: "block",
|
|
35221
35419
|
fill: "currentColor"
|
|
35222
35420
|
}, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props), /* @__PURE__ */ React$2.createElement("g", null, /* @__PURE__ */ React$2.createElement("path", { d: "M3,1.5A1.5,1.5,0,1,1,1.5,0,1.5,1.5,0,0,1,3,1.5Z" }), /* @__PURE__ */ React$2.createElement("path", { d: "M8,1.5A1.5,1.5,0,1,1,6.5,0,1.5,1.5,0,0,1,8,1.5Z" }), /* @__PURE__ */ React$2.createElement("path", { d: "M13,1.5A1.5,1.5,0,1,1,11.5,0,1.5,1.5,0,0,1,13,1.5Z" })));
|
|
35223
|
-
const styleText$
|
|
35224
|
-
const styleText$
|
|
35421
|
+
const styleText$b = ".easy-email-pro-image-MoreIcon {\n width: 26px;\n height: 26px;\n padding: 2px;\n position: absolute;\n color: #fff;\n right: 0px;\n z-index: 10;\n top: 0px;\n box-sizing: border-box;\n cursor: pointer;\n background-color: rgba(55, 53, 47, 0.8);\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 3px;\n}\n.easy-email-pro-image-MoreIcon svg {\n width: 13px;\n}";
|
|
35422
|
+
const styleText$a = '.easy-email-pro-overlay-container {\n position: fixed;\n}\n.easy-email-pro-overlay-container .easy-email-pro-overlay-wrapper .content-type {\n display: flex;\n padding-left: 14px;\n padding-right: 14px;\n margin-top: 6px;\n margin-bottom: 8px;\n color: rgba(55, 53, 47, 0.65);\n font-size: 11px;\n font-weight: 500;\n line-height: 120%;\n user-select: none;\n text-transform: uppercase;\n}\n.easy-email-pro-overlay-container .easy-email-pro-overlay-wrapper .action-list-item {\n line-height: 120%;\n width: 100%;\n user-select: none;\n font-size: 14px;\n}\n.easy-email-pro-overlay-container .easy-email-pro-overlay-wrapper .action-list-item .action-list-item-inner {\n display: flex;\n align-items: center;\n cursor: pointer;\n width: calc(100% - 8px);\n margin-left: 4px;\n margin-right: 4px;\n padding-top: 8px;\n padding-bottom: 8px;\n border-radius: 3px;\n}\n.easy-email-pro-overlay-container .easy-email-pro-overlay-wrapper .action-list-item .action-list-item-inner-hover {\n transition: "background" 20ms ease-in 0s;\n background: rgba(55, 53, 47, 0.08);\n}\n.easy-email-pro-overlay-container .easy-email-pro-overlay-wrapper .action-list-item .img {\n display: flex;\n align-items: center;\n justify-content: center;\n margin-left: 10px;\n margin-right: 4px;\n margin-top: 1px;\n align-self: flex-start;\n}\n.easy-email-pro-overlay-container .easy-email-pro-overlay-wrapper .action-list-item .img img {\n display: block;\n object-fit: cover;\n border-radius: 3px;\n width: 16px;\n height: 16px;\n}\n.easy-email-pro-overlay-container .easy-email-pro-overlay-wrapper .action-list-item .content {\n margin-left: 6px;\n margin-right: 12px;\n min-width: 0px;\n flex: 1 1 auto;\n text-align: left;\n}\n.easy-email-pro-overlay-container .easy-email-pro-overlay-wrapper .action-list-item .content .title {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n color: rgba(55, 53, 47, 0.65);\n}\n.easy-email-pro-overlay-container .easy-email-pro-overlay-wrapper .action-list-item .content .desc {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n color: rgba(55, 53, 47, 0.65);\n margin-top: 2px;\n font-size: 12px;\n}\n.easy-email-pro-overlay-container .easy-email-pro-scrollbar {\n display: flex;\n flex-direction: column;\n width: 324px;\n min-width: 180px;\n max-width: calc(100vw - 24px);\n height: 100%;\n max-height: 40vh;\n border-radius: 4px;\n background: white;\n position: relative;\n max-width: calc(100vw - 24px);\n box-shadow: rgba(15, 15, 15, 0.05) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 9px 24px;\n overflow: auto;\n padding-top: 6px;\n padding-bottom: 6px;\n}';
|
|
35225
35423
|
const SvgDuplicateIcon = (props) => /* @__PURE__ */ React$2.createElement("svg", __spreadValues({ viewBox: "0 0 16 16", xmlns: "http://www.w3.org/2000/svg", style: {
|
|
35226
35424
|
width: 16,
|
|
35227
35425
|
height: 16,
|
|
@@ -35489,7 +35687,7 @@ const MoreActionsMenusOverlay = (props) => {
|
|
|
35489
35687
|
)
|
|
35490
35688
|
);
|
|
35491
35689
|
}));
|
|
35492
|
-
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement("div", { className: "easy-email-pro-overlay-container", style: { left, top } }, /* @__PURE__ */ React__default.createElement("div", { className: "easy-email-pro-overlay-wrapper" }, /* @__PURE__ */ React__default.createElement("div", { className: "easy-email-pro-scrollbar scrollbar" }, list))), /* @__PURE__ */ React__default.createElement("style", null, styleText$
|
|
35690
|
+
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement("div", { className: "easy-email-pro-overlay-container", style: { left, top } }, /* @__PURE__ */ React__default.createElement("div", { className: "easy-email-pro-overlay-wrapper" }, /* @__PURE__ */ React__default.createElement("div", { className: "easy-email-pro-scrollbar scrollbar" }, list))), /* @__PURE__ */ React__default.createElement("style", null, styleText$a));
|
|
35493
35691
|
};
|
|
35494
35692
|
const MoreIcon = ({
|
|
35495
35693
|
isHover,
|
|
@@ -35531,7 +35729,7 @@ const MoreIcon = ({
|
|
|
35531
35729
|
onPointerDown: onToggle
|
|
35532
35730
|
},
|
|
35533
35731
|
/* @__PURE__ */ React__default.createElement(SvgMoreIcon, null),
|
|
35534
|
-
/* @__PURE__ */ React__default.createElement("style", null, styleText$
|
|
35732
|
+
/* @__PURE__ */ React__default.createElement("style", null, styleText$b)
|
|
35535
35733
|
), /* @__PURE__ */ React__default.createElement(
|
|
35536
35734
|
MoreActionsMenusOverlay,
|
|
35537
35735
|
{
|
|
@@ -35881,7 +36079,7 @@ const UnsplashImagesDrawer = forwardRef(
|
|
|
35881
36079
|
), /* @__PURE__ */ React__default.createElement("div", { ref, onClick: () => setUnsplashVisible(true) }, props.children));
|
|
35882
36080
|
}
|
|
35883
36081
|
);
|
|
35884
|
-
const styleText$
|
|
36082
|
+
const styleText$9 = ".MinimalistEditorTopBar {\n height: 50px;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n border-bottom: 1px solid var(--color-border-2);\n position: relative;\n}\n.MinimalistEditorTopBar .MinimalistEditorTopBar-left-side {\n position: absolute;\n left: 10px;\n max-width: 400px;\n display: flex;\n align-items: center;\n}\n.MinimalistEditorTopBar .MinimalistEditorTopBar-right-side {\n position: absolute;\n right: 10px;\n}\n.MinimalistEditorTopBar .MinimalistEditorTopBar-center-side {\n max-width: 600px;\n min-width: 400px;\n display: flex;\n}\n.MinimalistEditorTopBar #RichTextBar .formatButton {\n font-size: 16px;\n}\n.MinimalistEditorTopBar .easy-email-pro-font-size,\n.MinimalistEditorTopBar .easy-email-pro-turnInto,\n.MinimalistEditorTopBar .easy-email-pro-font-family {\n margin-right: 10px;\n}\n.MinimalistEditorTopBar .easy-email-pro-font-size .arco-select-view,\n.MinimalistEditorTopBar .easy-email-pro-turnInto .arco-select-view,\n.MinimalistEditorTopBar .easy-email-pro-font-family .arco-select-view {\n border-width: 1px !important;\n}\n.MinimalistEditorTopBar .controller-item {\n cursor: pointer;\n font-size: 24px !important;\n color: rgb(34, 47, 62);\n}\n.MinimalistEditorTopBar .controller-item button {\n padding: 0 8px !important;\n}\n.MinimalistEditorTopBar [data-enable=false] {\n color: rgba(34, 47, 62, 0.5);\n cursor: not-allowed;\n pointer-events: none;\n}";
|
|
35885
36083
|
const EditorTopBar = () => {
|
|
35886
36084
|
const editor = useSlate();
|
|
35887
36085
|
const { copyBlock, deleteBlock } = useElementInteract();
|
|
@@ -36001,7 +36199,7 @@ const EditorTopBar = () => {
|
|
|
36001
36199
|
},
|
|
36002
36200
|
/* @__PURE__ */ React__default.createElement(IconFont, { iconName: "icon-mobile" })
|
|
36003
36201
|
)), /* @__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)))
|
|
36004
|
-
), /* @__PURE__ */ React__default.createElement("style", null, styleText$
|
|
36202
|
+
), /* @__PURE__ */ React__default.createElement("style", null, styleText$9));
|
|
36005
36203
|
};
|
|
36006
36204
|
const index$3 = "";
|
|
36007
36205
|
const PopupCard = (props) => {
|
|
@@ -36458,7 +36656,7 @@ const Image$2 = ({ nodePath }) => {
|
|
|
36458
36656
|
/* @__PURE__ */ React__default.createElement(IconFont, { iconName: "icon-adjust" })
|
|
36459
36657
|
));
|
|
36460
36658
|
};
|
|
36461
|
-
const Text = ({ nodePath }) => {
|
|
36659
|
+
const Text$2 = ({ nodePath }) => {
|
|
36462
36660
|
return /* @__PURE__ */ React__default.createElement("div", null, /* @__PURE__ */ React__default.createElement(SharedComponents.HoveringToolbar, null));
|
|
36463
36661
|
};
|
|
36464
36662
|
const Button = ({ nodePath }) => {
|
|
@@ -37012,13 +37210,13 @@ const ConfigurationToolbarMap = {
|
|
|
37012
37210
|
[ElementType.STANDARD_DIVIDER]: Divider,
|
|
37013
37211
|
[ElementType.STANDARD_SPACER]: Spacer,
|
|
37014
37212
|
//text
|
|
37015
|
-
[ElementType.STANDARD_TEXT]: Text,
|
|
37016
|
-
[ElementType.STANDARD_TEXT_LIST]: Text,
|
|
37017
|
-
[ElementType.STANDARD_PARAGRAPH]: Text,
|
|
37018
|
-
[ElementType.STANDARD_H1]: Text,
|
|
37019
|
-
[ElementType.STANDARD_H2]: Text,
|
|
37020
|
-
[ElementType.STANDARD_H3]: Text,
|
|
37021
|
-
[ElementType.STANDARD_H4]: Text
|
|
37213
|
+
[ElementType.STANDARD_TEXT]: Text$2,
|
|
37214
|
+
[ElementType.STANDARD_TEXT_LIST]: Text$2,
|
|
37215
|
+
[ElementType.STANDARD_PARAGRAPH]: Text$2,
|
|
37216
|
+
[ElementType.STANDARD_H1]: Text$2,
|
|
37217
|
+
[ElementType.STANDARD_H2]: Text$2,
|
|
37218
|
+
[ElementType.STANDARD_H3]: Text$2,
|
|
37219
|
+
[ElementType.STANDARD_H4]: Text$2
|
|
37022
37220
|
};
|
|
37023
37221
|
const ConfigurationToolbar = () => {
|
|
37024
37222
|
const { selectedNode } = useSelectedNode();
|
|
@@ -38812,7 +39010,7 @@ const StandaloneElementEditorDrawer = ({ children }) => {
|
|
|
38812
39010
|
footer: null
|
|
38813
39011
|
},
|
|
38814
39012
|
/* @__PURE__ */ React__default.createElement(
|
|
38815
|
-
PageHeader,
|
|
39013
|
+
PageHeader$1,
|
|
38816
39014
|
{
|
|
38817
39015
|
backIcon: hasChanged ? /* @__PURE__ */ React__default.createElement(
|
|
38818
39016
|
Popconfirm,
|
|
@@ -38926,46 +39124,870 @@ const DraggingPlaceholderWrapper = (props) => {
|
|
|
38926
39124
|
props.placeholder
|
|
38927
39125
|
);
|
|
38928
39126
|
};
|
|
38929
|
-
|
|
38930
|
-
const
|
|
38931
|
-
|
|
38932
|
-
|
|
38933
|
-
|
|
38934
|
-
|
|
38935
|
-
|
|
38936
|
-
|
|
38937
|
-
|
|
38938
|
-
|
|
38939
|
-
|
|
38940
|
-
|
|
38941
|
-
|
|
38942
|
-
|
|
38943
|
-
|
|
38944
|
-
|
|
38945
|
-
|
|
38946
|
-
|
|
38947
|
-
|
|
38948
|
-
|
|
38949
|
-
|
|
38950
|
-
|
|
38951
|
-
|
|
38952
|
-
|
|
38953
|
-
|
|
38954
|
-
|
|
38955
|
-
|
|
38956
|
-
|
|
38957
|
-
|
|
38958
|
-
|
|
38959
|
-
|
|
38960
|
-
|
|
38961
|
-
|
|
38962
|
-
|
|
38963
|
-
|
|
38964
|
-
|
|
38965
|
-
|
|
38966
|
-
|
|
38967
|
-
|
|
39127
|
+
const stylesText = ".mergtag-popover {\n position: relative;\n width: 100%;\n}\n\n.easy-email-pro-merge-tag-popover {\n line-height: 1.3;\n background-color: #fff;\n border-top: 1px solid rgb(229, 230, 235);\n z-index: 10;\n padding: 20px;\n font-family: -apple-system, BlinkMacSystemFont, San Francisco, Segoe UI, Roboto, Helvetica Neue, sans-serif;\n}\n.easy-email-pro-merge-tag-popover h3 {\n margin: 0;\n font-size: 12px;\n color: rgb(32, 34, 35);\n text-transform: uppercase;\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n.easy-email-pro-merge-tag-popover .easy-email-pro-merge-tag-popover-desc {\n font-size: 14px;\n color: rgb(109, 113, 117);\n}\n.easy-email-pro-merge-tag-popover .easy-email-pro-merge-tag-popover-desc-label {\n font-weight: 400;\n line-height: 15px;\n border: 1px solid rgb(109, 113, 117);\n border-radius: 4px;\n text-transform: none;\n letter-spacing: normal;\n position: relative;\n display: flex;\n align-items: center;\n color: rgb(32, 34, 35);\n cursor: text;\n font-size: 14px;\n}\n.easy-email-pro-merge-tag-popover input {\n text-transform: none;\n letter-spacing: normal;\n position: relative;\n z-index: 20;\n display: block;\n flex: 1 1;\n width: 100%;\n min-width: 0;\n min-height: 25px;\n margin: 0;\n padding: 5px 12px;\n background: none;\n border: 1px solid transparent;\n font-family: inherit;\n font-size: inherit;\n font-weight: inherit;\n appearance: none;\n caret-color: rgb(32, 34, 35);\n color: rgb(32, 34, 35);\n}\n.easy-email-pro-merge-tag-popover input:focus {\n outline: none;\n}\n.easy-email-pro-merge-tag-popover .easy-email-pro-merge-tag-popover-desc-label-count {\n color: rgb(109, 113, 117);\n z-index: 20;\n margin: 0 12px 0 3.5px;\n pointer-events: none;\n text-align: right;\n}\n.easy-email-pro-merge-tag-popover .easy-email-pro-merge-tag-popover-desc-label-button {\n font-size: 14px;\n text-align: right;\n margin-top: 10px;\n font-weight: normal;\n margin-bottom: 5px;\n}\n.easy-email-pro-merge-tag-popover .easy-email-pro-merge-tag-popover-desc-label-button button {\n color: rgb(var(--primary-6));\n padding: 4px 8px;\n border-radius: 4px;\n transition: all 0.1s linear;\n cursor: pointer;\n outline: none;\n background-color: transparent;\n border: 1px solid transparent;\n}\n.easy-email-pro-merge-tag-popover .easy-email-pro-merge-tag-popover-desc-label-button button:focus {\n color: rgb(var(--primary-6));\n background-color: rgb(242, 243, 245);\n}\n.easy-email-pro-merge-tag-popover .easy-email-pro-merge-tag-popover-desc-label-button button:hover {\n color: rgb(var(--primary-6));\n background-color: rgb(242, 243, 245);\n}\n.easy-email-pro-merge-tag-popover .easy-email-pro-merge-tag-popover-container {\n position: relative;\n z-index: 2;\n}";
|
|
39128
|
+
const MergetagPopover = ({
|
|
39129
|
+
element,
|
|
39130
|
+
onSave
|
|
39131
|
+
}) => {
|
|
39132
|
+
const [text, setText] = useState(element.data.default || "");
|
|
39133
|
+
useEffect(() => {
|
|
39134
|
+
setText(element.data.default || "");
|
|
39135
|
+
}, [element.data.default]);
|
|
39136
|
+
const onChange = useCallback(
|
|
39137
|
+
(ev) => {
|
|
39138
|
+
setText(ev.target.value);
|
|
39139
|
+
onSave(ev.target.value);
|
|
39140
|
+
},
|
|
39141
|
+
[onSave]
|
|
39142
|
+
);
|
|
39143
|
+
return /* @__PURE__ */ React__default.createElement("div", { className: classnames$1("easy-email-pro-merge-tag-popover") }, /* @__PURE__ */ React__default.createElement("div", { className: "easy-email-pro-merge-tag-popover-container" }, /* @__PURE__ */ React__default.createElement("h3", { style: { marginBottom: 10 } }, /* @__PURE__ */ React__default.createElement("span", null, t("Default value"))), /* @__PURE__ */ React__default.createElement("div", { className: "easy-email-pro-merge-tag-popover-desc" }, /* @__PURE__ */ React__default.createElement("p", { style: { marginBottom: 10 } }, t(
|
|
39144
|
+
'If a personalized text value isn"t available, then a default value is shown.'
|
|
39145
|
+
)), /* @__PURE__ */ React__default.createElement("div", { className: "easy-email-pro-merge-tag-popover-desc-label" }, /* @__PURE__ */ React__default.createElement(
|
|
39146
|
+
"input",
|
|
39147
|
+
{
|
|
39148
|
+
autoFocus: true,
|
|
39149
|
+
value: text,
|
|
39150
|
+
onChange,
|
|
39151
|
+
type: "text",
|
|
39152
|
+
autoComplete: "off",
|
|
39153
|
+
maxLength: 40
|
|
39154
|
+
}
|
|
39155
|
+
), /* @__PURE__ */ React__default.createElement("div", { className: "easy-email-pro-merge-tag-popover-desc-label-count" }, text.length, "/40")))), /* @__PURE__ */ React__default.createElement("style", null, stylesText));
|
|
39156
|
+
};
|
|
39157
|
+
const blocksDrawer = "_blocksDrawer_ek6hr_1";
|
|
39158
|
+
const content = "_content_ek6hr_8";
|
|
39159
|
+
const category$1 = "_category_ek6hr_14";
|
|
39160
|
+
const categoryHeader$1 = "_categoryHeader_ek6hr_21";
|
|
39161
|
+
const blockList = "_blockList_ek6hr_27";
|
|
39162
|
+
const addButton = "_addButton_ek6hr_39";
|
|
39163
|
+
const badge = "_badge_ek6hr_43";
|
|
39164
|
+
const blockItem = "_blockItem_ek6hr_57";
|
|
39165
|
+
const blockIcon = "_blockIcon_ek6hr_61";
|
|
39166
|
+
const layoutPreview$1 = "_layoutPreview_ek6hr_81";
|
|
39167
|
+
const layoutAddButton = "_layoutAddButton_ek6hr_85";
|
|
39168
|
+
const blockActions = "_blockActions_ek6hr_94";
|
|
39169
|
+
const styles$1 = {
|
|
39170
|
+
blocksDrawer,
|
|
39171
|
+
content,
|
|
39172
|
+
category: category$1,
|
|
39173
|
+
categoryHeader: categoryHeader$1,
|
|
39174
|
+
blockList,
|
|
39175
|
+
addButton,
|
|
39176
|
+
badge,
|
|
39177
|
+
blockItem,
|
|
39178
|
+
blockIcon,
|
|
39179
|
+
layoutPreview: layoutPreview$1,
|
|
39180
|
+
layoutAddButton,
|
|
39181
|
+
blockActions
|
|
39182
|
+
};
|
|
39183
|
+
const { Text: Text$1 } = Typography$1;
|
|
39184
|
+
const LayoutPreview$1 = ({
|
|
39185
|
+
sections,
|
|
39186
|
+
onAdd
|
|
39187
|
+
}) => {
|
|
39188
|
+
const isMultipleSections = sections.length > 1;
|
|
39189
|
+
const [isHovered, setIsHovered] = useState(false);
|
|
39190
|
+
return /* @__PURE__ */ React__default.createElement(
|
|
39191
|
+
"div",
|
|
39192
|
+
{
|
|
39193
|
+
className: styles$1.layoutPreview,
|
|
39194
|
+
onMouseEnter: () => setIsHovered(true),
|
|
39195
|
+
onMouseLeave: () => setIsHovered(false),
|
|
39196
|
+
style: {
|
|
39197
|
+
padding: "12px 0",
|
|
39198
|
+
borderBottom: "1px solid var(--color-border-2)",
|
|
39199
|
+
cursor: "pointer",
|
|
39200
|
+
transition: "background-color 0.2s ease",
|
|
39201
|
+
position: "relative"
|
|
39202
|
+
}
|
|
39203
|
+
},
|
|
39204
|
+
sections.map((section, sIndex) => /* @__PURE__ */ React__default.createElement("div", { key: sIndex }, isMultipleSections && sIndex > 0 && /* @__PURE__ */ React__default.createElement(
|
|
39205
|
+
"div",
|
|
39206
|
+
{
|
|
39207
|
+
style: {
|
|
39208
|
+
fontSize: 10,
|
|
39209
|
+
color: "var(--color-text-3)",
|
|
39210
|
+
marginTop: 6,
|
|
39211
|
+
marginBottom: 6
|
|
39212
|
+
}
|
|
39213
|
+
},
|
|
39214
|
+
"Row ",
|
|
39215
|
+
sIndex + 1
|
|
39216
|
+
), /* @__PURE__ */ React__default.createElement(
|
|
39217
|
+
"div",
|
|
39218
|
+
{
|
|
39219
|
+
style: {
|
|
39220
|
+
height: 32,
|
|
39221
|
+
border: "1px solid var(--color-border-3)",
|
|
39222
|
+
borderRadius: 2,
|
|
39223
|
+
overflow: "hidden",
|
|
39224
|
+
display: "flex",
|
|
39225
|
+
backgroundColor: "var(--color-fill-2)",
|
|
39226
|
+
marginBottom: isMultipleSections && sIndex < sections.length - 1 ? 6 : 0
|
|
39227
|
+
}
|
|
39228
|
+
},
|
|
39229
|
+
section.columns.map((width, cIndex) => /* @__PURE__ */ React__default.createElement(
|
|
39230
|
+
"div",
|
|
39231
|
+
{
|
|
39232
|
+
key: cIndex,
|
|
39233
|
+
style: {
|
|
39234
|
+
width,
|
|
39235
|
+
borderRight: cIndex === section.columns.length - 1 ? "none" : "1px solid var(--color-border-3)",
|
|
39236
|
+
height: "100%",
|
|
39237
|
+
display: "flex",
|
|
39238
|
+
alignItems: "center",
|
|
39239
|
+
justifyContent: "center",
|
|
39240
|
+
fontSize: 10,
|
|
39241
|
+
color: "var(--color-text-3)",
|
|
39242
|
+
fontWeight: 500
|
|
39243
|
+
}
|
|
39244
|
+
},
|
|
39245
|
+
width
|
|
39246
|
+
))
|
|
39247
|
+
))),
|
|
39248
|
+
isHovered && /* @__PURE__ */ React__default.createElement(
|
|
39249
|
+
"div",
|
|
39250
|
+
{
|
|
39251
|
+
style: {
|
|
39252
|
+
position: "absolute",
|
|
39253
|
+
right: 0,
|
|
39254
|
+
top: "50%",
|
|
39255
|
+
transform: "translateY(-50%)"
|
|
39256
|
+
}
|
|
39257
|
+
},
|
|
39258
|
+
/* @__PURE__ */ React__default.createElement(
|
|
39259
|
+
Button$2,
|
|
39260
|
+
{
|
|
39261
|
+
type: "primary",
|
|
39262
|
+
size: "small",
|
|
39263
|
+
onClick: (e) => {
|
|
39264
|
+
e.stopPropagation();
|
|
39265
|
+
onAdd();
|
|
39266
|
+
}
|
|
39267
|
+
},
|
|
39268
|
+
t("Add")
|
|
39269
|
+
)
|
|
39270
|
+
)
|
|
39271
|
+
);
|
|
39272
|
+
};
|
|
39273
|
+
const BlocksDrawer = () => {
|
|
39274
|
+
const [ref, setRef] = useState(null);
|
|
39275
|
+
const { addBlock } = useElementInteract();
|
|
39276
|
+
const {
|
|
39277
|
+
visible,
|
|
39278
|
+
closeBlocksDrawer: onClose,
|
|
39279
|
+
insertPath,
|
|
39280
|
+
parentCategory
|
|
39281
|
+
} = useBlocksDrawer();
|
|
39282
|
+
const editorProps = useEditorProps();
|
|
39283
|
+
const { categories: propsCategories } = editorProps;
|
|
39284
|
+
const categories = useMemo(() => {
|
|
39285
|
+
return (propsCategories || []).map((categoryItem) => {
|
|
39286
|
+
if (!parentCategory)
|
|
39287
|
+
return null;
|
|
39288
|
+
if (categoryItem.displayType === "grid") {
|
|
39289
|
+
return __spreadProps(__spreadValues({}, categoryItem), {
|
|
39290
|
+
blocks: categoryItem.blocks.filter((block) => {
|
|
39291
|
+
const blockDefinition = BlockManager.getBlockByType(block.type);
|
|
39292
|
+
return NodeUtils.isParentCategory(
|
|
39293
|
+
blockDefinition.category,
|
|
39294
|
+
parentCategory
|
|
39295
|
+
);
|
|
39296
|
+
})
|
|
39297
|
+
});
|
|
39298
|
+
} else if (categoryItem.displayType === "section") {
|
|
39299
|
+
if (parentCategory === ElementType.PAGE) {
|
|
39300
|
+
return categoryItem;
|
|
39301
|
+
}
|
|
39302
|
+
return null;
|
|
39303
|
+
} else if (categoryItem.displayType === "column" || categoryItem.displayType === "widget") {
|
|
39304
|
+
if (parentCategory === ElementType.WRAPPER || parentCategory === ElementType.PAGE) {
|
|
39305
|
+
return categoryItem;
|
|
39306
|
+
}
|
|
39307
|
+
return null;
|
|
39308
|
+
}
|
|
39309
|
+
return null;
|
|
39310
|
+
}).filter(Boolean);
|
|
39311
|
+
}, [propsCategories, parentCategory]);
|
|
39312
|
+
const handleSelectBlock = useCallback(
|
|
39313
|
+
(blockType) => {
|
|
39314
|
+
if (!insertPath)
|
|
39315
|
+
return;
|
|
39316
|
+
try {
|
|
39317
|
+
addBlock(blockType, insertPath, false);
|
|
39318
|
+
onClose();
|
|
39319
|
+
} catch (error2) {
|
|
39320
|
+
console.error("Failed to add block:", error2);
|
|
39321
|
+
}
|
|
39322
|
+
},
|
|
39323
|
+
[addBlock, insertPath, onClose]
|
|
39324
|
+
);
|
|
39325
|
+
return useMemo(() => {
|
|
39326
|
+
if (!(propsCategories == null ? void 0 : propsCategories.length))
|
|
39327
|
+
return null;
|
|
39328
|
+
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(
|
|
39329
|
+
"div",
|
|
39330
|
+
{
|
|
39331
|
+
id: "BlocksDrawer",
|
|
39332
|
+
ref: setRef,
|
|
39333
|
+
style: {
|
|
39334
|
+
position: "absolute",
|
|
39335
|
+
top: 0,
|
|
39336
|
+
left: 0,
|
|
39337
|
+
width: "100%",
|
|
39338
|
+
height: "100%",
|
|
39339
|
+
zIndex: 1,
|
|
39340
|
+
pointerEvents: visible ? "auto" : "none",
|
|
39341
|
+
display: visible ? "block" : "none"
|
|
39342
|
+
}
|
|
39343
|
+
}
|
|
39344
|
+
), ref && /* @__PURE__ */ React__default.createElement(
|
|
39345
|
+
Drawer,
|
|
39346
|
+
{
|
|
39347
|
+
width: "100%",
|
|
39348
|
+
title: null,
|
|
39349
|
+
closable: false,
|
|
39350
|
+
focusLock: false,
|
|
39351
|
+
placement: "left",
|
|
39352
|
+
bodyStyle: { padding: 0, transition: "none" },
|
|
39353
|
+
visible,
|
|
39354
|
+
getPopupContainer: () => ref,
|
|
39355
|
+
footer: null,
|
|
39356
|
+
onCancel: onClose
|
|
39357
|
+
},
|
|
39358
|
+
/* @__PURE__ */ React__default.createElement("div", { className: styles$1.blocksDrawer }, /* @__PURE__ */ React__default.createElement("div", { style: { padding: "16px 10px" } }, /* @__PURE__ */ React__default.createElement(Space, null, /* @__PURE__ */ React__default.createElement(
|
|
39359
|
+
Button$2,
|
|
39360
|
+
{
|
|
39361
|
+
type: "text",
|
|
39362
|
+
onClick: onClose,
|
|
39363
|
+
icon: /* @__PURE__ */ React__default.createElement(IconLeft, null),
|
|
39364
|
+
shape: "circle"
|
|
39365
|
+
}
|
|
39366
|
+
), /* @__PURE__ */ React__default.createElement("div", null, t(`Add block`)))), /* @__PURE__ */ React__default.createElement(
|
|
39367
|
+
"div",
|
|
39368
|
+
{
|
|
39369
|
+
className: styles$1.content,
|
|
39370
|
+
style: { height: `calc(${editorProps.height} - 60px)` }
|
|
39371
|
+
},
|
|
39372
|
+
categories.map((category2, categoryIndex) => {
|
|
39373
|
+
if (category2.displayType === "grid") {
|
|
39374
|
+
return /* @__PURE__ */ React__default.createElement("div", { key: categoryIndex, className: styles$1.category }, /* @__PURE__ */ React__default.createElement("div", { className: styles$1.categoryHeader }, /* @__PURE__ */ React__default.createElement(
|
|
39375
|
+
Text$1,
|
|
39376
|
+
{
|
|
39377
|
+
bold: true,
|
|
39378
|
+
style: {
|
|
39379
|
+
fontSize: 14,
|
|
39380
|
+
textTransform: "uppercase",
|
|
39381
|
+
letterSpacing: 0.5
|
|
39382
|
+
}
|
|
39383
|
+
},
|
|
39384
|
+
category2.label
|
|
39385
|
+
)), /* @__PURE__ */ React__default.createElement(
|
|
39386
|
+
List$1,
|
|
39387
|
+
{
|
|
39388
|
+
className: styles$1.blockList,
|
|
39389
|
+
dataSource: category2.blocks,
|
|
39390
|
+
render: (block, blockIndex) => /* @__PURE__ */ React__default.createElement(
|
|
39391
|
+
List$1.Item,
|
|
39392
|
+
{
|
|
39393
|
+
key: blockIndex,
|
|
39394
|
+
className: styles$1.blockItem,
|
|
39395
|
+
actions: [
|
|
39396
|
+
/* @__PURE__ */ React__default.createElement(
|
|
39397
|
+
"div",
|
|
39398
|
+
{
|
|
39399
|
+
key: "actions",
|
|
39400
|
+
className: styles$1.blockActions
|
|
39401
|
+
},
|
|
39402
|
+
/* @__PURE__ */ React__default.createElement(
|
|
39403
|
+
Button$2,
|
|
39404
|
+
{
|
|
39405
|
+
type: "primary",
|
|
39406
|
+
size: "small",
|
|
39407
|
+
className: styles$1.addButton,
|
|
39408
|
+
onClick: (e) => {
|
|
39409
|
+
e.stopPropagation();
|
|
39410
|
+
handleSelectBlock(__spreadProps(__spreadValues({}, block.payload), {
|
|
39411
|
+
type: block.type
|
|
39412
|
+
}));
|
|
39413
|
+
}
|
|
39414
|
+
},
|
|
39415
|
+
t(`Add`)
|
|
39416
|
+
)
|
|
39417
|
+
)
|
|
39418
|
+
]
|
|
39419
|
+
},
|
|
39420
|
+
/* @__PURE__ */ React__default.createElement(Space, { size: 12 }, /* @__PURE__ */ React__default.createElement(
|
|
39421
|
+
"div",
|
|
39422
|
+
{
|
|
39423
|
+
className: styles$1.blockIcon,
|
|
39424
|
+
style: {
|
|
39425
|
+
width: 24,
|
|
39426
|
+
height: 24,
|
|
39427
|
+
minWidth: 24,
|
|
39428
|
+
minHeight: 24,
|
|
39429
|
+
maxWidth: 24,
|
|
39430
|
+
maxHeight: 24,
|
|
39431
|
+
display: "flex",
|
|
39432
|
+
alignItems: "center",
|
|
39433
|
+
justifyContent: "center",
|
|
39434
|
+
flexShrink: 0,
|
|
39435
|
+
overflow: "hidden",
|
|
39436
|
+
position: "relative"
|
|
39437
|
+
}
|
|
39438
|
+
},
|
|
39439
|
+
block.icon
|
|
39440
|
+
), /* @__PURE__ */ React__default.createElement(Text$1, null, block.title || BlockManager.getBlockTitle(__spreadProps(__spreadValues({}, block.payload), {
|
|
39441
|
+
type: block.type
|
|
39442
|
+
}))))
|
|
39443
|
+
)
|
|
39444
|
+
}
|
|
39445
|
+
));
|
|
39446
|
+
}
|
|
39447
|
+
if (category2.displayType === "section") {
|
|
39448
|
+
return /* @__PURE__ */ React__default.createElement("div", { key: categoryIndex, className: styles$1.category }, /* @__PURE__ */ React__default.createElement("div", { className: styles$1.categoryHeader }, /* @__PURE__ */ React__default.createElement(
|
|
39449
|
+
Text$1,
|
|
39450
|
+
{
|
|
39451
|
+
bold: true,
|
|
39452
|
+
style: {
|
|
39453
|
+
fontSize: 12,
|
|
39454
|
+
textTransform: "uppercase",
|
|
39455
|
+
letterSpacing: 0.5
|
|
39456
|
+
}
|
|
39457
|
+
},
|
|
39458
|
+
category2.label
|
|
39459
|
+
)), /* @__PURE__ */ React__default.createElement("div", { style: { padding: "0 20px" } }, category2.blocks.map((item2, index2) => /* @__PURE__ */ React__default.createElement("div", { key: index2 }, /* @__PURE__ */ React__default.createElement(
|
|
39460
|
+
"div",
|
|
39461
|
+
{
|
|
39462
|
+
style: {
|
|
39463
|
+
fontSize: 13,
|
|
39464
|
+
fontWeight: 500,
|
|
39465
|
+
padding: "14px 0 8px 0",
|
|
39466
|
+
color: "var(--color-text-2)"
|
|
39467
|
+
}
|
|
39468
|
+
},
|
|
39469
|
+
item2.title
|
|
39470
|
+
), item2.variants && item2.variants.map((variant, vIndex) => /* @__PURE__ */ React__default.createElement(
|
|
39471
|
+
LayoutPreview$1,
|
|
39472
|
+
{
|
|
39473
|
+
key: vIndex,
|
|
39474
|
+
sections: variant.sections,
|
|
39475
|
+
onAdd: () => {
|
|
39476
|
+
const isMultiple = variant.sections.length > 1;
|
|
39477
|
+
if (isMultiple) {
|
|
39478
|
+
const wrapperBlock = BlockManager.getBlockByType(
|
|
39479
|
+
ElementType.STANDARD_WRAPPER
|
|
39480
|
+
);
|
|
39481
|
+
const element = wrapperBlock.create({
|
|
39482
|
+
attributes: {
|
|
39483
|
+
"background-repeat": "no-repeat"
|
|
39484
|
+
},
|
|
39485
|
+
children: variant.sections.map(
|
|
39486
|
+
(section) => ({
|
|
39487
|
+
type: StandardType.STANDARD_SECTION,
|
|
39488
|
+
attributes: {},
|
|
39489
|
+
data: {},
|
|
39490
|
+
children: section.columns.map(
|
|
39491
|
+
(column2) => ({
|
|
39492
|
+
type: StandardType.STANDARD_COLUMN,
|
|
39493
|
+
attributes: { width: column2 },
|
|
39494
|
+
data: {},
|
|
39495
|
+
children: []
|
|
39496
|
+
})
|
|
39497
|
+
)
|
|
39498
|
+
})
|
|
39499
|
+
)
|
|
39500
|
+
});
|
|
39501
|
+
handleSelectBlock(element);
|
|
39502
|
+
} else {
|
|
39503
|
+
const sectionBlock = BlockManager.getBlockByType(
|
|
39504
|
+
ElementType.STANDARD_SECTION
|
|
39505
|
+
);
|
|
39506
|
+
const element = sectionBlock.create({
|
|
39507
|
+
attributes: {},
|
|
39508
|
+
data: {},
|
|
39509
|
+
children: variant.sections[0].columns.map(
|
|
39510
|
+
(column2) => ({
|
|
39511
|
+
type: StandardType.STANDARD_COLUMN,
|
|
39512
|
+
attributes: { width: column2 },
|
|
39513
|
+
data: {},
|
|
39514
|
+
children: []
|
|
39515
|
+
})
|
|
39516
|
+
)
|
|
39517
|
+
});
|
|
39518
|
+
handleSelectBlock(element);
|
|
39519
|
+
}
|
|
39520
|
+
}
|
|
39521
|
+
}
|
|
39522
|
+
))))));
|
|
39523
|
+
}
|
|
39524
|
+
if (category2.displayType === "column") {
|
|
39525
|
+
return /* @__PURE__ */ React__default.createElement("div", { key: categoryIndex, className: styles$1.category }, /* @__PURE__ */ React__default.createElement("div", { className: styles$1.categoryHeader }, /* @__PURE__ */ React__default.createElement(
|
|
39526
|
+
Text$1,
|
|
39527
|
+
{
|
|
39528
|
+
bold: true,
|
|
39529
|
+
style: {
|
|
39530
|
+
fontSize: 12,
|
|
39531
|
+
textTransform: "uppercase",
|
|
39532
|
+
letterSpacing: 0.5
|
|
39533
|
+
}
|
|
39534
|
+
},
|
|
39535
|
+
category2.label
|
|
39536
|
+
)), /* @__PURE__ */ React__default.createElement("div", { style: { padding: "0 20px" } }, category2.blocks.map((item2, index2) => /* @__PURE__ */ React__default.createElement("div", { key: index2 }, /* @__PURE__ */ React__default.createElement(
|
|
39537
|
+
"div",
|
|
39538
|
+
{
|
|
39539
|
+
style: {
|
|
39540
|
+
fontSize: 13,
|
|
39541
|
+
fontWeight: 500,
|
|
39542
|
+
padding: "14px 0 8px 0",
|
|
39543
|
+
color: "var(--color-text-2)"
|
|
39544
|
+
}
|
|
39545
|
+
},
|
|
39546
|
+
item2.title
|
|
39547
|
+
), item2.payload && item2.payload.map(
|
|
39548
|
+
(columns, pIndex) => /* @__PURE__ */ React__default.createElement(
|
|
39549
|
+
LayoutPreview$1,
|
|
39550
|
+
{
|
|
39551
|
+
key: pIndex,
|
|
39552
|
+
sections: [{ columns }],
|
|
39553
|
+
onAdd: () => {
|
|
39554
|
+
const sectionBlock = BlockManager.getBlockByType(
|
|
39555
|
+
ElementType.STANDARD_SECTION
|
|
39556
|
+
);
|
|
39557
|
+
const element = sectionBlock.create({
|
|
39558
|
+
attributes: {},
|
|
39559
|
+
data: {},
|
|
39560
|
+
children: columns.map(
|
|
39561
|
+
(column2) => ({
|
|
39562
|
+
type: StandardType.STANDARD_COLUMN,
|
|
39563
|
+
attributes: { width: column2 },
|
|
39564
|
+
data: {},
|
|
39565
|
+
children: []
|
|
39566
|
+
})
|
|
39567
|
+
)
|
|
39568
|
+
});
|
|
39569
|
+
handleSelectBlock(element);
|
|
39570
|
+
}
|
|
39571
|
+
}
|
|
39572
|
+
)
|
|
39573
|
+
)))));
|
|
39574
|
+
}
|
|
39575
|
+
if (category2.displayType === "custom") {
|
|
39576
|
+
return /* @__PURE__ */ React__default.createElement("div", { key: categoryIndex, className: styles$1.category }, /* @__PURE__ */ React__default.createElement("div", { className: styles$1.categoryHeader }, /* @__PURE__ */ React__default.createElement(
|
|
39577
|
+
Text$1,
|
|
39578
|
+
{
|
|
39579
|
+
bold: true,
|
|
39580
|
+
style: {
|
|
39581
|
+
fontSize: 12,
|
|
39582
|
+
textTransform: "uppercase",
|
|
39583
|
+
letterSpacing: 0.5
|
|
39584
|
+
}
|
|
39585
|
+
},
|
|
39586
|
+
category2.label
|
|
39587
|
+
)), /* @__PURE__ */ React__default.createElement("div", { style: { padding: "16px 20px" } }, category2.blocks.map((item2, index2) => /* @__PURE__ */ React__default.createElement(
|
|
39588
|
+
"div",
|
|
39589
|
+
{
|
|
39590
|
+
key: index2,
|
|
39591
|
+
style: {
|
|
39592
|
+
marginBottom: index2 < category2.blocks.length - 1 ? 16 : 0
|
|
39593
|
+
}
|
|
39594
|
+
},
|
|
39595
|
+
item2
|
|
39596
|
+
))));
|
|
39597
|
+
}
|
|
39598
|
+
return null;
|
|
39599
|
+
})
|
|
39600
|
+
)),
|
|
39601
|
+
/* @__PURE__ */ React__default.createElement("style", null, `#BlocksDrawer .arco-drawer { transform: none !important; }`)
|
|
39602
|
+
));
|
|
39603
|
+
}, [
|
|
39604
|
+
propsCategories == null ? void 0 : propsCategories.length,
|
|
39605
|
+
visible,
|
|
39606
|
+
ref,
|
|
39607
|
+
onClose,
|
|
39608
|
+
editorProps.height,
|
|
39609
|
+
categories,
|
|
39610
|
+
handleSelectBlock
|
|
39611
|
+
]);
|
|
39612
|
+
};
|
|
39613
|
+
const blocksModal = "_blocksModal_oes30_1";
|
|
39614
|
+
const modalHeader = "_modalHeader_oes30_9";
|
|
39615
|
+
const headerActions = "_headerActions_oes30_16";
|
|
39616
|
+
const searchInput = "_searchInput_oes30_22";
|
|
39617
|
+
const modalTitle = "_modalTitle_oes30_26";
|
|
39618
|
+
const contentArea = "_contentArea_oes30_32";
|
|
39619
|
+
const category = "_category_oes30_38";
|
|
39620
|
+
const categoryHeader = "_categoryHeader_oes30_45";
|
|
39621
|
+
const gridContainer = "_gridContainer_oes30_56";
|
|
39622
|
+
const gridItem = "_gridItem_oes30_65";
|
|
39623
|
+
const selected = "_selected_oes30_84";
|
|
39624
|
+
const gridItemIcon = "_gridItemIcon_oes30_88";
|
|
39625
|
+
const gridItemLabel = "_gridItemLabel_oes30_118";
|
|
39626
|
+
const checkIcon = "_checkIcon_oes30_126";
|
|
39627
|
+
const emptyState = "_emptyState_oes30_143";
|
|
39628
|
+
const layoutPreview = "_layoutPreview_oes30_153";
|
|
39629
|
+
const layoutSelected = "_layoutSelected_oes30_169";
|
|
39630
|
+
const layoutRowLabel = "_layoutRowLabel_oes30_175";
|
|
39631
|
+
const layoutRow = "_layoutRow_oes30_175";
|
|
39632
|
+
const layoutColumn = "_layoutColumn_oes30_200";
|
|
39633
|
+
const styles = {
|
|
39634
|
+
blocksModal,
|
|
39635
|
+
modalHeader,
|
|
39636
|
+
headerActions,
|
|
39637
|
+
searchInput,
|
|
39638
|
+
modalTitle,
|
|
39639
|
+
contentArea,
|
|
39640
|
+
category,
|
|
39641
|
+
categoryHeader,
|
|
39642
|
+
gridContainer,
|
|
39643
|
+
gridItem,
|
|
39644
|
+
selected,
|
|
39645
|
+
gridItemIcon,
|
|
39646
|
+
gridItemLabel,
|
|
39647
|
+
checkIcon,
|
|
39648
|
+
emptyState,
|
|
39649
|
+
layoutPreview,
|
|
39650
|
+
layoutSelected,
|
|
39651
|
+
layoutRowLabel,
|
|
39652
|
+
layoutRow,
|
|
39653
|
+
layoutColumn
|
|
39654
|
+
};
|
|
39655
|
+
const { Text } = Typography$1;
|
|
39656
|
+
const LayoutPreview = ({
|
|
39657
|
+
sections,
|
|
39658
|
+
isSelected,
|
|
39659
|
+
onClick
|
|
39660
|
+
}) => {
|
|
39661
|
+
const isMultipleSections = sections.length > 1;
|
|
39662
|
+
return /* @__PURE__ */ React__default.createElement(
|
|
39663
|
+
"div",
|
|
39664
|
+
{
|
|
39665
|
+
className: `${styles.layoutPreview} ${isSelected ? styles.layoutSelected : ""}`,
|
|
39666
|
+
onClick
|
|
39667
|
+
},
|
|
39668
|
+
sections.map((section, sIndex) => /* @__PURE__ */ React__default.createElement("div", { key: sIndex }, isMultipleSections && sIndex > 0 && /* @__PURE__ */ React__default.createElement("div", { className: styles.layoutRowLabel }, "Row ", sIndex + 1), /* @__PURE__ */ React__default.createElement("div", { className: styles.layoutRow }, section.columns.map((width, cIndex) => /* @__PURE__ */ React__default.createElement(
|
|
39669
|
+
"div",
|
|
39670
|
+
{
|
|
39671
|
+
key: cIndex,
|
|
39672
|
+
className: styles.layoutColumn,
|
|
39673
|
+
style: { width }
|
|
39674
|
+
},
|
|
39675
|
+
width
|
|
39676
|
+
))))),
|
|
39677
|
+
isSelected && sections.length > 0 && /* @__PURE__ */ React__default.createElement("div", { className: styles.checkIcon }, /* @__PURE__ */ React__default.createElement(IconCheck, null))
|
|
39678
|
+
);
|
|
38968
39679
|
};
|
|
39680
|
+
const BlocksModal = () => {
|
|
39681
|
+
const { addBlock } = useElementInteract();
|
|
39682
|
+
const [searchQuery, setSearchQuery] = useState("");
|
|
39683
|
+
const [selectedBlock, setSelectedBlock] = useState(null);
|
|
39684
|
+
const {
|
|
39685
|
+
visible,
|
|
39686
|
+
closeBlocksDrawer: onClose,
|
|
39687
|
+
insertPath,
|
|
39688
|
+
parentCategory
|
|
39689
|
+
} = useBlocksDrawer();
|
|
39690
|
+
const editorProps = useEditorProps();
|
|
39691
|
+
const { categories: propsCategories } = editorProps;
|
|
39692
|
+
const categories = useMemo(() => {
|
|
39693
|
+
const filtered = (propsCategories || []).map((categoryItem) => {
|
|
39694
|
+
if (!parentCategory)
|
|
39695
|
+
return null;
|
|
39696
|
+
if (categoryItem.displayType === "grid") {
|
|
39697
|
+
const filteredBlocks = categoryItem.blocks.filter((block) => {
|
|
39698
|
+
const blockDefinition = BlockManager.getBlockByType(block.type);
|
|
39699
|
+
const matchesParent = NodeUtils.isParentCategory(
|
|
39700
|
+
blockDefinition.category,
|
|
39701
|
+
parentCategory
|
|
39702
|
+
);
|
|
39703
|
+
if (matchesParent && searchQuery.trim()) {
|
|
39704
|
+
const blockTitle = block.title || BlockManager.getBlockTitle(__spreadProps(__spreadValues({}, block.payload), {
|
|
39705
|
+
type: block.type
|
|
39706
|
+
}));
|
|
39707
|
+
const searchLower = searchQuery.toLowerCase();
|
|
39708
|
+
return blockTitle.toLowerCase().includes(searchLower) || block.type.toLowerCase().includes(searchLower) || categoryItem.label.toLowerCase().includes(searchLower);
|
|
39709
|
+
}
|
|
39710
|
+
return matchesParent;
|
|
39711
|
+
});
|
|
39712
|
+
return __spreadProps(__spreadValues({}, categoryItem), {
|
|
39713
|
+
blocks: filteredBlocks
|
|
39714
|
+
});
|
|
39715
|
+
} else if (categoryItem.displayType === "section") {
|
|
39716
|
+
if (parentCategory === ElementType.PAGE) {
|
|
39717
|
+
if (searchQuery.trim()) {
|
|
39718
|
+
const filteredBlocks = categoryItem.blocks.filter((item2) => {
|
|
39719
|
+
const searchLower = searchQuery.toLowerCase();
|
|
39720
|
+
return item2.title && item2.title.toLowerCase().includes(searchLower) || categoryItem.label.toLowerCase().includes(searchLower);
|
|
39721
|
+
});
|
|
39722
|
+
return __spreadProps(__spreadValues({}, categoryItem), {
|
|
39723
|
+
blocks: filteredBlocks
|
|
39724
|
+
});
|
|
39725
|
+
}
|
|
39726
|
+
return categoryItem;
|
|
39727
|
+
}
|
|
39728
|
+
return null;
|
|
39729
|
+
} else if (categoryItem.displayType === "column" || categoryItem.displayType === "widget") {
|
|
39730
|
+
if (parentCategory === ElementType.WRAPPER || parentCategory === ElementType.PAGE) {
|
|
39731
|
+
if (searchQuery.trim()) {
|
|
39732
|
+
const filteredBlocks = categoryItem.blocks.filter(
|
|
39733
|
+
(item2) => {
|
|
39734
|
+
const searchLower = searchQuery.toLowerCase();
|
|
39735
|
+
return item2.title && item2.title.toLowerCase().includes(searchLower) || categoryItem.label.toLowerCase().includes(searchLower);
|
|
39736
|
+
}
|
|
39737
|
+
);
|
|
39738
|
+
return __spreadProps(__spreadValues({}, categoryItem), {
|
|
39739
|
+
blocks: filteredBlocks
|
|
39740
|
+
});
|
|
39741
|
+
}
|
|
39742
|
+
return categoryItem;
|
|
39743
|
+
}
|
|
39744
|
+
return null;
|
|
39745
|
+
}
|
|
39746
|
+
return null;
|
|
39747
|
+
}).filter((category2) => {
|
|
39748
|
+
var _a;
|
|
39749
|
+
return category2 && (((_a = category2.blocks) == null ? void 0 : _a.length) > 0 || category2.displayType !== "grid");
|
|
39750
|
+
});
|
|
39751
|
+
return filtered;
|
|
39752
|
+
}, [propsCategories, parentCategory, searchQuery]);
|
|
39753
|
+
const handleSelectBlock = useCallback(
|
|
39754
|
+
(blockType) => {
|
|
39755
|
+
if (!insertPath)
|
|
39756
|
+
return;
|
|
39757
|
+
try {
|
|
39758
|
+
addBlock(blockType, insertPath, false);
|
|
39759
|
+
onClose();
|
|
39760
|
+
setSelectedBlock(null);
|
|
39761
|
+
} catch (error2) {
|
|
39762
|
+
console.error("Failed to add block:", error2);
|
|
39763
|
+
}
|
|
39764
|
+
},
|
|
39765
|
+
[addBlock, insertPath, onClose]
|
|
39766
|
+
);
|
|
39767
|
+
const handleGridItemClick = useCallback(
|
|
39768
|
+
(block, categoryIndex, blockIndex) => {
|
|
39769
|
+
setSelectedBlock({ block, categoryIndex, blockIndex });
|
|
39770
|
+
},
|
|
39771
|
+
[]
|
|
39772
|
+
);
|
|
39773
|
+
const handleAddClick = useCallback(() => {
|
|
39774
|
+
if (!selectedBlock)
|
|
39775
|
+
return;
|
|
39776
|
+
const { block, categoryIndex } = selectedBlock;
|
|
39777
|
+
const category2 = categories[categoryIndex];
|
|
39778
|
+
if ((category2 == null ? void 0 : category2.displayType) === "grid") {
|
|
39779
|
+
handleSelectBlock(__spreadProps(__spreadValues({}, block.payload), {
|
|
39780
|
+
type: block.type
|
|
39781
|
+
}));
|
|
39782
|
+
return;
|
|
39783
|
+
}
|
|
39784
|
+
if ((category2 == null ? void 0 : category2.displayType) === "column" && block.columns) {
|
|
39785
|
+
const sectionBlock = BlockManager.getBlockByType(
|
|
39786
|
+
ElementType.STANDARD_SECTION
|
|
39787
|
+
);
|
|
39788
|
+
const element = sectionBlock.create({
|
|
39789
|
+
attributes: {},
|
|
39790
|
+
data: {},
|
|
39791
|
+
children: block.columns.map((column2) => ({
|
|
39792
|
+
type: StandardType.STANDARD_COLUMN,
|
|
39793
|
+
attributes: { width: column2 },
|
|
39794
|
+
data: {},
|
|
39795
|
+
children: []
|
|
39796
|
+
}))
|
|
39797
|
+
});
|
|
39798
|
+
handleSelectBlock(element);
|
|
39799
|
+
return;
|
|
39800
|
+
}
|
|
39801
|
+
if ((category2 == null ? void 0 : category2.displayType) === "section" && block.sections) {
|
|
39802
|
+
const isMultiple = block.sections.length > 1;
|
|
39803
|
+
if (isMultiple) {
|
|
39804
|
+
const wrapperBlock = BlockManager.getBlockByType(
|
|
39805
|
+
ElementType.STANDARD_WRAPPER
|
|
39806
|
+
);
|
|
39807
|
+
const element = wrapperBlock.create({
|
|
39808
|
+
attributes: {
|
|
39809
|
+
"background-repeat": "no-repeat"
|
|
39810
|
+
},
|
|
39811
|
+
children: block.sections.map((section) => ({
|
|
39812
|
+
type: StandardType.STANDARD_SECTION,
|
|
39813
|
+
attributes: {},
|
|
39814
|
+
data: {},
|
|
39815
|
+
children: section.columns.map((column2) => ({
|
|
39816
|
+
type: StandardType.STANDARD_COLUMN,
|
|
39817
|
+
attributes: { width: column2 },
|
|
39818
|
+
data: {},
|
|
39819
|
+
children: []
|
|
39820
|
+
}))
|
|
39821
|
+
}))
|
|
39822
|
+
});
|
|
39823
|
+
handleSelectBlock(element);
|
|
39824
|
+
} else {
|
|
39825
|
+
const sectionBlock = BlockManager.getBlockByType(
|
|
39826
|
+
ElementType.STANDARD_SECTION
|
|
39827
|
+
);
|
|
39828
|
+
const element = sectionBlock.create({
|
|
39829
|
+
attributes: {},
|
|
39830
|
+
data: {},
|
|
39831
|
+
children: block.sections[0].columns.map((column2) => ({
|
|
39832
|
+
type: StandardType.STANDARD_COLUMN,
|
|
39833
|
+
attributes: { width: column2 },
|
|
39834
|
+
data: {},
|
|
39835
|
+
children: []
|
|
39836
|
+
}))
|
|
39837
|
+
});
|
|
39838
|
+
handleSelectBlock(element);
|
|
39839
|
+
}
|
|
39840
|
+
}
|
|
39841
|
+
}, [selectedBlock, categories, handleSelectBlock]);
|
|
39842
|
+
const handleModalClose = useCallback(() => {
|
|
39843
|
+
setSelectedBlock(null);
|
|
39844
|
+
setSearchQuery("");
|
|
39845
|
+
onClose();
|
|
39846
|
+
}, [onClose]);
|
|
39847
|
+
const handleSearchChange = useCallback((value) => {
|
|
39848
|
+
setSearchQuery(value);
|
|
39849
|
+
setSelectedBlock(null);
|
|
39850
|
+
}, []);
|
|
39851
|
+
const renderGridContent = useMemo(() => {
|
|
39852
|
+
return categories.map((category2, categoryIndex) => {
|
|
39853
|
+
if (category2.displayType === "grid") {
|
|
39854
|
+
return /* @__PURE__ */ React__default.createElement("div", { key: categoryIndex, className: styles.category }, /* @__PURE__ */ React__default.createElement("div", { className: styles.categoryHeader }, /* @__PURE__ */ React__default.createElement(Text, { bold: true }, category2.label)), /* @__PURE__ */ React__default.createElement("div", { className: styles.gridContainer }, category2.blocks.map((block, blockIndex) => {
|
|
39855
|
+
const isSelected = (selectedBlock == null ? void 0 : selectedBlock.categoryIndex) === categoryIndex && (selectedBlock == null ? void 0 : selectedBlock.blockIndex) === blockIndex;
|
|
39856
|
+
const blockTitle = block.title || BlockManager.getBlockTitle(__spreadProps(__spreadValues({}, block.payload), {
|
|
39857
|
+
type: block.type
|
|
39858
|
+
}));
|
|
39859
|
+
return /* @__PURE__ */ React__default.createElement(
|
|
39860
|
+
"div",
|
|
39861
|
+
{
|
|
39862
|
+
key: blockIndex,
|
|
39863
|
+
className: `${styles.gridItem} ${isSelected ? styles.selected : ""}`,
|
|
39864
|
+
onClick: () => handleGridItemClick(block, categoryIndex, blockIndex)
|
|
39865
|
+
},
|
|
39866
|
+
/* @__PURE__ */ React__default.createElement("div", { className: styles.gridItemIcon }, block.icon),
|
|
39867
|
+
/* @__PURE__ */ React__default.createElement("div", { className: styles.gridItemLabel }, blockTitle),
|
|
39868
|
+
isSelected && /* @__PURE__ */ React__default.createElement("div", { className: styles.checkIcon }, /* @__PURE__ */ React__default.createElement(IconCheck, null))
|
|
39869
|
+
);
|
|
39870
|
+
})));
|
|
39871
|
+
}
|
|
39872
|
+
if (category2.displayType === "section") {
|
|
39873
|
+
return /* @__PURE__ */ React__default.createElement("div", { key: categoryIndex, className: styles.category }, /* @__PURE__ */ React__default.createElement("div", { className: styles.categoryHeader }, /* @__PURE__ */ React__default.createElement(Text, { bold: true }, category2.label)), /* @__PURE__ */ React__default.createElement("div", { style: { padding: "0 20px" } }, category2.blocks.map((item2, index2) => /* @__PURE__ */ React__default.createElement("div", { key: index2 }, /* @__PURE__ */ React__default.createElement(
|
|
39874
|
+
"div",
|
|
39875
|
+
{
|
|
39876
|
+
style: {
|
|
39877
|
+
fontSize: 13,
|
|
39878
|
+
fontWeight: 500,
|
|
39879
|
+
padding: "14px 0 8px 0",
|
|
39880
|
+
color: "var(--color-text-2)"
|
|
39881
|
+
}
|
|
39882
|
+
},
|
|
39883
|
+
item2.title
|
|
39884
|
+
), /* @__PURE__ */ React__default.createElement(
|
|
39885
|
+
Space,
|
|
39886
|
+
{
|
|
39887
|
+
direction: "vertical",
|
|
39888
|
+
size: 10,
|
|
39889
|
+
style: { width: "100%" }
|
|
39890
|
+
},
|
|
39891
|
+
item2.variants && item2.variants.map((variant, vIndex) => {
|
|
39892
|
+
const isSelected = (selectedBlock == null ? void 0 : selectedBlock.categoryIndex) === categoryIndex && (selectedBlock == null ? void 0 : selectedBlock.blockIndex) === index2 && (selectedBlock == null ? void 0 : selectedBlock.variantIndex) === vIndex;
|
|
39893
|
+
return /* @__PURE__ */ React__default.createElement(
|
|
39894
|
+
LayoutPreview,
|
|
39895
|
+
{
|
|
39896
|
+
key: vIndex,
|
|
39897
|
+
sections: variant.sections,
|
|
39898
|
+
isSelected,
|
|
39899
|
+
onClick: () => {
|
|
39900
|
+
setSelectedBlock({
|
|
39901
|
+
block: variant,
|
|
39902
|
+
categoryIndex,
|
|
39903
|
+
blockIndex: index2,
|
|
39904
|
+
variantIndex: vIndex
|
|
39905
|
+
});
|
|
39906
|
+
}
|
|
39907
|
+
}
|
|
39908
|
+
);
|
|
39909
|
+
})
|
|
39910
|
+
)))));
|
|
39911
|
+
}
|
|
39912
|
+
if (category2.displayType === "column") {
|
|
39913
|
+
return /* @__PURE__ */ React__default.createElement("div", { key: categoryIndex, className: styles.category }, /* @__PURE__ */ React__default.createElement("div", { className: styles.categoryHeader }, /* @__PURE__ */ React__default.createElement(Text, { bold: true }, category2.label)), /* @__PURE__ */ React__default.createElement("div", { style: { padding: "0 20px" } }, category2.blocks.map((item2, index2) => /* @__PURE__ */ React__default.createElement("div", { key: index2 }, /* @__PURE__ */ React__default.createElement(
|
|
39914
|
+
"div",
|
|
39915
|
+
{
|
|
39916
|
+
style: {
|
|
39917
|
+
fontSize: 13,
|
|
39918
|
+
fontWeight: 500,
|
|
39919
|
+
padding: "14px 0 8px 0",
|
|
39920
|
+
color: "var(--color-text-2)"
|
|
39921
|
+
}
|
|
39922
|
+
},
|
|
39923
|
+
item2.title
|
|
39924
|
+
), item2.payload && item2.payload.map((columns, pIndex) => {
|
|
39925
|
+
const isSelected = (selectedBlock == null ? void 0 : selectedBlock.categoryIndex) === categoryIndex && (selectedBlock == null ? void 0 : selectedBlock.blockIndex) === index2 && (selectedBlock == null ? void 0 : selectedBlock.layoutIndex) === pIndex;
|
|
39926
|
+
return /* @__PURE__ */ React__default.createElement(
|
|
39927
|
+
LayoutPreview,
|
|
39928
|
+
{
|
|
39929
|
+
key: pIndex,
|
|
39930
|
+
sections: [{ columns }],
|
|
39931
|
+
isSelected,
|
|
39932
|
+
onClick: () => {
|
|
39933
|
+
setSelectedBlock({
|
|
39934
|
+
block: { columns },
|
|
39935
|
+
categoryIndex,
|
|
39936
|
+
blockIndex: index2,
|
|
39937
|
+
layoutIndex: pIndex
|
|
39938
|
+
});
|
|
39939
|
+
}
|
|
39940
|
+
}
|
|
39941
|
+
);
|
|
39942
|
+
})))));
|
|
39943
|
+
}
|
|
39944
|
+
if (category2.displayType === "custom") {
|
|
39945
|
+
return /* @__PURE__ */ React__default.createElement("div", { key: categoryIndex, className: styles.category }, /* @__PURE__ */ React__default.createElement("div", { className: styles.categoryHeader }, /* @__PURE__ */ React__default.createElement(Text, { bold: true }, category2.label)), /* @__PURE__ */ React__default.createElement("div", { style: { padding: "16px 20px" } }, category2.blocks.map((item2, index2) => /* @__PURE__ */ React__default.createElement(
|
|
39946
|
+
"div",
|
|
39947
|
+
{
|
|
39948
|
+
key: index2,
|
|
39949
|
+
style: {
|
|
39950
|
+
marginBottom: index2 < category2.blocks.length - 1 ? 16 : 0
|
|
39951
|
+
}
|
|
39952
|
+
},
|
|
39953
|
+
item2
|
|
39954
|
+
))));
|
|
39955
|
+
}
|
|
39956
|
+
return null;
|
|
39957
|
+
});
|
|
39958
|
+
}, [categories, selectedBlock, handleGridItemClick]);
|
|
39959
|
+
return /* @__PURE__ */ React__default.createElement(
|
|
39960
|
+
Modal,
|
|
39961
|
+
{
|
|
39962
|
+
title: /* @__PURE__ */ React__default.createElement("div", { className: styles.modalHeader }, t("Section library")),
|
|
39963
|
+
visible,
|
|
39964
|
+
onCancel: handleModalClose,
|
|
39965
|
+
style: { width: 800, maxWidth: "90vw" },
|
|
39966
|
+
okButtonProps: {
|
|
39967
|
+
disabled: !selectedBlock,
|
|
39968
|
+
onClick: handleAddClick
|
|
39969
|
+
},
|
|
39970
|
+
okText: t("Add"),
|
|
39971
|
+
cancelButtonProps: {
|
|
39972
|
+
onClick: handleModalClose
|
|
39973
|
+
},
|
|
39974
|
+
cancelText: t("Cancel")
|
|
39975
|
+
},
|
|
39976
|
+
/* @__PURE__ */ React__default.createElement("div", { className: styles.blocksModal }, /* @__PURE__ */ React__default.createElement("div", { className: styles.headerActions }, /* @__PURE__ */ React__default.createElement(
|
|
39977
|
+
Input,
|
|
39978
|
+
{
|
|
39979
|
+
className: styles.searchInput,
|
|
39980
|
+
placeholder: t("Search blocks..."),
|
|
39981
|
+
prefix: /* @__PURE__ */ React__default.createElement(IconSearch, null),
|
|
39982
|
+
value: searchQuery,
|
|
39983
|
+
onChange: handleSearchChange,
|
|
39984
|
+
allowClear: true
|
|
39985
|
+
}
|
|
39986
|
+
)), /* @__PURE__ */ React__default.createElement("div", { className: styles.contentArea }, categories.length > 0 ? renderGridContent : /* @__PURE__ */ React__default.createElement("div", { className: styles.emptyState }, t("No blocks available"))))
|
|
39987
|
+
);
|
|
39988
|
+
};
|
|
39989
|
+
const styleText$8 = "[data-standard-table2-selected=true] ::selection {\n background: none !important;\n}\n\n[data-standard-table2-selected=true] [data-standard-table2-td-selected=true] {\n background-color: rgba(199, 199, 199, 0.4) !important;\n}";
|
|
39990
|
+
const styleText$7 = ".easy-email-pro-table-operation-menu {\n position: fixed;\n z-index: 999999;\n background-color: #fff;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\n font-size: 14px;\n z-index: 100;\n overflow: hidden;\n border-radius: 4px;\n padding: 4px 0;\n}\n.easy-email-pro-table-operation-menu .easy-email-pro-table-operation-menu-dividing {\n height: 1px;\n background-color: #efefef;\n}\n.easy-email-pro-table-operation-menu .easy-email-pro-table-operation-menu-item {\n display: flex;\n align-items: center;\n padding: 10px 16px;\n line-height: 18px;\n background-color: #fff;\n cursor: pointer;\n color: #595959;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.easy-email-pro-table-operation-menu .easy-email-pro-table-operation-menu-item:hover {\n background-color: #efefef;\n}\n.easy-email-pro-table-operation-menu .easy-email-pro-table-operation-menu-item .easy-email-pro-table-operation-menu-icon {\n margin-right: 8px;\n height: 20px;\n width: 20px;\n font-size: 0;\n}";
|
|
38969
39991
|
const table2SelectedDataType = "data-standard-table2-selected";
|
|
38970
39992
|
const table2TdSelectedDataType = "data-standard-table2-td-selected";
|
|
38971
39993
|
const defaultTd = {
|
|
@@ -39440,13 +40462,13 @@ const ContextMenu = ({
|
|
|
39440
40462
|
/* @__PURE__ */ React__default.createElement("div", { className: "easy-email-pro-table-operation-menu-icon" }, /* @__PURE__ */ React__default.createElement(IconFont, { size: 20, iconName: "icon-delete-selected-rows" })),
|
|
39441
40463
|
/* @__PURE__ */ React__default.createElement("div", { className: "easy-email-pro-table-operation-menu-text" }, "Delete selected rows")
|
|
39442
40464
|
)
|
|
39443
|
-
), /* @__PURE__ */ React__default.createElement("style", null, styleText$
|
|
40465
|
+
), /* @__PURE__ */ React__default.createElement("style", null, styleText$7)),
|
|
39444
40466
|
ele || document.body
|
|
39445
40467
|
);
|
|
39446
40468
|
};
|
|
39447
40469
|
const ERROR_LIMIT = 2;
|
|
39448
40470
|
const TableTools = (props) => {
|
|
39449
|
-
const
|
|
40471
|
+
const selected2 = useSelected();
|
|
39450
40472
|
const editor = useSlate();
|
|
39451
40473
|
const [showContextMenu, setShowContextMenu] = useState(false);
|
|
39452
40474
|
const [position, setPosition] = useState({ left: 0, top: 0 });
|
|
@@ -39498,7 +40520,7 @@ const TableTools = (props) => {
|
|
|
39498
40520
|
};
|
|
39499
40521
|
}, [iframe, props.nodeElement]);
|
|
39500
40522
|
useEffect(() => {
|
|
39501
|
-
if (!
|
|
40523
|
+
if (!selected2) {
|
|
39502
40524
|
Array.from(
|
|
39503
40525
|
props.nodeElement.querySelectorAll(
|
|
39504
40526
|
`[data-slate-category="${ElementCategory.TABLE2_TD}"]`
|
|
@@ -39507,7 +40529,7 @@ const TableTools = (props) => {
|
|
|
39507
40529
|
td.removeAttribute(table2TdSelectedDataType);
|
|
39508
40530
|
});
|
|
39509
40531
|
}
|
|
39510
|
-
}, [props.nodeElement,
|
|
40532
|
+
}, [props.nodeElement, selected2]);
|
|
39511
40533
|
useEffect(() => {
|
|
39512
40534
|
if (!iframe || !contentWindow)
|
|
39513
40535
|
return;
|
|
@@ -39623,9 +40645,53 @@ const TableTools = (props) => {
|
|
|
39623
40645
|
contentWindow == null ? void 0 : contentWindow.removeEventListener("pointerup", handleUp);
|
|
39624
40646
|
};
|
|
39625
40647
|
}, [contentWindow, editor, iframe, props.nodeElement]);
|
|
39626
|
-
if (!
|
|
40648
|
+
if (!selected2)
|
|
39627
40649
|
return null;
|
|
39628
|
-
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement("style", null, styleText$
|
|
40650
|
+
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement("style", null, styleText$8), showContextMenu && /* @__PURE__ */ React__default.createElement(ContextMenu, { position }));
|
|
40651
|
+
};
|
|
40652
|
+
ExternalComponents.ChildrenWithPlaceholderWrapper = DraggingPlaceholderWrapper;
|
|
40653
|
+
const SharedComponents = {
|
|
40654
|
+
PreviewEmailDrawer,
|
|
40655
|
+
PreviewEmail,
|
|
40656
|
+
ElementIcon,
|
|
40657
|
+
BlockSideBar,
|
|
40658
|
+
ConfigurationSideBar,
|
|
40659
|
+
AttributePanel,
|
|
40660
|
+
ColumnLayout,
|
|
40661
|
+
ConfigurationDrawer,
|
|
40662
|
+
ConfigurationPanel,
|
|
40663
|
+
MergetagPopover,
|
|
40664
|
+
CollapseWrapper,
|
|
40665
|
+
EditorTabs,
|
|
40666
|
+
UniversalElementEditorDrawer,
|
|
40667
|
+
StandaloneElementEditorDrawer,
|
|
40668
|
+
RichTextBar,
|
|
40669
|
+
HoveringToolbar,
|
|
40670
|
+
TextHTMLEditor,
|
|
40671
|
+
Hotkeys,
|
|
40672
|
+
Controller,
|
|
40673
|
+
UnsplashImages,
|
|
40674
|
+
UnsplashImagesDrawer,
|
|
40675
|
+
WidgetConfigPanel,
|
|
40676
|
+
FullHeightOverlayScrollbars,
|
|
40677
|
+
BlockList,
|
|
40678
|
+
UniversalListItem,
|
|
40679
|
+
UniversalList,
|
|
40680
|
+
MergeTagComponent,
|
|
40681
|
+
ImageAction,
|
|
40682
|
+
DesktopEmailPreview,
|
|
40683
|
+
MobilePreview,
|
|
40684
|
+
MinimalistEditorTopBar: EditorTopBar,
|
|
40685
|
+
ConfigurationToolbar,
|
|
40686
|
+
AIAssistant,
|
|
40687
|
+
AIPromptModal,
|
|
40688
|
+
SourceCodePanel,
|
|
40689
|
+
DragItem,
|
|
40690
|
+
ElementStyleGallery,
|
|
40691
|
+
StandaloneElementSaveButtonPortal,
|
|
40692
|
+
BlocksDrawer,
|
|
40693
|
+
BlocksModal,
|
|
40694
|
+
TableTools
|
|
39629
40695
|
};
|
|
39630
40696
|
const stopEvent$1 = (ev) => {
|
|
39631
40697
|
ev.stopPropagation();
|
|
@@ -39639,6 +40705,12 @@ const ElementPlaceholderWrapper = (props) => {
|
|
|
39639
40705
|
ev.stopPropagation();
|
|
39640
40706
|
deleteBlock(Path.parent(path2));
|
|
39641
40707
|
};
|
|
40708
|
+
const { openBlocksDrawer } = useBlocksDrawer();
|
|
40709
|
+
const onOpenBlockDrawer = (ev) => {
|
|
40710
|
+
ev.preventDefault();
|
|
40711
|
+
ev.stopPropagation();
|
|
40712
|
+
openBlocksDrawer(path2, ElementCategory.COLUMN);
|
|
40713
|
+
};
|
|
39642
40714
|
const isSectionCategory = NodeUtils.isSectionElement(element);
|
|
39643
40715
|
const isHeroCategory = NodeUtils.isHeroElement(element);
|
|
39644
40716
|
const isWrapperCategory = NodeUtils.isWrapperElement(element);
|
|
@@ -39665,7 +40737,20 @@ const ElementPlaceholderWrapper = (props) => {
|
|
|
39665
40737
|
}
|
|
39666
40738
|
)))) : /* @__PURE__ */ React__default.createElement("div", { className: "wrapper-category-hover" }));
|
|
39667
40739
|
} else if (element.type === ElementType.PLACEHOLDER) {
|
|
39668
|
-
renderContent = /* @__PURE__ */ React__default.createElement(
|
|
40740
|
+
renderContent = /* @__PURE__ */ React__default.createElement(
|
|
40741
|
+
"div",
|
|
40742
|
+
{
|
|
40743
|
+
style: {
|
|
40744
|
+
cursor: "pointer",
|
|
40745
|
+
pointerEvents: "auto",
|
|
40746
|
+
width: "100%",
|
|
40747
|
+
height: "100%"
|
|
40748
|
+
},
|
|
40749
|
+
onClickCapture: onOpenBlockDrawer
|
|
40750
|
+
},
|
|
40751
|
+
/* @__PURE__ */ React__default.createElement("div", { className: "element-delete" }, /* @__PURE__ */ React__default.createElement(IconDelete, { onPointerDown })),
|
|
40752
|
+
/* @__PURE__ */ React__default.createElement("div", { style: { textAlign: "center" } }, t("Drop content here"))
|
|
40753
|
+
);
|
|
39669
40754
|
}
|
|
39670
40755
|
const isUniversalElement = NodeUtils.isUniversalElement(element);
|
|
39671
40756
|
const isStandaloneElement = NodeUtils.isStandaloneElement(element);
|
|
@@ -39699,7 +40784,7 @@ const ElementPlaceholderWrapper = (props) => {
|
|
|
39699
40784
|
}
|
|
39700
40785
|
}
|
|
39701
40786
|
if (NodeUtils.isTable2Element(element)) {
|
|
39702
|
-
renderContent = /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, renderContent, /* @__PURE__ */ React__default.createElement(TableTools, __spreadValues({}, props)));
|
|
40787
|
+
renderContent = /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, renderContent, /* @__PURE__ */ React__default.createElement(SharedComponents.TableTools, __spreadValues({}, props)));
|
|
39703
40788
|
}
|
|
39704
40789
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, renderContent, /* @__PURE__ */ React__default.createElement("style", null, styleText$d));
|
|
39705
40790
|
};
|
|
@@ -39886,36 +40971,6 @@ const ElementDragover$1 = (props) => {
|
|
|
39886
40971
|
}
|
|
39887
40972
|
return /* @__PURE__ */ React__default.createElement(ElementDragoverPlaceholder, __spreadValues({}, props));
|
|
39888
40973
|
};
|
|
39889
|
-
const stylesText = ".mergtag-popover {\n position: relative;\n width: 100%;\n}\n\n.easy-email-pro-merge-tag-popover {\n line-height: 1.3;\n background-color: #fff;\n border-top: 1px solid rgb(229, 230, 235);\n z-index: 10;\n padding: 20px;\n font-family: -apple-system, BlinkMacSystemFont, San Francisco, Segoe UI, Roboto, Helvetica Neue, sans-serif;\n}\n.easy-email-pro-merge-tag-popover h3 {\n margin: 0;\n font-size: 12px;\n color: rgb(32, 34, 35);\n text-transform: uppercase;\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n.easy-email-pro-merge-tag-popover .easy-email-pro-merge-tag-popover-desc {\n font-size: 14px;\n color: rgb(109, 113, 117);\n}\n.easy-email-pro-merge-tag-popover .easy-email-pro-merge-tag-popover-desc-label {\n font-weight: 400;\n line-height: 15px;\n border: 1px solid rgb(109, 113, 117);\n border-radius: 4px;\n text-transform: none;\n letter-spacing: normal;\n position: relative;\n display: flex;\n align-items: center;\n color: rgb(32, 34, 35);\n cursor: text;\n font-size: 14px;\n}\n.easy-email-pro-merge-tag-popover input {\n text-transform: none;\n letter-spacing: normal;\n position: relative;\n z-index: 20;\n display: block;\n flex: 1 1;\n width: 100%;\n min-width: 0;\n min-height: 25px;\n margin: 0;\n padding: 5px 12px;\n background: none;\n border: 1px solid transparent;\n font-family: inherit;\n font-size: inherit;\n font-weight: inherit;\n appearance: none;\n caret-color: rgb(32, 34, 35);\n color: rgb(32, 34, 35);\n}\n.easy-email-pro-merge-tag-popover input:focus {\n outline: none;\n}\n.easy-email-pro-merge-tag-popover .easy-email-pro-merge-tag-popover-desc-label-count {\n color: rgb(109, 113, 117);\n z-index: 20;\n margin: 0 12px 0 3.5px;\n pointer-events: none;\n text-align: right;\n}\n.easy-email-pro-merge-tag-popover .easy-email-pro-merge-tag-popover-desc-label-button {\n font-size: 14px;\n text-align: right;\n margin-top: 10px;\n font-weight: normal;\n margin-bottom: 5px;\n}\n.easy-email-pro-merge-tag-popover .easy-email-pro-merge-tag-popover-desc-label-button button {\n color: rgb(var(--primary-6));\n padding: 4px 8px;\n border-radius: 4px;\n transition: all 0.1s linear;\n cursor: pointer;\n outline: none;\n background-color: transparent;\n border: 1px solid transparent;\n}\n.easy-email-pro-merge-tag-popover .easy-email-pro-merge-tag-popover-desc-label-button button:focus {\n color: rgb(var(--primary-6));\n background-color: rgb(242, 243, 245);\n}\n.easy-email-pro-merge-tag-popover .easy-email-pro-merge-tag-popover-desc-label-button button:hover {\n color: rgb(var(--primary-6));\n background-color: rgb(242, 243, 245);\n}\n.easy-email-pro-merge-tag-popover .easy-email-pro-merge-tag-popover-container {\n position: relative;\n z-index: 2;\n}";
|
|
39890
|
-
const MergetagPopover = ({
|
|
39891
|
-
element,
|
|
39892
|
-
onSave
|
|
39893
|
-
}) => {
|
|
39894
|
-
const [text, setText] = useState(element.data.default || "");
|
|
39895
|
-
useEffect(() => {
|
|
39896
|
-
setText(element.data.default || "");
|
|
39897
|
-
}, [element.data.default]);
|
|
39898
|
-
const onChange = useCallback(
|
|
39899
|
-
(ev) => {
|
|
39900
|
-
setText(ev.target.value);
|
|
39901
|
-
onSave(ev.target.value);
|
|
39902
|
-
},
|
|
39903
|
-
[onSave]
|
|
39904
|
-
);
|
|
39905
|
-
return /* @__PURE__ */ React__default.createElement("div", { className: classnames$1("easy-email-pro-merge-tag-popover") }, /* @__PURE__ */ React__default.createElement("div", { className: "easy-email-pro-merge-tag-popover-container" }, /* @__PURE__ */ React__default.createElement("h3", { style: { marginBottom: 10 } }, /* @__PURE__ */ React__default.createElement("span", null, t("Default value"))), /* @__PURE__ */ React__default.createElement("div", { className: "easy-email-pro-merge-tag-popover-desc" }, /* @__PURE__ */ React__default.createElement("p", { style: { marginBottom: 10 } }, t(
|
|
39906
|
-
'If a personalized text value isn"t available, then a default value is shown.'
|
|
39907
|
-
)), /* @__PURE__ */ React__default.createElement("div", { className: "easy-email-pro-merge-tag-popover-desc-label" }, /* @__PURE__ */ React__default.createElement(
|
|
39908
|
-
"input",
|
|
39909
|
-
{
|
|
39910
|
-
autoFocus: true,
|
|
39911
|
-
value: text,
|
|
39912
|
-
onChange,
|
|
39913
|
-
type: "text",
|
|
39914
|
-
autoComplete: "off",
|
|
39915
|
-
maxLength: 40
|
|
39916
|
-
}
|
|
39917
|
-
), /* @__PURE__ */ React__default.createElement("div", { className: "easy-email-pro-merge-tag-popover-desc-label-count" }, text.length, "/40")))), /* @__PURE__ */ React__default.createElement("style", null, stylesText));
|
|
39918
|
-
};
|
|
39919
40974
|
const FullScreenLoading = ({
|
|
39920
40975
|
size = 40,
|
|
39921
40976
|
isFullScreen
|
|
@@ -40207,7 +41262,7 @@ const Layout$1 = ({ children, footer, header, tabLeft, tabRight }) => {
|
|
|
40207
41262
|
}
|
|
40208
41263
|
if (!root2 || !inited)
|
|
40209
41264
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, layoutContent);
|
|
40210
|
-
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, layoutContent, /* @__PURE__ */ React__default.createElement(SharedComponents.HoveringToolbar, null), /* @__PURE__ */ React__default.createElement(SharedComponents.Controller, null), /* @__PURE__ */ React__default.createElement(SharedComponents.Hotkeys, null), /* @__PURE__ */ React__default.createElement(AutoDeselectElement$1, null), /* @__PURE__ */ React__default.createElement("style", null, styleText$h));
|
|
41265
|
+
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, layoutContent, /* @__PURE__ */ React__default.createElement(SharedComponents.BlocksModal, null), /* @__PURE__ */ React__default.createElement(SharedComponents.HoveringToolbar, null), /* @__PURE__ */ React__default.createElement(SharedComponents.Controller, null), /* @__PURE__ */ React__default.createElement(SharedComponents.Hotkeys, null), /* @__PURE__ */ React__default.createElement(AutoDeselectElement$1, null), /* @__PURE__ */ React__default.createElement("style", null, styleText$h));
|
|
40211
41266
|
};
|
|
40212
41267
|
const Retro = { useCreateConfig: useCreateConfig$1, Layout: Layout$1 };
|
|
40213
41268
|
const styleText$4 = '[data-slate-hide-cursor=true][data-slate-hover=true] {\n cursor: none;\n}\n[data-slate-hide-cursor=true][data-slate-hover=true]:hover {\n outline: none !important;\n}\n\n[data-slate-hide-cursor=true] [data-slate-hover=true] .element-tools-container {\n opacity: 0;\n}\n\n.element-tools-container {\n position: absolute;\n font-size: 14px;\n left: 0px;\n top: 0px;\n width: 100%;\n height: 100%;\n outline-offset: -2px;\n outline: 2px dashed transparent;\n outline-offset: -2px;\n pointer-events: none;\n}\n\n.element-tools {\n pointer-events: auto;\n position: absolute;\n top: 0;\n left: 0;\n transform: translate(0, -100%);\n display: flex;\n align-items: center;\n font-size: 14px !important;\n height: 22px;\n padding: 1px 5px;\n line-height: 22px;\n font-weight: normal !important;\n font-style: normal !important;\n}\n.element-tools .element-tools-item {\n font-size: 12px !important;\n line-height: 20px;\n width: 25px;\n display: flex;\n pointer-events: auto;\n cursor: pointer;\n justify-content: center;\n}\n\n.element-tools-bottom {\n top: 100%;\n transform: translate(0, 0);\n}\n\n.element-drag-button {\n pointer-events: auto;\n position: absolute;\n z-index: 4;\n top: 50%;\n right: 0%;\n color: #fff;\n color: rgb(255, 255, 255);\n height: 28px;\n width: 28px;\n display: flex;\n align-items: center;\n justify-content: center;\n transform: translate(50%, -50%);\n border-radius: 50%;\n cursor: grab;\n}\n.element-drag-button .iconfont {\n cursor: grab !important;\n}\n\nbody [data-slate-hover=true] .element-tools-container .element-tools {\n color: #fff;\n background-color: var(--hover-color);\n}\nbody [data-slate-hover=true] .element-tools-container .element-drag-button {\n background-color: var(--hover-color);\n}\n\n[data-slate-block=page][data-slate-hover=true] > .element-tools-container .element-tools {\n display: none;\n}\n[data-slate-block=page][data-slate-hover=true] > .element-tools-container .element-drag-button {\n display: none;\n}\n\n.element-hover-container {\n position: absolute;\n font-size: 14px;\n left: 0px;\n top: 0px;\n width: 100%;\n height: 100%;\n outline-offset: -2px;\n outline: 2px solid transparent;\n color: var(--hover-color);\n outline-offset: -2px;\n z-index: 10;\n pointer-events: none;\n font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";\n}\n.element-hover-container .element-hover-tools {\n pointer-events: auto;\n height: calc(100% + 4px);\n position: absolute;\n top: -2px;\n left: 0;\n transform: translate(-100%, 0%);\n display: flex;\n font-size: 14px !important;\n padding: 1px 5px;\n line-height: 22px;\n font-weight: normal !important;\n font-style: normal !important;\n}\n.element-hover-container .element-hover-tools .element-selected-tools-item {\n user-select: none;\n transition: background 20ms ease-in 0s;\n cursor: grab;\n display: flex;\n width: 18px;\n height: 24px;\n border-radius: 3px;\n}\n.element-hover-container .element-hover-tools .element-selected-tools-item .element-selected-tools-item-tooltip {\n display: none;\n opacity: 0;\n}\n.element-hover-container .element-hover-tools .element-selected-tools-item:hover {\n color: var(--hover-color);\n background-color: #efefee;\n}\n.element-hover-container .element-hover-tools .element-selected-tools-item:hover .element-selected-tools-item-tooltip {\n padding: 2px 4px;\n opacity: 1;\n transition: opacity 0.3s;\n position: absolute;\n top: 0px;\n left: 50%;\n transform: translate(-50%, -100%);\n background-color: #0f0f0f;\n color: #e7e7e7;\n display: block;\n font-size: 12px;\n white-space: nowrap;\n border-radius: 5px;\n}\n\n[data-slate-hide-cursor=true] [data-slate-hover=true] {\n cursor: none;\n}\n[data-slate-hide-cursor=true] [data-slate-hover=true]:hover {\n outline: none !important;\n}\n\n[data-slate-hide-cursor=true] .element-tools-container,\n[data-slate-hide-cursor=true] .element-hover-container {\n opacity: 0;\n}';
|
|
@@ -40743,19 +41798,19 @@ const minimaliststyleText = `[data-slate-block=page] {
|
|
|
40743
41798
|
}
|
|
40744
41799
|
|
|
40745
41800
|
[data-slate-hover=true] {
|
|
40746
|
-
z-index:
|
|
41801
|
+
z-index: 3;
|
|
40747
41802
|
}
|
|
40748
41803
|
|
|
40749
41804
|
[data-slate-focus=true] {
|
|
40750
|
-
z-index:
|
|
41805
|
+
z-index: 4;
|
|
40751
41806
|
}
|
|
40752
41807
|
|
|
40753
41808
|
[data-slate-selected=true] {
|
|
40754
|
-
z-index:
|
|
41809
|
+
z-index: 4;
|
|
40755
41810
|
}
|
|
40756
41811
|
|
|
40757
41812
|
[data-slate-hover=true] .element-tools-container {
|
|
40758
|
-
z-index:
|
|
41813
|
+
z-index: 3;
|
|
40759
41814
|
}
|
|
40760
41815
|
|
|
40761
41816
|
[data-slate-selected=true] .element-tools-container {
|
|
@@ -41885,6 +42940,7 @@ const Layout = ({ children }) => {
|
|
|
41885
42940
|
return /* @__PURE__ */ React__default.createElement(MinimalistProvider, null, layoutContent, controller && /* @__PURE__ */ React__default.createElement(SharedComponents.Controller, null), /* @__PURE__ */ React__default.createElement(SharedComponents.Hotkeys, null), /* @__PURE__ */ React__default.createElement(AutoDeselectElement, null), /* @__PURE__ */ React__default.createElement("style", null, styleText$h, " "));
|
|
41886
42941
|
};
|
|
41887
42942
|
const Minimalist = { useCreateConfig, Layout };
|
|
42943
|
+
const IconFontStyle = styleText$h;
|
|
41888
42944
|
export {
|
|
41889
42945
|
AttributeField,
|
|
41890
42946
|
AttributesPanelWrapper,
|
|
@@ -41896,6 +42952,8 @@ export {
|
|
|
41896
42952
|
DraggingProviderContext,
|
|
41897
42953
|
ElementStyles,
|
|
41898
42954
|
IconFont,
|
|
42955
|
+
IconFontStyle,
|
|
42956
|
+
JsonAdapter,
|
|
41899
42957
|
Minimalist,
|
|
41900
42958
|
PluginsProvider,
|
|
41901
42959
|
ResponsiveField,
|
|
@@ -41903,11 +42961,23 @@ export {
|
|
|
41903
42961
|
Retro,
|
|
41904
42962
|
SharedComponents,
|
|
41905
42963
|
WidgetTypeOptions,
|
|
42964
|
+
arrayStringAdapter,
|
|
41906
42965
|
assignIdsToElementTree,
|
|
42966
|
+
colorAdapter,
|
|
42967
|
+
directionAdapter,
|
|
41907
42968
|
enhancer,
|
|
42969
|
+
fontStyleAdapter,
|
|
42970
|
+
fontWeightAdapter,
|
|
42971
|
+
getFallbackValue,
|
|
41908
42972
|
getMergeTagsByType,
|
|
42973
|
+
italicAdapter,
|
|
41909
42974
|
mjmlToJson,
|
|
42975
|
+
pixelAdapter,
|
|
42976
|
+
pixelNumberAdapter,
|
|
41910
42977
|
previewLoadImage,
|
|
42978
|
+
sliderAdapter,
|
|
42979
|
+
useAddBlock,
|
|
42980
|
+
useBlocksDrawer,
|
|
41911
42981
|
useClearCanvas,
|
|
41912
42982
|
useColorContext,
|
|
41913
42983
|
useCopyBlock,
|