pixel-react 1.2.1 → 1.2.3
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/lib/components/AppHeader/types.d.ts +11 -2
- package/lib/components/Avatar/Avatar.d.ts +5 -0
- package/lib/components/Avatar/Avatar.stories.d.ts +10 -0
- package/lib/components/Avatar/index.d.ts +1 -0
- package/lib/components/Avatar/types.d.ts +26 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/ActiveCell.d.ts +2 -2
- package/lib/components/ExcelFile/ExcelFile/Excel/ColumnIndicator.d.ts +2 -2
- package/lib/components/ExcelFile/ExcelFile/Excel/Copied.d.ts +1 -1
- package/lib/components/ExcelFile/ExcelFile/Excel/CornerIndicator.d.ts +2 -2
- package/lib/components/ExcelFile/ExcelFile/Excel/DataEditor.d.ts +2 -2
- package/lib/components/ExcelFile/ExcelFile/Excel/DataViewer.d.ts +2 -2
- package/lib/components/ExcelFile/ExcelFile/Excel/FloatingRect.d.ts +2 -2
- package/lib/components/ExcelFile/ExcelFile/Excel/HeaderRow.d.ts +1 -1
- package/lib/components/ExcelFile/ExcelFile/Excel/Row.d.ts +1 -1
- package/lib/components/ExcelFile/ExcelFile/Excel/RowIndicator.d.ts +2 -2
- package/lib/components/ExcelFile/ExcelFile/Excel/Selected.d.ts +1 -1
- package/lib/components/ExcelFile/ExcelFile/Excel/Spreadsheet.d.ts +6 -7
- package/lib/components/ExcelFile/ExcelFile/Excel/Table.d.ts +1 -1
- package/lib/components/ExcelFile/ExcelFile/Excel/actions.d.ts +49 -5
- package/lib/components/ExcelFile/ExcelFile/Excel/context.d.ts +3 -3
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/engine.d.ts +5 -5
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/formula.d.ts +6 -6
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/index.d.ts +2 -2
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-graph.d.ts +2 -2
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-hash.d.ts +1 -1
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-set.d.ts +1 -1
- package/lib/components/ExcelFile/ExcelFile/Excel/index.d.ts +11 -11
- package/lib/components/ExcelFile/ExcelFile/Excel/matrix.d.ts +1 -1
- package/lib/components/ExcelFile/ExcelFile/Excel/point-range.d.ts +1 -1
- package/lib/components/ExcelFile/ExcelFile/Excel/reducer.d.ts +5 -5
- package/lib/components/ExcelFile/ExcelFile/Excel/selection.d.ts +3 -3
- package/lib/components/ExcelFile/ExcelFile/Excel/types.d.ts +11 -48
- package/lib/components/ExcelFile/ExcelFile/Excel/use-dispatch.d.ts +1 -1
- package/lib/components/ExcelFile/ExcelFile/Excel/use-selector.d.ts +1 -1
- package/lib/components/ExcelFile/ExcelFile/Excel/util.d.ts +11 -12
- package/lib/components/ExcelFile/ExcelFile/ExcelFile.d.ts +16 -0
- package/lib/components/ExcelFile/ExcelSheetBar/ExcelSheetBar.d.ts +0 -3
- package/lib/components/ExcelFile/ExcelToolBar/ExcelToolBar.d.ts +12 -0
- package/lib/components/ExcelFile/Types.d.ts +2 -49
- package/lib/components/Form/Form.d.ts +1 -15
- package/lib/components/Form/Form.stories.d.ts +6 -5
- package/lib/components/Form/Forms.d.ts +8 -0
- package/lib/components/Form/index.d.ts +1 -1
- package/lib/components/Icon/types.d.ts +1 -1
- package/lib/components/MenuOption/types.d.ts +7 -7
- package/lib/components/MiniModal/MiniModal.stories.d.ts +1 -0
- package/lib/components/MiniModal/types.d.ts +6 -6
- package/lib/components/ModulesChip/ModuleChip.d.ts +4 -0
- package/lib/components/ModulesChip/ModuleChip.stories.d.ts +6 -0
- package/lib/components/ModulesChip/index.d.ts +1 -0
- package/lib/components/ModulesChip/types.d.ts +14 -0
- package/lib/components/MultiSelect/MultiSelectTypes.d.ts +1 -0
- package/lib/components/Toastify/Toastify.d.ts +8 -0
- package/lib/components/Toastify/Toastify.stories.d.ts +6 -0
- package/lib/components/Toastify/index.d.ts +1 -0
- package/lib/components/Toastify/types.d.ts +7 -0
- package/lib/components/Tooltip/types.d.ts +6 -0
- package/lib/components/Typography/types.d.ts +1 -0
- package/lib/index.d.ts +84 -31
- package/lib/index.esm.js +26720 -881
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +26718 -875
- package/lib/index.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/StyleGuide/ColorPalette/colorPaletteList.ts +10 -0
- package/src/assets/Themes/BaseTheme.scss +2 -0
- package/src/assets/Themes/DarkTheme.scss +2 -0
- package/src/assets/icons/add_testcase.svg +3 -0
- package/src/assets/icons/add_variable_icon.svg +3 -4
- package/src/assets/icons/attachment_icon.svg +3 -0
- package/src/assets/icons/authorization_icon.svg +3 -0
- package/src/assets/icons/automation_testcase.svg +4 -0
- package/src/assets/icons/back_icon.svg +3 -0
- package/src/assets/icons/client_profile.svg +4 -0
- package/src/assets/icons/fireflink_finder_logo.svg +7 -0
- package/src/assets/icons/fireflink_platform.svg +4 -0
- package/src/assets/icons/license_expired.svg +20 -0
- package/src/assets/icons/manual_testcase.svg +3 -0
- package/src/assets/icons/variable_icon.svg +4 -0
- package/src/components/AllProjectsDropdown/AllProjectsDropdown.scss +2 -2
- package/src/components/AllProjectsDropdown/AllProjectsDropdown.tsx +1 -1
- package/src/components/AppHeader/AppHeader.stories.tsx +24 -3
- package/src/components/AppHeader/AppHeader.tsx +29 -11
- package/src/components/AppHeader/types.ts +11 -3
- package/src/components/Avatar/Avatar.scss +24 -0
- package/src/components/Avatar/Avatar.stories.tsx +56 -0
- package/src/components/Avatar/Avatar.tsx +25 -0
- package/src/components/Avatar/index.ts +1 -0
- package/src/components/Avatar/types.ts +27 -0
- package/src/components/Button/types.ts +1 -1
- package/src/components/ExcelFile/ColorBarselector/ColorBarSelector.scss +0 -2
- package/src/components/ExcelFile/ContextMenu/ContextMenu.scss +1 -4
- package/src/components/ExcelFile/ContextMenu/ContextMenu.tsx +0 -1
- package/src/components/ExcelFile/ExcelFile/Excel/ActiveCell.tsx +13 -13
- package/src/components/ExcelFile/ExcelFile/Excel/Cell.tsx +13 -12
- package/src/components/ExcelFile/ExcelFile/Excel/ColumnIndicator.tsx +40 -32
- package/src/components/ExcelFile/ExcelFile/Excel/Copied.tsx +4 -4
- package/src/components/ExcelFile/ExcelFile/Excel/CornerIndicator.tsx +10 -10
- package/src/components/ExcelFile/ExcelFile/Excel/DataEditor.tsx +5 -5
- package/src/components/ExcelFile/ExcelFile/Excel/DataViewer.tsx +10 -10
- package/src/components/ExcelFile/ExcelFile/Excel/FloatingRect.tsx +6 -6
- package/src/components/ExcelFile/ExcelFile/Excel/HeaderRow.tsx +1 -1
- package/src/components/ExcelFile/ExcelFile/Excel/Row.tsx +1 -1
- package/src/components/ExcelFile/ExcelFile/Excel/RowIndicator.tsx +34 -27
- package/src/components/ExcelFile/ExcelFile/Excel/Selected.tsx +5 -5
- package/src/components/ExcelFile/ExcelFile/Excel/{Spreadsheet.css → Spreadsheet.scss} +21 -37
- package/src/components/ExcelFile/ExcelFile/Excel/Spreadsheet.tsx +87 -78
- package/src/components/ExcelFile/ExcelFile/Excel/Table.tsx +2 -2
- package/src/components/ExcelFile/ExcelFile/Excel/actions.ts +121 -31
- package/src/components/ExcelFile/ExcelFile/Excel/areModelsEqual.ts +1 -1
- package/src/components/ExcelFile/ExcelFile/Excel/context.ts +4 -4
- package/src/components/ExcelFile/ExcelFile/Excel/engine/engine.ts +7 -7
- package/src/components/ExcelFile/ExcelFile/Excel/engine/formula.ts +11 -11
- package/src/components/ExcelFile/ExcelFile/Excel/engine/index.ts +2 -2
- package/src/components/ExcelFile/ExcelFile/Excel/engine/point-graph.ts +3 -3
- package/src/components/ExcelFile/ExcelFile/Excel/engine/point-hash.ts +2 -2
- package/src/components/ExcelFile/ExcelFile/Excel/engine/point-set.ts +2 -2
- package/src/components/ExcelFile/ExcelFile/Excel/index.ts +12 -11
- package/src/components/ExcelFile/ExcelFile/Excel/matrix.ts +18 -24
- package/src/components/ExcelFile/ExcelFile/Excel/point-range.ts +1 -1
- package/src/components/ExcelFile/ExcelFile/Excel/reducer.ts +311 -41
- package/src/components/ExcelFile/ExcelFile/Excel/selection.ts +5 -5
- package/src/components/ExcelFile/ExcelFile/Excel/types.ts +14 -66
- package/src/components/ExcelFile/ExcelFile/Excel/typings/fast-formula-parser.d.ts +8 -8
- package/src/components/ExcelFile/ExcelFile/Excel/use-dispatch.ts +2 -2
- package/src/components/ExcelFile/ExcelFile/Excel/use-selector.ts +3 -3
- package/src/components/ExcelFile/ExcelFile/Excel/util.ts +21 -22
- package/src/components/ExcelFile/ExcelFile/ExcelFile.scss +0 -3
- package/src/components/ExcelFile/ExcelFile/ExcelFile.tsx +45 -403
- package/src/components/ExcelFile/ExcelFile.stories.tsx +10 -29
- package/src/components/ExcelFile/ExcelSheetBar/ExcelSheetBar.tsx +1 -12
- package/src/components/ExcelFile/ExcelToolBar/ExcelToolBar.scss +0 -3
- package/src/components/ExcelFile/ExcelToolBar/ExcelToolBar.tsx +147 -127
- package/src/components/ExcelFile/Types.ts +3 -70
- package/src/components/ExcelFile/index.ts +1 -1
- package/src/components/Form/Form.d.ts +3 -0
- package/src/components/Form/Form.scss +48 -4
- package/src/components/Form/Form.stories.tsx +244 -137
- package/src/components/Form/Form.ts +2 -0
- package/src/components/Form/Forms.tsx +25 -0
- package/src/components/Form/index.ts +1 -1
- package/src/components/Icon/iconList.ts +23 -0
- package/src/components/Icon/types.ts +1 -1
- package/src/components/IconButton/IconButton.scss +1 -1
- package/src/components/MenuOption/types.ts +7 -6
- package/src/components/MiniModal/MiniModal.scss +5 -0
- package/src/components/MiniModal/MiniModal.stories.tsx +95 -0
- package/src/components/MiniModal/MiniModal.tsx +11 -6
- package/src/components/MiniModal/types.ts +6 -6
- package/src/components/ModulesChip/ModuleChip.scss +20 -0
- package/src/components/ModulesChip/ModuleChip.stories.tsx +41 -0
- package/src/components/ModulesChip/ModuleChip.tsx +31 -0
- package/src/components/ModulesChip/index.ts +1 -0
- package/src/components/ModulesChip/types.ts +14 -0
- package/src/components/MultiSelect/Dropdown.tsx +6 -1
- package/src/components/MultiSelect/MultiSelect.scss +17 -10
- package/src/components/MultiSelect/MultiSelect.stories.tsx +16 -4
- package/src/components/MultiSelect/MultiSelect.tsx +11 -4
- package/src/components/MultiSelect/MultiSelectTypes.ts +4 -3
- package/src/components/Select/Select.scss +4 -0
- package/src/components/Select/Select.tsx +2 -2
- package/src/components/Toastify/Toastify.stories.tsx +52 -0
- package/src/components/Toastify/Toastify.tsx +66 -0
- package/src/components/Toastify/index.ts +1 -0
- package/src/components/Toastify/types.ts +8 -0
- package/src/components/Tooltip/Tooltip.tsx +2 -1
- package/src/components/Tooltip/types.ts +6 -0
- package/src/components/Typography/Typography.scss +12 -4
- package/src/components/Typography/Typography.stories.tsx +2 -0
- package/src/components/Typography/Typography.tsx +2 -0
- package/src/components/Typography/types.ts +1 -0
- package/src/index.ts +9 -1
- package/src/components/ExcelFile/ChangeExcelStyles.tsx +0 -78
- package/src/components/ExcelFile/ImportExcelStyles.tsx +0 -86
- package/src/components/Form/Form.tsx +0 -57
|
@@ -36,29 +36,20 @@ export const Default: Story = {
|
|
|
36
36
|
{
|
|
37
37
|
value: "A1",
|
|
38
38
|
style: {
|
|
39
|
-
name: "Arial",
|
|
40
|
-
size: 12,
|
|
41
|
-
bold: true,
|
|
42
39
|
fontSize: "12px",
|
|
43
|
-
italic: false,
|
|
44
40
|
fontFamily: "Arial",
|
|
45
|
-
color: "
|
|
46
|
-
backgroundColor: "
|
|
47
|
-
border: { top: "1px solid black", bottom: "1px solid black", left: "1px solid black", right: "1px solid black" },
|
|
41
|
+
color: "var(--text-bg-highlight)",
|
|
42
|
+
backgroundColor: "var(--tooltip-bg-color)",
|
|
48
43
|
},
|
|
49
44
|
},
|
|
50
45
|
{
|
|
51
|
-
value: "B1",
|
|
46
|
+
value: "SUM(A1+B1)",
|
|
47
|
+
// isFormula:true,
|
|
52
48
|
style: {
|
|
53
|
-
name: "Arial",
|
|
54
|
-
size: 12,
|
|
55
|
-
bold: false,
|
|
56
49
|
fontSize: "12px",
|
|
57
|
-
italic: false,
|
|
58
50
|
fontFamily: "Arial",
|
|
59
|
-
color: "
|
|
60
|
-
backgroundColor: "
|
|
61
|
-
border: { top: "1px solid black", bottom: "1px solid black", left: "1px solid black", right: "1px solid black" },
|
|
51
|
+
color: "var(--text-bg-highlight)",
|
|
52
|
+
backgroundColor: "var(--brand-color)",
|
|
62
53
|
},
|
|
63
54
|
},
|
|
64
55
|
],
|
|
@@ -66,29 +57,19 @@ export const Default: Story = {
|
|
|
66
57
|
{
|
|
67
58
|
value: "A2",
|
|
68
59
|
style: {
|
|
69
|
-
name: "Arial",
|
|
70
|
-
size: 12,
|
|
71
|
-
bold: true,
|
|
72
60
|
fontSize: "12px",
|
|
73
|
-
italic: false,
|
|
74
61
|
fontFamily: "Arial",
|
|
75
|
-
color: "
|
|
76
|
-
backgroundColor: "
|
|
77
|
-
border: { top: "1px solid black", bottom: "1px solid black", left: "1px solid black", right: "1px solid black" },
|
|
62
|
+
color: "var(--drawer-footer-bg)",
|
|
63
|
+
backgroundColor: "var(--brand-color)",
|
|
78
64
|
},
|
|
79
65
|
},
|
|
80
66
|
{
|
|
81
67
|
value: "B2",
|
|
82
68
|
style: {
|
|
83
|
-
name: "Arial",
|
|
84
|
-
size: 12,
|
|
85
|
-
bold: false,
|
|
86
69
|
fontSize: "12px",
|
|
87
|
-
italic: false,
|
|
88
70
|
fontFamily: "Arial",
|
|
89
|
-
color: "
|
|
90
|
-
backgroundColor: "
|
|
91
|
-
border: { top: "1px solid black", bottom: "1px solid black", left: "1px solid black", right: "1px solid black" },
|
|
71
|
+
color: "var(--brand-color)",
|
|
72
|
+
backgroundColor: "var(--text-bg-highlight)",
|
|
92
73
|
},
|
|
93
74
|
},
|
|
94
75
|
],
|
|
@@ -6,22 +6,16 @@ import { Col, Container, Row } from '../../GridLayout/GridLayout';
|
|
|
6
6
|
|
|
7
7
|
interface ExcelSheetBarProps {
|
|
8
8
|
fileDetails: {
|
|
9
|
-
sheetNames: string[];
|
|
9
|
+
sheetNames: string[];
|
|
10
10
|
};
|
|
11
11
|
handleSheetChange: (name: string, index: number) => void;
|
|
12
|
-
contextMenu: (e: React.MouseEvent, name: string, index: number) => void;
|
|
13
|
-
addSheet: () => void;
|
|
14
12
|
selectedSheet: { name: string };
|
|
15
|
-
contextSelect: (e: React.MouseEvent) => void;
|
|
16
13
|
}
|
|
17
14
|
|
|
18
15
|
const ExcelSheetBar: React.FC<ExcelSheetBarProps> = ({
|
|
19
16
|
fileDetails,
|
|
20
17
|
handleSheetChange,
|
|
21
|
-
contextMenu,
|
|
22
|
-
addSheet,
|
|
23
18
|
selectedSheet,
|
|
24
|
-
contextSelect,
|
|
25
19
|
}) => {
|
|
26
20
|
const [activeTabId, setActiveTabId] = useState<string>('0');
|
|
27
21
|
|
|
@@ -34,10 +28,6 @@ const ExcelSheetBar: React.FC<ExcelSheetBarProps> = ({
|
|
|
34
28
|
name === selectedSheet.name ? 'active font-bold' : ''
|
|
35
29
|
}`}
|
|
36
30
|
onClick={() => handleSheetChange(name, index)}
|
|
37
|
-
onContextMenu={(e) => {
|
|
38
|
-
contextMenu(e, name, index);
|
|
39
|
-
contextSelect(e);
|
|
40
|
-
}}
|
|
41
31
|
>
|
|
42
32
|
{name}
|
|
43
33
|
</div>
|
|
@@ -57,7 +47,6 @@ const ExcelSheetBar: React.FC<ExcelSheetBarProps> = ({
|
|
|
57
47
|
name="plus_icon"
|
|
58
48
|
height={20}
|
|
59
49
|
width={20}
|
|
60
|
-
onClick={addSheet}
|
|
61
50
|
/>
|
|
62
51
|
</Tooltip>
|
|
63
52
|
</Col>
|
|
@@ -6,25 +6,41 @@ import Tooltip from '../../Tooltip';
|
|
|
6
6
|
import Icon from '../../Icon';
|
|
7
7
|
import classNames from 'classnames';
|
|
8
8
|
import Select from '../../Select';
|
|
9
|
+
import { CellBase } from '../ExcelFile/Excel';
|
|
10
|
+
import * as Matrix from '../ExcelFile/Excel/matrix';
|
|
9
11
|
|
|
10
|
-
|
|
12
|
+
interface ExcelToolBarProps {
|
|
13
|
+
toolbar?: 'show' | 'disable' | 'hide';
|
|
14
|
+
data: Matrix.Matrix<CellBase>;
|
|
15
|
+
onBold: (data: Matrix.Matrix<CellBase>) => void;
|
|
16
|
+
onItalic: (data: Matrix.Matrix<CellBase>) => void;
|
|
17
|
+
onUnderline: (data: Matrix.Matrix<CellBase>) => void;
|
|
18
|
+
setColor: (data: Matrix.Matrix<CellBase>, value: string) => void;
|
|
19
|
+
setBackgroundColor: (data: Matrix.Matrix<CellBase>, value: string) => void;
|
|
20
|
+
setFormatePainter: (data: Matrix.Matrix<CellBase>) => void;
|
|
21
|
+
}
|
|
11
22
|
|
|
12
23
|
const ExcelToolBar: React.FC<ExcelToolBarProps> = ({
|
|
13
24
|
toolbar = 'show',
|
|
14
|
-
|
|
15
|
-
|
|
25
|
+
data,
|
|
26
|
+
onBold,
|
|
27
|
+
onItalic,
|
|
28
|
+
onUnderline,
|
|
29
|
+
setColor,
|
|
30
|
+
setBackgroundColor,
|
|
31
|
+
setFormatePainter,
|
|
16
32
|
}) => {
|
|
17
33
|
const [borderType, setBorderType] = useState<string>('All Border');
|
|
18
34
|
const [textAlign, setTextAlign] = useState<string>('Text Left');
|
|
19
35
|
const [colorContainer, setColorPicker] = useState<ColorContainer>({
|
|
20
|
-
color:
|
|
21
|
-
backgroundColor:
|
|
22
|
-
borderColor:
|
|
36
|
+
color: 'var(--error-light)',
|
|
37
|
+
backgroundColor: 'var(--error-light)',
|
|
38
|
+
borderColor: 'var(--text-color)',
|
|
23
39
|
});
|
|
24
|
-
const [
|
|
25
|
-
|
|
26
|
-
const borderTypeIcon = () =>{
|
|
40
|
+
const [formatePainterState, setFormatePainterState] =
|
|
41
|
+
useState<boolean>(false);
|
|
27
42
|
|
|
43
|
+
const borderTypeIcon = () => {
|
|
28
44
|
return [
|
|
29
45
|
{ value: 'border-all-sides', label: 'All Border', icon: 'all_borders' },
|
|
30
46
|
{ value: 'border-bottom', label: 'Border Bottom', icon: 'border_bottom' },
|
|
@@ -32,18 +48,26 @@ const ExcelToolBar: React.FC<ExcelToolBarProps> = ({
|
|
|
32
48
|
{ value: 'border-right', label: 'Border Right', icon: 'border_right' },
|
|
33
49
|
{ value: 'border-top', label: 'Border Top', icon: 'border_top' },
|
|
34
50
|
{ value: 'border-none', label: 'No Border', icon: 'no_border' },
|
|
35
|
-
]
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
51
|
+
];
|
|
52
|
+
};
|
|
53
|
+
const TextAlignIcon = () => {
|
|
54
|
+
return [
|
|
55
|
+
{ label: 'Text Left', value: 'text-align-left', icon: 'text_align_left' },
|
|
56
|
+
{
|
|
57
|
+
label: 'Text Center',
|
|
58
|
+
value: 'text-align-center',
|
|
59
|
+
icon: 'text_align_center',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
label: 'Text Right',
|
|
63
|
+
value: 'text-align-right',
|
|
64
|
+
icon: 'text_align_right',
|
|
65
|
+
},
|
|
66
|
+
];
|
|
67
|
+
};
|
|
44
68
|
|
|
45
69
|
const getTextColor = (color: string) => {
|
|
46
|
-
setColorPicker((prev) => ({ ...prev, color }));
|
|
70
|
+
setColorPicker((prev) => ({ ...prev, color: color }));
|
|
47
71
|
};
|
|
48
72
|
|
|
49
73
|
const getBackgroundColor = (color: string) => {
|
|
@@ -52,8 +76,10 @@ const ExcelToolBar: React.FC<ExcelToolBarProps> = ({
|
|
|
52
76
|
|
|
53
77
|
useEffect(() => {
|
|
54
78
|
let timeGap = setTimeout(() => {
|
|
55
|
-
|
|
56
|
-
|
|
79
|
+
console.log(colorContainer.color);
|
|
80
|
+
|
|
81
|
+
setColor(data, colorContainer.color);
|
|
82
|
+
}, 0);
|
|
57
83
|
return () => {
|
|
58
84
|
clearTimeout(timeGap);
|
|
59
85
|
};
|
|
@@ -61,8 +87,8 @@ const ExcelToolBar: React.FC<ExcelToolBarProps> = ({
|
|
|
61
87
|
|
|
62
88
|
useEffect(() => {
|
|
63
89
|
let timeGap = setTimeout(() => {
|
|
64
|
-
|
|
65
|
-
},
|
|
90
|
+
setBackgroundColor(data, colorContainer.backgroundColor);
|
|
91
|
+
}, 0);
|
|
66
92
|
return () => {
|
|
67
93
|
clearTimeout(timeGap);
|
|
68
94
|
};
|
|
@@ -78,7 +104,7 @@ const ExcelToolBar: React.FC<ExcelToolBarProps> = ({
|
|
|
78
104
|
<Icon
|
|
79
105
|
disabled={toolbar === 'disable'}
|
|
80
106
|
onClick={() => {
|
|
81
|
-
|
|
107
|
+
onBold(data);
|
|
82
108
|
}}
|
|
83
109
|
name="bold"
|
|
84
110
|
/>
|
|
@@ -87,148 +113,142 @@ const ExcelToolBar: React.FC<ExcelToolBarProps> = ({
|
|
|
87
113
|
<Icon
|
|
88
114
|
disabled={toolbar === 'disable'}
|
|
89
115
|
onClick={() => {
|
|
90
|
-
|
|
116
|
+
onItalic(data);
|
|
91
117
|
}}
|
|
92
118
|
name="italic"
|
|
93
119
|
/>
|
|
94
120
|
</Tooltip>
|
|
95
121
|
|
|
96
122
|
<Select
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
}}
|
|
118
|
-
/>
|
|
119
|
-
<Select
|
|
120
|
-
label="Text Size"
|
|
121
|
-
onChange={()=>{}}
|
|
122
|
-
optionsList={[
|
|
123
|
-
{
|
|
124
|
-
label: 'Option 1',
|
|
125
|
-
value: '1'
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
label: 'Option 2',
|
|
129
|
-
value: '2'
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
label: 'Option 3',
|
|
133
|
-
value: '3'
|
|
134
|
-
}
|
|
135
|
-
]}
|
|
136
|
-
selectedOption={{
|
|
137
|
-
label: 'Option 2',
|
|
138
|
-
value: '11'
|
|
139
|
-
}}
|
|
140
|
-
/>
|
|
141
|
-
<div style={{display:"flex",alignItems:'center'}}>
|
|
142
|
-
<Tooltip placement="top" title={'Formate Painter'}>
|
|
143
|
-
<div className={formatePainter ? 'formate-painter-active' : ''}>
|
|
144
|
-
<Icon
|
|
145
|
-
disabled={toolbar === 'disable'}
|
|
146
|
-
onClick={() => {
|
|
147
|
-
setFormatePainter((prev) => !prev);
|
|
148
|
-
formatePaint();
|
|
149
|
-
}}
|
|
150
|
-
name="all_borders"
|
|
151
|
-
/>
|
|
152
|
-
</div>
|
|
153
|
-
</Tooltip>
|
|
154
|
-
<MenuOption
|
|
155
|
-
iconName="more"
|
|
156
|
-
options={borderTypeIcon()}
|
|
157
|
-
tooltipTitle="Border Type"
|
|
158
|
-
tooltipPlacement="top"
|
|
159
|
-
onOptionClick={(e) => {
|
|
160
|
-
setBorderType(borderType);
|
|
161
|
-
applyStyle('border', e.label);
|
|
123
|
+
className="textType"
|
|
124
|
+
label="Text type"
|
|
125
|
+
onChange={() => {}}
|
|
126
|
+
optionsList={[
|
|
127
|
+
{
|
|
128
|
+
label: 'Option 1',
|
|
129
|
+
value: '1',
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
label: 'Option 2',
|
|
133
|
+
value: '2',
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
label: 'Option 3',
|
|
137
|
+
value: '3',
|
|
138
|
+
},
|
|
139
|
+
]}
|
|
140
|
+
selectedOption={{
|
|
141
|
+
label: 'Option 2',
|
|
142
|
+
value: 'Arial',
|
|
162
143
|
}}
|
|
163
144
|
/>
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
setTextAlign(textAlign);
|
|
185
|
-
applyStyle('alignment', e.label);
|
|
145
|
+
<Select
|
|
146
|
+
label="Text Size"
|
|
147
|
+
onChange={() => {}}
|
|
148
|
+
optionsList={[
|
|
149
|
+
{
|
|
150
|
+
label: 'Option 1',
|
|
151
|
+
value: '1',
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
label: 'Option 2',
|
|
155
|
+
value: '2',
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
label: 'Option 3',
|
|
159
|
+
value: '3',
|
|
160
|
+
},
|
|
161
|
+
]}
|
|
162
|
+
selectedOption={{
|
|
163
|
+
label: 'Option 2',
|
|
164
|
+
value: '11',
|
|
186
165
|
}}
|
|
187
166
|
/>
|
|
167
|
+
<div style={{ display: 'flex', alignItems: 'center' }}>
|
|
168
|
+
<Tooltip placement="top" title={'Formate Painter'}>
|
|
169
|
+
<div className={formatePainterState ? 'formate-painter-active' : ''}>
|
|
170
|
+
<Icon
|
|
171
|
+
disabled={toolbar === 'disable'}
|
|
172
|
+
onClick={() => {
|
|
173
|
+
setFormatePainterState((prev) => !prev);
|
|
174
|
+
}}
|
|
175
|
+
name="all_borders"
|
|
176
|
+
/>
|
|
177
|
+
</div>
|
|
178
|
+
</Tooltip>
|
|
179
|
+
<MenuOption
|
|
180
|
+
iconName="more"
|
|
181
|
+
options={borderTypeIcon()}
|
|
182
|
+
tooltipTitle="Border Type"
|
|
183
|
+
tooltipPlacement="top"
|
|
184
|
+
onOptionClick={() => {
|
|
185
|
+
setBorderType(borderType);
|
|
186
|
+
}}
|
|
187
|
+
/>
|
|
188
|
+
</div>
|
|
189
|
+
<div style={{ display: 'flex', alignItems: 'center' }}>
|
|
190
|
+
<Tooltip placement="top" title={'Formate Painter'}>
|
|
191
|
+
<div className={formatePainterState ? 'formate-painter-active' : ''}>
|
|
192
|
+
<Icon
|
|
193
|
+
disabled={toolbar === 'disable'}
|
|
194
|
+
onClick={() => {
|
|
195
|
+
setFormatePainter(data);
|
|
196
|
+
setFormatePainterState((prev) => !prev);
|
|
197
|
+
}}
|
|
198
|
+
name="text_align_left"
|
|
199
|
+
/>
|
|
200
|
+
</div>
|
|
201
|
+
</Tooltip>
|
|
202
|
+
<MenuOption
|
|
203
|
+
iconName="more"
|
|
204
|
+
options={TextAlignIcon()}
|
|
205
|
+
tooltipTitle="Text Align"
|
|
206
|
+
tooltipPlacement="top"
|
|
207
|
+
onOptionClick={() => {
|
|
208
|
+
setTextAlign(textAlign);
|
|
209
|
+
}}
|
|
210
|
+
/>
|
|
188
211
|
</div>
|
|
189
212
|
<Tooltip placement="top" title={'Formate Painter'}>
|
|
190
|
-
<div className={
|
|
213
|
+
<div className={formatePainterState ? 'formate-painter-active' : ''}>
|
|
191
214
|
<Icon
|
|
192
215
|
disabled={toolbar === 'disable'}
|
|
193
216
|
onClick={() => {
|
|
194
|
-
|
|
195
|
-
formatePaint();
|
|
217
|
+
setFormatePainterState((prev) => !prev);
|
|
196
218
|
}}
|
|
197
219
|
name="formate_painter"
|
|
198
220
|
/>
|
|
199
221
|
</div>
|
|
200
222
|
</Tooltip>
|
|
201
223
|
<Tooltip placement="top" title={'Formate Painter'}>
|
|
202
|
-
<div className={
|
|
224
|
+
<div className={formatePainterState ? 'formate-painter-active' : ''}>
|
|
203
225
|
<Icon
|
|
204
226
|
disabled={toolbar === 'disable'}
|
|
205
227
|
onClick={() => {
|
|
206
|
-
|
|
207
|
-
formatePaint();
|
|
228
|
+
setFormatePainterState((prev) => !prev);
|
|
229
|
+
// formatePaint();
|
|
208
230
|
}}
|
|
209
231
|
name="strike_through"
|
|
210
232
|
/>
|
|
211
233
|
</div>
|
|
212
234
|
</Tooltip>
|
|
213
|
-
<Tooltip placement="top" title={'
|
|
214
|
-
<div
|
|
235
|
+
<Tooltip placement="top" title={'Underline'}>
|
|
236
|
+
<div>
|
|
215
237
|
<Icon
|
|
216
238
|
disabled={toolbar === 'disable'}
|
|
217
239
|
onClick={() => {
|
|
218
|
-
|
|
219
|
-
formatePaint();
|
|
240
|
+
onUnderline(data);
|
|
220
241
|
}}
|
|
221
242
|
name="underline"
|
|
222
243
|
/>
|
|
223
244
|
</div>
|
|
224
245
|
</Tooltip>
|
|
225
246
|
<Tooltip placement="top" title={'Formate Painter'}>
|
|
226
|
-
<div className={
|
|
247
|
+
<div className={formatePainterState ? 'formate-painter-active' : ''}>
|
|
227
248
|
<Icon
|
|
228
249
|
disabled={toolbar === 'disable'}
|
|
229
250
|
onClick={() => {
|
|
230
|
-
|
|
231
|
-
formatePaint();
|
|
251
|
+
setFormatePainterState((prev) => !prev);
|
|
232
252
|
}}
|
|
233
253
|
name="double_underline"
|
|
234
254
|
/>
|
|
@@ -239,7 +259,7 @@ const ExcelToolBar: React.FC<ExcelToolBarProps> = ({
|
|
|
239
259
|
<Icon
|
|
240
260
|
disabled={toolbar === 'disable'}
|
|
241
261
|
onClick={() => {
|
|
242
|
-
|
|
262
|
+
setColor(data, colorContainer.color);
|
|
243
263
|
}}
|
|
244
264
|
name="text_color"
|
|
245
265
|
/>
|
|
@@ -254,7 +274,7 @@ const ExcelToolBar: React.FC<ExcelToolBarProps> = ({
|
|
|
254
274
|
<Icon
|
|
255
275
|
disabled={toolbar === 'disable'}
|
|
256
276
|
onClick={() => {
|
|
257
|
-
|
|
277
|
+
setBackgroundColor(data, colorContainer.backgroundColor);
|
|
258
278
|
}}
|
|
259
279
|
name="fill_color"
|
|
260
280
|
/>
|
|
@@ -31,64 +31,8 @@ interface WorkData {
|
|
|
31
31
|
value: string;
|
|
32
32
|
|
|
33
33
|
/** Styling options for the cell */
|
|
34
|
-
style:
|
|
35
|
-
type?:boolean;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
interface CellStyle {
|
|
39
|
-
/** Font name for the cell text */
|
|
40
|
-
name?: string;
|
|
41
|
-
|
|
42
|
-
/** Font size of the cell text */
|
|
43
|
-
size?: number;
|
|
44
|
-
|
|
45
|
-
position?:string;
|
|
46
|
-
|
|
47
|
-
/** Whether the text is bold */
|
|
48
|
-
bold?: boolean;
|
|
49
|
-
|
|
50
|
-
fontSize?: string,
|
|
51
|
-
fontFamily?: string,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
/** Whether the text is italicized */
|
|
55
|
-
italic?: boolean;
|
|
56
|
-
|
|
57
|
-
/** Text color in the cell (hex code) */
|
|
58
|
-
color?: string;
|
|
59
|
-
|
|
60
|
-
/** Background color of the cell (hex code) */
|
|
61
|
-
backgroundColor?: string;
|
|
62
|
-
|
|
63
|
-
/** Border color of the cell (hex code) */
|
|
64
|
-
borderColor?: string;
|
|
65
|
-
|
|
66
|
-
/** Border styles for each side of the cell */
|
|
67
|
-
border?: {
|
|
68
|
-
/** Border style for the top side of the cell */
|
|
69
|
-
top: string;
|
|
70
|
-
|
|
71
|
-
/** Border style for the bottom side of the cell */
|
|
72
|
-
bottom: string;
|
|
73
|
-
|
|
74
|
-
/** Border style for the left side of the cell */
|
|
75
|
-
left: string;
|
|
76
|
-
|
|
77
|
-
/** Border style for the right side of the cell */
|
|
78
|
-
right: string;
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
/** Text alignment and wrapping properties */
|
|
82
|
-
alignment?: {
|
|
83
|
-
/** Horizontal text alignment ('left', 'center', or 'right') */
|
|
84
|
-
horizontal: string;
|
|
85
|
-
|
|
86
|
-
/** Vertical text alignment ('top', 'middle', or 'bottom') */
|
|
87
|
-
vertical: string;
|
|
88
|
-
|
|
89
|
-
/** Whether the text is wrapped within the cell */
|
|
90
|
-
wrapText: boolean;
|
|
91
|
-
};
|
|
34
|
+
style: React.CSSProperties;
|
|
35
|
+
type?: boolean;
|
|
92
36
|
}
|
|
93
37
|
|
|
94
38
|
/** A generic type to represent a 2D matrix of any type (or undefined values) */
|
|
@@ -160,22 +104,11 @@ interface SelectedValue {
|
|
|
160
104
|
alphaCol: string;
|
|
161
105
|
|
|
162
106
|
/** The style applied to the selected cell */
|
|
163
|
-
style:
|
|
107
|
+
style: React.CSSProperties;
|
|
164
108
|
|
|
165
109
|
/** The sheet name where the cell is located */
|
|
166
110
|
sheet: string;
|
|
167
111
|
}
|
|
168
|
-
interface ExcelToolBarProps {
|
|
169
|
-
/** use this to hide/show/disable the toolbar */
|
|
170
|
-
toolbar?: 'show' | 'disable' | 'hide';
|
|
171
|
-
|
|
172
|
-
/** function to apply styles */
|
|
173
|
-
applyStyle: (styleType: string, value: any) => void;
|
|
174
|
-
|
|
175
|
-
/** function to trigger format painter */
|
|
176
|
-
formatePaint: () => void;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
112
|
interface ExcelSheetBarProps {
|
|
180
113
|
/** Object containing details about the file, including sheet names */
|
|
181
114
|
fileDetails: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from './ExcelFile/ExcelFile';
|
|
1
|
+
export { default } from './ExcelFile/ExcelFile';
|
|
@@ -56,19 +56,20 @@
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
|
|
59
|
+
|
|
60
60
|
.ff-form-radio-group {
|
|
61
|
-
display: flex;
|
|
61
|
+
display: flex;
|
|
62
62
|
flex-direction: column;
|
|
63
63
|
gap: 1rem;
|
|
64
64
|
margin-bottom: 16px;
|
|
65
|
-
|
|
65
|
+
|
|
66
|
+
.ff-radio-group-wrapper {
|
|
66
67
|
display: flex;
|
|
67
68
|
}
|
|
68
69
|
.ff-radio-gender {
|
|
69
70
|
display: flex;
|
|
70
71
|
flex-direction: column;
|
|
71
|
-
align-items: center;
|
|
72
|
+
align-items: center;
|
|
72
73
|
|
|
73
74
|
input[type="radio"] {
|
|
74
75
|
margin-right: 0.5rem;
|
|
@@ -96,3 +97,46 @@
|
|
|
96
97
|
}
|
|
97
98
|
}
|
|
98
99
|
}
|
|
100
|
+
|
|
101
|
+
.ff-main {
|
|
102
|
+
padding: 40px;
|
|
103
|
+
border-radius: 10px;
|
|
104
|
+
background-color: var(--tree-connecting-lines-color);
|
|
105
|
+
|
|
106
|
+
.ff-error {
|
|
107
|
+
padding-left: 12px;
|
|
108
|
+
color: var(--error-light);
|
|
109
|
+
margin-top: 4px;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.ff-radio{
|
|
113
|
+
margin-top: 8px;
|
|
114
|
+
}
|
|
115
|
+
.ff-check{
|
|
116
|
+
display: flex;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.ff-textarea{
|
|
120
|
+
margin-top: 8px;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.ff-button-layout {
|
|
124
|
+
width: 99%;
|
|
125
|
+
display: flex;
|
|
126
|
+
gap: 12px;
|
|
127
|
+
margin-top: 24px;
|
|
128
|
+
|
|
129
|
+
button {
|
|
130
|
+
width: 50%;
|
|
131
|
+
background-color: var(--brand-color);
|
|
132
|
+
color: var(--primary-button-text-color);
|
|
133
|
+
border: none;
|
|
134
|
+
border-radius: 8px;
|
|
135
|
+
padding: 10px;
|
|
136
|
+
cursor: pointer;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
.ff-select {
|
|
140
|
+
width: 90%;
|
|
141
|
+
}
|
|
142
|
+
}
|