Skip to content

Commit b76bdbb

Browse files
Francesca-BitKitty JoseKittyJose
authored
Add diff viewer progress and fix packaging (#61)
* diff viewer progress * added diff view files * commiting diff view till tests * added support for metadata & string to appear as textarea * move terminusdb-react-table inside the dashboard * added tests for choice sub documents and documents * adding diff playground * fix table * review table * fix advanced search document interface * review table * change id and label for document search * review table * fix diff view for subdoc document link * fix table * fix table in dashboard * review table * review packages Co-authored-by: Kitty Jose <[email protected]> Co-authored-by: Kitty Jose <[email protected]> Co-authored-by: Francesca-Bit <[email protected]>
1 parent 99b7fd6 commit b76bdbb

File tree

150 files changed

+38323
-28153
lines changed

Some content is hidden

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

150 files changed

+38323
-28153
lines changed

package-lock.json

Lines changed: 27560 additions & 26864 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
"name": "terminusdb-dashboard",
33
"private": true,
44
"workspaces": [
5-
"./packages/tdb-react-components",
65
"./packages/react-worker",
76
"./packages/tdb-react-layout",
7+
"./packages/tdb-react-table",
8+
"./packages/tdb-react-components",
89
"./packages/tdb-access-control-component",
910
"./packages/tdb-documents-ui",
1011
"./packages/tdb-dashboard"

packages/tdb-access-control-component/demo/webpack.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ module.exports = {
3131
alias: {
3232
"@terminusdb/terminusdb-access-control-component": path.join(__dirname, '..', 'src/index.js'),
3333
"@terminusdb/terminusdb-client": path.resolve('../../../terminusdb-client/index.js'),
34-
"@terminusdb/terminusdb-react-table": path.resolve('../../../terminusdb-react-table/src/index.js'),
3534
react: path.resolve('../../node_modules/react')
3635
},
3736
extensions: ['.js', '.jsx', '.json', '.css'],

packages/tdb-dashboard/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
"dotenv": "^9.0.2",
5353
"dotenv-webpack": "^7.0.2",
5454
"file-loader": "^6.2.0",
55+
"history": "^5.3.0",
5556
"moment": "^2.29.1",
5657
"papaparse": "^5.3.0",
5758
"postcss-loader": "^5.3.0",
@@ -98,7 +99,7 @@
9899
"file-loader": "^6.2.0",
99100
"html-webpack-plugin": "^5.5.0",
100101
"less": "^4.1.3",
101-
"less-loader": "^11.0.0",
102+
"less-loader": "^11.1.0",
102103
"mini-css-extract-plugin": "^2.6.1",
103104
"style-loader": "^3.3.1",
104105
"webpack": "^5.74.0",

packages/tdb-dashboard/src/App.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -945,3 +945,10 @@ pre.CodeMirror-line > span > span.cm-string {
945945
}
946946

947947

948+
.table td{
949+
white-space: nowrap;
950+
overflow: hidden;
951+
text-overflow: ellipsis;
952+
max-width: 200px;
953+
}
954+

packages/tdb-dashboard/src/App.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from "react"
1+
import React from "react"
22
import {Routes,Route,useNavigate} from "react-router-dom"
33
import {Loading} from "./components/Loading"
44
import {SERVER_LOADING_MESSAGE} from "./components/constants"
@@ -53,7 +53,7 @@ export function App (props){
5353
}
5454

5555
function getRoutes(clientUser,isAdmin){
56-
if(localSettings.connection_type==="LOCAL"){
56+
if(localSettings.connection_type==="LOCAL"){
5757
return <React.Fragment>
5858
<Route index element={<Home/>} />
5959
{ clientUser.user === "admin" && <Route path="administrator" element={<UserManagement/>}/>}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import React, {useEffect, useState} from "react"
22
import SplitPane from 'react-split-pane'
33
import {handleWidthChange} from "../pages/utils"
4-
import {WOQLTable, WOQLGraph} from '@terminusdb-live/tdb-react-components'
4+
import { WOQLGraph} from '@terminusdb-live/tdb-react-components'
5+
//import {WOQLTable} from '@terminusdb/terminusdb-react-table'
56
import {ControlledQueryHook} from '@terminusdb-live/tdb-react-components'
67
import {ClassFromSchema} from "../queries/GeneralQueries"
78
import {getPropertyMetaTabConfig, getClassesGraphConfig} from "./ViewConfig"

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import React, {useState, useEffect} from "react"
22
import {getBranchCommits} from "../queries/BranchQueries"
33
import {getCommitsTabConfig, getCommitViewTabConfig} from "./ViewConfig"
4-
import {WOQLTable} from '@terminusdb-live/tdb-react-components'
5-
import {ControlledQueryHook} from '@terminusdb-live/tdb-react-components'
4+
import {WOQLTable,ControlledQueryHook} from '@terminusdb/terminusdb-react-table'
65
import {getRemovedTriplesQuery, getAddedTriplesQuery} from "../queries/BranchQueries"
76
import {Row, Button, Toast} from "react-bootstrap"
87
import {getUsing, printts, copyToClipboard} from "./utils"

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import {BiPlus} from "react-icons/bi"
1010
import {SearchBox} from "./SearchBox"
1111
import {getCountOfDocumentClass} from "../queries/GeneralQueries"
1212
import { executeQueryHook } from "../hooks/executeQueryHook"
13-
import {CREATE_DOCUMENT, FORM_VIEW} from "./constants"
1413
import {handleCreate} from "./documents.utils"
1514
import {DocumentControlObj, getDocumentFrame} from '../hooks/DocumentControlContext'
1615
import {Loading} from "./Loading"

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ export const DocumentFrames = () => {
3232
}
3333
const {
3434
frames,
35-
docs,
3635
woqlClient
3736
} = WOQLClientObj()
3837

@@ -57,7 +56,7 @@ export const DocumentFrames = () => {
5756
}
5857

5958
useEffect(() =>{
60-
if(documentObject.frames) {
59+
if(Object.keys(documentObject.frames).length > 0) {
6160
setLoading(false)
6261
//documentObject.loading = <Loading message={`Fetching frames ...`} type={PROGRESS_BAR_COMPONENT}/>
6362
}
@@ -188,10 +187,16 @@ export const DocumentFrames = () => {
188187
{/*(currentView==FORM_VIEW) && documentObjectWithFrames.frames && <FrameViewer/> */}
189188

190189
{(currentView==FORM_VIEW) && documentObjectWithFrames.frames &&
190+
/*<FrameViewer frame={frames}
191+
type={documentObjectWithFrames.type}
192+
mode={documentObjectWithFrames.action}
193+
onSubmit={onSubmit}
194+
onSelect={onSelect}
195+
formData={documentObjectWithFrames.filledFrame}
196+
/>*/
191197
<FrameViewer frame={frames}
192198
type={documentObjectWithFrames.type}
193199
mode={documentObjectWithFrames.action}
194-
documents={docs}
195200
onSubmit={onSubmit}
196201
onSelect={onSelect}
197202
formData={documentObjectWithFrames.filledFrame}

0 commit comments

Comments
 (0)