pixel-react 1.4.5 → 1.4.7
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/assets/fonts/Poppins-Bold.ttf +0 -0
- package/lib/assets/fonts/Poppins-Medium.ttf +0 -0
- package/lib/assets/fonts/Poppins-Regular.ttf +0 -0
- package/lib/assets/fonts/Poppins-SemiBold.ttf +0 -0
- package/lib/components/AllProjectsDropdown/AllProjectsDropdown.d.ts +1 -1
- package/lib/components/AllProjectsDropdown/types.d.ts +2 -0
- package/lib/components/AppHeader/types.d.ts +1 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/ActiveCell.d.ts +2 -2
- package/lib/components/ExcelFile/ExcelFile/Excel/ColumnIndicator.d.ts +2 -2
- package/lib/components/ExcelFile/ExcelFile/Excel/Copied.d.ts +1 -1
- package/lib/components/ExcelFile/ExcelFile/Excel/CornerIndicator.d.ts +2 -2
- package/lib/components/ExcelFile/ExcelFile/Excel/DataEditor.d.ts +2 -2
- package/lib/components/ExcelFile/ExcelFile/Excel/DataViewer.d.ts +2 -2
- package/lib/components/ExcelFile/ExcelFile/Excel/FloatingRect.d.ts +2 -2
- package/lib/components/ExcelFile/ExcelFile/Excel/HeaderRow.d.ts +1 -1
- package/lib/components/ExcelFile/ExcelFile/Excel/Row.d.ts +1 -1
- package/lib/components/ExcelFile/ExcelFile/Excel/RowIndicator.d.ts +2 -2
- package/lib/components/ExcelFile/ExcelFile/Excel/Selected.d.ts +1 -1
- package/lib/components/ExcelFile/ExcelFile/Excel/Spreadsheet.d.ts +6 -7
- package/lib/components/ExcelFile/ExcelFile/Excel/Table.d.ts +1 -1
- package/lib/components/ExcelFile/ExcelFile/Excel/actions.d.ts +49 -5
- package/lib/components/ExcelFile/ExcelFile/Excel/context.d.ts +3 -3
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/engine.d.ts +5 -5
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/formula.d.ts +6 -6
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/index.d.ts +2 -2
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-graph.d.ts +2 -2
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-hash.d.ts +1 -1
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-set.d.ts +1 -1
- package/lib/components/ExcelFile/ExcelFile/Excel/index.d.ts +11 -11
- package/lib/components/ExcelFile/ExcelFile/Excel/matrix.d.ts +1 -1
- package/lib/components/ExcelFile/ExcelFile/Excel/point-range.d.ts +1 -1
- package/lib/components/ExcelFile/ExcelFile/Excel/reducer.d.ts +5 -5
- package/lib/components/ExcelFile/ExcelFile/Excel/selection.d.ts +3 -3
- package/lib/components/ExcelFile/ExcelFile/Excel/types.d.ts +11 -48
- package/lib/components/ExcelFile/ExcelFile/Excel/use-dispatch.d.ts +1 -1
- package/lib/components/ExcelFile/ExcelFile/Excel/use-selector.d.ts +1 -1
- package/lib/components/ExcelFile/ExcelFile/Excel/util.d.ts +11 -12
- package/lib/components/ExcelFile/ExcelFile/ExcelFile.d.ts +16 -0
- package/lib/components/ExcelFile/ExcelSheetBar/ExcelSheetBar.d.ts +0 -3
- package/lib/components/ExcelFile/ExcelToolBar/ExcelToolBar.d.ts +12 -0
- package/lib/components/ExcelFile/Types.d.ts +2 -49
- package/lib/components/MachineInputField/types.d.ts +1 -0
- package/lib/components/MenuOption/types.d.ts +1 -1
- package/lib/components/Modal/types.d.ts +4 -2
- package/lib/components/MultiSelect/MultiSelect.stories.d.ts +0 -1
- package/lib/components/SequentialConnectingBranch/SequentialConnectingBranch.d.ts +1 -1
- package/lib/components/SequentialConnectingBranch/types.d.ts +7 -4
- package/lib/index.d.ts +19 -12
- package/lib/index.esm.js +266 -464
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +266 -464
- package/lib/index.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/utils/capitalize/capitalize.d.ts +1 -0
- package/lib/utils/getSequentialPayload/getSequentialPayload.d.ts +2 -2
- package/lib/utils/getSequentialPayload/types.d.ts +2 -4
- package/package.json +1 -1
- package/src/StyleGuide/ColorPalette/colorPaletteList.ts +82 -12
- package/src/assets/Themes/BaseTheme.scss +36 -15
- package/src/assets/Themes/DarkTheme.scss +15 -1
- package/src/assets/icons/add_file.svg +4 -13
- package/src/assets/icons/eye_open_icon.svg +10 -0
- package/src/assets/icons/hide_access_icon.svg +3 -0
- package/src/assets/icons/windows.svg +8 -4
- package/src/components/AllProjectsDropdown/AllProjectsDropdown.scss +58 -8
- package/src/components/AllProjectsDropdown/AllProjectsDropdown.stories.tsx +83 -75
- package/src/components/AllProjectsDropdown/AllProjectsDropdown.tsx +31 -18
- package/src/components/AllProjectsDropdown/types.ts +2 -0
- package/src/components/AppHeader/AppHeader.scss +2 -2
- package/src/components/AppHeader/AppHeader.stories.tsx +5 -1
- package/src/components/AppHeader/AppHeader.tsx +107 -101
- package/src/components/AppHeader/types.ts +1 -0
- package/src/components/Charts/DashboardDonutChart/DashboardDonutChart.tsx +2 -2
- package/src/components/Checkbox/Checkbox.scss +1 -1
- package/src/components/EditTextField/EditTextField.tsx +3 -5
- package/src/components/Icon/iconList.ts +4 -2
- 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.scss +24 -27
- package/src/components/MenuOption/MenuOption.stories.tsx +90 -35
- package/src/components/MenuOption/MenuOption.tsx +19 -18
- package/src/components/MenuOption/types.ts +1 -1
- package/src/components/Modal/Modal.stories.tsx +2 -2
- package/src/components/Modal/Modal.tsx +6 -2
- package/src/components/Modal/modal.scss +2 -3
- package/src/components/Modal/types.ts +4 -2
- 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/utils/capitalize/capitalize.stories.tsx +44 -0
- package/src/utils/capitalize/capitalize.tsx +4 -0
- 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
- /package/lib/components/ExcelFile/{ColorBarselector → ColorBarSelector}/ColorBarSelector.d.ts +0 -0
@@ -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>
|
@@ -4,10 +4,13 @@ export interface SequentialConnectingBranchProps {
|
|
4
4
|
machineInstances?: ExecutionContext[] | {}[];
|
5
5
|
machineColumnWidth?: number;
|
6
6
|
machineColumnCount?: number;
|
7
|
-
|
8
|
-
selectedMachine?: string; // TODO: type will change in the future
|
9
|
-
onMachineSelectionChange?: (selectedMachine: Option) => void; // TODO: function will change in the future
|
7
|
+
selectedMachine?: Option;
|
10
8
|
machineOptionsList?: Option[];
|
9
|
+
onHandleSelect?: (option: Option) => void;
|
10
|
+
onAddBrowserInstance?: () => void;
|
11
|
+
onUpdateAddBrowserInstance?: () => void;
|
12
|
+
onDeleteBrowserInstance?: (id: string, runCount: number) => void;
|
13
|
+
onAddRunBrowserInstance?: (id: string) => void;
|
11
14
|
}
|
12
15
|
|
13
16
|
// Type for machine information
|
@@ -28,7 +31,7 @@ export interface DeviceInfo {
|
|
28
31
|
export interface ExecutionContext {
|
29
32
|
id: string;
|
30
33
|
clientId: string;
|
31
|
-
|
34
|
+
numberOfRuns: number;
|
32
35
|
executionEnv?: 'Local'; // Change to specific enum if more environments exist
|
33
36
|
browserName?: 'Local' | 'mac' | 'android' | 'Google Chrome';
|
34
37
|
browserVersion: string;
|
@@ -17,7 +17,6 @@ const Tooltip: React.FC<TooltipProps> = ({
|
|
17
17
|
children,
|
18
18
|
placement = 'bottom',
|
19
19
|
disabled = false,
|
20
|
-
zIndex = 99,
|
21
20
|
}) => {
|
22
21
|
const [isVisible, setIsVisible] = useState(false);
|
23
22
|
const titleRef: TitleRef = useRef(null);
|
@@ -179,7 +178,7 @@ const Tooltip: React.FC<TooltipProps> = ({
|
|
179
178
|
createPortal(
|
180
179
|
<div
|
181
180
|
ref={titleRef}
|
182
|
-
style={{ ...styles[placement]
|
181
|
+
style={{ ...styles[placement] }}
|
183
182
|
className={classNames('ff-tooltip', currentTheme, {
|
184
183
|
'ff-tooltip--visible': isVisible,
|
185
184
|
})}
|
@@ -0,0 +1,44 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { capitalize } from './capitalize';
|
3
|
+
|
4
|
+
export default {
|
5
|
+
title: 'Utils/Capitalize', // Organize under the "Utils" category
|
6
|
+
component: capitalize,
|
7
|
+
};
|
8
|
+
|
9
|
+
export const Default = () => {
|
10
|
+
const examples = [
|
11
|
+
{ input: 'hello', output: capitalize('hello') },
|
12
|
+
{ input: 'world', output: capitalize('world') },
|
13
|
+
{ input: '', output: capitalize('') },
|
14
|
+
{ input: 'capitalize', output: capitalize('capitalize') },
|
15
|
+
];
|
16
|
+
|
17
|
+
return (
|
18
|
+
<div>
|
19
|
+
<h3>Capitalize Function Examples</h3>
|
20
|
+
<table style={{ borderCollapse: 'collapse', width: '100%' }}>
|
21
|
+
<thead>
|
22
|
+
<tr>
|
23
|
+
<th style={{ border: '1px solid black', padding: '8px' }}>Input</th>
|
24
|
+
<th style={{ border: '1px solid black', padding: '8px' }}>
|
25
|
+
Output
|
26
|
+
</th>
|
27
|
+
</tr>
|
28
|
+
</thead>
|
29
|
+
<tbody>
|
30
|
+
{examples.map((example, index) => (
|
31
|
+
<tr key={index}>
|
32
|
+
<td style={{ border: '1px solid black', padding: '8px' }}>
|
33
|
+
{example.input}
|
34
|
+
</td>
|
35
|
+
<td style={{ border: '1px solid black', padding: '8px' }}>
|
36
|
+
{example.output}
|
37
|
+
</td>
|
38
|
+
</tr>
|
39
|
+
))}
|
40
|
+
</tbody>
|
41
|
+
</table>
|
42
|
+
</div>
|
43
|
+
);
|
44
|
+
};
|
@@ -1,14 +1,11 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import type { Meta, StoryObj } from '@storybook/react';
|
3
3
|
import { getSequentialPayload } from './getSequentialPayload';
|
4
|
-
import {
|
5
|
-
SequentialMachineInstance,
|
6
|
-
MachineExecutionInstanceDataSet,
|
7
|
-
} from './types';
|
4
|
+
import { MachineExecutionInstance, SequentialMachineInstance } from './types';
|
8
5
|
import { ffid } from '../ffID/ffid';
|
9
6
|
|
10
7
|
const SequentialPayloadComponent: React.FC<{
|
11
|
-
machineInstances:
|
8
|
+
machineInstances: MachineExecutionInstance[];
|
12
9
|
}> = ({ machineInstances }) => {
|
13
10
|
const payload: SequentialMachineInstance[] =
|
14
11
|
getSequentialPayload(machineInstances);
|
@@ -1,29 +1,16 @@
|
|
1
|
-
import {
|
2
|
-
SequentialMachineInstance,
|
3
|
-
MachineExecutionInstanceDataSet,
|
4
|
-
} from './types';
|
1
|
+
import { MachineExecutionInstance, SequentialMachineInstance } from './types';
|
5
2
|
|
6
3
|
export const getSequentialPayload = (
|
7
|
-
|
4
|
+
data: MachineExecutionInstance[]
|
8
5
|
): SequentialMachineInstance[] => {
|
9
|
-
return
|
10
|
-
(
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
browserVersion: machineInstance.browserVersion,
|
19
|
-
systemUrl: machineInstance.systemUrl,
|
20
|
-
machineInfo: machineInstance.machineInfo,
|
21
|
-
deviceInfo: machineInstance.deviceInfo,
|
22
|
-
headless: machineInstance.headless,
|
23
|
-
peVariableSetId: runLevelExecutionDataSet.peVariableSetId,
|
24
|
-
globalVariableSetId: runLevelExecutionDataSet.globalVariableSetId,
|
25
|
-
testDataSetId: runLevelExecutionDataSet.testDataSetId,
|
26
|
-
})
|
27
|
-
)
|
6
|
+
return data.flatMap((item) =>
|
7
|
+
item.runLevelExecutionDataSets.map((runLevel, index) => {
|
8
|
+
const { runLevelExecutionDataSets, ...rest } = item;
|
9
|
+
return {
|
10
|
+
...rest,
|
11
|
+
...runLevel,
|
12
|
+
numberOfRuns: index + 1,
|
13
|
+
};
|
14
|
+
})
|
28
15
|
);
|
29
16
|
};
|
@@ -20,15 +20,12 @@ export interface MachineExecutionInstance {
|
|
20
20
|
systemUrl: string;
|
21
21
|
machineInfo: OperatingSystemInfo;
|
22
22
|
deviceInfo: any[];
|
23
|
-
headless: boolean;
|
24
|
-
}
|
25
|
-
|
26
|
-
export interface MachineExecutionInstanceDataSet
|
27
|
-
extends MachineExecutionInstance {
|
28
23
|
runLevelExecutionDataSets: RunLevelExecutionDataSet[];
|
24
|
+
headless: boolean;
|
29
25
|
}
|
30
26
|
|
31
|
-
export interface SequentialMachineInstance
|
27
|
+
export interface SequentialMachineInstance
|
28
|
+
extends Omit<MachineExecutionInstance, 'runLevelExecutionDataSets'> {
|
32
29
|
peVariableSetId: string;
|
33
30
|
globalVariableSetId: string;
|
34
31
|
testDataSetId: string;
|
/package/lib/components/ExcelFile/{ColorBarselector → ColorBarSelector}/ColorBarSelector.d.ts
RENAMED
File without changes
|