@atlaskit/profilecard 21.0.2 → 21.0.4

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.
Files changed (30) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/cjs/client/TeamCentralCardClient.js +98 -59
  3. package/dist/cjs/client/getOrgIdForCloudIdFromAGG.js +1 -1
  4. package/dist/cjs/client/getTeamFromAGG.js +1 -1
  5. package/dist/cjs/components/Error/ErrorMessage.js +4 -1
  6. package/dist/cjs/components/Team/TeamProfileCard.js +4 -1
  7. package/dist/cjs/mocks/mock-profile-client.js +2 -2
  8. package/dist/cjs/styled/Error.js +5 -17
  9. package/dist/cjs/util/analytics.js +1 -1
  10. package/dist/es2019/client/TeamCentralCardClient.js +32 -30
  11. package/dist/es2019/client/getOrgIdForCloudIdFromAGG.js +1 -1
  12. package/dist/es2019/client/getTeamFromAGG.js +1 -1
  13. package/dist/es2019/components/Error/ErrorMessage.js +5 -2
  14. package/dist/es2019/components/Team/TeamProfileCard.js +6 -3
  15. package/dist/es2019/mocks/mock-profile-client.js +1 -1
  16. package/dist/es2019/styled/Error.js +2 -14
  17. package/dist/es2019/util/analytics.js +1 -1
  18. package/dist/esm/client/TeamCentralCardClient.js +98 -59
  19. package/dist/esm/client/getOrgIdForCloudIdFromAGG.js +1 -1
  20. package/dist/esm/client/getTeamFromAGG.js +1 -1
  21. package/dist/esm/components/Error/ErrorMessage.js +5 -2
  22. package/dist/esm/components/Team/TeamProfileCard.js +6 -3
  23. package/dist/esm/mocks/mock-profile-client.js +2 -2
  24. package/dist/esm/styled/Error.js +2 -14
  25. package/dist/esm/util/analytics.js +1 -1
  26. package/dist/types/client/TeamCentralCardClient.d.ts +6 -6
  27. package/dist/types/styled/Error.d.ts +0 -8
  28. package/dist/types-ts4.5/client/TeamCentralCardClient.d.ts +6 -6
  29. package/dist/types-ts4.5/styled/Error.d.ts +0 -8
  30. package/package.json +7 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # @atlaskit/profilecard
2
2
 
3
+ ## 21.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#179093](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/179093)
8
+ [`fc80a0b0d4961`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/fc80a0b0d4961) -
9
+ Fix reporting lines to be available outside of Atlassian Home
10
+ - Updated dependencies
11
+
12
+ ## 21.0.3
13
+
14
+ ### Patch Changes
15
+
16
+ - [#178297](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/178297)
17
+ [`7abc8162b32ab`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/7abc8162b32ab) -
18
+ Internal changes to typography styles. There may be some minor visual changes to align with
19
+ modernized typography styles.
20
+ - [#172505](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/172505)
21
+ [`e43cba2a879aa`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e43cba2a879aa) -
22
+ Remove explicit jest extension with .toBeAccessible matcher
23
+
3
24
  ## 21.0.2
4
25
 
5
26
  ### Patch Changes
@@ -12,11 +12,13 @@ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/creat
12
12
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
13
13
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
14
14
  var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
15
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
15
16
  var _CachingClient2 = _interopRequireDefault(require("./CachingClient"));
16
17
  var _getOrgIdForCloudIdFromAGG = require("./getOrgIdForCloudIdFromAGG");
17
18
  var _graphqlUtils = require("./graphqlUtils");
18
19
  function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
19
20
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
21
+ var UNSHARDED_PREFIX = '/gateway/api/watermelon';
20
22
  var buildReportingLinesQuery = exports.buildReportingLinesQuery = function buildReportingLinesQuery(aaid) {
21
23
  return {
22
24
  query: "\n fragment ReportingLinesUserPII on UserPII {\n name\n picture\n }\n\n fragment ReportingLinesUserFragment on ReportingLinesUser {\n accountIdentifier\n identifierType\n pii {\n ...ReportingLinesUserPII\n }\n }\n\n query ReportingLines($aaid: String) {\n reportingLines(aaidOrHash: $aaid) {\n managers {\n ...ReportingLinesUserFragment\n }\n reports {\n ...ReportingLinesUserFragment\n }\n }\n }\n ",
@@ -25,9 +27,9 @@ var buildReportingLinesQuery = exports.buildReportingLinesQuery = function build
25
27
  }
26
28
  };
27
29
  };
28
- var isTCReadyPromiseMap = new Map();
29
- var globalExperiencePromiseCache = new Map();
30
+ var orgContainsAnyWorkspacePromiseCache = new Map();
30
31
  var orgIdPromiseCache = new Map();
32
+ var workspaceExistsWithTypePromiseCache = new Map();
31
33
  var TeamCentralCardClient = /*#__PURE__*/function (_CachingClient) {
32
34
  /**
33
35
  * Simple circuit breaker to avoid making unnecessary calls to Team Central on auth failures
@@ -44,20 +46,20 @@ var TeamCentralCardClient = /*#__PURE__*/function (_CachingClient) {
44
46
  _this = _callSuper(this, TeamCentralCardClient, [options]);
45
47
  _this.options = options;
46
48
  _this.bypassOnFailure = false;
47
- _this.isTCReadyPromise = _this.createTcReadyPromise(options);
48
- _this.isGlobalExperienceWorkspacePromise = _this.preloadIsGlobalExperienceWorkspace(options.cloudId);
49
+ _this.orgContainsAnyWorkspacePromise = _this.createOrgContainsAnyWorkspacePromise(options);
50
+ _this.workspaceExistsWithTypePromise = _this.preloadWorkspaceExistsWithType(options.cloudId);
49
51
  _this.orgIdPromise = _this.preloadOrgId(options.gatewayGraphqlUrl, options.cloudId, options.orgId);
50
52
  return _this;
51
53
  }
52
54
  (0, _inherits2.default)(TeamCentralCardClient, _CachingClient);
53
55
  return (0, _createClass2.default)(TeamCentralCardClient, [{
54
- key: "createTcReadyPromise",
55
- value: function createTcReadyPromise(config) {
56
+ key: "createOrgContainsAnyWorkspacePromise",
57
+ value: function createOrgContainsAnyWorkspacePromise(config) {
56
58
  if (config.cloudId) {
57
- var promise = isTCReadyPromiseMap.get(config.cloudId);
59
+ var promise = orgContainsAnyWorkspacePromiseCache.get(config.cloudId);
58
60
  if (!promise) {
59
- promise = this.hasTCWorkspace(config);
60
- isTCReadyPromiseMap.set(config.cloudId, promise);
61
+ promise = this.getOrgContainsAnyWorkspace(config.cloudId);
62
+ orgContainsAnyWorkspacePromiseCache.set(config.cloudId, promise);
61
63
  }
62
64
  return promise;
63
65
  }
@@ -67,8 +69,8 @@ var TeamCentralCardClient = /*#__PURE__*/function (_CachingClient) {
67
69
  key: "getReportingLines",
68
70
  value: function getReportingLines(userId) {
69
71
  var _this2 = this;
70
- return this.isTCReadyPromise.then(function (workSpaceExists) {
71
- if (workSpaceExists) {
72
+ return this.orgContainsAnyWorkspacePromise.then(function (orgContainsAnyWorkspace) {
73
+ if (orgContainsAnyWorkspace) {
72
74
  if (!userId) {
73
75
  return Promise.reject(new Error('userId missing'));
74
76
  }
@@ -151,45 +153,81 @@ var TeamCentralCardClient = /*#__PURE__*/function (_CachingClient) {
151
153
  }())
152
154
  }, {
153
155
  key: "checkWorkspaceExists",
154
- value: function checkWorkspaceExists() {
155
- return this.isTCReadyPromise.then(function (workSpaceExists) {
156
- if (workSpaceExists) {
157
- return Promise.resolve(true);
158
- }
159
- return Promise.resolve(false);
160
- }, function () {
161
- return Promise.resolve(false);
162
- });
163
- }
156
+ value: function () {
157
+ var _checkWorkspaceExists = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
158
+ var workspaceExistsPromise;
159
+ return _regenerator.default.wrap(function _callee2$(_context2) {
160
+ while (1) switch (_context2.prev = _context2.next) {
161
+ case 0:
162
+ workspaceExistsPromise = (0, _platformFeatureFlags.fg)('enable_ptc_townsquare_reporting_lines_unsharded') ? this.workspaceExistsWithTypePromise.then(function (workspaceExistsWithType) {
163
+ return workspaceExistsWithType !== undefined;
164
+ }) : this.orgContainsAnyWorkspacePromise;
165
+ return _context2.abrupt("return", workspaceExistsPromise.then(function (workspaceExistsWithType) {
166
+ if (workspaceExistsWithType) {
167
+ return Promise.resolve(true);
168
+ }
169
+ return Promise.resolve(false);
170
+ }, function () {
171
+ return Promise.resolve(false);
172
+ }));
173
+ case 2:
174
+ case "end":
175
+ return _context2.stop();
176
+ }
177
+ }, _callee2, this);
178
+ }));
179
+ function checkWorkspaceExists() {
180
+ return _checkWorkspaceExists.apply(this, arguments);
181
+ }
182
+ return checkWorkspaceExists;
183
+ }()
164
184
  }, {
165
185
  key: "getIsGlobalExperienceWorkspace",
166
- value: function getIsGlobalExperienceWorkspace() {
167
- return this.isGlobalExperienceWorkspacePromise;
168
- }
186
+ value: function () {
187
+ var _getIsGlobalExperienceWorkspace = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
188
+ return _regenerator.default.wrap(function _callee3$(_context3) {
189
+ while (1) switch (_context3.prev = _context3.next) {
190
+ case 0:
191
+ _context3.next = 2;
192
+ return this.workspaceExistsWithTypePromise;
193
+ case 2:
194
+ _context3.t0 = _context3.sent;
195
+ return _context3.abrupt("return", _context3.t0 === 'GLOBAL_EXPERIENCE');
196
+ case 4:
197
+ case "end":
198
+ return _context3.stop();
199
+ }
200
+ }, _callee3, this);
201
+ }));
202
+ function getIsGlobalExperienceWorkspace() {
203
+ return _getIsGlobalExperienceWorkspace.apply(this, arguments);
204
+ }
205
+ return getIsGlobalExperienceWorkspace;
206
+ }()
169
207
  }, {
170
208
  key: "getOrgId",
171
209
  value: function getOrgId() {
172
210
  return this.orgIdPromise;
173
211
  }
174
212
  }, {
175
- key: "preloadIsGlobalExperienceWorkspace",
176
- value: function preloadIsGlobalExperienceWorkspace(cloudId) {
213
+ key: "preloadWorkspaceExistsWithType",
214
+ value: function preloadWorkspaceExistsWithType(cloudId) {
177
215
  if (cloudId === undefined) {
178
- return Promise.resolve(false);
216
+ return Promise.resolve(undefined);
179
217
  }
180
- var maybeIsGlobalExperienceWorkspaceForCloudIdPromise = globalExperiencePromiseCache.get(cloudId);
181
- if (maybeIsGlobalExperienceWorkspaceForCloudIdPromise !== undefined) {
182
- return maybeIsGlobalExperienceWorkspaceForCloudIdPromise;
218
+ var maybeWorkspaceExistsWithTypePromise = workspaceExistsWithTypePromiseCache.get(cloudId);
219
+ if (maybeWorkspaceExistsWithTypePromise !== undefined) {
220
+ return maybeWorkspaceExistsWithTypePromise;
183
221
  }
184
- var isGlobalExperienceWorkspaceForCloudIdPromise = this.isGlobalExperienceWorkspaceForCloudId(cloudId);
185
- globalExperiencePromiseCache.set(cloudId, isGlobalExperienceWorkspaceForCloudIdPromise);
186
- return isGlobalExperienceWorkspaceForCloudIdPromise;
222
+ var workspaceExistsWithTypePromise = this.getWorkspaceExistsWithType(cloudId);
223
+ workspaceExistsWithTypePromiseCache.set(cloudId, workspaceExistsWithTypePromise);
224
+ return workspaceExistsWithTypePromise;
187
225
  }
188
226
  }, {
189
- key: "hasTCWorkspace",
190
- value: function hasTCWorkspace(config) {
191
- if (config.cloudId) {
192
- return fetch("".concat(this.getShardedApiPath(config.cloudId), "/organization/containsAnyWorkspace?cloudId=").concat(config.cloudId)).then(function (res) {
227
+ key: "getOrgContainsAnyWorkspace",
228
+ value: function getOrgContainsAnyWorkspace(cloudId) {
229
+ if (cloudId) {
230
+ return fetch(((0, _platformFeatureFlags.fg)('enable_ptc_townsquare_reporting_lines_unsharded') ? UNSHARDED_PREFIX : this.getShardedApiPath(cloudId)) + "/organization/containsAnyWorkspace?cloudId=".concat(cloudId)).then(function (res) {
193
231
  return !res || res && res.ok;
194
232
  });
195
233
  } else {
@@ -197,45 +235,46 @@ var TeamCentralCardClient = /*#__PURE__*/function (_CachingClient) {
197
235
  }
198
236
  }
199
237
  }, {
200
- key: "isGlobalExperienceWorkspaceForCloudId",
238
+ key: "getWorkspaceExistsWithType",
201
239
  value: function () {
202
- var _isGlobalExperienceWorkspaceForCloudId = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(cloudId) {
240
+ var _getWorkspaceExistsWithType = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(cloudId) {
203
241
  var response, workspaceType;
204
- return _regenerator.default.wrap(function _callee2$(_context2) {
205
- while (1) switch (_context2.prev = _context2.next) {
242
+ return _regenerator.default.wrap(function _callee4$(_context4) {
243
+ while (1) switch (_context4.prev = _context4.next) {
206
244
  case 0:
207
- _context2.prev = 0;
208
- _context2.next = 3;
245
+ _context4.prev = 0;
246
+ _context4.next = 3;
209
247
  return fetch("".concat(this.getShardedApiPath(cloudId), "/workspace/existsWithWorkspaceType?cloudId=").concat(cloudId), {
210
248
  credentials: 'include'
211
249
  });
212
250
  case 3:
213
- response = _context2.sent;
251
+ response = _context4.sent;
214
252
  if (!response.ok) {
215
- _context2.next = 9;
253
+ _context4.next = 9;
216
254
  break;
217
255
  }
218
- _context2.next = 7;
256
+ _context4.next = 7;
219
257
  return response.text();
220
258
  case 7:
221
- workspaceType = _context2.sent;
222
- return _context2.abrupt("return", Promise.resolve(workspaceType === 'GLOBAL_EXPERIENCE'));
259
+ workspaceType = _context4.sent;
260
+ return _context4.abrupt("return", Promise.resolve(workspaceType));
223
261
  case 9:
224
- return _context2.abrupt("return", Promise.resolve(false));
225
- case 12:
226
- _context2.prev = 12;
227
- _context2.t0 = _context2["catch"](0);
228
- return _context2.abrupt("return", Promise.resolve(false));
229
- case 15:
262
+ _context4.next = 14;
263
+ break;
264
+ case 11:
265
+ _context4.prev = 11;
266
+ _context4.t0 = _context4["catch"](0);
267
+ return _context4.abrupt("return", Promise.resolve(undefined));
268
+ case 14:
230
269
  case "end":
231
- return _context2.stop();
270
+ return _context4.stop();
232
271
  }
233
- }, _callee2, this, [[0, 12]]);
272
+ }, _callee4, this, [[0, 11]]);
234
273
  }));
235
- function isGlobalExperienceWorkspaceForCloudId(_x2) {
236
- return _isGlobalExperienceWorkspaceForCloudId.apply(this, arguments);
274
+ function getWorkspaceExistsWithType(_x2) {
275
+ return _getWorkspaceExistsWithType.apply(this, arguments);
237
276
  }
238
- return isGlobalExperienceWorkspaceForCloudId;
277
+ return getWorkspaceExistsWithType;
239
278
  }()
240
279
  }, {
241
280
  key: "preloadOrgId",
@@ -11,7 +11,7 @@ var _graphqlUtils = require("./graphqlUtils");
11
11
  var ORG_ID_FROM_CLOUD_ID_QUERY = "query OrgIdFromCloudId($cloudId: ID!) {\n\ttenantContexts(cloudIds: [$cloudId]) {\n\t\torgId\n\t}\n}";
12
12
  var addHeaders = function addHeaders(headers) {
13
13
  headers.append('atl-client-name', "@atlaskit/profilecard");
14
- headers.append('atl-client-version', "21.0.2");
14
+ headers.append('atl-client-version', "21.0.4");
15
15
  return headers;
16
16
  };
17
17
  function getOrgIdForCloudIdFromAGG(_x, _x2) {
@@ -57,7 +57,7 @@ var addHeaders = exports.addHeaders = function addHeaders(headers) {
57
57
  headers.append('X-ExperimentalApi', 'teams-beta');
58
58
  headers.append('X-ExperimentalApi', 'team-members-beta');
59
59
  headers.append('atl-client-name', "@atlaskit/profilecard");
60
- headers.append('atl-client-version', "21.0.2");
60
+ headers.append('atl-client-version', "21.0.4");
61
61
  return headers;
62
62
  };
63
63
  function getTeamFromAGG(_x, _x2, _x3) {
@@ -9,6 +9,7 @@ exports.default = void 0;
9
9
  var _react = _interopRequireWildcard(require("react"));
10
10
  var _standardButton = _interopRequireDefault(require("@atlaskit/button/standard-button"));
11
11
  var _crossCircle = _interopRequireDefault(require("@atlaskit/icon/glyph/cross-circle"));
12
+ var _primitives = require("@atlaskit/primitives");
12
13
  var _Error = require("../../styled/Error");
13
14
  var _analytics = require("../../util/analytics");
14
15
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
@@ -31,7 +32,9 @@ var ErrorMessage = function ErrorMessage(props) {
31
32
  if (errorReason === 'NotFound') {
32
33
  return /*#__PURE__*/_react.default.createElement(_Error.ErrorTitle, null, "The user is no longer available for the site");
33
34
  }
34
- return /*#__PURE__*/_react.default.createElement(_Error.ErrorTitle, null, "Oops, looks like we\u2019re having issues", /*#__PURE__*/_react.default.createElement("br", null), reload && /*#__PURE__*/_react.default.createElement(_Error.ErrorText, null, "Try again and we\u2019ll give it another shot"));
35
+ return /*#__PURE__*/_react.default.createElement(_Error.ErrorTitle, null, "Oops, looks like we\u2019re having issues", /*#__PURE__*/_react.default.createElement("br", null), reload && /*#__PURE__*/_react.default.createElement(_primitives.Text, {
36
+ color: "color.text.subtlest"
37
+ }, "Try again and we\u2019ll give it another shot"));
35
38
  };
36
39
  return /*#__PURE__*/_react.default.createElement(_Error.ErrorWrapper, {
37
40
  "data-testid": "profilecard-error"
@@ -293,7 +293,10 @@ var ErrorMessage = function ErrorMessage(_ref6) {
293
293
  }, [analytics, clientFetchProfile]);
294
294
  return /*#__PURE__*/_react.default.createElement(_Error.ErrorWrapper, {
295
295
  "data-testid": "team-profilecard-error"
296
- }, /*#__PURE__*/_react.default.createElement(_Error2.ErrorIllustration, null), /*#__PURE__*/_react.default.createElement(_Error.TeamErrorTitle, null, /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.default.teamErrorTitle)), /*#__PURE__*/_react.default.createElement(_Error.TeamErrorText, null, /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.default.teamErrorText)), clientFetchProfile && /*#__PURE__*/_react.default.createElement(_TeamCard.ActionButtons, null, /*#__PURE__*/_react.default.createElement(_TeamCard.WrappedButton, null, /*#__PURE__*/_react.default.createElement(_loadingButton.default, {
296
+ }, /*#__PURE__*/_react.default.createElement(_Error2.ErrorIllustration, null), /*#__PURE__*/_react.default.createElement(_primitives.Text, {
297
+ as: "p",
298
+ weight: "semibold"
299
+ }, /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.default.teamErrorTitle)), /*#__PURE__*/_react.default.createElement(_Error.TeamErrorText, null, /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.default.teamErrorText)), clientFetchProfile && /*#__PURE__*/_react.default.createElement(_TeamCard.ActionButtons, null, /*#__PURE__*/_react.default.createElement(_TeamCard.WrappedButton, null, /*#__PURE__*/_react.default.createElement(_loadingButton.default, {
297
300
  testId: "client-fetch-profile-button",
298
301
  shouldFitContainer: true,
299
302
  onClick: retry,
@@ -65,8 +65,8 @@ function getMockProfileClient(BaseProfileClient, modifyResponse) {
65
65
  }
66
66
  (0, _inherits2.default)(MockTeamCentralClient, _TeamCentralCardClien);
67
67
  return (0, _createClass2.default)(MockTeamCentralClient, [{
68
- key: "createTcReadyPromise",
69
- value: function createTcReadyPromise(config) {
68
+ key: "createOrgContainsAnyWorkspacePromise",
69
+ value: function createOrgContainsAnyWorkspacePromise(config) {
70
70
  return Promise.resolve(true);
71
71
  }
72
72
  }, {
@@ -4,12 +4,10 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.TeamErrorTitle = exports.TeamErrorText = exports.ErrorWrapper = exports.ErrorTitle = exports.ErrorText = void 0;
7
+ exports.TeamErrorText = exports.ErrorWrapper = exports.ErrorTitle = void 0;
8
8
  var _styled = _interopRequireDefault(require("@emotion/styled"));
9
9
  var _colors = require("@atlaskit/theme/colors");
10
- var _constants = require("@atlaskit/theme/constants");
11
- var _typography = require("@atlaskit/theme/typography");
12
- var _constants2 = require("./constants");
10
+ var _constants = require("./constants");
13
11
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
14
12
 
15
13
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
@@ -17,27 +15,17 @@ var ErrorWrapper = exports.ErrorWrapper = _styled.default.div({
17
15
  textAlign: 'center',
18
16
  padding: "var(--ds-space-300, 24px)",
19
17
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
20
- color: _constants2.errorIconColor
18
+ color: _constants.errorIconColor
21
19
  });
22
20
 
23
21
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
24
22
  var ErrorTitle = exports.ErrorTitle = _styled.default.p({
23
+ font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
25
24
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
26
- color: _constants2.errorTitleColor,
27
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
28
- lineHeight: "".concat((0, _constants.gridSize)() * 3, "px"),
25
+ color: _constants.errorTitleColor,
29
26
  margin: "var(--ds-space-100, 8px)".concat(" 0")
30
27
  });
31
28
 
32
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
33
- var ErrorText = exports.ErrorText = _styled.default.span({
34
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
35
- color: _constants2.errorTextColor
36
- });
37
-
38
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
39
- var TeamErrorTitle = exports.TeamErrorTitle = _styled.default.p(_typography.h400);
40
-
41
29
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
42
30
  var TeamErrorText = exports.TeamErrorText = _styled.default.p({
43
31
  color: "var(--ds-text-subtlest, ".concat(_colors.N200, ")"),
@@ -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: "21.0.2"
48
+ packageVersion: "21.0.4"
49
49
  }, attributes), {}, {
50
50
  firedAt: Math.round((0, _performance.getPageTime)())
51
51
  })
@@ -1,6 +1,8 @@
1
+ import { fg } from '@atlaskit/platform-feature-flags';
1
2
  import CachingClient from './CachingClient';
2
3
  import { getOrgIdForCloudIdFromAGG } from './getOrgIdForCloudIdFromAGG';
3
4
  import { directoryGraphqlQuery } from './graphqlUtils';
5
+ const UNSHARDED_PREFIX = '/gateway/api/watermelon';
4
6
  export const buildReportingLinesQuery = aaid => ({
5
7
  query: `
6
8
  fragment ReportingLinesUserPII on UserPII {
@@ -31,9 +33,9 @@ export const buildReportingLinesQuery = aaid => ({
31
33
  aaid
32
34
  }
33
35
  });
34
- let isTCReadyPromiseMap = new Map();
35
- const globalExperiencePromiseCache = new Map();
36
+ const orgContainsAnyWorkspacePromiseCache = new Map();
36
37
  const orgIdPromiseCache = new Map();
38
+ const workspaceExistsWithTypePromiseCache = new Map();
37
39
  class TeamCentralCardClient extends CachingClient {
38
40
  /**
39
41
  * Simple circuit breaker to avoid making unnecessary calls to Team Central on auth failures
@@ -48,24 +50,24 @@ class TeamCentralCardClient extends CachingClient {
48
50
  super(options);
49
51
  this.options = options;
50
52
  this.bypassOnFailure = false;
51
- this.isTCReadyPromise = this.createTcReadyPromise(options);
52
- this.isGlobalExperienceWorkspacePromise = this.preloadIsGlobalExperienceWorkspace(options.cloudId);
53
+ this.orgContainsAnyWorkspacePromise = this.createOrgContainsAnyWorkspacePromise(options);
54
+ this.workspaceExistsWithTypePromise = this.preloadWorkspaceExistsWithType(options.cloudId);
53
55
  this.orgIdPromise = this.preloadOrgId(options.gatewayGraphqlUrl, options.cloudId, options.orgId);
54
56
  }
55
- createTcReadyPromise(config) {
57
+ createOrgContainsAnyWorkspacePromise(config) {
56
58
  if (config.cloudId) {
57
- let promise = isTCReadyPromiseMap.get(config.cloudId);
59
+ let promise = orgContainsAnyWorkspacePromiseCache.get(config.cloudId);
58
60
  if (!promise) {
59
- promise = this.hasTCWorkspace(config);
60
- isTCReadyPromiseMap.set(config.cloudId, promise);
61
+ promise = this.getOrgContainsAnyWorkspace(config.cloudId);
62
+ orgContainsAnyWorkspacePromiseCache.set(config.cloudId, promise);
61
63
  }
62
64
  return promise;
63
65
  }
64
66
  return Promise.resolve(true);
65
67
  }
66
68
  getReportingLines(userId) {
67
- return this.isTCReadyPromise.then(workSpaceExists => {
68
- if (workSpaceExists) {
69
+ return this.orgContainsAnyWorkspacePromise.then(orgContainsAnyWorkspace => {
70
+ if (orgContainsAnyWorkspace) {
69
71
  if (!userId) {
70
72
  return Promise.reject(new Error('userId missing'));
71
73
  }
@@ -121,53 +123,53 @@ class TeamCentralCardClient extends CachingClient {
121
123
  const response = await directoryGraphqlQuery('/gateway/api/watermelon/graphql?operationName=ReportingLines', query);
122
124
  return response.reportingLines;
123
125
  }
124
- checkWorkspaceExists() {
125
- return this.isTCReadyPromise.then(workSpaceExists => {
126
- if (workSpaceExists) {
126
+ async checkWorkspaceExists() {
127
+ const workspaceExistsPromise = fg('enable_ptc_townsquare_reporting_lines_unsharded') ? this.workspaceExistsWithTypePromise.then(workspaceExistsWithType => workspaceExistsWithType !== undefined) : this.orgContainsAnyWorkspacePromise;
128
+ return workspaceExistsPromise.then(workspaceExistsWithType => {
129
+ if (workspaceExistsWithType) {
127
130
  return Promise.resolve(true);
128
131
  }
129
132
  return Promise.resolve(false);
130
133
  }, () => Promise.resolve(false));
131
134
  }
132
- getIsGlobalExperienceWorkspace() {
133
- return this.isGlobalExperienceWorkspacePromise;
135
+ async getIsGlobalExperienceWorkspace() {
136
+ return (await this.workspaceExistsWithTypePromise) === 'GLOBAL_EXPERIENCE';
134
137
  }
135
138
  getOrgId() {
136
139
  return this.orgIdPromise;
137
140
  }
138
- preloadIsGlobalExperienceWorkspace(cloudId) {
141
+ preloadWorkspaceExistsWithType(cloudId) {
139
142
  if (cloudId === undefined) {
140
- return Promise.resolve(false);
143
+ return Promise.resolve(undefined);
141
144
  }
142
- const maybeIsGlobalExperienceWorkspaceForCloudIdPromise = globalExperiencePromiseCache.get(cloudId);
143
- if (maybeIsGlobalExperienceWorkspaceForCloudIdPromise !== undefined) {
144
- return maybeIsGlobalExperienceWorkspaceForCloudIdPromise;
145
+ const maybeWorkspaceExistsWithTypePromise = workspaceExistsWithTypePromiseCache.get(cloudId);
146
+ if (maybeWorkspaceExistsWithTypePromise !== undefined) {
147
+ return maybeWorkspaceExistsWithTypePromise;
145
148
  }
146
- const isGlobalExperienceWorkspaceForCloudIdPromise = this.isGlobalExperienceWorkspaceForCloudId(cloudId);
147
- globalExperiencePromiseCache.set(cloudId, isGlobalExperienceWorkspaceForCloudIdPromise);
148
- return isGlobalExperienceWorkspaceForCloudIdPromise;
149
+ const workspaceExistsWithTypePromise = this.getWorkspaceExistsWithType(cloudId);
150
+ workspaceExistsWithTypePromiseCache.set(cloudId, workspaceExistsWithTypePromise);
151
+ return workspaceExistsWithTypePromise;
149
152
  }
150
- hasTCWorkspace(config) {
151
- if (config.cloudId) {
152
- return fetch(`${this.getShardedApiPath(config.cloudId)}/organization/containsAnyWorkspace?cloudId=${config.cloudId}`).then(res => {
153
+ getOrgContainsAnyWorkspace(cloudId) {
154
+ if (cloudId) {
155
+ return fetch((fg('enable_ptc_townsquare_reporting_lines_unsharded') ? UNSHARDED_PREFIX : this.getShardedApiPath(cloudId)) + `/organization/containsAnyWorkspace?cloudId=${cloudId}`).then(res => {
153
156
  return !res || res && res.ok;
154
157
  });
155
158
  } else {
156
159
  return Promise.resolve(false);
157
160
  }
158
161
  }
159
- async isGlobalExperienceWorkspaceForCloudId(cloudId) {
162
+ async getWorkspaceExistsWithType(cloudId) {
160
163
  try {
161
164
  const response = await fetch(`${this.getShardedApiPath(cloudId)}/workspace/existsWithWorkspaceType?cloudId=${cloudId}`, {
162
165
  credentials: 'include'
163
166
  });
164
167
  if (response.ok) {
165
168
  const workspaceType = await response.text();
166
- return Promise.resolve(workspaceType === 'GLOBAL_EXPERIENCE');
169
+ return Promise.resolve(workspaceType);
167
170
  }
168
- return Promise.resolve(false);
169
171
  } catch (err) {
170
- return Promise.resolve(false);
172
+ return Promise.resolve(undefined);
171
173
  }
172
174
  }
173
175
  preloadOrgId(gatewayGraphqlUrl, cloudId, orgId) {
@@ -6,7 +6,7 @@ const ORG_ID_FROM_CLOUD_ID_QUERY = `query OrgIdFromCloudId($cloudId: ID!) {
6
6
  }`;
7
7
  const addHeaders = headers => {
8
8
  headers.append('atl-client-name', "@atlaskit/profilecard");
9
- headers.append('atl-client-version', "21.0.2");
9
+ headers.append('atl-client-version', "21.0.4");
10
10
  return headers;
11
11
  };
12
12
  export async function getOrgIdForCloudIdFromAGG(url, cloudId) {
@@ -68,7 +68,7 @@ export const addHeaders = headers => {
68
68
  headers.append('X-ExperimentalApi', 'teams-beta');
69
69
  headers.append('X-ExperimentalApi', 'team-members-beta');
70
70
  headers.append('atl-client-name', "@atlaskit/profilecard");
71
- headers.append('atl-client-version', "21.0.2");
71
+ headers.append('atl-client-version', "21.0.4");
72
72
  return headers;
73
73
  };
74
74
  export async function getTeamFromAGG(url, teamId, siteId) {
@@ -1,7 +1,8 @@
1
1
  import React, { useEffect } from 'react';
2
2
  import Button from '@atlaskit/button/standard-button';
3
3
  import IconError from '@atlaskit/icon/glyph/cross-circle';
4
- import { ErrorText, ErrorTitle, ErrorWrapper } from '../../styled/Error';
4
+ import { Text } from '@atlaskit/primitives';
5
+ import { ErrorTitle, ErrorWrapper } from '../../styled/Error';
5
6
  import { profileCardRendered } from '../../util/analytics';
6
7
  const ErrorMessage = props => {
7
8
  const errorType = props.errorType || {
@@ -23,7 +24,9 @@ const ErrorMessage = props => {
23
24
  if (errorReason === 'NotFound') {
24
25
  return /*#__PURE__*/React.createElement(ErrorTitle, null, "The user is no longer available for the site");
25
26
  }
26
- return /*#__PURE__*/React.createElement(ErrorTitle, null, "Oops, looks like we\u2019re having issues", /*#__PURE__*/React.createElement("br", null), reload && /*#__PURE__*/React.createElement(ErrorText, null, "Try again and we\u2019ll give it another shot"));
27
+ return /*#__PURE__*/React.createElement(ErrorTitle, null, "Oops, looks like we\u2019re having issues", /*#__PURE__*/React.createElement("br", null), reload && /*#__PURE__*/React.createElement(Text, {
28
+ color: "color.text.subtlest"
29
+ }, "Try again and we\u2019ll give it another shot"));
27
30
  };
28
31
  return /*#__PURE__*/React.createElement(ErrorWrapper, {
29
32
  "data-testid": "profilecard-error"
@@ -10,12 +10,12 @@ import { LinkItem, MenuGroup } from '@atlaskit/menu';
10
10
  import { VerifiedTeamIcon } from '@atlaskit/people-teams-ui-public/verified-team-icon';
11
11
  import { fg } from '@atlaskit/platform-feature-flags';
12
12
  import Popup from '@atlaskit/popup';
13
- import { Inline } from '@atlaskit/primitives';
13
+ import { Inline, Text } from '@atlaskit/primitives';
14
14
  import { layers } from '@atlaskit/theme/constants';
15
15
  import Tooltip from '@atlaskit/tooltip';
16
16
  import messages from '../../messages';
17
17
  import { AnimatedKudosButton, AnimationWrapper, KudosBlobAnimation } from '../../styled/Card';
18
- import { ErrorWrapper, TeamErrorText, TeamErrorTitle } from '../../styled/Error';
18
+ import { ErrorWrapper, TeamErrorText } from '../../styled/Error';
19
19
  import { ActionButtons, AvatarSection, CardContent, CardHeader, CardWrapper, Description, DescriptionWrapper, MemberCount, MoreButton, TeamName, WrappedButton } from '../../styled/TeamCard';
20
20
  import { actionClicked, errorRetryClicked, moreActionsClicked, moreMembersClicked, profileCardRendered, teamAvatarClicked } from '../../util/analytics';
21
21
  import { isBasicClick } from '../../util/click';
@@ -254,7 +254,10 @@ const ErrorMessage = ({
254
254
  }, [analytics, clientFetchProfile]);
255
255
  return /*#__PURE__*/React.createElement(ErrorWrapper, {
256
256
  "data-testid": "team-profilecard-error"
257
- }, /*#__PURE__*/React.createElement(ErrorIllustration, null), /*#__PURE__*/React.createElement(TeamErrorTitle, null, /*#__PURE__*/React.createElement(FormattedMessage, messages.teamErrorTitle)), /*#__PURE__*/React.createElement(TeamErrorText, null, /*#__PURE__*/React.createElement(FormattedMessage, messages.teamErrorText)), clientFetchProfile && /*#__PURE__*/React.createElement(ActionButtons, null, /*#__PURE__*/React.createElement(WrappedButton, null, /*#__PURE__*/React.createElement(LoadingButton, {
257
+ }, /*#__PURE__*/React.createElement(ErrorIllustration, null), /*#__PURE__*/React.createElement(Text, {
258
+ as: "p",
259
+ weight: "semibold"
260
+ }, /*#__PURE__*/React.createElement(FormattedMessage, messages.teamErrorTitle)), /*#__PURE__*/React.createElement(TeamErrorText, null, /*#__PURE__*/React.createElement(FormattedMessage, messages.teamErrorText)), clientFetchProfile && /*#__PURE__*/React.createElement(ActionButtons, null, /*#__PURE__*/React.createElement(WrappedButton, null, /*#__PURE__*/React.createElement(LoadingButton, {
258
261
  testId: "client-fetch-profile-button",
259
262
  shouldFitContainer: true,
260
263
  onClick: retry,
@@ -36,7 +36,7 @@ export default function getMockProfileClient(BaseProfileClient, modifyResponse)
36
36
  }
37
37
  }
38
38
  class MockTeamCentralClient extends TeamCentralCardClient {
39
- createTcReadyPromise(config) {
39
+ createOrgContainsAnyWorkspacePromise(config) {
40
40
  return Promise.resolve(true);
41
41
  }
42
42
  makeRequest(userId) {
@@ -1,9 +1,7 @@
1
1
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
2
2
  import styled from '@emotion/styled';
3
3
  import { N200 } from '@atlaskit/theme/colors';
4
- import { gridSize } from '@atlaskit/theme/constants';
5
- import { h400 } from '@atlaskit/theme/typography';
6
- import { errorIconColor, errorTextColor, errorTitleColor } from './constants';
4
+ import { errorIconColor, errorTitleColor } from './constants';
7
5
 
8
6
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
9
7
  export const ErrorWrapper = styled.div({
@@ -15,22 +13,12 @@ export const ErrorWrapper = styled.div({
15
13
 
16
14
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
17
15
  export const ErrorTitle = styled.p({
16
+ font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
18
17
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
19
18
  color: errorTitleColor,
20
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
21
- lineHeight: `${gridSize() * 3}px`,
22
19
  margin: `${"var(--ds-space-100, 8px)"} 0`
23
20
  });
24
21
 
25
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
26
- export const ErrorText = styled.span({
27
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
28
- color: errorTextColor
29
- });
30
-
31
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
32
- export const TeamErrorTitle = styled.p(h400);
33
-
34
22
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
35
23
  export const TeamErrorText = styled.p({
36
24
  color: `var(--ds-text-subtlest, ${N200})`,
@@ -32,7 +32,7 @@ const createEvent = (eventType, action, actionSubject, actionSubjectId, attribut
32
32
  actionSubjectId,
33
33
  attributes: {
34
34
  packageName: "@atlaskit/profilecard",
35
- packageVersion: "21.0.2",
35
+ packageVersion: "21.0.4",
36
36
  ...attributes,
37
37
  firedAt: Math.round(getPageTime())
38
38
  }
@@ -7,9 +7,11 @@ import _inherits from "@babel/runtime/helpers/inherits";
7
7
  import _regeneratorRuntime from "@babel/runtime/regenerator";
8
8
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
9
9
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
10
+ import { fg } from '@atlaskit/platform-feature-flags';
10
11
  import CachingClient from './CachingClient';
11
12
  import { getOrgIdForCloudIdFromAGG } from './getOrgIdForCloudIdFromAGG';
12
13
  import { directoryGraphqlQuery } from './graphqlUtils';
14
+ var UNSHARDED_PREFIX = '/gateway/api/watermelon';
13
15
  export var buildReportingLinesQuery = function buildReportingLinesQuery(aaid) {
14
16
  return {
15
17
  query: "\n fragment ReportingLinesUserPII on UserPII {\n name\n picture\n }\n\n fragment ReportingLinesUserFragment on ReportingLinesUser {\n accountIdentifier\n identifierType\n pii {\n ...ReportingLinesUserPII\n }\n }\n\n query ReportingLines($aaid: String) {\n reportingLines(aaidOrHash: $aaid) {\n managers {\n ...ReportingLinesUserFragment\n }\n reports {\n ...ReportingLinesUserFragment\n }\n }\n }\n ",
@@ -18,9 +20,9 @@ export var buildReportingLinesQuery = function buildReportingLinesQuery(aaid) {
18
20
  }
19
21
  };
20
22
  };
21
- var isTCReadyPromiseMap = new Map();
22
- var globalExperiencePromiseCache = new Map();
23
+ var orgContainsAnyWorkspacePromiseCache = new Map();
23
24
  var orgIdPromiseCache = new Map();
25
+ var workspaceExistsWithTypePromiseCache = new Map();
24
26
  var TeamCentralCardClient = /*#__PURE__*/function (_CachingClient) {
25
27
  /**
26
28
  * Simple circuit breaker to avoid making unnecessary calls to Team Central on auth failures
@@ -37,20 +39,20 @@ var TeamCentralCardClient = /*#__PURE__*/function (_CachingClient) {
37
39
  _this = _callSuper(this, TeamCentralCardClient, [options]);
38
40
  _this.options = options;
39
41
  _this.bypassOnFailure = false;
40
- _this.isTCReadyPromise = _this.createTcReadyPromise(options);
41
- _this.isGlobalExperienceWorkspacePromise = _this.preloadIsGlobalExperienceWorkspace(options.cloudId);
42
+ _this.orgContainsAnyWorkspacePromise = _this.createOrgContainsAnyWorkspacePromise(options);
43
+ _this.workspaceExistsWithTypePromise = _this.preloadWorkspaceExistsWithType(options.cloudId);
42
44
  _this.orgIdPromise = _this.preloadOrgId(options.gatewayGraphqlUrl, options.cloudId, options.orgId);
43
45
  return _this;
44
46
  }
45
47
  _inherits(TeamCentralCardClient, _CachingClient);
46
48
  return _createClass(TeamCentralCardClient, [{
47
- key: "createTcReadyPromise",
48
- value: function createTcReadyPromise(config) {
49
+ key: "createOrgContainsAnyWorkspacePromise",
50
+ value: function createOrgContainsAnyWorkspacePromise(config) {
49
51
  if (config.cloudId) {
50
- var promise = isTCReadyPromiseMap.get(config.cloudId);
52
+ var promise = orgContainsAnyWorkspacePromiseCache.get(config.cloudId);
51
53
  if (!promise) {
52
- promise = this.hasTCWorkspace(config);
53
- isTCReadyPromiseMap.set(config.cloudId, promise);
54
+ promise = this.getOrgContainsAnyWorkspace(config.cloudId);
55
+ orgContainsAnyWorkspacePromiseCache.set(config.cloudId, promise);
54
56
  }
55
57
  return promise;
56
58
  }
@@ -60,8 +62,8 @@ var TeamCentralCardClient = /*#__PURE__*/function (_CachingClient) {
60
62
  key: "getReportingLines",
61
63
  value: function getReportingLines(userId) {
62
64
  var _this2 = this;
63
- return this.isTCReadyPromise.then(function (workSpaceExists) {
64
- if (workSpaceExists) {
65
+ return this.orgContainsAnyWorkspacePromise.then(function (orgContainsAnyWorkspace) {
66
+ if (orgContainsAnyWorkspace) {
65
67
  if (!userId) {
66
68
  return Promise.reject(new Error('userId missing'));
67
69
  }
@@ -144,45 +146,81 @@ var TeamCentralCardClient = /*#__PURE__*/function (_CachingClient) {
144
146
  }())
145
147
  }, {
146
148
  key: "checkWorkspaceExists",
147
- value: function checkWorkspaceExists() {
148
- return this.isTCReadyPromise.then(function (workSpaceExists) {
149
- if (workSpaceExists) {
150
- return Promise.resolve(true);
151
- }
152
- return Promise.resolve(false);
153
- }, function () {
154
- return Promise.resolve(false);
155
- });
156
- }
149
+ value: function () {
150
+ var _checkWorkspaceExists = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
151
+ var workspaceExistsPromise;
152
+ return _regeneratorRuntime.wrap(function _callee2$(_context2) {
153
+ while (1) switch (_context2.prev = _context2.next) {
154
+ case 0:
155
+ workspaceExistsPromise = fg('enable_ptc_townsquare_reporting_lines_unsharded') ? this.workspaceExistsWithTypePromise.then(function (workspaceExistsWithType) {
156
+ return workspaceExistsWithType !== undefined;
157
+ }) : this.orgContainsAnyWorkspacePromise;
158
+ return _context2.abrupt("return", workspaceExistsPromise.then(function (workspaceExistsWithType) {
159
+ if (workspaceExistsWithType) {
160
+ return Promise.resolve(true);
161
+ }
162
+ return Promise.resolve(false);
163
+ }, function () {
164
+ return Promise.resolve(false);
165
+ }));
166
+ case 2:
167
+ case "end":
168
+ return _context2.stop();
169
+ }
170
+ }, _callee2, this);
171
+ }));
172
+ function checkWorkspaceExists() {
173
+ return _checkWorkspaceExists.apply(this, arguments);
174
+ }
175
+ return checkWorkspaceExists;
176
+ }()
157
177
  }, {
158
178
  key: "getIsGlobalExperienceWorkspace",
159
- value: function getIsGlobalExperienceWorkspace() {
160
- return this.isGlobalExperienceWorkspacePromise;
161
- }
179
+ value: function () {
180
+ var _getIsGlobalExperienceWorkspace = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
181
+ return _regeneratorRuntime.wrap(function _callee3$(_context3) {
182
+ while (1) switch (_context3.prev = _context3.next) {
183
+ case 0:
184
+ _context3.next = 2;
185
+ return this.workspaceExistsWithTypePromise;
186
+ case 2:
187
+ _context3.t0 = _context3.sent;
188
+ return _context3.abrupt("return", _context3.t0 === 'GLOBAL_EXPERIENCE');
189
+ case 4:
190
+ case "end":
191
+ return _context3.stop();
192
+ }
193
+ }, _callee3, this);
194
+ }));
195
+ function getIsGlobalExperienceWorkspace() {
196
+ return _getIsGlobalExperienceWorkspace.apply(this, arguments);
197
+ }
198
+ return getIsGlobalExperienceWorkspace;
199
+ }()
162
200
  }, {
163
201
  key: "getOrgId",
164
202
  value: function getOrgId() {
165
203
  return this.orgIdPromise;
166
204
  }
167
205
  }, {
168
- key: "preloadIsGlobalExperienceWorkspace",
169
- value: function preloadIsGlobalExperienceWorkspace(cloudId) {
206
+ key: "preloadWorkspaceExistsWithType",
207
+ value: function preloadWorkspaceExistsWithType(cloudId) {
170
208
  if (cloudId === undefined) {
171
- return Promise.resolve(false);
209
+ return Promise.resolve(undefined);
172
210
  }
173
- var maybeIsGlobalExperienceWorkspaceForCloudIdPromise = globalExperiencePromiseCache.get(cloudId);
174
- if (maybeIsGlobalExperienceWorkspaceForCloudIdPromise !== undefined) {
175
- return maybeIsGlobalExperienceWorkspaceForCloudIdPromise;
211
+ var maybeWorkspaceExistsWithTypePromise = workspaceExistsWithTypePromiseCache.get(cloudId);
212
+ if (maybeWorkspaceExistsWithTypePromise !== undefined) {
213
+ return maybeWorkspaceExistsWithTypePromise;
176
214
  }
177
- var isGlobalExperienceWorkspaceForCloudIdPromise = this.isGlobalExperienceWorkspaceForCloudId(cloudId);
178
- globalExperiencePromiseCache.set(cloudId, isGlobalExperienceWorkspaceForCloudIdPromise);
179
- return isGlobalExperienceWorkspaceForCloudIdPromise;
215
+ var workspaceExistsWithTypePromise = this.getWorkspaceExistsWithType(cloudId);
216
+ workspaceExistsWithTypePromiseCache.set(cloudId, workspaceExistsWithTypePromise);
217
+ return workspaceExistsWithTypePromise;
180
218
  }
181
219
  }, {
182
- key: "hasTCWorkspace",
183
- value: function hasTCWorkspace(config) {
184
- if (config.cloudId) {
185
- return fetch("".concat(this.getShardedApiPath(config.cloudId), "/organization/containsAnyWorkspace?cloudId=").concat(config.cloudId)).then(function (res) {
220
+ key: "getOrgContainsAnyWorkspace",
221
+ value: function getOrgContainsAnyWorkspace(cloudId) {
222
+ if (cloudId) {
223
+ return fetch((fg('enable_ptc_townsquare_reporting_lines_unsharded') ? UNSHARDED_PREFIX : this.getShardedApiPath(cloudId)) + "/organization/containsAnyWorkspace?cloudId=".concat(cloudId)).then(function (res) {
186
224
  return !res || res && res.ok;
187
225
  });
188
226
  } else {
@@ -190,45 +228,46 @@ var TeamCentralCardClient = /*#__PURE__*/function (_CachingClient) {
190
228
  }
191
229
  }
192
230
  }, {
193
- key: "isGlobalExperienceWorkspaceForCloudId",
231
+ key: "getWorkspaceExistsWithType",
194
232
  value: function () {
195
- var _isGlobalExperienceWorkspaceForCloudId = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(cloudId) {
233
+ var _getWorkspaceExistsWithType = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(cloudId) {
196
234
  var response, workspaceType;
197
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
198
- while (1) switch (_context2.prev = _context2.next) {
235
+ return _regeneratorRuntime.wrap(function _callee4$(_context4) {
236
+ while (1) switch (_context4.prev = _context4.next) {
199
237
  case 0:
200
- _context2.prev = 0;
201
- _context2.next = 3;
238
+ _context4.prev = 0;
239
+ _context4.next = 3;
202
240
  return fetch("".concat(this.getShardedApiPath(cloudId), "/workspace/existsWithWorkspaceType?cloudId=").concat(cloudId), {
203
241
  credentials: 'include'
204
242
  });
205
243
  case 3:
206
- response = _context2.sent;
244
+ response = _context4.sent;
207
245
  if (!response.ok) {
208
- _context2.next = 9;
246
+ _context4.next = 9;
209
247
  break;
210
248
  }
211
- _context2.next = 7;
249
+ _context4.next = 7;
212
250
  return response.text();
213
251
  case 7:
214
- workspaceType = _context2.sent;
215
- return _context2.abrupt("return", Promise.resolve(workspaceType === 'GLOBAL_EXPERIENCE'));
252
+ workspaceType = _context4.sent;
253
+ return _context4.abrupt("return", Promise.resolve(workspaceType));
216
254
  case 9:
217
- return _context2.abrupt("return", Promise.resolve(false));
218
- case 12:
219
- _context2.prev = 12;
220
- _context2.t0 = _context2["catch"](0);
221
- return _context2.abrupt("return", Promise.resolve(false));
222
- case 15:
255
+ _context4.next = 14;
256
+ break;
257
+ case 11:
258
+ _context4.prev = 11;
259
+ _context4.t0 = _context4["catch"](0);
260
+ return _context4.abrupt("return", Promise.resolve(undefined));
261
+ case 14:
223
262
  case "end":
224
- return _context2.stop();
263
+ return _context4.stop();
225
264
  }
226
- }, _callee2, this, [[0, 12]]);
265
+ }, _callee4, this, [[0, 11]]);
227
266
  }));
228
- function isGlobalExperienceWorkspaceForCloudId(_x2) {
229
- return _isGlobalExperienceWorkspaceForCloudId.apply(this, arguments);
267
+ function getWorkspaceExistsWithType(_x2) {
268
+ return _getWorkspaceExistsWithType.apply(this, arguments);
230
269
  }
231
- return isGlobalExperienceWorkspaceForCloudId;
270
+ return getWorkspaceExistsWithType;
232
271
  }()
233
272
  }, {
234
273
  key: "preloadOrgId",
@@ -4,7 +4,7 @@ import { AGGQuery } from './graphqlUtils';
4
4
  var ORG_ID_FROM_CLOUD_ID_QUERY = "query OrgIdFromCloudId($cloudId: ID!) {\n\ttenantContexts(cloudIds: [$cloudId]) {\n\t\torgId\n\t}\n}";
5
5
  var addHeaders = function addHeaders(headers) {
6
6
  headers.append('atl-client-name', "@atlaskit/profilecard");
7
- headers.append('atl-client-version', "21.0.2");
7
+ headers.append('atl-client-version', "21.0.4");
8
8
  return headers;
9
9
  };
10
10
  export function getOrgIdForCloudIdFromAGG(_x, _x2) {
@@ -48,7 +48,7 @@ export var addHeaders = function addHeaders(headers) {
48
48
  headers.append('X-ExperimentalApi', 'teams-beta');
49
49
  headers.append('X-ExperimentalApi', 'team-members-beta');
50
50
  headers.append('atl-client-name', "@atlaskit/profilecard");
51
- headers.append('atl-client-version', "21.0.2");
51
+ headers.append('atl-client-version', "21.0.4");
52
52
  return headers;
53
53
  };
54
54
  export function getTeamFromAGG(_x, _x2, _x3) {
@@ -1,7 +1,8 @@
1
1
  import React, { useEffect } from 'react';
2
2
  import Button from '@atlaskit/button/standard-button';
3
3
  import IconError from '@atlaskit/icon/glyph/cross-circle';
4
- import { ErrorText, ErrorTitle, ErrorWrapper } from '../../styled/Error';
4
+ import { Text } from '@atlaskit/primitives';
5
+ import { ErrorTitle, ErrorWrapper } from '../../styled/Error';
5
6
  import { profileCardRendered } from '../../util/analytics';
6
7
  var ErrorMessage = function ErrorMessage(props) {
7
8
  var errorType = props.errorType || {
@@ -21,7 +22,9 @@ var ErrorMessage = function ErrorMessage(props) {
21
22
  if (errorReason === 'NotFound') {
22
23
  return /*#__PURE__*/React.createElement(ErrorTitle, null, "The user is no longer available for the site");
23
24
  }
24
- return /*#__PURE__*/React.createElement(ErrorTitle, null, "Oops, looks like we\u2019re having issues", /*#__PURE__*/React.createElement("br", null), reload && /*#__PURE__*/React.createElement(ErrorText, null, "Try again and we\u2019ll give it another shot"));
25
+ return /*#__PURE__*/React.createElement(ErrorTitle, null, "Oops, looks like we\u2019re having issues", /*#__PURE__*/React.createElement("br", null), reload && /*#__PURE__*/React.createElement(Text, {
26
+ color: "color.text.subtlest"
27
+ }, "Try again and we\u2019ll give it another shot"));
25
28
  };
26
29
  return /*#__PURE__*/React.createElement(ErrorWrapper, {
27
30
  "data-testid": "profilecard-error"
@@ -15,12 +15,12 @@ import { LinkItem, MenuGroup } from '@atlaskit/menu';
15
15
  import { VerifiedTeamIcon } from '@atlaskit/people-teams-ui-public/verified-team-icon';
16
16
  import { fg } from '@atlaskit/platform-feature-flags';
17
17
  import Popup from '@atlaskit/popup';
18
- import { Inline } from '@atlaskit/primitives';
18
+ import { Inline, Text } from '@atlaskit/primitives';
19
19
  import { layers } from '@atlaskit/theme/constants';
20
20
  import Tooltip from '@atlaskit/tooltip';
21
21
  import messages from '../../messages';
22
22
  import { AnimatedKudosButton, AnimationWrapper, KudosBlobAnimation } from '../../styled/Card';
23
- import { ErrorWrapper, TeamErrorText, TeamErrorTitle } from '../../styled/Error';
23
+ import { ErrorWrapper, TeamErrorText } from '../../styled/Error';
24
24
  import { ActionButtons, AvatarSection, CardContent, CardHeader, CardWrapper, Description, DescriptionWrapper, MemberCount, MoreButton, TeamName, WrappedButton } from '../../styled/TeamCard';
25
25
  import { actionClicked, errorRetryClicked, moreActionsClicked, moreMembersClicked, profileCardRendered, teamAvatarClicked } from '../../util/analytics';
26
26
  import { isBasicClick } from '../../util/click';
@@ -283,7 +283,10 @@ var ErrorMessage = function ErrorMessage(_ref6) {
283
283
  }, [analytics, clientFetchProfile]);
284
284
  return /*#__PURE__*/React.createElement(ErrorWrapper, {
285
285
  "data-testid": "team-profilecard-error"
286
- }, /*#__PURE__*/React.createElement(ErrorIllustration, null), /*#__PURE__*/React.createElement(TeamErrorTitle, null, /*#__PURE__*/React.createElement(FormattedMessage, messages.teamErrorTitle)), /*#__PURE__*/React.createElement(TeamErrorText, null, /*#__PURE__*/React.createElement(FormattedMessage, messages.teamErrorText)), clientFetchProfile && /*#__PURE__*/React.createElement(ActionButtons, null, /*#__PURE__*/React.createElement(WrappedButton, null, /*#__PURE__*/React.createElement(LoadingButton, {
286
+ }, /*#__PURE__*/React.createElement(ErrorIllustration, null), /*#__PURE__*/React.createElement(Text, {
287
+ as: "p",
288
+ weight: "semibold"
289
+ }, /*#__PURE__*/React.createElement(FormattedMessage, messages.teamErrorTitle)), /*#__PURE__*/React.createElement(TeamErrorText, null, /*#__PURE__*/React.createElement(FormattedMessage, messages.teamErrorText)), clientFetchProfile && /*#__PURE__*/React.createElement(ActionButtons, null, /*#__PURE__*/React.createElement(WrappedButton, null, /*#__PURE__*/React.createElement(LoadingButton, {
287
290
  testId: "client-fetch-profile-button",
288
291
  shouldFitContainer: true,
289
292
  onClick: retry,
@@ -58,8 +58,8 @@ export default function getMockProfileClient(BaseProfileClient, modifyResponse)
58
58
  }
59
59
  _inherits(MockTeamCentralClient, _TeamCentralCardClien);
60
60
  return _createClass(MockTeamCentralClient, [{
61
- key: "createTcReadyPromise",
62
- value: function createTcReadyPromise(config) {
61
+ key: "createOrgContainsAnyWorkspacePromise",
62
+ value: function createOrgContainsAnyWorkspacePromise(config) {
63
63
  return Promise.resolve(true);
64
64
  }
65
65
  }, {
@@ -1,9 +1,7 @@
1
1
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
2
2
  import styled from '@emotion/styled';
3
3
  import { N200 } from '@atlaskit/theme/colors';
4
- import { gridSize } from '@atlaskit/theme/constants';
5
- import { h400 } from '@atlaskit/theme/typography';
6
- import { errorIconColor, errorTextColor, errorTitleColor } from './constants';
4
+ import { errorIconColor, errorTitleColor } from './constants';
7
5
 
8
6
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
9
7
  export var ErrorWrapper = styled.div({
@@ -15,22 +13,12 @@ export var ErrorWrapper = styled.div({
15
13
 
16
14
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
17
15
  export var ErrorTitle = styled.p({
16
+ font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
18
17
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
19
18
  color: errorTitleColor,
20
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
21
- lineHeight: "".concat(gridSize() * 3, "px"),
22
19
  margin: "var(--ds-space-100, 8px)".concat(" 0")
23
20
  });
24
21
 
25
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
26
- export var ErrorText = styled.span({
27
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
28
- color: errorTextColor
29
- });
30
-
31
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
32
- export var TeamErrorTitle = styled.p(h400);
33
-
34
22
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
35
23
  export var TeamErrorText = styled.p({
36
24
  color: "var(--ds-text-subtlest, ".concat(N200, ")"),
@@ -39,7 +39,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
39
39
  actionSubjectId: actionSubjectId,
40
40
  attributes: _objectSpread(_objectSpread({
41
41
  packageName: "@atlaskit/profilecard",
42
- packageVersion: "21.0.2"
42
+ packageVersion: "21.0.4"
43
43
  }, attributes), {}, {
44
44
  firedAt: Math.round(getPageTime())
45
45
  })
@@ -27,11 +27,11 @@ declare class TeamCentralCardClient extends CachingClient<TeamCentralReportingLi
27
27
  * catch a pretty specific edge case.
28
28
  */
29
29
  bypassOnFailure: boolean;
30
- isTCReadyPromise: Promise<boolean>;
31
- private isGlobalExperienceWorkspacePromise;
30
+ orgContainsAnyWorkspacePromise: Promise<boolean>;
32
31
  private orgIdPromise;
32
+ private workspaceExistsWithTypePromise;
33
33
  constructor(options: TeamCentralCardClientOptions);
34
- createTcReadyPromise(config: TeamCentralCardClientOptions): Promise<boolean>;
34
+ createOrgContainsAnyWorkspacePromise(config: TeamCentralCardClientOptions): Promise<boolean>;
35
35
  getReportingLines(userId: string): Promise<TeamCentralReportingLinesData>;
36
36
  /**
37
37
  * `public` so that mock client can override it; do not use it otherwise!
@@ -40,9 +40,9 @@ declare class TeamCentralCardClient extends CachingClient<TeamCentralReportingLi
40
40
  checkWorkspaceExists(): Promise<boolean>;
41
41
  getIsGlobalExperienceWorkspace(): Promise<boolean>;
42
42
  getOrgId(): Promise<string | null>;
43
- private preloadIsGlobalExperienceWorkspace;
44
- private hasTCWorkspace;
45
- private isGlobalExperienceWorkspaceForCloudId;
43
+ private preloadWorkspaceExistsWithType;
44
+ private getOrgContainsAnyWorkspace;
45
+ private getWorkspaceExistsWithType;
46
46
  private preloadOrgId;
47
47
  private getShardedApiPath;
48
48
  private filterReportingLinesUser;
@@ -7,14 +7,6 @@ export declare const ErrorTitle: import("@emotion/styled").StyledComponent<{
7
7
  theme?: import("@emotion/react").Theme | undefined;
8
8
  as?: import("react").ElementType<any> | undefined;
9
9
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, {}>;
10
- export declare const ErrorText: import("@emotion/styled").StyledComponent<{
11
- theme?: import("@emotion/react").Theme | undefined;
12
- as?: import("react").ElementType<any> | undefined;
13
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
14
- export declare const TeamErrorTitle: import("@emotion/styled").StyledComponent<{
15
- theme?: import("@emotion/react").Theme | undefined;
16
- as?: import("react").ElementType<any> | undefined;
17
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, {}>;
18
10
  export declare const TeamErrorText: import("@emotion/styled").StyledComponent<{
19
11
  theme?: import("@emotion/react").Theme | undefined;
20
12
  as?: import("react").ElementType<any> | undefined;
@@ -27,11 +27,11 @@ declare class TeamCentralCardClient extends CachingClient<TeamCentralReportingLi
27
27
  * catch a pretty specific edge case.
28
28
  */
29
29
  bypassOnFailure: boolean;
30
- isTCReadyPromise: Promise<boolean>;
31
- private isGlobalExperienceWorkspacePromise;
30
+ orgContainsAnyWorkspacePromise: Promise<boolean>;
32
31
  private orgIdPromise;
32
+ private workspaceExistsWithTypePromise;
33
33
  constructor(options: TeamCentralCardClientOptions);
34
- createTcReadyPromise(config: TeamCentralCardClientOptions): Promise<boolean>;
34
+ createOrgContainsAnyWorkspacePromise(config: TeamCentralCardClientOptions): Promise<boolean>;
35
35
  getReportingLines(userId: string): Promise<TeamCentralReportingLinesData>;
36
36
  /**
37
37
  * `public` so that mock client can override it; do not use it otherwise!
@@ -40,9 +40,9 @@ declare class TeamCentralCardClient extends CachingClient<TeamCentralReportingLi
40
40
  checkWorkspaceExists(): Promise<boolean>;
41
41
  getIsGlobalExperienceWorkspace(): Promise<boolean>;
42
42
  getOrgId(): Promise<string | null>;
43
- private preloadIsGlobalExperienceWorkspace;
44
- private hasTCWorkspace;
45
- private isGlobalExperienceWorkspaceForCloudId;
43
+ private preloadWorkspaceExistsWithType;
44
+ private getOrgContainsAnyWorkspace;
45
+ private getWorkspaceExistsWithType;
46
46
  private preloadOrgId;
47
47
  private getShardedApiPath;
48
48
  private filterReportingLinesUser;
@@ -7,14 +7,6 @@ export declare const ErrorTitle: import("@emotion/styled").StyledComponent<{
7
7
  theme?: import("@emotion/react").Theme | undefined;
8
8
  as?: import("react").ElementType<any> | undefined;
9
9
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, {}>;
10
- export declare const ErrorText: import("@emotion/styled").StyledComponent<{
11
- theme?: import("@emotion/react").Theme | undefined;
12
- as?: import("react").ElementType<any> | undefined;
13
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
14
- export declare const TeamErrorTitle: import("@emotion/styled").StyledComponent<{
15
- theme?: import("@emotion/react").Theme | undefined;
16
- as?: import("react").ElementType<any> | undefined;
17
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, {}>;
18
10
  export declare const TeamErrorText: import("@emotion/styled").StyledComponent<{
19
11
  theme?: import("@emotion/react").Theme | undefined;
20
12
  as?: import("react").ElementType<any> | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/profilecard",
3
- "version": "21.0.2",
3
+ "version": "21.0.4",
4
4
  "description": "A React component to display a card with user information.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -67,11 +67,11 @@
67
67
  "@atlaskit/platform-feature-flags": "^0.3.0",
68
68
  "@atlaskit/popup": "^1.30.0",
69
69
  "@atlaskit/primitives": "^13.3.0",
70
- "@atlaskit/rovo-agent-components": "^1.14.0",
70
+ "@atlaskit/rovo-agent-components": "^1.15.0",
71
71
  "@atlaskit/rovo-triggers": "^1.4.0",
72
72
  "@atlaskit/spinner": "^16.3.0",
73
73
  "@atlaskit/theme": "^14.0.0",
74
- "@atlaskit/tokens": "^2.4.0",
74
+ "@atlaskit/tokens": "^2.5.0",
75
75
  "@atlaskit/tooltip": "^19.0.0",
76
76
  "@babel/runtime": "^7.0.0",
77
77
  "@emotion/react": "^11.7.1",
@@ -88,12 +88,12 @@
88
88
  },
89
89
  "devDependencies": {
90
90
  "@af/visual-regression": "*",
91
- "@atlassian/a11y-jest-testing": "*",
92
91
  "@atlassian/feature-flags-test-utils": "*",
93
92
  "@atlassian/ptc-test-utils": "^0.8.0",
94
93
  "@testing-library/react": "^12.1.5",
95
94
  "@testing-library/react-hooks": "^8.0.1",
96
95
  "@testing-library/user-event": "^14.4.3",
96
+ "@types/react-router-dom": "^4.3.1",
97
97
  "enzyme": "^3.10.0",
98
98
  "es6-promise": "^4.0.5",
99
99
  "fetch-mock": "^8.0.0",
@@ -125,6 +125,9 @@
125
125
  "enable_agent_profile_card": {
126
126
  "type": "boolean"
127
127
  },
128
+ "enable_ptc_townsquare_reporting_lines_unsharded": {
129
+ "type": "boolean"
130
+ },
128
131
  "rovo_use_agent_permissions": {
129
132
  "type": "boolean"
130
133
  },