Skip to content

Commit 33a4cbb

Browse files
Removed google analytics from front-end
Added newrelic agent to API Updated text annotations
1 parent e9291f9 commit 33a4cbb

40 files changed

+1176
-432
lines changed

.dockerignore

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
**/node_modules
2+
**/.git

client/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
"react-dnd-html5-backend": "^11.1.3",
3232
"react-dom": "^17.0.1",
3333
"react-final-form": "^6.5.2",
34-
"react-ga": "^3.2.0",
3534
"react-helmet": "^6.1.0",
3635
"react-live": "^2.2.3",
3736
"react-redux": "^7.2.2",

client/public/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
work correctly both with client-side routing and a non-root public URL.
2525
Learn how to configure a non-root public URL by running `npm run build`.
2626
-->
27-
<title>React App</title>
27+
<title>Basic Primitives Diagrams - Organizational and Dependency Tree charts for JavaScript/PDFKit/ReactJS</title>
2828
</head>
2929
<body>
3030
<noscript>You need to enable JavaScript to run this app.</noscript>

client/src/components/PdfViewDialog/PdfViewDialog.js

+1-8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import React, { useEffect } from 'react';
22
import { Enabled } from 'basicprimitives';
3-
import ReactGA from "react-ga";
43
import PDFDocument from 'pdfkit-nodejs-webpack';
54
import blobStream from 'blob-stream';
65
import Button from '@material-ui/core/Button';
@@ -15,17 +14,11 @@ import CloseIcon from '@material-ui/icons/Close';
1514
import Photos from './Photos';
1615

1716
function PdfViewDialog(props) {
18-
const { isVisible, onClose, config, fileName, caption, templates, onItemRender, plugin } = props;
17+
const { isVisible, onClose, config, caption, templates, onItemRender, plugin } = props;
1918

2019
const [url, setUrl] = React.useState(null);
2120

2221
useEffect(() => {
23-
ReactGA.event({
24-
category: 'PDF Download',
25-
action: 'Click',
26-
label: fileName
27-
});
28-
2922
let { items } = config;
3023

3124
items = items.map(item => {
+27-25
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,33 @@
1-
import React, { Component } from 'react';
1+
import React, { useEffect } from 'react';
22
import Helmet from 'react-helmet';
3+
import { useSelector, useDispatch } from 'react-redux'
4+
import { load } from 'redux/modules/contact';
5+
import MDReactComponent from 'markdown-react-js';
36
import Container from '@material-ui/core/Container';
47

5-
class Contact extends Component {
6-
render() {
7-
return <Container fixed>
8-
<h1>Contact</h1>
9-
<Helmet title="Contact" />
10-
<h2>Email addresses</h2>
11-
<ul>
12-
<li>Sales and professional services inquiries: <a href="mailto:[email protected]">
13-
14-
</a>
15-
</li>
16-
<li>Technical support: <a href="mailto:[email protected]">
17-
18-
</a>
19-
</li>
20-
</ul>
21-
<h2>Address</h2>
22-
<ul>
23-
<li>
24-
524 Ridelle Avenue, M6B 1K8, Toronto, ON, Canada
25-
</li>
26-
</ul>
27-
</Container>
28-
}
8+
function Contact() {
9+
const loaded = useSelector(state => state.contact.loaded);
10+
const markdown = useSelector(state => state.contact.markdown);
11+
const dispatch = useDispatch()
12+
13+
useEffect(() => {
14+
if (!loaded) {
15+
dispatch(load());
16+
}
17+
// eslint-disable-next-line react-hooks/exhaustive-deps
18+
}, []/* run only once */);
19+
20+
return (
21+
<>
22+
<Helmet>
23+
<title>- Contact</title>
24+
<meta name="description" content="Contacts." />
25+
</Helmet>
26+
<Container fixed>
27+
<MDReactComponent text={markdown} />
28+
</Container>
29+
</>
30+
);
2931
}
3032

3133
export default Contact;

client/src/containers/Downloads/Downloads.js

+15-37
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import React, { useEffect } from 'react';
22
import { makeStyles } from '@material-ui/core/styles';
33
import Helmet from 'react-helmet';
4-
import ReactGA from "react-ga";
54
import { useSelector, useDispatch } from 'react-redux'
65
import {
76
load,
@@ -59,63 +58,48 @@ function Downloads() {
5958
};
6059
}
6160
if (Tag === 'p') {
62-
if (children.filter(child => child.$$typeof != null).length > 0) {
61+
if (children.filter(child => child.key != null && child.key.indexOf('button') !== -1).length > 0) {
6362
key += 1;
64-
return <div key={`buttons-${key}`} style={{
63+
return <React.Fragment key={`buttons-${key}`}><br/><div style={{
6564
display: "inline"
66-
}}>{children}</div>;
65+
}}>{children}</div></React.Fragment>;
66+
} else if (children.filter(child => child.$$typeof != null).length > 0) {
67+
key += 1;
68+
return <React.Fragment key={`buttons-${key}`}>{children}</React.Fragment>;
6769
}
6870
}
6971
if (Tag === 'a') {
7072
const { href } = props;
7173
let [caption] = children;
7274
switch (caption) {
7375
case "Download":
74-
return <Button key={`download-${href}`} type="submit" onClick={() => dispatch(showLicenseDialog(href))} variant="contained" color="primary" style={{
76+
return <Button key={`button-${href}`} type="submit" onClick={() => dispatch(showLicenseDialog(href))} variant="contained" color="primary" style={{
7577
display: "inline",
7678
verticalAlign: "middle"
7779
}}>Download</Button>;
7880
case "npm package":
79-
return <form key={`npm-${href}`} method="get" action={href} style={{
81+
return <form key={`button-${href}`} method="get" action={href} style={{
8082
display: "inline",
8183
verticalAlign: "middle"
8284
}}>
83-
<Button type="submit" variant="contained" color="primary" onClick={() => {
84-
ReactGA.event({
85-
category: 'npm package',
86-
action: 'Click',
87-
label: href
88-
});
89-
}}>npm package</Button>
85+
<Button type="submit" variant="contained" color="primary">npm package</Button>
9086
</form>;
9187
case "GitHub":
92-
return <form key={`github-${href}`} method="get" action={href} style={{
88+
return <form key={`button-${href}`} method="get" action={href} style={{
9389
display: "inline",
9490
verticalAlign: "middle"
9591
}}>
96-
<Button type="submit" variant="contained" color="primary" onClick={() => {
97-
ReactGA.event({
98-
category: 'GitHub',
99-
action: 'Click',
100-
label: href
101-
});
102-
}}>GitHub</Button>
92+
<Button type="submit" variant="contained" color="primary">GitHub</Button>
10393
</form>;
10494
case "GitHub Deployment":
105-
return <form key={`github-${href}`} method="get" action={href} style={{
95+
return <form key={`button-${href}`} method="get" action={href} style={{
10696
display: "inline",
10797
verticalAlign: "middle"
10898
}}>
109-
<Button type="submit" variant="contained" color="primary" onClick={() => {
110-
ReactGA.event({
111-
category: 'GitHub Deployment',
112-
action: 'Click',
113-
label: href
114-
});
115-
}}>GitHub Deployment</Button>
99+
<Button type="submit" variant="contained" color="primary">GitHub Deployment</Button>
116100
</form>;
117101
default:
118-
return <></>;
102+
return <a {...props}>{children}</a>;
119103
}
120104
}
121105
return <Tag {...props}>{children}</Tag>;
@@ -161,13 +145,7 @@ function Downloads() {
161145
display: "inline",
162146
verticalAlign: "middle"
163147
}}>
164-
<Button type="submit" disabled={!isLicenseAccepted} variant="contained" color="primary" onClick={() => {
165-
ReactGA.event({
166-
category: 'Downloads',
167-
action: 'Click',
168-
label: fileName
169-
});
170-
}}>Download</Button>
148+
<Button type="submit" disabled={!isLicenseAccepted} variant="contained" color="primary">Download</Button>
171149
</form>
172150
<Button variant="contained" color="primary" onClick={() => dispatch(hideLicenseDialog())}>Cancel</Button>
173151
</DialogActions>

client/src/containers/Home/Home.js

+5-38
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import Typography from '@material-ui/core/Typography';
99
import Container from '@material-ui/core/Container';
1010
import Grid from '@material-ui/core/Grid';
1111
import { useSelector, useDispatch } from 'react-redux'
12-
import YouTube from 'react-youtube';
1312
import MDReactComponent from 'markdown-react-js';
1413
import { load } from 'redux/modules/introduction';
1514
import { Link } from '@reach/router';
@@ -27,10 +26,6 @@ import highlightAnnotationsImage from './carousel/demo_instant_highlights.png';
2726
import patentsImage from './carousel/demo_patents.png';
2827
import financialOwnershipImage from './carousel/demo_financial_ownership.png';
2928

30-
const videos = [
31-
{videoId: "F_wlDks_ABQ", title: "Introduction", subtitle: "Reviews basic features of Organizational and Family diagramming components" },
32-
];
33-
3429
const demos = [
3530
{href: "/largehierarchy", image: largeHierarchyImage, title: "Large Hierarchy Visualization", subtitle: "Visualization & navigation of diagram having large number of nodes" },
3631
{href: "/orgeditor", image: orgeditorImage, title: "Organizational Chart Editor", subtitle: "Fully functional oraganizational chart editing application developed in ReactJS" },
@@ -52,15 +47,10 @@ const useStyles = makeStyles({
5247
},
5348
});
5449

55-
const opts = {
56-
width: 300,
57-
height: 200,
58-
display: 'block'
59-
};
60-
61-
function Changelog() {
50+
function Home() {
6251
const classes = useStyles();
6352
const loaded = useSelector(state => state.introduction.loaded);
53+
const products = useSelector(state => state.introduction.products);
6454
const markdown = useSelector(state => state.introduction.markdown);
6555
const dispatch = useDispatch()
6656

@@ -79,34 +69,11 @@ function Changelog() {
7969
<meta name="description" content="JavaScript, HTML, PDFKit, ReactJS; Organizational Chart, Family Inheritance Chart; Dependencies Visualizations;" />
8070
</Helmet>
8171
<h1>Basic Primitives Diagrams</h1>
82-
<h3>Data visualization diagramming Components for dependencies visualization and analysis</h3>
72+
<p>Data visualization diagramming components library for dependencies visualization and analysis that implements organizational chart, family chart, inheritance, dependency trees, and business ownership diagrams provides a reach feature set for automatic layout customization and visual node annotation.</p>
8373
</Container>
8474
<Container fixed>
85-
<h2>Videos</h2>
75+
<MDReactComponent text={products} />
8676
</Container>
87-
<Grid container spacing={2}>
88-
<Grid item xs={12}>
89-
<Grid container justify="center" spacing={2}>
90-
{videos.map(({videoId, title, subtitle}, index) => (
91-
<Grid key={index} item>
92-
<Card className={classes.root}>
93-
<CardActionArea>
94-
<YouTube videoId={videoId} opts={opts} />
95-
<CardContent>
96-
<Typography gutterBottom variant="h6" component="h2">
97-
{title}
98-
</Typography>
99-
<Typography variant="body2" color="textSecondary" component="p">
100-
{subtitle}
101-
</Typography>
102-
</CardContent>
103-
</CardActionArea>
104-
</Card>
105-
</Grid>
106-
))}
107-
</Grid>
108-
</Grid>
109-
</Grid>
11077
<Container fixed>
11178
<h2>Demos</h2>
11279
</Container>
@@ -146,4 +113,4 @@ function Changelog() {
146113
)
147114
}
148115

149-
export default Changelog;
116+
export default Home;

0 commit comments

Comments
 (0)