@atlaskit/profilecard 20.1.2 → 20.3.0
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 +17 -0
- package/dist/cjs/client/getTeamFromAGG.js +1 -1
- package/dist/cjs/components/Agent/AgentProfileCard.js +3 -3
- package/dist/cjs/components/Agent/AgentProfileCardTrigger.js +17 -12
- package/dist/cjs/util/analytics.js +1 -1
- package/dist/es2019/client/getTeamFromAGG.js +1 -1
- package/dist/es2019/components/Agent/AgentProfileCard.js +3 -3
- package/dist/es2019/components/Agent/AgentProfileCardTrigger.js +6 -1
- package/dist/es2019/util/analytics.js +1 -1
- package/dist/esm/client/getTeamFromAGG.js +1 -1
- package/dist/esm/components/Agent/AgentProfileCard.js +3 -3
- package/dist/esm/components/Agent/AgentProfileCardTrigger.js +17 -12
- package/dist/esm/util/analytics.js +1 -1
- package/dist/types/types.d.ts +1 -0
- package/dist/types-ts4.5/types.d.ts +1 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/profilecard
|
|
2
2
|
|
|
3
|
+
## 20.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#147255](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/147255)
|
|
8
|
+
[`c757a53e7cbf1`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c757a53e7cbf1) -
|
|
9
|
+
Prioritise the usage of agent.external_config_references instead of age.t.named_id, because the
|
|
10
|
+
OOTB agent migration will change agent.named_id to uuid
|
|
11
|
+
|
|
12
|
+
## 20.2.0
|
|
13
|
+
|
|
14
|
+
### Minor Changes
|
|
15
|
+
|
|
16
|
+
- [#146229](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/146229)
|
|
17
|
+
[`d15674651dd75`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d15674651dd75) -
|
|
18
|
+
[ux] Add forge type for agent creator type
|
|
19
|
+
|
|
3
20
|
## 20.1.2
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -57,7 +57,7 @@ var addHeaders = exports.addHeaders = function addHeaders(headers) {
|
|
|
57
57
|
headers.append('X-ExperimentalApi', 'teams-beta');
|
|
58
58
|
headers.append('X-ExperimentalApi', 'team-members-beta');
|
|
59
59
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
60
|
-
headers.append('atl-client-version', "20.
|
|
60
|
+
headers.append('atl-client-version', "20.3.0");
|
|
61
61
|
return headers;
|
|
62
62
|
};
|
|
63
63
|
function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -39,7 +39,7 @@ var cardContainerStyles = (0, _primitives.xcss)({
|
|
|
39
39
|
position: 'relative'
|
|
40
40
|
});
|
|
41
41
|
var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
42
|
-
var _agent$creatorInfo, _agent$creatorInfo2, _agent$creatorInfo3, _agent$creatorInfo4;
|
|
42
|
+
var _agent$external_confi, _agent$external_confi2, _agent$creatorInfo, _agent$creatorInfo2, _agent$creatorInfo3, _agent$creatorInfo4;
|
|
43
43
|
var agent = _ref.agent,
|
|
44
44
|
isLoading = _ref.isLoading,
|
|
45
45
|
isCreatedByViewingUser = _ref.isCreatedByViewingUser,
|
|
@@ -168,14 +168,14 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
168
168
|
xcss: cardContainerStyles
|
|
169
169
|
}, /*#__PURE__*/_react.default.createElement(_rovoAgentComponents.AgentBanner, {
|
|
170
170
|
agentId: agent.id,
|
|
171
|
-
agentNamedId: agent.named_id,
|
|
171
|
+
agentNamedId: (_agent$external_confi = agent.external_config_reference) !== null && _agent$external_confi !== void 0 ? _agent$external_confi : agent.named_id,
|
|
172
172
|
height: 96,
|
|
173
173
|
agentIdentityAccountId: agent.identity_account_id
|
|
174
174
|
}), /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
175
175
|
xcss: avatarStyles
|
|
176
176
|
}, /*#__PURE__*/_react.default.createElement(_rovoAgentComponents.AgentAvatar, {
|
|
177
177
|
agentId: agent.id,
|
|
178
|
-
agentNamedId: agent.named_id,
|
|
178
|
+
agentNamedId: (_agent$external_confi2 = agent.external_config_reference) !== null && _agent$external_confi2 !== void 0 ? _agent$external_confi2 : agent.named_id,
|
|
179
179
|
agentIdentityAccountId: agent.identity_account_id,
|
|
180
180
|
size: "xlarge",
|
|
181
181
|
isForgeAgent: agent.creator_type === 'FORGE' || agent.creator_type === 'THIRD_PARTY',
|
|
@@ -51,7 +51,7 @@ var AgentProfileCardTrigger = exports.AgentProfileCardTrigger = function AgentPr
|
|
|
51
51
|
return _context.abrupt("return", undefined);
|
|
52
52
|
case 2:
|
|
53
53
|
_context.t0 = creator_type;
|
|
54
|
-
_context.next = _context.t0 === 'SYSTEM' ? 5 : _context.t0 ===
|
|
54
|
+
_context.next = _context.t0 === 'SYSTEM' ? 5 : _context.t0 === 'THIRD_PARTY' ? 6 : _context.t0 === 'FORGE' ? 7 : _context.t0 === 'CUSTOMER' ? 8 : 21;
|
|
55
55
|
break;
|
|
56
56
|
case 5:
|
|
57
57
|
return _context.abrupt("return", {
|
|
@@ -63,17 +63,22 @@ var AgentProfileCardTrigger = exports.AgentProfileCardTrigger = function AgentPr
|
|
|
63
63
|
name: creator !== null && creator !== void 0 ? creator : ''
|
|
64
64
|
});
|
|
65
65
|
case 7:
|
|
66
|
+
return _context.abrupt("return", {
|
|
67
|
+
type: 'THIRD_PARTY',
|
|
68
|
+
name: creator !== null && creator !== void 0 ? creator : ''
|
|
69
|
+
});
|
|
70
|
+
case 8:
|
|
66
71
|
_userId = (0, _rovoAgentUtils.getAAIDFromARI)(creator) || '';
|
|
67
|
-
_context.prev =
|
|
72
|
+
_context.prev = 9;
|
|
68
73
|
if (!(!_userId || !cloudId)) {
|
|
69
|
-
_context.next =
|
|
74
|
+
_context.next = 12;
|
|
70
75
|
break;
|
|
71
76
|
}
|
|
72
77
|
return _context.abrupt("return", undefined);
|
|
73
|
-
case
|
|
74
|
-
_context.next =
|
|
78
|
+
case 12:
|
|
79
|
+
_context.next = 14;
|
|
75
80
|
return props.resourceClient.getProfile(cloudId, _userId, fireAnalytics);
|
|
76
|
-
case
|
|
81
|
+
case 14:
|
|
77
82
|
creatorInfo = _context.sent;
|
|
78
83
|
return _context.abrupt("return", {
|
|
79
84
|
type: 'CUSTOMER',
|
|
@@ -81,17 +86,17 @@ var AgentProfileCardTrigger = exports.AgentProfileCardTrigger = function AgentPr
|
|
|
81
86
|
profileLink: "/people/".concat(_userId),
|
|
82
87
|
id: _userId
|
|
83
88
|
});
|
|
84
|
-
case
|
|
85
|
-
_context.prev =
|
|
86
|
-
_context.t1 = _context["catch"](
|
|
87
|
-
return _context.abrupt("return", undefined);
|
|
88
|
-
case 20:
|
|
89
|
+
case 18:
|
|
90
|
+
_context.prev = 18;
|
|
91
|
+
_context.t1 = _context["catch"](9);
|
|
89
92
|
return _context.abrupt("return", undefined);
|
|
90
93
|
case 21:
|
|
94
|
+
return _context.abrupt("return", undefined);
|
|
95
|
+
case 22:
|
|
91
96
|
case "end":
|
|
92
97
|
return _context.stop();
|
|
93
98
|
}
|
|
94
|
-
}, _callee, null, [[
|
|
99
|
+
}, _callee, null, [[9, 18]]);
|
|
95
100
|
}));
|
|
96
101
|
return function getCreator(_x, _x2) {
|
|
97
102
|
return _ref2.apply(this, arguments);
|
|
@@ -45,7 +45,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
45
45
|
actionSubjectId: actionSubjectId,
|
|
46
46
|
attributes: _objectSpread(_objectSpread({
|
|
47
47
|
packageName: "@atlaskit/profilecard",
|
|
48
|
-
packageVersion: "20.
|
|
48
|
+
packageVersion: "20.3.0"
|
|
49
49
|
}, attributes), {}, {
|
|
50
50
|
firedAt: Math.round((0, _performance.getPageTime)())
|
|
51
51
|
})
|
|
@@ -67,7 +67,7 @@ export const addHeaders = headers => {
|
|
|
67
67
|
headers.append('X-ExperimentalApi', 'teams-beta');
|
|
68
68
|
headers.append('X-ExperimentalApi', 'team-members-beta');
|
|
69
69
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
70
|
-
headers.append('atl-client-version', "20.
|
|
70
|
+
headers.append('atl-client-version', "20.3.0");
|
|
71
71
|
return headers;
|
|
72
72
|
};
|
|
73
73
|
export async function getTeamFromAGG(url, teamId, siteId) {
|
|
@@ -38,7 +38,7 @@ const AgentProfileCard = ({
|
|
|
38
38
|
resourceClient,
|
|
39
39
|
addFlag
|
|
40
40
|
}) => {
|
|
41
|
-
var _agent$creatorInfo, _agent$creatorInfo2, _agent$creatorInfo3, _agent$creatorInfo4;
|
|
41
|
+
var _agent$external_confi, _agent$external_confi2, _agent$creatorInfo, _agent$creatorInfo2, _agent$creatorInfo3, _agent$creatorInfo4;
|
|
42
42
|
const {
|
|
43
43
|
onEditAgent,
|
|
44
44
|
onCopyAgent,
|
|
@@ -121,14 +121,14 @@ const AgentProfileCard = ({
|
|
|
121
121
|
xcss: cardContainerStyles
|
|
122
122
|
}, /*#__PURE__*/React.createElement(AgentBanner, {
|
|
123
123
|
agentId: agent.id,
|
|
124
|
-
agentNamedId: agent.named_id,
|
|
124
|
+
agentNamedId: (_agent$external_confi = agent.external_config_reference) !== null && _agent$external_confi !== void 0 ? _agent$external_confi : agent.named_id,
|
|
125
125
|
height: 96,
|
|
126
126
|
agentIdentityAccountId: agent.identity_account_id
|
|
127
127
|
}), /*#__PURE__*/React.createElement(Box, {
|
|
128
128
|
xcss: avatarStyles
|
|
129
129
|
}, /*#__PURE__*/React.createElement(AgentAvatar, {
|
|
130
130
|
agentId: agent.id,
|
|
131
|
-
agentNamedId: agent.named_id,
|
|
131
|
+
agentNamedId: (_agent$external_confi2 = agent.external_config_reference) !== null && _agent$external_confi2 !== void 0 ? _agent$external_confi2 : agent.named_id,
|
|
132
132
|
agentIdentityAccountId: agent.identity_account_id,
|
|
133
133
|
size: "xlarge",
|
|
134
134
|
isForgeAgent: agent.creator_type === 'FORGE' || agent.creator_type === 'THIRD_PARTY',
|
|
@@ -33,7 +33,12 @@ export const AgentProfileCardTrigger = ({
|
|
|
33
33
|
return {
|
|
34
34
|
type: 'SYSTEM'
|
|
35
35
|
};
|
|
36
|
-
case 'THIRD_PARTY'
|
|
36
|
+
case 'THIRD_PARTY':
|
|
37
|
+
return {
|
|
38
|
+
type: 'THIRD_PARTY',
|
|
39
|
+
name: creator !== null && creator !== void 0 ? creator : ''
|
|
40
|
+
};
|
|
41
|
+
case 'FORGE':
|
|
37
42
|
return {
|
|
38
43
|
type: 'THIRD_PARTY',
|
|
39
44
|
name: creator !== null && creator !== void 0 ? creator : ''
|
|
@@ -32,7 +32,7 @@ const createEvent = (eventType, action, actionSubject, actionSubjectId, attribut
|
|
|
32
32
|
actionSubjectId,
|
|
33
33
|
attributes: {
|
|
34
34
|
packageName: "@atlaskit/profilecard",
|
|
35
|
-
packageVersion: "20.
|
|
35
|
+
packageVersion: "20.3.0",
|
|
36
36
|
...attributes,
|
|
37
37
|
firedAt: Math.round(getPageTime())
|
|
38
38
|
}
|
|
@@ -48,7 +48,7 @@ export var addHeaders = function addHeaders(headers) {
|
|
|
48
48
|
headers.append('X-ExperimentalApi', 'teams-beta');
|
|
49
49
|
headers.append('X-ExperimentalApi', 'team-members-beta');
|
|
50
50
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
51
|
-
headers.append('atl-client-version', "20.
|
|
51
|
+
headers.append('atl-client-version', "20.3.0");
|
|
52
52
|
return headers;
|
|
53
53
|
};
|
|
54
54
|
export function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -29,7 +29,7 @@ var cardContainerStyles = xcss({
|
|
|
29
29
|
position: 'relative'
|
|
30
30
|
});
|
|
31
31
|
var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
32
|
-
var _agent$creatorInfo, _agent$creatorInfo2, _agent$creatorInfo3, _agent$creatorInfo4;
|
|
32
|
+
var _agent$external_confi, _agent$external_confi2, _agent$creatorInfo, _agent$creatorInfo2, _agent$creatorInfo3, _agent$creatorInfo4;
|
|
33
33
|
var agent = _ref.agent,
|
|
34
34
|
isLoading = _ref.isLoading,
|
|
35
35
|
isCreatedByViewingUser = _ref.isCreatedByViewingUser,
|
|
@@ -158,14 +158,14 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
158
158
|
xcss: cardContainerStyles
|
|
159
159
|
}, /*#__PURE__*/React.createElement(AgentBanner, {
|
|
160
160
|
agentId: agent.id,
|
|
161
|
-
agentNamedId: agent.named_id,
|
|
161
|
+
agentNamedId: (_agent$external_confi = agent.external_config_reference) !== null && _agent$external_confi !== void 0 ? _agent$external_confi : agent.named_id,
|
|
162
162
|
height: 96,
|
|
163
163
|
agentIdentityAccountId: agent.identity_account_id
|
|
164
164
|
}), /*#__PURE__*/React.createElement(Box, {
|
|
165
165
|
xcss: avatarStyles
|
|
166
166
|
}, /*#__PURE__*/React.createElement(AgentAvatar, {
|
|
167
167
|
agentId: agent.id,
|
|
168
|
-
agentNamedId: agent.named_id,
|
|
168
|
+
agentNamedId: (_agent$external_confi2 = agent.external_config_reference) !== null && _agent$external_confi2 !== void 0 ? _agent$external_confi2 : agent.named_id,
|
|
169
169
|
agentIdentityAccountId: agent.identity_account_id,
|
|
170
170
|
size: "xlarge",
|
|
171
171
|
isForgeAgent: agent.creator_type === 'FORGE' || agent.creator_type === 'THIRD_PARTY',
|
|
@@ -41,7 +41,7 @@ export var AgentProfileCardTrigger = function AgentProfileCardTrigger(_ref) {
|
|
|
41
41
|
return _context.abrupt("return", undefined);
|
|
42
42
|
case 2:
|
|
43
43
|
_context.t0 = creator_type;
|
|
44
|
-
_context.next = _context.t0 === 'SYSTEM' ? 5 : _context.t0 ===
|
|
44
|
+
_context.next = _context.t0 === 'SYSTEM' ? 5 : _context.t0 === 'THIRD_PARTY' ? 6 : _context.t0 === 'FORGE' ? 7 : _context.t0 === 'CUSTOMER' ? 8 : 21;
|
|
45
45
|
break;
|
|
46
46
|
case 5:
|
|
47
47
|
return _context.abrupt("return", {
|
|
@@ -53,17 +53,22 @@ export var AgentProfileCardTrigger = function AgentProfileCardTrigger(_ref) {
|
|
|
53
53
|
name: creator !== null && creator !== void 0 ? creator : ''
|
|
54
54
|
});
|
|
55
55
|
case 7:
|
|
56
|
+
return _context.abrupt("return", {
|
|
57
|
+
type: 'THIRD_PARTY',
|
|
58
|
+
name: creator !== null && creator !== void 0 ? creator : ''
|
|
59
|
+
});
|
|
60
|
+
case 8:
|
|
56
61
|
_userId = getAAIDFromARI(creator) || '';
|
|
57
|
-
_context.prev =
|
|
62
|
+
_context.prev = 9;
|
|
58
63
|
if (!(!_userId || !cloudId)) {
|
|
59
|
-
_context.next =
|
|
64
|
+
_context.next = 12;
|
|
60
65
|
break;
|
|
61
66
|
}
|
|
62
67
|
return _context.abrupt("return", undefined);
|
|
63
|
-
case
|
|
64
|
-
_context.next =
|
|
68
|
+
case 12:
|
|
69
|
+
_context.next = 14;
|
|
65
70
|
return props.resourceClient.getProfile(cloudId, _userId, fireAnalytics);
|
|
66
|
-
case
|
|
71
|
+
case 14:
|
|
67
72
|
creatorInfo = _context.sent;
|
|
68
73
|
return _context.abrupt("return", {
|
|
69
74
|
type: 'CUSTOMER',
|
|
@@ -71,17 +76,17 @@ export var AgentProfileCardTrigger = function AgentProfileCardTrigger(_ref) {
|
|
|
71
76
|
profileLink: "/people/".concat(_userId),
|
|
72
77
|
id: _userId
|
|
73
78
|
});
|
|
74
|
-
case
|
|
75
|
-
_context.prev =
|
|
76
|
-
_context.t1 = _context["catch"](
|
|
77
|
-
return _context.abrupt("return", undefined);
|
|
78
|
-
case 20:
|
|
79
|
+
case 18:
|
|
80
|
+
_context.prev = 18;
|
|
81
|
+
_context.t1 = _context["catch"](9);
|
|
79
82
|
return _context.abrupt("return", undefined);
|
|
80
83
|
case 21:
|
|
84
|
+
return _context.abrupt("return", undefined);
|
|
85
|
+
case 22:
|
|
81
86
|
case "end":
|
|
82
87
|
return _context.stop();
|
|
83
88
|
}
|
|
84
|
-
}, _callee, null, [[
|
|
89
|
+
}, _callee, null, [[9, 18]]);
|
|
85
90
|
}));
|
|
86
91
|
return function getCreator(_x, _x2) {
|
|
87
92
|
return _ref2.apply(this, arguments);
|
|
@@ -39,7 +39,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
39
39
|
actionSubjectId: actionSubjectId,
|
|
40
40
|
attributes: _objectSpread(_objectSpread({
|
|
41
41
|
packageName: "@atlaskit/profilecard",
|
|
42
|
-
packageVersion: "20.
|
|
42
|
+
packageVersion: "20.3.0"
|
|
43
43
|
}, attributes), {}, {
|
|
44
44
|
firedAt: Math.round(getPageTime())
|
|
45
45
|
})
|
package/dist/types/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/profilecard",
|
|
3
|
-
"version": "20.
|
|
3
|
+
"version": "20.3.0",
|
|
4
4
|
"description": "A React component to display a card with user information.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -57,9 +57,9 @@
|
|
|
57
57
|
"@atlaskit/dropdown-menu": "^12.18.0",
|
|
58
58
|
"@atlaskit/empty-state": "^7.11.0",
|
|
59
59
|
"@atlaskit/focus-ring": "^1.6.0",
|
|
60
|
-
"@atlaskit/give-kudos": "^2.
|
|
61
|
-
"@atlaskit/icon": "^22.
|
|
62
|
-
"@atlaskit/lozenge": "^11.
|
|
60
|
+
"@atlaskit/give-kudos": "^2.2.0",
|
|
61
|
+
"@atlaskit/icon": "^22.19.0",
|
|
62
|
+
"@atlaskit/lozenge": "^11.11.0",
|
|
63
63
|
"@atlaskit/menu": "^2.12.0",
|
|
64
64
|
"@atlaskit/modal-dialog": "^12.17.0",
|
|
65
65
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|