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
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
.ff-dashboard-donut-chart-svg-container {
|
|
20
20
|
text-align: center;
|
|
21
21
|
svg {
|
|
22
|
+
display: block;
|
|
22
23
|
text:nth-of-type(1) {
|
|
23
24
|
@extend .font2Xl;
|
|
24
25
|
font-weight: 600;
|
|
@@ -41,13 +42,12 @@
|
|
|
41
42
|
|
|
42
43
|
.ff-legend-container {
|
|
43
44
|
display: grid;
|
|
44
|
-
gap: 10px;
|
|
45
45
|
grid-auto-rows: 1fr;
|
|
46
46
|
|
|
47
47
|
&.ff-number-legend {
|
|
48
48
|
grid-template-columns: repeat(3, 100px);
|
|
49
49
|
|
|
50
|
-
&.ff-side-legend{
|
|
50
|
+
&.ff-side-legend {
|
|
51
51
|
grid-template-columns: repeat(2, 100px);
|
|
52
52
|
}
|
|
53
53
|
.ff-legend-item {
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
&.ff-memory-legend {
|
|
85
85
|
grid-template-columns: repeat(3, 100px);
|
|
86
86
|
|
|
87
|
-
&.ff-side-legend{
|
|
87
|
+
&.ff-side-legend {
|
|
88
88
|
grid-template-columns: repeat(2, 100px);
|
|
89
89
|
}
|
|
90
90
|
|
|
@@ -120,6 +120,10 @@
|
|
|
120
120
|
|
|
121
121
|
&:last-child {
|
|
122
122
|
text-align: right;
|
|
123
|
+
padding-right: 10px;
|
|
124
|
+
}
|
|
125
|
+
&:nth-last-child(2) {
|
|
126
|
+
width: 58px;
|
|
123
127
|
}
|
|
124
128
|
}
|
|
125
129
|
|
|
@@ -141,6 +145,9 @@
|
|
|
141
145
|
padding: 0.5rem;
|
|
142
146
|
@extend .fontXs;
|
|
143
147
|
color: var(--input-hover-border-color);
|
|
148
|
+
&:last-child {
|
|
149
|
+
padding-right: 22px;
|
|
150
|
+
}
|
|
144
151
|
}
|
|
145
152
|
|
|
146
153
|
.ff-legend-name {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
2
|
import DashboardDonutChart from './DashboardDonutChart';
|
|
3
3
|
|
|
4
4
|
const meta: Meta<typeof DashboardDonutChart> = {
|
|
@@ -17,6 +17,7 @@ export const Default: Story = {
|
|
|
17
17
|
args: {
|
|
18
18
|
radius: 70,
|
|
19
19
|
lineWidth: 15,
|
|
20
|
+
tableWidth: 500,
|
|
20
21
|
legendDetailsType: 'Scripts',
|
|
21
22
|
isLegendDetails: true,
|
|
22
23
|
statusValues: [
|
|
@@ -39,6 +39,7 @@ const colorMapping = [
|
|
|
39
39
|
|
|
40
40
|
const DashboardDonutChart: React.FC<DashboardDonutChartProps> = ({
|
|
41
41
|
radius = 60,
|
|
42
|
+
tableWidth,
|
|
42
43
|
lineWidth = 15,
|
|
43
44
|
statusValues = [],
|
|
44
45
|
gapAngle = 0,
|
|
@@ -51,7 +52,12 @@ const DashboardDonutChart: React.FC<DashboardDonutChartProps> = ({
|
|
|
51
52
|
labelFontSize = 24,
|
|
52
53
|
subLabelFontSize = 14,
|
|
53
54
|
legendPosition = 'bottom',
|
|
54
|
-
|
|
55
|
+
chartGap = 0,
|
|
56
|
+
legendGap = 5,
|
|
57
|
+
legendValueFontSize = 22,
|
|
58
|
+
legendKeyFontSize = 12,
|
|
59
|
+
labelYoffSet = -5,
|
|
60
|
+
subLabelYoffSet = 20,
|
|
55
61
|
}) => {
|
|
56
62
|
const [hoveredItemIndex, setHoveredItemIndex] = useState<number | null>(null);
|
|
57
63
|
const [tooltipPosition, setTooltipPosition] = useState({ x: 0, y: 0 });
|
|
@@ -138,7 +144,7 @@ const DashboardDonutChart: React.FC<DashboardDonutChartProps> = ({
|
|
|
138
144
|
|
|
139
145
|
const SVG_PADDING = 3;
|
|
140
146
|
const DONUT_SVG_SIZE = radius * 2 + lineWidth + SVG_PADDING * 2;
|
|
141
|
-
const LABEL_MAX_WIDTH = radius * 2 - lineWidth - SVG_PADDING;
|
|
147
|
+
const LABEL_MAX_WIDTH = radius * 2 - lineWidth - SVG_PADDING * 2;
|
|
142
148
|
|
|
143
149
|
const renderArc = (chartItem: ChartItem, endAngle: number, i: number) => {
|
|
144
150
|
const isFullCircle = nonZeroValues.length === 1;
|
|
@@ -182,7 +188,7 @@ const DashboardDonutChart: React.FC<DashboardDonutChartProps> = ({
|
|
|
182
188
|
>
|
|
183
189
|
<Typography fontSize={12}>
|
|
184
190
|
{hoveredItemIndex !== null &&
|
|
185
|
-
`${nonZeroValues[hoveredItemIndex]?.key}
|
|
191
|
+
`${nonZeroValues[hoveredItemIndex]?.key}:`}
|
|
186
192
|
</Typography>
|
|
187
193
|
<Typography fontSize={12}>
|
|
188
194
|
{hoveredItemIndex !== null &&
|
|
@@ -207,11 +213,12 @@ const DashboardDonutChart: React.FC<DashboardDonutChartProps> = ({
|
|
|
207
213
|
'ff-side-legend':
|
|
208
214
|
legendPosition === 'left' || legendPosition === 'right',
|
|
209
215
|
})}
|
|
216
|
+
style={{ gap: `${legendGap}px` }}
|
|
210
217
|
>
|
|
211
218
|
{legendData.map((item, index) => (
|
|
212
219
|
<div className="ff-legend-item" key={index}>
|
|
213
220
|
<Typography
|
|
214
|
-
fontSize={
|
|
221
|
+
fontSize={legendValueFontSize}
|
|
215
222
|
fontWeight="semi-bold"
|
|
216
223
|
className="ff-legend-value"
|
|
217
224
|
color={
|
|
@@ -223,7 +230,7 @@ const DashboardDonutChart: React.FC<DashboardDonutChartProps> = ({
|
|
|
223
230
|
{item.value} {showUnit && unit?.toUpperCase()}
|
|
224
231
|
</Typography>
|
|
225
232
|
<Typography
|
|
226
|
-
fontSize={
|
|
233
|
+
fontSize={legendKeyFontSize}
|
|
227
234
|
className="ff-legend-key"
|
|
228
235
|
textAlign="center"
|
|
229
236
|
>
|
|
@@ -236,7 +243,10 @@ const DashboardDonutChart: React.FC<DashboardDonutChartProps> = ({
|
|
|
236
243
|
|
|
237
244
|
case 'pillLegend':
|
|
238
245
|
return (
|
|
239
|
-
<div
|
|
246
|
+
<div
|
|
247
|
+
className="ff-legend-container ff-pill-legend"
|
|
248
|
+
style={{ gap: `${legendGap}px` }}
|
|
249
|
+
>
|
|
240
250
|
{legendData.map((item, index) => (
|
|
241
251
|
<div className="ff-legend-item" key={index}>
|
|
242
252
|
<span
|
|
@@ -249,7 +259,12 @@ const DashboardDonutChart: React.FC<DashboardDonutChartProps> = ({
|
|
|
249
259
|
>
|
|
250
260
|
<Typography fontSize={10}>{item.value}</Typography>
|
|
251
261
|
</span>
|
|
252
|
-
<Typography
|
|
262
|
+
<Typography
|
|
263
|
+
fontSize={legendKeyFontSize}
|
|
264
|
+
className="ff-legend-key"
|
|
265
|
+
>
|
|
266
|
+
{item.key}
|
|
267
|
+
</Typography>
|
|
253
268
|
</div>
|
|
254
269
|
))}
|
|
255
270
|
</div>
|
|
@@ -262,13 +277,14 @@ const DashboardDonutChart: React.FC<DashboardDonutChartProps> = ({
|
|
|
262
277
|
'ff-side-legend':
|
|
263
278
|
legendPosition === 'left' || legendPosition === 'right',
|
|
264
279
|
})}
|
|
280
|
+
style={{ gap: `${legendGap}px` }}
|
|
265
281
|
>
|
|
266
282
|
{legendData.map((item, index) => (
|
|
267
283
|
<React.Fragment key={index}>
|
|
268
284
|
<div className="ff-legend-item">
|
|
269
285
|
<Typography
|
|
270
|
-
fontSize={
|
|
271
|
-
fontWeight="
|
|
286
|
+
fontSize={legendValueFontSize}
|
|
287
|
+
fontWeight="semi-bold"
|
|
272
288
|
className="ff-legend-value"
|
|
273
289
|
color={
|
|
274
290
|
item.color
|
|
@@ -276,9 +292,16 @@ const DashboardDonutChart: React.FC<DashboardDonutChartProps> = ({
|
|
|
276
292
|
: colorMapping[index % colorMapping.length]
|
|
277
293
|
}
|
|
278
294
|
>
|
|
279
|
-
{item.labelValue
|
|
295
|
+
{Number.isInteger(item.labelValue)
|
|
296
|
+
? item.labelValue
|
|
297
|
+
: item.labelValue?.toFixed(2)}{' '}
|
|
298
|
+
{item.unit}
|
|
280
299
|
</Typography>
|
|
281
|
-
<Typography
|
|
300
|
+
<Typography
|
|
301
|
+
fontSize={legendKeyFontSize}
|
|
302
|
+
className="ff-legend-key"
|
|
303
|
+
textAlign="center"
|
|
304
|
+
>
|
|
282
305
|
{item.key}
|
|
283
306
|
</Typography>
|
|
284
307
|
</div>
|
|
@@ -293,8 +316,10 @@ const DashboardDonutChart: React.FC<DashboardDonutChartProps> = ({
|
|
|
293
316
|
<table className="ff-legend-table">
|
|
294
317
|
<thead>
|
|
295
318
|
<tr>
|
|
296
|
-
<th className="ff-table-header">
|
|
297
|
-
|
|
319
|
+
<th className="ff-table-header" style={{ width: tableWidth }}>
|
|
320
|
+
Name
|
|
321
|
+
</th>
|
|
322
|
+
<th className="ff-table-header ">%</th>
|
|
298
323
|
<th className="ff-table-header">Count</th>
|
|
299
324
|
</tr>
|
|
300
325
|
</thead>
|
|
@@ -384,7 +409,7 @@ const DashboardDonutChart: React.FC<DashboardDonutChartProps> = ({
|
|
|
384
409
|
'legend-position-bottom': legendPosition === 'bottom',
|
|
385
410
|
'legend-position-left': legendPosition === 'left',
|
|
386
411
|
})}
|
|
387
|
-
style={{ gap: `${
|
|
412
|
+
style={{ gap: `${chartGap}px` }}
|
|
388
413
|
>
|
|
389
414
|
<div className="ff-dashboard-donut-chart-svg-container">
|
|
390
415
|
<svg
|
|
@@ -429,11 +454,13 @@ const DashboardDonutChart: React.FC<DashboardDonutChartProps> = ({
|
|
|
429
454
|
))}
|
|
430
455
|
</text>
|
|
431
456
|
) : (
|
|
432
|
-
(legendType !== 'tableLegend' ||
|
|
457
|
+
(legendType !== 'tableLegend' ||
|
|
458
|
+
hoveredItemIndex !== null ||
|
|
459
|
+
hoveredItemIndex == null) && (
|
|
433
460
|
<>
|
|
434
461
|
<text
|
|
435
462
|
x="0"
|
|
436
|
-
y=
|
|
463
|
+
y={labelYoffSet}
|
|
437
464
|
textAnchor="middle"
|
|
438
465
|
fill={colorMapping[3]}
|
|
439
466
|
style={{ fontSize: `${labelFontSize}px` }}
|
|
@@ -454,7 +481,11 @@ const DashboardDonutChart: React.FC<DashboardDonutChartProps> = ({
|
|
|
454
481
|
LABEL_MAX_WIDTH,
|
|
455
482
|
labelFontSize
|
|
456
483
|
).map((line, index) => (
|
|
457
|
-
<tspan
|
|
484
|
+
<tspan
|
|
485
|
+
x="0"
|
|
486
|
+
dy={index === 0 ? 0 : labelFontSize}
|
|
487
|
+
key={index}
|
|
488
|
+
>
|
|
458
489
|
{line}
|
|
459
490
|
</tspan>
|
|
460
491
|
))}
|
|
@@ -462,7 +493,7 @@ const DashboardDonutChart: React.FC<DashboardDonutChartProps> = ({
|
|
|
462
493
|
|
|
463
494
|
<text
|
|
464
495
|
x="0"
|
|
465
|
-
y=
|
|
496
|
+
y={subLabelYoffSet}
|
|
466
497
|
textAnchor="middle"
|
|
467
498
|
fill="var(--text-color)"
|
|
468
499
|
style={{ fontSize: `${subLabelFontSize}px` }}
|
|
@@ -476,7 +507,11 @@ const DashboardDonutChart: React.FC<DashboardDonutChartProps> = ({
|
|
|
476
507
|
LABEL_MAX_WIDTH,
|
|
477
508
|
subLabelFontSize
|
|
478
509
|
).map((line, index) => (
|
|
479
|
-
<tspan
|
|
510
|
+
<tspan
|
|
511
|
+
x="0"
|
|
512
|
+
dy={index === 0 ? 0 : subLabelFontSize}
|
|
513
|
+
key={index}
|
|
514
|
+
>
|
|
480
515
|
{line}
|
|
481
516
|
</tspan>
|
|
482
517
|
))}
|
|
@@ -486,12 +521,6 @@ const DashboardDonutChart: React.FC<DashboardDonutChartProps> = ({
|
|
|
486
521
|
)}
|
|
487
522
|
</g>
|
|
488
523
|
</svg>
|
|
489
|
-
{legendType === 'tableLegend' && (
|
|
490
|
-
<div>
|
|
491
|
-
<Typography fontWeight="semi-bold">{legendDetailsType} </Typography>
|
|
492
|
-
<Typography> {`Total ${legendDetailsType} - ${total}`} </Typography>
|
|
493
|
-
</div>
|
|
494
|
-
)}
|
|
495
524
|
{showTooltip && renderTooltip()}
|
|
496
525
|
</div>
|
|
497
526
|
{isLegendDetails && renderLegend(chartValues, legendType, legendPosition)}
|
|
@@ -47,6 +47,12 @@ export type DashboardDonutChartProps = {
|
|
|
47
47
|
showUnit?: boolean;
|
|
48
48
|
labelFontSize?: number;
|
|
49
49
|
subLabelFontSize?: number;
|
|
50
|
-
legendPosition
|
|
50
|
+
legendPosition?: 'bottom' | 'right' | 'left';
|
|
51
|
+
chartGap?: number;
|
|
51
52
|
legendGap?: number;
|
|
53
|
+
tableWidth?: number;
|
|
54
|
+
legendValueFontSize?: number;
|
|
55
|
+
legendKeyFontSize?: number;
|
|
56
|
+
labelYoffSet?: number;
|
|
57
|
+
subLabelYoffSet?: number;
|
|
52
58
|
};
|
|
@@ -51,8 +51,7 @@ const DonutChart: React.FC<DonutChartProps> = ({
|
|
|
51
51
|
// Calculate angles and gaps
|
|
52
52
|
const TOTAL_GAP_ANGLE = gapAngle * nonZeroValues.length;
|
|
53
53
|
let remainingAngle = 2 * Math.PI - TOTAL_GAP_ANGLE;
|
|
54
|
-
let currentAngle = Math.PI / 2;
|
|
55
|
-
|
|
54
|
+
let currentAngle = -Math.PI / 2;
|
|
56
55
|
const MIN_PERCENTAGE = 1;
|
|
57
56
|
const MIN_ANGLE = (MIN_PERCENTAGE / 100) * (2 * Math.PI);
|
|
58
57
|
let minAngleTotal = 0;
|
|
@@ -98,7 +97,11 @@ const DonutChart: React.FC<DonutChartProps> = ({
|
|
|
98
97
|
strokeWidth={lineWidth}
|
|
99
98
|
onMouseEnter={() => handleMouseEnter(normalizedStatus)}
|
|
100
99
|
onMouseLeave={handleMouseLeave}
|
|
101
|
-
strokeOpacity={
|
|
100
|
+
strokeOpacity={
|
|
101
|
+
hoveredStatus === null || hoveredStatus === normalizedStatus
|
|
102
|
+
? 0.8
|
|
103
|
+
: 0.3
|
|
104
|
+
}
|
|
102
105
|
/>
|
|
103
106
|
{/* Hover effect */}
|
|
104
107
|
{hoveredStatus === normalizedStatus && (
|
|
@@ -129,6 +132,8 @@ const DonutChart: React.FC<DonutChartProps> = ({
|
|
|
129
132
|
? 'ff-highlighted'
|
|
130
133
|
: 'ff-fade'
|
|
131
134
|
}`}
|
|
135
|
+
onMouseEnter={() => handleMouseEnter(statusKey)}
|
|
136
|
+
onMouseLeave={handleMouseLeave}
|
|
132
137
|
>
|
|
133
138
|
<div className="ff-status-label">
|
|
134
139
|
<div
|
|
@@ -15,15 +15,19 @@
|
|
|
15
15
|
transition: cx 0.2s ease, cy 0.2s ease;
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
-
.ff-line-chart-yAxisLabel {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
18
|
+
.ff-line-chart-yAxisLabel-warpper {
|
|
19
|
+
position: relative;
|
|
20
|
+
min-width: 20px;
|
|
21
|
+
height: 100%;
|
|
22
|
+
.ff-line-chart-yAxisLabel {
|
|
23
|
+
position: absolute;
|
|
24
|
+
right: 0;
|
|
25
|
+
top: 50%;
|
|
26
|
+
display: flex;
|
|
27
|
+
white-space: nowrap;
|
|
28
|
+
transform: rotate(270deg) translateX(60%);
|
|
29
|
+
transform-origin: right center;
|
|
30
|
+
}
|
|
27
31
|
}
|
|
28
32
|
|
|
29
33
|
.ff-line-chart-text1 {
|
|
@@ -130,8 +130,11 @@ const LineChart: React.FC<LineChartProps> = ({
|
|
|
130
130
|
const xTickInterval = Math.floor(data[0].data.length / 4);
|
|
131
131
|
|
|
132
132
|
return (
|
|
133
|
-
<div className="ff-line-chart-text" style={{ width: width }}>
|
|
134
|
-
<div
|
|
133
|
+
<div className="ff-line-chart-text" style={{ width: width + 20 }}>
|
|
134
|
+
<div
|
|
135
|
+
className="ff-line-chart-yAxisLabel-warpper"
|
|
136
|
+
style={{ height: height }}
|
|
137
|
+
>
|
|
135
138
|
{' '}
|
|
136
139
|
<Typography
|
|
137
140
|
className="ff-line-chart-yAxisLabel"
|
|
@@ -145,6 +148,7 @@ const LineChart: React.FC<LineChartProps> = ({
|
|
|
145
148
|
{' '}
|
|
146
149
|
<svg
|
|
147
150
|
height={height}
|
|
151
|
+
width={width}
|
|
148
152
|
onMouseMove={handleMouseMove}
|
|
149
153
|
onMouseLeave={handleMouseLeave}
|
|
150
154
|
className="ff-line-chart-svg"
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
ArcResult,
|
|
7
7
|
ArcAnglesResult,
|
|
8
8
|
} from './types';
|
|
9
|
+
import Tooltip from '../../Tooltip';
|
|
9
10
|
|
|
10
11
|
const useColorMappings = () =>
|
|
11
12
|
useMemo(() => {
|
|
@@ -117,54 +118,59 @@ const RadialChart: React.FC<RadialChartProps> = ({
|
|
|
117
118
|
calculateArcAngles(status.value, total, currentAngle, radius);
|
|
118
119
|
currentAngle = endAngle;
|
|
119
120
|
return (
|
|
120
|
-
<
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
height={svgSize}
|
|
124
|
-
viewBox={`0 0 ${svgSize} ${svgSize}`}
|
|
125
|
-
onClick={() => onClick(status)}
|
|
126
|
-
role="img"
|
|
127
|
-
aria-label={`${status.status}: ${Math.round(percentage * 100)}%`}
|
|
121
|
+
<Tooltip
|
|
122
|
+
title={`${status.status}: ${Math.round(percentage * 100)}%`}
|
|
123
|
+
zIndex={1000}
|
|
128
124
|
>
|
|
129
|
-
<
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
}
|
|
125
|
+
<svg
|
|
126
|
+
key={status.status}
|
|
127
|
+
width={svgSize}
|
|
128
|
+
height={svgSize}
|
|
129
|
+
viewBox={`0 0 ${svgSize} ${svgSize}`}
|
|
130
|
+
onClick={() => onClick(status)}
|
|
131
|
+
role="img"
|
|
132
|
+
aria-label={`${status.status}: ${Math.round(percentage * 100)}%`}
|
|
133
133
|
>
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
stroke={
|
|
139
|
-
backgroundColorMapping[
|
|
140
|
-
normalizedStatus as keyof typeof colorMapping
|
|
141
|
-
]
|
|
142
|
-
}
|
|
143
|
-
strokeWidth={lineWidth}
|
|
144
|
-
/>
|
|
145
|
-
{/* Status Arc */}
|
|
146
|
-
<path
|
|
147
|
-
d={foregroundArcPath}
|
|
148
|
-
fill="none"
|
|
149
|
-
stroke={
|
|
150
|
-
colorMapping[normalizedStatus as keyof typeof colorMapping]
|
|
151
|
-
}
|
|
152
|
-
strokeWidth={lineWidth}
|
|
153
|
-
/>
|
|
154
|
-
{/* Percentage Text */}
|
|
155
|
-
<text
|
|
156
|
-
x="0"
|
|
157
|
-
y="0"
|
|
158
|
-
fill={
|
|
159
|
-
colorMapping[normalizedStatus as keyof typeof colorMapping]
|
|
160
|
-
}
|
|
161
|
-
textAnchor="middle"
|
|
162
|
-
dominantBaseline="central"
|
|
134
|
+
<g
|
|
135
|
+
transform={`translate(${radius + lineWidth}, ${
|
|
136
|
+
radius + lineWidth
|
|
137
|
+
})`}
|
|
163
138
|
>
|
|
164
|
-
{
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
139
|
+
{/* Background Circle */}
|
|
140
|
+
<path
|
|
141
|
+
d={backgroundArcPath}
|
|
142
|
+
fill="none"
|
|
143
|
+
stroke={
|
|
144
|
+
backgroundColorMapping[
|
|
145
|
+
normalizedStatus as keyof typeof colorMapping
|
|
146
|
+
]
|
|
147
|
+
}
|
|
148
|
+
strokeWidth={lineWidth}
|
|
149
|
+
/>
|
|
150
|
+
{/* Status Arc */}
|
|
151
|
+
<path
|
|
152
|
+
d={foregroundArcPath}
|
|
153
|
+
fill="none"
|
|
154
|
+
stroke={
|
|
155
|
+
colorMapping[normalizedStatus as keyof typeof colorMapping]
|
|
156
|
+
}
|
|
157
|
+
strokeWidth={lineWidth}
|
|
158
|
+
/>
|
|
159
|
+
{/* Percentage Text */}
|
|
160
|
+
<text
|
|
161
|
+
x="0"
|
|
162
|
+
y="0"
|
|
163
|
+
fill={
|
|
164
|
+
colorMapping[normalizedStatus as keyof typeof colorMapping]
|
|
165
|
+
}
|
|
166
|
+
textAnchor="middle"
|
|
167
|
+
dominantBaseline="central"
|
|
168
|
+
>
|
|
169
|
+
{`${Math.round(percentage * 100)}%`}
|
|
170
|
+
</text>
|
|
171
|
+
</g>
|
|
172
|
+
</svg>
|
|
173
|
+
</Tooltip>
|
|
168
174
|
);
|
|
169
175
|
})}
|
|
170
176
|
</div>
|
|
@@ -55,10 +55,49 @@
|
|
|
55
55
|
.ff-checkbox-input:checked + .ff-checkbox-custom {
|
|
56
56
|
background: var(--brand-color);
|
|
57
57
|
border-color: var(--brand-color);
|
|
58
|
+
&.ff-checkbox-checked {
|
|
59
|
+
&--passed {
|
|
60
|
+
background-color: var(--ff-card-passed-status-bg-color);
|
|
61
|
+
border-color: var(--ff-card-passed-status-bg-color);
|
|
62
|
+
}
|
|
63
|
+
&--failed {
|
|
64
|
+
background-color: var(--ff-card-failed-status-bg-color);
|
|
65
|
+
border-color: var(--ff-card-failed-status-bg-color);
|
|
66
|
+
}
|
|
67
|
+
&--warning {
|
|
68
|
+
background-color: var(--ff-card-warning-status-bg-color);
|
|
69
|
+
border-color: var(--ff-card-warning-status-bg-color);
|
|
70
|
+
}
|
|
71
|
+
&--skipped {
|
|
72
|
+
background-color: var(--ff-card-skipped-status-bg-color);
|
|
73
|
+
border-color: var(--ff-card-skipped-status-bg-color);
|
|
74
|
+
}
|
|
75
|
+
&--flaky {
|
|
76
|
+
background-color: var(-- ff-card-flaky-status-bg-color);
|
|
77
|
+
border-color: var(-- ff-card-flaky-status-bg-color);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
58
80
|
}
|
|
59
81
|
|
|
60
82
|
.ff-checkbox-input:checked:hover + .ff-checkbox-custom {
|
|
61
83
|
background: var(--brand-color);
|
|
84
|
+
&.ff-checkbox-checked {
|
|
85
|
+
&--passed {
|
|
86
|
+
background: var(--ff-card-passed-status-bg-color);
|
|
87
|
+
}
|
|
88
|
+
&--failed {
|
|
89
|
+
background: var(--ff-card-failed-status-bg-color);
|
|
90
|
+
}
|
|
91
|
+
&--warning {
|
|
92
|
+
background: var(--ff-card-warning-status-bg-color);
|
|
93
|
+
}
|
|
94
|
+
&--skipped {
|
|
95
|
+
background: var(--ff-card-skipped-status-bg-color);
|
|
96
|
+
}
|
|
97
|
+
&--flaky {
|
|
98
|
+
background: var(-- ff-card-flaky-status-bg-color);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
62
101
|
&::after {
|
|
63
102
|
opacity: 1;
|
|
64
103
|
}
|
|
@@ -86,4 +125,22 @@
|
|
|
86
125
|
}
|
|
87
126
|
}
|
|
88
127
|
}
|
|
128
|
+
|
|
129
|
+
.ff-checkbox {
|
|
130
|
+
&--passed {
|
|
131
|
+
border-color: var(--ff-card-passed-status-bg-color);
|
|
132
|
+
}
|
|
133
|
+
&--failed {
|
|
134
|
+
border-color: var(--ff-card-failed-status-bg-color);
|
|
135
|
+
}
|
|
136
|
+
&--warning {
|
|
137
|
+
border-color: var(--ff-card-warning-status-bg-color);
|
|
138
|
+
}
|
|
139
|
+
&--skipped {
|
|
140
|
+
border-color: var(--ff-card-skipped-status-bg-color);
|
|
141
|
+
}
|
|
142
|
+
&--flaky {
|
|
143
|
+
border-color: var(-- ff-card-flaky-status-bg-color);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
89
146
|
}
|