@atlaskit/profilecard 21.0.3 → 21.0.5

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,24 @@
1
1
  # @atlaskit/profilecard
2
2
 
3
+ ## 21.0.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [#180301](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/180301)
8
+ [`16990dd2ac6e5`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/16990dd2ac6e5) -
9
+ Internal changes to typography styles. There may be some minor visual changes to align with
10
+ modernized typography styles.
11
+ - Updated dependencies
12
+
13
+ ## 21.0.4
14
+
15
+ ### Patch Changes
16
+
17
+ - [#179093](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/179093)
18
+ [`fc80a0b0d4961`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/fc80a0b0d4961) -
19
+ Fix reporting lines to be available outside of Atlassian Home
20
+ - Updated dependencies
21
+
3
22
  ## 21.0.3
4
23
 
5
24
  ### 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.3");
14
+ headers.append('atl-client-version', "21.0.5");
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.3");
60
+ headers.append('atl-client-version', "21.0.5");
61
61
  return headers;
62
62
  };
63
63
  function getTeamFromAGG(_x, _x2, _x3) {
@@ -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
  }, {
@@ -64,7 +64,7 @@ var CardContent = exports.CardContent = _styled.default.div(_templateObject10 ||
64
64
  var DetailsGroup = exports.DetailsGroup = _styled.default.div(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n\tdisplay: flex;\n\tflex-direction: column;\n\tmargin-left: ", "px;\n\twidth: ", "px;\n"])), (0, _constants.gridSize)() * 14.5, (0, _constants.gridSize)() * 24.5);
65
65
 
66
66
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
67
- var DisabledInfo = exports.DisabledInfo = _styled.default.div(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n\tfont-size: ", "px;\n\tcolor: ", ";\n\tmargin: ", " 0 0 0;\n\tline-height: 16px;\n"])), (0, _constants.fontSizeSmall)(), _constants2.labelTextColor, "var(--ds-space-150, 12px)");
67
+ var DisabledInfo = exports.DisabledInfo = _styled.default.div(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n\tfont: ", ";\n\tcolor: ", ";\n\tmargin: ", " 0 0 0;\n\tline-height: 16px;\n"])), "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)", _constants2.labelTextColor, "var(--ds-space-150, 12px)");
68
68
 
69
69
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
70
70
  var FullNameLabel = exports.FullNameLabel = _styled.default.h2(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n\n\tfont-size: 18px;\n\tfont-weight: ", ";\n\tletter-spacing: normal;\n\tcolor: ", ";\n\tmargin: ", ";\n\tline-height: ", "em;\n\t:first-child {\n\t\tmargin: ", ";\n\t}\n"])), "var(--ds-font-weight-regular, 400)", function (props) {
@@ -82,10 +82,10 @@ var LozengeWrapper = exports.LozengeWrapper = _styled.default.div(_templateObjec
82
82
  var CustomLozengeContainer = exports.CustomLozengeContainer = (0, _styled.default)(LozengeWrapper)(_templateObject15 || (_templateObject15 = (0, _taggedTemplateLiteral2.default)(["\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: wrap;\n\tjustify-content: flex-start;\n\tmargin-top: ", ";\n\t> * {\n\t\tmargin-top: ", ";\n\t\t&:not(:last-child) {\n\t\t\tmargin-right: ", ";\n\t\t}\n\t}\n"])), "var(--ds-space-150, 12px)", "var(--ds-space-050, 4px)", "var(--ds-space-050, 4px)");
83
83
 
84
84
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
85
- var JobTitleLabel = exports.JobTitleLabel = _styled.default.span(_templateObject16 || (_templateObject16 = (0, _taggedTemplateLiteral2.default)(["\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n\n\tfont-size: 14px;\n\tcolor: ", ";\n\tmargin: 0 0 ", " 0;\n\tline-height: ", "em;\n"])), _constants2.headerTextColor, "var(--ds-space-150, 12px)", 24 / 14);
85
+ var JobTitleLabel = exports.JobTitleLabel = _styled.default.span(_templateObject16 || (_templateObject16 = (0, _taggedTemplateLiteral2.default)(["\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n\n\tfont: ", ";\n\tcolor: ", ";\n\tmargin: 0 0 ", " 0;\n"])), "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)", _constants2.headerTextColor, "var(--ds-space-150, 12px)");
86
86
 
87
87
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
88
- var AppTitleLabel = exports.AppTitleLabel = _styled.default.span(_templateObject17 || (_templateObject17 = (0, _taggedTemplateLiteral2.default)(["\n\tbackground: ", ";\n\tcolor: ", ";\n\tborder-radius: ", ";\n\tpadding: 0 ", ";\n\twidth: fit-content;\n\tfont-weight: ", ";\n\ttext-transform: uppercase;\n\n\tfont-size: 12px;\n\tmargin: ", " 0 ", " 0;\n\tline-height: ", "em;\n"])), _constants2.appLabelBgColor, _constants2.appLabelTextColor, (0, _constants.borderRadius)(), "var(--ds-space-075, 6px)", "var(--ds-font-weight-bold, 700)", "var(--ds-space-050, 4px)", "var(--ds-space-150, 12px)", 24 / 14);
88
+ var AppTitleLabel = exports.AppTitleLabel = _styled.default.span(_templateObject17 || (_templateObject17 = (0, _taggedTemplateLiteral2.default)(["\n\tbackground: ", ";\n\tcolor: ", ";\n\tborder-radius: ", ";\n\tpadding: 0 ", ";\n\twidth: fit-content;\n\tfont-weight: ", ";\n\ttext-transform: uppercase;\n\n\tfont: ", ";\n\tmargin: ", " 0 ", " 0;\n"])), _constants2.appLabelBgColor, _constants2.appLabelTextColor, (0, _constants.borderRadius)(), "var(--ds-space-075, 6px)", "var(--ds-font-weight-bold, 700)", "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)", "var(--ds-space-050, 4px)", "var(--ds-space-150, 12px)");
89
89
 
90
90
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
91
91
  var SpinnerContainer = exports.SpinnerContainer = _styled.default.div(_templateObject18 || (_templateObject18 = (0, _taggedTemplateLiteral2.default)(["\n\talign-items: center;\n\tdisplay: flex;\n\theight: ", "px;\n\tjustify-content: center;\n\tposition: relative;\n"])), (0, _constants.gridSize)() * 12);
@@ -101,7 +101,7 @@ var CardContainer = exports.CardContainer = _styled.default.div(_templateObject1
101
101
  });
102
102
 
103
103
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
104
- var DetailsLabel = exports.DetailsLabel = _styled.default.div(_templateObject20 || (_templateObject20 = (0, _taggedTemplateLiteral2.default)(["\n\tdisplay: flex;\n\talign-items: center;\n\tline-height: 24px;\n\tfont-size: ", "px;\n\tmargin: ", " 0 0 0;\n\twhite-space: nowrap;\n\n\t& + & {\n\t\tmargin-top: ", ";\n\t}\n"])), (0, _constants.gridSize)() * 1.5, "var(--ds-space-200, 16px)", "var(--ds-space-025, 2px)");
104
+ var DetailsLabel = exports.DetailsLabel = _styled.default.div(_templateObject20 || (_templateObject20 = (0, _taggedTemplateLiteral2.default)(["\n\tdisplay: flex;\n\talign-items: center;\n\tfont: ", ";\n\tmargin: ", " 0 0 0;\n\twhite-space: nowrap;\n\n\t& + & {\n\t\tmargin-top: ", ";\n\t}\n"])), "var(--ds-font-body-large, normal 400 16px/24px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)", "var(--ds-space-200, 16px)", "var(--ds-space-025, 2px)");
105
105
 
106
106
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
107
107
  var DetailsLabelIcon = exports.DetailsLabelIcon = _styled.default.dt(_templateObject21 || (_templateObject21 = (0, _taggedTemplateLiteral2.default)(["\n\tdisplay: flex;\n\tflex-shrink: 0;\n\tcolor: ", ";\n\twidth: ", ";\n\theight: ", ";\n\tpadding: ", ";\n\tvertical-align: top;\n\n\tsvg {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t}\n"])), _constants2.labelIconColor, "var(--ds-space-200, 16px)", "var(--ds-space-200, 16px)", "var(--ds-space-050, 4px)");
@@ -9,7 +9,6 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
9
9
  var _styled = _interopRequireDefault(require("@emotion/styled"));
10
10
  var _colors = require("@atlaskit/theme/colors");
11
11
  var _constants = require("@atlaskit/theme/constants");
12
- var _typography = require("@atlaskit/theme/typography");
13
12
  var _constants2 = require("./constants");
14
13
  var _templateObject; // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
15
14
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
@@ -24,7 +23,7 @@ var CardWrapper = exports.CardWrapper = _styled.default.div({
24
23
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
25
24
  borderRadius: "".concat((0, _constants.borderRadius)(), "px"),
26
25
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
27
- width: "".concat((0, _constants.gridSize)() * 40, "px"),
26
+ width: '320px',
28
27
  position: 'relative',
29
28
  WebkitFontSmoothing: 'antialiased',
30
29
  MozOsxFontSmoothing: 'grayscale'
@@ -33,16 +32,16 @@ var CardWrapper = exports.CardWrapper = _styled.default.div({
33
32
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
34
33
  var TeamForbiddenErrorStateWrapper = exports.TeamForbiddenErrorStateWrapper = _styled.default.div({
35
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
36
- width: "".concat((0, _constants.gridSize)() * 40, "px"),
35
+ width: '320px',
37
36
  position: 'relative'
38
37
  });
39
38
 
40
39
  // eslint-disable-next-line @atlaskit/design-system/no-styled-tagged-template-expression, @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
41
- var CardHeader = exports.CardHeader = _styled.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\tbackground-color: ", ";\n\tbackground-image: ", ";\n\tbackground-repeat: no-repeat;\n\tbackground-position: center;\n\tbackground-size: cover;\n\tbox-sizing: content-box;\n\theight: ", "px;\n"])), function (props) {
40
+ var CardHeader = exports.CardHeader = _styled.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\tbackground-color: ", ";\n\tbackground-image: ", ";\n\tbackground-repeat: no-repeat;\n\tbackground-position: center;\n\tbackground-size: cover;\n\tbox-sizing: content-box;\n\theight: 128px;\n"])), function (props) {
42
41
  return props.isLoading ? "var(--ds-background-neutral, ".concat(_colors.N20, ")") : props.image ? '' : _constants2.teamHeaderBgColor;
43
42
  }, function (props) {
44
43
  return props.image ? "url(".concat(props.image, ")") : '';
45
- }, (0, _constants.gridSize)() * 16);
44
+ });
46
45
 
47
46
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
48
47
  var CardContent = exports.CardContent = _styled.default.div({
@@ -50,11 +49,12 @@ var CardContent = exports.CardContent = _styled.default.div({
50
49
  flexDirection: 'column',
51
50
  padding: "var(--ds-space-300, 24px)",
52
51
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
53
- minHeight: "".concat((0, _constants.gridSize)() * 13, "px")
52
+ minHeight: '104px'
54
53
  });
55
54
 
56
55
  // 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
57
- var TeamName = exports.TeamName = _styled.default.h6(_typography.h600, {
56
+ var TeamName = exports.TeamName = _styled.default.h6({
57
+ font: "var(--ds-font-heading-medium, normal 500 20px/24px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
58
58
  textTransform: 'none',
59
59
  overflow: 'hidden',
60
60
  maxHeight: '48px',
@@ -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.3"
48
+ packageVersion: "21.0.5"
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.3");
9
+ headers.append('atl-client-version', "21.0.5");
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.3");
71
+ headers.append('atl-client-version', "21.0.5");
72
72
  return headers;
73
73
  };
74
74
  export async function getTeamFromAGG(url, teamId, siteId) {
@@ -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) {
@@ -7,7 +7,7 @@ import { keyframes } from '@emotion/react';
7
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
8
  import styled from '@emotion/styled';
9
9
  import { B200, N50A, N60A } from '@atlaskit/theme/colors';
10
- import { borderRadius, fontSize, fontSizeSmall, gridSize } from '@atlaskit/theme/constants';
10
+ import { borderRadius, fontSize, gridSize } from '@atlaskit/theme/constants';
11
11
  import { appLabelBgColor, appLabelTextColor, bgColor, headerBgColor, headerBgColorDisabledUser, headerTextColor, headerTextColorInactive, labelIconColor, labelTextColor } from './constants';
12
12
  const getFullNameMargin = props => props.noMeta ? `${"var(--ds-space-400, 32px)"} 0 ${"var(--ds-space-150, 12px)"} 0` : `${"var(--ds-space-150, 12px)"} 0 0 0`;
13
13
 
@@ -153,7 +153,7 @@ export const DetailsGroup = styled.div`
153
153
 
154
154
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
155
155
  export const DisabledInfo = styled.div`
156
- font-size: ${fontSizeSmall()}px;
156
+ font: ${"var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"};
157
157
  color: ${labelTextColor};
158
158
  margin: ${"var(--ds-space-150, 12px)"} 0 0 0;
159
159
  line-height: 16px;
@@ -204,10 +204,9 @@ export const JobTitleLabel = styled.span`
204
204
  text-overflow: ellipsis;
205
205
  white-space: nowrap;
206
206
 
207
- font-size: 14px;
207
+ font: ${"var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"};
208
208
  color: ${headerTextColor};
209
209
  margin: 0 0 ${"var(--ds-space-150, 12px)"} 0;
210
- line-height: ${24 / 14}em;
211
210
  `;
212
211
 
213
212
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
@@ -220,9 +219,8 @@ export const AppTitleLabel = styled.span`
220
219
  font-weight: ${"var(--ds-font-weight-bold, 700)"};
221
220
  text-transform: uppercase;
222
221
 
223
- font-size: 12px;
222
+ font: ${"var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"};
224
223
  margin: ${"var(--ds-space-050, 4px)"} 0 ${"var(--ds-space-150, 12px)"} 0;
225
- line-height: ${24 / 14}em;
226
224
  `;
227
225
 
228
226
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
@@ -258,8 +256,7 @@ export const CardContainer = styled.div`
258
256
  export const DetailsLabel = styled.div`
259
257
  display: flex;
260
258
  align-items: center;
261
- line-height: 24px;
262
- font-size: ${gridSize() * 1.5}px;
259
+ font: ${"var(--ds-font-body-large, normal 400 16px/24px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"};
263
260
  margin: ${"var(--ds-space-200, 16px)"} 0 0 0;
264
261
  white-space: nowrap;
265
262
 
@@ -1,8 +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 { N20, N200 } from '@atlaskit/theme/colors';
4
- import { borderRadius, gridSize } from '@atlaskit/theme/constants';
5
- import { h600 } from '@atlaskit/theme/typography';
4
+ import { borderRadius } from '@atlaskit/theme/constants';
6
5
  import { bgColor, teamHeaderBgColor } from './constants';
7
6
 
8
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
@@ -17,7 +16,7 @@ export const CardWrapper = styled.div({
17
16
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
18
17
  borderRadius: `${borderRadius()}px`,
19
18
  // 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
- width: `${gridSize() * 40}px`,
19
+ width: '320px',
21
20
  position: 'relative',
22
21
  WebkitFontSmoothing: 'antialiased',
23
22
  MozOsxFontSmoothing: 'grayscale'
@@ -26,7 +25,7 @@ export const CardWrapper = styled.div({
26
25
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
27
26
  export const TeamForbiddenErrorStateWrapper = styled.div({
28
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
29
- width: `${gridSize() * 40}px`,
28
+ width: '320px',
30
29
  position: 'relative'
31
30
  });
32
31
 
@@ -38,7 +37,7 @@ export const CardHeader = styled.div`
38
37
  background-position: center;
39
38
  background-size: cover;
40
39
  box-sizing: content-box;
41
- height: ${gridSize() * 16}px;
40
+ height: 128px;
42
41
  `;
43
42
 
44
43
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
@@ -47,11 +46,12 @@ export const CardContent = styled.div({
47
46
  flexDirection: 'column',
48
47
  padding: "var(--ds-space-300, 24px)",
49
48
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
50
- minHeight: `${gridSize() * 13}px`
49
+ minHeight: '104px'
51
50
  });
52
51
 
53
52
  // 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
54
- export const TeamName = styled.h6(h600, {
53
+ export const TeamName = styled.h6({
54
+ font: "var(--ds-font-heading-medium, normal 500 20px/24px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
55
55
  textTransform: 'none',
56
56
  overflow: 'hidden',
57
57
  maxHeight: '48px',
@@ -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.3",
35
+ packageVersion: "21.0.5",
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.3");
7
+ headers.append('atl-client-version', "21.0.5");
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.3");
51
+ headers.append('atl-client-version', "21.0.5");
52
52
  return headers;
53
53
  };
54
54
  export function getTeamFromAGG(_x, _x2, _x3) {
@@ -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
  }, {
@@ -9,7 +9,7 @@ import { keyframes } from '@emotion/react';
9
9
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
10
10
  import styled from '@emotion/styled';
11
11
  import { B200, N50A, N60A } from '@atlaskit/theme/colors';
12
- import { borderRadius, fontSize, fontSizeSmall, gridSize } from '@atlaskit/theme/constants';
12
+ import { borderRadius, fontSize, gridSize } from '@atlaskit/theme/constants';
13
13
  import { appLabelBgColor, appLabelTextColor, bgColor, headerBgColor, headerBgColorDisabledUser, headerTextColor, headerTextColorInactive, labelIconColor, labelTextColor } from './constants';
14
14
  var getFullNameMargin = function getFullNameMargin(props) {
15
15
  return props.noMeta ? "var(--ds-space-400, 32px)".concat(" 0 ", "var(--ds-space-150, 12px)", " 0") : "var(--ds-space-150, 12px)".concat(" 0 0 0");
@@ -58,7 +58,7 @@ export var CardContent = styled.div(_templateObject10 || (_templateObject10 = _t
58
58
  export var DetailsGroup = styled.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n\tdisplay: flex;\n\tflex-direction: column;\n\tmargin-left: ", "px;\n\twidth: ", "px;\n"])), gridSize() * 14.5, gridSize() * 24.5);
59
59
 
60
60
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
61
- export var DisabledInfo = styled.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n\tfont-size: ", "px;\n\tcolor: ", ";\n\tmargin: ", " 0 0 0;\n\tline-height: 16px;\n"])), fontSizeSmall(), labelTextColor, "var(--ds-space-150, 12px)");
61
+ export var DisabledInfo = styled.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n\tfont: ", ";\n\tcolor: ", ";\n\tmargin: ", " 0 0 0;\n\tline-height: 16px;\n"])), "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)", labelTextColor, "var(--ds-space-150, 12px)");
62
62
 
63
63
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
64
64
  export var FullNameLabel = styled.h2(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n\n\tfont-size: 18px;\n\tfont-weight: ", ";\n\tletter-spacing: normal;\n\tcolor: ", ";\n\tmargin: ", ";\n\tline-height: ", "em;\n\t:first-child {\n\t\tmargin: ", ";\n\t}\n"])), "var(--ds-font-weight-regular, 400)", function (props) {
@@ -76,10 +76,10 @@ export var LozengeWrapper = styled.div(_templateObject14 || (_templateObject14 =
76
76
  export var CustomLozengeContainer = styled(LozengeWrapper)(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: wrap;\n\tjustify-content: flex-start;\n\tmargin-top: ", ";\n\t> * {\n\t\tmargin-top: ", ";\n\t\t&:not(:last-child) {\n\t\t\tmargin-right: ", ";\n\t\t}\n\t}\n"])), "var(--ds-space-150, 12px)", "var(--ds-space-050, 4px)", "var(--ds-space-050, 4px)");
77
77
 
78
78
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
79
- export var JobTitleLabel = styled.span(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n\n\tfont-size: 14px;\n\tcolor: ", ";\n\tmargin: 0 0 ", " 0;\n\tline-height: ", "em;\n"])), headerTextColor, "var(--ds-space-150, 12px)", 24 / 14);
79
+ export var JobTitleLabel = styled.span(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n\n\tfont: ", ";\n\tcolor: ", ";\n\tmargin: 0 0 ", " 0;\n"])), "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)", headerTextColor, "var(--ds-space-150, 12px)");
80
80
 
81
81
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
82
- export var AppTitleLabel = styled.span(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n\tbackground: ", ";\n\tcolor: ", ";\n\tborder-radius: ", ";\n\tpadding: 0 ", ";\n\twidth: fit-content;\n\tfont-weight: ", ";\n\ttext-transform: uppercase;\n\n\tfont-size: 12px;\n\tmargin: ", " 0 ", " 0;\n\tline-height: ", "em;\n"])), appLabelBgColor, appLabelTextColor, borderRadius(), "var(--ds-space-075, 6px)", "var(--ds-font-weight-bold, 700)", "var(--ds-space-050, 4px)", "var(--ds-space-150, 12px)", 24 / 14);
82
+ export var AppTitleLabel = styled.span(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n\tbackground: ", ";\n\tcolor: ", ";\n\tborder-radius: ", ";\n\tpadding: 0 ", ";\n\twidth: fit-content;\n\tfont-weight: ", ";\n\ttext-transform: uppercase;\n\n\tfont: ", ";\n\tmargin: ", " 0 ", " 0;\n"])), appLabelBgColor, appLabelTextColor, borderRadius(), "var(--ds-space-075, 6px)", "var(--ds-font-weight-bold, 700)", "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)", "var(--ds-space-050, 4px)", "var(--ds-space-150, 12px)");
83
83
 
84
84
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
85
85
  export var SpinnerContainer = styled.div(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n\talign-items: center;\n\tdisplay: flex;\n\theight: ", "px;\n\tjustify-content: center;\n\tposition: relative;\n"])), gridSize() * 12);
@@ -95,7 +95,7 @@ export var CardContainer = styled.div(_templateObject19 || (_templateObject19 =
95
95
  });
96
96
 
97
97
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
98
- export var DetailsLabel = styled.div(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n\tdisplay: flex;\n\talign-items: center;\n\tline-height: 24px;\n\tfont-size: ", "px;\n\tmargin: ", " 0 0 0;\n\twhite-space: nowrap;\n\n\t& + & {\n\t\tmargin-top: ", ";\n\t}\n"])), gridSize() * 1.5, "var(--ds-space-200, 16px)", "var(--ds-space-025, 2px)");
98
+ export var DetailsLabel = styled.div(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n\tdisplay: flex;\n\talign-items: center;\n\tfont: ", ";\n\tmargin: ", " 0 0 0;\n\twhite-space: nowrap;\n\n\t& + & {\n\t\tmargin-top: ", ";\n\t}\n"])), "var(--ds-font-body-large, normal 400 16px/24px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)", "var(--ds-space-200, 16px)", "var(--ds-space-025, 2px)");
99
99
 
100
100
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
101
101
  export var DetailsLabelIcon = styled.dt(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n\tdisplay: flex;\n\tflex-shrink: 0;\n\tcolor: ", ";\n\twidth: ", ";\n\theight: ", ";\n\tpadding: ", ";\n\tvertical-align: top;\n\n\tsvg {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t}\n"])), labelIconColor, "var(--ds-space-200, 16px)", "var(--ds-space-200, 16px)", "var(--ds-space-050, 4px)");
@@ -3,8 +3,7 @@ var _templateObject;
3
3
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
4
4
  import styled from '@emotion/styled';
5
5
  import { N20, N200 } from '@atlaskit/theme/colors';
6
- import { borderRadius, gridSize } from '@atlaskit/theme/constants';
7
- import { h600 } from '@atlaskit/theme/typography';
6
+ import { borderRadius } from '@atlaskit/theme/constants';
8
7
  import { bgColor, teamHeaderBgColor } from './constants';
9
8
 
10
9
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
@@ -19,7 +18,7 @@ export var CardWrapper = styled.div({
19
18
  // 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
19
  borderRadius: "".concat(borderRadius(), "px"),
21
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
22
- width: "".concat(gridSize() * 40, "px"),
21
+ width: '320px',
23
22
  position: 'relative',
24
23
  WebkitFontSmoothing: 'antialiased',
25
24
  MozOsxFontSmoothing: 'grayscale'
@@ -28,16 +27,16 @@ export var CardWrapper = styled.div({
28
27
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
29
28
  export var TeamForbiddenErrorStateWrapper = styled.div({
30
29
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
31
- width: "".concat(gridSize() * 40, "px"),
30
+ width: '320px',
32
31
  position: 'relative'
33
32
  });
34
33
 
35
34
  // eslint-disable-next-line @atlaskit/design-system/no-styled-tagged-template-expression, @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
36
- export var CardHeader = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tbackground-color: ", ";\n\tbackground-image: ", ";\n\tbackground-repeat: no-repeat;\n\tbackground-position: center;\n\tbackground-size: cover;\n\tbox-sizing: content-box;\n\theight: ", "px;\n"])), function (props) {
35
+ export var CardHeader = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tbackground-color: ", ";\n\tbackground-image: ", ";\n\tbackground-repeat: no-repeat;\n\tbackground-position: center;\n\tbackground-size: cover;\n\tbox-sizing: content-box;\n\theight: 128px;\n"])), function (props) {
37
36
  return props.isLoading ? "var(--ds-background-neutral, ".concat(N20, ")") : props.image ? '' : teamHeaderBgColor;
38
37
  }, function (props) {
39
38
  return props.image ? "url(".concat(props.image, ")") : '';
40
- }, gridSize() * 16);
39
+ });
41
40
 
42
41
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
43
42
  export var CardContent = styled.div({
@@ -45,11 +44,12 @@ export var CardContent = styled.div({
45
44
  flexDirection: 'column',
46
45
  padding: "var(--ds-space-300, 24px)",
47
46
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
48
- minHeight: "".concat(gridSize() * 13, "px")
47
+ minHeight: '104px'
49
48
  });
50
49
 
51
50
  // 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
52
- export var TeamName = styled.h6(h600, {
51
+ export var TeamName = styled.h6({
52
+ font: "var(--ds-font-heading-medium, normal 500 20px/24px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
53
53
  textTransform: 'none',
54
54
  overflow: 'hidden',
55
55
  maxHeight: '48px',
@@ -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.3"
42
+ packageVersion: "21.0.5"
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;
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/profilecard",
3
- "version": "21.0.3",
3
+ "version": "21.0.5",
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.16.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",
@@ -93,6 +93,7 @@
93
93
  "@testing-library/react": "^12.1.5",
94
94
  "@testing-library/react-hooks": "^8.0.1",
95
95
  "@testing-library/user-event": "^14.4.3",
96
+ "@types/react-router-dom": "^4.3.1",
96
97
  "enzyme": "^3.10.0",
97
98
  "es6-promise": "^4.0.5",
98
99
  "fetch-mock": "^8.0.0",
@@ -124,6 +125,9 @@
124
125
  "enable_agent_profile_card": {
125
126
  "type": "boolean"
126
127
  },
128
+ "enable_ptc_townsquare_reporting_lines_unsharded": {
129
+ "type": "boolean"
130
+ },
127
131
  "rovo_use_agent_permissions": {
128
132
  "type": "boolean"
129
133
  },