@atlaskit/profilecard 20.8.3 → 20.9.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 +7 -0
- package/afm-jira/tsconfig.json +83 -83
- package/afm-post-office/tsconfig.json +83 -83
- package/dist/cjs/client/UserProfileCardClient.js +6 -37
- package/dist/cjs/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/cjs/client/getTeamFromAGG.js +1 -1
- package/dist/cjs/components/User/ProfileCardTrigger.js +1 -1
- package/dist/cjs/mocks/simple-mock-clients.js +2 -1
- package/dist/cjs/util/analytics.js +1 -1
- package/dist/es2019/client/UserProfileCardClient.js +28 -69
- package/dist/es2019/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/es2019/client/getTeamFromAGG.js +1 -1
- package/dist/es2019/components/User/ProfileCardTrigger.js +1 -1
- package/dist/es2019/mocks/simple-mock-clients.js +2 -1
- package/dist/es2019/util/analytics.js +1 -1
- package/dist/esm/client/UserProfileCardClient.js +6 -37
- package/dist/esm/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/esm/client/getTeamFromAGG.js +1 -1
- package/dist/esm/components/User/ProfileCardTrigger.js +1 -1
- package/dist/esm/mocks/simple-mock-clients.js +2 -1
- package/dist/esm/util/analytics.js +1 -1
- package/dist/types/client/UserProfileCardClient.d.ts +0 -12
- package/dist/types/types.d.ts +1 -9
- package/dist/types-ts4.5/client/UserProfileCardClient.d.ts +0 -12
- package/dist/types-ts4.5/types.d.ts +1 -9
- package/package.json +4 -7
- package/.eslintrc +0 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/profilecard
|
|
2
2
|
|
|
3
|
+
## 20.9.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`2e6586eb695c1`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/2e6586eb695c1) -
|
|
8
|
+
Clean up feature flag migrate_cloud_user_to_agg_user_query_profile_card
|
|
9
|
+
|
|
3
10
|
## 20.8.3
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
package/afm-jira/tsconfig.json
CHANGED
|
@@ -1,84 +1,84 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
2
|
+
"extends": "../../../../tsconfig.entry-points.jira.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"declaration": true,
|
|
5
|
+
"target": "es5",
|
|
6
|
+
"outDir": "../../../../../tsDist/@atlaskit__profilecard/app",
|
|
7
|
+
"rootDir": "../",
|
|
8
|
+
"composite": true
|
|
9
|
+
},
|
|
10
|
+
"include": [
|
|
11
|
+
"../src/**/*.ts",
|
|
12
|
+
"../src/**/*.tsx"
|
|
13
|
+
],
|
|
14
|
+
"exclude": [
|
|
15
|
+
"../src/**/__tests__/*",
|
|
16
|
+
"../src/**/*.test.*",
|
|
17
|
+
"../src/**/test.*"
|
|
18
|
+
],
|
|
19
|
+
"references": [
|
|
20
|
+
{
|
|
21
|
+
"path": "../../../analytics/analytics-next/afm-jira/tsconfig.json"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"path": "../../../uip/atlassian-context/afm-jira/tsconfig.json"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"path": "../../../design-system/avatar/afm-jira/tsconfig.json"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"path": "../../../design-system/avatar-group/afm-jira/tsconfig.json"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"path": "../../../design-system/button/afm-jira/tsconfig.json"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"path": "../../../design-system/dropdown-menu/afm-jira/tsconfig.json"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"path": "../../../design-system/empty-state/afm-jira/tsconfig.json"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"path": "../../../design-system/focus-ring/afm-jira/tsconfig.json"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"path": "../../../team-central/give-kudos/afm-jira/tsconfig.json"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"path": "../../../design-system/icon/afm-jira/tsconfig.json"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"path": "../../../design-system/lozenge/afm-jira/tsconfig.json"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"path": "../../../design-system/menu/afm-jira/tsconfig.json"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"path": "../../../design-system/modal-dialog/afm-jira/tsconfig.json"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"path": "../../../platform/feature-flags/afm-jira/tsconfig.json"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"path": "../../../design-system/popup/afm-jira/tsconfig.json"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"path": "../../../design-system/primitives/afm-jira/tsconfig.json"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"path": "../../../ai-mate/rovo-agent-components/afm-jira/tsconfig.json"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"path": "../../../design-system/spinner/afm-jira/tsconfig.json"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"path": "../../../design-system/theme/afm-jira/tsconfig.json"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"path": "../../../design-system/tokens/afm-jira/tsconfig.json"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"path": "../../../design-system/tooltip/afm-jira/tsconfig.json"
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
}
|
|
@@ -1,84 +1,84 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
2
|
+
"extends": "../../../../tsconfig.entry-points.post-office.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"declaration": true,
|
|
5
|
+
"target": "es5",
|
|
6
|
+
"outDir": "../../../../../tsDist/@atlaskit__profilecard/app",
|
|
7
|
+
"rootDir": "../",
|
|
8
|
+
"composite": true
|
|
9
|
+
},
|
|
10
|
+
"include": [
|
|
11
|
+
"../src/**/*.ts",
|
|
12
|
+
"../src/**/*.tsx"
|
|
13
|
+
],
|
|
14
|
+
"exclude": [
|
|
15
|
+
"../src/**/__tests__/*",
|
|
16
|
+
"../src/**/*.test.*",
|
|
17
|
+
"../src/**/test.*"
|
|
18
|
+
],
|
|
19
|
+
"references": [
|
|
20
|
+
{
|
|
21
|
+
"path": "../../../analytics/analytics-next/afm-post-office/tsconfig.json"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"path": "../../../uip/atlassian-context/afm-post-office/tsconfig.json"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"path": "../../../design-system/avatar/afm-post-office/tsconfig.json"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"path": "../../../design-system/avatar-group/afm-post-office/tsconfig.json"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"path": "../../../design-system/button/afm-post-office/tsconfig.json"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"path": "../../../design-system/dropdown-menu/afm-post-office/tsconfig.json"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"path": "../../../design-system/empty-state/afm-post-office/tsconfig.json"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"path": "../../../design-system/focus-ring/afm-post-office/tsconfig.json"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"path": "../../../team-central/give-kudos/afm-post-office/tsconfig.json"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"path": "../../../design-system/icon/afm-post-office/tsconfig.json"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"path": "../../../design-system/lozenge/afm-post-office/tsconfig.json"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"path": "../../../design-system/menu/afm-post-office/tsconfig.json"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"path": "../../../design-system/modal-dialog/afm-post-office/tsconfig.json"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"path": "../../../platform/feature-flags/afm-post-office/tsconfig.json"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"path": "../../../design-system/popup/afm-post-office/tsconfig.json"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"path": "../../../design-system/primitives/afm-post-office/tsconfig.json"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"path": "../../../ai-mate/rovo-agent-components/afm-post-office/tsconfig.json"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"path": "../../../design-system/spinner/afm-post-office/tsconfig.json"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"path": "../../../design-system/theme/afm-post-office/tsconfig.json"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"path": "../../../design-system/tokens/afm-post-office/tsconfig.json"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"path": "../../../design-system/tooltip/afm-post-office/tsconfig.json"
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
}
|
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.modifyResponse = exports.default = exports.
|
|
7
|
+
exports.modifyResponse = exports.default = exports.buildAggUserQuery = void 0;
|
|
8
8
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
9
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
10
10
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
@@ -13,7 +13,6 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
|
|
|
13
13
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
14
14
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
15
15
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
16
|
var _analytics = require("../util/analytics");
|
|
18
17
|
var _date = require("../util/date");
|
|
19
18
|
var _performance = require("../util/performance");
|
|
@@ -54,21 +53,6 @@ var modifyResponse = exports.modifyResponse = function modifyResponse(response)
|
|
|
54
53
|
accountType: data.accountType || undefined
|
|
55
54
|
};
|
|
56
55
|
};
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* @param {string} userId
|
|
60
|
-
* @param {string} cloudId
|
|
61
|
-
* @return {string} GraphQL Query String
|
|
62
|
-
*/
|
|
63
|
-
var buildUserQuery = exports.buildUserQuery = function buildUserQuery(cloudId, userId) {
|
|
64
|
-
return {
|
|
65
|
-
query: "query User($userId: String!, $cloudId: String!) {\n User: CloudUser(userId: $userId, cloudId: $cloudId) {\n id\n isCurrentUser\n status\n statusModifiedDate\n isBot\n isNotMentionable\n fullName\n nickname\n email\n meta: title\n location\n companyName\n avatarUrl(size: 192)\n remoteWeekdayIndex: localTime(format: \"d\")\n remoteWeekdayString: localTime(format: \"ddd\")\n remoteTimeString: localTime(format: \"h:mma\")\n }\n }",
|
|
66
|
-
variables: {
|
|
67
|
-
cloudId: cloudId,
|
|
68
|
-
userId: userId
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
};
|
|
72
56
|
var buildAggUserQuery = exports.buildAggUserQuery = function buildAggUserQuery(userId) {
|
|
73
57
|
return {
|
|
74
58
|
query: "query user($userId: ID!) {\n\t\tuser(accountId: $userId) {\n\t\t\tid\n\t\t\tname\n\t\t\tpicture\n\t\t\taccountStatus\n\t\t\t__typename\n\t\t\t... on AtlassianAccountUser {\n\t\t\t\temail\n\t\t\t\tnickname\n\t\t\t\tzoneinfo\n\t\t\t\textendedProfile {\n\t\t\t\t\tjobTitle\n\t\t\t\t\torganization\n\t\t\t\t\tlocation\n\t\t\t\t\tclosedDate\n\t\t\t\t\tinactiveDate\n\t\t\t\t}\n\t\t\t}\n\t\t\t... on CustomerUser {\n\t\t\t\temail\n\t\t\t\tzoneinfo\n\t\t\t}\n\t\t\t... on AppUser {\n \t\t\tappType\n \t\t}\n\t\t}\n\t}",
|
|
@@ -114,16 +98,14 @@ var UserProfileCardClient = exports.default = /*#__PURE__*/function (_CachingCli
|
|
|
114
98
|
key: "makeRequest",
|
|
115
99
|
value: function () {
|
|
116
100
|
var _makeRequest = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(cloudId, userId) {
|
|
117
|
-
var _user$extendedProfile, _user$extendedProfile2, _user$extendedProfile3, _user$extendedProfile4, _user$extendedProfile5
|
|
101
|
+
var _user$extendedProfile, _user$extendedProfile2, _user$extendedProfile3, _user$extendedProfile4, _user$extendedProfile5;
|
|
102
|
+
var gatewayGraphqlUrl, urlWithOperationName, userQueryPromise, user, timestring, localWeekdayIndex;
|
|
118
103
|
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
119
104
|
while (1) switch (_context2.prev = _context2.next) {
|
|
120
105
|
case 0:
|
|
121
|
-
if (!(0, _platformFeatureFlags.fg)('migrate_cloud_user_to_agg_user_query_profile_card')) {
|
|
122
|
-
_context2.next = 11;
|
|
123
|
-
break;
|
|
124
|
-
}
|
|
125
106
|
gatewayGraphqlUrl = this.options.gatewayGraphqlUrl || '/gateway/api/graphql';
|
|
126
|
-
|
|
107
|
+
urlWithOperationName = "".concat(gatewayGraphqlUrl, "?operationName=aggUserQuery");
|
|
108
|
+
userQueryPromise = queryAGGUser(urlWithOperationName, userId);
|
|
127
109
|
_context2.next = 5;
|
|
128
110
|
return userQueryPromise;
|
|
129
111
|
case 5:
|
|
@@ -150,20 +132,7 @@ var UserProfileCardClient = exports.default = /*#__PURE__*/function (_CachingCli
|
|
|
150
132
|
companyName: (_user$extendedProfile5 = user.extendedProfile) === null || _user$extendedProfile5 === void 0 ? void 0 : _user$extendedProfile5.organization,
|
|
151
133
|
timestring: timestring
|
|
152
134
|
}));
|
|
153
|
-
case
|
|
154
|
-
if (this.options.url) {
|
|
155
|
-
_context2.next = 13;
|
|
156
|
-
break;
|
|
157
|
-
}
|
|
158
|
-
throw new Error('options.url is a required parameter');
|
|
159
|
-
case 13:
|
|
160
|
-
query = buildUserQuery(cloudId, userId);
|
|
161
|
-
_context2.next = 16;
|
|
162
|
-
return (0, _graphqlUtils.directoryGraphqlQuery)(this.options.url, query);
|
|
163
|
-
case 16:
|
|
164
|
-
response = _context2.sent;
|
|
165
|
-
return _context2.abrupt("return", modifyResponse(response));
|
|
166
|
-
case 18:
|
|
135
|
+
case 9:
|
|
167
136
|
case "end":
|
|
168
137
|
return _context2.stop();
|
|
169
138
|
}
|
|
@@ -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', "20.
|
|
14
|
+
headers.append('atl-client-version', "20.9.0");
|
|
15
15
|
return headers;
|
|
16
16
|
};
|
|
17
17
|
function getOrgIdForCloudIdFromAGG(_x, _x2) {
|
|
@@ -57,7 +57,7 @@ var addHeaders = exports.addHeaders = function addHeaders(headers) {
|
|
|
57
57
|
headers.append('X-ExperimentalApi', 'teams-beta');
|
|
58
58
|
headers.append('X-ExperimentalApi', 'team-members-beta');
|
|
59
59
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
60
|
-
headers.append('atl-client-version', "20.
|
|
60
|
+
headers.append('atl-client-version', "20.9.0");
|
|
61
61
|
return headers;
|
|
62
62
|
};
|
|
63
63
|
function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -319,7 +319,7 @@ function ProfilecardTriggerNext(_ref2) {
|
|
|
319
319
|
var profilecardProps = _objectSpread(_objectSpread({
|
|
320
320
|
userId: userId,
|
|
321
321
|
fullName: prepopulatedData === null || prepopulatedData === void 0 ? void 0 : prepopulatedData.fullName,
|
|
322
|
-
isCurrentUser:
|
|
322
|
+
isCurrentUser: userId === viewingUserId,
|
|
323
323
|
clientFetchProfile: clientFetchProfile
|
|
324
324
|
}, data), {}, {
|
|
325
325
|
reportingLines: reportingLinesData,
|
|
@@ -82,7 +82,8 @@ var SimpleMockAgentClient = /*#__PURE__*/function (_RovoAgentCardClient) {
|
|
|
82
82
|
var args = {
|
|
83
83
|
cacheSize: 10,
|
|
84
84
|
maxCacheAge: 0,
|
|
85
|
-
url: '/graphql/directory'
|
|
85
|
+
url: '/graphql/directory',
|
|
86
|
+
gatewayGraphqlUrl: '/gateway/api/graphql'
|
|
86
87
|
};
|
|
87
88
|
var simpleMockUserClient = exports.simpleMockUserClient = new SimpleMockUserClient(args);
|
|
88
89
|
var simpleMockTeamClient = exports.simpleMockTeamClient = new SimpleMockTeamClient(args);
|
|
@@ -45,7 +45,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
45
45
|
actionSubjectId: actionSubjectId,
|
|
46
46
|
attributes: _objectSpread(_objectSpread({
|
|
47
47
|
packageName: "@atlaskit/profilecard",
|
|
48
|
-
packageVersion: "20.
|
|
48
|
+
packageVersion: "20.9.0"
|
|
49
49
|
}, attributes), {}, {
|
|
50
50
|
firedAt: Math.round((0, _performance.getPageTime)())
|
|
51
51
|
})
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
1
|
import { userRequestAnalytics } from '../util/analytics';
|
|
3
2
|
import { localTime } from '../util/date';
|
|
4
3
|
import { getPageTime } from '../util/performance';
|
|
5
4
|
import CachingClient from './CachingClient';
|
|
6
5
|
import { getErrorAttributes } from './errorUtils';
|
|
7
|
-
import { AGGQuery
|
|
6
|
+
import { AGGQuery } from './graphqlUtils';
|
|
8
7
|
|
|
9
8
|
/**
|
|
10
9
|
* Transform response from GraphQL
|
|
@@ -38,38 +37,6 @@ export const modifyResponse = response => {
|
|
|
38
37
|
accountType: data.accountType || undefined
|
|
39
38
|
};
|
|
40
39
|
};
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* @param {string} userId
|
|
44
|
-
* @param {string} cloudId
|
|
45
|
-
* @return {string} GraphQL Query String
|
|
46
|
-
*/
|
|
47
|
-
export const buildUserQuery = (cloudId, userId) => ({
|
|
48
|
-
query: `query User($userId: String!, $cloudId: String!) {
|
|
49
|
-
User: CloudUser(userId: $userId, cloudId: $cloudId) {
|
|
50
|
-
id
|
|
51
|
-
isCurrentUser
|
|
52
|
-
status
|
|
53
|
-
statusModifiedDate
|
|
54
|
-
isBot
|
|
55
|
-
isNotMentionable
|
|
56
|
-
fullName
|
|
57
|
-
nickname
|
|
58
|
-
email
|
|
59
|
-
meta: title
|
|
60
|
-
location
|
|
61
|
-
companyName
|
|
62
|
-
avatarUrl(size: 192)
|
|
63
|
-
remoteWeekdayIndex: localTime(format: "d")
|
|
64
|
-
remoteWeekdayString: localTime(format: "ddd")
|
|
65
|
-
remoteTimeString: localTime(format: "h:mma")
|
|
66
|
-
}
|
|
67
|
-
}`,
|
|
68
|
-
variables: {
|
|
69
|
-
cloudId,
|
|
70
|
-
userId
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
40
|
export const buildAggUserQuery = userId => ({
|
|
74
41
|
query: `query user($userId: ID!) {
|
|
75
42
|
user(accountId: $userId) {
|
|
@@ -116,43 +83,35 @@ export default class UserProfileCardClient extends CachingClient {
|
|
|
116
83
|
this.options = options;
|
|
117
84
|
}
|
|
118
85
|
async makeRequest(cloudId, userId) {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
return {
|
|
134
|
-
...user,
|
|
135
|
-
isBot: user.__typename === 'AppUser',
|
|
136
|
-
isAgent: user.appType === 'agent',
|
|
137
|
-
status: user.accountStatus,
|
|
138
|
-
statusModifiedDate: ((_user$extendedProfile = user.extendedProfile) === null || _user$extendedProfile === void 0 ? void 0 : _user$extendedProfile.closedDate) || ((_user$extendedProfile2 = user.extendedProfile) === null || _user$extendedProfile2 === void 0 ? void 0 : _user$extendedProfile2.inactiveDate),
|
|
139
|
-
avatarUrl: user.picture,
|
|
140
|
-
email: user.email,
|
|
141
|
-
fullName: user.name,
|
|
142
|
-
location: (_user$extendedProfile3 = user.extendedProfile) === null || _user$extendedProfile3 === void 0 ? void 0 : _user$extendedProfile3.location,
|
|
143
|
-
meta: (_user$extendedProfile4 = user.extendedProfile) === null || _user$extendedProfile4 === void 0 ? void 0 : _user$extendedProfile4.jobTitle,
|
|
144
|
-
nickname: user.nickname,
|
|
145
|
-
companyName: (_user$extendedProfile5 = user.extendedProfile) === null || _user$extendedProfile5 === void 0 ? void 0 : _user$extendedProfile5.organization,
|
|
146
|
-
timestring: timestring
|
|
147
|
-
};
|
|
148
|
-
} else {
|
|
149
|
-
if (!this.options.url) {
|
|
150
|
-
throw new Error('options.url is a required parameter');
|
|
86
|
+
var _user$extendedProfile, _user$extendedProfile2, _user$extendedProfile3, _user$extendedProfile4, _user$extendedProfile5;
|
|
87
|
+
const gatewayGraphqlUrl = this.options.gatewayGraphqlUrl || '/gateway/api/graphql';
|
|
88
|
+
const urlWithOperationName = `${gatewayGraphqlUrl}?operationName=aggUserQuery`;
|
|
89
|
+
const userQueryPromise = queryAGGUser(urlWithOperationName, userId);
|
|
90
|
+
const user = await userQueryPromise;
|
|
91
|
+
let timestring;
|
|
92
|
+
const localWeekdayIndex = new Date().getDay().toString();
|
|
93
|
+
if (user.zoneinfo) {
|
|
94
|
+
if (localTime(user.zoneinfo, 'i') === localWeekdayIndex) {
|
|
95
|
+
timestring = localTime(user.zoneinfo, 'h:mmbbb') || undefined;
|
|
96
|
+
} else {
|
|
97
|
+
timestring = localTime(user.zoneinfo, 'eee h:mmbbb') || undefined;
|
|
151
98
|
}
|
|
152
|
-
const query = buildUserQuery(cloudId, userId);
|
|
153
|
-
const response = await directoryGraphqlQuery(this.options.url, query);
|
|
154
|
-
return modifyResponse(response);
|
|
155
99
|
}
|
|
100
|
+
return {
|
|
101
|
+
...user,
|
|
102
|
+
isBot: user.__typename === 'AppUser',
|
|
103
|
+
isAgent: user.appType === 'agent',
|
|
104
|
+
status: user.accountStatus,
|
|
105
|
+
statusModifiedDate: ((_user$extendedProfile = user.extendedProfile) === null || _user$extendedProfile === void 0 ? void 0 : _user$extendedProfile.closedDate) || ((_user$extendedProfile2 = user.extendedProfile) === null || _user$extendedProfile2 === void 0 ? void 0 : _user$extendedProfile2.inactiveDate),
|
|
106
|
+
avatarUrl: user.picture,
|
|
107
|
+
email: user.email,
|
|
108
|
+
fullName: user.name,
|
|
109
|
+
location: (_user$extendedProfile3 = user.extendedProfile) === null || _user$extendedProfile3 === void 0 ? void 0 : _user$extendedProfile3.location,
|
|
110
|
+
meta: (_user$extendedProfile4 = user.extendedProfile) === null || _user$extendedProfile4 === void 0 ? void 0 : _user$extendedProfile4.jobTitle,
|
|
111
|
+
nickname: user.nickname,
|
|
112
|
+
companyName: (_user$extendedProfile5 = user.extendedProfile) === null || _user$extendedProfile5 === void 0 ? void 0 : _user$extendedProfile5.organization,
|
|
113
|
+
timestring: timestring
|
|
114
|
+
};
|
|
156
115
|
}
|
|
157
116
|
getProfile(cloudId, userId, analytics) {
|
|
158
117
|
if (!userId) {
|
|
@@ -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', "20.
|
|
9
|
+
headers.append('atl-client-version', "20.9.0");
|
|
10
10
|
return headers;
|
|
11
11
|
};
|
|
12
12
|
export async function getOrgIdForCloudIdFromAGG(url, cloudId) {
|
|
@@ -67,7 +67,7 @@ export const addHeaders = headers => {
|
|
|
67
67
|
headers.append('X-ExperimentalApi', 'teams-beta');
|
|
68
68
|
headers.append('X-ExperimentalApi', 'team-members-beta');
|
|
69
69
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
70
|
-
headers.append('atl-client-version', "20.
|
|
70
|
+
headers.append('atl-client-version', "20.9.0");
|
|
71
71
|
return headers;
|
|
72
72
|
};
|
|
73
73
|
export async function getTeamFromAGG(url, teamId, siteId) {
|
|
@@ -249,7 +249,7 @@ export default function ProfilecardTriggerNext({
|
|
|
249
249
|
const profilecardProps = {
|
|
250
250
|
userId: userId,
|
|
251
251
|
fullName: prepopulatedData === null || prepopulatedData === void 0 ? void 0 : prepopulatedData.fullName,
|
|
252
|
-
isCurrentUser:
|
|
252
|
+
isCurrentUser: userId === viewingUserId,
|
|
253
253
|
clientFetchProfile: clientFetchProfile,
|
|
254
254
|
...data,
|
|
255
255
|
reportingLines: reportingLinesData,
|
|
@@ -38,7 +38,8 @@ class SimpleMockAgentClient extends RovoAgentCardClient {
|
|
|
38
38
|
const args = {
|
|
39
39
|
cacheSize: 10,
|
|
40
40
|
maxCacheAge: 0,
|
|
41
|
-
url: '/graphql/directory'
|
|
41
|
+
url: '/graphql/directory',
|
|
42
|
+
gatewayGraphqlUrl: '/gateway/api/graphql'
|
|
42
43
|
};
|
|
43
44
|
export const simpleMockUserClient = new SimpleMockUserClient(args);
|
|
44
45
|
export const simpleMockTeamClient = new SimpleMockTeamClient(args);
|
|
@@ -32,7 +32,7 @@ const createEvent = (eventType, action, actionSubject, actionSubjectId, attribut
|
|
|
32
32
|
actionSubjectId,
|
|
33
33
|
attributes: {
|
|
34
34
|
packageName: "@atlaskit/profilecard",
|
|
35
|
-
packageVersion: "20.
|
|
35
|
+
packageVersion: "20.9.0",
|
|
36
36
|
...attributes,
|
|
37
37
|
firedAt: Math.round(getPageTime())
|
|
38
38
|
}
|
|
@@ -10,13 +10,12 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
10
10
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
11
11
|
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; }
|
|
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) { _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; }
|
|
13
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
13
|
import { userRequestAnalytics } from '../util/analytics';
|
|
15
14
|
import { localTime } from '../util/date';
|
|
16
15
|
import { getPageTime } from '../util/performance';
|
|
17
16
|
import CachingClient from './CachingClient';
|
|
18
17
|
import { getErrorAttributes } from './errorUtils';
|
|
19
|
-
import { AGGQuery
|
|
18
|
+
import { AGGQuery } from './graphqlUtils';
|
|
20
19
|
|
|
21
20
|
/**
|
|
22
21
|
* Transform response from GraphQL
|
|
@@ -48,21 +47,6 @@ export var modifyResponse = function modifyResponse(response) {
|
|
|
48
47
|
accountType: data.accountType || undefined
|
|
49
48
|
};
|
|
50
49
|
};
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* @param {string} userId
|
|
54
|
-
* @param {string} cloudId
|
|
55
|
-
* @return {string} GraphQL Query String
|
|
56
|
-
*/
|
|
57
|
-
export var buildUserQuery = function buildUserQuery(cloudId, userId) {
|
|
58
|
-
return {
|
|
59
|
-
query: "query User($userId: String!, $cloudId: String!) {\n User: CloudUser(userId: $userId, cloudId: $cloudId) {\n id\n isCurrentUser\n status\n statusModifiedDate\n isBot\n isNotMentionable\n fullName\n nickname\n email\n meta: title\n location\n companyName\n avatarUrl(size: 192)\n remoteWeekdayIndex: localTime(format: \"d\")\n remoteWeekdayString: localTime(format: \"ddd\")\n remoteTimeString: localTime(format: \"h:mma\")\n }\n }",
|
|
60
|
-
variables: {
|
|
61
|
-
cloudId: cloudId,
|
|
62
|
-
userId: userId
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
};
|
|
66
50
|
export var buildAggUserQuery = function buildAggUserQuery(userId) {
|
|
67
51
|
return {
|
|
68
52
|
query: "query user($userId: ID!) {\n\t\tuser(accountId: $userId) {\n\t\t\tid\n\t\t\tname\n\t\t\tpicture\n\t\t\taccountStatus\n\t\t\t__typename\n\t\t\t... on AtlassianAccountUser {\n\t\t\t\temail\n\t\t\t\tnickname\n\t\t\t\tzoneinfo\n\t\t\t\textendedProfile {\n\t\t\t\t\tjobTitle\n\t\t\t\t\torganization\n\t\t\t\t\tlocation\n\t\t\t\t\tclosedDate\n\t\t\t\t\tinactiveDate\n\t\t\t\t}\n\t\t\t}\n\t\t\t... on CustomerUser {\n\t\t\t\temail\n\t\t\t\tzoneinfo\n\t\t\t}\n\t\t\t... on AppUser {\n \t\t\tappType\n \t\t}\n\t\t}\n\t}",
|
|
@@ -108,16 +92,14 @@ var UserProfileCardClient = /*#__PURE__*/function (_CachingClient) {
|
|
|
108
92
|
key: "makeRequest",
|
|
109
93
|
value: function () {
|
|
110
94
|
var _makeRequest = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(cloudId, userId) {
|
|
111
|
-
var _user$extendedProfile, _user$extendedProfile2, _user$extendedProfile3, _user$extendedProfile4, _user$extendedProfile5
|
|
95
|
+
var _user$extendedProfile, _user$extendedProfile2, _user$extendedProfile3, _user$extendedProfile4, _user$extendedProfile5;
|
|
96
|
+
var gatewayGraphqlUrl, urlWithOperationName, userQueryPromise, user, timestring, localWeekdayIndex;
|
|
112
97
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
113
98
|
while (1) switch (_context2.prev = _context2.next) {
|
|
114
99
|
case 0:
|
|
115
|
-
if (!fg('migrate_cloud_user_to_agg_user_query_profile_card')) {
|
|
116
|
-
_context2.next = 11;
|
|
117
|
-
break;
|
|
118
|
-
}
|
|
119
100
|
gatewayGraphqlUrl = this.options.gatewayGraphqlUrl || '/gateway/api/graphql';
|
|
120
|
-
|
|
101
|
+
urlWithOperationName = "".concat(gatewayGraphqlUrl, "?operationName=aggUserQuery");
|
|
102
|
+
userQueryPromise = queryAGGUser(urlWithOperationName, userId);
|
|
121
103
|
_context2.next = 5;
|
|
122
104
|
return userQueryPromise;
|
|
123
105
|
case 5:
|
|
@@ -144,20 +126,7 @@ var UserProfileCardClient = /*#__PURE__*/function (_CachingClient) {
|
|
|
144
126
|
companyName: (_user$extendedProfile5 = user.extendedProfile) === null || _user$extendedProfile5 === void 0 ? void 0 : _user$extendedProfile5.organization,
|
|
145
127
|
timestring: timestring
|
|
146
128
|
}));
|
|
147
|
-
case
|
|
148
|
-
if (this.options.url) {
|
|
149
|
-
_context2.next = 13;
|
|
150
|
-
break;
|
|
151
|
-
}
|
|
152
|
-
throw new Error('options.url is a required parameter');
|
|
153
|
-
case 13:
|
|
154
|
-
query = buildUserQuery(cloudId, userId);
|
|
155
|
-
_context2.next = 16;
|
|
156
|
-
return directoryGraphqlQuery(this.options.url, query);
|
|
157
|
-
case 16:
|
|
158
|
-
response = _context2.sent;
|
|
159
|
-
return _context2.abrupt("return", modifyResponse(response));
|
|
160
|
-
case 18:
|
|
129
|
+
case 9:
|
|
161
130
|
case "end":
|
|
162
131
|
return _context2.stop();
|
|
163
132
|
}
|
|
@@ -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', "20.
|
|
7
|
+
headers.append('atl-client-version', "20.9.0");
|
|
8
8
|
return headers;
|
|
9
9
|
};
|
|
10
10
|
export function getOrgIdForCloudIdFromAGG(_x, _x2) {
|
|
@@ -48,7 +48,7 @@ export var addHeaders = function addHeaders(headers) {
|
|
|
48
48
|
headers.append('X-ExperimentalApi', 'teams-beta');
|
|
49
49
|
headers.append('X-ExperimentalApi', 'team-members-beta');
|
|
50
50
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
51
|
-
headers.append('atl-client-version', "20.
|
|
51
|
+
headers.append('atl-client-version', "20.9.0");
|
|
52
52
|
return headers;
|
|
53
53
|
};
|
|
54
54
|
export function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -309,7 +309,7 @@ export default function ProfilecardTriggerNext(_ref2) {
|
|
|
309
309
|
var profilecardProps = _objectSpread(_objectSpread({
|
|
310
310
|
userId: userId,
|
|
311
311
|
fullName: prepopulatedData === null || prepopulatedData === void 0 ? void 0 : prepopulatedData.fullName,
|
|
312
|
-
isCurrentUser:
|
|
312
|
+
isCurrentUser: userId === viewingUserId,
|
|
313
313
|
clientFetchProfile: clientFetchProfile
|
|
314
314
|
}, data), {}, {
|
|
315
315
|
reportingLines: reportingLinesData,
|
|
@@ -75,7 +75,8 @@ var SimpleMockAgentClient = /*#__PURE__*/function (_RovoAgentCardClient) {
|
|
|
75
75
|
var args = {
|
|
76
76
|
cacheSize: 10,
|
|
77
77
|
maxCacheAge: 0,
|
|
78
|
-
url: '/graphql/directory'
|
|
78
|
+
url: '/graphql/directory',
|
|
79
|
+
gatewayGraphqlUrl: '/gateway/api/graphql'
|
|
79
80
|
};
|
|
80
81
|
export var simpleMockUserClient = new SimpleMockUserClient(args);
|
|
81
82
|
export var simpleMockTeamClient = new SimpleMockTeamClient(args);
|
|
@@ -39,7 +39,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
39
39
|
actionSubjectId: actionSubjectId,
|
|
40
40
|
attributes: _objectSpread(_objectSpread({
|
|
41
41
|
packageName: "@atlaskit/profilecard",
|
|
42
|
-
packageVersion: "20.
|
|
42
|
+
packageVersion: "20.9.0"
|
|
43
43
|
}, attributes), {}, {
|
|
44
44
|
firedAt: Math.round(getPageTime())
|
|
45
45
|
})
|
|
@@ -10,18 +10,6 @@ import CachingClient from './CachingClient';
|
|
|
10
10
|
* @return {object}
|
|
11
11
|
*/
|
|
12
12
|
export declare const modifyResponse: (response: ApiClientResponse) => ProfileCardClientData;
|
|
13
|
-
/**
|
|
14
|
-
* @param {string} userId
|
|
15
|
-
* @param {string} cloudId
|
|
16
|
-
* @return {string} GraphQL Query String
|
|
17
|
-
*/
|
|
18
|
-
export declare const buildUserQuery: (cloudId: string, userId: string) => {
|
|
19
|
-
query: string;
|
|
20
|
-
variables: {
|
|
21
|
-
cloudId: string;
|
|
22
|
-
userId: string;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
13
|
export declare const buildAggUserQuery: (userId: string) => {
|
|
26
14
|
query: string;
|
|
27
15
|
variables: {
|
package/dist/types/types.d.ts
CHANGED
|
@@ -454,16 +454,8 @@ export type TeamProfileCardErrorType = {
|
|
|
454
454
|
reason: 'default' | 'NotFound' | 'TEAMS_FORBIDDEN';
|
|
455
455
|
} | null;
|
|
456
456
|
export interface ProfileClientOptions extends Omit<TeamCentralCardClientOptions, 'gatewayGraphqlUrl'> {
|
|
457
|
-
/**
|
|
458
|
-
* pf-directory url
|
|
459
|
-
* When we clean up CloudUser migration FF, we should remove this prop
|
|
460
|
-
*/
|
|
461
|
-
url?: string;
|
|
462
|
-
/**
|
|
463
|
-
* AGG url
|
|
464
|
-
* When we clean up CloudUser migration FF, we should mark this prop as required
|
|
465
|
-
*/
|
|
466
457
|
gatewayGraphqlUrl?: string;
|
|
458
|
+
url?: string;
|
|
467
459
|
cacheSize?: number;
|
|
468
460
|
cacheMaxAge?: number;
|
|
469
461
|
/** Name of integrating product e.g. jira, atlas, confluence **/
|
|
@@ -10,18 +10,6 @@ import CachingClient from './CachingClient';
|
|
|
10
10
|
* @return {object}
|
|
11
11
|
*/
|
|
12
12
|
export declare const modifyResponse: (response: ApiClientResponse) => ProfileCardClientData;
|
|
13
|
-
/**
|
|
14
|
-
* @param {string} userId
|
|
15
|
-
* @param {string} cloudId
|
|
16
|
-
* @return {string} GraphQL Query String
|
|
17
|
-
*/
|
|
18
|
-
export declare const buildUserQuery: (cloudId: string, userId: string) => {
|
|
19
|
-
query: string;
|
|
20
|
-
variables: {
|
|
21
|
-
cloudId: string;
|
|
22
|
-
userId: string;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
13
|
export declare const buildAggUserQuery: (userId: string) => {
|
|
26
14
|
query: string;
|
|
27
15
|
variables: {
|
|
@@ -460,16 +460,8 @@ export type TeamProfileCardErrorType = {
|
|
|
460
460
|
reason: 'default' | 'NotFound' | 'TEAMS_FORBIDDEN';
|
|
461
461
|
} | null;
|
|
462
462
|
export interface ProfileClientOptions extends Omit<TeamCentralCardClientOptions, 'gatewayGraphqlUrl'> {
|
|
463
|
-
/**
|
|
464
|
-
* pf-directory url
|
|
465
|
-
* When we clean up CloudUser migration FF, we should remove this prop
|
|
466
|
-
*/
|
|
467
|
-
url?: string;
|
|
468
|
-
/**
|
|
469
|
-
* AGG url
|
|
470
|
-
* When we clean up CloudUser migration FF, we should mark this prop as required
|
|
471
|
-
*/
|
|
472
463
|
gatewayGraphqlUrl?: string;
|
|
464
|
+
url?: string;
|
|
473
465
|
cacheSize?: number;
|
|
474
466
|
cacheMaxAge?: number;
|
|
475
467
|
/** Name of integrating product e.g. jira, atlas, confluence **/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/profilecard",
|
|
3
|
-
"version": "20.
|
|
3
|
+
"version": "20.9.0",
|
|
4
4
|
"description": "A React component to display a card with user information.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"@atlaskit/button": "^20.3.0",
|
|
58
58
|
"@atlaskit/dropdown-menu": "^12.22.0",
|
|
59
59
|
"@atlaskit/empty-state": "^7.12.0",
|
|
60
|
-
"@atlaskit/focus-ring": "^1.
|
|
60
|
+
"@atlaskit/focus-ring": "^1.7.0",
|
|
61
61
|
"@atlaskit/give-kudos": "^2.2.0",
|
|
62
62
|
"@atlaskit/icon": "^22.24.0",
|
|
63
63
|
"@atlaskit/lozenge": "^11.12.0",
|
|
@@ -66,10 +66,10 @@
|
|
|
66
66
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
67
67
|
"@atlaskit/popup": "^1.29.0",
|
|
68
68
|
"@atlaskit/primitives": "^13.0.0",
|
|
69
|
-
"@atlaskit/rovo-agent-components": "^1.
|
|
69
|
+
"@atlaskit/rovo-agent-components": "^1.9.0",
|
|
70
70
|
"@atlaskit/spinner": "^16.3.0",
|
|
71
71
|
"@atlaskit/theme": "^14.0.0",
|
|
72
|
-
"@atlaskit/tokens": "^2.
|
|
72
|
+
"@atlaskit/tokens": "^2.2.0",
|
|
73
73
|
"@atlaskit/tooltip": "^18.8.0",
|
|
74
74
|
"@babel/runtime": "^7.0.0",
|
|
75
75
|
"@emotion/react": "^11.7.1",
|
|
@@ -122,9 +122,6 @@
|
|
|
122
122
|
"enable_ptc_sharded_townsquare_calls": {
|
|
123
123
|
"type": "boolean"
|
|
124
124
|
},
|
|
125
|
-
"migrate_cloud_user_to_agg_user_query_profile_card": {
|
|
126
|
-
"type": "boolean"
|
|
127
|
-
},
|
|
128
125
|
"enable_agent_profile_card": {
|
|
129
126
|
"type": "boolean"
|
|
130
127
|
},
|