pixel-react 1.4.4 → 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.
Files changed (40) hide show
  1. package/.yarn/install-state.gz +0 -0
  2. package/lib/components/Editor/Editor.d.ts +1 -2
  3. package/lib/components/Editor/types.d.ts +1 -5
  4. package/lib/components/MachineInputField/types.d.ts +1 -0
  5. package/lib/components/SequentialConnectingBranch/SequentialConnectingBranch.d.ts +1 -1
  6. package/lib/components/SequentialConnectingBranch/types.d.ts +7 -4
  7. package/lib/index.d.ts +44 -17
  8. package/lib/index.esm.js +5214 -613
  9. package/lib/index.esm.js.map +1 -1
  10. package/lib/index.js +5214 -612
  11. package/lib/index.js.map +1 -1
  12. package/lib/utils/getSequentialPayload/getSequentialPayload.d.ts +2 -2
  13. package/lib/utils/getSequentialPayload/types.d.ts +2 -4
  14. package/package.json +2 -2
  15. package/src/assets/icons/add_file.svg +4 -13
  16. package/src/assets/icons/eye_open_icon.svg +10 -0
  17. package/src/assets/icons/windows.svg +8 -4
  18. package/src/components/Checkbox/Checkbox.scss +1 -1
  19. package/src/components/Editor/Editor.tsx +224 -191
  20. package/src/components/Editor/types.ts +1 -5
  21. package/src/components/Icon/iconList.ts +2 -0
  22. package/src/components/MachineInputField/MachineInputField.scss +4 -2
  23. package/src/components/MachineInputField/MachineInputField.tsx +2 -0
  24. package/src/components/MachineInputField/types.ts +1 -0
  25. package/src/components/MenuOption/MenuOption.tsx +3 -4
  26. package/src/components/MultiSelect/MultiSelect.scss +50 -45
  27. package/src/components/MultiSelect/MultiSelect.tsx +1 -1
  28. package/src/components/Select/components/Dropdown.tsx +22 -8
  29. package/src/components/SequentialConnectingBranch/SequentialConnectingBranch.scss +34 -32
  30. package/src/components/SequentialConnectingBranch/SequentialConnectingBranch.stories.tsx +34 -40
  31. package/src/components/SequentialConnectingBranch/SequentialConnectingBranch.tsx +27 -100
  32. package/src/components/SequentialConnectingBranch/components/Branches/Branches.scss +5 -5
  33. package/src/components/SequentialConnectingBranch/components/Branches/Branches.tsx +5 -3
  34. package/src/components/SequentialConnectingBranch/types.ts +7 -4
  35. package/src/components/Tooltip/Tooltip.scss +1 -0
  36. package/src/components/Tooltip/Tooltip.tsx +1 -2
  37. package/src/index.ts +3 -1
  38. package/src/utils/getSequentialPayload/getSequentialPayload.stories.tsx +2 -5
  39. package/src/utils/getSequentialPayload/getSequentialPayload.ts +11 -24
  40. 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
- machineInstance: ExecutionContext;
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
- runCount: number;
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;
@@ -18,6 +18,7 @@
18
18
  border-radius: 5px;
19
19
  padding: 6px 12px;
20
20
  opacity: 0;
21
+ z-index: 10000;
21
22
 
22
23
  &--visible {
23
24
  opacity: 1;
@@ -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], zIndex }}
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: MachineExecutionInstanceDataSet[];
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
- machineInstances: MachineExecutionInstanceDataSet[] = []
4
+ data: MachineExecutionInstance[]
8
5
  ): SequentialMachineInstance[] => {
9
- return machineInstances.flatMap(
10
- (machineInstance: MachineExecutionInstanceDataSet) =>
11
- machineInstance.runLevelExecutionDataSets.map(
12
- (runLevelExecutionDataSet) => ({
13
- id: machineInstance.id,
14
- clientId: machineInstance.clientId,
15
- numberOfRuns: machineInstance.numberOfRuns,
16
- executionEnv: machineInstance.executionEnv,
17
- browserName: machineInstance.browserName,
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 extends MachineExecutionInstance {
27
+ export interface SequentialMachineInstance
28
+ extends Omit<MachineExecutionInstance, 'runLevelExecutionDataSets'> {
32
29
  peVariableSetId: string;
33
30
  globalVariableSetId: string;
34
31
  testDataSetId: string;