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.
Files changed (176) hide show
  1. package/lib/components/AppHeader/types.d.ts +11 -2
  2. package/lib/components/Avatar/Avatar.d.ts +5 -0
  3. package/lib/components/Avatar/Avatar.stories.d.ts +10 -0
  4. package/lib/components/Avatar/index.d.ts +1 -0
  5. package/lib/components/Avatar/types.d.ts +26 -0
  6. package/lib/components/ExcelFile/ExcelFile/Excel/ActiveCell.d.ts +2 -2
  7. package/lib/components/ExcelFile/ExcelFile/Excel/ColumnIndicator.d.ts +2 -2
  8. package/lib/components/ExcelFile/ExcelFile/Excel/Copied.d.ts +1 -1
  9. package/lib/components/ExcelFile/ExcelFile/Excel/CornerIndicator.d.ts +2 -2
  10. package/lib/components/ExcelFile/ExcelFile/Excel/DataEditor.d.ts +2 -2
  11. package/lib/components/ExcelFile/ExcelFile/Excel/DataViewer.d.ts +2 -2
  12. package/lib/components/ExcelFile/ExcelFile/Excel/FloatingRect.d.ts +2 -2
  13. package/lib/components/ExcelFile/ExcelFile/Excel/HeaderRow.d.ts +1 -1
  14. package/lib/components/ExcelFile/ExcelFile/Excel/Row.d.ts +1 -1
  15. package/lib/components/ExcelFile/ExcelFile/Excel/RowIndicator.d.ts +2 -2
  16. package/lib/components/ExcelFile/ExcelFile/Excel/Selected.d.ts +1 -1
  17. package/lib/components/ExcelFile/ExcelFile/Excel/Spreadsheet.d.ts +6 -7
  18. package/lib/components/ExcelFile/ExcelFile/Excel/Table.d.ts +1 -1
  19. package/lib/components/ExcelFile/ExcelFile/Excel/actions.d.ts +49 -5
  20. package/lib/components/ExcelFile/ExcelFile/Excel/context.d.ts +3 -3
  21. package/lib/components/ExcelFile/ExcelFile/Excel/engine/engine.d.ts +5 -5
  22. package/lib/components/ExcelFile/ExcelFile/Excel/engine/formula.d.ts +6 -6
  23. package/lib/components/ExcelFile/ExcelFile/Excel/engine/index.d.ts +2 -2
  24. package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-graph.d.ts +2 -2
  25. package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-hash.d.ts +1 -1
  26. package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-set.d.ts +1 -1
  27. package/lib/components/ExcelFile/ExcelFile/Excel/index.d.ts +11 -11
  28. package/lib/components/ExcelFile/ExcelFile/Excel/matrix.d.ts +1 -1
  29. package/lib/components/ExcelFile/ExcelFile/Excel/point-range.d.ts +1 -1
  30. package/lib/components/ExcelFile/ExcelFile/Excel/reducer.d.ts +5 -5
  31. package/lib/components/ExcelFile/ExcelFile/Excel/selection.d.ts +3 -3
  32. package/lib/components/ExcelFile/ExcelFile/Excel/types.d.ts +11 -48
  33. package/lib/components/ExcelFile/ExcelFile/Excel/use-dispatch.d.ts +1 -1
  34. package/lib/components/ExcelFile/ExcelFile/Excel/use-selector.d.ts +1 -1
  35. package/lib/components/ExcelFile/ExcelFile/Excel/util.d.ts +11 -12
  36. package/lib/components/ExcelFile/ExcelFile/ExcelFile.d.ts +16 -0
  37. package/lib/components/ExcelFile/ExcelSheetBar/ExcelSheetBar.d.ts +0 -3
  38. package/lib/components/ExcelFile/ExcelToolBar/ExcelToolBar.d.ts +12 -0
  39. package/lib/components/ExcelFile/Types.d.ts +2 -49
  40. package/lib/components/Form/Form.d.ts +1 -15
  41. package/lib/components/Form/Form.stories.d.ts +6 -5
  42. package/lib/components/Form/Forms.d.ts +8 -0
  43. package/lib/components/Form/index.d.ts +1 -1
  44. package/lib/components/Icon/types.d.ts +1 -1
  45. package/lib/components/MenuOption/types.d.ts +7 -7
  46. package/lib/components/MiniModal/MiniModal.stories.d.ts +1 -0
  47. package/lib/components/MiniModal/types.d.ts +6 -6
  48. package/lib/components/ModulesChip/ModuleChip.d.ts +4 -0
  49. package/lib/components/ModulesChip/ModuleChip.stories.d.ts +6 -0
  50. package/lib/components/ModulesChip/index.d.ts +1 -0
  51. package/lib/components/ModulesChip/types.d.ts +14 -0
  52. package/lib/components/MultiSelect/MultiSelectTypes.d.ts +1 -0
  53. package/lib/components/Toastify/Toastify.d.ts +8 -0
  54. package/lib/components/Toastify/Toastify.stories.d.ts +6 -0
  55. package/lib/components/Toastify/index.d.ts +1 -0
  56. package/lib/components/Toastify/types.d.ts +7 -0
  57. package/lib/components/Tooltip/types.d.ts +6 -0
  58. package/lib/components/Typography/types.d.ts +1 -0
  59. package/lib/index.d.ts +84 -31
  60. package/lib/index.esm.js +26720 -881
  61. package/lib/index.esm.js.map +1 -1
  62. package/lib/index.js +26718 -875
  63. package/lib/index.js.map +1 -1
  64. package/lib/tsconfig.tsbuildinfo +1 -1
  65. package/package.json +1 -1
  66. package/src/StyleGuide/ColorPalette/colorPaletteList.ts +10 -0
  67. package/src/assets/Themes/BaseTheme.scss +2 -0
  68. package/src/assets/Themes/DarkTheme.scss +2 -0
  69. package/src/assets/icons/add_testcase.svg +3 -0
  70. package/src/assets/icons/add_variable_icon.svg +3 -4
  71. package/src/assets/icons/attachment_icon.svg +3 -0
  72. package/src/assets/icons/authorization_icon.svg +3 -0
  73. package/src/assets/icons/automation_testcase.svg +4 -0
  74. package/src/assets/icons/back_icon.svg +3 -0
  75. package/src/assets/icons/client_profile.svg +4 -0
  76. package/src/assets/icons/fireflink_finder_logo.svg +7 -0
  77. package/src/assets/icons/fireflink_platform.svg +4 -0
  78. package/src/assets/icons/license_expired.svg +20 -0
  79. package/src/assets/icons/manual_testcase.svg +3 -0
  80. package/src/assets/icons/variable_icon.svg +4 -0
  81. package/src/components/AllProjectsDropdown/AllProjectsDropdown.scss +2 -2
  82. package/src/components/AllProjectsDropdown/AllProjectsDropdown.tsx +1 -1
  83. package/src/components/AppHeader/AppHeader.stories.tsx +24 -3
  84. package/src/components/AppHeader/AppHeader.tsx +29 -11
  85. package/src/components/AppHeader/types.ts +11 -3
  86. package/src/components/Avatar/Avatar.scss +24 -0
  87. package/src/components/Avatar/Avatar.stories.tsx +56 -0
  88. package/src/components/Avatar/Avatar.tsx +25 -0
  89. package/src/components/Avatar/index.ts +1 -0
  90. package/src/components/Avatar/types.ts +27 -0
  91. package/src/components/Button/types.ts +1 -1
  92. package/src/components/ExcelFile/ColorBarselector/ColorBarSelector.scss +0 -2
  93. package/src/components/ExcelFile/ContextMenu/ContextMenu.scss +1 -4
  94. package/src/components/ExcelFile/ContextMenu/ContextMenu.tsx +0 -1
  95. package/src/components/ExcelFile/ExcelFile/Excel/ActiveCell.tsx +13 -13
  96. package/src/components/ExcelFile/ExcelFile/Excel/Cell.tsx +13 -12
  97. package/src/components/ExcelFile/ExcelFile/Excel/ColumnIndicator.tsx +40 -32
  98. package/src/components/ExcelFile/ExcelFile/Excel/Copied.tsx +4 -4
  99. package/src/components/ExcelFile/ExcelFile/Excel/CornerIndicator.tsx +10 -10
  100. package/src/components/ExcelFile/ExcelFile/Excel/DataEditor.tsx +5 -5
  101. package/src/components/ExcelFile/ExcelFile/Excel/DataViewer.tsx +10 -10
  102. package/src/components/ExcelFile/ExcelFile/Excel/FloatingRect.tsx +6 -6
  103. package/src/components/ExcelFile/ExcelFile/Excel/HeaderRow.tsx +1 -1
  104. package/src/components/ExcelFile/ExcelFile/Excel/Row.tsx +1 -1
  105. package/src/components/ExcelFile/ExcelFile/Excel/RowIndicator.tsx +34 -27
  106. package/src/components/ExcelFile/ExcelFile/Excel/Selected.tsx +5 -5
  107. package/src/components/ExcelFile/ExcelFile/Excel/{Spreadsheet.css → Spreadsheet.scss} +21 -37
  108. package/src/components/ExcelFile/ExcelFile/Excel/Spreadsheet.tsx +87 -78
  109. package/src/components/ExcelFile/ExcelFile/Excel/Table.tsx +2 -2
  110. package/src/components/ExcelFile/ExcelFile/Excel/actions.ts +121 -31
  111. package/src/components/ExcelFile/ExcelFile/Excel/areModelsEqual.ts +1 -1
  112. package/src/components/ExcelFile/ExcelFile/Excel/context.ts +4 -4
  113. package/src/components/ExcelFile/ExcelFile/Excel/engine/engine.ts +7 -7
  114. package/src/components/ExcelFile/ExcelFile/Excel/engine/formula.ts +11 -11
  115. package/src/components/ExcelFile/ExcelFile/Excel/engine/index.ts +2 -2
  116. package/src/components/ExcelFile/ExcelFile/Excel/engine/point-graph.ts +3 -3
  117. package/src/components/ExcelFile/ExcelFile/Excel/engine/point-hash.ts +2 -2
  118. package/src/components/ExcelFile/ExcelFile/Excel/engine/point-set.ts +2 -2
  119. package/src/components/ExcelFile/ExcelFile/Excel/index.ts +12 -11
  120. package/src/components/ExcelFile/ExcelFile/Excel/matrix.ts +18 -24
  121. package/src/components/ExcelFile/ExcelFile/Excel/point-range.ts +1 -1
  122. package/src/components/ExcelFile/ExcelFile/Excel/reducer.ts +311 -41
  123. package/src/components/ExcelFile/ExcelFile/Excel/selection.ts +5 -5
  124. package/src/components/ExcelFile/ExcelFile/Excel/types.ts +14 -66
  125. package/src/components/ExcelFile/ExcelFile/Excel/typings/fast-formula-parser.d.ts +8 -8
  126. package/src/components/ExcelFile/ExcelFile/Excel/use-dispatch.ts +2 -2
  127. package/src/components/ExcelFile/ExcelFile/Excel/use-selector.ts +3 -3
  128. package/src/components/ExcelFile/ExcelFile/Excel/util.ts +21 -22
  129. package/src/components/ExcelFile/ExcelFile/ExcelFile.scss +0 -3
  130. package/src/components/ExcelFile/ExcelFile/ExcelFile.tsx +45 -403
  131. package/src/components/ExcelFile/ExcelFile.stories.tsx +10 -29
  132. package/src/components/ExcelFile/ExcelSheetBar/ExcelSheetBar.tsx +1 -12
  133. package/src/components/ExcelFile/ExcelToolBar/ExcelToolBar.scss +0 -3
  134. package/src/components/ExcelFile/ExcelToolBar/ExcelToolBar.tsx +147 -127
  135. package/src/components/ExcelFile/Types.ts +3 -70
  136. package/src/components/ExcelFile/index.ts +1 -1
  137. package/src/components/Form/Form.d.ts +3 -0
  138. package/src/components/Form/Form.scss +48 -4
  139. package/src/components/Form/Form.stories.tsx +244 -137
  140. package/src/components/Form/Form.ts +2 -0
  141. package/src/components/Form/Forms.tsx +25 -0
  142. package/src/components/Form/index.ts +1 -1
  143. package/src/components/Icon/iconList.ts +23 -0
  144. package/src/components/Icon/types.ts +1 -1
  145. package/src/components/IconButton/IconButton.scss +1 -1
  146. package/src/components/MenuOption/types.ts +7 -6
  147. package/src/components/MiniModal/MiniModal.scss +5 -0
  148. package/src/components/MiniModal/MiniModal.stories.tsx +95 -0
  149. package/src/components/MiniModal/MiniModal.tsx +11 -6
  150. package/src/components/MiniModal/types.ts +6 -6
  151. package/src/components/ModulesChip/ModuleChip.scss +20 -0
  152. package/src/components/ModulesChip/ModuleChip.stories.tsx +41 -0
  153. package/src/components/ModulesChip/ModuleChip.tsx +31 -0
  154. package/src/components/ModulesChip/index.ts +1 -0
  155. package/src/components/ModulesChip/types.ts +14 -0
  156. package/src/components/MultiSelect/Dropdown.tsx +6 -1
  157. package/src/components/MultiSelect/MultiSelect.scss +17 -10
  158. package/src/components/MultiSelect/MultiSelect.stories.tsx +16 -4
  159. package/src/components/MultiSelect/MultiSelect.tsx +11 -4
  160. package/src/components/MultiSelect/MultiSelectTypes.ts +4 -3
  161. package/src/components/Select/Select.scss +4 -0
  162. package/src/components/Select/Select.tsx +2 -2
  163. package/src/components/Toastify/Toastify.stories.tsx +52 -0
  164. package/src/components/Toastify/Toastify.tsx +66 -0
  165. package/src/components/Toastify/index.ts +1 -0
  166. package/src/components/Toastify/types.ts +8 -0
  167. package/src/components/Tooltip/Tooltip.tsx +2 -1
  168. package/src/components/Tooltip/types.ts +6 -0
  169. package/src/components/Typography/Typography.scss +12 -4
  170. package/src/components/Typography/Typography.stories.tsx +2 -0
  171. package/src/components/Typography/Typography.tsx +2 -0
  172. package/src/components/Typography/types.ts +1 -0
  173. package/src/index.ts +9 -1
  174. package/src/components/ExcelFile/ChangeExcelStyles.tsx +0 -78
  175. package/src/components/ExcelFile/ImportExcelStyles.tsx +0 -86
  176. 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: "red",
46
- backgroundColor: "white",
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: "black",
60
- backgroundColor: "white",
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: "black",
76
- backgroundColor: "white",
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: "black",
90
- backgroundColor: "white",
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[]; // List of sheet names
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>
@@ -1,6 +1,3 @@
1
- @import '../../../assets/styles/colors';
2
- @import '../../../assets/styles/fonts';
3
-
4
1
  .excel-toolbar {
5
2
  display: flex;
6
3
  align-items: center;
@@ -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
- let colors={grey_dark:"#000000"}
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
- applyStyle,
15
- formatePaint,
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: colors.grey_dark.replace('#', ''),
21
- backgroundColor: colors.grey_dark.replace('#', ''),
22
- borderColor: colors.grey_dark.replace('#', ''),
36
+ color: 'var(--error-light)',
37
+ backgroundColor: 'var(--error-light)',
38
+ borderColor: 'var(--text-color)',
23
39
  });
24
- const [formatePainter, setFormatePainter] = useState<boolean>(false);
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
- const TextAlignIcon = () => {
38
- return [
39
- { label: 'Text Left', value: 'text-align-left', icon: 'text_align_left' },
40
- { label: 'Text Center', value: 'text-align-center', icon: 'text_align_center' },
41
- { label: 'Text Right', value: 'text-align-right', icon: 'text_align_right' },
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
- applyStyle('color', colorContainer.color);
56
- }, 800);
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
- applyStyle('backgroundColor', colorContainer.backgroundColor);
65
- }, 800);
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
- applyStyle('bold', true);
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
- applyStyle('italic', true);
116
+ onItalic(data);
91
117
  }}
92
118
  name="italic"
93
119
  />
94
120
  </Tooltip>
95
121
 
96
122
  <Select
97
- className='textType'
98
- label="Text type"
99
- onChange={()=>{}}
100
- optionsList={[
101
- {
102
- label: 'Option 1',
103
- value: '1'
104
- },
105
- {
106
- label: 'Option 2',
107
- value: '2'
108
- },
109
- {
110
- label: 'Option 3',
111
- value: '3'
112
- }
113
- ]}
114
- selectedOption={{
115
- label: 'Option 2',
116
- value: 'Arial'
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
- </div>
165
- <div style={{display:"flex",alignItems:'center'}}>
166
- <Tooltip placement="top" title={'Formate Painter'}>
167
- <div className={formatePainter ? 'formate-painter-active' : ''}>
168
- <Icon
169
- disabled={toolbar === 'disable'}
170
- onClick={() => {
171
- setFormatePainter((prev) => !prev);
172
- formatePaint();
173
- }}
174
- name="text_align_left"
175
- />
176
- </div>
177
- </Tooltip>
178
- <MenuOption
179
- iconName="more"
180
- options={TextAlignIcon()}
181
- tooltipTitle="Text Align"
182
- tooltipPlacement="top"
183
- onOptionClick={(e) => {
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={formatePainter ? 'formate-painter-active' : ''}>
213
+ <div className={formatePainterState ? 'formate-painter-active' : ''}>
191
214
  <Icon
192
215
  disabled={toolbar === 'disable'}
193
216
  onClick={() => {
194
- setFormatePainter((prev) => !prev);
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={formatePainter ? 'formate-painter-active' : ''}>
224
+ <div className={formatePainterState ? 'formate-painter-active' : ''}>
203
225
  <Icon
204
226
  disabled={toolbar === 'disable'}
205
227
  onClick={() => {
206
- setFormatePainter((prev) => !prev);
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={'Formate Painter'}>
214
- <div className={formatePainter ? 'formate-painter-active' : ''}>
235
+ <Tooltip placement="top" title={'Underline'}>
236
+ <div>
215
237
  <Icon
216
238
  disabled={toolbar === 'disable'}
217
239
  onClick={() => {
218
- setFormatePainter((prev) => !prev);
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={formatePainter ? 'formate-painter-active' : ''}>
247
+ <div className={formatePainterState ? 'formate-painter-active' : ''}>
227
248
  <Icon
228
249
  disabled={toolbar === 'disable'}
229
250
  onClick={() => {
230
- setFormatePainter((prev) => !prev);
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
- applyStyle('color', colorContainer.color);
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
- applyStyle('backgroundColor', colorContainer.backgroundColor);
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: CellStyle;
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: CellStyle;
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';
@@ -0,0 +1,3 @@
1
+ declare module 'Form' {
2
+ export * from 'react-hook-form';
3
+ }
@@ -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
- .ff-radio-group-wrapper{
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
+ }