pixel-react-excel-sheet 1.0.31 → 1.0.32
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/lib/components/Charts/DashboardDonutChart/types.d.ts +1 -0
- package/lib/components/ConditionalDropdown/types.d.ts +1 -1
- package/lib/components/ConnectingBranch/ConnectingBranch.d.ts +2 -1
- package/lib/components/ConnectingBranch/data.d.ts +19 -33
- package/lib/components/ConnectingBranch/types.d.ts +10 -0
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/actions.d.ts +7 -1
- package/lib/components/FileDropzone/types.d.ts +12 -4
- package/lib/components/MachineInputField/MachineInputField.d.ts +4 -1
- package/lib/components/Select/types.d.ts +1 -1
- package/lib/components/TextArea/Textarea.d.ts +1 -1
- package/lib/components/TextArea/Types.d.ts +1 -0
- package/lib/components/ThemeProvider/types.d.ts +1 -1
- package/lib/index.d.ts +88 -66
- package/lib/index.esm.js +175 -103
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +175 -103
- package/lib/index.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/utils/validateFile/validateFile.d.ts +2 -0
- package/package.json +2 -2
- package/src/assets/Themes/BaseTheme.scss +1 -0
- package/src/assets/Themes/BlueTheme.scss +279 -0
- package/src/assets/Themes/DarkTheme.scss +1 -0
- package/src/assets/Themes/Theme.scss +5 -0
- package/src/components/AppHeader/AppHeader.tsx +4 -2
- package/src/components/Charts/DashboardDonutChart/DashboardDonutChart.stories.tsx +1 -0
- package/src/components/Charts/DashboardDonutChart/DashboardDonutChart.tsx +3 -1
- package/src/components/Charts/DashboardDonutChart/types.ts +1 -0
- package/src/components/ConditionalDropdown/ConditionalDropdown.stories.tsx +1 -1
- package/src/components/ConditionalDropdown/types.ts +1 -1
- package/src/components/ConnectingBranch/BranchComponents/MachineInstances.tsx +94 -79
- package/src/components/ConnectingBranch/ConnectingBranch.scss +31 -45
- package/src/components/ConnectingBranch/ConnectingBranch.stories.tsx +33 -1
- package/src/components/ConnectingBranch/ConnectingBranch.tsx +36 -23
- package/src/components/ConnectingBranch/{data.ts → data.tsx} +106 -17
- package/src/components/ConnectingBranch/types.ts +21 -0
- package/src/components/Excel/ExcelFile/ExcelFile.tsx +1 -1
- package/src/components/Excel/ExcelFile/ExcelFileComponents/ActiveCell.tsx +7 -5
- package/src/components/Excel/ExcelFile/ExcelFileComponents/FloatingRect.tsx +6 -1
- package/src/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.scss +30 -11
- package/src/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.tsx +65 -19
- package/src/components/Excel/ExcelFile/ExcelFileComponents/actions.ts +14 -0
- package/src/components/Excel/ExcelFile/ExcelFileComponents/reducer.ts +16 -0
- package/src/components/Excel/ExcelToolBar/ExcelToolBar.tsx +6 -5
- package/src/components/FileDropzone/Dropzone.tsx +3 -0
- package/src/components/FileDropzone/FileDropzone.scss +18 -0
- package/src/components/FileDropzone/FileDropzone.stories.tsx +75 -7
- package/src/components/FileDropzone/FileDropzone.tsx +2 -0
- package/src/components/FileDropzone/RadioFilePreview.tsx +7 -3
- package/src/components/FileDropzone/types.ts +13 -4
- package/src/components/Icon/iconList.ts +2 -2
- package/src/components/InputWithDropdown/InputWithDropdown.tsx +1 -1
- package/src/components/MachineInputField/MachineInputField.tsx +67 -70
- package/src/components/Search/Search.tsx +3 -1
- package/src/components/Select/types.ts +1 -1
- package/src/components/SequentialConnectingBranch/components/Branches/Branches.scss +1 -0
- package/src/components/SequentialConnectingBranch/components/Branches/Branches.tsx +2 -8
- package/src/components/TextArea/Textarea.tsx +2 -0
- package/src/components/TextArea/Types.ts +3 -0
- package/src/components/ThemeProvider/types.ts +1 -1
- package/src/utils/validateFile/validateFile.stories.tsx +49 -0
- package/src/utils/validateFile/validateFile.ts +39 -0
- package/src/components/SequentialConnectingBranch/components/AddBrowserModal/AddBrowserModal.scss +0 -51
- package/src/components/SequentialConnectingBranch/components/AddBrowserModal/AddBrowserModal.tsx +0 -107
- package/src/components/SequentialConnectingBranch/components/AddBrowserModal/types.ts +0 -5
- package/src/components/SequentialConnectingBranch/components/DatasetListModal/DatasetListModal.scss +0 -31
- package/src/components/SequentialConnectingBranch/components/DatasetListModal/DatasetListModal.tsx +0 -85
- package/src/components/SequentialConnectingBranch/components/DatasetListModal/types.ts +0 -4
- /package/src/assets/icons/{impactList.svg → impact_list.svg} +0 -0
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import Button from '../../Button';
|
|
2
1
|
import Typography from '../../Typography';
|
|
3
2
|
import { indexType, MachineData, MachineInstancesProps } from '../types';
|
|
4
3
|
|
|
5
4
|
const MachineInstances: React.FC<MachineInstancesProps> = ({
|
|
5
|
+
getChildNodeComponent,
|
|
6
|
+
parentNode,
|
|
6
7
|
data,
|
|
7
8
|
verticalLineHeight,
|
|
8
9
|
datasetHeight,
|
|
@@ -20,106 +21,120 @@ const MachineInstances: React.FC<MachineInstancesProps> = ({
|
|
|
20
21
|
<div className="ff-right-icon"></div>
|
|
21
22
|
</div>
|
|
22
23
|
</div>
|
|
23
|
-
<div className="ff-machine-instance">
|
|
24
|
-
|
|
25
|
-
className="ff-add-browser-device"
|
|
26
|
-
variant="secondary"
|
|
27
|
-
label="Add Machine"
|
|
28
|
-
/>
|
|
24
|
+
<div className="ff-machine-instance ff-machine-env-button">
|
|
25
|
+
{getChildNodeComponent(true, data, parentNode)}
|
|
29
26
|
</div>
|
|
30
27
|
</>
|
|
31
28
|
) : (
|
|
32
|
-
data?.machineInstances?.map(
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
className="ff-machine-instance-row"
|
|
37
|
-
key={instance.clientId || idx}
|
|
38
|
-
>
|
|
29
|
+
data?.machineInstances?.map(
|
|
30
|
+
(instance: MachineData, machineInstanceIndex: indexType) => {
|
|
31
|
+
const isFirstLine = machineInstanceIndex === 0;
|
|
32
|
+
return (
|
|
39
33
|
<div
|
|
40
|
-
className=
|
|
41
|
-
|
|
42
|
-
}`}
|
|
34
|
+
className="ff-machine-instance-row"
|
|
35
|
+
key={instance.clientId || machineInstanceIndex}
|
|
43
36
|
>
|
|
44
|
-
<div
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
className="ff-
|
|
52
|
-
|
|
53
|
-
></div>
|
|
54
|
-
)}
|
|
55
|
-
</div>
|
|
37
|
+
<div
|
|
38
|
+
className={`ff-selectedMachines-connecting-line ${
|
|
39
|
+
!isFirstLine ? 'ff-second-line' : ''
|
|
40
|
+
}`}
|
|
41
|
+
>
|
|
42
|
+
<div className="ff-line">
|
|
43
|
+
<div className="ff-left-icon"></div>
|
|
44
|
+
<div className="ff-right-icon"></div>
|
|
45
|
+
</div>
|
|
56
46
|
|
|
57
|
-
|
|
58
|
-
{instance.runLevelExecutionDataSets.map(
|
|
59
|
-
(dataSet: MachineData, index: indexType) => (
|
|
47
|
+
{isFirstLine && (
|
|
60
48
|
<div
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
49
|
+
className="ff-vertical-line"
|
|
50
|
+
style={{ height: `${verticalLineHeight}px` }}
|
|
51
|
+
></div>
|
|
52
|
+
)}
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
<div className="ff-machine-instance">
|
|
56
|
+
{instance.runLevelExecutionDataSets.map(
|
|
57
|
+
(
|
|
58
|
+
dataSet: MachineData,
|
|
59
|
+
runLevelExecutionDataIndex: indexType
|
|
60
|
+
) => (
|
|
65
61
|
<div
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
ref={
|
|
62
|
+
key={runLevelExecutionDataIndex}
|
|
63
|
+
className="ff-run-level-execution-dataset"
|
|
64
|
+
ref={
|
|
65
|
+
runLevelExecutionDataIndex === 0 ? datasetRef : null
|
|
66
|
+
}
|
|
69
67
|
>
|
|
70
68
|
<div
|
|
71
|
-
className="ff-
|
|
72
|
-
|
|
69
|
+
className="ff-execution-item"
|
|
70
|
+
key={dataSet.executionDataSetId}
|
|
71
|
+
ref={(element) =>
|
|
72
|
+
(itemRefs.current[runLevelExecutionDataIndex] =
|
|
73
|
+
element)
|
|
74
|
+
}
|
|
73
75
|
>
|
|
74
76
|
<div
|
|
75
|
-
className=
|
|
76
|
-
style={{
|
|
77
|
-
height: `${curveHeights[index]}px`,
|
|
78
|
-
}}
|
|
77
|
+
className="ff-curved-connector"
|
|
78
|
+
style={{ top: `${-datasetHeight}px` }}
|
|
79
79
|
>
|
|
80
80
|
<div
|
|
81
|
-
className={`ff-curve
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
81
|
+
className={`ff-curve ff-connector-${runLevelExecutionDataIndex}`}
|
|
82
|
+
style={{
|
|
83
|
+
height: `${curveHeights[runLevelExecutionDataIndex]}px`,
|
|
84
|
+
}}
|
|
85
|
+
>
|
|
86
|
+
<div
|
|
87
|
+
className={`ff-curve-right-icon ff-curve-right-icon-${runLevelExecutionDataIndex}`}
|
|
88
|
+
></div>
|
|
89
|
+
{dataSet?.runScriptCount && (
|
|
90
|
+
<div className="ff-selectedMachines-connecting-line-text">
|
|
91
|
+
<Typography fontSize={8} fontWeight="regular">
|
|
92
|
+
{dataSet.runScriptCount} Script
|
|
93
|
+
</Typography>
|
|
94
|
+
</div>
|
|
95
|
+
)}
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
|
|
99
|
+
<div className="ff-run-data-box">
|
|
100
|
+
{getChildNodeComponent(
|
|
101
|
+
false,
|
|
102
|
+
instance,
|
|
103
|
+
machineInstanceIndex,
|
|
104
|
+
dataSet,
|
|
105
|
+
runLevelExecutionDataIndex,
|
|
106
|
+
parentNode
|
|
89
107
|
)}
|
|
90
108
|
</div>
|
|
91
109
|
</div>
|
|
110
|
+
</div>
|
|
111
|
+
)
|
|
112
|
+
)}
|
|
113
|
+
</div>
|
|
92
114
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
115
|
+
{machineInstanceIndex === data.machineInstances.length - 1 && (
|
|
116
|
+
<>
|
|
117
|
+
<div className="ff-selectedMachines-connecting-line ff-second-line">
|
|
118
|
+
<div className="ff-line">
|
|
119
|
+
<div className="ff-left-icon"></div>
|
|
120
|
+
<div className="ff-right-icon"></div>
|
|
96
121
|
</div>
|
|
97
122
|
</div>
|
|
98
|
-
)
|
|
99
|
-
)}
|
|
100
|
-
</div>
|
|
101
123
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
124
|
+
<div className="ff-machine-instance ff-machine-env-button">
|
|
125
|
+
{getChildNodeComponent(
|
|
126
|
+
true,
|
|
127
|
+
data,
|
|
128
|
+
parentNode,
|
|
129
|
+
machineInstanceIndex + 1
|
|
130
|
+
)}
|
|
108
131
|
</div>
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
label="Browser/Devices"
|
|
116
|
-
/>
|
|
117
|
-
</div>
|
|
118
|
-
</>
|
|
119
|
-
)}
|
|
120
|
-
</div>
|
|
121
|
-
);
|
|
122
|
-
})
|
|
132
|
+
</>
|
|
133
|
+
)}
|
|
134
|
+
</div>
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
)
|
|
123
138
|
)}
|
|
124
139
|
</>
|
|
125
140
|
);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
.ff-grid-container {
|
|
2
2
|
display: grid;
|
|
3
|
-
grid-template-columns: 1fr
|
|
4
|
-
padding: 24px 0;
|
|
3
|
+
grid-template-columns: 1fr 1.5fr 0.8fr 5fr;
|
|
5
4
|
grid-auto-rows: auto;
|
|
6
5
|
|
|
7
6
|
.ff-selectedMachines {
|
|
@@ -14,9 +13,9 @@
|
|
|
14
13
|
}
|
|
15
14
|
|
|
16
15
|
.ff-input-box-container {
|
|
17
|
-
|
|
16
|
+
margin-bottom: 24px;
|
|
17
|
+
border-radius: 4px;
|
|
18
18
|
width: 100%;
|
|
19
|
-
height: 32px;
|
|
20
19
|
}
|
|
21
20
|
|
|
22
21
|
.ff-machine-instance-row {
|
|
@@ -73,7 +72,7 @@
|
|
|
73
72
|
}
|
|
74
73
|
.ff-vertical-line {
|
|
75
74
|
position: absolute;
|
|
76
|
-
left:
|
|
75
|
+
left: 24px;
|
|
77
76
|
top: 0;
|
|
78
77
|
width: 1px;
|
|
79
78
|
height: auto;
|
|
@@ -83,18 +82,17 @@
|
|
|
83
82
|
|
|
84
83
|
.ff-machine-instance {
|
|
85
84
|
grid-column: 4 / 5;
|
|
86
|
-
|
|
87
|
-
.ff-add-browser-device {
|
|
88
|
-
margin-bottom: 16px;
|
|
89
|
-
}
|
|
90
85
|
}
|
|
91
|
-
|
|
86
|
+
.ff-machine-env-button {
|
|
87
|
+
padding: 4px 0;
|
|
88
|
+
margin-bottom: 16px;
|
|
89
|
+
}
|
|
92
90
|
.ff-selectedMachines-connecting-line {
|
|
93
|
-
margin-top:
|
|
91
|
+
margin-top: 16px;
|
|
94
92
|
}
|
|
95
93
|
|
|
96
94
|
.ff-selectedMachines-connecting-line.ff-no-instance-line {
|
|
97
|
-
margin-top:
|
|
95
|
+
margin-top: 16px;
|
|
98
96
|
}
|
|
99
97
|
|
|
100
98
|
.ff-selectedMachines-connecting-line.ff-no-instance-line .ff-line {
|
|
@@ -104,30 +102,8 @@
|
|
|
104
102
|
position: relative;
|
|
105
103
|
}
|
|
106
104
|
|
|
107
|
-
.ff-selectedMachines-connecting-line.ff-no-instance-line
|
|
108
|
-
.ff-selectedMachines-connecting-line-text {
|
|
109
|
-
position: absolute;
|
|
110
|
-
top: -10px;
|
|
111
|
-
left: 50%;
|
|
112
|
-
transform: translateX(-50%);
|
|
113
|
-
background-color: var(--brand-color);
|
|
114
|
-
color: var(--tooltip-text-color);
|
|
115
|
-
font-weight: bold;
|
|
116
|
-
font-size: 8px;
|
|
117
|
-
padding: 4px;
|
|
118
|
-
border-radius: 12px;
|
|
119
|
-
text-align: center;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.ff-run-level-execution-dataset p {
|
|
123
|
-
margin: 0;
|
|
124
|
-
font-size: 12px;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
105
|
.ff-run-level-execution-dataset {
|
|
128
|
-
|
|
129
|
-
max-width: 600px;
|
|
130
|
-
border: 1px solid var(--description-text); //Todo: will remove once components integrate
|
|
106
|
+
height: 66px;
|
|
131
107
|
margin-bottom: 8px;
|
|
132
108
|
border-radius: 4px;
|
|
133
109
|
margin-bottom: 16px;
|
|
@@ -135,14 +111,14 @@
|
|
|
135
111
|
|
|
136
112
|
.ff-curved-connector {
|
|
137
113
|
position: absolute;
|
|
138
|
-
left: -
|
|
114
|
+
left: -70px;
|
|
139
115
|
transform: translateX(-50%);
|
|
140
116
|
width: 40px;
|
|
141
117
|
height: 0;
|
|
142
118
|
|
|
143
119
|
.ff-curve {
|
|
144
120
|
position: relative;
|
|
145
|
-
width:
|
|
121
|
+
width: 80px;
|
|
146
122
|
height: 0;
|
|
147
123
|
border: 1px dashed var(--brand-color);
|
|
148
124
|
border-top: none;
|
|
@@ -157,7 +133,7 @@
|
|
|
157
133
|
border-top: 4px solid transparent;
|
|
158
134
|
border-bottom: 4px solid transparent;
|
|
159
135
|
border-left: 8px solid var(--brand-color);
|
|
160
|
-
margin-left:
|
|
136
|
+
margin-left: 81px;
|
|
161
137
|
position: absolute;
|
|
162
138
|
bottom: -4px;
|
|
163
139
|
}
|
|
@@ -165,7 +141,7 @@
|
|
|
165
141
|
.ff-selectedMachines-connecting-line-text {
|
|
166
142
|
position: absolute;
|
|
167
143
|
left: 50%;
|
|
168
|
-
top:
|
|
144
|
+
top: 75px;
|
|
169
145
|
transform: translateX(-50%);
|
|
170
146
|
background-color: var(--brand-color);
|
|
171
147
|
color: var(--tooltip-text-color);
|
|
@@ -179,8 +155,8 @@
|
|
|
179
155
|
}
|
|
180
156
|
|
|
181
157
|
.ff-connector-0 {
|
|
182
|
-
bottom: 8px;
|
|
183
158
|
border: none;
|
|
159
|
+
bottom: 3px;
|
|
184
160
|
}
|
|
185
161
|
|
|
186
162
|
.ff-curve-right-icon-0 {
|
|
@@ -191,11 +167,6 @@
|
|
|
191
167
|
|
|
192
168
|
.ff-select-machine-input {
|
|
193
169
|
grid-column: 2 / 3;
|
|
194
|
-
|
|
195
|
-
input {
|
|
196
|
-
width: 430px;
|
|
197
|
-
height: 32px;
|
|
198
|
-
}
|
|
199
170
|
}
|
|
200
171
|
|
|
201
172
|
.ff-grid-item.ff-dynamic-item {
|
|
@@ -231,3 +202,18 @@
|
|
|
231
202
|
}
|
|
232
203
|
}
|
|
233
204
|
}
|
|
205
|
+
|
|
206
|
+
// Styles for stories
|
|
207
|
+
.ff-parent-node-container {
|
|
208
|
+
border: 1px solid green;
|
|
209
|
+
height: 30px;
|
|
210
|
+
border-radius: 10px;
|
|
211
|
+
padding: 2px;
|
|
212
|
+
}
|
|
213
|
+
.ff-child-node-container {
|
|
214
|
+
border: 1px solid red;
|
|
215
|
+
height: 40px;
|
|
216
|
+
width: 300px;
|
|
217
|
+
border-radius: 10px;
|
|
218
|
+
padding: 8px;
|
|
219
|
+
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
3
|
import ConnectingBranch from './ConnectingBranch';
|
|
3
4
|
import machineData from './data';
|
|
5
|
+
import Button from '../Button/Button';
|
|
6
|
+
|
|
4
7
|
const meta: Meta<typeof ConnectingBranch> = {
|
|
5
8
|
title: 'Components/ConnectingBranch',
|
|
6
9
|
component: ConnectingBranch,
|
|
@@ -14,8 +17,37 @@ export default meta;
|
|
|
14
17
|
|
|
15
18
|
type Story = StoryObj<typeof ConnectingBranch>;
|
|
16
19
|
|
|
20
|
+
const getChildNodeComponent = (isButton: boolean) => {
|
|
21
|
+
if (isButton) {
|
|
22
|
+
return (
|
|
23
|
+
<div>
|
|
24
|
+
{' '}
|
|
25
|
+
<Button variant="primary" label="Add execution Env" />
|
|
26
|
+
</div>
|
|
27
|
+
);
|
|
28
|
+
} else {
|
|
29
|
+
return (
|
|
30
|
+
<div className="ff-child-node-container"> Execution Env details</div>
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const getParentNodeComponentActionItems = () => {
|
|
36
|
+
return <div> Machine Action Items</div>;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
const getParentNodeComponent = (isMultiSelect: boolean) => (
|
|
40
|
+
<div className="ff-parent-node-container">
|
|
41
|
+
{' '}
|
|
42
|
+
{isMultiSelect ? 'MultiSelect' : 'Select'} DropDown
|
|
43
|
+
</div>
|
|
44
|
+
);
|
|
45
|
+
|
|
17
46
|
export const Default: Story = {
|
|
18
47
|
args: {
|
|
19
|
-
machineData,
|
|
48
|
+
data: machineData,
|
|
49
|
+
getParentNodeComponent,
|
|
50
|
+
getParentNodeComponentActionItems,
|
|
51
|
+
getChildNodeComponent,
|
|
20
52
|
},
|
|
21
53
|
};
|
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
import React, { useEffect, useRef, useState } from 'react';
|
|
2
2
|
import './ConnectingBranch.scss';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
ConnectBranchProps,
|
|
5
|
+
MachineData,
|
|
6
|
+
MachineInstance,
|
|
7
|
+
indexType,
|
|
8
|
+
} from './types';
|
|
4
9
|
import { ArcherContainer, ArcherElement } from 'react-archer';
|
|
5
10
|
import MachineInstances from './BranchComponents/MachineInstances';
|
|
6
11
|
import Typography from '../Typography';
|
|
7
12
|
|
|
8
|
-
const ConnectingBranch: React.FC = ({
|
|
13
|
+
const ConnectingBranch: React.FC<ConnectBranchProps> = ({
|
|
14
|
+
data: machineData,
|
|
15
|
+
getChildNodeComponent,
|
|
16
|
+
getParentNodeComponent,
|
|
17
|
+
getParentNodeComponentActionItems,
|
|
18
|
+
childNodeCurveHeight = 1.28,
|
|
19
|
+
}) => {
|
|
9
20
|
const datasetRef = useRef<HTMLDivElement | null>(null);
|
|
10
21
|
const [datasetHeight, setDatasetHeight] = useState<number>(0);
|
|
11
22
|
const [curveHeights, setCurveHeights] = useState<number[]>([]);
|
|
@@ -31,7 +42,7 @@ const ConnectingBranch: React.FC = ({ machineData }: MachineData) => {
|
|
|
31
42
|
const calculateCurveHeight = () => {
|
|
32
43
|
const heights = itemRefs.current.map((_, index) => {
|
|
33
44
|
if (index === 0) return 0;
|
|
34
|
-
return datasetHeight *
|
|
45
|
+
return datasetHeight * childNodeCurveHeight;
|
|
35
46
|
});
|
|
36
47
|
setCurveHeights(heights);
|
|
37
48
|
};
|
|
@@ -90,7 +101,7 @@ const ConnectingBranch: React.FC = ({ machineData }: MachineData) => {
|
|
|
90
101
|
{/* Show ff-script-count-box only for the middle index */}
|
|
91
102
|
{((!isOddMachineCount && index === middleIndex) ||
|
|
92
103
|
(isOddMachineCount && index === 0)) && (
|
|
93
|
-
<ArcherElement id="
|
|
104
|
+
<ArcherElement id="rootNode">
|
|
94
105
|
<div
|
|
95
106
|
className="ff-grid-item ff-dynamic-item"
|
|
96
107
|
style={{
|
|
@@ -123,29 +134,33 @@ const ConnectingBranch: React.FC = ({ machineData }: MachineData) => {
|
|
|
123
134
|
}}
|
|
124
135
|
>
|
|
125
136
|
<div className="ff-selectedMachines-input">
|
|
126
|
-
<
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
{
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
137
|
+
<div className="ff-input-box-container">
|
|
138
|
+
<ArcherElement
|
|
139
|
+
id={`parentnode${index}`}
|
|
140
|
+
key={index}
|
|
141
|
+
relations={[
|
|
142
|
+
{
|
|
143
|
+
targetId: 'rootNode',
|
|
144
|
+
targetAnchor: 'left',
|
|
145
|
+
sourceAnchor: 'left',
|
|
146
|
+
},
|
|
147
|
+
]}
|
|
148
|
+
>
|
|
138
149
|
{/* Todo: here we will add select dropdown */}
|
|
139
|
-
|
|
140
|
-
|
|
150
|
+
{getParentNodeComponent(false, machine, index)}
|
|
151
|
+
</ArcherElement>
|
|
152
|
+
{getParentNodeComponentActionItems(machine, index)}
|
|
153
|
+
</div>
|
|
141
154
|
</div>
|
|
142
155
|
<MachineInstances
|
|
156
|
+
parentNode={index}
|
|
143
157
|
data={machine}
|
|
144
158
|
verticalLineHeight={verticalLineHeight}
|
|
145
159
|
datasetHeight={datasetHeight}
|
|
146
160
|
curveHeights={curveHeights}
|
|
147
161
|
itemRefs={itemRefs}
|
|
148
162
|
datasetRef={datasetRef}
|
|
163
|
+
getChildNodeComponent={getChildNodeComponent}
|
|
149
164
|
/>
|
|
150
165
|
</div>
|
|
151
166
|
</React.Fragment>
|
|
@@ -160,18 +175,16 @@ const ConnectingBranch: React.FC = ({ machineData }: MachineData) => {
|
|
|
160
175
|
}}
|
|
161
176
|
>
|
|
162
177
|
<ArcherElement
|
|
163
|
-
id="
|
|
178
|
+
id="lastNode"
|
|
164
179
|
relations={[
|
|
165
180
|
{
|
|
166
|
-
targetId: '
|
|
181
|
+
targetId: 'rootNode',
|
|
167
182
|
targetAnchor: 'left',
|
|
168
183
|
sourceAnchor: 'left',
|
|
169
184
|
},
|
|
170
185
|
]}
|
|
171
186
|
>
|
|
172
|
-
<div
|
|
173
|
-
{/* Todo: here we will add multi select dropdown */}
|
|
174
|
-
</div>
|
|
187
|
+
<div>{getParentNodeComponent(true)}</div>
|
|
175
188
|
</ArcherElement>
|
|
176
189
|
</div>
|
|
177
190
|
</div>
|