pixel-react-excel-sheet 1.0.30 → 1.0.32

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 (85) hide show
  1. package/lib/components/Charts/BarChart/BarChart.d.ts +1 -0
  2. package/lib/components/Charts/DashboardDonutChart/types.d.ts +1 -0
  3. package/lib/components/ConditionalDropdown/types.d.ts +1 -1
  4. package/lib/components/ConnectingBranch/ConnectingBranch.d.ts +2 -1
  5. package/lib/components/ConnectingBranch/data.d.ts +19 -33
  6. package/lib/components/ConnectingBranch/types.d.ts +10 -0
  7. package/lib/components/Excel/ExcelFile/ExcelFileComponents/actions.d.ts +7 -1
  8. package/lib/components/FileDropzone/types.d.ts +12 -4
  9. package/lib/components/MachineInputField/MachineInputField.d.ts +4 -1
  10. package/lib/components/MenuOption/types.d.ts +1 -1
  11. package/lib/components/PopUpModal/types.d.ts +2 -1
  12. package/lib/components/Select/types.d.ts +1 -1
  13. package/lib/components/StatusCard/types.d.ts +7 -1
  14. package/lib/components/TextArea/Textarea.d.ts +1 -1
  15. package/lib/components/TextArea/Types.d.ts +1 -0
  16. package/lib/components/ThemeProvider/types.d.ts +1 -1
  17. package/lib/index.d.ts +99 -69
  18. package/lib/index.esm.js +241 -137
  19. package/lib/index.esm.js.map +1 -1
  20. package/lib/index.js +241 -137
  21. package/lib/index.js.map +1 -1
  22. package/lib/tsconfig.tsbuildinfo +1 -1
  23. package/lib/utils/validateFile/validateFile.d.ts +2 -0
  24. package/package.json +2 -2
  25. package/src/assets/Themes/BaseTheme.scss +1 -0
  26. package/src/assets/Themes/BlueTheme.scss +279 -0
  27. package/src/assets/Themes/DarkTheme.scss +1 -0
  28. package/src/assets/Themes/Theme.scss +5 -0
  29. package/src/components/AppHeader/AppHeader.tsx +4 -2
  30. package/src/components/Charts/BarChart/BarChart.stories.tsx +3 -0
  31. package/src/components/Charts/BarChart/BarChart.tsx +7 -0
  32. package/src/components/Charts/DashboardDonutChart/DashboardDonutChart.scss +4 -0
  33. package/src/components/Charts/DashboardDonutChart/DashboardDonutChart.stories.tsx +1 -0
  34. package/src/components/Charts/DashboardDonutChart/DashboardDonutChart.tsx +4 -2
  35. package/src/components/Charts/DashboardDonutChart/types.ts +1 -0
  36. package/src/components/ConditionalDropdown/ConditionalDropdown.stories.tsx +1 -1
  37. package/src/components/ConditionalDropdown/types.ts +1 -1
  38. package/src/components/ConnectingBranch/BranchComponents/MachineInstances.tsx +94 -79
  39. package/src/components/ConnectingBranch/ConnectingBranch.scss +31 -45
  40. package/src/components/ConnectingBranch/ConnectingBranch.stories.tsx +33 -1
  41. package/src/components/ConnectingBranch/ConnectingBranch.tsx +36 -23
  42. package/src/components/ConnectingBranch/{data.ts → data.tsx} +106 -17
  43. package/src/components/ConnectingBranch/types.ts +21 -0
  44. package/src/components/Excel/ExcelFile/ExcelFile.tsx +1 -1
  45. package/src/components/Excel/ExcelFile/ExcelFileComponents/ActiveCell.tsx +7 -5
  46. package/src/components/Excel/ExcelFile/ExcelFileComponents/FloatingRect.tsx +6 -1
  47. package/src/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.scss +30 -11
  48. package/src/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.tsx +65 -19
  49. package/src/components/Excel/ExcelFile/ExcelFileComponents/actions.ts +14 -0
  50. package/src/components/Excel/ExcelFile/ExcelFileComponents/reducer.ts +16 -0
  51. package/src/components/Excel/ExcelToolBar/ExcelToolBar.tsx +41 -32
  52. package/src/components/FileDropzone/Dropzone.tsx +3 -0
  53. package/src/components/FileDropzone/FileDropzone.scss +18 -0
  54. package/src/components/FileDropzone/FileDropzone.stories.tsx +75 -7
  55. package/src/components/FileDropzone/FileDropzone.tsx +2 -0
  56. package/src/components/FileDropzone/RadioFilePreview.tsx +7 -3
  57. package/src/components/FileDropzone/types.ts +13 -4
  58. package/src/components/Icon/iconList.ts +2 -2
  59. package/src/components/InputWithDropdown/InputWithDropdown.tsx +1 -1
  60. package/src/components/MachineInputField/MachineInputField.tsx +67 -70
  61. package/src/components/MenuOption/MenuOption.stories.tsx +2 -3
  62. package/src/components/MenuOption/MenuOption.tsx +9 -2
  63. package/src/components/MenuOption/types.ts +1 -1
  64. package/src/components/PopUpModal/types.ts +4 -3
  65. package/src/components/Search/Search.stories.tsx +1 -2
  66. package/src/components/Select/types.ts +1 -1
  67. package/src/components/SequentialConnectingBranch/components/Branches/Branches.scss +1 -0
  68. package/src/components/SequentialConnectingBranch/components/Branches/Branches.tsx +2 -8
  69. package/src/components/StatusCard/StatusCard.scss +47 -4
  70. package/src/components/StatusCard/StatusCard.stories.tsx +1 -0
  71. package/src/components/StatusCard/StatusCard.tsx +28 -5
  72. package/src/components/StatusCard/types.ts +15 -10
  73. package/src/components/TextArea/Textarea.tsx +2 -0
  74. package/src/components/TextArea/Types.ts +3 -0
  75. package/src/components/ThemeProvider/types.ts +1 -1
  76. package/src/components/Toastify/Toastify.tsx +1 -0
  77. package/src/utils/validateFile/validateFile.stories.tsx +49 -0
  78. package/src/utils/validateFile/validateFile.ts +39 -0
  79. package/src/components/SequentialConnectingBranch/components/AddBrowserModal/AddBrowserModal.scss +0 -51
  80. package/src/components/SequentialConnectingBranch/components/AddBrowserModal/AddBrowserModal.tsx +0 -107
  81. package/src/components/SequentialConnectingBranch/components/AddBrowserModal/types.ts +0 -5
  82. package/src/components/SequentialConnectingBranch/components/DatasetListModal/DatasetListModal.scss +0 -31
  83. package/src/components/SequentialConnectingBranch/components/DatasetListModal/DatasetListModal.tsx +0 -85
  84. package/src/components/SequentialConnectingBranch/components/DatasetListModal/types.ts +0 -4
  85. /package/src/assets/icons/{impactList.svg → impact_list.svg} +0 -0
@@ -72,12 +72,6 @@ const Branches = ({
72
72
  machineInfo: { osVersion, iconName },
73
73
  deviceInfo,
74
74
  } = machineInstance as ExecutionContext;
75
- // Helper to handle device info safely
76
- const getDeviceOption = (platform: string, defaultType: string = '', index = 0) =>
77
- deviceInfo?.[index]?.platform?.toLowerCase().includes(platform ?? '')
78
- ? defaultType
79
- : undefined;
80
-
81
75
  const getEnvironment = (environment: string = '') => {
82
76
  if (environment.toLowerCase().includes('browserstack'))
83
77
  return 'Browserstack';
@@ -110,11 +104,11 @@ const Branches = ({
110
104
  const mobileOptions = [
111
105
  {
112
106
  label: deviceInfo?.[0]?.name,
113
- type: getDeviceOption('android', 'android_icon', 0),
107
+ type: 'android',
114
108
  },
115
109
  {
116
110
  label: deviceInfo?.[1]?.name,
117
- type: getDeviceOption('ios', 'mac_icon', 1),
111
+ type: 'mac',
118
112
  },
119
113
  ];
120
114
 
@@ -1,6 +1,5 @@
1
1
  .ff-card-container {
2
- width: 120px;
3
- height: 93px;
2
+ height: 78px;
4
3
  display: flex;
5
4
  align-items: center;
6
5
  border: 1px solid var(--border-color);
@@ -31,14 +30,14 @@
31
30
  }
32
31
 
33
32
  .ff-status-bar {
34
- width: 24px;
33
+ width: 12%;
35
34
  height: 100%;
36
35
  display: flex;
37
36
  flex-direction: column;
38
37
  justify-content: start;
39
38
  align-items: center;
40
39
  border-right: 1px solid var(--border-color);
41
- gap: 30px;
40
+ gap: 17px;
42
41
 
43
42
  .ff-status-text {
44
43
  transform: rotate(-90deg);
@@ -49,18 +48,23 @@
49
48
 
50
49
  &.passed .ff-status-bar {
51
50
  background-color: var(--ff-card-passed-status-bg-color);
51
+ color: var(--base-bg-color);
52
52
  }
53
53
  &.failed .ff-status-bar {
54
54
  background-color: var(--ff-card-failed-status-bg-color);
55
+ color: var(--base-bg-color);
55
56
  }
56
57
  &.warning .ff-status-bar {
57
58
  background-color: var(--ff-card-warning-status-bg-color);
59
+ color: var(--base-bg-color);
58
60
  }
59
61
  &.skipped .ff-status-bar {
60
62
  background-color: var(--ff-card-skipped-status-bg-color);
63
+ color: var(--base-bg-color);
61
64
  }
62
65
  &.flaky .ff-status-bar {
63
66
  background-color: var(--ff-card-flaky-status-bg-color);
67
+ color: var(--base-bg-color);
64
68
  }
65
69
 
66
70
  .ff-content {
@@ -91,4 +95,43 @@
91
95
  &.flaky .ff-number {
92
96
  color: var(--ff-card-flaky-status-bg-color);
93
97
  }
98
+
99
+ &.toggled {
100
+ &.passed .ff-status-bar {
101
+ background-color: var(--base-bg-color);
102
+ color: var(--ff-card-passed-status-bg-color);
103
+ }
104
+ &.failed .ff-status-bar {
105
+ background-color: var(--base-bg-color);
106
+ color: var(--ff-card-failed-status-bg-color);
107
+ }
108
+ &.warning .ff-status-bar {
109
+ background-color: var(--base-bg-color);
110
+ color: var(--ff-card-warning-status-bg-color);
111
+ }
112
+ &.skipped .ff-status-bar {
113
+ background-color: var(--base-bg-color);
114
+ color: var(--ff-card-skipped-status-bg-color);
115
+ }
116
+ &.flaky .ff-status-bar {
117
+ background-color: var(--base-bg-color);
118
+ color: var(--ff-card-flaky-status-bg-color);
119
+ }
120
+
121
+ &.passed .ff-content {
122
+ background-color: var(--ff-card-passed-status-bg-color);
123
+ }
124
+ &.failed .ff-content {
125
+ background-color: var(--ff-card-failed-status-bg-color);
126
+ }
127
+ &.warning .ff-content {
128
+ background-color: var(--ff-card-warning-status-bg-color);
129
+ }
130
+ &.skipped .ff-content {
131
+ background-color: var(--ff-card-skipped-status-bg-color);
132
+ }
133
+ &.flaky .ff-content {
134
+ background-color: var(--ff-card-flaky-status-bg-color);
135
+ }
136
+ }
94
137
  }
@@ -18,6 +18,7 @@ export const Passed: Story = {
18
18
  status: 'Passed',
19
19
  count: 66,
20
20
  text: 'Scripts were passed all the time.',
21
+ style:{width:'200px'},
21
22
  },
22
23
  };
23
24
 
@@ -1,12 +1,31 @@
1
- import React from 'react';
1
+ import React, { useState } from 'react';
2
2
  import './StatusCard.scss';
3
3
  import { CardProps } from './types';
4
4
  import Typography from '../Typography';
5
5
  import Icon from '../Icon';
6
6
 
7
- const StatusCard: React.FC<CardProps> = ({ icon, status, count, text }) => {
7
+ const StatusCard: React.FC<CardProps> = ({
8
+ icon,
9
+ status,
10
+ count,
11
+ text,
12
+ style = { width: '196.4px' },
13
+ onSelectedStatus = (_status) => {},
14
+ }) => {
15
+ const [isToggled, setIsToggled] = useState<boolean>(false);
16
+
17
+ const handleSelectStatus = (status: string) => {
18
+ setIsToggled(true);
19
+ onSelectedStatus(status);
20
+ };
8
21
  return (
9
- <div className={`ff-card-container ${status.toLowerCase()}`}>
22
+ <div
23
+ className={`ff-card-container ${status.toLowerCase()} ${
24
+ isToggled ? 'toggled' : ''
25
+ }`}
26
+ style={style}
27
+ onClick={() => handleSelectStatus(status)}
28
+ >
10
29
  <div className="ff-status-bar">
11
30
  <div>
12
31
  <Icon name={icon} height={20} width={20} hoverEffect={false} />
@@ -14,7 +33,6 @@ const StatusCard: React.FC<CardProps> = ({ icon, status, count, text }) => {
14
33
  <Typography
15
34
  fontWeight="semi-bold"
16
35
  fontSize="10px"
17
- color="var(--ff-status-card-text-color)"
18
36
  textAlign="center"
19
37
  lineHeight="15px"
20
38
  className="ff-status-text"
@@ -29,6 +47,7 @@ const StatusCard: React.FC<CardProps> = ({ icon, status, count, text }) => {
29
47
  fontSize="24px"
30
48
  className="ff-number"
31
49
  lineHeight="36px"
50
+ color={isToggled ? 'var(--base-bg-color)' : ''}
32
51
  >
33
52
  {count}
34
53
  </Typography>
@@ -37,7 +56,11 @@ const StatusCard: React.FC<CardProps> = ({ icon, status, count, text }) => {
37
56
  fontSize="10px"
38
57
  className="ff-text"
39
58
  lineHeight="15px"
40
- color="var(--ff-card-status-text-color)"
59
+ color={
60
+ isToggled
61
+ ? 'var(--base-bg-color)'
62
+ : 'var(--ff-card-status-text-color)'
63
+ }
41
64
  >
42
65
  {text}
43
66
  </Typography>
@@ -1,11 +1,16 @@
1
1
  export interface CardProps {
2
- /** The icon to display in the card */
3
- icon: string;
4
- /** The status of the card (Passed, Failed, Warning, Skipped, Flaky) */
5
- status: 'Passed' | 'Failed' | 'Warning' | 'Skipped' | 'Flaky';
6
- /** The number displayed in the card */
7
- count: number | string;
8
- /** The description text displayed at the bottom of the card */
9
- text: string;
10
- }
11
-
2
+ /** The icon to display in the card */
3
+ icon: string;
4
+ /** The status of the card (Passed, Failed, Warning, Skipped, Flaky) */
5
+ status: 'Passed' | 'Failed' | 'Warning' | 'Skipped' | 'Flaky' | 'PASSED' | 'FAIL' | 'WARNING' | 'SKIPPED' | 'FLAKY';
6
+ /** The number displayed in the card */
7
+ count: number | string;
8
+ /** The description text displayed at the bottom of the card */
9
+ text: string;
10
+ /** Inline Styling */
11
+ style?: React.CSSProperties;
12
+ /** toggle update */
13
+ handleToggleStatus?: (_status: boolean) => void;
14
+ /** call back */
15
+ onSelectedStatus?: (_status: string) => void;
16
+ }
@@ -17,6 +17,7 @@ const Textarea = ({
17
17
  onChange,
18
18
  onBlur,
19
19
  onFocus,
20
+ onPaste,
20
21
  rows = 4,
21
22
  cols = 40,
22
23
  resize = false,
@@ -65,6 +66,7 @@ const Textarea = ({
65
66
  onChange={onChange}
66
67
  onBlur={onBlur}
67
68
  onFocus={onFocus}
69
+ onPaste={onPaste}
68
70
  required={required}
69
71
  rows={rows}
70
72
  cols={cols}
@@ -49,6 +49,9 @@ export interface TextareaProps {
49
49
  onBlur?: (event: React.FocusEvent<HTMLTextAreaElement>) => void;
50
50
 
51
51
  onFocus?: (event: React.FocusEvent<HTMLTextAreaElement>) => void;
52
+
53
+ onPaste?: (event: React.ClipboardEvent<HTMLTextAreaElement>) => void;
54
+
52
55
  /**
53
56
  * id to select the textarea field uniquely
54
57
  */
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from "react";
2
2
 
3
- export type Theme = 'ff-light-theme' | 'ff-dark-theme' | 'ff-grey-theme';
3
+ export type Theme = 'ff-light-theme' | 'ff-dark-theme' | 'ff-grey-theme' | 'ff-blue-theme';
4
4
 
5
5
  export interface ThemeContextType {
6
6
  currentTheme: Theme;
@@ -73,6 +73,7 @@ export const Toastify = () => {
73
73
  variant={toastProps.variant}
74
74
  toastTitle={toastProps.toastTitle}
75
75
  toastMessage={toastProps.toastMessage}
76
+ zIndex={1000000000}
76
77
  />
77
78
  );
78
79
  };
@@ -0,0 +1,49 @@
1
+ import React, { useState } from 'react';
2
+ import {
3
+ validateFileExtension,
4
+ validateZipFileExtension,
5
+ } from './validateFile';
6
+
7
+ export default {
8
+ title: 'Utils/validateFile',
9
+ };
10
+
11
+ const allowedFileTypes = {
12
+ '.txt': 'text/plain',
13
+ '.zip': 'application/zip',
14
+ '.jpg': 'image/jpeg',
15
+ };
16
+
17
+ export const ValidateFileExtension = () => {
18
+ const [result, setResult] = useState<string | boolean>('');
19
+
20
+ const handleFileChange = (event: React.ChangeEvent<HTMLInputElement>) => {
21
+ const isValid = validateFileExtension(event, allowedFileTypes);
22
+ setResult(isValid ? 'Valid file type' : 'Invalid file type');
23
+ };
24
+
25
+ return (
26
+ <div>
27
+ <h3>Validate File Extension</h3>
28
+ <input type="file" onChange={handleFileChange} />
29
+ <p>Result: {result.toString()}</p>
30
+ </div>
31
+ );
32
+ };
33
+
34
+ export const ValidateZipFileExtension = () => {
35
+ const [result, setResult] = useState<string | boolean>('');
36
+
37
+ const handleFileChange = (event: React.ChangeEvent<HTMLInputElement>) => {
38
+ const isValid = validateZipFileExtension(event);
39
+ setResult(isValid ? 'Valid ZIP file' : 'Invalid ZIP file');
40
+ };
41
+
42
+ return (
43
+ <div>
44
+ <h3>Validate ZIP File Extension</h3>
45
+ <input type="file" onChange={handleFileChange} />
46
+ <p>Result: {result.toString()}</p>
47
+ </div>
48
+ );
49
+ };
@@ -0,0 +1,39 @@
1
+ export const validateFileExtension = (
2
+ file: File | React.ChangeEvent<HTMLInputElement>,
3
+ allowedFileTypes: Record<string, string>
4
+ ) => {
5
+ const selectedFile =
6
+ (file as React.ChangeEvent<HTMLInputElement>).target?.files?.[0] ||
7
+ (file as File);
8
+ const fileExtension =
9
+ '.' + selectedFile?.name?.split('.')?.pop()?.toLowerCase();
10
+ const fileType = selectedFile?.type;
11
+ if (
12
+ ['.ipa', '.y4m', '.yml', '.md', '.pem', '.properties'].includes(
13
+ fileExtension
14
+ ) &&
15
+ Object.keys(allowedFileTypes)?.includes(fileExtension)
16
+ ) {
17
+ return true;
18
+ }
19
+ return (
20
+ allowedFileTypes[fileExtension] &&
21
+ fileType === allowedFileTypes[fileExtension]
22
+ );
23
+ };
24
+
25
+ export const validateZipFileExtension = (
26
+ file: File | React.ChangeEvent<HTMLInputElement>
27
+ ) => {
28
+ const selectedFile =
29
+ (file as React.ChangeEvent<HTMLInputElement>).target?.files?.[0] ||
30
+ (file as File);
31
+ // List of valid MIME types
32
+ const validMimeTypes = ['application/zip', 'application/x-zip-compressed'];
33
+ // Validating the file extension and MIME type
34
+ return (
35
+ selectedFile &&
36
+ validMimeTypes?.includes(selectedFile?.type) &&
37
+ selectedFile?.name?.toLowerCase()?.endsWith('.zip')
38
+ );
39
+ };
@@ -1,51 +0,0 @@
1
- .ff-connecting-datalist-modal-header-wrapper,
2
- .ff-connecting-modal-child-wrapper {
3
- width: 534px;
4
- padding: 0 4px;
5
- }
6
-
7
- .ff-connecting-datalist-modal-header-wrapper {
8
- border-bottom: 1px solid var(--ff-connecting-branch-modal-border);
9
- margin-bottom: 4px;
10
- }
11
-
12
- .ff-connecting-modal-child-wrapper {
13
- .ff-branch-select-input-wrapper {
14
- display: flex;
15
- align-items: center;
16
- gap: 8px;
17
-
18
- .ff-select-browser {
19
- width: 263px;
20
- }
21
-
22
- .ff-branch-input-wrapper {
23
- display: flex;
24
- align-items: flex-end;
25
- height: 38px;
26
-
27
- .ff-input-browser {
28
- width: 245px;
29
- }
30
- }
31
- }
32
- }
33
-
34
- .ff-connecting-modal-footer-wrapper {
35
- display: flex;
36
- align-items: center;
37
- justify-content: space-between;
38
- padding: 0 8px;
39
- margin-top: 8px;
40
- border-top: 1px solid var(--ff-connecting-branch-modal-border);
41
-
42
- .ff-branch-toggle-wrapper,
43
- .ff-datalist-button-wrapper {
44
- display: flex;
45
- gap: 8px;
46
- }
47
-
48
- .ff-branch-toggle-wrapper {
49
- gap: 4px;
50
- }
51
- }
@@ -1,107 +0,0 @@
1
- import { forwardRef, RefObject } from 'react';
2
- import MiniModal from '../../../MiniModal';
3
- import Typography from '../../../Typography';
4
- import './AddBrowserModal.scss';
5
- import Select from '../../../Select';
6
- import Button from '../../../Button';
7
- import Toggle from '../../../Toggle';
8
- import Input from '../../../Input/Input';
9
- import { AddBrowserModalProps } from './types';
10
-
11
- const AddBrowserModal = forwardRef<HTMLButtonElement, AddBrowserModalProps>(
12
- (props, ref) => {
13
- // TODO: WILL BE REMOVE IN THE FUTURE
14
- const selectOptions = [
15
- { label: 'Execution Environment', inputName: 'number of runs' },
16
- { label: 'Browser', inputName: 'Browser Version' },
17
- { label: 'Android Device', inputName: 'os version' },
18
- { label: 'IOS Device', inputName: 'os version-1' },
19
- ];
20
-
21
- const renderSelectOptions = () => (
22
- <div>
23
- {selectOptions.map(({ label, inputName }, index) => (
24
- <div className="ff-branch-select-input-wrapper" key={index}>
25
- <Select
26
- optionsList={[]}
27
- onChange={() => {}}
28
- label={label}
29
- className="ff-select-browser"
30
- />
31
- <div className="ff-branch-input-wrapper">
32
- <Input
33
- value="0"
34
- label="Number of Runs"
35
- type="number"
36
- onChange={() => {}}
37
- name={inputName}
38
- className="ff-input-browser"
39
- />
40
- </div>
41
- </div>
42
- ))}
43
- </div>
44
- );
45
-
46
- const renderFooterContent = () => (
47
- <div className="ff-connecting-modal-footer-wrapper">
48
- <div className="ff-branch-toggle-wrapper">
49
- <Typography as="span" lineHeight="32px">
50
- Run in Headless Mode
51
- </Typography>
52
- <Toggle />
53
- </div>
54
- <div className="ff-datalist-button-wrapper">
55
- <Button label="Cancel" variant="tertiary" />
56
- <Button label="Update" variant="primary" />
57
- </div>
58
- </div>
59
- );
60
-
61
- return (
62
- <div>
63
- <MiniModal
64
- anchorRef={ref as RefObject<HTMLButtonElement>}
65
- headerProps={
66
- <div className="ff-connecting-datalist-modal-header-wrapper">
67
- <Typography
68
- as="span"
69
- color="var(--ff-connecting-branch-modal-header)"
70
- fontWeight="semi-bold"
71
- fontSize={12}
72
- lineHeight="38px"
73
- >
74
- Add Browser / Device
75
- </Typography>
76
- </div>
77
- }
78
- childContent={
79
- <div className="ff-connecting-modal-child-wrapper">
80
- {renderSelectOptions()}
81
- </div>
82
- }
83
- footerContent={renderFooterContent()}
84
- cancelButtonProps={{
85
- text: 'Cancel',
86
-
87
- // TODO: DEMO PURPOSE AND WILL BE REMOVED IN THE FUTURE
88
- onClick: props.onUpdateAddBrowser,
89
- }}
90
- proceedButtonProps={{
91
- text: 'Proceed',
92
- // TODO: DEMO PURPOSE AND WILL BE REMOVED IN THE FUTURE
93
- onClick: props.onUpdateAddBrowser,
94
- }}
95
- modalPosition="right"
96
- isPopOver
97
- leftTopArrow
98
- extraRightSpace={{ leftTopArrow: 45 }}
99
- extraLeftSpace={{ rightAlignModal: 115 }}
100
- {...props}
101
- />
102
- </div>
103
- );
104
- }
105
- );
106
-
107
- export default AddBrowserModal;
@@ -1,5 +0,0 @@
1
- export interface AddBrowserModalProps {
2
-
3
- // TODO: DEMO PURPOSE AND WILL BE REMOVED IN THE FUTURE
4
- onUpdateAddBrowser: () => void;
5
- }
@@ -1,31 +0,0 @@
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
- }
@@ -1,85 +0,0 @@
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;
@@ -1,4 +0,0 @@
1
- export interface DatasetListModalProps {
2
- // TODO: DEMO PURPOSE AND WILL BE REMOVED IN THE FUTURE
3
- onUpdateDatasetList: () => void;
4
- }