Skip to content

Commit 9a4f12e

Browse files
Changed build tool to vite. Upgraded react to version 18.
1 parent 697f9c4 commit 9a4f12e

File tree

175 files changed

+2882
-3301
lines changed

Some content is hidden

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

175 files changed

+2882
-3301
lines changed

.eslintrc.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

.gitignore

Lines changed: 22 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,25 @@
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-
# next.js
12-
/.next/
13-
/out/
14-
15-
# production
16-
/build
17-
/dist
18-
19-
# misc
20-
.DS_Store
21-
*.pem
22-
23-
# debug
1+
# Logs
2+
logs
3+
*.log
244
npm-debug.log*
255
yarn-debug.log*
266
yarn-error.log*
27-
28-
# local env files
29-
.env*.local
30-
31-
# vercel
32-
.vercel
33-
34-
# typescript
35-
*.tsbuildinfo
36-
next-env.d.ts
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
output
13+
dist-ssr
14+
*.local
15+
16+
# Editor directories and files
17+
.vscode/*
18+
!.vscode/extensions.json
19+
.idea
20+
.DS_Store
21+
*.suo
22+
*.ntvs*
23+
*.njsproj
24+
*.sln
25+
*.sw?

.npmignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
/public
44
/docs
55
/src
6-
/.next
6+
/output
77
.gitignore
8+
create-react-app-readme.md
9+
package-lock.json
810
yarn.lock
911
.vscode
1012
*.log

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,18 @@ Data visualization diagramming components library for dependencies visualization
1010

1111
## React Example
1212

13-
```bash
14-
yarn create next-app test1
13+
```
14+
yarn create vite test1 --template react
1515
cd test1
1616
1717
yarn add basicprimitivesreact
1818
1919
yarn dev
2020
```
2121

22-
Add following changes into src/app/page.js.
22+
Add following changes into App.js
2323

2424
``` JavaScript
25-
'use client';
2625
import React from 'react';
2726
import { OrgDiagram } from 'basicprimitivesreact';
2827
import { PageFitMode, Enabled } from 'basicprimitives';
@@ -86,7 +85,7 @@ export default App;
8685
* No dependencies on 3rd party libraries.
8786
* Webpack [Tree Shaking](https://webpack.js.org/guides/tree-shaking/) support
8887

89-
### Basic Primitives Diagrams for [React Sample](https://reactjs.org/)
88+
### Basic Primitives Diagrams for [React](https://reactjs.org/)
9089
* User [JSX](https://reactjs.org/docs/introducing-jsx.html) templates
9190
* 100% [Virtual DOM](https://reactjs.org/docs/faq-internals.html) rendering cycle
9291
* [react-dnd](http://react-dnd.github.io/react-dnd/about) & [React Context](https://reactjs.org/docs/context.html) compatible
@@ -153,6 +152,6 @@ Do you want to use a Basic Primitives diagram for a personal website, a school s
153152
## Performance
154153
Through a full API, you can add, remove and modify individual items and their properties. The component will only update the visual elements affected by the API changes. We put in much effort to make it happen!
155154

156-
Copyright (c) 2013 - 2023 Basic Primitives Inc
155+
Copyright (c) 2013 - 2024 Basic Primitives Inc
157156
* [Non-commercial - Free](http://creativecommons.org/licenses/by-nc/3.0/)
158157
* [Commercial and government licenses](license.pdf)

docs/AddingNewItemsToChartAtRuntime.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ The component ignores changes in node options, not affecting the diagram layout.
1010

1111
The application stores the collection of items in the application component: `state`. The diagram component updates its layout every time it gets a new configuration object reference. The diagram keeps the internal state between rendering cycles and tracks property changes for individual configuration objects. The configuration object properties may affect different visuals and transformations of the graph. The component tracks every property individually and optimizes rendering time. For the more complex implementation of chart editing functionality, see the matrixed organizational chart structure editor demo at this site.
1212

13-
[React Sample](../src/components/Samples/AddingNewItemsToChartAtRuntime.js)
13+
[React](../src/Samples/AddingNewItemsToChartAtRuntime.jsx)

docs/AdviserAndAssistantItemTypes.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,23 @@ Use the `adviserPlacementType` option to place an adviser or assistant on the pa
2121

2222
Use the `levelOffset` option to arrange assistants into multiple rows. See the regular children layout sample.
2323

24-
[React Sample](../src/components/Samples/AdviserAndAssistantItemTypes.js)
24+
[React](../src/Samples/AdviserAndAssistantItemTypes.jsx)
2525

2626
## Sub Adviser & Sub Assistant item types
2727

2828
Sub Adviser & Sub Assistant item types are variations of regular Adviser & Assistant types. The only difference is that they have the connection line going from the top edge of the node, and they are shift down one level relative to their parents.
2929

3030
Use the `adviserPlacementType` option to place them on the parent's hierarchy's left or right side.
3131

32-
[React Sample](../src/components/Samples/SubAdviserAndSubAssistantItemTypes.js)
32+
[React](../src/Samples/SubAdviserAndSubAssistantItemTypes.jsx)
3333

3434
## Adviser child nodes placement above parent's node children
3535

3636
If the adviser node has its children, then control adds extra levels, so it places advisers children at rows above the parent's children. You can alter this layout schema with the `placeAdvisersAboveChildren` option. If you set it to false, control would place advisers and the parent's children at the same row of the diagram.
3737

38-
[React Sample](../src/components/Samples/PlaceAdvisersAboveChildren.js)
38+
[React](../src/Samples/PlaceAdvisersAboveChildren.jsx)
3939

4040
## Assistant child nodes placement above parent's node children
4141
If the assistant node has its children, then control pushes the parent's children down, placing assistant children at rows above the parent's children. You can alter this layout schema with the `placeAssistantsAboveChildren` option. If you set it to false, then the parent's and assistant's node children would be rendered side by side at the same level.
4242

43-
[React Sample](../src/components/Samples/PlaceAssistantsAboveChildren.js)
43+
[React](../src/Samples/PlaceAssistantsAboveChildren.jsx)

docs/Buttons.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import { Enabled } from basicprimitives;
3131
parent: null,
3232
title: "James Smith",
3333
description: "VP, Public Sector",
34-
image: "/react/photos/a.png",
34+
image: "./photos/a.png",
3535
hasButtons: Enabled.True
3636
}
3737
]
@@ -88,4 +88,4 @@ import { OrgDiagram } from basicprimitivesreact;
8888
/>
8989
```
9090

91-
[React Sample](../src/components/Samples/ButtonsPanel.js)
91+
[React](../src/Samples/ButtonsPanel.jsx)

docs/ChildrenLayout.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ import { ChildrenPlacementType } from basicprimitives;
1818
parent: null,
1919
title: "James Smith",
2020
description: "VP, Public Sector",
21-
image: "/react/photos/a.png",
21+
image: "./photos/a.png",
2222
childrenPlacementType: ChildrenPlacementType.Matrix // Individually
2323
}
2424
]
2525
}
2626
/>
2727
```
2828

29-
[React Sample](../src/components/Samples/ChildrenPlacementType.js)
29+
[React](../src/Samples/ChildrenPlacementType.jsx)
3030

3131
# Placing children into multiple horizontal levels
3232
To programmatically place children nodes into multiple rows, use the `levelOffset` property. Child nodes would be grouped by that property and placed in rows. If level offsets defined for children have gaps, then the control would preserve empty row, so different branches and teams of the same organizations would be properly aligned. See the matrixed layout demo for the matrixed team structure in the organization.
@@ -44,28 +44,28 @@ import { ChildrenPlacementType } from basicprimitives;
4444
parent: null,
4545
title: "James Smith",
4646
description: "VP, Public Sector",
47-
image: "/react/photos/a.png",
47+
image: "./photos/a.png",
4848
childrenPlacementType: ChildrenPlacementType.Horizontal
4949
},
5050
{
5151
id: 2,
5252
parent: 1,
5353
title: "James Smith",
5454
description: "VP, Public Sector",
55-
image: "/react/photos/a.png",
55+
image: "./photos/a.png",
5656
levelOffset: 0
5757
},
5858
{
5959
id: 3,
6060
parent: 1,
6161
title: "James Smith",
6262
description: "VP, Public Sector",
63-
image: "/react/photos/a.png",
63+
image: "./photos/a.png",
6464
levelOffset: 1
6565
}
6666
]
6767
}
6868
/>
6969
```
7070

71-
[React Sample](../src/components/Samples/ChildrenAndAssistantsLevelOffset.js)
71+
[React](../src/Samples/ChildrenAndAssistantsLevelOffset.jsx)

docs/ConnectorAnnotation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ In general shape of connector annotation may indicate various relations, so comp
1717
## Labels
1818
Connector annotations labels are plain text or JSX elements. Please, pay attention that component does not resolve connector annotations labels overlapping, so many annotations labels can clutter view and diagram in general.
1919

20-
[React Sample](../src/components/Samples/ConnectorAnnotation.js)
20+
[React](../src/Samples/ConnectorAnnotation.jsx)

docs/CrossBranchAlignment.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ The following options control cross-branch nodes alignment:
66
* `alignBranches` - property enables alignment
77
* `placeAdvisersAboveChildren` - if this property is disabled, then advisers' children are placed at the same level and aligned to the children of the parent's node.
88

9-
[React Sample](../src/components/Samples/CrossBranchAlignment.js)
9+
[React](../src/Samples/CrossBranchAlignment.jsx)
1010

0 commit comments

Comments
 (0)