pixel-react 1.1.3 → 1.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (116) hide show
  1. package/.yarn/install-state.gz +0 -0
  2. package/lib/components/AddButton/AddButton.d.ts +5 -0
  3. package/lib/components/AddButton/AddButton.stories.d.ts +6 -0
  4. package/lib/components/AddButton/index.d.ts +1 -0
  5. package/lib/components/AddButton/types.d.ts +4 -0
  6. package/lib/components/AddResourceButton/type.d.ts +1 -1
  7. package/lib/components/AllProjectsDropdown/AllProjectsDropdown.d.ts +2 -1
  8. package/lib/components/AllProjectsDropdown/AllProjectsDropdown.stories.d.ts +1 -0
  9. package/lib/components/AllProjectsDropdown/types.d.ts +10 -0
  10. package/lib/components/AppHeader/types.d.ts +14 -10
  11. package/lib/components/Button/Button.stories.d.ts +1 -0
  12. package/lib/components/Button/types.d.ts +1 -1
  13. package/lib/components/Drawer/Drawer.stories.d.ts +3 -0
  14. package/lib/components/Drawer/Types.d.ts +25 -1
  15. package/lib/components/Icon/Icon.d.ts +1 -1
  16. package/lib/components/MachineInputField/MachineInputField.d.ts +4 -0
  17. package/lib/components/MachineInputField/MachineInputField.stories.d.ts +6 -0
  18. package/lib/components/MachineInputField/index.d.ts +1 -0
  19. package/lib/components/MachineInputField/types.d.ts +11 -0
  20. package/lib/components/MenuOption/MenuOption.d.ts +1 -1
  21. package/lib/components/MenuOption/MenuOption.stories.d.ts +1 -0
  22. package/lib/components/MenuOption/types.d.ts +7 -0
  23. package/lib/components/Modal/types.d.ts +1 -0
  24. package/lib/components/SequentialConnectingBranch/SequentialConnectingBranch.d.ts +4 -0
  25. package/lib/components/SequentialConnectingBranch/SequentialConnectingBranch.stories.d.ts +6 -0
  26. package/lib/components/SequentialConnectingBranch/components/AddBrowserModal/AddBrowserModal.d.ts +4 -0
  27. package/lib/components/SequentialConnectingBranch/components/AddBrowserModal/types.d.ts +3 -0
  28. package/lib/components/SequentialConnectingBranch/components/Branches/Branches.d.ts +4 -0
  29. package/lib/components/SequentialConnectingBranch/components/Branches/types.d.ts +16 -0
  30. package/lib/components/SequentialConnectingBranch/components/ConnectingBranches/ConnectingBranches.d.ts +4 -0
  31. package/lib/components/SequentialConnectingBranch/components/ConnectingBranches/types.d.ts +9 -0
  32. package/lib/components/SequentialConnectingBranch/components/DatasetListModal/DatasetListModal.d.ts +4 -0
  33. package/lib/components/SequentialConnectingBranch/components/DatasetListModal/types.d.ts +3 -0
  34. package/lib/components/SequentialConnectingBranch/index.d.ts +1 -0
  35. package/lib/components/SequentialConnectingBranch/types.d.ts +32 -0
  36. package/lib/components/Tabs/types.d.ts +1 -0
  37. package/lib/index.d.ts +113 -17
  38. package/lib/index.esm.js +1244 -312
  39. package/lib/index.esm.js.map +1 -1
  40. package/lib/index.js +1245 -311
  41. package/lib/index.js.map +1 -1
  42. package/lib/tsconfig.tsbuildinfo +1 -1
  43. package/package.json +1 -1
  44. package/rollup.config.mjs +2 -8
  45. package/src/assets/Themes/BaseTheme.scss +18 -2
  46. package/src/assets/Themes/DarkTheme.scss +11 -3
  47. package/src/assets/icons/add_locator.svg +5 -0
  48. package/src/assets/icons/android.svg +9 -0
  49. package/src/assets/icons/browser_stack.svg +9 -0
  50. package/src/assets/icons/chrome.svg +12 -0
  51. package/src/assets/icons/dataset_list.svg +3 -0
  52. package/src/assets/icons/drag_icon.svg +5 -0
  53. package/src/assets/icons/label_plus.svg +3 -0
  54. package/src/assets/icons/mac.svg +9 -0
  55. package/src/assets/icons/manual_locator.svg +8 -0
  56. package/src/assets/icons/windows.svg +6 -0
  57. package/src/assets/styles/_colors.scss +4 -4
  58. package/src/components/AddResourceButton/type.ts +1 -1
  59. package/src/components/AllProjectsDropdown/AllProjectsDropdown.scss +2 -2
  60. package/src/components/AllProjectsDropdown/AllProjectsDropdown.stories.tsx +99 -1
  61. package/src/components/AllProjectsDropdown/AllProjectsDropdown.tsx +30 -56
  62. package/src/components/AllProjectsDropdown/types.ts +10 -0
  63. package/src/components/AppHeader/AppHeader.stories.tsx +20 -10
  64. package/src/components/AppHeader/AppHeader.tsx +24 -17
  65. package/src/components/AppHeader/types.ts +17 -13
  66. package/src/components/Button/Button.scss +4 -0
  67. package/src/components/Button/Button.stories.tsx +7 -0
  68. package/src/components/Button/index.ts +1 -1
  69. package/src/components/Button/types.ts +2 -2
  70. package/src/components/Drawer/Drawer.scss +22 -11
  71. package/src/components/Drawer/Drawer.stories.tsx +41 -0
  72. package/src/components/Drawer/Drawer.tsx +67 -40
  73. package/src/components/Drawer/Types.ts +25 -1
  74. package/src/components/GridLayout/GridLayout.scss +0 -2
  75. package/src/components/GridLayout/GridLayout.tsx +15 -8
  76. package/src/components/Icon/Icon.tsx +39 -33
  77. package/src/components/Icon/iconList.ts +25 -6
  78. package/src/components/InputWithDropdown/InputWithDropdown.scss +1 -1
  79. package/src/components/InputWithDropdown/InputWithDropdown.tsx +2 -1
  80. package/src/components/MachineInputField/MachineInputField.scss +44 -0
  81. package/src/components/MachineInputField/MachineInputField.stories.tsx +32 -0
  82. package/src/components/MachineInputField/MachineInputField.tsx +71 -0
  83. package/src/components/MachineInputField/index.ts +1 -0
  84. package/src/components/MachineInputField/types.ts +12 -0
  85. package/src/components/MenuOption/MenuOption.scss +14 -0
  86. package/src/components/MenuOption/MenuOption.stories.tsx +21 -0
  87. package/src/components/MenuOption/MenuOption.tsx +5 -3
  88. package/src/components/MenuOption/types.ts +9 -0
  89. package/src/components/MiniModal/MiniModal.tsx +1 -1
  90. package/src/components/Modal/Modal.tsx +2 -0
  91. package/src/components/Modal/modal.scss +2 -2
  92. package/src/components/Modal/types.ts +1 -0
  93. package/src/components/Select/Select.tsx +2 -2
  94. package/src/components/SequentialConnectingBranch/SequentialConnectingBranch.scss +117 -0
  95. package/src/components/SequentialConnectingBranch/SequentialConnectingBranch.stories.tsx +62 -0
  96. package/src/components/SequentialConnectingBranch/SequentialConnectingBranch.tsx +210 -0
  97. package/src/components/SequentialConnectingBranch/components/AddBrowserModal/AddBrowserModal.scss +51 -0
  98. package/src/components/SequentialConnectingBranch/components/AddBrowserModal/AddBrowserModal.tsx +107 -0
  99. package/src/components/SequentialConnectingBranch/components/AddBrowserModal/types.ts +5 -0
  100. package/src/components/SequentialConnectingBranch/components/Branches/Branches.scss +184 -0
  101. package/src/components/SequentialConnectingBranch/components/Branches/Branches.tsx +203 -0
  102. package/src/components/SequentialConnectingBranch/components/Branches/types.ts +18 -0
  103. package/src/components/SequentialConnectingBranch/components/ConnectingBranches/ConnectingBranches.scss +3 -0
  104. package/src/components/SequentialConnectingBranch/components/ConnectingBranches/ConnectingBranches.tsx +66 -0
  105. package/src/components/SequentialConnectingBranch/components/ConnectingBranches/types.ts +10 -0
  106. package/src/components/SequentialConnectingBranch/components/DatasetListModal/DatasetListModal.scss +31 -0
  107. package/src/components/SequentialConnectingBranch/components/DatasetListModal/DatasetListModal.tsx +85 -0
  108. package/src/components/SequentialConnectingBranch/components/DatasetListModal/types.ts +4 -0
  109. package/src/components/SequentialConnectingBranch/index.ts +1 -0
  110. package/src/components/SequentialConnectingBranch/types.ts +42 -0
  111. package/src/components/Tabs/Tabs.stories.tsx +24 -25
  112. package/src/components/Tabs/Tabs.tsx +3 -10
  113. package/src/components/Tabs/types.ts +7 -1
  114. package/src/index.ts +5 -0
  115. package/lib/index.css +0 -404
  116. package/lib/index.esm.css +0 -404
@@ -0,0 +1,184 @@
1
+ @mixin arrow-style(
2
+ $size: 7px,
3
+ $color: var(--ff-connecting-branch-color),
4
+ $z-index: 2
5
+ ) {
6
+ position: absolute;
7
+ height: $size;
8
+ width: $size;
9
+ background-color: $color;
10
+ z-index: $z-index;
11
+ }
12
+
13
+ @mixin container-style(
14
+ $width: 100%,
15
+ $height: 25%,
16
+ $color: var(--ff-connecting-branch-color)
17
+ ) {
18
+ width: $width;
19
+ height: $height;
20
+ border: 1px solid $color;
21
+ border-top: none;
22
+ }
23
+
24
+ @mixin branch-point(
25
+ $size: 5px,
26
+ $color: var(--ff-connecting-branch-color),
27
+ $position: right,
28
+ $offset: -4px
29
+ ) {
30
+ position: absolute;
31
+ height: $size;
32
+ width: $size;
33
+ background-color: $color;
34
+ border-radius: 50%;
35
+ z-index: 2;
36
+ #{$position}: $offset;
37
+ top: calc(50% - 1px);
38
+ }
39
+
40
+ @mixin branch-arrow(
41
+ $clip: polygon(0 0, 0% 100%, 100% 50%),
42
+ $horizontal-pos: right,
43
+ $offset: -1px
44
+ ) {
45
+ position: absolute;
46
+ height: 7px;
47
+ width: 7px;
48
+ background-color: var(--ff-connecting-branch-color);
49
+ clip-path: $clip;
50
+ top: calc(25% - 4px);
51
+ #{$horizontal-pos}: $offset;
52
+ z-index: 2;
53
+ }
54
+
55
+ @mixin datalist-style($reverse: false) {
56
+ display: flex;
57
+ padding-top: 4px;
58
+ height: 24px;
59
+ justify-content: flex-end;
60
+ width: 100%;
61
+ align-items: center;
62
+ flex-direction: if($reverse, row-reverse, row);
63
+
64
+ .ff-connecting-icon {
65
+ margin-right: 4px;
66
+ cursor: pointer;
67
+ }
68
+
69
+ .ff-connecting-text {
70
+ margin-right: 8px;
71
+ }
72
+
73
+ .ff-connecting-delete-icon {
74
+ cursor: pointer;
75
+ }
76
+ }
77
+
78
+ @mixin end-arrow-styles($direction: right) {
79
+ width: 100%;
80
+ height: 100%;
81
+ margin-top: 17px;
82
+ border-top: 1px solid var(--ff-connecting-branch-color);
83
+ border-#{$direction}: 1px solid var(--ff-connecting-branch-color);
84
+ }
85
+
86
+ .ff-connecting-branch-grid,
87
+ .ff-connecting-branch-grid-reverse {
88
+ box-sizing: border-box;
89
+ display: grid;
90
+ grid-template-columns: 24px 180px 40px 180px 24px;
91
+ height: 66px;
92
+ margin-bottom: 16px;
93
+ position: relative;
94
+
95
+ .ff-connecting-branch-start-wrapper {
96
+ position: relative;
97
+
98
+ .ff-connecting-branch-arrow {
99
+ @include arrow-style();
100
+ clip-path: polygon(0 0, 0% 100%, 100% 50%);
101
+ top: calc(25% - 3px);
102
+ right: -2px;
103
+ }
104
+
105
+ .ff-connecting-branch-arrow-reverse {
106
+ @include arrow-style();
107
+ left: -2px;
108
+ top: calc(25% - 3px);
109
+ clip-path: polygon(0 50%, 100% 100%, 100% 0);
110
+ }
111
+
112
+ .ff-connecting-branch-container {
113
+ @include container-style();
114
+ border-right: none;
115
+ border-bottom-left-radius: 8px;
116
+ }
117
+
118
+ .ff-connecting-branch-container-reverse {
119
+ @include container-style();
120
+ border-left: none;
121
+ border-bottom-right-radius: 8px;
122
+ }
123
+ }
124
+
125
+ .ff-connecting-branch-datalist {
126
+ @include datalist-style();
127
+ }
128
+
129
+ .ff-connecting-branch-datalist-reverse {
130
+ @include datalist-style(true);
131
+ }
132
+
133
+ .ff-connecting-branch-input-point-wrapper {
134
+ position: relative;
135
+
136
+ .ff-connecting-branch-point {
137
+ @include branch-point();
138
+ }
139
+
140
+ .ff-connecting-branch-point-reverse {
141
+ @include branch-point($position: left, $offset: -4px);
142
+ }
143
+ }
144
+
145
+ .ff-connecting-branch-middle-arrow {
146
+ height: 0px;
147
+ width: 100%;
148
+ margin-top: calc(50% - 3px);
149
+ position: relative;
150
+
151
+ .ff-connecting-branch-arrow {
152
+ @include branch-arrow();
153
+ }
154
+
155
+ .ff-connecting-branch-arrow-reverse {
156
+ @include branch-arrow(
157
+ $clip: polygon(0 50%, 100% 100%, 100% 0),
158
+ $horizontal-pos: left,
159
+ $offset: -1px
160
+ );
161
+ }
162
+ }
163
+
164
+ .ff-connecting-branch-end-arrow {
165
+ @include end-arrow-styles(right);
166
+ border-top-right-radius: 8px;
167
+ }
168
+
169
+ .ff-connecting-branch-end-arrow-reverse {
170
+ @include end-arrow-styles(left);
171
+ border-top-left-radius: 8px;
172
+ }
173
+
174
+ .ff-connecting-branch-browser-button {
175
+ height: 32px;
176
+ display: flex;
177
+ align-items: center;
178
+ }
179
+ }
180
+
181
+ .ff-connecting-branch-grid-reverse {
182
+ direction: rtl;
183
+ margin-left: 1px;
184
+ }
@@ -0,0 +1,203 @@
1
+ import classNames from 'classnames';
2
+ import { checkEmpty } from '../../../../utils/checkEmpty/checkEmpty';
3
+ import { BranchesProps } from './types';
4
+ import { Fragment } from 'react/jsx-runtime';
5
+ import { ffid } from '../../../../utils/ffID/ffid';
6
+ import { ExecutionContext } from '../../types';
7
+ import MachineInputField from '../../../MachineInputField';
8
+ import Icon from '../../../Icon';
9
+ import Typography from '../../../Typography';
10
+ import Button from '../../../Button';
11
+ import './Branches.scss';
12
+
13
+ const Branches = ({
14
+ machineInstances,
15
+ rowIndex,
16
+ machineColumnCount,
17
+ machineColumnWidth,
18
+ nextRowMachineInstance,
19
+ previousRowMachineInstance,
20
+ onAddBrowser,
21
+ onDeleteBrowser,
22
+ onAddRunBrowser,
23
+ }: BranchesProps) => {
24
+ const evenRow = rowIndex % 2 === 0;
25
+ const lastMachineInstance = checkEmpty(
26
+ machineInstances[machineColumnCount - 1]
27
+ );
28
+
29
+ const getBorderStyle = (
30
+ currentBranch: ExecutionContext | {} | undefined,
31
+ nextBranch: ExecutionContext | {} | undefined
32
+ ) => {
33
+ if (
34
+ currentBranch &&
35
+ nextBranch &&
36
+ 'id' in currentBranch &&
37
+ 'id' in nextBranch
38
+ ) {
39
+ return currentBranch.id === nextBranch.id ? 'dotted' : 'solid';
40
+ }
41
+ return 'solid';
42
+ };
43
+
44
+ const showMiddleArrow = (index: number) =>
45
+ machineInstances.length - 1 !== index && machineColumnCount > 1;
46
+
47
+ const getGridTemplateColumnStyle = () => {
48
+ if (machineColumnCount === 1) {
49
+ return `24px ${machineColumnWidth}px 24px`;
50
+ }
51
+ return `24px ${machineColumnWidth}px repeat(${
52
+ machineColumnCount - 1
53
+ }, 40px ${machineColumnWidth}px) 24px`;
54
+ };
55
+
56
+ return (
57
+ <div
58
+ className={classNames({
59
+ 'ff-connecting-branch-grid': evenRow,
60
+ 'ff-connecting-branch-grid-reverse': !evenRow,
61
+ })}
62
+ style={{
63
+ gridTemplateColumns: getGridTemplateColumnStyle(),
64
+ }}
65
+ >
66
+ <div className="ff-connecting-branch-start-wrapper">
67
+ <div
68
+ className={classNames({
69
+ 'ff-connecting-branch-arrow': evenRow,
70
+ 'ff-connecting-branch-arrow-reverse': !evenRow,
71
+ })}
72
+ ></div>
73
+ <div
74
+ className={classNames({
75
+ 'ff-connecting-branch-container': evenRow,
76
+ 'ff-connecting-branch-container-reverse': !evenRow,
77
+ })}
78
+ style={{
79
+ border: `1px ${getBorderStyle(
80
+ machineInstances[0],
81
+ previousRowMachineInstance
82
+ )} var(--ff-connecting-branch-color)`,
83
+ borderTop: 'none',
84
+ borderLeft: `${!evenRow && 'none'}`,
85
+ borderRight: `${evenRow && 'none'}`,
86
+ }}
87
+ ></div>
88
+ </div>
89
+ {machineInstances?.map((machineInstance, index) => {
90
+ const {
91
+ executionEnv = 'Local',
92
+ browserName = 'Local',
93
+ browserVersion = '1',
94
+ runCount = 0,
95
+ id = '',
96
+ } = machineInstance as ExecutionContext;
97
+ return (
98
+ <Fragment key={ffid()}>
99
+ {!checkEmpty(machineInstance) ? (
100
+ <div>
101
+ <div className="ff-connecting-branch-input-point-wrapper">
102
+ <div
103
+ className={classNames({
104
+ 'ff-connecting-branch-point': evenRow,
105
+ 'ff-connecting-branch-point-reverse': !evenRow,
106
+ })}
107
+ ></div>
108
+ <MachineInputField
109
+ width="180px"
110
+ runCount={runCount}
111
+ key={ffid()}
112
+ options={[
113
+ { label: executionEnv, type: executionEnv },
114
+ { label: browserVersion, type: browserName },
115
+ ]}
116
+ contentReverse={!evenRow}
117
+ />
118
+ </div>
119
+ <div
120
+ className={classNames({
121
+ 'ff-connecting-branch-datalist': evenRow,
122
+ 'ff-connecting-branch-datalist-reverse': !evenRow,
123
+ })}
124
+ >
125
+ <Icon name="datalist_icon" className="ff-connecting-icon" />
126
+ <Typography
127
+ className="ff-connecting-text"
128
+ color="var(--ff-connecting-branch-color)"
129
+ >
130
+ Dataset List
131
+ </Typography>
132
+ <Icon
133
+ name="plus_icon"
134
+ className="ff-connecting-icon"
135
+ onClick={() => onAddRunBrowser(id)}
136
+ color="var(--ff-connecting-branch-color)"
137
+ />
138
+ <Typography
139
+ className="ff-connecting-text"
140
+ color="var(--ff-connecting-branch-color)"
141
+ >
142
+ Run
143
+ </Typography>
144
+ <Icon
145
+ name="delete"
146
+ className="ff-connecting-delete-icon"
147
+ onClick={() => onDeleteBrowser(id, runCount)}
148
+ color="var(--ff-connecting-branch-delete-color)"
149
+ />
150
+ </div>
151
+ </div>
152
+ ) : (
153
+ <div className="ff-connecting-branch-browser-button">
154
+ <Button
155
+ variant="tertiary"
156
+ label="Browser / Devices"
157
+ onClick={onAddBrowser}
158
+ />
159
+ </div>
160
+ )}
161
+ {showMiddleArrow(index) && (
162
+ <div
163
+ className="ff-connecting-branch-middle-arrow"
164
+ style={{
165
+ borderTop: `1px ${getBorderStyle(
166
+ machineInstance,
167
+ machineInstances[index + 1]
168
+ )} var(--ff-connecting-branch-color)`,
169
+ }}
170
+ >
171
+ <div
172
+ className={classNames({
173
+ 'ff-connecting-branch-arrow': evenRow,
174
+ 'ff-connecting-branch-arrow-reverse': !evenRow,
175
+ })}
176
+ ></div>
177
+ </div>
178
+ )}
179
+ </Fragment>
180
+ );
181
+ })}
182
+ {!lastMachineInstance && (
183
+ <div
184
+ className={classNames({
185
+ 'ff-connecting-branch-end-arrow': evenRow,
186
+ 'ff-connecting-branch-end-arrow-reverse': !evenRow,
187
+ })}
188
+ style={{
189
+ border: `1px ${getBorderStyle(
190
+ machineInstances[machineColumnCount - 1],
191
+ nextRowMachineInstance
192
+ )} var(--ff-connecting-branch-color)`,
193
+ borderBottom: 'none',
194
+ borderLeft: `${evenRow && 'none'}`,
195
+ borderRight: `${!evenRow && 'none'}`,
196
+ }}
197
+ ></div>
198
+ )}
199
+ </div>
200
+ );
201
+ };
202
+
203
+ export default Branches;
@@ -0,0 +1,18 @@
1
+ import { ExecutionContext } from '../../types';
2
+
3
+ export interface BranchesProps {
4
+ machineInstances: ExecutionContext[] | {}[];
5
+ rowIndex: number;
6
+ machineColumnCount: number;
7
+ machineColumnWidth: number;
8
+ nextRowMachineInstance?: ExecutionContext | {} | undefined;
9
+ previousRowMachineInstance?: ExecutionContext | {} | undefined;
10
+ onAddBrowser: () => void;
11
+ onDeleteBrowser: (id: string, runCount: number) => void;
12
+ onAddRunBrowser: (id: string) => void;
13
+ }
14
+
15
+ export interface branchTypeProps {
16
+ currentBranch: ExecutionContext | undefined | {};
17
+ nextBranch: ExecutionContext | undefined | {};
18
+ }
@@ -0,0 +1,3 @@
1
+ .ff-connecting-branch-grid-wrapper {
2
+ box-sizing: border-box;
3
+ }
@@ -0,0 +1,66 @@
1
+ import { useEffect, useState } from 'react';
2
+ import { ExecutionContext } from '../../types';
3
+ import { ConnectingBranchesProps } from './types';
4
+ import { Fragment } from 'react/jsx-runtime';
5
+ import {ffid} from '../../../../utils/ffID/ffid';
6
+ import Branches from '../Branches/Branches';
7
+ import './ConnectingBranches.scss';
8
+
9
+ const ConnectingBranches = ({
10
+ machineBranchInstances,
11
+ machineColumnCount,
12
+ machineColumnWidth,
13
+ onAddBrowser,
14
+ onDeleteBrowser,
15
+ onAddRunBrowser,
16
+ }: ConnectingBranchesProps) => {
17
+ const [machineInstance, setMachineInstance] = useState<
18
+ ExecutionContext[] | {}[]
19
+ >(machineBranchInstances);
20
+
21
+ useEffect(() => {
22
+ setMachineInstance(machineBranchInstances);
23
+ }, [machineBranchInstances]);
24
+
25
+ const getMachineBranchInstancesChunk = (
26
+ machineBranchInstances: ExecutionContext[] | {}[],
27
+ chunkSize: number
28
+ ) => {
29
+ const machineBranchInstancesChunk = [];
30
+ for (let i = 0; i < machineBranchInstances.length; i += chunkSize) {
31
+ machineBranchInstancesChunk.push(
32
+ machineBranchInstances.slice(i, i + chunkSize)
33
+ );
34
+ }
35
+ return machineBranchInstancesChunk;
36
+ };
37
+
38
+ const machineInstancesRow = getMachineBranchInstancesChunk(
39
+ machineInstance,
40
+ machineColumnCount
41
+ );
42
+
43
+ return (
44
+ <div className="ff-connecting-branch-grid-wrapper">
45
+ {machineInstancesRow.map((machineInstances, index) => (
46
+ <Fragment key={ffid()}>
47
+ <Branches
48
+ machineInstances={machineInstances}
49
+ rowIndex={index}
50
+ machineColumnCount={machineColumnCount}
51
+ machineColumnWidth={machineColumnWidth}
52
+ onAddBrowser={onAddBrowser}
53
+ onDeleteBrowser={onDeleteBrowser}
54
+ onAddRunBrowser={onAddRunBrowser}
55
+ nextRowMachineInstance={machineInstancesRow[index + 1]?.[0]}
56
+ previousRowMachineInstance={
57
+ machineInstancesRow[index - 1]?.[machineColumnCount - 1]
58
+ }
59
+ />
60
+ </Fragment>
61
+ ))}
62
+ </div>
63
+ );
64
+ };
65
+
66
+ export default ConnectingBranches;
@@ -0,0 +1,10 @@
1
+ import { ExecutionContext } from '../../types';
2
+
3
+ export interface ConnectingBranchesProps {
4
+ machineBranchInstances: ExecutionContext[] | {}[];
5
+ machineColumnCount: number;
6
+ machineColumnWidth: number;
7
+ onAddBrowser: () => void;
8
+ onDeleteBrowser: (id: string, runCount: number) => void;
9
+ onAddRunBrowser: (id: string) => void;
10
+ }
@@ -0,0 +1,31 @@
1
+ .ff-datalist-modal-header-wrapper,
2
+ .ff-datalist-modal-child-wrapper,
3
+ .ff-datalist-modal-footer-wrapper {
4
+ margin: 0 8px;
5
+ }
6
+
7
+ .ff-datalist-modal-header-wrapper {
8
+ width: 255px;
9
+ border-bottom: 1px solid var(--ff-connecting-branch-modal-border);
10
+ display: flex;
11
+ align-items: center;
12
+ }
13
+
14
+ .ff-datalist-modal-child-wrapper {
15
+ .variable {
16
+ margin: 8px 0;
17
+ }
18
+ }
19
+
20
+ .ff-datalist-modal-footer-wrapper {
21
+ display: flex;
22
+ justify-content: space-between;
23
+ border-top: 1px solid var(--ff-connecting-branch-modal-border);
24
+
25
+ .datalist-button-wrapper {
26
+ display: flex;
27
+ gap: 10px;
28
+ margin-top: 4px;
29
+ justify-content: flex-end;
30
+ }
31
+ }
@@ -0,0 +1,85 @@
1
+ import { forwardRef, RefObject } from 'react';
2
+ import MiniModal from '../../../MiniModal';
3
+ import Typography from '../../../Typography';
4
+ import './DatasetListModal.scss';
5
+ import Select from '../../../Select';
6
+ import Checkbox from '../../../Checkbox';
7
+ import Button from '../../../Button';
8
+ import { DatasetListModalProps } from './types';
9
+
10
+ const DatasetListModal = forwardRef<HTMLButtonElement, DatasetListModalProps>(
11
+ (props, ref) => {
12
+ const selectOptions = [
13
+ { label: 'Project Environment Variable' },
14
+ { label: 'Global Variables' },
15
+ { label: 'Test Data Set' },
16
+ ];
17
+
18
+ const renderSelectOptions = () =>
19
+ selectOptions.map(({ label }, idx) => (
20
+ <Select
21
+ key={idx}
22
+ optionsList={[]}
23
+ onChange={() => {}}
24
+ label={label}
25
+ className="variable"
26
+ />
27
+ ));
28
+
29
+ const renderFooterContent = () => (
30
+ <div className="ff-datalist-modal-footer-wrapper">
31
+ <Checkbox checked={false} label="Set as Default" />
32
+ <div className="datalist-button-wrapper">
33
+ <Button label="Cancel" variant="tertiary" />
34
+ <Button label="Update" variant="primary" />
35
+ </div>
36
+ </div>
37
+ );
38
+
39
+ return (
40
+ <div>
41
+ <MiniModal
42
+ anchorRef={ref as RefObject<HTMLButtonElement>}
43
+ headerProps={
44
+ <div className="ff-datalist-modal-header-wrapper">
45
+ <Typography
46
+ as="span"
47
+ color="var(--ff-connecting-branch-modal-header)"
48
+ fontWeight="semi-bold"
49
+ fontSize={12}
50
+ lineHeight="38px"
51
+ >
52
+ Data Sets
53
+ </Typography>
54
+ </div>
55
+ }
56
+ childContent={
57
+ <div className="ff-datalist-modal-child-wrapper">
58
+ {renderSelectOptions()}
59
+ </div>
60
+ }
61
+ footerContent={renderFooterContent()}
62
+ cancelButtonProps={{
63
+ text: 'Cancel',
64
+
65
+ // TODO: DEMO PURPOSE AND WILL BE REMOVED IN THE FUTURE
66
+ onClick: props?.onUpdateDatasetList,
67
+ }}
68
+ proceedButtonProps={{
69
+ text: 'Proceed',
70
+ // TODO: DEMO PURPOSE AND WILL BE REMOVED IN THE FUTURE
71
+ onClick: props?.onUpdateDatasetList,
72
+ }}
73
+ modalPosition="right"
74
+ isPopOver
75
+ leftTopArrow
76
+ extraRightSpace={{ leftTopArrow: 40 }}
77
+ extraLeftSpace={{ rightAlignModal: 110 }}
78
+ {...props}
79
+ />
80
+ </div>
81
+ );
82
+ }
83
+ );
84
+
85
+ export default DatasetListModal;
@@ -0,0 +1,4 @@
1
+ export interface DatasetListModalProps {
2
+ // TODO: DEMO PURPOSE AND WILL BE REMOVED IN THE FUTURE
3
+ onUpdateDatasetList: () => void;
4
+ }
@@ -0,0 +1 @@
1
+ export { default } from './SequentialConnectingBranch';
@@ -0,0 +1,42 @@
1
+ import { Option } from '../Select/types';
2
+
3
+ export interface SequentialConnectingBranchProps {
4
+ machineInstances?: ExecutionContext[] | {}[];
5
+ machineColumnWidth?: number;
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
10
+ machineOptionsList?: Option[];
11
+ }
12
+
13
+ // Type for machine information
14
+ export interface MachineInfo {
15
+ osName: string;
16
+ osVersion: string;
17
+ hostName: string;
18
+ }
19
+
20
+ // Type for device information
21
+ export interface DeviceInfo {
22
+ // Define properties as needed; assuming it can have various structures.
23
+ // For example:
24
+ // deviceName: string;
25
+ // deviceType: string;
26
+ }
27
+
28
+ export interface ExecutionContext {
29
+ id: string;
30
+ clientId: string;
31
+ runCount: number;
32
+ executionEnv?: 'Local'; // Change to specific enum if more environments exist
33
+ browserName?: 'Local' | 'mac' | 'android' | 'Google Chrome';
34
+ browserVersion: string;
35
+ systemUrl: string;
36
+ machineInfo: MachineInfo;
37
+ deviceInfo: DeviceInfo[];
38
+ headless: boolean;
39
+ peVariableSetId: string;
40
+ globalVariableSetId: string;
41
+ testDataSetId: string;
42
+ }