elseware-ui 2.20.2 → 2.20.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.es.js CHANGED
@@ -21023,8 +21023,20 @@ new Transform$1(1, 0, 0);
21023
21023
  Transform$1.prototype;
21024
21024
 
21025
21025
  var createForceLayout = function (nodes, edges, width, height) {
21026
- // Convert app edges -> D3 compatible edges
21027
- var d3Links = edges.map(function (e) { return ({
21026
+ // Build fast lookup map
21027
+ var nodeMap = new Map(nodes.map(function (n) { return [n.id, n]; }));
21028
+ // Filter + convert edges safely
21029
+ var d3Links = edges
21030
+ .filter(function (e) {
21031
+ var fromId = typeof e.from === "string" ? e.from : e.from.id;
21032
+ var toId = typeof e.to === "string" ? e.to : e.to.id;
21033
+ var valid = nodeMap.has(fromId) && nodeMap.has(toId);
21034
+ if (!valid) {
21035
+ console.warn("Invalid edge skipped:", e);
21036
+ }
21037
+ return valid;
21038
+ })
21039
+ .map(function (e) { return ({
21028
21040
  source: typeof e.from === "string" ? e.from : e.from.id,
21029
21041
  target: typeof e.to === "string" ? e.to : e.to.id,
21030
21042
  weight: e.weight,
@@ -21034,7 +21046,7 @@ var createForceLayout = function (nodes, edges, width, height) {
21034
21046
  .id(function (d) { return d.id; })
21035
21047
  .distance(120)
21036
21048
  .strength(0.7))
21037
- .force("charge", manyBody().strength(-300))
21049
+ .force("charge", manyBody().strength(-280))
21038
21050
  .force("center", center(width / 2, height / 2))
21039
21051
  .force("collision", collide().radius(35));
21040
21052
  };
package/build/index.js CHANGED
@@ -21050,8 +21050,20 @@ new Transform$1(1, 0, 0);
21050
21050
  Transform$1.prototype;
21051
21051
 
21052
21052
  var createForceLayout = function (nodes, edges, width, height) {
21053
- // Convert app edges -> D3 compatible edges
21054
- var d3Links = edges.map(function (e) { return ({
21053
+ // Build fast lookup map
21054
+ var nodeMap = new Map(nodes.map(function (n) { return [n.id, n]; }));
21055
+ // Filter + convert edges safely
21056
+ var d3Links = edges
21057
+ .filter(function (e) {
21058
+ var fromId = typeof e.from === "string" ? e.from : e.from.id;
21059
+ var toId = typeof e.to === "string" ? e.to : e.to.id;
21060
+ var valid = nodeMap.has(fromId) && nodeMap.has(toId);
21061
+ if (!valid) {
21062
+ console.warn("Invalid edge skipped:", e);
21063
+ }
21064
+ return valid;
21065
+ })
21066
+ .map(function (e) { return ({
21055
21067
  source: typeof e.from === "string" ? e.from : e.from.id,
21056
21068
  target: typeof e.to === "string" ? e.to : e.to.id,
21057
21069
  weight: e.weight,
@@ -21061,7 +21073,7 @@ var createForceLayout = function (nodes, edges, width, height) {
21061
21073
  .id(function (d) { return d.id; })
21062
21074
  .distance(120)
21063
21075
  .strength(0.7))
21064
- .force("charge", manyBody().strength(-300))
21076
+ .force("charge", manyBody().strength(-280))
21065
21077
  .force("center", center(width / 2, height / 2))
21066
21078
  .force("collision", collide().radius(35));
21067
21079
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "elseware-ui",
3
- "version": "2.20.2",
3
+ "version": "2.20.3",
4
4
  "private": false,
5
5
  "description": "A modern and customizable React UI component library by elseware Technology.",
6
6
  "keywords": [