@atlaskit/profilecard 26.19.8 → 26.20.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 (424) hide show
  1. package/CHANGELOG.md +72 -0
  2. package/build-agg-user-query/package.json +10 -0
  3. package/dist/cjs/client/AGGQuery.js +37 -0
  4. package/dist/cjs/client/AgentForbiddenError.js +28 -0
  5. package/dist/cjs/client/HeaderProcessor.js +1 -0
  6. package/dist/cjs/client/ProfileCardClient.js +11 -20
  7. package/dist/cjs/client/Query.js +1 -0
  8. package/dist/cjs/client/RovoAgentCardClient.js +38 -50
  9. package/dist/cjs/client/TeamCentralCardClient.js +5 -12
  10. package/dist/cjs/client/TeamProfileCardClient.js +2 -2
  11. package/dist/cjs/client/UserProfileCardClient.js +30 -54
  12. package/dist/cjs/client/addHeaders.js +16 -0
  13. package/dist/cjs/client/aggUserQuery.js +11 -0
  14. package/dist/cjs/client/aggUserQueryString.js +7 -0
  15. package/dist/cjs/client/ariPrefix.js +7 -0
  16. package/dist/cjs/client/buildAggUserQuery.js +18 -0
  17. package/dist/cjs/client/buildGatewayQuery.js +22 -0
  18. package/dist/cjs/client/buildHeaders.js +11 -0
  19. package/dist/cjs/client/buildReportingLinesQuery.js +14 -0
  20. package/dist/cjs/client/convertTeam.js +27 -0
  21. package/dist/cjs/client/defaultConfig.js +9 -0
  22. package/dist/cjs/client/directoryGraphqlQuery.js +37 -0
  23. package/dist/cjs/client/extractIdFromAri.js +14 -0
  24. package/dist/cjs/client/gatewayQueryV2.js +11 -0
  25. package/dist/cjs/client/{errorUtils.js → getErrorAttributes.js} +12 -15
  26. package/dist/cjs/client/getOrgIdForCloudIdFromAGG.js +3 -3
  27. package/dist/cjs/client/getTeamFromAGG.js +8 -64
  28. package/dist/cjs/client/graphQLQuery.js +66 -0
  29. package/dist/cjs/client/graphqlUtils.js +1 -125
  30. package/dist/cjs/client/handleAGGErrors.js +10 -0
  31. package/dist/cjs/client/handleDirectoryGraphQLErrors.js +10 -0
  32. package/dist/cjs/client/id.js +9 -0
  33. package/dist/cjs/client/idToAri.js +15 -0
  34. package/dist/cjs/client/idToAriSafe.js +14 -0
  35. package/dist/cjs/client/index.js +17 -4
  36. package/dist/cjs/client/maybeCreateTeamCentralClient.js +22 -0
  37. package/dist/cjs/client/modifyResponse.js +40 -0
  38. package/dist/cjs/components/Agent/AgentProfileCard.js +4 -4
  39. package/dist/cjs/components/Agent/AgentProfileCardResourced.js +2 -2
  40. package/dist/cjs/components/Agent/hooks/duplicateFetch.js +2 -169
  41. package/dist/cjs/components/Agent/hooks/fetchActivationId.js +57 -0
  42. package/dist/cjs/components/Agent/hooks/fetchDuplicateAgentMutation.js +74 -0
  43. package/dist/cjs/components/Agent/hooks/fetchHasVersionCapability.js +60 -0
  44. package/dist/cjs/components/Agent/hooks/firstCharUpper.js +9 -0
  45. package/dist/cjs/components/Agent/hooks/useAgentActions.js +2 -212
  46. package/dist/cjs/components/Agent/hooks/useAgentUrlActions.js +219 -0
  47. package/dist/cjs/components/Agent/utils/getAtlassianStudioAgentDuplicateUrl.js +10 -0
  48. package/dist/cjs/components/Agent/utils/getAtlassianStudioAgentEditUrl.js +10 -0
  49. package/dist/cjs/components/Agent/utils/getStudioHost.js +14 -0
  50. package/dist/cjs/components/Agent/utils/getStudioPath.js +19 -0
  51. package/dist/cjs/components/Agent/utils/index.js +3 -28
  52. package/dist/cjs/components/Team/TeamProfileCard.js +2 -2
  53. package/dist/cjs/components/Team/index.js +5 -0
  54. package/dist/cjs/components/User/LoadingView.js +31 -0
  55. package/dist/cjs/components/User/ProfileCard.js +21 -242
  56. package/dist/cjs/components/User/ProfileCardDetails.js +6 -6
  57. package/dist/cjs/components/User/ProfileCardResourced.js +2 -2
  58. package/dist/cjs/components/User/ProfilecardInternal.js +234 -0
  59. package/dist/cjs/components/User/index.js +7 -0
  60. package/dist/cjs/components/common/LoadingState.js +2 -1
  61. package/dist/cjs/components/common/ProfileCardTrigger.js +2 -1
  62. package/dist/cjs/components/team-profile-card/main.js +9 -3
  63. package/dist/cjs/components/team-profile-card/team-actions/index.js +2 -2
  64. package/dist/cjs/index.js +5 -6
  65. package/dist/cjs/internal/isValidDate.js +12 -0
  66. package/dist/cjs/internal/relative-date.js +2 -7
  67. package/dist/cjs/mocks/get-time-string.js +16 -0
  68. package/dist/cjs/mocks/get-weekday.js +15 -0
  69. package/dist/cjs/mocks/mock-profile-client.js +7 -5
  70. package/dist/cjs/mocks/mock-team-client.js +2 -2
  71. package/dist/cjs/mocks/profile-data.js +32 -31
  72. package/dist/cjs/mocks/random.js +9 -0
  73. package/dist/cjs/mocks/simple-mock-clients.js +4 -3
  74. package/dist/cjs/mocks/static-team-data.js +33 -0
  75. package/dist/cjs/mocks/team-data.js +8 -33
  76. package/dist/cjs/styled/Card.js +1 -0
  77. package/dist/cjs/styled/Error.js +1 -0
  78. package/dist/cjs/styled/ReportingLines.js +1 -0
  79. package/dist/cjs/styled/TeamCard.js +1 -0
  80. package/dist/cjs/styled/TeamTrigger.js +1 -0
  81. package/dist/cjs/styled/UserTrigger.js +1 -0
  82. package/dist/cjs/util/AGGError.js +37 -0
  83. package/dist/cjs/util/AGGErrors.js +34 -0
  84. package/dist/cjs/util/AnalyticsEventPayload.js +1 -0
  85. package/dist/cjs/util/DirectoryGraphQLError.js +36 -0
  86. package/dist/cjs/util/DirectoryGraphQLErrors.js +34 -0
  87. package/dist/cjs/util/GenericAttributes.js +1 -0
  88. package/dist/cjs/util/HttpError.js +27 -0
  89. package/dist/cjs/util/actionClicked.js +15 -0
  90. package/dist/cjs/util/agentRequestAnalytics.js +15 -0
  91. package/dist/cjs/util/analytics.js +5 -134
  92. package/dist/cjs/util/cardTriggered.js +23 -0
  93. package/dist/cjs/util/createEvent.js +30 -0
  94. package/dist/cjs/util/errorRetryClicked.js +15 -0
  95. package/dist/cjs/util/getActionSubject.js +19 -0
  96. package/dist/cjs/util/moreActionsClicked.js +15 -0
  97. package/dist/cjs/util/moreMembersClicked.js +15 -0
  98. package/dist/cjs/util/profileCardRendered.js +15 -0
  99. package/dist/cjs/util/reportingLinesClicked.js +15 -0
  100. package/dist/cjs/util/teamAvatarClicked.js +15 -0
  101. package/dist/cjs/util/teamRequestAnalytics.js +15 -0
  102. package/dist/cjs/util/userRequestAnalytics.js +15 -0
  103. package/dist/es2019/client/AGGQuery.js +12 -0
  104. package/dist/es2019/client/AgentForbiddenError.js +8 -0
  105. package/dist/es2019/client/HeaderProcessor.js +0 -0
  106. package/dist/es2019/client/ProfileCardClient.js +10 -19
  107. package/dist/es2019/client/Query.js +0 -0
  108. package/dist/es2019/client/RovoAgentCardClient.js +3 -10
  109. package/dist/es2019/client/TeamCentralCardClient.js +2 -31
  110. package/dist/es2019/client/TeamProfileCardClient.js +1 -1
  111. package/dist/es2019/client/UserProfileCardClient.js +15 -102
  112. package/dist/es2019/client/addHeaders.js +10 -0
  113. package/dist/es2019/client/aggUserQuery.js +31 -0
  114. package/dist/es2019/client/aggUserQueryString.js +28 -0
  115. package/dist/es2019/client/ariPrefix.js +1 -0
  116. package/dist/es2019/client/buildAggUserQuery.js +10 -0
  117. package/dist/es2019/client/buildGatewayQuery.js +15 -0
  118. package/dist/es2019/client/buildHeaders.js +5 -0
  119. package/dist/es2019/client/buildReportingLinesQuery.js +30 -0
  120. package/dist/es2019/client/convertTeam.js +21 -0
  121. package/dist/es2019/client/defaultConfig.js +3 -0
  122. package/dist/es2019/client/directoryGraphqlQuery.js +12 -0
  123. package/dist/es2019/client/extractIdFromAri.js +8 -0
  124. package/dist/es2019/client/gatewayQueryV2.js +30 -0
  125. package/dist/es2019/client/{errorUtils.js → getErrorAttributes.js} +4 -7
  126. package/dist/es2019/client/getOrgIdForCloudIdFromAGG.js +2 -2
  127. package/dist/es2019/client/getTeamFromAGG.js +4 -80
  128. package/dist/es2019/client/graphQLQuery.js +24 -0
  129. package/dist/es2019/client/graphqlUtils.js +0 -47
  130. package/dist/es2019/client/handleAGGErrors.js +4 -0
  131. package/dist/es2019/client/handleDirectoryGraphQLErrors.js +4 -0
  132. package/dist/es2019/client/id.js +1 -0
  133. package/dist/es2019/client/idToAri.js +9 -0
  134. package/dist/es2019/client/idToAriSafe.js +6 -0
  135. package/dist/es2019/client/index.js +22 -2
  136. package/dist/es2019/client/maybeCreateTeamCentralClient.js +14 -0
  137. package/dist/es2019/client/modifyResponse.js +32 -0
  138. package/dist/es2019/components/Agent/AgentProfileCard.js +2 -2
  139. package/dist/es2019/components/Agent/AgentProfileCardResourced.js +1 -1
  140. package/dist/es2019/components/Agent/hooks/duplicateFetch.js +1 -121
  141. package/dist/es2019/components/Agent/hooks/fetchActivationId.js +35 -0
  142. package/dist/es2019/components/Agent/hooks/fetchDuplicateAgentMutation.js +49 -0
  143. package/dist/es2019/components/Agent/hooks/fetchHasVersionCapability.js +39 -0
  144. package/dist/es2019/components/Agent/hooks/firstCharUpper.js +1 -0
  145. package/dist/es2019/components/Agent/hooks/useAgentActions.js +1 -182
  146. package/dist/es2019/components/Agent/hooks/useAgentUrlActions.js +186 -0
  147. package/dist/es2019/components/Agent/utils/getAtlassianStudioAgentDuplicateUrl.js +2 -0
  148. package/dist/es2019/components/Agent/utils/getAtlassianStudioAgentEditUrl.js +2 -0
  149. package/dist/es2019/components/Agent/utils/getStudioHost.js +8 -0
  150. package/dist/es2019/components/Agent/utils/getStudioPath.js +13 -0
  151. package/dist/es2019/components/Agent/utils/index.js +2 -23
  152. package/dist/es2019/components/Team/TeamProfileCard.js +1 -1
  153. package/dist/es2019/components/Team/index.js +6 -0
  154. package/dist/es2019/components/User/LoadingView.js +19 -0
  155. package/dist/es2019/components/User/ProfileCard.js +12 -221
  156. package/dist/es2019/components/User/ProfileCardDetails.js +1 -1
  157. package/dist/es2019/components/User/ProfileCardResourced.js +1 -1
  158. package/dist/es2019/components/User/ProfilecardInternal.js +207 -0
  159. package/dist/es2019/components/User/index.js +8 -0
  160. package/dist/es2019/components/common/LoadingState.js +2 -1
  161. package/dist/es2019/components/common/ProfileCardTrigger.js +2 -1
  162. package/dist/es2019/components/team-profile-card/main.js +8 -1
  163. package/dist/es2019/components/team-profile-card/team-actions/index.js +1 -1
  164. package/dist/es2019/i18n/index.js +91 -0
  165. package/dist/es2019/index.js +4 -2
  166. package/dist/es2019/internal/isValidDate.js +4 -0
  167. package/dist/es2019/internal/relative-date.js +1 -4
  168. package/dist/es2019/mocks/{util.js → get-time-string.js} +1 -9
  169. package/dist/es2019/mocks/get-weekday.js +9 -0
  170. package/dist/es2019/mocks/index.js +13 -0
  171. package/dist/es2019/mocks/mock-profile-client.js +4 -2
  172. package/dist/es2019/mocks/mock-team-client.js +1 -1
  173. package/dist/es2019/mocks/profile-data.js +2 -1
  174. package/dist/es2019/mocks/random.js +1 -0
  175. package/dist/es2019/mocks/simple-mock-clients.js +3 -2
  176. package/dist/es2019/mocks/static-team-data.js +21 -0
  177. package/dist/es2019/mocks/team-data.js +6 -26
  178. package/dist/es2019/styled/Card.js +1 -0
  179. package/dist/es2019/styled/Error.js +1 -0
  180. package/dist/es2019/styled/ReportingLines.js +1 -0
  181. package/dist/es2019/styled/TeamCard.js +1 -0
  182. package/dist/es2019/styled/TeamTrigger.js +1 -0
  183. package/dist/es2019/styled/UserTrigger.js +1 -0
  184. package/dist/es2019/util/AGGError.js +16 -0
  185. package/dist/es2019/util/AGGErrors.js +12 -0
  186. package/dist/es2019/util/AnalyticsEventPayload.js +0 -0
  187. package/dist/es2019/util/DirectoryGraphQLError.js +14 -0
  188. package/dist/es2019/util/DirectoryGraphQLErrors.js +12 -0
  189. package/dist/es2019/util/GenericAttributes.js +0 -0
  190. package/dist/es2019/util/HttpError.js +7 -0
  191. package/dist/es2019/util/actionClicked.js +8 -0
  192. package/dist/es2019/util/agentRequestAnalytics.js +7 -0
  193. package/dist/es2019/util/analytics.js +4 -107
  194. package/dist/es2019/util/cardTriggered.js +15 -0
  195. package/dist/es2019/util/createEvent.js +18 -0
  196. package/dist/es2019/util/errorRetryClicked.js +8 -0
  197. package/dist/es2019/util/getActionSubject.js +13 -0
  198. package/dist/es2019/util/moreActionsClicked.js +8 -0
  199. package/dist/es2019/util/moreMembersClicked.js +8 -0
  200. package/dist/es2019/util/profileCardRendered.js +8 -0
  201. package/dist/es2019/util/reportingLinesClicked.js +8 -0
  202. package/dist/es2019/util/teamAvatarClicked.js +8 -0
  203. package/dist/es2019/util/teamRequestAnalytics.js +7 -0
  204. package/dist/es2019/util/userRequestAnalytics.js +7 -0
  205. package/dist/esm/client/AGGQuery.js +31 -0
  206. package/dist/esm/client/AgentForbiddenError.js +21 -0
  207. package/dist/esm/client/HeaderProcessor.js +0 -0
  208. package/dist/esm/client/ProfileCardClient.js +10 -17
  209. package/dist/esm/client/Query.js +0 -0
  210. package/dist/esm/client/RovoAgentCardClient.js +27 -39
  211. package/dist/esm/client/TeamCentralCardClient.js +2 -9
  212. package/dist/esm/client/TeamProfileCardClient.js +1 -1
  213. package/dist/esm/client/UserProfileCardClient.js +17 -51
  214. package/dist/esm/client/addHeaders.js +10 -0
  215. package/dist/esm/client/aggUserQuery.js +4 -0
  216. package/dist/esm/client/aggUserQueryString.js +1 -0
  217. package/dist/esm/client/ariPrefix.js +1 -0
  218. package/dist/esm/client/buildAggUserQuery.js +12 -0
  219. package/dist/esm/client/buildGatewayQuery.js +16 -0
  220. package/dist/esm/client/buildHeaders.js +5 -0
  221. package/dist/esm/client/buildReportingLinesQuery.js +8 -0
  222. package/dist/esm/client/convertTeam.js +22 -0
  223. package/dist/esm/client/defaultConfig.js +3 -0
  224. package/dist/esm/client/directoryGraphqlQuery.js +31 -0
  225. package/dist/esm/client/extractIdFromAri.js +8 -0
  226. package/dist/esm/client/gatewayQueryV2.js +5 -0
  227. package/dist/esm/client/{errorUtils.js → getErrorAttributes.js} +5 -8
  228. package/dist/esm/client/getOrgIdForCloudIdFromAGG.js +2 -2
  229. package/dist/esm/client/getTeamFromAGG.js +4 -59
  230. package/dist/esm/client/graphQLQuery.js +59 -0
  231. package/dist/esm/client/graphqlUtils.js +0 -118
  232. package/dist/esm/client/handleAGGErrors.js +4 -0
  233. package/dist/esm/client/handleDirectoryGraphQLErrors.js +4 -0
  234. package/dist/esm/client/id.js +3 -0
  235. package/dist/esm/client/idToAri.js +9 -0
  236. package/dist/esm/client/idToAriSafe.js +8 -0
  237. package/dist/esm/client/index.js +22 -2
  238. package/dist/esm/client/maybeCreateTeamCentralClient.js +15 -0
  239. package/dist/esm/client/modifyResponse.js +33 -0
  240. package/dist/esm/components/Agent/AgentProfileCard.js +2 -2
  241. package/dist/esm/components/Agent/AgentProfileCardResourced.js +1 -1
  242. package/dist/esm/components/Agent/hooks/duplicateFetch.js +1 -167
  243. package/dist/esm/components/Agent/hooks/fetchActivationId.js +51 -0
  244. package/dist/esm/components/Agent/hooks/fetchDuplicateAgentMutation.js +68 -0
  245. package/dist/esm/components/Agent/hooks/fetchHasVersionCapability.js +54 -0
  246. package/dist/esm/components/Agent/hooks/firstCharUpper.js +3 -0
  247. package/dist/esm/components/Agent/hooks/useAgentActions.js +1 -210
  248. package/dist/esm/components/Agent/hooks/useAgentUrlActions.js +212 -0
  249. package/dist/esm/components/Agent/utils/getAtlassianStudioAgentDuplicateUrl.js +4 -0
  250. package/dist/esm/components/Agent/utils/getAtlassianStudioAgentEditUrl.js +4 -0
  251. package/dist/esm/components/Agent/utils/getStudioHost.js +8 -0
  252. package/dist/esm/components/Agent/utils/getStudioPath.js +13 -0
  253. package/dist/esm/components/Agent/utils/index.js +2 -27
  254. package/dist/esm/components/Team/TeamProfileCard.js +1 -1
  255. package/dist/esm/components/Team/index.js +6 -0
  256. package/dist/esm/components/User/LoadingView.js +22 -0
  257. package/dist/esm/components/User/ProfileCard.js +12 -239
  258. package/dist/esm/components/User/ProfileCardDetails.js +1 -1
  259. package/dist/esm/components/User/ProfileCardResourced.js +1 -1
  260. package/dist/esm/components/User/ProfilecardInternal.js +225 -0
  261. package/dist/esm/components/User/index.js +8 -0
  262. package/dist/esm/components/common/LoadingState.js +2 -1
  263. package/dist/esm/components/common/ProfileCardTrigger.js +2 -1
  264. package/dist/esm/components/team-profile-card/main.js +8 -1
  265. package/dist/esm/components/team-profile-card/team-actions/index.js +1 -1
  266. package/dist/esm/i18n/index.js +91 -0
  267. package/dist/esm/index.js +4 -2
  268. package/dist/esm/internal/isValidDate.js +5 -0
  269. package/dist/esm/internal/relative-date.js +1 -5
  270. package/dist/esm/mocks/{util.js → get-time-string.js} +1 -11
  271. package/dist/esm/mocks/get-weekday.js +9 -0
  272. package/dist/esm/mocks/index.js +13 -0
  273. package/dist/esm/mocks/mock-profile-client.js +4 -2
  274. package/dist/esm/mocks/mock-team-client.js +1 -1
  275. package/dist/esm/mocks/profile-data.js +2 -1
  276. package/dist/esm/mocks/random.js +3 -0
  277. package/dist/esm/mocks/simple-mock-clients.js +3 -2
  278. package/dist/esm/mocks/static-team-data.js +27 -0
  279. package/dist/esm/mocks/team-data.js +6 -32
  280. package/dist/esm/styled/Card.js +1 -0
  281. package/dist/esm/styled/Error.js +1 -0
  282. package/dist/esm/styled/ReportingLines.js +1 -0
  283. package/dist/esm/styled/TeamCard.js +1 -0
  284. package/dist/esm/styled/TeamTrigger.js +1 -0
  285. package/dist/esm/styled/UserTrigger.js +1 -0
  286. package/dist/esm/util/AGGError.js +30 -0
  287. package/dist/esm/util/AGGErrors.js +27 -0
  288. package/dist/esm/util/AnalyticsEventPayload.js +0 -0
  289. package/dist/esm/util/DirectoryGraphQLError.js +29 -0
  290. package/dist/esm/util/DirectoryGraphQLErrors.js +27 -0
  291. package/dist/esm/util/GenericAttributes.js +0 -0
  292. package/dist/esm/util/HttpError.js +20 -0
  293. package/dist/esm/util/actionClicked.js +10 -0
  294. package/dist/esm/util/agentRequestAnalytics.js +9 -0
  295. package/dist/esm/util/analytics.js +4 -132
  296. package/dist/esm/util/cardTriggered.js +17 -0
  297. package/dist/esm/util/createEvent.js +24 -0
  298. package/dist/esm/util/errorRetryClicked.js +10 -0
  299. package/dist/esm/util/getActionSubject.js +13 -0
  300. package/dist/esm/util/moreActionsClicked.js +10 -0
  301. package/dist/esm/util/moreMembersClicked.js +10 -0
  302. package/dist/esm/util/profileCardRendered.js +10 -0
  303. package/dist/esm/util/reportingLinesClicked.js +10 -0
  304. package/dist/esm/util/teamAvatarClicked.js +10 -0
  305. package/dist/esm/util/teamRequestAnalytics.js +9 -0
  306. package/dist/esm/util/userRequestAnalytics.js +9 -0
  307. package/dist/types/client/AGGQuery.d.ts +8 -0
  308. package/dist/types/client/AgentForbiddenError.d.ts +4 -0
  309. package/dist/types/client/HeaderProcessor.d.ts +1 -0
  310. package/dist/types/client/ProfileCardClient.d.ts +8 -3
  311. package/dist/types/client/Query.d.ts +4 -0
  312. package/dist/types/client/RovoAgentCardClient.d.ts +0 -4
  313. package/dist/types/client/TeamCentralCardClient.d.ts +0 -6
  314. package/dist/types/client/UserProfileCardClient.d.ts +9 -16
  315. package/dist/types/client/addHeaders.d.ts +1 -0
  316. package/dist/types/client/aggUserQuery.d.ts +2 -0
  317. package/dist/types/client/aggUserQueryString.d.ts +1 -0
  318. package/dist/types/client/ariPrefix.d.ts +1 -0
  319. package/dist/types/client/buildAggUserQuery.d.ts +6 -0
  320. package/dist/types/client/buildGatewayQuery.d.ts +12 -0
  321. package/dist/types/client/buildHeaders.d.ts +1 -0
  322. package/dist/types/client/buildReportingLinesQuery.d.ts +6 -0
  323. package/dist/types/client/convertTeam.d.ts +3 -0
  324. package/dist/types/client/defaultConfig.d.ts +3 -0
  325. package/dist/types/client/directoryGraphqlQuery.d.ts +8 -0
  326. package/dist/types/client/extractIdFromAri.d.ts +1 -0
  327. package/dist/types/client/gatewayQueryV2.d.ts +1 -0
  328. package/dist/types/client/getErrorAttributes.d.ts +6 -0
  329. package/dist/types/client/getTeamFromAGG.d.ts +1 -21
  330. package/dist/types/client/graphQLQuery.d.ts +3 -0
  331. package/dist/types/client/graphqlUtils.d.ts +0 -18
  332. package/dist/types/client/handleAGGErrors.d.ts +1 -0
  333. package/dist/types/client/handleDirectoryGraphQLErrors.d.ts +1 -0
  334. package/dist/types/client/id.d.ts +2 -0
  335. package/dist/types/client/idToAri.d.ts +4 -0
  336. package/dist/types/client/idToAriSafe.d.ts +1 -0
  337. package/dist/types/client/index.d.ts +18 -2
  338. package/dist/types/client/maybeCreateTeamCentralClient.d.ts +3 -0
  339. package/dist/types/client/modifyResponse.d.ts +10 -0
  340. package/dist/types/components/Agent/hooks/duplicateFetch.d.ts +1 -24
  341. package/dist/types/components/Agent/hooks/fetchActivationId.d.ts +5 -0
  342. package/dist/types/components/Agent/hooks/fetchDuplicateAgentMutation.d.ts +11 -0
  343. package/dist/types/components/Agent/hooks/fetchHasVersionCapability.d.ts +8 -0
  344. package/dist/types/components/Agent/hooks/firstCharUpper.d.ts +1 -0
  345. package/dist/types/components/Agent/hooks/useAgentActions.d.ts +1 -16
  346. package/dist/types/components/Agent/hooks/useAgentUrlActions.d.ts +15 -0
  347. package/dist/types/components/Agent/utils/getAtlassianStudioAgentDuplicateUrl.d.ts +1 -0
  348. package/dist/types/components/Agent/utils/getAtlassianStudioAgentEditUrl.d.ts +1 -0
  349. package/dist/types/components/Agent/utils/getStudioHost.d.ts +1 -0
  350. package/dist/types/components/Agent/utils/getStudioPath.d.ts +1 -0
  351. package/dist/types/components/Agent/utils/index.d.ts +2 -4
  352. package/dist/types/components/Team/index.d.ts +3 -0
  353. package/dist/types/components/User/LoadingView.d.ts +3 -0
  354. package/dist/types/components/User/ProfileCard.d.ts +9 -4
  355. package/dist/types/components/User/ProfilecardInternal.d.ts +3 -0
  356. package/dist/types/components/User/index.d.ts +6 -0
  357. package/dist/types/components/team-profile-card/main.d.ts +5 -0
  358. package/dist/types/i18n/index.d.ts +90 -0
  359. package/dist/types/index.d.ts +3 -2
  360. package/dist/types/internal/isValidDate.d.ts +1 -0
  361. package/dist/types/internal/relative-date.d.ts +0 -1
  362. package/dist/types/mocks/get-time-string.d.ts +1 -0
  363. package/dist/types/mocks/get-weekday.d.ts +4 -0
  364. package/dist/types/mocks/index.d.ts +12 -0
  365. package/dist/types/mocks/random.d.ts +1 -0
  366. package/dist/types/mocks/simple-mock-clients.d.ts +1 -1
  367. package/dist/types/mocks/static-team-data.d.ts +8 -0
  368. package/dist/types/mocks/team-data.d.ts +10 -7
  369. package/dist/types/types.d.ts +1 -1
  370. package/dist/types/util/AGGError.d.ts +15 -0
  371. package/dist/types/util/AGGErrors.d.ts +6 -0
  372. package/dist/types/util/AnalyticsEventPayload.d.ts +1 -0
  373. package/dist/types/util/DirectoryGraphQLError.d.ts +14 -0
  374. package/dist/types/util/DirectoryGraphQLErrors.d.ts +6 -0
  375. package/dist/types/util/GenericAttributes.d.ts +1 -0
  376. package/dist/types/util/HttpError.d.ts +5 -0
  377. package/dist/types/util/actionClicked.d.ts +13 -0
  378. package/dist/types/util/agentRequestAnalytics.d.ts +9 -0
  379. package/dist/types/util/analytics.d.ts +3 -97
  380. package/dist/types/util/cardTriggered.d.ts +7 -0
  381. package/dist/types/util/createEvent.d.ts +7 -0
  382. package/dist/types/util/errorRetryClicked.d.ts +8 -0
  383. package/dist/types/util/getActionSubject.d.ts +1 -0
  384. package/dist/types/util/moreActionsClicked.d.ts +10 -0
  385. package/dist/types/util/moreMembersClicked.d.ts +9 -0
  386. package/dist/types/util/profileCardRendered.d.ts +16 -0
  387. package/dist/types/util/reportingLinesClicked.d.ts +9 -0
  388. package/dist/types/util/teamAvatarClicked.d.ts +11 -0
  389. package/dist/types/util/teamRequestAnalytics.d.ts +9 -0
  390. package/dist/types/util/userRequestAnalytics.d.ts +9 -0
  391. package/loading-view/package.json +10 -0
  392. package/main/package.json +4 -4
  393. package/modify-response/package.json +10 -0
  394. package/package.json +2 -2
  395. package/profile-card-client/package.json +4 -4
  396. package/profile-card-resourced/package.json +10 -0
  397. package/profilecard-internal/package.json +10 -0
  398. package/dist/cjs/components/Error/index.js +0 -27
  399. package/dist/cjs/components/Icon/index.js +0 -13
  400. package/dist/cjs/components/team-profile-card/index.js +0 -12
  401. package/dist/cjs/entry-points/ProfileCardClient.js +0 -13
  402. package/dist/cjs/entry-points/main.js +0 -12
  403. package/dist/cjs/mocks/util.js +0 -26
  404. package/dist/cjs/util/errors.js +0 -105
  405. package/dist/es2019/components/Error/index.js +0 -3
  406. package/dist/es2019/components/Icon/index.js +0 -1
  407. package/dist/es2019/components/team-profile-card/index.js +0 -1
  408. package/dist/es2019/entry-points/ProfileCardClient.js +0 -1
  409. package/dist/es2019/entry-points/main.js +0 -1
  410. package/dist/es2019/util/errors.js +0 -59
  411. package/dist/esm/components/Error/index.js +0 -3
  412. package/dist/esm/components/Icon/index.js +0 -1
  413. package/dist/esm/components/team-profile-card/index.js +0 -1
  414. package/dist/esm/entry-points/ProfileCardClient.js +0 -1
  415. package/dist/esm/entry-points/main.js +0 -1
  416. package/dist/esm/util/errors.js +0 -98
  417. package/dist/types/client/errorUtils.d.ts +0 -5
  418. package/dist/types/components/Error/index.d.ts +0 -3
  419. package/dist/types/components/Icon/index.d.ts +0 -1
  420. package/dist/types/components/team-profile-card/index.d.ts +0 -1
  421. package/dist/types/entry-points/ProfileCardClient.d.ts +0 -1
  422. package/dist/types/entry-points/main.d.ts +0 -1
  423. package/dist/types/mocks/util.d.ts +0 -6
  424. package/dist/types/util/errors.d.ts +0 -43
@@ -0,0 +1,207 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import React, { useCallback, useEffect, useMemo, useState } from 'react';
3
+ import { FormattedMessage, useIntl } from 'react-intl';
4
+ import Avatar from '@atlaskit/avatar/avatar';
5
+ import Button from '@atlaskit/button/default/button';
6
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
7
+ import { useAnalyticsEvents } from '@atlaskit/teams-app-internal-analytics/use-analytics-events';
8
+ import { TeamsLinkButton } from '@atlaskit/teams-app-internal-navigation/teams-link-button';
9
+ import messages from '../../messages';
10
+ import { ActionButtonGroup, ActionsFlexSpacer, AnimatedKudosButton, AnimationWrapper, CardContainer, CardContent, KudosBlobAnimation, ProfileImage } from '../../styled/Card';
11
+ import { CardWrapper } from '../../styled/UserTrigger';
12
+ import { PACKAGE_META_DATA } from '../../util/analytics';
13
+ import { isBasicClick } from '../../util/click';
14
+ import { getPageTime } from '../../util/performance';
15
+ import { default as ErrorMessage } from '../Error/ErrorMessage';
16
+ import { LoadingView } from './LoadingView';
17
+ import { ACTION_OVERFLOW_THRESHOLD, OverflowProfileCardButtons } from './OverflowProfileCardButtons';
18
+ import { ProfileCardDetails } from './ProfileCardDetails';
19
+ const GIVE_KUDOS_ACTION_ID = 'give-kudos';
20
+ const useKudos = (cloudId, userId, teamCentralBaseUrl, openKudosDrawer) => {
21
+ const kudosUrl = useMemo(() => {
22
+ const recipientId = userId ? `&recipientId=${userId}` : '';
23
+ const cloudIdParam = cloudId ? `&cloudId=${cloudId}` : '';
24
+ return `${teamCentralBaseUrl || ''}/kudos/give?type=individual${recipientId}${cloudIdParam}`;
25
+ }, [cloudId, teamCentralBaseUrl, userId]);
26
+ const kudosButtonCallback = useCallback(() => {
27
+ if (openKudosDrawer) {
28
+ openKudosDrawer();
29
+ } else {
30
+ window.open(kudosUrl);
31
+ }
32
+ }, [kudosUrl, openKudosDrawer]);
33
+ const kudosAction = useMemo(() => {
34
+ return {
35
+ label: /*#__PURE__*/React.createElement(FormattedMessage, messages.giveKudosButton),
36
+ id: GIVE_KUDOS_ACTION_ID,
37
+ callback: kudosButtonCallback,
38
+ link: kudosUrl
39
+ };
40
+ }, [kudosButtonCallback, kudosUrl]);
41
+ return {
42
+ kudosAction,
43
+ kudosButtonCallback,
44
+ kudosUrl
45
+ };
46
+ };
47
+ const Wrapper = props => /*#__PURE__*/React.createElement(CardWrapper, {
48
+ testId: "profilecard",
49
+ role: "dialog",
50
+ labelledBy: props.labelledBy,
51
+ ariaLabel: props.ariaLabel
52
+ }, props.children);
53
+ const Actions = ({
54
+ actions,
55
+ fireAnalyticsWithDuration,
56
+ isTriggeredUsingKeyboard,
57
+ isRenderedInPortal,
58
+ fullName
59
+ }) => {
60
+ const onActionClick = useCallback((action, args, event, index) => {
61
+ fireAnalyticsWithDuration('ui.profilecard.clicked.action', duration => ({
62
+ method: 'click',
63
+ firedAt: Math.round(getPageTime()),
64
+ duration,
65
+ hasHref: !!action.link,
66
+ hasOnClick: !!action.callback,
67
+ index,
68
+ actionId: action.id || 'no-id-specified',
69
+ ...PACKAGE_META_DATA
70
+ }));
71
+ if (action.callback && isBasicClick(event)) {
72
+ event.preventDefault();
73
+ action.callback(event, ...args);
74
+ }
75
+ }, [fireAnalyticsWithDuration]);
76
+ if (!actions || actions.length === 0) {
77
+ return null;
78
+ }
79
+ const regularActions = actions.slice(0, ACTION_OVERFLOW_THRESHOLD);
80
+ const overflowActions = actions.length > ACTION_OVERFLOW_THRESHOLD ? actions.slice(ACTION_OVERFLOW_THRESHOLD) : undefined;
81
+ return /*#__PURE__*/React.createElement(ActionButtonGroup, {
82
+ testId: "profilecard-actions"
83
+ }, regularActions.map((action, index) => {
84
+ const isKudos = action.id === GIVE_KUDOS_ACTION_ID;
85
+ if (isKudos && fg('fix_give_kudos_btn_incorrect_role')) {
86
+ const kudosButton = /*#__PURE__*/React.createElement(Button, {
87
+ appearance: "default",
88
+ key: action.id || index,
89
+ onClick: (event, ...args) => onActionClick(action, args, event, index),
90
+ autoFocus: index === 0 && isTriggeredUsingKeyboard && !isRenderedInPortal,
91
+ id: `action-button-${action.id}`,
92
+ "aria-labelledby": `action-button-${action.id} profilecard-name-label`
93
+ }, action.label, /*#__PURE__*/React.createElement(AnimationWrapper, null, /*#__PURE__*/React.createElement(KudosBlobAnimation, null)));
94
+ return /*#__PURE__*/React.createElement(AnimatedKudosButton, {
95
+ key: `profile-card-action-kudos_${action.id || index}`
96
+ }, kudosButton);
97
+ }
98
+ const button = /*#__PURE__*/React.createElement(TeamsLinkButton, {
99
+ appearance: "default",
100
+ key: action.id || index,
101
+ onClick: (event, ...args) => onActionClick(action, args, event, index),
102
+ href: action.link || '',
103
+ intent: "action",
104
+ autoFocus: index === 0 && isTriggeredUsingKeyboard && !isRenderedInPortal,
105
+ id: `action-button-${action.id}`,
106
+ "aria-labelledby": `action-button-${action.id} profilecard-name-label`
107
+ }, action.label, isKudos && /*#__PURE__*/React.createElement(AnimationWrapper, null, /*#__PURE__*/React.createElement(KudosBlobAnimation, null)));
108
+
109
+ // TODO: Remove this once fix_give_kudos_btn_incorrect_role is fully rolled out
110
+ if (isKudos) {
111
+ return /*#__PURE__*/React.createElement(AnimatedKudosButton, {
112
+ key: `profile-card-action-kudos_${action.id || index}`
113
+ }, button);
114
+ }
115
+ return button;
116
+ }), overflowActions && /*#__PURE__*/React.createElement(OverflowProfileCardButtons, _extends({
117
+ actions: overflowActions,
118
+ fireAnalyticsWithDuration: fireAnalyticsWithDuration,
119
+ onItemClick: (action, args, event, index) => onActionClick(action, args, event, index + ACTION_OVERFLOW_THRESHOLD)
120
+ }, fg('jfp_a11y_team_profile_card_actions_label') && {
121
+ fullName
122
+ })));
123
+ };
124
+ export const ProfilecardInternal = props => {
125
+ const [openTime] = useState(getPageTime());
126
+ const intl = useIntl();
127
+ const {
128
+ fireEvent
129
+ } = useAnalyticsEvents();
130
+ const fireAnalyticsWithDuration = useCallback((eventKey, generator) => {
131
+ const duration = getPageTime() - openTime;
132
+ const attributes = generator(duration);
133
+ fireEvent(eventKey, attributes);
134
+ }, [openTime, fireEvent]);
135
+ const {
136
+ kudosAction
137
+ } = useKudos(props.cloudId, props.userId, props.teamCentralBaseUrl, props.openKudosDrawer);
138
+ const {
139
+ actions = [],
140
+ isCurrentUser,
141
+ isKudosEnabled,
142
+ status = 'active'
143
+ } = props;
144
+ const realActions = useMemo(() => {
145
+ if (isCurrentUser || !isKudosEnabled || status !== 'active') {
146
+ return actions;
147
+ }
148
+ return actions.concat([kudosAction]);
149
+ }, [actions, isCurrentUser, isKudosEnabled, kudosAction, status]);
150
+ const {
151
+ isLoading,
152
+ fullName,
153
+ hasError
154
+ } = props;
155
+ const canRender = !hasError && !isLoading && !!(fullName || status === 'closed');
156
+ useEffect(() => {
157
+ if (canRender) {
158
+ fireAnalyticsWithDuration('ui.profilecard.rendered.content', duration => ({
159
+ duration,
160
+ numActions: realActions.length,
161
+ firedAt: Math.round(getPageTime()),
162
+ ...PACKAGE_META_DATA
163
+ }));
164
+ }
165
+ }, [canRender, fireAnalyticsWithDuration, realActions]);
166
+ if (hasError) {
167
+ return /*#__PURE__*/React.createElement(Wrapper, {
168
+ ariaLabel: intl.formatMessage(messages.errorDialogLabel)
169
+ }, /*#__PURE__*/React.createElement(ErrorMessage, {
170
+ reload: props.clientFetchProfile,
171
+ errorType: props.errorType || null,
172
+ fireAnalytics: fireEvent
173
+ }));
174
+ }
175
+ if (isLoading) {
176
+ return /*#__PURE__*/React.createElement(Wrapper, {
177
+ ariaLabel: intl.formatMessage(messages.loadingDialogLabel)
178
+ }, /*#__PURE__*/React.createElement(LoadingView, {
179
+ fireAnalyticsWithDuration: fireAnalyticsWithDuration
180
+ }));
181
+ }
182
+ if (!canRender) {
183
+ return null;
184
+ }
185
+ const isDisabledUser = status === 'inactive' || status === 'closed';
186
+ return /*#__PURE__*/React.createElement(Wrapper, {
187
+ labelledBy: "profilecard-name-label"
188
+ }, /*#__PURE__*/React.createElement(CardContainer, {
189
+ isDisabledUser: isDisabledUser,
190
+ withoutElevation: props.withoutElevation
191
+ }, /*#__PURE__*/React.createElement(ProfileImage, null, /*#__PURE__*/React.createElement(Avatar, {
192
+ size: "xlarge",
193
+ src: status !== 'closed' ? props.avatarUrl : undefined,
194
+ borderColor: "var(--ds-shadow-overlay, 0px 8px 12px #1E1F2126, 0px 0px 1px #1E1F214f)"
195
+ })), /*#__PURE__*/React.createElement(CardContent, null, /*#__PURE__*/React.createElement(ProfileCardDetails, _extends({}, props, {
196
+ status: status,
197
+ fireAnalyticsWithDuration: fireAnalyticsWithDuration
198
+ })), realActions && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ActionsFlexSpacer, null), /*#__PURE__*/React.createElement(Actions, _extends({}, fg('jfp_a11y_team_profile_card_actions_label') && {
199
+ fullName
200
+ }, {
201
+ fullName: fullName,
202
+ actions: realActions,
203
+ fireAnalyticsWithDuration: fireAnalyticsWithDuration,
204
+ isTriggeredUsingKeyboard: props.isTriggeredUsingKeyboard,
205
+ isRenderedInPortal: props.isRenderedInPortal
206
+ }))))));
207
+ };
@@ -1,4 +1,12 @@
1
+ /* eslint-disable @repo/internal/deprecations/deprecation-ticket-required -- VOLTC-139 tracks removal of these deprecated re-export shims. */
2
+ /**
3
+ * @deprecated Use `import { DELAY_MS_HIDE, DELAY_MS_SHOW } from '@atlaskit/profilecard/config'` instead.
4
+ */
1
5
  export { DELAY_MS_HIDE, DELAY_MS_SHOW } from '../../util/config';
6
+
7
+ /**
8
+ * @deprecated Use `import { ProfileCardLazy } from '@atlaskit/profilecard/lazy-profile-card'` instead.
9
+ */
2
10
  export { ProfileCardLazy } from './lazyProfileCard';
3
11
  import ProfileCardTrigger from './ProfileCardTrigger';
4
12
  export default ProfileCardTrigger;
@@ -1,7 +1,8 @@
1
1
  import React, { useEffect } from 'react';
2
2
  import AkSpinner from '@atlaskit/spinner/spinner';
3
3
  import { SpinnerContainer } from '../../styled/UserTrigger';
4
- import { getActionSubject, PACKAGE_META_DATA } from '../../util/analytics';
4
+ import { PACKAGE_META_DATA } from '../../util/analytics';
5
+ import { getActionSubject } from '../../util/getActionSubject';
5
6
  import { getPageTime } from '../../util/performance';
6
7
  export const LoadingState = ({
7
8
  fireAnalytics,
@@ -2,7 +2,8 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react';
3
3
  import { Popup } from '@atlaskit/popup/popup';
4
4
  import { layers } from '@atlaskit/theme/constants';
5
- import { getActionSubject, PACKAGE_META_DATA } from '../../util/analytics';
5
+ import { PACKAGE_META_DATA } from '../../util/analytics';
6
+ import { getActionSubject } from '../../util/getActionSubject';
6
7
  import { getPageTime } from '../../util/performance';
7
8
  import { useProfileInfo } from '../../util/useProfileInfo';
8
9
  import { LoadingState } from './LoadingState';
@@ -159,4 +159,11 @@ export const TeamProfileCard = ({
159
159
  isDisplayedOnProfileCard: true,
160
160
  maxNumberOfContainersToShow: loading ? 0 : 9
161
161
  })))));
162
- };
162
+ };
163
+
164
+ // Public API aliases preserved from an eliminated entry-point (volt-migrate-package).
165
+ /**
166
+ * @deprecated Use the `TeamProfileCard` export from
167
+ * `@atlaskit/profilecard/team-profile-card/main` instead.
168
+ */
169
+ export { TeamProfileCard as TeamProfileCardWithContainer };
@@ -2,7 +2,7 @@ import React, { Suspense, useCallback, useState } from 'react';
2
2
  import { useIntl } from 'react-intl';
3
3
  import { GiveKudosLauncherLazy, KudosType } from '@atlaskit/give-kudos';
4
4
  import ButtonItem from '@atlaskit/menu/button-item';
5
- import { extractIdFromAri } from '../../../client/getTeamFromAGG';
5
+ import { extractIdFromAri } from '../../../client/extractIdFromAri';
6
6
  import { messages } from './messages';
7
7
  import { MoreActions } from './more-actions';
8
8
  const GIVE_KUDOS_ACTION_ID = 'give-kudos';
@@ -1,36 +1,127 @@
1
+ /* eslint-disable @repo/internal/deprecations/deprecation-ticket-required -- VOLTC-139 tracks removal of these deprecated re-export shims. */
1
2
  /**
2
3
  * NOTE:
3
4
  *
4
5
  * This file was generated by i18n-tools which has been deprecated.
5
6
  * It now requires manual updates.
6
7
  */
8
+ /**
9
+ * @deprecated Use `import zh from '@atlaskit/profilecard/i18n/zh'` instead.
10
+ */
7
11
  export { default as zh } from './zh';
12
+ /**
13
+ * @deprecated Use `import zh_TW from '@atlaskit/profilecard/i18n/zh_TW'` instead.
14
+ */
8
15
  export { default as zh_TW } from './zh_TW';
16
+ /**
17
+ * @deprecated Use `import cs from '@atlaskit/profilecard/i18n/cs'` instead.
18
+ */
9
19
  export { default as cs } from './cs';
20
+ /**
21
+ * @deprecated Use `import da from '@atlaskit/profilecard/i18n/da'` instead.
22
+ */
10
23
  export { default as da } from './da';
24
+ /**
25
+ * @deprecated Use `import nl from '@atlaskit/profilecard/i18n/nl'` instead.
26
+ */
11
27
  export { default as nl } from './nl';
28
+ /**
29
+ * @deprecated Use `import et from '@atlaskit/profilecard/i18n/et'` instead.
30
+ */
12
31
  export { default as et } from './et';
32
+ /**
33
+ * @deprecated Use `import fi from '@atlaskit/profilecard/i18n/fi'` instead.
34
+ */
13
35
  export { default as fi } from './fi';
36
+ /**
37
+ * @deprecated Use `import fr from '@atlaskit/profilecard/i18n/fr'` instead.
38
+ */
14
39
  export { default as fr } from './fr';
40
+ /**
41
+ * @deprecated Use `import de from '@atlaskit/profilecard/i18n/de'` instead.
42
+ */
15
43
  export { default as de } from './de';
44
+ /**
45
+ * @deprecated Use `import hu from '@atlaskit/profilecard/i18n/hu'` instead.
46
+ */
16
47
  export { default as hu } from './hu';
48
+ /**
49
+ * @deprecated Use `import it from '@atlaskit/profilecard/i18n/it'` instead.
50
+ */
17
51
  export { default as it } from './it';
52
+ /**
53
+ * @deprecated Use `import ja from '@atlaskit/profilecard/i18n/ja'` instead.
54
+ */
18
55
  export { default as ja } from './ja';
56
+ /**
57
+ * @deprecated Use `import ko from '@atlaskit/profilecard/i18n/ko'` instead.
58
+ */
19
59
  export { default as ko } from './ko';
60
+ /**
61
+ * @deprecated Use `import nb from '@atlaskit/profilecard/i18n/nb'` instead.
62
+ */
20
63
  export { default as nb } from './nb';
64
+ /**
65
+ * @deprecated Use `import pl from '@atlaskit/profilecard/i18n/pl'` instead.
66
+ */
21
67
  export { default as pl } from './pl';
68
+ /**
69
+ * @deprecated Use `import pt_BR from '@atlaskit/profilecard/i18n/pt_BR'` instead.
70
+ */
22
71
  export { default as pt_BR } from './pt_BR';
72
+ /**
73
+ * @deprecated Use `import pt_PT from '@atlaskit/profilecard/i18n/pt_PT'` instead.
74
+ */
23
75
  export { default as pt_PT } from './pt_PT';
76
+ /**
77
+ * @deprecated Use `import ru from '@atlaskit/profilecard/i18n/ru'` instead.
78
+ */
24
79
  export { default as ru } from './ru';
80
+ /**
81
+ * @deprecated Use `import sk from '@atlaskit/profilecard/i18n/sk'` instead.
82
+ */
25
83
  export { default as sk } from './sk';
84
+ /**
85
+ * @deprecated Use `import es from '@atlaskit/profilecard/i18n/es'` instead.
86
+ */
26
87
  export { default as es } from './es';
88
+ /**
89
+ * @deprecated Use `import sv from '@atlaskit/profilecard/i18n/sv'` instead.
90
+ */
27
91
  export { default as sv } from './sv';
92
+ /**
93
+ * @deprecated Use `import th from '@atlaskit/profilecard/i18n/th'` instead.
94
+ */
28
95
  export { default as th } from './th';
96
+ /**
97
+ * @deprecated Use `import tr from '@atlaskit/profilecard/i18n/tr'` instead.
98
+ */
29
99
  export { default as tr } from './tr';
100
+ /**
101
+ * @deprecated Use `import uk from '@atlaskit/profilecard/i18n/uk'` instead.
102
+ */
30
103
  export { default as uk } from './uk';
104
+ /**
105
+ * @deprecated Use `import vi from '@atlaskit/profilecard/i18n/vi'` instead.
106
+ */
31
107
  export { default as vi } from './vi';
108
+ /**
109
+ * @deprecated Use `import en_ZZ from '@atlaskit/profilecard/i18n/en_ZZ'` instead.
110
+ */
32
111
  export { default as en_ZZ } from './en_ZZ';
112
+ /**
113
+ * @deprecated Use `import en from '@atlaskit/profilecard/i18n/en'` instead.
114
+ */
33
115
  export { default as en } from './en';
116
+ /**
117
+ * @deprecated Use `import en_GB from '@atlaskit/profilecard/i18n/en_GB'` instead.
118
+ */
34
119
  export { default as en_GB } from './en_GB';
120
+ /**
121
+ * @deprecated Use `import is from '@atlaskit/profilecard/i18n/is'` instead.
122
+ */
35
123
  export { default as is } from './is';
124
+ /**
125
+ * @deprecated Use `import ro from '@atlaskit/profilecard/i18n/ro'` instead.
126
+ */
36
127
  export { default as ro } from './ro';
@@ -1,16 +1,18 @@
1
1
  // Avoid exporting new components in this file as they will affect the bundle size of all consumers
2
2
  // importing directly from @atlaskit/profilecard.
3
+
3
4
  import ProfileCardClient from './client/ProfileCardClient';
4
5
  // Note: when generating and updating Flow types in Jira, `TeamProfileClient` and `TeamProfileCardClient` are the same type
5
6
  import TeamProfileClient from './client/TeamProfileCardClient';
6
7
  // Note: when generating and updating Flow types in Jira, `UserProfileClient` and `UserProfileCardClient` are the same type
7
- import UserProfileClient, { modifyResponse } from './client/UserProfileCardClient';
8
+ import UserProfileClient from './client/UserProfileCardClient';
9
+ import { modifyResponse } from './client/modifyResponse';
8
10
  import AgentProfileCard from './components/Agent/AgentProfileCard';
9
- import { TeamProfileCard } from './components/team-profile-card';
10
11
  import TeamProfileCardTrigger from './components/Team/TeamProfileCardTrigger';
11
12
  import ProfileCard from './components/User/ProfileCard';
12
13
  import ProfileCardResourced from './components/User/ProfileCardResourced';
13
14
  import ProfileCardTrigger from './components/User/ProfileCardTrigger';
15
+ import { TeamProfileCard } from './components/team-profile-card/main';
14
16
  import { DELAY_MS_HIDE, DELAY_MS_SHOW } from './util/config';
15
17
 
16
18
  // Legacy Profile Card in Jira still needs to use `withOuterListeners`
@@ -0,0 +1,4 @@
1
+ import isValid from 'date-fns/isValid';
2
+ export function isValidDate(date, today = new Date()) {
3
+ return !!date.getTime && isValid(date) && date.getTime() <= today.getTime();
4
+ }
@@ -1,10 +1,7 @@
1
1
  import differenceInMonths from 'date-fns/differenceInMonths';
2
2
  import isThisMonth from 'date-fns/isThisMonth';
3
3
  import isThisWeek from 'date-fns/isThisWeek';
4
- import isValid from 'date-fns/isValid';
5
- export function isValidDate(date, today = new Date()) {
6
- return !!date.getTime && isValid(date) && date.getTime() <= today.getTime();
7
- }
4
+ import { isValidDate } from './isValidDate';
8
5
  export default function getRelativeDateKey(date, today = new Date()) {
9
6
  if (!date || !isValidDate(date, today)) {
10
7
  return null;
@@ -1,15 +1,7 @@
1
+ import { random } from './random';
1
2
  function padMinutes(minutes) {
2
3
  return minutes < 10 ? `0${minutes}` : String(minutes);
3
4
  }
4
- export const random = int => Math.floor(Math.random() * (int + 1));
5
- export const getWeekday = () => {
6
- const array = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'];
7
- const index = random(6);
8
- return {
9
- index,
10
- string: array[index]
11
- };
12
- };
13
5
  export const getTimeString = () => {
14
6
  const hours = random(23);
15
7
  const minutes = random(59);
@@ -0,0 +1,9 @@
1
+ import { random } from './random';
2
+ export const getWeekday = () => {
3
+ const array = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'];
4
+ const index = random(6);
5
+ return {
6
+ index,
7
+ string: array[index]
8
+ };
9
+ };
@@ -1,4 +1,17 @@
1
+ /* eslint-disable @repo/internal/deprecations/deprecation-ticket-required -- VOLTC-139 tracks removal of these deprecated re-export shims. */
2
+ /**
3
+ * @deprecated Use `import getMockProfileClient from '@atlaskit/profilecard/mock-profile-client'` instead.
4
+ */
1
5
  export { default as getMockProfileClient } from './mock-profile-client';
6
+ /**
7
+ * @deprecated Use `import getMockTeamClient from '@atlaskit/profilecard/mock-team-client'` instead.
8
+ */
2
9
  export { default as getMockTeamClient } from './mock-team-client';
10
+ /**
11
+ * @deprecated Use `import profiles from '@atlaskit/profilecard/profile-data'` instead.
12
+ */
3
13
  export { default as profiles } from './profile-data';
14
+ /**
15
+ * @deprecated Use `import { simpleMockTeamClient, simpleMockUserClient, simpleProfileClient, simpleMockAgentClient } from '@atlaskit/profilecard/simple-mock-clients'` instead.
16
+ */
4
17
  export { simpleMockTeamClient, simpleMockUserClient, simpleProfileClient, simpleMockAgentClient } from './simple-mock-clients';
@@ -1,8 +1,10 @@
1
- import TeamCentralCardClient from '../client/TeamCentralCardClient';
1
+ import { default as TeamCentralCardClient } from '../client/TeamCentralCardClient';
2
2
  import UserProfileCardClient from '../client/UserProfileCardClient';
3
+ import { getTimeString } from './get-time-string';
4
+ import { getWeekday } from './get-weekday';
3
5
  import profiles from './profile-data';
6
+ import { random } from './random';
4
7
  import { reportingLinesData } from './reporting-lines-data';
5
- import { getTimeString, getWeekday, random } from './util';
6
8
  export default function getMockProfileClient(BaseProfileClient, modifyResponse) {
7
9
  class MockUserClient extends UserProfileCardClient {
8
10
  makeRequest(cloudId, userId) {
@@ -1,5 +1,5 @@
1
- import { handleAGGErrors } from '../client/errorUtils';
2
1
  import TeamProfileCardClient from '../client/TeamProfileCardClient';
2
+ import { handleAGGErrors } from '../client/handleAGGErrors';
3
3
  export default function getMockTeamClient(data) {
4
4
  return class MockTeamClient extends TeamProfileCardClient {
5
5
  makeRequest(teamId) {
@@ -1,5 +1,6 @@
1
1
  import sample from 'lodash/sample';
2
- import { getTimeString, getWeekday } from './util';
2
+ import { getTimeString } from './get-time-string';
3
+ import { getWeekday } from './get-weekday';
3
4
  export const 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/wi63P4wykmrvTjrzb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ytezLix48eQI0smkQAAOw==', '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
5
  ];
5
6
  const getAvatar = () => sample(avatarImages);
@@ -0,0 +1 @@
1
+ export const random = int => Math.floor(Math.random() * (int + 1));
@@ -1,11 +1,12 @@
1
1
  import ProfileCardClient from '../client/ProfileCardClient';
2
- import RovoAgentCardClient from '../client/RovoAgentCardClient';
2
+ import { default as RovoAgentCardClient } from '../client/RovoAgentCardClient';
3
3
  import TeamProfileCardClient from '../client/TeamProfileCardClient';
4
4
  import UserProfileCardClient from '../client/UserProfileCardClient';
5
5
  import agentData, { agentAggData } from './agent-data';
6
+ import { getTimeString } from './get-time-string';
7
+ import { getWeekday } from './get-weekday';
6
8
  import profiles from './profile-data';
7
9
  import teamData from './team-data';
8
- import { getTimeString, getWeekday } from './util';
9
10
  class SimpleMockTeamClient extends TeamProfileCardClient {
10
11
  makeRequest(teamId) {
11
12
  const simpleMockTeam = teamData({
@@ -0,0 +1,21 @@
1
+ import { avatarImages, descriptions, memberNames, names, sampleImage } from './team-data';
2
+ export function staticTeamData({
3
+ headerImage = 'None',
4
+ displayName = 'Short',
5
+ members: memberCount = 1,
6
+ description = 'Long',
7
+ isVerified = false
8
+ }) {
9
+ return {
10
+ id: 'team-id',
11
+ largeHeaderImageUrl: headerImage === 'Picture' ? sampleImage : undefined,
12
+ displayName: names[displayName] || names.Short,
13
+ members: memberNames.map((name, index) => ({
14
+ id: index.toString(),
15
+ avatarUrl: avatarImages[index % avatarImages.length],
16
+ fullName: name
17
+ })).slice(0, memberCount),
18
+ description: description ? descriptions[description] : descriptions.Long,
19
+ isVerified
20
+ };
21
+ }
@@ -1,22 +1,22 @@
1
1
  import sample from 'lodash/sample';
2
- const 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+SwAAAAA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9kDlDJa4LgkQ8E5Cl51RKAodGieIuBbkspEih6TkiQPsQsUsZPOiUxBQmU2l+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
2
+ export const 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/otHrNbrvf8Lh8Tq83CQKDISA4RA4DAXoFBHADeoh7fg4HgokGAm4Ej4gBDwWUe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BUIDIdoHDbzkh9H6DG5N1EFpngoO0eRjorrvndOwgHLqD9OC8Jbvf8Lh8Tq/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
3
  ];
4
4
  const getAvatar = () => sample(avatarImages);
5
- const memberNames = ['Kramer Hatfield', 'Schwartz Mclaughlin', 'Nichole Walter', 'Cleveland Rodriquez', 'Hess Stone', 'Lewis Cervantes', 'Abbott Lamb', 'Conner Duncan', 'Bauer Burch', 'Mcbride Haynes', 'Maddy Estes', 'Nikki Villanueva', 'Adam Burks', 'Milly Walters', 'Phoebe Clarkson', 'Samuel Dunlap', 'Naomi Boyer', 'Silas Gomez', 'Josie Lancaster', 'Fred Kirkpatrick', 'Beck Rutledge', 'Rebecca Woods'];
6
- const members = memberNames.map((name, index) => ({
5
+ export const memberNames = ['Kramer Hatfield', 'Schwartz Mclaughlin', 'Nichole Walter', 'Cleveland Rodriquez', 'Hess Stone', 'Lewis Cervantes', 'Abbott Lamb', 'Conner Duncan', 'Bauer Burch', 'Mcbride Haynes', 'Maddy Estes', 'Nikki Villanueva', 'Adam Burks', 'Milly Walters', 'Phoebe Clarkson', 'Samuel Dunlap', 'Naomi Boyer', 'Silas Gomez', 'Josie Lancaster', 'Fred Kirkpatrick', 'Beck Rutledge', 'Rebecca Woods'];
6
+ export const members = memberNames.map((name, index) => ({
7
7
  id: index.toString(),
8
8
  avatarUrl: getAvatar(),
9
9
  fullName: name
10
10
  }));
11
- const sampleImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAABACAMAAACqVYydAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAGBQTFRF/zX7+DP73i77uyb8kR78ZhX9PQz+GwX+/jT78jL71Sz7ryT8hRv8WhL9Mwr+EwT+/TT76jD7yyr7pCL8eRn9ThD9KQj+DAL/+jT74i/7wCj8lx/8bBb9Qw3+IAb+BgH/HFKiKQAAAIBJREFUeJztzjkOggAAAEEEORTkFOQS/v9L+u1INDQ7L5ggOOkGIURwhxgSSOHsz6BBgwYNGjRo0OBvgxk84Ak5FPCCEiowaNCgQYMGDRo0eG2whgZa6OANPQzwAYMGDRo0aNCgQYPXBkeYYIYFVvjCBjsYNGjQoEGDBg0a/GvwADIe8BAKQVCtAAAAAElFTkSuQmCC';
12
- const names = {
11
+ export const sampleImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAABACAMAAACqVYydAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAGBQTFRF/zX7+DP73i77uyb8kR78ZhX9PQz+GwX+/jT78jL71Sz7ryT8hRv8WhL9Mwr+EwT+/TT76jD7yyr7pCL8eRn9ThD9KQj+DAL/+jT74i/7wCj8lx/8bBb9Qw3+IAb+BgH/HFKiKQAAAIBJREFUeJztzjkOggAAAEEEORTkFOQS/v9L+u1INDQ7L5ggOOkGIURwhxgSSOHsz6BBgwYNGjRo0OBvgxk84Ak5FPCCEiowaNCgQYMGDRo0eG2whgZa6OANPQzwAYMGDRo0aNCgQYPXBkeYYIYFVvjCBjsYNGjQoEGDBg0a/GvwADIe8BAKQVCtAAAAAElFTkSuQmCC';
12
+ export const names = {
13
13
  Short: 'Lemon',
14
14
  Medium: 'The Fat Cats',
15
15
  Long: 'People and Teams Collective Developers',
16
16
  Overlong: "Teamwork Platform's People and Teams Collective Frontend Developer Group"
17
17
  };
18
18
  const longDescription = 'This is information about the team. They are responsible for all the cool stuff that happens at Acme.';
19
- const descriptions = {
19
+ export const descriptions = {
20
20
  None: '',
21
21
  Short: 'A very cool team!',
22
22
  Medium: 'This is a pretty cool team, that does a lot of work here.',
@@ -38,24 +38,4 @@ export default function teamData({
38
38
  description: description ? descriptions[description] : descriptions.Long,
39
39
  isVerified
40
40
  };
41
- }
42
- export function staticTeamData({
43
- headerImage = 'None',
44
- displayName = 'Short',
45
- members: memberCount = 1,
46
- description = 'Long',
47
- isVerified = false
48
- }) {
49
- return {
50
- id: 'team-id',
51
- largeHeaderImageUrl: headerImage === 'Picture' ? sampleImage : undefined,
52
- displayName: names[displayName] || names.Short,
53
- members: memberNames.map((name, index) => ({
54
- id: index.toString(),
55
- avatarUrl: avatarImages[index % avatarImages.length],
56
- fullName: name
57
- })).slice(0, memberCount),
58
- description: description ? descriptions[description] : descriptions.Long,
59
- isVerified
60
- };
61
41
  }
@@ -1,4 +1,5 @@
1
1
  /* Card.tsx generated by @compiled/babel-plugin v2.0.0 */
2
+ /* eslint-disable @atlaskit/volt-strict-mode/no-multiple-exports -- exports share Compiled style value(s) [styles] which cannot be exported across files (UI Styling Standard: no-exported-css) */
2
3
  /* eslint-disable @atlaskit/design-system/no-styled-tagged-template-expression -- needs manual remediation */
3
4
  import "./Card.compiled.css";
4
5
  import { ax, ix } from "@compiled/react/runtime";