Skip to content

Commit e96f000

Browse files
Merge branch 'main' into fix_bug
2 parents 9206f67 + 22596d9 commit e96f000

File tree

12 files changed

+19
-26
lines changed

12 files changed

+19
-26
lines changed

packages/tdb-dashboard/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"scripts": {
2323
"build-es6": "rimraf es6 && cross-env NODE_ENV=es6 babel ./src -d es6 --extensions '.js'",
2424
"build": "webpack --mode production",
25-
"build-terminusx": "webpack --mode production --env title=TerminusX",
25+
"build-terminusx": "webpack --mode production --env title=TerminusCMS",
2626
"start": "webpack serve --mode development --open --progress --port 3030 --host localhost --config ./webpack_dev.config.js --history-api-fallback",
2727
"new": "webpack serve --mode development --open --progress --port 3035 --host localhost --content-base src --inline --config ./webpack_dev.config.js --history-api-fallback",
2828
"demo": "webpack serve --progress --port 3030 --host localhost --content-base demo --inline --config demo/webpack.config.js",

packages/tdb-dashboard/src/components/ReviewComponent.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,4 @@ export const ReviewComponent = () => {
9393
</Card>
9494
</React.Fragment>
9595

96-
}
96+
}

packages/tdb-documents-ui/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ SDK to build UI from terminusdb documents
44
## Run playground
55
Run playground to get a demo.
66

7-
Create a new data product in TerminusX and name it ```Playground```.
7+
Create a new data product in TerminusCMS and name it ```Playground```.
88
Go to /product_model page and copy paste the schema from file - playground/src/schema.json.
99

1010
Make a .env file and add the following
@@ -20,7 +20,7 @@ After adding .env file, run the below command
2020
```npm run playground```
2121

2222
## Run test
23-
To connect to a particular data product in TerminusX - add the following variables to .env file
23+
To connect to a particular data product in TerminusCMS - add the following variables to .env file
2424

2525
```
2626
SERVER=https://cloud.terminusdb.com/

packages/tdb-documents-ui/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"scripts": {
99
"build-es6": "rimraf es6 && cross-env NODE_ENV=es6 babel ./src -d es6 --extensions '.js' && babel ./src/css --out-dir es6/css/ --copy-files",
1010
"build": "npm run build-es6 && rimraf dist && webpack --mode production",
11+
"build-playground": "npm run build-es6 && webpack --mode production --config playground/webpack.config.js",
1112
"playground": "webpack serve --mode development --open --progress --port 3033 --host localhost --config playground/webpack.config.js",
1213
"testDb": "webpack serve --mode development --open --progress --port 3032 --host localhost --config test/webpack.config.js",
1314
"mockTest": "webpack serve --mode development --open --progress --port 3035 --host localhost --config mockTest/webpack.config.js",

packages/tdb-documents-ui/playground/build/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
</head>
2222
<body>
2323
<div id="root"/>
24+
<script src="bundle.js"></script>
2425
</body>
25-
<script src="bundle.js"></script>
26-
</html>
26+
</html>

packages/tdb-documents-ui/src/FrameViewer.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import * as CONST from "./constants"
66
import {Alert} from "react-bootstrap"
77
import * as util from "./utils"
88
import {transformData} from "./extract"
9-
import { v4 as uuidv4 } from 'uuid';
109
import {DisplayFieldTemplate, DisplayDocumentation} from "./templates"
1110

1211

packages/tdb-documents-ui/src/dataTypeFrames/widget.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import * as helper from "./helpers"
1111
import * as util from "../utils"
1212
import MDEditor, { commands } from '@uiw/react-md-editor';
1313
import mermaid from "mermaid";
14-
import uuid from 'react-uuid'
1514
import InputGroup from 'react-bootstrap/InputGroup';
1615

1716
function booleanField(mode, props) {
@@ -125,7 +124,7 @@ export function getMarkdownUI(props) {
125124
}).filter(Boolean).join("")
126125

127126
const Code = ({ inline, children = [], className, ...props }) => {
128-
const demoid = useRef(`dome${uuid()}`);
127+
const demoid = useRef(`dome${crypto.randomUUID()}`);
129128
const code = getCode(children);
130129
const demo = useRef(null);
131130
useEffect(() => {
@@ -197,7 +196,7 @@ export function getViewMarkdownUI(formData, name, uiFrame) {
197196
}).filter(Boolean).join("")
198197

199198
const Code = ({ inline, children = [], className, ...props }) => {
200-
const demoid = useRef(`dome${uuid()}`);
199+
const demoid = useRef(`dome${crypto.randomUUID()}`);
201200
const code = getCode(children);
202201
const demo = useRef(null);
203202
useEffect(() => {

packages/tdb-documents-ui/src/maps/geoJSONMapViewer.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import {renderPositions, customMapOptions, customMarkerOptions} from "./markers"
55
import icon from "../constants"
66
import "leaflet-arrowheads"
77
import L from "leaflet"
8-
import uuid from 'react-uuid'
98

109
export function geoJSONMapViewer (args) {
1110

@@ -16,7 +15,7 @@ export function geoJSONMapViewer (args) {
1615
map()
1716
}, [])
1817

19-
let mapID=uuid()
18+
let mapID=crypto.randomUUID()
2019

2120
const map = () => {
2221
let mapOptions = customMapOptions(zoom, center)
@@ -46,4 +45,4 @@ export function geoJSONMapViewer (args) {
4645
}
4746

4847
return <div id={`tdb__map__geojson__leaflet_${mapID}`} style={{ height: "100vh" }}></div>
49-
}
48+
}

packages/tdb-documents-ui/src/maps/pointTypeMap.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@ import {customMapOptions, customMarkerOptions} from "./markers"
55
import icon from "../constants"
66
import "leaflet-arrowheads"
77
import L from "leaflet"
8-
import uuid from 'react-uuid'
98

109
export const pointMapViewer = (args) => {
1110
let {property, type, documents, zoom, scrollWheelZoom, display, onMarkerClick, polyLine, polygon, icon, geojsonFeature, center, bounds}=args
1211

13-
let mapID=uuid()
12+
let mapID=crypto.randomUUID()
1413

1514
useEffect(() => {
1615
map()
@@ -54,4 +53,4 @@ export const pointMapViewer = (args) => {
5453
}
5554

5655
return <div id={`map-leaflet-id-${mapID}`} style={{ height: "100vh" }}></div>
57-
}
56+
}

packages/tdb-documents-ui/src/maps/polygonMapViewer.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@ import icon from "../constants"
66
import "leaflet-arrowheads"
77
import L from "leaflet"
88
import {MAP_OPTION, MARKER_OPTION} from "./map.constants"
9-
import uuid from 'react-uuid'
109

1110
export const polygonMapViewer = (args) => {
1211
let {property, documents, zoom, icon, center, bounds, type}=args
1312

14-
let mapID=uuid()
13+
let mapID=crypto.randomUUID()
1514

1615
useEffect(() => {
1716
map()
@@ -47,4 +46,4 @@ export const polygonMapViewer = (args) => {
4746
}
4847

4948
return <div id={`map-polygon-id-${mapID}`} style={{ height: "100vh" }}></div>
50-
}
49+
}

0 commit comments

Comments
 (0)