easy-email-extensions 2.5.2-beta.1 → 3.0.1
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/AttributePanel/AttributePanel.d.ts +3 -3
- package/lib/AttributePanel/components/UI/Help/index.d.ts +7 -5
- package/lib/AttributePanel/components/UI/{Help/HtmlEditor.d.ts → HtmlEditor.d.ts} +5 -5
- package/lib/AttributePanel/components/attributes/Align.d.ts +1 -1
- package/lib/AttributePanel/components/attributes/{AttributesPanelWrapper.d.ts → AttributesPanelWrapper/index.d.ts} +6 -6
- package/lib/AttributePanel/components/attributes/Background.d.ts +1 -1
- package/lib/AttributePanel/components/attributes/BackgroundColor.d.ts +3 -3
- package/lib/AttributePanel/components/attributes/Border.d.ts +1 -1
- package/lib/AttributePanel/components/attributes/BorderColor.d.ts +1 -1
- package/lib/AttributePanel/components/attributes/BorderStyle.d.ts +5 -5
- package/lib/AttributePanel/components/attributes/BorderWidth.d.ts +1 -1
- package/lib/AttributePanel/components/attributes/Color.d.ts +4 -4
- package/lib/AttributePanel/components/attributes/ContainerBackgroundColor.d.ts +3 -3
- package/lib/AttributePanel/components/attributes/Decoration.d.ts +1 -1
- package/lib/AttributePanel/components/attributes/Direction.d.ts +1 -1
- package/lib/AttributePanel/components/attributes/{FontFamliy.d.ts → FontFamily.d.ts} +1 -1
- package/lib/AttributePanel/components/attributes/FontSize.d.ts +1 -1
- package/lib/AttributePanel/components/attributes/FontStyle.d.ts +3 -3
- package/lib/AttributePanel/components/attributes/FontWeight.d.ts +1 -1
- package/lib/AttributePanel/components/attributes/Height.d.ts +3 -3
- package/lib/AttributePanel/components/attributes/LetterSpacing.d.ts +1 -1
- package/lib/AttributePanel/components/attributes/LineHeight.d.ts +1 -1
- package/lib/AttributePanel/components/attributes/Link.d.ts +1 -1
- package/lib/AttributePanel/components/attributes/Margin.d.ts +1 -1
- package/lib/AttributePanel/components/attributes/MergeTags.d.ts +6 -6
- package/lib/AttributePanel/components/attributes/NavbarLinkPadding.d.ts +3 -3
- package/lib/AttributePanel/components/attributes/Padding.d.ts +5 -5
- package/lib/AttributePanel/components/attributes/TextAlign.d.ts +1 -1
- package/lib/AttributePanel/components/attributes/TextDecoration.d.ts +1 -1
- package/lib/AttributePanel/components/attributes/TextTransform.d.ts +1 -1
- package/lib/AttributePanel/components/attributes/VerticalAlign.d.ts +3 -3
- package/lib/AttributePanel/components/attributes/Width.d.ts +3 -3
- package/lib/AttributePanel/components/attributes/index.d.ts +29 -0
- package/lib/AttributePanel/components/blocks/Accordion/index.d.ts +1 -1
- package/lib/AttributePanel/components/blocks/AccordionElement/index.d.ts +1 -1
- package/lib/AttributePanel/components/blocks/AccordionText/index.d.ts +1 -1
- package/lib/AttributePanel/components/blocks/AccordionTitle/index.d.ts +1 -1
- package/lib/AttributePanel/components/blocks/Button/index.d.ts +1 -1
- package/lib/AttributePanel/components/blocks/Carousel/index.d.ts +1 -1
- package/lib/AttributePanel/components/blocks/Column/index.d.ts +1 -1
- package/lib/AttributePanel/components/blocks/Divider/index.d.ts +1 -1
- package/lib/AttributePanel/components/blocks/Group/index.d.ts +1 -1
- package/lib/AttributePanel/components/blocks/Hero/index.d.ts +1 -1
- package/lib/AttributePanel/components/blocks/Image/index.d.ts +1 -1
- package/lib/AttributePanel/components/blocks/Navbar/index.d.ts +1 -1
- package/lib/AttributePanel/components/blocks/Page/index.d.ts +1 -1
- package/lib/AttributePanel/components/blocks/Raw/index.d.ts +1 -1
- package/lib/AttributePanel/components/blocks/Section/index.d.ts +1 -1
- package/lib/AttributePanel/components/blocks/Social/index.d.ts +1 -1
- package/lib/AttributePanel/components/blocks/Spacer/index.d.ts +1 -1
- package/lib/AttributePanel/components/blocks/Table/index.d.ts +1 -1
- package/lib/AttributePanel/components/blocks/Text/index.d.ts +1 -1
- package/lib/AttributePanel/components/blocks/Wrapper/index.d.ts +1 -1
- package/lib/AttributePanel/components/blocks/index.d.ts +42 -42
- package/lib/AttributePanel/components/provider/PresetColorsProvider/index.d.ts +6 -6
- package/lib/AttributePanel/components/provider/SelectionRangeProvider/index.d.ts +6 -6
- package/lib/AttributePanel/hooks/useSelectionRange.d.ts +6 -6
- package/lib/AttributePanel/index.d.ts +3 -3
- package/lib/AttributePanel/utils/BlockAttributeConfigurationManager.d.ts +10 -10
- package/lib/AttributePanel/utils/InputNumberAdapter.d.ts +2 -2
- package/lib/AttributePanel/utils/PromiseEach.d.ts +1 -1
- package/lib/AttributePanel/utils/Uploader.d.ts +35 -35
- package/lib/AttributePanel/utils/awaitForElement.d.ts +4 -4
- package/lib/AttributePanel/utils/classnames.d.ts +1 -1
- package/lib/AttributePanel/utils/getEditNode.d.ts +2 -2
- package/lib/AttributePanel/utils/getImg.d.ts +8 -8
- package/lib/AttributePanel/utils/onDrag.d.ts +10 -10
- package/lib/AttributePanel/utils/previewLoadImage.d.ts +1 -1
- package/lib/BlockLayer/components/BlockTree/components/BlockTreeItem/index.d.ts +23 -23
- package/lib/BlockLayer/components/BlockTree/components/TreeCollapse.d.ts +6 -6
- package/lib/BlockLayer/components/BlockTree/index.d.ts +29 -29
- package/lib/BlockLayer/components/ContextMenu/index.d.ts +14 -14
- package/lib/BlockLayer/components/EyeIcon/index.d.ts +7 -7
- package/lib/BlockLayer/index.d.ts +7 -7
- package/lib/InteractivePrompt/components/FocusTooltip.d.ts +1 -1
- package/lib/InteractivePrompt/components/HoverTooltip.d.ts +1 -1
- package/lib/InteractivePrompt/components/Toolbar.d.ts +5 -4
- package/lib/InteractivePrompt/index.d.ts +1 -1
- package/lib/InteractivePrompt/utils/awaitForElement.d.ts +4 -4
- package/lib/ShortcutToolbar/ShortcutToolbar.d.ts +1 -1
- package/lib/ShortcutToolbar/components/BlockMaskWrapper/index.d.ts +6 -6
- package/lib/ShortcutToolbar/components/BlocksPanel/index.d.ts +2 -6
- package/lib/ShortcutToolbar/components/BlocksPanel/presetTemplate/AccordionBlockItem/index.d.ts +1 -1
- package/lib/ShortcutToolbar/components/BlocksPanel/presetTemplate/ButtonBlockItem/index.d.ts +1 -1
- package/lib/ShortcutToolbar/components/BlocksPanel/presetTemplate/CarouselBlockItem/index.d.ts +1 -1
- package/lib/ShortcutToolbar/components/BlocksPanel/presetTemplate/ColumnBlockItem/index.d.ts +1 -1
- package/lib/ShortcutToolbar/components/BlocksPanel/presetTemplate/DividerBlockItem/index.d.ts +1 -1
- package/lib/ShortcutToolbar/components/BlocksPanel/presetTemplate/GroupBlockItem/index.d.ts +1 -1
- package/lib/ShortcutToolbar/components/BlocksPanel/presetTemplate/HeroBlockItem/index.d.ts +1 -1
- package/lib/ShortcutToolbar/components/BlocksPanel/presetTemplate/ImageBlockItem/index.d.ts +1 -1
- package/lib/ShortcutToolbar/components/BlocksPanel/presetTemplate/NavbarBlockItem/index.d.ts +1 -1
- package/lib/ShortcutToolbar/components/BlocksPanel/presetTemplate/RawBlockItem/index.d.ts +1 -1
- package/lib/ShortcutToolbar/components/BlocksPanel/presetTemplate/SectionBlockItem/index.d.ts +1 -1
- package/lib/ShortcutToolbar/components/BlocksPanel/presetTemplate/SocialBlockItem/index.d.ts +1 -1
- package/lib/ShortcutToolbar/components/BlocksPanel/presetTemplate/SpacerBlockItem/index.d.ts +1 -1
- package/lib/ShortcutToolbar/components/BlocksPanel/presetTemplate/TextBlockItem/index.d.ts +1 -1
- package/lib/ShortcutToolbar/components/BlocksPanel/presetTemplate/WrapperBlockItem/index.d.ts +1 -1
- package/lib/ShortcutToolbar/components/BlocksPanel/presetTemplate/index.d.ts +18 -18
- package/lib/ShortcutToolbar/components/Picture/index.d.ts +7 -7
- package/lib/ShortcutToolbar/index.d.ts +4 -4
- package/lib/ShortcutToolbar/utils/BlockMarketManager.d.ts +32 -32
- package/lib/ShortcutToolbar/utils/getImg.d.ts +68 -68
- package/lib/SimpleLayout/SimpleLayout.d.ts +2 -2
- package/lib/SimpleLayout/index.d.ts +1 -1
- package/lib/SourceCodePanel/index.d.ts +1 -1
- package/lib/components/AddToCollection/index.d.ts +5 -5
- package/lib/components/Form/AddFont.d.ts +1 -1
- package/lib/components/Form/AutoComplete.d.ts +11 -11
- package/lib/components/Form/ChexkBoxGroup.d.ts +14 -15
- package/lib/components/Form/CodemirrorEditor/index.d.ts +8 -8
- package/lib/components/Form/ColorPicker.d.ts +10 -10
- package/lib/components/Form/EditTab.d.ts +10 -10
- package/lib/components/Form/ImageUploader/index.d.ts +8 -8
- package/lib/components/Form/InlineTextField/index.d.ts +8 -8
- package/lib/components/Form/Input.d.ts +7 -7
- package/lib/components/Form/RadioGroup.d.ts +13 -13
- package/lib/components/Form/RichTextField/components/FontFamily/index.d.ts +3 -3
- package/lib/components/Form/RichTextField/components/FontSizeList/index.d.ts +3 -3
- package/lib/components/Form/RichTextField/components/Heading/index.d.ts +3 -3
- package/lib/components/Form/RichTextField/components/Link/index.d.ts +12 -12
- package/lib/components/Form/RichTextField/components/TextToolbar/MergeTags.d.ts +6 -6
- package/lib/components/Form/RichTextField/components/TextToolbar/index.d.ts +5 -5
- package/lib/components/Form/RichTextField/components/ToolItem/index.d.ts +7 -7
- package/lib/components/Form/RichTextField/index.d.ts +3 -3
- package/lib/components/Form/Select.d.ts +11 -11
- package/lib/components/Form/UploadField.d.ts +8 -8
- package/lib/components/Form/enhancer.d.ts +20 -20
- package/lib/components/Form/index.d.ts +29 -36
- package/lib/components/ShadowDom/index.d.ts +2 -2
- package/lib/hooks/useAddToCollection.d.ts +6 -6
- package/lib/index.d.ts +8 -7
- package/lib/index.js +1 -1
- package/lib/index2.js +27293 -38980
- package/lib/index2.js.map +1 -1
- package/lib/index3.js.map +1 -1
- package/lib/style.css +1 -1
- package/lib/utils/awaitForElement.d.ts +4 -4
- package/lib/utils/classnames.d.ts +1 -1
- package/package.json +3 -5
- package/readme.md +138 -138
- package/lib/InteractivePrompt/constants.d.ts +0 -15
- package/lib/components/Form/TreeSelect.d.ts +0 -16
@@ -1,4 +1,4 @@
|
|
1
|
-
export declare function awaitForElement<T extends HTMLElement>(idx: string): {
|
2
|
-
cancel: () => void;
|
3
|
-
promise: Promise<T>;
|
4
|
-
};
|
1
|
+
export declare function awaitForElement<T extends HTMLElement>(idx: string): {
|
2
|
+
cancel: () => void;
|
3
|
+
promise: Promise<T>;
|
4
|
+
};
|
@@ -1 +1 @@
|
|
1
|
-
export declare function classnames(...rest: any[]): string;
|
1
|
+
export declare function classnames(...rest: any[]): string;
|
package/package.json
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
"name": "easy-email-extensions",
|
3
3
|
"license": "MIT",
|
4
4
|
"description": "Email editor",
|
5
|
-
"version": "
|
5
|
+
"version": "3.0.1",
|
6
6
|
"author": "m-Ryan",
|
7
7
|
"repository": {
|
8
8
|
"type": "git",
|
@@ -37,7 +37,6 @@
|
|
37
37
|
"@types/react": "17.0.2",
|
38
38
|
"@types/react-dom": "^17.0.11",
|
39
39
|
"@vitejs/plugin-react-refresh": "^1.3.6",
|
40
|
-
"antd": "^4.16.13",
|
41
40
|
"cross-env": "^7.0.3",
|
42
41
|
"lerna": "^4.0.0",
|
43
42
|
"less": "^4.1.2",
|
@@ -53,7 +52,7 @@
|
|
53
52
|
"vite-plugin-style-import": "^1.3.0"
|
54
53
|
},
|
55
54
|
"dependencies": {
|
56
|
-
"
|
55
|
+
"@arco-design/web-react": "^2.25.1",
|
57
56
|
"codemirror": "^5.63.3",
|
58
57
|
"final-form": "^4.20.4",
|
59
58
|
"final-form-arrays": "^3.0.2",
|
@@ -69,11 +68,10 @@
|
|
69
68
|
"sortablejs": "^1.14.0"
|
70
69
|
},
|
71
70
|
"peerDependencies": {
|
72
|
-
"antd": "^4.16.13",
|
73
71
|
"easy-email-core": "^2.5.2",
|
74
72
|
"react": "^17.0.2",
|
75
73
|
"react-dom": "^17.0.2",
|
76
74
|
"react-final-form": "^6.5.7"
|
77
75
|
},
|
78
|
-
"gitHead": "
|
76
|
+
"gitHead": "7778e47e9e49d6280326a82d976e571f4a04b2ff"
|
79
77
|
}
|
package/readme.md
CHANGED
@@ -1,138 +1,138 @@
|
|
1
|
-
# Easy-email-extensions
|
2
|
-
|
3
|
-
## Introduction
|
4
|
-
|
5
|
-
Provide default UI components, when they don’t meet your needs, you can refer to it and write your own
|
6
|
-
|
7
|
-
## usage
|
8
|
-
|
9
|
-
```sh
|
10
|
-
$ npm install --save easy-email-extensions
|
11
|
-
```
|
12
|
-
|
13
|
-
or
|
14
|
-
|
15
|
-
```sh
|
16
|
-
$ yarn add easy-email-extensions
|
17
|
-
```
|
18
|
-
|
19
|
-
```js
|
20
|
-
import React from 'react';
|
21
|
-
import { BlockManager, BasicType } from 'easy-email-core';
|
22
|
-
import { EmailEditor, EmailEditorProvider } from 'easy-email-editor';
|
23
|
-
import { SimpleLayout } from 'easy-email-extensions';
|
24
|
-
|
25
|
-
import 'easy-email-editor/lib/style.css';
|
26
|
-
import 'easy-email-extensions/lib/style.css';
|
27
|
-
|
28
|
-
const initialValues = {
|
29
|
-
subject: 'Welcome to Easy-email',
|
30
|
-
subTitle: 'Nice to meet you!',
|
31
|
-
content: BlockManager.getBlockByType(BasicType.PAGE)!.create({}),
|
32
|
-
};
|
33
|
-
|
34
|
-
export function App() {
|
35
|
-
return (
|
36
|
-
<EmailEditorProvider
|
37
|
-
data={initialValues}
|
38
|
-
height={'calc(100vh - 72px)'}
|
39
|
-
autoComplete
|
40
|
-
dashed={false}
|
41
|
-
>
|
42
|
-
{({ values }) => {
|
43
|
-
return (
|
44
|
-
<SimpleLayout>
|
45
|
-
<EmailEditor />
|
46
|
-
</SimpleLayout>
|
47
|
-
);
|
48
|
-
}}
|
49
|
-
</EmailEditorProvider>
|
50
|
-
);
|
51
|
-
}
|
52
|
-
```
|
53
|
-
|
54
|
-
## Extensions
|
55
|
-
|
56
|
-
- `AttributePanel`
|
57
|
-
|
58
|
-
- Basic block configuration panel
|
59
|
-
|
60
|
-
- <img src="https://assets.maocanhua.cn/3e74a61d-ab22-4cf3-afc9-d511b82e08cd-image.png" alt="AttributePanel">
|
61
|
-
|
62
|
-
- You can add or overwrite
|
63
|
-
|
64
|
-
```tsx
|
65
|
-
import { BlockAttributeConfigurationManager } from "easy-email-extensions";
|
66
|
-
|
67
|
-
BlockAttributeConfigurationManager.add({
|
68
|
-
[BasicType.TEXT]: () => <div>will be overwrite `Text`</div>,
|
69
|
-
});
|
70
|
-
```
|
71
|
-
|
72
|
-
- `InteractivePrompt`
|
73
|
-
|
74
|
-
- block hover and focus style
|
75
|
-
|
76
|
-
- <img src="https://assets.maocanhua.cn/298d72d6-a509-4cd2-85c7-dfb915971620-image.png" alt="InteractivePrompt">
|
77
|
-
|
78
|
-
- No configuration items
|
79
|
-
|
80
|
-
- `BlockLayer`
|
81
|
-
|
82
|
-
- <img src="https://assets.maocanhua.cn/de1f5211-350e-43c9-9c99-d97a2f196e04-image.png" alt="ShortcutToolbar">
|
83
|
-
- No configuration items
|
84
|
-
|
85
|
-
- `ShortcutToolbar`
|
86
|
-
|
87
|
-
- <img src="https://assets.maocanhua.cn/f0e2ccc6-0627-472b-ad78-bc92bdb46ad1-image.png">
|
88
|
-
- You can add or overwrite popover's preset blocks
|
89
|
-
|
90
|
-
```tsx
|
91
|
-
import { BasicType } from "easy-email-core";
|
92
|
-
import {
|
93
|
-
BlockMarketManager,
|
94
|
-
BlockMaskWrapper,
|
95
|
-
} from "easy-email-extensions";
|
96
|
-
|
97
|
-
BlockMarketManager.addCategories([
|
98
|
-
{
|
99
|
-
title: "Custom",
|
100
|
-
name: "custom",
|
101
|
-
blocks: [
|
102
|
-
{
|
103
|
-
type: BasicType.TEXT,
|
104
|
-
title: "Text",
|
105
|
-
description: "This block allows you to display text in your email.",
|
106
|
-
component: () => {
|
107
|
-
return (
|
108
|
-
<BlockMaskWrapper
|
109
|
-
type={BasicType.TEXT}
|
110
|
-
payload={{
|
111
|
-
attributes: {
|
112
|
-
"font-size": "20px",
|
113
|
-
align: "center",
|
114
|
-
padding: "0px 0px 0px 0px",
|
115
|
-
color: "#4A90E2",
|
116
|
-
},
|
117
|
-
data: {
|
118
|
-
value: {
|
119
|
-
content: "20px",
|
120
|
-
},
|
121
|
-
},
|
122
|
-
}}
|
123
|
-
>
|
124
|
-
<div style={{ fontSize: 20, width: "100%", paddingLeft: 20 }}>
|
125
|
-
20px
|
126
|
-
</div>
|
127
|
-
</BlockMaskWrapper>
|
128
|
-
);
|
129
|
-
},
|
130
|
-
},
|
131
|
-
],
|
132
|
-
},
|
133
|
-
]);
|
134
|
-
```
|
135
|
-
|
136
|
-
- `SimpleLayout`
|
137
|
-
|
138
|
-
- All in one extension, provide basic and complete layout example. Refer to the above extension for configuration items.
|
1
|
+
# Easy-email-extensions
|
2
|
+
|
3
|
+
## Introduction
|
4
|
+
|
5
|
+
Provide default UI components, when they don’t meet your needs, you can refer to it and write your own
|
6
|
+
|
7
|
+
## usage
|
8
|
+
|
9
|
+
```sh
|
10
|
+
$ npm install --save easy-email-extensions
|
11
|
+
```
|
12
|
+
|
13
|
+
or
|
14
|
+
|
15
|
+
```sh
|
16
|
+
$ yarn add easy-email-extensions
|
17
|
+
```
|
18
|
+
|
19
|
+
```js
|
20
|
+
import React from 'react';
|
21
|
+
import { BlockManager, BasicType } from 'easy-email-core';
|
22
|
+
import { EmailEditor, EmailEditorProvider } from 'easy-email-editor';
|
23
|
+
import { SimpleLayout } from 'easy-email-extensions';
|
24
|
+
|
25
|
+
import 'easy-email-editor/lib/style.css';
|
26
|
+
import 'easy-email-extensions/lib/style.css';
|
27
|
+
|
28
|
+
const initialValues = {
|
29
|
+
subject: 'Welcome to Easy-email',
|
30
|
+
subTitle: 'Nice to meet you!',
|
31
|
+
content: BlockManager.getBlockByType(BasicType.PAGE)!.create({}),
|
32
|
+
};
|
33
|
+
|
34
|
+
export function App() {
|
35
|
+
return (
|
36
|
+
<EmailEditorProvider
|
37
|
+
data={initialValues}
|
38
|
+
height={'calc(100vh - 72px)'}
|
39
|
+
autoComplete
|
40
|
+
dashed={false}
|
41
|
+
>
|
42
|
+
{({ values }) => {
|
43
|
+
return (
|
44
|
+
<SimpleLayout>
|
45
|
+
<EmailEditor />
|
46
|
+
</SimpleLayout>
|
47
|
+
);
|
48
|
+
}}
|
49
|
+
</EmailEditorProvider>
|
50
|
+
);
|
51
|
+
}
|
52
|
+
```
|
53
|
+
|
54
|
+
## Extensions
|
55
|
+
|
56
|
+
- `AttributePanel`
|
57
|
+
|
58
|
+
- Basic block configuration panel
|
59
|
+
|
60
|
+
- <img src="https://assets.maocanhua.cn/3e74a61d-ab22-4cf3-afc9-d511b82e08cd-image.png" alt="AttributePanel">
|
61
|
+
|
62
|
+
- You can add or overwrite
|
63
|
+
|
64
|
+
```tsx
|
65
|
+
import { BlockAttributeConfigurationManager } from "easy-email-extensions";
|
66
|
+
|
67
|
+
BlockAttributeConfigurationManager.add({
|
68
|
+
[BasicType.TEXT]: () => <div>will be overwrite `Text`</div>,
|
69
|
+
});
|
70
|
+
```
|
71
|
+
|
72
|
+
- `InteractivePrompt`
|
73
|
+
|
74
|
+
- block hover and focus style
|
75
|
+
|
76
|
+
- <img src="https://assets.maocanhua.cn/298d72d6-a509-4cd2-85c7-dfb915971620-image.png" alt="InteractivePrompt">
|
77
|
+
|
78
|
+
- No configuration items
|
79
|
+
|
80
|
+
- `BlockLayer`
|
81
|
+
|
82
|
+
- <img src="https://assets.maocanhua.cn/de1f5211-350e-43c9-9c99-d97a2f196e04-image.png" alt="ShortcutToolbar">
|
83
|
+
- No configuration items
|
84
|
+
|
85
|
+
- `ShortcutToolbar`
|
86
|
+
|
87
|
+
- <img src="https://assets.maocanhua.cn/f0e2ccc6-0627-472b-ad78-bc92bdb46ad1-image.png">
|
88
|
+
- You can add or overwrite popover's preset blocks
|
89
|
+
|
90
|
+
```tsx
|
91
|
+
import { BasicType } from "easy-email-core";
|
92
|
+
import {
|
93
|
+
BlockMarketManager,
|
94
|
+
BlockMaskWrapper,
|
95
|
+
} from "easy-email-extensions";
|
96
|
+
|
97
|
+
BlockMarketManager.addCategories([
|
98
|
+
{
|
99
|
+
title: "Custom",
|
100
|
+
name: "custom",
|
101
|
+
blocks: [
|
102
|
+
{
|
103
|
+
type: BasicType.TEXT,
|
104
|
+
title: "Text",
|
105
|
+
description: "This block allows you to display text in your email.",
|
106
|
+
component: () => {
|
107
|
+
return (
|
108
|
+
<BlockMaskWrapper
|
109
|
+
type={BasicType.TEXT}
|
110
|
+
payload={{
|
111
|
+
attributes: {
|
112
|
+
"font-size": "20px",
|
113
|
+
align: "center",
|
114
|
+
padding: "0px 0px 0px 0px",
|
115
|
+
color: "#4A90E2",
|
116
|
+
},
|
117
|
+
data: {
|
118
|
+
value: {
|
119
|
+
content: "20px",
|
120
|
+
},
|
121
|
+
},
|
122
|
+
}}
|
123
|
+
>
|
124
|
+
<div style={{ fontSize: 20, width: "100%", paddingLeft: 20 }}>
|
125
|
+
20px
|
126
|
+
</div>
|
127
|
+
</BlockMaskWrapper>
|
128
|
+
);
|
129
|
+
},
|
130
|
+
},
|
131
|
+
],
|
132
|
+
},
|
133
|
+
]);
|
134
|
+
```
|
135
|
+
|
136
|
+
- `SimpleLayout`
|
137
|
+
|
138
|
+
- All in one extension, provide basic and complete layout example. Refer to the above extension for configuration items.
|
@@ -1,15 +0,0 @@
|
|
1
|
-
export declare const DRAG_HOVER_CLASSNAME = "block-dragover";
|
2
|
-
export declare const BLOCK_SELECTED_CLASSNAME = "block-selected";
|
3
|
-
export declare const BLOCK_HOVER_CLASSNAME = "block-hover";
|
4
|
-
export declare const BLOCK_HIDDEN_CLASSNAME = "block-hidden";
|
5
|
-
export declare const styleZIndex: {
|
6
|
-
SELECT_INDEX: number;
|
7
|
-
HOVER_INDEX: number;
|
8
|
-
DRAG_INDEX: number;
|
9
|
-
SELECT_BLOCK_TOOLTIP: number;
|
10
|
-
HOVER_BLOCK_TOOLTIP: number;
|
11
|
-
DRAG_BLOCK_TOOLTIP: number;
|
12
|
-
SELECT_BLOCK_CHILD: number;
|
13
|
-
HOVER_BLOCK_CHILD: number;
|
14
|
-
DRAG_BLOCK_CHILD: number;
|
15
|
-
};
|
@@ -1,16 +0,0 @@
|
|
1
|
-
import { TreeSelectProps as AntdTreeSelectProps } from 'antd/lib/tree-select';
|
2
|
-
import React from 'react';
|
3
|
-
interface TreeSelectOption {
|
4
|
-
value: string;
|
5
|
-
label: React.ReactNode;
|
6
|
-
selectable?: boolean;
|
7
|
-
options?: TreeSelectOption[];
|
8
|
-
}
|
9
|
-
export interface TreeSelectProps extends AntdTreeSelectProps<string> {
|
10
|
-
options: TreeSelectOption[];
|
11
|
-
onChange?: (val: string) => void;
|
12
|
-
label: string;
|
13
|
-
title?: string;
|
14
|
-
}
|
15
|
-
export declare function TreeSelect(props: TreeSelectProps): JSX.Element;
|
16
|
-
export {};
|