From 908117f7a6a66bc1b9a5b6535f47f4fe2c830fe3 Mon Sep 17 00:00:00 2001 From: Aviral09 Date: Wed, 27 Apr 2022 13:28:22 -0700 Subject: [PATCH 001/282] Solution for GSOC code challenge --- src/config/defaultValidators.js | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/src/config/defaultValidators.js b/src/config/defaultValidators.js index c8e1959..ca51089 100644 --- a/src/config/defaultValidators.js +++ b/src/config/defaultValidators.js @@ -1,15 +1,23 @@ const nodeValidator = `(node, nodes, edges) => { -let message = { ok: true, err: null }; -nodes.forEach((n) => { - if (n.id !== node.id && n.label === node.label) { + var regex = /^[A-za-z0-9]+:[A-Za-z0-9.]+$/; + let message = { ok: true, err: null }; + if (!regex.test(node.label)) { message = { ok: false, - err: 'Node with same label exists.', - }; + err: 'Node with incorrect label.', + } + return message; } -}); -return message; -}`; + nodes.forEach((n) => { + if (n.id !== node.id && n.label.split(':')[0] === node.label.split(':')[0]) { + message = { + ok: false, + err: 'Node with same label exists.', + }; + } + }); + return message; + }`; const edgeValidator = `(edge, nodes, edges) => { let message = { ok: true, err: null }; edges.forEach((e) => { From c714bf00ea39da97a2b19c33e0d71043868c131c Mon Sep 17 00:00:00 2001 From: Aviral09 Date: Fri, 8 Jul 2022 06:06:51 -0700 Subject: [PATCH 002/282] Set up filebrowser UI --- src/App.css | 18 ++--- src/App.jsx | 8 ++- src/component/fileBrowser.jsx | 124 ++++++++++++++++++++++++++++++++++ 3 files changed, 141 insertions(+), 9 deletions(-) create mode 100644 src/component/fileBrowser.jsx diff --git a/src/App.css b/src/App.css index fc7e19a..445c6b7 100644 --- a/src/App.css +++ b/src/App.css @@ -10,20 +10,22 @@ input { height: 100vh; display: flex; width: 100vw; - height: 100vh; - display: flex; - width: 100vw; - background: red; flex-direction: column; } .body { - padding: 50px; background-color: rgb(240, 242, 245); height: -webkit-fill-available; flex: 1; } +.graph { + padding: 50px; + background-color: rgb(240, 242, 245); + height: -webkit-fill-available; + flex: 80; +} + .graph-container { background-color: #fff; } @@ -67,19 +69,19 @@ input { } @media screen and (max-width: 1000px) { - .body { + .graph { padding: 40px; } } @media screen and (max-width: 650px) { - .body { + .graph { padding: 35px; } } @media screen and (max-width: 500px) { - .body { + .graph { padding: 20px; } } \ No newline at end of file diff --git a/src/App.jsx b/src/App.jsx index b46ac56..7b898c1 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -10,6 +10,7 @@ import ShareModal from './component/modals/ShareModal'; import SettingsModal from './component/modals/Settings'; import FileDragDrop from './component/File-drag-drop'; import HistoryModal from './component/modals/History'; +import LocalFileBrowser from './component/fileBrowser'; const app = () => { const [superState, dispatcher] = useReducer(reducer, initialState); @@ -26,7 +27,12 @@ const app = () => {
- +
+ +
+
+ +
diff --git a/src/component/fileBrowser.jsx b/src/component/fileBrowser.jsx new file mode 100644 index 0000000..9695503 --- /dev/null +++ b/src/component/fileBrowser.jsx @@ -0,0 +1,124 @@ +/* eslint-disable object-shorthand */ +/* eslint-disable react/destructuring-assignment */ +/* eslint-disable array-callback-return */ +/* eslint-disable no-param-reassign */ +/* eslint-disable react/state-in-constructor */ +import React, { useEffect, useState } from 'react'; +import FileBrowser, { Icons } from 'react-keyed-file-browser'; +import Moment from 'moment'; +import '../../node_modules/react-keyed-file-browser/dist/react-keyed-file-browser.css'; +import { readFile } from '../toolbarActions/toolbarFunctions'; +import { actionType as T } from '../reducer'; + +const LocalFileBrowser = ({ superState, dispatcher }) => { + const fileRef = React.useRef(); + + useEffect(() => { + dispatcher({ type: T.SET_FILE_REF, payload: fileRef }); + }, []); + + const [fileState, setFileState] = useState({ + files: [ + { + key: '/home/emory/Desktop/github', + modified: +Moment().subtract(1, 'hours'), + size: 1.5 * 1024 * 1024, + }, + { + key: '/concore/demo/sample2.graphml', + modified: +Moment().subtract(3, 'days'), + size: 545 * 1024, + }, + { + key: '/concore/demo/sample3.graphml', + modified: +Moment().subtract(3, 'days'), + size: 52 * 1024, + }, + { + key: '/concore/demo/sampleM.graphml', + modified: +Moment().subtract(2, 'months'), + size: 13.2 * 1024 * 1024, + }, + { + key: '/concore/demo/sampleMFile.graphml', + modified: +Moment().subtract(25, 'days'), + size: 85 * 1024, + }, + { + key: '/concore/demo/sampleP.graphml', + modified: +Moment().subtract(15, 'days'), + size: 480 * 1024, + }, + { + key: '/concore/demo/sampleplot.graphml', + modified: +Moment().subtract(15, 'days'), + size: 4.2 * 1024 * 1024, + }, + ], + }); + + const handleCreateFolder = (key) => { + setFileState((state) => { + state.files = state.files.concat([]); + return state; + }); + }; + + const folderPicker = (e) => { + console.log(e.target.files[0]); + // eslint-disable-next-line global-require + const os = require('os'); + console.log(os.homedir()); + }; + + return ( +
+ + { e.target.value = null; }} + // style={{ display: 'none' }} + accept=".graphml" + onChange={(e) => { + console.log(e.target.files); + const { name } = e.target.files[0].name; + const { lastModified } = e.target.files[0].lastModified; + const { size } = e.target.files[0].size; + const { files } = [{ + key: name, + lastModified: lastModified, + size: size, + }]; + console.log('Hi'); + setFileState(files); + readFile(superState, dispatcher, e); + }} + multiple + /> + {/* eslint-disable-next-line react/button-has-type */} + + +
+ ); +}; + +export default LocalFileBrowser; From e4a15db7d16753828c3c64cbc39c44c9fec02fcf Mon Sep 17 00:00:00 2001 From: Aviral09 Date: Fri, 8 Jul 2022 07:47:20 -0700 Subject: [PATCH 003/282] Added multiple files support --- src/component/fileBrowser.jsx | 43 ++++++-------------------- src/toolbarActions/toolbarFunctions.js | 27 ++++++++++------ 2 files changed, 27 insertions(+), 43 deletions(-) diff --git a/src/component/fileBrowser.jsx b/src/component/fileBrowser.jsx index 9695503..e851d30 100644 --- a/src/component/fileBrowser.jsx +++ b/src/component/fileBrowser.jsx @@ -64,58 +64,35 @@ const LocalFileBrowser = ({ superState, dispatcher }) => { }); }; - const folderPicker = (e) => { - console.log(e.target.files[0]); - // eslint-disable-next-line global-require - const os = require('os'); - console.log(os.homedir()); - }; - return (
- { e.target.value = null; }} - // style={{ display: 'none' }} accept=".graphml" onChange={(e) => { console.log(e.target.files); - const { name } = e.target.files[0].name; - const { lastModified } = e.target.files[0].lastModified; - const { size } = e.target.files[0].size; - const { files } = [{ - key: name, - lastModified: lastModified, - size: size, - }]; + console.log(e.target.files.length); + // const { name } = e.target.files[0].name; + // const { lastModified } = e.target.files[0].lastModified; + // const { size } = e.target.files[0].size; + // const { files } = [{ + // key: name, + // lastModified: lastModified, + // size: size, + // }]; console.log('Hi'); - setFileState(files); + // setFileState(files); readFile(superState, dispatcher, e); }} multiple /> {/* eslint-disable-next-line react/button-has-type */} -
); diff --git a/src/toolbarActions/toolbarFunctions.js b/src/toolbarActions/toolbarFunctions.js index db6d78a..abb325d 100644 --- a/src/toolbarActions/toolbarFunctions.js +++ b/src/toolbarActions/toolbarFunctions.js @@ -81,16 +81,23 @@ const saveAction = (state, d, fileName) => { const readFile = (state, setState, e) => { if (e.target && e.target.files && e.target.files[0]) { - const fr = new FileReader(); - const projectName = e.target.files[0] - .name.split('.').slice(0, -1).join('.').split('-')[0]; - fr.onload = (x) => { - setState({ - type: T.ADD_GRAPH, - payload: { projectName, graphML: x.target.result }, - }); - }; - fr.readAsText(e.target.files[0]); + // eslint-disable-next-line prefer-const + // let filer = []; + for (let i = 0; i < e.target.files.length; i += 1) { + console.log('new file'); + const fr = new FileReader(); + // filer.push(fr); + const projectName = e.target.files[i] + .name.split('.').slice(0, -1).join('.').split('-')[0]; + console.log(projectName); + fr.onload = (x) => { + setState({ + type: T.ADD_GRAPH, + payload: { projectName, graphML: x.target.result }, + }); + }; + fr.readAsText(e.target.files[i]); + } } }; From 915398842e41e116a59a13a3c876f9304b09e1fc Mon Sep 17 00:00:00 2001 From: Aviral09 Date: Fri, 8 Jul 2022 08:57:39 -0700 Subject: [PATCH 004/282] Added support for dynamic list of files --- src/component/fileBrowser.jsx | 110 +++++++++++++++++++--------------- 1 file changed, 61 insertions(+), 49 deletions(-) diff --git a/src/component/fileBrowser.jsx b/src/component/fileBrowser.jsx index e851d30..bb8d64f 100644 --- a/src/component/fileBrowser.jsx +++ b/src/component/fileBrowser.jsx @@ -19,47 +19,57 @@ const LocalFileBrowser = ({ superState, dispatcher }) => { const [fileState, setFileState] = useState({ files: [ - { - key: '/home/emory/Desktop/github', - modified: +Moment().subtract(1, 'hours'), - size: 1.5 * 1024 * 1024, - }, - { - key: '/concore/demo/sample2.graphml', - modified: +Moment().subtract(3, 'days'), - size: 545 * 1024, - }, - { - key: '/concore/demo/sample3.graphml', - modified: +Moment().subtract(3, 'days'), - size: 52 * 1024, - }, - { - key: '/concore/demo/sampleM.graphml', - modified: +Moment().subtract(2, 'months'), - size: 13.2 * 1024 * 1024, - }, - { - key: '/concore/demo/sampleMFile.graphml', - modified: +Moment().subtract(25, 'days'), - size: 85 * 1024, - }, - { - key: '/concore/demo/sampleP.graphml', - modified: +Moment().subtract(15, 'days'), - size: 480 * 1024, - }, - { - key: '/concore/demo/sampleplot.graphml', - modified: +Moment().subtract(15, 'days'), - size: 4.2 * 1024 * 1024, - }, + // { + // key: '/home/emory/Desktop/github', + // modified: +Moment().subtract(1, 'hours'), + // size: 1.5 * 1024 * 1024, + // }, + // { + // key: '/concore/demo/sample2.graphml', + // modified: +Moment().subtract(3, 'days'), + // size: 545 * 1024, + // }, ], }); const handleCreateFolder = (key) => { setFileState((state) => { - state.files = state.files.concat([]); + state.files = state.files.concat([{ + key: key, + }]); + console.log(fileState); + return state; + }); + }; + + const handleCreateFiles = (files, prefix) => { + setFileState((state) => { + const newFiles = files.map((file) => { + let newKey = prefix; + if (prefix !== '' && prefix.substring(prefix.length - 1, prefix.length) !== '/') { + newKey += '/'; + } + newKey += file.name; + return { + key: newKey, + size: file.size, + modified: +Moment(), + }; + }); + + const uniqueNewFiles = []; + newFiles.map((newFile) => { + let exists = false; + state.files.map((existingFile) => { + if (existingFile.key === newFile.key) { + exists = true; + } + }); + if (!exists) { + uniqueNewFiles.push(newFile); + } + }); + state.files = state.files.concat(uniqueNewFiles); return state; }); }; @@ -73,17 +83,19 @@ const LocalFileBrowser = ({ superState, dispatcher }) => { accept=".graphml" onChange={(e) => { console.log(e.target.files); - console.log(e.target.files.length); - // const { name } = e.target.files[0].name; - // const { lastModified } = e.target.files[0].lastModified; - // const { size } = e.target.files[0].size; - // const { files } = [{ - // key: name, - // lastModified: lastModified, - // size: size, - // }]; - console.log('Hi'); - // setFileState(files); + setFileState((state) => { + for (let i = 0; i < e.target.files.length; i += 1) { + console.log(Moment(e.target.files[0].lastModified).date() - Moment(1318781876406).date()); + state.files = state.files.concat([{ + key: e.target.files[i].name, + // eslint-disable-next-line max-len + lastModified: Moment(Date(e.target.files[i].lastModified)), + size: e.target.files[i].size, + }]); + } + console.log(fileState); + return state; + }); readFile(superState, dispatcher, e); }} multiple @@ -92,10 +104,10 @@ const LocalFileBrowser = ({ superState, dispatcher }) => { ); }; - export default LocalFileBrowser; From 4f3d2aa0564b6507a8bb8d8e28b3eca9338b5074 Mon Sep 17 00:00:00 2001 From: Aviral09 Date: Fri, 22 Jul 2022 11:18:01 +0530 Subject: [PATCH 005/282] Avoid line ending errors for windows --- .eslintrc.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.eslintrc.json b/.eslintrc.json index b485818..b121603 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -49,7 +49,8 @@ "ignoreRestSiblings": false } ], - "react/prop-types": "off" + "react/prop-types": "off", + "linebreak-style": ["error", "windows"] }, "overrides": [ { From eeb0d9812df99d868e05d379c3ee6c4cdfd82f60 Mon Sep 17 00:00:00 2001 From: Aviral09 Date: Fri, 22 Jul 2022 11:22:55 +0530 Subject: [PATCH 006/282] Added File API support, dropdown to select files --- package.json | 3 +++ src/component/fileBrowser.jsx | 11 ++++------ src/component/modals/NodeDetails.jsx | 29 +++++++++++++++++--------- src/toolbarActions/toolbarFunctions.js | 20 ++++++++---------- 4 files changed, 35 insertions(+), 28 deletions(-) diff --git a/package.json b/package.json index ad9adf0..fe00e15 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "@testing-library/jest-dom": "^5.11.4", "@testing-library/react": "^11.1.0", "@testing-library/user-event": "^12.1.10", + "chokidar": "^3.5.3", "cytoscape": "^3.19.0", "cytoscape-edgehandles": "^3.6.0", "cytoscape-grid-guide": "^2.3.2", @@ -17,12 +18,14 @@ "jquery": "^3.0.0", "konva": "^7.0.3", "md5": "^2.3.0", + "moment": "^2.29.4", "rc-slider": "^9.7.2", "rc-switch": "^3.2.2", "react": "^17.0.2", "react-color": "^2.19.3", "react-dom": "^17.0.2", "react-icons": "^4.2.0", + "react-keyed-file-browser": "^1.14.0", "react-modal": "^3.13.1", "react-scripts": "4.0.3", "react-tooltip": "^4.2.21", diff --git a/src/component/fileBrowser.jsx b/src/component/fileBrowser.jsx index bb8d64f..262c0b1 100644 --- a/src/component/fileBrowser.jsx +++ b/src/component/fileBrowser.jsx @@ -80,27 +80,24 @@ const LocalFileBrowser = ({ superState, dispatcher }) => { type="file" ref={fileRef} onClick={(e) => { e.target.value = null; }} - accept=".graphml" onChange={(e) => { - console.log(e.target.files); setFileState((state) => { for (let i = 0; i < e.target.files.length; i += 1) { - console.log(Moment(e.target.files[0].lastModified).date() - Moment(1318781876406).date()); state.files = state.files.concat([{ key: e.target.files[i].name, - // eslint-disable-next-line max-len lastModified: Moment(Date(e.target.files[i].lastModified)), size: e.target.files[i].size, }]); } - console.log(fileState); return state; }); + console.log(JSON.stringify(fileState)); + window.localStorage.setItem('fileList', JSON.stringify(fileState)); readFile(superState, dispatcher, e); }} - multiple + directory + webkitdirectory="true" /> - {/* eslint-disable-next-line react/button-has-type */} Label : ''} {labelAllowed ? ( - setData({ ...data, label: e.target.value })} - /> + <> + setData({ ...data, label: e.target.value })} + list="files" + /> + + { + // eslint-disable-next-line max-len + JSON.parse(window.localStorage.getItem('fileList')).files.map((item, index) => + ) : ''}
Width
{ const readFile = (state, setState, e) => { if (e.target && e.target.files && e.target.files[0]) { // eslint-disable-next-line prefer-const - // let filer = []; for (let i = 0; i < e.target.files.length; i += 1) { - console.log('new file'); const fr = new FileReader(); - // filer.push(fr); const projectName = e.target.files[i] .name.split('.').slice(0, -1).join('.').split('-')[0]; - console.log(projectName); - fr.onload = (x) => { - setState({ - type: T.ADD_GRAPH, - payload: { projectName, graphML: x.target.result }, - }); - }; - fr.readAsText(e.target.files[i]); + if (e.target.files[i].name.split('.').pop() === 'graphml') { + fr.onload = (x) => { + setState({ + type: T.ADD_GRAPH, + payload: { projectName, graphML: x.target.result }, + }); + }; + fr.readAsText(e.target.files[i]); + } } } }; From 897fc5801416b7719da09c8c06310c3fee98b0be Mon Sep 17 00:00:00 2001 From: Aviral09 Date: Fri, 22 Jul 2022 11:27:09 +0530 Subject: [PATCH 007/282] Update package-lock.json --- package-lock.json | 281 ++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 246 insertions(+), 35 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8f19d65..76dfcb0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,6 +12,7 @@ "@testing-library/jest-dom": "^5.11.4", "@testing-library/react": "^11.1.0", "@testing-library/user-event": "^12.1.10", + "chokidar": "^3.5.3", "cytoscape": "^3.19.0", "cytoscape-edgehandles": "^3.6.0", "cytoscape-grid-guide": "^2.3.2", @@ -21,12 +22,14 @@ "jquery": "^3.0.0", "konva": "^7.0.3", "md5": "^2.3.0", + "moment": "^2.29.4", "rc-slider": "^9.7.2", "rc-switch": "^3.2.2", "react": "^17.0.2", "react-color": "^2.19.3", "react-dom": "^17.0.2", "react-icons": "^4.2.0", + "react-keyed-file-browser": "^1.14.0", "react-modal": "^3.13.1", "react-scripts": "4.0.3", "react-tooltip": "^4.2.21", @@ -1778,6 +1781,21 @@ "node": ">= 8" } }, + "node_modules/@react-dnd/asap": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@react-dnd/asap/-/asap-4.0.1.tgz", + "integrity": "sha512-kLy0PJDDwvwwTXxqTFNAAllPHD73AycE9ypWeln/IguoGBEbvFcPDbCV03G52bEcC5E+YgupBE0VzHGdC8SIXg==" + }, + "node_modules/@react-dnd/invariant": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@react-dnd/invariant/-/invariant-2.0.0.tgz", + "integrity": "sha512-xL4RCQBCBDJ+GRwKTFhGUW8GXa4yoDfJrPbLblc3U09ciS+9ZJXJ3Qrcs/x2IODOdIE5kQxvMmE2UKyqUictUw==" + }, + "node_modules/@react-dnd/shallowequal": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@react-dnd/shallowequal/-/shallowequal-2.0.0.tgz", + "integrity": "sha512-Pc/AFTdwZwEKJxFJvlxrSmGe/di+aAOBn60sremrpLo6VI/6cmiUYNNwlI5KNYttg7uypzA3ILPMPgxB2GYZEg==" + }, "node_modules/@rollup/plugin-node-resolve": { "version": "7.1.3", "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-7.1.3.tgz", @@ -3627,7 +3645,6 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "optional": true, "engines": { "node": ">=8" } @@ -4079,22 +4096,29 @@ "integrity": "sha512-tzWzvgePgLORb9/3a0YenggReLKAIb2owL03H2Xdoe5pKcUyWRSEQ8xfCar8t2SIAuEDwtmx2da1YB52YuHQMQ==" }, "node_modules/chokidar": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz", - "integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==", - "optional": true, + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], "dependencies": { - "anymatch": "~3.1.1", + "anymatch": "~3.1.2", "braces": "~3.0.2", - "fsevents": "~2.3.1", - "glob-parent": "~5.1.0", + "glob-parent": "~5.1.2", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", - "readdirp": "~3.5.0" + "readdirp": "~3.6.0" }, "engines": { "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" } }, "node_modules/chownr": { @@ -5135,6 +5159,18 @@ "node": ">=10" } }, + "node_modules/date-fns": { + "version": "2.28.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.28.0.tgz", + "integrity": "sha512-8d35hViGYx/QH0icHYCeLmsLmMUheMmTyV9Fcm6gvNwdw31yXXH+O85sOBJ+OLnLQMKZowvpKb6FgMIQjcpvQw==", + "engines": { + "node": ">=0.11" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/date-fns" + } + }, "node_modules/debug": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", @@ -5444,6 +5480,16 @@ "node": ">=8" } }, + "node_modules/dnd-core": { + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/dnd-core/-/dnd-core-14.0.1.tgz", + "integrity": "sha512-+PVS2VPTgKFPYWo3vAFEA8WPbTf7/xo43TifH9G8S1KqnrQu0o77A3unrF5yOugy4mIz7K5wAVFHUcha7wsz6A==", + "dependencies": { + "@react-dnd/asap": "^4.0.0", + "@react-dnd/invariant": "^2.0.0", + "redux": "^4.1.1" + } + }, "node_modules/dns-equal": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz", @@ -7732,9 +7778,9 @@ } }, "node_modules/glob-parent": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", - "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dependencies": { "is-glob": "^4.0.1" }, @@ -7976,6 +8022,14 @@ "minimalistic-crypto-utils": "^1.0.1" } }, + "node_modules/hoist-non-react-statics": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", + "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", + "dependencies": { + "react-is": "^16.7.0" + } + }, "node_modules/hoopy": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/hoopy/-/hoopy-0.1.4.tgz", @@ -8623,7 +8677,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "optional": true, "dependencies": { "binary-extensions": "^2.0.0" }, @@ -10122,6 +10175,11 @@ "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=" }, + "node_modules/lodash.flow": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/lodash.flow/-/lodash.flow-3.5.0.tgz", + "integrity": "sha512-ff3BX/tSioo+XojX4MOsOMhJw0nZoUEF011LX8g8d3gvjVbxd89cCio4BCXronjxcTUIJUoqKEUA+n4CqvvRPw==" + }, "node_modules/lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", @@ -10613,6 +10671,14 @@ "mkdirp": "bin/cmd.js" } }, + "node_modules/moment": { + "version": "2.29.4", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz", + "integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==", + "engines": { + "node": "*" + } + }, "node_modules/move-concurrently": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", @@ -13427,6 +13493,43 @@ "node": ">=4" } }, + "node_modules/react-dnd": { + "version": "14.0.5", + "resolved": "https://registry.npmjs.org/react-dnd/-/react-dnd-14.0.5.tgz", + "integrity": "sha512-9i1jSgbyVw0ELlEVt/NkCUkxy1hmhJOkePoCH713u75vzHGyXhPDm28oLfc2NMSBjZRM1Y+wRjHXJT3sPrTy+A==", + "dependencies": { + "@react-dnd/invariant": "^2.0.0", + "@react-dnd/shallowequal": "^2.0.0", + "dnd-core": "14.0.1", + "fast-deep-equal": "^3.1.3", + "hoist-non-react-statics": "^3.3.2" + }, + "peerDependencies": { + "@types/hoist-non-react-statics": ">= 3.3.1", + "@types/node": ">= 12", + "@types/react": ">= 16", + "react": ">= 16.14" + }, + "peerDependenciesMeta": { + "@types/hoist-non-react-statics": { + "optional": true + }, + "@types/node": { + "optional": true + }, + "@types/react": { + "optional": true + } + } + }, + "node_modules/react-dnd-html5-backend": { + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/react-dnd-html5-backend/-/react-dnd-html5-backend-14.1.0.tgz", + "integrity": "sha512-6ONeqEC3XKVf4eVmMTe0oPds+c5B9Foyj8p/ZKLb7kL2qh9COYxiBHv3szd6gztqi/efkmriywLUVlPotqoJyw==", + "dependencies": { + "dnd-core": "14.0.1" + } + }, "node_modules/react-dom": { "version": "17.0.2", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz", @@ -13452,6 +13555,22 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, + "node_modules/react-keyed-file-browser": { + "version": "1.14.0", + "resolved": "https://registry.npmjs.org/react-keyed-file-browser/-/react-keyed-file-browser-1.14.0.tgz", + "integrity": "sha512-1VWetrfla8/xHW5dmVPUW7vXLaS9vAbuqtaNeKTgPtevwQxAwMvHpsUyivtcKgB2PU5J2HUWr82g+3kDAjZifw==", + "dependencies": { + "classnames": "^2.2.6", + "date-fns": "^2.22.1", + "lodash.flow": "^3.5.0", + "prop-types": "^15.7.2", + "react-dnd": "^14.0.2", + "react-dnd-html5-backend": "^14.0" + }, + "peerDependencies": { + "react": "0.14.x || 15.x || 16.x || 17.x" + } + }, "node_modules/react-lifecycles-compat": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", @@ -13654,10 +13773,9 @@ } }, "node_modules/readdirp": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", - "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", - "optional": true, + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dependencies": { "picomatch": "^2.2.1" }, @@ -13688,6 +13806,14 @@ "node": ">=8" } }, + "node_modules/redux": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/redux/-/redux-4.2.0.tgz", + "integrity": "sha512-oSBmcKKIuIR4ME29/AeNUnl5L+hvBq7OaJWzaptTQJAntaPvxIJqfnjbaEiCzzaIz+XmVILfqAM3Ob0aXLPfjA==", + "dependencies": { + "@babel/runtime": "^7.9.2" + } + }, "node_modules/regenerate": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", @@ -19977,6 +20103,21 @@ } } }, + "@react-dnd/asap": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@react-dnd/asap/-/asap-4.0.1.tgz", + "integrity": "sha512-kLy0PJDDwvwwTXxqTFNAAllPHD73AycE9ypWeln/IguoGBEbvFcPDbCV03G52bEcC5E+YgupBE0VzHGdC8SIXg==" + }, + "@react-dnd/invariant": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@react-dnd/invariant/-/invariant-2.0.0.tgz", + "integrity": "sha512-xL4RCQBCBDJ+GRwKTFhGUW8GXa4yoDfJrPbLblc3U09ciS+9ZJXJ3Qrcs/x2IODOdIE5kQxvMmE2UKyqUictUw==" + }, + "@react-dnd/shallowequal": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@react-dnd/shallowequal/-/shallowequal-2.0.0.tgz", + "integrity": "sha512-Pc/AFTdwZwEKJxFJvlxrSmGe/di+aAOBn60sremrpLo6VI/6cmiUYNNwlI5KNYttg7uypzA3ILPMPgxB2GYZEg==" + }, "@rollup/plugin-node-resolve": { "version": "7.1.3", "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-7.1.3.tgz", @@ -21591,8 +21732,7 @@ "binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "optional": true + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==" }, "bindings": { "version": "1.5.0", @@ -21988,19 +22128,18 @@ "integrity": "sha512-tzWzvgePgLORb9/3a0YenggReLKAIb2owL03H2Xdoe5pKcUyWRSEQ8xfCar8t2SIAuEDwtmx2da1YB52YuHQMQ==" }, "chokidar": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz", - "integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==", - "optional": true, + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", "requires": { - "anymatch": "~3.1.1", + "anymatch": "~3.1.2", "braces": "~3.0.2", - "fsevents": "~2.3.1", - "glob-parent": "~5.1.0", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", - "readdirp": "~3.5.0" + "readdirp": "~3.6.0" } }, "chownr": { @@ -22872,6 +23011,11 @@ "whatwg-url": "^8.0.0" } }, + "date-fns": { + "version": "2.28.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.28.0.tgz", + "integrity": "sha512-8d35hViGYx/QH0icHYCeLmsLmMUheMmTyV9Fcm6gvNwdw31yXXH+O85sOBJ+OLnLQMKZowvpKb6FgMIQjcpvQw==" + }, "debug": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", @@ -23121,6 +23265,16 @@ "path-type": "^4.0.0" } }, + "dnd-core": { + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/dnd-core/-/dnd-core-14.0.1.tgz", + "integrity": "sha512-+PVS2VPTgKFPYWo3vAFEA8WPbTf7/xo43TifH9G8S1KqnrQu0o77A3unrF5yOugy4mIz7K5wAVFHUcha7wsz6A==", + "requires": { + "@react-dnd/asap": "^4.0.0", + "@react-dnd/invariant": "^2.0.0", + "redux": "^4.1.1" + } + }, "dns-equal": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz", @@ -25039,9 +25193,9 @@ } }, "glob-parent": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", - "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "requires": { "is-glob": "^4.0.1" } @@ -25240,6 +25394,14 @@ "minimalistic-crypto-utils": "^1.0.1" } }, + "hoist-non-react-statics": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", + "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", + "requires": { + "react-is": "^16.7.0" + } + }, "hoopy": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/hoopy/-/hoopy-0.1.4.tgz", @@ -25785,7 +25947,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "optional": true, "requires": { "binary-extensions": "^2.0.0" } @@ -26976,6 +27137,11 @@ "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=" }, + "lodash.flow": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/lodash.flow/-/lodash.flow-3.5.0.tgz", + "integrity": "sha512-ff3BX/tSioo+XojX4MOsOMhJw0nZoUEF011LX8g8d3gvjVbxd89cCio4BCXronjxcTUIJUoqKEUA+n4CqvvRPw==" + }, "lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", @@ -27384,6 +27550,11 @@ "minimist": "^1.2.5" } }, + "moment": { + "version": "2.29.4", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz", + "integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==" + }, "move-concurrently": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", @@ -29739,6 +29910,26 @@ } } }, + "react-dnd": { + "version": "14.0.5", + "resolved": "https://registry.npmjs.org/react-dnd/-/react-dnd-14.0.5.tgz", + "integrity": "sha512-9i1jSgbyVw0ELlEVt/NkCUkxy1hmhJOkePoCH713u75vzHGyXhPDm28oLfc2NMSBjZRM1Y+wRjHXJT3sPrTy+A==", + "requires": { + "@react-dnd/invariant": "^2.0.0", + "@react-dnd/shallowequal": "^2.0.0", + "dnd-core": "14.0.1", + "fast-deep-equal": "^3.1.3", + "hoist-non-react-statics": "^3.3.2" + } + }, + "react-dnd-html5-backend": { + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/react-dnd-html5-backend/-/react-dnd-html5-backend-14.1.0.tgz", + "integrity": "sha512-6ONeqEC3XKVf4eVmMTe0oPds+c5B9Foyj8p/ZKLb7kL2qh9COYxiBHv3szd6gztqi/efkmriywLUVlPotqoJyw==", + "requires": { + "dnd-core": "14.0.1" + } + }, "react-dom": { "version": "17.0.2", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz", @@ -29764,6 +29955,19 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, + "react-keyed-file-browser": { + "version": "1.14.0", + "resolved": "https://registry.npmjs.org/react-keyed-file-browser/-/react-keyed-file-browser-1.14.0.tgz", + "integrity": "sha512-1VWetrfla8/xHW5dmVPUW7vXLaS9vAbuqtaNeKTgPtevwQxAwMvHpsUyivtcKgB2PU5J2HUWr82g+3kDAjZifw==", + "requires": { + "classnames": "^2.2.6", + "date-fns": "^2.22.1", + "lodash.flow": "^3.5.0", + "prop-types": "^15.7.2", + "react-dnd": "^14.0.2", + "react-dnd-html5-backend": "^14.0" + } + }, "react-lifecycles-compat": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", @@ -29930,10 +30134,9 @@ } }, "readdirp": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", - "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", - "optional": true, + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "requires": { "picomatch": "^2.2.1" } @@ -29955,6 +30158,14 @@ "strip-indent": "^3.0.0" } }, + "redux": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/redux/-/redux-4.2.0.tgz", + "integrity": "sha512-oSBmcKKIuIR4ME29/AeNUnl5L+hvBq7OaJWzaptTQJAntaPvxIJqfnjbaEiCzzaIz+XmVILfqAM3Ob0aXLPfjA==", + "requires": { + "@babel/runtime": "^7.9.2" + } + }, "regenerate": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", From 984e8558aa7c2f92cd8e10a78a3abd837630b653 Mon Sep 17 00:00:00 2001 From: Aviral09 Date: Fri, 5 Aug 2022 12:37:37 +0530 Subject: [PATCH 008/282] Modified label name config --- src/component/modals/NodeDetails.jsx | 34 +++++++++++++++++++--- src/component/modals/nodeDetails.css | 11 +++++-- src/graph-builder/local-storage-manager.js | 3 ++ 3 files changed, 42 insertions(+), 6 deletions(-) diff --git a/src/component/modals/NodeDetails.jsx b/src/component/modals/NodeDetails.jsx index 0381432..3af689d 100644 --- a/src/component/modals/NodeDetails.jsx +++ b/src/component/modals/NodeDetails.jsx @@ -3,6 +3,7 @@ import React, { } from 'react'; import './nodeDetails.css'; import ColorBox from './ColorBox'; +import localStorageManager from '../../graph-builder/local-storage-manager'; const NodeDetails = ({ data, setData, submit, labelAllowed, @@ -10,6 +11,8 @@ const NodeDetails = ({ const inputRef = useCallback((node) => node && node.focus(), []); const textRef = createRef(); const [widthSet, setWidthSet] = useState(false); + const [labelName, setLabelName] = useState(''); + const [labelFile, setLabelFile] = useState(''); const setStyle = (prop) => { setData({ ...data, style: { ...data.style, ...prop } }); @@ -74,15 +77,38 @@ const NodeDetails = ({ type="text" required label="Node Label" - value={data.label} placeholder="Enter Node Label" - onChange={(e) => setData({ ...data, label: e.target.value })} + onChange={(e) => { + setLabelName(e.target.value); + if (labelFile) setData({ ...data, label: e.target.value + labelFile }); + }} + /> + + { + setLabelFile(e.target.value); + if (labelName) { + let lname = labelName; + if (labelName.slice(-1) !== ':') { + setLabelName(`${labelName}:`); + lname += ':'; + } + setData({ ...data, label: lname + e.target.value }); + } + }} list="files" /> { - // eslint-disable-next-line max-len - JSON.parse(window.localStorage.getItem('fileList')).files.map((item, index) => diff --git a/src/component/modals/nodeDetails.css b/src/component/modals/nodeDetails.css index 67aeb24..e61517f 100644 --- a/src/component/modals/nodeDetails.css +++ b/src/component/modals/nodeDetails.css @@ -57,7 +57,11 @@ } */ .nodeform .nodeLabel { - grid-column: 2 / span 3; + grid-column: 2 / span 1; +} + +.nodeform .nodeLabelFile { + grid-column: 3 / span 2; } .nodeform .color-box { @@ -103,6 +107,9 @@ width: auto } .nodeform .nodeLabel { - grid-column: 2; + grid-column: 2 / span 1; + } + .nodeform .nodeLabelFile { + grid-column: 2 / span 1; } } \ No newline at end of file diff --git a/src/graph-builder/local-storage-manager.js b/src/graph-builder/local-storage-manager.js index 7259d99..fb21593 100644 --- a/src/graph-builder/local-storage-manager.js +++ b/src/graph-builder/local-storage-manager.js @@ -58,5 +58,8 @@ const localStorageManager = { clearGraph(id) { window.localStorage.removeItem(id); }, + getFileList() { + return localStorage.getItem('fileList') || ''; + }, }; export default localStorageManager; From e5a00f0dd21767ab908336c4b7aa995051a66785 Mon Sep 17 00:00:00 2001 From: Pradeeban Kathiravelu Date: Thu, 11 Aug 2022 18:06:26 -0400 Subject: [PATCH 009/282] Update README.md --- README.md | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index e1e0e61..cd8d312 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,16 @@ -# DHGWorkflow -DHGWorkflow is a visual Directed Hypergraph Workflow Composer. +# The _concore_ Editor -# Developers -For developers, this tool can be more than just a DHGWorkflow Editor. We aim at building an open-source generic simple graph builder which can be used for various applications that require some kind of building graphs by a user. It can easily be integrated with any web application and can even be customised to add custom logics. +This is a fork of DHGWorkflow, visual Directed Hypergraph Workflow Composer, finetuned to operate as a frontend for _concore_. -DHGWorkflow is built by adding custom logic over this Generic Graph Builder. +Active development of the _concore_ Editor happens in the dev branch. Please check it out! -Key Features of this graph builder: +Key Features of the _concore_ Editor: * Export-import graph as a graphml file. * Export graph as JPEG/PNG * Undo-Redo Actions * Drag Drop Nodes * Create Edges easily * Bend Edges -* Resize and customise nodes and edges. and many more! @@ -56,4 +53,4 @@ This project requires building a graph with some special kind of hyperedges. If we create our instance of the graph with `tailored-graph-builder`, we will get graph builder which will have hyperedges specialized for this project requirement whereas creating the instance from `graph-core` will result in a generic graph builder with simple edges. - \ No newline at end of file + From b93b16f03e7cf0481c40ca50da6c65e2d2b8144a Mon Sep 17 00:00:00 2001 From: Aviral09 Date: Fri, 12 Aug 2022 12:27:20 +0530 Subject: [PATCH 010/282] Added modal for editing python files --- src/App.jsx | 2 + src/component/CodeEdit.jsx | 1 + src/component/fileBrowser.jsx | 23 +++++++--- src/component/modals/FileEdit.jsx | 49 +++++++++++++++++++++ src/component/modals/file-edit.css | 38 +++++++++++++++++ src/reducer/actionType.js | 1 + src/reducer/reducer.js | 4 ++ src/toolbarActions/toolbarFunctions.js | 59 ++++++++++++++++++-------- src/toolbarActions/toolbarList.js | 3 +- 9 files changed, 156 insertions(+), 24 deletions(-) create mode 100644 src/component/modals/FileEdit.jsx create mode 100644 src/component/modals/file-edit.css diff --git a/src/App.jsx b/src/App.jsx index 7b898c1..9d9ec3a 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -11,6 +11,7 @@ import SettingsModal from './component/modals/Settings'; import FileDragDrop from './component/File-drag-drop'; import HistoryModal from './component/modals/History'; import LocalFileBrowser from './component/fileBrowser'; +import FileEditModal from './component/modals/FileEdit'; const app = () => { const [superState, dispatcher] = useReducer(reducer, initialState); @@ -20,6 +21,7 @@ const app = () => { + dispatcher({ type: T.Model_Close })} superState={superState} diff --git a/src/component/CodeEdit.jsx b/src/component/CodeEdit.jsx index c30f780..43b73a2 100644 --- a/src/component/CodeEdit.jsx +++ b/src/component/CodeEdit.jsx @@ -19,6 +19,7 @@ const CodeEdit = ({ >
{parseMD(docString)}

+ {}