@atlaskit/profilecard 24.21.0 → 24.21.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,21 @@
1
1
  # @atlaskit/profilecard
2
2
 
3
+ ## 24.21.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`6cf9d0da3e1d4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6cf9d0da3e1d4) -
8
+ fix typescript issues
9
+ - [`6cf9d0da3e1d4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6cf9d0da3e1d4) -
10
+ fix typescript issues
11
+ - Updated dependencies
12
+
13
+ ## 24.21.1
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies
18
+
3
19
  ## 24.21.0
4
20
 
5
21
  ### Minor Changes
@@ -257,19 +257,18 @@ var TeamCentralCardClient = /*#__PURE__*/function (_CachingClient) {
257
257
  return response.text();
258
258
  case 7:
259
259
  workspaceType = _context4.sent;
260
- return _context4.abrupt("return", Promise.resolve(workspaceType));
260
+ return _context4.abrupt("return", workspaceType);
261
261
  case 9:
262
- _context4.next = 14;
263
- break;
264
- case 11:
265
- _context4.prev = 11;
262
+ return _context4.abrupt("return", undefined);
263
+ case 12:
264
+ _context4.prev = 12;
266
265
  _context4.t0 = _context4["catch"](0);
267
- return _context4.abrupt("return", Promise.resolve(undefined));
268
- case 14:
266
+ return _context4.abrupt("return", undefined);
267
+ case 15:
269
268
  case "end":
270
269
  return _context4.stop();
271
270
  }
272
- }, _callee4, this, [[0, 11]]);
271
+ }, _callee4, this, [[0, 12]]);
273
272
  }));
274
273
  function getWorkspaceExistsWithType(_x2) {
275
274
  return _getWorkspaceExistsWithType.apply(this, arguments);
@@ -103,7 +103,7 @@ var UserProfileCardClient = exports.default = /*#__PURE__*/function (_CachingCli
103
103
  return (0, _createClass2.default)(UserProfileCardClient, [{
104
104
  key: "makeRequest",
105
105
  value: function () {
106
- var _makeRequest = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(cloudId, userId) {
106
+ var _makeRequest = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(_cloudId, userId) {
107
107
  var _user$extendedProfile, _user$extendedProfile2, _user$extendedProfile3, _user$extendedProfile4, _user$extendedProfile5;
108
108
  var gatewayGraphqlUrl, urlWithOperationName, userQueryPromise, user, timestring, localWeekdayIndex, timeFormat;
109
109
  return _regenerator.default.wrap(function _callee2$(_context2) {
@@ -53,7 +53,7 @@ var AgentDeleteConfirmationModal = exports.AgentDeleteConfirmationModal = functi
53
53
  onClick: onClose
54
54
  }, formatMessage(messages.cancelText)), /*#__PURE__*/_react.default.createElement(_new.default, {
55
55
  appearance: "danger",
56
- onClick: function onClick(_e, event) {
56
+ onClick: function onClick(_e, _event) {
57
57
  handleDeleteAgent();
58
58
  }
59
59
  }, formatMessage(messages.confirmText))))));
@@ -166,10 +166,11 @@ class TeamCentralCardClient extends CachingClient {
166
166
  });
167
167
  if (response.ok) {
168
168
  const workspaceType = await response.text();
169
- return Promise.resolve(workspaceType);
169
+ return workspaceType;
170
170
  }
171
+ return undefined;
171
172
  } catch (err) {
172
- return Promise.resolve(undefined);
173
+ return undefined;
173
174
  }
174
175
  }
175
176
  preloadOrgId(gatewayGraphqlUrl, cloudId, orgId) {
@@ -116,7 +116,7 @@ export default class UserProfileCardClient extends CachingClient {
116
116
  super(options);
117
117
  this.options = options;
118
118
  }
119
- async makeRequest(cloudId, userId) {
119
+ async makeRequest(_cloudId, userId) {
120
120
  var _user$extendedProfile, _user$extendedProfile2, _user$extendedProfile3, _user$extendedProfile4, _user$extendedProfile5;
121
121
  const gatewayGraphqlUrl = this.options.gatewayGraphqlUrl || '/gateway/api/graphql';
122
122
  const urlWithOperationName = `${gatewayGraphqlUrl}?operationName=aggUserQuery`;
@@ -32,7 +32,7 @@ export const AgentDeleteConfirmationModal = ({
32
32
  onClick: onClose
33
33
  }, formatMessage(messages.cancelText)), /*#__PURE__*/React.createElement(Button, {
34
34
  appearance: "danger",
35
- onClick: (_e, event) => {
35
+ onClick: (_e, _event) => {
36
36
  handleDeleteAgent();
37
37
  }
38
38
  }, formatMessage(messages.confirmText))))));
@@ -250,19 +250,18 @@ var TeamCentralCardClient = /*#__PURE__*/function (_CachingClient) {
250
250
  return response.text();
251
251
  case 7:
252
252
  workspaceType = _context4.sent;
253
- return _context4.abrupt("return", Promise.resolve(workspaceType));
253
+ return _context4.abrupt("return", workspaceType);
254
254
  case 9:
255
- _context4.next = 14;
256
- break;
257
- case 11:
258
- _context4.prev = 11;
255
+ return _context4.abrupt("return", undefined);
256
+ case 12:
257
+ _context4.prev = 12;
259
258
  _context4.t0 = _context4["catch"](0);
260
- return _context4.abrupt("return", Promise.resolve(undefined));
261
- case 14:
259
+ return _context4.abrupt("return", undefined);
260
+ case 15:
262
261
  case "end":
263
262
  return _context4.stop();
264
263
  }
265
- }, _callee4, this, [[0, 11]]);
264
+ }, _callee4, this, [[0, 12]]);
266
265
  }));
267
266
  function getWorkspaceExistsWithType(_x2) {
268
267
  return _getWorkspaceExistsWithType.apply(this, arguments);
@@ -97,7 +97,7 @@ var UserProfileCardClient = /*#__PURE__*/function (_CachingClient) {
97
97
  return _createClass(UserProfileCardClient, [{
98
98
  key: "makeRequest",
99
99
  value: function () {
100
- var _makeRequest = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(cloudId, userId) {
100
+ var _makeRequest = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(_cloudId, userId) {
101
101
  var _user$extendedProfile, _user$extendedProfile2, _user$extendedProfile3, _user$extendedProfile4, _user$extendedProfile5;
102
102
  var gatewayGraphqlUrl, urlWithOperationName, userQueryPromise, user, timestring, localWeekdayIndex, timeFormat;
103
103
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
@@ -44,7 +44,7 @@ export var AgentDeleteConfirmationModal = function AgentDeleteConfirmationModal(
44
44
  onClick: onClose
45
45
  }, formatMessage(messages.cancelText)), /*#__PURE__*/React.createElement(Button, {
46
46
  appearance: "danger",
47
- onClick: function onClick(_e, event) {
47
+ onClick: function onClick(_e, _event) {
48
48
  handleDeleteAgent();
49
49
  }
50
50
  }, formatMessage(messages.confirmText))))));
@@ -20,6 +20,6 @@ export declare const buildAggUserQuery: (userId: string) => {
20
20
  export default class UserProfileCardClient extends CachingClient<any> {
21
21
  options: ProfileClientOptions;
22
22
  constructor(options: ProfileClientOptions);
23
- makeRequest(cloudId: string, userId: string): Promise<ProfileCardClientData>;
23
+ makeRequest(_cloudId: string, userId: string): Promise<ProfileCardClientData>;
24
24
  getProfile(cloudId: string, userId: string, analytics?: (event: AnalyticsEventPayload) => void, analyticsNext?: FireEventType): Promise<any>;
25
25
  }
@@ -5,7 +5,13 @@ import { type TriggerProps } from '@atlaskit/popup/types';
5
5
  import { type AnalyticsEventAttributes, type FireEventType } from '@atlaskit/teams-app-internal-analytics';
6
6
  import type { AnalyticsFromDuration, AnalyticsProps, ProfileCardAction, Team, TeamProfileCardTriggerProps, TeamProfileCardTriggerState } from '../../types';
7
7
  export declare class TeamProfileCardTriggerInternal extends React.PureComponent<TeamProfileCardTriggerProps & AnalyticsProps & WrappedComponentProps, TeamProfileCardTriggerState> {
8
- static defaultProps: Partial<TeamProfileCardTriggerProps>;
8
+ static defaultProps: {
9
+ actions: never[];
10
+ trigger: "hover";
11
+ position: "bottom-start";
12
+ triggerLinkType: "link";
13
+ shouldRenderToParent: boolean;
14
+ };
9
15
  _isMounted: boolean;
10
16
  showTimer: number;
11
17
  hideTimer: number;
@@ -20,6 +20,6 @@ export declare const buildAggUserQuery: (userId: string) => {
20
20
  export default class UserProfileCardClient extends CachingClient<any> {
21
21
  options: ProfileClientOptions;
22
22
  constructor(options: ProfileClientOptions);
23
- makeRequest(cloudId: string, userId: string): Promise<ProfileCardClientData>;
23
+ makeRequest(_cloudId: string, userId: string): Promise<ProfileCardClientData>;
24
24
  getProfile(cloudId: string, userId: string, analytics?: (event: AnalyticsEventPayload) => void, analyticsNext?: FireEventType): Promise<any>;
25
25
  }
@@ -5,7 +5,13 @@ import { type TriggerProps } from '@atlaskit/popup/types';
5
5
  import { type AnalyticsEventAttributes, type FireEventType } from '@atlaskit/teams-app-internal-analytics';
6
6
  import type { AnalyticsFromDuration, AnalyticsProps, ProfileCardAction, Team, TeamProfileCardTriggerProps, TeamProfileCardTriggerState } from '../../types';
7
7
  export declare class TeamProfileCardTriggerInternal extends React.PureComponent<TeamProfileCardTriggerProps & AnalyticsProps & WrappedComponentProps, TeamProfileCardTriggerState> {
8
- static defaultProps: Partial<TeamProfileCardTriggerProps>;
8
+ static defaultProps: {
9
+ actions: never[];
10
+ trigger: "hover";
11
+ position: "bottom-start";
12
+ triggerLinkType: "link";
13
+ shouldRenderToParent: boolean;
14
+ };
9
15
  _isMounted: boolean;
10
16
  showTimer: number;
11
17
  hideTimer: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/profilecard",
3
- "version": "24.21.0",
3
+ "version": "24.21.2",
4
4
  "description": "A React component to display a card with user information.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -51,7 +51,7 @@
51
51
  "@atlaskit/feature-gate-js-client": "^5.5.0",
52
52
  "@atlaskit/give-kudos": "^4.4.0",
53
53
  "@atlaskit/heading": "^5.2.0",
54
- "@atlaskit/icon": "^28.5.0",
54
+ "@atlaskit/icon": "^29.0.0",
55
55
  "@atlaskit/link": "^3.2.0",
56
56
  "@atlaskit/logo": "^19.9.0",
57
57
  "@atlaskit/lozenge": "^13.1.0",