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.
- package/lib/components/AddButton/AddButton.d.ts +5 -0
- package/lib/components/AddButton/AddButton.stories.d.ts +6 -0
- package/lib/components/AddButton/index.d.ts +1 -0
- package/lib/components/AddButton/types.d.ts +4 -0
- package/lib/components/AppHeader/types.d.ts +7 -7
- package/lib/components/Drawer/Drawer.stories.d.ts +2 -0
- package/lib/components/Drawer/Types.d.ts +11 -0
- package/lib/components/ExcelFile/ChangeExcelStyles.d.ts +14 -0
- package/lib/components/ExcelFile/ColorBarSelector/ColorBarSelector.d.ts +8 -0
- package/lib/components/ExcelFile/ContextMenu/ContextMenu.d.ts +4 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/ActiveCell.d.ts +7 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/Cell.d.ts +4 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/ColumnIndicator.d.ts +5 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/Copied.d.ts +3 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/CornerIndicator.d.ts +5 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/DataEditor.d.ts +5 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/DataViewer.d.ts +8 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/FloatingRect.d.ts +10 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/HeaderRow.d.ts +3 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/Row.d.ts +3 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/RowIndicator.d.ts +5 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/Selected.d.ts +3 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/Spreadsheet.d.ts +81 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/Table.d.ts +3 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/actions.d.ts +130 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/areModelsEqual.d.ts +1 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/context.d.ts +8 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/engine.d.ts +22 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/formula.d.ts +17 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/index.d.ts +2 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-graph.d.ts +21 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-hash.d.ts +3 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-set.d.ts +24 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/index.d.ts +13 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/matrix.d.ts +67 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/point-range.d.ts +22 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/point.d.ts +11 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/reducer.d.ts +27 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/selection.d.ts +95 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/types.d.ts +215 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/use-dispatch.d.ts +3 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/use-selector.d.ts +3 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/util.d.ts +45 -0
- package/lib/components/ExcelFile/ExcelFile/ExcelFile.d.ts +3 -0
- package/lib/components/ExcelFile/ExcelFile.stories.d.ts +6 -0
- package/lib/components/ExcelFile/ExcelSheetBar/ExcelSheetBar.d.ts +15 -0
- package/lib/components/ExcelFile/ExcelToolBar/ExcelToolBar.d.ts +3 -0
- package/lib/components/ExcelFile/ImportExcelStyles.d.ts +24 -0
- package/lib/components/ExcelFile/Types.d.ts +176 -0
- package/lib/components/ExcelFile/index.d.ts +1 -0
- package/lib/components/Icon/Icon.stories.d.ts +1 -0
- package/lib/components/Icon/types.d.ts +1 -0
- package/lib/components/IconRadioGroup/IconRadioGroup.d.ts +5 -0
- package/lib/components/IconRadioGroup/IconRadioGroup.stories.d.ts +7 -0
- package/lib/components/IconRadioGroup/index.d.ts +1 -0
- package/lib/components/IconRadioGroup/type.d.ts +41 -0
- package/lib/components/Table/Table.d.ts +1 -1
- package/lib/components/Table/Table.stories.d.ts +2 -0
- package/lib/components/Table/Types.d.ts +16 -0
- package/lib/index.d.ts +81 -9
- package/lib/index.esm.js +739 -248
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +739 -247
- package/lib/index.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/utils/find/findAndInsert.d.ts +7 -0
- package/lib/utils/find/findAndInsert.stories.d.ts +7 -0
- package/package.json +4 -2
- package/src/assets/Themes/BaseTheme.scss +4 -0
- package/src/assets/Themes/DarkTheme.scss +4 -0
- package/src/assets/icons/all_borders.svg +3 -0
- package/src/assets/icons/bold.svg +3 -0
- package/src/assets/icons/border_bottom.svg +3 -0
- package/src/assets/icons/border_left.svg +3 -0
- package/src/assets/icons/border_right.svg +3 -0
- package/src/assets/icons/border_top.svg +3 -0
- package/src/assets/icons/clone_icon.svg +3 -0
- package/src/assets/icons/double_underline.svg +5 -0
- package/src/assets/icons/eye_closed.svg +3 -0
- package/src/assets/icons/fill_color.svg +7 -0
- package/src/assets/icons/formate_painter.svg +5 -0
- package/src/assets/icons/full_access_icon.svg +4 -0
- package/src/assets/icons/history_icon.svg +19 -0
- package/src/assets/icons/italic.svg +3 -0
- package/src/assets/icons/jira.svg +3 -0
- package/src/assets/icons/linked_defects.svg +11 -0
- package/src/assets/icons/move_icon.svg +5 -0
- package/src/assets/icons/no_access_icon.svg +4 -0
- package/src/assets/icons/no_border.svg +3 -0
- package/src/assets/icons/strike_through.svg +3 -0
- package/src/assets/icons/text_align_center.svg +3 -0
- package/src/assets/icons/text_align_left.svg +3 -0
- package/src/assets/icons/text_align_right.svg +3 -0
- package/src/assets/icons/text_color.svg +3 -0
- package/src/assets/icons/underline.svg +4 -0
- package/src/assets/icons/view_access_icon.svg +4 -0
- package/src/components/AppHeader/AppHeader.scss +23 -10
- package/src/components/AppHeader/AppHeader.stories.tsx +29 -28
- package/src/components/AppHeader/AppHeader.tsx +18 -16
- package/src/components/AppHeader/types.ts +7 -7
- package/src/components/Button/Button.scss +1 -0
- package/src/components/Checkbox/Checkbox.tsx +1 -1
- package/src/components/Drawer/Drawer.scss +13 -9
- package/src/components/Drawer/Drawer.stories.tsx +28 -0
- package/src/components/Drawer/Drawer.tsx +29 -6
- package/src/components/Drawer/Types.ts +11 -0
- package/src/components/ExcelFile/ChangeExcelStyles.tsx +78 -0
- package/src/components/ExcelFile/ColorBarselector/ColorBarSelector.scss +13 -0
- package/src/components/ExcelFile/ColorBarselector/ColorBarSelector.tsx +43 -0
- package/src/components/ExcelFile/ContextMenu/ContextMenu.scss +102 -0
- package/src/components/ExcelFile/ContextMenu/ContextMenu.tsx +104 -0
- package/src/components/ExcelFile/ExcelFile/Excel/ActiveCell.tsx +131 -0
- package/src/components/ExcelFile/ExcelFile/Excel/Cell.tsx +201 -0
- package/src/components/ExcelFile/ExcelFile/Excel/ColumnIndicator.tsx +123 -0
- package/src/components/ExcelFile/ExcelFile/Excel/Copied.tsx +25 -0
- package/src/components/ExcelFile/ExcelFile/Excel/CornerIndicator.tsx +49 -0
- package/src/components/ExcelFile/ExcelFile/Excel/DataEditor.tsx +37 -0
- package/src/components/ExcelFile/ExcelFile/Excel/DataViewer.tsx +46 -0
- package/src/components/ExcelFile/ExcelFile/Excel/FloatingRect.tsx +31 -0
- package/src/components/ExcelFile/ExcelFile/Excel/HeaderRow.tsx +5 -0
- package/src/components/ExcelFile/ExcelFile/Excel/Row.tsx +5 -0
- package/src/components/ExcelFile/ExcelFile/Excel/RowIndicator.tsx +102 -0
- package/src/components/ExcelFile/ExcelFile/Excel/Selected.tsx +32 -0
- package/src/components/ExcelFile/ExcelFile/Excel/Spreadsheet.css +144 -0
- package/src/components/ExcelFile/ExcelFile/Excel/Spreadsheet.tsx +494 -0
- package/src/components/ExcelFile/ExcelFile/Excel/Table.tsx +19 -0
- package/src/components/ExcelFile/ExcelFile/Excel/actions.ts +302 -0
- package/src/components/ExcelFile/ExcelFile/Excel/areModelsEqual.ts +18 -0
- package/src/components/ExcelFile/ExcelFile/Excel/context.ts +12 -0
- package/src/components/ExcelFile/ExcelFile/Excel/engine/engine.ts +200 -0
- package/src/components/ExcelFile/ExcelFile/Excel/engine/formula.ts +137 -0
- package/src/components/ExcelFile/ExcelFile/Excel/engine/index.ts +2 -0
- package/src/components/ExcelFile/ExcelFile/Excel/engine/point-graph.ts +154 -0
- package/src/components/ExcelFile/ExcelFile/Excel/engine/point-hash.ts +10 -0
- package/src/components/ExcelFile/ExcelFile/Excel/engine/point-set.ts +69 -0
- package/src/components/ExcelFile/ExcelFile/Excel/index.ts +48 -0
- package/src/components/ExcelFile/ExcelFile/Excel/matrix.ts +388 -0
- package/src/components/ExcelFile/ExcelFile/Excel/point-range.ts +82 -0
- package/src/components/ExcelFile/ExcelFile/Excel/point.ts +15 -0
- package/src/components/ExcelFile/ExcelFile/Excel/reducer.ts +682 -0
- package/src/components/ExcelFile/ExcelFile/Excel/selection.ts +257 -0
- package/src/components/ExcelFile/ExcelFile/Excel/types.ts +269 -0
- package/src/components/ExcelFile/ExcelFile/Excel/typings/fast-formula-parser.d.ts +58 -0
- package/src/components/ExcelFile/ExcelFile/Excel/use-dispatch.ts +8 -0
- package/src/components/ExcelFile/ExcelFile/Excel/use-selector.ts +9 -0
- package/src/components/ExcelFile/ExcelFile/Excel/util.ts +173 -0
- package/src/components/ExcelFile/ExcelFile/ExcelFile.scss +27 -0
- package/src/components/ExcelFile/ExcelFile/ExcelFile.tsx +520 -0
- package/src/components/ExcelFile/ExcelFile.stories.tsx +132 -0
- package/src/components/ExcelFile/ExcelSheetBar/ExcelSheetBar.scss +16 -0
- package/src/components/ExcelFile/ExcelSheetBar/ExcelSheetBar.tsx +79 -0
- package/src/components/ExcelFile/ExcelToolBar/ExcelToolBar.scss +22 -0
- package/src/components/ExcelFile/ExcelToolBar/ExcelToolBar.tsx +271 -0
- package/src/components/ExcelFile/ImportExcelStyles.tsx +86 -0
- package/src/components/ExcelFile/Types.ts +241 -0
- package/src/components/ExcelFile/index.ts +1 -0
- package/src/components/Icon/Icon.stories.tsx +27 -0
- package/src/components/Icon/Icon.tsx +5 -1
- package/src/components/Icon/Icons.scss +15 -5
- package/src/components/Icon/iconList.ts +52 -1
- package/src/components/Icon/types.ts +1 -0
- package/src/components/IconRadioGroup/IconRadioGroup.scss +60 -0
- package/src/components/IconRadioGroup/IconRadioGroup.stories.tsx +108 -0
- package/src/components/IconRadioGroup/IconRadioGroup.tsx +72 -0
- package/src/components/IconRadioGroup/index.ts +1 -0
- package/src/components/IconRadioGroup/type.ts +50 -0
- package/src/components/Modal/Modal.tsx +8 -1
- package/src/components/Modal/modal.scss +10 -2
- package/src/components/Table/Table.scss +16 -4
- package/src/components/Table/Table.stories.tsx +36 -12
- package/src/components/Table/Table.tsx +33 -16
- package/src/components/Table/Types.ts +121 -105
- 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
|
-
|
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={
|
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
|
-
|
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
|
-
</
|
145
|
+
</Typography>
|
131
146
|
</td>
|
132
147
|
);
|
133
148
|
})}
|
@@ -135,18 +150,20 @@ const Table = ({
|
|
135
150
|
))}
|
136
151
|
</tbody>
|
137
152
|
</table>
|
138
|
-
{
|
153
|
+
{data.length <= 0 && (
|
139
154
|
<div
|
140
155
|
className="no-data-content"
|
141
156
|
style={{ height: `calc(${height} - 50px)` }}
|
142
157
|
>
|
143
|
-
|
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
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
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,
|