datastake-daf 0.6.354 → 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,
@@ -51770,7 +51767,7 @@ function ToolTipEdge({
51770
51767
  children: /*#__PURE__*/jsxRuntime.jsx("div", {
51771
51768
  className: "button-edge__label nodrag nopan",
51772
51769
  style: {
51773
- transform: `translate(-50%, -50%) translate(${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)`,
51774
51771
  position: "absolute",
51775
51772
  zIndex: 1000
51776
51773
  },
@@ -52662,7 +52659,8 @@ function positionDataNodes(_ref2) {
52662
52659
  total,
52663
52660
  mainNode,
52664
52661
  type,
52665
- hasContent
52662
+ hasContent,
52663
+ isPdf = false
52666
52664
  } = _ref2;
52667
52665
  const DATA_NODE_WIDTH = DATA_NODE_SIZE[type].width;
52668
52666
  const DATA_NODE_HEIGHT = DATA_NODE_SIZE[type].height;
@@ -52684,7 +52682,7 @@ function positionDataNodes(_ref2) {
52684
52682
  const X_SPACE_FROM_ICON_NODE = 130;
52685
52683
  const MIN_SPACE_REQUIRED = Y_SPACE_FROM_SIBLINGS + DATA_NODE_HEIGHT;
52686
52684
  const totalHeight = total * MIN_SPACE_REQUIRED;
52687
- 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);
52688
52686
  const startY = iconNodeCenterY - totalHeight / 2;
52689
52687
  const END_Y = startY + totalHeight;
52690
52688
  const yOffset = index * MIN_SPACE_REQUIRED;
@@ -52844,7 +52842,8 @@ function StakeholderMappings(_ref3) {
52844
52842
  total: 1,
52845
52843
  mainNode,
52846
52844
  type: "nameNode",
52847
- 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
52848
52847
  })
52849
52848
  }];
52850
52849
  }
@@ -52884,7 +52883,8 @@ function StakeholderMappings(_ref3) {
52884
52883
  total: 1,
52885
52884
  mainNode,
52886
52885
  type: "nameNode",
52887
- 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
52888
52888
  })
52889
52889
  }];
52890
52890
  }
@@ -52938,7 +52938,8 @@ function StakeholderMappings(_ref3) {
52938
52938
  total,
52939
52939
  mainNode,
52940
52940
  type: child.type || "primaryNode",
52941
- 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
52942
52943
  })
52943
52944
  };
52944
52945
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datastake-daf",
3
- "version": "0.6.354",
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,
@@ -56,7 +55,9 @@ console.log({data})
56
55
  className="button-edge__label nodrag nopan"
57
56
  style={{
58
57
  transform: `translate(-50%, -50%) translate(${
59
- center[0] + (sourcePosition === "right" ? 30 : -30)
58
+ data?.isOnlyOne
59
+ ? center[0]
60
+ : center[0] + (sourcePosition === "right" ? 30 : -30)
60
61
  }px, ${targetY}px)`,
61
62
  position: "absolute",
62
63
  zIndex: 1000,