@atlaskit/profilecard 23.10.8 → 23.11.0

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 (24) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/cjs/client/getOrgIdForCloudIdFromAGG.js +1 -1
  3. package/dist/cjs/client/getTeamFromAGG.js +1 -1
  4. package/dist/cjs/components/team-profile-card/main.js +2 -1
  5. package/dist/cjs/components/team-profile-card/team-actions/index.js +4 -2
  6. package/dist/cjs/components/team-profile-card/team-actions/more-actions/index.js +4 -2
  7. package/dist/cjs/util/analytics.js +1 -1
  8. package/dist/es2019/client/getOrgIdForCloudIdFromAGG.js +1 -1
  9. package/dist/es2019/client/getTeamFromAGG.js +1 -1
  10. package/dist/es2019/components/team-profile-card/main.js +2 -1
  11. package/dist/es2019/components/team-profile-card/team-actions/index.js +3 -1
  12. package/dist/es2019/components/team-profile-card/team-actions/more-actions/index.js +4 -2
  13. package/dist/es2019/util/analytics.js +1 -1
  14. package/dist/esm/client/getOrgIdForCloudIdFromAGG.js +1 -1
  15. package/dist/esm/client/getTeamFromAGG.js +1 -1
  16. package/dist/esm/components/team-profile-card/main.js +2 -1
  17. package/dist/esm/components/team-profile-card/team-actions/index.js +4 -2
  18. package/dist/esm/components/team-profile-card/team-actions/more-actions/index.js +4 -2
  19. package/dist/esm/util/analytics.js +1 -1
  20. package/dist/types/components/team-profile-card/team-actions/index.d.ts +2 -1
  21. package/dist/types/components/team-profile-card/team-actions/more-actions/index.d.ts +2 -1
  22. package/dist/types-ts4.5/components/team-profile-card/team-actions/index.d.ts +2 -1
  23. package/dist/types-ts4.5/components/team-profile-card/team-actions/more-actions/index.d.ts +2 -1
  24. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/profilecard
2
2
 
3
+ ## 23.11.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#152660](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/152660)
8
+ [`0c6554631c783`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0c6554631c783) -
9
+ [ux] add a loading prop for the more icon button
10
+
3
11
  ## 23.10.8
4
12
 
5
13
  ### Patch Changes
@@ -11,7 +11,7 @@ var _graphqlUtils = require("./graphqlUtils");
11
11
  var ORG_ID_FROM_CLOUD_ID_QUERY = "query OrgIdFromCloudId($cloudId: ID!) {\n\ttenantContexts(cloudIds: [$cloudId]) {\n\t\torgId\n\t}\n}";
12
12
  var addHeaders = function addHeaders(headers) {
13
13
  headers.append('atl-client-name', "@atlaskit/profilecard");
14
- headers.append('atl-client-version', "23.10.8");
14
+ headers.append('atl-client-version', "23.11.0");
15
15
  return headers;
16
16
  };
17
17
  function getOrgIdForCloudIdFromAGG(_x, _x2) {
@@ -66,7 +66,7 @@ var addHeaders = exports.addHeaders = function addHeaders(headers) {
66
66
  headers.append('X-ExperimentalApi', 'teams-beta');
67
67
  headers.append('X-ExperimentalApi', 'team-members-beta');
68
68
  headers.append('atl-client-name', "@atlaskit/profilecard");
69
- headers.append('atl-client-version', "23.10.8");
69
+ headers.append('atl-client-version', "23.11.0");
70
70
  return headers;
71
71
  };
72
72
  function getTeamFromAGG(_x, _x2, _x3) {
@@ -155,7 +155,8 @@ var TeamProfileCard = exports.TeamProfileCard = function TeamProfileCard(_ref3)
155
155
  })), props.isKudosEnabled || props.otherActions ? /*#__PURE__*/_react.default.createElement(_teamActions.ButtonSection, (0, _extends2.default)({
156
156
  teamProfileUrl: teamProfileUrl,
157
157
  cloudId: cloudId,
158
- teamId: teamId
158
+ teamId: teamId,
159
+ loading: loading
159
160
  }, props)) : teamProfileUrl && /*#__PURE__*/_react.default.createElement(_compiled.Stack, {
160
161
  xcss: styles.viewProfileContainerStyles
161
162
  }, /*#__PURE__*/_react.default.createElement(_compiled.Pressable, {
@@ -23,7 +23,7 @@ var _getTeamFromAGG = require("../../../client/getTeamFromAGG");
23
23
  var _analytics = require("../../../util/analytics");
24
24
  var _messages = require("./messages");
25
25
  var _moreActions = require("./more-actions");
26
- var _excluded = ["teamProfileUrl", "isKudosEnabled", "otherActions"];
26
+ var _excluded = ["teamProfileUrl", "isKudosEnabled", "otherActions", "loading"];
27
27
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
28
28
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
29
29
  var GIVE_KUDOS_ACTION_ID = 'give-kudos';
@@ -35,6 +35,7 @@ var ButtonSection = exports.ButtonSection = function ButtonSection(_ref) {
35
35
  var teamProfileUrl = _ref.teamProfileUrl,
36
36
  isKudosEnabled = _ref.isKudosEnabled,
37
37
  otherActions = _ref.otherActions,
38
+ loading = _ref.loading,
38
39
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
39
40
  var _useAnalyticsEvents = (0, _analyticsNext.useAnalyticsEvents)(),
40
41
  createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
@@ -83,7 +84,8 @@ var ButtonSection = exports.ButtonSection = function ButtonSection(_ref) {
83
84
  target: "_blank",
84
85
  shouldFitContainer: true
85
86
  }, formatMessage(_messages.messages.viewProfile))), extraActions.length > 0 && /*#__PURE__*/_react.default.createElement(_moreActions.MoreActions, {
86
- actions: extraActions
87
+ actions: extraActions,
88
+ loading: loading
87
89
  }))), isKudosEnabled && kudosProps && /*#__PURE__*/_react.default.createElement(_react.Suspense, {
88
90
  fallback: null
89
91
  }, /*#__PURE__*/_react.default.createElement(_giveKudos.GiveKudosLauncherLazy, {
@@ -19,7 +19,8 @@ var _messages = require("./messages");
19
19
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
20
20
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
21
21
  var MoreActions = exports.MoreActions = function MoreActions(_ref) {
22
- var actions = _ref.actions;
22
+ var actions = _ref.actions,
23
+ loading = _ref.loading;
23
24
  var _useIntl = (0, _reactIntlNext.useIntl)(),
24
25
  formatMessage = _useIntl.formatMessage;
25
26
  var _useState = (0, _react.useState)(false),
@@ -50,7 +51,8 @@ var MoreActions = exports.MoreActions = function MoreActions(_ref) {
50
51
  onClick: function onClick() {
51
52
  return onMoreClick(!isOpen);
52
53
  },
53
- isSelected: isOpen
54
+ isSelected: isOpen,
55
+ isLoading: loading
54
56
  }));
55
57
  },
56
58
  placement: "right-start",
@@ -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: "23.10.8"
48
+ packageVersion: "23.11.0"
49
49
  }, attributes), {}, {
50
50
  firedAt: Math.round((0, _performance.getPageTime)())
51
51
  })
@@ -6,7 +6,7 @@ const ORG_ID_FROM_CLOUD_ID_QUERY = `query OrgIdFromCloudId($cloudId: ID!) {
6
6
  }`;
7
7
  const addHeaders = headers => {
8
8
  headers.append('atl-client-name', "@atlaskit/profilecard");
9
- headers.append('atl-client-version', "23.10.8");
9
+ headers.append('atl-client-version', "23.11.0");
10
10
  return headers;
11
11
  };
12
12
  export async function getOrgIdForCloudIdFromAGG(url, cloudId) {
@@ -75,7 +75,7 @@ export const addHeaders = headers => {
75
75
  headers.append('X-ExperimentalApi', 'teams-beta');
76
76
  headers.append('X-ExperimentalApi', 'team-members-beta');
77
77
  headers.append('atl-client-name', "@atlaskit/profilecard");
78
- headers.append('atl-client-version', "23.10.8");
78
+ headers.append('atl-client-version', "23.11.0");
79
79
  return headers;
80
80
  };
81
81
  export async function getTeamFromAGG(url, teamId, siteId) {
@@ -140,7 +140,8 @@ export const TeamProfileCard = ({
140
140
  })), props.isKudosEnabled || props.otherActions ? /*#__PURE__*/React.createElement(ButtonSection, _extends({
141
141
  teamProfileUrl: teamProfileUrl,
142
142
  cloudId: cloudId,
143
- teamId: teamId
143
+ teamId: teamId,
144
+ loading: loading
144
145
  }, props)) : teamProfileUrl && /*#__PURE__*/React.createElement(Stack, {
145
146
  xcss: styles.viewProfileContainerStyles
146
147
  }, /*#__PURE__*/React.createElement(Pressable, {
@@ -21,6 +21,7 @@ export const ButtonSection = ({
21
21
  teamProfileUrl,
22
22
  isKudosEnabled,
23
23
  otherActions,
24
+ loading,
24
25
  ...props
25
26
  }) => {
26
27
  const {
@@ -69,7 +70,8 @@ export const ButtonSection = ({
69
70
  target: "_blank",
70
71
  shouldFitContainer: true
71
72
  }, formatMessage(messages.viewProfile))), extraActions.length > 0 && /*#__PURE__*/React.createElement(MoreActions, {
72
- actions: extraActions
73
+ actions: extraActions,
74
+ loading: loading
73
75
  }))), isKudosEnabled && kudosProps && /*#__PURE__*/React.createElement(Suspense, {
74
76
  fallback: null
75
77
  }, /*#__PURE__*/React.createElement(GiveKudosLauncherLazy, {
@@ -8,7 +8,8 @@ import Popup from '@atlaskit/popup';
8
8
  import { Box } from '@atlaskit/primitives';
9
9
  import { messages } from './messages';
10
10
  export const MoreActions = ({
11
- actions
11
+ actions,
12
+ loading
12
13
  }) => {
13
14
  const {
14
15
  formatMessage
@@ -29,7 +30,8 @@ export const MoreActions = ({
29
30
  icon: MoreIcon,
30
31
  label: formatMessage(messages.showMoreIconLabel),
31
32
  onClick: () => onMoreClick(!isOpen),
32
- isSelected: isOpen
33
+ isSelected: isOpen,
34
+ isLoading: loading
33
35
  })),
34
36
  placement: "right-start",
35
37
  shouldRenderToParent: false
@@ -32,7 +32,7 @@ const createEvent = (eventType, action, actionSubject, actionSubjectId, attribut
32
32
  actionSubjectId,
33
33
  attributes: {
34
34
  packageName: "@atlaskit/profilecard",
35
- packageVersion: "23.10.8",
35
+ packageVersion: "23.11.0",
36
36
  ...attributes,
37
37
  firedAt: Math.round(getPageTime())
38
38
  }
@@ -4,7 +4,7 @@ import { AGGQuery } from './graphqlUtils';
4
4
  var ORG_ID_FROM_CLOUD_ID_QUERY = "query OrgIdFromCloudId($cloudId: ID!) {\n\ttenantContexts(cloudIds: [$cloudId]) {\n\t\torgId\n\t}\n}";
5
5
  var addHeaders = function addHeaders(headers) {
6
6
  headers.append('atl-client-name', "@atlaskit/profilecard");
7
- headers.append('atl-client-version', "23.10.8");
7
+ headers.append('atl-client-version', "23.11.0");
8
8
  return headers;
9
9
  };
10
10
  export function getOrgIdForCloudIdFromAGG(_x, _x2) {
@@ -57,7 +57,7 @@ export var addHeaders = function addHeaders(headers) {
57
57
  headers.append('X-ExperimentalApi', 'teams-beta');
58
58
  headers.append('X-ExperimentalApi', 'team-members-beta');
59
59
  headers.append('atl-client-name', "@atlaskit/profilecard");
60
- headers.append('atl-client-version', "23.10.8");
60
+ headers.append('atl-client-version', "23.11.0");
61
61
  return headers;
62
62
  };
63
63
  export function getTeamFromAGG(_x, _x2, _x3) {
@@ -145,7 +145,8 @@ export var TeamProfileCard = function TeamProfileCard(_ref3) {
145
145
  })), props.isKudosEnabled || props.otherActions ? /*#__PURE__*/React.createElement(ButtonSection, _extends({
146
146
  teamProfileUrl: teamProfileUrl,
147
147
  cloudId: cloudId,
148
- teamId: teamId
148
+ teamId: teamId,
149
+ loading: loading
149
150
  }, props)) : teamProfileUrl && /*#__PURE__*/React.createElement(Stack, {
150
151
  xcss: styles.viewProfileContainerStyles
151
152
  }, /*#__PURE__*/React.createElement(Pressable, {
@@ -2,7 +2,7 @@
2
2
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
3
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
5
- var _excluded = ["teamProfileUrl", "isKudosEnabled", "otherActions"];
5
+ var _excluded = ["teamProfileUrl", "isKudosEnabled", "otherActions", "loading"];
6
6
  import "./index.compiled.css";
7
7
  import { ax, ix } from "@compiled/react/runtime";
8
8
  import React, { Suspense, useCallback, useState } from 'react';
@@ -25,6 +25,7 @@ export var ButtonSection = function ButtonSection(_ref) {
25
25
  var teamProfileUrl = _ref.teamProfileUrl,
26
26
  isKudosEnabled = _ref.isKudosEnabled,
27
27
  otherActions = _ref.otherActions,
28
+ loading = _ref.loading,
28
29
  props = _objectWithoutProperties(_ref, _excluded);
29
30
  var _useAnalyticsEvents = useAnalyticsEvents(),
30
31
  createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
@@ -73,7 +74,8 @@ export var ButtonSection = function ButtonSection(_ref) {
73
74
  target: "_blank",
74
75
  shouldFitContainer: true
75
76
  }, formatMessage(messages.viewProfile))), extraActions.length > 0 && /*#__PURE__*/React.createElement(MoreActions, {
76
- actions: extraActions
77
+ actions: extraActions,
78
+ loading: loading
77
79
  }))), isKudosEnabled && kudosProps && /*#__PURE__*/React.createElement(Suspense, {
78
80
  fallback: null
79
81
  }, /*#__PURE__*/React.createElement(GiveKudosLauncherLazy, {
@@ -9,7 +9,8 @@ import Popup from '@atlaskit/popup';
9
9
  import { Box } from '@atlaskit/primitives';
10
10
  import { messages } from './messages';
11
11
  export var MoreActions = function MoreActions(_ref) {
12
- var actions = _ref.actions;
12
+ var actions = _ref.actions,
13
+ loading = _ref.loading;
13
14
  var _useIntl = useIntl(),
14
15
  formatMessage = _useIntl.formatMessage;
15
16
  var _useState = useState(false),
@@ -40,7 +41,8 @@ export var MoreActions = function MoreActions(_ref) {
40
41
  onClick: function onClick() {
41
42
  return onMoreClick(!isOpen);
42
43
  },
43
- isSelected: isOpen
44
+ isSelected: isOpen,
45
+ isLoading: loading
44
46
  }));
45
47
  },
46
48
  placement: "right-start",
@@ -39,7 +39,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
39
39
  actionSubjectId: actionSubjectId,
40
40
  attributes: _objectSpread(_objectSpread({
41
41
  packageName: "@atlaskit/profilecard",
42
- packageVersion: "23.10.8"
42
+ packageVersion: "23.11.0"
43
43
  }, attributes), {}, {
44
44
  firedAt: Math.round(getPageTime())
45
45
  })
@@ -5,6 +5,7 @@ type BaseButtonSectionProps = {
5
5
  otherActions?: ActionItem[];
6
6
  cloudId: string;
7
7
  teamId: string;
8
+ loading?: boolean;
8
9
  };
9
10
  type KudosEnabledProps = BaseButtonSectionProps & {
10
11
  isKudosEnabled: true;
@@ -15,5 +16,5 @@ type KudosDisabledProps = BaseButtonSectionProps & {
15
16
  isKudosEnabled?: false;
16
17
  };
17
18
  export type ButtonSectionProps = KudosEnabledProps | KudosDisabledProps;
18
- export declare const ButtonSection: ({ teamProfileUrl, isKudosEnabled, otherActions, ...props }: ButtonSectionProps) => React.JSX.Element;
19
+ export declare const ButtonSection: ({ teamProfileUrl, isKudosEnabled, otherActions, loading, ...props }: ButtonSectionProps) => React.JSX.Element;
19
20
  export {};
@@ -5,6 +5,7 @@ export type ActionItem = {
5
5
  };
6
6
  type MoreActionsProps = {
7
7
  actions: ActionItem[];
8
+ loading?: boolean;
8
9
  };
9
- export declare const MoreActions: ({ actions }: MoreActionsProps) => React.JSX.Element;
10
+ export declare const MoreActions: ({ actions, loading }: MoreActionsProps) => React.JSX.Element;
10
11
  export {};
@@ -5,6 +5,7 @@ type BaseButtonSectionProps = {
5
5
  otherActions?: ActionItem[];
6
6
  cloudId: string;
7
7
  teamId: string;
8
+ loading?: boolean;
8
9
  };
9
10
  type KudosEnabledProps = BaseButtonSectionProps & {
10
11
  isKudosEnabled: true;
@@ -15,5 +16,5 @@ type KudosDisabledProps = BaseButtonSectionProps & {
15
16
  isKudosEnabled?: false;
16
17
  };
17
18
  export type ButtonSectionProps = KudosEnabledProps | KudosDisabledProps;
18
- export declare const ButtonSection: ({ teamProfileUrl, isKudosEnabled, otherActions, ...props }: ButtonSectionProps) => React.JSX.Element;
19
+ export declare const ButtonSection: ({ teamProfileUrl, isKudosEnabled, otherActions, loading, ...props }: ButtonSectionProps) => React.JSX.Element;
19
20
  export {};
@@ -5,6 +5,7 @@ export type ActionItem = {
5
5
  };
6
6
  type MoreActionsProps = {
7
7
  actions: ActionItem[];
8
+ loading?: boolean;
8
9
  };
9
- export declare const MoreActions: ({ actions }: MoreActionsProps) => React.JSX.Element;
10
+ export declare const MoreActions: ({ actions, loading }: MoreActionsProps) => React.JSX.Element;
10
11
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/profilecard",
3
- "version": "23.10.8",
3
+ "version": "23.11.0",
4
4
  "description": "A React component to display a card with user information.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"