@atlaskit/profilecard 24.40.2 → 24.41.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 (81) hide show
  1. package/CHANGELOG.md +12 -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 +1 -1
  5. package/dist/cjs/components/Agent/AgentProfileCard.js +6 -3
  6. package/dist/cjs/components/Agent/AgentProfileCardResourced.js +2 -1
  7. package/dist/cjs/components/Agent/AgentProfileCardWrapper.js +1 -1
  8. package/dist/cjs/components/User/ProfileCardDetails.js +2 -2
  9. package/dist/cjs/components/User/ProfileCardResourced.js +10 -3
  10. package/dist/cjs/components/User/ProfileCardTrigger.js +20 -11
  11. package/dist/cjs/components/User/ReportingLinesDetails.js +1 -1
  12. package/dist/cjs/components/common/ProfileCardWrapper.js +1 -1
  13. package/dist/cjs/components/team-profile-card/main.js +1 -1
  14. package/dist/cjs/components/team-profile-card/team-connections/main.js +1 -1
  15. package/dist/cjs/components/team-profile-card/team-containers-skeleton/index.js +1 -1
  16. package/dist/cjs/components/team-profile-card/team-containers-skeleton/linked-container-card-skeleton/index.js +1 -1
  17. package/dist/cjs/styled/Card.js +1 -1
  18. package/dist/cjs/styled/CoverImage.js +1 -1
  19. package/dist/cjs/styled/Error.js +1 -1
  20. package/dist/cjs/styled/ReportingLines.js +1 -1
  21. package/dist/cjs/styled/TeamCard.js +1 -1
  22. package/dist/cjs/styled/TeamTrigger.js +1 -1
  23. package/dist/cjs/styled/UserTrigger.js +1 -1
  24. package/dist/cjs/util/analytics.js +2 -2
  25. package/dist/es2019/client/getOrgIdForCloudIdFromAGG.js +1 -1
  26. package/dist/es2019/client/getTeamFromAGG.js +1 -1
  27. package/dist/es2019/components/Agent/Actions.js +1 -1
  28. package/dist/es2019/components/Agent/AgentProfileCard.js +5 -3
  29. package/dist/es2019/components/Agent/AgentProfileCardResourced.js +2 -1
  30. package/dist/es2019/components/Agent/AgentProfileCardWrapper.js +1 -1
  31. package/dist/es2019/components/User/ProfileCardDetails.js +2 -2
  32. package/dist/es2019/components/User/ProfileCardResourced.js +10 -3
  33. package/dist/es2019/components/User/ProfileCardTrigger.js +12 -3
  34. package/dist/es2019/components/User/ReportingLinesDetails.js +1 -1
  35. package/dist/es2019/components/common/ProfileCardWrapper.js +1 -1
  36. package/dist/es2019/components/team-profile-card/main.js +1 -1
  37. package/dist/es2019/components/team-profile-card/team-connections/main.js +1 -1
  38. package/dist/es2019/components/team-profile-card/team-containers-skeleton/index.js +1 -1
  39. package/dist/es2019/components/team-profile-card/team-containers-skeleton/linked-container-card-skeleton/index.js +1 -1
  40. package/dist/es2019/styled/Card.js +1 -1
  41. package/dist/es2019/styled/CoverImage.js +1 -1
  42. package/dist/es2019/styled/Error.js +1 -1
  43. package/dist/es2019/styled/ReportingLines.js +1 -1
  44. package/dist/es2019/styled/TeamCard.js +1 -1
  45. package/dist/es2019/styled/TeamTrigger.js +1 -1
  46. package/dist/es2019/styled/UserTrigger.js +1 -1
  47. package/dist/es2019/util/analytics.js +2 -2
  48. package/dist/esm/client/getOrgIdForCloudIdFromAGG.js +1 -1
  49. package/dist/esm/client/getTeamFromAGG.js +1 -1
  50. package/dist/esm/components/Agent/Actions.js +1 -1
  51. package/dist/esm/components/Agent/AgentProfileCard.js +6 -3
  52. package/dist/esm/components/Agent/AgentProfileCardResourced.js +2 -1
  53. package/dist/esm/components/Agent/AgentProfileCardWrapper.js +1 -1
  54. package/dist/esm/components/User/ProfileCardDetails.js +2 -2
  55. package/dist/esm/components/User/ProfileCardResourced.js +10 -3
  56. package/dist/esm/components/User/ProfileCardTrigger.js +20 -11
  57. package/dist/esm/components/User/ReportingLinesDetails.js +1 -1
  58. package/dist/esm/components/common/ProfileCardWrapper.js +1 -1
  59. package/dist/esm/components/team-profile-card/main.js +1 -1
  60. package/dist/esm/components/team-profile-card/team-connections/main.js +1 -1
  61. package/dist/esm/components/team-profile-card/team-containers-skeleton/index.js +1 -1
  62. package/dist/esm/components/team-profile-card/team-containers-skeleton/linked-container-card-skeleton/index.js +1 -1
  63. package/dist/esm/styled/Card.js +1 -1
  64. package/dist/esm/styled/CoverImage.js +1 -1
  65. package/dist/esm/styled/Error.js +1 -1
  66. package/dist/esm/styled/ReportingLines.js +1 -1
  67. package/dist/esm/styled/TeamCard.js +1 -1
  68. package/dist/esm/styled/TeamTrigger.js +1 -1
  69. package/dist/esm/styled/UserTrigger.js +1 -1
  70. package/dist/esm/util/analytics.js +2 -2
  71. package/dist/types/components/Agent/AgentProfileCard.d.ts +1 -1
  72. package/dist/types/components/Agent/AgentProfileCardResourced.d.ts +2 -0
  73. package/dist/types/components/Agent/lazyAgentProfileCard.d.ts +1 -1
  74. package/dist/types/components/User/ProfileCardTrigger.d.ts +1 -1
  75. package/dist/types/types.d.ts +23 -0
  76. package/dist/types-ts4.5/components/Agent/AgentProfileCard.d.ts +1 -1
  77. package/dist/types-ts4.5/components/Agent/AgentProfileCardResourced.d.ts +2 -0
  78. package/dist/types-ts4.5/components/Agent/lazyAgentProfileCard.d.ts +1 -1
  79. package/dist/types-ts4.5/components/User/ProfileCardTrigger.d.ts +1 -1
  80. package/dist/types-ts4.5/types.d.ts +23 -0
  81. package/package.json +10 -4
@@ -1,4 +1,4 @@
1
- /* UserTrigger.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* UserTrigger.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  // PLEASE NOTE: This file is sync-loaded with the trigger components. Only add components here that
3
3
  // are necessary for the main render of the trigger component to help maintain bundle size.
4
4
  /* eslint-disable @atlaskit/design-system/no-styled-tagged-template-expression -- needs manual remediation */
@@ -4,7 +4,7 @@ import { getPageTime } from './performance';
4
4
  const ANALYTICS_CHANNEL = 'peopleTeams';
5
5
  export const PACKAGE_META_DATA = {
6
6
  packageName: "@atlaskit/profilecard",
7
- packageVersion: "24.40.1"
7
+ packageVersion: "0.0.0-development"
8
8
  };
9
9
  const runItLater = cb => {
10
10
  const requestIdleCallback = window.requestIdleCallback;
@@ -45,7 +45,7 @@ const createEvent = (eventType, action, actionSubject, actionSubjectId, attribut
45
45
  actionSubjectId,
46
46
  attributes: {
47
47
  packageName: "@atlaskit/profilecard",
48
- packageVersion: "24.40.1",
48
+ packageVersion: "0.0.0-development",
49
49
  ...attributes,
50
50
  firedAt: Math.round(getPageTime())
51
51
  }
@@ -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.40.1");
7
+ headers.append('atl-client-version', "0.0.0-development");
8
8
  return headers;
9
9
  };
10
10
  export function getOrgIdForCloudIdFromAGG(_x, _x2) {
@@ -59,7 +59,7 @@ export var addHeaders = function addHeaders(headers) {
59
59
  headers.append('X-ExperimentalApi', 'teams-beta');
60
60
  headers.append('X-ExperimentalApi', 'team-members-beta');
61
61
  headers.append('atl-client-name', "@atlaskit/profilecard");
62
- headers.append('atl-client-version', "24.40.1");
62
+ headers.append('atl-client-version', "0.0.0-development");
63
63
  return headers;
64
64
  };
65
65
  export function getTeamFromAGG(_x, _x2, _x3) {
@@ -1,4 +1,4 @@
1
- /* Actions.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* Actions.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
4
  import "./Actions.compiled.css";
@@ -1,4 +1,4 @@
1
- /* AgentProfileCard.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* AgentProfileCard.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
4
4
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
@@ -48,7 +48,9 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
48
48
  onDeleteAgent = _ref.onDeleteAgent,
49
49
  hideMoreActions = _ref.hideMoreActions,
50
50
  _ref$hideAiDisclaimer = _ref.hideAiDisclaimer,
51
- hideAiDisclaimer = _ref$hideAiDisclaimer === void 0 ? false : _ref$hideAiDisclaimer;
51
+ hideAiDisclaimer = _ref$hideAiDisclaimer === void 0 ? false : _ref$hideAiDisclaimer,
52
+ _ref$hideConversation = _ref.hideConversationStarters,
53
+ hideConversationStarters = _ref$hideConversation === void 0 ? false : _ref$hideConversation;
52
54
  var _useAgentUrlActions = useAgentUrlActions({
53
55
  cloudId: cloudId || '',
54
56
  source: 'agentProfileCard'
@@ -172,6 +174,7 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
172
174
  }));
173
175
  }
174
176
  var isRovoDev = agent.creator_type === 'ROVO_DEV';
177
+ var shouldShowConversationStarters = !(isRovoDev && fg('rovo_dev_themed_identity_card')) && !(fg('jira_ai_hide_conversation_starters_profilecard') && hideConversationStarters);
175
178
  return /*#__PURE__*/React.createElement(AgentProfileCardWrapper, null, /*#__PURE__*/React.createElement(Box, {
176
179
  xcss: styles.cardContainerStyles
177
180
  }, /*#__PURE__*/React.createElement(AgentBanner, {
@@ -229,7 +232,7 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
229
232
  }), " ", /*#__PURE__*/React.createElement(Text, {
230
233
  size: "small",
231
234
  color: "color.text.subtlest"
232
- }, formatMessage(messages.aiDisclaimer)))), !(isRovoDev && fg('rovo_dev_themed_identity_card')) && /*#__PURE__*/React.createElement(Box, {
235
+ }, formatMessage(messages.aiDisclaimer)))), shouldShowConversationStarters && /*#__PURE__*/React.createElement(Box, {
233
236
  xcss: styles.conversationStartersWrapper
234
237
  }, /*#__PURE__*/React.createElement(ConversationStarters, {
235
238
  isAgentDefault: agent.is_default,
@@ -151,6 +151,7 @@ export var AgentProfileCardResourced = function AgentProfileCardResourced(props)
151
151
  cloudId: props.cloudId,
152
152
  onDeleteAgent: props.onDeleteAgent,
153
153
  hideMoreActions: props.hideMoreActions,
154
- hideAiDisclaimer: props.hideAiDisclaimer
154
+ hideAiDisclaimer: props.hideAiDisclaimer,
155
+ hideConversationStarters: props.hideConversationStarters
155
156
  }));
156
157
  };
@@ -1,4 +1,4 @@
1
- /* AgentProfileCardWrapper.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* AgentProfileCardWrapper.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import "./AgentProfileCardWrapper.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -1,4 +1,4 @@
1
- /* ProfileCardDetails.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* ProfileCardDetails.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
4
  var _excluded = ["text"];
@@ -166,7 +166,7 @@ export var ProfileCardDetails = function ProfileCardDetails(props) {
166
166
  icon: "companyName"
167
167
  }, props.companyName), /*#__PURE__*/React.createElement(IconLabel, {
168
168
  icon: "location"
169
- }, props.location)), /*#__PURE__*/React.createElement(ReportingLinesDetails, {
169
+ }, props.location)), !(fg('jira_ai_profilecard_hide_reportinglines') && props.hideReportingLines) && /*#__PURE__*/React.createElement(ReportingLinesDetails, {
170
170
  reportingLines: props.reportingLines,
171
171
  reportingLinesProfileUrl: props.reportingLinesProfileUrl,
172
172
  onReportingLinesClick: props.onReportingLinesClick,
@@ -12,6 +12,7 @@ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstruct
12
12
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
13
13
  import React, { Suspense } from 'react';
14
14
  import { GiveKudosLauncherLazy, KudosType } from '@atlaskit/give-kudos';
15
+ import { fg } from '@atlaskit/platform-feature-flags';
15
16
  import { useAnalyticsEvents } from '@atlaskit/teams-app-internal-analytics';
16
17
  import filterActions from '../../internal/filterActions';
17
18
  import { CardWrapper } from '../../styled/UserTrigger';
@@ -65,7 +66,11 @@ var ProfileCardResourced = /*#__PURE__*/function (_React$PureComponent) {
65
66
  hasError: false,
66
67
  data: null
67
68
  }, function () {
68
- var requests = Promise.all([_this.props.resourceClient.getProfile(cloudId, userId, _this.fireAnalytics), _this.props.resourceClient.getReportingLines(userId), _this.props.resourceClient.shouldShowGiveKudos(), _this.props.resourceClient.getTeamCentralBaseUrl({
69
+ var shouldHideReportingLines = fg('jira_ai_profilecard_hide_reportinglines') && _this.props.hideReportingLines;
70
+ var requests = Promise.all([_this.props.resourceClient.getProfile(cloudId, userId, _this.fireAnalytics), shouldHideReportingLines ? Promise.resolve({
71
+ managers: [],
72
+ reports: []
73
+ }) : _this.props.resourceClient.getReportingLines(userId), _this.props.resourceClient.shouldShowGiveKudos(), _this.props.resourceClient.getTeamCentralBaseUrl({
69
74
  withOrgContext: true,
70
75
  withSiteContext: true
71
76
  })]);
@@ -161,7 +166,8 @@ var ProfileCardResourced = /*#__PURE__*/function (_React$PureComponent) {
161
166
  onReportingLinesClick = _this$props4.onReportingLinesClick,
162
167
  cloudId = _this$props4.cloudId,
163
168
  userId = _this$props4.userId,
164
- addFlag = _this$props4.addFlag;
169
+ addFlag = _this$props4.addFlag,
170
+ hideReportingLines = _this$props4.hideReportingLines;
165
171
  var isFetchingOrNotStartToFetchYet = isLoading === true || isLoading === undefined;
166
172
  if (isFetchingOrNotStartToFetchYet) {
167
173
  return /*#__PURE__*/React.createElement(CardWrapper, null, /*#__PURE__*/React.createElement(UserLoadingState, {
@@ -188,7 +194,8 @@ var ProfileCardResourced = /*#__PURE__*/function (_React$PureComponent) {
188
194
  }, data), {}, {
189
195
  isKudosEnabled: isKudosEnabled,
190
196
  teamCentralBaseUrl: teamCentralBaseUrl,
191
- openKudosDrawer: this.openKudosDrawer
197
+ openKudosDrawer: this.openKudosDrawer,
198
+ hideReportingLines: fg('jira_ai_profilecard_hide_reportinglines') && hideReportingLines
192
199
  });
193
200
  return /*#__PURE__*/React.createElement(CardWrapper, null, /*#__PURE__*/React.createElement(React.Fragment, null, isKudosEnabled && newProps.teamCentralBaseUrl && /*#__PURE__*/React.createElement(Suspense, {
194
201
  fallback: null
@@ -51,6 +51,7 @@ function ProfileCardContent(_ref) {
51
51
  onConversationStartersClick: agentActions === null || agentActions === void 0 ? void 0 : agentActions.onConversationStartersClick,
52
52
  addFlag: addFlag,
53
53
  hideMoreActions: fg('jira_ai_profilecard_hide_agent_actions') && !!hideAgentMoreActions,
54
+ hideConversationStarters: fg('jira_ai_hide_conversation_starters_profilecard') && !!profilecardProps.hideAgentConversationStarters,
54
55
  hideAiDisclaimer: hideAiDisclaimer
55
56
  });
56
57
  } else {
@@ -91,6 +92,8 @@ export default function ProfilecardTriggerNext(_ref2) {
91
92
  agentActions = _ref2.agentActions,
92
93
  hideAgentMoreActions = _ref2.hideAgentMoreActions,
93
94
  hideAiDisclaimer = _ref2.hideAiDisclaimer,
95
+ hideAgentConversationStarters = _ref2.hideAgentConversationStarters,
96
+ hideReportingLines = _ref2.hideReportingLines,
94
97
  _ref2$ariaHideProfile = _ref2.ariaHideProfileTrigger,
95
98
  ariaHideProfileTrigger = _ref2$ariaHideProfile === void 0 ? false : _ref2$ariaHideProfile,
96
99
  propsIsVisible = _ref2.isVisible,
@@ -217,7 +220,7 @@ export default function ProfilecardTriggerNext(_ref2) {
217
220
  setError(err);
218
221
  }, [setHasError, setIsLoading, setError]);
219
222
  var clientFetchProfile = useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
220
- var requests, responses;
223
+ var shouldHideReportingLines, requests, responses;
221
224
  return _regeneratorRuntime.wrap(function _callee$(_context) {
222
225
  while (1) switch (_context.prev = _context.next) {
223
226
  case 0:
@@ -232,27 +235,31 @@ export default function ProfilecardTriggerNext(_ref2) {
232
235
  setError(null);
233
236
  setData(null);
234
237
  _context.prev = 6;
235
- requests = Promise.all([resourceClient.getProfile(cloudId || '', userId, fireAnalytics), resourceClient.getReportingLines(userId), resourceClient.shouldShowGiveKudos(), resourceClient.getTeamCentralBaseUrl({
238
+ shouldHideReportingLines = fg('jira_ai_profilecard_hide_reportinglines') && hideReportingLines;
239
+ requests = Promise.all([resourceClient.getProfile(cloudId || '', userId, fireAnalytics), shouldHideReportingLines ? Promise.resolve({
240
+ managers: [],
241
+ reports: []
242
+ }) : resourceClient.getReportingLines(userId), resourceClient.shouldShowGiveKudos(), resourceClient.getTeamCentralBaseUrl({
236
243
  withOrgContext: true,
237
244
  withSiteContext: true
238
245
  })]);
239
- _context.next = 10;
246
+ _context.next = 11;
240
247
  return requests;
241
- case 10:
248
+ case 11:
242
249
  responses = _context.sent;
243
250
  handleClientSuccess.apply(void 0, _toConsumableArray(responses));
244
- _context.next = 17;
251
+ _context.next = 18;
245
252
  break;
246
- case 14:
247
- _context.prev = 14;
253
+ case 15:
254
+ _context.prev = 15;
248
255
  _context.t0 = _context["catch"](6);
249
256
  handleClientError(_context.t0);
250
- case 17:
257
+ case 18:
251
258
  case "end":
252
259
  return _context.stop();
253
260
  }
254
- }, _callee, null, [[6, 14]]);
255
- })), [cloudId, fireAnalytics, isLoading, resourceClient, userId, handleClientSuccess, handleClientError]);
261
+ }, _callee, null, [[6, 15]]);
262
+ })), [cloudId, fireAnalytics, isLoading, resourceClient, userId, handleClientSuccess, handleClientError, hideReportingLines]);
256
263
  var showProfilecard = useCallback(function () {
257
264
  clearTimeout(hideTimer.current);
258
265
  clearTimeout(showTimer.current);
@@ -359,7 +366,9 @@ export default function ProfilecardTriggerNext(_ref2) {
359
366
  cloudId: cloudId,
360
367
  openKudosDrawer: openKudosDrawer,
361
368
  isTriggeredUsingKeyboard: isTriggeredUsingKeyboard,
362
- disabledAriaAttributes: disabledAriaAttributes
369
+ disabledAriaAttributes: disabledAriaAttributes,
370
+ hideReportingLines: fg('jira_ai_profilecard_hide_reportinglines') && hideReportingLines,
371
+ hideAgentConversationStarters: fg('jira_ai_hide_conversation_starters_profilecard') && hideAgentConversationStarters
363
372
  });
364
373
  var ssrPlaceholderProp = ssrPlaceholderId ? {
365
374
  'data-ssr-placeholder-replace': ssrPlaceholderId
@@ -1,4 +1,4 @@
1
- /* ReportingLinesDetails.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* ReportingLinesDetails.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import "./ReportingLinesDetails.compiled.css";
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* ProfileCardWrapper.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* ProfileCardWrapper.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import "./ProfileCardWrapper.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -1,4 +1,4 @@
1
- /* main.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* main.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
4
  var _excluded = ["containerId", "teamId", "displayName", "description", "avatarImageUrl", "headerImageUrl", "memberAvatars", "memberCount", "cloudId", "userId", "isVerified", "teamProfileUrl"];
@@ -1,4 +1,4 @@
1
- /* main.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* main.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import "./main.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { useCallback } from 'react';
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
3
3
  import "./index.compiled.css";
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import "./index.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -1,4 +1,4 @@
1
- /* Card.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* Card.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  /* eslint-disable @atlaskit/design-system/no-styled-tagged-template-expression -- needs manual remediation */
3
3
  import "./Card.compiled.css";
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* CoverImage.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* CoverImage.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import "./CoverImage.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { useRef } from 'react';
@@ -1,4 +1,4 @@
1
- /* Error.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* Error.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./Error.compiled.css";
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* ReportingLines.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* ReportingLines.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import "./ReportingLines.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -1,4 +1,4 @@
1
- /* TeamCard.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* TeamCard.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./TeamCard.compiled.css";
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* TeamTrigger.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* TeamTrigger.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./TeamTrigger.compiled.css";
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* UserTrigger.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* UserTrigger.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  // PLEASE NOTE: This file is sync-loaded with the trigger components. Only add components here that
3
3
  // are necessary for the main render of the trigger component to help maintain bundle size.
4
4
  /* eslint-disable @atlaskit/design-system/no-styled-tagged-template-expression -- needs manual remediation */
@@ -7,7 +7,7 @@ import { getPageTime } from './performance';
7
7
  var ANALYTICS_CHANNEL = 'peopleTeams';
8
8
  export var PACKAGE_META_DATA = {
9
9
  packageName: "@atlaskit/profilecard",
10
- packageVersion: "24.40.1"
10
+ packageVersion: "0.0.0-development"
11
11
  };
12
12
  var runItLater = function runItLater(cb) {
13
13
  var requestIdleCallback = window.requestIdleCallback;
@@ -52,7 +52,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
52
52
  actionSubjectId: actionSubjectId,
53
53
  attributes: _objectSpread(_objectSpread({
54
54
  packageName: "@atlaskit/profilecard",
55
- packageVersion: "24.40.1"
55
+ packageVersion: "0.0.0-development"
56
56
  }, attributes), {}, {
57
57
  firedAt: Math.round(getPageTime())
58
58
  })
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import { type AgentProfileCardProps } from '../../types';
3
- declare const AgentProfileCard: ({ agent, isLoading, cloudId, onChatClick, hasError, errorType, onConversationStartersClick, resourceClient, addFlag, onDeleteAgent, hideMoreActions, hideAiDisclaimer, }: AgentProfileCardProps) => React.JSX.Element;
3
+ declare const AgentProfileCard: ({ agent, isLoading, cloudId, onChatClick, hasError, errorType, onConversationStartersClick, resourceClient, addFlag, onDeleteAgent, hideMoreActions, hideAiDisclaimer, hideConversationStarters, }: AgentProfileCardProps) => React.JSX.Element;
4
4
  export default AgentProfileCard;
@@ -14,5 +14,7 @@ export type AgentProfileCardResourcedProps = {
14
14
  hideMoreActions?: boolean;
15
15
  /** Hide the AI disclaimer. Defaults to false (disclaimer is shown by default). */
16
16
  hideAiDisclaimer?: boolean;
17
+ /** Hide the conversation starters. Defaults to false (conversation starters are shown by default). */
18
+ hideConversationStarters?: boolean;
17
19
  } & AgentActionsType;
18
20
  export declare const AgentProfileCardResourced: (props: AgentProfileCardResourcedProps) => React.JSX.Element;
@@ -1 +1 @@
1
- export declare const AgentProfileCardLazy: import("react").LazyExoticComponent<({ agent, isLoading, cloudId, onChatClick, hasError, errorType, onConversationStartersClick, resourceClient, addFlag, onDeleteAgent, hideMoreActions, hideAiDisclaimer, }: import("../../types").AgentProfileCardProps) => React.JSX.Element>;
1
+ export declare const AgentProfileCardLazy: import("react").LazyExoticComponent<({ agent, isLoading, cloudId, onChatClick, hasError, errorType, onConversationStartersClick, resourceClient, addFlag, onDeleteAgent, hideMoreActions, hideAiDisclaimer, hideConversationStarters, }: import("../../types").AgentProfileCardProps) => React.JSX.Element>;
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
2
  import { type ProfileCardTriggerProps } from '../../types';
3
- export default function ProfilecardTriggerNext({ autoFocus, trigger, userId, cloudId, resourceClient, actions, position, children, testId, addFlag, onReportingLinesClick, ariaLabel, ariaLabelledBy, prepopulatedData, disabledAriaAttributes, onVisibilityChange, offset, viewingUserId, product, agentActions, hideAgentMoreActions, hideAiDisclaimer, ariaHideProfileTrigger, isVisible: propsIsVisible, isRenderedInPortal, ssrPlaceholderId, showDelay: customShowDelay, hideDelay: customHideDelay, }: ProfileCardTriggerProps): React.JSX.Element;
3
+ export default function ProfilecardTriggerNext({ autoFocus, trigger, userId, cloudId, resourceClient, actions, position, children, testId, addFlag, onReportingLinesClick, ariaLabel, ariaLabelledBy, prepopulatedData, disabledAriaAttributes, onVisibilityChange, offset, viewingUserId, product, agentActions, hideAgentMoreActions, hideAiDisclaimer, hideAgentConversationStarters, hideReportingLines, ariaHideProfileTrigger, isVisible: propsIsVisible, isRenderedInPortal, ssrPlaceholderId, showDelay: customShowDelay, hideDelay: customHideDelay, }: ProfileCardTriggerProps): React.JSX.Element;
@@ -147,6 +147,8 @@ export interface ProfileCardResourcedProps {
147
147
  trigger?: TriggerType;
148
148
  children?: React.ReactNode;
149
149
  addFlag?: (flag: any) => void;
150
+ /** When true (and feature-gated), skip fetching and hide the reporting lines section */
151
+ hideReportingLines?: boolean;
150
152
  }
151
153
  export interface ProfileCardResourcedState {
152
154
  visible?: boolean;
@@ -202,10 +204,25 @@ export interface ProfileCardTriggerProps {
202
204
  agentActions?: AgentActionsType;
203
205
  ariaHideProfileTrigger?: boolean;
204
206
  ssrPlaceholderId?: string;
207
+ /**
208
+ * The delay in milliseconds before the profile card is shown.
209
+ * PS: This is ignored when the isVisible is true or the trigger is clicked.
210
+ */
205
211
  showDelay?: number;
212
+ /**
213
+ * The delay in milliseconds before the profile card is hidden.
214
+ * PS: This is ignored when the isVisible is false or the trigger is clicked.
215
+ */
206
216
  hideDelay?: number;
207
217
  hideAgentMoreActions?: boolean;
208
218
  hideAiDisclaimer?: boolean;
219
+ /** Hide the conversation starters. Defaults to false (conversation starters are shown by default). */
220
+ hideAgentConversationStarters?: boolean;
221
+ /**
222
+ * When true, skip fetching Townsquare's reporting lines data and hide the reporting lines section
223
+ * currentky only working when the flag jira_ai_profilecard_hide_reportinglines is enabled
224
+ * */
225
+ hideReportingLines?: boolean;
209
226
  }
210
227
  export interface ProfileCardTriggerState {
211
228
  visible?: boolean;
@@ -392,6 +409,8 @@ export type AgentProfileCardProps = {
392
409
  hideMoreActions?: boolean;
393
410
  /** Hide the AI disclaimer. Defaults to false (disclaimer is shown by default). */
394
411
  hideAiDisclaimer?: boolean;
412
+ /** Hide the conversation starters. Defaults to false (conversation starters are shown by default). */
413
+ hideConversationStarters?: boolean;
395
414
  } & AgentActionsType;
396
415
  export type StatusType = 'active' | 'inactive' | 'closed';
397
416
  export type TriggerType = 'hover' | 'click';
@@ -458,6 +477,10 @@ export interface ProfilecardProps {
458
477
  isTriggeredUsingKeyboard?: boolean;
459
478
  disabledAriaAttributes?: boolean;
460
479
  agentActions?: AgentActionsType;
480
+ /** When true (and feature-gated), hide the reporting lines section */
481
+ hideReportingLines?: boolean;
482
+ /** When true (and feature-gated), hide the agent conversation starters section */
483
+ hideAgentConversationStarters?: boolean;
461
484
  }
462
485
  export type AnalyticsFromDuration = (duration: number) => AnalyticsEventPayload;
463
486
  export type AnalyticsFromDurationNext = <K extends keyof AnalyticsEventAttributes>(eventKey: K, duration: number) => {
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import { type AgentProfileCardProps } from '../../types';
3
- declare const AgentProfileCard: ({ agent, isLoading, cloudId, onChatClick, hasError, errorType, onConversationStartersClick, resourceClient, addFlag, onDeleteAgent, hideMoreActions, hideAiDisclaimer, }: AgentProfileCardProps) => React.JSX.Element;
3
+ declare const AgentProfileCard: ({ agent, isLoading, cloudId, onChatClick, hasError, errorType, onConversationStartersClick, resourceClient, addFlag, onDeleteAgent, hideMoreActions, hideAiDisclaimer, hideConversationStarters, }: AgentProfileCardProps) => React.JSX.Element;
4
4
  export default AgentProfileCard;
@@ -14,5 +14,7 @@ export type AgentProfileCardResourcedProps = {
14
14
  hideMoreActions?: boolean;
15
15
  /** Hide the AI disclaimer. Defaults to false (disclaimer is shown by default). */
16
16
  hideAiDisclaimer?: boolean;
17
+ /** Hide the conversation starters. Defaults to false (conversation starters are shown by default). */
18
+ hideConversationStarters?: boolean;
17
19
  } & AgentActionsType;
18
20
  export declare const AgentProfileCardResourced: (props: AgentProfileCardResourcedProps) => React.JSX.Element;
@@ -1 +1 @@
1
- export declare const AgentProfileCardLazy: import("react").LazyExoticComponent<({ agent, isLoading, cloudId, onChatClick, hasError, errorType, onConversationStartersClick, resourceClient, addFlag, onDeleteAgent, hideMoreActions, hideAiDisclaimer, }: import("../../types").AgentProfileCardProps) => React.JSX.Element>;
1
+ export declare const AgentProfileCardLazy: import("react").LazyExoticComponent<({ agent, isLoading, cloudId, onChatClick, hasError, errorType, onConversationStartersClick, resourceClient, addFlag, onDeleteAgent, hideMoreActions, hideAiDisclaimer, hideConversationStarters, }: import("../../types").AgentProfileCardProps) => React.JSX.Element>;
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
2
  import { type ProfileCardTriggerProps } from '../../types';
3
- export default function ProfilecardTriggerNext({ autoFocus, trigger, userId, cloudId, resourceClient, actions, position, children, testId, addFlag, onReportingLinesClick, ariaLabel, ariaLabelledBy, prepopulatedData, disabledAriaAttributes, onVisibilityChange, offset, viewingUserId, product, agentActions, hideAgentMoreActions, hideAiDisclaimer, ariaHideProfileTrigger, isVisible: propsIsVisible, isRenderedInPortal, ssrPlaceholderId, showDelay: customShowDelay, hideDelay: customHideDelay, }: ProfileCardTriggerProps): React.JSX.Element;
3
+ export default function ProfilecardTriggerNext({ autoFocus, trigger, userId, cloudId, resourceClient, actions, position, children, testId, addFlag, onReportingLinesClick, ariaLabel, ariaLabelledBy, prepopulatedData, disabledAriaAttributes, onVisibilityChange, offset, viewingUserId, product, agentActions, hideAgentMoreActions, hideAiDisclaimer, hideAgentConversationStarters, hideReportingLines, ariaHideProfileTrigger, isVisible: propsIsVisible, isRenderedInPortal, ssrPlaceholderId, showDelay: customShowDelay, hideDelay: customHideDelay, }: ProfileCardTriggerProps): React.JSX.Element;
@@ -147,6 +147,8 @@ export interface ProfileCardResourcedProps {
147
147
  trigger?: TriggerType;
148
148
  children?: React.ReactNode;
149
149
  addFlag?: (flag: any) => void;
150
+ /** When true (and feature-gated), skip fetching and hide the reporting lines section */
151
+ hideReportingLines?: boolean;
150
152
  }
151
153
  export interface ProfileCardResourcedState {
152
154
  visible?: boolean;
@@ -205,10 +207,25 @@ export interface ProfileCardTriggerProps {
205
207
  agentActions?: AgentActionsType;
206
208
  ariaHideProfileTrigger?: boolean;
207
209
  ssrPlaceholderId?: string;
210
+ /**
211
+ * The delay in milliseconds before the profile card is shown.
212
+ * PS: This is ignored when the isVisible is true or the trigger is clicked.
213
+ */
208
214
  showDelay?: number;
215
+ /**
216
+ * The delay in milliseconds before the profile card is hidden.
217
+ * PS: This is ignored when the isVisible is false or the trigger is clicked.
218
+ */
209
219
  hideDelay?: number;
210
220
  hideAgentMoreActions?: boolean;
211
221
  hideAiDisclaimer?: boolean;
222
+ /** Hide the conversation starters. Defaults to false (conversation starters are shown by default). */
223
+ hideAgentConversationStarters?: boolean;
224
+ /**
225
+ * When true, skip fetching Townsquare's reporting lines data and hide the reporting lines section
226
+ * currentky only working when the flag jira_ai_profilecard_hide_reportinglines is enabled
227
+ * */
228
+ hideReportingLines?: boolean;
212
229
  }
213
230
  export interface ProfileCardTriggerState {
214
231
  visible?: boolean;
@@ -398,6 +415,8 @@ export type AgentProfileCardProps = {
398
415
  hideMoreActions?: boolean;
399
416
  /** Hide the AI disclaimer. Defaults to false (disclaimer is shown by default). */
400
417
  hideAiDisclaimer?: boolean;
418
+ /** Hide the conversation starters. Defaults to false (conversation starters are shown by default). */
419
+ hideConversationStarters?: boolean;
401
420
  } & AgentActionsType;
402
421
  export type StatusType = 'active' | 'inactive' | 'closed';
403
422
  export type TriggerType = 'hover' | 'click';
@@ -464,6 +483,10 @@ export interface ProfilecardProps {
464
483
  isTriggeredUsingKeyboard?: boolean;
465
484
  disabledAriaAttributes?: boolean;
466
485
  agentActions?: AgentActionsType;
486
+ /** When true (and feature-gated), hide the reporting lines section */
487
+ hideReportingLines?: boolean;
488
+ /** When true (and feature-gated), hide the agent conversation starters section */
489
+ hideAgentConversationStarters?: boolean;
467
490
  }
468
491
  export type AnalyticsFromDuration = (duration: number) => AnalyticsEventPayload;
469
492
  export type AnalyticsFromDurationNext = <K extends keyof AnalyticsEventAttributes>(eventKey: K, duration: number) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/profilecard",
3
- "version": "24.40.2",
3
+ "version": "24.41.0",
4
4
  "description": "A React component to display a card with user information.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -61,14 +61,14 @@
61
61
  "@atlaskit/popup": "^4.13.0",
62
62
  "@atlaskit/primitives": "^18.0.0",
63
63
  "@atlaskit/rovo-agent-components": "^3.38.0",
64
- "@atlaskit/rovo-triggers": "^5.21.0",
64
+ "@atlaskit/rovo-triggers": "^5.22.0",
65
65
  "@atlaskit/spinner": "^19.0.0",
66
66
  "@atlaskit/teams-app-config": "^1.12.0",
67
67
  "@atlaskit/teams-app-internal-analytics": "^1.27.0",
68
68
  "@atlaskit/teams-avatar": "^2.4.0",
69
69
  "@atlaskit/teams-public": "^0.70.0",
70
70
  "@atlaskit/theme": "^22.0.0",
71
- "@atlaskit/tmp-editor-statsig": "^34.0.0",
71
+ "@atlaskit/tmp-editor-statsig": "^35.0.0",
72
72
  "@atlaskit/tokens": "^11.0.0",
73
73
  "@atlaskit/tooltip": "^20.14.0",
74
74
  "@babel/runtime": "^7.0.0",
@@ -88,7 +88,7 @@
88
88
  "devDependencies": {
89
89
  "@af/visual-regression": "workspace:^",
90
90
  "@atlaskit/feature-gate-js-client": "^5.5.0",
91
- "@atlassian/a11y-jest-testing": "^0.11.0",
91
+ "@atlassian/a11y-jest-testing": "^0.10.0",
92
92
  "@atlassian/feature-flags-storybook-utils": "^0.3.0",
93
93
  "@atlassian/feature-flags-test-utils": "^1.0.0",
94
94
  "@atlassian/platform-storybook-helpers": "^0.1.0",
@@ -158,6 +158,9 @@
158
158
  "jira_ai_profilecard_hide_agent_actions": {
159
159
  "type": "boolean"
160
160
  },
161
+ "jira_ai_profilecard_hide_reportinglines": {
162
+ "type": "boolean"
163
+ },
161
164
  "rovo_dev_themed_identity_card": {
162
165
  "type": "boolean"
163
166
  },
@@ -172,6 +175,9 @@
172
175
  },
173
176
  "rovo_agent_support_a2a_avatar": {
174
177
  "type": "boolean"
178
+ },
179
+ "jira_ai_hide_conversation_starters_profilecard": {
180
+ "type": "boolean"
175
181
  }
176
182
  },
177
183
  "sideEffects": [