pixel-react 1.1.8 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (173) hide show
  1. package/lib/components/AddButton/AddButton.d.ts +5 -0
  2. package/lib/components/AddButton/AddButton.stories.d.ts +6 -0
  3. package/lib/components/AddButton/index.d.ts +1 -0
  4. package/lib/components/AddButton/types.d.ts +4 -0
  5. package/lib/components/AppHeader/types.d.ts +7 -7
  6. package/lib/components/Drawer/Drawer.stories.d.ts +2 -0
  7. package/lib/components/Drawer/Types.d.ts +11 -0
  8. package/lib/components/ExcelFile/ChangeExcelStyles.d.ts +14 -0
  9. package/lib/components/ExcelFile/ColorBarSelector/ColorBarSelector.d.ts +8 -0
  10. package/lib/components/ExcelFile/ContextMenu/ContextMenu.d.ts +4 -0
  11. package/lib/components/ExcelFile/ExcelFile/Excel/ActiveCell.d.ts +7 -0
  12. package/lib/components/ExcelFile/ExcelFile/Excel/Cell.d.ts +4 -0
  13. package/lib/components/ExcelFile/ExcelFile/Excel/ColumnIndicator.d.ts +5 -0
  14. package/lib/components/ExcelFile/ExcelFile/Excel/Copied.d.ts +3 -0
  15. package/lib/components/ExcelFile/ExcelFile/Excel/CornerIndicator.d.ts +5 -0
  16. package/lib/components/ExcelFile/ExcelFile/Excel/DataEditor.d.ts +5 -0
  17. package/lib/components/ExcelFile/ExcelFile/Excel/DataViewer.d.ts +8 -0
  18. package/lib/components/ExcelFile/ExcelFile/Excel/FloatingRect.d.ts +10 -0
  19. package/lib/components/ExcelFile/ExcelFile/Excel/HeaderRow.d.ts +3 -0
  20. package/lib/components/ExcelFile/ExcelFile/Excel/Row.d.ts +3 -0
  21. package/lib/components/ExcelFile/ExcelFile/Excel/RowIndicator.d.ts +5 -0
  22. package/lib/components/ExcelFile/ExcelFile/Excel/Selected.d.ts +3 -0
  23. package/lib/components/ExcelFile/ExcelFile/Excel/Spreadsheet.d.ts +81 -0
  24. package/lib/components/ExcelFile/ExcelFile/Excel/Table.d.ts +3 -0
  25. package/lib/components/ExcelFile/ExcelFile/Excel/actions.d.ts +130 -0
  26. package/lib/components/ExcelFile/ExcelFile/Excel/areModelsEqual.d.ts +1 -0
  27. package/lib/components/ExcelFile/ExcelFile/Excel/context.d.ts +8 -0
  28. package/lib/components/ExcelFile/ExcelFile/Excel/engine/engine.d.ts +22 -0
  29. package/lib/components/ExcelFile/ExcelFile/Excel/engine/formula.d.ts +17 -0
  30. package/lib/components/ExcelFile/ExcelFile/Excel/engine/index.d.ts +2 -0
  31. package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-graph.d.ts +21 -0
  32. package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-hash.d.ts +3 -0
  33. package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-set.d.ts +24 -0
  34. package/lib/components/ExcelFile/ExcelFile/Excel/index.d.ts +13 -0
  35. package/lib/components/ExcelFile/ExcelFile/Excel/matrix.d.ts +67 -0
  36. package/lib/components/ExcelFile/ExcelFile/Excel/point-range.d.ts +22 -0
  37. package/lib/components/ExcelFile/ExcelFile/Excel/point.d.ts +11 -0
  38. package/lib/components/ExcelFile/ExcelFile/Excel/reducer.d.ts +27 -0
  39. package/lib/components/ExcelFile/ExcelFile/Excel/selection.d.ts +95 -0
  40. package/lib/components/ExcelFile/ExcelFile/Excel/types.d.ts +215 -0
  41. package/lib/components/ExcelFile/ExcelFile/Excel/use-dispatch.d.ts +3 -0
  42. package/lib/components/ExcelFile/ExcelFile/Excel/use-selector.d.ts +3 -0
  43. package/lib/components/ExcelFile/ExcelFile/Excel/util.d.ts +45 -0
  44. package/lib/components/ExcelFile/ExcelFile/ExcelFile.d.ts +3 -0
  45. package/lib/components/ExcelFile/ExcelFile.stories.d.ts +6 -0
  46. package/lib/components/ExcelFile/ExcelSheetBar/ExcelSheetBar.d.ts +15 -0
  47. package/lib/components/ExcelFile/ExcelToolBar/ExcelToolBar.d.ts +3 -0
  48. package/lib/components/ExcelFile/ImportExcelStyles.d.ts +24 -0
  49. package/lib/components/ExcelFile/Types.d.ts +176 -0
  50. package/lib/components/ExcelFile/index.d.ts +1 -0
  51. package/lib/components/Icon/Icon.stories.d.ts +1 -0
  52. package/lib/components/Icon/types.d.ts +1 -0
  53. package/lib/components/IconRadioGroup/IconRadioGroup.d.ts +5 -0
  54. package/lib/components/IconRadioGroup/IconRadioGroup.stories.d.ts +7 -0
  55. package/lib/components/IconRadioGroup/index.d.ts +1 -0
  56. package/lib/components/IconRadioGroup/type.d.ts +41 -0
  57. package/lib/components/Table/Table.d.ts +1 -1
  58. package/lib/components/Table/Table.stories.d.ts +2 -0
  59. package/lib/components/Table/Types.d.ts +16 -0
  60. package/lib/index.d.ts +81 -9
  61. package/lib/index.esm.js +739 -248
  62. package/lib/index.esm.js.map +1 -1
  63. package/lib/index.js +739 -247
  64. package/lib/index.js.map +1 -1
  65. package/lib/tsconfig.tsbuildinfo +1 -1
  66. package/lib/utils/find/findAndInsert.d.ts +7 -0
  67. package/lib/utils/find/findAndInsert.stories.d.ts +7 -0
  68. package/package.json +4 -2
  69. package/src/assets/Themes/BaseTheme.scss +4 -0
  70. package/src/assets/Themes/DarkTheme.scss +4 -0
  71. package/src/assets/icons/all_borders.svg +3 -0
  72. package/src/assets/icons/bold.svg +3 -0
  73. package/src/assets/icons/border_bottom.svg +3 -0
  74. package/src/assets/icons/border_left.svg +3 -0
  75. package/src/assets/icons/border_right.svg +3 -0
  76. package/src/assets/icons/border_top.svg +3 -0
  77. package/src/assets/icons/clone_icon.svg +3 -0
  78. package/src/assets/icons/double_underline.svg +5 -0
  79. package/src/assets/icons/eye_closed.svg +3 -0
  80. package/src/assets/icons/fill_color.svg +7 -0
  81. package/src/assets/icons/formate_painter.svg +5 -0
  82. package/src/assets/icons/full_access_icon.svg +4 -0
  83. package/src/assets/icons/history_icon.svg +19 -0
  84. package/src/assets/icons/italic.svg +3 -0
  85. package/src/assets/icons/jira.svg +3 -0
  86. package/src/assets/icons/linked_defects.svg +11 -0
  87. package/src/assets/icons/move_icon.svg +5 -0
  88. package/src/assets/icons/no_access_icon.svg +4 -0
  89. package/src/assets/icons/no_border.svg +3 -0
  90. package/src/assets/icons/strike_through.svg +3 -0
  91. package/src/assets/icons/text_align_center.svg +3 -0
  92. package/src/assets/icons/text_align_left.svg +3 -0
  93. package/src/assets/icons/text_align_right.svg +3 -0
  94. package/src/assets/icons/text_color.svg +3 -0
  95. package/src/assets/icons/underline.svg +4 -0
  96. package/src/assets/icons/view_access_icon.svg +4 -0
  97. package/src/components/AppHeader/AppHeader.scss +23 -10
  98. package/src/components/AppHeader/AppHeader.stories.tsx +29 -28
  99. package/src/components/AppHeader/AppHeader.tsx +18 -16
  100. package/src/components/AppHeader/types.ts +7 -7
  101. package/src/components/Button/Button.scss +1 -0
  102. package/src/components/Checkbox/Checkbox.tsx +1 -1
  103. package/src/components/Drawer/Drawer.scss +13 -9
  104. package/src/components/Drawer/Drawer.stories.tsx +28 -0
  105. package/src/components/Drawer/Drawer.tsx +29 -6
  106. package/src/components/Drawer/Types.ts +11 -0
  107. package/src/components/ExcelFile/ChangeExcelStyles.tsx +78 -0
  108. package/src/components/ExcelFile/ColorBarselector/ColorBarSelector.scss +13 -0
  109. package/src/components/ExcelFile/ColorBarselector/ColorBarSelector.tsx +43 -0
  110. package/src/components/ExcelFile/ContextMenu/ContextMenu.scss +102 -0
  111. package/src/components/ExcelFile/ContextMenu/ContextMenu.tsx +104 -0
  112. package/src/components/ExcelFile/ExcelFile/Excel/ActiveCell.tsx +131 -0
  113. package/src/components/ExcelFile/ExcelFile/Excel/Cell.tsx +201 -0
  114. package/src/components/ExcelFile/ExcelFile/Excel/ColumnIndicator.tsx +123 -0
  115. package/src/components/ExcelFile/ExcelFile/Excel/Copied.tsx +25 -0
  116. package/src/components/ExcelFile/ExcelFile/Excel/CornerIndicator.tsx +49 -0
  117. package/src/components/ExcelFile/ExcelFile/Excel/DataEditor.tsx +37 -0
  118. package/src/components/ExcelFile/ExcelFile/Excel/DataViewer.tsx +46 -0
  119. package/src/components/ExcelFile/ExcelFile/Excel/FloatingRect.tsx +31 -0
  120. package/src/components/ExcelFile/ExcelFile/Excel/HeaderRow.tsx +5 -0
  121. package/src/components/ExcelFile/ExcelFile/Excel/Row.tsx +5 -0
  122. package/src/components/ExcelFile/ExcelFile/Excel/RowIndicator.tsx +102 -0
  123. package/src/components/ExcelFile/ExcelFile/Excel/Selected.tsx +32 -0
  124. package/src/components/ExcelFile/ExcelFile/Excel/Spreadsheet.css +144 -0
  125. package/src/components/ExcelFile/ExcelFile/Excel/Spreadsheet.tsx +494 -0
  126. package/src/components/ExcelFile/ExcelFile/Excel/Table.tsx +19 -0
  127. package/src/components/ExcelFile/ExcelFile/Excel/actions.ts +302 -0
  128. package/src/components/ExcelFile/ExcelFile/Excel/areModelsEqual.ts +18 -0
  129. package/src/components/ExcelFile/ExcelFile/Excel/context.ts +12 -0
  130. package/src/components/ExcelFile/ExcelFile/Excel/engine/engine.ts +200 -0
  131. package/src/components/ExcelFile/ExcelFile/Excel/engine/formula.ts +137 -0
  132. package/src/components/ExcelFile/ExcelFile/Excel/engine/index.ts +2 -0
  133. package/src/components/ExcelFile/ExcelFile/Excel/engine/point-graph.ts +154 -0
  134. package/src/components/ExcelFile/ExcelFile/Excel/engine/point-hash.ts +10 -0
  135. package/src/components/ExcelFile/ExcelFile/Excel/engine/point-set.ts +69 -0
  136. package/src/components/ExcelFile/ExcelFile/Excel/index.ts +48 -0
  137. package/src/components/ExcelFile/ExcelFile/Excel/matrix.ts +388 -0
  138. package/src/components/ExcelFile/ExcelFile/Excel/point-range.ts +82 -0
  139. package/src/components/ExcelFile/ExcelFile/Excel/point.ts +15 -0
  140. package/src/components/ExcelFile/ExcelFile/Excel/reducer.ts +682 -0
  141. package/src/components/ExcelFile/ExcelFile/Excel/selection.ts +257 -0
  142. package/src/components/ExcelFile/ExcelFile/Excel/types.ts +269 -0
  143. package/src/components/ExcelFile/ExcelFile/Excel/typings/fast-formula-parser.d.ts +58 -0
  144. package/src/components/ExcelFile/ExcelFile/Excel/use-dispatch.ts +8 -0
  145. package/src/components/ExcelFile/ExcelFile/Excel/use-selector.ts +9 -0
  146. package/src/components/ExcelFile/ExcelFile/Excel/util.ts +173 -0
  147. package/src/components/ExcelFile/ExcelFile/ExcelFile.scss +27 -0
  148. package/src/components/ExcelFile/ExcelFile/ExcelFile.tsx +520 -0
  149. package/src/components/ExcelFile/ExcelFile.stories.tsx +132 -0
  150. package/src/components/ExcelFile/ExcelSheetBar/ExcelSheetBar.scss +16 -0
  151. package/src/components/ExcelFile/ExcelSheetBar/ExcelSheetBar.tsx +79 -0
  152. package/src/components/ExcelFile/ExcelToolBar/ExcelToolBar.scss +22 -0
  153. package/src/components/ExcelFile/ExcelToolBar/ExcelToolBar.tsx +271 -0
  154. package/src/components/ExcelFile/ImportExcelStyles.tsx +86 -0
  155. package/src/components/ExcelFile/Types.ts +241 -0
  156. package/src/components/ExcelFile/index.ts +1 -0
  157. package/src/components/Icon/Icon.stories.tsx +27 -0
  158. package/src/components/Icon/Icon.tsx +5 -1
  159. package/src/components/Icon/Icons.scss +15 -5
  160. package/src/components/Icon/iconList.ts +52 -1
  161. package/src/components/Icon/types.ts +1 -0
  162. package/src/components/IconRadioGroup/IconRadioGroup.scss +60 -0
  163. package/src/components/IconRadioGroup/IconRadioGroup.stories.tsx +108 -0
  164. package/src/components/IconRadioGroup/IconRadioGroup.tsx +72 -0
  165. package/src/components/IconRadioGroup/index.ts +1 -0
  166. package/src/components/IconRadioGroup/type.ts +50 -0
  167. package/src/components/Modal/Modal.tsx +8 -1
  168. package/src/components/Modal/modal.scss +10 -2
  169. package/src/components/Table/Table.scss +16 -4
  170. package/src/components/Table/Table.stories.tsx +36 -12
  171. package/src/components/Table/Table.tsx +33 -16
  172. package/src/components/Table/Types.ts +121 -105
  173. package/src/index.ts +2 -0
@@ -26,7 +26,7 @@ const sampleData = [
26
26
  type: 'Web',
27
27
  status: 'Open',
28
28
  checked: false,
29
- disabled:true
29
+ disabled: true,
30
30
  },
31
31
  },
32
32
  {
@@ -37,7 +37,7 @@ const sampleData = [
37
37
  type: 'Mobile',
38
38
  status: 'Close',
39
39
  checked: true,
40
- disabled:true
40
+ disabled: true,
41
41
  },
42
42
  },
43
43
  {
@@ -48,7 +48,7 @@ const sampleData = [
48
48
  type: 'Web',
49
49
  status: 'Close',
50
50
  checked: true,
51
- disabled:true
51
+ disabled: true,
52
52
  },
53
53
  },
54
54
  {
@@ -59,7 +59,7 @@ const sampleData = [
59
59
  type: 'Web & Mobile',
60
60
  status: 'Open',
61
61
  checked: false,
62
- disabled:false
62
+ disabled: false,
63
63
  },
64
64
  },
65
65
  {
@@ -70,7 +70,7 @@ const sampleData = [
70
70
  type: 'Web',
71
71
  status: 'Open',
72
72
  checked: false,
73
- disabled:true
73
+ disabled: true,
74
74
  },
75
75
  },
76
76
  {
@@ -81,7 +81,7 @@ const sampleData = [
81
81
  type: 'Mobile',
82
82
  status: 'Close',
83
83
  checked: true,
84
- disabled:true
84
+ disabled: true,
85
85
  },
86
86
  },
87
87
  {
@@ -92,7 +92,7 @@ const sampleData = [
92
92
  type: 'Web',
93
93
  status: 'Close',
94
94
  checked: true,
95
- disabled:true
95
+ disabled: true,
96
96
  },
97
97
  },
98
98
  {
@@ -103,7 +103,7 @@ const sampleData = [
103
103
  type: 'Web & Mobile',
104
104
  status: 'Open',
105
105
  checked: false,
106
- disabled:false
106
+ disabled: false,
107
107
  },
108
108
  },
109
109
  {
@@ -114,7 +114,7 @@ const sampleData = [
114
114
  type: 'Web',
115
115
  status: 'Open',
116
116
  checked: false,
117
- disabled:false
117
+ disabled: false,
118
118
  },
119
119
  },
120
120
  {
@@ -125,7 +125,7 @@ const sampleData = [
125
125
  type: 'Mobile',
126
126
  status: 'Close',
127
127
  checked: true,
128
- disabled:false
128
+ disabled: false,
129
129
  },
130
130
  },
131
131
  {
@@ -136,7 +136,7 @@ const sampleData = [
136
136
  type: 'Web',
137
137
  status: 'Close',
138
138
  checked: true,
139
- disabled:false
139
+ disabled: false,
140
140
  },
141
141
  },
142
142
  {
@@ -147,7 +147,7 @@ const sampleData = [
147
147
  type: 'Web & Mobile',
148
148
  status: 'Open',
149
149
  checked: false,
150
- disabled:false
150
+ disabled: false,
151
151
  },
152
152
  },
153
153
  ];
@@ -202,6 +202,27 @@ export const Default: Story = {
202
202
  columns: columnsData,
203
203
  },
204
204
  };
205
+
206
+ export const PrimaryHeaderTextColor: Story = {
207
+ args: {
208
+ ...defaultArgs,
209
+ data: sampleData.map((x) => x.project),
210
+
211
+ columns: columnsData,
212
+ headerTextColor: 'primary',
213
+ },
214
+ };
215
+
216
+ export const TableDataTextColor: Story = {
217
+ args: {
218
+ ...defaultArgs,
219
+ data: sampleData.map((x) => x.project),
220
+
221
+ columns: columnsData,
222
+ tableDataTextColor: 'var(--brand-color)',
223
+ },
224
+ };
225
+
205
226
  export const PageTable: Story = {
206
227
  args: {
207
228
  ...defaultArgs,
@@ -217,6 +238,7 @@ export const PageTable: Story = {
217
238
  });
218
239
  setTableData(sampleArray);
219
240
  }, []);
241
+ const handleIconClick = () => {};
220
242
 
221
243
  return (
222
244
  <>
@@ -226,6 +248,8 @@ export const PageTable: Story = {
226
248
  columns={columnsData}
227
249
  headerType="secondary"
228
250
  noDataContent="No data found"
251
+ headerIconName={'expand_icon'}
252
+ headerIconOnClick={handleIconClick}
229
253
  />
230
254
  </>
231
255
  );
@@ -1,5 +1,4 @@
1
1
  import './Table.scss';
2
- // import Checkbox from '../Checkbox';
3
2
  import { isFunction } from '../../assets/utils/functionUtils';
4
3
  import classNames from 'classnames';
5
4
  import {
@@ -11,6 +10,8 @@ import {
11
10
  import { prepareData } from '../../utils/TableCell/TableCell';
12
11
  import Checkbox from '../Checkbox';
13
12
  import { checkEmpty } from '../../utils/checkEmpty/checkEmpty';
13
+ import Typography from '../Typography';
14
+ import Icon from '../Icon';
14
15
 
15
16
  // import NoData from '../NoData/NoData';
16
17
 
@@ -25,13 +26,17 @@ const Table = ({
25
26
  withFixedHeader = true,
26
27
  borderWithRadius = false,
27
28
  headerCheckboxDisabled = false,
28
- // noDataContent,
29
+ noDataContent,
29
30
  // noDataImage,
30
31
  // noDataImageSize,
31
32
  height = '100%',
32
33
  className = '',
33
34
  tableHeadClass = '',
34
35
  tableBodyRowClass = '',
36
+ headerTextColor,
37
+ tableDataTextColor,
38
+ headerIconName = '',
39
+ headerIconOnClick = () => {},
35
40
  }: TableProps) => {
36
41
  const hanleOnclick = (column: ColumnsProps, row: DataProps) => {
37
42
  let { onClick, accessor } = column;
@@ -48,12 +53,22 @@ const Table = ({
48
53
 
49
54
  return (
50
55
  <div
51
- style={{ height: height }}
56
+ style={{ height: height, position: 'relative' }}
52
57
  className={classNames(className, {
53
58
  'ff-fixed-header-table': withFixedHeader,
54
59
  'border-borderRadius': borderWithRadius,
55
60
  })}
56
61
  >
62
+ {/* {iconContainer ? iconContainer : ''} */}
63
+ <div className="ff-table-icon">
64
+ <Icon
65
+ height={14}
66
+ width={14}
67
+ name={headerIconName}
68
+ onClick={headerIconOnClick}
69
+ ></Icon>
70
+ </div>
71
+
57
72
  <table className={classNames(`ff-table`)} cellSpacing={0}>
58
73
  <thead
59
74
  className={classNames(
@@ -67,7 +82,10 @@ const Table = ({
67
82
  {/* columns.map((column, index) */}
68
83
  {columns.map((column, index) => (
69
84
  <th
70
- className={headerType && `${headerType}-bg`}
85
+ className={classNames(
86
+ `${headerType && `${headerType}-bg`}`,
87
+ `${headerTextColor && `${headerTextColor}-color`}`
88
+ )}
71
89
  key={column.header}
72
90
  style={{ width: column?.width }}
73
91
  >
@@ -98,12 +116,9 @@ const Table = ({
98
116
  data.map((row: any, index: number) => (
99
117
  <tr
100
118
  key={row.id || index}
101
- className={classNames(
102
- tableBodyRowClass,
103
- {
104
- 'disabled-row': row.disabled,
105
- },
106
- )}
119
+ className={classNames(tableBodyRowClass, {
120
+ 'disabled-row': row.disabled,
121
+ })}
107
122
  >
108
123
  {columns.map((column, i) => {
109
124
  return (
@@ -114,7 +129,7 @@ const Table = ({
114
129
  'clickable-cell': column.onClick,
115
130
  })}
116
131
  >
117
- <div>
132
+ <Typography as="div" color={tableDataTextColor}>
118
133
  {i === 0 && withCheckbox && (
119
134
  <span className="ff-table-checkbox">
120
135
  <Checkbox
@@ -127,7 +142,7 @@ const Table = ({
127
142
  </span>
128
143
  )}
129
144
  {prepareData(row, column)}
130
- </div>
145
+ </Typography>
131
146
  </td>
132
147
  );
133
148
  })}
@@ -135,18 +150,20 @@ const Table = ({
135
150
  ))}
136
151
  </tbody>
137
152
  </table>
138
- {/* {data.length <= 0 && (
153
+ {data.length <= 0 && (
139
154
  <div
140
155
  className="no-data-content"
141
156
  style={{ height: `calc(${height} - 50px)` }}
142
157
  >
143
- <NoData
158
+ {/* commented for future requirement for adding image when the data will not be present*/}
159
+ {/* <NoData
144
160
  image={noDataImage ? noDataImage : 'no_data_found'}
145
161
  content={noDataContent}
146
162
  size={noDataImageSize}
147
- />
163
+ /> */}
164
+ {noDataContent}
148
165
  </div>
149
- )} */}
166
+ )}
150
167
  </div>
151
168
  );
152
169
  };
@@ -1,108 +1,124 @@
1
1
  import { ReactNode } from 'react';
2
2
 
3
3
  export interface ColumnsProps {
4
- /**
5
- * column name
6
- */
7
- header: string;
8
- /**
9
- * data key for particular column
10
- */
11
- accessor: string;
12
- /**
13
- * className for a column
14
- */
15
- className?: string;
16
- /**
17
- * width of a column
18
- */
19
- width?: number;
20
- /**
21
- * data for the column
22
- */
23
- cell?: (e: any) => JSX.Element | string | ReactNode;
24
-
25
- onClick?: (colum: string, row: DataProps) => void;
26
- }
27
- export interface DataProps {
28
- /**
29
- * data for each row
30
- */
31
- [key: string]: any;
32
- }
33
- export interface SelectedItemProps {
34
- /**
35
- * selected row object | All selected flag
36
- */
37
- [key: string]: string | number | boolean;
38
- }
39
- export interface TableProps {
40
- /**
41
- * Data for table
42
- */
43
- data: Array<number | string | DataProps>;
44
- /**
45
- * Column details for table
46
- */
47
- columns: Array<any>;
48
- /**
49
- * Header type to have different background color
50
- */
51
- headerType: 'default' | 'primary' | 'secondary';
52
- /**
53
- * withFixedHeader prop to have non-scrollable fixed table header
54
- */
55
- withFixedHeader?: boolean;
56
- /**
57
- * borderWithRadius prop to have table with border 1px and borderRadius 5px
58
- */
59
- borderWithRadius?: boolean;
60
- /**
61
- * Check box feature to select the row
62
- */
63
- withCheckbox?: boolean;
64
- /**
65
- * Event for checkbox onClick
66
- */
67
- onSelect?: (e: object, arg: SelectedItemProps) => void;
68
- /**
69
- * Check box feature to select the row
70
- */
71
- allSelected?: boolean;
72
- /**
73
- * send true to show partial checkbox in the header
74
- */
75
- partialSelected?: boolean;
76
- /**
77
- * send true to disable the checkbox in the header
78
- */
79
- headerCheckboxDisabled?: boolean;
80
- /**
81
- * The content that to be displayed if no data not found
82
- */
83
- noDataContent: string | ReactNode;
84
- /**
85
- * Image that to be displayed if you don't have data
86
- */
87
- noDataImage?: string;
88
- /**
89
- * Size of the image that to be displayed if you don't have data
90
- */
91
- noDataImageSize?: 'x-large' | 'large' | 'medium' | 'small' | 'x-small';
92
- /**
93
- * Height of the table in string
94
- */
95
- height?: string;
96
- /**
97
- * classNames for the table container
98
- */
99
- className?: string;
100
- /**
101
- * classNames for the table Header container
102
- */
103
- tableHeadClass?:string;
104
- /**
105
- * classNames for the table Row container
106
- */
107
- tableBodyRowClass?:string;
108
- }
4
+ /**
5
+ * column name
6
+ */
7
+ header: string;
8
+ /**
9
+ * data key for particular column
10
+ */
11
+ accessor: string;
12
+ /**
13
+ * className for a column
14
+ */
15
+ className?: string;
16
+ /**
17
+ * width of a column
18
+ */
19
+ width?: number;
20
+ /**
21
+ * data for the column
22
+ */
23
+ cell?: (e: any) => JSX.Element | string | ReactNode;
24
+
25
+ onClick?: (colum: string, row: DataProps) => void;
26
+ }
27
+ export interface DataProps {
28
+ /**
29
+ * data for each row
30
+ */
31
+ [key: string]: any;
32
+ }
33
+ export interface SelectedItemProps {
34
+ /**
35
+ * selected row object | All selected flag
36
+ */
37
+ [key: string]: string | number | boolean;
38
+ }
39
+ export interface TableProps {
40
+ /**
41
+ * Data for table
42
+ */
43
+ data: Array<number | string | DataProps>;
44
+ /**
45
+ * Column details for table
46
+ */
47
+ columns: Array<any>;
48
+ /**
49
+ * Header type to have different background color
50
+ */
51
+ headerType: 'default' | 'primary' | 'secondary';
52
+ /**
53
+ * withFixedHeader prop to have non-scrollable fixed table header
54
+ */
55
+ withFixedHeader?: boolean;
56
+ /**
57
+ * borderWithRadius prop to have table with border 1px and borderRadius 5px
58
+ */
59
+ borderWithRadius?: boolean;
60
+ /**
61
+ * Check box feature to select the row
62
+ */
63
+ withCheckbox?: boolean;
64
+ /**
65
+ * Event for checkbox onClick
66
+ */
67
+ onSelect?: (e: object, arg: SelectedItemProps) => void;
68
+ /**
69
+ * Check box feature to select the row
70
+ */
71
+ allSelected?: boolean;
72
+ /**
73
+ * send true to show partial checkbox in the header
74
+ */
75
+ partialSelected?: boolean;
76
+ /**
77
+ * send true to disable the checkbox in the header
78
+ */
79
+ headerCheckboxDisabled?: boolean;
80
+ /**
81
+ * The content that to be displayed if no data not found
82
+ */
83
+ noDataContent: string | ReactNode;
84
+ /**
85
+ * Image that to be displayed if you don't have data
86
+ */
87
+ noDataImage?: string;
88
+ /**
89
+ * Size of the image that to be displayed if you don't have data
90
+ */
91
+ noDataImageSize?: 'x-large' | 'large' | 'medium' | 'small' | 'x-small';
92
+ /**
93
+ * Height of the table in string
94
+ */
95
+ height?: string;
96
+ /**
97
+ * classNames for the table container
98
+ */
99
+ className?: string;
100
+ /**
101
+ * classNames for the table Header container
102
+ */
103
+ tableHeadClass?: string;
104
+ /**
105
+ * classNames for the table Row container
106
+ */
107
+ tableBodyRowClass?: string;
108
+ /**
109
+ * custom color for the column text
110
+ */
111
+ headerTextColor?: 'default' | 'primary';
112
+ /**
113
+ * custom color for the row text
114
+ */
115
+ tableDataTextColor?: string;
116
+ /**
117
+ * icon for the table header, for expand or other purposes
118
+ */
119
+ headerIconName?: string;
120
+ /**
121
+ * handle function for the table header icon
122
+ */
123
+ headerIconOnClick?: () => void;
124
+ }
package/src/index.ts CHANGED
@@ -46,6 +46,7 @@ import Paper from './components/Paper';
46
46
  import DashboardDonutChart from './components/Charts/DashboardDonutChart';
47
47
  import Recaptcha from './components/FF_Captcha/Recaptcha';
48
48
  import NLPInput from './components/NLPInput';
49
+ import IconRadioGroup from './components/IconRadioGroup';
49
50
  import MachineInputField from './components/MachineInputField';
50
51
  import SequentialConnectingBranch from './components/SequentialConnectingBranch';
51
52
  import AttachmentButton from './components/AttachmentButton';
@@ -119,6 +120,7 @@ export {
119
120
  MachineInputField,
120
121
  SequentialConnectingBranch,
121
122
  AttachmentButton,
123
+ IconRadioGroup,
122
124
 
123
125
  // utils exports
124
126
  checkEmpty,