@atlaskit/feedback-collector 13.6.0 → 13.7.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/CHANGELOG.md +14 -0
- package/dist/cjs/components/FeedbackCollector.js +3 -2
- package/dist/cjs/components/FeedbackForm.js +3 -2
- package/dist/es2019/components/FeedbackCollector.js +3 -2
- package/dist/es2019/components/FeedbackForm.js +3 -2
- package/dist/esm/components/FeedbackCollector.js +3 -2
- package/dist/esm/components/FeedbackForm.js +3 -2
- package/dist/types/components/FeedbackCollector.d.ts +2 -0
- package/dist/types/components/FeedbackForm.d.ts +2 -0
- package/dist/types-ts4.5/components/FeedbackCollector.d.ts +2 -0
- package/dist/types-ts4.5/components/FeedbackForm.d.ts +2 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/feedback-collector
|
|
2
2
|
|
|
3
|
+
## 13.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#132488](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/132488)
|
|
8
|
+
[`64f768ca3e89f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/64f768ca3e89f) -
|
|
9
|
+
[ux] return focus to calling element on modal close
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#132488](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/132488)
|
|
14
|
+
[`64f768ca3e89f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/64f768ca3e89f) -
|
|
15
|
+
[ux] update a11y fix to accept ref instead of boolean
|
|
16
|
+
|
|
3
17
|
## 13.6.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
|
@@ -166,7 +166,7 @@ var FeedbackCollector = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
166
166
|
}, {
|
|
167
167
|
key: "getPackageVersion",
|
|
168
168
|
value: function getPackageVersion() {
|
|
169
|
-
return "13.
|
|
169
|
+
return "13.7.0" || 'Unknown, at least 11.0.0';
|
|
170
170
|
}
|
|
171
171
|
}, {
|
|
172
172
|
key: "getEntitlementInformation",
|
|
@@ -478,7 +478,8 @@ var FeedbackCollector = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
478
478
|
anonymousFeedback: (0, _platformFeatureFlags.fg)('platform.proforma-form-builder-feedback_hupaz') ? this.state.anonymousFeedback : anonymousFeedback,
|
|
479
479
|
selectLabel: this.props.selectLabel,
|
|
480
480
|
customTextAreaLabel: this.props.customTextAreaLabel,
|
|
481
|
-
customFeedbackOptions: this.props.customFeedbackOptions
|
|
481
|
+
customFeedbackOptions: this.props.customFeedbackOptions,
|
|
482
|
+
shouldReturnFocusRef: this.props.shouldReturnFocusRef
|
|
482
483
|
});
|
|
483
484
|
}
|
|
484
485
|
}]);
|
|
@@ -53,7 +53,8 @@ var FeedbackForm = function FeedbackForm(_ref) {
|
|
|
53
53
|
selectLabel = _ref.selectLabel,
|
|
54
54
|
customTextAreaLabel = _ref.customTextAreaLabel,
|
|
55
55
|
_ref$customFeedbackOp = _ref.customFeedbackOptions,
|
|
56
|
-
customFeedbackOptions = _ref$customFeedbackOp === void 0 ? [] : _ref$customFeedbackOp
|
|
56
|
+
customFeedbackOptions = _ref$customFeedbackOp === void 0 ? [] : _ref$customFeedbackOp,
|
|
57
|
+
shouldReturnFocusRef = _ref.shouldReturnFocusRef;
|
|
57
58
|
var _useState = (0, _react.useState)(false),
|
|
58
59
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
59
60
|
canBeContacted = _useState2[0],
|
|
@@ -117,7 +118,7 @@ var FeedbackForm = function FeedbackForm(_ref) {
|
|
|
117
118
|
autoFocus: focusRef,
|
|
118
119
|
onClose: onClose,
|
|
119
120
|
testId: "feedbackCollectorModalDialog",
|
|
120
|
-
shouldReturnFocus:
|
|
121
|
+
shouldReturnFocus: shouldReturnFocusRef
|
|
121
122
|
}, /*#__PURE__*/_react.default.createElement(_form.default, {
|
|
122
123
|
onSubmit: /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
123
124
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
@@ -91,7 +91,7 @@ export default class FeedbackCollector extends Component {
|
|
|
91
91
|
return FeedbackCollector.defaultProps.url;
|
|
92
92
|
}
|
|
93
93
|
getPackageVersion() {
|
|
94
|
-
return "13.
|
|
94
|
+
return "13.7.0" || 'Unknown, at least 11.0.0';
|
|
95
95
|
}
|
|
96
96
|
async getEntitlementInformation() {
|
|
97
97
|
var _entitlementDetails, _entitlementDetails2, _productName, _entitlement, _productEntitlement;
|
|
@@ -313,7 +313,8 @@ export default class FeedbackCollector extends Component {
|
|
|
313
313
|
anonymousFeedback: fg('platform.proforma-form-builder-feedback_hupaz') ? this.state.anonymousFeedback : anonymousFeedback,
|
|
314
314
|
selectLabel: this.props.selectLabel,
|
|
315
315
|
customTextAreaLabel: this.props.customTextAreaLabel,
|
|
316
|
-
customFeedbackOptions: this.props.customFeedbackOptions
|
|
316
|
+
customFeedbackOptions: this.props.customFeedbackOptions,
|
|
317
|
+
shouldReturnFocusRef: this.props.shouldReturnFocusRef
|
|
317
318
|
});
|
|
318
319
|
}
|
|
319
320
|
}
|
|
@@ -31,7 +31,8 @@ const FeedbackForm = ({
|
|
|
31
31
|
hasDescriptionDefaultValue,
|
|
32
32
|
selectLabel,
|
|
33
33
|
customTextAreaLabel,
|
|
34
|
-
customFeedbackOptions = []
|
|
34
|
+
customFeedbackOptions = [],
|
|
35
|
+
shouldReturnFocusRef
|
|
35
36
|
}) => {
|
|
36
37
|
const [canBeContacted, setCanBeContacted] = useState(false);
|
|
37
38
|
const [description, setDescription] = useState('');
|
|
@@ -74,7 +75,7 @@ const FeedbackForm = ({
|
|
|
74
75
|
autoFocus: focusRef,
|
|
75
76
|
onClose: onClose,
|
|
76
77
|
testId: "feedbackCollectorModalDialog",
|
|
77
|
-
shouldReturnFocus:
|
|
78
|
+
shouldReturnFocus: shouldReturnFocusRef
|
|
78
79
|
}, /*#__PURE__*/React.createElement(Form, {
|
|
79
80
|
onSubmit: async () => {
|
|
80
81
|
setIsSubmitting(true);
|
|
@@ -156,7 +156,7 @@ var FeedbackCollector = /*#__PURE__*/function (_Component) {
|
|
|
156
156
|
}, {
|
|
157
157
|
key: "getPackageVersion",
|
|
158
158
|
value: function getPackageVersion() {
|
|
159
|
-
return "13.
|
|
159
|
+
return "13.7.0" || 'Unknown, at least 11.0.0';
|
|
160
160
|
}
|
|
161
161
|
}, {
|
|
162
162
|
key: "getEntitlementInformation",
|
|
@@ -468,7 +468,8 @@ var FeedbackCollector = /*#__PURE__*/function (_Component) {
|
|
|
468
468
|
anonymousFeedback: fg('platform.proforma-form-builder-feedback_hupaz') ? this.state.anonymousFeedback : anonymousFeedback,
|
|
469
469
|
selectLabel: this.props.selectLabel,
|
|
470
470
|
customTextAreaLabel: this.props.customTextAreaLabel,
|
|
471
|
-
customFeedbackOptions: this.props.customFeedbackOptions
|
|
471
|
+
customFeedbackOptions: this.props.customFeedbackOptions,
|
|
472
|
+
shouldReturnFocusRef: this.props.shouldReturnFocusRef
|
|
472
473
|
});
|
|
473
474
|
}
|
|
474
475
|
}]);
|
|
@@ -43,7 +43,8 @@ var FeedbackForm = function FeedbackForm(_ref) {
|
|
|
43
43
|
selectLabel = _ref.selectLabel,
|
|
44
44
|
customTextAreaLabel = _ref.customTextAreaLabel,
|
|
45
45
|
_ref$customFeedbackOp = _ref.customFeedbackOptions,
|
|
46
|
-
customFeedbackOptions = _ref$customFeedbackOp === void 0 ? [] : _ref$customFeedbackOp
|
|
46
|
+
customFeedbackOptions = _ref$customFeedbackOp === void 0 ? [] : _ref$customFeedbackOp,
|
|
47
|
+
shouldReturnFocusRef = _ref.shouldReturnFocusRef;
|
|
47
48
|
var _useState = useState(false),
|
|
48
49
|
_useState2 = _slicedToArray(_useState, 2),
|
|
49
50
|
canBeContacted = _useState2[0],
|
|
@@ -107,7 +108,7 @@ var FeedbackForm = function FeedbackForm(_ref) {
|
|
|
107
108
|
autoFocus: focusRef,
|
|
108
109
|
onClose: onClose,
|
|
109
110
|
testId: "feedbackCollectorModalDialog",
|
|
110
|
-
shouldReturnFocus:
|
|
111
|
+
shouldReturnFocus: shouldReturnFocusRef
|
|
111
112
|
}, /*#__PURE__*/React.createElement(Form, {
|
|
112
113
|
onSubmit: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
113
114
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
@@ -104,6 +104,8 @@ export interface Props {
|
|
|
104
104
|
customTextAreaLabel?: string;
|
|
105
105
|
/** Custom Select feedback options */
|
|
106
106
|
customFeedbackOptions?: OptionType[];
|
|
107
|
+
/** Optional ref to return focus to after feedback form is closed */
|
|
108
|
+
shouldReturnFocusRef?: React.MutableRefObject<HTMLElement>;
|
|
107
109
|
}
|
|
108
110
|
export default class FeedbackCollector extends Component<Props> {
|
|
109
111
|
state: {
|
|
@@ -39,6 +39,8 @@ interface Props {
|
|
|
39
39
|
customTextAreaLabel?: string;
|
|
40
40
|
/** Custom Select feedback options */
|
|
41
41
|
customFeedbackOptions?: OptionType[];
|
|
42
|
+
/** React Ref to focus on close */
|
|
43
|
+
shouldReturnFocusRef?: React.MutableRefObject<HTMLElement>;
|
|
42
44
|
}
|
|
43
45
|
export interface OptionType {
|
|
44
46
|
label: React.ReactText;
|
|
@@ -104,6 +104,8 @@ export interface Props {
|
|
|
104
104
|
customTextAreaLabel?: string;
|
|
105
105
|
/** Custom Select feedback options */
|
|
106
106
|
customFeedbackOptions?: OptionType[];
|
|
107
|
+
/** Optional ref to return focus to after feedback form is closed */
|
|
108
|
+
shouldReturnFocusRef?: React.MutableRefObject<HTMLElement>;
|
|
107
109
|
}
|
|
108
110
|
export default class FeedbackCollector extends Component<Props> {
|
|
109
111
|
state: {
|
|
@@ -39,6 +39,8 @@ interface Props {
|
|
|
39
39
|
customTextAreaLabel?: string;
|
|
40
40
|
/** Custom Select feedback options */
|
|
41
41
|
customFeedbackOptions?: OptionType[];
|
|
42
|
+
/** React Ref to focus on close */
|
|
43
|
+
shouldReturnFocusRef?: React.MutableRefObject<HTMLElement>;
|
|
42
44
|
}
|
|
43
45
|
export interface OptionType {
|
|
44
46
|
label: React.ReactText;
|