Skip to content

Commit 41234ac

Browse files
Updated to React 18
1 parent 77f0af0 commit 41234ac

File tree

139 files changed

+65808
-14677
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+65808
-14677
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ server/api/**/*.nedb
33
server/static/javascript
44
server/static/react
55
client/node_modules/
6+
server/newrelic_agent.log
67
Dockerfile
78
.vscode
89
site

README.md

+18-17
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
# Basic Primitives Diagrams for React Demos
2-
This project is created for validation of effortless integration of Basic Primitives diagramming components into React application.
2+
This repository contains a demo project showcasing the effortless integration of **Basic Primitives** diagramming components into a **React** application.
33

4-
### Project references
5-
* [http://www.basicprimitives.com](https://www.basicprimitives.com) project home and React Live Demos.
6-
* [GitHub](https://github.com/BasicPrimitives) Github repositories.
7-
* [NPM](https://www.npmjs.com/package/basicprimitives) official - release packages.
8-
* [Basic Primitives for React Live Demos](https://basicprimitives.github.io/react/) - github live site
9-
* [Basic Primitives for JavaScript and PDFkit Live Demos & Samples](https://basicprimitives.github.io/javascript/) - github live site
4+
### 📖 References
105

11-
### Basics
6+
* [Basic Primitives Website](https://www.basicprimitives.com) – Home of the Basic Primitives project, with additional React Live Demos.
7+
* [GitHub Repositories](https://github.com/BasicPrimitives) – Access to all Basic Primitives repositories.
8+
* [NPM Package](https://www.npmjs.com/package/basicprimitives) – Official package for Basic Primitives.
9+
* [Basic Primitives for React Live Demos](https://basicprimitives.github.io/react/) – Live demo site hosted on GitHub.
10+
* [Basic Primitives for JavaScript and PDFkit Live Demos & Samples](https://basicprimitives.github.io/javascript/) – Additional core library demos and samples.
1211

13-
* [Create React App](https://create-react-app.dev/)
14-
* [Material-UI](https://material-ui.com/)
15-
* [Hooks](https://reactjs.org/docs/hooks-intro.html)
16-
* [Redux](https://redux.js.org/)
17-
* [Reach Router](https://reach.tech/router/)
18-
* [React Final Form](https://github.com/final-form/react-final-form)
19-
* [React DnD](https://react-dnd.github.io/react-dnd/about)
12+
### 🔧 Technologies Used
13+
14+
* [Vite](https://vite.dev/) – Fast build tool for modern web development.
15+
* [Material-UI (MUI)](https://mui.com/material-ui/) – React UI framework for building sleek user interfaces.
16+
* [React Hooks](https://reactjs.org/docs/hooks-intro.html) – Leveraging React's hooks for state management and side effects.
17+
* [Redux](https://redux.js.org/) – State management library for React applications.
18+
* [React Router](https://reactrouter.com/) – Declarative routing for React.
19+
* [React Final Form](https://github.com/final-form/react-final-form) – Flexible form library for React.
20+
* [React DnD](https://react-dnd.github.io/react-dnd/about) – Drag and drop library for React.
2021

2122
### Setup
2223

@@ -40,11 +41,11 @@ yarn start
4041

4142
```bash
4243
cd client
43-
yarn start
44+
yarn dev
4445
```
4546

4647
### License
4748

48-
Copyright (c) 2013 - 2022 Basic Primitives Inc
49+
Copyright (c) 2013 - 2024 Basic Primitives Inc
4950
* [Non-commercial - Free](http://creativecommons.org/licenses/by-nc/3.0/)
5051
* [Commercial and government licenses](http://www.basicprimitives.com/license.pdf)

client/.env

-1
This file was deleted.

client/.gitignore

+21-20
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
1-
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2-
3-
# dependencies
4-
/node_modules
5-
/.pnp
6-
.pnp.js
7-
8-
# testing
9-
/coverage
10-
11-
# production
12-
/build
13-
14-
# misc
15-
.DS_Store
16-
.env.local
17-
.env.development.local
18-
.env.test.local
19-
.env.production.local
20-
1+
# Logs
2+
logs
3+
*.log
214
npm-debug.log*
225
yarn-debug.log*
236
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

client/README.md

+5-67
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,8 @@
1-
# Getting Started with Create React App
1+
# React + Vite
22

3-
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
3+
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
44

5-
## Available Scripts
5+
Currently, two official plugins are available:
66

7-
In the project directory, you can run:
8-
9-
### `yarn start`
10-
11-
Runs the app in the development mode.\
12-
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
13-
14-
The page will reload if you make edits.\
15-
You will also see any lint errors in the console.
16-
17-
### `yarn test`
18-
19-
Launches the test runner in the interactive watch mode.\
20-
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
21-
22-
### `yarn build`
23-
24-
Builds the app for production to the `build` folder.\
25-
It correctly bundles React in production mode and optimizes the build for the best performance.
26-
27-
The build is minified and the filenames include the hashes.\
28-
Your app is ready to be deployed!
29-
30-
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
31-
32-
### `yarn eject`
33-
34-
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
35-
36-
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
37-
38-
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
39-
40-
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
41-
42-
## Learn More
43-
44-
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
45-
46-
To learn React, check out the [React documentation](https://reactjs.org/).
47-
48-
### Code Splitting
49-
50-
This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
51-
52-
### Analyzing the Bundle Size
53-
54-
This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
55-
56-
### Making a Progressive Web App
57-
58-
This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
59-
60-
### Advanced Configuration
61-
62-
This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
63-
64-
### Deployment
65-
66-
This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
67-
68-
### `yarn build` fails to minify
69-
70-
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
7+
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
8+
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh

client/eslint.config.js

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import js from '@eslint/js'
2+
import globals from 'globals'
3+
import react from 'eslint-plugin-react'
4+
import reactHooks from 'eslint-plugin-react-hooks'
5+
import reactRefresh from 'eslint-plugin-react-refresh'
6+
7+
export default [
8+
{ ignores: ['dist'] },
9+
{
10+
files: ['**/*.{js,jsx}'],
11+
languageOptions: {
12+
ecmaVersion: 2020,
13+
globals: globals.browser,
14+
parserOptions: {
15+
ecmaVersion: 'latest',
16+
ecmaFeatures: { jsx: true },
17+
sourceType: 'module',
18+
},
19+
},
20+
settings: { react: { version: '18.3' } },
21+
plugins: {
22+
react,
23+
'react-hooks': reactHooks,
24+
'react-refresh': reactRefresh,
25+
},
26+
rules: {
27+
...js.configs.recommended.rules,
28+
...react.configs.recommended.rules,
29+
...react.configs['jsx-runtime'].rules,
30+
...reactHooks.configs.recommended.rules,
31+
'react/jsx-no-target-blank': 'off',
32+
'react-refresh/only-export-components': [
33+
'warn',
34+
{ allowConstantExport: true },
35+
],
36+
},
37+
},
38+
]

client/index.html

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<link rel="icon" href="./favicon.ico" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1" />
7+
<meta name="theme-color" content="#000000" />
8+
<meta
9+
name="description"
10+
content="Web site created using create-react-app"
11+
/>
12+
<link rel="apple-touch-icon" href="./logo192.png" />
13+
<!--
14+
manifest.json provides metadata used when your web app is installed on a
15+
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
16+
-->
17+
<link rel="manifest" href="./manifest.json" />
18+
<!--
19+
Notice the use of %PUBLIC_URL% in the tags above.
20+
It will be replaced with the URL of the `public` folder during the build.
21+
Only files inside the `public` folder can be referenced from the HTML.
22+
23+
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
24+
work correctly both with client-side routing and a non-root public URL.
25+
Learn how to configure a non-root public URL by running `npm run build`.
26+
-->
27+
<title>Basic Primitives Diagrams - Organizational and Dependency Tree charts for JavaScript/PDFKit/ReactJS</title>
28+
</head>
29+
<body>
30+
<noscript>You need to enable JavaScript to run this app.</noscript>
31+
<div id="root"></div>
32+
<script type="module" src="/src/index.jsx"></script>
33+
<!--
34+
This HTML file is a template.
35+
If you open it directly in the browser, you will see an empty page.
36+
37+
You can add webfonts, meta tags, or analytics to this file.
38+
The build step will place the bundled scripts into the <body> tag.
39+
40+
To begin the development, run `npm start` or `yarn start`.
41+
To create a production bundle, use `npm run build` or `yarn build`.
42+
-->
43+
</body>
44+
</html>

client/jsconfig.json

-6
This file was deleted.

0 commit comments

Comments
 (0)