pixel-react-excel-sheet 1.0.38 → 1.0.40

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 (150) hide show
  1. package/lib/components/Button/Button.d.ts +2 -2
  2. package/lib/components/Charts/DashboardDonutChart/types.d.ts +3 -0
  3. package/lib/components/Charts/LineChart/types.d.ts +1 -0
  4. package/lib/components/ChooseFile/ChooseFile.d.ts +3 -2
  5. package/lib/components/Comment/Comments.d.ts +1 -1
  6. package/lib/components/Comment/type.d.ts +3 -3
  7. package/lib/components/ConditionalDropdown/types.d.ts +4 -0
  8. package/lib/components/DatePicker/types.d.ts +2 -0
  9. package/lib/components/Drawer/Types.d.ts +3 -0
  10. package/lib/components/Excel/ExcelFile/ExcelFile.d.ts +11 -10
  11. package/lib/components/Excel/ExcelFile/ExcelFileComponents/ActiveCell.d.ts +10 -0
  12. package/lib/components/Excel/ExcelFile/ExcelFileComponents/DataViewer.d.ts +1 -1
  13. package/lib/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.d.ts +9 -0
  14. package/lib/components/Excel/ExcelFile/ExcelFileComponents/types.d.ts +0 -3
  15. package/lib/components/Excel/Types.d.ts +15 -11
  16. package/lib/components/FF_Captcha/Recaptcha.d.ts +2 -1
  17. package/lib/components/FF_Captcha/types.d.ts +11 -2
  18. package/lib/components/Input/types.d.ts +4 -0
  19. package/lib/components/LabelEditTextField/types.d.ts +2 -0
  20. package/lib/components/MobileSkin/MobileSkin.d.ts +5 -0
  21. package/lib/components/MobileSkin/MobileSkinInterface.d.ts +13 -0
  22. package/lib/components/MobileSkin/index.d.ts +1 -0
  23. package/lib/components/MobileSkin/types.d.ts +32 -0
  24. package/lib/components/Search/Search.d.ts +1 -1
  25. package/lib/components/Search/types.d.ts +1 -0
  26. package/lib/components/Select/components/types.d.ts +3 -2
  27. package/lib/components/Select/types.d.ts +10 -2
  28. package/lib/components/SequentialConnectingBranch/components/Branches/Branches.d.ts +1 -1
  29. package/lib/components/SequentialConnectingBranch/components/Branches/types.d.ts +1 -0
  30. package/lib/components/SequentialConnectingBranch/components/ConnectingBranches/ConnectingBranches.d.ts +1 -1
  31. package/lib/components/SequentialConnectingBranch/components/ConnectingBranches/types.d.ts +1 -0
  32. package/lib/components/SequentialConnectingBranch/types.d.ts +1 -0
  33. package/lib/components/TableTree/types.d.ts +4 -4
  34. package/lib/components/Tabs/types.d.ts +1 -0
  35. package/lib/index.d.ts +96 -40
  36. package/lib/index.esm.js +4816 -1669
  37. package/lib/index.esm.js.map +1 -1
  38. package/lib/index.js +4829 -1669
  39. package/lib/index.js.map +1 -1
  40. package/lib/tsconfig.tsbuildinfo +1 -1
  41. package/lib/utils/formData/ConvertFormDataToObject.d.ts +1 -0
  42. package/lib/utils/keyBoardActionUtil/UseKeyboardActions.d.ts +2 -0
  43. package/lib/utils/keyBoardActionUtil/types.d.ts +4 -0
  44. package/lib/validations/regex.d.ts +11 -1
  45. package/package.json +6 -1
  46. package/src/assets/Themes/BaseTheme.scss +3 -1
  47. package/src/assets/Themes/DarkTheme.scss +10 -1
  48. package/src/assets/icons/clear_cache.svg +5 -0
  49. package/src/assets/icons/external_user.svg +13 -0
  50. package/src/assets/icons/group_user.svg +12 -0
  51. package/src/assets/icons/single_user.svg +12 -0
  52. package/src/assets/icons/test_freshers_logo.svg +8 -0
  53. package/src/assets/icons/unfollow_icon.svg +3 -0
  54. package/src/components/AllProjectsDropdown/AllProjectsDropdown.scss +7 -45
  55. package/src/components/AllProjectsDropdown/AllProjectsDropdown.stories.tsx +5 -0
  56. package/src/components/AllProjectsDropdown/AllProjectsDropdown.tsx +76 -64
  57. package/src/components/Button/Button.scss +0 -1
  58. package/src/components/Button/Button.tsx +3 -4
  59. package/src/components/Charts/DashboardDonutChart/DashboardDonutChart.stories.tsx +38 -6
  60. package/src/components/Charts/DashboardDonutChart/DashboardDonutChart.tsx +10 -4
  61. package/src/components/Charts/DashboardDonutChart/types.ts +4 -1
  62. package/src/components/Charts/LineChart/LineChart.stories.tsx +27 -88
  63. package/src/components/Charts/LineChart/LineChart.tsx +138 -42
  64. package/src/components/Charts/LineChart/types.ts +1 -0
  65. package/src/components/Charts/MultiRadialChart/MultiRadialChart.scss +3 -3
  66. package/src/components/Charts/MultiRadialChart/MultiRadialChart.tsx +47 -43
  67. package/src/components/ChooseFile/ChooseFile.tsx +3 -4
  68. package/src/components/Comment/Comments.scss +0 -1
  69. package/src/components/Comment/Comments.stories.tsx +22 -4
  70. package/src/components/Comment/Comments.tsx +20 -1
  71. package/src/components/Comment/type.ts +3 -3
  72. package/src/components/ConditionalDropdown/ConditionalDropdown.stories.tsx +1 -0
  73. package/src/components/ConditionalDropdown/ConditionalDropdown.tsx +2 -1
  74. package/src/components/ConditionalDropdown/types.ts +4 -0
  75. package/src/components/DatePicker/DatePicker.scss +307 -2
  76. package/src/components/DatePicker/DatePicker.tsx +27 -19
  77. package/src/components/DatePicker/types.ts +4 -0
  78. package/src/components/Drawer/Drawer.stories.tsx +1 -1
  79. package/src/components/Drawer/Types.ts +4 -2
  80. package/src/components/Editor/Editor.scss +23 -18
  81. package/src/components/Editor/Editor.tsx +2 -2
  82. package/src/components/Excel/ExcelContextMenu/ExcelContextMenu.tsx +6 -3
  83. package/src/components/Excel/ExcelFile/ExcelFile.scss +45 -41
  84. package/src/components/Excel/ExcelFile/ExcelFile.tsx +70 -64
  85. package/src/components/Excel/ExcelFile/ExcelFileComponents/ActiveCell.tsx +29 -1
  86. package/src/components/Excel/ExcelFile/ExcelFileComponents/Cell.tsx +1 -37
  87. package/src/components/Excel/ExcelFile/ExcelFileComponents/DataViewer.tsx +1 -40
  88. package/src/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.scss +3 -3
  89. package/src/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.tsx +14 -1
  90. package/src/components/Excel/ExcelFile/ExcelFileComponents/reducer.ts +3 -0
  91. package/src/components/Excel/ExcelFile/ExcelFileComponents/reducerFunctions.ts +8 -74
  92. package/src/components/Excel/ExcelFile/ExcelFileComponents/types.ts +0 -5
  93. package/src/components/Excel/ExcelFile.stories.tsx +116 -125
  94. package/src/components/Excel/ExcelToolBar/ExcelToolBar.tsx +10 -11
  95. package/src/components/Excel/Types.ts +18 -16
  96. package/src/components/FF_Captcha/Recaptcha.tsx +19 -9
  97. package/src/components/FF_Captcha/types.ts +12 -4
  98. package/src/components/Icon/Icon.stories.tsx +56 -8
  99. package/src/components/Icon/iconList.ts +13 -1
  100. package/src/components/Input/Input.stories.tsx +12 -0
  101. package/src/components/Input/Input.tsx +3 -1
  102. package/src/components/Input/types.ts +4 -0
  103. package/src/components/InputWithDropdown/types.ts +1 -1
  104. package/src/components/LabelEditTextField/LabelEditTextField.scss +4 -0
  105. package/src/components/LabelEditTextField/LabelEditTextField.stories.tsx +2 -1
  106. package/src/components/LabelEditTextField/LabelEditTextField.tsx +14 -10
  107. package/src/components/LabelEditTextField/types.ts +2 -0
  108. package/src/components/LazyLoad/LazyLoad.stories.tsx +1 -0
  109. package/src/components/LazyLoad/LazyLoading.tsx +10 -1
  110. package/src/components/MachineInputField/MachineInputField.scss +5 -1
  111. package/src/components/MachineInputField/MachineInputField.tsx +1 -0
  112. package/src/components/MobileSkin/MobileSkin.scss +67 -0
  113. package/src/components/MobileSkin/MobileSkin.stories.tsx +93 -0
  114. package/src/components/MobileSkin/MobileSkin.tsx +89 -0
  115. package/src/components/MobileSkin/MobileSkinInterface.ts +13 -0
  116. package/src/components/MobileSkin/index.ts +1 -0
  117. package/src/components/MobileSkin/types.ts +32 -0
  118. package/src/components/Modal/Modal.stories.tsx +7 -0
  119. package/src/components/Modal/Modal.tsx +17 -20
  120. package/src/components/Search/Search.scss +8 -0
  121. package/src/components/Search/Search.tsx +17 -6
  122. package/src/components/Search/types.ts +1 -0
  123. package/src/components/Select/Select.stories.tsx +85 -0
  124. package/src/components/Select/Select.tsx +10 -2
  125. package/src/components/Select/components/Dropdown.tsx +23 -15
  126. package/src/components/Select/components/types.ts +3 -2
  127. package/src/components/Select/types.ts +12 -2
  128. package/src/components/SequentialConnectingBranch/SequentialConnectingBranch.tsx +2 -0
  129. package/src/components/SequentialConnectingBranch/components/Branches/Branches.tsx +65 -57
  130. package/src/components/SequentialConnectingBranch/components/Branches/types.ts +1 -0
  131. package/src/components/SequentialConnectingBranch/components/ConnectingBranches/ConnectingBranches.tsx +2 -0
  132. package/src/components/SequentialConnectingBranch/components/ConnectingBranches/types.ts +1 -0
  133. package/src/components/SequentialConnectingBranch/types.ts +5 -1
  134. package/src/components/TableTree/Components/TableCell.tsx +3 -3
  135. package/src/components/TableTree/TableTree.scss +0 -7
  136. package/src/components/TableTree/TableTree.tsx +3 -22
  137. package/src/components/TableTree/types.ts +4 -4
  138. package/src/components/Tabs/Tabs.scss +19 -0
  139. package/src/components/Tabs/Tabs.tsx +9 -0
  140. package/src/components/Tabs/types.ts +1 -0
  141. package/src/index.ts +27 -0
  142. package/src/utils/formData/ConvertFormDataToObject.stories.tsx +27 -0
  143. package/src/utils/formData/ConvertFormDataToObject.ts +14 -0
  144. package/src/utils/getExtension/getExtension.stories.tsx +1 -0
  145. package/src/utils/keyBoardActionUtil/UseKeyboardAction.stories.tsx +53 -0
  146. package/src/utils/keyBoardActionUtil/UseKeyboardActions.tsx +20 -0
  147. package/src/utils/keyBoardActionUtil/types.ts +4 -0
  148. package/src/validations/regex.stories.tsx +63 -0
  149. package/src/validations/regex.ts +34 -0
  150. package/src/assets/images/photo.png +0 -0
@@ -10,54 +10,15 @@ export const FALSE_TEXT = 'FALSE';
10
10
  const DataViewer = <Cell extends Types.CellBase<Value>, Value>({
11
11
  cell,
12
12
  evaluatedCell,
13
- setContextMenu,//Todo
14
13
  }: Types.DataViewerProps<Cell>): React.ReactElement => {
15
-
16
14
  const value = getValue(cell, evaluatedCell);
17
15
 
18
- const options = [
19
- {
20
- label: 'Dynamic Cell One',
21
- value: 'Dynamic Cell One',
22
- iconName: 'plus_icon',
23
- action: () => {
24
- },
25
- disable: false,
26
- },
27
- {
28
- label: 'Dynamic Cell Two',
29
- value: 'Dynamic Cell Two',
30
- iconName: 'plus_icon',
31
- action: () => {
32
- },
33
- disable: false,
34
- },
35
- ];
36
-
37
- const contextClick = React.useCallback(
38
- (event: React.MouseEvent) => {
39
- event.preventDefault();
40
-
41
- setContextMenu({
42
- open: true,
43
- position: {
44
- x: event.pageX - 50,
45
- y: event.pageY - 260,
46
- },
47
- options: options,
48
- });
49
- },
50
- [ setContextMenu]
51
- );
52
-
53
16
  return typeof value === 'boolean' ? (
54
- <span
55
- className="ff-spreadsheet-data-viewer ff-spreadsheet-data-viewer--boolean">
17
+ <span className="ff-spreadsheet-data-viewer ff-spreadsheet-data-viewer--boolean">
56
18
  {convertBooleanToText(value)}
57
19
  </span>
58
20
  ) : (
59
21
  <span
60
- onContextMenu={contextClick}
61
22
  className={classNames('ff-spreadsheet-data-viewer', {
62
23
  'ff-spreadsheet-data-viewer--preserve-breaks': hasLineBreaker(value),
63
24
  })}
@@ -51,7 +51,7 @@
51
51
 
52
52
  .ff-spreadsheet-active-cell {
53
53
  position: absolute;
54
- border: 1px solid var(--outline-color);
54
+ border: 2px solid var(--outline-color);
55
55
  box-sizing: border-box;
56
56
  z-index: 100;
57
57
  }
@@ -188,7 +188,7 @@
188
188
 
189
189
  .ff-spreadsheet-floating-rect--selected {
190
190
  background: var(--outline-background-color);
191
- border: 1px var(--outline-color) solid;
191
+ border: 2px var(--outline-color) solid;
192
192
  }
193
193
 
194
194
  .ff-spreadsheet-floating-rect--dragging {
@@ -196,6 +196,6 @@
196
196
  }
197
197
 
198
198
  .ff-spreadsheet-floating-rect--copied {
199
- border: 1px var(--outline-color) dashed;
199
+ border: 2px var(--outline-color) dashed;
200
200
  }
201
201
  }
@@ -101,6 +101,15 @@ export type Props<CellType extends Types.CellBase> = {
101
101
  setContextMenu: React.Dispatch<React.SetStateAction<Types.ContextMenuState>>;
102
102
  /** Set your dynamic sheet Height*/
103
103
  sheetHeight: string;
104
+ contextOption?: {
105
+ open: boolean;
106
+ options: {
107
+ label: string;
108
+ value: string;
109
+ iconName: string;
110
+ action: () => void;
111
+ }[];
112
+ };
104
113
  };
105
114
 
106
115
  /**
@@ -123,9 +132,12 @@ const Spreadsheet = <CellType extends Types.CellBase>(
123
132
  onSelect = () => {},
124
133
  onActivate = () => {},
125
134
  onEvaluatedDataChange = () => {},
135
+ contextOption,
126
136
  } = props;
127
137
  type State = Types.StoreState<CellType>;
128
138
 
139
+ console.log(props.data);
140
+
129
141
  const initialState = React.useMemo(() => {
130
142
  const createParser = (props.createFormulaParser ||
131
143
  createFormulaParser) as Types.CreateFormulaParser;
@@ -440,7 +452,6 @@ const Spreadsheet = <CellType extends Types.CellBase>(
440
452
  key={columnNumber}
441
453
  row={rowNumber}
442
454
  column={columnNumber}
443
- setContextMenu={props.setContextMenu}
444
455
  // @ts-ignore
445
456
  DataViewer={DataViewer}
446
457
  />
@@ -468,6 +479,8 @@ const Spreadsheet = <CellType extends Types.CellBase>(
468
479
  const activeCellNode = React.useMemo(
469
480
  () => (
470
481
  <ActiveCell
482
+ contextOption={contextOption}
483
+ setContextMenu={props.setContextMenu}
471
484
  // @ts-ignore
472
485
  DataEditor={DataEditor}
473
486
  />
@@ -58,6 +58,9 @@ export default function reducer(
58
58
  state: Types.StoreState,
59
59
  action: Actions.Action
60
60
  ): Types.StoreState {
61
+ console.log(state.model);
62
+ console.log(action.type);
63
+
61
64
  switch (action.type) {
62
65
  case Actions.SET_AUTO_FILL: {
63
66
  const { autofill } = action.payload;
@@ -193,8 +193,6 @@ export function applyBorderToCells(
193
193
  let updatedData = currentData;
194
194
 
195
195
  const { start, end } = selectedRange;
196
- const startRow = start.row;
197
- const startCol = start.column;
198
196
 
199
197
  for (let row = start.row; row <= end.row; row++) {
200
198
  for (let col = start.column; col <= end.column; col++) {
@@ -204,47 +202,17 @@ export function applyBorderToCells(
204
202
  continue;
205
203
  }
206
204
 
207
- const adjacentCell = (
208
- row: number,
209
- col: number,
210
- borderType: string,
211
- borderColor: string
212
- ) => {
213
- const adjacentCell = Matrix.get({ row: row, column: col }, updatedData);
214
- if (adjacentCell) {
215
- let updatedCell = { ...adjacentCell };
216
- updatedCell.style = {
217
- ...adjacentCell.style,
218
- [borderType]: `1px solid ${borderColor}`,
219
- };
220
- console.log(updatedCell);
221
- updatedData = Matrix.set(
222
- { row: row, column: col },
223
- updatedCell,
224
- updatedData
225
- );
226
- }
227
- };
228
-
229
205
  let updatedCell = { ...currentCell };
230
206
 
231
207
  switch (value) {
232
208
  case 'border-all-sides':
233
209
  updatedCell.style = {
234
210
  ...currentCell.style,
235
- borderRight: `1px solid ${color}`,
236
- borderLeft: `1px solid ${color}`,
237
- borderTop: `1px solid ${color}`,
238
- borderBottom: `1px solid ${color}`,
211
+ borderRight: `2px solid ${color}`,
212
+ borderLeft: `2px solid ${color}`,
213
+ borderTop: `2px solid ${color}`,
214
+ borderBottom: `2px solid ${color}`,
239
215
  };
240
-
241
- if (row === startRow) {
242
- adjacentCell(row - 1, col, 'borderBottom', color);
243
- }
244
- if (col === startCol) {
245
- adjacentCell(row, col - 1, 'borderRight', color);
246
- }
247
-
248
216
  break;
249
217
  case 'border-none':
250
218
  updatedCell.style = {
@@ -254,64 +222,30 @@ export function applyBorderToCells(
254
222
  borderTop: `1px solid var(--excel-sheet-border)`,
255
223
  borderBottom: `1px solid var(--excel-sheet-border)`,
256
224
  };
257
-
258
- if (row === startRow) {
259
- adjacentCell(
260
- row - 1,
261
- col,
262
- 'borderBottom',
263
- 'var(--excel-sheet-border)'
264
- );
265
- }
266
- if (col === startCol) {
267
- adjacentCell(
268
- row,
269
- col - 1,
270
- 'borderRight',
271
- 'var(--excel-sheet-border)'
272
- );
273
- }
274
225
  break;
275
-
276
226
  case 'border-right':
277
227
  updatedCell.style = {
278
228
  ...currentCell.style,
279
- borderRight: `1px solid ${color}`,
229
+ borderRight: `2px solid ${color}`,
280
230
  };
281
231
  break;
282
232
 
283
233
  case 'border-left':
284
234
  updatedCell.style = {
285
235
  ...currentCell.style,
286
- borderLeft: `1px solid ${color}`,
236
+ borderLeft: `2px solid ${color}`,
287
237
  };
288
- if (col === startCol) {
289
- adjacentCell(
290
- row,
291
- col - 1,
292
- 'borderRight',
293
- 'var(--excel-sheet-border)'
294
- );
295
- }
296
238
  break;
297
239
  case 'border-top':
298
240
  updatedCell.style = {
299
241
  ...currentCell.style,
300
- borderTop: `1px solid ${color}`,
242
+ borderTop: `2px solid ${color}`,
301
243
  };
302
- if (row === startRow) {
303
- adjacentCell(
304
- row - 1,
305
- col,
306
- 'borderBottom',
307
- 'var(--excel-sheet-border)'
308
- );
309
- }
310
244
  break;
311
245
  case 'border-bottom':
312
246
  updatedCell.style = {
313
247
  ...currentCell.style,
314
- borderBottom: `1px solid ${color}`,
248
+ borderBottom: `2px solid ${color}`,
315
249
  };
316
250
  break;
317
251
  default:
@@ -116,10 +116,6 @@ export type CellComponentProps<Cell extends CellBase = CellBase> = {
116
116
  setCellDimensions: (point: Point, dimensions: Dimensions) => void;
117
117
  /** Set data of the cell */
118
118
  setCellData: (cell: Cell) => void;
119
-
120
- setContextMenu: React.Dispatch<React.SetStateAction<ContextMenuState>>;
121
- contextClick:(event: React.MouseEvent) => void
122
-
123
119
  };
124
120
 
125
121
  /** Type of the Spreadsheet Cell component */
@@ -136,7 +132,6 @@ export type DataViewerProps<Cell extends CellBase = CellBase> =
136
132
  DataComponentProps<Cell> & {
137
133
  /** Set data of the cell */
138
134
  setCellData: (cell: Cell) => void;
139
- setContextMenu: React.Dispatch<React.SetStateAction<ContextMenuState>>;
140
135
  evaluatedCell: Cell | undefined;
141
136
  };
142
137
 
@@ -27,143 +27,134 @@ type Story = StoryObj<typeof ExcelFile>;
27
27
 
28
28
  export const Default: Story = {
29
29
  args: {
30
- excelData: {
31
- sheets: [
32
- {
33
- sheetName: 'fireflink',
34
- data: [
35
- [
36
- {
37
- value: 'Test Sample Data 1',
38
- style: {
39
- name: 'Arial',
40
- size: 11,
41
- bold: true,
42
- italic: false,
43
- color: 'ffffff', // Sample data from backend without #
44
- backgroundColor: '434db8', // Sample data from backend without #
45
- borderColor: 'F2F2F2', // Sample data from backend without #
46
- border: {
47
- top: 'NONE',
48
- bottom: 'NONE',
49
- left: 'NONE',
50
- right: 'NONE',
51
- },
52
- alignment: {
53
- horizontal: 'GENERAL',
54
- vertical: 'BOTTOM',
55
- wrapText: false,
56
- },
30
+ excelData: [
31
+ {
32
+ sheetName: 'fireflink',
33
+ data: [
34
+ [
35
+ {
36
+ value: 'Test Sample Data 1',
37
+ styles: {
38
+ //TODO remove 's' for Style
39
+ name: 'Arial',
40
+ size: 11,
41
+ bold: true,
42
+ italic: false,
43
+ color: 'ffffff', // Sample data from backend without #
44
+ backgroundColor: '434db8', // Sample data from backend without #
45
+ borderColor: 'F2F2F2', // Sample data from backend without #
46
+ border: {
47
+ top: 'NONE',
48
+ bottom: 'NONE',
49
+ left: 'NONE',
50
+ right: 'NONE',
51
+ },
52
+ alignment: {
53
+ horizontal: 'GENERAL',
54
+ vertical: 'BOTTOM',
55
+ wrapText: false,
57
56
  },
58
57
  },
59
- {
60
- value: 'Test Data 2',
61
- style: {
62
- name: 'Arial',
63
- size: 12,
64
- bold: true,
65
- italic: true,
66
- color: 'EB5B00', // Sample data from backend without #
67
- backgroundColor: '88C273', // Sample data from backend without #
68
- borderColor: 'F2F2F2', // Sample data from backend without #
69
- border: {
70
- top: 'NONE',
71
- bottom: 'NONE',
72
- left: 'NONE',
73
- right: 'NONE',
74
- },
75
- alignment: {
76
- horizontal: 'GENERAL',
77
- vertical: 'BOTTOM',
78
- wrapText: false,
79
- },
58
+ },
59
+ {
60
+ value: 'Test Data 2',
61
+ styles: {
62
+ //TODO remove 's' for Style
63
+ name: 'Arial',
64
+ size: 12,
65
+ bold: true,
66
+ italic: true,
67
+ color: 'EB5B00', // Sample data from backend without #
68
+ backgroundColor: '88C273', // Sample data from backend without #
69
+ borderColor: 'F2F2F2', // Sample data from backend without #
70
+ border: {
71
+ top: 'NONE',
72
+ bottom: 'NONE',
73
+ left: 'NONE',
74
+ right: 'NONE',
75
+ },
76
+ alignment: {
77
+ horizontal: 'GENERAL',
78
+ vertical: 'BOTTOM',
79
+ wrapText: false,
80
80
  },
81
81
  },
82
- ],
83
- [
84
- {
85
- value: 'Test Data 3',
86
- style: {
87
- name: 'Arial',
88
- size: 11,
89
- bold: false,
90
- italic: false,
91
- color: '000000', // Sample data from backend without #
92
- backgroundColor: 'EB5B00', // Sample data from backend without #
93
- borderColor: 'F2F2F2', // Sample data from backend without #
94
- border: {
95
- top: 'NONE',
96
- bottom: 'NONE',
97
- left: 'NONE',
98
- right: 'NONE',
99
- },
100
- alignment: {
101
- horizontal: 'GENERAL',
102
- vertical: 'BOTTOM',
103
- wrapText: false,
104
- },
82
+ },
83
+ ],
84
+ [
85
+ {
86
+ value: 'Test Data 3',
87
+ styles: {
88
+ //TODO remove 's' for Style
89
+ name: 'Arial',
90
+ size: 11,
91
+ bold: false,
92
+ italic: false,
93
+ color: '000000', // Sample data from backend without #
94
+ backgroundColor: 'EB5B00', // Sample data from backend without #
95
+ borderColor: 'F2F2F2', // Sample data from backend without #
96
+ border: {
97
+ top: 'NONE',
98
+ bottom: 'NONE',
99
+ left: 'NONE',
100
+ right: 'NONE',
101
+ },
102
+ alignment: {
103
+ horizontal: 'GENERAL',
104
+ vertical: 'BOTTOM',
105
+ wrapText: false,
105
106
  },
106
107
  },
107
- {
108
- value: 'Test Sample Data 4',
109
- style: {
110
- name: 'Arial',
111
- size: 11,
112
- bold: false,
113
- italic: false,
114
- color: '3D0301', // Sample data from backend without #
115
- backgroundColor: 'C6E7FF', // Sample data from backend without #
116
- borderColor: 'F2F2F2', // Sample data from backend without #
117
- border: {
118
- top: 'THIN',
119
- bottom: 'THIN',
120
- left: 'THIN',
121
- right: 'THIN',
122
- },
123
- alignment: {
124
- horizontal: 'GENERAL',
125
- vertical: 'BOTTOM',
126
- wrapText: false,
127
- },
108
+ },
109
+ {
110
+ value: 'Test Sample Data 4',
111
+ styles: {
112
+ //TODO remove 's' for Style
113
+ name: 'Arial',
114
+ size: 11,
115
+ bold: false,
116
+ italic: false,
117
+ color: '3D0301', // Sample data from backend without #
118
+ backgroundColor: 'C6E7FF', // Sample data from backend without #
119
+ borderColor: 'F2F2F2', // Sample data from backend without #
120
+ border: {
121
+ top: 'THIN',
122
+ bottom: 'THIN',
123
+ left: 'THIN',
124
+ right: 'THIN',
125
+ },
126
+ alignment: {
127
+ horizontal: 'GENERAL',
128
+ vertical: 'BOTTOM',
129
+ wrapText: false,
128
130
  },
129
131
  },
130
- ],
132
+ },
131
133
  ],
134
+ ],
135
+ },
136
+ ],
137
+ toolbar: 'show',
138
+ contextOption: {
139
+ open: true,
140
+ options: [
141
+ {
142
+ label: 'Get data from Header',
143
+ value: 'Get data from Header',
144
+ iconName: 'success',
145
+ action: () => {},
146
+ },
147
+ {
148
+ label: 'Get Cell Value',
149
+ value: 'Get Cell Value',
150
+ iconName: 'success',
151
+ action: () => {},
132
152
  },
133
153
  ],
134
154
  },
135
- toolbar: 'show',
136
- contextOption: [
137
- {
138
- name: 'first option',
139
- title: 'Custom Option 1: Get Data',
140
- action: () => {},
141
- },
142
- {
143
- name: 'second option',
144
- title: 'Custom Option 2',
145
- action: () => {},
146
- },
147
- {
148
- name: 'third option',
149
- title: 'Custom Option 2',
150
- action: () => {},
151
- },
152
- {
153
- name: 'fourth option',
154
- title: 'Custom Option 2',
155
- action: () => {},
156
- },
157
- {
158
- name: 'fifth option',
159
- title: 'Custom Option 2',
160
- action: () => {},
161
- },
162
- ],
163
- heightType:"page",
164
- contextHeight:-220,
165
- contextWidth:-180,
166
- sheetHeight:"300px",
155
+ contextHeightPositioning: -220,
156
+ contextWidthPositioning: -180,
157
+ sheetHeight: '300px',
167
158
  onSave: () => {},
168
159
  },
169
160
  };
@@ -123,7 +123,7 @@ const ExcelToolBar: React.FC<ExcelToolBarProps> = ({
123
123
  value: 'double_border',
124
124
  label: 'Double Underline',
125
125
  icon: 'double_underline',
126
- }
126
+ },
127
127
  ];
128
128
 
129
129
  const fontFamily = [
@@ -259,7 +259,7 @@ const ExcelToolBar: React.FC<ExcelToolBarProps> = ({
259
259
  <Tooltip placement="top" title={'Text Left'}>
260
260
  <Icon
261
261
  variant={cellStyle.textAlign === 'left' ? 'dark' : 'light'}
262
- hoverEffect
262
+ hoverEffect={cellStyle.textAlign === 'left' ? false : true}
263
263
  disabled={toolbar === 'disable'}
264
264
  onClick={() => setTextAlign(data, 'left')}
265
265
  name="text_align_left"
@@ -268,7 +268,7 @@ const ExcelToolBar: React.FC<ExcelToolBarProps> = ({
268
268
  <Tooltip placement="top" title={'Text Center'}>
269
269
  <Icon
270
270
  variant={cellStyle.textAlign === 'center' ? 'dark' : 'light'}
271
- hoverEffect
271
+ hoverEffect={cellStyle.textAlign === 'center' ? false : true}
272
272
  disabled={toolbar === 'disable'}
273
273
  onClick={() => setTextAlign(data, 'center')}
274
274
  name="text_align_center"
@@ -278,7 +278,7 @@ const ExcelToolBar: React.FC<ExcelToolBarProps> = ({
278
278
  <Tooltip placement="top" title={'Text Right'}>
279
279
  <Icon
280
280
  variant={cellStyle.textAlign === 'right' ? 'dark' : 'light'}
281
- hoverEffect
281
+ hoverEffect={cellStyle.textAlign === 'right' ? false : true}
282
282
  disabled={toolbar === 'disable'}
283
283
  onClick={() => setTextAlign(data, 'right')}
284
284
  name="text_align_right"
@@ -290,7 +290,7 @@ const ExcelToolBar: React.FC<ExcelToolBarProps> = ({
290
290
  <Tooltip placement="top" title={'Bold'}>
291
291
  <Icon
292
292
  variant={styleBackend.bold ? 'dark' : 'light'}
293
- hoverEffect
293
+ hoverEffect={styleBackend.bold ? false : true}
294
294
  disabled={toolbar === 'disable'}
295
295
  onClick={() => onBold(data)}
296
296
  name="bold"
@@ -298,8 +298,8 @@ const ExcelToolBar: React.FC<ExcelToolBarProps> = ({
298
298
  </Tooltip>
299
299
  <Tooltip placement="top" title={'Italic'}>
300
300
  <Icon
301
- hoverEffect
302
301
  variant={styleBackend.italic ? 'dark' : 'light'}
302
+ hoverEffect={styleBackend.italic ? false : true}
303
303
  disabled={toolbar === 'disable'}
304
304
  onClick={() => onItalic(data)}
305
305
  name="italic"
@@ -311,7 +311,9 @@ const ExcelToolBar: React.FC<ExcelToolBarProps> = ({
311
311
  variant={
312
312
  cellStyle.textDecoration === underLine ? 'dark' : 'light'
313
313
  }
314
- hoverEffect
314
+ hoverEffect={
315
+ cellStyle.textDecoration === underLine ? false : true
316
+ }
315
317
  disabled={toolbar === 'disable'}
316
318
  onClick={() => setUnderlineType(data, underLine, true)}
317
319
  name={getUnderlineIcon()}
@@ -324,7 +326,6 @@ const ExcelToolBar: React.FC<ExcelToolBarProps> = ({
324
326
  iconSize={12}
325
327
  options={underlineTypeIcon}
326
328
  tooltipPlacement="top"
327
- variant="light"
328
329
  onOptionClick={(e) => {
329
330
  let selectedValue = e.value as string;
330
331
  setUnderlineType(data, selectedValue, true);
@@ -340,7 +341,7 @@ const ExcelToolBar: React.FC<ExcelToolBarProps> = ({
340
341
  <Tooltip placement="top" title={'Format Painter'}>
341
342
  <Icon
342
343
  variant={formattedStyle ? 'dark' : 'light'}
343
- hoverEffect
344
+ hoverEffect={formattedStyle ? false : true}
344
345
  disabled={toolbar === 'disable'}
345
346
  onClick={() => {
346
347
  setFormatePainter(data);
@@ -403,7 +404,6 @@ const ExcelToolBar: React.FC<ExcelToolBarProps> = ({
403
404
  zIndex={1000}
404
405
  options={borderTypeIcon}
405
406
  tooltipPlacement="top"
406
- variant="light"
407
407
  onOptionClick={(e) => {
408
408
  let selectedValue = e.value as string;
409
409
  setBorderType(data, selectedValue, 'black');
@@ -415,7 +415,6 @@ const ExcelToolBar: React.FC<ExcelToolBarProps> = ({
415
415
  </Tooltip>
416
416
  </div>
417
417
 
418
-
419
418
  {/* <div className="ff-excel-toolbar-divider"></div> TODO */}
420
419
  {/* <div className="ff-excel-toolbar-menu">
421
420
  <Tooltip placement="top" title={'Formula'}>