removed lodash

This commit is contained in:
2024-10-10 16:44:08 +03:00
parent 986d3420cb
commit f949852c1a
13 changed files with 1164 additions and 714 deletions
@@ -1,4 +1,4 @@
import {uniqBy} from "lodash";
import {uniqueBy} from "../../../helpers.js";
import axios from "axios";
export function insertEdges(graph, sourceRecord, targetRecords, fieldName, action = "") {
@@ -17,8 +17,8 @@ export function insertEdges(graph, sourceRecord, targetRecords, fieldName, actio
replacedEdges = replacedEdges.filter((edge) => edge.field !== field.name);
}
graph.records = uniqBy([...graph.records, ...targetRecords], (r) => r.id);
graph.edges = uniqBy([...replacedEdges, ...newEdges], (edge) => edge.source + edge.target + edge.field + edge.depth);
graph.records = uniqueBy([...graph.records, ...targetRecords], (r) => r.id);
graph.edges = uniqueBy([...replacedEdges, ...newEdges], (edge) => edge.source + edge.target + edge.field + edge.depth);
return graph;
}