@pingux/astro 2.108.0-alpha.2 → 2.108.1-alpha.0
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/lib/cjs/components/ImageUploadField/ImageUploadField.js +2 -1
- package/lib/cjs/components/ImageUploadField/ImageUploadField.test.js +3 -16
- package/lib/cjs/components/ImageUploadField/ImageUploadFieldBase.js +2 -1
- package/lib/cjs/hooks/useImageUploadState/useImageUploadState.js +23 -25
- package/lib/cjs/utils/devUtils/constants/htmlElements.js +9 -2
- package/lib/components/ImageUploadField/ImageUploadField.js +2 -1
- package/lib/components/ImageUploadField/ImageUploadField.test.js +3 -16
- package/lib/components/ImageUploadField/ImageUploadFieldBase.js +2 -1
- package/lib/hooks/useImageUploadState/useImageUploadState.js +23 -25
- package/lib/utils/devUtils/constants/htmlElements.js +5 -1
- package/package.json +1 -1
@@ -23,6 +23,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
23
23
|
var _uuid = require("uuid");
|
24
24
|
var _ = require("../..");
|
25
25
|
var _useImageUploadState = require("../../hooks/useImageUploadState");
|
26
|
+
var _htmlElements = require("../../utils/devUtils/constants/htmlElements");
|
26
27
|
var _pendoID = require("../../utils/devUtils/constants/pendoID");
|
27
28
|
var _ariaAttributes = require("../../utils/docUtils/ariaAttributes");
|
28
29
|
var _fieldAttributes = require("../../utils/docUtils/fieldAttributes");
|
@@ -114,7 +115,7 @@ ImageUploadField.propTypes = _objectSpread(_objectSpread(_objectSpread({
|
|
114
115
|
defaultPreviewImage: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].node]),
|
115
116
|
/** An array of accepted file types.
|
116
117
|
* (according to the https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types#types ) */
|
117
|
-
fileTypes: _propTypes["default"].arrayOf(_propTypes["default"].oneOf(
|
118
|
+
fileTypes: _propTypes["default"].arrayOf(_propTypes["default"].oneOf(_htmlElements.imageUploadPropTypes)),
|
118
119
|
/** Text to display after the radio group label. Useful for errors or other info. */
|
119
120
|
helperText: _propTypes["default"].node,
|
120
121
|
/** Determines whether the loading indicator is shown. */
|
@@ -40,10 +40,6 @@ var imageUploadImagePreview = 'image-upload-image-preview';
|
|
40
40
|
var file = new File(['(⌐□_□)'], 'chucknorris.png', {
|
41
41
|
type: 'image/png'
|
42
42
|
});
|
43
|
-
var notImageFileName = 'nice-song.mp3';
|
44
|
-
var notImageFile = new File(['(⌐□_□)'], notImageFileName, {
|
45
|
-
type: 'audio/mpeg'
|
46
|
-
});
|
47
43
|
var originalValue = _url["default"].createObjectURL;
|
48
44
|
var defaultProps = {
|
49
45
|
label: testLabel,
|
@@ -273,7 +269,9 @@ test('should not call onChange cb (when provided) if uploaded file is not allowe
|
|
273
269
|
});
|
274
270
|
_react2.fireEvent.change(_testWrapper.screen.getByTestId('image-upload-input'), {
|
275
271
|
target: {
|
276
|
-
files: [
|
272
|
+
files: [new File(['(⌐□_□)'], 'chucknorris.audio', {
|
273
|
+
type: 'audio'
|
274
|
+
})]
|
277
275
|
}
|
278
276
|
});
|
279
277
|
expect(testOnChange).toHaveBeenCalledTimes(0);
|
@@ -282,17 +280,6 @@ test('should render helper text', function () {
|
|
282
280
|
getComponent();
|
283
281
|
expect(_testWrapper.screen.getByText(testHelperText)).toBeInTheDocument();
|
284
282
|
});
|
285
|
-
test('should render the file name when file type is not image', function () {
|
286
|
-
getComponent({
|
287
|
-
fileTypes: ['audio']
|
288
|
-
});
|
289
|
-
_react2.fireEvent.change(_testWrapper.screen.getByTestId('image-upload-input'), {
|
290
|
-
target: {
|
291
|
-
files: [notImageFile]
|
292
|
-
}
|
293
|
-
});
|
294
|
-
expect(_testWrapper.screen.getByText(notImageFileName)).toBeInTheDocument();
|
295
|
-
});
|
296
283
|
test('should render default preview image if defined initially', function () {
|
297
284
|
getComponent({
|
298
285
|
defaultPreviewImage: 'some-image'
|
@@ -25,6 +25,7 @@ var _omit = _interopRequireDefault(require("lodash/omit"));
|
|
25
25
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
26
26
|
var _ = require("../..");
|
27
27
|
var _useField2 = _interopRequireDefault(require("../../hooks/useField"));
|
28
|
+
var _htmlElements = require("../../utils/devUtils/constants/htmlElements");
|
28
29
|
var _statuses = _interopRequireDefault(require("../../utils/devUtils/constants/statuses"));
|
29
30
|
var _statusProp = require("../../utils/docUtils/statusProp");
|
30
31
|
var _react2 = require("@emotion/react");
|
@@ -84,7 +85,7 @@ var ImageUploadFieldBase = /*#__PURE__*/(0, _react.forwardRef)(function (props,
|
|
84
85
|
});
|
85
86
|
ImageUploadFieldBase.propTypes = _objectSpread({
|
86
87
|
fileName: _propTypes["default"].string,
|
87
|
-
fileTypes: _propTypes["default"].arrayOf(_propTypes["default"].oneOf(
|
88
|
+
fileTypes: _propTypes["default"].arrayOf(_propTypes["default"].oneOf(_htmlElements.imageUploadPropTypes)),
|
88
89
|
handleInputChange: _propTypes["default"].func,
|
89
90
|
handleLabelClick: _propTypes["default"].func,
|
90
91
|
handleOpenMenuChange: _propTypes["default"].func,
|
@@ -9,6 +9,7 @@ exports["default"] = void 0;
|
|
9
9
|
var _includes = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/includes"));
|
10
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/slicedToArray"));
|
11
11
|
var _react = require("react");
|
12
|
+
var _htmlElements = require("../../utils/devUtils/constants/htmlElements");
|
12
13
|
var useImageUploadState = function useImageUploadState(inputRef) {
|
13
14
|
var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
14
15
|
var existingImage = props.previewImage,
|
@@ -48,32 +49,29 @@ var useImageUploadState = function useImageUploadState(inputRef) {
|
|
48
49
|
}
|
49
50
|
}, [defaultPreviewImage, previewImage, inputRef]);
|
50
51
|
var handleInputChange = (0, _react.useCallback)(function (event) {
|
51
|
-
var _event$target;
|
52
|
-
if (!event.target.files)
|
53
|
-
|
54
|
-
|
55
|
-
var
|
56
|
-
if (fileTypes !== null && fileTypes !== void 0 && (0, _includes["default"])(fileTypes).call(fileTypes, eventFileType)) {
|
57
|
-
if (onChange && typeof onChange === 'function') {
|
58
|
-
onChange(event);
|
59
|
-
}
|
52
|
+
var _event$target, _event$target2;
|
53
|
+
if (!((_event$target = event.target) !== null && _event$target !== void 0 && _event$target.files)) return;
|
54
|
+
var hasCustomFileTypes = fileTypes && fileTypes[0] !== 'image';
|
55
|
+
var currentFileType = (_event$target2 = event.target) === null || _event$target2 === void 0 || (_event$target2 = _event$target2.files[0]) === null || _event$target2 === void 0 ? void 0 : _event$target2.type;
|
56
|
+
var isSupportedFileType = (0, _includes["default"])(_htmlElements.supportedImageTypes).call(_htmlElements.supportedImageTypes, currentFileType);
|
60
57
|
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
58
|
+
// If custom file types are provided, only allow those file types
|
59
|
+
if (hasCustomFileTypes && !(fileTypes !== null && fileTypes !== void 0 && (0, _includes["default"])(fileTypes).call(fileTypes, currentFileType))) return;
|
60
|
+
// If no custom file types are provided, only allow image file types
|
61
|
+
if (!hasCustomFileTypes && !(0, _includes["default"])(currentFileType).call(currentFileType, 'image')) return;
|
62
|
+
if (isSupportedFileType && onChange && typeof onChange === 'function') onChange(event);
|
63
|
+
if (isSupportedFileType) {
|
64
|
+
var _event$target3;
|
65
|
+
setIsImageType(true);
|
66
|
+
var reader = new FileReader();
|
67
|
+
reader.onload = function () {
|
68
|
+
setPreviewImage(reader.result);
|
69
|
+
};
|
70
|
+
reader.readAsDataURL((_event$target3 = event.target) === null || _event$target3 === void 0 ? void 0 : _event$target3.files[0]);
|
71
|
+
} else {
|
72
|
+
var _event$target4;
|
73
|
+
setIsImageType(false);
|
74
|
+
setFileName((_event$target4 = event.target) === null || _event$target4 === void 0 || (_event$target4 = _event$target4.files[0]) === null || _event$target4 === void 0 ? void 0 : _event$target4.name);
|
77
75
|
}
|
78
76
|
}, []);
|
79
77
|
var handleOpenMenuChange = (0, _react.useCallback)(function (isOpen) {
|
@@ -1,13 +1,20 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
4
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
4
5
|
_Object$defineProperty(exports, "__esModule", {
|
5
6
|
value: true
|
6
7
|
});
|
7
|
-
exports.htmlElements = void 0;
|
8
|
+
exports.supportedImageTypes = exports.imageUploadPropTypes = exports.htmlElements = void 0;
|
9
|
+
var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
|
10
|
+
var _context;
|
8
11
|
/**
|
9
12
|
* List of HTML elements to re use wherever needed.
|
10
13
|
*/
|
11
14
|
|
12
15
|
var htmlElements = ['a', 'abbr', 'acronym', 'address', 'applet', 'area', 'article', 'aside', 'audio', 'b', 'base', 'basefont', 'bdi', 'bdo', 'bgsound', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'isindex', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'listing', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'nobr', 'noframes', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'plaintext', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr', 'xmp'];
|
13
|
-
exports.htmlElements = htmlElements;
|
16
|
+
exports.htmlElements = htmlElements;
|
17
|
+
var supportedImageTypes = ['image', 'image/apng', 'image/avif', 'image/gif', 'image/jpeg', 'image/png', 'image/svg', 'image/svg+xml', 'image/webp'];
|
18
|
+
exports.supportedImageTypes = supportedImageTypes;
|
19
|
+
var imageUploadPropTypes = (0, _concat["default"])(_context = ['application', 'application', 'audio', 'example', 'model', 'text', 'video']).call(_context, supportedImageTypes);
|
20
|
+
exports.imageUploadPropTypes = imageUploadPropTypes;
|
@@ -16,6 +16,7 @@ import PropTypes from 'prop-types';
|
|
16
16
|
import { v4 as uuid } from 'uuid';
|
17
17
|
import { Item, Menu } from '../..';
|
18
18
|
import { useImageUploadState } from '../../hooks/useImageUploadState';
|
19
|
+
import { imageUploadPropTypes } from '../../utils/devUtils/constants/htmlElements';
|
19
20
|
import { getPendoID } from '../../utils/devUtils/constants/pendoID';
|
20
21
|
import { ariaAttributesBasePropTypes } from '../../utils/docUtils/ariaAttributes';
|
21
22
|
import { inputFieldAttributesBasePropTypes } from '../../utils/docUtils/fieldAttributes';
|
@@ -103,7 +104,7 @@ ImageUploadField.propTypes = _objectSpread(_objectSpread(_objectSpread({
|
|
103
104
|
defaultPreviewImage: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
104
105
|
/** An array of accepted file types.
|
105
106
|
* (according to the https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types#types ) */
|
106
|
-
fileTypes: PropTypes.arrayOf(PropTypes.oneOf(
|
107
|
+
fileTypes: PropTypes.arrayOf(PropTypes.oneOf(imageUploadPropTypes)),
|
107
108
|
/** Text to display after the radio group label. Useful for errors or other info. */
|
108
109
|
helperText: PropTypes.node,
|
109
110
|
/** Determines whether the loading indicator is shown. */
|
@@ -37,10 +37,6 @@ var imageUploadImagePreview = 'image-upload-image-preview';
|
|
37
37
|
var file = new File(['(⌐□_□)'], 'chucknorris.png', {
|
38
38
|
type: 'image/png'
|
39
39
|
});
|
40
|
-
var notImageFileName = 'nice-song.mp3';
|
41
|
-
var notImageFile = new File(['(⌐□_□)'], notImageFileName, {
|
42
|
-
type: 'audio/mpeg'
|
43
|
-
});
|
44
40
|
var originalValue = _URL.createObjectURL;
|
45
41
|
var defaultProps = {
|
46
42
|
label: testLabel,
|
@@ -270,7 +266,9 @@ test('should not call onChange cb (when provided) if uploaded file is not allowe
|
|
270
266
|
});
|
271
267
|
fireEvent.change(screen.getByTestId('image-upload-input'), {
|
272
268
|
target: {
|
273
|
-
files: [
|
269
|
+
files: [new File(['(⌐□_□)'], 'chucknorris.audio', {
|
270
|
+
type: 'audio'
|
271
|
+
})]
|
274
272
|
}
|
275
273
|
});
|
276
274
|
expect(testOnChange).toHaveBeenCalledTimes(0);
|
@@ -279,17 +277,6 @@ test('should render helper text', function () {
|
|
279
277
|
getComponent();
|
280
278
|
expect(screen.getByText(testHelperText)).toBeInTheDocument();
|
281
279
|
});
|
282
|
-
test('should render the file name when file type is not image', function () {
|
283
|
-
getComponent({
|
284
|
-
fileTypes: ['audio']
|
285
|
-
});
|
286
|
-
fireEvent.change(screen.getByTestId('image-upload-input'), {
|
287
|
-
target: {
|
288
|
-
files: [notImageFile]
|
289
|
-
}
|
290
|
-
});
|
291
|
-
expect(screen.getByText(notImageFileName)).toBeInTheDocument();
|
292
|
-
});
|
293
280
|
test('should render default preview image if defined initially', function () {
|
294
281
|
getComponent({
|
295
282
|
defaultPreviewImage: 'some-image'
|
@@ -18,6 +18,7 @@ import omit from 'lodash/omit';
|
|
18
18
|
import PropTypes from 'prop-types';
|
19
19
|
import { Box, FieldHelperText, Input, Label, PopoverMenu } from '../..';
|
20
20
|
import useField from '../../hooks/useField';
|
21
|
+
import { imageUploadPropTypes } from '../../utils/devUtils/constants/htmlElements';
|
21
22
|
import statuses from '../../utils/devUtils/constants/statuses';
|
22
23
|
import { statusPropTypes } from '../../utils/docUtils/statusProp';
|
23
24
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
@@ -73,7 +74,7 @@ var ImageUploadFieldBase = /*#__PURE__*/forwardRef(function (props, inputRef) {
|
|
73
74
|
});
|
74
75
|
ImageUploadFieldBase.propTypes = _objectSpread({
|
75
76
|
fileName: PropTypes.string,
|
76
|
-
fileTypes: PropTypes.arrayOf(PropTypes.oneOf(
|
77
|
+
fileTypes: PropTypes.arrayOf(PropTypes.oneOf(imageUploadPropTypes)),
|
77
78
|
handleInputChange: PropTypes.func,
|
78
79
|
handleLabelClick: PropTypes.func,
|
79
80
|
handleOpenMenuChange: PropTypes.func,
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
|
2
2
|
import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
|
3
3
|
import { useCallback, useEffect, useMemo, useState } from 'react';
|
4
|
+
import { supportedImageTypes } from '../../utils/devUtils/constants/htmlElements';
|
4
5
|
var useImageUploadState = function useImageUploadState(inputRef) {
|
5
6
|
var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
6
7
|
var existingImage = props.previewImage,
|
@@ -40,32 +41,29 @@ var useImageUploadState = function useImageUploadState(inputRef) {
|
|
40
41
|
}
|
41
42
|
}, [defaultPreviewImage, previewImage, inputRef]);
|
42
43
|
var handleInputChange = useCallback(function (event) {
|
43
|
-
var _event$target;
|
44
|
-
if (!event.target.files)
|
45
|
-
|
46
|
-
|
47
|
-
var
|
48
|
-
if (fileTypes !== null && fileTypes !== void 0 && _includesInstanceProperty(fileTypes).call(fileTypes, eventFileType)) {
|
49
|
-
if (onChange && typeof onChange === 'function') {
|
50
|
-
onChange(event);
|
51
|
-
}
|
44
|
+
var _event$target, _event$target2;
|
45
|
+
if (!((_event$target = event.target) !== null && _event$target !== void 0 && _event$target.files)) return;
|
46
|
+
var hasCustomFileTypes = fileTypes && fileTypes[0] !== 'image';
|
47
|
+
var currentFileType = (_event$target2 = event.target) === null || _event$target2 === void 0 || (_event$target2 = _event$target2.files[0]) === null || _event$target2 === void 0 ? void 0 : _event$target2.type;
|
48
|
+
var isSupportedFileType = _includesInstanceProperty(supportedImageTypes).call(supportedImageTypes, currentFileType);
|
52
49
|
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
50
|
+
// If custom file types are provided, only allow those file types
|
51
|
+
if (hasCustomFileTypes && !(fileTypes !== null && fileTypes !== void 0 && _includesInstanceProperty(fileTypes).call(fileTypes, currentFileType))) return;
|
52
|
+
// If no custom file types are provided, only allow image file types
|
53
|
+
if (!hasCustomFileTypes && !_includesInstanceProperty(currentFileType).call(currentFileType, 'image')) return;
|
54
|
+
if (isSupportedFileType && onChange && typeof onChange === 'function') onChange(event);
|
55
|
+
if (isSupportedFileType) {
|
56
|
+
var _event$target3;
|
57
|
+
setIsImageType(true);
|
58
|
+
var reader = new FileReader();
|
59
|
+
reader.onload = function () {
|
60
|
+
setPreviewImage(reader.result);
|
61
|
+
};
|
62
|
+
reader.readAsDataURL((_event$target3 = event.target) === null || _event$target3 === void 0 ? void 0 : _event$target3.files[0]);
|
63
|
+
} else {
|
64
|
+
var _event$target4;
|
65
|
+
setIsImageType(false);
|
66
|
+
setFileName((_event$target4 = event.target) === null || _event$target4 === void 0 || (_event$target4 = _event$target4.files[0]) === null || _event$target4 === void 0 ? void 0 : _event$target4.name);
|
69
67
|
}
|
70
68
|
}, []);
|
71
69
|
var handleOpenMenuChange = useCallback(function (isOpen) {
|
@@ -1,5 +1,9 @@
|
|
1
|
+
var _context;
|
2
|
+
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
1
3
|
/**
|
2
4
|
* List of HTML elements to re use wherever needed.
|
3
5
|
*/
|
4
6
|
|
5
|
-
export var htmlElements = ['a', 'abbr', 'acronym', 'address', 'applet', 'area', 'article', 'aside', 'audio', 'b', 'base', 'basefont', 'bdi', 'bdo', 'bgsound', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'isindex', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'listing', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'nobr', 'noframes', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'plaintext', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr', 'xmp'];
|
7
|
+
export var htmlElements = ['a', 'abbr', 'acronym', 'address', 'applet', 'area', 'article', 'aside', 'audio', 'b', 'base', 'basefont', 'bdi', 'bdo', 'bgsound', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'isindex', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'listing', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'nobr', 'noframes', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'plaintext', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr', 'xmp'];
|
8
|
+
export var supportedImageTypes = ['image', 'image/apng', 'image/avif', 'image/gif', 'image/jpeg', 'image/png', 'image/svg', 'image/svg+xml', 'image/webp'];
|
9
|
+
export var imageUploadPropTypes = _concatInstanceProperty(_context = ['application', 'application', 'audio', 'example', 'model', 'text', 'video']).call(_context, supportedImageTypes);
|