@atlaskit/profilecard 17.2.5 → 17.2.7
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/errorUtils.js +3 -1
- package/dist/cjs/client/graphqlUtils.js +4 -2
- package/dist/cjs/util/analytics.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/client/errorUtils.js +3 -1
- package/dist/es2019/client/graphqlUtils.js +4 -2
- package/dist/es2019/util/analytics.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/client/errorUtils.js +3 -1
- package/dist/esm/client/graphqlUtils.js +4 -2
- package/dist/esm/util/analytics.js +1 -1
- package/dist/esm/version.json +1 -1
- package/package.json +3 -11
- package/report.api.md +1 -3
- package/dist/types-ts4.0/client/CachingClient.d.ts +0 -18
- package/dist/types-ts4.0/client/ProfileCardClient.d.ts +0 -18
- package/dist/types-ts4.0/client/TeamCentralCardClient.d.ts +0 -31
- package/dist/types-ts4.0/client/TeamProfileCardClient.d.ts +0 -10
- package/dist/types-ts4.0/client/UserProfileCardClient.d.ts +0 -18
- package/dist/types-ts4.0/client/errorUtils.d.ts +0 -6
- package/dist/types-ts4.0/client/getTeamFromAGG.d.ts +0 -28
- package/dist/types-ts4.0/client/graphqlUtils.d.ts +0 -16
- package/dist/types-ts4.0/client/index.d.ts +0 -6
- package/dist/types-ts4.0/components/Error/ErrorBoundary.d.ts +0 -10
- package/dist/types-ts4.0/components/Error/ErrorIllustration.d.ts +0 -2
- package/dist/types-ts4.0/components/Error/ErrorMessage.d.ts +0 -10
- package/dist/types-ts4.0/components/Error/index.d.ts +0 -3
- package/dist/types-ts4.0/components/Icon/IconLabel.d.ts +0 -12
- package/dist/types-ts4.0/components/Icon/index.d.ts +0 -1
- package/dist/types-ts4.0/components/Team/TeamLoadingState.d.ts +0 -6
- package/dist/types-ts4.0/components/Team/TeamProfileCard.d.ts +0 -4
- package/dist/types-ts4.0/components/Team/TeamProfileCardTrigger.d.ts +0 -50
- package/dist/types-ts4.0/components/Team/index.d.ts +0 -4
- package/dist/types-ts4.0/components/Team/lazyTeamProfileCard.d.ts +0 -2
- package/dist/types-ts4.0/components/User/OverflowProfileCardButtons.d.ts +0 -9
- package/dist/types-ts4.0/components/User/ProfileCard.d.ts +0 -5
- package/dist/types-ts4.0/components/User/ProfileCardDetails.d.ts +0 -3
- package/dist/types-ts4.0/components/User/ProfileCardResourced.d.ts +0 -22
- package/dist/types-ts4.0/components/User/ProfileCardTrigger.d.ts +0 -4
- package/dist/types-ts4.0/components/User/ReportingLinesDetails.d.ts +0 -5
- package/dist/types-ts4.0/components/User/UserLoadingState.d.ts +0 -7
- package/dist/types-ts4.0/components/User/index.d.ts +0 -4
- package/dist/types-ts4.0/components/User/lazyProfileCard.d.ts +0 -2
- package/dist/types-ts4.0/i18n/cs.d.ts +0 -39
- package/dist/types-ts4.0/i18n/da.d.ts +0 -39
- package/dist/types-ts4.0/i18n/de.d.ts +0 -39
- package/dist/types-ts4.0/i18n/en.d.ts +0 -39
- package/dist/types-ts4.0/i18n/en_GB.d.ts +0 -39
- package/dist/types-ts4.0/i18n/en_ZZ.d.ts +0 -39
- package/dist/types-ts4.0/i18n/es.d.ts +0 -39
- package/dist/types-ts4.0/i18n/et.d.ts +0 -27
- package/dist/types-ts4.0/i18n/fi.d.ts +0 -39
- package/dist/types-ts4.0/i18n/fr.d.ts +0 -39
- package/dist/types-ts4.0/i18n/hu.d.ts +0 -39
- package/dist/types-ts4.0/i18n/index.d.ts +0 -36
- package/dist/types-ts4.0/i18n/is.d.ts +0 -27
- package/dist/types-ts4.0/i18n/it.d.ts +0 -39
- package/dist/types-ts4.0/i18n/ja.d.ts +0 -39
- package/dist/types-ts4.0/i18n/ko.d.ts +0 -39
- package/dist/types-ts4.0/i18n/languages.d.ts +0 -33
- package/dist/types-ts4.0/i18n/nb.d.ts +0 -39
- package/dist/types-ts4.0/i18n/nl.d.ts +0 -39
- package/dist/types-ts4.0/i18n/pl.d.ts +0 -39
- package/dist/types-ts4.0/i18n/pt_BR.d.ts +0 -39
- package/dist/types-ts4.0/i18n/pt_PT.d.ts +0 -27
- package/dist/types-ts4.0/i18n/ro.d.ts +0 -27
- package/dist/types-ts4.0/i18n/ru.d.ts +0 -39
- package/dist/types-ts4.0/i18n/sk.d.ts +0 -27
- package/dist/types-ts4.0/i18n/sv.d.ts +0 -39
- package/dist/types-ts4.0/i18n/th.d.ts +0 -39
- package/dist/types-ts4.0/i18n/tr.d.ts +0 -39
- package/dist/types-ts4.0/i18n/uk.d.ts +0 -39
- package/dist/types-ts4.0/i18n/vi.d.ts +0 -39
- package/dist/types-ts4.0/i18n/zh.d.ts +0 -39
- package/dist/types-ts4.0/i18n/zh_TW.d.ts +0 -39
- package/dist/types-ts4.0/index.d.ts +0 -18
- package/dist/types-ts4.0/internal/filterActions.d.ts +0 -3
- package/dist/types-ts4.0/internal/relative-date.d.ts +0 -3
- package/dist/types-ts4.0/messages.d.ts +0 -153
- package/dist/types-ts4.0/mocks/index.d.ts +0 -4
- package/dist/types-ts4.0/mocks/mock-profile-client.d.ts +0 -1
- package/dist/types-ts4.0/mocks/mock-team-client.d.ts +0 -7
- package/dist/types-ts4.0/mocks/profile-data.d.ts +0 -41
- package/dist/types-ts4.0/mocks/reporting-lines-data.d.ts +0 -2
- package/dist/types-ts4.0/mocks/simple-mock-clients.d.ts +0 -14
- package/dist/types-ts4.0/mocks/team-data.d.ts +0 -7
- package/dist/types-ts4.0/mocks/util.d.ts +0 -6
- package/dist/types-ts4.0/styled/Card.d.ts +0 -31
- package/dist/types-ts4.0/styled/Error.d.ts +0 -6
- package/dist/types-ts4.0/styled/ReportingLines.d.ts +0 -6
- package/dist/types-ts4.0/styled/TeamCard.d.ts +0 -20
- package/dist/types-ts4.0/styled/constants.d.ts +0 -14
- package/dist/types-ts4.0/types.d.ts +0 -355
- package/dist/types-ts4.0/util/analytics.d.ts +0 -58
- package/dist/types-ts4.0/util/click.d.ts +0 -4
- package/dist/types-ts4.0/util/config.d.ts +0 -2
- package/dist/types-ts4.0/util/performance.d.ts +0 -1
- package/dist/types-ts4.0/util/withOuterListeners.d.ts +0 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/profilecard
|
|
2
2
|
|
|
3
|
+
## 17.2.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`7bb86e9484c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7bb86e9484c) - Transform errors from AGG and ignore 403(TEAMS_FORBIDDEN) and 410(TEAMS_TEAM_DELETED) errors for SLO failure
|
|
8
|
+
|
|
9
|
+
## 17.2.6
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 17.2.5
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getErrorAttributes = void 0;
|
|
7
|
-
var IGNORED_ERRORS = [
|
|
7
|
+
var IGNORED_ERRORS = [// Error categories from pf-directory
|
|
8
|
+
'NotPermitted', 'Gone', // Error categories from AGG
|
|
9
|
+
'TEAMS_FORBIDDEN', 'TEAMS_TEAM_DELETED'];
|
|
8
10
|
|
|
9
11
|
function isIgnoredError(error) {
|
|
10
12
|
return !!error && IGNORED_ERRORS.includes(error.reason);
|
|
@@ -43,10 +43,12 @@ function graphqlQuery(serviceUrl, query) {
|
|
|
43
43
|
return response.json();
|
|
44
44
|
}).then(function (json) {
|
|
45
45
|
if (json.errors) {
|
|
46
|
-
var _json$errors
|
|
46
|
+
var _json$errors$, _json$errors$2, _json$errors$2$extens, _json$errors$3, _json$errors$3$extens;
|
|
47
47
|
|
|
48
|
+
// We need to handle responses from pf-directory and AGG
|
|
48
49
|
return Promise.reject({
|
|
49
|
-
reason: ((_json$errors$ = json.errors[0]) === null || _json$errors$ === void 0 ? void 0 : _json$errors$.category) || 'default'
|
|
50
|
+
reason: ((_json$errors$ = json.errors[0]) === null || _json$errors$ === void 0 ? void 0 : _json$errors$.category) || ((_json$errors$2 = json.errors[0]) === null || _json$errors$2 === void 0 ? void 0 : (_json$errors$2$extens = _json$errors$2.extensions) === null || _json$errors$2$extens === void 0 ? void 0 : _json$errors$2$extens.classification) || 'default',
|
|
51
|
+
code: (_json$errors$3 = json.errors[0]) === null || _json$errors$3 === void 0 ? void 0 : (_json$errors$3$extens = _json$errors$3.extensions) === null || _json$errors$3$extens === void 0 ? void 0 : _json$errors$3$extens.statusCode
|
|
50
52
|
});
|
|
51
53
|
}
|
|
52
54
|
|
|
@@ -59,7 +59,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
59
59
|
actionSubjectId: actionSubjectId,
|
|
60
60
|
attributes: _objectSpread(_objectSpread({
|
|
61
61
|
packageName: "@atlaskit/profilecard",
|
|
62
|
-
packageVersion: "17.2.
|
|
62
|
+
packageVersion: "17.2.7"
|
|
63
63
|
}, attributes), {}, {
|
|
64
64
|
firedAt: Math.round((0, _performance.getPageTime)())
|
|
65
65
|
})
|
package/dist/cjs/version.json
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
const IGNORED_ERRORS = [
|
|
1
|
+
const IGNORED_ERRORS = [// Error categories from pf-directory
|
|
2
|
+
'NotPermitted', 'Gone', // Error categories from AGG
|
|
3
|
+
'TEAMS_FORBIDDEN', 'TEAMS_TEAM_DELETED'];
|
|
2
4
|
|
|
3
5
|
function isIgnoredError(error) {
|
|
4
6
|
return !!error && IGNORED_ERRORS.includes(error.reason);
|
|
@@ -31,10 +31,12 @@ export function graphqlQuery(serviceUrl, query, processHeaders = id) {
|
|
|
31
31
|
return response;
|
|
32
32
|
}).then(response => response.json()).then(json => {
|
|
33
33
|
if (json.errors) {
|
|
34
|
-
var _json$errors
|
|
34
|
+
var _json$errors$, _json$errors$2, _json$errors$2$extens, _json$errors$3, _json$errors$3$extens;
|
|
35
35
|
|
|
36
|
+
// We need to handle responses from pf-directory and AGG
|
|
36
37
|
return Promise.reject({
|
|
37
|
-
reason: ((_json$errors$ = json.errors[0]) === null || _json$errors$ === void 0 ? void 0 : _json$errors$.category) || 'default'
|
|
38
|
+
reason: ((_json$errors$ = json.errors[0]) === null || _json$errors$ === void 0 ? void 0 : _json$errors$.category) || ((_json$errors$2 = json.errors[0]) === null || _json$errors$2 === void 0 ? void 0 : (_json$errors$2$extens = _json$errors$2.extensions) === null || _json$errors$2$extens === void 0 ? void 0 : _json$errors$2$extens.classification) || 'default',
|
|
39
|
+
code: (_json$errors$3 = json.errors[0]) === null || _json$errors$3 === void 0 ? void 0 : (_json$errors$3$extens = _json$errors$3.extensions) === null || _json$errors$3$extens === void 0 ? void 0 : _json$errors$3$extens.statusCode
|
|
38
40
|
});
|
|
39
41
|
}
|
|
40
42
|
|
|
@@ -38,7 +38,7 @@ const createEvent = (eventType, action, actionSubject, actionSubjectId, attribut
|
|
|
38
38
|
actionSubjectId,
|
|
39
39
|
attributes: {
|
|
40
40
|
packageName: "@atlaskit/profilecard",
|
|
41
|
-
packageVersion: "17.2.
|
|
41
|
+
packageVersion: "17.2.7",
|
|
42
42
|
...attributes,
|
|
43
43
|
firedAt: Math.round(getPageTime())
|
|
44
44
|
}
|
package/dist/es2019/version.json
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
var IGNORED_ERRORS = [
|
|
1
|
+
var IGNORED_ERRORS = [// Error categories from pf-directory
|
|
2
|
+
'NotPermitted', 'Gone', // Error categories from AGG
|
|
3
|
+
'TEAMS_FORBIDDEN', 'TEAMS_TEAM_DELETED'];
|
|
2
4
|
|
|
3
5
|
function isIgnoredError(error) {
|
|
4
6
|
return !!error && IGNORED_ERRORS.includes(error.reason);
|
|
@@ -36,10 +36,12 @@ export function graphqlQuery(serviceUrl, query) {
|
|
|
36
36
|
return response.json();
|
|
37
37
|
}).then(function (json) {
|
|
38
38
|
if (json.errors) {
|
|
39
|
-
var _json$errors
|
|
39
|
+
var _json$errors$, _json$errors$2, _json$errors$2$extens, _json$errors$3, _json$errors$3$extens;
|
|
40
40
|
|
|
41
|
+
// We need to handle responses from pf-directory and AGG
|
|
41
42
|
return Promise.reject({
|
|
42
|
-
reason: ((_json$errors$ = json.errors[0]) === null || _json$errors$ === void 0 ? void 0 : _json$errors$.category) || 'default'
|
|
43
|
+
reason: ((_json$errors$ = json.errors[0]) === null || _json$errors$ === void 0 ? void 0 : _json$errors$.category) || ((_json$errors$2 = json.errors[0]) === null || _json$errors$2 === void 0 ? void 0 : (_json$errors$2$extens = _json$errors$2.extensions) === null || _json$errors$2$extens === void 0 ? void 0 : _json$errors$2$extens.classification) || 'default',
|
|
44
|
+
code: (_json$errors$3 = json.errors[0]) === null || _json$errors$3 === void 0 ? void 0 : (_json$errors$3$extens = _json$errors$3.extensions) === null || _json$errors$3$extens === void 0 ? void 0 : _json$errors$3$extens.statusCode
|
|
43
45
|
});
|
|
44
46
|
}
|
|
45
47
|
|
|
@@ -48,7 +48,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
48
48
|
actionSubjectId: actionSubjectId,
|
|
49
49
|
attributes: _objectSpread(_objectSpread({
|
|
50
50
|
packageName: "@atlaskit/profilecard",
|
|
51
|
-
packageVersion: "17.2.
|
|
51
|
+
packageVersion: "17.2.7"
|
|
52
52
|
}, attributes), {}, {
|
|
53
53
|
firedAt: Math.round(getPageTime())
|
|
54
54
|
})
|
package/dist/esm/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/profilecard",
|
|
3
|
-
"version": "17.2.
|
|
3
|
+
"version": "17.2.7",
|
|
4
4
|
"description": "A React component to display a card with user information.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -12,14 +12,6 @@
|
|
|
12
12
|
"module": "dist/esm/index.js",
|
|
13
13
|
"module:es2019": "dist/es2019/index.js",
|
|
14
14
|
"types": "dist/types/index.d.ts",
|
|
15
|
-
"typesVersions": {
|
|
16
|
-
">=4.0 <4.5": {
|
|
17
|
-
"*": [
|
|
18
|
-
"dist/types-ts4.0/*",
|
|
19
|
-
"dist/types-ts4.0/index.d.ts"
|
|
20
|
-
]
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
15
|
"atlaskit:src": "src/index.ts",
|
|
24
16
|
"atlassian": {
|
|
25
17
|
"team": "People and Teams Collective",
|
|
@@ -58,7 +50,7 @@
|
|
|
58
50
|
"@atlaskit/popup": "^1.5.0",
|
|
59
51
|
"@atlaskit/spinner": "^15.2.0",
|
|
60
52
|
"@atlaskit/theme": "^12.2.0",
|
|
61
|
-
"@atlaskit/tokens": "^0.
|
|
53
|
+
"@atlaskit/tokens": "^0.11.0",
|
|
62
54
|
"@babel/runtime": "^7.0.0",
|
|
63
55
|
"date-fns": "^2.17.0",
|
|
64
56
|
"lodash": "^4.17.21",
|
|
@@ -76,7 +68,7 @@
|
|
|
76
68
|
"@atlaskit/flag": "^14.7.0",
|
|
77
69
|
"@atlaskit/inline-edit": "^12.2.0",
|
|
78
70
|
"@atlaskit/select": "^15.7.0",
|
|
79
|
-
"@atlaskit/util-data-test": "^17.
|
|
71
|
+
"@atlaskit/util-data-test": "^17.6.0",
|
|
80
72
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
81
73
|
"@testing-library/react": "^12.1.5",
|
|
82
74
|
"enzyme": "^3.10.0",
|
package/report.api.md
CHANGED
|
@@ -550,9 +550,7 @@ export interface Team {
|
|
|
550
550
|
}
|
|
551
551
|
|
|
552
552
|
// @public (undocumented)
|
|
553
|
-
class TeamCentralCardClient extends CachingClient<
|
|
554
|
-
TeamCentralReportingLinesData
|
|
555
|
-
> {
|
|
553
|
+
class TeamCentralCardClient extends CachingClient<TeamCentralReportingLinesData> {
|
|
556
554
|
constructor(options: TeamCentralCardClientOptions);
|
|
557
555
|
bypassOnFailure: boolean;
|
|
558
556
|
// (undocumented)
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { LRUCache } from 'lru-fast';
|
|
2
|
-
interface CachedData<T> {
|
|
3
|
-
expire: number;
|
|
4
|
-
profile: T;
|
|
5
|
-
}
|
|
6
|
-
export interface CacheConfig {
|
|
7
|
-
cacheSize?: number;
|
|
8
|
-
cacheMaxAge?: number;
|
|
9
|
-
}
|
|
10
|
-
export default class CachingClient<T> {
|
|
11
|
-
config: Required<CacheConfig>;
|
|
12
|
-
cache: LRUCache<string, CachedData<T>> | null;
|
|
13
|
-
constructor(config: CacheConfig);
|
|
14
|
-
setCachedProfile(cacheIdentifier: string, profile: T): void;
|
|
15
|
-
getCachedProfile(cacheIdentifier: string): T | null;
|
|
16
|
-
flushCache(): void;
|
|
17
|
-
}
|
|
18
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { AnalyticsEventPayload } from '@atlaskit/analytics-next';
|
|
2
|
-
import { ClientOverrides, ProfileClientOptions, TeamCentralReportingLinesData } from '../types';
|
|
3
|
-
import TeamCentralCardClient from './TeamCentralCardClient';
|
|
4
|
-
import TeamProfileCardClient from './TeamProfileCardClient';
|
|
5
|
-
import UserProfileCardClient from './UserProfileCardClient';
|
|
6
|
-
declare class ProfileCardClient {
|
|
7
|
-
userClient: UserProfileCardClient;
|
|
8
|
-
teamClient: TeamProfileCardClient;
|
|
9
|
-
tcClient?: TeamCentralCardClient;
|
|
10
|
-
constructor(config: ProfileClientOptions, clients?: ClientOverrides);
|
|
11
|
-
flushCache(): void;
|
|
12
|
-
getProfile(cloudId: string, userId: string, analytics?: (event: AnalyticsEventPayload) => void): Promise<any>;
|
|
13
|
-
getTeamProfile(teamId: string, orgId?: string, analytics?: (event: AnalyticsEventPayload) => void): Promise<import("../types").Team>;
|
|
14
|
-
getReportingLines(userId: string): Promise<TeamCentralReportingLinesData>;
|
|
15
|
-
getTeamCentralBaseUrl(): string | undefined;
|
|
16
|
-
shouldShowGiveKudos(): Promise<boolean>;
|
|
17
|
-
}
|
|
18
|
-
export default ProfileCardClient;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { ProfileClientOptions, TeamCentralReportingLinesData } from '../types';
|
|
2
|
-
import CachingClient from './CachingClient';
|
|
3
|
-
declare type TeamCentralCardClientOptions = ProfileClientOptions & {
|
|
4
|
-
teamCentralUrl: string;
|
|
5
|
-
};
|
|
6
|
-
declare type FeatureFlagExtraContext = {
|
|
7
|
-
key: string;
|
|
8
|
-
value: string;
|
|
9
|
-
};
|
|
10
|
-
declare class TeamCentralCardClient extends CachingClient<TeamCentralReportingLinesData> {
|
|
11
|
-
options: TeamCentralCardClientOptions;
|
|
12
|
-
/**
|
|
13
|
-
* Simple circuit breaker to avoid making unnecessary calls to Team Central on auth failures
|
|
14
|
-
* This is to handle the case where products may have provided teamCentralUrl, but the site itself
|
|
15
|
-
* doesn't actually have any TC product.
|
|
16
|
-
*
|
|
17
|
-
* There's currently no way to reset this circuit breaker, but that's fine. This is meant to
|
|
18
|
-
* catch a pretty specific edge case.
|
|
19
|
-
*/
|
|
20
|
-
bypassOnFailure: boolean;
|
|
21
|
-
featureFlagKeys: Map<string, boolean>;
|
|
22
|
-
isTCReadyPromise: Promise<boolean>;
|
|
23
|
-
constructor(options: TeamCentralCardClientOptions);
|
|
24
|
-
createTcReadyPromise(config: ProfileClientOptions): Promise<boolean>;
|
|
25
|
-
makeFeatureFlagCheckRequest(featureKey: string, context?: FeatureFlagExtraContext[]): Promise<boolean>;
|
|
26
|
-
makeRequest(userId: string): Promise<TeamCentralReportingLinesData>;
|
|
27
|
-
getReportingLines(userId: string): Promise<TeamCentralReportingLinesData>;
|
|
28
|
-
getFlagEnabled(featureKey: string, productIdentifier?: string): Promise<boolean>;
|
|
29
|
-
private filterReportingLinesUser;
|
|
30
|
-
}
|
|
31
|
-
export default TeamCentralCardClient;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { AnalyticsEventPayload } from '@atlaskit/analytics-next';
|
|
2
|
-
import type { ProfileClientOptions, Team } from '../types';
|
|
3
|
-
import CachingClient from './CachingClient';
|
|
4
|
-
export default class TeamProfileCardClient extends CachingClient<Team> {
|
|
5
|
-
options: ProfileClientOptions;
|
|
6
|
-
constructor(options: ProfileClientOptions);
|
|
7
|
-
makeRequestViaGateway(teamId: string, _orgId: string | undefined): Promise<Team>;
|
|
8
|
-
makeRequest(teamId: string, orgId: string | undefined): Promise<Team>;
|
|
9
|
-
getProfile(teamId: string, orgId: string | undefined, analytics?: (event: AnalyticsEventPayload) => void): Promise<Team>;
|
|
10
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { AnalyticsEventPayload } from '@atlaskit/analytics-next';
|
|
2
|
-
import { ApiClientResponse, ProfileCardClientData, ProfileClientOptions } from '../types';
|
|
3
|
-
import CachingClient from './CachingClient';
|
|
4
|
-
/**
|
|
5
|
-
* Transform response from GraphQL
|
|
6
|
-
* - Prefix `timestring` with `remoteWeekdayString` depending on `remoteWeekdayIndex`
|
|
7
|
-
* - Remove properties which will be not used later
|
|
8
|
-
* @ignore
|
|
9
|
-
* @param {object} response
|
|
10
|
-
* @return {object}
|
|
11
|
-
*/
|
|
12
|
-
export declare const modifyResponse: (response: ApiClientResponse) => ProfileCardClientData;
|
|
13
|
-
export default class UserProfileCardClient extends CachingClient<any> {
|
|
14
|
-
options: ProfileClientOptions;
|
|
15
|
-
constructor(options: ProfileClientOptions);
|
|
16
|
-
makeRequest(cloudId: string, userId: string): Promise<ProfileCardClientData>;
|
|
17
|
-
getProfile(cloudId: string, userId: string, analytics?: (event: AnalyticsEventPayload) => void): Promise<any>;
|
|
18
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { Team } from '../types';
|
|
2
|
-
interface AGGTeam extends Omit<Team, 'members'> {
|
|
3
|
-
members?: {
|
|
4
|
-
nodes: AGGMember[];
|
|
5
|
-
};
|
|
6
|
-
}
|
|
7
|
-
interface AGGMember {
|
|
8
|
-
member: {
|
|
9
|
-
accountId: string;
|
|
10
|
-
name: string;
|
|
11
|
-
picture: string;
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
interface AGGResult {
|
|
15
|
-
team: AGGTeam;
|
|
16
|
-
}
|
|
17
|
-
export declare const extractIdFromAri: (ari: string) => string;
|
|
18
|
-
export declare const idToAri: (teamId: string) => string;
|
|
19
|
-
export declare const convertTeam: (result: AGGResult) => Team;
|
|
20
|
-
export declare const buildGatewayQuery: (teamId: string) => {
|
|
21
|
-
query: string;
|
|
22
|
-
variables: {
|
|
23
|
-
teamId: string;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
export declare const addExperimentalHeaders: (headers: Headers) => Headers;
|
|
27
|
-
export declare function getTeamFromAGG(url: string, teamId: string): Promise<Team>;
|
|
28
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
interface Query {
|
|
2
|
-
query: string;
|
|
3
|
-
variables: Record<string, any>;
|
|
4
|
-
}
|
|
5
|
-
export interface GraphQLError {
|
|
6
|
-
code?: number;
|
|
7
|
-
reason: string;
|
|
8
|
-
}
|
|
9
|
-
declare type HeaderProcessor = (headers: Headers) => Headers;
|
|
10
|
-
/**
|
|
11
|
-
* @param {string} serviceUrl - GraphQL service endpoint
|
|
12
|
-
* @param {Query} query - GraphQL query
|
|
13
|
-
* @param {HeaderProcessor} processHeaders - a function to add extra headers to the request
|
|
14
|
-
*/
|
|
15
|
-
export declare function graphqlQuery<D>(serviceUrl: string, query: Query, processHeaders?: HeaderProcessor): Promise<D>;
|
|
16
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import CachingClient from './CachingClient';
|
|
2
|
-
import ProfileCardClient from './ProfileCardClient';
|
|
3
|
-
import TeamProfileClient from './TeamProfileCardClient';
|
|
4
|
-
import UserProfileClient, { modifyResponse } from './UserProfileCardClient';
|
|
5
|
-
export { CachingClient, modifyResponse, TeamProfileClient, UserProfileClient };
|
|
6
|
-
export default ProfileCardClient;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface ErrorBoundaryProps {
|
|
3
|
-
children: React.ReactNode;
|
|
4
|
-
onError: () => void;
|
|
5
|
-
}
|
|
6
|
-
export declare class ErrorBoundary extends React.Component<ErrorBoundaryProps, {}> {
|
|
7
|
-
componentDidCatch(): void;
|
|
8
|
-
render(): React.ReactNode;
|
|
9
|
-
}
|
|
10
|
-
export default ErrorBoundary;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { AnalyticsEventPayload } from '@atlaskit/analytics-next';
|
|
3
|
-
import { ProfileCardErrorType } from '../../types';
|
|
4
|
-
interface Props {
|
|
5
|
-
reload?: () => void | undefined;
|
|
6
|
-
errorType?: ProfileCardErrorType;
|
|
7
|
-
fireAnalytics: (payload: AnalyticsEventPayload) => void;
|
|
8
|
-
}
|
|
9
|
-
declare const ErrorMessage: (props: Props) => JSX.Element;
|
|
10
|
-
export default ErrorMessage;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
declare type Props = {
|
|
3
|
-
icon: string;
|
|
4
|
-
children?: React.ReactNode;
|
|
5
|
-
};
|
|
6
|
-
export default class IconLabel extends React.PureComponent<Props> {
|
|
7
|
-
static defaultProps: {
|
|
8
|
-
icon: string;
|
|
9
|
-
};
|
|
10
|
-
render(): JSX.Element | null;
|
|
11
|
-
}
|
|
12
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as IconLabel } from './IconLabel';
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { AnalyticsEventPayload } from '@atlaskit/analytics-next';
|
|
3
|
-
import { TriggerProps } from '@atlaskit/popup/types';
|
|
4
|
-
import type { AnalyticsFromDuration, AnalyticsProps, ProfileCardAction, Team, TeamProfileCardTriggerProps, TeamProfileCardTriggerState } from '../../types';
|
|
5
|
-
export declare class TeamProfileCardTriggerInternal extends React.PureComponent<TeamProfileCardTriggerProps & AnalyticsProps, TeamProfileCardTriggerState> {
|
|
6
|
-
static defaultProps: Partial<TeamProfileCardTriggerProps>;
|
|
7
|
-
_isMounted: boolean;
|
|
8
|
-
showTimer: number;
|
|
9
|
-
hideTimer: number;
|
|
10
|
-
openedByHover: boolean;
|
|
11
|
-
openTime: number;
|
|
12
|
-
fireAnalytics: (payload: AnalyticsEventPayload) => void;
|
|
13
|
-
fireAnalyticsWithDuration: (generator: AnalyticsFromDuration) => void;
|
|
14
|
-
hideProfilecard: (delay?: number) => void;
|
|
15
|
-
showProfilecard: (delay?: number) => void;
|
|
16
|
-
onClick: (event: React.MouseEvent<HTMLElement>) => void;
|
|
17
|
-
onMouseEnter: () => void;
|
|
18
|
-
onMouseLeave: () => void;
|
|
19
|
-
onClose: () => void;
|
|
20
|
-
openKudosDrawer: () => void;
|
|
21
|
-
closeKudosDrawer: () => void;
|
|
22
|
-
kudosUrl: () => string;
|
|
23
|
-
stopPropagation: (event: React.MouseEvent<HTMLElement>) => void;
|
|
24
|
-
triggerListeners: {
|
|
25
|
-
onClick: (event: React.MouseEvent<HTMLElement>) => void;
|
|
26
|
-
onMouseEnter: () => void;
|
|
27
|
-
onMouseLeave: () => void;
|
|
28
|
-
};
|
|
29
|
-
cardListeners: {
|
|
30
|
-
onClick: (event: React.MouseEvent<HTMLElement>) => void;
|
|
31
|
-
onMouseEnter: () => void;
|
|
32
|
-
onMouseLeave: () => void;
|
|
33
|
-
};
|
|
34
|
-
state: TeamProfileCardTriggerState;
|
|
35
|
-
componentDidMount(): void;
|
|
36
|
-
componentDidUpdate(prevProps: TeamProfileCardTriggerProps): void;
|
|
37
|
-
componentWillUnmount(): void;
|
|
38
|
-
clientFetchProfile: () => void;
|
|
39
|
-
onErrorBoundary: () => void;
|
|
40
|
-
handleClientSuccess(team: Team, shouldShowGiveKudos: boolean): void;
|
|
41
|
-
handleClientError(err: any): void;
|
|
42
|
-
filterActions(): ProfileCardAction[];
|
|
43
|
-
renderProfileCard: () => JSX.Element;
|
|
44
|
-
renderKudosLauncher: () => false | JSX.Element | undefined;
|
|
45
|
-
renderTrigger: (triggerProps: TriggerProps) => JSX.Element;
|
|
46
|
-
renderPopup(): React.ReactNode;
|
|
47
|
-
render(): React.ReactNode;
|
|
48
|
-
}
|
|
49
|
-
declare const _default: React.ForwardRefExoticComponent<Pick<Omit<TeamProfileCardTriggerProps & AnalyticsProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, never> & Partial<Pick<Omit<TeamProfileCardTriggerProps & AnalyticsProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, keyof TeamProfileCardTriggerProps>> & Partial<Pick<Partial<TeamProfileCardTriggerProps>, never>> & React.RefAttributes<any>>;
|
|
50
|
-
export default _default;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { AnalyticsWithDurationProps, ProfileCardAction } from '../../types';
|
|
3
|
-
declare type OverflowButtonsProps = {
|
|
4
|
-
actions: ProfileCardAction[];
|
|
5
|
-
onItemClick: (action: ProfileCardAction, args: any, event: React.MouseEvent | React.KeyboardEvent, index: number) => void;
|
|
6
|
-
} & AnalyticsWithDurationProps;
|
|
7
|
-
export declare const ACTION_OVERFLOW_THRESHOLD = 2;
|
|
8
|
-
export declare const OverflowProfileCardButtons: (props: OverflowButtonsProps) => JSX.Element;
|
|
9
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { AnalyticsProps, ProfilecardProps } from '../../types';
|
|
3
|
-
export declare const ProfilecardInternal: (props: ProfilecardProps & AnalyticsProps) => JSX.Element | null;
|
|
4
|
-
declare const _default: React.ForwardRefExoticComponent<Omit<ProfilecardProps & AnalyticsProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any>>;
|
|
5
|
-
export default _default;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { AnalyticsEventPayload } from '@atlaskit/analytics-next';
|
|
3
|
-
import { AnalyticsProps, ProfileCardAction, ProfileCardClientData, ProfileCardResourcedProps, ProfileCardResourcedState, TeamCentralReportingLinesData } from '../../types';
|
|
4
|
-
declare class ProfileCardResourced extends React.PureComponent<ProfileCardResourcedProps & AnalyticsProps, ProfileCardResourcedState> {
|
|
5
|
-
static defaultProps: Partial<ProfileCardResourcedProps>;
|
|
6
|
-
_isMounted: boolean;
|
|
7
|
-
state: ProfileCardResourcedState;
|
|
8
|
-
fireAnalytics: (payload: AnalyticsEventPayload) => void;
|
|
9
|
-
componentDidMount(): void;
|
|
10
|
-
componentDidUpdate(prevProps: ProfileCardResourcedProps, prevState: ProfileCardResourcedState): void;
|
|
11
|
-
componentWillUnmount(): void;
|
|
12
|
-
clientFetchProfile: () => void;
|
|
13
|
-
handleClientSuccess(profileData: ProfileCardClientData, reportingLinesData: TeamCentralReportingLinesData, shouldShowGiveKudos: boolean): void;
|
|
14
|
-
handleClientError(err: any): void;
|
|
15
|
-
filterActions: () => ProfileCardAction[];
|
|
16
|
-
openKudosDrawer: () => void;
|
|
17
|
-
closeKudosDrawer: () => void;
|
|
18
|
-
render(): React.ReactNode;
|
|
19
|
-
}
|
|
20
|
-
export declare const ProfileCardResourcedInternal: typeof ProfileCardResourced;
|
|
21
|
-
declare const _default: React.ForwardRefExoticComponent<Pick<Omit<ProfileCardResourcedProps & AnalyticsProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, never> & Partial<Pick<Omit<ProfileCardResourcedProps & AnalyticsProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, keyof ProfileCardResourcedProps>> & Partial<Pick<Partial<ProfileCardResourcedProps>, never>> & React.RefAttributes<any>>;
|
|
22
|
-
export default _default;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { AnalyticsProps, ProfileCardTriggerProps } from '../../types';
|
|
3
|
-
declare const _default: React.ForwardRefExoticComponent<Pick<Omit<ProfileCardTriggerProps & AnalyticsProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, never> & Partial<Pick<Omit<ProfileCardTriggerProps & AnalyticsProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, keyof ProfileCardTriggerProps>> & Partial<Pick<Partial<ProfileCardTriggerProps>, never>> & React.RefAttributes<any>>;
|
|
4
|
-
export default _default;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { AnalyticsWithDurationProps, ProfilecardProps } from '../../types';
|
|
3
|
-
export declare type ReportingLinesDetailsProps = Pick<ProfilecardProps, 'reportingLines' | 'reportingLinesProfileUrl' | 'onReportingLinesClick'> & AnalyticsWithDurationProps;
|
|
4
|
-
declare const ReportingLinesDetails: (props: ReportingLinesDetailsProps) => JSX.Element;
|
|
5
|
-
export default ReportingLinesDetails;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { AnalyticsEventPayload } from '@atlaskit/analytics-next';
|
|
3
|
-
interface AnalyticsProps {
|
|
4
|
-
fireAnalytics: (payload: AnalyticsEventPayload) => void;
|
|
5
|
-
}
|
|
6
|
-
declare const UserLoadingState: ({ fireAnalytics }: AnalyticsProps) => JSX.Element;
|
|
7
|
-
export default UserLoadingState;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare const ProfileCardLazy: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<Omit<import("../..").ProfilecardProps & import("../../types").AnalyticsProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & import("react").RefAttributes<any>>>;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
'pt.profile-card.closed.account': string;
|
|
3
|
-
'pt.profile-card.closed.account.has.date.a.few.months': string;
|
|
4
|
-
'pt.profile-card.closed.account.has.date.last.month': string;
|
|
5
|
-
'pt.profile-card.closed.account.has.date.more.than.a.year': string;
|
|
6
|
-
'pt.profile-card.closed.account.has.date.several.months': string;
|
|
7
|
-
'pt.profile-card.closed.account.has.date.this.month': string;
|
|
8
|
-
'pt.profile-card.closed.account.has.date.this.week': string;
|
|
9
|
-
'pt.profile-card.closed.account.no.date': string;
|
|
10
|
-
'pt.profile-card.disabled.account.default.name': string;
|
|
11
|
-
'pt.profile-card.general.msg.disabled.user': string;
|
|
12
|
-
'pt.profile-card.give-kudos': string;
|
|
13
|
-
'pt.profile-card.inactive.account': string;
|
|
14
|
-
'pt.profile-card.inactive.account.has.date.a.few.months': string;
|
|
15
|
-
'pt.profile-card.inactive.account.has.date.last.month': string;
|
|
16
|
-
'pt.profile-card.inactive.account.has.date.more.than.a.year': string;
|
|
17
|
-
'pt.profile-card.inactive.account.has.date.several.months': string;
|
|
18
|
-
'pt.profile-card.inactive.account.has.date.this.month': string;
|
|
19
|
-
'pt.profile-card.inactive.account.has.date.this.week': string;
|
|
20
|
-
'pt.profile-card.inactive.account.no.date': string;
|
|
21
|
-
'pt.profile-card.more-icon-label': string;
|
|
22
|
-
'pt.team-profile-card.directReports.heading': string;
|
|
23
|
-
'pt.team-profile-card.error.refresh-button': string;
|
|
24
|
-
'pt.team-profile-card.error.suggestion': string;
|
|
25
|
-
'pt.team-profile-card.error.title': string;
|
|
26
|
-
'pt.team-profile-card.manager.heading': string;
|
|
27
|
-
'pt.team-profile-card.team.action.view-profile': string;
|
|
28
|
-
'pt.team-profile-card.team.member.count': string;
|
|
29
|
-
'pt.team-profile-card.team.member.count-including-you': string;
|
|
30
|
-
'pt.team-profile-card.team.member.many': string;
|
|
31
|
-
'pt.team-profile-card.team.member.many-including-you': string;
|
|
32
|
-
};
|
|
33
|
-
/**
|
|
34
|
-
* NOTE:
|
|
35
|
-
*
|
|
36
|
-
* This file is automatically generated by Traduki 2.0.
|
|
37
|
-
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
38
|
-
*/
|
|
39
|
-
export default _default;
|