@dreamcommerce/aurora 2.8.12-19 → 2.8.12-20

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.
@@ -79,6 +79,9 @@ const ImagePicker = React.memo(({ id, onChange, onError, errors: initialErrors,
79
79
  setImageSizeBasedOnUrl(URL.createObjectURL(files === null || files === void 0 ? void 0 : files[0]));
80
80
  }
81
81
  };
82
+ React.useEffect(() => {
83
+ console.log('file', file);
84
+ }, [file]);
82
85
  return (React__default['default'].createElement("div", { className: imagePickerClassName },
83
86
  React__default['default'].createElement("div", { className: `${imagePickerWrapperClassName} ${dragOverStyles.imagePickerWrapper}` },
84
87
  file &&
@@ -89,10 +92,7 @@ const ImagePicker = React.memo(({ id, onChange, onError, errors: initialErrors,
89
92
  React__default['default'].createElement("input", { onChange: handleOnFileChange, id: id, ref: inputRef, type: "file", name: name, className: main_module['default'][css_classes['default'].imagePickerInput], accept: acceptFiles })),
90
93
  errors && React__default['default'].createElement(errors_list.ErrorsList, { errors: errors })));
91
94
  }, (prev, curr) => {
92
- var _a, _b, _c, _d;
93
- return (((_a = prev.initialFile) === null || _a === void 0 ? void 0 : _a.fileUrl) === ((_b = curr.initialFile) === null || _b === void 0 ? void 0 : _b.fileUrl) &&
94
- ((_c = prev.initialFile) === null || _c === void 0 ? void 0 : _c.fileName) === ((_d = curr.initialFile) === null || _d === void 0 ? void 0 : _d.fileName) &&
95
- prev.errors === curr.errors);
95
+ return prev.initialFile === curr.initialFile && prev.errors === curr.errors;
96
96
  });
97
97
 
98
98
  exports.default = ImagePicker;
@@ -70,6 +70,9 @@ const ImagePicker = memo(({ id, onChange, onError, errors: initialErrors, allowe
70
70
  setImageSizeBasedOnUrl(URL.createObjectURL(files === null || files === void 0 ? void 0 : files[0]));
71
71
  }
72
72
  };
73
+ useEffect(() => {
74
+ console.log('file', file);
75
+ }, [file]);
73
76
  return (React.createElement("div", { className: imagePickerClassName },
74
77
  React.createElement("div", { className: `${imagePickerWrapperClassName} ${dragOverStyles.imagePickerWrapper}` },
75
78
  file &&
@@ -80,10 +83,7 @@ const ImagePicker = memo(({ id, onChange, onError, errors: initialErrors, allowe
80
83
  React.createElement("input", { onChange: handleOnFileChange, id: id, ref: inputRef, type: "file", name: name, className: styles[CSS_CLASSES.imagePickerInput], accept: acceptFiles })),
81
84
  errors && React.createElement(ErrorsList, { errors: errors })));
82
85
  }, (prev, curr) => {
83
- var _a, _b, _c, _d;
84
- return (((_a = prev.initialFile) === null || _a === void 0 ? void 0 : _a.fileUrl) === ((_b = curr.initialFile) === null || _b === void 0 ? void 0 : _b.fileUrl) &&
85
- ((_c = prev.initialFile) === null || _c === void 0 ? void 0 : _c.fileName) === ((_d = curr.initialFile) === null || _d === void 0 ? void 0 : _d.fileName) &&
86
- prev.errors === curr.errors);
86
+ return prev.initialFile === curr.initialFile && prev.errors === curr.errors;
87
87
  });
88
88
 
89
89
  export default ImagePicker;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@dreamcommerce/aurora",
3
3
  "packageManager": "yarn@3.2.0",
4
4
  "sideEffects": false,
5
- "version": "2.8.12-19",
5
+ "version": "2.8.12-20",
6
6
  "description": "aurora",
7
7
  "author": "k0ssak",
8
8
  "license": "MIT",