@atlaskit/profilecard 16.9.0 → 16.10.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.
Files changed (33) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/cjs/components/Team/TeamProfileCardTrigger.js +0 -1
  3. package/dist/cjs/components/User/ProfileCardResourced.js +0 -1
  4. package/dist/cjs/components/User/ProfileCardTrigger.js +0 -1
  5. package/dist/cjs/i18n/en.js +1 -0
  6. package/dist/cjs/i18n/en_GB.js +1 -0
  7. package/dist/cjs/i18n/en_ZZ.js +1 -0
  8. package/dist/cjs/util/analytics.js +1 -1
  9. package/dist/cjs/version.json +1 -1
  10. package/dist/es2019/components/Team/TeamProfileCardTrigger.js +0 -1
  11. package/dist/es2019/components/User/ProfileCardResourced.js +0 -1
  12. package/dist/es2019/components/User/ProfileCardTrigger.js +0 -1
  13. package/dist/es2019/i18n/en.js +1 -0
  14. package/dist/es2019/i18n/en_GB.js +1 -0
  15. package/dist/es2019/i18n/en_ZZ.js +1 -0
  16. package/dist/es2019/util/analytics.js +1 -1
  17. package/dist/es2019/version.json +1 -1
  18. package/dist/esm/client/TeamCentralCardClient.js +1 -1
  19. package/dist/esm/client/UserProfileCardClient.js +1 -1
  20. package/dist/esm/client/getTeamFromAGG.js +1 -1
  21. package/dist/esm/components/Team/TeamProfileCardTrigger.js +0 -1
  22. package/dist/esm/components/User/ProfileCardResourced.js +0 -1
  23. package/dist/esm/components/User/ProfileCardTrigger.js +0 -1
  24. package/dist/esm/i18n/en.js +1 -0
  25. package/dist/esm/i18n/en_GB.js +1 -0
  26. package/dist/esm/i18n/en_ZZ.js +1 -0
  27. package/dist/esm/util/analytics.js +1 -1
  28. package/dist/esm/version.json +1 -1
  29. package/dist/types/i18n/en.d.ts +1 -0
  30. package/dist/types/i18n/en_GB.d.ts +1 -0
  31. package/dist/types/i18n/en_ZZ.d.ts +1 -0
  32. package/package.json +4 -4
  33. package/report.api.md +677 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # @atlaskit/profilecard
2
2
 
3
+ ## 16.10.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 16.10.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`e5fbc101e73`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e5fbc101e73) - Remove analytics prop from give kudos component
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies
18
+
19
+ ## 16.9.1
20
+
21
+ ### Patch Changes
22
+
23
+ - Updated dependencies
24
+
3
25
  ## 16.9.0
4
26
 
5
27
  ### Minor Changes
@@ -297,7 +297,6 @@ var TeamProfileCardTriggerInternal = /*#__PURE__*/function (_React$PureComponent
297
297
  type: _giveKudos.KudosType.TEAM,
298
298
  recipientId: _this.props.teamId
299
299
  },
300
- analytics: _this.fireAnalytics,
301
300
  analyticsSource: "team-profile-card",
302
301
  teamCentralBaseUrl: _this.state.teamCentralBaseUrl,
303
302
  cloudId: _this.props.cloudId || '',
@@ -242,7 +242,6 @@ var ProfileCardResourced = /*#__PURE__*/function (_React$PureComponent) {
242
242
  type: _giveKudos.KudosType.INDIVIDUAL,
243
243
  recipientId: this.props.userId
244
244
  },
245
- analytics: this.props.analytics,
246
245
  analyticsSource: "profile-card",
247
246
  teamCentralBaseUrl: newProps.teamCentralBaseUrl,
248
247
  cloudId: this.props.cloudId,
@@ -308,7 +308,6 @@ var ProfilecardTrigger = /*#__PURE__*/function (_React$PureComponent) {
308
308
  type: _giveKudos.KudosType.INDIVIDUAL,
309
309
  recipientId: this.props.userId
310
310
  },
311
- analytics: this.props.analytics,
312
311
  analyticsSource: "profile-card",
313
312
  teamCentralBaseUrl: this.state.teamCentralBaseUrl,
314
313
  cloudId: this.props.cloudId,
@@ -32,6 +32,7 @@ var _default = {
32
32
  'pt.profile-card.inactive.account.has.date.this.month': 'Their account was deactivated this month.',
33
33
  'pt.profile-card.inactive.account.has.date.this.week': 'Their account was deactivated this week.',
34
34
  'pt.profile-card.inactive.account.no.date': 'Their account has been deactivated.',
35
+ 'pt.profile-card.more-icon-label': 'More',
35
36
  'pt.team-profile-card.directReports.heading': 'Direct reports',
36
37
  'pt.team-profile-card.error.refresh-button': 'Try again',
37
38
  'pt.team-profile-card.error.suggestion': 'Wait a few moments, then try again.',
@@ -32,6 +32,7 @@ var _default = {
32
32
  'pt.profile-card.inactive.account.has.date.this.month': 'Their account was deactivated this month.',
33
33
  'pt.profile-card.inactive.account.has.date.this.week': 'Their account was deactivated this week.',
34
34
  'pt.profile-card.inactive.account.no.date': 'Their account has been deactivated.',
35
+ 'pt.profile-card.more-icon-label': 'More',
35
36
  'pt.team-profile-card.directReports.heading': 'Direct reports',
36
37
  'pt.team-profile-card.error.refresh-button': 'Try again',
37
38
  'pt.team-profile-card.error.suggestion': 'Wait a few moments, then try again.',
@@ -32,6 +32,7 @@ var _default = {
32
32
  'pt.profile-card.inactive.account.has.date.this.month': '⁣⁢Their account was deactivated this month.‍‌⁡⁡؜⁠‍‍⁣⁤',
33
33
  'pt.profile-card.inactive.account.has.date.this.week': '⁣⁢Their account was deactivated this week.⁠‍⁠‍⁡؜⁣⁤',
34
34
  'pt.profile-card.inactive.account.no.date': '⁣⁢Their account has been deactivated.‌⁠⁠⁠‌⁡‌؜⁠⁠‌⁣⁤',
35
+ 'pt.profile-card.more-icon-label': '⁣⁢More‌‌‍؜⁡؜⁠⁠؜؜⁣⁤',
35
36
  'pt.team-profile-card.directReports.heading': '⁣⁢Direct reports⁠‍⁡⁠؜⁠‌؜⁣⁤',
36
37
  'pt.team-profile-card.error.refresh-button': '⁣⁢Try again⁡⁠‍‌⁠⁠⁡⁠؜⁠⁡‍⁣⁤',
37
38
  'pt.team-profile-card.error.suggestion': '⁣⁢Wait a few moments, then try again.‌⁡‌‌‍⁠⁠⁡‍؜‌⁡⁠⁠⁡⁠‍‍⁣⁤',
@@ -56,7 +56,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
56
56
  actionSubjectId: actionSubjectId,
57
57
  attributes: _objectSpread(_objectSpread({
58
58
  packageName: "@atlaskit/profilecard",
59
- packageVersion: "16.9.0"
59
+ packageVersion: "16.10.1"
60
60
  }, attributes), {}, {
61
61
  firedAt: (0, _performance.getPageTime)()
62
62
  })
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/profilecard",
3
- "version": "16.9.0"
3
+ "version": "16.10.1"
4
4
  }
@@ -246,7 +246,6 @@ export class TeamProfileCardTriggerInternal extends React.PureComponent {
246
246
  type: KudosType.TEAM,
247
247
  recipientId: this.props.teamId
248
248
  },
249
- analytics: this.fireAnalytics,
250
249
  analyticsSource: "team-profile-card",
251
250
  teamCentralBaseUrl: this.state.teamCentralBaseUrl,
252
251
  cloudId: this.props.cloudId || '',
@@ -180,7 +180,6 @@ export default class ProfileCardResourced extends React.PureComponent {
180
180
  type: KudosType.INDIVIDUAL,
181
181
  recipientId: this.props.userId
182
182
  },
183
- analytics: this.props.analytics,
184
183
  analyticsSource: "profile-card",
185
184
  teamCentralBaseUrl: newProps.teamCentralBaseUrl,
186
185
  cloudId: this.props.cloudId,
@@ -245,7 +245,6 @@ class ProfilecardTrigger extends React.PureComponent {
245
245
  type: KudosType.INDIVIDUAL,
246
246
  recipientId: this.props.userId
247
247
  },
248
- analytics: this.props.analytics,
249
248
  analyticsSource: "profile-card",
250
249
  teamCentralBaseUrl: this.state.teamCentralBaseUrl,
251
250
  cloudId: this.props.cloudId,
@@ -25,6 +25,7 @@ export default {
25
25
  'pt.profile-card.inactive.account.has.date.this.month': 'Their account was deactivated this month.',
26
26
  'pt.profile-card.inactive.account.has.date.this.week': 'Their account was deactivated this week.',
27
27
  'pt.profile-card.inactive.account.no.date': 'Their account has been deactivated.',
28
+ 'pt.profile-card.more-icon-label': 'More',
28
29
  'pt.team-profile-card.directReports.heading': 'Direct reports',
29
30
  'pt.team-profile-card.error.refresh-button': 'Try again',
30
31
  'pt.team-profile-card.error.suggestion': 'Wait a few moments, then try again.',
@@ -25,6 +25,7 @@ export default {
25
25
  'pt.profile-card.inactive.account.has.date.this.month': 'Their account was deactivated this month.',
26
26
  'pt.profile-card.inactive.account.has.date.this.week': 'Their account was deactivated this week.',
27
27
  'pt.profile-card.inactive.account.no.date': 'Their account has been deactivated.',
28
+ 'pt.profile-card.more-icon-label': 'More',
28
29
  'pt.team-profile-card.directReports.heading': 'Direct reports',
29
30
  'pt.team-profile-card.error.refresh-button': 'Try again',
30
31
  'pt.team-profile-card.error.suggestion': 'Wait a few moments, then try again.',
@@ -25,6 +25,7 @@ export default {
25
25
  'pt.profile-card.inactive.account.has.date.this.month': '⁣⁢Their account was deactivated this month.‍‌⁡⁡؜⁠‍‍⁣⁤',
26
26
  'pt.profile-card.inactive.account.has.date.this.week': '⁣⁢Their account was deactivated this week.⁠‍⁠‍⁡؜⁣⁤',
27
27
  'pt.profile-card.inactive.account.no.date': '⁣⁢Their account has been deactivated.‌⁠⁠⁠‌⁡‌؜⁠⁠‌⁣⁤',
28
+ 'pt.profile-card.more-icon-label': '⁣⁢More‌‌‍؜⁡؜⁠⁠؜؜⁣⁤',
28
29
  'pt.team-profile-card.directReports.heading': '⁣⁢Direct reports⁠‍⁡⁠؜⁠‌؜⁣⁤',
29
30
  'pt.team-profile-card.error.refresh-button': '⁣⁢Try again⁡⁠‍‌⁠⁠⁡⁠؜⁠⁡‍⁣⁤',
30
31
  'pt.team-profile-card.error.suggestion': '⁣⁢Wait a few moments, then try again.‌⁡‌‌‍⁠⁠⁡‍؜‌⁡⁠⁠⁡⁠‍‍⁣⁤',
@@ -35,7 +35,7 @@ const createEvent = (eventType, action, actionSubject, actionSubjectId, attribut
35
35
  actionSubjectId,
36
36
  attributes: {
37
37
  packageName: "@atlaskit/profilecard",
38
- packageVersion: "16.9.0",
38
+ packageVersion: "16.10.1",
39
39
  ...attributes,
40
40
  firedAt: getPageTime()
41
41
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/profilecard",
3
- "version": "16.9.0"
3
+ "version": "16.10.1"
4
4
  }
@@ -1,10 +1,10 @@
1
- import _regeneratorRuntime from "@babel/runtime/regenerator";
2
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
4
3
  import _createClass from "@babel/runtime/helpers/createClass";
5
4
  import _inherits from "@babel/runtime/helpers/inherits";
6
5
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
7
6
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
8
8
 
9
9
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
10
10
 
@@ -1,4 +1,3 @@
1
- import _regeneratorRuntime from "@babel/runtime/regenerator";
2
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
4
3
  import _createClass from "@babel/runtime/helpers/createClass";
@@ -6,6 +5,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
6
5
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
7
6
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
8
7
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
9
9
 
10
10
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
11
11
 
@@ -1,6 +1,6 @@
1
- import _regeneratorRuntime from "@babel/runtime/regenerator";
2
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
4
4
 
5
5
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
6
6
 
@@ -282,7 +282,6 @@ export var TeamProfileCardTriggerInternal = /*#__PURE__*/function (_React$PureCo
282
282
  type: KudosType.TEAM,
283
283
  recipientId: _this.props.teamId
284
284
  },
285
- analytics: _this.fireAnalytics,
286
285
  analyticsSource: "team-profile-card",
287
286
  teamCentralBaseUrl: _this.state.teamCentralBaseUrl,
288
287
  cloudId: _this.props.cloudId || '',
@@ -220,7 +220,6 @@ var ProfileCardResourced = /*#__PURE__*/function (_React$PureComponent) {
220
220
  type: KudosType.INDIVIDUAL,
221
221
  recipientId: this.props.userId
222
222
  },
223
- analytics: this.props.analytics,
224
223
  analyticsSource: "profile-card",
225
224
  teamCentralBaseUrl: newProps.teamCentralBaseUrl,
226
225
  cloudId: this.props.cloudId,
@@ -292,7 +292,6 @@ var ProfilecardTrigger = /*#__PURE__*/function (_React$PureComponent) {
292
292
  type: KudosType.INDIVIDUAL,
293
293
  recipientId: this.props.userId
294
294
  },
295
- analytics: this.props.analytics,
296
295
  analyticsSource: "profile-card",
297
296
  teamCentralBaseUrl: this.state.teamCentralBaseUrl,
298
297
  cloudId: this.props.cloudId,
@@ -25,6 +25,7 @@ export default {
25
25
  'pt.profile-card.inactive.account.has.date.this.month': 'Their account was deactivated this month.',
26
26
  'pt.profile-card.inactive.account.has.date.this.week': 'Their account was deactivated this week.',
27
27
  'pt.profile-card.inactive.account.no.date': 'Their account has been deactivated.',
28
+ 'pt.profile-card.more-icon-label': 'More',
28
29
  'pt.team-profile-card.directReports.heading': 'Direct reports',
29
30
  'pt.team-profile-card.error.refresh-button': 'Try again',
30
31
  'pt.team-profile-card.error.suggestion': 'Wait a few moments, then try again.',
@@ -25,6 +25,7 @@ export default {
25
25
  'pt.profile-card.inactive.account.has.date.this.month': 'Their account was deactivated this month.',
26
26
  'pt.profile-card.inactive.account.has.date.this.week': 'Their account was deactivated this week.',
27
27
  'pt.profile-card.inactive.account.no.date': 'Their account has been deactivated.',
28
+ 'pt.profile-card.more-icon-label': 'More',
28
29
  'pt.team-profile-card.directReports.heading': 'Direct reports',
29
30
  'pt.team-profile-card.error.refresh-button': 'Try again',
30
31
  'pt.team-profile-card.error.suggestion': 'Wait a few moments, then try again.',
@@ -25,6 +25,7 @@ export default {
25
25
  'pt.profile-card.inactive.account.has.date.this.month': '⁣⁢Their account was deactivated this month.‍‌⁡⁡؜⁠‍‍⁣⁤',
26
26
  'pt.profile-card.inactive.account.has.date.this.week': '⁣⁢Their account was deactivated this week.⁠‍⁠‍⁡؜⁣⁤',
27
27
  'pt.profile-card.inactive.account.no.date': '⁣⁢Their account has been deactivated.‌⁠⁠⁠‌⁡‌؜⁠⁠‌⁣⁤',
28
+ 'pt.profile-card.more-icon-label': '⁣⁢More‌‌‍؜⁡؜⁠⁠؜؜⁣⁤',
28
29
  'pt.team-profile-card.directReports.heading': '⁣⁢Direct reports⁠‍⁡⁠؜⁠‌؜⁣⁤',
29
30
  'pt.team-profile-card.error.refresh-button': '⁣⁢Try again⁡⁠‍‌⁠⁠⁡⁠؜⁠⁡‍⁣⁤',
30
31
  'pt.team-profile-card.error.suggestion': '⁣⁢Wait a few moments, then try again.‌⁡‌‌‍⁠⁠⁡‍؜‌⁡⁠⁠⁡⁠‍‍⁣⁤',
@@ -45,7 +45,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
45
45
  actionSubjectId: actionSubjectId,
46
46
  attributes: _objectSpread(_objectSpread({
47
47
  packageName: "@atlaskit/profilecard",
48
- packageVersion: "16.9.0"
48
+ packageVersion: "16.10.1"
49
49
  }, attributes), {}, {
50
50
  firedAt: getPageTime()
51
51
  })
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/profilecard",
3
- "version": "16.9.0"
3
+ "version": "16.10.1"
4
4
  }
@@ -18,6 +18,7 @@ declare const _default: {
18
18
  'pt.profile-card.inactive.account.has.date.this.month': string;
19
19
  'pt.profile-card.inactive.account.has.date.this.week': string;
20
20
  'pt.profile-card.inactive.account.no.date': string;
21
+ 'pt.profile-card.more-icon-label': string;
21
22
  'pt.team-profile-card.directReports.heading': string;
22
23
  'pt.team-profile-card.error.refresh-button': string;
23
24
  'pt.team-profile-card.error.suggestion': string;
@@ -18,6 +18,7 @@ declare const _default: {
18
18
  'pt.profile-card.inactive.account.has.date.this.month': string;
19
19
  'pt.profile-card.inactive.account.has.date.this.week': string;
20
20
  'pt.profile-card.inactive.account.no.date': string;
21
+ 'pt.profile-card.more-icon-label': string;
21
22
  'pt.team-profile-card.directReports.heading': string;
22
23
  'pt.team-profile-card.error.refresh-button': string;
23
24
  'pt.team-profile-card.error.suggestion': string;
@@ -18,6 +18,7 @@ declare const _default: {
18
18
  'pt.profile-card.inactive.account.has.date.this.month': string;
19
19
  'pt.profile-card.inactive.account.has.date.this.week': string;
20
20
  'pt.profile-card.inactive.account.no.date': string;
21
+ 'pt.profile-card.more-icon-label': string;
21
22
  'pt.team-profile-card.directReports.heading': string;
22
23
  'pt.team-profile-card.error.refresh-button': string;
23
24
  'pt.team-profile-card.error.suggestion': string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/profilecard",
3
- "version": "16.9.0",
3
+ "version": "16.10.1",
4
4
  "description": "A React component to display a card with user information.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -43,7 +43,7 @@
43
43
  "@atlaskit/avatar-group": "^9.0.0",
44
44
  "@atlaskit/button": "^16.3.0",
45
45
  "@atlaskit/dropdown-menu": "^11.2.0",
46
- "@atlaskit/give-kudos": "^0.3.0",
46
+ "@atlaskit/give-kudos": "^0.6.0",
47
47
  "@atlaskit/icon": "^21.10.0",
48
48
  "@atlaskit/lozenge": "^11.0.0",
49
49
  "@atlaskit/menu": "^1.3.0",
@@ -67,8 +67,8 @@
67
67
  "@atlaskit/dynamic-table": "^14.6.0",
68
68
  "@atlaskit/flag": "^14.5.0",
69
69
  "@atlaskit/inline-edit": "^12.0.0",
70
- "@atlaskit/select": "^15.3.0",
71
- "@atlaskit/util-data-test": "^17.3.0",
70
+ "@atlaskit/select": "^15.4.0",
71
+ "@atlaskit/util-data-test": "^17.5.0",
72
72
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
73
73
  "@testing-library/react": "^8.0.1",
74
74
  "enzyme": "^3.10.0",
package/report.api.md ADDED
@@ -0,0 +1,677 @@
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
+ /// <reference types="react" />
7
+
8
+ import { ComponentType } from 'react';
9
+ import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
10
+ import { IntlShape } from 'react-intl-next';
11
+ import { LRUCache } from 'lru-fast';
12
+ import { default as React_2 } from 'react';
13
+ import { ReactElement } from 'react';
14
+ import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
15
+
16
+ declare type AnalyticsFromDuration = (duration: number) => Record<string, any>;
17
+
18
+ declare type AnalyticsFunction = (generator: AnalyticsFromDuration) => void;
19
+
20
+ export declare interface ApiClientResponse {
21
+ User: {
22
+ id: string;
23
+ isBot: boolean;
24
+ isCurrentUser: boolean;
25
+ isNotMentionable: boolean;
26
+ avatarUrl: string | null;
27
+ email: string | null;
28
+ fullName: string | null;
29
+ location: string | null;
30
+ meta: string | null;
31
+ nickname: string | null;
32
+ companyName: string | null;
33
+ remoteTimeString: string | null;
34
+ remoteWeekdayIndex: string | null;
35
+ remoteWeekdayString: string | null;
36
+ status: StatusType;
37
+ statusModifiedDate: number | null;
38
+ };
39
+ }
40
+
41
+ declare interface CacheConfig {
42
+ cacheSize?: number;
43
+ cacheMaxAge?: number;
44
+ }
45
+
46
+ declare interface CachedData<T> {
47
+ expire: number;
48
+ profile: T;
49
+ }
50
+
51
+ declare class CachingClient<T> {
52
+ config: Required<CacheConfig>;
53
+ cache: LRUCache<string, CachedData<T>> | null;
54
+ constructor(config: CacheConfig);
55
+ setCachedProfile(cacheIdentifier: string, profile: T): void;
56
+ getCachedProfile(cacheIdentifier: string): T | null;
57
+ flushCache(): void;
58
+ }
59
+
60
+ declare interface ClientOverrides {
61
+ userClient?: UserProfileClient;
62
+ teamClient?: TeamProfileClient;
63
+ teamCentralClient?: TeamCentralCardClient;
64
+ }
65
+
66
+ export declare const DELAY_MS_HIDE = 200;
67
+
68
+ export declare const DELAY_MS_SHOW = 800;
69
+
70
+ declare type FeatureFlagExtraContext = {
71
+ key: string;
72
+ value: string;
73
+ };
74
+
75
+ declare type LozengeColor =
76
+ | 'default'
77
+ | 'success'
78
+ | 'removed'
79
+ | 'inprogress'
80
+ | 'new'
81
+ | 'moved';
82
+
83
+ declare interface LozengeProps {
84
+ text: React_2.ReactNode;
85
+ appearance?: LozengeColor;
86
+ isBold?: boolean;
87
+ }
88
+
89
+ export declare interface MessageIntlProviderProps {
90
+ children: React_2.ReactNode;
91
+ intl: IntlShape;
92
+ }
93
+
94
+ /**
95
+ * Transform response from GraphQL
96
+ * - Prefix `timestring` with `remoteWeekdayString` depending on `remoteWeekdayIndex`
97
+ * - Remove properties which will be not used later
98
+ * @ignore
99
+ * @param {object} response
100
+ * @return {object}
101
+ */
102
+ export declare const modifyResponse: (
103
+ response: ApiClientResponse,
104
+ ) => ProfileCardClientData;
105
+
106
+ export declare class ProfileCard extends React_2.PureComponent<
107
+ ProfilecardProps
108
+ > {
109
+ static defaultProps: ProfilecardProps;
110
+ GIVE_KUDOS_ACTION_ID: string;
111
+ private timeOpen;
112
+ clientFetchProfile: () => void;
113
+ constructor(props: ProfilecardProps);
114
+ private durationSince;
115
+ callClientFetchProfile: (...args: any) => void;
116
+ callAnalytics: (id: string, options: any) => void;
117
+ componentDidMount(): void;
118
+ renderErrorMessage(): JSX.Element;
119
+ kudosUrl: () => string;
120
+ kudosButtonCallback: () => void;
121
+ getActions(): ProfileCardAction[];
122
+ renderButton: (action: ProfileCardAction, idx: number) => ReactElement;
123
+ renderActionsButtons(): JSX.Element | null;
124
+ private onActionClick;
125
+ renderCardDetailsDefault(): JSX.Element;
126
+ renderCardDetailsForDisabledAccount(): JSX.Element;
127
+ getDisabledAccountName(): string | JSX.Element | null | undefined;
128
+ getDisabledAccountDesc(): {};
129
+ private renderFullNameAndPublicName;
130
+ renderCustomLozenges(lozenges: LozengeProps[]): JSX.Element | null;
131
+ renderCardDetailsApp(): JSX.Element;
132
+ renderCardDetails(): JSX.Element;
133
+ render(): JSX.Element;
134
+ }
135
+
136
+ export declare interface ProfileCardAction {
137
+ callback?: (...args: any[]) => any;
138
+ shouldRender?: (data: any) => boolean;
139
+ id?: string;
140
+ label: React_2.ReactNode;
141
+ link?: string;
142
+ }
143
+
144
+ export declare interface ProfileCardClientData {
145
+ isBot: boolean;
146
+ isCurrentUser: boolean;
147
+ isNotMentionable: boolean;
148
+ avatarUrl?: string;
149
+ email?: string;
150
+ fullName?: string;
151
+ location?: string;
152
+ meta?: string;
153
+ nickname?: string;
154
+ companyName?: string;
155
+ timestring?: string;
156
+ status: StatusType;
157
+ statusModifiedDate?: number | null;
158
+ customLozenges?: LozengeProps[];
159
+ }
160
+
161
+ export declare type ProfileCardErrorType = {
162
+ reason: 'default' | 'NotFound';
163
+ } | null;
164
+
165
+ export declare interface ProfilecardProps {
166
+ isLoading?: boolean;
167
+ hasError?: boolean;
168
+ errorType?: ProfileCardErrorType;
169
+ status?: StatusType;
170
+ isBot?: boolean;
171
+ isNotMentionable?: boolean;
172
+ avatarUrl?: string;
173
+ fullName?: string;
174
+ meta?: string;
175
+ userId?: string;
176
+ isCurrentUser?: boolean;
177
+ nickname?: string;
178
+ email?: string;
179
+ location?: string;
180
+ companyName?: string;
181
+ timestring?: string;
182
+ actions?: ProfileCardAction[];
183
+ clientFetchProfile?: any;
184
+ analytics?: any;
185
+ statusModifiedDate?: number | null;
186
+ withoutElevation?: boolean;
187
+ /** Show manager and direct reports section on profile hover card, if available */
188
+ reportingLines?: TeamCentralReportingLinesData;
189
+ /** Base URL to populate href value for manager's and direct reports' user avatar */
190
+ reportingLinesProfileUrl?: string;
191
+ /** Click handler when user clicks on manager's and direct reports' user avatar, un-clickable otherwise */
192
+ onReportingLinesClick?: (user: ReportingLinesUser) => void;
193
+ isKudosEnabled?: boolean;
194
+ teamCentralBaseUrl?: string;
195
+ addFlag?: (flag: any) => void;
196
+ cloudId?: string;
197
+ disabledAccountMessage?: React_2.ReactNode;
198
+ hasDisabledAccountLozenge?: boolean;
199
+ customLozenges?: LozengeProps[];
200
+ openKudosDrawer?: () => void;
201
+ }
202
+
203
+ declare class ProfileCardResourced extends React_2.PureComponent<
204
+ ProfileCardResourcedProps,
205
+ ProfileCardResourcedState
206
+ > {
207
+ static defaultProps: Partial<ProfileCardResourcedProps>;
208
+ _isMounted: boolean;
209
+ state: ProfileCardResourcedState;
210
+ componentDidMount(): void;
211
+ componentDidUpdate(
212
+ prevProps: ProfileCardResourcedProps,
213
+ prevState: ProfileCardResourcedState,
214
+ ): void;
215
+ componentWillUnmount(): void;
216
+ private callAnalytics;
217
+ clientFetchProfile: () => void;
218
+ handleClientSuccess(
219
+ profileData: ProfileCardClientData,
220
+ reportingLinesData: TeamCentralReportingLinesData,
221
+ shouldShowGiveKudos: boolean,
222
+ ): void;
223
+ handleClientError(err: any): void;
224
+ filterActions: () => ProfileCardAction[];
225
+ openKudosDrawer: () => void;
226
+ closeKudosDrawer: () => void;
227
+ render(): React_2.ReactNode;
228
+ }
229
+ export default ProfileCardResourced;
230
+
231
+ export declare interface ProfileCardResourcedProps {
232
+ userId: string;
233
+ cloudId: string;
234
+ resourceClient: ProfileClient_2;
235
+ actions?: ProfileCardAction[];
236
+ reportingLinesProfileUrl?: string;
237
+ onReportingLinesClick?: (user: ReportingLinesUser) => void;
238
+ analytics?: any;
239
+ position?: ProfilecardTriggerPosition;
240
+ trigger?: TriggerType;
241
+ children?: React_2.ReactNode;
242
+ addFlag?: (flag: any) => void;
243
+ }
244
+
245
+ export declare interface ProfileCardResourcedState {
246
+ visible?: boolean;
247
+ isLoading?: boolean;
248
+ hasError: boolean;
249
+ error?: ProfileCardErrorType;
250
+ data: ProfileCardClientData | null;
251
+ reportingLinesData?: TeamCentralReportingLinesData;
252
+ isKudosEnabled?: boolean;
253
+ kudosDrawerOpen: boolean;
254
+ }
255
+
256
+ export declare class ProfileCardTrigger extends React_2.PureComponent<
257
+ ProfileCardTriggerProps,
258
+ ProfileCardTriggerState
259
+ > {
260
+ static defaultProps: Partial<ProfileCardTriggerProps>;
261
+ _isMounted: boolean;
262
+ showDelay: number;
263
+ hideDelay: number;
264
+ showTimer: number;
265
+ hideTimer: number;
266
+ hideProfilecard: () => void;
267
+ showProfilecard: () => void;
268
+ onClick: (event: React_2.MouseEvent) => void;
269
+ containerListeners:
270
+ | {
271
+ onMouseEnter: () => void;
272
+ onMouseLeave: () => void;
273
+ onClick?: undefined;
274
+ }
275
+ | {
276
+ onClick: (event: React_2.MouseEvent) => void;
277
+ onMouseEnter?: undefined;
278
+ onMouseLeave?: undefined;
279
+ };
280
+ layerListeners: {
281
+ handleClickOutside: () => void;
282
+ handleEscapeKeydown: () => void;
283
+ };
284
+ state: ProfileCardTriggerState;
285
+ componentDidMount(): void;
286
+ componentDidUpdate(prevProps: ProfileCardTriggerProps): void;
287
+ componentWillUnmount(): void;
288
+ clientFetchProfile: () => void;
289
+ handleClientSuccess(
290
+ profileData: ProfileCardClientData,
291
+ reportingLinesData: TeamCentralReportingLinesData,
292
+ shouldShowGiveKudos: boolean,
293
+ ): void;
294
+ handleClientError(err: any): void;
295
+ filterActions(): ProfileCardAction[];
296
+ renderProfileCard(): JSX.Element;
297
+ openKudosDrawer: () => void;
298
+ closeKudosDrawer: () => void;
299
+ renderCard: () => JSX.Element;
300
+ renderWithTrigger(): JSX.Element;
301
+ render(): JSX.Element;
302
+ }
303
+
304
+ export declare type ProfilecardTriggerPosition =
305
+ | 'bottom-start'
306
+ | 'bottom'
307
+ | 'bottom-end'
308
+ | 'left-start'
309
+ | 'left'
310
+ | 'left-end'
311
+ | 'top-end'
312
+ | 'top'
313
+ | 'top-start'
314
+ | 'right-end'
315
+ | 'right'
316
+ | 'right-start';
317
+
318
+ export declare interface ProfileCardTriggerProps {
319
+ userId: string;
320
+ /**
321
+ A cloudId can be provided, and we'll verify that the target userId is an
322
+ actual user in the specified site.
323
+
324
+ Instead you can omit the cloudId and we won't do such a check.
325
+
326
+ If you have a cloudId and only want to show users who are in that site
327
+ then please provide it. If you're a site-less product or don't care about
328
+ verifying that the shown user is in a particular site, don't provide a
329
+ cloudId.
330
+ */
331
+ cloudId?: string;
332
+ resourceClient: ProfileClient_2;
333
+ actions?: ProfileCardAction[];
334
+ reportingLinesProfileUrl?: string;
335
+ onReportingLinesClick?: (user: ReportingLinesUser) => void;
336
+ analytics?: any;
337
+ position?: ProfilecardTriggerPosition;
338
+ trigger?: TriggerType;
339
+ children?: React_2.ReactNode;
340
+ testId?: string;
341
+ addFlag?: (flag: any) => void;
342
+ }
343
+
344
+ export declare interface ProfileCardTriggerState {
345
+ visible?: boolean;
346
+ isLoading?: boolean;
347
+ hasError: boolean;
348
+ error?: ProfileCardErrorType;
349
+ data: ProfileCardClientData | null;
350
+ reportingLinesData?: TeamCentralReportingLinesData;
351
+ shouldShowGiveKudos?: boolean;
352
+ teamCentralBaseUrl?: string;
353
+ kudosDrawerOpen: boolean;
354
+ }
355
+
356
+ export declare class ProfileClient {
357
+ userClient: UserProfileClient;
358
+ teamClient: TeamProfileClient;
359
+ tcClient?: TeamCentralCardClient;
360
+ constructor(config: ProfileClientOptions, clients?: ClientOverrides);
361
+ flushCache(): void;
362
+ getProfile(cloudId: string, userId: string): Promise<any>;
363
+ getTeamProfile(
364
+ teamId: string,
365
+ orgId?: string,
366
+ analytics?: (event: Record<string, any>) => void,
367
+ ): Promise<Team>;
368
+ getReportingLines(userId: string): Promise<TeamCentralReportingLinesData>;
369
+ getTeamCentralBaseUrl(): string | undefined;
370
+ shouldShowGiveKudos(): Promise<boolean>;
371
+ }
372
+
373
+ declare interface ProfileClient_2 {
374
+ flushCache: () => void;
375
+ getProfile: (
376
+ cloudId: string,
377
+ userId: string,
378
+ ) => Promise<ProfileCardClientData>;
379
+ getTeamProfile: (
380
+ teamId: string,
381
+ orgId?: string,
382
+ fireAnalytics?: (event: Record<string, any>) => void,
383
+ ) => Promise<Team>;
384
+ getReportingLines: (userId: string) => Promise<TeamCentralReportingLinesData>;
385
+ shouldShowGiveKudos: () => Promise<boolean>;
386
+ getTeamCentralBaseUrl: () => string | undefined;
387
+ }
388
+
389
+ export declare interface ProfileClientOptions {
390
+ url: string;
391
+ gatewayGraphqlUrl?: string;
392
+ cacheSize?: number;
393
+ cacheMaxAge?: number;
394
+ /** Enables Team Central functionality if enabled e.g. /gateway/api/watermelon/graphql*/
395
+ teamCentralUrl?: string;
396
+ /** URL to the Team Central app e.g. team.atlassian.com */
397
+ teamCentralBaseUrl?: string;
398
+ /** Name of integrating product e.g. jira, atlas, confluence **/
399
+ productIdentifier?: string;
400
+ }
401
+
402
+ export declare type RelativeDateKeyType =
403
+ | 'ThisWeek'
404
+ | 'ThisMonth'
405
+ | 'LastMonth'
406
+ | 'AFewMonths'
407
+ | 'SeveralMonths'
408
+ | 'MoreThanAYear'
409
+ | null;
410
+
411
+ declare interface ReportingLinesUser {
412
+ accountIdentifier: string;
413
+ identifierType: 'ATLASSIAN_ID' | 'BASE64_HASH' | 'UNKNOWN';
414
+ pii?: ReportingLinesUserPII;
415
+ }
416
+
417
+ declare interface ReportingLinesUserPII {
418
+ name: string;
419
+ picture?: string;
420
+ }
421
+
422
+ export declare type StatusModifiedDateType =
423
+ | 'noDate'
424
+ | 'thisWeek'
425
+ | 'thisMonth'
426
+ | 'lastMonth'
427
+ | 'aFewMonths'
428
+ | 'severalMonths'
429
+ | 'moreThanAYear';
430
+
431
+ export declare type StatusType = 'active' | 'inactive' | 'closed';
432
+
433
+ export declare interface Team {
434
+ largeAvatarImageUrl?: string;
435
+ smallAvatarImageUrl?: string;
436
+ largeHeaderImageUrl?: string;
437
+ smallHeaderImageUrl?: string;
438
+ id: string;
439
+ displayName: string;
440
+ description: string;
441
+ organizationId?: string;
442
+ members?: {
443
+ id: string;
444
+ fullName: string;
445
+ avatarUrl: string;
446
+ }[];
447
+ }
448
+
449
+ declare class TeamCentralCardClient extends CachingClient<
450
+ TeamCentralReportingLinesData
451
+ > {
452
+ options: TeamCentralCardClientOptions;
453
+ /**
454
+ * Simple circuit breaker to avoid making unnecessary calls to Team Central on auth failures
455
+ * This is to handle the case where products may have provided teamCentralUrl, but the site itself
456
+ * doesn't actually have any TC product.
457
+ *
458
+ * There's currently no way to reset this circuit breaker, but that's fine. This is meant to
459
+ * catch a pretty specific edge case.
460
+ */
461
+ bypassOnFailure: boolean;
462
+ featureFlagKeys: Map<string, boolean>;
463
+ constructor(options: TeamCentralCardClientOptions);
464
+ makeFeatureFlagCheckRequest(
465
+ featureKey: string,
466
+ context?: FeatureFlagExtraContext[],
467
+ ): Promise<boolean>;
468
+ makeRequest(userId: string): Promise<TeamCentralReportingLinesData>;
469
+ getReportingLines(userId: string): Promise<TeamCentralReportingLinesData>;
470
+ getFlagEnabled(
471
+ featureKey: string,
472
+ productIdentifier?: string,
473
+ ): Promise<boolean>;
474
+ private filterReportingLinesUser;
475
+ }
476
+
477
+ declare type TeamCentralCardClientOptions = ProfileClientOptions & {
478
+ teamCentralUrl: string;
479
+ };
480
+
481
+ declare interface TeamCentralReportingLinesData {
482
+ managers?: ReportingLinesUser[];
483
+ reports?: ReportingLinesUser[];
484
+ }
485
+
486
+ export declare const TeamProfileCard: (
487
+ props: TeamProfilecardProps,
488
+ ) => JSX.Element | null;
489
+
490
+ declare interface TeamProfilecardCoreProps {
491
+ /**
492
+ The id of the user viewing the profile card.
493
+
494
+ This is used to determine whether to say that the member count is
495
+ "including you" or not.
496
+ */
497
+ viewingUserId?: string;
498
+ /**
499
+ A list of extra buttons to be displayed at the bottom of the card.
500
+ View Profile is always included by default.
501
+ */
502
+ actions?: ProfileCardAction[];
503
+ /**
504
+ A function allowing products to provide an href for the user avatars in the
505
+ profilecard, e.g. so they can link to user's profile pages.
506
+ */
507
+ generateUserLink?: (userId: string) => string;
508
+ /**
509
+ A function allowing products to provide an onClick handler for when the
510
+ user clicks on a user's avatar or avatar group item.
511
+ */
512
+ onUserClick?: (userId: string, event: React_2.MouseEvent<Element>) => void;
513
+ /**
514
+ This should be a link to the team's profile page. This will be used for:
515
+
516
+ - Wrapping the trigger in a link to the team profile page (unless
517
+ triggerLinkType is `none`).
518
+
519
+ - Providing the link for the View Profile action button on the card.
520
+ */
521
+ viewProfileLink: string;
522
+ /**
523
+ An onClick action that navigates to the team's profile page. Something you
524
+ may want, e.g. for an SPA site or tracking analytics of navigation. This
525
+ is optional, just the viewProfileLink will suffice. Will be used for:
526
+
527
+ - Adding an onClick to the trigger if the triggerLinkType is
528
+ `clickable-link`.
529
+
530
+ - Providing an onClick for the View Profile action button on the card.
531
+ */
532
+ viewProfileOnClick?: (event?: React_2.MouseEvent<Element>) => void;
533
+ }
534
+
535
+ declare interface TeamProfilecardProps extends TeamProfilecardCoreProps {
536
+ /** Indicates whether the team's details are still loading. */
537
+ isLoading?: boolean;
538
+ /** Indicates whether an error occurred whilst fetching team details. */
539
+ hasError?: boolean;
540
+ /** Describes the type of error that occurred, if any. */
541
+ errorType?: ProfileCardErrorType;
542
+ /** The details of the team to be shown. */
543
+ team?: Team;
544
+ /** A callback that will try to re-fetch data in case an error occurred. */
545
+ clientFetchProfile?: () => void;
546
+ /** Details relevant to passing around analytics. */
547
+ analytics: AnalyticsFunction;
548
+ }
549
+
550
+ export declare const TeamProfileCardTrigger: React_2.ForwardRefExoticComponent<
551
+ Pick<
552
+ Omit<
553
+ TeamProfileCardTriggerProps & {
554
+ createAnalyticsEvent?: CreateUIAnalyticsEvent | undefined;
555
+ },
556
+ keyof WithAnalyticsEventsProps
557
+ >,
558
+ never
559
+ > &
560
+ Partial<
561
+ Pick<
562
+ Omit<
563
+ TeamProfileCardTriggerProps & {
564
+ createAnalyticsEvent?: CreateUIAnalyticsEvent | undefined;
565
+ },
566
+ keyof WithAnalyticsEventsProps
567
+ >,
568
+ keyof TeamProfileCardTriggerProps
569
+ >
570
+ > &
571
+ Partial<Pick<Partial<TeamProfileCardTriggerProps>, never>> &
572
+ React_2.RefAttributes<any>
573
+ >;
574
+
575
+ declare interface TeamProfileCardTriggerProps extends TeamProfilecardCoreProps {
576
+ /** The id of the team. */
577
+ teamId: string;
578
+ /**
579
+ The id of the organization that the team belongs to.
580
+ Currently this is unused, but will become necessary in the future.
581
+ */
582
+ orgId: string;
583
+ /** An instance of ProfileClient. */
584
+ resourceClient: ProfileClient_2;
585
+ /**
586
+ The position relative to the trigger that the card should be displayed in.
587
+ */
588
+ position?: ProfilecardTriggerPosition;
589
+ /**
590
+ The interaction method used to trigger the team profile card to appear.
591
+
592
+ - Click is generally recommended, but your needs may vary.
593
+
594
+ - Hover works for mouse users, but does not support those who use a
595
+ keyboard or screen reader, avoid using this if it's possible or makes
596
+ sense.
597
+
598
+ - Hover-click is usable for scenarios like inline-edits, where mouse users
599
+ cannot click on the trigger without causing side effects, but keyboard
600
+ users are still able to navigate into and trigger the profile card.
601
+
602
+ Look at the "Team Profilecard Trigger" or "Trigger Link Types" examples to
603
+ see how they behave, or ask in #team-twp-people-teams on Slack for our
604
+ recommendations.
605
+ */
606
+ trigger?: 'hover' | 'click' | 'hover-click';
607
+ /**
608
+ We generally prefer to wrap the trigger in a link to the team profile
609
+ page. This prop determines how that link behaves.
610
+
611
+ - Link is generally the recommended prop (especially in combination with
612
+ click or hover-click for the trigger prop above). It wraps the trigger in
613
+ an anchor tag with the team profile link (that users can interact with
614
+ via middle-click, etc.), but left clicking on the link is suppressed.
615
+
616
+ - None does not wrap the trigger in a link at all. This makes it difficult
617
+ for keyboard or screen reader users to know how to trigger the profile
618
+ card. Generally avoid this.
619
+
620
+ - Clickable-link wraps the trigger in a link with no special behaviour.
621
+ This is suitable for places where you want the trigger to serve primarily
622
+ as a link, and optionally allow hovering to preview the team first.
623
+
624
+ Look at the example on "Trigger Link Types" for more in-depth analysis, or
625
+ ask in #team-twp-people-teams on Slack for our recommendations.
626
+ */
627
+ triggerLinkType?: 'none' | 'link' | 'clickable-link';
628
+ /**
629
+ This is the component that will cause a team profile card to appear when
630
+ interacted with according to the method specified by the trigger prop.
631
+ */
632
+ children?: React_2.ReactNode;
633
+ /**
634
+ * Used by the card to show Flags.
635
+ */
636
+ addFlag?: (flag: any) => void;
637
+ /**
638
+ * Optional cloudId. Pass this if rendering card within a sited context.
639
+ */
640
+ cloudId?: string;
641
+ }
642
+
643
+ export declare class TeamProfileClient extends CachingClient<Team> {
644
+ options: ProfileClientOptions;
645
+ constructor(options: ProfileClientOptions);
646
+ makeRequestViaGateway(
647
+ teamId: string,
648
+ _orgId: string | undefined,
649
+ ): Promise<Team>;
650
+ makeRequest(teamId: string, orgId: string | undefined): Promise<Team>;
651
+ getProfile(
652
+ teamId: string,
653
+ orgId: string | undefined,
654
+ analytics?: (event: Record<string, any>) => void,
655
+ ): Promise<Team>;
656
+ }
657
+
658
+ export declare type TriggerType = 'hover' | 'click';
659
+
660
+ export declare class UserProfileClient extends CachingClient<any> {
661
+ options: ProfileClientOptions;
662
+ constructor(options: ProfileClientOptions);
663
+ makeRequest(cloudId: string, userId: string): Promise<ProfileCardClientData>;
664
+ getProfile(cloudId: string, userId: string): Promise<any>;
665
+ }
666
+
667
+ export declare function withOuterListeners<P>(
668
+ Component: ComponentType<P>,
669
+ ): React_2.ComponentClass<P & WithOuterListenersProps>;
670
+
671
+ export declare interface WithOuterListenersProps {
672
+ handleClickOutside?: () => void;
673
+ handleEscapeKeydown?: () => void;
674
+ }
675
+
676
+ export {};
677
+ ```