|
@@ -1,6 +1,8 @@
|
|
|
|
+import { FlowElement } from "react-flow-renderer";
|
|
|
|
+
|
|
/**
|
|
/**
|
|
- * @param {never[] | Object} input
|
|
|
|
- * @returns {import("react-flow-renderer").FlowElement[]}
|
|
|
|
|
|
+ * @param {never[] | Object} input
|
|
|
|
+ * @returns {FlowElement[]}
|
|
*/
|
|
*/
|
|
export const parser = (input) => {
|
|
export const parser = (input) => {
|
|
try {
|
|
try {
|
|
@@ -54,6 +56,8 @@ export const parser = (input) => {
|
|
|
|
|
|
const res = extract(input);
|
|
const res = extract(input);
|
|
|
|
|
|
|
|
+ console.log([...flatten(res), ...relationships(res)]);
|
|
|
|
+
|
|
return [...flatten(res), ...relationships(res)];
|
|
return [...flatten(res), ...relationships(res)];
|
|
} catch (error) {
|
|
} catch (error) {
|
|
console.error("An error occured while parsin JSON data!", error.stack);
|
|
console.error("An error occured while parsin JSON data!", error.stack);
|