@atlaskit/profilecard 19.5.11 → 19.5.13
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 +12 -0
- package/dist/cjs/client/CachingClient.js +2 -3
- package/dist/cjs/client/ProfileCardClient.js +2 -3
- package/dist/cjs/client/TeamCentralCardClient.js +4 -5
- package/dist/cjs/client/TeamProfileCardClient.js +2 -3
- package/dist/cjs/client/UserProfileCardClient.js +6 -8
- package/dist/cjs/client/errorUtils.js +4 -7
- package/dist/cjs/client/getTeamFromAGG.js +8 -15
- package/dist/cjs/client/graphqlUtils.js +2 -3
- package/dist/cjs/client/index.js +1 -2
- package/dist/cjs/components/Error/AccessLockSVG.js +1 -2
- package/dist/cjs/components/Error/ErrorBoundary.js +2 -4
- package/dist/cjs/components/Error/ErrorIllustration.js +2 -3
- package/dist/cjs/components/Error/ErrorMessage.js +1 -2
- package/dist/cjs/components/Icon/IconLabel.js +1 -2
- package/dist/cjs/components/Team/TeamForbiddenErrorState.js +2 -3
- package/dist/cjs/components/Team/TeamLoadingState.js +2 -3
- package/dist/cjs/components/Team/TeamProfileCard.js +1 -2
- package/dist/cjs/components/Team/TeamProfileCardTrigger.js +2 -4
- package/dist/cjs/components/Team/index.js +1 -2
- package/dist/cjs/components/Team/lazyTeamProfileCard.js +2 -3
- package/dist/cjs/components/User/OverflowProfileCardButtons.js +3 -5
- package/dist/cjs/components/User/ProfileCard.js +2 -4
- package/dist/cjs/components/User/ProfileCardDetails.js +2 -3
- package/dist/cjs/components/User/ProfileCardResourced.js +2 -4
- package/dist/cjs/components/User/ProfileCardTrigger.js +1 -2
- package/dist/cjs/components/User/ReportingLinesDetails.js +1 -2
- package/dist/cjs/components/User/UserLoadingState.js +1 -2
- package/dist/cjs/components/User/index.js +1 -2
- package/dist/cjs/components/User/lazyProfileCard.js +2 -3
- package/dist/cjs/i18n/cs.js +2 -3
- package/dist/cjs/i18n/da.js +2 -3
- package/dist/cjs/i18n/de.js +2 -3
- package/dist/cjs/i18n/en.js +2 -3
- package/dist/cjs/i18n/en_GB.js +2 -3
- package/dist/cjs/i18n/en_ZZ.js +2 -3
- package/dist/cjs/i18n/es.js +2 -3
- package/dist/cjs/i18n/et.js +2 -3
- package/dist/cjs/i18n/fi.js +2 -3
- package/dist/cjs/i18n/fr.js +2 -3
- package/dist/cjs/i18n/hu.js +2 -3
- package/dist/cjs/i18n/is.js +2 -3
- package/dist/cjs/i18n/it.js +2 -3
- package/dist/cjs/i18n/ja.js +2 -3
- package/dist/cjs/i18n/ko.js +2 -3
- package/dist/cjs/i18n/languages.js +2 -3
- package/dist/cjs/i18n/nb.js +2 -3
- package/dist/cjs/i18n/nl.js +2 -3
- package/dist/cjs/i18n/pl.js +2 -3
- package/dist/cjs/i18n/pt_BR.js +2 -3
- package/dist/cjs/i18n/pt_PT.js +2 -3
- package/dist/cjs/i18n/ro.js +2 -3
- package/dist/cjs/i18n/ru.js +2 -3
- package/dist/cjs/i18n/sk.js +2 -3
- package/dist/cjs/i18n/sv.js +2 -3
- package/dist/cjs/i18n/th.js +2 -3
- package/dist/cjs/i18n/tr.js +2 -3
- package/dist/cjs/i18n/uk.js +2 -3
- package/dist/cjs/i18n/vi.js +2 -3
- package/dist/cjs/i18n/zh.js +2 -3
- package/dist/cjs/i18n/zh_TW.js +2 -3
- package/dist/cjs/index.js +1 -2
- package/dist/cjs/internal/filterActions.js +1 -2
- package/dist/cjs/messages.js +1 -2
- package/dist/cjs/mocks/profile-data.js +1 -2
- package/dist/cjs/mocks/reporting-lines-data.js +2 -3
- package/dist/cjs/mocks/simple-mock-clients.js +4 -7
- package/dist/cjs/mocks/util.js +4 -7
- package/dist/cjs/styled/Card.js +22 -44
- package/dist/cjs/styled/Error.js +5 -10
- package/dist/cjs/styled/ReportingLines.js +5 -10
- package/dist/cjs/styled/TeamCard.js +16 -31
- package/dist/cjs/styled/constants.js +13 -26
- package/dist/cjs/util/analytics.js +14 -24
- package/dist/cjs/util/click.js +2 -3
- package/dist/cjs/util/config.js +2 -4
- package/dist/cjs/util/errors.js +8 -12
- package/dist/cjs/util/performance.js +2 -3
- package/dist/es2019/client/TeamCentralCardClient.js +2 -2
- package/dist/es2019/client/UserProfileCardClient.js +17 -17
- package/dist/es2019/client/getTeamFromAGG.js +1 -1
- package/dist/es2019/util/analytics.js +1 -1
- package/dist/es2019/util/errors.js +1 -1
- package/dist/esm/client/ProfileCardClient.js +1 -1
- package/dist/esm/client/TeamCentralCardClient.js +2 -2
- package/dist/esm/client/UserProfileCardClient.js +2 -2
- package/dist/esm/client/getTeamFromAGG.js +1 -1
- package/dist/esm/client/graphqlUtils.js +2 -3
- package/dist/esm/util/analytics.js +1 -1
- package/dist/esm/util/errors.js +2 -1
- package/dist/types/client/TeamCentralCardClient.d.ts +13 -0
- package/dist/types/client/UserProfileCardClient.d.ts +12 -0
- package/dist/types/util/errors.d.ts +1 -1
- package/dist/types-ts4.5/client/TeamCentralCardClient.d.ts +13 -0
- package/dist/types-ts4.5/client/UserProfileCardClient.d.ts +12 -0
- package/dist/types-ts4.5/util/errors.d.ts +1 -1
- package/package.json +2 -2
|
@@ -51,9 +51,9 @@ export var modifyResponse = function modifyResponse(response) {
|
|
|
51
51
|
* @param {string} cloudId
|
|
52
52
|
* @return {string} GraphQL Query String
|
|
53
53
|
*/
|
|
54
|
-
var buildUserQuery = function buildUserQuery(cloudId, userId) {
|
|
54
|
+
export var buildUserQuery = function buildUserQuery(cloudId, userId) {
|
|
55
55
|
return {
|
|
56
|
-
query: "query User($userId: String!, $cloudId: String!) {\n User: CloudUser(userId: $userId, cloudId: $cloudId) {\n id
|
|
56
|
+
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 }",
|
|
57
57
|
variables: {
|
|
58
58
|
cloudId: cloudId,
|
|
59
59
|
userId: userId
|
|
@@ -51,7 +51,7 @@ export var addHeaders = function addHeaders(headers) {
|
|
|
51
51
|
headers.append('X-ExperimentalApi', 'teams-beta');
|
|
52
52
|
headers.append('X-ExperimentalApi', 'team-members-beta');
|
|
53
53
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
54
|
-
headers.append('atl-client-version', "19.5.
|
|
54
|
+
headers.append('atl-client-version', "19.5.13");
|
|
55
55
|
return headers;
|
|
56
56
|
};
|
|
57
57
|
export function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -76,7 +76,6 @@ function _graphQLQuery() {
|
|
|
76
76
|
json,
|
|
77
77
|
_json$extensions$gate,
|
|
78
78
|
_json$extensions,
|
|
79
|
-
_json$extensions$gate2,
|
|
80
79
|
_args3 = arguments;
|
|
81
80
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
82
81
|
while (1) switch (_context3.prev = _context3.next) {
|
|
@@ -94,7 +93,7 @@ function _graphQLQuery() {
|
|
|
94
93
|
}));
|
|
95
94
|
case 5:
|
|
96
95
|
response = _context3.sent;
|
|
97
|
-
traceIdFromHeaders = response === null || response === void 0
|
|
96
|
+
traceIdFromHeaders = response === null || response === void 0 || (_response$headers = response.headers) === null || _response$headers === void 0 ? void 0 : _response$headers.get('atl-traceid');
|
|
98
97
|
if (response.ok) {
|
|
99
98
|
_context3.next = 9;
|
|
100
99
|
break;
|
|
@@ -106,7 +105,7 @@ function _graphQLQuery() {
|
|
|
106
105
|
case 11:
|
|
107
106
|
json = _context3.sent;
|
|
108
107
|
if (json.errors) {
|
|
109
|
-
handleErrors(json.errors, (_json$extensions$gate = (_json$extensions = json.extensions) === null || _json$extensions === void 0
|
|
108
|
+
handleErrors(json.errors, (_json$extensions$gate = (_json$extensions = json.extensions) === null || _json$extensions === void 0 || (_json$extensions = _json$extensions.gateway) === null || _json$extensions === void 0 ? void 0 : _json$extensions.request_id) !== null && _json$extensions$gate !== void 0 ? _json$extensions$gate : traceIdFromHeaders);
|
|
110
109
|
}
|
|
111
110
|
return _context3.abrupt("return", json.data);
|
|
112
111
|
case 14:
|
|
@@ -38,7 +38,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
38
38
|
actionSubjectId: actionSubjectId,
|
|
39
39
|
attributes: _objectSpread(_objectSpread({
|
|
40
40
|
packageName: "@atlaskit/profilecard",
|
|
41
|
-
packageVersion: "19.5.
|
|
41
|
+
packageVersion: "19.5.13"
|
|
42
42
|
}, attributes), {}, {
|
|
43
43
|
firedAt: Math.round(getPageTime())
|
|
44
44
|
})
|
package/dist/esm/util/errors.js
CHANGED
|
@@ -25,8 +25,9 @@ export var HttpError = /*#__PURE__*/function (_Error) {
|
|
|
25
25
|
export var DirectoryGraphQLError = /*#__PURE__*/function (_Error2) {
|
|
26
26
|
_inherits(DirectoryGraphQLError, _Error2);
|
|
27
27
|
var _super2 = _createSuper(DirectoryGraphQLError);
|
|
28
|
-
function DirectoryGraphQLError(message, category, type
|
|
28
|
+
function DirectoryGraphQLError(message, category, type) {
|
|
29
29
|
var _this2;
|
|
30
|
+
var extensions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
30
31
|
var path = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];
|
|
31
32
|
_classCallCheck(this, DirectoryGraphQLError);
|
|
32
33
|
_this2 = _super2.call(this, message);
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
import { ProfileClientOptions, TeamCentralReportingLinesData } from '../types';
|
|
2
2
|
import CachingClient from './CachingClient';
|
|
3
|
+
export declare const buildReportingLinesQuery: (aaid: string) => {
|
|
4
|
+
query: string;
|
|
5
|
+
variables: {
|
|
6
|
+
aaid: string;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export declare const buildCheckFeatureFlagQuery: (featureKey: string, context?: FeatureFlagExtraContext[]) => {
|
|
10
|
+
query: string;
|
|
11
|
+
variables: {
|
|
12
|
+
featureKey: string;
|
|
13
|
+
context: FeatureFlagExtraContext[];
|
|
14
|
+
};
|
|
15
|
+
};
|
|
3
16
|
type TeamCentralCardClientOptions = ProfileClientOptions & {
|
|
4
17
|
teamCentralUrl: string;
|
|
5
18
|
};
|
|
@@ -10,6 +10,18 @@ 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
|
+
};
|
|
13
25
|
export default class UserProfileCardClient extends CachingClient<any> {
|
|
14
26
|
options: ProfileClientOptions;
|
|
15
27
|
constructor(options: ProfileClientOptions);
|
|
@@ -14,7 +14,7 @@ export declare class DirectoryGraphQLError extends Error {
|
|
|
14
14
|
path: string;
|
|
15
15
|
errorNumber?: number;
|
|
16
16
|
extensions: Record<string, any>;
|
|
17
|
-
constructor(message: string, category: ErrorCategory, type: string, extensions
|
|
17
|
+
constructor(message: string, category: ErrorCategory, type: string, extensions?: ErrorExtensions, path?: (string | number)[]);
|
|
18
18
|
}
|
|
19
19
|
export declare class DirectoryGraphQLErrors extends Error {
|
|
20
20
|
errors: DirectoryGraphQLError[];
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
import { ProfileClientOptions, TeamCentralReportingLinesData } from '../types';
|
|
2
2
|
import CachingClient from './CachingClient';
|
|
3
|
+
export declare const buildReportingLinesQuery: (aaid: string) => {
|
|
4
|
+
query: string;
|
|
5
|
+
variables: {
|
|
6
|
+
aaid: string;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export declare const buildCheckFeatureFlagQuery: (featureKey: string, context?: FeatureFlagExtraContext[]) => {
|
|
10
|
+
query: string;
|
|
11
|
+
variables: {
|
|
12
|
+
featureKey: string;
|
|
13
|
+
context: FeatureFlagExtraContext[];
|
|
14
|
+
};
|
|
15
|
+
};
|
|
3
16
|
type TeamCentralCardClientOptions = ProfileClientOptions & {
|
|
4
17
|
teamCentralUrl: string;
|
|
5
18
|
};
|
|
@@ -10,6 +10,18 @@ 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
|
+
};
|
|
13
25
|
export default class UserProfileCardClient extends CachingClient<any> {
|
|
14
26
|
options: ProfileClientOptions;
|
|
15
27
|
constructor(options: ProfileClientOptions);
|
|
@@ -14,7 +14,7 @@ export declare class DirectoryGraphQLError extends Error {
|
|
|
14
14
|
path: string;
|
|
15
15
|
errorNumber?: number;
|
|
16
16
|
extensions: Record<string, any>;
|
|
17
|
-
constructor(message: string, category: ErrorCategory, type: string, extensions
|
|
17
|
+
constructor(message: string, category: ErrorCategory, type: string, extensions?: ErrorExtensions, path?: (string | number)[]);
|
|
18
18
|
}
|
|
19
19
|
export declare class DirectoryGraphQLErrors extends Error {
|
|
20
20
|
errors: DirectoryGraphQLError[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/profilecard",
|
|
3
|
-
"version": "19.5.
|
|
3
|
+
"version": "19.5.13",
|
|
4
4
|
"description": "A React component to display a card with user information.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
81
81
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
82
|
-
"@atlassian/ptc-test-utils": "^0.
|
|
82
|
+
"@atlassian/ptc-test-utils": "^0.8.0",
|
|
83
83
|
"@testing-library/react": "^12.1.5",
|
|
84
84
|
"enzyme": "^3.10.0",
|
|
85
85
|
"es6-promise": "^4.0.5",
|