@thanhpv102/easy-email-extensions 4.19.15 → 4.19.16
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 +3128 -3159
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/BlockLayer/index.module.scss","../src/BlockLayer/components/EyeIcon/index.tsx","../src/BlockLayer/components/BlockTree/transparentImage.ts","../src/BlockLayer/components/BlockTree/index.tsx","../src/BlockLayer/components/ContextMenu/index.module.scss","../src/components/Form/ImageUploader/index.module.scss","../src/AttributePanel/utils/PromiseEach.ts","../src/AttributePanel/utils/Uploader.ts","../src/AttributePanel/utils/classnames.ts","../src/AttributePanel/utils/previewLoadImage.ts","../src/components/Form/ImageUploader/index.tsx","../src/components/Form/Select.tsx","../src/components/Form/RadioGroup.tsx","../src/components/Form/enhancer.tsx","../src/components/Form/Input.tsx","../src/components/Form/InputWithUnit.tsx","../src/components/Form/CheckBoxGroup.tsx","../src/utils/classnames.ts","../src/components/Form/index.module.scss","../src/components/Form/EditTab.tsx","../src/components/Form/EditGridTab.tsx","../src/components/Form/AutoComplete.tsx","../src/AttributePanel/components/adapter/Json.adapter.ts","../src/AttributePanel/utils/InputNumberAdapter.tsx","../src/AttributePanel/components/adapter/pixel.adapter.ts","../src/AttributePanel/components/adapter/color.adapter.ts","../src/AttributePanel/components/adapter/image-height.adapter.ts","../src/AttributePanel/utils/getImg.ts","../src/AttributePanel/components/provider/PresetColorsProvider/index.tsx","../src/components/Form/ColorPicker/ColorPickerContent.tsx","../src/components/Form/RichTextToolBar/hooks/useRichTextPopupOpen.ts","../src/components/Form/RichTextToolBar/components/RichTextPortalPopup/index.tsx","../src/components/Form/ColorPicker/index.tsx","../src/components/Form/ColorPickerField/index.tsx","../src/components/Form/InlineTextField/index.tsx","../src/components/Form/RichTextToolBar/components/ToolItem/index.tsx","../src/components/Form/RichTextToolBar/components/Link/index.tsx","../src/hooks/useFontFamily.tsx","../src/components/Form/RichTextToolBar/components/FontFamily/index.tsx","../src/AttributePanel/components/UI/Help/index.module.scss","../src/AttributePanel/components/UI/Help/index.tsx","../src/components/Form/AddFont.tsx","../src/AttributePanel/components/attributes/AttributesPanelWrapper/index.tsx","../src/AttributePanel/components/attributes/FontFamily.tsx","../src/AttributePanel/components/blocks/Page/index.tsx","../src/AttributePanel/components/attributes/Padding.tsx","../src/AttributePanel/components/attributes/BackgroundColor.tsx","../src/AttributePanel/components/attributes/Background.tsx","../src/AttributePanel/components/attributes/Border.tsx","../src/AttributePanel/components/attributes/ClassName.tsx","../src/AttributePanel/components/attributes/Iteration.tsx","../src/AttributePanel/components/attributes/Condition.tsx","../src/AttributePanel/components/attributes/CollapseWrapper/index.tsx","../src/AttributePanel/components/blocks/Section/index.tsx","../src/AttributePanel/components/attributes/Width.tsx","../src/AttributePanel/components/attributes/VerticalAlign.tsx","../src/AttributePanel/components/attributes/Align.tsx","../src/AttributePanel/components/attributes/Color.tsx","../src/AttributePanel/components/attributes/Height.tsx","../src/AttributePanel/components/attributes/TextAlign.tsx","../src/AttributePanel/components/attributes/ContainerBackgroundColor.tsx","../src/AttributePanel/components/attributes/LetterSpacing.tsx","../src/AttributePanel/components/attributes/TextDecoration.tsx","../src/AttributePanel/components/attributes/Decoration.tsx","../src/AttributePanel/components/attributes/LineHeight.tsx","../src/AttributePanel/components/attributes/TextTransform.tsx","../src/AttributePanel/components/attributes/Direction.tsx","../src/utils/getContextMergeTags.ts","../src/AttributePanel/components/attributes/MergeTags.tsx","../src/AttributePanel/components/attributes/Link.tsx","../src/AttributePanel/components/attributes/Margin.tsx","../src/AttributePanel/components/attributes/BorderColor.tsx","../src/AttributePanel/components/attributes/FontSize.tsx","../src/AttributePanel/components/attributes/BorderStyle.tsx","../src/AttributePanel/components/attributes/FontStyle.tsx","../src/AttributePanel/components/attributes/NavbarLinkPadding.tsx","../src/AttributePanel/components/attributes/BorderWidth.tsx","../src/AttributePanel/components/attributes/FontWeight.tsx","../src/AttributePanel/components/blocks/Column/index.tsx","../src/components/ShadowDom/index.tsx","../src/AttributePanel/components/UI/HtmlEditor.tsx","../src/AttributePanel/components/blocks/Text/index.tsx","../src/AttributePanel/components/blocks/Image/index.tsx","../src/AttributePanel/components/blocks/Group/index.tsx","../src/AttributePanel/components/blocks/Button/index.tsx","../src/AttributePanel/components/blocks/Divider/index.tsx","../src/AttributePanel/components/blocks/Wrapper/index.tsx","../src/AttributePanel/components/blocks/Spacer/index.tsx","../src/AttributePanel/components/blocks/Raw/index.tsx","../src/AttributePanel/components/blocks/Accordion/index.tsx","../src/AttributePanel/components/blocks/AccordionElement/index.tsx","../src/AttributePanel/components/blocks/AccordionTitle/index.tsx","../src/AttributePanel/components/blocks/AccordionText/index.tsx","../src/AttributePanel/components/blocks/Carousel/index.tsx","../src/AttributePanel/components/blocks/Hero/index.tsx","../src/AttributePanel/components/blocks/Navbar/index.tsx","../src/AttributePanel/components/blocks/Social/index.tsx","../src/AttributePanel/components/blocks/Table/index.tsx","../src/AttributePanel/components/blocks/AdvancedTable/index.tsx","../src/AttributePanel/components/blocks/index.ts","../src/AttributePanel/utils/BlockAttributeConfigurationManager.ts","../src/constants.ts","../src/AttributePanel/components/provider/SelectionRangeProvider/index.tsx","../src/AttributePanel/components/blocks/AdvancedTable/Operation/util.ts","../src/AttributePanel/components/blocks/AdvancedTable/Operation/menu.scss?inline","../src/AttributePanel/components/blocks/AdvancedTable/Operation/tableCellBgSelector.tsx","../src/AttributePanel/components/blocks/AdvancedTable/Operation/tableMenuConfig.ts","../src/AttributePanel/components/blocks/AdvancedTable/Operation/tableOperationMenu.ts","../src/AttributePanel/components/blocks/AdvancedTable/Operation/tableTool.ts","../src/AttributePanel/components/blocks/AdvancedTable/Operation/index.tsx","../src/AttributePanel/AttributePanel.module.scss","../src/AttributePanel/AttributePanel.tsx","../src/components/Form/RichTextToolBar/components/MergeTags/index.tsx","../src/AttributePanel/hooks/useSelectionRange.ts","../src/components/Form/RichTextToolBar/utils/getElementAtRange.ts","../src/components/Form/RichTextToolBar/components/Tools/IconBgColor/index.tsx","../src/components/Form/RichTextToolBar/components/Tools/IconFontColor/index.tsx","../src/components/Form/RichTextToolBar/components/BasicTools.tsx","../src/components/Form/RichTextToolBar/components/Unlink/index.tsx","../src/components/Form/RichTextToolBar/components/StrikeThrough/index.tsx","../src/components/Form/RichTextToolBar/components/Underline/index.tsx","../src/components/Form/RichTextToolBar/components/Italic/index.tsx","../src/components/Form/RichTextToolBar/components/Bold/index.tsx","../src/components/Form/RichTextToolBar/components/FontSize/index.tsx","../src/components/Form/RichTextToolBar/components/Tools/Tools.tsx","../src/components/Form/RichTextToolBar/shadow-dom.scss?inline","../src/components/Form/RichTextToolBar/RichTextToolBar.tsx","../src/components/Form/RichTextField/index.tsx","../src/components/Form/index.tsx","../src/components/AddToCollection/index.tsx","../src/hooks/useAddToCollection.tsx","../src/BlockLayer/components/ContextMenu/index.tsx","../src/BlockLayer/hooks/useAvatarWrapperDrop.ts","../src/utils/getIconNameByBlockType.ts","../src/utils/getBlockTitle.ts","../src/BlockLayer/index.tsx","../src/ShortcutToolbar/components/BlocksPanel/index.module.scss","../src/ShortcutToolbar/utils/BlockMarketManager.ts","../src/ShortcutToolbar/components/BlockMaskWrapper/index.module.scss","../src/ShortcutToolbar/components/BlockMaskWrapper/index.tsx","../src/ShortcutToolbar/components/BlocksPanel/presetTemplate/TextBlockItem/index.tsx","../src/ShortcutToolbar/components/Picture/index.tsx","../src/ShortcutToolbar/utils/getImg.ts","../src/ShortcutToolbar/components/BlocksPanel/presetTemplate/ImageBlockItem/index.tsx","../src/ShortcutToolbar/components/BlocksPanel/presetTemplate/SpacerBlockItem/index.tsx","../src/ShortcutToolbar/components/BlocksPanel/presetTemplate/DividerBlockItem/index.tsx","../src/ShortcutToolbar/components/BlocksPanel/presetTemplate/HeroBlockItem/index.tsx","../src/ShortcutToolbar/components/BlocksPanel/presetTemplate/ButtonBlockItem/index.tsx","../src/ShortcutToolbar/components/BlocksPanel/presetTemplate/AccordionBlockItem/index.tsx","../src/ShortcutToolbar/components/BlocksPanel/presetTemplate/CarouselBlockItem/index.tsx","../src/ShortcutToolbar/components/BlocksPanel/presetTemplate/NavbarBlockItem/index.tsx","../src/ShortcutToolbar/components/BlocksPanel/presetTemplate/SocialBlockItem/index.tsx","../src/ShortcutToolbar/components/BlocksPanel/presetTemplate/WrapperBlockItem/index.tsx","../src/ShortcutToolbar/components/BlocksPanel/presetTemplate/SectionBlockItem/index.tsx","../src/ShortcutToolbar/components/BlocksPanel/presetTemplate/GroupBlockItem/index.tsx","../src/ShortcutToolbar/components/BlocksPanel/presetTemplate/ColumnBlockItem/index.tsx","../src/ShortcutToolbar/components/BlocksPanel/presetTemplate/TableBlockItem/index.tsx","../src/ShortcutToolbar/components/BlocksPanel/presetTemplate/index.tsx","../src/ShortcutToolbar/components/BlocksPanel/index.tsx","../src/ShortcutToolbar/components/DragIcon/index.tsx","../src/ShortcutToolbar/ShortcutToolbar.tsx","../src/utils/parseXMLtoBlock.ts","../src/utils/MjmlToJson.ts","../src/SourceCodePanel/index.module.scss","../src/SourceCodePanel/index.tsx","../src/InteractivePrompt/components/Toolbar.tsx","../src/InteractivePrompt/components/FocusTooltip.tsx","../src/utils/awaitForElement.ts","../src/InteractivePrompt/components/HoverTooltip.tsx","../src/InteractivePrompt/index.tsx","../src/SimpleLayout/index.module.scss","../../../node_modules/.pnpm/@babel+runtime@7.28.6/node_modules/@babel/runtime/helpers/interopRequireDefault.js","../../../node_modules/.pnpm/@rc-component+pagination@1.2.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@rc-component/pagination/lib/locale/en_US.js","../../../node_modules/.pnpm/@rc-component+picker@1.9.0_dayjs@1.11.19_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@rc-component/picker/lib/locale/common.js","../../../node_modules/.pnpm/@rc-component+picker@1.9.0_dayjs@1.11.19_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@rc-component/picker/lib/locale/en_US.js","../../../node_modules/.pnpm/antd@6.3.1_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/antd/lib/time-picker/locale/en_US.js","../../../node_modules/.pnpm/antd@6.3.1_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/antd/lib/date-picker/locale/en_US.js","../../../node_modules/.pnpm/antd@6.3.1_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/antd/lib/calendar/locale/en_US.js","../../../node_modules/.pnpm/antd@6.3.1_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/antd/lib/locale/en_US.js","../../../node_modules/.pnpm/antd@6.3.1_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/antd/locale/en_US.js","../src/MergeTagBadgePrompt/MergeTagBadge.scss?inline","../src/MergeTagBadgePrompt/index.tsx","../src/ConfigurationPopup/index.tsx","../src/SimpleLayout/SimpleLayout.tsx","../src/StandardLayout/index.module.scss","../src/EditPanel/Blocks/index.module.scss","../src/components/Providers/ExtensionProvider.tsx","../src/EditPanel/Blocks/index.tsx","../src/components/FullHeightOverlayScrollbars/index.tsx","../src/EditPanel/index.module.scss","../src/ConfigurationPanel/index.module.scss","../src/ConfigurationPanel/index.tsx","../src/EditPanel/ConfigurationDrawer/index.tsx","../src/EditPanel/index.tsx","../src/StandardLayout/StandardLayout.tsx"],"sourcesContent":[".title {\n display: flex;\n flex: 1;\n justify-content: space-between;\n align-items: center;\n position: relative;\n\n :global {\n .icon-eye {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n right: 30px;\n opacity: 0;\n font-size: 14px;\n color: rgb(var(--primary-6)) !important;\n }\n .icon-eye-invisible {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n font-size: 14px;\n right: 30px;\n opacity: 1 !important;\n color: rgb(var(--primary-6)) !important;\n }\n }\n}\n:global(#BlockLayerManager) {\n width: 100%;\n}\n:global(#BlockLayerManager .arco-tree) {\n width: 100%;\n}\n:global(#BlockLayerManager .arco-tree-node-expanded) {\n overflow: hidden;\n}\n\n:global(#BlockLayerManager .arco-tree-node-selected .arco-tree-node-title) {\n background-color: rgb(var(--primary-1));\n}\n:global(#BlockLayerManager .arco-tree-node-title:hover .icon-eye) {\n opacity: 1;\n}\n:global(#BlockLayerManager .arco-tree-node-indent-block) {\n width: 8px;\n}\n:global(#BlockLayerManager .arco-tree-node-drag-icon) {\n cursor: grab;\n}\n","import { IconFont } from '@thanhpv102/easy-email-editor';\nimport { BasicType } from '@thanhpv102/easy-email-core';\nimport React from 'react';\nimport { IBlockDataWithId } from '../..';\n\nexport function EyeIcon({\n blockData,\n hidden,\n onToggleVisible,\n}: {\n blockData: IBlockDataWithId;\n hidden?: boolean;\n onToggleVisible: (blockData: IBlockDataWithId, ev: React.MouseEvent) => void;\n}) {\n if (hidden)\n return (\n <div style={{ visibility: 'hidden' }}>\n <IconFont iconName='icon-eye' />\n </div>\n );\n if (blockData.type === BasicType.PAGE.toString()) return null;\n\n return blockData.data.hidden ? (\n <IconFont\n onClick={(ev) => onToggleVisible(blockData, ev)}\n iconName='icon-eye-invisible'\n />\n ) : (\n <IconFont\n onClick={(ev) => onToggleVisible(blockData, ev)}\n iconName='icon-eye'\n />\n );\n}\n","export const transparentImage =\r\n 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==';\r\n","import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { Tree } from 'antd';\nimport type { DataNode, TreeProps, EventDataNode } from 'antd/es/tree';\nimport { debounce } from 'lodash';\nimport { transparentImage } from './transparentImage';\n\ninterface TreeNode<T> {\n id: string;\n children?: T[];\n}\n\n// Extended data node interface to include our custom properties\ninterface ExtendedDataNode extends DataNode {\n dataRef?: unknown;\n parent?: unknown;\n parentKey?: string;\n}\n\nexport interface BlockTreeProps<T extends TreeNode<T>> {\n treeData: T[];\n selectedKeys?: string[];\n expandedKeys?: string[];\n onSelect: (selectedId: string) => void;\n onContextMenu?: (nodeData: T, ev: React.MouseEvent) => void;\n onDragStart?: () => void;\n onDragEnd?: () => void;\n onMouseLeave?: () => void;\n onMouseEnter?: (id: string) => void;\n renderTitle: (data: T) => React.ReactNode;\n defaultExpandAll?: boolean;\n allowDrop: (o: {\n dragNode: { type: string } | { key: string };\n dropNode: { dataRef: T; parent: T; key: string };\n dropPosition: number;\n }) =>\n | false\n | {\n key: string;\n position: number;\n };\n\n onDrop: (o: {\n dragNode: { dataRef: T; parent: T; key: string; parentKey: string };\n dropNode: { dataRef: T; parent: T; key: string; parentKey: string };\n dropPosition: number;\n }) => void;\n}\n\nconst img = new Image();\nimg.width = 0;\nimg.height = 0;\nimg.src = transparentImage;\n\n// Transform TreeNode data to DataNode format for antd Tree\nconst transformTreeData = <T extends TreeNode<T> & { parent?: unknown }>(data: T[] | undefined, parentKey?: string): DataNode[] => {\n if (!data || !Array.isArray(data) || data.length === 0) {\n return [];\n }\n\n return data\n .filter((item): item is T => {\n const isValid = Boolean(item && item.id);\n if (!isValid) {\n console.error('[BlockTree] Filtering out item without id:', item);\n }\n return isValid;\n })\n .map((item) => {\n const hasChildren = Array.isArray(item.children) && item.children.length > 0;\n\n const node: ExtendedDataNode = {\n key: item.id,\n title: item.id, // This will be overridden by titleRender\n children: hasChildren ? transformTreeData(item.children as T[], item.id) : undefined,\n dataRef: item as unknown, // Store original data for callbacks\n parentKey: parentKey, // Store parent key for proper tree navigation\n parent: item.parent, // Extract parent from the original data item\n };\n return node;\n });\n};\n\nexport function BlockTree<T extends TreeNode<T>>(props: BlockTreeProps<T>) {\n const [blockTreeRef, setBlockTreeRef] = useState<HTMLElement | null>(null);\n const dragNode = useRef<{\n dataRef: T;\n parent: T;\n key: string;\n parentKey: string;\n } | null>(null);\n\n const { treeData, allowDrop, onContextMenu, selectedKeys } = props;\n const treeDataRef = useRef(treeData);\n const {\n onDragStart: propsDragStart,\n onDrop: propsDrop,\n renderTitle: propsRenderTitle,\n onDragEnd: propsDragEnd,\n onSelect: propsSelect,\n } = props;\n\n const [expandedKeys, setExpandedKeys] = useState<string[]>([]);\n\n const onExpand = useCallback(\n (keys: React.Key[]) => {\n setExpandedKeys(keys.map(key => String(key)));\n },\n [setExpandedKeys]\n );\n\n useEffect(() => {\n if (props.defaultExpandAll) {\n const keys: string[] = [];\n const loop = (data: T) => {\n keys.push(data.id);\n data.children?.forEach(loop);\n };\n treeDataRef.current.forEach(loop);\n setExpandedKeys(keys);\n }\n }, [props.defaultExpandAll]);\n\n useEffect(() => {\n setExpandedKeys((keys) =>\n props.expandedKeys ? [...keys, ...props.expandedKeys] : keys\n );\n }, [props.expandedKeys]);\n\n const onDragStart = useCallback(\n (info: { event: React.DragEvent; node: EventDataNode<DataNode> }) => {\n const { event: e, node } = info;\n e.dataTransfer.dropEffect = 'none';\n // e.dataTransfer.setDragImage(img, 0, 0);\n const extendedNode = node as unknown as ExtendedDataNode;\n const dragNodeData = extendedNode.dataRef as T;\n dragNode.current = {\n dataRef: dragNodeData,\n parent: extendedNode.parent as T,\n key: node.key as string,\n parentKey: extendedNode.parentKey as string,\n };\n propsDragStart?.();\n },\n [propsDragStart]\n );\n\n const onDragMove = useCallback(\n (option: { dragNode: EventDataNode<DataNode>; dropNode: EventDataNode<DataNode>; dropPosition: number }) => {\n if (!dragNode.current) return false;\n const extendedDropNode = option.dropNode as unknown as ExtendedDataNode;\n const dropData = extendedDropNode.dataRef as T;\n const dropId = option.dropNode.key;\n const currentDropData: Parameters<BlockTreeProps<T>['allowDrop']>[0] = {\n dragNode: { key: dragNode.current.key },\n dropNode: {\n dataRef: dropData,\n parent: extendedDropNode.parent as T,\n key: dropId as string,\n },\n dropPosition: option.dropPosition,\n };\n const isAllowDrop = allowDrop(currentDropData);\n\n return Boolean(isAllowDrop);\n },\n [allowDrop]\n );\n\n // Wrapper to match antd Tree's allowDrop signature\n const allowDropWrapper = useCallback(\n (options: unknown) => {\n const typedOptions = options as { dragNode: DataNode; dropNode: DataNode; dropPosition: number };\n // Convert to our expected format\n const convertedOptions = {\n dragNode: typedOptions.dragNode as unknown as EventDataNode<DataNode>,\n dropNode: typedOptions.dropNode as unknown as EventDataNode<DataNode>,\n dropPosition: typedOptions.dropPosition,\n };\n return onDragMove(convertedOptions);\n },\n [onDragMove]\n );\n\n const onDrop = useCallback(\n (info: {\n event: React.DragEvent;\n node: EventDataNode<DataNode>;\n dragNode: EventDataNode<DataNode>;\n dragNodesKeys: React.Key[];\n dropPosition: number;\n dropToGap: boolean;\n }) => {\n const { node: dropNode, dropPosition, event: e } = info;\n e.dataTransfer.dropEffect = 'move';\n if (!dragNode.current || !dropNode) return;\n\n const extendedDropNode = dropNode as unknown as ExtendedDataNode;\n const dropData = extendedDropNode.dataRef as T;\n const currentDropData: Parameters<BlockTreeProps<T>['onDrop']>[0] = {\n dragNode: dragNode.current,\n dropNode: {\n dataRef: dropData,\n parent: extendedDropNode.parent as T,\n key: dropNode.key as string,\n parentKey: extendedDropNode.parentKey as string,\n },\n dropPosition,\n };\n propsDrop(currentDropData);\n },\n [propsDrop]\n );\n\n const titleRender = useCallback(\n (nodeData: DataNode & { dataRef?: T }) => {\n return (\n <div\n style={{ display: 'inline-flex', width: '100%' }}\n onContextMenu={(ev) => onContextMenu && onContextMenu(nodeData.dataRef as T, ev)}\n >\n {propsRenderTitle(nodeData.dataRef as T)}\n </div>\n );\n },\n [onContextMenu, propsRenderTitle]\n );\n\n const onDragEnd = useCallback(() => {\n dragNode.current = null;\n propsDragEnd?.();\n }, [propsDragEnd]);\n\n const onSelect = useCallback(\n (selectedKeys: React.Key[]) => {\n propsSelect(selectedKeys[0] as string);\n },\n [propsSelect]\n );\n\n useEffect(() => {\n if (blockTreeRef) {\n blockTreeRef.addEventListener('dragover', (e) => {\n if (e.dataTransfer) {\n e.dataTransfer.dropEffect = 'move';\n }\n });\n }\n }, [blockTreeRef]);\n\n const transformedTreeData = useMemo(() => transformTreeData(treeData), [treeData]);\n\n return useMemo(\n () => (\n <div ref={setBlockTreeRef} onMouseLeave={props.onMouseLeave}>\n <CacheTree\n selectedKeys={selectedKeys}\n expandedKeys={expandedKeys}\n onExpand={onExpand}\n draggable\n treeData={transformedTreeData}\n blockNode\n onDragEnd={onDragEnd}\n onDragStart={onDragStart}\n onDrop={onDrop}\n allowDrop={allowDropWrapper}\n onSelect={onSelect}\n titleRender={titleRender}\n />\n </div>\n ),\n [\n transformedTreeData,\n props.onMouseLeave,\n expandedKeys,\n selectedKeys,\n onExpand,\n onDragEnd,\n onDragStart,\n onDrop,\n allowDropWrapper,\n onSelect,\n titleRender,\n ]\n );\n}\n\nconst cacheTreeDebounceCallback = debounce(\n (data: TreeProps, setCacheProps: (s: TreeProps) => void) => {\n setCacheProps(data);\n },\n 300\n);\n\nfunction CacheTree(props: TreeProps) {\n const [cacheProps, setCacheProps] = useState(props);\n const lastProps = useRef(props);\n\n useEffect(() => {\n if (lastProps.current.treeData !== props.treeData) {\n lastProps.current = props;\n cacheTreeDebounceCallback(props, setCacheProps);\n } else {\n lastProps.current = props;\n setCacheProps(props);\n }\n }, [props]);\n\n useEffect(() => {\n return () => {\n cacheTreeDebounceCallback.cancel();\n };\n }, []);\n\n return useMemo(() => <Tree {...cacheProps} />, [cacheProps]);\n}\n",".wrap {\n position: fixed;\n left: 500px;\n top: 200px;\n z-index: 9999;\n background-color: var(--color-neutral-2);\n box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.1);\n border-radius: 8px;\n overflow: hidden;\n font-family: 'Lato', sans-serif;\n font-weight: 500;\n\n .listItem {\n padding: 5px 15px;\n display: flex;\n flex-wrap: nowrap;\n cursor: default !important;\n &:hover {\n background-color: var(--color-menu-dark-hover);\n }\n }\n}\n\n.contextmenuMark {\n position: fixed;\n width: 100vw;\n height: 100vh;\n left: 0;\n top: 0;\n z-index: 9998;\n}\n",".container {\n display: flex;\n flex-wrap: wrap;\n}\n.error {\n border-color: #ff4d4f !important;\n}\n.item {\n margin: 0 8px 8px 0;\n border-radius: 4px;\n border: 1px solid #d9d9d9;\n padding: 8px;\n width: 104px;\n height: 104px;\n\n .info {\n position: relative;\n height: 100%;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n &::before {\n content: \" \";\n position: absolute;\n z-index: 1;\n background-color: rgba(0, 0, 0, .5);\n -webkit-transition: all .3s;\n transition: all .3s;\n width: 100%;\n height: 100%;\n opacity: 0;\n }\n\n img {\n width: 100%;\n border: 1px solid #f2f2f2;\n transition: all .3s;\n }\n\n .btn-wrap {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n z-index: 10;\n white-space: nowrap;\n -webkit-transition: all .3s;\n transition: all .3s;\n opacity: 0;\n\n a {\n color: #eee;\n margin: 0 4px;\n\n &:hover {\n color: #fff;\n }\n }\n }\n\n &:hover {\n &::before {\n opacity: 1;\n }\n\n .btn-wrap {\n opacity: 1;\n }\n }\n }\n}\n\n.upload {\n margin: 0 8px 8px 0;\n border: 1px dotted;\n width: 104px;\n height: 104px;\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n cursor: pointer;\n}\n.wrap {\n .urlInput {\n display: flex;\n align-items: center;\n }\n}\n\n.uploadText {\n font-size: 12px;\n font-weight: 500;\n color: #6b6e71;\n margin-top: 8px;\n text-align: center;\n letter-spacing: 0.5px;\n}\n","export function PromiseEach(promiseLikes: PromiseLike<any>[]) {\n const datas: Array<any> = [];\n let count = 0;\n return new Promise((resolve) => {\n promiseLikes.forEach(async (promiseLike) => {\n try {\n const data = await promiseLike;\n datas.push(data);\n } catch (error) {\n datas.push(error);\n }\n finally {\n count++;\n if (count === promiseLikes.length) {\n resolve(true);\n }\n }\n });\n });\n}\n","import { uniqueId } from 'lodash';\nimport { PromiseEach } from './PromiseEach';\n\ninterface Options {\n limit?: number;\n accept?: string;\n minSize?: number;\n maxSize?: number;\n autoUpload?: boolean;\n}\ninterface UploaderOption extends Options {\n limit: number;\n}\n\nexport type UploadItem = {\n idx: string;\n url: string;\n status: 'pending' | 'done' | 'error';\n};\n\nexport type UploaderEventMap = {\n start: (data: UploadItem[]) => void;\n progress: (data: UploadItem[]) => void;\n end: (data: UploadItem[]) => void;\n};\n\ntype UploaderEventMapHandle = {\n [K in keyof UploaderEventMap]: UploaderEventMap[K][];\n};\n\nexport type UploaderServer = (file: File) => Promise<string>;\n\nexport class Uploader {\n private options: UploaderOption;\n private el: HTMLInputElement;\n private uploadServer: UploaderServer;\n private handler: UploaderEventMapHandle = {\n start: [],\n progress: [],\n end: [],\n };\n\n constructor(uploadServer: UploaderServer, options: Options) {\n this.options = {\n limit: 1,\n autoUpload: true,\n ...options,\n };\n this.uploadServer = uploadServer;\n this.el = this.createInput();\n }\n\n private createInput() {\n Array.from(document.querySelectorAll('.uploader-form-input')).forEach(\n (el) => {\n el && document.body.removeChild(el);\n }\n );\n const el = document.createElement('input');\n el.className = 'uploader-form-input';\n el.type = 'file';\n el.style.display = 'block';\n el.style.opacity = '0';\n el.style.width = '0';\n el.style.height = '0';\n el.style.position = 'absolute';\n el.style.top = '0';\n el.style.left = '0';\n el.style.overflow = 'hidden';\n el.multiple = this.options.limit > 1;\n if (this.options.accept) {\n el.accept = this.options.accept;\n }\n return el;\n }\n\n public async uploadFiles(files: File[]) {\n const results = files.map((file) => ({ file }));\n const uploadList: UploadItem[] = results.map((item) => ({\n url: '',\n status: 'pending',\n idx: `uploader-${uniqueId()}`,\n }));\n\n // 开始上传\n this.handler.start.map((fn) => fn(uploadList));\n\n await PromiseEach(\n results.map(async (file, index) => {\n try {\n const url = await this.uploadFile(file);\n uploadList[index].url = url;\n uploadList[index].status = 'done';\n } catch (error) {\n uploadList[index].status = 'error';\n } finally {\n this.handler.progress.map((fn) => fn(uploadList));\n }\n })\n );\n\n // 上传完成\n this.handler.end.map((fn) => fn(uploadList));\n }\n\n private async uploadFile(result: { file: File }) {\n return this.uploadServer(result.file);\n }\n\n private checkFile(files: File[]) {\n const typeError = this.checkTypes(files);\n if (typeError) {\n throw new Error(typeError);\n }\n\n const sizeError = this.checkSize(files);\n if (sizeError) {\n throw new Error(sizeError);\n }\n }\n\n private checkTypes(files: File[]) {\n const accept = this.options.accept;\n if (accept) {\n let fileType = '';\n if (accept.indexOf('image') !== -1) {\n fileType = 'image';\n } else if (accept.indexOf('video') !== -1) {\n fileType = 'video';\n }\n for (const file of files) {\n if (file.type.indexOf(fileType) !== 0) {\n return '上传文件类型错误!';\n }\n }\n }\n return null;\n }\n\n private checkSize(files: File[]) {\n const options = this.options;\n for (const file of files) {\n if (options.minSize && file.size < options.minSize) {\n return `上传文件不能小于 ${options.minSize}`;\n }\n if (options.maxSize && file.size > options.maxSize) {\n return `上传文件不能小于 ${options.maxSize}`;\n }\n }\n return null;\n }\n\n public chooseFile() {\n const el = this.el;\n document.body.appendChild(el);\n el.click();\n\n el.onchange = async (e: any) => {\n let files = e.target.files || [];\n files = Array.prototype.slice.call(files);\n if (files.length === 0) {\n return;\n }\n this.checkFile(files);\n if (this.options.autoUpload) {\n this.uploadFiles(files);\n }\n el.onchange = null;\n el.parentNode && el.parentNode.removeChild(el);\n };\n }\n\n public on<K extends keyof UploaderEventMap>(\n event: K,\n fn: UploaderEventMap[K]\n ) {\n // UploaderEventMapHandle[K] === UploaderEventMap[K][]\n const handler = this.handler[event] as UploaderEventMap[K][];\n handler.push(fn);\n }\n\n public off<K extends keyof UploaderEventMap>(\n event: K,\n fn: UploaderEventMap[K]\n ) {\n const handles = this.handler[event] as UploaderEventMap[K][];\n this.handler[event] = handles.filter(\n (item) => item !== fn\n ) as UploaderEventMapHandle[K];\n }\n}\n","\nexport function classnames(...rest: any[]) {\n return rest.filter(item => typeof item === 'string').join(' ');\n}","\nexport function previewLoadImage(url: string): Promise<HTMLImageElement> {\n return new Promise((resolve) => {\n const img = new Image();\n img.setAttribute('crossOrigin', 'Anonymous');\n img.src = url;\n img.onload = () => resolve(img);\n img.onerror = () => resolve(img);\n });\n}\n","import React, { useCallback, useMemo, useRef, useState } from 'react';\nimport { Button, Dropdown, Input, App, Modal, Popover, Row, Spin } from 'antd';\nimport { DeleteOutlined, EyeOutlined, FileImageOutlined, MailOutlined, PlusOutlined } from '@ant-design/icons';\nimport styles from './index.module.scss';\nimport { Uploader, UploaderServer } from '@extensions/AttributePanel/utils/Uploader';\nimport { classnames } from '@extensions/AttributePanel/utils/classnames';\nimport { previewLoadImage } from '@extensions/AttributePanel/utils/previewLoadImage';\nimport { MergeTags } from '@extensions';\nimport { IconFont, useEditorProps } from '@thanhpv102/easy-email-editor';\n\nexport interface ImageUploaderProps {\n onChange: (val: string) => void;\n value: string;\n label: string;\n uploadHandler?: UploaderServer;\n enableSelectFromLibrary?: boolean;\n autoCompleteOptions?: Array<{ value: string; label: React.ReactNode; }>;\n}\n\nexport function ImageUploader(props: ImageUploaderProps) {\n const { mergeTags, onSelectAssetManager, toggleAssetManager } = useEditorProps();\n const { message } = App.useApp();\n const [isUploading, setIsUploading] = useState(false);\n const [preview, setPreview] = useState(false);\n const uploadHandlerRef = useRef<UploaderServer | null | undefined>(\n props.uploadHandler,\n );\n\n const enableSelectFromLibrary = props.enableSelectFromLibrary ?? false;\n\n const onChange = props.onChange;\n\n // Khi chọn ảnh từ AssetManager, gọi trực tiếp callback nếu có\n const handleSelectAssetManager = useCallback(async () => {\n if (onSelectAssetManager) {\n const result = await onSelectAssetManager();\n if (typeof result === 'string' && result) {\n props.onChange(result);\n await previewLoadImage(result);\n }\n } else {\n toggleAssetManager?.(true);\n }\n }, [onSelectAssetManager, toggleAssetManager, props]);\n\n const onUpload = useCallback(() => {\n if (isUploading) {\n return message.warning(t('Uploading...'));\n }\n if (!uploadHandlerRef.current) return;\n\n const uploader = new Uploader(uploadHandlerRef.current, {\n limit: 1,\n accept: 'image/*',\n });\n\n uploader.on('start', () => {\n setIsUploading(true);\n\n uploader.on('end', (data) => {\n const url = data[0]?.url;\n if (url) {\n onChange(url);\n }\n setIsUploading(false);\n });\n });\n\n uploader.chooseFile();\n }, [isUploading, onChange, message]);\n\n const onPaste = useCallback(\n async (e: React.ClipboardEvent<HTMLInputElement>) => {\n if (!uploadHandlerRef.current) return;\n const clipboardData = e.clipboardData;\n\n for (let i = 0; i < clipboardData.items.length; i++) {\n const item = clipboardData.items[i];\n if (item.kind == 'file') {\n const blob = item.getAsFile();\n\n if (!blob || blob.size === 0) {\n return;\n }\n try {\n setIsUploading(true);\n const picture = await uploadHandlerRef.current(blob);\n await previewLoadImage(picture);\n props.onChange(picture);\n setIsUploading(false);\n } catch (error: unknown) {\n const errorMessage = error instanceof Error ? error.message :\n (typeof error === 'string' ? error : t('Upload failed'));\n message.error(errorMessage);\n setIsUploading(false);\n }\n }\n }\n },\n [props, message],\n );\n\n const onRemove = useCallback(() => {\n props.onChange('');\n }, [props]);\n\n const content = useMemo(() => {\n if (isUploading) {\n return (\n <div className={styles['item']}>\n <div className={classnames(styles['info'])}>\n <Spin />\n <div className={styles['btn-wrap']} />\n </div>\n </div>\n );\n }\n\n if (!props.value) {\n if (enableSelectFromLibrary) {\n return (\n <div className={styles['upload']} onClick={handleSelectAssetManager}>\n <FileImageOutlined />\n <div className={styles['uploadText']}>Select from Library</div>\n </div>\n );\n } else {\n return (\n <div className={styles['upload']} onClick={onUpload}>\n <PlusOutlined />\n <div>Upload</div>\n </div>\n );\n }\n }\n\n return (\n <div className={styles['item']}>\n <div className={classnames(styles['info'])}>\n <img src={props.value} alt={t('Uploaded image')} />\n <div className={styles['btn-wrap']}>\n <a title={t('Preview')} onClick={() => setPreview(true)}>\n <EyeOutlined />\n </a>\n <a title={t('Remove')} onClick={() => onRemove()}>\n <DeleteOutlined />\n </a>\n </div>\n </div>\n </div>\n );\n }, [isUploading, onRemove, onUpload, props.value, enableSelectFromLibrary, handleSelectAssetManager, toggleAssetManager]);\n\n const onInputChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n onChange(e.target.value);\n },\n [onChange]\n );\n\n if (!props.uploadHandler) {\n return <Input value={props.value} onChange={onInputChange} />;\n }\n\n return (\n <div className={styles.wrap}>\n <div className={styles['container']}>\n {content}\n <Row style={{ width: '100%' }}>\n {mergeTags && (\n <Popover\n trigger=\"click\"\n content={<MergeTags value={props.value} onChange={onChange} />}\n >\n <Button icon={<IconFont iconName=\"icon-merge-tags\" />} />\n </Popover>\n )}\n <Input\n style={{ flex: 1 }}\n onPaste={onPaste}\n value={props.value}\n onChange={onInputChange}\n disabled={isUploading}\n />\n {props.autoCompleteOptions && (\n <Dropdown\n placement=\"bottomRight\"\n menu={{\n items: props.autoCompleteOptions.map((item, index) => ({\n key: index.toString(),\n label: (\n <div style={{ display: 'flex', alignItems: 'center' }}>\n <img\n src={item.value}\n alt={`Option ${index + 1}`}\n style={{ width: 20, height: 20 }}\n />\n  <span>{item.label}</span>\n </div>\n ),\n })),\n onClick: ({ key }) => {\n if (!props.autoCompleteOptions) return;\n onChange(props.autoCompleteOptions[+key]?.value);\n },\n }}\n >\n <Button icon={<MailOutlined />} />\n </Dropdown>\n )}\n </Row>\n </div>\n <Modal open={preview} footer={null} onCancel={() => setPreview(false)}>\n <img alt={t('Preview')} style={{ width: '100%' }} src={props.value} />\n </Modal>\n </div>\n );\n}\n","import { Select as AntSelect, SelectProps as AntSelectProps } from 'antd';\nimport { merge } from 'lodash';\nimport React from 'react';\n\nexport interface SelectProps extends AntSelectProps {\n options: Array<{ value: string; label: React.ReactNode; }>;\n onChange?: (val: string) => void;\n value: string;\n}\n\nexport function Select(props: SelectProps) {\n return (\n <AntSelect\n {...props}\n classNames={{\n popup: {\n root: 'easy-email-overlay',\n },\n }}\n style={merge({ width: '100%' }, props.style)}\n value={props.value}\n onChange={props.onChange}\n >\n {props.options.map((item, index) => (\n <AntSelect.Option key={index} value={item.value}>\n {item.label}\n </AntSelect.Option>\n ))}\n </AntSelect>\n );\n}\n","import { Radio } from 'antd';\nimport type { RadioGroupProps as AntdRadioGroupProps } from 'antd';\nimport { merge } from 'lodash';\nimport React from 'react';\nimport { Stack } from '@thanhpv102/easy-email-editor';\n\nexport interface RadioGroupProps extends Omit<AntdRadioGroupProps, 'onChange' | 'value' | 'options'> {\n options: Array<{ value: string; label: React.ReactNode }>;\n onChange?: (value: string) => void;\n value?: string;\n type?: 'radio' | 'button';\n vertical?: boolean;\n}\n\nexport function RadioGroup(props: RadioGroupProps) {\n const { vertical, options, onChange, value, style, ...rest } = props;\n\n return (\n <Radio.Group\n {...rest}\n style={merge({ width: '100%' }, style)}\n value={value}\n onChange={(e) => onChange?.(String(e.target.value))}\n >\n <Stack vertical={vertical} spacing='extraTight'>\n {options.map((item, index) => (\n <Radio key={index} value={item.value}>\n {item.label}\n </Radio>\n ))}\n </Stack>\n </Radio.Group>\n );\n}\n","import { Field, UseFieldConfig } from '@thanhpv102/easy-email-editor';\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { useRefState } from '@thanhpv102/easy-email-editor';\nimport { debounce } from 'lodash';\nimport { Form, FormItemProps } from 'antd';\n\nexport interface EnhancerProps {\n name: string;\n onChangeAdapter?: (value: any) => any;\n validate?: (value: any) => string | undefined | Promise<string | undefined>;\n config?: UseFieldConfig;\n changeOnBlur?: boolean;\n formItem?: FormItemProps;\n label?: FormItemProps['label'];\n inline?: boolean;\n equalSpacing?: boolean;\n required?: boolean;\n autoComplete?: 'on' | 'off';\n style?: React.CSSProperties;\n helpText?: React.ReactNode;\n debounceTime?: number;\n labelHidden?: boolean;\n}\n\nconst parse = (v: any) => v;\nexport default function enhancer<P extends { onChange?: (...rest: any) => any }>(\n Component: React.FC<any>,\n changeAdapter: (args: Parameters<NonNullable<P['onChange']>>) => any,\n option?: { debounceTime: number },\n) {\n return (props: EnhancerProps & Omit<P, 'value' | 'onChange' | 'mutators'>) => {\n const {\n name,\n validate,\n onChangeAdapter,\n changeOnBlur,\n inline,\n equalSpacing,\n formItem,\n label,\n required,\n style,\n helpText,\n autoComplete,\n labelHidden,\n ...rest\n } = props;\n\n const debounceTime = props.debounceTime || option?.debounceTime || 300;\n\n const config = useMemo(() => {\n return {\n ...props.config,\n validate: validate,\n parse: props.config?.parse || parse,\n };\n }, [props.config, validate]);\n\n const [currentValue, setCurrentValue] = useState<any>(undefined);\n const currentValueRef = useRefState(currentValue);\n const isFocusedRef = useRef(false);\n\n const layoutStyle = useMemo((): FormItemProps => {\n if (equalSpacing) {\n return {\n labelCol: {\n span: 11,\n style: {\n textAlign: 'left',\n paddingRight: 0,\n },\n },\n wrapperCol: {\n span: 11,\n offset: 1,\n style: {\n textAlign: 'right',\n },\n },\n };\n }\n if (inline) {\n return {\n labelCol: {\n span: 7,\n style: {\n textAlign: 'right',\n paddingRight: 0,\n },\n },\n wrapperCol: {\n span: 16,\n offset: 1,\n style: {},\n },\n };\n }\n\n return {\n labelCol: {\n span: 24,\n style: {\n paddingRight: 0,\n },\n },\n wrapperCol: {\n span: 24,\n },\n };\n }, [equalSpacing, inline]);\n\n return useMemo(() => {\n return (\n <Field\n name={name}\n {...config}\n >\n {({ input: { onBlur, onChange, value }, meta }) => {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n\n const debounceCallbackChange = useCallback(\n debounce(\n val => {\n onChange(val);\n onBlur();\n },\n debounceTime,\n {\n // maxWait: 500,\n },\n ),\n [onChange, onBlur],\n );\n\n const onFieldChange: P['onChange'] = useCallback(\n (e: any) => {\n const adapted = onChangeAdapter\n ? onChangeAdapter(changeAdapter(e))\n : changeAdapter(e);\n\n // If the adapter returned a synthetic/native Event, extract its value\n // so we never show [object Object] in the input.\n let newVal: any;\n if (\n adapted !== null &&\n typeof adapted === 'object' &&\n !Array.isArray(adapted) &&\n 'target' in adapted &&\n (adapted as { target: unknown }).target !== null\n ) {\n const rawVal = (adapted as { target: { value: unknown } }).target.value;\n newVal = rawVal == null ? '' : String(rawVal);\n } else if (Array.isArray(adapted) || (adapted !== null && typeof adapted === 'object')) {\n newVal = adapted;\n } else if (typeof adapted === 'boolean') {\n // Keep boolean values as-is (for Switch, Checkbox, etc.)\n newVal = adapted;\n } else {\n newVal = adapted == null ? '' : String(adapted);\n }\n\n setCurrentValue(newVal);\n if (!changeOnBlur) {\n debounceCallbackChange(newVal);\n }\n },\n [debounceCallbackChange],\n );\n\n const onFieldBlur = useCallback(() => {\n isFocusedRef.current = false;\n if (changeOnBlur) {\n onChange(currentValueRef.current);\n onBlur();\n }\n }, [onBlur, onChange]);\n\n const onFieldFocus = useCallback(() => {\n isFocusedRef.current = true;\n }, []);\n\n useEffect(() => {\n // Only sync form value → input when the input is not focused.\n // While focused the user is typing; overwriting currentValue would\n // cause visible glitches and lost keystrokes.\n if (!isFocusedRef.current) {\n if (Array.isArray(value) || (value !== null && typeof value === 'object')) {\n setCurrentValue(value);\n } else if (typeof value === 'boolean') {\n // Keep boolean values as-is (for Switch, Checkbox, etc.)\n setCurrentValue(value);\n } else {\n setCurrentValue(value == null ? '' : String(value));\n }\n }\n }, [value]);\n\n return (\n <Form.Item\n style={{\n ...style,\n margin: '0px',\n }}\n rules={required ? [{ required: true }] : undefined}\n {...layoutStyle}\n {...formItem}\n label={labelHidden ? undefined : label || formItem?.label}\n labelAlign='left'\n validateStatus={meta.touched && meta.error ? 'error' : undefined}\n help={meta.touched && meta.error ? meta.error : helpText}\n >\n <Component\n autoComplete={autoComplete}\n {...rest}\n name={name}\n checked={currentValue}\n value={currentValue}\n onChange={onFieldChange}\n onBlur={onFieldBlur}\n onFocus={onFieldFocus}\n />\n </Form.Item>\n );\n }}\n </Field>\n );\n }, [\n autoComplete,\n changeOnBlur,\n config,\n currentValue,\n currentValueRef,\n debounceTime,\n formItem,\n helpText,\n label,\n labelHidden,\n layoutStyle,\n name,\n onChangeAdapter,\n required,\n rest,\n style,\n ]);\n };\n}\n","import { Input as AntInput, InputProps as AntInputProps } from 'antd';\nimport React, { useCallback } from 'react';\n\nexport interface InputProps extends Omit<AntInputProps, 'onChange'> {\n quickchange?: boolean;\n value: string;\n onChange: (val: string) => void;\n}\n\nexport function Input(props: InputProps) {\n const {\n quickchange,\n value = '',\n onKeyDown: onPropsKeyDown,\n onChange: propsOnChange,\n } = props;\n\n const onChange = useCallback(\n (val: string) => {\n propsOnChange(val);\n },\n [propsOnChange]\n );\n\n const onKeyDown = useCallback(\n (ev: React.KeyboardEvent<HTMLInputElement>) => {\n if (onPropsKeyDown) {\n onPropsKeyDown?.(ev);\n }\n\n if (quickchange) {\n let step = 0;\n if (ev.key === 'ArrowUp') {\n step = 1;\n }\n if (ev.key === 'ArrowDown') {\n step = -1;\n }\n\n if (step) {\n if (/^\\d+/.test(value)) {\n ev.preventDefault();\n onChange(\n String(value).replace(/^(\\d+)/, (_, match) => {\n return (Number(match) + step).toString();\n })\n );\n }\n }\n }\n },\n [onPropsKeyDown, quickchange, value, onChange]\n );\n\n return (\n <AntInput\n {...{ ...props, quickchange: undefined }}\n onChange={(e) => onChange(e.target.value)}\n onKeyDown={onKeyDown}\n />\n );\n}\n","import React from 'react';\r\nimport { Input } from 'antd';\r\nimport type { InputProps } from 'antd';\r\n\r\nexport interface InputWithUnitProps extends Omit<InputProps, 'onChange'> {\r\n value: string;\r\n onChange: (val: string) => void;\r\n unitOptions?: Array<{ value: string; label: string; }> | 'default' | 'percent';\r\n quickchange?: boolean;\r\n}\r\n\r\nexport function InputWithUnit(props: InputWithUnitProps) {\r\n const {\r\n value = '',\r\n onKeyDown,\r\n onChange,\r\n unitOptions: _unitOptions,\r\n quickchange: _quickchange,\r\n ...restProps\r\n } = props;\r\n\r\n // Handle input change\r\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\r\n onChange(e.target.value);\r\n };\r\n\r\n return (\r\n <Input\r\n value={value}\r\n onChange={handleChange}\r\n onKeyDown={onKeyDown}\r\n {...restProps}\r\n />\r\n );\r\n}\r\n","import { merge } from 'lodash';\nimport React from 'react';\nimport { Stack } from '@thanhpv102/easy-email-editor';\nimport { Checkbox } from 'antd';\nimport type { CheckboxGroupProps as AntdCheckboxGroupProps } from 'antd/es/checkbox';\n\nexport interface CheckboxGroupProps extends Omit<AntdCheckboxGroupProps, 'onChange' | 'value'> {\n options: Array<{ value: string; label: React.ReactNode; }>;\n onChange?: (values: string[]) => void;\n value?: string[];\n style?: Partial<React.CSSProperties>;\n checkboxStyle?: Partial<React.CSSProperties>;\n vertical?: boolean;\n}\n\nexport function CheckBoxGroup(props: CheckboxGroupProps) {\n const { vertical = false, ...rest } = props;\n return (\n <Checkbox.Group\n style={merge({ width: '100%' }, rest.style)}\n value={rest.value}\n onChange={rest.onChange}\n >\n <Stack vertical={vertical} spacing=\"extraTight\">\n {rest.options.map((item, index) => (\n <Checkbox style={rest.checkboxStyle} key={index} value={item.value}>\n {item.label}\n </Checkbox>\n ))}\n </Stack>\n </Checkbox.Group>\n );\n}\n","export function classnames(...rest: any[]) {\n return rest.filter((item) => typeof item === 'string').join(' ');\n}\n",".helperText {\n color: rgba(109, 113, 117, 1);\n font-weight: 400;\n line-height: 1.3;\n text-transform: none;\n letter-spacing: normal;\n}\n\n.label-hidden {\n position: absolute !important;\n top: 0;\n clip: rect(1px, 1px, 1px, 1px) !important;\n overflow: hidden !important;\n height: 1px !important;\n width: 1px !important;\n padding: 0 !important;\n border: 0 !important;\n}\n\n.editTab {\n :global {\n .arco-tabs-content {\n border: none;\n }\n .arco-tabs-header-nav {\n padding-right: 15px;\n }\n }\n}\n\n.inputWithUnit {\n :global {\n .arco-select-view {\n padding: 0px 5px !important;\n text-align: center;\n .arco-select-view-value {\n overflow: visible;\n }\n }\n }\n}\n\n.inputWithUnitSelectOption {\n padding: 0px 5px !important;\n text-align: center !important;\n}\n\n.colorPicker {\n :global(.sketch-picker .flexbox-fix:nth-child(3)) {\n display: none !important;\n }\n}\n\n// Global styles cho Antd Select/Radio/Checkbox dropdown\n:global {\n .ant-select {\n font-size: 12px !important;\n }\n\n .ant-select-selector {\n height: 26px !important;\n padding: 2px 6px !important;\n font-size: 12px !important;\n }\n\n .ant-select-selection-item {\n font-size: 12px !important;\n line-height: 26px !important;\n }\n\n .ant-select-dropdown {\n font-size: 12px !important;\n }\n\n .ant-select-dropdown .ant-select-item {\n font-size: 12px !important;\n }\n\n .ant-select-dropdown .ant-select-item-option {\n font-size: 12px !important;\n padding: 6px 12px !important;\n }\n\n .ant-radio-group {\n font-size: 12px !important;\n }\n\n .ant-checkbox-group {\n font-size: 12px !important;\n }\n\n .easy-email-overlay {\n font-size: 12px !important;\n }\n\n .easy-email-overlay .ant-select-selector {\n height: 26px !important;\n padding: 2px 6px !important;\n }\n\n .easy-email-overlay .ant-select-item-option {\n font-size: 12px !important;\n padding: 6px 12px !important;\n }\n}\n\n:global(.attributePanel) {\n :global {\n .arco-input-wrapper {\n padding: 4px 6px !important;\n }\n\n .arco-input {\n font-size: 12px !important;\n height: 26px !important;\n line-height: 26px !important;\n }\n\n .ant-input {\n font-size: 12px !important;\n height: 26px !important;\n line-height: 26px !important;\n }\n\n input::placeholder {\n font-size: 12px !important;\n }\n\n .ant-input::placeholder {\n font-size: 12px !important;\n }\n\n .arco-form-item-label-content {\n font-size: 12px !important;\n }\n\n .ant-form-item-label-content {\n font-size: 12px !important;\n }\n\n .ant-form-item-label > label {\n font-size: 12px !important;\n }\n\n // Thu nhỏ help text\n .ant-form-item-explain {\n font-size: 12px !important;\n }\n\n .arco-form-item-message {\n font-size: 12px !important;\n }\n\n .ant-form-item-label {\n padding: 0 !important;\n }\n\n textarea {\n font-size: 12px !important;\n line-height: 1.4 !important;\n }\n\n .arco-select {\n font-size: 12px !important;\n }\n\n .arco-select-view {\n height: 26px !important;\n padding: 4px 6px !important;\n font-size: 12px !important;\n }\n\n // Antd select option\n .ant-select-item {\n font-size: 12px !important;\n }\n\n .ant-select-item-option {\n font-size: 12px !important;\n padding: 6px 12px !important;\n }\n\n // Antd select dropdown\n .ant-select-dropdown {\n font-size: 12px !important;\n }\n\n .ant-select-dropdown .ant-select-item-option {\n font-size: 12px !important;\n padding: 6px 12px !important;\n }\n\n // Antd radio\n .ant-radio {\n font-size: 12px !important;\n }\n\n .ant-radio-wrapper {\n font-size: 12px !important;\n }\n\n .ant-radio-inner {\n width: 16px !important;\n height: 16px !important;\n }\n\n // Antd checkbox\n .ant-checkbox {\n font-size: 12px !important;\n }\n\n .ant-checkbox-wrapper {\n font-size: 12px !important;\n }\n\n .ant-checkbox-inner {\n width: 16px !important;\n height: 16px !important;\n }\n\n .arco-color-picker-trigger {\n width: 28px !important;\n height: 28px !important;\n }\n\n .arco-btn {\n padding: 4px 8px !important;\n height: 28px !important;\n font-size: 12px !important;\n }\n\n .ant-btn {\n padding: 4px 8px !important;\n font-size: 12px !important;\n height: 28px !important;\n }\n\n .ant-btn-sm {\n padding: 4px 8px !important;\n height: 28px !important;\n font-size: 12px !important;\n }\n }\n}\n","import { Tabs } from 'antd';\nimport type { TabsProps } from 'antd';\nimport { classnames } from '@extensions/utils/classnames';\nimport React, { useState } from 'react';\nimport styles from './index.module.scss';\n\nexport interface EditTabProps<T = unknown>\n extends Omit<TabsProps, 'onChange' | 'items' | 'type' | 'activeKey' | 'onEdit'> {\n value: Array<T>;\n renderItem: (item: T, index: number) => React.ReactNode;\n onChange: (vals: Array<T>) => void;\n additionItem: T;\n label: string;\n}\n\nexport function EditTab<T = unknown>(props: EditTabProps<T>) {\n const { value, additionItem, label, renderItem, onChange, tabPlacement, ...restProps } = props;\n const [activeKey, setActiveKey] = useState('0');\n\n const onEdit = (targetKey: React.MouseEvent | React.KeyboardEvent | string, action: 'add' | 'remove') => {\n if (action === 'add') {\n const newKey = value.length.toString();\n setActiveKey(newKey);\n onChange([...value, additionItem]);\n } else if (action === 'remove' && typeof targetKey === 'string') {\n const removeIndex = parseInt(targetKey, 10);\n if (removeIndex < parseInt(activeKey, 10)) {\n setActiveKey((parseInt(activeKey, 10) - 1).toString());\n }\n if (removeIndex === parseInt(activeKey, 10)) {\n setActiveKey(removeIndex > 0 ? (removeIndex - 1).toString() : '0');\n }\n onChange(value.filter((_, index) => index !== removeIndex));\n }\n };\n\n const items = (Array.isArray(value) ? value : []).map((item, index) => ({\n key: index.toString(),\n label: `${label || 'Tab'} ${index + 1}`,\n children: (\n <div style={{ paddingLeft: 12 }}>\n {renderItem(item, index)}\n </div>\n ),\n }));\n\n return (\n <Tabs\n {...restProps}\n className={classnames(styles.editTab)}\n style={{ border: 'none' }}\n type=\"editable-card\"\n activeKey={activeKey}\n tabPlacement={tabPlacement}\n items={items}\n onEdit={onEdit}\n onChange={setActiveKey}\n />\n );\n}\n","import { Card, Space, TabsProps, Typography } from 'antd';\nimport { CloseOutlined, PlusOutlined } from '@ant-design/icons';\nimport { cloneDeep } from 'lodash';\nimport React from 'react';\n\n\nexport interface EditGridTabProps<T = unknown>\n extends Omit<TabsProps, 'onChange'> {\n value: Array<T>;\n renderItem: (item: T, index: number) => React.ReactNode;\n onChange: (vals: Array<T>) => unknown;\n additionItem?: T;\n label: string;\n}\nexport function EditGridTab<T = unknown>(props: EditGridTabProps<T>) {\n const { value, additionItem } = props;\n\n const onAdd = (index: number) => {\n let newItem = additionItem || cloneDeep(value[index]);\n value.splice(index + 1, 0, newItem);\n props.onChange([...value]);\n };\n\n const onDelete = (index: number) => {\n props.onChange(value.filter((_, vIndex) => Number(index) !== vIndex));\n };\n return (\n <Card\n variant=\"borderless\"\n >\n {(Array.isArray(value) ? value : []).map((item, index) => (\n <Card.Grid style={{ width: '100%' }} key={index}>\n <Card title={(\n <Space>\n <Typography.Text>\n {'Item'} {index + 1}\n </Typography.Text>\n\n </Space>\n )} extra={(\n <Space size=\"large\">\n <PlusOutlined style={{ color: '#000', cursor: 'pointer' }} onClick={() => onAdd(index)} />\n <CloseOutlined style={{ color: '#000', cursor: 'pointer' }} onClick={() => onDelete(index)} />\n </Space>\n )}\n >\n {props.renderItem(item, index)}\n </Card>\n </Card.Grid>\n ))}\n </Card>\n );\n\n}\n","import React, { useMemo } from 'react';\r\nimport { AutoComplete as AntdAutoComplete } from 'antd';\r\nimport type { AutoCompleteProps as AntdAutoCompleteProps } from 'antd';\r\nimport { isString } from 'lodash';\r\n\r\nexport interface AutoCompleteProps\r\n extends Omit<AntdAutoCompleteProps, 'onChange' | 'options'> {\r\n quickchange?: boolean;\r\n value: string;\r\n options: Array<{ value: string | number; label: string | number }>;\r\n onChange: (val: string) => void;\r\n showSearch?: boolean;\r\n}\r\n\r\nexport function AutoComplete(props: AutoCompleteProps) {\r\n const options = useMemo(() => {\r\n const selectedValue = (props.value || '').toLowerCase();\r\n return props.options\r\n .filter(item => {\r\n return (\r\n (isString(item.value) && item.value.toLowerCase().startsWith(selectedValue)) ||\r\n (isString(item.label) && item.label.toLowerCase().startsWith(selectedValue))\r\n );\r\n })\r\n .map(item => ({\r\n value: String(item.value),\r\n label: String(item.label)\r\n }));\r\n }, [props.options, props.value]);\r\n\r\n return (\r\n <AntdAutoComplete\r\n {...props}\r\n options={options}\r\n onChange={props.onChange}\r\n />\r\n );\r\n}\r\n","import { isString } from 'lodash';\n\nexport const JsonAdapter = {\n format(obj: any) {\n return isString(obj) ? obj : JSON.stringify(obj, null, 2);\n },\n parse(val: string) {\n if (!val) return undefined;\n try {\n return JSON.parse(JSON.stringify(eval('(' + val + ')')));\n } catch (error) {}\n return val;\n },\n};\n","export function isNumber(num: any): num is number {\n if (typeof num !== 'string' && typeof num !== 'number') return false;\n return new RegExp('^(\\\\-|\\\\+)?\\\\d+(\\\\.\\\\d+)?$').test(num.toString());\n}\n\nexport function InputNumberAdapter(val: string | number) {\n return isNumber(Number(val)) ? Number(val) : val;\n}\n","import { isNumber } from '@extensions/AttributePanel/utils/InputNumberAdapter';\nimport { isString } from 'lodash';\n\nexport const pixelAdapter = {\n format(val: string) {\n if (!isString(val) && !val) return '';\n val = val.toString();\n if (/^\\d+px$/.test(val.trim())) return val.trim().replace('px', '');\n return val.trim();\n },\n parse(val: string | number) {\n if (!isString(val) && !isNumber(val)) return undefined;\n val = val.toString().trim();\n if (!val) return undefined;\n if (/^\\d+$/.test(val)) return val + 'px';\n return val;\n },\n};\n","import { isString } from 'lodash';\nimport Color from 'color';\n\nexport const colorAdapter = {\n format(val: string) {\n if (!isString(val) && !val) return '';\n val = val.toString();\n if (val.length === 7 && val.startsWith('#')) return val.replace('#', '');\n return val;\n },\n parse(val: string) {\n if (!isString(val)) return undefined;\n val = val.toString().trim();\n if (!val) return undefined;\n try {\n if (val.length === 6 && Color(`#${val}`).hex()) return `#${val}`;\n } catch (error) {\n console.error('err colorAdapter', val, error);\n }\n return val;\n },\n};\n","import { isNumber } from '@extensions/AttributePanel/utils/InputNumberAdapter';\nimport { isString } from 'lodash';\n\nexport const imageHeightAdapter = {\n format(val: string) {\n if (!isString(val) && !val) return '';\n val = val.toString();\n if (val === 'auto') return undefined;\n\n if (/^\\d+px$/.test(val.trim())) return val.trim().replace('px', '');\n return val.trim();\n },\n parse(val: string | number) {\n if (!isString(val) && !isNumber(val)) return undefined;\n val = val.toString().trim();\n if (!val) return undefined;\n if (/^\\d+$/.test(val)) return val + 'px';\n return val;\n },\n};\n","import { ImageManager } from '@thanhpv102/easy-email-core';\n\nconst defaultImagesMap = {\n IMAGE_59:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/06ca521d-9728-4de6-a709-1b75a828bfc3-2a9b1224-3d71-43b8-b52f-e7cdcdc9107b.png',\n AttributePanel_01:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/e22f78f2-aa76-408d-ba94-c95c7abe1908-image.png',\n AttributePanel_02:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/3e952a6e-2506-470e-b395-3e0d995157c5.png',\n AttributePanel_03:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/Fi_vI4vyLhTM-Tp6ivq4dR_ieGHk.png',\n};\n\nImageManager.add(defaultImagesMap);\n\nexport function getImg(name: keyof typeof defaultImagesMap) {\n return ImageManager.get(name);\n}\n","import React, { useCallback, useMemo, useRef } from 'react';\nimport { useLocalStorage } from 'react-use';\nimport { debounce } from 'lodash';\nimport { useRefState } from '@thanhpv102/easy-email-editor';\n\nconst defaultPresetColor: string[] = [\n '#000000',\n '#FFFFFF',\n '#9b9b9b',\n '#d0021b',\n '#4a90e2',\n '#7ed321',\n '#bd10e0',\n '#f8e71c',\n];\n\nconst CURRENT_COLORS_KEY = 'CURRENT_COLORS_KEY';\nconst MAX_RECORD_SIZE = 20;\n\nexport const PresetColorsContext = React.createContext<{\n colors: string[];\n addCurrentColor: (color: string) => void;\n}>({\n colors: [],\n addCurrentColor: () => {},\n});\n\nexport const PresetColorsProvider: React.FC<{\n children: React.ReactNode | React.ReactElement;\n}> = props => {\n const [currentColors, setCurrentColors] = useLocalStorage<string[]>(\n CURRENT_COLORS_KEY,\n defaultPresetColor,\n );\n const currentColorsRef = useRefState(currentColors);\n\n const colorDivRef = useRef(document.createElement('div'));\n\n const addCurrentColor = useCallback(\n debounce((newColor: string) => {\n colorDivRef.current.style.color = '';\n colorDivRef.current.style.color = newColor;\n if (colorDivRef.current.style.color) {\n if (currentColorsRef.current!.includes(newColor)) return;\n const newColors = [...new Set([...currentColorsRef.current!, newColor])]\n .filter(Boolean)\n .slice(-MAX_RECORD_SIZE);\n\n setCurrentColors(newColors);\n }\n }, 500),\n [currentColorsRef, setCurrentColors],\n );\n\n const value = useMemo(() => {\n return {\n colors: currentColors!,\n addCurrentColor,\n };\n }, [addCurrentColor, currentColors]);\n\n return useMemo(() => {\n return (\n <PresetColorsContext.Provider value={value}>\n {props.children}\n </PresetColorsContext.Provider>\n );\n }, [props.children, value]);\n};\n","import { Button, Space } from 'antd';\r\nimport React, { useContext, useEffect, useMemo, useState } from 'react';\r\n\r\nimport styles from '../index.module.scss';\r\nimport Color from 'color';\r\nimport { PresetColorsContext } from '@extensions/AttributePanel/components/provider/PresetColorsProvider';\r\n\r\nexport interface ColorPickerContentProps {\r\n onChange: (val: string) => void;\r\n value: string;\r\n}\r\n\r\nconst transparentColor = 'rgba(0,0,0,0)';\r\n\r\nexport function ColorPickerContent(props: ColorPickerContentProps) {\r\n const { colors: presetColors } = useContext(PresetColorsContext);\r\n\r\n const { onChange } = props;\r\n const [color, setColor] = useState(props.value);\r\n\r\n useEffect(() => {\r\n setColor(props.value);\r\n }, [props.value]);\r\n\r\n const presetColorList = useMemo(() => {\r\n return [...presetColors.filter(item => item !== transparentColor).slice(-14)];\r\n }, [presetColors]);\r\n\r\n let adapterColor = color;\r\n\r\n try {\r\n if (Color(color).hex()) {\r\n adapterColor = Color(color).hex();\r\n }\r\n } catch (_) {}\r\n\r\n // input[type=color] requires exactly #rrggbb format\r\n const inputColorValue = /^#[0-9a-fA-F]{6}$/.test(adapterColor) ? adapterColor : '#000000';\r\n\r\n return (\r\n <div\r\n className={styles.colorPicker}\r\n style={{ width: 202, paddingTop: 12, paddingBottom: 12 }}\r\n >\r\n <div style={{ padding: '0px 16px' }}>\r\n <Space\r\n wrap\r\n size='small'\r\n >\r\n {presetColorList.map(item => {\r\n return (\r\n <div\r\n title={item}\r\n onClick={() => onChange(item)}\r\n key={item}\r\n style={{\r\n border: '1px solid var(--color-neutral-3, rgb(229, 230, 235))',\r\n display: 'inline-block',\r\n height: 20,\r\n width: 20,\r\n boxSizing: 'border-box',\r\n padding: 4,\r\n borderRadius: 3,\r\n backgroundColor: item,\r\n position: 'relative',\r\n cursor: 'pointer',\r\n }}\r\n />\r\n );\r\n })}\r\n </Space>\r\n </div>\r\n <div\r\n style={{\r\n padding: '6px 6px 0px 6px',\r\n backgroundColor: 'var(--color-bg-popup)'\r\n }}\r\n >\r\n <Button\r\n type='text'\r\n size='small'\r\n style={{\r\n fontSize: 12,\r\n width: '100%',\r\n textAlign: 'left',\r\n paddingLeft: 10,\r\n position: 'relative',\r\n }}\r\n >\r\n <span style={{ color: 'var(--ant-color-text, #ddddd)'}}>{t('Picker...')}</span>\r\n <input\r\n style={{\r\n position: 'absolute',\r\n width: '100%',\r\n height: '100%',\r\n zIndex: 1,\r\n left: 0,\r\n top: 0,\r\n opacity: 0,\r\n cursor: 'pointer'\r\n }}\r\n type='color'\r\n value={inputColorValue}\r\n onChange={e => onChange(e.target.value)}\r\n onMouseDown={e => e.stopPropagation()}\r\n />\r\n </Button>\r\n </div>\r\n <style>\r\n {`\r\n .form-alpha-picker {\r\n outline: 1px solid rgb(204, 204, 204, 0.6);\r\n }\r\n `}\r\n </style>\r\n </div>\r\n );\r\n}\r\n","import { useCallback, useEffect, useRef, useState } from 'react';\n\nexport interface PopupRect {\n triggerLeft: number;\n triggerTop: number;\n triggerWidth: number;\n triggerHeight: number;\n}\n\n/**\n * Popup open/position manager for toolbar buttons inside a Shadow DOM.\n *\n * Uses a portal-based approach:\n * - We compute getBoundingClientRect() of the trigger button and expose it.\n * - Callers render a fixed-position portal div in document.body at that rect.\n * - No antd getPopupContainer tricks needed — popup is outside the shadow DOM.\n */\nexport function useRichTextPopupOpen() {\n const [open, setOpen] = useState(false);\n const [rect, setRect] = useState<PopupRect | null>(null);\n const triggerRef = useRef<HTMLElement | null>(null);\n const popupContainerRef = useRef<HTMLElement | null>(null);\n // Keep open state accessible inside the persistent listener without re-registering\n const openRef = useRef(false);\n openRef.current = open;\n\n // Persistent mousedown listener — always registered, checks openRef internally.\n useEffect(() => {\n const onMouseDown = (e: MouseEvent) => {\n if (!openRef.current) return;\n\n // composedPath() gives the real path through shadow DOM boundaries,\n // unlike e.target which is retargeted at shadow root level.\n // Note: path may include non-Node entries (e.g. Window) — guard with instanceof.\n const path = e.composedPath ? e.composedPath() : [e.target as Node];\n const isNode = (el: EventTarget): el is Node => el instanceof Node;\n\n // Click inside the popup portal?\n const popup = popupContainerRef.current;\n if (popup && path.some(el => isNode(el) && (el === popup || popup.contains(el)))) return;\n\n // Click inside the shadow host that contains the trigger (toolbar)?\n const rootNode = triggerRef.current?.getRootNode();\n if (rootNode instanceof ShadowRoot) {\n const host = rootNode.host;\n if (path.some(el => isNode(el) && (el === host || host.contains(el)))) return;\n } else if (triggerRef.current) {\n const trigger = triggerRef.current;\n if (path.some(el => isNode(el) && (el === trigger || trigger.contains(el)))) return;\n }\n\n setOpen(false);\n };\n\n // Use capture so we get the event before any stopPropagation in the tree.\n document.addEventListener('mousedown', onMouseDown, true);\n return () => document.removeEventListener('mousedown', onMouseDown, true);\n }, []); // empty deps — register once, use refs for live values\n\n /** Call this from the trigger button's onClick. */\n const handleTriggerClick = useCallback(() => {\n setOpen(prev => {\n if (!prev && triggerRef.current) {\n const r = triggerRef.current.getBoundingClientRect();\n setRect({\n triggerLeft: r.left,\n triggerTop: r.top,\n triggerWidth: r.width,\n triggerHeight: r.height,\n });\n }\n return !prev;\n });\n }, []);\n\n const close = useCallback(() => setOpen(false), []);\n\n /** Ref for the wrapper span around the button (used for getBoundingClientRect). */\n const setTriggerRef = useCallback((el: HTMLElement | null) => {\n triggerRef.current = el;\n }, []);\n\n /** Ref for the portal popup container div. */\n const setPopupContainerRef = useCallback((el: HTMLElement | null) => {\n popupContainerRef.current = el;\n }, []);\n\n /** @deprecated kept for API compat */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const onOpenChange = useCallback((_open: boolean) => {}, []);\n /** @deprecated kept for API compat */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const setPopupRef = useCallback((_el: HTMLElement | null) => {}, []);\n /** @deprecated kept for API compat */\n const getPopupContainer = useCallback((): HTMLElement => document.body, []);\n\n return {\n open,\n setOpen,\n rect,\n close,\n handleTriggerClick,\n setTriggerRef,\n setPopupContainerRef,\n // Legacy compat\n onOpenChange,\n setPopupRef,\n getPopupContainer,\n };\n}\n","import React from 'react';\nimport { createPortal } from 'react-dom';\nimport type { PopupRect } from '../../hooks/useRichTextPopupOpen';\n\n// This ID is defined in easy-email-editor and is whitelisted in MjmlDomRender's\n// click-outside handler, so clicks inside our popup won't trigger setIsTextFocus(false).\nconst FIXED_CONTAINER_ID = 'FIXED_CONTAINER_ID';\n\ninterface RichTextPortalPopupProps {\n open: boolean;\n rect: PopupRect | null | undefined;\n children: React.ReactNode;\n containerRef?: (el: HTMLElement | null) => void;\n /** 'bottom' places popup below trigger; 'top' places it above. Default: 'bottom' */\n placement?: 'bottom' | 'top';\n}\n\n/**\n * Renders children into a fixed-position portal inside FIXED_CONTAINER_ID,\n * positioned relative to the trigger button rect.\n * Using FIXED_CONTAINER_ID keeps us in the whitelist of MjmlDomRender's\n * click handler so the RichText toolbar stays visible while the popup is open.\n */\nexport function RichTextPortalPopup({\n open,\n rect,\n children,\n containerRef,\n placement = 'bottom',\n}: RichTextPortalPopupProps) {\n if (!open || !rect) return null;\n\n const container = document.getElementById(FIXED_CONTAINER_ID) ?? document.body;\n\n const GAP = 4;\n const style: React.CSSProperties = {\n position: 'fixed',\n zIndex: 10000,\n left: rect.triggerLeft,\n ...(placement === 'bottom'\n ? { top: rect.triggerTop + rect.triggerHeight + GAP }\n : { bottom: window.innerHeight - rect.triggerTop + GAP }),\n backgroundColor: 'var(--color-bg-popup)',\n borderRadius: 8,\n border: '1px solid var(--color-border)',\n };\n\n return createPortal(\n <div ref={containerRef} style={style}>\n {children}\n </div>,\n container,\n );\n}\n","import { Input, Popover, PopoverProps } from 'antd';\r\nimport React, { useCallback, useContext, useMemo, useState } from 'react';\r\n\r\nimport { getImg } from '@extensions/AttributePanel/utils/getImg';\r\nimport Color from 'color';\r\nimport { PresetColorsContext } from '@extensions/AttributePanel/components/provider/PresetColorsProvider';\r\nimport { ColorPickerContent } from './ColorPickerContent';\r\nimport { useRichTextPopupOpen } from '../RichTextToolBar/hooks/useRichTextPopupOpen';\r\nimport { RichTextPortalPopup } from '../RichTextToolBar/components/RichTextPortalPopup';\r\n\r\nexport interface ColorPickerProps extends PopoverProps {\r\n onChange?: (val: string) => void;\r\n value?: string;\r\n label: string;\r\n children?: React.ReactNode;\r\n showInput?: boolean;\r\n fixed?: boolean;\r\n /** Pass true when used inside the RichText toolbar so popup open state is managed correctly */\r\n inRichTextBar?: boolean;\r\n}\r\n\r\nconst getCollapseItemEle = (node: HTMLElement | null): HTMLElement => {\r\n if (!node) return document.body;\r\n if (node.classList.contains('arco-collapse-item')) {\r\n return node;\r\n }\r\n return getCollapseItemEle(node.parentElement);\r\n};\r\nconst transparentColor = 'rgba(0,0,0,0)';\r\n\r\nexport function ColorPicker(props: ColorPickerProps) {\r\n const { addCurrentColor } = useContext(PresetColorsContext);\r\n const [refEle, setRefEle] = useState<HTMLElement | null>(null);\r\n\r\n const { value = '', onChange, children, showInput = true, inRichTextBar } = props;\r\n\r\n const richTextPopup = useRichTextPopupOpen();\r\n\r\n const onInputChange = useCallback(\r\n (value: string) => {\r\n onChange?.(value);\r\n addCurrentColor(value);\r\n },\r\n [addCurrentColor, onChange],\r\n );\r\n\r\n const onInputEventChange = useCallback(\r\n (event: React.ChangeEvent<HTMLInputElement>) => {\r\n onInputChange(event.target.value);\r\n },\r\n [onInputChange],\r\n );\r\n\r\n const getPopupContainer = useCallback(() => {\r\n return getCollapseItemEle(refEle);\r\n }, [refEle]);\r\n\r\n const inputColor = useMemo(() => {\r\n if (props.value?.startsWith('#') && props.value?.length === 7)\r\n return props.value?.replace('#', '');\r\n return props.value;\r\n }, [props.value]);\r\n\r\n const adapterColor = useMemo(() => {\r\n try {\r\n if (value.length === 6 && Color(`#${value}`).hex()) return `#${value}`;\r\n } catch {\r\n console.error('err adapterColor', value);\r\n }\r\n return value;\r\n }, [value]);\r\n\r\n // Strip inRichTextBar (our custom prop) before spreading onto antd Popover\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n const { inRichTextBar: _inRichTextBar, ...popoverProps } = props;\r\n\r\n // When inside the rich text toolbar, render a portal popup instead of antd Popover\r\n if (inRichTextBar) {\r\n const colorContent = (\r\n <ColorPickerContent\r\n value={adapterColor}\r\n onChange={(c) => {\r\n onInputChange(c);\r\n // Do NOT close the popup here — clicking a color swatch or using\r\n // the native picker should keep the popup open so the user can\r\n // pick another color or dismiss by clicking outside.\r\n }}\r\n />\r\n );\r\n\r\n return (\r\n <>\r\n <span\r\n ref={richTextPopup.setTriggerRef}\r\n onClick={richTextPopup.handleTriggerClick}\r\n style={{ display: 'inline-flex' }}\r\n >\r\n {children}\r\n </span>\r\n <RichTextPortalPopup\r\n open={richTextPopup.open}\r\n rect={richTextPopup.rect}\r\n containerRef={richTextPopup.setPopupContainerRef}\r\n placement=\"bottom\"\r\n >\r\n {colorContent}\r\n </RichTextPortalPopup>\r\n </>\r\n );\r\n }\r\n\r\n return (\r\n <div style={{ flex: 1, display: 'flex' }}>\r\n <Popover\r\n title={popoverProps.label}\r\n trigger=\"click\"\r\n className=\"color-picker-popup\"\r\n content={(\r\n <ColorPickerContent\r\n value={adapterColor}\r\n onChange={onInputChange}\r\n />\r\n )}\r\n getPopupContainer={getPopupContainer}\r\n {...popoverProps}\r\n >\r\n {children ? (\r\n <span style={{ display: 'inline-flex' }}>\r\n {children}\r\n </span>\r\n ) : (\r\n <div\r\n ref={setRefEle}\r\n style={{\r\n display: 'inline-block',\r\n height: 26,\r\n width: 26,\r\n boxSizing: 'border-box',\r\n padding: 4,\r\n border: '1px solid var(--color-neutral-3, rgb(229, 230, 235))',\r\n borderRadius: showInput ? undefined : 4,\r\n fontSize: 0,\r\n borderRight: showInput ? 'none' : undefined,\r\n position: 'relative',\r\n cursor: 'pointer',\r\n }}\r\n >\r\n {props.value ? (\r\n <span\r\n style={{\r\n position: 'relative',\r\n display: 'block',\r\n border: '1px solid var(--color-neutral-3, rgb(229, 230, 235))',\r\n borderRadius: 2,\r\n width: '100%',\r\n height: '100%',\r\n textAlign: 'center',\r\n backgroundColor: adapterColor,\r\n }}\r\n />\r\n ) : (\r\n <img\r\n alt=\"Color picker icon\"\r\n style={{\r\n maxWidth: '100%',\r\n maxHeight: '100%',\r\n filter: 'invert( 0.78 ) drop-shadow(0 0px 0 rgb(0 0 0 / 45%))',\r\n }}\r\n src={getImg('AttributePanel_02')}\r\n />\r\n )}\r\n <style>\r\n {`\r\n [title=\"${transparentColor}\"] {\r\n background-image: url(\"https://res.cloudinary.com/flashmail/image/upload/v1656944736/cl4vlvzcm05911zsaor6aktl0/ce7qm7lxs5jm47ggabha.png\") !important\r\n }\r\n\r\n `}\r\n </style>\r\n </div>\r\n )}\r\n </Popover>\r\n {showInput && (\r\n <Input\r\n value={inputColor}\r\n style={{ outline: 'none', flex: 1, borderRadius: 0 }}\r\n onChange={onInputEventChange}\r\n />\r\n )}\r\n </div>\r\n );\r\n}\r\n","import { colorAdapter } from '@extensions/AttributePanel/components/adapter';\r\nimport React, { ComponentProps } from 'react';\r\nimport { ColorPicker, ColorPickerProps } from '../ColorPicker';\r\nimport enhancer from '../enhancer';\r\n\r\nconst ColorPickerFieldSource = enhancer<ColorPickerProps>(ColorPicker, e => e, {\r\n debounceTime: 1,\r\n});\r\n\r\nexport const ColorPickerField = (\r\n props: ComponentProps<typeof ColorPickerFieldSource>,\r\n) => {\r\n return (\r\n <ColorPickerFieldSource\r\n config={colorAdapter}\r\n {...props}\r\n />\r\n );\r\n};\r\n","import React, { useEffect } from 'react';\nimport { ContentEditableType, DATA_CONTENT_EDITABLE_TYPE, getShadowRoot } from '@thanhpv102/easy-email-editor';\nimport { useField, useForm } from '@thanhpv102/easy-email-editor';\n\nexport interface InlineTextProps {\n idx: string;\n children?: React.ReactNode;\n onChange: (content: string) => void;\n}\n\nexport function InlineText({ idx, onChange, children }: InlineTextProps) {\n const {\n mutators: { setFieldTouched },\n } = useForm();\n\n useField(idx); // setFieldTouched will be work while register field,\n\n useEffect(() => {\n const shadowRoot = getShadowRoot();\n\n const onPaste = (e: ClipboardEvent) => {\n if (!(e.target instanceof Element) || !e.target.getAttribute('contenteditable')) return;\n e.preventDefault();\n\n const text = e.clipboardData?.getData('text/plain') || '';\n document.execCommand('insertHTML', false, text);\n const contentEditableType = e.target.getAttribute(DATA_CONTENT_EDITABLE_TYPE);\n if (contentEditableType === ContentEditableType.RichText) {\n onChange(e.target.innerHTML || '');\n } else if (contentEditableType === ContentEditableType.Text) {\n onChange(e.target.textContent?.trim() || '');\n }\n };\n\n const onInput = (e: Event) => {\n if (e.target instanceof Element && e.target.getAttribute('contenteditable')) {\n\n const contentEditableType = e.target.getAttribute(DATA_CONTENT_EDITABLE_TYPE);\n if (contentEditableType === ContentEditableType.RichText) {\n onChange(e.target.innerHTML || '');\n } else if (contentEditableType === ContentEditableType.Text) {\n onChange(e.target.textContent?.trim() || '');\n }\n }\n };\n\n shadowRoot.addEventListener('paste', onPaste as any, true);\n shadowRoot.addEventListener('input', onInput);\n\n return () => {\n shadowRoot.removeEventListener('paste', onPaste as any, true);\n shadowRoot.removeEventListener('input', onInput);\n };\n }, [onChange, setFieldTouched]);\n\n return <>{children}</>;\n}\n","import { classnames } from '@extensions/utils/classnames';\nimport React, { useCallback, useRef, useState } from 'react';\nimport { createPortal } from 'react-dom';\n\nconst FIXED_CONTAINER_ID = 'FIXED_CONTAINER_ID';\n\ninterface TooltipState {\n visible: boolean;\n left: number;\n top: number;\n}\n\nfunction SimpleTooltip({ title, children }: { title: string; children: React.ReactElement }) {\n const [tip, setTip] = useState<TooltipState>({ visible: false, left: 0, top: 0 });\n const timerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n const show = useCallback((e: React.MouseEvent) => {\n const rect = (e.currentTarget as HTMLElement).getBoundingClientRect();\n if (timerRef.current) clearTimeout(timerRef.current);\n timerRef.current = setTimeout(() => {\n setTip({ visible: true, left: rect.left + rect.width / 2, top: rect.bottom + 6 });\n }, 400);\n }, []);\n\n const hide = useCallback(() => {\n if (timerRef.current) clearTimeout(timerRef.current);\n setTip(prev => ({ ...prev, visible: false }));\n }, []);\n\n const container = document.getElementById(FIXED_CONTAINER_ID) ?? document.body;\n\n return (\n <>\n {React.cloneElement(children, { onMouseEnter: show, onMouseLeave: hide } as React.HTMLAttributes<HTMLElement>)}\n {tip.visible && createPortal(\n <div style={{\n position: 'fixed',\n left: tip.left,\n top: tip.top,\n transform: 'translateX(-50%)',\n backgroundColor: 'rgba(0,0,0,0.75)',\n color: '#fff',\n padding: '4px 8px',\n borderRadius: 4,\n fontSize: 12,\n whiteSpace: 'nowrap',\n pointerEvents: 'none',\n zIndex: 99999,\n }}>\n {title}\n </div>,\n container,\n )}\n </>\n );\n}\n\nexport const ToolItem: React.FC<{\n title?: string;\n icon: React.ReactNode;\n onClick?: React.MouseEventHandler<HTMLButtonElement>;\n trigger?: string;\n style?: React.CSSProperties;\n isActive?: boolean;\n getPopupContainer?: () => HTMLElement;\n}> = props => {\n const btn = (\n <button\n tabIndex={-1}\n className={classnames('easy-email-extensions-emailToolItem', props.isActive && 'easy-email-extensions-emailToolItem-active')}\n onClick={props.onClick}\n style={props.style}\n >\n {props.icon}\n </button>\n );\n\n if (!props.title) {\n return btn;\n }\n\n return <SimpleTooltip title={props.title}>{btn}</SimpleTooltip>;\n};\n","import { Col, Row, Space } from 'antd';\nimport type { TooltipProps } from 'antd';\nimport React, { useCallback, useMemo, useRef } from 'react';\nimport { Form, IconFont, Stack, TextStyle } from '@thanhpv102/easy-email-editor';\nimport { SearchField, SwitchField } from '@extensions/components/Form';\nimport { ToolItem } from '../ToolItem';\nimport { EMAIL_BLOCK_CLASS_NAME } from '@thanhpv102/easy-email-core';\nimport { useRichTextPopupOpen } from '../../hooks/useRichTextPopupOpen';\nimport { RichTextPortalPopup } from '../RichTextPortalPopup';\n\nexport interface LinkParams {\n link: string;\n blank: boolean;\n underline: boolean;\n linkNode: HTMLAnchorElement | null;\n}\n\nexport interface LinkProps extends Omit<TooltipProps, 'title'> {\n currentRange: Range | null | undefined;\n onChange: (val: LinkParams) => void;\n}\n\nfunction getAnchorElement(\n node: Node | null,\n): HTMLAnchorElement | null {\n if (!node) return null;\n if (node instanceof HTMLAnchorElement) {\n return node;\n }\n if (node instanceof Element && node.classList.contains(EMAIL_BLOCK_CLASS_NAME)) return null;\n\n return getAnchorElement(node.parentNode);\n}\n\nexport function getLinkNode(\n currentRange: Range | null | undefined,\n): HTMLAnchorElement | null {\n let linkNode: HTMLAnchorElement | null = null;\n if (!currentRange) return null;\n linkNode = getAnchorElement(currentRange.startContainer);\n return linkNode;\n}\n\nexport function Link(props: LinkProps) {\n const { open, rect, close, handleTriggerClick, setTriggerRef, setPopupContainerRef } = useRichTextPopupOpen();\n\n // Compute live values from current selection\n const liveValues = useMemo((): LinkParams => {\n let link = '';\n let blank = true;\n let underline = true;\n let linkNode: HTMLAnchorElement | null = getLinkNode(props.currentRange);\n if (linkNode) {\n link = linkNode.getAttribute('href') || '';\n blank = linkNode.getAttribute('target') === '_blank';\n underline = linkNode.style.textDecoration === 'underline';\n }\n return { link, blank, underline, linkNode };\n }, [props.currentRange]);\n\n // Freeze initial values when popup opens — don't let selection changes remount the Form\n const frozenValuesRef = useRef<LinkParams>(liveValues);\n if (!open) {\n // Only update frozen values when popup is closed (i.e. on next open)\n frozenValuesRef.current = liveValues;\n }\n const initialValues = frozenValuesRef.current;\n\n const onSubmit = useCallback(\n (values: LinkParams) => {\n props.onChange(values);\n close();\n },\n [props, close],\n );\n\n return (\n <>\n <span ref={setTriggerRef}>\n <ToolItem\n isActive={Boolean(initialValues.link)}\n title={t('Link')}\n icon={<IconFont iconName=\"icon-link\" />}\n onClick={handleTriggerClick}\n />\n </span>\n <RichTextPortalPopup\n open={open}\n rect={rect}\n containerRef={setPopupContainerRef}\n placement=\"bottom\"\n >\n <Form\n key={initialValues.link}\n initialValues={initialValues}\n onSubmit={onSubmit}\n >\n {({ handleSubmit }) => (\n <div style={{\n color: 'var(--ant-color-text)',\n backgroundColor: 'var(--ant-color-bg-container)',\n padding: '8px 12px',\n minWidth: 260\n }}>\n <Stack vertical spacing=\"none\">\n <SearchField\n size=\"small\"\n name=\"link\"\n key=\"link\"\n label={t('Link')}\n labelHidden\n placeholder={t('https://www.example.com')}\n onSearch={() => handleSubmit()}\n />\n </Stack>\n <Row>\n <Col span={12}>\n <Space align=\"center\" size=\"small\">\n <TextStyle size=\"smallest\">{t('Target')}</TextStyle>\n <SwitchField size=\"small\" label={t('Target')} labelHidden name=\"blank\" key=\"blank\" inline />\n </Space>\n </Col>\n <Col span={12}>\n <Space align=\"center\" size=\"small\">\n <TextStyle size=\"smallest\">{t('Underline')}</TextStyle>\n <SwitchField size=\"small\" label={t('Underline')} labelHidden name=\"underline\" key=\"underline\" inline />\n </Space>\n </Col>\n </Row>\n </div>\n )}\n </Form>\n </RichTextPortalPopup>\n </>\n );\n}\n","import { useEditorContext, useEditorProps } from '@thanhpv102/easy-email-editor';\nimport React, { useMemo } from 'react';\n\nconst DEFAULT_FONT_LIST: Array<{ value: string; label: string }> = [\n { value: 'Arial', label: 'Arial' },\n { value: 'Tahoma', label: 'Tahoma' },\n { value: 'Verdana', label: 'Verdana' },\n { value: 'Times New Roman', label: 'Times New Roman' },\n { value: 'Courier New', label: 'Courier New' },\n { value: 'Georgia', label: 'Georgia' },\n { value: 'Trebuchet MS', label: 'Trebuchet MS' },\n { value: 'Comic Sans MS', label: 'Comic Sans MS' },\n { value: 'Impact', label: 'Impact' },\n];\n\nexport function useFontFamily() {\n const { fontList: defaultFontList } = useEditorProps();\n const { pageData } = useEditorContext();\n\n const addFonts = pageData?.data.value.fonts;\n\n const fontList = useMemo(() => {\n const fonts: Array<{\n value: string;\n label: React.ReactNode;\n }> = [];\n // Use provided fontList if non-empty, otherwise fall back to built-in defaults\n const baseList = defaultFontList && defaultFontList.length > 0 ? defaultFontList : DEFAULT_FONT_LIST;\n fonts.push(...baseList);\n if (addFonts) {\n const options = addFonts.map(item => ({ value: item.name, label: item.name }));\n fonts.unshift(...options);\n }\n\n return fonts.map(item => ({ value: item.value, label: <span style={{ fontFamily: item.value }}>{item.label}</span> }));\n }, [addFonts, defaultFontList]);\n\n return {\n fontList\n };\n}","import React, { useCallback } from 'react';\n\nimport { ToolItem } from '../ToolItem';\nimport { IconFont } from '@thanhpv102/easy-email-editor';\nimport { useFontFamily } from '@extensions/hooks/useFontFamily';\nimport { useRichTextPopupOpen } from '../../hooks/useRichTextPopupOpen';\nimport { RichTextPortalPopup } from '../RichTextPortalPopup';\n\nexport interface FontFamilyProps {\n execCommand: (cmd: string, value: string) => void;\n}\n\nexport function FontFamily(props: FontFamilyProps) {\n const { fontList } = useFontFamily();\n const { execCommand } = props;\n const { open, rect, close, handleTriggerClick, setTriggerRef, setPopupContainerRef } = useRichTextPopupOpen();\n\n const onChange = useCallback(\n (val: string) => {\n execCommand('fontName', val);\n close();\n },\n [execCommand, close],\n );\n\n return (\n <>\n <span ref={setTriggerRef}>\n <ToolItem\n title={t('Font family')}\n icon={<IconFont iconName=\"icon-font-family\" />}\n onClick={handleTriggerClick}\n />\n </span>\n <RichTextPortalPopup\n open={open}\n rect={rect}\n containerRef={setPopupContainerRef}\n placement=\"bottom\"\n >\n <ul\n style={{\n listStyle: 'none',\n margin: 0,\n padding: '4px 0',\n maxWidth: 200,\n maxHeight: 350,\n overflowY: 'auto',\n }}\n >\n {fontList.map(item => (\n <li\n key={item.value}\n onClick={() => onChange(item.value)}\n style={{\n padding: '5px 12px',\n cursor: 'pointer',\n lineHeight: '22px',\n whiteSpace: 'nowrap',\n }}\n onMouseEnter={e => {\n (e.currentTarget as HTMLElement).style.backgroundColor = 'var(--color-font-item-background, #f5f5f5)';\n }}\n onMouseLeave={e => {\n (e.currentTarget as HTMLElement).style.backgroundColor = 'transparent';\n }}\n >\n {item.label}\n </li>\n ))}\n </ul>\n </RichTextPortalPopup>\n </>\n );\n}\n",".helpTooltip {\n :global {\n .ant-tooltip-inner {\n z-index: 10000 !important;\n }\n }\n\n z-index: 10000 !important;\n}\n","import React from 'react';\nimport { Tooltip, TooltipProps } from 'antd';\nimport { QuestionCircleOutlined } from '@ant-design/icons';\nimport styles from './index.module.scss';\n\nexport function Help(\n props: TooltipProps &\n Partial<{ style: Partial<React.CSSProperties> }> & {\n title: React.ReactNode;\n }\n) {\n return (\n <Tooltip\n {...{ ...props, style: undefined }}\n title={props.title}\n classNames={{ root: styles.helpTooltip }}\n getPopupContainer={() => document.body}\n >\n <span style={{ cursor: 'pointer' }}>\n <QuestionCircleOutlined style={props.style} />\n </span>\n </Tooltip>\n );\n}\n","import { FieldArray, Stack, TextStyle, useBlock, useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport React from 'react';\nimport { PlusOutlined, DeleteOutlined } from '@ant-design/icons';\nimport { TextField } from '.';\nimport { Button } from 'antd';\nimport { Help } from '@extensions/AttributePanel/components/UI/Help';\nimport { IPage } from '@thanhpv102/easy-email-core';\n\nexport function AddFont() {\n const { focusBlock } = useBlock();\n const { focusIdx } = useFocusIdx();\n const value: IPage['data']['value'] = focusBlock?.data.value;\n return (\n <FieldArray name={`${focusIdx}.data.value.fonts`}>\n {({ fields }) => {\n return (\n <div>\n <Stack\n vertical\n spacing=\"tight\"\n >\n <Stack distribution=\"equalSpacing\">\n <TextStyle variation=\"strong\">\n {t('Import font')} <Help title={t('Points to a hosted css file')} />\n </TextStyle>\n <Stack>\n <Button\n size=\"small\"\n icon={<PlusOutlined />}\n onClick={() => fields.push({ name: '', href: '' })}\n />\n </Stack>\n </Stack>\n\n <Stack\n vertical\n spacing=\"extraTight\"\n >\n {value.fonts?.map((item, index) => {\n return (\n <div key={index}>\n <Stack\n alignment=\"center\"\n wrap={false}\n >\n <Stack.Item fill>\n <TextField\n name={`${focusIdx}.data.value.fonts.${index}.name`}\n label={t('Name')}\n />\n </Stack.Item>\n <Stack.Item fill>\n <TextField\n name={`${focusIdx}.data.value.fonts.${index}.href`}\n label={t('Href')}\n />\n </Stack.Item>\n <Stack\n vertical\n spacing=\"loose\"\n >\n <Stack.Item />\n <Button\n icon={<DeleteOutlined />}\n onClick={() => fields.remove(index)}\n />\n </Stack>\n </Stack>\n </div>\n );\n })}\n </Stack>\n </Stack>\n </div>\n );\n }}\n </FieldArray>\n );\n}\n","import { EyeOutlined, EyeInvisibleOutlined } from '@ant-design/icons';\r\nimport React, { useCallback } from 'react';\r\nimport { Stack, TextStyle, useBlock } from '@thanhpv102/easy-email-editor';\r\nimport { BasicType, BlockManager } from '@thanhpv102/easy-email-core';\r\n\r\nexport interface AttributesPanelWrapper {\r\n style?: React.CSSProperties;\r\n extra?: React.ReactNode;\r\n children: React.ReactNode | React.ReactElement;\r\n}\r\nexport const AttributesPanelWrapper: React.FC<AttributesPanelWrapper> = props => {\r\n const { focusBlock } = useBlock();\r\n const block = focusBlock && BlockManager.getBlockByType(focusBlock.type);\r\n\r\n if (!focusBlock || !block) return null;\r\n\r\n return (\r\n <div>\r\n <div\r\n style={{\r\n padding: '4px 16px 12px 16px',\r\n }}\r\n >\r\n <Stack vertical>\r\n <Stack.Item fill>\r\n <Stack\r\n wrap={false}\r\n distribution='equalSpacing'\r\n alignment='center'\r\n >\r\n <Stack\r\n spacing='extraTight'\r\n alignment='center'\r\n >\r\n <EyeIcon />\r\n <TextStyle\r\n variation='strong'\r\n size='medium'\r\n >\r\n {`${block.name} `} {t('attributes')}\r\n </TextStyle>\r\n </Stack>\r\n <Stack.Item>{props.extra}</Stack.Item>\r\n </Stack>\r\n </Stack.Item>\r\n </Stack>\r\n </div>\r\n\r\n <div style={{ padding: '0px', ...props.style }}>{props.children}</div>\r\n </div>\r\n );\r\n};\r\n\r\nfunction EyeIcon() {\r\n const { setFocusBlock, focusBlock } = useBlock();\r\n\r\n const onToggleVisible = useCallback(\r\n (e: React.MouseEvent) => {\r\n if (!focusBlock) return null;\r\n e.stopPropagation();\r\n setFocusBlock({\r\n ...focusBlock,\r\n data: {\r\n ...focusBlock.data,\r\n hidden: !focusBlock.data.hidden,\r\n },\r\n });\r\n },\r\n [focusBlock, setFocusBlock],\r\n );\r\n\r\n if (!focusBlock) return null;\r\n\r\n if (focusBlock.type === BasicType.PAGE.toString()) return null;\r\n\r\n return focusBlock.data.hidden ? (\r\n <EyeInvisibleOutlined\r\n style={{ cursor: 'pointer', fontSize: 16 }}\r\n onClick={onToggleVisible}\r\n />\r\n ) : (\r\n <EyeOutlined\r\n style={{ cursor: 'pointer', fontSize: 16 }}\r\n onClick={onToggleVisible}\r\n />\r\n );\r\n}\r\n","import React, { useMemo } from 'react';\nimport { useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { AutoCompleteField } from '../../../components/Form';\nimport { useFontFamily } from '@extensions/hooks/useFontFamily';\n\nexport function FontFamily({ name }: { name?: string }) {\n const { focusIdx } = useFocusIdx();\n const { fontList } = useFontFamily();\n\n const transformedFontList = useMemo(() => {\n return fontList.map(font => ({\n value: font.value,\n label: font.value, // Use the font value as the label since AutoCompleteField expects string labels\n }));\n }, [fontList]);\n\n return useMemo(() => {\n return (\n <AutoCompleteField\n className=\"ant-input ant-input-outlined\"\n style={{ minWidth: 60, flex: 1 }}\n showSearch\n label={'Font family'}\n name={name || `${focusIdx}.attributes.font-family`}\n options={transformedFontList}\n />\n );\n }, [focusIdx, transformedFontList, name]);\n}\n","import React from 'react';\nimport {\n ColorPickerField,\n InputWithUnitField,\n NumberField,\n TextAreaField,\n TextField,\n} from '@extensions/components/Form';\nimport { AddFont } from '@extensions/components/Form/AddFont';\nimport { Col, Collapse, Row, Space } from 'antd';\nimport { Stack, useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { AttributesPanelWrapper } from '@extensions/AttributePanel/components/attributes/AttributesPanelWrapper';\nimport { FontFamily } from '../../attributes/FontFamily';\nimport { pixelAdapter } from '../../adapter';\n\ninterface PageProps {\n hideSubTitle?: boolean;\n hideSubject?: boolean;\n}\n\nexport function Page({ hideSubTitle, hideSubject }: PageProps) {\n const { focusIdx } = useFocusIdx();\n\n if (!focusIdx) return null;\n\n return (\n <AttributesPanelWrapper style={{ padding: 0 }}>\n <Stack.Item fill>\n <Collapse\n defaultActiveKey={['0', '1']}\n items={[\n {\n key: '0',\n label: t('Email Setting'),\n children: (\n <Space orientation=\"vertical\" size=\"small\">\n {!hideSubject && (\n <TextField\n label={t('Subject')}\n name={'subject'}\n inline\n />\n )}\n {!hideSubTitle && (\n <TextField\n label={t('SubTitle')}\n name={'subTitle'}\n inline\n />\n )}\n <InputWithUnitField\n label={t('Width')}\n name={`${focusIdx}.attributes.width`}\n inline\n />\n <InputWithUnitField\n label={t('Breakpoint')}\n helpText={t(\n 'Allows you to control on which breakpoint the layout should go desktop/mobile.',\n )}\n name={`${focusIdx}.data.value.breakpoint`}\n inline\n />\n </Space>\n )\n },\n {\n key: '1',\n label: t('Theme Setting'),\n children: (\n <Stack\n vertical\n spacing=\"tight\"\n >\n <Row>\n <Col span={11}>\n <FontFamily name={`${focusIdx}.data.value.font-family`} />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <NumberField\n className=\"ant-input ant-input-outlined\"\n label=\"Font size (px)\"\n name={`${focusIdx}.data.value.font-size`}\n config={pixelAdapter}\n autoComplete=\"off\"\n />\n </Col>\n </Row>\n\n <Row>\n <Col span={11}>\n <InputWithUnitField\n label={t('Line height')}\n unitOptions=\"percent\"\n name={`${focusIdx}.data.value.line-height`}\n />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <InputWithUnitField\n label={t('Font weight')}\n unitOptions=\"percent\"\n name={`${focusIdx}.data.value.font-weight`}\n />\n </Col>\n </Row>\n\n <Row>\n <Col span={11}>\n <ColorPickerField\n label={t('Text color')}\n name={`${focusIdx}.data.value.text-color`}\n />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <ColorPickerField\n label={t('Background')}\n name={`${focusIdx}.attributes.background-color`}\n />\n </Col>\n </Row>\n\n <Row>\n <ColorPickerField\n label={t('Content background')}\n name={`${focusIdx}.data.value.content-background-color`}\n />\n </Row>\n\n <TextAreaField\n autoSize\n label={t('User style')}\n name={`${focusIdx}.data.value.user-style.content`}\n />\n <Stack.Item />\n <Stack.Item />\n <AddFont />\n <Stack.Item />\n <Stack.Item />\n </Stack>\n )\n }\n ]}\n />\n </Stack.Item>\n </AttributesPanelWrapper>\n );\n}\n","\nimport React, { useCallback, useMemo } from 'react';\nimport { InputWithUnit } from '../../../components/Form/InputWithUnit';\nimport { useFocusIdx, Stack, useBlock, TextStyle, IconFont, Field } from '@thanhpv102/easy-email-editor';\nimport { Button, Row, Col, Space, Tooltip, Form } from 'antd';\n\nexport interface PaddingProps {\n title?: string;\n attributeName?: 'padding' | 'inner-padding' | 'text-padding';\n name?: string;\n showResetAll?: boolean;\n}\n\n// Helper component to handle individual padding fields without using enhancer\nconst PaddingFieldInput: React.FC<{\n label: string;\n paddingIndex: 0 | 1 | 2 | 3; // top, right, bottom, left\n paddingFieldName: string;\n inline?: boolean;\n}> = ({ label, paddingIndex, paddingFieldName, inline }) => {\n const labelCol = inline\n ? { span: 7, style: { textAlign: 'right' as const, paddingRight: 0 } }\n : { span: 24, style: { paddingRight: 0 } };\n\n const wrapperCol = inline\n ? { span: 16, offset: 1 }\n : { span: 24 };\n\n return (\n <Field\n name={paddingFieldName}\n >\n {({ input: { value, onChange } }) => {\n const paddingParts = (value || '0px 0px 0px 0px').split(/\\s+/);\n const currentValue = paddingParts[paddingIndex] || '0px';\n\n const handleChange = (newVal: string) => {\n const newParts = [...paddingParts];\n newParts[paddingIndex] = newVal;\n // Ensure we have exactly 4 parts\n while (newParts.length < 4) newParts.push('0px');\n onChange(newParts.slice(0, 4).join(' '));\n };\n\n return (\n <Form.Item\n label={label}\n labelCol={labelCol}\n wrapperCol={wrapperCol}\n style={{ margin: 0 }}\n labelAlign='left'\n >\n <InputWithUnit\n value={currentValue}\n onChange={handleChange}\n />\n </Form.Item>\n );\n }}\n </Field>\n );\n};\n\nexport function Padding(props: PaddingProps = {}) {\n const { title = t('Padding'), attributeName = 'padding', name, showResetAll } = props;\n const { change } = useBlock();\n const { focusIdx } = useFocusIdx();\n\n const paddingFieldName = useMemo(() => {\n if (name) {\n return name;\n }\n return focusIdx + `.attributes[${attributeName}]`;\n }, [name, focusIdx, attributeName]);\n\n const onResetPadding = useCallback(() => {\n change(paddingFieldName, '0px 0px 0px 0px');\n }, [paddingFieldName, change]);\n\n return (\n <>\n <Stack\n vertical\n spacing='extraTight'\n >\n <Space align='center' size='small'>\n <TextStyle variation='strong'>{title}</TextStyle>\n {showResetAll && (\n <Tooltip title='Remove all padding'>\n <Button\n onClick={onResetPadding}\n size='small'\n icon={(\n <IconFont\n iconName='icon-remove'\n size={12}\n />\n )}\n />\n </Tooltip>\n )}\n </Space>\n\n <Row>\n <Col span={11}>\n <PaddingFieldInput\n label={t('Top (px)')}\n paddingIndex={0}\n paddingFieldName={paddingFieldName}\n />\n </Col>\n <Col offset={1} span={11}>\n <PaddingFieldInput\n label={t('Left (px)')}\n paddingIndex={3}\n paddingFieldName={paddingFieldName}\n />\n </Col>\n </Row>\n\n <Row>\n <Col span={11}>\n <PaddingFieldInput\n label={t('Bottom (px)')}\n paddingIndex={2}\n paddingFieldName={paddingFieldName}\n />\n </Col>\n <Col offset={1} span={11}>\n <PaddingFieldInput\n label={t('Right (px)')}\n paddingIndex={1}\n paddingFieldName={paddingFieldName}\n />\n </Col>\n </Row>\n </Stack>\n </>\n );\n}\n\n","import React, { useMemo } from 'react';\r\nimport { ColorPickerField } from '../../../components/Form';\r\nimport { useFocusIdx } from '@thanhpv102/easy-email-editor';\r\n\r\nexport function BackgroundColor({ title = t('Background color') }: { title?: string }) {\r\n const { focusIdx } = useFocusIdx();\r\n\r\n return useMemo(() => {\r\n return (\r\n <ColorPickerField\r\n label={title}\r\n name={`${focusIdx}.attributes.background-color`}\r\n key={`${focusIdx}.attributes.background-color`}\r\n />\r\n );\r\n }, [focusIdx, title]);\r\n}\r\n","import React, { useMemo } from 'react';\nimport { ImageUploaderField, SelectField, TextField } from '../../../components/Form';\nimport { useFocusIdx, useEditorProps } from '@thanhpv102/easy-email-editor';\nimport { BackgroundColor } from './BackgroundColor';\nimport { Row, Col, Space } from 'antd';\n\nconst backgroundRepeatOptions = [\n {\n value: 'no-repeat',\n get label() {\n return 'No repeat';\n },\n },\n {\n value: 'repeat',\n get label() {\n return 'Repeat';\n },\n },\n {\n value: 'repeat-x',\n get label() {\n return 'Repeat X';\n },\n },\n {\n value: 'repeat-y',\n get label() {\n return 'Repeat Y';\n },\n },\n];\n\nexport function Background() {\n const { focusIdx } = useFocusIdx();\n const { onUploadImage, enableAssetManager } = useEditorProps();\n return useMemo(() => {\n return (\n <Space\n orientation='vertical'\n size='small'\n >\n <ImageUploaderField\n label={'Background image'}\n name={`${focusIdx}.attributes.background-url`}\n key={`${focusIdx}.attributes.background-url`}\n helpText={\n 'The image suffix should be .jpg, jpeg, png, gif, etc. Otherwise, the picture may not be displayed normally.'\n }\n uploadHandler={onUploadImage}\n enableSelectFromLibrary={enableAssetManager}\n />\n\n <Row>\n <Col span={11}>\n <BackgroundColor />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <SelectField\n label={'Background repeat'}\n key={`${focusIdx}.attributes.background-repeat`}\n options={backgroundRepeatOptions}\n name={`${focusIdx}.attributes.background-repeat`}\n />\n </Col>\n </Row>\n <TextField\n label={'Background size'}\n name={`${focusIdx}.attributes.background-size`}\n key={`${focusIdx}.attributes.background-size`}\n />\n </Space>\n );\n }, [focusIdx, onUploadImage]);\n}\n","import React, { useMemo } from 'react';\nimport { InputWithUnitField, TextField } from '../../../components/Form';\nimport { useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { Col, Row } from 'antd';\n\nexport function Border() {\n const { focusIdx } = useFocusIdx();\n\n return useMemo(() => {\n return (\n <Row>\n <Col span={11}>\n <TextField\n label={'Border'}\n name={`${focusIdx}.attributes.border`}\n key={`${focusIdx}.attributes.border`}\n />\n </Col>\n <Col offset={1} span={11}>\n <InputWithUnitField\n label={'Border radius'}\n name={`${focusIdx}.attributes.border-radius`}\n key={`${focusIdx}.attributes.border-radius`}\n unitOptions=\"percent\"\n />\n </Col>\n </Row>\n );\n }, [focusIdx]);\n}\n","import React, { useMemo } from 'react';\r\nimport { useFocusIdx } from '@thanhpv102/easy-email-editor';\r\nimport { TextField } from '../../../components/Form';\r\n\r\nexport function ClassName() {\r\n const { focusIdx } = useFocusIdx();\r\n\r\n return useMemo(() => {\r\n return (\r\n <TextField\r\n label={t('Class name')}\r\n name={`${focusIdx}.attributes.css-class`}\r\n key={`${focusIdx}.attributes.css-class`}\r\n />\r\n );\r\n }, [focusIdx]);\r\n}\r\n","import { useBlock, useFocusIdx } from '@thanhpv102/easy-email-editor';\r\nimport { Row, Col } from 'antd';\r\nimport { AdvancedBlock, AdvancedType } from '@thanhpv102/easy-email-core';\r\nimport { TextField } from '@extensions/components/Form';\r\nimport React from 'react';\r\n\r\nexport function Iteration() {\r\n const { focusIdx } = useFocusIdx();\r\n const { focusBlock } = useBlock();\r\n const iteration = focusBlock?.data.value?.iteration as\r\n | undefined\r\n | AdvancedBlock['data']['value']['iteration'];\r\n\r\n if (\r\n !focusBlock?.type ||\r\n !Object.values(AdvancedType).includes(focusBlock.type as AdvancedType)\r\n ) {\r\n return null;\r\n }\r\n\r\n return (\r\n <>\r\n {iteration?.enabled && (\r\n <Col span={24}>\r\n <div>\r\n <Row>\r\n <Col span={11}>\r\n <TextField\r\n label={'Data source'}\r\n name={`${focusIdx}.data.value.iteration.dataSource`}\r\n />\r\n </Col>\r\n <Col offset={1} span={11}>\r\n <TextField\r\n label={'Item name'}\r\n name={`${focusIdx}.data.value.iteration.itemName`}\r\n />\r\n </Col>\r\n </Row>\r\n <Row>\r\n <Col span={11}>\r\n <TextField\r\n label={'Limit'}\r\n name={`${focusIdx}.data.value.iteration.limit`}\r\n quickchange\r\n type='number'\r\n onChangeAdapter={(v) => Number(v)}\r\n />\r\n </Col>\r\n <Col offset={1} span={11}>\r\n <TextField\r\n label={'Mock quantity'}\r\n max={iteration?.limit}\r\n name={`${focusIdx}.data.value.iteration.mockQuantity`}\r\n type='number'\r\n onChangeAdapter={(v) => Number(v)}\r\n quickchange\r\n />\r\n </Col>\r\n </Row>\r\n </div>\r\n </Col>\r\n )}\r\n </>\r\n );\r\n}\r\n","import { useBlock, useFocusIdx } from '@thanhpv102/easy-email-editor';\r\nimport { AdvancedBlock, OperatorSymbol, AdvancedType, Operator, IConditionGroup } from '@thanhpv102/easy-email-core';\r\nimport { Row, Col, Button, Space, List, App } from 'antd';\r\nimport { SelectField, TextField } from '@extensions/components/Form';\r\nimport React, { useCallback } from 'react';\r\nimport { cloneDeep, get, upperFirst } from 'lodash';\r\nimport { DeleteOutlined, PlusOutlined } from '@ant-design/icons';\r\nimport { useField } from '@thanhpv102/easy-email-editor';\r\n\r\nexport function Condition() {\r\n const { focusIdx } = useFocusIdx();\r\n const { focusBlock, change, values } = useBlock();\r\n const { message } = App.useApp();\r\n const condition = focusBlock?.data.value?.condition as\r\n | undefined\r\n | AdvancedBlock['data']['value']['condition'];\r\n\r\n const onAddCondition = useCallback((path: string) => {\r\n const groups = get(values, path) as IConditionGroup[];\r\n\r\n groups.push({\r\n symbol: OperatorSymbol.AND,\r\n groups: [\r\n {\r\n left: '',\r\n operator: Operator.TRUTHY,\r\n right: ''\r\n }\r\n ],\r\n });\r\n change(path, [...groups]);\r\n }, [change, values]);\r\n\r\n const onAddSubCondition = useCallback((path: string) => {\r\n const groups = get(values, path) as IConditionGroup['groups'];\r\n\r\n groups.push({\r\n left: '',\r\n operator: Operator.TRUTHY,\r\n right: ''\r\n\r\n });\r\n change(path, [...groups]);\r\n }, [change, values]);\r\n\r\n // content.children.[0].children.[0].data.value.condition.groups.1.groups\r\n const onDelete = useCallback((path: string, gIndex: number, ggIndex: number) => {\r\n if (!condition) return;\r\n const subPath = `${path}.${gIndex}.groups`;\r\n const groups = cloneDeep(get(values, path)) as IConditionGroup[];\r\n const subGroups = cloneDeep(get(values, subPath)) as IConditionGroup['groups'];\r\n\r\n subGroups.splice(ggIndex, 1);\r\n if (subGroups.length === 0) {\r\n if (groups.length === 1) {\r\n message.warning('At least one condition');\r\n return;\r\n }\r\n // remove empty array\r\n groups.splice(gIndex, 1);\r\n change(path, [...groups]);\r\n } else {\r\n change(subPath, [...subGroups]);\r\n }\r\n\r\n }, [change, condition, values, message]);\r\n\r\n if (\r\n !focusBlock?.type ||\r\n !Object.values(AdvancedType).includes(focusBlock.type as AdvancedType)\r\n ) {\r\n return null;\r\n }\r\n\r\n return (\r\n <>\r\n {condition?.enabled && (\r\n <Space orientation='vertical' size='middle'>\r\n\r\n <List\r\n header={(\r\n <Row justify='space-between'>\r\n <Col span={16}>\r\n {condition.groups.length > 1 && (\r\n <SelectField inline name={`${focusIdx}.data.value.condition.symbol`}\r\n label={t('Symbol')}\r\n options={[\r\n {\r\n label: t('And'),\r\n value: OperatorSymbol.AND\r\n },\r\n {\r\n label: t('Or'),\r\n value: OperatorSymbol.OR\r\n },\r\n ]}\r\n />\r\n )}\r\n </Col>\r\n <Button onClick={() => onAddCondition(`${focusIdx}.data.value.condition.groups`)} size='small' icon={<PlusOutlined />} />\r\n </Row>\r\n )}\r\n dataSource={condition.groups}\r\n renderItem={\r\n (group: IConditionGroup, gIndex: number) => {\r\n return (\r\n <List.Item key={gIndex}>\r\n <div>\r\n <Row justify='space-between'>\r\n <Col span={16}>\r\n {\r\n group.groups.length > 1 && (\r\n <SelectField inline name={`${focusIdx}.data.value.condition.groups.${gIndex}.symbol`}\r\n label={t('Symbol')}\r\n options={[\r\n {\r\n label: t('And'),\r\n value: OperatorSymbol.AND\r\n },\r\n {\r\n label: t('Or'),\r\n value: OperatorSymbol.OR\r\n },\r\n ]}\r\n />\r\n )\r\n }\r\n </Col>\r\n <Button size='small' icon={<PlusOutlined />} onClick={() => onAddSubCondition(`${focusIdx}.data.value.condition.groups.${gIndex}.groups`)} />\r\n </Row>\r\n {\r\n group.groups.map((_item: IConditionGroup['groups'][number], ggIndex: number) => (\r\n <div key={`condition-item-${gIndex}-${ggIndex}`}>\r\n <ConditionItem\r\n onDelete={onDelete}\r\n path={`${focusIdx}.data.value.condition.groups`}\r\n gIndex={gIndex}\r\n ggIndex={ggIndex}\r\n />\r\n </div>\r\n ))\r\n }\r\n\r\n </div>\r\n </List.Item>\r\n );\r\n }\r\n }\r\n />\r\n\r\n </Space>\r\n )}\r\n </>\r\n );\r\n}\r\n\r\nconst options = Object.values(Operator).map(item => ({ label: upperFirst(item), value: item }));\r\n\r\nfunction ConditionItem({ path, onDelete, gIndex, ggIndex }: { path: string; gIndex: number; ggIndex: number; onDelete: (path: string, gIndex: number, ggIndex: number,) => void; }) {\r\n\r\n const name = `${path}.${gIndex}.groups.${ggIndex}`;\r\n const { input: { value } } = useField(name);\r\n\r\n const hideRight = (value as { operator?: Operator; })?.operator === Operator.TRUTHY || (value as { operator?: Operator; })?.operator === Operator.FALSY;\r\n\r\n return (\r\n <Row align='middle'>\r\n <Col span={7}> <TextField label={t('Variable path')} name={`${name}.left`} /></Col>\r\n <Col span={7}> <SelectField label={t('Operator')} name={`${name}.operator`} options={options} /></Col>\r\n <Col span={7}> {!hideRight && <TextField label=\"Right\" name={`${name}.right`} />}</Col>\r\n <Col span={3}>\r\n <Button onClick={() => onDelete(path, gIndex, ggIndex)} icon={<DeleteOutlined />} />\r\n </Col>\r\n\r\n </Row>\r\n );\r\n}","import React, { useCallback, useEffect, useState } from 'react';\r\nimport { Collapse, Space, Switch } from 'antd';\r\nimport { useBlock, useEditorProps, useFocusIdx } from '@thanhpv102/easy-email-editor';\r\nimport { AdvancedBlock, isAdvancedBlock, OperatorSymbol, Operator, ICondition } from '@thanhpv102/easy-email-core';\r\nimport { Iteration } from '../Iteration';\r\nimport { Condition } from '../Condition';\r\n\r\nexport interface CollapseWrapperProps {\r\n defaultActiveKey: string[];\r\n children: React.ReactNode;\r\n}\r\n\r\nexport const CollapseWrapper: React.FC<CollapseWrapperProps> = props => {\r\n const { enabledLogic } = useEditorProps();\r\n const [activeKeys, setActiveKeys] = useState<string[]>(props.defaultActiveKey);\r\n\r\n const { focusBlock, change } = useBlock();\r\n const { focusIdx } = useFocusIdx();\r\n const value = focusBlock?.data.value;\r\n\r\n const isAdvancedBlockType = isAdvancedBlock(focusBlock?.type);\r\n\r\n const iterationEnabled =\r\n isAdvancedBlockType && Boolean(value?.iteration && value?.iteration?.enabled);\r\n\r\n const conditionEnabled =\r\n isAdvancedBlockType && Boolean(value?.condition && value?.condition?.enabled);\r\n\r\n const onIterationToggle = useCallback(\r\n (enabled: boolean) => {\r\n if (enabled) {\r\n if (!value?.iteration) {\r\n change(`${focusIdx}.data.value.iteration`, {\r\n enabled: true,\r\n dataSource: '',\r\n itemName: 'item',\r\n limit: 9999,\r\n mockQuantity: 1,\r\n } as AdvancedBlock['data']['value']['iteration']);\r\n }\r\n }\r\n change(`${focusIdx}.data.value.iteration.enabled`, enabled);\r\n },\r\n [change, focusIdx, value?.iteration]\r\n );\r\n\r\n const onConditionToggle = useCallback(\r\n (enabled: boolean) => {\r\n if (enabled) {\r\n if (!value?.condition) {\r\n change(`${focusIdx}.data.value.condition`, {\r\n enabled: true,\r\n symbol: OperatorSymbol.AND,\r\n groups: [\r\n {\r\n symbol: OperatorSymbol.AND,\r\n groups: [\r\n {\r\n left: '',\r\n operator: Operator.TRUTHY,\r\n right: ''\r\n }\r\n ],\r\n }\r\n ],\r\n } as ICondition);\r\n }\r\n }\r\n change(`${focusIdx}.data.value.condition.enabled`, enabled);\r\n },\r\n [change, focusIdx, value?.condition]\r\n );\r\n\r\n const onChange = useCallback((keys: string[]) => {\r\n setActiveKeys(keys);\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (!isAdvancedBlockType) return;\r\n\r\n if (iterationEnabled) {\r\n setActiveKeys(keys => [...keys, 'Iteration']);\r\n } else {\r\n setActiveKeys(keys => keys.filter(k => k !== 'Iteration'));\r\n }\r\n }, [iterationEnabled, isAdvancedBlockType]);\r\n\r\n useEffect(() => {\r\n if (!isAdvancedBlockType) return;\r\n\r\n if (conditionEnabled) {\r\n setActiveKeys(keys => [...keys, 'Condition']);\r\n } else {\r\n setActiveKeys(keys => keys.filter(k => k !== 'Condition'));\r\n }\r\n }, [conditionEnabled, isAdvancedBlockType]);\r\n\r\n return (\r\n <Space\r\n size='middle'\r\n orientation='vertical'\r\n style={{ width: '100%' }}\r\n >\r\n <Collapse\r\n onChange={onChange}\r\n defaultActiveKey={activeKeys}\r\n items={[\r\n ...React.Children.toArray(props.children).map((child, index) => {\r\n if (React.isValidElement(child) && child.props && typeof child.props === 'object' && child.props !== null && 'header' in child.props) {\r\n const childProps = child.props as { header: string; children: React.ReactNode; };\r\n return {\r\n key: child.key as string || index.toString(),\r\n label: childProps.header,\r\n children: childProps.children\r\n };\r\n }\r\n return null;\r\n }).filter((item): item is { key: string; label: string; children: React.ReactNode; } => item !== null),\r\n ...(enabledLogic ? [\r\n {\r\n key: 'Iteration',\r\n label: t('Iteration'),\r\n extra: (\r\n <div style={{ marginRight: 10 }}>\r\n <Switch checked={iterationEnabled} onChange={onIterationToggle} />\r\n </div>\r\n ),\r\n children: <Iteration />\r\n },\r\n {\r\n key: 'Condition',\r\n label: t('Condition'),\r\n extra: (\r\n <div style={{ marginRight: 10 }}>\r\n <Switch checked={conditionEnabled} onChange={onConditionToggle} />\r\n </div>\r\n ),\r\n children: <Condition />\r\n }\r\n ] : [])\r\n ]}\r\n />\r\n <div />\r\n <div />\r\n <div />\r\n </Space>\r\n );\r\n};\r\n","import React, { useCallback } from 'react';\nimport { Padding } from '@extensions/AttributePanel/components/attributes/Padding';\nimport { Background } from '@extensions/AttributePanel/components/attributes/Background';\nimport { Border } from '@extensions/AttributePanel/components/attributes/Border';\nimport { AttributesPanelWrapper } from '@extensions/AttributePanel/components/attributes/AttributesPanelWrapper';\nimport { Col, Collapse, Row, Space, Switch } from 'antd';\nimport { Stack, useBlock, useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { BasicType, BlockManager } from '@thanhpv102/easy-email-core';\nimport { ClassName } from '../../attributes/ClassName';\nimport { CollapseWrapper } from '../../attributes/CollapseWrapper';\nimport { TextField } from '@extensions/components/Form';\n\nexport function Section() {\n const { focusBlock, setFocusBlock } = useBlock();\n const { focusIdx } = useFocusIdx();\n const noWrap = focusBlock?.data.value.noWrap;\n\n const onChange = useCallback(\n (checked: boolean) => {\n if (!focusBlock) return;\n focusBlock.data.value.noWrap = checked;\n if (checked) {\n const children = [...focusBlock.children];\n for (let i = 0; i < children.length; i++) {\n const child = children[i];\n if (!child) continue;\n if (child.type === BasicType.GROUP.toString()) {\n children.splice(i, 1, ...child.children);\n }\n }\n focusBlock.children = [\n BlockManager.getBlockByType(BasicType.GROUP)!.create({\n children: children,\n }),\n ];\n } else {\n if (\n focusBlock.children.length === 1 &&\n focusBlock.children[0].type === BasicType.GROUP.toString()\n ) {\n focusBlock.children = focusBlock.children[0]?.children || [];\n }\n }\n setFocusBlock({ ...focusBlock });\n },\n [focusBlock, setFocusBlock],\n );\n\n return (\n <AttributesPanelWrapper style={{ padding: 0 }}>\n <CollapseWrapper defaultActiveKey={['.$0']}>\n <Collapse.Panel\n key=\"0\"\n header={'Dimension'}\n >\n <Space orientation=\"vertical\" size=\"small\">\n <Row>\n <Col span={12}>\n <label style={{ width: '100%', display: 'flex' }}>\n <div style={{ flex: 1 }}>{'Group'}</div>\n </label>\n <Switch\n checked={noWrap}\n onChange={onChange}\n />\n </Col>\n <Col span={12} />\n </Row>\n <Row>\n <Col span={12}>\n <label style={{ width: '100%', display: 'flex' }}>\n <div style={{ flex: 1 }}>{'Full Width'}</div>\n </label>\n <TextField name={`${focusIdx}.attributes.full-width`} />\n </Col>\n <Col span={12} />\n </Row>\n\n <Padding />\n </Space>\n </Collapse.Panel>\n <Collapse.Panel\n key=\"1\"\n header={'Background'}\n >\n <Stack\n vertical\n spacing=\"tight\"\n >\n <Background />\n </Stack>\n </Collapse.Panel>\n <Collapse.Panel\n key=\"2\"\n header={'Border'}\n >\n <Border />\n </Collapse.Panel>\n <Collapse.Panel\n key=\"3\"\n header={'Extra'}\n >\n <Col span={24}>\n <ClassName />\n </Col>\n </Collapse.Panel>\n </CollapseWrapper>\n </AttributesPanelWrapper>\n );\n}\n","import React, { useCallback } from 'react';\nimport { InputWithUnitField } from '../../../components/Form';\nimport { useFocusIdx, useBlock } from '@thanhpv102/easy-email-editor';\nimport { BasicType, getParentByIdx } from '@thanhpv102/easy-email-core';\nimport { InputWithUnitProps } from '@extensions/components/Form/InputWithUnit';\nimport { UseFieldConfig } from '@thanhpv102/easy-email-editor';\n\nexport function Width({\n inline = false,\n unitOptions,\n config,\n}: {\n inline?: boolean;\n unitOptions?: InputWithUnitProps['unitOptions'];\n config?: UseFieldConfig;\n}) {\n const { focusIdx } = useFocusIdx();\n const { focusBlock, values } = useBlock();\n const parentType = values && getParentByIdx(values, focusIdx)?.type;\n\n const validate = useCallback(\n (val: string): string | undefined => {\n if (focusBlock?.type === BasicType.COLUMN.toString() && parentType === BasicType.GROUP.toString()) {\n return /(\\d)*%/.test(val)\n ? undefined\n : 'Column inside a group must have a width in percentage, not in pixel';\n }\n return undefined;\n },\n [focusBlock?.type, parentType],\n );\n\n return (\n <InputWithUnitField\n validate={validate}\n label={'Width'}\n inline={inline}\n name={`${focusIdx}.attributes.width`}\n unitOptions={unitOptions}\n config={config}\n />\n );\n}\n","\nimport React, { useMemo } from 'react';\nimport { useFocusIdx, Stack } from '@thanhpv102/easy-email-editor';\nimport { SelectField } from '../../../components/Form';\n\nconst options = [\n {\n value: 'top',\n get label() {\n return t('top');\n },\n },\n {\n value: 'middle',\n get label() {\n return t('middle');\n },\n },\n {\n value: 'bottom',\n get label() {\n return t('bottom');\n },\n },\n];\n\nexport function VerticalAlign({\n attributeName = 'vertical-align',\n}: {\n attributeName?: string;\n}) {\n const { focusIdx } = useFocusIdx();\n\n return useMemo(() => {\n return (\n <Stack>\n <SelectField\n style={{ width: 120 }}\n label={t('Vertical align')}\n name={`${focusIdx}.attributes.${attributeName}`}\n options={options}\n />\n </Stack>\n );\n }, [attributeName, focusIdx]);\n}\n","import React from 'react';\nimport { useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { RadioGroupField } from '../../../components/Form';\n\nconst options = [\n {\n value: 'left',\n get label() {\n return t('left');\n },\n },\n {\n value: 'center',\n get label() {\n return t('center');\n },\n },\n {\n value: 'right',\n get label() {\n return t('right');\n },\n },\n];\n\nexport function Align({ inline }: { inline?: boolean }) {\n const { focusIdx } = useFocusIdx();\n\n return (\n <RadioGroupField\n label={t('Align')}\n key={`${focusIdx}.attributes.align`}\n options={options}\n name={`${focusIdx}.attributes.align`}\n />\n );\n}\n","import React from 'react';\r\nimport { ColorPickerField } from '../../../components/Form';\r\nimport { useFocusIdx } from '@thanhpv102/easy-email-editor';\r\n\r\nexport function Color({ title = t('Color') }: { title?: string; inline?: boolean }) {\r\n const { focusIdx } = useFocusIdx();\r\n\r\n return (\r\n <ColorPickerField\r\n label={title}\r\n name={`${focusIdx}.attributes.color`}\r\n key={`${focusIdx}.attributes.color`}\r\n />\r\n );\r\n}\r\n","import React, { useMemo } from 'react';\nimport { TextField } from '../../../components/Form';\nimport { Stack, UseFieldConfig, useFocusIdx } from '@thanhpv102/easy-email-editor';\n\nexport function Height({\n inline,\n config,\n }: {\n inline?: boolean;\n config?: UseFieldConfig;\n}) {\n const { focusIdx } = useFocusIdx();\n\n return useMemo(() => {\n return (\n <Stack wrap={false}>\n <Stack.Item fill>\n <TextField\n label={'Height'}\n name={`${focusIdx}.attributes.height`}\n quickchange\n inline={inline}\n config={config}\n />\n </Stack.Item>\n </Stack>\n );\n }, [focusIdx, inline]);\n}\n","\nimport React, { useMemo } from 'react';\nimport { useFocusIdx, Stack } from '@thanhpv102/easy-email-editor';\nimport { RadioGroupField } from '../../../components/Form';\n\nconst options = [\n {\n value: 'left',\n get label() {\n return t('Left');\n },\n },\n {\n value: 'center',\n get label() {\n return t('Center');\n },\n },\n {\n value: 'right',\n get label() {\n return t('Right');\n },\n },\n];\n\nexport function TextAlign({ name }: { name?: string }) {\n const { focusIdx } = useFocusIdx();\n\n return useMemo(() => {\n return (\n <Stack>\n <RadioGroupField\n label={t('Text align')}\n name={name || `${focusIdx}.attributes.text-align`}\n options={options}\n />\n </Stack>\n );\n }, [focusIdx, name]);\n}\n","\r\nimport React, { useMemo } from 'react';\r\nimport { ColorPickerField } from '../../../components/Form';\r\nimport { useFocusIdx } from '@thanhpv102/easy-email-editor';\r\n\r\nexport function ContainerBackgroundColor({\r\n title = t('Container background color'),\r\n}: {\r\n title?: string;\r\n}) {\r\n const { focusIdx } = useFocusIdx();\r\n\r\n return useMemo(() => {\r\n return (\r\n <ColorPickerField\r\n label={title}\r\n name={`${focusIdx}.attributes.container-background-color`}\r\n />\r\n );\r\n }, [focusIdx, title]);\r\n}\r\n","\nimport React from 'react';\nimport { InputWithUnitField } from '../../../components/Form';\nimport { useFocusIdx } from '@thanhpv102/easy-email-editor';\n\nexport function LetterSpacing({ name }: { name?: string; }) {\n const { focusIdx } = useFocusIdx();\n\n return (\n <InputWithUnitField\n label={t('Letter spacing')}\n name={name || `${focusIdx}.attributes.letter-spacing`}\n />\n );\n}\n","\nimport React, { useMemo } from 'react';\nimport { useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { SelectField } from '../../../components/Form';\n\nconst options = [\n {\n value: '',\n get label() {\n return 'None';\n },\n },\n {\n value: 'underline',\n get label() {\n return 'Underline';\n },\n },\n {\n value: 'overline',\n get label() {\n return 'Overline';\n },\n },\n {\n value: 'line-through',\n get label() {\n return 'Line through';\n },\n },\n {\n value: 'blink',\n get label() {\n return 'Blink';\n },\n },\n {\n value: 'inherit',\n get label() {\n return 'Inherit';\n },\n },\n];\n\nexport function TextDecoration({ name }: { name?: string }) {\n const { focusIdx } = useFocusIdx();\n\n return useMemo(() => {\n return (\n <SelectField\n label={'Text decoration'}\n name={name || `${focusIdx}.attributes.text-decoration`}\n options={options}\n />\n );\n }, [focusIdx, name]);\n}\n","\r\nimport React, { useMemo } from 'react';\r\nimport { NumberField, TextField } from '../../../components/Form';\r\nimport { useFocusIdx, Stack, TextStyle } from '@thanhpv102/easy-email-editor';\r\n\r\nexport function Decoration() {\r\n const { focusIdx } = useFocusIdx();\r\n\r\n return useMemo(() => {\r\n return (\r\n <Stack\r\n vertical\r\n spacing='extraTight'\r\n >\r\n <TextStyle\r\n variation='strong'\r\n size='medium'\r\n >\r\n Decoration\r\n </TextStyle>\r\n <TextField\r\n label={t('Border radius')}\r\n name={`${focusIdx}.attributes.borderRadius`}\r\n inline\r\n />\r\n <TextField\r\n label={t('Border')}\r\n name={`${focusIdx}.attributes.border`}\r\n inline\r\n />\r\n <NumberField\r\n label={t('Opacity')}\r\n max={1}\r\n min={0}\r\n step={0.1}\r\n name={`${focusIdx}.attributes.opacity`}\r\n inline\r\n />\r\n </Stack>\r\n );\r\n }, [focusIdx]);\r\n}\r\n","\nimport React from 'react';\nimport { InputWithUnitField } from '../../../components/Form';\nimport { useFocusIdx } from '@thanhpv102/easy-email-editor';\n\nexport function LineHeight({ name }: { name?: string; }) {\n const { focusIdx } = useFocusIdx();\n\n return (\n <InputWithUnitField\n label={t('Line height')}\n unitOptions='percent'\n name={name || `${focusIdx}.attributes.line-height`}\n />\n );\n}\n","\nimport React, { useMemo } from 'react';\nimport { useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { SelectField } from '../../../components/Form';\n\nconst options = [\n {\n value: 'initial',\n get label() {\n return t('None');\n },\n },\n {\n value: 'uppercase',\n get label() {\n return t('uppercase');\n },\n },\n {\n value: 'lowercase',\n get label() {\n return t('lowercase');\n },\n },\n {\n value: 'capitalize',\n get label() {\n return t('capitalize');\n },\n },\n];\n\nexport function TextTransform({ name }: { name?: string }) {\n const { focusIdx } = useFocusIdx();\n\n return useMemo(() => {\n return (\n <SelectField\n label={t('Text transform')}\n name={name || `${focusIdx}.attributes.text-transform`}\n options={options}\n />\n );\n }, [focusIdx, name]);\n}\n","\nimport React, { useMemo } from 'react';\nimport { useFocusIdx, Stack } from '@thanhpv102/easy-email-editor';\nimport { RadioGroupField } from '../../../components/Form';\n\nconst options = [\n {\n value: 'ltr',\n get label() {\n return 'ltr';\n },\n },\n {\n value: 'rtl',\n get label() {\n return 'rtl';\n },\n },\n];\n\nexport function Direction() {\n const { focusIdx } = useFocusIdx();\n\n return useMemo(() => {\n return (\n <Stack>\n <RadioGroupField\n label={t('Direction')}\n name={`${focusIdx}.attributes.direction`}\n options={options}\n inline\n />\n </Stack>\n );\n }, [focusIdx]);\n}\n","import { IBlockData, BlockManager, getParentIdx } from '@thanhpv102/easy-email-core';\nimport { get, cloneDeep } from 'lodash';\n\nexport function getContextMergeTags(\n mergeTags: { [key: string]: any },\n context: { [key: string]: any },\n idx: string,\n) {\n const loop = (\n currentIdx: string,\n combineMergeTags: { [key: string]: any },\n ): { [key: string]: any } => {\n const parentBlockData = get(context, currentIdx) as IBlockData | undefined;\n if (!parentBlockData) return combineMergeTags;\n\n const dataSource = parentBlockData.data?.value?.dataSource;\n if (!dataSource) return combineMergeTags;\n\n Object.keys(dataSource).forEach(key => {\n let formatKey: string = dataSource[key];\n\n const loopFormatKey = (currentLoopKeyIdx: string) => {\n const currentParentIdx = getParentIdx(currentLoopKeyIdx);\n if (currentParentIdx) {\n const currentBlockData = get(context, currentParentIdx) as IBlockData;\n\n if (!currentBlockData) return formatKey;\n currentBlockData.data.value.dataSource &&\n Object.keys(currentBlockData.data.value.dataSource).forEach(item => {\n formatKey = formatKey.replace(\n item,\n currentBlockData.data.value.dataSource[item].replace(\n /{{([^}}]+)}}/g,\n '$1',\n ),\n );\n });\n\n loopFormatKey(currentParentIdx);\n }\n };\n loopFormatKey(currentIdx);\n\n const dataSourcePath = formatKey.replace(/{{([^}}]+)}}/g, '$1');\n combineMergeTags = {\n [key]: get(combineMergeTags, dataSourcePath),\n ...combineMergeTags,\n };\n });\n\n const parentIdx = getParentIdx(currentIdx);\n if (!parentIdx) return combineMergeTags;\n return loop(parentIdx, combineMergeTags);\n };\n\n return loop(idx, cloneDeep(mergeTags));\n}\n","import React, { useCallback, useMemo, useState } from 'react';\nimport { Tree, TreeSelect } from 'antd';\nimport { get, isObject } from 'lodash';\nimport { useBlock, useEditorProps, useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { getContextMergeTags } from '@extensions/utils/getContextMergeTags';\n\ninterface TreeNodeData {\n key: string;\n value: string;\n title: string;\n children: TreeNodeData[];\n}\n\ninterface MergeTagObject {\n [key: string]: string | number | boolean | MergeTagObject | MergeTagObject[] | undefined;\n}\n\nexport const MergeTags: React.FC<{\n onChange: (v: string) => void;\n value: string;\n isSelect?: boolean;\n}> = React.memo((props) => {\n const [expandedKeys, setExpandedKeys] = useState<string[]>([]);\n const { focusIdx } = useFocusIdx();\n const {\n mergeTags = {},\n mergeTagGenerate,\n renderMergeTagContent,\n } = useEditorProps();\n const { values } = useBlock();\n\n const contextMergeTags = useMemo(\n () => values && getContextMergeTags(mergeTags, values, focusIdx),\n [mergeTags, values, focusIdx]\n );\n\n const treeOptions = useMemo(() => {\n const treeData: TreeNodeData[] = [];\n const deep = (\n key: string,\n title: string,\n parent: MergeTagObject,\n mapData: TreeNodeData[] = []\n ) => {\n const currentMapData: TreeNodeData = {\n key: key,\n value: key,\n title: title,\n children: [],\n };\n\n mapData.push(currentMapData);\n const current = parent[title];\n if (current && typeof current === 'object' && !Array.isArray(current)) {\n Object.keys(current as Record<string, unknown>).forEach((childKey) =>\n deep(key + '.' + childKey, childKey, current, currentMapData.children)\n );\n }\n };\n\n if (!contextMergeTags) return treeData;\n\n Object.keys(contextMergeTags).forEach((key) =>\n deep(key, key, contextMergeTags, treeData)\n );\n return treeData;\n }, [contextMergeTags]);\n\n const onSelect = useCallback(\n (key: string) => {\n const value = get(contextMergeTags, key);\n if (isObject(value)) {\n setExpandedKeys((keys) => {\n if (keys.includes(key)) {\n return keys.filter((k) => k !== key);\n } else {\n return [...keys, key];\n }\n });\n return;\n }\n return props.onChange(mergeTagGenerate(key));\n },\n [contextMergeTags, props, mergeTagGenerate]\n );\n\n const mergeTagContent = useMemo(\n () =>\n renderMergeTagContent ? (\n renderMergeTagContent({\n onChange: props.onChange,\n isSelect: Boolean(props.isSelect),\n value: props.value,\n })\n ) : (\n <></>\n ),\n [renderMergeTagContent, props.onChange, props.isSelect, props.value]\n );\n\n if (renderMergeTagContent) {\n return <>{mergeTagContent}</>;\n }\n\n return (\n <div style={{ color: '#333' }}>\n {props.isSelect ? (\n <TreeSelect\n value={props.value}\n size='small'\n popupMatchSelectWidth\n placeholder={'Please select'}\n treeData={treeOptions}\n onChange={(val) => onSelect(val)}\n style={{ maxHeight: 400, overflow: 'auto' }}\n />\n ) : (\n <Tree\n expandedKeys={expandedKeys}\n onExpand={(keys) => setExpandedKeys(keys.map(k => String(k)))}\n selectedKeys={[]}\n treeData={treeOptions}\n onSelect={(selectedKeys) => onSelect(String(selectedKeys[0]))}\n style={{\n maxHeight: 400,\n overflow: 'auto',\n }}\n />\n )}\n </div>\n );\n});\n","import React, { useMemo } from 'react';\nimport { useFocusIdx, IconFont } from '@thanhpv102/easy-email-editor';\nimport { LinkOutlined } from '@ant-design/icons';\nimport { SelectField, TextField } from '../../../components/Form';\nimport { Row, Col, Popover, Space, Button } from 'antd';\nimport { MergeTags } from './MergeTags';\nimport { useField } from '@thanhpv102/easy-email-editor';\n\nexport function Link() {\n const { focusIdx } = useFocusIdx();\n const { input } = useField(`${focusIdx}.attributes.href`, {\n parse: (v: string) => v,\n });\n\n return useMemo(() => {\n return (\n <Row>\n <Col span={11}>\n <TextField\n prefix={<LinkOutlined />}\n label={\n (\n <Space>\n <span>{'Href'} </span>\n <Popover\n trigger='click'\n content={\n <MergeTags value={input.value || ''} onChange={input.onChange} />\n }\n >\n <Button\n type='text'\n icon={<IconFont iconName='icon-merge-tags' />}\n />\n </Popover>\n </Space>\n )\n }\n name={`${focusIdx}.attributes.href`}\n />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <SelectField\n label={'Target'}\n name={`${focusIdx}.attributes.target`}\n options={[\n {\n value: '',\n label: '_self',\n },\n {\n value: '_blank',\n label: '_blank',\n },\n ]}\n />\n </Col>\n </Row>\n );\n }, [focusIdx, input.value, input.onChange]);\n}\n","import React, { useMemo } from 'react';\nimport { TextField } from '../../../components/Form';\nimport { useFocusIdx, Stack, TextStyle } from '@thanhpv102/easy-email-editor';\n\nexport function Margin() {\n const { focusIdx } = useFocusIdx();\n\n return useMemo(() => {\n return (\n <Stack vertical spacing='extraTight'>\n <TextStyle size='medium'>{'Margin'}</TextStyle>\n <Stack wrap={false}>\n <Stack.Item fill>\n <TextField\n label={'Top'}\n quickchange\n name={`${focusIdx}.attributes.marginTop`}\n inline\n />\n </Stack.Item>\n <Stack.Item fill>\n <TextField\n label={'Bottom'}\n quickchange\n name={`${focusIdx}.attributes.marginBottom`}\n inline\n />\n </Stack.Item>\n </Stack>\n\n <Stack wrap={false}>\n <Stack.Item fill>\n <TextField\n label={'Left'}\n quickchange\n name={`${focusIdx}.attributes.marginLeft`}\n inline\n />\n </Stack.Item>\n <Stack.Item fill>\n <TextField\n label={'Right'}\n quickchange\n name={`${focusIdx}.attributes.marginRight`}\n inline\n />\n </Stack.Item>\n </Stack>\n </Stack>\n );\n }, [focusIdx]);\n}\n","import React, { useMemo } from 'react';\nimport { ColorPickerField } from '../../../components/Form';\nimport { useFocusIdx } from '@thanhpv102/easy-email-editor';\n\nexport function BorderColor() {\n const { focusIdx } = useFocusIdx();\n\n return useMemo(() => {\n return (\n <ColorPickerField\n label={t('Color')}\n name={`${focusIdx}.attributes.border-color`}\n key={`${focusIdx}.attributes.border-color`}\n />\n );\n }, [focusIdx]);\n}\n","\nimport React from 'react';\nimport { useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { InputWithUnitField } from '../../../components/Form';\nimport { pixelAdapter } from '../adapter';\n\nexport function FontSize() {\n const { focusIdx } = useFocusIdx();\n\n return (\n <InputWithUnitField\n label={'Font size (px)'}\n name={`${focusIdx}.attributes.font-size`}\n config={pixelAdapter}\n autoComplete='off'\n />\n );\n}\n","import React, { useMemo } from 'react';\nimport { useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { SelectField } from '../../../components/Form';\n\nexport const borderStyleOptions = [\n {\n value: 'dashed',\n get label() {\n return 'Dashed';\n },\n },\n {\n value: 'dotted',\n get label() {\n return 'Dotted';\n },\n },\n {\n value: 'solid',\n get label() {\n return 'Solid';\n },\n },\n {\n value: 'double',\n get label() {\n return 'double';\n },\n },\n {\n value: 'ridge',\n get label() {\n return 'ridge';\n },\n },\n {\n value: 'groove',\n get label() {\n return 'groove';\n },\n },\n {\n value: 'inset',\n get label() {\n return 'inset';\n },\n },\n {\n value: 'outset',\n get label() {\n return 'outset';\n },\n },\n];\n\nexport function BorderStyle() {\n const { focusIdx } = useFocusIdx();\n\n return useMemo(() => {\n return (\n <SelectField\n label={'Style'}\n name={`${focusIdx}.attributes.border-style`}\n key={`${focusIdx}.attributes.border-style`}\n options={borderStyleOptions}\n />\n );\n }, [focusIdx]);\n}\n","\nimport React from 'react';\nimport { useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { RadioGroupField } from '../../../components/Form';\n\nconst options = [\n {\n value: 'normal',\n get label() {\n return t('Normal');\n },\n },\n {\n value: 'italic',\n get label() {\n return t('Italic');\n },\n },\n];\n\nexport function FontStyle({ name }: { name?: string }) {\n const { focusIdx } = useFocusIdx();\n\n return (\n <RadioGroupField\n label={t('Font style')}\n name={name || `${focusIdx}.attributes.font-style`}\n options={options}\n />\n );\n}\n","/* eslint-disable @typescript-eslint/no-unsafe-call */\nimport React, { useMemo } from 'react';\nimport { Stack } from '@thanhpv102/easy-email-editor';\nimport { Padding } from './Padding';\n\nexport function NavbarLinkPadding({ name }: { name: string; }) {\n return useMemo(() => {\n return (\n <Stack vertical spacing='extraTight'>\n <Padding key={name} />\n </Stack>\n );\n }, [name]);\n}\n","import React, { useMemo } from 'react';\nimport { useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { TextField } from '../../../components/Form';\n\nexport function BorderWidth() {\n const { focusIdx } = useFocusIdx();\n\n return useMemo(() => {\n return (\n <TextField\n label={'Width'}\n quickchange\n name={`${focusIdx}.attributes.border-width`}\n key={`${focusIdx}.attributes.border-width`}\n />\n );\n }, [focusIdx]);\n}\n","\nimport React, { useMemo } from 'react';\nimport { useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { SelectField } from '../../../components/Form';\n\nconst options = [\n {\n value: 'normal',\n get label() {\n return t('Normal');\n },\n },\n {\n value: 'bold',\n get label() {\n return t('Bold');\n },\n },\n {\n value: '100',\n label: '100',\n },\n {\n value: '200',\n label: '200',\n },\n {\n value: '300',\n label: '300',\n },\n {\n value: '400',\n label: '400',\n },\n {\n value: '500',\n label: '500',\n },\n {\n value: '600',\n label: '600',\n },\n {\n value: '700',\n label: '700',\n },\n {\n value: '800',\n label: '800',\n },\n {\n value: '900',\n label: '900',\n },\n];\n\nexport function FontWeight({ name }: { name?: string }) {\n const { focusIdx } = useFocusIdx();\n\n return useMemo(() => {\n return (\n <SelectField\n label={t('Font weight')}\n name={name || `${focusIdx}.attributes.font-weight`}\n options={options}\n />\n );\n }, [focusIdx, name]);\n}\n","import React from 'react';\nimport { Col, Collapse, Row, Space } from 'antd';\nimport { AttributesPanelWrapper } from '@extensions/AttributePanel/components/attributes/AttributesPanelWrapper';\nimport { Padding } from '@extensions/AttributePanel/components/attributes/Padding';\nimport { Width } from '@extensions/AttributePanel/components/attributes/Width';\nimport { VerticalAlign } from '@extensions/AttributePanel/components/attributes/VerticalAlign';\nimport { Border } from '@extensions/AttributePanel/components/attributes/Border';\nimport { ClassName } from '../../attributes/ClassName';\nimport { CollapseWrapper } from '../../attributes/CollapseWrapper';\nimport { BackgroundColor } from '../../attributes';\n\nexport function Column() {\n return (\n <AttributesPanelWrapper>\n <CollapseWrapper defaultActiveKey={['.$0']}>\n <Collapse.Panel\n key=\"0\"\n header={t('Dimension')}\n >\n <Space orientation=\"vertical\" size=\"small\">\n <Row>\n <Col span={11}>\n <Width />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <VerticalAlign />\n </Col>\n </Row>\n\n <Padding />\n </Space>\n </Collapse.Panel>\n <Collapse.Panel\n key=\"1\"\n header={t('Background')}\n >\n <BackgroundColor />\n </Collapse.Panel>\n <Collapse.Panel\n key=\"2\"\n header={t('Border')}\n >\n <Border />\n </Collapse.Panel>\n <Collapse.Panel\n key=\"4\"\n header={t('Extra')}\n >\n <Col span={24}>\n <ClassName />\n </Col>\n </Collapse.Panel>\n </CollapseWrapper>\n </AttributesPanelWrapper>\n );\n}\n","import React, { useState, useEffect } from 'react';\nimport ReactDOM from 'react-dom';\n\nexport const ShadowDom: React.FC<React.HTMLProps<HTMLElement>> = (props) => {\n const [root, setRoot] = useState<null | ShadowRoot>(null);\n const [ref, setRef] = useState<null | HTMLDivElement>(null);\n\n useEffect(() => {\n if (ref) {\n const root = ref.attachShadow({ mode: 'open' });\n setRoot(root);\n }\n }, [ref]);\n\n // Extract key and children to avoid React 19 spreading issues\n const { key, children, ...divProps } = props;\n\n return (\n <>\n <div key={key} {...divProps} ref={setRef}>\n {root && ReactDOM.createPortal(children, root as any)}\n </div>\n </>\n );\n};\n","import { Button, Drawer } from 'antd';\nimport React, { Suspense, useEffect, useMemo, useState } from 'react';\nimport { BasicType, IText } from '@thanhpv102/easy-email-core';\nimport { Stack, TextStyle, useBlock, useEditorContext, useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { ShadowDom } from '@extensions/components/ShadowDom';\n\nconst CodeMirrorEditorPromise = import(\n '../../../components/Form/CodemirrorEditor'\n);\nconst CodeMirrorEditor = React.lazy(() => CodeMirrorEditorPromise);\n\nexport const HtmlEditor: React.FC<{\n visible: boolean;\n setVisible: (v: boolean) => void;\n}> = (props) => {\n const { visible, setVisible } = props;\n\n const { focusBlock, setValueByIdx } = useBlock();\n const { pageData } = useEditorContext();\n const { focusIdx } = useFocusIdx();\n const [content, setContent] = useState(focusBlock?.data.value.content);\n\n const isTable = focusBlock?.type === BasicType.TABLE;\n\n useEffect(() => {\n setContent(focusBlock?.data.value.content);\n }, [focusBlock?.data.value.content]);\n\n const onClose = () => {\n setVisible(false);\n };\n\n const onSave = () => {\n if (!focusBlock) return;\n focusBlock.data.value.content = content;\n setValueByIdx(focusIdx, { ...focusBlock });\n onClose();\n };\n\n const styles = useMemo(() => {\n if (!focusBlock) return {};\n\n const attributes = focusBlock.attributes as IText['attributes'];\n return {\n color: attributes.color || pageData?.data.value['text-color'],\n fontSize: attributes['font-size'] || pageData?.data.value['font-size'],\n fontFamily:\n attributes['font-family'] || pageData?.data.value['font-family'],\n fontWeight:\n attributes['font-weight'] || pageData?.data.value['font-weight'],\n backgroundColor: attributes['container-background-color'],\n padding: attributes.padding,\n };\n }, [focusBlock, pageData?.data.value]);\n\n return (\n <Drawer\n placement='left'\n title={(\n <Stack distribution='equalSpacing'>\n <TextStyle variation='strong' size='medium'>\n {'Html'}\n </TextStyle>\n <Stack>\n <Button type='primary' onClick={onSave}>\n {'Save'}\n </Button>\n </Stack>\n </Stack>\n )}\n open={visible}\n footer={null}\n styles={{\n header: { display: 'block', lineHeight: '48px' },\n body: { padding: 0, overflow: 'hidden' },\n wrapper: { width: '100vw' },\n }}\n >\n <div style={{ display: 'flex', height: '100%' }}>\n <div style={{ flex: 1, height: '100%' }}>\n <Suspense\n fallback={(\n <div\n style={{\n height: '100%',\n width: '100%',\n display: 'flex',\n alignItems: 'center',\n backgroundColor: '#263238',\n justifyContent: 'center',\n fontSize: 24,\n color: '#fff',\n }}\n >\n {'Editor Loading...'}\n </div>\n )}\n >\n <CodeMirrorEditor value={content} onChange={setContent} />\n </Suspense>\n </div>\n <div\n style={{ flex: 1, height: '100%', overflow: 'auto', marginRight: 10 }}\n >\n <ShadowDom\n style={{\n ...styles,\n width: pageData?.attributes.width || '600px',\n margin: 'auto',\n }}\n >\n {isTable ? (\n <table>\n <tbody dangerouslySetInnerHTML={{ __html: content }} />\n </table>\n ) : (\n <div dangerouslySetInnerHTML={{ __html: content }} />\n )}\n </ShadowDom>\n </div>\n </div>\n </Drawer>\n );\n};\n","import React, { useState } from 'react';\nimport { Padding } from '@extensions/AttributePanel/components/attributes/Padding';\nimport { TextDecoration } from '@extensions/AttributePanel/components/attributes/TextDecoration';\nimport { FontWeight } from '@extensions/AttributePanel/components/attributes/FontWeight';\nimport { FontStyle } from '@extensions/AttributePanel/components/attributes/FontStyle';\nimport { FontFamily } from '@extensions/AttributePanel/components/attributes/FontFamily';\nimport { Height } from '@extensions/AttributePanel/components/attributes/Height';\nimport { ContainerBackgroundColor } from '@extensions/AttributePanel/components/attributes/ContainerBackgroundColor';\nimport { FontSize } from '@extensions/AttributePanel/components/attributes/FontSize';\nimport { Color } from '@extensions/AttributePanel/components/attributes/Color';\nimport { Align } from '@extensions/AttributePanel/components/attributes/Align';\nimport { LineHeight } from '@extensions/AttributePanel/components/attributes/LineHeight';\nimport { LetterSpacing } from '@extensions/AttributePanel/components/attributes/LetterSpacing';\n\nimport { AttributesPanelWrapper } from '@extensions/AttributePanel/components/attributes/AttributesPanelWrapper';\nimport { Button, Col, Collapse, Row, Space, Tooltip } from 'antd';\nimport { IconFont } from '@thanhpv102/easy-email-editor';\nimport { HtmlEditor } from '../../UI/HtmlEditor';\nimport { ClassName } from '../../attributes/ClassName';\nimport { CollapseWrapper } from '../../attributes/CollapseWrapper';\n\nexport function Text() {\n const [visible, setVisible] = useState(false);\n\n return (\n <AttributesPanelWrapper\n extra={(\n <Tooltip title={t('Html mode')}>\n <Button\n onClick={() => setVisible(true)}\n icon={<IconFont iconName=\"icon-html\" />}\n />\n </Tooltip>\n )}\n >\n <CollapseWrapper defaultActiveKey={['.$0']}>\n <Collapse.Panel\n key=\"0\"\n header={t('Dimension')}\n >\n <Space orientation=\"vertical\" size=\"small\">\n <Height />\n <Padding showResetAll />\n </Space>\n </Collapse.Panel>\n <Collapse.Panel\n key=\"1\"\n header={t('Color')}\n >\n <Row>\n <Col span={11}>\n <Color />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <ContainerBackgroundColor title={t('Background color')} />\n </Col>\n </Row>\n </Collapse.Panel>\n <Collapse.Panel\n key=\"2\"\n header={t('Typography')}\n >\n <Space orientation=\"vertical\" size=\"small\">\n <Row>\n <Col span={11}>\n <FontFamily />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <FontSize />\n </Col>\n </Row>\n\n <Row>\n <Col span={11}>\n <LineHeight />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <LetterSpacing />\n </Col>\n </Row>\n\n <Row>\n <Col span={11}>\n <TextDecoration />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <FontWeight />\n </Col>\n </Row>\n\n <Align />\n\n <FontStyle />\n\n <Row>\n <Col span={11} />\n <Col\n offset={1}\n span={11}\n />\n </Row>\n </Space>\n </Collapse.Panel>\n <Collapse.Panel\n key=\"4\"\n header={t('Extra')}\n >\n <Col span={24}>\n <ClassName />\n </Col>\n </Collapse.Panel>\n </CollapseWrapper>\n <HtmlEditor\n visible={visible}\n setVisible={setVisible}\n />\n </AttributesPanelWrapper>\n );\n}\n","import React from 'react';\nimport { Padding } from '@extensions/AttributePanel/components/attributes/Padding';\nimport { ColorPickerField, ImageUploaderField, SwitchField, TextField } from '@extensions/components/Form';\nimport { Width } from '@extensions/AttributePanel/components/attributes/Width';\nimport { Height } from '@extensions/AttributePanel/components/attributes/Height';\nimport { Link } from '@extensions/AttributePanel/components/attributes/Link';\nimport { Align } from '@extensions/AttributePanel/components/attributes/Align';\n\nimport { AttributesPanelWrapper } from '@extensions/AttributePanel/components/attributes/AttributesPanelWrapper';\nimport { Col, Collapse, Row, Space } from 'antd';\nimport { Border } from '@extensions/AttributePanel/components/attributes/Border';\nimport { Stack, useEditorProps, useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { CollapseWrapper } from '../../attributes/CollapseWrapper';\nimport { imageHeightAdapter, pixelAdapter } from '../../adapter';\n\nconst fullWidthOnMobileAdapter = {\n format(obj: boolean | string) {\n return Boolean(obj);\n },\n parse(val: boolean) {\n if (!val) return undefined;\n\n return 'true';\n },\n};\n\nexport function Image() {\n const { focusIdx } = useFocusIdx();\n const { onUploadImage, enableAssetManager } = useEditorProps();\n\n return (\n <AttributesPanelWrapper style={{ padding: 0 }}>\n <CollapseWrapper defaultActiveKey={['.$0']}>\n <Collapse.Panel\n key=\"0\"\n header={t('Setting')}\n >\n <Stack\n vertical\n spacing=\"tight\"\n >\n <ImageUploaderField\n label={t('src')}\n labelHidden\n name={`${focusIdx}.attributes.src`}\n helpText={t(\n 'The image suffix should be .jpg, jpeg, png, gif, etc. Otherwise, the picture may not be displayed normally.',\n )}\n uploadHandler={onUploadImage}\n enableSelectFromLibrary={enableAssetManager}\n />\n <ColorPickerField\n label={t('Background color')}\n name={`${focusIdx}.attributes.container-background-color`}\n inline\n />\n <SwitchField\n label={t('Full width on mobile')}\n name={`${focusIdx}.attributes.fluid-on-mobile`}\n config={fullWidthOnMobileAdapter}\n />\n </Stack>\n </Collapse.Panel>\n\n <Collapse.Panel\n key=\"1\"\n header={t('Dimension')}\n >\n <Space orientation=\"vertical\" size=\"small\">\n <Row>\n <Col span={11}>\n <Width config={pixelAdapter} />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <Height config={imageHeightAdapter} />\n </Col>\n </Row>\n\n <Padding showResetAll />\n <Row>\n <Col span={24}>\n <Align />\n </Col>\n </Row>\n </Space>\n </Collapse.Panel>\n\n <Collapse.Panel\n key=\"2\"\n header={t('Link')}\n >\n <Stack\n vertical\n spacing=\"tight\"\n >\n <Link />\n </Stack>\n </Collapse.Panel>\n\n <Collapse.Panel\n key=\"3\"\n header={t('Border')}\n >\n <Border />\n </Collapse.Panel>\n\n <Collapse.Panel\n key=\"4\"\n header={t('Extra')}\n >\n <Row>\n <Col span={11}>\n <TextField\n label={t('title')}\n name={`${focusIdx}.attributes.title`}\n />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <TextField\n label={t('alt')}\n name={`${focusIdx}.attributes.alt`}\n />\n </Col>\n </Row>\n <Col span={24}>\n <TextField\n label={t('class name')}\n name={`${focusIdx}.attributes.css-class`}\n />\n </Col>\n </Collapse.Panel>\n </CollapseWrapper>\n </AttributesPanelWrapper>\n );\n}\n","import React from 'react';\nimport { Width } from '@extensions/AttributePanel/components/attributes/Width';\nimport { BackgroundColor } from '@extensions/AttributePanel/components/attributes/BackgroundColor';\nimport { VerticalAlign } from '@extensions/AttributePanel/components/attributes/VerticalAlign';\nimport { Col, Collapse, Row } from 'antd';\nimport { AttributesPanelWrapper } from '@extensions/AttributePanel/components/attributes/AttributesPanelWrapper';\nimport { ClassName } from '../../attributes/ClassName';\nimport { CollapseWrapper } from '../../attributes/CollapseWrapper';\n\nexport function Group() {\n return (\n <AttributesPanelWrapper>\n <CollapseWrapper defaultActiveKey={['.$0']}>\n <Collapse.Panel key=\"0\" header={t('Dimension')}>\n <Row>\n <Col span={11}>\n <Width />\n </Col>\n <Col offset={1} span={11}>\n <VerticalAlign />\n </Col>\n </Row>\n </Collapse.Panel>\n <Collapse.Panel key=\"1\" header={t('Background')}>\n <Row>\n <Col span={11}>\n <BackgroundColor />\n </Col>\n <Col offset={1} span={11} />\n </Row>\n </Collapse.Panel>\n <Collapse.Panel key=\"2\" header={t('Extra')}>\n <Col span={24}>\n <ClassName />\n </Col>\n </Collapse.Panel>\n </CollapseWrapper>\n </AttributesPanelWrapper>\n );\n}\n","import React from 'react';\nimport { Padding } from '../../attributes/Padding';\nimport { Border } from '../../attributes/Border';\nimport { BackgroundColor } from '../../attributes/BackgroundColor';\nimport { Color } from '../../attributes/Color';\nimport { Link } from '../../attributes/Link';\nimport { Width } from '../../attributes/Width';\nimport { ContainerBackgroundColor } from '../../attributes/ContainerBackgroundColor';\nimport { Align } from '../../attributes/Align';\nimport { FontSize } from '../../attributes/FontSize';\nimport { FontStyle } from '../../attributes/FontStyle';\nimport { FontWeight } from '../../attributes/FontWeight';\nimport { FontFamily } from '../../attributes/FontFamily';\nimport { TextDecoration } from '../../attributes/TextDecoration';\nimport { LineHeight } from '../../attributes/LineHeight';\nimport { LetterSpacing } from '../../attributes/LetterSpacing';\nimport { Col, Collapse, Popover, Row, Space, Button as AntButton } from 'antd';\nimport { TextField } from '../../../../components/Form';\nimport { IconFont, useEditorProps, useField, useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { AttributesPanelWrapper } from '../../attributes/AttributesPanelWrapper';\nimport { MergeTags } from '../../attributes';\nimport { ClassName } from '../../attributes/ClassName';\nimport { CollapseWrapper } from '../../attributes/CollapseWrapper';\n\nexport function Button() {\n const { focusIdx } = useFocusIdx();\n const { input } = useField(`${focusIdx}.data.value.content`, {\n parse: (v: string) => v,\n });\n\n const { mergeTags } = useEditorProps();\n\n return (\n <AttributesPanelWrapper>\n <CollapseWrapper defaultActiveKey={['.$0']}>\n <Collapse.Panel\n key=\"0\"\n header={'Setting'}\n >\n <Space orientation=\"vertical\" size=\"small\">\n <TextField\n label={(\n <Space>\n <span>{'Content'}</span>\n {mergeTags && (\n <Popover\n trigger=\"click\"\n content={(\n <MergeTags\n value={input.value || ''}\n onChange={input.onChange}\n />\n )}\n >\n <AntButton\n type=\"text\"\n icon={<IconFont iconName=\"icon-merge-tags\" />}\n />\n </Popover>\n )}\n </Space>\n )}\n name={`${focusIdx}.data.value.content`}\n />\n <Link />\n </Space>\n </Collapse.Panel>\n\n <Collapse.Panel\n key=\"1\"\n header={'Dimension'}\n >\n <Space orientation=\"vertical\" size=\"small\">\n <Row>\n <Col span={11}>\n <Width />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <FontWeight />\n </Col>\n </Row>\n\n <Padding\n title={'Padding'}\n attributeName=\"padding\"\n showResetAll\n />\n <Padding\n title={'Inner padding'}\n attributeName=\"inner-padding\"\n />\n </Space>\n </Collapse.Panel>\n\n <Collapse.Panel\n key=\"2\"\n header={'Color'}\n >\n <Space orientation=\"vertical\" size=\"small\">\n <Row>\n <Col span={11}>\n <Color title={'Text color'} />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <BackgroundColor title={'Button color'} />\n </Col>\n <Col span={11}>\n <ContainerBackgroundColor title={'Background color'} />\n </Col>\n </Row>\n </Space>\n </Collapse.Panel>\n\n <Collapse.Panel\n key=\"3\"\n header={'Typography'}\n >\n <Space orientation=\"vertical\" size=\"small\">\n <Row>\n <Col span={11}>\n <FontFamily />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <FontSize />\n </Col>\n </Row>\n\n <Row>\n <Col span={11}>\n <FontWeight />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <LineHeight />\n </Col>\n </Row>\n\n <Row>\n <Col span={11}>\n <TextDecoration />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <LetterSpacing />\n </Col>\n </Row>\n <Align />\n\n <FontStyle />\n </Space>\n </Collapse.Panel>\n\n <Collapse.Panel\n key=\"4\"\n header={'Border'}\n >\n <Border />\n </Collapse.Panel>\n <Collapse.Panel\n key=\"5\"\n header={'Extra'}\n >\n <Col span={24}>\n <ClassName />\n </Col>\n </Collapse.Panel>\n </CollapseWrapper>\n </AttributesPanelWrapper>\n );\n}\n","import React from 'react';\nimport { Padding } from '@extensions/AttributePanel/components/attributes/Padding';\nimport { ContainerBackgroundColor } from '@extensions/AttributePanel/components/attributes/ContainerBackgroundColor';\nimport { BorderWidth } from '@extensions/AttributePanel/components/attributes/BorderWidth';\nimport { BorderStyle } from '@extensions/AttributePanel/components/attributes/BorderStyle';\nimport { BorderColor } from '@extensions/AttributePanel/components/attributes/BorderColor';\nimport { Width } from '@extensions/AttributePanel/components/attributes/Width';\nimport { Align } from '@extensions/AttributePanel/components/attributes/Align';\n\nimport { AttributesPanelWrapper } from '@extensions/AttributePanel/components/attributes/AttributesPanelWrapper';\nimport { Col, Collapse, Row, Space } from 'antd';\nimport { Stack } from '@thanhpv102/easy-email-editor';\nimport { ClassName } from '../../attributes/ClassName';\nimport { CollapseWrapper } from '../../attributes/CollapseWrapper';\n\nexport function Divider() {\n return (\n <AttributesPanelWrapper>\n <CollapseWrapper defaultActiveKey={['.$0']}>\n <Collapse.Panel key=\"0\" header={t('Dimension')}>\n <Space orientation=\"vertical\" size=\"small\">\n <Row>\n <Col span={11}>\n <Width unitOptions=\"percent\" />\n </Col>\n <Col offset={1} span={11} />\n </Row>\n\n <Align />\n <Padding />\n </Space>\n </Collapse.Panel>\n\n <Collapse.Panel key=\"1\" header={t('Border')}>\n <Stack wrap={false} spacing=\"tight\">\n <div style={{ width: 50 }}>\n <BorderWidth />\n </div>\n <div style={{ width: 100 }}>\n <BorderStyle />\n </div>\n <div style={{ width: 100 }}>\n <BorderColor />\n </div>\n </Stack>\n </Collapse.Panel>\n\n <Collapse.Panel key=\"2\" header={t('Background')}>\n <Row>\n <Col span={11}>\n <ContainerBackgroundColor title={t('Background')} />\n </Col>\n <Col offset={1} span={11} />\n </Row>\n </Collapse.Panel>\n <Collapse.Panel key=\"3\" header={t('Extra')}>\n <Col span={24}>\n <ClassName />\n </Col>\n </Collapse.Panel>\n </CollapseWrapper>\n </AttributesPanelWrapper>\n );\n}\n","import React from 'react';\nimport { Padding } from '@extensions/AttributePanel/components/attributes//Padding';\nimport { Background } from '@extensions/AttributePanel/components/attributes//Background';\nimport { TextField } from '@extensions/components/Form';\nimport { AttributesPanelWrapper } from '@extensions/AttributePanel/components/attributes/AttributesPanelWrapper';\nimport { Col, Collapse } from 'antd';\nimport { Stack, useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { ClassName } from '../../attributes/ClassName';\nimport { CollapseWrapper } from '../../attributes/CollapseWrapper';\n\nexport function Wrapper() {\n const { focusIdx } = useFocusIdx();\n return (\n <AttributesPanelWrapper style={{ padding: 0 }}>\n <CollapseWrapper defaultActiveKey={['.$0']}>\n <Collapse.Panel key=\"0\" header={t('Dimension')}>\n <Stack vertical spacing=\"tight\">\n <Padding />\n </Stack>\n </Collapse.Panel>\n <Collapse.Panel key=\"1\" header={t('Background')}>\n <Stack vertical spacing=\"tight\">\n <Background />\n </Stack>\n </Collapse.Panel>\n <Collapse.Panel key=\"2\" header={t('Border')}>\n <Stack vertical spacing=\"tight\">\n <TextField\n label={t('Border')}\n name={`${focusIdx}.attributes.border`}\n inline\n />\n <TextField\n label={t('Background border radius')}\n name={`${focusIdx}.attributes.border-radius`}\n inline\n />\n </Stack>\n </Collapse.Panel>\n <Collapse.Panel key=\"4\" header={t('Extra')}>\n <Col span={24}>\n <ClassName />\n </Col>\n </Collapse.Panel>\n </CollapseWrapper>\n </AttributesPanelWrapper>\n );\n}\n","\nimport React from 'react';\nimport { Height } from '@extensions/AttributePanel/components/attributes/Height';\nimport { ContainerBackgroundColor } from '@extensions/AttributePanel/components/attributes/ContainerBackgroundColor';\nimport { Padding } from '@extensions/AttributePanel/components/attributes/Padding';\nimport { AttributesPanelWrapper } from '@extensions/AttributePanel/components/attributes/AttributesPanelWrapper';\nimport { Collapse, Row, Col, Space } from 'antd';\nimport { ClassName } from '../../attributes/ClassName';\nimport { CollapseWrapper } from '../../attributes/CollapseWrapper';\n\nexport function Spacer() {\n return (\n <AttributesPanelWrapper>\n <CollapseWrapper defaultActiveKey={['.$0']}>\n <Collapse.Panel key='0' header={t('Dimension')}>\n <Space orientation='vertical' size='small'>\n <Height />\n <Padding />\n </Space>\n </Collapse.Panel>\n\n <Collapse.Panel key='1' header={t('Background')}>\n <ContainerBackgroundColor title={t('Background color')} />\n </Collapse.Panel>\n\n <Collapse.Panel key='2' header={t('Extra')}>\n <Col span={24}>\n <ClassName />\n </Col>\n </Collapse.Panel>\n </CollapseWrapper>\n </AttributesPanelWrapper>\n );\n}\n","import React, { useState } from 'react';\r\nimport { IconFont, useFocusIdx } from '@thanhpv102/easy-email-editor';\r\nimport { TextAreaField } from '@extensions/components/Form';\r\nimport { AttributesPanelWrapper } from '../../attributes';\r\nimport { Button, Tooltip } from 'antd';\r\nimport { HtmlEditor } from '../../UI/HtmlEditor';\r\n\r\nexport function Raw() {\r\n const { focusIdx } = useFocusIdx();\r\n const [visible, setVisible] = useState(false);\r\n return (\r\n <AttributesPanelWrapper\r\n style={{ padding: 20 }}\r\n extra={(\r\n <Tooltip title={t('Html mode')}>\r\n <Button\r\n onClick={() => setVisible(true)}\r\n icon={<IconFont iconName=\"icon-html\" />}\r\n />\r\n </Tooltip>\r\n )}\r\n >\r\n <TextAreaField\r\n label=\"\"\r\n name={`${focusIdx}.data.value.content`}\r\n rows={5}\r\n />\r\n <HtmlEditor\r\n visible={visible}\r\n setVisible={setVisible}\r\n />\r\n </AttributesPanelWrapper>\r\n );\r\n}\r\n","\nimport React from 'react';\nimport { useEditorProps, useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { AttributesPanelWrapper } from '@extensions/AttributePanel/components/attributes/AttributesPanelWrapper';\nimport { BackgroundColor } from '@extensions/AttributePanel/components/attributes/BackgroundColor';\nimport { FontFamily } from '@extensions/AttributePanel/components/attributes/FontFamily';\nimport { Padding } from '@extensions/AttributePanel/components/attributes/Padding';\nimport {\n ImageUploaderField,\n InputWithUnitField,\n RadioGroupField,\n SelectField,\n TextField,\n} from '@extensions/components/Form';\nimport { Collapse, Row, Col, Space } from 'antd';\nimport { ClassName } from '../../attributes/ClassName';\nimport { CollapseWrapper } from '../../attributes/CollapseWrapper';\n\nconst positionOptions = [\n {\n value: 'left',\n get label() {\n return t('Left');\n },\n },\n {\n value: 'right',\n get label() {\n return t('Right');\n },\n },\n];\n\nconst alignOptions = [\n {\n value: 'top',\n get label() {\n return t('top');\n },\n },\n {\n value: 'middle',\n get label() {\n return t('middle');\n },\n },\n {\n value: 'bottom',\n get label() {\n return t('bottom');\n },\n },\n];\n\nexport function Accordion() {\n const { focusIdx } = useFocusIdx();\n const { onUploadImage, enableAssetManager } = useEditorProps();\n\n return (\n <AttributesPanelWrapper>\n <CollapseWrapper defaultActiveKey={['.$0']}>\n <Collapse.Panel\n key='0'\n header={t('Setting')}\n >\n <Space orientation='vertical' size='small'>\n <Row>\n <Col span={11}>\n <BackgroundColor />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <FontFamily />\n </Col>\n </Row>\n\n <Padding />\n\n <Row>\n <Col span={11}>\n <InputWithUnitField\n label={t('Icon width')}\n name={`${focusIdx}.attributes.icon-width`}\n />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <InputWithUnitField\n label={t('Icon height')}\n name={`${focusIdx}.attributes.icon-height`}\n />\n </Col>\n </Row>\n\n <Row>\n <Col span={11}>\n <ImageUploaderField\n label={t('Unwrapped icon')}\n name={`${focusIdx}.attributes.icon-unwrapped-url`}\n //helpText={t('The image suffix should be .jpg, jpeg, png, gif, etc. Otherwise, the picture may not be displayed normally.')}\n uploadHandler={onUploadImage}\n enableSelectFromLibrary={enableAssetManager}\n />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <ImageUploaderField\n label={t('Wrapped icon')}\n name={`${focusIdx}.attributes.icon-wrapped-url`}\n uploadHandler={onUploadImage}\n enableSelectFromLibrary={enableAssetManager}\n />\n </Col>\n </Row>\n\n <Row>\n <Col span={11}>\n <RadioGroupField\n label={t('Icon position')}\n name={`${focusIdx}.attributes.icon-position`}\n options={positionOptions}\n />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <SelectField\n style={{ width: 120 }}\n label={t('Icon align')}\n name={`${focusIdx}.attributes.icon-align`}\n options={alignOptions}\n />\n </Col>\n </Row>\n\n <TextField\n label={t('Border')}\n name={`${focusIdx}.attributes.border`}\n />\n </Space>\n </Collapse.Panel>\n <Collapse.Panel\n key='4'\n header={t('Extra')}\n >\n <Col span={24}>\n <ClassName />\n </Col>\n </Collapse.Panel>\n </CollapseWrapper>\n </AttributesPanelWrapper>\n );\n}\n","import React from 'react';\nimport { Border } from '../../attributes/Border';\nimport { BackgroundColor } from '../../attributes/BackgroundColor';\nimport { FontFamily } from '../../attributes/FontFamily';\nimport { AttributesPanelWrapper } from '../../attributes/AttributesPanelWrapper';\nimport { Collapse, Space } from 'antd';\n\nexport function AccordionElement() {\n // const { focusIdx } = useFocusIdx();\n return (\n <AttributesPanelWrapper>\n <Collapse defaultActiveKey={['.$0']} items={[\n {\n key: '0',\n label: t('Setting'),\n children: (\n <Space orientation=\"vertical\" size=\"small\">\n <Border />\n <BackgroundColor />\n <FontFamily />\n </Space>\n ),\n },\n ]}\n />\n </AttributesPanelWrapper>\n );\n}\n","import React from 'react';\nimport { Padding } from '../../attributes/Padding';\n\nimport { BackgroundColor } from '../../attributes/BackgroundColor';\nimport { Color } from '../../attributes/Color';\nimport { TextAreaField } from '../../../../components/Form';\nimport { FontSize } from '../../attributes/FontSize';\nimport { FontWeight } from '../../attributes/FontWeight';\nimport { FontFamily } from '../../attributes/FontFamily';\nimport { AttributesPanelWrapper } from '../../attributes/AttributesPanelWrapper';\nimport { useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { Col, Collapse, Row, Space } from 'antd';\n\nexport function AccordionTitle() {\n const { focusIdx } = useFocusIdx();\n return (\n <AttributesPanelWrapper>\n <Collapse defaultActiveKey={['.$0']} items={[\n {\n key: '0',\n label: t('Setting'),\n children: (\n <Space orientation=\"vertical\" size=\"small\">\n <TextAreaField\n label={'Content'}\n name={`${focusIdx}.data.value.content`}\n />\n\n <Row>\n <Col span={11}>\n <Color />\n </Col>\n <Col offset={1} span={11}>\n <BackgroundColor />\n </Col>\n </Row>\n\n <Row>\n <Col span={11}>\n <FontSize />\n </Col>\n <Col offset={1} span={11}>\n <FontFamily />\n </Col>\n </Row>\n\n <Row>\n <Col span={11}>\n <FontWeight />\n </Col>\n <Col offset={1} span={11} />\n </Row>\n\n <Padding title={'Padding'} attributeName=\"padding\" />\n </Space>\n ),\n },\n ]}\n />\n </AttributesPanelWrapper>\n );\n}\n","import React from 'react';\nimport { useFocusIdx } from '@thanhpv102/easy-email-editor';\n\nimport { Padding } from '../../attributes/Padding';\nimport { BackgroundColor } from '../../attributes/BackgroundColor';\nimport { Color } from '../../attributes/Color';\nimport { TextAreaField } from '../../../../components/Form';\nimport { FontSize } from '../../attributes/FontSize';\nimport { FontWeight } from '../../attributes/FontWeight';\nimport { FontFamily } from '../../attributes/FontFamily';\nimport { LineHeight } from '../../attributes/LineHeight';\nimport { AttributesPanelWrapper } from '../../attributes/AttributesPanelWrapper';\nimport { Col, Collapse, Row, Space } from 'antd';\n\nexport function AccordionText() {\n const { focusIdx } = useFocusIdx();\n\n return (\n <AttributesPanelWrapper>\n <Collapse defaultActiveKey={['.$0']} items={[\n {\n key: '0',\n label: t('Setting'),\n children: (\n <Space orientation=\"vertical\" size=\"small\">\n <TextAreaField\n label={t('Content')}\n name={`${focusIdx}.data.value.content`}\n autoSize={{ minRows: 5 }}\n />\n <Row>\n <Col span={11}>\n <Color />\n </Col>\n <Col offset={1} span={11}>\n <FontSize />\n </Col>\n </Row>\n <Row>\n <Col span={11}>\n <LineHeight />\n </Col>\n <Col offset={1} span={11}>\n <FontWeight />\n </Col>\n </Row>\n <Row>\n <Col span={11}>\n <FontFamily />\n </Col>\n <Col offset={1} span={11}>\n <BackgroundColor />\n </Col>\n </Row>\n\n <Padding title={t('Padding')} attributeName=\"padding\" />\n </Space>\n ),\n },\n ]}\n />\n </AttributesPanelWrapper>\n );\n}\n","import React from 'react';\nimport {\n ColorPickerField,\n EditTabField,\n ImageUploaderField,\n InputWithUnitField,\n RadioGroupField,\n SelectField,\n TextField,\n} from '@extensions/components/Form';\nimport { Col, Collapse, Row, Space } from 'antd';\nimport { Stack, useEditorProps, useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { AttributesPanelWrapper } from '@extensions/AttributePanel/components/attributes/AttributesPanelWrapper';\nimport { Align } from '@extensions/AttributePanel/components/attributes/Align';\nimport { ICarousel } from '@thanhpv102/easy-email-core';\nimport { ClassName } from '../../attributes/ClassName';\nimport { CollapseWrapper } from '../../attributes/CollapseWrapper';\nimport { LinkOutlined } from '@ant-design/icons';\n\nconst options = [\n {\n value: 'hidden',\n get label() {\n return t('hidden');\n },\n },\n {\n value: 'visible',\n get label() {\n return t('visible');\n },\n },\n];\n\nexport function Carousel() {\n const { focusIdx } = useFocusIdx();\n return (\n <AttributesPanelWrapper style={{ padding: 0 }}>\n <CollapseWrapper defaultActiveKey={['.$0']}>\n <Collapse.Panel\n key=\"0\"\n header={t('Dimension')}\n >\n <Space orientation=\"vertical\" size=\"small\">\n <InputWithUnitField\n label={t('Thumbnail width')}\n name={`${focusIdx}.attributes.tb-width`}\n quickchange\n inline\n />\n\n <RadioGroupField\n label={t('Thumbnails')}\n name={`${focusIdx}.attributes.thumbnails`}\n options={options}\n inline\n />\n <Align inline />\n </Space>\n </Collapse.Panel>\n <Collapse.Panel\n key=\"1\"\n header={t('Images')}\n >\n <Stack\n vertical\n spacing=\"tight\"\n >\n <EditTabField\n tabPlacement=\"top\"\n name={`${focusIdx}.data.value.images`}\n label=\"\"\n labelHidden\n renderItem={(item: unknown, index: number) => (\n <CarouselImage\n item={item as ICarousel['data']['value']['images'][number]}\n index={index}\n />\n )}\n additionItem={{\n src: 'https://www.mailjet.com/wp-content/uploads/2016/11/ecommerce-guide.jpg',\n target: '_blank',\n }}\n />\n </Stack>\n </Collapse.Panel>\n <Collapse.Panel\n key=\"2\"\n header={t('Icon')}\n >\n <Row>\n <Col span={11}>\n <TextField\n label={t('Left icon')}\n name={`${focusIdx}.attributes.left-icon`}\n />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <TextField\n label={t('Right icon')}\n name={`${focusIdx}.attributes.right-icon`}\n />\n </Col>\n </Row>\n\n <Row>\n <Col span={11}>\n <InputWithUnitField\n label={t('Icon width')}\n name={`${focusIdx}.attributes.icon-width`}\n />\n </Col>\n <Col\n offset={1}\n span={11}\n />\n </Row>\n </Collapse.Panel>\n\n <Collapse.Panel\n key=\"3\"\n header={t('Border')}\n >\n <Row>\n <Col span={11}>\n <ColorPickerField\n label={t('Hovered border')}\n name={`${focusIdx}.attributes.tb-hover-border-color`}\n />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <ColorPickerField\n label={t('Selected Border')}\n name={`${focusIdx}.attributes.tb-selected-border-color`}\n />\n </Col>\n </Row>\n <Row>\n <Col span={11}>\n <TextField\n label={t('Border of the thumbnails')}\n name={`${focusIdx}.attributes.tb-border`}\n />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <TextField\n label={t('Border radius of the thumbnails')}\n name={`${focusIdx}.attributes.tb-border-radius`}\n />\n </Col>\n </Row>\n </Collapse.Panel>\n <Collapse.Panel\n key=\"4\"\n header={t('Extra')}\n >\n <Col span={24}>\n <ClassName />\n </Col>\n </Collapse.Panel>\n </CollapseWrapper>\n </AttributesPanelWrapper>\n );\n}\n\nfunction CarouselImage({\n index,\n}: {\n item: ICarousel['data']['value']['images'][number];\n index: number;\n}) {\n const { focusIdx } = useFocusIdx();\n const { onUploadImage, enableAssetManager } = useEditorProps();\n return (\n <Space orientation=\"vertical\" size=\"small\">\n <ImageUploaderField\n label={t('Image')}\n labelHidden\n name={`${focusIdx}.data.value.images.[${index}].src`}\n helpText={t(\n 'The image suffix should be .jpg, jpeg, png, gif, etc. Otherwise, the picture may not be displayed normally.',\n )}\n uploadHandler={onUploadImage}\n enableSelectFromLibrary={enableAssetManager}\n />\n <Row>\n <Col span={11}>\n <TextField\n prefix={<LinkOutlined />}\n label={t('Url')}\n name={`${focusIdx}.data.value.images.[${index}].href`}\n />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <SelectField\n label={t('Target')}\n name={`${focusIdx}.data.value.images.[${index}].target`}\n options={[\n {\n value: '',\n label: t('_self'),\n },\n {\n value: '_blank',\n label: t('_blank'),\n },\n ]}\n />\n </Col>\n </Row>\n\n <TextField\n label={t('Title')}\n name={`${focusIdx}.data.value.images.[${index}].title`}\n />\n </Space>\n );\n}\n","import React from 'react';\nimport { BackgroundColor } from '@extensions/AttributePanel/components/attributes/BackgroundColor';\nimport { ImageUploaderField, InputWithUnitField, RadioGroupField, TextField } from '@extensions/components/Form';\nimport { Width } from '@extensions/AttributePanel/components/attributes/Width';\nimport { Height } from '@extensions/AttributePanel/components/attributes/Height';\nimport { VerticalAlign } from '@extensions/AttributePanel/components/attributes/VerticalAlign';\nimport { Padding } from '@extensions/AttributePanel/components/attributes/Padding';\nimport { Col, Collapse, Row, Space } from 'antd';\nimport { useEditorProps, useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { AttributesPanelWrapper } from '@extensions/AttributePanel/components/attributes/AttributesPanelWrapper';\nimport { ClassName } from '../../attributes/ClassName';\nimport { CollapseWrapper } from '../../attributes/CollapseWrapper';\n\nconst options = [\n {\n value: 'fluid-height',\n get label() {\n return t('Fluid height');\n },\n },\n {\n value: 'fixed-height',\n get label() {\n return t('Fixed height');\n },\n },\n];\n\nexport function Hero() {\n const { focusIdx } = useFocusIdx();\n const { onUploadImage, enableAssetManager } = useEditorProps();\n\n return (\n <AttributesPanelWrapper>\n <CollapseWrapper defaultActiveKey={['.$0']}>\n <Collapse.Panel\n key=\"0\"\n header={t('Dimension')}\n >\n <Space orientation=\"vertical\" size=\"small\">\n <RadioGroupField\n label={t('Mode')}\n name={`${focusIdx}.attributes.mode`}\n key={`${focusIdx}.attributes.mode`}\n options={options}\n />\n <Row>\n <Col span={11}>\n <Width />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <Height />\n </Col>\n </Row>\n\n <Padding />\n <VerticalAlign />\n </Space>\n </Collapse.Panel>\n <Collapse.Panel\n key=\"1\"\n header={t('Background')}\n >\n <Space orientation=\"vertical\" size=\"small\">\n <ImageUploaderField\n label={t('src')}\n name={`${focusIdx}.attributes.background-url`}\n key={`${focusIdx}.attributes.background-url`}\n helpText={t(\n 'The image suffix should be .jpg, jpeg, png, gif, etc. Otherwise, the picture may not be displayed normally.',\n )}\n uploadHandler={onUploadImage}\n enableSelectFromLibrary={enableAssetManager}\n />\n\n <Row>\n <Col span={11}>\n <InputWithUnitField\n label={t('Background width')}\n name={`${focusIdx}.attributes.background-width`}\n />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <InputWithUnitField\n label={t('Background height')}\n name={`${focusIdx}.attributes.background-height`}\n />\n </Col>\n </Row>\n\n <Row>\n <Col span={11}>\n <TextField\n label={t('Background position')}\n name={`${focusIdx}.attributes.background-position`}\n />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <InputWithUnitField\n label={t('Border radius')}\n name={`${focusIdx}.attributes.border-radius`}\n unitOptions=\"percent\"\n />\n </Col>\n <Col span={11}>\n <BackgroundColor />\n </Col>\n </Row>\n </Space>\n </Collapse.Panel>\n <Collapse.Panel\n key=\"2\"\n header={t('Extra')}\n >\n <Col span={24}>\n <ClassName />\n </Col>\n </Collapse.Panel>\n </CollapseWrapper>\n </AttributesPanelWrapper>\n );\n}\n","import React from 'react';\nimport { ColorPickerField, EditTabField, SelectField, TextField } from '@extensions/components/Form';\nimport { Align } from '@extensions/AttributePanel/components/attributes/Align';\nimport { AttributesPanelWrapper } from '@extensions/AttributePanel/components/attributes/AttributesPanelWrapper';\nimport { Col, Collapse, Row, Space } from 'antd';\nimport { LinkOutlined } from '@ant-design/icons';\nimport { NavbarLinkPadding } from '@extensions/AttributePanel/components/attributes/NavbarLinkPadding';\nimport { Stack, useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { INavbar } from '@thanhpv102/easy-email-core';\nimport { ClassName } from '../../attributes/ClassName';\nimport { CollapseWrapper } from '../../attributes/CollapseWrapper';\nimport {\n FontFamily,\n FontStyle,\n FontWeight,\n LetterSpacing,\n LineHeight,\n TextDecoration,\n TextTransform,\n} from '../../attributes';\nimport { pixelAdapter } from '../../adapter';\n\nexport function Navbar() {\n const { focusIdx } = useFocusIdx();\n return (\n <AttributesPanelWrapper style={{ padding: 0 }}>\n <CollapseWrapper defaultActiveKey={['.$0']}>\n <Collapse.Panel\n key=\"0\"\n header={t('Layout')}\n >\n <Stack\n vertical\n spacing=\"tight\"\n >\n <Align />\n </Stack>\n </Collapse.Panel>\n\n <Collapse.Panel\n key=\"1\"\n header={t('Navbar links')}\n >\n <Space\n orientation=\"vertical\"\n style={{ width: '100%' }}\n >\n <EditTabField\n tabPlacement=\"top\"\n name={`${focusIdx}.data.value.links`}\n label={t('Links')}\n labelHidden\n renderItem={(item: unknown, index: number) => (\n <NavbarLink\n item={item as INavbar['data']['value']['links'][number]}\n index={index}\n />\n )}\n additionItem={{\n src: 'https://www.mailjet.com/wp-content/uploads/2016/11/ecommerce-guide.jpg',\n target: '_blank',\n content: 'New link',\n color: '#1890ff',\n 'font-size': '13px',\n }}\n />\n <div />\n </Space>\n </Collapse.Panel>\n <Collapse.Panel\n key=\"2\"\n header={t('Extra')}\n >\n <Col span={24}>\n <ClassName />\n </Col>\n </Collapse.Panel>\n </CollapseWrapper>\n </AttributesPanelWrapper>\n );\n}\n\nfunction NavbarLink({\n index,\n}: {\n item: INavbar['data']['value']['links'][number];\n index: number;\n}) {\n const { focusIdx } = useFocusIdx();\n return (\n <div className=\"NavbarLink\">\n <Space\n orientation=\"vertical\"\n style={{ width: '100%' }}\n >\n <Row>\n <Col span={11}>\n <TextField\n label={t('Content')}\n name={`${focusIdx}.data.value.links.[${index}].content`}\n />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <ColorPickerField\n label={t('Color')}\n name={`${focusIdx}.data.value.links.[${index}].color`}\n />\n </Col>\n </Row>\n\n <Row>\n <Col span={11}>\n <FontFamily name={`${focusIdx}.data.value.links.[${index}].font-family`} />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <TextField\n label={t('Font size (px)')}\n name={`${focusIdx}.data.value.links.[${index}].font-size`}\n config={pixelAdapter}\n autoComplete=\"off\"\n />\n </Col>\n </Row>\n\n <Row>\n <Col span={11}>\n <LineHeight name={`${focusIdx}.data.value.links.[${index}].line-height`} />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <LetterSpacing\n name={`${focusIdx}.data.value.links.[${index}].letter-spacing`}\n />\n </Col>\n </Row>\n\n <Row>\n <Col span={11}>\n <TextDecoration\n name={`${focusIdx}.data.value.links.[${index}].text-decoration`}\n />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <FontWeight name={`${focusIdx}.data.value.links.[${index}].font-weight`} />\n </Col>\n </Row>\n\n <Row>\n <Col span={11}>\n <TextTransform\n name={`${focusIdx}.data.value.links.[${index}].text-transform`}\n />\n </Col>\n <Col\n offset={1}\n span={11}\n />\n </Row>\n <FontStyle name={`${focusIdx}.data.value.links.[${index}].font-style`} />\n <Row>\n <Col span={11}>\n <TextField\n prefix={<LinkOutlined />}\n label={<span>{t('Url')}</span>}\n name={`${focusIdx}.data.value.links.[${index}].href`}\n />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <SelectField\n style={{ minWidth: 65 }}\n label={t('Target')}\n name={`${focusIdx}.data.value.links.[${index}].target`}\n options={[\n {\n value: '_blank',\n label: t('_blank'),\n },\n {\n value: '_self',\n label: t('_self'),\n },\n ]}\n />\n </Col>\n </Row>\n <NavbarLinkPadding\n name={`${focusIdx}.data.value.links.[${index}].padding`}\n />\n <div />\n </Space>\n </div>\n );\n}\n","import React, { useMemo } from 'react';\nimport { Padding } from '@extensions/AttributePanel/components/attributes/Padding';\nimport {\n EditGridTabField,\n ImageUploaderField,\n InputWithUnitField,\n RadioGroupField,\n TextField,\n} from '@extensions/components/Form';\nimport { Align } from '@extensions/AttributePanel/components/attributes/Align';\nimport { Color } from '@extensions/AttributePanel/components/attributes/Color';\nimport { ContainerBackgroundColor } from '@extensions/AttributePanel/components/attributes/ContainerBackgroundColor';\nimport { FontFamily } from '@extensions/AttributePanel/components/attributes/FontFamily';\nimport { FontSize } from '@extensions/AttributePanel/components/attributes/FontSize';\nimport { FontStyle } from '@extensions/AttributePanel/components/attributes/FontStyle';\nimport { FontWeight } from '@extensions/AttributePanel/components/attributes/FontWeight';\n\nimport { AttributesPanelWrapper } from '@extensions/AttributePanel/components/attributes/AttributesPanelWrapper';\nimport { Col, Collapse, Row, Space } from 'antd';\nimport { TextDecoration } from '@extensions/AttributePanel/components/attributes/TextDecoration';\nimport { LineHeight } from '@extensions/AttributePanel/components/attributes/LineHeight';\nimport { useBlock, useEditorProps, useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { ISocial } from '@thanhpv102/easy-email-core';\nimport { ClassName } from '../../attributes/ClassName';\nimport { CollapseWrapper } from '../../attributes/CollapseWrapper';\nimport { LinkOutlined } from '@ant-design/icons';\n\nconst options = [\n {\n value: 'vertical',\n get label() {\n return 'vertical';\n },\n },\n {\n value: 'horizontal',\n get label() {\n return 'horizontal';\n },\n },\n];\n\nexport function Social() {\n const { focusIdx } = useFocusIdx();\n const { focusBlock } = useBlock();\n const value = focusBlock?.data.value as ISocial['data']['value'];\n if (!value) return null;\n\n return (\n <AttributesPanelWrapper style={{ padding: 0 }}>\n <CollapseWrapper defaultActiveKey={['.$0']}>\n <Collapse.Panel\n key=\"0\"\n header={'Setting'}\n >\n <Space orientation=\"vertical\" size=\"small\">\n <RadioGroupField\n label={'Mode'}\n name={`${focusIdx}.attributes.mode`}\n options={options}\n />\n\n <Align />\n </Space>\n </Collapse.Panel>\n\n <Collapse.Panel\n key=\"1\"\n header={'Typography'}\n >\n <Space orientation=\"vertical\" size=\"small\">\n <Row>\n <Col span={11}>\n <FontFamily />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <FontSize />\n </Col>\n </Row>\n <Row>\n <Col span={11}>\n <FontWeight />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <LineHeight />\n </Col>\n </Row>\n <Row>\n <Col span={11}>\n <Color />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <ContainerBackgroundColor title={'Background color'} />\n </Col>\n </Row>\n <Row>\n <Col span={11}>\n <TextDecoration />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <FontStyle />\n </Col>\n </Row>\n </Space>\n </Collapse.Panel>\n\n <Collapse.Panel\n key=\"2\"\n header={t('Social item')}\n >\n <EditGridTabField\n tabPlacement=\"top\"\n name={`${focusIdx}.data.value.elements`}\n label=\"\"\n labelHidden\n renderItem={(item, index: number) => (\n <SocialElement\n item={item as ISocial['data']['value']['elements'][number]}\n index={index}\n />\n )}\n />\n </Collapse.Panel>\n\n <Collapse.Panel\n key=\"3\"\n header={t('Dimension')}\n >\n <Space\n orientation=\"vertical\"\n size=\"large\"\n >\n <Row>\n <Col span={11}>\n <InputWithUnitField\n label={t('Icon width')}\n name={`${focusIdx}.attributes.icon-size`}\n />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <TextField\n label={t('Border radius')}\n name={`${focusIdx}.attributes.border-radius`}\n />\n </Col>\n </Row>\n\n <Padding />\n <Padding\n attributeName=\"inner-padding\"\n title={t('Icon padding')}\n />\n <Padding\n attributeName=\"text-padding\"\n title={t('Text padding')}\n />\n </Space>\n </Collapse.Panel>\n <Collapse.Panel\n key=\"4\"\n header={t('Extra')}\n >\n <Col span={24}>\n <ClassName />\n </Col>\n </Collapse.Panel>\n </CollapseWrapper>\n </AttributesPanelWrapper>\n );\n}\n\nfunction SocialElement({\n index,\n}: {\n item: ISocial['data']['value']['elements'][0];\n index: number;\n}) {\n const { focusIdx } = useFocusIdx();\n const { onUploadImage, socialIcons, enableAssetManager } = useEditorProps();\n\n const autoCompleteOptions = useMemo(() => {\n if (!socialIcons) return undefined;\n return socialIcons.map(icon => {\n return {\n label: icon.content,\n value: icon.image,\n };\n });\n }, [socialIcons]);\n\n return (\n <Space orientation=\"vertical\" size=\"small\">\n <ImageUploaderField\n label={t('Image')}\n autoCompleteOptions={autoCompleteOptions}\n labelHidden\n name={`${focusIdx}.data.value.elements.[${index}].src`}\n //helpText={t('The image suffix should be .jpg, jpeg, png, gif, etc. Otherwise, the picture may not be displayed normally.')}\n uploadHandler={onUploadImage}\n enableSelectFromLibrary={enableAssetManager}\n />\n\n <Row>\n <Col span={11}>\n <TextField\n label={t('Content')}\n name={`${focusIdx}.data.value.elements.[${index}].content`}\n quickchange\n />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <TextField\n prefix={<LinkOutlined />}\n label={t('Link')}\n name={`${focusIdx}.data.value.elements.[${index}].href`}\n />\n </Col>\n </Row>\n {/* <Row>\n <Col span={11}>\n <InputWithUnitField\n label={t('Icon width')}\n name={`${focusIdx}.data.value.elements.[${index}].icon-size`}\n />\n </Col>\n <Col offset={1} span={11}>\n <InputWithUnitField\n label={t('Icon height')}\n name={`${focusIdx}.data.value.elements.[${index}].icon-height`}\n />\n </Col>\n </Row> */}\n </Space>\n );\n}\n","import { AttributesPanelWrapper } from '@extensions/AttributePanel';\nimport { Collapse } from 'antd';\nimport { Stack, useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport React from 'react';\nimport { t } from '@thanhpv102/easy-email-core';\nimport { Border } from '../../attributes/Border';\nimport { Color } from '../../attributes/Color';\nimport { ContainerBackgroundColor } from '../../attributes/ContainerBackgroundColor';\nimport { FontFamily } from '../../attributes/FontFamily';\nimport { FontSize } from '../../attributes/FontSize';\nimport { FontStyle } from '../../attributes/FontStyle';\nimport { Padding } from '../../attributes/Padding';\nimport { TextAlign } from '../../attributes/TextAlign';\nimport { Width } from '../../attributes/Width';\nimport { CollapseWrapper } from '../../attributes/CollapseWrapper';\nimport { TextField } from '@extensions/components/Form';\nexport function Table() {\n const { focusIdx } = useFocusIdx();\n return (\n <AttributesPanelWrapper>\n <CollapseWrapper defaultActiveKey={['.$0']}>\n <Collapse.Panel\n key=\"0\"\n header={t('Content')}\n >\n <TextField\n label={t('Content')}\n name={`${focusIdx}.data.value.content`}\n type='textarea'\n placeholder=\"Enter HTML table content\"\n />\n </Collapse.Panel>\n <Collapse.Panel\n key=\"1\"\n header={t('Dimension')}\n >\n <Stack>\n <Width />\n </Stack>\n <Stack vertical>\n <Padding />\n </Stack>\n </Collapse.Panel>\n <Collapse.Panel\n key=\"2\"\n header={t('Decoration')}\n >\n <Color />\n <ContainerBackgroundColor />\n <Border />\n </Collapse.Panel>\n <Collapse.Panel\n key=\"3\"\n header={t('Typography')}\n >\n <Stack>\n <FontFamily />\n <FontSize />\n </Stack>\n <FontStyle />\n <TextAlign />\n </Collapse.Panel>\n </CollapseWrapper>\n </AttributesPanelWrapper>\n );\n}\n\n","import { AttributesPanelWrapper } from '@extensions/AttributePanel';\nimport { Collapse } from 'antd';\nimport { Stack, useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport React from 'react';\nimport { t } from '@thanhpv102/easy-email-core';\nimport { Color } from '../../attributes/Color';\nimport { ContainerBackgroundColor } from '../../attributes/ContainerBackgroundColor';\nimport { FontFamily } from '../../attributes/FontFamily';\nimport { FontSize } from '../../attributes/FontSize';\nimport { Padding } from '../../attributes/Padding';\nimport { Width } from '../../attributes/Width';\nimport { CollapseWrapper } from '../../attributes/CollapseWrapper';\nimport { ColorPickerField, NumberField, SelectField, TextField } from '@extensions';\nimport { pixelAdapter } from '../../adapter';\n\nexport function AdvancedTable() {\n const { focusIdx } = useFocusIdx();\n return (\n <AttributesPanelWrapper>\n <CollapseWrapper defaultActiveKey={['.$0']}>\n <Collapse.Panel\n key=\"0\"\n header={t('Table Settings')}\n >\n <div style={{ fontSize: 12, color: '#666', marginBottom: 8 }}>\n {t('Click on the table to edit cells, right click for add/remove rows and columns')}\n </div>\n <NumberField\n label={t('Cell padding (px)')}\n name={`${focusIdx}.attributes.cellPadding`}\n config={pixelAdapter}\n max={50}\n min={0}\n step={1}\n />\n <ColorPickerField\n label={t('Cell border color')}\n name={`${focusIdx}.attributes.cellBorderColor`}\n key={`${focusIdx}.attributes.cellBorderColor`}\n />\n </Collapse.Panel>\n\n <Collapse.Panel\n key=\"1\"\n header={t('Dimension')}\n >\n <Stack>\n <Width />\n </Stack>\n <Stack vertical>\n <Padding />\n </Stack>\n </Collapse.Panel>\n\n <Collapse.Panel\n key=\"2\"\n header={t('Decoration')}\n >\n <Color />\n <ContainerBackgroundColor />\n <TextField\n label={t('Table border')}\n name={`${focusIdx}.attributes.border`}\n />\n </Collapse.Panel>\n\n <Collapse.Panel\n key=\"3\"\n header={t('Typography')}\n >\n <Stack>\n <FontFamily />\n <FontSize />\n </Stack>\n <Stack>\n <SelectField\n label={t('Font style')}\n name={`${focusIdx}.attributes.font-style`}\n options={[\n { value: 'normal', label: t('Normal') },\n { value: 'italic', label: t('Italic') },\n { value: 'oblique', label: t('Oblique') },\n ]}\n />\n <SelectField\n label={t('Text align')}\n name={`${focusIdx}.attributes.text-align`}\n options={[\n { value: 'left', label: t('Left') },\n { value: 'center', label: t('Center') },\n { value: 'right', label: t('Right') },\n ]}\n />\n </Stack>\n </Collapse.Panel>\n </CollapseWrapper>\n </AttributesPanelWrapper>\n );\n}\n","import { Page } from './Page';\nimport { Section } from './Section';\nimport { Column } from './Column';\nimport { Text } from './Text';\nimport { Image } from './Image';\nimport { Group } from './Group';\nimport { Button } from './Button';\nimport { Divider } from './Divider';\nimport { Wrapper } from './Wrapper';\nimport { Spacer } from './Spacer';\n\nimport { Raw } from './Raw';\nimport { Accordion } from './Accordion';\nimport { AccordionElement } from './AccordionElement';\nimport { AccordionTitle } from './AccordionTitle';\nimport { AccordionText } from './AccordionText';\nimport { Carousel } from './Carousel';\nimport { Hero } from './Hero';\nimport { Navbar } from './Navbar';\nimport { Social } from './Social';\nimport { Table } from './Table';\nimport { BasicType, AdvancedType } from '@thanhpv102/easy-email-core';\nimport { AdvancedTable } from './AdvancedTable';\n\nexport const blocks = {\n [BasicType.PAGE]: Page,\n [BasicType.SECTION]: Section,\n [BasicType.COLUMN]: Column,\n [BasicType.TEXT]: Text,\n [BasicType.IMAGE]: Image,\n [BasicType.GROUP]: Group,\n [BasicType.BUTTON]: Button,\n [BasicType.DIVIDER]: Divider,\n [BasicType.WRAPPER]: Wrapper,\n [BasicType.SPACER]: Spacer,\n [BasicType.RAW]: Raw,\n [BasicType.ACCORDION]: Accordion,\n [BasicType.ACCORDION_ELEMENT]: AccordionElement,\n [BasicType.ACCORDION_TITLE]: AccordionTitle,\n [BasicType.ACCORDION_TEXT]: AccordionText,\n [BasicType.CAROUSEL]: Carousel,\n [BasicType.HERO]: Hero,\n [BasicType.NAVBAR]: Navbar,\n [BasicType.SOCIAL]: Social,\n [BasicType.TABLE]: Table,\n\n [AdvancedType.TEXT]: Text,\n [AdvancedType.IMAGE]: Image,\n [AdvancedType.BUTTON]: Button,\n [AdvancedType.DIVIDER]: Divider,\n [AdvancedType.SPACER]: Spacer,\n [AdvancedType.ACCORDION]: Accordion,\n [AdvancedType.CAROUSEL]: Carousel,\n [AdvancedType.NAVBAR]: Navbar,\n [AdvancedType.SOCIAL]: Social,\n [AdvancedType.TABLE]: AdvancedTable,\n\n [AdvancedType.HERO]: Hero,\n [AdvancedType.WRAPPER]: Wrapper,\n [AdvancedType.SECTION]: Section,\n [AdvancedType.GROUP]: Group,\n [AdvancedType.COLUMN]: Column,\n};\n","import { blocks } from '../components/blocks';\nimport { ReactNode } from 'react';\n\ntype ObjectComponent = { [key: string]: (...args: any) => ReactNode };\n\nexport class BlockAttributeConfigurationManager {\n private static map: ObjectComponent = { ...blocks };\n\n public static add(componentMap: ObjectComponent) {\n Object.keys(componentMap).forEach(name => {\n this.map[name] = componentMap[name];\n });\n }\n\n public static get<T extends ObjectComponent>(name: keyof T): () => React.ReactElement | null {\n return (this.map as any)[name];\n }\n\n public static getMap() {\n return this.map;\n }\n}\n","export const RICH_TEXT_TOOL_BAR = 'Tools';\r\nexport const RICH_TEXT_POPUP_CONTAINER_ID = 'easy-email-rich-text-popup-container';\r\n\r\n","/* eslint-disable @typescript-eslint/no-unsafe-call */\nimport { RICH_TEXT_TOOL_BAR, RICH_TEXT_POPUP_CONTAINER_ID } from '@extensions/constants';\nimport { getShadowRoot } from '@thanhpv102/easy-email-editor';\nimport React, { useEffect, useMemo, useState } from 'react';\n\nexport const SelectionRangeContext = React.createContext<{\n selectionRange: Range | null;\n setSelectionRange: React.Dispatch<React.SetStateAction<Range | null>>;\n}>({\n selectionRange: null,\n setSelectionRange: () => {},\n});\n\nexport const SelectionRangeProvider: React.FC<{\n children: React.ReactNode | React.ReactElement;\n}> = props => {\n const [selectionRange, setSelectionRange] = useState<Range | null>(null);\n\n useEffect(() => {\n const getSelectionFromShadowRoot = (shadowRoot: ShadowRoot): Selection | null => {\n // Chrome supports getSelection() directly on ShadowRoot.\n if ('getSelection' in shadowRoot) {\n return (shadowRoot as unknown as Document).getSelection();\n }\n // Firefox: use document.getSelection() but only when the anchor is\n // actually inside the shadow root (avoids stale light-DOM selections).\n const sel = document.getSelection();\n if (sel && sel.rangeCount > 0 && shadowRoot.contains(sel.anchorNode)) {\n return sel;\n }\n return sel;\n };\n\n const applySelection = (shadowRoot: ShadowRoot) => {\n try {\n const selection = getSelectionFromShadowRoot(shadowRoot);\n\n if (!selection || selection.rangeCount === 0) return;\n\n const range = selection.getRangeAt(0);\n if (!range) return;\n\n // Ignore selections whose container is outside the shadow root.\n // This prevents stale light-DOM selections in Firefox from being used.\n if (!shadowRoot.contains(range.commonAncestorContainer)) return;\n\n const toolbar = shadowRoot.getElementById(RICH_TEXT_TOOL_BAR);\n if (toolbar && toolbar.contains(range.commonAncestorContainer)) return;\n const popupContainer = shadowRoot.getElementById(RICH_TEXT_POPUP_CONTAINER_ID);\n if (popupContainer && popupContainer.contains(range.commonAncestorContainer)) return;\n\n // If the range is collapsed (cursor only), make sure the active element\n // is still the contenteditable editor – not a toolbar control or popup\n // input that stole focus and left a stale collapsed range in the editor.\n if (range.collapsed) {\n const activeEl = shadowRoot.activeElement;\n if (activeEl) {\n if (toolbar && toolbar.contains(activeEl)) return;\n if (popupContainer && popupContainer.contains(activeEl)) return;\n }\n }\n\n setSelectionRange(range);\n } catch {}\n };\n\n const shadowRoot = getShadowRoot();\n\n // --- Mouse tracking ---\n // We track clicks to distinguish:\n // single-click drag → read on mouseup (via 0ms timeout)\n // double-click → read via dblclick AFTER Firefox expands word selection\n let isMouseDown = false;\n let pendingDblClickTimer: ReturnType<typeof setTimeout> | null = null;\n // Flag set between mouseup and dblclick to suppress selectionchange during\n // that window (Firefox fires selectionchange with wrong ranges here).\n let suppressSelectionChange = false;\n\n const onMouseDown = (e: Event) => {\n const target = e.target as Node | null;\n const toolbar = shadowRoot.getElementById(RICH_TEXT_TOOL_BAR);\n const popupContainer = shadowRoot.getElementById(RICH_TEXT_POPUP_CONTAINER_ID);\n if ((toolbar && target && toolbar.contains(target)) ||\n (popupContainer && target && popupContainer.contains(target))) {\n return;\n }\n isMouseDown = true;\n suppressSelectionChange = false;\n };\n\n const onMouseUp = (e: Event) => {\n isMouseDown = false;\n // If the click is on the toolbar or a popup container, skip updating the\n // selection – we want to preserve the cursor/selection in the editor.\n const target = e.target as Node | null;\n const toolbar = shadowRoot.getElementById(RICH_TEXT_TOOL_BAR);\n const popupContainer = shadowRoot.getElementById(RICH_TEXT_POPUP_CONTAINER_ID);\n if ((toolbar && target && toolbar.contains(target)) ||\n (popupContainer && target && popupContainer.contains(target))) {\n return;\n }\n // Suppress selectionchange briefly after mouseup in case a dblclick\n // follows – Firefox fires bad intermediate selectionchange events in\n // the gap between mouseup and dblclick.\n suppressSelectionChange = true;\n pendingDblClickTimer = setTimeout(() => {\n pendingDblClickTimer = null;\n suppressSelectionChange = false;\n applySelection(shadowRoot);\n }, 0);\n };\n\n const onDblClick = (e: Event) => {\n // Cancel the mouseup timer – we handle the selection here instead.\n if (pendingDblClickTimer !== null) {\n clearTimeout(pendingDblClickTimer);\n pendingDblClickTimer = null;\n }\n\n // Firefox-specific workaround: when the user double-clicks inside an\n // <a> element that is itself inside a contenteditable, Firefox sometimes\n // selects the text node *before* the <a> rather than the text inside it.\n // Detect this and manually build a correct selection for the <a> content.\n const target = e.target as Node | null;\n const anchorEl = target instanceof HTMLAnchorElement\n ? target\n : (target as Element | null)?.closest?.('a') ?? null;\n\n if (anchorEl && anchorEl.firstChild) {\n try {\n const sel = document.getSelection();\n if (sel) {\n // Check if Firefox gave us a bad selection (anchor outside <a>).\n const isBadSelection =\n sel.rangeCount === 0 ||\n !anchorEl.contains(sel.anchorNode);\n\n if (isBadSelection) {\n suppressSelectionChange = false;\n // Manually select all text inside the <a> element.\n // Prefer setBaseAndExtent (supported in Firefox and Chrome) for\n // selecting nodes inside shadow DOM, as addRange can be unreliable.\n const firstChild = anchorEl.firstChild;\n const lastChild = anchorEl.lastChild ?? firstChild;\n const endOffset =\n lastChild.nodeType === Node.TEXT_NODE\n ? (lastChild as Text).length\n : (lastChild as Element).childNodes.length;\n if (typeof sel.setBaseAndExtent === 'function') {\n sel.setBaseAndExtent(firstChild, 0, lastChild, endOffset);\n } else {\n const newRange = document.createRange();\n newRange.selectNodeContents(anchorEl);\n sel.removeAllRanges();\n sel.addRange(newRange);\n }\n applySelection(shadowRoot);\n return;\n }\n }\n } catch {}\n }\n\n // Use a short delay: Firefox finishes word-boundary expansion of a\n // double-click selection right around the dblclick event, but reading\n // immediately can still catch an intermediate state.\n setTimeout(() => {\n suppressSelectionChange = false;\n applySelection(shadowRoot);\n }, 0);\n };\n\n const onSelectionChange = () => {\n // Suppress during mouse-down or during the mouseup→dblclick window.\n if (isMouseDown || suppressSelectionChange) return;\n applySelection(shadowRoot);\n };\n\n // mousedown / mouseup / dblclick on the shadow root for mouse selections.\n shadowRoot?.addEventListener('mousedown', onMouseDown);\n shadowRoot?.addEventListener('mouseup', onMouseUp);\n shadowRoot?.addEventListener('dblclick', onDblClick);\n\n // selectionchange handles keyboard-driven selections (shift+arrows, etc.)\n document.addEventListener('selectionchange', onSelectionChange);\n shadowRoot?.addEventListener('selectionchange', onSelectionChange);\n\n return () => {\n if (pendingDblClickTimer !== null) clearTimeout(pendingDblClickTimer);\n shadowRoot?.removeEventListener('mousedown', onMouseDown);\n shadowRoot?.removeEventListener('mouseup', onMouseUp);\n shadowRoot?.removeEventListener('dblclick', onDblClick);\n document.removeEventListener('selectionchange', onSelectionChange);\n shadowRoot?.removeEventListener('selectionchange', onSelectionChange);\n };\n }, []);\n\n const value = useMemo(() => {\n return {\n selectionRange,\n setSelectionRange,\n };\n }, [selectionRange]);\n\n return useMemo(() => {\n return (\n <SelectionRangeContext.Provider value={value}>\n {props.children}\n </SelectionRangeContext.Provider>\n );\n }, [props.children, value]);\n};\n","import { DATA_CONTENT_EDITABLE_IDX } from '@thanhpv102/easy-email-editor';\nimport { IBoundaryRect, IBoundingPosition, IOperationData } from './type';\nimport { AdvancedTableBlock } from '@thanhpv102/easy-email-core';\n\nconst getEditorElementClientRect = (target: Element) => {\n const el = target as HTMLElement;\n const r = el.getBoundingClientRect();\n return {\n left: r.left,\n top: r.top,\n width: r.width,\n height: r.height,\n };\n};\n\nconst getBoundaryFromRects = (startRect: any, endRect: any) => {\n let left = Math.min(\n startRect.left,\n endRect.left,\n startRect.left + startRect.width,\n endRect.left + endRect.width,\n );\n\n let right = Math.max(\n startRect.left,\n endRect.left,\n startRect.left + startRect.width,\n endRect.left + endRect.width,\n );\n\n let top = Math.min(\n startRect.top,\n endRect.top,\n startRect.top + startRect.height,\n endRect.top + endRect.height,\n );\n\n let bottom = Math.max(\n startRect.top,\n endRect.top,\n startRect.top + startRect.height,\n endRect.top + endRect.height,\n );\n\n let width = right - left;\n let height = bottom - top;\n\n return { top, bottom, left, right, width, height };\n};\n\nconst ERROR_LIMIT = 2;\n\nconst getCorrectBoundary = (el: Element, currentBoundary: IBoundaryRect) => {\n const tableEl = el.parentElement?.parentElement?.parentElement;\n if (!tableEl) {\n return null;\n }\n let leftTopCell = el;\n let bottomRightCell = el;\n let leftTopRect = getEditorElementClientRect(el);\n let bottomRightRect = leftTopRect;\n\n const tableCells = tableEl.querySelectorAll('td');\n const tableCellRects = [] as any[];\n tableCells.forEach(tableCell => {\n // TODO: reduce calculation: cache table rect, use table rect diff all td rect boundary\n const { left, top, height, width } = getEditorElementClientRect(tableCell);\n tableCellRects.push({ left, top, height, width });\n let isIntersected =\n ((left + ERROR_LIMIT >= currentBoundary.left &&\n left + ERROR_LIMIT <= currentBoundary.right) ||\n (left - ERROR_LIMIT + width >= currentBoundary.left &&\n left - ERROR_LIMIT + width <= currentBoundary.right)) &&\n ((top + ERROR_LIMIT >= currentBoundary.top &&\n top + ERROR_LIMIT <= currentBoundary.bottom) ||\n (top - ERROR_LIMIT + height >= currentBoundary.top &&\n top - ERROR_LIMIT + height <= currentBoundary.bottom));\n if (isIntersected) {\n currentBoundary = getBoundaryFromRects(currentBoundary, {\n left,\n top,\n height,\n width,\n });\n }\n });\n\n tableCells.forEach((tableCell, index) => {\n const { left, top, height, width } = tableCellRects[index];\n let isIntersected =\n ((left + ERROR_LIMIT >= currentBoundary.left &&\n left + ERROR_LIMIT <= currentBoundary.right) ||\n (left - ERROR_LIMIT + width >= currentBoundary.left &&\n left - ERROR_LIMIT + width <= currentBoundary.right)) &&\n ((top + ERROR_LIMIT >= currentBoundary.top &&\n top + ERROR_LIMIT <= currentBoundary.bottom) ||\n (top - ERROR_LIMIT + height >= currentBoundary.top &&\n top - ERROR_LIMIT + height <= currentBoundary.bottom));\n if (!isIntersected) {\n return;\n }\n\n if (top <= leftTopRect.top && left <= leftTopRect.left) {\n leftTopRect = tableCellRects[index];\n leftTopCell = tableCell;\n }\n if (\n top === leftTopRect.top + ERROR_LIMIT ||\n (top === leftTopRect.top && left <= leftTopRect.left)\n ) {\n leftTopRect = tableCellRects[index];\n leftTopCell = tableCell;\n }\n if (\n top + height > bottomRightRect.top + bottomRightRect.height + ERROR_LIMIT ||\n (top + height === bottomRightRect.top + bottomRightRect.height &&\n left + width >= bottomRightRect.left + bottomRightRect.width)\n ) {\n bottomRightRect = tableCellRects[index];\n bottomRightCell = tableCell;\n }\n });\n\n return { leftTopCell, bottomRightCell, boundary: currentBoundary };\n};\n\n// get selected boundary and correct let-top-dom, right-bottom-dom\nexport const getBoundaryRectAndElement = (el1: Element, el2: Element) => {\n const rect1 = getEditorElementClientRect(el1);\n const rect2 = getEditorElementClientRect(el2);\n\n const boundary = getBoundaryFromRects(rect1, rect2);\n\n return getCorrectBoundary(el1, boundary);\n};\n\nexport function setStyle(domNode: any, rules: any) {\n if (typeof rules === 'object') {\n for (let prop in rules) {\n domNode.style[prop] = rules[prop];\n }\n }\n}\n\nexport const getCurrentTable = (target: Element) => {\n let parentNode = target.parentNode;\n while (parentNode) {\n if (parentNode.nodeName === 'TABLE') {\n return parentNode;\n }\n parentNode = parentNode.parentNode;\n }\n return parentNode;\n};\n\nexport const getElementsBoundary = (el1: Element, el2: Element): IBoundingPosition => {\n const rect1 = el1.getBoundingClientRect();\n const rect2 = el2.getBoundingClientRect();\n\n const left = Math.min(rect1.left, rect2.left);\n const right = Math.max(rect1.right, rect2.right);\n const bottom = Math.max(rect1.bottom, rect2.bottom);\n const top = Math.min(rect1.top, rect2.top);\n\n return { left, top, right, bottom };\n};\n\nexport const checkEventInBoundingRect = (\n rect: IBoundingPosition,\n { x, y }: { x: number; y: number },\n) => {\n return x >= rect.left && x <= rect.right && y <= rect.bottom && y >= rect.top;\n};\n\nexport const getCellAttr = (el: Element, attrName: string) => {\n const value = el.getAttribute(attrName);\n\n return Number(value || 0);\n};\n\nconst getCellIndex = (cellElement: Element) => {\n let idxName = cellElement.getAttribute(DATA_CONTENT_EDITABLE_IDX) as string;\n idxName = idxName.split('data.value.tableSource.')[1].split('.content')[0];\n\n return idxName.split('.').map(e => Number(e));\n};\n\nexport const getTdBoundaryIndex = (leftTopCell: Element, bottomRightCell: Element) => {\n const idx1 = getCellIndex(leftTopCell);\n const idx2 = getCellIndex(bottomRightCell);\n\n const top = idx1[0];\n const left = idx1[1];\n const right = idx2[1];\n const bottom = idx2[0];\n\n return { left, top, right, bottom };\n};\n\nexport const getCorrectTableIndexBoundary = (\n tableIndexBoundary: IBoundingPosition,\n tableData: IOperationData[][],\n) => {\n let { left, right, top, bottom } = tableIndexBoundary;\n // set top, bottom index\n tableData.forEach((tr, trIndex) => {\n tr.forEach(td => {\n td.top = trIndex;\n td.bottom = trIndex + (td.rowSpan || 1) - 1;\n });\n });\n // set right ,left index\n const maxTdCount = getMaxTdCount(tableData);\n const mergedCells = [] as [number, number][]; // [trIndex, tdIndex]\n Array.from({ length: maxTdCount }).forEach((_, tdIndex) => {\n tableData.forEach((tr, trIndex) => {\n const mergedCell = mergedCells.find(e => e[0] === trIndex && e[1] === tdIndex);\n if (mergedCell) {\n return;\n }\n const mergedTds = mergedCells.filter(e => e[0] === trIndex && e[1] < tdIndex);\n const _tdIndex = tdIndex - mergedTds.length;\n const td = tr[_tdIndex];\n if (!td) {\n console.error('error case, should fix this error.');\n return;\n }\n const rowSpan = td.rowSpan || 1;\n const colSpan = td.colSpan || 1;\n td.left = tdIndex;\n td.right = tdIndex + colSpan - 1;\n\n if (rowSpan > 1 || colSpan > 1) {\n Array.from({ length: rowSpan }).forEach((_, rowSpanIndex) => {\n Array.from({ length: colSpan }).forEach((_, colSpanIndex) => {\n if (rowSpanIndex === 0 && colSpanIndex === 0) {\n return;\n }\n mergedCells.push([trIndex + rowSpanIndex, tdIndex + colSpanIndex]);\n });\n });\n }\n });\n });\n\n tableIndexBoundary.left = tableData?.[top]?.[left]?.left || 0;\n tableIndexBoundary.right = tableData?.[bottom]?.[right]?.right || 0;\n tableIndexBoundary.bottom = tableData?.[bottom]?.[right]?.bottom || 0;\n tableIndexBoundary.top = tableData?.[top]?.[left]?.top || 0;\n\n return tableIndexBoundary;\n};\n\nexport const getMaxTdCount = (\n tableData: AdvancedTableBlock['data']['value']['tableSource'],\n) => {\n let tdCount = 1;\n tableData.forEach(tr => {\n let _tdCount = tr.reduce((count, td) => count + (td.colSpan || 1), 0);\n if (_tdCount > tdCount) {\n tdCount = _tdCount;\n }\n });\n return tdCount;\n};\n",".easy-email-table-operation-menu {\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-table-operation-menu-dividing {\n height: 1px;\n background-color: #efefef;\n }\n\n .easy-email-table-operation-color-picker {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n padding: 0 16px 10px;\n background-color: #fff;\n overflow: hidden;\n\n .easy-email-table-operation-color-picker-item {\n width: 20px;\n height: 20px;\n border: 1px solid #595959;\n margin-right: 5px;\n margin-bottom: 5px;\n cursor: pointer;\n }\n }\n\n .easy-email-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 &:hover {\n background-color: #efefef;\n }\n\n .easy-email-table-operation-menu-icon {\n margin-right: 8px;\n height: 20px;\n width: 20px;\n font-size: 0;\n }\n }\n\n .easy-email-table-operation-menu-bg-item {\n padding: 10px 16px;\n background-color: #fff;\n color: #595959;\n\n > div:nth-child(2) {\n margin-top: 4px;\n display: flex;\n align-items: center;\n flex-shrink: 0;\n\n .arco-input-inner-wrapper {\n box-shadow: none;\n }\n .arco-btn-size-default {\n padding: 0 12px;\n }\n\n .arco-input-group {\n display: flex;\n .arco-input-inner-wrapper {\n flex: 1;\n }\n .arco-input-group-addafter {\n height: 100%;\n width: auto;\n }\n }\n }\n\n &-color {\n height: 28px;\n width: 28px;\n flex-shrink: 0;\n border: 1px solid var(--color-neutral-3, rgb(229, 230, 235));\n border-right: none;\n padding: 4px;\n cursor: pointer;\n position: relative;\n\n > div {\n height: 100%;\n width: 100%;\n border: 1px solid var(--color-neutral-3, rgb(229, 230, 235));\n border-radius: 2px;\n }\n input {\n cursor: pointer;\n position: absolute;\n width: 100%;\n height: 100%;\n z-index: 1;\n left: 0;\n top: 0;\n opacity: 0;\n }\n }\n }\n}\n","import { Input } from 'antd';\nimport React, { useEffect } from 'react';\nimport { createRoot } from 'react-dom/client';\nimport { useState } from 'react';\n\ninterface CellBackgroundSelectorProps {\n bgColorHandler: (color: string) => void;\n rootDom: Element;\n}\n\nconst CellBackgroundSelector: React.FC<CellBackgroundSelectorProps> = ({\n bgColorHandler,\n rootDom,\n}) => {\n const [color, setColor] = useState('#ffffff');\n\n useEffect(() => {\n if (!rootDom) {\n return;\n }\n const observer = new ResizeObserver(() => {\n setColor('#ffffff');\n });\n observer.observe(rootDom);\n return () => {\n observer.disconnect();\n };\n }, [rootDom]);\n\n return (\n <div\n onClick={e => e.stopPropagation()}\n className='easy-email-table-operation-menu-bg-item'\n >\n <div>{t('Set Background Color')}</div>\n <div>\n <div className='easy-email-table-operation-menu-bg-item-color'>\n <div style={{ backgroundColor: color }} />\n <input\n type='color'\n value={color}\n onChange={e => setColor(e.target.value)}\n />\n </div>\n <Input.Search\n enterButton={t('Set')}\n onSearch={() => bgColorHandler(color)}\n value={color}\n onKeyDown={e => e.stopPropagation()}\n onChange={e => setColor(e.target.value)}\n />\n </div>\n </div>\n );\n};\n\nconst getCellBackgroundSelectorRoot = (\n bgColorHandler: CellBackgroundSelectorProps['bgColorHandler'],\n rootDom: Element,\n) => {\n const node = document.createElement('div');\n\n const root = createRoot(node);\n root.render(\n <CellBackgroundSelector\n bgColorHandler={bgColorHandler}\n rootDom={rootDom}\n />,\n );\n return node;\n};\n\nexport default getCellBackgroundSelectorRoot;\n","import getCellBackgroundSelectorRoot from './tableCellBgSelector';\nimport TableOperationMenu from './tableOperationMenu';\nimport { IOperationData } from './type';\n\nconst MENU_CONFIG = {\n insertColumnRight: {\n text: 'Insert column right',\n icon: '<?xml version=\"1.0\" standalone=\"no\"?><!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\"><svg class=\"icon\" width=\"20px\" height=\"20px\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path fill=\"#595959\" d=\"M73.142857 336.64h526.628572v43.885714H73.142857zM73.142857 643.657143h526.628572v43.885714H73.142857zM336.457143 117.028571h43.885714v789.942858h-43.885714zM204.8 73.142857h614.4a131.657143 131.657143 0 0 1 131.657143 131.657143v614.4a131.657143 131.657143 0 0 1-131.657143 131.657143H204.8A131.657143 131.657143 0 0 1 73.142857 819.2V204.8A131.84 131.84 0 0 1 204.8 73.142857z m0 43.885714a87.771429 87.771429 0 0 0-87.771429 87.771429v614.4a87.771429 87.771429 0 0 0 87.771429 87.771429h614.4a87.771429 87.771429 0 0 0 87.771429-87.771429V204.8a87.771429 87.771429 0 0 0-87.771429-87.771429zM819.2 73.142857h-219.428571v877.714286h219.428571a131.657143 131.657143 0 0 0 131.657143-131.657143V204.8A131.84 131.84 0 0 0 819.2 73.142857z m44.068571 460.982857h-65.828571v65.828572H753.371429v-65.828572h-65.828572V490.057143h65.828572v-65.828572h44.068571v65.828572h65.828571z\" /></svg>',\n handler() {\n const _this = this as unknown as TableOperationMenu;\n const right = _this.tableIndexBoundary.right;\n\n _this.tableData.forEach(tr => {\n if (right === _this.maxTdCount - 1) {\n tr.push({ content: '-' } as IOperationData);\n return;\n }\n if (tr.length === 0) {\n return tr.push({ content: '-' } as IOperationData);\n }\n for (let index = 0; index < tr.length; index++) {\n const tdLeft = tr[index].left || 0;\n const tdRight = tr[index].right || 0;\n\n if (tdRight === right) {\n tr.splice(index + 1, 0, { content: '-' } as IOperationData);\n break;\n }\n if (tdLeft <= right && tdRight > right && tr[index].colSpan) {\n tr[index].colSpan = (tr[index].colSpan || 1) + 1;\n break;\n }\n // pre cell intersect current cell.\n if (tdLeft > right && tdLeft - 1 === right) {\n tr.splice(index, 0, { content: '-' } as IOperationData);\n break;\n }\n if (tdLeft > right) {\n break;\n }\n }\n });\n _this.changeTableData?.(_this.tableData);\n },\n },\n insertColumnLeft: {\n text: 'Insert column left',\n icon: '<?xml version=\"1.0\" standalone=\"no\"?><!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\"><svg class=\"icon\" width=\"20px\" height=\"20.00px\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path fill=\"#595959\" d=\"M380.342857 336.457143h526.811429v43.885714H380.342857z m0 307.2h526.811429v43.885714H380.342857zM643.657143 117.028571h43.885714v789.942858h-43.885714zM204.8 73.142857h614.582857A131.474286 131.474286 0 0 1 950.857143 204.8v614.4a131.657143 131.657143 0 0 1-131.657143 131.657143H204.8A131.657143 131.657143 0 0 1 73.142857 819.2V204.8A131.657143 131.657143 0 0 1 204.8 73.142857z m0 43.885714a87.588571 87.588571 0 0 0-87.588571 87.771429v614.4a87.588571 87.588571 0 0 0 87.588571 87.771429h614.582857a87.771429 87.771429 0 0 0 87.771429-87.771429V204.8a87.771429 87.771429 0 0 0-87.771429-87.771429zM204.8 73.142857A131.657143 131.657143 0 0 0 73.142857 204.8v614.4a131.657143 131.657143 0 0 0 131.657143 131.657143h219.428571V73.142857z m131.84 460.8h-65.828571v65.828572h-43.885715v-65.828572h-65.828571v-43.885714h65.828571v-65.828572h43.885715v65.828572h65.828571z\" /></svg>',\n handler() {\n const _this = this as unknown as TableOperationMenu;\n const left = _this.tableIndexBoundary.left;\n _this.tableData.forEach(tr => {\n if (left === 0) {\n tr.unshift({ content: '-' } as IOperationData);\n return;\n }\n if (tr.length === 0) {\n return tr.push({ content: '-' } as IOperationData);\n }\n for (let index = 0; index < tr.length; index++) {\n const tdLeft = tr[index].left || 0;\n const tdRight = tr[index].right || 0;\n if (tdLeft === left) {\n tr.splice(index, 0, { content: '-' } as IOperationData);\n break;\n }\n // pre cell intersect current cell.\n if (tdLeft < left && tdRight >= left && tr[index].colSpan) {\n tr[index].colSpan = (tr[index].colSpan || 1) + 1;\n break;\n }\n // pre cell intersect current cell.\n if (tdLeft > left && tr[index - 1] && (tr[index - 1].right || 0) + 1 === left) {\n tr.splice(index, 0, { content: '-' } as IOperationData);\n break;\n }\n if (tdLeft > left) {\n break;\n }\n }\n });\n _this.changeTableData?.(_this.tableData);\n },\n },\n insertRowUp: {\n text: 'Insert row up',\n icon: '<?xml version=\"1.0\" standalone=\"no\"?><!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\"><svg class=\"icon\" width=\"20px\" height=\"20.00px\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path fill=\"#595959\" d=\"M73.142857 599.771429h877.714286v43.885714H73.142857zM336.457143 380.342857h43.885714v526.628572h-43.885714z m307.2 0h43.885714v526.628572h-43.885714zM204.8 73.142857h614.4a131.657143 131.657143 0 0 1 131.657143 131.657143v614.4a131.657143 131.657143 0 0 1-131.657143 131.657143H204.8A131.657143 131.657143 0 0 1 73.142857 819.2V204.8A131.657143 131.657143 0 0 1 204.8 73.142857z m0 43.885714a87.771429 87.771429 0 0 0-87.771429 87.771429v614.4a87.588571 87.588571 0 0 0 87.771429 87.771429h614.4a87.588571 87.588571 0 0 0 87.771429-87.771429V204.8a87.771429 87.771429 0 0 0-87.771429-87.771429zM819.2 73.142857H204.8A131.657143 131.657143 0 0 0 73.142857 204.8v219.428571h877.714286v-219.428571A131.657143 131.657143 0 0 0 819.2 73.142857z m-219.428571 197.485714h-65.828572v65.828572h-43.885714v-65.828572h-65.828572v-43.885714h65.828572V160.914286h43.885714v65.828571h65.828572z\" /></svg>',\n handler() {\n const _this = this as unknown as TableOperationMenu;\n const top = _this.tableIndexBoundary.top;\n let maxTdCount = _this.maxTdCount;\n if (_this.tableData[top].length < maxTdCount) {\n // update pre cell row span\n for (let index = top - 1; index > -1; index--) {\n const tr = _this.tableData[index];\n tr.forEach((td) => {\n if (td.bottom && td.bottom >= top) {\n td.rowSpan = (td.rowSpan || 1) + 1;\n maxTdCount -= td.colSpan || 1;\n }\n });\n if (tr.length === maxTdCount) {\n break;\n }\n }\n }\n _this.addRow(top, maxTdCount);\n },\n },\n insertRowDown: {\n text: 'Insert row down',\n icon: '<?xml version=\"1.0\" standalone=\"no\"?><!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\"><svg class=\"icon\" width=\"20px\" height=\"20.00px\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path fill=\"#595959\" d=\"M204.8 73.142857h614.4a131.657143 131.657143 0 0 1 131.657143 131.657143v614.4a131.657143 131.657143 0 0 1-131.657143 131.657143H204.8A131.657143 131.657143 0 0 1 73.142857 819.2V204.8A131.84 131.84 0 0 1 204.8 73.142857z m0 43.885714a87.771429 87.771429 0 0 0-87.771429 87.771429v614.4a87.771429 87.771429 0 0 0 87.771429 87.771429h614.4a87.771429 87.771429 0 0 0 87.771429-87.771429V204.8a87.771429 87.771429 0 0 0-87.771429-87.771429zM73.142857 336.457143h877.714286v44.068571H73.142857zM336.64 117.028571h43.885714v526.628572h-43.885714z m307.017143 0h44.068571v526.628572H643.657143zM73.142857 599.771429v219.428571a131.657143 131.657143 0 0 0 131.657143 131.657143h614.4a131.657143 131.657143 0 0 0 131.657143-131.657143v-219.428571z m526.628572 197.485714h-65.645715v65.828571H490.057143v-65.828571h-65.828572v-43.885714h65.828572v-65.828572h44.068571v65.828572h65.645715z\" /></svg>',\n handler() {\n const _this = this as unknown as TableOperationMenu;\n let addCount = _this.maxTdCount;\n const bottom = _this.tableIndexBoundary.bottom;\n\n if (_this.tableData[bottom].length < _this.maxTdCount) {\n // update pre cell row span\n for (let index = bottom - 1; index > -1; index--) {\n const tr = _this.tableData[index];\n if (tr.length === _this.maxTdCount) {\n break;\n }\n tr.forEach((td) => {\n if (td.bottom && td.bottom > bottom) {\n td.rowSpan = (td.rowSpan || 1) + 1;\n addCount -= td.colSpan || 1;\n }\n });\n }\n }\n // If current Cell intersect next row, should add rowSpan and decrease tdCount\n _this.tableData[bottom].forEach(e => {\n if (e.rowSpan && e.rowSpan > 1) {\n e.rowSpan += 1;\n addCount -= e.colSpan || 1;\n }\n });\n\n _this.addRow(bottom + 1, addCount);\n },\n },\n\n splitCell: {\n text: 'Split cell',\n icon: '<?xml version=\"1.0\" standalone=\"no\"?><!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\"><svg class=\"icon\" width=\"20px\" height=\"20.00px\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path fill=\"#595959\" d=\"M925.99596 99.038384c-25.470707-25.6-60.121212-39.822222-96.323233-39.822222H194.19798c-36.072727 0-70.723232 14.351515-96.323233 39.822222-25.6 25.6-39.822222 60.121212-39.822222 96.323232v635.474748c0 36.072727 14.351515 70.723232 39.822222 96.323232C123.474747 952.759596 158.125253 967.111111 194.19798 967.111111h635.474747c36.072727 0 70.723232-14.351515 96.323233-39.951515 25.6-25.6 39.951515-60.121212 39.951515-96.323232V195.361616c0-36.072727-14.351515-70.723232-39.951515-96.323232z m-277.850505 5.559596v226.909091H375.725253V104.59798h272.420202zM103.434343 195.361616c0-24.048485 9.567677-47.191919 26.634344-64.129293 17.066667-17.066667 40.080808-26.634343 64.129293-26.634343h136.145454v226.909091H103.434343V195.361616z m90.763637 726.367677c-24.048485 0-47.191919-9.567677-64.129293-26.634344-17.066667-17.066667-26.634343-40.080808-26.634344-64.129292V649.309091h226.909091v272.420202H194.19798z m181.527273 0V649.309091h272.290909v272.420202H375.725253z m544.711111-90.892929c0 24.048485-9.567677 47.191919-26.634344 64.129293-17.066667 17.066667-40.080808 26.634343-64.129293 26.634343H693.527273V649.309091h226.909091v181.527273zM693.527273 331.507071V104.59798h136.145454c24.048485 0 47.191919 9.567677 64.129293 26.634343 17.066667 17.066667 26.634343 40.080808 26.634344 64.129293v136.145455H693.527273z M490.057143 375.725253h43.885714v272.549494h-43.885714z M336.457143 468.114141h351.085714v43.885714H336.457143z\" /></svg>',\n handler() {\n const _this = this as unknown as TableOperationMenu;\n const { top, left } = _this.tableIndexBoundary;\n\n const tr = _this.tableData[top];\n const cellIndex = tr.findIndex(td => td.left === left);\n if (cellIndex === -1) return;\n\n const cell = tr[cellIndex];\n const colSpan = cell.colSpan || 1;\n const rowSpan = cell.rowSpan || 1;\n\n if (colSpan === 1 && rowSpan === 1) return;\n\n const newCells: IOperationData[] = [];\n for (let c = 0; c < colSpan; c++) {\n newCells.push({ content: c === 0 ? cell.content : '-' } as IOperationData);\n }\n delete newCells[0].colSpan;\n delete newCells[0].rowSpan;\n\n tr.splice(cellIndex, 1, ...newCells);\n\n if (rowSpan > 1) {\n for (let r = 1; r < rowSpan; r++) {\n const targetRow = _this.tableData[top + r];\n if (!targetRow) continue;\n\n let insertIndex = targetRow.length;\n for (let i = 0; i < targetRow.length; i++) {\n const tdLeft = targetRow[i].left || 0;\n if (tdLeft >= left) {\n insertIndex = i;\n break;\n }\n }\n\n const cellsToInsert: IOperationData[] = [];\n for (let c = 0; c < colSpan; c++) {\n cellsToInsert.push({ content: '-' } as IOperationData);\n }\n targetRow.splice(insertIndex, 0, ...cellsToInsert);\n }\n }\n\n _this.changeTableData?.(_this.tableData);\n },\n },\n\n mergeCells: {\n text: 'Merge selected cells',\n icon: '<?xml version=\"1.0\" standalone=\"no\"?><!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\"><svg class=\"icon\" width=\"20px\" height=\"20.00px\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path fill=\"#595959\" d=\"M925.99596 99.038384c-25.470707-25.6-60.121212-39.822222-96.323233-39.822222H194.19798c-36.072727 0-70.723232 14.351515-96.323233 39.822222-25.6 25.6-39.822222 60.121212-39.822222 96.323232v635.474748c0 36.072727 14.351515 70.723232 39.822222 96.323232C123.474747 952.759596 158.125253 967.111111 194.19798 967.111111h635.474747c36.072727 0 70.723232-14.351515 96.323233-39.951515 25.6-25.6 39.951515-60.121212 39.951515-96.323232V195.361616c0-36.072727-14.351515-70.723232-39.951515-96.323232z m-277.850505 5.559596v226.909091H375.725253V104.59798h272.420202zM103.434343 195.361616c0-24.048485 9.567677-47.191919 26.634344-64.129293 17.066667-17.066667 40.080808-26.634343 64.129293-26.634343h136.145454v226.909091H103.434343V195.361616z m90.763637 726.367677c-24.048485 0-47.191919-9.567677-64.129293-26.634344-17.066667-17.066667-26.634343-40.080808-26.634344-64.129292V649.309091h226.909091v272.420202H194.19798z m181.527273 0V649.309091h272.290909v272.420202H375.725253z m544.711111-90.892929c0 24.048485-9.567677 47.191919-26.634344 64.129293-17.066667 17.066667-40.080808 26.634343-64.129293 26.634343H693.527273V649.309091h226.909091v181.527273zM693.527273 331.507071V104.59798h136.145454c24.048485 0 47.191919 9.567677 64.129293 26.634343 17.066667 17.066667 26.634343 40.080808 26.634344 64.129293v136.145455H693.527273z\" /></svg>',\n handler() {\n const _this = this as unknown as TableOperationMenu;\n const { top, left, bottom, right } = _this.tableIndexBoundary;\n const leftTopItem = _this.tableData[top].find(\n e => e.left === left,\n ) as IOperationData;\n leftTopItem.rowSpan = bottom - top + 1;\n leftTopItem.colSpan = right - left + 1;\n\n _this.tableData.forEach((tr, trIndex) => {\n if (trIndex >= top && trIndex <= bottom) {\n // merge next cell, should add `<br />`.\n if (bottom > top && trIndex > top && trIndex <= bottom) {\n leftTopItem.content += '<br />';\n }\n const deletedIndex = [] as number[];\n tr.forEach((td, tdIndex) => {\n // current cell\n if (top === trIndex && left === td.left) {\n return;\n }\n // should merged cell\n if (td.left >= left && td.right <= right) {\n leftTopItem.content += ' ' + td.content;\n deletedIndex.push(tdIndex);\n }\n });\n // delete cell\n if (deletedIndex.length > 0) {\n tr.splice(\n deletedIndex[0],\n deletedIndex[deletedIndex.length - 1] - deletedIndex[0] + 1,\n );\n }\n }\n });\n\n _this.changeTableData?.(_this.tableData);\n },\n },\n\n deleteColumn: {\n text: 'Delete selected columns',\n icon: '<?xml version=\"1.0\" standalone=\"no\"?><!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\"><svg class=\"icon\" width=\"20px\" height=\"20.00px\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path fill=\"#595959\" d=\"M925.996 99.038c-25.47-25.6-60.121-39.822-96.323-39.822H194.198c-75.12 0.13-136.016 61.026-136.145 136.146v635.345c0 36.073 14.351 70.723 39.822 96.323 25.6 25.73 60.25 40.081 96.323 40.081h635.475c36.072 0 70.723-14.351 96.323-39.951 25.6-25.6 39.951-60.122 39.951-96.324V195.362c0-36.073-14.351-70.724-39.951-96.324z m-365.77 494.287L512 545.228l-48.226 48.097-32.194-31.935 48.355-48.226-48.226-48.097 32.194-32.194L512 480.97l48.097-48.097 32.194 32.194-48.097 48.097 48.226 48.226-32.194 31.935zM103.434 195.362c0-24.049 9.568-47.192 26.635-64.13 17.066-17.066 40.08-26.634 64.129-26.634h136.145v226.91H103.434V195.361z m0 181.656h226.91V649.31h-226.91V377.02z m90.764 544.84c-24.049 0-47.192-9.567-64.13-26.634-17.066-17.066-26.634-40.08-26.634-64.258V694.69h226.91v227.168H194.197z m726.238-90.763c0 24.048-9.438 47.192-26.505 64.259-17.066 17.066-40.21 26.634-64.258 26.505H693.527V694.69h226.91v136.404z m0-181.786H693.527V377.02h226.91v272.29zM693.527 331.507V104.598h136.146c24.048 0 47.192 9.438 64.258 26.505 17.067 17.067 26.635 40.21 26.505 64.259v136.145H693.527z\" /></svg>',\n handler() {\n const _this = this as unknown as TableOperationMenu;\n const { left, right } = _this.tableIndexBoundary;\n _this.tableData.forEach(tr => {\n const deleteIds = [] as number[];\n for (let index = 0; index < tr.length; index++) {\n const td = tr[index];\n const tdLeft = tr[index].left || 0;\n const tdRight = tr[index].right || 0;\n const colSpan = td.colSpan || 1;\n if (tdLeft > right) {\n break;\n }\n if (tdLeft >= left && tdRight <= right) {\n deleteIds.push(index);\n }\n // operate one cell\n else if (tdLeft <= left && tdRight >= right) {\n td.colSpan = colSpan - (right - left) - 1;\n }\n // left insert cell\n else if (tdLeft > left && tdRight >= right) {\n td.colSpan = colSpan - (right - tdLeft) - 1;\n }\n // right insert cell\n else if (tdLeft < left && tdRight >= left) {\n td.colSpan = colSpan - (tdRight - left) - 1;\n }\n }\n if (deleteIds.length) {\n tr.splice(deleteIds[0], deleteIds[deleteIds.length - 1] - deleteIds[0] + 1);\n }\n });\n _this.changeTableData?.(_this.tableData);\n },\n },\n\n deleteRow: {\n text: 'Delete selected rows',\n icon: '<?xml version=\"1.0\" standalone=\"no\"?><!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\"><svg class=\"icon\" width=\"20px\" height=\"20.00px\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path fill=\"#595959\" d=\"M925.99596 99.038384c-25.470707-25.6-60.121212-39.822222-96.323233-39.822222H194.19798c-36.072727 0-70.723232 14.351515-96.323233 39.822222-25.6 25.6-39.822222 60.121212-39.822222 96.323232v635.474748c0 36.072727 14.351515 70.723232 39.822222 96.323232C123.474747 952.759596 158.125253 967.111111 194.19798 967.111111h635.474747c36.072727 0 70.723232-14.351515 96.323233-39.951515 25.6-25.6 39.951515-60.121212 39.951515-96.323232V195.361616c0-36.072727-14.351515-70.723232-39.951515-96.323232z m-550.270707 5.559596h272.290909v227.167677H375.725253V104.59798z m56.242424 360.468687l31.935353-32.19394 48.09697 48.226263 48.09697-48.226263 32.193939 32.19394-48.09697 48.096969 48.226263 48.226263-32.193939 31.935354-48.226263-48.09697-48.226263 48.09697-31.935353-31.935354 48.226262-48.226263-48.096969-48.096969zM103.434343 195.361616c0-24.048485 9.567677-47.191919 26.634344-64.129293 17.066667-17.066667 40.080808-26.634343 64.129293-26.634343h136.145454v227.167677H103.434343V195.361616z m817.002021 635.733333c0 24.048485-9.567677 47.191919-26.634344 64.258586-17.066667 17.066667-40.080808 26.634343-64.129293 26.634344H194.19798c-24.048485 0-47.191919-9.567677-64.258586-26.634344C112.872727 878.157576 103.434343 855.014141 103.434343 830.836364V694.690909h226.909091v226.909091h45.381819V694.690909h272.290909v226.909091h45.381818V694.690909h226.909091v136.40404z m0-499.329292H693.527273V104.59798h136.145454c24.048485 0 47.191919 9.567677 64.129293 26.634343 17.066667 17.066667 26.634343 40.080808 26.634344 64.129293v136.404041z\" /></svg>',\n handler() {\n const _this = this as unknown as TableOperationMenu;\n const { top, bottom } = _this.tableIndexBoundary;\n const deleteCount = bottom - top + 1;\n // pre cell intersect current cell.\n for (let index = bottom - 1; index > -1; index--) {\n const tr = _this.tableData[index];\n tr.forEach((td) => {\n if (td.bottom && td.bottom >= top) {\n const deleteRowSpan = td.bottom >= bottom ? deleteCount : td.bottom - top + 1;\n td.rowSpan = (td.rowSpan || 1) - deleteRowSpan;\n }\n });\n }\n\n // current cell intersect next cell\n for (let index = top; index <= bottom; index++) {\n const tr = _this.tableData[index];\n tr.forEach((td) => {\n const rowSpan = td.rowSpan || 1;\n if (rowSpan - 1 + top > bottom) {\n const nextRowCell = { ...td, rowSpan: rowSpan - (bottom - top + 1) };\n const nextRow = _this.tableData[bottom + 1];\n if (nextRow) {\n const index = Array.from({ length: _this.maxTdCount }).findIndex(\n (_, index) => index === nextRowCell.left,\n );\n if (index > -1) {\n nextRow.splice(index, 0, nextRowCell);\n }\n }\n }\n });\n }\n\n _this.tableData.splice(_this.tableIndexBoundary.top, deleteCount);\n _this.changeTableData?.(_this.tableData);\n },\n },\n\n setCellBg: {\n text: 'Set Background',\n render(tableOperationMenu: TableOperationMenu) {\n const bgColorHandler = this.handler.bind(tableOperationMenu);\n return getCellBackgroundSelectorRoot(\n bgColorHandler,\n tableOperationMenu.domNode!,\n );\n },\n handler(color: string) {\n const _this = this as unknown as TableOperationMenu;\n const { top, bottom, left, right } = _this.tableIndexBoundary;\n _this.tableData.forEach(tr => {\n for (let index = 0; index < tr.length; index++) {\n const td = tr[index];\n const tdTop = tr[index].top || 0;\n const tdBottom = tr[index].bottom || 0;\n const tdLeft = tr[index].left || 0;\n const tdRight = tr[index].right || 0;\n\n if (tdLeft > right) {\n break;\n }\n if (top <= tdTop && bottom >= tdBottom && left <= tdLeft && right >= tdRight) {\n td.backgroundColor = color;\n }\n }\n });\n _this.changeTableData?.(_this.tableData);\n _this.hide();\n },\n },\n};\n\nexport default MENU_CONFIG;\n","import { setStyle, getCorrectTableIndexBoundary, getMaxTdCount } from './util';\nimport styleText from './menu.scss?inline';\nimport { IBoundingPosition, IOperationData } from './type';\nimport MENU_CONFIG from './tableMenuConfig';\n\nconst MENU_HEIGHT = 305;\nconst MENU_WIDTH = 200;\n\nexport default class TableOperationMenu {\n menuItems = MENU_CONFIG;\n domNode: Element | undefined = undefined;\n styleDom?: HTMLStyleElement;\n visible = false;\n splitCellNode: HTMLElement | undefined = undefined;\n splitCellDivider: HTMLElement | undefined = undefined;\n\n changeTableData?: (e: IOperationData[][]) => void;\n tableData = undefined as unknown as IOperationData[][];\n tableIndexBoundary = undefined as unknown as IBoundingPosition;\n maxTdCount = 0;\n\n constructor() {\n this.menuInitial();\n this.mount();\n }\n\n mount() {\n if (this.domNode) {\n document.body.appendChild(this.domNode);\n }\n document.body.addEventListener('click', this.handleBodyClick.bind(this));\n }\n\n destroy() {\n this.domNode?.remove();\n if (this.styleDom) {\n document.head.removeChild(this.styleDom);\n }\n document.body.removeEventListener('click', this.handleBodyClick.bind(this));\n }\n\n handleBodyClick(e: MouseEvent) {\n // Ignore right-clicks — the menu should stay visible after being shown by a right-click\n if (e.button !== 0) return;\n this.hide();\n }\n\n hide() {\n if (!this.visible) {\n return;\n }\n this.visible = false;\n setStyle(this.domNode, {\n display: 'none',\n });\n }\n\n addRow(insertIndex: number, colCount: number) {\n const newRow = Array.from({ length: colCount }).map(() => ({ content: '-' }) as any);\n this.tableData.splice(insertIndex, 0, newRow);\n this.changeTableData?.(this.tableData);\n }\n\n setTableData(tableData: IOperationData[][]) {\n this.tableData = tableData || [];\n this.maxTdCount = getMaxTdCount(this.tableData);\n }\n\n setTableIndexBoundary(tableIndexBoundary: IBoundingPosition) {\n // get correct boundary index and set table-td boundary\n this.tableIndexBoundary = getCorrectTableIndexBoundary(\n tableIndexBoundary,\n this.tableData,\n );\n }\n\n showMenu({ x, y }: { x: number; y: number }) {\n this.visible = true;\n this.updateSplitCellVisibility();\n const maxHeight = window.innerHeight;\n const maxWidth = window.innerWidth;\n if (maxWidth - MENU_WIDTH < x) {\n x -= MENU_WIDTH;\n }\n if (maxHeight - MENU_HEIGHT < y) {\n y -= MENU_HEIGHT;\n }\n setStyle(this.domNode, {\n display: 'block',\n position: 'fixed',\n left: `${x}px`,\n top: `${y}px`,\n 'min-height': '150px',\n width: `${MENU_WIDTH}px`,\n Height: `${MENU_HEIGHT}px`,\n });\n }\n\n updateSplitCellVisibility() {\n if (!this.splitCellNode || !this.splitCellDivider) return;\n const { top, left, bottom, right } = this.tableIndexBoundary || {};\n // Show splitCell only when exactly one merged cell is selected.\n // A merged cell expands the boundary (right > left or bottom > top),\n // so we check that one cell's span exactly covers the whole boundary.\n let isMerged = false;\n if (this.tableData) {\n const tr = this.tableData[top];\n if (tr) {\n const cell = tr.find(td => td.left === left);\n if (cell) {\n const colSpan = cell.colSpan || 1;\n const rowSpan = cell.rowSpan || 1;\n // The cell is the only one selected if its span exactly matches the boundary\n const cellCoversFullBoundary =\n cell.left === left &&\n cell.right === right &&\n cell.top === top &&\n cell.bottom === bottom;\n isMerged = cellCoversFullBoundary && (colSpan > 1 || rowSpan > 1);\n }\n }\n }\n const display = isMerged ? '' : 'none';\n this.splitCellNode.style.display = display;\n this.splitCellDivider.style.display = display;\n }\n\n menuInitial() {\n this.styleDom = document.createElement('style');\n this.styleDom.innerText = styleText;\n document.head.appendChild(this.styleDom);\n\n this.domNode = document.createElement('div');\n this.domNode.classList.add('easy-email-table-operation-menu');\n setStyle(this.domNode, { display: 'none' });\n\n for (let name in this.menuItems) {\n const itemOption = (this.menuItems as any)[name];\n if (itemOption) {\n const itemNode = itemOption.render\n ? itemOption.render(this)\n : this.menuItemCreator(Object.assign({}, itemOption));\n this.domNode.appendChild(itemNode);\n\n if (name === 'splitCell') {\n this.splitCellNode = itemNode as HTMLElement;\n const splitDivider = dividingCreator();\n this.splitCellDivider = splitDivider;\n this.domNode.appendChild(splitDivider);\n }\n\n if (['insertRowDown', 'deleteRow', 'mergeCells'].indexOf(name) > -1) {\n this.domNode.appendChild(dividingCreator());\n }\n }\n }\n\n // create dividing line\n function dividingCreator() {\n const dividing = document.createElement('div');\n dividing.classList.add('easy-email-table-operation-menu-dividing');\n return dividing;\n }\n }\n menuItemCreator({ text, icon, handler }: any) {\n const node = document.createElement('div');\n node.classList.add('easy-email-table-operation-menu-item');\n\n const iconSpan = document.createElement('span');\n iconSpan.classList.add('easy-email-table-operation-menu-icon');\n iconSpan.innerHTML = icon;\n\n const textSpan = document.createElement('span');\n textSpan.classList.add('easy-email-table-operation-menu-text');\n textSpan.innerText = text;\n\n node.appendChild(iconSpan);\n node.appendChild(textSpan);\n node.addEventListener('click', handler.bind(this), false);\n return node;\n }\n}\n","import TableOperationMenu from './tableOperationMenu';\nimport {\n checkEventInBoundingRect,\n setStyle,\n getCurrentTable,\n getElementsBoundary,\n getTdBoundaryIndex,\n getBoundaryRectAndElement,\n} from './util';\nimport { AdvancedTableBlock } from '@thanhpv102/easy-email-core';\nimport { IOperationData } from './type';\n\nexport interface IBorderTool {\n top: HTMLElement;\n bottom: HTMLElement;\n left: HTMLElement;\n right: HTMLElement;\n}\n\nclass TableColumnTool {\n borderTool = {} as IBorderTool;\n dragging = false;\n showBorderTool = false;\n width = 0; // selected section width,will update by mouse move\n height = 0; // selected section height, will update by mouse move\n\n selectedLeftTopCell: Element | undefined = undefined;\n selectedBottomRightCell: Element | undefined = undefined;\n startDom: Element | undefined = undefined;\n endDom: Element | undefined = undefined;\n hoveringTable: ParentNode | null = null;\n root: Element | ShadowRoot | undefined = undefined;\n\n tableMenu?: TableOperationMenu;\n changeTableData?: (e: AdvancedTableBlock['data']['value']['tableSource']) => void;\n tableData: IOperationData[][] = [];\n\n constructor(borderTool: IBorderTool, root: Element | ShadowRoot) {\n if (!borderTool || !root) {\n return;\n }\n this.borderTool = borderTool;\n this.root = root;\n\n this.initTool();\n }\n\n initTool() {\n this.root?.addEventListener('contextmenu', this.handleContextmenu);\n this.root?.addEventListener('mousedown', this.handleMousedown.bind(this));\n document.body.addEventListener('click', this.handleBodyClick, false);\n document.addEventListener('contextmenu', this.handleDocumentContextmenu, false);\n document.addEventListener('keydown', this.hideBorderByKeyDown);\n }\n\n destroy() {\n this.root?.removeEventListener('mousedown', this.handleMousedown.bind(this));\n this.root?.removeEventListener('contextmenu', this.handleContextmenu);\n document.body.removeEventListener('click', this.handleBodyClick, false);\n document.removeEventListener('contextmenu', this.handleDocumentContextmenu, false);\n document.removeEventListener('keydown', this.hideBorderByKeyDown);\n\n this.tableMenu?.destroy();\n }\n\n hideBorder = (e: Event) => {\n if ((e.target as HTMLElement)?.id === 'VisualEditorEditMode') {\n return;\n }\n this.visibleBorder(false);\n };\n\n // Only hide the selection border on left-clicks; right-clicks should not\n // dismiss the selection (they open the context menu instead).\n handleBodyClick = (e: MouseEvent) => {\n if (e.button !== 0) return;\n this.hideBorder(e);\n };\n\n hideBorderByKeyDown = () => {\n this.visibleBorder(false);\n };\n\n hideTableMenu = (e?: Event) => {\n if ((e?.target as HTMLElement)?.id === 'VisualEditorEditMode') {\n return;\n }\n this.tableMenu?.hide();\n };\n\n handleDocumentContextmenu = (e: Event) => {\n // Hide the table menu only when right-clicking outside the editor shadow root.\n // Clicks inside the shadow root are handled by handleContextmenu on this.root,\n // which calls stopImmediatePropagation so this handler won't fire for those.\n const path = e.composedPath ? e.composedPath() : [];\n const insideRoot = path.some(el => el === this.root);\n if (!insideRoot) {\n this.tableMenu?.hide();\n }\n };\n\n visibleBorder = (show = true) => {\n if (this.showBorderTool === show) {\n return;\n }\n if (show) {\n setStyle(this.borderTool.top.parentElement, { display: 'block' });\n } else {\n setStyle(this.borderTool.top.parentElement, { display: 'none' });\n }\n this.showBorderTool = show;\n };\n\n renderBorder = () => {\n this.visibleBorder(true);\n const result = getBoundaryRectAndElement(\n this.startDom as Element,\n this.endDom as Element,\n );\n if (!result) {\n return;\n }\n const { left, top, width, height } = result.boundary;\n this.selectedLeftTopCell = result.leftTopCell;\n this.selectedBottomRightCell = result.bottomRightCell;\n\n setStyle(this.borderTool.top, {\n 'background-color': 'rgb(65, 68, 77)',\n left: `${left}px`,\n top: `${top}px`,\n width: `${Math.abs(width)}px`,\n height: '2px',\n position: 'fixed',\n 'z-index': 10,\n });\n setStyle(this.borderTool.bottom, {\n 'background-color': 'rgb(65, 68, 77)',\n left: `${left}px`,\n top: `${top + height}px`,\n width: `${Math.abs(width)}px`,\n height: '2px',\n position: 'fixed',\n 'z-index': 10,\n });\n setStyle(this.borderTool.left, {\n 'background-color': 'rgb(65, 68, 77)',\n left: `${left}px`,\n top: `${top}px`,\n width: '2px',\n height: `${Math.abs(height)}px`,\n position: 'fixed',\n 'z-index': 10,\n });\n setStyle(this.borderTool.right, {\n 'background-color': 'rgb(65, 68, 77)',\n left: `${left + width}px`,\n top: `${top}px`,\n width: '2px',\n height: `${Math.abs(height)}px`,\n position: 'fixed',\n 'z-index': 10,\n });\n };\n\n handleContextmenu = (event: Event) => {\n const mouseEvent = event as MouseEvent;\n if (this.showBorderTool) {\n const selectedBoundary = getElementsBoundary(\n this.selectedLeftTopCell as Element,\n this.selectedBottomRightCell as Element,\n );\n if (checkEventInBoundingRect(selectedBoundary, { x: mouseEvent.clientX, y: mouseEvent.clientY })) {\n event.preventDefault();\n event.stopImmediatePropagation();\n\n // Show the table operation menu here (contextmenu is the correct event).\n if (!this.tableMenu) {\n this.tableMenu = new TableOperationMenu();\n }\n this.tableMenu.setTableData(this.tableData);\n this.tableMenu.changeTableData = this.changeTableData;\n this.tableMenu.setTableIndexBoundary(\n getTdBoundaryIndex(\n this.selectedLeftTopCell as Element,\n this.selectedBottomRightCell as Element,\n ),\n );\n this.tableMenu.showMenu({ x: mouseEvent.clientX, y: mouseEvent.clientY });\n return;\n }\n }\n this.hideTableMenu();\n };\n\n handleMousedown(event: Event) {\n const mouseEvent = event as MouseEvent;\n let target: Element = event.target as Element;\n if (mouseEvent.button == 0) {\n // left button click\n while (target && target.parentNode) {\n if (\n (target.nodeName === 'TD' || target.nodeName === 'TH') &&\n target.getAttribute('data-content_editable-type') === 'rich_text'\n ) {\n this.root?.addEventListener('mousemove', this.handleDrag);\n this.root?.addEventListener('mouseup', this.handleMouseup);\n\n this.dragging = true;\n this.startDom = target;\n this.endDom = target;\n this.hoveringTable = getCurrentTable(target);\n\n this.renderBorder();\n return;\n }\n target = target.parentNode as Element;\n if (['TR', 'TABLE', 'BODY'].includes(target.nodeName)) {\n this.visibleBorder(false);\n return;\n }\n }\n } else if (mouseEvent.button == 2) {\n if (this.showBorderTool) {\n const selectedBoundary = getElementsBoundary(\n this.selectedLeftTopCell as Element,\n this.selectedBottomRightCell as Element,\n );\n // If right-clicking inside the selection, keep the border visible.\n // The context menu will be shown in handleContextmenu.\n if (checkEventInBoundingRect(selectedBoundary, { x: mouseEvent.clientX, y: mouseEvent.clientY })) {\n\n return;\n }\n }\n }\n this.visibleBorder(false);\n }\n\n handleDrag = (e: Event) => {\n e.preventDefault();\n\n if (this.dragging) {\n let target = e.target as Element;\n\n while (target && target.parentNode) {\n if (\n (target.nodeName === 'TD' || target.nodeName === 'TH') &&\n target.getAttribute('data-content_editable-type') === 'rich_text'\n ) {\n const hoveringTable = getCurrentTable(target);\n if (this.endDom === target || this.hoveringTable !== hoveringTable) {\n return;\n }\n this.endDom = target;\n this.renderBorder();\n return;\n }\n target = target.parentNode as Element;\n }\n }\n };\n\n handleMouseup = (e: Event) => {\n e.preventDefault();\n\n if (this.dragging) {\n this.dragging = false;\n this.root?.removeEventListener('mousemove', this.handleDrag);\n this.root?.removeEventListener('mouseup', this.handleMouseup);\n }\n };\n}\n\nexport default TableColumnTool;\n","import { cloneDeep } from 'lodash';\nimport React, { useEffect, useRef } from 'react';\nimport { createPortal } from 'react-dom';\nimport TableColumnTool, { IBorderTool } from './tableTool';\nimport { getShadowRoot, useBlock, useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { IAdvancedTableData, AdvancedType } from '@thanhpv102/easy-email-core';\n\nexport function TableOperation() {\n const shadowRoot = getShadowRoot();\n const { focusIdx } = useFocusIdx();\n const { focusBlock, change } = useBlock();\n const topRef = useRef<HTMLDivElement>(null);\n const bottomRef = useRef<HTMLDivElement>(null);\n const leftRef = useRef<HTMLDivElement>(null);\n const rightRef = useRef<HTMLDivElement>(null);\n const tool = useRef<TableColumnTool | null>(null);\n\n // Only show for AdvancedTable blocks\n const isAdvancedTable = focusBlock?.type === AdvancedType.TABLE;\n\n useEffect(() => {\n if (!isAdvancedTable) return;\n\n // Check if shadowRoot exists before proceeding\n if (!shadowRoot) return;\n // Use the shadow root itself as the container, not looking for a body element\n const targetContainer = shadowRoot;\n if (!targetContainer) {\n console.warn('Shadow DOM not found for TableOperation');\n return;\n }\n // Ensure all refs are available before creating the tool\n const top = topRef.current;\n const bottom = bottomRef.current;\n const left = leftRef.current;\n const right = rightRef.current;\n if (!top || !bottom || !left || !right) {\n return;\n }\n // TypeScript now knows these are non-null HTMLDivElements\n const borderTool: IBorderTool = {\n top: top as HTMLElement,\n bottom: bottom as HTMLElement,\n left: left as HTMLElement,\n right: right as HTMLElement,\n };\n tool.current = new TableColumnTool(borderTool, targetContainer);\n return () => {\n tool.current?.destroy();\n };\n }, [shadowRoot, isAdvancedTable]);\n\n useEffect(() => {\n if (!isAdvancedTable) return;\n\n if (tool.current) {\n tool.current.changeTableData = (data: IAdvancedTableData[][]) => {\n change(`${focusIdx}.data.value.tableSource`, cloneDeep(data));\n };\n tool.current.tableData = cloneDeep(focusBlock?.data?.value?.tableSource || []);\n }\n }, [focusIdx, focusBlock, change, isAdvancedTable]);\n\n // Don't render if shadowRoot is not available or not an AdvancedTable\n if (!shadowRoot || !isAdvancedTable) {\n return null;\n }\n\n return (\n <>\n {createPortal(\n <div>\n <div ref={topRef} />\n <div ref={bottomRef} />\n <div ref={leftRef} />\n <div ref={rightRef} />\n </div>,\n shadowRoot as DocumentFragment,\n )}\n </>\n );\n}\n",":global {\n .ant-select {\n font-size: 12px !important;\n }\n\n .ant-select-selector {\n height: 26px !important;\n padding: 2px 6px !important;\n font-size: 12px !important;\n }\n\n .ant-select-selection-item {\n font-size: 12px !important;\n line-height: 26px !important;\n }\n\n .ant-select-dropdown {\n font-size: 12px !important;\n }\n\n .ant-select-dropdown .ant-select-item {\n font-size: 12px !important;\n }\n\n .ant-select-dropdown .ant-select-item-option {\n font-size: 12px !important;\n padding: 6px 12px !important;\n }\n\n .ant-radio-group {\n font-size: 12px !important;\n }\n\n .ant-checkbox-group {\n font-size: 12px !important;\n }\n\n .easy-email-overlay {\n font-size: 12px !important;\n }\n\n .easy-email-overlay .ant-select-selector {\n height: 26px !important;\n padding: 2px 6px !important;\n }\n\n .easy-email-overlay .ant-select-item-option {\n font-size: 12px !important;\n padding: 6px 12px !important;\n }\n}\n\n.attributePanel {\n :global {\n .arco-form-item {\n margin-bottom: 8px !important;\n }\n\n .ant-form-item-label-content {\n font-size: 12px !important;\n }\n\n .ant-form-item-label > label {\n font-size: 12px !important;\n }\n\n .ant-form-item-label {\n padding: 0 !important;\n }\n\n .arco-form-item-label-content {\n font-size: 12px !important;\n height: 24px !important;\n line-height: 24px !important;\n }\n\n .ant-form-item-explain {\n font-size: 12px !important;\n }\n\n .arco-form-item-message {\n font-size: 12px !important;\n }\n\n .arco-input {\n font-size: 12px !important;\n height: 26px !important;\n padding: 4px 6px !important;\n line-height: 26px !important;\n }\n\n .ant-input {\n font-size: 12px !important;\n height: 26px !important;\n line-height: 26px !important;\n }\n\n input::placeholder {\n font-size: 12px !important;\n }\n\n .ant-input::placeholder {\n font-size: 12px !important;\n }\n\n textarea {\n font-size: 12px !important;\n padding: 6px 6px !important;\n line-height: 1.4 !important;\n }\n\n .arco-select {\n font-size: 12px !important;\n }\n\n .arco-select-view {\n height: 26px !important;\n padding: 4px 6px !important;\n font-size: 12px !important;\n }\n\n .arco-select-option {\n font-size: 12px !important;\n padding: 6px 12px !important;\n }\n\n .arco-select-option-content {\n font-size: 12px !important;\n }\n\n .arco-radio {\n font-size: 12px !important;\n }\n\n .arco-radio-label-text {\n font-size: 12px !important;\n }\n\n .arco-checkbox {\n font-size: 12px !important;\n }\n\n .arco-checkbox-label-text {\n font-size: 12px !important;\n }\n\n .ant-select-item {\n font-size: 12px !important;\n }\n\n .ant-select-item-option {\n font-size: 12px !important;\n padding: 6px 12px !important;\n }\n\n .ant-select-dropdown {\n font-size: 12px !important;\n }\n\n .ant-select-dropdown .ant-select-item-option {\n font-size: 12px !important;\n padding: 6px 12px !important;\n }\n\n .ant-radio {\n font-size: 12px !important;\n }\n\n .ant-radio-wrapper {\n font-size: 12px !important;\n }\n\n .ant-radio-inner {\n width: 16px !important;\n height: 16px !important;\n }\n\n .ant-checkbox {\n font-size: 12px !important;\n }\n\n .ant-checkbox-wrapper {\n font-size: 12px !important;\n }\n\n .ant-checkbox-inner {\n width: 16px !important;\n height: 16px !important;\n }\n\n .arco-btn {\n padding: 4px 8px !important;\n font-size: 12px !important;\n height: 28px !important;\n min-width: 50px !important;\n line-height: 28px !important;\n }\n\n .ant-btn {\n padding: 4px 8px !important;\n font-size: 12px !important;\n height: 28px !important;\n line-height: 28px !important;\n }\n\n .ant-btn-sm {\n padding: 4px 8px !important;\n height: 28px !important;\n font-size: 12px !important;\n line-height: 28px !important;\n }\n\n .arco-color-picker-trigger {\n height: 28px !important;\n width: 28px !important;\n }\n\n .ant-collapse-header {\n padding: 10px 16px !important;\n font-size: 13px !important;\n min-height: 32px !important;\n line-height: 32px !important;\n height: 32px !important;\n }\n\n .ant-collapse-header-text {\n font-size: 13px !important;\n line-height: 32px !important;\n }\n\n .ant-collapse-content-box {\n padding: 8px 12px !important;\n }\n\n .ant-collapse-item {\n margin-bottom: 4px !important;\n }\n\n .ant-collapse {\n border: none !important;\n }\n\n .ant-collapse-header > .ant-collapse-title {\n margin-top: -5px;\n }\n\n .ant-collapse-item > .ant-collapse-header {\n padding: 4px 8px !important;\n }\n\n .ant-collapse-item-active > .ant-collapse-header {\n }\n\n .ant-collapse-content {\n }\n\n .arco-checkbox {\n font-size: 11px !important;\n margin-right: 6px !important;\n }\n\n .arco-radio {\n font-size: 11px !important;\n margin-right: 6px !important;\n }\n\n .arco-grid-row {\n margin-bottom: 6px !important;\n }\n\n .arco-space {\n gap: 4px !important;\n }\n\n .ant-space {\n gap: 2px !important;\n }\n\n .ant-row {\n margin-bottom: 4px !important;\n }\n\n .ant-col {\n margin-bottom: 2px !important;\n }\n\n .arco-input-number {\n height: 26px !important;\n font-size: 11px !important;\n }\n\n .arco-input-number-input {\n font-size: 11px !important;\n height: 26px !important;\n padding: 4px 6px !important;\n }\n }\n}\n","import React from 'react';\nimport {\n getShadowRoot,\n TextStyle,\n useBlock,\n useEditorContext,\n useFocusIdx,\n} from '@thanhpv102/easy-email-editor';\nimport { RichTextField } from '../components/Form/RichTextField';\nimport { PresetColorsProvider } from './components/provider/PresetColorsProvider';\nimport ReactDOM from 'react-dom';\nimport { BlockAttributeConfigurationManager } from './utils/BlockAttributeConfigurationManager';\nimport { SelectionRangeProvider } from './components/provider/SelectionRangeProvider';\nimport { TableOperation } from './components/blocks/AdvancedTable/Operation';\nimport styles from './AttributePanel.module.scss';\n\nexport function AttributePanel() {\n const { focusBlock } = useBlock();\n const { initialized } = useEditorContext();\n\n const { focusIdx } = useFocusIdx();\n\n const Com = focusBlock && BlockAttributeConfigurationManager.get(focusBlock.type);\n\n const shadowRoot = getShadowRoot();\n\n if (!initialized) return null;\n\n return (\n <div className={styles.attributePanel}>\n <SelectionRangeProvider>\n <PresetColorsProvider>\n {Com ? (\n <Com />\n ) : (\n <div style={{ marginTop: 200, padding: '0 50px' }}>\n <TextStyle size='extraLarge'>No matching components</TextStyle>\n </div>\n )}\n\n <div style={{ position: 'absolute' }}>\n <RichTextField idx={focusIdx} />\n </div>\n <TableOperation />\n <>\n {shadowRoot &&\n ReactDOM.createPortal(\n <style>\n {`\n .email-block [contentEditable=\"true\"],\n .email-block [contentEditable=\"true\"] * {\n outline: none;\n cursor: text;\n }\n `}\n </style>,\n shadowRoot as DocumentFragment,\n )}\n </>\n </PresetColorsProvider>\n </SelectionRangeProvider>\n </div>\n );\n}\n","import React, { useCallback } from 'react';\r\nimport { MergeTags as MergeTagsOptions } from '@extensions/AttributePanel';\r\nimport { ToolItem } from '../ToolItem';\r\nimport { IconFont } from '@thanhpv102/easy-email-editor';\r\nimport { useRichTextPopupOpen } from '../../hooks/useRichTextPopupOpen';\r\nimport { RichTextPortalPopup } from '../RichTextPortalPopup';\r\n\r\nexport interface MergeTagsProps {\r\n execCommand: (cmd: string, value: string) => void;\r\n}\r\n\r\nexport function MergeTags(props: MergeTagsProps) {\r\n const { execCommand } = props;\r\n const { open, rect, close, handleTriggerClick, setTriggerRef, setPopupContainerRef } = useRichTextPopupOpen();\r\n\r\n const onChange = useCallback(\r\n (val: string) => {\r\n execCommand('insertHTML', val);\r\n close();\r\n },\r\n [execCommand, close],\r\n );\r\n\r\n return (\r\n <>\r\n <span ref={setTriggerRef}>\r\n <ToolItem\r\n title={t('Merge tag')}\r\n icon={<IconFont iconName=\"icon-merge-tags\" />}\r\n onClick={handleTriggerClick}\r\n />\r\n </span>\r\n <RichTextPortalPopup\r\n open={open}\r\n rect={rect}\r\n containerRef={setPopupContainerRef}\r\n placement=\"bottom\"\r\n >\r\n <MergeTagsOptions value=\"\" onChange={onChange} />\r\n </RichTextPortalPopup>\r\n </>\r\n );\r\n}\r\n","/* eslint-disable @typescript-eslint/no-unsafe-call */\nimport { useCallback, useContext } from 'react';\nimport { SelectionRangeContext } from '@extensions/AttributePanel/components/provider/SelectionRangeProvider';\nimport { getShadowRoot } from '@thanhpv102/easy-email-editor';\n\n/** Get the active Selection, preferring the ShadowRoot's own getSelection (Chrome)\n * and falling back to document.getSelection() (Firefox). */\nfunction getActiveSelection(shadowRoot: ShadowRoot): Selection | null {\n if ('getSelection' in shadowRoot) {\n return (shadowRoot as unknown as Document).getSelection();\n }\n return document.getSelection();\n}\n\nexport function useSelectionRange() {\n const { selectionRange, setSelectionRange } = useContext(\n SelectionRangeContext\n );\n\n const restoreRange = useCallback((range: Range) => {\n const shadowRoot = getShadowRoot();\n const selection = getActiveSelection(shadowRoot);\n if (!selection) return;\n // setBaseAndExtent is the most reliable way to set a selection that spans\n // nodes inside a Shadow DOM in Firefox.\n if (typeof selection.setBaseAndExtent === 'function') {\n selection.setBaseAndExtent(\n range.startContainer,\n range.startOffset,\n range.endContainer,\n range.endOffset,\n );\n } else {\n selection.removeAllRanges();\n const newRange = document.createRange();\n newRange.setStart(range.startContainer, range.startOffset);\n newRange.setEnd(range.endContainer, range.endOffset);\n selection.addRange(newRange);\n }\n }, []);\n\n const setRangeByElement = useCallback(\n (element: ChildNode) => {\n const shadowRoot = getShadowRoot();\n const selection = getActiveSelection(shadowRoot);\n if (!selection) return;\n\n const newRange = document.createRange();\n newRange.selectNode(element);\n setSelectionRange(newRange);\n\n if (typeof selection.setBaseAndExtent === 'function') {\n selection.setBaseAndExtent(\n newRange.startContainer,\n newRange.startOffset,\n newRange.endContainer,\n newRange.endOffset,\n );\n } else {\n selection.removeAllRanges();\n selection.addRange(newRange);\n }\n },\n [setSelectionRange]\n );\n\n return {\n selectionRange,\n setSelectionRange,\n restoreRange,\n setRangeByElement,\n };\n}\n","/**\n * Returns the Element at the given range position.\n * Works for both collapsed ranges (cursor) and non-collapsed (selection).\n * For a collapsed range the startContainer is used; for a non-collapsed range\n * the commonAncestorContainer is used (matching previous behaviour).\n */\nexport function getElementAtRange(range: Range): Element | null {\n const node = range.collapsed\n ? range.startContainer\n : range.commonAncestorContainer;\n\n if (node instanceof Element) return node;\n if (node.parentElement) return node.parentElement;\n return null;\n}\n\n","import { ColorPicker } from '@extensions/components/Form/ColorPicker';\nimport { IconFont } from '@thanhpv102/easy-email-editor';\nimport React, { useMemo } from 'react';\nimport { ToolItem } from '../../ToolItem';\nimport { getElementAtRange } from '../../../utils/getElementAtRange';\n\nexport function IconBgColor({ selectionRange, execCommand }: {\n selectionRange: Range | null;\n execCommand: (cmd: string, val?: string) => void;\n}) {\n\n const color = useMemo(() => {\n if (!selectionRange) return undefined;\n const el = getElementAtRange(selectionRange);\n if (!el) return undefined;\n return getComputedStyle(el).backgroundColor;\n }, [selectionRange]);\n\n return (\n <ColorPicker\n label=\"\"\n showInput={false}\n onChange={(color) => execCommand('hiliteColor', color)}\n inRichTextBar\n >\n <ToolItem\n icon={(\n <div style={{ position: 'relative' }}>\n <IconFont size={12} iconName=\"icon-bg-color\" style={{ position: 'relative', top: '-1px' }} />\n <div style={{\n borderBottom: `2px solid ${color}`,\n position: 'absolute',\n width: '130%',\n left: '-15%',\n top: 16,\n }}\n />\n </div>\n )}\n title={t('Background color')}\n />\n </ColorPicker>\n );\n}\n","import { ColorPicker } from '@extensions/components/Form/ColorPicker';\nimport { IconFont } from '@thanhpv102/easy-email-editor';\nimport React, { useMemo } from 'react';\nimport { ToolItem } from '../../ToolItem';\nimport { getElementAtRange } from '../../../utils/getElementAtRange';\n\nexport function IconFontColor({ selectionRange, execCommand }: {\n selectionRange: Range | null;\n execCommand: (cmd: string, val?: string) => void;\n}) {\n\n const color = useMemo(() => {\n if (!selectionRange) return undefined;\n const el = getElementAtRange(selectionRange);\n if (!el) return undefined;\n return getComputedStyle(el).color;\n }, [selectionRange]);\n\n return (\n <ColorPicker\n label=\"\"\n onChange={(color) => execCommand('foreColor', color)}\n showInput={false}\n inRichTextBar\n >\n <ToolItem\n icon={(\n <div style={{ position: 'relative' }}>\n <IconFont size={12} iconName=\"icon-font-color\" style={{ position: 'relative', top: '-1px' }} />\n <div style={{\n borderBottom: `2px solid ${color}`,\n position: 'absolute',\n width: '130%',\n left: '-15%',\n top: 16,\n }}\n />\n </div>\n )}\n title={t('Text color')}\n />\n </ColorPicker>\n );\n}\n","\r\nimport { IconFont, useBlock, useEditorProps, useFocusIdx } from '@thanhpv102/easy-email-editor';\r\nimport { useAddToCollection } from '@extensions/hooks/useAddToCollection';\r\nimport { getParentIdx } from '@thanhpv102/easy-email-core';\r\nimport React from 'react';\r\nimport { ToolItem } from './ToolItem';\r\n\r\nexport function BasicTools(props: { getPopupContainer?: () => HTMLElement }) {\r\n const { copyBlock, removeBlock } = useBlock();\r\n const { focusIdx, setFocusIdx } = useFocusIdx();\r\n const { modal, setModalVisible } = useAddToCollection();\r\n const { onAddCollection } = useEditorProps();\r\n\r\n const handleAddToCollection = () => {\r\n if (document.activeElement instanceof HTMLElement) {\r\n document.activeElement.blur();\r\n }\r\n setModalVisible(true);\r\n };\r\n\r\n const handleCopy = () => {\r\n if (document.activeElement instanceof HTMLElement) {\r\n document.activeElement.blur();\r\n }\r\n copyBlock(focusIdx);\r\n };\r\n\r\n const handleDelete = () => {\r\n if (document.activeElement instanceof HTMLElement) {\r\n document.activeElement.blur();\r\n }\r\n removeBlock(focusIdx);\r\n };\r\n\r\n const handleSelectParent = () => {\r\n if (document.activeElement instanceof HTMLElement) {\r\n document.activeElement.blur();\r\n }\r\n setFocusIdx(getParentIdx(focusIdx)!);\r\n };\r\n\r\n return (\r\n <div style={{ marginRight: 40 }}>\r\n <span style={{ position: 'relative', marginRight: 10, color: '#fff', fontFamily: '-apple-system, BlinkMacSystemFont, San Francisco, Segoe UI' }}>Text</span>\r\n <ToolItem\r\n onClick={handleSelectParent}\r\n title={'Select parent block'}\r\n icon={<IconFont iconName='icon-back-parent' />}\r\n getPopupContainer={props.getPopupContainer}\r\n />\r\n <ToolItem\r\n onClick={handleCopy}\r\n title={'Copy'}\r\n icon={<IconFont iconName='icon-copy' />}\r\n getPopupContainer={props.getPopupContainer}\r\n />\r\n {\r\n onAddCollection && (\r\n <ToolItem\r\n onClick={handleAddToCollection}\r\n title={'Add to collection'}\r\n icon={<IconFont iconName='icon-collection' />}\r\n getPopupContainer={props.getPopupContainer}\r\n />\r\n )\r\n }\r\n <ToolItem\r\n onClick={handleDelete}\r\n title={'Delete'}\r\n icon={<IconFont iconName='icon-delete' />}\r\n getPopupContainer={props.getPopupContainer}\r\n />\r\n {modal}\r\n </div>\r\n );\r\n}\r\n","import type { TooltipProps } from 'antd';\nimport React, { useCallback, useMemo } from 'react';\nimport { IconFont } from '@thanhpv102/easy-email-editor';\nimport { ToolItem } from '../ToolItem';\nimport { EMAIL_BLOCK_CLASS_NAME } from '@thanhpv102/easy-email-core';\n\nexport interface LinkProps extends Omit<TooltipProps, 'title'> {\n currentRange: Range | null | undefined;\n onChange: () => void;\n getPopupContainer?: () => HTMLElement;\n}\n\nfunction getAnchorElement(\n node: Node | null,\n): HTMLAnchorElement | null {\n if (!node) return null;\n if (node instanceof HTMLAnchorElement) {\n return node;\n }\n if (node instanceof Element && node.classList.contains(EMAIL_BLOCK_CLASS_NAME)) return null;\n\n return getAnchorElement(node.parentNode);\n}\n\nfunction getLinkNode(\n currentRange: Range | null | undefined,\n): HTMLAnchorElement | null {\n let linkNode: HTMLAnchorElement | null = null;\n if (!currentRange) return null;\n linkNode = getAnchorElement(currentRange.commonAncestorContainer);\n return linkNode;\n}\n\nexport function Unlink(props: LinkProps) {\n const { onChange } = props;\n const linkNode = useMemo(() => {\n return getLinkNode(props.currentRange);\n\n }, [props.currentRange]);\n\n const onUnlink = useCallback(() => {\n if (linkNode?.parentNode) {\n linkNode?.replaceWith(...linkNode.childNodes);\n onChange();\n }\n }, [linkNode, onChange]);\n\n return (\n <ToolItem title={t('Unlink')} icon={<IconFont iconName=\"icon-unlink\" />} onClick={onUnlink} getPopupContainer={props.getPopupContainer} />\n );\n}\n","import type { TooltipProps } from 'antd';\nimport React, { useCallback, useMemo } from 'react';\nimport { IconFont } from '@thanhpv102/easy-email-editor';\nimport { ToolItem } from '../ToolItem';\nimport { EMAIL_BLOCK_CLASS_NAME } from '@thanhpv102/easy-email-core';\nimport { useSelectionRange } from '@extensions/AttributePanel/hooks/useSelectionRange';\n\nexport interface LinkProps extends Omit<TooltipProps, 'title'> {\n currentRange: Range | null | undefined;\n onChange: () => void;\n getPopupContainer?: () => HTMLElement;\n}\n\nfunction getStrikeThroughNode(\n node: Node | null | undefined,\n): Element | null {\n if (!node) return null;\n if (node instanceof Element && node.classList.contains(EMAIL_BLOCK_CLASS_NAME)) return null;\n if (node instanceof Element && node.tagName.toLocaleLowerCase() === 'strike') return node;\n return getStrikeThroughNode(node.parentNode);\n}\n\nexport function StrikeThrough(props: LinkProps) {\n const { onChange } = props;\n const { setRangeByElement } = useSelectionRange();\n const node = useMemo(() => {\n return getStrikeThroughNode(props.currentRange?.commonAncestorContainer);\n\n }, [props.currentRange]);\n\n const onClick = useCallback(() => {\n if (node) {\n setRangeByElement(node);\n }\n onChange();\n }, [node, onChange, setRangeByElement]);\n\n return (\n <ToolItem\n title={t('Strikethrough')}\n isActive={Boolean(node)}\n icon={<IconFont iconName=\"icon-strikethrough\" />}\n onClick={onClick}\n getPopupContainer={props.getPopupContainer}\n />\n );\n}\n","import type { TooltipProps } from 'antd';\nimport React, { useCallback, useMemo } from 'react';\nimport { IconFont } from '@thanhpv102/easy-email-editor';\nimport { ToolItem } from '../ToolItem';\nimport { EMAIL_BLOCK_CLASS_NAME } from '@thanhpv102/easy-email-core';\nimport { useSelectionRange } from '@extensions/AttributePanel/hooks/useSelectionRange';\n\nexport interface LinkProps extends Omit<TooltipProps, 'title'> {\n currentRange: Range | null | undefined;\n onChange: () => void;\n getPopupContainer?: () => HTMLElement;\n}\n\nfunction getUnderlineNode(\n node: Node | null | undefined,\n): Element | null {\n if (!node) return null;\n if (node instanceof Element && node.classList.contains(EMAIL_BLOCK_CLASS_NAME)) return null;\n if (node instanceof Element && node.tagName.toLocaleLowerCase() === 'u') return node;\n return getUnderlineNode(node.parentNode);\n}\n\nexport function Underline(props: LinkProps) {\n const { onChange } = props;\n const { setRangeByElement } = useSelectionRange();\n const node = useMemo(() => {\n return getUnderlineNode(props.currentRange?.commonAncestorContainer);\n }, [props.currentRange]);\n\n const onClick = useCallback(() => {\n if (node) {\n setRangeByElement(node);\n }\n onChange();\n }, [node, onChange, setRangeByElement]);\n\n return (\n <ToolItem\n title={t('Underline')}\n isActive={Boolean(node)}\n icon={<IconFont iconName=\"icon-underline\" />}\n onClick={onClick}\n getPopupContainer={props.getPopupContainer}\n />\n );\n}\n","import type { TooltipProps } from 'antd';\nimport React, { useCallback, useMemo } from 'react';\nimport { IconFont } from '@thanhpv102/easy-email-editor';\nimport { ToolItem } from '../ToolItem';\nimport { EMAIL_BLOCK_CLASS_NAME } from '@thanhpv102/easy-email-core';\nimport { useSelectionRange } from '@extensions/AttributePanel/hooks/useSelectionRange';\n\nexport interface LinkProps extends Omit<TooltipProps, 'title'> {\n currentRange: Range | null | undefined;\n onChange: () => void;\n getPopupContainer?: () => HTMLElement;\n}\n\nfunction getItalicNode(\n node: Node | null | undefined,\n): Element | null {\n if (!node) return null;\n if (node instanceof Element && node.classList.contains(EMAIL_BLOCK_CLASS_NAME)) return null;\n if (node instanceof Element && node.tagName.toLocaleLowerCase() === 'i') return node;\n return getItalicNode(node.parentNode);\n}\n\nexport function Italic(props: LinkProps) {\n const { onChange } = props;\n const { setRangeByElement } = useSelectionRange();\n const node = useMemo(() => {\n return getItalicNode(props.currentRange?.commonAncestorContainer);\n\n }, [props.currentRange]);\n\n const onClick = useCallback(() => {\n if (node) {\n setRangeByElement(node);\n }\n onChange();\n }, [node, onChange, setRangeByElement]);\n\n return (\n <ToolItem\n title={t('Italic')}\n isActive={Boolean(node)}\n icon={<IconFont iconName=\"icon-italic\" />}\n onClick={onClick}\n getPopupContainer={props.getPopupContainer}\n />\n );\n}\n","import type { TooltipProps } from 'antd';\nimport React, { useCallback, useMemo } from 'react';\nimport { IconFont } from '@thanhpv102/easy-email-editor';\nimport { ToolItem } from '../ToolItem';\nimport { EMAIL_BLOCK_CLASS_NAME } from '@thanhpv102/easy-email-core';\nimport { useSelectionRange } from '@extensions/AttributePanel/hooks/useSelectionRange';\n\nexport interface LinkProps extends Omit<TooltipProps, 'title'> {\n currentRange: Range | null | undefined;\n onChange: () => void;\n getPopupContainer?: () => HTMLElement;\n}\n\nfunction getBoldNode(\n node: Node | null | undefined,\n): Element | null {\n if (!node) return null;\n if (node instanceof Element && node.classList.contains(EMAIL_BLOCK_CLASS_NAME)) return null;\n if (node instanceof Element && node.tagName.toLocaleLowerCase() === 'b') return node;\n return getBoldNode(node.parentNode);\n}\n\nexport function Bold(props: LinkProps) {\n const { onChange } = props;\n const { setRangeByElement } = useSelectionRange();\n const node = useMemo(() => {\n return getBoldNode(props.currentRange?.commonAncestorContainer);\n\n }, [props.currentRange]);\n\n const onClick = useCallback(() => {\n if (node) {\n setRangeByElement(node);\n }\n onChange();\n }, [node, onChange, setRangeByElement]);\n\n return (\n <ToolItem\n title={t('Bold')}\n isActive={Boolean(node)}\n icon={<IconFont iconName=\"icon-bold\" />}\n onClick={onClick}\n getPopupContainer={props.getPopupContainer}\n />\n );\n}\n","import React, { useCallback } from 'react';\n\nimport { ToolItem } from '../ToolItem';\nimport { IconFont } from '@thanhpv102/easy-email-editor';\nimport { useRichTextPopupOpen } from '../../hooks/useRichTextPopupOpen';\nimport { RichTextPortalPopup } from '../RichTextPortalPopup';\n\nconst list = [\n { value: '1', label: '12px' },\n { value: '2', label: '13px' },\n { value: '3', label: '16px' },\n { value: '4', label: '18px' },\n { value: '5', label: '24px' },\n { value: '6', label: '32px' },\n { value: '7', label: '48px' },\n];\n\nexport interface FontSizeProps {\n execCommand: (cmd: string, value: string) => void;\n}\n\nexport function FontSize(props: FontSizeProps) {\n const { execCommand } = props;\n const { open, rect, close, handleTriggerClick, setTriggerRef, setPopupContainerRef } = useRichTextPopupOpen();\n\n const onChange = useCallback(\n (val: string) => {\n execCommand('fontSize', val);\n close();\n },\n [execCommand, close],\n );\n\n return (\n <>\n <span ref={setTriggerRef}>\n <ToolItem\n title={t('Font size')}\n icon={<IconFont iconName=\"icon-font-color\" />}\n onClick={handleTriggerClick}\n />\n </span>\n <RichTextPortalPopup\n open={open}\n rect={rect}\n containerRef={setPopupContainerRef}\n placement=\"bottom\"\n >\n <ul\n style={{\n listStyle: 'none',\n margin: 0,\n padding: '4px 0',\n minWidth: 80,\n maxHeight: 350,\n overflowY: 'auto',\n }}\n >\n {list.map(item => (\n <li\n key={item.value}\n onClick={() => onChange(item.value)}\n style={{\n padding: '5px 12px',\n cursor: 'pointer',\n lineHeight: '22px',\n }}\n onMouseEnter={e => {\n (e.currentTarget as HTMLElement).style.backgroundColor = 'var(--color-font-item-background, #f5f5f5)';\n }}\n onMouseLeave={e => {\n (e.currentTarget as HTMLElement).style.backgroundColor = 'transparent';\n }}\n >\n {item.label}\n </li>\n ))}\n </ul>\n </RichTextPortalPopup>\n </>\n );\n}\n","import React, { useCallback, useRef } from 'react';\nimport { ToolItem } from '../ToolItem';\nimport { getLinkNode, Link, LinkParams } from '../Link';\nimport {\n AvailableTools,\n getShadowRoot,\n IconFont,\n MergeTagBadge,\n useEditorProps,\n useFocusBlockLayout,\n} from '@thanhpv102/easy-email-editor';\nimport { FontFamily } from '../FontFamily';\nimport { MergeTags } from '../MergeTags';\nimport { useSelectionRange } from '@extensions/AttributePanel/hooks/useSelectionRange';\nimport { IconBgColor } from './IconBgColor';\nimport { IconFontColor } from './IconFontColor';\nimport { BasicTools } from '../BasicTools';\nimport { Unlink } from '../Unlink';\nimport { StrikeThrough } from '../StrikeThrough';\nimport { Underline } from '../Underline';\nimport { Italic } from '../Italic';\nimport { Bold } from '../Bold';\nimport { FontSize } from '../FontSize';\nimport { RICH_TEXT_TOOL_BAR } from '@extensions/constants';\n\nexport interface ToolsProps {\n onChange: (content: string) => void;\n}\n\nexport function Tools(props: ToolsProps) {\n const { mergeTags, enabledMergeTagsBadge, toolbar } = useEditorProps();\n const { focusBlockNode } = useFocusBlockLayout();\n const { selectionRange, restoreRange, setRangeByElement } = useSelectionRange();\n const { onChange } = props;\n\n // Keep a ref so execCommand always uses the latest range, even from inside popups\n const selectionRangeRef = useRef<Range | null>(selectionRange);\n selectionRangeRef.current = selectionRange;\n\n // Keep a ref to focusBlockNode so execCommand always uses the latest value\n const focusBlockNodeRef = useRef<Element | null | undefined>(focusBlockNode);\n focusBlockNodeRef.current = focusBlockNode;\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const execCommand = useCallback(\n (cmd: string, val?: string | LinkParams) => {\n const range = selectionRangeRef.current;\n if (!range && cmd in needCheckRangeCommand) {\n console.error(t('No selectionRange'));\n return;\n }\n if (range?.commonAncestorContainer && !focusBlockNodeRef.current?.contains(range?.commonAncestorContainer) && cmd in needCheckRangeCommand) {\n console.error(t('Not commonAncestorContainer'));\n return;\n }\n\n if (range) {\n restoreRange(range);\n }\n const uuid = (+new Date()).toString();\n if (cmd === 'createLink') {\n const linkData = val as LinkParams;\n const target = linkData.blank ? '_blank' : '';\n let link: HTMLAnchorElement | null;\n if (linkData.linkNode) {\n link = linkData.linkNode;\n } else {\n document.execCommand(cmd, false, uuid);\n link = getShadowRoot().querySelector(`a[href=\"${uuid}\"`);\n }\n\n if (link) {\n if (target) {\n link.setAttribute('target', target);\n }\n link.style.color = 'inherit';\n link.style.textDecoration = linkData.underline ? 'underline' : 'none';\n link.setAttribute('href', linkData.link.trim());\n }\n } else if (cmd === 'insertHTML') {\n let newContent = val as string;\n if (enabledMergeTagsBadge) {\n newContent = MergeTagBadge.transform(newContent, uuid);\n }\n\n document.execCommand(cmd, false, newContent);\n const insertMergeTagEle = getShadowRoot().getElementById(uuid);\n if (insertMergeTagEle) {\n insertMergeTagEle.focus();\n setRangeByElement(insertMergeTagEle);\n }\n } else if (cmd === 'foreColor') {\n document.execCommand(cmd, false, val as string);\n let linkNode: HTMLAnchorElement | null = getLinkNode(range);\n if (linkNode) {\n linkNode.style.color = 'inherit';\n }\n } else {\n document.execCommand(cmd, false, val as string);\n }\n\n const contenteditableElement = getShadowRoot().activeElement;\n if (contenteditableElement?.getAttribute('contenteditable') === 'true') {\n const html = getShadowRoot().activeElement?.innerHTML || '';\n onChange(html);\n }\n },\n [\n enabledMergeTagsBadge,\n onChange,\n restoreRange,\n setRangeByElement,\n ],\n );\n\n const execCommandWithRange = useCallback(\n (cmd: string, val?: string) => {\n document.execCommand(cmd, false, val);\n const contenteditableElement = getShadowRoot().activeElement;\n if (contenteditableElement?.getAttribute('contenteditable') === 'true') {\n const html = getShadowRoot().activeElement?.innerHTML || '';\n onChange(html);\n }\n },\n [onChange],\n );\n\n const needCheckRangeCommand = [\n AvailableTools.MergeTags,\n AvailableTools.FontFamily,\n AvailableTools.FontSize,\n AvailableTools.IconFontColor,\n AvailableTools.IconBgColor,\n 'createLink',\n 'justifyLeft',\n 'justifyCenter',\n 'justifyRight',\n 'insertOrderedList',\n 'insertUnorderedList',\n 'insertHorizontalRule',\n ]\n\n const enabledTools = toolbar?.tools ?? [\n AvailableTools.MergeTags,\n AvailableTools.FontFamily,\n AvailableTools.FontSize,\n AvailableTools.Bold,\n AvailableTools.Italic,\n AvailableTools.StrikeThrough,\n AvailableTools.Underline,\n AvailableTools.IconFontColor,\n AvailableTools.IconBgColor,\n AvailableTools.Link,\n AvailableTools.Justify,\n AvailableTools.Lists,\n AvailableTools.HorizontalRule,\n AvailableTools.RemoveFormat,\n ];\n\n const tools = enabledTools.flatMap(tool => {\n switch (tool) {\n case AvailableTools.MergeTags:\n if (!mergeTags) return [];\n return [\n <MergeTags\n key={tool}\n execCommand={execCommand}\n />,\n ];\n case AvailableTools.FontFamily:\n return [\n <FontFamily\n key={tool}\n execCommand={execCommand}\n />,\n ];\n case AvailableTools.FontSize:\n return [\n <FontSize\n key={tool}\n execCommand={execCommand}\n />,\n ];\n case AvailableTools.Bold:\n return [\n <Bold\n key={tool}\n currentRange={selectionRange}\n onChange={() => execCommandWithRange('bold')}\n />,\n ];\n case AvailableTools.Italic:\n return [\n <Italic\n key={tool}\n currentRange={selectionRange}\n onChange={() => execCommandWithRange('italic')}\n />,\n ];\n case AvailableTools.StrikeThrough:\n return [\n <StrikeThrough\n key={tool}\n currentRange={selectionRange}\n onChange={() => execCommandWithRange('strikeThrough')}\n />,\n ];\n case AvailableTools.Underline:\n return [\n <Underline\n key={tool}\n currentRange={selectionRange}\n onChange={() => execCommandWithRange('underline')}\n />,\n ];\n case AvailableTools.IconFontColor:\n return [\n <IconFontColor\n key={tool}\n selectionRange={selectionRange}\n execCommand={execCommand}\n />,\n ];\n case AvailableTools.IconBgColor:\n return [\n <IconBgColor\n key={tool}\n selectionRange={selectionRange}\n execCommand={execCommand}\n />,\n ];\n case AvailableTools.Link:\n return [\n <Link\n key={`${tool}-link`}\n currentRange={selectionRange}\n onChange={values => execCommand('createLink', values)}\n />,\n <Unlink\n key={`${tool}-unlink`}\n currentRange={selectionRange}\n onChange={() => execCommand('')}\n />,\n ];\n case AvailableTools.Justify:\n return [\n <ToolItem\n key={`${tool}-justify-left`}\n onClick={() => execCommand('justifyLeft')}\n icon={<IconFont iconName=\"icon-align-left\" />}\n title={'Align left'}\n />,\n <ToolItem\n key={`${tool}-justify-center`}\n onClick={() => execCommand('justifyCenter')}\n icon={<IconFont iconName=\"icon-align-center\" />}\n title={'Align center'}\n />,\n <ToolItem\n key={`${tool}-justify-right`}\n onClick={() => execCommand('justifyRight')}\n icon={<IconFont iconName=\"icon-align-right\" />}\n title={'Align right'}\n />,\n ];\n case AvailableTools.Lists:\n return [\n <ToolItem\n key={`${tool}-ordered-list`}\n onClick={() => execCommand('insertOrderedList')}\n icon={<IconFont iconName=\"icon-list-ol\" />}\n title={'Orderlist'}\n />,\n <ToolItem\n key={`${tool}-unordered-list`}\n onClick={() => execCommand('insertUnorderedList')}\n icon={<IconFont iconName=\"icon-list-ul\" />}\n title={'Unorderlist'}\n />,\n ];\n case AvailableTools.HorizontalRule:\n return [\n <ToolItem\n key={tool}\n onClick={() => execCommand('insertHorizontalRule')}\n icon={<IconFont iconName=\"icon-line\" />}\n title={'Line'}\n />,\n ];\n case AvailableTools.RemoveFormat:\n return [\n <ToolItem\n key={tool}\n onClick={() => execCommand('removeFormat')}\n icon={<IconFont iconName=\"icon-close\" />}\n title={'Remove format'}\n />,\n ];\n default:\n console.error('Not existing tool', tool);\n throw new Error(`Not existing tool ${tool}`);\n }\n });\n\n return (\n <div\n id={RICH_TEXT_TOOL_BAR}\n style={{ display: 'flex', flexWrap: 'nowrap' }}\n >\n <>\n <div\n style={{\n display: 'flex',\n alignItems: 'center',\n }}\n >\n <BasicTools />\n {tools.map((tool, index) => {\n return (\n <React.Fragment key={index}>\n {tool}\n <div\n className=\"easy-email-extensions-divider\"\n />\n </React.Fragment>\n );\n })}\n </div>\n {toolbar?.suffix?.(execCommand)}\n </>\n </div>\n );\n}\n",".easy-email-extensions-emailToolItem {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n position: relative;\n outline: none;\n font-weight: 400;\n appearance: none;\n cursor: pointer !important;\n white-space: nowrap;\n transition: all 0.1s linear;\n box-sizing: border-box;\n border-radius: 2px;\n border: none;\n background-color: transparent;\n color: #fff;\n width: 28px;\n height: 27px;\n &:hover {\n background-color: rgba(242, 243, 245, 1);\n color: rgb(78, 89, 105);\n }\n}\n.easy-email-extensions-emailToolItem-active {\n background-color: rgba(242, 243, 245, 1);\n color: rgb(78, 89, 105);\n}\n\n.easy-email-extensions-divider {\n position: relative;\n display: inline-flex;\n width: 1px;\n height: 16px;\n background-color: rgba(128, 128, 128, 0.9);\n}\n","import React from 'react';\r\nimport { createPortal } from 'react-dom';\r\nimport { getPluginElement, RICH_TEXT_BAR_ID, useEditorContext } from '@thanhpv102/easy-email-editor';\r\nimport { Tools } from './components/Tools';\r\nimport styleText from './shadow-dom.scss?inline';\r\nimport { RICH_TEXT_POPUP_CONTAINER_ID } from '@extensions/constants';\r\n\r\nexport { RICH_TEXT_POPUP_CONTAINER_ID };\r\n\r\nexport function RichTextToolBar(props: { onChange: (s: string) => void; }) {\r\n const { initialized } = useEditorContext();\r\n const root = initialized && getPluginElement();\r\n\r\n if (!root) return null;\r\n\r\n return (\r\n <>\r\n {createPortal(\r\n <>\r\n <style dangerouslySetInnerHTML={{ __html: styleText }} />\r\n <div\r\n id={RICH_TEXT_BAR_ID}\r\n style={{\r\n transform: 'translate(0,0)',\r\n padding: '4px 8px',\r\n boxSizing: 'border-box',\r\n position: 'absolute',\r\n left: 8,\r\n top: 0,\r\n zIndex: 100,\r\n width: 'calc(100% - 16px)',\r\n }}\r\n >\r\n <div\r\n style={{\r\n position: 'absolute',\r\n backgroundColor: '#41444d',\r\n height: '100%',\r\n width: '100%',\r\n left: 0,\r\n top: 0,\r\n }}\r\n />\r\n\r\n <Tools onChange={props.onChange} />\r\n </div>\r\n <div\r\n id={RICH_TEXT_POPUP_CONTAINER_ID}\r\n style={{\r\n position: 'fixed',\r\n top: 0,\r\n left: 0,\r\n width: 0,\r\n height: 0,\r\n zIndex: 10000,\r\n overflow: 'visible',\r\n }}\r\n />\r\n </>,\r\n root\r\n )}\r\n </>\r\n );\r\n}\r\n","import {\n useEditorProps,\n MergeTagBadge,\n getEditorRoot,\n getShadowRoot,\n FIXED_CONTAINER_ID,\n RICH_TEXT_BAR_ID,\n DATA_CONTENT_EDITABLE_IDX,\n CONTENT_EDITABLE_CLASS_NAME,\n DATA_CONTENT_EDITABLE_TYPE,\n ContentEditableType,\n} from '@thanhpv102/easy-email-editor';\nimport React, { useCallback, useEffect, useState } from 'react';\nimport { InlineText, InlineTextProps } from '../InlineTextField';\nimport { RichTextToolBar } from '../RichTextToolBar';\nimport { Field, FieldRenderProps } from '@thanhpv102/easy-email-editor';\nimport { debounce } from 'lodash';\n\nexport type FieldInputProps = FieldRenderProps['input'];\n\nexport const RichTextField = (\n props: Omit<InlineTextProps, 'onChange' | 'mutators'>\n) => {\n const [contentEditableName, setContentEditableName] = useState('');\n const [contentEditableType, setContentEditableType] = useState<string | null>(\n CONTENT_EDITABLE_CLASS_NAME\n );\n\n useEffect(() => {\n const onClick = (e: MouseEvent) => {\n if (getEditorRoot()?.contains(e.target as Node)) {\n return;\n }\n const fixedContainer = document.getElementById(FIXED_CONTAINER_ID);\n if (fixedContainer?.contains(e.target as Node)) {\n return;\n }\n setContentEditableName('');\n };\n\n window.addEventListener('click', onClick);\n return () => {\n window.removeEventListener('click', onClick);\n };\n }, []);\n\n useEffect(() => {\n const root = getShadowRoot();\n if (!root) return;\n const onClick = (e: Event) => {\n const target = e.target as HTMLElement;\n\n const fixedContainer = document.getElementById(FIXED_CONTAINER_ID);\n const richTextBar = root.getElementById(RICH_TEXT_BAR_ID);\n if (fixedContainer?.contains(target) || richTextBar?.contains(target)) {\n return;\n }\n const activeElement = getShadowRoot().activeElement;\n if (!activeElement) {\n setContentEditableName('');\n } else {\n const idxName = activeElement.getAttribute(DATA_CONTENT_EDITABLE_IDX);\n const type = activeElement.getAttribute(DATA_CONTENT_EDITABLE_TYPE);\n setContentEditableType(type);\n if (idxName) {\n setContentEditableName(idxName);\n } else {\n setContentEditableName('');\n }\n }\n };\n\n root.addEventListener('click', onClick);\n return () => {\n root.removeEventListener('click', onClick);\n };\n }, []);\n\n if (!contentEditableName) return null;\n\n return (\n <>\n <Field name={contentEditableName} parse={(v) => v}>\n {({ input }) => (\n <FieldWrapper\n {...props}\n contentEditableType={contentEditableType}\n input={input}\n />\n )}\n </Field>\n </>\n );\n};\n\nfunction FieldWrapper(\n props: Omit<InlineTextProps, 'onChange'> & {\n input: FieldInputProps;\n contentEditableType: string | null;\n }\n) {\n const { input, contentEditableType, ...rest } = props;\n const { mergeTagGenerate, enabledMergeTagsBadge } = useEditorProps();\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const debounceCallbackChange = useCallback(\n debounce((val: string) => {\n if (enabledMergeTagsBadge) {\n input.onChange(MergeTagBadge.revert(val, mergeTagGenerate));\n } else {\n input.onChange(val);\n }\n\n input.onBlur();\n }, 200),\n [input]\n );\n\n return (\n <>\n {contentEditableType === ContentEditableType.RichText && (\n <RichTextToolBar onChange={debounceCallbackChange} />\n )}\n <InlineText {...rest} onChange={debounceCallbackChange} />\n </>\n );\n}\n","import {\n Input as AntdInput,\n InputNumber,\n InputNumberProps,\n Slider,\n Switch,\n SwitchProps,\n TreeSelect,\n TreeSelectProps,\n} from 'antd';\nimport type { SliderSingleProps } from 'antd/es/slider';\nimport type { TextAreaProps } from 'antd/es/input';\nimport type { SearchProps as InputSearchProps } from 'antd/es/input/Search';\nimport { ImageUploader, ImageUploaderProps } from './ImageUploader';\nimport { Select, SelectProps } from './Select';\nimport { RadioGroup, RadioGroupProps } from './RadioGroup';\nimport enhancer, { EnhancerProps } from './enhancer';\nimport { Input, InputProps } from './Input';\nimport { InputWithUnit, InputWithUnitProps } from './InputWithUnit';\nimport { CheckBoxGroup, CheckboxGroupProps } from './CheckBoxGroup';\nimport { EditTab, EditTabProps } from './EditTab';\nimport { EditGridTab, EditGridTabProps } from './EditGridTab';\nimport { AutoComplete, AutoCompleteProps } from './AutoComplete';\nimport { ColorPickerField } from './ColorPickerField';\n\nexport { RichTextField } from './RichTextField';\n\nexport const TextField = enhancer<InputProps>(Input, value => value);\n\nexport const InputWithUnitField = enhancer<InputWithUnitProps>(\n InputWithUnit,\n value => value,\n);\n\nexport const SearchField = enhancer<InputSearchProps>(AntdInput.Search, val => val);\n\nexport const TextAreaField = enhancer<TextAreaProps>(AntdInput.TextArea, val => val);\n\nexport const NumberField: React.FC<EnhancerProps & Omit<InputNumberProps, 'value' | 'onChange' | 'mutators'>> = enhancer<InputNumberProps>(InputNumber, e => e);\n\nexport const SliderField = enhancer<SliderSingleProps>(Slider, e => e);\n\nexport const ImageUploaderField = enhancer<ImageUploaderProps>(ImageUploader, url => url);\n\nexport const SelectField = enhancer<SelectProps>(Select, e => e);\n\nexport const TreeSelectField: React.FC<EnhancerProps & Omit<TreeSelectProps, 'value' | 'onChange' | 'mutators'>> = enhancer<TreeSelectProps>(TreeSelect, e => e);\n\nexport const AutoCompleteField = enhancer<AutoCompleteProps>(AutoComplete, e => e);\n\nexport const RadioGroupField = enhancer<RadioGroupProps>(RadioGroup, value => value);\n\nexport const SwitchField = enhancer<SwitchProps>(Switch, e => e);\n\nexport const CheckboxField = enhancer<CheckboxGroupProps>(CheckBoxGroup, e => e);\n\nexport const EditTabField = enhancer<EditTabProps>(EditTab, (e: unknown[]) => e);\nexport const EditGridTabField = enhancer<EditGridTabProps>(EditGridTab, (e: unknown[]) => e);\n\nexport { ColorPickerField };\n\nexport { enhancer };\n","import { Modal } from 'antd';\nimport { Form, Stack, useBlock, useEditorProps } from '@thanhpv102/easy-email-editor';\nimport React from 'react';\nimport { v4 as uuidv4 } from 'uuid';\nimport { ImageUploaderField, TextAreaField, TextField } from '../Form';\n\nexport const AddToCollection: React.FC<{\n visible: boolean;\n setVisible: (v: boolean) => void;\n}> = ({ visible, setVisible }) => {\n const { focusBlock: focusBlockData } = useBlock();\n const { onAddCollection, onUploadImage, enableAssetManager } = useEditorProps();\n\n const onSubmit = (values: {\n label: string;\n helpText: string;\n thumbnail: string;\n }) => {\n if (!values.label) return;\n const uuid = uuidv4();\n onAddCollection?.({\n label: values.label,\n helpText: values.helpText,\n data: focusBlockData!,\n thumbnail: values.thumbnail,\n id: uuid,\n });\n setVisible(false);\n };\n\n return (\n <Form\n initialValues={{ label: '', helpText: '', thumbnail: '' }}\n onSubmit={onSubmit}\n >\n {({ handleSubmit }) => (\n <Modal\n mask={{ closable: false }}\n style={{ zIndex: 2000 }}\n open={visible}\n title={'Add to collection'}\n onOk={() => handleSubmit()}\n onCancel={() => setVisible(false)}\n >\n <Stack vertical>\n <Stack.Item />\n <TextField\n label={'Title'}\n name=\"label\"\n validate={(val: string) => {\n if (!val) return 'Title required!';\n return undefined;\n }}\n />\n <TextAreaField label={'Description'} name=\"helpText\" />\n <ImageUploaderField\n label={'Thumbnail'}\n name={'thumbnail'}\n uploadHandler={onUploadImage}\n enableSelectFromLibrary={enableAssetManager}\n validate={(val: string) => {\n if (!val) return 'Thumbnail required!';\n return undefined;\n }}\n />\n </Stack>\n </Modal>\n )}\n </Form>\n );\n};\n","import { AddToCollection } from '@extensions/components/AddToCollection';\nimport React, { useMemo, useState } from 'react';\n\nexport function useAddToCollection() {\n const [modalVisible, setModalVisible] = useState(false);\n const modal = useMemo(() => <AddToCollection visible={modalVisible} setVisible={setModalVisible} />, [modalVisible]);\n\n return {\n modal,\n modalVisible,\n setModalVisible,\n };\n}","\nimport React, { useRef } from 'react';\nimport { IconFont, TextStyle, scrollBlockEleIntoView, useBlock, useEditorProps } from '@thanhpv102/easy-email-editor';\nimport { getIndexByIdx, getSiblingIdx } from '@thanhpv102/easy-email-core';\nimport styles from './index.module.scss';\nimport { IBlockDataWithId } from '../../../BlockLayer';\nimport { useAddToCollection } from '@extensions/hooks/useAddToCollection';\n\nexport function ContextMenu({\n moveBlock,\n copyBlock,\n removeBlock,\n contextMenuData,\n onClose,\n}: {\n onClose: (ev?: React.MouseEvent) => void;\n moveBlock: ReturnType<typeof useBlock>['moveBlock'];\n copyBlock: ReturnType<typeof useBlock>['copyBlock'];\n removeBlock: ReturnType<typeof useBlock>['removeBlock'];\n contextMenuData: {\n blockData: IBlockDataWithId;\n left: number;\n top: number;\n };\n}) {\n const { blockData, left, top } = contextMenuData;\n const idx = blockData.id;\n const { modal, modalVisible, setModalVisible } = useAddToCollection();\n const props = useEditorProps();\n const ref = useRef<HTMLDivElement>(null);\n\n const handleMoveUp = () => {\n moveBlock(idx, getSiblingIdx(idx, -1));\n scrollBlockEleIntoView({\n idx: getSiblingIdx(idx, -1),\n });\n onClose();\n };\n\n const handleMoveDown = () => {\n moveBlock(idx, getSiblingIdx(idx, 1));\n scrollBlockEleIntoView({\n idx: getSiblingIdx(idx, 1),\n });\n onClose();\n };\n\n const handleCopy: React.MouseEventHandler<HTMLDivElement> = (ev) => {\n copyBlock(idx);\n scrollBlockEleIntoView({\n idx: getSiblingIdx(idx, 1),\n });\n onClose();\n };\n\n const handleAddToCollection = () => {\n setModalVisible(true);\n };\n\n const handleDelete = () => {\n removeBlock(idx);\n onClose();\n };\n\n const isFirst = getIndexByIdx(idx) === 0;\n\n return (\n <div ref={ref} style={{ visibility: modalVisible ? 'hidden' : undefined }}>\n <div\n style={{\n left: left,\n top: top,\n }}\n className={styles.wrap}\n onClick={(e) => e.stopPropagation()}\n >\n {!isFirst && (\n <div className={styles.listItem} onClick={handleMoveUp}>\n <IconFont iconName='icon-top' style={{ marginRight: 10 }} />{' '}\n <TextStyle>{'Move up'}</TextStyle>\n </div>\n )}\n <div className={styles.listItem} onClick={handleMoveDown}>\n <IconFont iconName='icon-bottom' style={{ marginRight: 10 }} />{' '}\n <TextStyle>{'Move down'}</TextStyle>\n </div>\n <div className={styles.listItem} onClick={handleCopy}>\n <IconFont iconName='icon-copy' style={{ marginRight: 10 }} />{' '}\n <TextStyle>{'Copy'}</TextStyle>\n </div>\n {props.onAddCollection && (\n <div className={styles.listItem} onClick={handleAddToCollection}>\n <IconFont iconName='icon-start' style={{ marginRight: 10 }} />{' '}\n <TextStyle>Add to collection</TextStyle>\n </div>\n )}\n <div className={styles.listItem} onClick={handleDelete}>\n <IconFont iconName='icon-delete' style={{ marginRight: 10 }} />{' '}\n <TextStyle>{'Delete'}</TextStyle>\n </div>\n </div>\n <div\n className={styles.contextmenuMark}\n onClick={onClose}\n onContextMenu={(e) => {\n e.preventDefault();\n onClose(e);\n }}\n />\n {modal}\n </div>\n );\n}\n","import { getParentIdx, getIndexByIdx, BlockManager, getNodeIdxFromClassName } from '@thanhpv102/easy-email-core';\r\nimport { useCallback, useEffect, useState } from 'react';\r\nimport {\r\n getBlockNodeByChildEle,\r\n getDirectionPosition,\r\n useEditorContext,\r\n useDataTransfer,\r\n useHoverIdx,\r\n useRefState,\r\n} from '@thanhpv102/easy-email-editor';\r\nimport { debounce, get } from 'lodash';\r\nimport { IBlockDataWithId } from '..';\r\nimport { BlockTreeProps } from '../components/BlockTree';\r\n\r\nexport function useAvatarWrapperDrop() {\r\n const [blockLayerRef, setBlockLayerRef] = useState<HTMLElement | null>(null);\r\n\r\n const { setHoverIdx, setDirection } = useHoverIdx();\r\n const { dataTransfer, setDataTransfer } = useDataTransfer();\r\n const {\r\n formState: { values },\r\n } = useEditorContext();\r\n\r\n const valuesRef = useRefState(values);\r\n const dataTransferRef = useRefState(dataTransfer);\r\n\r\n function isKeyObject(o: any): o is {\r\n key: string;\r\n } {\r\n return o.key !== undefined;\r\n }\r\n\r\n const removeHightLightClassName = useCallback(() => {\r\n if (!blockLayerRef) return;\r\n blockLayerRef\r\n .querySelectorAll(\r\n '.arco-tree-node-title-gap-top, .arco-tree-node-title-gap-bottom, .arco-tree-node-title-highlight'\r\n )\r\n .forEach((item) => {\r\n item.classList.remove(\r\n 'arco-tree-node-title-gap-top',\r\n 'arco-tree-node-title-gap-bottom',\r\n 'arco-tree-node-title-highlight'\r\n );\r\n });\r\n }, [blockLayerRef]);\r\n\r\n const allowDrop: BlockTreeProps<IBlockDataWithId>['allowDrop'] = useCallback(\r\n (params) => {\r\n const { dragNode, dropNode, dropPosition } = params;\r\n let dragType;\r\n if (isKeyObject(dragNode)) {\r\n const blockData = get(valuesRef.current, dragNode.key);\r\n if (!blockData) return false;\r\n dragType = blockData.type;\r\n } else {\r\n dragType = dragNode.type;\r\n }\r\n const dragBlock = BlockManager.getBlockByType(dragType);\r\n if (!dragBlock) return false;\r\n\r\n if (dropPosition === 0) {\r\n if (\r\n BlockManager.getAutoCompletePath(\r\n dragBlock.type,\r\n dropNode.dataRef.type\r\n ) &&\r\n dropNode.dataRef.children.length === 0\r\n ) {\r\n return {\r\n position: 0,\r\n key: dropNode.key,\r\n };\r\n } else if (\r\n dropNode.parent &&\r\n dragBlock.validParentType.includes(dropNode.parent.type)\r\n ) {\r\n // drop to next sibling\r\n return {\r\n position: -1,\r\n key: dropNode.key,\r\n };\r\n }\r\n } else {\r\n if (\r\n dropNode.parent &&\r\n dragBlock.validParentType.includes(dropNode.parent.type)\r\n ) {\r\n return {\r\n position: dropPosition,\r\n key: dropNode.key,\r\n };\r\n }\r\n }\r\n setDirection('');\r\n setHoverIdx('');\r\n return false;\r\n },\r\n [setDirection, setHoverIdx, valuesRef]\r\n );\r\n\r\n useEffect(() => {\r\n if (blockLayerRef) {\r\n const onDragOver = debounce((ev: DragEvent) => {\r\n if (!dataTransferRef.current) return;\r\n\r\n const blockNode = getBlockNodeByChildEle(ev.target as HTMLDivElement);\r\n if (!blockNode || !ev.target) return;\r\n\r\n const directionPosition = getDirectionPosition(ev, 5);\r\n const treeNodeEle = blockNode.parentNode?.parentNode\r\n ?.parentNode as HTMLElement;\r\n\r\n if (!treeNodeEle) return;\r\n\r\n removeHightLightClassName();\r\n\r\n const dropIdx = getNodeIdxFromClassName(blockNode.classList)!;\r\n if (!dropIdx) return;\r\n const dropParentIdx = getParentIdx(dropIdx);\r\n\r\n const dropBlockData = get(valuesRef.current, dropIdx);\r\n const dropParentBlockData = dropParentIdx\r\n ? get(valuesRef.current, dropParentIdx)\r\n : null;\r\n\r\n let dropPosition = 0;\r\n if (\r\n directionPosition.vertical.direction === 'top' &&\r\n directionPosition.vertical.isEdge\r\n ) {\r\n dropPosition = -1;\r\n } else if (\r\n directionPosition.vertical.direction === 'bottom' &&\r\n directionPosition.vertical.isEdge\r\n ) {\r\n dropPosition = 1;\r\n }\r\n const dropResult = allowDrop({\r\n dragNode: {\r\n type: dataTransferRef.current.type,\r\n },\r\n dropNode: {\r\n dataRef: dropBlockData,\r\n key: dropIdx,\r\n parent: dropParentBlockData,\r\n },\r\n dropPosition,\r\n });\r\n if (!dropResult) return;\r\n\r\n const node = document.querySelector(\r\n `[data-tree-idx=\"${dropResult.key}\"]`\r\n )?.parentNode?.parentNode;\r\n if (node instanceof HTMLElement) {\r\n removeHightLightClassName();\r\n node.classList.add('arco-tree-node-title-gap-bottom');\r\n }\r\n setDirection(getDirectionFormDropPosition(dropResult.position));\r\n setHoverIdx(dropResult.key);\r\n\r\n if (dropResult.position === -1) {\r\n treeNodeEle.classList.add('arco-tree-node-title-gap-top');\r\n setDataTransfer((dataTransfer: any) => {\r\n return {\r\n ...dataTransfer,\r\n parentIdx: dropParentIdx,\r\n positionIndex: getIndexByIdx(dropIdx),\r\n };\r\n });\r\n } else if (dropResult.position === 1) {\r\n setDataTransfer((dataTransfer: any) => {\r\n return {\r\n ...dataTransfer,\r\n parentIdx: dropParentIdx,\r\n positionIndex: getIndexByIdx(dropIdx) + 1,\r\n };\r\n });\r\n treeNodeEle.classList.add('arco-tree-node-title-gap-bottom');\r\n } else {\r\n treeNodeEle.classList.add('arco-tree-node-title-highlight');\r\n setDataTransfer((dataTransfer: any) => {\r\n return {\r\n ...dataTransfer,\r\n parentIdx: dropIdx,\r\n positionIndex: 0,\r\n };\r\n });\r\n }\r\n });\r\n\r\n const onDragend = (ev: DragEvent) => {\r\n removeHightLightClassName();\r\n };\r\n\r\n const onDrop = (ev: DragEvent) => {\r\n setTimeout(() => {\r\n removeHightLightClassName();\r\n }, 0);\r\n };\r\n\r\n blockLayerRef.addEventListener('dragover', onDragOver);\r\n blockLayerRef.addEventListener('drop', onDrop);\r\n blockLayerRef.addEventListener('dragleave', onDragend);\r\n\r\n return () => {\r\n blockLayerRef.removeEventListener('dragover', onDragOver);\r\n blockLayerRef.removeEventListener('drop', onDrop);\r\n blockLayerRef.removeEventListener('dragleave', onDragend);\r\n };\r\n }\r\n }, [\r\n blockLayerRef,\r\n dataTransferRef,\r\n valuesRef,\r\n removeHightLightClassName,\r\n allowDrop,\r\n setDirection,\r\n setHoverIdx,\r\n setDataTransfer,\r\n ]);\r\n\r\n return {\r\n setBlockLayerRef,\r\n blockLayerRef,\r\n allowDrop,\r\n removeHightLightClassName,\r\n };\r\n}\r\n\r\nexport function getDirectionFormDropPosition(position: number) {\r\n if (position === -1) return 'top';\r\n if (position === 1) return 'bottom';\r\n return '';\r\n}\r\n","import { BasicType, AdvancedType } from '@thanhpv102/easy-email-core';\nimport { get } from 'lodash';\n\nlet iconsMap = {\n [BasicType.TEXT]: 'icon-text',\n [BasicType.SECTION]: 'icon-section',\n [BasicType.COLUMN]: 'icon-column',\n [BasicType.DIVIDER]: 'icon-divider',\n [BasicType.IMAGE]: 'icon-img',\n [BasicType.BUTTON]: 'icon-button',\n [BasicType.GROUP]: 'icon-group',\n [BasicType.PAGE]: 'icon-page',\n [BasicType.WRAPPER]: 'icon-wrapper',\n [BasicType.NAVBAR]: 'icon-navbar',\n [BasicType.HERO]: 'icon-hero',\n [BasicType.SPACER]: 'icon-spacing',\n [BasicType.SOCIAL]: 'icon-social',\n [BasicType.CAROUSEL]: 'icon-carousel',\n [BasicType.ACCORDION]: 'icon-accordion',\n\n [AdvancedType.TEXT]: 'icon-text',\n [AdvancedType.DIVIDER]: 'icon-divider',\n [AdvancedType.IMAGE]: 'icon-img',\n [AdvancedType.BUTTON]: 'icon-button',\n [AdvancedType.NAVBAR]: 'icon-navbar',\n [AdvancedType.SPACER]: 'icon-spacing',\n [AdvancedType.SOCIAL]: 'icon-social',\n [AdvancedType.CAROUSEL]: 'icon-carousel',\n [AdvancedType.ACCORDION]: 'icon-accordion',\n\n [AdvancedType.WRAPPER]: 'icon-wrapper',\n [AdvancedType.SECTION]: 'icon-section',\n [AdvancedType.COLUMN]: 'icon-column',\n [AdvancedType.GROUP]: 'icon-group',\n [AdvancedType.HERO]: 'icon-hero',\n};\n\nexport function getIconNameByBlockType(type: string) {\n return get(iconsMap, type) || 'icon-number';\n}\n\nexport function setIconsMap(map: Record<string, string>) {\n iconsMap = {...iconsMap, ...map};\n}\n","import { BlockManager, IBlockData, BasicType } from '@thanhpv102/easy-email-core';\r\n\r\nconst tempEle = document.createElement('div');\r\nexport function getBlockTitle(\r\n blockData: IBlockData,\r\n isFromContent = true\r\n): string {\r\n if (blockData.title) return blockData.title;\r\n\r\n if (\r\n isFromContent &&\r\n (blockData.type === BasicType.TEXT.toString() || blockData.type === BasicType.BUTTON.toString())\r\n ) {\r\n tempEle.innerHTML = blockData.data.value.content;\r\n return tempEle.innerText;\r\n }\r\n\r\n const blockName = BlockManager.getBlockByType(blockData.type)?.name || '';\r\n return blockName;\r\n}\r\n","import React, { useCallback, useMemo, useState, useRef } from 'react';\nimport {\n DATA_ATTRIBUTE_DROP_CONTAINER,\n IconFont,\n scrollBlockEleIntoView,\n TextStyle,\n useBlock,\n useEditorContext,\n useFocusIdx,\n useHoverIdx,\n useRefState,\n} from '@thanhpv102/easy-email-editor';\nimport {\n BasicType,\n BlockManager,\n getChildIdx,\n getIndexByIdx,\n getNodeIdxClassName,\n getPageIdx,\n getParentIdx,\n IBlockData,\n} from '@thanhpv102/easy-email-core';\nimport styles from './index.module.scss';\nimport { cloneDeep, get, isString, isEqual } from 'lodash';\nimport { EyeIcon } from './components/EyeIcon';\nimport { BlockTree, BlockTreeProps } from './components/BlockTree';\nimport { ContextMenu } from './components/ContextMenu';\nimport { classnames } from '@extensions/utils/classnames';\nimport { getDirectionFormDropPosition, useAvatarWrapperDrop } from './hooks/useAvatarWrapperDrop';\nimport { getIconNameByBlockType } from '@extensions/utils/getIconNameByBlockType';\nimport { Space } from 'antd';\nimport { getBlockTitle } from '@extensions/utils/getBlockTitle';\n\nexport interface IBlockDataWithId extends IBlockData {\n id: string;\n icon?: React.ReactElement;\n parent: IBlockDataWithId | null;\n children: IBlockDataWithId[];\n className?: string;\n}\nexport interface BlockLayerProps {\n renderTitle?: (block: IBlockDataWithId) => React.ReactNode;\n}\n\nexport function BlockLayer(props: BlockLayerProps) {\n const { pageData } = useEditorContext();\n const { renderTitle: propsRenderTitle } = props;\n const { focusIdx, setFocusIdx } = useFocusIdx();\n const { setHoverIdx, setIsDragging, setDirection } = useHoverIdx();\n const { moveBlock, setValueByIdx, copyBlock, removeBlock, values } = useBlock();\n\n const { setBlockLayerRef, allowDrop, removeHightLightClassName } =\n useAvatarWrapperDrop();\n\n const valueRef = useRefState(values);\n\n const [contextMenuData, setContextMenuData] = useState<{\n blockData: IBlockDataWithId;\n left: number;\n top: number;\n } | null>(null);\n\n const onToggleVisible = useCallback(\n ({ id }: IBlockDataWithId, e: React.MouseEvent) => {\n e.stopPropagation();\n const blockData = get(valueRef.current, id) as IBlockData | null;\n\n if (blockData) {\n blockData.data.hidden = !Boolean(blockData.data.hidden);\n setValueByIdx(id, blockData);\n }\n },\n [setValueByIdx, valueRef],\n );\n\n const renderTitle = useCallback(\n (data: IBlockDataWithId) => {\n const isPage = data.type === BasicType.PAGE.toString();\n const title = propsRenderTitle ? propsRenderTitle(data) : getBlockTitle(data);\n return (\n <div\n data-tree-idx={data.id}\n className={classnames(\n styles.title,\n !isPage && getNodeIdxClassName(data.id),\n !isPage && 'email-block',\n )}\n >\n <Space\n align='center'\n size='small'\n >\n <IconFont\n iconName={getIconNameByBlockType(data.type)}\n style={{ fontSize: 12, color: '#999' }}\n />\n <div\n title={isString(title) ? title : ''}\n style={{\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n width: '5em',\n textOverflow: 'ellipsis',\n }}\n >\n <TextStyle size='smallest'>{title}</TextStyle>\n </div>\n </Space>\n <div className={styles.eyeIcon}>\n <EyeIcon\n blockData={data}\n onToggleVisible={onToggleVisible}\n />\n </div>\n </div>\n );\n },\n [onToggleVisible, propsRenderTitle],\n );\n\n const treeData = useMemo(() => {\n const copyData = cloneDeep(pageData) as IBlockDataWithId;\n const loop = (\n item: IBlockDataWithId,\n id: string,\n parent: IBlockDataWithId | null,\n ) => {\n item.id = id;\n item.parent = parent;\n item.children.map((child, index) => loop(child, getChildIdx(id, index), item));\n };\n\n loop(copyData, getPageIdx(), null);\n\n return [copyData];\n }, [pageData]);\n\n const onSelect = useCallback(\n (selectedId: string) => {\n setFocusIdx(selectedId);\n setTimeout(() => {\n scrollBlockEleIntoView({ idx: selectedId });\n }, 50);\n },\n [setFocusIdx],\n );\n\n const onContextMenu = useCallback(\n (blockData: IBlockDataWithId, ev: React.MouseEvent) => {\n ev.preventDefault();\n setContextMenuData({ blockData, left: ev.clientX, top: ev.clientY });\n },\n [],\n );\n\n const onCloseContextMenu = useCallback(() => {\n setContextMenuData(null);\n }, []);\n\n const onMouseEnter = useCallback(\n (id: string) => {\n setHoverIdx(id);\n },\n [setHoverIdx],\n );\n\n const onMouseLeave = useCallback(() => {\n setHoverIdx('');\n }, [setHoverIdx]);\n\n const onDragStart = useCallback(() => {\n setIsDragging(true);\n }, [setIsDragging]);\n\n const onDragEnd = useCallback(() => {\n setIsDragging(false);\n }, [setIsDragging]);\n\n const onDrop: BlockTreeProps<IBlockDataWithId>['onDrop'] = useCallback(\n params => {\n const { dragNode, dropNode, dropPosition } = params;\n const dragBlock = BlockManager.getBlockByType(dragNode.dataRef.type);\n if (!dragBlock) return false;\n const dropIndex = getIndexByIdx(dropNode.key);\n\n if (dropPosition === 0) {\n if (\n dragBlock.validParentType.includes(dropNode.dataRef.type) &&\n dropNode.dataRef.children.length === 0\n ) {\n moveBlock(dragNode.key, getChildIdx(dropNode.key, 0));\n } else if (\n dropNode.parent &&\n dragBlock.validParentType.includes(dropNode.parent.type)\n ) {\n // drop to parent\n moveBlock(dragNode.key, getChildIdx(dropNode.parentKey, dropIndex));\n }\n } else {\n moveBlock(\n dragNode.key,\n getChildIdx(dropNode.parentKey, dropPosition > 0 ? dropIndex + 1 : dropIndex),\n );\n }\n },\n [moveBlock],\n );\n\n const lastDropResultRef = useRef<ReturnType<typeof allowDrop>>(false);\n\n const blockTreeAllowDrop: BlockTreeProps<IBlockDataWithId>['allowDrop'] = useCallback(\n (data) => {\n const dropResult = allowDrop(data);\n if (isEqual(lastDropResultRef.current, dropResult)) {\n return dropResult;\n }\n lastDropResultRef.current = dropResult;\n if (dropResult) {\n setIsDragging(true); // Auto-set isDragging when drag is valid\n const node = document.querySelector(`[data-tree-idx=\"${dropResult.key}\"]`)\n ?.parentNode?.parentNode;\n if (node instanceof HTMLElement) {\n removeHightLightClassName();\n node.classList.add('arco-tree-node-title-gap-bottom');\n }\n setDirection(getDirectionFormDropPosition(dropResult.position));\n setHoverIdx(dropResult.key);\n } else {\n setIsDragging(false); // Clear isDragging when drag is invalid\n }\n\n return dropResult;\n },\n [allowDrop, removeHightLightClassName, setDirection, setHoverIdx, setIsDragging],\n );\n\n const selectedKeys = useMemo(() => {\n if (!focusIdx) return [];\n\n return [focusIdx];\n }, [focusIdx]);\n\n const expandedKeys = useMemo(() => {\n if (!focusIdx) return [];\n let currentIdx = getParentIdx(focusIdx);\n const keys: string[] = [];\n while (currentIdx) {\n keys.push(currentIdx);\n currentIdx = getParentIdx(currentIdx);\n }\n return keys;\n }, [focusIdx]);\n\n return (\n <div\n ref={setBlockLayerRef}\n id='BlockLayerManager'\n {...{\n [DATA_ATTRIBUTE_DROP_CONTAINER]: 'true',\n }}\n >\n <BlockTree<IBlockDataWithId>\n selectedKeys={selectedKeys}\n expandedKeys={expandedKeys}\n defaultExpandAll\n treeData={treeData}\n renderTitle={renderTitle}\n allowDrop={blockTreeAllowDrop}\n onContextMenu={onContextMenu}\n onDrop={onDrop}\n onDragStart={onDragStart}\n onDragEnd={onDragEnd}\n onSelect={onSelect}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n />\n {contextMenuData && (\n <ContextMenu\n onClose={onCloseContextMenu}\n moveBlock={moveBlock}\n copyBlock={copyBlock}\n removeBlock={removeBlock}\n contextMenuData={contextMenuData}\n />\n )}\n </div>\n );\n}\n",".BlocksPanel {\n img {\n max-width: 100%;\n }\n\n :global {\n .ant-tooltip {\n z-index: 10000 !important;\n }\n\n .ant-tooltip-inner {\n z-index: 10000 !important;\n }\n }\n}\n.blockItem {\n text-align: center;\n padding: 3px 12px;\n border-radius: 15px;\n min-width: 60px;\n}\n\n.closeBtn {\n width: 30px;\n height: 30px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 50%;\n &:hover {\n background-color: #f7f8f8;\n }\n}\n","import { IBlockData } from '@thanhpv102/easy-email-core';\n\nexport interface BlockMarketCategory {\n name: string;\n title: string;\n blocks: {\n type: string;\n title: string;\n description?: React.ReactNode;\n thumbnail?: string;\n payload?: IBlockData;\n component: () => React.ReactElement | null;\n }[];\n}\n\nexport class BlockMarketManager {\n private static category: BlockMarketCategory[] = [];\n private static subscriptHandles: Array<(category: BlockMarketCategory[]) => void> = [];\n\n public static subscribe(fn: (category: BlockMarketCategory[]) => void) {\n return this.subscriptHandles.push(fn);\n }\n\n public static unsubscribe(fn: (category: BlockMarketCategory[]) => void) {\n return this.subscriptHandles = this.subscriptHandles.filter(item => item === fn);\n }\n\n public static notify() {\n this.subscriptHandles.forEach(fn => fn(this.category));\n }\n\n public static getCategory(name: string) {\n return this.category.find((item) => item.name === name);\n }\n\n public static getCategories() {\n return this.category;\n }\n\n public static addCategories(list: BlockMarketCategory[]) {\n list.forEach(item => {\n const index = this.category.findIndex((c) => c.name === item.name);\n if (index !== -1) {\n this.category.splice(index, 1);\n }\n\n this.category.push(item);\n });\n this.notify();\n }\n\n public static addCategory(\n name: string,\n title: string,\n blocks: {\n type: string;\n title: string;\n description?: React.ReactNode;\n component: () => React.ReactElement | null;\n }[]\n ) {\n const index = this.category.findIndex((item) => item.name === name);\n if (index !== -1) {\n this.category.splice(index, 1);\n }\n\n this.category.push({\n name,\n title,\n blocks,\n });\n\n this.notify();\n }\n\n public static removeCategories(list: BlockMarketCategory[]) {\n list.forEach(item => {\n this.category = this.category.filter((c) => c.name !== item.name);\n });\n this.notify();\n }\n\n public static removeCategory(name: string) {\n this.category = this.category.filter((item) => item.name !== name);\n this.notify();\n }\n}\n",".mask {\n width: 270px;\n display:flex;\n justify-content: flex-end;\n align-items: center;\n cursor: default;\n position: relative;\n transition: all .3s;\n pointer-events: auto;\n}\n.drag {\n background-color: rgba(0,0,0,0.65);\n}","import { IconFont, BlockAvatarWrapper } from '@thanhpv102/easy-email-editor';\nimport React, { useCallback, useEffect, useRef } from 'react';\nimport { BlockType } from '@thanhpv102/easy-email-core';\nimport styles from './index.module.scss';\n\nexport const BlockMaskWrapper: React.FC<{\n type: BlockType | string;\n payload: any;\n children: React.ReactNode | React.ReactElement;\n}> = props => {\n const ref = useRef<HTMLDivElement>(null);\n const dragRef = useRef<HTMLDivElement>(null);\n const { type, payload } = props;\n\n const onMouseDown = useCallback(() => {\n if (ref.current) {\n ref.current.classList.add(styles.drag);\n }\n }, []);\n\n const onMaskMouseDown: React.MouseEventHandler<HTMLDivElement> = useCallback(ev => {\n if (!dragRef.current || !dragRef.current.contains(ev.target as HTMLElement)) {\n ev.preventDefault();\n ev.stopPropagation();\n }\n }, []);\n\n useEffect(() => {\n const mouseup = () => {\n if (ref.current) {\n ref.current.classList.remove(styles.drag);\n }\n };\n document.addEventListener('mouseup', mouseup);\n return () => {\n document.removeEventListener('mouseup', mouseup);\n };\n }, []);\n\n return (\n <div style={{ position: 'relative' }}>\n {props.children}\n <div\n className={styles.wrapper}\n style={{\n position: 'absolute',\n height: '100%',\n transform: 'translate(32px)',\n top: 0,\n right: 0,\n display: 'flex',\n justifyContent: 'flex-end',\n }}\n >\n <BlockAvatarWrapper\n type={type}\n payload={payload}\n >\n <div\n ref={ref}\n className={styles.mask}\n onMouseDown={onMaskMouseDown}\n >\n <div\n ref={dragRef}\n style={{\n position: 'relative',\n zIndex: 10,\n }}\n onMouseDown={onMouseDown}\n >\n <IconFont\n iconName='icon-drag'\n style={{ fontSize: 25, lineHeight: '25px', cursor: 'grab' }}\n />\n </div>\n </div>\n </BlockAvatarWrapper>\n </div>\n </div>\n );\n};\n","import React from 'react';\nimport { Stack } from '@thanhpv102/easy-email-editor';\nimport { AdvancedType } from '@thanhpv102/easy-email-core';\n\nimport { BlockMaskWrapper } from '@extensions/ShortcutToolbar/components/BlockMaskWrapper';\n\nconst fontList = [48, 32, 27, 24, 18, 16, 14];\n\nexport function TextBlockItem() {\n return (\n <Stack.Item fill>\n <Stack vertical>\n {fontList.map((item, index) => {\n return (\n <Stack.Item fill key={index}>\n <BlockMaskWrapper\n type={AdvancedType.TEXT}\n payload={{\n attributes: {\n 'font-size': item + 'px',\n padding: '0px 0px 0px 0px'\n },\n data: {\n value: {\n content: item + 'px',\n },\n },\n }}\n >\n <div style={{ fontSize: item, width: '100%', paddingLeft: 20 }}>\n {item}px\n </div>\n </BlockMaskWrapper>\n </Stack.Item>\n );\n })}\n </Stack>\n </Stack.Item>\n );\n}\n","import React, { useEffect, useState } from 'react';\n\ninterface IPictureProps\n extends React.DetailedHTMLProps<\n React.HTMLAttributes<HTMLImageElement>,\n HTMLElement\n > {\n src: string;\n className?: string;\n}\n\nconst skeletonKeyframes = `\n@keyframes easy-email-skeleton-shimmer {\n 0% { background-position: -400px 0; }\n 100% { background-position: 400px 0; }\n}\n`;\n\nlet skeletonStyleInjected = false;\nfunction injectSkeletonStyle() {\n if (skeletonStyleInjected) return;\n skeletonStyleInjected = true;\n const style = document.createElement('style');\n style.textContent = skeletonKeyframes;\n document.head.appendChild(style);\n}\n\nexport function Picture(props: IPictureProps) {\n const [url, setUrl] = useState(props.src);\n const [loaded, setLoaded] = useState(false);\n\n useEffect(() => {\n injectSkeletonStyle();\n }, []);\n\n useEffect(() => {\n setUrl(props.src);\n setLoaded(false);\n }, [props.src]);\n\n const { width, height, borderRadius, padding, ...restStyle } = props.style || {};\n\n return (\n <picture\n {...{ ...props }}\n {...{\n src: undefined,\n style: {\n display: 'inline-block',\n width: width,\n height: height,\n borderRadius: borderRadius,\n padding: padding,\n overflow: borderRadius ? 'hidden' : undefined,\n position: 'relative',\n ...restStyle,\n },\n }}\n >\n {!loaded && (\n <span\n style={{\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n background: 'linear-gradient(70deg, var(--color-loading-gray-1, #2a2a2a) 25%, var(--color-loading-gray-2, #5a5a5a) 50%, var(--color-loading-gray-1, #2a2a2a) 75%)',\n backgroundSize: '800px 100%',\n animation: 'easy-email-skeleton-shimmer 1.4s infinite linear',\n borderRadius: borderRadius,\n display: 'block',\n zIndex: 1,\n }}\n />\n )}\n <source\n srcSet={url}\n />\n <img\n style={{\n width: width || '100%',\n height: height || '100%',\n maxWidth: '100%',\n maxHeight: '100%',\n display: 'block',\n opacity: loaded ? 1 : 0,\n transition: 'opacity 0.2s ease',\n }}\n src={url}\n alt=''\n onLoad={() => setLoaded(true)}\n />\n </picture>\n );\n}\n","import { ImageManager } from '@thanhpv102/easy-email-core';\n\nconst defaultImagesMap = {\n IMAGE_08:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/0046b247-3647-491f-afe1-cb0dd2a3c21c-ef84b752-f827-4546-89bf-6b63dfb67a4d.png',\n IMAGE_09:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/be34fb18-32ad-441c-84d8-3c0e9ba9f742-ad2ea5ff-5d0b-446b-bd7d-8e2ab5afdd16.png',\n IMAGE_10:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/6a1e6292-469e-452a-bbae-44e4b5ff7463-05e543b6-c951-44ce-ae27-ca1282c77f52.png',\n IMAGE_11:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/39b25f35-7ca9-4264-8502-41f430f89cf5-bcdc91c2-da3c-4fef-99c0-62b77c5a0f1f.png',\n IMAGE_12:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/eaa83007-f6f5-47d9-acbe-bb98065eaf20-b7c46090-73bd-4d4b-bd31-2368f7b4064f.png',\n IMAGE_13:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/9dec87bb-0a6d-429f-ac23-0ee636e6428d-219dee7e-85bb-4fba-9bf3-e98762e80409.png',\n IMAGE_14:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/d285da5e-b0c0-4895-84ac-42f83b4d603b-64042d20-be6a-45de-819c-8312f778a38d.png',\n IMAGE_15:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/f69f48af-5b15-40aa-91c4-81d601d1357b-083dc99d-02a6-40d9-ae28-0662bd078b5d.png',\n IMAGE_16:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/9cce6b16-5a98-4ddb-b1a1-6cec2cf56891-c3acb856-8ab8-4cfb-93f9-2a0747678b8b.png',\n IMAGE_17:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/d9795c1d-fa32-4adb-ab25-30b7cfe87936-df21314f-6f05-4550-80b3-9ab1107e8fbe.png',\n IMAGE_18:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/82f6f893-43ed-4f3d-9a17-4740bda844de-3318b36c-199d-46fe-96b8-38d1f17ef0c1.png',\n IMAGE_19:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/f1ece227-e050-4751-b064-aaeeabd5bfde-d459e9a2-b192-417b-8a77-2297b29e814e.png',\n IMAGE_20:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/585b48f6-ee7c-4d1a-8619-4d2edea09be6-07113335-5d19-464a-adef-2be50682ce72.png',\n IMAGE_21:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/9755d667-289e-405c-b84a-adf5db91ea4d-c03c409b-dd9b-40e9-840a-6a64e1df594e.png',\n IMAGE_22:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/7487ce49-cd69-4651-8da3-807c54357258-defaaf0a-1756-4b83-9a94-51dcdbfeb84f.png',\n IMAGE_23:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/c3463b9e-baff-41c8-95ee-01c5a79259bd-8062ab05-baa5-45d2-9959-4935d4ff2005.png',\n IMAGE_24:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/1f45e84a-5c84-45ce-9d27-df6ffb55bcdd-cbf126f4-b372-4ea9-a354-0dc27be4ce2f.png',\n IMAGE_25:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/6b8b234e-2306-48f9-90ed-056c13201a83-492073c3-258f-4f1b-91fa-4a8ae723aa2c.png',\n IMAGE_26:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/aa50c2c9-8e3b-4af2-b029-337ec549ec10-baacd015-2e3f-4326-b3ab-bde84a7c456b.png',\n IMAGE_27:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/9e935e54-a97e-4fbb-a2fb-73e351a35eed-479ef4d1-9460-48b2-934d-84d77044b98d.png',\n IMAGE_28:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/799564d8-3082-4fdc-86ed-8c4b3510934f-3f8ccbaa-7b6b-49b7-a836-21fa88f996fc.png',\n IMAGE_29:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/af34a548-c339-4a9e-85fe-11bf90c083eb-46fef91d-7307-4e91-aae0-460da1c48629.png',\n IMAGE_30:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/84014a93-429c-479c-b9ed-0c568f58a288-ca76cdf2-92d3-4552-bc95-3a8dd4c9cd0b.png',\n IMAGE_31:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/dd1584fb-cb60-42c9-80c7-5545e16130ca-226ba72b-ce9e-4948-ad0d-347381fb96c5.png',\n IMAGE_32:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/76e3d8e2-697d-484c-a989-715bd234b575-37bde239-2e2d-450a-8e93-d62c39cb94a3.png',\n IMAGE_33:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/898b791e-c8fc-4bc5-bf1e-47a0351284ce-fdee9617-9848-49e7-82b6-36095f417a3e.png',\n IMAGE_34:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/49662d27-6e14-4e75-a942-946f0af25a51-e9aa2ead-98e4-4f70-8073-7b5aaafaa367.png',\n IMAGE_35:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/d2905fb1-9fc1-49c0-90b0-806877c38cd2-f2e05655-4e6c-41b0-a028-990448a716dc.png',\n IMAGE_36:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/9c3e9949-1be7-42b5-ad48-44f0e1c89c2e-2ee3cbac-e45e-414d-96ad-9dae3621cf14.png',\n IMAGE_37:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/1865e3a6-a762-4bd9-9644-96ae6b27a83a-176a20c7-5768-400c-b2eb-701500cee17c.png',\n IMAGE_38:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/2a6d82e2-d1f6-4e30-ae05-1afe3cd03e70-22d186b0-c2f1-4aee-b33b-869cae26412e.png',\n IMAGE_39:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/9f97bda2-82d6-47e7-80c1-40be94d5491f-88233d55-8715-43cd-9232-246440e33cd6.png',\n IMAGE_40:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/b8f00c77-12b0-4e61-a85e-96918c0035dc-b8344b64-8e79-424d-a974-8e13e6b1e7f8.png',\n IMAGE_41:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/5fc6be85-0205-4ca9-bb9a-eb9335f94af2-2d41c4bb-2c00-4fe7-8b32-067e92df3ab3.png',\n IMAGE_42:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/f6c9c054-f35a-4af7-957f-c7a6209972eb-7e3b42bf-8d97-466d-8662-8d3b1786e8b8.png',\n IMAGE_43:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/80e108b0-3d70-442a-93c1-3fcc091253c6-3dc61b44-6072-413a-ae28-a551577b7677.png',\n IMAGE_44:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/14b9e878-7208-48f4-94d0-51161b79010a-fb55ae68-a7ce-4bae-830d-331d368f0f32.png',\n IMAGE_45:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/b42f3cd8-01fc-4650-a32d-b584b05e78c3-5e408f98-e9e6-43de-97af-91b2732760df.png',\n IMAGE_46:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/e737972a-d884-440b-96d3-66f703dd110b-9f1d0d18-fb45-4a54-a2d0-65bc5b168f8a.png',\n IMAGE_47:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/0e3ae071-247a-4e69-8b60-8009477180b9-197205c2-2ae7-420f-94aa-78440226beaa.png',\n IMAGE_48:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/0ec46619-4dd0-4293-88fb-14656ac7d33c-0936deed-a88c-4e3d-90bf-4fe67b295659.png',\n IMAGE_49:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/01830aec-d044-4d2a-9519-aac2901f4760-776602f7-021b-4142-a2d0-446aca5e0418.png',\n IMAGE_50:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/9f1cee25-f9b4-4539-b4ea-3109584c0a54-0692c4fb-46ce-452c-8573-fcce74852cba.png',\n IMAGE_51:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/e138143f-7071-44bc-8470-7d56850e527c-f515254e-67b8-4b68-b86f-7993e960d893.png',\n IMAGE_52:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/ac75b655-b57d-40b9-a201-8163eeb6a579-1f894e6f-18ac-42c4-9227-7488433586bc.png',\n IMAGE_53:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/3c505a1b-575a-40fb-83c1-6c4a11a6d478-9e466e35-af9e-406a-b4cc-b86f9d0b0419.png',\n IMAGE_54:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/7f98eeec-9422-48b5-9b57-939a24418b92-a6346a63-b393-49c2-9911-ee1a9a1ffd02.png',\n IMAGE_55:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/a7f5ae44-418b-40e1-b8a5-8162cf8bbd87-156cc8dd-3a19-4638-8c26-e28783e50952.png',\n IMAGE_56:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/efdeeced-1eb7-465f-8370-a3b000634ba2-0a4d1794-6ca7-44fa-a1c6-04e3bde8eb56.png',\n IMAGE_57:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/425c6017-2c30-41d7-8930-08300492c6d4-a0859ca3-5213-484c-9170-2d51329407cc.png',\n IMAGE_58:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/858ea699-cf65-469d-bd9e-70adea729bb4-c4e7a711-27b6-4865-9b32-516c41cebddf.png',\n IMAGE_59:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/06ca521d-9728-4de6-a709-1b75a828bfc3-2a9b1224-3d71-43b8-b52f-e7cdcdc9107b.png',\n IMAGE_60:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/199eacfa-daf8-4dd1-a356-225a265a88a4-e8432435-a2bb-4ec2-a3e9-ee1757d8b44b.png',\n IMAGE_61:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/f43b67dc-cc30-4533-b2ca-4689292aab4d-40bc844d-5362-451f-a839-69e86f7a3113.png',\n IMAGE_62:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/318e911c-a57b-4768-9c79-0e49c2953e7a-dbe0eb3c-0b4b-495a-a469-a15b46c5a0cc.png',\n IMAGE_63:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/ed70ddb1-1344-4245-ab1e-beae36ed44b4-21a80cb3-a928-4857-973b-98992fdec74f.png',\n IMAGE_64:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/fb7dd6fa-12c1-41e1-8744-91d0f861ec57-0fee9bda-2381-4c54-a24d-bd644384b9aa.png',\n IMAGE_65:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/7bf8c363-17bd-472d-8cca-96f5d4b64292-9ab34957-15d3-4068-8e83-cc283d8e400d.png',\n IMAGE_66:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/0330a1e9-e814-4be8-83f0-ee1dbabf44a0-6e35a585-92ec-4570-875b-866b59927583.png',\n IMAGE_67:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/a7deb6bc-db2b-4273-bf25-002bb148bf5a-ed5e9b17-15a9-4e0f-9874-c3219d48b2b4.png',\n IMAGE_68:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/52c50319-e3a9-401b-9057-bd6531870f10-aa79ec5d-76d2-4d48-a99e-2ccd9d9c285b.png',\n IMAGE_69:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/9994cef3-6205-4013-8993-b037d067df64-f5d03db4-6bb4-4af4-b35a-0b6d512eaff4.png',\n IMAGE_70:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/e5dd7a7e-70d7-483f-80cc-0c5b41107101-75dcedc7-4a34-4d03-97ee-bf32163afa0a.png',\n IMAGE_71:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/53277265-8e54-43d0-b9d0-d34cd1639861-adb7a48a-8382-43a1-ad59-7c84764a3b21.png',\n IMAGE_72:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/table3x3-border_none.png',\n IMAGE_73:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/table4x4-header.png',\n};\n\nImageManager.add(defaultImagesMap);\n\nexport function getImg(name: keyof typeof defaultImagesMap) {\n return ImageManager.get(name);\n}\n\n","import React from 'react';\nimport { AdvancedType, IImage, RecursivePartial } from '@thanhpv102/easy-email-core';\nimport { Stack } from '@thanhpv102/easy-email-editor';\n\nimport { BlockMaskWrapper } from '@extensions/ShortcutToolbar/components/BlockMaskWrapper';\nimport { Picture } from '@extensions/ShortcutToolbar/components/Picture';\nimport { getImg } from '@extensions/ShortcutToolbar/utils/getImg';\n\nconst imageList = [\n {\n attributes: {\n src: getImg('IMAGE_45'),\n padding: '10px 25px 10px 25px',\n 'padding-left': '0px',\n 'padding-right': '0px',\n 'padding-top': '0px',\n 'padding-bottom': '0px'\n }\n },\n {\n attributes: {\n src: getImg('IMAGE_44'),\n padding: '10px 25px 10px 25px',\n 'padding-left': '25px',\n 'padding-right': '25px',\n 'padding-top': '0px',\n 'padding-bottom': '0px',\n 'border-radius': '15px'\n },\n },\n {\n attributes: {\n src: getImg('IMAGE_43'),\n padding: '10px 25px 10px 25px',\n 'padding-left': '25px',\n 'padding-right': '25px',\n 'padding-top': '0px',\n 'padding-bottom': '0px',\n 'border-radius': '999px',\n width: '200px',\n height: '200px'\n },\n }\n];\n\nexport function ImageBlockItem() {\n return (\n <Stack.Item fill>\n <Stack vertical>\n {imageList.map((item, index) => {\n return (\n <BlockMaskWrapper\n key={index}\n type={AdvancedType.IMAGE}\n payload={\n {\n attributes: item.attributes,\n } as RecursivePartial<IImage>\n }\n >\n <div\n style={{\n position: 'relative',\n display: 'flex',\n justifyContent: 'center',\n }}\n >\n <Picture\n src={item.attributes.src}\n style={{\n width: item.attributes.width,\n height: item.attributes.height,\n minWidth: item.attributes.width ? item.attributes.width : 250,\n minHeight: 100,\n borderRadius: item.attributes['border-radius']\n }}\n />\n <div\n style={{\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n zIndex: 2,\n }}\n />\n </div>\n </BlockMaskWrapper>\n );\n })}\n </Stack>\n </Stack.Item>\n );\n}\n","import React from 'react';\nimport { Stack, TextStyle } from '@thanhpv102/easy-email-editor';\nimport { AdvancedType, ISpacer, RecursivePartial } from '@thanhpv102/easy-email-core';\n\nimport { BlockMaskWrapper } from '@extensions/ShortcutToolbar/components/BlockMaskWrapper';\n\nconst spacerList = [10, 15, 20, 30, 50, 60, 100];\n\nexport function SpacerBlockItem() {\n return (\n <Stack.Item fill>\n <Stack vertical>\n {spacerList.map((item, index) => {\n return (\n <BlockMaskWrapper\n key={index}\n type={AdvancedType.SPACER}\n payload={\n {\n attributes: {\n height: item + 'px',\n },\n } as RecursivePartial<ISpacer>\n }\n >\n <Stack alignment='center'>\n <Stack.Item fill>\n\n <div\n style={{\n marginBottom: 20,\n backgroundColor: '#efeeea',\n position: 'relative',\n height: item,\n boxShadow: ' 3px 3px 3px rgb(0 0 0 / 0.2)',\n }}\n />\n\n </Stack.Item>\n <TextStyle>{item} px</TextStyle>\n </Stack>\n </BlockMaskWrapper>\n );\n })}\n </Stack>\n </Stack.Item>\n );\n}\n","import React from 'react';\nimport { Stack, TextStyle } from '@thanhpv102/easy-email-editor';\nimport { AdvancedType, IDivider, RecursivePartial } from '@thanhpv102/easy-email-core';\nimport { BlockMaskWrapper } from '@extensions/ShortcutToolbar/components/BlockMaskWrapper';\n\nconst dividerList = [\n {\n 'border-width': '2px',\n 'border-style': 'solid',\n 'border-color': 'lightgrey',\n },\n {\n 'border-width': '2px',\n 'border-style': 'dashed',\n 'border-color': 'lightgrey',\n },\n {\n 'border-width': '2px',\n 'border-style': 'dotted',\n 'border-color': 'lightgrey',\n },\n];\n\nexport function DividerBlockItem() {\n return (\n <Stack.Item fill>\n <Stack vertical>\n <Stack.Item />\n <Stack.Item />\n {dividerList.map((item, index) => {\n return (\n <BlockMaskWrapper\n key={index}\n type={AdvancedType.DIVIDER}\n payload={\n {\n attributes: { ...item, padding: '10px 0px' },\n } as RecursivePartial<IDivider>\n }\n >\n <Stack alignment='center'>\n <Stack.Item fill>\n\n <div\n style={{\n backgroundColor: '#fff',\n padding: '10px 0px 10px 0px',\n }}\n >\n <div\n style={{\n borderTopWidth: item['border-width'],\n borderTopStyle: item['border-style'] as any,\n borderTopColor: item['border-color'],\n\n boxSizing: 'content-box',\n }}\n />\n </div>\n\n </Stack.Item>\n <TextStyle>{item['border-style']}</TextStyle>\n </Stack>\n </BlockMaskWrapper>\n );\n })}\n </Stack>\n </Stack.Item>\n );\n}\n","import React from 'react';\nimport { AdvancedType } from '@thanhpv102/easy-email-core';\nimport { Stack } from '@thanhpv102/easy-email-editor';\n\nimport { BlockMaskWrapper } from '@extensions/ShortcutToolbar/components/BlockMaskWrapper';\nimport { getImg } from '@extensions/ShortcutToolbar/utils/getImg';\nimport { Picture } from '@extensions/ShortcutToolbar/components/Picture';\n\nexport function HeroBlockItem() {\n return (\n <Stack.Item fill>\n <Stack vertical>\n {heroList.map((item, index) => {\n return (\n <BlockMaskWrapper\n key={index}\n type={AdvancedType.HERO}\n payload={item.payload}\n >\n <div style={{ position: 'relative' }}>\n <Picture src={item.thumbnail} style={{ minWidth: 250, minHeight: 100 }} />\n <div\n style={{\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n zIndex: 2,\n }}\n />\n </div>\n </BlockMaskWrapper>\n );\n })}\n </Stack>\n </Stack.Item>\n );\n}\n\nconst heroList = [\n {\n thumbnail: getImg('IMAGE_30'),\n payload: {\n type: AdvancedType.HERO,\n data: {\n value: {},\n },\n attributes: {\n 'background-color': '#ffffff',\n 'background-position': 'center center',\n mode: 'fluid-height',\n padding: '100px 0px 100px 0px',\n 'vertical-align': 'top',\n 'background-url': getImg('IMAGE_31'),\n },\n children: [\n {\n type: 'text',\n data: {\n value: {\n content: 'We Serve Healthy & Delicious Foods',\n },\n },\n attributes: {\n 'font-size': '45px',\n padding: '10px 25px 10px 25px',\n 'line-height': '45px',\n align: 'center',\n color: '#ffffff',\n },\n children: [],\n },\n {\n type: 'text',\n data: {\n value: {\n content:\n 'A small river named Duden flows by their place and supplies it with the necessary regelialia. It is a paradisematic country, in which roasted parts of sentences fly into your mouth.<br>',\n },\n },\n attributes: {\n 'font-size': '14px',\n padding: '10px 25px 10px 25px',\n 'line-height': '1.5',\n align: 'center',\n color: '#ffffff',\n },\n children: [],\n },\n {\n type: 'button',\n data: {\n value: {\n content: 'Get Your Order Here!',\n },\n },\n attributes: {\n align: 'center',\n 'background-color': '#f3a333',\n color: '#ffffff',\n 'font-size': '13px',\n 'font-weight': 'normal',\n 'border-radius': '30px',\n padding: '10px 25px 10px 25px',\n 'inner-padding': '10px 25px 10px 25px',\n 'line-height': '120%',\n target: '_blank',\n 'vertical-align': 'middle',\n border: 'none',\n 'text-align': 'center',\n href: '#',\n },\n children: [],\n },\n ],\n },\n },\n {\n thumbnail: getImg('IMAGE_32'),\n payload: {\n type: AdvancedType.HERO,\n data: {\n value: {\n content:\n 'WINTER\\n \\n \\n WINTER IS COMING\\n \\n\\n\\n \\n A small river named Duden flows by their place and supplies it with the necessary regelialia.\\n \\n\\n \\n Read more',\n },\n },\n attributes: {\n 'background-color': '#ffffff',\n 'background-position': 'center center',\n mode: 'fluid-height',\n padding: '0px 0px 100px 0px',\n 'vertical-align': 'top',\n 'background-url': getImg('IMAGE_33'),\n 'padding-bottom': '100px',\n },\n children: [\n {\n type: 'button',\n data: {\n value: {\n content: 'WINTER',\n },\n },\n attributes: {\n 'font-size': '24px',\n padding: '10px 25px 10px 25px',\n 'line-height': '45px',\n align: 'center',\n color: '#ffffff',\n border: '2px solid #ffffff',\n 'font-weight': '500',\n 'background-color': 'transparent',\n 'inner-padding': '10px 15px 4px 15px',\n 'font-family': '\\'Josefin Sans\\', sans-serif',\n 'border-radius': '0px',\n },\n children: [],\n },\n {\n type: 'text',\n data: {\n value: {\n content: '\\n WINTER IS COMING\\n ',\n },\n },\n attributes: {\n align: 'center',\n 'background-color': '#414141',\n color: '#ffffff',\n 'font-size': '30px',\n 'font-weight': 'normal',\n 'border-radius': '3px',\n padding: '10px 25px 10px 25px',\n 'inner-padding': '10px 25px 10px 25px',\n 'line-height': '54px',\n target: '_blank',\n 'vertical-align': 'middle',\n border: 'none',\n 'text-align': 'center',\n href: '#',\n },\n children: [],\n },\n {\n type: 'text',\n attributes: {\n 'font-size': '16px',\n padding: '10px 25px 10px 25px',\n 'line-height': '1.5',\n align: 'center',\n color: '#ffffff',\n },\n data: {\n value: {\n content:\n '\\n A small river named Duden flows by their place and supplies it with the necessary regelialia.\\n ',\n },\n },\n children: [],\n },\n {\n type: 'button',\n attributes: {\n 'border-radius': '30px',\n 'font-weight': '500',\n 'background-color': '#448ef6',\n padding: '30px 25px 10px 25px',\n },\n data: {\n value: {\n content: 'Read more',\n },\n },\n children: [],\n },\n ],\n },\n },\n {\n thumbnail: getImg('IMAGE_34'),\n payload: {\n type: AdvancedType.HERO,\n data: {\n value: {\n content:\n 'WINTER\\n \\n \\n WINTER IS COMING\\n \\n\\n\\n \\n A small river named Duden flows by their place and supplies it with the necessary regelialia.\\n \\n\\n \\n Read more',\n },\n },\n attributes: {\n 'background-color': '#ffffff',\n 'background-position': 'center center',\n mode: 'fluid-height',\n padding: '0px 0px 100px 0px',\n 'vertical-align': 'top',\n 'background-url': getImg('IMAGE_35'),\n 'padding-bottom': '100px',\n },\n children: [\n {\n type: 'text',\n data: {\n value: {\n content: 'Up to 50% off Selected<div> Womens Items</div>',\n },\n },\n attributes: {\n align: 'center',\n 'background-color': '#414141',\n color: '#ffffff',\n 'font-size': '30px',\n 'font-weight': 'normal',\n 'border-radius': '3px',\n padding: '80px 25px 10px 25px',\n 'inner-padding': '10px 25px 10px 25px',\n 'line-height': '1.4',\n target: '_blank',\n 'vertical-align': 'middle',\n border: 'none',\n 'text-align': 'center',\n href: '#',\n 'font-family': '\"Playfair Display\", sans-serif',\n },\n children: [],\n },\n {\n type: 'text',\n attributes: {\n 'font-size': '16px',\n padding: '10px 25px 10px 25px',\n 'line-height': '1.5',\n align: 'center',\n color: '#ffffff',\n },\n data: {\n value: {\n content:\n 'A small river named Duden flows by their place and supplies it with the necessary regelialia.',\n },\n },\n children: [],\n },\n {\n type: 'button',\n attributes: {\n 'border-radius': '5px',\n 'font-weight': '500',\n 'background-color': '#ffc0d0',\n padding: '30px 25px 10px 25px',\n },\n data: {\n value: {\n content: 'Start Shoping',\n },\n },\n children: [],\n },\n ],\n },\n },\n {\n thumbnail: getImg('IMAGE_36'),\n payload: {\n type: AdvancedType.HERO,\n attributes: {\n 'background-color': '#ffffff',\n 'background-position': 'center center',\n mode: 'fluid-height',\n padding: '100px 0px 100px 0px',\n 'vertical-align': 'top',\n 'background-url': getImg('IMAGE_38'),\n },\n data: {\n value: {\n content:\n 'We We Create Modern Website\\n \\n \\n\\n \\n A small river named Duden flows by their place and supplies it with the necessary regelialia. It is a paradisematic country, in which roasted parts of sentences fly into your mouth.',\n },\n },\n children: [\n {\n type: 'text',\n attributes: {\n 'font-size': '30px',\n padding: '10px 25px 10px 25px',\n 'line-height': '54px',\n align: 'center',\n color: '#ffffff',\n },\n data: {\n value: {\n content: 'We We Create Modern Website',\n },\n },\n children: [],\n },\n {\n type: 'text',\n attributes: {\n 'font-size': '16px',\n padding: '10px 25px 10px 25px',\n 'line-height': '1.5',\n align: 'center',\n color: '#ffffff',\n },\n data: {\n value: {\n content:\n 'A small river named Duden flows by their place and supplies it with the necessary regelialia. It is a paradisematic country, in which roasted parts of sentences fly into your mouth.',\n },\n },\n children: [],\n },\n {\n type: 'image',\n attributes: {\n width: '60px',\n 'padding-top': '30px',\n src: getImg('IMAGE_37'),\n target: '_blank',\n href: 'https://github.com/thanhpv-102/easy-email-editor/blob/master/demo/public/',\n },\n data: {\n value: {\n content: '',\n },\n },\n children: [],\n },\n ],\n },\n },\n];\n","import React from 'react';\nimport { Stack } from '@thanhpv102/easy-email-editor';\nimport { AdvancedType, IButton, RecursivePartial } from '@thanhpv102/easy-email-core';\nimport { BlockMaskWrapper } from '@extensions/ShortcutToolbar/components/BlockMaskWrapper';\nimport { getImg } from '@extensions/ShortcutToolbar/utils/getImg';\nimport { Picture } from '@extensions/ShortcutToolbar/components/Picture';\n\nconst buttonList = [\n {\n thumbnail: getImg('IMAGE_11'),\n payload: {\n attributes: {\n align: 'center',\n 'background-color': '#8ccaca',\n color: '#ffffff',\n 'font-size': '12px',\n 'font-weight': 'normal',\n 'border-radius': '0px',\n padding: '10px 25px 10px 25px',\n 'inner-padding': '10px 25px 10px 25px',\n 'line-height': '120%',\n target: '_blank',\n 'vertical-align': 'middle',\n border: 'none',\n 'text-align': 'center',\n href: '#',\n },\n data: {\n value: {\n content: 'READ MORE',\n },\n },\n },\n },\n {\n thumbnail: getImg('IMAGE_12'),\n payload: {\n attributes: {\n align: 'center',\n 'background-color': 'transparent',\n color: '#000000',\n 'font-size': '12px',\n 'font-weight': 'normal',\n 'border-radius': '0px',\n padding: '10px 25px 10px 25px',\n 'inner-padding': '10px 25px 10px 25px',\n 'line-height': '120%',\n target: '_blank',\n 'vertical-align': 'middle',\n border: '2px solid #000',\n 'text-align': 'center',\n href: '#',\n },\n data: {\n value: {\n content: 'READ MORE',\n },\n },\n children: [],\n },\n },\n {\n thumbnail: getImg('IMAGE_13'),\n payload: {\n attributes: {\n align: 'center',\n 'background-color': 'transparent',\n color: '#ffffff',\n 'font-size': '12px',\n 'font-weight': 'normal',\n 'border-radius': '0px',\n padding: '10px 25px 10px 25px',\n 'inner-padding': '10px 25px 10px 25px',\n 'line-height': '120%',\n target: '_blank',\n 'vertical-align': 'middle',\n border: '2px dashed #ffffff',\n 'text-align': 'center',\n href: '#',\n 'container-background-color': '#97c0f0',\n },\n data: {\n value: {\n content: 'Let\\'s Go',\n },\n },\n children: [],\n },\n },\n];\n\nexport function ButtonBlockItem() {\n return (\n <Stack.Item fill>\n <Stack vertical>\n {buttonList.map((item, index) => {\n return (\n <Stack key={index} alignment='center'>\n <Stack.Item fill>\n <BlockMaskWrapper\n type={AdvancedType.BUTTON}\n payload={\n {\n ...item.payload,\n } as RecursivePartial<IButton>\n }\n >\n <div style={{ position: 'relative', overflow: 'hidden' }}>\n <Picture src={item.thumbnail} style={{ minWidth: 250, minHeight: 50 }} />\n <div\n style={{\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n zIndex: 2,\n }}\n />\n </div>\n </BlockMaskWrapper>\n </Stack.Item>\n </Stack>\n );\n })}\n </Stack>\n </Stack.Item>\n );\n}\n","import React from 'react';\nimport { AdvancedType } from '@thanhpv102/easy-email-core';\nimport { Stack } from '@thanhpv102/easy-email-editor';\nimport { BlockMaskWrapper } from '@extensions/ShortcutToolbar/components/BlockMaskWrapper';\nimport { getImg } from '@extensions/ShortcutToolbar/utils/getImg';\nimport { Picture } from '@extensions/ShortcutToolbar/components/Picture';\n\nconst list = [\n {\n thumbnail: getImg('IMAGE_08'),\n payload: {\n type: AdvancedType.ACCORDION,\n data: {\n value: {},\n },\n attributes: {\n 'icon-height': '32px',\n 'icon-width': '32px',\n 'icon-align': 'middle',\n 'icon-position': 'right',\n 'icon-unwrapped-url': getImg('IMAGE_09'),\n 'icon-wrapped-url': getImg('IMAGE_10'),\n padding: '10px 25px 10px 25px',\n border: '1px solid #d9d9d9',\n },\n children: [\n {\n type: 'accordion-element',\n data: {\n value: {},\n },\n attributes: {\n 'icon-align': 'middle',\n 'icon-height': '32px',\n 'icon-width': '32px',\n 'icon-position': 'right',\n padding: '10px 25px 10px 25px',\n },\n children: [\n {\n type: 'accordion-title',\n data: {\n value: {\n content: 'Why use an accordion?',\n },\n },\n attributes: {\n 'font-size': '13px',\n padding: '16px 16px 16px 16px',\n },\n children: [],\n },\n {\n type: 'accordion-text',\n data: {\n value: {\n content:\n '<span style=\"line-height:20px\">\\n Because emails with a lot of content are most of the time a very bad experience on mobile, mj-accordion comes handy when you want to deliver a lot of information in a concise way.\\n </span>',\n },\n },\n attributes: {\n 'font-size': '13px',\n padding: '16px 16px 16px 16px',\n 'line-height': '1',\n },\n children: [],\n },\n ],\n },\n {\n type: 'accordion-element',\n data: {\n value: {},\n },\n attributes: {\n 'icon-align': 'middle',\n 'icon-height': '32px',\n 'icon-width': '32px',\n 'icon-position': 'right',\n padding: '10px 25px 10px 25px',\n },\n children: [\n {\n type: 'accordion-title',\n data: {\n value: {\n content: 'How it works',\n },\n },\n attributes: {\n 'font-size': '13px',\n padding: '16px 16px 16px 16px',\n },\n children: [],\n },\n {\n type: 'accordion-text',\n data: {\n value: {\n content:\n '<span style=\"line-height:20px\">\\n Content is stacked into tabs and users can expand them at will. If responsive styles are not supported (mostly on desktop clients), tabs are then expanded and your content is readable at once.\\n </span>',\n },\n },\n attributes: {\n 'font-size': '13px',\n padding: '16px 16px 16px 16px',\n 'line-height': '1',\n },\n children: [],\n },\n ],\n },\n ],\n },\n },\n];\n\nexport function AccordionBlockItem() {\n return (\n <Stack.Item fill>\n <Stack vertical>\n {list.map((item, index) => {\n return (\n <BlockMaskWrapper\n key={index}\n type={AdvancedType.ACCORDION}\n payload={item.payload}\n >\n <div style={{ position: 'relative' }}>\n <Picture src={item.thumbnail} style={{ minWidth: 250, minHeight: 100 }} />\n <div\n style={{\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n zIndex: 2,\n }}\n />\n </div>\n </BlockMaskWrapper>\n );\n })}\n </Stack>\n </Stack.Item>\n );\n}\n","import React from 'react';\nimport { AdvancedType } from '@thanhpv102/easy-email-core';\nimport { Stack } from '@thanhpv102/easy-email-editor';\n\nimport { BlockMaskWrapper } from '@extensions/ShortcutToolbar/components/BlockMaskWrapper';\nimport { getImg } from '@extensions/ShortcutToolbar/utils/getImg';\nimport { Picture } from '@extensions/ShortcutToolbar/components/Picture';\n\nconst list = [\n {\n thumbnail: getImg('IMAGE_14'),\n payload: {\n type: AdvancedType.CAROUSEL,\n data: {\n value: {\n images: [\n {\n src: getImg('IMAGE_15'),\n target: '_blank',\n },\n {\n src: getImg('IMAGE_16'),\n target: '_blank',\n },\n {\n src: getImg('IMAGE_17'),\n target: '_blank',\n },\n ],\n },\n },\n attributes: {\n align: 'center',\n 'left-icon': getImg('IMAGE_18'),\n 'right-icon': getImg('IMAGE_19'),\n 'icon-width': '44px',\n thumbnails: 'visible',\n },\n children: [],\n },\n },\n];\n\nexport function CarouselBlockItem() {\n return (\n <Stack.Item fill>\n <Stack vertical>\n {list.map((item, index) => {\n return (\n <BlockMaskWrapper\n key={index}\n type={AdvancedType.CAROUSEL}\n payload={item.payload}\n >\n <div style={{ position: 'relative' }}>\n <Picture src={item.thumbnail} style={{ minWidth: 250, minHeight: 100 }} />\n <div\n style={{\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n zIndex: 2,\n }}\n />\n </div>\n </BlockMaskWrapper>\n );\n })}\n </Stack>\n </Stack.Item>\n );\n}\n","import React from 'react';\nimport { AdvancedType } from '@thanhpv102/easy-email-core';\nimport { Stack } from '@thanhpv102/easy-email-editor';\nimport { BlockMaskWrapper } from '@extensions/ShortcutToolbar/components/BlockMaskWrapper';\nimport { getImg } from '@extensions/ShortcutToolbar/utils/getImg';\nimport { Picture } from '@extensions/ShortcutToolbar/components/Picture';\n\nconst list = [\n {\n thumbnail: getImg('IMAGE_46'),\n payload: {\n type: AdvancedType.NAVBAR,\n data: {\n value: {\n links: [\n {\n href: '/gettings-started-onboard',\n content: 'HOME',\n color: '#000000',\n 'font-size': '13px',\n target: '_blank',\n padding: '15px 10px 15px 10px',\n },\n {\n href: '/try-it-live',\n content: 'NEW',\n color: '#000000',\n 'font-size': '13px',\n target: '_blank',\n padding: '15px 10px 15px 10px',\n },\n {\n href: '/templates',\n content: 'WOMEN',\n color: '#000000',\n 'font-size': '13px',\n target: '_blank',\n padding: '15px 10px 15px 10px',\n },\n {\n href: '/components',\n content: 'KIDS',\n color: '#000000',\n 'font-size': '13px',\n target: '_blank',\n padding: '15px 10px 15px 10px',\n },\n {\n href: '/components',\n content: 'BLOG',\n color: '#000000',\n 'font-size': '13px',\n target: '_blank',\n padding: '15px 10px 15px 10px',\n },\n ],\n },\n },\n attributes: {\n align: 'center',\n 'base-url': 'https://mjml.io',\n },\n children: [],\n },\n },\n];\n\nexport function NavbarBlockItem() {\n return (\n <Stack.Item fill>\n <Stack vertical>\n {list.map((item, index) => {\n return (\n <BlockMaskWrapper\n key={index}\n type={AdvancedType.NAVBAR}\n payload={item.payload}\n >\n <div style={{ position: 'relative' }}>\n <Picture src={item.thumbnail} style={{ minWidth: 250, minHeight: 50 }} />\n <div\n style={{\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n zIndex: 2,\n }}\n />\n </div>\n </BlockMaskWrapper>\n );\n })}\n </Stack>\n </Stack.Item>\n );\n}\n","import React from 'react';\nimport { AdvancedType } from '@thanhpv102/easy-email-core';\nimport { Stack } from '@thanhpv102/easy-email-editor';\n\nimport { BlockMaskWrapper } from '@extensions/ShortcutToolbar/components/BlockMaskWrapper';\nimport { getImg } from '@extensions/ShortcutToolbar/utils/getImg';\nimport { Picture } from '@extensions/ShortcutToolbar/components/Picture';\n\nconst list = [\n {\n thumbnail: getImg('IMAGE_52'),\n payload: {\n type: AdvancedType.SOCIAL,\n data: {\n value: {\n elements: [\n {\n href: '#',\n 'icon-size': '20px',\n target: '_blank',\n src: getImg('IMAGE_53'),\n content: 'Facebook',\n },\n {\n href: '#',\n 'icon-size': '20px',\n target: '_blank',\n src: getImg('IMAGE_54'),\n content: 'Google',\n },\n {\n href: '',\n 'icon-size': '20px',\n target: '_blank',\n src: getImg('IMAGE_55'),\n content: 'Twitter',\n },\n ],\n },\n },\n attributes: {\n align: 'center',\n color: '#333333',\n mode: 'horizontal',\n 'font-size': '13px',\n 'font-weight': 'normal',\n 'border-radius': '3px',\n padding: '10px 25px 10px 25px',\n 'inner-padding': '4px 4px 4px 4px',\n 'line-height': '22px',\n 'text-padding': '4px 4px 4px 0px',\n 'icon-padding': '0px',\n 'icon-size': '20px',\n },\n children: [],\n },\n },\n {\n thumbnail: getImg('IMAGE_71'),\n payload: {\n type: AdvancedType.SOCIAL,\n data: {\n value: {\n elements: [\n {\n href: '#',\n 'icon-size': '20px',\n target: '_blank',\n src: getImg('IMAGE_53'),\n content: '',\n },\n {\n href: '#',\n 'icon-size': '20px',\n target: '_blank',\n src: getImg('IMAGE_54'),\n content: '',\n },\n {\n href: '',\n 'icon-size': '20px',\n target: '_blank',\n src: getImg('IMAGE_55'),\n content: '',\n },\n ],\n },\n },\n attributes: {\n align: 'center',\n color: '#333333',\n mode: 'horizontal',\n 'font-size': '13px',\n 'font-weight': 'normal',\n 'border-radius': '3px',\n padding: '10px 25px 10px 25px',\n 'inner-padding': '4px 4px 4px 4px',\n 'line-height': '22px',\n 'text-padding': '4px 4px 4px 0px',\n 'icon-padding': '0px',\n 'icon-size': '20px',\n },\n children: [],\n },\n },\n];\n\nexport function SocialBlockItem() {\n return (\n <Stack.Item fill>\n <Stack vertical>\n {list.map((item, index) => {\n return (\n <BlockMaskWrapper\n key={index}\n type={AdvancedType.SOCIAL}\n payload={item.payload}\n >\n <div style={{ position: 'relative' }}>\n <Picture src={item.thumbnail} style={{ minWidth: 250, minHeight: 30 }} />\n <div\n style={{\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n zIndex: 2,\n }}\n />\n </div>\n </BlockMaskWrapper>\n );\n })}\n </Stack>\n </Stack.Item>\n );\n}\n","import React from 'react';\nimport { AdvancedType, BasicType } from '@thanhpv102/easy-email-core';\nimport { Stack } from '@thanhpv102/easy-email-editor';\n\nimport { BlockMaskWrapper } from '@extensions/ShortcutToolbar/components/BlockMaskWrapper';\nimport { getImg } from '@extensions/ShortcutToolbar/utils/getImg';\nimport { Picture } from '@extensions/ShortcutToolbar/components/Picture';\n\nexport function WrapperBlockItem() {\n return (\n <Stack.Item fill>\n <Stack vertical>\n {list.map((item, index) => {\n return (\n <BlockMaskWrapper\n key={index}\n type={AdvancedType.WRAPPER}\n payload={item.payload}\n >\n <div style={{ position: 'relative' }}>\n <Picture src={item.thumbnail} style={{ minWidth: 250, minHeight: 80 }} />\n <div\n style={{\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n zIndex: 2,\n }}\n />\n </div>\n </BlockMaskWrapper>\n );\n })}\n </Stack>\n </Stack.Item>\n );\n}\n\nconst list = [\n {\n thumbnail: getImg('IMAGE_56'),\n payload: {},\n },\n {\n thumbnail: getImg('IMAGE_57'),\n payload: {\n type: 'advanced_section',\n data: {\n value: {},\n },\n attributes: {\n padding: '50px 30px',\n border: '1px solid #aaaaaa',\n direction: 'ltr',\n 'text-align': 'center',\n 'background-color': '#ffffff',\n },\n children: [\n {\n type: BasicType.GROUP,\n data: {\n value: {\n noWrap: false,\n },\n },\n attributes: {\n padding: '20px',\n 'background-repeat': 'repeat',\n 'background-size': 'auto',\n 'background-position': 'top center',\n border: 'none',\n direction: 'ltr',\n 'text-align': 'center',\n 'border-top': '1px solid #aaaaaa',\n 'border-left': '1px solid #aaaaaa',\n 'border-right': '1px solid #aaaaaa',\n },\n children: [\n {\n type: 'advanced_column',\n data: {\n value: {},\n },\n attributes: {\n padding: '0px 0px 0px 0px',\n border: 'none',\n 'vertical-align': 'top',\n },\n children: [\n {\n type: 'image',\n data: {\n value: {},\n },\n attributes: {\n align: 'center',\n height: 'auto',\n padding: '0',\n src: getImg('IMAGE_58'),\n },\n children: [],\n },\n ],\n },\n ],\n },\n {\n type: 'advanced_section',\n data: {\n value: {\n noWrap: false,\n },\n },\n attributes: {\n padding: '20px',\n 'background-repeat': 'repeat',\n 'background-size': 'auto',\n 'background-position': 'top center',\n border: 'none',\n direction: 'ltr',\n 'text-align': 'center',\n 'border-left': '1px solid #aaaaaa',\n 'border-right': '1px solid #aaaaaa',\n 'border-bottom': '1px solid #aaaaaa',\n },\n children: [\n {\n type: 'advanced_column',\n data: {\n value: {},\n },\n attributes: {\n padding: '0px 0px 0px 0px',\n border: '1px solid #dddddd',\n 'vertical-align': 'top',\n },\n children: [\n {\n type: 'text',\n data: {\n value: {\n content: 'First line of text',\n },\n },\n attributes: {\n 'font-size': '13px',\n padding: '20px',\n 'line-height': 1,\n align: 'left',\n },\n children: [],\n },\n {\n type: 'divider',\n data: {\n value: {},\n },\n attributes: {\n align: 'center',\n 'border-width': '1px',\n 'border-style': 'dashed',\n 'border-color': 'lightgrey',\n padding: '0 20px',\n },\n children: [],\n },\n {\n type: 'text',\n data: {\n value: {\n content: 'Second line of text',\n },\n },\n attributes: {\n 'font-size': '13px',\n padding: '20px',\n 'line-height': 1,\n align: 'left',\n },\n children: [],\n },\n ],\n },\n ],\n },\n ],\n },\n },\n];\n","import React from 'react';\nimport { AdvancedType } from '@thanhpv102/easy-email-core';\nimport { Stack } from '@thanhpv102/easy-email-editor';\n\nimport { BlockMaskWrapper } from '@extensions/ShortcutToolbar/components/BlockMaskWrapper';\nimport { getImg } from '@extensions/ShortcutToolbar/utils/getImg';\nimport { Picture } from '@extensions/ShortcutToolbar/components/Picture';\n\nexport function SectionBlockItem() {\n return (\n <Stack.Item fill>\n <Stack vertical>\n {list.map((item, index) => {\n return (\n <BlockMaskWrapper\n key={index}\n type={AdvancedType.SECTION}\n payload={item.payload}\n >\n <div style={{ position: 'relative' }}>\n <Picture src={item.thumbnail} style={{ minWidth: 250, minHeight: 70 }} />\n <div\n style={{\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n zIndex: 2,\n }}\n />\n </div>\n </BlockMaskWrapper>\n );\n })}\n </Stack>\n </Stack.Item>\n );\n}\n\nconst list = [\n {\n thumbnail: getImg('IMAGE_47'),\n payload: {},\n },\n {\n thumbnail: getImg('IMAGE_48'),\n payload: {\n type: 'advanced_section',\n data: {\n value: {\n noWrap: false,\n },\n },\n attributes: {\n padding: '20px 0px 20px 0px',\n 'background-repeat': 'repeat',\n 'background-size': 'auto',\n 'background-position': 'top center',\n border: 'none',\n direction: 'ltr',\n 'text-align': 'center',\n },\n children: [\n {\n type: 'advanced_column',\n data: {\n value: {},\n },\n attributes: {\n padding: '0px 0px 0px 0px',\n border: 'none',\n 'vertical-align': 'top',\n },\n children: [],\n },\n ],\n },\n },\n {\n thumbnail: getImg('IMAGE_49'),\n payload: {\n type: 'advanced_section',\n data: {\n value: {\n noWrap: true,\n },\n },\n attributes: {\n padding: '20px 0px 20px 0px',\n 'background-repeat': 'repeat',\n 'background-size': 'auto',\n 'background-position': 'top center',\n border: 'none',\n direction: 'ltr',\n 'text-align': 'center',\n },\n children: [\n {\n type: 'group',\n data: {\n value: {},\n },\n attributes: {\n 'vertical-align': 'top',\n direction: 'ltr',\n },\n children: [\n {\n type: 'advanced_column',\n data: {\n value: {},\n },\n attributes: {\n padding: '0px 0px 0px 0px',\n border: 'none',\n 'vertical-align': 'top',\n },\n children: [],\n },\n {\n type: 'advanced_column',\n data: {\n value: {},\n },\n attributes: {\n padding: '0px 0px 0px 0px',\n border: 'none',\n 'vertical-align': 'top',\n },\n children: [],\n },\n ],\n },\n ],\n\n },\n },\n {\n thumbnail: getImg('IMAGE_50'),\n payload: {\n type: 'advanced_section',\n data: {\n value: {\n noWrap: true,\n },\n },\n attributes: {\n padding: '20px 0px 20px 0px',\n 'background-repeat': 'repeat',\n 'background-size': 'auto',\n 'background-position': 'top center',\n border: 'none',\n direction: 'ltr',\n 'text-align': 'center',\n },\n children: [\n {\n type: 'group',\n data: {\n value: {},\n },\n attributes: {\n 'vertical-align': 'top',\n direction: 'ltr',\n },\n children: [\n {\n type: 'advanced_column',\n data: {\n value: {},\n },\n attributes: {\n padding: '0px 0px 0px 0px',\n border: 'none',\n 'vertical-align': 'top',\n },\n children: [],\n },\n {\n type: 'advanced_column',\n data: {\n value: {},\n },\n attributes: {\n padding: '0px 0px 0px 0px',\n border: 'none',\n 'vertical-align': 'top',\n },\n children: [],\n },\n {\n type: 'advanced_column',\n data: {\n value: {},\n },\n attributes: {\n padding: '0px 0px 0px 0px',\n border: 'none',\n 'vertical-align': 'top',\n },\n children: [],\n },\n ],\n },\n ],\n },\n },\n {\n thumbnail: getImg('IMAGE_51'),\n payload: {\n type: 'advanced_section',\n data: {\n value: {\n noWrap: true,\n },\n },\n attributes: {\n padding: '20px 0px 20px 0px',\n 'background-repeat': 'repeat',\n 'background-size': 'auto',\n 'background-position': 'top center',\n border: 'none',\n direction: 'ltr',\n 'text-align': 'center',\n },\n children: [\n {\n type: 'group',\n data: {\n value: {},\n },\n attributes: {\n 'vertical-align': 'top',\n direction: 'ltr',\n },\n children: [\n {\n type: 'advanced_column',\n data: {\n value: {},\n },\n attributes: {\n padding: '0px 0px 0px 0px',\n border: 'none',\n 'vertical-align': 'top',\n },\n children: [],\n },\n {\n type: 'advanced_column',\n data: {\n value: {},\n },\n attributes: {\n padding: '0px 0px 0px 0px',\n border: 'none',\n 'vertical-align': 'top',\n },\n children: [],\n },\n {\n type: 'advanced_column',\n data: {\n value: {},\n },\n attributes: {\n padding: '0px 0px 0px 0px',\n border: 'none',\n 'vertical-align': 'top',\n },\n children: [],\n },\n {\n type: 'advanced_column',\n data: {\n value: {},\n },\n attributes: {\n padding: '0px 0px 0px 0px',\n border: 'none',\n 'vertical-align': 'top',\n },\n children: [],\n },\n ],\n },\n ],\n },\n },\n];\n","import React from 'react';\nimport { AdvancedType } from '@thanhpv102/easy-email-core';\nimport { Stack } from '@thanhpv102/easy-email-editor';\n\nimport { BlockMaskWrapper } from '@extensions/ShortcutToolbar/components/BlockMaskWrapper';\nimport { getImg } from '@extensions/ShortcutToolbar/utils/getImg';\nimport { Picture } from '@extensions/ShortcutToolbar/components/Picture';\n\nexport function GroupBlockItem() {\n return (\n <Stack.Item fill>\n <Stack vertical>\n {list.map((item, index) => {\n return (\n <BlockMaskWrapper\n key={index}\n type={AdvancedType.GROUP}\n payload={item.payload}\n >\n <div style={{ position: 'relative' }}>\n <Picture src={item.thumbnail} style={{ minWidth: 250, minHeight: 70 }} />\n <div\n style={{\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n zIndex: 2,\n }}\n />\n </div>\n </BlockMaskWrapper>\n );\n })}\n </Stack>\n </Stack.Item>\n );\n}\n\nconst list = [\n {\n thumbnail: getImg('IMAGE_22'),\n payload: {\n type: 'advanced_section',\n data: {\n value: {\n noWrap: false,\n },\n },\n attributes: {\n 'vertical-align': 'top',\n direction: 'ltr',\n },\n },\n },\n {\n thumbnail: getImg('IMAGE_23'),\n payload: {\n type: 'advanced_section',\n data: {\n value: {\n noWrap: true,\n },\n },\n attributes: {\n 'vertical-align': 'top',\n direction: 'ltr',\n },\n children: [\n {\n type: 'group',\n data: {\n value: {},\n },\n attributes: {\n 'vertical-align': 'top',\n direction: 'ltr',\n },\n children: [\n {\n type: 'advanced_column',\n data: {\n value: {},\n },\n attributes: {\n padding: '0px 0px 0px 0px',\n border: 'none',\n 'vertical-align': 'top',\n },\n children: [\n {\n type: 'image',\n data: {\n value: {},\n },\n attributes: {\n align: 'center',\n height: 'auto',\n padding: '0px 5px 0px 10px',\n src: getImg('IMAGE_24'),\n width: '',\n },\n children: [],\n },\n ],\n },\n {\n type: 'advanced_column',\n data: {\n value: {},\n },\n attributes: {\n padding: '0px 0px 0px 0px',\n border: 'none',\n 'vertical-align': 'top',\n },\n children: [\n {\n type: 'image',\n data: {\n value: {},\n },\n attributes: {\n align: 'center',\n height: 'auto',\n padding: '0px 10px 0px 5px',\n src: getImg('IMAGE_25'),\n width: '',\n },\n children: [],\n },\n ],\n },\n ],\n },\n ],\n },\n },\n {\n thumbnail: getImg('IMAGE_26'),\n payload: {\n type: 'advanced_section',\n data: {\n value: {\n noWrap: true,\n },\n },\n attributes: {\n 'vertical-align': 'top',\n direction: 'ltr',\n 'background-color': '#ffffff',\n },\n children: [\n {\n type: 'group',\n data: {\n value: {},\n },\n attributes: {\n 'vertical-align': 'top',\n direction: 'ltr',\n },\n children: [\n {\n type: 'advanced_column',\n data: {\n value: {},\n },\n attributes: {\n padding: '0px 5px 0px 5px',\n border: 'none',\n 'vertical-align': 'top',\n },\n children: [\n {\n type: 'image',\n data: {\n value: {},\n },\n attributes: {\n align: 'center',\n height: 'auto',\n padding: '0px 0px 0px 0px',\n src: getImg('IMAGE_29'),\n width: '',\n },\n children: [],\n },\n {\n type: 'text',\n data: {\n value: {\n content: 'Office Room\\nPrinting',\n },\n },\n attributes: {\n 'font-size': '18px',\n padding: '10px 5px 10px 5px',\n 'line-height': 1,\n align: 'center',\n },\n children: [],\n },\n ],\n },\n {\n type: 'advanced_column',\n data: {\n value: {},\n },\n attributes: {\n padding: '0px 5px 0px 5px',\n border: 'none',\n 'vertical-align': 'top',\n },\n children: [\n {\n type: 'image',\n data: {\n value: {},\n },\n attributes: {\n align: 'center',\n height: 'auto',\n padding: '0px 0px 0px 0px',\n src: getImg('IMAGE_27'),\n width: '',\n },\n children: [],\n },\n {\n type: 'text',\n data: {\n value: {\n content: 'Workplace\\nDesign<div><br></div>',\n },\n },\n attributes: {\n 'font-size': '18px',\n padding: '10px 5px 10px 5px',\n 'line-height': 1,\n align: 'center',\n },\n children: [],\n },\n ],\n },\n {\n type: 'advanced_column',\n data: {\n value: {},\n },\n attributes: {\n padding: '0px 5px 0px 5px',\n border: 'none',\n 'vertical-align': 'top',\n },\n children: [\n {\n type: 'image',\n data: {\n value: {},\n },\n attributes: {\n align: 'center',\n height: 'auto',\n padding: '0px 0px 0px 0px',\n src: getImg('IMAGE_28'),\n width: '',\n },\n children: [],\n },\n {\n type: 'text',\n data: {\n value: {\n content: 'Modern Design\\nBranding',\n },\n },\n attributes: {\n 'font-size': '18px',\n padding: '10px 5px 10px 5px',\n 'line-height': 1,\n align: 'center',\n },\n children: [],\n },\n ],\n },\n ],\n },\n ],\n },\n },\n];\n","import React from 'react';\nimport { AdvancedType } from '@thanhpv102/easy-email-core';\nimport { Stack } from '@thanhpv102/easy-email-editor';\n\nimport { BlockMaskWrapper } from '@extensions/ShortcutToolbar/components/BlockMaskWrapper';\nimport { getImg } from '@extensions/ShortcutToolbar/utils/getImg';\nimport { Picture } from '@extensions/ShortcutToolbar/components/Picture';\n\nexport function ColumnBlockItem() {\n return (\n <Stack.Item fill>\n <Stack vertical>\n {list.map((item, index) => {\n return (\n <BlockMaskWrapper\n key={index}\n type={AdvancedType.COLUMN}\n payload={item.payload}\n >\n <div style={{ position: 'relative' }}>\n <Picture src={item.thumbnail} style={{ minWidth: 250, minHeight: 70 }} />\n <div\n style={{\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n zIndex: 2,\n }}\n />\n </div>\n </BlockMaskWrapper>\n );\n })}\n </Stack>\n </Stack.Item>\n );\n}\n\nconst list = [\n {\n thumbnail: getImg('IMAGE_20'),\n payload: {\n type: 'advanced_section',\n data: {\n value: {\n noWrap: false,\n },\n },\n attributes: {\n 'vertical-align': 'top',\n direction: 'ltr',\n },\n children: [\n {\n type: 'column',\n data: {\n value: {},\n },\n attributes: {\n padding: '20px 0px 20px 0px',\n border: 'none',\n 'vertical-align': 'top',\n 'background-color': '#ffffff',\n },\n children: [\n {\n type: 'image',\n data: {\n value: {},\n },\n attributes: {\n align: 'center',\n height: 'auto',\n padding: '0px 0px 0px 0px',\n src: getImg('IMAGE_21'),\n width: '150px',\n },\n children: [],\n },\n {\n type: 'text',\n data: {\n value: {\n content: 'Business Key to Success',\n },\n },\n attributes: {\n 'font-size': '20px',\n padding: '10px 0px 10px 0px',\n 'line-height': '1.7',\n align: 'center',\n 'font-family': '\"Nunito Sans\", sans-serif',\n },\n children: [],\n },\n {\n type: 'text',\n data: {\n value: {\n content: 'POSTED ON FEB 18, 2019 FOOD',\n },\n },\n attributes: {\n 'font-size': '15px',\n padding: '0px 0px 10px 0px',\n 'line-height': '1.7',\n align: 'center',\n color: '#9b9b9b',\n 'font-family': '\"Nunito Sans\", sans-serif',\n },\n children: [],\n },\n {\n type: 'text',\n data: {\n value: {\n content:\n 'Far far away, behind the word mountains, far from the countries',\n },\n },\n attributes: {\n 'font-size': '15px',\n padding: '0px 0px 0px 0px',\n 'line-height': '1.7',\n align: 'center',\n color: '#9b9b9b',\n 'font-family': '\"Nunito Sans\", sans-serif',\n },\n children: [],\n },\n ],\n },\n ],\n },\n },\n];\n","import React from 'react';\nimport { Stack } from '@thanhpv102/easy-email-editor';\nimport { AdvancedType } from '@thanhpv102/easy-email-core';\n\nimport { BlockMaskWrapper } from '@extensions/ShortcutToolbar/components/BlockMaskWrapper';\nimport { getImg } from '@extensions/ShortcutToolbar/utils/getImg';\nimport { Picture } from '@extensions/ShortcutToolbar/components/Picture';\n\nconst tableList = [\n {\n txtName: 'Table 3x3',\n thumbnail: getImg('IMAGE_72'),\n payload: {\n type: AdvancedType.TABLE,\n data: {\n value: {\n tableSource: [\n [{ content: 'header1' }, { content: 'header2' }, { content: 'header3' }],\n [{ content: 'body1-1' }, { content: 'body1-2' }, { content: 'body1-3' }],\n [{ content: 'body2-1' }, { content: 'body2-2' }, { content: 'body2-3' }],\n ],\n },\n },\n attributes: {\n cellBorderColor: null,\n cellPadding: '8px',\n 'text-align': 'center',\n },\n children: [],\n },\n },\n {\n txtName: 'Table 4x4',\n thumbnail: getImg('IMAGE_73'),\n payload: {\n type: AdvancedType.TABLE,\n data: {\n value: {\n tableSource: [\n [{\n content: '<font color=\"#ffffff\">header1</font>',\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n backgroundColor: '#62a0ea',\n },\n {\n content: '<font color=\"#ffffff\">header2</font>',\n top: 0,\n bottom: 0,\n left: 1,\n right: 1,\n backgroundColor: '#62a0ea',\n },\n {\n content: '<font color=\"#ffffff\">header3</font>',\n top: 0,\n bottom: 0,\n left: 2,\n right: 2,\n backgroundColor: '#62a0ea',\n },\n {\n content: '<font color=\"#ffffff\">header4</font>',\n top: 0,\n bottom: 0,\n left: 3,\n right: 3,\n backgroundColor: '#62a0ea',\n }],\n [{ content: 'body1-1' }, { content: 'body1-2' }, { content: 'body1-3' }, { content: 'body1-4' }],\n [{ content: 'body2-1' }, { content: 'body2-2' }, { content: 'body2-3' }, { content: 'body2-4' }],\n [{ content: 'body3-1' }, { content: 'body3-2' }, { content: 'body3-3' }, { content: 'body3-4' }],\n ],\n },\n },\n attributes: {\n cellBorderColor: '#9b9b9b',\n cellPadding: '8px',\n 'text-align': 'left',\n },\n children: [],\n },\n },\n];\n\nexport function TableBlockItem() {\n return (\n <Stack.Item fill>\n <Stack vertical>\n {tableList.map((item, index) => {\n return (\n <BlockMaskWrapper\n key={index}\n type={AdvancedType.TABLE}\n payload={item.payload}\n >\n\n <div style={{ position: 'relative' }}>\n <Picture src={item.thumbnail} style={{ minWidth: 250, minHeight: 70 }} />\n <div\n style={{\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n zIndex: 2,\n }}\n />\n </div>\n\n </BlockMaskWrapper>\n );\n })}\n </Stack>\n </Stack.Item>\n );\n}\n","import React from 'react';\nimport { AdvancedType } from '@thanhpv102/easy-email-core';\nimport { Stack, TextStyle } from '@thanhpv102/easy-email-editor';\n\nimport { TextBlockItem } from './TextBlockItem';\nimport { ImageBlockItem } from './ImageBlockItem';\nimport { SpacerBlockItem } from './SpacerBlockItem';\nimport { DividerBlockItem } from './DividerBlockItem';\nimport { HeroBlockItem } from './HeroBlockItem';\nimport { ButtonBlockItem } from './ButtonBlockItem';\nimport { AccordionBlockItem } from './AccordionBlockItem';\nimport { CarouselBlockItem } from './CarouselBlockItem';\nimport { NavbarBlockItem } from './NavbarBlockItem';\nimport { SocialBlockItem } from './SocialBlockItem';\nimport { WrapperBlockItem } from './WrapperBlockItem';\nimport { SectionBlockItem } from './SectionBlockItem';\nimport { GroupBlockItem } from './GroupBlockItem';\nimport { ColumnBlockItem } from './ColumnBlockItem';\nimport { TableBlockItem } from '@extensions/ShortcutToolbar/components/BlocksPanel/presetTemplate/TableBlockItem';\n\nexport const defaultCategories = [\n {\n get title() {\n return 'Content';\n },\n name: 'CONTENT',\n blocks: [\n {\n type: AdvancedType.TEXT,\n get title() {\n return 'Text';\n },\n get description() {\n return 'This block allows you to display text in your email';\n },\n component: TextBlockItem,\n },\n {\n type: AdvancedType.IMAGE,\n get title() {\n return 'Image';\n },\n get description() {\n return (\n <Stack\n vertical\n spacing=\"none\"\n >\n <TextStyle>\n {'Displays a responsive image in your email. It is similar to the HTML \\'<img/>\\' tag. Note that if no width is provided, the image will use the parent column width.'}\n </TextStyle>\n </Stack>\n );\n },\n component: ImageBlockItem,\n },\n {\n type: AdvancedType.TABLE,\n get title() {\n return 'Table';\n },\n get description() {\n return 'Displays a table.';\n },\n component: TableBlockItem,\n },\n {\n type: AdvancedType.BUTTON,\n get title() {\n return 'Button';\n },\n get description() {\n return 'Displays a customizable button.';\n },\n component: ButtonBlockItem,\n },\n {\n type: AdvancedType.HERO,\n get title() {\n return 'Hero';\n },\n get description() {\n return 'This block displays a hero image. It behaves like an \\'section\\' with a single \\'column\\'.';\n },\n component: HeroBlockItem,\n },\n {\n type: AdvancedType.NAVBAR,\n get title() {\n return 'Navbar';\n },\n get description() {\n return 'Displays a menu for navigation with an optional hamburger mode for mobile devices.';\n },\n component: NavbarBlockItem,\n },\n {\n type: AdvancedType.SPACER,\n get title() {\n return 'Spacer';\n },\n get description() {\n return 'Displays a blank space.';\n },\n component: SpacerBlockItem,\n },\n {\n type: AdvancedType.DIVIDER,\n get title() {\n return 'Divider';\n },\n get description() {\n return 'Displays a horizontal divider that can be customized like a HTML border.';\n },\n component: DividerBlockItem,\n },\n {\n type: AdvancedType.ACCORDION,\n get title() {\n return 'Accordion';\n },\n get description() {\n return 'Accordion is an interactive component to stack content in tabs, so the information is collapsed and only the titles are visible. Readers can interact by clicking on the tabs to reveal the content, providing a great experience on mobile devices where space is scarce.';\n },\n component: AccordionBlockItem,\n },\n {\n type: AdvancedType.CAROUSEL,\n get title() {\n return 'Carousel';\n },\n get description() {\n return 'This block displays a gallery of images or \\'carousel\\'. Readers can interact by hovering and clicking on thumbnails depending on the email client they use.';\n },\n component: CarouselBlockItem,\n },\n {\n type: AdvancedType.SOCIAL,\n get title() {\n return 'Social';\n },\n get description() {\n return 'Displays calls-to-action for various social networks with their associated logo.';\n },\n component: SocialBlockItem,\n },\n ],\n },\n {\n get title() {\n return 'Layout';\n },\n name: 'LAYOUT',\n blocks: [\n {\n type: AdvancedType.WRAPPER,\n get title() {\n return 'Wrapper';\n },\n get description() {\n return 'Wrapper enables to wrap multiple sections together. It\"s especially useful to achieve nested layouts with shared border or background images across sections.';\n },\n component: WrapperBlockItem,\n },\n {\n type: AdvancedType.SECTION,\n get title() {\n return 'Section';\n },\n get description() {\n return (\n <Stack\n vertical\n spacing=\"none\"\n >\n <TextStyle>\n {'Sections are intended to be used as rows within your email. They will be used to structure the layout.'}\n </TextStyle>\n <TextStyle>\n {'Sections cannot nest in sections. Columns can nest in sections; all content must be in a column.'}\n </TextStyle>\n </Stack>\n );\n },\n component: SectionBlockItem,\n },\n {\n type: AdvancedType.GROUP,\n get title() {\n return 'Group';\n },\n get description() {\n return 'Group allows you to prevent columns from stacking on mobile. To do so, wrap the columns inside a group block, so they\"ll stay side by side on mobile.';\n },\n component: GroupBlockItem,\n },\n {\n type: AdvancedType.COLUMN,\n get title() {\n return 'Column';\n },\n get description() {\n return (\n <Stack\n vertical\n spacing=\"none\"\n >\n <TextStyle>\n {'Columns enable you to horizontally organize the content within your sections. They must be located under \"Section\" block in order to be considered by the engine. To be responsive, columns are expressed in terms of percentage.'}\n </TextStyle>\n <TextStyle>\n {'Every single column has to contain something because they are responsive containers, and will be vertically stacked on a mobile view.'}\n </TextStyle>\n </Stack>\n );\n },\n component: ColumnBlockItem,\n },\n ],\n },\n];\n","import { Card, Tabs } from 'antd';\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\nimport styles from './index.module.scss';\nimport { createPortal } from 'react-dom';\nimport { IconFont, Stack, useHoverIdx } from '@thanhpv102/easy-email-editor';\nimport { BlockMarketCategory, BlockMarketManager } from '../../utils/BlockMarketManager';\nimport { defaultCategories } from './presetTemplate';\nimport { Help } from '@extensions/AttributePanel/components/UI/Help';\nimport { getIconNameByBlockType } from '@extensions/utils/getIconNameByBlockType';\n\nBlockMarketManager.addCategories(defaultCategories);\n\nexport const BlocksPanel: React.FC<{\n children: React.ReactNode | React.ReactElement;\n}> = props => {\n const { isDragging } = useHoverIdx();\n const [visible, setVisible] = useState(false);\n const [categories, setCategories] = useState<BlockMarketCategory[]>(\n BlockMarketManager.getCategories(),\n );\n\n useEffect(() => {\n if (!isDragging) {\n setVisible(false);\n }\n }, [isDragging]);\n\n useEffect(() => {\n const onChange = (c: BlockMarketCategory[]) => {\n setCategories(c);\n };\n BlockMarketManager.subscribe(onChange);\n return () => {\n BlockMarketManager.subscribe(onChange);\n };\n }, []);\n\n const toggleVisible = useCallback(() => {\n setVisible(v => !v);\n }, []);\n\n const filterCategories = useMemo(() => {\n return categories.filter(item => item.blocks.length > 0);\n }, [categories]);\n\n return useMemo(\n () => (\n <div\n style={{ position: 'relative' }}\n >\n <div onClick={toggleVisible}>{props.children}</div>\n\n <>\n {visible &&\n createPortal(\n <div\n className={styles.BlocksPanel}\n style={{\n pointerEvents: isDragging ? 'none' : undefined,\n position: 'fixed',\n width: isDragging ? 0 : 650,\n backgroundColor: 'var(--color-bg-2)',\n zIndex: 9999,\n left: 60,\n top: 0,\n maxHeight: '85vh',\n transition: 'width .5s',\n boxShadow:\n '0 1px 5px 0 rgb(0 0 0 / 12%), 0 2px 10px 0 rgb(0 0 0 / 8%), 0 1px 20px 0 rgb(0 0 0 / 8%)',\n }}\n >\n <Card\n styles={{ body: { padding: 0 } }}\n title='Drag block'\n extra={\n (\n <div className={styles.closeBtn}>\n <IconFont\n iconName='icon-close'\n onClick={toggleVisible}\n />\n </div>\n )\n }\n >\n <Tabs\n tabPlacement='start'\n size='large'\n items={filterCategories.map((category, index) => ({\n key: category.title,\n label: (\n <div\n style={{\n paddingTop: index === 0 ? 5 : undefined,\n paddingBottom: 10,\n }}\n >\n {category.title}\n </div>\n ),\n children: (\n <div\n style={{\n padding: 0,\n overflow: 'auto',\n height: 550,\n }}\n >\n <BlockPanelItem category={category} />\n </div>\n ),\n }))}\n />\n </Card>\n </div>,\n document.body,\n )}\n </>\n </div>\n ),\n [filterCategories, isDragging, props.children, toggleVisible, visible],\n );\n};\n\nconst BlockPanelItem: React.FC<{\n category: BlockMarketCategory;\n}> = React.memo(props => {\n return (\n <Tabs\n tabPlacement='start'\n style={{ '--ant-tabs-vertical-item-padding': '2px 20px', paddingTop: 15, fontSize: 10 } as React.CSSProperties}\n items={props.category.blocks.map((block) => ({\n key: block.title,\n label: (\n <Stack\n alignment='center'\n spacing='extraTight'\n >\n <IconFont\n iconName={getIconNameByBlockType(block.type)}\n style={{ fontSize: 16 }}\n />\n <div className={styles.blockItem}>{block.title}</div>\n {block.description && <Help title={block.description} />}\n </Stack>\n ),\n children: (\n <div\n className='small-scrollbar'\n style={{\n maxHeight: '100%',\n overflow: 'auto',\n paddingRight: 10,\n overflowX: 'hidden',\n padding: '24px 48px 24px 24px',\n height: 500,\n }}\n >\n {block.component && <block.component />}\n </div>\n ),\n }))}\n />\n );\n});\n","import { IconFont, BlockAvatarWrapper } from '@thanhpv102/easy-email-editor';\r\nimport { Button } from 'antd';\r\nimport { getIconNameByBlockType } from '@extensions';\r\nimport React from 'react';\r\nimport { BlockManager, IBlockData, RecursivePartial } from '@thanhpv102/easy-email-core';\r\n\r\nexport interface DragIconProps<T extends IBlockData> {\r\n type: string;\r\n payload?: RecursivePartial<T>;\r\n color: string;\r\n}\r\n\r\nexport function DragIcon<T extends IBlockData = any>(props: DragIconProps<T>) {\r\n const block = BlockManager.getBlockByType(props.type);\r\n return (\r\n <BlockAvatarWrapper type={props.type} payload={props.payload}>\r\n <Button\r\n type='text'\r\n title={block?.name}\r\n style={{\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n padding: 0,\r\n width: '100%',\r\n height: '100%',\r\n }}\r\n icon={(\r\n <IconFont\r\n iconName={getIconNameByBlockType(props.type)}\r\n style={{\r\n fontSize: 16,\r\n textAlign: 'center',\r\n cursor: 'move',\r\n color: props.color,\r\n }}\r\n />\r\n )}\r\n />\r\n </BlockAvatarWrapper>\r\n );\r\n}\r\n","/* eslint-disable react/jsx-wrap-multilines */\n\nimport { AdvancedType, IButton, IImage } from '@thanhpv102/easy-email-core';\nimport { IconFont, Stack } from '@thanhpv102/easy-email-editor';\nimport React, { useRef } from 'react';\nimport { BlocksPanel } from './components/BlocksPanel';\nimport { DragIcon } from './components/DragIcon';\n\nexport function ShortcutToolbar() {\n const blocksPanelRef = useRef<HTMLDivElement>(null);\n\n return (\n <Stack vertical alignment='center' distribution='center'>\n <BlocksPanel>\n <div ref={blocksPanelRef} />\n </BlocksPanel>\n <DragIcon type={AdvancedType.TEXT} color='rgb(110, 215, 135)' payload={{ attributes: { padding: '0px 25px 0px 25px', 'align': 'center' } }} />\n <DragIcon<IImage> payload={{ attributes: { padding: '0px 0px 0px 0px' } }} type={AdvancedType.IMAGE} color='rgb(250, 208, 97)' />\n <DragIcon<IButton> type={AdvancedType.BUTTON} color='rgb(238,144,172)' />\n <DragIcon type={AdvancedType.SOCIAL} color='rgb(111,206,236) ' />\n <DragIcon type={AdvancedType.NAVBAR} color='rgb(191,24,84)' />\n <DragIcon type={AdvancedType.DIVIDER} color='rgb(71,67,239)' />\n <DragIcon type={AdvancedType.SPACER} color='#ccc' />\n <DragIcon type={AdvancedType.TABLE} color='#ddd' />\n <DragIcon\n color='rgb(24,201,137)'\n payload={{\n children: [\n {\n type: AdvancedType.COLUMN,\n data: {\n value: {},\n },\n attributes: {\n padding: '0px 0px 0px 0px',\n border: 'none',\n 'vertical-align': 'top',\n },\n children: [],\n },\n {\n type: AdvancedType.COLUMN,\n data: {\n value: {},\n },\n attributes: {\n padding: '0px 0px 0px 0px',\n border: 'none',\n 'vertical-align': 'top',\n },\n children: [],\n },\n ],\n }}\n type={AdvancedType.SECTION}\n />\n\n <div\n style={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: 30,\n height: 30,\n borderRadius: '50%',\n cursor: 'pointer',\n color: 'var(--color-text-2)',\n boxShadow: '0 0 12px -3px var(--color-text-2)',\n }}\n onClick={() => blocksPanelRef.current?.click()}\n >\n <IconFont\n iconName='icon-more'\n style={{\n fontSize: 18,\n margin: 0,\n padding: 0,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n lineHeight: 1,\n verticalAlign: 'middle',\n height: '1em',\n }}\n />\n </div>\n </Stack>\n );\n}\n","import mjml from 'mjml-browser';\nimport { IBlockData, BlockType, BasicType, BlockManager } from '@thanhpv102/easy-email-core';\nimport { MjmlToJson } from './MjmlToJson';\n\nconst domParser = new DOMParser();\nexport function parseXMLtoBlock(text: string) {\n const dom = domParser.parseFromString(text, 'text/xml');\n const root = dom.firstChild as Element;\n if (!(dom.firstChild instanceof Element)) {\n throw new Error('Invalid content');\n }\n if (root.tagName === 'mjml') {\n const { json } = mjml(text, {\n validationLevel: 'soft',\n });\n const parseValue = MjmlToJson(json);\n return parseValue;\n }\n\n const transform = (node: Element): IBlockData => {\n if (node.tagName === 'parsererror') {\n throw new Error('Invalid content');\n }\n const attributes: IBlockData['attributes'] = {};\n node.getAttributeNames().forEach((name) => {\n attributes[name] = node.getAttribute(name);\n });\n const type = node.tagName.replace('mj-', '');\n\n if (!BlockManager.getBlockByType(type)) {\n if (!node.parentElement || node.parentElement.tagName !== 'mj-text')\n throw new Error('Invalid content');\n }\n\n const block: IBlockData = {\n type: type as BlockType,\n attributes: attributes,\n data: {\n value: {\n content: node.textContent?.trim(),\n },\n },\n children: [...node.children]\n .filter((item) => item instanceof Element)\n .map(transform as any),\n };\n\n switch (type) {\n case BasicType.TEXT:\n block.data.value.content = node.innerHTML;\n block.children = [];\n }\n\n return block;\n };\n\n return transform(root);\n}\n","import { BlockManager,IPage, BasicType, IBlockData } from '@thanhpv102/easy-email-core';\nimport { identity, isString, pickBy } from 'lodash';\nimport { parseXMLtoBlock } from './parseXMLtoBlock';\n\nexport function MjmlToJson(data: MjmlBlockItem | string): IPage {\n if (isString(data)) return parseXMLtoBlock(data);\n\n const transform = (item: IChildrenItem): IBlockData => {\n const attributes = item.attributes as any;\n\n switch (item.tagName) {\n case 'mjml':\n const body = item.children?.find((item) => item.tagName === 'mj-body')!;\n const head = item.children?.find((item) => item.tagName === 'mj-head');\n const metaData = getMetaDataFromMjml(head);\n\n const fonts =\n head?.children\n ?.filter((child) => child.tagName === 'mj-font')\n .map((child) => ({\n name: child.attributes.name,\n href: child.attributes.href,\n })) || [];\n\n const mjAttributes =\n head?.children?.find((item) => item.tagName === 'mj-attributes')\n ?.children || [];\n\n const headStyles = head?.children\n ?.filter((item) => item.tagName === 'mj-style')\n .map((item) => ({ content: item.content, inline: item.inline }));\n\n const headAttributes = [\n ...new Set(\n mjAttributes\n .filter((item) => {\n const isFontFamily =\n item.tagName === 'mj-all' &&\n item.attributes['font-family'] === metaData['font-family'];\n const isTextColor =\n item.tagName === 'mj-text' &&\n item.attributes['color'] === metaData['text-color'];\n const isContentColor =\n ['mj-wrapper', 'mj-section'].includes(item.tagName) &&\n item.attributes['background-color'] ===\n metaData['content-background-color'];\n return !isFontFamily && !isTextColor && !isContentColor;\n })\n .map(\n (item) =>\n `<${item.tagName} ${Object.keys(item.attributes)\n .map((key) => `${key}=\"${item.attributes[key]}\"`)\n .join(' ')} />`\n )\n ),\n ].join('\\n');\n\n const breakpoint = head?.children?.find(\n (item) => item.tagName === 'mj-breakpoint'\n );\n\n return BlockManager.getBlockByType<IPage>(BasicType.PAGE)!.create({\n attributes: body.attributes,\n children: body.children?.map(transform),\n data: {\n value: {\n headAttributes: headAttributes,\n headStyles: headStyles,\n fonts,\n breakpoint: breakpoint?.attributes.width,\n ...metaData,\n },\n },\n });\n\n default:\n const tag = item.tagName.replace('mj-', '').toLowerCase();\n\n const block = BlockManager.getBlockByType(tag as any);\n if (!block) {\n throw new Error(`${tag} block no found `);\n }\n const payload: IBlockData<any> = {\n type: block.type,\n attributes: attributes,\n data: {\n value: {},\n },\n children: [],\n };\n\n if (item.content) {\n payload.data.value.content = item.content;\n }\n\n if (block.type === BasicType.CAROUSEL) {\n payload.data.value.images =\n item.children?.map((child) => {\n return child.attributes;\n }) || [];\n payload.children = [];\n } else if (block.type === BasicType.NAVBAR) {\n payload.data.value.links =\n item.children?.map((child) => {\n const navbarLinkData = {\n // default config\n color: '#1890ff',\n 'font-size': '13px',\n target: '_blank',\n padding: '15px 10px',\n\n ...child.attributes,\n content: child.content,\n };\n formatPadding(navbarLinkData, 'padding');\n return navbarLinkData;\n }) || [];\n payload.children = [];\n } else if (block.type === BasicType.SOCIAL) {\n payload.data.value.elements =\n item.children?.map((child) => {\n return {\n ...child.attributes,\n content: child.content,\n };\n }) || [];\n payload.children = [];\n } else if (item.children) {\n payload.children = item.children.map(transform);\n }\n\n const blockData = block.create(payload);\n\n // format padding\n formatPadding(blockData.attributes, 'padding');\n formatPadding(blockData.attributes, 'inner-padding');\n return blockData;\n }\n };\n\n return transform(data);\n}\n\nexport function getMetaDataFromMjml(data?: IChildrenItem): {\n [key: string]: any;\n} {\n const mjmlHtmlAttributes = data?.children\n ?.filter((item) => item.tagName === 'mj-html-attributes')\n .map((item) => item.children)\n .flat()\n .filter((item) => item && item.attributes.class === 'easy-email')\n .reduce((obj: { [key: string]: any; }, item) => {\n if (!item) return obj;\n const name = item.attributes['attribute-name'];\n const isMultipleAttributes = Boolean(\n item.attributes['multiple-attributes']\n );\n obj[name] = isMultipleAttributes\n ? pickBy(\n {\n ...item.attributes,\n 'attribute-name': undefined,\n 'multiple-attributes': undefined,\n class: undefined,\n },\n identity\n )\n : item.attributes[name];\n return obj;\n }, {});\n\n return pickBy(mjmlHtmlAttributes, identity);\n}\n\nfunction formatPadding(\n attributes: IBlockData['attributes'],\n attributeName: 'padding' | 'inner-padding'\n) {\n const ele = document.createElement('div');\n Object.keys(attributes).forEach((key: string) => {\n if (new RegExp(`^${attributeName}`).test(key)) {\n const formatKey = new RegExp(`^${attributeName}(.*)`).exec(key)?.[0];\n\n if (formatKey) {\n ele.style[formatKey as any] = attributes[key];\n delete attributes[key];\n }\n }\n });\n const newPadding = [\n ele.style.paddingTop,\n ele.style.paddingRight,\n ele.style.paddingBottom,\n ele.style.paddingLeft,\n ]\n .filter(Boolean)\n .join(' ');\n\n if (newPadding) {\n attributes[attributeName] = newPadding;\n }\n}\n",".customTextArea {\n font-size: 12px !important;\n line-height: 1.5 !important;\n padding: 8px 8px !important;\n\n &[readonly] {\n color: var(--color-text-2);\n &:hover {\n border-color: var(--color-neutral-3);\n }\n &:focus {\n border-color: var(--color-neutral-3);\n background-color: transparent;\n box-shadow: none;\n }\n }\n}\n\n.collapsePanel {\n border: none !important;\n :global {\n .ant-collapse-item {\n border-top: none !important;\n border-right: none !important;\n border-left: none !important;\n }\n\n .ant-collapse-header {\n padding: 8px 16px !important;\n min-height: 32px !important;\n font-size: 12px !important;\n }\n\n .ant-collapse-content-box {\n padding: 8px 12px !important;\n }\n }\n}\n\n","import { Collapse, Input, App } from 'antd';\nimport { BasicType, BlockManager, getPageIdx, getParentByIdx, IBlockData, JsonToMjml } from '@thanhpv102/easy-email-core';\nimport { useBlock, useEditorContext, useEditorProps, useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { cloneDeep } from 'lodash';\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\nimport { MjmlToJson } from '@extensions/utils/MjmlToJson';\nimport styles from './index.module.scss';\n\nexport function SourceCodePanel({ jsonReadOnly, mjmlReadOnly }: { jsonReadOnly: boolean; mjmlReadOnly: boolean }) {\n const { setValueByIdx, focusBlock, values } = useBlock();\n const { focusIdx } = useFocusIdx();\n const { message } = App.useApp();\n\n const [mjmlText, setMjmlText] = useState('');\n const { pageData } = useEditorContext();\n const { mergeTags } = useEditorProps();\n\n const code = useMemo(() => {\n if (!focusBlock) return '';\n return JSON.stringify(focusBlock, null, 2) || '';\n }, [focusBlock]);\n\n const onChangeCode = useCallback(\n (event: React.FocusEvent<HTMLTextAreaElement>) => {\n if (!jsonReadOnly) {\n try {\n const parseValue = JSON.parse(event.target.value) as IBlockData;\n\n const block = BlockManager.getBlockByType(parseValue.type);\n if (!block) {\n throw new Error(t('Invalid content'));\n }\n if (\n !parseValue.data ||\n !parseValue.data.value ||\n !parseValue.attributes ||\n !Array.isArray(parseValue.children)\n ) {\n throw new Error(t('Invalid content'));\n }\n setValueByIdx(focusIdx, parseValue);\n } catch (error: unknown) {\n const errorMessage = error instanceof Error ? error.message : String(error);\n message.error(errorMessage);\n }\n }\n },\n [focusIdx, setValueByIdx, jsonReadOnly, message],\n );\n\n const onMjmlChange = useCallback(\n (event: React.FocusEvent<HTMLTextAreaElement>) => {\n if (!mjmlReadOnly) {\n try {\n const parseValue = MjmlToJson(event.target.value);\n if (parseValue.type !== BasicType.PAGE as string) {\n const parentBlock = values && getParentByIdx(values, focusIdx)!;\n const parseBlock = BlockManager.getBlockByType(parseValue.type);\n\n if (!parseBlock?.validParentType.includes(parentBlock?.type || '')) {\n throw new Error(t('Invalid content'));\n }\n } else if (focusIdx !== getPageIdx()) {\n throw new Error(t('Invalid content'));\n }\n\n setValueByIdx(focusIdx, parseValue);\n } catch {\n message.error(t('Invalid content'));\n }\n }\n },\n [focusIdx, setValueByIdx, values, mjmlReadOnly, message],\n );\n\n const onChangeMjmlText = useCallback((event: React.ChangeEvent<HTMLTextAreaElement>) => {\n setMjmlText(event.target.value);\n }, []);\n\n useEffect(() => {\n if (focusBlock) {\n setMjmlText(\n JsonToMjml({\n idx: focusIdx,\n data: focusBlock,\n context: pageData,\n mode: 'production',\n dataSource: cloneDeep(mergeTags),\n }),\n );\n }\n }, [focusBlock, focusIdx, pageData, mergeTags]);\n\n if (!focusBlock) return null;\n\n const collapseItems = [\n {\n key: 'json',\n label: t('Json source'),\n children: (\n <Input.TextArea\n key={code}\n defaultValue={code}\n autoSize={{ maxRows: 25 }}\n onBlur={onChangeCode}\n readOnly={jsonReadOnly}\n className={styles.customTextArea}\n />\n ),\n },\n {\n key: 'mjml',\n label: t('MJML source'),\n children: (\n <Input.TextArea\n key={code}\n value={mjmlText}\n autoSize={{ maxRows: 25 }}\n onChange={onChangeMjmlText}\n onBlur={onMjmlChange}\n readOnly={mjmlReadOnly}\n className={styles.customTextArea}\n />\n ),\n },\n ];\n\n return (\n <Collapse className={styles.collapsePanel} items={collapseItems} />\n );\n}\n","import React from 'react';\nimport { BasicType, getParentIdx, getSiblingIdx } from '@thanhpv102/easy-email-core';\nimport { useBlock, useFocusIdx, useEditorProps, isTextBlock } from '@thanhpv102/easy-email-editor';\nimport { classnames } from '@extensions/utils/classnames';\nimport { useAddToCollection } from '@extensions/hooks/useAddToCollection';\nimport { getBlockTitle } from '@extensions/utils/getBlockTitle';\n\nexport function Toolbar() {\n const { moveBlock, copyBlock, removeBlock, focusBlock } = useBlock();\n const { focusIdx, setFocusIdx } = useFocusIdx();\n const { modal, setModalVisible } = useAddToCollection();\n const props = useEditorProps();\n\n const isPage = focusBlock?.type === BasicType.PAGE.toString();\n const isText = isTextBlock(focusBlock?.type);\n\n const handleMoveUp = () => {\n moveBlock(focusIdx, getSiblingIdx(focusIdx, -1));\n };\n\n const handleMoveDown = () => {\n moveBlock(focusIdx, getSiblingIdx(focusIdx, 1));\n };\n\n const handleAddToCollection = () => {\n if (document.activeElement instanceof HTMLElement) {\n document.activeElement.blur();\n }\n setModalVisible(true);\n };\n\n const handleCopy: React.MouseEventHandler<HTMLDivElement> = (ev) => {\n if (document.activeElement instanceof HTMLElement) {\n document.activeElement.blur();\n }\n copyBlock(focusIdx);\n };\n\n const handleDelete = () => {\n if (document.activeElement instanceof HTMLElement) {\n document.activeElement.blur();\n }\n removeBlock(focusIdx);\n };\n\n const handleSelectParent = () => {\n if (document.activeElement instanceof HTMLElement) {\n document.activeElement.blur();\n }\n setFocusIdx(getParentIdx(focusIdx)!);\n };\n\n if (isText) return null;\n return (\n <>\n <div\n id='easy-email-extensions-InteractivePrompt-Toolbar'\n style={{\n height: 0,\n\n zIndex: 100,\n }}\n >\n <div\n style={{\n fontSize: 14,\n lineHeight: '22px',\n pointerEvents: 'auto',\n color: '#ffffff',\n transform: 'translateY(-100%)',\n display: 'inline-flex',\n // justifyContent: 'space-between',\n }}\n >\n <div\n style={{\n color: '#ffffff',\n backgroundColor: 'var(--selected-color)',\n height: '22px',\n\n display: 'inline-flex',\n padding: '1px 5px',\n boxSizing: 'border-box',\n whiteSpace: 'nowrap',\n maxWidth: 300,\n overflow: 'hidden',\n }}\n >\n {focusBlock && getBlockTitle(focusBlock, false)}\n </div>\n <div\n onClick={(e) => {\n e.stopPropagation();\n }}\n onMouseDown={(ev) => {\n ev.preventDefault();\n }}\n style={{\n display: isPage ? 'none' : 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n pointerEvents: 'auto',\n }}\n >\n <ToolItem\n width={12}\n iconName='icon-back-parent'\n onClick={handleSelectParent}\n />\n <ToolItem iconName='icon-copy' onClick={handleCopy} />\n {props.onAddCollection && (\n <ToolItem\n iconName='icon-collection'\n onClick={handleAddToCollection}\n />\n )}\n <ToolItem iconName='icon-delete' onClick={handleDelete} />\n </div>\n </div>\n </div>\n {modal}\n </>\n );\n}\n\nfunction ToolItem(props: {\n iconName: string;\n onClick: React.MouseEventHandler<HTMLDivElement>;\n width?: number;\n}) {\n return (\n <div\n onClick={props.onClick}\n style={{\n color: '#ffffff',\n backgroundColor: 'var(--selected-color)',\n height: 22,\n fontSize: props.width || 14,\n lineHeight: '22px',\n width: 22,\n display: 'flex',\n pointerEvents: 'auto',\n cursor: 'pointer',\n justifyContent: 'center',\n }}\n className={classnames('iconfont', props.iconName)}\n />\n );\n}\n","import React from 'react';\n\nimport { BasicType } from '@thanhpv102/easy-email-core';\nimport { createPortal } from 'react-dom';\nimport { IconFont, useBlock, useFocusIdx, BlockAvatarWrapper, useFocusBlockLayout } from '@thanhpv102/easy-email-editor';\nimport { Toolbar } from './Toolbar';\n\nexport function FocusTooltip() {\n const { focusBlock } = useBlock();\n const { focusIdx } = useFocusIdx();\n const { focusBlockNode, focusBlockPortalNode } = useFocusBlockLayout();\n const isPage = focusBlock?.type === BasicType.PAGE.toString();\n\n if (!focusBlockNode || !focusBlockPortalNode || !focusBlock) return null;\n\n return (\n <>\n {createPortal(\n <div\n id='easy-email-extensions-InteractivePrompt-FocusTooltip'\n style={{\n position: 'absolute',\n width: '100%',\n height: '100%',\n pointerEvents: 'none',\n left: 0,\n top: 0,\n zIndex: 1,\n }}\n >\n <style>\n {`\n .email-block {\n position: relative;\n }\n\n `}\n </style>\n <div\n style={{\n position: 'absolute',\n zIndex: 9999,\n right: 0,\n top: '50%',\n display: isPage ? 'none' : undefined,\n }}\n >\n <BlockAvatarWrapper\n idx={focusIdx}\n type={focusBlock.type}\n action='move'\n >\n <div\n style={\n {\n position: 'absolute',\n backgroundColor: 'var(--selected-color)',\n color: '#ffffff',\n height: '28px',\n width: '28px',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n borderRadius: '50%',\n cursor: 'grab',\n pointerEvents: 'auto',\n WebkitUserDrag: 'element',\n } as any\n }\n >\n <IconFont\n iconName='icon-move'\n style={{ color: '#fff', cursor: 'grab' }}\n />\n </div>\n </BlockAvatarWrapper>\n </div>\n\n {/* outline */}\n <div\n style={{\n position: 'absolute',\n fontSize: 14,\n zIndex: 2,\n left: 0,\n top: 0,\n width: '100%',\n height: '100%',\n outlineOffset: '-2px',\n outline: '2px solid var(--selected-color)',\n }}\n />\n <div\n style={{\n position: 'absolute',\n fontSize: 14,\n zIndex: 3,\n left: 0,\n top: 0,\n width: '0%',\n height: '100%',\n }}\n >\n <Toolbar />\n </div>\n </div>,\n\n focusBlockPortalNode as Element\n )}\n </>\n );\n}\n","import { getBlockNodeByIdx } from '@thanhpv102/easy-email-editor';\n\nexport function awaitForElement<T extends HTMLElement>(idx: string) {\n\n let promiseObj: { cancel: () => void; promise: Promise<T>; } = {\n cancel: () => { },\n promise: Promise.resolve() as any\n };\n promiseObj.promise = new Promise<T>((resolve) => {\n const ele = getBlockNodeByIdx(idx) as T;\n if (ele) {\n resolve(ele);\n return;\n }\n\n const timer = setInterval(() => {\n const ele = getBlockNodeByIdx(idx) as T;\n\n if (ele) {\n resolve(ele);\n clearInterval(timer);\n }\n }, 50) as any;\n\n promiseObj.cancel = () => {\n clearInterval(timer);\n };\n });\n\n return promiseObj;\n\n}","\nimport React, { useEffect, useMemo, useRef, useState } from 'react';\n\nimport { getNodeTypeFromClassName, BlockManager } from '@thanhpv102/easy-email-core';\nimport { createPortal } from 'react-dom';\nimport { getEditorRoot, useEditorContext, useFocusIdx, useHoverIdx, useLazyState, getValidPortalNode } from '@thanhpv102/easy-email-editor';\nimport { awaitForElement } from '@extensions/utils/awaitForElement';\n\nexport function HoverTooltip() {\n const { hoverIdx, direction, isDragging } = useHoverIdx();\n const lazyHoverIdx = useLazyState(hoverIdx, 60);\n const effectiveHoverIdx = isDragging ? hoverIdx : lazyHoverIdx;\n const { focusIdx } = useFocusIdx();\n const [isTop, setIsTop] = useState(false);\n const { initialized } = useEditorContext();\n\n const [blockNode, setBlockNode] = useState<HTMLDivElement | null>(null);\n const [portalNode, setPortalNode] = useState<HTMLDivElement | null>(null);\n const rootRef = useRef<DOMRect | null>(null);\n\n useEffect(() => {\n if (initialized) {\n rootRef.current = getEditorRoot()!.getBoundingClientRect();\n }\n }, [initialized]);\n\n useEffect(() => {\n const rootBounds = rootRef.current;\n if (!initialized) return;\n\n if (effectiveHoverIdx) {\n const promiseObj = awaitForElement<HTMLDivElement>(effectiveHoverIdx);\n promiseObj.promise.then(blockNode => {\n if (rootBounds) {\n const { top } = blockNode.getBoundingClientRect();\n setIsTop(rootBounds.top === top);\n }\n\n setBlockNode(blockNode);\n setPortalNode(getValidPortalNode(blockNode) as HTMLDivElement);\n }).catch(() => {\n // Element not found, ignore\n });\n\n return () => {\n promiseObj.cancel();\n };\n } else {\n setBlockNode(null);\n setPortalNode(null);\n }\n }, [effectiveHoverIdx, initialized]);\n\n const block = useMemo(() => {\n return blockNode\n ? BlockManager.getBlockByType(getNodeTypeFromClassName(blockNode.classList)!)\n : null;\n }, [blockNode]);\n\n // When dragging, always show tooltip even if it's the focused block\n if (!isDragging && focusIdx === hoverIdx) return null;\n if (!block || !blockNode || !portalNode) return null;\n\n\n return (\n <>\n {createPortal(\n <div\n id='easy-email-extensions-InteractivePrompt-HoverTooltip'\n style={{\n position: 'absolute',\n height: '100%',\n width: '100%',\n top: 0,\n left: 0,\n zIndex: 2,\n pointerEvents: 'none',\n }}\n >\n <TipNode\n type={isDragging ? 'drag' : 'hover'}\n lineWidth={1}\n title={block.name}\n direction={isTop && direction === 'top' ? 'noEnoughTop' : direction}\n isDragging={isDragging}\n />\n </div>,\n portalNode,\n )}\n </>\n );\n}\n\ninterface TipNodeProps {\n title: string;\n direction?: string;\n isDragging?: boolean;\n lineWidth: number;\n type: 'drag' | 'hover';\n}\n\nfunction TipNode(props: TipNodeProps) {\n const { direction = 'none', title, lineWidth, type } = props;\n\n const dragTitle = useMemo(() => {\n if (direction === 'top' || direction === 'noEnoughTop') {\n return `${'Insert before'} ${title}`;\n } else if (direction === 'bottom') {\n return `${'Insert after'} ${title}`;\n } else if (direction === 'right' || direction === 'left') {\n return 'Drag here';\n }\n return `${'Drag to'} ${title}`;\n }, [direction, title]);\n\n const color = useMemo(() => {\n return 'var(--hover-color, #1890ff)';\n }, []);\n\n return (\n <div\n style={{\n position: 'absolute',\n left: 0,\n top: 0,\n fontSize: 14,\n zIndex: 1,\n color: '#000',\n width: '100%',\n height: '100%',\n pointerEvents: 'none',\n textAlign: 'left',\n }}\n >\n <style>\n {`\n .email-block {\n position: relative;\n }\n\n `}\n </style>\n {/* outline */}\n <div\n style={{\n position: 'absolute',\n left: 0,\n top: 0,\n width: '100%',\n height: '100%',\n outlineOffset: `-${lineWidth}px`,\n outline: `${lineWidth}px solid ${color}`,\n }}\n >\n {type === 'hover' && (\n <div\n style={{\n position: 'absolute',\n left: 0,\n top: 0,\n }}\n >\n <div\n style={{\n backgroundColor: color,\n color: '#ffffff',\n height: '22px',\n lineHeight: '22px',\n display: 'inline-flex',\n padding: '1px 5px',\n boxSizing: 'border-box',\n whiteSpace: 'nowrap',\n fontFamily: 'sans-serif',\n transform: 'translateY(-100%)',\n }}\n >\n {title}\n </div>\n </div>\n )}\n </div>\n\n {/* drag direction tip */}\n {props.isDragging && (\n <div\n style={{\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n ...(directionImage[direction] || directionImage.none),\n }}\n >\n <div\n style={{\n position: 'absolute',\n color: '#ffffff',\n backgroundColor: color,\n lineHeight: '22px',\n display: 'inline-flex',\n maxWidth: '100%',\n textAlign: 'center',\n whiteSpace: 'nowrap',\n padding: '1px 5px',\n\n ...(positionStyleMap[direction] || positionStyleMap.none),\n }}\n >\n {dragTitle}\n </div>\n </div>\n )}\n </div>\n );\n}\n\nconst positionStyleMap: Record<string, React.CSSProperties> = {\n noEnoughTop: {\n top: '0%',\n left: '50%',\n padding: '1px 5px',\n transform: 'translate(-50%, 0%)',\n },\n top: {\n top: '0%',\n left: '50%',\n padding: '1px 5px',\n transform: 'translate(-50%, -50%)',\n },\n bottom: {\n top: '100%',\n left: '50%',\n padding: '1px 5px',\n transform: 'translate(-50%, -50%)',\n },\n left: {\n top: '50%',\n left: '0%',\n padding: '5px 1px',\n writingMode: 'vertical-lr',\n transform: 'translate(0, -50%)',\n },\n right: {\n top: '50%',\n right: '0%',\n padding: '5px 1px',\n writingMode: 'vertical-lr',\n transform: 'translate(0, -50%)',\n },\n none: {\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n },\n};\n\nconst directionImage: Record<string, React.CSSProperties> = {\n top: {\n backgroundImage: `linear-gradient(\n to bottom,\n var(--hover-color) 3px ,\n transparent 3px\n )`,\n },\n bottom: {\n backgroundImage: `linear-gradient(\n to top,\n var(--hover-color) 3px ,\n transparent 3px\n )`,\n },\n left: {\n backgroundImage: `linear-gradient(\n to right,\n var(--hover-color) 3px ,\n transparent 3px\n )`,\n },\n right: {\n backgroundImage: `linear-gradient(\n to left,\n var(--hover-color) 3px ,\n transparent 3px\n )`,\n },\n none: {},\n};\n","import React from 'react';\r\nimport { FocusTooltip } from './components/FocusTooltip';\r\nimport { HoverTooltip } from './components/HoverTooltip';\r\n\r\nexport function InteractivePrompt() {\r\n return (\r\n <>\r\n <HoverTooltip />\r\n <FocusTooltip />\r\n\r\n </>\r\n );\r\n}\r\n",".SimpleLayout {\n :global {\n .arco-layout-sider-children {\n overflow-x: hidden;\n .arco-tabs-content {\n padding: 0;\n }\n }\n .arco-collapse-item-content-expanded {\n overflow: visible;\n }\n }\n *::-webkit-scrollbar {\n -webkit-appearance: none;\n width: 8px !important;\n }\n\n *::-webkit-scrollbar-thumb {\n background-color: rgba(0, 0, 0, 0.5);\n box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);\n -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);\n }\n}\n\n.rightSide {\n width: 450px !important;\n min-width: 350px !important;\n max-width: 450px !important;\n :global {\n .arco-tabs-header {\n }\n .arco-btn {\n padding: 4px 12px !important;\n font-size: 12px !important;\n height: 28px !important;\n }\n .arco-input {\n font-size: 12px !important;\n height: 28px !important;\n padding: 4px 8px !important;\n }\n .arco-select {\n font-size: 12px !important;\n }\n .arco-select-view {\n height: 28px !important;\n }\n .arco-form-item-label {\n font-size: 12px !important;\n }\n .arco-form-item-content {\n font-size: 12px !important;\n }\n textarea {\n font-size: 12px !important;\n padding: 4px 8px !important;\n }\n }\n}\n\n.customScrollBar {\n overflow: scroll;\n &::-webkit-scrollbar {\n -webkit-appearance: none;\n width: 8px !important;\n }\n\n &::-webkit-scrollbar-thumb {\n background-color: rgba(0, 0, 0, 0.5);\n box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);\n -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);\n }\n\n :global {\n .arco-tabs-content {\n padding: 0;\n }\n }\n}\n.layoutTabs {\n margin: 0;\n}\n\n.customScrollBarV2 {\n overflow: scroll;\n &::-webkit-scrollbar {\n -webkit-appearance: none;\n width: 8px !important;\n }\n\n &::-webkit-scrollbar-thumb {\n background-color: rgba(0, 0, 0, 0.5);\n box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);\n -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);\n }\n}\n","function _interopRequireDefault(e) {\n return e && e.__esModule ? e : {\n \"default\": e\n };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nconst locale = {\n // Options\n items_per_page: '/ page',\n jump_to: 'Go to',\n jump_to_confirm: 'confirm',\n page: 'Page',\n // Pagination\n prev_page: 'Previous Page',\n next_page: 'Next Page',\n prev_5: 'Previous 5 Pages',\n next_5: 'Next 5 Pages',\n prev_3: 'Previous 3 Pages',\n next_3: 'Next 3 Pages',\n page_size: 'Page Size'\n};\nvar _default = exports.default = locale;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.commonLocale = void 0;\nvar commonLocale = exports.commonLocale = {\n yearFormat: 'YYYY',\n dayFormat: 'D',\n cellMeridiemFormat: 'A',\n monthBeforeYear: true\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _common = require(\"./common\");\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : String(i); }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nvar locale = _objectSpread(_objectSpread({}, _common.commonLocale), {}, {\n locale: 'en_US',\n today: 'Today',\n now: 'Now',\n backToToday: 'Back to today',\n ok: 'OK',\n clear: 'Clear',\n week: 'Week',\n month: 'Month',\n year: 'Year',\n timeSelect: 'select time',\n dateSelect: 'select date',\n weekSelect: 'Choose a week',\n monthSelect: 'Choose a month',\n yearSelect: 'Choose a year',\n decadeSelect: 'Choose a decade',\n previousMonth: 'Previous month (PageUp)',\n nextMonth: 'Next month (PageDown)',\n previousYear: 'Last year (Control + left)',\n nextYear: 'Next year (Control + right)',\n previousDecade: 'Last decade',\n nextDecade: 'Next decade',\n previousCentury: 'Last century',\n nextCentury: 'Next century'\n});\nvar _default = exports.default = locale;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nconst locale = {\n placeholder: 'Select time',\n rangePlaceholder: ['Start time', 'End time']\n};\nvar _default = exports.default = locale;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _en_US = _interopRequireDefault(require(\"@rc-component/picker/locale/en_US\"));\nvar _en_US2 = _interopRequireDefault(require(\"../../time-picker/locale/en_US\"));\n// Merge into a locale object\nconst locale = {\n lang: {\n placeholder: 'Select date',\n yearPlaceholder: 'Select year',\n quarterPlaceholder: 'Select quarter',\n monthPlaceholder: 'Select month',\n weekPlaceholder: 'Select week',\n rangePlaceholder: ['Start date', 'End date'],\n rangeYearPlaceholder: ['Start year', 'End year'],\n rangeQuarterPlaceholder: ['Start quarter', 'End quarter'],\n rangeMonthPlaceholder: ['Start month', 'End month'],\n rangeWeekPlaceholder: ['Start week', 'End week'],\n ..._en_US.default\n },\n timePickerLocale: {\n ..._en_US2.default\n }\n};\n// All settings at:\n// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json\nvar _default = exports.default = locale;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _en_US = _interopRequireDefault(require(\"../../date-picker/locale/en_US\"));\nvar _default = exports.default = _en_US.default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _en_US = _interopRequireDefault(require(\"@rc-component/pagination/lib/locale/en_US\"));\nvar _en_US2 = _interopRequireDefault(require(\"../calendar/locale/en_US\"));\nvar _en_US3 = _interopRequireDefault(require(\"../date-picker/locale/en_US\"));\nvar _en_US4 = _interopRequireDefault(require(\"../time-picker/locale/en_US\"));\nconst typeTemplate = '${label} is not a valid ${type}';\nconst localeValues = {\n locale: 'en',\n Pagination: _en_US.default,\n DatePicker: _en_US3.default,\n TimePicker: _en_US4.default,\n Calendar: _en_US2.default,\n global: {\n placeholder: 'Please select',\n close: 'Close',\n sortable: 'sortable'\n },\n Table: {\n filterTitle: 'Filter menu',\n filterConfirm: 'OK',\n filterReset: 'Reset',\n filterEmptyText: 'No filters',\n filterCheckAll: 'Select all items',\n filterSearchPlaceholder: 'Search in filters',\n emptyText: 'No data',\n selectAll: 'Select current page',\n selectInvert: 'Invert current page',\n selectNone: 'Clear all data',\n selectionAll: 'Select all data',\n sortTitle: 'Sort',\n expand: 'Expand row',\n collapse: 'Collapse row',\n triggerDesc: 'Click to sort descending',\n triggerAsc: 'Click to sort ascending',\n cancelSort: 'Click to cancel sorting'\n },\n Tour: {\n Next: 'Next',\n Previous: 'Previous',\n Finish: 'Finish'\n },\n Modal: {\n okText: 'OK',\n cancelText: 'Cancel',\n justOkText: 'OK'\n },\n Popconfirm: {\n okText: 'OK',\n cancelText: 'Cancel'\n },\n Transfer: {\n titles: ['', ''],\n searchPlaceholder: 'Search here',\n itemUnit: 'item',\n itemsUnit: 'items',\n remove: 'Remove',\n selectCurrent: 'Select current page',\n removeCurrent: 'Remove current page',\n selectAll: 'Select all data',\n deselectAll: 'Deselect all data',\n removeAll: 'Remove all data',\n selectInvert: 'Invert current page'\n },\n Upload: {\n uploading: 'Uploading...',\n removeFile: 'Remove file',\n uploadError: 'Upload error',\n previewFile: 'Preview file',\n downloadFile: 'Download file'\n },\n Empty: {\n description: 'No data'\n },\n Icon: {\n icon: 'icon'\n },\n Text: {\n edit: 'Edit',\n copy: 'Copy',\n copied: 'Copied',\n expand: 'Expand',\n collapse: 'Collapse'\n },\n Form: {\n optional: '(optional)',\n defaultValidateMessages: {\n default: 'Field validation error for ${label}',\n required: 'Please enter ${label}',\n enum: '${label} must be one of [${enum}]',\n whitespace: '${label} cannot be a blank character',\n date: {\n format: '${label} date format is invalid',\n parse: '${label} cannot be converted to a date',\n invalid: '${label} is an invalid date'\n },\n types: {\n string: typeTemplate,\n method: typeTemplate,\n array: typeTemplate,\n object: typeTemplate,\n number: typeTemplate,\n date: typeTemplate,\n boolean: typeTemplate,\n integer: typeTemplate,\n float: typeTemplate,\n regexp: typeTemplate,\n email: typeTemplate,\n url: typeTemplate,\n hex: typeTemplate\n },\n string: {\n len: '${label} must be ${len} characters',\n min: '${label} must be at least ${min} characters',\n max: '${label} must be up to ${max} characters',\n range: '${label} must be between ${min}-${max} characters'\n },\n number: {\n len: '${label} must be equal to ${len}',\n min: '${label} must be minimum ${min}',\n max: '${label} must be maximum ${max}',\n range: '${label} must be between ${min}-${max}'\n },\n array: {\n len: 'Must be ${len} ${label}',\n min: 'At least ${min} ${label}',\n max: 'At most ${max} ${label}',\n range: 'The amount of ${label} must be between ${min}-${max}'\n },\n pattern: {\n mismatch: '${label} does not match the pattern ${pattern}'\n }\n }\n },\n QRCode: {\n expired: 'QR code expired',\n refresh: 'Refresh',\n scanned: 'Scanned'\n },\n ColorPicker: {\n presetEmpty: 'Empty',\n transparent: 'Transparent',\n singleColor: 'Single',\n gradientColor: 'Gradient'\n }\n};\nvar _default = exports.default = localeValues;","module.exports = require('../lib/locale/en_US');",".easy-email-merge-tag {\n font-size: inherit;\n outline: 1px solid rgb(78 89 105) !important;\n outline-offset: 0px;\n padding: 0px 8px;\n border-radius: 4px;\n cursor: default !important;\n transition: all 0.1s linear;\n border: none;\n font-weight: inherit;\n font-style: inherit;\n outline-color: rgb(0 160 172) !important;\n color: inherit;\n background-color: rgb(235 249 252);\n}\n\n.easy-email-merge-tag:hover:not(.easy-email-merge-tag-focus) {\n // outline-color: rgb(201 205 212) !important;\n // color: rgb(78 89 105);\n // background-color: rgb(229 230 235);\n}\n\n.easy-email-merge-tag-focus {\n // outline-color: rgb(0 160 172) !important;\n // color: rgb(78 89 105);\n // background-color: rgb(235 249 252);\n}\n\n.easy-email-merge-tag-popover {\n position: absolute;\n top: -10px;\n left: 50%;\n transform: translate(-50%, -100%);\n}\n\n.easy-email-merge-tag-popover {\n line-height: 1.3;\n background-color: #fff;\n width: 360px;\n border: 1px solid rgb(229 230 235);\n border-radius: 8px;\n position: absolute;\n top: calc(100% + 20px);\n left: 50%;\n transform: translate(-50%, 0%);\n z-index: 10;\n padding: 20px;\n font-family: -apple-system, BlinkMacSystemFont, San Francisco, Segoe UI,\n Roboto, Helvetica Neue, sans-serif;\n 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-merge-tag-popover-desc {\n font-size: 14px;\n color: rgb(109, 113, 117);\n }\n .easy-email-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 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 &:focus {\n outline: none;\n }\n }\n .easy-email-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-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 button {\n color: var(--selected-color);\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 &:focus {\n color: var(--selected-color);\n background-color: rgb(242 243 245);\n }\n &:hover {\n color: var(--selected-color);\n background-color: rgb(242 243 245);\n }\n }\n }\n\n .easy-email-merge-tag-popover-container {\n position: relative;\n z-index: 2;\n }\n}\n","\nimport {\n useEditorContext,\n useEditorProps,\n getShadowRoot,\n getBlockNodeByChildEle,\n IconFont,\n useRefState,\n getEditorRoot,\n} from '@thanhpv102/easy-email-editor';\nimport { get } from 'lodash';\nimport React, { useCallback, useEffect, useRef, useState } from 'react';\nimport { createPortal } from 'react-dom';\nimport stylesText from './MergeTagBadge.scss?inline';\nimport { classnames } from '@extensions/utils/classnames';\nimport { useSelectionRange } from '@extensions/AttributePanel/hooks/useSelectionRange';\n\nconst removeAllActiveBadge = () => {\n getShadowRoot()\n .querySelectorAll('.easy-email-merge-tag')\n .forEach((item) => {\n item.classList.remove('easy-email-merge-tag-focus');\n });\n\n const popoverNode = getShadowRoot().querySelectorAll(\n '.easy-email-merge-tag-popover'\n );\n if (popoverNode) {\n }\n};\n\nexport function MergeTagBadgePrompt() {\n const { initialized } = useEditorContext();\n const popoverRef = useRef<HTMLDivElement | null>(null);\n const { onChangeMergeTag, mergeTags } = useEditorProps();\n const [text, setText] = useState('');\n const { setRangeByElement } = useSelectionRange();\n\n const root = initialized && getShadowRoot();\n const [target, setTarget] = React.useState<HTMLElement | null>(null);\n const targetRef = useRefState(target);\n\n const textContainer = getBlockNodeByChildEle(target);\n\n const focusMergeTag = useCallback((ele: HTMLElement) => {\n if (!ele) return;\n\n setRangeByElement(ele);\n }, [setRangeByElement]);\n\n useEffect(() => {\n\n const onBlur = (ev: MouseEvent) => {\n if (ev.target === getEditorRoot()) {\n return;\n }\n setTarget(null);\n };\n window.addEventListener('click', onBlur);\n return () => {\n window.removeEventListener('click', onBlur);\n };\n }, [targetRef, popoverRef]);\n\n const onClose = useCallback(() => {\n let ele = targetRef.current;\n\n setTimeout(() => {\n if (!ele) return;\n focusMergeTag(ele);\n }, 100);\n\n setTarget(null);\n }, [focusMergeTag, targetRef]);\n\n useEffect(() => {\n if (!root) return;\n const onClick: EventListenerOrEventListenerObject = (e) => {\n removeAllActiveBadge();\n const target = e.target;\n if (\n target instanceof HTMLInputElement &&\n target.classList.contains('easy-email-merge-tag')\n ) {\n target.classList.add('easy-email-merge-tag-focus');\n const namePath = target.value;\n if (!onChangeMergeTag) {\n focusMergeTag(target);\n return;\n }\n setText(get(mergeTags, namePath, ''));\n setTarget(target);\n\n } else {\n if (popoverRef.current?.contains(e.target as any)) return;\n setTarget(null);\n\n }\n };\n\n root.addEventListener('click', onClick);\n return () => {\n root.removeEventListener('click', onClick);\n };\n }, [focusMergeTag, mergeTags, onChangeMergeTag, root]);\n\n const onChange: React.ChangeEventHandler<HTMLInputElement> = useCallback((ev) => {\n setText(ev.target.value);\n }, []);\n\n const onSave = useCallback(() => {\n if (!(target instanceof HTMLInputElement)) return;\n onChangeMergeTag?.(target.value, text);\n onClose();\n }, [onChangeMergeTag, onClose, target, text]);\n\n const onClick: React.MouseEventHandler<HTMLDivElement> = useCallback((ev) => {\n ev.stopPropagation();\n }, []);\n\n useEffect(() => {\n const onKeyDown = (e: KeyboardEvent) => {\n\n if (e.code?.toLocaleLowerCase() === 'escape') {\n onClose();\n }\n\n };\n window.addEventListener('keydown', onKeyDown);\n\n return () => {\n window.removeEventListener('keydown', onKeyDown);\n };\n }, [onClose, onSave]);\n\n return (\n <>\n\n {root && createPortal(<style>{stylesText}</style>, root as any)}\n {textContainer && createPortal(\n <div ref={popoverRef} onClick={onClick} className={classnames('easy-email-merge-tag-popover')}>\n <div className='easy-email-merge-tag-popover-container'>\n <h3>\n <span>{'Default value'}</span>\n <IconFont style={{ color: 'rgb(92, 95, 98)' }} iconName='icon-close' onClick={onClose} />\n </h3>\n <div className={'easy-email-merge-tag-popover-desc'}>\n <p>\n {'If a personalized text value isn\\\"t available, then a default value is shown.'}\n </p>\n <div className='easy-email-merge-tag-popover-desc-label'>\n <input autoFocus value={text} onChange={onChange} type=\"text\" autoComplete='off' maxLength={40} />\n <div className='easy-email-merge-tag-popover-desc-label-count'>\n {text.length}/40\n </div>\n </div>\n <div className='easy-email-merge-tag-popover-desc-label-button'>\n <button onClick={onSave}>{'Save'}</button>\n </div>\n </div>\n </div>\n\n </div>, textContainer)}\n </>\n );\n}\n","/* eslint-disable react/jsx-wrap-multilines */\nimport React, { useCallback, useRef, useState } from 'react';\nimport { Modal, Tabs, Form, Switch, Button, Typography, Popconfirm, Divider } from 'antd';\nimport { PlusOutlined, DeleteOutlined } from '@ant-design/icons';\nimport { useEditorConfig, useEditorProps } from '@thanhpv102/easy-email-editor';\nimport './styles.css';\n\nconst { Text } = Typography;\n\n// ─── General Tab ─────────────────────────────────────────────────────────────\n\nfunction GeneralTab() {\n const { runtimeConfig, setRuntimeConfig } = useEditorConfig();\n const { dashed: propDashed = true } = useEditorProps();\n const currentDashed = runtimeConfig.dashed !== undefined ? runtimeConfig.dashed : propDashed;\n\n return (\n <Form layout='vertical' style={{ padding: '16px 0' }}>\n <Form.Item\n label='Dashed border (show dashed outline around blocks)'\n help='Enable or disable dashed borders on email blocks'\n >\n <Switch\n checked={currentDashed}\n onChange={val => setRuntimeConfig({ dashed: val })}\n checkedChildren='On'\n unCheckedChildren='Off'\n />\n </Form.Item>\n </Form>\n );\n}\n\n// ─── Merge Tags Tab ──────────────────────────────────────────────────────────\n\ninterface FlatMergeTag {\n id: string;\n path: string;\n value: string;\n}\n\nfunction flattenMergeTags(obj: Record<string, unknown>, prefix = ''): FlatMergeTag[] {\n const result: FlatMergeTag[] = [];\n for (const key of Object.keys(obj)) {\n const path = prefix ? `${prefix}.${key}` : key;\n const val = obj[key];\n if (val !== null && typeof val === 'object' && !Array.isArray(val)) {\n result.push(...flattenMergeTags(val as Record<string, unknown>, path));\n } else {\n result.push({ id: path, path, value: String(val ?? '') });\n }\n }\n return result;\n}\n\nfunction buildMergeTagsFromFlat(flat: FlatMergeTag[]): Record<string, unknown> {\n const result: Record<string, unknown> = {};\n for (const item of flat) {\n const parts = item.path.split('.');\n let cur = result;\n for (let i = 0; i < parts.length - 1; i++) {\n const part = parts[i];\n if (!cur[part] || typeof cur[part] !== 'object') cur[part] = {};\n cur = cur[part] as Record<string, unknown>;\n }\n cur[parts[parts.length - 1]] = item.value;\n }\n return result;\n}\n\ninterface MergeTagRowProps {\n row: FlatMergeTag;\n onCommit: (id: string, field: 'path' | 'value', val: string) => void;\n onDelete: (id: string) => void;\n}\n\n// Each row owns its own input state → typing never re-renders the parent list\nfunction MergeTagRow({ row, onCommit, onDelete }: MergeTagRowProps) {\n const pathRef = useRef<HTMLInputElement>(null);\n const valueRef = useRef<HTMLInputElement>(null);\n\n return (\n <div className=\"config-row\">\n <input\n className=\"config-input-field ant-input ant-input-outlined css-var-root ant-input-css-var\"\n ref={pathRef}\n defaultValue={row.path}\n placeholder='e.g. user.name'\n onBlur={e => onCommit(row.id, 'path', e.target.value)}\n />\n <input\n className=\"config-input-field ant-input ant-input-outlined css-var-root ant-input-css-var\"\n ref={valueRef}\n defaultValue={row.value}\n placeholder='Preview value'\n onBlur={e => onCommit(row.id, 'value', e.target.value)}\n />\n <Popconfirm title='Delete this tag?' onConfirm={() => onDelete(row.id)}>\n <Button type='text' danger size='small' icon={<DeleteOutlined />} className=\"config-btn-delete\" />\n </Popconfirm>\n </div>\n );\n}\n\nfunction MergeTagsTab() {\n const { runtimeConfig, setRuntimeConfig } = useEditorConfig();\n const { mergeTags: propMergeTags } = useEditorProps();\n\n const initialMergeTags =\n runtimeConfig.mergeTags !== undefined\n ? runtimeConfig.mergeTags\n : ((propMergeTags as Record<string, unknown>) ?? {});\n\n const [rows, setRows] = useState<FlatMergeTag[]>(() =>\n flattenMergeTags(initialMergeTags as Record<string, unknown>),\n );\n const rowsRef = useRef(rows);\n rowsRef.current = rows;\n\n const syncToContext = useCallback(\n (nextRows: FlatMergeTag[]) => {\n setRuntimeConfig({ mergeTags: buildMergeTagsFromFlat(nextRows) });\n },\n [setRuntimeConfig],\n );\n\n // Called onBlur from each row — only updates the specific field, no re-render of list\n const handleCommit = useCallback(\n (id: string, field: 'path' | 'value', val: string) => {\n const nextRows = rowsRef.current.map(r => {\n if (r.id !== id) return r;\n return field === 'path' ? { ...r, path: val, id: val } : { ...r, value: val };\n });\n rowsRef.current = nextRows;\n // Update rows state only to keep rowsRef consistent for add/delete, but\n // use functional update to avoid triggering unnecessary re-renders when value unchanged\n setRows(prev => {\n const changed = prev.some(r => {\n if (r.id !== id) return false;\n return field === 'path' ? r.path !== val : r.value !== val;\n });\n if (!changed) return prev;\n return prev.map(r => {\n if (r.id !== id) return r;\n return field === 'path' ? { ...r, path: val, id: val } : { ...r, value: val };\n });\n });\n syncToContext(nextRows);\n },\n [syncToContext],\n );\n\n const handleDelete = useCallback(\n (id: string) => {\n const nextRows = rowsRef.current.filter(r => r.id !== id);\n setRows(nextRows);\n syncToContext(nextRows);\n },\n [syncToContext],\n );\n\n const handleAdd = useCallback(() => {\n const ts = Date.now();\n const newRow: FlatMergeTag = { id: `new.key.${ts}`, path: `new.key.${ts}`, value: '' };\n const nextRows = [...rowsRef.current, newRow];\n setRows(nextRows);\n syncToContext(nextRows);\n }, [syncToContext]);\n\n return (\n <div style={{ padding: '16px 0' }}>\n <Text type='secondary' className=\"config-description\">\n Define merge tag preview values. Use dot notation for nested keys (e.g.{' '}\n <span className=\"config-code\">user.name</span>).\n </Text>\n <div className=\"config-row-label\">\n <span className=\"config-row-label-text\">Path (dot notation)</span>\n <span className=\"config-row-label-text\">Value</span>\n <div style={{ width: 32 }} />\n </div>\n <Divider className=\"config-divider\" />\n {rows.map(row => (\n <MergeTagRow key={row.id} row={row} onCommit={handleCommit} onDelete={handleDelete} />\n ))}\n <Button icon={<PlusOutlined />} onClick={handleAdd} size='small' className=\"config-btn-add\">\n Add merge tag\n </Button>\n </div>\n );\n}\n\n// ─── Social Icons Tab ─────────────────────────────────────────────────────────\n\ninterface SocialIconRow {\n id: string;\n content: string;\n image: string;\n}\n\ninterface SocialIconRowProps {\n row: SocialIconRow;\n onCommit: (id: string, field: 'content' | 'image', val: string) => void;\n onDelete: (id: string) => void;\n}\n\nfunction SocialIconRowItem({ row, onCommit, onDelete }: SocialIconRowProps) {\n const [imgSrc, setImgSrc] = useState(row.image);\n\n return (\n <div className=\"config-row\">\n <input\n className=\"config-input-field\"\n defaultValue={row.content}\n placeholder='e.g. Facebook'\n onBlur={e => onCommit(row.id, 'content', e.target.value)}\n />\n <div style={{ flex: 1, display: 'flex', gap: 6, alignItems: 'center' }}>\n <input\n className=\"config-input-field\"\n defaultValue={row.image}\n placeholder='https://...'\n onBlur={e => {\n onCommit(row.id, 'image', e.target.value);\n setImgSrc(e.target.value);\n }}\n style={{ flex: 1 }}\n />\n {imgSrc && (\n <img src={imgSrc} alt='' className=\"config-image-preview\" />\n )}\n </div>\n <Popconfirm title='Delete this icon?' onConfirm={() => onDelete(row.id)}>\n <Button type='text' danger size='small' icon={<DeleteOutlined />} className=\"config-btn-delete\" />\n </Popconfirm>\n </div>\n );\n}\n\nfunction SocialIconsTab() {\n const { runtimeConfig, setRuntimeConfig } = useEditorConfig();\n const { socialIcons: propSocialIcons } = useEditorProps();\n\n const currentIcons =\n runtimeConfig.socialIcons !== undefined ? runtimeConfig.socialIcons : (propSocialIcons ?? []);\n\n const [rows, setRows] = useState<SocialIconRow[]>(() =>\n currentIcons.map((icon, i) => ({ ...icon, id: `icon-${i}` })),\n );\n const rowsRef = useRef(rows);\n rowsRef.current = rows;\n\n const syncToContext = useCallback(\n (nextRows: SocialIconRow[]) => {\n setRuntimeConfig({ socialIcons: nextRows.map(({ content, image }) => ({ content, image })) });\n },\n [setRuntimeConfig],\n );\n\n const handleCommit = useCallback(\n (id: string, field: 'content' | 'image', val: string) => {\n const nextRows = rowsRef.current.map(r => (r.id === id ? { ...r, [field]: val } : r));\n rowsRef.current = nextRows;\n setRows(prev => {\n const changed = prev.some(r => r.id === id && r[field] !== val);\n if (!changed) return prev;\n return prev.map(r => (r.id === id ? { ...r, [field]: val } : r));\n });\n syncToContext(nextRows);\n },\n [syncToContext],\n );\n\n const handleDelete = useCallback(\n (id: string) => {\n const nextRows = rowsRef.current.filter(r => r.id !== id);\n setRows(nextRows);\n syncToContext(nextRows);\n },\n [syncToContext],\n );\n\n const handleAdd = useCallback(() => {\n const newRow: SocialIconRow = { id: `icon-new-${Date.now()}`, content: '', image: '' };\n const nextRows = [...rowsRef.current, newRow];\n setRows(nextRows);\n syncToContext(nextRows);\n }, [syncToContext]);\n\n return (\n <div style={{ padding: '16px 0' }}>\n <Text type='secondary' className=\"config-description\">\n Define custom social icons available in the social block.\n </Text>\n <div className=\"config-row-label\">\n <span className=\"config-row-label-text\">Name / Label</span>\n <span className=\"config-row-label-text\">Image URL</span>\n <div style={{ width: 32 }} />\n </div>\n <Divider className=\"config-divider\" />\n {rows.map(row => (\n <SocialIconRowItem key={row.id} row={row} onCommit={handleCommit} onDelete={handleDelete} />\n ))}\n <Button icon={<PlusOutlined />} onClick={handleAdd} size='small' className=\"config-btn-add\">\n Add social icon\n </Button>\n </div>\n );\n}\n\n// ─── Main Popup ───────────────────────────────────────────────────────────────\n\nexport function ConfigurationPopup() {\n const { isConfigOpen, closeConfig } = useEditorConfig();\n\n return (\n <div className=\"config-popup-container\">\n <Modal\n open={isConfigOpen}\n onCancel={closeConfig}\n title='Editor Configuration'\n footer={(\n <Button type='primary' onClick={closeConfig}>\n Done\n </Button>\n )}\n width={680}\n >\n <Tabs\n defaultActiveKey='general'\n items={[\n {\n key: 'general',\n label: 'General',\n children: <GeneralTab />,\n },\n {\n key: 'merge-tags',\n label: 'Merge Tags',\n children: <MergeTagsTab />,\n },\n {\n key: 'social-icons',\n label: 'Social Icons',\n children: <SocialIconsTab />,\n },\n ]}\n />\n </Modal>\n </div>\n );\n}\n","import { ShortcutToolbar } from '../ShortcutToolbar';\nimport { Button, Card, ConfigProvider, Layout, Tabs, App } from 'antd';\nimport { useEditorProps } from '@thanhpv102/easy-email-editor';\nimport React, { useState } from 'react';\nimport { SourceCodePanel } from '../SourceCodePanel';\nimport { AttributePanel } from '../AttributePanel';\nimport { BlockLayer, BlockLayerProps } from '../BlockLayer';\nimport { InteractivePrompt } from '../InteractivePrompt';\nimport styles from './index.module.scss';\nimport enUS from 'antd/locale/en_US';\nimport { MergeTagBadgePrompt } from '@extensions/MergeTagBadgePrompt';\nimport { LeftOutlined, RightOutlined } from '@ant-design/icons';\nimport { ConfigurationPopup } from '../ConfigurationPopup';\n\nexport const SimpleLayout: React.FC<\n {\n showSourceCode?: boolean;\n jsonReadOnly?: boolean;\n mjmlReadOnly?: boolean;\n defaultShowLayer?: boolean;\n children: React.ReactNode | React.ReactElement;\n } & BlockLayerProps\n> = props => {\n const { height: containerHeight } = useEditorProps();\n const { showSourceCode = true, defaultShowLayer = true, jsonReadOnly = true, mjmlReadOnly = true } = props;\n const [collapsed, setCollapsed] = useState(!defaultShowLayer);\n return (\n <ConfigProvider locale={enUS}>\n <App>\n <Layout\n className={styles.SimpleLayout}\n style={{\n display: 'flex',\n width: '100%',\n overflow: 'hidden',\n minWidth: 1400,\n }}\n >\n <Layout.Sider\n style={{ paddingRight: 0 }}\n collapsed={collapsed}\n collapsible\n trigger={null}\n breakpoint=\"xl\"\n collapsedWidth={60}\n width={350}\n >\n <Card\n styles={{ body: { padding: 0 } }}\n style={{ border: 'none' }}\n >\n <Card.Grid style={{ width: 60, display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'flex-start', padding: '12px 0' }}>\n <ShortcutToolbar />\n <Button\n style={{\n marginTop: 30,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n }}\n icon={collapsed ? <RightOutlined /> : <LeftOutlined />}\n shape=\"round\"\n onClick={() => setCollapsed(v => !v)}\n />\n </Card.Grid>\n <Card.Grid\n className={styles.customScrollBar}\n style={{\n flex: 1,\n padding: '0 5px',\n border: 'none',\n height: containerHeight,\n overflowY: 'auto',\n overflowX: 'hidden',\n width: '100%',\n }}\n >\n <Card\n title={'Layout'}\n style={{ border: 'none', width: '100%' }}\n styles={{ header: { height: 50 }, body: { width: '100%', padding: '0 5px' } }}\n >\n {!collapsed && <BlockLayer renderTitle={props.renderTitle} />}\n </Card>\n </Card.Grid>\n </Card>\n </Layout.Sider>\n\n <Layout style={{ height: containerHeight }}>{props.children}</Layout>\n\n <Layout.Sider\n style={{\n height: containerHeight,\n width: 450,\n }}\n className={styles.rightSide}\n >\n <Card\n size=\"small\"\n id=\"rightSide\"\n style={{\n maxHeight: '100%',\n height: '100%',\n borderLeft: 'none',\n borderRadius: 0,\n }}\n styles={{ body: { padding: 0 } }}\n className={styles.customScrollBarV2}\n >\n <Tabs\n className={styles.layoutTabs}\n items={[\n {\n key: 'configuration',\n label: (\n <div style={{ height: 28, lineHeight: '28px', marginLeft: 12, paddingRight: 12, fontSize: 12 }}>\n {'Configuration'}\n </div>\n ),\n children: <AttributePanel />,\n },\n ...(showSourceCode ? [{\n key: 'source-code',\n label: (\n <div style={{ height: 28, lineHeight: '28px', fontSize: 12 }}>\n {'Source code'}\n </div>\n ),\n children: <SourceCodePanel jsonReadOnly={jsonReadOnly} mjmlReadOnly={mjmlReadOnly} />,\n destroyOnHidden: true,\n }] : [])\n ]}\n />\n </Card>\n </Layout.Sider>\n\n <InteractivePrompt />\n <MergeTagBadgePrompt />\n <ConfigurationPopup />\n </Layout>\n </App>\n </ConfigProvider>\n );\n};\n",".StandardLayout {\n :global {\n .arco-layout-sider-children {\n overflow-x: hidden;\n .arco-tabs-content {\n padding: 0;\n }\n }\n .arco-collapse-item-content-expanded {\n overflow: visible;\n }\n .easy-email-editor-tabWrapper {\n padding: 5px;\n }\n }\n}\n",".layoutItem {\r\n :global {\r\n .arco-collapse-item-header {\r\n background-color: #fff !important;\r\n border-color: transparent !important;\r\n }\r\n }\r\n}\r\n\r\n.blockItem {\r\n margin-bottom: 20px;\r\n box-shadow: rgb(55 63 71 / 4%) 0px 0px 0px 1px, rgb(55 63 71 / 8%) 0px 4px 4px 0px,\r\n rgb(55 63 71 / 8%) 0px 8px 24px 0px;\r\n border: 2px solid transparent;\r\n border-radius: 4px;\r\n margin-right: 15px;\r\n &:hover {\r\n box-shadow: 0px 0px 2px 2px rgb(var(--primary-4, #1890ff)) !important;\r\n }\r\n .blockItemContainer {\r\n width: 96px;\r\n height: 96px;\r\n padding: 10px;\r\n text-align: center;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n flex-direction: column;\r\n }\r\n}\r\n.blockItem:nth-child(3n + 1) {\r\n margin-left: 15px;\r\n}\r\n.blockItem:nth-child(3n + 0) {\r\n margin-right: 0;\r\n}\r\n","import { BlockLayerProps } from '@extensions/BlockLayer';\r\nimport { isEqual, omit } from 'lodash';\r\nimport React, { useContext, useMemo, useRef } from 'react';\r\n\r\nexport interface ExtensionProps extends BlockLayerProps {\r\n children?: React.ReactNode | React.ReactElement;\r\n categories: Array<\r\n | {\r\n label: string;\r\n active?: boolean;\r\n blocks: Array<{\r\n type: string;\r\n payload?: any;\r\n title?: string | undefined;\r\n }>;\r\n displayType?: 'grid';\r\n }\r\n | {\r\n label: string;\r\n active?: boolean;\r\n blocks: Array<{\r\n payload?: any;\r\n title?: string | undefined;\r\n }>;\r\n displayType: 'column';\r\n }\r\n | {\r\n label: string;\r\n active?: boolean;\r\n blocks: Array<{\r\n payload?: any;\r\n }>;\r\n displayType: 'widget';\r\n }\r\n | {\r\n label: string;\r\n active?: boolean;\r\n blocks: Array<React.ReactNode>;\r\n displayType: 'custom';\r\n }\r\n >;\r\n showSourceCode?: boolean;\r\n jsonReadOnly?: boolean;\r\n mjmlReadOnly?: boolean;\r\n compact?: boolean;\r\n showBlockLayer?: boolean;\r\n}\r\n\r\nexport const ExtensionContext = React.createContext<ExtensionProps>({\r\n categories: [],\r\n});\r\n\r\nexport const ExtensionProvider: React.FC<ExtensionProps> = props => {\r\n const value = omit(props, 'children');\r\n const valueRef = useRef(value);\r\n\r\n const cacheValue = useMemo(() => {\r\n if (!isEqual(value, valueRef)) {\r\n valueRef.current = value;\r\n }\r\n return valueRef.current;\r\n }, [value, valueRef]);\r\n\r\n return (\r\n <ExtensionContext.Provider value={cacheValue}>\r\n {props.children}\r\n </ExtensionContext.Provider>\r\n );\r\n};\r\n\r\nexport function useExtensionProps() {\r\n return useContext(ExtensionContext);\r\n}\r\n","import { Collapse, Row, Space, Typography } from 'antd';\nimport { AdvancedType, BlockManager, IBlockData } from '@thanhpv102/easy-email-core';\nimport { BlockAvatarWrapper, IconFont } from '@thanhpv102/easy-email-editor';\nimport React, { useMemo, useState } from 'react';\nimport { CaretRightOutlined, CaretUpOutlined } from '@ant-design/icons';\nimport { getIconNameByBlockType } from '@extensions/utils/getIconNameByBlockType';\nimport styles from './index.module.scss';\nimport { useExtensionProps } from '@extensions/components/Providers/ExtensionProvider';\n\nexport function Blocks() {\n const { categories } = useExtensionProps();\n\n const defaultActiveKey = useMemo(\n () => [\n ...categories.filter((item) => item.active).map((item) => item.label),\n ],\n [categories]\n );\n const collapseItems = categories.map((cat, index) => {\n let panelChildren: React.ReactNode;\n\n if (cat.displayType === 'column') {\n panelChildren = (\n <>\n <Space orientation='vertical'>\n <div />\n </Space>\n {cat.blocks.map((item) => (\n <LayoutItem\n key={item.title}\n title={item.title || ''}\n columns={item.payload}\n />\n ))}\n <Space orientation='vertical'>\n <div />\n </Space>\n </>\n );\n } else if (cat.displayType === 'custom') {\n panelChildren = (\n <Row>\n {cat.blocks.map((item, blockIndex) => {\n if (\n typeof item === 'object' &&\n item !== null &&\n !React.isValidElement(item) &&\n 'type' in item &&\n 'children' in item\n ) {\n const customBlock = item as {\n type: string;\n payload?: any;\n title?: string;\n children: React.ReactNode;\n canDragAndDrop?: boolean;\n };\n const canDragAndDrop = customBlock.canDragAndDrop !== false;\n const blockContent = (\n <div className={styles.blockItemContainer}>\n {customBlock.children}\n </div>\n );\n return (\n <div key={blockIndex} className={styles.blockItem}>\n {canDragAndDrop ? (\n <BlockAvatarWrapper\n type={customBlock.type}\n payload={customBlock.payload}\n >\n {blockContent}\n </BlockAvatarWrapper>\n ) : (\n <div style={{ cursor: 'not-allowed', opacity: 0.6 }}>\n {blockContent}\n </div>\n )}\n </div>\n );\n }\n return <React.Fragment key={blockIndex}>{item}</React.Fragment>;\n })}\n </Row>\n );\n } else {\n panelChildren = (\n <Row>\n {cat.blocks.map((item, index) => {\n return <BlockItem key={index} {...(item as any)} />;\n })}\n </Row>\n );\n }\n\n return {\n key: index,\n label: cat.label,\n extra: cat.label,\n style: cat.displayType === 'column'\n ? { padding: '0px 20px' }\n : { padding: 0, paddingBottom: 0, paddingTop: 20 },\n children: panelChildren,\n };\n });\n\n return (\n <Collapse\n defaultActiveKey={defaultActiveKey}\n style={{ paddingBottom: 30, minHeight: '100%' }}\n items={collapseItems}\n />\n );\n}\n\nfunction BlockItem({\n type,\n payload,\n title,\n filterType,\n}: {\n type: string;\n payload?: Partial<IBlockData>;\n title?: string;\n filterType: string | undefined;\n}) {\n const block = BlockManager.getBlockByType(type);\n\n return (\n <div className={styles.blockItem}>\n <BlockAvatarWrapper type={type} payload={payload}>\n <div className={styles.blockItemContainer}>\n <IconFont\n style={{ fontSize: 20 }}\n iconName={getIconNameByBlockType(type)}\n />\n <Typography.Text style={{ marginTop: 10 }}>\n {title || block?.name}\n </Typography.Text>\n </div>\n </BlockAvatarWrapper>\n </div>\n );\n}\n\nfunction LayoutItem({\n columns,\n title,\n}: {\n columns: string[][];\n title: string;\n}) {\n const [visible, setVisible] = useState(false);\n\n return (\n <div>\n <p\n onClick={() => setVisible((v) => !v)}\n style={{\n display: 'flex',\n justifyContent: 'space-between',\n cursor: 'pointer',\n }}\n >\n <span>{title}</span>\n {columns.length > 1 && (\n <span>{!visible ? <CaretRightOutlined /> : <CaretUpOutlined />}</span>\n )}\n </p>\n {columns.map((item, index) => {\n const hide = !visible && index !== 0;\n const payload = {\n type: AdvancedType.SECTION,\n attributes: {},\n children: item.map((col) => ({\n type: AdvancedType.COLUMN,\n attributes: {\n width: col,\n },\n data: {\n value: {},\n },\n children: [],\n })),\n };\n\n return (\n <div\n key={index}\n style={{\n height: hide ? 0 : undefined,\n overflow: 'hidden',\n marginBottom: hide ? 0 : 20,\n }}\n >\n <BlockAvatarWrapper type={AdvancedType.SECTION} payload={payload}>\n <div\n style={{\n border: '1px solid rgb(229, 229, 229)',\n width: '100%',\n padding: 10,\n }}\n >\n <div\n style={{\n height: 16,\n border: '1px solid rgb(85, 85, 85)',\n borderRadius: 3,\n display: 'flex',\n }}\n >\n {item.map((column, index) => {\n return (\n <div\n key={index}\n style={{\n borderRight:\n index === item.length - 1\n ? undefined\n : '1px solid rgb(85, 85, 85)',\n height: '100%',\n width: column,\n }}\n />\n );\n })}\n </div>\n </div>\n </BlockAvatarWrapper>\n </div>\n );\n })}\n </div>\n );\n}\n","import React from 'react';\r\nimport 'overlayscrollbars/overlayscrollbars.css';\r\nimport { OverlayScrollbarsComponent } from 'overlayscrollbars-react';\r\n\r\nexport const FullHeightOverlayScrollbars: React.FC<{\r\n children: React.ReactNode | React.ReactElement;\r\n height: string | number;\r\n}> = props => {\r\n return (\r\n <OverlayScrollbarsComponent options={{ scrollbars: { autoHide: 'scroll' } }}>\r\n <div style={{ height: props.height }}>{props.children}</div>\r\n </OverlayScrollbarsComponent>\r\n );\r\n};\r\n",".largeTabsHeader {\r\n :global {\r\n .arco-tabs-header {\r\n width: 100%;\r\n display: flex;\r\n .arco-tabs-header-title {\r\n flex: 1;\r\n margin: 0px !important;\r\n padding: 0 !important;\r\n height: 60px;\r\n line-height: 60px;\r\n .arco-tabs-header-title-text {\r\n display: block;\r\n text-align: center;\r\n width: 100%;\r\n &::before {\r\n display: none;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",".largeTabsHeader {\r\n :global {\r\n .arco-tabs-header {\r\n width: 100%;\r\n display: flex;\r\n .arco-tabs-header-title {\r\n flex: 1;\r\n margin: 0px !important;\r\n padding: 0 !important;\r\n height: 60px;\r\n line-height: 60px;\r\n .arco-tabs-header-title-text {\r\n display: block;\r\n text-align: center;\r\n width: 100%;\r\n &::before {\r\n display: none;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n","import React, { useEffect, useState } from 'react';\r\nimport { Tabs } from 'antd';\r\nimport { LeftOutlined } from '@ant-design/icons';\r\nimport { AttributePanel } from '@extensions/AttributePanel';\r\nimport { SourceCodePanel } from '@extensions/SourceCodePanel';\r\nimport { FullHeightOverlayScrollbars } from '@extensions/components/FullHeightOverlayScrollbars';\r\nimport styles from './index.module.scss';\r\n\r\nexport interface ConfigurationPanelProps {\r\n showSourceCode: boolean;\r\n jsonReadOnly: boolean;\r\n mjmlReadOnly: boolean;\r\n height: string;\r\n onBack?: () => void;\r\n compact?: boolean;\r\n}\r\n\r\nexport function ConfigurationPanel({\r\n showSourceCode,\r\n height,\r\n onBack,\r\n compact,\r\n jsonReadOnly,\r\n mjmlReadOnly,\r\n }: ConfigurationPanelProps) {\r\n const [inited, setInited] = useState(false);\r\n\r\n useEffect(() => {\r\n // Tabs 在 drawer 里面有bug\r\n let timer = setTimeout(() => {\r\n setInited(true);\r\n }, 100);\r\n return () => {\r\n clearTimeout(timer);\r\n };\r\n }, []);\r\n\r\n if (!inited) return null;\r\n\r\n return (\r\n <>\r\n {showSourceCode ? (\r\n <Tabs\r\n className={styles.tabs}\r\n renderTabBar={(props, DefaultTabBar) =>\r\n !compact ? (\r\n <div\r\n className={styles.largeTabsHeader}\r\n style={{ display: 'flex', alignItems: 'center' }}\r\n >\r\n <div\r\n style={{ padding: 10, cursor: 'pointer' }}\r\n onClick={onBack}\r\n >\r\n <LeftOutlined style={{ fontSize: 16 }} />\r\n </div>\r\n <DefaultTabBar {...props} style={{ flex: 1 }} />\r\n </div>\r\n ) : (\r\n <div\r\n className={styles.largeTabsHeader}\r\n style={{ display: 'flex', alignItems: 'center' }}\r\n >\r\n <DefaultTabBar {...props} style={{ flex: 1 }} />\r\n </div>\r\n )\r\n }\r\n items={[\r\n {\r\n key: 'configuration',\r\n label: (\r\n <div style={{ height: 40, lineHeight: '40px' }}>{'Configuration'}</div>\r\n ),\r\n children: (\r\n <FullHeightOverlayScrollbars height={`calc(${height} - 60px)`}>\r\n <AttributePanel />\r\n </FullHeightOverlayScrollbars>\r\n ),\r\n },\r\n {\r\n key: 'source-code',\r\n label: (\r\n <div style={{ height: 40, lineHeight: '40px' }}>{'Source code'}</div>\r\n ),\r\n children: (\r\n <FullHeightOverlayScrollbars height={`calc(${height} - 60px)`}>\r\n <SourceCodePanel jsonReadOnly={jsonReadOnly} mjmlReadOnly={mjmlReadOnly} />\r\n </FullHeightOverlayScrollbars>\r\n ),\r\n destroyOnHidden: true,\r\n },\r\n ]}\r\n />\r\n ) : (\r\n <AttributePanel />\r\n )}\r\n </>\r\n );\r\n}\r\n","import { useFocusIdx } from '@thanhpv102/easy-email-editor';\r\nimport { Drawer } from 'antd';\r\nimport { ConfigurationPanel } from '@extensions/ConfigurationPanel';\r\nimport React, { useCallback, useMemo, useRef } from 'react';\r\n\r\nexport function ConfigurationDrawer({\r\n height,\r\n compact,\r\n showSourceCode,\r\n jsonReadOnly,\r\n mjmlReadOnly,\r\n}: {\r\n height: string;\r\n compact: boolean;\r\n showSourceCode: boolean;\r\n jsonReadOnly: boolean;\r\n mjmlReadOnly: boolean;\r\n}) {\r\n const refWrapper = useRef(null);\r\n const { focusIdx, setFocusIdx } = useFocusIdx();\r\n\r\n const onClose = useCallback(() => {\r\n setFocusIdx('');\r\n }, [setFocusIdx]);\r\n\r\n const visible = Boolean(focusIdx);\r\n return useMemo(() => {\r\n return (\r\n <>\r\n <div\r\n ref={refWrapper}\r\n style={{\r\n position: 'absolute',\r\n top: 0,\r\n left: 0,\r\n width: '100%',\r\n height: '100%',\r\n zIndex: visible ? 1 : -1,\r\n pointerEvents: visible ? 'auto' : 'none',\r\n }}\r\n />\r\n {refWrapper.current && (\r\n <Drawer\r\n title={null}\r\n closable={false}\r\n placement='right'\r\n styles={{ body: { padding: 0 }, wrapper: { width: '100%' } }}\r\n open\r\n getContainer={() => refWrapper.current || document.body}\r\n footer={null}\r\n onClose={onClose}\r\n >\r\n <ConfigurationPanel\r\n compact={compact}\r\n showSourceCode={showSourceCode}\r\n height={height}\r\n onBack={onClose}\r\n jsonReadOnly={jsonReadOnly}\r\n mjmlReadOnly={mjmlReadOnly}\r\n />\r\n </Drawer>\r\n )}\r\n </>\r\n );\r\n }, [visible, onClose, compact, showSourceCode, height, jsonReadOnly, mjmlReadOnly]);\r\n}\r\n","import { Layout, Tabs } from 'antd';\r\nimport { useEditorProps } from '@thanhpv102/easy-email-editor';\r\nimport React from 'react';\r\nimport { Blocks } from './Blocks';\r\nimport { BlockLayer } from '@extensions/BlockLayer';\r\nimport { FullHeightOverlayScrollbars } from '@extensions/components/FullHeightOverlayScrollbars';\r\nimport styles from './index.module.scss';\r\nimport { ConfigurationDrawer } from './ConfigurationDrawer';\r\nimport { useExtensionProps } from '@extensions/components/Providers/ExtensionProvider';\r\n\r\nexport function EditPanel({\r\n showSourceCode,\r\n jsonReadOnly,\r\n mjmlReadOnly,\r\n }: {\r\n showSourceCode: boolean;\r\n jsonReadOnly: boolean;\r\n mjmlReadOnly: boolean;\r\n}) {\r\n const { height } = useEditorProps();\r\n const { compact = true, showBlockLayer = true } = useExtensionProps();\r\n\r\n return (\r\n <Layout.Sider\r\n className={styles.blocksPanel}\r\n style={{ paddingRight: 0, minWidth: 360 }}\r\n // collapsed={collapsed}\r\n collapsible\r\n trigger={null}\r\n breakpoint=\"xl\"\r\n collapsedWidth={60}\r\n width={360}\r\n >\r\n <Tabs\r\n defaultActiveKey='2'\r\n style={{ width: '100%', padding: 0 }}\r\n renderTabBar={(props, DefaultTabBar) => (\r\n <div className={styles.largeTabsHeader}>\r\n <DefaultTabBar {...props} />\r\n </div>\r\n )}\r\n items={[\r\n {\r\n key: '2',\r\n label: 'Block',\r\n children: (\r\n <FullHeightOverlayScrollbars height={`calc(${height} - 60px)`}>\r\n <Blocks />\r\n </FullHeightOverlayScrollbars>\r\n )\r\n },\r\n ...(showBlockLayer ? [{\r\n key: '1',\r\n label: 'Layer',\r\n children: (\r\n <FullHeightOverlayScrollbars height={`calc(${height} - 60px)`}>\r\n <div style={{ padding: 20 }}>\r\n <BlockLayer />\r\n </div>\r\n </FullHeightOverlayScrollbars>\r\n )\r\n }] : [])\r\n ]}\r\n />\r\n {!compact && (\r\n <ConfigurationDrawer\r\n height={height}\r\n showSourceCode={showSourceCode}\r\n compact={Boolean(compact)}\r\n jsonReadOnly={jsonReadOnly}\r\n mjmlReadOnly={mjmlReadOnly}\r\n />\r\n )}\r\n </Layout.Sider>\r\n );\r\n}\r\n","import { App, Card, ConfigProvider, Layout } from 'antd';\nimport { useEditorProps, useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport React, { useEffect } from 'react';\nimport { InteractivePrompt } from '../InteractivePrompt';\nimport styles from './index.module.scss';\nimport enUS from 'antd/locale/en_US';\nimport { MergeTagBadgePrompt } from '@extensions/MergeTagBadgePrompt';\nimport { EditPanel } from '../EditPanel';\nimport { ConfigurationPanel } from '@extensions/ConfigurationPanel';\nimport { ExtensionProps, ExtensionProvider } from '@extensions/components/Providers/ExtensionProvider';\nimport { AdvancedType } from '@thanhpv102/easy-email-core';\nimport { ConfigurationPopup } from '../ConfigurationPopup';\n\nconst defaultCategories: ExtensionProps['categories'] = [\n {\n get label() {\n return 'Content';\n },\n active: true,\n blocks: [\n {\n type: AdvancedType.TEXT,\n },\n {\n type: AdvancedType.IMAGE,\n payload: { attributes: { padding: '0px 0px 0px 0px' } },\n },\n {\n type: AdvancedType.BUTTON,\n },\n {\n type: AdvancedType.SOCIAL,\n },\n {\n type: AdvancedType.DIVIDER,\n },\n {\n type: AdvancedType.SPACER,\n },\n {\n type: AdvancedType.HERO,\n },\n {\n type: AdvancedType.WRAPPER,\n },\n ],\n },\n {\n get label() {\n return 'Layout';\n },\n active: true,\n displayType: 'column',\n blocks: [\n {\n get title() {\n return '2 columns';\n },\n payload: [\n ['50%', '50%'],\n ['33%', '67%'],\n ['67%', '33%'],\n ['25%', '75%'],\n ['75%', '25%'],\n ],\n },\n {\n get title() {\n return '3 columns';\n },\n payload: [\n ['33.33%', '33.33%', '33.33%'],\n ['25%', '25%', '50%'],\n ['50%', '25%', '25%'],\n ],\n },\n {\n get title() {\n return '4 columns';\n },\n payload: [['25%', '25%', '25%', '25%']],\n },\n ],\n },\n];\n\nexport const StandardLayout: React.FC<ExtensionProps> = props => {\n const { height: containerHeight } = useEditorProps();\n const {\n showSourceCode = true,\n compact = true,\n categories = defaultCategories,\n jsonReadOnly = false,\n mjmlReadOnly = true,\n } = props;\n\n const { setFocusIdx } = useFocusIdx();\n\n useEffect(() => {\n if (!compact) {\n setFocusIdx('');\n }\n }, [compact, setFocusIdx]);\n\n return (\n <ExtensionProvider\n {...props}\n categories={categories}\n >\n <ConfigProvider locale={enUS}>\n <App>\n <Card\n style={{ padding: 0 }}\n styles={{\n body: {\n padding: 0,\n height: containerHeight,\n overflow: 'hidden',\n },\n }}\n >\n <Layout\n className={styles.StandardLayout}\n style={{\n display: 'flex',\n width: '100%',\n overflow: 'hidden',\n }}\n >\n {compact && (\n <EditPanel\n showSourceCode={showSourceCode}\n jsonReadOnly={jsonReadOnly}\n mjmlReadOnly={mjmlReadOnly}\n />\n )}\n <Layout style={{ height: containerHeight, flex: 1 }}>{props.children}</Layout>\n {!compact && (\n <EditPanel\n showSourceCode={showSourceCode}\n jsonReadOnly={jsonReadOnly}\n mjmlReadOnly={mjmlReadOnly}\n />\n )}\n {compact ? (\n <Layout.Sider\n style={{\n height: containerHeight,\n minWidth: 300,\n maxWidth: 350,\n width: 350,\n }}\n >\n <ConfigurationPanel\n compact={compact}\n height={containerHeight}\n showSourceCode={showSourceCode}\n jsonReadOnly={jsonReadOnly}\n mjmlReadOnly={mjmlReadOnly}\n />\n </Layout.Sider>\n ) : (\n <Layout.Sider style={{ width: 0, overflow: 'hidden' }} />\n )}\n </Layout>\n </Card>\n\n <InteractivePrompt />\n <MergeTagBadgePrompt />\n <ConfigurationPopup />\n </App>\n </ConfigProvider>\n </ExtensionProvider>\n );\n};\n"],"x_google_ignoreList":[171,172,173,174,175,176,177,178,179],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACKA,SAAgB,UAAQ,EACtB,cACA,WACA,sBAKC;CASD,OARI,IAEA,oBAAC,OAAD;EAAK,OAAO,EAAE,YAAY,SAAS;YACjC,oBAAC,UAAD,EAAU,UAAS,WAAY,CAAA;CAC5B,CAAA,IAEL,EAAU,SAAS,UAAU,KAAK,SAAS,IAAU,OAElD,EAAU,KAAK,SACpB,oBAAC,UAAD;EACE,UAAU,MAAO,EAAgB,GAAW,CAAE;EAC9C,UAAS;CACV,CAAA,IAED,oBAAC,UAAD;EACE,UAAU,MAAO,EAAgB,GAAW,CAAE;EAC9C,UAAS;CACV,CAAA;AAEL;;;ACjCA,IAAa,mBACX;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,WAAQ,iBAAc,eAAA,GAAY,IAAA,yBAAA,GAAA,SAAA;CAEjD,OACE,qBAAC,WAAA,eAAA,eAAA,CAAA,GACU,CAAA,GAAA,CAAA,GAAA;EAEP,KAAK,KAAA;EACL,OAAA,eAAA;GACE,SAAS;GACF;GACC;GACM;GACL;GACT,UAAU,IAAe,WAAW,KAAA;GACpC,UAAU;KACP,CACL;YAbJ;GAgBG,CAAC,KACA,oBAAC,QAAD,EACE,OAAO;IACL,UAAU;IACV,KAAK;IACL,MAAM;IACN,OAAO;IACP,QAAQ;IACR,YAAY;IACZ,gBAAgB;IAChB,WAAW;IACG;IACd,SAAS;IACT,QAAQ;GACV,EACD,CAAA;GAEH,oBAAC,UAAD,EACE,QAAQ,EACT,CAAA;GACD,oBAAC,OAAD;IACE,OAAO;KACL,OAAO,KAAS;KAChB,QAAQ,KAAU;KAClB,UAAU;KACV,WAAW;KACX,SAAS;KACT,SAAS;KACT,YAAY;IACd;IACA,KAAK;IACL,KAAI;IACJ,cAAc,EAAU,EAAI;GAC7B,CAAA;EACM;;AAEb;;;AC0CA,aAAa,IAAI;CAtIf,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,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MACV,aAAa;MACb,SAAS;MACT,eAAe;MACf,OAAO;MACP,OAAO;KACT;KACA,UAAU,CAAC;IACb;IACA;KACE,MAAM;KACN,MAAM,EACJ,OAAO,EACL,SAAS,uBACX,EACF;KACA,YAAY;MACV,OAAO;MACP,oBAAoB;MACpB,OAAO;MACP,aAAa;MACb,eAAe;MACf,iBAAiB;MACjB,SAAS;MACT,iBAAiB;MACjB,eAAe;MACf,QAAQ;MACR,kBAAkB;MAClB,QAAQ;MACR,cAAc;MACd,MAAM;KACR;KACA,UAAU,CAAC;IACb;GACF;EACF;CACF;CACA;EACE,WAAW,OAAO,UAAU;EAC5B,SAAS;GACP,MAAM,aAAa;GACnB,MAAM,EACJ,OAAO,EACL,SACE,mNACJ,EACF;GACA,YAAY;IACV,oBAAoB;IACpB,uBAAuB;IACvB,MAAM;IACN,SAAS;IACT,kBAAkB;IAClB,kBAAkB,OAAO,UAAU;IACnC,kBAAkB;GACpB;GACA,UAAU;IACR;KACE,MAAM;KACN,MAAM,EACJ,OAAO,EACL,SAAS,SACX,EACF;KACA,YAAY;MACV,aAAa;MACb,SAAS;MACT,eAAe;MACf,OAAO;MACP,OAAO;MACP,QAAQ;MACR,eAAe;MACf,oBAAoB;MACpB,iBAAiB;MACjB,eAAe;MACf,iBAAiB;KACnB;KACA,UAAU,CAAC;IACb;IACA;KACE,MAAM;KACN,MAAM,EACJ,OAAO,EACL,SAAS,qCACX,EACF;KACA,YAAY;MACV,OAAO;MACP,oBAAoB;MACpB,OAAO;MACP,aAAa;MACb,eAAe;MACf,iBAAiB;MACjB,SAAS;MACT,iBAAiB;MACjB,eAAe;MACf,QAAQ;MACR,kBAAkB;MAClB,QAAQ;MACR,cAAc;MACd,MAAM;KACR;KACA,UAAU,CAAC;IACb;IACA;KACE,MAAM;KACN,YAAY;MACV,aAAa;MACb,SAAS;MACT,eAAe;MACf,OAAO;MACP,OAAO;KACT;KACA,MAAM,EACJ,OAAO,EACL,SACE,kHACJ,EACF;KACA,UAAU,CAAC;IACb;IACA;KACE,MAAM;KACN,YAAY;MACV,iBAAiB;MACjB,eAAe;MACf,oBAAoB;MACpB,SAAS;KACX;KACA,MAAM,EACJ,OAAO,EACL,SAAS,YACX,EACF;KACA,UAAU,CAAC;IACb;GACF;EACF;CACF;CACA;EACE,WAAW,OAAO,UAAU;EAC5B,SAAS;GACP,MAAM,aAAa;GACnB,MAAM,EACJ,OAAO,EACL,SACE,mNACJ,EACF;GACA,YAAY;IACV,oBAAoB;IACpB,uBAAuB;IACvB,MAAM;IACN,SAAS;IACT,kBAAkB;IAClB,kBAAkB,OAAO,UAAU;IACnC,kBAAkB;GACpB;GACA,UAAU;IACR;KACE,MAAM;KACN,MAAM,EACJ,OAAO,EACL,SAAS,sDACX,EACF;KACA,YAAY;MACV,OAAO;MACP,oBAAoB;MACpB,OAAO;MACP,aAAa;MACb,eAAe;MACf,iBAAiB;MACjB,SAAS;MACT,iBAAiB;MACjB,eAAe;MACf,QAAQ;MACR,kBAAkB;MAClB,QAAQ;MACR,cAAc;MACd,MAAM;MACN,eAAe;KACjB;KACA,UAAU,CAAC;IACb;IACA;KACE,MAAM;KACN,YAAY;MACV,aAAa;MACb,SAAS;MACT,eAAe;MACf,OAAO;MACP,OAAO;KACT;KACA,MAAM,EACJ,OAAO,EACL,SACE,gGACJ,EACF;KACA,UAAU,CAAC;IACb;IACA;KACE,MAAM;KACN,YAAY;MACV,iBAAiB;MACjB,eAAe;MACf,oBAAoB;MACpB,SAAS;KACX;KACA,MAAM,EACJ,OAAO,EACL,SAAS,gBACX,EACF;KACA,UAAU,CAAC;IACb;GACF;EACF;CACF;CACA;EACE,WAAW,OAAO,UAAU;EAC5B,SAAS;GACP,MAAM,aAAa;GACnB,YAAY;IACV,oBAAoB;IACpB,uBAAuB;IACvB,MAAM;IACN,SAAS;IACT,kBAAkB;IAClB,kBAAkB,OAAO,UAAU;GACrC;GACA,MAAM,EACJ,OAAO,EACL,SACE,oQACJ,EACF;GACA,UAAU;IACR;KACE,MAAM;KACN,YAAY;MACV,aAAa;MACb,SAAS;MACT,eAAe;MACf,OAAO;MACP,OAAO;KACT;KACA,MAAM,EACJ,OAAO,EACL,SAAS,8BACX,EACF;KACA,UAAU,CAAC;IACb;IACA;KACE,MAAM;KACN,YAAY;MACV,aAAa;MACb,SAAS;MACT,eAAe;MACf,OAAO;MACP,OAAO;KACT;KACA,MAAM,EACJ,OAAO,EACL,SACE,wLACJ,EACF;KACA,UAAU,CAAC;IACb;IACA;KACE,MAAM;KACN,YAAY;MACV,OAAO;MACP,eAAe;MACf,KAAK,OAAO,UAAU;MACtB,QAAQ;MACR,MAAM;KACR;KACA,MAAM,EACJ,OAAO,EACL,SAAS,GACX,EACF;KACA,UAAU,CAAC;IACb;GACF;EACF;CACF;AACF;;;;AC7WA,IAAM,aAAa;CACjB;EACE,WAAW,OAAO,UAAU;EAC5B,SAAS;GACP,YAAY;IACV,OAAO;IACP,oBAAoB;IACpB,OAAO;IACP,aAAa;IACb,eAAe;IACf,iBAAiB;IACjB,SAAS;IACT,iBAAiB;IACjB,eAAe;IACf,QAAQ;IACR,kBAAkB;IAClB,QAAQ;IACR,cAAc;IACd,MAAM;GACR;GACA,MAAM,EACJ,OAAO,EACL,SAAS,YACX,EACF;EACF;CACF;CACA;EACE,WAAW,OAAO,UAAU;EAC5B,SAAS;GACP,YAAY;IACV,OAAO;IACP,oBAAoB;IACpB,OAAO;IACP,aAAa;IACb,eAAe;IACf,iBAAiB;IACjB,SAAS;IACT,iBAAiB;IACjB,eAAe;IACf,QAAQ;IACR,kBAAkB;IAClB,QAAQ;IACR,cAAc;IACd,MAAM;GACR;GACA,MAAM,EACJ,OAAO,EACL,SAAS,YACX,EACF;GACA,UAAU,CAAC;EACb;CACF;CACA;EACE,WAAW,OAAO,UAAU;EAC5B,SAAS;GACP,YAAY;IACV,OAAO;IACP,oBAAoB;IACpB,OAAO;IACP,aAAa;IACb,eAAe;IACf,iBAAiB;IACjB,SAAS;IACT,iBAAiB;IACjB,eAAe;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,YAAY;OACV,OAAO;OACP,QAAQ;OACR,SAAS;OACT,KAAK,OAAO,UAAU;OACtB,OAAO;MACT;MACA,UAAU,CAAC;KACb,CACF;IACF,CACF;GACF,CACF;EACF;CACF;CACA;EACE,WAAW,OAAO,UAAU;EAC5B,SAAS;GACP,MAAM;GACN,MAAM,EACJ,OAAO,EACL,QAAQ,GACV,EACF;GACA,YAAY;IACV,kBAAkB;IAClB,WAAW;IACX,oBAAoB;GACtB;GACA,UAAU,CACR;IACE,MAAM;IACN,MAAM,EACJ,OAAO,CAAC,EACV;IACA,YAAY;KACV,kBAAkB;KAClB,WAAW;IACb;IACA,UAAU;KACR;MACE,MAAM;MACN,MAAM,EACJ,OAAO,CAAC,EACV;MACA,YAAY;OACV,SAAS;OACT,QAAQ;OACR,kBAAkB;MACpB;MACA,UAAU,CACR;OACE,MAAM;OACN,MAAM,EACJ,OAAO,CAAC,EACV;OACA,YAAY;QACV,OAAO;QACP,QAAQ;QACR,SAAS;QACT,KAAK,OAAO,UAAU;QACtB,OAAO;OACT;OACA,UAAU,CAAC;MACb,GACA;OACE,MAAM;OACN,MAAM,EACJ,OAAO,EACL,SAAS,wBACX,EACF;OACA,YAAY;QACV,aAAa;QACb,SAAS;QACT,eAAe;QACf,OAAO;OACT;OACA,UAAU,CAAC;MACb,CACF;KACF;KACA;MACE,MAAM;MACN,MAAM,EACJ,OAAO,CAAC,EACV;MACA,YAAY;OACV,SAAS;OACT,QAAQ;OACR,kBAAkB;MACpB;MACA,UAAU,CACR;OACE,MAAM;OACN,MAAM,EACJ,OAAO,CAAC,EACV;OACA,YAAY;QACV,OAAO;QACP,QAAQ;QACR,SAAS;QACT,KAAK,OAAO,UAAU;QACtB,OAAO;OACT;OACA,UAAU,CAAC;MACb,GACA;OACE,MAAM;OACN,MAAM,EACJ,OAAO,EACL,SAAS,mCACX,EACF;OACA,YAAY;QACV,aAAa;QACb,SAAS;QACT,eAAe;QACf,OAAO;OACT;OACA,UAAU,CAAC;MACb,CACF;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AAO;OACP,UAAU;MACZ;gBANF;OAQG,KACC,oBAAC,WAAD;QACkB;QACF;QACA;OACf,CAAA;OAEH,oBAAC,QAAD;QAAQ,OAAO;SAAE,QAAQ;SAAiB,MAAM;QAAE;kBAAI,EAAM;OAAiB,CAAA;OAC5E,CAAC,KACA,oBAAC,WAAD;QACkB;QACF;QACA;OACf,CAAA;OAEF,IACC,oBAAC,OAAO,OAAR;QACE,OAAO;SACL,QAAQ;SACR,UAAU;SACV,UAAU;SACV,OAAO;QACT;kBAEA,oBAAC,oBAAD;SACW;SACT,QAAQ;SACQ;SACF;SACA;QACf,CAAA;OACW,CAAA,IAEd,oBAAC,OAAO,OAAR,EAAc,OAAO;QAAE,OAAO;QAAG,UAAU;OAAS,EAAI,CAAA;MAEpD;;IACJ,CAAA;IAEN,oBAAC,mBAAD,CAAoB,CAAA;IACpB,oBAAC,qBAAD,CAAsB,CAAA;IACtB,oBAAC,oBAAD,CAAqB,CAAA;GAClB,EAAA,CAAA;EACS,CAAA;EACC,CAAA;AAEvB"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/BlockLayer/index.module.scss","../src/BlockLayer/components/EyeIcon/index.tsx","../src/BlockLayer/components/BlockTree/transparentImage.ts","../src/BlockLayer/components/BlockTree/index.tsx","../src/BlockLayer/components/ContextMenu/index.module.scss","../src/components/Form/ImageUploader/index.module.scss","../src/AttributePanel/utils/PromiseEach.ts","../src/AttributePanel/utils/Uploader.ts","../src/AttributePanel/utils/classnames.ts","../src/AttributePanel/utils/previewLoadImage.ts","../src/components/Form/ImageUploader/index.tsx","../src/components/Form/Select.tsx","../src/components/Form/RadioGroup.tsx","../src/components/Form/enhancer.tsx","../src/components/Form/Input.tsx","../src/components/Form/InputWithUnit.tsx","../src/components/Form/CheckBoxGroup.tsx","../src/utils/classnames.ts","../src/components/Form/index.module.scss","../src/components/Form/EditTab.tsx","../src/components/Form/EditGridTab.tsx","../src/components/Form/AutoComplete.tsx","../src/AttributePanel/utils/InputNumberAdapter.tsx","../src/AttributePanel/components/adapter/pixel.adapter.ts","../src/AttributePanel/components/adapter/color.adapter.ts","../src/AttributePanel/components/adapter/image-height.adapter.ts","../src/AttributePanel/utils/getImg.ts","../src/AttributePanel/components/provider/PresetColorsProvider/index.tsx","../src/components/Form/ColorPicker/ColorPickerContent.tsx","../src/components/Form/RichTextToolBar/hooks/useRichTextPopupOpen.ts","../src/components/Form/RichTextToolBar/components/RichTextPortalPopup/index.tsx","../src/components/Form/ColorPicker/index.tsx","../src/components/Form/ColorPickerField/index.tsx","../src/components/Form/InlineTextField/index.tsx","../src/components/Form/RichTextToolBar/components/ToolItem/index.tsx","../src/components/Form/RichTextToolBar/components/Link/index.tsx","../src/hooks/useFontFamily.tsx","../src/components/Form/RichTextToolBar/components/FontFamily/index.tsx","../src/AttributePanel/components/UI/Help/index.module.scss","../src/AttributePanel/components/UI/Help/index.tsx","../src/components/Form/AddFont.tsx","../src/AttributePanel/components/attributes/AttributesPanelWrapper/index.tsx","../src/AttributePanel/components/attributes/FontFamily.tsx","../src/AttributePanel/components/blocks/Page/index.tsx","../src/AttributePanel/components/attributes/Padding.tsx","../src/AttributePanel/components/attributes/BackgroundColor.tsx","../src/AttributePanel/components/attributes/Background.tsx","../src/AttributePanel/components/attributes/Border.tsx","../src/AttributePanel/components/attributes/ClassName.tsx","../src/AttributePanel/components/attributes/Iteration.tsx","../src/AttributePanel/components/attributes/Condition.tsx","../src/AttributePanel/components/attributes/CollapseWrapper/index.tsx","../src/AttributePanel/components/blocks/Section/index.tsx","../src/AttributePanel/components/attributes/Width.tsx","../src/AttributePanel/components/attributes/VerticalAlign.tsx","../src/AttributePanel/components/attributes/Align.tsx","../src/AttributePanel/components/attributes/Color.tsx","../src/AttributePanel/components/attributes/Height.tsx","../src/AttributePanel/components/attributes/TextAlign.tsx","../src/AttributePanel/components/attributes/ContainerBackgroundColor.tsx","../src/AttributePanel/components/attributes/LetterSpacing.tsx","../src/AttributePanel/components/attributes/TextDecoration.tsx","../src/AttributePanel/components/attributes/Decoration.tsx","../src/AttributePanel/components/attributes/LineHeight.tsx","../src/AttributePanel/components/attributes/TextTransform.tsx","../src/AttributePanel/components/attributes/Direction.tsx","../src/utils/getContextMergeTags.ts","../src/AttributePanel/components/attributes/MergeTags.tsx","../src/AttributePanel/components/attributes/Link.tsx","../src/AttributePanel/components/attributes/Margin.tsx","../src/AttributePanel/components/attributes/BorderColor.tsx","../src/AttributePanel/components/attributes/FontSize.tsx","../src/AttributePanel/components/attributes/BorderStyle.tsx","../src/AttributePanel/components/attributes/FontStyle.tsx","../src/AttributePanel/components/attributes/NavbarLinkPadding.tsx","../src/AttributePanel/components/attributes/BorderWidth.tsx","../src/AttributePanel/components/attributes/FontWeight.tsx","../src/AttributePanel/components/blocks/Column/index.tsx","../src/components/ShadowDom/index.tsx","../src/AttributePanel/components/UI/HtmlEditor.tsx","../src/AttributePanel/components/blocks/Text/index.tsx","../src/AttributePanel/components/blocks/Image/index.tsx","../src/AttributePanel/components/blocks/Group/index.tsx","../src/AttributePanel/components/blocks/Button/index.tsx","../src/AttributePanel/components/blocks/Divider/index.tsx","../src/AttributePanel/components/blocks/Wrapper/index.tsx","../src/AttributePanel/components/blocks/Spacer/index.tsx","../src/AttributePanel/components/blocks/Raw/index.tsx","../src/AttributePanel/components/blocks/Accordion/index.tsx","../src/AttributePanel/components/blocks/AccordionElement/index.tsx","../src/AttributePanel/components/blocks/AccordionTitle/index.tsx","../src/AttributePanel/components/blocks/AccordionText/index.tsx","../src/AttributePanel/components/blocks/Carousel/index.tsx","../src/AttributePanel/components/blocks/Hero/index.tsx","../src/AttributePanel/components/blocks/Navbar/index.tsx","../src/AttributePanel/components/blocks/Social/index.tsx","../src/AttributePanel/components/blocks/Table/index.tsx","../src/AttributePanel/components/blocks/AdvancedTable/index.tsx","../src/AttributePanel/components/blocks/index.ts","../src/AttributePanel/utils/BlockAttributeConfigurationManager.ts","../src/constants.ts","../src/AttributePanel/components/provider/SelectionRangeProvider/index.tsx","../src/AttributePanel/components/blocks/AdvancedTable/Operation/util.ts","../src/AttributePanel/components/blocks/AdvancedTable/Operation/menu.scss?inline","../src/AttributePanel/components/blocks/AdvancedTable/Operation/tableCellBgSelector.tsx","../src/AttributePanel/components/blocks/AdvancedTable/Operation/tableMenuConfig.ts","../src/AttributePanel/components/blocks/AdvancedTable/Operation/tableOperationMenu.ts","../src/AttributePanel/components/blocks/AdvancedTable/Operation/tableTool.ts","../src/AttributePanel/components/blocks/AdvancedTable/Operation/index.tsx","../src/AttributePanel/AttributePanel.module.scss","../src/AttributePanel/AttributePanel.tsx","../src/components/Form/RichTextToolBar/components/MergeTags/index.tsx","../src/AttributePanel/hooks/useSelectionRange.ts","../src/components/Form/RichTextToolBar/utils/getElementAtRange.ts","../src/components/Form/RichTextToolBar/components/Tools/IconBgColor/index.tsx","../src/components/Form/RichTextToolBar/components/Tools/IconFontColor/index.tsx","../src/components/Form/RichTextToolBar/components/BasicTools.tsx","../src/components/Form/RichTextToolBar/components/Unlink/index.tsx","../src/components/Form/RichTextToolBar/components/StrikeThrough/index.tsx","../src/components/Form/RichTextToolBar/components/Underline/index.tsx","../src/components/Form/RichTextToolBar/components/Italic/index.tsx","../src/components/Form/RichTextToolBar/components/Bold/index.tsx","../src/components/Form/RichTextToolBar/components/FontSize/index.tsx","../src/components/Form/RichTextToolBar/components/Tools/Tools.tsx","../src/components/Form/RichTextToolBar/shadow-dom.scss?inline","../src/components/Form/RichTextToolBar/RichTextToolBar.tsx","../src/components/Form/RichTextField/index.tsx","../src/components/Form/index.tsx","../src/components/AddToCollection/index.tsx","../src/hooks/useAddToCollection.tsx","../src/BlockLayer/components/ContextMenu/index.tsx","../src/BlockLayer/hooks/useAvatarWrapperDrop.ts","../src/utils/getIconNameByBlockType.ts","../src/utils/getBlockTitle.ts","../src/BlockLayer/index.tsx","../src/ShortcutToolbar/components/BlocksPanel/index.module.scss","../src/ShortcutToolbar/utils/BlockMarketManager.ts","../src/ShortcutToolbar/components/BlockMaskWrapper/index.module.scss","../src/ShortcutToolbar/components/BlockMaskWrapper/index.tsx","../src/ShortcutToolbar/components/BlocksPanel/presetTemplate/TextBlockItem/index.tsx","../src/ShortcutToolbar/components/Picture/index.tsx","../src/ShortcutToolbar/utils/getImg.ts","../src/ShortcutToolbar/components/BlocksPanel/presetTemplate/ImageBlockItem/index.tsx","../src/ShortcutToolbar/components/BlocksPanel/presetTemplate/SpacerBlockItem/index.tsx","../src/ShortcutToolbar/components/BlocksPanel/presetTemplate/DividerBlockItem/index.tsx","../src/ShortcutToolbar/components/BlocksPanel/presetTemplate/HeroBlockItem/index.tsx","../src/ShortcutToolbar/components/BlocksPanel/presetTemplate/ButtonBlockItem/index.tsx","../src/ShortcutToolbar/components/BlocksPanel/presetTemplate/AccordionBlockItem/index.tsx","../src/ShortcutToolbar/components/BlocksPanel/presetTemplate/CarouselBlockItem/index.tsx","../src/ShortcutToolbar/components/BlocksPanel/presetTemplate/NavbarBlockItem/index.tsx","../src/ShortcutToolbar/components/BlocksPanel/presetTemplate/SocialBlockItem/index.tsx","../src/ShortcutToolbar/components/BlocksPanel/presetTemplate/WrapperBlockItem/index.tsx","../src/ShortcutToolbar/components/BlocksPanel/presetTemplate/SectionBlockItem/index.tsx","../src/ShortcutToolbar/components/BlocksPanel/presetTemplate/GroupBlockItem/index.tsx","../src/ShortcutToolbar/components/BlocksPanel/presetTemplate/ColumnBlockItem/index.tsx","../src/ShortcutToolbar/components/BlocksPanel/presetTemplate/TableBlockItem/index.tsx","../src/ShortcutToolbar/components/BlocksPanel/presetTemplate/index.tsx","../src/ShortcutToolbar/components/BlocksPanel/index.tsx","../src/ShortcutToolbar/components/DragIcon/index.tsx","../src/ShortcutToolbar/ShortcutToolbar.tsx","../src/utils/parseXMLtoBlock.ts","../src/utils/MjmlToJson.ts","../src/SourceCodePanel/index.module.scss","../src/SourceCodePanel/index.tsx","../src/InteractivePrompt/components/Toolbar.tsx","../src/InteractivePrompt/components/FocusTooltip.tsx","../src/utils/awaitForElement.ts","../src/InteractivePrompt/components/HoverTooltip.tsx","../src/InteractivePrompt/index.tsx","../src/SimpleLayout/index.module.scss","../../../node_modules/.pnpm/@babel+runtime@7.28.6/node_modules/@babel/runtime/helpers/interopRequireDefault.js","../../../node_modules/.pnpm/@rc-component+pagination@1.2.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@rc-component/pagination/lib/locale/en_US.js","../../../node_modules/.pnpm/@rc-component+picker@1.9.0_dayjs@1.11.19_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@rc-component/picker/lib/locale/common.js","../../../node_modules/.pnpm/@rc-component+picker@1.9.0_dayjs@1.11.19_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@rc-component/picker/lib/locale/en_US.js","../../../node_modules/.pnpm/antd@6.3.1_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/antd/lib/time-picker/locale/en_US.js","../../../node_modules/.pnpm/antd@6.3.1_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/antd/lib/date-picker/locale/en_US.js","../../../node_modules/.pnpm/antd@6.3.1_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/antd/lib/calendar/locale/en_US.js","../../../node_modules/.pnpm/antd@6.3.1_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/antd/lib/locale/en_US.js","../../../node_modules/.pnpm/antd@6.3.1_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/antd/locale/en_US.js","../src/MergeTagBadgePrompt/MergeTagBadge.scss?inline","../src/MergeTagBadgePrompt/index.tsx","../src/ConfigurationPopup/index.tsx","../src/SimpleLayout/SimpleLayout.tsx","../src/StandardLayout/index.module.scss","../src/EditPanel/Blocks/index.module.scss","../src/components/Providers/ExtensionProvider.tsx","../src/EditPanel/Blocks/index.tsx","../src/components/FullHeightOverlayScrollbars/index.tsx","../src/EditPanel/index.module.scss","../src/ConfigurationPanel/index.module.scss","../src/ConfigurationPanel/index.tsx","../src/EditPanel/ConfigurationDrawer/index.tsx","../src/EditPanel/index.tsx","../src/StandardLayout/StandardLayout.tsx"],"sourcesContent":[".title {\n display: flex;\n flex: 1;\n justify-content: space-between;\n align-items: center;\n position: relative;\n\n :global {\n .icon-eye {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n right: 30px;\n opacity: 0;\n font-size: 14px;\n color: rgb(var(--primary-6)) !important;\n }\n .icon-eye-invisible {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n font-size: 14px;\n right: 30px;\n opacity: 1 !important;\n color: rgb(var(--primary-6)) !important;\n }\n }\n}\n:global(#BlockLayerManager) {\n width: 100%;\n}\n:global(#BlockLayerManager .arco-tree) {\n width: 100%;\n}\n:global(#BlockLayerManager .arco-tree-node-expanded) {\n overflow: hidden;\n}\n\n:global(#BlockLayerManager .arco-tree-node-selected .arco-tree-node-title) {\n background-color: rgb(var(--primary-1));\n}\n:global(#BlockLayerManager .arco-tree-node-title:hover .icon-eye) {\n opacity: 1;\n}\n:global(#BlockLayerManager .arco-tree-node-indent-block) {\n width: 8px;\n}\n:global(#BlockLayerManager .arco-tree-node-drag-icon) {\n cursor: grab;\n}\n","import { IconFont } from '@thanhpv102/easy-email-editor';\nimport { BasicType } from '@thanhpv102/easy-email-core';\nimport React from 'react';\nimport { IBlockDataWithId } from '../..';\n\nexport function EyeIcon({\n blockData,\n hidden,\n onToggleVisible,\n}: {\n blockData: IBlockDataWithId;\n hidden?: boolean;\n onToggleVisible: (blockData: IBlockDataWithId, ev: React.MouseEvent) => void;\n}) {\n if (hidden)\n return (\n <div style={{ visibility: 'hidden' }}>\n <IconFont iconName='icon-eye' />\n </div>\n );\n if (blockData.type === BasicType.PAGE.toString()) return null;\n\n return blockData.data.hidden ? (\n <IconFont\n onClick={(ev) => onToggleVisible(blockData, ev)}\n iconName='icon-eye-invisible'\n />\n ) : (\n <IconFont\n onClick={(ev) => onToggleVisible(blockData, ev)}\n iconName='icon-eye'\n />\n );\n}\n","export const transparentImage =\r\n 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==';\r\n","import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { Tree } from 'antd';\nimport type { DataNode, TreeProps, EventDataNode } from 'antd/es/tree';\nimport { debounce } from 'lodash';\nimport { transparentImage } from './transparentImage';\n\ninterface TreeNode<T> {\n id: string;\n children?: T[];\n}\n\n// Extended data node interface to include our custom properties\ninterface ExtendedDataNode extends DataNode {\n dataRef?: unknown;\n parent?: unknown;\n parentKey?: string;\n}\n\nexport interface BlockTreeProps<T extends TreeNode<T>> {\n treeData: T[];\n selectedKeys?: string[];\n expandedKeys?: string[];\n onSelect: (selectedId: string) => void;\n onContextMenu?: (nodeData: T, ev: React.MouseEvent) => void;\n onDragStart?: () => void;\n onDragEnd?: () => void;\n onMouseLeave?: () => void;\n onMouseEnter?: (id: string) => void;\n renderTitle: (data: T) => React.ReactNode;\n defaultExpandAll?: boolean;\n allowDrop: (o: {\n dragNode: { type: string } | { key: string };\n dropNode: { dataRef: T; parent: T; key: string };\n dropPosition: number;\n }) =>\n | false\n | {\n key: string;\n position: number;\n };\n\n onDrop: (o: {\n dragNode: { dataRef: T; parent: T; key: string; parentKey: string };\n dropNode: { dataRef: T; parent: T; key: string; parentKey: string };\n dropPosition: number;\n }) => void;\n}\n\nconst img = new Image();\nimg.width = 0;\nimg.height = 0;\nimg.src = transparentImage;\n\n// Transform TreeNode data to DataNode format for antd Tree\nconst transformTreeData = <T extends TreeNode<T> & { parent?: unknown }>(data: T[] | undefined, parentKey?: string): DataNode[] => {\n if (!data || !Array.isArray(data) || data.length === 0) {\n return [];\n }\n\n return data\n .filter((item): item is T => {\n const isValid = Boolean(item && item.id);\n if (!isValid) {\n console.error('[BlockTree] Filtering out item without id:', item);\n }\n return isValid;\n })\n .map((item) => {\n const hasChildren = Array.isArray(item.children) && item.children.length > 0;\n\n const node: ExtendedDataNode = {\n key: item.id,\n title: item.id, // This will be overridden by titleRender\n children: hasChildren ? transformTreeData(item.children as T[], item.id) : undefined,\n dataRef: item as unknown, // Store original data for callbacks\n parentKey: parentKey, // Store parent key for proper tree navigation\n parent: item.parent, // Extract parent from the original data item\n };\n return node;\n });\n};\n\nexport function BlockTree<T extends TreeNode<T>>(props: BlockTreeProps<T>) {\n const [blockTreeRef, setBlockTreeRef] = useState<HTMLElement | null>(null);\n const dragNode = useRef<{\n dataRef: T;\n parent: T;\n key: string;\n parentKey: string;\n } | null>(null);\n\n const { treeData, allowDrop, onContextMenu, selectedKeys } = props;\n const treeDataRef = useRef(treeData);\n const {\n onDragStart: propsDragStart,\n onDrop: propsDrop,\n renderTitle: propsRenderTitle,\n onDragEnd: propsDragEnd,\n onSelect: propsSelect,\n } = props;\n\n const [expandedKeys, setExpandedKeys] = useState<string[]>([]);\n\n const onExpand = useCallback(\n (keys: React.Key[]) => {\n setExpandedKeys(keys.map(key => String(key)));\n },\n [setExpandedKeys]\n );\n\n useEffect(() => {\n if (props.defaultExpandAll) {\n const keys: string[] = [];\n const loop = (data: T) => {\n keys.push(data.id);\n data.children?.forEach(loop);\n };\n treeDataRef.current.forEach(loop);\n setExpandedKeys(keys);\n }\n }, [props.defaultExpandAll]);\n\n useEffect(() => {\n setExpandedKeys((keys) =>\n props.expandedKeys ? [...keys, ...props.expandedKeys] : keys\n );\n }, [props.expandedKeys]);\n\n const onDragStart = useCallback(\n (info: { event: React.DragEvent; node: EventDataNode<DataNode> }) => {\n const { event: e, node } = info;\n e.dataTransfer.dropEffect = 'none';\n // e.dataTransfer.setDragImage(img, 0, 0);\n const extendedNode = node as unknown as ExtendedDataNode;\n const dragNodeData = extendedNode.dataRef as T;\n dragNode.current = {\n dataRef: dragNodeData,\n parent: extendedNode.parent as T,\n key: node.key as string,\n parentKey: extendedNode.parentKey as string,\n };\n propsDragStart?.();\n },\n [propsDragStart]\n );\n\n const onDragMove = useCallback(\n (option: { dragNode: EventDataNode<DataNode>; dropNode: EventDataNode<DataNode>; dropPosition: number }) => {\n if (!dragNode.current) return false;\n const extendedDropNode = option.dropNode as unknown as ExtendedDataNode;\n const dropData = extendedDropNode.dataRef as T;\n const dropId = option.dropNode.key;\n const currentDropData: Parameters<BlockTreeProps<T>['allowDrop']>[0] = {\n dragNode: { key: dragNode.current.key },\n dropNode: {\n dataRef: dropData,\n parent: extendedDropNode.parent as T,\n key: dropId as string,\n },\n dropPosition: option.dropPosition,\n };\n const isAllowDrop = allowDrop(currentDropData);\n\n return Boolean(isAllowDrop);\n },\n [allowDrop]\n );\n\n // Wrapper to match antd Tree's allowDrop signature\n const allowDropWrapper = useCallback(\n (options: unknown) => {\n const typedOptions = options as { dragNode: DataNode; dropNode: DataNode; dropPosition: number };\n // Convert to our expected format\n const convertedOptions = {\n dragNode: typedOptions.dragNode as unknown as EventDataNode<DataNode>,\n dropNode: typedOptions.dropNode as unknown as EventDataNode<DataNode>,\n dropPosition: typedOptions.dropPosition,\n };\n return onDragMove(convertedOptions);\n },\n [onDragMove]\n );\n\n const onDrop = useCallback(\n (info: {\n event: React.DragEvent;\n node: EventDataNode<DataNode>;\n dragNode: EventDataNode<DataNode>;\n dragNodesKeys: React.Key[];\n dropPosition: number;\n dropToGap: boolean;\n }) => {\n const { node: dropNode, dropPosition, event: e } = info;\n e.dataTransfer.dropEffect = 'move';\n if (!dragNode.current || !dropNode) return;\n\n const extendedDropNode = dropNode as unknown as ExtendedDataNode;\n const dropData = extendedDropNode.dataRef as T;\n const currentDropData: Parameters<BlockTreeProps<T>['onDrop']>[0] = {\n dragNode: dragNode.current,\n dropNode: {\n dataRef: dropData,\n parent: extendedDropNode.parent as T,\n key: dropNode.key as string,\n parentKey: extendedDropNode.parentKey as string,\n },\n dropPosition,\n };\n propsDrop(currentDropData);\n },\n [propsDrop]\n );\n\n const titleRender = useCallback(\n (nodeData: DataNode & { dataRef?: T }) => {\n return (\n <div\n style={{ display: 'inline-flex', width: '100%' }}\n onContextMenu={(ev) => onContextMenu && onContextMenu(nodeData.dataRef as T, ev)}\n >\n {propsRenderTitle(nodeData.dataRef as T)}\n </div>\n );\n },\n [onContextMenu, propsRenderTitle]\n );\n\n const onDragEnd = useCallback(() => {\n dragNode.current = null;\n propsDragEnd?.();\n }, [propsDragEnd]);\n\n const onSelect = useCallback(\n (selectedKeys: React.Key[]) => {\n propsSelect(selectedKeys[0] as string);\n },\n [propsSelect]\n );\n\n useEffect(() => {\n if (blockTreeRef) {\n blockTreeRef.addEventListener('dragover', (e) => {\n if (e.dataTransfer) {\n e.dataTransfer.dropEffect = 'move';\n }\n });\n }\n }, [blockTreeRef]);\n\n const transformedTreeData = useMemo(() => transformTreeData(treeData), [treeData]);\n\n return useMemo(\n () => (\n <div ref={setBlockTreeRef} onMouseLeave={props.onMouseLeave}>\n <CacheTree\n selectedKeys={selectedKeys}\n expandedKeys={expandedKeys}\n onExpand={onExpand}\n draggable\n treeData={transformedTreeData}\n blockNode\n onDragEnd={onDragEnd}\n onDragStart={onDragStart}\n onDrop={onDrop}\n allowDrop={allowDropWrapper}\n onSelect={onSelect}\n titleRender={titleRender}\n />\n </div>\n ),\n [\n transformedTreeData,\n props.onMouseLeave,\n expandedKeys,\n selectedKeys,\n onExpand,\n onDragEnd,\n onDragStart,\n onDrop,\n allowDropWrapper,\n onSelect,\n titleRender,\n ]\n );\n}\n\nconst cacheTreeDebounceCallback = debounce(\n (data: TreeProps, setCacheProps: (s: TreeProps) => void) => {\n setCacheProps(data);\n },\n 300\n);\n\nfunction CacheTree(props: TreeProps) {\n const [cacheProps, setCacheProps] = useState(props);\n const lastProps = useRef(props);\n\n useEffect(() => {\n if (lastProps.current.treeData !== props.treeData) {\n lastProps.current = props;\n cacheTreeDebounceCallback(props, setCacheProps);\n } else {\n lastProps.current = props;\n setCacheProps(props);\n }\n }, [props]);\n\n useEffect(() => {\n return () => {\n cacheTreeDebounceCallback.cancel();\n };\n }, []);\n\n return useMemo(() => <Tree {...cacheProps} />, [cacheProps]);\n}\n",".wrap {\n position: fixed;\n left: 500px;\n top: 200px;\n z-index: 9999;\n background-color: var(--color-neutral-2);\n box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.1);\n border-radius: 8px;\n overflow: hidden;\n font-family: 'Lato', sans-serif;\n font-weight: 500;\n\n .listItem {\n padding: 5px 15px;\n display: flex;\n flex-wrap: nowrap;\n cursor: default !important;\n &:hover {\n background-color: var(--color-menu-dark-hover);\n }\n }\n}\n\n.contextmenuMark {\n position: fixed;\n width: 100vw;\n height: 100vh;\n left: 0;\n top: 0;\n z-index: 9998;\n}\n",".container {\n display: flex;\n flex-wrap: wrap;\n}\n.error {\n border-color: #ff4d4f !important;\n}\n.item {\n margin: 0 8px 8px 0;\n border-radius: 4px;\n border: 1px solid #d9d9d9;\n padding: 8px;\n width: 104px;\n height: 104px;\n\n .info {\n position: relative;\n height: 100%;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n &::before {\n content: \" \";\n position: absolute;\n z-index: 1;\n background-color: rgba(0, 0, 0, .5);\n -webkit-transition: all .3s;\n transition: all .3s;\n width: 100%;\n height: 100%;\n opacity: 0;\n }\n\n img {\n width: 100%;\n border: 1px solid #f2f2f2;\n transition: all .3s;\n }\n\n .btn-wrap {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n z-index: 10;\n white-space: nowrap;\n -webkit-transition: all .3s;\n transition: all .3s;\n opacity: 0;\n\n a {\n color: #eee;\n margin: 0 4px;\n\n &:hover {\n color: #fff;\n }\n }\n }\n\n &:hover {\n &::before {\n opacity: 1;\n }\n\n .btn-wrap {\n opacity: 1;\n }\n }\n }\n}\n\n.upload {\n margin: 0 8px 8px 0;\n border: 1px dotted;\n width: 104px;\n height: 104px;\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n cursor: pointer;\n}\n.wrap {\n .urlInput {\n display: flex;\n align-items: center;\n }\n}\n\n.uploadText {\n font-size: 12px;\n font-weight: 500;\n color: #6b6e71;\n margin-top: 8px;\n text-align: center;\n letter-spacing: 0.5px;\n}\n","export function PromiseEach(promiseLikes: PromiseLike<any>[]) {\n const datas: Array<any> = [];\n let count = 0;\n return new Promise((resolve) => {\n promiseLikes.forEach(async (promiseLike) => {\n try {\n const data = await promiseLike;\n datas.push(data);\n } catch (error) {\n datas.push(error);\n }\n finally {\n count++;\n if (count === promiseLikes.length) {\n resolve(true);\n }\n }\n });\n });\n}\n","import { uniqueId } from 'lodash';\nimport { PromiseEach } from './PromiseEach';\n\ninterface Options {\n limit?: number;\n accept?: string;\n minSize?: number;\n maxSize?: number;\n autoUpload?: boolean;\n}\ninterface UploaderOption extends Options {\n limit: number;\n}\n\nexport type UploadItem = {\n idx: string;\n url: string;\n status: 'pending' | 'done' | 'error';\n};\n\nexport type UploaderEventMap = {\n start: (data: UploadItem[]) => void;\n progress: (data: UploadItem[]) => void;\n end: (data: UploadItem[]) => void;\n};\n\ntype UploaderEventMapHandle = {\n [K in keyof UploaderEventMap]: UploaderEventMap[K][];\n};\n\nexport type UploaderServer = (file: File) => Promise<string>;\n\nexport class Uploader {\n private options: UploaderOption;\n private el: HTMLInputElement;\n private uploadServer: UploaderServer;\n private handler: UploaderEventMapHandle = {\n start: [],\n progress: [],\n end: [],\n };\n\n constructor(uploadServer: UploaderServer, options: Options) {\n this.options = {\n limit: 1,\n autoUpload: true,\n ...options,\n };\n this.uploadServer = uploadServer;\n this.el = this.createInput();\n }\n\n private createInput() {\n Array.from(document.querySelectorAll('.uploader-form-input')).forEach(\n (el) => {\n el && document.body.removeChild(el);\n }\n );\n const el = document.createElement('input');\n el.className = 'uploader-form-input';\n el.type = 'file';\n el.style.display = 'block';\n el.style.opacity = '0';\n el.style.width = '0';\n el.style.height = '0';\n el.style.position = 'absolute';\n el.style.top = '0';\n el.style.left = '0';\n el.style.overflow = 'hidden';\n el.multiple = this.options.limit > 1;\n if (this.options.accept) {\n el.accept = this.options.accept;\n }\n return el;\n }\n\n public async uploadFiles(files: File[]) {\n const results = files.map((file) => ({ file }));\n const uploadList: UploadItem[] = results.map((item) => ({\n url: '',\n status: 'pending',\n idx: `uploader-${uniqueId()}`,\n }));\n\n // 开始上传\n this.handler.start.map((fn) => fn(uploadList));\n\n await PromiseEach(\n results.map(async (file, index) => {\n try {\n const url = await this.uploadFile(file);\n uploadList[index].url = url;\n uploadList[index].status = 'done';\n } catch (error) {\n uploadList[index].status = 'error';\n } finally {\n this.handler.progress.map((fn) => fn(uploadList));\n }\n })\n );\n\n // 上传完成\n this.handler.end.map((fn) => fn(uploadList));\n }\n\n private async uploadFile(result: { file: File }) {\n return this.uploadServer(result.file);\n }\n\n private checkFile(files: File[]) {\n const typeError = this.checkTypes(files);\n if (typeError) {\n throw new Error(typeError);\n }\n\n const sizeError = this.checkSize(files);\n if (sizeError) {\n throw new Error(sizeError);\n }\n }\n\n private checkTypes(files: File[]) {\n const accept = this.options.accept;\n if (accept) {\n let fileType = '';\n if (accept.indexOf('image') !== -1) {\n fileType = 'image';\n } else if (accept.indexOf('video') !== -1) {\n fileType = 'video';\n }\n for (const file of files) {\n if (file.type.indexOf(fileType) !== 0) {\n return '上传文件类型错误!';\n }\n }\n }\n return null;\n }\n\n private checkSize(files: File[]) {\n const options = this.options;\n for (const file of files) {\n if (options.minSize && file.size < options.minSize) {\n return `上传文件不能小于 ${options.minSize}`;\n }\n if (options.maxSize && file.size > options.maxSize) {\n return `上传文件不能小于 ${options.maxSize}`;\n }\n }\n return null;\n }\n\n public chooseFile() {\n const el = this.el;\n document.body.appendChild(el);\n el.click();\n\n el.onchange = async (e: any) => {\n let files = e.target.files || [];\n files = Array.prototype.slice.call(files);\n if (files.length === 0) {\n return;\n }\n this.checkFile(files);\n if (this.options.autoUpload) {\n this.uploadFiles(files);\n }\n el.onchange = null;\n el.parentNode && el.parentNode.removeChild(el);\n };\n }\n\n public on<K extends keyof UploaderEventMap>(\n event: K,\n fn: UploaderEventMap[K]\n ) {\n // UploaderEventMapHandle[K] === UploaderEventMap[K][]\n const handler = this.handler[event] as UploaderEventMap[K][];\n handler.push(fn);\n }\n\n public off<K extends keyof UploaderEventMap>(\n event: K,\n fn: UploaderEventMap[K]\n ) {\n const handles = this.handler[event] as UploaderEventMap[K][];\n this.handler[event] = handles.filter(\n (item) => item !== fn\n ) as UploaderEventMapHandle[K];\n }\n}\n","\nexport function classnames(...rest: any[]) {\n return rest.filter(item => typeof item === 'string').join(' ');\n}","\nexport function previewLoadImage(url: string): Promise<HTMLImageElement> {\n return new Promise((resolve) => {\n const img = new Image();\n img.setAttribute('crossOrigin', 'Anonymous');\n img.src = url;\n img.onload = () => resolve(img);\n img.onerror = () => resolve(img);\n });\n}\n","import React, { useCallback, useMemo, useRef, useState } from 'react';\nimport { Button, Dropdown, Input, App, Modal, Popover, Row, Spin } from 'antd';\nimport { DeleteOutlined, EyeOutlined, FileImageOutlined, MailOutlined, PlusOutlined } from '@ant-design/icons';\nimport styles from './index.module.scss';\nimport { Uploader, UploaderServer } from '@extensions/AttributePanel/utils/Uploader';\nimport { classnames } from '@extensions/AttributePanel/utils/classnames';\nimport { previewLoadImage } from '@extensions/AttributePanel/utils/previewLoadImage';\nimport { MergeTags } from '@extensions';\nimport { IconFont, useEditorProps } from '@thanhpv102/easy-email-editor';\n\nexport interface ImageUploaderProps {\n onChange: (val: string) => void;\n value: string;\n label: string;\n uploadHandler?: UploaderServer;\n enableSelectFromLibrary?: boolean;\n autoCompleteOptions?: Array<{ value: string; label: React.ReactNode; }>;\n}\n\nexport function ImageUploader(props: ImageUploaderProps) {\n const { mergeTags, onSelectAssetManager, toggleAssetManager } = useEditorProps();\n const { message } = App.useApp();\n const [isUploading, setIsUploading] = useState(false);\n const [preview, setPreview] = useState(false);\n const uploadHandlerRef = useRef<UploaderServer | null | undefined>(\n props.uploadHandler,\n );\n\n const enableSelectFromLibrary = props.enableSelectFromLibrary ?? false;\n\n const onChange = props.onChange;\n\n // Khi chọn ảnh từ AssetManager, gọi trực tiếp callback nếu có\n const handleSelectAssetManager = useCallback(async () => {\n if (onSelectAssetManager) {\n const result = await onSelectAssetManager();\n if (typeof result === 'string' && result) {\n props.onChange(result);\n await previewLoadImage(result);\n }\n } else {\n toggleAssetManager?.(true);\n }\n }, [onSelectAssetManager, toggleAssetManager, props]);\n\n const onUpload = useCallback(() => {\n if (isUploading) {\n return message.warning(t('Uploading...'));\n }\n if (!uploadHandlerRef.current) return;\n\n const uploader = new Uploader(uploadHandlerRef.current, {\n limit: 1,\n accept: 'image/*',\n });\n\n uploader.on('start', () => {\n setIsUploading(true);\n\n uploader.on('end', (data) => {\n const url = data[0]?.url;\n if (url) {\n onChange(url);\n }\n setIsUploading(false);\n });\n });\n\n uploader.chooseFile();\n }, [isUploading, onChange, message]);\n\n const onPaste = useCallback(\n async (e: React.ClipboardEvent<HTMLInputElement>) => {\n if (!uploadHandlerRef.current) return;\n const clipboardData = e.clipboardData;\n\n for (let i = 0; i < clipboardData.items.length; i++) {\n const item = clipboardData.items[i];\n if (item.kind == 'file') {\n const blob = item.getAsFile();\n\n if (!blob || blob.size === 0) {\n return;\n }\n try {\n setIsUploading(true);\n const picture = await uploadHandlerRef.current(blob);\n await previewLoadImage(picture);\n props.onChange(picture);\n setIsUploading(false);\n } catch (error: unknown) {\n const errorMessage = error instanceof Error ? error.message :\n (typeof error === 'string' ? error : t('Upload failed'));\n message.error(errorMessage);\n setIsUploading(false);\n }\n }\n }\n },\n [props, message],\n );\n\n const onRemove = useCallback(() => {\n props.onChange('');\n }, [props]);\n\n const content = useMemo(() => {\n if (isUploading) {\n return (\n <div className={styles['item']}>\n <div className={classnames(styles['info'])}>\n <Spin />\n <div className={styles['btn-wrap']} />\n </div>\n </div>\n );\n }\n\n if (!props.value) {\n if (enableSelectFromLibrary) {\n return (\n <div className={styles['upload']} onClick={handleSelectAssetManager}>\n <FileImageOutlined />\n <div className={styles['uploadText']}>Select from Library</div>\n </div>\n );\n } else {\n return (\n <div className={styles['upload']} onClick={onUpload}>\n <PlusOutlined />\n <div>Upload</div>\n </div>\n );\n }\n }\n\n return (\n <div className={styles['item']}>\n <div className={classnames(styles['info'])}>\n <img src={props.value} alt={t('Uploaded image')} />\n <div className={styles['btn-wrap']}>\n <a title={t('Preview')} onClick={() => setPreview(true)}>\n <EyeOutlined />\n </a>\n <a title={t('Remove')} onClick={() => onRemove()}>\n <DeleteOutlined />\n </a>\n </div>\n </div>\n </div>\n );\n }, [isUploading, onRemove, onUpload, props.value, enableSelectFromLibrary, handleSelectAssetManager, toggleAssetManager]);\n\n const onInputChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n onChange(e.target.value);\n },\n [onChange]\n );\n\n if (!props.uploadHandler) {\n return <Input value={props.value} onChange={onInputChange} />;\n }\n\n return (\n <div className={styles.wrap}>\n <div className={styles['container']}>\n {content}\n <Row style={{ width: '100%' }}>\n {mergeTags && (\n <Popover\n trigger=\"click\"\n content={<MergeTags value={props.value} onChange={onChange} />}\n >\n <Button icon={<IconFont iconName=\"icon-merge-tags\" />} />\n </Popover>\n )}\n <Input\n style={{ flex: 1 }}\n onPaste={onPaste}\n value={props.value}\n onChange={onInputChange}\n disabled={isUploading}\n />\n {props.autoCompleteOptions && (\n <Dropdown\n placement=\"bottomRight\"\n menu={{\n items: props.autoCompleteOptions.map((item, index) => ({\n key: index.toString(),\n label: (\n <div style={{ display: 'flex', alignItems: 'center' }}>\n <img\n src={item.value}\n alt={`Option ${index + 1}`}\n style={{ width: 20, height: 20 }}\n />\n  <span>{item.label}</span>\n </div>\n ),\n })),\n onClick: ({ key }) => {\n if (!props.autoCompleteOptions) return;\n onChange(props.autoCompleteOptions[+key]?.value);\n },\n }}\n >\n <Button icon={<MailOutlined />} />\n </Dropdown>\n )}\n </Row>\n </div>\n <Modal open={preview} footer={null} onCancel={() => setPreview(false)}>\n <img alt={t('Preview')} style={{ width: '100%' }} src={props.value} />\n </Modal>\n </div>\n );\n}\n","import { Select as AntSelect, SelectProps as AntSelectProps } from 'antd';\nimport { merge } from 'lodash';\nimport React from 'react';\n\nexport interface SelectProps extends AntSelectProps {\n options: Array<{ value: string; label: React.ReactNode; }>;\n onChange?: (val: string) => void;\n value: string;\n}\n\nexport function Select(props: SelectProps) {\n return (\n <AntSelect\n {...props}\n classNames={{\n popup: {\n root: 'easy-email-overlay',\n },\n }}\n style={merge({ width: '100%' }, props.style)}\n value={props.value}\n onChange={props.onChange}\n >\n {props.options.map((item, index) => (\n <AntSelect.Option key={index} value={item.value}>\n {item.label}\n </AntSelect.Option>\n ))}\n </AntSelect>\n );\n}\n","import { Radio } from 'antd';\nimport type { RadioGroupProps as AntdRadioGroupProps } from 'antd';\nimport { merge } from 'lodash';\nimport React from 'react';\nimport { Stack } from '@thanhpv102/easy-email-editor';\n\nexport interface RadioGroupProps extends Omit<AntdRadioGroupProps, 'onChange' | 'value' | 'options'> {\n options: Array<{ value: string; label: React.ReactNode }>;\n onChange?: (value: string) => void;\n value?: string;\n type?: 'radio' | 'button';\n vertical?: boolean;\n}\n\nexport function RadioGroup(props: RadioGroupProps) {\n const { vertical, options, onChange, value, style, ...rest } = props;\n\n return (\n <Radio.Group\n {...rest}\n style={merge({ width: '100%' }, style)}\n value={value}\n onChange={(e) => onChange?.(String(e.target.value))}\n >\n <Stack vertical={vertical} spacing='extraTight'>\n {options.map((item, index) => (\n <Radio key={index} value={item.value}>\n {item.label}\n </Radio>\n ))}\n </Stack>\n </Radio.Group>\n );\n}\n","import { Field, UseFieldConfig } from '@thanhpv102/easy-email-editor';\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { useRefState } from '@thanhpv102/easy-email-editor';\nimport { debounce } from 'lodash';\nimport { Form, FormItemProps } from 'antd';\n\nexport interface EnhancerProps {\n name: string;\n onChangeAdapter?: (value: any) => any;\n validate?: (value: any) => string | undefined | Promise<string | undefined>;\n config?: UseFieldConfig;\n changeOnBlur?: boolean;\n formItem?: FormItemProps;\n label?: FormItemProps['label'];\n inline?: boolean;\n equalSpacing?: boolean;\n required?: boolean;\n autoComplete?: 'on' | 'off';\n style?: React.CSSProperties;\n helpText?: React.ReactNode;\n debounceTime?: number;\n labelHidden?: boolean;\n}\n\nconst parse = (v: any) => v;\nexport default function enhancer<P extends { onChange?: (...rest: any) => any }>(\n Component: React.FC<any>,\n changeAdapter: (args: Parameters<NonNullable<P['onChange']>>) => any,\n option?: { debounceTime: number },\n) {\n return (props: EnhancerProps & Omit<P, 'value' | 'onChange' | 'mutators'>) => {\n const {\n name,\n validate,\n onChangeAdapter,\n changeOnBlur,\n inline,\n equalSpacing,\n formItem,\n label,\n required,\n style,\n helpText,\n autoComplete,\n labelHidden,\n ...rest\n } = props;\n\n const debounceTime = props.debounceTime || option?.debounceTime || 300;\n\n const config = useMemo(() => {\n return {\n ...props.config,\n validate: validate,\n parse: props.config?.parse || parse,\n };\n }, [props.config, validate]);\n\n const [currentValue, setCurrentValue] = useState<any>(undefined);\n const currentValueRef = useRefState(currentValue);\n const isFocusedRef = useRef(false);\n\n const layoutStyle = useMemo((): FormItemProps => {\n if (equalSpacing) {\n return {\n labelCol: {\n span: 11,\n style: {\n textAlign: 'left',\n paddingRight: 0,\n },\n },\n wrapperCol: {\n span: 11,\n offset: 1,\n style: {\n textAlign: 'right',\n },\n },\n };\n }\n if (inline) {\n return {\n labelCol: {\n span: 7,\n style: {\n textAlign: 'right',\n paddingRight: 0,\n },\n },\n wrapperCol: {\n span: 16,\n offset: 1,\n style: {},\n },\n };\n }\n\n return {\n labelCol: {\n span: 24,\n style: {\n paddingRight: 0,\n },\n },\n wrapperCol: {\n span: 24,\n },\n };\n }, [equalSpacing, inline]);\n\n return useMemo(() => {\n return (\n <Field\n name={name}\n {...config}\n >\n {({ input: { onBlur, onChange, value }, meta }) => {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n\n const debounceCallbackChange = useCallback(\n debounce(\n val => {\n onChange(val);\n onBlur();\n },\n debounceTime,\n {\n // maxWait: 500,\n },\n ),\n [onChange, onBlur],\n );\n\n const onFieldChange: P['onChange'] = useCallback(\n (e: any) => {\n const adapted = onChangeAdapter\n ? onChangeAdapter(changeAdapter(e))\n : changeAdapter(e);\n\n // If the adapter returned a synthetic/native Event, extract its value\n // so we never show [object Object] in the input.\n let newVal: any;\n if (\n adapted !== null &&\n typeof adapted === 'object' &&\n !Array.isArray(adapted) &&\n 'target' in adapted &&\n (adapted as { target: unknown }).target !== null\n ) {\n const rawVal = (adapted as { target: { value: unknown } }).target.value;\n newVal = rawVal == null ? '' : String(rawVal);\n } else if (Array.isArray(adapted) || (adapted !== null && typeof adapted === 'object')) {\n newVal = adapted;\n } else if (typeof adapted === 'boolean') {\n // Keep boolean values as-is (for Switch, Checkbox, etc.)\n newVal = adapted;\n } else {\n newVal = adapted == null ? '' : String(adapted);\n }\n\n setCurrentValue(newVal);\n if (!changeOnBlur) {\n debounceCallbackChange(newVal);\n }\n },\n [debounceCallbackChange],\n );\n\n const onFieldBlur = useCallback(() => {\n isFocusedRef.current = false;\n if (changeOnBlur) {\n onChange(currentValueRef.current);\n onBlur();\n }\n }, [onBlur, onChange]);\n\n const onFieldFocus = useCallback(() => {\n isFocusedRef.current = true;\n }, []);\n\n useEffect(() => {\n // Only sync form value → input when the input is not focused.\n // While focused the user is typing; overwriting currentValue would\n // cause visible glitches and lost keystrokes.\n if (!isFocusedRef.current) {\n if (Array.isArray(value) || (value !== null && typeof value === 'object')) {\n setCurrentValue(value);\n } else if (typeof value === 'boolean') {\n // Keep boolean values as-is (for Switch, Checkbox, etc.)\n setCurrentValue(value);\n } else {\n setCurrentValue(value == null ? '' : String(value));\n }\n }\n }, [value]);\n\n return (\n <Form.Item\n style={{\n ...style,\n margin: '0px',\n }}\n rules={required ? [{ required: true }] : undefined}\n {...layoutStyle}\n {...formItem}\n label={labelHidden ? undefined : label || formItem?.label}\n labelAlign='left'\n validateStatus={meta.touched && meta.error ? 'error' : undefined}\n help={meta.touched && meta.error ? meta.error : helpText}\n >\n <Component\n autoComplete={autoComplete}\n {...rest}\n name={name}\n checked={currentValue}\n value={currentValue}\n onChange={onFieldChange}\n onBlur={onFieldBlur}\n onFocus={onFieldFocus}\n />\n </Form.Item>\n );\n }}\n </Field>\n );\n }, [\n autoComplete,\n changeOnBlur,\n config,\n currentValue,\n currentValueRef,\n debounceTime,\n formItem,\n helpText,\n label,\n labelHidden,\n layoutStyle,\n name,\n onChangeAdapter,\n required,\n rest,\n style,\n ]);\n };\n}\n","import { Input as AntInput, InputProps as AntInputProps } from 'antd';\nimport React, { useCallback } from 'react';\n\nexport interface InputProps extends Omit<AntInputProps, 'onChange'> {\n quickchange?: boolean;\n value: string;\n onChange: (val: string) => void;\n}\n\nexport function Input(props: InputProps) {\n const {\n quickchange,\n value = '',\n onKeyDown: onPropsKeyDown,\n onChange: propsOnChange,\n } = props;\n\n const onChange = useCallback(\n (val: string) => {\n propsOnChange(val);\n },\n [propsOnChange]\n );\n\n const onKeyDown = useCallback(\n (ev: React.KeyboardEvent<HTMLInputElement>) => {\n if (onPropsKeyDown) {\n onPropsKeyDown?.(ev);\n }\n\n if (quickchange) {\n let step = 0;\n if (ev.key === 'ArrowUp') {\n step = 1;\n }\n if (ev.key === 'ArrowDown') {\n step = -1;\n }\n\n if (step) {\n if (/^\\d+/.test(value)) {\n ev.preventDefault();\n onChange(\n String(value).replace(/^(\\d+)/, (_, match) => {\n return (Number(match) + step).toString();\n })\n );\n }\n }\n }\n },\n [onPropsKeyDown, quickchange, value, onChange]\n );\n\n return (\n <AntInput\n {...{ ...props, quickchange: undefined }}\n onChange={(e) => onChange(e.target.value)}\n onKeyDown={onKeyDown}\n />\n );\n}\n","import React from 'react';\r\nimport { Input } from 'antd';\r\nimport type { InputProps } from 'antd';\r\n\r\nexport interface InputWithUnitProps extends Omit<InputProps, 'onChange'> {\r\n value: string;\r\n onChange: (val: string) => void;\r\n unitOptions?: Array<{ value: string; label: string; }> | 'default' | 'percent';\r\n quickchange?: boolean;\r\n}\r\n\r\nexport function InputWithUnit(props: InputWithUnitProps) {\r\n const {\r\n value = '',\r\n onKeyDown,\r\n onChange,\r\n unitOptions: _unitOptions,\r\n quickchange: _quickchange,\r\n ...restProps\r\n } = props;\r\n\r\n // Handle input change\r\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\r\n onChange(e.target.value);\r\n };\r\n\r\n return (\r\n <Input\r\n value={value}\r\n onChange={handleChange}\r\n onKeyDown={onKeyDown}\r\n {...restProps}\r\n />\r\n );\r\n}\r\n","import { merge } from 'lodash';\nimport React from 'react';\nimport { Stack } from '@thanhpv102/easy-email-editor';\nimport { Checkbox } from 'antd';\nimport type { CheckboxGroupProps as AntdCheckboxGroupProps } from 'antd/es/checkbox';\n\nexport interface CheckboxGroupProps extends Omit<AntdCheckboxGroupProps, 'onChange' | 'value'> {\n options: Array<{ value: string; label: React.ReactNode; }>;\n onChange?: (values: string[]) => void;\n value?: string[];\n style?: Partial<React.CSSProperties>;\n checkboxStyle?: Partial<React.CSSProperties>;\n vertical?: boolean;\n}\n\nexport function CheckBoxGroup(props: CheckboxGroupProps) {\n const { vertical = false, ...rest } = props;\n return (\n <Checkbox.Group\n style={merge({ width: '100%' }, rest.style)}\n value={rest.value}\n onChange={rest.onChange}\n >\n <Stack vertical={vertical} spacing=\"extraTight\">\n {rest.options.map((item, index) => (\n <Checkbox style={rest.checkboxStyle} key={index} value={item.value}>\n {item.label}\n </Checkbox>\n ))}\n </Stack>\n </Checkbox.Group>\n );\n}\n","export function classnames(...rest: any[]) {\n return rest.filter((item) => typeof item === 'string').join(' ');\n}\n",".helperText {\n color: rgba(109, 113, 117, 1);\n font-weight: 400;\n line-height: 1.3;\n text-transform: none;\n letter-spacing: normal;\n}\n\n.label-hidden {\n position: absolute !important;\n top: 0;\n clip: rect(1px, 1px, 1px, 1px) !important;\n overflow: hidden !important;\n height: 1px !important;\n width: 1px !important;\n padding: 0 !important;\n border: 0 !important;\n}\n\n.editTab {\n :global {\n .arco-tabs-content {\n border: none;\n }\n .arco-tabs-header-nav {\n padding-right: 15px;\n }\n }\n}\n\n.inputWithUnit {\n :global {\n .arco-select-view {\n padding: 0px 5px !important;\n text-align: center;\n .arco-select-view-value {\n overflow: visible;\n }\n }\n }\n}\n\n.inputWithUnitSelectOption {\n padding: 0px 5px !important;\n text-align: center !important;\n}\n\n.colorPicker {\n :global(.sketch-picker .flexbox-fix:nth-child(3)) {\n display: none !important;\n }\n}\n\n// Global styles cho Antd Select/Radio/Checkbox dropdown\n:global {\n .ant-select {\n font-size: 12px !important;\n }\n\n .ant-select-selector {\n height: 26px !important;\n padding: 2px 6px !important;\n font-size: 12px !important;\n }\n\n .ant-select-selection-item {\n font-size: 12px !important;\n line-height: 26px !important;\n }\n\n .ant-select-dropdown {\n font-size: 12px !important;\n }\n\n .ant-select-dropdown .ant-select-item {\n font-size: 12px !important;\n }\n\n .ant-select-dropdown .ant-select-item-option {\n font-size: 12px !important;\n padding: 6px 12px !important;\n }\n\n .ant-radio-group {\n font-size: 12px !important;\n }\n\n .ant-checkbox-group {\n font-size: 12px !important;\n }\n\n .easy-email-overlay {\n font-size: 12px !important;\n }\n\n .easy-email-overlay .ant-select-selector {\n height: 26px !important;\n padding: 2px 6px !important;\n }\n\n .easy-email-overlay .ant-select-item-option {\n font-size: 12px !important;\n padding: 6px 12px !important;\n }\n}\n\n:global(.attributePanel) {\n :global {\n .arco-input-wrapper {\n padding: 4px 6px !important;\n }\n\n .arco-input {\n font-size: 12px !important;\n height: 26px !important;\n line-height: 26px !important;\n }\n\n .ant-input {\n font-size: 12px !important;\n height: 26px !important;\n line-height: 26px !important;\n }\n\n input::placeholder {\n font-size: 12px !important;\n }\n\n .ant-input::placeholder {\n font-size: 12px !important;\n }\n\n .arco-form-item-label-content {\n font-size: 12px !important;\n }\n\n .ant-form-item-label-content {\n font-size: 12px !important;\n }\n\n .ant-form-item-label > label {\n font-size: 12px !important;\n }\n\n // Thu nhỏ help text\n .ant-form-item-explain {\n font-size: 12px !important;\n }\n\n .arco-form-item-message {\n font-size: 12px !important;\n }\n\n .ant-form-item-label {\n padding: 0 !important;\n }\n\n textarea {\n font-size: 12px !important;\n line-height: 1.4 !important;\n }\n\n .arco-select {\n font-size: 12px !important;\n }\n\n .arco-select-view {\n height: 26px !important;\n padding: 4px 6px !important;\n font-size: 12px !important;\n }\n\n // Antd select option\n .ant-select-item {\n font-size: 12px !important;\n }\n\n .ant-select-item-option {\n font-size: 12px !important;\n padding: 6px 12px !important;\n }\n\n // Antd select dropdown\n .ant-select-dropdown {\n font-size: 12px !important;\n }\n\n .ant-select-dropdown .ant-select-item-option {\n font-size: 12px !important;\n padding: 6px 12px !important;\n }\n\n // Antd radio\n .ant-radio {\n font-size: 12px !important;\n }\n\n .ant-radio-wrapper {\n font-size: 12px !important;\n }\n\n .ant-radio-inner {\n width: 16px !important;\n height: 16px !important;\n }\n\n // Antd checkbox\n .ant-checkbox {\n font-size: 12px !important;\n }\n\n .ant-checkbox-wrapper {\n font-size: 12px !important;\n }\n\n .ant-checkbox-inner {\n width: 16px !important;\n height: 16px !important;\n }\n\n .arco-color-picker-trigger {\n width: 28px !important;\n height: 28px !important;\n }\n\n .arco-btn {\n padding: 4px 8px !important;\n height: 28px !important;\n font-size: 12px !important;\n }\n\n .ant-btn {\n padding: 4px 8px !important;\n font-size: 12px !important;\n height: 28px !important;\n }\n\n .ant-btn-sm {\n padding: 4px 8px !important;\n height: 28px !important;\n font-size: 12px !important;\n }\n }\n}\n","import { Tabs } from 'antd';\nimport type { TabsProps } from 'antd';\nimport { classnames } from '@extensions/utils/classnames';\nimport React, { useState } from 'react';\nimport styles from './index.module.scss';\n\nexport interface EditTabProps<T = unknown>\n extends Omit<TabsProps, 'onChange' | 'items' | 'type' | 'activeKey' | 'onEdit'> {\n value: Array<T>;\n renderItem: (item: T, index: number) => React.ReactNode;\n onChange: (vals: Array<T>) => void;\n additionItem: T;\n label: string;\n}\n\nexport function EditTab<T = unknown>(props: EditTabProps<T>) {\n const { value, additionItem, label, renderItem, onChange, tabPlacement, ...restProps } = props;\n const [activeKey, setActiveKey] = useState('0');\n\n const onEdit = (targetKey: React.MouseEvent | React.KeyboardEvent | string, action: 'add' | 'remove') => {\n if (action === 'add') {\n const newKey = value.length.toString();\n setActiveKey(newKey);\n onChange([...value, additionItem]);\n } else if (action === 'remove' && typeof targetKey === 'string') {\n const removeIndex = parseInt(targetKey, 10);\n if (removeIndex < parseInt(activeKey, 10)) {\n setActiveKey((parseInt(activeKey, 10) - 1).toString());\n }\n if (removeIndex === parseInt(activeKey, 10)) {\n setActiveKey(removeIndex > 0 ? (removeIndex - 1).toString() : '0');\n }\n onChange(value.filter((_, index) => index !== removeIndex));\n }\n };\n\n const items = (Array.isArray(value) ? value : []).map((item, index) => ({\n key: index.toString(),\n label: `${label || 'Tab'} ${index + 1}`,\n children: (\n <div style={{ paddingLeft: 12 }}>\n {renderItem(item, index)}\n </div>\n ),\n }));\n\n return (\n <Tabs\n {...restProps}\n className={classnames(styles.editTab)}\n style={{ border: 'none' }}\n type=\"editable-card\"\n activeKey={activeKey}\n tabPlacement={tabPlacement}\n items={items}\n onEdit={onEdit}\n onChange={setActiveKey}\n />\n );\n}\n","import { Card, Space, TabsProps, Typography } from 'antd';\nimport { CloseOutlined, PlusOutlined } from '@ant-design/icons';\nimport { cloneDeep } from 'lodash';\nimport React from 'react';\n\n\nexport interface EditGridTabProps<T = unknown>\n extends Omit<TabsProps, 'onChange'> {\n value: Array<T>;\n renderItem: (item: T, index: number) => React.ReactNode;\n onChange: (vals: Array<T>) => unknown;\n additionItem?: T;\n label: string;\n}\nexport function EditGridTab<T = unknown>(props: EditGridTabProps<T>) {\n const { value, additionItem } = props;\n\n const onAdd = (index: number) => {\n let newItem = additionItem || cloneDeep(value[index]);\n value.splice(index + 1, 0, newItem);\n props.onChange([...value]);\n };\n\n const onDelete = (index: number) => {\n props.onChange(value.filter((_, vIndex) => Number(index) !== vIndex));\n };\n return (\n <Card\n variant=\"borderless\"\n >\n {(Array.isArray(value) ? value : []).map((item, index) => (\n <Card.Grid style={{ width: '100%' }} key={index}>\n <Card title={(\n <Space>\n <Typography.Text>\n {'Item'} {index + 1}\n </Typography.Text>\n\n </Space>\n )} extra={(\n <Space size=\"large\">\n <PlusOutlined style={{ color: '#000', cursor: 'pointer' }} onClick={() => onAdd(index)} />\n <CloseOutlined style={{ color: '#000', cursor: 'pointer' }} onClick={() => onDelete(index)} />\n </Space>\n )}\n >\n {props.renderItem(item, index)}\n </Card>\n </Card.Grid>\n ))}\n </Card>\n );\n\n}\n","import React, { useMemo } from 'react';\r\nimport { AutoComplete as AntdAutoComplete } from 'antd';\r\nimport type { AutoCompleteProps as AntdAutoCompleteProps } from 'antd';\r\nimport { isString } from 'lodash';\r\n\r\nexport interface AutoCompleteProps\r\n extends Omit<AntdAutoCompleteProps, 'onChange' | 'options'> {\r\n quickchange?: boolean;\r\n value: string;\r\n options: Array<{ value: string | number; label: string | number }>;\r\n onChange: (val: string) => void;\r\n showSearch?: boolean;\r\n}\r\n\r\nexport function AutoComplete(props: AutoCompleteProps) {\r\n const options = useMemo(() => {\r\n const selectedValue = (props.value || '').toLowerCase();\r\n return props.options\r\n .filter(item => {\r\n return (\r\n (isString(item.value) && item.value.toLowerCase().startsWith(selectedValue)) ||\r\n (isString(item.label) && item.label.toLowerCase().startsWith(selectedValue))\r\n );\r\n })\r\n .map(item => ({\r\n value: String(item.value),\r\n label: String(item.label)\r\n }));\r\n }, [props.options, props.value]);\r\n\r\n return (\r\n <AntdAutoComplete\r\n {...props}\r\n options={options}\r\n onChange={props.onChange}\r\n />\r\n );\r\n}\r\n","export function isNumber(num: any): num is number {\n if (typeof num !== 'string' && typeof num !== 'number') return false;\n return new RegExp('^(\\\\-|\\\\+)?\\\\d+(\\\\.\\\\d+)?$').test(num.toString());\n}\n\nexport function InputNumberAdapter(val: string | number) {\n return isNumber(Number(val)) ? Number(val) : val;\n}\n","import { isNumber } from '@extensions/AttributePanel/utils/InputNumberAdapter';\nimport { isString } from 'lodash';\n\nexport const pixelAdapter = {\n format(val: string) {\n if (!isString(val) && !val) return '';\n val = val.toString();\n if (/^\\d+px$/.test(val.trim())) return val.trim().replace('px', '');\n return val.trim();\n },\n parse(val: string | number) {\n if (!isString(val) && !isNumber(val)) return undefined;\n val = val.toString().trim();\n if (!val) return undefined;\n if (/^\\d+$/.test(val)) return val + 'px';\n return val;\n },\n};\n","import { isString } from 'lodash';\nimport Color from 'color';\n\nexport const colorAdapter = {\n format(val: string) {\n if (!isString(val) && !val) return '';\n val = val.toString();\n if (val.length === 7 && val.startsWith('#')) return val.replace('#', '');\n return val;\n },\n parse(val: string) {\n if (!isString(val)) return undefined;\n val = val.toString().trim();\n if (!val) return undefined;\n try {\n if (val.length === 6 && Color(`#${val}`).hex()) return `#${val}`;\n } catch (error) {\n console.error('err colorAdapter', val, error);\n }\n return val;\n },\n};\n","import { isNumber } from '@extensions/AttributePanel/utils/InputNumberAdapter';\nimport { isString } from 'lodash';\n\nexport const imageHeightAdapter = {\n format(val: string) {\n if (!isString(val) && !val) return '';\n val = val.toString();\n if (val === 'auto') return undefined;\n\n if (/^\\d+px$/.test(val.trim())) return val.trim().replace('px', '');\n return val.trim();\n },\n parse(val: string | number) {\n if (!isString(val) && !isNumber(val)) return undefined;\n val = val.toString().trim();\n if (!val) return undefined;\n if (/^\\d+$/.test(val)) return val + 'px';\n return val;\n },\n};\n","import { ImageManager } from '@thanhpv102/easy-email-core';\n\nconst defaultImagesMap = {\n IMAGE_59:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/06ca521d-9728-4de6-a709-1b75a828bfc3-2a9b1224-3d71-43b8-b52f-e7cdcdc9107b.png',\n AttributePanel_01:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/e22f78f2-aa76-408d-ba94-c95c7abe1908-image.png',\n AttributePanel_02:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/3e952a6e-2506-470e-b395-3e0d995157c5.png',\n AttributePanel_03:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/Fi_vI4vyLhTM-Tp6ivq4dR_ieGHk.png',\n};\n\nImageManager.add(defaultImagesMap);\n\nexport function getImg(name: keyof typeof defaultImagesMap) {\n return ImageManager.get(name);\n}\n","import React, { useCallback, useMemo, useRef } from 'react';\nimport { useLocalStorage } from 'react-use';\nimport { debounce } from 'lodash';\nimport { useRefState } from '@thanhpv102/easy-email-editor';\n\nconst defaultPresetColor: string[] = [\n '#000000',\n '#FFFFFF',\n '#9b9b9b',\n '#d0021b',\n '#4a90e2',\n '#7ed321',\n '#bd10e0',\n '#f8e71c',\n];\n\nconst CURRENT_COLORS_KEY = 'CURRENT_COLORS_KEY';\nconst MAX_RECORD_SIZE = 20;\n\nexport const PresetColorsContext = React.createContext<{\n colors: string[];\n addCurrentColor: (color: string) => void;\n}>({\n colors: [],\n addCurrentColor: () => {},\n});\n\nexport const PresetColorsProvider: React.FC<{\n children: React.ReactNode | React.ReactElement;\n}> = props => {\n const [currentColors, setCurrentColors] = useLocalStorage<string[]>(\n CURRENT_COLORS_KEY,\n defaultPresetColor,\n );\n const currentColorsRef = useRefState(currentColors);\n\n const colorDivRef = useRef(document.createElement('div'));\n\n const addCurrentColor = useCallback(\n debounce((newColor: string) => {\n colorDivRef.current.style.color = '';\n colorDivRef.current.style.color = newColor;\n if (colorDivRef.current.style.color) {\n if (currentColorsRef.current!.includes(newColor)) return;\n const newColors = [...new Set([...currentColorsRef.current!, newColor])]\n .filter(Boolean)\n .slice(-MAX_RECORD_SIZE);\n\n setCurrentColors(newColors);\n }\n }, 500),\n [currentColorsRef, setCurrentColors],\n );\n\n const value = useMemo(() => {\n return {\n colors: currentColors!,\n addCurrentColor,\n };\n }, [addCurrentColor, currentColors]);\n\n return useMemo(() => {\n return (\n <PresetColorsContext.Provider value={value}>\n {props.children}\n </PresetColorsContext.Provider>\n );\n }, [props.children, value]);\n};\n","import { Button, Space } from 'antd';\r\nimport React, { useContext, useEffect, useMemo, useState } from 'react';\r\n\r\nimport styles from '../index.module.scss';\r\nimport Color from 'color';\r\nimport { PresetColorsContext } from '@extensions/AttributePanel/components/provider/PresetColorsProvider';\r\n\r\nexport interface ColorPickerContentProps {\r\n onChange: (val: string) => void;\r\n value: string;\r\n}\r\n\r\nconst transparentColor = 'rgba(0,0,0,0)';\r\n\r\nexport function ColorPickerContent(props: ColorPickerContentProps) {\r\n const { colors: presetColors } = useContext(PresetColorsContext);\r\n\r\n const { onChange } = props;\r\n const [color, setColor] = useState(props.value);\r\n\r\n useEffect(() => {\r\n setColor(props.value);\r\n }, [props.value]);\r\n\r\n const presetColorList = useMemo(() => {\r\n return [...presetColors.filter(item => item !== transparentColor).slice(-14)];\r\n }, [presetColors]);\r\n\r\n let adapterColor = color;\r\n\r\n try {\r\n if (Color(color).hex()) {\r\n adapterColor = Color(color).hex();\r\n }\r\n } catch (_) {}\r\n\r\n // input[type=color] requires exactly #rrggbb format\r\n const inputColorValue = /^#[0-9a-fA-F]{6}$/.test(adapterColor) ? adapterColor : '#000000';\r\n\r\n return (\r\n <div\r\n className={styles.colorPicker}\r\n style={{ width: 202, paddingTop: 12, paddingBottom: 12 }}\r\n >\r\n <div style={{ padding: '0px 16px' }}>\r\n <Space\r\n wrap\r\n size='small'\r\n >\r\n {presetColorList.map(item => {\r\n return (\r\n <div\r\n title={item}\r\n onClick={() => onChange(item)}\r\n key={item}\r\n style={{\r\n border: '1px solid var(--color-neutral-3, rgb(229, 230, 235))',\r\n display: 'inline-block',\r\n height: 20,\r\n width: 20,\r\n boxSizing: 'border-box',\r\n padding: 4,\r\n borderRadius: 3,\r\n backgroundColor: item,\r\n position: 'relative',\r\n cursor: 'pointer',\r\n }}\r\n />\r\n );\r\n })}\r\n </Space>\r\n </div>\r\n <div\r\n style={{\r\n padding: '6px 6px 0px 6px',\r\n backgroundColor: 'var(--color-bg-popup)'\r\n }}\r\n >\r\n <Button\r\n type='text'\r\n size='small'\r\n style={{\r\n fontSize: 12,\r\n width: '100%',\r\n textAlign: 'left',\r\n paddingLeft: 10,\r\n position: 'relative',\r\n }}\r\n >\r\n <span style={{ color: 'var(--ant-color-text, #ddddd)'}}>{t('Picker...')}</span>\r\n <input\r\n style={{\r\n position: 'absolute',\r\n width: '100%',\r\n height: '100%',\r\n zIndex: 1,\r\n left: 0,\r\n top: 0,\r\n opacity: 0,\r\n cursor: 'pointer'\r\n }}\r\n type='color'\r\n value={inputColorValue}\r\n onChange={e => onChange(e.target.value)}\r\n onMouseDown={e => e.stopPropagation()}\r\n />\r\n </Button>\r\n </div>\r\n <style>\r\n {`\r\n .form-alpha-picker {\r\n outline: 1px solid rgb(204, 204, 204, 0.6);\r\n }\r\n `}\r\n </style>\r\n </div>\r\n );\r\n}\r\n","import { useCallback, useEffect, useRef, useState } from 'react';\n\nexport interface PopupRect {\n triggerLeft: number;\n triggerTop: number;\n triggerWidth: number;\n triggerHeight: number;\n}\n\n/**\n * Popup open/position manager for toolbar buttons inside a Shadow DOM.\n *\n * Uses a portal-based approach:\n * - We compute getBoundingClientRect() of the trigger button and expose it.\n * - Callers render a fixed-position portal div in document.body at that rect.\n * - No antd getPopupContainer tricks needed — popup is outside the shadow DOM.\n */\nexport function useRichTextPopupOpen() {\n const [open, setOpen] = useState(false);\n const [rect, setRect] = useState<PopupRect | null>(null);\n const triggerRef = useRef<HTMLElement | null>(null);\n const popupContainerRef = useRef<HTMLElement | null>(null);\n // Keep open state accessible inside the persistent listener without re-registering\n const openRef = useRef(false);\n openRef.current = open;\n\n // Persistent mousedown listener — always registered, checks openRef internally.\n useEffect(() => {\n const onMouseDown = (e: MouseEvent) => {\n if (!openRef.current) return;\n\n // composedPath() gives the real path through shadow DOM boundaries,\n // unlike e.target which is retargeted at shadow root level.\n // Note: path may include non-Node entries (e.g. Window) — guard with instanceof.\n const path = e.composedPath ? e.composedPath() : [e.target as Node];\n const isNode = (el: EventTarget): el is Node => el instanceof Node;\n\n // Click inside the popup portal?\n const popup = popupContainerRef.current;\n if (popup && path.some(el => isNode(el) && (el === popup || popup.contains(el)))) return;\n\n // Click inside the shadow host that contains the trigger (toolbar)?\n const rootNode = triggerRef.current?.getRootNode();\n if (rootNode instanceof ShadowRoot) {\n const host = rootNode.host;\n if (path.some(el => isNode(el) && (el === host || host.contains(el)))) return;\n } else if (triggerRef.current) {\n const trigger = triggerRef.current;\n if (path.some(el => isNode(el) && (el === trigger || trigger.contains(el)))) return;\n }\n\n setOpen(false);\n };\n\n // Use capture so we get the event before any stopPropagation in the tree.\n document.addEventListener('mousedown', onMouseDown, true);\n return () => document.removeEventListener('mousedown', onMouseDown, true);\n }, []); // empty deps — register once, use refs for live values\n\n /** Call this from the trigger button's onClick. */\n const handleTriggerClick = useCallback(() => {\n setOpen(prev => {\n if (!prev && triggerRef.current) {\n const r = triggerRef.current.getBoundingClientRect();\n setRect({\n triggerLeft: r.left,\n triggerTop: r.top,\n triggerWidth: r.width,\n triggerHeight: r.height,\n });\n }\n return !prev;\n });\n }, []);\n\n const close = useCallback(() => setOpen(false), []);\n\n /** Ref for the wrapper span around the button (used for getBoundingClientRect). */\n const setTriggerRef = useCallback((el: HTMLElement | null) => {\n triggerRef.current = el;\n }, []);\n\n /** Ref for the portal popup container div. */\n const setPopupContainerRef = useCallback((el: HTMLElement | null) => {\n popupContainerRef.current = el;\n }, []);\n\n /** @deprecated kept for API compat */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const onOpenChange = useCallback((_open: boolean) => {}, []);\n /** @deprecated kept for API compat */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const setPopupRef = useCallback((_el: HTMLElement | null) => {}, []);\n /** @deprecated kept for API compat */\n const getPopupContainer = useCallback((): HTMLElement => document.body, []);\n\n return {\n open,\n setOpen,\n rect,\n close,\n handleTriggerClick,\n setTriggerRef,\n setPopupContainerRef,\n // Legacy compat\n onOpenChange,\n setPopupRef,\n getPopupContainer,\n };\n}\n","import React from 'react';\nimport { createPortal } from 'react-dom';\nimport type { PopupRect } from '../../hooks/useRichTextPopupOpen';\n\n// This ID is defined in easy-email-editor and is whitelisted in MjmlDomRender's\n// click-outside handler, so clicks inside our popup won't trigger setIsTextFocus(false).\nconst FIXED_CONTAINER_ID = 'FIXED_CONTAINER_ID';\n\ninterface RichTextPortalPopupProps {\n open: boolean;\n rect: PopupRect | null | undefined;\n children: React.ReactNode;\n containerRef?: (el: HTMLElement | null) => void;\n /** 'bottom' places popup below trigger; 'top' places it above. Default: 'bottom' */\n placement?: 'bottom' | 'top';\n}\n\n/**\n * Renders children into a fixed-position portal inside FIXED_CONTAINER_ID,\n * positioned relative to the trigger button rect.\n * Using FIXED_CONTAINER_ID keeps us in the whitelist of MjmlDomRender's\n * click handler so the RichText toolbar stays visible while the popup is open.\n */\nexport function RichTextPortalPopup({\n open,\n rect,\n children,\n containerRef,\n placement = 'bottom',\n}: RichTextPortalPopupProps) {\n if (!open || !rect) return null;\n\n const container = document.getElementById(FIXED_CONTAINER_ID) ?? document.body;\n\n const GAP = 4;\n const style: React.CSSProperties = {\n position: 'fixed',\n zIndex: 10000,\n left: rect.triggerLeft,\n ...(placement === 'bottom'\n ? { top: rect.triggerTop + rect.triggerHeight + GAP }\n : { bottom: window.innerHeight - rect.triggerTop + GAP }),\n backgroundColor: 'var(--color-bg-popup)',\n borderRadius: 8,\n border: '1px solid var(--color-border)',\n };\n\n return createPortal(\n <div ref={containerRef} style={style}>\n {children}\n </div>,\n container,\n );\n}\n","import { Input, Popover, PopoverProps } from 'antd';\r\nimport React, { useCallback, useContext, useMemo, useState } from 'react';\r\n\r\nimport { getImg } from '@extensions/AttributePanel/utils/getImg';\r\nimport Color from 'color';\r\nimport { PresetColorsContext } from '@extensions/AttributePanel/components/provider/PresetColorsProvider';\r\nimport { ColorPickerContent } from './ColorPickerContent';\r\nimport { useRichTextPopupOpen } from '../RichTextToolBar/hooks/useRichTextPopupOpen';\r\nimport { RichTextPortalPopup } from '../RichTextToolBar/components/RichTextPortalPopup';\r\n\r\nexport interface ColorPickerProps extends PopoverProps {\r\n onChange?: (val: string) => void;\r\n value?: string;\r\n label: string;\r\n children?: React.ReactNode;\r\n showInput?: boolean;\r\n fixed?: boolean;\r\n /** Pass true when used inside the RichText toolbar so popup open state is managed correctly */\r\n inRichTextBar?: boolean;\r\n}\r\n\r\nconst getCollapseItemEle = (node: HTMLElement | null): HTMLElement => {\r\n if (!node) return document.body;\r\n if (node.classList.contains('arco-collapse-item')) {\r\n return node;\r\n }\r\n return getCollapseItemEle(node.parentElement);\r\n};\r\nconst transparentColor = 'rgba(0,0,0,0)';\r\n\r\nexport function ColorPicker(props: ColorPickerProps) {\r\n const { addCurrentColor } = useContext(PresetColorsContext);\r\n const [refEle, setRefEle] = useState<HTMLElement | null>(null);\r\n\r\n const { value = '', onChange, children, showInput = true, inRichTextBar } = props;\r\n\r\n const richTextPopup = useRichTextPopupOpen();\r\n\r\n const onInputChange = useCallback(\r\n (value: string) => {\r\n onChange?.(value);\r\n addCurrentColor(value);\r\n },\r\n [addCurrentColor, onChange],\r\n );\r\n\r\n const onInputEventChange = useCallback(\r\n (event: React.ChangeEvent<HTMLInputElement>) => {\r\n onInputChange(event.target.value);\r\n },\r\n [onInputChange],\r\n );\r\n\r\n const getPopupContainer = useCallback(() => {\r\n return getCollapseItemEle(refEle);\r\n }, [refEle]);\r\n\r\n const inputColor = useMemo(() => {\r\n if (props.value?.startsWith('#') && props.value?.length === 7)\r\n return props.value?.replace('#', '');\r\n return props.value;\r\n }, [props.value]);\r\n\r\n const adapterColor = useMemo(() => {\r\n try {\r\n if (value.length === 6 && Color(`#${value}`).hex()) return `#${value}`;\r\n } catch {\r\n console.error('err adapterColor', value);\r\n }\r\n return value;\r\n }, [value]);\r\n\r\n // Strip inRichTextBar (our custom prop) before spreading onto antd Popover\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n const { inRichTextBar: _inRichTextBar, ...popoverProps } = props;\r\n\r\n // When inside the rich text toolbar, render a portal popup instead of antd Popover\r\n if (inRichTextBar) {\r\n const colorContent = (\r\n <ColorPickerContent\r\n value={adapterColor}\r\n onChange={(c) => {\r\n onInputChange(c);\r\n // Do NOT close the popup here — clicking a color swatch or using\r\n // the native picker should keep the popup open so the user can\r\n // pick another color or dismiss by clicking outside.\r\n }}\r\n />\r\n );\r\n\r\n return (\r\n <>\r\n <span\r\n ref={richTextPopup.setTriggerRef}\r\n onClick={richTextPopup.handleTriggerClick}\r\n style={{ display: 'inline-flex' }}\r\n >\r\n {children}\r\n </span>\r\n <RichTextPortalPopup\r\n open={richTextPopup.open}\r\n rect={richTextPopup.rect}\r\n containerRef={richTextPopup.setPopupContainerRef}\r\n placement=\"bottom\"\r\n >\r\n {colorContent}\r\n </RichTextPortalPopup>\r\n </>\r\n );\r\n }\r\n\r\n return (\r\n <div style={{ flex: 1, display: 'flex' }}>\r\n <Popover\r\n title={popoverProps.label}\r\n trigger=\"click\"\r\n className=\"color-picker-popup\"\r\n content={(\r\n <ColorPickerContent\r\n value={adapterColor}\r\n onChange={onInputChange}\r\n />\r\n )}\r\n getPopupContainer={getPopupContainer}\r\n {...popoverProps}\r\n >\r\n {children ? (\r\n <span style={{ display: 'inline-flex' }}>\r\n {children}\r\n </span>\r\n ) : (\r\n <div\r\n ref={setRefEle}\r\n style={{\r\n display: 'inline-block',\r\n height: 26,\r\n width: 26,\r\n boxSizing: 'border-box',\r\n padding: 4,\r\n border: '1px solid var(--color-neutral-3, rgb(229, 230, 235))',\r\n borderRadius: showInput ? undefined : 4,\r\n fontSize: 0,\r\n borderRight: showInput ? 'none' : undefined,\r\n position: 'relative',\r\n cursor: 'pointer',\r\n }}\r\n >\r\n {props.value ? (\r\n <span\r\n style={{\r\n position: 'relative',\r\n display: 'block',\r\n border: '1px solid var(--color-neutral-3, rgb(229, 230, 235))',\r\n borderRadius: 2,\r\n width: '100%',\r\n height: '100%',\r\n textAlign: 'center',\r\n backgroundColor: adapterColor,\r\n }}\r\n />\r\n ) : (\r\n <img\r\n alt=\"Color picker icon\"\r\n style={{\r\n maxWidth: '100%',\r\n maxHeight: '100%',\r\n filter: 'invert( 0.78 ) drop-shadow(0 0px 0 rgb(0 0 0 / 45%))',\r\n }}\r\n src={getImg('AttributePanel_02')}\r\n />\r\n )}\r\n <style>\r\n {`\r\n [title=\"${transparentColor}\"] {\r\n background-image: url(\"https://res.cloudinary.com/flashmail/image/upload/v1656944736/cl4vlvzcm05911zsaor6aktl0/ce7qm7lxs5jm47ggabha.png\") !important\r\n }\r\n\r\n `}\r\n </style>\r\n </div>\r\n )}\r\n </Popover>\r\n {showInput && (\r\n <Input\r\n value={inputColor}\r\n style={{ outline: 'none', flex: 1, borderRadius: 0 }}\r\n onChange={onInputEventChange}\r\n />\r\n )}\r\n </div>\r\n );\r\n}\r\n","import { colorAdapter } from '@extensions/AttributePanel/components/adapter';\r\nimport React, { ComponentProps } from 'react';\r\nimport { ColorPicker, ColorPickerProps } from '../ColorPicker';\r\nimport enhancer from '../enhancer';\r\n\r\nconst ColorPickerFieldSource = enhancer<ColorPickerProps>(ColorPicker, e => e, {\r\n debounceTime: 1,\r\n});\r\n\r\nexport const ColorPickerField = (\r\n props: ComponentProps<typeof ColorPickerFieldSource>,\r\n) => {\r\n return (\r\n <ColorPickerFieldSource\r\n config={colorAdapter}\r\n {...props}\r\n />\r\n );\r\n};\r\n","import React, { useEffect } from 'react';\nimport { ContentEditableType, DATA_CONTENT_EDITABLE_TYPE, getShadowRoot } from '@thanhpv102/easy-email-editor';\nimport { useField, useForm } from '@thanhpv102/easy-email-editor';\n\nexport interface InlineTextProps {\n idx: string;\n children?: React.ReactNode;\n onChange: (content: string) => void;\n}\n\nexport function InlineText({ idx, onChange, children }: InlineTextProps) {\n const {\n mutators: { setFieldTouched },\n } = useForm();\n\n useField(idx); // setFieldTouched will be work while register field,\n\n useEffect(() => {\n const shadowRoot = getShadowRoot();\n\n const onPaste = (e: ClipboardEvent) => {\n if (!(e.target instanceof Element) || !e.target.getAttribute('contenteditable')) return;\n e.preventDefault();\n\n const text = e.clipboardData?.getData('text/plain') || '';\n document.execCommand('insertHTML', false, text);\n const contentEditableType = e.target.getAttribute(DATA_CONTENT_EDITABLE_TYPE);\n if (contentEditableType === ContentEditableType.RichText) {\n onChange(e.target.innerHTML || '');\n } else if (contentEditableType === ContentEditableType.Text) {\n onChange(e.target.textContent?.trim() || '');\n }\n };\n\n const onInput = (e: Event) => {\n if (e.target instanceof Element && e.target.getAttribute('contenteditable')) {\n\n const contentEditableType = e.target.getAttribute(DATA_CONTENT_EDITABLE_TYPE);\n if (contentEditableType === ContentEditableType.RichText) {\n onChange(e.target.innerHTML || '');\n } else if (contentEditableType === ContentEditableType.Text) {\n onChange(e.target.textContent?.trim() || '');\n }\n }\n };\n\n shadowRoot.addEventListener('paste', onPaste as any, true);\n shadowRoot.addEventListener('input', onInput);\n\n return () => {\n shadowRoot.removeEventListener('paste', onPaste as any, true);\n shadowRoot.removeEventListener('input', onInput);\n };\n }, [onChange, setFieldTouched]);\n\n return <>{children}</>;\n}\n","import { classnames } from '@extensions/utils/classnames';\nimport React, { useCallback, useRef, useState } from 'react';\nimport { createPortal } from 'react-dom';\n\nconst FIXED_CONTAINER_ID = 'FIXED_CONTAINER_ID';\n\ninterface TooltipState {\n visible: boolean;\n left: number;\n top: number;\n}\n\nfunction SimpleTooltip({ title, children }: { title: string; children: React.ReactElement }) {\n const [tip, setTip] = useState<TooltipState>({ visible: false, left: 0, top: 0 });\n const timerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n const show = useCallback((e: React.MouseEvent) => {\n const rect = (e.currentTarget as HTMLElement).getBoundingClientRect();\n if (timerRef.current) clearTimeout(timerRef.current);\n timerRef.current = setTimeout(() => {\n setTip({ visible: true, left: rect.left + rect.width / 2, top: rect.bottom + 6 });\n }, 400);\n }, []);\n\n const hide = useCallback(() => {\n if (timerRef.current) clearTimeout(timerRef.current);\n setTip(prev => ({ ...prev, visible: false }));\n }, []);\n\n const container = document.getElementById(FIXED_CONTAINER_ID) ?? document.body;\n\n return (\n <>\n {React.cloneElement(children, { onMouseEnter: show, onMouseLeave: hide } as React.HTMLAttributes<HTMLElement>)}\n {tip.visible && createPortal(\n <div style={{\n position: 'fixed',\n left: tip.left,\n top: tip.top,\n transform: 'translateX(-50%)',\n backgroundColor: 'rgba(0,0,0,0.75)',\n color: '#fff',\n padding: '4px 8px',\n borderRadius: 4,\n fontSize: 12,\n whiteSpace: 'nowrap',\n pointerEvents: 'none',\n zIndex: 99999,\n }}>\n {title}\n </div>,\n container,\n )}\n </>\n );\n}\n\nexport const ToolItem: React.FC<{\n title?: string;\n icon: React.ReactNode;\n onClick?: React.MouseEventHandler<HTMLButtonElement>;\n trigger?: string;\n style?: React.CSSProperties;\n isActive?: boolean;\n getPopupContainer?: () => HTMLElement;\n}> = props => {\n const btn = (\n <button\n tabIndex={-1}\n className={classnames('easy-email-extensions-emailToolItem', props.isActive && 'easy-email-extensions-emailToolItem-active')}\n onClick={props.onClick}\n style={props.style}\n >\n {props.icon}\n </button>\n );\n\n if (!props.title) {\n return btn;\n }\n\n return <SimpleTooltip title={props.title}>{btn}</SimpleTooltip>;\n};\n","import { Col, Row, Space } from 'antd';\nimport type { TooltipProps } from 'antd';\nimport React, { useCallback, useMemo, useRef } from 'react';\nimport { Form, IconFont, Stack, TextStyle } from '@thanhpv102/easy-email-editor';\nimport { SearchField, SwitchField } from '@extensions/components/Form';\nimport { ToolItem } from '../ToolItem';\nimport { EMAIL_BLOCK_CLASS_NAME } from '@thanhpv102/easy-email-core';\nimport { useRichTextPopupOpen } from '../../hooks/useRichTextPopupOpen';\nimport { RichTextPortalPopup } from '../RichTextPortalPopup';\n\nexport interface LinkParams {\n link: string;\n blank: boolean;\n underline: boolean;\n linkNode: HTMLAnchorElement | null;\n}\n\nexport interface LinkProps extends Omit<TooltipProps, 'title'> {\n currentRange: Range | null | undefined;\n onChange: (val: LinkParams) => void;\n}\n\nfunction getAnchorElement(\n node: Node | null,\n): HTMLAnchorElement | null {\n if (!node) return null;\n if (node instanceof HTMLAnchorElement) {\n return node;\n }\n if (node instanceof Element && node.classList.contains(EMAIL_BLOCK_CLASS_NAME)) return null;\n\n return getAnchorElement(node.parentNode);\n}\n\nexport function getLinkNode(\n currentRange: Range | null | undefined,\n): HTMLAnchorElement | null {\n let linkNode: HTMLAnchorElement | null = null;\n if (!currentRange) return null;\n linkNode = getAnchorElement(currentRange.startContainer);\n return linkNode;\n}\n\nexport function Link(props: LinkProps) {\n const { open, rect, close, handleTriggerClick, setTriggerRef, setPopupContainerRef } = useRichTextPopupOpen();\n\n // Compute live values from current selection\n const liveValues = useMemo((): LinkParams => {\n let link = '';\n let blank = true;\n let underline = true;\n let linkNode: HTMLAnchorElement | null = getLinkNode(props.currentRange);\n if (linkNode) {\n link = linkNode.getAttribute('href') || '';\n blank = linkNode.getAttribute('target') === '_blank';\n underline = linkNode.style.textDecoration === 'underline';\n }\n return { link, blank, underline, linkNode };\n }, [props.currentRange]);\n\n // Freeze initial values when popup opens — don't let selection changes remount the Form\n const frozenValuesRef = useRef<LinkParams>(liveValues);\n if (!open) {\n // Only update frozen values when popup is closed (i.e. on next open)\n frozenValuesRef.current = liveValues;\n }\n const initialValues = frozenValuesRef.current;\n\n const onSubmit = useCallback(\n (values: LinkParams) => {\n props.onChange(values);\n close();\n },\n [props, close],\n );\n\n return (\n <>\n <span ref={setTriggerRef}>\n <ToolItem\n isActive={Boolean(initialValues.link)}\n title={t('Link')}\n icon={<IconFont iconName=\"icon-link\" />}\n onClick={handleTriggerClick}\n />\n </span>\n <RichTextPortalPopup\n open={open}\n rect={rect}\n containerRef={setPopupContainerRef}\n placement=\"bottom\"\n >\n <Form\n key={initialValues.link}\n initialValues={initialValues}\n onSubmit={onSubmit}\n >\n {({ handleSubmit }) => (\n <div style={{\n color: 'var(--ant-color-text)',\n backgroundColor: 'var(--ant-color-bg-container)',\n padding: '8px 12px',\n minWidth: 260\n }}>\n <Stack vertical spacing=\"none\">\n <SearchField\n size=\"small\"\n name=\"link\"\n key=\"link\"\n label={t('Link')}\n labelHidden\n placeholder={t('https://www.example.com')}\n onSearch={() => handleSubmit()}\n />\n </Stack>\n <Row>\n <Col span={12}>\n <Space align=\"center\" size=\"small\">\n <TextStyle size=\"smallest\">{t('Target')}</TextStyle>\n <SwitchField size=\"small\" label={t('Target')} labelHidden name=\"blank\" key=\"blank\" inline />\n </Space>\n </Col>\n <Col span={12}>\n <Space align=\"center\" size=\"small\">\n <TextStyle size=\"smallest\">{t('Underline')}</TextStyle>\n <SwitchField size=\"small\" label={t('Underline')} labelHidden name=\"underline\" key=\"underline\" inline />\n </Space>\n </Col>\n </Row>\n </div>\n )}\n </Form>\n </RichTextPortalPopup>\n </>\n );\n}\n","import { useEditorContext, useEditorProps } from '@thanhpv102/easy-email-editor';\nimport React, { useMemo } from 'react';\n\nconst DEFAULT_FONT_LIST: Array<{ value: string; label: string }> = [\n { value: 'Arial', label: 'Arial' },\n { value: 'Tahoma', label: 'Tahoma' },\n { value: 'Verdana', label: 'Verdana' },\n { value: 'Times New Roman', label: 'Times New Roman' },\n { value: 'Courier New', label: 'Courier New' },\n { value: 'Georgia', label: 'Georgia' },\n { value: 'Trebuchet MS', label: 'Trebuchet MS' },\n { value: 'Comic Sans MS', label: 'Comic Sans MS' },\n { value: 'Impact', label: 'Impact' },\n];\n\nexport function useFontFamily() {\n const { fontList: defaultFontList } = useEditorProps();\n const { pageData } = useEditorContext();\n\n const addFonts = pageData?.data.value.fonts;\n\n const fontList = useMemo(() => {\n const fonts: Array<{\n value: string;\n label: React.ReactNode;\n }> = [];\n // Use provided fontList if non-empty, otherwise fall back to built-in defaults\n const baseList = defaultFontList && defaultFontList.length > 0 ? defaultFontList : DEFAULT_FONT_LIST;\n fonts.push(...baseList);\n if (addFonts) {\n const options = addFonts.map(item => ({ value: item.name, label: item.name }));\n fonts.unshift(...options);\n }\n\n return fonts.map(item => ({ value: item.value, label: <span style={{ fontFamily: item.value }}>{item.label}</span> }));\n }, [addFonts, defaultFontList]);\n\n return {\n fontList\n };\n}","import React, { useCallback } from 'react';\n\nimport { ToolItem } from '../ToolItem';\nimport { IconFont } from '@thanhpv102/easy-email-editor';\nimport { useFontFamily } from '@extensions/hooks/useFontFamily';\nimport { useRichTextPopupOpen } from '../../hooks/useRichTextPopupOpen';\nimport { RichTextPortalPopup } from '../RichTextPortalPopup';\n\nexport interface FontFamilyProps {\n execCommand: (cmd: string, value: string) => void;\n}\n\nexport function FontFamily(props: FontFamilyProps) {\n const { fontList } = useFontFamily();\n const { execCommand } = props;\n const { open, rect, close, handleTriggerClick, setTriggerRef, setPopupContainerRef } = useRichTextPopupOpen();\n\n const onChange = useCallback(\n (val: string) => {\n execCommand('fontName', val);\n close();\n },\n [execCommand, close],\n );\n\n return (\n <>\n <span ref={setTriggerRef}>\n <ToolItem\n title={t('Font family')}\n icon={<IconFont iconName=\"icon-font-family\" />}\n onClick={handleTriggerClick}\n />\n </span>\n <RichTextPortalPopup\n open={open}\n rect={rect}\n containerRef={setPopupContainerRef}\n placement=\"bottom\"\n >\n <ul\n style={{\n listStyle: 'none',\n margin: 0,\n padding: '4px 0',\n maxWidth: 200,\n maxHeight: 350,\n overflowY: 'auto',\n }}\n >\n {fontList.map(item => (\n <li\n key={item.value}\n onClick={() => onChange(item.value)}\n style={{\n padding: '5px 12px',\n cursor: 'pointer',\n lineHeight: '22px',\n whiteSpace: 'nowrap',\n }}\n onMouseEnter={e => {\n (e.currentTarget as HTMLElement).style.backgroundColor = 'var(--color-font-item-background, #f5f5f5)';\n }}\n onMouseLeave={e => {\n (e.currentTarget as HTMLElement).style.backgroundColor = 'transparent';\n }}\n >\n {item.label}\n </li>\n ))}\n </ul>\n </RichTextPortalPopup>\n </>\n );\n}\n",".helpTooltip {\n :global {\n .ant-tooltip-inner {\n z-index: 10000 !important;\n }\n }\n\n z-index: 10000 !important;\n}\n","import React from 'react';\nimport { Tooltip, TooltipProps } from 'antd';\nimport { QuestionCircleOutlined } from '@ant-design/icons';\nimport styles from './index.module.scss';\n\nexport function Help(\n props: TooltipProps &\n Partial<{ style: Partial<React.CSSProperties> }> & {\n title: React.ReactNode;\n }\n) {\n return (\n <Tooltip\n {...{ ...props, style: undefined }}\n title={props.title}\n classNames={{ root: styles.helpTooltip }}\n getPopupContainer={() => document.body}\n >\n <span style={{ cursor: 'pointer' }}>\n <QuestionCircleOutlined style={props.style} />\n </span>\n </Tooltip>\n );\n}\n","import { FieldArray, Stack, TextStyle, useBlock, useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport React from 'react';\nimport { PlusOutlined, DeleteOutlined } from '@ant-design/icons';\nimport { TextField } from '.';\nimport { Button } from 'antd';\nimport { Help } from '@extensions/AttributePanel/components/UI/Help';\nimport { IPage } from '@thanhpv102/easy-email-core';\n\nexport function AddFont() {\n const { focusBlock } = useBlock();\n const { focusIdx } = useFocusIdx();\n const value: IPage['data']['value'] = focusBlock?.data.value;\n return (\n <FieldArray name={`${focusIdx}.data.value.fonts`}>\n {({ fields }) => {\n return (\n <div>\n <Stack\n vertical\n spacing=\"tight\"\n >\n <Stack distribution=\"equalSpacing\">\n <TextStyle variation=\"strong\">\n {t('Import font')} <Help title={t('Points to a hosted css file')} />\n </TextStyle>\n <Stack>\n <Button\n size=\"small\"\n icon={<PlusOutlined />}\n onClick={() => fields.push({ name: '', href: '' })}\n />\n </Stack>\n </Stack>\n\n <Stack\n vertical\n spacing=\"extraTight\"\n >\n {value.fonts?.map((item, index) => {\n return (\n <div key={index}>\n <Stack\n alignment=\"center\"\n wrap={false}\n >\n <Stack.Item fill>\n <TextField\n name={`${focusIdx}.data.value.fonts.${index}.name`}\n label={t('Name')}\n />\n </Stack.Item>\n <Stack.Item fill>\n <TextField\n name={`${focusIdx}.data.value.fonts.${index}.href`}\n label={t('Href')}\n />\n </Stack.Item>\n <Stack\n vertical\n spacing=\"loose\"\n >\n <Stack.Item />\n <Button\n icon={<DeleteOutlined />}\n onClick={() => fields.remove(index)}\n />\n </Stack>\n </Stack>\n </div>\n );\n })}\n </Stack>\n </Stack>\n </div>\n );\n }}\n </FieldArray>\n );\n}\n","import { EyeOutlined, EyeInvisibleOutlined } from '@ant-design/icons';\r\nimport React, { useCallback } from 'react';\r\nimport { Stack, TextStyle, useBlock } from '@thanhpv102/easy-email-editor';\r\nimport { BasicType, BlockManager } from '@thanhpv102/easy-email-core';\r\n\r\nexport interface AttributesPanelWrapper {\r\n style?: React.CSSProperties;\r\n extra?: React.ReactNode;\r\n children: React.ReactNode | React.ReactElement;\r\n}\r\nexport const AttributesPanelWrapper: React.FC<AttributesPanelWrapper> = props => {\r\n const { focusBlock } = useBlock();\r\n const block = focusBlock && BlockManager.getBlockByType(focusBlock.type);\r\n\r\n if (!focusBlock || !block) return null;\r\n\r\n return (\r\n <div>\r\n <div\r\n style={{\r\n padding: '4px 16px 12px 16px',\r\n }}\r\n >\r\n <Stack vertical>\r\n <Stack.Item fill>\r\n <Stack\r\n wrap={false}\r\n distribution='equalSpacing'\r\n alignment='center'\r\n >\r\n <Stack\r\n spacing='extraTight'\r\n alignment='center'\r\n >\r\n <EyeIcon />\r\n <TextStyle\r\n variation='strong'\r\n size='medium'\r\n >\r\n {`${block.name} `} {t('attributes')}\r\n </TextStyle>\r\n </Stack>\r\n <Stack.Item>{props.extra}</Stack.Item>\r\n </Stack>\r\n </Stack.Item>\r\n </Stack>\r\n </div>\r\n\r\n <div style={{ padding: '0px', ...props.style }}>{props.children}</div>\r\n </div>\r\n );\r\n};\r\n\r\nfunction EyeIcon() {\r\n const { setFocusBlock, focusBlock } = useBlock();\r\n\r\n const onToggleVisible = useCallback(\r\n (e: React.MouseEvent) => {\r\n if (!focusBlock) return null;\r\n e.stopPropagation();\r\n setFocusBlock({\r\n ...focusBlock,\r\n data: {\r\n ...focusBlock.data,\r\n hidden: !focusBlock.data.hidden,\r\n },\r\n });\r\n },\r\n [focusBlock, setFocusBlock],\r\n );\r\n\r\n if (!focusBlock) return null;\r\n\r\n if (focusBlock.type === BasicType.PAGE.toString()) return null;\r\n\r\n return focusBlock.data.hidden ? (\r\n <EyeInvisibleOutlined\r\n style={{ cursor: 'pointer', fontSize: 16 }}\r\n onClick={onToggleVisible}\r\n />\r\n ) : (\r\n <EyeOutlined\r\n style={{ cursor: 'pointer', fontSize: 16 }}\r\n onClick={onToggleVisible}\r\n />\r\n );\r\n}\r\n","import React, { useMemo } from 'react';\nimport { useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { AutoCompleteField } from '../../../components/Form';\nimport { useFontFamily } from '@extensions/hooks/useFontFamily';\n\nexport function FontFamily({ name }: { name?: string }) {\n const { focusIdx } = useFocusIdx();\n const { fontList } = useFontFamily();\n\n const transformedFontList = useMemo(() => {\n return fontList.map(font => ({\n value: font.value,\n label: font.value, // Use the font value as the label since AutoCompleteField expects string labels\n }));\n }, [fontList]);\n\n return useMemo(() => {\n return (\n <AutoCompleteField\n className=\"ant-input ant-input-outlined\"\n style={{ minWidth: 60, flex: 1 }}\n showSearch\n label={'Font family'}\n name={name || `${focusIdx}.attributes.font-family`}\n options={transformedFontList}\n />\n );\n }, [focusIdx, transformedFontList, name]);\n}\n","import React from 'react';\nimport {\n ColorPickerField,\n InputWithUnitField,\n NumberField,\n TextAreaField,\n TextField,\n} from '@extensions/components/Form';\nimport { AddFont } from '@extensions/components/Form/AddFont';\nimport { Col, Collapse, Row, Space } from 'antd';\nimport { Stack, useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { AttributesPanelWrapper } from '@extensions/AttributePanel/components/attributes/AttributesPanelWrapper';\nimport { FontFamily } from '../../attributes/FontFamily';\nimport { pixelAdapter } from '../../adapter';\n\ninterface PageProps {\n hideSubTitle?: boolean;\n hideSubject?: boolean;\n}\n\nexport function Page({ hideSubTitle, hideSubject }: PageProps) {\n const { focusIdx } = useFocusIdx();\n\n if (!focusIdx) return null;\n\n return (\n <AttributesPanelWrapper style={{ padding: 0 }}>\n <Stack.Item fill>\n <Collapse\n defaultActiveKey={['0', '1']}\n items={[\n {\n key: '0',\n label: t('Email Setting'),\n children: (\n <Space orientation=\"vertical\" size=\"small\">\n {!hideSubject && (\n <TextField\n label={t('Subject')}\n name={'subject'}\n inline\n />\n )}\n {!hideSubTitle && (\n <TextField\n label={t('SubTitle')}\n name={'subTitle'}\n inline\n />\n )}\n <InputWithUnitField\n label={t('Width')}\n name={`${focusIdx}.attributes.width`}\n inline\n />\n <InputWithUnitField\n label={t('Breakpoint')}\n helpText={t(\n 'Allows you to control on which breakpoint the layout should go desktop/mobile.',\n )}\n name={`${focusIdx}.data.value.breakpoint`}\n inline\n />\n </Space>\n )\n },\n {\n key: '1',\n label: t('Theme Setting'),\n children: (\n <Stack\n vertical\n spacing=\"tight\"\n >\n <Row>\n <Col span={11}>\n <FontFamily name={`${focusIdx}.data.value.font-family`} />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <NumberField\n className=\"ant-input ant-input-outlined\"\n label=\"Font size (px)\"\n name={`${focusIdx}.data.value.font-size`}\n config={pixelAdapter}\n autoComplete=\"off\"\n />\n </Col>\n </Row>\n\n <Row>\n <Col span={11}>\n <InputWithUnitField\n label={t('Line height')}\n unitOptions=\"percent\"\n name={`${focusIdx}.data.value.line-height`}\n />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <InputWithUnitField\n label={t('Font weight')}\n unitOptions=\"percent\"\n name={`${focusIdx}.data.value.font-weight`}\n />\n </Col>\n </Row>\n\n <Row>\n <Col span={11}>\n <ColorPickerField\n label={t('Text color')}\n name={`${focusIdx}.data.value.text-color`}\n />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <ColorPickerField\n label={t('Background')}\n name={`${focusIdx}.attributes.background-color`}\n />\n </Col>\n </Row>\n\n <Row>\n <ColorPickerField\n label={t('Content background')}\n name={`${focusIdx}.data.value.content-background-color`}\n />\n </Row>\n\n <TextAreaField\n autoSize\n label={t('User style')}\n name={`${focusIdx}.data.value.user-style.content`}\n />\n <Stack.Item />\n <Stack.Item />\n <AddFont />\n <Stack.Item />\n <Stack.Item />\n </Stack>\n )\n }\n ]}\n />\n </Stack.Item>\n </AttributesPanelWrapper>\n );\n}\n","\nimport React, { useCallback, useMemo } from 'react';\nimport { InputWithUnit } from '../../../components/Form/InputWithUnit';\nimport { useFocusIdx, Stack, useBlock, TextStyle, IconFont, Field } from '@thanhpv102/easy-email-editor';\nimport { Button, Row, Col, Space, Tooltip, Form } from 'antd';\n\nexport interface PaddingProps {\n title?: string;\n attributeName?: 'padding' | 'inner-padding' | 'text-padding';\n name?: string;\n showResetAll?: boolean;\n}\n\n// Helper component to handle individual padding fields without using enhancer\nconst PaddingFieldInput: React.FC<{\n label: string;\n paddingIndex: 0 | 1 | 2 | 3; // top, right, bottom, left\n paddingFieldName: string;\n inline?: boolean;\n}> = ({ label, paddingIndex, paddingFieldName, inline }) => {\n const labelCol = inline\n ? { span: 7, style: { textAlign: 'right' as const, paddingRight: 0 } }\n : { span: 24, style: { paddingRight: 0 } };\n\n const wrapperCol = inline\n ? { span: 16, offset: 1 }\n : { span: 24 };\n\n return (\n <Field\n name={paddingFieldName}\n >\n {({ input: { value, onChange } }) => {\n const paddingParts = (value || '0px 0px 0px 0px').split(/\\s+/);\n const currentValue = paddingParts[paddingIndex] || '0px';\n\n const handleChange = (newVal: string) => {\n const newParts = [...paddingParts];\n newParts[paddingIndex] = newVal;\n // Ensure we have exactly 4 parts\n while (newParts.length < 4) newParts.push('0px');\n onChange(newParts.slice(0, 4).join(' '));\n };\n\n return (\n <Form.Item\n label={label}\n labelCol={labelCol}\n wrapperCol={wrapperCol}\n style={{ margin: 0 }}\n labelAlign='left'\n >\n <InputWithUnit\n value={currentValue}\n onChange={handleChange}\n />\n </Form.Item>\n );\n }}\n </Field>\n );\n};\n\nexport function Padding(props: PaddingProps = {}) {\n const { title = t('Padding'), attributeName = 'padding', name, showResetAll } = props;\n const { change } = useBlock();\n const { focusIdx } = useFocusIdx();\n\n const paddingFieldName = useMemo(() => {\n if (name) {\n return name;\n }\n return focusIdx + `.attributes[${attributeName}]`;\n }, [name, focusIdx, attributeName]);\n\n const onResetPadding = useCallback(() => {\n change(paddingFieldName, '0px 0px 0px 0px');\n }, [paddingFieldName, change]);\n\n return (\n <>\n <Stack\n vertical\n spacing='extraTight'\n >\n <Space align='center' size='small'>\n <TextStyle variation='strong'>{title}</TextStyle>\n {showResetAll && (\n <Tooltip title='Remove all padding'>\n <Button\n onClick={onResetPadding}\n size='small'\n icon={(\n <IconFont\n iconName='icon-remove'\n size={12}\n />\n )}\n />\n </Tooltip>\n )}\n </Space>\n\n <Row>\n <Col span={11}>\n <PaddingFieldInput\n label={t('Top (px)')}\n paddingIndex={0}\n paddingFieldName={paddingFieldName}\n />\n </Col>\n <Col offset={1} span={11}>\n <PaddingFieldInput\n label={t('Left (px)')}\n paddingIndex={3}\n paddingFieldName={paddingFieldName}\n />\n </Col>\n </Row>\n\n <Row>\n <Col span={11}>\n <PaddingFieldInput\n label={t('Bottom (px)')}\n paddingIndex={2}\n paddingFieldName={paddingFieldName}\n />\n </Col>\n <Col offset={1} span={11}>\n <PaddingFieldInput\n label={t('Right (px)')}\n paddingIndex={1}\n paddingFieldName={paddingFieldName}\n />\n </Col>\n </Row>\n </Stack>\n </>\n );\n}\n\n","import React, { useMemo } from 'react';\r\nimport { ColorPickerField } from '../../../components/Form';\r\nimport { useFocusIdx } from '@thanhpv102/easy-email-editor';\r\n\r\nexport function BackgroundColor({ title = t('Background color') }: { title?: string }) {\r\n const { focusIdx } = useFocusIdx();\r\n\r\n return useMemo(() => {\r\n return (\r\n <ColorPickerField\r\n label={title}\r\n name={`${focusIdx}.attributes.background-color`}\r\n key={`${focusIdx}.attributes.background-color`}\r\n />\r\n );\r\n }, [focusIdx, title]);\r\n}\r\n","import React, { useMemo } from 'react';\nimport { ImageUploaderField, SelectField, TextField } from '../../../components/Form';\nimport { useFocusIdx, useEditorProps } from '@thanhpv102/easy-email-editor';\nimport { BackgroundColor } from './BackgroundColor';\nimport { Row, Col, Space } from 'antd';\n\nconst backgroundRepeatOptions = [\n {\n value: 'no-repeat',\n get label() {\n return 'No repeat';\n },\n },\n {\n value: 'repeat',\n get label() {\n return 'Repeat';\n },\n },\n {\n value: 'repeat-x',\n get label() {\n return 'Repeat X';\n },\n },\n {\n value: 'repeat-y',\n get label() {\n return 'Repeat Y';\n },\n },\n];\n\nexport function Background() {\n const { focusIdx } = useFocusIdx();\n const { onUploadImage, enableAssetManager } = useEditorProps();\n return useMemo(() => {\n return (\n <Space\n orientation='vertical'\n size='small'\n >\n <ImageUploaderField\n label={'Background image'}\n name={`${focusIdx}.attributes.background-url`}\n key={`${focusIdx}.attributes.background-url`}\n helpText={\n 'The image suffix should be .jpg, jpeg, png, gif, etc. Otherwise, the picture may not be displayed normally.'\n }\n uploadHandler={onUploadImage}\n enableSelectFromLibrary={enableAssetManager}\n />\n\n <Row>\n <Col span={11}>\n <BackgroundColor />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <SelectField\n label={'Background repeat'}\n key={`${focusIdx}.attributes.background-repeat`}\n options={backgroundRepeatOptions}\n name={`${focusIdx}.attributes.background-repeat`}\n />\n </Col>\n </Row>\n <TextField\n label={'Background size'}\n name={`${focusIdx}.attributes.background-size`}\n key={`${focusIdx}.attributes.background-size`}\n />\n </Space>\n );\n }, [focusIdx, onUploadImage]);\n}\n","import React, { useMemo } from 'react';\nimport { InputWithUnitField, TextField } from '../../../components/Form';\nimport { useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { Col, Row } from 'antd';\n\nexport function Border() {\n const { focusIdx } = useFocusIdx();\n\n return useMemo(() => {\n return (\n <Row>\n <Col span={11}>\n <TextField\n label={'Border'}\n name={`${focusIdx}.attributes.border`}\n key={`${focusIdx}.attributes.border`}\n />\n </Col>\n <Col offset={1} span={11}>\n <InputWithUnitField\n label={'Border radius'}\n name={`${focusIdx}.attributes.border-radius`}\n key={`${focusIdx}.attributes.border-radius`}\n unitOptions=\"percent\"\n />\n </Col>\n </Row>\n );\n }, [focusIdx]);\n}\n","import React, { useMemo } from 'react';\r\nimport { useFocusIdx } from '@thanhpv102/easy-email-editor';\r\nimport { TextField } from '../../../components/Form';\r\n\r\nexport function ClassName() {\r\n const { focusIdx } = useFocusIdx();\r\n\r\n return useMemo(() => {\r\n return (\r\n <TextField\r\n label={t('Class name')}\r\n name={`${focusIdx}.attributes.css-class`}\r\n key={`${focusIdx}.attributes.css-class`}\r\n />\r\n );\r\n }, [focusIdx]);\r\n}\r\n","import { useBlock, useFocusIdx } from '@thanhpv102/easy-email-editor';\r\nimport { Row, Col } from 'antd';\r\nimport { AdvancedBlock, AdvancedType } from '@thanhpv102/easy-email-core';\r\nimport { TextField } from '@extensions/components/Form';\r\nimport React from 'react';\r\n\r\nexport function Iteration() {\r\n const { focusIdx } = useFocusIdx();\r\n const { focusBlock } = useBlock();\r\n const iteration = focusBlock?.data.value?.iteration as\r\n | undefined\r\n | AdvancedBlock['data']['value']['iteration'];\r\n\r\n if (\r\n !focusBlock?.type ||\r\n !Object.values(AdvancedType).includes(focusBlock.type as AdvancedType)\r\n ) {\r\n return null;\r\n }\r\n\r\n return (\r\n <>\r\n {iteration?.enabled && (\r\n <Col span={24}>\r\n <div>\r\n <Row>\r\n <Col span={11}>\r\n <TextField\r\n label={'Data source'}\r\n name={`${focusIdx}.data.value.iteration.dataSource`}\r\n />\r\n </Col>\r\n <Col offset={1} span={11}>\r\n <TextField\r\n label={'Item name'}\r\n name={`${focusIdx}.data.value.iteration.itemName`}\r\n />\r\n </Col>\r\n </Row>\r\n <Row>\r\n <Col span={11}>\r\n <TextField\r\n label={'Limit'}\r\n name={`${focusIdx}.data.value.iteration.limit`}\r\n quickchange\r\n type='number'\r\n onChangeAdapter={(v) => Number(v)}\r\n />\r\n </Col>\r\n <Col offset={1} span={11}>\r\n <TextField\r\n label={'Mock quantity'}\r\n max={iteration?.limit}\r\n name={`${focusIdx}.data.value.iteration.mockQuantity`}\r\n type='number'\r\n onChangeAdapter={(v) => Number(v)}\r\n quickchange\r\n />\r\n </Col>\r\n </Row>\r\n </div>\r\n </Col>\r\n )}\r\n </>\r\n );\r\n}\r\n","import { useBlock, useFocusIdx } from '@thanhpv102/easy-email-editor';\r\nimport { AdvancedBlock, OperatorSymbol, AdvancedType, Operator, IConditionGroup } from '@thanhpv102/easy-email-core';\r\nimport { Row, Col, Button, Space, List, App } from 'antd';\r\nimport { SelectField, TextField } from '@extensions/components/Form';\r\nimport React, { useCallback } from 'react';\r\nimport { cloneDeep, get, upperFirst } from 'lodash';\r\nimport { DeleteOutlined, PlusOutlined } from '@ant-design/icons';\r\nimport { useField } from '@thanhpv102/easy-email-editor';\r\n\r\nexport function Condition() {\r\n const { focusIdx } = useFocusIdx();\r\n const { focusBlock, change, values } = useBlock();\r\n const { message } = App.useApp();\r\n const condition = focusBlock?.data.value?.condition as\r\n | undefined\r\n | AdvancedBlock['data']['value']['condition'];\r\n\r\n const onAddCondition = useCallback((path: string) => {\r\n const groups = get(values, path) as IConditionGroup[];\r\n\r\n groups.push({\r\n symbol: OperatorSymbol.AND,\r\n groups: [\r\n {\r\n left: '',\r\n operator: Operator.TRUTHY,\r\n right: ''\r\n }\r\n ],\r\n });\r\n change(path, [...groups]);\r\n }, [change, values]);\r\n\r\n const onAddSubCondition = useCallback((path: string) => {\r\n const groups = get(values, path) as IConditionGroup['groups'];\r\n\r\n groups.push({\r\n left: '',\r\n operator: Operator.TRUTHY,\r\n right: ''\r\n\r\n });\r\n change(path, [...groups]);\r\n }, [change, values]);\r\n\r\n // content.children.[0].children.[0].data.value.condition.groups.1.groups\r\n const onDelete = useCallback((path: string, gIndex: number, ggIndex: number) => {\r\n if (!condition) return;\r\n const subPath = `${path}.${gIndex}.groups`;\r\n const groups = cloneDeep(get(values, path)) as IConditionGroup[];\r\n const subGroups = cloneDeep(get(values, subPath)) as IConditionGroup['groups'];\r\n\r\n subGroups.splice(ggIndex, 1);\r\n if (subGroups.length === 0) {\r\n if (groups.length === 1) {\r\n message.warning('At least one condition');\r\n return;\r\n }\r\n // remove empty array\r\n groups.splice(gIndex, 1);\r\n change(path, [...groups]);\r\n } else {\r\n change(subPath, [...subGroups]);\r\n }\r\n\r\n }, [change, condition, values, message]);\r\n\r\n if (\r\n !focusBlock?.type ||\r\n !Object.values(AdvancedType).includes(focusBlock.type as AdvancedType)\r\n ) {\r\n return null;\r\n }\r\n\r\n return (\r\n <>\r\n {condition?.enabled && (\r\n <Space orientation='vertical' size='middle'>\r\n\r\n <List\r\n header={(\r\n <Row justify='space-between'>\r\n <Col span={16}>\r\n {condition.groups.length > 1 && (\r\n <SelectField inline name={`${focusIdx}.data.value.condition.symbol`}\r\n label={t('Symbol')}\r\n options={[\r\n {\r\n label: t('And'),\r\n value: OperatorSymbol.AND\r\n },\r\n {\r\n label: t('Or'),\r\n value: OperatorSymbol.OR\r\n },\r\n ]}\r\n />\r\n )}\r\n </Col>\r\n <Button onClick={() => onAddCondition(`${focusIdx}.data.value.condition.groups`)} size='small' icon={<PlusOutlined />} />\r\n </Row>\r\n )}\r\n dataSource={condition.groups}\r\n renderItem={\r\n (group: IConditionGroup, gIndex: number) => {\r\n return (\r\n <List.Item key={gIndex}>\r\n <div>\r\n <Row justify='space-between'>\r\n <Col span={16}>\r\n {\r\n group.groups.length > 1 && (\r\n <SelectField inline name={`${focusIdx}.data.value.condition.groups.${gIndex}.symbol`}\r\n label={t('Symbol')}\r\n options={[\r\n {\r\n label: t('And'),\r\n value: OperatorSymbol.AND\r\n },\r\n {\r\n label: t('Or'),\r\n value: OperatorSymbol.OR\r\n },\r\n ]}\r\n />\r\n )\r\n }\r\n </Col>\r\n <Button size='small' icon={<PlusOutlined />} onClick={() => onAddSubCondition(`${focusIdx}.data.value.condition.groups.${gIndex}.groups`)} />\r\n </Row>\r\n {\r\n group.groups.map((_item: IConditionGroup['groups'][number], ggIndex: number) => (\r\n <div key={`condition-item-${gIndex}-${ggIndex}`}>\r\n <ConditionItem\r\n onDelete={onDelete}\r\n path={`${focusIdx}.data.value.condition.groups`}\r\n gIndex={gIndex}\r\n ggIndex={ggIndex}\r\n />\r\n </div>\r\n ))\r\n }\r\n\r\n </div>\r\n </List.Item>\r\n );\r\n }\r\n }\r\n />\r\n\r\n </Space>\r\n )}\r\n </>\r\n );\r\n}\r\n\r\nconst options = Object.values(Operator).map(item => ({ label: upperFirst(item), value: item }));\r\n\r\nfunction ConditionItem({ path, onDelete, gIndex, ggIndex }: { path: string; gIndex: number; ggIndex: number; onDelete: (path: string, gIndex: number, ggIndex: number,) => void; }) {\r\n\r\n const name = `${path}.${gIndex}.groups.${ggIndex}`;\r\n const { input: { value } } = useField(name);\r\n\r\n const hideRight = (value as { operator?: Operator; })?.operator === Operator.TRUTHY || (value as { operator?: Operator; })?.operator === Operator.FALSY;\r\n\r\n return (\r\n <Row align='middle'>\r\n <Col span={7}> <TextField label={t('Variable path')} name={`${name}.left`} /></Col>\r\n <Col span={7}> <SelectField label={t('Operator')} name={`${name}.operator`} options={options} /></Col>\r\n <Col span={7}> {!hideRight && <TextField label=\"Right\" name={`${name}.right`} />}</Col>\r\n <Col span={3}>\r\n <Button onClick={() => onDelete(path, gIndex, ggIndex)} icon={<DeleteOutlined />} />\r\n </Col>\r\n\r\n </Row>\r\n );\r\n}","import React, { useCallback, useEffect, useState } from 'react';\r\nimport { Collapse, Space, Switch } from 'antd';\r\nimport { useBlock, useEditorProps, useFocusIdx } from '@thanhpv102/easy-email-editor';\r\nimport { AdvancedBlock, isAdvancedBlock, OperatorSymbol, Operator, ICondition } from '@thanhpv102/easy-email-core';\r\nimport { Iteration } from '../Iteration';\r\nimport { Condition } from '../Condition';\r\n\r\nexport interface CollapseWrapperProps {\r\n defaultActiveKey: string[];\r\n children: React.ReactNode;\r\n}\r\n\r\nexport const CollapseWrapper: React.FC<CollapseWrapperProps> = props => {\r\n const { enabledLogic } = useEditorProps();\r\n const [activeKeys, setActiveKeys] = useState<string[]>(props.defaultActiveKey);\r\n\r\n const { focusBlock, change } = useBlock();\r\n const { focusIdx } = useFocusIdx();\r\n const value = focusBlock?.data.value;\r\n\r\n const isAdvancedBlockType = isAdvancedBlock(focusBlock?.type);\r\n\r\n const iterationEnabled =\r\n isAdvancedBlockType && Boolean(value?.iteration && value?.iteration?.enabled);\r\n\r\n const conditionEnabled =\r\n isAdvancedBlockType && Boolean(value?.condition && value?.condition?.enabled);\r\n\r\n const onIterationToggle = useCallback(\r\n (enabled: boolean) => {\r\n if (enabled) {\r\n if (!value?.iteration) {\r\n change(`${focusIdx}.data.value.iteration`, {\r\n enabled: true,\r\n dataSource: '',\r\n itemName: 'item',\r\n limit: 9999,\r\n mockQuantity: 1,\r\n } as AdvancedBlock['data']['value']['iteration']);\r\n }\r\n }\r\n change(`${focusIdx}.data.value.iteration.enabled`, enabled);\r\n },\r\n [change, focusIdx, value?.iteration]\r\n );\r\n\r\n const onConditionToggle = useCallback(\r\n (enabled: boolean) => {\r\n if (enabled) {\r\n if (!value?.condition) {\r\n change(`${focusIdx}.data.value.condition`, {\r\n enabled: true,\r\n symbol: OperatorSymbol.AND,\r\n groups: [\r\n {\r\n symbol: OperatorSymbol.AND,\r\n groups: [\r\n {\r\n left: '',\r\n operator: Operator.TRUTHY,\r\n right: ''\r\n }\r\n ],\r\n }\r\n ],\r\n } as ICondition);\r\n }\r\n }\r\n change(`${focusIdx}.data.value.condition.enabled`, enabled);\r\n },\r\n [change, focusIdx, value?.condition]\r\n );\r\n\r\n const onChange = useCallback((keys: string[]) => {\r\n setActiveKeys(keys);\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (!isAdvancedBlockType) return;\r\n\r\n if (iterationEnabled) {\r\n setActiveKeys(keys => [...keys, 'Iteration']);\r\n } else {\r\n setActiveKeys(keys => keys.filter(k => k !== 'Iteration'));\r\n }\r\n }, [iterationEnabled, isAdvancedBlockType]);\r\n\r\n useEffect(() => {\r\n if (!isAdvancedBlockType) return;\r\n\r\n if (conditionEnabled) {\r\n setActiveKeys(keys => [...keys, 'Condition']);\r\n } else {\r\n setActiveKeys(keys => keys.filter(k => k !== 'Condition'));\r\n }\r\n }, [conditionEnabled, isAdvancedBlockType]);\r\n\r\n return (\r\n <Space\r\n size='middle'\r\n orientation='vertical'\r\n style={{ width: '100%' }}\r\n >\r\n <Collapse\r\n onChange={onChange}\r\n defaultActiveKey={activeKeys}\r\n items={[\r\n ...React.Children.toArray(props.children).map((child, index) => {\r\n if (React.isValidElement(child) && child.props && typeof child.props === 'object' && child.props !== null && 'header' in child.props) {\r\n const childProps = child.props as { header: string; children: React.ReactNode; };\r\n return {\r\n key: child.key as string || index.toString(),\r\n label: childProps.header,\r\n children: childProps.children\r\n };\r\n }\r\n return null;\r\n }).filter((item): item is { key: string; label: string; children: React.ReactNode; } => item !== null),\r\n ...(enabledLogic ? [\r\n {\r\n key: 'Iteration',\r\n label: t('Iteration'),\r\n extra: (\r\n <div style={{ marginRight: 10 }}>\r\n <Switch checked={iterationEnabled} onChange={onIterationToggle} />\r\n </div>\r\n ),\r\n children: <Iteration />\r\n },\r\n {\r\n key: 'Condition',\r\n label: t('Condition'),\r\n extra: (\r\n <div style={{ marginRight: 10 }}>\r\n <Switch checked={conditionEnabled} onChange={onConditionToggle} />\r\n </div>\r\n ),\r\n children: <Condition />\r\n }\r\n ] : [])\r\n ]}\r\n />\r\n <div />\r\n <div />\r\n <div />\r\n </Space>\r\n );\r\n};\r\n","import React, { useCallback } from 'react';\nimport { Padding } from '@extensions/AttributePanel/components/attributes/Padding';\nimport { Background } from '@extensions/AttributePanel/components/attributes/Background';\nimport { Border } from '@extensions/AttributePanel/components/attributes/Border';\nimport { AttributesPanelWrapper } from '@extensions/AttributePanel/components/attributes/AttributesPanelWrapper';\nimport { Col, Collapse, Row, Space, Switch } from 'antd';\nimport { Stack, useBlock, useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { BasicType, BlockManager } from '@thanhpv102/easy-email-core';\nimport { ClassName } from '../../attributes/ClassName';\nimport { CollapseWrapper } from '../../attributes/CollapseWrapper';\nimport { TextField } from '@extensions/components/Form';\n\nexport function Section() {\n const { focusBlock, setFocusBlock } = useBlock();\n const { focusIdx } = useFocusIdx();\n const noWrap = focusBlock?.data.value.noWrap;\n\n const onChange = useCallback(\n (checked: boolean) => {\n if (!focusBlock) return;\n focusBlock.data.value.noWrap = checked;\n if (checked) {\n const children = [...focusBlock.children];\n for (let i = 0; i < children.length; i++) {\n const child = children[i];\n if (!child) continue;\n if (child.type === BasicType.GROUP.toString()) {\n children.splice(i, 1, ...child.children);\n }\n }\n focusBlock.children = [\n BlockManager.getBlockByType(BasicType.GROUP)!.create({\n children: children,\n }),\n ];\n } else {\n if (\n focusBlock.children.length === 1 &&\n focusBlock.children[0].type === BasicType.GROUP.toString()\n ) {\n focusBlock.children = focusBlock.children[0]?.children || [];\n }\n }\n setFocusBlock({ ...focusBlock });\n },\n [focusBlock, setFocusBlock],\n );\n\n return (\n <AttributesPanelWrapper style={{ padding: 0 }}>\n <CollapseWrapper defaultActiveKey={['.$0']}>\n <Collapse.Panel\n key=\"0\"\n header={'Dimension'}\n >\n <Space orientation=\"vertical\" size=\"small\">\n <Row>\n <Col span={12}>\n <label style={{ width: '100%', display: 'flex' }}>\n <div style={{ flex: 1 }}>{'Group'}</div>\n </label>\n <Switch\n checked={noWrap}\n onChange={onChange}\n />\n </Col>\n <Col span={12} />\n </Row>\n <Row>\n <Col span={12}>\n <label style={{ width: '100%', display: 'flex' }}>\n <div style={{ flex: 1 }}>{'Full Width'}</div>\n </label>\n <TextField name={`${focusIdx}.attributes.full-width`} />\n </Col>\n <Col span={12} />\n </Row>\n\n <Padding />\n </Space>\n </Collapse.Panel>\n <Collapse.Panel\n key=\"1\"\n header={'Background'}\n >\n <Stack\n vertical\n spacing=\"tight\"\n >\n <Background />\n </Stack>\n </Collapse.Panel>\n <Collapse.Panel\n key=\"2\"\n header={'Border'}\n >\n <Border />\n </Collapse.Panel>\n <Collapse.Panel\n key=\"3\"\n header={'Extra'}\n >\n <Col span={24}>\n <ClassName />\n </Col>\n </Collapse.Panel>\n </CollapseWrapper>\n </AttributesPanelWrapper>\n );\n}\n","import React, { useCallback } from 'react';\nimport { InputWithUnitField } from '../../../components/Form';\nimport { useFocusIdx, useBlock } from '@thanhpv102/easy-email-editor';\nimport { BasicType, getParentByIdx } from '@thanhpv102/easy-email-core';\nimport { InputWithUnitProps } from '@extensions/components/Form/InputWithUnit';\nimport { UseFieldConfig } from '@thanhpv102/easy-email-editor';\n\nexport function Width({\n inline = false,\n unitOptions,\n config,\n}: {\n inline?: boolean;\n unitOptions?: InputWithUnitProps['unitOptions'];\n config?: UseFieldConfig;\n}) {\n const { focusIdx } = useFocusIdx();\n const { focusBlock, values } = useBlock();\n const parentType = values && getParentByIdx(values, focusIdx)?.type;\n\n const validate = useCallback(\n (val: string): string | undefined => {\n if (focusBlock?.type === BasicType.COLUMN.toString() && parentType === BasicType.GROUP.toString()) {\n return /(\\d)*%/.test(val)\n ? undefined\n : 'Column inside a group must have a width in percentage, not in pixel';\n }\n return undefined;\n },\n [focusBlock?.type, parentType],\n );\n\n return (\n <InputWithUnitField\n validate={validate}\n label={'Width'}\n inline={inline}\n name={`${focusIdx}.attributes.width`}\n unitOptions={unitOptions}\n config={config}\n />\n );\n}\n","\nimport React, { useMemo } from 'react';\nimport { useFocusIdx, Stack } from '@thanhpv102/easy-email-editor';\nimport { SelectField } from '../../../components/Form';\n\nconst options = [\n {\n value: 'top',\n get label() {\n return t('top');\n },\n },\n {\n value: 'middle',\n get label() {\n return t('middle');\n },\n },\n {\n value: 'bottom',\n get label() {\n return t('bottom');\n },\n },\n];\n\nexport function VerticalAlign({\n attributeName = 'vertical-align',\n}: {\n attributeName?: string;\n}) {\n const { focusIdx } = useFocusIdx();\n\n return useMemo(() => {\n return (\n <Stack>\n <SelectField\n style={{ width: 120 }}\n label={t('Vertical align')}\n name={`${focusIdx}.attributes.${attributeName}`}\n options={options}\n />\n </Stack>\n );\n }, [attributeName, focusIdx]);\n}\n","import React from 'react';\nimport { useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { RadioGroupField } from '../../../components/Form';\n\nconst options = [\n {\n value: 'left',\n get label() {\n return t('left');\n },\n },\n {\n value: 'center',\n get label() {\n return t('center');\n },\n },\n {\n value: 'right',\n get label() {\n return t('right');\n },\n },\n];\n\nexport function Align({ inline }: { inline?: boolean }) {\n const { focusIdx } = useFocusIdx();\n\n return (\n <RadioGroupField\n label={t('Align')}\n key={`${focusIdx}.attributes.align`}\n options={options}\n name={`${focusIdx}.attributes.align`}\n />\n );\n}\n","import React from 'react';\r\nimport { ColorPickerField } from '../../../components/Form';\r\nimport { useFocusIdx } from '@thanhpv102/easy-email-editor';\r\n\r\nexport function Color({ title = t('Color') }: { title?: string; inline?: boolean }) {\r\n const { focusIdx } = useFocusIdx();\r\n\r\n return (\r\n <ColorPickerField\r\n label={title}\r\n name={`${focusIdx}.attributes.color`}\r\n key={`${focusIdx}.attributes.color`}\r\n />\r\n );\r\n}\r\n","import React, { useMemo } from 'react';\nimport { TextField } from '../../../components/Form';\nimport { Stack, UseFieldConfig, useFocusIdx } from '@thanhpv102/easy-email-editor';\n\nexport function Height({\n inline,\n config,\n }: {\n inline?: boolean;\n config?: UseFieldConfig;\n}) {\n const { focusIdx } = useFocusIdx();\n\n return useMemo(() => {\n return (\n <Stack wrap={false}>\n <Stack.Item fill>\n <TextField\n label={'Height'}\n name={`${focusIdx}.attributes.height`}\n quickchange\n inline={inline}\n config={config}\n />\n </Stack.Item>\n </Stack>\n );\n }, [focusIdx, inline]);\n}\n","\nimport React, { useMemo } from 'react';\nimport { useFocusIdx, Stack } from '@thanhpv102/easy-email-editor';\nimport { RadioGroupField } from '../../../components/Form';\n\nconst options = [\n {\n value: 'left',\n get label() {\n return t('Left');\n },\n },\n {\n value: 'center',\n get label() {\n return t('Center');\n },\n },\n {\n value: 'right',\n get label() {\n return t('Right');\n },\n },\n];\n\nexport function TextAlign({ name }: { name?: string }) {\n const { focusIdx } = useFocusIdx();\n\n return useMemo(() => {\n return (\n <Stack>\n <RadioGroupField\n label={t('Text align')}\n name={name || `${focusIdx}.attributes.text-align`}\n options={options}\n />\n </Stack>\n );\n }, [focusIdx, name]);\n}\n","\r\nimport React, { useMemo } from 'react';\r\nimport { ColorPickerField } from '../../../components/Form';\r\nimport { useFocusIdx } from '@thanhpv102/easy-email-editor';\r\n\r\nexport function ContainerBackgroundColor({\r\n title = t('Container background color'),\r\n}: {\r\n title?: string;\r\n}) {\r\n const { focusIdx } = useFocusIdx();\r\n\r\n return useMemo(() => {\r\n return (\r\n <ColorPickerField\r\n label={title}\r\n name={`${focusIdx}.attributes.container-background-color`}\r\n />\r\n );\r\n }, [focusIdx, title]);\r\n}\r\n","\nimport React from 'react';\nimport { InputWithUnitField } from '../../../components/Form';\nimport { useFocusIdx } from '@thanhpv102/easy-email-editor';\n\nexport function LetterSpacing({ name }: { name?: string; }) {\n const { focusIdx } = useFocusIdx();\n\n return (\n <InputWithUnitField\n label={t('Letter spacing')}\n name={name || `${focusIdx}.attributes.letter-spacing`}\n />\n );\n}\n","\nimport React, { useMemo } from 'react';\nimport { useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { SelectField } from '../../../components/Form';\n\nconst options = [\n {\n value: '',\n get label() {\n return 'None';\n },\n },\n {\n value: 'underline',\n get label() {\n return 'Underline';\n },\n },\n {\n value: 'overline',\n get label() {\n return 'Overline';\n },\n },\n {\n value: 'line-through',\n get label() {\n return 'Line through';\n },\n },\n {\n value: 'blink',\n get label() {\n return 'Blink';\n },\n },\n {\n value: 'inherit',\n get label() {\n return 'Inherit';\n },\n },\n];\n\nexport function TextDecoration({ name }: { name?: string }) {\n const { focusIdx } = useFocusIdx();\n\n return useMemo(() => {\n return (\n <SelectField\n label={'Text decoration'}\n name={name || `${focusIdx}.attributes.text-decoration`}\n options={options}\n />\n );\n }, [focusIdx, name]);\n}\n","\r\nimport React, { useMemo } from 'react';\r\nimport { NumberField, TextField } from '../../../components/Form';\r\nimport { useFocusIdx, Stack, TextStyle } from '@thanhpv102/easy-email-editor';\r\n\r\nexport function Decoration() {\r\n const { focusIdx } = useFocusIdx();\r\n\r\n return useMemo(() => {\r\n return (\r\n <Stack\r\n vertical\r\n spacing='extraTight'\r\n >\r\n <TextStyle\r\n variation='strong'\r\n size='medium'\r\n >\r\n Decoration\r\n </TextStyle>\r\n <TextField\r\n label={t('Border radius')}\r\n name={`${focusIdx}.attributes.borderRadius`}\r\n inline\r\n />\r\n <TextField\r\n label={t('Border')}\r\n name={`${focusIdx}.attributes.border`}\r\n inline\r\n />\r\n <NumberField\r\n label={t('Opacity')}\r\n max={1}\r\n min={0}\r\n step={0.1}\r\n name={`${focusIdx}.attributes.opacity`}\r\n inline\r\n />\r\n </Stack>\r\n );\r\n }, [focusIdx]);\r\n}\r\n","\nimport React from 'react';\nimport { InputWithUnitField } from '../../../components/Form';\nimport { useFocusIdx } from '@thanhpv102/easy-email-editor';\n\nexport function LineHeight({ name }: { name?: string; }) {\n const { focusIdx } = useFocusIdx();\n\n return (\n <InputWithUnitField\n label={t('Line height')}\n unitOptions='percent'\n name={name || `${focusIdx}.attributes.line-height`}\n />\n );\n}\n","\nimport React, { useMemo } from 'react';\nimport { useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { SelectField } from '../../../components/Form';\n\nconst options = [\n {\n value: 'initial',\n get label() {\n return t('None');\n },\n },\n {\n value: 'uppercase',\n get label() {\n return t('uppercase');\n },\n },\n {\n value: 'lowercase',\n get label() {\n return t('lowercase');\n },\n },\n {\n value: 'capitalize',\n get label() {\n return t('capitalize');\n },\n },\n];\n\nexport function TextTransform({ name }: { name?: string }) {\n const { focusIdx } = useFocusIdx();\n\n return useMemo(() => {\n return (\n <SelectField\n label={t('Text transform')}\n name={name || `${focusIdx}.attributes.text-transform`}\n options={options}\n />\n );\n }, [focusIdx, name]);\n}\n","\nimport React, { useMemo } from 'react';\nimport { useFocusIdx, Stack } from '@thanhpv102/easy-email-editor';\nimport { RadioGroupField } from '../../../components/Form';\n\nconst options = [\n {\n value: 'ltr',\n get label() {\n return 'ltr';\n },\n },\n {\n value: 'rtl',\n get label() {\n return 'rtl';\n },\n },\n];\n\nexport function Direction() {\n const { focusIdx } = useFocusIdx();\n\n return useMemo(() => {\n return (\n <Stack>\n <RadioGroupField\n label={t('Direction')}\n name={`${focusIdx}.attributes.direction`}\n options={options}\n inline\n />\n </Stack>\n );\n }, [focusIdx]);\n}\n","import { IBlockData, BlockManager, getParentIdx } from '@thanhpv102/easy-email-core';\nimport { get, cloneDeep } from 'lodash';\n\nexport function getContextMergeTags(\n mergeTags: { [key: string]: any },\n context: { [key: string]: any },\n idx: string,\n) {\n const loop = (\n currentIdx: string,\n combineMergeTags: { [key: string]: any },\n ): { [key: string]: any } => {\n const parentBlockData = get(context, currentIdx) as IBlockData | undefined;\n if (!parentBlockData) return combineMergeTags;\n\n const dataSource = parentBlockData.data?.value?.dataSource;\n if (!dataSource) return combineMergeTags;\n\n Object.keys(dataSource).forEach(key => {\n let formatKey: string = dataSource[key];\n\n const loopFormatKey = (currentLoopKeyIdx: string) => {\n const currentParentIdx = getParentIdx(currentLoopKeyIdx);\n if (currentParentIdx) {\n const currentBlockData = get(context, currentParentIdx) as IBlockData;\n\n if (!currentBlockData) return formatKey;\n currentBlockData.data.value.dataSource &&\n Object.keys(currentBlockData.data.value.dataSource).forEach(item => {\n formatKey = formatKey.replace(\n item,\n currentBlockData.data.value.dataSource[item].replace(\n /{{([^}}]+)}}/g,\n '$1',\n ),\n );\n });\n\n loopFormatKey(currentParentIdx);\n }\n };\n loopFormatKey(currentIdx);\n\n const dataSourcePath = formatKey.replace(/{{([^}}]+)}}/g, '$1');\n combineMergeTags = {\n [key]: get(combineMergeTags, dataSourcePath),\n ...combineMergeTags,\n };\n });\n\n const parentIdx = getParentIdx(currentIdx);\n if (!parentIdx) return combineMergeTags;\n return loop(parentIdx, combineMergeTags);\n };\n\n return loop(idx, cloneDeep(mergeTags));\n}\n","import React, { useCallback, useMemo, useState } from 'react';\nimport { Tree, TreeSelect } from 'antd';\nimport { get, isObject } from 'lodash';\nimport { useBlock, useEditorProps, useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { getContextMergeTags } from '@extensions/utils/getContextMergeTags';\n\ninterface TreeNodeData {\n key: string;\n value: string;\n title: string;\n children: TreeNodeData[];\n}\n\ninterface MergeTagObject {\n [key: string]: string | number | boolean | MergeTagObject | MergeTagObject[] | undefined;\n}\n\nexport const MergeTags: React.FC<{\n onChange: (v: string) => void;\n value: string;\n isSelect?: boolean;\n}> = React.memo((props) => {\n const [expandedKeys, setExpandedKeys] = useState<string[]>([]);\n const { focusIdx } = useFocusIdx();\n const {\n mergeTags = {},\n mergeTagGenerate,\n renderMergeTagContent,\n } = useEditorProps();\n const { values } = useBlock();\n\n const contextMergeTags = useMemo(\n () => values && getContextMergeTags(mergeTags, values, focusIdx),\n [mergeTags, values, focusIdx]\n );\n\n const treeOptions = useMemo(() => {\n const treeData: TreeNodeData[] = [];\n const deep = (\n key: string,\n title: string,\n parent: MergeTagObject,\n mapData: TreeNodeData[] = []\n ) => {\n const currentMapData: TreeNodeData = {\n key: key,\n value: key,\n title: title,\n children: [],\n };\n\n mapData.push(currentMapData);\n const current = parent[title];\n if (current && typeof current === 'object' && !Array.isArray(current)) {\n Object.keys(current as Record<string, unknown>).forEach((childKey) =>\n deep(key + '.' + childKey, childKey, current, currentMapData.children)\n );\n }\n };\n\n if (!contextMergeTags) return treeData;\n\n Object.keys(contextMergeTags).forEach((key) =>\n deep(key, key, contextMergeTags, treeData)\n );\n return treeData;\n }, [contextMergeTags]);\n\n const onSelect = useCallback(\n (key: string) => {\n const value = get(contextMergeTags, key);\n if (isObject(value)) {\n setExpandedKeys((keys) => {\n if (keys.includes(key)) {\n return keys.filter((k) => k !== key);\n } else {\n return [...keys, key];\n }\n });\n return;\n }\n return props.onChange(mergeTagGenerate(key));\n },\n [contextMergeTags, props, mergeTagGenerate]\n );\n\n const mergeTagContent = useMemo(\n () =>\n renderMergeTagContent ? (\n renderMergeTagContent({\n onChange: props.onChange,\n isSelect: Boolean(props.isSelect),\n value: props.value,\n })\n ) : (\n <></>\n ),\n [renderMergeTagContent, props.onChange, props.isSelect, props.value]\n );\n\n if (renderMergeTagContent) {\n return <>{mergeTagContent}</>;\n }\n\n return (\n <div style={{ color: '#333' }}>\n {props.isSelect ? (\n <TreeSelect\n value={props.value}\n size='small'\n popupMatchSelectWidth\n placeholder={'Please select'}\n treeData={treeOptions}\n onChange={(val) => onSelect(val)}\n style={{ maxHeight: 400, overflow: 'auto' }}\n />\n ) : (\n <Tree\n expandedKeys={expandedKeys}\n onExpand={(keys) => setExpandedKeys(keys.map(k => String(k)))}\n selectedKeys={[]}\n treeData={treeOptions}\n onSelect={(selectedKeys) => onSelect(String(selectedKeys[0]))}\n style={{\n maxHeight: 400,\n overflow: 'auto',\n }}\n />\n )}\n </div>\n );\n});\n","import React, { useMemo } from 'react';\nimport { useFocusIdx, IconFont } from '@thanhpv102/easy-email-editor';\nimport { LinkOutlined } from '@ant-design/icons';\nimport { SelectField, TextField } from '../../../components/Form';\nimport { Row, Col, Popover, Space, Button } from 'antd';\nimport { MergeTags } from './MergeTags';\nimport { useField } from '@thanhpv102/easy-email-editor';\n\nexport function Link() {\n const { focusIdx } = useFocusIdx();\n const { input } = useField(`${focusIdx}.attributes.href`, {\n parse: (v: string) => v,\n });\n\n return useMemo(() => {\n return (\n <Row>\n <Col span={11}>\n <TextField\n prefix={<LinkOutlined />}\n label={\n (\n <Space>\n <span>{'Href'} </span>\n <Popover\n trigger='click'\n content={\n <MergeTags value={input.value || ''} onChange={input.onChange} />\n }\n >\n <Button\n type='text'\n icon={<IconFont iconName='icon-merge-tags' />}\n />\n </Popover>\n </Space>\n )\n }\n name={`${focusIdx}.attributes.href`}\n />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <SelectField\n label={'Target'}\n name={`${focusIdx}.attributes.target`}\n options={[\n {\n value: '',\n label: '_self',\n },\n {\n value: '_blank',\n label: '_blank',\n },\n ]}\n />\n </Col>\n </Row>\n );\n }, [focusIdx, input.value, input.onChange]);\n}\n","import React, { useMemo } from 'react';\nimport { TextField } from '../../../components/Form';\nimport { useFocusIdx, Stack, TextStyle } from '@thanhpv102/easy-email-editor';\n\nexport function Margin() {\n const { focusIdx } = useFocusIdx();\n\n return useMemo(() => {\n return (\n <Stack vertical spacing='extraTight'>\n <TextStyle size='medium'>{'Margin'}</TextStyle>\n <Stack wrap={false}>\n <Stack.Item fill>\n <TextField\n label={'Top'}\n quickchange\n name={`${focusIdx}.attributes.marginTop`}\n inline\n />\n </Stack.Item>\n <Stack.Item fill>\n <TextField\n label={'Bottom'}\n quickchange\n name={`${focusIdx}.attributes.marginBottom`}\n inline\n />\n </Stack.Item>\n </Stack>\n\n <Stack wrap={false}>\n <Stack.Item fill>\n <TextField\n label={'Left'}\n quickchange\n name={`${focusIdx}.attributes.marginLeft`}\n inline\n />\n </Stack.Item>\n <Stack.Item fill>\n <TextField\n label={'Right'}\n quickchange\n name={`${focusIdx}.attributes.marginRight`}\n inline\n />\n </Stack.Item>\n </Stack>\n </Stack>\n );\n }, [focusIdx]);\n}\n","import React, { useMemo } from 'react';\nimport { ColorPickerField } from '../../../components/Form';\nimport { useFocusIdx } from '@thanhpv102/easy-email-editor';\n\nexport function BorderColor() {\n const { focusIdx } = useFocusIdx();\n\n return useMemo(() => {\n return (\n <ColorPickerField\n label={t('Color')}\n name={`${focusIdx}.attributes.border-color`}\n key={`${focusIdx}.attributes.border-color`}\n />\n );\n }, [focusIdx]);\n}\n","\nimport React from 'react';\nimport { useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { InputWithUnitField } from '../../../components/Form';\nimport { pixelAdapter } from '../adapter';\n\nexport function FontSize() {\n const { focusIdx } = useFocusIdx();\n\n return (\n <InputWithUnitField\n label={'Font size (px)'}\n name={`${focusIdx}.attributes.font-size`}\n config={pixelAdapter}\n autoComplete='off'\n />\n );\n}\n","import React, { useMemo } from 'react';\nimport { useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { SelectField } from '../../../components/Form';\n\nexport const borderStyleOptions = [\n {\n value: 'dashed',\n get label() {\n return 'Dashed';\n },\n },\n {\n value: 'dotted',\n get label() {\n return 'Dotted';\n },\n },\n {\n value: 'solid',\n get label() {\n return 'Solid';\n },\n },\n {\n value: 'double',\n get label() {\n return 'double';\n },\n },\n {\n value: 'ridge',\n get label() {\n return 'ridge';\n },\n },\n {\n value: 'groove',\n get label() {\n return 'groove';\n },\n },\n {\n value: 'inset',\n get label() {\n return 'inset';\n },\n },\n {\n value: 'outset',\n get label() {\n return 'outset';\n },\n },\n];\n\nexport function BorderStyle() {\n const { focusIdx } = useFocusIdx();\n\n return useMemo(() => {\n return (\n <SelectField\n label={'Style'}\n name={`${focusIdx}.attributes.border-style`}\n key={`${focusIdx}.attributes.border-style`}\n options={borderStyleOptions}\n />\n );\n }, [focusIdx]);\n}\n","\nimport React from 'react';\nimport { useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { RadioGroupField } from '../../../components/Form';\n\nconst options = [\n {\n value: 'normal',\n get label() {\n return t('Normal');\n },\n },\n {\n value: 'italic',\n get label() {\n return t('Italic');\n },\n },\n];\n\nexport function FontStyle({ name }: { name?: string }) {\n const { focusIdx } = useFocusIdx();\n\n return (\n <RadioGroupField\n label={t('Font style')}\n name={name || `${focusIdx}.attributes.font-style`}\n options={options}\n />\n );\n}\n","/* eslint-disable @typescript-eslint/no-unsafe-call */\nimport React, { useMemo } from 'react';\nimport { Stack } from '@thanhpv102/easy-email-editor';\nimport { Padding } from './Padding';\n\nexport function NavbarLinkPadding({ name }: { name: string; }) {\n return useMemo(() => {\n return (\n <Stack vertical spacing='extraTight'>\n <Padding key={name} />\n </Stack>\n );\n }, [name]);\n}\n","import React, { useMemo } from 'react';\nimport { useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { TextField } from '../../../components/Form';\n\nexport function BorderWidth() {\n const { focusIdx } = useFocusIdx();\n\n return useMemo(() => {\n return (\n <TextField\n label={'Width'}\n quickchange\n name={`${focusIdx}.attributes.border-width`}\n key={`${focusIdx}.attributes.border-width`}\n />\n );\n }, [focusIdx]);\n}\n","\nimport React, { useMemo } from 'react';\nimport { useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { SelectField } from '../../../components/Form';\n\nconst options = [\n {\n value: 'normal',\n get label() {\n return t('Normal');\n },\n },\n {\n value: 'bold',\n get label() {\n return t('Bold');\n },\n },\n {\n value: '100',\n label: '100',\n },\n {\n value: '200',\n label: '200',\n },\n {\n value: '300',\n label: '300',\n },\n {\n value: '400',\n label: '400',\n },\n {\n value: '500',\n label: '500',\n },\n {\n value: '600',\n label: '600',\n },\n {\n value: '700',\n label: '700',\n },\n {\n value: '800',\n label: '800',\n },\n {\n value: '900',\n label: '900',\n },\n];\n\nexport function FontWeight({ name }: { name?: string }) {\n const { focusIdx } = useFocusIdx();\n\n return useMemo(() => {\n return (\n <SelectField\n label={t('Font weight')}\n name={name || `${focusIdx}.attributes.font-weight`}\n options={options}\n />\n );\n }, [focusIdx, name]);\n}\n","import React from 'react';\nimport { Col, Collapse, Row, Space } from 'antd';\nimport { AttributesPanelWrapper } from '@extensions/AttributePanel/components/attributes/AttributesPanelWrapper';\nimport { Padding } from '@extensions/AttributePanel/components/attributes/Padding';\nimport { Width } from '@extensions/AttributePanel/components/attributes/Width';\nimport { VerticalAlign } from '@extensions/AttributePanel/components/attributes/VerticalAlign';\nimport { Border } from '@extensions/AttributePanel/components/attributes/Border';\nimport { ClassName } from '../../attributes/ClassName';\nimport { CollapseWrapper } from '../../attributes/CollapseWrapper';\nimport { BackgroundColor } from '../../attributes';\n\nexport function Column() {\n return (\n <AttributesPanelWrapper>\n <CollapseWrapper defaultActiveKey={['.$0']}>\n <Collapse.Panel\n key=\"0\"\n header={t('Dimension')}\n >\n <Space orientation=\"vertical\" size=\"small\">\n <Row>\n <Col span={11}>\n <Width />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <VerticalAlign />\n </Col>\n </Row>\n\n <Padding />\n </Space>\n </Collapse.Panel>\n <Collapse.Panel\n key=\"1\"\n header={t('Background')}\n >\n <BackgroundColor />\n </Collapse.Panel>\n <Collapse.Panel\n key=\"2\"\n header={t('Border')}\n >\n <Border />\n </Collapse.Panel>\n <Collapse.Panel\n key=\"4\"\n header={t('Extra')}\n >\n <Col span={24}>\n <ClassName />\n </Col>\n </Collapse.Panel>\n </CollapseWrapper>\n </AttributesPanelWrapper>\n );\n}\n","import React, { useState, useEffect } from 'react';\nimport ReactDOM from 'react-dom';\n\nexport const ShadowDom: React.FC<React.HTMLProps<HTMLElement>> = (props) => {\n const [root, setRoot] = useState<null | ShadowRoot>(null);\n const [ref, setRef] = useState<null | HTMLDivElement>(null);\n\n useEffect(() => {\n if (ref) {\n const root = ref.attachShadow({ mode: 'open' });\n setRoot(root);\n }\n }, [ref]);\n\n // Extract key and children to avoid React 19 spreading issues\n const { key, children, ...divProps } = props;\n\n return (\n <>\n <div key={key} {...divProps} ref={setRef}>\n {root && ReactDOM.createPortal(children, root as any)}\n </div>\n </>\n );\n};\n","import { Button, Drawer } from 'antd';\nimport React, { Suspense, useEffect, useMemo, useState } from 'react';\nimport { BasicType, IText } from '@thanhpv102/easy-email-core';\nimport { Stack, TextStyle, useBlock, useEditorContext, useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { ShadowDom } from '@extensions/components/ShadowDom';\n\nconst CodeMirrorEditorPromise = import(\n '../../../components/Form/CodemirrorEditor'\n);\nconst CodeMirrorEditor = React.lazy(() => CodeMirrorEditorPromise);\n\nexport const HtmlEditor: React.FC<{\n visible: boolean;\n setVisible: (v: boolean) => void;\n}> = (props) => {\n const { visible, setVisible } = props;\n\n const { focusBlock, setValueByIdx } = useBlock();\n const { pageData } = useEditorContext();\n const { focusIdx } = useFocusIdx();\n const [content, setContent] = useState(focusBlock?.data.value.content);\n\n const isTable = focusBlock?.type === BasicType.TABLE;\n\n useEffect(() => {\n setContent(focusBlock?.data.value.content);\n }, [focusBlock?.data.value.content]);\n\n const onClose = () => {\n setVisible(false);\n };\n\n const onSave = () => {\n if (!focusBlock) return;\n focusBlock.data.value.content = content;\n setValueByIdx(focusIdx, { ...focusBlock });\n onClose();\n };\n\n const styles = useMemo(() => {\n if (!focusBlock) return {};\n\n const attributes = focusBlock.attributes as IText['attributes'];\n return {\n color: attributes.color || pageData?.data.value['text-color'],\n fontSize: attributes['font-size'] || pageData?.data.value['font-size'],\n fontFamily:\n attributes['font-family'] || pageData?.data.value['font-family'],\n fontWeight:\n attributes['font-weight'] || pageData?.data.value['font-weight'],\n backgroundColor: attributes['container-background-color'],\n padding: attributes.padding,\n };\n }, [focusBlock, pageData?.data.value]);\n\n return (\n <Drawer\n placement='left'\n title={(\n <Stack distribution='equalSpacing'>\n <TextStyle variation='strong' size='medium'>\n {'Html'}\n </TextStyle>\n <Stack>\n <Button type='primary' onClick={onSave}>\n {'Save'}\n </Button>\n </Stack>\n </Stack>\n )}\n open={visible}\n footer={null}\n styles={{\n header: { display: 'block', lineHeight: '48px' },\n body: { padding: 0, overflow: 'hidden' },\n wrapper: { width: '100vw' },\n }}\n >\n <div style={{ display: 'flex', height: '100%' }}>\n <div style={{ flex: 1, height: '100%' }}>\n <Suspense\n fallback={(\n <div\n style={{\n height: '100%',\n width: '100%',\n display: 'flex',\n alignItems: 'center',\n backgroundColor: '#263238',\n justifyContent: 'center',\n fontSize: 24,\n color: '#fff',\n }}\n >\n {'Editor Loading...'}\n </div>\n )}\n >\n <CodeMirrorEditor value={content} onChange={setContent} />\n </Suspense>\n </div>\n <div\n style={{ flex: 1, height: '100%', overflow: 'auto', marginRight: 10 }}\n >\n <ShadowDom\n style={{\n ...styles,\n width: pageData?.attributes.width || '600px',\n margin: 'auto',\n }}\n >\n {isTable ? (\n <table>\n <tbody dangerouslySetInnerHTML={{ __html: content }} />\n </table>\n ) : (\n <div dangerouslySetInnerHTML={{ __html: content }} />\n )}\n </ShadowDom>\n </div>\n </div>\n </Drawer>\n );\n};\n","import React, { useState } from 'react';\nimport { Padding } from '@extensions/AttributePanel/components/attributes/Padding';\nimport { TextDecoration } from '@extensions/AttributePanel/components/attributes/TextDecoration';\nimport { FontWeight } from '@extensions/AttributePanel/components/attributes/FontWeight';\nimport { FontStyle } from '@extensions/AttributePanel/components/attributes/FontStyle';\nimport { FontFamily } from '@extensions/AttributePanel/components/attributes/FontFamily';\nimport { Height } from '@extensions/AttributePanel/components/attributes/Height';\nimport { ContainerBackgroundColor } from '@extensions/AttributePanel/components/attributes/ContainerBackgroundColor';\nimport { FontSize } from '@extensions/AttributePanel/components/attributes/FontSize';\nimport { Color } from '@extensions/AttributePanel/components/attributes/Color';\nimport { Align } from '@extensions/AttributePanel/components/attributes/Align';\nimport { LineHeight } from '@extensions/AttributePanel/components/attributes/LineHeight';\nimport { LetterSpacing } from '@extensions/AttributePanel/components/attributes/LetterSpacing';\n\nimport { AttributesPanelWrapper } from '@extensions/AttributePanel/components/attributes/AttributesPanelWrapper';\nimport { Button, Col, Collapse, Row, Space, Tooltip } from 'antd';\nimport { IconFont } from '@thanhpv102/easy-email-editor';\nimport { HtmlEditor } from '../../UI/HtmlEditor';\nimport { ClassName } from '../../attributes/ClassName';\nimport { CollapseWrapper } from '../../attributes/CollapseWrapper';\n\nexport function Text() {\n const [visible, setVisible] = useState(false);\n\n return (\n <AttributesPanelWrapper\n extra={(\n <Tooltip title={t('Html mode')}>\n <Button\n onClick={() => setVisible(true)}\n icon={<IconFont iconName=\"icon-html\" />}\n />\n </Tooltip>\n )}\n >\n <CollapseWrapper defaultActiveKey={['.$0']}>\n <Collapse.Panel\n key=\"0\"\n header={t('Dimension')}\n >\n <Space orientation=\"vertical\" size=\"small\">\n <Height />\n <Padding showResetAll />\n </Space>\n </Collapse.Panel>\n <Collapse.Panel\n key=\"1\"\n header={t('Color')}\n >\n <Row>\n <Col span={11}>\n <Color />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <ContainerBackgroundColor title={t('Background color')} />\n </Col>\n </Row>\n </Collapse.Panel>\n <Collapse.Panel\n key=\"2\"\n header={t('Typography')}\n >\n <Space orientation=\"vertical\" size=\"small\">\n <Row>\n <Col span={11}>\n <FontFamily />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <FontSize />\n </Col>\n </Row>\n\n <Row>\n <Col span={11}>\n <LineHeight />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <LetterSpacing />\n </Col>\n </Row>\n\n <Row>\n <Col span={11}>\n <TextDecoration />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <FontWeight />\n </Col>\n </Row>\n\n <Align />\n\n <FontStyle />\n\n <Row>\n <Col span={11} />\n <Col\n offset={1}\n span={11}\n />\n </Row>\n </Space>\n </Collapse.Panel>\n <Collapse.Panel\n key=\"4\"\n header={t('Extra')}\n >\n <Col span={24}>\n <ClassName />\n </Col>\n </Collapse.Panel>\n </CollapseWrapper>\n <HtmlEditor\n visible={visible}\n setVisible={setVisible}\n />\n </AttributesPanelWrapper>\n );\n}\n","import React from 'react';\nimport { Padding } from '@extensions/AttributePanel/components/attributes/Padding';\nimport { ColorPickerField, ImageUploaderField, SwitchField, TextField } from '@extensions/components/Form';\nimport { Width } from '@extensions/AttributePanel/components/attributes/Width';\nimport { Height } from '@extensions/AttributePanel/components/attributes/Height';\nimport { Link } from '@extensions/AttributePanel/components/attributes/Link';\nimport { Align } from '@extensions/AttributePanel/components/attributes/Align';\n\nimport { AttributesPanelWrapper } from '@extensions/AttributePanel/components/attributes/AttributesPanelWrapper';\nimport { Col, Collapse, Row, Space } from 'antd';\nimport { Border } from '@extensions/AttributePanel/components/attributes/Border';\nimport { Stack, useEditorProps, useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { CollapseWrapper } from '../../attributes/CollapseWrapper';\nimport { imageHeightAdapter, pixelAdapter } from '../../adapter';\n\nconst fullWidthOnMobileAdapter = {\n format(obj: boolean | string) {\n return Boolean(obj);\n },\n parse(val: boolean) {\n if (!val) return undefined;\n\n return 'true';\n },\n};\n\nexport function Image() {\n const { focusIdx } = useFocusIdx();\n const { onUploadImage, enableAssetManager } = useEditorProps();\n\n return (\n <AttributesPanelWrapper style={{ padding: 0 }}>\n <CollapseWrapper defaultActiveKey={['.$0']}>\n <Collapse.Panel\n key=\"0\"\n header={t('Setting')}\n >\n <Stack\n vertical\n spacing=\"tight\"\n >\n <ImageUploaderField\n label={t('src')}\n labelHidden\n name={`${focusIdx}.attributes.src`}\n helpText={t(\n 'The image suffix should be .jpg, jpeg, png, gif, etc. Otherwise, the picture may not be displayed normally.',\n )}\n uploadHandler={onUploadImage}\n enableSelectFromLibrary={enableAssetManager}\n />\n <ColorPickerField\n label={t('Background color')}\n name={`${focusIdx}.attributes.container-background-color`}\n inline\n />\n <SwitchField\n label={t('Full width on mobile')}\n name={`${focusIdx}.attributes.fluid-on-mobile`}\n config={fullWidthOnMobileAdapter}\n />\n </Stack>\n </Collapse.Panel>\n\n <Collapse.Panel\n key=\"1\"\n header={t('Dimension')}\n >\n <Space orientation=\"vertical\" size=\"small\">\n <Row>\n <Col span={11}>\n <Width config={pixelAdapter} />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <Height config={imageHeightAdapter} />\n </Col>\n </Row>\n\n <Padding showResetAll />\n <Row>\n <Col span={24}>\n <Align />\n </Col>\n </Row>\n </Space>\n </Collapse.Panel>\n\n <Collapse.Panel\n key=\"2\"\n header={t('Link')}\n >\n <Stack\n vertical\n spacing=\"tight\"\n >\n <Link />\n </Stack>\n </Collapse.Panel>\n\n <Collapse.Panel\n key=\"3\"\n header={t('Border')}\n >\n <Border />\n </Collapse.Panel>\n\n <Collapse.Panel\n key=\"4\"\n header={t('Extra')}\n >\n <Row>\n <Col span={11}>\n <TextField\n label={t('title')}\n name={`${focusIdx}.attributes.title`}\n />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <TextField\n label={t('alt')}\n name={`${focusIdx}.attributes.alt`}\n />\n </Col>\n </Row>\n <Col span={24}>\n <TextField\n label={t('class name')}\n name={`${focusIdx}.attributes.css-class`}\n />\n </Col>\n </Collapse.Panel>\n </CollapseWrapper>\n </AttributesPanelWrapper>\n );\n}\n","import React from 'react';\nimport { Width } from '@extensions/AttributePanel/components/attributes/Width';\nimport { BackgroundColor } from '@extensions/AttributePanel/components/attributes/BackgroundColor';\nimport { VerticalAlign } from '@extensions/AttributePanel/components/attributes/VerticalAlign';\nimport { Col, Collapse, Row } from 'antd';\nimport { AttributesPanelWrapper } from '@extensions/AttributePanel/components/attributes/AttributesPanelWrapper';\nimport { ClassName } from '../../attributes/ClassName';\nimport { CollapseWrapper } from '../../attributes/CollapseWrapper';\n\nexport function Group() {\n return (\n <AttributesPanelWrapper>\n <CollapseWrapper defaultActiveKey={['.$0']}>\n <Collapse.Panel key=\"0\" header={t('Dimension')}>\n <Row>\n <Col span={11}>\n <Width />\n </Col>\n <Col offset={1} span={11}>\n <VerticalAlign />\n </Col>\n </Row>\n </Collapse.Panel>\n <Collapse.Panel key=\"1\" header={t('Background')}>\n <Row>\n <Col span={11}>\n <BackgroundColor />\n </Col>\n <Col offset={1} span={11} />\n </Row>\n </Collapse.Panel>\n <Collapse.Panel key=\"2\" header={t('Extra')}>\n <Col span={24}>\n <ClassName />\n </Col>\n </Collapse.Panel>\n </CollapseWrapper>\n </AttributesPanelWrapper>\n );\n}\n","import React from 'react';\nimport { Padding } from '../../attributes/Padding';\nimport { Border } from '../../attributes/Border';\nimport { BackgroundColor } from '../../attributes/BackgroundColor';\nimport { Color } from '../../attributes/Color';\nimport { Link } from '../../attributes/Link';\nimport { Width } from '../../attributes/Width';\nimport { ContainerBackgroundColor } from '../../attributes/ContainerBackgroundColor';\nimport { Align } from '../../attributes/Align';\nimport { FontSize } from '../../attributes/FontSize';\nimport { FontStyle } from '../../attributes/FontStyle';\nimport { FontWeight } from '../../attributes/FontWeight';\nimport { FontFamily } from '../../attributes/FontFamily';\nimport { TextDecoration } from '../../attributes/TextDecoration';\nimport { LineHeight } from '../../attributes/LineHeight';\nimport { LetterSpacing } from '../../attributes/LetterSpacing';\nimport { Col, Collapse, Popover, Row, Space, Button as AntButton } from 'antd';\nimport { TextField } from '../../../../components/Form';\nimport { IconFont, useEditorProps, useField, useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { AttributesPanelWrapper } from '../../attributes/AttributesPanelWrapper';\nimport { MergeTags } from '../../attributes';\nimport { ClassName } from '../../attributes/ClassName';\nimport { CollapseWrapper } from '../../attributes/CollapseWrapper';\n\nexport function Button() {\n const { focusIdx } = useFocusIdx();\n const { input } = useField(`${focusIdx}.data.value.content`, {\n parse: (v: string) => v,\n });\n\n const { mergeTags } = useEditorProps();\n\n return (\n <AttributesPanelWrapper>\n <CollapseWrapper defaultActiveKey={['.$0']}>\n <Collapse.Panel\n key=\"0\"\n header={'Setting'}\n >\n <Space orientation=\"vertical\" size=\"small\">\n <TextField\n label={(\n <Space>\n <span>{'Content'}</span>\n {mergeTags && (\n <Popover\n trigger=\"click\"\n content={(\n <MergeTags\n value={input.value || ''}\n onChange={input.onChange}\n />\n )}\n >\n <AntButton\n type=\"text\"\n icon={<IconFont iconName=\"icon-merge-tags\" />}\n />\n </Popover>\n )}\n </Space>\n )}\n name={`${focusIdx}.data.value.content`}\n />\n <Link />\n </Space>\n </Collapse.Panel>\n\n <Collapse.Panel\n key=\"1\"\n header={'Dimension'}\n >\n <Space orientation=\"vertical\" size=\"small\">\n <Row>\n <Col span={11}>\n <Width />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <FontWeight />\n </Col>\n </Row>\n\n <Padding\n title={'Padding'}\n attributeName=\"padding\"\n showResetAll\n />\n <Padding\n title={'Inner padding'}\n attributeName=\"inner-padding\"\n />\n </Space>\n </Collapse.Panel>\n\n <Collapse.Panel\n key=\"2\"\n header={'Color'}\n >\n <Space orientation=\"vertical\" size=\"small\">\n <Row>\n <Col span={11}>\n <Color title={'Text color'} />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <BackgroundColor title={'Button color'} />\n </Col>\n <Col span={11}>\n <ContainerBackgroundColor title={'Background color'} />\n </Col>\n </Row>\n </Space>\n </Collapse.Panel>\n\n <Collapse.Panel\n key=\"3\"\n header={'Typography'}\n >\n <Space orientation=\"vertical\" size=\"small\">\n <Row>\n <Col span={11}>\n <FontFamily />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <FontSize />\n </Col>\n </Row>\n\n <Row>\n <Col span={11}>\n <FontWeight />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <LineHeight />\n </Col>\n </Row>\n\n <Row>\n <Col span={11}>\n <TextDecoration />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <LetterSpacing />\n </Col>\n </Row>\n <Align />\n\n <FontStyle />\n </Space>\n </Collapse.Panel>\n\n <Collapse.Panel\n key=\"4\"\n header={'Border'}\n >\n <Border />\n </Collapse.Panel>\n <Collapse.Panel\n key=\"5\"\n header={'Extra'}\n >\n <Col span={24}>\n <ClassName />\n </Col>\n </Collapse.Panel>\n </CollapseWrapper>\n </AttributesPanelWrapper>\n );\n}\n","import React from 'react';\nimport { Padding } from '@extensions/AttributePanel/components/attributes/Padding';\nimport { ContainerBackgroundColor } from '@extensions/AttributePanel/components/attributes/ContainerBackgroundColor';\nimport { BorderWidth } from '@extensions/AttributePanel/components/attributes/BorderWidth';\nimport { BorderStyle } from '@extensions/AttributePanel/components/attributes/BorderStyle';\nimport { BorderColor } from '@extensions/AttributePanel/components/attributes/BorderColor';\nimport { Width } from '@extensions/AttributePanel/components/attributes/Width';\nimport { Align } from '@extensions/AttributePanel/components/attributes/Align';\n\nimport { AttributesPanelWrapper } from '@extensions/AttributePanel/components/attributes/AttributesPanelWrapper';\nimport { Col, Collapse, Row, Space } from 'antd';\nimport { Stack } from '@thanhpv102/easy-email-editor';\nimport { ClassName } from '../../attributes/ClassName';\nimport { CollapseWrapper } from '../../attributes/CollapseWrapper';\n\nexport function Divider() {\n return (\n <AttributesPanelWrapper>\n <CollapseWrapper defaultActiveKey={['.$0']}>\n <Collapse.Panel key=\"0\" header={t('Dimension')}>\n <Space orientation=\"vertical\" size=\"small\">\n <Row>\n <Col span={11}>\n <Width unitOptions=\"percent\" />\n </Col>\n <Col offset={1} span={11} />\n </Row>\n\n <Align />\n <Padding />\n </Space>\n </Collapse.Panel>\n\n <Collapse.Panel key=\"1\" header={t('Border')}>\n <Stack wrap={false} spacing=\"tight\">\n <div style={{ width: 50 }}>\n <BorderWidth />\n </div>\n <div style={{ width: 100 }}>\n <BorderStyle />\n </div>\n <div style={{ width: 100 }}>\n <BorderColor />\n </div>\n </Stack>\n </Collapse.Panel>\n\n <Collapse.Panel key=\"2\" header={t('Background')}>\n <Row>\n <Col span={11}>\n <ContainerBackgroundColor title={t('Background')} />\n </Col>\n <Col offset={1} span={11} />\n </Row>\n </Collapse.Panel>\n <Collapse.Panel key=\"3\" header={t('Extra')}>\n <Col span={24}>\n <ClassName />\n </Col>\n </Collapse.Panel>\n </CollapseWrapper>\n </AttributesPanelWrapper>\n );\n}\n","import React from 'react';\nimport { Padding } from '@extensions/AttributePanel/components/attributes//Padding';\nimport { Background } from '@extensions/AttributePanel/components/attributes//Background';\nimport { TextField } from '@extensions/components/Form';\nimport { AttributesPanelWrapper } from '@extensions/AttributePanel/components/attributes/AttributesPanelWrapper';\nimport { Col, Collapse } from 'antd';\nimport { Stack, useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { ClassName } from '../../attributes/ClassName';\nimport { CollapseWrapper } from '../../attributes/CollapseWrapper';\n\nexport function Wrapper() {\n const { focusIdx } = useFocusIdx();\n return (\n <AttributesPanelWrapper style={{ padding: 0 }}>\n <CollapseWrapper defaultActiveKey={['.$0']}>\n <Collapse.Panel key=\"0\" header={t('Dimension')}>\n <Stack vertical spacing=\"tight\">\n <Padding />\n </Stack>\n </Collapse.Panel>\n <Collapse.Panel key=\"1\" header={t('Background')}>\n <Stack vertical spacing=\"tight\">\n <Background />\n </Stack>\n </Collapse.Panel>\n <Collapse.Panel key=\"2\" header={t('Border')}>\n <Stack vertical spacing=\"tight\">\n <TextField\n label={t('Border')}\n name={`${focusIdx}.attributes.border`}\n inline\n />\n <TextField\n label={t('Background border radius')}\n name={`${focusIdx}.attributes.border-radius`}\n inline\n />\n </Stack>\n </Collapse.Panel>\n <Collapse.Panel key=\"4\" header={t('Extra')}>\n <Col span={24}>\n <ClassName />\n </Col>\n </Collapse.Panel>\n </CollapseWrapper>\n </AttributesPanelWrapper>\n );\n}\n","\nimport React from 'react';\nimport { Height } from '@extensions/AttributePanel/components/attributes/Height';\nimport { ContainerBackgroundColor } from '@extensions/AttributePanel/components/attributes/ContainerBackgroundColor';\nimport { Padding } from '@extensions/AttributePanel/components/attributes/Padding';\nimport { AttributesPanelWrapper } from '@extensions/AttributePanel/components/attributes/AttributesPanelWrapper';\nimport { Collapse, Row, Col, Space } from 'antd';\nimport { ClassName } from '../../attributes/ClassName';\nimport { CollapseWrapper } from '../../attributes/CollapseWrapper';\n\nexport function Spacer() {\n return (\n <AttributesPanelWrapper>\n <CollapseWrapper defaultActiveKey={['.$0']}>\n <Collapse.Panel key='0' header={t('Dimension')}>\n <Space orientation='vertical' size='small'>\n <Height />\n <Padding />\n </Space>\n </Collapse.Panel>\n\n <Collapse.Panel key='1' header={t('Background')}>\n <ContainerBackgroundColor title={t('Background color')} />\n </Collapse.Panel>\n\n <Collapse.Panel key='2' header={t('Extra')}>\n <Col span={24}>\n <ClassName />\n </Col>\n </Collapse.Panel>\n </CollapseWrapper>\n </AttributesPanelWrapper>\n );\n}\n","import React, { useState } from 'react';\r\nimport { IconFont, useFocusIdx } from '@thanhpv102/easy-email-editor';\r\nimport { TextAreaField } from '@extensions/components/Form';\r\nimport { AttributesPanelWrapper } from '../../attributes';\r\nimport { Button, Tooltip } from 'antd';\r\nimport { HtmlEditor } from '../../UI/HtmlEditor';\r\n\r\nexport function Raw() {\r\n const { focusIdx } = useFocusIdx();\r\n const [visible, setVisible] = useState(false);\r\n return (\r\n <AttributesPanelWrapper\r\n style={{ padding: 20 }}\r\n extra={(\r\n <Tooltip title={t('Html mode')}>\r\n <Button\r\n onClick={() => setVisible(true)}\r\n icon={<IconFont iconName=\"icon-html\" />}\r\n />\r\n </Tooltip>\r\n )}\r\n >\r\n <TextAreaField\r\n label=\"\"\r\n name={`${focusIdx}.data.value.content`}\r\n rows={5}\r\n />\r\n <HtmlEditor\r\n visible={visible}\r\n setVisible={setVisible}\r\n />\r\n </AttributesPanelWrapper>\r\n );\r\n}\r\n","\nimport React from 'react';\nimport { useEditorProps, useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { AttributesPanelWrapper } from '@extensions/AttributePanel/components/attributes/AttributesPanelWrapper';\nimport { BackgroundColor } from '@extensions/AttributePanel/components/attributes/BackgroundColor';\nimport { FontFamily } from '@extensions/AttributePanel/components/attributes/FontFamily';\nimport { Padding } from '@extensions/AttributePanel/components/attributes/Padding';\nimport {\n ImageUploaderField,\n InputWithUnitField,\n RadioGroupField,\n SelectField,\n TextField,\n} from '@extensions/components/Form';\nimport { Collapse, Row, Col, Space } from 'antd';\nimport { ClassName } from '../../attributes/ClassName';\nimport { CollapseWrapper } from '../../attributes/CollapseWrapper';\n\nconst positionOptions = [\n {\n value: 'left',\n get label() {\n return t('Left');\n },\n },\n {\n value: 'right',\n get label() {\n return t('Right');\n },\n },\n];\n\nconst alignOptions = [\n {\n value: 'top',\n get label() {\n return t('top');\n },\n },\n {\n value: 'middle',\n get label() {\n return t('middle');\n },\n },\n {\n value: 'bottom',\n get label() {\n return t('bottom');\n },\n },\n];\n\nexport function Accordion() {\n const { focusIdx } = useFocusIdx();\n const { onUploadImage, enableAssetManager } = useEditorProps();\n\n return (\n <AttributesPanelWrapper>\n <CollapseWrapper defaultActiveKey={['.$0']}>\n <Collapse.Panel\n key='0'\n header={t('Setting')}\n >\n <Space orientation='vertical' size='small'>\n <Row>\n <Col span={11}>\n <BackgroundColor />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <FontFamily />\n </Col>\n </Row>\n\n <Padding />\n\n <Row>\n <Col span={11}>\n <InputWithUnitField\n label={t('Icon width')}\n name={`${focusIdx}.attributes.icon-width`}\n />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <InputWithUnitField\n label={t('Icon height')}\n name={`${focusIdx}.attributes.icon-height`}\n />\n </Col>\n </Row>\n\n <Row>\n <Col span={11}>\n <ImageUploaderField\n label={t('Unwrapped icon')}\n name={`${focusIdx}.attributes.icon-unwrapped-url`}\n //helpText={t('The image suffix should be .jpg, jpeg, png, gif, etc. Otherwise, the picture may not be displayed normally.')}\n uploadHandler={onUploadImage}\n enableSelectFromLibrary={enableAssetManager}\n />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <ImageUploaderField\n label={t('Wrapped icon')}\n name={`${focusIdx}.attributes.icon-wrapped-url`}\n uploadHandler={onUploadImage}\n enableSelectFromLibrary={enableAssetManager}\n />\n </Col>\n </Row>\n\n <Row>\n <Col span={11}>\n <RadioGroupField\n label={t('Icon position')}\n name={`${focusIdx}.attributes.icon-position`}\n options={positionOptions}\n />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <SelectField\n style={{ width: 120 }}\n label={t('Icon align')}\n name={`${focusIdx}.attributes.icon-align`}\n options={alignOptions}\n />\n </Col>\n </Row>\n\n <TextField\n label={t('Border')}\n name={`${focusIdx}.attributes.border`}\n />\n </Space>\n </Collapse.Panel>\n <Collapse.Panel\n key='4'\n header={t('Extra')}\n >\n <Col span={24}>\n <ClassName />\n </Col>\n </Collapse.Panel>\n </CollapseWrapper>\n </AttributesPanelWrapper>\n );\n}\n","import React from 'react';\nimport { Border } from '../../attributes/Border';\nimport { BackgroundColor } from '../../attributes/BackgroundColor';\nimport { FontFamily } from '../../attributes/FontFamily';\nimport { AttributesPanelWrapper } from '../../attributes/AttributesPanelWrapper';\nimport { Collapse, Space } from 'antd';\n\nexport function AccordionElement() {\n // const { focusIdx } = useFocusIdx();\n return (\n <AttributesPanelWrapper>\n <Collapse defaultActiveKey={['.$0']} items={[\n {\n key: '0',\n label: t('Setting'),\n children: (\n <Space orientation=\"vertical\" size=\"small\">\n <Border />\n <BackgroundColor />\n <FontFamily />\n </Space>\n ),\n },\n ]}\n />\n </AttributesPanelWrapper>\n );\n}\n","import React from 'react';\nimport { Padding } from '../../attributes/Padding';\n\nimport { BackgroundColor } from '../../attributes/BackgroundColor';\nimport { Color } from '../../attributes/Color';\nimport { TextAreaField } from '../../../../components/Form';\nimport { FontSize } from '../../attributes/FontSize';\nimport { FontWeight } from '../../attributes/FontWeight';\nimport { FontFamily } from '../../attributes/FontFamily';\nimport { AttributesPanelWrapper } from '../../attributes/AttributesPanelWrapper';\nimport { useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { Col, Collapse, Row, Space } from 'antd';\n\nexport function AccordionTitle() {\n const { focusIdx } = useFocusIdx();\n return (\n <AttributesPanelWrapper>\n <Collapse defaultActiveKey={['.$0']} items={[\n {\n key: '0',\n label: t('Setting'),\n children: (\n <Space orientation=\"vertical\" size=\"small\">\n <TextAreaField\n label={'Content'}\n name={`${focusIdx}.data.value.content`}\n />\n\n <Row>\n <Col span={11}>\n <Color />\n </Col>\n <Col offset={1} span={11}>\n <BackgroundColor />\n </Col>\n </Row>\n\n <Row>\n <Col span={11}>\n <FontSize />\n </Col>\n <Col offset={1} span={11}>\n <FontFamily />\n </Col>\n </Row>\n\n <Row>\n <Col span={11}>\n <FontWeight />\n </Col>\n <Col offset={1} span={11} />\n </Row>\n\n <Padding title={'Padding'} attributeName=\"padding\" />\n </Space>\n ),\n },\n ]}\n />\n </AttributesPanelWrapper>\n );\n}\n","import React from 'react';\nimport { useFocusIdx } from '@thanhpv102/easy-email-editor';\n\nimport { Padding } from '../../attributes/Padding';\nimport { BackgroundColor } from '../../attributes/BackgroundColor';\nimport { Color } from '../../attributes/Color';\nimport { TextAreaField } from '../../../../components/Form';\nimport { FontSize } from '../../attributes/FontSize';\nimport { FontWeight } from '../../attributes/FontWeight';\nimport { FontFamily } from '../../attributes/FontFamily';\nimport { LineHeight } from '../../attributes/LineHeight';\nimport { AttributesPanelWrapper } from '../../attributes/AttributesPanelWrapper';\nimport { Col, Collapse, Row, Space } from 'antd';\n\nexport function AccordionText() {\n const { focusIdx } = useFocusIdx();\n\n return (\n <AttributesPanelWrapper>\n <Collapse defaultActiveKey={['.$0']} items={[\n {\n key: '0',\n label: t('Setting'),\n children: (\n <Space orientation=\"vertical\" size=\"small\">\n <TextAreaField\n label={t('Content')}\n name={`${focusIdx}.data.value.content`}\n autoSize={{ minRows: 5 }}\n />\n <Row>\n <Col span={11}>\n <Color />\n </Col>\n <Col offset={1} span={11}>\n <FontSize />\n </Col>\n </Row>\n <Row>\n <Col span={11}>\n <LineHeight />\n </Col>\n <Col offset={1} span={11}>\n <FontWeight />\n </Col>\n </Row>\n <Row>\n <Col span={11}>\n <FontFamily />\n </Col>\n <Col offset={1} span={11}>\n <BackgroundColor />\n </Col>\n </Row>\n\n <Padding title={t('Padding')} attributeName=\"padding\" />\n </Space>\n ),\n },\n ]}\n />\n </AttributesPanelWrapper>\n );\n}\n","import React from 'react';\nimport {\n ColorPickerField,\n EditTabField,\n ImageUploaderField,\n InputWithUnitField,\n RadioGroupField,\n SelectField,\n TextField,\n} from '@extensions/components/Form';\nimport { Col, Collapse, Row, Space } from 'antd';\nimport { Stack, useEditorProps, useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { AttributesPanelWrapper } from '@extensions/AttributePanel/components/attributes/AttributesPanelWrapper';\nimport { Align } from '@extensions/AttributePanel/components/attributes/Align';\nimport { ICarousel } from '@thanhpv102/easy-email-core';\nimport { ClassName } from '../../attributes/ClassName';\nimport { CollapseWrapper } from '../../attributes/CollapseWrapper';\nimport { LinkOutlined } from '@ant-design/icons';\n\nconst options = [\n {\n value: 'hidden',\n get label() {\n return t('hidden');\n },\n },\n {\n value: 'visible',\n get label() {\n return t('visible');\n },\n },\n];\n\nexport function Carousel() {\n const { focusIdx } = useFocusIdx();\n return (\n <AttributesPanelWrapper style={{ padding: 0 }}>\n <CollapseWrapper defaultActiveKey={['.$0']}>\n <Collapse.Panel\n key=\"0\"\n header={t('Dimension')}\n >\n <Space orientation=\"vertical\" size=\"small\">\n <InputWithUnitField\n label={t('Thumbnail width')}\n name={`${focusIdx}.attributes.tb-width`}\n quickchange\n inline\n />\n\n <RadioGroupField\n label={t('Thumbnails')}\n name={`${focusIdx}.attributes.thumbnails`}\n options={options}\n inline\n />\n <Align inline />\n </Space>\n </Collapse.Panel>\n <Collapse.Panel\n key=\"1\"\n header={t('Images')}\n >\n <Stack\n vertical\n spacing=\"tight\"\n >\n <EditTabField\n tabPlacement=\"top\"\n name={`${focusIdx}.data.value.images`}\n label=\"\"\n labelHidden\n renderItem={(item: unknown, index: number) => (\n <CarouselImage\n item={item as ICarousel['data']['value']['images'][number]}\n index={index}\n />\n )}\n additionItem={{\n src: 'https://www.mailjet.com/wp-content/uploads/2016/11/ecommerce-guide.jpg',\n target: '_blank',\n }}\n />\n </Stack>\n </Collapse.Panel>\n <Collapse.Panel\n key=\"2\"\n header={t('Icon')}\n >\n <Row>\n <Col span={11}>\n <TextField\n label={t('Left icon')}\n name={`${focusIdx}.attributes.left-icon`}\n />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <TextField\n label={t('Right icon')}\n name={`${focusIdx}.attributes.right-icon`}\n />\n </Col>\n </Row>\n\n <Row>\n <Col span={11}>\n <InputWithUnitField\n label={t('Icon width')}\n name={`${focusIdx}.attributes.icon-width`}\n />\n </Col>\n <Col\n offset={1}\n span={11}\n />\n </Row>\n </Collapse.Panel>\n\n <Collapse.Panel\n key=\"3\"\n header={t('Border')}\n >\n <Row>\n <Col span={11}>\n <ColorPickerField\n label={t('Hovered border')}\n name={`${focusIdx}.attributes.tb-hover-border-color`}\n />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <ColorPickerField\n label={t('Selected Border')}\n name={`${focusIdx}.attributes.tb-selected-border-color`}\n />\n </Col>\n </Row>\n <Row>\n <Col span={11}>\n <TextField\n label={t('Border of the thumbnails')}\n name={`${focusIdx}.attributes.tb-border`}\n />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <TextField\n label={t('Border radius of the thumbnails')}\n name={`${focusIdx}.attributes.tb-border-radius`}\n />\n </Col>\n </Row>\n </Collapse.Panel>\n <Collapse.Panel\n key=\"4\"\n header={t('Extra')}\n >\n <Col span={24}>\n <ClassName />\n </Col>\n </Collapse.Panel>\n </CollapseWrapper>\n </AttributesPanelWrapper>\n );\n}\n\nfunction CarouselImage({\n index,\n}: {\n item: ICarousel['data']['value']['images'][number];\n index: number;\n}) {\n const { focusIdx } = useFocusIdx();\n const { onUploadImage, enableAssetManager } = useEditorProps();\n return (\n <Space orientation=\"vertical\" size=\"small\">\n <ImageUploaderField\n label={t('Image')}\n labelHidden\n name={`${focusIdx}.data.value.images.[${index}].src`}\n helpText={t(\n 'The image suffix should be .jpg, jpeg, png, gif, etc. Otherwise, the picture may not be displayed normally.',\n )}\n uploadHandler={onUploadImage}\n enableSelectFromLibrary={enableAssetManager}\n />\n <Row>\n <Col span={11}>\n <TextField\n prefix={<LinkOutlined />}\n label={t('Url')}\n name={`${focusIdx}.data.value.images.[${index}].href`}\n />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <SelectField\n label={t('Target')}\n name={`${focusIdx}.data.value.images.[${index}].target`}\n options={[\n {\n value: '',\n label: t('_self'),\n },\n {\n value: '_blank',\n label: t('_blank'),\n },\n ]}\n />\n </Col>\n </Row>\n\n <TextField\n label={t('Title')}\n name={`${focusIdx}.data.value.images.[${index}].title`}\n />\n </Space>\n );\n}\n","import React from 'react';\nimport { BackgroundColor } from '@extensions/AttributePanel/components/attributes/BackgroundColor';\nimport { ImageUploaderField, InputWithUnitField, RadioGroupField, TextField } from '@extensions/components/Form';\nimport { Width } from '@extensions/AttributePanel/components/attributes/Width';\nimport { Height } from '@extensions/AttributePanel/components/attributes/Height';\nimport { VerticalAlign } from '@extensions/AttributePanel/components/attributes/VerticalAlign';\nimport { Padding } from '@extensions/AttributePanel/components/attributes/Padding';\nimport { Col, Collapse, Row, Space } from 'antd';\nimport { useEditorProps, useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { AttributesPanelWrapper } from '@extensions/AttributePanel/components/attributes/AttributesPanelWrapper';\nimport { ClassName } from '../../attributes/ClassName';\nimport { CollapseWrapper } from '../../attributes/CollapseWrapper';\n\nconst options = [\n {\n value: 'fluid-height',\n get label() {\n return t('Fluid height');\n },\n },\n {\n value: 'fixed-height',\n get label() {\n return t('Fixed height');\n },\n },\n];\n\nexport function Hero() {\n const { focusIdx } = useFocusIdx();\n const { onUploadImage, enableAssetManager } = useEditorProps();\n\n return (\n <AttributesPanelWrapper>\n <CollapseWrapper defaultActiveKey={['.$0']}>\n <Collapse.Panel\n key=\"0\"\n header={t('Dimension')}\n >\n <Space orientation=\"vertical\" size=\"small\">\n <RadioGroupField\n label={t('Mode')}\n name={`${focusIdx}.attributes.mode`}\n key={`${focusIdx}.attributes.mode`}\n options={options}\n />\n <Row>\n <Col span={11}>\n <Width />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <Height />\n </Col>\n </Row>\n\n <Padding />\n <VerticalAlign />\n </Space>\n </Collapse.Panel>\n <Collapse.Panel\n key=\"1\"\n header={t('Background')}\n >\n <Space orientation=\"vertical\" size=\"small\">\n <ImageUploaderField\n label={t('src')}\n name={`${focusIdx}.attributes.background-url`}\n key={`${focusIdx}.attributes.background-url`}\n helpText={t(\n 'The image suffix should be .jpg, jpeg, png, gif, etc. Otherwise, the picture may not be displayed normally.',\n )}\n uploadHandler={onUploadImage}\n enableSelectFromLibrary={enableAssetManager}\n />\n\n <Row>\n <Col span={11}>\n <InputWithUnitField\n label={t('Background width')}\n name={`${focusIdx}.attributes.background-width`}\n />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <InputWithUnitField\n label={t('Background height')}\n name={`${focusIdx}.attributes.background-height`}\n />\n </Col>\n </Row>\n\n <Row>\n <Col span={11}>\n <TextField\n label={t('Background position')}\n name={`${focusIdx}.attributes.background-position`}\n />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <InputWithUnitField\n label={t('Border radius')}\n name={`${focusIdx}.attributes.border-radius`}\n unitOptions=\"percent\"\n />\n </Col>\n <Col span={11}>\n <BackgroundColor />\n </Col>\n </Row>\n </Space>\n </Collapse.Panel>\n <Collapse.Panel\n key=\"2\"\n header={t('Extra')}\n >\n <Col span={24}>\n <ClassName />\n </Col>\n </Collapse.Panel>\n </CollapseWrapper>\n </AttributesPanelWrapper>\n );\n}\n","import React from 'react';\nimport { ColorPickerField, EditTabField, SelectField, TextField } from '@extensions/components/Form';\nimport { Align } from '@extensions/AttributePanel/components/attributes/Align';\nimport { AttributesPanelWrapper } from '@extensions/AttributePanel/components/attributes/AttributesPanelWrapper';\nimport { Col, Collapse, Row, Space } from 'antd';\nimport { LinkOutlined } from '@ant-design/icons';\nimport { NavbarLinkPadding } from '@extensions/AttributePanel/components/attributes/NavbarLinkPadding';\nimport { Stack, useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { INavbar } from '@thanhpv102/easy-email-core';\nimport { ClassName } from '../../attributes/ClassName';\nimport { CollapseWrapper } from '../../attributes/CollapseWrapper';\nimport {\n FontFamily,\n FontStyle,\n FontWeight,\n LetterSpacing,\n LineHeight,\n TextDecoration,\n TextTransform,\n} from '../../attributes';\nimport { pixelAdapter } from '../../adapter';\n\nexport function Navbar() {\n const { focusIdx } = useFocusIdx();\n return (\n <AttributesPanelWrapper style={{ padding: 0 }}>\n <CollapseWrapper defaultActiveKey={['.$0']}>\n <Collapse.Panel\n key=\"0\"\n header={t('Layout')}\n >\n <Stack\n vertical\n spacing=\"tight\"\n >\n <Align />\n </Stack>\n </Collapse.Panel>\n\n <Collapse.Panel\n key=\"1\"\n header={t('Navbar links')}\n >\n <Space\n orientation=\"vertical\"\n style={{ width: '100%' }}\n >\n <EditTabField\n tabPlacement=\"top\"\n name={`${focusIdx}.data.value.links`}\n label={t('Links')}\n labelHidden\n renderItem={(item: unknown, index: number) => (\n <NavbarLink\n item={item as INavbar['data']['value']['links'][number]}\n index={index}\n />\n )}\n additionItem={{\n src: 'https://www.mailjet.com/wp-content/uploads/2016/11/ecommerce-guide.jpg',\n target: '_blank',\n content: 'New link',\n color: '#1890ff',\n 'font-size': '13px',\n }}\n />\n <div />\n </Space>\n </Collapse.Panel>\n <Collapse.Panel\n key=\"2\"\n header={t('Extra')}\n >\n <Col span={24}>\n <ClassName />\n </Col>\n </Collapse.Panel>\n </CollapseWrapper>\n </AttributesPanelWrapper>\n );\n}\n\nfunction NavbarLink({\n index,\n}: {\n item: INavbar['data']['value']['links'][number];\n index: number;\n}) {\n const { focusIdx } = useFocusIdx();\n return (\n <div className=\"NavbarLink\">\n <Space\n orientation=\"vertical\"\n style={{ width: '100%' }}\n >\n <Row>\n <Col span={11}>\n <TextField\n label={t('Content')}\n name={`${focusIdx}.data.value.links.[${index}].content`}\n />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <ColorPickerField\n label={t('Color')}\n name={`${focusIdx}.data.value.links.[${index}].color`}\n />\n </Col>\n </Row>\n\n <Row>\n <Col span={11}>\n <FontFamily name={`${focusIdx}.data.value.links.[${index}].font-family`} />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <TextField\n label={t('Font size (px)')}\n name={`${focusIdx}.data.value.links.[${index}].font-size`}\n config={pixelAdapter}\n autoComplete=\"off\"\n />\n </Col>\n </Row>\n\n <Row>\n <Col span={11}>\n <LineHeight name={`${focusIdx}.data.value.links.[${index}].line-height`} />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <LetterSpacing\n name={`${focusIdx}.data.value.links.[${index}].letter-spacing`}\n />\n </Col>\n </Row>\n\n <Row>\n <Col span={11}>\n <TextDecoration\n name={`${focusIdx}.data.value.links.[${index}].text-decoration`}\n />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <FontWeight name={`${focusIdx}.data.value.links.[${index}].font-weight`} />\n </Col>\n </Row>\n\n <Row>\n <Col span={11}>\n <TextTransform\n name={`${focusIdx}.data.value.links.[${index}].text-transform`}\n />\n </Col>\n <Col\n offset={1}\n span={11}\n />\n </Row>\n <FontStyle name={`${focusIdx}.data.value.links.[${index}].font-style`} />\n <Row>\n <Col span={11}>\n <TextField\n prefix={<LinkOutlined />}\n label={<span>{t('Url')}</span>}\n name={`${focusIdx}.data.value.links.[${index}].href`}\n />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <SelectField\n style={{ minWidth: 65 }}\n label={t('Target')}\n name={`${focusIdx}.data.value.links.[${index}].target`}\n options={[\n {\n value: '_blank',\n label: t('_blank'),\n },\n {\n value: '_self',\n label: t('_self'),\n },\n ]}\n />\n </Col>\n </Row>\n <NavbarLinkPadding\n name={`${focusIdx}.data.value.links.[${index}].padding`}\n />\n <div />\n </Space>\n </div>\n );\n}\n","import React, { useMemo } from 'react';\nimport { Padding } from '@extensions/AttributePanel/components/attributes/Padding';\nimport {\n EditGridTabField,\n ImageUploaderField,\n InputWithUnitField,\n RadioGroupField,\n TextField,\n} from '@extensions/components/Form';\nimport { Align } from '@extensions/AttributePanel/components/attributes/Align';\nimport { Color } from '@extensions/AttributePanel/components/attributes/Color';\nimport { ContainerBackgroundColor } from '@extensions/AttributePanel/components/attributes/ContainerBackgroundColor';\nimport { FontFamily } from '@extensions/AttributePanel/components/attributes/FontFamily';\nimport { FontSize } from '@extensions/AttributePanel/components/attributes/FontSize';\nimport { FontStyle } from '@extensions/AttributePanel/components/attributes/FontStyle';\nimport { FontWeight } from '@extensions/AttributePanel/components/attributes/FontWeight';\n\nimport { AttributesPanelWrapper } from '@extensions/AttributePanel/components/attributes/AttributesPanelWrapper';\nimport { Col, Collapse, Row, Space } from 'antd';\nimport { TextDecoration } from '@extensions/AttributePanel/components/attributes/TextDecoration';\nimport { LineHeight } from '@extensions/AttributePanel/components/attributes/LineHeight';\nimport { useBlock, useEditorProps, useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { ISocial } from '@thanhpv102/easy-email-core';\nimport { ClassName } from '../../attributes/ClassName';\nimport { CollapseWrapper } from '../../attributes/CollapseWrapper';\nimport { LinkOutlined } from '@ant-design/icons';\n\nconst options = [\n {\n value: 'vertical',\n get label() {\n return 'vertical';\n },\n },\n {\n value: 'horizontal',\n get label() {\n return 'horizontal';\n },\n },\n];\n\nexport function Social() {\n const { focusIdx } = useFocusIdx();\n const { focusBlock } = useBlock();\n const value = focusBlock?.data.value as ISocial['data']['value'];\n if (!value) return null;\n\n return (\n <AttributesPanelWrapper style={{ padding: 0 }}>\n <CollapseWrapper defaultActiveKey={['.$0']}>\n <Collapse.Panel\n key=\"0\"\n header={'Setting'}\n >\n <Space orientation=\"vertical\" size=\"small\">\n <RadioGroupField\n label={'Mode'}\n name={`${focusIdx}.attributes.mode`}\n options={options}\n />\n\n <Align />\n </Space>\n </Collapse.Panel>\n\n <Collapse.Panel\n key=\"1\"\n header={'Typography'}\n >\n <Space orientation=\"vertical\" size=\"small\">\n <Row>\n <Col span={11}>\n <FontFamily />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <FontSize />\n </Col>\n </Row>\n <Row>\n <Col span={11}>\n <FontWeight />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <LineHeight />\n </Col>\n </Row>\n <Row>\n <Col span={11}>\n <Color />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <ContainerBackgroundColor title={'Background color'} />\n </Col>\n </Row>\n <Row>\n <Col span={11}>\n <TextDecoration />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <FontStyle />\n </Col>\n </Row>\n </Space>\n </Collapse.Panel>\n\n <Collapse.Panel\n key=\"2\"\n header={t('Social item')}\n >\n <EditGridTabField\n tabPlacement=\"top\"\n name={`${focusIdx}.data.value.elements`}\n label=\"\"\n labelHidden\n renderItem={(item, index: number) => (\n <SocialElement\n item={item as ISocial['data']['value']['elements'][number]}\n index={index}\n />\n )}\n />\n </Collapse.Panel>\n\n <Collapse.Panel\n key=\"3\"\n header={t('Dimension')}\n >\n <Space\n orientation=\"vertical\"\n size=\"large\"\n >\n <Row>\n <Col span={11}>\n <InputWithUnitField\n label={t('Icon width')}\n name={`${focusIdx}.attributes.icon-size`}\n />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <TextField\n label={t('Border radius')}\n name={`${focusIdx}.attributes.border-radius`}\n />\n </Col>\n </Row>\n\n <Padding />\n <Padding\n attributeName=\"inner-padding\"\n title={t('Icon padding')}\n />\n <Padding\n attributeName=\"text-padding\"\n title={t('Text padding')}\n />\n </Space>\n </Collapse.Panel>\n <Collapse.Panel\n key=\"4\"\n header={t('Extra')}\n >\n <Col span={24}>\n <ClassName />\n </Col>\n </Collapse.Panel>\n </CollapseWrapper>\n </AttributesPanelWrapper>\n );\n}\n\nfunction SocialElement({\n index,\n}: {\n item: ISocial['data']['value']['elements'][0];\n index: number;\n}) {\n const { focusIdx } = useFocusIdx();\n const { onUploadImage, socialIcons, enableAssetManager } = useEditorProps();\n\n const autoCompleteOptions = useMemo(() => {\n if (!socialIcons) return undefined;\n return socialIcons.map(icon => {\n return {\n label: icon.content,\n value: icon.image,\n };\n });\n }, [socialIcons]);\n\n return (\n <Space orientation=\"vertical\" size=\"small\">\n <ImageUploaderField\n label={t('Image')}\n autoCompleteOptions={autoCompleteOptions}\n labelHidden\n name={`${focusIdx}.data.value.elements.[${index}].src`}\n //helpText={t('The image suffix should be .jpg, jpeg, png, gif, etc. Otherwise, the picture may not be displayed normally.')}\n uploadHandler={onUploadImage}\n enableSelectFromLibrary={enableAssetManager}\n />\n\n <Row>\n <Col span={11}>\n <TextField\n label={t('Content')}\n name={`${focusIdx}.data.value.elements.[${index}].content`}\n quickchange\n />\n </Col>\n <Col\n offset={1}\n span={11}\n >\n <TextField\n prefix={<LinkOutlined />}\n label={t('Link')}\n name={`${focusIdx}.data.value.elements.[${index}].href`}\n />\n </Col>\n </Row>\n {/* <Row>\n <Col span={11}>\n <InputWithUnitField\n label={t('Icon width')}\n name={`${focusIdx}.data.value.elements.[${index}].icon-size`}\n />\n </Col>\n <Col offset={1} span={11}>\n <InputWithUnitField\n label={t('Icon height')}\n name={`${focusIdx}.data.value.elements.[${index}].icon-height`}\n />\n </Col>\n </Row> */}\n </Space>\n );\n}\n","import { AttributesPanelWrapper } from '@extensions/AttributePanel';\nimport { Collapse } from 'antd';\nimport { Stack, useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport React from 'react';\nimport { t } from '@thanhpv102/easy-email-core';\nimport { Border } from '../../attributes/Border';\nimport { Color } from '../../attributes/Color';\nimport { ContainerBackgroundColor } from '../../attributes/ContainerBackgroundColor';\nimport { FontFamily } from '../../attributes/FontFamily';\nimport { FontSize } from '../../attributes/FontSize';\nimport { FontStyle } from '../../attributes/FontStyle';\nimport { Padding } from '../../attributes/Padding';\nimport { TextAlign } from '../../attributes/TextAlign';\nimport { Width } from '../../attributes/Width';\nimport { CollapseWrapper } from '../../attributes/CollapseWrapper';\nimport { TextField } from '@extensions/components/Form';\nexport function Table() {\n const { focusIdx } = useFocusIdx();\n return (\n <AttributesPanelWrapper>\n <CollapseWrapper defaultActiveKey={['.$0']}>\n <Collapse.Panel\n key=\"0\"\n header={t('Content')}\n >\n <TextField\n label={t('Content')}\n name={`${focusIdx}.data.value.content`}\n type='textarea'\n placeholder=\"Enter HTML table content\"\n />\n </Collapse.Panel>\n <Collapse.Panel\n key=\"1\"\n header={t('Dimension')}\n >\n <Stack>\n <Width />\n </Stack>\n <Stack vertical>\n <Padding />\n </Stack>\n </Collapse.Panel>\n <Collapse.Panel\n key=\"2\"\n header={t('Decoration')}\n >\n <Color />\n <ContainerBackgroundColor />\n <Border />\n </Collapse.Panel>\n <Collapse.Panel\n key=\"3\"\n header={t('Typography')}\n >\n <Stack>\n <FontFamily />\n <FontSize />\n </Stack>\n <FontStyle />\n <TextAlign />\n </Collapse.Panel>\n </CollapseWrapper>\n </AttributesPanelWrapper>\n );\n}\n\n","import { AttributesPanelWrapper } from '@extensions/AttributePanel';\nimport { Collapse } from 'antd';\nimport { Stack, useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport React from 'react';\nimport { t } from '@thanhpv102/easy-email-core';\nimport { Color } from '../../attributes/Color';\nimport { ContainerBackgroundColor } from '../../attributes/ContainerBackgroundColor';\nimport { FontFamily } from '../../attributes/FontFamily';\nimport { FontSize } from '../../attributes/FontSize';\nimport { Padding } from '../../attributes/Padding';\nimport { Width } from '../../attributes/Width';\nimport { CollapseWrapper } from '../../attributes/CollapseWrapper';\nimport { ColorPickerField, NumberField, SelectField, TextField } from '@extensions';\nimport { pixelAdapter } from '../../adapter';\n\nexport function AdvancedTable() {\n const { focusIdx } = useFocusIdx();\n return (\n <AttributesPanelWrapper>\n <CollapseWrapper defaultActiveKey={['.$0']}>\n <Collapse.Panel\n key=\"0\"\n header={t('Table Settings')}\n >\n <div style={{ fontSize: 12, color: '#666', marginBottom: 8 }}>\n {t('Click on the table to edit cells, right click for add/remove rows and columns')}\n </div>\n <NumberField\n label={t('Cell padding (px)')}\n name={`${focusIdx}.attributes.cellPadding`}\n config={pixelAdapter}\n max={50}\n min={0}\n step={1}\n />\n <ColorPickerField\n label={t('Cell border color')}\n name={`${focusIdx}.attributes.cellBorderColor`}\n key={`${focusIdx}.attributes.cellBorderColor`}\n />\n </Collapse.Panel>\n\n <Collapse.Panel\n key=\"1\"\n header={t('Dimension')}\n >\n <Stack>\n <Width />\n </Stack>\n <Stack vertical>\n <Padding />\n </Stack>\n </Collapse.Panel>\n\n <Collapse.Panel\n key=\"2\"\n header={t('Decoration')}\n >\n <Color />\n <ContainerBackgroundColor />\n <TextField\n label={t('Table border')}\n name={`${focusIdx}.attributes.border`}\n />\n </Collapse.Panel>\n\n <Collapse.Panel\n key=\"3\"\n header={t('Typography')}\n >\n <Stack>\n <FontFamily />\n <FontSize />\n </Stack>\n <Stack>\n <SelectField\n label={t('Font style')}\n name={`${focusIdx}.attributes.font-style`}\n options={[\n { value: 'normal', label: t('Normal') },\n { value: 'italic', label: t('Italic') },\n { value: 'oblique', label: t('Oblique') },\n ]}\n />\n <SelectField\n label={t('Text align')}\n name={`${focusIdx}.attributes.text-align`}\n options={[\n { value: 'left', label: t('Left') },\n { value: 'center', label: t('Center') },\n { value: 'right', label: t('Right') },\n ]}\n />\n </Stack>\n </Collapse.Panel>\n </CollapseWrapper>\n </AttributesPanelWrapper>\n );\n}\n","import { Page } from './Page';\nimport { Section } from './Section';\nimport { Column } from './Column';\nimport { Text } from './Text';\nimport { Image } from './Image';\nimport { Group } from './Group';\nimport { Button } from './Button';\nimport { Divider } from './Divider';\nimport { Wrapper } from './Wrapper';\nimport { Spacer } from './Spacer';\n\nimport { Raw } from './Raw';\nimport { Accordion } from './Accordion';\nimport { AccordionElement } from './AccordionElement';\nimport { AccordionTitle } from './AccordionTitle';\nimport { AccordionText } from './AccordionText';\nimport { Carousel } from './Carousel';\nimport { Hero } from './Hero';\nimport { Navbar } from './Navbar';\nimport { Social } from './Social';\nimport { Table } from './Table';\nimport { BasicType, AdvancedType } from '@thanhpv102/easy-email-core';\nimport { AdvancedTable } from './AdvancedTable';\n\nexport const blocks = {\n [BasicType.PAGE]: Page,\n [BasicType.SECTION]: Section,\n [BasicType.COLUMN]: Column,\n [BasicType.TEXT]: Text,\n [BasicType.IMAGE]: Image,\n [BasicType.GROUP]: Group,\n [BasicType.BUTTON]: Button,\n [BasicType.DIVIDER]: Divider,\n [BasicType.WRAPPER]: Wrapper,\n [BasicType.SPACER]: Spacer,\n [BasicType.RAW]: Raw,\n [BasicType.ACCORDION]: Accordion,\n [BasicType.ACCORDION_ELEMENT]: AccordionElement,\n [BasicType.ACCORDION_TITLE]: AccordionTitle,\n [BasicType.ACCORDION_TEXT]: AccordionText,\n [BasicType.CAROUSEL]: Carousel,\n [BasicType.HERO]: Hero,\n [BasicType.NAVBAR]: Navbar,\n [BasicType.SOCIAL]: Social,\n [BasicType.TABLE]: Table,\n\n [AdvancedType.TEXT]: Text,\n [AdvancedType.IMAGE]: Image,\n [AdvancedType.BUTTON]: Button,\n [AdvancedType.DIVIDER]: Divider,\n [AdvancedType.SPACER]: Spacer,\n [AdvancedType.ACCORDION]: Accordion,\n [AdvancedType.CAROUSEL]: Carousel,\n [AdvancedType.NAVBAR]: Navbar,\n [AdvancedType.SOCIAL]: Social,\n [AdvancedType.TABLE]: AdvancedTable,\n\n [AdvancedType.HERO]: Hero,\n [AdvancedType.WRAPPER]: Wrapper,\n [AdvancedType.SECTION]: Section,\n [AdvancedType.GROUP]: Group,\n [AdvancedType.COLUMN]: Column,\n};\n","import { blocks } from '../components/blocks';\nimport { ReactNode } from 'react';\n\ntype ObjectComponent = { [key: string]: (...args: any) => ReactNode };\n\nexport class BlockAttributeConfigurationManager {\n private static map: ObjectComponent = { ...blocks };\n\n public static add(componentMap: ObjectComponent) {\n Object.keys(componentMap).forEach(name => {\n this.map[name] = componentMap[name];\n });\n }\n\n public static get<T extends ObjectComponent>(name: keyof T): () => React.ReactElement | null {\n return (this.map as any)[name];\n }\n\n public static getMap() {\n return this.map;\n }\n}\n","export const RICH_TEXT_TOOL_BAR = 'Tools';\r\nexport const RICH_TEXT_POPUP_CONTAINER_ID = 'easy-email-rich-text-popup-container';\r\n\r\n","/* eslint-disable @typescript-eslint/no-unsafe-call */\nimport { RICH_TEXT_TOOL_BAR, RICH_TEXT_POPUP_CONTAINER_ID } from '@extensions/constants';\nimport { getShadowRoot } from '@thanhpv102/easy-email-editor';\nimport React, { useEffect, useMemo, useState } from 'react';\n\nexport const SelectionRangeContext = React.createContext<{\n selectionRange: Range | null;\n setSelectionRange: React.Dispatch<React.SetStateAction<Range | null>>;\n}>({\n selectionRange: null,\n setSelectionRange: () => {},\n});\n\nexport const SelectionRangeProvider: React.FC<{\n children: React.ReactNode | React.ReactElement;\n}> = props => {\n const [selectionRange, setSelectionRange] = useState<Range | null>(null);\n\n useEffect(() => {\n const getSelectionFromShadowRoot = (shadowRoot: ShadowRoot): Selection | null => {\n // Chrome supports getSelection() directly on ShadowRoot.\n if ('getSelection' in shadowRoot) {\n return (shadowRoot as unknown as Document).getSelection();\n }\n // Firefox: use document.getSelection() but only when the anchor is\n // actually inside the shadow root (avoids stale light-DOM selections).\n const sel = document.getSelection();\n if (sel && sel.rangeCount > 0 && shadowRoot.contains(sel.anchorNode)) {\n return sel;\n }\n return sel;\n };\n\n const applySelection = (shadowRoot: ShadowRoot) => {\n try {\n const selection = getSelectionFromShadowRoot(shadowRoot);\n\n if (!selection || selection.rangeCount === 0) return;\n\n const range = selection.getRangeAt(0);\n if (!range) return;\n\n // Ignore selections whose container is outside the shadow root.\n // This prevents stale light-DOM selections in Firefox from being used.\n if (!shadowRoot.contains(range.commonAncestorContainer)) return;\n\n const toolbar = shadowRoot.getElementById(RICH_TEXT_TOOL_BAR);\n if (toolbar && toolbar.contains(range.commonAncestorContainer)) return;\n const popupContainer = shadowRoot.getElementById(RICH_TEXT_POPUP_CONTAINER_ID);\n if (popupContainer && popupContainer.contains(range.commonAncestorContainer)) return;\n\n // If the range is collapsed (cursor only), make sure the active element\n // is still the contenteditable editor – not a toolbar control or popup\n // input that stole focus and left a stale collapsed range in the editor.\n if (range.collapsed) {\n const activeEl = shadowRoot.activeElement;\n if (activeEl) {\n if (toolbar && toolbar.contains(activeEl)) return;\n if (popupContainer && popupContainer.contains(activeEl)) return;\n }\n }\n\n setSelectionRange(range);\n } catch {}\n };\n\n const shadowRoot = getShadowRoot();\n\n // --- Mouse tracking ---\n // We track clicks to distinguish:\n // single-click drag → read on mouseup (via 0ms timeout)\n // double-click → read via dblclick AFTER Firefox expands word selection\n let isMouseDown = false;\n let pendingDblClickTimer: ReturnType<typeof setTimeout> | null = null;\n // Flag set between mouseup and dblclick to suppress selectionchange during\n // that window (Firefox fires selectionchange with wrong ranges here).\n let suppressSelectionChange = false;\n\n const onMouseDown = (e: Event) => {\n const target = e.target as Node | null;\n const toolbar = shadowRoot.getElementById(RICH_TEXT_TOOL_BAR);\n const popupContainer = shadowRoot.getElementById(RICH_TEXT_POPUP_CONTAINER_ID);\n if ((toolbar && target && toolbar.contains(target)) ||\n (popupContainer && target && popupContainer.contains(target))) {\n return;\n }\n isMouseDown = true;\n suppressSelectionChange = false;\n };\n\n const onMouseUp = (e: Event) => {\n isMouseDown = false;\n // If the click is on the toolbar or a popup container, skip updating the\n // selection – we want to preserve the cursor/selection in the editor.\n const target = e.target as Node | null;\n const toolbar = shadowRoot.getElementById(RICH_TEXT_TOOL_BAR);\n const popupContainer = shadowRoot.getElementById(RICH_TEXT_POPUP_CONTAINER_ID);\n if ((toolbar && target && toolbar.contains(target)) ||\n (popupContainer && target && popupContainer.contains(target))) {\n return;\n }\n // Suppress selectionchange briefly after mouseup in case a dblclick\n // follows – Firefox fires bad intermediate selectionchange events in\n // the gap between mouseup and dblclick.\n suppressSelectionChange = true;\n pendingDblClickTimer = setTimeout(() => {\n pendingDblClickTimer = null;\n suppressSelectionChange = false;\n applySelection(shadowRoot);\n }, 0);\n };\n\n const onDblClick = (e: Event) => {\n // Cancel the mouseup timer – we handle the selection here instead.\n if (pendingDblClickTimer !== null) {\n clearTimeout(pendingDblClickTimer);\n pendingDblClickTimer = null;\n }\n\n // Firefox-specific workaround: when the user double-clicks inside an\n // <a> element that is itself inside a contenteditable, Firefox sometimes\n // selects the text node *before* the <a> rather than the text inside it.\n // Detect this and manually build a correct selection for the <a> content.\n const target = e.target as Node | null;\n const anchorEl = target instanceof HTMLAnchorElement\n ? target\n : (target as Element | null)?.closest?.('a') ?? null;\n\n if (anchorEl && anchorEl.firstChild) {\n try {\n const sel = document.getSelection();\n if (sel) {\n // Check if Firefox gave us a bad selection (anchor outside <a>).\n const isBadSelection =\n sel.rangeCount === 0 ||\n !anchorEl.contains(sel.anchorNode);\n\n if (isBadSelection) {\n suppressSelectionChange = false;\n // Manually select all text inside the <a> element.\n // Prefer setBaseAndExtent (supported in Firefox and Chrome) for\n // selecting nodes inside shadow DOM, as addRange can be unreliable.\n const firstChild = anchorEl.firstChild;\n const lastChild = anchorEl.lastChild ?? firstChild;\n const endOffset =\n lastChild.nodeType === Node.TEXT_NODE\n ? (lastChild as Text).length\n : (lastChild as Element).childNodes.length;\n if (typeof sel.setBaseAndExtent === 'function') {\n sel.setBaseAndExtent(firstChild, 0, lastChild, endOffset);\n } else {\n const newRange = document.createRange();\n newRange.selectNodeContents(anchorEl);\n sel.removeAllRanges();\n sel.addRange(newRange);\n }\n applySelection(shadowRoot);\n return;\n }\n }\n } catch {}\n }\n\n // Use a short delay: Firefox finishes word-boundary expansion of a\n // double-click selection right around the dblclick event, but reading\n // immediately can still catch an intermediate state.\n setTimeout(() => {\n suppressSelectionChange = false;\n applySelection(shadowRoot);\n }, 0);\n };\n\n const onSelectionChange = () => {\n // Suppress during mouse-down or during the mouseup→dblclick window.\n if (isMouseDown || suppressSelectionChange) return;\n applySelection(shadowRoot);\n };\n\n // mousedown / mouseup / dblclick on the shadow root for mouse selections.\n shadowRoot?.addEventListener('mousedown', onMouseDown);\n shadowRoot?.addEventListener('mouseup', onMouseUp);\n shadowRoot?.addEventListener('dblclick', onDblClick);\n\n // selectionchange handles keyboard-driven selections (shift+arrows, etc.)\n document.addEventListener('selectionchange', onSelectionChange);\n shadowRoot?.addEventListener('selectionchange', onSelectionChange);\n\n return () => {\n if (pendingDblClickTimer !== null) clearTimeout(pendingDblClickTimer);\n shadowRoot?.removeEventListener('mousedown', onMouseDown);\n shadowRoot?.removeEventListener('mouseup', onMouseUp);\n shadowRoot?.removeEventListener('dblclick', onDblClick);\n document.removeEventListener('selectionchange', onSelectionChange);\n shadowRoot?.removeEventListener('selectionchange', onSelectionChange);\n };\n }, []);\n\n const value = useMemo(() => {\n return {\n selectionRange,\n setSelectionRange,\n };\n }, [selectionRange]);\n\n return useMemo(() => {\n return (\n <SelectionRangeContext.Provider value={value}>\n {props.children}\n </SelectionRangeContext.Provider>\n );\n }, [props.children, value]);\n};\n","import { DATA_CONTENT_EDITABLE_IDX } from '@thanhpv102/easy-email-editor';\nimport { IBoundaryRect, IBoundingPosition, IOperationData } from './type';\nimport { AdvancedTableBlock } from '@thanhpv102/easy-email-core';\n\nconst getEditorElementClientRect = (target: Element) => {\n const el = target as HTMLElement;\n const r = el.getBoundingClientRect();\n return {\n left: r.left,\n top: r.top,\n width: r.width,\n height: r.height,\n };\n};\n\nconst getBoundaryFromRects = (startRect: any, endRect: any) => {\n let left = Math.min(\n startRect.left,\n endRect.left,\n startRect.left + startRect.width,\n endRect.left + endRect.width,\n );\n\n let right = Math.max(\n startRect.left,\n endRect.left,\n startRect.left + startRect.width,\n endRect.left + endRect.width,\n );\n\n let top = Math.min(\n startRect.top,\n endRect.top,\n startRect.top + startRect.height,\n endRect.top + endRect.height,\n );\n\n let bottom = Math.max(\n startRect.top,\n endRect.top,\n startRect.top + startRect.height,\n endRect.top + endRect.height,\n );\n\n let width = right - left;\n let height = bottom - top;\n\n return { top, bottom, left, right, width, height };\n};\n\nconst ERROR_LIMIT = 2;\n\nconst getCorrectBoundary = (el: Element, currentBoundary: IBoundaryRect) => {\n const tableEl = el.parentElement?.parentElement?.parentElement;\n if (!tableEl) {\n return null;\n }\n let leftTopCell = el;\n let bottomRightCell = el;\n let leftTopRect = getEditorElementClientRect(el);\n let bottomRightRect = leftTopRect;\n\n const tableCells = tableEl.querySelectorAll('td');\n const tableCellRects = [] as any[];\n tableCells.forEach(tableCell => {\n // TODO: reduce calculation: cache table rect, use table rect diff all td rect boundary\n const { left, top, height, width } = getEditorElementClientRect(tableCell);\n tableCellRects.push({ left, top, height, width });\n let isIntersected =\n ((left + ERROR_LIMIT >= currentBoundary.left &&\n left + ERROR_LIMIT <= currentBoundary.right) ||\n (left - ERROR_LIMIT + width >= currentBoundary.left &&\n left - ERROR_LIMIT + width <= currentBoundary.right)) &&\n ((top + ERROR_LIMIT >= currentBoundary.top &&\n top + ERROR_LIMIT <= currentBoundary.bottom) ||\n (top - ERROR_LIMIT + height >= currentBoundary.top &&\n top - ERROR_LIMIT + height <= currentBoundary.bottom));\n if (isIntersected) {\n currentBoundary = getBoundaryFromRects(currentBoundary, {\n left,\n top,\n height,\n width,\n });\n }\n });\n\n tableCells.forEach((tableCell, index) => {\n const { left, top, height, width } = tableCellRects[index];\n let isIntersected =\n ((left + ERROR_LIMIT >= currentBoundary.left &&\n left + ERROR_LIMIT <= currentBoundary.right) ||\n (left - ERROR_LIMIT + width >= currentBoundary.left &&\n left - ERROR_LIMIT + width <= currentBoundary.right)) &&\n ((top + ERROR_LIMIT >= currentBoundary.top &&\n top + ERROR_LIMIT <= currentBoundary.bottom) ||\n (top - ERROR_LIMIT + height >= currentBoundary.top &&\n top - ERROR_LIMIT + height <= currentBoundary.bottom));\n if (!isIntersected) {\n return;\n }\n\n if (top <= leftTopRect.top && left <= leftTopRect.left) {\n leftTopRect = tableCellRects[index];\n leftTopCell = tableCell;\n }\n if (\n top === leftTopRect.top + ERROR_LIMIT ||\n (top === leftTopRect.top && left <= leftTopRect.left)\n ) {\n leftTopRect = tableCellRects[index];\n leftTopCell = tableCell;\n }\n if (\n top + height > bottomRightRect.top + bottomRightRect.height + ERROR_LIMIT ||\n (top + height === bottomRightRect.top + bottomRightRect.height &&\n left + width >= bottomRightRect.left + bottomRightRect.width)\n ) {\n bottomRightRect = tableCellRects[index];\n bottomRightCell = tableCell;\n }\n });\n\n return { leftTopCell, bottomRightCell, boundary: currentBoundary };\n};\n\n// get selected boundary and correct let-top-dom, right-bottom-dom\nexport const getBoundaryRectAndElement = (el1: Element, el2: Element) => {\n const rect1 = getEditorElementClientRect(el1);\n const rect2 = getEditorElementClientRect(el2);\n\n const boundary = getBoundaryFromRects(rect1, rect2);\n\n return getCorrectBoundary(el1, boundary);\n};\n\nexport function setStyle(domNode: any, rules: any) {\n if (typeof rules === 'object') {\n for (let prop in rules) {\n domNode.style[prop] = rules[prop];\n }\n }\n}\n\nexport const getCurrentTable = (target: Element) => {\n let parentNode = target.parentNode;\n while (parentNode) {\n if (parentNode.nodeName === 'TABLE') {\n return parentNode;\n }\n parentNode = parentNode.parentNode;\n }\n return parentNode;\n};\n\nexport const getElementsBoundary = (el1: Element, el2: Element): IBoundingPosition => {\n const rect1 = el1.getBoundingClientRect();\n const rect2 = el2.getBoundingClientRect();\n\n const left = Math.min(rect1.left, rect2.left);\n const right = Math.max(rect1.right, rect2.right);\n const bottom = Math.max(rect1.bottom, rect2.bottom);\n const top = Math.min(rect1.top, rect2.top);\n\n return { left, top, right, bottom };\n};\n\nexport const checkEventInBoundingRect = (\n rect: IBoundingPosition,\n { x, y }: { x: number; y: number },\n) => {\n return x >= rect.left && x <= rect.right && y <= rect.bottom && y >= rect.top;\n};\n\nexport const getCellAttr = (el: Element, attrName: string) => {\n const value = el.getAttribute(attrName);\n\n return Number(value || 0);\n};\n\nconst getCellIndex = (cellElement: Element) => {\n let idxName = cellElement.getAttribute(DATA_CONTENT_EDITABLE_IDX) as string;\n idxName = idxName.split('data.value.tableSource.')[1].split('.content')[0];\n\n return idxName.split('.').map(e => Number(e));\n};\n\nexport const getTdBoundaryIndex = (leftTopCell: Element, bottomRightCell: Element) => {\n const idx1 = getCellIndex(leftTopCell);\n const idx2 = getCellIndex(bottomRightCell);\n\n const top = idx1[0];\n const left = idx1[1];\n const right = idx2[1];\n const bottom = idx2[0];\n\n return { left, top, right, bottom };\n};\n\nexport const getCorrectTableIndexBoundary = (\n tableIndexBoundary: IBoundingPosition,\n tableData: IOperationData[][],\n) => {\n let { left, right, top, bottom } = tableIndexBoundary;\n // set top, bottom index\n tableData.forEach((tr, trIndex) => {\n tr.forEach(td => {\n td.top = trIndex;\n td.bottom = trIndex + (td.rowSpan || 1) - 1;\n });\n });\n // set right ,left index\n const maxTdCount = getMaxTdCount(tableData);\n const mergedCells = [] as [number, number][]; // [trIndex, tdIndex]\n Array.from({ length: maxTdCount }).forEach((_, tdIndex) => {\n tableData.forEach((tr, trIndex) => {\n const mergedCell = mergedCells.find(e => e[0] === trIndex && e[1] === tdIndex);\n if (mergedCell) {\n return;\n }\n const mergedTds = mergedCells.filter(e => e[0] === trIndex && e[1] < tdIndex);\n const _tdIndex = tdIndex - mergedTds.length;\n const td = tr[_tdIndex];\n if (!td) {\n console.error('error case, should fix this error.');\n return;\n }\n const rowSpan = td.rowSpan || 1;\n const colSpan = td.colSpan || 1;\n td.left = tdIndex;\n td.right = tdIndex + colSpan - 1;\n\n if (rowSpan > 1 || colSpan > 1) {\n Array.from({ length: rowSpan }).forEach((_, rowSpanIndex) => {\n Array.from({ length: colSpan }).forEach((_, colSpanIndex) => {\n if (rowSpanIndex === 0 && colSpanIndex === 0) {\n return;\n }\n mergedCells.push([trIndex + rowSpanIndex, tdIndex + colSpanIndex]);\n });\n });\n }\n });\n });\n\n tableIndexBoundary.left = tableData?.[top]?.[left]?.left || 0;\n tableIndexBoundary.right = tableData?.[bottom]?.[right]?.right || 0;\n tableIndexBoundary.bottom = tableData?.[bottom]?.[right]?.bottom || 0;\n tableIndexBoundary.top = tableData?.[top]?.[left]?.top || 0;\n\n return tableIndexBoundary;\n};\n\nexport const getMaxTdCount = (\n tableData: AdvancedTableBlock['data']['value']['tableSource'],\n) => {\n let tdCount = 1;\n tableData.forEach(tr => {\n let _tdCount = tr.reduce((count, td) => count + (td.colSpan || 1), 0);\n if (_tdCount > tdCount) {\n tdCount = _tdCount;\n }\n });\n return tdCount;\n};\n",".easy-email-table-operation-menu {\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-table-operation-menu-dividing {\n height: 1px;\n background-color: #efefef;\n }\n\n .easy-email-table-operation-color-picker {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n padding: 0 16px 10px;\n background-color: #fff;\n overflow: hidden;\n\n .easy-email-table-operation-color-picker-item {\n width: 20px;\n height: 20px;\n border: 1px solid #595959;\n margin-right: 5px;\n margin-bottom: 5px;\n cursor: pointer;\n }\n }\n\n .easy-email-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 &:hover {\n background-color: #efefef;\n }\n\n .easy-email-table-operation-menu-icon {\n margin-right: 8px;\n height: 20px;\n width: 20px;\n font-size: 0;\n }\n }\n\n .easy-email-table-operation-menu-bg-item {\n padding: 10px 16px;\n background-color: #fff;\n color: #595959;\n\n > div:nth-child(2) {\n margin-top: 4px;\n display: flex;\n align-items: center;\n flex-shrink: 0;\n\n .arco-input-inner-wrapper {\n box-shadow: none;\n }\n .arco-btn-size-default {\n padding: 0 12px;\n }\n\n .arco-input-group {\n display: flex;\n .arco-input-inner-wrapper {\n flex: 1;\n }\n .arco-input-group-addafter {\n height: 100%;\n width: auto;\n }\n }\n }\n\n &-color {\n height: 28px;\n width: 28px;\n flex-shrink: 0;\n border: 1px solid var(--color-neutral-3, rgb(229, 230, 235));\n border-right: none;\n padding: 4px;\n cursor: pointer;\n position: relative;\n\n > div {\n height: 100%;\n width: 100%;\n border: 1px solid var(--color-neutral-3, rgb(229, 230, 235));\n border-radius: 2px;\n }\n input {\n cursor: pointer;\n position: absolute;\n width: 100%;\n height: 100%;\n z-index: 1;\n left: 0;\n top: 0;\n opacity: 0;\n }\n }\n }\n}\n","import { Input } from 'antd';\nimport React, { useEffect } from 'react';\nimport { createRoot } from 'react-dom/client';\nimport { useState } from 'react';\n\ninterface CellBackgroundSelectorProps {\n bgColorHandler: (color: string) => void;\n rootDom: Element;\n}\n\nconst CellBackgroundSelector: React.FC<CellBackgroundSelectorProps> = ({\n bgColorHandler,\n rootDom,\n}) => {\n const [color, setColor] = useState('#ffffff');\n\n useEffect(() => {\n if (!rootDom) {\n return;\n }\n const observer = new ResizeObserver(() => {\n setColor('#ffffff');\n });\n observer.observe(rootDom);\n return () => {\n observer.disconnect();\n };\n }, [rootDom]);\n\n return (\n <div\n onClick={e => e.stopPropagation()}\n className='easy-email-table-operation-menu-bg-item'\n >\n <div>{t('Set Background Color')}</div>\n <div>\n <div className='easy-email-table-operation-menu-bg-item-color'>\n <div style={{ backgroundColor: color }} />\n <input\n type='color'\n value={color}\n onChange={e => setColor(e.target.value)}\n />\n </div>\n <Input.Search\n enterButton={t('Set')}\n onSearch={() => bgColorHandler(color)}\n value={color}\n onKeyDown={e => e.stopPropagation()}\n onChange={e => setColor(e.target.value)}\n />\n </div>\n </div>\n );\n};\n\nconst getCellBackgroundSelectorRoot = (\n bgColorHandler: CellBackgroundSelectorProps['bgColorHandler'],\n rootDom: Element,\n) => {\n const node = document.createElement('div');\n\n const root = createRoot(node);\n root.render(\n <CellBackgroundSelector\n bgColorHandler={bgColorHandler}\n rootDom={rootDom}\n />,\n );\n return node;\n};\n\nexport default getCellBackgroundSelectorRoot;\n","import getCellBackgroundSelectorRoot from './tableCellBgSelector';\nimport TableOperationMenu from './tableOperationMenu';\nimport { IOperationData } from './type';\n\nconst MENU_CONFIG = {\n insertColumnRight: {\n text: 'Insert column right',\n icon: '<?xml version=\"1.0\" standalone=\"no\"?><!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\"><svg class=\"icon\" width=\"20px\" height=\"20px\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path fill=\"#595959\" d=\"M73.142857 336.64h526.628572v43.885714H73.142857zM73.142857 643.657143h526.628572v43.885714H73.142857zM336.457143 117.028571h43.885714v789.942858h-43.885714zM204.8 73.142857h614.4a131.657143 131.657143 0 0 1 131.657143 131.657143v614.4a131.657143 131.657143 0 0 1-131.657143 131.657143H204.8A131.657143 131.657143 0 0 1 73.142857 819.2V204.8A131.84 131.84 0 0 1 204.8 73.142857z m0 43.885714a87.771429 87.771429 0 0 0-87.771429 87.771429v614.4a87.771429 87.771429 0 0 0 87.771429 87.771429h614.4a87.771429 87.771429 0 0 0 87.771429-87.771429V204.8a87.771429 87.771429 0 0 0-87.771429-87.771429zM819.2 73.142857h-219.428571v877.714286h219.428571a131.657143 131.657143 0 0 0 131.657143-131.657143V204.8A131.84 131.84 0 0 0 819.2 73.142857z m44.068571 460.982857h-65.828571v65.828572H753.371429v-65.828572h-65.828572V490.057143h65.828572v-65.828572h44.068571v65.828572h65.828571z\" /></svg>',\n handler() {\n const _this = this as unknown as TableOperationMenu;\n const right = _this.tableIndexBoundary.right;\n\n _this.tableData.forEach(tr => {\n if (right === _this.maxTdCount - 1) {\n tr.push({ content: '-' } as IOperationData);\n return;\n }\n if (tr.length === 0) {\n return tr.push({ content: '-' } as IOperationData);\n }\n for (let index = 0; index < tr.length; index++) {\n const tdLeft = tr[index].left || 0;\n const tdRight = tr[index].right || 0;\n\n if (tdRight === right) {\n tr.splice(index + 1, 0, { content: '-' } as IOperationData);\n break;\n }\n if (tdLeft <= right && tdRight > right && tr[index].colSpan) {\n tr[index].colSpan = (tr[index].colSpan || 1) + 1;\n break;\n }\n // pre cell intersect current cell.\n if (tdLeft > right && tdLeft - 1 === right) {\n tr.splice(index, 0, { content: '-' } as IOperationData);\n break;\n }\n if (tdLeft > right) {\n break;\n }\n }\n });\n _this.changeTableData?.(_this.tableData);\n },\n },\n insertColumnLeft: {\n text: 'Insert column left',\n icon: '<?xml version=\"1.0\" standalone=\"no\"?><!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\"><svg class=\"icon\" width=\"20px\" height=\"20.00px\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path fill=\"#595959\" d=\"M380.342857 336.457143h526.811429v43.885714H380.342857z m0 307.2h526.811429v43.885714H380.342857zM643.657143 117.028571h43.885714v789.942858h-43.885714zM204.8 73.142857h614.582857A131.474286 131.474286 0 0 1 950.857143 204.8v614.4a131.657143 131.657143 0 0 1-131.657143 131.657143H204.8A131.657143 131.657143 0 0 1 73.142857 819.2V204.8A131.657143 131.657143 0 0 1 204.8 73.142857z m0 43.885714a87.588571 87.588571 0 0 0-87.588571 87.771429v614.4a87.588571 87.588571 0 0 0 87.588571 87.771429h614.582857a87.771429 87.771429 0 0 0 87.771429-87.771429V204.8a87.771429 87.771429 0 0 0-87.771429-87.771429zM204.8 73.142857A131.657143 131.657143 0 0 0 73.142857 204.8v614.4a131.657143 131.657143 0 0 0 131.657143 131.657143h219.428571V73.142857z m131.84 460.8h-65.828571v65.828572h-43.885715v-65.828572h-65.828571v-43.885714h65.828571v-65.828572h43.885715v65.828572h65.828571z\" /></svg>',\n handler() {\n const _this = this as unknown as TableOperationMenu;\n const left = _this.tableIndexBoundary.left;\n _this.tableData.forEach(tr => {\n if (left === 0) {\n tr.unshift({ content: '-' } as IOperationData);\n return;\n }\n if (tr.length === 0) {\n return tr.push({ content: '-' } as IOperationData);\n }\n for (let index = 0; index < tr.length; index++) {\n const tdLeft = tr[index].left || 0;\n const tdRight = tr[index].right || 0;\n if (tdLeft === left) {\n tr.splice(index, 0, { content: '-' } as IOperationData);\n break;\n }\n // pre cell intersect current cell.\n if (tdLeft < left && tdRight >= left && tr[index].colSpan) {\n tr[index].colSpan = (tr[index].colSpan || 1) + 1;\n break;\n }\n // pre cell intersect current cell.\n if (tdLeft > left && tr[index - 1] && (tr[index - 1].right || 0) + 1 === left) {\n tr.splice(index, 0, { content: '-' } as IOperationData);\n break;\n }\n if (tdLeft > left) {\n break;\n }\n }\n });\n _this.changeTableData?.(_this.tableData);\n },\n },\n insertRowUp: {\n text: 'Insert row up',\n icon: '<?xml version=\"1.0\" standalone=\"no\"?><!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\"><svg class=\"icon\" width=\"20px\" height=\"20.00px\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path fill=\"#595959\" d=\"M73.142857 599.771429h877.714286v43.885714H73.142857zM336.457143 380.342857h43.885714v526.628572h-43.885714z m307.2 0h43.885714v526.628572h-43.885714zM204.8 73.142857h614.4a131.657143 131.657143 0 0 1 131.657143 131.657143v614.4a131.657143 131.657143 0 0 1-131.657143 131.657143H204.8A131.657143 131.657143 0 0 1 73.142857 819.2V204.8A131.657143 131.657143 0 0 1 204.8 73.142857z m0 43.885714a87.771429 87.771429 0 0 0-87.771429 87.771429v614.4a87.588571 87.588571 0 0 0 87.771429 87.771429h614.4a87.588571 87.588571 0 0 0 87.771429-87.771429V204.8a87.771429 87.771429 0 0 0-87.771429-87.771429zM819.2 73.142857H204.8A131.657143 131.657143 0 0 0 73.142857 204.8v219.428571h877.714286v-219.428571A131.657143 131.657143 0 0 0 819.2 73.142857z m-219.428571 197.485714h-65.828572v65.828572h-43.885714v-65.828572h-65.828572v-43.885714h65.828572V160.914286h43.885714v65.828571h65.828572z\" /></svg>',\n handler() {\n const _this = this as unknown as TableOperationMenu;\n const top = _this.tableIndexBoundary.top;\n let maxTdCount = _this.maxTdCount;\n if (_this.tableData[top].length < maxTdCount) {\n // update pre cell row span\n for (let index = top - 1; index > -1; index--) {\n const tr = _this.tableData[index];\n tr.forEach((td) => {\n if (td.bottom && td.bottom >= top) {\n td.rowSpan = (td.rowSpan || 1) + 1;\n maxTdCount -= td.colSpan || 1;\n }\n });\n if (tr.length === maxTdCount) {\n break;\n }\n }\n }\n _this.addRow(top, maxTdCount);\n },\n },\n insertRowDown: {\n text: 'Insert row down',\n icon: '<?xml version=\"1.0\" standalone=\"no\"?><!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\"><svg class=\"icon\" width=\"20px\" height=\"20.00px\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path fill=\"#595959\" d=\"M204.8 73.142857h614.4a131.657143 131.657143 0 0 1 131.657143 131.657143v614.4a131.657143 131.657143 0 0 1-131.657143 131.657143H204.8A131.657143 131.657143 0 0 1 73.142857 819.2V204.8A131.84 131.84 0 0 1 204.8 73.142857z m0 43.885714a87.771429 87.771429 0 0 0-87.771429 87.771429v614.4a87.771429 87.771429 0 0 0 87.771429 87.771429h614.4a87.771429 87.771429 0 0 0 87.771429-87.771429V204.8a87.771429 87.771429 0 0 0-87.771429-87.771429zM73.142857 336.457143h877.714286v44.068571H73.142857zM336.64 117.028571h43.885714v526.628572h-43.885714z m307.017143 0h44.068571v526.628572H643.657143zM73.142857 599.771429v219.428571a131.657143 131.657143 0 0 0 131.657143 131.657143h614.4a131.657143 131.657143 0 0 0 131.657143-131.657143v-219.428571z m526.628572 197.485714h-65.645715v65.828571H490.057143v-65.828571h-65.828572v-43.885714h65.828572v-65.828572h44.068571v65.828572h65.645715z\" /></svg>',\n handler() {\n const _this = this as unknown as TableOperationMenu;\n let addCount = _this.maxTdCount;\n const bottom = _this.tableIndexBoundary.bottom;\n\n if (_this.tableData[bottom].length < _this.maxTdCount) {\n // update pre cell row span\n for (let index = bottom - 1; index > -1; index--) {\n const tr = _this.tableData[index];\n if (tr.length === _this.maxTdCount) {\n break;\n }\n tr.forEach((td) => {\n if (td.bottom && td.bottom > bottom) {\n td.rowSpan = (td.rowSpan || 1) + 1;\n addCount -= td.colSpan || 1;\n }\n });\n }\n }\n // If current Cell intersect next row, should add rowSpan and decrease tdCount\n _this.tableData[bottom].forEach(e => {\n if (e.rowSpan && e.rowSpan > 1) {\n e.rowSpan += 1;\n addCount -= e.colSpan || 1;\n }\n });\n\n _this.addRow(bottom + 1, addCount);\n },\n },\n\n splitCell: {\n text: 'Split cell',\n icon: '<?xml version=\"1.0\" standalone=\"no\"?><!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\"><svg class=\"icon\" width=\"20px\" height=\"20.00px\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path fill=\"#595959\" d=\"M925.99596 99.038384c-25.470707-25.6-60.121212-39.822222-96.323233-39.822222H194.19798c-36.072727 0-70.723232 14.351515-96.323233 39.822222-25.6 25.6-39.822222 60.121212-39.822222 96.323232v635.474748c0 36.072727 14.351515 70.723232 39.822222 96.323232C123.474747 952.759596 158.125253 967.111111 194.19798 967.111111h635.474747c36.072727 0 70.723232-14.351515 96.323233-39.951515 25.6-25.6 39.951515-60.121212 39.951515-96.323232V195.361616c0-36.072727-14.351515-70.723232-39.951515-96.323232z m-277.850505 5.559596v226.909091H375.725253V104.59798h272.420202zM103.434343 195.361616c0-24.048485 9.567677-47.191919 26.634344-64.129293 17.066667-17.066667 40.080808-26.634343 64.129293-26.634343h136.145454v226.909091H103.434343V195.361616z m90.763637 726.367677c-24.048485 0-47.191919-9.567677-64.129293-26.634344-17.066667-17.066667-26.634343-40.080808-26.634344-64.129292V649.309091h226.909091v272.420202H194.19798z m181.527273 0V649.309091h272.290909v272.420202H375.725253z m544.711111-90.892929c0 24.048485-9.567677 47.191919-26.634344 64.129293-17.066667 17.066667-40.080808 26.634343-64.129293 26.634343H693.527273V649.309091h226.909091v181.527273zM693.527273 331.507071V104.59798h136.145454c24.048485 0 47.191919 9.567677 64.129293 26.634343 17.066667 17.066667 26.634343 40.080808 26.634344 64.129293v136.145455H693.527273z M490.057143 375.725253h43.885714v272.549494h-43.885714z M336.457143 468.114141h351.085714v43.885714H336.457143z\" /></svg>',\n handler() {\n const _this = this as unknown as TableOperationMenu;\n const { top, left } = _this.tableIndexBoundary;\n\n const tr = _this.tableData[top];\n const cellIndex = tr.findIndex(td => td.left === left);\n if (cellIndex === -1) return;\n\n const cell = tr[cellIndex];\n const colSpan = cell.colSpan || 1;\n const rowSpan = cell.rowSpan || 1;\n\n if (colSpan === 1 && rowSpan === 1) return;\n\n const newCells: IOperationData[] = [];\n for (let c = 0; c < colSpan; c++) {\n newCells.push({ content: c === 0 ? cell.content : '-' } as IOperationData);\n }\n delete newCells[0].colSpan;\n delete newCells[0].rowSpan;\n\n tr.splice(cellIndex, 1, ...newCells);\n\n if (rowSpan > 1) {\n for (let r = 1; r < rowSpan; r++) {\n const targetRow = _this.tableData[top + r];\n if (!targetRow) continue;\n\n let insertIndex = targetRow.length;\n for (let i = 0; i < targetRow.length; i++) {\n const tdLeft = targetRow[i].left || 0;\n if (tdLeft >= left) {\n insertIndex = i;\n break;\n }\n }\n\n const cellsToInsert: IOperationData[] = [];\n for (let c = 0; c < colSpan; c++) {\n cellsToInsert.push({ content: '-' } as IOperationData);\n }\n targetRow.splice(insertIndex, 0, ...cellsToInsert);\n }\n }\n\n _this.changeTableData?.(_this.tableData);\n },\n },\n\n mergeCells: {\n text: 'Merge selected cells',\n icon: '<?xml version=\"1.0\" standalone=\"no\"?><!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\"><svg class=\"icon\" width=\"20px\" height=\"20.00px\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path fill=\"#595959\" d=\"M925.99596 99.038384c-25.470707-25.6-60.121212-39.822222-96.323233-39.822222H194.19798c-36.072727 0-70.723232 14.351515-96.323233 39.822222-25.6 25.6-39.822222 60.121212-39.822222 96.323232v635.474748c0 36.072727 14.351515 70.723232 39.822222 96.323232C123.474747 952.759596 158.125253 967.111111 194.19798 967.111111h635.474747c36.072727 0 70.723232-14.351515 96.323233-39.951515 25.6-25.6 39.951515-60.121212 39.951515-96.323232V195.361616c0-36.072727-14.351515-70.723232-39.951515-96.323232z m-277.850505 5.559596v226.909091H375.725253V104.59798h272.420202zM103.434343 195.361616c0-24.048485 9.567677-47.191919 26.634344-64.129293 17.066667-17.066667 40.080808-26.634343 64.129293-26.634343h136.145454v226.909091H103.434343V195.361616z m90.763637 726.367677c-24.048485 0-47.191919-9.567677-64.129293-26.634344-17.066667-17.066667-26.634343-40.080808-26.634344-64.129292V649.309091h226.909091v272.420202H194.19798z m181.527273 0V649.309091h272.290909v272.420202H375.725253z m544.711111-90.892929c0 24.048485-9.567677 47.191919-26.634344 64.129293-17.066667 17.066667-40.080808 26.634343-64.129293 26.634343H693.527273V649.309091h226.909091v181.527273zM693.527273 331.507071V104.59798h136.145454c24.048485 0 47.191919 9.567677 64.129293 26.634343 17.066667 17.066667 26.634343 40.080808 26.634344 64.129293v136.145455H693.527273z\" /></svg>',\n handler() {\n const _this = this as unknown as TableOperationMenu;\n const { top, left, bottom, right } = _this.tableIndexBoundary;\n const leftTopItem = _this.tableData[top].find(\n e => e.left === left,\n ) as IOperationData;\n leftTopItem.rowSpan = bottom - top + 1;\n leftTopItem.colSpan = right - left + 1;\n\n _this.tableData.forEach((tr, trIndex) => {\n if (trIndex >= top && trIndex <= bottom) {\n // merge next cell, should add `<br />`.\n if (bottom > top && trIndex > top && trIndex <= bottom) {\n leftTopItem.content += '<br />';\n }\n const deletedIndex = [] as number[];\n tr.forEach((td, tdIndex) => {\n // current cell\n if (top === trIndex && left === td.left) {\n return;\n }\n // should merged cell\n if (td.left >= left && td.right <= right) {\n leftTopItem.content += ' ' + td.content;\n deletedIndex.push(tdIndex);\n }\n });\n // delete cell\n if (deletedIndex.length > 0) {\n tr.splice(\n deletedIndex[0],\n deletedIndex[deletedIndex.length - 1] - deletedIndex[0] + 1,\n );\n }\n }\n });\n\n _this.changeTableData?.(_this.tableData);\n },\n },\n\n deleteColumn: {\n text: 'Delete selected columns',\n icon: '<?xml version=\"1.0\" standalone=\"no\"?><!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\"><svg class=\"icon\" width=\"20px\" height=\"20.00px\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path fill=\"#595959\" d=\"M925.996 99.038c-25.47-25.6-60.121-39.822-96.323-39.822H194.198c-75.12 0.13-136.016 61.026-136.145 136.146v635.345c0 36.073 14.351 70.723 39.822 96.323 25.6 25.73 60.25 40.081 96.323 40.081h635.475c36.072 0 70.723-14.351 96.323-39.951 25.6-25.6 39.951-60.122 39.951-96.324V195.362c0-36.073-14.351-70.724-39.951-96.324z m-365.77 494.287L512 545.228l-48.226 48.097-32.194-31.935 48.355-48.226-48.226-48.097 32.194-32.194L512 480.97l48.097-48.097 32.194 32.194-48.097 48.097 48.226 48.226-32.194 31.935zM103.434 195.362c0-24.049 9.568-47.192 26.635-64.13 17.066-17.066 40.08-26.634 64.129-26.634h136.145v226.91H103.434V195.361z m0 181.656h226.91V649.31h-226.91V377.02z m90.764 544.84c-24.049 0-47.192-9.567-64.13-26.634-17.066-17.066-26.634-40.08-26.634-64.258V694.69h226.91v227.168H194.197z m726.238-90.763c0 24.048-9.438 47.192-26.505 64.259-17.066 17.066-40.21 26.634-64.258 26.505H693.527V694.69h226.91v136.404z m0-181.786H693.527V377.02h226.91v272.29zM693.527 331.507V104.598h136.146c24.048 0 47.192 9.438 64.258 26.505 17.067 17.067 26.635 40.21 26.505 64.259v136.145H693.527z\" /></svg>',\n handler() {\n const _this = this as unknown as TableOperationMenu;\n const { left, right } = _this.tableIndexBoundary;\n _this.tableData.forEach(tr => {\n const deleteIds = [] as number[];\n for (let index = 0; index < tr.length; index++) {\n const td = tr[index];\n const tdLeft = tr[index].left || 0;\n const tdRight = tr[index].right || 0;\n const colSpan = td.colSpan || 1;\n if (tdLeft > right) {\n break;\n }\n if (tdLeft >= left && tdRight <= right) {\n deleteIds.push(index);\n }\n // operate one cell\n else if (tdLeft <= left && tdRight >= right) {\n td.colSpan = colSpan - (right - left) - 1;\n }\n // left insert cell\n else if (tdLeft > left && tdRight >= right) {\n td.colSpan = colSpan - (right - tdLeft) - 1;\n }\n // right insert cell\n else if (tdLeft < left && tdRight >= left) {\n td.colSpan = colSpan - (tdRight - left) - 1;\n }\n }\n if (deleteIds.length) {\n tr.splice(deleteIds[0], deleteIds[deleteIds.length - 1] - deleteIds[0] + 1);\n }\n });\n _this.changeTableData?.(_this.tableData);\n },\n },\n\n deleteRow: {\n text: 'Delete selected rows',\n icon: '<?xml version=\"1.0\" standalone=\"no\"?><!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\"><svg class=\"icon\" width=\"20px\" height=\"20.00px\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path fill=\"#595959\" d=\"M925.99596 99.038384c-25.470707-25.6-60.121212-39.822222-96.323233-39.822222H194.19798c-36.072727 0-70.723232 14.351515-96.323233 39.822222-25.6 25.6-39.822222 60.121212-39.822222 96.323232v635.474748c0 36.072727 14.351515 70.723232 39.822222 96.323232C123.474747 952.759596 158.125253 967.111111 194.19798 967.111111h635.474747c36.072727 0 70.723232-14.351515 96.323233-39.951515 25.6-25.6 39.951515-60.121212 39.951515-96.323232V195.361616c0-36.072727-14.351515-70.723232-39.951515-96.323232z m-550.270707 5.559596h272.290909v227.167677H375.725253V104.59798z m56.242424 360.468687l31.935353-32.19394 48.09697 48.226263 48.09697-48.226263 32.193939 32.19394-48.09697 48.096969 48.226263 48.226263-32.193939 31.935354-48.226263-48.09697-48.226263 48.09697-31.935353-31.935354 48.226262-48.226263-48.096969-48.096969zM103.434343 195.361616c0-24.048485 9.567677-47.191919 26.634344-64.129293 17.066667-17.066667 40.080808-26.634343 64.129293-26.634343h136.145454v227.167677H103.434343V195.361616z m817.002021 635.733333c0 24.048485-9.567677 47.191919-26.634344 64.258586-17.066667 17.066667-40.080808 26.634343-64.129293 26.634344H194.19798c-24.048485 0-47.191919-9.567677-64.258586-26.634344C112.872727 878.157576 103.434343 855.014141 103.434343 830.836364V694.690909h226.909091v226.909091h45.381819V694.690909h272.290909v226.909091h45.381818V694.690909h226.909091v136.40404z m0-499.329292H693.527273V104.59798h136.145454c24.048485 0 47.191919 9.567677 64.129293 26.634343 17.066667 17.066667 26.634343 40.080808 26.634344 64.129293v136.404041z\" /></svg>',\n handler() {\n const _this = this as unknown as TableOperationMenu;\n const { top, bottom } = _this.tableIndexBoundary;\n const deleteCount = bottom - top + 1;\n // pre cell intersect current cell.\n for (let index = bottom - 1; index > -1; index--) {\n const tr = _this.tableData[index];\n tr.forEach((td) => {\n if (td.bottom && td.bottom >= top) {\n const deleteRowSpan = td.bottom >= bottom ? deleteCount : td.bottom - top + 1;\n td.rowSpan = (td.rowSpan || 1) - deleteRowSpan;\n }\n });\n }\n\n // current cell intersect next cell\n for (let index = top; index <= bottom; index++) {\n const tr = _this.tableData[index];\n tr.forEach((td) => {\n const rowSpan = td.rowSpan || 1;\n if (rowSpan - 1 + top > bottom) {\n const nextRowCell = { ...td, rowSpan: rowSpan - (bottom - top + 1) };\n const nextRow = _this.tableData[bottom + 1];\n if (nextRow) {\n const index = Array.from({ length: _this.maxTdCount }).findIndex(\n (_, index) => index === nextRowCell.left,\n );\n if (index > -1) {\n nextRow.splice(index, 0, nextRowCell);\n }\n }\n }\n });\n }\n\n _this.tableData.splice(_this.tableIndexBoundary.top, deleteCount);\n _this.changeTableData?.(_this.tableData);\n },\n },\n\n setCellBg: {\n text: 'Set Background',\n render(tableOperationMenu: TableOperationMenu) {\n const bgColorHandler = this.handler.bind(tableOperationMenu);\n return getCellBackgroundSelectorRoot(\n bgColorHandler,\n tableOperationMenu.domNode!,\n );\n },\n handler(color: string) {\n const _this = this as unknown as TableOperationMenu;\n const { top, bottom, left, right } = _this.tableIndexBoundary;\n _this.tableData.forEach(tr => {\n for (let index = 0; index < tr.length; index++) {\n const td = tr[index];\n const tdTop = tr[index].top || 0;\n const tdBottom = tr[index].bottom || 0;\n const tdLeft = tr[index].left || 0;\n const tdRight = tr[index].right || 0;\n\n if (tdLeft > right) {\n break;\n }\n if (top <= tdTop && bottom >= tdBottom && left <= tdLeft && right >= tdRight) {\n td.backgroundColor = color;\n }\n }\n });\n _this.changeTableData?.(_this.tableData);\n _this.hide();\n },\n },\n};\n\nexport default MENU_CONFIG;\n","import { setStyle, getCorrectTableIndexBoundary, getMaxTdCount } from './util';\nimport styleText from './menu.scss?inline';\nimport { IBoundingPosition, IOperationData } from './type';\nimport MENU_CONFIG from './tableMenuConfig';\n\nconst MENU_HEIGHT = 305;\nconst MENU_WIDTH = 200;\n\nexport default class TableOperationMenu {\n menuItems = MENU_CONFIG;\n domNode: Element | undefined = undefined;\n styleDom?: HTMLStyleElement;\n visible = false;\n splitCellNode: HTMLElement | undefined = undefined;\n splitCellDivider: HTMLElement | undefined = undefined;\n\n changeTableData?: (e: IOperationData[][]) => void;\n tableData = undefined as unknown as IOperationData[][];\n tableIndexBoundary = undefined as unknown as IBoundingPosition;\n maxTdCount = 0;\n\n constructor() {\n this.menuInitial();\n this.mount();\n }\n\n mount() {\n if (this.domNode) {\n document.body.appendChild(this.domNode);\n }\n document.body.addEventListener('click', this.handleBodyClick.bind(this));\n }\n\n destroy() {\n this.domNode?.remove();\n if (this.styleDom) {\n document.head.removeChild(this.styleDom);\n }\n document.body.removeEventListener('click', this.handleBodyClick.bind(this));\n }\n\n handleBodyClick(e: MouseEvent) {\n // Ignore right-clicks — the menu should stay visible after being shown by a right-click\n if (e.button !== 0) return;\n this.hide();\n }\n\n hide() {\n if (!this.visible) {\n return;\n }\n this.visible = false;\n setStyle(this.domNode, {\n display: 'none',\n });\n }\n\n addRow(insertIndex: number, colCount: number) {\n const newRow = Array.from({ length: colCount }).map(() => ({ content: '-' }) as any);\n this.tableData.splice(insertIndex, 0, newRow);\n this.changeTableData?.(this.tableData);\n }\n\n setTableData(tableData: IOperationData[][]) {\n this.tableData = tableData || [];\n this.maxTdCount = getMaxTdCount(this.tableData);\n }\n\n setTableIndexBoundary(tableIndexBoundary: IBoundingPosition) {\n // get correct boundary index and set table-td boundary\n this.tableIndexBoundary = getCorrectTableIndexBoundary(\n tableIndexBoundary,\n this.tableData,\n );\n }\n\n showMenu({ x, y }: { x: number; y: number }) {\n this.visible = true;\n this.updateSplitCellVisibility();\n const maxHeight = window.innerHeight;\n const maxWidth = window.innerWidth;\n if (maxWidth - MENU_WIDTH < x) {\n x -= MENU_WIDTH;\n }\n if (maxHeight - MENU_HEIGHT < y) {\n y -= MENU_HEIGHT;\n }\n setStyle(this.domNode, {\n display: 'block',\n position: 'fixed',\n left: `${x}px`,\n top: `${y}px`,\n 'min-height': '150px',\n width: `${MENU_WIDTH}px`,\n Height: `${MENU_HEIGHT}px`,\n });\n }\n\n updateSplitCellVisibility() {\n if (!this.splitCellNode || !this.splitCellDivider) return;\n const { top, left, bottom, right } = this.tableIndexBoundary || {};\n // Show splitCell only when exactly one merged cell is selected.\n // A merged cell expands the boundary (right > left or bottom > top),\n // so we check that one cell's span exactly covers the whole boundary.\n let isMerged = false;\n if (this.tableData) {\n const tr = this.tableData[top];\n if (tr) {\n const cell = tr.find(td => td.left === left);\n if (cell) {\n const colSpan = cell.colSpan || 1;\n const rowSpan = cell.rowSpan || 1;\n // The cell is the only one selected if its span exactly matches the boundary\n const cellCoversFullBoundary =\n cell.left === left &&\n cell.right === right &&\n cell.top === top &&\n cell.bottom === bottom;\n isMerged = cellCoversFullBoundary && (colSpan > 1 || rowSpan > 1);\n }\n }\n }\n const display = isMerged ? '' : 'none';\n this.splitCellNode.style.display = display;\n this.splitCellDivider.style.display = display;\n }\n\n menuInitial() {\n this.styleDom = document.createElement('style');\n this.styleDom.innerText = styleText;\n document.head.appendChild(this.styleDom);\n\n this.domNode = document.createElement('div');\n this.domNode.classList.add('easy-email-table-operation-menu');\n setStyle(this.domNode, { display: 'none' });\n\n for (let name in this.menuItems) {\n const itemOption = (this.menuItems as any)[name];\n if (itemOption) {\n const itemNode = itemOption.render\n ? itemOption.render(this)\n : this.menuItemCreator(Object.assign({}, itemOption));\n this.domNode.appendChild(itemNode);\n\n if (name === 'splitCell') {\n this.splitCellNode = itemNode as HTMLElement;\n const splitDivider = dividingCreator();\n this.splitCellDivider = splitDivider;\n this.domNode.appendChild(splitDivider);\n }\n\n if (['insertRowDown', 'deleteRow', 'mergeCells'].indexOf(name) > -1) {\n this.domNode.appendChild(dividingCreator());\n }\n }\n }\n\n // create dividing line\n function dividingCreator() {\n const dividing = document.createElement('div');\n dividing.classList.add('easy-email-table-operation-menu-dividing');\n return dividing;\n }\n }\n menuItemCreator({ text, icon, handler }: any) {\n const node = document.createElement('div');\n node.classList.add('easy-email-table-operation-menu-item');\n\n const iconSpan = document.createElement('span');\n iconSpan.classList.add('easy-email-table-operation-menu-icon');\n iconSpan.innerHTML = icon;\n\n const textSpan = document.createElement('span');\n textSpan.classList.add('easy-email-table-operation-menu-text');\n textSpan.innerText = text;\n\n node.appendChild(iconSpan);\n node.appendChild(textSpan);\n node.addEventListener('click', handler.bind(this), false);\n return node;\n }\n}\n","import TableOperationMenu from './tableOperationMenu';\nimport {\n checkEventInBoundingRect,\n setStyle,\n getCurrentTable,\n getElementsBoundary,\n getTdBoundaryIndex,\n getBoundaryRectAndElement,\n} from './util';\nimport { AdvancedTableBlock } from '@thanhpv102/easy-email-core';\nimport { IOperationData } from './type';\n\nexport interface IBorderTool {\n top: HTMLElement;\n bottom: HTMLElement;\n left: HTMLElement;\n right: HTMLElement;\n}\n\nclass TableColumnTool {\n borderTool = {} as IBorderTool;\n dragging = false;\n showBorderTool = false;\n width = 0; // selected section width,will update by mouse move\n height = 0; // selected section height, will update by mouse move\n\n selectedLeftTopCell: Element | undefined = undefined;\n selectedBottomRightCell: Element | undefined = undefined;\n startDom: Element | undefined = undefined;\n endDom: Element | undefined = undefined;\n hoveringTable: ParentNode | null = null;\n root: Element | ShadowRoot | undefined = undefined;\n\n tableMenu?: TableOperationMenu;\n changeTableData?: (e: AdvancedTableBlock['data']['value']['tableSource']) => void;\n tableData: IOperationData[][] = [];\n\n constructor(borderTool: IBorderTool, root: Element | ShadowRoot) {\n if (!borderTool || !root) {\n return;\n }\n this.borderTool = borderTool;\n this.root = root;\n\n this.initTool();\n }\n\n initTool() {\n this.root?.addEventListener('contextmenu', this.handleContextmenu);\n this.root?.addEventListener('mousedown', this.handleMousedown.bind(this));\n document.body.addEventListener('click', this.handleBodyClick, false);\n document.addEventListener('contextmenu', this.handleDocumentContextmenu, false);\n document.addEventListener('keydown', this.hideBorderByKeyDown);\n }\n\n destroy() {\n this.root?.removeEventListener('mousedown', this.handleMousedown.bind(this));\n this.root?.removeEventListener('contextmenu', this.handleContextmenu);\n document.body.removeEventListener('click', this.handleBodyClick, false);\n document.removeEventListener('contextmenu', this.handleDocumentContextmenu, false);\n document.removeEventListener('keydown', this.hideBorderByKeyDown);\n\n this.tableMenu?.destroy();\n }\n\n hideBorder = (e: Event) => {\n if ((e.target as HTMLElement)?.id === 'VisualEditorEditMode') {\n return;\n }\n this.visibleBorder(false);\n };\n\n // Only hide the selection border on left-clicks; right-clicks should not\n // dismiss the selection (they open the context menu instead).\n handleBodyClick = (e: MouseEvent) => {\n if (e.button !== 0) return;\n this.hideBorder(e);\n };\n\n hideBorderByKeyDown = () => {\n this.visibleBorder(false);\n };\n\n hideTableMenu = (e?: Event) => {\n if ((e?.target as HTMLElement)?.id === 'VisualEditorEditMode') {\n return;\n }\n this.tableMenu?.hide();\n };\n\n handleDocumentContextmenu = (e: Event) => {\n // Hide the table menu only when right-clicking outside the editor shadow root.\n // Clicks inside the shadow root are handled by handleContextmenu on this.root,\n // which calls stopImmediatePropagation so this handler won't fire for those.\n const path = e.composedPath ? e.composedPath() : [];\n const insideRoot = path.some(el => el === this.root);\n if (!insideRoot) {\n this.tableMenu?.hide();\n }\n };\n\n visibleBorder = (show = true) => {\n if (this.showBorderTool === show) {\n return;\n }\n if (show) {\n setStyle(this.borderTool.top.parentElement, { display: 'block' });\n } else {\n setStyle(this.borderTool.top.parentElement, { display: 'none' });\n }\n this.showBorderTool = show;\n };\n\n renderBorder = () => {\n this.visibleBorder(true);\n const result = getBoundaryRectAndElement(\n this.startDom as Element,\n this.endDom as Element,\n );\n if (!result) {\n return;\n }\n const { left, top, width, height } = result.boundary;\n this.selectedLeftTopCell = result.leftTopCell;\n this.selectedBottomRightCell = result.bottomRightCell;\n\n setStyle(this.borderTool.top, {\n 'background-color': 'rgb(65, 68, 77)',\n left: `${left}px`,\n top: `${top}px`,\n width: `${Math.abs(width)}px`,\n height: '2px',\n position: 'fixed',\n 'z-index': 10,\n });\n setStyle(this.borderTool.bottom, {\n 'background-color': 'rgb(65, 68, 77)',\n left: `${left}px`,\n top: `${top + height}px`,\n width: `${Math.abs(width)}px`,\n height: '2px',\n position: 'fixed',\n 'z-index': 10,\n });\n setStyle(this.borderTool.left, {\n 'background-color': 'rgb(65, 68, 77)',\n left: `${left}px`,\n top: `${top}px`,\n width: '2px',\n height: `${Math.abs(height)}px`,\n position: 'fixed',\n 'z-index': 10,\n });\n setStyle(this.borderTool.right, {\n 'background-color': 'rgb(65, 68, 77)',\n left: `${left + width}px`,\n top: `${top}px`,\n width: '2px',\n height: `${Math.abs(height)}px`,\n position: 'fixed',\n 'z-index': 10,\n });\n };\n\n handleContextmenu = (event: Event) => {\n const mouseEvent = event as MouseEvent;\n if (this.showBorderTool) {\n const selectedBoundary = getElementsBoundary(\n this.selectedLeftTopCell as Element,\n this.selectedBottomRightCell as Element,\n );\n if (checkEventInBoundingRect(selectedBoundary, { x: mouseEvent.clientX, y: mouseEvent.clientY })) {\n event.preventDefault();\n event.stopImmediatePropagation();\n\n // Show the table operation menu here (contextmenu is the correct event).\n if (!this.tableMenu) {\n this.tableMenu = new TableOperationMenu();\n }\n this.tableMenu.setTableData(this.tableData);\n this.tableMenu.changeTableData = this.changeTableData;\n this.tableMenu.setTableIndexBoundary(\n getTdBoundaryIndex(\n this.selectedLeftTopCell as Element,\n this.selectedBottomRightCell as Element,\n ),\n );\n this.tableMenu.showMenu({ x: mouseEvent.clientX, y: mouseEvent.clientY });\n return;\n }\n }\n this.hideTableMenu();\n };\n\n handleMousedown(event: Event) {\n const mouseEvent = event as MouseEvent;\n let target: Element = event.target as Element;\n if (mouseEvent.button == 0) {\n // left button click\n while (target && target.parentNode) {\n if (\n (target.nodeName === 'TD' || target.nodeName === 'TH') &&\n target.getAttribute('data-content_editable-type') === 'rich_text'\n ) {\n this.root?.addEventListener('mousemove', this.handleDrag);\n this.root?.addEventListener('mouseup', this.handleMouseup);\n\n this.dragging = true;\n this.startDom = target;\n this.endDom = target;\n this.hoveringTable = getCurrentTable(target);\n\n this.renderBorder();\n return;\n }\n target = target.parentNode as Element;\n if (['TR', 'TABLE', 'BODY'].includes(target.nodeName)) {\n this.visibleBorder(false);\n return;\n }\n }\n } else if (mouseEvent.button == 2) {\n if (this.showBorderTool) {\n const selectedBoundary = getElementsBoundary(\n this.selectedLeftTopCell as Element,\n this.selectedBottomRightCell as Element,\n );\n // If right-clicking inside the selection, keep the border visible.\n // The context menu will be shown in handleContextmenu.\n if (checkEventInBoundingRect(selectedBoundary, { x: mouseEvent.clientX, y: mouseEvent.clientY })) {\n\n return;\n }\n }\n }\n this.visibleBorder(false);\n }\n\n handleDrag = (e: Event) => {\n e.preventDefault();\n\n if (this.dragging) {\n let target = e.target as Element;\n\n while (target && target.parentNode) {\n if (\n (target.nodeName === 'TD' || target.nodeName === 'TH') &&\n target.getAttribute('data-content_editable-type') === 'rich_text'\n ) {\n const hoveringTable = getCurrentTable(target);\n if (this.endDom === target || this.hoveringTable !== hoveringTable) {\n return;\n }\n this.endDom = target;\n this.renderBorder();\n return;\n }\n target = target.parentNode as Element;\n }\n }\n };\n\n handleMouseup = (e: Event) => {\n e.preventDefault();\n\n if (this.dragging) {\n this.dragging = false;\n this.root?.removeEventListener('mousemove', this.handleDrag);\n this.root?.removeEventListener('mouseup', this.handleMouseup);\n }\n };\n}\n\nexport default TableColumnTool;\n","import { cloneDeep } from 'lodash';\nimport React, { useEffect, useRef } from 'react';\nimport { createPortal } from 'react-dom';\nimport TableColumnTool, { IBorderTool } from './tableTool';\nimport { getShadowRoot, useBlock, useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { IAdvancedTableData, AdvancedType } from '@thanhpv102/easy-email-core';\n\nexport function TableOperation() {\n const shadowRoot = getShadowRoot();\n const { focusIdx } = useFocusIdx();\n const { focusBlock, change } = useBlock();\n const topRef = useRef<HTMLDivElement>(null);\n const bottomRef = useRef<HTMLDivElement>(null);\n const leftRef = useRef<HTMLDivElement>(null);\n const rightRef = useRef<HTMLDivElement>(null);\n const tool = useRef<TableColumnTool | null>(null);\n\n // Only show for AdvancedTable blocks\n const isAdvancedTable = focusBlock?.type === AdvancedType.TABLE;\n\n useEffect(() => {\n if (!isAdvancedTable) return;\n\n // Check if shadowRoot exists before proceeding\n if (!shadowRoot) return;\n // Use the shadow root itself as the container, not looking for a body element\n const targetContainer = shadowRoot;\n if (!targetContainer) {\n console.warn('Shadow DOM not found for TableOperation');\n return;\n }\n // Ensure all refs are available before creating the tool\n const top = topRef.current;\n const bottom = bottomRef.current;\n const left = leftRef.current;\n const right = rightRef.current;\n if (!top || !bottom || !left || !right) {\n return;\n }\n // TypeScript now knows these are non-null HTMLDivElements\n const borderTool: IBorderTool = {\n top: top as HTMLElement,\n bottom: bottom as HTMLElement,\n left: left as HTMLElement,\n right: right as HTMLElement,\n };\n tool.current = new TableColumnTool(borderTool, targetContainer);\n return () => {\n tool.current?.destroy();\n };\n }, [shadowRoot, isAdvancedTable]);\n\n useEffect(() => {\n if (!isAdvancedTable) return;\n\n if (tool.current) {\n tool.current.changeTableData = (data: IAdvancedTableData[][]) => {\n change(`${focusIdx}.data.value.tableSource`, cloneDeep(data));\n };\n tool.current.tableData = cloneDeep(focusBlock?.data?.value?.tableSource || []);\n }\n }, [focusIdx, focusBlock, change, isAdvancedTable]);\n\n // Don't render if shadowRoot is not available or not an AdvancedTable\n if (!shadowRoot || !isAdvancedTable) {\n return null;\n }\n\n return (\n <>\n {createPortal(\n <div>\n <div ref={topRef} />\n <div ref={bottomRef} />\n <div ref={leftRef} />\n <div ref={rightRef} />\n </div>,\n shadowRoot as DocumentFragment,\n )}\n </>\n );\n}\n",":global {\n .ant-select {\n font-size: 12px !important;\n }\n\n .ant-select-selector {\n height: 26px !important;\n padding: 2px 6px !important;\n font-size: 12px !important;\n }\n\n .ant-select-selection-item {\n font-size: 12px !important;\n line-height: 26px !important;\n }\n\n .ant-select-dropdown {\n font-size: 12px !important;\n }\n\n .ant-select-dropdown .ant-select-item {\n font-size: 12px !important;\n }\n\n .ant-select-dropdown .ant-select-item-option {\n font-size: 12px !important;\n padding: 6px 12px !important;\n }\n\n .ant-radio-group {\n font-size: 12px !important;\n }\n\n .ant-checkbox-group {\n font-size: 12px !important;\n }\n\n .easy-email-overlay {\n font-size: 12px !important;\n }\n\n .easy-email-overlay .ant-select-selector {\n height: 26px !important;\n padding: 2px 6px !important;\n }\n\n .easy-email-overlay .ant-select-item-option {\n font-size: 12px !important;\n padding: 6px 12px !important;\n }\n}\n\n.attributePanel {\n :global {\n .arco-form-item {\n margin-bottom: 8px !important;\n }\n\n .ant-form-item-label-content {\n font-size: 12px !important;\n }\n\n .ant-form-item-label > label {\n font-size: 12px !important;\n }\n\n .ant-form-item-label {\n padding: 0 !important;\n }\n\n .arco-form-item-label-content {\n font-size: 12px !important;\n height: 24px !important;\n line-height: 24px !important;\n }\n\n .ant-form-item-explain {\n font-size: 12px !important;\n }\n\n .arco-form-item-message {\n font-size: 12px !important;\n }\n\n .arco-input {\n font-size: 12px !important;\n height: 26px !important;\n padding: 4px 6px !important;\n line-height: 26px !important;\n }\n\n .ant-input {\n font-size: 12px !important;\n height: 26px !important;\n line-height: 26px !important;\n }\n\n input::placeholder {\n font-size: 12px !important;\n }\n\n .ant-input::placeholder {\n font-size: 12px !important;\n }\n\n textarea {\n font-size: 12px !important;\n padding: 6px 6px !important;\n line-height: 1.4 !important;\n }\n\n .arco-select {\n font-size: 12px !important;\n }\n\n .arco-select-view {\n height: 26px !important;\n padding: 4px 6px !important;\n font-size: 12px !important;\n }\n\n .arco-select-option {\n font-size: 12px !important;\n padding: 6px 12px !important;\n }\n\n .arco-select-option-content {\n font-size: 12px !important;\n }\n\n .arco-radio {\n font-size: 12px !important;\n }\n\n .arco-radio-label-text {\n font-size: 12px !important;\n }\n\n .arco-checkbox {\n font-size: 12px !important;\n }\n\n .arco-checkbox-label-text {\n font-size: 12px !important;\n }\n\n .ant-select-item {\n font-size: 12px !important;\n }\n\n .ant-select-item-option {\n font-size: 12px !important;\n padding: 6px 12px !important;\n }\n\n .ant-select-dropdown {\n font-size: 12px !important;\n }\n\n .ant-select-dropdown .ant-select-item-option {\n font-size: 12px !important;\n padding: 6px 12px !important;\n }\n\n .ant-radio {\n font-size: 12px !important;\n }\n\n .ant-radio-wrapper {\n font-size: 12px !important;\n }\n\n .ant-radio-inner {\n width: 16px !important;\n height: 16px !important;\n }\n\n .ant-checkbox {\n font-size: 12px !important;\n }\n\n .ant-checkbox-wrapper {\n font-size: 12px !important;\n }\n\n .ant-checkbox-inner {\n width: 16px !important;\n height: 16px !important;\n }\n\n .arco-btn {\n padding: 4px 8px !important;\n font-size: 12px !important;\n height: 28px !important;\n min-width: 50px !important;\n line-height: 28px !important;\n }\n\n .ant-btn {\n padding: 4px 8px !important;\n font-size: 12px !important;\n height: 28px !important;\n line-height: 28px !important;\n }\n\n .ant-btn-sm {\n padding: 4px 8px !important;\n height: 28px !important;\n font-size: 12px !important;\n line-height: 28px !important;\n }\n\n .arco-color-picker-trigger {\n height: 28px !important;\n width: 28px !important;\n }\n\n .ant-collapse-header {\n padding: 10px 16px !important;\n font-size: 13px !important;\n min-height: 32px !important;\n line-height: 32px !important;\n height: 32px !important;\n }\n\n .ant-collapse-header-text {\n font-size: 13px !important;\n line-height: 32px !important;\n }\n\n .ant-collapse-content-box {\n padding: 8px 12px !important;\n }\n\n .ant-collapse-item {\n margin-bottom: 4px !important;\n }\n\n .ant-collapse {\n border: none !important;\n }\n\n .ant-collapse-header > .ant-collapse-title {\n margin-top: -5px;\n }\n\n .ant-collapse-item > .ant-collapse-header {\n padding: 4px 8px !important;\n }\n\n .ant-collapse-item-active > .ant-collapse-header {\n }\n\n .ant-collapse-content {\n }\n\n .arco-checkbox {\n font-size: 11px !important;\n margin-right: 6px !important;\n }\n\n .arco-radio {\n font-size: 11px !important;\n margin-right: 6px !important;\n }\n\n .arco-grid-row {\n margin-bottom: 6px !important;\n }\n\n .arco-space {\n gap: 4px !important;\n }\n\n .ant-space {\n gap: 2px !important;\n }\n\n .ant-row {\n margin-bottom: 4px !important;\n }\n\n .ant-col {\n margin-bottom: 2px !important;\n }\n\n .arco-input-number {\n height: 26px !important;\n font-size: 11px !important;\n }\n\n .arco-input-number-input {\n font-size: 11px !important;\n height: 26px !important;\n padding: 4px 6px !important;\n }\n }\n}\n","import React from 'react';\nimport {\n getShadowRoot,\n TextStyle,\n useBlock,\n useEditorContext,\n useFocusIdx,\n} from '@thanhpv102/easy-email-editor';\nimport { RichTextField } from '../components/Form/RichTextField';\nimport { PresetColorsProvider } from './components/provider/PresetColorsProvider';\nimport ReactDOM from 'react-dom';\nimport { BlockAttributeConfigurationManager } from './utils/BlockAttributeConfigurationManager';\nimport { SelectionRangeProvider } from './components/provider/SelectionRangeProvider';\nimport { TableOperation } from './components/blocks/AdvancedTable/Operation';\nimport styles from './AttributePanel.module.scss';\n\nexport function AttributePanel() {\n const { focusBlock } = useBlock();\n const { initialized } = useEditorContext();\n\n const { focusIdx } = useFocusIdx();\n\n const Com = focusBlock && BlockAttributeConfigurationManager.get(focusBlock.type);\n\n const shadowRoot = getShadowRoot();\n\n if (!initialized) return null;\n\n return (\n <div className={styles.attributePanel}>\n <SelectionRangeProvider>\n <PresetColorsProvider>\n {Com ? (\n <Com />\n ) : (\n <div style={{ marginTop: 200, padding: '0 50px' }}>\n <TextStyle size='extraLarge'>No matching components</TextStyle>\n </div>\n )}\n\n <div style={{ position: 'absolute' }}>\n <RichTextField idx={focusIdx} />\n </div>\n <TableOperation />\n <>\n {shadowRoot &&\n ReactDOM.createPortal(\n <style>\n {`\n .email-block [contentEditable=\"true\"],\n .email-block [contentEditable=\"true\"] * {\n outline: none;\n cursor: text;\n }\n `}\n </style>,\n shadowRoot as DocumentFragment,\n )}\n </>\n </PresetColorsProvider>\n </SelectionRangeProvider>\n </div>\n );\n}\n","import React, { useCallback } from 'react';\r\nimport { MergeTags as MergeTagsOptions } from '@extensions/AttributePanel';\r\nimport { ToolItem } from '../ToolItem';\r\nimport { IconFont } from '@thanhpv102/easy-email-editor';\r\nimport { useRichTextPopupOpen } from '../../hooks/useRichTextPopupOpen';\r\nimport { RichTextPortalPopup } from '../RichTextPortalPopup';\r\n\r\nexport interface MergeTagsProps {\r\n execCommand: (cmd: string, value: string) => void;\r\n}\r\n\r\nexport function MergeTags(props: MergeTagsProps) {\r\n const { execCommand } = props;\r\n const { open, rect, close, handleTriggerClick, setTriggerRef, setPopupContainerRef } = useRichTextPopupOpen();\r\n\r\n const onChange = useCallback(\r\n (val: string) => {\r\n execCommand('insertHTML', val);\r\n close();\r\n },\r\n [execCommand, close],\r\n );\r\n\r\n return (\r\n <>\r\n <span ref={setTriggerRef}>\r\n <ToolItem\r\n title={t('Merge tag')}\r\n icon={<IconFont iconName=\"icon-merge-tags\" />}\r\n onClick={handleTriggerClick}\r\n />\r\n </span>\r\n <RichTextPortalPopup\r\n open={open}\r\n rect={rect}\r\n containerRef={setPopupContainerRef}\r\n placement=\"bottom\"\r\n >\r\n <MergeTagsOptions value=\"\" onChange={onChange} />\r\n </RichTextPortalPopup>\r\n </>\r\n );\r\n}\r\n","/* eslint-disable @typescript-eslint/no-unsafe-call */\nimport { useCallback, useContext } from 'react';\nimport { SelectionRangeContext } from '@extensions/AttributePanel/components/provider/SelectionRangeProvider';\nimport { getShadowRoot } from '@thanhpv102/easy-email-editor';\n\n/** Get the active Selection, preferring the ShadowRoot's own getSelection (Chrome)\n * and falling back to document.getSelection() (Firefox). */\nfunction getActiveSelection(shadowRoot: ShadowRoot): Selection | null {\n if ('getSelection' in shadowRoot) {\n return (shadowRoot as unknown as Document).getSelection();\n }\n return document.getSelection();\n}\n\nexport function useSelectionRange() {\n const { selectionRange, setSelectionRange } = useContext(\n SelectionRangeContext\n );\n\n const restoreRange = useCallback((range: Range) => {\n const shadowRoot = getShadowRoot();\n const selection = getActiveSelection(shadowRoot);\n if (!selection) return;\n // setBaseAndExtent is the most reliable way to set a selection that spans\n // nodes inside a Shadow DOM in Firefox.\n if (typeof selection.setBaseAndExtent === 'function') {\n selection.setBaseAndExtent(\n range.startContainer,\n range.startOffset,\n range.endContainer,\n range.endOffset,\n );\n } else {\n selection.removeAllRanges();\n const newRange = document.createRange();\n newRange.setStart(range.startContainer, range.startOffset);\n newRange.setEnd(range.endContainer, range.endOffset);\n selection.addRange(newRange);\n }\n }, []);\n\n const setRangeByElement = useCallback(\n (element: ChildNode) => {\n const shadowRoot = getShadowRoot();\n const selection = getActiveSelection(shadowRoot);\n if (!selection) return;\n\n const newRange = document.createRange();\n newRange.selectNode(element);\n setSelectionRange(newRange);\n\n if (typeof selection.setBaseAndExtent === 'function') {\n selection.setBaseAndExtent(\n newRange.startContainer,\n newRange.startOffset,\n newRange.endContainer,\n newRange.endOffset,\n );\n } else {\n selection.removeAllRanges();\n selection.addRange(newRange);\n }\n },\n [setSelectionRange]\n );\n\n return {\n selectionRange,\n setSelectionRange,\n restoreRange,\n setRangeByElement,\n };\n}\n","/**\n * Returns the Element at the given range position.\n * Works for both collapsed ranges (cursor) and non-collapsed (selection).\n * For a collapsed range the startContainer is used; for a non-collapsed range\n * the commonAncestorContainer is used (matching previous behaviour).\n */\nexport function getElementAtRange(range: Range): Element | null {\n const node = range.collapsed\n ? range.startContainer\n : range.commonAncestorContainer;\n\n if (node instanceof Element) return node;\n if (node.parentElement) return node.parentElement;\n return null;\n}\n\n","import { ColorPicker } from '@extensions/components/Form/ColorPicker';\nimport { IconFont } from '@thanhpv102/easy-email-editor';\nimport React, { useMemo } from 'react';\nimport { ToolItem } from '../../ToolItem';\nimport { getElementAtRange } from '../../../utils/getElementAtRange';\n\nexport function IconBgColor({ selectionRange, execCommand }: {\n selectionRange: Range | null;\n execCommand: (cmd: string, val?: string) => void;\n}) {\n\n const color = useMemo(() => {\n if (!selectionRange) return undefined;\n const el = getElementAtRange(selectionRange);\n if (!el) return undefined;\n return getComputedStyle(el).backgroundColor;\n }, [selectionRange]);\n\n return (\n <ColorPicker\n label=\"\"\n showInput={false}\n onChange={(color) => execCommand('hiliteColor', color)}\n inRichTextBar\n >\n <ToolItem\n icon={(\n <div style={{ position: 'relative' }}>\n <IconFont size={12} iconName=\"icon-bg-color\" style={{ position: 'relative', top: '-1px' }} />\n <div style={{\n borderBottom: `2px solid ${color}`,\n position: 'absolute',\n width: '130%',\n left: '-15%',\n top: 16,\n }}\n />\n </div>\n )}\n title={t('Background color')}\n />\n </ColorPicker>\n );\n}\n","import { ColorPicker } from '@extensions/components/Form/ColorPicker';\nimport { IconFont } from '@thanhpv102/easy-email-editor';\nimport React, { useMemo } from 'react';\nimport { ToolItem } from '../../ToolItem';\nimport { getElementAtRange } from '../../../utils/getElementAtRange';\n\nexport function IconFontColor({ selectionRange, execCommand }: {\n selectionRange: Range | null;\n execCommand: (cmd: string, val?: string) => void;\n}) {\n\n const color = useMemo(() => {\n if (!selectionRange) return undefined;\n const el = getElementAtRange(selectionRange);\n if (!el) return undefined;\n return getComputedStyle(el).color;\n }, [selectionRange]);\n\n return (\n <ColorPicker\n label=\"\"\n onChange={(color) => execCommand('foreColor', color)}\n showInput={false}\n inRichTextBar\n >\n <ToolItem\n icon={(\n <div style={{ position: 'relative' }}>\n <IconFont size={12} iconName=\"icon-font-color\" style={{ position: 'relative', top: '-1px' }} />\n <div style={{\n borderBottom: `2px solid ${color}`,\n position: 'absolute',\n width: '130%',\n left: '-15%',\n top: 16,\n }}\n />\n </div>\n )}\n title={t('Text color')}\n />\n </ColorPicker>\n );\n}\n","\r\nimport { IconFont, useBlock, useEditorProps, useFocusIdx } from '@thanhpv102/easy-email-editor';\r\nimport { useAddToCollection } from '@extensions/hooks/useAddToCollection';\r\nimport { getParentIdx } from '@thanhpv102/easy-email-core';\r\nimport React from 'react';\r\nimport { ToolItem } from './ToolItem';\r\n\r\nexport function BasicTools(props: { getPopupContainer?: () => HTMLElement }) {\r\n const { copyBlock, removeBlock } = useBlock();\r\n const { focusIdx, setFocusIdx } = useFocusIdx();\r\n const { modal, setModalVisible } = useAddToCollection();\r\n const { onAddCollection } = useEditorProps();\r\n\r\n const handleAddToCollection = () => {\r\n if (document.activeElement instanceof HTMLElement) {\r\n document.activeElement.blur();\r\n }\r\n setModalVisible(true);\r\n };\r\n\r\n const handleCopy = () => {\r\n if (document.activeElement instanceof HTMLElement) {\r\n document.activeElement.blur();\r\n }\r\n copyBlock(focusIdx);\r\n };\r\n\r\n const handleDelete = () => {\r\n if (document.activeElement instanceof HTMLElement) {\r\n document.activeElement.blur();\r\n }\r\n removeBlock(focusIdx);\r\n };\r\n\r\n const handleSelectParent = () => {\r\n if (document.activeElement instanceof HTMLElement) {\r\n document.activeElement.blur();\r\n }\r\n setFocusIdx(getParentIdx(focusIdx)!);\r\n };\r\n\r\n return (\r\n <div style={{ marginRight: 40 }}>\r\n <span style={{ position: 'relative', marginRight: 10, color: '#fff', fontFamily: '-apple-system, BlinkMacSystemFont, San Francisco, Segoe UI' }}>Text</span>\r\n <ToolItem\r\n onClick={handleSelectParent}\r\n title={'Select parent block'}\r\n icon={<IconFont iconName='icon-back-parent' />}\r\n getPopupContainer={props.getPopupContainer}\r\n />\r\n <ToolItem\r\n onClick={handleCopy}\r\n title={'Copy'}\r\n icon={<IconFont iconName='icon-copy' />}\r\n getPopupContainer={props.getPopupContainer}\r\n />\r\n {\r\n onAddCollection && (\r\n <ToolItem\r\n onClick={handleAddToCollection}\r\n title={'Add to collection'}\r\n icon={<IconFont iconName='icon-collection' />}\r\n getPopupContainer={props.getPopupContainer}\r\n />\r\n )\r\n }\r\n <ToolItem\r\n onClick={handleDelete}\r\n title={'Delete'}\r\n icon={<IconFont iconName='icon-delete' />}\r\n getPopupContainer={props.getPopupContainer}\r\n />\r\n {modal}\r\n </div>\r\n );\r\n}\r\n","import type { TooltipProps } from 'antd';\nimport React, { useCallback, useMemo } from 'react';\nimport { IconFont } from '@thanhpv102/easy-email-editor';\nimport { ToolItem } from '../ToolItem';\nimport { EMAIL_BLOCK_CLASS_NAME } from '@thanhpv102/easy-email-core';\n\nexport interface LinkProps extends Omit<TooltipProps, 'title'> {\n currentRange: Range | null | undefined;\n onChange: () => void;\n getPopupContainer?: () => HTMLElement;\n}\n\nfunction getAnchorElement(\n node: Node | null,\n): HTMLAnchorElement | null {\n if (!node) return null;\n if (node instanceof HTMLAnchorElement) {\n return node;\n }\n if (node instanceof Element && node.classList.contains(EMAIL_BLOCK_CLASS_NAME)) return null;\n\n return getAnchorElement(node.parentNode);\n}\n\nfunction getLinkNode(\n currentRange: Range | null | undefined,\n): HTMLAnchorElement | null {\n let linkNode: HTMLAnchorElement | null = null;\n if (!currentRange) return null;\n linkNode = getAnchorElement(currentRange.commonAncestorContainer);\n return linkNode;\n}\n\nexport function Unlink(props: LinkProps) {\n const { onChange } = props;\n const linkNode = useMemo(() => {\n return getLinkNode(props.currentRange);\n\n }, [props.currentRange]);\n\n const onUnlink = useCallback(() => {\n if (linkNode?.parentNode) {\n linkNode?.replaceWith(...linkNode.childNodes);\n onChange();\n }\n }, [linkNode, onChange]);\n\n return (\n <ToolItem title={t('Unlink')} icon={<IconFont iconName=\"icon-unlink\" />} onClick={onUnlink} getPopupContainer={props.getPopupContainer} />\n );\n}\n","import type { TooltipProps } from 'antd';\nimport React, { useCallback, useMemo } from 'react';\nimport { IconFont } from '@thanhpv102/easy-email-editor';\nimport { ToolItem } from '../ToolItem';\nimport { EMAIL_BLOCK_CLASS_NAME } from '@thanhpv102/easy-email-core';\nimport { useSelectionRange } from '@extensions/AttributePanel/hooks/useSelectionRange';\n\nexport interface LinkProps extends Omit<TooltipProps, 'title'> {\n currentRange: Range | null | undefined;\n onChange: () => void;\n getPopupContainer?: () => HTMLElement;\n}\n\nfunction getStrikeThroughNode(\n node: Node | null | undefined,\n): Element | null {\n if (!node) return null;\n if (node instanceof Element && node.classList.contains(EMAIL_BLOCK_CLASS_NAME)) return null;\n if (node instanceof Element && node.tagName.toLocaleLowerCase() === 'strike') return node;\n return getStrikeThroughNode(node.parentNode);\n}\n\nexport function StrikeThrough(props: LinkProps) {\n const { onChange } = props;\n const { setRangeByElement } = useSelectionRange();\n const node = useMemo(() => {\n return getStrikeThroughNode(props.currentRange?.commonAncestorContainer);\n\n }, [props.currentRange]);\n\n const onClick = useCallback(() => {\n if (node) {\n setRangeByElement(node);\n }\n onChange();\n }, [node, onChange, setRangeByElement]);\n\n return (\n <ToolItem\n title={t('Strikethrough')}\n isActive={Boolean(node)}\n icon={<IconFont iconName=\"icon-strikethrough\" />}\n onClick={onClick}\n getPopupContainer={props.getPopupContainer}\n />\n );\n}\n","import type { TooltipProps } from 'antd';\nimport React, { useCallback, useMemo } from 'react';\nimport { IconFont } from '@thanhpv102/easy-email-editor';\nimport { ToolItem } from '../ToolItem';\nimport { EMAIL_BLOCK_CLASS_NAME } from '@thanhpv102/easy-email-core';\nimport { useSelectionRange } from '@extensions/AttributePanel/hooks/useSelectionRange';\n\nexport interface LinkProps extends Omit<TooltipProps, 'title'> {\n currentRange: Range | null | undefined;\n onChange: () => void;\n getPopupContainer?: () => HTMLElement;\n}\n\nfunction getUnderlineNode(\n node: Node | null | undefined,\n): Element | null {\n if (!node) return null;\n if (node instanceof Element && node.classList.contains(EMAIL_BLOCK_CLASS_NAME)) return null;\n if (node instanceof Element && node.tagName.toLocaleLowerCase() === 'u') return node;\n return getUnderlineNode(node.parentNode);\n}\n\nexport function Underline(props: LinkProps) {\n const { onChange } = props;\n const { setRangeByElement } = useSelectionRange();\n const node = useMemo(() => {\n return getUnderlineNode(props.currentRange?.commonAncestorContainer);\n }, [props.currentRange]);\n\n const onClick = useCallback(() => {\n if (node) {\n setRangeByElement(node);\n }\n onChange();\n }, [node, onChange, setRangeByElement]);\n\n return (\n <ToolItem\n title={t('Underline')}\n isActive={Boolean(node)}\n icon={<IconFont iconName=\"icon-underline\" />}\n onClick={onClick}\n getPopupContainer={props.getPopupContainer}\n />\n );\n}\n","import type { TooltipProps } from 'antd';\nimport React, { useCallback, useMemo } from 'react';\nimport { IconFont } from '@thanhpv102/easy-email-editor';\nimport { ToolItem } from '../ToolItem';\nimport { EMAIL_BLOCK_CLASS_NAME } from '@thanhpv102/easy-email-core';\nimport { useSelectionRange } from '@extensions/AttributePanel/hooks/useSelectionRange';\n\nexport interface LinkProps extends Omit<TooltipProps, 'title'> {\n currentRange: Range | null | undefined;\n onChange: () => void;\n getPopupContainer?: () => HTMLElement;\n}\n\nfunction getItalicNode(\n node: Node | null | undefined,\n): Element | null {\n if (!node) return null;\n if (node instanceof Element && node.classList.contains(EMAIL_BLOCK_CLASS_NAME)) return null;\n if (node instanceof Element && node.tagName.toLocaleLowerCase() === 'i') return node;\n return getItalicNode(node.parentNode);\n}\n\nexport function Italic(props: LinkProps) {\n const { onChange } = props;\n const { setRangeByElement } = useSelectionRange();\n const node = useMemo(() => {\n return getItalicNode(props.currentRange?.commonAncestorContainer);\n\n }, [props.currentRange]);\n\n const onClick = useCallback(() => {\n if (node) {\n setRangeByElement(node);\n }\n onChange();\n }, [node, onChange, setRangeByElement]);\n\n return (\n <ToolItem\n title={t('Italic')}\n isActive={Boolean(node)}\n icon={<IconFont iconName=\"icon-italic\" />}\n onClick={onClick}\n getPopupContainer={props.getPopupContainer}\n />\n );\n}\n","import type { TooltipProps } from 'antd';\nimport React, { useCallback, useMemo } from 'react';\nimport { IconFont } from '@thanhpv102/easy-email-editor';\nimport { ToolItem } from '../ToolItem';\nimport { EMAIL_BLOCK_CLASS_NAME } from '@thanhpv102/easy-email-core';\nimport { useSelectionRange } from '@extensions/AttributePanel/hooks/useSelectionRange';\n\nexport interface LinkProps extends Omit<TooltipProps, 'title'> {\n currentRange: Range | null | undefined;\n onChange: () => void;\n getPopupContainer?: () => HTMLElement;\n}\n\nfunction getBoldNode(\n node: Node | null | undefined,\n): Element | null {\n if (!node) return null;\n if (node instanceof Element && node.classList.contains(EMAIL_BLOCK_CLASS_NAME)) return null;\n if (node instanceof Element && node.tagName.toLocaleLowerCase() === 'b') return node;\n return getBoldNode(node.parentNode);\n}\n\nexport function Bold(props: LinkProps) {\n const { onChange } = props;\n const { setRangeByElement } = useSelectionRange();\n const node = useMemo(() => {\n return getBoldNode(props.currentRange?.commonAncestorContainer);\n\n }, [props.currentRange]);\n\n const onClick = useCallback(() => {\n if (node) {\n setRangeByElement(node);\n }\n onChange();\n }, [node, onChange, setRangeByElement]);\n\n return (\n <ToolItem\n title={t('Bold')}\n isActive={Boolean(node)}\n icon={<IconFont iconName=\"icon-bold\" />}\n onClick={onClick}\n getPopupContainer={props.getPopupContainer}\n />\n );\n}\n","import React, { useCallback } from 'react';\n\nimport { ToolItem } from '../ToolItem';\nimport { IconFont } from '@thanhpv102/easy-email-editor';\nimport { useRichTextPopupOpen } from '../../hooks/useRichTextPopupOpen';\nimport { RichTextPortalPopup } from '../RichTextPortalPopup';\n\nconst list = [\n { value: '1', label: '12px' },\n { value: '2', label: '13px' },\n { value: '3', label: '16px' },\n { value: '4', label: '18px' },\n { value: '5', label: '24px' },\n { value: '6', label: '32px' },\n { value: '7', label: '48px' },\n];\n\nexport interface FontSizeProps {\n execCommand: (cmd: string, value: string) => void;\n}\n\nexport function FontSize(props: FontSizeProps) {\n const { execCommand } = props;\n const { open, rect, close, handleTriggerClick, setTriggerRef, setPopupContainerRef } = useRichTextPopupOpen();\n\n const onChange = useCallback(\n (val: string) => {\n execCommand('fontSize', val);\n close();\n },\n [execCommand, close],\n );\n\n return (\n <>\n <span ref={setTriggerRef}>\n <ToolItem\n title={t('Font size')}\n icon={<IconFont iconName=\"icon-font-color\" />}\n onClick={handleTriggerClick}\n />\n </span>\n <RichTextPortalPopup\n open={open}\n rect={rect}\n containerRef={setPopupContainerRef}\n placement=\"bottom\"\n >\n <ul\n style={{\n listStyle: 'none',\n margin: 0,\n padding: '4px 0',\n minWidth: 80,\n maxHeight: 350,\n overflowY: 'auto',\n }}\n >\n {list.map(item => (\n <li\n key={item.value}\n onClick={() => onChange(item.value)}\n style={{\n padding: '5px 12px',\n cursor: 'pointer',\n lineHeight: '22px',\n }}\n onMouseEnter={e => {\n (e.currentTarget as HTMLElement).style.backgroundColor = 'var(--color-font-item-background, #f5f5f5)';\n }}\n onMouseLeave={e => {\n (e.currentTarget as HTMLElement).style.backgroundColor = 'transparent';\n }}\n >\n {item.label}\n </li>\n ))}\n </ul>\n </RichTextPortalPopup>\n </>\n );\n}\n","import React, { useCallback, useRef } from 'react';\nimport { ToolItem } from '../ToolItem';\nimport { getLinkNode, Link, LinkParams } from '../Link';\nimport {\n AvailableTools,\n getShadowRoot,\n IconFont,\n MergeTagBadge,\n useEditorProps,\n useFocusBlockLayout,\n} from '@thanhpv102/easy-email-editor';\nimport { FontFamily } from '../FontFamily';\nimport { MergeTags } from '../MergeTags';\nimport { useSelectionRange } from '@extensions/AttributePanel/hooks/useSelectionRange';\nimport { IconBgColor } from './IconBgColor';\nimport { IconFontColor } from './IconFontColor';\nimport { BasicTools } from '../BasicTools';\nimport { Unlink } from '../Unlink';\nimport { StrikeThrough } from '../StrikeThrough';\nimport { Underline } from '../Underline';\nimport { Italic } from '../Italic';\nimport { Bold } from '../Bold';\nimport { FontSize } from '../FontSize';\nimport { RICH_TEXT_TOOL_BAR } from '@extensions/constants';\n\nexport interface ToolsProps {\n onChange: (content: string) => void;\n}\n\nexport function Tools(props: ToolsProps) {\n const { mergeTags, enabledMergeTagsBadge, toolbar } = useEditorProps();\n const { focusBlockNode } = useFocusBlockLayout();\n const { selectionRange, restoreRange, setRangeByElement } = useSelectionRange();\n const { onChange } = props;\n\n // Keep a ref so execCommand always uses the latest range, even from inside popups\n const selectionRangeRef = useRef<Range | null>(selectionRange);\n selectionRangeRef.current = selectionRange;\n\n // Keep a ref to focusBlockNode so execCommand always uses the latest value\n const focusBlockNodeRef = useRef<Element | null | undefined>(focusBlockNode);\n focusBlockNodeRef.current = focusBlockNode;\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const execCommand = useCallback(\n (cmd: string, val?: string | LinkParams) => {\n const range = selectionRangeRef.current;\n if (!range && cmd in needCheckRangeCommand) {\n console.error(t('No selectionRange'));\n return;\n }\n if (range?.commonAncestorContainer && !focusBlockNodeRef.current?.contains(range?.commonAncestorContainer) && cmd in needCheckRangeCommand) {\n console.error(t('Not commonAncestorContainer'));\n return;\n }\n\n if (range) {\n restoreRange(range);\n }\n const uuid = (+new Date()).toString();\n if (cmd === 'createLink') {\n const linkData = val as LinkParams;\n const target = linkData.blank ? '_blank' : '';\n let link: HTMLAnchorElement | null;\n if (linkData.linkNode) {\n link = linkData.linkNode;\n } else {\n document.execCommand(cmd, false, uuid);\n link = getShadowRoot().querySelector(`a[href=\"${uuid}\"`);\n }\n\n if (link) {\n if (target) {\n link.setAttribute('target', target);\n }\n link.style.color = 'inherit';\n link.style.textDecoration = linkData.underline ? 'underline' : 'none';\n link.setAttribute('href', linkData.link.trim());\n }\n } else if (cmd === 'insertHTML') {\n let newContent = val as string;\n if (enabledMergeTagsBadge) {\n newContent = MergeTagBadge.transform(newContent, uuid);\n }\n\n document.execCommand(cmd, false, newContent);\n const insertMergeTagEle = getShadowRoot().getElementById(uuid);\n if (insertMergeTagEle) {\n insertMergeTagEle.focus();\n setRangeByElement(insertMergeTagEle);\n }\n } else if (cmd === 'foreColor') {\n document.execCommand(cmd, false, val as string);\n let linkNode: HTMLAnchorElement | null = getLinkNode(range);\n if (linkNode) {\n linkNode.style.color = 'inherit';\n }\n } else {\n document.execCommand(cmd, false, val as string);\n }\n\n const contenteditableElement = getShadowRoot().activeElement;\n if (contenteditableElement?.getAttribute('contenteditable') === 'true') {\n const html = getShadowRoot().activeElement?.innerHTML || '';\n onChange(html);\n }\n },\n [\n enabledMergeTagsBadge,\n onChange,\n restoreRange,\n setRangeByElement,\n ],\n );\n\n const execCommandWithRange = useCallback(\n (cmd: string, val?: string) => {\n document.execCommand(cmd, false, val);\n const contenteditableElement = getShadowRoot().activeElement;\n if (contenteditableElement?.getAttribute('contenteditable') === 'true') {\n const html = getShadowRoot().activeElement?.innerHTML || '';\n onChange(html);\n }\n },\n [onChange],\n );\n\n const needCheckRangeCommand = [\n AvailableTools.MergeTags,\n AvailableTools.FontFamily,\n AvailableTools.FontSize,\n AvailableTools.IconFontColor,\n AvailableTools.IconBgColor,\n 'createLink',\n 'justifyLeft',\n 'justifyCenter',\n 'justifyRight',\n 'insertOrderedList',\n 'insertUnorderedList',\n 'insertHorizontalRule',\n ]\n\n const enabledTools = toolbar?.tools ?? [\n AvailableTools.MergeTags,\n AvailableTools.FontFamily,\n AvailableTools.FontSize,\n AvailableTools.Bold,\n AvailableTools.Italic,\n AvailableTools.StrikeThrough,\n AvailableTools.Underline,\n AvailableTools.IconFontColor,\n AvailableTools.IconBgColor,\n AvailableTools.Link,\n AvailableTools.Justify,\n AvailableTools.Lists,\n AvailableTools.HorizontalRule,\n AvailableTools.RemoveFormat,\n ];\n\n const tools = enabledTools.flatMap(tool => {\n switch (tool) {\n case AvailableTools.MergeTags:\n if (!mergeTags) return [];\n return [\n <MergeTags\n key={tool}\n execCommand={execCommand}\n />,\n ];\n case AvailableTools.FontFamily:\n return [\n <FontFamily\n key={tool}\n execCommand={execCommand}\n />,\n ];\n case AvailableTools.FontSize:\n return [\n <FontSize\n key={tool}\n execCommand={execCommand}\n />,\n ];\n case AvailableTools.Bold:\n return [\n <Bold\n key={tool}\n currentRange={selectionRange}\n onChange={() => execCommandWithRange('bold')}\n />,\n ];\n case AvailableTools.Italic:\n return [\n <Italic\n key={tool}\n currentRange={selectionRange}\n onChange={() => execCommandWithRange('italic')}\n />,\n ];\n case AvailableTools.StrikeThrough:\n return [\n <StrikeThrough\n key={tool}\n currentRange={selectionRange}\n onChange={() => execCommandWithRange('strikeThrough')}\n />,\n ];\n case AvailableTools.Underline:\n return [\n <Underline\n key={tool}\n currentRange={selectionRange}\n onChange={() => execCommandWithRange('underline')}\n />,\n ];\n case AvailableTools.IconFontColor:\n return [\n <IconFontColor\n key={tool}\n selectionRange={selectionRange}\n execCommand={execCommand}\n />,\n ];\n case AvailableTools.IconBgColor:\n return [\n <IconBgColor\n key={tool}\n selectionRange={selectionRange}\n execCommand={execCommand}\n />,\n ];\n case AvailableTools.Link:\n return [\n <Link\n key={`${tool}-link`}\n currentRange={selectionRange}\n onChange={values => execCommand('createLink', values)}\n />,\n <Unlink\n key={`${tool}-unlink`}\n currentRange={selectionRange}\n onChange={() => execCommand('')}\n />,\n ];\n case AvailableTools.Justify:\n return [\n <ToolItem\n key={`${tool}-justify-left`}\n onClick={() => execCommand('justifyLeft')}\n icon={<IconFont iconName=\"icon-align-left\" />}\n title={'Align left'}\n />,\n <ToolItem\n key={`${tool}-justify-center`}\n onClick={() => execCommand('justifyCenter')}\n icon={<IconFont iconName=\"icon-align-center\" />}\n title={'Align center'}\n />,\n <ToolItem\n key={`${tool}-justify-right`}\n onClick={() => execCommand('justifyRight')}\n icon={<IconFont iconName=\"icon-align-right\" />}\n title={'Align right'}\n />,\n ];\n case AvailableTools.Lists:\n return [\n <ToolItem\n key={`${tool}-ordered-list`}\n onClick={() => execCommand('insertOrderedList')}\n icon={<IconFont iconName=\"icon-list-ol\" />}\n title={'Orderlist'}\n />,\n <ToolItem\n key={`${tool}-unordered-list`}\n onClick={() => execCommand('insertUnorderedList')}\n icon={<IconFont iconName=\"icon-list-ul\" />}\n title={'Unorderlist'}\n />,\n ];\n case AvailableTools.HorizontalRule:\n return [\n <ToolItem\n key={tool}\n onClick={() => execCommand('insertHorizontalRule')}\n icon={<IconFont iconName=\"icon-line\" />}\n title={'Line'}\n />,\n ];\n case AvailableTools.RemoveFormat:\n return [\n <ToolItem\n key={tool}\n onClick={() => execCommand('removeFormat')}\n icon={<IconFont iconName=\"icon-close\" />}\n title={'Remove format'}\n />,\n ];\n default:\n console.error('Not existing tool', tool);\n throw new Error(`Not existing tool ${tool}`);\n }\n });\n\n return (\n <div\n id={RICH_TEXT_TOOL_BAR}\n style={{ display: 'flex', flexWrap: 'nowrap' }}\n >\n <>\n <div\n style={{\n display: 'flex',\n alignItems: 'center',\n }}\n >\n <BasicTools />\n {tools.map((tool, index) => {\n return (\n <React.Fragment key={index}>\n {tool}\n <div\n className=\"easy-email-extensions-divider\"\n />\n </React.Fragment>\n );\n })}\n </div>\n {toolbar?.suffix?.(execCommand)}\n </>\n </div>\n );\n}\n",".easy-email-extensions-emailToolItem {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n position: relative;\n outline: none;\n font-weight: 400;\n appearance: none;\n cursor: pointer !important;\n white-space: nowrap;\n transition: all 0.1s linear;\n box-sizing: border-box;\n border-radius: 2px;\n border: none;\n background-color: transparent;\n color: #fff;\n width: 28px;\n height: 27px;\n &:hover {\n background-color: rgba(242, 243, 245, 1);\n color: rgb(78, 89, 105);\n }\n}\n.easy-email-extensions-emailToolItem-active {\n background-color: rgba(242, 243, 245, 1);\n color: rgb(78, 89, 105);\n}\n\n.easy-email-extensions-divider {\n position: relative;\n display: inline-flex;\n width: 1px;\n height: 16px;\n background-color: rgba(128, 128, 128, 0.9);\n}\n","import React from 'react';\r\nimport { createPortal } from 'react-dom';\r\nimport { getPluginElement, RICH_TEXT_BAR_ID, useEditorContext } from '@thanhpv102/easy-email-editor';\r\nimport { Tools } from './components/Tools';\r\nimport styleText from './shadow-dom.scss?inline';\r\nimport { RICH_TEXT_POPUP_CONTAINER_ID } from '@extensions/constants';\r\n\r\nexport { RICH_TEXT_POPUP_CONTAINER_ID };\r\n\r\nexport function RichTextToolBar(props: { onChange: (s: string) => void; }) {\r\n const { initialized } = useEditorContext();\r\n const root = initialized && getPluginElement();\r\n\r\n if (!root) return null;\r\n\r\n return (\r\n <>\r\n {createPortal(\r\n <>\r\n <style dangerouslySetInnerHTML={{ __html: styleText }} />\r\n <div\r\n id={RICH_TEXT_BAR_ID}\r\n style={{\r\n transform: 'translate(0,0)',\r\n padding: '4px 8px',\r\n boxSizing: 'border-box',\r\n position: 'absolute',\r\n left: 8,\r\n top: 0,\r\n zIndex: 100,\r\n width: 'calc(100% - 16px)',\r\n }}\r\n >\r\n <div\r\n style={{\r\n position: 'absolute',\r\n backgroundColor: '#41444d',\r\n height: '100%',\r\n width: '100%',\r\n left: 0,\r\n top: 0,\r\n }}\r\n />\r\n\r\n <Tools onChange={props.onChange} />\r\n </div>\r\n <div\r\n id={RICH_TEXT_POPUP_CONTAINER_ID}\r\n style={{\r\n position: 'fixed',\r\n top: 0,\r\n left: 0,\r\n width: 0,\r\n height: 0,\r\n zIndex: 10000,\r\n overflow: 'visible',\r\n }}\r\n />\r\n </>,\r\n root\r\n )}\r\n </>\r\n );\r\n}\r\n","import {\n useEditorProps,\n MergeTagBadge,\n getEditorRoot,\n getShadowRoot,\n FIXED_CONTAINER_ID,\n RICH_TEXT_BAR_ID,\n DATA_CONTENT_EDITABLE_IDX,\n CONTENT_EDITABLE_CLASS_NAME,\n DATA_CONTENT_EDITABLE_TYPE,\n ContentEditableType,\n} from '@thanhpv102/easy-email-editor';\nimport React, { useCallback, useEffect, useState } from 'react';\nimport { InlineText, InlineTextProps } from '../InlineTextField';\nimport { RichTextToolBar } from '../RichTextToolBar';\nimport { Field, FieldRenderProps } from '@thanhpv102/easy-email-editor';\nimport { debounce } from 'lodash';\n\nexport type FieldInputProps = FieldRenderProps['input'];\n\nexport const RichTextField = (\n props: Omit<InlineTextProps, 'onChange' | 'mutators'>\n) => {\n const [contentEditableName, setContentEditableName] = useState('');\n const [contentEditableType, setContentEditableType] = useState<string | null>(\n CONTENT_EDITABLE_CLASS_NAME\n );\n\n useEffect(() => {\n const onClick = (e: MouseEvent) => {\n if (getEditorRoot()?.contains(e.target as Node)) {\n return;\n }\n const fixedContainer = document.getElementById(FIXED_CONTAINER_ID);\n if (fixedContainer?.contains(e.target as Node)) {\n return;\n }\n setContentEditableName('');\n };\n\n window.addEventListener('click', onClick);\n return () => {\n window.removeEventListener('click', onClick);\n };\n }, []);\n\n useEffect(() => {\n const root = getShadowRoot();\n if (!root) return;\n const onClick = (e: Event) => {\n const target = e.target as HTMLElement;\n\n const fixedContainer = document.getElementById(FIXED_CONTAINER_ID);\n const richTextBar = root.getElementById(RICH_TEXT_BAR_ID);\n if (fixedContainer?.contains(target) || richTextBar?.contains(target)) {\n return;\n }\n const activeElement = getShadowRoot().activeElement;\n if (!activeElement) {\n setContentEditableName('');\n } else {\n const idxName = activeElement.getAttribute(DATA_CONTENT_EDITABLE_IDX);\n const type = activeElement.getAttribute(DATA_CONTENT_EDITABLE_TYPE);\n setContentEditableType(type);\n if (idxName) {\n setContentEditableName(idxName);\n } else {\n setContentEditableName('');\n }\n }\n };\n\n root.addEventListener('click', onClick);\n return () => {\n root.removeEventListener('click', onClick);\n };\n }, []);\n\n if (!contentEditableName) return null;\n\n return (\n <>\n <Field name={contentEditableName} parse={(v) => v}>\n {({ input }) => (\n <FieldWrapper\n {...props}\n contentEditableType={contentEditableType}\n input={input}\n />\n )}\n </Field>\n </>\n );\n};\n\nfunction FieldWrapper(\n props: Omit<InlineTextProps, 'onChange'> & {\n input: FieldInputProps;\n contentEditableType: string | null;\n }\n) {\n const { input, contentEditableType, ...rest } = props;\n const { mergeTagGenerate, enabledMergeTagsBadge } = useEditorProps();\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const debounceCallbackChange = useCallback(\n debounce((val: string) => {\n if (enabledMergeTagsBadge) {\n input.onChange(MergeTagBadge.revert(val, mergeTagGenerate));\n } else {\n input.onChange(val);\n }\n\n input.onBlur();\n }, 200),\n [input]\n );\n\n return (\n <>\n {contentEditableType === ContentEditableType.RichText && (\n <RichTextToolBar onChange={debounceCallbackChange} />\n )}\n <InlineText {...rest} onChange={debounceCallbackChange} />\n </>\n );\n}\n","import {\n Input as AntdInput,\n InputNumber,\n InputNumberProps,\n Slider,\n Switch,\n SwitchProps,\n TreeSelect,\n TreeSelectProps,\n} from 'antd';\nimport type { SliderSingleProps } from 'antd/es/slider';\nimport type { TextAreaProps } from 'antd/es/input';\nimport type { SearchProps as InputSearchProps } from 'antd/es/input/Search';\nimport { ImageUploader, ImageUploaderProps } from './ImageUploader';\nimport { Select, SelectProps } from './Select';\nimport { RadioGroup, RadioGroupProps } from './RadioGroup';\nimport enhancer, { EnhancerProps } from './enhancer';\nimport { Input, InputProps } from './Input';\nimport { InputWithUnit, InputWithUnitProps } from './InputWithUnit';\nimport { CheckBoxGroup, CheckboxGroupProps } from './CheckBoxGroup';\nimport { EditTab, EditTabProps } from './EditTab';\nimport { EditGridTab, EditGridTabProps } from './EditGridTab';\nimport { AutoComplete, AutoCompleteProps } from './AutoComplete';\nimport { ColorPickerField } from './ColorPickerField';\n\nexport { RichTextField } from './RichTextField';\n\nexport const TextField = enhancer<InputProps>(Input, value => value);\n\nexport const InputWithUnitField = enhancer<InputWithUnitProps>(\n InputWithUnit,\n value => value,\n);\n\nexport const SearchField = enhancer<InputSearchProps>(AntdInput.Search, val => val);\n\nexport const TextAreaField = enhancer<TextAreaProps>(AntdInput.TextArea, val => val);\n\nexport const NumberField: React.FC<EnhancerProps & Omit<InputNumberProps, 'value' | 'onChange' | 'mutators'>> = enhancer<InputNumberProps>(InputNumber, e => e);\n\nexport const SliderField = enhancer<SliderSingleProps>(Slider, e => e);\n\nexport const ImageUploaderField = enhancer<ImageUploaderProps>(ImageUploader, url => url);\n\nexport const SelectField = enhancer<SelectProps>(Select, e => e);\n\nexport const TreeSelectField: React.FC<EnhancerProps & Omit<TreeSelectProps, 'value' | 'onChange' | 'mutators'>> = enhancer<TreeSelectProps>(TreeSelect, e => e);\n\nexport const AutoCompleteField = enhancer<AutoCompleteProps>(AutoComplete, e => e);\n\nexport const RadioGroupField = enhancer<RadioGroupProps>(RadioGroup, value => value);\n\nexport const SwitchField = enhancer<SwitchProps>(Switch, e => e);\n\nexport const CheckboxField = enhancer<CheckboxGroupProps>(CheckBoxGroup, e => e);\n\nexport const EditTabField = enhancer<EditTabProps>(EditTab, (e: unknown[]) => e);\nexport const EditGridTabField = enhancer<EditGridTabProps>(EditGridTab, (e: unknown[]) => e);\n\nexport { ColorPickerField };\n\nexport { enhancer };\n","import { Modal } from 'antd';\nimport { Form, Stack, useBlock, useEditorProps } from '@thanhpv102/easy-email-editor';\nimport React from 'react';\nimport { v4 as uuidv4 } from 'uuid';\nimport { ImageUploaderField, TextAreaField, TextField } from '../Form';\n\nexport const AddToCollection: React.FC<{\n visible: boolean;\n setVisible: (v: boolean) => void;\n}> = ({ visible, setVisible }) => {\n const { focusBlock: focusBlockData } = useBlock();\n const { onAddCollection, onUploadImage, enableAssetManager } = useEditorProps();\n\n const onSubmit = (values: {\n label: string;\n helpText: string;\n thumbnail: string;\n }) => {\n if (!values.label) return;\n const uuid = uuidv4();\n onAddCollection?.({\n label: values.label,\n helpText: values.helpText,\n data: focusBlockData!,\n thumbnail: values.thumbnail,\n id: uuid,\n });\n setVisible(false);\n };\n\n return (\n <Form\n initialValues={{ label: '', helpText: '', thumbnail: '' }}\n onSubmit={onSubmit}\n >\n {({ handleSubmit }) => (\n <Modal\n mask={{ closable: false }}\n style={{ zIndex: 2000 }}\n open={visible}\n title={'Add to collection'}\n onOk={() => handleSubmit()}\n onCancel={() => setVisible(false)}\n >\n <Stack vertical>\n <Stack.Item />\n <TextField\n label={'Title'}\n name=\"label\"\n validate={(val: string) => {\n if (!val) return 'Title required!';\n return undefined;\n }}\n />\n <TextAreaField label={'Description'} name=\"helpText\" />\n <ImageUploaderField\n label={'Thumbnail'}\n name={'thumbnail'}\n uploadHandler={onUploadImage}\n enableSelectFromLibrary={enableAssetManager}\n validate={(val: string) => {\n if (!val) return 'Thumbnail required!';\n return undefined;\n }}\n />\n </Stack>\n </Modal>\n )}\n </Form>\n );\n};\n","import { AddToCollection } from '@extensions/components/AddToCollection';\nimport React, { useMemo, useState } from 'react';\n\nexport function useAddToCollection() {\n const [modalVisible, setModalVisible] = useState(false);\n const modal = useMemo(() => <AddToCollection visible={modalVisible} setVisible={setModalVisible} />, [modalVisible]);\n\n return {\n modal,\n modalVisible,\n setModalVisible,\n };\n}","\nimport React, { useRef } from 'react';\nimport { IconFont, TextStyle, scrollBlockEleIntoView, useBlock, useEditorProps } from '@thanhpv102/easy-email-editor';\nimport { getIndexByIdx, getSiblingIdx } from '@thanhpv102/easy-email-core';\nimport styles from './index.module.scss';\nimport { IBlockDataWithId } from '../../../BlockLayer';\nimport { useAddToCollection } from '@extensions/hooks/useAddToCollection';\n\nexport function ContextMenu({\n moveBlock,\n copyBlock,\n removeBlock,\n contextMenuData,\n onClose,\n}: {\n onClose: (ev?: React.MouseEvent) => void;\n moveBlock: ReturnType<typeof useBlock>['moveBlock'];\n copyBlock: ReturnType<typeof useBlock>['copyBlock'];\n removeBlock: ReturnType<typeof useBlock>['removeBlock'];\n contextMenuData: {\n blockData: IBlockDataWithId;\n left: number;\n top: number;\n };\n}) {\n const { blockData, left, top } = contextMenuData;\n const idx = blockData.id;\n const { modal, modalVisible, setModalVisible } = useAddToCollection();\n const props = useEditorProps();\n const ref = useRef<HTMLDivElement>(null);\n\n const handleMoveUp = () => {\n moveBlock(idx, getSiblingIdx(idx, -1));\n scrollBlockEleIntoView({\n idx: getSiblingIdx(idx, -1),\n });\n onClose();\n };\n\n const handleMoveDown = () => {\n moveBlock(idx, getSiblingIdx(idx, 1));\n scrollBlockEleIntoView({\n idx: getSiblingIdx(idx, 1),\n });\n onClose();\n };\n\n const handleCopy: React.MouseEventHandler<HTMLDivElement> = (ev) => {\n copyBlock(idx);\n scrollBlockEleIntoView({\n idx: getSiblingIdx(idx, 1),\n });\n onClose();\n };\n\n const handleAddToCollection = () => {\n setModalVisible(true);\n };\n\n const handleDelete = () => {\n removeBlock(idx);\n onClose();\n };\n\n const isFirst = getIndexByIdx(idx) === 0;\n\n return (\n <div ref={ref} style={{ visibility: modalVisible ? 'hidden' : undefined }}>\n <div\n style={{\n left: left,\n top: top,\n }}\n className={styles.wrap}\n onClick={(e) => e.stopPropagation()}\n >\n {!isFirst && (\n <div className={styles.listItem} onClick={handleMoveUp}>\n <IconFont iconName='icon-top' style={{ marginRight: 10 }} />{' '}\n <TextStyle>{'Move up'}</TextStyle>\n </div>\n )}\n <div className={styles.listItem} onClick={handleMoveDown}>\n <IconFont iconName='icon-bottom' style={{ marginRight: 10 }} />{' '}\n <TextStyle>{'Move down'}</TextStyle>\n </div>\n <div className={styles.listItem} onClick={handleCopy}>\n <IconFont iconName='icon-copy' style={{ marginRight: 10 }} />{' '}\n <TextStyle>{'Copy'}</TextStyle>\n </div>\n {props.onAddCollection && (\n <div className={styles.listItem} onClick={handleAddToCollection}>\n <IconFont iconName='icon-start' style={{ marginRight: 10 }} />{' '}\n <TextStyle>Add to collection</TextStyle>\n </div>\n )}\n <div className={styles.listItem} onClick={handleDelete}>\n <IconFont iconName='icon-delete' style={{ marginRight: 10 }} />{' '}\n <TextStyle>{'Delete'}</TextStyle>\n </div>\n </div>\n <div\n className={styles.contextmenuMark}\n onClick={onClose}\n onContextMenu={(e) => {\n e.preventDefault();\n onClose(e);\n }}\n />\n {modal}\n </div>\n );\n}\n","import { getParentIdx, getIndexByIdx, BlockManager, getNodeIdxFromClassName } from '@thanhpv102/easy-email-core';\r\nimport { useCallback, useEffect, useState } from 'react';\r\nimport {\r\n getBlockNodeByChildEle,\r\n getDirectionPosition,\r\n useEditorContext,\r\n useDataTransfer,\r\n useHoverIdx,\r\n useRefState,\r\n} from '@thanhpv102/easy-email-editor';\r\nimport { debounce, get } from 'lodash';\r\nimport { IBlockDataWithId } from '..';\r\nimport { BlockTreeProps } from '../components/BlockTree';\r\n\r\nexport function useAvatarWrapperDrop() {\r\n const [blockLayerRef, setBlockLayerRef] = useState<HTMLElement | null>(null);\r\n\r\n const { setHoverIdx, setDirection } = useHoverIdx();\r\n const { dataTransfer, setDataTransfer } = useDataTransfer();\r\n const {\r\n formState: { values },\r\n } = useEditorContext();\r\n\r\n const valuesRef = useRefState(values);\r\n const dataTransferRef = useRefState(dataTransfer);\r\n\r\n function isKeyObject(o: any): o is {\r\n key: string;\r\n } {\r\n return o.key !== undefined;\r\n }\r\n\r\n const removeHightLightClassName = useCallback(() => {\r\n if (!blockLayerRef) return;\r\n blockLayerRef\r\n .querySelectorAll(\r\n '.arco-tree-node-title-gap-top, .arco-tree-node-title-gap-bottom, .arco-tree-node-title-highlight'\r\n )\r\n .forEach((item) => {\r\n item.classList.remove(\r\n 'arco-tree-node-title-gap-top',\r\n 'arco-tree-node-title-gap-bottom',\r\n 'arco-tree-node-title-highlight'\r\n );\r\n });\r\n }, [blockLayerRef]);\r\n\r\n const allowDrop: BlockTreeProps<IBlockDataWithId>['allowDrop'] = useCallback(\r\n (params) => {\r\n const { dragNode, dropNode, dropPosition } = params;\r\n let dragType;\r\n if (isKeyObject(dragNode)) {\r\n const blockData = get(valuesRef.current, dragNode.key);\r\n if (!blockData) return false;\r\n dragType = blockData.type;\r\n } else {\r\n dragType = dragNode.type;\r\n }\r\n const dragBlock = BlockManager.getBlockByType(dragType);\r\n if (!dragBlock) return false;\r\n\r\n if (dropPosition === 0) {\r\n if (\r\n BlockManager.getAutoCompletePath(\r\n dragBlock.type,\r\n dropNode.dataRef.type\r\n ) &&\r\n dropNode.dataRef.children.length === 0\r\n ) {\r\n return {\r\n position: 0,\r\n key: dropNode.key,\r\n };\r\n } else if (\r\n dropNode.parent &&\r\n dragBlock.validParentType.includes(dropNode.parent.type)\r\n ) {\r\n // drop to next sibling\r\n return {\r\n position: -1,\r\n key: dropNode.key,\r\n };\r\n }\r\n } else {\r\n if (\r\n dropNode.parent &&\r\n dragBlock.validParentType.includes(dropNode.parent.type)\r\n ) {\r\n return {\r\n position: dropPosition,\r\n key: dropNode.key,\r\n };\r\n }\r\n }\r\n setDirection('');\r\n setHoverIdx('');\r\n return false;\r\n },\r\n [setDirection, setHoverIdx, valuesRef]\r\n );\r\n\r\n useEffect(() => {\r\n if (blockLayerRef) {\r\n const onDragOver = debounce((ev: DragEvent) => {\r\n if (!dataTransferRef.current) return;\r\n\r\n const blockNode = getBlockNodeByChildEle(ev.target as HTMLDivElement);\r\n if (!blockNode || !ev.target) return;\r\n\r\n const directionPosition = getDirectionPosition(ev, 5);\r\n const treeNodeEle = blockNode.parentNode?.parentNode\r\n ?.parentNode as HTMLElement;\r\n\r\n if (!treeNodeEle) return;\r\n\r\n removeHightLightClassName();\r\n\r\n const dropIdx = getNodeIdxFromClassName(blockNode.classList)!;\r\n if (!dropIdx) return;\r\n const dropParentIdx = getParentIdx(dropIdx);\r\n\r\n const dropBlockData = get(valuesRef.current, dropIdx);\r\n const dropParentBlockData = dropParentIdx\r\n ? get(valuesRef.current, dropParentIdx)\r\n : null;\r\n\r\n let dropPosition = 0;\r\n if (\r\n directionPosition.vertical.direction === 'top' &&\r\n directionPosition.vertical.isEdge\r\n ) {\r\n dropPosition = -1;\r\n } else if (\r\n directionPosition.vertical.direction === 'bottom' &&\r\n directionPosition.vertical.isEdge\r\n ) {\r\n dropPosition = 1;\r\n }\r\n const dropResult = allowDrop({\r\n dragNode: {\r\n type: dataTransferRef.current.type,\r\n },\r\n dropNode: {\r\n dataRef: dropBlockData,\r\n key: dropIdx,\r\n parent: dropParentBlockData,\r\n },\r\n dropPosition,\r\n });\r\n if (!dropResult) return;\r\n\r\n const node = document.querySelector(\r\n `[data-tree-idx=\"${dropResult.key}\"]`\r\n )?.parentNode?.parentNode;\r\n if (node instanceof HTMLElement) {\r\n removeHightLightClassName();\r\n node.classList.add('arco-tree-node-title-gap-bottom');\r\n }\r\n setDirection(getDirectionFormDropPosition(dropResult.position));\r\n setHoverIdx(dropResult.key);\r\n\r\n if (dropResult.position === -1) {\r\n treeNodeEle.classList.add('arco-tree-node-title-gap-top');\r\n setDataTransfer((dataTransfer: any) => {\r\n return {\r\n ...dataTransfer,\r\n parentIdx: dropParentIdx,\r\n positionIndex: getIndexByIdx(dropIdx),\r\n };\r\n });\r\n } else if (dropResult.position === 1) {\r\n setDataTransfer((dataTransfer: any) => {\r\n return {\r\n ...dataTransfer,\r\n parentIdx: dropParentIdx,\r\n positionIndex: getIndexByIdx(dropIdx) + 1,\r\n };\r\n });\r\n treeNodeEle.classList.add('arco-tree-node-title-gap-bottom');\r\n } else {\r\n treeNodeEle.classList.add('arco-tree-node-title-highlight');\r\n setDataTransfer((dataTransfer: any) => {\r\n return {\r\n ...dataTransfer,\r\n parentIdx: dropIdx,\r\n positionIndex: 0,\r\n };\r\n });\r\n }\r\n });\r\n\r\n const onDragend = (ev: DragEvent) => {\r\n removeHightLightClassName();\r\n };\r\n\r\n const onDrop = (ev: DragEvent) => {\r\n setTimeout(() => {\r\n removeHightLightClassName();\r\n }, 0);\r\n };\r\n\r\n blockLayerRef.addEventListener('dragover', onDragOver);\r\n blockLayerRef.addEventListener('drop', onDrop);\r\n blockLayerRef.addEventListener('dragleave', onDragend);\r\n\r\n return () => {\r\n blockLayerRef.removeEventListener('dragover', onDragOver);\r\n blockLayerRef.removeEventListener('drop', onDrop);\r\n blockLayerRef.removeEventListener('dragleave', onDragend);\r\n };\r\n }\r\n }, [\r\n blockLayerRef,\r\n dataTransferRef,\r\n valuesRef,\r\n removeHightLightClassName,\r\n allowDrop,\r\n setDirection,\r\n setHoverIdx,\r\n setDataTransfer,\r\n ]);\r\n\r\n return {\r\n setBlockLayerRef,\r\n blockLayerRef,\r\n allowDrop,\r\n removeHightLightClassName,\r\n };\r\n}\r\n\r\nexport function getDirectionFormDropPosition(position: number) {\r\n if (position === -1) return 'top';\r\n if (position === 1) return 'bottom';\r\n return '';\r\n}\r\n","import { BasicType, AdvancedType } from '@thanhpv102/easy-email-core';\nimport { get } from 'lodash';\n\nlet iconsMap = {\n [BasicType.TEXT]: 'icon-text',\n [BasicType.SECTION]: 'icon-section',\n [BasicType.COLUMN]: 'icon-column',\n [BasicType.DIVIDER]: 'icon-divider',\n [BasicType.IMAGE]: 'icon-img',\n [BasicType.BUTTON]: 'icon-button',\n [BasicType.GROUP]: 'icon-group',\n [BasicType.PAGE]: 'icon-page',\n [BasicType.WRAPPER]: 'icon-wrapper',\n [BasicType.NAVBAR]: 'icon-navbar',\n [BasicType.HERO]: 'icon-hero',\n [BasicType.SPACER]: 'icon-spacing',\n [BasicType.SOCIAL]: 'icon-social',\n [BasicType.CAROUSEL]: 'icon-carousel',\n [BasicType.ACCORDION]: 'icon-accordion',\n\n [AdvancedType.TEXT]: 'icon-text',\n [AdvancedType.DIVIDER]: 'icon-divider',\n [AdvancedType.IMAGE]: 'icon-img',\n [AdvancedType.BUTTON]: 'icon-button',\n [AdvancedType.NAVBAR]: 'icon-navbar',\n [AdvancedType.SPACER]: 'icon-spacing',\n [AdvancedType.SOCIAL]: 'icon-social',\n [AdvancedType.CAROUSEL]: 'icon-carousel',\n [AdvancedType.ACCORDION]: 'icon-accordion',\n\n [AdvancedType.WRAPPER]: 'icon-wrapper',\n [AdvancedType.SECTION]: 'icon-section',\n [AdvancedType.COLUMN]: 'icon-column',\n [AdvancedType.GROUP]: 'icon-group',\n [AdvancedType.HERO]: 'icon-hero',\n};\n\nexport function getIconNameByBlockType(type: string) {\n return get(iconsMap, type) || 'icon-number';\n}\n\nexport function setIconsMap(map: Record<string, string>) {\n iconsMap = {...iconsMap, ...map};\n}\n","import { BlockManager, IBlockData, BasicType } from '@thanhpv102/easy-email-core';\r\n\r\nconst tempEle = document.createElement('div');\r\nexport function getBlockTitle(\r\n blockData: IBlockData,\r\n isFromContent = true\r\n): string {\r\n if (blockData.title) return blockData.title;\r\n\r\n if (\r\n isFromContent &&\r\n (blockData.type === BasicType.TEXT.toString() || blockData.type === BasicType.BUTTON.toString())\r\n ) {\r\n tempEle.innerHTML = blockData.data.value.content;\r\n return tempEle.innerText;\r\n }\r\n\r\n const blockName = BlockManager.getBlockByType(blockData.type)?.name || '';\r\n return blockName;\r\n}\r\n","import React, { useCallback, useMemo, useState, useRef } from 'react';\nimport {\n DATA_ATTRIBUTE_DROP_CONTAINER,\n IconFont,\n scrollBlockEleIntoView,\n TextStyle,\n useBlock,\n useEditorContext,\n useFocusIdx,\n useHoverIdx,\n useRefState,\n} from '@thanhpv102/easy-email-editor';\nimport {\n BasicType,\n BlockManager,\n getChildIdx,\n getIndexByIdx,\n getNodeIdxClassName,\n getPageIdx,\n getParentIdx,\n IBlockData,\n} from '@thanhpv102/easy-email-core';\nimport styles from './index.module.scss';\nimport { cloneDeep, get, isString, isEqual } from 'lodash';\nimport { EyeIcon } from './components/EyeIcon';\nimport { BlockTree, BlockTreeProps } from './components/BlockTree';\nimport { ContextMenu } from './components/ContextMenu';\nimport { classnames } from '@extensions/utils/classnames';\nimport { getDirectionFormDropPosition, useAvatarWrapperDrop } from './hooks/useAvatarWrapperDrop';\nimport { getIconNameByBlockType } from '@extensions/utils/getIconNameByBlockType';\nimport { Space } from 'antd';\nimport { getBlockTitle } from '@extensions/utils/getBlockTitle';\n\nexport interface IBlockDataWithId extends IBlockData {\n id: string;\n icon?: React.ReactElement;\n parent: IBlockDataWithId | null;\n children: IBlockDataWithId[];\n className?: string;\n}\nexport interface BlockLayerProps {\n renderTitle?: (block: IBlockDataWithId) => React.ReactNode;\n}\n\nexport function BlockLayer(props: BlockLayerProps) {\n const { pageData } = useEditorContext();\n const { renderTitle: propsRenderTitle } = props;\n const { focusIdx, setFocusIdx } = useFocusIdx();\n const { setHoverIdx, setIsDragging, setDirection } = useHoverIdx();\n const { moveBlock, setValueByIdx, copyBlock, removeBlock, values } = useBlock();\n\n const { setBlockLayerRef, allowDrop, removeHightLightClassName } =\n useAvatarWrapperDrop();\n\n const valueRef = useRefState(values);\n\n const [contextMenuData, setContextMenuData] = useState<{\n blockData: IBlockDataWithId;\n left: number;\n top: number;\n } | null>(null);\n\n const onToggleVisible = useCallback(\n ({ id }: IBlockDataWithId, e: React.MouseEvent) => {\n e.stopPropagation();\n const blockData = get(valueRef.current, id) as IBlockData | null;\n\n if (blockData) {\n blockData.data.hidden = !Boolean(blockData.data.hidden);\n setValueByIdx(id, blockData);\n }\n },\n [setValueByIdx, valueRef],\n );\n\n const renderTitle = useCallback(\n (data: IBlockDataWithId) => {\n const isPage = data.type === BasicType.PAGE.toString();\n const title = propsRenderTitle ? propsRenderTitle(data) : getBlockTitle(data);\n return (\n <div\n data-tree-idx={data.id}\n className={classnames(\n styles.title,\n !isPage && getNodeIdxClassName(data.id),\n !isPage && 'email-block',\n )}\n >\n <Space\n align='center'\n size='small'\n >\n <IconFont\n iconName={getIconNameByBlockType(data.type)}\n style={{ fontSize: 12, color: '#999' }}\n />\n <div\n title={isString(title) ? title : ''}\n style={{\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n width: '5em',\n textOverflow: 'ellipsis',\n }}\n >\n <TextStyle size='smallest'>{title}</TextStyle>\n </div>\n </Space>\n <div className={styles.eyeIcon}>\n <EyeIcon\n blockData={data}\n onToggleVisible={onToggleVisible}\n />\n </div>\n </div>\n );\n },\n [onToggleVisible, propsRenderTitle],\n );\n\n const treeData = useMemo(() => {\n const copyData = cloneDeep(pageData) as IBlockDataWithId;\n const loop = (\n item: IBlockDataWithId,\n id: string,\n parent: IBlockDataWithId | null,\n ) => {\n item.id = id;\n item.parent = parent;\n item.children.map((child, index) => loop(child, getChildIdx(id, index), item));\n };\n\n loop(copyData, getPageIdx(), null);\n\n return [copyData];\n }, [pageData]);\n\n const onSelect = useCallback(\n (selectedId: string) => {\n setFocusIdx(selectedId);\n setTimeout(() => {\n scrollBlockEleIntoView({ idx: selectedId });\n }, 50);\n },\n [setFocusIdx],\n );\n\n const onContextMenu = useCallback(\n (blockData: IBlockDataWithId, ev: React.MouseEvent) => {\n ev.preventDefault();\n setContextMenuData({ blockData, left: ev.clientX, top: ev.clientY });\n },\n [],\n );\n\n const onCloseContextMenu = useCallback(() => {\n setContextMenuData(null);\n }, []);\n\n const onMouseEnter = useCallback(\n (id: string) => {\n setHoverIdx(id);\n },\n [setHoverIdx],\n );\n\n const onMouseLeave = useCallback(() => {\n setHoverIdx('');\n }, [setHoverIdx]);\n\n const onDragStart = useCallback(() => {\n setIsDragging(true);\n }, [setIsDragging]);\n\n const onDragEnd = useCallback(() => {\n setIsDragging(false);\n }, [setIsDragging]);\n\n const onDrop: BlockTreeProps<IBlockDataWithId>['onDrop'] = useCallback(\n params => {\n const { dragNode, dropNode, dropPosition } = params;\n const dragBlock = BlockManager.getBlockByType(dragNode.dataRef.type);\n if (!dragBlock) return false;\n const dropIndex = getIndexByIdx(dropNode.key);\n\n if (dropPosition === 0) {\n if (\n dragBlock.validParentType.includes(dropNode.dataRef.type) &&\n dropNode.dataRef.children.length === 0\n ) {\n moveBlock(dragNode.key, getChildIdx(dropNode.key, 0));\n } else if (\n dropNode.parent &&\n dragBlock.validParentType.includes(dropNode.parent.type)\n ) {\n // drop to parent\n moveBlock(dragNode.key, getChildIdx(dropNode.parentKey, dropIndex));\n }\n } else {\n moveBlock(\n dragNode.key,\n getChildIdx(dropNode.parentKey, dropPosition > 0 ? dropIndex + 1 : dropIndex),\n );\n }\n },\n [moveBlock],\n );\n\n const lastDropResultRef = useRef<ReturnType<typeof allowDrop>>(false);\n\n const blockTreeAllowDrop: BlockTreeProps<IBlockDataWithId>['allowDrop'] = useCallback(\n (data) => {\n const dropResult = allowDrop(data);\n if (isEqual(lastDropResultRef.current, dropResult)) {\n return dropResult;\n }\n lastDropResultRef.current = dropResult;\n if (dropResult) {\n setIsDragging(true); // Auto-set isDragging when drag is valid\n const node = document.querySelector(`[data-tree-idx=\"${dropResult.key}\"]`)\n ?.parentNode?.parentNode;\n if (node instanceof HTMLElement) {\n removeHightLightClassName();\n node.classList.add('arco-tree-node-title-gap-bottom');\n }\n setDirection(getDirectionFormDropPosition(dropResult.position));\n setHoverIdx(dropResult.key);\n } else {\n setIsDragging(false); // Clear isDragging when drag is invalid\n }\n\n return dropResult;\n },\n [allowDrop, removeHightLightClassName, setDirection, setHoverIdx, setIsDragging],\n );\n\n const selectedKeys = useMemo(() => {\n if (!focusIdx) return [];\n\n return [focusIdx];\n }, [focusIdx]);\n\n const expandedKeys = useMemo(() => {\n if (!focusIdx) return [];\n let currentIdx = getParentIdx(focusIdx);\n const keys: string[] = [];\n while (currentIdx) {\n keys.push(currentIdx);\n currentIdx = getParentIdx(currentIdx);\n }\n return keys;\n }, [focusIdx]);\n\n return (\n <div\n ref={setBlockLayerRef}\n id='BlockLayerManager'\n {...{\n [DATA_ATTRIBUTE_DROP_CONTAINER]: 'true',\n }}\n >\n <BlockTree<IBlockDataWithId>\n selectedKeys={selectedKeys}\n expandedKeys={expandedKeys}\n defaultExpandAll\n treeData={treeData}\n renderTitle={renderTitle}\n allowDrop={blockTreeAllowDrop}\n onContextMenu={onContextMenu}\n onDrop={onDrop}\n onDragStart={onDragStart}\n onDragEnd={onDragEnd}\n onSelect={onSelect}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n />\n {contextMenuData && (\n <ContextMenu\n onClose={onCloseContextMenu}\n moveBlock={moveBlock}\n copyBlock={copyBlock}\n removeBlock={removeBlock}\n contextMenuData={contextMenuData}\n />\n )}\n </div>\n );\n}\n",".BlocksPanel {\n img {\n max-width: 100%;\n }\n\n :global {\n .ant-tooltip {\n z-index: 10000 !important;\n }\n\n .ant-tooltip-inner {\n z-index: 10000 !important;\n }\n }\n}\n.blockItem {\n text-align: center;\n padding: 3px 12px;\n border-radius: 15px;\n min-width: 60px;\n}\n\n.closeBtn {\n width: 30px;\n height: 30px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 50%;\n &:hover {\n background-color: #f7f8f8;\n }\n}\n","import { IBlockData } from '@thanhpv102/easy-email-core';\n\nexport interface BlockMarketCategory {\n name: string;\n title: string;\n blocks: {\n type: string;\n title: string;\n description?: React.ReactNode;\n thumbnail?: string;\n payload?: IBlockData;\n component: () => React.ReactElement | null;\n }[];\n}\n\nexport class BlockMarketManager {\n private static category: BlockMarketCategory[] = [];\n private static subscriptHandles: Array<(category: BlockMarketCategory[]) => void> = [];\n\n public static subscribe(fn: (category: BlockMarketCategory[]) => void) {\n return this.subscriptHandles.push(fn);\n }\n\n public static unsubscribe(fn: (category: BlockMarketCategory[]) => void) {\n return this.subscriptHandles = this.subscriptHandles.filter(item => item === fn);\n }\n\n public static notify() {\n this.subscriptHandles.forEach(fn => fn(this.category));\n }\n\n public static getCategory(name: string) {\n return this.category.find((item) => item.name === name);\n }\n\n public static getCategories() {\n return this.category;\n }\n\n public static addCategories(list: BlockMarketCategory[]) {\n list.forEach(item => {\n const index = this.category.findIndex((c) => c.name === item.name);\n if (index !== -1) {\n this.category.splice(index, 1);\n }\n\n this.category.push(item);\n });\n this.notify();\n }\n\n public static addCategory(\n name: string,\n title: string,\n blocks: {\n type: string;\n title: string;\n description?: React.ReactNode;\n component: () => React.ReactElement | null;\n }[]\n ) {\n const index = this.category.findIndex((item) => item.name === name);\n if (index !== -1) {\n this.category.splice(index, 1);\n }\n\n this.category.push({\n name,\n title,\n blocks,\n });\n\n this.notify();\n }\n\n public static removeCategories(list: BlockMarketCategory[]) {\n list.forEach(item => {\n this.category = this.category.filter((c) => c.name !== item.name);\n });\n this.notify();\n }\n\n public static removeCategory(name: string) {\n this.category = this.category.filter((item) => item.name !== name);\n this.notify();\n }\n}\n",".mask {\n width: 270px;\n display:flex;\n justify-content: flex-end;\n align-items: center;\n cursor: default;\n position: relative;\n transition: all .3s;\n pointer-events: auto;\n}\n.drag {\n background-color: rgba(0,0,0,0.65);\n}","import { IconFont, BlockAvatarWrapper } from '@thanhpv102/easy-email-editor';\nimport React, { useCallback, useEffect, useRef } from 'react';\nimport { BlockType } from '@thanhpv102/easy-email-core';\nimport styles from './index.module.scss';\n\nexport const BlockMaskWrapper: React.FC<{\n type: BlockType | string;\n payload: any;\n children: React.ReactNode | React.ReactElement;\n}> = props => {\n const ref = useRef<HTMLDivElement>(null);\n const dragRef = useRef<HTMLDivElement>(null);\n const { type, payload } = props;\n\n const onMouseDown = useCallback(() => {\n if (ref.current) {\n ref.current.classList.add(styles.drag);\n }\n }, []);\n\n const onMaskMouseDown: React.MouseEventHandler<HTMLDivElement> = useCallback(ev => {\n if (!dragRef.current || !dragRef.current.contains(ev.target as HTMLElement)) {\n ev.preventDefault();\n ev.stopPropagation();\n }\n }, []);\n\n useEffect(() => {\n const mouseup = () => {\n if (ref.current) {\n ref.current.classList.remove(styles.drag);\n }\n };\n document.addEventListener('mouseup', mouseup);\n return () => {\n document.removeEventListener('mouseup', mouseup);\n };\n }, []);\n\n return (\n <div style={{ position: 'relative' }}>\n {props.children}\n <div\n className={styles.wrapper}\n style={{\n position: 'absolute',\n height: '100%',\n transform: 'translate(32px)',\n top: 0,\n right: 0,\n display: 'flex',\n justifyContent: 'flex-end',\n }}\n >\n <BlockAvatarWrapper\n type={type}\n payload={payload}\n >\n <div\n ref={ref}\n className={styles.mask}\n onMouseDown={onMaskMouseDown}\n >\n <div\n ref={dragRef}\n style={{\n position: 'relative',\n zIndex: 10,\n }}\n onMouseDown={onMouseDown}\n >\n <IconFont\n iconName='icon-drag'\n style={{ fontSize: 25, lineHeight: '25px', cursor: 'grab' }}\n />\n </div>\n </div>\n </BlockAvatarWrapper>\n </div>\n </div>\n );\n};\n","import React from 'react';\nimport { Stack } from '@thanhpv102/easy-email-editor';\nimport { AdvancedType } from '@thanhpv102/easy-email-core';\n\nimport { BlockMaskWrapper } from '@extensions/ShortcutToolbar/components/BlockMaskWrapper';\n\nconst fontList = [48, 32, 27, 24, 18, 16, 14];\n\nexport function TextBlockItem() {\n return (\n <Stack.Item fill>\n <Stack vertical>\n {fontList.map((item, index) => {\n return (\n <Stack.Item fill key={index}>\n <BlockMaskWrapper\n type={AdvancedType.TEXT}\n payload={{\n attributes: {\n 'font-size': item + 'px',\n padding: '0px 0px 0px 0px'\n },\n data: {\n value: {\n content: item + 'px',\n },\n },\n }}\n >\n <div style={{ fontSize: item, width: '100%', paddingLeft: 20 }}>\n {item}px\n </div>\n </BlockMaskWrapper>\n </Stack.Item>\n );\n })}\n </Stack>\n </Stack.Item>\n );\n}\n","import React, { useEffect, useState } from 'react';\n\ninterface IPictureProps\n extends React.DetailedHTMLProps<\n React.HTMLAttributes<HTMLImageElement>,\n HTMLElement\n > {\n src: string;\n className?: string;\n}\n\nconst skeletonKeyframes = `\n@keyframes easy-email-skeleton-shimmer {\n 0% { background-position: -400px 0; }\n 100% { background-position: 400px 0; }\n}\n`;\n\nlet skeletonStyleInjected = false;\nfunction injectSkeletonStyle() {\n if (skeletonStyleInjected) return;\n skeletonStyleInjected = true;\n const style = document.createElement('style');\n style.textContent = skeletonKeyframes;\n document.head.appendChild(style);\n}\n\nexport function Picture(props: IPictureProps) {\n const [url, setUrl] = useState(props.src);\n const [loaded, setLoaded] = useState(false);\n\n useEffect(() => {\n injectSkeletonStyle();\n }, []);\n\n useEffect(() => {\n setUrl(props.src);\n setLoaded(false);\n }, [props.src]);\n\n const { width, height, borderRadius, padding, ...restStyle } = props.style || {};\n\n return (\n <picture\n {...{ ...props }}\n {...{\n src: undefined,\n style: {\n display: 'inline-block',\n width: width,\n height: height,\n borderRadius: borderRadius,\n padding: padding,\n overflow: borderRadius ? 'hidden' : undefined,\n position: 'relative',\n ...restStyle,\n },\n }}\n >\n {!loaded && (\n <span\n style={{\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n background: 'linear-gradient(70deg, var(--color-loading-gray-1, #2a2a2a) 25%, var(--color-loading-gray-2, #5a5a5a) 50%, var(--color-loading-gray-1, #2a2a2a) 75%)',\n backgroundSize: '800px 100%',\n animation: 'easy-email-skeleton-shimmer 1.4s infinite linear',\n borderRadius: borderRadius,\n display: 'block',\n zIndex: 1,\n }}\n />\n )}\n <source\n srcSet={url}\n />\n <img\n style={{\n width: width || '100%',\n height: height || '100%',\n maxWidth: '100%',\n maxHeight: '100%',\n display: 'block',\n opacity: loaded ? 1 : 0,\n transition: 'opacity 0.2s ease',\n }}\n src={url}\n alt=''\n onLoad={() => setLoaded(true)}\n />\n </picture>\n );\n}\n","import { ImageManager } from '@thanhpv102/easy-email-core';\n\nconst defaultImagesMap = {\n IMAGE_08:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/0046b247-3647-491f-afe1-cb0dd2a3c21c-ef84b752-f827-4546-89bf-6b63dfb67a4d.png',\n IMAGE_09:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/be34fb18-32ad-441c-84d8-3c0e9ba9f742-ad2ea5ff-5d0b-446b-bd7d-8e2ab5afdd16.png',\n IMAGE_10:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/6a1e6292-469e-452a-bbae-44e4b5ff7463-05e543b6-c951-44ce-ae27-ca1282c77f52.png',\n IMAGE_11:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/39b25f35-7ca9-4264-8502-41f430f89cf5-bcdc91c2-da3c-4fef-99c0-62b77c5a0f1f.png',\n IMAGE_12:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/eaa83007-f6f5-47d9-acbe-bb98065eaf20-b7c46090-73bd-4d4b-bd31-2368f7b4064f.png',\n IMAGE_13:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/9dec87bb-0a6d-429f-ac23-0ee636e6428d-219dee7e-85bb-4fba-9bf3-e98762e80409.png',\n IMAGE_14:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/d285da5e-b0c0-4895-84ac-42f83b4d603b-64042d20-be6a-45de-819c-8312f778a38d.png',\n IMAGE_15:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/f69f48af-5b15-40aa-91c4-81d601d1357b-083dc99d-02a6-40d9-ae28-0662bd078b5d.png',\n IMAGE_16:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/9cce6b16-5a98-4ddb-b1a1-6cec2cf56891-c3acb856-8ab8-4cfb-93f9-2a0747678b8b.png',\n IMAGE_17:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/d9795c1d-fa32-4adb-ab25-30b7cfe87936-df21314f-6f05-4550-80b3-9ab1107e8fbe.png',\n IMAGE_18:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/82f6f893-43ed-4f3d-9a17-4740bda844de-3318b36c-199d-46fe-96b8-38d1f17ef0c1.png',\n IMAGE_19:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/f1ece227-e050-4751-b064-aaeeabd5bfde-d459e9a2-b192-417b-8a77-2297b29e814e.png',\n IMAGE_20:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/585b48f6-ee7c-4d1a-8619-4d2edea09be6-07113335-5d19-464a-adef-2be50682ce72.png',\n IMAGE_21:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/9755d667-289e-405c-b84a-adf5db91ea4d-c03c409b-dd9b-40e9-840a-6a64e1df594e.png',\n IMAGE_22:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/7487ce49-cd69-4651-8da3-807c54357258-defaaf0a-1756-4b83-9a94-51dcdbfeb84f.png',\n IMAGE_23:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/c3463b9e-baff-41c8-95ee-01c5a79259bd-8062ab05-baa5-45d2-9959-4935d4ff2005.png',\n IMAGE_24:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/1f45e84a-5c84-45ce-9d27-df6ffb55bcdd-cbf126f4-b372-4ea9-a354-0dc27be4ce2f.png',\n IMAGE_25:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/6b8b234e-2306-48f9-90ed-056c13201a83-492073c3-258f-4f1b-91fa-4a8ae723aa2c.png',\n IMAGE_26:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/aa50c2c9-8e3b-4af2-b029-337ec549ec10-baacd015-2e3f-4326-b3ab-bde84a7c456b.png',\n IMAGE_27:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/9e935e54-a97e-4fbb-a2fb-73e351a35eed-479ef4d1-9460-48b2-934d-84d77044b98d.png',\n IMAGE_28:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/799564d8-3082-4fdc-86ed-8c4b3510934f-3f8ccbaa-7b6b-49b7-a836-21fa88f996fc.png',\n IMAGE_29:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/af34a548-c339-4a9e-85fe-11bf90c083eb-46fef91d-7307-4e91-aae0-460da1c48629.png',\n IMAGE_30:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/84014a93-429c-479c-b9ed-0c568f58a288-ca76cdf2-92d3-4552-bc95-3a8dd4c9cd0b.png',\n IMAGE_31:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/dd1584fb-cb60-42c9-80c7-5545e16130ca-226ba72b-ce9e-4948-ad0d-347381fb96c5.png',\n IMAGE_32:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/76e3d8e2-697d-484c-a989-715bd234b575-37bde239-2e2d-450a-8e93-d62c39cb94a3.png',\n IMAGE_33:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/898b791e-c8fc-4bc5-bf1e-47a0351284ce-fdee9617-9848-49e7-82b6-36095f417a3e.png',\n IMAGE_34:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/49662d27-6e14-4e75-a942-946f0af25a51-e9aa2ead-98e4-4f70-8073-7b5aaafaa367.png',\n IMAGE_35:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/d2905fb1-9fc1-49c0-90b0-806877c38cd2-f2e05655-4e6c-41b0-a028-990448a716dc.png',\n IMAGE_36:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/9c3e9949-1be7-42b5-ad48-44f0e1c89c2e-2ee3cbac-e45e-414d-96ad-9dae3621cf14.png',\n IMAGE_37:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/1865e3a6-a762-4bd9-9644-96ae6b27a83a-176a20c7-5768-400c-b2eb-701500cee17c.png',\n IMAGE_38:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/2a6d82e2-d1f6-4e30-ae05-1afe3cd03e70-22d186b0-c2f1-4aee-b33b-869cae26412e.png',\n IMAGE_39:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/9f97bda2-82d6-47e7-80c1-40be94d5491f-88233d55-8715-43cd-9232-246440e33cd6.png',\n IMAGE_40:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/b8f00c77-12b0-4e61-a85e-96918c0035dc-b8344b64-8e79-424d-a974-8e13e6b1e7f8.png',\n IMAGE_41:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/5fc6be85-0205-4ca9-bb9a-eb9335f94af2-2d41c4bb-2c00-4fe7-8b32-067e92df3ab3.png',\n IMAGE_42:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/f6c9c054-f35a-4af7-957f-c7a6209972eb-7e3b42bf-8d97-466d-8662-8d3b1786e8b8.png',\n IMAGE_43:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/80e108b0-3d70-442a-93c1-3fcc091253c6-3dc61b44-6072-413a-ae28-a551577b7677.png',\n IMAGE_44:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/14b9e878-7208-48f4-94d0-51161b79010a-fb55ae68-a7ce-4bae-830d-331d368f0f32.png',\n IMAGE_45:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/b42f3cd8-01fc-4650-a32d-b584b05e78c3-5e408f98-e9e6-43de-97af-91b2732760df.png',\n IMAGE_46:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/e737972a-d884-440b-96d3-66f703dd110b-9f1d0d18-fb45-4a54-a2d0-65bc5b168f8a.png',\n IMAGE_47:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/0e3ae071-247a-4e69-8b60-8009477180b9-197205c2-2ae7-420f-94aa-78440226beaa.png',\n IMAGE_48:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/0ec46619-4dd0-4293-88fb-14656ac7d33c-0936deed-a88c-4e3d-90bf-4fe67b295659.png',\n IMAGE_49:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/01830aec-d044-4d2a-9519-aac2901f4760-776602f7-021b-4142-a2d0-446aca5e0418.png',\n IMAGE_50:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/9f1cee25-f9b4-4539-b4ea-3109584c0a54-0692c4fb-46ce-452c-8573-fcce74852cba.png',\n IMAGE_51:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/e138143f-7071-44bc-8470-7d56850e527c-f515254e-67b8-4b68-b86f-7993e960d893.png',\n IMAGE_52:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/ac75b655-b57d-40b9-a201-8163eeb6a579-1f894e6f-18ac-42c4-9227-7488433586bc.png',\n IMAGE_53:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/3c505a1b-575a-40fb-83c1-6c4a11a6d478-9e466e35-af9e-406a-b4cc-b86f9d0b0419.png',\n IMAGE_54:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/7f98eeec-9422-48b5-9b57-939a24418b92-a6346a63-b393-49c2-9911-ee1a9a1ffd02.png',\n IMAGE_55:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/a7f5ae44-418b-40e1-b8a5-8162cf8bbd87-156cc8dd-3a19-4638-8c26-e28783e50952.png',\n IMAGE_56:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/efdeeced-1eb7-465f-8370-a3b000634ba2-0a4d1794-6ca7-44fa-a1c6-04e3bde8eb56.png',\n IMAGE_57:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/425c6017-2c30-41d7-8930-08300492c6d4-a0859ca3-5213-484c-9170-2d51329407cc.png',\n IMAGE_58:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/858ea699-cf65-469d-bd9e-70adea729bb4-c4e7a711-27b6-4865-9b32-516c41cebddf.png',\n IMAGE_59:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/06ca521d-9728-4de6-a709-1b75a828bfc3-2a9b1224-3d71-43b8-b52f-e7cdcdc9107b.png',\n IMAGE_60:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/199eacfa-daf8-4dd1-a356-225a265a88a4-e8432435-a2bb-4ec2-a3e9-ee1757d8b44b.png',\n IMAGE_61:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/f43b67dc-cc30-4533-b2ca-4689292aab4d-40bc844d-5362-451f-a839-69e86f7a3113.png',\n IMAGE_62:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/318e911c-a57b-4768-9c79-0e49c2953e7a-dbe0eb3c-0b4b-495a-a469-a15b46c5a0cc.png',\n IMAGE_63:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/ed70ddb1-1344-4245-ab1e-beae36ed44b4-21a80cb3-a928-4857-973b-98992fdec74f.png',\n IMAGE_64:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/fb7dd6fa-12c1-41e1-8744-91d0f861ec57-0fee9bda-2381-4c54-a24d-bd644384b9aa.png',\n IMAGE_65:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/7bf8c363-17bd-472d-8cca-96f5d4b64292-9ab34957-15d3-4068-8e83-cc283d8e400d.png',\n IMAGE_66:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/0330a1e9-e814-4be8-83f0-ee1dbabf44a0-6e35a585-92ec-4570-875b-866b59927583.png',\n IMAGE_67:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/a7deb6bc-db2b-4273-bf25-002bb148bf5a-ed5e9b17-15a9-4e0f-9874-c3219d48b2b4.png',\n IMAGE_68:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/52c50319-e3a9-401b-9057-bd6531870f10-aa79ec5d-76d2-4d48-a99e-2ccd9d9c285b.png',\n IMAGE_69:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/9994cef3-6205-4013-8993-b037d067df64-f5d03db4-6bb4-4af4-b35a-0b6d512eaff4.png',\n IMAGE_70:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/e5dd7a7e-70d7-483f-80cc-0c5b41107101-75dcedc7-4a34-4d03-97ee-bf32163afa0a.png',\n IMAGE_71:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/53277265-8e54-43d0-b9d0-d34cd1639861-adb7a48a-8382-43a1-ad59-7c84764a3b21.png',\n IMAGE_72:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/table3x3-border_none.png',\n IMAGE_73:\n 'https://cdn.jsdelivr.net/gh/thanhpv-102/easy-email-editor@master/demo/public/images/table4x4-header.png',\n};\n\nImageManager.add(defaultImagesMap);\n\nexport function getImg(name: keyof typeof defaultImagesMap) {\n return ImageManager.get(name);\n}\n\n","import React from 'react';\nimport { AdvancedType, IImage, RecursivePartial } from '@thanhpv102/easy-email-core';\nimport { Stack } from '@thanhpv102/easy-email-editor';\n\nimport { BlockMaskWrapper } from '@extensions/ShortcutToolbar/components/BlockMaskWrapper';\nimport { Picture } from '@extensions/ShortcutToolbar/components/Picture';\nimport { getImg } from '@extensions/ShortcutToolbar/utils/getImg';\n\nconst imageList = [\n {\n attributes: {\n src: getImg('IMAGE_45'),\n padding: '10px 25px 10px 25px',\n 'padding-left': '0px',\n 'padding-right': '0px',\n 'padding-top': '0px',\n 'padding-bottom': '0px'\n }\n },\n {\n attributes: {\n src: getImg('IMAGE_44'),\n padding: '10px 25px 10px 25px',\n 'padding-left': '25px',\n 'padding-right': '25px',\n 'padding-top': '0px',\n 'padding-bottom': '0px',\n 'border-radius': '15px'\n },\n },\n {\n attributes: {\n src: getImg('IMAGE_43'),\n padding: '10px 25px 10px 25px',\n 'padding-left': '25px',\n 'padding-right': '25px',\n 'padding-top': '0px',\n 'padding-bottom': '0px',\n 'border-radius': '999px',\n width: '200px',\n height: '200px'\n },\n }\n];\n\nexport function ImageBlockItem() {\n return (\n <Stack.Item fill>\n <Stack vertical>\n {imageList.map((item, index) => {\n return (\n <BlockMaskWrapper\n key={index}\n type={AdvancedType.IMAGE}\n payload={\n {\n attributes: item.attributes,\n } as RecursivePartial<IImage>\n }\n >\n <div\n style={{\n position: 'relative',\n display: 'flex',\n justifyContent: 'center',\n }}\n >\n <Picture\n src={item.attributes.src}\n style={{\n width: item.attributes.width,\n height: item.attributes.height,\n minWidth: item.attributes.width ? item.attributes.width : 250,\n minHeight: 100,\n borderRadius: item.attributes['border-radius']\n }}\n />\n <div\n style={{\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n zIndex: 2,\n }}\n />\n </div>\n </BlockMaskWrapper>\n );\n })}\n </Stack>\n </Stack.Item>\n );\n}\n","import React from 'react';\nimport { Stack, TextStyle } from '@thanhpv102/easy-email-editor';\nimport { AdvancedType, ISpacer, RecursivePartial } from '@thanhpv102/easy-email-core';\n\nimport { BlockMaskWrapper } from '@extensions/ShortcutToolbar/components/BlockMaskWrapper';\n\nconst spacerList = [10, 15, 20, 30, 50, 60, 100];\n\nexport function SpacerBlockItem() {\n return (\n <Stack.Item fill>\n <Stack vertical>\n {spacerList.map((item, index) => {\n return (\n <BlockMaskWrapper\n key={index}\n type={AdvancedType.SPACER}\n payload={\n {\n attributes: {\n height: item + 'px',\n },\n } as RecursivePartial<ISpacer>\n }\n >\n <Stack alignment='center'>\n <Stack.Item fill>\n\n <div\n style={{\n marginBottom: 20,\n backgroundColor: '#efeeea',\n position: 'relative',\n height: item,\n boxShadow: ' 3px 3px 3px rgb(0 0 0 / 0.2)',\n }}\n />\n\n </Stack.Item>\n <TextStyle>{item} px</TextStyle>\n </Stack>\n </BlockMaskWrapper>\n );\n })}\n </Stack>\n </Stack.Item>\n );\n}\n","import React from 'react';\nimport { Stack, TextStyle } from '@thanhpv102/easy-email-editor';\nimport { AdvancedType, IDivider, RecursivePartial } from '@thanhpv102/easy-email-core';\nimport { BlockMaskWrapper } from '@extensions/ShortcutToolbar/components/BlockMaskWrapper';\n\nconst dividerList = [\n {\n 'border-width': '2px',\n 'border-style': 'solid',\n 'border-color': 'lightgrey',\n },\n {\n 'border-width': '2px',\n 'border-style': 'dashed',\n 'border-color': 'lightgrey',\n },\n {\n 'border-width': '2px',\n 'border-style': 'dotted',\n 'border-color': 'lightgrey',\n },\n];\n\nexport function DividerBlockItem() {\n return (\n <Stack.Item fill>\n <Stack vertical>\n <Stack.Item />\n <Stack.Item />\n {dividerList.map((item, index) => {\n return (\n <BlockMaskWrapper\n key={index}\n type={AdvancedType.DIVIDER}\n payload={\n {\n attributes: { ...item, padding: '10px 0px' },\n } as RecursivePartial<IDivider>\n }\n >\n <Stack alignment='center'>\n <Stack.Item fill>\n\n <div\n style={{\n backgroundColor: '#fff',\n padding: '10px 0px 10px 0px',\n }}\n >\n <div\n style={{\n borderTopWidth: item['border-width'],\n borderTopStyle: item['border-style'] as any,\n borderTopColor: item['border-color'],\n\n boxSizing: 'content-box',\n }}\n />\n </div>\n\n </Stack.Item>\n <TextStyle>{item['border-style']}</TextStyle>\n </Stack>\n </BlockMaskWrapper>\n );\n })}\n </Stack>\n </Stack.Item>\n );\n}\n","import React from 'react';\nimport { AdvancedType } from '@thanhpv102/easy-email-core';\nimport { Stack } from '@thanhpv102/easy-email-editor';\n\nimport { BlockMaskWrapper } from '@extensions/ShortcutToolbar/components/BlockMaskWrapper';\nimport { getImg } from '@extensions/ShortcutToolbar/utils/getImg';\nimport { Picture } from '@extensions/ShortcutToolbar/components/Picture';\n\nexport function HeroBlockItem() {\n return (\n <Stack.Item fill>\n <Stack vertical>\n {heroList.map((item, index) => {\n return (\n <BlockMaskWrapper\n key={index}\n type={AdvancedType.HERO}\n payload={item.payload}\n >\n <div style={{ position: 'relative' }}>\n <Picture src={item.thumbnail} style={{ minWidth: 250, minHeight: 100 }} />\n <div\n style={{\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n zIndex: 2,\n }}\n />\n </div>\n </BlockMaskWrapper>\n );\n })}\n </Stack>\n </Stack.Item>\n );\n}\n\nconst heroList = [\n {\n thumbnail: getImg('IMAGE_30'),\n payload: {\n type: AdvancedType.HERO,\n data: {\n value: {},\n },\n attributes: {\n 'background-color': '#ffffff',\n 'background-position': 'center center',\n mode: 'fluid-height',\n padding: '100px 0px 100px 0px',\n 'vertical-align': 'top',\n 'background-url': getImg('IMAGE_31'),\n },\n children: [\n {\n type: 'text',\n data: {\n value: {\n content: 'We Serve Healthy & Delicious Foods',\n },\n },\n attributes: {\n 'font-size': '45px',\n padding: '10px 25px 10px 25px',\n 'line-height': '45px',\n align: 'center',\n color: '#ffffff',\n },\n children: [],\n },\n {\n type: 'text',\n data: {\n value: {\n content:\n 'A small river named Duden flows by their place and supplies it with the necessary regelialia. It is a paradisematic country, in which roasted parts of sentences fly into your mouth.<br>',\n },\n },\n attributes: {\n 'font-size': '14px',\n padding: '10px 25px 10px 25px',\n 'line-height': '1.5',\n align: 'center',\n color: '#ffffff',\n },\n children: [],\n },\n {\n type: 'button',\n data: {\n value: {\n content: 'Get Your Order Here!',\n },\n },\n attributes: {\n align: 'center',\n 'background-color': '#f3a333',\n color: '#ffffff',\n 'font-size': '13px',\n 'font-weight': 'normal',\n 'border-radius': '30px',\n padding: '10px 25px 10px 25px',\n 'inner-padding': '10px 25px 10px 25px',\n 'line-height': '120%',\n target: '_blank',\n 'vertical-align': 'middle',\n border: 'none',\n 'text-align': 'center',\n href: '#',\n },\n children: [],\n },\n ],\n },\n },\n {\n thumbnail: getImg('IMAGE_32'),\n payload: {\n type: AdvancedType.HERO,\n data: {\n value: {\n content:\n 'WINTER\\n \\n \\n WINTER IS COMING\\n \\n\\n\\n \\n A small river named Duden flows by their place and supplies it with the necessary regelialia.\\n \\n\\n \\n Read more',\n },\n },\n attributes: {\n 'background-color': '#ffffff',\n 'background-position': 'center center',\n mode: 'fluid-height',\n padding: '0px 0px 100px 0px',\n 'vertical-align': 'top',\n 'background-url': getImg('IMAGE_33'),\n 'padding-bottom': '100px',\n },\n children: [\n {\n type: 'button',\n data: {\n value: {\n content: 'WINTER',\n },\n },\n attributes: {\n 'font-size': '24px',\n padding: '10px 25px 10px 25px',\n 'line-height': '45px',\n align: 'center',\n color: '#ffffff',\n border: '2px solid #ffffff',\n 'font-weight': '500',\n 'background-color': 'transparent',\n 'inner-padding': '10px 15px 4px 15px',\n 'font-family': '\\'Josefin Sans\\', sans-serif',\n 'border-radius': '0px',\n },\n children: [],\n },\n {\n type: 'text',\n data: {\n value: {\n content: '\\n WINTER IS COMING\\n ',\n },\n },\n attributes: {\n align: 'center',\n 'background-color': '#414141',\n color: '#ffffff',\n 'font-size': '30px',\n 'font-weight': 'normal',\n 'border-radius': '3px',\n padding: '10px 25px 10px 25px',\n 'inner-padding': '10px 25px 10px 25px',\n 'line-height': '54px',\n target: '_blank',\n 'vertical-align': 'middle',\n border: 'none',\n 'text-align': 'center',\n href: '#',\n },\n children: [],\n },\n {\n type: 'text',\n attributes: {\n 'font-size': '16px',\n padding: '10px 25px 10px 25px',\n 'line-height': '1.5',\n align: 'center',\n color: '#ffffff',\n },\n data: {\n value: {\n content:\n '\\n A small river named Duden flows by their place and supplies it with the necessary regelialia.\\n ',\n },\n },\n children: [],\n },\n {\n type: 'button',\n attributes: {\n 'border-radius': '30px',\n 'font-weight': '500',\n 'background-color': '#448ef6',\n padding: '30px 25px 10px 25px',\n },\n data: {\n value: {\n content: 'Read more',\n },\n },\n children: [],\n },\n ],\n },\n },\n {\n thumbnail: getImg('IMAGE_34'),\n payload: {\n type: AdvancedType.HERO,\n data: {\n value: {\n content:\n 'WINTER\\n \\n \\n WINTER IS COMING\\n \\n\\n\\n \\n A small river named Duden flows by their place and supplies it with the necessary regelialia.\\n \\n\\n \\n Read more',\n },\n },\n attributes: {\n 'background-color': '#ffffff',\n 'background-position': 'center center',\n mode: 'fluid-height',\n padding: '0px 0px 100px 0px',\n 'vertical-align': 'top',\n 'background-url': getImg('IMAGE_35'),\n 'padding-bottom': '100px',\n },\n children: [\n {\n type: 'text',\n data: {\n value: {\n content: 'Up to 50% off Selected<div> Womens Items</div>',\n },\n },\n attributes: {\n align: 'center',\n 'background-color': '#414141',\n color: '#ffffff',\n 'font-size': '30px',\n 'font-weight': 'normal',\n 'border-radius': '3px',\n padding: '80px 25px 10px 25px',\n 'inner-padding': '10px 25px 10px 25px',\n 'line-height': '1.4',\n target: '_blank',\n 'vertical-align': 'middle',\n border: 'none',\n 'text-align': 'center',\n href: '#',\n 'font-family': '\"Playfair Display\", sans-serif',\n },\n children: [],\n },\n {\n type: 'text',\n attributes: {\n 'font-size': '16px',\n padding: '10px 25px 10px 25px',\n 'line-height': '1.5',\n align: 'center',\n color: '#ffffff',\n },\n data: {\n value: {\n content:\n 'A small river named Duden flows by their place and supplies it with the necessary regelialia.',\n },\n },\n children: [],\n },\n {\n type: 'button',\n attributes: {\n 'border-radius': '5px',\n 'font-weight': '500',\n 'background-color': '#ffc0d0',\n padding: '30px 25px 10px 25px',\n },\n data: {\n value: {\n content: 'Start Shoping',\n },\n },\n children: [],\n },\n ],\n },\n },\n {\n thumbnail: getImg('IMAGE_36'),\n payload: {\n type: AdvancedType.HERO,\n attributes: {\n 'background-color': '#ffffff',\n 'background-position': 'center center',\n mode: 'fluid-height',\n padding: '100px 0px 100px 0px',\n 'vertical-align': 'top',\n 'background-url': getImg('IMAGE_38'),\n },\n data: {\n value: {\n content:\n 'We We Create Modern Website\\n \\n \\n\\n \\n A small river named Duden flows by their place and supplies it with the necessary regelialia. It is a paradisematic country, in which roasted parts of sentences fly into your mouth.',\n },\n },\n children: [\n {\n type: 'text',\n attributes: {\n 'font-size': '30px',\n padding: '10px 25px 10px 25px',\n 'line-height': '54px',\n align: 'center',\n color: '#ffffff',\n },\n data: {\n value: {\n content: 'We We Create Modern Website',\n },\n },\n children: [],\n },\n {\n type: 'text',\n attributes: {\n 'font-size': '16px',\n padding: '10px 25px 10px 25px',\n 'line-height': '1.5',\n align: 'center',\n color: '#ffffff',\n },\n data: {\n value: {\n content:\n 'A small river named Duden flows by their place and supplies it with the necessary regelialia. It is a paradisematic country, in which roasted parts of sentences fly into your mouth.',\n },\n },\n children: [],\n },\n {\n type: 'image',\n attributes: {\n width: '60px',\n 'padding-top': '30px',\n src: getImg('IMAGE_37'),\n target: '_blank',\n href: 'https://github.com/thanhpv-102/easy-email-editor/blob/master/demo/public/',\n },\n data: {\n value: {\n content: '',\n },\n },\n children: [],\n },\n ],\n },\n },\n];\n","import React from 'react';\nimport { Stack } from '@thanhpv102/easy-email-editor';\nimport { AdvancedType, IButton, RecursivePartial } from '@thanhpv102/easy-email-core';\nimport { BlockMaskWrapper } from '@extensions/ShortcutToolbar/components/BlockMaskWrapper';\nimport { getImg } from '@extensions/ShortcutToolbar/utils/getImg';\nimport { Picture } from '@extensions/ShortcutToolbar/components/Picture';\n\nconst buttonList = [\n {\n thumbnail: getImg('IMAGE_11'),\n payload: {\n attributes: {\n align: 'center',\n 'background-color': '#8ccaca',\n color: '#ffffff',\n 'font-size': '12px',\n 'font-weight': 'normal',\n 'border-radius': '0px',\n padding: '10px 25px 10px 25px',\n 'inner-padding': '10px 25px 10px 25px',\n 'line-height': '120%',\n target: '_blank',\n 'vertical-align': 'middle',\n border: 'none',\n 'text-align': 'center',\n href: '#',\n },\n data: {\n value: {\n content: 'READ MORE',\n },\n },\n },\n },\n {\n thumbnail: getImg('IMAGE_12'),\n payload: {\n attributes: {\n align: 'center',\n 'background-color': 'transparent',\n color: '#000000',\n 'font-size': '12px',\n 'font-weight': 'normal',\n 'border-radius': '0px',\n padding: '10px 25px 10px 25px',\n 'inner-padding': '10px 25px 10px 25px',\n 'line-height': '120%',\n target: '_blank',\n 'vertical-align': 'middle',\n border: '2px solid #000',\n 'text-align': 'center',\n href: '#',\n },\n data: {\n value: {\n content: 'READ MORE',\n },\n },\n children: [],\n },\n },\n {\n thumbnail: getImg('IMAGE_13'),\n payload: {\n attributes: {\n align: 'center',\n 'background-color': 'transparent',\n color: '#ffffff',\n 'font-size': '12px',\n 'font-weight': 'normal',\n 'border-radius': '0px',\n padding: '10px 25px 10px 25px',\n 'inner-padding': '10px 25px 10px 25px',\n 'line-height': '120%',\n target: '_blank',\n 'vertical-align': 'middle',\n border: '2px dashed #ffffff',\n 'text-align': 'center',\n href: '#',\n 'container-background-color': '#97c0f0',\n },\n data: {\n value: {\n content: 'Let\\'s Go',\n },\n },\n children: [],\n },\n },\n];\n\nexport function ButtonBlockItem() {\n return (\n <Stack.Item fill>\n <Stack vertical>\n {buttonList.map((item, index) => {\n return (\n <Stack key={index} alignment='center'>\n <Stack.Item fill>\n <BlockMaskWrapper\n type={AdvancedType.BUTTON}\n payload={\n {\n ...item.payload,\n } as RecursivePartial<IButton>\n }\n >\n <div style={{ position: 'relative', overflow: 'hidden' }}>\n <Picture src={item.thumbnail} style={{ minWidth: 250, minHeight: 50 }} />\n <div\n style={{\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n zIndex: 2,\n }}\n />\n </div>\n </BlockMaskWrapper>\n </Stack.Item>\n </Stack>\n );\n })}\n </Stack>\n </Stack.Item>\n );\n}\n","import React from 'react';\nimport { AdvancedType } from '@thanhpv102/easy-email-core';\nimport { Stack } from '@thanhpv102/easy-email-editor';\nimport { BlockMaskWrapper } from '@extensions/ShortcutToolbar/components/BlockMaskWrapper';\nimport { getImg } from '@extensions/ShortcutToolbar/utils/getImg';\nimport { Picture } from '@extensions/ShortcutToolbar/components/Picture';\n\nconst list = [\n {\n thumbnail: getImg('IMAGE_08'),\n payload: {\n type: AdvancedType.ACCORDION,\n data: {\n value: {},\n },\n attributes: {\n 'icon-height': '32px',\n 'icon-width': '32px',\n 'icon-align': 'middle',\n 'icon-position': 'right',\n 'icon-unwrapped-url': getImg('IMAGE_09'),\n 'icon-wrapped-url': getImg('IMAGE_10'),\n padding: '10px 25px 10px 25px',\n border: '1px solid #d9d9d9',\n },\n children: [\n {\n type: 'accordion-element',\n data: {\n value: {},\n },\n attributes: {\n 'icon-align': 'middle',\n 'icon-height': '32px',\n 'icon-width': '32px',\n 'icon-position': 'right',\n padding: '10px 25px 10px 25px',\n },\n children: [\n {\n type: 'accordion-title',\n data: {\n value: {\n content: 'Why use an accordion?',\n },\n },\n attributes: {\n 'font-size': '13px',\n padding: '16px 16px 16px 16px',\n },\n children: [],\n },\n {\n type: 'accordion-text',\n data: {\n value: {\n content:\n '<span style=\"line-height:20px\">\\n Because emails with a lot of content are most of the time a very bad experience on mobile, mj-accordion comes handy when you want to deliver a lot of information in a concise way.\\n </span>',\n },\n },\n attributes: {\n 'font-size': '13px',\n padding: '16px 16px 16px 16px',\n 'line-height': '1',\n },\n children: [],\n },\n ],\n },\n {\n type: 'accordion-element',\n data: {\n value: {},\n },\n attributes: {\n 'icon-align': 'middle',\n 'icon-height': '32px',\n 'icon-width': '32px',\n 'icon-position': 'right',\n padding: '10px 25px 10px 25px',\n },\n children: [\n {\n type: 'accordion-title',\n data: {\n value: {\n content: 'How it works',\n },\n },\n attributes: {\n 'font-size': '13px',\n padding: '16px 16px 16px 16px',\n },\n children: [],\n },\n {\n type: 'accordion-text',\n data: {\n value: {\n content:\n '<span style=\"line-height:20px\">\\n Content is stacked into tabs and users can expand them at will. If responsive styles are not supported (mostly on desktop clients), tabs are then expanded and your content is readable at once.\\n </span>',\n },\n },\n attributes: {\n 'font-size': '13px',\n padding: '16px 16px 16px 16px',\n 'line-height': '1',\n },\n children: [],\n },\n ],\n },\n ],\n },\n },\n];\n\nexport function AccordionBlockItem() {\n return (\n <Stack.Item fill>\n <Stack vertical>\n {list.map((item, index) => {\n return (\n <BlockMaskWrapper\n key={index}\n type={AdvancedType.ACCORDION}\n payload={item.payload}\n >\n <div style={{ position: 'relative' }}>\n <Picture src={item.thumbnail} style={{ minWidth: 250, minHeight: 100 }} />\n <div\n style={{\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n zIndex: 2,\n }}\n />\n </div>\n </BlockMaskWrapper>\n );\n })}\n </Stack>\n </Stack.Item>\n );\n}\n","import React from 'react';\nimport { AdvancedType } from '@thanhpv102/easy-email-core';\nimport { Stack } from '@thanhpv102/easy-email-editor';\n\nimport { BlockMaskWrapper } from '@extensions/ShortcutToolbar/components/BlockMaskWrapper';\nimport { getImg } from '@extensions/ShortcutToolbar/utils/getImg';\nimport { Picture } from '@extensions/ShortcutToolbar/components/Picture';\n\nconst list = [\n {\n thumbnail: getImg('IMAGE_14'),\n payload: {\n type: AdvancedType.CAROUSEL,\n data: {\n value: {\n images: [\n {\n src: getImg('IMAGE_15'),\n target: '_blank',\n },\n {\n src: getImg('IMAGE_16'),\n target: '_blank',\n },\n {\n src: getImg('IMAGE_17'),\n target: '_blank',\n },\n ],\n },\n },\n attributes: {\n align: 'center',\n 'left-icon': getImg('IMAGE_18'),\n 'right-icon': getImg('IMAGE_19'),\n 'icon-width': '44px',\n thumbnails: 'visible',\n },\n children: [],\n },\n },\n];\n\nexport function CarouselBlockItem() {\n return (\n <Stack.Item fill>\n <Stack vertical>\n {list.map((item, index) => {\n return (\n <BlockMaskWrapper\n key={index}\n type={AdvancedType.CAROUSEL}\n payload={item.payload}\n >\n <div style={{ position: 'relative' }}>\n <Picture src={item.thumbnail} style={{ minWidth: 250, minHeight: 100 }} />\n <div\n style={{\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n zIndex: 2,\n }}\n />\n </div>\n </BlockMaskWrapper>\n );\n })}\n </Stack>\n </Stack.Item>\n );\n}\n","import React from 'react';\nimport { AdvancedType } from '@thanhpv102/easy-email-core';\nimport { Stack } from '@thanhpv102/easy-email-editor';\nimport { BlockMaskWrapper } from '@extensions/ShortcutToolbar/components/BlockMaskWrapper';\nimport { getImg } from '@extensions/ShortcutToolbar/utils/getImg';\nimport { Picture } from '@extensions/ShortcutToolbar/components/Picture';\n\nconst list = [\n {\n thumbnail: getImg('IMAGE_46'),\n payload: {\n type: AdvancedType.NAVBAR,\n data: {\n value: {\n links: [\n {\n href: '/gettings-started-onboard',\n content: 'HOME',\n color: '#000000',\n 'font-size': '13px',\n target: '_blank',\n padding: '15px 10px 15px 10px',\n },\n {\n href: '/try-it-live',\n content: 'NEW',\n color: '#000000',\n 'font-size': '13px',\n target: '_blank',\n padding: '15px 10px 15px 10px',\n },\n {\n href: '/templates',\n content: 'WOMEN',\n color: '#000000',\n 'font-size': '13px',\n target: '_blank',\n padding: '15px 10px 15px 10px',\n },\n {\n href: '/components',\n content: 'KIDS',\n color: '#000000',\n 'font-size': '13px',\n target: '_blank',\n padding: '15px 10px 15px 10px',\n },\n {\n href: '/components',\n content: 'BLOG',\n color: '#000000',\n 'font-size': '13px',\n target: '_blank',\n padding: '15px 10px 15px 10px',\n },\n ],\n },\n },\n attributes: {\n align: 'center',\n 'base-url': 'https://mjml.io',\n },\n children: [],\n },\n },\n];\n\nexport function NavbarBlockItem() {\n return (\n <Stack.Item fill>\n <Stack vertical>\n {list.map((item, index) => {\n return (\n <BlockMaskWrapper\n key={index}\n type={AdvancedType.NAVBAR}\n payload={item.payload}\n >\n <div style={{ position: 'relative' }}>\n <Picture src={item.thumbnail} style={{ minWidth: 250, minHeight: 50 }} />\n <div\n style={{\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n zIndex: 2,\n }}\n />\n </div>\n </BlockMaskWrapper>\n );\n })}\n </Stack>\n </Stack.Item>\n );\n}\n","import React from 'react';\nimport { AdvancedType } from '@thanhpv102/easy-email-core';\nimport { Stack } from '@thanhpv102/easy-email-editor';\n\nimport { BlockMaskWrapper } from '@extensions/ShortcutToolbar/components/BlockMaskWrapper';\nimport { getImg } from '@extensions/ShortcutToolbar/utils/getImg';\nimport { Picture } from '@extensions/ShortcutToolbar/components/Picture';\n\nconst list = [\n {\n thumbnail: getImg('IMAGE_52'),\n payload: {\n type: AdvancedType.SOCIAL,\n data: {\n value: {\n elements: [\n {\n href: '#',\n 'icon-size': '20px',\n target: '_blank',\n src: getImg('IMAGE_53'),\n content: 'Facebook',\n },\n {\n href: '#',\n 'icon-size': '20px',\n target: '_blank',\n src: getImg('IMAGE_54'),\n content: 'Google',\n },\n {\n href: '',\n 'icon-size': '20px',\n target: '_blank',\n src: getImg('IMAGE_55'),\n content: 'Twitter',\n },\n ],\n },\n },\n attributes: {\n align: 'center',\n color: '#333333',\n mode: 'horizontal',\n 'font-size': '13px',\n 'font-weight': 'normal',\n 'border-radius': '3px',\n padding: '10px 25px 10px 25px',\n 'inner-padding': '4px 4px 4px 4px',\n 'line-height': '22px',\n 'text-padding': '4px 4px 4px 0px',\n 'icon-padding': '0px',\n 'icon-size': '20px',\n },\n children: [],\n },\n },\n {\n thumbnail: getImg('IMAGE_71'),\n payload: {\n type: AdvancedType.SOCIAL,\n data: {\n value: {\n elements: [\n {\n href: '#',\n 'icon-size': '20px',\n target: '_blank',\n src: getImg('IMAGE_53'),\n content: '',\n },\n {\n href: '#',\n 'icon-size': '20px',\n target: '_blank',\n src: getImg('IMAGE_54'),\n content: '',\n },\n {\n href: '',\n 'icon-size': '20px',\n target: '_blank',\n src: getImg('IMAGE_55'),\n content: '',\n },\n ],\n },\n },\n attributes: {\n align: 'center',\n color: '#333333',\n mode: 'horizontal',\n 'font-size': '13px',\n 'font-weight': 'normal',\n 'border-radius': '3px',\n padding: '10px 25px 10px 25px',\n 'inner-padding': '4px 4px 4px 4px',\n 'line-height': '22px',\n 'text-padding': '4px 4px 4px 0px',\n 'icon-padding': '0px',\n 'icon-size': '20px',\n },\n children: [],\n },\n },\n];\n\nexport function SocialBlockItem() {\n return (\n <Stack.Item fill>\n <Stack vertical>\n {list.map((item, index) => {\n return (\n <BlockMaskWrapper\n key={index}\n type={AdvancedType.SOCIAL}\n payload={item.payload}\n >\n <div style={{ position: 'relative' }}>\n <Picture src={item.thumbnail} style={{ minWidth: 250, minHeight: 30 }} />\n <div\n style={{\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n zIndex: 2,\n }}\n />\n </div>\n </BlockMaskWrapper>\n );\n })}\n </Stack>\n </Stack.Item>\n );\n}\n","import React from 'react';\nimport { AdvancedType, BasicType } from '@thanhpv102/easy-email-core';\nimport { Stack } from '@thanhpv102/easy-email-editor';\n\nimport { BlockMaskWrapper } from '@extensions/ShortcutToolbar/components/BlockMaskWrapper';\nimport { getImg } from '@extensions/ShortcutToolbar/utils/getImg';\nimport { Picture } from '@extensions/ShortcutToolbar/components/Picture';\n\nexport function WrapperBlockItem() {\n return (\n <Stack.Item fill>\n <Stack vertical>\n {list.map((item, index) => {\n return (\n <BlockMaskWrapper\n key={index}\n type={AdvancedType.WRAPPER}\n payload={item.payload}\n >\n <div style={{ position: 'relative' }}>\n <Picture src={item.thumbnail} style={{ minWidth: 250, minHeight: 80 }} />\n <div\n style={{\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n zIndex: 2,\n }}\n />\n </div>\n </BlockMaskWrapper>\n );\n })}\n </Stack>\n </Stack.Item>\n );\n}\n\nconst list = [\n {\n thumbnail: getImg('IMAGE_56'),\n payload: {},\n },\n {\n thumbnail: getImg('IMAGE_57'),\n payload: {\n type: 'advanced_section',\n data: {\n value: {},\n },\n attributes: {\n padding: '50px 30px',\n border: '1px solid #aaaaaa',\n direction: 'ltr',\n 'text-align': 'center',\n 'background-color': '#ffffff',\n },\n children: [\n {\n type: BasicType.GROUP,\n data: {\n value: {\n noWrap: false,\n },\n },\n attributes: {\n padding: '20px',\n 'background-repeat': 'repeat',\n 'background-size': 'auto',\n 'background-position': 'top center',\n border: 'none',\n direction: 'ltr',\n 'text-align': 'center',\n 'border-top': '1px solid #aaaaaa',\n 'border-left': '1px solid #aaaaaa',\n 'border-right': '1px solid #aaaaaa',\n },\n children: [\n {\n type: 'advanced_column',\n data: {\n value: {},\n },\n attributes: {\n padding: '0px 0px 0px 0px',\n border: 'none',\n 'vertical-align': 'top',\n },\n children: [\n {\n type: 'image',\n data: {\n value: {},\n },\n attributes: {\n align: 'center',\n height: 'auto',\n padding: '0',\n src: getImg('IMAGE_58'),\n },\n children: [],\n },\n ],\n },\n ],\n },\n {\n type: 'advanced_section',\n data: {\n value: {\n noWrap: false,\n },\n },\n attributes: {\n padding: '20px',\n 'background-repeat': 'repeat',\n 'background-size': 'auto',\n 'background-position': 'top center',\n border: 'none',\n direction: 'ltr',\n 'text-align': 'center',\n 'border-left': '1px solid #aaaaaa',\n 'border-right': '1px solid #aaaaaa',\n 'border-bottom': '1px solid #aaaaaa',\n },\n children: [\n {\n type: 'advanced_column',\n data: {\n value: {},\n },\n attributes: {\n padding: '0px 0px 0px 0px',\n border: '1px solid #dddddd',\n 'vertical-align': 'top',\n },\n children: [\n {\n type: 'text',\n data: {\n value: {\n content: 'First line of text',\n },\n },\n attributes: {\n 'font-size': '13px',\n padding: '20px',\n 'line-height': 1,\n align: 'left',\n },\n children: [],\n },\n {\n type: 'divider',\n data: {\n value: {},\n },\n attributes: {\n align: 'center',\n 'border-width': '1px',\n 'border-style': 'dashed',\n 'border-color': 'lightgrey',\n padding: '0 20px',\n },\n children: [],\n },\n {\n type: 'text',\n data: {\n value: {\n content: 'Second line of text',\n },\n },\n attributes: {\n 'font-size': '13px',\n padding: '20px',\n 'line-height': 1,\n align: 'left',\n },\n children: [],\n },\n ],\n },\n ],\n },\n ],\n },\n },\n];\n","import React from 'react';\nimport { AdvancedType } from '@thanhpv102/easy-email-core';\nimport { Stack } from '@thanhpv102/easy-email-editor';\n\nimport { BlockMaskWrapper } from '@extensions/ShortcutToolbar/components/BlockMaskWrapper';\nimport { getImg } from '@extensions/ShortcutToolbar/utils/getImg';\nimport { Picture } from '@extensions/ShortcutToolbar/components/Picture';\n\nexport function SectionBlockItem() {\n return (\n <Stack.Item fill>\n <Stack vertical>\n {list.map((item, index) => {\n return (\n <BlockMaskWrapper\n key={index}\n type={AdvancedType.SECTION}\n payload={item.payload}\n >\n <div style={{ position: 'relative' }}>\n <Picture src={item.thumbnail} style={{ minWidth: 250, minHeight: 70 }} />\n <div\n style={{\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n zIndex: 2,\n }}\n />\n </div>\n </BlockMaskWrapper>\n );\n })}\n </Stack>\n </Stack.Item>\n );\n}\n\nconst list = [\n {\n thumbnail: getImg('IMAGE_47'),\n payload: {},\n },\n {\n thumbnail: getImg('IMAGE_48'),\n payload: {\n type: 'advanced_section',\n data: {\n value: {\n noWrap: false,\n },\n },\n attributes: {\n padding: '20px 0px 20px 0px',\n 'background-repeat': 'repeat',\n 'background-size': 'auto',\n 'background-position': 'top center',\n border: 'none',\n direction: 'ltr',\n 'text-align': 'center',\n },\n children: [\n {\n type: 'advanced_column',\n data: {\n value: {},\n },\n attributes: {\n padding: '0px 0px 0px 0px',\n border: 'none',\n 'vertical-align': 'top',\n },\n children: [],\n },\n ],\n },\n },\n {\n thumbnail: getImg('IMAGE_49'),\n payload: {\n type: 'advanced_section',\n data: {\n value: {\n noWrap: true,\n },\n },\n attributes: {\n padding: '20px 0px 20px 0px',\n 'background-repeat': 'repeat',\n 'background-size': 'auto',\n 'background-position': 'top center',\n border: 'none',\n direction: 'ltr',\n 'text-align': 'center',\n },\n children: [\n {\n type: 'group',\n data: {\n value: {},\n },\n attributes: {\n 'vertical-align': 'top',\n direction: 'ltr',\n },\n children: [\n {\n type: 'advanced_column',\n data: {\n value: {},\n },\n attributes: {\n padding: '0px 0px 0px 0px',\n border: 'none',\n 'vertical-align': 'top',\n },\n children: [],\n },\n {\n type: 'advanced_column',\n data: {\n value: {},\n },\n attributes: {\n padding: '0px 0px 0px 0px',\n border: 'none',\n 'vertical-align': 'top',\n },\n children: [],\n },\n ],\n },\n ],\n\n },\n },\n {\n thumbnail: getImg('IMAGE_50'),\n payload: {\n type: 'advanced_section',\n data: {\n value: {\n noWrap: true,\n },\n },\n attributes: {\n padding: '20px 0px 20px 0px',\n 'background-repeat': 'repeat',\n 'background-size': 'auto',\n 'background-position': 'top center',\n border: 'none',\n direction: 'ltr',\n 'text-align': 'center',\n },\n children: [\n {\n type: 'group',\n data: {\n value: {},\n },\n attributes: {\n 'vertical-align': 'top',\n direction: 'ltr',\n },\n children: [\n {\n type: 'advanced_column',\n data: {\n value: {},\n },\n attributes: {\n padding: '0px 0px 0px 0px',\n border: 'none',\n 'vertical-align': 'top',\n },\n children: [],\n },\n {\n type: 'advanced_column',\n data: {\n value: {},\n },\n attributes: {\n padding: '0px 0px 0px 0px',\n border: 'none',\n 'vertical-align': 'top',\n },\n children: [],\n },\n {\n type: 'advanced_column',\n data: {\n value: {},\n },\n attributes: {\n padding: '0px 0px 0px 0px',\n border: 'none',\n 'vertical-align': 'top',\n },\n children: [],\n },\n ],\n },\n ],\n },\n },\n {\n thumbnail: getImg('IMAGE_51'),\n payload: {\n type: 'advanced_section',\n data: {\n value: {\n noWrap: true,\n },\n },\n attributes: {\n padding: '20px 0px 20px 0px',\n 'background-repeat': 'repeat',\n 'background-size': 'auto',\n 'background-position': 'top center',\n border: 'none',\n direction: 'ltr',\n 'text-align': 'center',\n },\n children: [\n {\n type: 'group',\n data: {\n value: {},\n },\n attributes: {\n 'vertical-align': 'top',\n direction: 'ltr',\n },\n children: [\n {\n type: 'advanced_column',\n data: {\n value: {},\n },\n attributes: {\n padding: '0px 0px 0px 0px',\n border: 'none',\n 'vertical-align': 'top',\n },\n children: [],\n },\n {\n type: 'advanced_column',\n data: {\n value: {},\n },\n attributes: {\n padding: '0px 0px 0px 0px',\n border: 'none',\n 'vertical-align': 'top',\n },\n children: [],\n },\n {\n type: 'advanced_column',\n data: {\n value: {},\n },\n attributes: {\n padding: '0px 0px 0px 0px',\n border: 'none',\n 'vertical-align': 'top',\n },\n children: [],\n },\n {\n type: 'advanced_column',\n data: {\n value: {},\n },\n attributes: {\n padding: '0px 0px 0px 0px',\n border: 'none',\n 'vertical-align': 'top',\n },\n children: [],\n },\n ],\n },\n ],\n },\n },\n];\n","import React from 'react';\nimport { AdvancedType } from '@thanhpv102/easy-email-core';\nimport { Stack } from '@thanhpv102/easy-email-editor';\n\nimport { BlockMaskWrapper } from '@extensions/ShortcutToolbar/components/BlockMaskWrapper';\nimport { getImg } from '@extensions/ShortcutToolbar/utils/getImg';\nimport { Picture } from '@extensions/ShortcutToolbar/components/Picture';\n\nexport function GroupBlockItem() {\n return (\n <Stack.Item fill>\n <Stack vertical>\n {list.map((item, index) => {\n return (\n <BlockMaskWrapper\n key={index}\n type={AdvancedType.GROUP}\n payload={item.payload}\n >\n <div style={{ position: 'relative' }}>\n <Picture src={item.thumbnail} style={{ minWidth: 250, minHeight: 70 }} />\n <div\n style={{\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n zIndex: 2,\n }}\n />\n </div>\n </BlockMaskWrapper>\n );\n })}\n </Stack>\n </Stack.Item>\n );\n}\n\nconst list = [\n {\n thumbnail: getImg('IMAGE_22'),\n payload: {\n type: 'advanced_section',\n data: {\n value: {\n noWrap: false,\n },\n },\n attributes: {\n 'vertical-align': 'top',\n direction: 'ltr',\n },\n },\n },\n {\n thumbnail: getImg('IMAGE_23'),\n payload: {\n type: 'advanced_section',\n data: {\n value: {\n noWrap: true,\n },\n },\n attributes: {\n 'vertical-align': 'top',\n direction: 'ltr',\n },\n children: [\n {\n type: 'group',\n data: {\n value: {},\n },\n attributes: {\n 'vertical-align': 'top',\n direction: 'ltr',\n },\n children: [\n {\n type: 'advanced_column',\n data: {\n value: {},\n },\n attributes: {\n padding: '0px 0px 0px 0px',\n border: 'none',\n 'vertical-align': 'top',\n },\n children: [\n {\n type: 'image',\n data: {\n value: {},\n },\n attributes: {\n align: 'center',\n height: 'auto',\n padding: '0px 5px 0px 10px',\n src: getImg('IMAGE_24'),\n width: '',\n },\n children: [],\n },\n ],\n },\n {\n type: 'advanced_column',\n data: {\n value: {},\n },\n attributes: {\n padding: '0px 0px 0px 0px',\n border: 'none',\n 'vertical-align': 'top',\n },\n children: [\n {\n type: 'image',\n data: {\n value: {},\n },\n attributes: {\n align: 'center',\n height: 'auto',\n padding: '0px 10px 0px 5px',\n src: getImg('IMAGE_25'),\n width: '',\n },\n children: [],\n },\n ],\n },\n ],\n },\n ],\n },\n },\n {\n thumbnail: getImg('IMAGE_26'),\n payload: {\n type: 'advanced_section',\n data: {\n value: {\n noWrap: true,\n },\n },\n attributes: {\n 'vertical-align': 'top',\n direction: 'ltr',\n 'background-color': '#ffffff',\n },\n children: [\n {\n type: 'group',\n data: {\n value: {},\n },\n attributes: {\n 'vertical-align': 'top',\n direction: 'ltr',\n },\n children: [\n {\n type: 'advanced_column',\n data: {\n value: {},\n },\n attributes: {\n padding: '0px 5px 0px 5px',\n border: 'none',\n 'vertical-align': 'top',\n },\n children: [\n {\n type: 'image',\n data: {\n value: {},\n },\n attributes: {\n align: 'center',\n height: 'auto',\n padding: '0px 0px 0px 0px',\n src: getImg('IMAGE_29'),\n width: '',\n },\n children: [],\n },\n {\n type: 'text',\n data: {\n value: {\n content: 'Office Room\\nPrinting',\n },\n },\n attributes: {\n 'font-size': '18px',\n padding: '10px 5px 10px 5px',\n 'line-height': 1,\n align: 'center',\n },\n children: [],\n },\n ],\n },\n {\n type: 'advanced_column',\n data: {\n value: {},\n },\n attributes: {\n padding: '0px 5px 0px 5px',\n border: 'none',\n 'vertical-align': 'top',\n },\n children: [\n {\n type: 'image',\n data: {\n value: {},\n },\n attributes: {\n align: 'center',\n height: 'auto',\n padding: '0px 0px 0px 0px',\n src: getImg('IMAGE_27'),\n width: '',\n },\n children: [],\n },\n {\n type: 'text',\n data: {\n value: {\n content: 'Workplace\\nDesign<div><br></div>',\n },\n },\n attributes: {\n 'font-size': '18px',\n padding: '10px 5px 10px 5px',\n 'line-height': 1,\n align: 'center',\n },\n children: [],\n },\n ],\n },\n {\n type: 'advanced_column',\n data: {\n value: {},\n },\n attributes: {\n padding: '0px 5px 0px 5px',\n border: 'none',\n 'vertical-align': 'top',\n },\n children: [\n {\n type: 'image',\n data: {\n value: {},\n },\n attributes: {\n align: 'center',\n height: 'auto',\n padding: '0px 0px 0px 0px',\n src: getImg('IMAGE_28'),\n width: '',\n },\n children: [],\n },\n {\n type: 'text',\n data: {\n value: {\n content: 'Modern Design\\nBranding',\n },\n },\n attributes: {\n 'font-size': '18px',\n padding: '10px 5px 10px 5px',\n 'line-height': 1,\n align: 'center',\n },\n children: [],\n },\n ],\n },\n ],\n },\n ],\n },\n },\n];\n","import React from 'react';\nimport { AdvancedType } from '@thanhpv102/easy-email-core';\nimport { Stack } from '@thanhpv102/easy-email-editor';\n\nimport { BlockMaskWrapper } from '@extensions/ShortcutToolbar/components/BlockMaskWrapper';\nimport { getImg } from '@extensions/ShortcutToolbar/utils/getImg';\nimport { Picture } from '@extensions/ShortcutToolbar/components/Picture';\n\nexport function ColumnBlockItem() {\n return (\n <Stack.Item fill>\n <Stack vertical>\n {list.map((item, index) => {\n return (\n <BlockMaskWrapper\n key={index}\n type={AdvancedType.COLUMN}\n payload={item.payload}\n >\n <div style={{ position: 'relative' }}>\n <Picture src={item.thumbnail} style={{ minWidth: 250, minHeight: 70 }} />\n <div\n style={{\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n zIndex: 2,\n }}\n />\n </div>\n </BlockMaskWrapper>\n );\n })}\n </Stack>\n </Stack.Item>\n );\n}\n\nconst list = [\n {\n thumbnail: getImg('IMAGE_20'),\n payload: {\n type: 'advanced_section',\n data: {\n value: {\n noWrap: false,\n },\n },\n attributes: {\n 'vertical-align': 'top',\n direction: 'ltr',\n },\n children: [\n {\n type: 'column',\n data: {\n value: {},\n },\n attributes: {\n padding: '20px 0px 20px 0px',\n border: 'none',\n 'vertical-align': 'top',\n 'background-color': '#ffffff',\n },\n children: [\n {\n type: 'image',\n data: {\n value: {},\n },\n attributes: {\n align: 'center',\n height: 'auto',\n padding: '0px 0px 0px 0px',\n src: getImg('IMAGE_21'),\n width: '150px',\n },\n children: [],\n },\n {\n type: 'text',\n data: {\n value: {\n content: 'Business Key to Success',\n },\n },\n attributes: {\n 'font-size': '20px',\n padding: '10px 0px 10px 0px',\n 'line-height': '1.7',\n align: 'center',\n 'font-family': '\"Nunito Sans\", sans-serif',\n },\n children: [],\n },\n {\n type: 'text',\n data: {\n value: {\n content: 'POSTED ON FEB 18, 2019 FOOD',\n },\n },\n attributes: {\n 'font-size': '15px',\n padding: '0px 0px 10px 0px',\n 'line-height': '1.7',\n align: 'center',\n color: '#9b9b9b',\n 'font-family': '\"Nunito Sans\", sans-serif',\n },\n children: [],\n },\n {\n type: 'text',\n data: {\n value: {\n content:\n 'Far far away, behind the word mountains, far from the countries',\n },\n },\n attributes: {\n 'font-size': '15px',\n padding: '0px 0px 0px 0px',\n 'line-height': '1.7',\n align: 'center',\n color: '#9b9b9b',\n 'font-family': '\"Nunito Sans\", sans-serif',\n },\n children: [],\n },\n ],\n },\n ],\n },\n },\n];\n","import React from 'react';\nimport { Stack } from '@thanhpv102/easy-email-editor';\nimport { AdvancedType } from '@thanhpv102/easy-email-core';\n\nimport { BlockMaskWrapper } from '@extensions/ShortcutToolbar/components/BlockMaskWrapper';\nimport { getImg } from '@extensions/ShortcutToolbar/utils/getImg';\nimport { Picture } from '@extensions/ShortcutToolbar/components/Picture';\n\nconst tableList = [\n {\n txtName: 'Table 3x3',\n thumbnail: getImg('IMAGE_72'),\n payload: {\n type: AdvancedType.TABLE,\n data: {\n value: {\n tableSource: [\n [{ content: 'header1' }, { content: 'header2' }, { content: 'header3' }],\n [{ content: 'body1-1' }, { content: 'body1-2' }, { content: 'body1-3' }],\n [{ content: 'body2-1' }, { content: 'body2-2' }, { content: 'body2-3' }],\n ],\n },\n },\n attributes: {\n cellBorderColor: null,\n cellPadding: '8px',\n 'text-align': 'center',\n },\n children: [],\n },\n },\n {\n txtName: 'Table 4x4',\n thumbnail: getImg('IMAGE_73'),\n payload: {\n type: AdvancedType.TABLE,\n data: {\n value: {\n tableSource: [\n [{\n content: '<font color=\"#ffffff\">header1</font>',\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n backgroundColor: '#62a0ea',\n },\n {\n content: '<font color=\"#ffffff\">header2</font>',\n top: 0,\n bottom: 0,\n left: 1,\n right: 1,\n backgroundColor: '#62a0ea',\n },\n {\n content: '<font color=\"#ffffff\">header3</font>',\n top: 0,\n bottom: 0,\n left: 2,\n right: 2,\n backgroundColor: '#62a0ea',\n },\n {\n content: '<font color=\"#ffffff\">header4</font>',\n top: 0,\n bottom: 0,\n left: 3,\n right: 3,\n backgroundColor: '#62a0ea',\n }],\n [{ content: 'body1-1' }, { content: 'body1-2' }, { content: 'body1-3' }, { content: 'body1-4' }],\n [{ content: 'body2-1' }, { content: 'body2-2' }, { content: 'body2-3' }, { content: 'body2-4' }],\n [{ content: 'body3-1' }, { content: 'body3-2' }, { content: 'body3-3' }, { content: 'body3-4' }],\n ],\n },\n },\n attributes: {\n cellBorderColor: '#9b9b9b',\n cellPadding: '8px',\n 'text-align': 'left',\n },\n children: [],\n },\n },\n];\n\nexport function TableBlockItem() {\n return (\n <Stack.Item fill>\n <Stack vertical>\n {tableList.map((item, index) => {\n return (\n <BlockMaskWrapper\n key={index}\n type={AdvancedType.TABLE}\n payload={item.payload}\n >\n\n <div style={{ position: 'relative' }}>\n <Picture src={item.thumbnail} style={{ minWidth: 250, minHeight: 70 }} />\n <div\n style={{\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n zIndex: 2,\n }}\n />\n </div>\n\n </BlockMaskWrapper>\n );\n })}\n </Stack>\n </Stack.Item>\n );\n}\n","import React from 'react';\nimport { AdvancedType } from '@thanhpv102/easy-email-core';\nimport { Stack, TextStyle } from '@thanhpv102/easy-email-editor';\n\nimport { TextBlockItem } from './TextBlockItem';\nimport { ImageBlockItem } from './ImageBlockItem';\nimport { SpacerBlockItem } from './SpacerBlockItem';\nimport { DividerBlockItem } from './DividerBlockItem';\nimport { HeroBlockItem } from './HeroBlockItem';\nimport { ButtonBlockItem } from './ButtonBlockItem';\nimport { AccordionBlockItem } from './AccordionBlockItem';\nimport { CarouselBlockItem } from './CarouselBlockItem';\nimport { NavbarBlockItem } from './NavbarBlockItem';\nimport { SocialBlockItem } from './SocialBlockItem';\nimport { WrapperBlockItem } from './WrapperBlockItem';\nimport { SectionBlockItem } from './SectionBlockItem';\nimport { GroupBlockItem } from './GroupBlockItem';\nimport { ColumnBlockItem } from './ColumnBlockItem';\nimport { TableBlockItem } from '@extensions/ShortcutToolbar/components/BlocksPanel/presetTemplate/TableBlockItem';\n\nexport const defaultCategories = [\n {\n get title() {\n return 'Content';\n },\n name: 'CONTENT',\n blocks: [\n {\n type: AdvancedType.TEXT,\n get title() {\n return 'Text';\n },\n get description() {\n return 'This block allows you to display text in your email';\n },\n component: TextBlockItem,\n },\n {\n type: AdvancedType.IMAGE,\n get title() {\n return 'Image';\n },\n get description() {\n return (\n <Stack\n vertical\n spacing=\"none\"\n >\n <TextStyle>\n {'Displays a responsive image in your email. It is similar to the HTML \\'<img/>\\' tag. Note that if no width is provided, the image will use the parent column width.'}\n </TextStyle>\n </Stack>\n );\n },\n component: ImageBlockItem,\n },\n {\n type: AdvancedType.TABLE,\n get title() {\n return 'Table';\n },\n get description() {\n return 'Displays a table.';\n },\n component: TableBlockItem,\n },\n {\n type: AdvancedType.BUTTON,\n get title() {\n return 'Button';\n },\n get description() {\n return 'Displays a customizable button.';\n },\n component: ButtonBlockItem,\n },\n {\n type: AdvancedType.HERO,\n get title() {\n return 'Hero';\n },\n get description() {\n return 'This block displays a hero image. It behaves like an \\'section\\' with a single \\'column\\'.';\n },\n component: HeroBlockItem,\n },\n {\n type: AdvancedType.NAVBAR,\n get title() {\n return 'Navbar';\n },\n get description() {\n return 'Displays a menu for navigation with an optional hamburger mode for mobile devices.';\n },\n component: NavbarBlockItem,\n },\n {\n type: AdvancedType.SPACER,\n get title() {\n return 'Spacer';\n },\n get description() {\n return 'Displays a blank space.';\n },\n component: SpacerBlockItem,\n },\n {\n type: AdvancedType.DIVIDER,\n get title() {\n return 'Divider';\n },\n get description() {\n return 'Displays a horizontal divider that can be customized like a HTML border.';\n },\n component: DividerBlockItem,\n },\n {\n type: AdvancedType.ACCORDION,\n get title() {\n return 'Accordion';\n },\n get description() {\n return 'Accordion is an interactive component to stack content in tabs, so the information is collapsed and only the titles are visible. Readers can interact by clicking on the tabs to reveal the content, providing a great experience on mobile devices where space is scarce.';\n },\n component: AccordionBlockItem,\n },\n {\n type: AdvancedType.CAROUSEL,\n get title() {\n return 'Carousel';\n },\n get description() {\n return 'This block displays a gallery of images or \\'carousel\\'. Readers can interact by hovering and clicking on thumbnails depending on the email client they use.';\n },\n component: CarouselBlockItem,\n },\n {\n type: AdvancedType.SOCIAL,\n get title() {\n return 'Social';\n },\n get description() {\n return 'Displays calls-to-action for various social networks with their associated logo.';\n },\n component: SocialBlockItem,\n },\n ],\n },\n {\n get title() {\n return 'Layout';\n },\n name: 'LAYOUT',\n blocks: [\n {\n type: AdvancedType.WRAPPER,\n get title() {\n return 'Wrapper';\n },\n get description() {\n return 'Wrapper enables to wrap multiple sections together. It\"s especially useful to achieve nested layouts with shared border or background images across sections.';\n },\n component: WrapperBlockItem,\n },\n {\n type: AdvancedType.SECTION,\n get title() {\n return 'Section';\n },\n get description() {\n return (\n <Stack\n vertical\n spacing=\"none\"\n >\n <TextStyle>\n {'Sections are intended to be used as rows within your email. They will be used to structure the layout.'}\n </TextStyle>\n <TextStyle>\n {'Sections cannot nest in sections. Columns can nest in sections; all content must be in a column.'}\n </TextStyle>\n </Stack>\n );\n },\n component: SectionBlockItem,\n },\n {\n type: AdvancedType.GROUP,\n get title() {\n return 'Group';\n },\n get description() {\n return 'Group allows you to prevent columns from stacking on mobile. To do so, wrap the columns inside a group block, so they\"ll stay side by side on mobile.';\n },\n component: GroupBlockItem,\n },\n {\n type: AdvancedType.COLUMN,\n get title() {\n return 'Column';\n },\n get description() {\n return (\n <Stack\n vertical\n spacing=\"none\"\n >\n <TextStyle>\n {'Columns enable you to horizontally organize the content within your sections. They must be located under \"Section\" block in order to be considered by the engine. To be responsive, columns are expressed in terms of percentage.'}\n </TextStyle>\n <TextStyle>\n {'Every single column has to contain something because they are responsive containers, and will be vertically stacked on a mobile view.'}\n </TextStyle>\n </Stack>\n );\n },\n component: ColumnBlockItem,\n },\n ],\n },\n];\n","import { Card, Tabs } from 'antd';\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\nimport styles from './index.module.scss';\nimport { createPortal } from 'react-dom';\nimport { IconFont, Stack, useHoverIdx } from '@thanhpv102/easy-email-editor';\nimport { BlockMarketCategory, BlockMarketManager } from '../../utils/BlockMarketManager';\nimport { defaultCategories } from './presetTemplate';\nimport { Help } from '@extensions/AttributePanel/components/UI/Help';\nimport { getIconNameByBlockType } from '@extensions/utils/getIconNameByBlockType';\n\nBlockMarketManager.addCategories(defaultCategories);\n\nexport const BlocksPanel: React.FC<{\n children: React.ReactNode | React.ReactElement;\n}> = props => {\n const { isDragging } = useHoverIdx();\n const [visible, setVisible] = useState(false);\n const [categories, setCategories] = useState<BlockMarketCategory[]>(\n BlockMarketManager.getCategories(),\n );\n\n useEffect(() => {\n if (!isDragging) {\n setVisible(false);\n }\n }, [isDragging]);\n\n useEffect(() => {\n const onChange = (c: BlockMarketCategory[]) => {\n setCategories(c);\n };\n BlockMarketManager.subscribe(onChange);\n return () => {\n BlockMarketManager.subscribe(onChange);\n };\n }, []);\n\n const toggleVisible = useCallback(() => {\n setVisible(v => !v);\n }, []);\n\n const filterCategories = useMemo(() => {\n return categories.filter(item => item.blocks.length > 0);\n }, [categories]);\n\n return useMemo(\n () => (\n <div\n style={{ position: 'relative' }}\n >\n <div onClick={toggleVisible}>{props.children}</div>\n\n <>\n {visible &&\n createPortal(\n <div\n className={styles.BlocksPanel}\n style={{\n pointerEvents: isDragging ? 'none' : undefined,\n position: 'fixed',\n width: isDragging ? 0 : 650,\n backgroundColor: 'var(--color-bg-2)',\n zIndex: 9999,\n left: 60,\n top: 0,\n maxHeight: '85vh',\n transition: 'width .5s',\n boxShadow:\n '0 1px 5px 0 rgb(0 0 0 / 12%), 0 2px 10px 0 rgb(0 0 0 / 8%), 0 1px 20px 0 rgb(0 0 0 / 8%)',\n }}\n >\n <Card\n styles={{ body: { padding: 0 } }}\n title='Drag block'\n extra={\n (\n <div className={styles.closeBtn}>\n <IconFont\n iconName='icon-close'\n onClick={toggleVisible}\n />\n </div>\n )\n }\n >\n <Tabs\n tabPlacement='start'\n size='large'\n items={filterCategories.map((category, index) => ({\n key: category.title,\n label: (\n <div\n style={{\n paddingTop: index === 0 ? 5 : undefined,\n paddingBottom: 10,\n }}\n >\n {category.title}\n </div>\n ),\n children: (\n <div\n style={{\n padding: 0,\n overflow: 'auto',\n height: 550,\n }}\n >\n <BlockPanelItem category={category} />\n </div>\n ),\n }))}\n />\n </Card>\n </div>,\n document.body,\n )}\n </>\n </div>\n ),\n [filterCategories, isDragging, props.children, toggleVisible, visible],\n );\n};\n\nconst BlockPanelItem: React.FC<{\n category: BlockMarketCategory;\n}> = React.memo(props => {\n return (\n <Tabs\n tabPlacement='start'\n style={{ '--ant-tabs-vertical-item-padding': '2px 20px', paddingTop: 15, fontSize: 10 } as React.CSSProperties}\n items={props.category.blocks.map((block) => ({\n key: block.title,\n label: (\n <Stack\n alignment='center'\n spacing='extraTight'\n >\n <IconFont\n iconName={getIconNameByBlockType(block.type)}\n style={{ fontSize: 16 }}\n />\n <div className={styles.blockItem}>{block.title}</div>\n {block.description && <Help title={block.description} />}\n </Stack>\n ),\n children: (\n <div\n className='small-scrollbar'\n style={{\n maxHeight: '100%',\n overflow: 'auto',\n paddingRight: 10,\n overflowX: 'hidden',\n padding: '24px 48px 24px 24px',\n height: 500,\n }}\n >\n {block.component && <block.component />}\n </div>\n ),\n }))}\n />\n );\n});\n","import { IconFont, BlockAvatarWrapper } from '@thanhpv102/easy-email-editor';\r\nimport { Button } from 'antd';\r\nimport { getIconNameByBlockType } from '@extensions';\r\nimport React from 'react';\r\nimport { BlockManager, IBlockData, RecursivePartial } from '@thanhpv102/easy-email-core';\r\n\r\nexport interface DragIconProps<T extends IBlockData> {\r\n type: string;\r\n payload?: RecursivePartial<T>;\r\n color: string;\r\n}\r\n\r\nexport function DragIcon<T extends IBlockData = any>(props: DragIconProps<T>) {\r\n const block = BlockManager.getBlockByType(props.type);\r\n return (\r\n <BlockAvatarWrapper type={props.type} payload={props.payload}>\r\n <Button\r\n type='text'\r\n title={block?.name}\r\n style={{\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n padding: 0,\r\n width: '100%',\r\n height: '100%',\r\n }}\r\n icon={(\r\n <IconFont\r\n iconName={getIconNameByBlockType(props.type)}\r\n style={{\r\n fontSize: 16,\r\n textAlign: 'center',\r\n cursor: 'move',\r\n color: props.color,\r\n }}\r\n />\r\n )}\r\n />\r\n </BlockAvatarWrapper>\r\n );\r\n}\r\n","/* eslint-disable react/jsx-wrap-multilines */\n\nimport { AdvancedType, IButton, IImage } from '@thanhpv102/easy-email-core';\nimport { IconFont, Stack } from '@thanhpv102/easy-email-editor';\nimport React, { useRef } from 'react';\nimport { BlocksPanel } from './components/BlocksPanel';\nimport { DragIcon } from './components/DragIcon';\n\nexport function ShortcutToolbar() {\n const blocksPanelRef = useRef<HTMLDivElement>(null);\n\n return (\n <Stack vertical alignment='center' distribution='center'>\n <BlocksPanel>\n <div ref={blocksPanelRef} />\n </BlocksPanel>\n <DragIcon type={AdvancedType.TEXT} color='rgb(110, 215, 135)' payload={{ attributes: { padding: '0px 25px 0px 25px', 'align': 'center' } }} />\n <DragIcon<IImage> payload={{ attributes: { padding: '0px 0px 0px 0px' } }} type={AdvancedType.IMAGE} color='rgb(250, 208, 97)' />\n <DragIcon<IButton> type={AdvancedType.BUTTON} color='rgb(238,144,172)' />\n <DragIcon type={AdvancedType.SOCIAL} color='rgb(111,206,236) ' />\n <DragIcon type={AdvancedType.NAVBAR} color='rgb(191,24,84)' />\n <DragIcon type={AdvancedType.DIVIDER} color='rgb(71,67,239)' />\n <DragIcon type={AdvancedType.SPACER} color='#ccc' />\n <DragIcon type={AdvancedType.TABLE} color='#ddd' />\n <DragIcon\n color='rgb(24,201,137)'\n payload={{\n children: [\n {\n type: AdvancedType.COLUMN,\n data: {\n value: {},\n },\n attributes: {\n padding: '0px 0px 0px 0px',\n border: 'none',\n 'vertical-align': 'top',\n },\n children: [],\n },\n {\n type: AdvancedType.COLUMN,\n data: {\n value: {},\n },\n attributes: {\n padding: '0px 0px 0px 0px',\n border: 'none',\n 'vertical-align': 'top',\n },\n children: [],\n },\n ],\n }}\n type={AdvancedType.SECTION}\n />\n\n <div\n style={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: 30,\n height: 30,\n borderRadius: '50%',\n cursor: 'pointer',\n color: 'var(--color-text-2)',\n boxShadow: '0 0 12px -3px var(--color-text-2)',\n }}\n onClick={() => blocksPanelRef.current?.click()}\n >\n <IconFont\n iconName='icon-more'\n style={{\n fontSize: 18,\n margin: 0,\n padding: 0,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n lineHeight: 1,\n verticalAlign: 'middle',\n height: '1em',\n }}\n />\n </div>\n </Stack>\n );\n}\n","import mjml from 'mjml-browser';\nimport { IBlockData, BlockType, BasicType, BlockManager } from '@thanhpv102/easy-email-core';\nimport { MjmlToJson } from './MjmlToJson';\n\nconst domParser = new DOMParser();\nexport function parseXMLtoBlock(text: string) {\n const dom = domParser.parseFromString(text, 'text/xml');\n const root = dom.firstChild as Element;\n if (!(dom.firstChild instanceof Element)) {\n throw new Error('Invalid content');\n }\n if (root.tagName === 'mjml') {\n const { json } = mjml(text, {\n validationLevel: 'soft',\n });\n const parseValue = MjmlToJson(json);\n return parseValue;\n }\n\n const transform = (node: Element): IBlockData => {\n if (node.tagName === 'parsererror') {\n throw new Error('Invalid content');\n }\n const attributes: IBlockData['attributes'] = {};\n node.getAttributeNames().forEach((name) => {\n attributes[name] = node.getAttribute(name);\n });\n const type = node.tagName.replace('mj-', '');\n\n if (!BlockManager.getBlockByType(type)) {\n if (!node.parentElement || node.parentElement.tagName !== 'mj-text')\n throw new Error('Invalid content');\n }\n\n const block: IBlockData = {\n type: type as BlockType,\n attributes: attributes,\n data: {\n value: {\n content: node.textContent?.trim(),\n },\n },\n children: [...node.children]\n .filter((item) => item instanceof Element)\n .map(transform as any),\n };\n\n switch (type) {\n case BasicType.TEXT:\n block.data.value.content = node.innerHTML;\n block.children = [];\n }\n\n return block;\n };\n\n return transform(root);\n}\n","import { BlockManager,IPage, BasicType, IBlockData } from '@thanhpv102/easy-email-core';\nimport { identity, isString, pickBy } from 'lodash';\nimport { parseXMLtoBlock } from './parseXMLtoBlock';\n\nexport function MjmlToJson(data: MjmlBlockItem | string): IPage {\n if (isString(data)) return parseXMLtoBlock(data);\n\n const transform = (item: IChildrenItem): IBlockData => {\n const attributes = item.attributes as any;\n\n switch (item.tagName) {\n case 'mjml':\n const body = item.children?.find((item) => item.tagName === 'mj-body')!;\n const head = item.children?.find((item) => item.tagName === 'mj-head');\n const metaData = getMetaDataFromMjml(head);\n\n const fonts =\n head?.children\n ?.filter((child) => child.tagName === 'mj-font')\n .map((child) => ({\n name: child.attributes.name,\n href: child.attributes.href,\n })) || [];\n\n const mjAttributes =\n head?.children?.find((item) => item.tagName === 'mj-attributes')\n ?.children || [];\n\n const headStyles = head?.children\n ?.filter((item) => item.tagName === 'mj-style')\n .map((item) => ({ content: item.content, inline: item.inline }));\n\n const headAttributes = [\n ...new Set(\n mjAttributes\n .filter((item) => {\n const isFontFamily =\n item.tagName === 'mj-all' &&\n item.attributes['font-family'] === metaData['font-family'];\n const isTextColor =\n item.tagName === 'mj-text' &&\n item.attributes['color'] === metaData['text-color'];\n const isContentColor =\n ['mj-wrapper', 'mj-section'].includes(item.tagName) &&\n item.attributes['background-color'] ===\n metaData['content-background-color'];\n return !isFontFamily && !isTextColor && !isContentColor;\n })\n .map(\n (item) =>\n `<${item.tagName} ${Object.keys(item.attributes)\n .map((key) => `${key}=\"${item.attributes[key]}\"`)\n .join(' ')} />`\n )\n ),\n ].join('\\n');\n\n const breakpoint = head?.children?.find(\n (item) => item.tagName === 'mj-breakpoint'\n );\n\n return BlockManager.getBlockByType<IPage>(BasicType.PAGE)!.create({\n attributes: body.attributes,\n children: body.children?.map(transform),\n data: {\n value: {\n headAttributes: headAttributes,\n headStyles: headStyles,\n fonts,\n breakpoint: breakpoint?.attributes.width,\n ...metaData,\n },\n },\n });\n\n default:\n const tag = item.tagName.replace('mj-', '').toLowerCase();\n\n const block = BlockManager.getBlockByType(tag as any);\n if (!block) {\n throw new Error(`${tag} block no found `);\n }\n const payload: IBlockData<any> = {\n type: block.type,\n attributes: attributes,\n data: {\n value: {},\n },\n children: [],\n };\n\n if (item.content) {\n payload.data.value.content = item.content;\n }\n\n if (block.type === BasicType.CAROUSEL) {\n payload.data.value.images =\n item.children?.map((child) => {\n return child.attributes;\n }) || [];\n payload.children = [];\n } else if (block.type === BasicType.NAVBAR) {\n payload.data.value.links =\n item.children?.map((child) => {\n const navbarLinkData = {\n // default config\n color: '#1890ff',\n 'font-size': '13px',\n target: '_blank',\n padding: '15px 10px',\n\n ...child.attributes,\n content: child.content,\n };\n formatPadding(navbarLinkData, 'padding');\n return navbarLinkData;\n }) || [];\n payload.children = [];\n } else if (block.type === BasicType.SOCIAL) {\n payload.data.value.elements =\n item.children?.map((child) => {\n return {\n ...child.attributes,\n content: child.content,\n };\n }) || [];\n payload.children = [];\n } else if (item.children) {\n payload.children = item.children.map(transform);\n }\n\n const blockData = block.create(payload);\n\n // format padding\n formatPadding(blockData.attributes, 'padding');\n formatPadding(blockData.attributes, 'inner-padding');\n return blockData;\n }\n };\n\n return transform(data);\n}\n\nexport function getMetaDataFromMjml(data?: IChildrenItem): {\n [key: string]: any;\n} {\n const mjmlHtmlAttributes = data?.children\n ?.filter((item) => item.tagName === 'mj-html-attributes')\n .map((item) => item.children)\n .flat()\n .filter((item) => item && item.attributes.class === 'easy-email')\n .reduce((obj: { [key: string]: any; }, item) => {\n if (!item) return obj;\n const name = item.attributes['attribute-name'];\n const isMultipleAttributes = Boolean(\n item.attributes['multiple-attributes']\n );\n obj[name] = isMultipleAttributes\n ? pickBy(\n {\n ...item.attributes,\n 'attribute-name': undefined,\n 'multiple-attributes': undefined,\n class: undefined,\n },\n identity\n )\n : item.attributes[name];\n return obj;\n }, {});\n\n return pickBy(mjmlHtmlAttributes, identity);\n}\n\nfunction formatPadding(\n attributes: IBlockData['attributes'],\n attributeName: 'padding' | 'inner-padding'\n) {\n const ele = document.createElement('div');\n Object.keys(attributes).forEach((key: string) => {\n if (new RegExp(`^${attributeName}`).test(key)) {\n const formatKey = new RegExp(`^${attributeName}(.*)`).exec(key)?.[0];\n\n if (formatKey) {\n ele.style[formatKey as any] = attributes[key];\n delete attributes[key];\n }\n }\n });\n const newPadding = [\n ele.style.paddingTop,\n ele.style.paddingRight,\n ele.style.paddingBottom,\n ele.style.paddingLeft,\n ]\n .filter(Boolean)\n .join(' ');\n\n if (newPadding) {\n attributes[attributeName] = newPadding;\n }\n}\n",".customTextArea {\n font-size: 12px !important;\n line-height: 1.5 !important;\n padding: 8px 8px !important;\n\n &[readonly] {\n color: var(--color-text-2);\n &:hover {\n border-color: var(--color-neutral-3);\n }\n &:focus {\n border-color: var(--color-neutral-3);\n background-color: transparent;\n box-shadow: none;\n }\n }\n}\n\n.collapsePanel {\n border: none !important;\n :global {\n .ant-collapse-item {\n border-top: none !important;\n border-right: none !important;\n border-left: none !important;\n }\n\n .ant-collapse-header {\n padding: 8px 16px !important;\n min-height: 32px !important;\n font-size: 12px !important;\n }\n\n .ant-collapse-content-box {\n padding: 8px 12px !important;\n }\n }\n}\n\n","import { Collapse, Input, App } from 'antd';\nimport { BasicType, BlockManager, getPageIdx, getParentByIdx, IBlockData, JsonToMjml } from '@thanhpv102/easy-email-core';\nimport { useBlock, useEditorContext, useEditorProps, useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport { cloneDeep } from 'lodash';\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\nimport { MjmlToJson } from '@extensions/utils/MjmlToJson';\nimport styles from './index.module.scss';\n\nexport function SourceCodePanel({ jsonReadOnly, mjmlReadOnly }: { jsonReadOnly: boolean; mjmlReadOnly: boolean }) {\n const { setValueByIdx, focusBlock, values } = useBlock();\n const { focusIdx } = useFocusIdx();\n const { message } = App.useApp();\n\n const [mjmlText, setMjmlText] = useState('');\n const { pageData } = useEditorContext();\n const { mergeTags } = useEditorProps();\n\n const code = useMemo(() => {\n if (!focusBlock) return '';\n return JSON.stringify(focusBlock, null, 2) || '';\n }, [focusBlock]);\n\n const onChangeCode = useCallback(\n (event: React.FocusEvent<HTMLTextAreaElement>) => {\n if (!jsonReadOnly) {\n try {\n const parseValue = JSON.parse(event.target.value) as IBlockData;\n\n const block = BlockManager.getBlockByType(parseValue.type);\n if (!block) {\n throw new Error(t('Invalid content'));\n }\n if (\n !parseValue.data ||\n !parseValue.data.value ||\n !parseValue.attributes ||\n !Array.isArray(parseValue.children)\n ) {\n throw new Error(t('Invalid content'));\n }\n setValueByIdx(focusIdx, parseValue);\n } catch (error: unknown) {\n const errorMessage = error instanceof Error ? error.message : String(error);\n message.error(errorMessage);\n }\n }\n },\n [focusIdx, setValueByIdx, jsonReadOnly, message],\n );\n\n const onMjmlChange = useCallback(\n (event: React.FocusEvent<HTMLTextAreaElement>) => {\n if (!mjmlReadOnly) {\n try {\n const parseValue = MjmlToJson(event.target.value);\n if (parseValue.type !== BasicType.PAGE as string) {\n const parentBlock = values && getParentByIdx(values, focusIdx)!;\n const parseBlock = BlockManager.getBlockByType(parseValue.type);\n\n if (!parseBlock?.validParentType.includes(parentBlock?.type || '')) {\n throw new Error(t('Invalid content'));\n }\n } else if (focusIdx !== getPageIdx()) {\n throw new Error(t('Invalid content'));\n }\n\n setValueByIdx(focusIdx, parseValue);\n } catch {\n message.error(t('Invalid content'));\n }\n }\n },\n [focusIdx, setValueByIdx, values, mjmlReadOnly, message],\n );\n\n const onChangeMjmlText = useCallback((event: React.ChangeEvent<HTMLTextAreaElement>) => {\n setMjmlText(event.target.value);\n }, []);\n\n useEffect(() => {\n if (focusBlock) {\n setMjmlText(\n JsonToMjml({\n idx: focusIdx,\n data: focusBlock,\n context: pageData,\n mode: 'production',\n dataSource: cloneDeep(mergeTags),\n }),\n );\n }\n }, [focusBlock, focusIdx, pageData, mergeTags]);\n\n if (!focusBlock) return null;\n\n const collapseItems = [\n {\n key: 'json',\n label: t('Json source'),\n children: (\n <Input.TextArea\n key={code}\n defaultValue={code}\n autoSize={{ maxRows: 25 }}\n onBlur={onChangeCode}\n readOnly={jsonReadOnly}\n className={styles.customTextArea}\n />\n ),\n },\n {\n key: 'mjml',\n label: t('MJML source'),\n children: (\n <Input.TextArea\n key={code}\n value={mjmlText}\n autoSize={{ maxRows: 25 }}\n onChange={onChangeMjmlText}\n onBlur={onMjmlChange}\n readOnly={mjmlReadOnly}\n className={styles.customTextArea}\n />\n ),\n },\n ];\n\n return (\n <Collapse className={styles.collapsePanel} items={collapseItems} />\n );\n}\n","import React from 'react';\nimport { BasicType, getParentIdx, getSiblingIdx } from '@thanhpv102/easy-email-core';\nimport { useBlock, useFocusIdx, useEditorProps, isTextBlock } from '@thanhpv102/easy-email-editor';\nimport { classnames } from '@extensions/utils/classnames';\nimport { useAddToCollection } from '@extensions/hooks/useAddToCollection';\nimport { getBlockTitle } from '@extensions/utils/getBlockTitle';\n\nexport function Toolbar() {\n const { moveBlock, copyBlock, removeBlock, focusBlock } = useBlock();\n const { focusIdx, setFocusIdx } = useFocusIdx();\n const { modal, setModalVisible } = useAddToCollection();\n const props = useEditorProps();\n\n const isPage = focusBlock?.type === BasicType.PAGE.toString();\n const isText = isTextBlock(focusBlock?.type);\n\n const handleMoveUp = () => {\n moveBlock(focusIdx, getSiblingIdx(focusIdx, -1));\n };\n\n const handleMoveDown = () => {\n moveBlock(focusIdx, getSiblingIdx(focusIdx, 1));\n };\n\n const handleAddToCollection = () => {\n if (document.activeElement instanceof HTMLElement) {\n document.activeElement.blur();\n }\n setModalVisible(true);\n };\n\n const handleCopy: React.MouseEventHandler<HTMLDivElement> = (ev) => {\n if (document.activeElement instanceof HTMLElement) {\n document.activeElement.blur();\n }\n copyBlock(focusIdx);\n };\n\n const handleDelete = () => {\n if (document.activeElement instanceof HTMLElement) {\n document.activeElement.blur();\n }\n removeBlock(focusIdx);\n };\n\n const handleSelectParent = () => {\n if (document.activeElement instanceof HTMLElement) {\n document.activeElement.blur();\n }\n setFocusIdx(getParentIdx(focusIdx)!);\n };\n\n if (isText) return null;\n return (\n <>\n <div\n id='easy-email-extensions-InteractivePrompt-Toolbar'\n style={{\n height: 0,\n\n zIndex: 100,\n }}\n >\n <div\n style={{\n fontSize: 14,\n lineHeight: '22px',\n pointerEvents: 'auto',\n color: '#ffffff',\n transform: 'translateY(-100%)',\n display: 'inline-flex',\n // justifyContent: 'space-between',\n }}\n >\n <div\n style={{\n color: '#ffffff',\n backgroundColor: 'var(--selected-color)',\n height: '22px',\n\n display: 'inline-flex',\n padding: '1px 5px',\n boxSizing: 'border-box',\n whiteSpace: 'nowrap',\n maxWidth: 300,\n overflow: 'hidden',\n }}\n >\n {focusBlock && getBlockTitle(focusBlock, false)}\n </div>\n <div\n onClick={(e) => {\n e.stopPropagation();\n }}\n onMouseDown={(ev) => {\n ev.preventDefault();\n }}\n style={{\n display: isPage ? 'none' : 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n pointerEvents: 'auto',\n }}\n >\n <ToolItem\n width={12}\n iconName='icon-back-parent'\n onClick={handleSelectParent}\n />\n <ToolItem iconName='icon-copy' onClick={handleCopy} />\n {props.onAddCollection && (\n <ToolItem\n iconName='icon-collection'\n onClick={handleAddToCollection}\n />\n )}\n <ToolItem iconName='icon-delete' onClick={handleDelete} />\n </div>\n </div>\n </div>\n {modal}\n </>\n );\n}\n\nfunction ToolItem(props: {\n iconName: string;\n onClick: React.MouseEventHandler<HTMLDivElement>;\n width?: number;\n}) {\n return (\n <div\n onClick={props.onClick}\n style={{\n color: '#ffffff',\n backgroundColor: 'var(--selected-color)',\n height: 22,\n fontSize: props.width || 14,\n lineHeight: '22px',\n width: 22,\n display: 'flex',\n pointerEvents: 'auto',\n cursor: 'pointer',\n justifyContent: 'center',\n }}\n className={classnames('iconfont', props.iconName)}\n />\n );\n}\n","import React from 'react';\n\nimport { BasicType } from '@thanhpv102/easy-email-core';\nimport { createPortal } from 'react-dom';\nimport { IconFont, useBlock, useFocusIdx, BlockAvatarWrapper, useFocusBlockLayout } from '@thanhpv102/easy-email-editor';\nimport { Toolbar } from './Toolbar';\n\nexport function FocusTooltip() {\n const { focusBlock } = useBlock();\n const { focusIdx } = useFocusIdx();\n const { focusBlockNode, focusBlockPortalNode } = useFocusBlockLayout();\n const isPage = focusBlock?.type === BasicType.PAGE.toString();\n\n if (!focusBlockNode || !focusBlockPortalNode || !focusBlock) return null;\n\n return (\n <>\n {createPortal(\n <div\n id='easy-email-extensions-InteractivePrompt-FocusTooltip'\n style={{\n position: 'absolute',\n width: '100%',\n height: '100%',\n pointerEvents: 'none',\n left: 0,\n top: 0,\n zIndex: 1,\n }}\n >\n <style>\n {`\n .email-block {\n position: relative;\n }\n\n `}\n </style>\n <div\n style={{\n position: 'absolute',\n zIndex: 9999,\n right: 0,\n top: '50%',\n display: isPage ? 'none' : undefined,\n }}\n >\n <BlockAvatarWrapper\n idx={focusIdx}\n type={focusBlock.type}\n action='move'\n >\n <div\n style={\n {\n position: 'absolute',\n backgroundColor: 'var(--selected-color)',\n color: '#ffffff',\n height: '28px',\n width: '28px',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n borderRadius: '50%',\n cursor: 'grab',\n pointerEvents: 'auto',\n WebkitUserDrag: 'element',\n } as any\n }\n >\n <IconFont\n iconName='icon-move'\n style={{ color: '#fff', cursor: 'grab' }}\n />\n </div>\n </BlockAvatarWrapper>\n </div>\n\n {/* outline */}\n <div\n style={{\n position: 'absolute',\n fontSize: 14,\n zIndex: 2,\n left: 0,\n top: 0,\n width: '100%',\n height: '100%',\n outlineOffset: '-2px',\n outline: '2px solid var(--selected-color)',\n }}\n />\n <div\n style={{\n position: 'absolute',\n fontSize: 14,\n zIndex: 3,\n left: 0,\n top: 0,\n width: '0%',\n height: '100%',\n }}\n >\n <Toolbar />\n </div>\n </div>,\n\n focusBlockPortalNode as Element\n )}\n </>\n );\n}\n","import { getBlockNodeByIdx } from '@thanhpv102/easy-email-editor';\n\nexport function awaitForElement<T extends HTMLElement>(idx: string) {\n\n let promiseObj: { cancel: () => void; promise: Promise<T>; } = {\n cancel: () => { },\n promise: Promise.resolve() as any\n };\n promiseObj.promise = new Promise<T>((resolve) => {\n const ele = getBlockNodeByIdx(idx) as T;\n if (ele) {\n resolve(ele);\n return;\n }\n\n const timer = setInterval(() => {\n const ele = getBlockNodeByIdx(idx) as T;\n\n if (ele) {\n resolve(ele);\n clearInterval(timer);\n }\n }, 50) as any;\n\n promiseObj.cancel = () => {\n clearInterval(timer);\n };\n });\n\n return promiseObj;\n\n}","\nimport React, { useEffect, useMemo, useRef, useState } from 'react';\n\nimport { getNodeTypeFromClassName, BlockManager } from '@thanhpv102/easy-email-core';\nimport { createPortal } from 'react-dom';\nimport { getEditorRoot, useEditorContext, useFocusIdx, useHoverIdx, useLazyState, getValidPortalNode } from '@thanhpv102/easy-email-editor';\nimport { awaitForElement } from '@extensions/utils/awaitForElement';\n\nexport function HoverTooltip() {\n const { hoverIdx, direction, isDragging } = useHoverIdx();\n const lazyHoverIdx = useLazyState(hoverIdx, 60);\n const effectiveHoverIdx = isDragging ? hoverIdx : lazyHoverIdx;\n const { focusIdx } = useFocusIdx();\n const [isTop, setIsTop] = useState(false);\n const { initialized } = useEditorContext();\n\n const [blockNode, setBlockNode] = useState<HTMLDivElement | null>(null);\n const [portalNode, setPortalNode] = useState<HTMLDivElement | null>(null);\n const rootRef = useRef<DOMRect | null>(null);\n\n useEffect(() => {\n if (initialized) {\n rootRef.current = getEditorRoot()!.getBoundingClientRect();\n }\n }, [initialized]);\n\n useEffect(() => {\n const rootBounds = rootRef.current;\n if (!initialized) return;\n\n if (effectiveHoverIdx) {\n const promiseObj = awaitForElement<HTMLDivElement>(effectiveHoverIdx);\n promiseObj.promise.then(blockNode => {\n if (rootBounds) {\n const { top } = blockNode.getBoundingClientRect();\n setIsTop(rootBounds.top === top);\n }\n\n setBlockNode(blockNode);\n setPortalNode(getValidPortalNode(blockNode) as HTMLDivElement);\n }).catch(() => {\n // Element not found, ignore\n });\n\n return () => {\n promiseObj.cancel();\n };\n } else {\n setBlockNode(null);\n setPortalNode(null);\n }\n }, [effectiveHoverIdx, initialized]);\n\n const block = useMemo(() => {\n return blockNode\n ? BlockManager.getBlockByType(getNodeTypeFromClassName(blockNode.classList)!)\n : null;\n }, [blockNode]);\n\n // When dragging, always show tooltip even if it's the focused block\n if (!isDragging && focusIdx === hoverIdx) return null;\n if (!block || !blockNode || !portalNode) return null;\n\n\n return (\n <>\n {createPortal(\n <div\n id='easy-email-extensions-InteractivePrompt-HoverTooltip'\n style={{\n position: 'absolute',\n height: '100%',\n width: '100%',\n top: 0,\n left: 0,\n zIndex: 2,\n pointerEvents: 'none',\n }}\n >\n <TipNode\n type={isDragging ? 'drag' : 'hover'}\n lineWidth={1}\n title={block.name}\n direction={isTop && direction === 'top' ? 'noEnoughTop' : direction}\n isDragging={isDragging}\n />\n </div>,\n portalNode,\n )}\n </>\n );\n}\n\ninterface TipNodeProps {\n title: string;\n direction?: string;\n isDragging?: boolean;\n lineWidth: number;\n type: 'drag' | 'hover';\n}\n\nfunction TipNode(props: TipNodeProps) {\n const { direction = 'none', title, lineWidth, type } = props;\n\n const dragTitle = useMemo(() => {\n if (direction === 'top' || direction === 'noEnoughTop') {\n return `${'Insert before'} ${title}`;\n } else if (direction === 'bottom') {\n return `${'Insert after'} ${title}`;\n } else if (direction === 'right' || direction === 'left') {\n return 'Drag here';\n }\n return `${'Drag to'} ${title}`;\n }, [direction, title]);\n\n const color = useMemo(() => {\n return 'var(--hover-color, #1890ff)';\n }, []);\n\n return (\n <div\n style={{\n position: 'absolute',\n left: 0,\n top: 0,\n fontSize: 14,\n zIndex: 1,\n color: '#000',\n width: '100%',\n height: '100%',\n pointerEvents: 'none',\n textAlign: 'left',\n }}\n >\n <style>\n {`\n .email-block {\n position: relative;\n }\n\n `}\n </style>\n {/* outline */}\n <div\n style={{\n position: 'absolute',\n left: 0,\n top: 0,\n width: '100%',\n height: '100%',\n outlineOffset: `-${lineWidth}px`,\n outline: `${lineWidth}px solid ${color}`,\n }}\n >\n {type === 'hover' && (\n <div\n style={{\n position: 'absolute',\n left: 0,\n top: 0,\n }}\n >\n <div\n style={{\n backgroundColor: color,\n color: '#ffffff',\n height: '22px',\n lineHeight: '22px',\n display: 'inline-flex',\n padding: '1px 5px',\n boxSizing: 'border-box',\n whiteSpace: 'nowrap',\n fontFamily: 'sans-serif',\n transform: 'translateY(-100%)',\n }}\n >\n {title}\n </div>\n </div>\n )}\n </div>\n\n {/* drag direction tip */}\n {props.isDragging && (\n <div\n style={{\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n ...(directionImage[direction] || directionImage.none),\n }}\n >\n <div\n style={{\n position: 'absolute',\n color: '#ffffff',\n backgroundColor: color,\n lineHeight: '22px',\n display: 'inline-flex',\n maxWidth: '100%',\n textAlign: 'center',\n whiteSpace: 'nowrap',\n padding: '1px 5px',\n\n ...(positionStyleMap[direction] || positionStyleMap.none),\n }}\n >\n {dragTitle}\n </div>\n </div>\n )}\n </div>\n );\n}\n\nconst positionStyleMap: Record<string, React.CSSProperties> = {\n noEnoughTop: {\n top: '0%',\n left: '50%',\n padding: '1px 5px',\n transform: 'translate(-50%, 0%)',\n },\n top: {\n top: '0%',\n left: '50%',\n padding: '1px 5px',\n transform: 'translate(-50%, -50%)',\n },\n bottom: {\n top: '100%',\n left: '50%',\n padding: '1px 5px',\n transform: 'translate(-50%, -50%)',\n },\n left: {\n top: '50%',\n left: '0%',\n padding: '5px 1px',\n writingMode: 'vertical-lr',\n transform: 'translate(0, -50%)',\n },\n right: {\n top: '50%',\n right: '0%',\n padding: '5px 1px',\n writingMode: 'vertical-lr',\n transform: 'translate(0, -50%)',\n },\n none: {\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n },\n};\n\nconst directionImage: Record<string, React.CSSProperties> = {\n top: {\n backgroundImage: `linear-gradient(\n to bottom,\n var(--hover-color) 3px ,\n transparent 3px\n )`,\n },\n bottom: {\n backgroundImage: `linear-gradient(\n to top,\n var(--hover-color) 3px ,\n transparent 3px\n )`,\n },\n left: {\n backgroundImage: `linear-gradient(\n to right,\n var(--hover-color) 3px ,\n transparent 3px\n )`,\n },\n right: {\n backgroundImage: `linear-gradient(\n to left,\n var(--hover-color) 3px ,\n transparent 3px\n )`,\n },\n none: {},\n};\n","import React from 'react';\r\nimport { FocusTooltip } from './components/FocusTooltip';\r\nimport { HoverTooltip } from './components/HoverTooltip';\r\n\r\nexport function InteractivePrompt() {\r\n return (\r\n <>\r\n <HoverTooltip />\r\n <FocusTooltip />\r\n\r\n </>\r\n );\r\n}\r\n",".SimpleLayout {\n :global {\n .arco-layout-sider-children {\n overflow-x: hidden;\n .arco-tabs-content {\n padding: 0;\n }\n }\n .arco-collapse-item-content-expanded {\n overflow: visible;\n }\n }\n *::-webkit-scrollbar {\n -webkit-appearance: none;\n width: 8px !important;\n }\n\n *::-webkit-scrollbar-thumb {\n background-color: rgba(0, 0, 0, 0.5);\n box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);\n -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);\n }\n}\n\n.rightSide {\n width: 450px !important;\n min-width: 350px !important;\n max-width: 450px !important;\n :global {\n .arco-tabs-header {\n }\n .arco-btn {\n padding: 4px 12px !important;\n font-size: 12px !important;\n height: 28px !important;\n }\n .arco-input {\n font-size: 12px !important;\n height: 28px !important;\n padding: 4px 8px !important;\n }\n .arco-select {\n font-size: 12px !important;\n }\n .arco-select-view {\n height: 28px !important;\n }\n .arco-form-item-label {\n font-size: 12px !important;\n }\n .arco-form-item-content {\n font-size: 12px !important;\n }\n textarea {\n font-size: 12px !important;\n padding: 4px 8px !important;\n }\n }\n}\n\n.customScrollBar {\n overflow: scroll;\n &::-webkit-scrollbar {\n -webkit-appearance: none;\n width: 8px !important;\n }\n\n &::-webkit-scrollbar-thumb {\n background-color: rgba(0, 0, 0, 0.5);\n box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);\n -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);\n }\n\n :global {\n .arco-tabs-content {\n padding: 0;\n }\n }\n}\n.layoutTabs {\n margin: 0;\n}\n\n.customScrollBarV2 {\n overflow: scroll;\n &::-webkit-scrollbar {\n -webkit-appearance: none;\n width: 8px !important;\n }\n\n &::-webkit-scrollbar-thumb {\n background-color: rgba(0, 0, 0, 0.5);\n box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);\n -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);\n }\n}\n","function _interopRequireDefault(e) {\n return e && e.__esModule ? e : {\n \"default\": e\n };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nconst locale = {\n // Options\n items_per_page: '/ page',\n jump_to: 'Go to',\n jump_to_confirm: 'confirm',\n page: 'Page',\n // Pagination\n prev_page: 'Previous Page',\n next_page: 'Next Page',\n prev_5: 'Previous 5 Pages',\n next_5: 'Next 5 Pages',\n prev_3: 'Previous 3 Pages',\n next_3: 'Next 3 Pages',\n page_size: 'Page Size'\n};\nvar _default = exports.default = locale;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.commonLocale = void 0;\nvar commonLocale = exports.commonLocale = {\n yearFormat: 'YYYY',\n dayFormat: 'D',\n cellMeridiemFormat: 'A',\n monthBeforeYear: true\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _common = require(\"./common\");\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : String(i); }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nvar locale = _objectSpread(_objectSpread({}, _common.commonLocale), {}, {\n locale: 'en_US',\n today: 'Today',\n now: 'Now',\n backToToday: 'Back to today',\n ok: 'OK',\n clear: 'Clear',\n week: 'Week',\n month: 'Month',\n year: 'Year',\n timeSelect: 'select time',\n dateSelect: 'select date',\n weekSelect: 'Choose a week',\n monthSelect: 'Choose a month',\n yearSelect: 'Choose a year',\n decadeSelect: 'Choose a decade',\n previousMonth: 'Previous month (PageUp)',\n nextMonth: 'Next month (PageDown)',\n previousYear: 'Last year (Control + left)',\n nextYear: 'Next year (Control + right)',\n previousDecade: 'Last decade',\n nextDecade: 'Next decade',\n previousCentury: 'Last century',\n nextCentury: 'Next century'\n});\nvar _default = exports.default = locale;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nconst locale = {\n placeholder: 'Select time',\n rangePlaceholder: ['Start time', 'End time']\n};\nvar _default = exports.default = locale;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _en_US = _interopRequireDefault(require(\"@rc-component/picker/locale/en_US\"));\nvar _en_US2 = _interopRequireDefault(require(\"../../time-picker/locale/en_US\"));\n// Merge into a locale object\nconst locale = {\n lang: {\n placeholder: 'Select date',\n yearPlaceholder: 'Select year',\n quarterPlaceholder: 'Select quarter',\n monthPlaceholder: 'Select month',\n weekPlaceholder: 'Select week',\n rangePlaceholder: ['Start date', 'End date'],\n rangeYearPlaceholder: ['Start year', 'End year'],\n rangeQuarterPlaceholder: ['Start quarter', 'End quarter'],\n rangeMonthPlaceholder: ['Start month', 'End month'],\n rangeWeekPlaceholder: ['Start week', 'End week'],\n ..._en_US.default\n },\n timePickerLocale: {\n ..._en_US2.default\n }\n};\n// All settings at:\n// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json\nvar _default = exports.default = locale;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _en_US = _interopRequireDefault(require(\"../../date-picker/locale/en_US\"));\nvar _default = exports.default = _en_US.default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _en_US = _interopRequireDefault(require(\"@rc-component/pagination/lib/locale/en_US\"));\nvar _en_US2 = _interopRequireDefault(require(\"../calendar/locale/en_US\"));\nvar _en_US3 = _interopRequireDefault(require(\"../date-picker/locale/en_US\"));\nvar _en_US4 = _interopRequireDefault(require(\"../time-picker/locale/en_US\"));\nconst typeTemplate = '${label} is not a valid ${type}';\nconst localeValues = {\n locale: 'en',\n Pagination: _en_US.default,\n DatePicker: _en_US3.default,\n TimePicker: _en_US4.default,\n Calendar: _en_US2.default,\n global: {\n placeholder: 'Please select',\n close: 'Close',\n sortable: 'sortable'\n },\n Table: {\n filterTitle: 'Filter menu',\n filterConfirm: 'OK',\n filterReset: 'Reset',\n filterEmptyText: 'No filters',\n filterCheckAll: 'Select all items',\n filterSearchPlaceholder: 'Search in filters',\n emptyText: 'No data',\n selectAll: 'Select current page',\n selectInvert: 'Invert current page',\n selectNone: 'Clear all data',\n selectionAll: 'Select all data',\n sortTitle: 'Sort',\n expand: 'Expand row',\n collapse: 'Collapse row',\n triggerDesc: 'Click to sort descending',\n triggerAsc: 'Click to sort ascending',\n cancelSort: 'Click to cancel sorting'\n },\n Tour: {\n Next: 'Next',\n Previous: 'Previous',\n Finish: 'Finish'\n },\n Modal: {\n okText: 'OK',\n cancelText: 'Cancel',\n justOkText: 'OK'\n },\n Popconfirm: {\n okText: 'OK',\n cancelText: 'Cancel'\n },\n Transfer: {\n titles: ['', ''],\n searchPlaceholder: 'Search here',\n itemUnit: 'item',\n itemsUnit: 'items',\n remove: 'Remove',\n selectCurrent: 'Select current page',\n removeCurrent: 'Remove current page',\n selectAll: 'Select all data',\n deselectAll: 'Deselect all data',\n removeAll: 'Remove all data',\n selectInvert: 'Invert current page'\n },\n Upload: {\n uploading: 'Uploading...',\n removeFile: 'Remove file',\n uploadError: 'Upload error',\n previewFile: 'Preview file',\n downloadFile: 'Download file'\n },\n Empty: {\n description: 'No data'\n },\n Icon: {\n icon: 'icon'\n },\n Text: {\n edit: 'Edit',\n copy: 'Copy',\n copied: 'Copied',\n expand: 'Expand',\n collapse: 'Collapse'\n },\n Form: {\n optional: '(optional)',\n defaultValidateMessages: {\n default: 'Field validation error for ${label}',\n required: 'Please enter ${label}',\n enum: '${label} must be one of [${enum}]',\n whitespace: '${label} cannot be a blank character',\n date: {\n format: '${label} date format is invalid',\n parse: '${label} cannot be converted to a date',\n invalid: '${label} is an invalid date'\n },\n types: {\n string: typeTemplate,\n method: typeTemplate,\n array: typeTemplate,\n object: typeTemplate,\n number: typeTemplate,\n date: typeTemplate,\n boolean: typeTemplate,\n integer: typeTemplate,\n float: typeTemplate,\n regexp: typeTemplate,\n email: typeTemplate,\n url: typeTemplate,\n hex: typeTemplate\n },\n string: {\n len: '${label} must be ${len} characters',\n min: '${label} must be at least ${min} characters',\n max: '${label} must be up to ${max} characters',\n range: '${label} must be between ${min}-${max} characters'\n },\n number: {\n len: '${label} must be equal to ${len}',\n min: '${label} must be minimum ${min}',\n max: '${label} must be maximum ${max}',\n range: '${label} must be between ${min}-${max}'\n },\n array: {\n len: 'Must be ${len} ${label}',\n min: 'At least ${min} ${label}',\n max: 'At most ${max} ${label}',\n range: 'The amount of ${label} must be between ${min}-${max}'\n },\n pattern: {\n mismatch: '${label} does not match the pattern ${pattern}'\n }\n }\n },\n QRCode: {\n expired: 'QR code expired',\n refresh: 'Refresh',\n scanned: 'Scanned'\n },\n ColorPicker: {\n presetEmpty: 'Empty',\n transparent: 'Transparent',\n singleColor: 'Single',\n gradientColor: 'Gradient'\n }\n};\nvar _default = exports.default = localeValues;","module.exports = require('../lib/locale/en_US');",".easy-email-merge-tag {\n font-size: inherit;\n outline: 1px solid rgb(78 89 105) !important;\n outline-offset: 0px;\n padding: 0px 8px;\n border-radius: 4px;\n cursor: default !important;\n transition: all 0.1s linear;\n border: none;\n font-weight: inherit;\n font-style: inherit;\n outline-color: rgb(0 160 172) !important;\n color: inherit;\n background-color: rgb(235 249 252);\n}\n\n.easy-email-merge-tag:hover:not(.easy-email-merge-tag-focus) {\n // outline-color: rgb(201 205 212) !important;\n // color: rgb(78 89 105);\n // background-color: rgb(229 230 235);\n}\n\n.easy-email-merge-tag-focus {\n // outline-color: rgb(0 160 172) !important;\n // color: rgb(78 89 105);\n // background-color: rgb(235 249 252);\n}\n\n.easy-email-merge-tag-popover {\n position: absolute;\n top: -10px;\n left: 50%;\n transform: translate(-50%, -100%);\n}\n\n.easy-email-merge-tag-popover {\n line-height: 1.3;\n background-color: #fff;\n width: 360px;\n border: 1px solid rgb(229 230 235);\n border-radius: 8px;\n position: absolute;\n top: calc(100% + 20px);\n left: 50%;\n transform: translate(-50%, 0%);\n z-index: 10;\n padding: 20px;\n font-family: -apple-system, BlinkMacSystemFont, San Francisco, Segoe UI,\n Roboto, Helvetica Neue, sans-serif;\n 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-merge-tag-popover-desc {\n font-size: 14px;\n color: rgb(109, 113, 117);\n }\n .easy-email-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 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 &:focus {\n outline: none;\n }\n }\n .easy-email-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-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 button {\n color: var(--selected-color);\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 &:focus {\n color: var(--selected-color);\n background-color: rgb(242 243 245);\n }\n &:hover {\n color: var(--selected-color);\n background-color: rgb(242 243 245);\n }\n }\n }\n\n .easy-email-merge-tag-popover-container {\n position: relative;\n z-index: 2;\n }\n}\n","\nimport {\n useEditorContext,\n useEditorProps,\n getShadowRoot,\n getBlockNodeByChildEle,\n IconFont,\n useRefState,\n getEditorRoot,\n} from '@thanhpv102/easy-email-editor';\nimport { get } from 'lodash';\nimport React, { useCallback, useEffect, useRef, useState } from 'react';\nimport { createPortal } from 'react-dom';\nimport stylesText from './MergeTagBadge.scss?inline';\nimport { classnames } from '@extensions/utils/classnames';\nimport { useSelectionRange } from '@extensions/AttributePanel/hooks/useSelectionRange';\n\nconst removeAllActiveBadge = () => {\n getShadowRoot()\n .querySelectorAll('.easy-email-merge-tag')\n .forEach((item) => {\n item.classList.remove('easy-email-merge-tag-focus');\n });\n\n const popoverNode = getShadowRoot().querySelectorAll(\n '.easy-email-merge-tag-popover'\n );\n if (popoverNode) {\n }\n};\n\nexport function MergeTagBadgePrompt() {\n const { initialized } = useEditorContext();\n const popoverRef = useRef<HTMLDivElement | null>(null);\n const { onChangeMergeTag, mergeTags } = useEditorProps();\n const [text, setText] = useState('');\n const { setRangeByElement } = useSelectionRange();\n\n const root = initialized && getShadowRoot();\n const [target, setTarget] = React.useState<HTMLElement | null>(null);\n const targetRef = useRefState(target);\n\n const textContainer = getBlockNodeByChildEle(target);\n\n const focusMergeTag = useCallback((ele: HTMLElement) => {\n if (!ele) return;\n\n setRangeByElement(ele);\n }, [setRangeByElement]);\n\n useEffect(() => {\n\n const onBlur = (ev: MouseEvent) => {\n if (ev.target === getEditorRoot()) {\n return;\n }\n setTarget(null);\n };\n window.addEventListener('click', onBlur);\n return () => {\n window.removeEventListener('click', onBlur);\n };\n }, [targetRef, popoverRef]);\n\n const onClose = useCallback(() => {\n let ele = targetRef.current;\n\n setTimeout(() => {\n if (!ele) return;\n focusMergeTag(ele);\n }, 100);\n\n setTarget(null);\n }, [focusMergeTag, targetRef]);\n\n useEffect(() => {\n if (!root) return;\n const onClick: EventListenerOrEventListenerObject = (e) => {\n removeAllActiveBadge();\n const target = e.target;\n if (\n target instanceof HTMLInputElement &&\n target.classList.contains('easy-email-merge-tag')\n ) {\n target.classList.add('easy-email-merge-tag-focus');\n const namePath = target.value;\n if (!onChangeMergeTag) {\n focusMergeTag(target);\n return;\n }\n setText(get(mergeTags, namePath, ''));\n setTarget(target);\n\n } else {\n if (popoverRef.current?.contains(e.target as any)) return;\n setTarget(null);\n\n }\n };\n\n root.addEventListener('click', onClick);\n return () => {\n root.removeEventListener('click', onClick);\n };\n }, [focusMergeTag, mergeTags, onChangeMergeTag, root]);\n\n const onChange: React.ChangeEventHandler<HTMLInputElement> = useCallback((ev) => {\n setText(ev.target.value);\n }, []);\n\n const onSave = useCallback(() => {\n if (!(target instanceof HTMLInputElement)) return;\n onChangeMergeTag?.(target.value, text);\n onClose();\n }, [onChangeMergeTag, onClose, target, text]);\n\n const onClick: React.MouseEventHandler<HTMLDivElement> = useCallback((ev) => {\n ev.stopPropagation();\n }, []);\n\n useEffect(() => {\n const onKeyDown = (e: KeyboardEvent) => {\n\n if (e.code?.toLocaleLowerCase() === 'escape') {\n onClose();\n }\n\n };\n window.addEventListener('keydown', onKeyDown);\n\n return () => {\n window.removeEventListener('keydown', onKeyDown);\n };\n }, [onClose, onSave]);\n\n return (\n <>\n\n {root && createPortal(<style>{stylesText}</style>, root as any)}\n {textContainer && createPortal(\n <div ref={popoverRef} onClick={onClick} className={classnames('easy-email-merge-tag-popover')}>\n <div className='easy-email-merge-tag-popover-container'>\n <h3>\n <span>{'Default value'}</span>\n <IconFont style={{ color: 'rgb(92, 95, 98)' }} iconName='icon-close' onClick={onClose} />\n </h3>\n <div className={'easy-email-merge-tag-popover-desc'}>\n <p>\n {'If a personalized text value isn\\\"t available, then a default value is shown.'}\n </p>\n <div className='easy-email-merge-tag-popover-desc-label'>\n <input autoFocus value={text} onChange={onChange} type=\"text\" autoComplete='off' maxLength={40} />\n <div className='easy-email-merge-tag-popover-desc-label-count'>\n {text.length}/40\n </div>\n </div>\n <div className='easy-email-merge-tag-popover-desc-label-button'>\n <button onClick={onSave}>{'Save'}</button>\n </div>\n </div>\n </div>\n\n </div>, textContainer)}\n </>\n );\n}\n","/* eslint-disable react/jsx-wrap-multilines */\nimport React, { useCallback, useRef, useState } from 'react';\nimport { Modal, Tabs, Form, Switch, Button, Typography, Popconfirm, Divider } from 'antd';\nimport { PlusOutlined, DeleteOutlined } from '@ant-design/icons';\nimport { useEditorConfig, useEditorProps } from '@thanhpv102/easy-email-editor';\nimport './styles.css';\n\nconst { Text } = Typography;\n\n// ─── General Tab ─────────────────────────────────────────────────────────────\n\nfunction GeneralTab() {\n const { runtimeConfig, setRuntimeConfig } = useEditorConfig();\n const { dashed: propDashed = true } = useEditorProps();\n const currentDashed = runtimeConfig.dashed !== undefined ? runtimeConfig.dashed : propDashed;\n\n return (\n <Form layout='vertical' style={{ padding: '16px 0' }}>\n <Form.Item\n label='Dashed border (show dashed outline around blocks)'\n help='Enable or disable dashed borders on email blocks'\n >\n <Switch\n checked={currentDashed}\n onChange={val => setRuntimeConfig({ dashed: val })}\n checkedChildren='On'\n unCheckedChildren='Off'\n />\n </Form.Item>\n </Form>\n );\n}\n\n// ─── Merge Tags Tab ──────────────────────────────────────────────────────────\n\ninterface FlatMergeTag {\n id: string;\n path: string;\n value: string;\n}\n\nfunction flattenMergeTags(obj: Record<string, unknown>, prefix = ''): FlatMergeTag[] {\n const result: FlatMergeTag[] = [];\n for (const key of Object.keys(obj)) {\n const path = prefix ? `${prefix}.${key}` : key;\n const val = obj[key];\n if (val !== null && typeof val === 'object' && !Array.isArray(val)) {\n result.push(...flattenMergeTags(val as Record<string, unknown>, path));\n } else {\n result.push({ id: path, path, value: String(val ?? '') });\n }\n }\n return result;\n}\n\nfunction buildMergeTagsFromFlat(flat: FlatMergeTag[]): Record<string, unknown> {\n const result: Record<string, unknown> = {};\n for (const item of flat) {\n const parts = item.path.split('.');\n let cur = result;\n for (let i = 0; i < parts.length - 1; i++) {\n const part = parts[i];\n if (!cur[part] || typeof cur[part] !== 'object') cur[part] = {};\n cur = cur[part] as Record<string, unknown>;\n }\n cur[parts[parts.length - 1]] = item.value;\n }\n return result;\n}\n\ninterface MergeTagRowProps {\n row: FlatMergeTag;\n onCommit: (id: string, field: 'path' | 'value', val: string) => void;\n onDelete: (id: string) => void;\n}\n\n// Each row owns its own input state → typing never re-renders the parent list\nfunction MergeTagRow({ row, onCommit, onDelete }: MergeTagRowProps) {\n const pathRef = useRef<HTMLInputElement>(null);\n const valueRef = useRef<HTMLInputElement>(null);\n\n return (\n <div className=\"config-row\">\n <input\n className=\"config-input-field ant-input ant-input-outlined css-var-root ant-input-css-var\"\n ref={pathRef}\n defaultValue={row.path}\n placeholder='e.g. user.name'\n onBlur={e => onCommit(row.id, 'path', e.target.value)}\n />\n <input\n className=\"config-input-field ant-input ant-input-outlined css-var-root ant-input-css-var\"\n ref={valueRef}\n defaultValue={row.value}\n placeholder='Preview value'\n onBlur={e => onCommit(row.id, 'value', e.target.value)}\n />\n <Popconfirm title='Delete this tag?' onConfirm={() => onDelete(row.id)}>\n <Button type='text' danger size='small' icon={<DeleteOutlined />} className=\"config-btn-delete\" />\n </Popconfirm>\n </div>\n );\n}\n\nfunction MergeTagsTab() {\n const { runtimeConfig, setRuntimeConfig } = useEditorConfig();\n const { mergeTags: propMergeTags } = useEditorProps();\n\n const initialMergeTags =\n runtimeConfig.mergeTags !== undefined\n ? runtimeConfig.mergeTags\n : ((propMergeTags as Record<string, unknown>) ?? {});\n\n const [rows, setRows] = useState<FlatMergeTag[]>(() =>\n flattenMergeTags(initialMergeTags as Record<string, unknown>),\n );\n const rowsRef = useRef(rows);\n rowsRef.current = rows;\n\n const syncToContext = useCallback(\n (nextRows: FlatMergeTag[]) => {\n setRuntimeConfig({ mergeTags: buildMergeTagsFromFlat(nextRows) });\n },\n [setRuntimeConfig],\n );\n\n // Called onBlur from each row — only updates the specific field, no re-render of list\n const handleCommit = useCallback(\n (id: string, field: 'path' | 'value', val: string) => {\n const nextRows = rowsRef.current.map(r => {\n if (r.id !== id) return r;\n return field === 'path' ? { ...r, path: val, id: val } : { ...r, value: val };\n });\n rowsRef.current = nextRows;\n // Update rows state only to keep rowsRef consistent for add/delete, but\n // use functional update to avoid triggering unnecessary re-renders when value unchanged\n setRows(prev => {\n const changed = prev.some(r => {\n if (r.id !== id) return false;\n return field === 'path' ? r.path !== val : r.value !== val;\n });\n if (!changed) return prev;\n return prev.map(r => {\n if (r.id !== id) return r;\n return field === 'path' ? { ...r, path: val, id: val } : { ...r, value: val };\n });\n });\n syncToContext(nextRows);\n },\n [syncToContext],\n );\n\n const handleDelete = useCallback(\n (id: string) => {\n const nextRows = rowsRef.current.filter(r => r.id !== id);\n setRows(nextRows);\n syncToContext(nextRows);\n },\n [syncToContext],\n );\n\n const handleAdd = useCallback(() => {\n const ts = Date.now();\n const newRow: FlatMergeTag = { id: `new.key.${ts}`, path: `new.key.${ts}`, value: '' };\n const nextRows = [...rowsRef.current, newRow];\n setRows(nextRows);\n syncToContext(nextRows);\n }, [syncToContext]);\n\n return (\n <div style={{ padding: '16px 0' }}>\n <Text type='secondary' className=\"config-description\">\n Define merge tag preview values. Use dot notation for nested keys (e.g.{' '}\n <span className=\"config-code\">user.name</span>).\n </Text>\n <div className=\"config-row-label\">\n <span className=\"config-row-label-text\">Path (dot notation)</span>\n <span className=\"config-row-label-text\">Value</span>\n <div style={{ width: 32 }} />\n </div>\n <Divider className=\"config-divider\" />\n {rows.map(row => (\n <MergeTagRow key={row.id} row={row} onCommit={handleCommit} onDelete={handleDelete} />\n ))}\n <Button icon={<PlusOutlined />} onClick={handleAdd} size='small' className=\"config-btn-add\">\n Add merge tag\n </Button>\n </div>\n );\n}\n\n// ─── Social Icons Tab ─────────────────────────────────────────────────────────\n\ninterface SocialIconRow {\n id: string;\n content: string;\n image: string;\n}\n\ninterface SocialIconRowProps {\n row: SocialIconRow;\n onCommit: (id: string, field: 'content' | 'image', val: string) => void;\n onDelete: (id: string) => void;\n}\n\nfunction SocialIconRowItem({ row, onCommit, onDelete }: SocialIconRowProps) {\n const [imgSrc, setImgSrc] = useState(row.image);\n\n return (\n <div className=\"config-row\">\n <input\n className=\"config-input-field\"\n defaultValue={row.content}\n placeholder='e.g. Facebook'\n onBlur={e => onCommit(row.id, 'content', e.target.value)}\n />\n <div style={{ flex: 1, display: 'flex', gap: 6, alignItems: 'center' }}>\n <input\n className=\"config-input-field\"\n defaultValue={row.image}\n placeholder='https://...'\n onBlur={e => {\n onCommit(row.id, 'image', e.target.value);\n setImgSrc(e.target.value);\n }}\n style={{ flex: 1 }}\n />\n {imgSrc && (\n <img src={imgSrc} alt='' className=\"config-image-preview\" />\n )}\n </div>\n <Popconfirm title='Delete this icon?' onConfirm={() => onDelete(row.id)}>\n <Button type='text' danger size='small' icon={<DeleteOutlined />} className=\"config-btn-delete\" />\n </Popconfirm>\n </div>\n );\n}\n\nfunction SocialIconsTab() {\n const { runtimeConfig, setRuntimeConfig } = useEditorConfig();\n const { socialIcons: propSocialIcons } = useEditorProps();\n\n const currentIcons =\n runtimeConfig.socialIcons !== undefined ? runtimeConfig.socialIcons : (propSocialIcons ?? []);\n\n const [rows, setRows] = useState<SocialIconRow[]>(() =>\n currentIcons.map((icon, i) => ({ ...icon, id: `icon-${i}` })),\n );\n const rowsRef = useRef(rows);\n rowsRef.current = rows;\n\n const syncToContext = useCallback(\n (nextRows: SocialIconRow[]) => {\n setRuntimeConfig({ socialIcons: nextRows.map(({ content, image }) => ({ content, image })) });\n },\n [setRuntimeConfig],\n );\n\n const handleCommit = useCallback(\n (id: string, field: 'content' | 'image', val: string) => {\n const nextRows = rowsRef.current.map(r => (r.id === id ? { ...r, [field]: val } : r));\n rowsRef.current = nextRows;\n setRows(prev => {\n const changed = prev.some(r => r.id === id && r[field] !== val);\n if (!changed) return prev;\n return prev.map(r => (r.id === id ? { ...r, [field]: val } : r));\n });\n syncToContext(nextRows);\n },\n [syncToContext],\n );\n\n const handleDelete = useCallback(\n (id: string) => {\n const nextRows = rowsRef.current.filter(r => r.id !== id);\n setRows(nextRows);\n syncToContext(nextRows);\n },\n [syncToContext],\n );\n\n const handleAdd = useCallback(() => {\n const newRow: SocialIconRow = { id: `icon-new-${Date.now()}`, content: '', image: '' };\n const nextRows = [...rowsRef.current, newRow];\n setRows(nextRows);\n syncToContext(nextRows);\n }, [syncToContext]);\n\n return (\n <div style={{ padding: '16px 0' }}>\n <Text type='secondary' className=\"config-description\">\n Define custom social icons available in the social block.\n </Text>\n <div className=\"config-row-label\">\n <span className=\"config-row-label-text\">Name / Label</span>\n <span className=\"config-row-label-text\">Image URL</span>\n <div style={{ width: 32 }} />\n </div>\n <Divider className=\"config-divider\" />\n {rows.map(row => (\n <SocialIconRowItem key={row.id} row={row} onCommit={handleCommit} onDelete={handleDelete} />\n ))}\n <Button icon={<PlusOutlined />} onClick={handleAdd} size='small' className=\"config-btn-add\">\n Add social icon\n </Button>\n </div>\n );\n}\n\n// ─── Main Popup ───────────────────────────────────────────────────────────────\n\nexport function ConfigurationPopup() {\n const { isConfigOpen, closeConfig } = useEditorConfig();\n\n return (\n <div className=\"config-popup-container\">\n <Modal\n open={isConfigOpen}\n onCancel={closeConfig}\n title='Editor Configuration'\n footer={(\n <Button type='primary' onClick={closeConfig}>\n Done\n </Button>\n )}\n width={680}\n >\n <Tabs\n defaultActiveKey='general'\n items={[\n {\n key: 'general',\n label: 'General',\n children: <GeneralTab />,\n },\n {\n key: 'merge-tags',\n label: 'Merge Tags',\n children: <MergeTagsTab />,\n },\n {\n key: 'social-icons',\n label: 'Social Icons',\n children: <SocialIconsTab />,\n },\n ]}\n />\n </Modal>\n </div>\n );\n}\n","import { ShortcutToolbar } from '../ShortcutToolbar';\nimport { Button, Card, ConfigProvider, Layout, Tabs, App } from 'antd';\nimport { useEditorProps } from '@thanhpv102/easy-email-editor';\nimport React, { useState } from 'react';\nimport { SourceCodePanel } from '../SourceCodePanel';\nimport { AttributePanel } from '../AttributePanel';\nimport { BlockLayer, BlockLayerProps } from '../BlockLayer';\nimport { InteractivePrompt } from '../InteractivePrompt';\nimport styles from './index.module.scss';\nimport enUS from 'antd/locale/en_US';\nimport { MergeTagBadgePrompt } from '@extensions/MergeTagBadgePrompt';\nimport { LeftOutlined, RightOutlined } from '@ant-design/icons';\nimport { ConfigurationPopup } from '../ConfigurationPopup';\n\nexport const SimpleLayout: React.FC<\n {\n showSourceCode?: boolean;\n jsonReadOnly?: boolean;\n mjmlReadOnly?: boolean;\n defaultShowLayer?: boolean;\n children: React.ReactNode | React.ReactElement;\n } & BlockLayerProps\n> = props => {\n const { height: containerHeight } = useEditorProps();\n const { showSourceCode = true, defaultShowLayer = true, jsonReadOnly = true, mjmlReadOnly = true } = props;\n const [collapsed, setCollapsed] = useState(!defaultShowLayer);\n return (\n <ConfigProvider locale={enUS}>\n <App>\n <Layout\n className={styles.SimpleLayout}\n style={{\n display: 'flex',\n width: '100%',\n overflow: 'hidden',\n minWidth: 1400,\n }}\n >\n <Layout.Sider\n style={{ paddingRight: 0 }}\n collapsed={collapsed}\n collapsible\n trigger={null}\n breakpoint=\"xl\"\n collapsedWidth={60}\n width={350}\n >\n <Card\n styles={{ body: { padding: 0 } }}\n style={{ border: 'none' }}\n >\n <Card.Grid style={{ width: 60, display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'flex-start', padding: '12px 0' }}>\n <ShortcutToolbar />\n <Button\n style={{\n marginTop: 30,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n }}\n icon={collapsed ? <RightOutlined /> : <LeftOutlined />}\n shape=\"round\"\n onClick={() => setCollapsed(v => !v)}\n />\n </Card.Grid>\n <Card.Grid\n className={styles.customScrollBar}\n style={{\n flex: 1,\n padding: '0 5px',\n border: 'none',\n height: containerHeight,\n overflowY: 'auto',\n overflowX: 'hidden',\n width: '100%',\n }}\n >\n <Card\n title={'Layout'}\n style={{ border: 'none', width: '100%' }}\n styles={{ header: { height: 50 }, body: { width: '100%', padding: '0 5px' } }}\n >\n {!collapsed && <BlockLayer renderTitle={props.renderTitle} />}\n </Card>\n </Card.Grid>\n </Card>\n </Layout.Sider>\n\n <Layout style={{ height: containerHeight }}>{props.children}</Layout>\n\n <Layout.Sider\n style={{\n height: containerHeight,\n width: 450,\n }}\n className={styles.rightSide}\n >\n <Card\n size=\"small\"\n id=\"rightSide\"\n style={{\n maxHeight: '100%',\n height: '100%',\n borderLeft: 'none',\n borderRadius: 0,\n }}\n styles={{ body: { padding: 0 } }}\n className={styles.customScrollBarV2}\n >\n <Tabs\n className={styles.layoutTabs}\n items={[\n {\n key: 'configuration',\n label: (\n <div style={{ height: 28, lineHeight: '28px', marginLeft: 12, paddingRight: 12, fontSize: 12 }}>\n {'Configuration'}\n </div>\n ),\n children: <AttributePanel />,\n },\n ...(showSourceCode ? [{\n key: 'source-code',\n label: (\n <div style={{ height: 28, lineHeight: '28px', fontSize: 12 }}>\n {'Source code'}\n </div>\n ),\n children: <SourceCodePanel jsonReadOnly={jsonReadOnly} mjmlReadOnly={mjmlReadOnly} />,\n destroyOnHidden: true,\n }] : [])\n ]}\n />\n </Card>\n </Layout.Sider>\n\n <InteractivePrompt />\n <MergeTagBadgePrompt />\n <ConfigurationPopup />\n </Layout>\n </App>\n </ConfigProvider>\n );\n};\n",".StandardLayout {\n :global {\n .arco-layout-sider-children {\n overflow-x: hidden;\n .arco-tabs-content {\n padding: 0;\n }\n }\n .arco-collapse-item-content-expanded {\n overflow: visible;\n }\n .easy-email-editor-tabWrapper {\n padding: 5px;\n }\n }\n}\n",".layoutItem {\r\n :global {\r\n .arco-collapse-item-header {\r\n background-color: #fff !important;\r\n border-color: transparent !important;\r\n }\r\n }\r\n}\r\n\r\n.blockItem {\r\n margin-bottom: 20px;\r\n box-shadow: rgb(55 63 71 / 4%) 0px 0px 0px 1px, rgb(55 63 71 / 8%) 0px 4px 4px 0px,\r\n rgb(55 63 71 / 8%) 0px 8px 24px 0px;\r\n border: 2px solid transparent;\r\n border-radius: 4px;\r\n margin-right: 15px;\r\n &:hover {\r\n box-shadow: 0px 0px 2px 2px rgb(var(--primary-4, #1890ff)) !important;\r\n }\r\n .blockItemContainer {\r\n width: 96px;\r\n height: 96px;\r\n padding: 10px;\r\n text-align: center;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n flex-direction: column;\r\n }\r\n}\r\n.blockItem:nth-child(3n + 1) {\r\n margin-left: 15px;\r\n}\r\n.blockItem:nth-child(3n + 0) {\r\n margin-right: 0;\r\n}\r\n","import { BlockLayerProps } from '@extensions/BlockLayer';\r\nimport { isEqual, omit } from 'lodash';\r\nimport React, { useContext, useMemo, useRef } from 'react';\r\n\r\nexport interface ExtensionProps extends BlockLayerProps {\r\n children?: React.ReactNode | React.ReactElement;\r\n categories: Array<\r\n | {\r\n label: string;\r\n active?: boolean;\r\n blocks: Array<{\r\n type: string;\r\n payload?: any;\r\n title?: string | undefined;\r\n }>;\r\n displayType?: 'grid';\r\n }\r\n | {\r\n label: string;\r\n active?: boolean;\r\n blocks: Array<{\r\n payload?: any;\r\n title?: string | undefined;\r\n }>;\r\n displayType: 'column';\r\n }\r\n | {\r\n label: string;\r\n active?: boolean;\r\n blocks: Array<{\r\n payload?: any;\r\n }>;\r\n displayType: 'widget';\r\n }\r\n | {\r\n label: string;\r\n active?: boolean;\r\n blocks: Array<React.ReactNode>;\r\n displayType: 'custom';\r\n }\r\n >;\r\n showSourceCode?: boolean;\r\n jsonReadOnly?: boolean;\r\n mjmlReadOnly?: boolean;\r\n compact?: boolean;\r\n showBlockLayer?: boolean;\r\n}\r\n\r\nexport const ExtensionContext = React.createContext<ExtensionProps>({\r\n categories: [],\r\n});\r\n\r\nexport const ExtensionProvider: React.FC<ExtensionProps> = props => {\r\n const value = omit(props, 'children');\r\n const valueRef = useRef(value);\r\n\r\n const cacheValue = useMemo(() => {\r\n if (!isEqual(value, valueRef)) {\r\n valueRef.current = value;\r\n }\r\n return valueRef.current;\r\n }, [value, valueRef]);\r\n\r\n return (\r\n <ExtensionContext.Provider value={cacheValue}>\r\n {props.children}\r\n </ExtensionContext.Provider>\r\n );\r\n};\r\n\r\nexport function useExtensionProps() {\r\n return useContext(ExtensionContext);\r\n}\r\n","import { Collapse, Row, Space, Typography } from 'antd';\nimport { AdvancedType, BlockManager, IBlockData } from '@thanhpv102/easy-email-core';\nimport { BlockAvatarWrapper, IconFont } from '@thanhpv102/easy-email-editor';\nimport React, { useMemo, useState } from 'react';\nimport { CaretRightOutlined, CaretUpOutlined } from '@ant-design/icons';\nimport { getIconNameByBlockType } from '@extensions/utils/getIconNameByBlockType';\nimport styles from './index.module.scss';\nimport { useExtensionProps } from '@extensions/components/Providers/ExtensionProvider';\n\nexport function Blocks() {\n const { categories } = useExtensionProps();\n\n const defaultActiveKey = useMemo(\n () => [\n ...categories.filter((item) => item.active).map((item) => item.label),\n ],\n [categories]\n );\n const collapseItems = categories.map((cat, index) => {\n let panelChildren: React.ReactNode;\n\n if (cat.displayType === 'column') {\n panelChildren = (\n <>\n <Space orientation='vertical'>\n <div />\n </Space>\n {cat.blocks.map((item) => (\n <LayoutItem\n key={item.title}\n title={item.title || ''}\n columns={item.payload}\n />\n ))}\n <Space orientation='vertical'>\n <div />\n </Space>\n </>\n );\n } else if (cat.displayType === 'custom') {\n panelChildren = (\n <Row>\n {cat.blocks.map((item, blockIndex) => {\n if (\n typeof item === 'object' &&\n item !== null &&\n !React.isValidElement(item) &&\n 'type' in item &&\n 'children' in item\n ) {\n const customBlock = item as {\n type: string;\n payload?: any;\n title?: string;\n children: React.ReactNode;\n canDragAndDrop?: boolean;\n };\n const canDragAndDrop = customBlock.canDragAndDrop !== false;\n const blockContent = (\n <div className={styles.blockItemContainer}>\n {customBlock.children}\n </div>\n );\n return (\n <div key={blockIndex} className={styles.blockItem}>\n {canDragAndDrop ? (\n <BlockAvatarWrapper\n type={customBlock.type}\n payload={customBlock.payload}\n >\n {blockContent}\n </BlockAvatarWrapper>\n ) : (\n <div style={{ cursor: 'not-allowed', opacity: 0.6 }}>\n {blockContent}\n </div>\n )}\n </div>\n );\n }\n return <React.Fragment key={blockIndex}>{item}</React.Fragment>;\n })}\n </Row>\n );\n } else {\n panelChildren = (\n <Row>\n {cat.blocks.map((item, index) => {\n return <BlockItem key={index} {...(item as any)} />;\n })}\n </Row>\n );\n }\n\n return {\n key: index,\n label: cat.label,\n extra: cat.label,\n style: cat.displayType === 'column'\n ? { padding: '0px 20px' }\n : { padding: 0, paddingBottom: 0, paddingTop: 20 },\n children: panelChildren,\n };\n });\n\n return (\n <Collapse\n defaultActiveKey={defaultActiveKey}\n style={{ paddingBottom: 30, minHeight: '100%' }}\n items={collapseItems}\n />\n );\n}\n\nfunction BlockItem({\n type,\n payload,\n title,\n filterType,\n}: {\n type: string;\n payload?: Partial<IBlockData>;\n title?: string;\n filterType: string | undefined;\n}) {\n const block = BlockManager.getBlockByType(type);\n\n return (\n <div className={styles.blockItem}>\n <BlockAvatarWrapper type={type} payload={payload}>\n <div className={styles.blockItemContainer}>\n <IconFont\n style={{ fontSize: 20 }}\n iconName={getIconNameByBlockType(type)}\n />\n <Typography.Text style={{ marginTop: 10 }}>\n {title || block?.name}\n </Typography.Text>\n </div>\n </BlockAvatarWrapper>\n </div>\n );\n}\n\nfunction LayoutItem({\n columns,\n title,\n}: {\n columns: string[][];\n title: string;\n}) {\n const [visible, setVisible] = useState(false);\n\n return (\n <div>\n <p\n onClick={() => setVisible((v) => !v)}\n style={{\n display: 'flex',\n justifyContent: 'space-between',\n cursor: 'pointer',\n }}\n >\n <span>{title}</span>\n {columns.length > 1 && (\n <span>{!visible ? <CaretRightOutlined /> : <CaretUpOutlined />}</span>\n )}\n </p>\n {columns.map((item, index) => {\n const hide = !visible && index !== 0;\n const payload = {\n type: AdvancedType.SECTION,\n attributes: {},\n children: item.map((col) => ({\n type: AdvancedType.COLUMN,\n attributes: {\n width: col,\n },\n data: {\n value: {},\n },\n children: [],\n })),\n };\n\n return (\n <div\n key={index}\n style={{\n height: hide ? 0 : undefined,\n overflow: 'hidden',\n marginBottom: hide ? 0 : 20,\n }}\n >\n <BlockAvatarWrapper type={AdvancedType.SECTION} payload={payload}>\n <div\n style={{\n border: '1px solid rgb(229, 229, 229)',\n width: '100%',\n padding: 10,\n }}\n >\n <div\n style={{\n height: 16,\n border: '1px solid rgb(85, 85, 85)',\n borderRadius: 3,\n display: 'flex',\n }}\n >\n {item.map((column, index) => {\n return (\n <div\n key={index}\n style={{\n borderRight:\n index === item.length - 1\n ? undefined\n : '1px solid rgb(85, 85, 85)',\n height: '100%',\n width: column,\n }}\n />\n );\n })}\n </div>\n </div>\n </BlockAvatarWrapper>\n </div>\n );\n })}\n </div>\n );\n}\n","import React from 'react';\r\nimport 'overlayscrollbars/overlayscrollbars.css';\r\nimport { OverlayScrollbarsComponent } from 'overlayscrollbars-react';\r\n\r\nexport const FullHeightOverlayScrollbars: React.FC<{\r\n children: React.ReactNode | React.ReactElement;\r\n height: string | number;\r\n}> = props => {\r\n return (\r\n <OverlayScrollbarsComponent options={{ scrollbars: { autoHide: 'scroll' } }}>\r\n <div style={{ height: props.height }}>{props.children}</div>\r\n </OverlayScrollbarsComponent>\r\n );\r\n};\r\n",".largeTabsHeader {\r\n :global {\r\n .arco-tabs-header {\r\n width: 100%;\r\n display: flex;\r\n .arco-tabs-header-title {\r\n flex: 1;\r\n margin: 0px !important;\r\n padding: 0 !important;\r\n height: 60px;\r\n line-height: 60px;\r\n .arco-tabs-header-title-text {\r\n display: block;\r\n text-align: center;\r\n width: 100%;\r\n &::before {\r\n display: none;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",".largeTabsHeader {\r\n :global {\r\n .arco-tabs-header {\r\n width: 100%;\r\n display: flex;\r\n .arco-tabs-header-title {\r\n flex: 1;\r\n margin: 0px !important;\r\n padding: 0 !important;\r\n height: 60px;\r\n line-height: 60px;\r\n .arco-tabs-header-title-text {\r\n display: block;\r\n text-align: center;\r\n width: 100%;\r\n &::before {\r\n display: none;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n","import React, { useEffect, useState } from 'react';\r\nimport { Tabs } from 'antd';\r\nimport { LeftOutlined } from '@ant-design/icons';\r\nimport { AttributePanel } from '@extensions/AttributePanel';\r\nimport { SourceCodePanel } from '@extensions/SourceCodePanel';\r\nimport { FullHeightOverlayScrollbars } from '@extensions/components/FullHeightOverlayScrollbars';\r\nimport styles from './index.module.scss';\r\n\r\nexport interface ConfigurationPanelProps {\r\n showSourceCode: boolean;\r\n jsonReadOnly: boolean;\r\n mjmlReadOnly: boolean;\r\n height: string;\r\n onBack?: () => void;\r\n compact?: boolean;\r\n}\r\n\r\nexport function ConfigurationPanel({\r\n showSourceCode,\r\n height,\r\n onBack,\r\n compact,\r\n jsonReadOnly,\r\n mjmlReadOnly,\r\n }: ConfigurationPanelProps) {\r\n const [inited, setInited] = useState(false);\r\n\r\n useEffect(() => {\r\n // Tabs 在 drawer 里面有bug\r\n let timer = setTimeout(() => {\r\n setInited(true);\r\n }, 100);\r\n return () => {\r\n clearTimeout(timer);\r\n };\r\n }, []);\r\n\r\n if (!inited) return null;\r\n\r\n return (\r\n <>\r\n {showSourceCode ? (\r\n <Tabs\r\n className={styles.tabs}\r\n renderTabBar={(props, DefaultTabBar) =>\r\n !compact ? (\r\n <div\r\n className={styles.largeTabsHeader}\r\n style={{ display: 'flex', alignItems: 'center' }}\r\n >\r\n <div\r\n style={{ padding: 10, cursor: 'pointer' }}\r\n onClick={onBack}\r\n >\r\n <LeftOutlined style={{ fontSize: 16 }} />\r\n </div>\r\n <DefaultTabBar {...props} style={{ flex: 1 }} />\r\n </div>\r\n ) : (\r\n <div\r\n className={styles.largeTabsHeader}\r\n style={{ display: 'flex', alignItems: 'center' }}\r\n >\r\n <DefaultTabBar {...props} style={{ flex: 1 }} />\r\n </div>\r\n )\r\n }\r\n items={[\r\n {\r\n key: 'configuration',\r\n label: (\r\n <div style={{ height: 40, lineHeight: '40px' }}>{'Configuration'}</div>\r\n ),\r\n children: (\r\n <FullHeightOverlayScrollbars height={`calc(${height} - 60px)`}>\r\n <AttributePanel />\r\n </FullHeightOverlayScrollbars>\r\n ),\r\n },\r\n {\r\n key: 'source-code',\r\n label: (\r\n <div style={{ height: 40, lineHeight: '40px' }}>{'Source code'}</div>\r\n ),\r\n children: (\r\n <FullHeightOverlayScrollbars height={`calc(${height} - 60px)`}>\r\n <SourceCodePanel jsonReadOnly={jsonReadOnly} mjmlReadOnly={mjmlReadOnly} />\r\n </FullHeightOverlayScrollbars>\r\n ),\r\n destroyOnHidden: true,\r\n },\r\n ]}\r\n />\r\n ) : (\r\n <AttributePanel />\r\n )}\r\n </>\r\n );\r\n}\r\n","import { useFocusIdx } from '@thanhpv102/easy-email-editor';\r\nimport { Drawer } from 'antd';\r\nimport { ConfigurationPanel } from '@extensions/ConfigurationPanel';\r\nimport React, { useCallback, useMemo, useRef } from 'react';\r\n\r\nexport function ConfigurationDrawer({\r\n height,\r\n compact,\r\n showSourceCode,\r\n jsonReadOnly,\r\n mjmlReadOnly,\r\n}: {\r\n height: string;\r\n compact: boolean;\r\n showSourceCode: boolean;\r\n jsonReadOnly: boolean;\r\n mjmlReadOnly: boolean;\r\n}) {\r\n const refWrapper = useRef(null);\r\n const { focusIdx, setFocusIdx } = useFocusIdx();\r\n\r\n const onClose = useCallback(() => {\r\n setFocusIdx('');\r\n }, [setFocusIdx]);\r\n\r\n const visible = Boolean(focusIdx);\r\n return useMemo(() => {\r\n return (\r\n <>\r\n <div\r\n ref={refWrapper}\r\n style={{\r\n position: 'absolute',\r\n top: 0,\r\n left: 0,\r\n width: '100%',\r\n height: '100%',\r\n zIndex: visible ? 1 : -1,\r\n pointerEvents: visible ? 'auto' : 'none',\r\n }}\r\n />\r\n {refWrapper.current && (\r\n <Drawer\r\n title={null}\r\n closable={false}\r\n placement='right'\r\n styles={{ body: { padding: 0 }, wrapper: { width: '100%' } }}\r\n open\r\n getContainer={() => refWrapper.current || document.body}\r\n footer={null}\r\n onClose={onClose}\r\n >\r\n <ConfigurationPanel\r\n compact={compact}\r\n showSourceCode={showSourceCode}\r\n height={height}\r\n onBack={onClose}\r\n jsonReadOnly={jsonReadOnly}\r\n mjmlReadOnly={mjmlReadOnly}\r\n />\r\n </Drawer>\r\n )}\r\n </>\r\n );\r\n }, [visible, onClose, compact, showSourceCode, height, jsonReadOnly, mjmlReadOnly]);\r\n}\r\n","import { Layout, Tabs } from 'antd';\r\nimport { useEditorProps } from '@thanhpv102/easy-email-editor';\r\nimport React from 'react';\r\nimport { Blocks } from './Blocks';\r\nimport { BlockLayer } from '@extensions/BlockLayer';\r\nimport { FullHeightOverlayScrollbars } from '@extensions/components/FullHeightOverlayScrollbars';\r\nimport styles from './index.module.scss';\r\nimport { ConfigurationDrawer } from './ConfigurationDrawer';\r\nimport { useExtensionProps } from '@extensions/components/Providers/ExtensionProvider';\r\n\r\nexport function EditPanel({\r\n showSourceCode,\r\n jsonReadOnly,\r\n mjmlReadOnly,\r\n }: {\r\n showSourceCode: boolean;\r\n jsonReadOnly: boolean;\r\n mjmlReadOnly: boolean;\r\n}) {\r\n const { height } = useEditorProps();\r\n const { compact = true, showBlockLayer = true } = useExtensionProps();\r\n\r\n return (\r\n <Layout.Sider\r\n className={styles.blocksPanel}\r\n style={{ paddingRight: 0, minWidth: 360 }}\r\n // collapsed={collapsed}\r\n collapsible\r\n trigger={null}\r\n breakpoint=\"xl\"\r\n collapsedWidth={60}\r\n width={360}\r\n >\r\n <Tabs\r\n defaultActiveKey='2'\r\n style={{ width: '100%', padding: 0 }}\r\n renderTabBar={(props, DefaultTabBar) => (\r\n <div className={styles.largeTabsHeader}>\r\n <DefaultTabBar {...props} />\r\n </div>\r\n )}\r\n items={[\r\n {\r\n key: '2',\r\n label: 'Block',\r\n children: (\r\n <FullHeightOverlayScrollbars height={`calc(${height} - 60px)`}>\r\n <Blocks />\r\n </FullHeightOverlayScrollbars>\r\n )\r\n },\r\n ...(showBlockLayer ? [{\r\n key: '1',\r\n label: 'Layer',\r\n children: (\r\n <FullHeightOverlayScrollbars height={`calc(${height} - 60px)`}>\r\n <div style={{ padding: 20 }}>\r\n <BlockLayer />\r\n </div>\r\n </FullHeightOverlayScrollbars>\r\n )\r\n }] : [])\r\n ]}\r\n />\r\n {!compact && (\r\n <ConfigurationDrawer\r\n height={height}\r\n showSourceCode={showSourceCode}\r\n compact={Boolean(compact)}\r\n jsonReadOnly={jsonReadOnly}\r\n mjmlReadOnly={mjmlReadOnly}\r\n />\r\n )}\r\n </Layout.Sider>\r\n );\r\n}\r\n","import { App, Card, ConfigProvider, Layout } from 'antd';\nimport { useEditorProps, useFocusIdx } from '@thanhpv102/easy-email-editor';\nimport React, { useEffect } from 'react';\nimport { InteractivePrompt } from '../InteractivePrompt';\nimport styles from './index.module.scss';\nimport enUS from 'antd/locale/en_US';\nimport { MergeTagBadgePrompt } from '@extensions/MergeTagBadgePrompt';\nimport { EditPanel } from '../EditPanel';\nimport { ConfigurationPanel } from '@extensions/ConfigurationPanel';\nimport { ExtensionProps, ExtensionProvider } from '@extensions/components/Providers/ExtensionProvider';\nimport { AdvancedType } from '@thanhpv102/easy-email-core';\nimport { ConfigurationPopup } from '../ConfigurationPopup';\n\nconst defaultCategories: ExtensionProps['categories'] = [\n {\n get label() {\n return 'Content';\n },\n active: true,\n blocks: [\n {\n type: AdvancedType.TEXT,\n },\n {\n type: AdvancedType.IMAGE,\n payload: { attributes: { padding: '0px 0px 0px 0px' } },\n },\n {\n type: AdvancedType.BUTTON,\n },\n {\n type: AdvancedType.SOCIAL,\n },\n {\n type: AdvancedType.DIVIDER,\n },\n {\n type: AdvancedType.SPACER,\n },\n {\n type: AdvancedType.HERO,\n },\n {\n type: AdvancedType.WRAPPER,\n },\n ],\n },\n {\n get label() {\n return 'Layout';\n },\n active: true,\n displayType: 'column',\n blocks: [\n {\n get title() {\n return '2 columns';\n },\n payload: [\n ['50%', '50%'],\n ['33%', '67%'],\n ['67%', '33%'],\n ['25%', '75%'],\n ['75%', '25%'],\n ],\n },\n {\n get title() {\n return '3 columns';\n },\n payload: [\n ['33.33%', '33.33%', '33.33%'],\n ['25%', '25%', '50%'],\n ['50%', '25%', '25%'],\n ],\n },\n {\n get title() {\n return '4 columns';\n },\n payload: [['25%', '25%', '25%', '25%']],\n },\n ],\n },\n];\n\nexport const StandardLayout: React.FC<ExtensionProps> = props => {\n const { height: containerHeight } = useEditorProps();\n const {\n showSourceCode = true,\n compact = true,\n categories = defaultCategories,\n jsonReadOnly = false,\n mjmlReadOnly = true,\n } = props;\n\n const { setFocusIdx } = useFocusIdx();\n\n useEffect(() => {\n if (!compact) {\n setFocusIdx('');\n }\n }, [compact, setFocusIdx]);\n\n return (\n <ExtensionProvider\n {...props}\n categories={categories}\n >\n <ConfigProvider locale={enUS}>\n <App>\n <Card\n style={{ padding: 0 }}\n styles={{\n body: {\n padding: 0,\n height: containerHeight,\n overflow: 'hidden',\n },\n }}\n >\n <Layout\n className={styles.StandardLayout}\n style={{\n display: 'flex',\n width: '100%',\n overflow: 'hidden',\n }}\n >\n {compact && (\n <EditPanel\n showSourceCode={showSourceCode}\n jsonReadOnly={jsonReadOnly}\n mjmlReadOnly={mjmlReadOnly}\n />\n )}\n <Layout style={{ height: containerHeight, flex: 1 }}>{props.children}</Layout>\n {!compact && (\n <EditPanel\n showSourceCode={showSourceCode}\n jsonReadOnly={jsonReadOnly}\n mjmlReadOnly={mjmlReadOnly}\n />\n )}\n {compact ? (\n <Layout.Sider\n style={{\n height: containerHeight,\n minWidth: 300,\n maxWidth: 350,\n width: 350,\n }}\n >\n <ConfigurationPanel\n compact={compact}\n height={containerHeight}\n showSourceCode={showSourceCode}\n jsonReadOnly={jsonReadOnly}\n mjmlReadOnly={mjmlReadOnly}\n />\n </Layout.Sider>\n ) : (\n <Layout.Sider style={{ width: 0, overflow: 'hidden' }} />\n )}\n </Layout>\n </Card>\n\n <InteractivePrompt />\n <MergeTagBadgePrompt />\n <ConfigurationPopup />\n </App>\n </ConfigProvider>\n </ExtensionProvider>\n );\n};\n"],"x_google_ignoreList":[170,171,172,173,174,175,176,177,178],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACKA,SAAgB,GAAQ,EACtB,cACA,WACA,sBAKC;CASD,OARI,IAEA,kBAAC,OAAD;EAAK,OAAO,EAAE,YAAY,SAAS;YACjC,kBAAC,GAAD,EAAU,UAAS,WAAY,CAAA;CAC5B,CAAA,IAEL,EAAU,SAAS,EAAU,KAAK,SAAS,IAAU,OAElD,EAAU,KAAK,SACpB,kBAAC,GAAD;EACE,UAAU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A;EACM;;AAEb;;;AC0CA,GAAa,IAAI;CAtIf,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;CACF,UACE;AAGa,CAAgB;AAEjC,SAAgB,EAAO,GAAqC;CAC1D,OAAO,GAAa,IAAI,CAAI;AAC9B;;;ACrIA,IAAM,KAAY;CAChB,EACE,YAAY;EACV,KAAK,EAAO,UAAU;EACtB,SAAS;EACT,gBAAgB;EAChB,iBAAiB;EACjB,eAAe;EACf,kBAAkB;CACpB,EACF;CACA,EACE,YAAY;EACV,KAAK,EAAO,UAAU;EACtB,SAAS;EACT,gBAAgB;EAChB,iBAAiB;EACjB,eAAe;EACf,kBAAkB;EAClB,iBAAiB;CACnB,EACF;CACA,EACE,YAAY;EACV,KAAK,EAAO,UAAU;EACtB,SAAS;EACT,gBAAgB;EAChB,iBAAiB;EACjB,eAAe;EACf,kBAAkB;EAClB,iBAAiB;EACjB,OAAO;EACP,QAAQ;CACV,EACF;AACF;AAEA,SAAgB,KAAiB;CAC/B,OACE,kBAAC,EAAM,MAAP;EAAY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,YAAY;MACV,aAAa;MACb,SAAS;MACT,eAAe;MACf,OAAO;MACP,OAAO;MACP,QAAQ;MACR,eAAe;MACf,oBAAoB;MACpB,iBAAiB;MACjB,eAAe;MACf,iBAAiB;KACnB;KACA,UAAU,CAAC;IACb;IACA;KACE,MAAM;KACN,MAAM,EACJ,OAAO,EACL,SAAS,qCACX,EACF;KACA,YAAY;MACV,OAAO;MACP,oBAAoB;MACpB,OAAO;MACP,aAAa;MACb,eAAe;MACf,iBAAiB;MACjB,SAAS;MACT,iBAAiB;MACjB,eAAe;MACf,QAAQ;MACR,kBAAkB;MAClB,QAAQ;MACR,cAAc;MACd,MAAM;KACR;KACA,UAAU,CAAC;IACb;IACA;KACE,MAAM;KACN,YAAY;MACV,aAAa;MACb,SAAS;MACT,eAAe;MACf,OAAO;MACP,OAAO;KACT;KACA,MAAM,EACJ,OAAO,EACL,SACE,kHACJ,EACF;KACA,UAAU,CAAC;IACb;IACA;KACE,MAAM;KACN,YAAY;MACV,iBAAiB;MACjB,eAAe;MACf,oBAAoB;MACpB,SAAS;KACX;KACA,MAAM,EACJ,OAAO,EACL,SAAS,YACX,EACF;KACA,UAAU,CAAC;IACb;GACF;EACF;CACF;CACA;EACE,WAAW,EAAO,UAAU;EAC5B,SAAS;GACP,MAAM,EAAa;GACnB,MAAM,EACJ,OAAO,EACL,SACE,mNACJ,EACF;GACA,YAAY;IACV,oBAAoB;IACpB,uBAAuB;IACvB,MAAM;IACN,SAAS;IACT,kBAAkB;IAClB,kBAAkB,EAAO,UAAU;IACnC,kBAAkB;GACpB;GACA,UAAU;IACR;KACE,MAAM;KACN,MAAM,EACJ,OAAO,EACL,SAAS,sDACX,EACF;KACA,YAAY;MACV,OAAO;MACP,oBAAoB;MACpB,OAAO;MACP,aAAa;MACb,eAAe;MACf,iBAAiB;MACjB,SAAS;MACT,iBAAiB;MACjB,eAAe;MACf,QAAQ;MACR,kBAAkB;MAClB,QAAQ;MACR,cAAc;MACd,MAAM;MACN,eAAe;KACjB;KACA,UAAU,CAAC;IACb;IACA;KACE,MAAM;KACN,YAAY;MACV,aAAa;MACb,SAAS;MACT,eAAe;MACf,OAAO;MACP,OAAO;KACT;KACA,MAAM,EACJ,OAAO,EACL,SACE,gGACJ,EACF;KACA,UAAU,CAAC;IACb;IACA;KACE,MAAM;KACN,YAAY;MACV,iBAAiB;MACjB,eAAe;MACf,oBAAoB;MACpB,SAAS;KACX;KACA,MAAM,EACJ,OAAO,EACL,SAAS,gBACX,EACF;KACA,UAAU,CAAC;IACb;GACF;EACF;CACF;CACA;EACE,WAAW,EAAO,UAAU;EAC5B,SAAS;GACP,MAAM,EAAa;GACnB,YAAY;IACV,oBAAoB;IACpB,uBAAuB;IACvB,MAAM;IACN,SAAS;IACT,kBAAkB;IAClB,kBAAkB,EAAO,UAAU;GACrC;GACA,MAAM,EACJ,OAAO,EACL,SACE,oQACJ,EACF;GACA,UAAU;IACR;KACE,MAAM;KACN,YAAY;MACV,aAAa;MACb,SAAS;MACT,eAAe;MACf,OAAO;MACP,OAAO;KACT;KACA,MAAM,EACJ,OAAO,EACL,SAAS,8BACX,EACF;KACA,UAAU,CAAC;IACb;IACA;KACE,MAAM;KACN,YAAY;MACV,aAAa;MACb,SAAS;MACT,eAAe;MACf,OAAO;MACP,OAAO;KACT;KACA,MAAM,EACJ,OAAO,EACL,SACE,wLACJ,EACF;KACA,UAAU,CAAC;IACb;IACA;KACE,MAAM;KACN,YAAY;MACV,OAAO;MACP,eAAe;MACf,KAAK,EAAO,UAAU;MACtB,QAAQ;MACR,MAAM;KACR;KACA,MAAM,EACJ,OAAO,EACL,SAAS,GACX,EACF;KACA,UAAU,CAAC;IACb;GACF;EACF;CACF;AACF;;;;AC7WA,IAAM,KAAa;CACjB;EACE,WAAW,EAAO,UAAU;EAC5B,SAAS;GACP,YAAY;IACV,OAAO;IACP,oBAAoB;IACpB,OAAO;IACP,aAAa;IACb,eAAe;IACf,iBAAiB;IACjB,SAAS;IACT,iBAAiB;IACjB,eAAe;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AAQ;QACR,QAAQ;OACV,EACD,CAAA,CACE;;KACW,CAAA;IACR,CAAA;GACP,GAzBK,CAyBL,CAEV;EACI,CAAA;CACG,CAAA;AAEhB;;;ACzHA,IAAM,KAAO,CACX;CACE,WAAW,EAAO,UAAU;CAC5B,SAAS;EACP,MAAM,EAAa;EACnB,MAAM,EACJ,OAAO,CAAC,EACV;EACA,YAAY;GACV,eAAe;GACf,cAAc;GACd,cAAc;GACd,iBAAiB;GACjB,sBAAsB,EAAO,UAAU;GACvC,oBAAoB,EAAO,UAAU;GACrC,SAAS;GACT,QAAQ;EACV;EACA,UAAU,CACR;GACE,MAAM;GACN,MAAM,EACJ,OAAO,CAAC,EACV;GACA,YAAY;IACV,cAAc;IACd,eAAe;IACf,cAAc;IACd,iBAAiB;IACjB,SAAS;GACX;GACA,UAAU,CACR;IACE,MAAM;IACN,MAAM,EACJ,OAAO,EACL,SAAS,wBACX,EACF;IACA,YAAY;KACV,aAAa;KACb,SAAS;IACX;IACA,UAAU,CAAC;GACb,GACA;IACE,MAAM;IACN,MAAM,EACJ,OAAO,EACL,SACE,gQACJ,EACF;IACA,YAAY;KACV,aAAa;KACb,SAAS;KACT,eAAe;IACjB;IACA,UAAU,CAAC;GACb,CACF;EACF,GACA;GACE,MAAM;GACN,MAAM,EACJ,OAAO,CAAC,EACV;GACA,YAAY;IACV,cAAc;IACd,eAAe;IACf,cAAc;IACd,iBAAiB;IACjB,SAAS;GACX;GACA,UAAU,CACR;IACE,MAAM;IACN,MAAM,EACJ,OAAO,EACL,SAAS,eACX,EACF;IACA,YAAY;KACV,aAAa;KACb,SAAS;IACX;IACA,UAAU,CAAC;GACb,GACA;IACE,MAAM;IACN,MAAM,EACJ,OAAO,EACL,SACE,6QACJ,EACF;IACA,YAAY;KACV,aAAa;KACb,SAAS;KACT,eAAe;IACjB;IACA,UAAU,CAAC;GACb,CACF;EACF,CACF;CACF;AACF,CACF;AAEA,SAAgB,KAAqB;CACnC,OACE,kBAAC,EAAM,MAA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A,UAAU,CACR;IACE,MAAM;IACN,MAAM,EACJ,OAAO,CAAC,EACV;IACA,YAAY;KACV,kBAAkB;KAClB,WAAW;IACb;IACA,UAAU,CACR;KACE,MAAM;KACN,MAAM,EACJ,OAAO,CAAC,EACV;KACA,YAAY;MACV,SAAS;MACT,QAAQ;MACR,kBAAkB;KACpB;KACA,UAAU,CACR;MACE,MAAM;MACN,MAAM,EACJ,OAAO,CAAC,EACV;MACA,YAAY;OACV,OAAO;OACP,QAAQ;OACR,SAAS;OACT,KAAK,EAAO,UAAU;OACtB,OAAO;MACT;MACA,UAAU,CAAC;KACb,CACF;IACF,GACA;KACE,MAAM;KACN,MAAM,EACJ,OAAO,CAAC,EACV;KACA,YAAY;MACV,SAAS;MACT,QAAQ;MACR,kBAAkB;KACpB;KACA,UAAU,CACR;MACE,MAAM;MACN,MAAM,EACJ,OAAO,CAAC,EACV;MACA,YAAY;OACV,OAAO;OACP,QAAQ;OACR,SAAS;OACT,KAAK,EAAO,UAAU;OACtB,OAAO;MACT;MACA,UAAU,CAAC;KACb,CACF;IACF,CACF;GACF,CACF;EACF;CACF;CACA;EACE,WAAW,EAAO,UAAU;EAC5B,SAAS;GACP,MAAM;GACN,MAAM,EACJ,OAAO,EACL,QAAQ,GACV,EACF;GACA,YAAY;IACV,kBAAkB;IAClB,WAAW;IACX,oBAAoB;GACtB;GACA,UAAU,CACR;IACE,MAAM;IACN,MAAM,EACJ,OAAO,CAAC,EACV;IACA,YAAY;KACV,kBAAkB;KAClB,WAAW;IACb;IACA,UAAU;KACR;MACE,MAAM;MACN,MAAM,EACJ,OAAO,CAAC,EACV;MACA,YAAY;OACV,SAAS;OACT,QAAQ;OACR,kBAAkB;MACpB;MACA,UAAU,CACR;OACE,MAAM;OACN,MAAM,EACJ,OAAO,CAAC,EACV;OACA,YAAY;QACV,OAAO;QACP,QAAQ;QACR,SAAS;QACT,KAAK,EAAO,UAAU;QACtB,OAAO;OACT;OACA,UAAU,CAAC;MACb,GACA;OACE,M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