@dreamcommerce/aurora 2.6.5 → 2.6.6
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/index.js +1 -1
- package/build/cjs/packages/aurora/src/components/image_picker/index.js +8 -1
- 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 +8 -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/index.js +1 -1
- package/build/esm/packages/aurora/src/components/image_picker/index.js +8 -1
- 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 +8 -1
- package/build/esm/packages/aurora/src/components/xhr_image_picker/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -15,7 +15,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
15
15
|
|
|
16
16
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
17
17
|
|
|
18
|
-
const FilePicker = ({ id, onChange, allowedExtensions = [constants.FILES_EXTENSIONS.WEBP, constants.FILES_EXTENSIONS.JPG, constants.FILES_EXTENSIONS.PNG, constants.FILES_EXTENSIONS.GIF], initialFile, name, className = '' }) => {
|
|
18
|
+
const FilePicker = ({ id, onChange, allowedExtensions = [constants.FILES_EXTENSIONS.WEBP, constants.FILES_EXTENSIONS.JPG, constants.FILES_EXTENSIONS.PNG, constants.FILES_EXTENSIONS.GIF, constants.FILES_EXTENSIONS.JPEG], initialFile, name, className = '' }) => {
|
|
19
19
|
const inputRef = React.createRef();
|
|
20
20
|
const { onDropFile, onFileChange, onDragOver, onDragLeave, onFileDelete, onPreviewError, file, isPreview, isDragOver } = use_file_picker.useFilePicker({
|
|
21
21
|
initialFile,
|
|
@@ -21,7 +21,14 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
21
21
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
22
22
|
var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
|
|
23
23
|
|
|
24
|
-
const ImagePicker = React.memo(({ id, onChange, onError, errors: initialErrors, allowedExtensions = [
|
|
24
|
+
const ImagePicker = React.memo(({ id, onChange, onError, errors: initialErrors, allowedExtensions = [
|
|
25
|
+
constants.FILES_EXTENSIONS.WEBP,
|
|
26
|
+
constants.FILES_EXTENSIONS.JPG,
|
|
27
|
+
constants.FILES_EXTENSIONS.PNG,
|
|
28
|
+
constants.FILES_EXTENSIONS.GIF,
|
|
29
|
+
constants.FILES_EXTENSIONS.SVG,
|
|
30
|
+
constants.FILES_EXTENSIONS.JPEG
|
|
31
|
+
], initialFile, name, className = '', onImageSizeUpdated }) => {
|
|
25
32
|
const [t] = useTranslation.useTranslation();
|
|
26
33
|
const inputRef = React.createRef();
|
|
27
34
|
const [imageSize, setImageSize] = React.useState(undefined);
|
|
@@ -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;"}
|
|
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;"}
|
|
@@ -12,7 +12,14 @@ 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, onError, onChange, onImageSizeUpdated, allowedExtensions = [
|
|
16
|
+
constants.FILES_EXTENSIONS.WEBP,
|
|
17
|
+
constants.FILES_EXTENSIONS.JPG,
|
|
18
|
+
constants.FILES_EXTENSIONS.PNG,
|
|
19
|
+
constants.FILES_EXTENSIONS.GIF,
|
|
20
|
+
constants.FILES_EXTENSIONS.SVG,
|
|
21
|
+
constants.FILES_EXTENSIONS.JPEG
|
|
22
|
+
] }) => {
|
|
16
23
|
const httpApi = use_http_api.useHttpApi();
|
|
17
24
|
const pendingRequestRef = React__default['default'].useRef();
|
|
18
25
|
const handleControlChange = async (fileList) => {
|
|
@@ -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;AACA;AACA;"}
|
|
@@ -7,7 +7,7 @@ import SelectedFilePreview from './components/selected_file_preview.js';
|
|
|
7
7
|
import { getAcceptFilesParametersFromAllowedExtensions } from './utils.js';
|
|
8
8
|
import { useFilePicker } from './use_file_picker.js';
|
|
9
9
|
|
|
10
|
-
const FilePicker = ({ id, onChange, allowedExtensions = [FILES_EXTENSIONS.WEBP, FILES_EXTENSIONS.JPG, FILES_EXTENSIONS.PNG, FILES_EXTENSIONS.GIF], initialFile, name, className = '' }) => {
|
|
10
|
+
const FilePicker = ({ id, onChange, allowedExtensions = [FILES_EXTENSIONS.WEBP, FILES_EXTENSIONS.JPG, FILES_EXTENSIONS.PNG, FILES_EXTENSIONS.GIF, FILES_EXTENSIONS.JPEG], initialFile, name, className = '' }) => {
|
|
11
11
|
const inputRef = createRef();
|
|
12
12
|
const { onDropFile, onFileChange, onDragOver, onDragLeave, onFileDelete, onPreviewError, file, isPreview, isDragOver } = useFilePicker({
|
|
13
13
|
initialFile,
|
|
@@ -12,7 +12,14 @@ import ImageInput from './components/image_input.js';
|
|
|
12
12
|
import { ImagePreview } from './components/image_preview.js';
|
|
13
13
|
import { UploadedImageItem } from './components/uploaded_image_item.js';
|
|
14
14
|
|
|
15
|
-
const ImagePicker = memo(({ id, onChange, onError, errors: initialErrors, allowedExtensions = [
|
|
15
|
+
const ImagePicker = memo(({ id, onChange, onError, errors: initialErrors, allowedExtensions = [
|
|
16
|
+
FILES_EXTENSIONS.WEBP,
|
|
17
|
+
FILES_EXTENSIONS.JPG,
|
|
18
|
+
FILES_EXTENSIONS.PNG,
|
|
19
|
+
FILES_EXTENSIONS.GIF,
|
|
20
|
+
FILES_EXTENSIONS.SVG,
|
|
21
|
+
FILES_EXTENSIONS.JPEG
|
|
22
|
+
], initialFile, name, className = '', onImageSizeUpdated }) => {
|
|
16
23
|
const [t] = useTranslation();
|
|
17
24
|
const inputRef = createRef();
|
|
18
25
|
const [imageSize, setImageSize] = useState(undefined);
|
|
@@ -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;"}
|
|
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;"}
|
|
@@ -4,7 +4,14 @@ import { REQUEST_TYPES } from '../../../../star_core/build/esm/packages/star_cor
|
|
|
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, onError, onChange, onImageSizeUpdated, allowedExtensions = [
|
|
8
|
+
FILES_EXTENSIONS.WEBP,
|
|
9
|
+
FILES_EXTENSIONS.JPG,
|
|
10
|
+
FILES_EXTENSIONS.PNG,
|
|
11
|
+
FILES_EXTENSIONS.GIF,
|
|
12
|
+
FILES_EXTENSIONS.SVG,
|
|
13
|
+
FILES_EXTENSIONS.JPEG
|
|
14
|
+
] }) => {
|
|
8
15
|
const httpApi = useHttpApi();
|
|
9
16
|
const pendingRequestRef = React.useRef();
|
|
10
17
|
const handleControlChange = async (fileList) => {
|
|
@@ -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;"}
|
|
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.6.
|
|
5
|
+
"version": "2.6.6",
|
|
6
6
|
"description": "aurora",
|
|
7
7
|
"author": "k0ssak",
|
|
8
8
|
"license": "MIT",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"update-visuals": "jest -c .config/jest/jest.config.visual.js --updateSnapshot"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@dreamcommerce/utilities": "^1.
|
|
47
|
+
"@dreamcommerce/utilities": "^1.9.0",
|
|
48
48
|
"@shoper/jest_config": "^0.0.0",
|
|
49
49
|
"@shoper/tsconfig": "^0.0.0",
|
|
50
50
|
"@storybook/react": "6.5.7",
|