@atlaskit/profilecard 24.2.0 → 24.3.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 (42) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/cjs/client/getOrgIdForCloudIdFromAGG.js +1 -1
  3. package/dist/cjs/client/getTeamFromAGG.js +1 -1
  4. package/dist/cjs/components/Agent/Actions.js +11 -6
  5. package/dist/cjs/util/analytics.js +1 -1
  6. package/dist/es2019/client/getOrgIdForCloudIdFromAGG.js +1 -1
  7. package/dist/es2019/client/getTeamFromAGG.js +1 -1
  8. package/dist/es2019/components/Agent/Actions.js +5 -0
  9. package/dist/es2019/util/analytics.js +1 -1
  10. package/dist/esm/client/getOrgIdForCloudIdFromAGG.js +1 -1
  11. package/dist/esm/client/getTeamFromAGG.js +1 -1
  12. package/dist/esm/components/Agent/Actions.js +11 -4
  13. package/dist/esm/util/analytics.js +1 -1
  14. package/dist/types/components/Agent/lazyAgentProfileCard.d.ts +0 -1
  15. package/dist/types/components/Team/TeamProfileCardTrigger.d.ts +1 -1
  16. package/dist/types/components/Team/lazyTeamProfileCard.d.ts +0 -1
  17. package/dist/types/components/User/ProfileCardResourced.d.ts +1 -1
  18. package/dist/types/components/User/lazyProfileCard.d.ts +0 -1
  19. package/dist/types/components/common/PopupTrigger.d.ts +1 -1
  20. package/dist/types/components/common/types.d.ts +0 -1
  21. package/dist/types/components/team-profile-card/main.d.ts +0 -1
  22. package/dist/types/styled/Card.d.ts +3 -3
  23. package/dist/types/styled/TeamTrigger.d.ts +4 -4
  24. package/dist/types/styled/UserTrigger.d.ts +4 -4
  25. package/dist/types/types.d.ts +1 -1
  26. package/dist/types/util/analytics.d.ts +7 -7
  27. package/dist/types/util/useProfileInfo.d.ts +1 -1
  28. package/dist/types-ts4.5/components/Agent/lazyAgentProfileCard.d.ts +0 -1
  29. package/dist/types-ts4.5/components/Team/TeamProfileCardTrigger.d.ts +1 -1
  30. package/dist/types-ts4.5/components/Team/lazyTeamProfileCard.d.ts +0 -1
  31. package/dist/types-ts4.5/components/User/ProfileCardResourced.d.ts +1 -1
  32. package/dist/types-ts4.5/components/User/lazyProfileCard.d.ts +0 -1
  33. package/dist/types-ts4.5/components/common/PopupTrigger.d.ts +1 -1
  34. package/dist/types-ts4.5/components/common/types.d.ts +0 -1
  35. package/dist/types-ts4.5/components/team-profile-card/main.d.ts +0 -1
  36. package/dist/types-ts4.5/styled/Card.d.ts +3 -3
  37. package/dist/types-ts4.5/styled/TeamTrigger.d.ts +4 -4
  38. package/dist/types-ts4.5/styled/UserTrigger.d.ts +4 -4
  39. package/dist/types-ts4.5/types.d.ts +1 -1
  40. package/dist/types-ts4.5/util/analytics.d.ts +7 -7
  41. package/dist/types-ts4.5/util/useProfileInfo.d.ts +1 -1
  42. package/package.json +9 -6
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @atlaskit/profilecard
2
2
 
3
+ ## 24.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 24.3.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`44102fe3bc0dd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/44102fe3bc0dd) -
14
+ [ux] Hiding agent duplicate entrypoints when user does not have rovo agent create permissions
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies
19
+
3
20
  ## 24.2.0
4
21
 
5
22
  ### Minor 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', "24.1.1");
14
+ headers.append('atl-client-version', "24.3.0");
15
15
  return headers;
16
16
  };
17
17
  function getOrgIdForCloudIdFromAGG(_x, _x2) {
@@ -65,7 +65,7 @@ var addHeaders = exports.addHeaders = function addHeaders(headers) {
65
65
  headers.append('X-ExperimentalApi', 'teams-beta');
66
66
  headers.append('X-ExperimentalApi', 'team-members-beta');
67
67
  headers.append('atl-client-name', "@atlaskit/profilecard");
68
- headers.append('atl-client-version', "24.1.1");
68
+ headers.append('atl-client-version', "24.3.0");
69
69
  return headers;
70
70
  };
71
71
  function getTeamFromAGG(_x, _x2, _x3) {
@@ -7,19 +7,21 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.AgentActions = void 0;
9
9
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
10
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
11
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
11
12
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
12
13
  var _react = _interopRequireWildcard(require("react"));
13
14
  var _reactIntlNext = require("react-intl-next");
14
15
  var _analyticsNext = require("@atlaskit/analytics-next");
15
16
  var _new = _interopRequireDefault(require("@atlaskit/button/new"));
17
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
16
18
  var _primitives = require("@atlaskit/primitives");
17
19
  var _rovoAgentComponents = require("@atlaskit/rovo-agent-components");
18
20
  var _analytics = require("../../util/analytics");
19
21
  var _AgentDeleteConfirmationModal = require("./AgentDeleteConfirmationModal");
20
22
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
21
- // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled go/akcss
22
-
23
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
24
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
23
25
  var chatToAgentButtonContainer = (0, _primitives.xcss)({
24
26
  width: '100%'
25
27
  });
@@ -68,7 +70,7 @@ var AgentActions = exports.AgentActions = function AgentActions(_ref) {
68
70
  setIsDeleteModalOpen = _useState2[1];
69
71
  var isForgeAgent = agent.creator_type === 'FORGE' || agent.creator_type === 'THIRD_PARTY';
70
72
  var loadAgentPermissions = (0, _react.useCallback)( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
71
- var _yield$resourceClient, _yield$resourceClient2, AGENT_UPDATE, AGENT_DEACTIVATE;
73
+ var _yield$resourceClient, _yield$resourceClient2, AGENT_CREATE, AGENT_UPDATE, AGENT_DEACTIVATE;
72
74
  return _regenerator.default.wrap(function _callee$(_context) {
73
75
  while (1) switch (_context.prev = _context.next) {
74
76
  case 0:
@@ -77,13 +79,16 @@ var AgentActions = exports.AgentActions = function AgentActions(_ref) {
77
79
  case 2:
78
80
  _yield$resourceClient = _context.sent;
79
81
  _yield$resourceClient2 = _yield$resourceClient.permissions;
82
+ AGENT_CREATE = _yield$resourceClient2.AGENT_CREATE;
80
83
  AGENT_UPDATE = _yield$resourceClient2.AGENT_UPDATE;
81
84
  AGENT_DEACTIVATE = _yield$resourceClient2.AGENT_DEACTIVATE;
82
- return _context.abrupt("return", {
85
+ return _context.abrupt("return", _objectSpread(_objectSpread({}, (0, _platformFeatureFlags.fg)('agent_studio_fe_permissions_settings_m1') && {
86
+ isCreateEnabled: AGENT_CREATE.permitted
87
+ }), {}, {
83
88
  isEditEnabled: AGENT_UPDATE.permitted,
84
89
  isDeleteEnabled: AGENT_DEACTIVATE.permitted
85
- });
86
- case 7:
90
+ }));
91
+ case 8:
87
92
  case "end":
88
93
  return _context.stop();
89
94
  }
@@ -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: "24.1.1"
48
+ packageVersion: "24.3.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', "24.1.1");
9
+ headers.append('atl-client-version', "24.3.0");
10
10
  return headers;
11
11
  };
12
12
  export async function getOrgIdForCloudIdFromAGG(url, cloudId) {
@@ -74,7 +74,7 @@ export const addHeaders = headers => {
74
74
  headers.append('X-ExperimentalApi', 'teams-beta');
75
75
  headers.append('X-ExperimentalApi', 'team-members-beta');
76
76
  headers.append('atl-client-name', "@atlaskit/profilecard");
77
- headers.append('atl-client-version', "24.1.1");
77
+ headers.append('atl-client-version', "24.3.0");
78
78
  return headers;
79
79
  };
80
80
  export async function getTeamFromAGG(url, teamId, siteId) {
@@ -2,6 +2,7 @@ import React, { useCallback, useState } from 'react';
2
2
  import { defineMessages, useIntl } from 'react-intl-next';
3
3
  import { useAnalyticsEvents } from '@atlaskit/analytics-next';
4
4
  import Button from '@atlaskit/button/new';
5
+ import { fg } from '@atlaskit/platform-feature-flags';
5
6
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
6
7
  import { Box, Inline, xcss } from '@atlaskit/primitives';
7
8
  import { AgentDropdownMenu, ChatPillIcon } from '@atlaskit/rovo-agent-components';
@@ -57,11 +58,15 @@ export const AgentActions = ({
57
58
  const loadAgentPermissions = useCallback(async () => {
58
59
  const {
59
60
  permissions: {
61
+ AGENT_CREATE,
60
62
  AGENT_UPDATE,
61
63
  AGENT_DEACTIVATE
62
64
  }
63
65
  } = await resourceClient.getRovoAgentPermissions(agent.id);
64
66
  return {
67
+ ...(fg('agent_studio_fe_permissions_settings_m1') && {
68
+ isCreateEnabled: AGENT_CREATE.permitted
69
+ }),
65
70
  isEditEnabled: AGENT_UPDATE.permitted,
66
71
  isDeleteEnabled: AGENT_DEACTIVATE.permitted
67
72
  };
@@ -32,7 +32,7 @@ const createEvent = (eventType, action, actionSubject, actionSubjectId, attribut
32
32
  actionSubjectId,
33
33
  attributes: {
34
34
  packageName: "@atlaskit/profilecard",
35
- packageVersion: "24.1.1",
35
+ packageVersion: "24.3.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', "24.1.1");
7
+ headers.append('atl-client-version', "24.3.0");
8
8
  return headers;
9
9
  };
10
10
  export function getOrgIdForCloudIdFromAGG(_x, _x2) {
@@ -56,7 +56,7 @@ export var addHeaders = function addHeaders(headers) {
56
56
  headers.append('X-ExperimentalApi', 'teams-beta');
57
57
  headers.append('X-ExperimentalApi', 'team-members-beta');
58
58
  headers.append('atl-client-name', "@atlaskit/profilecard");
59
- headers.append('atl-client-version', "24.1.1");
59
+ headers.append('atl-client-version', "24.3.0");
60
60
  return headers;
61
61
  };
62
62
  export function getTeamFromAGG(_x, _x2, _x3) {
@@ -1,10 +1,14 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
1
2
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
4
  import _regeneratorRuntime from "@babel/runtime/regenerator";
5
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
6
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
7
  import React, { useCallback, useState } from 'react';
5
8
  import { defineMessages, useIntl } from 'react-intl-next';
6
9
  import { useAnalyticsEvents } from '@atlaskit/analytics-next';
7
10
  import Button from '@atlaskit/button/new';
11
+ import { fg } from '@atlaskit/platform-feature-flags';
8
12
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
9
13
  import { Box, Inline, xcss } from '@atlaskit/primitives';
10
14
  import { AgentDropdownMenu, ChatPillIcon } from '@atlaskit/rovo-agent-components';
@@ -58,7 +62,7 @@ export var AgentActions = function AgentActions(_ref) {
58
62
  setIsDeleteModalOpen = _useState2[1];
59
63
  var isForgeAgent = agent.creator_type === 'FORGE' || agent.creator_type === 'THIRD_PARTY';
60
64
  var loadAgentPermissions = useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
61
- var _yield$resourceClient, _yield$resourceClient2, AGENT_UPDATE, AGENT_DEACTIVATE;
65
+ var _yield$resourceClient, _yield$resourceClient2, AGENT_CREATE, AGENT_UPDATE, AGENT_DEACTIVATE;
62
66
  return _regeneratorRuntime.wrap(function _callee$(_context) {
63
67
  while (1) switch (_context.prev = _context.next) {
64
68
  case 0:
@@ -67,13 +71,16 @@ export var AgentActions = function AgentActions(_ref) {
67
71
  case 2:
68
72
  _yield$resourceClient = _context.sent;
69
73
  _yield$resourceClient2 = _yield$resourceClient.permissions;
74
+ AGENT_CREATE = _yield$resourceClient2.AGENT_CREATE;
70
75
  AGENT_UPDATE = _yield$resourceClient2.AGENT_UPDATE;
71
76
  AGENT_DEACTIVATE = _yield$resourceClient2.AGENT_DEACTIVATE;
72
- return _context.abrupt("return", {
77
+ return _context.abrupt("return", _objectSpread(_objectSpread({}, fg('agent_studio_fe_permissions_settings_m1') && {
78
+ isCreateEnabled: AGENT_CREATE.permitted
79
+ }), {}, {
73
80
  isEditEnabled: AGENT_UPDATE.permitted,
74
81
  isDeleteEnabled: AGENT_DEACTIVATE.permitted
75
- });
76
- case 7:
82
+ }));
83
+ case 8:
77
84
  case "end":
78
85
  return _context.stop();
79
86
  }
@@ -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: "24.1.1"
42
+ packageVersion: "24.3.0"
43
43
  }, attributes), {}, {
44
44
  firedAt: Math.round(getPageTime())
45
45
  })
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const AgentProfileCardLazy: import("react").LazyExoticComponent<({ agent, isLoading, cloudId, onChatClick, hasError, errorType, onConversationStartersClick, resourceClient, addFlag, }: import("../../types").AgentProfileCardProps) => import("react").JSX.Element>;
@@ -49,6 +49,6 @@ export declare class TeamProfileCardTriggerInternal extends React.PureComponent<
49
49
  render(): string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
50
50
  }
51
51
  declare const _default: React.ForwardRefExoticComponent<Omit<Omit<TeamProfileCardTriggerProps & AnalyticsProps & WrappedComponentProps, "intl"> & {
52
- forwardedRef?: React.Ref<any> | undefined;
52
+ forwardedRef?: React.Ref<any>;
53
53
  }, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any>>;
54
54
  export default _default;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const TeamProfileCardLazy: import("react").LazyExoticComponent<(props: import("../../types").TeamProfilecardProps) => import("react").JSX.Element | null>;
@@ -18,7 +18,7 @@ declare class ProfileCardResourced extends React.PureComponent<ProfileCardResour
18
18
  render(): React.ReactNode;
19
19
  }
20
20
  export declare const ProfileCardResourcedInternal: typeof ProfileCardResourced;
21
- declare const _default: React.ForwardRefExoticComponent<Pick<Omit<ProfileCardResourcedProps & AnalyticsProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, never> & {
21
+ declare const _default: React.ForwardRefExoticComponent<Pick<Omit<ProfileCardResourcedProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, never> & {
22
22
  cloudId?: string | undefined;
23
23
  resourceClient?: import("../../types").ProfileClient | undefined;
24
24
  actions?: ProfileCardAction[] | undefined;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const ProfileCardLazy: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<Omit<import("../..").ProfilecardProps & import("../../types").AnalyticsProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & import("react").RefAttributes<any>>>;
@@ -4,4 +4,4 @@ import { type ProfileCardTriggerProps } from './types';
4
4
  export declare const PopupTrigger: <T>(props: Partial<TriggerProps> & {
5
5
  showProfilecard: () => void;
6
6
  hideProfilecard: () => void;
7
- } & Pick<ProfileCardTriggerProps<T>, 'ariaLabelledBy' | 'trigger' | 'children'> & React.RefAttributes<HTMLSpanElement>) => JSX.Element;
7
+ } & Pick<ProfileCardTriggerProps<T>, "ariaLabelledBy" | "trigger" | "children"> & React.RefAttributes<HTMLSpanElement>) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { type AnalyticsEventPayload } from '@atlaskit/analytics-next';
3
2
  import { type PopupProps } from '@atlaskit/popup';
4
3
  import { type ProfileCardErrorType, type ProfileType } from '../../types';
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { type AvatarProps } from '@atlaskit/avatar-group';
3
2
  import { type TeamActionsProps } from './team-actions';
4
3
  export type TeamProfileCardProps = {
@@ -13,11 +13,11 @@ export declare const AnimatedKudosButton: ({ children }: {
13
13
  }) => React.JSX.Element;
14
14
  export declare const ActionButtonGroup: ({ children, testId, }: {
15
15
  children: ReactNode;
16
- testId?: string | undefined;
16
+ testId?: string;
17
17
  }) => React.JSX.Element;
18
18
  export declare const OverflowActionButtonsWrapper: ({ children, testId, }: {
19
19
  children: ReactNode;
20
- testId?: string | undefined;
20
+ testId?: string;
21
21
  }) => React.JSX.Element;
22
22
  export declare const CardContent: ({ children }: {
23
23
  children: ReactNode;
@@ -48,7 +48,7 @@ interface CardContainerProps {
48
48
  export declare const CardContainer: ({ children, isDisabledUser, withoutElevation, }: CardContainerProps) => React.JSX.Element;
49
49
  export declare const DetailsLabel: ({ children, extraTopSpace, }: {
50
50
  children: ReactNode;
51
- extraTopSpace?: boolean | undefined;
51
+ extraTopSpace?: boolean;
52
52
  }) => React.JSX.Element;
53
53
  export declare const DetailsLabelIcon: ({ children }: {
54
54
  children: ReactNode;
@@ -1,13 +1,13 @@
1
1
  import React from 'react';
2
2
  export declare const CardTriggerWrapper: () => React.JSX.Element;
3
3
  export declare const CardWrapper: ({ testId, children, }: {
4
- testId?: string | undefined;
4
+ testId?: string;
5
5
  children: React.ReactNode;
6
6
  }) => React.JSX.Element;
7
7
  export declare const CardHeader: ({ image, isLoading, label, }: {
8
- image?: string | undefined;
9
- isLoading?: boolean | undefined;
10
- label?: string | undefined;
8
+ image?: string;
9
+ isLoading?: boolean;
10
+ label?: string;
11
11
  }) => React.JSX.Element;
12
12
  export declare const CardContent: (props: {
13
13
  children: React.ReactNode;
@@ -1,11 +1,11 @@
1
1
  import React, { type ReactNode } from 'react';
2
2
  export declare const CardWrapper: ({ children, role, testId, labelledBy, }: {
3
3
  children: ReactNode;
4
- role?: string | undefined;
5
- testId?: string | undefined;
6
- labelledBy?: string | undefined;
4
+ role?: string;
5
+ testId?: string;
6
+ labelledBy?: string;
7
7
  }) => React.JSX.Element;
8
8
  export declare const SpinnerContainer: ({ children, testId, }: {
9
9
  children: ReactNode;
10
- testId?: string | undefined;
10
+ testId?: string;
11
11
  }) => React.JSX.Element;
@@ -451,7 +451,7 @@ export type AgentIdType = {
451
451
  type: 'agent' | 'identity';
452
452
  value: string;
453
453
  };
454
- type AgentPermissionName = 'AGENT_UPDATE' | 'AGENT_DEACTIVATE';
454
+ type AgentPermissionName = 'AGENT_CREATE' | 'AGENT_UPDATE' | 'AGENT_DEACTIVATE';
455
455
  export type AgentPermissions = {
456
456
  permissions: Record<AgentPermissionName, {
457
457
  permitted: boolean;
@@ -12,16 +12,16 @@ interface AnalyticsEvent {
12
12
  source?: string;
13
13
  }
14
14
  export declare const fireEvent: (createAnalyticsEvent: CreateUIAnalyticsEvent | undefined, body: AnalyticsEvent) => void;
15
- export declare const cardTriggered: (type: ProfileType, method: 'hover' | 'click', teamId?: string) => AnalyticsEventPayload;
16
- export declare const teamRequestAnalytics: (action: 'triggered' | 'succeeded' | 'failed', attributes?: {
15
+ export declare const cardTriggered: (type: ProfileType, method: "hover" | "click", teamId?: string) => AnalyticsEventPayload;
16
+ export declare const teamRequestAnalytics: (action: "triggered" | "succeeded" | "failed", attributes?: {
17
17
  duration: number;
18
18
  } & GenericAttributes) => AnalyticsEventPayload;
19
- export declare const userRequestAnalytics: (action: 'triggered' | 'succeeded' | 'failed', attributes?: {
19
+ export declare const userRequestAnalytics: (action: "triggered" | "succeeded" | "failed", attributes?: {
20
20
  duration: number;
21
21
  } & GenericAttributes) => AnalyticsEventPayload;
22
- export declare const profileCardRendered: (type: ProfileType, actionSubjectId: 'spinner' | 'content' | 'error' | 'errorBoundary', attributes?: {
22
+ export declare const profileCardRendered: (type: ProfileType, actionSubjectId: "spinner" | "content" | "error" | "errorBoundary", attributes?: {
23
23
  duration?: number;
24
- errorType?: 'default' | 'NotFound';
24
+ errorType?: "default" | "NotFound";
25
25
  hasRetry?: boolean;
26
26
  numActions?: number;
27
27
  memberCount?: number;
@@ -37,7 +37,7 @@ export declare const actionClicked: (type: ProfileType, attributes: {
37
37
  actionId: string;
38
38
  }) => AnalyticsEventPayload;
39
39
  export declare const reportingLinesClicked: (attributes: {
40
- userType: 'manager' | 'direct-report';
40
+ userType: "manager" | "direct-report";
41
41
  duration: number;
42
42
  }) => AnalyticsEventPayload;
43
43
  export declare const moreActionsClicked: (type: ProfileType, attributes: {
@@ -57,7 +57,7 @@ export declare const moreMembersClicked: (attributes: {
57
57
  export declare const errorRetryClicked: (attributes: {
58
58
  duration: number;
59
59
  }) => AnalyticsEventPayload;
60
- export declare const agentRequestAnalytics: (action: 'triggered' | 'succeeded' | 'failed', actionSubjectId?: string, attributes?: {
60
+ export declare const agentRequestAnalytics: (action: "triggered" | "succeeded" | "failed", actionSubjectId?: string, attributes?: {
61
61
  duration: number;
62
62
  } & GenericAttributes) => AnalyticsEventPayload;
63
63
  export {};
@@ -1,5 +1,5 @@
1
1
  export declare const useProfileInfo: <T>({ fetchUserProfile, }: {
2
- fetchUserProfile?: (() => Promise<T>) | undefined;
2
+ fetchUserProfile?: () => Promise<T>;
3
3
  }) => {
4
4
  profileData: T | undefined;
5
5
  isLoading: boolean;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const AgentProfileCardLazy: import("react").LazyExoticComponent<({ agent, isLoading, cloudId, onChatClick, hasError, errorType, onConversationStartersClick, resourceClient, addFlag, }: import("../../types").AgentProfileCardProps) => import("react").JSX.Element>;
@@ -49,6 +49,6 @@ export declare class TeamProfileCardTriggerInternal extends React.PureComponent<
49
49
  render(): string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
50
50
  }
51
51
  declare const _default: React.ForwardRefExoticComponent<Omit<Omit<TeamProfileCardTriggerProps & AnalyticsProps & WrappedComponentProps, "intl"> & {
52
- forwardedRef?: React.Ref<any> | undefined;
52
+ forwardedRef?: React.Ref<any>;
53
53
  }, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any>>;
54
54
  export default _default;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const TeamProfileCardLazy: import("react").LazyExoticComponent<(props: import("../../types").TeamProfilecardProps) => import("react").JSX.Element | null>;
@@ -18,7 +18,7 @@ declare class ProfileCardResourced extends React.PureComponent<ProfileCardResour
18
18
  render(): React.ReactNode;
19
19
  }
20
20
  export declare const ProfileCardResourcedInternal: typeof ProfileCardResourced;
21
- declare const _default: React.ForwardRefExoticComponent<Pick<Omit<ProfileCardResourcedProps & AnalyticsProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, never> & {
21
+ declare const _default: React.ForwardRefExoticComponent<Pick<Omit<ProfileCardResourcedProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, never> & {
22
22
  cloudId?: string | undefined;
23
23
  resourceClient?: import("../../types").ProfileClient | undefined;
24
24
  actions?: ProfileCardAction[] | undefined;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const ProfileCardLazy: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<Omit<import("../..").ProfilecardProps & import("../../types").AnalyticsProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & import("react").RefAttributes<any>>>;
@@ -4,4 +4,4 @@ import { type ProfileCardTriggerProps } from './types';
4
4
  export declare const PopupTrigger: <T>(props: Partial<TriggerProps> & {
5
5
  showProfilecard: () => void;
6
6
  hideProfilecard: () => void;
7
- } & Pick<ProfileCardTriggerProps<T>, 'ariaLabelledBy' | 'trigger' | 'children'> & React.RefAttributes<HTMLSpanElement>) => JSX.Element;
7
+ } & Pick<ProfileCardTriggerProps<T>, "ariaLabelledBy" | "trigger" | "children"> & React.RefAttributes<HTMLSpanElement>) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { type AnalyticsEventPayload } from '@atlaskit/analytics-next';
3
2
  import { type PopupProps } from '@atlaskit/popup';
4
3
  import { type ProfileCardErrorType, type ProfileType } from '../../types';
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { type AvatarProps } from '@atlaskit/avatar-group';
3
2
  import { type TeamActionsProps } from './team-actions';
4
3
  export type TeamProfileCardProps = {
@@ -13,11 +13,11 @@ export declare const AnimatedKudosButton: ({ children }: {
13
13
  }) => React.JSX.Element;
14
14
  export declare const ActionButtonGroup: ({ children, testId, }: {
15
15
  children: ReactNode;
16
- testId?: string | undefined;
16
+ testId?: string;
17
17
  }) => React.JSX.Element;
18
18
  export declare const OverflowActionButtonsWrapper: ({ children, testId, }: {
19
19
  children: ReactNode;
20
- testId?: string | undefined;
20
+ testId?: string;
21
21
  }) => React.JSX.Element;
22
22
  export declare const CardContent: ({ children }: {
23
23
  children: ReactNode;
@@ -48,7 +48,7 @@ interface CardContainerProps {
48
48
  export declare const CardContainer: ({ children, isDisabledUser, withoutElevation, }: CardContainerProps) => React.JSX.Element;
49
49
  export declare const DetailsLabel: ({ children, extraTopSpace, }: {
50
50
  children: ReactNode;
51
- extraTopSpace?: boolean | undefined;
51
+ extraTopSpace?: boolean;
52
52
  }) => React.JSX.Element;
53
53
  export declare const DetailsLabelIcon: ({ children }: {
54
54
  children: ReactNode;
@@ -1,13 +1,13 @@
1
1
  import React from 'react';
2
2
  export declare const CardTriggerWrapper: () => React.JSX.Element;
3
3
  export declare const CardWrapper: ({ testId, children, }: {
4
- testId?: string | undefined;
4
+ testId?: string;
5
5
  children: React.ReactNode;
6
6
  }) => React.JSX.Element;
7
7
  export declare const CardHeader: ({ image, isLoading, label, }: {
8
- image?: string | undefined;
9
- isLoading?: boolean | undefined;
10
- label?: string | undefined;
8
+ image?: string;
9
+ isLoading?: boolean;
10
+ label?: string;
11
11
  }) => React.JSX.Element;
12
12
  export declare const CardContent: (props: {
13
13
  children: React.ReactNode;
@@ -1,11 +1,11 @@
1
1
  import React, { type ReactNode } from 'react';
2
2
  export declare const CardWrapper: ({ children, role, testId, labelledBy, }: {
3
3
  children: ReactNode;
4
- role?: string | undefined;
5
- testId?: string | undefined;
6
- labelledBy?: string | undefined;
4
+ role?: string;
5
+ testId?: string;
6
+ labelledBy?: string;
7
7
  }) => React.JSX.Element;
8
8
  export declare const SpinnerContainer: ({ children, testId, }: {
9
9
  children: ReactNode;
10
- testId?: string | undefined;
10
+ testId?: string;
11
11
  }) => React.JSX.Element;
@@ -457,7 +457,7 @@ export type AgentIdType = {
457
457
  type: 'agent' | 'identity';
458
458
  value: string;
459
459
  };
460
- type AgentPermissionName = 'AGENT_UPDATE' | 'AGENT_DEACTIVATE';
460
+ type AgentPermissionName = 'AGENT_CREATE' | 'AGENT_UPDATE' | 'AGENT_DEACTIVATE';
461
461
  export type AgentPermissions = {
462
462
  permissions: Record<AgentPermissionName, {
463
463
  permitted: boolean;
@@ -12,16 +12,16 @@ interface AnalyticsEvent {
12
12
  source?: string;
13
13
  }
14
14
  export declare const fireEvent: (createAnalyticsEvent: CreateUIAnalyticsEvent | undefined, body: AnalyticsEvent) => void;
15
- export declare const cardTriggered: (type: ProfileType, method: 'hover' | 'click', teamId?: string) => AnalyticsEventPayload;
16
- export declare const teamRequestAnalytics: (action: 'triggered' | 'succeeded' | 'failed', attributes?: {
15
+ export declare const cardTriggered: (type: ProfileType, method: "hover" | "click", teamId?: string) => AnalyticsEventPayload;
16
+ export declare const teamRequestAnalytics: (action: "triggered" | "succeeded" | "failed", attributes?: {
17
17
  duration: number;
18
18
  } & GenericAttributes) => AnalyticsEventPayload;
19
- export declare const userRequestAnalytics: (action: 'triggered' | 'succeeded' | 'failed', attributes?: {
19
+ export declare const userRequestAnalytics: (action: "triggered" | "succeeded" | "failed", attributes?: {
20
20
  duration: number;
21
21
  } & GenericAttributes) => AnalyticsEventPayload;
22
- export declare const profileCardRendered: (type: ProfileType, actionSubjectId: 'spinner' | 'content' | 'error' | 'errorBoundary', attributes?: {
22
+ export declare const profileCardRendered: (type: ProfileType, actionSubjectId: "spinner" | "content" | "error" | "errorBoundary", attributes?: {
23
23
  duration?: number;
24
- errorType?: 'default' | 'NotFound';
24
+ errorType?: "default" | "NotFound";
25
25
  hasRetry?: boolean;
26
26
  numActions?: number;
27
27
  memberCount?: number;
@@ -37,7 +37,7 @@ export declare const actionClicked: (type: ProfileType, attributes: {
37
37
  actionId: string;
38
38
  }) => AnalyticsEventPayload;
39
39
  export declare const reportingLinesClicked: (attributes: {
40
- userType: 'manager' | 'direct-report';
40
+ userType: "manager" | "direct-report";
41
41
  duration: number;
42
42
  }) => AnalyticsEventPayload;
43
43
  export declare const moreActionsClicked: (type: ProfileType, attributes: {
@@ -57,7 +57,7 @@ export declare const moreMembersClicked: (attributes: {
57
57
  export declare const errorRetryClicked: (attributes: {
58
58
  duration: number;
59
59
  }) => AnalyticsEventPayload;
60
- export declare const agentRequestAnalytics: (action: 'triggered' | 'succeeded' | 'failed', actionSubjectId?: string, attributes?: {
60
+ export declare const agentRequestAnalytics: (action: "triggered" | "succeeded" | "failed", actionSubjectId?: string, attributes?: {
61
61
  duration: number;
62
62
  } & GenericAttributes) => AnalyticsEventPayload;
63
63
  export {};
@@ -1,5 +1,5 @@
1
1
  export declare const useProfileInfo: <T>({ fetchUserProfile, }: {
2
- fetchUserProfile?: (() => Promise<T>) | undefined;
2
+ fetchUserProfile?: () => Promise<T>;
3
3
  }) => {
4
4
  profileData: T | undefined;
5
5
  isLoading: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/profilecard",
3
- "version": "24.2.0",
3
+ "version": "24.3.1",
4
4
  "description": "A React component to display a card with user information.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -53,7 +53,7 @@
53
53
  "@atlaskit/analytics-next": "^11.1.0",
54
54
  "@atlaskit/atlassian-context": "^0.4.0",
55
55
  "@atlaskit/avatar": "^25.1.0",
56
- "@atlaskit/avatar-group": "^12.1.0",
56
+ "@atlaskit/avatar-group": "^12.2.0",
57
57
  "@atlaskit/button": "^23.3.0",
58
58
  "@atlaskit/css": "^0.12.0",
59
59
  "@atlaskit/dropdown-menu": "^16.3.0",
@@ -61,7 +61,7 @@
61
61
  "@atlaskit/feature-gate-js-client": "^5.5.0",
62
62
  "@atlaskit/give-kudos": "^4.3.0",
63
63
  "@atlaskit/heading": "^5.2.0",
64
- "@atlaskit/icon": "^27.10.0",
64
+ "@atlaskit/icon": "^27.11.0",
65
65
  "@atlaskit/link": "^3.2.0",
66
66
  "@atlaskit/logo": "^19.6.0",
67
67
  "@atlaskit/lozenge": "^13.0.0",
@@ -71,12 +71,12 @@
71
71
  "@atlaskit/platform-feature-flags": "^1.1.0",
72
72
  "@atlaskit/popup": "^4.3.0",
73
73
  "@atlaskit/primitives": "^14.11.0",
74
- "@atlaskit/rovo-agent-components": "^3.0.0",
75
- "@atlaskit/rovo-triggers": "^3.1.0",
74
+ "@atlaskit/rovo-agent-components": "^3.1.0",
75
+ "@atlaskit/rovo-triggers": "^3.2.0",
76
76
  "@atlaskit/spinner": "^19.0.0",
77
77
  "@atlaskit/teams-app-config": "^1.11.0",
78
78
  "@atlaskit/teams-avatar": "^2.3.0",
79
- "@atlaskit/teams-public": "^0.52.0",
79
+ "@atlaskit/teams-public": "^0.53.0",
80
80
  "@atlaskit/theme": "^19.0.0",
81
81
  "@atlaskit/tokens": "^6.0.0",
82
82
  "@atlaskit/tooltip": "^20.4.0",
@@ -173,6 +173,9 @@
173
173
  },
174
174
  "platform_editor_profilecard_style_fix": {
175
175
  "type": "boolean"
176
+ },
177
+ "agent_studio_fe_permissions_settings_m1": {
178
+ "type": "boolean"
176
179
  }
177
180
  },
178
181
  "sideEffects": [