@atlaskit/profilecard 19.5.1 → 19.5.2

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/profilecard
2
2
 
3
+ ## 19.5.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`0c6a7acba8d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/0c6a7acba8d) - Resolved an issue with the team profile card query having invalid formatting
8
+
3
9
  ## 19.5.1
4
10
 
5
11
  ### Patch Changes
package/compass.yml ADDED
@@ -0,0 +1,44 @@
1
+
2
+ name: People and Teams - Profile Cards
3
+ id: 'ari:cloud:compass:a436116f-02ce-4520-8fbb-7301462a1674:component/c5751cc6-3513-4070-9deb-af31e86aed34/f12dd953-cb83-45a4-a2c1-828463209fc5'
4
+ description: A React component to display a card with user information.
5
+ configVersion: 1
6
+ typeId: UI_ELEMENT
7
+ ownerId: 'ari:cloud:teams::team/229da7a2-bf93-4813-9e24-a6efbd2d445e'
8
+ fields:
9
+ tier: 2
10
+ links:
11
+ - name: null
12
+ type: REPOSITORY
13
+ url: 'https://bitbucket.org/atlassian/atlassian-frontend/src/master/packages/people-and-teams/profilecard/'
14
+ - name: '#pt-team-collective'
15
+ type: CHAT_CHANNEL
16
+ url: 'https://atlassian.slack.com/app_redirect?channel=pt-team-collective'
17
+ - name: ''
18
+ type: ON_CALL
19
+ url: 'https://atlassian.app.opsgenie.com/settings/schedule/detail/5c7ec80e-eb7e-421c-9583-8dc1494853e9'
20
+ - name: ''
21
+ type: PROJECT
22
+ url: 'https://product-fabric.atlassian.net/jira/software/c/projects/PTC/boards/2076'
23
+ - name: ''
24
+ type: DOCUMENT
25
+ url: 'https://hello.atlassian.net/wiki/spaces/PTC/overview?homepageId=137483481'
26
+ - name: ''
27
+ type: DASHBOARD
28
+ url: 'https://atlassian.signalfx.com/#/dashboard/Fb4ITLpA0AA?groupId=Fb4INPgA4AQ&configId=Fb4ITcPAwAA'
29
+ relationships: {}
30
+ labels:
31
+ - atlassian-platform
32
+ customFields:
33
+ - name: Dev Owner
34
+ type: user
35
+ value: null
36
+ - name: Product
37
+ type: text
38
+ value: null
39
+ - name: Test
40
+ type: text
41
+ value: null
42
+
43
+ # Learn more about formatting compass.yml:
44
+ # https://go.atlassian.com/compass-yml-format
@@ -43,11 +43,11 @@ var convertTeam = function convertTeam(result) {
43
43
 
44
44
  // indented so it's
45
45
  exports.convertTeam = convertTeam;
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";
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!, $siteID: ID!) {\n Team: team {\n team: teamV2(id: $teamId, siteId: $siteId) {\n".concat(TEAM_FRAGMENT, "\n }\n }\n}");
50
- var GATEWAY_QUERY = "query TeamCard($teamId: ID!) {\n Team: team {\n team(id: $teamId) {\n".concat(TEAM_FRAGMENT, "\n }\n }\n}");
49
+ var GATEWAY_QUERY_V2 = "query TeamCard($teamId: ID!, $siteID: ID!) {\n Team: team {\n team: teamV2(id: $teamId, siteId: $siteId) {\n ".concat(TEAM_FRAGMENT, "\n }\n }\n}");
50
+ var GATEWAY_QUERY = "query TeamCard($teamId: ID!) {\n Team: team {\n team(id: $teamId) {\n ".concat(TEAM_FRAGMENT, "\n }\n }\n}");
51
51
  var buildGatewayQuery = function buildGatewayQuery(_ref2) {
52
52
  var teamId = _ref2.teamId,
53
53
  siteId = _ref2.siteId;
@@ -42,7 +42,7 @@ var OverflowActionButtonsWrapper = _styled.default.div(_templateObject9 || (_tem
42
42
  exports.OverflowActionButtonsWrapper = OverflowActionButtonsWrapper;
43
43
  var CardContent = _styled.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n min-height: ", "px;\n"])), (0, _constants.gridSize)() * 17);
44
44
 
45
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
45
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
46
46
  exports.CardContent = CardContent;
47
47
  var DetailsGroup = _styled.default.div(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n margin-left: ", "px;\n width: ", "px;\n"])), (0, _constants.gridSize)() * 14.5, (0, _constants.gridSize)() * 24.5);
48
48
  exports.DetailsGroup = DetailsGroup;
@@ -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.1"
47
+ packageVersion: "19.5.2"
48
48
  }, attributes), {}, {
49
49
  firedAt: Math.round((0, _performance.getPageTime)())
50
50
  })
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/profilecard",
3
- "version": "19.5.1"
3
+ "version": "19.5.2"
4
4
  }
@@ -44,20 +44,21 @@ const TEAM_FRAGMENT = `
44
44
  picture
45
45
  }
46
46
  }
47
+ }
47
48
  `;
48
49
 
49
50
  // We alias the team node to always be team
50
51
  const GATEWAY_QUERY_V2 = `query TeamCard($teamId: ID!, $siteID: ID!) {
51
52
  Team: team {
52
53
  team: teamV2(id: $teamId, siteId: $siteId) {
53
- ${TEAM_FRAGMENT}
54
+ ${TEAM_FRAGMENT}
54
55
  }
55
56
  }
56
57
  }`;
57
58
  const GATEWAY_QUERY = `query TeamCard($teamId: ID!) {
58
59
  Team: team {
59
60
  team(id: $teamId) {
60
- ${TEAM_FRAGMENT}
61
+ ${TEAM_FRAGMENT}
61
62
  }
62
63
  }
63
64
  }`;
@@ -88,7 +88,7 @@ export const CardContent = styled.div`
88
88
  min-height: ${gridSize() * 17}px;
89
89
  `;
90
90
 
91
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
91
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
92
92
  export const DetailsGroup = styled.div`
93
93
  display: flex;
94
94
  flex-direction: column;
@@ -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.1",
34
+ packageVersion: "19.5.2",
35
35
  ...attributes,
36
36
  firedAt: Math.round(getPageTime())
37
37
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/profilecard",
3
- "version": "19.5.1"
3
+ "version": "19.5.2"
4
4
  }
@@ -31,11 +31,11 @@ export var convertTeam = function convertTeam(result) {
31
31
  };
32
32
 
33
33
  // indented so it's
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";
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!, $siteID: ID!) {\n Team: team {\n team: teamV2(id: $teamId, siteId: $siteId) {\n".concat(TEAM_FRAGMENT, "\n }\n }\n}");
38
- var GATEWAY_QUERY = "query TeamCard($teamId: ID!) {\n Team: team {\n team(id: $teamId) {\n".concat(TEAM_FRAGMENT, "\n }\n }\n}");
37
+ var GATEWAY_QUERY_V2 = "query TeamCard($teamId: ID!, $siteID: ID!) {\n Team: team {\n team: teamV2(id: $teamId, siteId: $siteId) {\n ".concat(TEAM_FRAGMENT, "\n }\n }\n}");
38
+ 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;
@@ -26,7 +26,7 @@ export var ActionButtonGroup = styled.div(_templateObject8 || (_templateObject8
26
26
  export var OverflowActionButtonsWrapper = styled.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n display: inline-block;\n width: 32px;\n height: 32px;\n margin-left: ", ";\n"])), "var(--ds-space-100, 8px)");
27
27
  export var CardContent = styled.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n min-height: ", "px;\n"])), gridSize() * 17);
28
28
 
29
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
29
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
30
30
  export var DetailsGroup = styled.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n margin-left: ", "px;\n width: ", "px;\n"])), gridSize() * 14.5, gridSize() * 24.5);
31
31
  export var DisabledInfo = styled.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n font-size: ", "px;\n color: ", ";\n margin: ", " 0 0 0;\n line-height: ", ";\n"])), fontSizeSmall, labelTextColor, "var(--ds-space-150, 12px)", "var(--ds-font-lineHeight-100, 16px)");
32
32
  export var FullNameLabel = styled.span(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n font-size: 18px;\n color: ", ";\n margin: ", ";\n line-height: ", "em;\n"])), function (props) {
@@ -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.1"
41
+ packageVersion: "19.5.2"
42
42
  }, attributes), {}, {
43
43
  firedAt: Math.round(getPageTime())
44
44
  })
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/profilecard",
3
- "version": "19.5.1"
3
+ "version": "19.5.2"
4
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/profilecard",
3
- "version": "19.5.1",
3
+ "version": "19.5.2",
4
4
  "description": "A React component to display a card with user information.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -58,12 +58,12 @@
58
58
  "@atlaskit/give-kudos": "^1.1.0",
59
59
  "@atlaskit/icon": "^21.12.0",
60
60
  "@atlaskit/lozenge": "^11.4.0",
61
- "@atlaskit/menu": "^1.8.0",
61
+ "@atlaskit/menu": "^1.9.0",
62
62
  "@atlaskit/platform-feature-flags": "^0.2.4",
63
63
  "@atlaskit/popup": "^1.8.0",
64
64
  "@atlaskit/spinner": "^15.5.0",
65
65
  "@atlaskit/theme": "^12.5.0",
66
- "@atlaskit/tokens": "^1.9.0",
66
+ "@atlaskit/tokens": "^1.11.0",
67
67
  "@babel/runtime": "^7.0.0",
68
68
  "@emotion/react": "^11.7.1",
69
69
  "@emotion/styled": "^11.0.0",
@@ -77,10 +77,6 @@
77
77
  "react-dom": "^16.8.0"
78
78
  },
79
79
  "devDependencies": {
80
- "@atlaskit/docs": "*",
81
- "@atlaskit/flag": "^15.2.0",
82
- "@atlaskit/inline-edit": "^12.3.0",
83
- "@atlaskit/select": "^16.5.0",
84
80
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
85
81
  "@testing-library/react": "^12.1.5",
86
82
  "enzyme": "^3.10.0",
@@ -1,570 +0,0 @@
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
- ```