pixel-react-excel-sheet 1.0.11 → 1.0.13
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/Charts/BarChart/BarChart.d.ts +1 -0
- package/lib/components/Charts/DashboardDonutChart/types.d.ts +6 -0
- 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/FileDropzone/RadioFilePreview.d.ts +4 -0
- package/lib/components/FileDropzone/types.d.ts +61 -0
- 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/MenuOption/types.d.ts +3 -2
- 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/Search/Search.d.ts +1 -1
- package/lib/components/Search/types.d.ts +4 -0
- package/lib/components/Select/components/types.d.ts +1 -0
- package/lib/components/Select/types.d.ts +2 -0
- package/lib/components/Table/Types.d.ts +1 -1
- 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/components/Tabs/types.d.ts +1 -0
- package/lib/index.d.ts +395 -39
- package/lib/index.esm.js +3859 -1017
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +3866 -1016
- package/lib/index.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/utils/FormatString/FormatString.d.ts +1 -0
- package/lib/utils/checkDuplicates/checkDuplicates.d.ts +1 -0
- package/package.json +2 -1
- package/src/StyleGuide/ColorPalette/colorPaletteList.ts +15 -0
- package/src/assets/Themes/BaseTheme.scss +16 -0
- package/src/assets/Themes/DarkTheme.scss +71 -42
- 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/icons/window_maximize.svg +1 -2
- package/src/assets/icons/window_restore.svg +4 -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/BarChart/BarChart.scss +4 -1
- package/src/components/Charts/BarChart/BarChart.tsx +23 -9
- package/src/components/Charts/DashboardDonutChart/DashboardDonutChart.scss +10 -3
- package/src/components/Charts/DashboardDonutChart/DashboardDonutChart.stories.tsx +2 -1
- package/src/components/Charts/DashboardDonutChart/DashboardDonutChart.tsx +54 -25
- package/src/components/Charts/DashboardDonutChart/types.ts +7 -1
- package/src/components/Charts/DonutChart/DonutChart.tsx +8 -3
- package/src/components/Charts/LineChart/LineChart.scss +13 -9
- package/src/components/Charts/LineChart/LineChart.tsx +6 -2
- 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/DatePicker/DatePicker.scss +11 -0
- package/src/components/DatePicker/DatePicker.stories.tsx +19 -0
- package/src/components/DatePicker/DatePicker.tsx +73 -22
- 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 +0 -1
- package/src/components/Excel/ExcelFile/ExcelFile.tsx +41 -25
- 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/Spreadsheet.scss +24 -22
- 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/Dropzone.tsx +76 -28
- package/src/components/FileDropzone/FileDropzone.scss +30 -3
- package/src/components/FileDropzone/FileDropzone.stories.tsx +125 -4
- package/src/components/FileDropzone/FileDropzone.tsx +46 -13
- package/src/components/FileDropzone/RadioFilePreview.tsx +76 -0
- package/src/components/FileDropzone/types.ts +73 -0
- package/src/components/Icon/iconList.ts +47 -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.scss +137 -125
- package/src/components/Input/Input.tsx +110 -93
- package/src/components/InputWithDropdown/InputWithDropdown.scss +9 -2
- package/src/components/InputWithDropdown/types.ts +3 -3
- package/src/components/LabelEditTextField/LabelEditTextField.tsx +1 -1
- package/src/components/MenuOption/MenuOption.stories.tsx +4 -3
- package/src/components/MenuOption/MenuOption.tsx +1 -1
- package/src/components/MenuOption/types.ts +4 -2
- 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/ModulesChip/ModuleChip.scss +21 -8
- package/src/components/ModulesChip/ModuleChip.stories.tsx +2 -2
- package/src/components/ModulesChip/ModuleChip.tsx +6 -9
- package/src/components/MultiSelect/Dropdown.tsx +12 -5
- package/src/components/MultiSelect/MultiSelect.scss +29 -0
- package/src/components/MultiSelect/MultiSelect.stories.tsx +31 -14
- package/src/components/MultiSelect/MultiSelect.tsx +32 -21
- 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/Search/Search.stories.tsx +28 -9
- package/src/components/Search/Search.tsx +32 -29
- package/src/components/Search/types.ts +4 -0
- 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/Table/Table.scss +6 -5
- package/src/components/Table/Types.ts +1 -1
- 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 +58 -5
- package/src/components/Tabs/Tabs.stories.tsx +31 -12
- package/src/components/Tabs/Tabs.tsx +27 -18
- package/src/components/Tabs/types.ts +1 -1
- package/src/components/TextArea/Textarea.stories.tsx +1 -1
- package/src/hooks/useFileDropzone.tsx +2 -1
- package/src/index.ts +18 -1
- package/src/utils/FormatString/FormatString.stories.tsx +58 -0
- package/src/utils/FormatString/FormatString.tsx +41 -0
- package/src/utils/checkDuplicates/CheckDuplicates.stories.tsx +40 -0
- package/src/utils/checkDuplicates/checkDuplicates.ts +13 -0
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
appHeaderHiddenMenuItemProps,
|
|
3
|
-
AppHeaderProps,
|
|
4
|
-
appHeaderSubMenuItemProps,
|
|
5
|
-
} from './types';
|
|
1
|
+
import { AppHeaderProps } from './types';
|
|
6
2
|
import Icon from '../Icon';
|
|
7
3
|
import './AppHeader.scss';
|
|
8
4
|
import classNames from 'classnames';
|
|
@@ -11,14 +7,16 @@ import { checkEmpty } from '../../utils/checkEmpty/checkEmpty';
|
|
|
11
7
|
import AllProjectsDropdown from '../AllProjectsDropdown';
|
|
12
8
|
import MenuOption from '../MenuOption';
|
|
13
9
|
import Tooltip from '../Tooltip';
|
|
14
|
-
import React
|
|
10
|
+
import React from 'react';
|
|
15
11
|
|
|
16
12
|
const AppHeader: React.FC<AppHeaderProps> = ({
|
|
17
13
|
logoIconName = 'fireflink_icon',
|
|
14
|
+
width,
|
|
18
15
|
leftContent,
|
|
19
16
|
rightContent,
|
|
20
17
|
projectsList,
|
|
21
18
|
appHeaderMenuItems,
|
|
19
|
+
appHeaderHiddenMenuItems,
|
|
22
20
|
selectedMenu,
|
|
23
21
|
selectedSubMenu,
|
|
24
22
|
selectedQuickMenu,
|
|
@@ -30,15 +28,6 @@ const AppHeader: React.FC<AppHeaderProps> = ({
|
|
|
30
28
|
onProjectDropdownLabelClick = () => {},
|
|
31
29
|
onMoreMenuOptionClick = () => {},
|
|
32
30
|
}) => {
|
|
33
|
-
const [appHeaderHiddenMenuItems, setAppHeaderHiddenMenuItems] = useState<
|
|
34
|
-
appHeaderHiddenMenuItemProps[]
|
|
35
|
-
>([]);
|
|
36
|
-
const onSubMenuClickHandler = (subMenu: appHeaderSubMenuItemProps) => {
|
|
37
|
-
setAppHeaderHiddenMenuItems(
|
|
38
|
-
subMenu.hiddenMenuItems ? subMenu.hiddenMenuItems : []
|
|
39
|
-
);
|
|
40
|
-
onSubMenuClick(subMenu);
|
|
41
|
-
};
|
|
42
31
|
return (
|
|
43
32
|
<div className="ff-app-header-main">
|
|
44
33
|
<div className="ff-app-header">
|
|
@@ -51,7 +40,7 @@ const AppHeader: React.FC<AppHeaderProps> = ({
|
|
|
51
40
|
)}
|
|
52
41
|
</div>
|
|
53
42
|
{!checkEmpty(appHeaderMenuItems) && (
|
|
54
|
-
<div className="ff-app-header-nav-bar">
|
|
43
|
+
<div className="ff-app-header-nav-bar" style={{ width: width }}>
|
|
55
44
|
{projectsList && !checkEmpty(projectsList) && (
|
|
56
45
|
<div>
|
|
57
46
|
{
|
|
@@ -68,106 +57,116 @@ const AppHeader: React.FC<AppHeaderProps> = ({
|
|
|
68
57
|
<div className="ff-app-header-nav-bar-items fontSm">
|
|
69
58
|
{appHeaderMenuItems.map((menuItem) => {
|
|
70
59
|
return (
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
className="ff-app-header-nav-bar-item-label"
|
|
81
|
-
lineHeight="18px"
|
|
82
|
-
onClick={() => onMenuClick(menuItem)}
|
|
60
|
+
!appHeaderHiddenMenuItems?.find(
|
|
61
|
+
(menu) => menu.label === menuItem.label
|
|
62
|
+
) && (
|
|
63
|
+
<div
|
|
64
|
+
className={classNames('ff-app-header-nav-bar-item', {
|
|
65
|
+
['ff-app-header-nav-bar-item--selected']:
|
|
66
|
+
menuItem.label === selectedMenu,
|
|
67
|
+
})}
|
|
68
|
+
key={menuItem.label}
|
|
83
69
|
>
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
['ff-app-header-nav-bar-submenu-item--selected']:
|
|
101
|
-
subMenuItem.label === selectedSubMenu,
|
|
102
|
-
}
|
|
103
|
-
)}
|
|
104
|
-
lineHeight="18px"
|
|
105
|
-
onClick={() =>
|
|
106
|
-
onSubMenuClickHandler(subMenuItem)
|
|
107
|
-
}
|
|
70
|
+
<Typography
|
|
71
|
+
as="div"
|
|
72
|
+
className="ff-app-header-nav-bar-item-label"
|
|
73
|
+
lineHeight="18px"
|
|
74
|
+
onClick={() => onMenuClick(menuItem)}
|
|
75
|
+
>
|
|
76
|
+
{menuItem.label}
|
|
77
|
+
</Typography>
|
|
78
|
+
{menuItem.label === selectedMenu &&
|
|
79
|
+
menuItem?.subMenuItems && (
|
|
80
|
+
<>
|
|
81
|
+
{menuItem.subMenuItems.map((subMenuItem) => {
|
|
82
|
+
return (
|
|
83
|
+
<div
|
|
84
|
+
key={subMenuItem.label}
|
|
85
|
+
className="ff-app-header-submenu-container"
|
|
108
86
|
>
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
87
|
+
<Typography
|
|
88
|
+
as="div"
|
|
89
|
+
className={classNames(
|
|
90
|
+
'ff-app-header-nav-bar-submenu-item',
|
|
91
|
+
{
|
|
92
|
+
['ff-app-header-nav-bar-submenu-item--selected']:
|
|
93
|
+
subMenuItem.label === selectedSubMenu,
|
|
94
|
+
}
|
|
95
|
+
)}
|
|
96
|
+
lineHeight="18px"
|
|
97
|
+
onClick={() => onSubMenuClick(subMenuItem)}
|
|
98
|
+
>
|
|
99
|
+
{subMenuItem.label}
|
|
100
|
+
</Typography>
|
|
101
|
+
</div>
|
|
102
|
+
);
|
|
103
|
+
})}
|
|
104
|
+
{menuItem.subMenuItems.map((subMenuItem) => {
|
|
105
|
+
return (
|
|
106
|
+
<div
|
|
107
|
+
key={subMenuItem.label}
|
|
108
|
+
className="ff-app-header-submenu-container"
|
|
109
|
+
>
|
|
110
|
+
{subMenuItem.label === selectedSubMenu &&
|
|
111
|
+
subMenuItem?.quickMenuItems && (
|
|
112
|
+
<div
|
|
113
|
+
// className="ff-app-header-quickmenu-container"
|
|
114
|
+
className={classNames(
|
|
115
|
+
'ff-app-header-quickmenu-container',
|
|
116
|
+
subMenuItem.quickMenuItems?.length
|
|
117
|
+
? 'visible'
|
|
118
|
+
: ''
|
|
119
|
+
)}
|
|
120
|
+
>
|
|
121
|
+
<div>
|
|
122
|
+
<Icon name="vertical_separator" />
|
|
123
|
+
</div>
|
|
124
|
+
{subMenuItem.quickMenuItems.map(
|
|
125
|
+
(quickMenuItem) => {
|
|
126
|
+
return (
|
|
127
|
+
<>
|
|
128
|
+
<div
|
|
129
|
+
key={quickMenuItem.iconName}
|
|
130
|
+
onClick={() =>
|
|
131
|
+
onQuickMenuClick(
|
|
132
|
+
quickMenuItem
|
|
133
|
+
)
|
|
143
134
|
}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
name={
|
|
151
|
-
quickMenuItem.iconName
|
|
135
|
+
className={classNames(
|
|
136
|
+
'ff-app-header-nav-bar-quickmenu-item',
|
|
137
|
+
{
|
|
138
|
+
['ff-app-header-nav-bar-quickmenu-item--selected']:
|
|
139
|
+
quickMenuItem.iconName ===
|
|
140
|
+
selectedQuickMenu,
|
|
152
141
|
}
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
142
|
+
)}
|
|
143
|
+
>
|
|
144
|
+
<Tooltip
|
|
145
|
+
title={quickMenuItem?.label}
|
|
146
|
+
>
|
|
147
|
+
<Icon
|
|
148
|
+
name={
|
|
149
|
+
quickMenuItem.iconName
|
|
150
|
+
}
|
|
151
|
+
height={16}
|
|
152
|
+
width={16}
|
|
153
|
+
hoverEffect={true}
|
|
154
|
+
/>
|
|
155
|
+
</Tooltip>
|
|
156
|
+
</div>
|
|
157
|
+
</>
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
)}
|
|
161
|
+
</div>
|
|
162
|
+
)}
|
|
163
|
+
</div>
|
|
164
|
+
);
|
|
165
|
+
})}
|
|
166
|
+
</>
|
|
167
|
+
)}
|
|
168
|
+
</div>
|
|
169
|
+
)
|
|
171
170
|
);
|
|
172
171
|
})}
|
|
173
172
|
</div>
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { optionsType } from '../AllProjectsDropdown/types';
|
|
3
3
|
export interface AppHeaderProps {
|
|
4
|
+
width?: string;
|
|
4
5
|
logoIconName: string;
|
|
5
6
|
leftContent?: ReactNode;
|
|
6
7
|
rightContent?: ReactNode;
|
|
7
8
|
projectsList?: optionsType[];
|
|
8
9
|
appHeaderMenuItems: appHeaderMenuItemProps[];
|
|
9
|
-
|
|
10
|
+
appHeaderHiddenMenuItems?: appHeaderHiddenMenuItemProps[];
|
|
10
11
|
selectedMenu: string;
|
|
11
12
|
selectedSubMenu?: string;
|
|
12
13
|
selectedQuickMenu?: string;
|
|
@@ -22,16 +23,16 @@ export interface appHeaderMenuItemProps {
|
|
|
22
23
|
label: string;
|
|
23
24
|
path?: string;
|
|
24
25
|
disable?: boolean;
|
|
25
|
-
disableText?:string;
|
|
26
|
-
hide?:boolean;
|
|
26
|
+
disableText?: string;
|
|
27
|
+
hide?: boolean;
|
|
27
28
|
subMenuItems?: appHeaderSubMenuItemProps[];
|
|
28
29
|
}
|
|
29
30
|
export interface appHeaderSubMenuItemProps {
|
|
30
31
|
label: string;
|
|
31
32
|
path?: string;
|
|
32
33
|
disable?: boolean;
|
|
33
|
-
disableText?:string;
|
|
34
|
-
hide?:boolean;
|
|
34
|
+
disableText?: string;
|
|
35
|
+
hide?: boolean;
|
|
35
36
|
quickMenuItems?: appHeaderQuickMenuItemProps[];
|
|
36
37
|
hiddenMenuItems?: appHeaderHiddenMenuItemProps[];
|
|
37
38
|
}
|
|
@@ -40,14 +41,14 @@ export interface appHeaderQuickMenuItemProps {
|
|
|
40
41
|
path?: string;
|
|
41
42
|
iconName: string;
|
|
42
43
|
disable?: boolean;
|
|
43
|
-
disableText?:string;
|
|
44
|
-
hide?:boolean;
|
|
44
|
+
disableText?: string;
|
|
45
|
+
hide?: boolean;
|
|
45
46
|
}
|
|
46
47
|
export interface appHeaderHiddenMenuItemProps {
|
|
47
48
|
label: string;
|
|
48
49
|
value: string | string[];
|
|
49
50
|
icon: string;
|
|
50
51
|
disable?: boolean;
|
|
51
|
-
disableText?:string;
|
|
52
|
-
hide?:boolean;
|
|
52
|
+
disableText?: string;
|
|
53
|
+
hide?: boolean;
|
|
53
54
|
}
|
|
@@ -2,23 +2,19 @@ import React from 'react';
|
|
|
2
2
|
import './AttachImage.scss';
|
|
3
3
|
import Icon from '../Icon/Icon';
|
|
4
4
|
import Tooltip from '../Tooltip';
|
|
5
|
-
|
|
6
|
-
export interface AttachImageProps {
|
|
7
|
-
imageSrc: string;
|
|
8
|
-
onExpandClick: () => void;
|
|
9
|
-
onDeleteClick: () => void;
|
|
10
|
-
onDownloadClick: () => void;
|
|
11
|
-
}
|
|
5
|
+
import { AttachImageProps } from './types';
|
|
12
6
|
|
|
13
7
|
const AttachImage: React.FC<AttachImageProps> = ({
|
|
14
8
|
imageSrc,
|
|
15
9
|
onExpandClick,
|
|
16
10
|
onDeleteClick,
|
|
17
11
|
onDownloadClick,
|
|
12
|
+
height = '75px',
|
|
13
|
+
width = '79px',
|
|
18
14
|
}) => {
|
|
19
15
|
return (
|
|
20
|
-
<div className="ff-attach-image-container">
|
|
21
|
-
<div className="ff-image-wrapper">
|
|
16
|
+
<div className="ff-attach-image-container" style={{ height, width }}>
|
|
17
|
+
<div className="ff-image-wrapper" style={{ height, width }}>
|
|
22
18
|
<img src={imageSrc} alt="Attached" />
|
|
23
19
|
<div className="ff-hover-icons">
|
|
24
20
|
<div className="ff-top-icons">
|
|
@@ -1,19 +1,26 @@
|
|
|
1
1
|
export interface AttachImageProps {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
2
|
+
/**
|
|
3
|
+
* The image source to display.
|
|
4
|
+
*/
|
|
5
|
+
imageSrc: string;
|
|
6
|
+
/**
|
|
7
|
+
* Function triggered when the expand icon is clicked.
|
|
8
|
+
*/
|
|
9
|
+
onExpandClick: () => void;
|
|
10
|
+
/**
|
|
11
|
+
* Function triggered when the delete icon is clicked.
|
|
12
|
+
*/
|
|
13
|
+
onDeleteClick: () => void;
|
|
14
|
+
/**
|
|
15
|
+
* Function triggered when the download icon is clicked.
|
|
16
|
+
*/
|
|
17
|
+
onDownloadClick: () => void;
|
|
18
|
+
/**
|
|
19
|
+
* Custom height for the component.
|
|
20
|
+
*/
|
|
21
|
+
height?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Custom width for the component.
|
|
24
|
+
*/
|
|
25
|
+
width?: string;
|
|
26
|
+
}
|
|
@@ -9,12 +9,12 @@ const meta: Meta<typeof Avatar> = {
|
|
|
9
9
|
layout: 'centered',
|
|
10
10
|
},
|
|
11
11
|
argTypes: {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
variant: {
|
|
13
|
+
control: { type: 'radio' },
|
|
14
|
+
options: ['small', 'medium', 'large'],
|
|
15
|
+
},
|
|
15
16
|
},
|
|
16
|
-
}
|
|
17
|
-
}
|
|
17
|
+
};
|
|
18
18
|
export default meta;
|
|
19
19
|
|
|
20
20
|
type Story = StoryObj<typeof meta>;
|
|
@@ -41,16 +41,36 @@ export const Large: Story = {
|
|
|
41
41
|
};
|
|
42
42
|
|
|
43
43
|
export const CustomAvatarSize: Story = {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
44
|
+
args: {
|
|
45
|
+
customAvatarSize: 30,
|
|
46
|
+
iconName: 'accordion_header_icon',
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export const CustomIconSize: Story = {
|
|
51
|
+
args: {
|
|
52
|
+
customIconSize: 30,
|
|
53
|
+
customAvatarSize: 40,
|
|
54
|
+
iconName: 'accordion_header_icon',
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export const WithLabel: Story = {
|
|
59
|
+
args: {
|
|
60
|
+
label: 'AB',
|
|
61
|
+
customAvatarSize: 40,
|
|
62
|
+
labelFontSize: '16px',
|
|
63
|
+
backgroundColor: '#E0E0E0',
|
|
64
|
+
iconColor: '#333',
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export const LabelWithCustomSize: Story = {
|
|
69
|
+
args: {
|
|
70
|
+
label: 'XY',
|
|
71
|
+
customAvatarSize: 50,
|
|
72
|
+
labelFontSize: '20px',
|
|
73
|
+
backgroundColor: '#F5A623',
|
|
74
|
+
iconColor: '#FFF',
|
|
75
|
+
},
|
|
76
|
+
};
|
|
@@ -9,15 +9,31 @@ const Avatar: React.FC<AvatarProps> = ({
|
|
|
9
9
|
iconColor= 'var(--avatar-icon-color)',
|
|
10
10
|
customAvatarSize,
|
|
11
11
|
customIconSize,
|
|
12
|
-
backgroundColor
|
|
12
|
+
backgroundColor,
|
|
13
|
+
label,
|
|
14
|
+
labelFontSize,
|
|
13
15
|
}) => {
|
|
14
|
-
|
|
16
|
+
const truncatedLabel = label?.slice(0, 2);
|
|
15
17
|
return (
|
|
16
18
|
<div
|
|
17
19
|
className={`ff-avatar ff-avatar--${variant}`}
|
|
18
20
|
style={{ height: `${customAvatarSize}px`, width: `${customAvatarSize}px`, backgroundColor }}
|
|
19
21
|
>
|
|
20
|
-
|
|
22
|
+
{label ? (
|
|
23
|
+
<span
|
|
24
|
+
className="ff-avatar-label"
|
|
25
|
+
style={{ fontSize: labelFontSize || '14px', color: iconColor }}
|
|
26
|
+
>
|
|
27
|
+
{truncatedLabel}
|
|
28
|
+
</span>
|
|
29
|
+
) : (
|
|
30
|
+
<Icon
|
|
31
|
+
name={iconName!}
|
|
32
|
+
height={customIconSize}
|
|
33
|
+
width={customIconSize}
|
|
34
|
+
color={iconColor}
|
|
35
|
+
/>
|
|
36
|
+
)}
|
|
21
37
|
</div>
|
|
22
38
|
);
|
|
23
39
|
};
|
|
@@ -10,7 +10,7 @@ export interface AvatarProps {
|
|
|
10
10
|
/**
|
|
11
11
|
* This property specifies the name of the icon to be displayed within the avatar.
|
|
12
12
|
*/
|
|
13
|
-
iconName
|
|
13
|
+
iconName?: string;
|
|
14
14
|
/**
|
|
15
15
|
* This property allows you to customize the color of the icon within the avatar.
|
|
16
16
|
*/
|
|
@@ -24,4 +24,12 @@ export interface AvatarProps {
|
|
|
24
24
|
* This property allows you to set a custom size for the icon within the avatar.
|
|
25
25
|
*/
|
|
26
26
|
customIconSize?: number;
|
|
27
|
+
/**
|
|
28
|
+
* This property specifies the label to display inside the avatar, used as an alternative to the icon.
|
|
29
|
+
*/
|
|
30
|
+
label?: string;
|
|
31
|
+
/**
|
|
32
|
+
* This property allows you to customize the font size of the label inside the avatar.
|
|
33
|
+
*/
|
|
34
|
+
labelFontSize?: string;
|
|
27
35
|
}
|
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
flex-direction: column;
|
|
6
6
|
align-items: center;
|
|
7
7
|
|
|
8
|
+
svg {
|
|
9
|
+
display: block;
|
|
10
|
+
}
|
|
11
|
+
|
|
8
12
|
.ff-legend-container {
|
|
9
13
|
width: 100%;
|
|
10
14
|
display: flex;
|
|
@@ -15,7 +19,6 @@
|
|
|
15
19
|
margin-top: 10px;
|
|
16
20
|
display: flex;
|
|
17
21
|
justify-content: flex-end;
|
|
18
|
-
gap: 10px;
|
|
19
22
|
|
|
20
23
|
.ff-bar-chart-legend-item {
|
|
21
24
|
display: flex;
|
|
@@ -21,6 +21,7 @@ type BarChartProps = {
|
|
|
21
21
|
iconSize?: number;
|
|
22
22
|
backgroundColor?: string;
|
|
23
23
|
legendPosition?: 'top' | 'bottom';
|
|
24
|
+
legendGap?: number;
|
|
24
25
|
};
|
|
25
26
|
|
|
26
27
|
const BarChart: React.FC<BarChartProps> = ({
|
|
@@ -39,6 +40,7 @@ const BarChart: React.FC<BarChartProps> = ({
|
|
|
39
40
|
icons = [],
|
|
40
41
|
iconSize,
|
|
41
42
|
legendPosition = 'bottom',
|
|
43
|
+
legendGap = 5,
|
|
42
44
|
}) => {
|
|
43
45
|
const [tooltip, setTooltip] = useState<{
|
|
44
46
|
visible: boolean;
|
|
@@ -52,7 +54,7 @@ const BarChart: React.FC<BarChartProps> = ({
|
|
|
52
54
|
const topPadding = 40;
|
|
53
55
|
const leftPadding = 40;
|
|
54
56
|
const totalBarWidth = data.length * barWidth + (data.length - 1) * barGap;
|
|
55
|
-
const chartWidth = totalBarWidth + leftPadding * 2;
|
|
57
|
+
const chartWidth = totalBarWidth + leftPadding * 2 + 10;
|
|
56
58
|
|
|
57
59
|
const renderGradients = (gradients: string[][]) => {
|
|
58
60
|
return gradients.map((gradient, index) => (
|
|
@@ -119,13 +121,13 @@ const BarChart: React.FC<BarChartProps> = ({
|
|
|
119
121
|
};
|
|
120
122
|
|
|
121
123
|
return (
|
|
122
|
-
<div
|
|
123
|
-
className="ff-bar-chart-container"
|
|
124
|
-
style={{ width: chartWidth, height }}
|
|
125
|
-
>
|
|
124
|
+
<div className="ff-bar-chart-container" style={{ width: chartWidth }}>
|
|
126
125
|
{legend && legendPosition === 'top' && (
|
|
127
126
|
<div className="ff-legend-container">
|
|
128
|
-
<div
|
|
127
|
+
<div
|
|
128
|
+
className="ff-bar-chart-legend"
|
|
129
|
+
style={{ gap: `${legendGap}px` }}
|
|
130
|
+
>
|
|
129
131
|
{data.map((item, index) => (
|
|
130
132
|
<div key={item.label} className="ff-bar-chart-legend-item">
|
|
131
133
|
{icons[index] && typeof icons[index] === 'string' ? (
|
|
@@ -158,7 +160,16 @@ const BarChart: React.FC<BarChartProps> = ({
|
|
|
158
160
|
)}
|
|
159
161
|
|
|
160
162
|
<div>
|
|
161
|
-
<svg
|
|
163
|
+
<svg
|
|
164
|
+
width={chartWidth}
|
|
165
|
+
height={
|
|
166
|
+
height +
|
|
167
|
+
topPadding +
|
|
168
|
+
5 +
|
|
169
|
+
(showXAxisLabels ? 20 : 0) +
|
|
170
|
+
(xAxisLabel ? 20 : 0)
|
|
171
|
+
}
|
|
172
|
+
>
|
|
162
173
|
{Array.isArray(colors) &&
|
|
163
174
|
colors.length > 0 &&
|
|
164
175
|
renderGradients(colors)}
|
|
@@ -250,7 +261,7 @@ const BarChart: React.FC<BarChartProps> = ({
|
|
|
250
261
|
{xAxisLabel && (
|
|
251
262
|
<text
|
|
252
263
|
x={chartWidth / 2}
|
|
253
|
-
y={height + topPadding + 40}
|
|
264
|
+
y={height + topPadding + (showXAxisLabels ? 40 : 20)}
|
|
254
265
|
fontSize="12"
|
|
255
266
|
fill="black"
|
|
256
267
|
textAnchor="middle"
|
|
@@ -278,7 +289,10 @@ const BarChart: React.FC<BarChartProps> = ({
|
|
|
278
289
|
|
|
279
290
|
{legend && legendPosition === 'bottom' && (
|
|
280
291
|
<div className="ff-legend-container">
|
|
281
|
-
<div
|
|
292
|
+
<div
|
|
293
|
+
className="ff-bar-chart-legend"
|
|
294
|
+
style={{ gap: `${legendGap}px` }}
|
|
295
|
+
>
|
|
282
296
|
{data.map((item, index) => (
|
|
283
297
|
<div key={item.label} className="ff-bar-chart-legend-item">
|
|
284
298
|
{icons[index] && typeof icons[index] === 'string' ? (
|