pixel-react-excel-sheet 1.0.10 → 1.0.12
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/1fb4472b34e4fe07.css +1 -0
- package/lib/components/Accordion/Accordion.d.ts +1 -1
- package/lib/components/Accordion/types.d.ts +12 -0
- package/lib/components/AddVariables/AddVariables.d.ts +5 -0
- package/lib/components/AddVariables/index.d.ts +1 -0
- package/lib/components/AddVariables/types.d.ts +35 -0
- package/lib/components/AppHeader/types.d.ts +2 -0
- package/lib/components/AttachImage/AttachImage.d.ts +1 -6
- package/lib/components/AttachImage/types.d.ts +8 -0
- package/lib/components/Avatar/types.d.ts +9 -1
- package/lib/components/Checkbox/types.d.ts +4 -0
- package/lib/components/Comment/Comments.d.ts +4 -0
- package/lib/components/Comment/comment/Comment.d.ts +11 -0
- package/lib/components/Comment/comment/useNode.d.ts +7 -0
- package/lib/components/Comment/index.d.ts +1 -0
- package/lib/components/Comment/type.d.ts +25 -0
- package/lib/components/CreateVariable/CreateVariableSlider.d.ts +5 -0
- package/lib/components/CreateVariable/index.d.ts +1 -0
- package/lib/components/CreateVariable/types.d.ts +56 -0
- package/lib/components/Drawer/Types.d.ts +13 -0
- package/lib/components/Editor/constants.d.ts +1 -1
- package/lib/components/Editor/types.d.ts +10 -2
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/actions.d.ts +8 -1
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/reducerFunctions.d.ts +2 -0
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/types.d.ts +13 -6
- package/lib/components/IconButton/IconButton.d.ts +1 -2
- package/lib/components/IconButton/types.d.ts +1 -0
- package/lib/components/Input/Input.d.ts +1 -1
- package/lib/components/MiniModal/types.d.ts +7 -0
- package/lib/components/MultiSelect/MultiSelect.d.ts +1 -1
- package/lib/components/PhoneInput/PhoneInput.d.ts +6 -0
- package/lib/components/PhoneInput/index.d.ts +1 -0
- package/lib/components/PhoneInput/types.d.ts +10 -0
- package/lib/components/PopUpModal/types.d.ts +1 -0
- package/lib/components/Select/components/types.d.ts +1 -0
- package/lib/components/Select/types.d.ts +2 -0
- package/lib/components/TableTree/Components/TableBody.d.ts +4 -0
- package/lib/components/TableTree/Components/TableCell.d.ts +4 -0
- package/lib/components/TableTree/Components/TableHead.d.ts +4 -0
- package/lib/components/TableTree/Components/TableRow.d.ts +4 -0
- package/lib/components/TableTree/Utils/getAllChildIds.d.ts +1 -0
- package/lib/components/TableTree/types.d.ts +38 -5
- package/lib/components/TableWithAccordion/TableWithAccordion.d.ts +5 -0
- package/lib/components/TableWithAccordion/data.d.ts +8 -0
- package/lib/components/TableWithAccordion/index.d.ts +1 -0
- package/lib/components/TableWithAccordion/types.d.ts +67 -0
- package/lib/index.d.ts +303 -17
- package/lib/index.esm.js +3372 -747
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +3377 -746
- package/lib/index.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/utils/checkDuplicates/checkDuplicates.d.ts +1 -0
- package/package.json +2 -1
- package/src/assets/Themes/BaseTheme.scss +14 -0
- package/src/assets/Themes/DarkTheme.scss +68 -41
- package/src/assets/icons/add_file.svg +4 -17
- package/src/assets/icons/add_variable.svg +11 -0
- package/src/assets/icons/authorization.svg +4 -0
- package/src/assets/icons/authorization_icon.svg +1 -0
- package/src/assets/icons/backward.svg +10 -0
- package/src/assets/icons/capture_icon.svg +3 -0
- package/src/assets/icons/depends_on_script.svg +7 -0
- package/src/assets/icons/download_file_icon.svg +2 -9
- package/src/assets/icons/email_group.svg +3 -0
- package/src/assets/icons/executions_icon.svg +3 -0
- package/src/assets/icons/forward.svg +3 -0
- package/src/assets/icons/labels.svg +8 -0
- package/src/assets/icons/machine_disable_icon.svg +18 -0
- package/src/assets/icons/machine_enable_icon.svg +10 -0
- package/src/assets/icons/parameters.svg +3 -0
- package/src/assets/icons/pre_post_condition.svg +8 -0
- package/src/assets/icons/program_element.svg +8 -0
- package/src/assets/icons/project_status_icon.svg +10 -0
- package/src/assets/icons/refresh_icon.svg +4 -0
- package/src/assets/icons/rotate_icon.svg +10 -0
- package/src/assets/icons/suites_icon.svg +3 -0
- package/src/assets/icons/swipe_icon.svg +9 -0
- package/src/assets/icons/tap_icon.svg +4 -0
- package/src/assets/icons/test_data.svg +5 -0
- package/src/assets/icons/test_data_set.svg +7 -0
- package/src/assets/icons/variable_set.svg +5 -0
- package/src/assets/styles/_colors.scss +0 -1
- package/src/components/Accordion/Accordion.stories.tsx +4 -0
- package/src/components/Accordion/Accordion.tsx +7 -1
- package/src/components/Accordion/types.ts +12 -0
- package/src/components/AddVariables/AddVariables.scss +14 -0
- package/src/components/AddVariables/AddVariables.stories.tsx +44 -0
- package/src/components/AddVariables/AddVariables.tsx +113 -0
- package/src/components/AddVariables/index.ts +1 -0
- package/src/components/AddVariables/types.ts +36 -0
- package/src/components/AllProjectsDropdown/AllProjectsDropdown.scss +1 -1
- package/src/components/AppHeader/AppHeader.scss +40 -1
- package/src/components/AppHeader/AppHeader.stories.tsx +133 -5
- package/src/components/AppHeader/AppHeader.tsx +111 -112
- package/src/components/AppHeader/types.ts +10 -9
- package/src/components/AttachImage/AttachImage.stories.tsx +2 -0
- package/src/components/AttachImage/AttachImage.tsx +5 -9
- package/src/components/AttachImage/types.ts +25 -18
- package/src/components/Avatar/Avatar.scss +4 -0
- package/src/components/Avatar/Avatar.stories.tsx +38 -18
- package/src/components/Avatar/Avatar.tsx +19 -3
- package/src/components/Avatar/types.ts +9 -1
- package/src/components/Charts/DonutChart/DonutChart.tsx +8 -3
- package/src/components/Charts/RadialChart/RadialChart.scss +4 -0
- package/src/components/Charts/RadialChart/RadialChart.tsx +51 -45
- package/src/components/Checkbox/Checkbox.scss +57 -0
- package/src/components/Checkbox/Checkbox.stories.tsx +91 -15
- package/src/components/Checkbox/Checkbox.tsx +4 -1
- package/src/components/Checkbox/types.ts +4 -0
- package/src/components/Comment/Comments.scss +166 -0
- package/src/components/Comment/Comments.stories.tsx +212 -0
- package/src/components/Comment/Comments.tsx +51 -0
- package/src/components/Comment/comment/Comment.tsx +206 -0
- package/src/components/Comment/comment/useNode.ts +51 -0
- package/src/components/Comment/index.ts +1 -0
- package/src/components/Comment/type.ts +36 -0
- package/src/components/CreateVariable/CreateVariableSlider.scss +18 -0
- package/src/components/CreateVariable/CreateVariableSlider.stories.tsx +66 -0
- package/src/components/CreateVariable/CreateVariableSlider.tsx +95 -0
- package/src/components/CreateVariable/index.ts +1 -0
- package/src/components/CreateVariable/types.ts +58 -0
- package/src/components/Drawer/Drawer.scss +3 -2
- package/src/components/Drawer/Drawer.stories.tsx +0 -1
- package/src/components/Drawer/Drawer.tsx +4 -1
- package/src/components/Drawer/Types.ts +13 -0
- package/src/components/Editor/Editor.stories.tsx +2 -2
- package/src/components/Editor/Editor.tsx +4 -2
- package/src/components/Editor/VariableDropdown.scss +8 -2
- package/src/components/Editor/VariableDropdown.tsx +15 -7
- package/src/components/Editor/constants.ts +1 -1
- package/src/components/Editor/types.ts +12 -2
- package/src/components/Excel/ExcelFile/ExcelFile.scss +3 -1
- package/src/components/Excel/ExcelFile/ExcelFile.tsx +37 -21
- package/src/components/Excel/ExcelFile/ExcelFileComponents/ActiveCell.tsx +12 -0
- package/src/components/Excel/ExcelFile/ExcelFileComponents/Cell.tsx +2 -34
- package/src/components/Excel/ExcelFile/ExcelFileComponents/FloatingRect.tsx +26 -1
- package/src/components/Excel/ExcelFile/ExcelFileComponents/RowIndicator.tsx +1 -1
- package/src/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.scss +25 -21
- package/src/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.tsx +1 -3
- package/src/components/Excel/ExcelFile/ExcelFileComponents/actions.ts +13 -0
- package/src/components/Excel/ExcelFile/ExcelFileComponents/reducer.ts +53 -26
- package/src/components/Excel/ExcelFile/ExcelFileComponents/reducerFunctions.ts +81 -14
- package/src/components/Excel/ExcelFile/ExcelFileComponents/types.ts +17 -6
- package/src/components/Excel/ExcelFile.stories.tsx +4 -4
- package/src/components/Excel/ExcelToolBar/ExcelToolBar.tsx +36 -19
- package/src/components/Excel/dataConversion.ts +43 -20
- package/src/components/FieldSet/FieldSet.scss +2 -1
- package/src/components/FieldSet/FieldSet.stories.tsx +2 -1
- package/src/components/FileDropzone/FileDropzone.scss +0 -1
- package/src/components/Icon/iconList.ts +45 -2
- package/src/components/IconButton/IconButton.scss +11 -11
- package/src/components/IconButton/IconButton.stories.tsx +1 -0
- package/src/components/IconButton/IconButton.tsx +6 -8
- package/src/components/IconButton/types.ts +2 -1
- package/src/components/IconRadioGroup/IconRadioGroup.scss +2 -1
- package/src/components/Input/Input.tsx +99 -88
- package/src/components/LabelEditTextField/LabelEditTextField.tsx +1 -1
- package/src/components/MiniModal/MiniModal.scss +0 -4
- package/src/components/MiniModal/MiniModal.stories.tsx +3 -2
- package/src/components/MiniModal/MiniModal.tsx +28 -10
- package/src/components/MiniModal/types.ts +7 -0
- package/src/components/Modal/Modal.stories.tsx +2 -1
- package/src/components/MultiSelect/MultiSelect.scss +29 -0
- package/src/components/MultiSelect/MultiSelect.stories.tsx +19 -5
- package/src/components/MultiSelect/MultiSelect.tsx +29 -19
- package/src/components/PhoneInput/PhoneInput.d.ts +3 -0
- package/src/components/PhoneInput/PhoneInput.stories.tsx +95 -0
- package/src/components/PhoneInput/PhoneInput.tsx +90 -0
- package/src/components/PhoneInput/index.ts +1 -0
- package/src/components/PhoneInput/phoneInput.scss +3 -0
- package/src/components/PhoneInput/types.ts +10 -0
- package/src/components/PopUpModal/PopUpModal.stories.tsx +14 -13
- package/src/components/PopUpModal/PopUpModal.tsx +2 -1
- package/src/components/PopUpModal/types.ts +14 -13
- package/src/components/Select/Select.scss +20 -0
- package/src/components/Select/Select.stories.tsx +50 -1
- package/src/components/Select/Select.tsx +34 -7
- package/src/components/Select/components/Dropdown.scss +9 -0
- package/src/components/Select/components/Dropdown.tsx +20 -6
- package/src/components/Select/components/types.ts +1 -0
- package/src/components/Select/types.ts +12 -2
- package/src/components/TableTree/Components/TableBody.tsx +35 -0
- package/src/components/TableTree/Components/TableCell.tsx +59 -0
- package/src/components/TableTree/Components/TableHead.tsx +39 -0
- package/src/components/TableTree/Components/TableRow.tsx +37 -0
- package/src/components/TableTree/TableTree.scss +8 -5
- package/src/components/TableTree/TableTree.tsx +16 -46
- package/src/components/TableTree/Utils/getAllChildIds.ts +12 -0
- package/src/components/TableTree/Utils/renderSpaces.ts +0 -0
- package/src/components/TableTree/types.ts +43 -5
- package/src/components/TableWithAccordion/TableWithAccordion.scss +54 -0
- package/src/components/TableWithAccordion/TableWithAccordion.stories.tsx +94 -0
- package/src/components/TableWithAccordion/TableWithAccordion.tsx +174 -0
- package/src/components/TableWithAccordion/data.ts +37 -0
- package/src/components/TableWithAccordion/index.ts +1 -0
- package/src/components/TableWithAccordion/types.ts +70 -0
- package/src/components/Tabs/Tabs.scss +0 -1
- package/src/index.ts +14 -1
- package/src/utils/checkDuplicates/CheckDuplicates.stories.tsx +40 -0
- package/src/utils/checkDuplicates/checkDuplicates.ts +13 -0
|
@@ -54,7 +54,7 @@ const getTextAlignmentBack = (
|
|
|
54
54
|
|
|
55
55
|
export const getTextDecorationBack = (
|
|
56
56
|
textDecoration: string
|
|
57
|
-
): 'solid' | 'dotted' | 'dashed' | 'wavy' | 'NONE' => {
|
|
57
|
+
): 'solid' | 'dotted' | 'dashed' | 'wavy' | 'NONE' => {
|
|
58
58
|
switch (textDecoration.toLowerCase()) {
|
|
59
59
|
case 'solid':
|
|
60
60
|
return 'solid';
|
|
@@ -74,6 +74,40 @@ export const getTextDecorationBack = (
|
|
|
74
74
|
export function convertStyleToFrontend(
|
|
75
75
|
backendStyle: BackendStyle
|
|
76
76
|
): React.CSSProperties {
|
|
77
|
+
|
|
78
|
+
const { border } = backendStyle;
|
|
79
|
+
|
|
80
|
+
let borderTop = '';
|
|
81
|
+
let borderRight = '';
|
|
82
|
+
let borderBottom = '';
|
|
83
|
+
let borderLeft = '';
|
|
84
|
+
|
|
85
|
+
if (border.top !== 'NONE') {
|
|
86
|
+
borderTop =
|
|
87
|
+
border.top === 'THIN'
|
|
88
|
+
? '2px solid var(--input-hover-border-color)'
|
|
89
|
+
: '1px solid var(--excel-sheet-border)';
|
|
90
|
+
}
|
|
91
|
+
if (border.right !== 'NONE') {
|
|
92
|
+
borderRight =
|
|
93
|
+
border.right === 'THIN'
|
|
94
|
+
? '2px solid var(--input-hover-border-color)'
|
|
95
|
+
: '1px solid var(--excel-sheet-border)';
|
|
96
|
+
}
|
|
97
|
+
if (border.bottom !== 'NONE') {
|
|
98
|
+
borderBottom =
|
|
99
|
+
border.bottom === 'THIN'
|
|
100
|
+
? '2px solid var(--input-hover-border-color)'
|
|
101
|
+
: '1px solid var(--excel-sheet-border)';
|
|
102
|
+
}
|
|
103
|
+
if (border.left !== 'NONE') {
|
|
104
|
+
borderLeft =
|
|
105
|
+
border.left === 'THIN'
|
|
106
|
+
? '2px solid var(--input-hover-border-color)'
|
|
107
|
+
: '1px solid var(--excel-sheet-border)';
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// Return the converted styles
|
|
77
111
|
return {
|
|
78
112
|
fontSize: `${backendStyle.size}px`,
|
|
79
113
|
fontFamily: backendStyle.name,
|
|
@@ -81,24 +115,13 @@ export function convertStyleToFrontend(
|
|
|
81
115
|
backgroundColor: `#${backendStyle.backgroundColor}`,
|
|
82
116
|
fontWeight: backendStyle.bold ? 'bold' : 'normal',
|
|
83
117
|
fontStyle: backendStyle.italic ? 'italic' : 'normal',
|
|
84
|
-
textDecoration: backendStyle.underline
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
backendStyle.border.right === 'NONE'
|
|
92
|
-
? 'none'
|
|
93
|
-
: `1px solid ${backendStyle.borderColor}`,
|
|
94
|
-
borderBottom:
|
|
95
|
-
backendStyle.border.bottom === 'NONE'
|
|
96
|
-
? 'none'
|
|
97
|
-
: `1px solid ${backendStyle.borderColor}`,
|
|
98
|
-
borderLeft:
|
|
99
|
-
backendStyle.border.left === 'NONE'
|
|
100
|
-
? 'none'
|
|
101
|
-
: `1px solid ${backendStyle.borderColor}`,
|
|
118
|
+
textDecoration: backendStyle.underline
|
|
119
|
+
? `underline ${getTextDecoration(backendStyle.underline)}`
|
|
120
|
+
: 'none',
|
|
121
|
+
borderTop: borderTop,
|
|
122
|
+
borderRight: borderRight,
|
|
123
|
+
borderBottom: borderBottom,
|
|
124
|
+
borderLeft: borderLeft,
|
|
102
125
|
textAlign: getTextAlignment(backendStyle.alignment.horizontal),
|
|
103
126
|
};
|
|
104
127
|
}
|
|
@@ -133,7 +156,7 @@ export const convertStyleToBackend = (
|
|
|
133
156
|
size: parseInt(frontendStyle.fontSize?.toString() || '11', 10),
|
|
134
157
|
bold: frontendStyle.fontWeight === 'bold',
|
|
135
158
|
italic: frontendStyle.fontStyle === 'italic',
|
|
136
|
-
underline:
|
|
159
|
+
underline: 'solid',
|
|
137
160
|
color: frontendStyle.color?.replace('#', '') || '000000',
|
|
138
161
|
backgroundColor:
|
|
139
162
|
frontendStyle.backgroundColor?.replace('#', '') || 'FFFFFF',
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
2
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
3
|
import FieldSet from './FieldSet';
|
|
4
|
+
import Typography from '../Typography';
|
|
4
5
|
|
|
5
6
|
const meta: Meta<typeof FieldSet> = {
|
|
6
7
|
title: 'Components/FieldSet',
|
|
@@ -17,7 +18,7 @@ const defaultArgs = {
|
|
|
17
18
|
legendName: 'Default Legend',
|
|
18
19
|
height: '200px',
|
|
19
20
|
width: '300px',
|
|
20
|
-
children: 'Default content inside the FieldSet.'
|
|
21
|
+
children: <Typography>'Default content inside the FieldSet.'</Typography>,
|
|
21
22
|
};
|
|
22
23
|
|
|
23
24
|
export const Default: Story = {
|
|
@@ -219,9 +219,32 @@ import NoData from '../../assets/icons/no_data.svg?react';
|
|
|
219
219
|
import AddUser from '../../assets/icons/add_user.svg?react';
|
|
220
220
|
import RemoveUser from '../../assets/icons/remove_user.svg?react';
|
|
221
221
|
import AddToArchive from '../../assets/icons/add_archive.svg?react';
|
|
222
|
+
import AddVariableIcon from '../../assets/icons/add_variable.svg?react';
|
|
222
223
|
import DashboardIcon from '../../assets/icons/dashboard_icon.svg?react'; //TODO:this is temporary icon
|
|
223
224
|
import InfoUser from '../../assets/icons/info_user.svg?react';
|
|
224
225
|
import WebServiceIcon from '../../assets/icons/web_service_icon.svg?react';
|
|
226
|
+
import ProjectStatusIcon from '../../assets/icons/project_status_icon.svg?react';
|
|
227
|
+
import captureIcon from '../../assets/icons/capture_icon.svg?react';
|
|
228
|
+
import rotateIcon from '../../assets/icons/rotate_icon.svg?react';
|
|
229
|
+
import tapIcon from '../../assets/icons/tap_icon.svg?react';
|
|
230
|
+
import refreshIcon from '../../assets/icons/refresh_icon.svg?react';
|
|
231
|
+
import swipeIcon from '../../assets/icons/swipe_icon.svg?react';
|
|
232
|
+
import backward from '../../assets/icons/backward.svg?react';
|
|
233
|
+
import forward from '../../assets/icons/forward.svg?react';
|
|
234
|
+
|
|
235
|
+
import dependsOnScript from '../../assets/icons/depends_on_script.svg?react';
|
|
236
|
+
import parameters from '../../assets/icons/parameters.svg?react';
|
|
237
|
+
import prePostCondition from '../../assets/icons/pre_post_condition.svg?react';
|
|
238
|
+
import programElement from '../../assets/icons/program_element.svg?react';
|
|
239
|
+
import testData from '../../assets/icons/test_data.svg?react';
|
|
240
|
+
import testDataSet from '../../assets/icons/test_data_set.svg?react';
|
|
241
|
+
import emailGroup from '../../assets/icons/email_group.svg?react';
|
|
242
|
+
import variableSet from '../../assets/icons/variable_set.svg?react';
|
|
243
|
+
|
|
244
|
+
import machineEnableIcon from '../../assets/icons/machine_enable_icon.svg?react';
|
|
245
|
+
import machineDisableIcon from '../../assets/icons/machine_disable_icon.svg?react';
|
|
246
|
+
import suitesIcon from '../../assets/icons/suites_icon.svg?react';
|
|
247
|
+
import executionsIcon from '../../assets/icons/executions_icon.svg?react';
|
|
225
248
|
|
|
226
249
|
Components['success'] = ToastSuccessIcon;
|
|
227
250
|
Components['alert'] = Alert;
|
|
@@ -267,7 +290,7 @@ Components['delete'] = DeleteIcon;
|
|
|
267
290
|
Components['details'] = DetailsIcon;
|
|
268
291
|
Components['impactList'] = ImpactListIcon;
|
|
269
292
|
Components['beautify_icon'] = BeautifyIcon;
|
|
270
|
-
Components['
|
|
293
|
+
Components['add_variable_icon'] = AddVariable;
|
|
271
294
|
Components['replace_file'] = ReplaceFile;
|
|
272
295
|
Components['formate_painter'] = FormatePainter;
|
|
273
296
|
Components['bold'] = Bold;
|
|
@@ -439,8 +462,28 @@ Components['no_data'] = NoData;
|
|
|
439
462
|
Components['add_user'] = AddUser;
|
|
440
463
|
Components['add_to_archive'] = AddToArchive;
|
|
441
464
|
Components['remove_user'] = RemoveUser;
|
|
465
|
+
Components['add_variable'] = AddVariableIcon;
|
|
442
466
|
Components['dashboard_icon'] = DashboardIcon; //TODO:this is temporary icon
|
|
443
467
|
Components['info_user'] = InfoUser;
|
|
444
468
|
Components['web_service_icon'] = WebServiceIcon;
|
|
445
|
-
|
|
469
|
+
Components['project_status_icon'] = ProjectStatusIcon;
|
|
470
|
+
Components['capture_icon'] = captureIcon;
|
|
471
|
+
Components['backward'] = backward;
|
|
472
|
+
Components['forward'] = forward;
|
|
473
|
+
Components['refresh_icon'] = refreshIcon;
|
|
474
|
+
Components['rotate_icon'] = rotateIcon;
|
|
475
|
+
Components['tap_icon'] = tapIcon;
|
|
476
|
+
Components['swipe_icon'] = swipeIcon;
|
|
477
|
+
Components['depends_on_script'] = dependsOnScript;
|
|
478
|
+
Components['parameters'] = parameters;
|
|
479
|
+
Components['pre_post_condition'] = prePostCondition;
|
|
480
|
+
Components['program_element'] = programElement;
|
|
481
|
+
Components['test_data'] = testData;
|
|
482
|
+
Components['test_data_set'] = testDataSet;
|
|
483
|
+
Components['email_group'] = emailGroup;
|
|
484
|
+
Components['variable_set'] = variableSet;
|
|
485
|
+
Components['machine_enable_icon'] = machineEnableIcon;
|
|
486
|
+
Components['machine_disable_icon'] = machineDisableIcon;
|
|
487
|
+
Components['executions_icon'] = executionsIcon;
|
|
488
|
+
Components['suites_icon'] = suitesIcon;
|
|
446
489
|
export default Components;
|
|
@@ -9,32 +9,32 @@
|
|
|
9
9
|
cursor: pointer;
|
|
10
10
|
@include mixins.center-content();
|
|
11
11
|
gap: 8px;
|
|
12
|
-
background-color: var(--
|
|
12
|
+
background-color: var(--hover-color);
|
|
13
13
|
padding: 2px 8px 2px 2px;
|
|
14
|
-
border: 1px solid
|
|
14
|
+
border: 1px solid var(--secondary-icon-color);
|
|
15
15
|
.button-icon {
|
|
16
16
|
width: 20px;
|
|
17
17
|
height: 20px;
|
|
18
|
-
border: 1px solid
|
|
18
|
+
border: 1px solid var(--primary-icon-color);
|
|
19
19
|
border-radius: 50%;
|
|
20
20
|
@include mixins.center-content();
|
|
21
|
-
background-color: var(--
|
|
21
|
+
background-color: var(--secondary-icon-color);
|
|
22
22
|
.ff-icon-color {
|
|
23
23
|
path {
|
|
24
|
-
color: var(--
|
|
24
|
+
color: var(--primary-icon-color);
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
.icon-name {
|
|
29
|
-
color: var(--
|
|
29
|
+
color: var(--secondary-icon-color);
|
|
30
30
|
@include mixins.center-content();
|
|
31
31
|
}
|
|
32
32
|
&:hover {
|
|
33
|
-
border: 1px solid
|
|
34
|
-
background-color: var(--
|
|
33
|
+
border: 1px solid transparent;
|
|
34
|
+
background-color: var(--secondary-icon-color);
|
|
35
35
|
.icon-name {
|
|
36
36
|
font-weight: 600;
|
|
37
|
-
color: var(--
|
|
37
|
+
color: var(--primary-icon-color);
|
|
38
38
|
@include mixins.center-content();
|
|
39
39
|
}
|
|
40
40
|
.button-icon {
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
border: 1px solid transparent;
|
|
44
44
|
border-radius: 50%;
|
|
45
45
|
@include mixins.center-content();
|
|
46
|
-
background-color: var(--
|
|
46
|
+
background-color: var(--hover-color);
|
|
47
47
|
.ff-icon-color {
|
|
48
48
|
path {
|
|
49
|
-
color: var(--
|
|
49
|
+
color: var(--secondary-icon-color);
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { forwardRef } from 'react';
|
|
2
2
|
import Icon from '../Icon';
|
|
3
3
|
import './IconButton.scss';
|
|
4
4
|
import classNames from 'classnames';
|
|
5
5
|
import Typography from '../Typography';
|
|
6
6
|
import { IconButtonProps } from './types';
|
|
7
|
-
|
|
8
|
-
const IconButton: React.FC<IconButtonProps> = ({
|
|
7
|
+
const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(({
|
|
9
8
|
label,
|
|
10
9
|
iconName = 'plus_user_icon',
|
|
11
10
|
onClick,
|
|
12
|
-
}) => {
|
|
11
|
+
}, ref) => {
|
|
13
12
|
return (
|
|
14
|
-
<button onClick={onClick} className={classNames('ff-plus-icon')}>
|
|
13
|
+
<button onClick={onClick} className={classNames('ff-plus-icon')} ref={ref}>
|
|
15
14
|
<div className={classNames('button-icon')}>
|
|
16
15
|
<Icon
|
|
17
16
|
height={12}
|
|
@@ -30,6 +29,5 @@ const IconButton: React.FC<IconButtonProps> = ({
|
|
|
30
29
|
</Typography>
|
|
31
30
|
</button>
|
|
32
31
|
);
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
export default IconButton;
|
|
32
|
+
});
|
|
33
|
+
export default IconButton;
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
align-items: center;
|
|
17
17
|
cursor: pointer;
|
|
18
18
|
position: relative;
|
|
19
|
+
z-index: 5;
|
|
19
20
|
|
|
20
21
|
&.selected {
|
|
21
22
|
background-color: var(--brand-color);
|
|
@@ -57,7 +58,7 @@
|
|
|
57
58
|
right: 0;
|
|
58
59
|
height: 1px;
|
|
59
60
|
background-color: var(--border-color);
|
|
60
|
-
z-index:
|
|
61
|
+
z-index: 3;
|
|
61
62
|
border-radius: 2px 0px 0px 0px;
|
|
62
63
|
opacity: 0px;
|
|
63
64
|
}
|
|
@@ -1,103 +1,114 @@
|
|
|
1
|
+
import { forwardRef } from 'react';
|
|
1
2
|
import classNames from 'classnames';
|
|
2
3
|
import './Input.scss';
|
|
3
4
|
import { InputProps } from './types';
|
|
4
5
|
import { checkEmpty } from '../../utils/checkEmpty/checkEmpty';
|
|
5
6
|
|
|
6
|
-
const Input = (
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
7
|
+
const Input = forwardRef<HTMLInputElement, InputProps>(
|
|
8
|
+
(
|
|
9
|
+
{
|
|
10
|
+
type = 'text',
|
|
11
|
+
variant = 'primary',
|
|
12
|
+
name = '',
|
|
13
|
+
label,
|
|
14
|
+
disabled = false,
|
|
15
|
+
required = false,
|
|
16
|
+
placeholder = 'Enter input',
|
|
17
|
+
value = '',
|
|
18
|
+
helperText = '',
|
|
19
|
+
error,
|
|
20
|
+
noBorder,
|
|
21
|
+
className = '',
|
|
22
|
+
onChange,
|
|
23
|
+
onBlur,
|
|
24
|
+
onFocus,
|
|
25
|
+
autoComplete = 'off',
|
|
26
|
+
minValue = -Infinity,
|
|
27
|
+
maxValue = Infinity,
|
|
28
|
+
transparentBackground = false,
|
|
29
|
+
size = 'small',
|
|
30
|
+
isLabelRequired = true,
|
|
31
|
+
...props
|
|
32
|
+
},
|
|
33
|
+
ref
|
|
34
|
+
) => {
|
|
35
|
+
const isValueFilled = !checkEmpty(value);
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<div
|
|
39
|
+
className={classNames('ff-input-container', {
|
|
40
|
+
'ff-input-container--float': isValueFilled,
|
|
41
|
+
'ff-input-container--disabled': !!disabled,
|
|
42
|
+
})}
|
|
43
|
+
>
|
|
44
|
+
{isLabelRequired && (
|
|
45
|
+
<label
|
|
46
|
+
htmlFor={name}
|
|
47
|
+
className={classNames(
|
|
48
|
+
`ff-input-label-container ff-input-label-container--${size}`,
|
|
49
|
+
{
|
|
50
|
+
'ff-input-label-container--danger': !!error,
|
|
51
|
+
}
|
|
52
|
+
)}
|
|
53
|
+
>
|
|
54
|
+
{required && <span className="required-asterisk">*</span>}
|
|
55
|
+
<span
|
|
56
|
+
className={classNames(
|
|
57
|
+
`ff-input-label ff-input-label--${variant}`,
|
|
58
|
+
{
|
|
59
|
+
'ff-input-label--no-hover': !!value,
|
|
60
|
+
'ff-input-label--disabled': !!disabled,
|
|
61
|
+
'ff-input-label--danger': !!error,
|
|
62
|
+
}
|
|
63
|
+
)}
|
|
64
|
+
>
|
|
65
|
+
{label}
|
|
66
|
+
</span>
|
|
67
|
+
</label>
|
|
68
|
+
)}
|
|
69
|
+
|
|
70
|
+
<input
|
|
71
|
+
ref={ref} // Forward the ref here
|
|
72
|
+
name={name}
|
|
73
|
+
value={value}
|
|
74
|
+
type={type}
|
|
75
|
+
spellCheck={false}
|
|
76
|
+
id={name}
|
|
41
77
|
className={classNames(
|
|
42
|
-
`ff-input-
|
|
78
|
+
`ff-input ff-input-${variant} default-input ff-input--${size}`,
|
|
43
79
|
{
|
|
44
|
-
'ff-input
|
|
45
|
-
|
|
80
|
+
['ff-input--transparentBackground']: !!transparentBackground,
|
|
81
|
+
'ff-input--no-hover': !!value,
|
|
82
|
+
'ff-input--disabled': !!disabled,
|
|
83
|
+
'ff-input--danger': !!error,
|
|
84
|
+
'ff-input--no-border': !!noBorder,
|
|
85
|
+
'ff-input--placeholder': !isLabelRequired,
|
|
86
|
+
},
|
|
87
|
+
`${className}`
|
|
46
88
|
)}
|
|
47
|
-
|
|
48
|
-
{
|
|
89
|
+
placeholder={placeholder}
|
|
90
|
+
disabled={disabled}
|
|
91
|
+
onChange={onChange}
|
|
92
|
+
onFocus={onFocus}
|
|
93
|
+
onBlur={onBlur}
|
|
94
|
+
autoComplete={autoComplete}
|
|
95
|
+
min={minValue}
|
|
96
|
+
max={maxValue}
|
|
97
|
+
{...props}
|
|
98
|
+
/>
|
|
99
|
+
|
|
100
|
+
{helperText && error && (
|
|
49
101
|
<span
|
|
50
|
-
className={classNames(
|
|
51
|
-
'ff-input-
|
|
52
|
-
'ff-input-label--disabled': !!disabled,
|
|
53
|
-
'ff-input-label--danger': !!error,
|
|
102
|
+
className={classNames('ff-input-message', {
|
|
103
|
+
'ff-input-message--danger': !!error,
|
|
54
104
|
})}
|
|
55
105
|
>
|
|
56
|
-
{
|
|
106
|
+
{helperText}
|
|
57
107
|
</span>
|
|
58
|
-
</label>
|
|
59
|
-
)}
|
|
60
|
-
|
|
61
|
-
<input
|
|
62
|
-
name={name}
|
|
63
|
-
value={value}
|
|
64
|
-
type={type}
|
|
65
|
-
spellCheck={false}
|
|
66
|
-
id={name}
|
|
67
|
-
className={classNames(
|
|
68
|
-
`ff-input ff-input-${variant} default-input ff-input--${size}`,
|
|
69
|
-
{
|
|
70
|
-
['ff-input--transparentBackground']: !!transparentBackground,
|
|
71
|
-
'ff-input--no-hover': !!value,
|
|
72
|
-
'ff-input--disabled': !!disabled,
|
|
73
|
-
'ff-input--danger': !!error,
|
|
74
|
-
'ff-input--no-border': !!noBorder,
|
|
75
|
-
'ff-input--placeholder': !isLabelRequired,
|
|
76
|
-
},
|
|
77
|
-
`${className}`
|
|
78
108
|
)}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
onBlur={onBlur}
|
|
84
|
-
autoComplete={autoComplete}
|
|
85
|
-
min={minValue}
|
|
86
|
-
max={maxValue}
|
|
87
|
-
{...props}
|
|
88
|
-
/>
|
|
89
|
-
|
|
90
|
-
{helperText && error && (
|
|
91
|
-
<span
|
|
92
|
-
className={classNames('ff-input-message', {
|
|
93
|
-
'ff-input-message--danger': !!error,
|
|
94
|
-
})}
|
|
95
|
-
>
|
|
96
|
-
{helperText}
|
|
97
|
-
</span>
|
|
98
|
-
)}
|
|
99
|
-
</div>
|
|
100
|
-
);
|
|
101
|
-
};
|
|
109
|
+
</div>
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
);
|
|
102
113
|
|
|
103
114
|
export default Input;
|
|
@@ -35,7 +35,6 @@
|
|
|
35
35
|
&.popover-arrow-top {
|
|
36
36
|
bottom: 100%;
|
|
37
37
|
left: 30px;
|
|
38
|
-
border-width: 0 10px 10px 10px;
|
|
39
38
|
padding: 0 3px 0 0;
|
|
40
39
|
border-color: transparent transparent var(--ff-mini-modal-border)
|
|
41
40
|
transparent;
|
|
@@ -46,7 +45,6 @@
|
|
|
46
45
|
}
|
|
47
46
|
&.popover-arrow-left {
|
|
48
47
|
left: -15px; //align the arrow with modal for the right side modal
|
|
49
|
-
border-width: 10px 10px 10px 0;
|
|
50
48
|
border-color: transparent var(--ff-mini-modal-border) transparent
|
|
51
49
|
transparent;
|
|
52
50
|
filter: drop-shadow(-1px 0 1px var(--ff-mini-modal-arrow-shadow));
|
|
@@ -58,7 +56,6 @@
|
|
|
58
56
|
&.popover-arrow-bottom {
|
|
59
57
|
top: 100%;
|
|
60
58
|
left: 30px;
|
|
61
|
-
border-width: 10px 10px 0 10px;
|
|
62
59
|
border-color: var(--ff-mini-modal-border) transparent transparent
|
|
63
60
|
transparent; // Bottom part of the arrow with the correct color
|
|
64
61
|
filter: drop-shadow(0 2px 1px var(--ff-mini-modal-arrow-shadow));
|
|
@@ -70,7 +67,6 @@
|
|
|
70
67
|
&.popover-arrow-right {
|
|
71
68
|
right: -10px;
|
|
72
69
|
top: 66px;
|
|
73
|
-
border-width: 10px 0 10px 10px;
|
|
74
70
|
border-color: transparent transparent transparent
|
|
75
71
|
var(--ff-mini-modal-border);
|
|
76
72
|
filter: drop-shadow(2px 0 1px var(--ff-mini-modal-arrow-shadow));
|
|
@@ -55,7 +55,7 @@ const BasicModalComponent = () => {
|
|
|
55
55
|
isOverlay: true,
|
|
56
56
|
zIndexOverlay: 99,
|
|
57
57
|
}}
|
|
58
|
-
modalProperties={{ width: 300, height: 180 }}
|
|
58
|
+
modalProperties={{ width: 300, height: 180, left: 180, top: 250 }}
|
|
59
59
|
headerProps={
|
|
60
60
|
<>
|
|
61
61
|
<Typography as="p">Modal 1</Typography>
|
|
@@ -271,7 +271,8 @@ export const CustomModalWithArrow = () => {
|
|
|
271
271
|
isOverlay: true,
|
|
272
272
|
zIndexOverlay: 99,
|
|
273
273
|
}}
|
|
274
|
-
modalProperties={{ width: 300, height: 250 }}
|
|
274
|
+
modalProperties={{ width: 300, height: 250, left: 180 }}
|
|
275
|
+
arrowProperties={{ left: 270, size: 6 }}
|
|
275
276
|
arrowZIndex={1000}
|
|
276
277
|
headerProps={
|
|
277
278
|
<>
|
|
@@ -31,6 +31,7 @@ const MiniModal = forwardRef<HTMLDivElement, MiniEditModalProps>(
|
|
|
31
31
|
extraLeftSpace,
|
|
32
32
|
isIconModel,
|
|
33
33
|
wrapperProperties,
|
|
34
|
+
arrowProperties,
|
|
34
35
|
arrowZIndex,
|
|
35
36
|
overlay,
|
|
36
37
|
outSideClick,
|
|
@@ -43,7 +44,21 @@ const MiniModal = forwardRef<HTMLDivElement, MiniEditModalProps>(
|
|
|
43
44
|
});
|
|
44
45
|
const [isVisible, setIsVisible] = useState(false);
|
|
45
46
|
const modalRef = useRef<HTMLDivElement>(null);
|
|
47
|
+
const {
|
|
48
|
+
width: modalWidth,
|
|
49
|
+
height: modalHeight,
|
|
50
|
+
borderRadius: modalBorderRadius = 4,
|
|
51
|
+
zIndex: modalZIndex = 99,
|
|
52
|
+
boxShadow: modalBoxShadow,
|
|
53
|
+
left: modalLeft,
|
|
54
|
+
top: modalTop,
|
|
55
|
+
} = modalProperties || {};
|
|
46
56
|
|
|
57
|
+
const {
|
|
58
|
+
left: popOverLeft,
|
|
59
|
+
top: popOverTop,
|
|
60
|
+
size: popOverSize = 10,
|
|
61
|
+
} = arrowProperties || {};
|
|
47
62
|
// Function to calculate available space
|
|
48
63
|
const getAvailableSpace = (rect: Rect): AvailableSpace => {
|
|
49
64
|
const { top, left, bottom, right } = rect;
|
|
@@ -196,14 +211,6 @@ const MiniModal = forwardRef<HTMLDivElement, MiniEditModalProps>(
|
|
|
196
211
|
};
|
|
197
212
|
}, [calculatePosition]);
|
|
198
213
|
|
|
199
|
-
const {
|
|
200
|
-
width: modalWidth,
|
|
201
|
-
height: modalHeight,
|
|
202
|
-
borderRadius: modalBorderRadius = 4,
|
|
203
|
-
zIndex: modalZIndex = 99,
|
|
204
|
-
boxShadow: modalBoxShadow,
|
|
205
|
-
} = modalProperties || {};
|
|
206
|
-
|
|
207
214
|
const {
|
|
208
215
|
width: wrapperWidth = 35,
|
|
209
216
|
zIndex: wrapperZIndex = 101,
|
|
@@ -234,8 +241,8 @@ const MiniModal = forwardRef<HTMLDivElement, MiniEditModalProps>(
|
|
|
234
241
|
animatedModal: isAnimated,
|
|
235
242
|
})}
|
|
236
243
|
style={{
|
|
237
|
-
top: `${calculatedModalTop}px`,
|
|
238
|
-
left: `${calculatedModalLeft}px`,
|
|
244
|
+
top: `${modalTop ?? calculatedModalTop}px`,
|
|
245
|
+
left: `${modalLeft ?? calculatedModalLeft}px`,
|
|
239
246
|
}}
|
|
240
247
|
>
|
|
241
248
|
{isPopOver && (
|
|
@@ -251,6 +258,17 @@ const MiniModal = forwardRef<HTMLDivElement, MiniEditModalProps>(
|
|
|
251
258
|
} ${getArrowClassName()}`}
|
|
252
259
|
style={{
|
|
253
260
|
zIndex: `${arrowZIndex}`,
|
|
261
|
+
top: `${popOverTop && popOverTop}px`,
|
|
262
|
+
left: `${popOverLeft && popOverLeft}px`,
|
|
263
|
+
borderWidth: `${
|
|
264
|
+
modalPosition === 'right'
|
|
265
|
+
? `${popOverSize}px ${popOverSize}px ${popOverSize}px 0`
|
|
266
|
+
: modalPosition === 'top'
|
|
267
|
+
? `${popOverSize}px ${popOverSize}px 0 ${popOverSize}px`
|
|
268
|
+
: modalPosition === 'left'
|
|
269
|
+
? `${popOverSize}px 0 ${popOverSize}px ${popOverSize}px`
|
|
270
|
+
: `0 ${popOverSize}px ${popOverSize}px ${popOverSize}px`
|
|
271
|
+
}`,
|
|
254
272
|
}}
|
|
255
273
|
/>
|
|
256
274
|
)}
|