@availity/feedback 7.1.3 → 7.1.5
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 +18 -0
- package/package.json +6 -5
- package/src/FeedbackForm.js +4 -1
- package/src/SupportModal.js +2 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [7.1.5](https://github.com/Availity/availity-react/compare/@availity/feedback@7.1.4...@availity/feedback@7.1.5) (2023-06-28)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **feedback:** fix deps and update to new block ui ([#1287](https://github.com/Availity/availity-react/issues/1287)) ([44bbb7a](https://github.com/Availity/availity-react/commit/44bbb7a277c5414a092e6435d8ec456eb6a5a34d))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [7.1.4](https://github.com/Availity/availity-react/compare/@availity/feedback@7.1.3...@availity/feedback@7.1.4) (2023-04-18)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* **feedback:** disable button on submit to avoid log spam ([#1269](https://github.com/Availity/availity-react/issues/1269)) ([5cfc7b5](https://github.com/Availity/availity-react/commit/5cfc7b5be9de5d8e3705adef1374a1858c30a7cd))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
5
23
|
## [7.1.3](https://github.com/Availity/availity-react/compare/@availity/feedback@7.1.2...@availity/feedback@7.1.3) (2022-12-01)
|
|
6
24
|
|
|
7
25
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@availity/feedback",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.5",
|
|
4
4
|
"description": "Availity feedback with smiley faces react component.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -25,11 +25,12 @@
|
|
|
25
25
|
"publish:canary": "yarn npm publish --access public --tag canary"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@availity/
|
|
29
|
-
"@availity/
|
|
30
|
-
"@availity/
|
|
28
|
+
"@availity/block-ui": "^1.0.0",
|
|
29
|
+
"@availity/form": "1.7.3",
|
|
30
|
+
"@availity/hooks": "3.3.3",
|
|
31
|
+
"@availity/icon": "0.11.3",
|
|
31
32
|
"@availity/native-form": "^5.0.1",
|
|
32
|
-
"@availity/select": "3.
|
|
33
|
+
"@availity/select": "3.5.0",
|
|
33
34
|
"prop-types": "^15.8.1"
|
|
34
35
|
},
|
|
35
36
|
"devDependencies": {
|
package/src/FeedbackForm.js
CHANGED
|
@@ -45,8 +45,10 @@ const FeedbackForm = ({
|
|
|
45
45
|
}) => {
|
|
46
46
|
const [active, setActive] = useState(null);
|
|
47
47
|
const [sent, setSent] = useState(null);
|
|
48
|
+
const [loading, setLoading] = useState(null);
|
|
48
49
|
const ref = useRef();
|
|
49
50
|
const sendFeedback = async ({ smileField, ...values }) => {
|
|
51
|
+
setLoading(true);
|
|
50
52
|
const response = await avRegionsApi.getCurrentRegion();
|
|
51
53
|
|
|
52
54
|
await analytics.info({
|
|
@@ -62,6 +64,7 @@ const FeedbackForm = ({
|
|
|
62
64
|
});
|
|
63
65
|
|
|
64
66
|
setSent(values);
|
|
67
|
+
setLoading(false);
|
|
65
68
|
};
|
|
66
69
|
|
|
67
70
|
// Close the Modal once sent after 2 seconds
|
|
@@ -238,7 +241,7 @@ const FeedbackForm = ({
|
|
|
238
241
|
}}
|
|
239
242
|
type="submit"
|
|
240
243
|
color="primary"
|
|
241
|
-
disabled={!active}
|
|
244
|
+
disabled={Boolean(!active || loading)}
|
|
242
245
|
>
|
|
243
246
|
Send Feedback
|
|
244
247
|
</Button>
|
package/src/SupportModal.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { Modal } from 'reactstrap';
|
|
4
|
-
import BlockUi from '
|
|
5
|
-
import 'react-block-ui/style.css';
|
|
4
|
+
import BlockUi from '@availity/block-ui';
|
|
6
5
|
|
|
7
6
|
import SupportForm from './SupportForm';
|
|
8
7
|
|
|
9
8
|
const SupportModal = ({ supportIsActive, toggle, supportZIndex, setSupportIsActive, feedbackToggle }) => {
|
|
10
|
-
const [blocking, setBlocking] = useState(
|
|
9
|
+
const [blocking, setBlocking] = useState(false);
|
|
11
10
|
|
|
12
11
|
return (
|
|
13
12
|
<Modal
|