@atlaskit/profilecard 17.2.6 → 17.3.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 +12 -0
- package/dist/cjs/client/errorUtils.js +3 -1
- package/dist/cjs/client/graphqlUtils.js +4 -2
- package/dist/cjs/components/Team/TeamProfileCardTrigger.js +2 -1
- package/dist/cjs/components/User/ProfileCardTrigger.js +2 -1
- package/dist/cjs/util/analytics.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/client/errorUtils.js +3 -1
- package/dist/es2019/client/graphqlUtils.js +4 -2
- package/dist/es2019/components/Team/TeamProfileCardTrigger.js +2 -1
- package/dist/es2019/components/User/ProfileCardTrigger.js +2 -1
- package/dist/es2019/util/analytics.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/client/errorUtils.js +3 -1
- package/dist/esm/client/graphqlUtils.js +4 -2
- package/dist/esm/components/Team/TeamProfileCardTrigger.js +2 -1
- package/dist/esm/components/User/ProfileCardTrigger.js +2 -1
- package/dist/esm/util/analytics.js +1 -1
- package/dist/esm/version.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/profilecard
|
|
2
2
|
|
|
3
|
+
## 17.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`b2ef0c20138`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b2ef0c20138) - [ux] Don't shift focus when triggering user or team profilecard via hover
|
|
8
|
+
|
|
9
|
+
## 17.2.7
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`7bb86e9484c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7bb86e9484c) - Transform errors from AGG and ignore 403(TEAMS_FORBIDDEN) and 410(TEAMS_TEAM_DELETED) errors for SLO failure
|
|
14
|
+
|
|
3
15
|
## 17.2.6
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getErrorAttributes = void 0;
|
|
7
|
-
var IGNORED_ERRORS = [
|
|
7
|
+
var IGNORED_ERRORS = [// Error categories from pf-directory
|
|
8
|
+
'NotPermitted', 'Gone', // Error categories from AGG
|
|
9
|
+
'TEAMS_FORBIDDEN', 'TEAMS_TEAM_DELETED'];
|
|
8
10
|
|
|
9
11
|
function isIgnoredError(error) {
|
|
10
12
|
return !!error && IGNORED_ERRORS.includes(error.reason);
|
|
@@ -43,10 +43,12 @@ function graphqlQuery(serviceUrl, query) {
|
|
|
43
43
|
return response.json();
|
|
44
44
|
}).then(function (json) {
|
|
45
45
|
if (json.errors) {
|
|
46
|
-
var _json$errors
|
|
46
|
+
var _json$errors$, _json$errors$2, _json$errors$2$extens, _json$errors$3, _json$errors$3$extens;
|
|
47
47
|
|
|
48
|
+
// We need to handle responses from pf-directory and AGG
|
|
48
49
|
return Promise.reject({
|
|
49
|
-
reason: ((_json$errors$ = json.errors[0]) === null || _json$errors$ === void 0 ? void 0 : _json$errors$.category) || 'default'
|
|
50
|
+
reason: ((_json$errors$ = json.errors[0]) === null || _json$errors$ === void 0 ? void 0 : _json$errors$.category) || ((_json$errors$2 = json.errors[0]) === null || _json$errors$2 === void 0 ? void 0 : (_json$errors$2$extens = _json$errors$2.extensions) === null || _json$errors$2$extens === void 0 ? void 0 : _json$errors$2$extens.classification) || 'default',
|
|
51
|
+
code: (_json$errors$3 = json.errors[0]) === null || _json$errors$3 === void 0 ? void 0 : (_json$errors$3$extens = _json$errors$3.extensions) === null || _json$errors$3$extens === void 0 ? void 0 : _json$errors$3$extens.statusCode
|
|
50
52
|
});
|
|
51
53
|
}
|
|
52
54
|
|
|
@@ -429,7 +429,8 @@ var TeamProfileCardTriggerInternal = /*#__PURE__*/function (_React$PureComponent
|
|
|
429
429
|
return _this4.renderTrigger(triggerProps);
|
|
430
430
|
},
|
|
431
431
|
zIndex: _constants.layers.modal(),
|
|
432
|
-
shouldFlip: true
|
|
432
|
+
shouldFlip: true,
|
|
433
|
+
autoFocus: this.props.trigger !== 'hover' && !this.openedByHover
|
|
433
434
|
}));
|
|
434
435
|
}
|
|
435
436
|
}, {
|
|
@@ -325,7 +325,8 @@ var ProfilecardTrigger = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
325
325
|
}), _this3.props.children);
|
|
326
326
|
},
|
|
327
327
|
zIndex: _constants.layers.modal(),
|
|
328
|
-
shouldUseCaptureOnOutsideClick: true
|
|
328
|
+
shouldUseCaptureOnOutsideClick: true,
|
|
329
|
+
autoFocus: this.props.trigger === 'click'
|
|
329
330
|
}), this.state.shouldShowGiveKudos && /*#__PURE__*/_react.default.createElement(_react.Suspense, {
|
|
330
331
|
fallback: null
|
|
331
332
|
}, /*#__PURE__*/_react.default.createElement(_giveKudos.GiveKudosLauncherLazy, {
|
|
@@ -59,7 +59,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
59
59
|
actionSubjectId: actionSubjectId,
|
|
60
60
|
attributes: _objectSpread(_objectSpread({
|
|
61
61
|
packageName: "@atlaskit/profilecard",
|
|
62
|
-
packageVersion: "17.
|
|
62
|
+
packageVersion: "17.3.0"
|
|
63
63
|
}, attributes), {}, {
|
|
64
64
|
firedAt: Math.round((0, _performance.getPageTime)())
|
|
65
65
|
})
|
package/dist/cjs/version.json
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
const IGNORED_ERRORS = [
|
|
1
|
+
const IGNORED_ERRORS = [// Error categories from pf-directory
|
|
2
|
+
'NotPermitted', 'Gone', // Error categories from AGG
|
|
3
|
+
'TEAMS_FORBIDDEN', 'TEAMS_TEAM_DELETED'];
|
|
2
4
|
|
|
3
5
|
function isIgnoredError(error) {
|
|
4
6
|
return !!error && IGNORED_ERRORS.includes(error.reason);
|
|
@@ -31,10 +31,12 @@ export function graphqlQuery(serviceUrl, query, processHeaders = id) {
|
|
|
31
31
|
return response;
|
|
32
32
|
}).then(response => response.json()).then(json => {
|
|
33
33
|
if (json.errors) {
|
|
34
|
-
var _json$errors
|
|
34
|
+
var _json$errors$, _json$errors$2, _json$errors$2$extens, _json$errors$3, _json$errors$3$extens;
|
|
35
35
|
|
|
36
|
+
// We need to handle responses from pf-directory and AGG
|
|
36
37
|
return Promise.reject({
|
|
37
|
-
reason: ((_json$errors$ = json.errors[0]) === null || _json$errors$ === void 0 ? void 0 : _json$errors$.category) || 'default'
|
|
38
|
+
reason: ((_json$errors$ = json.errors[0]) === null || _json$errors$ === void 0 ? void 0 : _json$errors$.category) || ((_json$errors$2 = json.errors[0]) === null || _json$errors$2 === void 0 ? void 0 : (_json$errors$2$extens = _json$errors$2.extensions) === null || _json$errors$2$extens === void 0 ? void 0 : _json$errors$2$extens.classification) || 'default',
|
|
39
|
+
code: (_json$errors$3 = json.errors[0]) === null || _json$errors$3 === void 0 ? void 0 : (_json$errors$3$extens = _json$errors$3.extensions) === null || _json$errors$3$extens === void 0 ? void 0 : _json$errors$3$extens.statusCode
|
|
38
40
|
});
|
|
39
41
|
}
|
|
40
42
|
|
|
@@ -369,7 +369,8 @@ export class TeamProfileCardTriggerInternal extends React.PureComponent {
|
|
|
369
369
|
content: this.renderProfileCard,
|
|
370
370
|
trigger: triggerProps => this.renderTrigger(triggerProps),
|
|
371
371
|
zIndex: layers.modal(),
|
|
372
|
-
shouldFlip: true
|
|
372
|
+
shouldFlip: true,
|
|
373
|
+
autoFocus: this.props.trigger !== 'hover' && !this.openedByHover
|
|
373
374
|
}));
|
|
374
375
|
}
|
|
375
376
|
|
|
@@ -262,7 +262,8 @@ class ProfilecardTrigger extends React.PureComponent {
|
|
|
262
262
|
}), this.props.children);
|
|
263
263
|
},
|
|
264
264
|
zIndex: layers.modal(),
|
|
265
|
-
shouldUseCaptureOnOutsideClick: true
|
|
265
|
+
shouldUseCaptureOnOutsideClick: true,
|
|
266
|
+
autoFocus: this.props.trigger === 'click'
|
|
266
267
|
}), this.state.shouldShowGiveKudos && /*#__PURE__*/React.createElement(Suspense, {
|
|
267
268
|
fallback: null
|
|
268
269
|
}, /*#__PURE__*/React.createElement(GiveKudosLauncherLazy, {
|
|
@@ -38,7 +38,7 @@ const createEvent = (eventType, action, actionSubject, actionSubjectId, attribut
|
|
|
38
38
|
actionSubjectId,
|
|
39
39
|
attributes: {
|
|
40
40
|
packageName: "@atlaskit/profilecard",
|
|
41
|
-
packageVersion: "17.
|
|
41
|
+
packageVersion: "17.3.0",
|
|
42
42
|
...attributes,
|
|
43
43
|
firedAt: Math.round(getPageTime())
|
|
44
44
|
}
|
package/dist/es2019/version.json
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
var IGNORED_ERRORS = [
|
|
1
|
+
var IGNORED_ERRORS = [// Error categories from pf-directory
|
|
2
|
+
'NotPermitted', 'Gone', // Error categories from AGG
|
|
3
|
+
'TEAMS_FORBIDDEN', 'TEAMS_TEAM_DELETED'];
|
|
2
4
|
|
|
3
5
|
function isIgnoredError(error) {
|
|
4
6
|
return !!error && IGNORED_ERRORS.includes(error.reason);
|
|
@@ -36,10 +36,12 @@ export function graphqlQuery(serviceUrl, query) {
|
|
|
36
36
|
return response.json();
|
|
37
37
|
}).then(function (json) {
|
|
38
38
|
if (json.errors) {
|
|
39
|
-
var _json$errors
|
|
39
|
+
var _json$errors$, _json$errors$2, _json$errors$2$extens, _json$errors$3, _json$errors$3$extens;
|
|
40
40
|
|
|
41
|
+
// We need to handle responses from pf-directory and AGG
|
|
41
42
|
return Promise.reject({
|
|
42
|
-
reason: ((_json$errors$ = json.errors[0]) === null || _json$errors$ === void 0 ? void 0 : _json$errors$.category) || 'default'
|
|
43
|
+
reason: ((_json$errors$ = json.errors[0]) === null || _json$errors$ === void 0 ? void 0 : _json$errors$.category) || ((_json$errors$2 = json.errors[0]) === null || _json$errors$2 === void 0 ? void 0 : (_json$errors$2$extens = _json$errors$2.extensions) === null || _json$errors$2$extens === void 0 ? void 0 : _json$errors$2$extens.classification) || 'default',
|
|
44
|
+
code: (_json$errors$3 = json.errors[0]) === null || _json$errors$3 === void 0 ? void 0 : (_json$errors$3$extens = _json$errors$3.extensions) === null || _json$errors$3$extens === void 0 ? void 0 : _json$errors$3$extens.statusCode
|
|
43
45
|
});
|
|
44
46
|
}
|
|
45
47
|
|
|
@@ -417,7 +417,8 @@ export var TeamProfileCardTriggerInternal = /*#__PURE__*/function (_React$PureCo
|
|
|
417
417
|
return _this4.renderTrigger(triggerProps);
|
|
418
418
|
},
|
|
419
419
|
zIndex: layers.modal(),
|
|
420
|
-
shouldFlip: true
|
|
420
|
+
shouldFlip: true,
|
|
421
|
+
autoFocus: this.props.trigger !== 'hover' && !this.openedByHover
|
|
421
422
|
}));
|
|
422
423
|
}
|
|
423
424
|
}, {
|
|
@@ -309,7 +309,8 @@ var ProfilecardTrigger = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
309
309
|
}), _this3.props.children);
|
|
310
310
|
},
|
|
311
311
|
zIndex: layers.modal(),
|
|
312
|
-
shouldUseCaptureOnOutsideClick: true
|
|
312
|
+
shouldUseCaptureOnOutsideClick: true,
|
|
313
|
+
autoFocus: this.props.trigger === 'click'
|
|
313
314
|
}), this.state.shouldShowGiveKudos && /*#__PURE__*/React.createElement(Suspense, {
|
|
314
315
|
fallback: null
|
|
315
316
|
}, /*#__PURE__*/React.createElement(GiveKudosLauncherLazy, {
|
|
@@ -48,7 +48,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
48
48
|
actionSubjectId: actionSubjectId,
|
|
49
49
|
attributes: _objectSpread(_objectSpread({
|
|
50
50
|
packageName: "@atlaskit/profilecard",
|
|
51
|
-
packageVersion: "17.
|
|
51
|
+
packageVersion: "17.3.0"
|
|
52
52
|
}, attributes), {}, {
|
|
53
53
|
firedAt: Math.round(getPageTime())
|
|
54
54
|
})
|
package/dist/esm/version.json
CHANGED