@atlaskit/profilecard 25.7.5 → 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.
- package/CHANGELOG.md +8 -0
- package/dist/cjs/client/ProfileCardClient.js +27 -26
- package/dist/cjs/client/RovoAgentCardClient.js +19 -19
- package/dist/cjs/client/TeamCentralCardClient.js +27 -26
- package/dist/cjs/client/UserProfileCardClient.js +8 -8
- package/dist/cjs/client/getOrgIdForCloudIdFromAGG.js +12 -12
- package/dist/cjs/client/getTeamFromAGG.js +5 -5
- package/dist/cjs/client/graphqlUtils.js +12 -12
- package/dist/cjs/components/Agent/Actions.js +4 -4
- package/dist/cjs/components/Agent/AgentDeleteConfirmationModal.js +5 -5
- package/dist/cjs/components/Agent/AgentProfileCard.js +28 -27
- package/dist/cjs/components/Agent/AgentProfileCardResourced.js +28 -28
- package/dist/cjs/components/Agent/AgentProfileCardTrigger.js +32 -32
- package/dist/cjs/components/Agent/hooks/duplicateFetch.js +36 -36
- package/dist/cjs/components/Agent/hooks/useAgentActions.js +14 -14
- package/dist/cjs/components/User/ProfileCardTrigger.js +16 -16
- package/dist/cjs/components/common/ProfileCardTrigger.js +2 -2
- package/dist/cjs/util/analytics.js +2 -2
- package/dist/cjs/util/useProfileInfo.js +11 -11
- package/dist/es2019/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/es2019/client/getTeamFromAGG.js +1 -1
- package/dist/es2019/components/User/ProfileCardTrigger.js +1 -1
- package/dist/es2019/util/analytics.js +2 -2
- package/dist/esm/client/ProfileCardClient.js +27 -26
- package/dist/esm/client/RovoAgentCardClient.js +19 -19
- package/dist/esm/client/TeamCentralCardClient.js +27 -26
- package/dist/esm/client/UserProfileCardClient.js +8 -8
- package/dist/esm/client/getOrgIdForCloudIdFromAGG.js +12 -12
- package/dist/esm/client/getTeamFromAGG.js +5 -5
- package/dist/esm/client/graphqlUtils.js +12 -12
- package/dist/esm/components/Agent/Actions.js +4 -4
- package/dist/esm/components/Agent/AgentDeleteConfirmationModal.js +5 -5
- package/dist/esm/components/Agent/AgentProfileCard.js +27 -26
- package/dist/esm/components/Agent/AgentProfileCardResourced.js +27 -27
- package/dist/esm/components/Agent/AgentProfileCardTrigger.js +31 -31
- package/dist/esm/components/Agent/hooks/duplicateFetch.js +36 -36
- package/dist/esm/components/Agent/hooks/useAgentActions.js +14 -14
- package/dist/esm/components/User/ProfileCardTrigger.js +15 -15
- package/dist/esm/components/common/ProfileCardTrigger.js +2 -2
- package/dist/esm/util/analytics.js +2 -2
- package/dist/esm/util/useProfileInfo.js +11 -11
- package/package.json +3 -6
|
@@ -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
|
|
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 =
|
|
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
|
|
82
|
-
_context.next =
|
|
81
|
+
case 1:
|
|
82
|
+
_context.next = 2;
|
|
83
83
|
return (0, _duplicateFetch.fetchHasVersionCapability)(cloudId);
|
|
84
|
-
case
|
|
84
|
+
case 2:
|
|
85
85
|
hasVersionCapability = _context.sent;
|
|
86
86
|
if (hasVersionCapability) {
|
|
87
|
-
_context.next =
|
|
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
|
|
94
|
-
_context.next =
|
|
93
|
+
case 3:
|
|
94
|
+
_context.next = 4;
|
|
95
95
|
return (0, _duplicateFetch.fetchActivationId)(cloudId);
|
|
96
|
-
case
|
|
96
|
+
case 4:
|
|
97
97
|
activationId = _context.sent;
|
|
98
98
|
if (activationId) {
|
|
99
|
-
_context.next =
|
|
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
|
|
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 =
|
|
107
|
+
_context.next = 6;
|
|
108
108
|
return (0, _duplicateFetch.fetchDuplicateAgentMutation)(agentAri);
|
|
109
|
-
case
|
|
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
|
|
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
|
|
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:
|
|
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
|
|
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 =
|
|
252
|
+
_context.next = 1;
|
|
253
253
|
break;
|
|
254
254
|
}
|
|
255
255
|
return _context.abrupt("return");
|
|
256
|
-
case
|
|
256
|
+
case 1:
|
|
257
257
|
setIsLoading(true);
|
|
258
258
|
setHasError(false);
|
|
259
259
|
setError(null);
|
|
260
260
|
setData(null);
|
|
261
|
-
_context.prev =
|
|
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 =
|
|
270
|
+
_context.next = 3;
|
|
271
271
|
return requests;
|
|
272
|
-
case
|
|
272
|
+
case 3:
|
|
273
273
|
responses = _context.sent;
|
|
274
274
|
handleClientSuccess.apply(void 0, (0, _toConsumableArray2.default)(responses));
|
|
275
|
-
_context.next =
|
|
275
|
+
_context.next = 5;
|
|
276
276
|
break;
|
|
277
|
-
case
|
|
278
|
-
_context.prev =
|
|
279
|
-
|
|
280
|
-
handleClientError(
|
|
281
|
-
case
|
|
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, [[
|
|
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
|
|
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
|
|
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.
|
|
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.
|
|
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
|
|
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 =
|
|
34
|
+
_context.next = 2;
|
|
35
35
|
return fetchUserProfile === null || fetchUserProfile === void 0 ? void 0 : fetchUserProfile();
|
|
36
|
-
case
|
|
36
|
+
case 2:
|
|
37
37
|
_profileData = _context.sent;
|
|
38
38
|
setProfileData(_profileData);
|
|
39
39
|
setIsLoading(false);
|
|
40
|
-
_context.next =
|
|
40
|
+
_context.next = 4;
|
|
41
41
|
break;
|
|
42
|
-
case
|
|
43
|
-
_context.prev =
|
|
44
|
-
|
|
45
|
-
setError(
|
|
42
|
+
case 3:
|
|
43
|
+
_context.prev = 3;
|
|
44
|
+
_t = _context["catch"](1);
|
|
45
|
+
setError(_t);
|
|
46
46
|
setIsLoading(false);
|
|
47
|
-
case
|
|
47
|
+
case 4:
|
|
48
48
|
case "end":
|
|
49
49
|
return _context.stop();
|
|
50
50
|
}
|
|
51
|
-
}, _callee, null, [[1,
|
|
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.
|
|
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.
|
|
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:
|
|
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.
|
|
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.
|
|
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
|
|
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 =
|
|
66
|
+
_context.next = 1;
|
|
67
67
|
break;
|
|
68
68
|
}
|
|
69
69
|
return _context.abrupt("return", Promise.resolve(undefined));
|
|
70
|
-
case
|
|
71
|
-
_context.next =
|
|
70
|
+
case 1:
|
|
71
|
+
_context.next = 2;
|
|
72
72
|
return this.tcClient.getIsGlobalExperienceWorkspace();
|
|
73
|
-
case
|
|
73
|
+
case 2:
|
|
74
74
|
isGlobalExperienceWorkspace = _context.sent;
|
|
75
75
|
if (isGlobalExperienceWorkspace) {
|
|
76
|
-
_context.next =
|
|
76
|
+
_context.next = 3;
|
|
77
77
|
break;
|
|
78
78
|
}
|
|
79
79
|
return _context.abrupt("return", Promise.resolve(getATLContextUrl('team')));
|
|
80
|
-
case
|
|
80
|
+
case 3:
|
|
81
81
|
suffix = '';
|
|
82
82
|
if (!(teamCentralScopes !== undefined)) {
|
|
83
|
-
_context.next =
|
|
83
|
+
_context.next = 6;
|
|
84
84
|
break;
|
|
85
85
|
}
|
|
86
|
-
_context.next =
|
|
86
|
+
_context.next = 4;
|
|
87
87
|
return this.tcClient.getOrgId();
|
|
88
|
-
case
|
|
88
|
+
case 4:
|
|
89
89
|
orgId = _context.sent;
|
|
90
90
|
if (!(orgId === null)) {
|
|
91
|
-
_context.next =
|
|
91
|
+
_context.next = 5;
|
|
92
92
|
break;
|
|
93
93
|
}
|
|
94
94
|
return _context.abrupt("return", Promise.resolve(undefined));
|
|
95
|
-
case
|
|
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
|
|
100
|
+
case 6:
|
|
101
101
|
return _context.abrupt("return", Promise.resolve("".concat(getATLContextUrl('home')).concat(suffix)));
|
|
102
|
-
case
|
|
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
|
-
|
|
117
|
+
var _t;
|
|
118
|
+
return _regeneratorRuntime.wrap(function (_context2) {
|
|
118
119
|
while (1) switch (_context2.prev = _context2.next) {
|
|
119
120
|
case 0:
|
|
120
|
-
|
|
121
|
-
if (
|
|
122
|
-
_context2.next =
|
|
121
|
+
_t = !this.tcClient;
|
|
122
|
+
if (_t) {
|
|
123
|
+
_context2.next = 2;
|
|
123
124
|
break;
|
|
124
125
|
}
|
|
125
|
-
_context2.next =
|
|
126
|
+
_context2.next = 1;
|
|
126
127
|
return this.getTeamCentralBaseUrl();
|
|
127
|
-
case
|
|
128
|
-
|
|
129
|
-
case
|
|
130
|
-
if (!
|
|
131
|
-
_context2.next =
|
|
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
|
|
136
|
+
case 3:
|
|
136
137
|
return _context2.abrupt("return", this.tcClient.checkWorkspaceExists());
|
|
137
|
-
case
|
|
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
|
|
87
|
+
return _regeneratorRuntime.wrap(function (_context) {
|
|
88
88
|
while (1) switch (_context.prev = _context.next) {
|
|
89
89
|
case 0:
|
|
90
|
-
_context.next =
|
|
90
|
+
_context.next = 1;
|
|
91
91
|
return AGGQuery('/gateway/api/graphql', buildActivationIdQuery(cloudId, product));
|
|
92
|
-
case
|
|
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
|
|
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
|
|
112
|
+
return _regeneratorRuntime.wrap(function (_context2) {
|
|
113
113
|
while (1) switch (_context2.prev = _context2.next) {
|
|
114
114
|
case 0:
|
|
115
|
-
_context2.next =
|
|
115
|
+
_context2.next = 1;
|
|
116
116
|
return AGGQuery('/gateway/api/graphql', buildRovoAgentQueryByAri(agentAri));
|
|
117
|
-
case
|
|
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 =
|
|
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
|
|
124
|
+
case 2:
|
|
125
125
|
return _context2.abrupt("return", response === null || response === void 0 ? void 0 : response.agentStudio_agentById);
|
|
126
|
-
case
|
|
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
|
|
143
|
+
return _regeneratorRuntime.wrap(function (_context3) {
|
|
144
144
|
while (1) switch (_context3.prev = _context3.next) {
|
|
145
145
|
case 0:
|
|
146
|
-
_context3.next =
|
|
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
|
|
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 =
|
|
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
|
|
155
|
+
case 2:
|
|
156
156
|
return _context3.abrupt("return", response === null || response === void 0 ? void 0 : response.agentStudio_agentByIdentityAccountId);
|
|
157
|
-
case
|
|
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
|
|
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 =
|
|
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
|
|
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
|
|
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 =
|
|
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
|
|
129
|
+
case 1:
|
|
130
130
|
query = buildReportingLinesQuery(userId);
|
|
131
|
-
_context.next =
|
|
131
|
+
_context.next = 2;
|
|
132
132
|
return directoryGraphqlQuery('/gateway/api/watermelon/graphql?operationName=ReportingLines', query);
|
|
133
|
-
case
|
|
133
|
+
case 2:
|
|
134
134
|
response = _context.sent;
|
|
135
135
|
return _context.abrupt("return", response.reportingLines);
|
|
136
|
-
case
|
|
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
|
|
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
|
|
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
|
-
|
|
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 =
|
|
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
|
|
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 =
|
|
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
|
|
244
|
+
case 1:
|
|
244
245
|
response = _context4.sent;
|
|
245
246
|
if (!response.ok) {
|
|
246
|
-
_context4.next =
|
|
247
|
+
_context4.next = 3;
|
|
247
248
|
break;
|
|
248
249
|
}
|
|
249
|
-
_context4.next =
|
|
250
|
+
_context4.next = 2;
|
|
250
251
|
return response.text();
|
|
251
|
-
case
|
|
252
|
+
case 2:
|
|
252
253
|
workspaceType = _context4.sent;
|
|
253
254
|
return _context4.abrupt("return", workspaceType);
|
|
254
|
-
case
|
|
255
|
+
case 3:
|
|
255
256
|
return _context4.abrupt("return", undefined);
|
|
256
|
-
case
|
|
257
|
-
_context4.prev =
|
|
258
|
-
|
|
257
|
+
case 4:
|
|
258
|
+
_context4.prev = 4;
|
|
259
|
+
_t2 = _context4["catch"](0);
|
|
259
260
|
return _context4.abrupt("return", undefined);
|
|
260
|
-
case
|
|
261
|
+
case 5:
|
|
261
262
|
case "end":
|
|
262
263
|
return _context4.stop();
|
|
263
264
|
}
|
|
264
|
-
}, _callee4, this, [[0,
|
|
265
|
+
}, _callee4, this, [[0, 4]]);
|
|
265
266
|
}));
|
|
266
267
|
function getWorkspaceExistsWithType(_x2) {
|
|
267
268
|
return _getWorkspaceExistsWithType.apply(this, arguments);
|