@redsift/design-system-legacy 8.0.1 → 8.0.3
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/package.json +3 -2
- package/dist/package.json +0 -65
- package/rollup.config.js +0 -70
- package/src/components/Alert/Alert.jsx +0 -94
- package/src/components/Alert/index.ts +0 -1
- package/src/components/Alert/readme.md +0 -114
- package/src/components/Button/Button.jsx +0 -161
- package/src/components/Button/index.ts +0 -1
- package/src/components/Button/readme.md +0 -173
- package/src/components/Card/Card.jsx +0 -34
- package/src/components/Card/index.ts +0 -1
- package/src/components/Card/readme.md +0 -54
- package/src/components/CardHeader/CardHeader.jsx +0 -40
- package/src/components/CardHeader/index.ts +0 -1
- package/src/components/Checkbox/Checkbox.jsx +0 -123
- package/src/components/Checkbox/index.ts +0 -1
- package/src/components/Checkbox/readme.md +0 -54
- package/src/components/CheckboxTree/CheckboxTree.jsx +0 -167
- package/src/components/CheckboxTree/CheckboxTree.styles.ts +0 -49
- package/src/components/CheckboxTree/index.ts +0 -1
- package/src/components/CheckboxTree/readme.md +0 -60
- package/src/components/IconContainer/IconContainer.jsx +0 -51
- package/src/components/IconContainer/index.ts +0 -1
- package/src/components/Input/Input.jsx +0 -27
- package/src/components/Input/OutlineInput/OutlineInput.jsx +0 -188
- package/src/components/Input/RegularInput/RegularInput.jsx +0 -55
- package/src/components/Input/RegularInput/RegularInput.styles.ts +0 -98
- package/src/components/Input/index.ts +0 -1
- package/src/components/Input/readme.md +0 -82
- package/src/components/Pagination/Pagination.jsx +0 -111
- package/src/components/Pagination/index.ts +0 -1
- package/src/components/Pagination/readme.md +0 -34
- package/src/components/Radio/Radio.jsx +0 -121
- package/src/components/Radio/index.ts +0 -1
- package/src/components/Radio/readme.md +0 -90
- package/src/components/Select/Select.jsx +0 -360
- package/src/components/Select/SelectComponents.jsx +0 -342
- package/src/components/Select/index.ts +0 -1
- package/src/components/Select/readme.md +0 -2507
- package/src/components/Switch/Switch.jsx +0 -130
- package/src/components/Switch/index.ts +0 -1
- package/src/components/Switch/readme.md +0 -55
- package/src/components/Table/ExportCSVButton.jsx +0 -34
- package/src/components/Table/Table.jsx +0 -872
- package/src/components/Table/TableComponents.jsx +0 -239
- package/src/components/Table/TableFilters.jsx +0 -23
- package/src/components/Table/TableStyles.jsx +0 -514
- package/src/components/Table/index.ts +0 -1
- package/src/components/Table/readme.md +0 -2190
- package/src/components/Tabs/Tabs.jsx +0 -116
- package/src/components/Tabs/TabsComponents.jsx +0 -124
- package/src/components/Tabs/index.ts +0 -1
- package/src/components/Tabs/readme.md +0 -171
- package/src/components/Typography/Typography.jsx +0 -77
- package/src/components/Typography/index.ts +0 -1
- package/src/components/Typography/readme.md +0 -88
- package/src/components/icons/ActionsIcon.jsx +0 -24
- package/src/components/icons/AddIcon.jsx +0 -8
- package/src/components/icons/Arrow.jsx +0 -39
- package/src/components/icons/ArrowDown.jsx +0 -8
- package/src/components/icons/ArrowIcon.jsx +0 -25
- package/src/components/icons/ArrowUp.jsx +0 -8
- package/src/components/icons/BarchartHorizontal.jsx +0 -18
- package/src/components/icons/BellIcon.jsx +0 -19
- package/src/components/icons/BimiSetupIcon.jsx +0 -25
- package/src/components/icons/Chevron.jsx +0 -42
- package/src/components/icons/ChevronLeft.jsx +0 -8
- package/src/components/icons/ChevronRight.jsx +0 -8
- package/src/components/icons/ClearIcon.jsx +0 -8
- package/src/components/icons/Cloud.jsx +0 -34
- package/src/components/icons/Cross.jsx +0 -25
- package/src/components/icons/DeleteIcon.jsx +0 -19
- package/src/components/icons/DynamicDmarcIcon.jsx +0 -43
- package/src/components/icons/EditOutline.jsx +0 -8
- package/src/components/icons/Email.jsx +0 -68
- package/src/components/icons/EmailSourcesIcon.jsx +0 -36
- package/src/components/icons/ExpandLayoutIcon.jsx +0 -38
- package/src/components/icons/ExportIcon.jsx +0 -7
- package/src/components/icons/Eye.jsx +0 -28
- package/src/components/icons/Facebook.jsx +0 -31
- package/src/components/icons/FilterList.jsx +0 -8
- package/src/components/icons/FindOutHowIcon.jsx +0 -49
- package/src/components/icons/FlatArrow.jsx +0 -33
- package/src/components/icons/ForwardArrowIcon.jsx +0 -54
- package/src/components/icons/Github.jsx +0 -41
- package/src/components/icons/Globe.jsx +0 -29
- package/src/components/icons/Hand.jsx +0 -21
- package/src/components/icons/InfinityLoop.jsx +0 -22
- package/src/components/icons/InfinityLoopBreak.jsx +0 -35
- package/src/components/icons/IngrainIcon.jsx +0 -33
- package/src/components/icons/LanguageIcon.jsx +0 -44
- package/src/components/icons/Linkedin.jsx +0 -37
- package/src/components/icons/LocationPin.jsx +0 -34
- package/src/components/icons/MicrosoftShield.jsx +0 -44
- package/src/components/icons/News.jsx +0 -65
- package/src/components/icons/Nodes.jsx +0 -17
- package/src/components/icons/OnDmarcIcon.jsx +0 -29
- package/src/components/icons/OnDmarcLogo.jsx +0 -74
- package/src/components/icons/OnDomainIcon.jsx +0 -27
- package/src/components/icons/OnInboxIcon.jsx +0 -42
- package/src/components/icons/OnInboxLogo.jsx +0 -97
- package/src/components/icons/OnInboxManagerIcon.jsx +0 -46
- package/src/components/icons/OpenInNewTabIcon.jsx +0 -28
- package/src/components/icons/Padlock.jsx +0 -37
- package/src/components/icons/PlusIcon.jsx +0 -16
- package/src/components/icons/Question.jsx +0 -19
- package/src/components/icons/Recruiting.jsx +0 -34
- package/src/components/icons/ReportsIcon.jsx +0 -25
- package/src/components/icons/SearchIcon.jsx +0 -7
- package/src/components/icons/Shield.jsx +0 -17
- package/src/components/icons/ShieldPassIcon.jsx +0 -23
- package/src/components/icons/ShieldSolid.jsx +0 -33
- package/src/components/icons/ShieldWarningIcon.jsx +0 -40
- package/src/components/icons/ShieldWarningInvertedIcon.jsx +0 -36
- package/src/components/icons/Spinner.jsx +0 -100
- package/src/components/icons/Team.jsx +0 -164
- package/src/components/icons/ThreeDotsIcon.jsx +0 -18
- package/src/components/icons/Thumb.jsx +0 -17
- package/src/components/icons/Traffic.jsx +0 -22
- package/src/components/icons/Twitter.jsx +0 -47
- package/src/components/icons/Upload.jsx +0 -12
- package/src/components/icons/VerticalDots.jsx +0 -28
- package/src/components/icons/Warning.jsx +0 -36
- package/src/components/icons/WarningTriangle.jsx +0 -44
- package/src/components/icons/Youtube.jsx +0 -28
- package/src/components/icons/index.ts +0 -69
- package/src/hooks/useDebouncedValue.jsx +0 -19
- package/src/hooks/useFetch.jsx +0 -26
- package/src/hooks/useIsMobile.jsx +0 -25
- package/src/hooks/useOnClickOutside.jsx +0 -14
- package/src/hooks/useToggle.jsx +0 -8
- package/src/index.ts +0 -23
- package/tsconfig.json +0 -3
- /package/{dist/CONTRIBUTING.md → CONTRIBUTING.md} +0 -0
- /package/{dist/index.js → index.js} +0 -0
- /package/{dist/index.js.map → index.js.map} +0 -0
|
@@ -1,872 +0,0 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
Fragment,
|
|
3
|
-
useState,
|
|
4
|
-
useEffect,
|
|
5
|
-
createRef,
|
|
6
|
-
useMemo,
|
|
7
|
-
} from 'react';
|
|
8
|
-
import {
|
|
9
|
-
useTable,
|
|
10
|
-
useSortBy,
|
|
11
|
-
usePagination,
|
|
12
|
-
useFilters,
|
|
13
|
-
useExpanded,
|
|
14
|
-
} from "react-table";
|
|
15
|
-
|
|
16
|
-
import { Checkbox } from '../Checkbox';
|
|
17
|
-
import { Typography } from '../Typography';
|
|
18
|
-
import { Pagination } from '../Pagination';
|
|
19
|
-
import { Cross, DeleteIcon, SearchIcon, FilterList } from '../icons';
|
|
20
|
-
import { useDebouncedValue } from '../../hooks/useDebouncedValue';
|
|
21
|
-
import { useIsMobile } from '../../hooks/useIsMobile';
|
|
22
|
-
|
|
23
|
-
import {
|
|
24
|
-
Container,
|
|
25
|
-
SortDownIcon,
|
|
26
|
-
SortUpIcon,
|
|
27
|
-
ActionIcon,
|
|
28
|
-
AddComponentContainer,
|
|
29
|
-
Search,
|
|
30
|
-
TableHeaderCell,
|
|
31
|
-
Header,
|
|
32
|
-
Row,
|
|
33
|
-
ActionBar,
|
|
34
|
-
Cell,
|
|
35
|
-
SortCell,
|
|
36
|
-
HeaderPrimaryContent,
|
|
37
|
-
StyledTable,
|
|
38
|
-
ExpandIcon,
|
|
39
|
-
TableBody,
|
|
40
|
-
TableContent,
|
|
41
|
-
TableHeaderSection,
|
|
42
|
-
} from "./TableStyles";
|
|
43
|
-
import {
|
|
44
|
-
BlankRows,
|
|
45
|
-
ClearSearchButton,
|
|
46
|
-
ActionButtons,
|
|
47
|
-
ButtonsRowContainer,
|
|
48
|
-
EditButton,
|
|
49
|
-
DeleteConfirmBanner,
|
|
50
|
-
SortButton,
|
|
51
|
-
} from "./TableComponents";
|
|
52
|
-
import { fuzzyTextFilterFn, DefaultColumnFilter } from "./TableFilters";
|
|
53
|
-
import { ExportCSVButton } from "./ExportCSVButton";
|
|
54
|
-
|
|
55
|
-
export const Table = ({
|
|
56
|
-
columns,
|
|
57
|
-
data,
|
|
58
|
-
footerRow,
|
|
59
|
-
title,
|
|
60
|
-
bordered,
|
|
61
|
-
rowSpacing,
|
|
62
|
-
sortableRows,
|
|
63
|
-
onSelectionChange,
|
|
64
|
-
onSearchChange = () => {},
|
|
65
|
-
onRowsLengthChange = () => {},
|
|
66
|
-
onPageSizeChange = () => {},
|
|
67
|
-
onPageChange = () => {},
|
|
68
|
-
onDelete,
|
|
69
|
-
onSort,
|
|
70
|
-
showDeleteColumn,
|
|
71
|
-
export: exportSettings,
|
|
72
|
-
defaultSorted,
|
|
73
|
-
defaultPageSize = 10,
|
|
74
|
-
searchID,
|
|
75
|
-
searchLabel,
|
|
76
|
-
checkboxProps,
|
|
77
|
-
inputProps,
|
|
78
|
-
selectHighlight,
|
|
79
|
-
staticPageSize,
|
|
80
|
-
noPagination,
|
|
81
|
-
color = "#000",
|
|
82
|
-
iconButtonsHoverColor = "#00000019",
|
|
83
|
-
iconButtonsActiveColor = "#00000032",
|
|
84
|
-
primaryButtonsHoverColor = "#222222",
|
|
85
|
-
primaryButtonsActiveColor = "#111111",
|
|
86
|
-
filterable,
|
|
87
|
-
CustomFilterButton,
|
|
88
|
-
sortable = true,
|
|
89
|
-
CustomActions,
|
|
90
|
-
AddComponent,
|
|
91
|
-
customOnEdit,
|
|
92
|
-
CustomSelectedActions,
|
|
93
|
-
CustomPrimaryActions,
|
|
94
|
-
CustomHeaderComponent,
|
|
95
|
-
rowSubComponent,
|
|
96
|
-
rowSubComponentEditMode,
|
|
97
|
-
xOverflow,
|
|
98
|
-
xOverflowBg,
|
|
99
|
-
locales = {},
|
|
100
|
-
smallTableButtonDesign = false,
|
|
101
|
-
onPreviousPage = () => {},
|
|
102
|
-
onNextPage = () => {},
|
|
103
|
-
gotoPageIndex = null,
|
|
104
|
-
onVisibleRowsChange = null,
|
|
105
|
-
onVisibleRowsChangeDebounceTime = null,
|
|
106
|
-
onChangeSortBy = null,
|
|
107
|
-
...rest
|
|
108
|
-
}) => {
|
|
109
|
-
const [selected, setSelected] = useState({});
|
|
110
|
-
const [selectAll, setSelectAll] = useState(false);
|
|
111
|
-
const [showFilter, setShowFilter] = useState(false);
|
|
112
|
-
const [deleteConfirm, setDeleteConfirm] = useState(false);
|
|
113
|
-
const [showAddComponent, setShowAddComponent] = useState(false);
|
|
114
|
-
const [search, setSearch] = useState("");
|
|
115
|
-
const [currentData, setCurrentData] = useState([]);
|
|
116
|
-
const [transformedFooterRow, setTransformedFooterRow] = useState();
|
|
117
|
-
const [placeholderHeight, setPlaceholderHeight] = useState();
|
|
118
|
-
const locale = (key, fallback) => locales[key] || fallback;
|
|
119
|
-
|
|
120
|
-
const { isMobile } = useIsMobile();
|
|
121
|
-
const displayCustomActionsBelowSearch = isMobile || smallTableButtonDesign;
|
|
122
|
-
|
|
123
|
-
// recalculate height of simplebar wrapper
|
|
124
|
-
// https://github.com/Grsmto/simplebar/tree/master/packages/simplebar-react#accessing-simplebar-instance
|
|
125
|
-
const ref = createRef();
|
|
126
|
-
useEffect(() => {
|
|
127
|
-
if (xOverflow && ref && ref.current) {
|
|
128
|
-
ref.current.recalculate();
|
|
129
|
-
}
|
|
130
|
-
}, [ref, xOverflow]);
|
|
131
|
-
|
|
132
|
-
useEffect(() => {
|
|
133
|
-
if (xOverflow && currentData.length) {
|
|
134
|
-
const content = document.querySelector(".simplebar-content");
|
|
135
|
-
setPlaceholderHeight(content.offsetHeight);
|
|
136
|
-
}
|
|
137
|
-
}, [currentData, xOverflow]);
|
|
138
|
-
|
|
139
|
-
const defaultColumn = useMemo(
|
|
140
|
-
() => ({
|
|
141
|
-
Filter: DefaultColumnFilter,
|
|
142
|
-
}),
|
|
143
|
-
[]
|
|
144
|
-
);
|
|
145
|
-
|
|
146
|
-
const filterTypes = useMemo(
|
|
147
|
-
() => ({
|
|
148
|
-
// Add a new fuzzyTextFilterFn filter type.
|
|
149
|
-
fuzzyText: fuzzyTextFilterFn,
|
|
150
|
-
// override the default text filter to use "startWith"
|
|
151
|
-
text: (rows, id, filterValue) => {
|
|
152
|
-
return rows.filter((row) => {
|
|
153
|
-
const rowValue = row.values[id];
|
|
154
|
-
return rowValue !== undefined
|
|
155
|
-
? String(rowValue)
|
|
156
|
-
.toLowerCase()
|
|
157
|
-
.startsWith(String(filterValue).toLowerCase())
|
|
158
|
-
: true;
|
|
159
|
-
});
|
|
160
|
-
},
|
|
161
|
-
}),
|
|
162
|
-
[]
|
|
163
|
-
);
|
|
164
|
-
|
|
165
|
-
// for xOverflow:
|
|
166
|
-
const isFirstCell = (itemSize, idx, xOverflow) => {
|
|
167
|
-
if (idx === 0 && xOverflow) {
|
|
168
|
-
return xOverflow;
|
|
169
|
-
}
|
|
170
|
-
return itemSize;
|
|
171
|
-
};
|
|
172
|
-
const isLastCell = (itemCount, idx, xOverflow) => {
|
|
173
|
-
if (itemCount - 1 === idx && xOverflow) {
|
|
174
|
-
return true;
|
|
175
|
-
}
|
|
176
|
-
};
|
|
177
|
-
|
|
178
|
-
useEffect(() => {
|
|
179
|
-
onSearchChange(search);
|
|
180
|
-
}, [search]);
|
|
181
|
-
|
|
182
|
-
useEffect(() => {
|
|
183
|
-
if (!searchID || !search) {
|
|
184
|
-
return setCurrentData(data);
|
|
185
|
-
}
|
|
186
|
-
const newData = data.filter(
|
|
187
|
-
(item) =>
|
|
188
|
-
item[searchID] &&
|
|
189
|
-
item[searchID].toLowerCase().includes(search.toLowerCase())
|
|
190
|
-
);
|
|
191
|
-
setCurrentData(newData);
|
|
192
|
-
}, [data, searchID, search]);
|
|
193
|
-
|
|
194
|
-
useEffect(() => {
|
|
195
|
-
if (!footerRow) {
|
|
196
|
-
return setTransformedFooterRow(null);
|
|
197
|
-
}
|
|
198
|
-
setTransformedFooterRow({
|
|
199
|
-
values: footerRow,
|
|
200
|
-
original: {
|
|
201
|
-
_isFooter: true,
|
|
202
|
-
_noSelect: true,
|
|
203
|
-
CustomNoSelect: () => null,
|
|
204
|
-
},
|
|
205
|
-
});
|
|
206
|
-
}, [footerRow]);
|
|
207
|
-
|
|
208
|
-
const useTableData = {
|
|
209
|
-
columns,
|
|
210
|
-
data: currentData,
|
|
211
|
-
defaultColumn,
|
|
212
|
-
filterTypes,
|
|
213
|
-
initialState: {
|
|
214
|
-
pageSize: defaultPageSize,
|
|
215
|
-
},
|
|
216
|
-
};
|
|
217
|
-
|
|
218
|
-
if (defaultSorted) {
|
|
219
|
-
useTableData.initialState = {
|
|
220
|
-
...useTableData.initialState,
|
|
221
|
-
sortBy: defaultSorted,
|
|
222
|
-
};
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
const instance = useTable(
|
|
226
|
-
useTableData,
|
|
227
|
-
useFilters,
|
|
228
|
-
useSortBy,
|
|
229
|
-
useExpanded,
|
|
230
|
-
usePagination
|
|
231
|
-
);
|
|
232
|
-
|
|
233
|
-
const {
|
|
234
|
-
getTableProps,
|
|
235
|
-
getTableBodyProps,
|
|
236
|
-
headerGroups,
|
|
237
|
-
prepareRow,
|
|
238
|
-
rows,
|
|
239
|
-
state: { pageIndex, pageSize },
|
|
240
|
-
canPreviousPage,
|
|
241
|
-
canNextPage,
|
|
242
|
-
gotoPage,
|
|
243
|
-
nextPage,
|
|
244
|
-
previousPage,
|
|
245
|
-
setPageSize,
|
|
246
|
-
page,
|
|
247
|
-
pageOptions,
|
|
248
|
-
} = instance;
|
|
249
|
-
|
|
250
|
-
const [debouncedRows] = useDebouncedValue(
|
|
251
|
-
noPagination ? rows : page,
|
|
252
|
-
onVisibleRowsChangeDebounceTime
|
|
253
|
-
);
|
|
254
|
-
|
|
255
|
-
useEffect(() => {
|
|
256
|
-
if (onVisibleRowsChange !== null) {
|
|
257
|
-
onVisibleRowsChange(debouncedRows);
|
|
258
|
-
}
|
|
259
|
-
}, [debouncedRows]);
|
|
260
|
-
|
|
261
|
-
useEffect(() => {
|
|
262
|
-
if (gotoPageIndex !== null) {
|
|
263
|
-
gotoPage(gotoPageIndex);
|
|
264
|
-
}
|
|
265
|
-
}, [gotoPageIndex, pageIndex]);
|
|
266
|
-
|
|
267
|
-
useEffect(() => {
|
|
268
|
-
if (staticPageSize) {
|
|
269
|
-
setPageSize(staticPageSize);
|
|
270
|
-
}
|
|
271
|
-
}, [staticPageSize, setPageSize]);
|
|
272
|
-
|
|
273
|
-
useEffect(() => {
|
|
274
|
-
onPageSizeChange(pageSize);
|
|
275
|
-
}, [pageSize]);
|
|
276
|
-
|
|
277
|
-
useEffect(() => {
|
|
278
|
-
onPageChange(pageIndex);
|
|
279
|
-
}, [pageIndex]);
|
|
280
|
-
|
|
281
|
-
useEffect(() => {
|
|
282
|
-
if (xOverflow) {
|
|
283
|
-
const content = document.querySelector(".simplebar-content");
|
|
284
|
-
setPlaceholderHeight(content.offsetHeight);
|
|
285
|
-
}
|
|
286
|
-
}, [xOverflow, pageSize]);
|
|
287
|
-
|
|
288
|
-
useEffect(() => {
|
|
289
|
-
onRowsLengthChange(rows.length);
|
|
290
|
-
}, [rows.length, onRowsLengthChange]);
|
|
291
|
-
|
|
292
|
-
const getSelectedList = (state = selected) => {
|
|
293
|
-
const list = [];
|
|
294
|
-
Object.keys(state).forEach((key) => {
|
|
295
|
-
if (state[key]) {
|
|
296
|
-
list.push(key);
|
|
297
|
-
}
|
|
298
|
-
});
|
|
299
|
-
return list;
|
|
300
|
-
};
|
|
301
|
-
|
|
302
|
-
const handleDeleteSelected = () => {
|
|
303
|
-
onDelete(getSelectedList());
|
|
304
|
-
setDeleteConfirm(false);
|
|
305
|
-
setSelectAll(false);
|
|
306
|
-
setSelected({});
|
|
307
|
-
};
|
|
308
|
-
|
|
309
|
-
const handleSortGeneric = (action, row) => {
|
|
310
|
-
const newData = [...currentData];
|
|
311
|
-
const index = parseInt(row.id);
|
|
312
|
-
|
|
313
|
-
if (action === "increment" && index > 0) {
|
|
314
|
-
const firstRow = newData[index];
|
|
315
|
-
const lastRow = newData[index - 1];
|
|
316
|
-
newData.splice(index - 1, 2, firstRow, lastRow);
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
if (action === "decrement" && index < newData.length - 1) {
|
|
320
|
-
const firstRow = newData[index];
|
|
321
|
-
const lastRow = newData[index + 1];
|
|
322
|
-
newData.splice(index, 2, lastRow, firstRow);
|
|
323
|
-
}
|
|
324
|
-
setCurrentData(newData);
|
|
325
|
-
};
|
|
326
|
-
|
|
327
|
-
const returnSelectedList = (newState) => {
|
|
328
|
-
onSelectionChange(getSelectedList(newState));
|
|
329
|
-
};
|
|
330
|
-
|
|
331
|
-
const handleSelectAll = () => {
|
|
332
|
-
const newState = {};
|
|
333
|
-
page.forEach((row) => {
|
|
334
|
-
if ("_id" in row.original && !row.original._noSelect) {
|
|
335
|
-
const { _id } = row.original;
|
|
336
|
-
newState[_id] = !selectAll;
|
|
337
|
-
}
|
|
338
|
-
});
|
|
339
|
-
setSelected(newState);
|
|
340
|
-
setSelectAll(!selectAll);
|
|
341
|
-
returnSelectedList(newState);
|
|
342
|
-
};
|
|
343
|
-
|
|
344
|
-
const handleOnSelectionChange = (row) => {
|
|
345
|
-
if (!("_id" in row.original)) {
|
|
346
|
-
return;
|
|
347
|
-
}
|
|
348
|
-
const { _id } = row.original;
|
|
349
|
-
const newState = { ...selected, [_id]: !selected[_id] };
|
|
350
|
-
if (selected[_id] && selectAll) {
|
|
351
|
-
setSelectAll(false);
|
|
352
|
-
} else {
|
|
353
|
-
let allSelected = true;
|
|
354
|
-
page.forEach((row) => {
|
|
355
|
-
if ("_id" in row.original && !row.original._noSelect) {
|
|
356
|
-
const { _id } = row.original;
|
|
357
|
-
if (!newState[_id]) {
|
|
358
|
-
allSelected = false;
|
|
359
|
-
return;
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
});
|
|
363
|
-
if (allSelected) {
|
|
364
|
-
setSelectAll(true);
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
setSelected(newState);
|
|
368
|
-
returnSelectedList(newState);
|
|
369
|
-
};
|
|
370
|
-
|
|
371
|
-
const selectedList = getSelectedList();
|
|
372
|
-
|
|
373
|
-
const handleClearSearch = () => {
|
|
374
|
-
setSearch("");
|
|
375
|
-
};
|
|
376
|
-
|
|
377
|
-
const itemsSelected = Boolean(selectedList.length);
|
|
378
|
-
|
|
379
|
-
useEffect(() => {
|
|
380
|
-
if (itemsSelected && showAddComponent) {
|
|
381
|
-
setShowAddComponent(false);
|
|
382
|
-
}
|
|
383
|
-
}, [selected.length]);
|
|
384
|
-
|
|
385
|
-
// if data gets updated, check if every selected item is still on the data set
|
|
386
|
-
useEffect(() => {
|
|
387
|
-
const newSelected = { ...selected };
|
|
388
|
-
for (const selectedListElement of selectedList) {
|
|
389
|
-
const doesItemStillExists = currentData.find(
|
|
390
|
-
(item) =>
|
|
391
|
-
"_id" in item &&
|
|
392
|
-
!item._noSelect &&
|
|
393
|
-
item._id.toString() === selectedListElement
|
|
394
|
-
);
|
|
395
|
-
if (!doesItemStillExists) {
|
|
396
|
-
newSelected[selectedListElement] = false;
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
setSelected(newSelected);
|
|
400
|
-
}, [currentData]);
|
|
401
|
-
|
|
402
|
-
useEffect(() => {
|
|
403
|
-
const existingIds = [];
|
|
404
|
-
for (const row of page) {
|
|
405
|
-
if ("_id" in row.original && !row.original._noSelect) {
|
|
406
|
-
existingIds.push(row.original._id);
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
if (existingIds.length) {
|
|
410
|
-
let shouldSelectAll = true;
|
|
411
|
-
for (const id of existingIds) {
|
|
412
|
-
if (!selected[id]) {
|
|
413
|
-
shouldSelectAll = false;
|
|
414
|
-
break;
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
setSelectAll(shouldSelectAll);
|
|
418
|
-
}
|
|
419
|
-
}, [page]);
|
|
420
|
-
|
|
421
|
-
const editRowEnabled = rowSubComponentEditMode && rowSubComponent;
|
|
422
|
-
|
|
423
|
-
return (
|
|
424
|
-
<Container>
|
|
425
|
-
{(title || filterable || exportSettings || CustomActions) && (
|
|
426
|
-
<Header>
|
|
427
|
-
<HeaderPrimaryContent>
|
|
428
|
-
<Typography size="h3" component="h3">
|
|
429
|
-
{title}
|
|
430
|
-
</Typography>
|
|
431
|
-
</HeaderPrimaryContent>
|
|
432
|
-
<ActionBar>
|
|
433
|
-
{filterable &&
|
|
434
|
-
(CustomFilterButton ? (
|
|
435
|
-
<CustomFilterButton
|
|
436
|
-
onClick={() => setShowFilter(!showFilter)}
|
|
437
|
-
/>
|
|
438
|
-
) : (
|
|
439
|
-
<ActionIcon
|
|
440
|
-
title={locale("filter-rows", "Filter rows")}
|
|
441
|
-
aria-label={locale("filter-rows", "Filter rows")}
|
|
442
|
-
label={locale("filter-rows", "Filter rows")}
|
|
443
|
-
onClick={() => setShowFilter(!showFilter)}
|
|
444
|
-
hoverColor={iconButtonsHoverColor}
|
|
445
|
-
activeColor={iconButtonsActiveColor}
|
|
446
|
-
icon={FilterList}
|
|
447
|
-
/>
|
|
448
|
-
))}
|
|
449
|
-
{exportSettings && (
|
|
450
|
-
<ExportCSVButton
|
|
451
|
-
locale={locale}
|
|
452
|
-
data={data}
|
|
453
|
-
filename={exportSettings.filename}
|
|
454
|
-
headers={exportSettings.headers}
|
|
455
|
-
hoverColor={iconButtonsHoverColor}
|
|
456
|
-
activeColor={iconButtonsActiveColor}
|
|
457
|
-
{...exportSettings}
|
|
458
|
-
/>
|
|
459
|
-
)}
|
|
460
|
-
{CustomActions && <CustomActions />}
|
|
461
|
-
</ActionBar>
|
|
462
|
-
</Header>
|
|
463
|
-
)}
|
|
464
|
-
{(searchID ||
|
|
465
|
-
CustomPrimaryActions ||
|
|
466
|
-
AddComponent ||
|
|
467
|
-
(itemsSelected && (CustomSelectedActions || onDelete))) && (
|
|
468
|
-
<Header>
|
|
469
|
-
{searchID && (
|
|
470
|
-
<Search
|
|
471
|
-
expand={displayCustomActionsBelowSearch}
|
|
472
|
-
color={color}
|
|
473
|
-
{...inputProps}
|
|
474
|
-
leftIcon={<SearchIcon title={locale("search", "Search")} />}
|
|
475
|
-
rightIcon={
|
|
476
|
-
search &&
|
|
477
|
-
search.length && (
|
|
478
|
-
<ClearSearchButton handleClearSearch={handleClearSearch} />
|
|
479
|
-
)
|
|
480
|
-
}
|
|
481
|
-
label={searchLabel || locale("search", "Search")}
|
|
482
|
-
value={search}
|
|
483
|
-
onChange={(ev) => setSearch(ev.target.value)}
|
|
484
|
-
/>
|
|
485
|
-
)}
|
|
486
|
-
{(CustomPrimaryActions ||
|
|
487
|
-
(!itemsSelected && AddComponent && !showAddComponent) ||
|
|
488
|
-
(itemsSelected && (CustomSelectedActions || onDelete))) && (
|
|
489
|
-
<ActionBar>
|
|
490
|
-
{CustomPrimaryActions && <CustomPrimaryActions />}
|
|
491
|
-
{itemsSelected && [
|
|
492
|
-
CustomSelectedActions && <CustomSelectedActions />,
|
|
493
|
-
onDelete && (
|
|
494
|
-
<ActionIcon
|
|
495
|
-
title={locale("delete", "Deletex")}
|
|
496
|
-
aria-label={locale("delete", "Delete")}
|
|
497
|
-
label={locale("delete", "Delete")}
|
|
498
|
-
onClick={() => setDeleteConfirm(true)}
|
|
499
|
-
flatIcon={false}
|
|
500
|
-
hoverColor={iconButtonsHoverColor}
|
|
501
|
-
activeColor={iconButtonsActiveColor}
|
|
502
|
-
outlined
|
|
503
|
-
color={color}
|
|
504
|
-
icon={DeleteIcon}
|
|
505
|
-
useMobileLayout={isMobile}
|
|
506
|
-
/>
|
|
507
|
-
),
|
|
508
|
-
]}
|
|
509
|
-
{AddComponent && !showAddComponent && !itemsSelected && (
|
|
510
|
-
<ActionIcon
|
|
511
|
-
title={locale("add", "Add")}
|
|
512
|
-
aria-label={locale("add", "Add")}
|
|
513
|
-
label={locale("add", "Add")}
|
|
514
|
-
onClick={() => setShowAddComponent(!showAddComponent)}
|
|
515
|
-
icon={(props) => (
|
|
516
|
-
<Cross rotation="45deg" width={13} {...props} />
|
|
517
|
-
)}
|
|
518
|
-
flatIcon={false}
|
|
519
|
-
hoverColor={primaryButtonsHoverColor}
|
|
520
|
-
activeColor={primaryButtonsActiveColor}
|
|
521
|
-
color={color}
|
|
522
|
-
flexed={isMobile}
|
|
523
|
-
/>
|
|
524
|
-
)}
|
|
525
|
-
</ActionBar>
|
|
526
|
-
)}
|
|
527
|
-
</Header>
|
|
528
|
-
)}
|
|
529
|
-
{CustomHeaderComponent && <CustomHeaderComponent />}
|
|
530
|
-
{showAddComponent && AddComponent && (
|
|
531
|
-
<AddComponentContainer>
|
|
532
|
-
<AddComponent closeAddComponent={() => setShowAddComponent(false)} />
|
|
533
|
-
</AddComponentContainer>
|
|
534
|
-
)}
|
|
535
|
-
{deleteConfirm && (
|
|
536
|
-
<DeleteConfirmBanner
|
|
537
|
-
locales={locales}
|
|
538
|
-
color={color}
|
|
539
|
-
onDelete={handleDeleteSelected}
|
|
540
|
-
onCancel={() => setDeleteConfirm(false)}
|
|
541
|
-
/>
|
|
542
|
-
)}
|
|
543
|
-
<StyledTable
|
|
544
|
-
selectHighlight={selectHighlight}
|
|
545
|
-
xOverflow={xOverflow}
|
|
546
|
-
bordered={bordered}
|
|
547
|
-
{...getTableProps()}
|
|
548
|
-
{...rest}
|
|
549
|
-
>
|
|
550
|
-
<TableContent
|
|
551
|
-
ref={ref}
|
|
552
|
-
xOverflow={xOverflow}
|
|
553
|
-
placeholderHeight={placeholderHeight}
|
|
554
|
-
>
|
|
555
|
-
<TableHeaderSection
|
|
556
|
-
role="rowgroup"
|
|
557
|
-
bordered={bordered}
|
|
558
|
-
xOverflow={xOverflow}
|
|
559
|
-
>
|
|
560
|
-
{headerGroups.map((headerGroup, i) => (
|
|
561
|
-
<Row
|
|
562
|
-
role="row"
|
|
563
|
-
key={`header-row-${i}`}
|
|
564
|
-
header
|
|
565
|
-
bordered={bordered}
|
|
566
|
-
xOverflow={xOverflow}
|
|
567
|
-
{...headerGroup.getHeaderGroupProps()}
|
|
568
|
-
>
|
|
569
|
-
{onSelectionChange && (
|
|
570
|
-
<TableHeaderCell role="columnheader" checkbox size={50}>
|
|
571
|
-
<Checkbox
|
|
572
|
-
dashed={!selectAll && selectedList.length}
|
|
573
|
-
{...checkboxProps}
|
|
574
|
-
hideLabel
|
|
575
|
-
checked={selectAll || selectedList.length}
|
|
576
|
-
onChange={handleSelectAll}
|
|
577
|
-
>
|
|
578
|
-
Select all
|
|
579
|
-
</Checkbox>
|
|
580
|
-
</TableHeaderCell>
|
|
581
|
-
)}
|
|
582
|
-
{headerGroup.headers.map((column, idx) => {
|
|
583
|
-
return (
|
|
584
|
-
<TableHeaderCell
|
|
585
|
-
role="columnheader"
|
|
586
|
-
key={`header-row-${i}-content-${idx}`}
|
|
587
|
-
enableFlex={!xOverflow}
|
|
588
|
-
stickyCell={idx === 0 && xOverflow}
|
|
589
|
-
stickyCellNext={idx === 1 && xOverflow}
|
|
590
|
-
size={isFirstCell(column.size, idx, xOverflow)}
|
|
591
|
-
lastCell={isLastCell(
|
|
592
|
-
headerGroup.headers.length,
|
|
593
|
-
idx,
|
|
594
|
-
xOverflow
|
|
595
|
-
)}
|
|
596
|
-
sortIconVisible={column.isSorted}
|
|
597
|
-
justifyStart={column.disableFilters && showFilter}
|
|
598
|
-
xOverflowBg={xOverflowBg}
|
|
599
|
-
{...column.getHeaderProps()}
|
|
600
|
-
>
|
|
601
|
-
{sortable ? (
|
|
602
|
-
<div
|
|
603
|
-
{...{
|
|
604
|
-
...column.getSortByToggleProps(),
|
|
605
|
-
onClick: (...args) => {
|
|
606
|
-
onChangeSortBy &&
|
|
607
|
-
onChangeSortBy({
|
|
608
|
-
isSorted: column.isSorted,
|
|
609
|
-
isSortedDesc: column.isSortedDesc,
|
|
610
|
-
columnId: column.id,
|
|
611
|
-
});
|
|
612
|
-
column.getSortByToggleProps().onClick(...args);
|
|
613
|
-
},
|
|
614
|
-
title: `${locale(
|
|
615
|
-
"sort-by",
|
|
616
|
-
"Sort by"
|
|
617
|
-
)} ${(typeof column.Header == "string"
|
|
618
|
-
? column.Header
|
|
619
|
-
: column.id || column.accessor
|
|
620
|
-
).toLowerCase()}`,
|
|
621
|
-
}}
|
|
622
|
-
>
|
|
623
|
-
{column.render("Header")}
|
|
624
|
-
{column.canSort && (
|
|
625
|
-
<span className="sort-icon">
|
|
626
|
-
{column.isSorted ? (
|
|
627
|
-
column.isSortedDesc ? (
|
|
628
|
-
<SortDownIcon />
|
|
629
|
-
) : (
|
|
630
|
-
<SortUpIcon />
|
|
631
|
-
)
|
|
632
|
-
) : (
|
|
633
|
-
<SortUpIcon />
|
|
634
|
-
)}
|
|
635
|
-
</span>
|
|
636
|
-
)}
|
|
637
|
-
</div>
|
|
638
|
-
) : (
|
|
639
|
-
column.render("Header")
|
|
640
|
-
)}
|
|
641
|
-
|
|
642
|
-
{showFilter && column.canFilter && (
|
|
643
|
-
<div style={{ width: "100%", marginBottom: "10px" }}>
|
|
644
|
-
{column.render("Filter")}
|
|
645
|
-
</div>
|
|
646
|
-
)}
|
|
647
|
-
</TableHeaderCell>
|
|
648
|
-
);
|
|
649
|
-
})}
|
|
650
|
-
{editRowEnabled || (onDelete && showDeleteColumn) ? (
|
|
651
|
-
<TableHeaderCell
|
|
652
|
-
role="columnheader"
|
|
653
|
-
size={
|
|
654
|
-
rowSubComponentEditMode &&
|
|
655
|
-
rowSubComponent &&
|
|
656
|
-
showDeleteColumn &&
|
|
657
|
-
onDelete
|
|
658
|
-
? 90
|
|
659
|
-
: 80
|
|
660
|
-
}
|
|
661
|
-
>
|
|
662
|
-
Actions
|
|
663
|
-
</TableHeaderCell>
|
|
664
|
-
) : null}
|
|
665
|
-
{rowSubComponent && !editRowEnabled && (
|
|
666
|
-
<TableHeaderCell role="columnheader" noPadding size={40} />
|
|
667
|
-
)}
|
|
668
|
-
</Row>
|
|
669
|
-
))}
|
|
670
|
-
</TableHeaderSection>
|
|
671
|
-
<TableBody
|
|
672
|
-
role="rowgroup"
|
|
673
|
-
{...getTableBodyProps()}
|
|
674
|
-
xOverflow={xOverflow}
|
|
675
|
-
>
|
|
676
|
-
{[
|
|
677
|
-
...(noPagination ? rows : page),
|
|
678
|
-
...(transformedFooterRow ? [transformedFooterRow] : []),
|
|
679
|
-
].map((row, rowIdx) => {
|
|
680
|
-
const {
|
|
681
|
-
original: {
|
|
682
|
-
_noSelect,
|
|
683
|
-
_customRowColor,
|
|
684
|
-
_id,
|
|
685
|
-
_isFooter,
|
|
686
|
-
_onClick,
|
|
687
|
-
CustomNoSelect,
|
|
688
|
-
},
|
|
689
|
-
} = row;
|
|
690
|
-
return (
|
|
691
|
-
prepareRow(row) || (
|
|
692
|
-
<Fragment key={`row-${rowIdx}`}>
|
|
693
|
-
<Row
|
|
694
|
-
role="row"
|
|
695
|
-
bordered={bordered}
|
|
696
|
-
rowSpacing={rowSpacing}
|
|
697
|
-
selected={selected[row.original._id]}
|
|
698
|
-
selectHighlight={selectHighlight}
|
|
699
|
-
rowColor={_isFooter ? undefined : _customRowColor}
|
|
700
|
-
isFooter={_isFooter}
|
|
701
|
-
xOverflow={xOverflow}
|
|
702
|
-
{...row.getRowProps()}
|
|
703
|
-
>
|
|
704
|
-
{sortableRows && (
|
|
705
|
-
<SortCell role="cell" size={25}>
|
|
706
|
-
<SortButton
|
|
707
|
-
action="increment"
|
|
708
|
-
onSort={onSort ? onSort : handleSortGeneric}
|
|
709
|
-
row={row}
|
|
710
|
-
rowSpacing={rowSpacing}
|
|
711
|
-
/>
|
|
712
|
-
<SortButton
|
|
713
|
-
action="decrement"
|
|
714
|
-
onSort={onSort ? onSort : handleSortGeneric}
|
|
715
|
-
row={row}
|
|
716
|
-
rowSpacing={rowSpacing}
|
|
717
|
-
/>
|
|
718
|
-
</SortCell>
|
|
719
|
-
)}
|
|
720
|
-
{onSelectionChange && (
|
|
721
|
-
<Cell
|
|
722
|
-
role="cell"
|
|
723
|
-
rowSpacing={rowSpacing}
|
|
724
|
-
checkbox
|
|
725
|
-
size={50}
|
|
726
|
-
>
|
|
727
|
-
{CustomNoSelect && _noSelect ? (
|
|
728
|
-
<CustomNoSelect />
|
|
729
|
-
) : (
|
|
730
|
-
<Checkbox
|
|
731
|
-
{...checkboxProps}
|
|
732
|
-
hideLabel
|
|
733
|
-
checked={selected[_id]}
|
|
734
|
-
disabled={_noSelect}
|
|
735
|
-
onChange={() => handleOnSelectionChange(row)}
|
|
736
|
-
>
|
|
737
|
-
{locales["select"] || "Select"}
|
|
738
|
-
</Checkbox>
|
|
739
|
-
)}
|
|
740
|
-
</Cell>
|
|
741
|
-
)}
|
|
742
|
-
{row.cells.map((cell, cellIdx) => {
|
|
743
|
-
const cellSize = isFirstCell(
|
|
744
|
-
cell.column.size,
|
|
745
|
-
cellIdx,
|
|
746
|
-
xOverflow
|
|
747
|
-
);
|
|
748
|
-
const lastCell = isLastCell(
|
|
749
|
-
row.cells.length,
|
|
750
|
-
cellIdx,
|
|
751
|
-
xOverflow
|
|
752
|
-
);
|
|
753
|
-
return (
|
|
754
|
-
<Cell
|
|
755
|
-
role="cell"
|
|
756
|
-
onClick={_onClick}
|
|
757
|
-
key={cell.value}
|
|
758
|
-
enableFlex={!xOverflow}
|
|
759
|
-
stickyCell={cellIdx === 0 && xOverflow}
|
|
760
|
-
stickyCellNext={cellIdx === 1 && xOverflow}
|
|
761
|
-
xOverflow={xOverflow}
|
|
762
|
-
size={cellSize}
|
|
763
|
-
lastCell={lastCell}
|
|
764
|
-
isNumber={cell.column.isNumber}
|
|
765
|
-
xOverflowBg={xOverflowBg}
|
|
766
|
-
ellipsisOverflow={["string", "number"].includes(
|
|
767
|
-
typeof cell.value
|
|
768
|
-
)}
|
|
769
|
-
{...cell.getCellProps()}
|
|
770
|
-
>
|
|
771
|
-
{cell.value || cell.column.isNumber
|
|
772
|
-
? cell.render(_isFooter ? "Footer" : "Cell")
|
|
773
|
-
: ""}
|
|
774
|
-
</Cell>
|
|
775
|
-
);
|
|
776
|
-
})}
|
|
777
|
-
{(editRowEnabled || (showDeleteColumn && onDelete)) && (
|
|
778
|
-
<ButtonsRowContainer
|
|
779
|
-
size={
|
|
780
|
-
editRowEnabled && showDeleteColumn && onDelete
|
|
781
|
-
? 90
|
|
782
|
-
: 80
|
|
783
|
-
}
|
|
784
|
-
>
|
|
785
|
-
{!_noSelect && showDeleteColumn && onDelete ? (
|
|
786
|
-
<ActionButtons
|
|
787
|
-
locales={locales}
|
|
788
|
-
onDelete={onDelete}
|
|
789
|
-
disabled={_noSelect}
|
|
790
|
-
row={row}
|
|
791
|
-
customOnEdit={customOnEdit}
|
|
792
|
-
hoverColor={iconButtonsHoverColor}
|
|
793
|
-
activeColor={iconButtonsActiveColor}
|
|
794
|
-
editButtonProps={
|
|
795
|
-
editRowEnabled &&
|
|
796
|
-
row.getToggleRowExpandedProps()
|
|
797
|
-
}
|
|
798
|
-
/>
|
|
799
|
-
) : (
|
|
800
|
-
!_noSelect &&
|
|
801
|
-
editRowEnabled && (
|
|
802
|
-
<EditButton
|
|
803
|
-
title={locales["edit"] || "Edit"}
|
|
804
|
-
row={row}
|
|
805
|
-
customOnEdit={customOnEdit}
|
|
806
|
-
{...row.getToggleRowExpandedProps()}
|
|
807
|
-
/>
|
|
808
|
-
)
|
|
809
|
-
)}
|
|
810
|
-
</ButtonsRowContainer>
|
|
811
|
-
)}
|
|
812
|
-
{rowSubComponent && !editRowEnabled && (
|
|
813
|
-
<Cell
|
|
814
|
-
role="cell"
|
|
815
|
-
noPadding
|
|
816
|
-
size={40}
|
|
817
|
-
{...row.getToggleRowExpandedProps()}
|
|
818
|
-
>
|
|
819
|
-
<ExpandIcon expanded={row.isExpanded || undefined} />
|
|
820
|
-
</Cell>
|
|
821
|
-
)}
|
|
822
|
-
</Row>
|
|
823
|
-
{row.isExpanded ? (
|
|
824
|
-
<div>{rowSubComponent({ row })}</div>
|
|
825
|
-
) : null}
|
|
826
|
-
</Fragment>
|
|
827
|
-
)
|
|
828
|
-
);
|
|
829
|
-
})}
|
|
830
|
-
<BlankRows
|
|
831
|
-
onDelete={onDelete}
|
|
832
|
-
showDeleteColumn={showDeleteColumn}
|
|
833
|
-
onSelectionChange={onSelectionChange}
|
|
834
|
-
staticPageSize={staticPageSize}
|
|
835
|
-
noPagination={noPagination}
|
|
836
|
-
rows={rows}
|
|
837
|
-
page={page}
|
|
838
|
-
bordered={bordered}
|
|
839
|
-
headerGroups={headerGroups}
|
|
840
|
-
editRowEnabled={editRowEnabled}
|
|
841
|
-
rowSubComponent={rowSubComponent}
|
|
842
|
-
/>
|
|
843
|
-
</TableBody>
|
|
844
|
-
</TableContent>
|
|
845
|
-
</StyledTable>
|
|
846
|
-
{!noPagination && (
|
|
847
|
-
<Pagination
|
|
848
|
-
totalEntries={rows.length}
|
|
849
|
-
gotoPage={gotoPage}
|
|
850
|
-
nextPage={() => {
|
|
851
|
-
onNextPage(pageIndex + 1);
|
|
852
|
-
nextPage();
|
|
853
|
-
}}
|
|
854
|
-
previousPage={() => {
|
|
855
|
-
onPreviousPage(pageIndex - 1);
|
|
856
|
-
previousPage();
|
|
857
|
-
}}
|
|
858
|
-
pageCount={pageOptions.length}
|
|
859
|
-
staticPageSize={staticPageSize}
|
|
860
|
-
setPageSize={setPageSize}
|
|
861
|
-
pageSize={pageSize}
|
|
862
|
-
pageIndex={pageIndex}
|
|
863
|
-
canNextPage={canNextPage}
|
|
864
|
-
color={color}
|
|
865
|
-
canPreviousPage={canPreviousPage}
|
|
866
|
-
pageSizeOptions={[10, 20, 30, 40, 50]}
|
|
867
|
-
locales={locales}
|
|
868
|
-
/>
|
|
869
|
-
)}
|
|
870
|
-
</Container>
|
|
871
|
-
);
|
|
872
|
-
};
|