@widergy/energy-ui 3.15.0 → 3.15.2
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/CHANGELOG.md +14 -0
- package/dist/components/Loading/index.js +2 -2
- package/dist/components/UTAlert/index.js +2 -2
- package/dist/components/UTAlert/theme.js +4 -5
- package/dist/components/UTAttachment/components/Preview/index.js +3 -3
- package/dist/components/UTAttachment/index.js +5 -7
- package/dist/components/UTAttachment/layout.js +2 -2
- package/dist/components/UTAttachment/utils.js +8 -9
- package/dist/components/UTAttachmentList/components/Preview/index.js +3 -3
- package/dist/components/UTAttachmentList/components/PreviewModal/index.js +3 -3
- package/dist/components/UTAttachmentList/index.js +11 -14
- package/dist/components/UTAttachmentList/layout.js +5 -5
- package/dist/components/UTAttachmentList/theme.js +8 -9
- package/dist/components/UTAttachmentList/utils.js +9 -10
- package/dist/components/UTAutocomplete/components/ListBox/utils.js +1 -1
- package/dist/components/UTAutocomplete/index.js +2 -2
- package/dist/components/UTAutocomplete/theme.js +50 -52
- package/dist/components/UTBadge/index.js +1 -1
- package/dist/components/UTBadge/theme.js +1 -2
- package/dist/components/UTBanner/index.js +1 -1
- package/dist/components/UTBanner/theme.js +1 -2
- package/dist/components/UTBarChart/components/Bars/components/Bar/components/Rect/index.js +5 -5
- package/dist/components/UTBarChart/components/Bars/components/Bar/index.js +2 -2
- package/dist/components/UTBarChart/components/Bars/index.js +2 -2
- package/dist/components/UTBarChart/components/Legend/index.js +6 -6
- package/dist/components/UTBarChart/components/Pagination/index.js +1 -2
- package/dist/components/UTBarChart/components/XAxis/components/AxisElement/index.js +3 -4
- package/dist/components/UTBarChart/components/XAxis/index.js +2 -2
- package/dist/components/UTBarChart/components/YAxis/index.js +1 -2
- package/dist/components/UTBarChart/hooks/use-dynamic-margins.js +4 -5
- package/dist/components/UTBarChart/index.js +3 -3
- package/dist/components/UTBarChart/theme.js +6 -7
- package/dist/components/UTBarChart/utils.js +20 -26
- package/dist/components/UTBreadcrumbs/index.js +3 -3
- package/dist/components/UTBreadcrumbs/theme.js +1 -2
- package/dist/components/UTButton/index.js +12 -4
- package/dist/components/UTButton/theme.js +30 -34
- package/dist/components/UTCard/components/UTCardFooter/index.js +2 -2
- package/dist/components/UTCard/index.js +4 -4
- package/dist/components/UTCard/theme.js +1 -1
- package/dist/components/UTCarousel/components/Button/index.js +2 -2
- package/dist/components/UTCarousel/components/Legend/index.js +1 -1
- package/dist/components/UTCarousel/components/Slider/component/Slide/index.js +5 -5
- package/dist/components/UTCarousel/components/Slider/index.js +8 -9
- package/dist/components/UTCarousel/components/Slider/layout.js +6 -6
- package/dist/components/UTCheckList/index.js +7 -5
- package/dist/components/UTCheckList/theme.js +2 -3
- package/dist/components/UTCheckbox/index.js +4 -4
- package/dist/components/UTConsumptionBar/components/ConsumptionBarIndicator/index.js +4 -4
- package/dist/components/UTConsumptionBar/components/ConsumptionBarIndicatorTop/index.js +2 -2
- package/dist/components/UTConsumptionBar/index.js +8 -8
- package/dist/components/UTCuit/theme.js +6 -6
- package/dist/components/UTDatePicker/components/Day/index.js +5 -1
- package/dist/components/UTDatePicker/index.js +5 -6
- package/dist/components/UTDatePicker/theme.js +157 -160
- package/dist/components/UTDialog/index.js +8 -8
- package/dist/components/UTDialog/theme.js +1 -2
- package/dist/components/UTEmojiPicker/index.js +11 -6
- package/dist/components/UTEmojiPicker/theme.js +23 -24
- package/dist/components/UTExternalLink/index.js +1 -1
- package/dist/components/UTExternalLink/theme.js +1 -2
- package/dist/components/UTFileInput/layout.js +11 -5
- package/dist/components/UTGoogleAutocomplete/theme.js +1 -2
- package/dist/components/UTHeader/index.js +4 -4
- package/dist/components/UTHeader/theme.js +2 -3
- package/dist/components/UTIcon/theme.js +1 -2
- package/dist/components/UTIconButton/index.js +2 -2
- package/dist/components/UTImageRadio/components/ImageRadioCard/index.js +6 -6
- package/dist/components/UTImageRadio/index.js +3 -3
- package/dist/components/UTImageRadio/theme.js +13 -14
- package/dist/components/UTLabel/constants.js +3 -3
- package/dist/components/UTLabel/index.js +1 -1
- package/dist/components/UTLabel/theme.js +6 -8
- package/dist/components/UTList/index.js +1 -1
- package/dist/components/UTMap/components/GoogleMaps/styles.js +2 -2
- package/dist/components/UTMenu/index.js +3 -3
- package/dist/components/UTMenu/theme.js +27 -31
- package/dist/components/UTMenu/utils.js +1 -1
- package/dist/components/UTModal/index.js +9 -6
- package/dist/components/UTModal/theme.js +1 -2
- package/dist/components/UTOnboarding/index.js +16 -24
- package/dist/components/UTOnboarding/theme.js +12 -14
- package/dist/components/UTPagination/components/PageSizeSelector/index.js +2 -2
- package/dist/components/UTPagination/components/Pagination/components/NavigationButton/index.js +4 -1
- package/dist/components/UTPagination/components/Pagination/index.js +3 -3
- package/dist/components/UTPagination/index.js +2 -2
- package/dist/components/UTPagination/theme.js +9 -10
- package/dist/components/UTPanel/index.js +5 -5
- package/dist/components/UTPasswordField/components/PasswordValidations/components/Error/index.js +1 -1
- package/dist/components/UTPasswordField/components/PasswordValidations/components/Validation/index.js +2 -2
- package/dist/components/UTPasswordField/components/PasswordValidations/index.js +2 -2
- package/dist/components/UTPasswordField/theme.js +5 -6
- package/dist/components/UTPhoneInput/index.js +10 -11
- package/dist/components/UTPhoneInput/theme.js +10 -10
- package/dist/components/UTPieChart/components/ArrowLabel/index.js +2 -2
- package/dist/components/UTPieChart/components/Legend/index.js +4 -4
- package/dist/components/UTPieChart/index.js +5 -5
- package/dist/components/UTProductItem/index.js +3 -3
- package/dist/components/UTProductItem/theme.js +3 -4
- package/dist/components/UTProgressBar/index.js +1 -1
- package/dist/components/UTProgressBar/theme.js +11 -12
- package/dist/components/UTRadioGroup/index.js +11 -5
- package/dist/components/UTRadioGroup/theme.js +17 -17
- package/dist/components/UTRating/components/Circle/index.js +5 -5
- package/dist/components/UTRating/components/Faces/index.js +8 -4
- package/dist/components/UTRating/components/Star/index.js +3 -3
- package/dist/components/UTRating/index.js +2 -2
- package/dist/components/UTRating/theme.js +21 -21
- package/dist/components/UTRipple/Ripple.js +2 -2
- package/dist/components/UTSelect/index.js +1 -1
- package/dist/components/UTSelect/theme.js +14 -14
- package/dist/components/UTSelectableCard/index.js +9 -5
- package/dist/components/UTSelectableCard/theme.js +19 -20
- package/dist/components/UTSidebar/components/ListOption/index.js +1 -4
- package/dist/components/UTSidebar/components/LogosContainer/index.js +3 -3
- package/dist/components/UTSidebar/components/Option/index.js +29 -7
- package/dist/components/UTSidebar/components/Toggler/index.js +2 -2
- package/dist/components/UTSidebar/index.js +7 -3
- package/dist/components/UTSidebar/theme.js +16 -17
- package/dist/components/UTSkeleton/index.js +2 -3
- package/dist/components/UTStatus/index.js +2 -2
- package/dist/components/UTStepper/components/Connectors/index.js +7 -5
- package/dist/components/UTStepper/components/Step/index.js +16 -6
- package/dist/components/UTStepper/index.js +1 -1
- package/dist/components/UTStepper/theme.js +11 -12
- package/dist/components/UTSwitch/index.js +6 -6
- package/dist/components/UTSwitch/theme.js +2 -2
- package/dist/components/UTTable/components/ActionIcons/index.js +8 -3
- package/dist/components/UTTable/components/Cell/components/ActionButton/index.js +1 -2
- package/dist/components/UTTable/components/Cell/index.js +2 -2
- package/dist/components/UTTable/components/HeaderCell/index.js +16 -5
- package/dist/components/UTTable/components/PrimaryAction/index.js +1 -1
- package/dist/components/UTTable/components/ResponsiveCell/index.js +4 -4
- package/dist/components/UTTable/components/Status/index.js +2 -2
- package/dist/components/UTTable/components/TableFooter/components/PageSizeSelector/index.js +2 -2
- package/dist/components/UTTable/components/TableFooter/components/Pagination/components/NavigationButton/index.js +6 -1
- package/dist/components/UTTable/components/TableFooter/components/Pagination/index.js +6 -2
- package/dist/components/UTTable/components/TableFooter/index.js +1 -1
- package/dist/components/UTTable/components/TableHeader/index.js +3 -3
- package/dist/components/UTTable/components/TableRow/index.js +42 -13
- package/dist/components/UTTable/components/TableRow/utils.js +1 -7
- package/dist/components/UTTable/hook.js +1 -4
- package/dist/components/UTTable/index.js +22 -19
- package/dist/components/UTTable/theme.js +32 -33
- package/dist/components/UTTable/utils.js +14 -14
- package/dist/components/UTTabs/components/TooltipTab/index.js +1 -1
- package/dist/components/UTTabs/index.js +7 -7
- package/dist/components/UTTabs/theme.js +2 -2
- package/dist/components/UTTextArea/index.js +6 -6
- package/dist/components/UTTextArea/theme.js +21 -22
- package/dist/components/UTTextInput/index.js +9 -5
- package/dist/components/UTTextInput/theme.js +12 -12
- package/dist/components/UTToggle/components/ToggleOption/index.js +3 -3
- package/dist/components/UTToggle/index.js +2 -2
- package/dist/components/UTToggle/theme.js +2 -2
- package/dist/components/UTTooltip/index.js +2 -2
- package/dist/components/UTTooltip/theme.js +9 -10
- package/dist/components/UTTopbar/components/Notifications/index.js +1 -1
- package/dist/components/UTTopbar/components/UserMenu/index.js +8 -4
- package/dist/components/UTTopbar/index.js +2 -2
- package/dist/components/UTTopbar/theme.js +40 -41
- package/dist/components/UTTouchableWithoutFeedback/index.js +1 -1
- package/dist/components/UTVirtualizedList/components/VirtualizedData/components/ListRow/index.js +4 -5
- package/dist/components/UTVirtualizedList/components/VirtualizedData/components/ListRow/utils.js +3 -4
- package/dist/components/UTVirtualizedList/components/VirtualizedData/hooks/use-ledger.js +1 -1
- package/dist/components/UTVirtualizedList/components/VirtualizedData/utils.js +2 -3
- package/dist/components/UTVirtualizedList/index.js +1 -1
- package/dist/components/UTWizard/index.js +3 -3
- package/dist/components/UTWizard/theme.js +2 -2
- package/dist/components/UTWorkflowContainer/versions/V0/components/ActionButton/index.js +6 -3
- package/dist/components/UTWorkflowContainer/versions/V0/index.js +10 -7
- package/dist/components/UTWorkflowContainer/versions/V0/theme.js +4 -5
- package/dist/components/UTWorkflowContainer/versions/V1/components/NavActions/index.js +4 -4
- package/dist/components/UTWorkflowContainer/versions/V1/index.js +7 -7
- package/dist/components/UTWorkflowContainer/versions/V1/theme.js +6 -7
- package/dist/components/WithGoogleMaps/index.js +2 -2
- package/dist/components/WithTouch/index.js +1 -1
- package/dist/index.js +0 -7
- package/dist/utils/classesUtils.js +2 -2
- package/dist/utils/componentUtils.js +3 -3
- package/dist/utils/shadowUtils.js +1 -1
- package/package.json +1 -1
- package/dist/utils/analytics.js +0 -39
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [3.15.2](https://github.com/widergy/energy-ui/compare/v3.15.1...v3.15.2) (2024-08-12)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* changes sizes for some variants ([#473](https://github.com/widergy/energy-ui/issues/473)) ([d25109a](https://github.com/widergy/energy-ui/commit/d25109acd6aadb5425f8553fb0e729d223e8016e))
|
|
7
|
+
|
|
8
|
+
## [3.15.1](https://github.com/widergy/energy-ui/compare/v3.15.0...v3.15.1) (2024-08-09)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* analytics utils removed ([#472](https://github.com/widergy/energy-ui/issues/472)) ([8c96506](https://github.com/widergy/energy-ui/commit/8c96506e0c3ccd26dc87b23c7d5f7cd1c3df6d66))
|
|
14
|
+
|
|
1
15
|
# [3.15.0](https://github.com/widergy/energy-ui/compare/v3.14.1...v3.15.0) (2024-08-02)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -27,13 +27,13 @@ const Loading = _ref => {
|
|
|
27
27
|
const defaultSize = (0, _seamlessImmutable.getIn)(theme, ['Loading', 'base', 'size'], 85);
|
|
28
28
|
const defaultThickness = (0, _seamlessImmutable.getIn)(theme, ['Loading', 'base', 'thickness'], 1.5);
|
|
29
29
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
30
|
-
className:
|
|
30
|
+
className: `${_stylesModule.default.container} ${className}`
|
|
31
31
|
}, /*#__PURE__*/_react.default.createElement(_CircularProgress.default, {
|
|
32
32
|
className: classes.base,
|
|
33
33
|
size: size || defaultSize,
|
|
34
34
|
thickness: thickness || defaultThickness
|
|
35
35
|
}), /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
|
|
36
|
-
className:
|
|
36
|
+
className: `${_stylesModule.default.text} ${classes.text} ${textClassName}`
|
|
37
37
|
}, text || _constants.DEFAULT_LOADING_TEXT));
|
|
38
38
|
};
|
|
39
39
|
Loading.propTypes = {
|
|
@@ -85,14 +85,14 @@ class UTAlert extends _react.PureComponent {
|
|
|
85
85
|
root: _stylesModule.default.snackbarRoot
|
|
86
86
|
},
|
|
87
87
|
ContentProps: {
|
|
88
|
-
className:
|
|
88
|
+
className: `${_stylesModule.default.snackbarContent} ${classes.snackbarContent} ${this.selectAlertType()}`,
|
|
89
89
|
classes: {
|
|
90
90
|
action: _stylesModule.default.action,
|
|
91
91
|
message: _stylesModule.default.message
|
|
92
92
|
}
|
|
93
93
|
},
|
|
94
94
|
message: /*#__PURE__*/_react.default.createElement("div", {
|
|
95
|
-
className:
|
|
95
|
+
className: `${_stylesModule.default.content} ${classes.content}`
|
|
96
96
|
}, !withoutIcon && AlertTypeIcon && /*#__PURE__*/_react.default.createElement(AlertTypeIcon, {
|
|
97
97
|
classes: {
|
|
98
98
|
root: _stylesModule.default.alertTypeIcon
|
|
@@ -9,22 +9,21 @@ var _styles = require("@material-ui/core/styles");
|
|
|
9
9
|
var _colorsModule = _interopRequireDefault(require("../../scss/variables/colors.module.scss"));
|
|
10
10
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
11
|
const retrieveStyle = _ref => {
|
|
12
|
-
var _theme$Palette, _theme$Palette2, _theme$Palette3, _theme$Palette4;
|
|
13
12
|
let {
|
|
14
13
|
theme
|
|
15
14
|
} = _ref;
|
|
16
15
|
return {
|
|
17
16
|
error: {
|
|
18
|
-
backgroundColor:
|
|
17
|
+
backgroundColor: theme.Palette?.error['04'] || _colorsModule.default.notificationError
|
|
19
18
|
},
|
|
20
19
|
info: {
|
|
21
|
-
backgroundColor:
|
|
20
|
+
backgroundColor: theme.Palette?.information['04'] || _colorsModule.default.notificationInfo
|
|
22
21
|
},
|
|
23
22
|
success: {
|
|
24
|
-
backgroundColor:
|
|
23
|
+
backgroundColor: theme.Palette?.success['04'] || _colorsModule.default.notificationSuccess
|
|
25
24
|
},
|
|
26
25
|
warning: {
|
|
27
|
-
backgroundColor:
|
|
26
|
+
backgroundColor: theme.Palette?.warning['04'] || _colorsModule.default.notificationWarning
|
|
28
27
|
},
|
|
29
28
|
action: {
|
|
30
29
|
padding: (0, _seamlessImmutable.getIn)(theme, ['UTAlert', 'action', 'padding']),
|
|
@@ -22,11 +22,11 @@ const Preview = _ref => {
|
|
|
22
22
|
src: preview.src,
|
|
23
23
|
className: _stylesModule.default.previewImage,
|
|
24
24
|
alt: ""
|
|
25
|
-
}, previewProps
|
|
25
|
+
}, previewProps?.image)), (0, _utils.isAudio)(preview) && /*#__PURE__*/_react.default.createElement("audio", _extends({
|
|
26
26
|
controls: true,
|
|
27
27
|
controlsList: "nodownload",
|
|
28
28
|
className: _stylesModule.default.previewAudio
|
|
29
|
-
}, previewProps
|
|
29
|
+
}, previewProps?.audio), /*#__PURE__*/_react.default.createElement("source", {
|
|
30
30
|
src: preview.src,
|
|
31
31
|
type: preview.type
|
|
32
32
|
})), (0, _utils.isVideo)(preview) && /*#__PURE__*/_react.default.createElement("video", _extends({
|
|
@@ -34,7 +34,7 @@ const Preview = _ref => {
|
|
|
34
34
|
disablePictureInPicture: true,
|
|
35
35
|
controlsList: "nodownload",
|
|
36
36
|
className: _stylesModule.default.previewVideo
|
|
37
|
-
}, previewProps
|
|
37
|
+
}, previewProps?.video), /*#__PURE__*/_react.default.createElement("source", {
|
|
38
38
|
src: preview.src,
|
|
39
39
|
type: preview.type
|
|
40
40
|
})));
|
|
@@ -30,7 +30,7 @@ class AttachmentContainer extends _react.Component {
|
|
|
30
30
|
onLoaded
|
|
31
31
|
} = this.props;
|
|
32
32
|
(0, _utils.getBlobFromUrl)(input.value, response => {
|
|
33
|
-
if (response
|
|
33
|
+
if (response?.type) {
|
|
34
34
|
const fileType = response.type.substring(response.type.indexOf('/') + 1);
|
|
35
35
|
this.setState({
|
|
36
36
|
name: this.getDefaultAttachment(input.value, fileType)
|
|
@@ -52,7 +52,7 @@ class AttachmentContainer extends _react.Component {
|
|
|
52
52
|
href: url,
|
|
53
53
|
target: "_blank",
|
|
54
54
|
rel: "noopener noreferrer"
|
|
55
|
-
}, _constants.DEFAULT_ATTACHMENT_NAME, fileType &&
|
|
55
|
+
}, _constants.DEFAULT_ATTACHMENT_NAME, fileType && `.${fileType}`) || '');
|
|
56
56
|
_defineProperty(this, "hasDefaultValueToLoad", () => this.props.input.value && typeof this.props.input.value === 'string');
|
|
57
57
|
_defineProperty(this, "hasDefaultFileObjectToLoad", () => {
|
|
58
58
|
const {
|
|
@@ -61,7 +61,6 @@ class AttachmentContainer extends _react.Component {
|
|
|
61
61
|
return input.value && typeof input.value === 'object' && (0, _utils.isValidFile)(input.value.file);
|
|
62
62
|
});
|
|
63
63
|
_defineProperty(this, "onChange", async ev => {
|
|
64
|
-
var _this$props$allowedPD;
|
|
65
64
|
let file = ev.target.files[0];
|
|
66
65
|
const {
|
|
67
66
|
resizeConfig,
|
|
@@ -69,8 +68,8 @@ class AttachmentContainer extends _react.Component {
|
|
|
69
68
|
} = this.props;
|
|
70
69
|
const fileErrorTexts = {
|
|
71
70
|
formatError: _constants.FORMAT_ERROR_TEXT,
|
|
72
|
-
sizeError:
|
|
73
|
-
aspectRatioError:
|
|
71
|
+
sizeError: `${_constants.SIZE_ERROR_TEXT} ${Math.round(this.props.maxFileSize / 1048576)}MB.`,
|
|
72
|
+
aspectRatioError: `${_constants.ASPECT_RATIO_ERROR_TEXT} ${this.props.allowedPDFUploadSizes?.map(aspectRatio => aspectRatio.name).join(' - ')})`
|
|
74
73
|
};
|
|
75
74
|
this.setState({
|
|
76
75
|
error: false
|
|
@@ -148,12 +147,11 @@ class AttachmentContainer extends _react.Component {
|
|
|
148
147
|
this.loadDefaultValues();
|
|
149
148
|
}
|
|
150
149
|
componentDidUpdate(prevProps) {
|
|
151
|
-
var _prevProps$fieldTypes;
|
|
152
150
|
const {
|
|
153
151
|
fieldTypes,
|
|
154
152
|
input
|
|
155
153
|
} = this.props;
|
|
156
|
-
if (
|
|
154
|
+
if (prevProps.fieldTypes?.[0] !== fieldTypes?.[0]) this.removeValue();else if ((0, _utils.isNewFile)(prevProps.input.value, input.value)) this.loadDefaultValues();
|
|
157
155
|
}
|
|
158
156
|
render() {
|
|
159
157
|
const {
|
|
@@ -41,7 +41,7 @@ const Attachment = _ref => {
|
|
|
41
41
|
const fieldType = acceptedFileTypes || fieldTypes.map(type => _files.inputFiles[type].inputType).join();
|
|
42
42
|
const Icon = RemoveIcon || _DeleteForever.default;
|
|
43
43
|
return name && !loading ? /*#__PURE__*/_react.default.createElement("div", {
|
|
44
|
-
className:
|
|
44
|
+
className: `${_stylesModule.default.previewContainer} ${previewClassname}`
|
|
45
45
|
}, /*#__PURE__*/_react.default.createElement(_Preview.default, {
|
|
46
46
|
preview: preview,
|
|
47
47
|
previewProps: previewProps
|
|
@@ -53,7 +53,7 @@ const Attachment = _ref => {
|
|
|
53
53
|
className: _stylesModule.default.name
|
|
54
54
|
}, name), /*#__PURE__*/_react.default.createElement(_UTButton.default, {
|
|
55
55
|
classNames: {
|
|
56
|
-
root:
|
|
56
|
+
root: `${_stylesModule.default.removeIconContainer} ${removeFileClassname}`
|
|
57
57
|
},
|
|
58
58
|
disabled: disabled,
|
|
59
59
|
Icon: Icon,
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.pdfAspectRatioValidation = exports.isVideo = exports.isValidFile = exports.isPDF = exports.isNewFile = exports.isImage = exports.isHTML = exports.isAudio = exports.hasPreview = exports.getBlobFromUrl = void 0;
|
|
7
7
|
var _files = require("@widergy/web-utils/lib/constants/files");
|
|
8
|
-
if (window['pdfjs-dist/build/pdf']) window['pdfjs-dist/build/pdf'].GlobalWorkerOptions.workerSrc =
|
|
8
|
+
if (window['pdfjs-dist/build/pdf']) window['pdfjs-dist/build/pdf'].GlobalWorkerOptions.workerSrc = `//cdnjs.cloudflare.com/ajax/libs/pdf.js/${window['pdfjs-dist/build/pdf'].version}/pdf.worker.js`;
|
|
9
9
|
const getImage = async imageUrl => fetch(imageUrl, {
|
|
10
10
|
method: 'GET'
|
|
11
11
|
}).catch(error => console.error(error)); // eslint-disable-line no-console
|
|
@@ -13,7 +13,7 @@ const getImage = async imageUrl => fetch(imageUrl, {
|
|
|
13
13
|
const getBlobFromUrl = async (imageUrl, callback) => {
|
|
14
14
|
if (!imageUrl || !callback) return false;
|
|
15
15
|
const response = await getImage(imageUrl);
|
|
16
|
-
if (response
|
|
16
|
+
if (response?.ok) response.blob().then(blob => callback(blob));else callback(null);
|
|
17
17
|
};
|
|
18
18
|
exports.getBlobFromUrl = getBlobFromUrl;
|
|
19
19
|
const lengthMatches = (length1, length2, toleranceInPercentage) => {
|
|
@@ -38,28 +38,27 @@ const pdfAspectRatioValidation = async (file, allowedPDFUploadSizes) => {
|
|
|
38
38
|
return pages.every(page => pageMatches(page, allowedPDFUploadSizes));
|
|
39
39
|
};
|
|
40
40
|
exports.pdfAspectRatioValidation = pdfAspectRatioValidation;
|
|
41
|
-
const isImage = file => _files.inputFiles.image.validType.includes(file
|
|
41
|
+
const isImage = file => _files.inputFiles.image.validType.includes(file?.type);
|
|
42
42
|
exports.isImage = isImage;
|
|
43
|
-
const isPDF = file => _files.inputFiles.pdf.validType.includes(file
|
|
43
|
+
const isPDF = file => _files.inputFiles.pdf.validType.includes(file?.type);
|
|
44
44
|
exports.isPDF = isPDF;
|
|
45
|
-
const isAudio = file => _files.inputFiles.audio.validType.includes(file
|
|
45
|
+
const isAudio = file => _files.inputFiles.audio.validType.includes(file?.type);
|
|
46
46
|
exports.isAudio = isAudio;
|
|
47
|
-
const isVideo = file => _files.inputFiles.video.validType.includes(file
|
|
47
|
+
const isVideo = file => _files.inputFiles.video.validType.includes(file?.type);
|
|
48
48
|
exports.isVideo = isVideo;
|
|
49
|
-
const isHTML = file => _files.inputFiles.html.validType.includes(file
|
|
49
|
+
const isHTML = file => _files.inputFiles.html.validType.includes(file?.type);
|
|
50
50
|
exports.isHTML = isHTML;
|
|
51
51
|
const hasPreview = file => isImage(file) || isAudio(file) || isVideo(file);
|
|
52
52
|
exports.hasPreview = hasPreview;
|
|
53
53
|
const isValidFile = file => hasPreview(file) || isPDF(file) || isHTML(file);
|
|
54
54
|
exports.isValidFile = isValidFile;
|
|
55
55
|
const isNewFile = (newFile, oldFile) => {
|
|
56
|
-
var _newFile$file, _oldFile$file;
|
|
57
56
|
if (!newFile && !oldFile) return false;
|
|
58
57
|
if (!newFile || !oldFile) return true;
|
|
59
58
|
const newFileType = typeof newFile;
|
|
60
59
|
const oldFileType = typeof oldFile;
|
|
61
60
|
if (newFileType !== oldFileType) return true;
|
|
62
61
|
if (newFileType === 'string') return newFile !== oldFile;
|
|
63
|
-
return
|
|
62
|
+
return newFile.file?.lastModified !== oldFile.file?.lastModified;
|
|
64
63
|
};
|
|
65
64
|
exports.isNewFile = isNewFile;
|
|
@@ -55,10 +55,10 @@ const Preview = _ref => {
|
|
|
55
55
|
src: preview.src,
|
|
56
56
|
className: _stylesModule.default.previewImage,
|
|
57
57
|
alt: ""
|
|
58
|
-
}, previewProps
|
|
59
|
-
className: classes
|
|
58
|
+
}, previewProps?.image)), (0, _utils.isAudio)(preview) && /*#__PURE__*/_react.default.createElement(AudioIcon, {
|
|
59
|
+
className: classes?.actionAccentIcon
|
|
60
60
|
}), (0, _utils.isVideo)(preview) && /*#__PURE__*/_react.default.createElement(VideoIcon, {
|
|
61
|
-
className: classes
|
|
61
|
+
className: classes?.actionAccentIcon
|
|
62
62
|
}));
|
|
63
63
|
};
|
|
64
64
|
Preview.propTypes = {
|
|
@@ -30,11 +30,11 @@ const PreviewModal = _ref => {
|
|
|
30
30
|
src: preview.src,
|
|
31
31
|
className: _stylesModule.default.previewImage,
|
|
32
32
|
alt: ""
|
|
33
|
-
}, previewProps
|
|
33
|
+
}, previewProps?.image)), (0, _utils.isAudio)(preview) && /*#__PURE__*/_react.default.createElement("audio", _extends({
|
|
34
34
|
controls: true,
|
|
35
35
|
controlsList: "nodownload",
|
|
36
36
|
className: _stylesModule.default.previewAudio
|
|
37
|
-
}, previewProps
|
|
37
|
+
}, previewProps?.audio), /*#__PURE__*/_react.default.createElement("source", {
|
|
38
38
|
src: preview.src,
|
|
39
39
|
type: preview.type
|
|
40
40
|
})), (0, _utils.isVideo)(preview) && /*#__PURE__*/_react.default.createElement("video", _extends({
|
|
@@ -42,7 +42,7 @@ const PreviewModal = _ref => {
|
|
|
42
42
|
disablePictureInPicture: true,
|
|
43
43
|
controlsList: "nodownload",
|
|
44
44
|
className: _stylesModule.default.previewVideo
|
|
45
|
-
}, previewProps
|
|
45
|
+
}, previewProps?.video), /*#__PURE__*/_react.default.createElement("source", {
|
|
46
46
|
src: preview.src,
|
|
47
47
|
type: preview.type
|
|
48
48
|
})));
|
|
@@ -19,7 +19,6 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
19
19
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
20
20
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
21
21
|
const AttachmentContainer = _ref => {
|
|
22
|
-
var _field$configuration, _field$configuration2, _field$configuration3, _field$configuration4, _input$value;
|
|
23
22
|
let {
|
|
24
23
|
acceptedFileTypes: defaultAcceptedFileTypes,
|
|
25
24
|
allowedPDFUploadSizes,
|
|
@@ -39,15 +38,15 @@ const AttachmentContainer = _ref => {
|
|
|
39
38
|
resizeConfig,
|
|
40
39
|
sanitize
|
|
41
40
|
} = _ref;
|
|
42
|
-
const helpText = field
|
|
43
|
-
const maxFileSize =
|
|
44
|
-
const acceptedFileTypes =
|
|
45
|
-
const maxFiles =
|
|
41
|
+
const helpText = field?.configuration?.help_text;
|
|
42
|
+
const maxFileSize = field?.configuration?.max_file_size || defaultMaxFileSize;
|
|
43
|
+
const acceptedFileTypes = field?.configuration?.accepted_file_types || defaultAcceptedFileTypes;
|
|
44
|
+
const maxFiles = field?.configuration?.max_files || _constants.DEFAULT_MAX_FILES;
|
|
46
45
|
const [preview, setPreview] = (0, _react.useState)([]);
|
|
47
46
|
const [error, setError] = (0, _react.useState)(false);
|
|
48
47
|
const [errorText, setErrorText] = (0, _react.useState)(_constants.FORMAT_ERROR_TEXT);
|
|
49
48
|
const fileInputRef = (0, _react.useRef)(null);
|
|
50
|
-
const [updatedFiles, setUpdatedFiles] = (0, _react.useState)(
|
|
49
|
+
const [updatedFiles, setUpdatedFiles] = (0, _react.useState)(input?.value?.files || []);
|
|
51
50
|
const removePreviewItem = fileName => {
|
|
52
51
|
if (fileName) setPreview(prevPreview => prevPreview.filter(item => item.name !== fileName));
|
|
53
52
|
setUpdatedFiles(prevFiles => {
|
|
@@ -64,10 +63,10 @@ const AttachmentContainer = _ref => {
|
|
|
64
63
|
};
|
|
65
64
|
const onFailValidation = (errorMessage, dynamicData) => {
|
|
66
65
|
setError(true);
|
|
67
|
-
setErrorText(dynamicData ?
|
|
66
|
+
setErrorText(dynamicData ? `${errorMessage}(${dynamicData})` : errorMessage);
|
|
68
67
|
};
|
|
69
68
|
const buildPreviews = async files => {
|
|
70
|
-
const prevPreviews = preview
|
|
69
|
+
const prevPreviews = preview ?? [];
|
|
71
70
|
const loadPreview = file => new Promise((resolve, reject) => {
|
|
72
71
|
const reader = new FileReader();
|
|
73
72
|
reader.onload = e => {
|
|
@@ -110,13 +109,12 @@ const AttachmentContainer = _ref => {
|
|
|
110
109
|
}
|
|
111
110
|
};
|
|
112
111
|
const onChange = async ev => {
|
|
113
|
-
|
|
114
|
-
const prevFiles = ((_input$value2 = input.value) === null || _input$value2 === void 0 ? void 0 : _input$value2.files) || updatedFiles;
|
|
112
|
+
const prevFiles = input.value?.files || updatedFiles;
|
|
115
113
|
const files = Object.values((0, _isEmpty.default)(prevFiles) ? ev.target.files : (0, _utils.getNotRepeatedFiles)([...prevFiles, ...ev.target.files]));
|
|
116
114
|
const fileErrorTexts = {
|
|
117
115
|
formatError: _constants.FORMAT_ERROR_TEXT,
|
|
118
|
-
sizeError:
|
|
119
|
-
aspectRatioError:
|
|
116
|
+
sizeError: `${_constants.SIZE_ERROR_TEXT} ${(0, _utils.getSizeInMB)(maxFileSize)}MB.`,
|
|
117
|
+
aspectRatioError: `${_constants.ASPECT_RATIO_ERROR_TEXT} ${allowedPDFUploadSizes?.map(aspectRatio => aspectRatio.name).join(' - ')})`
|
|
120
118
|
};
|
|
121
119
|
setError(false);
|
|
122
120
|
const processFiles = async index => {
|
|
@@ -166,7 +164,6 @@ const AttachmentContainer = _ref => {
|
|
|
166
164
|
await processFiles(0);
|
|
167
165
|
};
|
|
168
166
|
const loadDefaultValues = async function () {
|
|
169
|
-
var _input$value$index;
|
|
170
167
|
let index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
171
168
|
let accumulatedFiles = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
172
169
|
const length = Array.isArray(input.value) ? input.value.length : 1;
|
|
@@ -179,7 +176,7 @@ const AttachmentContainer = _ref => {
|
|
|
179
176
|
buildPreviews(accumulatedFiles);
|
|
180
177
|
return;
|
|
181
178
|
}
|
|
182
|
-
const imageUrl = Array.isArray(input.value) ?
|
|
179
|
+
const imageUrl = Array.isArray(input.value) ? input.value[index]?.url : input.value;
|
|
183
180
|
(0, _utils.getBlobFromUrl)(imageUrl, async response => {
|
|
184
181
|
if (response) {
|
|
185
182
|
const newFile = new File([response], (0, _utils.getDefaultAttachment)(response.type.substring(response.type.indexOf('/') + 1), index + 1), {
|
|
@@ -136,9 +136,9 @@ const Attachment = _ref => {
|
|
|
136
136
|
};
|
|
137
137
|
const closePreviewModal = () => setPreviewModalIsOpen(false);
|
|
138
138
|
return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
139
|
-
className:
|
|
139
|
+
className: `${_stylesModule.default.container} ${classes.container} ${error && classes.errorContainer}`
|
|
140
140
|
}, !previewIsEmpty && preview.map(previewItem => /*#__PURE__*/_react.default.createElement("div", {
|
|
141
|
-
className:
|
|
141
|
+
className: `${_stylesModule.default.previewContainer} ${classes.previewContainer}`
|
|
142
142
|
}, previewItem.src ? /*#__PURE__*/_react.default.createElement(_Preview.default, {
|
|
143
143
|
classes: classes,
|
|
144
144
|
preview: previewItem,
|
|
@@ -178,9 +178,9 @@ const Attachment = _ref => {
|
|
|
178
178
|
size: "small",
|
|
179
179
|
variant: "text"
|
|
180
180
|
}))), previewIsEmpty && /*#__PURE__*/_react.default.createElement(FilesIcon, {
|
|
181
|
-
className:
|
|
181
|
+
className: `${_stylesModule.default.filesIcon} ${classes.filesIcon}`
|
|
182
182
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
183
|
-
className:
|
|
183
|
+
className: `${_stylesModule.default.labelAndInputContainer} ${!previewIsEmpty && _stylesModule.default.positionRelative}`
|
|
184
184
|
}, previewIsEmpty && /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
|
|
185
185
|
colorTheme: "accent"
|
|
186
186
|
}, _constants.INDICATIONS), /*#__PURE__*/_react.default.createElement(_UTButton.default, {
|
|
@@ -204,7 +204,7 @@ const Attachment = _ref => {
|
|
|
204
204
|
colorTheme: "gray",
|
|
205
205
|
variant: "small",
|
|
206
206
|
className: _stylesModule.default.aclaration
|
|
207
|
-
},
|
|
207
|
+
}, `${_constants.FORMAT_FILE_LABEL}${(0, _utils.getAvailableFileTypesLabel)(fieldType)}.`, " ", /*#__PURE__*/_react.default.createElement("br", null), `${_constants.MAX_SIZE_FILE_LABEL}${maxFileSize}MB`)), helpText && /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
|
|
208
208
|
className: _stylesModule.default.helpText,
|
|
209
209
|
colorTheme: "gray",
|
|
210
210
|
variant: "small"
|
|
@@ -5,32 +5,31 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.retrieveStyle = void 0;
|
|
7
7
|
const retrieveStyle = _ref => {
|
|
8
|
-
var _theme$Palette, _theme$Palette2, _theme$Palette3, _theme$Palette4, _theme$Palette5, _theme$Palette6, _theme$Palette7, _theme$Palette8;
|
|
9
8
|
let {
|
|
10
9
|
theme
|
|
11
10
|
} = _ref;
|
|
12
11
|
return {
|
|
13
12
|
container: {
|
|
14
|
-
backgroundColor:
|
|
15
|
-
border:
|
|
13
|
+
backgroundColor: theme.Palette?.light['03'],
|
|
14
|
+
border: `1px dashed ${theme.Palette?.actions.accent['04']}`
|
|
16
15
|
},
|
|
17
16
|
errorContainer: {
|
|
18
|
-
border:
|
|
17
|
+
border: `2px solid ${theme.Palette?.error['04']}`
|
|
19
18
|
},
|
|
20
19
|
filesIcon: {
|
|
21
|
-
fill:
|
|
20
|
+
fill: theme.Palette?.actions.accent['03']
|
|
22
21
|
},
|
|
23
22
|
previewContainer: {
|
|
24
|
-
backgroundColor:
|
|
23
|
+
backgroundColor: theme.Palette?.light['01']
|
|
25
24
|
},
|
|
26
25
|
actionAccentIcon: {
|
|
27
|
-
fill:
|
|
26
|
+
fill: theme.Palette?.actions.accent['04']
|
|
28
27
|
},
|
|
29
28
|
uploadIcon: {
|
|
30
|
-
fill:
|
|
29
|
+
fill: theme.Palette?.actions.accent['05']
|
|
31
30
|
},
|
|
32
31
|
actionNeutralIcon: {
|
|
33
|
-
fill:
|
|
32
|
+
fill: theme.Palette?.actions.neutral['05']
|
|
34
33
|
}
|
|
35
34
|
};
|
|
36
35
|
};
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.pdfAspectRatioValidation = exports.isVideo = exports.isValidFile = exports.isPDF = exports.isNewFile = exports.isImage = exports.isHTML = exports.isAudio = exports.hasPreview = exports.getSizeInMB = exports.getNotRepeatedFiles = exports.getDefaultAttachment = exports.getBlobFromUrl = exports.getAvailableFileTypesLabel = void 0;
|
|
7
7
|
var _files = require("@widergy/web-utils/lib/constants/files");
|
|
8
8
|
var _constants = require("./constants");
|
|
9
|
-
if (window['pdfjs-dist/build/pdf']) window['pdfjs-dist/build/pdf'].GlobalWorkerOptions.workerSrc =
|
|
9
|
+
if (window['pdfjs-dist/build/pdf']) window['pdfjs-dist/build/pdf'].GlobalWorkerOptions.workerSrc = `//cdnjs.cloudflare.com/ajax/libs/pdf.js/${window['pdfjs-dist/build/pdf'].version}/pdf.worker.js`;
|
|
10
10
|
const getImage = async imageUrl => fetch(imageUrl, {
|
|
11
11
|
method: 'GET'
|
|
12
12
|
}).catch(error => console.error(error)); // eslint-disable-line no-console
|
|
@@ -14,7 +14,7 @@ const getImage = async imageUrl => fetch(imageUrl, {
|
|
|
14
14
|
const getBlobFromUrl = async (imageUrl, callback) => {
|
|
15
15
|
if (!imageUrl || !callback) return false;
|
|
16
16
|
const response = await getImage(imageUrl);
|
|
17
|
-
if (response
|
|
17
|
+
if (response?.ok) response.blob().then(blob => callback(blob));else callback(null);
|
|
18
18
|
};
|
|
19
19
|
exports.getBlobFromUrl = getBlobFromUrl;
|
|
20
20
|
const lengthMatches = (length1, length2, toleranceInPercentage) => {
|
|
@@ -39,29 +39,28 @@ const pdfAspectRatioValidation = async (file, allowedPDFUploadSizes) => {
|
|
|
39
39
|
return pages.every(page => pageMatches(page, allowedPDFUploadSizes));
|
|
40
40
|
};
|
|
41
41
|
exports.pdfAspectRatioValidation = pdfAspectRatioValidation;
|
|
42
|
-
const isImage = file => _files.inputFiles.image.validType.includes(file
|
|
42
|
+
const isImage = file => _files.inputFiles.image.validType.includes(file?.type);
|
|
43
43
|
exports.isImage = isImage;
|
|
44
|
-
const isPDF = file => _files.inputFiles.pdf.validType.includes(file
|
|
44
|
+
const isPDF = file => _files.inputFiles.pdf.validType.includes(file?.type);
|
|
45
45
|
exports.isPDF = isPDF;
|
|
46
|
-
const isAudio = file => _files.inputFiles.audio.validType.includes(file
|
|
46
|
+
const isAudio = file => _files.inputFiles.audio.validType.includes(file?.type);
|
|
47
47
|
exports.isAudio = isAudio;
|
|
48
|
-
const isVideo = file => _files.inputFiles.video.validType.includes(file
|
|
48
|
+
const isVideo = file => _files.inputFiles.video.validType.includes(file?.type);
|
|
49
49
|
exports.isVideo = isVideo;
|
|
50
|
-
const isHTML = file => _files.inputFiles.html.validType.includes(file
|
|
50
|
+
const isHTML = file => _files.inputFiles.html.validType.includes(file?.type);
|
|
51
51
|
exports.isHTML = isHTML;
|
|
52
52
|
const hasPreview = file => isImage(file) || isAudio(file) || isVideo(file);
|
|
53
53
|
exports.hasPreview = hasPreview;
|
|
54
54
|
const isValidFile = file => hasPreview(file) || isPDF(file) || isHTML(file);
|
|
55
55
|
exports.isValidFile = isValidFile;
|
|
56
56
|
const isNewFile = (newFile, oldFile) => {
|
|
57
|
-
var _newFile$file, _oldFile$file;
|
|
58
57
|
if (!newFile && !oldFile) return false;
|
|
59
58
|
if (!newFile || !oldFile) return true;
|
|
60
59
|
const newFileType = typeof newFile;
|
|
61
60
|
const oldFileType = typeof oldFile;
|
|
62
61
|
if (newFileType !== oldFileType) return true;
|
|
63
62
|
if (newFileType === 'string') return newFile !== oldFile;
|
|
64
|
-
return
|
|
63
|
+
return newFile.file?.lastModified !== oldFile.file?.lastModified;
|
|
65
64
|
};
|
|
66
65
|
exports.isNewFile = isNewFile;
|
|
67
66
|
const getAvailableFileTypesLabel = acceptedFileTypes => {
|
|
@@ -75,5 +74,5 @@ const getSizeInMB = maxFileSize => (maxFileSize / 1048576).toFixed(2);
|
|
|
75
74
|
exports.getSizeInMB = getSizeInMB;
|
|
76
75
|
const getNotRepeatedFiles = files => files.filter((file, index, self) => index === self.findIndex(f => f.name === file.name));
|
|
77
76
|
exports.getNotRepeatedFiles = getNotRepeatedFiles;
|
|
78
|
-
const getDefaultAttachment = (fileType, index) =>
|
|
77
|
+
const getDefaultAttachment = (fileType, index) => `${_constants.DEFAULT_ATTACHMENT_NAME}-${index}${fileType && `.${fileType}`}`;
|
|
79
78
|
exports.getDefaultAttachment = getDefaultAttachment;
|
|
@@ -17,7 +17,7 @@ const renderRow = _ref => {
|
|
|
17
17
|
style: {
|
|
18
18
|
...style
|
|
19
19
|
},
|
|
20
|
-
className:
|
|
20
|
+
className: `${data[index].props.className} ${_stylesModule.default.rowRender}`
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
exports.renderRow = renderRow;
|
|
@@ -51,7 +51,7 @@ const UTAutocomplete = _ref => {
|
|
|
51
51
|
const textInputLabel = (0, _array.isEmpty)(options) ? emptyOptionsLabel : label;
|
|
52
52
|
const fieldDisabled = disabled || loading || (0, _array.isEmpty)(options);
|
|
53
53
|
const onChange = (_, values) => {
|
|
54
|
-
input.onChange(multiple ? values
|
|
54
|
+
input.onChange(multiple ? values?.map(val => val[valueKey]) : values?.[valueKey]);
|
|
55
55
|
if (!values) setComponentValue(initialValue);
|
|
56
56
|
if (field.onChange) field.onChange(values);
|
|
57
57
|
};
|
|
@@ -74,7 +74,7 @@ const UTAutocomplete = _ref => {
|
|
|
74
74
|
const textInputEndAdornment = loading ? /*#__PURE__*/_react.default.createElement(_CircularProgress.default, {
|
|
75
75
|
className: classes.loadingIcon
|
|
76
76
|
}) : ArrowIcon || /*#__PURE__*/_react.default.createElement(_KeyboardArrowDown.default, {
|
|
77
|
-
className:
|
|
77
|
+
className: `${disabled ? classes.arrowIconDisabled : classes.arrowIcon}`
|
|
78
78
|
});
|
|
79
79
|
const errorMessage = (0, _form.shouldShowErrors)(meta) && meta.error || '';
|
|
80
80
|
return /*#__PURE__*/_react.default.createElement(_Autocomplete.default, _extends({
|