@atlaskit/profilecard 26.19.5 → 26.19.6
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/RovoAgentCardClient.js +1 -11
- package/dist/cjs/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/cjs/client/getTeamFromAGG.js +1 -1
- package/dist/cjs/components/Agent/AgentProfileCardResourced.js +5 -5
- package/dist/cjs/components/User/ProfileCardTrigger.js +5 -6
- package/dist/cjs/util/analytics.js +2 -2
- package/dist/es2019/client/RovoAgentCardClient.js +1 -24
- package/dist/es2019/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/es2019/client/getTeamFromAGG.js +1 -1
- package/dist/es2019/components/Agent/AgentProfileCardResourced.js +5 -5
- package/dist/es2019/components/User/ProfileCardTrigger.js +5 -6
- package/dist/es2019/util/analytics.js +2 -2
- package/dist/esm/client/RovoAgentCardClient.js +1 -11
- package/dist/esm/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/esm/client/getTeamFromAGG.js +1 -1
- package/dist/esm/components/Agent/AgentProfileCardResourced.js +5 -5
- package/dist/esm/components/User/ProfileCardTrigger.js +5 -6
- package/dist/esm/util/analytics.js +2 -2
- package/package.json +1 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/profilecard
|
|
2
2
|
|
|
3
|
+
## 26.19.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`df08d54a9f502`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/df08d54a9f502) -
|
|
8
|
+
Cleanup feature gate `jira_ai_fix_agent_profile_card_flashing`. The Rovo agent AGG query and the
|
|
9
|
+
reduced hover delay for externally controlled profile cards are now always on.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 26.19.5
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -16,7 +16,6 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
16
16
|
var _wrapNativeSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/wrapNativeSuper"));
|
|
17
17
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
18
18
|
var _featureGates = _interopRequireDefault(require("@atlaskit/feature-gate-js-client/feature-gates"));
|
|
19
|
-
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
20
19
|
var _analytics = require("../util/analytics");
|
|
21
20
|
var _performance = require("../util/performance");
|
|
22
21
|
var _rovoAgentUtils = require("../util/rovoAgentUtils");
|
|
@@ -57,15 +56,6 @@ var buildRovoAgentQueryByAri = function buildRovoAgentQueryByAri(agentAri) {
|
|
|
57
56
|
}
|
|
58
57
|
};
|
|
59
58
|
};
|
|
60
|
-
var buildRovoAgentQueryByAccountIdOld = function buildRovoAgentQueryByAccountIdOld(identityAccountId, cloudId) {
|
|
61
|
-
return {
|
|
62
|
-
query: "\n\t\tquery RovoAgentProfileCard_AgentQueryByAccountId($identityAccountId: ID!, $cloudId: ID!) {\n\t\t\tagentStudio_agentByIdentityAccountId(identityAccountId: $identityAccountId, cloudId: $cloudId) @optIn(to: \"AgentStudio\") {\n\t\t\t __typename\n\t\t\t\t... on AgentStudioAssistant {\n\t\t\t\t\tauthoringTeam {\n\t\t\t\t\t\tdisplayName\n\t\t\t\t\t\tprofileUrl\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t... on QueryError {\n\t\t\t\t\tmessage\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t",
|
|
63
|
-
variables: {
|
|
64
|
-
identityAccountId: identityAccountId,
|
|
65
|
-
cloudId: cloudId
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
};
|
|
69
59
|
var buildRovoAgentQueryByAccountId = function buildRovoAgentQueryByAccountId(identityAccountId, cloudId) {
|
|
70
60
|
return {
|
|
71
61
|
query: "\n\t\tquery RovoAgentProfileCard_AgentQueryByAccountId($id: ID!, $cloudId: String!) {\n\t\t\tagentStudio_agentByIdentityAccountId(cloudId: $cloudId, id: $id) @optIn(to: \"AgentStudio\") {\n\t\t\t __typename\n\t\t\t\t... on AgentStudioAssistant {\n\t\t\t\t\tauthoringTeam {\n\t\t\t\t\t\tdisplayName\n\t\t\t\t\t\tprofileUrl\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t... on QueryError {\n\t\t\t\t\tmessage\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t",
|
|
@@ -194,7 +184,7 @@ var RovoAgentCardClient = exports.default = /*#__PURE__*/function (_CachingClien
|
|
|
194
184
|
while (1) switch (_context3.prev = _context3.next) {
|
|
195
185
|
case 0:
|
|
196
186
|
_context3.next = 1;
|
|
197
|
-
return (0, _graphqlUtils.AGGQuery)('/gateway/api/graphql',
|
|
187
|
+
return (0, _graphqlUtils.AGGQuery)('/gateway/api/graphql', buildRovoAgentQueryByAccountId(identityAccountId, cloudId));
|
|
198
188
|
case 1:
|
|
199
189
|
response = _context3.sent;
|
|
200
190
|
if (!(((_response$agentStudio2 = response.agentStudio_agentByIdentityAccountId) === null || _response$agentStudio2 === void 0 ? void 0 : _response$agentStudio2.__typename) === 'QueryError')) {
|
|
@@ -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.19.
|
|
14
|
+
headers.append('atl-client-version', "26.19.5");
|
|
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.19.
|
|
69
|
+
headers.append('atl-client-version', "26.19.5");
|
|
70
70
|
return headers;
|
|
71
71
|
};
|
|
72
72
|
function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -31,7 +31,7 @@ var AgentProfileCardResourced = exports.AgentProfileCardResourced = function Age
|
|
|
31
31
|
setAgentData = _useState2[1];
|
|
32
32
|
// Initialize as true when fix is enabled since we fetch immediately on mount,
|
|
33
33
|
// avoiding a brief error screen flash before the useEffect fires.
|
|
34
|
-
var _useState3 = (0, _react.useState)((0, _fg.fg)('
|
|
34
|
+
var _useState3 = (0, _react.useState)((0, _fg.fg)('confluence_fix_agent_profile_card_flash')),
|
|
35
35
|
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
36
36
|
isLoading = _useState4[0],
|
|
37
37
|
setIsLoading = _useState4[1];
|
|
@@ -64,7 +64,7 @@ var AgentProfileCardResourced = exports.AgentProfileCardResourced = function Age
|
|
|
64
64
|
case 0:
|
|
65
65
|
creator_type = _ref.creator_type, creator = _ref.creator, authoringTeam = _ref.authoringTeam;
|
|
66
66
|
_context.prev = 1;
|
|
67
|
-
currentCreatorUserId = (0, _fg.fg)('
|
|
67
|
+
currentCreatorUserId = (0, _fg.fg)('confluence_fix_agent_profile_card_flash') ? creator_type === 'CUSTOMER' && creator ? (0, _rovoAgentUtils.getAAIDFromARI)(creator) : undefined : creatorUserId;
|
|
68
68
|
if (!(currentCreatorUserId && props.cloudId)) {
|
|
69
69
|
_context.next = 3;
|
|
70
70
|
break;
|
|
@@ -73,7 +73,7 @@ var AgentProfileCardResourced = exports.AgentProfileCardResourced = function Age
|
|
|
73
73
|
return props.resourceClient.getProfile(props.cloudId, currentCreatorUserId, fireEvent);
|
|
74
74
|
case 2:
|
|
75
75
|
userCreatorInfo = _context.sent;
|
|
76
|
-
if ((0, _fg.fg)('
|
|
76
|
+
if ((0, _fg.fg)('confluence_fix_agent_profile_card_flash')) {
|
|
77
77
|
profileHref = (0, _navigation.navigateToTeamsApp)({
|
|
78
78
|
type: 'USER',
|
|
79
79
|
payload: {
|
|
@@ -162,7 +162,7 @@ var AgentProfileCardResourced = exports.AgentProfileCardResourced = function Age
|
|
|
162
162
|
// agentData changes → creatorUserId → getCreator → fetchData ref changes → useEffect re-fires.
|
|
163
163
|
// Reset state on accountId change so stale data from the previous agent isn't briefly shown.
|
|
164
164
|
(0, _react.useEffect)(function () {
|
|
165
|
-
if (!(
|
|
165
|
+
if (!(0, _fg.fg)('confluence_fix_agent_profile_card_flash')) {
|
|
166
166
|
return;
|
|
167
167
|
}
|
|
168
168
|
setAgentData(undefined);
|
|
@@ -172,7 +172,7 @@ var AgentProfileCardResourced = exports.AgentProfileCardResourced = function Age
|
|
|
172
172
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
173
173
|
}, [props.accountId]);
|
|
174
174
|
(0, _react.useEffect)(function () {
|
|
175
|
-
if ((0, _fg.fg)('
|
|
175
|
+
if ((0, _fg.fg)('confluence_fix_agent_profile_card_flash')) {
|
|
176
176
|
return;
|
|
177
177
|
}
|
|
178
178
|
fetchData();
|
|
@@ -120,13 +120,12 @@ function ProfilecardTriggerNext(_ref2) {
|
|
|
120
120
|
var showTimer = (0, _react.useRef)(0);
|
|
121
121
|
var hideTimer = (0, _react.useRef)(0);
|
|
122
122
|
var isExternalControl = propsIsVisible !== undefined && propsIsVisible !== visible;
|
|
123
|
-
// Skip delay entirely for click triggers
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
//
|
|
127
|
-
// to absorb rapid focus changes from dropdown options settling after async load.
|
|
123
|
+
// Skip delay entirely for click triggers.
|
|
124
|
+
var shouldSkipDelay = trigger === 'click';
|
|
125
|
+
// When externally controlled, use a short debounce to absorb rapid focus
|
|
126
|
+
// changes from dropdown options settling after async load.
|
|
128
127
|
var REDUCED_DELAY_MS = 100;
|
|
129
|
-
var shouldReduceDelay = isExternalControl
|
|
128
|
+
var shouldReduceDelay = isExternalControl;
|
|
130
129
|
var showDelay = customShowDelay !== null && customShowDelay !== void 0 ? customShowDelay : _config.DELAY_MS_SHOW;
|
|
131
130
|
var hideDelay = customHideDelay !== null && customHideDelay !== void 0 ? customHideDelay : _config.DELAY_MS_HIDE;
|
|
132
131
|
if (shouldSkipDelay) {
|
|
@@ -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.19.
|
|
15
|
+
packageVersion: (_process$env$_PACKAGE2 = "26.19.5") !== 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.19.
|
|
34
|
+
packageVersion: "26.19.5"
|
|
35
35
|
}, attributes), {}, {
|
|
36
36
|
firedAt: Math.round((0, _performance.getPageTime)())
|
|
37
37
|
})
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import FeatureGates from '@atlaskit/feature-gate-js-client/feature-gates';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
4
3
|
import { PACKAGE_META_DATA } from '../util/analytics';
|
|
5
4
|
import { getPageTime } from '../util/performance';
|
|
6
5
|
import { USER_ARI_PREFIX } from '../util/rovoAgentUtils';
|
|
@@ -50,28 +49,6 @@ const buildRovoAgentQueryByAri = agentAri => ({
|
|
|
50
49
|
agentAri
|
|
51
50
|
}
|
|
52
51
|
});
|
|
53
|
-
const buildRovoAgentQueryByAccountIdOld = (identityAccountId, cloudId) => ({
|
|
54
|
-
query: `
|
|
55
|
-
query RovoAgentProfileCard_AgentQueryByAccountId($identityAccountId: ID!, $cloudId: ID!) {
|
|
56
|
-
agentStudio_agentByIdentityAccountId(identityAccountId: $identityAccountId, cloudId: $cloudId) @optIn(to: "AgentStudio") {
|
|
57
|
-
__typename
|
|
58
|
-
... on AgentStudioAssistant {
|
|
59
|
-
authoringTeam {
|
|
60
|
-
displayName
|
|
61
|
-
profileUrl
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
... on QueryError {
|
|
65
|
-
message
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
`,
|
|
70
|
-
variables: {
|
|
71
|
-
identityAccountId,
|
|
72
|
-
cloudId
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
52
|
const buildRovoAgentQueryByAccountId = (identityAccountId, cloudId) => ({
|
|
76
53
|
query: `
|
|
77
54
|
query RovoAgentProfileCard_AgentQueryByAccountId($id: ID!, $cloudId: String!) {
|
|
@@ -150,7 +127,7 @@ export default class RovoAgentCardClient extends CachingClient {
|
|
|
150
127
|
}
|
|
151
128
|
async getAgentByAccountIdAgg(identityAccountId, cloudId) {
|
|
152
129
|
var _response$agentStudio2;
|
|
153
|
-
const response = await AGGQuery('/gateway/api/graphql',
|
|
130
|
+
const response = await AGGQuery('/gateway/api/graphql', buildRovoAgentQueryByAccountId(identityAccountId, cloudId));
|
|
154
131
|
if (((_response$agentStudio2 = response.agentStudio_agentByIdentityAccountId) === null || _response$agentStudio2 === void 0 ? void 0 : _response$agentStudio2.__typename) === 'QueryError') {
|
|
155
132
|
throw new Error(`ProfileCard agentStudio_agentByIdentityAccountId returning QueryError: ${response.agentStudio_agentByIdentityAccountId.message}`);
|
|
156
133
|
}
|
|
@@ -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.19.
|
|
9
|
+
headers.append('atl-client-version', "26.19.5");
|
|
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.19.
|
|
81
|
+
headers.append('atl-client-version', "26.19.5");
|
|
82
82
|
return headers;
|
|
83
83
|
};
|
|
84
84
|
export async function getTeamFromAGG(url, teamId, siteId) {
|
|
@@ -13,7 +13,7 @@ export const AgentProfileCardResourced = props => {
|
|
|
13
13
|
const [agentData, setAgentData] = useState();
|
|
14
14
|
// Initialize as true when fix is enabled since we fetch immediately on mount,
|
|
15
15
|
// avoiding a brief error screen flash before the useEffect fires.
|
|
16
|
-
const [isLoading, setIsLoading] = useState(fg('
|
|
16
|
+
const [isLoading, setIsLoading] = useState(fg('confluence_fix_agent_profile_card_flash'));
|
|
17
17
|
const [error, setError] = useState();
|
|
18
18
|
const [isPermitted, setIsPermitted] = useState(true);
|
|
19
19
|
const {
|
|
@@ -36,10 +36,10 @@ export const AgentProfileCardResourced = props => {
|
|
|
36
36
|
try {
|
|
37
37
|
var _authoringTeam$displa, _authoringTeam$profil, _userCreatorInfo$full;
|
|
38
38
|
let userCreatorInfo;
|
|
39
|
-
const currentCreatorUserId = fg('
|
|
39
|
+
const currentCreatorUserId = fg('confluence_fix_agent_profile_card_flash') ? creator_type === 'CUSTOMER' && creator ? getAAIDFromARI(creator) : undefined : creatorUserId;
|
|
40
40
|
if (currentCreatorUserId && props.cloudId) {
|
|
41
41
|
userCreatorInfo = await props.resourceClient.getProfile(props.cloudId, currentCreatorUserId, fireEvent);
|
|
42
|
-
if (fg('
|
|
42
|
+
if (fg('confluence_fix_agent_profile_card_flash')) {
|
|
43
43
|
profileHref = navigateToTeamsApp({
|
|
44
44
|
type: 'USER',
|
|
45
45
|
payload: {
|
|
@@ -100,7 +100,7 @@ export const AgentProfileCardResourced = props => {
|
|
|
100
100
|
// agentData changes → creatorUserId → getCreator → fetchData ref changes → useEffect re-fires.
|
|
101
101
|
// Reset state on accountId change so stale data from the previous agent isn't briefly shown.
|
|
102
102
|
useEffect(() => {
|
|
103
|
-
if (!
|
|
103
|
+
if (!fg('confluence_fix_agent_profile_card_flash')) {
|
|
104
104
|
return;
|
|
105
105
|
}
|
|
106
106
|
setAgentData(undefined);
|
|
@@ -110,7 +110,7 @@ export const AgentProfileCardResourced = props => {
|
|
|
110
110
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
111
111
|
}, [props.accountId]);
|
|
112
112
|
useEffect(() => {
|
|
113
|
-
if (fg('
|
|
113
|
+
if (fg('confluence_fix_agent_profile_card_flash')) {
|
|
114
114
|
return;
|
|
115
115
|
}
|
|
116
116
|
fetchData();
|
|
@@ -97,13 +97,12 @@ export default function ProfilecardTriggerNext({
|
|
|
97
97
|
const showTimer = useRef(0);
|
|
98
98
|
const hideTimer = useRef(0);
|
|
99
99
|
const isExternalControl = propsIsVisible !== undefined && propsIsVisible !== visible;
|
|
100
|
-
// Skip delay entirely for click triggers
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
//
|
|
104
|
-
// to absorb rapid focus changes from dropdown options settling after async load.
|
|
100
|
+
// Skip delay entirely for click triggers.
|
|
101
|
+
const shouldSkipDelay = trigger === 'click';
|
|
102
|
+
// When externally controlled, use a short debounce to absorb rapid focus
|
|
103
|
+
// changes from dropdown options settling after async load.
|
|
105
104
|
const REDUCED_DELAY_MS = 100;
|
|
106
|
-
const shouldReduceDelay = isExternalControl
|
|
105
|
+
const shouldReduceDelay = isExternalControl;
|
|
107
106
|
let showDelay = customShowDelay !== null && customShowDelay !== void 0 ? customShowDelay : DELAY_MS_SHOW;
|
|
108
107
|
let hideDelay = customHideDelay !== null && customHideDelay !== void 0 ? customHideDelay : DELAY_MS_HIDE;
|
|
109
108
|
if (shouldSkipDelay) {
|
|
@@ -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.19.
|
|
5
|
+
packageVersion: (_process$env$_PACKAGE2 = "26.19.5") !== 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.19.
|
|
22
|
+
packageVersion: "26.19.5",
|
|
23
23
|
...attributes,
|
|
24
24
|
firedAt: Math.round(getPageTime())
|
|
25
25
|
}
|
|
@@ -13,7 +13,6 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
|
13
13
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
14
14
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
15
15
|
import FeatureGates from '@atlaskit/feature-gate-js-client/feature-gates';
|
|
16
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
17
16
|
import { PACKAGE_META_DATA } from '../util/analytics';
|
|
18
17
|
import { getPageTime } from '../util/performance';
|
|
19
18
|
import { USER_ARI_PREFIX } from '../util/rovoAgentUtils';
|
|
@@ -50,15 +49,6 @@ var buildRovoAgentQueryByAri = function buildRovoAgentQueryByAri(agentAri) {
|
|
|
50
49
|
}
|
|
51
50
|
};
|
|
52
51
|
};
|
|
53
|
-
var buildRovoAgentQueryByAccountIdOld = function buildRovoAgentQueryByAccountIdOld(identityAccountId, cloudId) {
|
|
54
|
-
return {
|
|
55
|
-
query: "\n\t\tquery RovoAgentProfileCard_AgentQueryByAccountId($identityAccountId: ID!, $cloudId: ID!) {\n\t\t\tagentStudio_agentByIdentityAccountId(identityAccountId: $identityAccountId, cloudId: $cloudId) @optIn(to: \"AgentStudio\") {\n\t\t\t __typename\n\t\t\t\t... on AgentStudioAssistant {\n\t\t\t\t\tauthoringTeam {\n\t\t\t\t\t\tdisplayName\n\t\t\t\t\t\tprofileUrl\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t... on QueryError {\n\t\t\t\t\tmessage\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t",
|
|
56
|
-
variables: {
|
|
57
|
-
identityAccountId: identityAccountId,
|
|
58
|
-
cloudId: cloudId
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
};
|
|
62
52
|
var buildRovoAgentQueryByAccountId = function buildRovoAgentQueryByAccountId(identityAccountId, cloudId) {
|
|
63
53
|
return {
|
|
64
54
|
query: "\n\t\tquery RovoAgentProfileCard_AgentQueryByAccountId($id: ID!, $cloudId: String!) {\n\t\t\tagentStudio_agentByIdentityAccountId(cloudId: $cloudId, id: $id) @optIn(to: \"AgentStudio\") {\n\t\t\t __typename\n\t\t\t\t... on AgentStudioAssistant {\n\t\t\t\t\tauthoringTeam {\n\t\t\t\t\t\tdisplayName\n\t\t\t\t\t\tprofileUrl\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t... on QueryError {\n\t\t\t\t\tmessage\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t",
|
|
@@ -187,7 +177,7 @@ var RovoAgentCardClient = /*#__PURE__*/function (_CachingClient) {
|
|
|
187
177
|
while (1) switch (_context3.prev = _context3.next) {
|
|
188
178
|
case 0:
|
|
189
179
|
_context3.next = 1;
|
|
190
|
-
return AGGQuery('/gateway/api/graphql',
|
|
180
|
+
return AGGQuery('/gateway/api/graphql', buildRovoAgentQueryByAccountId(identityAccountId, cloudId));
|
|
191
181
|
case 1:
|
|
192
182
|
response = _context3.sent;
|
|
193
183
|
if (!(((_response$agentStudio2 = response.agentStudio_agentByIdentityAccountId) === null || _response$agentStudio2 === void 0 ? void 0 : _response$agentStudio2.__typename) === 'QueryError')) {
|
|
@@ -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.19.
|
|
7
|
+
headers.append('atl-client-version', "26.19.5");
|
|
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.19.
|
|
62
|
+
headers.append('atl-client-version', "26.19.5");
|
|
63
63
|
return headers;
|
|
64
64
|
};
|
|
65
65
|
export function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -22,7 +22,7 @@ export var AgentProfileCardResourced = function AgentProfileCardResourced(props)
|
|
|
22
22
|
setAgentData = _useState2[1];
|
|
23
23
|
// Initialize as true when fix is enabled since we fetch immediately on mount,
|
|
24
24
|
// avoiding a brief error screen flash before the useEffect fires.
|
|
25
|
-
var _useState3 = useState(fg('
|
|
25
|
+
var _useState3 = useState(fg('confluence_fix_agent_profile_card_flash')),
|
|
26
26
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
27
27
|
isLoading = _useState4[0],
|
|
28
28
|
setIsLoading = _useState4[1];
|
|
@@ -55,7 +55,7 @@ export var AgentProfileCardResourced = function AgentProfileCardResourced(props)
|
|
|
55
55
|
case 0:
|
|
56
56
|
creator_type = _ref.creator_type, creator = _ref.creator, authoringTeam = _ref.authoringTeam;
|
|
57
57
|
_context.prev = 1;
|
|
58
|
-
currentCreatorUserId = fg('
|
|
58
|
+
currentCreatorUserId = fg('confluence_fix_agent_profile_card_flash') ? creator_type === 'CUSTOMER' && creator ? getAAIDFromARI(creator) : undefined : creatorUserId;
|
|
59
59
|
if (!(currentCreatorUserId && props.cloudId)) {
|
|
60
60
|
_context.next = 3;
|
|
61
61
|
break;
|
|
@@ -64,7 +64,7 @@ export var AgentProfileCardResourced = function AgentProfileCardResourced(props)
|
|
|
64
64
|
return props.resourceClient.getProfile(props.cloudId, currentCreatorUserId, fireEvent);
|
|
65
65
|
case 2:
|
|
66
66
|
userCreatorInfo = _context.sent;
|
|
67
|
-
if (fg('
|
|
67
|
+
if (fg('confluence_fix_agent_profile_card_flash')) {
|
|
68
68
|
profileHref = navigateToTeamsApp({
|
|
69
69
|
type: 'USER',
|
|
70
70
|
payload: {
|
|
@@ -153,7 +153,7 @@ export var AgentProfileCardResourced = function AgentProfileCardResourced(props)
|
|
|
153
153
|
// agentData changes → creatorUserId → getCreator → fetchData ref changes → useEffect re-fires.
|
|
154
154
|
// Reset state on accountId change so stale data from the previous agent isn't briefly shown.
|
|
155
155
|
useEffect(function () {
|
|
156
|
-
if (!
|
|
156
|
+
if (!fg('confluence_fix_agent_profile_card_flash')) {
|
|
157
157
|
return;
|
|
158
158
|
}
|
|
159
159
|
setAgentData(undefined);
|
|
@@ -163,7 +163,7 @@ export var AgentProfileCardResourced = function AgentProfileCardResourced(props)
|
|
|
163
163
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
164
164
|
}, [props.accountId]);
|
|
165
165
|
useEffect(function () {
|
|
166
|
-
if (fg('
|
|
166
|
+
if (fg('confluence_fix_agent_profile_card_flash')) {
|
|
167
167
|
return;
|
|
168
168
|
}
|
|
169
169
|
fetchData();
|
|
@@ -111,13 +111,12 @@ export default function ProfilecardTriggerNext(_ref2) {
|
|
|
111
111
|
var showTimer = useRef(0);
|
|
112
112
|
var hideTimer = useRef(0);
|
|
113
113
|
var isExternalControl = propsIsVisible !== undefined && propsIsVisible !== visible;
|
|
114
|
-
// Skip delay entirely for click triggers
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
//
|
|
118
|
-
// to absorb rapid focus changes from dropdown options settling after async load.
|
|
114
|
+
// Skip delay entirely for click triggers.
|
|
115
|
+
var shouldSkipDelay = trigger === 'click';
|
|
116
|
+
// When externally controlled, use a short debounce to absorb rapid focus
|
|
117
|
+
// changes from dropdown options settling after async load.
|
|
119
118
|
var REDUCED_DELAY_MS = 100;
|
|
120
|
-
var shouldReduceDelay = isExternalControl
|
|
119
|
+
var shouldReduceDelay = isExternalControl;
|
|
121
120
|
var showDelay = customShowDelay !== null && customShowDelay !== void 0 ? customShowDelay : DELAY_MS_SHOW;
|
|
122
121
|
var hideDelay = customHideDelay !== null && customHideDelay !== void 0 ? customHideDelay : DELAY_MS_HIDE;
|
|
123
122
|
if (shouldSkipDelay) {
|
|
@@ -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.19.
|
|
8
|
+
packageVersion: (_process$env$_PACKAGE2 = "26.19.5") !== 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.19.
|
|
27
|
+
packageVersion: "26.19.5"
|
|
28
28
|
}, attributes), {}, {
|
|
29
29
|
firedAt: Math.round(getPageTime())
|
|
30
30
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/profilecard",
|
|
3
|
-
"version": "26.19.
|
|
3
|
+
"version": "26.19.6",
|
|
4
4
|
"description": "A React component to display a card with user information.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -166,9 +166,6 @@
|
|
|
166
166
|
"jira_ai_hide_conversation_starters_profilecard": {
|
|
167
167
|
"type": "boolean"
|
|
168
168
|
},
|
|
169
|
-
"jira_ai_fix_agent_profile_card_flashing": {
|
|
170
|
-
"type": "boolean"
|
|
171
|
-
},
|
|
172
169
|
"confluence_fix_agent_profile_card_flash": {
|
|
173
170
|
"type": "boolean"
|
|
174
171
|
},
|