@atlaskit/profilecard 20.3.0 → 20.4.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 +12 -0
- package/dist/cjs/client/getTeamFromAGG.js +1 -1
- package/dist/cjs/components/Agent/AgentProfileCard.js +2 -2
- package/dist/cjs/components/Agent/AgentProfileCardResourced.js +2 -1
- package/dist/cjs/components/Agent/hooks/useAgentActions.js +3 -2
- package/dist/cjs/util/analytics.js +1 -1
- package/dist/es2019/client/getTeamFromAGG.js +1 -1
- package/dist/es2019/components/Agent/AgentProfileCard.js +2 -2
- package/dist/es2019/components/Agent/AgentProfileCardResourced.js +2 -1
- package/dist/es2019/components/Agent/hooks/useAgentActions.js +3 -2
- package/dist/es2019/util/analytics.js +1 -1
- package/dist/esm/client/getTeamFromAGG.js +1 -1
- package/dist/esm/components/Agent/AgentProfileCard.js +2 -2
- package/dist/esm/components/Agent/AgentProfileCardResourced.js +2 -1
- package/dist/esm/components/Agent/hooks/useAgentActions.js +3 -2
- package/dist/esm/util/analytics.js +1 -1
- package/dist/types/components/Agent/hooks/useAgentActions.d.ts +1 -1
- package/dist/types-ts4.5/components/Agent/hooks/useAgentActions.d.ts +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/profilecard
|
|
2
2
|
|
|
3
|
+
## 20.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#144898](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/144898)
|
|
8
|
+
[`6fff66dce97ec`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/6fff66dce97ec) -
|
|
9
|
+
Pass agent id to full screen agent chat
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 20.3.0
|
|
4
16
|
|
|
5
17
|
### Minor 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.4.0");
|
|
61
61
|
return headers;
|
|
62
62
|
};
|
|
63
63
|
function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -58,7 +58,7 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
58
58
|
_onEditAgent = _useAgentUrlActions.onEditAgent,
|
|
59
59
|
_onCopyAgent = _useAgentUrlActions.onCopyAgent,
|
|
60
60
|
_onDuplicateAgent = _useAgentUrlActions.onDuplicateAgent,
|
|
61
|
-
|
|
61
|
+
onOpenChatFullScreen = _useAgentUrlActions.onOpenChat,
|
|
62
62
|
onConversationStarter = _useAgentUrlActions.onConversationStarter;
|
|
63
63
|
var _useState = (0, _react.useState)(false),
|
|
64
64
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -225,7 +225,7 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
225
225
|
},
|
|
226
226
|
onDeleteAgent: handleOnDelete,
|
|
227
227
|
onChatClick: function onChatClick() {
|
|
228
|
-
return _onChatClick ? _onChatClick() :
|
|
228
|
+
return _onChatClick ? _onChatClick() : onOpenChatFullScreen(agent.id);
|
|
229
229
|
}
|
|
230
230
|
})));
|
|
231
231
|
};
|
|
@@ -180,7 +180,8 @@ var AgentProfileCardResourced = exports.AgentProfileCardResourced = function Age
|
|
|
180
180
|
onConversationStartersClick: props.onConversationStartersClick,
|
|
181
181
|
onChatClick: props.onChatClick,
|
|
182
182
|
addFlag: props.addFlag,
|
|
183
|
-
resourceClient: props.resourceClient
|
|
183
|
+
resourceClient: props.resourceClient,
|
|
184
|
+
cloudId: props.cloudId
|
|
184
185
|
});
|
|
185
186
|
}
|
|
186
187
|
return null;
|
|
@@ -65,12 +65,13 @@ var useAgentUrlActions = exports.useAgentUrlActions = function useAgentUrlAction
|
|
|
65
65
|
})));
|
|
66
66
|
window.open(urlWithParams, '_blank', 'noopener, noreferrer');
|
|
67
67
|
};
|
|
68
|
-
var onOpenChat = function onOpenChat() {
|
|
68
|
+
var onOpenChat = function onOpenChat(agentId) {
|
|
69
69
|
var baseUrl = "".concat((0, _atlassianContext.getATLContextUrl)('home'), "/chat");
|
|
70
70
|
var urlWithParams = (0, _url.encodeParamsToUrl)(baseUrl, _objectSpread({
|
|
71
71
|
cloudId: cloudId
|
|
72
72
|
}, createRovoParams({
|
|
73
|
-
cloudId: cloudId
|
|
73
|
+
cloudId: cloudId,
|
|
74
|
+
agentId: agentId
|
|
74
75
|
})));
|
|
75
76
|
window.open(urlWithParams, '_blank', 'noopener, noreferrer');
|
|
76
77
|
};
|
|
@@ -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.4.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.4.0");
|
|
71
71
|
return headers;
|
|
72
72
|
};
|
|
73
73
|
export async function getTeamFromAGG(url, teamId, siteId) {
|
|
@@ -43,7 +43,7 @@ const AgentProfileCard = ({
|
|
|
43
43
|
onEditAgent,
|
|
44
44
|
onCopyAgent,
|
|
45
45
|
onDuplicateAgent,
|
|
46
|
-
onOpenChat:
|
|
46
|
+
onOpenChat: onOpenChatFullScreen,
|
|
47
47
|
onConversationStarter
|
|
48
48
|
} = useAgentUrlActions({
|
|
49
49
|
cloudId: cloudId || ''
|
|
@@ -171,7 +171,7 @@ const AgentProfileCard = ({
|
|
|
171
171
|
onCopyAgent: () => onCopyAgent(agent.id),
|
|
172
172
|
onDuplicateAgent: () => onDuplicateAgent(agent.id),
|
|
173
173
|
onDeleteAgent: handleOnDelete,
|
|
174
|
-
onChatClick: () => onChatClick ? onChatClick() :
|
|
174
|
+
onChatClick: () => onChatClick ? onChatClick() : onOpenChatFullScreen(agent.id)
|
|
175
175
|
})));
|
|
176
176
|
};
|
|
177
177
|
export default AgentProfileCard;
|
|
@@ -98,7 +98,8 @@ export const AgentProfileCardResourced = props => {
|
|
|
98
98
|
onConversationStartersClick: props.onConversationStartersClick,
|
|
99
99
|
onChatClick: props.onChatClick,
|
|
100
100
|
addFlag: props.addFlag,
|
|
101
|
-
resourceClient: props.resourceClient
|
|
101
|
+
resourceClient: props.resourceClient,
|
|
102
|
+
cloudId: props.cloudId
|
|
102
103
|
});
|
|
103
104
|
}
|
|
104
105
|
return null;
|
|
@@ -54,12 +54,13 @@ export const useAgentUrlActions = ({
|
|
|
54
54
|
});
|
|
55
55
|
window.open(urlWithParams, '_blank', 'noopener, noreferrer');
|
|
56
56
|
};
|
|
57
|
-
const onOpenChat =
|
|
57
|
+
const onOpenChat = agentId => {
|
|
58
58
|
const baseUrl = `${getATLContextUrl('home')}/chat`;
|
|
59
59
|
const urlWithParams = encodeParamsToUrl(baseUrl, {
|
|
60
60
|
cloudId,
|
|
61
61
|
...createRovoParams({
|
|
62
|
-
cloudId
|
|
62
|
+
cloudId,
|
|
63
|
+
agentId
|
|
63
64
|
})
|
|
64
65
|
});
|
|
65
66
|
window.open(urlWithParams, '_blank', 'noopener, noreferrer');
|
|
@@ -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.4.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.4.0");
|
|
52
52
|
return headers;
|
|
53
53
|
};
|
|
54
54
|
export function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -48,7 +48,7 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
48
48
|
_onEditAgent = _useAgentUrlActions.onEditAgent,
|
|
49
49
|
_onCopyAgent = _useAgentUrlActions.onCopyAgent,
|
|
50
50
|
_onDuplicateAgent = _useAgentUrlActions.onDuplicateAgent,
|
|
51
|
-
|
|
51
|
+
onOpenChatFullScreen = _useAgentUrlActions.onOpenChat,
|
|
52
52
|
onConversationStarter = _useAgentUrlActions.onConversationStarter;
|
|
53
53
|
var _useState = useState(false),
|
|
54
54
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -215,7 +215,7 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
215
215
|
},
|
|
216
216
|
onDeleteAgent: handleOnDelete,
|
|
217
217
|
onChatClick: function onChatClick() {
|
|
218
|
-
return _onChatClick ? _onChatClick() :
|
|
218
|
+
return _onChatClick ? _onChatClick() : onOpenChatFullScreen(agent.id);
|
|
219
219
|
}
|
|
220
220
|
})));
|
|
221
221
|
};
|
|
@@ -170,7 +170,8 @@ export var AgentProfileCardResourced = function AgentProfileCardResourced(props)
|
|
|
170
170
|
onConversationStartersClick: props.onConversationStartersClick,
|
|
171
171
|
onChatClick: props.onChatClick,
|
|
172
172
|
addFlag: props.addFlag,
|
|
173
|
-
resourceClient: props.resourceClient
|
|
173
|
+
resourceClient: props.resourceClient,
|
|
174
|
+
cloudId: props.cloudId
|
|
174
175
|
});
|
|
175
176
|
}
|
|
176
177
|
return null;
|
|
@@ -58,12 +58,13 @@ export var useAgentUrlActions = function useAgentUrlActions(_ref3) {
|
|
|
58
58
|
})));
|
|
59
59
|
window.open(urlWithParams, '_blank', 'noopener, noreferrer');
|
|
60
60
|
};
|
|
61
|
-
var onOpenChat = function onOpenChat() {
|
|
61
|
+
var onOpenChat = function onOpenChat(agentId) {
|
|
62
62
|
var baseUrl = "".concat(getATLContextUrl('home'), "/chat");
|
|
63
63
|
var urlWithParams = encodeParamsToUrl(baseUrl, _objectSpread({
|
|
64
64
|
cloudId: cloudId
|
|
65
65
|
}, createRovoParams({
|
|
66
|
-
cloudId: cloudId
|
|
66
|
+
cloudId: cloudId,
|
|
67
|
+
agentId: agentId
|
|
67
68
|
})));
|
|
68
69
|
window.open(urlWithParams, '_blank', 'noopener, noreferrer');
|
|
69
70
|
};
|
|
@@ -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.4.0"
|
|
43
43
|
}, attributes), {}, {
|
|
44
44
|
firedAt: Math.round(getPageTime())
|
|
45
45
|
})
|
|
@@ -5,7 +5,7 @@ export declare const useAgentUrlActions: ({ cloudId }: {
|
|
|
5
5
|
onEditAgent: (agentId: string) => void;
|
|
6
6
|
onCopyAgent: (agentId: string) => void;
|
|
7
7
|
onDuplicateAgent: (agentId: string) => void;
|
|
8
|
-
onOpenChat: () => void;
|
|
8
|
+
onOpenChat: (agentId: string) => void;
|
|
9
9
|
onConversationStarter: ({ agentId, prompt }: {
|
|
10
10
|
agentId: string;
|
|
11
11
|
prompt: string;
|
|
@@ -5,7 +5,7 @@ export declare const useAgentUrlActions: ({ cloudId }: {
|
|
|
5
5
|
onEditAgent: (agentId: string) => void;
|
|
6
6
|
onCopyAgent: (agentId: string) => void;
|
|
7
7
|
onDuplicateAgent: (agentId: string) => void;
|
|
8
|
-
onOpenChat: () => void;
|
|
8
|
+
onOpenChat: (agentId: string) => void;
|
|
9
9
|
onConversationStarter: ({ agentId, prompt }: {
|
|
10
10
|
agentId: string;
|
|
11
11
|
prompt: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/profilecard",
|
|
3
|
-
"version": "20.
|
|
3
|
+
"version": "20.4.0",
|
|
4
4
|
"description": "A React component to display a card with user information.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"@atlaskit/empty-state": "^7.11.0",
|
|
59
59
|
"@atlaskit/focus-ring": "^1.6.0",
|
|
60
60
|
"@atlaskit/give-kudos": "^2.2.0",
|
|
61
|
-
"@atlaskit/icon": "^22.
|
|
61
|
+
"@atlaskit/icon": "^22.20.0",
|
|
62
62
|
"@atlaskit/lozenge": "^11.11.0",
|
|
63
63
|
"@atlaskit/menu": "^2.12.0",
|
|
64
64
|
"@atlaskit/modal-dialog": "^12.17.0",
|