datastake-daf 0.6.355 → 0.6.356

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.
@@ -51745,9 +51745,6 @@ function ToolTipEdge({
51745
51745
  data,
51746
51746
  targetPosition
51747
51747
  }) {
51748
- console.log({
51749
- data
51750
- });
51751
51748
  const [smoothPath] = react.getSmoothStepPath({
51752
51749
  sourceX,
51753
51750
  sourceY,
@@ -51763,9 +51760,6 @@ function ToolTipEdge({
51763
51760
  targetX,
51764
51761
  targetY
51765
51762
  });
51766
- console.log({
51767
- center: center[0]
51768
- });
51769
51763
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
51770
51764
  children: [/*#__PURE__*/jsxRuntime.jsx(react.BaseEdge, {
51771
51765
  path: smoothPath
@@ -51773,7 +51767,7 @@ function ToolTipEdge({
51773
51767
  children: /*#__PURE__*/jsxRuntime.jsx("div", {
51774
51768
  className: "button-edge__label nodrag nopan",
51775
51769
  style: {
51776
- transform: `translate(-50%, -50%) translate(${data?.isPdf ? center[0] + -30 : data?.isOnlyOne ? center[0] : center[0] + (sourcePosition === "right" ? 30 : -30)}px, ${targetY}px)`,
51770
+ transform: `translate(-50%, -50%) translate(${data?.isOnlyOne ? center[0] : center[0] + (sourcePosition === "right" ? 30 : -30)}px, ${targetY}px)`,
51777
51771
  position: "absolute",
51778
51772
  zIndex: 1000
51779
51773
  },
@@ -52665,7 +52659,8 @@ function positionDataNodes(_ref2) {
52665
52659
  total,
52666
52660
  mainNode,
52667
52661
  type,
52668
- hasContent
52662
+ hasContent,
52663
+ isPdf = false
52669
52664
  } = _ref2;
52670
52665
  const DATA_NODE_WIDTH = DATA_NODE_SIZE[type].width;
52671
52666
  const DATA_NODE_HEIGHT = DATA_NODE_SIZE[type].height;
@@ -52687,7 +52682,7 @@ function positionDataNodes(_ref2) {
52687
52682
  const X_SPACE_FROM_ICON_NODE = 130;
52688
52683
  const MIN_SPACE_REQUIRED = Y_SPACE_FROM_SIBLINGS + DATA_NODE_HEIGHT;
52689
52684
  const totalHeight = total * MIN_SPACE_REQUIRED;
52690
- const iconNodeCenterY = iconNode.position.y + ICON_NODE_HEIGHT / 2 + (hasContent ? 26.5 : type === "primaryNode" ? 15 : 16.5);
52685
+ const iconNodeCenterY = iconNode.position.y + ICON_NODE_HEIGHT / 2 + (hasContent ? isPdf ? 30 : 26.5 : type === "primaryNode" ? 15 : 16.5);
52691
52686
  const startY = iconNodeCenterY - totalHeight / 2;
52692
52687
  const END_Y = startY + totalHeight;
52693
52688
  const yOffset = index * MIN_SPACE_REQUIRED;
@@ -52847,7 +52842,8 @@ function StakeholderMappings(_ref3) {
52847
52842
  total: 1,
52848
52843
  mainNode,
52849
52844
  type: "nameNode",
52850
- hasContent: (node === null || node === void 0 || (_node$data4 = node.data) === null || _node$data4 === void 0 ? void 0 : _node$data4.content) !== undefined && (node === null || node === void 0 || (_node$data5 = node.data) === null || _node$data5 === void 0 ? void 0 : _node$data5.content) !== null ? true : false
52845
+ hasContent: (node === null || node === void 0 || (_node$data4 = node.data) === null || _node$data4 === void 0 ? void 0 : _node$data4.content) !== undefined && (node === null || node === void 0 || (_node$data5 = node.data) === null || _node$data5 === void 0 ? void 0 : _node$data5.content) !== null ? true : false,
52846
+ isPdf: isPdf
52851
52847
  })
52852
52848
  }];
52853
52849
  }
@@ -52887,7 +52883,8 @@ function StakeholderMappings(_ref3) {
52887
52883
  total: 1,
52888
52884
  mainNode,
52889
52885
  type: "nameNode",
52890
- hasContent: (node === null || node === void 0 || (_node$data13 = node.data) === null || _node$data13 === void 0 ? void 0 : _node$data13.content) !== undefined && (node === null || node === void 0 || (_node$data14 = node.data) === null || _node$data14 === void 0 ? void 0 : _node$data14.content) !== null ? true : false
52886
+ hasContent: (node === null || node === void 0 || (_node$data13 = node.data) === null || _node$data13 === void 0 ? void 0 : _node$data13.content) !== undefined && (node === null || node === void 0 || (_node$data14 = node.data) === null || _node$data14 === void 0 ? void 0 : _node$data14.content) !== null ? true : false,
52887
+ isPdf: isPdf
52891
52888
  })
52892
52889
  }];
52893
52890
  }
@@ -52941,7 +52938,8 @@ function StakeholderMappings(_ref3) {
52941
52938
  total,
52942
52939
  mainNode,
52943
52940
  type: child.type || "primaryNode",
52944
- hasContent: node !== null && node !== void 0 && (_node$data15 = node.data) !== null && _node$data15 !== void 0 && _node$data15.content ? true : false
52941
+ hasContent: node !== null && node !== void 0 && (_node$data15 = node.data) !== null && _node$data15 !== void 0 && _node$data15.content ? true : false,
52942
+ isPdf: isPdf
52945
52943
  })
52946
52944
  };
52947
52945
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datastake-daf",
3
- "version": "0.6.355",
3
+ "version": "0.6.356",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^5.2.5",
6
6
  "@antv/g2": "^5.1.1",
@@ -72,6 +72,7 @@ function positionDataNodes({
72
72
  mainNode,
73
73
  type,
74
74
  hasContent,
75
+ isPdf = false,
75
76
  }) {
76
77
  const DATA_NODE_WIDTH = DATA_NODE_SIZE[type].width;
77
78
  const DATA_NODE_HEIGHT = DATA_NODE_SIZE[type].height;
@@ -98,7 +99,7 @@ function positionDataNodes({
98
99
  const iconNodeCenterY =
99
100
  iconNode.position.y +
100
101
  ICON_NODE_HEIGHT / 2 +
101
- (hasContent ? 26.5 : type === "primaryNode" ? 15 : 16.5);
102
+ (hasContent ? (isPdf ? 30 : 26.5) : type === "primaryNode" ? 15 : 16.5);
102
103
  const startY = iconNodeCenterY - totalHeight / 2;
103
104
  const END_Y = startY + totalHeight;
104
105
 
@@ -286,6 +287,7 @@ function StakeholderMappings({
286
287
  node?.data?.content !== undefined && node?.data?.content !== null
287
288
  ? true
288
289
  : false,
290
+ isPdf: isPdf,
289
291
  }),
290
292
  },
291
293
  ];
@@ -334,6 +336,7 @@ function StakeholderMappings({
334
336
  node?.data?.content !== undefined && node?.data?.content !== null
335
337
  ? true
336
338
  : false,
339
+ isPdf: isPdf,
337
340
  }),
338
341
  },
339
342
  ];
@@ -393,6 +396,7 @@ function StakeholderMappings({
393
396
  mainNode,
394
397
  type: child.type || "primaryNode",
395
398
  hasContent: node?.data?.content ? true : false,
399
+ isPdf: isPdf,
396
400
  }),
397
401
  };
398
402
  });
@@ -30,7 +30,6 @@ export default function ToolTipEdge({
30
30
  data,
31
31
  targetPosition,
32
32
  }) {
33
- console.log({data})
34
33
  const [smoothPath] = getSmoothStepPath({
35
34
  sourceX,
36
35
  sourceY,
@@ -47,7 +46,6 @@ console.log({data})
47
46
  targetX,
48
47
  targetY,
49
48
  });
50
- console.log({center: center[0]})
51
49
 
52
50
  return (
53
51
  <>
@@ -57,7 +55,7 @@ console.log({data})
57
55
  className="button-edge__label nodrag nopan"
58
56
  style={{
59
57
  transform: `translate(-50%, -50%) translate(${
60
- data?.isPdf ? center[0] + (-30) : data?.isOnlyOne
58
+ data?.isOnlyOne
61
59
  ? center[0]
62
60
  : center[0] + (sourcePosition === "right" ? 30 : -30)
63
61
  }px, ${targetY}px)`,