@ssplib/react-components 0.0.251 → 0.0.253
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/components/detalhes/Category.js +14 -0
- package/components/detalhes/Field.js +42 -0
- package/components/detalhes/FieldLabel.js +28 -0
- package/components/detalhes/File.js +62 -0
- package/components/form/checkbox/CheckBox.js +18 -0
- package/{src/components → components}/form/checkbox/CheckBoxAdditional.js +37 -11
- package/components/form/checkbox/CheckBoxWarning.js +43 -0
- package/components/form/checkbox/RequiredCheckBoxValidator.js +85 -0
- package/components/form/date/DatePicker.js +100 -0
- package/components/form/date/TimePicker.js +82 -0
- package/components/form/file/DropFileUpload.js +236 -0
- package/components/form/file/FileUpload.js +200 -0
- package/components/form/input/ActiveInput.js +33 -0
- package/components/form/input/AutoComplete.js +69 -0
- package/components/form/input/FetchAutoComplete.js +132 -0
- package/components/form/input/FixedAutoComplete.js +76 -0
- package/{src/components → components}/form/input/Input.js +52 -22
- package/components/form/input/MaskInput.js +78 -0
- package/components/form/input/MultInput.js +67 -0
- package/components/form/input/OtherCheckBox.js +56 -0
- package/components/form/stepper/Stepper.js +135 -0
- package/components/form/stepper/StepperBlock.js +97 -0
- package/components/form/switch/Switch.js +54 -0
- package/components/form/switch/ToggleVisibility.js +61 -0
- package/{src/components → components}/form/table/Table.js +230 -200
- package/components/icons/icons.js +24 -0
- package/components/modal/Modal.js +105 -0
- package/components/navbar/NavBar.js +156 -0
- package/components/navbar/TabNavBar.js +164 -0
- package/components/providers/FormProvider.js +49 -0
- package/components/providers/KeycloakAuthProvider.js +99 -0
- package/{src/components → components}/providers/OAuthProvider.js +49 -19
- package/components/providers/SspComponentsProvider.js +18 -0
- package/{src/components → components}/utils/Bt.js +13 -7
- package/components/utils/CustomMenu.js +39 -0
- package/context/auth.js +5 -0
- package/context/form.js +5 -0
- package/index.js +80 -0
- package/package.json +2 -2
- package/types/auth.js +2 -0
- package/{src/types → types}/form.js +7 -4
- package/src/components/detalhes/Category.js +0 -7
- package/src/components/detalhes/Field.js +0 -35
- package/src/components/detalhes/FieldLabel.js +0 -21
- package/src/components/detalhes/File.js +0 -35
- package/src/components/form/checkbox/CheckBox.js +0 -12
- package/src/components/form/checkbox/CheckBoxWarning.js +0 -14
- package/src/components/form/checkbox/RequiredCheckBoxValidator.js +0 -56
- package/src/components/form/date/DatePicker.js +0 -71
- package/src/components/form/date/TimePicker.js +0 -53
- package/src/components/form/file/DropFileUpload.js +0 -207
- package/src/components/form/file/FileUpload.js +0 -171
- package/src/components/form/input/ActiveInput.js +0 -27
- package/src/components/form/input/AutoComplete.js +0 -40
- package/src/components/form/input/FetchAutoComplete.js +0 -103
- package/src/components/form/input/FixedAutoComplete.js +0 -46
- package/src/components/form/input/MaskInput.js +0 -52
- package/src/components/form/input/MultInput.js +0 -38
- package/src/components/form/input/OtherCheckBox.js +0 -27
- package/src/components/form/stepper/Stepper.js +0 -105
- package/src/components/form/stepper/StepperBlock.js +0 -67
- package/src/components/form/switch/Switch.js +0 -27
- package/src/components/form/switch/ToggleVisibility.js +0 -33
- package/src/components/icons/icons.js +0 -16
- package/src/components/modal/Modal.js +0 -75
- package/src/components/navbar/NavBar.js +0 -127
- package/src/components/navbar/TabNavBar.js +0 -135
- package/src/components/providers/FormProvider.js +0 -23
- package/src/components/providers/KeycloakAuthProvider.js +0 -69
- package/src/components/providers/SspComponentsProvider.js +0 -11
- package/src/components/utils/CustomMenu.js +0 -33
- package/src/context/auth.js +0 -2
- package/src/context/form.js +0 -2
- package/src/index.js +0 -41
- package/src/types/auth.js +0 -1
- /package/{src/components → components}/detalhes/Category.d.ts +0 -0
- /package/{src/components → components}/detalhes/Field.d.ts +0 -0
- /package/{src/components → components}/detalhes/FieldLabel.d.ts +0 -0
- /package/{src/components → components}/detalhes/File.d.ts +0 -0
- /package/{src/components → components}/form/checkbox/CheckBox.d.ts +0 -0
- /package/{src/components → components}/form/checkbox/CheckBoxAdditional.d.ts +0 -0
- /package/{src/components → components}/form/checkbox/CheckBoxWarning.d.ts +0 -0
- /package/{src/components → components}/form/checkbox/RequiredCheckBoxValidator.d.ts +0 -0
- /package/{src/components → components}/form/date/DatePicker.d.ts +0 -0
- /package/{src/components → components}/form/date/TimePicker.d.ts +0 -0
- /package/{src/components → components}/form/file/DropFileUpload.d.ts +0 -0
- /package/{src/components → components}/form/file/FileUpload.d.ts +0 -0
- /package/{src/components → components}/form/input/ActiveInput.d.ts +0 -0
- /package/{src/components → components}/form/input/AutoComplete.d.ts +0 -0
- /package/{src/components → components}/form/input/FetchAutoComplete.d.ts +0 -0
- /package/{src/components → components}/form/input/FixedAutoComplete.d.ts +0 -0
- /package/{src/components → components}/form/input/Input.d.ts +0 -0
- /package/{src/components → components}/form/input/MaskInput.d.ts +0 -0
- /package/{src/components → components}/form/input/MultInput.d.ts +0 -0
- /package/{src/components → components}/form/input/OtherCheckBox.d.ts +0 -0
- /package/{src/components → components}/form/stepper/Stepper.d.ts +0 -0
- /package/{src/components → components}/form/stepper/StepperBlock.d.ts +0 -0
- /package/{src/components → components}/form/switch/Switch.d.ts +0 -0
- /package/{src/components → components}/form/switch/ToggleVisibility.d.ts +0 -0
- /package/{src/components → components}/form/table/Table.d.ts +0 -0
- /package/{src/components → components}/icons/icons.d.ts +0 -0
- /package/{src/components → components}/modal/Modal.d.ts +0 -0
- /package/{src/components → components}/navbar/NavBar.d.ts +0 -0
- /package/{src/components → components}/navbar/TabNavBar.d.ts +0 -0
- /package/{src/components → components}/providers/FormProvider.d.ts +0 -0
- /package/{src/components → components}/providers/KeycloakAuthProvider.d.ts +0 -0
- /package/{src/components → components}/providers/OAuthProvider.d.ts +0 -0
- /package/{src/components → components}/providers/SspComponentsProvider.d.ts +0 -0
- /package/{src/components → components}/utils/Bt.d.ts +0 -0
- /package/{src/components → components}/utils/CustomMenu.d.ts +0 -0
- /package/{src/context → context}/auth.d.ts +0 -0
- /package/{src/context → context}/form.d.ts +0 -0
- /package/{src/index.d.ts → index.d.ts} +0 -0
- /package/{src/types → types}/auth.d.ts +0 -0
- /package/{src/types → types}/form.d.ts +0 -0
|
@@ -1,22 +1,51 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.Table = void 0;
|
|
30
|
+
const icons_material_1 = require("@mui/icons-material");
|
|
31
|
+
const Clear_1 = __importDefault(require("@mui/icons-material/Clear"));
|
|
32
|
+
const FileDownload_1 = __importDefault(require("@mui/icons-material/FileDownload"));
|
|
33
|
+
const NavigateNextRounded_1 = __importDefault(require("@mui/icons-material/NavigateNextRounded"));
|
|
34
|
+
const Search_1 = __importDefault(require("@mui/icons-material/Search"));
|
|
35
|
+
const material_1 = require("@mui/material");
|
|
36
|
+
const Grid_1 = __importDefault(require("@mui/material/Grid"));
|
|
37
|
+
const Pagination_1 = __importDefault(require("@mui/material/Pagination"));
|
|
38
|
+
const TextField_1 = __importDefault(require("@mui/material/TextField"));
|
|
39
|
+
const Typography_1 = __importDefault(require("@mui/material/Typography"));
|
|
40
|
+
const x_date_pickers_1 = require("@mui/x-date-pickers");
|
|
41
|
+
const AdapterDayjs_1 = require("@mui/x-date-pickers/AdapterDayjs");
|
|
42
|
+
const dayjs_1 = __importDefault(require("dayjs"));
|
|
43
|
+
const jszip_1 = __importDefault(require("jszip"));
|
|
44
|
+
const lodash_get_1 = __importDefault(require("lodash.get"));
|
|
45
|
+
const react_1 = __importStar(require("react"));
|
|
46
|
+
const auth_1 = require("../../../context/auth");
|
|
47
|
+
const Modal_1 = require("../../modal/Modal");
|
|
48
|
+
const CustomMenu_1 = __importDefault(require("../../utils//CustomMenu"));
|
|
20
49
|
function removePunctuationAndAccents(text) {
|
|
21
50
|
// Remove accents and diacritics
|
|
22
51
|
const normalizedText = text.normalize('NFD').replace(/[\u0300-\u036f]/g, '');
|
|
@@ -38,7 +67,7 @@ let localTableName = '';
|
|
|
38
67
|
let orderAsc = false;
|
|
39
68
|
let filtersFuncData = {};
|
|
40
69
|
let localTableNameCache = '';
|
|
41
|
-
|
|
70
|
+
function Table({ mediaQueryLG, columns, fetchFunc, emptyMsg = {
|
|
42
71
|
user: 'Nenhum dado encontrado',
|
|
43
72
|
public: 'Nenhum dado encontrado',
|
|
44
73
|
}, dataPath = '', tableName = 'Dados', csv, columnSize, action, useKC = true, statusKeyName = '', csvExcludeKeys = [], csvExcludeKeysCSV = [], csvExcludeKeysAll = [], csvCustomKeyNames = {}, csvExcludeValidate = (key, value) => false, csvButtonTitle = 'Salvar .CSV', csvNoZipText = 'Salvar .CSV', csvAllButtonTitle = 'Salvar todos em CSV', removeQuotes = false, normalize = false, csvShowAllButton = false, csvWithoutZip = false, itemCount = 10, csvUpper = false, csvZipFileNamesKey = '', generateCsvZip = false,
|
|
@@ -46,26 +75,26 @@ export function Table({ mediaQueryLG, columns, fetchFunc, emptyMsg = {
|
|
|
46
75
|
// filterSeparator = '|',
|
|
47
76
|
hideTitleCSV = false, csvExcludeUpper = [], multipleDataPath = '', expandTextMaxLength = 50, collapsedSize = 53, customMargin = 4, customMarginMobile = 0, filtersFunc, filters = [], orderBy = [], customErrorMsg = undefined, customTableStyle = {}, id, }) {
|
|
48
77
|
var _a;
|
|
49
|
-
const [isLoading, setIsLoading] = useState(true);
|
|
50
|
-
const [error, setError] = useState(null);
|
|
51
|
-
const [data, setData] = useState(null);
|
|
52
|
-
const { user, userLoaded } = useContext(AuthContext);
|
|
53
|
-
const [list, setList] = useState([]);
|
|
54
|
-
const [listClone, setListClone] = useState([]);
|
|
78
|
+
const [isLoading, setIsLoading] = (0, react_1.useState)(true);
|
|
79
|
+
const [error, setError] = (0, react_1.useState)(null);
|
|
80
|
+
const [data, setData] = (0, react_1.useState)(null);
|
|
81
|
+
const { user, userLoaded } = (0, react_1.useContext)(auth_1.AuthContext);
|
|
82
|
+
const [list, setList] = (0, react_1.useState)([]);
|
|
83
|
+
const [listClone, setListClone] = (0, react_1.useState)([]);
|
|
55
84
|
//numero de items pra ser mostrado
|
|
56
|
-
const [itemsCount, setItemsCount] = useState(itemCount);
|
|
57
|
-
const [currentPage, setCurrentPage] = useState(0);
|
|
58
|
-
const [paginationCount, setPagCount] = useState(1);
|
|
59
|
-
const [listPage, setListPage] = useState(1);
|
|
60
|
-
const [oldSelectState, setOldSelectState] = useState('');
|
|
61
|
-
const [expandObj, setExpandObj] = useState({});
|
|
62
|
-
const [showExpandObj, setShowExpandObj] = useState({});
|
|
63
|
-
const [showExpandObjOnExited, setShowExpandObjOnExited] = useState({});
|
|
64
|
-
const [filterKey, setFilterKey] = useState('filterKey');
|
|
65
|
-
const theme = useTheme();
|
|
66
|
-
const isSmall = useMediaQuery(theme.breakpoints.only('xs'));
|
|
67
|
-
const filterContainer = useRef(null);
|
|
68
|
-
const lg = useMediaQuery(theme.breakpoints.up(2000));
|
|
85
|
+
const [itemsCount, setItemsCount] = (0, react_1.useState)(itemCount);
|
|
86
|
+
const [currentPage, setCurrentPage] = (0, react_1.useState)(0);
|
|
87
|
+
const [paginationCount, setPagCount] = (0, react_1.useState)(1);
|
|
88
|
+
const [listPage, setListPage] = (0, react_1.useState)(1);
|
|
89
|
+
const [oldSelectState, setOldSelectState] = (0, react_1.useState)('');
|
|
90
|
+
const [expandObj, setExpandObj] = (0, react_1.useState)({});
|
|
91
|
+
const [showExpandObj, setShowExpandObj] = (0, react_1.useState)({});
|
|
92
|
+
const [showExpandObjOnExited, setShowExpandObjOnExited] = (0, react_1.useState)({});
|
|
93
|
+
const [filterKey, setFilterKey] = (0, react_1.useState)('filterKey');
|
|
94
|
+
const theme = (0, material_1.useTheme)();
|
|
95
|
+
const isSmall = (0, material_1.useMediaQuery)(theme.breakpoints.only('xs'));
|
|
96
|
+
const filterContainer = (0, react_1.useRef)(null);
|
|
97
|
+
const lg = (0, material_1.useMediaQuery)(theme.breakpoints.up(2000));
|
|
69
98
|
localTableName = `tableFilter_${id}`;
|
|
70
99
|
localTableNameCache = `tableFilterCache_${id}`;
|
|
71
100
|
filtersFuncData = filtersFunc !== null && filtersFunc !== void 0 ? filtersFunc : {};
|
|
@@ -75,7 +104,7 @@ hideTitleCSV = false, csvExcludeUpper = [], multipleDataPath = '', expandTextMax
|
|
|
75
104
|
localStorage.setItem(localTableNameCache, JSON.stringify(filters));
|
|
76
105
|
localStorage.removeItem(localTableName);
|
|
77
106
|
}
|
|
78
|
-
useEffect(() => {
|
|
107
|
+
(0, react_1.useEffect)(() => {
|
|
79
108
|
setError(null);
|
|
80
109
|
if (userLoaded || !useKC) {
|
|
81
110
|
setIsLoading(true);
|
|
@@ -98,7 +127,7 @@ hideTitleCSV = false, csvExcludeUpper = [], multipleDataPath = '', expandTextMax
|
|
|
98
127
|
status: j.statusCode,
|
|
99
128
|
});
|
|
100
129
|
else {
|
|
101
|
-
let value = dataPath ?
|
|
130
|
+
let value = dataPath ? (0, lodash_get_1.default)(j, dataPath) : j;
|
|
102
131
|
if (!value || !Array.isArray(value)) {
|
|
103
132
|
setData({ body: { data: [] } });
|
|
104
133
|
startData = [];
|
|
@@ -118,20 +147,20 @@ hideTitleCSV = false, csvExcludeUpper = [], multipleDataPath = '', expandTextMax
|
|
|
118
147
|
});
|
|
119
148
|
}
|
|
120
149
|
}, [userLoaded, fetchFunc]);
|
|
121
|
-
const getCount = useCallback((countData) => {
|
|
150
|
+
const getCount = (0, react_1.useCallback)((countData) => {
|
|
122
151
|
if (countData.length <= 0)
|
|
123
152
|
return 1;
|
|
124
153
|
let count = countData.length / itemsCount;
|
|
125
154
|
count = count < 1 ? 1 : count;
|
|
126
155
|
return Math.ceil(count);
|
|
127
156
|
}, [itemsCount]);
|
|
128
|
-
const getData = useCallback((dt) => {
|
|
157
|
+
const getData = (0, react_1.useCallback)((dt) => {
|
|
129
158
|
if (Array.isArray(dt))
|
|
130
159
|
return dt;
|
|
131
160
|
if (typeof dt === 'object')
|
|
132
|
-
return
|
|
161
|
+
return (0, lodash_get_1.default)(dt, dataPath);
|
|
133
162
|
}, []);
|
|
134
|
-
useEffect(() => {
|
|
163
|
+
(0, react_1.useEffect)(() => {
|
|
135
164
|
if (isLoading || error || !getData(data))
|
|
136
165
|
return;
|
|
137
166
|
const value = getData(data);
|
|
@@ -142,10 +171,10 @@ hideTitleCSV = false, csvExcludeUpper = [], multipleDataPath = '', expandTextMax
|
|
|
142
171
|
filtrar(JSON.parse(localStorage.getItem(localTableName)));
|
|
143
172
|
}
|
|
144
173
|
}, [itemsCount, isLoading, data, getCount, error]);
|
|
145
|
-
useEffect(() => {
|
|
174
|
+
(0, react_1.useEffect)(() => {
|
|
146
175
|
setCurrentPage(listPage - 1);
|
|
147
176
|
}, [listPage]);
|
|
148
|
-
const onPaginationChange = useCallback((e, page) => {
|
|
177
|
+
const onPaginationChange = (0, react_1.useCallback)((e, page) => {
|
|
149
178
|
setListPage(page);
|
|
150
179
|
}, []);
|
|
151
180
|
function onInputChange(e) {
|
|
@@ -162,7 +191,7 @@ hideTitleCSV = false, csvExcludeUpper = [], multipleDataPath = '', expandTextMax
|
|
|
162
191
|
const dataStr = [];
|
|
163
192
|
Object.keys(x).map((key) => {
|
|
164
193
|
var _a;
|
|
165
|
-
let value = (_a =
|
|
194
|
+
let value = (_a = (0, lodash_get_1.default)(x, key, '')) !== null && _a !== void 0 ? _a : '';
|
|
166
195
|
if (typeof value === 'number')
|
|
167
196
|
value = value.toString();
|
|
168
197
|
if (typeof value !== 'string')
|
|
@@ -226,7 +255,7 @@ hideTitleCSV = false, csvExcludeUpper = [], multipleDataPath = '', expandTextMax
|
|
|
226
255
|
setCurrentPage(0);
|
|
227
256
|
setListPage(1);
|
|
228
257
|
}
|
|
229
|
-
const getMaxItems = useCallback(() => {
|
|
258
|
+
const getMaxItems = (0, react_1.useCallback)(() => {
|
|
230
259
|
const start = currentPage * itemsCount;
|
|
231
260
|
return list.slice(start, start + itemsCount);
|
|
232
261
|
}, [list, itemsCount, currentPage]);
|
|
@@ -245,7 +274,7 @@ hideTitleCSV = false, csvExcludeUpper = [], multipleDataPath = '', expandTextMax
|
|
|
245
274
|
return cell;
|
|
246
275
|
}
|
|
247
276
|
// download file
|
|
248
|
-
const downloadCSV = useCallback((e, zip = false) => {
|
|
277
|
+
const downloadCSV = (0, react_1.useCallback)((e, zip = false) => {
|
|
249
278
|
e.preventDefault();
|
|
250
279
|
if (list.length <= 0)
|
|
251
280
|
return;
|
|
@@ -253,7 +282,7 @@ hideTitleCSV = false, csvExcludeUpper = [], multipleDataPath = '', expandTextMax
|
|
|
253
282
|
if (generateCsvZip && zip) {
|
|
254
283
|
const keys = originalKeys.filter((k) => !csvExcludeKeys.includes(k));
|
|
255
284
|
const header = keys.map((k) => (csvCustomKeyNames[k] ? csvCustomKeyNames[k] : k)).join(',') + '\n';
|
|
256
|
-
const zip = new
|
|
285
|
+
const zip = new jszip_1.default();
|
|
257
286
|
const obj = {};
|
|
258
287
|
list.forEach((x) => {
|
|
259
288
|
if (!obj[x[csvZipFileNamesKey]])
|
|
@@ -388,7 +417,7 @@ hideTitleCSV = false, csvExcludeUpper = [], multipleDataPath = '', expandTextMax
|
|
|
388
417
|
}
|
|
389
418
|
return '[' + arrString.join(' - ') + ']';
|
|
390
419
|
}
|
|
391
|
-
const downloadCSVAll = useCallback((e) => {
|
|
420
|
+
const downloadCSVAll = (0, react_1.useCallback)((e) => {
|
|
392
421
|
e.preventDefault();
|
|
393
422
|
if (list.length <= 0)
|
|
394
423
|
return;
|
|
@@ -456,7 +485,7 @@ hideTitleCSV = false, csvExcludeUpper = [], multipleDataPath = '', expandTextMax
|
|
|
456
485
|
switch (dt.operator) {
|
|
457
486
|
case 'igual':
|
|
458
487
|
currentData.forEach((cd) => {
|
|
459
|
-
const value = Number(
|
|
488
|
+
const value = Number((0, lodash_get_1.default)(cd, dt.keyName, ''));
|
|
460
489
|
if (value === Number(dt.value)) {
|
|
461
490
|
filteredData.push(cd);
|
|
462
491
|
}
|
|
@@ -464,7 +493,7 @@ hideTitleCSV = false, csvExcludeUpper = [], multipleDataPath = '', expandTextMax
|
|
|
464
493
|
break;
|
|
465
494
|
case 'maior que':
|
|
466
495
|
currentData.forEach((cd) => {
|
|
467
|
-
const value = Number(
|
|
496
|
+
const value = Number((0, lodash_get_1.default)(cd, dt.keyName, ''));
|
|
468
497
|
if (value > Number(dt.value)) {
|
|
469
498
|
filteredData.push(cd);
|
|
470
499
|
}
|
|
@@ -472,7 +501,7 @@ hideTitleCSV = false, csvExcludeUpper = [], multipleDataPath = '', expandTextMax
|
|
|
472
501
|
break;
|
|
473
502
|
case 'menor que':
|
|
474
503
|
currentData.forEach((cd) => {
|
|
475
|
-
const value = Number(
|
|
504
|
+
const value = Number((0, lodash_get_1.default)(cd, dt.keyName, ''));
|
|
476
505
|
if (value < Number(dt.value)) {
|
|
477
506
|
filteredData.push(cd);
|
|
478
507
|
}
|
|
@@ -485,7 +514,7 @@ hideTitleCSV = false, csvExcludeUpper = [], multipleDataPath = '', expandTextMax
|
|
|
485
514
|
switch (dt.operator) {
|
|
486
515
|
case 'igual':
|
|
487
516
|
currentData.forEach((cd) => {
|
|
488
|
-
const value =
|
|
517
|
+
const value = (0, lodash_get_1.default)(cd, dt.keyName, '');
|
|
489
518
|
if (dt.useList) {
|
|
490
519
|
if (formatarString(value) === formatarString(dt.value.id)) {
|
|
491
520
|
filteredData.push(cd);
|
|
@@ -500,7 +529,7 @@ hideTitleCSV = false, csvExcludeUpper = [], multipleDataPath = '', expandTextMax
|
|
|
500
529
|
break;
|
|
501
530
|
case 'contem':
|
|
502
531
|
currentData.forEach((cd) => {
|
|
503
|
-
const value =
|
|
532
|
+
const value = (0, lodash_get_1.default)(cd, dt.keyName, '');
|
|
504
533
|
if (!value)
|
|
505
534
|
return;
|
|
506
535
|
if (dt.useList) {
|
|
@@ -517,7 +546,7 @@ hideTitleCSV = false, csvExcludeUpper = [], multipleDataPath = '', expandTextMax
|
|
|
517
546
|
break;
|
|
518
547
|
case 'tem um dos':
|
|
519
548
|
currentData.forEach((cd) => {
|
|
520
|
-
const value =
|
|
549
|
+
const value = (0, lodash_get_1.default)(cd, dt.keyName, '');
|
|
521
550
|
if (!value)
|
|
522
551
|
return;
|
|
523
552
|
if (dt.value.map((x) => formatarString(x.id)).includes(formatarString(value))) {
|
|
@@ -531,19 +560,19 @@ hideTitleCSV = false, csvExcludeUpper = [], multipleDataPath = '', expandTextMax
|
|
|
531
560
|
switch (dt.operator) {
|
|
532
561
|
case 'data exata':
|
|
533
562
|
currentData.forEach((cd) => {
|
|
534
|
-
const value =
|
|
563
|
+
const value = (0, dayjs_1.default)((0, lodash_get_1.default)(cd, dt.keyName, ''), 'DD/MM/YYYY');
|
|
535
564
|
if (!value.isValid())
|
|
536
565
|
return;
|
|
537
|
-
if (value.isSame(
|
|
566
|
+
if (value.isSame((0, dayjs_1.default)(dt.value, 'DD/MM/YYYY'))) {
|
|
538
567
|
filteredData.push(cd);
|
|
539
568
|
}
|
|
540
569
|
});
|
|
541
570
|
break;
|
|
542
571
|
case 'entre':
|
|
543
|
-
const dateA = dt.value ?
|
|
544
|
-
const dateB = dt.value2 ?
|
|
572
|
+
const dateA = dt.value ? (0, dayjs_1.default)(dt.value, 'DD/MM/YYYY') : (0, dayjs_1.default)('01/01/2000', 'DD/MM/YYYY');
|
|
573
|
+
const dateB = dt.value2 ? (0, dayjs_1.default)(dt.value2, 'DD/MM/YYYY') : (0, dayjs_1.default)('31/12/2030', 'DD/MM/YYYY');
|
|
545
574
|
currentData.forEach((cd) => {
|
|
546
|
-
const value =
|
|
575
|
+
const value = (0, dayjs_1.default)((0, lodash_get_1.default)(cd, dt.keyName, ''), 'DD/MM/YYYY');
|
|
547
576
|
if ((value.isAfter(dateA) || value.isSame(dateA)) && (value.isBefore(dateB) || value.isSame(dateB))) {
|
|
548
577
|
filteredData.push(cd);
|
|
549
578
|
}
|
|
@@ -556,12 +585,12 @@ hideTitleCSV = false, csvExcludeUpper = [], multipleDataPath = '', expandTextMax
|
|
|
556
585
|
case 'data inicio':
|
|
557
586
|
currentData.forEach((cd) => {
|
|
558
587
|
var _a;
|
|
559
|
-
const dates = (_a = filtersFuncData[dt.customFunc](
|
|
588
|
+
const dates = (_a = filtersFuncData[dt.customFunc]((0, lodash_get_1.default)(cd, dt.keyName, ''))) !== null && _a !== void 0 ? _a : [];
|
|
560
589
|
if (dates.length <= 0)
|
|
561
590
|
return;
|
|
562
591
|
var inicioDate = dates[0];
|
|
563
|
-
var inicioValue =
|
|
564
|
-
if (inicioValue.isSame(
|
|
592
|
+
var inicioValue = (0, dayjs_1.default)(inicioDate, 'DD/MM/YYYY');
|
|
593
|
+
if (inicioValue.isSame((0, dayjs_1.default)(dt.value, 'DD/MM/YYYY'))) {
|
|
565
594
|
filteredData.push(cd);
|
|
566
595
|
}
|
|
567
596
|
});
|
|
@@ -569,12 +598,12 @@ hideTitleCSV = false, csvExcludeUpper = [], multipleDataPath = '', expandTextMax
|
|
|
569
598
|
case 'data fim':
|
|
570
599
|
currentData.forEach((cd) => {
|
|
571
600
|
var _a;
|
|
572
|
-
const dates = (_a = filtersFuncData[dt.customFunc](
|
|
601
|
+
const dates = (_a = filtersFuncData[dt.customFunc]((0, lodash_get_1.default)(cd, dt.keyName, ''))) !== null && _a !== void 0 ? _a : [];
|
|
573
602
|
if (dates.length <= 0)
|
|
574
603
|
return;
|
|
575
604
|
var fimDate = dates[dates.length - 1];
|
|
576
|
-
var fimValue =
|
|
577
|
-
if (fimValue.isSame(
|
|
605
|
+
var fimValue = (0, dayjs_1.default)(fimDate, 'DD/MM/YYYY');
|
|
606
|
+
if (fimValue.isSame((0, dayjs_1.default)(dt.value, 'DD/MM/YYYY'))) {
|
|
578
607
|
filteredData.push(cd);
|
|
579
608
|
}
|
|
580
609
|
});
|
|
@@ -582,23 +611,23 @@ hideTitleCSV = false, csvExcludeUpper = [], multipleDataPath = '', expandTextMax
|
|
|
582
611
|
case 'tem a data':
|
|
583
612
|
currentData.forEach((cd) => {
|
|
584
613
|
var _a;
|
|
585
|
-
const dates = (_a = filtersFuncData[dt.customFunc](
|
|
614
|
+
const dates = (_a = filtersFuncData[dt.customFunc]((0, lodash_get_1.default)(cd, dt.keyName, ''))) !== null && _a !== void 0 ? _a : [];
|
|
586
615
|
if (dates.includes(dt.value)) {
|
|
587
616
|
filteredData.push(cd);
|
|
588
617
|
}
|
|
589
618
|
});
|
|
590
619
|
break;
|
|
591
620
|
case 'entre':
|
|
592
|
-
const dateA = dt.value ?
|
|
593
|
-
const dateB = dt.value2 ?
|
|
621
|
+
const dateA = dt.value ? (0, dayjs_1.default)(dt.value, 'DD/MM/YYYY') : (0, dayjs_1.default)('01/01/2000', 'DD/MM/YYYY');
|
|
622
|
+
const dateB = dt.value2 ? (0, dayjs_1.default)(dt.value2, 'DD/MM/YYYY') : (0, dayjs_1.default)('31/12/2030', 'DD/MM/YYYY');
|
|
594
623
|
currentData.forEach((cd) => {
|
|
595
624
|
var _a;
|
|
596
|
-
const dates = (_a = filtersFuncData[dt.customFunc](
|
|
625
|
+
const dates = (_a = filtersFuncData[dt.customFunc]((0, lodash_get_1.default)(cd, dt.keyName, ''))) !== null && _a !== void 0 ? _a : [];
|
|
597
626
|
let isBetween = false;
|
|
598
627
|
dates.forEach((dtStr) => {
|
|
599
628
|
if (isBetween)
|
|
600
629
|
return;
|
|
601
|
-
const dt =
|
|
630
|
+
const dt = (0, dayjs_1.default)(dtStr, 'DD/MM/YYYY');
|
|
602
631
|
if (!dt.isValid())
|
|
603
632
|
return;
|
|
604
633
|
if ((dt.isAfter(dateA) || dt.isSame(dateA)) && (dt.isBefore(dateB) || dt.isSame(dateB))) {
|
|
@@ -625,8 +654,8 @@ hideTitleCSV = false, csvExcludeUpper = [], multipleDataPath = '', expandTextMax
|
|
|
625
654
|
function ordenar(order) {
|
|
626
655
|
let oldList = [...list];
|
|
627
656
|
oldList.sort((a, b) => {
|
|
628
|
-
const aValue = order.type === 'string' ?
|
|
629
|
-
const bValue = order.type === 'string' ?
|
|
657
|
+
const aValue = order.type === 'string' ? (0, lodash_get_1.default)(a, order.key, '') : Number((0, lodash_get_1.default)(a, order.key, 0));
|
|
658
|
+
const bValue = order.type === 'string' ? (0, lodash_get_1.default)(b, order.key, '') : Number((0, lodash_get_1.default)(b, order.key, 0));
|
|
630
659
|
if (orderAsc) {
|
|
631
660
|
if (aValue < bValue)
|
|
632
661
|
return -1;
|
|
@@ -645,45 +674,45 @@ hideTitleCSV = false, csvExcludeUpper = [], multipleDataPath = '', expandTextMax
|
|
|
645
674
|
setList(oldList);
|
|
646
675
|
}
|
|
647
676
|
// effect usado quando for mostrar "VER MAIS" e "VER MENOS"
|
|
648
|
-
useEffect(() => {
|
|
677
|
+
(0, react_1.useEffect)(() => {
|
|
649
678
|
const start = currentPage * itemsCount;
|
|
650
679
|
const newList = list.slice(start, start + itemsCount);
|
|
651
680
|
let obj = {};
|
|
652
681
|
newList.forEach((x, index) => {
|
|
653
682
|
columns.forEach((c) => {
|
|
654
683
|
var _a;
|
|
655
|
-
obj[index] = obj[index] === true ? true : ((_a =
|
|
684
|
+
obj[index] = obj[index] === true ? true : ((_a = (0, lodash_get_1.default)(x, c.keyName, '')) !== null && _a !== void 0 ? _a : 'Não Informado').toString().length >= expandTextMaxLength;
|
|
656
685
|
});
|
|
657
686
|
});
|
|
658
687
|
setShowExpandObj(obj);
|
|
659
688
|
}, [list, itemsCount, currentPage]);
|
|
660
|
-
useEffect(() => {
|
|
689
|
+
(0, react_1.useEffect)(() => {
|
|
661
690
|
console.log(filterContainer.current);
|
|
662
691
|
}, [filterContainer.current]);
|
|
663
692
|
if (error)
|
|
664
|
-
return (
|
|
665
|
-
|
|
693
|
+
return (react_1.default.createElement(material_1.Box, { bgcolor: '#fff2c8', color: '#3e3129', padding: 2, marginX: 2, borderRadius: 4 },
|
|
694
|
+
react_1.default.createElement(Typography_1.default, { fontSize: 24, textAlign: 'center', fontFamily: 'Inter' },
|
|
666
695
|
error.status === 403 && 'Acesso negado',
|
|
667
|
-
error.status === 500 && (
|
|
668
|
-
|
|
669
|
-
|
|
696
|
+
error.status === 500 && (react_1.default.createElement(material_1.Box, { fontWeight: 500, textAlign: 'center' },
|
|
697
|
+
react_1.default.createElement(icons_material_1.ReportProblemRounded, { sx: { transform: 'scale(2)', marginY: 1, fill: '#3e3129' } }),
|
|
698
|
+
react_1.default.createElement(material_1.Box, null, customErrorMsg ? (customErrorMsg) : (react_1.default.createElement(react_1.default.Fragment, null,
|
|
670
699
|
"N\u00E3o foi poss\u00EDvel se conectar ao servidor no momento. Por favor, aguarde alguns instantes e tente de novo.",
|
|
671
|
-
|
|
672
|
-
|
|
700
|
+
react_1.default.createElement("br", null),
|
|
701
|
+
react_1.default.createElement("br", null),
|
|
673
702
|
"Caso precise de ajuda, entre em contato pelo email: ",
|
|
674
|
-
|
|
703
|
+
react_1.default.createElement("strong", null, "cdes@ssp.df.gov.br")))))))));
|
|
675
704
|
if (isLoading)
|
|
676
|
-
return (
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
705
|
+
return (react_1.default.createElement(material_1.Stack, { sx: { height: '100%', width: '100%' }, justifyContent: 'center', alignItems: 'center' },
|
|
706
|
+
react_1.default.createElement(material_1.Box, { width: '100%' },
|
|
707
|
+
react_1.default.createElement(material_1.Stack, { direction: 'row', justifyContent: 'center', alignItems: 'center', justifyItems: 'center', spacing: 2, marginY: 4 },
|
|
708
|
+
react_1.default.createElement(icons_material_1.PendingRounded, { sx: { fill: '#5e5e5e' } }),
|
|
709
|
+
react_1.default.createElement(Typography_1.default, { fontWeight: 600, fontSize: 20, textTransform: 'capitalize', textAlign: 'center', color: '#5e5e5e' },
|
|
681
710
|
"Carregando ",
|
|
682
711
|
tableName)),
|
|
683
|
-
|
|
712
|
+
react_1.default.createElement(material_1.LinearProgress, { color: 'inherit' }),
|
|
684
713
|
Array(10)
|
|
685
714
|
.fill('')
|
|
686
|
-
.map((x) => (
|
|
715
|
+
.map((x) => (react_1.default.createElement(material_1.Stack, { direction: {
|
|
687
716
|
xs: 'column',
|
|
688
717
|
md: 'row',
|
|
689
718
|
}, spacing: {
|
|
@@ -691,17 +720,17 @@ hideTitleCSV = false, csvExcludeUpper = [], multipleDataPath = '', expandTextMax
|
|
|
691
720
|
md: 1,
|
|
692
721
|
}, justifyContent: 'space-between', paddingY: 8, borderBottom: '1px solid #cacaca' }, Array(7)
|
|
693
722
|
.fill(0)
|
|
694
|
-
.map((y) => (
|
|
695
|
-
|
|
696
|
-
|
|
723
|
+
.map((y) => (react_1.default.createElement(material_1.Box, null,
|
|
724
|
+
react_1.default.createElement(material_1.Skeleton, { width: 60 }),
|
|
725
|
+
react_1.default.createElement(material_1.Skeleton, { width: 120 }))))))))));
|
|
697
726
|
if (!userLoaded && useKC)
|
|
698
|
-
return
|
|
699
|
-
return (
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
startAdornment:
|
|
727
|
+
return react_1.default.createElement(material_1.LinearProgress, null);
|
|
728
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
729
|
+
react_1.default.createElement(material_1.Box, Object.assign({ marginX: isSmall ? customMarginMobile : customMargin, bgcolor: 'white', p: 2, borderRadius: 6 }, customTableStyle),
|
|
730
|
+
react_1.default.createElement(material_1.Stack, { spacing: 1.5, direction: { xs: 'column', md: 'row' } },
|
|
731
|
+
react_1.default.createElement(material_1.Stack, { spacing: 1.5, direction: { xs: 'column', md: 'row' }, height: { md: '40px', xs: 'inherit' }, width: '100%' },
|
|
732
|
+
react_1.default.createElement(TextField_1.default, { InputProps: {
|
|
733
|
+
startAdornment: react_1.default.createElement(Search_1.default, { sx: { marginRight: 1, fill: '#c0c0c0' } }),
|
|
705
734
|
sx: {
|
|
706
735
|
'.MuiOutlinedInput-notchedOutline': { border: 'none' },
|
|
707
736
|
},
|
|
@@ -711,24 +740,24 @@ hideTitleCSV = false, csvExcludeUpper = [], multipleDataPath = '', expandTextMax
|
|
|
711
740
|
borderRadius: '50px',
|
|
712
741
|
maxWidth: '600px',
|
|
713
742
|
}, size: 'small', onChange: onInputChange, fullWidth: true, placeholder: `Pesquisar ${tableName}` }),
|
|
714
|
-
|
|
743
|
+
react_1.default.createElement(material_1.Button, { startIcon: react_1.default.createElement(icons_material_1.FilterAlt, null), variant: 'contained', onClick: (e) => Modal_1.MODAL.open(react_1.default.createElement(CriarFiltro, { key: filterKey, reset: reset, filtrar: filtrar, baseFilters: [...filters], filters: localStorage.getItem(localTableName) ? JSON.parse(localStorage.getItem(localTableName)) : [...filters] })), sx: {
|
|
715
744
|
borderRadius: 3,
|
|
716
745
|
paddingX: '24px',
|
|
717
746
|
paddingY: '8px',
|
|
718
747
|
backgroundColor: '#208FE8',
|
|
719
748
|
textTransform: 'capitalize',
|
|
720
749
|
} },
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
750
|
+
react_1.default.createElement(material_1.Stack, { direction: 'row', borderRadius: 5, padding: 0 },
|
|
751
|
+
react_1.default.createElement("span", null, "Filtrar"))),
|
|
752
|
+
react_1.default.createElement(material_1.Stack, { direction: 'row', spacing: 1 },
|
|
753
|
+
react_1.default.createElement(CustomMenu_1.default, { data: orderBy.map((x) => ({
|
|
725
754
|
name: x.label,
|
|
726
755
|
onClick: () => ordenar(x),
|
|
727
756
|
})), btProps: {
|
|
728
|
-
startIcon:
|
|
757
|
+
startIcon: react_1.default.createElement(icons_material_1.KeyboardArrowDown, null),
|
|
729
758
|
fullWidth: true,
|
|
730
759
|
} }, "Ordenar"),
|
|
731
|
-
|
|
760
|
+
react_1.default.createElement(material_1.Button, { variant: 'contained', fullWidth: true, startIcon: isExpandAll ? react_1.default.createElement(icons_material_1.KeyboardArrowUp, null) : react_1.default.createElement(icons_material_1.KeyboardArrowDown, null), sx: {
|
|
732
761
|
backgroundColor: '#637082',
|
|
733
762
|
':hover': {
|
|
734
763
|
backgroundColor: '#3c4757',
|
|
@@ -739,32 +768,32 @@ hideTitleCSV = false, csvExcludeUpper = [], multipleDataPath = '', expandTextMax
|
|
|
739
768
|
md: '0px 8px',
|
|
740
769
|
},
|
|
741
770
|
}, onClick: expandAll }, isExpandAll ? 'Recolher' : 'Expandir'))),
|
|
742
|
-
|
|
743
|
-
|
|
771
|
+
react_1.default.createElement(material_1.Stack, { alignItems: 'end', width: { xs: '100%', md: '20%' }, direction: { xs: 'row', md: 'column' }, spacing: { xs: 1, md: 0 } },
|
|
772
|
+
react_1.default.createElement(Typography_1.default, { fontWeight: 600, textAlign: 'end' },
|
|
744
773
|
"Registro de ",
|
|
745
774
|
tableName,
|
|
746
775
|
"s"),
|
|
747
|
-
|
|
748
|
-
|
|
776
|
+
react_1.default.createElement(material_1.Stack, { justifyContent: 'center' },
|
|
777
|
+
react_1.default.createElement(Typography_1.default, null,
|
|
749
778
|
"Exibindo ",
|
|
750
779
|
currentPage * itemsCount + 1,
|
|
751
780
|
"-",
|
|
752
781
|
currentPage * itemsCount + 1 + getMaxItems().length - 1,
|
|
753
782
|
" de ",
|
|
754
783
|
list.length)))),
|
|
755
|
-
localStorage.getItem(localTableName) && (
|
|
784
|
+
localStorage.getItem(localTableName) && (react_1.default.createElement(material_1.Box, { display: 'inline-flex', flexWrap: 'wrap', padding: 0.5, borderRadius: 4, marginBottom: 1 }, JSON.parse((_a = localStorage.getItem(localTableName)) !== null && _a !== void 0 ? _a : '[]')
|
|
756
785
|
.filter((x) => x.value || (x.operator === 'entre' && (x.value || x.value2)))
|
|
757
|
-
.map((x) => (
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
786
|
+
.map((x) => (react_1.default.createElement(material_1.Stack, { direction: 'row', spacing: 1, bgcolor: '#4e85c1', color: 'white', width: 'fit-content', paddingY: 0.5, borderRadius: 2, paddingX: 1, m: 0.5 },
|
|
787
|
+
react_1.default.createElement(Typography_1.default, { fontWeight: 700 }, x.label),
|
|
788
|
+
react_1.default.createElement(Typography_1.default, { fontStyle: 'italic' }, x.operator),
|
|
789
|
+
react_1.default.createElement(Typography_1.default, { bgcolor: 'white', borderRadius: 2, paddingX: 1, color: 'black' }, Array.isArray(x.value)
|
|
761
790
|
? x.value.map((x) => x.label).join(' - ')
|
|
762
791
|
: typeof x.value === 'object'
|
|
763
792
|
? x.value.label
|
|
764
793
|
: x.operator === 'entre'
|
|
765
794
|
? `${x.value ? x.value : 'Antes'} e ${x.value2 ? x.value2 : 'Depois'}`
|
|
766
795
|
: x.value.toString()),
|
|
767
|
-
|
|
796
|
+
react_1.default.createElement(material_1.IconButton, { onClick: (e) => {
|
|
768
797
|
var _a;
|
|
769
798
|
let currentValue = JSON.parse((_a = localStorage.getItem(localTableName)) !== null && _a !== void 0 ? _a : '[]');
|
|
770
799
|
currentValue = currentValue.map((item) => {
|
|
@@ -777,71 +806,71 @@ hideTitleCSV = false, csvExcludeUpper = [], multipleDataPath = '', expandTextMax
|
|
|
777
806
|
}, size: 'small', sx: {
|
|
778
807
|
padding: 0,
|
|
779
808
|
} },
|
|
780
|
-
|
|
809
|
+
react_1.default.createElement(Clear_1.default, { sx: {
|
|
781
810
|
fill: 'white',
|
|
782
811
|
} }))))))),
|
|
783
|
-
|
|
784
|
-
|
|
812
|
+
react_1.default.createElement(material_1.Stack, { spacing: 0.2 }, getMaxItems().length <= 0 ? (react_1.default.createElement(material_1.Stack, { sx: { backgroundColor: '#E2E8F0', padding: 2, marginX: { xs: 2, md: 0 } }, justifyContent: 'center', alignItems: 'center' },
|
|
813
|
+
react_1.default.createElement(Typography_1.default, { fontSize: 21, fontFamily: 'Inter', fontWeight: 600, textAlign: 'center' }, user ? emptyMsg.user : emptyMsg.public))) : (getMaxItems().map((x, index) => (react_1.default.createElement(material_1.Paper, { key: index, sx: {
|
|
785
814
|
padding: 0.5,
|
|
786
815
|
backgroundColor: index % 2 === 0 ? '#F8FAFC' : 'white',
|
|
787
816
|
paddingTop: 2,
|
|
788
817
|
borderTop: 'solid 1.5px #E2E8F0',
|
|
789
818
|
position: 'relative',
|
|
790
819
|
}, elevation: 0 },
|
|
791
|
-
|
|
820
|
+
react_1.default.createElement(Grid_1.default, { container: true, spacing: isSmall ? 2 : 0, paddingX: 2, rowSpacing: 2 },
|
|
792
821
|
columns.map((c) => {
|
|
793
822
|
var _a, _b;
|
|
794
|
-
return (
|
|
823
|
+
return (react_1.default.createElement(Grid_1.default, { key: c.keyName + index, item: true, xs: 12, md: lg ? (12 / columnSize) * (!!c.size ? c.size : 1) : mediaQueryLG ? mediaQueryLG.all : (12 / columnSize) * (!!c.size ? c.size : 1), sx: {
|
|
795
824
|
overflow: 'hidden',
|
|
796
825
|
} },
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
826
|
+
react_1.default.createElement(material_1.Box, { sx: { width: 'max-content', paddingX: 1 } },
|
|
827
|
+
react_1.default.createElement(Typography_1.default, { fontSize: 16, fontWeight: 700, color: '#1E293B', fontFamily: 'Inter' }, c.title)),
|
|
828
|
+
react_1.default.createElement(material_1.Box, { paddingLeft: 1, position: 'relative' },
|
|
829
|
+
react_1.default.createElement(material_1.Collapse, { in: expandObj[index] === true, collapsedSize: collapsedSize, onExited: (e) => setShowExpandObjOnExited((s) => (Object.assign(Object.assign({}, s), { [index]: false }))) },
|
|
830
|
+
react_1.default.createElement(material_1.Box, { sx: {
|
|
802
831
|
wordWrap: 'break-word',
|
|
803
832
|
color: '#1E293B',
|
|
804
833
|
fontSize: 16,
|
|
805
834
|
}, fontFamily: 'Inter' },
|
|
806
|
-
|
|
807
|
-
|
|
835
|
+
react_1.default.createElement(material_1.Box, null, c.customComponent ? (c.customComponent((0, lodash_get_1.default)(x, c.keyName), x)) : (react_1.default.createElement(material_1.Box, { color: 'transparent', sx: { pointerEvents: 'none', userSelect: 'none' } }, (0, lodash_get_1.default)(x, c.keyName, '')))),
|
|
836
|
+
react_1.default.createElement(material_1.Box, { position: 'absolute', top: 0 }, c.customComponent ? (c.customComponent((0, lodash_get_1.default)(x, c.keyName), x)) : (react_1.default.createElement(react_1.default.Fragment, null, showExpandObjOnExited[index] ? ((0, lodash_get_1.default)(x, c.keyName, '')) : ((_a = (0, lodash_get_1.default)(x, c.keyName, '')) !== null && _a !== void 0 ? _a : '').toString().length >= expandTextMaxLength ? (react_1.default.createElement(react_1.default.Fragment, null, ((_b = (0, lodash_get_1.default)(x, c.keyName, '')) !== null && _b !== void 0 ? _b : '').toString().substring(0, expandTextMaxLength) + '...')) : ((0, lodash_get_1.default)(x, c.keyName, ''))))))))));
|
|
808
837
|
}),
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
showExpandObj[index] && (
|
|
812
|
-
|
|
838
|
+
react_1.default.createElement(Grid_1.default, { item: true, xs: 12, md: lg ? 12 / columnSize : mediaQueryLG ? mediaQueryLG.action : 12 / columnSize },
|
|
839
|
+
react_1.default.createElement(material_1.Stack, { direction: 'row', alignItems: 'center', justifyContent: isSmall ? 'start' : 'flex-end', sx: { height: '100%', paddingBottom: isSmall ? 2 : 0 } }, action(x))),
|
|
840
|
+
showExpandObj[index] && (react_1.default.createElement(material_1.Stack, { direction: 'row', justifyContent: 'flex-end', bottom: 0, width: '100%' },
|
|
841
|
+
react_1.default.createElement(material_1.Button, { onClick: (e) => {
|
|
813
842
|
setExpandObj((s) => (Object.assign(Object.assign({}, s), { [index]: !s[index] })));
|
|
814
843
|
setShowExpandObjOnExited((s) => (Object.assign(Object.assign({}, s), { [index]: true })));
|
|
815
844
|
}, sx: {
|
|
816
845
|
padding: 0,
|
|
817
846
|
color: '#637082',
|
|
818
847
|
textTransform: 'capitalize',
|
|
819
|
-
}, startIcon: expandObj[index] ?
|
|
820
|
-
getMaxItems().length > 0 && (
|
|
848
|
+
}, startIcon: expandObj[index] ? react_1.default.createElement(icons_material_1.ExpandLess, null) : react_1.default.createElement(icons_material_1.ExpandMore, null) }, expandObj[index] ? 'Ver Menos' : 'Ver Mais'))))))))),
|
|
849
|
+
getMaxItems().length > 0 && (react_1.default.createElement(material_1.Stack, { padding: 1, direction: {
|
|
821
850
|
xs: 'column',
|
|
822
851
|
md: 'row',
|
|
823
852
|
}, spacing: {
|
|
824
853
|
xs: 2,
|
|
825
854
|
md: 0,
|
|
826
|
-
}, justifyContent: 'space-between', alignItems: 'center' }, csv && (
|
|
855
|
+
}, justifyContent: 'space-between', alignItems: 'center' }, csv && (react_1.default.createElement(material_1.Stack, { direction: {
|
|
827
856
|
xs: 'column',
|
|
828
857
|
md: 'row',
|
|
829
858
|
}, justifyContent: 'flex-end', spacing: 1 },
|
|
830
|
-
csvWithoutZip && (
|
|
831
|
-
csvShowAllButton && (
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
859
|
+
csvWithoutZip && (react_1.default.createElement(material_1.Button, { startIcon: react_1.default.createElement(FileDownload_1.default, null), variant: 'contained', size: 'small', onClick: downloadCSV, sx: { backgroundColor: '#5a88b0', marginRight: { xs: 2, md: 0 }, width: { xs: '100%', md: 'fit-content' } } }, csvNoZipText)),
|
|
860
|
+
csvShowAllButton && (react_1.default.createElement(material_1.Button, { startIcon: react_1.default.createElement(FileDownload_1.default, null), variant: 'contained', size: 'small', onClick: downloadCSVAll, sx: { backgroundColor: '#64748B', marginRight: { xs: 2, md: 0 }, width: { xs: '100%', md: 'fit-content' } } }, csvAllButtonTitle)),
|
|
861
|
+
react_1.default.createElement(material_1.Button, { startIcon: react_1.default.createElement(FileDownload_1.default, null), variant: 'contained', size: 'small', onClick: (e) => downloadCSV(e, true), sx: { backgroundColor: '#22C55E', marginRight: { xs: 2, md: 0 }, width: { xs: '100%', md: 'fit-content' } } }, csvButtonTitle)))))),
|
|
862
|
+
react_1.default.createElement(material_1.Stack, { direction: 'row', justifyContent: 'center', paddingY: 1, paddingTop: 2 },
|
|
863
|
+
react_1.default.createElement(material_1.Stack, { direction: 'row', justifyContent: 'center', alignItems: 'center', spacing: 2 },
|
|
864
|
+
react_1.default.createElement(material_1.Button, { onClick: (e) => setListPage((s) => {
|
|
836
865
|
if (s > 1) {
|
|
837
866
|
return s - 1;
|
|
838
867
|
}
|
|
839
868
|
return 1;
|
|
840
869
|
}), sx: { bgcolor: 'white', borderRadius: '50px', height: '40px', width: '40px', minWidth: 0, border: 'solid 1px #E2E8F0' } },
|
|
841
|
-
|
|
842
|
-
|
|
870
|
+
react_1.default.createElement(NavigateNextRounded_1.default, { sx: { transform: 'scale(1.5) scaleX(-1)' } })),
|
|
871
|
+
react_1.default.createElement(Pagination_1.default, { renderItem: (item) => {
|
|
843
872
|
if (item.type === 'page')
|
|
844
|
-
return (
|
|
873
|
+
return (react_1.default.createElement(material_1.Button, { onClick: item.onClick, sx: Object.assign(Object.assign({ fontWeight: 600 }, (item.selected
|
|
845
874
|
? {
|
|
846
875
|
bgcolor: '#33B55D',
|
|
847
876
|
color: 'white',
|
|
@@ -850,7 +879,7 @@ hideTitleCSV = false, csvExcludeUpper = [], multipleDataPath = '', expandTextMax
|
|
|
850
879
|
color: '#1E293B',
|
|
851
880
|
})), { borderRadius: '100%', padding: 0, margin: 0, minWidth: 0, width: '40px', height: '40px', marginX: 0.25 }) }, item.page));
|
|
852
881
|
if (!['next', 'previous', 'page'].includes(item.type))
|
|
853
|
-
return
|
|
882
|
+
return react_1.default.createElement(material_1.PaginationItem, Object.assign({}, item));
|
|
854
883
|
}, count: paginationCount, siblingCount: isSmall ? 0 : 6, size: 'large', onChange: onPaginationChange, page: listPage, shape: 'circular', variant: 'outlined', sx: {
|
|
855
884
|
'.MuiPagination-ul': {
|
|
856
885
|
backgroundColor: 'white',
|
|
@@ -860,23 +889,24 @@ hideTitleCSV = false, csvExcludeUpper = [], multipleDataPath = '', expandTextMax
|
|
|
860
889
|
paddingY: 0.5,
|
|
861
890
|
},
|
|
862
891
|
} }),
|
|
863
|
-
|
|
892
|
+
react_1.default.createElement(material_1.Button, { onClick: (e) => setListPage((s) => {
|
|
864
893
|
if (s < paginationCount) {
|
|
865
894
|
return s + 1;
|
|
866
895
|
}
|
|
867
896
|
return paginationCount;
|
|
868
897
|
}), sx: { bgcolor: 'white', borderRadius: '50px', height: '40px', width: '40px', minWidth: 0, border: 'solid 1px #E2E8F0' } },
|
|
869
|
-
|
|
898
|
+
react_1.default.createElement(NavigateNextRounded_1.default, { sx: { transform: 'scale(1.5)' } }))))));
|
|
870
899
|
}
|
|
900
|
+
exports.Table = Table;
|
|
871
901
|
function CriarFiltro({ filters, baseFilters, filtrar, reset }) {
|
|
872
|
-
const [data, setData] = useState(filters);
|
|
873
|
-
const [resetFields, setResetFields] = useState(false);
|
|
902
|
+
const [data, setData] = (0, react_1.useState)(filters);
|
|
903
|
+
const [resetFields, setResetFields] = (0, react_1.useState)(false);
|
|
874
904
|
function addRule(filter) {
|
|
875
905
|
setData((dt) => {
|
|
876
906
|
return [...dt, filter];
|
|
877
907
|
});
|
|
878
908
|
}
|
|
879
|
-
const [anchorEl, setAnchorEl] =
|
|
909
|
+
const [anchorEl, setAnchorEl] = react_1.default.useState(null);
|
|
880
910
|
const open = Boolean(anchorEl);
|
|
881
911
|
const handleClick = (event) => {
|
|
882
912
|
setAnchorEl(event.currentTarget);
|
|
@@ -884,25 +914,25 @@ function CriarFiltro({ filters, baseFilters, filtrar, reset }) {
|
|
|
884
914
|
const handleClose = () => {
|
|
885
915
|
setAnchorEl(null);
|
|
886
916
|
};
|
|
887
|
-
return (
|
|
917
|
+
return (react_1.default.createElement(material_1.Box, { width: {
|
|
888
918
|
xs: 'inherit',
|
|
889
919
|
md: 850,
|
|
890
920
|
} },
|
|
891
|
-
|
|
921
|
+
react_1.default.createElement(material_1.Menu, { open: open, onClose: handleClose, anchorEl: anchorEl }, baseFilters.map((x) => (react_1.default.createElement(material_1.MenuItem, { onClick: (e) => {
|
|
892
922
|
addRule(x);
|
|
893
923
|
setAnchorEl(null);
|
|
894
924
|
} }, x.label)))),
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
925
|
+
react_1.default.createElement(material_1.Stack, { direction: 'row', justifyContent: 'space-between' },
|
|
926
|
+
react_1.default.createElement(Typography_1.default, { fontWeight: 700, fontSize: 18 }, "Filtrar"),
|
|
927
|
+
react_1.default.createElement(material_1.Button, { startIcon: react_1.default.createElement(icons_material_1.Refresh, null), sx: {
|
|
898
928
|
textTransform: 'capitalize',
|
|
899
929
|
}, onClick: (e) => {
|
|
900
930
|
reset();
|
|
901
|
-
MODAL.close();
|
|
931
|
+
Modal_1.MODAL.close();
|
|
902
932
|
} }, "Limpar")),
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
933
|
+
react_1.default.createElement(material_1.Box, { marginBottom: 1 },
|
|
934
|
+
react_1.default.createElement(material_1.Alert, { severity: 'warning' }, "Preencha apenas os campos que deseja filtrar.")),
|
|
935
|
+
react_1.default.createElement(material_1.Stack, null, resetFields ? (data.map((d, idx) => (react_1.default.createElement(FilterRow, { filterValue: d, setReset: setResetFields, idx: idx, setDt: (valueData) => {
|
|
906
936
|
setData((dt) => {
|
|
907
937
|
let arr = [...dt];
|
|
908
938
|
arr[idx] = valueData;
|
|
@@ -914,7 +944,7 @@ function CriarFiltro({ filters, baseFilters, filtrar, reset }) {
|
|
|
914
944
|
arr.splice(idx, 1);
|
|
915
945
|
return arr;
|
|
916
946
|
});
|
|
917
|
-
} })))) : (
|
|
947
|
+
} })))) : (react_1.default.createElement(material_1.Box, null, data.map((d, idx) => (react_1.default.createElement(FilterRow, { filterValue: d, setReset: setResetFields, idx: idx, setDt: (valueData) => {
|
|
918
948
|
setData((dt) => {
|
|
919
949
|
let arr = [...dt];
|
|
920
950
|
arr[idx] = valueData;
|
|
@@ -927,43 +957,43 @@ function CriarFiltro({ filters, baseFilters, filtrar, reset }) {
|
|
|
927
957
|
return arr;
|
|
928
958
|
});
|
|
929
959
|
} })))))),
|
|
930
|
-
|
|
931
|
-
|
|
960
|
+
react_1.default.createElement(material_1.Stack, { direction: 'row', justifyContent: 'flex-end', marginTop: 1 },
|
|
961
|
+
react_1.default.createElement(material_1.Button, { variant: 'contained', color: 'success', startIcon: react_1.default.createElement(Search_1.default, null), sx: {
|
|
932
962
|
textTransform: 'capitalize',
|
|
933
963
|
}, onClick: (e) => {
|
|
934
964
|
filtrar(data);
|
|
935
|
-
MODAL.close();
|
|
965
|
+
Modal_1.MODAL.close();
|
|
936
966
|
} }, "Filtrar"))));
|
|
937
967
|
}
|
|
938
968
|
function FilterRow({ filterValue, setDt, removeDt, idx, setReset, }) {
|
|
939
|
-
const [currentOperator, setCurrentOperator] = useState(filterValue.operator);
|
|
940
|
-
const [data, setData] = useState(filterValue);
|
|
941
|
-
const theme = useTheme();
|
|
942
|
-
const isSmall = useMediaQuery(theme.breakpoints.only('xs'));
|
|
943
|
-
useEffect(() => {
|
|
969
|
+
const [currentOperator, setCurrentOperator] = (0, react_1.useState)(filterValue.operator);
|
|
970
|
+
const [data, setData] = (0, react_1.useState)(filterValue);
|
|
971
|
+
const theme = (0, material_1.useTheme)();
|
|
972
|
+
const isSmall = (0, material_1.useMediaQuery)(theme.breakpoints.only('xs'));
|
|
973
|
+
(0, react_1.useEffect)(() => {
|
|
944
974
|
setDt(data);
|
|
945
975
|
}, [data]);
|
|
946
|
-
return (
|
|
947
|
-
!isSmall && (
|
|
948
|
-
|
|
976
|
+
return (react_1.default.createElement(material_1.Stack, { direction: 'row', alignItems: 'end', spacing: 1, width: '100%', bgcolor: idx % 2 === 0 ? '#ededed' : 'inherit', padding: 0.5, borderRadius: 2 },
|
|
977
|
+
!isSmall && (react_1.default.createElement(Typography_1.default, { width: '100%', alignContent: 'center', fontWeight: 600, color: '#323232' }, filterValue.label)),
|
|
978
|
+
react_1.default.createElement(material_1.FormControl, { sx: {
|
|
949
979
|
width: '100%',
|
|
950
980
|
} },
|
|
951
|
-
isSmall &&
|
|
952
|
-
|
|
981
|
+
isSmall && react_1.default.createElement(Typography_1.default, null, filterValue.label),
|
|
982
|
+
react_1.default.createElement(material_1.Select, { onChange: (e) => {
|
|
953
983
|
const value = e.target.value;
|
|
954
984
|
setData((obj) => (Object.assign(Object.assign({}, obj), { operator: value, value: '' })));
|
|
955
985
|
setCurrentOperator(value);
|
|
956
986
|
}, defaultValue: currentOperator, size: 'small', sx: {
|
|
957
987
|
bgcolor: 'white',
|
|
958
|
-
}, fullWidth: true }, filterValue.operators.map((x) => (
|
|
959
|
-
|
|
988
|
+
}, fullWidth: true }, filterValue.operators.map((x) => (react_1.default.createElement(material_1.MenuItem, { value: x }, x))))),
|
|
989
|
+
react_1.default.createElement(FilterField, { filterValue: filterValue, operator: data.operator, onChange: (value, type = 'value') => {
|
|
960
990
|
setData((obj) => (Object.assign(Object.assign({}, obj), { [type]: value })));
|
|
961
991
|
} })));
|
|
962
992
|
}
|
|
963
993
|
function FilterField({ filterValue, operator, onChange }) {
|
|
964
994
|
switch (filterValue.type) {
|
|
965
995
|
case 'number':
|
|
966
|
-
return (
|
|
996
|
+
return (react_1.default.createElement(TextField_1.default, { type: 'number', size: 'small', placeholder: 'Valor', defaultValue: filterValue.value, onChange: (e) => {
|
|
967
997
|
onChange(e.target.value);
|
|
968
998
|
}, sx: {
|
|
969
999
|
bgcolor: 'white',
|
|
@@ -972,24 +1002,24 @@ function FilterField({ filterValue, operator, onChange }) {
|
|
|
972
1002
|
if (filterValue.useList) {
|
|
973
1003
|
switch (operator) {
|
|
974
1004
|
case 'tem um dos':
|
|
975
|
-
return (
|
|
1005
|
+
return (react_1.default.createElement(material_1.Autocomplete, { multiple: true, id: 'tags-standard', onChange: (e, value) => {
|
|
976
1006
|
if (value.length <= 0) {
|
|
977
1007
|
onChange('');
|
|
978
1008
|
return;
|
|
979
1009
|
}
|
|
980
1010
|
onChange(value);
|
|
981
|
-
}, options: filterValue.useList, defaultValue: Array.isArray(filterValue.value) ? filterValue.value : [], renderInput: (params) =>
|
|
1011
|
+
}, options: filterValue.useList, defaultValue: Array.isArray(filterValue.value) ? filterValue.value : [], renderInput: (params) => react_1.default.createElement(TextField_1.default, Object.assign({}, params, { variant: 'standard', placeholder: 'Escolha os valores', fullWidth: true })), fullWidth: true }));
|
|
982
1012
|
case 'contem':
|
|
983
1013
|
case 'igual':
|
|
984
|
-
return (
|
|
985
|
-
|
|
1014
|
+
return (react_1.default.createElement(material_1.Box, { width: '100%' },
|
|
1015
|
+
react_1.default.createElement(material_1.Autocomplete, { options: filterValue.useList, onChange: (e, value) => {
|
|
986
1016
|
onChange(value);
|
|
987
|
-
}, defaultValue: typeof filterValue.value === 'object' ? filterValue.value : undefined, isOptionEqualToValue: (option, value) => option.label === value.label, renderInput: (params) => (
|
|
1017
|
+
}, defaultValue: typeof filterValue.value === 'object' ? filterValue.value : undefined, isOptionEqualToValue: (option, value) => option.label === value.label, renderInput: (params) => (react_1.default.createElement(TextField_1.default, Object.assign({}, params, { size: 'small', placeholder: 'Escolha um valor', fullWidth: true, sx: {
|
|
988
1018
|
bgcolor: 'white',
|
|
989
1019
|
} }))), fullWidth: true })));
|
|
990
1020
|
}
|
|
991
1021
|
}
|
|
992
|
-
return (
|
|
1022
|
+
return (react_1.default.createElement(TextField_1.default, { size: 'small', placeholder: 'Valor', defaultValue: filterValue.value, onChange: (e) => {
|
|
993
1023
|
onChange(e.target.value);
|
|
994
1024
|
}, sx: {
|
|
995
1025
|
bgcolor: 'white',
|
|
@@ -1001,10 +1031,10 @@ function FilterField({ filterValue, operator, onChange }) {
|
|
|
1001
1031
|
case 'data fim':
|
|
1002
1032
|
case 'data inicio':
|
|
1003
1033
|
case 'tem a data':
|
|
1004
|
-
return (
|
|
1005
|
-
|
|
1034
|
+
return (react_1.default.createElement(x_date_pickers_1.LocalizationProvider, { adapterLocale: 'pt-br', dateAdapter: AdapterDayjs_1.AdapterDayjs },
|
|
1035
|
+
react_1.default.createElement(x_date_pickers_1.DatePicker, { format: 'DD/MM/YYYY', onChange: (dt) => {
|
|
1006
1036
|
onChange(dt.isValid() ? dt.format('DD/MM/YYYY') : '');
|
|
1007
|
-
}, defaultValue: filterValue.value ?
|
|
1037
|
+
}, defaultValue: filterValue.value ? (0, dayjs_1.default)(filterValue.value, 'DD/MM/YYYY') : undefined, sx: {
|
|
1008
1038
|
div: {
|
|
1009
1039
|
input: {
|
|
1010
1040
|
paddingX: 2,
|
|
@@ -1013,12 +1043,12 @@ function FilterField({ filterValue, operator, onChange }) {
|
|
|
1013
1043
|
},
|
|
1014
1044
|
width: '100%',
|
|
1015
1045
|
bgcolor: 'white',
|
|
1016
|
-
}, inputRef: (params) =>
|
|
1046
|
+
}, inputRef: (params) => react_1.default.createElement(TextField_1.default, Object.assign({}, params, { size: 'small', fullWidth: true })) })));
|
|
1017
1047
|
case 'entre':
|
|
1018
|
-
return (
|
|
1019
|
-
|
|
1048
|
+
return (react_1.default.createElement(x_date_pickers_1.LocalizationProvider, { adapterLocale: 'pt-br', dateAdapter: AdapterDayjs_1.AdapterDayjs },
|
|
1049
|
+
react_1.default.createElement(x_date_pickers_1.DatePicker, { format: 'DD/MM/YYYY', onChange: (dt) => {
|
|
1020
1050
|
onChange(dt.isValid() ? dt.format('DD/MM/YYYY') : '');
|
|
1021
|
-
}, defaultValue: filterValue.value ?
|
|
1051
|
+
}, defaultValue: filterValue.value ? (0, dayjs_1.default)(filterValue.value, 'DD/MM/YYYY') : undefined, sx: {
|
|
1022
1052
|
div: {
|
|
1023
1053
|
input: {
|
|
1024
1054
|
paddingX: 2,
|
|
@@ -1027,10 +1057,10 @@ function FilterField({ filterValue, operator, onChange }) {
|
|
|
1027
1057
|
},
|
|
1028
1058
|
width: '100%',
|
|
1029
1059
|
bgcolor: 'white',
|
|
1030
|
-
}, inputRef: (params) =>
|
|
1031
|
-
|
|
1060
|
+
}, inputRef: (params) => react_1.default.createElement(TextField_1.default, Object.assign({}, params, { size: 'small', fullWidth: true })) }),
|
|
1061
|
+
react_1.default.createElement(x_date_pickers_1.DatePicker, { format: 'DD/MM/YYYY', onChange: (dt) => {
|
|
1032
1062
|
onChange(dt.isValid() ? dt.format('DD/MM/YYYY') : '', 'value2');
|
|
1033
|
-
}, defaultValue: filterValue.value2 ?
|
|
1063
|
+
}, defaultValue: filterValue.value2 ? (0, dayjs_1.default)(filterValue.value2, 'DD/MM/YYYY') : undefined, sx: {
|
|
1034
1064
|
div: {
|
|
1035
1065
|
input: {
|
|
1036
1066
|
paddingX: 2,
|
|
@@ -1039,10 +1069,10 @@ function FilterField({ filterValue, operator, onChange }) {
|
|
|
1039
1069
|
},
|
|
1040
1070
|
width: '100%',
|
|
1041
1071
|
bgcolor: 'white',
|
|
1042
|
-
}, inputRef: (params) =>
|
|
1072
|
+
}, inputRef: (params) => react_1.default.createElement(TextField_1.default, Object.assign({}, params, { size: 'small', fullWidth: true })) })));
|
|
1043
1073
|
}
|
|
1044
1074
|
break;
|
|
1045
1075
|
}
|
|
1046
|
-
return
|
|
1076
|
+
return react_1.default.createElement(react_1.default.Fragment, null);
|
|
1047
1077
|
}
|
|
1048
|
-
|
|
1078
|
+
exports.default = react_1.default.memo(Table);
|