@atlaskit/profilecard 24.17.0 → 24.18.1
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 +13 -0
- package/dist/cjs/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/cjs/client/getTeamFromAGG.js +1 -1
- package/dist/cjs/components/Agent/hooks/useAgentActions.js +10 -17
- package/dist/cjs/components/Agent/utils/index.js +24 -0
- 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/hooks/useAgentActions.js +10 -19
- package/dist/es2019/components/Agent/utils/index.js +12 -0
- 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/hooks/useAgentActions.js +10 -17
- package/dist/esm/components/Agent/utils/index.js +18 -0
- package/dist/esm/util/analytics.js +2 -2
- package/dist/types/components/Agent/utils/index.d.ts +4 -0
- package/dist/types-ts4.5/components/Agent/utils/index.d.ts +4 -0
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/profilecard
|
|
2
2
|
|
|
3
|
+
## 24.18.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 24.18.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`f152f8d34a641`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f152f8d34a641) -
|
|
14
|
+
Update agent profile card leagcy urls
|
|
15
|
+
|
|
3
16
|
## 24.17.0
|
|
4
17
|
|
|
5
18
|
### 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', "24.
|
|
14
|
+
headers.append('atl-client-version', "24.18.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', "24.
|
|
69
|
+
headers.append('atl-client-version', "24.18.0");
|
|
70
70
|
return headers;
|
|
71
71
|
};
|
|
72
72
|
function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -16,6 +16,7 @@ var _navigation = require("@atlaskit/teams-app-config/navigation");
|
|
|
16
16
|
var _teamsAppInternalAnalytics = require("@atlaskit/teams-app-internal-analytics");
|
|
17
17
|
var _analytics = require("../../../util/analytics");
|
|
18
18
|
var _url = require("../../../util/url");
|
|
19
|
+
var _utils = require("../utils");
|
|
19
20
|
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; }
|
|
20
21
|
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; }
|
|
21
22
|
var firstCharUpper = exports.firstCharUpper = function firstCharUpper(str) {
|
|
@@ -42,13 +43,8 @@ var useAgentUrlActions = exports.useAgentUrlActions = function useAgentUrlAction
|
|
|
42
43
|
var _useAnalyticsEventsNe = (0, _teamsAppInternalAnalytics.useAnalyticsEvents)(),
|
|
43
44
|
fireEventNext = _useAnalyticsEventsNe.fireEvent;
|
|
44
45
|
var onEditAgent = (0, _react.useCallback)(function (agentId) {
|
|
45
|
-
var url =
|
|
46
|
-
|
|
47
|
-
cloudId: cloudId
|
|
48
|
-
}, createRovoParams({
|
|
49
|
-
cloudId: cloudId
|
|
50
|
-
})));
|
|
51
|
-
window.open(urlWithParams, '_blank', 'noopener, noreferrer');
|
|
46
|
+
var url = (0, _utils.getAtlassianStudioAgentEditUrl)(cloudId, agentId);
|
|
47
|
+
window.open(url, '_blank', 'noopener, noreferrer');
|
|
52
48
|
if ((0, _platformFeatureFlags.fg)('ptc-enable-profile-card-analytics-refactor')) {
|
|
53
49
|
fireEventNext('ui.button.clicked.editAgentButton', {
|
|
54
50
|
agentId: agentId,
|
|
@@ -67,7 +63,11 @@ var useAgentUrlActions = exports.useAgentUrlActions = function useAgentUrlAction
|
|
|
67
63
|
}
|
|
68
64
|
}, [cloudId, createAnalyticsEvent, fireEventNext, source]);
|
|
69
65
|
var onCopyAgent = function onCopyAgent(agentId) {
|
|
70
|
-
|
|
66
|
+
var url = "".concat(window.location.origin, "/people/agent/").concat(agentId);
|
|
67
|
+
var urlWithParams = (0, _url.encodeParamsToUrl)(url, {
|
|
68
|
+
cloudId: cloudId
|
|
69
|
+
});
|
|
70
|
+
navigator.clipboard.writeText(urlWithParams);
|
|
71
71
|
if ((0, _platformFeatureFlags.fg)('ptc-enable-profile-card-analytics-refactor')) {
|
|
72
72
|
fireEventNext('ui.button.clicked.copyAgentLinkButton', {
|
|
73
73
|
agentId: agentId,
|
|
@@ -86,15 +86,8 @@ var useAgentUrlActions = exports.useAgentUrlActions = function useAgentUrlAction
|
|
|
86
86
|
}
|
|
87
87
|
};
|
|
88
88
|
var onDuplicateAgent = (0, _react.useCallback)(function (agentId) {
|
|
89
|
-
var
|
|
90
|
-
|
|
91
|
-
cloudId: cloudId
|
|
92
|
-
}, createRovoParams({
|
|
93
|
-
cloudId: cloudId,
|
|
94
|
-
agentId: agentId,
|
|
95
|
-
pathway: 'agents-create'
|
|
96
|
-
})));
|
|
97
|
-
window.open(urlWithParams, '_blank', 'noopener, noreferrer');
|
|
89
|
+
var url = (0, _utils.getAtlassianStudioAgentDuplicateUrl)(cloudId, agentId);
|
|
90
|
+
window.open(url, '_blank', 'noopener, noreferrer');
|
|
98
91
|
if ((0, _platformFeatureFlags.fg)('ptc-enable-profile-card-analytics-refactor')) {
|
|
99
92
|
fireEventNext('ui.button.clicked.duplicateAgentButton', {
|
|
100
93
|
agentId: agentId,
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getStudioPath = exports.getStudioHost = exports.getAtlassianStudioAgentEditUrl = exports.getAtlassianStudioAgentDuplicateUrl = void 0;
|
|
7
|
+
var STUDIO_PROD_URL = 'https://studio.atlassian.com';
|
|
8
|
+
var STUDIO_STAGING_URL = 'https://atlassian-studio.stg-east.frontend.public.atl-paas.net';
|
|
9
|
+
var isStaging = function isStaging() {
|
|
10
|
+
var host = window.location.host;
|
|
11
|
+
return host.includes('localhost') || host.includes('.stg.atlassian') || host.includes('.stg-east.frontend.public.atl-paas.net') || host.includes('jira-dev.com');
|
|
12
|
+
};
|
|
13
|
+
var getStudioHost = exports.getStudioHost = function getStudioHost() {
|
|
14
|
+
return isStaging() ? STUDIO_STAGING_URL : STUDIO_PROD_URL;
|
|
15
|
+
};
|
|
16
|
+
var getStudioPath = exports.getStudioPath = function getStudioPath(path) {
|
|
17
|
+
return "".concat(getStudioHost()).concat(path);
|
|
18
|
+
};
|
|
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')));
|
|
21
|
+
};
|
|
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')));
|
|
24
|
+
};
|
|
@@ -13,7 +13,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
13
13
|
var ANALYTICS_CHANNEL = 'peopleTeams';
|
|
14
14
|
var PACKAGE_META_DATA = exports.PACKAGE_META_DATA = {
|
|
15
15
|
packageName: "@atlaskit/profilecard",
|
|
16
|
-
packageVersion: "24.
|
|
16
|
+
packageVersion: "24.18.0"
|
|
17
17
|
};
|
|
18
18
|
var runItLater = function runItLater(cb) {
|
|
19
19
|
var requestIdleCallback = window.requestIdleCallback;
|
|
@@ -58,7 +58,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
58
58
|
actionSubjectId: actionSubjectId,
|
|
59
59
|
attributes: _objectSpread(_objectSpread({
|
|
60
60
|
packageName: "@atlaskit/profilecard",
|
|
61
|
-
packageVersion: "24.
|
|
61
|
+
packageVersion: "24.18.0"
|
|
62
62
|
}, attributes), {}, {
|
|
63
63
|
firedAt: Math.round((0, _performance.getPageTime)())
|
|
64
64
|
})
|
|
@@ -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.
|
|
9
|
+
headers.append('atl-client-version', "24.18.0");
|
|
10
10
|
return headers;
|
|
11
11
|
};
|
|
12
12
|
export async function getOrgIdForCloudIdFromAGG(url, cloudId) {
|
|
@@ -77,7 +77,7 @@ export const addHeaders = headers => {
|
|
|
77
77
|
headers.append('X-ExperimentalApi', 'teams-beta');
|
|
78
78
|
headers.append('X-ExperimentalApi', 'team-members-beta');
|
|
79
79
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
80
|
-
headers.append('atl-client-version', "24.
|
|
80
|
+
headers.append('atl-client-version', "24.18.0");
|
|
81
81
|
return headers;
|
|
82
82
|
};
|
|
83
83
|
export async function getTeamFromAGG(url, teamId, siteId) {
|
|
@@ -7,6 +7,7 @@ import { navigateToTeamsApp } from '@atlaskit/teams-app-config/navigation';
|
|
|
7
7
|
import { useAnalyticsEvents as useAnalyticsEventsNext } from '@atlaskit/teams-app-internal-analytics';
|
|
8
8
|
import { fireEvent } from '../../../util/analytics';
|
|
9
9
|
import { encodeParamsToUrl } from '../../../util/url';
|
|
10
|
+
import { getAtlassianStudioAgentDuplicateUrl, getAtlassianStudioAgentEditUrl } from '../utils';
|
|
10
11
|
export const firstCharUpper = str => str.charAt(0).toUpperCase() + str.slice(1);
|
|
11
12
|
const ROVO_PARAM_PREFIX = 'rovoChat';
|
|
12
13
|
const createRovoParams = params => {
|
|
@@ -30,14 +31,8 @@ export const useAgentUrlActions = ({
|
|
|
30
31
|
fireEvent: fireEventNext
|
|
31
32
|
} = useAnalyticsEventsNext();
|
|
32
33
|
const onEditAgent = useCallback(agentId => {
|
|
33
|
-
const url =
|
|
34
|
-
|
|
35
|
-
cloudId,
|
|
36
|
-
...createRovoParams({
|
|
37
|
-
cloudId
|
|
38
|
-
})
|
|
39
|
-
});
|
|
40
|
-
window.open(urlWithParams, '_blank', 'noopener, noreferrer');
|
|
34
|
+
const url = getAtlassianStudioAgentEditUrl(cloudId, agentId);
|
|
35
|
+
window.open(url, '_blank', 'noopener, noreferrer');
|
|
41
36
|
if (fg('ptc-enable-profile-card-analytics-refactor')) {
|
|
42
37
|
fireEventNext('ui.button.clicked.editAgentButton', {
|
|
43
38
|
agentId,
|
|
@@ -56,7 +51,11 @@ export const useAgentUrlActions = ({
|
|
|
56
51
|
}
|
|
57
52
|
}, [cloudId, createAnalyticsEvent, fireEventNext, source]);
|
|
58
53
|
const onCopyAgent = agentId => {
|
|
59
|
-
|
|
54
|
+
const url = `${window.location.origin}/people/agent/${agentId}`;
|
|
55
|
+
const urlWithParams = encodeParamsToUrl(url, {
|
|
56
|
+
cloudId
|
|
57
|
+
});
|
|
58
|
+
navigator.clipboard.writeText(urlWithParams);
|
|
60
59
|
if (fg('ptc-enable-profile-card-analytics-refactor')) {
|
|
61
60
|
fireEventNext('ui.button.clicked.copyAgentLinkButton', {
|
|
62
61
|
agentId,
|
|
@@ -75,16 +74,8 @@ export const useAgentUrlActions = ({
|
|
|
75
74
|
}
|
|
76
75
|
};
|
|
77
76
|
const onDuplicateAgent = useCallback(agentId => {
|
|
78
|
-
const
|
|
79
|
-
|
|
80
|
-
cloudId,
|
|
81
|
-
...createRovoParams({
|
|
82
|
-
cloudId,
|
|
83
|
-
agentId,
|
|
84
|
-
pathway: 'agents-create'
|
|
85
|
-
})
|
|
86
|
-
});
|
|
87
|
-
window.open(urlWithParams, '_blank', 'noopener, noreferrer');
|
|
77
|
+
const url = getAtlassianStudioAgentDuplicateUrl(cloudId, agentId);
|
|
78
|
+
window.open(url, '_blank', 'noopener, noreferrer');
|
|
88
79
|
if (fg('ptc-enable-profile-card-analytics-refactor')) {
|
|
89
80
|
fireEventNext('ui.button.clicked.duplicateAgentButton', {
|
|
90
81
|
agentId,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const STUDIO_PROD_URL = 'https://studio.atlassian.com';
|
|
2
|
+
const STUDIO_STAGING_URL = 'https://atlassian-studio.stg-east.frontend.public.atl-paas.net';
|
|
3
|
+
const isStaging = () => {
|
|
4
|
+
const host = window.location.host;
|
|
5
|
+
return host.includes('localhost') || host.includes('.stg.atlassian') || host.includes('.stg-east.frontend.public.atl-paas.net') || host.includes('jira-dev.com');
|
|
6
|
+
};
|
|
7
|
+
export const getStudioHost = () => {
|
|
8
|
+
return isStaging() ? STUDIO_STAGING_URL : STUDIO_PROD_URL;
|
|
9
|
+
};
|
|
10
|
+
export const getStudioPath = path => `${getStudioHost()}${path}`;
|
|
11
|
+
export const getAtlassianStudioAgentEditUrl = (siteId, agentId) => getStudioPath(`/s/${siteId}/agents/enrich/rovo/agents/${agentId}?redirect=${encodeURIComponent('/:agentId/overview')}`);
|
|
12
|
+
export const getAtlassianStudioAgentDuplicateUrl = (siteId, agentId) => getStudioPath(`/s/${siteId}/agents/enrich/rovo/agents/${agentId}?redirect=${encodeURIComponent('/create')}`);
|
|
@@ -4,7 +4,7 @@ import { getPageTime } from './performance';
|
|
|
4
4
|
const ANALYTICS_CHANNEL = 'peopleTeams';
|
|
5
5
|
export const PACKAGE_META_DATA = {
|
|
6
6
|
packageName: "@atlaskit/profilecard",
|
|
7
|
-
packageVersion: "24.
|
|
7
|
+
packageVersion: "24.18.0"
|
|
8
8
|
};
|
|
9
9
|
const runItLater = cb => {
|
|
10
10
|
const requestIdleCallback = window.requestIdleCallback;
|
|
@@ -45,7 +45,7 @@ const createEvent = (eventType, action, actionSubject, actionSubjectId, attribut
|
|
|
45
45
|
actionSubjectId,
|
|
46
46
|
attributes: {
|
|
47
47
|
packageName: "@atlaskit/profilecard",
|
|
48
|
-
packageVersion: "24.
|
|
48
|
+
packageVersion: "24.18.0",
|
|
49
49
|
...attributes,
|
|
50
50
|
firedAt: Math.round(getPageTime())
|
|
51
51
|
}
|
|
@@ -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.
|
|
7
|
+
headers.append('atl-client-version', "24.18.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', "24.
|
|
62
|
+
headers.append('atl-client-version', "24.18.0");
|
|
63
63
|
return headers;
|
|
64
64
|
};
|
|
65
65
|
export function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -11,6 +11,7 @@ import { navigateToTeamsApp } from '@atlaskit/teams-app-config/navigation';
|
|
|
11
11
|
import { useAnalyticsEvents as useAnalyticsEventsNext } from '@atlaskit/teams-app-internal-analytics';
|
|
12
12
|
import { fireEvent } from '../../../util/analytics';
|
|
13
13
|
import { encodeParamsToUrl } from '../../../util/url';
|
|
14
|
+
import { getAtlassianStudioAgentDuplicateUrl, getAtlassianStudioAgentEditUrl } from '../utils';
|
|
14
15
|
export var firstCharUpper = function firstCharUpper(str) {
|
|
15
16
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
16
17
|
};
|
|
@@ -35,13 +36,8 @@ export var useAgentUrlActions = function useAgentUrlActions(_ref3) {
|
|
|
35
36
|
var _useAnalyticsEventsNe = useAnalyticsEventsNext(),
|
|
36
37
|
fireEventNext = _useAnalyticsEventsNe.fireEvent;
|
|
37
38
|
var onEditAgent = useCallback(function (agentId) {
|
|
38
|
-
var url =
|
|
39
|
-
|
|
40
|
-
cloudId: cloudId
|
|
41
|
-
}, createRovoParams({
|
|
42
|
-
cloudId: cloudId
|
|
43
|
-
})));
|
|
44
|
-
window.open(urlWithParams, '_blank', 'noopener, noreferrer');
|
|
39
|
+
var url = getAtlassianStudioAgentEditUrl(cloudId, agentId);
|
|
40
|
+
window.open(url, '_blank', 'noopener, noreferrer');
|
|
45
41
|
if (fg('ptc-enable-profile-card-analytics-refactor')) {
|
|
46
42
|
fireEventNext('ui.button.clicked.editAgentButton', {
|
|
47
43
|
agentId: agentId,
|
|
@@ -60,7 +56,11 @@ export var useAgentUrlActions = function useAgentUrlActions(_ref3) {
|
|
|
60
56
|
}
|
|
61
57
|
}, [cloudId, createAnalyticsEvent, fireEventNext, source]);
|
|
62
58
|
var onCopyAgent = function onCopyAgent(agentId) {
|
|
63
|
-
|
|
59
|
+
var url = "".concat(window.location.origin, "/people/agent/").concat(agentId);
|
|
60
|
+
var urlWithParams = encodeParamsToUrl(url, {
|
|
61
|
+
cloudId: cloudId
|
|
62
|
+
});
|
|
63
|
+
navigator.clipboard.writeText(urlWithParams);
|
|
64
64
|
if (fg('ptc-enable-profile-card-analytics-refactor')) {
|
|
65
65
|
fireEventNext('ui.button.clicked.copyAgentLinkButton', {
|
|
66
66
|
agentId: agentId,
|
|
@@ -79,15 +79,8 @@ export var useAgentUrlActions = function useAgentUrlActions(_ref3) {
|
|
|
79
79
|
}
|
|
80
80
|
};
|
|
81
81
|
var onDuplicateAgent = useCallback(function (agentId) {
|
|
82
|
-
var
|
|
83
|
-
|
|
84
|
-
cloudId: cloudId
|
|
85
|
-
}, createRovoParams({
|
|
86
|
-
cloudId: cloudId,
|
|
87
|
-
agentId: agentId,
|
|
88
|
-
pathway: 'agents-create'
|
|
89
|
-
})));
|
|
90
|
-
window.open(urlWithParams, '_blank', 'noopener, noreferrer');
|
|
82
|
+
var url = getAtlassianStudioAgentDuplicateUrl(cloudId, agentId);
|
|
83
|
+
window.open(url, '_blank', 'noopener, noreferrer');
|
|
91
84
|
if (fg('ptc-enable-profile-card-analytics-refactor')) {
|
|
92
85
|
fireEventNext('ui.button.clicked.duplicateAgentButton', {
|
|
93
86
|
agentId: agentId,
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
var STUDIO_PROD_URL = 'https://studio.atlassian.com';
|
|
2
|
+
var STUDIO_STAGING_URL = 'https://atlassian-studio.stg-east.frontend.public.atl-paas.net';
|
|
3
|
+
var isStaging = function isStaging() {
|
|
4
|
+
var host = window.location.host;
|
|
5
|
+
return host.includes('localhost') || host.includes('.stg.atlassian') || host.includes('.stg-east.frontend.public.atl-paas.net') || host.includes('jira-dev.com');
|
|
6
|
+
};
|
|
7
|
+
export var getStudioHost = function getStudioHost() {
|
|
8
|
+
return isStaging() ? STUDIO_STAGING_URL : STUDIO_PROD_URL;
|
|
9
|
+
};
|
|
10
|
+
export var getStudioPath = function getStudioPath(path) {
|
|
11
|
+
return "".concat(getStudioHost()).concat(path);
|
|
12
|
+
};
|
|
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')));
|
|
15
|
+
};
|
|
16
|
+
export var getAtlassianStudioAgentDuplicateUrl = function getAtlassianStudioAgentDuplicateUrl(siteId, agentId) {
|
|
17
|
+
return getStudioPath("/s/".concat(siteId, "/agents/enrich/rovo/agents/").concat(agentId, "?redirect=").concat(encodeURIComponent('/create')));
|
|
18
|
+
};
|
|
@@ -7,7 +7,7 @@ import { getPageTime } from './performance';
|
|
|
7
7
|
var ANALYTICS_CHANNEL = 'peopleTeams';
|
|
8
8
|
export var PACKAGE_META_DATA = {
|
|
9
9
|
packageName: "@atlaskit/profilecard",
|
|
10
|
-
packageVersion: "24.
|
|
10
|
+
packageVersion: "24.18.0"
|
|
11
11
|
};
|
|
12
12
|
var runItLater = function runItLater(cb) {
|
|
13
13
|
var requestIdleCallback = window.requestIdleCallback;
|
|
@@ -52,7 +52,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
52
52
|
actionSubjectId: actionSubjectId,
|
|
53
53
|
attributes: _objectSpread(_objectSpread({
|
|
54
54
|
packageName: "@atlaskit/profilecard",
|
|
55
|
-
packageVersion: "24.
|
|
55
|
+
packageVersion: "24.18.0"
|
|
56
56
|
}, attributes), {}, {
|
|
57
57
|
firedAt: Math.round(getPageTime())
|
|
58
58
|
})
|
|
@@ -0,0 +1,4 @@
|
|
|
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;
|
|
@@ -0,0 +1,4 @@
|
|
|
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;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/profilecard",
|
|
3
|
-
"version": "24.
|
|
3
|
+
"version": "24.18.1",
|
|
4
4
|
"description": "A React component to display a card with user information.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
"@atlaskit/feature-gate-js-client": "^5.5.0",
|
|
52
52
|
"@atlaskit/give-kudos": "^4.4.0",
|
|
53
53
|
"@atlaskit/heading": "^5.2.0",
|
|
54
|
-
"@atlaskit/icon": "^28.
|
|
54
|
+
"@atlaskit/icon": "^28.5.0",
|
|
55
55
|
"@atlaskit/link": "^3.2.0",
|
|
56
|
-
"@atlaskit/logo": "^19.
|
|
56
|
+
"@atlaskit/logo": "^19.9.0",
|
|
57
57
|
"@atlaskit/lozenge": "^13.0.0",
|
|
58
58
|
"@atlaskit/menu": "^8.4.0",
|
|
59
59
|
"@atlaskit/modal-dialog": "^14.4.0",
|
|
@@ -62,13 +62,13 @@
|
|
|
62
62
|
"@atlaskit/platform-feature-flags-react": "^0.3.0",
|
|
63
63
|
"@atlaskit/popup": "^4.4.0",
|
|
64
64
|
"@atlaskit/primitives": "^14.15.0",
|
|
65
|
-
"@atlaskit/rovo-agent-components": "^3.
|
|
66
|
-
"@atlaskit/rovo-triggers": "^3.
|
|
65
|
+
"@atlaskit/rovo-agent-components": "^3.7.0",
|
|
66
|
+
"@atlaskit/rovo-triggers": "^3.13.0",
|
|
67
67
|
"@atlaskit/spinner": "^19.0.0",
|
|
68
68
|
"@atlaskit/teams-app-config": "^1.12.0",
|
|
69
|
-
"@atlaskit/teams-app-internal-analytics": "^1.
|
|
69
|
+
"@atlaskit/teams-app-internal-analytics": "^1.13.0",
|
|
70
70
|
"@atlaskit/teams-avatar": "^2.3.0",
|
|
71
|
-
"@atlaskit/teams-public": "^0.
|
|
71
|
+
"@atlaskit/teams-public": "^0.62.0",
|
|
72
72
|
"@atlaskit/theme": "^21.0.0",
|
|
73
73
|
"@atlaskit/tokens": "^6.4.0",
|
|
74
74
|
"@atlaskit/tooltip": "^20.5.0",
|