@dreamcommerce/aurora 2.8.1-27 → 2.8.1-29
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/build/cjs/packages/aurora/src/components/file_picker/use_file_picker.js +0 -14
- package/build/cjs/packages/aurora/src/components/file_picker/use_file_picker.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/image_picker/index.js +0 -7
- package/build/cjs/packages/aurora/src/components/image_picker/index.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/xhr_image_picker/index.js +6 -1
- package/build/cjs/packages/aurora/src/components/xhr_image_picker/index.js.map +1 -1
- package/build/esm/packages/aurora/src/components/file_picker/types.d.ts +1 -6
- package/build/esm/packages/aurora/src/components/file_picker/types.js +1 -1
- package/build/esm/packages/aurora/src/components/file_picker/types.js.map +1 -1
- package/build/esm/packages/aurora/src/components/file_picker/use_file_picker.js +0 -14
- package/build/esm/packages/aurora/src/components/file_picker/use_file_picker.js.map +1 -1
- package/build/esm/packages/aurora/src/components/image_picker/index.js +0 -7
- package/build/esm/packages/aurora/src/components/image_picker/index.js.map +1 -1
- package/build/esm/packages/aurora/src/components/xhr_image_picker/index.js +7 -2
- package/build/esm/packages/aurora/src/components/xhr_image_picker/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -11,7 +11,6 @@ const useFilePicker = ({ onChange, initialFile, allowedExtensions, inputRef, ini
|
|
|
11
11
|
const [errors, setErrors] = React.useState([]);
|
|
12
12
|
const [isDragOver, setDragOver] = React.useState(false);
|
|
13
13
|
const [isPreview, setPreview] = React.useState(true);
|
|
14
|
-
const [imageSize, setImageSize] = React.useState(undefined);
|
|
15
14
|
React.useEffect(() => {
|
|
16
15
|
setFile(initialFile);
|
|
17
16
|
}, [initialFile]);
|
|
@@ -45,20 +44,9 @@ const useFilePicker = ({ onChange, initialFile, allowedExtensions, inputRef, ini
|
|
|
45
44
|
return isValid;
|
|
46
45
|
};
|
|
47
46
|
const onFileChange = ({ target: { files } }) => {
|
|
48
|
-
files && getImageSize(files[0]);
|
|
49
47
|
setErrors([]);
|
|
50
48
|
updateFile(files);
|
|
51
49
|
};
|
|
52
|
-
const getImageSize = (file) => {
|
|
53
|
-
const img = document.createElement('img');
|
|
54
|
-
const objectURL = URL.createObjectURL(file);
|
|
55
|
-
img.onload = function handleLoad() {
|
|
56
|
-
setImageSize({ width: img.width, height: img.height });
|
|
57
|
-
console.log('getImageSize', imageSize);
|
|
58
|
-
URL.revokeObjectURL(objectURL);
|
|
59
|
-
};
|
|
60
|
-
img.src = objectURL;
|
|
61
|
-
};
|
|
62
50
|
const updateFile = (files) => {
|
|
63
51
|
if (files === null || files === void 0 ? void 0 : files.length) {
|
|
64
52
|
setFile({
|
|
@@ -91,7 +79,6 @@ const useFilePicker = ({ onChange, initialFile, allowedExtensions, inputRef, ini
|
|
|
91
79
|
setFile(undefined);
|
|
92
80
|
setPreview(true);
|
|
93
81
|
setErrors([]);
|
|
94
|
-
setImageSize(undefined);
|
|
95
82
|
onChange === null || onChange === void 0 ? void 0 : onChange(null);
|
|
96
83
|
};
|
|
97
84
|
const onPreviewError = () => {
|
|
@@ -106,7 +93,6 @@ const useFilePicker = ({ onChange, initialFile, allowedExtensions, inputRef, ini
|
|
|
106
93
|
onPreviewError,
|
|
107
94
|
file,
|
|
108
95
|
errors,
|
|
109
|
-
imageSize,
|
|
110
96
|
isPreview,
|
|
111
97
|
isDragOver
|
|
112
98
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -33,15 +33,8 @@ const ImagePicker = React.memo(({ id, onChange, onError, errors: initialErrors,
|
|
|
33
33
|
const inputRef = React.createRef();
|
|
34
34
|
console.log('ImagePicker');
|
|
35
35
|
console.log('ImagePicker', initialErrors);
|
|
36
|
-
const [errorsToDisplay, setErrorsToDisplay] = React.useState([]);
|
|
37
36
|
const [imageSize, setImageSize] = React.useState(undefined);
|
|
38
37
|
const { onDropFile, onFileChange, onDragOver, onDragLeave, onFileDelete, onPreviewError, file, errors, isPreview, isDragOver } = use_file_picker.useFilePicker({ initialFile, onChange, allowedExtensions, initialErrors, onError, inputRef });
|
|
39
|
-
React.useEffect(() => {
|
|
40
|
-
setErrorsToDisplay(errors);
|
|
41
|
-
}, [errors]);
|
|
42
|
-
React.useEffect(() => {
|
|
43
|
-
console.log('errorsToDisplay', errorsToDisplay);
|
|
44
|
-
}, [errorsToDisplay]);
|
|
45
38
|
const acceptFiles = utils.getAcceptFilesParametersFromAllowedExtensions(allowedExtensions);
|
|
46
39
|
const imagePickerClassName = classnames__default['default'](main_module['default'][css_classes['default'].imagePicker], className && className);
|
|
47
40
|
const imagePickerWrapperClassName = classnames__default['default'](main_module['default'][css_classes['default'].imagePickerWrapper], file && main_module['default'][css_classes['default'].imagePickerWrapperHasFile], {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,6BAA6B,iEAAqE;AAClG,2BAA2B,yDAA6D;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,6BAA6B,iEAAqE;AAClG,2BAA2B,yDAA6D;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -12,7 +12,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
12
12
|
|
|
13
13
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
14
14
|
|
|
15
|
-
const XhrImagePicker = ({ id, url, name, onUploaded, initialFile, errors, onError, onChange, onImageSizeUpdated, allowedExtensions = [
|
|
15
|
+
const XhrImagePicker = ({ id, url, name, onUploaded, initialFile, errors: initialErrors, onError, onChange, onImageSizeUpdated, allowedExtensions = [
|
|
16
16
|
constants.FILES_EXTENSIONS.WEBP,
|
|
17
17
|
constants.FILES_EXTENSIONS.JPG,
|
|
18
18
|
constants.FILES_EXTENSIONS.PNG,
|
|
@@ -20,8 +20,13 @@ const XhrImagePicker = ({ id, url, name, onUploaded, initialFile, errors, onErro
|
|
|
20
20
|
constants.FILES_EXTENSIONS.SVG,
|
|
21
21
|
constants.FILES_EXTENSIONS.JPEG
|
|
22
22
|
] }) => {
|
|
23
|
+
const [errors, setErrors] = React.useState([]);
|
|
23
24
|
const httpApi = use_http_api.useHttpApi();
|
|
24
25
|
const pendingRequestRef = React__default['default'].useRef();
|
|
26
|
+
React.useEffect(() => {
|
|
27
|
+
console.log('XhrImagePicker - initialErrors', initialErrors);
|
|
28
|
+
initialErrors && setErrors(initialErrors);
|
|
29
|
+
}, [initialErrors]);
|
|
25
30
|
const handleControlChange = async (fileList) => {
|
|
26
31
|
onChange === null || onChange === void 0 ? void 0 : onChange(fileList);
|
|
27
32
|
if (!fileList || !fileList.length)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
import { FILES_EXTENSIONS, MIME_FILE_EXTENSIONS } from "./constants";
|
|
2
1
|
import React, { ChangeEvent } from 'react';
|
|
2
|
+
import { FILES_EXTENSIONS, MIME_FILE_EXTENSIONS } from "./constants";
|
|
3
3
|
import { TControlErrors } from "../controls/types";
|
|
4
4
|
export declare type TFilePickerFile = {
|
|
5
5
|
fileUrl: string;
|
|
6
6
|
fileName: string;
|
|
7
7
|
};
|
|
8
|
-
export declare type TFilePickerImageSize = {
|
|
9
|
-
width: number;
|
|
10
|
-
height: number;
|
|
11
|
-
};
|
|
12
8
|
export interface IFilePicker {
|
|
13
9
|
id: string;
|
|
14
10
|
name?: string;
|
|
@@ -42,7 +38,6 @@ export interface IUseFilePicker {
|
|
|
42
38
|
onPreviewError: () => void;
|
|
43
39
|
file: TFilePickerFile | undefined;
|
|
44
40
|
errors: string[];
|
|
45
|
-
imageSize: TFilePickerImageSize | undefined;
|
|
46
41
|
isPreview: boolean;
|
|
47
42
|
isDragOver: boolean;
|
|
48
43
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../../src/components/file_picker/types.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../../src/components/file_picker/types.ts"],"names":[],"mappings":"AAAA,OAAmC,OAAO,CAAC;AAC3C,OAAuD,yCAAyC,CAAC;AACjG,OAA+B,kCAAkC,CAAC"}
|
|
@@ -7,7 +7,6 @@ const useFilePicker = ({ onChange, initialFile, allowedExtensions, inputRef, ini
|
|
|
7
7
|
const [errors, setErrors] = useState([]);
|
|
8
8
|
const [isDragOver, setDragOver] = useState(false);
|
|
9
9
|
const [isPreview, setPreview] = useState(true);
|
|
10
|
-
const [imageSize, setImageSize] = useState(undefined);
|
|
11
10
|
useEffect(() => {
|
|
12
11
|
setFile(initialFile);
|
|
13
12
|
}, [initialFile]);
|
|
@@ -41,20 +40,9 @@ const useFilePicker = ({ onChange, initialFile, allowedExtensions, inputRef, ini
|
|
|
41
40
|
return isValid;
|
|
42
41
|
};
|
|
43
42
|
const onFileChange = ({ target: { files } }) => {
|
|
44
|
-
files && getImageSize(files[0]);
|
|
45
43
|
setErrors([]);
|
|
46
44
|
updateFile(files);
|
|
47
45
|
};
|
|
48
|
-
const getImageSize = (file) => {
|
|
49
|
-
const img = document.createElement('img');
|
|
50
|
-
const objectURL = URL.createObjectURL(file);
|
|
51
|
-
img.onload = function handleLoad() {
|
|
52
|
-
setImageSize({ width: img.width, height: img.height });
|
|
53
|
-
console.log('getImageSize', imageSize);
|
|
54
|
-
URL.revokeObjectURL(objectURL);
|
|
55
|
-
};
|
|
56
|
-
img.src = objectURL;
|
|
57
|
-
};
|
|
58
46
|
const updateFile = (files) => {
|
|
59
47
|
if (files === null || files === void 0 ? void 0 : files.length) {
|
|
60
48
|
setFile({
|
|
@@ -87,7 +75,6 @@ const useFilePicker = ({ onChange, initialFile, allowedExtensions, inputRef, ini
|
|
|
87
75
|
setFile(undefined);
|
|
88
76
|
setPreview(true);
|
|
89
77
|
setErrors([]);
|
|
90
|
-
setImageSize(undefined);
|
|
91
78
|
onChange === null || onChange === void 0 ? void 0 : onChange(null);
|
|
92
79
|
};
|
|
93
80
|
const onPreviewError = () => {
|
|
@@ -102,7 +89,6 @@ const useFilePicker = ({ onChange, initialFile, allowedExtensions, inputRef, ini
|
|
|
102
89
|
onPreviewError,
|
|
103
90
|
file,
|
|
104
91
|
errors,
|
|
105
|
-
imageSize,
|
|
106
92
|
isPreview,
|
|
107
93
|
isDragOver
|
|
108
94
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -24,15 +24,8 @@ const ImagePicker = memo(({ id, onChange, onError, errors: initialErrors, allowe
|
|
|
24
24
|
const inputRef = createRef();
|
|
25
25
|
console.log('ImagePicker');
|
|
26
26
|
console.log('ImagePicker', initialErrors);
|
|
27
|
-
const [errorsToDisplay, setErrorsToDisplay] = useState([]);
|
|
28
27
|
const [imageSize, setImageSize] = useState(undefined);
|
|
29
28
|
const { onDropFile, onFileChange, onDragOver, onDragLeave, onFileDelete, onPreviewError, file, errors, isPreview, isDragOver } = useFilePicker({ initialFile, onChange, allowedExtensions, initialErrors, onError, inputRef });
|
|
30
|
-
useEffect(() => {
|
|
31
|
-
setErrorsToDisplay(errors);
|
|
32
|
-
}, [errors]);
|
|
33
|
-
useEffect(() => {
|
|
34
|
-
console.log('errorsToDisplay', errorsToDisplay);
|
|
35
|
-
}, [errorsToDisplay]);
|
|
36
29
|
const acceptFiles = getAcceptFilesParametersFromAllowedExtensions(allowedExtensions);
|
|
37
30
|
const imagePickerClassName = classnames(styles[CSS_CLASSES.imagePicker], className && className);
|
|
38
31
|
const imagePickerWrapperClassName = classnames(styles[CSS_CLASSES.imagePickerWrapper], file && styles[CSS_CLASSES.imagePickerWrapperHasFile], {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA,+BAA+B,iEAAqE;AACpG,gCAAgC,yDAA6D;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA,+BAA+B,iEAAqE;AACpG,gCAAgC,yDAA6D;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import React, { useEffect } from 'react';
|
|
1
|
+
import React, { useState, useEffect } from 'react';
|
|
2
2
|
import { FILES_EXTENSIONS } from '../file_picker/constants.js';
|
|
3
3
|
import { REQUEST_TYPES } from '../../../../star_core/build/esm/packages/star_core/src/features/http_requester/http_requester_contants.js';
|
|
4
4
|
import ImagePicker from '../image_picker/index.js';
|
|
5
5
|
import { useHttpApi } from '../../hooks/use_http_api.js';
|
|
6
6
|
|
|
7
|
-
const XhrImagePicker = ({ id, url, name, onUploaded, initialFile, errors, onError, onChange, onImageSizeUpdated, allowedExtensions = [
|
|
7
|
+
const XhrImagePicker = ({ id, url, name, onUploaded, initialFile, errors: initialErrors, onError, onChange, onImageSizeUpdated, allowedExtensions = [
|
|
8
8
|
FILES_EXTENSIONS.WEBP,
|
|
9
9
|
FILES_EXTENSIONS.JPG,
|
|
10
10
|
FILES_EXTENSIONS.PNG,
|
|
@@ -12,8 +12,13 @@ const XhrImagePicker = ({ id, url, name, onUploaded, initialFile, errors, onErro
|
|
|
12
12
|
FILES_EXTENSIONS.SVG,
|
|
13
13
|
FILES_EXTENSIONS.JPEG
|
|
14
14
|
] }) => {
|
|
15
|
+
const [errors, setErrors] = useState([]);
|
|
15
16
|
const httpApi = useHttpApi();
|
|
16
17
|
const pendingRequestRef = React.useRef();
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
console.log('XhrImagePicker - initialErrors', initialErrors);
|
|
20
|
+
initialErrors && setErrors(initialErrors);
|
|
21
|
+
}, [initialErrors]);
|
|
17
22
|
const handleControlChange = async (fileList) => {
|
|
18
23
|
onChange === null || onChange === void 0 ? void 0 : onChange(fileList);
|
|
19
24
|
if (!fileList || !fileList.length)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|