pixel-react 1.4.4 → 1.4.6
Sign up to get free protection for your applications and to get access to all the features.
- package/.yarn/install-state.gz +0 -0
- package/lib/components/Editor/Editor.d.ts +1 -2
- package/lib/components/Editor/types.d.ts +1 -5
- package/lib/components/MachineInputField/types.d.ts +1 -0
- package/lib/components/SequentialConnectingBranch/SequentialConnectingBranch.d.ts +1 -1
- package/lib/components/SequentialConnectingBranch/types.d.ts +7 -4
- package/lib/index.d.ts +44 -17
- package/lib/index.esm.js +5214 -613
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +5214 -612
- package/lib/index.js.map +1 -1
- package/lib/utils/getSequentialPayload/getSequentialPayload.d.ts +2 -2
- package/lib/utils/getSequentialPayload/types.d.ts +2 -4
- package/package.json +2 -2
- package/src/assets/icons/add_file.svg +4 -13
- package/src/assets/icons/eye_open_icon.svg +10 -0
- package/src/assets/icons/windows.svg +8 -4
- package/src/components/Checkbox/Checkbox.scss +1 -1
- package/src/components/Editor/Editor.tsx +224 -191
- package/src/components/Editor/types.ts +1 -5
- package/src/components/Icon/iconList.ts +2 -0
- package/src/components/MachineInputField/MachineInputField.scss +4 -2
- package/src/components/MachineInputField/MachineInputField.tsx +2 -0
- package/src/components/MachineInputField/types.ts +1 -0
- package/src/components/MenuOption/MenuOption.tsx +3 -4
- package/src/components/MultiSelect/MultiSelect.scss +50 -45
- package/src/components/MultiSelect/MultiSelect.tsx +1 -1
- package/src/components/Select/components/Dropdown.tsx +22 -8
- package/src/components/SequentialConnectingBranch/SequentialConnectingBranch.scss +34 -32
- package/src/components/SequentialConnectingBranch/SequentialConnectingBranch.stories.tsx +34 -40
- package/src/components/SequentialConnectingBranch/SequentialConnectingBranch.tsx +27 -100
- package/src/components/SequentialConnectingBranch/components/Branches/Branches.scss +5 -5
- package/src/components/SequentialConnectingBranch/components/Branches/Branches.tsx +5 -3
- package/src/components/SequentialConnectingBranch/types.ts +7 -4
- package/src/components/Tooltip/Tooltip.scss +1 -0
- package/src/components/Tooltip/Tooltip.tsx +1 -2
- package/src/index.ts +3 -1
- package/src/utils/getSequentialPayload/getSequentialPayload.stories.tsx +2 -5
- package/src/utils/getSequentialPayload/getSequentialPayload.ts +11 -24
- package/src/utils/getSequentialPayload/types.ts +3 -6
@@ -70,7 +70,7 @@ const OptionCard = ({
|
|
70
70
|
};
|
71
71
|
case 'down':
|
72
72
|
return {
|
73
|
-
top: menuPosition.bottom,
|
73
|
+
top: menuPosition.bottom - 5,
|
74
74
|
left: menuPosition.rightSpaceAvailable + 12,
|
75
75
|
};
|
76
76
|
case 'left':
|
@@ -131,13 +131,12 @@ const MenuOption = ({
|
|
131
131
|
fromBottom: 0,
|
132
132
|
rightSpaceAvailable: 0,
|
133
133
|
});
|
134
|
-
|
135
|
-
calculateDims();
|
136
|
-
});
|
134
|
+
|
137
135
|
const closeDropDown = () => setIsClicked(false);
|
138
136
|
|
139
137
|
const onIconClickHandler = () => {
|
140
138
|
onClick();
|
139
|
+
calculateDims();
|
141
140
|
setIsClicked((prev) => !prev);
|
142
141
|
};
|
143
142
|
|
@@ -79,59 +79,64 @@
|
|
79
79
|
top: -6px;
|
80
80
|
pointer-events: none;
|
81
81
|
}
|
82
|
-
.ff-multiselect-chip-container
|
82
|
+
.ff-multiselect-chip-parent-container{
|
83
|
+
width: 100%;
|
83
84
|
display: flex;
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
85
|
+
justify-content: space-between;
|
86
|
+
.ff-multiselect-chip-container {
|
87
|
+
display: flex;
|
88
|
+
flex-wrap: wrap;
|
89
|
+
align-items: center;
|
90
|
+
gap: 5px;
|
91
|
+
.ff-multiselect-chip {
|
92
|
+
@include flex-center;
|
93
|
+
box-sizing: border-box;
|
94
|
+
border: 0.5px solid #f1ebf2;
|
95
|
+
padding: 0 1px 0 4px;
|
96
|
+
gap: 4px;
|
97
|
+
height: 16px;
|
98
|
+
border-radius: 15px;
|
99
|
+
.ff-multiselect-chip-label {
|
100
|
+
@extend .fontXs;
|
101
|
+
line-height: 14px;
|
102
|
+
color: var(--tooltip-bg-color);
|
103
|
+
&.label-padding {
|
104
|
+
padding: 5px 2px;
|
105
|
+
}
|
106
|
+
}
|
107
|
+
.ff-multiselect-chip-close-icon {
|
108
|
+
color: var(--brand-color);
|
109
|
+
cursor: pointer;
|
101
110
|
}
|
102
111
|
}
|
103
|
-
.ff-multiselect-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
border: none;
|
118
|
-
font-size: 12px;
|
119
|
-
&:focus {
|
120
|
-
outline: none;
|
112
|
+
.ff-multiselect-input-container {
|
113
|
+
flex: 1;
|
114
|
+
min-width: 20px;
|
115
|
+
input {
|
116
|
+
width: 100%;
|
117
|
+
min-width: 30px;
|
118
|
+
max-width: calc(100% - 0px);
|
119
|
+
padding: 2px;
|
120
|
+
box-sizing: border-box;
|
121
|
+
border: none;
|
122
|
+
font-size: 12px;
|
123
|
+
&:focus {
|
124
|
+
outline: none;
|
125
|
+
}
|
121
126
|
}
|
122
127
|
}
|
123
128
|
}
|
129
|
+
.ff-multiselect-more-chip {
|
130
|
+
display: flex;
|
131
|
+
align-items: center;
|
132
|
+
width: 16px;
|
133
|
+
@extend .fontSm;
|
134
|
+
font-weight: 600;
|
135
|
+
line-height: 16px;
|
136
|
+
color: var(--brand-color);
|
137
|
+
}
|
124
138
|
}
|
125
139
|
}
|
126
|
-
.ff-multiselect-more-chip {
|
127
|
-
display: flex;
|
128
|
-
align-items: center;
|
129
|
-
width: 16px;
|
130
|
-
@extend .fontSm;
|
131
|
-
font-weight: 600;
|
132
|
-
line-height: 16px;
|
133
|
-
color: var(--brand-color);
|
134
|
-
}
|
135
140
|
&__toggle {
|
136
141
|
display: flex;
|
137
142
|
align-items: center;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { type FC, useContext, useRef } from 'react';
|
1
|
+
import React, { type FC, useContext, useRef } from 'react';
|
2
2
|
import { dropdownDefaultCSSData, DropdownProps } from './types';
|
3
3
|
import './Dropdown.scss';
|
4
4
|
import { checkEmpty } from '../../../utils/checkEmpty/checkEmpty';
|
@@ -65,6 +65,23 @@ const Dropdown: FC<DropdownProps> = ({
|
|
65
65
|
};
|
66
66
|
};
|
67
67
|
|
68
|
+
const getOptionLabel = (label: any) => {
|
69
|
+
if (React.isValidElement(label)) {
|
70
|
+
console.log('test');
|
71
|
+
return label;
|
72
|
+
}
|
73
|
+
console.log('test112');
|
74
|
+
return (
|
75
|
+
<Typography
|
76
|
+
as="div"
|
77
|
+
lineHeight="30px"
|
78
|
+
color="var(--ff-select-text-color)"
|
79
|
+
>
|
80
|
+
{label}
|
81
|
+
</Typography>
|
82
|
+
);
|
83
|
+
};
|
84
|
+
|
68
85
|
return (
|
69
86
|
<div
|
70
87
|
className={classNames('ff-select-dropdown-wrapper', currentTheme)}
|
@@ -73,10 +90,7 @@ const Dropdown: FC<DropdownProps> = ({
|
|
73
90
|
>
|
74
91
|
{!checkEmpty(options) ? (
|
75
92
|
options.map((option) => (
|
76
|
-
<
|
77
|
-
key={ffid()}
|
78
|
-
as="div"
|
79
|
-
lineHeight="30px"
|
93
|
+
<div
|
80
94
|
className={classNames(
|
81
95
|
'ff-select-dropdown-option',
|
82
96
|
{
|
@@ -85,14 +99,14 @@ const Dropdown: FC<DropdownProps> = ({
|
|
85
99
|
},
|
86
100
|
currentTheme
|
87
101
|
)}
|
88
|
-
|
102
|
+
key={ffid()}
|
89
103
|
onClick={() => {
|
90
104
|
if ('disable' in option && option['disable']) return;
|
91
105
|
onSelectOptionSelector(option);
|
92
106
|
}}
|
93
107
|
>
|
94
|
-
{getLabel(option, labelAccessor)}
|
95
|
-
</
|
108
|
+
{getOptionLabel(getLabel(option, labelAccessor))}
|
109
|
+
</div>
|
96
110
|
))
|
97
111
|
) : (
|
98
112
|
<Typography
|
@@ -1,3 +1,23 @@
|
|
1
|
+
@mixin item-center {
|
2
|
+
display: flex;
|
3
|
+
align-items: center;
|
4
|
+
}
|
5
|
+
|
6
|
+
@mixin circle($size, $color) {
|
7
|
+
width: $size;
|
8
|
+
height: $size;
|
9
|
+
border-radius: 50%;
|
10
|
+
background-color: $color;
|
11
|
+
}
|
12
|
+
|
13
|
+
@mixin arrow($color, $width, $height) {
|
14
|
+
width: $width;
|
15
|
+
height: $height;
|
16
|
+
background-color: $color;
|
17
|
+
clip-path: polygon(100% 50%, 0 100%, 0 0);
|
18
|
+
position: absolute;
|
19
|
+
}
|
20
|
+
|
1
21
|
.ff-sequential-connecting-branch-wrapper {
|
2
22
|
.ff-connecting-select-branch-wrapper {
|
3
23
|
height: 66px;
|
@@ -15,40 +35,29 @@
|
|
15
35
|
}
|
16
36
|
|
17
37
|
.ff-select-branch-arrow {
|
38
|
+
@include item-center;
|
18
39
|
position: relative;
|
19
|
-
display: flex;
|
20
|
-
align-items: center;
|
21
40
|
|
22
41
|
.ff-branch-arrow-wrapper {
|
42
|
+
margin: 0;
|
23
43
|
width: 40px;
|
24
44
|
border-top: 1px solid var(--ff-connecting-branch-color);
|
25
|
-
margin-top: 4px;
|
26
45
|
position: relative;
|
27
46
|
|
28
47
|
.ff-branch-arrow {
|
29
|
-
|
30
|
-
height: 6px;
|
31
|
-
background-color: var(--ff-connecting-branch-color);
|
32
|
-
clip-path: polygon(100% 50%, 0 100%, 0 0);
|
33
|
-
position: absolute;
|
48
|
+
@include arrow(var(--ff-connecting-branch-color), 6px, 6px);
|
34
49
|
right: -1px;
|
35
50
|
top: -3px;
|
36
51
|
}
|
37
52
|
}
|
38
53
|
|
39
54
|
.ff-select-branch-point {
|
40
|
-
|
41
|
-
height: 5px;
|
42
|
-
border-radius: 50%;
|
43
|
-
background-color: var(--ff-connecting-branch-color);
|
55
|
+
@include circle(5px, var(--ff-connecting-branch-color));
|
44
56
|
position: absolute;
|
45
57
|
left: -3px;
|
46
58
|
z-index: 102;
|
47
59
|
top: 50%;
|
48
|
-
|
49
|
-
|
50
|
-
.branch-button {
|
51
|
-
margin-top: 4px;
|
60
|
+
transform: translateY(-50%);
|
52
61
|
}
|
53
62
|
}
|
54
63
|
|
@@ -57,21 +66,19 @@
|
|
57
66
|
height: 38px;
|
58
67
|
|
59
68
|
.ff-select-branch-point {
|
69
|
+
@include circle(5px, var(--ff-connecting-branch-color));
|
60
70
|
position: absolute;
|
61
|
-
height: 5px;
|
62
|
-
width: 5px;
|
63
|
-
background-color: var(--ff-connecting-branch-color);
|
64
|
-
border-radius: 50%;
|
65
|
-
top: 50%;
|
66
71
|
left: -2px;
|
67
72
|
z-index: 102;
|
73
|
+
top: 50%;
|
74
|
+
transform: translateY(-50%);
|
68
75
|
}
|
69
76
|
|
70
77
|
.ff-select-branch-arrow {
|
71
|
-
width:
|
78
|
+
width: 0;
|
72
79
|
height: 62px;
|
73
80
|
top: calc(50% + 1px);
|
74
|
-
border-left: 1px solid
|
81
|
+
border-left: 1px solid var(--ff-connecting-branch-color);
|
75
82
|
z-index: 102;
|
76
83
|
}
|
77
84
|
}
|
@@ -80,21 +87,16 @@
|
|
80
87
|
.ff-select-scope-datalist {
|
81
88
|
box-sizing: border-box;
|
82
89
|
width: 240px;
|
83
|
-
margin-top: 4px;
|
84
|
-
padding: 0px 4px;
|
85
90
|
display: flex;
|
86
91
|
justify-content: space-between;
|
87
92
|
|
88
93
|
.ff-scope-wrapper {
|
89
|
-
|
90
|
-
|
91
|
-
.ff-scope-text {
|
92
|
-
margin-left: 4px;
|
93
|
-
}
|
94
|
+
@include item-center;
|
95
|
+
margin-right: 12px;
|
94
96
|
}
|
95
97
|
|
96
98
|
.ff-datalist-wrapper {
|
97
|
-
|
99
|
+
@include item-center;
|
98
100
|
|
99
101
|
.ff-dataset-icon,
|
100
102
|
.ff-run-delete-icon,
|
@@ -103,7 +105,7 @@
|
|
103
105
|
}
|
104
106
|
|
105
107
|
.ff-datalist-text {
|
106
|
-
margin:
|
108
|
+
margin: 0 12px 0 0;
|
107
109
|
}
|
108
110
|
}
|
109
111
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react';
|
2
2
|
import SequentialConnectingBranch from './SequentialConnectingBranch';
|
3
|
-
import {
|
3
|
+
import { useState } from 'react';
|
4
4
|
|
5
5
|
const meta: Meta<typeof SequentialConnectingBranch> = {
|
6
6
|
title: 'Components/SequentialConnectingBranch',
|
@@ -14,48 +14,42 @@ const meta: Meta<typeof SequentialConnectingBranch> = {
|
|
14
14
|
type Story = StoryObj<typeof SequentialConnectingBranch>;
|
15
15
|
|
16
16
|
export const Primary: Story = {
|
17
|
-
|
18
|
-
|
17
|
+
render: () => {
|
18
|
+
const machineList = [
|
19
19
|
{
|
20
|
-
|
21
|
-
|
22
|
-
clientId: 'flinko-client-win-98ddb98f-2349-43ce-869e-c2d5350741a4',
|
23
|
-
executionEnv: 'Local',
|
24
|
-
browserName: 'Google Chrome',
|
25
|
-
browserVersion: '111.0.5563.112',
|
26
|
-
systemUrl: '',
|
27
|
-
machineInfo: {
|
28
|
-
osName: 'Windows 11 Pro',
|
29
|
-
osVersion: '10.0.22621',
|
30
|
-
hostName: 'TYSS-Kumuda',
|
31
|
-
},
|
32
|
-
deviceInfo: [],
|
33
|
-
headless: false,
|
34
|
-
peVariableSetId: 'UUID',
|
35
|
-
globalVariableSetId: 'UUID',
|
36
|
-
testDataSetId: 'UUID',
|
20
|
+
label: 'FFE 123',
|
21
|
+
value: 'FFE 123',
|
37
22
|
},
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
osVersion: '10.0.22621',
|
50
|
-
hostName: 'TYSS-Kumuda',
|
23
|
+
{
|
24
|
+
label: 'FFE 234',
|
25
|
+
value: 'FFE 234',
|
26
|
+
},
|
27
|
+
{
|
28
|
+
label: 'FFE 345',
|
29
|
+
value: 'FFE 345',
|
30
|
+
},
|
31
|
+
{
|
32
|
+
label: 'FFE 456',
|
33
|
+
value: 'FFE 456',
|
51
34
|
},
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
35
|
+
];
|
36
|
+
const [selectedMachine, setSelectedMachine] = useState({});
|
37
|
+
const [machineInstances, setMachineInstances] = useState<any>([]);
|
38
|
+
return (
|
39
|
+
<>
|
40
|
+
<SequentialConnectingBranch
|
41
|
+
machineOptionsList={machineList}
|
42
|
+
machineInstances={machineInstances}
|
43
|
+
selectedMachine={selectedMachine}
|
44
|
+
onHandleSelect={(option) => {
|
45
|
+
setSelectedMachine(option);
|
46
|
+
}}
|
47
|
+
onAddBrowserInstance={() => {
|
48
|
+
setMachineInstances([...machineInstances, {}]);
|
49
|
+
}}
|
50
|
+
/>
|
51
|
+
</>
|
52
|
+
);
|
59
53
|
},
|
60
54
|
};
|
61
55
|
|
@@ -7,102 +7,36 @@ import Typography from '../Typography';
|
|
7
7
|
import './SequentialConnectingBranch.scss';
|
8
8
|
import { useEffect, useRef, useState } from 'react';
|
9
9
|
import ConnectingBranches from './components/ConnectingBranches/ConnectingBranches';
|
10
|
-
import DatasetListModal from './components/DatasetListModal/DatasetListModal';
|
11
|
-
import AddBrowserModal from './components/AddBrowserModal/AddBrowserModal';
|
12
10
|
import { ExecutionContext, SequentialConnectingBranchProps } from './types';
|
13
|
-
import { Option } from '../Select/types';
|
14
|
-
import { ffid } from '../../utils/ffID/ffid';
|
15
11
|
|
16
12
|
const SequentialConnectingBranch = ({
|
17
13
|
machineInstances = [],
|
18
14
|
machineColumnWidth = 180,
|
19
15
|
machineColumnCount = 1,
|
20
|
-
|
21
|
-
selectedMachine = '',
|
16
|
+
selectedMachine = {},
|
22
17
|
machineOptionsList = [],
|
23
|
-
|
18
|
+
onHandleSelect = () => {},
|
19
|
+
onAddBrowserInstance = () => {},
|
20
|
+
onAddRunBrowserInstance = () => {},
|
21
|
+
onDeleteBrowserInstance = () => {},
|
24
22
|
}: SequentialConnectingBranchProps) => {
|
25
23
|
const dataListRef = useRef<HTMLButtonElement>(null);
|
26
24
|
const selectButtonRef = useRef<HTMLButtonElement>(null);
|
27
25
|
const defaultMachineColumnCount = Math.max(machineColumnCount, 1);
|
28
26
|
const defaultMachineColumnWidth = Math.max(machineColumnWidth, 180);
|
29
27
|
|
30
|
-
const isBrowserDetails = checkEmpty(machineInstances);
|
31
|
-
const [datasetListModal, setDatasetListModal] = useState(
|
32
|
-
!!selectedMachine && isBrowserDetails
|
33
|
-
);
|
34
|
-
const [addBrowserModal, setAddBrowserModal] = useState(false);
|
35
28
|
const [machineBranchInstances, setMachineBranchInstances] = useState<
|
36
29
|
ExecutionContext[] | {}[]
|
37
|
-
>(
|
38
|
-
|
39
|
-
// TODO: DEMO PURPOSE AND WILL BE REMOVED IN THE FUTURE
|
40
|
-
const onHandleSelect = (option: Option) => {
|
41
|
-
setDatasetListModal(true);
|
42
|
-
onMachineSelectionChange(option);
|
43
|
-
};
|
44
|
-
|
45
|
-
// TODO: DEMO PURPOSE AND WILL BE REMOVED IN THE FUTURE
|
46
|
-
const onUpdateDatasetList = () => {
|
47
|
-
setDatasetListModal(false);
|
48
|
-
setAddBrowserModal(true);
|
49
|
-
};
|
50
|
-
|
51
|
-
// TODO: DEMO PURPOSE AND WILL BE REMOVED IN THE FUTURE
|
52
|
-
const onUpdateAddBrowser = () => {
|
53
|
-
setAddBrowserModal(false);
|
54
|
-
setDatasetListModal(false);
|
55
|
-
};
|
56
|
-
|
57
|
-
// TODO: DEMO PURPOSE AND WILL BE REMOVED IN THE FUTURE
|
58
|
-
const onAddBrowser = () => {
|
59
|
-
const newMachineInstance = { ...machineInstance, id: ffid() };
|
60
|
-
setMachineBranchInstances((prevInstances) => [
|
61
|
-
...prevInstances.slice(0, -1),
|
62
|
-
newMachineInstance,
|
63
|
-
{},
|
64
|
-
]);
|
65
|
-
};
|
66
|
-
|
67
|
-
// TODO: DEMO PURPOSE AND WILL BE REMOVED IN THE FUTURE
|
68
|
-
const onDeleteBrowser = (id: string, runCount: number) => {
|
69
|
-
const machineInstance = machineBranchInstances.filter((instance) => {
|
70
|
-
if ('id' in instance && 'runCount' in instance) {
|
71
|
-
return instance.id !== id || instance.runCount !== runCount;
|
72
|
-
}
|
73
|
-
return true;
|
74
|
-
});
|
75
|
-
setMachineBranchInstances(machineInstance);
|
76
|
-
};
|
77
|
-
|
78
|
-
// TODO: DEMO PURPOSE AND WILL BE REMOVED IN THE FUTURE
|
79
|
-
const onAddRunBrowser = (id: string) => {
|
80
|
-
const index = machineBranchInstances.findLastIndex(
|
81
|
-
(instance) => 'id' in instance && instance.id === id
|
82
|
-
);
|
30
|
+
>([]);
|
83
31
|
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
if (existingMachineInstance && 'runCount' in existingMachineInstance) {
|
88
|
-
const newRunInstance = {
|
89
|
-
...existingMachineInstance,
|
90
|
-
runCount: (existingMachineInstance.runCount ?? 0) + 1,
|
91
|
-
};
|
92
|
-
|
93
|
-
setMachineBranchInstances((prevInstances) => [
|
94
|
-
...prevInstances.slice(0, index + 1),
|
95
|
-
newRunInstance,
|
96
|
-
...prevInstances.slice(index + 1),
|
97
|
-
]);
|
98
|
-
}
|
99
|
-
}
|
100
|
-
};
|
32
|
+
const isMachineInstances = checkEmpty(machineInstances);
|
33
|
+
const isMachineSelected = checkEmpty(selectedMachine);
|
101
34
|
|
102
35
|
useEffect(() => {
|
103
|
-
setMachineBranchInstances([...
|
104
|
-
}, []);
|
105
|
-
|
36
|
+
setMachineBranchInstances([...machineInstances, {}]);
|
37
|
+
}, [machineInstances]);
|
38
|
+
console.log(machineInstances, 'machineInstances');
|
39
|
+
console.log(machineBranchInstances, 'machineBranchInstances');
|
106
40
|
return (
|
107
41
|
<div className="ff-sequential-connecting-branch-wrapper">
|
108
42
|
<div className="ff-connecting-select-branch-wrapper">
|
@@ -114,21 +48,25 @@ const SequentialConnectingBranch = ({
|
|
114
48
|
label="Choose Machine"
|
115
49
|
showLabel={true}
|
116
50
|
className="ff-sequential-select-branch"
|
51
|
+
width={'240px'}
|
52
|
+
selectedOption={selectedMachine}
|
53
|
+
valueAccessor={'name'}
|
117
54
|
/>
|
118
|
-
{
|
119
|
-
{!!selectedMachine && (
|
55
|
+
{!isMachineSelected && (
|
120
56
|
<div
|
121
57
|
className={classNames({
|
122
|
-
'ff-select-branch-arrow':
|
123
|
-
'ff-select-branch-arrow-down': !
|
58
|
+
'ff-select-branch-arrow': isMachineInstances,
|
59
|
+
'ff-select-branch-arrow-down': !isMachineInstances,
|
124
60
|
})}
|
125
61
|
>
|
126
62
|
<div className="ff-select-branch-point"></div>
|
127
63
|
<div className="ff-select-branch-arrow">
|
128
64
|
<div className="ff-branch-arrow-wrapper">
|
129
|
-
{
|
65
|
+
{isMachineInstances && (
|
66
|
+
<div className="ff-branch-arrow"></div>
|
67
|
+
)}
|
130
68
|
</div>
|
131
|
-
{
|
69
|
+
{isMachineInstances && (
|
132
70
|
<>
|
133
71
|
<Button
|
134
72
|
variant="tertiary"
|
@@ -136,12 +74,7 @@ const SequentialConnectingBranch = ({
|
|
136
74
|
size="small"
|
137
75
|
className="branch-button"
|
138
76
|
ref={selectButtonRef}
|
139
|
-
onClick={
|
140
|
-
/>
|
141
|
-
|
142
|
-
<AddBrowserModal
|
143
|
-
ref={selectButtonRef}
|
144
|
-
onUpdateAddBrowser={onUpdateAddBrowser}
|
77
|
+
onClick={onAddBrowserInstance}
|
145
78
|
/>
|
146
79
|
</>
|
147
80
|
)}
|
@@ -168,12 +101,6 @@ const SequentialConnectingBranch = ({
|
|
168
101
|
className="ff-dataset-icon"
|
169
102
|
ref={dataListRef}
|
170
103
|
/>
|
171
|
-
{datasetListModal && (
|
172
|
-
<DatasetListModal
|
173
|
-
ref={dataListRef}
|
174
|
-
onUpdateDatasetList={onUpdateDatasetList}
|
175
|
-
/>
|
176
|
-
)}
|
177
104
|
<Typography
|
178
105
|
as="span"
|
179
106
|
fontSize={12}
|
@@ -191,14 +118,14 @@ const SequentialConnectingBranch = ({
|
|
191
118
|
</div>
|
192
119
|
</div>
|
193
120
|
<div className="ff-sequential-branches-wrapper">
|
194
|
-
{!
|
121
|
+
{!isMachineInstances && (
|
195
122
|
<ConnectingBranches
|
196
123
|
machineBranchInstances={machineBranchInstances}
|
197
124
|
machineColumnCount={defaultMachineColumnCount}
|
198
125
|
machineColumnWidth={defaultMachineColumnWidth}
|
199
|
-
onAddBrowser={
|
200
|
-
onDeleteBrowser={
|
201
|
-
onAddRunBrowser={
|
126
|
+
onAddBrowser={onAddBrowserInstance}
|
127
|
+
onDeleteBrowser={onDeleteBrowserInstance}
|
128
|
+
onAddRunBrowser={onAddRunBrowserInstance}
|
202
129
|
/>
|
203
130
|
)}
|
204
131
|
</div>
|
@@ -40,14 +40,14 @@
|
|
40
40
|
@mixin branch-arrow(
|
41
41
|
$clip: polygon(0 0, 0% 100%, 100% 50%),
|
42
42
|
$horizontal-pos: right,
|
43
|
-
$offset: -
|
43
|
+
$offset: -2px
|
44
44
|
) {
|
45
45
|
position: absolute;
|
46
46
|
height: 5px;
|
47
47
|
width: 5px;
|
48
48
|
background-color: var(--ff-connecting-branch-color);
|
49
49
|
clip-path: $clip;
|
50
|
-
top: calc(25% -
|
50
|
+
top: calc(25% - 3px);
|
51
51
|
#{$horizontal-pos}: $offset;
|
52
52
|
z-index: 2;
|
53
53
|
}
|
@@ -138,12 +138,12 @@
|
|
138
138
|
}
|
139
139
|
|
140
140
|
.ff-connecting-branch-point-reverse {
|
141
|
-
@include branch-point($position: left, $offset: -
|
141
|
+
@include branch-point($position: left, $offset: -2px);
|
142
142
|
}
|
143
143
|
}
|
144
144
|
|
145
145
|
.ff-connecting-branch-middle-arrow {
|
146
|
-
height:
|
146
|
+
height: 0;
|
147
147
|
width: 100%;
|
148
148
|
margin-top: calc(50% - 3px);
|
149
149
|
position: relative;
|
@@ -180,5 +180,5 @@
|
|
180
180
|
|
181
181
|
.ff-connecting-branch-grid-reverse {
|
182
182
|
direction: rtl;
|
183
|
-
margin:
|
183
|
+
margin: 0 0 16px 0;
|
184
184
|
}
|
@@ -91,7 +91,9 @@ const Branches = ({
|
|
91
91
|
executionEnv = 'Local',
|
92
92
|
browserName = 'Local',
|
93
93
|
browserVersion = '1',
|
94
|
-
|
94
|
+
numberOfRuns = 'numberOfRuns' in machineInstance
|
95
|
+
? machineInstance.numberOfRuns
|
96
|
+
: 0,
|
95
97
|
id = '',
|
96
98
|
} = machineInstance as ExecutionContext;
|
97
99
|
return (
|
@@ -107,7 +109,7 @@ const Branches = ({
|
|
107
109
|
></div>
|
108
110
|
<MachineInputField
|
109
111
|
width={`${machineColumnWidth}px`}
|
110
|
-
runCount={
|
112
|
+
runCount={numberOfRuns}
|
111
113
|
key={ffid()}
|
112
114
|
options={[
|
113
115
|
{ label: executionEnv, type: executionEnv },
|
@@ -144,7 +146,7 @@ const Branches = ({
|
|
144
146
|
<Icon
|
145
147
|
name="delete"
|
146
148
|
className="ff-connecting-delete-icon"
|
147
|
-
onClick={() => onDeleteBrowser(id,
|
149
|
+
onClick={() => onDeleteBrowser(id, numberOfRuns)}
|
148
150
|
color="var(--ff-connecting-branch-delete-color)"
|
149
151
|
/>
|
150
152
|
</div>
|