@atlaskit/feedback-collector 13.12.0 → 13.12.1
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 +8 -0
- package/dist/cjs/components/FeedbackCollector.js +17 -2
- package/dist/es2019/components/FeedbackCollector.js +15 -1
- package/dist/esm/components/FeedbackCollector.js +17 -2
- package/dist/types/components/FeedbackCollector.d.ts +1 -0
- package/dist/types-ts4.5/components/FeedbackCollector.d.ts +1 -0
- package/package.json +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/feedback-collector
|
|
2
2
|
|
|
3
|
+
## 13.12.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#142062](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/142062)
|
|
8
|
+
[`3e38da9d60e87`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3e38da9d60e87) -
|
|
9
|
+
Add user account id onto feedback ticket for jira
|
|
10
|
+
|
|
3
11
|
## 13.12.0
|
|
4
12
|
|
|
5
13
|
### 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.12.
|
|
169
|
+
return "13.12.1" || 'Unknown, at least 11.0.0';
|
|
170
170
|
}
|
|
171
171
|
}, {
|
|
172
172
|
key: "getEntitlementInformation",
|
|
@@ -389,6 +389,18 @@ var FeedbackCollector = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
389
389
|
});
|
|
390
390
|
}
|
|
391
391
|
}
|
|
392
|
+
}, {
|
|
393
|
+
key: "addAccountIdToContext",
|
|
394
|
+
value: function addAccountIdToContext(atlassianID) {
|
|
395
|
+
if (atlassianID) {
|
|
396
|
+
var contextField = this.props.additionalFields.find(function (field) {
|
|
397
|
+
return field.id === 'customfield_10047';
|
|
398
|
+
});
|
|
399
|
+
if (contextField) {
|
|
400
|
+
contextField.value = "".concat(contextField.value, "\n\t\t\tatlassian-account-id: ").concat(atlassianID);
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
}
|
|
392
404
|
}, {
|
|
393
405
|
key: "mapFormToJSD",
|
|
394
406
|
value: function () {
|
|
@@ -415,6 +427,9 @@ var FeedbackCollector = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
415
427
|
return this.getAtlassianID();
|
|
416
428
|
case 8:
|
|
417
429
|
atlassianID = _context5.sent;
|
|
430
|
+
if ((0, _platformFeatureFlags.fg)('jsw_feedback_account_id')) {
|
|
431
|
+
this.addAccountIdToContext(atlassianID);
|
|
432
|
+
}
|
|
418
433
|
return _context5.abrupt("return", {
|
|
419
434
|
fields: [].concat((0, _toConsumableArray2.default)(entitlementInformation !== null && entitlementInformation || []), [this.props.showTypeField ? {
|
|
420
435
|
id: this.props.typeFieldId,
|
|
@@ -445,7 +460,7 @@ var FeedbackCollector = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
445
460
|
value: this.props.enrollInResearchDeclineValue
|
|
446
461
|
}], (0, _toConsumableArray2.default)(this.props.additionalFields)).filter(Boolean)
|
|
447
462
|
});
|
|
448
|
-
case
|
|
463
|
+
case 11:
|
|
449
464
|
case "end":
|
|
450
465
|
return _context5.stop();
|
|
451
466
|
}
|
|
@@ -91,7 +91,7 @@ export default class FeedbackCollector extends Component {
|
|
|
91
91
|
return FeedbackCollector.defaultProps.url;
|
|
92
92
|
}
|
|
93
93
|
getPackageVersion() {
|
|
94
|
-
return "13.12.
|
|
94
|
+
return "13.12.1" || 'Unknown, at least 11.0.0';
|
|
95
95
|
}
|
|
96
96
|
async getEntitlementInformation() {
|
|
97
97
|
var _entitlementDetails, _entitlementDetails2, _productName, _entitlement, _productEntitlement;
|
|
@@ -252,6 +252,17 @@ export default class FeedbackCollector extends Component {
|
|
|
252
252
|
});
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
|
+
addAccountIdToContext(atlassianID) {
|
|
256
|
+
if (atlassianID) {
|
|
257
|
+
const contextField = this.props.additionalFields.find(field => {
|
|
258
|
+
return field.id === 'customfield_10047';
|
|
259
|
+
});
|
|
260
|
+
if (contextField) {
|
|
261
|
+
contextField.value = `${contextField.value}
|
|
262
|
+
atlassian-account-id: ${atlassianID}`;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
255
266
|
async mapFormToJSD(formValues) {
|
|
256
267
|
var _this$props, _this$props2;
|
|
257
268
|
let entitlementInformation = null;
|
|
@@ -262,6 +273,9 @@ export default class FeedbackCollector extends Component {
|
|
|
262
273
|
this.addEmailToContext();
|
|
263
274
|
}
|
|
264
275
|
const atlassianID = await this.getAtlassianID();
|
|
276
|
+
if (fg('jsw_feedback_account_id')) {
|
|
277
|
+
this.addAccountIdToContext(atlassianID);
|
|
278
|
+
}
|
|
265
279
|
return {
|
|
266
280
|
fields: [...(entitlementInformation !== null && entitlementInformation || []), this.props.showTypeField ? {
|
|
267
281
|
id: this.props.typeFieldId,
|
|
@@ -156,7 +156,7 @@ var FeedbackCollector = /*#__PURE__*/function (_Component) {
|
|
|
156
156
|
}, {
|
|
157
157
|
key: "getPackageVersion",
|
|
158
158
|
value: function getPackageVersion() {
|
|
159
|
-
return "13.12.
|
|
159
|
+
return "13.12.1" || 'Unknown, at least 11.0.0';
|
|
160
160
|
}
|
|
161
161
|
}, {
|
|
162
162
|
key: "getEntitlementInformation",
|
|
@@ -379,6 +379,18 @@ var FeedbackCollector = /*#__PURE__*/function (_Component) {
|
|
|
379
379
|
});
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
|
+
}, {
|
|
383
|
+
key: "addAccountIdToContext",
|
|
384
|
+
value: function addAccountIdToContext(atlassianID) {
|
|
385
|
+
if (atlassianID) {
|
|
386
|
+
var contextField = this.props.additionalFields.find(function (field) {
|
|
387
|
+
return field.id === 'customfield_10047';
|
|
388
|
+
});
|
|
389
|
+
if (contextField) {
|
|
390
|
+
contextField.value = "".concat(contextField.value, "\n\t\t\tatlassian-account-id: ").concat(atlassianID);
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
}
|
|
382
394
|
}, {
|
|
383
395
|
key: "mapFormToJSD",
|
|
384
396
|
value: function () {
|
|
@@ -405,6 +417,9 @@ var FeedbackCollector = /*#__PURE__*/function (_Component) {
|
|
|
405
417
|
return this.getAtlassianID();
|
|
406
418
|
case 8:
|
|
407
419
|
atlassianID = _context5.sent;
|
|
420
|
+
if (fg('jsw_feedback_account_id')) {
|
|
421
|
+
this.addAccountIdToContext(atlassianID);
|
|
422
|
+
}
|
|
408
423
|
return _context5.abrupt("return", {
|
|
409
424
|
fields: [].concat(_toConsumableArray(entitlementInformation !== null && entitlementInformation || []), [this.props.showTypeField ? {
|
|
410
425
|
id: this.props.typeFieldId,
|
|
@@ -435,7 +450,7 @@ var FeedbackCollector = /*#__PURE__*/function (_Component) {
|
|
|
435
450
|
value: this.props.enrollInResearchDeclineValue
|
|
436
451
|
}], _toConsumableArray(this.props.additionalFields)).filter(Boolean)
|
|
437
452
|
});
|
|
438
|
-
case
|
|
453
|
+
case 11:
|
|
439
454
|
case "end":
|
|
440
455
|
return _context5.stop();
|
|
441
456
|
}
|
|
@@ -173,6 +173,7 @@ export default class FeedbackCollector extends Component<Props> {
|
|
|
173
173
|
getSummary(formValues: FormFields): FieldValueType;
|
|
174
174
|
getCustomerName(): FieldValueType;
|
|
175
175
|
addEmailToContext(): void;
|
|
176
|
+
addAccountIdToContext(atlassianID: string | undefined): void;
|
|
176
177
|
mapFormToJSD(formValues: FormFields): Promise<FeedbackType>;
|
|
177
178
|
postFeedback: (formValues: FormFields) => Promise<void>;
|
|
178
179
|
render(): JSX.Element;
|
|
@@ -174,6 +174,7 @@ export default class FeedbackCollector extends Component<Props> {
|
|
|
174
174
|
getSummary(formValues: FormFields): FieldValueType;
|
|
175
175
|
getCustomerName(): FieldValueType;
|
|
176
176
|
addEmailToContext(): void;
|
|
177
|
+
addAccountIdToContext(atlassianID: string | undefined): void;
|
|
177
178
|
mapFormToJSD(formValues: FormFields): Promise<FeedbackType>;
|
|
178
179
|
postFeedback: (formValues: FormFields) => Promise<void>;
|
|
179
180
|
render(): JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/feedback-collector",
|
|
3
|
-
"version": "13.12.
|
|
3
|
+
"version": "13.12.1",
|
|
4
4
|
"description": "A component that collects feedback across Atlassian products.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -95,6 +95,9 @@
|
|
|
95
95
|
},
|
|
96
96
|
"underlined_iph_links": {
|
|
97
97
|
"type": "boolean"
|
|
98
|
+
},
|
|
99
|
+
"jsw_feedback_account_id": {
|
|
100
|
+
"type": "boolean"
|
|
98
101
|
}
|
|
99
102
|
}
|
|
100
103
|
}
|