@atlaskit/profilecard 25.7.4 → 25.7.6

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 (42) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/client/ProfileCardClient.js +27 -26
  3. package/dist/cjs/client/RovoAgentCardClient.js +19 -19
  4. package/dist/cjs/client/TeamCentralCardClient.js +27 -26
  5. package/dist/cjs/client/UserProfileCardClient.js +8 -8
  6. package/dist/cjs/client/getOrgIdForCloudIdFromAGG.js +12 -12
  7. package/dist/cjs/client/getTeamFromAGG.js +5 -5
  8. package/dist/cjs/client/graphqlUtils.js +12 -12
  9. package/dist/cjs/components/Agent/Actions.js +4 -4
  10. package/dist/cjs/components/Agent/AgentDeleteConfirmationModal.js +5 -5
  11. package/dist/cjs/components/Agent/AgentProfileCard.js +28 -27
  12. package/dist/cjs/components/Agent/AgentProfileCardResourced.js +28 -28
  13. package/dist/cjs/components/Agent/AgentProfileCardTrigger.js +32 -32
  14. package/dist/cjs/components/Agent/hooks/duplicateFetch.js +36 -36
  15. package/dist/cjs/components/Agent/hooks/useAgentActions.js +14 -14
  16. package/dist/cjs/components/User/ProfileCardTrigger.js +16 -16
  17. package/dist/cjs/components/common/ProfileCardTrigger.js +2 -2
  18. package/dist/cjs/util/analytics.js +2 -2
  19. package/dist/cjs/util/useProfileInfo.js +11 -11
  20. package/dist/es2019/client/getOrgIdForCloudIdFromAGG.js +1 -1
  21. package/dist/es2019/client/getTeamFromAGG.js +1 -1
  22. package/dist/es2019/components/User/ProfileCardTrigger.js +1 -1
  23. package/dist/es2019/util/analytics.js +2 -2
  24. package/dist/esm/client/ProfileCardClient.js +27 -26
  25. package/dist/esm/client/RovoAgentCardClient.js +19 -19
  26. package/dist/esm/client/TeamCentralCardClient.js +27 -26
  27. package/dist/esm/client/UserProfileCardClient.js +8 -8
  28. package/dist/esm/client/getOrgIdForCloudIdFromAGG.js +12 -12
  29. package/dist/esm/client/getTeamFromAGG.js +5 -5
  30. package/dist/esm/client/graphqlUtils.js +12 -12
  31. package/dist/esm/components/Agent/Actions.js +4 -4
  32. package/dist/esm/components/Agent/AgentDeleteConfirmationModal.js +5 -5
  33. package/dist/esm/components/Agent/AgentProfileCard.js +27 -26
  34. package/dist/esm/components/Agent/AgentProfileCardResourced.js +27 -27
  35. package/dist/esm/components/Agent/AgentProfileCardTrigger.js +31 -31
  36. package/dist/esm/components/Agent/hooks/duplicateFetch.js +36 -36
  37. package/dist/esm/components/Agent/hooks/useAgentActions.js +14 -14
  38. package/dist/esm/components/User/ProfileCardTrigger.js +15 -15
  39. package/dist/esm/components/common/ProfileCardTrigger.js +2 -2
  40. package/dist/esm/util/analytics.js +2 -2
  41. package/dist/esm/util/useProfileInfo.js +11 -11
  42. package/package.json +6 -9
@@ -64,7 +64,7 @@ var useAgentUrlActions = exports.useAgentUrlActions = function useAgentUrlAction
64
64
  var onDuplicateAgent = (0, _react.useCallback)( /*#__PURE__*/function () {
65
65
  var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(agentId) {
66
66
  var legacyDuplicateUrl, hasVersionCapability, activationId, agentAri, result;
67
- return _regenerator.default.wrap(function _callee$(_context) {
67
+ return _regenerator.default.wrap(function (_context) {
68
68
  while (1) switch (_context.prev = _context.next) {
69
69
  case 0:
70
70
  fireEvent('ui.button.clicked.duplicateAgentButton', {
@@ -73,40 +73,40 @@ var useAgentUrlActions = exports.useAgentUrlActions = function useAgentUrlAction
73
73
  });
74
74
  legacyDuplicateUrl = (0, _utils.getAtlassianStudioAgentDuplicateUrl)(cloudId, agentId, email); // When versioning FG is off, use legacy duplicate flow
75
75
  if ((0, _platformFeatureFlags.fg)('rovo_agent_versioning_enabled')) {
76
- _context.next = 5;
76
+ _context.next = 1;
77
77
  break;
78
78
  }
79
79
  window.open(legacyDuplicateUrl, '_blank', 'noopener, noreferrer');
80
80
  return _context.abrupt("return");
81
- case 5:
82
- _context.next = 7;
81
+ case 1:
82
+ _context.next = 2;
83
83
  return (0, _duplicateFetch.fetchHasVersionCapability)(cloudId);
84
- case 7:
84
+ case 2:
85
85
  hasVersionCapability = _context.sent;
86
86
  if (hasVersionCapability) {
87
- _context.next = 11;
87
+ _context.next = 3;
88
88
  break;
89
89
  }
90
90
  // Opening in same tab because, we cannot open in new tab after async operation, because browsers prevent `.open` after certain duration
91
91
  window.location.assign(legacyDuplicateUrl);
92
92
  return _context.abrupt("return");
93
- case 11:
94
- _context.next = 13;
93
+ case 3:
94
+ _context.next = 4;
95
95
  return (0, _duplicateFetch.fetchActivationId)(cloudId);
96
- case 13:
96
+ case 4:
97
97
  activationId = _context.sent;
98
98
  if (activationId) {
99
- _context.next = 17;
99
+ _context.next = 5;
100
100
  break;
101
101
  }
102
102
  // Opening in same tab because, we cannot open in new tab after async operation, because browsers prevent `.open` after certain duration
103
103
  window.location.assign(legacyDuplicateUrl);
104
104
  return _context.abrupt("return");
105
- case 17:
105
+ case 5:
106
106
  agentAri = "ari:cloud:rovo::agent/activation/".concat(activationId, "/").concat(agentId); // Call BE mutation to duplicate the agent
107
- _context.next = 20;
107
+ _context.next = 6;
108
108
  return (0, _duplicateFetch.fetchDuplicateAgentMutation)(agentAri);
109
- case 20:
109
+ case 6:
110
110
  result = _context.sent;
111
111
  if (result.success && result.newAgentAri) {
112
112
  // Opening in same tab because, we cannot open in new tab after async operation, because browsers prevent `.open` after certain duration
@@ -116,7 +116,7 @@ var useAgentUrlActions = exports.useAgentUrlActions = function useAgentUrlAction
116
116
  // Opening in same tab because, we cannot open in new tab after async operation, because browsers prevent `.open` after certain duration
117
117
  window.location.assign(legacyDuplicateUrl);
118
118
  }
119
- case 22:
119
+ case 7:
120
120
  case "end":
121
121
  return _context.stop();
122
122
  }
@@ -32,7 +32,7 @@ var _lazyProfileCard = require("./lazyProfileCard");
32
32
  var _UserLoadingState = _interopRequireDefault(require("./UserLoadingState"));
33
33
  var _excluded = ["ref"],
34
34
  _excluded2 = ["aria-expanded", "aria-haspopup"];
35
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
35
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t2 in e) "default" !== _t2 && {}.hasOwnProperty.call(e, _t2) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t2)) && (i.get || i.set) ? o(f, _t2, i) : f[_t2] = e[_t2]); return f; })(e, t); }
36
36
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
37
37
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
38
38
  function ProfileCardContent(_ref) {
@@ -59,7 +59,7 @@ function ProfileCardContent(_ref) {
59
59
  onChatClick: agentActions === null || agentActions === void 0 ? void 0 : agentActions.onChatClick,
60
60
  onConversationStartersClick: agentActions === null || agentActions === void 0 ? void 0 : agentActions.onConversationStartersClick,
61
61
  addFlag: addFlag,
62
- hideMoreActions: (0, _platformFeatureFlags.fg)('jira_ai_profilecard_hide_agent_actions') && !!hideAgentMoreActions,
62
+ hideMoreActions: !!hideAgentMoreActions,
63
63
  hideConversationStarters: (0, _platformFeatureFlags.fg)('jira_ai_hide_conversation_starters_profilecard') && !!profilecardProps.hideAgentConversationStarters,
64
64
  hideAiDisclaimer: hideAiDisclaimer
65
65
  });
@@ -244,21 +244,21 @@ function ProfilecardTriggerNext(_ref2) {
244
244
  setError(err);
245
245
  }, [setHasError, setIsLoading, setError]);
246
246
  var clientFetchProfile = (0, _react.useCallback)( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
247
- var shouldHideReportingLines, requests, responses;
248
- return _regenerator.default.wrap(function _callee$(_context) {
247
+ var shouldHideReportingLines, requests, responses, _t;
248
+ return _regenerator.default.wrap(function (_context) {
249
249
  while (1) switch (_context.prev = _context.next) {
250
250
  case 0:
251
251
  if (!(isLoading === true)) {
252
- _context.next = 2;
252
+ _context.next = 1;
253
253
  break;
254
254
  }
255
255
  return _context.abrupt("return");
256
- case 2:
256
+ case 1:
257
257
  setIsLoading(true);
258
258
  setHasError(false);
259
259
  setError(null);
260
260
  setData(null);
261
- _context.prev = 6;
261
+ _context.prev = 2;
262
262
  shouldHideReportingLines = (0, _platformFeatureFlags.fg)('jira_ai_profilecard_hide_reportinglines') && hideReportingLines;
263
263
  requests = Promise.all([resourceClient.getProfile(cloudId || '', userId, fireAnalytics), shouldHideReportingLines ? Promise.resolve({
264
264
  managers: [],
@@ -267,22 +267,22 @@ function ProfilecardTriggerNext(_ref2) {
267
267
  withOrgContext: true,
268
268
  withSiteContext: true
269
269
  })]);
270
- _context.next = 11;
270
+ _context.next = 3;
271
271
  return requests;
272
- case 11:
272
+ case 3:
273
273
  responses = _context.sent;
274
274
  handleClientSuccess.apply(void 0, (0, _toConsumableArray2.default)(responses));
275
- _context.next = 18;
275
+ _context.next = 5;
276
276
  break;
277
- case 15:
278
- _context.prev = 15;
279
- _context.t0 = _context["catch"](6);
280
- handleClientError(_context.t0);
281
- case 18:
277
+ case 4:
278
+ _context.prev = 4;
279
+ _t = _context["catch"](2);
280
+ handleClientError(_t);
281
+ case 5:
282
282
  case "end":
283
283
  return _context.stop();
284
284
  }
285
- }, _callee, null, [[6, 15]]);
285
+ }, _callee, null, [[2, 4]]);
286
286
  })), [cloudId, fireAnalytics, isLoading, resourceClient, userId, handleClientSuccess, handleClientError, hideReportingLines]);
287
287
  var showProfilecard = (0, _react.useCallback)(function () {
288
288
  clearTimeout(hideTimer.current);
@@ -74,7 +74,7 @@ function ProfileCardTriggerInner(_ref, ref) {
74
74
  };
75
75
  }, [hideProfilecard]);
76
76
  var showProfilecard = (0, _react.useCallback)( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
77
- return _regenerator.default.wrap(function _callee$(_context) {
77
+ return _regenerator.default.wrap(function (_context) {
78
78
  while (1) switch (_context.prev = _context.next) {
79
79
  case 0:
80
80
  clearTimeout(hideTimer.current);
@@ -92,7 +92,7 @@ function ProfileCardTriggerInner(_ref, ref) {
92
92
  }
93
93
  }
94
94
  }, showDelay);
95
- case 3:
95
+ case 1:
96
96
  case "end":
97
97
  return _context.stop();
98
98
  }
@@ -12,7 +12,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
12
12
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
13
13
  var PACKAGE_META_DATA = exports.PACKAGE_META_DATA = {
14
14
  packageName: (_process$env$_PACKAGE = "@atlaskit/profilecard") !== null && _process$env$_PACKAGE !== void 0 ? _process$env$_PACKAGE : '',
15
- packageVersion: (_process$env$_PACKAGE2 = "25.7.3") !== null && _process$env$_PACKAGE2 !== void 0 ? _process$env$_PACKAGE2 : ''
15
+ packageVersion: (_process$env$_PACKAGE2 = "25.7.5") !== null && _process$env$_PACKAGE2 !== void 0 ? _process$env$_PACKAGE2 : ''
16
16
  };
17
17
  var TEAM_SUBJECT = 'teamProfileCard';
18
18
  var USER_SUBJECT = 'profilecard';
@@ -31,7 +31,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
31
31
  actionSubjectId: actionSubjectId,
32
32
  attributes: _objectSpread(_objectSpread({
33
33
  packageName: "@atlaskit/profilecard",
34
- packageVersion: "25.7.3"
34
+ packageVersion: "25.7.5"
35
35
  }, attributes), {}, {
36
36
  firedAt: Math.round((0, _performance.getPageTime)())
37
37
  })
@@ -25,30 +25,30 @@ var useProfileInfo = exports.useProfileInfo = function useProfileInfo(_ref) {
25
25
  setProfileData = _useState6[1];
26
26
  var getProfileData = /*#__PURE__*/function () {
27
27
  var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
28
- var _profileData;
29
- return _regenerator.default.wrap(function _callee$(_context) {
28
+ var _profileData, _t;
29
+ return _regenerator.default.wrap(function (_context) {
30
30
  while (1) switch (_context.prev = _context.next) {
31
31
  case 0:
32
32
  setIsLoading(true);
33
33
  _context.prev = 1;
34
- _context.next = 4;
34
+ _context.next = 2;
35
35
  return fetchUserProfile === null || fetchUserProfile === void 0 ? void 0 : fetchUserProfile();
36
- case 4:
36
+ case 2:
37
37
  _profileData = _context.sent;
38
38
  setProfileData(_profileData);
39
39
  setIsLoading(false);
40
- _context.next = 13;
40
+ _context.next = 4;
41
41
  break;
42
- case 9:
43
- _context.prev = 9;
44
- _context.t0 = _context["catch"](1);
45
- setError(_context.t0);
42
+ case 3:
43
+ _context.prev = 3;
44
+ _t = _context["catch"](1);
45
+ setError(_t);
46
46
  setIsLoading(false);
47
- case 13:
47
+ case 4:
48
48
  case "end":
49
49
  return _context.stop();
50
50
  }
51
- }, _callee, null, [[1, 9]]);
51
+ }, _callee, null, [[1, 3]]);
52
52
  }));
53
53
  return function getProfileData() {
54
54
  return _ref2.apply(this, arguments);
@@ -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', "25.7.3");
9
+ headers.append('atl-client-version', "25.7.5");
10
10
  return headers;
11
11
  };
12
12
  export async function getOrgIdForCloudIdFromAGG(url, cloudId) {
@@ -78,7 +78,7 @@ export const addHeaders = headers => {
78
78
  headers.append('X-ExperimentalApi', 'teams-beta');
79
79
  headers.append('X-ExperimentalApi', 'team-members-beta');
80
80
  headers.append('atl-client-name', "@atlaskit/profilecard");
81
- headers.append('atl-client-version', "25.7.3");
81
+ headers.append('atl-client-version', "25.7.5");
82
82
  return headers;
83
83
  };
84
84
  export async function getTeamFromAGG(url, teamId, siteId) {
@@ -41,7 +41,7 @@ function ProfileCardContent({
41
41
  onChatClick: agentActions === null || agentActions === void 0 ? void 0 : agentActions.onChatClick,
42
42
  onConversationStartersClick: agentActions === null || agentActions === void 0 ? void 0 : agentActions.onConversationStartersClick,
43
43
  addFlag: addFlag,
44
- hideMoreActions: fg('jira_ai_profilecard_hide_agent_actions') && !!hideAgentMoreActions,
44
+ hideMoreActions: !!hideAgentMoreActions,
45
45
  hideConversationStarters: fg('jira_ai_hide_conversation_starters_profilecard') && !!profilecardProps.hideAgentConversationStarters,
46
46
  hideAiDisclaimer: hideAiDisclaimer
47
47
  });
@@ -2,7 +2,7 @@ var _process$env$_PACKAGE, _process$env$_PACKAGE2;
2
2
  import { getPageTime } from './performance';
3
3
  export const PACKAGE_META_DATA = {
4
4
  packageName: (_process$env$_PACKAGE = "@atlaskit/profilecard") !== null && _process$env$_PACKAGE !== void 0 ? _process$env$_PACKAGE : '',
5
- packageVersion: (_process$env$_PACKAGE2 = "25.7.3") !== null && _process$env$_PACKAGE2 !== void 0 ? _process$env$_PACKAGE2 : ''
5
+ packageVersion: (_process$env$_PACKAGE2 = "25.7.5") !== null && _process$env$_PACKAGE2 !== void 0 ? _process$env$_PACKAGE2 : ''
6
6
  };
7
7
  const TEAM_SUBJECT = 'teamProfileCard';
8
8
  const USER_SUBJECT = 'profilecard';
@@ -19,7 +19,7 @@ const createEvent = (eventType, action, actionSubject, actionSubjectId, attribut
19
19
  actionSubjectId,
20
20
  attributes: {
21
21
  packageName: "@atlaskit/profilecard",
22
- packageVersion: "25.7.3",
22
+ packageVersion: "25.7.5",
23
23
  ...attributes,
24
24
  firedAt: Math.round(getPageTime())
25
25
  }
@@ -59,47 +59,47 @@ var ProfileCardClient = /*#__PURE__*/function () {
59
59
  value: function () {
60
60
  var _getTeamCentralBaseUrl = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(teamCentralScopes) {
61
61
  var isGlobalExperienceWorkspace, suffix, orgId;
62
- return _regeneratorRuntime.wrap(function _callee$(_context) {
62
+ return _regeneratorRuntime.wrap(function (_context) {
63
63
  while (1) switch (_context.prev = _context.next) {
64
64
  case 0:
65
65
  if (!(this.tcClient === undefined)) {
66
- _context.next = 2;
66
+ _context.next = 1;
67
67
  break;
68
68
  }
69
69
  return _context.abrupt("return", Promise.resolve(undefined));
70
- case 2:
71
- _context.next = 4;
70
+ case 1:
71
+ _context.next = 2;
72
72
  return this.tcClient.getIsGlobalExperienceWorkspace();
73
- case 4:
73
+ case 2:
74
74
  isGlobalExperienceWorkspace = _context.sent;
75
75
  if (isGlobalExperienceWorkspace) {
76
- _context.next = 7;
76
+ _context.next = 3;
77
77
  break;
78
78
  }
79
79
  return _context.abrupt("return", Promise.resolve(getATLContextUrl('team')));
80
- case 7:
80
+ case 3:
81
81
  suffix = '';
82
82
  if (!(teamCentralScopes !== undefined)) {
83
- _context.next = 16;
83
+ _context.next = 6;
84
84
  break;
85
85
  }
86
- _context.next = 11;
86
+ _context.next = 4;
87
87
  return this.tcClient.getOrgId();
88
- case 11:
88
+ case 4:
89
89
  orgId = _context.sent;
90
90
  if (!(orgId === null)) {
91
- _context.next = 14;
91
+ _context.next = 5;
92
92
  break;
93
93
  }
94
94
  return _context.abrupt("return", Promise.resolve(undefined));
95
- case 14:
95
+ case 5:
96
96
  suffix += "/o/".concat(orgId);
97
97
  if (teamCentralScopes.withSiteContext) {
98
98
  suffix += "/s/".concat(this.tcClient.options.cloudId);
99
99
  }
100
- case 16:
100
+ case 6:
101
101
  return _context.abrupt("return", Promise.resolve("".concat(getATLContextUrl('home')).concat(suffix)));
102
- case 17:
102
+ case 7:
103
103
  case "end":
104
104
  return _context.stop();
105
105
  }
@@ -114,27 +114,28 @@ var ProfileCardClient = /*#__PURE__*/function () {
114
114
  key: "shouldShowGiveKudos",
115
115
  value: function () {
116
116
  var _shouldShowGiveKudos = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
117
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
117
+ var _t;
118
+ return _regeneratorRuntime.wrap(function (_context2) {
118
119
  while (1) switch (_context2.prev = _context2.next) {
119
120
  case 0:
120
- _context2.t0 = !this.tcClient;
121
- if (_context2.t0) {
122
- _context2.next = 5;
121
+ _t = !this.tcClient;
122
+ if (_t) {
123
+ _context2.next = 2;
123
124
  break;
124
125
  }
125
- _context2.next = 4;
126
+ _context2.next = 1;
126
127
  return this.getTeamCentralBaseUrl();
127
- case 4:
128
- _context2.t0 = !_context2.sent;
129
- case 5:
130
- if (!_context2.t0) {
131
- _context2.next = 7;
128
+ case 1:
129
+ _t = !_context2.sent;
130
+ case 2:
131
+ if (!_t) {
132
+ _context2.next = 3;
132
133
  break;
133
134
  }
134
135
  return _context2.abrupt("return", Promise.resolve(false));
135
- case 7:
136
+ case 3:
136
137
  return _context2.abrupt("return", this.tcClient.checkWorkspaceExists());
137
- case 8:
138
+ case 4:
138
139
  case "end":
139
140
  return _context2.stop();
140
141
  }
@@ -84,15 +84,15 @@ var RovoAgentCardClient = /*#__PURE__*/function (_CachingClient) {
84
84
  var _getActivationId = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(cloudId, product) {
85
85
  var _response$tenantConte, _response$tenantConte2;
86
86
  var response;
87
- return _regeneratorRuntime.wrap(function _callee$(_context) {
87
+ return _regeneratorRuntime.wrap(function (_context) {
88
88
  while (1) switch (_context.prev = _context.next) {
89
89
  case 0:
90
- _context.next = 2;
90
+ _context.next = 1;
91
91
  return AGGQuery('/gateway/api/graphql', buildActivationIdQuery(cloudId, product));
92
- case 2:
92
+ case 1:
93
93
  response = _context.sent;
94
94
  return _context.abrupt("return", (_response$tenantConte = response === null || response === void 0 || (_response$tenantConte2 = response.tenantContexts) === null || _response$tenantConte2 === void 0 || (_response$tenantConte2 = _response$tenantConte2[0]) === null || _response$tenantConte2 === void 0 || (_response$tenantConte2 = _response$tenantConte2.activationIdByProduct) === null || _response$tenantConte2 === void 0 ? void 0 : _response$tenantConte2.active) !== null && _response$tenantConte !== void 0 ? _response$tenantConte : null);
95
- case 4:
95
+ case 2:
96
96
  case "end":
97
97
  return _context.stop();
98
98
  }
@@ -109,21 +109,21 @@ var RovoAgentCardClient = /*#__PURE__*/function (_CachingClient) {
109
109
  var _getAgentByARIAgg = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(agentAri) {
110
110
  var _response$agentStudio;
111
111
  var response;
112
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
112
+ return _regeneratorRuntime.wrap(function (_context2) {
113
113
  while (1) switch (_context2.prev = _context2.next) {
114
114
  case 0:
115
- _context2.next = 2;
115
+ _context2.next = 1;
116
116
  return AGGQuery('/gateway/api/graphql', buildRovoAgentQueryByAri(agentAri));
117
- case 2:
117
+ case 1:
118
118
  response = _context2.sent;
119
119
  if (!(((_response$agentStudio = response.agentStudio_agentById) === null || _response$agentStudio === void 0 ? void 0 : _response$agentStudio.__typename) === 'QueryError')) {
120
- _context2.next = 5;
120
+ _context2.next = 2;
121
121
  break;
122
122
  }
123
123
  throw new Error("ProfileCard agentStudio_agentById returning QueryError: ".concat(response.agentStudio_agentById.message));
124
- case 5:
124
+ case 2:
125
125
  return _context2.abrupt("return", response === null || response === void 0 ? void 0 : response.agentStudio_agentById);
126
- case 6:
126
+ case 3:
127
127
  case "end":
128
128
  return _context2.stop();
129
129
  }
@@ -140,21 +140,21 @@ var RovoAgentCardClient = /*#__PURE__*/function (_CachingClient) {
140
140
  var _getAgentByAccountIdAgg = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(identityAccountId, cloudId) {
141
141
  var _response$agentStudio2;
142
142
  var response;
143
- return _regeneratorRuntime.wrap(function _callee3$(_context3) {
143
+ return _regeneratorRuntime.wrap(function (_context3) {
144
144
  while (1) switch (_context3.prev = _context3.next) {
145
145
  case 0:
146
- _context3.next = 2;
146
+ _context3.next = 1;
147
147
  return AGGQuery('/gateway/api/graphql', fg('jira_ai_fix_agent_profile_card_flashing') ? buildRovoAgentQueryByAccountId(identityAccountId, cloudId) : buildRovoAgentQueryByAccountIdOld(identityAccountId, cloudId));
148
- case 2:
148
+ case 1:
149
149
  response = _context3.sent;
150
150
  if (!(((_response$agentStudio2 = response.agentStudio_agentByIdentityAccountId) === null || _response$agentStudio2 === void 0 ? void 0 : _response$agentStudio2.__typename) === 'QueryError')) {
151
- _context3.next = 5;
151
+ _context3.next = 2;
152
152
  break;
153
153
  }
154
154
  throw new Error("ProfileCard agentStudio_agentByIdentityAccountId returning QueryError: ".concat(response.agentStudio_agentByIdentityAccountId.message));
155
- case 5:
155
+ case 2:
156
156
  return _context3.abrupt("return", response === null || response === void 0 ? void 0 : response.agentStudio_agentByIdentityAccountId);
157
- case 6:
157
+ case 3:
158
158
  case "end":
159
159
  return _context3.stop();
160
160
  }
@@ -333,7 +333,7 @@ var RovoAgentCardClient = /*#__PURE__*/function (_CachingClient) {
333
333
  return new Promise( /*#__PURE__*/function () {
334
334
  var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(resolve, reject) {
335
335
  var startTime, product, actionSubjectId, requestMethod, headers;
336
- return _regeneratorRuntime.wrap(function _callee4$(_context4) {
336
+ return _regeneratorRuntime.wrap(function (_context4) {
337
337
  while (1) switch (_context4.prev = _context4.next) {
338
338
  case 0:
339
339
  startTime = getPageTime();
@@ -346,7 +346,7 @@ var RovoAgentCardClient = /*#__PURE__*/function (_CachingClient) {
346
346
  }, PACKAGE_META_DATA));
347
347
  }
348
348
  headers = createHeaders(product, _this5.options.cloudId);
349
- _context4.next = 8;
349
+ _context4.next = 1;
350
350
  return fetch(new Request("".concat(_this5.basePath(), "/").concat(agentId, "/favourite"), {
351
351
  method: requestMethod,
352
352
  credentials: 'include',
@@ -372,7 +372,7 @@ var RovoAgentCardClient = /*#__PURE__*/function (_CachingClient) {
372
372
  }
373
373
  reject(error);
374
374
  });
375
- case 8:
375
+ case 1:
376
376
  case "end":
377
377
  return _context4.stop();
378
378
  }
@@ -118,22 +118,22 @@ var TeamCentralCardClient = /*#__PURE__*/function (_CachingClient) {
118
118
  value: (function () {
119
119
  var _makeRequest = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(userId) {
120
120
  var query, response;
121
- return _regeneratorRuntime.wrap(function _callee$(_context) {
121
+ return _regeneratorRuntime.wrap(function (_context) {
122
122
  while (1) switch (_context.prev = _context.next) {
123
123
  case 0:
124
124
  if (!(this.options.teamCentralDisabled === true)) {
125
- _context.next = 2;
125
+ _context.next = 1;
126
126
  break;
127
127
  }
128
128
  throw new Error('makeRequest cannot be called when the client has been disabled');
129
- case 2:
129
+ case 1:
130
130
  query = buildReportingLinesQuery(userId);
131
- _context.next = 5;
131
+ _context.next = 2;
132
132
  return directoryGraphqlQuery('/gateway/api/watermelon/graphql?operationName=ReportingLines', query);
133
- case 5:
133
+ case 2:
134
134
  response = _context.sent;
135
135
  return _context.abrupt("return", response.reportingLines);
136
- case 7:
136
+ case 3:
137
137
  case "end":
138
138
  return _context.stop();
139
139
  }
@@ -149,7 +149,7 @@ var TeamCentralCardClient = /*#__PURE__*/function (_CachingClient) {
149
149
  value: function () {
150
150
  var _checkWorkspaceExists = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
151
151
  var workspaceExistsPromise;
152
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
152
+ return _regeneratorRuntime.wrap(function (_context2) {
153
153
  while (1) switch (_context2.prev = _context2.next) {
154
154
  case 0:
155
155
  workspaceExistsPromise = fg('enable_ptc_townsquare_reporting_lines_unsharded') ? this.workspaceExistsWithTypePromise.then(function (workspaceExistsWithType) {
@@ -163,7 +163,7 @@ var TeamCentralCardClient = /*#__PURE__*/function (_CachingClient) {
163
163
  }, function () {
164
164
  return Promise.resolve(false);
165
165
  }));
166
- case 2:
166
+ case 1:
167
167
  case "end":
168
168
  return _context2.stop();
169
169
  }
@@ -178,15 +178,16 @@ var TeamCentralCardClient = /*#__PURE__*/function (_CachingClient) {
178
178
  key: "getIsGlobalExperienceWorkspace",
179
179
  value: function () {
180
180
  var _getIsGlobalExperienceWorkspace = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
181
- return _regeneratorRuntime.wrap(function _callee3$(_context3) {
181
+ var _t;
182
+ return _regeneratorRuntime.wrap(function (_context3) {
182
183
  while (1) switch (_context3.prev = _context3.next) {
183
184
  case 0:
184
- _context3.next = 2;
185
+ _context3.next = 1;
185
186
  return this.workspaceExistsWithTypePromise;
187
+ case 1:
188
+ _t = _context3.sent;
189
+ return _context3.abrupt("return", _t === 'GLOBAL_EXPERIENCE');
186
190
  case 2:
187
- _context3.t0 = _context3.sent;
188
- return _context3.abrupt("return", _context3.t0 === 'GLOBAL_EXPERIENCE');
189
- case 4:
190
191
  case "end":
191
192
  return _context3.stop();
192
193
  }
@@ -231,37 +232,37 @@ var TeamCentralCardClient = /*#__PURE__*/function (_CachingClient) {
231
232
  key: "getWorkspaceExistsWithType",
232
233
  value: function () {
233
234
  var _getWorkspaceExistsWithType = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(cloudId) {
234
- var response, workspaceType;
235
- return _regeneratorRuntime.wrap(function _callee4$(_context4) {
235
+ var response, workspaceType, _t2;
236
+ return _regeneratorRuntime.wrap(function (_context4) {
236
237
  while (1) switch (_context4.prev = _context4.next) {
237
238
  case 0:
238
239
  _context4.prev = 0;
239
- _context4.next = 3;
240
+ _context4.next = 1;
240
241
  return fetch("".concat(this.getShardedApiPath(cloudId), "/workspace/existsWithWorkspaceType?cloudId=").concat(cloudId), {
241
242
  credentials: 'include'
242
243
  });
243
- case 3:
244
+ case 1:
244
245
  response = _context4.sent;
245
246
  if (!response.ok) {
246
- _context4.next = 9;
247
+ _context4.next = 3;
247
248
  break;
248
249
  }
249
- _context4.next = 7;
250
+ _context4.next = 2;
250
251
  return response.text();
251
- case 7:
252
+ case 2:
252
253
  workspaceType = _context4.sent;
253
254
  return _context4.abrupt("return", workspaceType);
254
- case 9:
255
+ case 3:
255
256
  return _context4.abrupt("return", undefined);
256
- case 12:
257
- _context4.prev = 12;
258
- _context4.t0 = _context4["catch"](0);
257
+ case 4:
258
+ _context4.prev = 4;
259
+ _t2 = _context4["catch"](0);
259
260
  return _context4.abrupt("return", undefined);
260
- case 15:
261
+ case 5:
261
262
  case "end":
262
263
  return _context4.stop();
263
264
  }
264
- }, _callee4, this, [[0, 12]]);
265
+ }, _callee4, this, [[0, 4]]);
265
266
  }));
266
267
  function getWorkspaceExistsWithType(_x2) {
267
268
  return _getWorkspaceExistsWithType.apply(this, arguments);