@atlaskit/profilecard 23.21.21 → 24.0.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 +22 -0
- package/afm-cc/tsconfig.json +8 -2
- package/afm-jira/tsconfig.json +7 -1
- package/afm-post-office/tsconfig.json +7 -1
- package/afm-rovo-extension/tsconfig.json +7 -1
- package/afm-townsquare/tsconfig.json +7 -1
- package/build/tsconfig.json +8 -2
- package/dist/cjs/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/cjs/client/getTeamFromAGG.js +1 -1
- package/dist/cjs/components/Agent/Actions.js +1 -3
- package/dist/cjs/components/Agent/AgentProfileCard.js +0 -4
- package/dist/cjs/components/Agent/AgentProfileCardResourced.js +0 -2
- package/dist/cjs/components/Agent/AgentProfileCardTrigger.js +0 -3
- package/dist/cjs/components/User/ProfileCardTrigger.js +0 -4
- package/dist/cjs/components/team-profile-card/team-connections/main.js +2 -2
- package/dist/cjs/util/analytics.js +1 -1
- package/dist/es2019/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/es2019/client/getTeamFromAGG.js +1 -1
- package/dist/es2019/components/Agent/Actions.js +0 -2
- package/dist/es2019/components/Agent/AgentProfileCard.js +0 -3
- package/dist/es2019/components/Agent/AgentProfileCardResourced.js +0 -2
- package/dist/es2019/components/Agent/AgentProfileCardTrigger.js +0 -3
- package/dist/es2019/components/User/ProfileCardTrigger.js +0 -4
- package/dist/es2019/components/team-profile-card/team-connections/main.js +2 -2
- package/dist/es2019/util/analytics.js +1 -1
- package/dist/esm/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/esm/client/getTeamFromAGG.js +1 -1
- package/dist/esm/components/Agent/Actions.js +1 -3
- package/dist/esm/components/Agent/AgentProfileCard.js +0 -4
- package/dist/esm/components/Agent/AgentProfileCardResourced.js +0 -2
- package/dist/esm/components/Agent/AgentProfileCardTrigger.js +0 -3
- package/dist/esm/components/User/ProfileCardTrigger.js +0 -4
- package/dist/esm/components/team-profile-card/team-connections/main.js +2 -2
- package/dist/esm/util/analytics.js +1 -1
- package/dist/types/components/Agent/Actions.d.ts +1 -2
- package/dist/types/components/Agent/AgentProfileCard.d.ts +1 -1
- package/dist/types/components/Agent/AgentProfileCardResourced.d.ts +0 -2
- package/dist/types/components/Agent/lazyAgentProfileCard.d.ts +1 -1
- package/dist/types/types.d.ts +0 -2
- package/dist/types-ts4.5/components/Agent/Actions.d.ts +1 -2
- package/dist/types-ts4.5/components/Agent/AgentProfileCard.d.ts +1 -1
- package/dist/types-ts4.5/components/Agent/AgentProfileCardResourced.d.ts +0 -2
- package/dist/types-ts4.5/components/Agent/lazyAgentProfileCard.d.ts +1 -1
- package/dist/types-ts4.5/types.d.ts +0 -2
- package/package.json +2 -5
- package/tsconfig.json +8 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @atlaskit/profilecard
|
|
2
2
|
|
|
3
|
+
## 24.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#193947](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/193947)
|
|
8
|
+
[`c6101121ae1df`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c6101121ae1df) -
|
|
9
|
+
Removed unused component props in response to the removal of `isAgentCreatedByUser` from the agent
|
|
10
|
+
dropdown actions component. Changes:
|
|
11
|
+
|
|
12
|
+
- `AgentProfileCard`: removed `isCreatedByViewingUser` / `product` props. `isCreatedByViewingUser`
|
|
13
|
+
is no longer needed for action dropdown permission checks, and `product` is an unused prop
|
|
14
|
+
- `AgentProfileCardResourced`: removed `viewingUserId` / `product` props. `viewingUserId` is no
|
|
15
|
+
longer needed for action dropdown permission checks, and `product` is an unused prop
|
|
16
|
+
|
|
17
|
+
Also updated consumer components to remove these props.
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- [`49ad6b3374d93`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/49ad6b3374d93) -
|
|
22
|
+
Clean up enable_web_links_in_team_containers feature gate
|
|
23
|
+
- Updated dependencies
|
|
24
|
+
|
|
3
25
|
## 23.21.21
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
package/afm-cc/tsconfig.json
CHANGED
|
@@ -14,7 +14,13 @@
|
|
|
14
14
|
"exclude": [
|
|
15
15
|
"../src/**/__tests__/*",
|
|
16
16
|
"../src/**/*.test.*",
|
|
17
|
-
"../src/**/test.*"
|
|
17
|
+
"../src/**/test.*",
|
|
18
|
+
"../src/**/examples.*",
|
|
19
|
+
"../src/**/examples/*",
|
|
20
|
+
"../src/**/examples/**/*",
|
|
21
|
+
"../src/**/*.stories.*",
|
|
22
|
+
"../src/**/stories/*",
|
|
23
|
+
"../src/**/stories/**/*"
|
|
18
24
|
],
|
|
19
25
|
"references": [
|
|
20
26
|
{
|
|
@@ -108,4 +114,4 @@
|
|
|
108
114
|
"path": "../../../design-system/tooltip/afm-cc/tsconfig.json"
|
|
109
115
|
}
|
|
110
116
|
]
|
|
111
|
-
}
|
|
117
|
+
}
|
package/afm-jira/tsconfig.json
CHANGED
|
@@ -14,7 +14,13 @@
|
|
|
14
14
|
"exclude": [
|
|
15
15
|
"../src/**/__tests__/*",
|
|
16
16
|
"../src/**/*.test.*",
|
|
17
|
-
"../src/**/test.*"
|
|
17
|
+
"../src/**/test.*",
|
|
18
|
+
"../src/**/examples.*",
|
|
19
|
+
"../src/**/examples/*",
|
|
20
|
+
"../src/**/examples/**/*",
|
|
21
|
+
"../src/**/*.stories.*",
|
|
22
|
+
"../src/**/stories/*",
|
|
23
|
+
"../src/**/stories/**/*"
|
|
18
24
|
],
|
|
19
25
|
"references": [
|
|
20
26
|
{
|
|
@@ -14,7 +14,13 @@
|
|
|
14
14
|
"exclude": [
|
|
15
15
|
"../src/**/__tests__/*",
|
|
16
16
|
"../src/**/*.test.*",
|
|
17
|
-
"../src/**/test.*"
|
|
17
|
+
"../src/**/test.*",
|
|
18
|
+
"../src/**/examples.*",
|
|
19
|
+
"../src/**/examples/*",
|
|
20
|
+
"../src/**/examples/**/*",
|
|
21
|
+
"../src/**/*.stories.*",
|
|
22
|
+
"../src/**/stories/*",
|
|
23
|
+
"../src/**/stories/**/*"
|
|
18
24
|
],
|
|
19
25
|
"references": [
|
|
20
26
|
{
|
|
@@ -14,7 +14,13 @@
|
|
|
14
14
|
"exclude": [
|
|
15
15
|
"../src/**/__tests__/*",
|
|
16
16
|
"../src/**/*.test.*",
|
|
17
|
-
"../src/**/test.*"
|
|
17
|
+
"../src/**/test.*",
|
|
18
|
+
"../src/**/examples.*",
|
|
19
|
+
"../src/**/examples/*",
|
|
20
|
+
"../src/**/examples/**/*",
|
|
21
|
+
"../src/**/*.stories.*",
|
|
22
|
+
"../src/**/stories/*",
|
|
23
|
+
"../src/**/stories/**/*"
|
|
18
24
|
],
|
|
19
25
|
"references": [
|
|
20
26
|
{
|
|
@@ -14,7 +14,13 @@
|
|
|
14
14
|
"exclude": [
|
|
15
15
|
"../src/**/__tests__/*",
|
|
16
16
|
"../src/**/*.test.*",
|
|
17
|
-
"../src/**/test.*"
|
|
17
|
+
"../src/**/test.*",
|
|
18
|
+
"../src/**/examples.*",
|
|
19
|
+
"../src/**/examples/*",
|
|
20
|
+
"../src/**/examples/**/*",
|
|
21
|
+
"../src/**/*.stories.*",
|
|
22
|
+
"../src/**/stories/*",
|
|
23
|
+
"../src/**/stories/**/*"
|
|
18
24
|
],
|
|
19
25
|
"references": [
|
|
20
26
|
{
|
package/build/tsconfig.json
CHANGED
|
@@ -12,6 +12,12 @@
|
|
|
12
12
|
"exclude": [
|
|
13
13
|
"../src/**/__tests__/*",
|
|
14
14
|
"../src/**/*.test.*",
|
|
15
|
-
"../src/**/test.*"
|
|
15
|
+
"../src/**/test.*",
|
|
16
|
+
"../src/**/examples.*",
|
|
17
|
+
"../src/**/examples/*",
|
|
18
|
+
"../src/**/examples/**/*",
|
|
19
|
+
"../src/**/*.stories.*",
|
|
20
|
+
"../src/**/stories/*",
|
|
21
|
+
"../src/**/stories/**/*"
|
|
16
22
|
]
|
|
17
|
-
}
|
|
23
|
+
}
|
|
@@ -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', "23.21.
|
|
14
|
+
headers.append('atl-client-version', "23.21.21");
|
|
15
15
|
return headers;
|
|
16
16
|
};
|
|
17
17
|
function getOrgIdForCloudIdFromAGG(_x, _x2) {
|
|
@@ -65,7 +65,7 @@ var addHeaders = exports.addHeaders = function addHeaders(headers) {
|
|
|
65
65
|
headers.append('X-ExperimentalApi', 'teams-beta');
|
|
66
66
|
headers.append('X-ExperimentalApi', 'team-members-beta');
|
|
67
67
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
68
|
-
headers.append('atl-client-version', "23.21.
|
|
68
|
+
headers.append('atl-client-version', "23.21.21");
|
|
69
69
|
return headers;
|
|
70
70
|
};
|
|
71
71
|
function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -50,8 +50,7 @@ var actionsWrapperStyles = (0, _primitives.xcss)({
|
|
|
50
50
|
color: 'color.text'
|
|
51
51
|
});
|
|
52
52
|
var AgentActions = exports.AgentActions = function AgentActions(_ref) {
|
|
53
|
-
var
|
|
54
|
-
onEditAgent = _ref.onEditAgent,
|
|
53
|
+
var onEditAgent = _ref.onEditAgent,
|
|
55
54
|
onDeleteAgent = _ref.onDeleteAgent,
|
|
56
55
|
onDuplicateAgent = _ref.onDuplicateAgent,
|
|
57
56
|
onCopyAgent = _ref.onCopyAgent,
|
|
@@ -124,7 +123,6 @@ var AgentActions = exports.AgentActions = function AgentActions(_ref) {
|
|
|
124
123
|
xcss: chatPillTextStyles
|
|
125
124
|
}, formatMessage(messages.actionChatToAgent)))))), /*#__PURE__*/_react.default.createElement(_rovoAgentComponents.AgentDropdownMenu, {
|
|
126
125
|
agentId: agent.id,
|
|
127
|
-
isAgentCreatedByUser: isAgentCreatedByCurrentUser !== null && isAgentCreatedByCurrentUser !== void 0 ? isAgentCreatedByCurrentUser : false,
|
|
128
126
|
onDeleteAgent: handleDeleteAgent,
|
|
129
127
|
onEditAgent: onEditAgent,
|
|
130
128
|
onDuplicateAgent: onDuplicateAgent,
|
|
@@ -43,11 +43,8 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
43
43
|
var _agent$user_defined_c, _agent$external_confi, _agent$external_confi2, _agent$creatorInfo, _agent$creatorInfo2, _agent$creatorInfo3, _agent$creatorInfo4;
|
|
44
44
|
var agent = _ref.agent,
|
|
45
45
|
isLoading = _ref.isLoading,
|
|
46
|
-
isCreatedByViewingUser = _ref.isCreatedByViewingUser,
|
|
47
46
|
cloudId = _ref.cloudId,
|
|
48
47
|
_onChatClick = _ref.onChatClick,
|
|
49
|
-
_ref$product = _ref.product,
|
|
50
|
-
product = _ref$product === void 0 ? 'rovo' : _ref$product,
|
|
51
48
|
hasError = _ref.hasError,
|
|
52
49
|
errorType = _ref.errorType,
|
|
53
50
|
onConversationStartersClick = _ref.onConversationStartersClick,
|
|
@@ -222,7 +219,6 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
222
219
|
}
|
|
223
220
|
})), /*#__PURE__*/_react.default.createElement(_Actions.AgentActions, {
|
|
224
221
|
agent: agent,
|
|
225
|
-
isAgentCreatedByCurrentUser: isCreatedByViewingUser,
|
|
226
222
|
onEditAgent: function onEditAgent() {
|
|
227
223
|
return _onEditAgent(agent.id);
|
|
228
224
|
},
|
|
@@ -166,8 +166,6 @@ var AgentProfileCardResourced = exports.AgentProfileCardResourced = function Age
|
|
|
166
166
|
agent: agentData,
|
|
167
167
|
isLoading: isLoading,
|
|
168
168
|
hasError: !!error,
|
|
169
|
-
isCreatedByViewingUser: creatorUserId === props.viewingUserId,
|
|
170
|
-
product: props.product,
|
|
171
169
|
onConversationStartersClick: props.onConversationStartersClick,
|
|
172
170
|
onChatClick: props.onChatClick,
|
|
173
171
|
addFlag: props.addFlag,
|
|
@@ -141,7 +141,6 @@ var AgentProfileCardTrigger = exports.AgentProfileCardTrigger = function AgentPr
|
|
|
141
141
|
};
|
|
142
142
|
}();
|
|
143
143
|
var renderProfileCard = function renderProfileCard(_ref4) {
|
|
144
|
-
var _profileData$creatorI;
|
|
145
144
|
var profileData = _ref4.profileData,
|
|
146
145
|
error = _ref4.error;
|
|
147
146
|
return /*#__PURE__*/_react.default.createElement(_react.Suspense, {
|
|
@@ -149,9 +148,7 @@ var AgentProfileCardTrigger = exports.AgentProfileCardTrigger = function AgentPr
|
|
|
149
148
|
}, /*#__PURE__*/_react.default.createElement(_lazyAgentProfileCard.AgentProfileCardLazy, {
|
|
150
149
|
agent: profileData,
|
|
151
150
|
hasError: !!error,
|
|
152
|
-
isCreatedByViewingUser: (profileData === null || profileData === void 0 ? void 0 : profileData.creatorInfo) && (profileData === null || profileData === void 0 || (_profileData$creatorI = profileData.creatorInfo) === null || _profileData$creatorI === void 0 ? void 0 : _profileData$creatorI.id) === viewingUserId,
|
|
153
151
|
cloudId: props.cloudId,
|
|
154
|
-
product: product,
|
|
155
152
|
errorType: error,
|
|
156
153
|
onChatClick: props.onChatClick,
|
|
157
154
|
onConversationStartersClick: props.onConversationStartersClick,
|
|
@@ -38,9 +38,7 @@ function ProfileCardContent(_ref) {
|
|
|
38
38
|
userId = _ref.userId,
|
|
39
39
|
cloudId = _ref.cloudId,
|
|
40
40
|
resourceClient = _ref.resourceClient,
|
|
41
|
-
viewingUserId = _ref.viewingUserId,
|
|
42
41
|
trigger = _ref.trigger,
|
|
43
|
-
product = _ref.product,
|
|
44
42
|
isAgent = _ref.isAgent,
|
|
45
43
|
profileCardAction = _ref.profileCardAction,
|
|
46
44
|
hasError = _ref.hasError,
|
|
@@ -52,9 +50,7 @@ function ProfileCardContent(_ref) {
|
|
|
52
50
|
accountId: userId,
|
|
53
51
|
cloudId: cloudId,
|
|
54
52
|
resourceClient: resourceClient,
|
|
55
|
-
viewingUserId: viewingUserId,
|
|
56
53
|
trigger: trigger,
|
|
57
|
-
product: product,
|
|
58
54
|
onChatClick: agentActions === null || agentActions === void 0 ? void 0 : agentActions.onChatClick,
|
|
59
55
|
onConversationStartersClick: agentActions === null || agentActions === void 0 ? void 0 : agentActions.onConversationStartersClick,
|
|
60
56
|
addFlag: addFlag
|
|
@@ -29,7 +29,7 @@ var TeamConnections = exports.TeamConnections = function TeamConnections(_ref) {
|
|
|
29
29
|
title = _ref.title,
|
|
30
30
|
containerIcon = _ref.containerIcon,
|
|
31
31
|
link = _ref.link;
|
|
32
|
-
var isContainerIconEnabled = (0, _platformFeatureFlags.fg)('
|
|
32
|
+
var isContainerIconEnabled = (0, _platformFeatureFlags.fg)('loom_tab_in_container_linker_team_profile_page');
|
|
33
33
|
var _getContainerProperti = (0, _teamsPublic.getContainerProperties)({
|
|
34
34
|
containerType: containerType,
|
|
35
35
|
iconSize: 'medium',
|
|
@@ -91,7 +91,7 @@ var NewTeamConnections = exports.NewTeamConnections = function NewTeamConnection
|
|
|
91
91
|
title = _ref2.title,
|
|
92
92
|
containerIcon = _ref2.containerIcon,
|
|
93
93
|
link = _ref2.link;
|
|
94
|
-
var isContainerIconEnabled = (0, _platformFeatureFlags.fg)('
|
|
94
|
+
var isContainerIconEnabled = (0, _platformFeatureFlags.fg)('loom_tab_in_container_linker_team_profile_page');
|
|
95
95
|
var _getContainerProperti2 = (0, _teamsPublic.getContainerProperties)({
|
|
96
96
|
containerType: containerType,
|
|
97
97
|
iconSize: 'medium',
|
|
@@ -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: "23.21.
|
|
48
|
+
packageVersion: "23.21.21"
|
|
49
49
|
}, attributes), {}, {
|
|
50
50
|
firedAt: Math.round((0, _performance.getPageTime)())
|
|
51
51
|
})
|
|
@@ -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', "23.21.
|
|
9
|
+
headers.append('atl-client-version', "23.21.21");
|
|
10
10
|
return headers;
|
|
11
11
|
};
|
|
12
12
|
export async function getOrgIdForCloudIdFromAGG(url, cloudId) {
|
|
@@ -74,7 +74,7 @@ export const addHeaders = headers => {
|
|
|
74
74
|
headers.append('X-ExperimentalApi', 'teams-beta');
|
|
75
75
|
headers.append('X-ExperimentalApi', 'team-members-beta');
|
|
76
76
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
77
|
-
headers.append('atl-client-version', "23.21.
|
|
77
|
+
headers.append('atl-client-version', "23.21.21");
|
|
78
78
|
return headers;
|
|
79
79
|
};
|
|
80
80
|
export async function getTeamFromAGG(url, teamId, siteId) {
|
|
@@ -37,7 +37,6 @@ const actionsWrapperStyles = xcss({
|
|
|
37
37
|
color: 'color.text'
|
|
38
38
|
});
|
|
39
39
|
export const AgentActions = ({
|
|
40
|
-
isAgentCreatedByCurrentUser,
|
|
41
40
|
onEditAgent,
|
|
42
41
|
onDeleteAgent,
|
|
43
42
|
onDuplicateAgent,
|
|
@@ -101,7 +100,6 @@ export const AgentActions = ({
|
|
|
101
100
|
xcss: chatPillTextStyles
|
|
102
101
|
}, formatMessage(messages.actionChatToAgent)))))), /*#__PURE__*/React.createElement(AgentDropdownMenu, {
|
|
103
102
|
agentId: agent.id,
|
|
104
|
-
isAgentCreatedByUser: isAgentCreatedByCurrentUser !== null && isAgentCreatedByCurrentUser !== void 0 ? isAgentCreatedByCurrentUser : false,
|
|
105
103
|
onDeleteAgent: handleDeleteAgent,
|
|
106
104
|
onEditAgent: onEditAgent,
|
|
107
105
|
onDuplicateAgent: onDuplicateAgent,
|
|
@@ -29,10 +29,8 @@ const cardContainerStyles = xcss({
|
|
|
29
29
|
const AgentProfileCard = ({
|
|
30
30
|
agent,
|
|
31
31
|
isLoading,
|
|
32
|
-
isCreatedByViewingUser,
|
|
33
32
|
cloudId,
|
|
34
33
|
onChatClick,
|
|
35
|
-
product = 'rovo',
|
|
36
34
|
hasError,
|
|
37
35
|
errorType,
|
|
38
36
|
onConversationStartersClick,
|
|
@@ -175,7 +173,6 @@ const AgentProfileCard = ({
|
|
|
175
173
|
}
|
|
176
174
|
})), /*#__PURE__*/React.createElement(AgentActions, {
|
|
177
175
|
agent: agent,
|
|
178
|
-
isAgentCreatedByCurrentUser: isCreatedByViewingUser,
|
|
179
176
|
onEditAgent: () => onEditAgent(agent.id),
|
|
180
177
|
onCopyAgent: () => onCopyAgent(agent.id),
|
|
181
178
|
onDuplicateAgent: () => onDuplicateAgent(agent.id),
|
|
@@ -98,8 +98,6 @@ export const AgentProfileCardResourced = props => {
|
|
|
98
98
|
agent: agentData,
|
|
99
99
|
isLoading: isLoading,
|
|
100
100
|
hasError: !!error,
|
|
101
|
-
isCreatedByViewingUser: creatorUserId === props.viewingUserId,
|
|
102
|
-
product: props.product,
|
|
103
101
|
onConversationStartersClick: props.onConversationStartersClick,
|
|
104
102
|
onChatClick: props.onChatClick,
|
|
105
103
|
addFlag: props.addFlag,
|
|
@@ -89,15 +89,12 @@ export const AgentProfileCardTrigger = ({
|
|
|
89
89
|
profileData,
|
|
90
90
|
error
|
|
91
91
|
}) => {
|
|
92
|
-
var _profileData$creatorI;
|
|
93
92
|
return /*#__PURE__*/React.createElement(Suspense, {
|
|
94
93
|
fallback: null
|
|
95
94
|
}, /*#__PURE__*/React.createElement(AgentProfileCardLazy, {
|
|
96
95
|
agent: profileData,
|
|
97
96
|
hasError: !!error,
|
|
98
|
-
isCreatedByViewingUser: (profileData === null || profileData === void 0 ? void 0 : profileData.creatorInfo) && (profileData === null || profileData === void 0 ? void 0 : (_profileData$creatorI = profileData.creatorInfo) === null || _profileData$creatorI === void 0 ? void 0 : _profileData$creatorI.id) === viewingUserId,
|
|
99
97
|
cloudId: props.cloudId,
|
|
100
|
-
product: product,
|
|
101
98
|
errorType: error,
|
|
102
99
|
onChatClick: props.onChatClick,
|
|
103
100
|
onConversationStartersClick: props.onConversationStartersClick,
|
|
@@ -19,9 +19,7 @@ function ProfileCardContent({
|
|
|
19
19
|
userId,
|
|
20
20
|
cloudId,
|
|
21
21
|
resourceClient,
|
|
22
|
-
viewingUserId,
|
|
23
22
|
trigger,
|
|
24
|
-
product,
|
|
25
23
|
isAgent,
|
|
26
24
|
profileCardAction,
|
|
27
25
|
hasError,
|
|
@@ -34,9 +32,7 @@ function ProfileCardContent({
|
|
|
34
32
|
accountId: userId,
|
|
35
33
|
cloudId: cloudId,
|
|
36
34
|
resourceClient: resourceClient,
|
|
37
|
-
viewingUserId: viewingUserId,
|
|
38
35
|
trigger: trigger,
|
|
39
|
-
product: product,
|
|
40
36
|
onChatClick: agentActions === null || agentActions === void 0 ? void 0 : agentActions.onChatClick,
|
|
41
37
|
onConversationStartersClick: agentActions === null || agentActions === void 0 ? void 0 : agentActions.onConversationStartersClick,
|
|
42
38
|
addFlag: addFlag
|
|
@@ -21,7 +21,7 @@ export const TeamConnections = ({
|
|
|
21
21
|
containerIcon,
|
|
22
22
|
link
|
|
23
23
|
}) => {
|
|
24
|
-
const isContainerIconEnabled = fg('
|
|
24
|
+
const isContainerIconEnabled = fg('loom_tab_in_container_linker_team_profile_page');
|
|
25
25
|
const {
|
|
26
26
|
description,
|
|
27
27
|
icon,
|
|
@@ -86,7 +86,7 @@ export const NewTeamConnections = ({
|
|
|
86
86
|
containerIcon,
|
|
87
87
|
link
|
|
88
88
|
}) => {
|
|
89
|
-
const isContainerIconEnabled = fg('
|
|
89
|
+
const isContainerIconEnabled = fg('loom_tab_in_container_linker_team_profile_page');
|
|
90
90
|
const {
|
|
91
91
|
description,
|
|
92
92
|
icon,
|
|
@@ -32,7 +32,7 @@ const createEvent = (eventType, action, actionSubject, actionSubjectId, attribut
|
|
|
32
32
|
actionSubjectId,
|
|
33
33
|
attributes: {
|
|
34
34
|
packageName: "@atlaskit/profilecard",
|
|
35
|
-
packageVersion: "23.21.
|
|
35
|
+
packageVersion: "23.21.21",
|
|
36
36
|
...attributes,
|
|
37
37
|
firedAt: Math.round(getPageTime())
|
|
38
38
|
}
|
|
@@ -4,7 +4,7 @@ import { AGGQuery } from './graphqlUtils';
|
|
|
4
4
|
var ORG_ID_FROM_CLOUD_ID_QUERY = "query OrgIdFromCloudId($cloudId: ID!) {\n\ttenantContexts(cloudIds: [$cloudId]) {\n\t\torgId\n\t}\n}";
|
|
5
5
|
var addHeaders = function addHeaders(headers) {
|
|
6
6
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
7
|
-
headers.append('atl-client-version', "23.21.
|
|
7
|
+
headers.append('atl-client-version', "23.21.21");
|
|
8
8
|
return headers;
|
|
9
9
|
};
|
|
10
10
|
export function getOrgIdForCloudIdFromAGG(_x, _x2) {
|
|
@@ -56,7 +56,7 @@ export var addHeaders = function addHeaders(headers) {
|
|
|
56
56
|
headers.append('X-ExperimentalApi', 'teams-beta');
|
|
57
57
|
headers.append('X-ExperimentalApi', 'team-members-beta');
|
|
58
58
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
59
|
-
headers.append('atl-client-version', "23.21.
|
|
59
|
+
headers.append('atl-client-version', "23.21.21");
|
|
60
60
|
return headers;
|
|
61
61
|
};
|
|
62
62
|
export function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -40,8 +40,7 @@ var actionsWrapperStyles = xcss({
|
|
|
40
40
|
color: 'color.text'
|
|
41
41
|
});
|
|
42
42
|
export var AgentActions = function AgentActions(_ref) {
|
|
43
|
-
var
|
|
44
|
-
onEditAgent = _ref.onEditAgent,
|
|
43
|
+
var onEditAgent = _ref.onEditAgent,
|
|
45
44
|
onDeleteAgent = _ref.onDeleteAgent,
|
|
46
45
|
onDuplicateAgent = _ref.onDuplicateAgent,
|
|
47
46
|
onCopyAgent = _ref.onCopyAgent,
|
|
@@ -114,7 +113,6 @@ export var AgentActions = function AgentActions(_ref) {
|
|
|
114
113
|
xcss: chatPillTextStyles
|
|
115
114
|
}, formatMessage(messages.actionChatToAgent)))))), /*#__PURE__*/React.createElement(AgentDropdownMenu, {
|
|
116
115
|
agentId: agent.id,
|
|
117
|
-
isAgentCreatedByUser: isAgentCreatedByCurrentUser !== null && isAgentCreatedByCurrentUser !== void 0 ? isAgentCreatedByCurrentUser : false,
|
|
118
116
|
onDeleteAgent: handleDeleteAgent,
|
|
119
117
|
onEditAgent: onEditAgent,
|
|
120
118
|
onDuplicateAgent: onDuplicateAgent,
|
|
@@ -33,11 +33,8 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
33
33
|
var _agent$user_defined_c, _agent$external_confi, _agent$external_confi2, _agent$creatorInfo, _agent$creatorInfo2, _agent$creatorInfo3, _agent$creatorInfo4;
|
|
34
34
|
var agent = _ref.agent,
|
|
35
35
|
isLoading = _ref.isLoading,
|
|
36
|
-
isCreatedByViewingUser = _ref.isCreatedByViewingUser,
|
|
37
36
|
cloudId = _ref.cloudId,
|
|
38
37
|
_onChatClick = _ref.onChatClick,
|
|
39
|
-
_ref$product = _ref.product,
|
|
40
|
-
product = _ref$product === void 0 ? 'rovo' : _ref$product,
|
|
41
38
|
hasError = _ref.hasError,
|
|
42
39
|
errorType = _ref.errorType,
|
|
43
40
|
onConversationStartersClick = _ref.onConversationStartersClick,
|
|
@@ -212,7 +209,6 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
212
209
|
}
|
|
213
210
|
})), /*#__PURE__*/React.createElement(AgentActions, {
|
|
214
211
|
agent: agent,
|
|
215
|
-
isAgentCreatedByCurrentUser: isCreatedByViewingUser,
|
|
216
212
|
onEditAgent: function onEditAgent() {
|
|
217
213
|
return _onEditAgent(agent.id);
|
|
218
214
|
},
|
|
@@ -157,8 +157,6 @@ export var AgentProfileCardResourced = function AgentProfileCardResourced(props)
|
|
|
157
157
|
agent: agentData,
|
|
158
158
|
isLoading: isLoading,
|
|
159
159
|
hasError: !!error,
|
|
160
|
-
isCreatedByViewingUser: creatorUserId === props.viewingUserId,
|
|
161
|
-
product: props.product,
|
|
162
160
|
onConversationStartersClick: props.onConversationStartersClick,
|
|
163
161
|
onChatClick: props.onChatClick,
|
|
164
162
|
addFlag: props.addFlag,
|
|
@@ -132,7 +132,6 @@ export var AgentProfileCardTrigger = function AgentProfileCardTrigger(_ref) {
|
|
|
132
132
|
};
|
|
133
133
|
}();
|
|
134
134
|
var renderProfileCard = function renderProfileCard(_ref4) {
|
|
135
|
-
var _profileData$creatorI;
|
|
136
135
|
var profileData = _ref4.profileData,
|
|
137
136
|
error = _ref4.error;
|
|
138
137
|
return /*#__PURE__*/React.createElement(Suspense, {
|
|
@@ -140,9 +139,7 @@ export var AgentProfileCardTrigger = function AgentProfileCardTrigger(_ref) {
|
|
|
140
139
|
}, /*#__PURE__*/React.createElement(AgentProfileCardLazy, {
|
|
141
140
|
agent: profileData,
|
|
142
141
|
hasError: !!error,
|
|
143
|
-
isCreatedByViewingUser: (profileData === null || profileData === void 0 ? void 0 : profileData.creatorInfo) && (profileData === null || profileData === void 0 || (_profileData$creatorI = profileData.creatorInfo) === null || _profileData$creatorI === void 0 ? void 0 : _profileData$creatorI.id) === viewingUserId,
|
|
144
142
|
cloudId: props.cloudId,
|
|
145
|
-
product: product,
|
|
146
143
|
errorType: error,
|
|
147
144
|
onChatClick: props.onChatClick,
|
|
148
145
|
onConversationStartersClick: props.onConversationStartersClick,
|
|
@@ -29,9 +29,7 @@ function ProfileCardContent(_ref) {
|
|
|
29
29
|
userId = _ref.userId,
|
|
30
30
|
cloudId = _ref.cloudId,
|
|
31
31
|
resourceClient = _ref.resourceClient,
|
|
32
|
-
viewingUserId = _ref.viewingUserId,
|
|
33
32
|
trigger = _ref.trigger,
|
|
34
|
-
product = _ref.product,
|
|
35
33
|
isAgent = _ref.isAgent,
|
|
36
34
|
profileCardAction = _ref.profileCardAction,
|
|
37
35
|
hasError = _ref.hasError,
|
|
@@ -43,9 +41,7 @@ function ProfileCardContent(_ref) {
|
|
|
43
41
|
accountId: userId,
|
|
44
42
|
cloudId: cloudId,
|
|
45
43
|
resourceClient: resourceClient,
|
|
46
|
-
viewingUserId: viewingUserId,
|
|
47
44
|
trigger: trigger,
|
|
48
|
-
product: product,
|
|
49
45
|
onChatClick: agentActions === null || agentActions === void 0 ? void 0 : agentActions.onChatClick,
|
|
50
46
|
onConversationStartersClick: agentActions === null || agentActions === void 0 ? void 0 : agentActions.onConversationStartersClick,
|
|
51
47
|
addFlag: addFlag
|
|
@@ -20,7 +20,7 @@ export var TeamConnections = function TeamConnections(_ref) {
|
|
|
20
20
|
title = _ref.title,
|
|
21
21
|
containerIcon = _ref.containerIcon,
|
|
22
22
|
link = _ref.link;
|
|
23
|
-
var isContainerIconEnabled = fg('
|
|
23
|
+
var isContainerIconEnabled = fg('loom_tab_in_container_linker_team_profile_page');
|
|
24
24
|
var _getContainerProperti = getContainerProperties({
|
|
25
25
|
containerType: containerType,
|
|
26
26
|
iconSize: 'medium',
|
|
@@ -82,7 +82,7 @@ export var NewTeamConnections = function NewTeamConnections(_ref2) {
|
|
|
82
82
|
title = _ref2.title,
|
|
83
83
|
containerIcon = _ref2.containerIcon,
|
|
84
84
|
link = _ref2.link;
|
|
85
|
-
var isContainerIconEnabled = fg('
|
|
85
|
+
var isContainerIconEnabled = fg('loom_tab_in_container_linker_team_profile_page');
|
|
86
86
|
var _getContainerProperti2 = getContainerProperties({
|
|
87
87
|
containerType: containerType,
|
|
88
88
|
iconSize: 'medium',
|
|
@@ -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: "23.21.
|
|
42
|
+
packageVersion: "23.21.21"
|
|
43
43
|
}, attributes), {}, {
|
|
44
44
|
firedAt: Math.round(getPageTime())
|
|
45
45
|
})
|
|
@@ -2,7 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import { type ProfileClient, type RovoAgentProfileCardInfo } from '../../types';
|
|
3
3
|
type AgentActionsProps = {
|
|
4
4
|
agent: RovoAgentProfileCardInfo;
|
|
5
|
-
isAgentCreatedByCurrentUser?: boolean;
|
|
6
5
|
onEditAgent: () => void;
|
|
7
6
|
onCopyAgent: () => void;
|
|
8
7
|
onDuplicateAgent: () => void;
|
|
@@ -11,5 +10,5 @@ type AgentActionsProps = {
|
|
|
11
10
|
onViewFullProfileClick: () => void;
|
|
12
11
|
resourceClient: ProfileClient;
|
|
13
12
|
};
|
|
14
|
-
export declare const AgentActions: ({
|
|
13
|
+
export declare const AgentActions: ({ onEditAgent, onDeleteAgent, onDuplicateAgent, onCopyAgent, onChatClick, onViewFullProfileClick, agent, resourceClient, }: AgentActionsProps) => React.JSX.Element;
|
|
15
14
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type AgentProfileCardProps } from '../../types';
|
|
3
|
-
declare const AgentProfileCard: ({ agent, isLoading,
|
|
3
|
+
declare const AgentProfileCard: ({ agent, isLoading, cloudId, onChatClick, hasError, errorType, onConversationStartersClick, resourceClient, addFlag, }: AgentProfileCardProps) => React.JSX.Element;
|
|
4
4
|
export default AgentProfileCard;
|
|
@@ -6,8 +6,6 @@ export type AgentProfileCardResourcedProps = {
|
|
|
6
6
|
resourceClient: ProfileClient;
|
|
7
7
|
trigger?: TriggerType;
|
|
8
8
|
children?: React.ReactNode;
|
|
9
|
-
viewingUserId?: string;
|
|
10
|
-
product?: string;
|
|
11
9
|
addFlag?: (flag: Flag) => void;
|
|
12
10
|
} & AgentActionsType;
|
|
13
11
|
export declare const AgentProfileCardResourced: (props: AgentProfileCardResourcedProps) => React.JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const AgentProfileCardLazy: import("react").LazyExoticComponent<({ agent, isLoading,
|
|
2
|
+
export declare const AgentProfileCardLazy: import("react").LazyExoticComponent<({ agent, isLoading, cloudId, onChatClick, hasError, errorType, onConversationStartersClick, resourceClient, addFlag, }: import("../../types").AgentProfileCardProps) => import("react").JSX.Element>;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -356,9 +356,7 @@ export type AgentProfileCardProps = {
|
|
|
356
356
|
agent?: RovoAgentProfileCardInfo;
|
|
357
357
|
isLoading?: boolean;
|
|
358
358
|
hasError?: boolean;
|
|
359
|
-
isCreatedByViewingUser?: boolean;
|
|
360
359
|
cloudId?: string;
|
|
361
|
-
product?: string;
|
|
362
360
|
errorType?: ProfileCardErrorType;
|
|
363
361
|
addFlag?: (flag: Flag) => void;
|
|
364
362
|
} & AgentActionsType;
|
|
@@ -2,7 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import { type ProfileClient, type RovoAgentProfileCardInfo } from '../../types';
|
|
3
3
|
type AgentActionsProps = {
|
|
4
4
|
agent: RovoAgentProfileCardInfo;
|
|
5
|
-
isAgentCreatedByCurrentUser?: boolean;
|
|
6
5
|
onEditAgent: () => void;
|
|
7
6
|
onCopyAgent: () => void;
|
|
8
7
|
onDuplicateAgent: () => void;
|
|
@@ -11,5 +10,5 @@ type AgentActionsProps = {
|
|
|
11
10
|
onViewFullProfileClick: () => void;
|
|
12
11
|
resourceClient: ProfileClient;
|
|
13
12
|
};
|
|
14
|
-
export declare const AgentActions: ({
|
|
13
|
+
export declare const AgentActions: ({ onEditAgent, onDeleteAgent, onDuplicateAgent, onCopyAgent, onChatClick, onViewFullProfileClick, agent, resourceClient, }: AgentActionsProps) => React.JSX.Element;
|
|
15
14
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type AgentProfileCardProps } from '../../types';
|
|
3
|
-
declare const AgentProfileCard: ({ agent, isLoading,
|
|
3
|
+
declare const AgentProfileCard: ({ agent, isLoading, cloudId, onChatClick, hasError, errorType, onConversationStartersClick, resourceClient, addFlag, }: AgentProfileCardProps) => React.JSX.Element;
|
|
4
4
|
export default AgentProfileCard;
|
|
@@ -6,8 +6,6 @@ export type AgentProfileCardResourcedProps = {
|
|
|
6
6
|
resourceClient: ProfileClient;
|
|
7
7
|
trigger?: TriggerType;
|
|
8
8
|
children?: React.ReactNode;
|
|
9
|
-
viewingUserId?: string;
|
|
10
|
-
product?: string;
|
|
11
9
|
addFlag?: (flag: Flag) => void;
|
|
12
10
|
} & AgentActionsType;
|
|
13
11
|
export declare const AgentProfileCardResourced: (props: AgentProfileCardResourcedProps) => React.JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const AgentProfileCardLazy: import("react").LazyExoticComponent<({ agent, isLoading,
|
|
2
|
+
export declare const AgentProfileCardLazy: import("react").LazyExoticComponent<({ agent, isLoading, cloudId, onChatClick, hasError, errorType, onConversationStartersClick, resourceClient, addFlag, }: import("../../types").AgentProfileCardProps) => import("react").JSX.Element>;
|
|
@@ -362,9 +362,7 @@ export type AgentProfileCardProps = {
|
|
|
362
362
|
agent?: RovoAgentProfileCardInfo;
|
|
363
363
|
isLoading?: boolean;
|
|
364
364
|
hasError?: boolean;
|
|
365
|
-
isCreatedByViewingUser?: boolean;
|
|
366
365
|
cloudId?: string;
|
|
367
|
-
product?: string;
|
|
368
366
|
errorType?: ProfileCardErrorType;
|
|
369
367
|
addFlag?: (flag: Flag) => void;
|
|
370
368
|
} & AgentActionsType;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/profilecard",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "24.0.0",
|
|
4
4
|
"description": "A React component to display a card with user information.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
72
72
|
"@atlaskit/popup": "^4.3.0",
|
|
73
73
|
"@atlaskit/primitives": "^14.11.0",
|
|
74
|
-
"@atlaskit/rovo-agent-components": "^
|
|
74
|
+
"@atlaskit/rovo-agent-components": "^3.0.0",
|
|
75
75
|
"@atlaskit/rovo-triggers": "^3.1.0",
|
|
76
76
|
"@atlaskit/spinner": "^19.0.0",
|
|
77
77
|
"@atlaskit/teams-app-config": "^1.10.0",
|
|
@@ -171,9 +171,6 @@
|
|
|
171
171
|
"loom_tab_in_container_linker_team_profile_page": {
|
|
172
172
|
"type": "boolean"
|
|
173
173
|
},
|
|
174
|
-
"enable_web_links_in_team_containers": {
|
|
175
|
-
"type": "boolean"
|
|
176
|
-
},
|
|
177
174
|
"platform-adopt-teams-nav-config": {
|
|
178
175
|
"type": "boolean"
|
|
179
176
|
},
|
package/tsconfig.json
CHANGED
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"extends": "../../../tsconfig.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
},
|
|
3
|
+
"compilerOptions": {},
|
|
5
4
|
"include": [
|
|
6
5
|
"./src/**/*.ts",
|
|
7
6
|
"./src/**/*.tsx",
|
|
8
7
|
"./docs/**/*.ts",
|
|
9
8
|
"./docs/**/*.tsx",
|
|
10
9
|
"./examples/**/*.ts",
|
|
11
|
-
"./examples/**/*.tsx"
|
|
10
|
+
"./examples/**/*.tsx",
|
|
11
|
+
"**/stories.ts",
|
|
12
|
+
"**/stories.tsx",
|
|
13
|
+
"**/stories/*.ts",
|
|
14
|
+
"**/stories/*.tsx",
|
|
15
|
+
"**/stories/**/*.ts",
|
|
16
|
+
"**/stories/**/*.tsx"
|
|
12
17
|
]
|
|
13
18
|
}
|