diff --git a/packages/editor/images/account.svg b/packages/editor/images/account.svg new file mode 100644 index 00000000..9ba309ee --- /dev/null +++ b/packages/editor/images/account.svg @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/packages/editor/images/add.svg b/packages/editor/images/add.svg new file mode 100644 index 00000000..ddb7eeef --- /dev/null +++ b/packages/editor/images/add.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/editor/images/ajax-loader.gif b/packages/editor/images/ajax-loader.gif new file mode 100644 index 00000000..92153b08 Binary files /dev/null and b/packages/editor/images/ajax-loader.gif differ diff --git a/packages/editor/images/back-icon.svg b/packages/editor/images/back-icon.svg new file mode 100644 index 00000000..2a970a40 --- /dev/null +++ b/packages/editor/images/back-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/editor/images/center_focus.svg b/packages/editor/images/center_focus.svg new file mode 100644 index 00000000..e8017c36 --- /dev/null +++ b/packages/editor/images/center_focus.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/editor/images/discard.svg b/packages/editor/images/discard.svg new file mode 100644 index 00000000..989837ca --- /dev/null +++ b/packages/editor/images/discard.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/editor/images/export.svg b/packages/editor/images/export.svg new file mode 100644 index 00000000..11ff822e --- /dev/null +++ b/packages/editor/images/export.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/editor/images/favicon.ico b/packages/editor/images/favicon.ico new file mode 100644 index 00000000..955c5116 Binary files /dev/null and b/packages/editor/images/favicon.ico differ diff --git a/packages/editor/images/favicon.png b/packages/editor/images/favicon.png new file mode 100644 index 00000000..bb62808d Binary files /dev/null and b/packages/editor/images/favicon.png differ diff --git a/packages/editor/images/font-bold.svg b/packages/editor/images/font-bold.svg new file mode 100644 index 00000000..9df69edf --- /dev/null +++ b/packages/editor/images/font-bold.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/editor/images/font-color.svg b/packages/editor/images/font-color.svg new file mode 100644 index 00000000..a695c281 --- /dev/null +++ b/packages/editor/images/font-color.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/editor/images/font-italic.svg b/packages/editor/images/font-italic.svg new file mode 100644 index 00000000..630eb0cd --- /dev/null +++ b/packages/editor/images/font-italic.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/editor/images/font-size.svg b/packages/editor/images/font-size.svg new file mode 100644 index 00000000..856af577 --- /dev/null +++ b/packages/editor/images/font-size.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/editor/images/font-type.svg b/packages/editor/images/font-type.svg new file mode 100644 index 00000000..177a8635 --- /dev/null +++ b/packages/editor/images/font-type.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/editor/images/history.svg b/packages/editor/images/history.svg new file mode 100644 index 00000000..3f7c900b --- /dev/null +++ b/packages/editor/images/history.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/editor/images/keyboard.svg b/packages/editor/images/keyboard.svg new file mode 100644 index 00000000..c3b8e54a --- /dev/null +++ b/packages/editor/images/keyboard.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/editor/images/logo-small.svg b/packages/editor/images/logo-small.svg new file mode 100644 index 00000000..fae99531 --- /dev/null +++ b/packages/editor/images/logo-small.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/editor/images/logo-text-black.svg b/packages/editor/images/logo-text-black.svg new file mode 100644 index 00000000..5b042da3 --- /dev/null +++ b/packages/editor/images/logo-text-black.svg @@ -0,0 +1,3 @@ + + + diff --git a/packages/editor/images/minus.svg b/packages/editor/images/minus.svg new file mode 100644 index 00000000..7dd812a8 --- /dev/null +++ b/packages/editor/images/minus.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/editor/images/note-add.svg b/packages/editor/images/note-add.svg new file mode 100644 index 00000000..362f452e --- /dev/null +++ b/packages/editor/images/note-add.svg @@ -0,0 +1,1049 @@ + + + + Material Design Color, Flat Colors, Icons, Color Palette | Material UI + + +
+ + diff --git a/packages/editor/images/print.svg b/packages/editor/images/print.svg new file mode 100644 index 00000000..21fdce2b --- /dev/null +++ b/packages/editor/images/print.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/editor/images/public.svg b/packages/editor/images/public.svg new file mode 100644 index 00000000..ddcd5677 --- /dev/null +++ b/packages/editor/images/public.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/editor/images/pwrdby-white.svg b/packages/editor/images/pwrdby-white.svg new file mode 100644 index 00000000..cf8d9c3a --- /dev/null +++ b/packages/editor/images/pwrdby-white.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/editor/images/redo.svg b/packages/editor/images/redo.svg new file mode 100644 index 00000000..97d99c8b --- /dev/null +++ b/packages/editor/images/redo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/editor/images/save.svg b/packages/editor/images/save.svg new file mode 100644 index 00000000..f5b5c7cf --- /dev/null +++ b/packages/editor/images/save.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/editor/images/topic-add.svg b/packages/editor/images/topic-add.svg new file mode 100644 index 00000000..25db132c --- /dev/null +++ b/packages/editor/images/topic-add.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/editor/images/topic-border.svg b/packages/editor/images/topic-border.svg new file mode 100644 index 00000000..ae7e7a32 --- /dev/null +++ b/packages/editor/images/topic-border.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/editor/images/topic-color.svg b/packages/editor/images/topic-color.svg new file mode 100644 index 00000000..4064d0a6 --- /dev/null +++ b/packages/editor/images/topic-color.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/editor/images/topic-delete.svg b/packages/editor/images/topic-delete.svg new file mode 100644 index 00000000..08b05d02 --- /dev/null +++ b/packages/editor/images/topic-delete.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/editor/images/topic-icon.svg b/packages/editor/images/topic-icon.svg new file mode 100644 index 00000000..9254873e --- /dev/null +++ b/packages/editor/images/topic-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/editor/images/topic-link.svg b/packages/editor/images/topic-link.svg new file mode 100644 index 00000000..8eb3b987 --- /dev/null +++ b/packages/editor/images/topic-link.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/editor/images/topic-note.svg b/packages/editor/images/topic-note.svg new file mode 100644 index 00000000..d065cbf1 --- /dev/null +++ b/packages/editor/images/topic-note.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/editor/images/topic-notes.svg b/packages/editor/images/topic-notes.svg new file mode 100644 index 00000000..d065cbf1 --- /dev/null +++ b/packages/editor/images/topic-notes.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/editor/images/topic-relation.svg b/packages/editor/images/topic-relation.svg new file mode 100644 index 00000000..05c81f8a --- /dev/null +++ b/packages/editor/images/topic-relation.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/editor/images/topic-shape.svg b/packages/editor/images/topic-shape.svg new file mode 100644 index 00000000..2b3f3171 --- /dev/null +++ b/packages/editor/images/topic-shape.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/editor/images/undo.svg b/packages/editor/images/undo.svg new file mode 100644 index 00000000..038aa75e --- /dev/null +++ b/packages/editor/images/undo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/editor/package.json b/packages/editor/package.json index 7c3f42b8..783a4e76 100644 --- a/packages/editor/package.json +++ b/packages/editor/package.json @@ -1,8 +1,10 @@ { "name": "@wisemapping/editor", - "version": "1.0.0", - "main": "src/index.tsx", - "scripts": {}, + "version": "0.1.0", + "main": "dist/editor.bundle.js", + "scripts": { + "build": "webpack --config webpack.prod.js" + }, "repository": "http://www.wisemapping.com", "author": "Paulo Veiga , Ezequiel Bergamaschi ", "license": "MIT", @@ -12,19 +14,30 @@ "@types/react-dom": "^17.0.0", "@typescript-eslint/eslint-plugin": "^4.8.1", "@typescript-eslint/parser": "^4.8.1", + "clean-webpack-plugin": "^4.0.0", + "compression-webpack-plugin": "^9.2.0", + "copy-webpack-plugin": "^10.2.1", "eslint": "^7.14.0", "eslint-config-prettier": "^8.0.0", "eslint-plugin-react": "^7.21.5", "eslint-plugin-react-hooks": "^4.2.0", + "html-webpack-plugin": "^5.5.0", "prettier": "^2.2.1", "ts-loader": "^8.0.11", "ts-node": "^9.0.0", - "typescript": "^4.1.2" + "typescript": "^4.1.2", + "webpack": "^5.67.0", + "webpack-dev-server": "^4.7.3", + "webpack-merge": "^5.8.0" }, "dependencies": { "@types/styled-components": "^5.1.4", - "react": "^17.0.1", - "react-dom": "^17.0.1", + "@wisemapping/mindplot": "^0.4.15", "styled-components": "^5.2.1" + }, + "peerDependencies": { + "react": "^17.0.0", + "react-dom": "^17.0.0", + "react-intl": "^5.24.3" } -} \ No newline at end of file +} diff --git a/packages/editor/src/components/canvas/index.tsx b/packages/editor/src/components/canvas/index.tsx deleted file mode 100644 index eeb2d746..00000000 --- a/packages/editor/src/components/canvas/index.tsx +++ /dev/null @@ -1,6 +0,0 @@ -import React from 'react'; -import { StyledCanvas } from './styled'; - -const Canvas = (): React.ReactElement => canvas; - -export default Canvas; diff --git a/packages/editor/src/components/canvas/styled.ts b/packages/editor/src/components/canvas/styled.ts deleted file mode 100644 index 7cc7eb85..00000000 --- a/packages/editor/src/components/canvas/styled.ts +++ /dev/null @@ -1,8 +0,0 @@ -import styled from 'styled-components'; - -export const StyledCanvas = styled.div` - height: 100% - width: 100%; - flex: 1; - -`; diff --git a/packages/editor/src/components/footer/index.tsx b/packages/editor/src/components/footer/index.tsx index d654d237..c5ee7399 100644 --- a/packages/editor/src/components/footer/index.tsx +++ b/packages/editor/src/components/footer/index.tsx @@ -1,6 +1,49 @@ import React from 'react'; import { StyledFooter } from './styled'; +import { useIntl } from 'react-intl'; -const Footer = (): React.ReactElement => footer; +export type FooterPropsType = { + showTryPanel?: boolean; +}; + +const Footer = ({ showTryPanel }: FooterPropsType): React.ReactElement => { + const intl = useIntl(); + + return ( + <> +
+
+ +
+
+ + +
+
+ +
+
+ +
+ {showTryPanel && ( +
+

{intl.formatMessage({ id: 'editor.try-welcome' })}

+

{intl.formatMessage({ id: 'editor.try-welcome-description' })}

+ +
+ {intl.formatMessage({ id: 'login.signup', defaultMessage: 'Sign Up' })} +
+
+
+ )} + + ); +}; export default Footer; diff --git a/packages/editor/src/components/frame/index.tsx b/packages/editor/src/components/frame/index.tsx deleted file mode 100644 index b809c9db..00000000 --- a/packages/editor/src/components/frame/index.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import React from 'react'; -import Footer from '../footer'; -import TopBar from '../top-bar'; -import Canvas from '../canvas'; -import { StyledFrame } from './styled'; - -const Frame = (): React.ReactElement => ( - - - -