pixel-react 1.4.5 → 1.4.6
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/.yarn/install-state.gz +0 -0
- 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/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 +12 -10
- package/lib/index.esm.js +200 -427
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +200 -427
- 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/Charts/DashboardDonutChart/DashboardDonutChart.tsx +2 -2
- package/src/components/Checkbox/Checkbox.scss +1 -1
- 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/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/StyleGuide/ColorPalette/ColorPalette.stories.d.ts +0 -6
- package/lib/StyleGuide/Typography/Typography.stories.d.ts +0 -6
- package/lib/components/Accordion/Accordion.stories.d.ts +0 -6
- package/lib/components/AddButton/AddButton.d.ts +0 -5
- package/lib/components/AddButton/AddButton.stories.d.ts +0 -6
- package/lib/components/AddButton/index.d.ts +0 -1
- package/lib/components/AddButton/types.d.ts +0 -4
- package/lib/components/AddResourceButton/AddButton.stories.d.ts +0 -8
- package/lib/components/AllProjectsDropdown/AllProjectsDropdown.stories.d.ts +0 -7
- package/lib/components/AppHeader/AppHeader.stories.d.ts +0 -7
- package/lib/components/AttachImage/AttachImage.stories.d.ts +0 -7
- package/lib/components/AttachmentButton/AttachmentButton.stories.d.ts +0 -9
- package/lib/components/Avatar/Avatar.stories.d.ts +0 -10
- package/lib/components/Button/Button.stories.d.ts +0 -13
- package/lib/components/Charts/BarChart/BarChart.stories.d.ts +0 -6
- package/lib/components/Charts/DashboardDonutChart/DashboardDonutChart.stories.d.ts +0 -7
- package/lib/components/Charts/DonutChart/DonutChart.stories.d.ts +0 -6
- package/lib/components/Charts/IconRadialChart/IconRadialChart.stories.d.ts +0 -8
- package/lib/components/Charts/LineChart/LineChart.stories.d.ts +0 -7
- package/lib/components/Charts/MultiRadialChart/MultiRadialChart.stories.d.ts +0 -8
- package/lib/components/Charts/PieChart/PieChart.stories.d.ts +0 -7
- package/lib/components/Charts/RadialChart/RadialChart.stories.d.ts +0 -6
- package/lib/components/Checkbox/Checkbox.stories.d.ts +0 -8
- package/lib/components/Chip/Chip.stories.d.ts +0 -14
- package/lib/components/ConnectingBranch/ConnectingBranch.stories.d.ts +0 -6
- package/lib/components/DatePicker/DatePicker.stories.d.ts +0 -9
- package/lib/components/DragAndDrop/DragAndDrop.stories.d.ts +0 -6
- package/lib/components/Drawer/Drawer.stories.d.ts +0 -12
- package/lib/components/EditTextField/EditTextField.stories.d.ts +0 -10
- package/lib/components/Editor/Editor.stories.d.ts +0 -6
- package/lib/components/Excel/ExcelFile.stories.d.ts +0 -6
- package/lib/components/ExcelFile/ChangeExcelStyles.d.ts +0 -14
- package/lib/components/ExcelFile/ColorBarselector/ColorBarSelector.d.ts +0 -8
- package/lib/components/ExcelFile/ContextMenu/ContextMenu.d.ts +0 -4
- package/lib/components/ExcelFile/ExcelFile/Excel/ActiveCell.d.ts +0 -7
- package/lib/components/ExcelFile/ExcelFile/Excel/Cell.d.ts +0 -4
- package/lib/components/ExcelFile/ExcelFile/Excel/ColumnIndicator.d.ts +0 -5
- package/lib/components/ExcelFile/ExcelFile/Excel/Copied.d.ts +0 -3
- package/lib/components/ExcelFile/ExcelFile/Excel/CornerIndicator.d.ts +0 -5
- package/lib/components/ExcelFile/ExcelFile/Excel/DataEditor.d.ts +0 -5
- package/lib/components/ExcelFile/ExcelFile/Excel/DataViewer.d.ts +0 -8
- package/lib/components/ExcelFile/ExcelFile/Excel/FloatingRect.d.ts +0 -10
- package/lib/components/ExcelFile/ExcelFile/Excel/HeaderRow.d.ts +0 -3
- package/lib/components/ExcelFile/ExcelFile/Excel/Row.d.ts +0 -3
- package/lib/components/ExcelFile/ExcelFile/Excel/RowIndicator.d.ts +0 -5
- package/lib/components/ExcelFile/ExcelFile/Excel/Selected.d.ts +0 -3
- package/lib/components/ExcelFile/ExcelFile/Excel/Spreadsheet.d.ts +0 -81
- package/lib/components/ExcelFile/ExcelFile/Excel/Table.d.ts +0 -3
- package/lib/components/ExcelFile/ExcelFile/Excel/actions.d.ts +0 -130
- package/lib/components/ExcelFile/ExcelFile/Excel/areModelsEqual.d.ts +0 -1
- package/lib/components/ExcelFile/ExcelFile/Excel/context.d.ts +0 -8
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/engine.d.ts +0 -22
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/formula.d.ts +0 -17
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/index.d.ts +0 -2
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-graph.d.ts +0 -21
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-hash.d.ts +0 -3
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-set.d.ts +0 -24
- package/lib/components/ExcelFile/ExcelFile/Excel/index.d.ts +0 -13
- package/lib/components/ExcelFile/ExcelFile/Excel/matrix.d.ts +0 -67
- package/lib/components/ExcelFile/ExcelFile/Excel/point-range.d.ts +0 -22
- package/lib/components/ExcelFile/ExcelFile/Excel/point.d.ts +0 -11
- package/lib/components/ExcelFile/ExcelFile/Excel/reducer.d.ts +0 -27
- package/lib/components/ExcelFile/ExcelFile/Excel/selection.d.ts +0 -95
- package/lib/components/ExcelFile/ExcelFile/Excel/types.d.ts +0 -215
- package/lib/components/ExcelFile/ExcelFile/Excel/use-dispatch.d.ts +0 -3
- package/lib/components/ExcelFile/ExcelFile/Excel/use-selector.d.ts +0 -3
- package/lib/components/ExcelFile/ExcelFile/Excel/util.d.ts +0 -45
- package/lib/components/ExcelFile/ExcelFile/ExcelFile.d.ts +0 -3
- package/lib/components/ExcelFile/ExcelFile.stories.d.ts +0 -6
- package/lib/components/ExcelFile/ExcelSheetBar/ExcelSheetBar.d.ts +0 -15
- package/lib/components/ExcelFile/ExcelToolBar/ExcelToolBar.d.ts +0 -3
- package/lib/components/ExcelFile/ImportExcelStyles.d.ts +0 -24
- package/lib/components/ExcelFile/Types.d.ts +0 -176
- package/lib/components/ExcelFile/index.d.ts +0 -1
- package/lib/components/ExpandableMenu/ExpandableMenu.stories.d.ts +0 -7
- package/lib/components/FF_Captcha/captcha.stories.d.ts +0 -8
- package/lib/components/FileDropzone/FileDropzone.stories.d.ts +0 -8
- package/lib/components/Form/Form.stories.d.ts +0 -7
- package/lib/components/GridLayout/GridLayout.stories.d.ts +0 -8
- package/lib/components/HighlightText/HighlightText.stories.d.ts +0 -6
- package/lib/components/Icon/Icon.stories.d.ts +0 -8
- package/lib/components/IconButton/IconButton.stories.d.ts +0 -7
- package/lib/components/IconRadioGroup/IconRadioGroup.stories.d.ts +0 -7
- package/lib/components/Input/Input.stories.d.ts +0 -9
- package/lib/components/InputWithDropdown/InputWithDropdown.stories.d.ts +0 -9
- package/lib/components/LabelEditTextField/LabelEditTextField.stories.d.ts +0 -13
- package/lib/components/LazyLoad/LazyLoad.stories.d.ts +0 -6
- package/lib/components/MachineInputField/MachineInputField.stories.d.ts +0 -6
- package/lib/components/MenuOption/MenuOption.stories.d.ts +0 -16
- package/lib/components/MiniModal/MiniModal.stories.d.ts +0 -10
- package/lib/components/Modal/Modal.stories.d.ts +0 -7
- package/lib/components/ModulesChip/ModuleChip.stories.d.ts +0 -6
- package/lib/components/MultiSelect/MultiSelect.stories.d.ts +0 -12
- package/lib/components/NLPInput/NlpInput.stories.d.ts +0 -7
- package/lib/components/Paper/Paper.stories.d.ts +0 -11
- package/lib/components/RadioButton/RadioButton.stories.d.ts +0 -10
- package/lib/components/RadioGroup/RadioGroup.stories.d.ts +0 -9
- package/lib/components/Search/Search.stories.d.ts +0 -6
- package/lib/components/Select/Select.stories.d.ts +0 -14
- package/lib/components/Select/components/Dropdown/Dropdown.d.ts +0 -4
- package/lib/components/Select/components/Dropdown/dropdownTypes.d.ts +0 -17
- package/lib/components/SequentialConnectingBranch/SequentialConnectingBranch.stories.d.ts +0 -6
- package/lib/components/StateDropdown/StateDropdown.stories.d.ts +0 -10
- package/lib/components/StatusButton/StatusButton.stories.d.ts +0 -14
- package/lib/components/StatusCard/StatusCard.stories.d.ts +0 -11
- package/lib/components/Table/Table.stories.d.ts +0 -13
- package/lib/components/TableTree/TableTree.stories.d.ts +0 -7
- package/lib/components/Tabs/Tabs.stories.d.ts +0 -9
- package/lib/components/TextArea/Textarea.stories.d.ts +0 -9
- package/lib/components/Toast/Toast.stories.d.ts +0 -6
- package/lib/components/Toastify/Toastify.stories.d.ts +0 -6
- package/lib/components/Toggle/Toggle.stories.d.ts +0 -12
- package/lib/components/Tooltip/Tooltip.stories.d.ts +0 -15
- package/lib/components/Typography/Typography.stories.d.ts +0 -10
- package/lib/components/VariableInput/VariableInput.stories.d.ts +0 -6
- package/lib/utils/checkEmpty/checkEmpty.stories.d.ts +0 -6
- package/lib/utils/compareArrays/compareArrays.stories.d.ts +0 -6
- package/lib/utils/compareObjects/compareObjects.stories.d.ts +0 -6
- package/lib/utils/debounce/debounce.stories.d.ts +0 -6
- package/lib/utils/ffID/ffID.stories.d.ts +0 -6
- package/lib/utils/find/findAndInsert.d.ts +0 -7
- package/lib/utils/find/findAndInsert.stories.d.ts +0 -7
- package/lib/utils/findAndInsert/findAndInsert.stories.d.ts +0 -7
- package/lib/utils/getEncryptedData/getEncryptedData.stories.d.ts +0 -6
- package/lib/utils/getExtension/getExtension.stories.d.ts +0 -6
- package/lib/utils/getSequentialPayload/getSequentialPayload.stories.d.ts +0 -10
- package/lib/utils/throttle/throttle.stories.d.ts +0 -6
- package/lib/utils/truncateText/truncateText.stories.d.ts +0 -6
|
@@ -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
|
})}
|
|
@@ -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;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './AddButton';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import AddButton from './AddButton';
|
|
3
|
-
declare const meta: Meta<typeof AddButton>;
|
|
4
|
-
type Story = StoryObj<typeof AddButton>;
|
|
5
|
-
export declare const Default: Story;
|
|
6
|
-
export declare const TwoArrowsButtons: Story;
|
|
7
|
-
export declare const ThreeArrowsButton: Story;
|
|
8
|
-
export default meta;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import AllProjectsDropdown from './AllProjectsDropdown';
|
|
3
|
-
declare const meta: Meta<typeof AllProjectsDropdown>;
|
|
4
|
-
type Story = StoryObj<typeof AllProjectsDropdown>;
|
|
5
|
-
export declare const Default: Story;
|
|
6
|
-
export declare const PrimaryIconButton: Story;
|
|
7
|
-
export default meta;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import AppHeader from './AppHeader';
|
|
3
|
-
declare const meta: Meta<typeof AppHeader>;
|
|
4
|
-
type Story = StoryObj<typeof AppHeader>;
|
|
5
|
-
export declare const SampleAppHeader: Story;
|
|
6
|
-
export declare const Controlled: Story;
|
|
7
|
-
export default meta;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import AttachImage from './AttachImage';
|
|
3
|
-
import { AttachImageProps } from './types';
|
|
4
|
-
declare const meta: Meta<typeof AttachImage>;
|
|
5
|
-
export default meta;
|
|
6
|
-
type Story = StoryObj<AttachImageProps>;
|
|
7
|
-
export declare const Default: Story;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import AttachmentButton from './AttachmentButton';
|
|
3
|
-
declare const meta: Meta<typeof AttachmentButton>;
|
|
4
|
-
type Story = StoryObj<typeof AttachmentButton>;
|
|
5
|
-
export declare const Default: Story;
|
|
6
|
-
export declare const SmallFileLimit: Story;
|
|
7
|
-
export declare const LargeFileLimit: Story;
|
|
8
|
-
export declare const DisabledUploader: Story;
|
|
9
|
-
export default meta;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import Avatar from './Avatar';
|
|
3
|
-
declare const meta: Meta<typeof Avatar>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof meta>;
|
|
6
|
-
export declare const Small: Story;
|
|
7
|
-
export declare const Medium: Story;
|
|
8
|
-
export declare const Large: Story;
|
|
9
|
-
export declare const CustomAvatarSize: Story;
|
|
10
|
-
export declare const CustomIconSize: Story;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import Button from './Button';
|
|
3
|
-
declare const meta: Meta<typeof Button>;
|
|
4
|
-
type Story = StoryObj<typeof Button>;
|
|
5
|
-
export declare const Primary: Story;
|
|
6
|
-
export declare const Secondary: Story;
|
|
7
|
-
export declare const Tertiary: Story;
|
|
8
|
-
export declare const Delete: Story;
|
|
9
|
-
export declare const Warning: Story;
|
|
10
|
-
export declare const PrimaryWithIcon: Story;
|
|
11
|
-
export declare const SecondaryWithIcon: Story;
|
|
12
|
-
export declare const TertiaryWithIcon: Story;
|
|
13
|
-
export default meta;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react/*';
|
|
2
|
-
import DashboardDonutChart from './DashboardDonutChart';
|
|
3
|
-
declare const meta: Meta<typeof DashboardDonutChart>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof DashboardDonutChart>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const MemoryLegend: Story;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import IconRadialChart from './IconRadialChart';
|
|
3
|
-
declare const meta: Meta<typeof IconRadialChart>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof IconRadialChart>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const Mobile: Story;
|
|
8
|
-
export declare const WithoutIcon: Story;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import LineChart from './LineChart';
|
|
3
|
-
import { LineChartProps } from './types';
|
|
4
|
-
declare const meta: Meta<typeof LineChart>;
|
|
5
|
-
export default meta;
|
|
6
|
-
export declare const DefaultLineChart: StoryObj<LineChartProps>;
|
|
7
|
-
export declare const StatusLineChart: StoryObj<LineChartProps>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import MultiRadialChart from './MultiRadialChart';
|
|
3
|
-
declare const meta: Meta<typeof MultiRadialChart>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof MultiRadialChart>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const numberLegend: Story;
|
|
8
|
-
export declare const PillLegend: Story;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import PieChart from './PieChart';
|
|
3
|
-
declare const meta: Meta<typeof PieChart>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof PieChart>;
|
|
6
|
-
export declare const PieChartDashBoard: Story;
|
|
7
|
-
export declare const PieChartDashBoardWithBorder: Story;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import Checkbox from './Checkbox';
|
|
3
|
-
declare const meta: Meta<typeof Checkbox>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof meta>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const Partial: Story;
|
|
8
|
-
export declare const Controlled: Story;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import Chip from './Chip';
|
|
3
|
-
import '../../assets/styles/_colors.scss';
|
|
4
|
-
import './Chip.scss';
|
|
5
|
-
declare const meta: Meta<typeof Chip>;
|
|
6
|
-
type Story = StoryObj<typeof Chip>;
|
|
7
|
-
export declare const Primary: Story;
|
|
8
|
-
export declare const withoutExpand: Story;
|
|
9
|
-
export declare const Group: Story;
|
|
10
|
-
export declare const CustomChip: Story;
|
|
11
|
-
export declare const Success: Story;
|
|
12
|
-
export declare const Errors: Story;
|
|
13
|
-
export declare const Warning: Story;
|
|
14
|
-
export default meta;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import ConnectingBranch from './ConnectingBranch';
|
|
3
|
-
declare const meta: Meta<typeof ConnectingBranch>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof ConnectingBranch>;
|
|
6
|
-
export declare const Default: Story;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import CustomDatePicker from './DatePicker';
|
|
3
|
-
declare const meta: Meta<typeof CustomDatePicker>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof CustomDatePicker>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const StartDateFilter: Story;
|
|
8
|
-
export declare const EndDateInput: Story;
|
|
9
|
-
export declare const ScheduleDateInput: Story;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import Drawer from './Drawer';
|
|
3
|
-
declare const meta: Meta<typeof Drawer>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof Drawer>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const WithoutHeader: Story;
|
|
8
|
-
export declare const WithCustomHeader: Story;
|
|
9
|
-
export declare const WithCustomFooter: Story;
|
|
10
|
-
export declare const WithTertiaryButtons: Story;
|
|
11
|
-
export declare const WithCustomZIndex: Story;
|
|
12
|
-
export declare const Controlled: Story;
|