@onehat/ui 0.3.373 → 0.3.374
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onehat/ui",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.374",
|
|
4
4
|
"description": "Base UI for OneHat apps",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@gluestack-ui/themed": "^1.1.26",
|
|
32
32
|
"@hookform/resolvers": "^3.3.1",
|
|
33
33
|
"@k-renwick/colour-mixer": "^1.2.1",
|
|
34
|
-
"@onehat/data": "^1.21.
|
|
34
|
+
"@onehat/data": "^1.21.18",
|
|
35
35
|
"@react-native-community/slider": "^4.5.2",
|
|
36
36
|
"@reduxjs/toolkit": "^1.9.5",
|
|
37
37
|
"inflector-js": "^1.0.1",
|
|
@@ -238,10 +238,17 @@ export default function withFilters(WrappedComponent) {
|
|
|
238
238
|
return filter?.type;
|
|
239
239
|
},
|
|
240
240
|
getIsFilterRange = (filter) => {
|
|
241
|
-
let
|
|
242
|
-
|
|
241
|
+
let filterType;
|
|
242
|
+
if (filter.type) {
|
|
243
|
+
// filter type is already determined
|
|
244
|
+
filterType = filter.type;
|
|
245
|
+
} else {
|
|
246
|
+
// try to find filter type from field name
|
|
247
|
+
const field = _.isString(filter) ? filter : filter.field;
|
|
248
|
+
filterType = getFilterType(field);
|
|
249
|
+
}
|
|
243
250
|
if (filterType?.type) {
|
|
244
|
-
|
|
251
|
+
filterType = filterType.type;
|
|
245
252
|
}
|
|
246
253
|
return inArray(filterType, ['NumberRange', 'DateRange']);
|
|
247
254
|
},
|
|
@@ -23,6 +23,10 @@ function UploadsDownloadsWindow(props) {
|
|
|
23
23
|
{
|
|
24
24
|
Repository,
|
|
25
25
|
columnsConfig = [],
|
|
26
|
+
uploadHeaders,
|
|
27
|
+
downloadHeaders,
|
|
28
|
+
uploadParams = {},
|
|
29
|
+
downloadParams = {},
|
|
26
30
|
|
|
27
31
|
// withComponent
|
|
28
32
|
self,
|
|
@@ -64,8 +68,9 @@ function UploadsDownloadsWindow(props) {
|
|
|
64
68
|
order,
|
|
65
69
|
model,
|
|
66
70
|
isTemplate,
|
|
71
|
+
...downloadParams,
|
|
67
72
|
}),
|
|
68
|
-
headers: _.merge({ 'Content-Type': 'application/json' }, Repository.headers),
|
|
73
|
+
headers: _.merge({ 'Content-Type': 'application/json' }, Repository.headers, downloadHeaders),
|
|
69
74
|
},
|
|
70
75
|
fetchWindow = downloadWithFetch(url, options, win),
|
|
71
76
|
interval = setInterval(function() {
|
|
@@ -83,7 +88,7 @@ function UploadsDownloadsWindow(props) {
|
|
|
83
88
|
onUpload = async () => {
|
|
84
89
|
const
|
|
85
90
|
url = Repository.api.baseURL + Repository.name + '/uploadBatch',
|
|
86
|
-
result = await Repository._send('POST', url, { importFile })
|
|
91
|
+
result = await Repository._send('POST', url, { importFile, ...uploadParams, }, uploadHeaders)
|
|
87
92
|
.catch(error => {
|
|
88
93
|
if (Repository.debugMode) {
|
|
89
94
|
console.log(url + ' error', error);
|