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
@@ -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
|
})}
|
package/src/index.ts
CHANGED
@@ -52,6 +52,7 @@ import SequentialConnectingBranch from './components/SequentialConnectingBranch'
|
|
52
52
|
import AttachmentButton from './components/AttachmentButton';
|
53
53
|
import { Toastify, toast } from './components/Toastify/Toastify';
|
54
54
|
import ToggleSwitch from './components/ToggleSwitch/ToggleSwitch';
|
55
|
+
import Avatar from './components/Avatar/Avatar';
|
55
56
|
|
56
57
|
import LabelEditTextField from './components/LabelEditTextField';
|
57
58
|
import EditTextField from './components/EditTextField';
|
@@ -81,7 +82,7 @@ import MultiRadialChart from './components/Charts/MultiRadialChart';
|
|
81
82
|
import Editor from './components/Editor/Editor';
|
82
83
|
import { getSequentialPayload } from './utils/getSequentialPayload/getSequentialPayload';
|
83
84
|
import ConnectingBranch from './components/ConnectingBranch/ConnectingBranch';
|
84
|
-
import { saveFileFromBlob } from './utils/downloadFile/saveFileFromBlob'
|
85
|
+
import { saveFileFromBlob } from './utils/downloadFile/saveFileFromBlob';
|
85
86
|
|
86
87
|
export {
|
87
88
|
Button,
|
@@ -153,6 +154,7 @@ export {
|
|
153
154
|
EditTextField,
|
154
155
|
AttachImage,
|
155
156
|
ToggleSwitch,
|
157
|
+
Avatar,
|
156
158
|
// utils exports
|
157
159
|
checkEmpty,
|
158
160
|
getExtension,
|
@@ -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;
|