@atlaskit/profilecard 25.7.5 → 25.7.7
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 +14 -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/styled/Card.compiled.css +1 -1
- package/dist/cjs/styled/Card.js +1 -1
- 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/styled/Card.compiled.css +1 -1
- package/dist/es2019/styled/Card.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/styled/Card.compiled.css +1 -1
- package/dist/esm/styled/Card.js +1 -1
- package/dist/esm/util/analytics.js +2 -2
- package/dist/esm/util/useProfileInfo.js +11 -11
- package/package.json +7 -10
|
@@ -29,54 +29,54 @@ export var AgentProfileCardTrigger = /*#__PURE__*/forwardRef(function (_ref, ref
|
|
|
29
29
|
*/
|
|
30
30
|
var getCreator = /*#__PURE__*/function () {
|
|
31
31
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref2) {
|
|
32
|
-
var creator_type, creator, authoringTeam, _userId, _authoringTeam$displa, _authoringTeam$profil, _navigateToTeamsApp, profileHref, creatorInfo;
|
|
33
|
-
return _regeneratorRuntime.wrap(function
|
|
32
|
+
var creator_type, creator, authoringTeam, _userId, _authoringTeam$displa, _authoringTeam$profil, _navigateToTeamsApp, profileHref, creatorInfo, _t, _t2;
|
|
33
|
+
return _regeneratorRuntime.wrap(function (_context) {
|
|
34
34
|
while (1) switch (_context.prev = _context.next) {
|
|
35
35
|
case 0:
|
|
36
36
|
creator_type = _ref2.creator_type, creator = _ref2.creator, authoringTeam = _ref2.authoringTeam;
|
|
37
37
|
if (creator) {
|
|
38
|
-
_context.next =
|
|
38
|
+
_context.next = 1;
|
|
39
39
|
break;
|
|
40
40
|
}
|
|
41
41
|
return _context.abrupt("return", undefined);
|
|
42
|
-
case
|
|
42
|
+
case 1:
|
|
43
43
|
if (!(isForgeAgentByCreatorType(creator_type) && fg('rovo_agent_support_a2a_avatar'))) {
|
|
44
|
-
_context.next =
|
|
44
|
+
_context.next = 2;
|
|
45
45
|
break;
|
|
46
46
|
}
|
|
47
47
|
return _context.abrupt("return", {
|
|
48
48
|
type: 'THIRD_PARTY',
|
|
49
49
|
name: creator !== null && creator !== void 0 ? creator : ''
|
|
50
50
|
});
|
|
51
|
-
case
|
|
52
|
-
|
|
53
|
-
_context.next =
|
|
51
|
+
case 2:
|
|
52
|
+
_t = creator_type;
|
|
53
|
+
_context.next = _t === 'SYSTEM' ? 3 : _t === 'THIRD_PARTY' ? 4 : _t === 'FORGE' ? 5 : _t === 'CUSTOMER' ? 6 : 12;
|
|
54
54
|
break;
|
|
55
|
-
case
|
|
55
|
+
case 3:
|
|
56
56
|
return _context.abrupt("return", {
|
|
57
57
|
type: 'SYSTEM'
|
|
58
58
|
});
|
|
59
|
-
case
|
|
59
|
+
case 4:
|
|
60
60
|
return _context.abrupt("return", {
|
|
61
61
|
type: 'THIRD_PARTY',
|
|
62
62
|
name: creator !== null && creator !== void 0 ? creator : ''
|
|
63
63
|
});
|
|
64
|
-
case
|
|
64
|
+
case 5:
|
|
65
65
|
return _context.abrupt("return", {
|
|
66
66
|
type: 'THIRD_PARTY',
|
|
67
67
|
name: creator !== null && creator !== void 0 ? creator : ''
|
|
68
68
|
});
|
|
69
|
-
case
|
|
69
|
+
case 6:
|
|
70
70
|
_userId = getAAIDFromARI(creator) || '';
|
|
71
|
-
_context.prev =
|
|
71
|
+
_context.prev = 7;
|
|
72
72
|
if (!(!_userId || !cloudId)) {
|
|
73
|
-
_context.next =
|
|
73
|
+
_context.next = 8;
|
|
74
74
|
break;
|
|
75
75
|
}
|
|
76
76
|
return _context.abrupt("return", undefined);
|
|
77
|
-
case
|
|
77
|
+
case 8:
|
|
78
78
|
if (!authoringTeam) {
|
|
79
|
-
_context.next =
|
|
79
|
+
_context.next = 9;
|
|
80
80
|
break;
|
|
81
81
|
}
|
|
82
82
|
return _context.abrupt("return", {
|
|
@@ -84,7 +84,7 @@ export var AgentProfileCardTrigger = /*#__PURE__*/forwardRef(function (_ref, ref
|
|
|
84
84
|
name: (_authoringTeam$displa = authoringTeam.displayName) !== null && _authoringTeam$displa !== void 0 ? _authoringTeam$displa : '',
|
|
85
85
|
profileLink: (_authoringTeam$profil = authoringTeam.profileUrl) !== null && _authoringTeam$profil !== void 0 ? _authoringTeam$profil : ''
|
|
86
86
|
});
|
|
87
|
-
case
|
|
87
|
+
case 9:
|
|
88
88
|
_navigateToTeamsApp = navigateToTeamsApp({
|
|
89
89
|
type: 'USER',
|
|
90
90
|
payload: {
|
|
@@ -92,9 +92,9 @@ export var AgentProfileCardTrigger = /*#__PURE__*/forwardRef(function (_ref, ref
|
|
|
92
92
|
},
|
|
93
93
|
cloudId: cloudId
|
|
94
94
|
}), profileHref = _navigateToTeamsApp.href;
|
|
95
|
-
_context.next =
|
|
95
|
+
_context.next = 10;
|
|
96
96
|
return props.resourceClient.getProfile(cloudId, _userId, fireEvent);
|
|
97
|
-
case
|
|
97
|
+
case 10:
|
|
98
98
|
creatorInfo = _context.sent;
|
|
99
99
|
return _context.abrupt("return", {
|
|
100
100
|
type: 'CUSTOMER',
|
|
@@ -102,17 +102,17 @@ export var AgentProfileCardTrigger = /*#__PURE__*/forwardRef(function (_ref, ref
|
|
|
102
102
|
profileLink: fg('platform-adopt-teams-nav-config') ? profileHref : "/people/".concat(_userId),
|
|
103
103
|
id: _userId
|
|
104
104
|
});
|
|
105
|
-
case
|
|
106
|
-
_context.prev =
|
|
107
|
-
|
|
105
|
+
case 11:
|
|
106
|
+
_context.prev = 11;
|
|
107
|
+
_t2 = _context["catch"](7);
|
|
108
108
|
return _context.abrupt("return", undefined);
|
|
109
|
-
case
|
|
109
|
+
case 12:
|
|
110
110
|
return _context.abrupt("return", undefined);
|
|
111
|
-
case
|
|
111
|
+
case 13:
|
|
112
112
|
case "end":
|
|
113
113
|
return _context.stop();
|
|
114
114
|
}
|
|
115
|
-
}, _callee, null, [[
|
|
115
|
+
}, _callee, null, [[7, 11]]);
|
|
116
116
|
}));
|
|
117
117
|
return function getCreator(_x) {
|
|
118
118
|
return _ref3.apply(this, arguments);
|
|
@@ -122,29 +122,29 @@ export var AgentProfileCardTrigger = /*#__PURE__*/forwardRef(function (_ref, ref
|
|
|
122
122
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
123
123
|
var _agentProfileResult$a, _agentProfileResult$a2;
|
|
124
124
|
var agentProfileResult, agentInfo, agentCreatorInfo;
|
|
125
|
-
return _regeneratorRuntime.wrap(function
|
|
125
|
+
return _regeneratorRuntime.wrap(function (_context2) {
|
|
126
126
|
while (1) switch (_context2.prev = _context2.next) {
|
|
127
127
|
case 0:
|
|
128
|
-
_context2.next =
|
|
128
|
+
_context2.next = 1;
|
|
129
129
|
return resourceClient.getRovoAgentProfile({
|
|
130
130
|
type: agentIdType,
|
|
131
131
|
value: userId
|
|
132
132
|
}, fireEvent);
|
|
133
|
-
case
|
|
133
|
+
case 1:
|
|
134
134
|
agentProfileResult = _context2.sent;
|
|
135
135
|
agentInfo = agentProfileResult.restData;
|
|
136
|
-
_context2.next =
|
|
136
|
+
_context2.next = 2;
|
|
137
137
|
return getCreator({
|
|
138
138
|
creator_type: agentInfo.creator_type,
|
|
139
139
|
creator: agentInfo.creator || undefined,
|
|
140
140
|
authoringTeam: (_agentProfileResult$a = (_agentProfileResult$a2 = agentProfileResult.aggData) === null || _agentProfileResult$a2 === void 0 ? void 0 : _agentProfileResult$a2.authoringTeam) !== null && _agentProfileResult$a !== void 0 ? _agentProfileResult$a : undefined
|
|
141
141
|
});
|
|
142
|
-
case
|
|
142
|
+
case 2:
|
|
143
143
|
agentCreatorInfo = _context2.sent;
|
|
144
144
|
return _context2.abrupt("return", _objectSpread(_objectSpread({}, agentInfo), {}, {
|
|
145
145
|
creatorInfo: agentCreatorInfo
|
|
146
146
|
}));
|
|
147
|
-
case
|
|
147
|
+
case 3:
|
|
148
148
|
case "end":
|
|
149
149
|
return _context2.stop();
|
|
150
150
|
}
|
|
@@ -11,12 +11,12 @@ var GRAPHQL_ENDPOINT = '/gateway/api/graphql';
|
|
|
11
11
|
*/
|
|
12
12
|
export var fetchHasVersionCapability = /*#__PURE__*/function () {
|
|
13
13
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(cloudId) {
|
|
14
|
-
var _json$data, response, json, result;
|
|
15
|
-
return _regeneratorRuntime.wrap(function
|
|
14
|
+
var _json$data, response, json, result, _t;
|
|
15
|
+
return _regeneratorRuntime.wrap(function (_context) {
|
|
16
16
|
while (1) switch (_context.prev = _context.next) {
|
|
17
17
|
case 0:
|
|
18
18
|
_context.prev = 0;
|
|
19
|
-
_context.next =
|
|
19
|
+
_context.next = 1;
|
|
20
20
|
return fetch(GRAPHQL_ENDPOINT, {
|
|
21
21
|
method: 'POST',
|
|
22
22
|
credentials: 'include',
|
|
@@ -30,23 +30,23 @@ export var fetchHasVersionCapability = /*#__PURE__*/function () {
|
|
|
30
30
|
}
|
|
31
31
|
})
|
|
32
32
|
});
|
|
33
|
-
case
|
|
33
|
+
case 1:
|
|
34
34
|
response = _context.sent;
|
|
35
|
-
_context.next =
|
|
35
|
+
_context.next = 2;
|
|
36
36
|
return response.json();
|
|
37
|
-
case
|
|
37
|
+
case 2:
|
|
38
38
|
json = _context.sent;
|
|
39
39
|
result = json === null || json === void 0 || (_json$data = json.data) === null || _json$data === void 0 ? void 0 : _json$data.agentStudio_hasVersionCapability;
|
|
40
40
|
return _context.abrupt("return", (result === null || result === void 0 ? void 0 : result.__typename) === 'AgentStudioHasVersionCapability' ? Boolean(result.hasVersionCapability) : false);
|
|
41
|
-
case
|
|
42
|
-
_context.prev =
|
|
43
|
-
|
|
41
|
+
case 3:
|
|
42
|
+
_context.prev = 3;
|
|
43
|
+
_t = _context["catch"](0);
|
|
44
44
|
return _context.abrupt("return", false);
|
|
45
|
-
case
|
|
45
|
+
case 4:
|
|
46
46
|
case "end":
|
|
47
47
|
return _context.stop();
|
|
48
48
|
}
|
|
49
|
-
}, _callee, null, [[0,
|
|
49
|
+
}, _callee, null, [[0, 3]]);
|
|
50
50
|
}));
|
|
51
51
|
return function fetchHasVersionCapability(_x) {
|
|
52
52
|
return _ref.apply(this, arguments);
|
|
@@ -59,12 +59,12 @@ export var fetchHasVersionCapability = /*#__PURE__*/function () {
|
|
|
59
59
|
*/
|
|
60
60
|
export var fetchActivationId = /*#__PURE__*/function () {
|
|
61
61
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(cloudId) {
|
|
62
|
-
var _json$data$tenantCont, _json$data2, response, json;
|
|
63
|
-
return _regeneratorRuntime.wrap(function
|
|
62
|
+
var _json$data$tenantCont, _json$data2, response, json, _t2;
|
|
63
|
+
return _regeneratorRuntime.wrap(function (_context2) {
|
|
64
64
|
while (1) switch (_context2.prev = _context2.next) {
|
|
65
65
|
case 0:
|
|
66
66
|
_context2.prev = 0;
|
|
67
|
-
_context2.next =
|
|
67
|
+
_context2.next = 1;
|
|
68
68
|
return fetch(GRAPHQL_ENDPOINT, {
|
|
69
69
|
method: 'POST',
|
|
70
70
|
credentials: 'include',
|
|
@@ -79,22 +79,22 @@ export var fetchActivationId = /*#__PURE__*/function () {
|
|
|
79
79
|
}
|
|
80
80
|
})
|
|
81
81
|
});
|
|
82
|
-
case
|
|
82
|
+
case 1:
|
|
83
83
|
response = _context2.sent;
|
|
84
|
-
_context2.next =
|
|
84
|
+
_context2.next = 2;
|
|
85
85
|
return response.json();
|
|
86
|
-
case
|
|
86
|
+
case 2:
|
|
87
87
|
json = _context2.sent;
|
|
88
88
|
return _context2.abrupt("return", (_json$data$tenantCont = json === null || json === void 0 || (_json$data2 = json.data) === null || _json$data2 === void 0 || (_json$data2 = _json$data2.tenantContexts) === null || _json$data2 === void 0 || (_json$data2 = _json$data2[0]) === null || _json$data2 === void 0 || (_json$data2 = _json$data2.activationIdByProduct) === null || _json$data2 === void 0 ? void 0 : _json$data2.active) !== null && _json$data$tenantCont !== void 0 ? _json$data$tenantCont : null);
|
|
89
|
-
case
|
|
90
|
-
_context2.prev =
|
|
91
|
-
|
|
89
|
+
case 3:
|
|
90
|
+
_context2.prev = 3;
|
|
91
|
+
_t2 = _context2["catch"](0);
|
|
92
92
|
return _context2.abrupt("return", null);
|
|
93
|
-
case
|
|
93
|
+
case 4:
|
|
94
94
|
case "end":
|
|
95
95
|
return _context2.stop();
|
|
96
96
|
}
|
|
97
|
-
}, _callee2, null, [[0,
|
|
97
|
+
}, _callee2, null, [[0, 3]]);
|
|
98
98
|
}));
|
|
99
99
|
return function fetchActivationId(_x2) {
|
|
100
100
|
return _ref2.apply(this, arguments);
|
|
@@ -109,12 +109,12 @@ export var fetchActivationId = /*#__PURE__*/function () {
|
|
|
109
109
|
*/
|
|
110
110
|
export var fetchDuplicateAgentMutation = /*#__PURE__*/function () {
|
|
111
111
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(agentAri) {
|
|
112
|
-
var _json$data3, _result$agent, _result$errors$0$mess, _result$errors, response, json, result;
|
|
113
|
-
return _regeneratorRuntime.wrap(function
|
|
112
|
+
var _json$data3, _result$agent, _result$errors$0$mess, _result$errors, response, json, result, _t3;
|
|
113
|
+
return _regeneratorRuntime.wrap(function (_context3) {
|
|
114
114
|
while (1) switch (_context3.prev = _context3.next) {
|
|
115
115
|
case 0:
|
|
116
116
|
_context3.prev = 0;
|
|
117
|
-
_context3.next =
|
|
117
|
+
_context3.next = 1;
|
|
118
118
|
return fetch(GRAPHQL_ENDPOINT, {
|
|
119
119
|
method: 'POST',
|
|
120
120
|
credentials: 'include',
|
|
@@ -128,38 +128,38 @@ export var fetchDuplicateAgentMutation = /*#__PURE__*/function () {
|
|
|
128
128
|
}
|
|
129
129
|
})
|
|
130
130
|
});
|
|
131
|
-
case
|
|
131
|
+
case 1:
|
|
132
132
|
response = _context3.sent;
|
|
133
|
-
_context3.next =
|
|
133
|
+
_context3.next = 2;
|
|
134
134
|
return response.json();
|
|
135
|
-
case
|
|
135
|
+
case 2:
|
|
136
136
|
json = _context3.sent;
|
|
137
137
|
result = json === null || json === void 0 || (_json$data3 = json.data) === null || _json$data3 === void 0 ? void 0 : _json$data3.agentStudio_duplicateAgent;
|
|
138
138
|
if (!(result !== null && result !== void 0 && result.success && result !== null && result !== void 0 && (_result$agent = result.agent) !== null && _result$agent !== void 0 && _result$agent.id)) {
|
|
139
|
-
_context3.next =
|
|
139
|
+
_context3.next = 3;
|
|
140
140
|
break;
|
|
141
141
|
}
|
|
142
142
|
return _context3.abrupt("return", {
|
|
143
143
|
success: true,
|
|
144
144
|
newAgentAri: result.agent.id
|
|
145
145
|
});
|
|
146
|
-
case
|
|
146
|
+
case 3:
|
|
147
147
|
return _context3.abrupt("return", {
|
|
148
148
|
success: false,
|
|
149
149
|
errorMessage: (_result$errors$0$mess = result === null || result === void 0 || (_result$errors = result.errors) === null || _result$errors === void 0 || (_result$errors = _result$errors[0]) === null || _result$errors === void 0 ? void 0 : _result$errors.message) !== null && _result$errors$0$mess !== void 0 ? _result$errors$0$mess : 'Duplicate agent mutation failed'
|
|
150
150
|
});
|
|
151
|
-
case
|
|
152
|
-
_context3.prev =
|
|
153
|
-
|
|
151
|
+
case 4:
|
|
152
|
+
_context3.prev = 4;
|
|
153
|
+
_t3 = _context3["catch"](0);
|
|
154
154
|
return _context3.abrupt("return", {
|
|
155
155
|
success: false,
|
|
156
|
-
errorMessage:
|
|
156
|
+
errorMessage: _t3 instanceof Error ? _t3.message : 'Network error during duplication'
|
|
157
157
|
});
|
|
158
|
-
case
|
|
158
|
+
case 5:
|
|
159
159
|
case "end":
|
|
160
160
|
return _context3.stop();
|
|
161
161
|
}
|
|
162
|
-
}, _callee3, null, [[0,
|
|
162
|
+
}, _callee3, null, [[0, 4]]);
|
|
163
163
|
}));
|
|
164
164
|
return function fetchDuplicateAgentMutation(_x3) {
|
|
165
165
|
return _ref3.apply(this, arguments);
|
|
@@ -57,7 +57,7 @@ export var useAgentUrlActions = function useAgentUrlActions(_ref3) {
|
|
|
57
57
|
var onDuplicateAgent = useCallback( /*#__PURE__*/function () {
|
|
58
58
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(agentId) {
|
|
59
59
|
var legacyDuplicateUrl, hasVersionCapability, activationId, agentAri, result;
|
|
60
|
-
return _regeneratorRuntime.wrap(function
|
|
60
|
+
return _regeneratorRuntime.wrap(function (_context) {
|
|
61
61
|
while (1) switch (_context.prev = _context.next) {
|
|
62
62
|
case 0:
|
|
63
63
|
fireEvent('ui.button.clicked.duplicateAgentButton', {
|
|
@@ -66,40 +66,40 @@ export var useAgentUrlActions = function useAgentUrlActions(_ref3) {
|
|
|
66
66
|
});
|
|
67
67
|
legacyDuplicateUrl = getAtlassianStudioAgentDuplicateUrl(cloudId, agentId, email); // When versioning FG is off, use legacy duplicate flow
|
|
68
68
|
if (fg('rovo_agent_versioning_enabled')) {
|
|
69
|
-
_context.next =
|
|
69
|
+
_context.next = 1;
|
|
70
70
|
break;
|
|
71
71
|
}
|
|
72
72
|
window.open(legacyDuplicateUrl, '_blank', 'noopener, noreferrer');
|
|
73
73
|
return _context.abrupt("return");
|
|
74
|
-
case
|
|
75
|
-
_context.next =
|
|
74
|
+
case 1:
|
|
75
|
+
_context.next = 2;
|
|
76
76
|
return fetchHasVersionCapability(cloudId);
|
|
77
|
-
case
|
|
77
|
+
case 2:
|
|
78
78
|
hasVersionCapability = _context.sent;
|
|
79
79
|
if (hasVersionCapability) {
|
|
80
|
-
_context.next =
|
|
80
|
+
_context.next = 3;
|
|
81
81
|
break;
|
|
82
82
|
}
|
|
83
83
|
// Opening in same tab because, we cannot open in new tab after async operation, because browsers prevent `.open` after certain duration
|
|
84
84
|
window.location.assign(legacyDuplicateUrl);
|
|
85
85
|
return _context.abrupt("return");
|
|
86
|
-
case
|
|
87
|
-
_context.next =
|
|
86
|
+
case 3:
|
|
87
|
+
_context.next = 4;
|
|
88
88
|
return fetchActivationId(cloudId);
|
|
89
|
-
case
|
|
89
|
+
case 4:
|
|
90
90
|
activationId = _context.sent;
|
|
91
91
|
if (activationId) {
|
|
92
|
-
_context.next =
|
|
92
|
+
_context.next = 5;
|
|
93
93
|
break;
|
|
94
94
|
}
|
|
95
95
|
// Opening in same tab because, we cannot open in new tab after async operation, because browsers prevent `.open` after certain duration
|
|
96
96
|
window.location.assign(legacyDuplicateUrl);
|
|
97
97
|
return _context.abrupt("return");
|
|
98
|
-
case
|
|
98
|
+
case 5:
|
|
99
99
|
agentAri = "ari:cloud:rovo::agent/activation/".concat(activationId, "/").concat(agentId); // Call BE mutation to duplicate the agent
|
|
100
|
-
_context.next =
|
|
100
|
+
_context.next = 6;
|
|
101
101
|
return fetchDuplicateAgentMutation(agentAri);
|
|
102
|
-
case
|
|
102
|
+
case 6:
|
|
103
103
|
result = _context.sent;
|
|
104
104
|
if (result.success && result.newAgentAri) {
|
|
105
105
|
// Opening in same tab because, we cannot open in new tab after async operation, because browsers prevent `.open` after certain duration
|
|
@@ -109,7 +109,7 @@ export var useAgentUrlActions = function useAgentUrlActions(_ref3) {
|
|
|
109
109
|
// Opening in same tab because, we cannot open in new tab after async operation, because browsers prevent `.open` after certain duration
|
|
110
110
|
window.location.assign(legacyDuplicateUrl);
|
|
111
111
|
}
|
|
112
|
-
case
|
|
112
|
+
case 7:
|
|
113
113
|
case "end":
|
|
114
114
|
return _context.stop();
|
|
115
115
|
}
|
|
@@ -50,7 +50,7 @@ function ProfileCardContent(_ref) {
|
|
|
50
50
|
onChatClick: agentActions === null || agentActions === void 0 ? void 0 : agentActions.onChatClick,
|
|
51
51
|
onConversationStartersClick: agentActions === null || agentActions === void 0 ? void 0 : agentActions.onConversationStartersClick,
|
|
52
52
|
addFlag: addFlag,
|
|
53
|
-
hideMoreActions:
|
|
53
|
+
hideMoreActions: !!hideAgentMoreActions,
|
|
54
54
|
hideConversationStarters: fg('jira_ai_hide_conversation_starters_profilecard') && !!profilecardProps.hideAgentConversationStarters,
|
|
55
55
|
hideAiDisclaimer: hideAiDisclaimer
|
|
56
56
|
});
|
|
@@ -235,21 +235,21 @@ export default function ProfilecardTriggerNext(_ref2) {
|
|
|
235
235
|
setError(err);
|
|
236
236
|
}, [setHasError, setIsLoading, setError]);
|
|
237
237
|
var clientFetchProfile = useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
238
|
-
var shouldHideReportingLines, requests, responses;
|
|
239
|
-
return _regeneratorRuntime.wrap(function
|
|
238
|
+
var shouldHideReportingLines, requests, responses, _t;
|
|
239
|
+
return _regeneratorRuntime.wrap(function (_context) {
|
|
240
240
|
while (1) switch (_context.prev = _context.next) {
|
|
241
241
|
case 0:
|
|
242
242
|
if (!(isLoading === true)) {
|
|
243
|
-
_context.next =
|
|
243
|
+
_context.next = 1;
|
|
244
244
|
break;
|
|
245
245
|
}
|
|
246
246
|
return _context.abrupt("return");
|
|
247
|
-
case
|
|
247
|
+
case 1:
|
|
248
248
|
setIsLoading(true);
|
|
249
249
|
setHasError(false);
|
|
250
250
|
setError(null);
|
|
251
251
|
setData(null);
|
|
252
|
-
_context.prev =
|
|
252
|
+
_context.prev = 2;
|
|
253
253
|
shouldHideReportingLines = fg('jira_ai_profilecard_hide_reportinglines') && hideReportingLines;
|
|
254
254
|
requests = Promise.all([resourceClient.getProfile(cloudId || '', userId, fireAnalytics), shouldHideReportingLines ? Promise.resolve({
|
|
255
255
|
managers: [],
|
|
@@ -258,22 +258,22 @@ export default function ProfilecardTriggerNext(_ref2) {
|
|
|
258
258
|
withOrgContext: true,
|
|
259
259
|
withSiteContext: true
|
|
260
260
|
})]);
|
|
261
|
-
_context.next =
|
|
261
|
+
_context.next = 3;
|
|
262
262
|
return requests;
|
|
263
|
-
case
|
|
263
|
+
case 3:
|
|
264
264
|
responses = _context.sent;
|
|
265
265
|
handleClientSuccess.apply(void 0, _toConsumableArray(responses));
|
|
266
|
-
_context.next =
|
|
266
|
+
_context.next = 5;
|
|
267
267
|
break;
|
|
268
|
-
case
|
|
269
|
-
_context.prev =
|
|
270
|
-
|
|
271
|
-
handleClientError(
|
|
272
|
-
case
|
|
268
|
+
case 4:
|
|
269
|
+
_context.prev = 4;
|
|
270
|
+
_t = _context["catch"](2);
|
|
271
|
+
handleClientError(_t);
|
|
272
|
+
case 5:
|
|
273
273
|
case "end":
|
|
274
274
|
return _context.stop();
|
|
275
275
|
}
|
|
276
|
-
}, _callee, null, [[
|
|
276
|
+
}, _callee, null, [[2, 4]]);
|
|
277
277
|
})), [cloudId, fireAnalytics, isLoading, resourceClient, userId, handleClientSuccess, handleClientError, hideReportingLines]);
|
|
278
278
|
var showProfilecard = useCallback(function () {
|
|
279
279
|
clearTimeout(hideTimer.current);
|
|
@@ -65,7 +65,7 @@ function ProfileCardTriggerInner(_ref, ref) {
|
|
|
65
65
|
};
|
|
66
66
|
}, [hideProfilecard]);
|
|
67
67
|
var showProfilecard = useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
68
|
-
return _regeneratorRuntime.wrap(function
|
|
68
|
+
return _regeneratorRuntime.wrap(function (_context) {
|
|
69
69
|
while (1) switch (_context.prev = _context.next) {
|
|
70
70
|
case 0:
|
|
71
71
|
clearTimeout(hideTimer.current);
|
|
@@ -83,7 +83,7 @@ function ProfileCardTriggerInner(_ref, ref) {
|
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
}, showDelay);
|
|
86
|
-
case
|
|
86
|
+
case 1:
|
|
87
87
|
case "end":
|
|
88
88
|
return _context.stop();
|
|
89
89
|
}
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
._1e0c1txw{display:flex}
|
|
37
37
|
._1e0c1ule{display:block}
|
|
38
38
|
._1e0cglyw{display:none}
|
|
39
|
-
.
|
|
39
|
+
._1itk1f11{background-image:linear-gradient(to bottom,var(--ds-background-disabled,#0515240f) 0,var(--ds-background-disabled,#0515240f) 100%)}
|
|
40
40
|
._1itkdsyg{background-image:radial-gradient(circle,var(--ds-background-information-pressed,#adcbfb) 0,var(--ds-background-discovery-pressed,#e3bdfa) 25%,transparent 50%)}
|
|
41
41
|
._1itkybvv{background-image:linear-gradient(to bottom,var(--ds-background-brand-bold,#1868db) 0,var(--ds-background-brand-bold,#1868db) 100%)}
|
|
42
42
|
._1lrw14bs{background-size:100% 6pc}
|
package/dist/esm/styled/Card.js
CHANGED
|
@@ -22,7 +22,7 @@ var styles = {
|
|
|
22
22
|
customLozengeContainer: "_1e0c1txw _2lx2vrvc _1n261g80 _1bah1y6m _19pkutpp",
|
|
23
23
|
cardContainer: "_1reo15vq _18m915vq _kqswh2mm _12vemgnk _1lrw14bs _ca0q1ejb _19bv1ejb _u5f31ejb _n3td1ejb",
|
|
24
24
|
cardContainerActiveUser: "_1itkybvv",
|
|
25
|
-
cardContainerDisabledUser: "
|
|
25
|
+
cardContainerDisabledUser: "_1itk1f11",
|
|
26
26
|
cardContainerWithElevationDEPRECATED: "_2rko12b0 _16qs130s",
|
|
27
27
|
cardContainerWithElevation: "_2rko1mok _16qs130s",
|
|
28
28
|
detailsLabel: "_zulpu2gc _1e0c1txw _4cvr1h6o _1bah1y6m _19pkutpp _2hwxze3t _18u0ze3t _otyrze3t _o5721q9c",
|
|
@@ -5,7 +5,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
5
5
|
import { getPageTime } from './performance';
|
|
6
6
|
export var PACKAGE_META_DATA = {
|
|
7
7
|
packageName: (_process$env$_PACKAGE = "@atlaskit/profilecard") !== null && _process$env$_PACKAGE !== void 0 ? _process$env$_PACKAGE : '',
|
|
8
|
-
packageVersion: (_process$env$_PACKAGE2 = "25.7.
|
|
8
|
+
packageVersion: (_process$env$_PACKAGE2 = "25.7.6") !== null && _process$env$_PACKAGE2 !== void 0 ? _process$env$_PACKAGE2 : ''
|
|
9
9
|
};
|
|
10
10
|
var TEAM_SUBJECT = 'teamProfileCard';
|
|
11
11
|
var USER_SUBJECT = 'profilecard';
|
|
@@ -24,7 +24,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
24
24
|
actionSubjectId: actionSubjectId,
|
|
25
25
|
attributes: _objectSpread(_objectSpread({
|
|
26
26
|
packageName: "@atlaskit/profilecard",
|
|
27
|
-
packageVersion: "25.7.
|
|
27
|
+
packageVersion: "25.7.6"
|
|
28
28
|
}, attributes), {}, {
|
|
29
29
|
firedAt: Math.round(getPageTime())
|
|
30
30
|
})
|
|
@@ -18,30 +18,30 @@ export var useProfileInfo = function useProfileInfo(_ref) {
|
|
|
18
18
|
setProfileData = _useState6[1];
|
|
19
19
|
var getProfileData = /*#__PURE__*/function () {
|
|
20
20
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
21
|
-
var _profileData;
|
|
22
|
-
return _regeneratorRuntime.wrap(function
|
|
21
|
+
var _profileData, _t;
|
|
22
|
+
return _regeneratorRuntime.wrap(function (_context) {
|
|
23
23
|
while (1) switch (_context.prev = _context.next) {
|
|
24
24
|
case 0:
|
|
25
25
|
setIsLoading(true);
|
|
26
26
|
_context.prev = 1;
|
|
27
|
-
_context.next =
|
|
27
|
+
_context.next = 2;
|
|
28
28
|
return fetchUserProfile === null || fetchUserProfile === void 0 ? void 0 : fetchUserProfile();
|
|
29
|
-
case
|
|
29
|
+
case 2:
|
|
30
30
|
_profileData = _context.sent;
|
|
31
31
|
setProfileData(_profileData);
|
|
32
32
|
setIsLoading(false);
|
|
33
|
-
_context.next =
|
|
33
|
+
_context.next = 4;
|
|
34
34
|
break;
|
|
35
|
-
case
|
|
36
|
-
_context.prev =
|
|
37
|
-
|
|
38
|
-
setError(
|
|
35
|
+
case 3:
|
|
36
|
+
_context.prev = 3;
|
|
37
|
+
_t = _context["catch"](1);
|
|
38
|
+
setError(_t);
|
|
39
39
|
setIsLoading(false);
|
|
40
|
-
case
|
|
40
|
+
case 4:
|
|
41
41
|
case "end":
|
|
42
42
|
return _context.stop();
|
|
43
43
|
}
|
|
44
|
-
}, _callee, null, [[1,
|
|
44
|
+
}, _callee, null, [[1, 3]]);
|
|
45
45
|
}));
|
|
46
46
|
return function getProfileData() {
|
|
47
47
|
return _ref2.apply(this, arguments);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/profilecard",
|
|
3
|
-
"version": "25.7.
|
|
3
|
+
"version": "25.7.7",
|
|
4
4
|
"description": "A React component to display a card with user information.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@atlaskit/css": "^0.19.0",
|
|
55
55
|
"@atlaskit/dropdown-menu": "^16.9.0",
|
|
56
56
|
"@atlaskit/empty-state": "^10.2.0",
|
|
57
|
-
"@atlaskit/give-kudos": "^5.
|
|
57
|
+
"@atlaskit/give-kudos": "^5.12.0",
|
|
58
58
|
"@atlaskit/heading": "^5.4.0",
|
|
59
59
|
"@atlaskit/icon": "^35.3.0",
|
|
60
60
|
"@atlaskit/link": "3.4.2",
|
|
@@ -66,17 +66,17 @@
|
|
|
66
66
|
"@atlaskit/popup": "^4.22.0",
|
|
67
67
|
"@atlaskit/primitives": "^19.0.0",
|
|
68
68
|
"@atlaskit/rovo-agent-components": "^4.6.0",
|
|
69
|
-
"@atlaskit/rovo-triggers": "^6.
|
|
69
|
+
"@atlaskit/rovo-triggers": "^6.4.0",
|
|
70
70
|
"@atlaskit/spinner": "^19.1.0",
|
|
71
71
|
"@atlaskit/teams-app-config": "^1.12.0",
|
|
72
|
-
"@atlaskit/teams-app-internal-analytics": "^1.
|
|
72
|
+
"@atlaskit/teams-app-internal-analytics": "^1.32.0",
|
|
73
73
|
"@atlaskit/teams-app-internal-navigation": "^1.9.0",
|
|
74
74
|
"@atlaskit/teams-avatar": "^2.7.0",
|
|
75
75
|
"@atlaskit/teams-public": "^1.4.0",
|
|
76
76
|
"@atlaskit/theme": "^25.0.0",
|
|
77
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
78
|
-
"@atlaskit/tokens": "^13.
|
|
79
|
-
"@atlaskit/tooltip": "^22.
|
|
77
|
+
"@atlaskit/tmp-editor-statsig": "^85.0.0",
|
|
78
|
+
"@atlaskit/tokens": "^13.1.0",
|
|
79
|
+
"@atlaskit/tooltip": "^22.5.0",
|
|
80
80
|
"@atlassian/studio-entry-link": "^1.1.0",
|
|
81
81
|
"@babel/runtime": "^7.0.0",
|
|
82
82
|
"@compiled/react": "^0.20.0",
|
|
@@ -159,9 +159,6 @@
|
|
|
159
159
|
"cover-header-image-team-profilecard": {
|
|
160
160
|
"type": "boolean"
|
|
161
161
|
},
|
|
162
|
-
"jira_ai_profilecard_hide_agent_actions": {
|
|
163
|
-
"type": "boolean"
|
|
164
|
-
},
|
|
165
162
|
"jira_ai_profilecard_hide_reportinglines": {
|
|
166
163
|
"type": "boolean"
|
|
167
164
|
},
|