@go-mailer/easy-email-extensions 4.16.3

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.
Files changed (2) hide show
  1. package/package.json +105 -0
  2. package/readme.md +116 -0
package/package.json ADDED
@@ -0,0 +1,105 @@
1
+ {
2
+ "name": "@go-mailer/easy-email-extensions",
3
+ "license": "MIT",
4
+ "description": "Email editor",
5
+ "version": "4.16.3",
6
+ "author": "noguntuberu",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git@github.com:noguntuberu/easy-email-editor.git"
10
+ },
11
+ "keywords": [
12
+ "email editor core"
13
+ ],
14
+ "files": [
15
+ "lib"
16
+ ],
17
+ "main": "lib/index.js",
18
+ "types": "lib/index.d.ts",
19
+ "scripts": {
20
+ "dev": "vite",
21
+ "typings": "tsc --declaration --emitDeclarationOnly --project tsconfig.lib.json && tsc-alias -p tsconfig.alias.json",
22
+ "build": "rimraf lib && npm run typings && vite build --config vite.config.ts",
23
+ "format": "eslint --fix --ext .tsx,.ts,.tsx src/",
24
+ "test": "jest --coverage"
25
+ },
26
+ "husky": {
27
+ "hooks": {
28
+ "pre-commit": "yarn test && yarn lint-staged"
29
+ }
30
+ },
31
+ "lint-staged": {
32
+ "src/*.{js,jsx,ts,tsx}, example/*.{js,jsx,ts,tsx}": [
33
+ "yarn lint"
34
+ ]
35
+ },
36
+ "devDependencies": {
37
+ "@babel/core": "^7.15.0",
38
+ "@babel/preset-env": "^7.15.0",
39
+ "@babel/preset-react": "^7.14.5",
40
+ "@babel/preset-typescript": "^7.15.0",
41
+ "@types/color": "^3.0.3",
42
+ "@types/jest": "^26.0.24",
43
+ "@types/jsdom": "^16.2.13",
44
+ "@types/lodash": "^4.14.178",
45
+ "@types/node": "^16.11.7",
46
+ "@types/react": "^18.2.2",
47
+ "@types/react-color": "^3.0.6",
48
+ "@types/react-dom": "^18.2.3",
49
+ "@types/uuid": "^8.3.4",
50
+ "@typescript-eslint/eslint-plugin": "^4.28.3",
51
+ "@typescript-eslint/parser": "^4.28.3",
52
+ "@vitejs/plugin-react-refresh": "^1.3.6",
53
+ "babel-jest": "^27.0.6",
54
+ "cross-env": "^7.0.3",
55
+ "eslint": "^7.31.0",
56
+ "eslint-config-prettier": "^8.3.0",
57
+ "eslint-loader": "^4.0.2",
58
+ "eslint-plugin-import": "^2.23.4",
59
+ "eslint-plugin-prettier": "^3.4.0",
60
+ "eslint-plugin-react": "^7.24.0",
61
+ "eslint-plugin-react-hooks": "^4.2.0",
62
+ "jest": "^27.0.6",
63
+ "jsdom": "^17.0.0",
64
+ "lerna": "^4.0.0",
65
+ "less": "^4.1.2",
66
+ "react": "^18.2.0",
67
+ "react-dom": "^18.2.0",
68
+ "react-final-form": "^6.5.7",
69
+ "rimraf": "^5.0.5",
70
+ "rollup-plugin-visualizer": "^5.5.2",
71
+ "sass": "^1.43.4",
72
+ "ts-node": "^10.4.0",
73
+ "tsc-alias": "^1.4.1",
74
+ "typescript": "^4.4.4",
75
+ "vite": "^2.6.14",
76
+ "vite-plugin-html": "^2.1.1",
77
+ "vite-plugin-style-import": "^1.3.0"
78
+ },
79
+ "dependencies": {
80
+ "@arco-design/web-react": "^2.36.1",
81
+ "codemirror": "^5.63.3",
82
+ "color": "^4.2.3",
83
+ "final-form": "^4.20.4",
84
+ "final-form-arrays": "^3.0.2",
85
+ "final-form-set-field-touched": "^1.0.1",
86
+ "is-hotkey": "^0.2.0",
87
+ "lodash": "^4.17.21",
88
+ "mjml-browser": "^4.10.4",
89
+ "overlayscrollbars": "^1.13.2",
90
+ "overlayscrollbars-react": "^0.3.0",
91
+ "react-codemirror2": "^7.2.1",
92
+ "react-color": "^2.19.3",
93
+ "react-final-form-arrays": "^3.1.3",
94
+ "react-use": "^17.3.1",
95
+ "uuid": "^9.0.1"
96
+ },
97
+ "peerDependencies": {
98
+ "easy-email-core": "^4.3.6",
99
+ "easy-email-editor": "^4.3.6",
100
+ "react": "^18.2.0",
101
+ "react-dom": "^18.2.0",
102
+ "react-final-form": "^6.5.7"
103
+ },
104
+ "gitHead": "bb5757eb3146f55c31d4354f1480939c3af8efe1"
105
+ }
package/readme.md ADDED
@@ -0,0 +1,116 @@
1
+ # Easy-email-extensions
2
+
3
+ ## usage
4
+
5
+ ```sh
6
+ $ npm install --save easy-email-extensions
7
+ ```
8
+
9
+ or
10
+
11
+ ```sh
12
+ $ yarn add easy-email-extensions
13
+ ```
14
+
15
+ ```js
16
+ import React from 'react';
17
+ import { BlockManager, BasicType, AdvancedType } from 'easy-email-core';
18
+ import { EmailEditor, EmailEditorProvider } from 'easy-email-editor';
19
+ import { ExtensionProps, StandardLayout } from 'easy-email-extensions';
20
+
21
+ import 'easy-email-editor/lib/style.css';
22
+ import 'easy-email-extensions/lib/style.css';
23
+
24
+ const categories: ExtensionProps['categories'] = [
25
+ {
26
+ label: 'Content',
27
+ active: true,
28
+ blocks: [
29
+ {
30
+ type: AdvancedType.TEXT,
31
+ },
32
+ {
33
+ type: AdvancedType.IMAGE,
34
+ payload: { attributes: { padding: '0px 0px 0px 0px' } },
35
+ },
36
+ {
37
+ type: AdvancedType.BUTTON,
38
+ },
39
+ {
40
+ type: AdvancedType.SOCIAL,
41
+ },
42
+ {
43
+ type: AdvancedType.DIVIDER,
44
+ },
45
+ {
46
+ type: AdvancedType.SPACER,
47
+ },
48
+ {
49
+ type: AdvancedType.HERO,
50
+ },
51
+ {
52
+ type: AdvancedType.WRAPPER,
53
+ },
54
+ ],
55
+ },
56
+ {
57
+ label: 'Layout',
58
+ active: true,
59
+ displayType: 'column',
60
+ blocks: [
61
+ {
62
+ title: '2 columns',
63
+ payload: [
64
+ ['50%', '50%'],
65
+ ['33%', '67%'],
66
+ ['67%', '33%'],
67
+ ['25%', '75%'],
68
+ ['75%', '25%'],
69
+ ],
70
+ },
71
+ {
72
+ title: '3 columns',
73
+ payload: [
74
+ ['33.33%', '33.33%', '33.33%'],
75
+ ['25%', '25%', '50%'],
76
+ ['50%', '25%', '25%'],
77
+ ],
78
+ },
79
+ {
80
+ title: '4 columns',
81
+ payload: [['25%', '25%', '25%', '25%']],
82
+ },
83
+ ],
84
+ },
85
+ ];
86
+
87
+ const initialValues = {
88
+ subject: 'Welcome to Easy-email',
89
+ subTitle: 'Nice to meet you!',
90
+ content: BlockManager.getBlockByType(BasicType.PAGE)!.create({}),
91
+ };
92
+
93
+ export default function App() {
94
+
95
+ return (
96
+ <EmailEditorProvider
97
+ data={initialValues}
98
+ height={'calc(100vh - 72px)'}
99
+ autoComplete
100
+ dashed={false}
101
+ >
102
+ {({ values }) => {
103
+ return (
104
+ <StandardLayout
105
+ categories={categories}
106
+ showSourceCode={true}
107
+ >
108
+ <EmailEditor />
109
+ </StandardLayout>
110
+ );
111
+ }}
112
+ </EmailEditorProvider>
113
+ );
114
+ }
115
+
116
+ ```