@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
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/profilecard
|
|
2
2
|
|
|
3
|
+
## 25.7.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`6161128d5fe36`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6161128d5fe36) -
|
|
8
|
+
Cleanup feature gate `jira_ai_profilecard_hide_agent_actions`.
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 25.7.5
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -66,47 +66,47 @@ var ProfileCardClient = /*#__PURE__*/function () {
|
|
|
66
66
|
value: function () {
|
|
67
67
|
var _getTeamCentralBaseUrl = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(teamCentralScopes) {
|
|
68
68
|
var isGlobalExperienceWorkspace, suffix, orgId;
|
|
69
|
-
return _regenerator.default.wrap(function
|
|
69
|
+
return _regenerator.default.wrap(function (_context) {
|
|
70
70
|
while (1) switch (_context.prev = _context.next) {
|
|
71
71
|
case 0:
|
|
72
72
|
if (!(this.tcClient === undefined)) {
|
|
73
|
-
_context.next =
|
|
73
|
+
_context.next = 1;
|
|
74
74
|
break;
|
|
75
75
|
}
|
|
76
76
|
return _context.abrupt("return", Promise.resolve(undefined));
|
|
77
|
-
case
|
|
78
|
-
_context.next =
|
|
77
|
+
case 1:
|
|
78
|
+
_context.next = 2;
|
|
79
79
|
return this.tcClient.getIsGlobalExperienceWorkspace();
|
|
80
|
-
case
|
|
80
|
+
case 2:
|
|
81
81
|
isGlobalExperienceWorkspace = _context.sent;
|
|
82
82
|
if (isGlobalExperienceWorkspace) {
|
|
83
|
-
_context.next =
|
|
83
|
+
_context.next = 3;
|
|
84
84
|
break;
|
|
85
85
|
}
|
|
86
86
|
return _context.abrupt("return", Promise.resolve((0, _atlassianContext.getATLContextUrl)('team')));
|
|
87
|
-
case
|
|
87
|
+
case 3:
|
|
88
88
|
suffix = '';
|
|
89
89
|
if (!(teamCentralScopes !== undefined)) {
|
|
90
|
-
_context.next =
|
|
90
|
+
_context.next = 6;
|
|
91
91
|
break;
|
|
92
92
|
}
|
|
93
|
-
_context.next =
|
|
93
|
+
_context.next = 4;
|
|
94
94
|
return this.tcClient.getOrgId();
|
|
95
|
-
case
|
|
95
|
+
case 4:
|
|
96
96
|
orgId = _context.sent;
|
|
97
97
|
if (!(orgId === null)) {
|
|
98
|
-
_context.next =
|
|
98
|
+
_context.next = 5;
|
|
99
99
|
break;
|
|
100
100
|
}
|
|
101
101
|
return _context.abrupt("return", Promise.resolve(undefined));
|
|
102
|
-
case
|
|
102
|
+
case 5:
|
|
103
103
|
suffix += "/o/".concat(orgId);
|
|
104
104
|
if (teamCentralScopes.withSiteContext) {
|
|
105
105
|
suffix += "/s/".concat(this.tcClient.options.cloudId);
|
|
106
106
|
}
|
|
107
|
-
case
|
|
107
|
+
case 6:
|
|
108
108
|
return _context.abrupt("return", Promise.resolve("".concat((0, _atlassianContext.getATLContextUrl)('home')).concat(suffix)));
|
|
109
|
-
case
|
|
109
|
+
case 7:
|
|
110
110
|
case "end":
|
|
111
111
|
return _context.stop();
|
|
112
112
|
}
|
|
@@ -121,27 +121,28 @@ var ProfileCardClient = /*#__PURE__*/function () {
|
|
|
121
121
|
key: "shouldShowGiveKudos",
|
|
122
122
|
value: function () {
|
|
123
123
|
var _shouldShowGiveKudos = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
124
|
-
|
|
124
|
+
var _t;
|
|
125
|
+
return _regenerator.default.wrap(function (_context2) {
|
|
125
126
|
while (1) switch (_context2.prev = _context2.next) {
|
|
126
127
|
case 0:
|
|
127
|
-
|
|
128
|
-
if (
|
|
129
|
-
_context2.next =
|
|
128
|
+
_t = !this.tcClient;
|
|
129
|
+
if (_t) {
|
|
130
|
+
_context2.next = 2;
|
|
130
131
|
break;
|
|
131
132
|
}
|
|
132
|
-
_context2.next =
|
|
133
|
+
_context2.next = 1;
|
|
133
134
|
return this.getTeamCentralBaseUrl();
|
|
134
|
-
case
|
|
135
|
-
|
|
136
|
-
case
|
|
137
|
-
if (!
|
|
138
|
-
_context2.next =
|
|
135
|
+
case 1:
|
|
136
|
+
_t = !_context2.sent;
|
|
137
|
+
case 2:
|
|
138
|
+
if (!_t) {
|
|
139
|
+
_context2.next = 3;
|
|
139
140
|
break;
|
|
140
141
|
}
|
|
141
142
|
return _context2.abrupt("return", Promise.resolve(false));
|
|
142
|
-
case
|
|
143
|
+
case 3:
|
|
143
144
|
return _context2.abrupt("return", this.tcClient.checkWorkspaceExists());
|
|
144
|
-
case
|
|
145
|
+
case 4:
|
|
145
146
|
case "end":
|
|
146
147
|
return _context2.stop();
|
|
147
148
|
}
|
|
@@ -91,15 +91,15 @@ var RovoAgentCardClient = exports.default = /*#__PURE__*/function (_CachingClien
|
|
|
91
91
|
var _getActivationId = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(cloudId, product) {
|
|
92
92
|
var _response$tenantConte, _response$tenantConte2;
|
|
93
93
|
var response;
|
|
94
|
-
return _regenerator.default.wrap(function
|
|
94
|
+
return _regenerator.default.wrap(function (_context) {
|
|
95
95
|
while (1) switch (_context.prev = _context.next) {
|
|
96
96
|
case 0:
|
|
97
|
-
_context.next =
|
|
97
|
+
_context.next = 1;
|
|
98
98
|
return (0, _graphqlUtils.AGGQuery)('/gateway/api/graphql', buildActivationIdQuery(cloudId, product));
|
|
99
|
-
case
|
|
99
|
+
case 1:
|
|
100
100
|
response = _context.sent;
|
|
101
101
|
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);
|
|
102
|
-
case
|
|
102
|
+
case 2:
|
|
103
103
|
case "end":
|
|
104
104
|
return _context.stop();
|
|
105
105
|
}
|
|
@@ -116,21 +116,21 @@ var RovoAgentCardClient = exports.default = /*#__PURE__*/function (_CachingClien
|
|
|
116
116
|
var _getAgentByARIAgg = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(agentAri) {
|
|
117
117
|
var _response$agentStudio;
|
|
118
118
|
var response;
|
|
119
|
-
return _regenerator.default.wrap(function
|
|
119
|
+
return _regenerator.default.wrap(function (_context2) {
|
|
120
120
|
while (1) switch (_context2.prev = _context2.next) {
|
|
121
121
|
case 0:
|
|
122
|
-
_context2.next =
|
|
122
|
+
_context2.next = 1;
|
|
123
123
|
return (0, _graphqlUtils.AGGQuery)('/gateway/api/graphql', buildRovoAgentQueryByAri(agentAri));
|
|
124
|
-
case
|
|
124
|
+
case 1:
|
|
125
125
|
response = _context2.sent;
|
|
126
126
|
if (!(((_response$agentStudio = response.agentStudio_agentById) === null || _response$agentStudio === void 0 ? void 0 : _response$agentStudio.__typename) === 'QueryError')) {
|
|
127
|
-
_context2.next =
|
|
127
|
+
_context2.next = 2;
|
|
128
128
|
break;
|
|
129
129
|
}
|
|
130
130
|
throw new Error("ProfileCard agentStudio_agentById returning QueryError: ".concat(response.agentStudio_agentById.message));
|
|
131
|
-
case
|
|
131
|
+
case 2:
|
|
132
132
|
return _context2.abrupt("return", response === null || response === void 0 ? void 0 : response.agentStudio_agentById);
|
|
133
|
-
case
|
|
133
|
+
case 3:
|
|
134
134
|
case "end":
|
|
135
135
|
return _context2.stop();
|
|
136
136
|
}
|
|
@@ -147,21 +147,21 @@ var RovoAgentCardClient = exports.default = /*#__PURE__*/function (_CachingClien
|
|
|
147
147
|
var _getAgentByAccountIdAgg = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(identityAccountId, cloudId) {
|
|
148
148
|
var _response$agentStudio2;
|
|
149
149
|
var response;
|
|
150
|
-
return _regenerator.default.wrap(function
|
|
150
|
+
return _regenerator.default.wrap(function (_context3) {
|
|
151
151
|
while (1) switch (_context3.prev = _context3.next) {
|
|
152
152
|
case 0:
|
|
153
|
-
_context3.next =
|
|
153
|
+
_context3.next = 1;
|
|
154
154
|
return (0, _graphqlUtils.AGGQuery)('/gateway/api/graphql', (0, _platformFeatureFlags.fg)('jira_ai_fix_agent_profile_card_flashing') ? buildRovoAgentQueryByAccountId(identityAccountId, cloudId) : buildRovoAgentQueryByAccountIdOld(identityAccountId, cloudId));
|
|
155
|
-
case
|
|
155
|
+
case 1:
|
|
156
156
|
response = _context3.sent;
|
|
157
157
|
if (!(((_response$agentStudio2 = response.agentStudio_agentByIdentityAccountId) === null || _response$agentStudio2 === void 0 ? void 0 : _response$agentStudio2.__typename) === 'QueryError')) {
|
|
158
|
-
_context3.next =
|
|
158
|
+
_context3.next = 2;
|
|
159
159
|
break;
|
|
160
160
|
}
|
|
161
161
|
throw new Error("ProfileCard agentStudio_agentByIdentityAccountId returning QueryError: ".concat(response.agentStudio_agentByIdentityAccountId.message));
|
|
162
|
-
case
|
|
162
|
+
case 2:
|
|
163
163
|
return _context3.abrupt("return", response === null || response === void 0 ? void 0 : response.agentStudio_agentByIdentityAccountId);
|
|
164
|
-
case
|
|
164
|
+
case 3:
|
|
165
165
|
case "end":
|
|
166
166
|
return _context3.stop();
|
|
167
167
|
}
|
|
@@ -340,7 +340,7 @@ var RovoAgentCardClient = exports.default = /*#__PURE__*/function (_CachingClien
|
|
|
340
340
|
return new Promise( /*#__PURE__*/function () {
|
|
341
341
|
var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(resolve, reject) {
|
|
342
342
|
var startTime, product, actionSubjectId, requestMethod, headers;
|
|
343
|
-
return _regenerator.default.wrap(function
|
|
343
|
+
return _regenerator.default.wrap(function (_context4) {
|
|
344
344
|
while (1) switch (_context4.prev = _context4.next) {
|
|
345
345
|
case 0:
|
|
346
346
|
startTime = (0, _performance.getPageTime)();
|
|
@@ -353,7 +353,7 @@ var RovoAgentCardClient = exports.default = /*#__PURE__*/function (_CachingClien
|
|
|
353
353
|
}, _analytics.PACKAGE_META_DATA));
|
|
354
354
|
}
|
|
355
355
|
headers = createHeaders(product, _this5.options.cloudId);
|
|
356
|
-
_context4.next =
|
|
356
|
+
_context4.next = 1;
|
|
357
357
|
return fetch(new Request("".concat(_this5.basePath(), "/").concat(agentId, "/favourite"), {
|
|
358
358
|
method: requestMethod,
|
|
359
359
|
credentials: 'include',
|
|
@@ -379,7 +379,7 @@ var RovoAgentCardClient = exports.default = /*#__PURE__*/function (_CachingClien
|
|
|
379
379
|
}
|
|
380
380
|
reject(error);
|
|
381
381
|
});
|
|
382
|
-
case
|
|
382
|
+
case 1:
|
|
383
383
|
case "end":
|
|
384
384
|
return _context4.stop();
|
|
385
385
|
}
|
|
@@ -125,22 +125,22 @@ var TeamCentralCardClient = /*#__PURE__*/function (_CachingClient) {
|
|
|
125
125
|
value: (function () {
|
|
126
126
|
var _makeRequest = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(userId) {
|
|
127
127
|
var query, response;
|
|
128
|
-
return _regenerator.default.wrap(function
|
|
128
|
+
return _regenerator.default.wrap(function (_context) {
|
|
129
129
|
while (1) switch (_context.prev = _context.next) {
|
|
130
130
|
case 0:
|
|
131
131
|
if (!(this.options.teamCentralDisabled === true)) {
|
|
132
|
-
_context.next =
|
|
132
|
+
_context.next = 1;
|
|
133
133
|
break;
|
|
134
134
|
}
|
|
135
135
|
throw new Error('makeRequest cannot be called when the client has been disabled');
|
|
136
|
-
case
|
|
136
|
+
case 1:
|
|
137
137
|
query = buildReportingLinesQuery(userId);
|
|
138
|
-
_context.next =
|
|
138
|
+
_context.next = 2;
|
|
139
139
|
return (0, _graphqlUtils.directoryGraphqlQuery)('/gateway/api/watermelon/graphql?operationName=ReportingLines', query);
|
|
140
|
-
case
|
|
140
|
+
case 2:
|
|
141
141
|
response = _context.sent;
|
|
142
142
|
return _context.abrupt("return", response.reportingLines);
|
|
143
|
-
case
|
|
143
|
+
case 3:
|
|
144
144
|
case "end":
|
|
145
145
|
return _context.stop();
|
|
146
146
|
}
|
|
@@ -156,7 +156,7 @@ var TeamCentralCardClient = /*#__PURE__*/function (_CachingClient) {
|
|
|
156
156
|
value: function () {
|
|
157
157
|
var _checkWorkspaceExists = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
158
158
|
var workspaceExistsPromise;
|
|
159
|
-
return _regenerator.default.wrap(function
|
|
159
|
+
return _regenerator.default.wrap(function (_context2) {
|
|
160
160
|
while (1) switch (_context2.prev = _context2.next) {
|
|
161
161
|
case 0:
|
|
162
162
|
workspaceExistsPromise = (0, _platformFeatureFlags.fg)('enable_ptc_townsquare_reporting_lines_unsharded') ? this.workspaceExistsWithTypePromise.then(function (workspaceExistsWithType) {
|
|
@@ -170,7 +170,7 @@ var TeamCentralCardClient = /*#__PURE__*/function (_CachingClient) {
|
|
|
170
170
|
}, function () {
|
|
171
171
|
return Promise.resolve(false);
|
|
172
172
|
}));
|
|
173
|
-
case
|
|
173
|
+
case 1:
|
|
174
174
|
case "end":
|
|
175
175
|
return _context2.stop();
|
|
176
176
|
}
|
|
@@ -185,15 +185,16 @@ var TeamCentralCardClient = /*#__PURE__*/function (_CachingClient) {
|
|
|
185
185
|
key: "getIsGlobalExperienceWorkspace",
|
|
186
186
|
value: function () {
|
|
187
187
|
var _getIsGlobalExperienceWorkspace = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
|
188
|
-
|
|
188
|
+
var _t;
|
|
189
|
+
return _regenerator.default.wrap(function (_context3) {
|
|
189
190
|
while (1) switch (_context3.prev = _context3.next) {
|
|
190
191
|
case 0:
|
|
191
|
-
_context3.next =
|
|
192
|
+
_context3.next = 1;
|
|
192
193
|
return this.workspaceExistsWithTypePromise;
|
|
194
|
+
case 1:
|
|
195
|
+
_t = _context3.sent;
|
|
196
|
+
return _context3.abrupt("return", _t === 'GLOBAL_EXPERIENCE');
|
|
193
197
|
case 2:
|
|
194
|
-
_context3.t0 = _context3.sent;
|
|
195
|
-
return _context3.abrupt("return", _context3.t0 === 'GLOBAL_EXPERIENCE');
|
|
196
|
-
case 4:
|
|
197
198
|
case "end":
|
|
198
199
|
return _context3.stop();
|
|
199
200
|
}
|
|
@@ -238,37 +239,37 @@ var TeamCentralCardClient = /*#__PURE__*/function (_CachingClient) {
|
|
|
238
239
|
key: "getWorkspaceExistsWithType",
|
|
239
240
|
value: function () {
|
|
240
241
|
var _getWorkspaceExistsWithType = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(cloudId) {
|
|
241
|
-
var response, workspaceType;
|
|
242
|
-
return _regenerator.default.wrap(function
|
|
242
|
+
var response, workspaceType, _t2;
|
|
243
|
+
return _regenerator.default.wrap(function (_context4) {
|
|
243
244
|
while (1) switch (_context4.prev = _context4.next) {
|
|
244
245
|
case 0:
|
|
245
246
|
_context4.prev = 0;
|
|
246
|
-
_context4.next =
|
|
247
|
+
_context4.next = 1;
|
|
247
248
|
return fetch("".concat(this.getShardedApiPath(cloudId), "/workspace/existsWithWorkspaceType?cloudId=").concat(cloudId), {
|
|
248
249
|
credentials: 'include'
|
|
249
250
|
});
|
|
250
|
-
case
|
|
251
|
+
case 1:
|
|
251
252
|
response = _context4.sent;
|
|
252
253
|
if (!response.ok) {
|
|
253
|
-
_context4.next =
|
|
254
|
+
_context4.next = 3;
|
|
254
255
|
break;
|
|
255
256
|
}
|
|
256
|
-
_context4.next =
|
|
257
|
+
_context4.next = 2;
|
|
257
258
|
return response.text();
|
|
258
|
-
case
|
|
259
|
+
case 2:
|
|
259
260
|
workspaceType = _context4.sent;
|
|
260
261
|
return _context4.abrupt("return", workspaceType);
|
|
261
|
-
case
|
|
262
|
+
case 3:
|
|
262
263
|
return _context4.abrupt("return", undefined);
|
|
263
|
-
case
|
|
264
|
-
_context4.prev =
|
|
265
|
-
|
|
264
|
+
case 4:
|
|
265
|
+
_context4.prev = 4;
|
|
266
|
+
_t2 = _context4["catch"](0);
|
|
266
267
|
return _context4.abrupt("return", undefined);
|
|
267
|
-
case
|
|
268
|
+
case 5:
|
|
268
269
|
case "end":
|
|
269
270
|
return _context4.stop();
|
|
270
271
|
}
|
|
271
|
-
}, _callee4, this, [[0,
|
|
272
|
+
}, _callee4, this, [[0, 4]]);
|
|
272
273
|
}));
|
|
273
274
|
function getWorkspaceExistsWithType(_x2) {
|
|
274
275
|
return _getWorkspaceExistsWithType.apply(this, arguments);
|
|
@@ -71,17 +71,17 @@ var buildAggUserQuery = exports.buildAggUserQuery = function buildAggUserQuery(u
|
|
|
71
71
|
var queryAGGUser = /*#__PURE__*/function () {
|
|
72
72
|
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(url, userId) {
|
|
73
73
|
var query, _yield$AGGQuery, user;
|
|
74
|
-
return _regenerator.default.wrap(function
|
|
74
|
+
return _regenerator.default.wrap(function (_context) {
|
|
75
75
|
while (1) switch (_context.prev = _context.next) {
|
|
76
76
|
case 0:
|
|
77
77
|
query = buildAggUserQuery(userId);
|
|
78
|
-
_context.next =
|
|
78
|
+
_context.next = 1;
|
|
79
79
|
return (0, _graphqlUtils.AGGQuery)(url, query);
|
|
80
|
-
case
|
|
80
|
+
case 1:
|
|
81
81
|
_yield$AGGQuery = _context.sent;
|
|
82
82
|
user = _yield$AGGQuery.user;
|
|
83
83
|
return _context.abrupt("return", user);
|
|
84
|
-
case
|
|
84
|
+
case 2:
|
|
85
85
|
case "end":
|
|
86
86
|
return _context.stop();
|
|
87
87
|
}
|
|
@@ -106,15 +106,15 @@ var UserProfileCardClient = exports.default = /*#__PURE__*/function (_CachingCli
|
|
|
106
106
|
var _makeRequest = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(_cloudId, userId) {
|
|
107
107
|
var _user$extendedProfile, _user$extendedProfile2, _user$extendedProfile3, _user$extendedProfile4, _user$extendedProfile5;
|
|
108
108
|
var gatewayGraphqlUrl, urlWithOperationName, userQueryPromise, user, timestring, localWeekdayIndex, timeFormat;
|
|
109
|
-
return _regenerator.default.wrap(function
|
|
109
|
+
return _regenerator.default.wrap(function (_context2) {
|
|
110
110
|
while (1) switch (_context2.prev = _context2.next) {
|
|
111
111
|
case 0:
|
|
112
112
|
gatewayGraphqlUrl = this.options.gatewayGraphqlUrl || '/gateway/api/graphql';
|
|
113
113
|
urlWithOperationName = "".concat(gatewayGraphqlUrl, "?operationName=aggUserQuery");
|
|
114
114
|
userQueryPromise = queryAGGUser(urlWithOperationName, userId);
|
|
115
|
-
_context2.next =
|
|
115
|
+
_context2.next = 1;
|
|
116
116
|
return userQueryPromise;
|
|
117
|
-
case
|
|
117
|
+
case 1:
|
|
118
118
|
user = _context2.sent;
|
|
119
119
|
localWeekdayIndex = new Date().getDay().toString();
|
|
120
120
|
timeFormat = 'h:mmaaa';
|
|
@@ -140,7 +140,7 @@ var UserProfileCardClient = exports.default = /*#__PURE__*/function (_CachingCli
|
|
|
140
140
|
companyName: (_user$extendedProfile5 = user.extendedProfile) === null || _user$extendedProfile5 === void 0 ? void 0 : _user$extendedProfile5.organization,
|
|
141
141
|
timestring: timestring
|
|
142
142
|
}));
|
|
143
|
-
case
|
|
143
|
+
case 2:
|
|
144
144
|
case "end":
|
|
145
145
|
return _context2.stop();
|
|
146
146
|
}
|
|
@@ -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', "25.7.
|
|
14
|
+
headers.append('atl-client-version', "25.7.5");
|
|
15
15
|
return headers;
|
|
16
16
|
};
|
|
17
17
|
function getOrgIdForCloudIdFromAGG(_x, _x2) {
|
|
@@ -19,8 +19,8 @@ function getOrgIdForCloudIdFromAGG(_x, _x2) {
|
|
|
19
19
|
}
|
|
20
20
|
function _getOrgIdForCloudIdFromAGG() {
|
|
21
21
|
_getOrgIdForCloudIdFromAGG = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(url, cloudId) {
|
|
22
|
-
var query, _yield$AGGQuery, tenantContexts;
|
|
23
|
-
return _regenerator.default.wrap(function
|
|
22
|
+
var query, _yield$AGGQuery, tenantContexts, _t;
|
|
23
|
+
return _regenerator.default.wrap(function (_context) {
|
|
24
24
|
while (1) switch (_context.prev = _context.next) {
|
|
25
25
|
case 0:
|
|
26
26
|
query = {
|
|
@@ -30,27 +30,27 @@ function _getOrgIdForCloudIdFromAGG() {
|
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
32
|
_context.prev = 1;
|
|
33
|
-
_context.next =
|
|
33
|
+
_context.next = 2;
|
|
34
34
|
return (0, _graphqlUtils.AGGQuery)(url, query, addHeaders);
|
|
35
|
-
case
|
|
35
|
+
case 2:
|
|
36
36
|
_yield$AGGQuery = _context.sent;
|
|
37
37
|
tenantContexts = _yield$AGGQuery.tenantContexts;
|
|
38
38
|
if (!(!tenantContexts || tenantContexts.length === 0 || tenantContexts[0] === null)) {
|
|
39
|
-
_context.next =
|
|
39
|
+
_context.next = 3;
|
|
40
40
|
break;
|
|
41
41
|
}
|
|
42
42
|
return _context.abrupt("return", null);
|
|
43
|
-
case
|
|
43
|
+
case 3:
|
|
44
44
|
return _context.abrupt("return", tenantContexts[0].orgId);
|
|
45
|
-
case
|
|
46
|
-
_context.prev =
|
|
47
|
-
|
|
45
|
+
case 4:
|
|
46
|
+
_context.prev = 4;
|
|
47
|
+
_t = _context["catch"](1);
|
|
48
48
|
return _context.abrupt("return", null);
|
|
49
|
-
case
|
|
49
|
+
case 5:
|
|
50
50
|
case "end":
|
|
51
51
|
return _context.stop();
|
|
52
52
|
}
|
|
53
|
-
}, _callee, null, [[1,
|
|
53
|
+
}, _callee, null, [[1, 4]]);
|
|
54
54
|
}));
|
|
55
55
|
return _getOrgIdForCloudIdFromAGG.apply(this, arguments);
|
|
56
56
|
}
|
|
@@ -66,7 +66,7 @@ var addHeaders = exports.addHeaders = function addHeaders(headers) {
|
|
|
66
66
|
headers.append('X-ExperimentalApi', 'teams-beta');
|
|
67
67
|
headers.append('X-ExperimentalApi', 'team-members-beta');
|
|
68
68
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
69
|
-
headers.append('atl-client-version', "25.7.
|
|
69
|
+
headers.append('atl-client-version', "25.7.5");
|
|
70
70
|
return headers;
|
|
71
71
|
};
|
|
72
72
|
function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -75,20 +75,20 @@ function getTeamFromAGG(_x, _x2, _x3) {
|
|
|
75
75
|
function _getTeamFromAGG() {
|
|
76
76
|
_getTeamFromAGG = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(url, teamId, siteId) {
|
|
77
77
|
var query, _yield$AGGQuery, Team;
|
|
78
|
-
return _regenerator.default.wrap(function
|
|
78
|
+
return _regenerator.default.wrap(function (_context) {
|
|
79
79
|
while (1) switch (_context.prev = _context.next) {
|
|
80
80
|
case 0:
|
|
81
81
|
query = buildGatewayQuery({
|
|
82
82
|
teamId: teamId,
|
|
83
83
|
siteId: siteId
|
|
84
84
|
});
|
|
85
|
-
_context.next =
|
|
85
|
+
_context.next = 1;
|
|
86
86
|
return (0, _graphqlUtils.AGGQuery)(url, query, addHeaders);
|
|
87
|
-
case
|
|
87
|
+
case 1:
|
|
88
88
|
_yield$AGGQuery = _context.sent;
|
|
89
89
|
Team = _yield$AGGQuery.Team;
|
|
90
90
|
return _context.abrupt("return", convertTeam(Team));
|
|
91
|
-
case
|
|
91
|
+
case 2:
|
|
92
92
|
case "end":
|
|
93
93
|
return _context.stop();
|
|
94
94
|
}
|
|
@@ -36,12 +36,12 @@ function _directoryGraphqlQuery() {
|
|
|
36
36
|
_directoryGraphqlQuery = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(serviceUrl, query) {
|
|
37
37
|
var processHeaders,
|
|
38
38
|
_args = arguments;
|
|
39
|
-
return _regenerator.default.wrap(function
|
|
39
|
+
return _regenerator.default.wrap(function (_context) {
|
|
40
40
|
while (1) switch (_context.prev = _context.next) {
|
|
41
41
|
case 0:
|
|
42
42
|
processHeaders = _args.length > 2 && _args[2] !== undefined ? _args[2] : id;
|
|
43
43
|
return _context.abrupt("return", graphQLQuery(serviceUrl, query, processHeaders, _errorUtils.handleDirectoryGraphQLErrors));
|
|
44
|
-
case
|
|
44
|
+
case 1:
|
|
45
45
|
case "end":
|
|
46
46
|
return _context.stop();
|
|
47
47
|
}
|
|
@@ -56,12 +56,12 @@ function _AGGQuery() {
|
|
|
56
56
|
_AGGQuery = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(serviceUrl, query) {
|
|
57
57
|
var processHeaders,
|
|
58
58
|
_args2 = arguments;
|
|
59
|
-
return _regenerator.default.wrap(function
|
|
59
|
+
return _regenerator.default.wrap(function (_context2) {
|
|
60
60
|
while (1) switch (_context2.prev = _context2.next) {
|
|
61
61
|
case 0:
|
|
62
62
|
processHeaders = _args2.length > 2 && _args2[2] !== undefined ? _args2[2] : id;
|
|
63
63
|
return _context2.abrupt("return", graphQLQuery(serviceUrl, query, processHeaders, _errorUtils.handleAGGErrors));
|
|
64
|
-
case
|
|
64
|
+
case 1:
|
|
65
65
|
case "end":
|
|
66
66
|
return _context2.stop();
|
|
67
67
|
}
|
|
@@ -84,13 +84,13 @@ function _graphQLQuery() {
|
|
|
84
84
|
_json$extensions$gate,
|
|
85
85
|
_json$extensions,
|
|
86
86
|
_args3 = arguments;
|
|
87
|
-
return _regenerator.default.wrap(function
|
|
87
|
+
return _regenerator.default.wrap(function (_context3) {
|
|
88
88
|
while (1) switch (_context3.prev = _context3.next) {
|
|
89
89
|
case 0:
|
|
90
90
|
processHeaders = _args3.length > 2 && _args3[2] !== undefined ? _args3[2] : id;
|
|
91
91
|
handleErrors = _args3.length > 3 ? _args3[3] : undefined;
|
|
92
92
|
headers = processHeaders(buildHeaders());
|
|
93
|
-
_context3.next =
|
|
93
|
+
_context3.next = 1;
|
|
94
94
|
return fetch(new Request(serviceUrl, {
|
|
95
95
|
method: 'POST',
|
|
96
96
|
credentials: 'include',
|
|
@@ -98,24 +98,24 @@ function _graphQLQuery() {
|
|
|
98
98
|
headers: headers,
|
|
99
99
|
body: JSON.stringify(query)
|
|
100
100
|
}));
|
|
101
|
-
case
|
|
101
|
+
case 1:
|
|
102
102
|
response = _context3.sent;
|
|
103
103
|
traceIdFromHeaders = response === null || response === void 0 || (_response$headers = response.headers) === null || _response$headers === void 0 ? void 0 : _response$headers.get('atl-traceid');
|
|
104
104
|
if (response.ok) {
|
|
105
|
-
_context3.next =
|
|
105
|
+
_context3.next = 2;
|
|
106
106
|
break;
|
|
107
107
|
}
|
|
108
108
|
throw new _errors.HttpError(response.status, response.statusText, traceIdFromHeaders);
|
|
109
|
-
case
|
|
110
|
-
_context3.next =
|
|
109
|
+
case 2:
|
|
110
|
+
_context3.next = 3;
|
|
111
111
|
return response.json();
|
|
112
|
-
case
|
|
112
|
+
case 3:
|
|
113
113
|
json = _context3.sent;
|
|
114
114
|
if (json.errors) {
|
|
115
115
|
handleErrors(json.errors, (_json$extensions$gate = (_json$extensions = json.extensions) === null || _json$extensions === void 0 || (_json$extensions = _json$extensions.gateway) === null || _json$extensions === void 0 ? void 0 : _json$extensions.request_id) !== null && _json$extensions$gate !== void 0 ? _json$extensions$gate : traceIdFromHeaders);
|
|
116
116
|
}
|
|
117
117
|
return _context3.abrupt("return", json.data);
|
|
118
|
-
case
|
|
118
|
+
case 4:
|
|
119
119
|
case "end":
|
|
120
120
|
return _context3.stop();
|
|
121
121
|
}
|
|
@@ -47,12 +47,12 @@ var AgentActions = exports.AgentActions = function AgentActions(_ref) {
|
|
|
47
47
|
var isForgeAgent = agent.creator_type === 'FORGE' || agent.creator_type === 'THIRD_PARTY';
|
|
48
48
|
var loadAgentPermissions = (0, _react.useCallback)( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
49
49
|
var _yield$resourceClient, _yield$resourceClient2, AGENT_CREATE, AGENT_UPDATE, AGENT_DEACTIVATE;
|
|
50
|
-
return _regenerator.default.wrap(function
|
|
50
|
+
return _regenerator.default.wrap(function (_context) {
|
|
51
51
|
while (1) switch (_context.prev = _context.next) {
|
|
52
52
|
case 0:
|
|
53
|
-
_context.next =
|
|
53
|
+
_context.next = 1;
|
|
54
54
|
return resourceClient.getRovoAgentPermissions(agent.id);
|
|
55
|
-
case
|
|
55
|
+
case 1:
|
|
56
56
|
_yield$resourceClient = _context.sent;
|
|
57
57
|
_yield$resourceClient2 = _yield$resourceClient.permissions;
|
|
58
58
|
AGENT_CREATE = _yield$resourceClient2.AGENT_CREATE;
|
|
@@ -63,7 +63,7 @@ var AgentActions = exports.AgentActions = function AgentActions(_ref) {
|
|
|
63
63
|
isEditEnabled: AGENT_UPDATE.permitted,
|
|
64
64
|
isDeleteEnabled: AGENT_DEACTIVATE.permitted
|
|
65
65
|
});
|
|
66
|
-
case
|
|
66
|
+
case 2:
|
|
67
67
|
case "end":
|
|
68
68
|
return _context.stop();
|
|
69
69
|
}
|
|
@@ -23,18 +23,18 @@ var AgentDeleteConfirmationModal = exports.AgentDeleteConfirmationModal = functi
|
|
|
23
23
|
var _useIntl = (0, _reactIntl.useIntl)(),
|
|
24
24
|
formatMessage = _useIntl.formatMessage;
|
|
25
25
|
var handleDeleteAgent = (0, _react.useCallback)( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
26
|
-
return _regenerator.default.wrap(function
|
|
26
|
+
return _regenerator.default.wrap(function (_context) {
|
|
27
27
|
while (1) switch (_context.prev = _context.next) {
|
|
28
28
|
case 0:
|
|
29
29
|
if (!agentId) {
|
|
30
|
-
_context.next =
|
|
30
|
+
_context.next = 2;
|
|
31
31
|
break;
|
|
32
32
|
}
|
|
33
|
-
_context.next =
|
|
33
|
+
_context.next = 1;
|
|
34
34
|
return onSubmit();
|
|
35
|
-
case
|
|
35
|
+
case 1:
|
|
36
36
|
onClose();
|
|
37
|
-
case
|
|
37
|
+
case 2:
|
|
38
38
|
case "end":
|
|
39
39
|
return _context.stop();
|
|
40
40
|
}
|