);
}
-export default App;
+export default withWidth()(App);
diff --git a/client/src/containers/App/AppBar.js b/client/src/containers/App/AppBar.js
new file mode 100644
index 0000000..e1582c9
--- /dev/null
+++ b/client/src/containers/App/AppBar.js
@@ -0,0 +1,62 @@
+import React from 'react';
+import { makeStyles } from '@material-ui/core/styles';
+import AppBar from '@material-ui/core/AppBar';
+import Link from '@material-ui/core/Link';
+import GitHubIcon from '@material-ui/icons/GitHub';
+import IconButton from '@material-ui/core/IconButton';
+import MenuIcon from '@material-ui/icons/Menu';
+import clsx from 'clsx';
+import Toolbar from '@material-ui/core/Toolbar';
+import Typography from '@material-ui/core/Typography';
+
+const useStyles = makeStyles((theme) => ({
+ grow: {
+ flexGrow: 1,
+ },
+ menuButton: {
+ marginRight: theme.spacing(2),
+ },
+ hide: {
+ display: 'none',
+ },
+}));
+
+export default function ApplicationBar(props) {
+ const { open, className, handleDrawerOpen } = props;
+ const classes = useStyles();
+ return (
+
+
+
+
+
+
+
+ Basic Primitives
+
+
+
+
+
+
+
+
+
+ );
+}
diff --git a/client/src/containers/FamilyChartWithAnnotations/FamilyChartWithAnnotations.js b/client/src/containers/FamilyChartWithAnnotations/FamilyChartWithAnnotations.js
index 1b256eb..60f39ad 100644
--- a/client/src/containers/FamilyChartWithAnnotations/FamilyChartWithAnnotations.js
+++ b/client/src/containers/FamilyChartWithAnnotations/FamilyChartWithAnnotations.js
@@ -1,4 +1,4 @@
-import React, { useEffect, useMemo, useCallback } from 'react';
+import React, { useEffect, useMemo } from 'react';
import Helmet from 'react-helmet';
import Container from '@material-ui/core/Container';
import Drawer from '@material-ui/core/Drawer';
diff --git a/client/src/containers/ReactUseCases/ReactHowToUse.js b/client/src/containers/ReactUseCases/ReactHowToUse.js
index ff0ceb9..c851ef5 100644
--- a/client/src/containers/ReactUseCases/ReactHowToUse.js
+++ b/client/src/containers/ReactUseCases/ReactHowToUse.js
@@ -15,7 +15,7 @@ import { faUserPlus, faUserSlash, faCoffee, faSitemap, faUser, faComment, faCog
import primitives from 'basicprimitives';
import { OrgDiagram, FamDiagram } from 'basicprimitivesreact';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
-import { DndProvider, DropTarget, DragSource } from 'react-dnd';
+import { DndProvider, useDrag, useDrop, DropTarget, DragSource } from 'react-dnd';
import { HTML5Backend } from 'react-dnd-html5-backend';
require('./global.scss');
@@ -70,6 +70,8 @@ function ReactHowToUse(props) {
DndProvider,
DropTarget,
DragSource,
+ useDrag,
+ useDrop,
HTML5Backend,
FontAwesomeIcon,
faUserPlus,
diff --git a/client/src/containers/Reference/ApiReference.js b/client/src/containers/Reference/ApiReference.js
index 1ae3496..6739acd 100644
--- a/client/src/containers/Reference/ApiReference.js
+++ b/client/src/containers/Reference/ApiReference.js
@@ -1,6 +1,8 @@
import React, { useEffect } from 'react';
import Helmet from 'react-helmet';
import { Link } from '@reach/router';
+import TableContainer from '@material-ui/core/TableContainer';
+import Paper from '@material-ui/core/Paper';
import Table from '@material-ui/core/Table';
import TableBody from '@material-ui/core/TableBody';
import TableCell from '@material-ui/core/TableCell';
@@ -29,12 +31,6 @@ function ApiReference(props) {
let key = 0;
function handleIterate(Tag, props, children, level) {
- if (level === 1) {
- props = {
- ...props,
- className: 'first-level-class'
- };
- }
key++;
switch(Tag) {
case "h2":
@@ -56,7 +52,7 @@ function ApiReference(props) {
}
break;
case 'table':
- return
{children}
;
+ return
{children}
;
case 'tbody':
return {children};
case 'thead':
@@ -76,6 +72,8 @@ function ApiReference(props) {
return {children};
case 'td':
return {children};
+ case 'span':
+ return {children};
default:
break;
}
@@ -88,10 +86,10 @@ function ApiReference(props) {
}
return (markdown ?
-
+ <>
-
+ >
: <>
>
);
diff --git a/server/src/static/orgeditor.md b/server/src/static/orgeditor.md
index 61efb8e..923e32a 100644
--- a/server/src/static/orgeditor.md
+++ b/server/src/static/orgeditor.md
@@ -1,13 +1,16 @@
## Demoed features
### General
* Diagram reset
-* PDF file generation
+* [PDF file generation](https://pdfkit.org/)
* Diagram options drawer
* Nodes search drawer
* Add new root node
-* Drag & Drop node from parent to parent
+* [React](https://reactjs.org/)
+* [Redux](https://redux.js.org/)
+* [React Drag & Drop support](https://react-dnd.github.io/react-dnd/docs/overview)
+* [React Material-UI](https://material-ui.com/)
### Dual Mode View
-* Showing two diagram components side by side lets you see distant parts of the same diagram
+* Showing two diagraming components side by side let you see distant parts of the same diagram
* Zoom in on one side and Drag & Drop nodes to other side.
### Diagram node:
* Edit node properties
@@ -22,5 +25,5 @@
* Remove item from selected nodes
-## Matrix children layout
+### Matrix children layout
Usually organizational charts grow horizontally more than vertically. So keeping nodes in square formation saves horizontal space. It is important to fit matrix into width of screen, it is fine to scroll nodes vertically or horizontally, but necessaty to scroll both ways creates usability issue, so chart support extra option `maximumColumnsInMatrix` limiting number of columns. For example when node has 4 children they are matrxied into 2 * 2 matrix, 9 children are matrixed into 3 * 3 matrix, 16 into 4 * 4 and so on, but if we put limitation for number of columns for example at 4 then 20 children would be matrixed into 4 * 5 matrix.
\ No newline at end of file