pixel-react 1.2.1 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (157) 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/MenuOption/types.d.ts +7 -7
  45. package/lib/components/ModulesChip/ModuleChip.d.ts +4 -0
  46. package/lib/components/ModulesChip/ModuleChip.stories.d.ts +6 -0
  47. package/lib/components/ModulesChip/index.d.ts +1 -0
  48. package/lib/components/ModulesChip/types.d.ts +14 -0
  49. package/lib/components/MultiSelect/MultiSelectTypes.d.ts +1 -0
  50. package/lib/components/Toastify/Toastify.d.ts +8 -0
  51. package/lib/components/Toastify/Toastify.stories.d.ts +6 -0
  52. package/lib/components/Toastify/index.d.ts +1 -0
  53. package/lib/components/Toastify/types.d.ts +7 -0
  54. package/lib/components/Tooltip/types.d.ts +6 -0
  55. package/lib/components/Typography/types.d.ts +1 -0
  56. package/lib/index.d.ts +75 -22
  57. package/lib/index.esm.js +26686 -870
  58. package/lib/index.esm.js.map +1 -1
  59. package/lib/index.js +26684 -864
  60. package/lib/index.js.map +1 -1
  61. package/lib/tsconfig.tsbuildinfo +1 -1
  62. package/package.json +1 -1
  63. package/src/StyleGuide/ColorPalette/colorPaletteList.ts +10 -0
  64. package/src/assets/Themes/BaseTheme.scss +2 -0
  65. package/src/assets/Themes/DarkTheme.scss +2 -0
  66. package/src/assets/icons/client_profile.svg +4 -0
  67. package/src/assets/icons/fireflink_finder_logo.svg +7 -0
  68. package/src/assets/icons/fireflink_platform.svg +4 -0
  69. package/src/assets/icons/license_expired.svg +20 -0
  70. package/src/components/AppHeader/AppHeader.stories.tsx +24 -3
  71. package/src/components/AppHeader/AppHeader.tsx +29 -11
  72. package/src/components/AppHeader/types.ts +11 -3
  73. package/src/components/Avatar/Avatar.scss +24 -0
  74. package/src/components/Avatar/Avatar.stories.tsx +56 -0
  75. package/src/components/Avatar/Avatar.tsx +25 -0
  76. package/src/components/Avatar/index.ts +1 -0
  77. package/src/components/Avatar/types.ts +27 -0
  78. package/src/components/ExcelFile/ColorBarselector/ColorBarSelector.scss +0 -2
  79. package/src/components/ExcelFile/ContextMenu/ContextMenu.scss +1 -4
  80. package/src/components/ExcelFile/ContextMenu/ContextMenu.tsx +0 -1
  81. package/src/components/ExcelFile/ExcelFile/Excel/ActiveCell.tsx +13 -13
  82. package/src/components/ExcelFile/ExcelFile/Excel/Cell.tsx +13 -12
  83. package/src/components/ExcelFile/ExcelFile/Excel/ColumnIndicator.tsx +40 -32
  84. package/src/components/ExcelFile/ExcelFile/Excel/Copied.tsx +4 -4
  85. package/src/components/ExcelFile/ExcelFile/Excel/CornerIndicator.tsx +10 -10
  86. package/src/components/ExcelFile/ExcelFile/Excel/DataEditor.tsx +5 -5
  87. package/src/components/ExcelFile/ExcelFile/Excel/DataViewer.tsx +10 -10
  88. package/src/components/ExcelFile/ExcelFile/Excel/FloatingRect.tsx +6 -6
  89. package/src/components/ExcelFile/ExcelFile/Excel/HeaderRow.tsx +1 -1
  90. package/src/components/ExcelFile/ExcelFile/Excel/Row.tsx +1 -1
  91. package/src/components/ExcelFile/ExcelFile/Excel/RowIndicator.tsx +34 -27
  92. package/src/components/ExcelFile/ExcelFile/Excel/Selected.tsx +5 -5
  93. package/src/components/ExcelFile/ExcelFile/Excel/{Spreadsheet.css → Spreadsheet.scss} +21 -37
  94. package/src/components/ExcelFile/ExcelFile/Excel/Spreadsheet.tsx +87 -78
  95. package/src/components/ExcelFile/ExcelFile/Excel/Table.tsx +2 -2
  96. package/src/components/ExcelFile/ExcelFile/Excel/actions.ts +121 -31
  97. package/src/components/ExcelFile/ExcelFile/Excel/areModelsEqual.ts +1 -1
  98. package/src/components/ExcelFile/ExcelFile/Excel/context.ts +4 -4
  99. package/src/components/ExcelFile/ExcelFile/Excel/engine/engine.ts +7 -7
  100. package/src/components/ExcelFile/ExcelFile/Excel/engine/formula.ts +11 -11
  101. package/src/components/ExcelFile/ExcelFile/Excel/engine/index.ts +2 -2
  102. package/src/components/ExcelFile/ExcelFile/Excel/engine/point-graph.ts +3 -3
  103. package/src/components/ExcelFile/ExcelFile/Excel/engine/point-hash.ts +2 -2
  104. package/src/components/ExcelFile/ExcelFile/Excel/engine/point-set.ts +2 -2
  105. package/src/components/ExcelFile/ExcelFile/Excel/index.ts +12 -11
  106. package/src/components/ExcelFile/ExcelFile/Excel/matrix.ts +18 -24
  107. package/src/components/ExcelFile/ExcelFile/Excel/point-range.ts +1 -1
  108. package/src/components/ExcelFile/ExcelFile/Excel/reducer.ts +311 -41
  109. package/src/components/ExcelFile/ExcelFile/Excel/selection.ts +5 -5
  110. package/src/components/ExcelFile/ExcelFile/Excel/types.ts +14 -66
  111. package/src/components/ExcelFile/ExcelFile/Excel/typings/fast-formula-parser.d.ts +8 -8
  112. package/src/components/ExcelFile/ExcelFile/Excel/use-dispatch.ts +2 -2
  113. package/src/components/ExcelFile/ExcelFile/Excel/use-selector.ts +3 -3
  114. package/src/components/ExcelFile/ExcelFile/Excel/util.ts +21 -22
  115. package/src/components/ExcelFile/ExcelFile/ExcelFile.scss +0 -3
  116. package/src/components/ExcelFile/ExcelFile/ExcelFile.tsx +45 -403
  117. package/src/components/ExcelFile/ExcelFile.stories.tsx +10 -29
  118. package/src/components/ExcelFile/ExcelSheetBar/ExcelSheetBar.tsx +1 -12
  119. package/src/components/ExcelFile/ExcelToolBar/ExcelToolBar.scss +0 -3
  120. package/src/components/ExcelFile/ExcelToolBar/ExcelToolBar.tsx +147 -127
  121. package/src/components/ExcelFile/Types.ts +3 -70
  122. package/src/components/ExcelFile/index.ts +1 -1
  123. package/src/components/Form/Form.d.ts +3 -0
  124. package/src/components/Form/Form.scss +31 -4
  125. package/src/components/Form/Form.stories.tsx +172 -138
  126. package/src/components/Form/Form.ts +2 -0
  127. package/src/components/Form/Forms.tsx +25 -0
  128. package/src/components/Form/index.ts +1 -1
  129. package/src/components/Icon/iconList.ts +8 -0
  130. package/src/components/IconButton/IconButton.scss +1 -1
  131. package/src/components/MenuOption/types.ts +7 -6
  132. package/src/components/ModulesChip/ModuleChip.scss +20 -0
  133. package/src/components/ModulesChip/ModuleChip.stories.tsx +41 -0
  134. package/src/components/ModulesChip/ModuleChip.tsx +31 -0
  135. package/src/components/ModulesChip/index.ts +1 -0
  136. package/src/components/ModulesChip/types.ts +14 -0
  137. package/src/components/MultiSelect/Dropdown.tsx +6 -1
  138. package/src/components/MultiSelect/MultiSelect.scss +17 -10
  139. package/src/components/MultiSelect/MultiSelect.stories.tsx +16 -4
  140. package/src/components/MultiSelect/MultiSelect.tsx +11 -4
  141. package/src/components/MultiSelect/MultiSelectTypes.ts +4 -3
  142. package/src/components/Select/Select.scss +4 -0
  143. package/src/components/Select/Select.tsx +2 -2
  144. package/src/components/Toastify/Toastify.stories.tsx +52 -0
  145. package/src/components/Toastify/Toastify.tsx +66 -0
  146. package/src/components/Toastify/index.ts +1 -0
  147. package/src/components/Toastify/types.ts +8 -0
  148. package/src/components/Tooltip/Tooltip.tsx +2 -1
  149. package/src/components/Tooltip/types.ts +6 -0
  150. package/src/components/Typography/Typography.scss +12 -4
  151. package/src/components/Typography/Typography.stories.tsx +2 -0
  152. package/src/components/Typography/Typography.tsx +2 -0
  153. package/src/components/Typography/types.ts +1 -0
  154. package/src/index.ts +10 -2
  155. package/src/components/ExcelFile/ChangeExcelStyles.tsx +0 -78
  156. package/src/components/ExcelFile/ImportExcelStyles.tsx +0 -86
  157. package/src/components/Form/Form.tsx +0 -57
@@ -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,29 @@
96
97
  }
97
98
  }
98
99
  }
100
+
101
+ .ff-main {
102
+ padding: 30px;
103
+ border-radius: 10px;
104
+ background-color: var(--tree-connecting-lines-color);
105
+
106
+ .ff-button-layout {
107
+ width: 99%;
108
+ display: flex;
109
+ gap: 12px;
110
+ margin-top: 24px;
111
+
112
+ button {
113
+ width: 50%;
114
+ background-color: var(--brand-color);
115
+ color: var(--primary-button-text-color);
116
+ border: none;
117
+ border-radius: 8px;
118
+ padding: 10px;
119
+ cursor: pointer;
120
+ }
121
+ }
122
+ .ff-select {
123
+ width: 90%;
124
+ }
125
+ }