datastake-daf 0.6.358 → 0.6.359
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/dist/components/index.js
CHANGED
|
@@ -51038,6 +51038,7 @@ function PrimaryNode({
|
|
|
51038
51038
|
}
|
|
51039
51039
|
}), /*#__PURE__*/jsxRuntime.jsxs(Style$f, {
|
|
51040
51040
|
className: "flex",
|
|
51041
|
+
$isPdf: data?.isPdf,
|
|
51041
51042
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
51042
51043
|
className: "left flex flex-column justify-center",
|
|
51043
51044
|
style: {
|
|
@@ -51148,6 +51149,7 @@ function PrimaryNode({
|
|
|
51148
51149
|
}
|
|
51149
51150
|
const Style$f = dt.div`
|
|
51150
51151
|
width: ${MAIN_NODE_WIDTH}px;
|
|
51152
|
+
height: ${props => props.$isPdf ? `${MAIN_NODE_HEIGHT}px` : 'auto'};
|
|
51151
51153
|
display: flex;
|
|
51152
51154
|
background: white;
|
|
51153
51155
|
border-radius: 8px;
|
|
@@ -51167,7 +51169,7 @@ const Style$f = dt.div`
|
|
|
51167
51169
|
flex: 1;
|
|
51168
51170
|
|
|
51169
51171
|
.top {
|
|
51170
|
-
padding: 16px 12px;
|
|
51172
|
+
padding: ${props => props.$isPdf ? '12px 12px' : '16px 12px'};
|
|
51171
51173
|
border-bottom: 1px solid var(--base-gray-30);
|
|
51172
51174
|
|
|
51173
51175
|
span {
|
|
@@ -51194,7 +51196,7 @@ const Style$f = dt.div`
|
|
|
51194
51196
|
}
|
|
51195
51197
|
|
|
51196
51198
|
.bottom {
|
|
51197
|
-
padding: 16px;
|
|
51199
|
+
padding: ${props => props.$isPdf ? '12px' : '16px'};
|
|
51198
51200
|
display: flex;
|
|
51199
51201
|
margin-top: 6px;
|
|
51200
51202
|
margin-bottom: 6px;
|
|
@@ -52659,7 +52661,8 @@ function positionDataNodes(_ref2) {
|
|
|
52659
52661
|
total,
|
|
52660
52662
|
mainNode,
|
|
52661
52663
|
type,
|
|
52662
|
-
hasContent
|
|
52664
|
+
hasContent,
|
|
52665
|
+
isPdf = false
|
|
52663
52666
|
} = _ref2;
|
|
52664
52667
|
const DATA_NODE_WIDTH = DATA_NODE_SIZE[type].width;
|
|
52665
52668
|
const DATA_NODE_HEIGHT = DATA_NODE_SIZE[type].height;
|
|
@@ -52681,7 +52684,7 @@ function positionDataNodes(_ref2) {
|
|
|
52681
52684
|
const X_SPACE_FROM_ICON_NODE = 130;
|
|
52682
52685
|
const MIN_SPACE_REQUIRED = Y_SPACE_FROM_SIBLINGS + DATA_NODE_HEIGHT;
|
|
52683
52686
|
const totalHeight = total * MIN_SPACE_REQUIRED;
|
|
52684
|
-
const iconNodeCenterY = iconNode.position.y + ICON_NODE_HEIGHT / 2 + (hasContent ? 26.5 : type === "primaryNode" ? 15 : 16.5);
|
|
52687
|
+
const iconNodeCenterY = isPdf ? iconNode.position.y + ICON_NODE_HEIGHT / 2 : iconNode.position.y + ICON_NODE_HEIGHT / 2 + (hasContent ? 26.5 : type === "primaryNode" ? 15 : 16.5);
|
|
52685
52688
|
const startY = iconNodeCenterY - totalHeight / 2;
|
|
52686
52689
|
const END_Y = startY + totalHeight;
|
|
52687
52690
|
const yOffset = index * MIN_SPACE_REQUIRED;
|
|
@@ -52757,7 +52760,8 @@ function StakeholderMappings(_ref3) {
|
|
|
52757
52760
|
onClick: (data === null || data === void 0 ? void 0 : data.onClick) || undefined,
|
|
52758
52761
|
totalSources: data === null || data === void 0 ? void 0 : data.totalSources,
|
|
52759
52762
|
backgroundColor: (data === null || data === void 0 ? void 0 : data.backgroundColor) || "#ade9e1",
|
|
52760
|
-
iconColor: (data === null || data === void 0 ? void 0 : data.iconColor) || "#08949a"
|
|
52763
|
+
iconColor: (data === null || data === void 0 ? void 0 : data.iconColor) || "#08949a",
|
|
52764
|
+
isPdf
|
|
52761
52765
|
},
|
|
52762
52766
|
position: {
|
|
52763
52767
|
x: centerX - MAIN_NODE_WIDTH / 2,
|
|
@@ -52779,6 +52783,7 @@ function StakeholderMappings(_ref3) {
|
|
|
52779
52783
|
order: child.order,
|
|
52780
52784
|
isLeftSide: child.order % 2 !== 0,
|
|
52781
52785
|
emptyName: child.emptyName,
|
|
52786
|
+
isPdf,
|
|
52782
52787
|
onSelect: !isSelectable ? undefined : nodeId => {
|
|
52783
52788
|
if (selectedIconNodes.includes(nodeId)) {
|
|
52784
52789
|
setSelectedIconNodes(prev => prev.filter(id => id !== nodeId));
|
|
@@ -52841,7 +52846,8 @@ function StakeholderMappings(_ref3) {
|
|
|
52841
52846
|
total: 1,
|
|
52842
52847
|
mainNode,
|
|
52843
52848
|
type: "nameNode",
|
|
52844
|
-
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
|
|
52849
|
+
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,
|
|
52850
|
+
isPdf
|
|
52845
52851
|
})
|
|
52846
52852
|
}];
|
|
52847
52853
|
}
|
|
@@ -52935,7 +52941,8 @@ function StakeholderMappings(_ref3) {
|
|
|
52935
52941
|
total,
|
|
52936
52942
|
mainNode,
|
|
52937
52943
|
type: child.type || "primaryNode",
|
|
52938
|
-
hasContent: node !== null && node !== void 0 && (_node$data15 = node.data) !== null && _node$data15 !== void 0 && _node$data15.content ? true : false
|
|
52944
|
+
hasContent: node !== null && node !== void 0 && (_node$data15 = node.data) !== null && _node$data15 !== void 0 && _node$data15.content ? true : false,
|
|
52945
|
+
isPdf
|
|
52939
52946
|
})
|
|
52940
52947
|
};
|
|
52941
52948
|
});
|
package/package.json
CHANGED
|
@@ -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;
|
|
@@ -95,10 +96,11 @@ function positionDataNodes({
|
|
|
95
96
|
|
|
96
97
|
const totalHeight = total * MIN_SPACE_REQUIRED;
|
|
97
98
|
|
|
98
|
-
const iconNodeCenterY =
|
|
99
|
-
iconNode.position.y +
|
|
100
|
-
|
|
101
|
-
|
|
99
|
+
const iconNodeCenterY = isPdf
|
|
100
|
+
? iconNode.position.y + ICON_NODE_HEIGHT / 2
|
|
101
|
+
: iconNode.position.y +
|
|
102
|
+
ICON_NODE_HEIGHT / 2 +
|
|
103
|
+
(hasContent ? 26.5 : type === "primaryNode" ? 15 : 16.5);
|
|
102
104
|
const startY = iconNodeCenterY - totalHeight / 2;
|
|
103
105
|
const END_Y = startY + totalHeight;
|
|
104
106
|
|
|
@@ -183,6 +185,7 @@ function StakeholderMappings({
|
|
|
183
185
|
totalSources: data?.totalSources,
|
|
184
186
|
backgroundColor: data?.backgroundColor || "#ade9e1",
|
|
185
187
|
iconColor: data?.iconColor || "#08949a",
|
|
188
|
+
isPdf,
|
|
186
189
|
},
|
|
187
190
|
position: {
|
|
188
191
|
x: centerX - MAIN_NODE_WIDTH / 2,
|
|
@@ -206,6 +209,7 @@ function StakeholderMappings({
|
|
|
206
209
|
order: child.order,
|
|
207
210
|
isLeftSide: child.order % 2 !== 0,
|
|
208
211
|
emptyName: child.emptyName,
|
|
212
|
+
isPdf,
|
|
209
213
|
onSelect: !isSelectable
|
|
210
214
|
? undefined
|
|
211
215
|
: (nodeId) => {
|
|
@@ -285,7 +289,8 @@ function StakeholderMappings({
|
|
|
285
289
|
hasContent:
|
|
286
290
|
node?.data?.content !== undefined && node?.data?.content !== null
|
|
287
291
|
? true
|
|
288
|
-
|
|
292
|
+
: false,
|
|
293
|
+
isPdf,
|
|
289
294
|
}),
|
|
290
295
|
},
|
|
291
296
|
];
|
|
@@ -372,7 +377,7 @@ function StakeholderMappings({
|
|
|
372
377
|
|
|
373
378
|
return {
|
|
374
379
|
id: `${child.id}-${iconNodeId}`,
|
|
375
|
-
|
|
380
|
+
type: child.type || "primaryNode",
|
|
376
381
|
data: {
|
|
377
382
|
name: child.name,
|
|
378
383
|
id: child.id,
|
|
@@ -392,7 +397,8 @@ function StakeholderMappings({
|
|
|
392
397
|
total,
|
|
393
398
|
mainNode,
|
|
394
399
|
type: child.type || "primaryNode",
|
|
395
|
-
|
|
400
|
+
hasContent: node?.data?.content ? true : false,
|
|
401
|
+
isPdf,
|
|
396
402
|
}),
|
|
397
403
|
};
|
|
398
404
|
});
|
|
@@ -30,7 +30,7 @@ export default function PrimaryNode({ id, data }) {
|
|
|
30
30
|
opacity: 0,
|
|
31
31
|
}}
|
|
32
32
|
/>
|
|
33
|
-
<Style className="flex">
|
|
33
|
+
<Style className="flex" $isPdf={data?.isPdf}>
|
|
34
34
|
<div
|
|
35
35
|
className="left flex flex-column justify-center"
|
|
36
36
|
style={{
|
|
@@ -133,6 +133,7 @@ export default function PrimaryNode({ id, data }) {
|
|
|
133
133
|
|
|
134
134
|
const Style = styled.div`
|
|
135
135
|
width: ${MAIN_NODE_WIDTH}px;
|
|
136
|
+
height: ${(props) => (props.$isPdf ? `${MAIN_NODE_HEIGHT}px` : 'auto')};
|
|
136
137
|
display: flex;
|
|
137
138
|
background: white;
|
|
138
139
|
border-radius: 8px;
|
|
@@ -152,7 +153,7 @@ const Style = styled.div`
|
|
|
152
153
|
flex: 1;
|
|
153
154
|
|
|
154
155
|
.top {
|
|
155
|
-
padding: 16px 12px;
|
|
156
|
+
padding: ${(props) => (props.$isPdf ? '12px 12px' : '16px 12px')};
|
|
156
157
|
border-bottom: 1px solid var(--base-gray-30);
|
|
157
158
|
|
|
158
159
|
span {
|
|
@@ -179,7 +180,7 @@ const Style = styled.div`
|
|
|
179
180
|
}
|
|
180
181
|
|
|
181
182
|
.bottom {
|
|
182
|
-
padding: 16px;
|
|
183
|
+
padding: ${(props) => (props.$isPdf ? '12px' : '16px')};
|
|
183
184
|
display: flex;
|
|
184
185
|
margin-top: 6px;
|
|
185
186
|
margin-bottom: 6px;
|