@availity/feedback 6.2.4 → 6.2.8
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 +44 -0
- package/package.json +3 -3
- package/src/FeedbackDropdown.js +1 -0
- package/src/FeedbackForm.js +27 -2
- package/src/SmileField.js +13 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,50 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [6.2.8](https://github.com/Availity/availity-react/compare/@availity/feedback@6.2.7...@availity/feedback@6.2.8) (2021-12-03)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @availity/feedback
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## 6.2.7 (2021-12-03)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* **feedback:** modal no longer closes when tabbed ([7ce4f53](https://github.com/Availity/availity-react/commit/7ce4f53f7e86ba2aeee79db606338bca251c89ff))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## [6.2.6](https://github.com/Availity/availity-react/compare/@availity/feedback@6.2.5...@availity/feedback@6.2.6) (2021-12-02)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Bug Fixes
|
|
29
|
+
|
|
30
|
+
* **feedback:** added destructering for event ([a8110d7](https://github.com/Availity/availity-react/commit/a8110d7c2d118d4e14fb142f6002790b635593c9))
|
|
31
|
+
* **feedback:** fix typo ([9adfd42](https://github.com/Availity/availity-react/commit/9adfd42264eb64d57c976b6118e794a9be36a605))
|
|
32
|
+
* **feedback:** fixed shift tab closing dropdown issue ([06aad38](https://github.com/Availity/availity-react/commit/06aad384f87e8e3a75fc469f30a0795cfee242ce))
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
## [6.2.5](https://github.com/Availity/availity-react/compare/@availity/feedback@6.2.4...@availity/feedback@6.2.5) (2021-12-01)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
### Bug Fixes
|
|
42
|
+
|
|
43
|
+
* **feedback:** added keyDown for tabbing out to close dropdown ([afa0ce8](https://github.com/Availity/availity-react/commit/afa0ce8d6c4116a1c6ede611025bf2c794129d8b))
|
|
44
|
+
* **feedback:** removed console log ([df6b146](https://github.com/Availity/availity-react/commit/df6b146ae66560777d797c0399dbf9b2db189e47))
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
6
50
|
## [6.2.4](https://github.com/Availity/availity-react/compare/@availity/feedback@6.2.3...@availity/feedback@6.2.4) (2021-11-30)
|
|
7
51
|
|
|
8
52
|
**Note:** Version bump only for package @availity/feedback
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@availity/feedback",
|
|
3
|
-
"version": "6.2.
|
|
3
|
+
"version": "6.2.8",
|
|
4
4
|
"author": "Evan Sharp <evan.sharp@availity.com>",
|
|
5
5
|
"description": "Availity feedback with smiley faces react component.",
|
|
6
6
|
"main": "index.js",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@availity/hooks": "^3.1.0",
|
|
26
26
|
"@availity/icon": "^0.10.0",
|
|
27
27
|
"@availity/native-form": "^4.0.5",
|
|
28
|
-
"@availity/select": "^2.
|
|
28
|
+
"@availity/select": "^2.3.0",
|
|
29
29
|
"prop-types": "^15.7.2"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"reactstrap": "^8.0.0 || ^7.0.0 || ^6.0.0",
|
|
48
48
|
"yup": "^0.27.0"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "2228d274e32b89c096d6e22e6b6d84fa7e2ac6ff"
|
|
51
51
|
}
|
package/src/FeedbackDropdown.js
CHANGED
package/src/FeedbackForm.js
CHANGED
|
@@ -40,6 +40,7 @@ const FeedbackForm = ({
|
|
|
40
40
|
showSupport,
|
|
41
41
|
setSupportIsActive,
|
|
42
42
|
autoFocusFeedbackButton,
|
|
43
|
+
modal,
|
|
43
44
|
...formProps
|
|
44
45
|
}) => {
|
|
45
46
|
const [active, setActive] = useState(null);
|
|
@@ -151,7 +152,9 @@ const FeedbackForm = ({
|
|
|
151
152
|
options={faceOptions}
|
|
152
153
|
name="smileField"
|
|
153
154
|
onChange={(option) => setActive(option)}
|
|
155
|
+
onClose={onClose}
|
|
154
156
|
autoFocusFeedbackButton={autoFocusFeedbackButton}
|
|
157
|
+
modal={modal}
|
|
155
158
|
/>
|
|
156
159
|
</FormGroup>
|
|
157
160
|
|
|
@@ -206,12 +209,32 @@ const FeedbackForm = ({
|
|
|
206
209
|
) : null}
|
|
207
210
|
|
|
208
211
|
{onClose ? (
|
|
209
|
-
<Button
|
|
212
|
+
<Button
|
|
213
|
+
onClick={onClose}
|
|
214
|
+
color="secondary"
|
|
215
|
+
onKeyDown={({keyCode, shiftKey}) => {
|
|
216
|
+
if (keyCode === 13) {
|
|
217
|
+
onClose();
|
|
218
|
+
}
|
|
219
|
+
if (keyCode === 9 && !active && !shiftKey && !modal) {
|
|
220
|
+
onClose();
|
|
221
|
+
}
|
|
222
|
+
}}
|
|
223
|
+
>
|
|
210
224
|
Close
|
|
211
225
|
</Button>
|
|
212
226
|
) : null}
|
|
213
227
|
|
|
214
|
-
<Button
|
|
228
|
+
<Button
|
|
229
|
+
onKeyDown={({keyCode, shiftKey}) => {
|
|
230
|
+
if (keyCode === 9 && !shiftKey && !modal) {
|
|
231
|
+
onClose();
|
|
232
|
+
}
|
|
233
|
+
}}
|
|
234
|
+
type="submit"
|
|
235
|
+
color="primary"
|
|
236
|
+
disabled={!active}
|
|
237
|
+
>
|
|
215
238
|
Send Feedback
|
|
216
239
|
</Button>
|
|
217
240
|
</ModalFooter>
|
|
@@ -248,6 +271,7 @@ FeedbackForm.propTypes = {
|
|
|
248
271
|
showSupport: PropTypes.bool,
|
|
249
272
|
setSupportIsActive: PropTypes.func,
|
|
250
273
|
autoFocusFeedbackButton: PropTypes.bool,
|
|
274
|
+
modal: PropTypes.bool
|
|
251
275
|
};
|
|
252
276
|
|
|
253
277
|
FeedbackForm.defaultProps = {
|
|
@@ -256,6 +280,7 @@ FeedbackForm.defaultProps = {
|
|
|
256
280
|
additionalComments: false,
|
|
257
281
|
analytics: avLogMessagesApi,
|
|
258
282
|
showSupport: false,
|
|
283
|
+
modal: true
|
|
259
284
|
};
|
|
260
285
|
|
|
261
286
|
export default FeedbackForm;
|
package/src/SmileField.js
CHANGED
|
@@ -5,13 +5,24 @@ import FeedbackButton from './FeedbackButton';
|
|
|
5
5
|
|
|
6
6
|
const btnStyles = { flex: 1, margin: '0 2% 0 2%' };
|
|
7
7
|
|
|
8
|
-
const SmileField = ({ name, options, onChange, autoFocusFeedbackButton }) => {
|
|
8
|
+
const SmileField = ({ name, options, onChange, autoFocusFeedbackButton, onClose, modal }) => {
|
|
9
9
|
const [{ value }] = useField(name);
|
|
10
10
|
const { setFieldValue } = useFormikContext();
|
|
11
11
|
|
|
12
12
|
return options.map((option, i) => (
|
|
13
13
|
<FeedbackButton
|
|
14
14
|
autoFocus={i === 0 && autoFocusFeedbackButton}
|
|
15
|
+
onKeyDown={(e) => {
|
|
16
|
+
if (e.shiftKey && e.keyCode === 9 && i === 0 && !modal) {
|
|
17
|
+
onClose();
|
|
18
|
+
}
|
|
19
|
+
if (e.keyCode === 13) {
|
|
20
|
+
setFieldValue(name, option);
|
|
21
|
+
if (onChange) {
|
|
22
|
+
onChange(option);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}}
|
|
15
26
|
style={btnStyles}
|
|
16
27
|
key={option.icon}
|
|
17
28
|
icon={option.icon}
|
|
@@ -41,6 +52,7 @@ SmileField.propTypes = {
|
|
|
41
52
|
),
|
|
42
53
|
onChange: PropTypes.func,
|
|
43
54
|
autoFocusFeedbackButton: PropTypes.bool,
|
|
55
|
+
modal: PropTypes.bool
|
|
44
56
|
};
|
|
45
57
|
|
|
46
58
|
SmileField.defaultProps = {
|