norma-library 0.6.2 → 0.6.4
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/.babelrc.json +18 -18
- package/.prettierignore +10 -10
- package/.prettierrc.json +20 -20
- package/.storybook/main.ts +20 -20
- package/.storybook/preview.ts +15 -15
- package/README.md +43 -43
- package/commitlint.config.js +1 -1
- package/dist/esm/components/UncontrolledTable/components/header/index.js +3 -1
- package/dist/esm/components/UncontrolledTable/components/header/index.js.map +1 -1
- package/dist/esm/components/UncontrolledTable/components/header/styles.js +1 -1
- package/dist/esm/components/UncontrolledTable/components/header/styles.js.map +1 -1
- package/dist/esm/components/UncontrolledTable/index.js +1 -1
- package/dist/esm/components/UncontrolledTable/index.js.map +1 -1
- package/dist/esm/components/UncontrolledTable/interface.d.ts +2 -0
- package/docs/index.md +118 -118
- package/package.json +136 -136
- package/src/components/Accordion.tsx +39 -39
- package/src/components/Avatar.tsx +17 -17
- package/src/components/Badge.tsx +14 -14
- package/src/components/Box/index.tsx +12 -12
- package/src/components/Box/interfaces.ts +3 -3
- package/src/components/Box/styles.tsx +22 -22
- package/src/components/Breadcrumb/index.tsx +27 -27
- package/src/components/Breadcrumb/interface.ts +8 -8
- package/src/components/Breadcrumb/styles.tsx +32 -32
- package/src/components/Button.tsx +26 -26
- package/src/components/Card.tsx +37 -37
- package/src/components/ChatMessage.tsx +87 -87
- package/src/components/ChatMessageBalloon/ChatMessageBalloon.style.ts +56 -56
- package/src/components/ChatMessageBalloon/ChatMessageBalloon.tsx +55 -55
- package/src/components/CheckBox.tsx +21 -21
- package/src/components/DateInput/index.tsx +34 -34
- package/src/components/DateInput/interface.ts +13 -13
- package/src/components/DateInput/styles.tsx +27 -27
- package/src/components/DatePicker.tsx +67 -67
- package/src/components/DropDown.tsx +24 -24
- package/src/components/IconButton.tsx +37 -37
- package/src/components/Icons.tsx +82 -82
- package/src/components/Modal.tsx +103 -103
- package/src/components/MultiSelectInput/components/MultiValue/index.tsx +44 -44
- package/src/components/MultiSelectInput/components/Option/index.tsx +62 -62
- package/src/components/MultiSelectInput/components/Option/styles.tsx +8 -8
- package/src/components/MultiSelectInput/index.tsx +60 -60
- package/src/components/MultiSelectInput/interfaces.ts +15 -15
- package/src/components/MultiSelectInput/styles.tsx +43 -43
- package/src/components/Paper.tsx +12 -12
- package/src/components/ProgressBar.tsx +71 -71
- package/src/components/RadioGroup.tsx +43 -43
- package/src/components/RangerSlider.tsx +65 -65
- package/src/components/Select.tsx +74 -74
- package/src/components/SelectInput/components/Option/index.tsx +61 -61
- package/src/components/SelectInput/components/Option/styles.tsx +8 -8
- package/src/components/SelectInput/index.tsx +45 -45
- package/src/components/SelectInput/interfaces.ts +15 -15
- package/src/components/SelectInput/styles.tsx +31 -31
- package/src/components/StatusModal/StatusModal.style.tsx +75 -75
- package/src/components/StatusModal/StatusModal.tsx +58 -58
- package/src/components/Svgs.tsx +506 -506
- package/src/components/Table/components/header/index.tsx +86 -86
- package/src/components/Table/components/header/styles.tsx +59 -59
- package/src/components/Table/components/index.tsx +8 -8
- package/src/components/Table/components/pagination/index.tsx +39 -39
- package/src/components/Table/components/pagination/styles.tsx +28 -28
- package/src/components/Table/components/tbody/index.tsx +30 -30
- package/src/components/Table/components/tbody/styles.tsx +4 -4
- package/src/components/Table/index.tsx +317 -317
- package/src/components/Table/interface.ts +23 -23
- package/src/components/Table/styles.tsx +117 -117
- package/src/components/Tabs.tsx +105 -105
- package/src/components/Tag.tsx +33 -33
- package/src/components/TextField.tsx +19 -19
- package/src/components/TextInput/index.tsx +37 -37
- package/src/components/TextInput/interface.ts +9 -9
- package/src/components/TextInput/styles.tsx +23 -23
- package/src/components/TimeLine.tsx +89 -89
- package/src/components/TimePicker.tsx +78 -78
- package/src/components/Typography/Text/index.tsx +20 -20
- package/src/components/Typography/Text/interfaces.ts +5 -5
- package/src/components/Typography/Text/styles.tsx +40 -40
- package/src/components/Typography/Title/index.tsx +22 -22
- package/src/components/Typography/Title/interfaces.ts +6 -6
- package/src/components/Typography/Title/styles.tsx +40 -40
- package/src/components/Typography/index.tsx +6 -6
- package/src/components/UncontrolledTable/components/header/index.tsx +72 -65
- package/src/components/UncontrolledTable/components/header/styles.tsx +65 -63
- package/src/components/UncontrolledTable/components/index.tsx +8 -8
- package/src/components/UncontrolledTable/components/pagination/index.tsx +43 -43
- package/src/components/UncontrolledTable/components/pagination/styles.tsx +28 -28
- package/src/components/UncontrolledTable/components/tbody/index.tsx +33 -33
- package/src/components/UncontrolledTable/components/tbody/styles.tsx +32 -32
- package/src/components/UncontrolledTable/index.tsx +222 -221
- package/src/components/UncontrolledTable/interface.ts +44 -43
- package/src/components/UncontrolledTable/styles.tsx +123 -123
- package/src/components/UncontrolledTabs/UncontrolledTabs.style.tsx +56 -56
- package/src/components/UncontrolledTabs/UncontrolledTabs.tsx +68 -68
- package/src/components/index.ts +24 -24
- package/src/helpers/alignments.ts +14 -14
- package/src/helpers/borders.ts +18 -18
- package/src/helpers/colors.ts +258 -258
- package/src/helpers/index.ts +5 -5
- package/src/helpers/radios.ts +24 -24
- package/src/helpers/sizes.ts +72 -72
- package/src/hooks/useClickOutside.tsx +18 -18
- package/src/index.ts +70 -70
- package/src/interfaces/Accordion.ts +12 -12
- package/src/interfaces/Avatar.tsx +15 -15
- package/src/interfaces/Badge.ts +19 -19
- package/src/interfaces/Button.ts +22 -22
- package/src/interfaces/Card.ts +11 -11
- package/src/interfaces/ChatMessage.ts +12 -12
- package/src/interfaces/ChatMessageBalloon.ts +17 -17
- package/src/interfaces/CheckBox.ts +27 -27
- package/src/interfaces/DatePicker.ts +13 -13
- package/src/interfaces/DropDown.ts +14 -14
- package/src/interfaces/IconButton.ts +22 -22
- package/src/interfaces/Icons.ts +17 -17
- package/src/interfaces/Modal.ts +18 -18
- package/src/interfaces/Paper.ts +12 -12
- package/src/interfaces/ProgressBar.ts +29 -29
- package/src/interfaces/RadioGroup.ts +23 -23
- package/src/interfaces/RangerSlider.ts +21 -21
- package/src/interfaces/Select.ts +17 -17
- package/src/interfaces/Tabs.ts +19 -19
- package/src/interfaces/Tag.ts +17 -17
- package/src/interfaces/TextField.ts +44 -44
- package/src/interfaces/TimeLine.ts +11 -11
- package/src/interfaces/TimePicker.ts +13 -13
- package/src/interfaces/index.ts +23 -23
- package/src/providers/NormaProvider.tsx +13 -13
- package/src/sample-data-2.json +178 -178
- package/src/sample-data.json +177 -177
- package/src/stories/Accordion.stories.tsx +65 -65
- package/src/stories/Avatar.stories.tsx +123 -123
- package/src/stories/Badge.stories.tsx +39 -39
- package/src/stories/Box.stories.tsx +35 -35
- package/src/stories/Breadcrumb.stories.tsx +44 -44
- package/src/stories/Button.stories.tsx +93 -93
- package/src/stories/Card.stories.tsx +39 -39
- package/src/stories/ChatMessage.stories.tsx +84 -84
- package/src/stories/ChatMessageBalloon.stories.tsx +108 -108
- package/src/stories/CheckBox.stories.tsx +88 -88
- package/src/stories/DateInput.stories.tsx +51 -51
- package/src/stories/DatePicker.stories.tsx +50 -50
- package/src/stories/DropDown.stories.tsx +57 -57
- package/src/stories/IconButton.stories.tsx +78 -78
- package/src/stories/Modal.stories.tsx +246 -246
- package/src/stories/ModalStatus.stories.tsx +46 -46
- package/src/stories/MultiSelectInput.stories.tsx +90 -90
- package/src/stories/Paper.stories.tsx +53 -53
- package/src/stories/ProgressBar.stories.tsx +116 -116
- package/src/stories/RadioGroup.stories.tsx +87 -87
- package/src/stories/RangerSlider.stories.tsx +149 -149
- package/src/stories/Select.stories.tsx +100 -100
- package/src/stories/SelectInput.stories.tsx +78 -78
- package/src/stories/Table.stories.tsx +372 -372
- package/src/stories/Tabs.stories.tsx +61 -61
- package/src/stories/Tag.stories.tsx +56 -56
- package/src/stories/Text.stories.tsx +37 -37
- package/src/stories/TextField.stories.tsx +310 -310
- package/src/stories/TextInput.stories.tsx +52 -52
- package/src/stories/TimeLine.stories.tsx +35 -35
- package/src/stories/TimePicker.stories.tsx +87 -87
- package/src/stories/Title.stories.tsx +43 -43
- package/src/stories/UncontrolledTable.stories.tsx +315 -305
- package/src/stories/UncontrolledTabs.stories.tsx +63 -63
- package/src/styles/globals.scss +17 -17
- package/src/types/index.ts +207 -207
- package/src/utils/styledBreakpoints.ts +25 -25
- package/vite.config.ts +15 -15
|
@@ -1,318 +1,318 @@
|
|
|
1
|
-
import React, { useState, useMemo } from 'react'
|
|
2
|
-
import * as S from "./styles"
|
|
3
|
-
import {
|
|
4
|
-
flexRender,
|
|
5
|
-
getCoreRowModel,
|
|
6
|
-
getSortedRowModel,
|
|
7
|
-
useReactTable,
|
|
8
|
-
getFilteredRowModel,
|
|
9
|
-
ColumnFiltersState,
|
|
10
|
-
getPaginationRowModel
|
|
11
|
-
} from '@tanstack/react-table'
|
|
12
|
-
import { format, isAfter, isBefore } from "date-fns"
|
|
13
|
-
import { Button } from "@mui/material";
|
|
14
|
-
import { TablePropos } from './interface';
|
|
15
|
-
import { Pagination, Header, TBody } from "./components"
|
|
16
|
-
|
|
17
|
-
const Table:React.FC<TablePropos> = ({ data, columns, onClick, onMouseOver, onMouseOut, showTotalResults, showSettings, pagination, rowCount, onChangePage, customTotalResult }) => {
|
|
18
|
-
const [openFilterDialog, setOpenFilterDialog] = useState('')
|
|
19
|
-
const [sorting, setSorting] = useState<any>([])
|
|
20
|
-
const [openFilterOptions, setOpenFilterOptions] = useState(false)
|
|
21
|
-
const [filterByColumn, setFilterByColumn] = useState<ColumnFiltersState>([])
|
|
22
|
-
const [filterInputSelected, setFilterInputSelected] = useState<any>()
|
|
23
|
-
const [globalFilters, setGlobalFilters] = useState<any>([])
|
|
24
|
-
const [value, setValue] = useState<any>()
|
|
25
|
-
const [orderSmallest, setOrderSmallest] = useState(false)
|
|
26
|
-
const [orderLargest, setOrderLargest] = useState(false)
|
|
27
|
-
|
|
28
|
-
const customFilterText = (row: any, value: string) => {
|
|
29
|
-
const itensFinded = globalFilters.map((item: any) => {
|
|
30
|
-
if (item.type === 'Horario Igual a') {
|
|
31
|
-
return item.value === row.original[item.acessor]
|
|
32
|
-
}
|
|
33
|
-
if (item.type === 'Horario maior que') {
|
|
34
|
-
const date = new Date()
|
|
35
|
-
const rowDate = new Date()
|
|
36
|
-
const hourSplited = item?.value?.split(':')
|
|
37
|
-
const rowDateSplited = row.original[item.acessor].split(':')
|
|
38
|
-
|
|
39
|
-
date.setHours(Number(hourSplited[0]), Number(hourSplited[1]), 0, 0)
|
|
40
|
-
rowDate.setHours(Number(rowDateSplited[0]), Number(rowDateSplited[1]), 0 ,0)
|
|
41
|
-
|
|
42
|
-
return isAfter(rowDate, date)
|
|
43
|
-
}
|
|
44
|
-
if (item.type === 'Horario menor que') {
|
|
45
|
-
const date = new Date()
|
|
46
|
-
const rowDate = new Date()
|
|
47
|
-
const hourSplited = item?.value?.split(':')
|
|
48
|
-
const rowDateSplited = row.original[item.acessor].split(':')
|
|
49
|
-
|
|
50
|
-
date.setHours(Number(hourSplited[0]), Number(hourSplited[1]), 0, 0)
|
|
51
|
-
rowDate.setHours(Number(rowDateSplited[0]), Number(rowDateSplited[1]), 0 ,0)
|
|
52
|
-
|
|
53
|
-
return isBefore(rowDate, date)
|
|
54
|
-
}
|
|
55
|
-
if (item.type === 'Data Igual a') {
|
|
56
|
-
const dateSplited = item?.value?.split('-')
|
|
57
|
-
return row.original[item.acessor] === format(new Date(dateSplited[0], dateSplited[1] - 1, dateSplited[2], 0 , 0), "dd/MM/yyyy")
|
|
58
|
-
}
|
|
59
|
-
if (item.type === 'Data maior que') {
|
|
60
|
-
const dateSplited = item?.value?.split('-')
|
|
61
|
-
const rowDateSplited = row.original[item.acessor].split('/')
|
|
62
|
-
return isAfter(new Date(rowDateSplited[2], rowDateSplited[1], rowDateSplited[0]), new Date(dateSplited[0], dateSplited[1], dateSplited[2]))
|
|
63
|
-
}
|
|
64
|
-
if (item.type === 'Data menor que') {
|
|
65
|
-
const dateSplited = item?.value?.split('-')
|
|
66
|
-
const rowDateSplited = row.original[item.acessor].split('/')
|
|
67
|
-
return isBefore(new Date(rowDateSplited[2], rowDateSplited[1], rowDateSplited[0]), new Date(dateSplited[0], dateSplited[1], dateSplited[2]))
|
|
68
|
-
}
|
|
69
|
-
if (item.type === 'Igual a' && typeof value === 'number') {
|
|
70
|
-
return row.original[item.acessor] === item.value
|
|
71
|
-
}
|
|
72
|
-
if (item.type === 'Igual a') {
|
|
73
|
-
return row.original[item.acessor] === item.value
|
|
74
|
-
}
|
|
75
|
-
if (item.type === 'Contém') {
|
|
76
|
-
return !!row.original[item.acessor].includes(item.value)
|
|
77
|
-
}
|
|
78
|
-
if (item.type === 'Não é igual a') {
|
|
79
|
-
return row.original[item.acessor] !== item.value
|
|
80
|
-
}
|
|
81
|
-
if (item.type === 'Maior que') {
|
|
82
|
-
return row.original[item.acessor] > item.value
|
|
83
|
-
}
|
|
84
|
-
if (item.type === 'Menor que') {
|
|
85
|
-
return row.original[item.acessor] < item.value
|
|
86
|
-
}
|
|
87
|
-
})
|
|
88
|
-
|
|
89
|
-
const result = itensFinded.every((item: any) => item)
|
|
90
|
-
|
|
91
|
-
return result
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
const reactTableConfig = useMemo(() => {
|
|
95
|
-
const config:any = {
|
|
96
|
-
data,
|
|
97
|
-
columns,
|
|
98
|
-
filterFns:{
|
|
99
|
-
'customFilterText': customFilterText
|
|
100
|
-
},
|
|
101
|
-
state: {
|
|
102
|
-
sorting: sorting,
|
|
103
|
-
columnFilters: filterByColumn,
|
|
104
|
-
},
|
|
105
|
-
rowCount: rowCount || 10,
|
|
106
|
-
getCoreRowModel: getCoreRowModel(),
|
|
107
|
-
getSortedRowModel: getSortedRowModel(),
|
|
108
|
-
getFilteredRowModel: getFilteredRowModel(),
|
|
109
|
-
onSortingChange: setSorting,
|
|
110
|
-
onColumnFiltersChange: setFilterByColumn
|
|
111
|
-
}
|
|
112
|
-
config.rowCount = rowCount || 10
|
|
113
|
-
|
|
114
|
-
if(!pagination) {
|
|
115
|
-
config.getPaginationRowModel = getPaginationRowModel()
|
|
116
|
-
} else {
|
|
117
|
-
config.state.pagination = pagination
|
|
118
|
-
config.manualPagination = true
|
|
119
|
-
config.pageCount = pagination.totalPages
|
|
120
|
-
}
|
|
121
|
-
return config
|
|
122
|
-
}, [data, sorting, filterByColumn, columns, pagination])
|
|
123
|
-
|
|
124
|
-
const table = useReactTable(reactTableConfig)
|
|
125
|
-
|
|
126
|
-
return (
|
|
127
|
-
<S.Container>
|
|
128
|
-
<Header
|
|
129
|
-
table={table}
|
|
130
|
-
customTotalResult={customTotalResult}
|
|
131
|
-
globalFilters={globalFilters}
|
|
132
|
-
orderSmallest={orderSmallest}
|
|
133
|
-
orderLargest={orderLargest}
|
|
134
|
-
showTotalResults={showTotalResults}
|
|
135
|
-
showSettings={showSettings}
|
|
136
|
-
setGlobalFilters={setGlobalFilters}
|
|
137
|
-
setOrderLargest={setOrderLargest}
|
|
138
|
-
setOrderSmallest={setOrderSmallest}
|
|
139
|
-
/>
|
|
140
|
-
<S.Content>
|
|
141
|
-
<S.Table>
|
|
142
|
-
<thead>
|
|
143
|
-
{table.getHeaderGroups().map((headerGroup: any) => (
|
|
144
|
-
<tr key={headerGroup.id}>
|
|
145
|
-
{headerGroup.headers.map((header: any) => (
|
|
146
|
-
<th key={header.id}>
|
|
147
|
-
<div>
|
|
148
|
-
<S.ColumnContent>
|
|
149
|
-
<S.TextColumn>
|
|
150
|
-
{header.isPlaceholder
|
|
151
|
-
? null
|
|
152
|
-
: flexRender(
|
|
153
|
-
header.column.columnDef.header,
|
|
154
|
-
header.getContext()
|
|
155
|
-
)}
|
|
156
|
-
</S.TextColumn>
|
|
157
|
-
<S.IconFilterDialog onClick={() => {
|
|
158
|
-
setOpenFilterDialog(header.column.columnDef.accessorKey)
|
|
159
|
-
}}>
|
|
160
|
-
<svg fill='#666' focusable="false" aria-hidden="true" viewBox="0 0 24 24" data-testid="ArrowDropDownIcon"><path d="m7 10 5 5 5-5z"></path></svg>
|
|
161
|
-
</S.IconFilterDialog>
|
|
162
|
-
</S.ColumnContent>
|
|
163
|
-
{ openFilterDialog === header.column.columnDef.accessorKey
|
|
164
|
-
? (
|
|
165
|
-
<>
|
|
166
|
-
<S.backgroundDialog onClick={() => {
|
|
167
|
-
setOpenFilterDialog('')
|
|
168
|
-
setOpenFilterOptions(false)
|
|
169
|
-
}}></S.backgroundDialog>
|
|
170
|
-
<S.FilterDialog>
|
|
171
|
-
{
|
|
172
|
-
openFilterOptions
|
|
173
|
-
? (
|
|
174
|
-
<S.ListFilterDialog>
|
|
175
|
-
<p className='label'>Selecione um filtro</p>
|
|
176
|
-
<select className='select' value={filterInputSelected} onChange={(event) => {
|
|
177
|
-
setFilterInputSelected(event.target.value)
|
|
178
|
-
}}>
|
|
179
|
-
<option>Selecione...</option>
|
|
180
|
-
{ header?.headerGroup?.headers[header.index].column.columnDef.type === 'text' ? <option>Igual a</option> : null }
|
|
181
|
-
{ header?.headerGroup?.headers[header.index].column.columnDef.type === 'text' ? <option>Não é igual a</option> : null }
|
|
182
|
-
{ header?.headerGroup?.headers[header.index].column.columnDef.type === 'text' ? <option>Contém</option> : null }
|
|
183
|
-
{ header?.headerGroup?.headers[header.index].column.columnDef.type === 'number' ? <option>Maior que</option> : null }
|
|
184
|
-
{ header?.headerGroup?.headers[header.index].column.columnDef.type === 'number' ? <option>Menor que</option> : null }
|
|
185
|
-
{ header?.headerGroup?.headers[header.index].column.columnDef.type === 'number' ? <option>Igual a</option> : null }
|
|
186
|
-
{ header?.headerGroup?.headers[header.index]. column.columnDef.type === 'date' ? <option>Data Igual a</option> : null }
|
|
187
|
-
{ header?.headerGroup?.headers[header.index]. column.columnDef.type === 'date' ? <option>Data maior que</option> : null }
|
|
188
|
-
{ header?.headerGroup?.headers[header.index]. column.columnDef.type === 'date' ? <option>Data menor que</option> : null }
|
|
189
|
-
{ header?.headerGroup?.headers[header.index]. column.columnDef.type === 'time' ? <option>Horario Igual a</option> : null }
|
|
190
|
-
{ header?.headerGroup?.headers[header.index]. column.columnDef.type === 'time' ? <option>Horario maior que</option> : null }
|
|
191
|
-
{ header?.headerGroup?.headers[header.index]. column.columnDef.type === 'time' ? <option>Horario menor que</option> : null }
|
|
192
|
-
</select>
|
|
193
|
-
<div>
|
|
194
|
-
{ header.column.getCanFilter()
|
|
195
|
-
? filterInputSelected === 'Igual a' ||
|
|
196
|
-
filterInputSelected === 'Não é igual a' ||
|
|
197
|
-
filterInputSelected === 'Contém' ||
|
|
198
|
-
filterInputSelected === 'Maior que' ||
|
|
199
|
-
filterInputSelected === 'Menor que' ||
|
|
200
|
-
filterInputSelected === 'Data Igual a' ||
|
|
201
|
-
filterInputSelected === 'Data maior que' ||
|
|
202
|
-
filterInputSelected === 'Data menor que' ||
|
|
203
|
-
filterInputSelected === 'Horario Igual a' ||
|
|
204
|
-
filterInputSelected === 'Horario maior que' ||
|
|
205
|
-
filterInputSelected === 'Horario menor que'
|
|
206
|
-
? (
|
|
207
|
-
<div>
|
|
208
|
-
<p className='label' style={{ marginTop: '10px' }}>Valor</p>
|
|
209
|
-
<input
|
|
210
|
-
type={header?.headerGroup?.headers[header.index].column.columnDef.type}
|
|
211
|
-
className='select'
|
|
212
|
-
style={{ width: '100%' }}
|
|
213
|
-
value={value as any}
|
|
214
|
-
onChange={event => {
|
|
215
|
-
if (header?.headerGroup?.headers[header.index].column.columnDef.type === 'number') {
|
|
216
|
-
setValue(Number(event.target.value))
|
|
217
|
-
return
|
|
218
|
-
}
|
|
219
|
-
if (header?.headerGroup?.headers[header.index].column.columnDef.type === 'date') {
|
|
220
|
-
setValue(event.target.value)
|
|
221
|
-
return
|
|
222
|
-
}
|
|
223
|
-
setValue(event.target.value)
|
|
224
|
-
}}
|
|
225
|
-
/>
|
|
226
|
-
<Button
|
|
227
|
-
color="primary"
|
|
228
|
-
type={"submit"}
|
|
229
|
-
disableElevation
|
|
230
|
-
style={{
|
|
231
|
-
marginTop: 8,
|
|
232
|
-
width: '100%'
|
|
233
|
-
}}
|
|
234
|
-
variant="contained"
|
|
235
|
-
onClick={() => {
|
|
236
|
-
setGlobalFilters((current: any) => [...current,
|
|
237
|
-
{
|
|
238
|
-
acessor: header.column.columnDef.accessorKey,
|
|
239
|
-
type: filterInputSelected,
|
|
240
|
-
value: value
|
|
241
|
-
}
|
|
242
|
-
])
|
|
243
|
-
header.column.setFilterValue(value)
|
|
244
|
-
setOpenFilterOptions(false)
|
|
245
|
-
setOpenFilterDialog('')
|
|
246
|
-
setFilterInputSelected(false)
|
|
247
|
-
setValue(null)
|
|
248
|
-
}}
|
|
249
|
-
>
|
|
250
|
-
Buscar
|
|
251
|
-
</Button>
|
|
252
|
-
</div>
|
|
253
|
-
)
|
|
254
|
-
: null
|
|
255
|
-
: null
|
|
256
|
-
}
|
|
257
|
-
</div>
|
|
258
|
-
</S.ListFilterDialog>
|
|
259
|
-
)
|
|
260
|
-
: (
|
|
261
|
-
<S.ListFilterDialog>
|
|
262
|
-
<S.OptionFilterDialog style={{
|
|
263
|
-
background: orderSmallest ? 'rgba(0, 0, 0, 0.04)' : ''
|
|
264
|
-
}}>
|
|
265
|
-
<div className='icon'>
|
|
266
|
-
<svg fill="#666" stroke="currentColor" strokeWidth="1.5" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="20" height="20"><path strokeLinecap="round" strokeLinejoin="round" d="M12 4.5v15m0 0l6.75-6.75M12 19.5l-6.75-6.75"></path></svg>
|
|
267
|
-
</div>
|
|
268
|
-
<p onClick={() => {
|
|
269
|
-
header.column.toggleSorting()
|
|
270
|
-
setOrderSmallest(true)
|
|
271
|
-
setOrderLargest(false)
|
|
272
|
-
}}>Menor primeiro</p>
|
|
273
|
-
</S.OptionFilterDialog>
|
|
274
|
-
<S.OptionFilterDialog style={{
|
|
275
|
-
background: orderLargest ? 'rgba(0, 0, 0, 0.04)' : ''
|
|
276
|
-
}}>
|
|
277
|
-
<div className='icon rotate'>
|
|
278
|
-
<svg fill="#666" stroke="currentColor" strokeWidth="1.5" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="20" height="20"><path strokeLinecap="round" strokeLinejoin="round" d="M12 4.5v15m0 0l6.75-6.75M12 19.5l-6.75-6.75"></path></svg>
|
|
279
|
-
</div>
|
|
280
|
-
<p onClick={() => {
|
|
281
|
-
header.column.toggleSorting()
|
|
282
|
-
setOrderLargest(true)
|
|
283
|
-
setOrderSmallest(false)
|
|
284
|
-
}}>Maior primeiro</p>
|
|
285
|
-
</S.OptionFilterDialog>
|
|
286
|
-
<S.OptionFilterDialog>
|
|
287
|
-
<div className='icon'>
|
|
288
|
-
<svg fill="none" stroke="currentColor" strokeWidth="1.5" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="16" height="16"><path strokeLinecap="round" strokeLinejoin="round" d="M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v1.044a2.25 2.25 0 01-.659 1.591l-5.432 5.432a2.25 2.25 0 00-.659 1.591v2.927a2.25 2.25 0 01-1.244 2.013L9.75 21v-6.568a2.25 2.25 0 00-.659-1.591L3.659 7.409A2.25 2.25 0 013 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32 0 0112 3z"></path></svg>
|
|
289
|
-
</div>
|
|
290
|
-
<p onClick={() => setOpenFilterOptions(true)}>Filtrar por</p>
|
|
291
|
-
</S.OptionFilterDialog>
|
|
292
|
-
</S.ListFilterDialog>
|
|
293
|
-
)
|
|
294
|
-
}
|
|
295
|
-
</S.FilterDialog>
|
|
296
|
-
</>
|
|
297
|
-
) : null
|
|
298
|
-
}
|
|
299
|
-
</div>
|
|
300
|
-
</th>
|
|
301
|
-
))}
|
|
302
|
-
</tr>
|
|
303
|
-
))}
|
|
304
|
-
</thead>
|
|
305
|
-
<TBody
|
|
306
|
-
table={table}
|
|
307
|
-
onClick={onClick}
|
|
308
|
-
onMouseOver={onMouseOver}
|
|
309
|
-
onMouseOut={onMouseOut}
|
|
310
|
-
/>
|
|
311
|
-
</S.Table>
|
|
312
|
-
</S.Content>
|
|
313
|
-
<Pagination table={table} onChangePage={onChangePage} />
|
|
314
|
-
</S.Container>
|
|
315
|
-
)
|
|
316
|
-
}
|
|
317
|
-
|
|
1
|
+
import React, { useState, useMemo } from 'react'
|
|
2
|
+
import * as S from "./styles"
|
|
3
|
+
import {
|
|
4
|
+
flexRender,
|
|
5
|
+
getCoreRowModel,
|
|
6
|
+
getSortedRowModel,
|
|
7
|
+
useReactTable,
|
|
8
|
+
getFilteredRowModel,
|
|
9
|
+
ColumnFiltersState,
|
|
10
|
+
getPaginationRowModel
|
|
11
|
+
} from '@tanstack/react-table'
|
|
12
|
+
import { format, isAfter, isBefore } from "date-fns"
|
|
13
|
+
import { Button } from "@mui/material";
|
|
14
|
+
import { TablePropos } from './interface';
|
|
15
|
+
import { Pagination, Header, TBody } from "./components"
|
|
16
|
+
|
|
17
|
+
const Table:React.FC<TablePropos> = ({ data, columns, onClick, onMouseOver, onMouseOut, showTotalResults, showSettings, pagination, rowCount, onChangePage, customTotalResult }) => {
|
|
18
|
+
const [openFilterDialog, setOpenFilterDialog] = useState('')
|
|
19
|
+
const [sorting, setSorting] = useState<any>([])
|
|
20
|
+
const [openFilterOptions, setOpenFilterOptions] = useState(false)
|
|
21
|
+
const [filterByColumn, setFilterByColumn] = useState<ColumnFiltersState>([])
|
|
22
|
+
const [filterInputSelected, setFilterInputSelected] = useState<any>()
|
|
23
|
+
const [globalFilters, setGlobalFilters] = useState<any>([])
|
|
24
|
+
const [value, setValue] = useState<any>()
|
|
25
|
+
const [orderSmallest, setOrderSmallest] = useState(false)
|
|
26
|
+
const [orderLargest, setOrderLargest] = useState(false)
|
|
27
|
+
|
|
28
|
+
const customFilterText = (row: any, value: string) => {
|
|
29
|
+
const itensFinded = globalFilters.map((item: any) => {
|
|
30
|
+
if (item.type === 'Horario Igual a') {
|
|
31
|
+
return item.value === row.original[item.acessor]
|
|
32
|
+
}
|
|
33
|
+
if (item.type === 'Horario maior que') {
|
|
34
|
+
const date = new Date()
|
|
35
|
+
const rowDate = new Date()
|
|
36
|
+
const hourSplited = item?.value?.split(':')
|
|
37
|
+
const rowDateSplited = row.original[item.acessor].split(':')
|
|
38
|
+
|
|
39
|
+
date.setHours(Number(hourSplited[0]), Number(hourSplited[1]), 0, 0)
|
|
40
|
+
rowDate.setHours(Number(rowDateSplited[0]), Number(rowDateSplited[1]), 0 ,0)
|
|
41
|
+
|
|
42
|
+
return isAfter(rowDate, date)
|
|
43
|
+
}
|
|
44
|
+
if (item.type === 'Horario menor que') {
|
|
45
|
+
const date = new Date()
|
|
46
|
+
const rowDate = new Date()
|
|
47
|
+
const hourSplited = item?.value?.split(':')
|
|
48
|
+
const rowDateSplited = row.original[item.acessor].split(':')
|
|
49
|
+
|
|
50
|
+
date.setHours(Number(hourSplited[0]), Number(hourSplited[1]), 0, 0)
|
|
51
|
+
rowDate.setHours(Number(rowDateSplited[0]), Number(rowDateSplited[1]), 0 ,0)
|
|
52
|
+
|
|
53
|
+
return isBefore(rowDate, date)
|
|
54
|
+
}
|
|
55
|
+
if (item.type === 'Data Igual a') {
|
|
56
|
+
const dateSplited = item?.value?.split('-')
|
|
57
|
+
return row.original[item.acessor] === format(new Date(dateSplited[0], dateSplited[1] - 1, dateSplited[2], 0 , 0), "dd/MM/yyyy")
|
|
58
|
+
}
|
|
59
|
+
if (item.type === 'Data maior que') {
|
|
60
|
+
const dateSplited = item?.value?.split('-')
|
|
61
|
+
const rowDateSplited = row.original[item.acessor].split('/')
|
|
62
|
+
return isAfter(new Date(rowDateSplited[2], rowDateSplited[1], rowDateSplited[0]), new Date(dateSplited[0], dateSplited[1], dateSplited[2]))
|
|
63
|
+
}
|
|
64
|
+
if (item.type === 'Data menor que') {
|
|
65
|
+
const dateSplited = item?.value?.split('-')
|
|
66
|
+
const rowDateSplited = row.original[item.acessor].split('/')
|
|
67
|
+
return isBefore(new Date(rowDateSplited[2], rowDateSplited[1], rowDateSplited[0]), new Date(dateSplited[0], dateSplited[1], dateSplited[2]))
|
|
68
|
+
}
|
|
69
|
+
if (item.type === 'Igual a' && typeof value === 'number') {
|
|
70
|
+
return row.original[item.acessor] === item.value
|
|
71
|
+
}
|
|
72
|
+
if (item.type === 'Igual a') {
|
|
73
|
+
return row.original[item.acessor] === item.value
|
|
74
|
+
}
|
|
75
|
+
if (item.type === 'Contém') {
|
|
76
|
+
return !!row.original[item.acessor].includes(item.value)
|
|
77
|
+
}
|
|
78
|
+
if (item.type === 'Não é igual a') {
|
|
79
|
+
return row.original[item.acessor] !== item.value
|
|
80
|
+
}
|
|
81
|
+
if (item.type === 'Maior que') {
|
|
82
|
+
return row.original[item.acessor] > item.value
|
|
83
|
+
}
|
|
84
|
+
if (item.type === 'Menor que') {
|
|
85
|
+
return row.original[item.acessor] < item.value
|
|
86
|
+
}
|
|
87
|
+
})
|
|
88
|
+
|
|
89
|
+
const result = itensFinded.every((item: any) => item)
|
|
90
|
+
|
|
91
|
+
return result
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const reactTableConfig = useMemo(() => {
|
|
95
|
+
const config:any = {
|
|
96
|
+
data,
|
|
97
|
+
columns,
|
|
98
|
+
filterFns:{
|
|
99
|
+
'customFilterText': customFilterText
|
|
100
|
+
},
|
|
101
|
+
state: {
|
|
102
|
+
sorting: sorting,
|
|
103
|
+
columnFilters: filterByColumn,
|
|
104
|
+
},
|
|
105
|
+
rowCount: rowCount || 10,
|
|
106
|
+
getCoreRowModel: getCoreRowModel(),
|
|
107
|
+
getSortedRowModel: getSortedRowModel(),
|
|
108
|
+
getFilteredRowModel: getFilteredRowModel(),
|
|
109
|
+
onSortingChange: setSorting,
|
|
110
|
+
onColumnFiltersChange: setFilterByColumn
|
|
111
|
+
}
|
|
112
|
+
config.rowCount = rowCount || 10
|
|
113
|
+
|
|
114
|
+
if(!pagination) {
|
|
115
|
+
config.getPaginationRowModel = getPaginationRowModel()
|
|
116
|
+
} else {
|
|
117
|
+
config.state.pagination = pagination
|
|
118
|
+
config.manualPagination = true
|
|
119
|
+
config.pageCount = pagination.totalPages
|
|
120
|
+
}
|
|
121
|
+
return config
|
|
122
|
+
}, [data, sorting, filterByColumn, columns, pagination])
|
|
123
|
+
|
|
124
|
+
const table = useReactTable(reactTableConfig)
|
|
125
|
+
|
|
126
|
+
return (
|
|
127
|
+
<S.Container>
|
|
128
|
+
<Header
|
|
129
|
+
table={table}
|
|
130
|
+
customTotalResult={customTotalResult}
|
|
131
|
+
globalFilters={globalFilters}
|
|
132
|
+
orderSmallest={orderSmallest}
|
|
133
|
+
orderLargest={orderLargest}
|
|
134
|
+
showTotalResults={showTotalResults}
|
|
135
|
+
showSettings={showSettings}
|
|
136
|
+
setGlobalFilters={setGlobalFilters}
|
|
137
|
+
setOrderLargest={setOrderLargest}
|
|
138
|
+
setOrderSmallest={setOrderSmallest}
|
|
139
|
+
/>
|
|
140
|
+
<S.Content>
|
|
141
|
+
<S.Table>
|
|
142
|
+
<thead>
|
|
143
|
+
{table.getHeaderGroups().map((headerGroup: any) => (
|
|
144
|
+
<tr key={headerGroup.id}>
|
|
145
|
+
{headerGroup.headers.map((header: any) => (
|
|
146
|
+
<th key={header.id}>
|
|
147
|
+
<div>
|
|
148
|
+
<S.ColumnContent>
|
|
149
|
+
<S.TextColumn>
|
|
150
|
+
{header.isPlaceholder
|
|
151
|
+
? null
|
|
152
|
+
: flexRender(
|
|
153
|
+
header.column.columnDef.header,
|
|
154
|
+
header.getContext()
|
|
155
|
+
)}
|
|
156
|
+
</S.TextColumn>
|
|
157
|
+
<S.IconFilterDialog onClick={() => {
|
|
158
|
+
setOpenFilterDialog(header.column.columnDef.accessorKey)
|
|
159
|
+
}}>
|
|
160
|
+
<svg fill='#666' focusable="false" aria-hidden="true" viewBox="0 0 24 24" data-testid="ArrowDropDownIcon"><path d="m7 10 5 5 5-5z"></path></svg>
|
|
161
|
+
</S.IconFilterDialog>
|
|
162
|
+
</S.ColumnContent>
|
|
163
|
+
{ openFilterDialog === header.column.columnDef.accessorKey
|
|
164
|
+
? (
|
|
165
|
+
<>
|
|
166
|
+
<S.backgroundDialog onClick={() => {
|
|
167
|
+
setOpenFilterDialog('')
|
|
168
|
+
setOpenFilterOptions(false)
|
|
169
|
+
}}></S.backgroundDialog>
|
|
170
|
+
<S.FilterDialog>
|
|
171
|
+
{
|
|
172
|
+
openFilterOptions
|
|
173
|
+
? (
|
|
174
|
+
<S.ListFilterDialog>
|
|
175
|
+
<p className='label'>Selecione um filtro</p>
|
|
176
|
+
<select className='select' value={filterInputSelected} onChange={(event) => {
|
|
177
|
+
setFilterInputSelected(event.target.value)
|
|
178
|
+
}}>
|
|
179
|
+
<option>Selecione...</option>
|
|
180
|
+
{ header?.headerGroup?.headers[header.index].column.columnDef.type === 'text' ? <option>Igual a</option> : null }
|
|
181
|
+
{ header?.headerGroup?.headers[header.index].column.columnDef.type === 'text' ? <option>Não é igual a</option> : null }
|
|
182
|
+
{ header?.headerGroup?.headers[header.index].column.columnDef.type === 'text' ? <option>Contém</option> : null }
|
|
183
|
+
{ header?.headerGroup?.headers[header.index].column.columnDef.type === 'number' ? <option>Maior que</option> : null }
|
|
184
|
+
{ header?.headerGroup?.headers[header.index].column.columnDef.type === 'number' ? <option>Menor que</option> : null }
|
|
185
|
+
{ header?.headerGroup?.headers[header.index].column.columnDef.type === 'number' ? <option>Igual a</option> : null }
|
|
186
|
+
{ header?.headerGroup?.headers[header.index]. column.columnDef.type === 'date' ? <option>Data Igual a</option> : null }
|
|
187
|
+
{ header?.headerGroup?.headers[header.index]. column.columnDef.type === 'date' ? <option>Data maior que</option> : null }
|
|
188
|
+
{ header?.headerGroup?.headers[header.index]. column.columnDef.type === 'date' ? <option>Data menor que</option> : null }
|
|
189
|
+
{ header?.headerGroup?.headers[header.index]. column.columnDef.type === 'time' ? <option>Horario Igual a</option> : null }
|
|
190
|
+
{ header?.headerGroup?.headers[header.index]. column.columnDef.type === 'time' ? <option>Horario maior que</option> : null }
|
|
191
|
+
{ header?.headerGroup?.headers[header.index]. column.columnDef.type === 'time' ? <option>Horario menor que</option> : null }
|
|
192
|
+
</select>
|
|
193
|
+
<div>
|
|
194
|
+
{ header.column.getCanFilter()
|
|
195
|
+
? filterInputSelected === 'Igual a' ||
|
|
196
|
+
filterInputSelected === 'Não é igual a' ||
|
|
197
|
+
filterInputSelected === 'Contém' ||
|
|
198
|
+
filterInputSelected === 'Maior que' ||
|
|
199
|
+
filterInputSelected === 'Menor que' ||
|
|
200
|
+
filterInputSelected === 'Data Igual a' ||
|
|
201
|
+
filterInputSelected === 'Data maior que' ||
|
|
202
|
+
filterInputSelected === 'Data menor que' ||
|
|
203
|
+
filterInputSelected === 'Horario Igual a' ||
|
|
204
|
+
filterInputSelected === 'Horario maior que' ||
|
|
205
|
+
filterInputSelected === 'Horario menor que'
|
|
206
|
+
? (
|
|
207
|
+
<div>
|
|
208
|
+
<p className='label' style={{ marginTop: '10px' }}>Valor</p>
|
|
209
|
+
<input
|
|
210
|
+
type={header?.headerGroup?.headers[header.index].column.columnDef.type}
|
|
211
|
+
className='select'
|
|
212
|
+
style={{ width: '100%' }}
|
|
213
|
+
value={value as any}
|
|
214
|
+
onChange={event => {
|
|
215
|
+
if (header?.headerGroup?.headers[header.index].column.columnDef.type === 'number') {
|
|
216
|
+
setValue(Number(event.target.value))
|
|
217
|
+
return
|
|
218
|
+
}
|
|
219
|
+
if (header?.headerGroup?.headers[header.index].column.columnDef.type === 'date') {
|
|
220
|
+
setValue(event.target.value)
|
|
221
|
+
return
|
|
222
|
+
}
|
|
223
|
+
setValue(event.target.value)
|
|
224
|
+
}}
|
|
225
|
+
/>
|
|
226
|
+
<Button
|
|
227
|
+
color="primary"
|
|
228
|
+
type={"submit"}
|
|
229
|
+
disableElevation
|
|
230
|
+
style={{
|
|
231
|
+
marginTop: 8,
|
|
232
|
+
width: '100%'
|
|
233
|
+
}}
|
|
234
|
+
variant="contained"
|
|
235
|
+
onClick={() => {
|
|
236
|
+
setGlobalFilters((current: any) => [...current,
|
|
237
|
+
{
|
|
238
|
+
acessor: header.column.columnDef.accessorKey,
|
|
239
|
+
type: filterInputSelected,
|
|
240
|
+
value: value
|
|
241
|
+
}
|
|
242
|
+
])
|
|
243
|
+
header.column.setFilterValue(value)
|
|
244
|
+
setOpenFilterOptions(false)
|
|
245
|
+
setOpenFilterDialog('')
|
|
246
|
+
setFilterInputSelected(false)
|
|
247
|
+
setValue(null)
|
|
248
|
+
}}
|
|
249
|
+
>
|
|
250
|
+
Buscar
|
|
251
|
+
</Button>
|
|
252
|
+
</div>
|
|
253
|
+
)
|
|
254
|
+
: null
|
|
255
|
+
: null
|
|
256
|
+
}
|
|
257
|
+
</div>
|
|
258
|
+
</S.ListFilterDialog>
|
|
259
|
+
)
|
|
260
|
+
: (
|
|
261
|
+
<S.ListFilterDialog>
|
|
262
|
+
<S.OptionFilterDialog style={{
|
|
263
|
+
background: orderSmallest ? 'rgba(0, 0, 0, 0.04)' : ''
|
|
264
|
+
}}>
|
|
265
|
+
<div className='icon'>
|
|
266
|
+
<svg fill="#666" stroke="currentColor" strokeWidth="1.5" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="20" height="20"><path strokeLinecap="round" strokeLinejoin="round" d="M12 4.5v15m0 0l6.75-6.75M12 19.5l-6.75-6.75"></path></svg>
|
|
267
|
+
</div>
|
|
268
|
+
<p onClick={() => {
|
|
269
|
+
header.column.toggleSorting()
|
|
270
|
+
setOrderSmallest(true)
|
|
271
|
+
setOrderLargest(false)
|
|
272
|
+
}}>Menor primeiro</p>
|
|
273
|
+
</S.OptionFilterDialog>
|
|
274
|
+
<S.OptionFilterDialog style={{
|
|
275
|
+
background: orderLargest ? 'rgba(0, 0, 0, 0.04)' : ''
|
|
276
|
+
}}>
|
|
277
|
+
<div className='icon rotate'>
|
|
278
|
+
<svg fill="#666" stroke="currentColor" strokeWidth="1.5" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="20" height="20"><path strokeLinecap="round" strokeLinejoin="round" d="M12 4.5v15m0 0l6.75-6.75M12 19.5l-6.75-6.75"></path></svg>
|
|
279
|
+
</div>
|
|
280
|
+
<p onClick={() => {
|
|
281
|
+
header.column.toggleSorting()
|
|
282
|
+
setOrderLargest(true)
|
|
283
|
+
setOrderSmallest(false)
|
|
284
|
+
}}>Maior primeiro</p>
|
|
285
|
+
</S.OptionFilterDialog>
|
|
286
|
+
<S.OptionFilterDialog>
|
|
287
|
+
<div className='icon'>
|
|
288
|
+
<svg fill="none" stroke="currentColor" strokeWidth="1.5" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="16" height="16"><path strokeLinecap="round" strokeLinejoin="round" d="M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v1.044a2.25 2.25 0 01-.659 1.591l-5.432 5.432a2.25 2.25 0 00-.659 1.591v2.927a2.25 2.25 0 01-1.244 2.013L9.75 21v-6.568a2.25 2.25 0 00-.659-1.591L3.659 7.409A2.25 2.25 0 013 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32 0 0112 3z"></path></svg>
|
|
289
|
+
</div>
|
|
290
|
+
<p onClick={() => setOpenFilterOptions(true)}>Filtrar por</p>
|
|
291
|
+
</S.OptionFilterDialog>
|
|
292
|
+
</S.ListFilterDialog>
|
|
293
|
+
)
|
|
294
|
+
}
|
|
295
|
+
</S.FilterDialog>
|
|
296
|
+
</>
|
|
297
|
+
) : null
|
|
298
|
+
}
|
|
299
|
+
</div>
|
|
300
|
+
</th>
|
|
301
|
+
))}
|
|
302
|
+
</tr>
|
|
303
|
+
))}
|
|
304
|
+
</thead>
|
|
305
|
+
<TBody
|
|
306
|
+
table={table}
|
|
307
|
+
onClick={onClick}
|
|
308
|
+
onMouseOver={onMouseOver}
|
|
309
|
+
onMouseOut={onMouseOut}
|
|
310
|
+
/>
|
|
311
|
+
</S.Table>
|
|
312
|
+
</S.Content>
|
|
313
|
+
<Pagination table={table} onChangePage={onChangePage} />
|
|
314
|
+
</S.Container>
|
|
315
|
+
)
|
|
316
|
+
}
|
|
317
|
+
|
|
318
318
|
export default Table
|