@atlaskit/profilecard 25.2.1 → 25.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/afm-cc/tsconfig.json +3 -0
- package/afm-products/tsconfig.json +3 -0
- package/dist/cjs/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/cjs/client/getTeamFromAGG.js +1 -1
- package/dist/cjs/components/Agent/AgentProfileCard.js +2 -0
- package/dist/cjs/components/Agent/AgentProfileCardTrigger.js +5 -2
- package/dist/cjs/components/Agent/hooks/useAgentActions.js +5 -4
- package/dist/cjs/components/Agent/utils/index.js +13 -5
- package/dist/cjs/components/common/PopupTrigger.js +12 -3
- 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 +2 -0
- package/dist/es2019/components/Agent/AgentProfileCardTrigger.js +4 -2
- package/dist/es2019/components/Agent/hooks/useAgentActions.js +5 -4
- package/dist/es2019/components/Agent/utils/index.js +11 -3
- package/dist/es2019/components/common/PopupTrigger.js +9 -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 +2 -0
- package/dist/esm/components/Agent/AgentProfileCardTrigger.js +5 -2
- package/dist/esm/components/Agent/hooks/useAgentActions.js +5 -4
- package/dist/esm/components/Agent/utils/index.js +13 -5
- package/dist/esm/components/common/PopupTrigger.js +12 -3
- package/dist/esm/util/analytics.js +2 -2
- package/dist/types/components/Agent/AgentProfileCard.d.ts +1 -1
- package/dist/types/components/Agent/hooks/useAgentActions.d.ts +2 -1
- package/dist/types/components/Agent/utils/index.d.ts +3 -3
- package/dist/types/types.d.ts +3 -0
- package/dist/types-ts4.5/components/Agent/AgentProfileCard.d.ts +1 -1
- package/dist/types-ts4.5/components/Agent/hooks/useAgentActions.d.ts +2 -1
- package/dist/types-ts4.5/components/Agent/utils/index.d.ts +3 -3
- package/dist/types-ts4.5/types.d.ts +3 -0
- package/package.json +10 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @atlaskit/profilecard
|
|
2
2
|
|
|
3
|
+
## 25.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`13c923792e279`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/13c923792e279) -
|
|
8
|
+
[ux] added studio session sync url
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
3
14
|
## 25.2.1
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
package/afm-cc/tsconfig.json
CHANGED
|
@@ -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', "25.2.
|
|
14
|
+
headers.append('atl-client-version', "25.2.1");
|
|
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', "25.2.
|
|
69
|
+
headers.append('atl-client-version', "25.2.1");
|
|
70
70
|
return headers;
|
|
71
71
|
};
|
|
72
72
|
function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -51,6 +51,7 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
51
51
|
var agent = _ref.agent,
|
|
52
52
|
isLoading = _ref.isLoading,
|
|
53
53
|
cloudId = _ref.cloudId,
|
|
54
|
+
email = _ref.email,
|
|
54
55
|
onChatClick = _ref.onChatClick,
|
|
55
56
|
hasError = _ref.hasError,
|
|
56
57
|
errorType = _ref.errorType,
|
|
@@ -65,6 +66,7 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
65
66
|
hideConversationStarters = _ref$hideConversation === void 0 ? false : _ref$hideConversation;
|
|
66
67
|
var _useAgentUrlActions = (0, _useAgentActions.useAgentUrlActions)({
|
|
67
68
|
cloudId: cloudId || '',
|
|
69
|
+
email: email,
|
|
68
70
|
source: 'agentProfileCard'
|
|
69
71
|
}),
|
|
70
72
|
_onEditAgent = _useAgentUrlActions.onEditAgent,
|
|
@@ -26,7 +26,9 @@ var AgentProfileCardTrigger = exports.AgentProfileCardTrigger = /*#__PURE__*/(0,
|
|
|
26
26
|
var props = (0, _extends2.default)({}, ((0, _objectDestructuringEmpty2.default)(_ref), _ref));
|
|
27
27
|
var resourceClient = props.resourceClient,
|
|
28
28
|
userId = props.agentId,
|
|
29
|
-
cloudId = props.cloudId
|
|
29
|
+
cloudId = props.cloudId,
|
|
30
|
+
_props$agentIdType = props.agentIdType,
|
|
31
|
+
agentIdType = _props$agentIdType === void 0 ? 'agent' : _props$agentIdType;
|
|
30
32
|
var _useAnalyticsEvents = (0, _teamsAppInternalAnalytics.useAnalyticsEvents)(),
|
|
31
33
|
fireEvent = _useAnalyticsEvents.fireEvent;
|
|
32
34
|
|
|
@@ -134,7 +136,7 @@ var AgentProfileCardTrigger = exports.AgentProfileCardTrigger = /*#__PURE__*/(0,
|
|
|
134
136
|
case 0:
|
|
135
137
|
_context2.next = 2;
|
|
136
138
|
return resourceClient.getRovoAgentProfile({
|
|
137
|
-
type:
|
|
139
|
+
type: agentIdType,
|
|
138
140
|
value: userId
|
|
139
141
|
}, fireEvent);
|
|
140
142
|
case 2:
|
|
@@ -170,6 +172,7 @@ var AgentProfileCardTrigger = exports.AgentProfileCardTrigger = /*#__PURE__*/(0,
|
|
|
170
172
|
agent: profileData,
|
|
171
173
|
hasError: !!error,
|
|
172
174
|
cloudId: props.cloudId,
|
|
175
|
+
email: props.email,
|
|
173
176
|
errorType: error,
|
|
174
177
|
onChatClick: props.onChatClick,
|
|
175
178
|
onConversationStartersClick: props.onConversationStartersClick,
|
|
@@ -36,19 +36,20 @@ var createRovoParams = function createRovoParams(params) {
|
|
|
36
36
|
};
|
|
37
37
|
var useAgentUrlActions = exports.useAgentUrlActions = function useAgentUrlActions(_ref3) {
|
|
38
38
|
var cloudId = _ref3.cloudId,
|
|
39
|
+
email = _ref3.email,
|
|
39
40
|
source = _ref3.source;
|
|
40
41
|
var _useRovoPostMessageTo = (0, _postMessageToPubsub.useRovoPostMessageToPubsub)(),
|
|
41
42
|
publishWithPostMessage = _useRovoPostMessageTo.publishWithPostMessage;
|
|
42
43
|
var _useAnalyticsEvents = (0, _teamsAppInternalAnalytics.useAnalyticsEvents)(),
|
|
43
44
|
fireEvent = _useAnalyticsEvents.fireEvent;
|
|
44
45
|
var onEditAgent = (0, _react.useCallback)(function (agentId) {
|
|
45
|
-
var url = (0, _utils.getAtlassianStudioAgentEditUrl)(cloudId, agentId);
|
|
46
|
+
var url = (0, _utils.getAtlassianStudioAgentEditUrl)(cloudId, agentId, email);
|
|
46
47
|
window.open(url, '_blank', 'noopener, noreferrer');
|
|
47
48
|
fireEvent('ui.button.clicked.editAgentButton', {
|
|
48
49
|
agentId: agentId,
|
|
49
50
|
source: source
|
|
50
51
|
});
|
|
51
|
-
}, [cloudId, fireEvent, source]);
|
|
52
|
+
}, [cloudId, email, fireEvent, source]);
|
|
52
53
|
var onCopyAgent = function onCopyAgent(agentId) {
|
|
53
54
|
var url = "".concat(window.location.origin, "/people/agent/").concat(agentId);
|
|
54
55
|
var urlWithParams = (0, _url.encodeParamsToUrl)(url, {
|
|
@@ -70,7 +71,7 @@ var useAgentUrlActions = exports.useAgentUrlActions = function useAgentUrlAction
|
|
|
70
71
|
agentId: agentId,
|
|
71
72
|
source: source
|
|
72
73
|
});
|
|
73
|
-
legacyDuplicateUrl = (0, _utils.getAtlassianStudioAgentDuplicateUrl)(cloudId, agentId); // When versioning FG is off, use legacy duplicate flow
|
|
74
|
+
legacyDuplicateUrl = (0, _utils.getAtlassianStudioAgentDuplicateUrl)(cloudId, agentId, email); // When versioning FG is off, use legacy duplicate flow
|
|
74
75
|
if ((0, _platformFeatureFlags.fg)('rovo_agent_versioning_enabled')) {
|
|
75
76
|
_context.next = 5;
|
|
76
77
|
break;
|
|
@@ -124,7 +125,7 @@ var useAgentUrlActions = exports.useAgentUrlActions = function useAgentUrlAction
|
|
|
124
125
|
return function (_x) {
|
|
125
126
|
return _ref4.apply(this, arguments);
|
|
126
127
|
};
|
|
127
|
-
}(), [cloudId, fireEvent, source]);
|
|
128
|
+
}(), [cloudId, email, fireEvent, source]);
|
|
128
129
|
var onConversationStarter = function onConversationStarter(_ref5) {
|
|
129
130
|
var agentId = _ref5.agentId,
|
|
130
131
|
prompt = _ref5.prompt;
|
|
@@ -4,21 +4,29 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getStudioPath = exports.getStudioHost = exports.getAtlassianStudioAgentEditUrl = exports.getAtlassianStudioAgentDuplicateUrl = void 0;
|
|
7
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
8
|
+
var _studioEntryLink = require("@atlassian/studio-entry-link");
|
|
7
9
|
var STUDIO_PROD_URL = 'https://studio.atlassian.com';
|
|
8
10
|
var STUDIO_STAGING_URL = 'https://atlassian-studio.stg-east.frontend.public.atl-paas.net';
|
|
9
11
|
var isStaging = function isStaging() {
|
|
10
12
|
var host = window.location.host;
|
|
11
13
|
return host.includes('localhost') || host.includes('.stg.atlassian') || host.includes('.stg-east.frontend.public.atl-paas.net') || host.includes('jira-dev.com');
|
|
12
14
|
};
|
|
15
|
+
var getStudioEnv = function getStudioEnv() {
|
|
16
|
+
return isStaging() ? 'staging' : 'production';
|
|
17
|
+
};
|
|
13
18
|
var getStudioHost = exports.getStudioHost = function getStudioHost() {
|
|
14
19
|
return isStaging() ? STUDIO_STAGING_URL : STUDIO_PROD_URL;
|
|
15
20
|
};
|
|
16
|
-
var getStudioPath = exports.getStudioPath = function getStudioPath(path) {
|
|
21
|
+
var getStudioPath = exports.getStudioPath = function getStudioPath(path, email) {
|
|
22
|
+
if (email && (0, _platformFeatureFlags.fg)('asf-944-account-sync')) {
|
|
23
|
+
return (0, _studioEntryLink.getStudioSessionSyncUrl)(getStudioEnv(), path, email);
|
|
24
|
+
}
|
|
17
25
|
return "".concat(getStudioHost()).concat(path);
|
|
18
26
|
};
|
|
19
|
-
var getAtlassianStudioAgentEditUrl = exports.getAtlassianStudioAgentEditUrl = function getAtlassianStudioAgentEditUrl(siteId, agentId) {
|
|
20
|
-
return getStudioPath("/s/".concat(siteId, "/agents/enrich/rovo/agents/").concat(agentId, "?redirect=").concat(encodeURIComponent('/:agentId/overview')));
|
|
27
|
+
var getAtlassianStudioAgentEditUrl = exports.getAtlassianStudioAgentEditUrl = function getAtlassianStudioAgentEditUrl(siteId, agentId, email) {
|
|
28
|
+
return getStudioPath("/s/".concat(siteId, "/agents/enrich/rovo/agents/").concat(agentId, "?redirect=").concat(encodeURIComponent('/:agentId/overview')), email);
|
|
21
29
|
};
|
|
22
|
-
var getAtlassianStudioAgentDuplicateUrl = exports.getAtlassianStudioAgentDuplicateUrl = function getAtlassianStudioAgentDuplicateUrl(siteId, agentId) {
|
|
23
|
-
return getStudioPath("/s/".concat(siteId, "/agents/enrich/rovo/agents/").concat(agentId, "?redirect=").concat(encodeURIComponent('/create')));
|
|
30
|
+
var getAtlassianStudioAgentDuplicateUrl = exports.getAtlassianStudioAgentDuplicateUrl = function getAtlassianStudioAgentDuplicateUrl(siteId, agentId, email) {
|
|
31
|
+
return getStudioPath("/s/".concat(siteId, "/agents/enrich/rovo/agents/").concat(agentId, "?redirect=").concat(encodeURIComponent('/create')), email);
|
|
24
32
|
};
|
|
@@ -7,10 +7,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.PopupTrigger = void 0;
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
11
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
14
|
var _excluded = ["children", "trigger", "showProfilecard", "hideProfilecard", "ariaLabelledBy"];
|
|
13
15
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
16
|
+
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; }
|
|
17
|
+
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; }
|
|
14
18
|
var PopupTriggerInner = function PopupTriggerInner(_ref, ref) {
|
|
15
19
|
var children = _ref.children,
|
|
16
20
|
trigger = _ref.trigger,
|
|
@@ -18,6 +22,7 @@ var PopupTriggerInner = function PopupTriggerInner(_ref, ref) {
|
|
|
18
22
|
hideProfilecard = _ref.hideProfilecard,
|
|
19
23
|
ariaLabelledBy = _ref.ariaLabelledBy,
|
|
20
24
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
25
|
+
// rename to onMouseOver when cleaning up update_profile_card_to_open_on_mouse_over
|
|
21
26
|
var onMouseEnter = (0, _react.useCallback)(function () {
|
|
22
27
|
showProfilecard();
|
|
23
28
|
}, [showProfilecard]);
|
|
@@ -33,12 +38,16 @@ var PopupTriggerInner = function PopupTriggerInner(_ref, ref) {
|
|
|
33
38
|
showProfilecard();
|
|
34
39
|
}, [showProfilecard]);
|
|
35
40
|
var containerListeners = (0, _react.useMemo)(function () {
|
|
36
|
-
return trigger === 'hover' ? {
|
|
41
|
+
return trigger === 'hover' ? _objectSpread(_objectSpread({}, (0, _platformFeatureFlags.fg)('update_profile_card_to_open_on_mouse_over') ? {
|
|
42
|
+
onMouseOver: onMouseEnter,
|
|
43
|
+
onMouseOut: hideProfilecard
|
|
44
|
+
} : {
|
|
37
45
|
onMouseEnter: onMouseEnter,
|
|
38
|
-
onMouseLeave: hideProfilecard
|
|
46
|
+
onMouseLeave: hideProfilecard
|
|
47
|
+
}), {}, {
|
|
39
48
|
onBlur: hideProfilecard,
|
|
40
49
|
onKeyPress: onKeyPress
|
|
41
|
-
} : {
|
|
50
|
+
}) : {
|
|
42
51
|
onClick: onClick,
|
|
43
52
|
onKeyPress: onKeyPress
|
|
44
53
|
};
|
|
@@ -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 = "25.2.
|
|
15
|
+
packageVersion: (_process$env$_PACKAGE2 = "25.2.1") !== 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: "25.2.
|
|
34
|
+
packageVersion: "25.2.1"
|
|
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', "25.2.
|
|
9
|
+
headers.append('atl-client-version', "25.2.1");
|
|
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', "25.2.
|
|
81
|
+
headers.append('atl-client-version', "25.2.1");
|
|
82
82
|
return headers;
|
|
83
83
|
};
|
|
84
84
|
export async function getTeamFromAGG(url, teamId, siteId) {
|
|
@@ -35,6 +35,7 @@ const AgentProfileCard = ({
|
|
|
35
35
|
agent,
|
|
36
36
|
isLoading,
|
|
37
37
|
cloudId,
|
|
38
|
+
email,
|
|
38
39
|
onChatClick,
|
|
39
40
|
hasError,
|
|
40
41
|
errorType,
|
|
@@ -56,6 +57,7 @@ const AgentProfileCard = ({
|
|
|
56
57
|
onViewFullProfile
|
|
57
58
|
} = useAgentUrlActions({
|
|
58
59
|
cloudId: cloudId || '',
|
|
60
|
+
email,
|
|
59
61
|
source: 'agentProfileCard'
|
|
60
62
|
});
|
|
61
63
|
const [isStarred, setIsStarred] = useState(false);
|
|
@@ -13,7 +13,8 @@ export const AgentProfileCardTrigger = /*#__PURE__*/forwardRef(({
|
|
|
13
13
|
const {
|
|
14
14
|
resourceClient,
|
|
15
15
|
agentId: userId,
|
|
16
|
-
cloudId
|
|
16
|
+
cloudId,
|
|
17
|
+
agentIdType = 'agent'
|
|
17
18
|
} = props;
|
|
18
19
|
const {
|
|
19
20
|
fireEvent
|
|
@@ -92,7 +93,7 @@ export const AgentProfileCardTrigger = /*#__PURE__*/forwardRef(({
|
|
|
92
93
|
const fetchAgentProfile = async () => {
|
|
93
94
|
var _agentProfileResult$a, _agentProfileResult$a2;
|
|
94
95
|
const agentProfileResult = await resourceClient.getRovoAgentProfile({
|
|
95
|
-
type:
|
|
96
|
+
type: agentIdType,
|
|
96
97
|
value: userId
|
|
97
98
|
}, fireEvent);
|
|
98
99
|
const agentInfo = agentProfileResult.restData;
|
|
@@ -116,6 +117,7 @@ export const AgentProfileCardTrigger = /*#__PURE__*/forwardRef(({
|
|
|
116
117
|
agent: profileData,
|
|
117
118
|
hasError: !!error,
|
|
118
119
|
cloudId: props.cloudId,
|
|
120
|
+
email: props.email,
|
|
119
121
|
errorType: error,
|
|
120
122
|
onChatClick: props.onChatClick,
|
|
121
123
|
onConversationStartersClick: props.onConversationStartersClick,
|
|
@@ -18,6 +18,7 @@ const createRovoParams = params => {
|
|
|
18
18
|
};
|
|
19
19
|
export const useAgentUrlActions = ({
|
|
20
20
|
cloudId,
|
|
21
|
+
email,
|
|
21
22
|
source
|
|
22
23
|
}) => {
|
|
23
24
|
const {
|
|
@@ -27,13 +28,13 @@ export const useAgentUrlActions = ({
|
|
|
27
28
|
fireEvent
|
|
28
29
|
} = useAnalyticsEvents();
|
|
29
30
|
const onEditAgent = useCallback(agentId => {
|
|
30
|
-
const url = getAtlassianStudioAgentEditUrl(cloudId, agentId);
|
|
31
|
+
const url = getAtlassianStudioAgentEditUrl(cloudId, agentId, email);
|
|
31
32
|
window.open(url, '_blank', 'noopener, noreferrer');
|
|
32
33
|
fireEvent('ui.button.clicked.editAgentButton', {
|
|
33
34
|
agentId,
|
|
34
35
|
source
|
|
35
36
|
});
|
|
36
|
-
}, [cloudId, fireEvent, source]);
|
|
37
|
+
}, [cloudId, email, fireEvent, source]);
|
|
37
38
|
const onCopyAgent = agentId => {
|
|
38
39
|
const url = `${window.location.origin}/people/agent/${agentId}`;
|
|
39
40
|
const urlWithParams = encodeParamsToUrl(url, {
|
|
@@ -50,7 +51,7 @@ export const useAgentUrlActions = ({
|
|
|
50
51
|
agentId,
|
|
51
52
|
source
|
|
52
53
|
});
|
|
53
|
-
const legacyDuplicateUrl = getAtlassianStudioAgentDuplicateUrl(cloudId, agentId);
|
|
54
|
+
const legacyDuplicateUrl = getAtlassianStudioAgentDuplicateUrl(cloudId, agentId, email);
|
|
54
55
|
|
|
55
56
|
// When versioning FG is off, use legacy duplicate flow
|
|
56
57
|
if (!fg('rovo_agent_versioning_enabled')) {
|
|
@@ -86,7 +87,7 @@ export const useAgentUrlActions = ({
|
|
|
86
87
|
// Opening in same tab because, we cannot open in new tab after async operation, because browsers prevent `.open` after certain duration
|
|
87
88
|
window.location.assign(legacyDuplicateUrl);
|
|
88
89
|
}
|
|
89
|
-
}, [cloudId, fireEvent, source]);
|
|
90
|
+
}, [cloudId, email, fireEvent, source]);
|
|
90
91
|
const onConversationStarter = ({
|
|
91
92
|
agentId,
|
|
92
93
|
prompt
|
|
@@ -1,12 +1,20 @@
|
|
|
1
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
|
+
import { getStudioSessionSyncUrl } from '@atlassian/studio-entry-link';
|
|
1
3
|
const STUDIO_PROD_URL = 'https://studio.atlassian.com';
|
|
2
4
|
const STUDIO_STAGING_URL = 'https://atlassian-studio.stg-east.frontend.public.atl-paas.net';
|
|
3
5
|
const isStaging = () => {
|
|
4
6
|
const host = window.location.host;
|
|
5
7
|
return host.includes('localhost') || host.includes('.stg.atlassian') || host.includes('.stg-east.frontend.public.atl-paas.net') || host.includes('jira-dev.com');
|
|
6
8
|
};
|
|
9
|
+
const getStudioEnv = () => isStaging() ? 'staging' : 'production';
|
|
7
10
|
export const getStudioHost = () => {
|
|
8
11
|
return isStaging() ? STUDIO_STAGING_URL : STUDIO_PROD_URL;
|
|
9
12
|
};
|
|
10
|
-
export const getStudioPath = path =>
|
|
11
|
-
|
|
12
|
-
|
|
13
|
+
export const getStudioPath = (path, email) => {
|
|
14
|
+
if (email && fg('asf-944-account-sync')) {
|
|
15
|
+
return getStudioSessionSyncUrl(getStudioEnv(), path, email);
|
|
16
|
+
}
|
|
17
|
+
return `${getStudioHost()}${path}`;
|
|
18
|
+
};
|
|
19
|
+
export const getAtlassianStudioAgentEditUrl = (siteId, agentId, email) => getStudioPath(`/s/${siteId}/agents/enrich/rovo/agents/${agentId}?redirect=${encodeURIComponent('/:agentId/overview')}`, email);
|
|
20
|
+
export const getAtlassianStudioAgentDuplicateUrl = (siteId, agentId, email) => getStudioPath(`/s/${siteId}/agents/enrich/rovo/agents/${agentId}?redirect=${encodeURIComponent('/create')}`, email);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useCallback, useMemo } from 'react';
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
4
|
const PopupTriggerInner = ({
|
|
4
5
|
children,
|
|
5
6
|
trigger,
|
|
@@ -8,6 +9,7 @@ const PopupTriggerInner = ({
|
|
|
8
9
|
ariaLabelledBy,
|
|
9
10
|
...props
|
|
10
11
|
}, ref) => {
|
|
12
|
+
// rename to onMouseOver when cleaning up update_profile_card_to_open_on_mouse_over
|
|
11
13
|
const onMouseEnter = useCallback(() => {
|
|
12
14
|
showProfilecard();
|
|
13
15
|
}, [showProfilecard]);
|
|
@@ -23,8 +25,13 @@ const PopupTriggerInner = ({
|
|
|
23
25
|
showProfilecard();
|
|
24
26
|
}, [showProfilecard]);
|
|
25
27
|
const containerListeners = useMemo(() => trigger === 'hover' ? {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
+
...(fg('update_profile_card_to_open_on_mouse_over') ? {
|
|
29
|
+
onMouseOver: onMouseEnter,
|
|
30
|
+
onMouseOut: hideProfilecard
|
|
31
|
+
} : {
|
|
32
|
+
onMouseEnter,
|
|
33
|
+
onMouseLeave: hideProfilecard
|
|
34
|
+
}),
|
|
28
35
|
onBlur: hideProfilecard,
|
|
29
36
|
onKeyPress
|
|
30
37
|
} : {
|
|
@@ -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 = "25.2.
|
|
5
|
+
packageVersion: (_process$env$_PACKAGE2 = "25.2.1") !== 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: "25.2.
|
|
22
|
+
packageVersion: "25.2.1",
|
|
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', "25.2.
|
|
7
|
+
headers.append('atl-client-version', "25.2.1");
|
|
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', "25.2.
|
|
62
|
+
headers.append('atl-client-version', "25.2.1");
|
|
63
63
|
return headers;
|
|
64
64
|
};
|
|
65
65
|
export function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -42,6 +42,7 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
42
42
|
var agent = _ref.agent,
|
|
43
43
|
isLoading = _ref.isLoading,
|
|
44
44
|
cloudId = _ref.cloudId,
|
|
45
|
+
email = _ref.email,
|
|
45
46
|
onChatClick = _ref.onChatClick,
|
|
46
47
|
hasError = _ref.hasError,
|
|
47
48
|
errorType = _ref.errorType,
|
|
@@ -56,6 +57,7 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
56
57
|
hideConversationStarters = _ref$hideConversation === void 0 ? false : _ref$hideConversation;
|
|
57
58
|
var _useAgentUrlActions = useAgentUrlActions({
|
|
58
59
|
cloudId: cloudId || '',
|
|
60
|
+
email: email,
|
|
59
61
|
source: 'agentProfileCard'
|
|
60
62
|
}),
|
|
61
63
|
_onEditAgent = _useAgentUrlActions.onEditAgent,
|
|
@@ -17,7 +17,9 @@ export var AgentProfileCardTrigger = /*#__PURE__*/forwardRef(function (_ref, ref
|
|
|
17
17
|
var props = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
18
18
|
var resourceClient = props.resourceClient,
|
|
19
19
|
userId = props.agentId,
|
|
20
|
-
cloudId = props.cloudId
|
|
20
|
+
cloudId = props.cloudId,
|
|
21
|
+
_props$agentIdType = props.agentIdType,
|
|
22
|
+
agentIdType = _props$agentIdType === void 0 ? 'agent' : _props$agentIdType;
|
|
21
23
|
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
22
24
|
fireEvent = _useAnalyticsEvents.fireEvent;
|
|
23
25
|
|
|
@@ -125,7 +127,7 @@ export var AgentProfileCardTrigger = /*#__PURE__*/forwardRef(function (_ref, ref
|
|
|
125
127
|
case 0:
|
|
126
128
|
_context2.next = 2;
|
|
127
129
|
return resourceClient.getRovoAgentProfile({
|
|
128
|
-
type:
|
|
130
|
+
type: agentIdType,
|
|
129
131
|
value: userId
|
|
130
132
|
}, fireEvent);
|
|
131
133
|
case 2:
|
|
@@ -161,6 +163,7 @@ export var AgentProfileCardTrigger = /*#__PURE__*/forwardRef(function (_ref, ref
|
|
|
161
163
|
agent: profileData,
|
|
162
164
|
hasError: !!error,
|
|
163
165
|
cloudId: props.cloudId,
|
|
166
|
+
email: props.email,
|
|
164
167
|
errorType: error,
|
|
165
168
|
onChatClick: props.onChatClick,
|
|
166
169
|
onConversationStartersClick: props.onConversationStartersClick,
|
|
@@ -29,19 +29,20 @@ var createRovoParams = function createRovoParams(params) {
|
|
|
29
29
|
};
|
|
30
30
|
export var useAgentUrlActions = function useAgentUrlActions(_ref3) {
|
|
31
31
|
var cloudId = _ref3.cloudId,
|
|
32
|
+
email = _ref3.email,
|
|
32
33
|
source = _ref3.source;
|
|
33
34
|
var _useRovoPostMessageTo = useRovoPostMessageToPubsub(),
|
|
34
35
|
publishWithPostMessage = _useRovoPostMessageTo.publishWithPostMessage;
|
|
35
36
|
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
36
37
|
fireEvent = _useAnalyticsEvents.fireEvent;
|
|
37
38
|
var onEditAgent = useCallback(function (agentId) {
|
|
38
|
-
var url = getAtlassianStudioAgentEditUrl(cloudId, agentId);
|
|
39
|
+
var url = getAtlassianStudioAgentEditUrl(cloudId, agentId, email);
|
|
39
40
|
window.open(url, '_blank', 'noopener, noreferrer');
|
|
40
41
|
fireEvent('ui.button.clicked.editAgentButton', {
|
|
41
42
|
agentId: agentId,
|
|
42
43
|
source: source
|
|
43
44
|
});
|
|
44
|
-
}, [cloudId, fireEvent, source]);
|
|
45
|
+
}, [cloudId, email, fireEvent, source]);
|
|
45
46
|
var onCopyAgent = function onCopyAgent(agentId) {
|
|
46
47
|
var url = "".concat(window.location.origin, "/people/agent/").concat(agentId);
|
|
47
48
|
var urlWithParams = encodeParamsToUrl(url, {
|
|
@@ -63,7 +64,7 @@ export var useAgentUrlActions = function useAgentUrlActions(_ref3) {
|
|
|
63
64
|
agentId: agentId,
|
|
64
65
|
source: source
|
|
65
66
|
});
|
|
66
|
-
legacyDuplicateUrl = getAtlassianStudioAgentDuplicateUrl(cloudId, agentId); // When versioning FG is off, use legacy duplicate flow
|
|
67
|
+
legacyDuplicateUrl = getAtlassianStudioAgentDuplicateUrl(cloudId, agentId, email); // When versioning FG is off, use legacy duplicate flow
|
|
67
68
|
if (fg('rovo_agent_versioning_enabled')) {
|
|
68
69
|
_context.next = 5;
|
|
69
70
|
break;
|
|
@@ -117,7 +118,7 @@ export var useAgentUrlActions = function useAgentUrlActions(_ref3) {
|
|
|
117
118
|
return function (_x) {
|
|
118
119
|
return _ref4.apply(this, arguments);
|
|
119
120
|
};
|
|
120
|
-
}(), [cloudId, fireEvent, source]);
|
|
121
|
+
}(), [cloudId, email, fireEvent, source]);
|
|
121
122
|
var onConversationStarter = function onConversationStarter(_ref5) {
|
|
122
123
|
var agentId = _ref5.agentId,
|
|
123
124
|
prompt = _ref5.prompt;
|
|
@@ -1,18 +1,26 @@
|
|
|
1
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
|
+
import { getStudioSessionSyncUrl } from '@atlassian/studio-entry-link';
|
|
1
3
|
var STUDIO_PROD_URL = 'https://studio.atlassian.com';
|
|
2
4
|
var STUDIO_STAGING_URL = 'https://atlassian-studio.stg-east.frontend.public.atl-paas.net';
|
|
3
5
|
var isStaging = function isStaging() {
|
|
4
6
|
var host = window.location.host;
|
|
5
7
|
return host.includes('localhost') || host.includes('.stg.atlassian') || host.includes('.stg-east.frontend.public.atl-paas.net') || host.includes('jira-dev.com');
|
|
6
8
|
};
|
|
9
|
+
var getStudioEnv = function getStudioEnv() {
|
|
10
|
+
return isStaging() ? 'staging' : 'production';
|
|
11
|
+
};
|
|
7
12
|
export var getStudioHost = function getStudioHost() {
|
|
8
13
|
return isStaging() ? STUDIO_STAGING_URL : STUDIO_PROD_URL;
|
|
9
14
|
};
|
|
10
|
-
export var getStudioPath = function getStudioPath(path) {
|
|
15
|
+
export var getStudioPath = function getStudioPath(path, email) {
|
|
16
|
+
if (email && fg('asf-944-account-sync')) {
|
|
17
|
+
return getStudioSessionSyncUrl(getStudioEnv(), path, email);
|
|
18
|
+
}
|
|
11
19
|
return "".concat(getStudioHost()).concat(path);
|
|
12
20
|
};
|
|
13
|
-
export var getAtlassianStudioAgentEditUrl = function getAtlassianStudioAgentEditUrl(siteId, agentId) {
|
|
14
|
-
return getStudioPath("/s/".concat(siteId, "/agents/enrich/rovo/agents/").concat(agentId, "?redirect=").concat(encodeURIComponent('/:agentId/overview')));
|
|
21
|
+
export var getAtlassianStudioAgentEditUrl = function getAtlassianStudioAgentEditUrl(siteId, agentId, email) {
|
|
22
|
+
return getStudioPath("/s/".concat(siteId, "/agents/enrich/rovo/agents/").concat(agentId, "?redirect=").concat(encodeURIComponent('/:agentId/overview')), email);
|
|
15
23
|
};
|
|
16
|
-
export var getAtlassianStudioAgentDuplicateUrl = function getAtlassianStudioAgentDuplicateUrl(siteId, agentId) {
|
|
17
|
-
return getStudioPath("/s/".concat(siteId, "/agents/enrich/rovo/agents/").concat(agentId, "?redirect=").concat(encodeURIComponent('/create')));
|
|
24
|
+
export var getAtlassianStudioAgentDuplicateUrl = function getAtlassianStudioAgentDuplicateUrl(siteId, agentId, email) {
|
|
25
|
+
return getStudioPath("/s/".concat(siteId, "/agents/enrich/rovo/agents/").concat(agentId, "?redirect=").concat(encodeURIComponent('/create')), email);
|
|
18
26
|
};
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
4
|
var _excluded = ["children", "trigger", "showProfilecard", "hideProfilecard", "ariaLabelledBy"];
|
|
5
|
+
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; }
|
|
6
|
+
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) { _defineProperty(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; }
|
|
4
7
|
import React, { useCallback, useMemo } from 'react';
|
|
8
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
9
|
var PopupTriggerInner = function PopupTriggerInner(_ref, ref) {
|
|
6
10
|
var children = _ref.children,
|
|
7
11
|
trigger = _ref.trigger,
|
|
@@ -9,6 +13,7 @@ var PopupTriggerInner = function PopupTriggerInner(_ref, ref) {
|
|
|
9
13
|
hideProfilecard = _ref.hideProfilecard,
|
|
10
14
|
ariaLabelledBy = _ref.ariaLabelledBy,
|
|
11
15
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
16
|
+
// rename to onMouseOver when cleaning up update_profile_card_to_open_on_mouse_over
|
|
12
17
|
var onMouseEnter = useCallback(function () {
|
|
13
18
|
showProfilecard();
|
|
14
19
|
}, [showProfilecard]);
|
|
@@ -24,12 +29,16 @@ var PopupTriggerInner = function PopupTriggerInner(_ref, ref) {
|
|
|
24
29
|
showProfilecard();
|
|
25
30
|
}, [showProfilecard]);
|
|
26
31
|
var containerListeners = useMemo(function () {
|
|
27
|
-
return trigger === 'hover' ? {
|
|
32
|
+
return trigger === 'hover' ? _objectSpread(_objectSpread({}, fg('update_profile_card_to_open_on_mouse_over') ? {
|
|
33
|
+
onMouseOver: onMouseEnter,
|
|
34
|
+
onMouseOut: hideProfilecard
|
|
35
|
+
} : {
|
|
28
36
|
onMouseEnter: onMouseEnter,
|
|
29
|
-
onMouseLeave: hideProfilecard
|
|
37
|
+
onMouseLeave: hideProfilecard
|
|
38
|
+
}), {}, {
|
|
30
39
|
onBlur: hideProfilecard,
|
|
31
40
|
onKeyPress: onKeyPress
|
|
32
|
-
} : {
|
|
41
|
+
}) : {
|
|
33
42
|
onClick: onClick,
|
|
34
43
|
onKeyPress: onKeyPress
|
|
35
44
|
};
|
|
@@ -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 = "25.2.
|
|
8
|
+
packageVersion: (_process$env$_PACKAGE2 = "25.2.1") !== 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: "25.2.
|
|
27
|
+
packageVersion: "25.2.1"
|
|
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, onChatClick, hasError, errorType, onConversationStartersClick, resourceClient, addFlag, onDeleteAgent, hideMoreActions, hideAiDisclaimer, hideConversationStarters, }: AgentProfileCardProps) => React.JSX.Element;
|
|
3
|
+
declare const AgentProfileCard: ({ agent, isLoading, cloudId, email, onChatClick, hasError, errorType, onConversationStartersClick, resourceClient, addFlag, onDeleteAgent, hideMoreActions, hideAiDisclaimer, hideConversationStarters, }: AgentProfileCardProps) => React.JSX.Element;
|
|
4
4
|
export default AgentProfileCard;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare const firstCharUpper: (str: string) => string;
|
|
2
|
-
export declare const useAgentUrlActions: ({ cloudId, source, }: {
|
|
2
|
+
export declare const useAgentUrlActions: ({ cloudId, email, source, }: {
|
|
3
3
|
cloudId: string;
|
|
4
|
+
email?: string;
|
|
4
5
|
source: string;
|
|
5
6
|
}) => {
|
|
6
7
|
onEditAgent: (agentId: string) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const getStudioHost: () => string;
|
|
2
|
-
export declare const getStudioPath: (path: string) => string;
|
|
3
|
-
export declare const getAtlassianStudioAgentEditUrl: (siteId: string, agentId: string) => string;
|
|
4
|
-
export declare const getAtlassianStudioAgentDuplicateUrl: (siteId: string, agentId: string) => string;
|
|
2
|
+
export declare const getStudioPath: (path: string, email?: string) => string;
|
|
3
|
+
export declare const getAtlassianStudioAgentEditUrl: (siteId: string, agentId: string, email?: string) => string;
|
|
4
|
+
export declare const getAtlassianStudioAgentDuplicateUrl: (siteId: string, agentId: string, email?: string) => string;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -372,7 +372,9 @@ export interface AgentActionsType {
|
|
|
372
372
|
}
|
|
373
373
|
export interface AgentProfileCardTriggerProps extends AgentActionsType {
|
|
374
374
|
agentId: string;
|
|
375
|
+
agentIdType?: 'agent' | 'identity';
|
|
375
376
|
cloudId?: string;
|
|
377
|
+
email?: string;
|
|
376
378
|
autoFocus?: boolean;
|
|
377
379
|
resourceClient: ProfileClient;
|
|
378
380
|
actions?: ProfileCardAction[];
|
|
@@ -399,6 +401,7 @@ export type AgentProfileCardProps = {
|
|
|
399
401
|
isLoading?: boolean;
|
|
400
402
|
hasError?: boolean;
|
|
401
403
|
cloudId?: string;
|
|
404
|
+
email?: string;
|
|
402
405
|
errorType?: ProfileCardErrorType;
|
|
403
406
|
addFlag?: (flag: Flag) => void;
|
|
404
407
|
onDeleteAgent?: (agentId: string) => {
|
|
@@ -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, onDeleteAgent, hideMoreActions, hideAiDisclaimer, hideConversationStarters, }: AgentProfileCardProps) => React.JSX.Element;
|
|
3
|
+
declare const AgentProfileCard: ({ agent, isLoading, cloudId, email, onChatClick, hasError, errorType, onConversationStartersClick, resourceClient, addFlag, onDeleteAgent, hideMoreActions, hideAiDisclaimer, hideConversationStarters, }: AgentProfileCardProps) => React.JSX.Element;
|
|
4
4
|
export default AgentProfileCard;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare const firstCharUpper: (str: string) => string;
|
|
2
|
-
export declare const useAgentUrlActions: ({ cloudId, source, }: {
|
|
2
|
+
export declare const useAgentUrlActions: ({ cloudId, email, source, }: {
|
|
3
3
|
cloudId: string;
|
|
4
|
+
email?: string;
|
|
4
5
|
source: string;
|
|
5
6
|
}) => {
|
|
6
7
|
onEditAgent: (agentId: string) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const getStudioHost: () => string;
|
|
2
|
-
export declare const getStudioPath: (path: string) => string;
|
|
3
|
-
export declare const getAtlassianStudioAgentEditUrl: (siteId: string, agentId: string) => string;
|
|
4
|
-
export declare const getAtlassianStudioAgentDuplicateUrl: (siteId: string, agentId: string) => string;
|
|
2
|
+
export declare const getStudioPath: (path: string, email?: string) => string;
|
|
3
|
+
export declare const getAtlassianStudioAgentEditUrl: (siteId: string, agentId: string, email?: string) => string;
|
|
4
|
+
export declare const getAtlassianStudioAgentDuplicateUrl: (siteId: string, agentId: string, email?: string) => string;
|
|
@@ -375,7 +375,9 @@ export interface AgentActionsType {
|
|
|
375
375
|
}
|
|
376
376
|
export interface AgentProfileCardTriggerProps extends AgentActionsType {
|
|
377
377
|
agentId: string;
|
|
378
|
+
agentIdType?: 'agent' | 'identity';
|
|
378
379
|
cloudId?: string;
|
|
380
|
+
email?: string;
|
|
379
381
|
autoFocus?: boolean;
|
|
380
382
|
resourceClient: ProfileClient;
|
|
381
383
|
actions?: ProfileCardAction[];
|
|
@@ -405,6 +407,7 @@ export type AgentProfileCardProps = {
|
|
|
405
407
|
isLoading?: boolean;
|
|
406
408
|
hasError?: boolean;
|
|
407
409
|
cloudId?: string;
|
|
410
|
+
email?: string;
|
|
408
411
|
errorType?: ProfileCardErrorType;
|
|
409
412
|
addFlag?: (flag: Flag) => void;
|
|
410
413
|
onDeleteAgent?: (agentId: string) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/profilecard",
|
|
3
|
-
"version": "25.
|
|
3
|
+
"version": "25.3.0",
|
|
4
4
|
"description": "A React component to display a card with user information.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@atlaskit/css": "^0.19.0",
|
|
55
55
|
"@atlaskit/dropdown-menu": "^16.8.0",
|
|
56
56
|
"@atlaskit/empty-state": "^10.2.0",
|
|
57
|
-
"@atlaskit/give-kudos": "^5.
|
|
57
|
+
"@atlaskit/give-kudos": "^5.7.0",
|
|
58
58
|
"@atlaskit/heading": "^5.4.0",
|
|
59
59
|
"@atlaskit/icon": "^34.3.0",
|
|
60
60
|
"@atlaskit/link": "3.4.2",
|
|
@@ -74,9 +74,10 @@
|
|
|
74
74
|
"@atlaskit/teams-avatar": "^2.6.0",
|
|
75
75
|
"@atlaskit/teams-public": "^1.3.0",
|
|
76
76
|
"@atlaskit/theme": "^23.2.0",
|
|
77
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
77
|
+
"@atlaskit/tmp-editor-statsig": "^75.0.0",
|
|
78
78
|
"@atlaskit/tokens": "^13.0.0",
|
|
79
79
|
"@atlaskit/tooltip": "^22.0.0",
|
|
80
|
+
"@atlassian/studio-entry-link": "^1.1.0",
|
|
80
81
|
"@babel/runtime": "^7.0.0",
|
|
81
82
|
"@compiled/react": "^0.20.0",
|
|
82
83
|
"date-fns": "^2.17.0",
|
|
@@ -129,6 +130,9 @@
|
|
|
129
130
|
}
|
|
130
131
|
},
|
|
131
132
|
"platform-feature-flags": {
|
|
133
|
+
"asf-944-account-sync": {
|
|
134
|
+
"type": "boolean"
|
|
135
|
+
},
|
|
132
136
|
"ptc-links-migrate-atlaskit-link": {
|
|
133
137
|
"type": "boolean"
|
|
134
138
|
},
|
|
@@ -185,6 +189,9 @@
|
|
|
185
189
|
},
|
|
186
190
|
"enable_teams_t26_design_drop_core_experiences": {
|
|
187
191
|
"type": "boolean"
|
|
192
|
+
},
|
|
193
|
+
"update_profile_card_to_open_on_mouse_over": {
|
|
194
|
+
"type": "boolean"
|
|
188
195
|
}
|
|
189
196
|
},
|
|
190
197
|
"sideEffects": [
|