@atlaskit/profilecard 19.6.0 → 19.6.1
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 +6 -0
- package/dist/cjs/client/getTeamFromAGG.js +1 -1
- package/dist/cjs/util/analytics.js +1 -1
- package/dist/es2019/client/getTeamFromAGG.js +1 -1
- package/dist/es2019/util/analytics.js +1 -1
- package/dist/esm/client/getTeamFromAGG.js +1 -1
- package/dist/esm/util/analytics.js +1 -1
- package/package.json +3 -3
- package/dist/types-ts4.5/client/CachingClient.d.ts +0 -18
- package/dist/types-ts4.5/client/ProfileCardClient.d.ts +0 -18
- package/dist/types-ts4.5/client/TeamCentralCardClient.d.ts +0 -45
- package/dist/types-ts4.5/client/TeamProfileCardClient.d.ts +0 -9
- package/dist/types-ts4.5/client/UserProfileCardClient.d.ts +0 -30
- package/dist/types-ts4.5/client/errorUtils.d.ts +0 -5
- package/dist/types-ts4.5/client/getTeamFromAGG.d.ts +0 -35
- package/dist/types-ts4.5/client/graphqlUtils.d.ts +0 -31
- package/dist/types-ts4.5/client/index.d.ts +0 -6
- package/dist/types-ts4.5/client/types.d.ts +0 -12
- package/dist/types-ts4.5/components/Error/AccessLockSVG.d.ts +0 -3
- package/dist/types-ts4.5/components/Error/ErrorBoundary.d.ts +0 -10
- package/dist/types-ts4.5/components/Error/ErrorIllustration.d.ts +0 -2
- package/dist/types-ts4.5/components/Error/ErrorMessage.d.ts +0 -10
- package/dist/types-ts4.5/components/Error/index.d.ts +0 -3
- package/dist/types-ts4.5/components/Icon/IconLabel.d.ts +0 -12
- package/dist/types-ts4.5/components/Icon/index.d.ts +0 -1
- package/dist/types-ts4.5/components/Team/TeamForbiddenErrorState.d.ts +0 -6
- package/dist/types-ts4.5/components/Team/TeamLoadingState.d.ts +0 -6
- package/dist/types-ts4.5/components/Team/TeamProfileCard.d.ts +0 -4
- package/dist/types-ts4.5/components/Team/TeamProfileCardTrigger.d.ts +0 -50
- package/dist/types-ts4.5/components/Team/index.d.ts +0 -4
- package/dist/types-ts4.5/components/Team/lazyTeamProfileCard.d.ts +0 -2
- package/dist/types-ts4.5/components/User/OverflowProfileCardButtons.d.ts +0 -9
- package/dist/types-ts4.5/components/User/ProfileCard.d.ts +0 -5
- package/dist/types-ts4.5/components/User/ProfileCardDetails.d.ts +0 -3
- package/dist/types-ts4.5/components/User/ProfileCardResourced.d.ts +0 -22
- package/dist/types-ts4.5/components/User/ProfileCardTrigger.d.ts +0 -4
- package/dist/types-ts4.5/components/User/ReportingLinesDetails.d.ts +0 -5
- package/dist/types-ts4.5/components/User/UserLoadingState.d.ts +0 -7
- package/dist/types-ts4.5/components/User/index.d.ts +0 -4
- package/dist/types-ts4.5/components/User/lazyProfileCard.d.ts +0 -2
- package/dist/types-ts4.5/i18n/cs.d.ts +0 -41
- package/dist/types-ts4.5/i18n/da.d.ts +0 -41
- package/dist/types-ts4.5/i18n/de.d.ts +0 -41
- package/dist/types-ts4.5/i18n/en.d.ts +0 -41
- package/dist/types-ts4.5/i18n/en_GB.d.ts +0 -41
- package/dist/types-ts4.5/i18n/en_ZZ.d.ts +0 -41
- package/dist/types-ts4.5/i18n/es.d.ts +0 -41
- package/dist/types-ts4.5/i18n/et.d.ts +0 -27
- package/dist/types-ts4.5/i18n/fi.d.ts +0 -41
- package/dist/types-ts4.5/i18n/fr.d.ts +0 -41
- package/dist/types-ts4.5/i18n/hu.d.ts +0 -41
- package/dist/types-ts4.5/i18n/index.d.ts +0 -36
- package/dist/types-ts4.5/i18n/is.d.ts +0 -27
- package/dist/types-ts4.5/i18n/it.d.ts +0 -41
- package/dist/types-ts4.5/i18n/ja.d.ts +0 -41
- package/dist/types-ts4.5/i18n/ko.d.ts +0 -41
- package/dist/types-ts4.5/i18n/languages.d.ts +0 -33
- package/dist/types-ts4.5/i18n/nb.d.ts +0 -41
- package/dist/types-ts4.5/i18n/nl.d.ts +0 -41
- package/dist/types-ts4.5/i18n/pl.d.ts +0 -41
- package/dist/types-ts4.5/i18n/pt_BR.d.ts +0 -41
- package/dist/types-ts4.5/i18n/pt_PT.d.ts +0 -27
- package/dist/types-ts4.5/i18n/ro.d.ts +0 -27
- package/dist/types-ts4.5/i18n/ru.d.ts +0 -41
- package/dist/types-ts4.5/i18n/sk.d.ts +0 -27
- package/dist/types-ts4.5/i18n/sv.d.ts +0 -41
- package/dist/types-ts4.5/i18n/th.d.ts +0 -41
- package/dist/types-ts4.5/i18n/tr.d.ts +0 -41
- package/dist/types-ts4.5/i18n/uk.d.ts +0 -41
- package/dist/types-ts4.5/i18n/vi.d.ts +0 -41
- package/dist/types-ts4.5/i18n/zh.d.ts +0 -41
- package/dist/types-ts4.5/i18n/zh_TW.d.ts +0 -41
- package/dist/types-ts4.5/index.d.ts +0 -18
- package/dist/types-ts4.5/internal/filterActions.d.ts +0 -3
- package/dist/types-ts4.5/internal/relative-date.d.ts +0 -3
- package/dist/types-ts4.5/messages.d.ts +0 -163
- package/dist/types-ts4.5/mocks/index.d.ts +0 -4
- package/dist/types-ts4.5/mocks/mock-profile-client.d.ts +0 -1
- package/dist/types-ts4.5/mocks/mock-team-client.d.ts +0 -8
- package/dist/types-ts4.5/mocks/profile-data.d.ts +0 -41
- package/dist/types-ts4.5/mocks/reporting-lines-data.d.ts +0 -2
- package/dist/types-ts4.5/mocks/simple-mock-clients.d.ts +0 -14
- package/dist/types-ts4.5/mocks/team-data.d.ts +0 -7
- package/dist/types-ts4.5/mocks/util.d.ts +0 -6
- package/dist/types-ts4.5/styled/Card.d.ts +0 -99
- package/dist/types-ts4.5/styled/Error.d.ts +0 -21
- package/dist/types-ts4.5/styled/ReportingLines.d.ts +0 -21
- package/dist/types-ts4.5/styled/TeamCard.d.ts +0 -64
- package/dist/types-ts4.5/styled/constants.d.ts +0 -13
- package/dist/types-ts4.5/types.d.ts +0 -358
- package/dist/types-ts4.5/util/analytics.d.ts +0 -59
- package/dist/types-ts4.5/util/click.d.ts +0 -4
- package/dist/types-ts4.5/util/config.d.ts +0 -2
- package/dist/types-ts4.5/util/errors.d.ts +0 -43
- package/dist/types-ts4.5/util/performance.d.ts +0 -1
- package/dist/types-ts4.5/util/withOuterListeners.d.ts +0 -6
- package/tmp/api-report-tmp.d.ts +0 -570
|
@@ -1,358 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { IntlShape } from 'react-intl-next';
|
|
3
|
-
import { AnalyticsEventPayload, CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
4
|
-
import TeamCentralCardClient from './client/TeamCentralCardClient';
|
|
5
|
-
import TeamProfileCardClient from './client/TeamProfileCardClient';
|
|
6
|
-
import UserProfileCardClient from './client/UserProfileCardClient';
|
|
7
|
-
export interface ApiClientResponse {
|
|
8
|
-
User: {
|
|
9
|
-
id: string;
|
|
10
|
-
isBot: boolean;
|
|
11
|
-
isCurrentUser: boolean;
|
|
12
|
-
avatarUrl: string | null;
|
|
13
|
-
email: string | null;
|
|
14
|
-
fullName: string | null;
|
|
15
|
-
location: string | null;
|
|
16
|
-
meta: string | null;
|
|
17
|
-
nickname: string | null;
|
|
18
|
-
companyName: string | null;
|
|
19
|
-
remoteTimeString: string | null;
|
|
20
|
-
remoteWeekdayIndex: string | null;
|
|
21
|
-
remoteWeekdayString: string | null;
|
|
22
|
-
status: StatusType;
|
|
23
|
-
statusModifiedDate: number | null;
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
export interface Team {
|
|
27
|
-
largeAvatarImageUrl?: string;
|
|
28
|
-
smallAvatarImageUrl?: string;
|
|
29
|
-
largeHeaderImageUrl?: string;
|
|
30
|
-
smallHeaderImageUrl?: string;
|
|
31
|
-
id: string;
|
|
32
|
-
displayName: string;
|
|
33
|
-
description: string;
|
|
34
|
-
organizationId?: string;
|
|
35
|
-
members?: {
|
|
36
|
-
id: string;
|
|
37
|
-
fullName: string;
|
|
38
|
-
avatarUrl: string;
|
|
39
|
-
}[];
|
|
40
|
-
}
|
|
41
|
-
export interface ProfileCardClientData {
|
|
42
|
-
isBot: boolean;
|
|
43
|
-
isCurrentUser: boolean;
|
|
44
|
-
avatarUrl?: string;
|
|
45
|
-
email?: string;
|
|
46
|
-
fullName?: string;
|
|
47
|
-
location?: string;
|
|
48
|
-
meta?: string;
|
|
49
|
-
nickname?: string;
|
|
50
|
-
companyName?: string;
|
|
51
|
-
timestring?: string;
|
|
52
|
-
status: StatusType;
|
|
53
|
-
statusModifiedDate?: number | null;
|
|
54
|
-
customLozenges?: LozengeProps[];
|
|
55
|
-
}
|
|
56
|
-
export interface ReportingLinesUserPII {
|
|
57
|
-
name: string;
|
|
58
|
-
picture?: string;
|
|
59
|
-
}
|
|
60
|
-
export interface ReportingLinesUser {
|
|
61
|
-
accountIdentifier: string;
|
|
62
|
-
identifierType: 'ATLASSIAN_ID' | 'BASE64_HASH' | 'UNKNOWN';
|
|
63
|
-
pii?: ReportingLinesUserPII;
|
|
64
|
-
}
|
|
65
|
-
export interface TeamCentralReportingLinesData {
|
|
66
|
-
managers?: ReportingLinesUser[];
|
|
67
|
-
reports?: ReportingLinesUser[];
|
|
68
|
-
}
|
|
69
|
-
export interface ProfileCardResourcedProps {
|
|
70
|
-
userId: string;
|
|
71
|
-
cloudId: string;
|
|
72
|
-
resourceClient: ProfileClient;
|
|
73
|
-
actions?: ProfileCardAction[];
|
|
74
|
-
reportingLinesProfileUrl?: string;
|
|
75
|
-
onReportingLinesClick?: (user: ReportingLinesUser) => void;
|
|
76
|
-
position?: ProfilecardTriggerPosition;
|
|
77
|
-
trigger?: TriggerType;
|
|
78
|
-
children?: React.ReactNode;
|
|
79
|
-
addFlag?: (flag: any) => void;
|
|
80
|
-
}
|
|
81
|
-
export interface ProfileCardResourcedState {
|
|
82
|
-
visible?: boolean;
|
|
83
|
-
isLoading?: boolean;
|
|
84
|
-
hasError: boolean;
|
|
85
|
-
error?: ProfileCardErrorType;
|
|
86
|
-
data: ProfileCardClientData | null;
|
|
87
|
-
reportingLinesData?: TeamCentralReportingLinesData;
|
|
88
|
-
isKudosEnabled?: boolean;
|
|
89
|
-
kudosDrawerOpen: boolean;
|
|
90
|
-
}
|
|
91
|
-
export interface ProfileCardTriggerProps {
|
|
92
|
-
userId: string;
|
|
93
|
-
/**
|
|
94
|
-
A cloudId can be provided, and we'll verify that the target userId is an
|
|
95
|
-
actual user in the specified site.
|
|
96
|
-
|
|
97
|
-
Instead you can omit the cloudId and we won't do such a check.
|
|
98
|
-
|
|
99
|
-
If you have a cloudId and only want to show users who are in that site
|
|
100
|
-
then please provide it. If you're a site-less product or don't care about
|
|
101
|
-
verifying that the shown user is in a particular site, don't provide a
|
|
102
|
-
cloudId.
|
|
103
|
-
*/
|
|
104
|
-
cloudId?: string;
|
|
105
|
-
resourceClient: ProfileClient;
|
|
106
|
-
actions?: ProfileCardAction[];
|
|
107
|
-
reportingLinesProfileUrl?: string;
|
|
108
|
-
onReportingLinesClick?: (user: ReportingLinesUser) => void;
|
|
109
|
-
position?: ProfilecardTriggerPosition;
|
|
110
|
-
trigger?: TriggerType;
|
|
111
|
-
children?: React.ReactNode;
|
|
112
|
-
testId?: string;
|
|
113
|
-
addFlag?: (flag: any) => void;
|
|
114
|
-
}
|
|
115
|
-
export interface ProfileCardTriggerState {
|
|
116
|
-
visible?: boolean;
|
|
117
|
-
isLoading?: boolean;
|
|
118
|
-
hasError: boolean;
|
|
119
|
-
error?: ProfileCardErrorType;
|
|
120
|
-
data: ProfileCardClientData | null;
|
|
121
|
-
reportingLinesData?: TeamCentralReportingLinesData;
|
|
122
|
-
shouldShowGiveKudos?: boolean;
|
|
123
|
-
teamCentralBaseUrl?: string;
|
|
124
|
-
kudosDrawerOpen: boolean;
|
|
125
|
-
}
|
|
126
|
-
export interface TeamProfileCardTriggerState {
|
|
127
|
-
visible?: boolean;
|
|
128
|
-
isLoading?: boolean;
|
|
129
|
-
hasError: boolean;
|
|
130
|
-
error?: any;
|
|
131
|
-
data: Team | null;
|
|
132
|
-
renderError?: boolean;
|
|
133
|
-
shouldShowGiveKudos?: boolean;
|
|
134
|
-
teamCentralBaseUrl?: string;
|
|
135
|
-
kudosDrawerOpen: boolean;
|
|
136
|
-
}
|
|
137
|
-
export interface TeamProfilecardCoreProps {
|
|
138
|
-
/**
|
|
139
|
-
The id of the user viewing the profile card.
|
|
140
|
-
|
|
141
|
-
This is used to determine whether to say that the member count is
|
|
142
|
-
"including you" or not.
|
|
143
|
-
*/
|
|
144
|
-
viewingUserId?: string;
|
|
145
|
-
/**
|
|
146
|
-
A list of extra buttons to be displayed at the bottom of the card.
|
|
147
|
-
View Profile is always included by default.
|
|
148
|
-
*/
|
|
149
|
-
actions?: ProfileCardAction[];
|
|
150
|
-
/**
|
|
151
|
-
A function allowing products to provide an href for the user avatars in the
|
|
152
|
-
profilecard, e.g. so they can link to user's profile pages.
|
|
153
|
-
*/
|
|
154
|
-
generateUserLink?: (userId: string) => string;
|
|
155
|
-
/**
|
|
156
|
-
A function allowing products to provide an onClick handler for when the
|
|
157
|
-
user clicks on a user's avatar or avatar group item.
|
|
158
|
-
*/
|
|
159
|
-
onUserClick?: (userId: string, event: React.MouseEvent<Element>) => void;
|
|
160
|
-
/**
|
|
161
|
-
This should be a link to the team's profile page. This will be used for:
|
|
162
|
-
|
|
163
|
-
- Wrapping the trigger in a link to the team profile page (unless
|
|
164
|
-
triggerLinkType is `none`).
|
|
165
|
-
|
|
166
|
-
- Providing the link for the View Profile action button on the card.
|
|
167
|
-
*/
|
|
168
|
-
viewProfileLink: string;
|
|
169
|
-
/**
|
|
170
|
-
An onClick action that navigates to the team's profile page. Something you
|
|
171
|
-
may want, e.g. for an SPA site or tracking analytics of navigation. This
|
|
172
|
-
is optional, just the viewProfileLink will suffice. Will be used for:
|
|
173
|
-
|
|
174
|
-
- Adding an onClick to the trigger if the triggerLinkType is
|
|
175
|
-
`clickable-link`.
|
|
176
|
-
|
|
177
|
-
- Providing an onClick for the View Profile action button on the card.
|
|
178
|
-
*/
|
|
179
|
-
viewProfileOnClick?: (event?: React.MouseEvent<Element>) => void;
|
|
180
|
-
}
|
|
181
|
-
export interface TeamProfileCardTriggerProps extends TeamProfilecardCoreProps {
|
|
182
|
-
/** The id of the team. */
|
|
183
|
-
teamId: string;
|
|
184
|
-
/**
|
|
185
|
-
The id of the organization that the team belongs to.
|
|
186
|
-
Currently this is unused, but will become necessary in the future.
|
|
187
|
-
*/
|
|
188
|
-
orgId: string;
|
|
189
|
-
/** An instance of ProfileClient. */
|
|
190
|
-
resourceClient: ProfileClient;
|
|
191
|
-
/**
|
|
192
|
-
The position relative to the trigger that the card should be displayed in.
|
|
193
|
-
*/
|
|
194
|
-
position?: ProfilecardTriggerPosition;
|
|
195
|
-
/**
|
|
196
|
-
The interaction method used to trigger the team profile card to appear.
|
|
197
|
-
|
|
198
|
-
- Click is generally recommended, but your needs may vary.
|
|
199
|
-
|
|
200
|
-
- Hover works for mouse users, but does not support those who use a
|
|
201
|
-
keyboard or screen reader, avoid using this if it's possible or makes
|
|
202
|
-
sense.
|
|
203
|
-
|
|
204
|
-
- Hover-click is usable for scenarios like inline-edits, where mouse users
|
|
205
|
-
cannot click on the trigger without causing side effects, but keyboard
|
|
206
|
-
users are still able to navigate into and trigger the profile card.
|
|
207
|
-
|
|
208
|
-
Look at the "Team Profilecard Trigger" or "Trigger Link Types" examples to
|
|
209
|
-
see how they behave, or ask in #help-people-and-teams-xpc on Slack for our
|
|
210
|
-
recommendations.
|
|
211
|
-
*/
|
|
212
|
-
trigger?: 'hover' | 'click' | 'hover-click';
|
|
213
|
-
/**
|
|
214
|
-
We generally prefer to wrap the trigger in a link to the team profile
|
|
215
|
-
page. This prop determines how that link behaves.
|
|
216
|
-
|
|
217
|
-
- Link is generally the recommended prop (especially in combination with
|
|
218
|
-
click or hover-click for the trigger prop above). It wraps the trigger in
|
|
219
|
-
an anchor tag with the team profile link (that users can interact with
|
|
220
|
-
via middle-click, etc.), but left clicking on the link is suppressed.
|
|
221
|
-
|
|
222
|
-
- None does not wrap the trigger in a link at all. This makes it difficult
|
|
223
|
-
for keyboard or screen reader users to know how to trigger the profile
|
|
224
|
-
card. Generally avoid this.
|
|
225
|
-
|
|
226
|
-
- Clickable-link wraps the trigger in a link with no special behaviour.
|
|
227
|
-
This is suitable for places where you want the trigger to serve primarily
|
|
228
|
-
as a link, and optionally allow hovering to preview the team first.
|
|
229
|
-
|
|
230
|
-
Look at the example on "Trigger Link Types" for more in-depth analysis, or
|
|
231
|
-
ask in #help-people-and-teams-xpc on Slack for our recommendations.
|
|
232
|
-
*/
|
|
233
|
-
triggerLinkType?: 'none' | 'link' | 'clickable-link';
|
|
234
|
-
/**
|
|
235
|
-
This is the component that will cause a team profile card to appear when
|
|
236
|
-
interacted with according to the method specified by the trigger prop.
|
|
237
|
-
*/
|
|
238
|
-
children?: React.ReactNode;
|
|
239
|
-
/**
|
|
240
|
-
* Used by the card to show Flags.
|
|
241
|
-
*/
|
|
242
|
-
addFlag?: (flag: any) => void;
|
|
243
|
-
/**
|
|
244
|
-
* Optional cloudId. Pass this if rendering card within a sited context.
|
|
245
|
-
*/
|
|
246
|
-
cloudId?: string;
|
|
247
|
-
}
|
|
248
|
-
export type StatusType = 'active' | 'inactive' | 'closed';
|
|
249
|
-
export type TriggerType = 'hover' | 'click';
|
|
250
|
-
export type StatusModifiedDateType = 'noDate' | 'thisWeek' | 'thisMonth' | 'lastMonth' | 'aFewMonths' | 'severalMonths' | 'moreThanAYear';
|
|
251
|
-
export interface ProfileCardAction {
|
|
252
|
-
callback?: (...args: any[]) => any;
|
|
253
|
-
shouldRender?: (data: any) => boolean;
|
|
254
|
-
id?: string;
|
|
255
|
-
label: React.ReactNode;
|
|
256
|
-
link?: string;
|
|
257
|
-
}
|
|
258
|
-
export type LozengeColor = 'default' | 'success' | 'removed' | 'inprogress' | 'new' | 'moved';
|
|
259
|
-
export interface LozengeProps {
|
|
260
|
-
text: React.ReactNode;
|
|
261
|
-
appearance?: LozengeColor;
|
|
262
|
-
isBold?: boolean;
|
|
263
|
-
}
|
|
264
|
-
export interface ProfilecardProps {
|
|
265
|
-
isLoading?: boolean;
|
|
266
|
-
hasError?: boolean;
|
|
267
|
-
errorType?: ProfileCardErrorType;
|
|
268
|
-
status?: StatusType;
|
|
269
|
-
isBot?: boolean;
|
|
270
|
-
avatarUrl?: string;
|
|
271
|
-
fullName?: string;
|
|
272
|
-
meta?: string;
|
|
273
|
-
userId?: string;
|
|
274
|
-
isCurrentUser?: boolean;
|
|
275
|
-
nickname?: string;
|
|
276
|
-
email?: string;
|
|
277
|
-
location?: string;
|
|
278
|
-
companyName?: string;
|
|
279
|
-
timestring?: string;
|
|
280
|
-
actions?: ProfileCardAction[];
|
|
281
|
-
clientFetchProfile?: () => void;
|
|
282
|
-
statusModifiedDate?: number | null;
|
|
283
|
-
withoutElevation?: boolean;
|
|
284
|
-
/** Show manager and direct reports section on profile hover card, if available */
|
|
285
|
-
reportingLines?: TeamCentralReportingLinesData;
|
|
286
|
-
/** Base URL to populate href value for manager's and direct reports' user avatar */
|
|
287
|
-
reportingLinesProfileUrl?: string;
|
|
288
|
-
/** Click handler when user clicks on manager's and direct reports' user avatar, un-clickable otherwise */
|
|
289
|
-
onReportingLinesClick?: (user: ReportingLinesUser) => void;
|
|
290
|
-
isKudosEnabled?: boolean;
|
|
291
|
-
teamCentralBaseUrl?: string;
|
|
292
|
-
addFlag?: (flag: any) => void;
|
|
293
|
-
cloudId?: string;
|
|
294
|
-
disabledAccountMessage?: React.ReactNode;
|
|
295
|
-
hasDisabledAccountLozenge?: boolean;
|
|
296
|
-
customLozenges?: LozengeProps[];
|
|
297
|
-
openKudosDrawer?: () => void;
|
|
298
|
-
}
|
|
299
|
-
export type AnalyticsFromDuration = (duration: number) => AnalyticsEventPayload;
|
|
300
|
-
export type AnalyticsFunction = (generator: AnalyticsFromDuration) => void;
|
|
301
|
-
export interface AnalyticsProps {
|
|
302
|
-
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
303
|
-
}
|
|
304
|
-
export interface AnalyticsWithDurationProps {
|
|
305
|
-
fireAnalyticsWithDuration: AnalyticsFunction;
|
|
306
|
-
}
|
|
307
|
-
export interface TeamProfilecardProps extends TeamProfilecardCoreProps {
|
|
308
|
-
/** Indicates whether the team's details are still loading. */
|
|
309
|
-
isLoading?: boolean;
|
|
310
|
-
/** Indicates whether an error occurred whilst fetching team details. */
|
|
311
|
-
hasError?: boolean;
|
|
312
|
-
/** Describes the type of error that occurred, if any. */
|
|
313
|
-
errorType?: TeamProfileCardErrorType;
|
|
314
|
-
/** The details of the team to be shown. */
|
|
315
|
-
team?: Team;
|
|
316
|
-
/** A callback that will try to re-fetch data in case an error occurred. */
|
|
317
|
-
clientFetchProfile?: () => void;
|
|
318
|
-
/** Details relevant to passing around analytics. */
|
|
319
|
-
analytics: AnalyticsFunction;
|
|
320
|
-
}
|
|
321
|
-
export interface MessageIntlProviderProps {
|
|
322
|
-
children: React.ReactNode;
|
|
323
|
-
intl: IntlShape;
|
|
324
|
-
}
|
|
325
|
-
export type RelativeDateKeyType = 'ThisWeek' | 'ThisMonth' | 'LastMonth' | 'AFewMonths' | 'SeveralMonths' | 'MoreThanAYear' | null;
|
|
326
|
-
export interface ProfileClient {
|
|
327
|
-
flushCache: () => void;
|
|
328
|
-
getProfile: (cloudId: string, userId: string, analytics?: (event: AnalyticsEventPayload) => void) => Promise<ProfileCardClientData>;
|
|
329
|
-
getTeamProfile: (teamId: string, orgId?: string, fireAnalytics?: (event: AnalyticsEventPayload) => void) => Promise<Team>;
|
|
330
|
-
getReportingLines: (userId: string) => Promise<TeamCentralReportingLinesData>;
|
|
331
|
-
shouldShowGiveKudos: () => Promise<boolean>;
|
|
332
|
-
getTeamCentralBaseUrl: () => string | undefined;
|
|
333
|
-
}
|
|
334
|
-
export type ProfilecardTriggerPosition = 'bottom-start' | 'bottom' | 'bottom-end' | 'left-start' | 'left' | 'left-end' | 'top-end' | 'top' | 'top-start' | 'right-end' | 'right' | 'right-start';
|
|
335
|
-
export type ProfileCardErrorType = {
|
|
336
|
-
reason: 'default' | 'NotFound';
|
|
337
|
-
} | null;
|
|
338
|
-
export type TeamProfileCardErrorType = {
|
|
339
|
-
reason: 'default' | 'NotFound' | 'TEAMS_FORBIDDEN';
|
|
340
|
-
} | null;
|
|
341
|
-
export interface ProfileClientOptions {
|
|
342
|
-
url: string;
|
|
343
|
-
gatewayGraphqlUrl?: string;
|
|
344
|
-
cacheSize?: number;
|
|
345
|
-
cacheMaxAge?: number;
|
|
346
|
-
/** Enables Team Central functionality if enabled e.g. /gateway/api/watermelon/graphql*/
|
|
347
|
-
teamCentralUrl?: string;
|
|
348
|
-
/** URL to the Team Central app e.g. team.atlassian.com */
|
|
349
|
-
teamCentralBaseUrl?: string;
|
|
350
|
-
/** Name of integrating product e.g. jira, atlas, confluence **/
|
|
351
|
-
productIdentifier?: string;
|
|
352
|
-
cloudId?: string;
|
|
353
|
-
}
|
|
354
|
-
export interface ClientOverrides {
|
|
355
|
-
userClient?: UserProfileCardClient;
|
|
356
|
-
teamClient?: TeamProfileCardClient;
|
|
357
|
-
teamCentralClient?: TeamCentralCardClient;
|
|
358
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { AnalyticsEventPayload } from '@atlaskit/analytics-next';
|
|
2
|
-
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
|
|
3
|
-
import { ErrorAttributes } from '../client/types';
|
|
4
|
-
type GenericAttributes = Record<string, string | number | boolean | undefined | string[]> | ErrorAttributes;
|
|
5
|
-
interface AnalyticsEvent {
|
|
6
|
-
action?: string;
|
|
7
|
-
actionSubject?: string;
|
|
8
|
-
actionSubjectId?: string;
|
|
9
|
-
attributes?: GenericAttributes;
|
|
10
|
-
name?: string;
|
|
11
|
-
source?: string;
|
|
12
|
-
}
|
|
13
|
-
export declare const fireEvent: (createAnalyticsEvent: CreateUIAnalyticsEvent | undefined, body: AnalyticsEvent) => void;
|
|
14
|
-
export declare const cardTriggered: (type: 'user' | 'team', method: 'hover' | 'click') => AnalyticsEventPayload;
|
|
15
|
-
export declare const teamRequestAnalytics: (action: 'triggered' | 'succeeded' | 'failed', attributes?: {
|
|
16
|
-
duration: number;
|
|
17
|
-
} & GenericAttributes) => AnalyticsEventPayload;
|
|
18
|
-
export declare const userRequestAnalytics: (action: 'triggered' | 'succeeded' | 'failed', attributes?: {
|
|
19
|
-
duration: number;
|
|
20
|
-
} & GenericAttributes) => AnalyticsEventPayload;
|
|
21
|
-
export declare const profileCardRendered: (type: 'user' | 'team', actionSubjectId: 'spinner' | 'content' | 'error' | 'errorBoundary', attributes?: {
|
|
22
|
-
duration?: number;
|
|
23
|
-
errorType?: 'default' | 'NotFound';
|
|
24
|
-
hasRetry?: boolean;
|
|
25
|
-
numActions?: number;
|
|
26
|
-
memberCount?: number;
|
|
27
|
-
includingYou?: boolean;
|
|
28
|
-
descriptionLength?: number;
|
|
29
|
-
titleLength?: number;
|
|
30
|
-
}) => AnalyticsEventPayload;
|
|
31
|
-
export declare const actionClicked: (type: 'user' | 'team', attributes: {
|
|
32
|
-
duration: number;
|
|
33
|
-
hasHref: boolean;
|
|
34
|
-
hasOnClick: boolean;
|
|
35
|
-
index: number;
|
|
36
|
-
actionId: string;
|
|
37
|
-
}) => AnalyticsEventPayload;
|
|
38
|
-
export declare const reportingLinesClicked: (attributes: {
|
|
39
|
-
userType: 'manager' | 'direct-report';
|
|
40
|
-
duration: number;
|
|
41
|
-
}) => AnalyticsEventPayload;
|
|
42
|
-
export declare const moreActionsClicked: (type: 'user' | 'team', attributes: {
|
|
43
|
-
duration: number;
|
|
44
|
-
numActions: number;
|
|
45
|
-
}) => AnalyticsEventPayload;
|
|
46
|
-
export declare const teamAvatarClicked: (attributes: {
|
|
47
|
-
duration: number;
|
|
48
|
-
hasHref: boolean;
|
|
49
|
-
hasOnClick: boolean;
|
|
50
|
-
index: number;
|
|
51
|
-
}) => AnalyticsEventPayload;
|
|
52
|
-
export declare const moreMembersClicked: (attributes: {
|
|
53
|
-
duration: number;
|
|
54
|
-
memberCount: number;
|
|
55
|
-
}) => AnalyticsEventPayload;
|
|
56
|
-
export declare const errorRetryClicked: (attributes: {
|
|
57
|
-
duration: number;
|
|
58
|
-
}) => AnalyticsEventPayload;
|
|
59
|
-
export {};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
export declare class HttpError extends Error {
|
|
2
|
-
code: number;
|
|
3
|
-
traceId?: string | null;
|
|
4
|
-
constructor(code: number, reason: string, traceId?: string | null);
|
|
5
|
-
}
|
|
6
|
-
type KnownErrorExtensions = {
|
|
7
|
-
errorNumber?: number;
|
|
8
|
-
};
|
|
9
|
-
type ErrorExtensions = KnownErrorExtensions & Record<string, any>;
|
|
10
|
-
type ErrorCategory = 'NotFound' | 'NotPermitted' | 'MalformedInput' | 'Internal' | 'Gone';
|
|
11
|
-
export declare class DirectoryGraphQLError extends Error {
|
|
12
|
-
category: ErrorCategory;
|
|
13
|
-
type: string;
|
|
14
|
-
path: string;
|
|
15
|
-
errorNumber?: number;
|
|
16
|
-
extensions: Record<string, any>;
|
|
17
|
-
constructor(message: string, category: ErrorCategory, type: string, extensions?: ErrorExtensions, path?: (string | number)[]);
|
|
18
|
-
}
|
|
19
|
-
export declare class DirectoryGraphQLErrors extends Error {
|
|
20
|
-
errors: DirectoryGraphQLError[];
|
|
21
|
-
traceId?: string | null;
|
|
22
|
-
constructor(errors: unknown, traceId: string | null);
|
|
23
|
-
}
|
|
24
|
-
type KnownAggErrorExtensions = {
|
|
25
|
-
statusCode?: number;
|
|
26
|
-
errorType?: string;
|
|
27
|
-
classification?: string;
|
|
28
|
-
};
|
|
29
|
-
type AggErrorExtensions = KnownAggErrorExtensions & Record<string, any>;
|
|
30
|
-
export declare class AGGError extends Error {
|
|
31
|
-
path: string;
|
|
32
|
-
extensions: Record<string, any>;
|
|
33
|
-
statusCode?: number;
|
|
34
|
-
errorType?: string;
|
|
35
|
-
classification?: string;
|
|
36
|
-
constructor(message: string, extensions: AggErrorExtensions, path?: (string | number)[]);
|
|
37
|
-
}
|
|
38
|
-
export declare class AGGErrors extends Error {
|
|
39
|
-
errors: AGGError[];
|
|
40
|
-
traceId?: string | null;
|
|
41
|
-
constructor(errors: unknown, traceId: string | null);
|
|
42
|
-
}
|
|
43
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getPageTime: () => number;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import React, { ComponentType } from 'react';
|
|
2
|
-
export interface WithOuterListenersProps {
|
|
3
|
-
handleClickOutside?: () => void;
|
|
4
|
-
handleEscapeKeydown?: () => void;
|
|
5
|
-
}
|
|
6
|
-
export default function withOuterListeners<P>(Component: ComponentType<P>): React.ComponentClass<P & WithOuterListenersProps>;
|