@atlaskit/profilecard 24.13.6 → 24.14.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 (142) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/__tests__/vr-tests/__snapshots__/agent-profilecard/agent-profile-card-example--default.png +0 -0
  3. package/__tests__/vr-tests/__snapshots__/user-profilecard/alternate-actions--default.png +0 -0
  4. package/__tests__/vr-tests/__snapshots__/user-profilecard/best-case-profile--default.png +0 -0
  5. package/__tests__/vr-tests/__snapshots__/user-profilecard/bot-case-profile--default.png +0 -0
  6. package/__tests__/vr-tests/__snapshots__/user-profilecard/error-state--default.png +0 -0
  7. package/__tests__/vr-tests/__snapshots__/user-profilecard/error-state-not-found--default.png +0 -0
  8. package/__tests__/vr-tests/__snapshots__/user-profilecard/worst-case-profile--default.png +0 -0
  9. package/__tests__/vr-tests/agent-profilecard.vr.tsx +5 -0
  10. package/__tests__/vr-tests/user-profilecard.vr.tsx +17 -0
  11. package/afm-cc/tsconfig.json +6 -0
  12. package/afm-dev-agents/tsconfig.json +6 -0
  13. package/afm-jira/tsconfig.json +6 -0
  14. package/afm-passionfruit/tsconfig.json +6 -0
  15. package/afm-post-office/tsconfig.json +6 -0
  16. package/afm-rovo-extension/tsconfig.json +6 -0
  17. package/afm-townsquare/tsconfig.json +6 -0
  18. package/dist/cjs/client/ProfileCardClient.js +2 -2
  19. package/dist/cjs/client/UserProfileCardClient.js +45 -11
  20. package/dist/cjs/client/getOrgIdForCloudIdFromAGG.js +1 -1
  21. package/dist/cjs/client/getTeamFromAGG.js +1 -1
  22. package/dist/cjs/components/Agent/AgentProfileCard.js +3 -0
  23. package/dist/cjs/components/Agent/AgentProfileCardResourced.js +2 -1
  24. package/dist/cjs/components/Error/ErrorMessage.js +18 -7
  25. package/dist/cjs/components/User/OverflowProfileCardButtons.js +22 -7
  26. package/dist/cjs/components/User/ProfileCard.js +80 -28
  27. package/dist/cjs/components/User/ProfileCardDetails.js +3 -2
  28. package/dist/cjs/components/User/ProfileCardResourced.js +40 -16
  29. package/dist/cjs/components/User/ProfileCardTrigger.js +53 -13
  30. package/dist/cjs/components/User/ReportingLinesDetails.js +37 -12
  31. package/dist/cjs/components/User/UserLoadingState.js +15 -3
  32. package/dist/cjs/components/common/LoadingState.js +17 -3
  33. package/dist/cjs/components/common/ProfileCardTrigger.js +29 -7
  34. package/dist/cjs/components/common/ProfileCardWrapper.js +4 -2
  35. package/dist/cjs/components/team-profile-card/main.js +1 -1
  36. package/dist/cjs/components/team-profile-card/team-connections/main.js +3 -19
  37. package/dist/cjs/components/team-profile-card/team-containers-skeleton/index.js +1 -1
  38. package/dist/cjs/components/team-profile-card/team-containers-skeleton/linked-container-card-skeleton/index.js +1 -1
  39. package/dist/cjs/mocks/mock-profile-client.js +10 -0
  40. package/dist/cjs/mocks/profile-data.js +2 -2
  41. package/dist/cjs/mocks/reporting-lines-data.js +4 -3
  42. package/dist/cjs/styled/Card.js +1 -1
  43. package/dist/cjs/styled/CoverImage.js +1 -1
  44. package/dist/cjs/styled/Error.js +1 -1
  45. package/dist/cjs/styled/ReportingLines.js +1 -1
  46. package/dist/cjs/styled/TeamCard.js +1 -1
  47. package/dist/cjs/styled/TeamTrigger.js +1 -1
  48. package/dist/cjs/styled/UserTrigger.js +1 -1
  49. package/dist/cjs/util/analytics.js +7 -3
  50. package/dist/es2019/client/ProfileCardClient.js +2 -2
  51. package/dist/es2019/client/UserProfileCardClient.js +50 -13
  52. package/dist/es2019/client/getOrgIdForCloudIdFromAGG.js +1 -1
  53. package/dist/es2019/client/getTeamFromAGG.js +1 -1
  54. package/dist/es2019/components/Agent/AgentProfileCard.js +3 -0
  55. package/dist/es2019/components/Agent/AgentProfileCardResourced.js +2 -1
  56. package/dist/es2019/components/Error/ErrorMessage.js +17 -6
  57. package/dist/es2019/components/User/OverflowProfileCardButtons.js +18 -7
  58. package/dist/es2019/components/User/ProfileCard.js +72 -25
  59. package/dist/es2019/components/User/ProfileCardDetails.js +3 -2
  60. package/dist/es2019/components/User/ProfileCardResourced.js +25 -4
  61. package/dist/es2019/components/User/ProfileCardTrigger.js +55 -14
  62. package/dist/es2019/components/User/ReportingLinesDetails.js +31 -10
  63. package/dist/es2019/components/User/UserLoadingState.js +14 -4
  64. package/dist/es2019/components/common/LoadingState.js +16 -4
  65. package/dist/es2019/components/common/ProfileCardTrigger.js +26 -7
  66. package/dist/es2019/components/common/ProfileCardWrapper.js +4 -2
  67. package/dist/es2019/components/team-profile-card/main.js +1 -1
  68. package/dist/es2019/components/team-profile-card/team-connections/main.js +3 -18
  69. package/dist/es2019/components/team-profile-card/team-containers-skeleton/index.js +1 -1
  70. package/dist/es2019/components/team-profile-card/team-containers-skeleton/linked-container-card-skeleton/index.js +1 -1
  71. package/dist/es2019/mocks/mock-profile-client.js +6 -0
  72. package/dist/es2019/mocks/profile-data.js +1 -1
  73. package/dist/es2019/mocks/reporting-lines-data.js +2 -2
  74. package/dist/es2019/styled/Card.js +1 -1
  75. package/dist/es2019/styled/CoverImage.js +1 -1
  76. package/dist/es2019/styled/Error.js +1 -1
  77. package/dist/es2019/styled/ReportingLines.js +1 -1
  78. package/dist/es2019/styled/TeamCard.js +1 -1
  79. package/dist/es2019/styled/TeamTrigger.js +1 -1
  80. package/dist/es2019/styled/UserTrigger.js +1 -1
  81. package/dist/es2019/util/analytics.js +6 -2
  82. package/dist/esm/client/ProfileCardClient.js +2 -2
  83. package/dist/esm/client/UserProfileCardClient.js +46 -12
  84. package/dist/esm/client/getOrgIdForCloudIdFromAGG.js +1 -1
  85. package/dist/esm/client/getTeamFromAGG.js +1 -1
  86. package/dist/esm/components/Agent/AgentProfileCard.js +3 -0
  87. package/dist/esm/components/Agent/AgentProfileCardResourced.js +2 -1
  88. package/dist/esm/components/Error/ErrorMessage.js +19 -6
  89. package/dist/esm/components/User/OverflowProfileCardButtons.js +23 -8
  90. package/dist/esm/components/User/ProfileCard.js +80 -28
  91. package/dist/esm/components/User/ProfileCardDetails.js +3 -2
  92. package/dist/esm/components/User/ProfileCardResourced.js +40 -16
  93. package/dist/esm/components/User/ProfileCardTrigger.js +54 -14
  94. package/dist/esm/components/User/ReportingLinesDetails.js +38 -12
  95. package/dist/esm/components/User/UserLoadingState.js +16 -4
  96. package/dist/esm/components/common/LoadingState.js +18 -4
  97. package/dist/esm/components/common/ProfileCardTrigger.js +30 -8
  98. package/dist/esm/components/common/ProfileCardWrapper.js +4 -2
  99. package/dist/esm/components/team-profile-card/main.js +1 -1
  100. package/dist/esm/components/team-profile-card/team-connections/main.js +3 -18
  101. package/dist/esm/components/team-profile-card/team-containers-skeleton/index.js +1 -1
  102. package/dist/esm/components/team-profile-card/team-containers-skeleton/linked-container-card-skeleton/index.js +1 -1
  103. package/dist/esm/mocks/mock-profile-client.js +10 -0
  104. package/dist/esm/mocks/profile-data.js +1 -1
  105. package/dist/esm/mocks/reporting-lines-data.js +2 -2
  106. package/dist/esm/styled/Card.js +1 -1
  107. package/dist/esm/styled/CoverImage.js +1 -1
  108. package/dist/esm/styled/Error.js +1 -1
  109. package/dist/esm/styled/ReportingLines.js +1 -1
  110. package/dist/esm/styled/TeamCard.js +1 -1
  111. package/dist/esm/styled/TeamTrigger.js +1 -1
  112. package/dist/esm/styled/UserTrigger.js +1 -1
  113. package/dist/esm/util/analytics.js +6 -2
  114. package/dist/types/client/ProfileCardClient.d.ts +2 -1
  115. package/dist/types/client/TeamCentralCardClient.d.ts +2 -2
  116. package/dist/types/client/UserProfileCardClient.d.ts +2 -1
  117. package/dist/types/components/Error/ErrorMessage.d.ts +2 -0
  118. package/dist/types/components/User/ProfileCard.d.ts +3 -2
  119. package/dist/types/components/User/ProfileCardResourced.d.ts +4 -2
  120. package/dist/types/components/User/UserLoadingState.d.ts +3 -1
  121. package/dist/types/components/User/lazyProfileCard.d.ts +1 -1
  122. package/dist/types/components/common/LoadingState.d.ts +3 -1
  123. package/dist/types/components/common/ProfileCardWrapper.d.ts +2 -1
  124. package/dist/types/components/common/types.d.ts +3 -0
  125. package/dist/types/mocks/profile-data.d.ts +1 -0
  126. package/dist/types/types.d.ts +13 -6
  127. package/dist/types/util/analytics.d.ts +5 -0
  128. package/dist/types-ts4.5/client/ProfileCardClient.d.ts +2 -1
  129. package/dist/types-ts4.5/client/TeamCentralCardClient.d.ts +2 -2
  130. package/dist/types-ts4.5/client/UserProfileCardClient.d.ts +2 -1
  131. package/dist/types-ts4.5/components/Error/ErrorMessage.d.ts +2 -0
  132. package/dist/types-ts4.5/components/User/ProfileCard.d.ts +3 -2
  133. package/dist/types-ts4.5/components/User/ProfileCardResourced.d.ts +4 -2
  134. package/dist/types-ts4.5/components/User/UserLoadingState.d.ts +3 -1
  135. package/dist/types-ts4.5/components/User/lazyProfileCard.d.ts +1 -1
  136. package/dist/types-ts4.5/components/common/LoadingState.d.ts +3 -1
  137. package/dist/types-ts4.5/components/common/ProfileCardWrapper.d.ts +2 -1
  138. package/dist/types-ts4.5/components/common/types.d.ts +3 -0
  139. package/dist/types-ts4.5/mocks/profile-data.d.ts +1 -0
  140. package/dist/types-ts4.5/types.d.ts +13 -6
  141. package/dist/types-ts4.5/util/analytics.d.ts +5 -0
  142. package/package.json +12 -10
@@ -1,14 +1,19 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
3
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
4
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
5
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
5
- var _excluded = ["trigger", "ariaLabelledBy", "children", "renderProfileCard", "fetchProfile", "disabledAriaAttributes", "profileCardType", "fireAnalytics"],
6
+ var _excluded = ["trigger", "ariaLabelledBy", "children", "renderProfileCard", "fetchProfile", "disabledAriaAttributes", "profileCardType", "testId", "fireAnalytics", "fireAnalyticsNext"],
6
7
  _excluded2 = ["aria-expanded", "aria-haspopup"];
7
8
  import _regeneratorRuntime from "@babel/runtime/regenerator";
9
+ 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; }
10
+ 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; }
8
11
  import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react';
12
+ import { fg } from '@atlaskit/platform-feature-flags';
9
13
  import Popup from '@atlaskit/popup';
10
14
  import { layers } from '@atlaskit/theme/constants';
11
- import { cardTriggered } from '../../util/analytics';
15
+ import { cardTriggered, getActionSubject, PACKAGE_META_DATA } from '../../util/analytics';
16
+ import { getPageTime } from '../../util/performance';
12
17
  import { useProfileInfo } from '../../util/useProfileInfo';
13
18
  import { LoadingState } from './LoadingState';
14
19
  import { PopupTrigger } from './PopupTrigger';
@@ -24,7 +29,9 @@ function ProfileCardTriggerInner(_ref, ref) {
24
29
  fetchProfile = _ref.fetchProfile,
25
30
  disabledAriaAttributes = _ref.disabledAriaAttributes,
26
31
  profileCardType = _ref.profileCardType,
32
+ testId = _ref.testId,
27
33
  fireAnalytics = _ref.fireAnalytics,
34
+ fireAnalyticsNext = _ref.fireAnalyticsNext,
28
35
  popupProps = _objectWithoutProperties(_ref, _excluded);
29
36
  var showDelay = _trigger === 'click' ? 0 : DELAY_MS_SHOW;
30
37
  var hideDelay = _trigger === 'click' ? 0 : DELAY_MS_HIDE;
@@ -69,8 +76,18 @@ function ProfileCardTriggerInner(_ref, ref) {
69
76
  if (!visible) {
70
77
  getProfileData === null || getProfileData === void 0 || getProfileData();
71
78
  setVisible(true);
72
- if (fireAnalytics) {
73
- fireAnalytics(cardTriggered(profileCardType, _trigger));
79
+ if (fg('ptc-enable-profile-card-analytics-refactor')) {
80
+ if (fireAnalyticsNext) {
81
+ fireAnalyticsNext("ui.".concat(getActionSubject(profileCardType), ".triggered"), _objectSpread(_objectSpread({
82
+ method: _trigger
83
+ }, PACKAGE_META_DATA), {}, {
84
+ firedAt: Math.round(getPageTime())
85
+ }));
86
+ }
87
+ } else {
88
+ if (fireAnalytics) {
89
+ fireAnalytics(cardTriggered(profileCardType, _trigger));
90
+ }
74
91
  }
75
92
  }
76
93
  }, showDelay);
@@ -79,7 +96,7 @@ function ProfileCardTriggerInner(_ref, ref) {
79
96
  return _context.stop();
80
97
  }
81
98
  }, _callee);
82
- })), [showDelay, visible, getProfileData, fireAnalytics, profileCardType, _trigger]);
99
+ })), [showDelay, visible, getProfileData, fireAnalytics, profileCardType, _trigger, fireAnalyticsNext]);
83
100
  var onMouseEnter = useCallback(function () {
84
101
  showProfilecard();
85
102
  }, [showProfilecard]);
@@ -100,7 +117,8 @@ function ProfileCardTriggerInner(_ref, ref) {
100
117
  showProfilecard: showProfilecard,
101
118
  children: children,
102
119
  ariaLabelledBy: ariaLabelledBy,
103
- trigger: _trigger
120
+ trigger: _trigger,
121
+ "data-testid": testId
104
122
  }));
105
123
  },
106
124
  content: function content() {
@@ -110,9 +128,13 @@ function ProfileCardTriggerInner(_ref, ref) {
110
128
  React.createElement("div", {
111
129
  onMouseEnter: onMouseEnter,
112
130
  onMouseLeave: hideProfilecard,
113
- onFocus: showProfilecard
114
- }, isLoading ? /*#__PURE__*/React.createElement(ProfileCardWrapper, null, /*#__PURE__*/React.createElement(LoadingState, {
131
+ onFocus: showProfilecard,
132
+ "data-testid": "profile-card--trigger-content"
133
+ }, isLoading ? /*#__PURE__*/React.createElement(ProfileCardWrapper, {
134
+ testId: "profilecard.profilecardtrigger.loading"
135
+ }, /*#__PURE__*/React.createElement(LoadingState, {
115
136
  fireAnalytics: fireAnalytics,
137
+ fireAnalyticsNext: fireAnalyticsNext,
116
138
  profileType: profileCardType
117
139
  })) : renderProfileCard({
118
140
  profileData: profileData,
@@ -6,8 +6,10 @@ var styles = xcss({
6
6
  width: '360px'
7
7
  });
8
8
  export var ProfileCardWrapper = function ProfileCardWrapper(_ref) {
9
- var children = _ref.children;
9
+ var children = _ref.children,
10
+ testId = _ref.testId;
10
11
  return /*#__PURE__*/React.createElement(Box, {
11
- xcss: styles
12
+ xcss: styles,
13
+ testId: testId
12
14
  }, children);
13
15
  };
@@ -1,4 +1,4 @@
1
- /* main.tsx generated by @compiled/babel-plugin v0.36.1 */
1
+ /* main.tsx generated by @compiled/babel-plugin v0.38.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,11 +1,9 @@
1
- /* main.tsx generated by @compiled/babel-plugin v0.36.1 */
1
+ /* main.tsx generated by @compiled/babel-plugin v0.38.1 */
2
2
  import "./main.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { useCallback } from 'react';
5
5
  import { useAnalyticsEvents } from '@atlaskit/analytics-next';
6
- import Avatar from '@atlaskit/avatar';
7
6
  import { LinkItem } from '@atlaskit/menu';
8
- import { fg } from '@atlaskit/platform-feature-flags';
9
7
  import { Box, Inline, Stack, Text } from '@atlaskit/primitives/compiled';
10
8
  import { ContainerIcon, getContainerProperties } from '@atlaskit/teams-public';
11
9
  import { fireEvent } from '../../../util/analytics';
@@ -19,7 +17,6 @@ export var TeamConnections = function TeamConnections(_ref) {
19
17
  title = _ref.title,
20
18
  containerIcon = _ref.containerIcon,
21
19
  link = _ref.link;
22
- var isContainerIconEnabled = fg('loom_tab_in_container_linker_team_profile_page');
23
20
  var _getContainerProperti = getContainerProperties({
24
21
  containerType: containerType,
25
22
  iconSize: 'medium',
@@ -47,17 +44,11 @@ export var TeamConnections = function TeamConnections(_ref) {
47
44
  }, /*#__PURE__*/React.createElement(Inline, {
48
45
  space: "space.100",
49
46
  xcss: styles.containerWrapperStyles
50
- }, isContainerIconEnabled ? /*#__PURE__*/React.createElement(ContainerIcon, {
47
+ }, /*#__PURE__*/React.createElement(ContainerIcon, {
51
48
  containerType: containerType,
52
49
  title: title,
53
50
  containerIcon: containerIcon,
54
51
  size: "small"
55
- }) : /*#__PURE__*/React.createElement(Box, {
56
- as: "img",
57
- src: containerIcon,
58
- alt: "",
59
- testId: "linked-container-icon",
60
- xcss: styles.containerIconStyles
61
52
  }), /*#__PURE__*/React.createElement(Stack, null, /*#__PURE__*/React.createElement(Text, {
62
53
  maxLines: 1,
63
54
  color: "color.text"
@@ -80,7 +71,6 @@ export var NewTeamConnections = function NewTeamConnections(_ref2) {
80
71
  title = _ref2.title,
81
72
  containerIcon = _ref2.containerIcon,
82
73
  link = _ref2.link;
83
- var isContainerIconEnabled = fg('loom_tab_in_container_linker_team_profile_page');
84
74
  var _getContainerProperti2 = getContainerProperties({
85
75
  containerType: containerType,
86
76
  iconSize: 'medium',
@@ -114,16 +104,11 @@ export var NewTeamConnections = function NewTeamConnections(_ref2) {
114
104
  size: "small",
115
105
  color: "color.text.subtlest"
116
106
  }, containerTypeText)),
117
- iconBefore: isContainerIconEnabled ? /*#__PURE__*/React.createElement(ContainerIcon, {
107
+ iconBefore: /*#__PURE__*/React.createElement(ContainerIcon, {
118
108
  containerType: containerType,
119
109
  title: title,
120
110
  containerIcon: containerIcon,
121
111
  size: "small"
122
- }) : /*#__PURE__*/React.createElement(Avatar, {
123
- size: "small",
124
- appearance: "square",
125
- src: containerIcon,
126
- testId: "linked-container-icon"
127
112
  }),
128
113
  iconAfter: /*#__PURE__*/React.createElement(Box, {
129
114
  backgroundColor: 'color.background.neutral.subtle',
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.36.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.38.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.36.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
2
2
  import "./index.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -58,6 +58,16 @@ export default function getMockProfileClient(BaseProfileClient, modifyResponse)
58
58
  }
59
59
  _inherits(MockTeamCentralClient, _TeamCentralCardClien);
60
60
  return _createClass(MockTeamCentralClient, [{
61
+ key: "preloadOrgId",
62
+ value: function preloadOrgId() {
63
+ return Promise.resolve('mock-org-id');
64
+ }
65
+ }, {
66
+ key: "preloadWorkspaceExistsWithType",
67
+ value: function preloadWorkspaceExistsWithType() {
68
+ return Promise.resolve('mock-workspace-exists-with-type');
69
+ }
70
+ }, {
61
71
  key: "createOrgContainsAnyWorkspacePromise",
62
72
  value: function createOrgContainsAnyWorkspacePromise(config) {
63
73
  return Promise.resolve(true);
@@ -1,6 +1,6 @@
1
1
  import sample from 'lodash/sample';
2
2
  import { getTimeString, getWeekday } from './util';
3
- var avatarImages = ['data:image/gif;base64,R0lGODdhgACAAPIHAABRzMHT8l6O3o2w6env+zh22P///xRe0CwAAAAAgACAAAAD/wi63P4wykmrvTjrzbv/YCiOZGmeaKqubOu+cCzPdG3feK7vfO//wKBwSCwaj8ikcslsOp/QqHRKrVqv2Kx2y+16v+CweEwum8/otHrNbrvf8Lh8Tq83CwGDgTA4RA4DBHoBAnADeoh7BQ8HgokGA24Cj4gED3mUBoVsmJmbC5OZe22iepEMh6V+a6UGAQ2poouspacLsZmrap2UswsFpa9sjZnCsLJuBY6IAbrHiQSfbQcCAQED0g8FA9YCznbg4eLj5OVO2zMDvlXKrt8qB3kE61LEg/Qo8ZX4TvrQ2SbaQXvHxB+lPicAiWomBdejaCUEFiPIxOGjAPw04GnFkIiKxYveOFRrBQlLKJKEKDagFohkySwSSRK4NgBbAQE1uS2TCdCKQZdAUaq0ImBn0KN6IIppiTQon6FbqBlt+hBhmm1Tj/LpebVaVkoz1YUrQDZnTbIZzaldy7at27dw48qdS7eu3bt48+rdy7ev37+AAwseTLiw4cOIEytezLix48eQI0uenDcBADs=', 'data:image/gif;base64,R0lGODdhgACAAPIHAACjv2fE1sXp70S2zR+qxJbV4////+r3+SwAAAAAgACAAAAD/wi63P4wykmrvTjrzbv/YCiOZGmeaKqubOu+cCzPdG3feK7vfO//wKBwSCwaj8ikcslsOp/QqHRKrVqv2Kx2y+16v+CweEwum8/otHrNbrvf8Lh8Tq83BwKD4VAgRAgFB3oCAXAFeoh7Aw8EgokGBW4Bj4gHD3mUBoVsmJmbC5OZe22iepEMh6V+a6UGAg2poouspacLsZmrap2UswsDpa9sjZnCsLJuA46IArrHiQefbQQBAgIF0g8DBdYBznbg4eLj5OVO2zMFvlXKrt8qBHkH61LEg/Qo8ZX4TvrQ2SbaQXvHxB+lPicAiWomBdejaCUEFiPIxOEjAfw04GnFkIiKxYveOFRrBQlLKJKEKDagFohkySwSSR64VgDbgAA1uS2TCdCKQZdAUaq0EmBn0KN6IIppiTQon6FbqBlt+hBhmm1Tj/LpebVaVkoz1YUbQDZnTbIZzaldy7at27dw48qdS7eu3bt48+rdy7ev37+AAwseTLiw4cOIEytezLix48eQI0uenDcBADs=', 'data:image/gif;base64,R0lGODdhgACAAPIHAACHWur18arVxYjDrlarjMnk2v///yeUbSwAAAAAgACAAAAD/wi63P4wykmrvTjrzbv/YCiOZGmeaKqubOu+cCzPdG3feK7vfO//wKBwSCwaj8ikcslsOp/QqHRKrVqv2Kx2y+16v+CweEwum8/otHrNbrvf8Lh8Tq83CQKDISA4RA4DAXoFBHADeoh7fg4HgokGAm4Ej4gBDwWUeoVsmJkGmwuTnpZsnnqRDIemi2qmBgUNqp6gaa4Dsa6saXmzDQemsGyNmai4mbpqw4kFyAu8lbTCAwUFAtEOeNQDzXbd3t/g4eJMgDPbWMPMLwd5AdxPyq/vJQedilT1jwHXJQSOlfOS5Mt0zgQgT+qiPKO0r98/SgkVuiIUgoC9TBGlLMRIIIagBIuuIGERFdKaRwUH8Dz0dCuLv5CVqg0YQKDmzGkrTTXcwg6mz58Zt7z8SVQfPy6BihINUHAMoJxKEzE96UVl1ErW4AASAJWhgKZ1UhK4ObMm1XFo06pdy7at27dw48qdS7eu3bt48+rdy7ev37+AAwseTLiw4cOIEytezLix48eQI8tNAAA7', 'data:image/gif;base64,R0lGODdhgACAAPIHAFJCqfDu+LGp2XlqvJGFyGBRsP///9TQ6iwAAAAAgACAAAAD/wi63P4wykmrvTjrzbv/YCiOZGmeaKqubOu+cCzPdG3feK7vfO//wKBwSCwaj8ikcslsOp/QqHRKrVqv2Kx2y+16v+CweEwum8/otHrNbrvf8Lh8Tq83BweDISAoRAoCAXoHBHACeoh7Aw8FgokGAm4Ej4gBD3mUBoVsmJmbC5OZe22iepEMh6V+a6UGBw2poouspacLsZmrap2UswsDpa9sjZnCsLJuA46IB7rHiQGfbQUEBwcC0g8DAtYEznbg4eLj5OVO2zMCvlXKrt8qBXkB61LEg/Qo8ZX4TvrQ2SbaQXvHxB+lPicAiWomBdejaCUEFiPIxOGjA/w04GnFkIiKxYveOFRrBQlLKJKEKDagFohkySwSSQa4JgDbAAI1uS2TCdCKQZdAUaq0QmBn0KN6IIppiTQon6FbqBlt+hBhmm1Tj/LpebVaVkoz1YUbQDZnTbIZzaldy7at27dw48qdS7eu3bt48+rdy7ev37+AAwseTLiw4cOIEytezLix48eQI0uenDcBADs=', 'data:image/gif;base64,R0lGODdhgACAAPIHAN41Cvzs6vfMxPGgkeRTNeBAG////+lvVywAAAAAgACAAEAD/wi63P4wykmrvTjrzbv/YCiOZGmeaKqubOu+62DMdEA8REDTA+x7uZ1BUIDIdoHDbzkh9H6DG5N1EFpngoO0eRjorrvndOwgHLqD9OC8Jbvf8Lh8Tq/b7/i8fs/v+/+AgYKDhIUrYFgNR2BKho6GBQJgA0UmBYtCRI8RXoienwYBlJukpaanqKmqq6ytrq+wsbKztLW2t7i5uru8vRySjA1VYAG9wFeNCwSIAr7OzzAFX0NtKQTHNqWYVlkhB8dXmqeRoOXmAtWwXdPmSGvQ8PHy8/T19vf4+fr7/P3+/wADChxIsKDBgwgTKlzIsKHDhxAjSpxI4tsMUZUeXPrSzYfXMCvFHIDbkUyXJzEKtglJZ+ukIk8ZcwXh9kDlDJa4LgkQ8E5Cl51RKAodGieIuBbkspEih6TkiQPsQsUsZPOiUxBQmU2l+inLVgsWXaLKWi4AzzRn0AwQEBVREldk28m1SmvjXE8YezlhW5YnTqKAAwseTLiw4cOIEytezLix48eQI0smkQAAOw==', 'data:image/gif;base64,R0lGODdhgACAAPIHAP+ZH/+vUv/Rnf+gMv+9cf/26//////mySwAAAAAgACAAAAD/wi63P4wykmrvTjrzbv/YCiOZGmeaKqubOu+cCzPdG3feK7vfO//wKBwSCwaj8ikcslsOp/QqHRKrVqv2Kx2y+16v+CweEwum8/otHrNbrvf8Lh8Tq83AweDoSAYRAYCBXoHBHACeoh7AQ8DgokGAm4Ej4gFD3mUBoVsmJmbC5OZe22iepEMh6V+a6UGBw2poouspacLsZmrap2UswsBpa9sjZnCsLJuAY6IB7rHiQWfbQMEBwcC0g8BAtYEznbg4eLj5OVO2zMCvlXKrt8qA3kF61LEg/Qo8ZX4TvrQ2SbaQXvHxB+lPicAiWomBdejaCUEFiPIxOGjA/w04GnFkIiKxYveOFRrBQlLKJKEKDagFohkySwSSRa4JgBbAAI1uS2TCdCKQZdAUaq0QmBn0KN6IIppiTQon6FbqBlt+hBhmm1Tj/LpebVaVkoz1YULQDZnTbIZzaldy7at27dw48qdS7eu3bt48+rdy7ev37+AAwseTLiw4cOIEytezLix48eQI0uenDcBADs=', '' // to test invalid img src
3
+ export var avatarImages = ['data:image/gif;base64,R0lGODdhgACAAPIHAABRzMHT8l6O3o2w6env+zh22P///xRe0CwAAAAAgACAAAAD/wi63P4wykmrvTjrzbv/YCiOZGmeaKqubOu+cCzPdG3feK7vfO//wKBwSCwaj8ikcslsOp/QqHRKrVqv2Kx2y+16v+CweEwum8/otHrNbrvf8Lh8Tq83CwGDgTA4RA4DBHoBAnADeoh7BQ8HgokGA24Cj4gED3mUBoVsmJmbC5OZe22iepEMh6V+a6UGAQ2poouspacLsZmrap2UswsFpa9sjZnCsLJuBY6IAbrHiQSfbQcCAQED0g8FA9YCznbg4eLj5OVO2zMDvlXKrt8qB3kE61LEg/Qo8ZX4TvrQ2SbaQXvHxB+lPicAiWomBdejaCUEFiPIxOGjAPw04GnFkIiKxYveOFRrBQlLKJKEKDagFohkySwSSRK4NgBbAQE1uS2TCdCKQZdAUaq0ImBn0KN6IIppiTQon6FbqBlt+hBhmm1Tj/LpebVaVkoz1YUrQDZnTbIZzaldy7at27dw48qdS7eu3bt48+rdy7ev37+AAwseTLiw4cOIEytezLix48eQI0uenDcBADs=', 'data:image/gif;base64,R0lGODdhgACAAPIHAACjv2fE1sXp70S2zR+qxJbV4////+r3+SwAAAAAgACAAAAD/wi63P4wykmrvTjrzbv/YCiOZGmeaKqubOu+cCzPdG3feK7vfO//wKBwSCwaj8ikcslsOp/QqHRKrVqv2Kx2y+16v+CweEwum8/otHrNbrvf8Lh8Tq83BwKD4VAgRAgFB3oCAXAFeoh7Aw8EgokGBW4Bj4gHD3mUBoVsmJmbC5OZe22iepEMh6V+a6UGAg2poouspacLsZmrap2UswsDpa9sjZnCsLJuA46IArrHiQefbQQBAgIF0g8DBdYBznbg4eLj5OVO2zMFvlXKrt8qBHkH61LEg/Qo8ZX4TvrQ2SbaQXvHxB+lPicAiWomBdejaCUEFiPIxOEjAfw04GnFkIiKxYveOFRrBQlLKJKEKDagFohkySwSSR64VgDbgAA1uS2TCdCKQZdAUaq0EmBn0KN6IIppiTQon6FbqBlt+hBhmm1Tj/LpebVaVkoz1YUbQDZnTbIZzaldy7at27dw48qdS7eu3bt48+rdy7ev37+AAwseTLiw4cOIEytezLix48eQI0uenDcBADs=', 'data:image/gif;base64,R0lGODdhgACAAPIHAACHWur18arVxYjDrlarjMnk2v///yeUbSwAAAAAgACAAAAD/wi63P4wykmrvTjrzbv/YCiOZGmeaKqubOu+cCzPdG3feK7vfO//wKBwSCwaj8ikcslsOp/QqHRKrVqv2Kx2y+16v+CweEwum8/otHrNbrvf8Lh8Tq83CQKDISA4RA4DAXoFBHADeoh7fg4HgokGAm4Ej4gBDwWUeoVsmJkGmwuTnpZsnnqRDIemi2qmBgUNqp6gaa4Dsa6saXmzDQemsGyNmai4mbpqw4kFyAu8lbTCAwUFAtEOeNQDzXbd3t/g4eJMgDPbWMPMLwd5AdxPyq/vJQedilT1jwHXJQSOlfOS5Mt0zgQgT+qiPKO0r98/SgkVuiIUgoC9TBGlLMRIIIagBIuuIGERFdKaRwUH8Dz0dCuLv5CVqg0YQKDmzGkrTTXcwg6mz58Zt7z8SVQfPy6BihINUHAMoJxKEzE96UVl1ErW4AASAJWhgKZ1UhK4ObMm1XFo06pdy7at27dw48qdS7eu3bt48+rdy7ev37+AAwseTLiw4cOIEytezLix48eQI8tNAAA7', 'data:image/gif;base64,R0lGODdhgACAAPIHAFJCqfDu+LGp2XlqvJGFyGBRsP///9TQ6iwAAAAAgACAAAAD/wi63P4wykmrvTjrzbv/YCiOZGmeaKqubOu+cCzPdG3feK7vfO//wKBwSCwaj8ikcslsOp/QqHRKrVqv2Kx2y+16v+CweEwum8/otHrNbrvf8Lh8Tq83BweDISAoRAoCAXoHBHACeoh7Aw8FgokGAm4Ej4gBD3mUBoVsmJmbC5OZe22iepEMh6V+a6UGBw2poouspacLsZmrap2UswsDpa9sjZnCsLJuA46IB7rHiQGfbQUEBwcC0g8DAtYEznbg4eLj5OVO2zMCvlXKrt8qBXkB61LEg/Qo8ZX4TvrQ2SbaQXvHxB+lPicAiWomBdejaCUEFiPIxOGjA/w04GnFkIiKxYveOFRrBQlLKJKEKDagFohkySwSSQa4JgDbAAI1uS2TCdCKQZdAUaq0QmBn0KN6IIppiTQon6FbqBlt+hBhmm1Tj/LpebVaVkoz1YUbQDZnTbIZzaldy7at27dw48qdS7eu3bt48+rdy7ev37+AAwseTLiw4cOIEytezLix48eQI0uenDcBADs=', 'data:image/gif;base64,R0lGODdhgACAAPIHAN41Cvzs6vfMxPGgkeRTNeBAG////+lvVywAAAAAgACAAEAD/wi63P4wykmrvTjrzbv/YCiOZGmeaKqubOu+62DMdEA8REDTA+x7uZ1BUIDIdoHDbzkh9H6DG5N1EFpngoO0eRjorrvndOwgHLqD9OC8Jbvf8Lh8Tq/b7/i8fs/v+/+AgYKDhIUrYFgNR2BKho6GBQJgA0UmBYtCRI8RXoienwYBlJukpaanqKmqq6ytrq+wsbKztLW2t7i5uru8vRySjA1VYAG9wFeNCwSIAr7OzzAFX0NtKQTHNqWYVlkhB8dXmqeRoOXmAtWwXdPmSGvQ8PHy8/T19vf4+fr7/P3+/wADChxIsKDBgwgTKlzIsKHDhxAjSpxI4tsMUZUeXPrSzYfXMCvFHIDbkUyXJzEKtglJZ+ukIk8ZcwXh9kDlDJa4LgkQ8E5Cl51RKAodGieIuBbkspEih6TkiQPsQsUsZPOiUxBQmU2l+inLVgsWXaLKWi4AzzRn0AwQEBVREldk28m1SmvjXE8YezlhW5YnTqKAAwseTLiw4cOIEytezLix48eQI0smkQAAOw==', 'data:image/gif;base64,R0lGODdhgACAAPIHAP+ZH/+vUv/Rnf+gMv+9cf/26//////mySwAAAAAgACAAAAD/wi63P4wykmrvTjrzbv/YCiOZGmeaKqubOu+cCzPdG3feK7vfO//wKBwSCwaj8ikcslsOp/QqHRKrVqv2Kx2y+16v+CweEwum8/otHrNbrvf8Lh8Tq83AweDoSAYRAYCBXoHBHACeoh7AQ8DgokGAm4Ej4gFD3mUBoVsmJmbC5OZe22iepEMh6V+a6UGBw2poouspacLsZmrap2UswsBpa9sjZnCsLJuAY6IB7rHiQWfbQMEBwcC0g8BAtYEznbg4eLj5OVO2zMCvlXKrt8qA3kF61LEg/Qo8ZX4TvrQ2SbaQXvHxB+lPicAiWomBdejaCUEFiPIxOGjA/w04GnFkIiKxYveOFRrBQlLKJKEKDagFohkySwSSRa4JgBbAAI1uS2TCdCKQZdAUaq0QmBn0KN6IIppiTQon6FbqBlt+hBhmm1Tj/LpebVaVkoz1YULQDZnTbIZzaldy7at27dw48qdS7eu3bt48+rdy7ev37+AAwseTLiw4cOIEytezLix48eQI0uenDcBADs=', '' // to test invalid img src
4
4
  ];
5
5
  var getAvatar = function getAvatar() {
6
6
  return sample(avatarImages);
@@ -1,11 +1,11 @@
1
- import profiles from './profile-data';
1
+ import profiles, { avatarImages } from './profile-data';
2
2
  var mappedProfileToReportingLines = profiles.map(function (profile, index) {
3
3
  return {
4
4
  accountIdentifier: '123456:12345-67890-' + index,
5
5
  identifierType: 'ATLASSIAN_ID',
6
6
  pii: {
7
7
  name: profile.User.fullName,
8
- picture: profile.User.avatarUrl
8
+ picture: index < avatarImages.length ? avatarImages[index] : avatarImages[0]
9
9
  }
10
10
  };
11
11
  });
@@ -1,4 +1,4 @@
1
- /* Card.tsx generated by @compiled/babel-plugin v0.36.1 */
1
+ /* Card.tsx generated by @compiled/babel-plugin v0.38.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.36.1 */
1
+ /* CoverImage.tsx generated by @compiled/babel-plugin v0.38.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.36.1 */
1
+ /* Error.tsx generated by @compiled/babel-plugin v0.38.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.36.1 */
1
+ /* ReportingLines.tsx generated by @compiled/babel-plugin v0.38.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.36.1 */
1
+ /* TeamCard.tsx generated by @compiled/babel-plugin v0.38.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.36.1 */
1
+ /* TeamTrigger.tsx generated by @compiled/babel-plugin v0.38.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.36.1 */
1
+ /* UserTrigger.tsx generated by @compiled/babel-plugin v0.38.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 */
@@ -5,6 +5,10 @@ import { getPageTime } from './performance';
5
5
 
6
6
  /** Below lines are copied from teams common analytics */
7
7
  var ANALYTICS_CHANNEL = 'peopleTeams';
8
+ export var PACKAGE_META_DATA = {
9
+ packageName: "@atlaskit/profilecard",
10
+ packageVersion: "24.13.7"
11
+ };
8
12
  var runItLater = function runItLater(cb) {
9
13
  var requestIdleCallback = window.requestIdleCallback;
10
14
  if (typeof requestIdleCallback === 'function') {
@@ -48,13 +52,13 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
48
52
  actionSubjectId: actionSubjectId,
49
53
  attributes: _objectSpread(_objectSpread({
50
54
  packageName: "@atlaskit/profilecard",
51
- packageVersion: "24.13.5"
55
+ packageVersion: "24.13.7"
52
56
  }, attributes), {}, {
53
57
  firedAt: Math.round(getPageTime())
54
58
  })
55
59
  };
56
60
  };
57
- var getActionSubject = function getActionSubject(type) {
61
+ export var getActionSubject = function getActionSubject(type) {
58
62
  switch (type) {
59
63
  case 'user':
60
64
  return USER_SUBJECT;
@@ -1,4 +1,5 @@
1
1
  import { type AnalyticsEventPayload } from '@atlaskit/analytics-next';
2
+ import type { FireEventType } from '@atlaskit/teams-app-internal-analytics';
2
3
  import { type AgentIdType, type ClientOverrides, type ProfileClient, type ProfileClientOptions, type TeamCentralReportingLinesData } from '../types';
3
4
  import RovoAgentCardClient from './RovoAgentCardClient';
4
5
  import TeamCentralCardClient from './TeamCentralCardClient';
@@ -15,7 +16,7 @@ declare class ProfileCardClient implements ProfileClient {
15
16
  rovoAgentClient: RovoAgentCardClient;
16
17
  constructor(config: ProfileClientOptions, clients?: ClientOverrides);
17
18
  flushCache(): void;
18
- getProfile(cloudId: string, userId: string, analytics?: (event: AnalyticsEventPayload) => void): Promise<any>;
19
+ getProfile(cloudId: string, userId: string, analytics?: (event: AnalyticsEventPayload) => void, analyticsNext?: FireEventType): Promise<any>;
19
20
  getTeamProfile(teamId: string, orgId?: string, analytics?: (event: AnalyticsEventPayload) => void): Promise<import("../types").Team>;
20
21
  getReportingLines(userId: string): Promise<TeamCentralReportingLinesData>;
21
22
  getTeamCentralBaseUrl(teamCentralScopes?: TeamCentralScopes): Promise<string | undefined>;
@@ -40,10 +40,10 @@ declare class TeamCentralCardClient extends CachingClient<TeamCentralReportingLi
40
40
  checkWorkspaceExists(): Promise<boolean>;
41
41
  getIsGlobalExperienceWorkspace(): Promise<boolean>;
42
42
  getOrgId(): Promise<string | null>;
43
- private preloadWorkspaceExistsWithType;
43
+ preloadWorkspaceExistsWithType(cloudId?: string): Promise<string | undefined>;
44
44
  private getOrgContainsAnyWorkspace;
45
45
  private getWorkspaceExistsWithType;
46
- private preloadOrgId;
46
+ preloadOrgId(gatewayGraphqlUrl: string, cloudId?: string, orgId?: string): Promise<string | null>;
47
47
  private getShardedApiPath;
48
48
  private filterReportingLinesUser;
49
49
  }
@@ -1,4 +1,5 @@
1
1
  import { type AnalyticsEventPayload } from '@atlaskit/analytics-next';
2
+ import { type FireEventType } from '@atlaskit/teams-app-internal-analytics';
2
3
  import type { ApiClientResponse, ProfileCardClientData, ProfileClientOptions } from '../types';
3
4
  import CachingClient from './CachingClient';
4
5
  /**
@@ -20,5 +21,5 @@ export default class UserProfileCardClient extends CachingClient<any> {
20
21
  options: ProfileClientOptions;
21
22
  constructor(options: ProfileClientOptions);
22
23
  makeRequest(cloudId: string, userId: string): Promise<ProfileCardClientData>;
23
- getProfile(cloudId: string, userId: string, analytics?: (event: AnalyticsEventPayload) => void): Promise<any>;
24
+ getProfile(cloudId: string, userId: string, analytics?: (event: AnalyticsEventPayload) => void, analyticsNext?: FireEventType): Promise<any>;
24
25
  }
@@ -1,10 +1,12 @@
1
1
  import React from 'react';
2
2
  import { type AnalyticsEventPayload } from '@atlaskit/analytics-next';
3
+ import type { AnalyticsEventAttributes } from '@atlaskit/teams-app-internal-analytics';
3
4
  import { type ProfileCardErrorType } from '../../types';
4
5
  interface Props {
5
6
  reload?: () => void | undefined;
6
7
  errorType?: ProfileCardErrorType;
7
8
  fireAnalytics: (payload: AnalyticsEventPayload) => void;
9
+ fireAnalyticsNext: <K extends keyof AnalyticsEventAttributes>(eventKey: K, attributes: AnalyticsEventAttributes[K]) => void;
8
10
  }
9
11
  declare const ErrorMessage: (props: Props) => React.JSX.Element;
10
12
  export default ErrorMessage;
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
- import { type AnalyticsProps, type ProfilecardProps } from '../../types';
2
+ import { type AnalyticsProps, type AnalyticsWithDurationProps, type ProfilecardProps } from '../../types';
3
3
  export declare const ProfilecardInternal: (props: ProfilecardProps & AnalyticsProps) => React.JSX.Element | null;
4
- declare const _default: React.ForwardRefExoticComponent<Omit<ProfilecardProps & AnalyticsProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any>>;
4
+ export declare const LoadingView: ({ fireAnalyticsWithDuration, fireAnalyticsWithDurationNext, }: AnalyticsWithDurationProps) => React.JSX.Element;
5
+ declare const _default: React.FC<ProfilecardProps & AnalyticsProps & Omit<Omit<ProfilecardProps & AnalyticsProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any>, "ref"> & React.RefAttributes<any>>;
5
6
  export default _default;
@@ -1,11 +1,13 @@
1
1
  import React from 'react';
2
2
  import { type AnalyticsEventPayload } from '@atlaskit/analytics-next';
3
+ import { type FireEventType } from '@atlaskit/teams-app-internal-analytics';
3
4
  import { type AnalyticsProps, type ProfileCardAction, type ProfileCardClientData, type ProfileCardResourcedProps, type ProfileCardResourcedState, type TeamCentralReportingLinesData } from '../../types';
4
5
  declare class ProfileCardResourced extends React.PureComponent<ProfileCardResourcedProps & AnalyticsProps, ProfileCardResourcedState> {
5
6
  static defaultProps: Partial<ProfileCardResourcedProps>;
6
7
  _isMounted: boolean;
7
8
  state: ProfileCardResourcedState;
8
9
  fireAnalytics: (payload: AnalyticsEventPayload) => void;
10
+ fireAnalyticsNext: FireEventType;
9
11
  componentDidMount(): void;
10
12
  componentDidUpdate(prevProps: ProfileCardResourcedProps): void;
11
13
  componentWillUnmount(): void;
@@ -18,7 +20,7 @@ declare class ProfileCardResourced extends React.PureComponent<ProfileCardResour
18
20
  render(): React.ReactNode;
19
21
  }
20
22
  export declare const ProfileCardResourcedInternal: typeof ProfileCardResourced;
21
- declare const _default: React.ForwardRefExoticComponent<Pick<Omit<ProfileCardResourcedProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, never> & {
23
+ declare const _default: React.FC<ProfileCardResourcedProps & Omit<Pick<Omit<ProfileCardResourcedProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, never> & {
22
24
  cloudId?: string | undefined;
23
25
  resourceClient?: import("../../types").ProfileClient | undefined;
24
26
  actions?: ProfileCardAction[] | undefined;
@@ -29,5 +31,5 @@ declare const _default: React.ForwardRefExoticComponent<Pick<Omit<ProfileCardRes
29
31
  userId?: string | undefined;
30
32
  reportingLinesProfileUrl?: string | undefined;
31
33
  onReportingLinesClick?: ((user: import("../../types").ReportingLinesUser) => void) | undefined;
32
- } & {} & React.RefAttributes<any>>;
34
+ } & {} & React.RefAttributes<any>, "ref"> & React.RefAttributes<any>>;
33
35
  export default _default;
@@ -1,7 +1,9 @@
1
1
  import React from 'react';
2
2
  import { type AnalyticsEventPayload } from '@atlaskit/analytics-next';
3
+ import { type FireEventType } from '@atlaskit/teams-app-internal-analytics';
3
4
  interface AnalyticsProps {
4
5
  fireAnalytics: (payload: AnalyticsEventPayload) => void;
6
+ fireAnalyticsNext: FireEventType;
5
7
  }
6
- declare const UserLoadingState: ({ fireAnalytics }: AnalyticsProps) => React.JSX.Element;
8
+ declare const UserLoadingState: ({ fireAnalytics, fireAnalyticsNext }: AnalyticsProps) => React.JSX.Element;
7
9
  export default UserLoadingState;
@@ -1 +1 @@
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>>>;
1
+ export declare const ProfileCardLazy: import("react").LazyExoticComponent<import("react").FC<import("../..").ProfilecardProps & import("../../types").AnalyticsProps & Omit<Omit<import("../..").ProfilecardProps & import("../../types").AnalyticsProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & import("react").RefAttributes<any>, "ref"> & import("react").RefAttributes<any>>>;
@@ -1,9 +1,11 @@
1
1
  import React from 'react';
2
2
  import { type AnalyticsEventPayload } from '@atlaskit/analytics-next';
3
+ import type { AnalyticsEventAttributes } from '@atlaskit/teams-app-internal-analytics';
3
4
  import { type ProfileType } from '../../types';
4
5
  interface AnalyticsProps {
5
6
  fireAnalytics?: (payload: AnalyticsEventPayload) => void;
7
+ fireAnalyticsNext?: <K extends keyof AnalyticsEventAttributes>(eventKey: K, attributes: AnalyticsEventAttributes[K]) => void;
6
8
  profileType: ProfileType;
7
9
  }
8
- export declare const LoadingState: ({ fireAnalytics, profileType }: AnalyticsProps) => React.JSX.Element;
10
+ export declare const LoadingState: ({ fireAnalytics, fireAnalyticsNext, profileType }: AnalyticsProps) => React.JSX.Element;
9
11
  export {};
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
- export declare const ProfileCardWrapper: ({ children }: {
2
+ export declare const ProfileCardWrapper: ({ children, testId, }: {
3
3
  children: React.ReactNode;
4
+ testId?: string;
4
5
  }) => React.JSX.Element;
@@ -1,5 +1,6 @@
1
1
  import { type AnalyticsEventPayload } from '@atlaskit/analytics-next';
2
2
  import { type PopupProps } from '@atlaskit/popup';
3
+ import type { AnalyticsEventAttributes } from '@atlaskit/teams-app-internal-analytics';
3
4
  import { type ProfileCardErrorType, type ProfileType } from '../../types';
4
5
  export type ProfileCardTriggerProps<T> = {
5
6
  trigger: 'hover' | 'click';
@@ -12,5 +13,7 @@ export type ProfileCardTriggerProps<T> = {
12
13
  }) => React.ReactNode;
13
14
  fetchProfile?: () => Promise<T>;
14
15
  profileCardType: ProfileType;
16
+ testId?: string;
15
17
  fireAnalytics?: (payload: AnalyticsEventPayload) => void;
18
+ fireAnalyticsNext?: <K extends keyof AnalyticsEventAttributes>(eventKey: K, attributes: AnalyticsEventAttributes[K]) => void;
16
19
  } & Omit<PopupProps, 'trigger' | 'isOpen' | 'content'>;
@@ -1,3 +1,4 @@
1
+ export declare const avatarImages: string[];
1
2
  declare const profiles: ({
2
3
  User: {
3
4
  avatarUrl: string;
@@ -2,6 +2,7 @@ import type React from 'react';
2
2
  import { type IntlShape } from 'react-intl-next';
3
3
  import { type AnalyticsEventPayload, type CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
4
4
  import { type ConversationStarter } from '@atlaskit/rovo-agent-components';
5
+ import type { AnalyticsEventAttributes, FireEventType, useAnalyticsEvents } from '@atlaskit/teams-app-internal-analytics';
5
6
  import { type TeamCentralScopes } from './client/ProfileCardClient';
6
7
  import type RovoAgentCardClient from './client/RovoAgentCardClient';
7
8
  import { type default as TeamCentralCardClient, type TeamCentralCardClientOptions } from './client/TeamCentralCardClient';
@@ -428,12 +429,18 @@ export interface ProfilecardProps {
428
429
  agentActions?: AgentActionsType;
429
430
  }
430
431
  export type AnalyticsFromDuration = (duration: number) => AnalyticsEventPayload;
432
+ export type AnalyticsFromDurationNext = <K extends keyof AnalyticsEventAttributes>(eventKey: K, duration: number) => {
433
+ attributes: AnalyticsEventAttributes[K];
434
+ };
431
435
  export type AnalyticsFunction = (generator: AnalyticsFromDuration) => void;
436
+ export type AnalyticsFunctionNext = <K extends keyof AnalyticsEventAttributes>(eventKey: K, generator: (duration: number) => AnalyticsEventAttributes[K]) => void;
432
437
  export interface AnalyticsProps {
433
438
  createAnalyticsEvent?: CreateUIAnalyticsEvent;
439
+ fireEvent?: ReturnType<typeof useAnalyticsEvents>['fireEvent'];
434
440
  }
435
441
  export interface AnalyticsWithDurationProps {
436
442
  fireAnalyticsWithDuration: AnalyticsFunction;
443
+ fireAnalyticsWithDurationNext: AnalyticsFunctionNext;
437
444
  }
438
445
  export interface TeamProfilecardProps extends TeamProfilecardCoreProps {
439
446
  /** Indicates whether the team's details are still loading. */
@@ -468,15 +475,15 @@ export type AgentPermissions = {
468
475
  };
469
476
  export interface ProfileClient {
470
477
  flushCache: () => void;
471
- getProfile: (cloudId: string, userId: string, analytics?: (event: AnalyticsEventPayload) => void) => Promise<ProfileCardClientData>;
472
- getTeamProfile: (teamId: string, orgId?: string, fireAnalytics?: (event: AnalyticsEventPayload) => void) => Promise<Team>;
478
+ getProfile: (cloudId: string, userId: string, analytics?: (event: AnalyticsEventPayload) => void, analyticsNext?: FireEventType) => Promise<ProfileCardClientData>;
479
+ getTeamProfile: (teamId: string, orgId?: string, fireAnalytics?: (event: AnalyticsEventPayload) => void, fireAnalyticsNext?: FireEventType) => Promise<Team>;
473
480
  getReportingLines: (userId: string) => Promise<TeamCentralReportingLinesData>;
474
481
  shouldShowGiveKudos: () => Promise<boolean>;
475
482
  getTeamCentralBaseUrl: (teamCentralScopes?: TeamCentralScopes) => Promise<string | undefined>;
476
- getRovoAgentProfile: (id: AgentIdType, fireAnalytics?: (event: AnalyticsEventPayload) => void) => Promise<RovoAgent>;
477
- getRovoAgentPermissions: (id: string, fireAnalytics?: (event: AnalyticsEventPayload) => void) => Promise<AgentPermissions>;
478
- deleteAgent: (id: string, fireAnalytics?: (event: AnalyticsEventPayload) => void) => Promise<void>;
479
- setFavouriteAgent: (id: string, isFavourite: boolean, fireAnalytics?: (event: AnalyticsEventPayload) => void) => Promise<void>;
483
+ getRovoAgentProfile: (id: AgentIdType, fireAnalytics?: (event: AnalyticsEventPayload) => void, fireAnalyticsNext?: FireEventType) => Promise<RovoAgent>;
484
+ getRovoAgentPermissions: (id: string, fireAnalytics?: (event: AnalyticsEventPayload) => void, fireAnalyticsNext?: FireEventType) => Promise<AgentPermissions>;
485
+ deleteAgent: (id: string, fireAnalytics?: (event: AnalyticsEventPayload) => void, fireAnalyticsNext?: FireEventType) => Promise<void>;
486
+ setFavouriteAgent: (id: string, isFavourite: boolean, fireAnalytics?: (event: AnalyticsEventPayload) => void, fireAnalyticsNext?: FireEventType) => Promise<void>;
480
487
  }
481
488
  export type ProfilecardTriggerPosition = 'bottom-start' | 'bottom' | 'bottom-end' | 'left-start' | 'left' | 'left-end' | 'top-end' | 'top' | 'top-start' | 'right-end' | 'right' | 'right-start';
482
489
  export type ProfileCardErrorType = {
@@ -2,6 +2,10 @@ import { type AnalyticsEventPayload } from '@atlaskit/analytics-next';
2
2
  import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
3
3
  import { type ErrorAttributes } from '../client/types';
4
4
  import { type ProfileType } from '../types';
5
+ export declare const PACKAGE_META_DATA: {
6
+ packageName: string;
7
+ packageVersion: string;
8
+ };
5
9
  type GenericAttributes = Record<string, string | number | boolean | undefined | string[]> | ErrorAttributes;
6
10
  interface AnalyticsEvent {
7
11
  action?: string;
@@ -16,6 +20,7 @@ interface AnalyticsEvent {
16
20
  * @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
17
21
  */
18
22
  export declare const fireEvent: (createAnalyticsEvent: CreateUIAnalyticsEvent | undefined, body: AnalyticsEvent) => void;
23
+ export declare const getActionSubject: (type: string) => "teamProfileCard" | "profilecard" | "rovoAgentProfilecard" | "user";
19
24
  export declare const cardTriggered: (type: ProfileType, method: "hover" | "click", teamId?: string) => AnalyticsEventPayload;
20
25
  export declare const teamRequestAnalytics: (action: "triggered" | "succeeded" | "failed", attributes?: {
21
26
  duration: number;
@@ -1,4 +1,5 @@
1
1
  import { type AnalyticsEventPayload } from '@atlaskit/analytics-next';
2
+ import type { FireEventType } from '@atlaskit/teams-app-internal-analytics';
2
3
  import { type AgentIdType, type ClientOverrides, type ProfileClient, type ProfileClientOptions, type TeamCentralReportingLinesData } from '../types';
3
4
  import RovoAgentCardClient from './RovoAgentCardClient';
4
5
  import TeamCentralCardClient from './TeamCentralCardClient';
@@ -15,7 +16,7 @@ declare class ProfileCardClient implements ProfileClient {
15
16
  rovoAgentClient: RovoAgentCardClient;
16
17
  constructor(config: ProfileClientOptions, clients?: ClientOverrides);
17
18
  flushCache(): void;
18
- getProfile(cloudId: string, userId: string, analytics?: (event: AnalyticsEventPayload) => void): Promise<any>;
19
+ getProfile(cloudId: string, userId: string, analytics?: (event: AnalyticsEventPayload) => void, analyticsNext?: FireEventType): Promise<any>;
19
20
  getTeamProfile(teamId: string, orgId?: string, analytics?: (event: AnalyticsEventPayload) => void): Promise<import("../types").Team>;
20
21
  getReportingLines(userId: string): Promise<TeamCentralReportingLinesData>;
21
22
  getTeamCentralBaseUrl(teamCentralScopes?: TeamCentralScopes): Promise<string | undefined>;
@@ -40,10 +40,10 @@ declare class TeamCentralCardClient extends CachingClient<TeamCentralReportingLi
40
40
  checkWorkspaceExists(): Promise<boolean>;
41
41
  getIsGlobalExperienceWorkspace(): Promise<boolean>;
42
42
  getOrgId(): Promise<string | null>;
43
- private preloadWorkspaceExistsWithType;
43
+ preloadWorkspaceExistsWithType(cloudId?: string): Promise<string | undefined>;
44
44
  private getOrgContainsAnyWorkspace;
45
45
  private getWorkspaceExistsWithType;
46
- private preloadOrgId;
46
+ preloadOrgId(gatewayGraphqlUrl: string, cloudId?: string, orgId?: string): Promise<string | null>;
47
47
  private getShardedApiPath;
48
48
  private filterReportingLinesUser;
49
49
  }
@@ -1,4 +1,5 @@
1
1
  import { type AnalyticsEventPayload } from '@atlaskit/analytics-next';
2
+ import { type FireEventType } from '@atlaskit/teams-app-internal-analytics';
2
3
  import type { ApiClientResponse, ProfileCardClientData, ProfileClientOptions } from '../types';
3
4
  import CachingClient from './CachingClient';
4
5
  /**
@@ -20,5 +21,5 @@ export default class UserProfileCardClient extends CachingClient<any> {
20
21
  options: ProfileClientOptions;
21
22
  constructor(options: ProfileClientOptions);
22
23
  makeRequest(cloudId: string, userId: string): Promise<ProfileCardClientData>;
23
- getProfile(cloudId: string, userId: string, analytics?: (event: AnalyticsEventPayload) => void): Promise<any>;
24
+ getProfile(cloudId: string, userId: string, analytics?: (event: AnalyticsEventPayload) => void, analyticsNext?: FireEventType): Promise<any>;
24
25
  }
@@ -1,10 +1,12 @@
1
1
  import React from 'react';
2
2
  import { type AnalyticsEventPayload } from '@atlaskit/analytics-next';
3
+ import type { AnalyticsEventAttributes } from '@atlaskit/teams-app-internal-analytics';
3
4
  import { type ProfileCardErrorType } from '../../types';
4
5
  interface Props {
5
6
  reload?: () => void | undefined;
6
7
  errorType?: ProfileCardErrorType;
7
8
  fireAnalytics: (payload: AnalyticsEventPayload) => void;
9
+ fireAnalyticsNext: <K extends keyof AnalyticsEventAttributes>(eventKey: K, attributes: AnalyticsEventAttributes[K]) => void;
8
10
  }
9
11
  declare const ErrorMessage: (props: Props) => React.JSX.Element;
10
12
  export default ErrorMessage;