@dreamcommerce/aurora 2.8.1-31 → 2.8.1-33
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/image_picker/index.js +3 -1
- package/build/cjs/packages/aurora/src/components/image_picker/index.js.map +1 -1
- package/build/esm/packages/aurora/src/components/image_picker/index.js +3 -1
- package/build/esm/packages/aurora/src/components/image_picker/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -32,6 +32,7 @@ const ImagePicker = React.memo(({ id, onChange, onError, errors: initialErrors,
|
|
|
32
32
|
const [t] = useTranslation.useTranslation();
|
|
33
33
|
const inputRef = React.createRef();
|
|
34
34
|
const [imageSize, setImageSize] = React.useState(undefined);
|
|
35
|
+
console.log('initialFile', initialFile);
|
|
35
36
|
const { onDropFile, onFileChange, onDragOver, onDragLeave, onFileDelete, onPreviewError, file, errors, isPreview, isDragOver } = use_file_picker.useFilePicker({ initialFile, onChange, allowedExtensions, initialErrors, onError, inputRef });
|
|
36
37
|
const acceptFiles = utils.getAcceptFilesParametersFromAllowedExtensions(allowedExtensions);
|
|
37
38
|
const imagePickerClassName = classnames__default['default'](main_module['default'][css_classes['default'].imagePicker], className && className);
|
|
@@ -73,7 +74,8 @@ const ImagePicker = React.memo(({ id, onChange, onError, errors: initialErrors,
|
|
|
73
74
|
var _a, _b, _c, _d;
|
|
74
75
|
return (((_a = prev.initialFile) === null || _a === void 0 ? void 0 : _a.fileUrl) === ((_b = curr.initialFile) === null || _b === void 0 ? void 0 : _b.fileUrl) &&
|
|
75
76
|
((_c = prev.initialFile) === null || _c === void 0 ? void 0 : _c.fileName) === ((_d = curr.initialFile) === null || _d === void 0 ? void 0 : _d.fileName) &&
|
|
76
|
-
prev.errors === curr.errors
|
|
77
|
+
prev.errors === curr.errors &&
|
|
78
|
+
prev.initialFile === curr.initialFile);
|
|
77
79
|
});
|
|
78
80
|
|
|
79
81
|
exports.default = ImagePicker;
|
|
@@ -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;AACA;AACA;"}
|
|
@@ -23,6 +23,7 @@ const ImagePicker = memo(({ id, onChange, onError, errors: initialErrors, allowe
|
|
|
23
23
|
const [t] = useTranslation();
|
|
24
24
|
const inputRef = createRef();
|
|
25
25
|
const [imageSize, setImageSize] = useState(undefined);
|
|
26
|
+
console.log('initialFile', initialFile);
|
|
26
27
|
const { onDropFile, onFileChange, onDragOver, onDragLeave, onFileDelete, onPreviewError, file, errors, isPreview, isDragOver } = useFilePicker({ initialFile, onChange, allowedExtensions, initialErrors, onError, inputRef });
|
|
27
28
|
const acceptFiles = getAcceptFilesParametersFromAllowedExtensions(allowedExtensions);
|
|
28
29
|
const imagePickerClassName = classnames(styles[CSS_CLASSES.imagePicker], className && className);
|
|
@@ -64,7 +65,8 @@ const ImagePicker = memo(({ id, onChange, onError, errors: initialErrors, allowe
|
|
|
64
65
|
var _a, _b, _c, _d;
|
|
65
66
|
return (((_a = prev.initialFile) === null || _a === void 0 ? void 0 : _a.fileUrl) === ((_b = curr.initialFile) === null || _b === void 0 ? void 0 : _b.fileUrl) &&
|
|
66
67
|
((_c = prev.initialFile) === null || _c === void 0 ? void 0 : _c.fileName) === ((_d = curr.initialFile) === null || _d === void 0 ? void 0 : _d.fileName) &&
|
|
67
|
-
prev.errors === curr.errors
|
|
68
|
+
prev.errors === curr.errors &&
|
|
69
|
+
prev.initialFile === curr.initialFile);
|
|
68
70
|
});
|
|
69
71
|
|
|
70
72
|
export default ImagePicker;
|
|
@@ -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;AACA;AACA;"}
|