@atlaskit/profilecard 19.5.2 → 19.5.4
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/getTeamFromAGG.js +4 -2
- package/dist/cjs/util/analytics.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/client/getTeamFromAGG.js +3 -3
- package/dist/es2019/util/analytics.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/client/getTeamFromAGG.js +2 -2
- package/dist/esm/util/analytics.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/client/getTeamFromAGG.d.ts +2 -0
- package/dist/types-ts4.5/client/getTeamFromAGG.d.ts +2 -0
- package/package.json +6 -5
- package/tmp/api-report-tmp.d.ts +570 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/profilecard
|
|
2
2
|
|
|
3
|
+
## 19.5.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`cc13658d9b4`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cc13658d9b4) - Fix for incorrect GraphQL query variable in team card
|
|
8
|
+
|
|
9
|
+
## 19.5.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 19.5.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -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.extractIdFromAri = exports.convertTeam = exports.buildGatewayQuery = exports.addHeaders = void 0;
|
|
7
|
+
exports.extractIdFromAri = exports.convertTeam = exports.buildGatewayQuery = exports.addHeaders = exports.GATEWAY_QUERY_V2 = exports.GATEWAY_QUERY = void 0;
|
|
8
8
|
exports.getTeamFromAGG = getTeamFromAGG;
|
|
9
9
|
exports.idToAri = void 0;
|
|
10
10
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
@@ -46,8 +46,10 @@ exports.convertTeam = convertTeam;
|
|
|
46
46
|
var TEAM_FRAGMENT = "\n id\n displayName\n description\n smallHeaderImageUrl\n largeHeaderImageUrl\n smallAvatarImageUrl\n largeAvatarImageUrl\n members {\n nodes {\n member {\n accountId\n name\n picture\n }\n }\n }\n";
|
|
47
47
|
|
|
48
48
|
// We alias the team node to always be team
|
|
49
|
-
var GATEWAY_QUERY_V2 = "query TeamCard($teamId: ID!, $
|
|
49
|
+
var GATEWAY_QUERY_V2 = "query TeamCard($teamId: ID!, $siteId: String!) {\n Team: team {\n team: teamV2(id: $teamId, siteId: $siteId) @optIn(to: \"Team-v2\") {\n ".concat(TEAM_FRAGMENT, "\n }\n }\n}");
|
|
50
|
+
exports.GATEWAY_QUERY_V2 = GATEWAY_QUERY_V2;
|
|
50
51
|
var GATEWAY_QUERY = "query TeamCard($teamId: ID!) {\n Team: team {\n team(id: $teamId) {\n ".concat(TEAM_FRAGMENT, "\n }\n }\n}");
|
|
52
|
+
exports.GATEWAY_QUERY = GATEWAY_QUERY;
|
|
51
53
|
var buildGatewayQuery = function buildGatewayQuery(_ref2) {
|
|
52
54
|
var teamId = _ref2.teamId,
|
|
53
55
|
siteId = _ref2.siteId;
|
|
@@ -44,7 +44,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
44
44
|
actionSubjectId: actionSubjectId,
|
|
45
45
|
attributes: _objectSpread(_objectSpread({
|
|
46
46
|
packageName: "@atlaskit/profilecard",
|
|
47
|
-
packageVersion: "19.5.
|
|
47
|
+
packageVersion: "19.5.4"
|
|
48
48
|
}, attributes), {}, {
|
|
49
49
|
firedAt: Math.round((0, _performance.getPageTime)())
|
|
50
50
|
})
|
package/dist/cjs/version.json
CHANGED
|
@@ -48,14 +48,14 @@ const TEAM_FRAGMENT = `
|
|
|
48
48
|
`;
|
|
49
49
|
|
|
50
50
|
// We alias the team node to always be team
|
|
51
|
-
const GATEWAY_QUERY_V2 = `query TeamCard($teamId: ID!, $
|
|
51
|
+
export const GATEWAY_QUERY_V2 = `query TeamCard($teamId: ID!, $siteId: String!) {
|
|
52
52
|
Team: team {
|
|
53
|
-
team: teamV2(id: $teamId, siteId: $siteId) {
|
|
53
|
+
team: teamV2(id: $teamId, siteId: $siteId) @optIn(to: "Team-v2") {
|
|
54
54
|
${TEAM_FRAGMENT}
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
}`;
|
|
58
|
-
const GATEWAY_QUERY = `query TeamCard($teamId: ID!) {
|
|
58
|
+
export const GATEWAY_QUERY = `query TeamCard($teamId: ID!) {
|
|
59
59
|
Team: team {
|
|
60
60
|
team(id: $teamId) {
|
|
61
61
|
${TEAM_FRAGMENT}
|
|
@@ -31,7 +31,7 @@ const createEvent = (eventType, action, actionSubject, actionSubjectId, attribut
|
|
|
31
31
|
actionSubjectId,
|
|
32
32
|
attributes: {
|
|
33
33
|
packageName: "@atlaskit/profilecard",
|
|
34
|
-
packageVersion: "19.5.
|
|
34
|
+
packageVersion: "19.5.4",
|
|
35
35
|
...attributes,
|
|
36
36
|
firedAt: Math.round(getPageTime())
|
|
37
37
|
}
|
package/dist/es2019/version.json
CHANGED
|
@@ -34,8 +34,8 @@ export var convertTeam = function convertTeam(result) {
|
|
|
34
34
|
var TEAM_FRAGMENT = "\n id\n displayName\n description\n smallHeaderImageUrl\n largeHeaderImageUrl\n smallAvatarImageUrl\n largeAvatarImageUrl\n members {\n nodes {\n member {\n accountId\n name\n picture\n }\n }\n }\n";
|
|
35
35
|
|
|
36
36
|
// We alias the team node to always be team
|
|
37
|
-
var GATEWAY_QUERY_V2 = "query TeamCard($teamId: ID!, $
|
|
38
|
-
var GATEWAY_QUERY = "query TeamCard($teamId: ID!) {\n Team: team {\n team(id: $teamId) {\n ".concat(TEAM_FRAGMENT, "\n }\n }\n}");
|
|
37
|
+
export var GATEWAY_QUERY_V2 = "query TeamCard($teamId: ID!, $siteId: String!) {\n Team: team {\n team: teamV2(id: $teamId, siteId: $siteId) @optIn(to: \"Team-v2\") {\n ".concat(TEAM_FRAGMENT, "\n }\n }\n}");
|
|
38
|
+
export var GATEWAY_QUERY = "query TeamCard($teamId: ID!) {\n Team: team {\n team(id: $teamId) {\n ".concat(TEAM_FRAGMENT, "\n }\n }\n}");
|
|
39
39
|
export var buildGatewayQuery = function buildGatewayQuery(_ref2) {
|
|
40
40
|
var teamId = _ref2.teamId,
|
|
41
41
|
siteId = _ref2.siteId;
|
|
@@ -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.4"
|
|
42
42
|
}, attributes), {}, {
|
|
43
43
|
firedAt: Math.round(getPageTime())
|
|
44
44
|
})
|
package/dist/esm/version.json
CHANGED
|
@@ -17,6 +17,8 @@ interface AGGResult {
|
|
|
17
17
|
export declare const extractIdFromAri: (ari: string) => string;
|
|
18
18
|
export declare const idToAri: (teamId: string) => string;
|
|
19
19
|
export declare const convertTeam: (result: AGGResult) => Team;
|
|
20
|
+
export declare const GATEWAY_QUERY_V2: string;
|
|
21
|
+
export declare const GATEWAY_QUERY: string;
|
|
20
22
|
type TeamQueryVariables = {
|
|
21
23
|
teamId: string;
|
|
22
24
|
siteId?: string;
|
|
@@ -17,6 +17,8 @@ interface AGGResult {
|
|
|
17
17
|
export declare const extractIdFromAri: (ari: string) => string;
|
|
18
18
|
export declare const idToAri: (teamId: string) => string;
|
|
19
19
|
export declare const convertTeam: (result: AGGResult) => Team;
|
|
20
|
+
export declare const GATEWAY_QUERY_V2: string;
|
|
21
|
+
export declare const GATEWAY_QUERY: string;
|
|
20
22
|
type TeamQueryVariables = {
|
|
21
23
|
teamId: string;
|
|
22
24
|
siteId?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/profilecard",
|
|
3
|
-
"version": "19.5.
|
|
3
|
+
"version": "19.5.4",
|
|
4
4
|
"description": "A React component to display a card with user information.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -53,17 +53,17 @@
|
|
|
53
53
|
"@atlaskit/avatar": "^21.3.0",
|
|
54
54
|
"@atlaskit/avatar-group": "^9.3.0",
|
|
55
55
|
"@atlaskit/button": "^16.8.0",
|
|
56
|
-
"@atlaskit/dropdown-menu": "^11.
|
|
56
|
+
"@atlaskit/dropdown-menu": "^11.11.0",
|
|
57
57
|
"@atlaskit/empty-state": "^7.6.0",
|
|
58
|
-
"@atlaskit/give-kudos": "^
|
|
58
|
+
"@atlaskit/give-kudos": "^2.0.0",
|
|
59
59
|
"@atlaskit/icon": "^21.12.0",
|
|
60
60
|
"@atlaskit/lozenge": "^11.4.0",
|
|
61
61
|
"@atlaskit/menu": "^1.9.0",
|
|
62
62
|
"@atlaskit/platform-feature-flags": "^0.2.4",
|
|
63
|
-
"@atlaskit/popup": "^1.
|
|
63
|
+
"@atlaskit/popup": "^1.9.0",
|
|
64
64
|
"@atlaskit/spinner": "^15.5.0",
|
|
65
65
|
"@atlaskit/theme": "^12.5.0",
|
|
66
|
-
"@atlaskit/tokens": "^1.
|
|
66
|
+
"@atlaskit/tokens": "^1.14.0",
|
|
67
67
|
"@babel/runtime": "^7.0.0",
|
|
68
68
|
"@emotion/react": "^11.7.1",
|
|
69
69
|
"@emotion/styled": "^11.0.0",
|
|
@@ -78,6 +78,7 @@
|
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
81
|
+
"@atlassian/ptc-test-utils": "^0.6.3",
|
|
81
82
|
"@testing-library/react": "^12.1.5",
|
|
82
83
|
"enzyme": "^3.10.0",
|
|
83
84
|
"es6-promise": "^4.0.5",
|
|
@@ -0,0 +1,570 @@
|
|
|
1
|
+
## API Report File for "@atlaskit/profilecard"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
/// <reference types="react" />
|
|
8
|
+
|
|
9
|
+
import { AnalyticsEventPayload } from '@atlaskit/analytics-next';
|
|
10
|
+
import { ComponentType } from 'react';
|
|
11
|
+
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
12
|
+
import { IntlShape } from 'react-intl-next';
|
|
13
|
+
import { LRUMap } from 'lru_map';
|
|
14
|
+
import { default as React_2 } from 'react';
|
|
15
|
+
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
16
|
+
|
|
17
|
+
// @public (undocumented)
|
|
18
|
+
type AnalyticsFromDuration = (duration: number) => AnalyticsEventPayload;
|
|
19
|
+
|
|
20
|
+
// @public (undocumented)
|
|
21
|
+
type AnalyticsFunction = (generator: AnalyticsFromDuration) => void;
|
|
22
|
+
|
|
23
|
+
// @public (undocumented)
|
|
24
|
+
interface AnalyticsProps {
|
|
25
|
+
// (undocumented)
|
|
26
|
+
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// @public (undocumented)
|
|
30
|
+
export interface ApiClientResponse {
|
|
31
|
+
// (undocumented)
|
|
32
|
+
User: {
|
|
33
|
+
id: string;
|
|
34
|
+
isBot: boolean;
|
|
35
|
+
isCurrentUser: boolean;
|
|
36
|
+
avatarUrl: null | string;
|
|
37
|
+
email: null | string;
|
|
38
|
+
fullName: null | string;
|
|
39
|
+
location: null | string;
|
|
40
|
+
meta: null | string;
|
|
41
|
+
nickname: null | string;
|
|
42
|
+
companyName: null | string;
|
|
43
|
+
remoteTimeString: null | string;
|
|
44
|
+
remoteWeekdayIndex: null | string;
|
|
45
|
+
remoteWeekdayString: null | string;
|
|
46
|
+
status: StatusType;
|
|
47
|
+
statusModifiedDate: null | number;
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// @public (undocumented)
|
|
52
|
+
interface CacheConfig {
|
|
53
|
+
// (undocumented)
|
|
54
|
+
cacheMaxAge?: number;
|
|
55
|
+
// (undocumented)
|
|
56
|
+
cacheSize?: number;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// @public (undocumented)
|
|
60
|
+
interface CachedData<T> {
|
|
61
|
+
// (undocumented)
|
|
62
|
+
expire: number;
|
|
63
|
+
// (undocumented)
|
|
64
|
+
profile: T;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// @public (undocumented)
|
|
68
|
+
class CachingClient<T> {
|
|
69
|
+
constructor(config: CacheConfig);
|
|
70
|
+
// (undocumented)
|
|
71
|
+
cache: LRUMap<string, CachedData<T>> | null;
|
|
72
|
+
// (undocumented)
|
|
73
|
+
config: Required<CacheConfig>;
|
|
74
|
+
// (undocumented)
|
|
75
|
+
flushCache(): void;
|
|
76
|
+
// (undocumented)
|
|
77
|
+
getCachedProfile(cacheIdentifier: string): T | null;
|
|
78
|
+
// (undocumented)
|
|
79
|
+
setCachedProfile(cacheIdentifier: string, profile: T): void;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// @public (undocumented)
|
|
83
|
+
interface ClientOverrides {
|
|
84
|
+
// (undocumented)
|
|
85
|
+
teamCentralClient?: TeamCentralCardClient;
|
|
86
|
+
// (undocumented)
|
|
87
|
+
teamClient?: TeamProfileClient;
|
|
88
|
+
// (undocumented)
|
|
89
|
+
userClient?: UserProfileClient;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// @public (undocumented)
|
|
93
|
+
const _default: React_2.ForwardRefExoticComponent<Pick<Omit<ProfileCardResourcedProps & AnalyticsProps, keyof WithAnalyticsEventsProps>, never> & Partial<Pick<Omit<ProfileCardResourcedProps & AnalyticsProps, keyof WithAnalyticsEventsProps>, keyof ProfileCardResourcedProps>> & Partial<Pick<Partial<ProfileCardResourcedProps>, never>> & React_2.RefAttributes<any>>;
|
|
94
|
+
export default _default;
|
|
95
|
+
|
|
96
|
+
// @public (undocumented)
|
|
97
|
+
export const DELAY_MS_HIDE = 200;
|
|
98
|
+
|
|
99
|
+
// @public (undocumented)
|
|
100
|
+
export const DELAY_MS_SHOW = 800;
|
|
101
|
+
|
|
102
|
+
// @public (undocumented)
|
|
103
|
+
type FeatureFlagExtraContext = {
|
|
104
|
+
key: string;
|
|
105
|
+
value: string;
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
// @public (undocumented)
|
|
109
|
+
type LozengeColor = 'default' | 'inprogress' | 'moved' | 'new' | 'removed' | 'success';
|
|
110
|
+
|
|
111
|
+
// @public (undocumented)
|
|
112
|
+
interface LozengeProps {
|
|
113
|
+
// (undocumented)
|
|
114
|
+
appearance?: LozengeColor;
|
|
115
|
+
// (undocumented)
|
|
116
|
+
isBold?: boolean;
|
|
117
|
+
// (undocumented)
|
|
118
|
+
text: React_2.ReactNode;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// @public (undocumented)
|
|
122
|
+
export interface MessageIntlProviderProps {
|
|
123
|
+
// (undocumented)
|
|
124
|
+
children: React_2.ReactNode;
|
|
125
|
+
// (undocumented)
|
|
126
|
+
intl: IntlShape;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// @public
|
|
130
|
+
export const modifyResponse: (response: ApiClientResponse) => ProfileCardClientData;
|
|
131
|
+
|
|
132
|
+
// @public (undocumented)
|
|
133
|
+
export const ProfileCard: React_2.ForwardRefExoticComponent<Omit<ProfilecardProps & AnalyticsProps, keyof WithAnalyticsEventsProps> & React_2.RefAttributes<any>>;
|
|
134
|
+
|
|
135
|
+
// @public (undocumented)
|
|
136
|
+
export interface ProfileCardAction {
|
|
137
|
+
// (undocumented)
|
|
138
|
+
callback?: (...args: any[]) => any;
|
|
139
|
+
// (undocumented)
|
|
140
|
+
id?: string;
|
|
141
|
+
// (undocumented)
|
|
142
|
+
label: React_2.ReactNode;
|
|
143
|
+
// (undocumented)
|
|
144
|
+
link?: string;
|
|
145
|
+
// (undocumented)
|
|
146
|
+
shouldRender?: (data: any) => boolean;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// @public (undocumented)
|
|
150
|
+
export interface ProfileCardClientData {
|
|
151
|
+
// (undocumented)
|
|
152
|
+
avatarUrl?: string;
|
|
153
|
+
// (undocumented)
|
|
154
|
+
companyName?: string;
|
|
155
|
+
// (undocumented)
|
|
156
|
+
customLozenges?: LozengeProps[];
|
|
157
|
+
// (undocumented)
|
|
158
|
+
email?: string;
|
|
159
|
+
// (undocumented)
|
|
160
|
+
fullName?: string;
|
|
161
|
+
// (undocumented)
|
|
162
|
+
isBot: boolean;
|
|
163
|
+
// (undocumented)
|
|
164
|
+
isCurrentUser: boolean;
|
|
165
|
+
// (undocumented)
|
|
166
|
+
location?: string;
|
|
167
|
+
// (undocumented)
|
|
168
|
+
meta?: string;
|
|
169
|
+
// (undocumented)
|
|
170
|
+
nickname?: string;
|
|
171
|
+
// (undocumented)
|
|
172
|
+
status: StatusType;
|
|
173
|
+
// (undocumented)
|
|
174
|
+
statusModifiedDate?: null | number;
|
|
175
|
+
// (undocumented)
|
|
176
|
+
timestring?: string;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
// @public (undocumented)
|
|
180
|
+
export type ProfileCardErrorType = null | {
|
|
181
|
+
reason: 'NotFound' | 'default';
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
// @public (undocumented)
|
|
185
|
+
export interface ProfilecardProps {
|
|
186
|
+
// (undocumented)
|
|
187
|
+
actions?: ProfileCardAction[];
|
|
188
|
+
// (undocumented)
|
|
189
|
+
addFlag?: (flag: any) => void;
|
|
190
|
+
// (undocumented)
|
|
191
|
+
avatarUrl?: string;
|
|
192
|
+
// (undocumented)
|
|
193
|
+
clientFetchProfile?: () => void;
|
|
194
|
+
// (undocumented)
|
|
195
|
+
cloudId?: string;
|
|
196
|
+
// (undocumented)
|
|
197
|
+
companyName?: string;
|
|
198
|
+
// (undocumented)
|
|
199
|
+
customLozenges?: LozengeProps[];
|
|
200
|
+
// (undocumented)
|
|
201
|
+
disabledAccountMessage?: React_2.ReactNode;
|
|
202
|
+
// (undocumented)
|
|
203
|
+
email?: string;
|
|
204
|
+
// (undocumented)
|
|
205
|
+
errorType?: ProfileCardErrorType;
|
|
206
|
+
// (undocumented)
|
|
207
|
+
fullName?: string;
|
|
208
|
+
// (undocumented)
|
|
209
|
+
hasDisabledAccountLozenge?: boolean;
|
|
210
|
+
// (undocumented)
|
|
211
|
+
hasError?: boolean;
|
|
212
|
+
// (undocumented)
|
|
213
|
+
isBot?: boolean;
|
|
214
|
+
// (undocumented)
|
|
215
|
+
isCurrentUser?: boolean;
|
|
216
|
+
// (undocumented)
|
|
217
|
+
isKudosEnabled?: boolean;
|
|
218
|
+
// (undocumented)
|
|
219
|
+
isLoading?: boolean;
|
|
220
|
+
// (undocumented)
|
|
221
|
+
location?: string;
|
|
222
|
+
// (undocumented)
|
|
223
|
+
meta?: string;
|
|
224
|
+
// (undocumented)
|
|
225
|
+
nickname?: string;
|
|
226
|
+
onReportingLinesClick?: (user: ReportingLinesUser) => void;
|
|
227
|
+
// (undocumented)
|
|
228
|
+
openKudosDrawer?: () => void;
|
|
229
|
+
reportingLines?: TeamCentralReportingLinesData;
|
|
230
|
+
reportingLinesProfileUrl?: string;
|
|
231
|
+
// (undocumented)
|
|
232
|
+
status?: StatusType;
|
|
233
|
+
// (undocumented)
|
|
234
|
+
statusModifiedDate?: null | number;
|
|
235
|
+
// (undocumented)
|
|
236
|
+
teamCentralBaseUrl?: string;
|
|
237
|
+
// (undocumented)
|
|
238
|
+
timestring?: string;
|
|
239
|
+
// (undocumented)
|
|
240
|
+
userId?: string;
|
|
241
|
+
// (undocumented)
|
|
242
|
+
withoutElevation?: boolean;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
// @public (undocumented)
|
|
246
|
+
export interface ProfileCardResourcedProps {
|
|
247
|
+
// (undocumented)
|
|
248
|
+
actions?: ProfileCardAction[];
|
|
249
|
+
// (undocumented)
|
|
250
|
+
addFlag?: (flag: any) => void;
|
|
251
|
+
// (undocumented)
|
|
252
|
+
children?: React_2.ReactNode;
|
|
253
|
+
// (undocumented)
|
|
254
|
+
cloudId: string;
|
|
255
|
+
// (undocumented)
|
|
256
|
+
onReportingLinesClick?: (user: ReportingLinesUser) => void;
|
|
257
|
+
// (undocumented)
|
|
258
|
+
position?: ProfilecardTriggerPosition;
|
|
259
|
+
// (undocumented)
|
|
260
|
+
reportingLinesProfileUrl?: string;
|
|
261
|
+
// (undocumented)
|
|
262
|
+
resourceClient: ProfileClient_2;
|
|
263
|
+
// (undocumented)
|
|
264
|
+
trigger?: TriggerType;
|
|
265
|
+
// (undocumented)
|
|
266
|
+
userId: string;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
// @public (undocumented)
|
|
270
|
+
export interface ProfileCardResourcedState {
|
|
271
|
+
// (undocumented)
|
|
272
|
+
data: ProfileCardClientData | null;
|
|
273
|
+
// (undocumented)
|
|
274
|
+
error?: ProfileCardErrorType;
|
|
275
|
+
// (undocumented)
|
|
276
|
+
hasError: boolean;
|
|
277
|
+
// (undocumented)
|
|
278
|
+
isKudosEnabled?: boolean;
|
|
279
|
+
// (undocumented)
|
|
280
|
+
isLoading?: boolean;
|
|
281
|
+
// (undocumented)
|
|
282
|
+
kudosDrawerOpen: boolean;
|
|
283
|
+
// (undocumented)
|
|
284
|
+
reportingLinesData?: TeamCentralReportingLinesData;
|
|
285
|
+
// (undocumented)
|
|
286
|
+
visible?: boolean;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
// @public (undocumented)
|
|
290
|
+
export const ProfileCardTrigger: React_2.ForwardRefExoticComponent<Pick<Omit<ProfileCardTriggerProps & AnalyticsProps, keyof WithAnalyticsEventsProps>, never> & Partial<Pick<Omit<ProfileCardTriggerProps & AnalyticsProps, keyof WithAnalyticsEventsProps>, keyof ProfileCardTriggerProps>> & Partial<Pick<Partial<ProfileCardTriggerProps>, never>> & React_2.RefAttributes<any>>;
|
|
291
|
+
|
|
292
|
+
// @public (undocumented)
|
|
293
|
+
export type ProfilecardTriggerPosition = 'bottom' | 'bottom-end' | 'bottom-start' | 'left' | 'left-end' | 'left-start' | 'right' | 'right-end' | 'right-start' | 'top' | 'top-end' | 'top-start';
|
|
294
|
+
|
|
295
|
+
// @public (undocumented)
|
|
296
|
+
export interface ProfileCardTriggerProps {
|
|
297
|
+
// (undocumented)
|
|
298
|
+
actions?: ProfileCardAction[];
|
|
299
|
+
// (undocumented)
|
|
300
|
+
addFlag?: (flag: any) => void;
|
|
301
|
+
// (undocumented)
|
|
302
|
+
children?: React_2.ReactNode;
|
|
303
|
+
cloudId?: string;
|
|
304
|
+
// (undocumented)
|
|
305
|
+
onReportingLinesClick?: (user: ReportingLinesUser) => void;
|
|
306
|
+
// (undocumented)
|
|
307
|
+
position?: ProfilecardTriggerPosition;
|
|
308
|
+
// (undocumented)
|
|
309
|
+
reportingLinesProfileUrl?: string;
|
|
310
|
+
// (undocumented)
|
|
311
|
+
resourceClient: ProfileClient_2;
|
|
312
|
+
// (undocumented)
|
|
313
|
+
testId?: string;
|
|
314
|
+
// (undocumented)
|
|
315
|
+
trigger?: TriggerType;
|
|
316
|
+
// (undocumented)
|
|
317
|
+
userId: string;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
// @public (undocumented)
|
|
321
|
+
export interface ProfileCardTriggerState {
|
|
322
|
+
// (undocumented)
|
|
323
|
+
data: ProfileCardClientData | null;
|
|
324
|
+
// (undocumented)
|
|
325
|
+
error?: ProfileCardErrorType;
|
|
326
|
+
// (undocumented)
|
|
327
|
+
hasError: boolean;
|
|
328
|
+
// (undocumented)
|
|
329
|
+
isLoading?: boolean;
|
|
330
|
+
// (undocumented)
|
|
331
|
+
kudosDrawerOpen: boolean;
|
|
332
|
+
// (undocumented)
|
|
333
|
+
reportingLinesData?: TeamCentralReportingLinesData;
|
|
334
|
+
// (undocumented)
|
|
335
|
+
shouldShowGiveKudos?: boolean;
|
|
336
|
+
// (undocumented)
|
|
337
|
+
teamCentralBaseUrl?: string;
|
|
338
|
+
// (undocumented)
|
|
339
|
+
visible?: boolean;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
// @public (undocumented)
|
|
343
|
+
export class ProfileClient {
|
|
344
|
+
constructor(config: ProfileClientOptions, clients?: ClientOverrides);
|
|
345
|
+
// (undocumented)
|
|
346
|
+
flushCache(): void;
|
|
347
|
+
// (undocumented)
|
|
348
|
+
getProfile(cloudId: string, userId: string, analytics?: (event: AnalyticsEventPayload) => void): Promise<any>;
|
|
349
|
+
// (undocumented)
|
|
350
|
+
getReportingLines(userId: string): Promise<TeamCentralReportingLinesData>;
|
|
351
|
+
// (undocumented)
|
|
352
|
+
getTeamCentralBaseUrl(): string | undefined;
|
|
353
|
+
// (undocumented)
|
|
354
|
+
getTeamProfile(teamId: string, orgId?: string, analytics?: (event: AnalyticsEventPayload) => void): Promise<Team>;
|
|
355
|
+
// (undocumented)
|
|
356
|
+
shouldShowGiveKudos(): Promise<boolean>;
|
|
357
|
+
// (undocumented)
|
|
358
|
+
tcClient?: TeamCentralCardClient;
|
|
359
|
+
// (undocumented)
|
|
360
|
+
teamClient: TeamProfileClient;
|
|
361
|
+
// (undocumented)
|
|
362
|
+
userClient: UserProfileClient;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
// @public (undocumented)
|
|
366
|
+
interface ProfileClient_2 {
|
|
367
|
+
// (undocumented)
|
|
368
|
+
flushCache: () => void;
|
|
369
|
+
// (undocumented)
|
|
370
|
+
getProfile: (cloudId: string, userId: string, analytics?: (event: AnalyticsEventPayload) => void) => Promise<ProfileCardClientData>;
|
|
371
|
+
// (undocumented)
|
|
372
|
+
getReportingLines: (userId: string) => Promise<TeamCentralReportingLinesData>;
|
|
373
|
+
// (undocumented)
|
|
374
|
+
getTeamCentralBaseUrl: () => string | undefined;
|
|
375
|
+
// (undocumented)
|
|
376
|
+
getTeamProfile: (teamId: string, orgId?: string, fireAnalytics?: (event: AnalyticsEventPayload) => void) => Promise<Team>;
|
|
377
|
+
// (undocumented)
|
|
378
|
+
shouldShowGiveKudos: () => Promise<boolean>;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
// @public (undocumented)
|
|
382
|
+
export interface ProfileClientOptions {
|
|
383
|
+
// (undocumented)
|
|
384
|
+
cacheMaxAge?: number;
|
|
385
|
+
// (undocumented)
|
|
386
|
+
cacheSize?: number;
|
|
387
|
+
// (undocumented)
|
|
388
|
+
cloudId?: string;
|
|
389
|
+
// (undocumented)
|
|
390
|
+
gatewayGraphqlUrl?: string;
|
|
391
|
+
productIdentifier?: string;
|
|
392
|
+
teamCentralBaseUrl?: string;
|
|
393
|
+
teamCentralUrl?: string;
|
|
394
|
+
// (undocumented)
|
|
395
|
+
url: string;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
// @public (undocumented)
|
|
399
|
+
export type RelativeDateKeyType = 'AFewMonths' | 'LastMonth' | 'MoreThanAYear' | 'SeveralMonths' | 'ThisMonth' | 'ThisWeek' | null;
|
|
400
|
+
|
|
401
|
+
// @public (undocumented)
|
|
402
|
+
interface ReportingLinesUser {
|
|
403
|
+
// (undocumented)
|
|
404
|
+
accountIdentifier: string;
|
|
405
|
+
// (undocumented)
|
|
406
|
+
identifierType: 'ATLASSIAN_ID' | 'BASE64_HASH' | 'UNKNOWN';
|
|
407
|
+
// (undocumented)
|
|
408
|
+
pii?: ReportingLinesUserPII;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
// @public (undocumented)
|
|
412
|
+
interface ReportingLinesUserPII {
|
|
413
|
+
// (undocumented)
|
|
414
|
+
name: string;
|
|
415
|
+
// (undocumented)
|
|
416
|
+
picture?: string;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
// @public (undocumented)
|
|
420
|
+
export type StatusModifiedDateType = 'aFewMonths' | 'lastMonth' | 'moreThanAYear' | 'noDate' | 'severalMonths' | 'thisMonth' | 'thisWeek';
|
|
421
|
+
|
|
422
|
+
// @public (undocumented)
|
|
423
|
+
export type StatusType = 'active' | 'closed' | 'inactive';
|
|
424
|
+
|
|
425
|
+
// @public (undocumented)
|
|
426
|
+
export interface Team {
|
|
427
|
+
// (undocumented)
|
|
428
|
+
description: string;
|
|
429
|
+
// (undocumented)
|
|
430
|
+
displayName: string;
|
|
431
|
+
// (undocumented)
|
|
432
|
+
id: string;
|
|
433
|
+
// (undocumented)
|
|
434
|
+
largeAvatarImageUrl?: string;
|
|
435
|
+
// (undocumented)
|
|
436
|
+
largeHeaderImageUrl?: string;
|
|
437
|
+
// (undocumented)
|
|
438
|
+
members?: {
|
|
439
|
+
id: string;
|
|
440
|
+
fullName: string;
|
|
441
|
+
avatarUrl: string;
|
|
442
|
+
}[];
|
|
443
|
+
// (undocumented)
|
|
444
|
+
organizationId?: string;
|
|
445
|
+
// (undocumented)
|
|
446
|
+
smallAvatarImageUrl?: string;
|
|
447
|
+
// (undocumented)
|
|
448
|
+
smallHeaderImageUrl?: string;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
// @public (undocumented)
|
|
452
|
+
class TeamCentralCardClient extends CachingClient<TeamCentralReportingLinesData> {
|
|
453
|
+
constructor(options: TeamCentralCardClientOptions);
|
|
454
|
+
bypassOnFailure: boolean;
|
|
455
|
+
// (undocumented)
|
|
456
|
+
checkWorkspaceExists(): Promise<boolean>;
|
|
457
|
+
// (undocumented)
|
|
458
|
+
createTcReadyPromise(config: ProfileClientOptions): Promise<boolean>;
|
|
459
|
+
// (undocumented)
|
|
460
|
+
featureFlagKeys: Map<string, boolean>;
|
|
461
|
+
// (undocumented)
|
|
462
|
+
getFlagEnabled(featureKey: string, productIdentifier?: string): Promise<boolean>;
|
|
463
|
+
// (undocumented)
|
|
464
|
+
getReportingLines(userId: string): Promise<TeamCentralReportingLinesData>;
|
|
465
|
+
// (undocumented)
|
|
466
|
+
isTCReadyPromise: Promise<boolean>;
|
|
467
|
+
// (undocumented)
|
|
468
|
+
makeFeatureFlagCheckRequest(featureKey: string, context?: FeatureFlagExtraContext[]): Promise<boolean>;
|
|
469
|
+
// (undocumented)
|
|
470
|
+
makeRequest(userId: string): Promise<TeamCentralReportingLinesData>;
|
|
471
|
+
// (undocumented)
|
|
472
|
+
options: TeamCentralCardClientOptions;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
// @public (undocumented)
|
|
476
|
+
type TeamCentralCardClientOptions = ProfileClientOptions & {
|
|
477
|
+
teamCentralUrl: string;
|
|
478
|
+
};
|
|
479
|
+
|
|
480
|
+
// @public (undocumented)
|
|
481
|
+
interface TeamCentralReportingLinesData {
|
|
482
|
+
// (undocumented)
|
|
483
|
+
managers?: ReportingLinesUser[];
|
|
484
|
+
// (undocumented)
|
|
485
|
+
reports?: ReportingLinesUser[];
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
// @public (undocumented)
|
|
489
|
+
export const TeamProfileCard: (props: TeamProfilecardProps) => JSX.Element | null;
|
|
490
|
+
|
|
491
|
+
// @public (undocumented)
|
|
492
|
+
interface TeamProfilecardCoreProps {
|
|
493
|
+
actions?: ProfileCardAction[];
|
|
494
|
+
generateUserLink?: (userId: string) => string;
|
|
495
|
+
onUserClick?: (userId: string, event: React_2.MouseEvent<Element>) => void;
|
|
496
|
+
viewingUserId?: string;
|
|
497
|
+
viewProfileLink: string;
|
|
498
|
+
viewProfileOnClick?: (event?: React_2.MouseEvent<Element>) => void;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
// @public (undocumented)
|
|
502
|
+
type TeamProfileCardErrorType = null | {
|
|
503
|
+
reason: 'NotFound' | 'TEAMS_FORBIDDEN' | 'default';
|
|
504
|
+
};
|
|
505
|
+
|
|
506
|
+
// @public (undocumented)
|
|
507
|
+
interface TeamProfilecardProps extends TeamProfilecardCoreProps {
|
|
508
|
+
analytics: AnalyticsFunction;
|
|
509
|
+
clientFetchProfile?: () => void;
|
|
510
|
+
errorType?: TeamProfileCardErrorType;
|
|
511
|
+
hasError?: boolean;
|
|
512
|
+
isLoading?: boolean;
|
|
513
|
+
team?: Team;
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
// @public (undocumented)
|
|
517
|
+
export const TeamProfileCardTrigger: React_2.ForwardRefExoticComponent<Pick<Omit<TeamProfileCardTriggerProps & AnalyticsProps, keyof WithAnalyticsEventsProps>, never> & Partial<Pick<Omit<TeamProfileCardTriggerProps & AnalyticsProps, keyof WithAnalyticsEventsProps>, keyof TeamProfileCardTriggerProps>> & Partial<Pick<Partial<TeamProfileCardTriggerProps>, never>> & React_2.RefAttributes<any>>;
|
|
518
|
+
|
|
519
|
+
// @public (undocumented)
|
|
520
|
+
interface TeamProfileCardTriggerProps extends TeamProfilecardCoreProps {
|
|
521
|
+
addFlag?: (flag: any) => void;
|
|
522
|
+
children?: React_2.ReactNode;
|
|
523
|
+
cloudId?: string;
|
|
524
|
+
orgId: string;
|
|
525
|
+
position?: ProfilecardTriggerPosition;
|
|
526
|
+
resourceClient: ProfileClient_2;
|
|
527
|
+
teamId: string;
|
|
528
|
+
trigger?: 'click' | 'hover' | 'hover-click';
|
|
529
|
+
triggerLinkType?: 'clickable-link' | 'link' | 'none';
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
// @public (undocumented)
|
|
533
|
+
export class TeamProfileClient extends CachingClient<Team> {
|
|
534
|
+
constructor(options: ProfileClientOptions);
|
|
535
|
+
// (undocumented)
|
|
536
|
+
getProfile(teamId: string, orgId: string | undefined, analytics?: (event: AnalyticsEventPayload) => void): Promise<Team>;
|
|
537
|
+
// (undocumented)
|
|
538
|
+
makeRequest(teamId: string, _orgId: string | undefined): Promise<Team>;
|
|
539
|
+
// (undocumented)
|
|
540
|
+
options: ProfileClientOptions;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
// @public (undocumented)
|
|
544
|
+
export type TriggerType = 'click' | 'hover';
|
|
545
|
+
|
|
546
|
+
// @public (undocumented)
|
|
547
|
+
export class UserProfileClient extends CachingClient<any> {
|
|
548
|
+
constructor(options: ProfileClientOptions);
|
|
549
|
+
// (undocumented)
|
|
550
|
+
getProfile(cloudId: string, userId: string, analytics?: (event: AnalyticsEventPayload) => void): Promise<any>;
|
|
551
|
+
// (undocumented)
|
|
552
|
+
makeRequest(cloudId: string, userId: string): Promise<ProfileCardClientData>;
|
|
553
|
+
// (undocumented)
|
|
554
|
+
options: ProfileClientOptions;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
// @public (undocumented)
|
|
558
|
+
export function withOuterListeners<P>(Component: ComponentType<P>): React_2.ComponentClass<P & WithOuterListenersProps>;
|
|
559
|
+
|
|
560
|
+
// @public (undocumented)
|
|
561
|
+
export interface WithOuterListenersProps {
|
|
562
|
+
// (undocumented)
|
|
563
|
+
handleClickOutside?: () => void;
|
|
564
|
+
// (undocumented)
|
|
565
|
+
handleEscapeKeydown?: () => void;
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
// (No @packageDocumentation comment for this package)
|
|
569
|
+
|
|
570
|
+
```
|