@xyo-network/react-payload-table 2.68.3 → 2.69.1
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.
- package/dist/browser/components/DynamicTable/DynamicTableRow.d.cts.map +1 -1
- package/dist/browser/components/DynamicTable/DynamicTableRow.d.mts.map +1 -1
- package/dist/browser/components/DynamicTable/DynamicTableRow.d.ts.map +1 -1
- package/dist/browser/components/DynamicTable/Table.d.cts.map +1 -1
- package/dist/browser/components/DynamicTable/Table.d.mts.map +1 -1
- package/dist/browser/components/DynamicTable/Table.d.ts.map +1 -1
- package/dist/browser/components/Table/TableBody.d.cts.map +1 -1
- package/dist/browser/components/Table/TableBody.d.mts.map +1 -1
- package/dist/browser/components/Table/TableBody.d.ts.map +1 -1
- package/dist/browser/components/Table/TablePagination.d.cts.map +1 -1
- package/dist/browser/components/Table/TablePagination.d.mts.map +1 -1
- package/dist/browser/components/Table/TablePagination.d.ts.map +1 -1
- package/dist/browser/components/Table/TableRow.d.cts.map +1 -1
- package/dist/browser/components/Table/TableRow.d.mts.map +1 -1
- package/dist/browser/components/Table/TableRow.d.ts.map +1 -1
- package/dist/browser/index.cjs +5 -11
- package/dist/browser/index.cjs.map +1 -1
- package/dist/browser/index.js +5 -11
- package/dist/browser/index.js.map +1 -1
- package/dist/node/components/DynamicTable/DynamicTableRow.d.cts.map +1 -1
- package/dist/node/components/DynamicTable/DynamicTableRow.d.mts.map +1 -1
- package/dist/node/components/DynamicTable/DynamicTableRow.d.ts.map +1 -1
- package/dist/node/components/DynamicTable/Table.d.cts.map +1 -1
- package/dist/node/components/DynamicTable/Table.d.mts.map +1 -1
- package/dist/node/components/DynamicTable/Table.d.ts.map +1 -1
- package/dist/node/components/Table/TableBody.d.cts.map +1 -1
- package/dist/node/components/Table/TableBody.d.mts.map +1 -1
- package/dist/node/components/Table/TableBody.d.ts.map +1 -1
- package/dist/node/components/Table/TablePagination.d.cts.map +1 -1
- package/dist/node/components/Table/TablePagination.d.mts.map +1 -1
- package/dist/node/components/Table/TablePagination.d.ts.map +1 -1
- package/dist/node/components/Table/TableRow.d.cts.map +1 -1
- package/dist/node/components/Table/TableRow.d.mts.map +1 -1
- package/dist/node/components/Table/TableRow.d.ts.map +1 -1
- package/dist/node/index.cjs +5 -11
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.js +5 -11
- package/dist/node/index.js.map +1 -1
- package/package.json +19 -19
- package/src/components/DynamicTable/DynamicTableRow.tsx +18 -20
- package/src/components/DynamicTable/Table.tsx +76 -68
- package/src/components/Table/TableBody.tsx +10 -7
- package/src/components/Table/TableHead.tsx +11 -11
- package/src/components/Table/TablePagination.tsx +15 -5
- package/src/components/Table/TableRow.tsx +11 -13
- package/src/components/Table/TableRowNoData.tsx +5 -5
package/package.json
CHANGED
|
@@ -10,26 +10,26 @@
|
|
|
10
10
|
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/issues"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@xylabs/react-promise": "^3.
|
|
14
|
-
"@xylabs/react-shared": "^3.
|
|
15
|
-
"@xyo-network/hash": "^2.
|
|
16
|
-
"@xyo-network/payload-model": "^2.
|
|
17
|
-
"@xyo-network/payload-validator": "^2.
|
|
18
|
-
"@xyo-network/react-error": "~2.
|
|
19
|
-
"@xyo-network/react-event": "~2.
|
|
20
|
-
"@xyo-network/react-network": "~2.
|
|
21
|
-
"@xyo-network/react-payload-plugin": "~2.
|
|
22
|
-
"@xyo-network/react-payload-plugin-resolver": "~2.
|
|
23
|
-
"@xyo-network/react-shared": "~2.
|
|
24
|
-
"@xyo-network/react-table": "~2.
|
|
13
|
+
"@xylabs/react-promise": "^3.1.2",
|
|
14
|
+
"@xylabs/react-shared": "^3.1.2",
|
|
15
|
+
"@xyo-network/hash": "^2.91.3",
|
|
16
|
+
"@xyo-network/payload-model": "^2.91.3",
|
|
17
|
+
"@xyo-network/payload-validator": "^2.91.3",
|
|
18
|
+
"@xyo-network/react-error": "~2.69.1",
|
|
19
|
+
"@xyo-network/react-event": "~2.69.1",
|
|
20
|
+
"@xyo-network/react-network": "~2.69.1",
|
|
21
|
+
"@xyo-network/react-payload-plugin": "~2.69.1",
|
|
22
|
+
"@xyo-network/react-payload-plugin-resolver": "~2.69.1",
|
|
23
|
+
"@xyo-network/react-shared": "~2.69.1",
|
|
24
|
+
"@xyo-network/react-table": "~2.69.1"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@storybook/react": "^7.6.
|
|
28
|
-
"@xylabs/delay": "^
|
|
29
|
-
"@xylabs/ts-scripts-yarn3": "^3.
|
|
30
|
-
"@xylabs/tsconfig-react": "^3.
|
|
31
|
-
"@xyo-network/react-crypto-market-uniswap-plugin": "~2.
|
|
32
|
-
"@xyo-network/react-storybook": "~2.
|
|
27
|
+
"@storybook/react": "^7.6.17",
|
|
28
|
+
"@xylabs/delay": "^3.0.5",
|
|
29
|
+
"@xylabs/ts-scripts-yarn3": "^3.4.1",
|
|
30
|
+
"@xylabs/tsconfig-react": "^3.4.1",
|
|
31
|
+
"@xyo-network/react-crypto-market-uniswap-plugin": "~2.69.1",
|
|
32
|
+
"@xyo-network/react-storybook": "~2.69.1",
|
|
33
33
|
"react-router-dom": "^6.22.1",
|
|
34
34
|
"typescript": "^5.3.3"
|
|
35
35
|
},
|
|
@@ -91,6 +91,6 @@
|
|
|
91
91
|
"license": "yarn license-checker --exclude \"MIT, ISC, Apache-2.0, BSD, BSD-2-Clause, CC-BY-4.0, Unlicense, CC-BY-3.0, CC0-1.0\""
|
|
92
92
|
},
|
|
93
93
|
"sideEffects": false,
|
|
94
|
-
"version": "2.
|
|
94
|
+
"version": "2.69.1",
|
|
95
95
|
"type": "module"
|
|
96
96
|
}
|
|
@@ -74,36 +74,34 @@ export const PayloadDynamicTableRow: React.FC<PayloadDynamicTableRowProps> = ({
|
|
|
74
74
|
)
|
|
75
75
|
|
|
76
76
|
const render: React.FC<TableCellProps> = (props) => {
|
|
77
|
-
const Render: ComponentType<PayloadRenderProps & TableCellProps> | undefined =
|
|
78
|
-
? resolver?.resolve(payload)?.components.table.cell
|
|
79
|
-
: undefined
|
|
77
|
+
const Render: ComponentType<PayloadRenderProps & TableCellProps> | undefined =
|
|
78
|
+
payload ? resolver?.resolve(payload)?.components.table.cell : undefined
|
|
80
79
|
return Render ? <Render payload={payload} {...props} /> : <TableCell key="payloads" align="left" {...props}></TableCell>
|
|
81
80
|
}
|
|
82
81
|
|
|
83
82
|
const icon: React.FC<TableCellProps> = (props) => {
|
|
84
|
-
const Avatar: ComponentType<PayloadRenderProps & AvatarProps> | undefined =
|
|
85
|
-
? resolver?.resolve(payload)?.components.avatar.image
|
|
86
|
-
: undefined
|
|
83
|
+
const Avatar: ComponentType<PayloadRenderProps & AvatarProps> | undefined =
|
|
84
|
+
payload ? resolver?.resolve(payload)?.components.avatar.image : undefined
|
|
87
85
|
|
|
88
86
|
return (
|
|
89
87
|
<TableCell key="payloads" align="left" {...props}>
|
|
90
|
-
{Avatar ?
|
|
88
|
+
{Avatar ?
|
|
89
|
+
<Avatar payload={payload} />
|
|
90
|
+
: null}
|
|
91
91
|
</TableCell>
|
|
92
92
|
)
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
const valid: React.FC<TableCellProps> = (props) => (
|
|
96
96
|
<TableCell key="valid" align="center" {...props}>
|
|
97
|
-
{isValid === undefined && payload != undefined ?
|
|
97
|
+
{isValid === undefined && payload != undefined ?
|
|
98
98
|
<WarningAmberRoundedIcon fontSize="small" color="warning" />
|
|
99
|
-
|
|
99
|
+
: isValid === true ?
|
|
100
100
|
<CheckCircleOutlineRoundedIcon fontSize="small" color="success" />
|
|
101
|
-
|
|
101
|
+
: isValid === false ?
|
|
102
102
|
<ErrorOutlineRoundedIcon color="error" fontSize="small" />
|
|
103
|
-
) : (
|
|
104
103
|
//nbsp to keep row height consistent even when no data is provided for the row
|
|
105
|
-
|
|
106
|
-
)}
|
|
104
|
+
: <Typography> </Typography>}
|
|
107
105
|
</TableCell>
|
|
108
106
|
)
|
|
109
107
|
|
|
@@ -116,11 +114,11 @@ export const PayloadDynamicTableRow: React.FC<PayloadDynamicTableRowProps> = ({
|
|
|
116
114
|
valid,
|
|
117
115
|
}
|
|
118
116
|
|
|
119
|
-
return breakPoint ?
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
117
|
+
return breakPoint ?
|
|
118
|
+
<TableRow style={{ maxWidth: '100vw' }} {...props}>
|
|
119
|
+
{columns[breakPoint]?.map((column) => {
|
|
120
|
+
return column.slug ? tableCells[column.slug]({}) : null
|
|
121
|
+
})}
|
|
122
|
+
</TableRow>
|
|
123
|
+
: null
|
|
126
124
|
}
|
|
@@ -18,7 +18,7 @@ import { useBreakpoint } from '@xylabs/react-shared'
|
|
|
18
18
|
import { Payload } from '@xyo-network/payload-model'
|
|
19
19
|
import { ThrownErrorBoundary } from '@xyo-network/react-error'
|
|
20
20
|
import { usePayloadHashes } from '@xyo-network/react-shared'
|
|
21
|
-
import { useEffect, useMemo, useState } from 'react'
|
|
21
|
+
import { ReactNode, useEffect, useMemo, useState } from 'react'
|
|
22
22
|
|
|
23
23
|
import { PayloadDynamicTableRow } from './DynamicTableRow'
|
|
24
24
|
import { PayloadDynamicTableColumnConfig, payloadDynamicTableColumnConfigDefaults } from './PayloadDynamicTableColumnConfig'
|
|
@@ -62,16 +62,24 @@ function TablePaginationActions(props: TablePaginationActionsProps) {
|
|
|
62
62
|
return (
|
|
63
63
|
<Box sx={{ flexShrink: 0, ml: 2.5 }}>
|
|
64
64
|
<IconButton onClick={handleFirstPageButtonClick} disabled={page === 0} aria-label="first page">
|
|
65
|
-
{theme.direction === 'rtl' ?
|
|
65
|
+
{theme.direction === 'rtl' ?
|
|
66
|
+
<LastPageIcon />
|
|
67
|
+
: <FirstPageIcon />}
|
|
66
68
|
</IconButton>
|
|
67
69
|
<IconButton onClick={handleBackButtonClick} disabled={page === 0} aria-label="previous page">
|
|
68
|
-
{theme.direction === 'rtl' ?
|
|
70
|
+
{theme.direction === 'rtl' ?
|
|
71
|
+
<KeyboardArrowRight />
|
|
72
|
+
: <KeyboardArrowLeft />}
|
|
69
73
|
</IconButton>
|
|
70
74
|
<IconButton onClick={handleNextButtonClick} disabled={page >= Math.ceil(count / rowsPerPage) - 1} aria-label="next page">
|
|
71
|
-
{theme.direction === 'rtl' ?
|
|
75
|
+
{theme.direction === 'rtl' ?
|
|
76
|
+
<KeyboardArrowLeft />
|
|
77
|
+
: <KeyboardArrowRight />}
|
|
72
78
|
</IconButton>
|
|
73
79
|
<IconButton onClick={handleLastPageButtonClick} disabled={page >= Math.ceil(count / rowsPerPage) - 1} aria-label="last page">
|
|
74
|
-
{theme.direction === 'rtl' ?
|
|
80
|
+
{theme.direction === 'rtl' ?
|
|
81
|
+
<FirstPageIcon />
|
|
82
|
+
: <LastPageIcon />}
|
|
75
83
|
</IconButton>
|
|
76
84
|
</Box>
|
|
77
85
|
)
|
|
@@ -111,71 +119,71 @@ export const PayloadDynamicTable: React.FC<PayloadDynamicTableProps> = ({
|
|
|
111
119
|
setPage(0)
|
|
112
120
|
}
|
|
113
121
|
|
|
114
|
-
return breakPoint ?
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
122
|
+
return breakPoint ?
|
|
123
|
+
<Table stickyHeader {...props}>
|
|
124
|
+
<TableHead>
|
|
125
|
+
<TableRow>
|
|
126
|
+
{columns[breakPoint]?.map((column, index) => {
|
|
127
|
+
return (
|
|
128
|
+
<TableCell key={index} align={column.alignment ?? 'left'} width={column.width}>
|
|
129
|
+
<Typography variant="body2" noWrap>
|
|
130
|
+
{column.name}
|
|
131
|
+
</Typography>
|
|
132
|
+
</TableCell>
|
|
133
|
+
)
|
|
134
|
+
})}
|
|
135
|
+
</TableRow>
|
|
136
|
+
</TableHead>
|
|
137
|
+
<TableBody sx={{ overflowY: 'scroll ' }}>
|
|
138
|
+
{payloadPairs?.map(([payload, hash], index) => {
|
|
119
139
|
return (
|
|
120
|
-
<
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
key={`${hash}-${index}`}
|
|
135
|
-
errorComponent={(e) => (
|
|
136
|
-
<Alert severity="error">
|
|
137
|
-
Error Loading Payload: <Typography fontWeight="bold">{e.message}</Typography>
|
|
138
|
-
</Alert>
|
|
139
|
-
)}
|
|
140
|
-
>
|
|
141
|
-
<PayloadDynamicTableRow
|
|
142
|
-
archive={archive}
|
|
143
|
-
onClick={
|
|
144
|
-
onRowClick
|
|
145
|
-
? () => {
|
|
140
|
+
<ThrownErrorBoundary
|
|
141
|
+
boundaryName="PayloadTableBody"
|
|
142
|
+
key={`${hash}-${index}`}
|
|
143
|
+
errorComponent={(e) => (
|
|
144
|
+
<Alert severity="error">
|
|
145
|
+
Error Loading Payload: <Typography fontWeight="bold">{e.message}</Typography>
|
|
146
|
+
</Alert>
|
|
147
|
+
)}
|
|
148
|
+
>
|
|
149
|
+
<PayloadDynamicTableRow
|
|
150
|
+
archive={archive}
|
|
151
|
+
onClick={
|
|
152
|
+
onRowClick ?
|
|
153
|
+
() => {
|
|
146
154
|
onRowClick(payload)
|
|
147
155
|
}
|
|
148
156
|
: undefined
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
157
|
+
}
|
|
158
|
+
exploreDomain={exploreDomain}
|
|
159
|
+
payload={payload}
|
|
160
|
+
/>
|
|
161
|
+
</ThrownErrorBoundary>
|
|
162
|
+
)
|
|
163
|
+
})}
|
|
164
|
+
{children}
|
|
165
|
+
{emptyRows ? (Array.from({ length: emptyRows }).fill(<PayloadDynamicTableRow />) as ReactNode[]) : null}
|
|
166
|
+
</TableBody>
|
|
167
|
+
<TableFooter>
|
|
168
|
+
<TableRow>
|
|
169
|
+
<TablePagination
|
|
170
|
+
rowsPerPageOptions={[5, 10, 25, { label: 'All', value: -1 }]}
|
|
171
|
+
colSpan={5}
|
|
172
|
+
count={payloadCount}
|
|
173
|
+
rowsPerPage={rowsPerPage}
|
|
174
|
+
page={page}
|
|
175
|
+
SelectProps={{
|
|
176
|
+
inputProps: {
|
|
177
|
+
'aria-label': 'rows per page',
|
|
178
|
+
},
|
|
179
|
+
native: true,
|
|
180
|
+
}}
|
|
181
|
+
onPageChange={handleChangePage}
|
|
182
|
+
onRowsPerPageChange={handleChangeRowsPerPage}
|
|
183
|
+
ActionsComponent={TablePaginationActions}
|
|
184
|
+
/>
|
|
185
|
+
</TableRow>
|
|
186
|
+
</TableFooter>
|
|
187
|
+
</Table>
|
|
188
|
+
: null
|
|
181
189
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Alert, TableBody, Typography } from '@mui/material'
|
|
2
2
|
import { ThrownErrorBoundary } from '@xyo-network/react-error'
|
|
3
3
|
import { usePayloadHashes } from '@xyo-network/react-shared'
|
|
4
|
+
import { ReactNode } from 'react'
|
|
4
5
|
|
|
5
6
|
import { PayloadTableRow } from './TableRow'
|
|
6
7
|
import { PayloadTableBodyProps } from './types'
|
|
@@ -21,7 +22,9 @@ export const PayloadTableBody: React.FC<PayloadTableBodyProps> = ({
|
|
|
21
22
|
|
|
22
23
|
return (
|
|
23
24
|
<TableBody {...props}>
|
|
24
|
-
{noResults && NoResultRowComponent ?
|
|
25
|
+
{noResults && NoResultRowComponent ?
|
|
26
|
+
<NoResultRowComponent />
|
|
27
|
+
: null}
|
|
25
28
|
{payloadPairs?.map(([payload, hash], index) => {
|
|
26
29
|
return (
|
|
27
30
|
<ThrownErrorBoundary
|
|
@@ -37,11 +40,11 @@ export const PayloadTableBody: React.FC<PayloadTableBodyProps> = ({
|
|
|
37
40
|
maxSchemaDepth={maxSchemaDepth}
|
|
38
41
|
archive={archive}
|
|
39
42
|
onClick={
|
|
40
|
-
onRowClick
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
onRowClick ?
|
|
44
|
+
() => {
|
|
45
|
+
onRowClick(payload)
|
|
46
|
+
}
|
|
47
|
+
: undefined
|
|
45
48
|
}
|
|
46
49
|
exploreDomain={exploreDomain}
|
|
47
50
|
payload={payload}
|
|
@@ -50,7 +53,7 @@ export const PayloadTableBody: React.FC<PayloadTableBodyProps> = ({
|
|
|
50
53
|
)
|
|
51
54
|
})}
|
|
52
55
|
{children}
|
|
53
|
-
{
|
|
56
|
+
{emptyRows ? (Array.from({ length: emptyRows }).fill(<PayloadTableRow />) as ReactNode[]) : null}
|
|
54
57
|
</TableBody>
|
|
55
58
|
)
|
|
56
59
|
}
|
|
@@ -9,17 +9,17 @@ export const PayloadTableHead: React.FC<PayloadTableHeadProps> = ({ columns = pa
|
|
|
9
9
|
return (
|
|
10
10
|
<TableHead {...props}>
|
|
11
11
|
<TableRow>
|
|
12
|
-
{breakPoint && columns
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
12
|
+
{breakPoint && columns ?
|
|
13
|
+
columns[breakPoint]?.map((column, index) => {
|
|
14
|
+
return (
|
|
15
|
+
<TableCell key={index} width={index === 0 ? '100%' : undefined} align={index === 0 ? 'left' : 'center'}>
|
|
16
|
+
<Typography variant="body2" noWrap>
|
|
17
|
+
{payloadColumnNames[column]}
|
|
18
|
+
</Typography>
|
|
19
|
+
</TableCell>
|
|
20
|
+
)
|
|
21
|
+
})
|
|
22
|
+
: null}
|
|
23
23
|
</TableRow>
|
|
24
24
|
</TableHead>
|
|
25
25
|
)
|
|
@@ -39,13 +39,19 @@ export function TablePaginationActions({ count, enableNextPage, loading, onPageC
|
|
|
39
39
|
|
|
40
40
|
return (
|
|
41
41
|
<>
|
|
42
|
-
{loading ?
|
|
42
|
+
{loading ?
|
|
43
|
+
<CircularProgress size={'small'} sx={{ height: theme.spacing(2), position: 'absolute', width: theme.spacing(2) }} />
|
|
44
|
+
: null}
|
|
43
45
|
<Box sx={{ flexShrink: 0, ml: 2.5 }}>
|
|
44
46
|
<IconButton onClick={handleFirstPageButtonClick} disabled={page === 0} aria-label="first page">
|
|
45
|
-
{theme.direction === 'rtl' ?
|
|
47
|
+
{theme.direction === 'rtl' ?
|
|
48
|
+
<LastPageIcon />
|
|
49
|
+
: <FirstPageIcon />}
|
|
46
50
|
</IconButton>
|
|
47
51
|
<IconButton ref={paginationRef} onClick={handleBackButtonClick} disabled={page === 0} aria-label="previous page">
|
|
48
|
-
{theme.direction === 'rtl' ?
|
|
52
|
+
{theme.direction === 'rtl' ?
|
|
53
|
+
<KeyboardArrowRight />
|
|
54
|
+
: <KeyboardArrowLeft />}
|
|
49
55
|
</IconButton>
|
|
50
56
|
<IconButton
|
|
51
57
|
ref={paginationRef}
|
|
@@ -53,10 +59,14 @@ export function TablePaginationActions({ count, enableNextPage, loading, onPageC
|
|
|
53
59
|
disabled={!enableNextPage && page >= Math.ceil(count / rowsPerPage) - 1}
|
|
54
60
|
aria-label="next page"
|
|
55
61
|
>
|
|
56
|
-
{theme.direction === 'rtl' ?
|
|
62
|
+
{theme.direction === 'rtl' ?
|
|
63
|
+
<KeyboardArrowLeft />
|
|
64
|
+
: <KeyboardArrowRight />}
|
|
57
65
|
</IconButton>
|
|
58
66
|
<IconButton onClick={handleLastPageButtonClick} disabled={page >= Math.ceil(count / rowsPerPage) - 1} aria-label="last page">
|
|
59
|
-
{theme.direction === 'rtl' ?
|
|
67
|
+
{theme.direction === 'rtl' ?
|
|
68
|
+
<FirstPageIcon />
|
|
69
|
+
: <LastPageIcon />}
|
|
60
70
|
</IconButton>
|
|
61
71
|
</Box>
|
|
62
72
|
</>
|
|
@@ -79,16 +79,14 @@ export const PayloadTableRow: React.FC<PayloadTableRowProps> = ({
|
|
|
79
79
|
|
|
80
80
|
const valid: React.FC<TableCellProps> = (props) => (
|
|
81
81
|
<TableCell key="valid" align="center" {...props}>
|
|
82
|
-
{isValid === undefined && payload != undefined ?
|
|
82
|
+
{isValid === undefined && payload != undefined ?
|
|
83
83
|
<WarningAmberRoundedIcon fontSize="small" color="warning" />
|
|
84
|
-
|
|
84
|
+
: isValid === true ?
|
|
85
85
|
<CheckCircleOutlineRoundedIcon fontSize="small" color="success" />
|
|
86
|
-
|
|
86
|
+
: isValid === false ?
|
|
87
87
|
<ErrorOutlineRoundedIcon color="error" fontSize="small" />
|
|
88
|
-
) : (
|
|
89
88
|
//to keep row height consistent when no data provided, may need fix later
|
|
90
|
-
|
|
91
|
-
)}
|
|
89
|
+
: <ErrorOutlineRoundedIcon sx={{ color: alpha('#fff', 0) }} fontSize="small" />}
|
|
92
90
|
</TableCell>
|
|
93
91
|
)
|
|
94
92
|
|
|
@@ -98,11 +96,11 @@ export const PayloadTableRow: React.FC<PayloadTableRowProps> = ({
|
|
|
98
96
|
valid,
|
|
99
97
|
}
|
|
100
98
|
|
|
101
|
-
return breakPoint ?
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
99
|
+
return breakPoint ?
|
|
100
|
+
<TableRow style={{ maxWidth: '100vw' }} {...props}>
|
|
101
|
+
{columns[breakPoint]?.map((column) => {
|
|
102
|
+
return tableCells[column]({})
|
|
103
|
+
})}
|
|
104
|
+
</TableRow>
|
|
105
|
+
: null
|
|
108
106
|
}
|
|
@@ -14,11 +14,11 @@ export const TableRowNoData: React.FC<TableRowNoDataProps> = ({ additionalCells,
|
|
|
14
14
|
No Data To Display...
|
|
15
15
|
</Typography>
|
|
16
16
|
</StyledTableCell>
|
|
17
|
-
{additionalCells
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
{additionalCells ?
|
|
18
|
+
Array.from({ length: additionalCells })
|
|
19
|
+
.fill(null)
|
|
20
|
+
.map((_fill, index) => <StyledTableCell key={index} hideBorder={hideBorder} />)
|
|
21
|
+
: null}
|
|
22
22
|
</TableRow>
|
|
23
23
|
)
|
|
24
24
|
}
|