@atlaskit/profilecard 16.4.4 → 16.4.7

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 CHANGED
@@ -1,5 +1,23 @@
1
1
  # @atlaskit/profilecard
2
2
 
3
+ ## 16.4.7
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 16.4.6
10
+
11
+ ### Patch Changes
12
+
13
+ - [`386249e4be4`](https://bitbucket.org/atlassian/atlassian-frontend/commits/386249e4be4) - [ux] Fix hide handler when the profile card is triggered via click
14
+
15
+ ## 16.4.5
16
+
17
+ ### Patch Changes
18
+
19
+ - [`18ab5ef3325`](https://bitbucket.org/atlassian/atlassian-frontend/commits/18ab5ef3325) - Filter out certain types of failures for team profilecard data fetch
20
+
3
21
  ## 16.4.4
4
22
 
5
23
  ### Patch Changes
@@ -43,6 +43,12 @@ var buildTeamQuery = function buildTeamQuery(teamId, orgId) {
43
43
  };
44
44
  };
45
45
 
46
+ var IGNORED_ERRORS = ['NotPermitted', 'Gone'];
47
+
48
+ function isRealError(error) {
49
+ return !IGNORED_ERRORS.includes(error.reason);
50
+ }
51
+
46
52
  var TeamProfileCardClient = /*#__PURE__*/function (_CachingClient) {
47
53
  (0, _inherits2.default)(TeamProfileCardClient, _CachingClient);
48
54
 
@@ -116,7 +122,7 @@ var TeamProfileCardClient = /*#__PURE__*/function (_CachingClient) {
116
122
 
117
123
  resolve(data);
118
124
  }).catch(function (error) {
119
- if (analytics) {
125
+ if (analytics && isRealError(error)) {
120
126
  analytics((0, _analytics.teamRequestAnalytics)('failed', {
121
127
  duration: (0, _performance.getPageTime)() - startTime,
122
128
  errorStatus: error.code,
@@ -264,7 +264,8 @@ var ProfilecardTrigger = /*#__PURE__*/function (_React$PureComponent) {
264
264
  "data-testid": _this2.props.testId
265
265
  }), _this2.props.children);
266
266
  },
267
- zIndex: _constants.layers.modal()
267
+ zIndex: _constants.layers.modal(),
268
+ shouldUseCaptureOnOutsideClick: true
268
269
  });
269
270
  }
270
271
  }, {
@@ -56,7 +56,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
56
56
  actionSubjectId: actionSubjectId,
57
57
  attributes: _objectSpread(_objectSpread({
58
58
  packageName: "@atlaskit/profilecard",
59
- packageVersion: "16.4.4"
59
+ packageVersion: "16.4.7"
60
60
  }, attributes), {}, {
61
61
  firedAt: (0, _performance.getPageTime)()
62
62
  })
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/profilecard",
3
- "version": "16.4.4"
3
+ "version": "16.4.7"
4
4
  }
@@ -28,6 +28,12 @@ const buildTeamQuery = (teamId, orgId) => ({
28
28
  }
29
29
  });
30
30
 
31
+ const IGNORED_ERRORS = ['NotPermitted', 'Gone'];
32
+
33
+ function isRealError(error) {
34
+ return !IGNORED_ERRORS.includes(error.reason);
35
+ }
36
+
31
37
  export default class TeamProfileCardClient extends CachingClient {
32
38
  constructor(options) {
33
39
  super(options);
@@ -85,7 +91,7 @@ export default class TeamProfileCardClient extends CachingClient {
85
91
 
86
92
  resolve(data);
87
93
  }).catch(error => {
88
- if (analytics) {
94
+ if (analytics && isRealError(error)) {
89
95
  analytics(teamRequestAnalytics('failed', {
90
96
  duration: getPageTime() - startTime,
91
97
  errorStatus: error.code,
@@ -206,7 +206,8 @@ class ProfilecardTrigger extends React.PureComponent {
206
206
  "data-testid": this.props.testId
207
207
  }), this.props.children);
208
208
  },
209
- zIndex: layers.modal()
209
+ zIndex: layers.modal(),
210
+ shouldUseCaptureOnOutsideClick: true
210
211
  });
211
212
  }
212
213
 
@@ -35,7 +35,7 @@ const createEvent = (eventType, action, actionSubject, actionSubjectId, attribut
35
35
  actionSubjectId,
36
36
  attributes: {
37
37
  packageName: "@atlaskit/profilecard",
38
- packageVersion: "16.4.4",
38
+ packageVersion: "16.4.7",
39
39
  ...attributes,
40
40
  firedAt: getPageTime()
41
41
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/profilecard",
3
- "version": "16.4.4"
3
+ "version": "16.4.7"
4
4
  }
@@ -25,6 +25,12 @@ var buildTeamQuery = function buildTeamQuery(teamId, orgId) {
25
25
  };
26
26
  };
27
27
 
28
+ var IGNORED_ERRORS = ['NotPermitted', 'Gone'];
29
+
30
+ function isRealError(error) {
31
+ return !IGNORED_ERRORS.includes(error.reason);
32
+ }
33
+
28
34
  var TeamProfileCardClient = /*#__PURE__*/function (_CachingClient) {
29
35
  _inherits(TeamProfileCardClient, _CachingClient);
30
36
 
@@ -99,7 +105,7 @@ var TeamProfileCardClient = /*#__PURE__*/function (_CachingClient) {
99
105
 
100
106
  resolve(data);
101
107
  }).catch(function (error) {
102
- if (analytics) {
108
+ if (analytics && isRealError(error)) {
103
109
  analytics(teamRequestAnalytics('failed', {
104
110
  duration: getPageTime() - startTime,
105
111
  errorStatus: error.code,
@@ -248,7 +248,8 @@ var ProfilecardTrigger = /*#__PURE__*/function (_React$PureComponent) {
248
248
  "data-testid": _this2.props.testId
249
249
  }), _this2.props.children);
250
250
  },
251
- zIndex: layers.modal()
251
+ zIndex: layers.modal(),
252
+ shouldUseCaptureOnOutsideClick: true
252
253
  });
253
254
  }
254
255
  }, {
@@ -45,7 +45,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
45
45
  actionSubjectId: actionSubjectId,
46
46
  attributes: _objectSpread(_objectSpread({
47
47
  packageName: "@atlaskit/profilecard",
48
- packageVersion: "16.4.4"
48
+ packageVersion: "16.4.7"
49
49
  }, attributes), {}, {
50
50
  firedAt: getPageTime()
51
51
  })
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/profilecard",
3
- "version": "16.4.4"
3
+ "version": "16.4.7"
4
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/profilecard",
3
- "version": "16.4.4",
3
+ "version": "16.4.7",
4
4
  "description": "A React component to display a card with user information.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -48,7 +48,7 @@
48
48
  "@atlaskit/popup": "^1.3.0",
49
49
  "@atlaskit/spinner": "^15.0.0",
50
50
  "@atlaskit/theme": "^12.1.0",
51
- "@atlaskit/tokens": "^0.9.0",
51
+ "@atlaskit/tokens": "^0.10.0",
52
52
  "@babel/runtime": "^7.0.0",
53
53
  "date-fns": "^2.17.0",
54
54
  "lodash": "^4.17.21",