@atlaskit/profilecard 26.6.0 → 26.8.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 +23 -0
- package/dist/cjs/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/cjs/client/getTeamFromAGG.js +1 -1
- package/dist/cjs/components/Agent/AgentProfileCard.js +4 -2
- package/dist/cjs/components/Agent/AgentProfileCardResourced.js +4 -2
- package/dist/cjs/components/Agent/AgentProfileCardTrigger.js +4 -2
- package/dist/cjs/util/analytics.js +2 -2
- package/dist/es2019/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/es2019/client/getTeamFromAGG.js +1 -1
- package/dist/es2019/components/Agent/AgentProfileCard.js +3 -2
- package/dist/es2019/components/Agent/AgentProfileCardResourced.js +4 -2
- package/dist/es2019/components/Agent/AgentProfileCardTrigger.js +4 -2
- package/dist/es2019/util/analytics.js +2 -2
- package/dist/esm/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/esm/client/getTeamFromAGG.js +1 -1
- package/dist/esm/components/Agent/AgentProfileCard.js +4 -2
- package/dist/esm/components/Agent/AgentProfileCardResourced.js +4 -2
- package/dist/esm/components/Agent/AgentProfileCardTrigger.js +4 -2
- package/dist/esm/util/analytics.js +2 -2
- package/dist/types/components/Agent/AgentProfileCard.d.ts +1 -1
- package/dist/types/components/Agent/AgentProfileCardResourced.d.ts +2 -0
- package/dist/types/components/Agent/lazyAgentProfileCard.d.ts +1 -1
- package/dist/types/types.d.ts +3 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @atlaskit/profilecard
|
|
2
2
|
|
|
3
|
+
## 26.8.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`663afd59ab193`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/663afd59ab193) -
|
|
8
|
+
Agent mentions in Rovo chat history now open the agent profile card on click (behind the
|
|
9
|
+
rovo_chat_agent_selection gate). The renderer and editor-common Mention now thread the mention
|
|
10
|
+
userType so an 'APP' (agent) mention renders an AgentProfileCardTrigger; AgentProfileCardTrigger
|
|
11
|
+
now honors a passed trigger prop.
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
17
|
+
## 26.7.0
|
|
18
|
+
|
|
19
|
+
### Minor Changes
|
|
20
|
+
|
|
21
|
+
- [`93235e9d6a758`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/93235e9d6a758) -
|
|
22
|
+
Add a hideStarButton prop to the agent profile card (AgentProfileCard, AgentProfileCardResourced,
|
|
23
|
+
AgentProfileCardTrigger) so consumers can hide the favourite/star icon — e.g. for the Rovo profile
|
|
24
|
+
card and private agent profile card.
|
|
25
|
+
|
|
3
26
|
## 26.6.0
|
|
4
27
|
|
|
5
28
|
### Minor Changes
|
|
@@ -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', "26.
|
|
14
|
+
headers.append('atl-client-version', "26.7.0");
|
|
15
15
|
return headers;
|
|
16
16
|
};
|
|
17
17
|
function getOrgIdForCloudIdFromAGG(_x, _x2) {
|
|
@@ -66,7 +66,7 @@ var addHeaders = exports.addHeaders = function addHeaders(headers) {
|
|
|
66
66
|
headers.append('X-ExperimentalApi', 'teams-beta');
|
|
67
67
|
headers.append('X-ExperimentalApi', 'team-members-beta');
|
|
68
68
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
69
|
-
headers.append('atl-client-version', "26.
|
|
69
|
+
headers.append('atl-client-version', "26.7.0");
|
|
70
70
|
return headers;
|
|
71
71
|
};
|
|
72
72
|
function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -64,7 +64,9 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
64
64
|
_ref$hideConversation = _ref.hideConversationStarters,
|
|
65
65
|
hideConversationStarters = _ref$hideConversation === void 0 ? false : _ref$hideConversation,
|
|
66
66
|
_ref$hideAgentActions = _ref.hideAgentActions,
|
|
67
|
-
hideAgentActions = _ref$hideAgentActions === void 0 ? false : _ref$hideAgentActions
|
|
67
|
+
hideAgentActions = _ref$hideAgentActions === void 0 ? false : _ref$hideAgentActions,
|
|
68
|
+
_ref$hideStarButton = _ref.hideStarButton,
|
|
69
|
+
hideStarButton = _ref$hideStarButton === void 0 ? false : _ref$hideStarButton;
|
|
68
70
|
var _useAgentUrlActions = (0, _useAgentActions.useAgentUrlActions)({
|
|
69
71
|
cloudId: cloudId || '',
|
|
70
72
|
email: email,
|
|
@@ -230,7 +232,7 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
230
232
|
agentName: agent.name,
|
|
231
233
|
isStarred: isStarred,
|
|
232
234
|
onStarToggle: handleSetFavourite,
|
|
233
|
-
showStarButton: !isRovoDev,
|
|
235
|
+
showStarButton: !isRovoDev && !hideStarButton,
|
|
234
236
|
isHidden: agent.visibility === 'PRIVATE',
|
|
235
237
|
creatorRender: ((_agent$creatorInfo = agent.creatorInfo) === null || _agent$creatorInfo === void 0 ? void 0 : _agent$creatorInfo.type) && /*#__PURE__*/_react.default.createElement(_AgentProfileInfo.AgentProfileCreator, {
|
|
236
238
|
creator: {
|
|
@@ -200,7 +200,8 @@ var AgentProfileCardResourced = exports.AgentProfileCardResourced = function Age
|
|
|
200
200
|
cloudId: props.cloudId,
|
|
201
201
|
hideAgentActions: true,
|
|
202
202
|
hideConversationStarters: true,
|
|
203
|
-
hideAiDisclaimer: true
|
|
203
|
+
hideAiDisclaimer: true,
|
|
204
|
+
hideStarButton: props.hideStarButton
|
|
204
205
|
})));
|
|
205
206
|
}
|
|
206
207
|
if (error || !isLoading && !agentData) {
|
|
@@ -227,6 +228,7 @@ var AgentProfileCardResourced = exports.AgentProfileCardResourced = function Age
|
|
|
227
228
|
hideMoreActions: props.hideMoreActions,
|
|
228
229
|
hideAiDisclaimer: props.hideAiDisclaimer,
|
|
229
230
|
hideConversationStarters: props.hideConversationStarters,
|
|
230
|
-
hideAgentActions: props.hideAgentActions
|
|
231
|
+
hideAgentActions: props.hideAgentActions,
|
|
232
|
+
hideStarButton: props.hideStarButton
|
|
231
233
|
}));
|
|
232
234
|
};
|
|
@@ -23,6 +23,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
23
23
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
24
24
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
25
25
|
var AgentProfileCardTrigger = exports.AgentProfileCardTrigger = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
26
|
+
var _props$trigger;
|
|
26
27
|
var props = (0, _extends2.default)({}, ((0, _objectDestructuringEmpty2.default)(_ref), _ref));
|
|
27
28
|
var resourceClient = props.resourceClient,
|
|
28
29
|
userId = props.agentId,
|
|
@@ -178,12 +179,13 @@ var AgentProfileCardTrigger = exports.AgentProfileCardTrigger = /*#__PURE__*/(0,
|
|
|
178
179
|
onConversationStartersClick: props.onConversationStartersClick,
|
|
179
180
|
resourceClient: props.resourceClient,
|
|
180
181
|
onDeleteAgent: props.onDeleteAgent,
|
|
181
|
-
addFlag: props.addFlag
|
|
182
|
+
addFlag: props.addFlag,
|
|
183
|
+
hideStarButton: props.hideStarButton
|
|
182
184
|
}));
|
|
183
185
|
};
|
|
184
186
|
return /*#__PURE__*/_react.default.createElement(_ProfileCardTrigger.default, (0, _extends2.default)({}, props, {
|
|
185
187
|
ref: ref,
|
|
186
|
-
trigger:
|
|
188
|
+
trigger: (_props$trigger = props.trigger) !== null && _props$trigger !== void 0 ? _props$trigger : 'hover',
|
|
187
189
|
renderProfileCard: renderProfileCard,
|
|
188
190
|
fetchProfile: fetchAgentProfile,
|
|
189
191
|
fireAnalytics: fireEvent,
|
|
@@ -12,7 +12,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
12
12
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13
13
|
var PACKAGE_META_DATA = exports.PACKAGE_META_DATA = {
|
|
14
14
|
packageName: (_process$env$_PACKAGE = "@atlaskit/profilecard") !== null && _process$env$_PACKAGE !== void 0 ? _process$env$_PACKAGE : '',
|
|
15
|
-
packageVersion: (_process$env$_PACKAGE2 = "26.
|
|
15
|
+
packageVersion: (_process$env$_PACKAGE2 = "26.7.0") !== null && _process$env$_PACKAGE2 !== void 0 ? _process$env$_PACKAGE2 : ''
|
|
16
16
|
};
|
|
17
17
|
var TEAM_SUBJECT = 'teamProfileCard';
|
|
18
18
|
var USER_SUBJECT = 'profilecard';
|
|
@@ -31,7 +31,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
31
31
|
actionSubjectId: actionSubjectId,
|
|
32
32
|
attributes: _objectSpread(_objectSpread({
|
|
33
33
|
packageName: "@atlaskit/profilecard",
|
|
34
|
-
packageVersion: "26.
|
|
34
|
+
packageVersion: "26.7.0"
|
|
35
35
|
}, attributes), {}, {
|
|
36
36
|
firedAt: Math.round((0, _performance.getPageTime)())
|
|
37
37
|
})
|
|
@@ -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', "26.
|
|
9
|
+
headers.append('atl-client-version', "26.7.0");
|
|
10
10
|
return headers;
|
|
11
11
|
};
|
|
12
12
|
export async function getOrgIdForCloudIdFromAGG(url, cloudId) {
|
|
@@ -78,7 +78,7 @@ export const addHeaders = headers => {
|
|
|
78
78
|
headers.append('X-ExperimentalApi', 'teams-beta');
|
|
79
79
|
headers.append('X-ExperimentalApi', 'team-members-beta');
|
|
80
80
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
81
|
-
headers.append('atl-client-version', "26.
|
|
81
|
+
headers.append('atl-client-version', "26.7.0");
|
|
82
82
|
return headers;
|
|
83
83
|
};
|
|
84
84
|
export async function getTeamFromAGG(url, teamId, siteId) {
|
|
@@ -45,7 +45,8 @@ const AgentProfileCard = ({
|
|
|
45
45
|
hideMoreActions,
|
|
46
46
|
hideAiDisclaimer = false,
|
|
47
47
|
hideConversationStarters = false,
|
|
48
|
-
hideAgentActions = false
|
|
48
|
+
hideAgentActions = false,
|
|
49
|
+
hideStarButton = false
|
|
49
50
|
}) => {
|
|
50
51
|
var _agent$user_defined_c, _agent$external_confi, _agent$external_confi2, _agent$creatorInfo, _agent$creatorInfo2, _agent$creatorInfo3, _agent$creatorInfo4;
|
|
51
52
|
const {
|
|
@@ -180,7 +181,7 @@ const AgentProfileCard = ({
|
|
|
180
181
|
agentName: agent.name,
|
|
181
182
|
isStarred: isStarred,
|
|
182
183
|
onStarToggle: handleSetFavourite,
|
|
183
|
-
showStarButton: !isRovoDev,
|
|
184
|
+
showStarButton: !isRovoDev && !hideStarButton,
|
|
184
185
|
isHidden: agent.visibility === 'PRIVATE',
|
|
185
186
|
creatorRender: ((_agent$creatorInfo = agent.creatorInfo) === null || _agent$creatorInfo === void 0 ? void 0 : _agent$creatorInfo.type) && /*#__PURE__*/React.createElement(AgentProfileCreator, {
|
|
186
187
|
creator: {
|
|
@@ -138,7 +138,8 @@ export const AgentProfileCardResourced = props => {
|
|
|
138
138
|
cloudId: props.cloudId,
|
|
139
139
|
hideAgentActions: true,
|
|
140
140
|
hideConversationStarters: true,
|
|
141
|
-
hideAiDisclaimer: true
|
|
141
|
+
hideAiDisclaimer: true,
|
|
142
|
+
hideStarButton: props.hideStarButton
|
|
142
143
|
})));
|
|
143
144
|
}
|
|
144
145
|
if (error || !isLoading && !agentData) {
|
|
@@ -165,6 +166,7 @@ export const AgentProfileCardResourced = props => {
|
|
|
165
166
|
hideMoreActions: props.hideMoreActions,
|
|
166
167
|
hideAiDisclaimer: props.hideAiDisclaimer,
|
|
167
168
|
hideConversationStarters: props.hideConversationStarters,
|
|
168
|
-
hideAgentActions: props.hideAgentActions
|
|
169
|
+
hideAgentActions: props.hideAgentActions,
|
|
170
|
+
hideStarButton: props.hideStarButton
|
|
169
171
|
}));
|
|
170
172
|
};
|
|
@@ -10,6 +10,7 @@ import { AgentProfileCardLazy } from './lazyAgentProfileCard';
|
|
|
10
10
|
export const AgentProfileCardTrigger = /*#__PURE__*/forwardRef(({
|
|
11
11
|
...props
|
|
12
12
|
}, ref) => {
|
|
13
|
+
var _props$trigger;
|
|
13
14
|
const {
|
|
14
15
|
resourceClient,
|
|
15
16
|
agentId: userId,
|
|
@@ -123,12 +124,13 @@ export const AgentProfileCardTrigger = /*#__PURE__*/forwardRef(({
|
|
|
123
124
|
onConversationStartersClick: props.onConversationStartersClick,
|
|
124
125
|
resourceClient: props.resourceClient,
|
|
125
126
|
onDeleteAgent: props.onDeleteAgent,
|
|
126
|
-
addFlag: props.addFlag
|
|
127
|
+
addFlag: props.addFlag,
|
|
128
|
+
hideStarButton: props.hideStarButton
|
|
127
129
|
}));
|
|
128
130
|
};
|
|
129
131
|
return /*#__PURE__*/React.createElement(ProfileCardTrigger, _extends({}, props, {
|
|
130
132
|
ref: ref,
|
|
131
|
-
trigger:
|
|
133
|
+
trigger: (_props$trigger = props.trigger) !== null && _props$trigger !== void 0 ? _props$trigger : 'hover',
|
|
132
134
|
renderProfileCard: renderProfileCard,
|
|
133
135
|
fetchProfile: fetchAgentProfile,
|
|
134
136
|
fireAnalytics: fireEvent,
|
|
@@ -2,7 +2,7 @@ var _process$env$_PACKAGE, _process$env$_PACKAGE2;
|
|
|
2
2
|
import { getPageTime } from './performance';
|
|
3
3
|
export const PACKAGE_META_DATA = {
|
|
4
4
|
packageName: (_process$env$_PACKAGE = "@atlaskit/profilecard") !== null && _process$env$_PACKAGE !== void 0 ? _process$env$_PACKAGE : '',
|
|
5
|
-
packageVersion: (_process$env$_PACKAGE2 = "26.
|
|
5
|
+
packageVersion: (_process$env$_PACKAGE2 = "26.7.0") !== null && _process$env$_PACKAGE2 !== void 0 ? _process$env$_PACKAGE2 : ''
|
|
6
6
|
};
|
|
7
7
|
const TEAM_SUBJECT = 'teamProfileCard';
|
|
8
8
|
const USER_SUBJECT = 'profilecard';
|
|
@@ -19,7 +19,7 @@ const createEvent = (eventType, action, actionSubject, actionSubjectId, attribut
|
|
|
19
19
|
actionSubjectId,
|
|
20
20
|
attributes: {
|
|
21
21
|
packageName: "@atlaskit/profilecard",
|
|
22
|
-
packageVersion: "26.
|
|
22
|
+
packageVersion: "26.7.0",
|
|
23
23
|
...attributes,
|
|
24
24
|
firedAt: Math.round(getPageTime())
|
|
25
25
|
}
|
|
@@ -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', "26.
|
|
7
|
+
headers.append('atl-client-version', "26.7.0");
|
|
8
8
|
return headers;
|
|
9
9
|
};
|
|
10
10
|
export function getOrgIdForCloudIdFromAGG(_x, _x2) {
|
|
@@ -59,7 +59,7 @@ export var addHeaders = function addHeaders(headers) {
|
|
|
59
59
|
headers.append('X-ExperimentalApi', 'teams-beta');
|
|
60
60
|
headers.append('X-ExperimentalApi', 'team-members-beta');
|
|
61
61
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
62
|
-
headers.append('atl-client-version', "26.
|
|
62
|
+
headers.append('atl-client-version', "26.7.0");
|
|
63
63
|
return headers;
|
|
64
64
|
};
|
|
65
65
|
export function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -55,7 +55,9 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
55
55
|
_ref$hideConversation = _ref.hideConversationStarters,
|
|
56
56
|
hideConversationStarters = _ref$hideConversation === void 0 ? false : _ref$hideConversation,
|
|
57
57
|
_ref$hideAgentActions = _ref.hideAgentActions,
|
|
58
|
-
hideAgentActions = _ref$hideAgentActions === void 0 ? false : _ref$hideAgentActions
|
|
58
|
+
hideAgentActions = _ref$hideAgentActions === void 0 ? false : _ref$hideAgentActions,
|
|
59
|
+
_ref$hideStarButton = _ref.hideStarButton,
|
|
60
|
+
hideStarButton = _ref$hideStarButton === void 0 ? false : _ref$hideStarButton;
|
|
59
61
|
var _useAgentUrlActions = useAgentUrlActions({
|
|
60
62
|
cloudId: cloudId || '',
|
|
61
63
|
email: email,
|
|
@@ -221,7 +223,7 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
221
223
|
agentName: agent.name,
|
|
222
224
|
isStarred: isStarred,
|
|
223
225
|
onStarToggle: handleSetFavourite,
|
|
224
|
-
showStarButton: !isRovoDev,
|
|
226
|
+
showStarButton: !isRovoDev && !hideStarButton,
|
|
225
227
|
isHidden: agent.visibility === 'PRIVATE',
|
|
226
228
|
creatorRender: ((_agent$creatorInfo = agent.creatorInfo) === null || _agent$creatorInfo === void 0 ? void 0 : _agent$creatorInfo.type) && /*#__PURE__*/React.createElement(AgentProfileCreator, {
|
|
227
229
|
creator: {
|
|
@@ -191,7 +191,8 @@ export var AgentProfileCardResourced = function AgentProfileCardResourced(props)
|
|
|
191
191
|
cloudId: props.cloudId,
|
|
192
192
|
hideAgentActions: true,
|
|
193
193
|
hideConversationStarters: true,
|
|
194
|
-
hideAiDisclaimer: true
|
|
194
|
+
hideAiDisclaimer: true,
|
|
195
|
+
hideStarButton: props.hideStarButton
|
|
195
196
|
})));
|
|
196
197
|
}
|
|
197
198
|
if (error || !isLoading && !agentData) {
|
|
@@ -218,6 +219,7 @@ export var AgentProfileCardResourced = function AgentProfileCardResourced(props)
|
|
|
218
219
|
hideMoreActions: props.hideMoreActions,
|
|
219
220
|
hideAiDisclaimer: props.hideAiDisclaimer,
|
|
220
221
|
hideConversationStarters: props.hideConversationStarters,
|
|
221
|
-
hideAgentActions: props.hideAgentActions
|
|
222
|
+
hideAgentActions: props.hideAgentActions,
|
|
223
|
+
hideStarButton: props.hideStarButton
|
|
222
224
|
}));
|
|
223
225
|
};
|
|
@@ -14,6 +14,7 @@ import { getAAIDFromARI } from '../../util/rovoAgentUtils';
|
|
|
14
14
|
import ProfileCardTrigger from '../common/ProfileCardTrigger';
|
|
15
15
|
import { AgentProfileCardLazy } from './lazyAgentProfileCard';
|
|
16
16
|
export var AgentProfileCardTrigger = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
17
|
+
var _props$trigger;
|
|
17
18
|
var props = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
18
19
|
var resourceClient = props.resourceClient,
|
|
19
20
|
userId = props.agentId,
|
|
@@ -169,12 +170,13 @@ export var AgentProfileCardTrigger = /*#__PURE__*/forwardRef(function (_ref, ref
|
|
|
169
170
|
onConversationStartersClick: props.onConversationStartersClick,
|
|
170
171
|
resourceClient: props.resourceClient,
|
|
171
172
|
onDeleteAgent: props.onDeleteAgent,
|
|
172
|
-
addFlag: props.addFlag
|
|
173
|
+
addFlag: props.addFlag,
|
|
174
|
+
hideStarButton: props.hideStarButton
|
|
173
175
|
}));
|
|
174
176
|
};
|
|
175
177
|
return /*#__PURE__*/React.createElement(ProfileCardTrigger, _extends({}, props, {
|
|
176
178
|
ref: ref,
|
|
177
|
-
trigger:
|
|
179
|
+
trigger: (_props$trigger = props.trigger) !== null && _props$trigger !== void 0 ? _props$trigger : 'hover',
|
|
178
180
|
renderProfileCard: renderProfileCard,
|
|
179
181
|
fetchProfile: fetchAgentProfile,
|
|
180
182
|
fireAnalytics: fireEvent,
|
|
@@ -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 = "26.
|
|
8
|
+
packageVersion: (_process$env$_PACKAGE2 = "26.7.0") !== 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: "26.
|
|
27
|
+
packageVersion: "26.7.0"
|
|
28
28
|
}, attributes), {}, {
|
|
29
29
|
firedAt: Math.round(getPageTime())
|
|
30
30
|
})
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type AgentProfileCardProps } from '../../types';
|
|
3
|
-
declare const AgentProfileCard: ({ agent, isLoading, cloudId, email, onChatClick, hasError, errorType, onConversationStartersClick, resourceClient, addFlag, onDeleteAgent, hideMoreActions, hideAiDisclaimer, hideConversationStarters, hideAgentActions, }: AgentProfileCardProps) => React.JSX.Element;
|
|
3
|
+
declare const AgentProfileCard: ({ agent, isLoading, cloudId, email, onChatClick, hasError, errorType, onConversationStartersClick, resourceClient, addFlag, onDeleteAgent, hideMoreActions, hideAiDisclaimer, hideConversationStarters, hideAgentActions, hideStarButton, }: AgentProfileCardProps) => React.JSX.Element;
|
|
4
4
|
export default AgentProfileCard;
|
|
@@ -18,6 +18,8 @@ export type AgentProfileCardResourcedProps = {
|
|
|
18
18
|
hideConversationStarters?: boolean;
|
|
19
19
|
/** Hide the agent actions (chat button and dropdown menu). Defaults to false (agent actions are shown by default). */
|
|
20
20
|
hideAgentActions?: boolean;
|
|
21
|
+
/** Hide the favourite (star) button. Defaults to false (the star is shown). */
|
|
22
|
+
hideStarButton?: boolean;
|
|
21
23
|
/** Name shown in reduced card when user lacks permission */
|
|
22
24
|
agentName?: string;
|
|
23
25
|
} & AgentActionsType;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type LazyExoticComponent } from 'react';
|
|
2
2
|
import type { AgentProfileCardProps } from '../../types';
|
|
3
|
-
export declare const AgentProfileCardLazy: LazyExoticComponent<({ agent, isLoading, cloudId, onChatClick, hasError, errorType, onConversationStartersClick, resourceClient, addFlag, onDeleteAgent, hideMoreActions, hideAiDisclaimer, hideConversationStarters, hideAgentActions, }: AgentProfileCardProps) => React.JSX.Element>;
|
|
3
|
+
export declare const AgentProfileCardLazy: LazyExoticComponent<({ agent, isLoading, cloudId, onChatClick, hasError, errorType, onConversationStartersClick, resourceClient, addFlag, onDeleteAgent, hideMoreActions, hideAiDisclaimer, hideConversationStarters, hideAgentActions, hideStarButton, }: AgentProfileCardProps) => React.JSX.Element>;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -311,6 +311,7 @@ export interface AgentProfileCardTriggerProps extends AgentActionsType {
|
|
|
311
311
|
onDeleteAgent?: (agentId: string) => {
|
|
312
312
|
restore: () => void;
|
|
313
313
|
};
|
|
314
|
+
hideStarButton?: boolean;
|
|
314
315
|
}
|
|
315
316
|
export type AgentProfileCardProps = {
|
|
316
317
|
resourceClient: ProfileClient;
|
|
@@ -332,6 +333,8 @@ export type AgentProfileCardProps = {
|
|
|
332
333
|
hideConversationStarters?: boolean;
|
|
333
334
|
/** Hide the agent actions (chat button and dropdown menu). Defaults to false (agent actions are shown by default). */
|
|
334
335
|
hideAgentActions?: boolean;
|
|
336
|
+
/** Hide the favourite (star) button. Defaults to false (the star is shown). */
|
|
337
|
+
hideStarButton?: boolean;
|
|
335
338
|
} & AgentActionsType;
|
|
336
339
|
export type StatusType = 'active' | 'inactive' | 'closed';
|
|
337
340
|
export type TriggerType = 'hover' | 'click';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/profilecard",
|
|
3
|
-
"version": "26.
|
|
3
|
+
"version": "26.8.0",
|
|
4
4
|
"description": "A React component to display a card with user information.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"@atlaskit/teams-avatar": "^3.1.0",
|
|
69
69
|
"@atlaskit/teams-public": "^2.3.0",
|
|
70
70
|
"@atlaskit/theme": "^26.1.0",
|
|
71
|
-
"@atlaskit/tmp-editor-statsig": "^120.
|
|
71
|
+
"@atlaskit/tmp-editor-statsig": "^120.1.0",
|
|
72
72
|
"@atlaskit/tokens": "^15.3.0",
|
|
73
73
|
"@atlaskit/tooltip": "^23.1.0",
|
|
74
74
|
"@atlassian/studio-entry-link": "^1.1.0",
|