@dreamcommerce/aurora 2.8.12-18 → 2.8.12-19

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.
@@ -22,10 +22,6 @@ const XhrImagePicker = ({ id, url, name, onUploaded, initialFile, errors, onErro
22
22
  ] }) => {
23
23
  const httpApi = use_http_api.useHttpApi();
24
24
  const pendingRequestRef = React__default['default'].useRef();
25
- const [initialFileTest, setInitialFileTest] = React.useState(undefined);
26
- React.useEffect(() => {
27
- setInitialFileTest(initialFile);
28
- }, []);
29
25
  const handleControlChange = async (fileList) => {
30
26
  onChange === null || onChange === void 0 ? void 0 : onChange(fileList);
31
27
  if (!fileList || !fileList.length)
@@ -46,7 +42,7 @@ const XhrImagePicker = ({ id, url, name, onUploaded, initialFile, errors, onErro
46
42
  React.useEffect(() => {
47
43
  return () => { var _a; return (_a = pendingRequestRef.current) === null || _a === void 0 ? void 0 : _a.call(pendingRequestRef); };
48
44
  }, []);
49
- return (React__default['default'].createElement(index['default'], { id: id, name: name, onChange: handleControlChange, onError: onError, errors: errors, allowedExtensions: allowedExtensions, initialFile: initialFileTest, onImageSizeUpdated: onImageSizeUpdated }));
45
+ return (React__default['default'].createElement(index['default'], { id: id, name: name, onChange: handleControlChange, onError: onError, errors: errors, allowedExtensions: allowedExtensions, initialFile: initialFile, onImageSizeUpdated: onImageSizeUpdated }));
50
46
  };
51
47
 
52
48
  exports.default = XhrImagePicker;
@@ -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;"}
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;"}
@@ -1,4 +1,4 @@
1
- import React, { useState, useEffect } from 'react';
1
+ import React, { 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';
@@ -14,10 +14,6 @@ const XhrImagePicker = ({ id, url, name, onUploaded, initialFile, errors, onErro
14
14
  ] }) => {
15
15
  const httpApi = useHttpApi();
16
16
  const pendingRequestRef = React.useRef();
17
- const [initialFileTest, setInitialFileTest] = useState(undefined);
18
- useEffect(() => {
19
- setInitialFileTest(initialFile);
20
- }, []);
21
17
  const handleControlChange = async (fileList) => {
22
18
  onChange === null || onChange === void 0 ? void 0 : onChange(fileList);
23
19
  if (!fileList || !fileList.length)
@@ -38,7 +34,7 @@ const XhrImagePicker = ({ id, url, name, onUploaded, initialFile, errors, onErro
38
34
  useEffect(() => {
39
35
  return () => { var _a; return (_a = pendingRequestRef.current) === null || _a === void 0 ? void 0 : _a.call(pendingRequestRef); };
40
36
  }, []);
41
- return (React.createElement(ImagePicker, { id: id, name: name, onChange: handleControlChange, onError: onError, errors: errors, allowedExtensions: allowedExtensions, initialFile: initialFileTest, onImageSizeUpdated: onImageSizeUpdated }));
37
+ return (React.createElement(ImagePicker, { id: id, name: name, onChange: handleControlChange, onError: onError, errors: errors, allowedExtensions: allowedExtensions, initialFile: initialFile, onImageSizeUpdated: onImageSizeUpdated }));
42
38
  };
43
39
 
44
40
  export default XhrImagePicker;
@@ -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;"}
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;"}
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-18",
5
+ "version": "2.8.12-19",
6
6
  "description": "aurora",
7
7
  "author": "k0ssak",
8
8
  "license": "MIT",