@onehat/ui 0.3.301 → 0.3.303
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,11 +1,12 @@
|
|
|
1
1
|
import { Platform } from "react-native";
|
|
2
|
+
import UiGlobals from '../UiGlobals.js';
|
|
2
3
|
|
|
3
4
|
// This adds a data-testid attribute to the DOM node,
|
|
4
5
|
// which can be quried in Cypress by: document.querySelector(`[data-testid='MyTestId']`);
|
|
5
6
|
|
|
6
7
|
export default function testProps(id) {
|
|
7
|
-
if (
|
|
8
|
-
return {};
|
|
8
|
+
if (!UiGlobals.debugMode) {
|
|
9
|
+
return {};
|
|
9
10
|
}
|
|
10
11
|
if (id?.path) { // id is actually 'self' object
|
|
11
12
|
id = id.path;
|
|
@@ -29,7 +29,7 @@ import _ from 'lodash';
|
|
|
29
29
|
|
|
30
30
|
const
|
|
31
31
|
EXPANDED_MAX = 100,
|
|
32
|
-
COLLAPSED_MAX =
|
|
32
|
+
COLLAPSED_MAX = 4;
|
|
33
33
|
|
|
34
34
|
function FileCardCustom(props) {
|
|
35
35
|
const
|
|
@@ -83,6 +83,8 @@ function AttachmentsElement(props) {
|
|
|
83
83
|
extraUploadData = {},
|
|
84
84
|
expandedMax = EXPANDED_MAX,
|
|
85
85
|
collapsedMax = COLLAPSED_MAX,
|
|
86
|
+
autoUpload = true,
|
|
87
|
+
onBeforeDropzoneChange,
|
|
86
88
|
|
|
87
89
|
// parentContainer
|
|
88
90
|
selectorSelected,
|
|
@@ -145,6 +147,9 @@ function AttachmentsElement(props) {
|
|
|
145
147
|
...extraUploadData,
|
|
146
148
|
};
|
|
147
149
|
});
|
|
150
|
+
if (onBeforeDropzoneChange) {
|
|
151
|
+
onBeforeDropzoneChange(files);
|
|
152
|
+
}
|
|
148
153
|
},
|
|
149
154
|
onUploadStart = (files) => {
|
|
150
155
|
setIsUploading(true);
|
|
@@ -314,7 +319,7 @@ function AttachmentsElement(props) {
|
|
|
314
319
|
url: Repository.api.baseURL + Repository.name + '/uploadAttachment',
|
|
315
320
|
method: 'POST',
|
|
316
321
|
headers: Repository.headers,
|
|
317
|
-
autoUpload
|
|
322
|
+
autoUpload,
|
|
318
323
|
}}
|
|
319
324
|
headerConfig={{
|
|
320
325
|
deleteFiles: false,
|