tp-react-elements 1.1.0 → 1.1.2
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/_virtual/index.esm12.js +2 -2
- package/dist/_virtual/index.esm13.js +2 -2
- package/dist/_virtual/index.esm14.js +2 -2
- package/dist/_virtual/index.esm4.js +2 -2
- package/dist/_virtual/index.esm5.js +2 -2
- package/dist/_virtual/index.esm6.js +2 -2
- package/dist/components/FormComponents/Select/MultiSelectTable.esm.js +62 -16
- package/dist/node_modules/react-date-range/dist/components/Calendar/index.esm.js +1 -1
- package/dist/node_modules/react-date-range/dist/components/DateInput/index.esm.js +1 -1
- package/dist/node_modules/react-date-range/dist/components/DateRange/index.esm.js +1 -1
- package/dist/node_modules/react-date-range/dist/components/DateRangePicker/index.esm.js +1 -1
- package/dist/node_modules/react-date-range/dist/components/InputRangeField/index.esm.js +1 -1
- package/dist/node_modules/react-date-range/dist/components/Month/index.esm.js +1 -1
- package/package.json +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Month = {};
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { Month as __exports };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
1
|
+
var DateInput = {};
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { DateInput as __exports };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
1
|
+
var InputRangeField = {};
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { InputRangeField as __exports };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
1
|
+
var DateRange = {};
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { DateRange as __exports };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
1
|
+
var DateRangePicker = {};
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { DateRangePicker as __exports };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Calendar = {};
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { Calendar as __exports };
|
|
@@ -19,9 +19,19 @@ const MultiSelectTable = ({ props, variant, }) => {
|
|
|
19
19
|
PaperProps: {
|
|
20
20
|
style: {
|
|
21
21
|
maxHeight: ITEM_HEIGHT * 8 + ITEM_PADDING_TOP,
|
|
22
|
-
|
|
22
|
+
width: '100%',
|
|
23
|
+
minWidth: '320px',
|
|
24
|
+
maxWidth: '500px',
|
|
23
25
|
},
|
|
24
26
|
},
|
|
27
|
+
anchorOrigin: {
|
|
28
|
+
vertical: 'bottom',
|
|
29
|
+
horizontal: 'left',
|
|
30
|
+
},
|
|
31
|
+
transformOrigin: {
|
|
32
|
+
vertical: 'top',
|
|
33
|
+
horizontal: 'left',
|
|
34
|
+
},
|
|
25
35
|
autoFocus: false,
|
|
26
36
|
disableAutoFocusItem: true,
|
|
27
37
|
};
|
|
@@ -125,7 +135,9 @@ const MultiSelectTable = ({ props, variant, }) => {
|
|
|
125
135
|
const selectColumn = {
|
|
126
136
|
id: 'select',
|
|
127
137
|
header: '',
|
|
128
|
-
size:
|
|
138
|
+
size: 40,
|
|
139
|
+
minSize: 40,
|
|
140
|
+
maxSize: 40,
|
|
129
141
|
enableSorting: false,
|
|
130
142
|
enableColumnFilter: false,
|
|
131
143
|
Cell: ({ row }) => {
|
|
@@ -154,9 +166,9 @@ const MultiSelectTable = ({ props, variant, }) => {
|
|
|
154
166
|
const dataColumns = columns.map((col) => ({
|
|
155
167
|
accessorKey: col.field,
|
|
156
168
|
header: col.headerName,
|
|
157
|
-
size: col.width ||
|
|
158
|
-
minSize:
|
|
159
|
-
maxSize:
|
|
169
|
+
size: col.width || 100,
|
|
170
|
+
minSize: 60,
|
|
171
|
+
maxSize: 150,
|
|
160
172
|
}));
|
|
161
173
|
return [selectColumn, ...dataColumns];
|
|
162
174
|
}, [columns, selectedValues, valueField, handleRowSelect, handleSelectAll, getIsAllSelected, getIsIndeterminate]);
|
|
@@ -183,7 +195,8 @@ const MultiSelectTable = ({ props, variant, }) => {
|
|
|
183
195
|
placeholder: 'Search...',
|
|
184
196
|
size: 'small',
|
|
185
197
|
sx: {
|
|
186
|
-
width: '100%',
|
|
198
|
+
width: 'calc(100% - 16px)',
|
|
199
|
+
margin: '0 8px',
|
|
187
200
|
'& .MuiInputBase-root': {
|
|
188
201
|
fontSize: '11px',
|
|
189
202
|
height: '28px',
|
|
@@ -194,15 +207,36 @@ const MultiSelectTable = ({ props, variant, }) => {
|
|
|
194
207
|
},
|
|
195
208
|
},
|
|
196
209
|
},
|
|
210
|
+
globalFilterFn: 'contains',
|
|
197
211
|
muiTopToolbarProps: {
|
|
198
212
|
sx: {
|
|
199
|
-
padding: '
|
|
200
|
-
minHeight: '
|
|
213
|
+
padding: '8px 12px',
|
|
214
|
+
minHeight: '44px',
|
|
215
|
+
width: '100%',
|
|
216
|
+
boxSizing: 'border-box',
|
|
217
|
+
'& .Mui-Toolbar': {
|
|
218
|
+
width: '100%',
|
|
219
|
+
},
|
|
220
|
+
'& .MuiBox-root': {
|
|
221
|
+
width: '100%',
|
|
222
|
+
maxWidth: '100%',
|
|
223
|
+
},
|
|
224
|
+
'& > div': {
|
|
225
|
+
width: '100%',
|
|
226
|
+
},
|
|
201
227
|
},
|
|
202
228
|
},
|
|
229
|
+
mrtTheme: {
|
|
230
|
+
baseBackgroundColor: '#fff',
|
|
231
|
+
},
|
|
232
|
+
defaultColumn: {
|
|
233
|
+
size: 120,
|
|
234
|
+
minSize: 80,
|
|
235
|
+
maxSize: 200,
|
|
236
|
+
},
|
|
203
237
|
paginationDisplayMode: 'pages',
|
|
204
238
|
muiPaginationProps: {
|
|
205
|
-
rowsPerPageOptions: [
|
|
239
|
+
rowsPerPageOptions: [],
|
|
206
240
|
showFirstButton: false,
|
|
207
241
|
showLastButton: false,
|
|
208
242
|
size: 'small',
|
|
@@ -212,7 +246,10 @@ const MultiSelectTable = ({ props, variant, }) => {
|
|
|
212
246
|
minHeight: '28px',
|
|
213
247
|
},
|
|
214
248
|
'& .MuiTablePagination-select': {
|
|
215
|
-
|
|
249
|
+
display: 'none',
|
|
250
|
+
},
|
|
251
|
+
'& .MuiTablePagination-selectLabel': {
|
|
252
|
+
display: 'none',
|
|
216
253
|
},
|
|
217
254
|
'& .MuiTablePagination-displayedRows': {
|
|
218
255
|
fontSize: '10px',
|
|
@@ -226,10 +263,11 @@ const MultiSelectTable = ({ props, variant, }) => {
|
|
|
226
263
|
muiTableContainerProps: {
|
|
227
264
|
sx: {
|
|
228
265
|
maxHeight: 400,
|
|
229
|
-
|
|
266
|
+
width: '100%',
|
|
267
|
+
overflowX: 'hidden',
|
|
230
268
|
},
|
|
231
269
|
},
|
|
232
|
-
layoutMode: '
|
|
270
|
+
layoutMode: 'semantic',
|
|
233
271
|
muiTableHeadCellProps: {
|
|
234
272
|
sx: {
|
|
235
273
|
backgroundColor: headerColor,
|
|
@@ -238,6 +276,8 @@ const MultiSelectTable = ({ props, variant, }) => {
|
|
|
238
276
|
fontSize: '11px',
|
|
239
277
|
padding: '4px 6px',
|
|
240
278
|
borderBottom: '1px solid #e0e0e0',
|
|
279
|
+
whiteSpace: 'normal',
|
|
280
|
+
wordWrap: 'break-word',
|
|
241
281
|
'& .Mui-TableHeadCell-Content': {
|
|
242
282
|
color: '#fff',
|
|
243
283
|
fontSize: '11px',
|
|
@@ -253,12 +293,16 @@ const MultiSelectTable = ({ props, variant, }) => {
|
|
|
253
293
|
fontSize: '10px',
|
|
254
294
|
padding: '4px 6px',
|
|
255
295
|
borderBottom: '1px solid #e0e0e0',
|
|
296
|
+
whiteSpace: 'normal',
|
|
297
|
+
wordWrap: 'break-word',
|
|
298
|
+
overflow: 'visible',
|
|
256
299
|
},
|
|
257
300
|
},
|
|
258
301
|
muiTableBodyRowProps: {
|
|
259
302
|
sx: {
|
|
260
303
|
borderBottom: '1px solid #e0e0e0',
|
|
261
|
-
height: '
|
|
304
|
+
height: 'auto',
|
|
305
|
+
minHeight: '32px',
|
|
262
306
|
'&:hover': {
|
|
263
307
|
backgroundColor: '#e0f2f1',
|
|
264
308
|
},
|
|
@@ -302,9 +346,11 @@ const MultiSelectTable = ({ props, variant, }) => {
|
|
|
302
346
|
props?.item?.onCloseMenu && props?.item?.onCloseMenu();
|
|
303
347
|
}, input: jsx(OutlinedInput, { label: variant !== 'standard' ? props.item.label : '' }), renderValue: () => (jsx(Tooltip, { title: selectedDisplayText, children: jsx("span", { children: selectedRows.length > (props.item.multiSelectLabelLength || 2)
|
|
304
348
|
? `${selectedRows.length} Selected`
|
|
305
|
-
: selectedDisplayText || placeholder }) })), MenuProps: MenuProps, autoFocus: false, children: jsx(Box, { sx: {
|
|
306
|
-
|
|
307
|
-
|
|
349
|
+
: selectedDisplayText || placeholder }) })), MenuProps: MenuProps, autoFocus: false, children: jsx(Box, { sx: {
|
|
350
|
+
maxHeight: 450, width: '100%', overflow: 'hidden', overflowY: 'auto', '.MuiTextField-root': {
|
|
351
|
+
width: '280% !important'
|
|
352
|
+
}
|
|
353
|
+
}, children: rows.length > 0 ? (jsx(MaterialReactTable, { table: table })) : (jsx(Box, { sx: { padding: '16px', textAlign: 'center', color: '#999', fontSize: '11px' }, children: "No Options found" })) }) }), jsx(FormBottomField, { ...props })] }) }, props.item.name));
|
|
308
354
|
};
|
|
309
355
|
|
|
310
356
|
export { MultiSelectTable as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __exports as Calendar } from '../../../../../_virtual/index.
|
|
1
|
+
import { __exports as Calendar } from '../../../../../_virtual/index.esm6.js';
|
|
2
2
|
import require$$0__default from 'react';
|
|
3
3
|
import { __require as requirePropTypes } from '../../../../prop-types/index.esm.js';
|
|
4
4
|
import { __require as requireDayCell } from '../DayCell/index.esm.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __exports as DateInput } from '../../../../../_virtual/index.
|
|
1
|
+
import { __exports as DateInput } from '../../../../../_virtual/index.esm13.js';
|
|
2
2
|
import require$$0__default from 'react';
|
|
3
3
|
import { __require as requirePropTypes } from '../../../../prop-types/index.esm.js';
|
|
4
4
|
import { __require as requireClassnames } from '../../../../classnames/index.esm.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __exports as DateRange } from '../../../../../_virtual/index.
|
|
1
|
+
import { __exports as DateRange } from '../../../../../_virtual/index.esm4.js';
|
|
2
2
|
import require$$0__default from 'react';
|
|
3
3
|
import { __require as requirePropTypes } from '../../../../prop-types/index.esm.js';
|
|
4
4
|
import { __require as requireCalendar } from '../Calendar/index.esm.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __exports as DateRangePicker } from '../../../../../_virtual/index.
|
|
1
|
+
import { __exports as DateRangePicker } from '../../../../../_virtual/index.esm5.js';
|
|
2
2
|
import require$$0__default from 'react';
|
|
3
3
|
import { __require as requirePropTypes } from '../../../../prop-types/index.esm.js';
|
|
4
4
|
import { __require as requireDateRange } from '../DateRange/index.esm.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __exports as InputRangeField } from '../../../../../_virtual/index.
|
|
1
|
+
import { __exports as InputRangeField } from '../../../../../_virtual/index.esm14.js';
|
|
2
2
|
import require$$0__default from 'react';
|
|
3
3
|
import { __require as requirePropTypes } from '../../../../prop-types/index.esm.js';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __exports as Month } from '../../../../../_virtual/index.
|
|
1
|
+
import { __exports as Month } from '../../../../../_virtual/index.esm12.js';
|
|
2
2
|
import require$$0__default from 'react';
|
|
3
3
|
import { __require as requirePropTypes } from '../../../../prop-types/index.esm.js';
|
|
4
4
|
import { __require as requireDayCell } from '../DayCell/index.esm.js';
|