@atlaskit/profilecard 24.5.4 → 24.5.5
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 +9 -0
- package/dist/cjs/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/cjs/client/getTeamFromAGG.js +1 -1
- package/dist/cjs/components/Agent/AgentProfileCard.js +19 -13
- package/dist/cjs/components/Agent/AgentProfileCardResourced.js +2 -1
- package/dist/cjs/components/Agent/AgentProfileCardTrigger.js +1 -0
- 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/AgentProfileCard.js +10 -3
- package/dist/es2019/components/Agent/AgentProfileCardResourced.js +2 -1
- package/dist/es2019/components/Agent/AgentProfileCardTrigger.js +1 -0
- 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/AgentProfileCard.js +19 -13
- package/dist/esm/components/Agent/AgentProfileCardResourced.js +2 -1
- package/dist/esm/components/Agent/AgentProfileCardTrigger.js +1 -0
- package/dist/esm/util/analytics.js +1 -1
- package/dist/types/components/Agent/AgentProfileCard.d.ts +1 -1
- package/dist/types/components/Agent/AgentProfileCardResourced.d.ts +3 -0
- package/dist/types/components/Agent/lazyAgentProfileCard.d.ts +1 -1
- package/dist/types/types.d.ts +6 -0
- package/dist/types-ts4.5/components/Agent/AgentProfileCard.d.ts +1 -1
- package/dist/types-ts4.5/components/Agent/AgentProfileCardResourced.d.ts +3 -0
- package/dist/types-ts4.5/components/Agent/lazyAgentProfileCard.d.ts +1 -1
- package/dist/types-ts4.5/types.d.ts +6 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/profilecard
|
|
2
2
|
|
|
3
|
+
## 24.5.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`b595ecb3ce7fd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b595ecb3ce7fd) -
|
|
8
|
+
[ux] This is a bug fix for the Rove agent profile card trigger to optimistically udpate the UI
|
|
9
|
+
when a agent is deleted instead of refreshing to clear agent from list
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 24.5.4
|
|
4
13
|
|
|
5
14
|
### Patch 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', "24.5.
|
|
14
|
+
headers.append('atl-client-version', "24.5.4");
|
|
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', "24.5.
|
|
68
|
+
headers.append('atl-client-version', "24.5.4");
|
|
69
69
|
return headers;
|
|
70
70
|
};
|
|
71
71
|
function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -49,7 +49,8 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
49
49
|
errorType = _ref.errorType,
|
|
50
50
|
onConversationStartersClick = _ref.onConversationStartersClick,
|
|
51
51
|
resourceClient = _ref.resourceClient,
|
|
52
|
-
addFlag = _ref.addFlag
|
|
52
|
+
addFlag = _ref.addFlag,
|
|
53
|
+
onDeleteAgent = _ref.onDeleteAgent;
|
|
53
54
|
var _useAgentUrlActions = (0, _useAgentActions.useAgentUrlActions)({
|
|
54
55
|
cloudId: cloudId || '',
|
|
55
56
|
source: 'agentProfileCard'
|
|
@@ -117,17 +118,20 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
117
118
|
}, _callee, null, [[1, 8]]);
|
|
118
119
|
})), [agent === null || agent === void 0 ? void 0 : agent.id, fireAnalytics, isStarred, resourceClient, starCount]);
|
|
119
120
|
var handleOnDelete = (0, _react.useCallback)( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
121
|
+
var _onDeleteAgent, restore;
|
|
120
122
|
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
121
123
|
while (1) switch (_context2.prev = _context2.next) {
|
|
122
124
|
case 0:
|
|
123
|
-
if (!agent) {
|
|
124
|
-
_context2.next =
|
|
125
|
+
if (!(agent && onDeleteAgent)) {
|
|
126
|
+
_context2.next = 12;
|
|
125
127
|
break;
|
|
126
128
|
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
+
// Optimistically remove from cache
|
|
130
|
+
_onDeleteAgent = onDeleteAgent(agent.id), restore = _onDeleteAgent.restore;
|
|
131
|
+
_context2.prev = 2;
|
|
132
|
+
_context2.next = 5;
|
|
129
133
|
return resourceClient.deleteAgent(agent.id, fireAnalytics);
|
|
130
|
-
case
|
|
134
|
+
case 5:
|
|
131
135
|
addFlag === null || addFlag === void 0 || addFlag({
|
|
132
136
|
title: formatMessage(_messages.messages.agentDeletedSuccessFlagTitle),
|
|
133
137
|
description: formatMessage(_messages.messages.agentDeletedSuccessFlagDescription, {
|
|
@@ -136,23 +140,25 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
136
140
|
type: 'success',
|
|
137
141
|
id: 'ptc-directory.agent-profile.delete-agent-success'
|
|
138
142
|
});
|
|
139
|
-
_context2.next =
|
|
143
|
+
_context2.next = 12;
|
|
140
144
|
break;
|
|
141
|
-
case
|
|
142
|
-
_context2.prev =
|
|
143
|
-
_context2.t0 = _context2["catch"](
|
|
145
|
+
case 8:
|
|
146
|
+
_context2.prev = 8;
|
|
147
|
+
_context2.t0 = _context2["catch"](2);
|
|
148
|
+
// Restore agent to cache on error
|
|
149
|
+
restore();
|
|
144
150
|
addFlag === null || addFlag === void 0 || addFlag({
|
|
145
151
|
title: formatMessage(_messages.messages.agentDeletedErrorFlagTitle),
|
|
146
152
|
description: formatMessage(_messages.messages.agentDeletedErrorFlagDescription),
|
|
147
153
|
type: 'error',
|
|
148
154
|
id: 'ptc-directory.agent-profile.delete-agent-error'
|
|
149
155
|
});
|
|
150
|
-
case
|
|
156
|
+
case 12:
|
|
151
157
|
case "end":
|
|
152
158
|
return _context2.stop();
|
|
153
159
|
}
|
|
154
|
-
}, _callee2, null, [[
|
|
155
|
-
})), [addFlag, agent,
|
|
160
|
+
}, _callee2, null, [[2, 8]]);
|
|
161
|
+
})), [addFlag, agent, formatMessage, onDeleteAgent, resourceClient, fireAnalytics]);
|
|
156
162
|
(0, _react.useEffect)(function () {
|
|
157
163
|
if (!isLoading && agent) {
|
|
158
164
|
fireAnalytics((0, _analytics.profileCardRendered)('agent', 'content'));
|
|
@@ -170,6 +170,7 @@ var AgentProfileCardResourced = exports.AgentProfileCardResourced = function Age
|
|
|
170
170
|
onChatClick: props.onChatClick,
|
|
171
171
|
addFlag: props.addFlag,
|
|
172
172
|
resourceClient: props.resourceClient,
|
|
173
|
-
cloudId: props.cloudId
|
|
173
|
+
cloudId: props.cloudId,
|
|
174
|
+
onDeleteAgent: props.onDeleteAgent
|
|
174
175
|
}));
|
|
175
176
|
};
|
|
@@ -153,6 +153,7 @@ var AgentProfileCardTrigger = exports.AgentProfileCardTrigger = function AgentPr
|
|
|
153
153
|
onChatClick: props.onChatClick,
|
|
154
154
|
onConversationStartersClick: props.onConversationStartersClick,
|
|
155
155
|
resourceClient: props.resourceClient,
|
|
156
|
+
onDeleteAgent: props.onDeleteAgent,
|
|
156
157
|
addFlag: props.addFlag
|
|
157
158
|
}));
|
|
158
159
|
};
|
|
@@ -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: "24.5.
|
|
48
|
+
packageVersion: "24.5.4"
|
|
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', "24.5.
|
|
9
|
+
headers.append('atl-client-version', "24.5.4");
|
|
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', "24.5.
|
|
77
|
+
headers.append('atl-client-version', "24.5.4");
|
|
78
78
|
return headers;
|
|
79
79
|
};
|
|
80
80
|
export async function getTeamFromAGG(url, teamId, siteId) {
|
|
@@ -35,7 +35,8 @@ const AgentProfileCard = ({
|
|
|
35
35
|
errorType,
|
|
36
36
|
onConversationStartersClick,
|
|
37
37
|
resourceClient,
|
|
38
|
-
addFlag
|
|
38
|
+
addFlag,
|
|
39
|
+
onDeleteAgent
|
|
39
40
|
}) => {
|
|
40
41
|
var _agent$user_defined_c, _agent$external_confi, _agent$external_confi2, _agent$creatorInfo, _agent$creatorInfo2, _agent$creatorInfo3, _agent$creatorInfo4;
|
|
41
42
|
const {
|
|
@@ -86,7 +87,11 @@ const AgentProfileCard = ({
|
|
|
86
87
|
}
|
|
87
88
|
}, [agent === null || agent === void 0 ? void 0 : agent.id, fireAnalytics, isStarred, resourceClient, starCount]);
|
|
88
89
|
const handleOnDelete = useCallback(async () => {
|
|
89
|
-
if (agent) {
|
|
90
|
+
if (agent && onDeleteAgent) {
|
|
91
|
+
// Optimistically remove from cache
|
|
92
|
+
const {
|
|
93
|
+
restore
|
|
94
|
+
} = onDeleteAgent(agent.id);
|
|
90
95
|
try {
|
|
91
96
|
await resourceClient.deleteAgent(agent.id, fireAnalytics);
|
|
92
97
|
addFlag === null || addFlag === void 0 ? void 0 : addFlag({
|
|
@@ -98,6 +103,8 @@ const AgentProfileCard = ({
|
|
|
98
103
|
id: 'ptc-directory.agent-profile.delete-agent-success'
|
|
99
104
|
});
|
|
100
105
|
} catch (error) {
|
|
106
|
+
// Restore agent to cache on error
|
|
107
|
+
restore();
|
|
101
108
|
addFlag === null || addFlag === void 0 ? void 0 : addFlag({
|
|
102
109
|
title: formatMessage(messages.agentDeletedErrorFlagTitle),
|
|
103
110
|
description: formatMessage(messages.agentDeletedErrorFlagDescription),
|
|
@@ -106,7 +113,7 @@ const AgentProfileCard = ({
|
|
|
106
113
|
});
|
|
107
114
|
}
|
|
108
115
|
}
|
|
109
|
-
}, [addFlag, agent,
|
|
116
|
+
}, [addFlag, agent, formatMessage, onDeleteAgent, resourceClient, fireAnalytics]);
|
|
110
117
|
useEffect(() => {
|
|
111
118
|
if (!isLoading && agent) {
|
|
112
119
|
fireAnalytics(profileCardRendered('agent', 'content'));
|
|
@@ -102,6 +102,7 @@ export const AgentProfileCardResourced = props => {
|
|
|
102
102
|
onChatClick: props.onChatClick,
|
|
103
103
|
addFlag: props.addFlag,
|
|
104
104
|
resourceClient: props.resourceClient,
|
|
105
|
-
cloudId: props.cloudId
|
|
105
|
+
cloudId: props.cloudId,
|
|
106
|
+
onDeleteAgent: props.onDeleteAgent
|
|
106
107
|
}));
|
|
107
108
|
};
|
|
@@ -99,6 +99,7 @@ export const AgentProfileCardTrigger = ({
|
|
|
99
99
|
onChatClick: props.onChatClick,
|
|
100
100
|
onConversationStartersClick: props.onConversationStartersClick,
|
|
101
101
|
resourceClient: props.resourceClient,
|
|
102
|
+
onDeleteAgent: props.onDeleteAgent,
|
|
102
103
|
addFlag: props.addFlag
|
|
103
104
|
}));
|
|
104
105
|
};
|
|
@@ -32,7 +32,7 @@ const createEvent = (eventType, action, actionSubject, actionSubjectId, attribut
|
|
|
32
32
|
actionSubjectId,
|
|
33
33
|
attributes: {
|
|
34
34
|
packageName: "@atlaskit/profilecard",
|
|
35
|
-
packageVersion: "24.5.
|
|
35
|
+
packageVersion: "24.5.4",
|
|
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', "24.5.
|
|
7
|
+
headers.append('atl-client-version', "24.5.4");
|
|
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', "24.5.
|
|
59
|
+
headers.append('atl-client-version', "24.5.4");
|
|
60
60
|
return headers;
|
|
61
61
|
};
|
|
62
62
|
export function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -39,7 +39,8 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
39
39
|
errorType = _ref.errorType,
|
|
40
40
|
onConversationStartersClick = _ref.onConversationStartersClick,
|
|
41
41
|
resourceClient = _ref.resourceClient,
|
|
42
|
-
addFlag = _ref.addFlag
|
|
42
|
+
addFlag = _ref.addFlag,
|
|
43
|
+
onDeleteAgent = _ref.onDeleteAgent;
|
|
43
44
|
var _useAgentUrlActions = useAgentUrlActions({
|
|
44
45
|
cloudId: cloudId || '',
|
|
45
46
|
source: 'agentProfileCard'
|
|
@@ -107,17 +108,20 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
107
108
|
}, _callee, null, [[1, 8]]);
|
|
108
109
|
})), [agent === null || agent === void 0 ? void 0 : agent.id, fireAnalytics, isStarred, resourceClient, starCount]);
|
|
109
110
|
var handleOnDelete = useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
111
|
+
var _onDeleteAgent, restore;
|
|
110
112
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
111
113
|
while (1) switch (_context2.prev = _context2.next) {
|
|
112
114
|
case 0:
|
|
113
|
-
if (!agent) {
|
|
114
|
-
_context2.next =
|
|
115
|
+
if (!(agent && onDeleteAgent)) {
|
|
116
|
+
_context2.next = 12;
|
|
115
117
|
break;
|
|
116
118
|
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
+
// Optimistically remove from cache
|
|
120
|
+
_onDeleteAgent = onDeleteAgent(agent.id), restore = _onDeleteAgent.restore;
|
|
121
|
+
_context2.prev = 2;
|
|
122
|
+
_context2.next = 5;
|
|
119
123
|
return resourceClient.deleteAgent(agent.id, fireAnalytics);
|
|
120
|
-
case
|
|
124
|
+
case 5:
|
|
121
125
|
addFlag === null || addFlag === void 0 || addFlag({
|
|
122
126
|
title: formatMessage(messages.agentDeletedSuccessFlagTitle),
|
|
123
127
|
description: formatMessage(messages.agentDeletedSuccessFlagDescription, {
|
|
@@ -126,23 +130,25 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
126
130
|
type: 'success',
|
|
127
131
|
id: 'ptc-directory.agent-profile.delete-agent-success'
|
|
128
132
|
});
|
|
129
|
-
_context2.next =
|
|
133
|
+
_context2.next = 12;
|
|
130
134
|
break;
|
|
131
|
-
case
|
|
132
|
-
_context2.prev =
|
|
133
|
-
_context2.t0 = _context2["catch"](
|
|
135
|
+
case 8:
|
|
136
|
+
_context2.prev = 8;
|
|
137
|
+
_context2.t0 = _context2["catch"](2);
|
|
138
|
+
// Restore agent to cache on error
|
|
139
|
+
restore();
|
|
134
140
|
addFlag === null || addFlag === void 0 || addFlag({
|
|
135
141
|
title: formatMessage(messages.agentDeletedErrorFlagTitle),
|
|
136
142
|
description: formatMessage(messages.agentDeletedErrorFlagDescription),
|
|
137
143
|
type: 'error',
|
|
138
144
|
id: 'ptc-directory.agent-profile.delete-agent-error'
|
|
139
145
|
});
|
|
140
|
-
case
|
|
146
|
+
case 12:
|
|
141
147
|
case "end":
|
|
142
148
|
return _context2.stop();
|
|
143
149
|
}
|
|
144
|
-
}, _callee2, null, [[
|
|
145
|
-
})), [addFlag, agent,
|
|
150
|
+
}, _callee2, null, [[2, 8]]);
|
|
151
|
+
})), [addFlag, agent, formatMessage, onDeleteAgent, resourceClient, fireAnalytics]);
|
|
146
152
|
useEffect(function () {
|
|
147
153
|
if (!isLoading && agent) {
|
|
148
154
|
fireAnalytics(profileCardRendered('agent', 'content'));
|
|
@@ -161,6 +161,7 @@ export var AgentProfileCardResourced = function AgentProfileCardResourced(props)
|
|
|
161
161
|
onChatClick: props.onChatClick,
|
|
162
162
|
addFlag: props.addFlag,
|
|
163
163
|
resourceClient: props.resourceClient,
|
|
164
|
-
cloudId: props.cloudId
|
|
164
|
+
cloudId: props.cloudId,
|
|
165
|
+
onDeleteAgent: props.onDeleteAgent
|
|
165
166
|
}));
|
|
166
167
|
};
|
|
@@ -144,6 +144,7 @@ export var AgentProfileCardTrigger = function AgentProfileCardTrigger(_ref) {
|
|
|
144
144
|
onChatClick: props.onChatClick,
|
|
145
145
|
onConversationStartersClick: props.onConversationStartersClick,
|
|
146
146
|
resourceClient: props.resourceClient,
|
|
147
|
+
onDeleteAgent: props.onDeleteAgent,
|
|
147
148
|
addFlag: props.addFlag
|
|
148
149
|
}));
|
|
149
150
|
};
|
|
@@ -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: "24.5.
|
|
42
|
+
packageVersion: "24.5.4"
|
|
43
43
|
}, attributes), {}, {
|
|
44
44
|
firedAt: Math.round(getPageTime())
|
|
45
45
|
})
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type AgentProfileCardProps } from '../../types';
|
|
3
|
-
declare const AgentProfileCard: ({ agent, isLoading, cloudId, onChatClick, hasError, errorType, onConversationStartersClick, resourceClient, addFlag, }: AgentProfileCardProps) => React.JSX.Element;
|
|
3
|
+
declare const AgentProfileCard: ({ agent, isLoading, cloudId, onChatClick, hasError, errorType, onConversationStartersClick, resourceClient, addFlag, onDeleteAgent, }: AgentProfileCardProps) => React.JSX.Element;
|
|
4
4
|
export default AgentProfileCard;
|
|
@@ -7,5 +7,8 @@ export type AgentProfileCardResourcedProps = {
|
|
|
7
7
|
trigger?: TriggerType;
|
|
8
8
|
children?: React.ReactNode;
|
|
9
9
|
addFlag?: (flag: Flag) => void;
|
|
10
|
+
onDeleteAgent?: (agentId: string) => {
|
|
11
|
+
restore: () => void;
|
|
12
|
+
};
|
|
10
13
|
} & AgentActionsType;
|
|
11
14
|
export declare const AgentProfileCardResourced: (props: AgentProfileCardResourcedProps) => React.JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const AgentProfileCardLazy: import("react").LazyExoticComponent<({ agent, isLoading, cloudId, onChatClick, hasError, errorType, onConversationStartersClick, resourceClient, addFlag, }: import("../../types").AgentProfileCardProps) => import("react").JSX.Element>;
|
|
1
|
+
export declare const AgentProfileCardLazy: import("react").LazyExoticComponent<({ agent, isLoading, cloudId, onChatClick, hasError, errorType, onConversationStartersClick, resourceClient, addFlag, onDeleteAgent, }: import("../../types").AgentProfileCardProps) => import("react").JSX.Element>;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -352,6 +352,9 @@ export interface AgentProfileCardTriggerProps extends AgentActionsType {
|
|
|
352
352
|
offset?: [number, number];
|
|
353
353
|
product?: string;
|
|
354
354
|
viewingUserId?: string;
|
|
355
|
+
onDeleteAgent?: (agentId: string) => {
|
|
356
|
+
restore: () => void;
|
|
357
|
+
};
|
|
355
358
|
}
|
|
356
359
|
export type AgentProfileCardProps = {
|
|
357
360
|
resourceClient: ProfileClient;
|
|
@@ -361,6 +364,9 @@ export type AgentProfileCardProps = {
|
|
|
361
364
|
cloudId?: string;
|
|
362
365
|
errorType?: ProfileCardErrorType;
|
|
363
366
|
addFlag?: (flag: Flag) => void;
|
|
367
|
+
onDeleteAgent?: (agentId: string) => {
|
|
368
|
+
restore: () => void;
|
|
369
|
+
};
|
|
364
370
|
} & AgentActionsType;
|
|
365
371
|
export type StatusType = 'active' | 'inactive' | 'closed';
|
|
366
372
|
export type TriggerType = 'hover' | 'click';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type AgentProfileCardProps } from '../../types';
|
|
3
|
-
declare const AgentProfileCard: ({ agent, isLoading, cloudId, onChatClick, hasError, errorType, onConversationStartersClick, resourceClient, addFlag, }: AgentProfileCardProps) => React.JSX.Element;
|
|
3
|
+
declare const AgentProfileCard: ({ agent, isLoading, cloudId, onChatClick, hasError, errorType, onConversationStartersClick, resourceClient, addFlag, onDeleteAgent, }: AgentProfileCardProps) => React.JSX.Element;
|
|
4
4
|
export default AgentProfileCard;
|
|
@@ -7,5 +7,8 @@ export type AgentProfileCardResourcedProps = {
|
|
|
7
7
|
trigger?: TriggerType;
|
|
8
8
|
children?: React.ReactNode;
|
|
9
9
|
addFlag?: (flag: Flag) => void;
|
|
10
|
+
onDeleteAgent?: (agentId: string) => {
|
|
11
|
+
restore: () => void;
|
|
12
|
+
};
|
|
10
13
|
} & AgentActionsType;
|
|
11
14
|
export declare const AgentProfileCardResourced: (props: AgentProfileCardResourcedProps) => React.JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const AgentProfileCardLazy: import("react").LazyExoticComponent<({ agent, isLoading, cloudId, onChatClick, hasError, errorType, onConversationStartersClick, resourceClient, addFlag, }: import("../../types").AgentProfileCardProps) => import("react").JSX.Element>;
|
|
1
|
+
export declare const AgentProfileCardLazy: import("react").LazyExoticComponent<({ agent, isLoading, cloudId, onChatClick, hasError, errorType, onConversationStartersClick, resourceClient, addFlag, onDeleteAgent, }: import("../../types").AgentProfileCardProps) => import("react").JSX.Element>;
|
|
@@ -358,6 +358,9 @@ export interface AgentProfileCardTriggerProps extends AgentActionsType {
|
|
|
358
358
|
];
|
|
359
359
|
product?: string;
|
|
360
360
|
viewingUserId?: string;
|
|
361
|
+
onDeleteAgent?: (agentId: string) => {
|
|
362
|
+
restore: () => void;
|
|
363
|
+
};
|
|
361
364
|
}
|
|
362
365
|
export type AgentProfileCardProps = {
|
|
363
366
|
resourceClient: ProfileClient;
|
|
@@ -367,6 +370,9 @@ export type AgentProfileCardProps = {
|
|
|
367
370
|
cloudId?: string;
|
|
368
371
|
errorType?: ProfileCardErrorType;
|
|
369
372
|
addFlag?: (flag: Flag) => void;
|
|
373
|
+
onDeleteAgent?: (agentId: string) => {
|
|
374
|
+
restore: () => void;
|
|
375
|
+
};
|
|
370
376
|
} & AgentActionsType;
|
|
371
377
|
export type StatusType = 'active' | 'inactive' | 'closed';
|
|
372
378
|
export type TriggerType = 'hover' | 'click';
|