@atlaskit/profilecard 23.4.3 → 23.6.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 (37) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/afm-cc/tsconfig.json +6 -0
  3. package/afm-jira/tsconfig.json +6 -0
  4. package/afm-post-office/tsconfig.json +6 -0
  5. package/dist/cjs/client/getOrgIdForCloudIdFromAGG.js +1 -1
  6. package/dist/cjs/client/getTeamFromAGG.js +1 -1
  7. package/dist/cjs/components/team-profile-card/main.compiled.css +1 -1
  8. package/dist/cjs/components/team-profile-card/main.js +40 -4
  9. package/dist/cjs/components/team-profile-card/mocks.js +124 -1
  10. package/dist/cjs/components/team-profile-card/team-connections/main.compiled.css +12 -0
  11. package/dist/cjs/components/team-profile-card/team-connections/main.js +57 -0
  12. package/dist/cjs/util/analytics.js +1 -1
  13. package/dist/es2019/client/getOrgIdForCloudIdFromAGG.js +1 -1
  14. package/dist/es2019/client/getTeamFromAGG.js +1 -1
  15. package/dist/es2019/components/team-profile-card/main.compiled.css +1 -1
  16. package/dist/es2019/components/team-profile-card/main.js +33 -3
  17. package/dist/es2019/components/team-profile-card/mocks.js +120 -0
  18. package/dist/es2019/components/team-profile-card/team-connections/main.compiled.css +12 -0
  19. package/dist/es2019/components/team-profile-card/team-connections/main.js +51 -0
  20. package/dist/es2019/util/analytics.js +1 -1
  21. package/dist/esm/client/getOrgIdForCloudIdFromAGG.js +1 -1
  22. package/dist/esm/client/getTeamFromAGG.js +1 -1
  23. package/dist/esm/components/team-profile-card/main.compiled.css +1 -1
  24. package/dist/esm/components/team-profile-card/main.js +37 -4
  25. package/dist/esm/components/team-profile-card/mocks.js +122 -0
  26. package/dist/esm/components/team-profile-card/team-connections/main.compiled.css +12 -0
  27. package/dist/esm/components/team-profile-card/team-connections/main.js +50 -0
  28. package/dist/esm/util/analytics.js +1 -1
  29. package/dist/types/components/User/ProfileCardResourced.d.ts +1 -1
  30. package/dist/types/components/team-profile-card/main.d.ts +4 -1
  31. package/dist/types/components/team-profile-card/mocks.d.ts +1 -0
  32. package/dist/types/components/team-profile-card/team-connections/main.d.ts +3 -0
  33. package/dist/types-ts4.5/components/User/ProfileCardResourced.d.ts +1 -1
  34. package/dist/types-ts4.5/components/team-profile-card/main.d.ts +4 -1
  35. package/dist/types-ts4.5/components/team-profile-card/mocks.d.ts +1 -0
  36. package/dist/types-ts4.5/components/team-profile-card/team-connections/main.d.ts +3 -0
  37. package/package.json +3 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @atlaskit/profilecard
2
2
 
3
+ ## 23.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#130947](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/130947)
8
+ [`c5e3a2024c40b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c5e3a2024c40b) -
9
+ [ux] Show team connections on profile card
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
15
+ ## 23.5.0
16
+
17
+ ### Minor Changes
18
+
19
+ - [#130671](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/130671)
20
+ [`91fff906b97b4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/91fff906b97b4) -
21
+ Create a customer container card for consuming the TeamContainers component
22
+
3
23
  ## 23.4.3
4
24
 
5
25
  ### Patch Changes
@@ -53,6 +53,9 @@
53
53
  {
54
54
  "path": "../../../design-system/icon/afm-cc/tsconfig.json"
55
55
  },
56
+ {
57
+ "path": "../../../design-system/logo/afm-cc/tsconfig.json"
58
+ },
56
59
  {
57
60
  "path": "../../../design-system/lozenge/afm-cc/tsconfig.json"
58
61
  },
@@ -86,6 +89,9 @@
86
89
  {
87
90
  "path": "../../teams-avatar/afm-cc/tsconfig.json"
88
91
  },
92
+ {
93
+ "path": "../../teams-public/afm-cc/tsconfig.json"
94
+ },
89
95
  {
90
96
  "path": "../../../design-system/theme/afm-cc/tsconfig.json"
91
97
  },
@@ -53,6 +53,9 @@
53
53
  {
54
54
  "path": "../../../design-system/icon/afm-jira/tsconfig.json"
55
55
  },
56
+ {
57
+ "path": "../../../design-system/logo/afm-jira/tsconfig.json"
58
+ },
56
59
  {
57
60
  "path": "../../../design-system/lozenge/afm-jira/tsconfig.json"
58
61
  },
@@ -86,6 +89,9 @@
86
89
  {
87
90
  "path": "../../teams-avatar/afm-jira/tsconfig.json"
88
91
  },
92
+ {
93
+ "path": "../../teams-public/afm-jira/tsconfig.json"
94
+ },
89
95
  {
90
96
  "path": "../../../design-system/theme/afm-jira/tsconfig.json"
91
97
  },
@@ -53,6 +53,9 @@
53
53
  {
54
54
  "path": "../../../design-system/icon/afm-post-office/tsconfig.json"
55
55
  },
56
+ {
57
+ "path": "../../../design-system/logo/afm-post-office/tsconfig.json"
58
+ },
56
59
  {
57
60
  "path": "../../../design-system/lozenge/afm-post-office/tsconfig.json"
58
61
  },
@@ -86,6 +89,9 @@
86
89
  {
87
90
  "path": "../../teams-avatar/afm-post-office/tsconfig.json"
88
91
  },
92
+ {
93
+ "path": "../../teams-public/afm-post-office/tsconfig.json"
94
+ },
89
95
  {
90
96
  "path": "../../../design-system/theme/afm-post-office/tsconfig.json"
91
97
  },
@@ -11,7 +11,7 @@ var _graphqlUtils = require("./graphqlUtils");
11
11
  var ORG_ID_FROM_CLOUD_ID_QUERY = "query OrgIdFromCloudId($cloudId: ID!) {\n\ttenantContexts(cloudIds: [$cloudId]) {\n\t\torgId\n\t}\n}";
12
12
  var addHeaders = function addHeaders(headers) {
13
13
  headers.append('atl-client-name', "@atlaskit/profilecard");
14
- headers.append('atl-client-version', "23.4.3");
14
+ headers.append('atl-client-version', "23.6.0");
15
15
  return headers;
16
16
  };
17
17
  function getOrgIdForCloudIdFromAGG(_x, _x2) {
@@ -66,7 +66,7 @@ var addHeaders = exports.addHeaders = function addHeaders(headers) {
66
66
  headers.append('X-ExperimentalApi', 'teams-beta');
67
67
  headers.append('X-ExperimentalApi', 'team-members-beta');
68
68
  headers.append('atl-client-name', "@atlaskit/profilecard");
69
- headers.append('atl-client-version', "23.4.3");
69
+ headers.append('atl-client-version', "23.6.0");
70
70
  return headers;
71
71
  };
72
72
  function getTeamFromAGG(_x, _x2, _x3) {
@@ -10,8 +10,8 @@
10
10
  ._19bv1ejb{padding-left:var(--ds-space-300,24px)}
11
11
  ._19pkpxbi{margin-top:var(--ds-space-200,1pc)}
12
12
  ._19pku2gc{margin-top:var(--ds-space-100,8px)}
13
+ ._1bsb1gwv{width:360px}
13
14
  ._1bsb1osq{width:100%}
14
- ._1bsb5x59{width:340px}
15
15
  ._1e0c1txw{display:flex}
16
16
  ._1i53muej{border-top-color:var(--ds-border,#091e4224)}
17
17
  ._1reo15vq{overflow-x:hidden}
@@ -2,25 +2,32 @@
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
5
+ var _typeof = require("@babel/runtime/helpers/typeof");
5
6
  Object.defineProperty(exports, "__esModule", {
6
7
  value: true
7
8
  });
8
9
  exports.TeamProfileCard = void 0;
9
10
  require("./main.compiled.css");
10
11
  var _runtime = require("@compiled/react/runtime");
11
- var _react = _interopRequireDefault(require("react"));
12
+ var _react = _interopRequireWildcard(require("react"));
12
13
  var _reactIntlNext = require("react-intl-next");
13
14
  var _avatarGroup = _interopRequireDefault(require("@atlaskit/avatar-group"));
14
15
  var _heading = _interopRequireDefault(require("@atlaskit/heading"));
15
16
  var _verifiedTeamIcon = require("@atlaskit/people-teams-ui-public/verified-team-icon");
16
17
  var _compiled = require("@atlaskit/primitives/compiled");
17
18
  var _teamsAvatar = _interopRequireDefault(require("@atlaskit/teams-avatar"));
19
+ var _teamsPublic = require("@atlaskit/teams-public");
20
+ var _main = require("./team-connections/main");
21
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
22
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
23
+ var noop = function noop() {};
18
24
  var styles = {
19
- wrapperStyles: "_2rkopd34 _v564nm7n _1reo15vq _18m915vq _189ee4h9 _1dqonqa1 _1h6dmuej _1e0c1txw _2lx21bp4 _1bsb5x59 _1ul95x59 _4t3i1wug",
25
+ wrapperStyles: "_2rkopd34 _v564nm7n _1reo15vq _18m915vq _189ee4h9 _1dqonqa1 _1h6dmuej _1e0c1txw _2lx21bp4 _1bsb1gwv _1ul95x59 _4t3i1wug",
20
26
  containerStyles: "_otyrpxbi",
21
27
  avatarImageStyles: "_kqswstnw _18u01ejb",
22
28
  headerImageStyles: "_5ral1dfr _s7n4jp4b _4t3i53f4 _1bsb1osq",
23
29
  teamInformationStyles: "_18u01ejb _19pku2gc _2hwx1ejb",
30
+ teamConnectionStyles: "_18u01ejb _19pkpxbi _2hwx1ejb",
24
31
  viewProfileContainerStyles: "_4cvr1h6o _uwhke4h9 _15a5nqa1 _1i53muej _19bv1ejb _u5f31ejb",
25
32
  viewProfileButtonStyles: "_2rkoiti9 _189ee4h9 _1dqonqa1 _1h6dmuej _bfhksm61 _1bsb1osq _4t3i1ul9 _19pkpxbi"
26
33
  };
@@ -43,15 +50,26 @@ var HeaderImage = function HeaderImage(_ref2) {
43
50
  });
44
51
  };
45
52
  var TeamProfileCard = exports.TeamProfileCard = function TeamProfileCard(_ref3) {
46
- var teamId = _ref3.teamId,
53
+ var containerId = _ref3.containerId,
54
+ teamId = _ref3.teamId,
47
55
  displayName = _ref3.displayName,
48
56
  description = _ref3.description,
49
57
  avatarImageUrl = _ref3.avatarImageUrl,
50
58
  headerImageUrl = _ref3.headerImageUrl,
51
59
  memberAvatars = _ref3.memberAvatars,
52
60
  memberCount = _ref3.memberCount,
61
+ cloudId = _ref3.cloudId,
62
+ userId = _ref3.userId,
53
63
  isVerified = _ref3.isVerified,
54
64
  teamProfileUrl = _ref3.teamProfileUrl;
65
+ var _useTeamContainers = (0, _teamsPublic.useTeamContainers)(teamId),
66
+ teamContainers = _useTeamContainers.teamContainers;
67
+ // Ensure that the current container is not the only connection for this team before showing the "Where we work" section
68
+ var hasOtherTeamConnections = (0, _react.useMemo)(function () {
69
+ return teamContainers.filter(function (tc) {
70
+ return tc.id === containerId;
71
+ }).length < teamContainers.length;
72
+ }, [containerId, teamContainers]);
55
73
  return /*#__PURE__*/_react.default.createElement(TeamCardWrapper, {
56
74
  id: teamId
57
75
  }, /*#__PURE__*/_react.default.createElement(HeaderImage, {
@@ -90,7 +108,25 @@ var TeamProfileCard = exports.TeamProfileCard = function TeamProfileCard(_ref3)
90
108
  })), description && /*#__PURE__*/_react.default.createElement(_compiled.Text, {
91
109
  color: "color.text",
92
110
  maxLines: 3
93
- }, description)), teamProfileUrl && /*#__PURE__*/_react.default.createElement(_compiled.Stack, {
111
+ }, description)), hasOtherTeamConnections && /*#__PURE__*/_react.default.createElement(_compiled.Stack, {
112
+ xcss: styles.teamConnectionStyles,
113
+ space: "space.200"
114
+ }, /*#__PURE__*/_react.default.createElement(_heading.default, {
115
+ size: "xxsmall"
116
+ }, /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, {
117
+ defaultMessage: "Where we work",
118
+ id: "people-and-teams.team-profile-card.team-connections"
119
+ })), /*#__PURE__*/_react.default.createElement(_teamsPublic.TeamContainers, {
120
+ teamId: teamId,
121
+ onAddAContainerClick: noop,
122
+ userId: userId,
123
+ cloudId: cloudId,
124
+ components: {
125
+ ContainerCard: _main.TeamConnections
126
+ },
127
+ filterContainerId: containerId,
128
+ isDisplayedOnProfileCard: true
129
+ })), teamProfileUrl && /*#__PURE__*/_react.default.createElement(_compiled.Stack, {
94
130
  xcss: styles.viewProfileContainerStyles
95
131
  }, /*#__PURE__*/_react.default.createElement(_compiled.Pressable, {
96
132
  onClick: function onClick() {
@@ -1,9 +1,11 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
- exports.mockProfileData = void 0;
7
+ exports.mockTeamContainersQueries = exports.mockProfileData = void 0;
8
+ var _client = _interopRequireDefault(require("fetch-mock/cjs/client"));
7
9
  var mockProfileData = exports.mockProfileData = {
8
10
  teamId: '8ee37950-7de7-41ec-aee2-2c02c95949f4',
9
11
  displayName: 'THE SUPER TEAM',
@@ -22,4 +24,125 @@ var mockProfileData = exports.mockProfileData = {
22
24
  memberCount: 2,
23
25
  isVerified: true,
24
26
  teamProfileUrl: 'https://test-prod-issue-create.atlassian.net/wiki/people/team/8ee37950-7de7-41ec-aee2-2c02c95949f4'
27
+ };
28
+ var mockTeamContainersQueries = exports.mockTeamContainersQueries = function mockTeamContainersQueries() {
29
+ _client.default.post({
30
+ matcher: function matcher(url) {
31
+ return url.includes('/gateway/api/graphql?q=TeamContainersQuery');
32
+ },
33
+ response: function response() {
34
+ return {
35
+ data: {
36
+ graphStore: {
37
+ cypherQuery: {
38
+ edges: [{
39
+ node: {
40
+ from: {
41
+ id: '1'
42
+ },
43
+ to: {
44
+ id: '2',
45
+ data: {
46
+ __typename: 'ConfluenceSpace',
47
+ id: '2',
48
+ confluenceSpaceName: 'Confluence Space',
49
+ type: 'confluence',
50
+ createdDate: '2021-01-01',
51
+ links: {
52
+ webUi: 'https://example.com/confluence'
53
+ },
54
+ icon: {
55
+ path: 'https://avatar-management--avatars.us-west-2.staging.public.atl-paas.net/712020:2981defd-17f1-440e-a377-8c7657b72a6f/4b5b0d55-614b-4e75-858f-9da3d0c7e3f8/128'
56
+ }
57
+ }
58
+ }
59
+ }
60
+ }, {
61
+ node: {
62
+ from: {
63
+ id: '1'
64
+ },
65
+ to: {
66
+ id: '3',
67
+ data: {
68
+ __typename: 'ConfluenceSpace',
69
+ id: '3',
70
+ confluenceSpaceName: 'Confluence Space 2',
71
+ type: 'confluence',
72
+ createdDate: '2021-01-01',
73
+ links: {
74
+ webUi: 'https://example.com/confluence'
75
+ },
76
+ icon: {
77
+ path: 'https://avatar-management--avatars.us-west-2.staging.public.atl-paas.net/712020:2981defd-17f1-440e-a377-8c7657b72a6f/4b5b0d55-614b-4e75-858f-9da3d0c7e3f8/128'
78
+ }
79
+ }
80
+ }
81
+ }
82
+ }, {
83
+ node: {
84
+ from: {
85
+ id: '1'
86
+ },
87
+ to: {
88
+ id: '4',
89
+ data: {
90
+ __typename: 'JiraProject',
91
+ id: '4',
92
+ jiraProjectName: 'Jira Project',
93
+ webUrl: 'https://example.com/jira',
94
+ created: '2021-01-01',
95
+ avatar: {
96
+ medium: 'https://avatar-management--avatars.us-west-2.staging.public.atl-paas.net/712020:2981defd-17f1-440e-a377-8c7657b72a6f/4b5b0d55-614b-4e75-858f-9da3d0c7e3f8/128'
97
+ }
98
+ }
99
+ }
100
+ }
101
+ }, {
102
+ node: {
103
+ from: {
104
+ id: '1'
105
+ },
106
+ to: {
107
+ id: '5',
108
+ data: {
109
+ __typename: 'JiraProject',
110
+ id: '5',
111
+ jiraProjectName: 'Jira Project 2',
112
+ webUrl: 'https://example.com/jira',
113
+ created: '2021-01-01',
114
+ avatar: {
115
+ medium: 'https://avatar-management--avatars.us-west-2.staging.public.atl-paas.net/712020:2981defd-17f1-440e-a377-8c7657b72a6f/4b5b0d55-614b-4e75-858f-9da3d0c7e3f8/128'
116
+ }
117
+ }
118
+ }
119
+ }
120
+ }, {
121
+ node: {
122
+ from: {
123
+ id: '1'
124
+ },
125
+ to: {
126
+ id: '6',
127
+ data: {
128
+ __typeName: 'JiraProject',
129
+ id: '6',
130
+ jiraProjectName: 'Jira Project 3',
131
+ webUrl: 'https://example.com/jira',
132
+ created: '2021-01-01',
133
+ avatar: {
134
+ medium: 'https://avatar-management--avatars.us-west-2.staging.public.atl-paas.net/712020:2981defd-17f1-440e-a377-8c7657b72a6f/4b5b0d55-614b-4e75-858f-9da3d0c7e3f8/128'
135
+ }
136
+ }
137
+ }
138
+ }
139
+ }]
140
+ }
141
+ }
142
+ }
143
+ };
144
+ },
145
+ name: 'getTeamContainers',
146
+ overwriteRoutes: true
147
+ });
25
148
  };
@@ -0,0 +1,12 @@
1
+
2
+ ._2rkoiti9{border-radius:var(--ds-border-radius-100,4px)}._189ee4h9{border-width:var(--ds-border-width,1px)}
3
+ ._1dqonqa1{border-style:solid}
4
+ ._1h6dmuej{border-color:var(--ds-border,#091e4224)}
5
+ ._18u01wug{margin-left:auto}
6
+ ._1bah1h6o{justify-content:center}
7
+ ._1bsb1ul9{width:30px}
8
+ ._1bsbgktf{width:20px}
9
+ ._1e0c1txw{display:flex}
10
+ ._4cvr1h6o{align-items:center}
11
+ ._4t3i1ul9{height:30px}
12
+ ._4t3igktf{height:20px}
@@ -0,0 +1,57 @@
1
+ /* main.tsx generated by @compiled/babel-plugin v0.36.1 */
2
+ "use strict";
3
+
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.TeamConnections = void 0;
9
+ require("./main.compiled.css");
10
+ var _runtime = require("@compiled/react/runtime");
11
+ var _react = _interopRequireDefault(require("react"));
12
+ var _reactIntlNext = require("react-intl-next");
13
+ var _logo = require("@atlaskit/logo");
14
+ var _compiled = require("@atlaskit/primitives/compiled");
15
+ var styles = {
16
+ containerWrapperStyles: "_1e0c1txw _4cvr1h6o",
17
+ containerIconStyles: "_2rkoiti9 _4t3i1ul9 _1bsb1ul9",
18
+ containerTypeIconButtonStyles: "_2rkoiti9 _189ee4h9 _1dqonqa1 _1h6dmuej _1e0c1txw _4cvr1h6o _1bah1h6o _18u01wug _4t3igktf _1bsbgktf"
19
+ };
20
+ var TeamConnections = exports.TeamConnections = function TeamConnections(_ref) {
21
+ var containerType = _ref.containerType,
22
+ title = _ref.title,
23
+ containerIcon = _ref.containerIcon;
24
+ return /*#__PURE__*/_react.default.createElement(_compiled.Inline, {
25
+ space: "space.100",
26
+ xcss: styles.containerWrapperStyles
27
+ }, /*#__PURE__*/_react.default.createElement(_compiled.Box, {
28
+ as: "img",
29
+ src: containerIcon,
30
+ alt: "",
31
+ testId: "linked-container-icon",
32
+ xcss: styles.containerIconStyles
33
+ }), /*#__PURE__*/_react.default.createElement(_compiled.Stack, null, /*#__PURE__*/_react.default.createElement(_compiled.Text, {
34
+ maxLines: 1,
35
+ weight: "medium",
36
+ color: "color.text"
37
+ }, title), /*#__PURE__*/_react.default.createElement(_compiled.Text, {
38
+ maxLines: 1,
39
+ color: "color.text.subtlest"
40
+ }, containerType === 'ConfluenceSpace' ? /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, {
41
+ defaultMessage: "Confluence space",
42
+ id: "people-and-teams.team-connections.container-type"
43
+ }) : /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, {
44
+ defaultMessage: "Jira project",
45
+ id: "people-and-teams.team-connections.container-type"
46
+ }))), /*#__PURE__*/_react.default.createElement(_compiled.Box, {
47
+ backgroundColor: 'color.background.neutral.subtle',
48
+ xcss: styles.containerTypeIconButtonStyles,
49
+ testId: "container-type-icon"
50
+ }, containerType === 'ConfluenceSpace' ? /*#__PURE__*/_react.default.createElement(_logo.ConfluenceIcon, {
51
+ appearance: "brand",
52
+ size: "xsmall"
53
+ }) : /*#__PURE__*/_react.default.createElement(_logo.JiraIcon, {
54
+ appearance: "brand",
55
+ size: "xsmall"
56
+ })));
57
+ };
@@ -45,7 +45,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
45
45
  actionSubjectId: actionSubjectId,
46
46
  attributes: _objectSpread(_objectSpread({
47
47
  packageName: "@atlaskit/profilecard",
48
- packageVersion: "23.4.3"
48
+ packageVersion: "23.6.0"
49
49
  }, attributes), {}, {
50
50
  firedAt: Math.round((0, _performance.getPageTime)())
51
51
  })
@@ -6,7 +6,7 @@ const ORG_ID_FROM_CLOUD_ID_QUERY = `query OrgIdFromCloudId($cloudId: ID!) {
6
6
  }`;
7
7
  const addHeaders = headers => {
8
8
  headers.append('atl-client-name', "@atlaskit/profilecard");
9
- headers.append('atl-client-version', "23.4.3");
9
+ headers.append('atl-client-version', "23.6.0");
10
10
  return headers;
11
11
  };
12
12
  export async function getOrgIdForCloudIdFromAGG(url, cloudId) {
@@ -75,7 +75,7 @@ export const addHeaders = headers => {
75
75
  headers.append('X-ExperimentalApi', 'teams-beta');
76
76
  headers.append('X-ExperimentalApi', 'team-members-beta');
77
77
  headers.append('atl-client-name', "@atlaskit/profilecard");
78
- headers.append('atl-client-version', "23.4.3");
78
+ headers.append('atl-client-version', "23.6.0");
79
79
  return headers;
80
80
  };
81
81
  export async function getTeamFromAGG(url, teamId, siteId) {
@@ -10,8 +10,8 @@
10
10
  ._19bv1ejb{padding-left:var(--ds-space-300,24px)}
11
11
  ._19pkpxbi{margin-top:var(--ds-space-200,1pc)}
12
12
  ._19pku2gc{margin-top:var(--ds-space-100,8px)}
13
+ ._1bsb1gwv{width:360px}
13
14
  ._1bsb1osq{width:100%}
14
- ._1bsb5x59{width:340px}
15
15
  ._1e0c1txw{display:flex}
16
16
  ._1i53muej{border-top-color:var(--ds-border,#091e4224)}
17
17
  ._1reo15vq{overflow-x:hidden}
@@ -1,19 +1,23 @@
1
1
  /* main.tsx generated by @compiled/babel-plugin v0.36.1 */
2
2
  import "./main.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
- import React from 'react';
4
+ import React, { useMemo } from 'react';
5
5
  import { FormattedMessage } from 'react-intl-next';
6
6
  import AvatarGroup from '@atlaskit/avatar-group';
7
7
  import Heading from '@atlaskit/heading';
8
8
  import { VerifiedTeamIcon } from '@atlaskit/people-teams-ui-public/verified-team-icon';
9
9
  import { Box, Inline, Pressable, Stack, Text } from '@atlaskit/primitives/compiled';
10
10
  import TeamAvatar from '@atlaskit/teams-avatar';
11
+ import { TeamContainers, useTeamContainers } from '@atlaskit/teams-public';
12
+ import { TeamConnections } from './team-connections/main';
13
+ const noop = () => {};
11
14
  const styles = {
12
- wrapperStyles: "_2rkopd34 _v564nm7n _1reo15vq _18m915vq _189ee4h9 _1dqonqa1 _1h6dmuej _1e0c1txw _2lx21bp4 _1bsb5x59 _1ul95x59 _4t3i1wug",
15
+ wrapperStyles: "_2rkopd34 _v564nm7n _1reo15vq _18m915vq _189ee4h9 _1dqonqa1 _1h6dmuej _1e0c1txw _2lx21bp4 _1bsb1gwv _1ul95x59 _4t3i1wug",
13
16
  containerStyles: "_otyrpxbi",
14
17
  avatarImageStyles: "_kqswstnw _18u01ejb",
15
18
  headerImageStyles: "_5ral1dfr _s7n4jp4b _4t3i53f4 _1bsb1osq",
16
19
  teamInformationStyles: "_18u01ejb _19pku2gc _2hwx1ejb",
20
+ teamConnectionStyles: "_18u01ejb _19pkpxbi _2hwx1ejb",
17
21
  viewProfileContainerStyles: "_4cvr1h6o _uwhke4h9 _15a5nqa1 _1i53muej _19bv1ejb _u5f31ejb",
18
22
  viewProfileButtonStyles: "_2rkoiti9 _189ee4h9 _1dqonqa1 _1h6dmuej _bfhksm61 _1bsb1osq _4t3i1ul9 _19pkpxbi"
19
23
  };
@@ -34,6 +38,7 @@ const HeaderImage = ({
34
38
  alt: "team-header-image"
35
39
  });
36
40
  export const TeamProfileCard = ({
41
+ containerId,
37
42
  teamId,
38
43
  displayName,
39
44
  description,
@@ -41,9 +46,16 @@ export const TeamProfileCard = ({
41
46
  headerImageUrl,
42
47
  memberAvatars,
43
48
  memberCount,
49
+ cloudId,
50
+ userId,
44
51
  isVerified,
45
52
  teamProfileUrl
46
53
  }) => {
54
+ const {
55
+ teamContainers
56
+ } = useTeamContainers(teamId);
57
+ // Ensure that the current container is not the only connection for this team before showing the "Where we work" section
58
+ const hasOtherTeamConnections = useMemo(() => teamContainers.filter(tc => tc.id === containerId).length < teamContainers.length, [containerId, teamContainers]);
47
59
  return /*#__PURE__*/React.createElement(TeamCardWrapper, {
48
60
  id: teamId
49
61
  }, /*#__PURE__*/React.createElement(HeaderImage, {
@@ -82,7 +94,25 @@ export const TeamProfileCard = ({
82
94
  })), description && /*#__PURE__*/React.createElement(Text, {
83
95
  color: "color.text",
84
96
  maxLines: 3
85
- }, description)), teamProfileUrl && /*#__PURE__*/React.createElement(Stack, {
97
+ }, description)), hasOtherTeamConnections && /*#__PURE__*/React.createElement(Stack, {
98
+ xcss: styles.teamConnectionStyles,
99
+ space: "space.200"
100
+ }, /*#__PURE__*/React.createElement(Heading, {
101
+ size: "xxsmall"
102
+ }, /*#__PURE__*/React.createElement(FormattedMessage, {
103
+ defaultMessage: "Where we work",
104
+ id: "people-and-teams.team-profile-card.team-connections"
105
+ })), /*#__PURE__*/React.createElement(TeamContainers, {
106
+ teamId: teamId,
107
+ onAddAContainerClick: noop,
108
+ userId: userId,
109
+ cloudId: cloudId,
110
+ components: {
111
+ ContainerCard: TeamConnections
112
+ },
113
+ filterContainerId: containerId,
114
+ isDisplayedOnProfileCard: true
115
+ })), teamProfileUrl && /*#__PURE__*/React.createElement(Stack, {
86
116
  xcss: styles.viewProfileContainerStyles
87
117
  }, /*#__PURE__*/React.createElement(Pressable, {
88
118
  onClick: () => window.open(teamProfileUrl, '_blank'),
@@ -1,3 +1,4 @@
1
+ import fetchMock from 'fetch-mock/cjs/client';
1
2
  export const mockProfileData = {
2
3
  teamId: '8ee37950-7de7-41ec-aee2-2c02c95949f4',
3
4
  displayName: 'THE SUPER TEAM',
@@ -16,4 +17,123 @@ export const mockProfileData = {
16
17
  memberCount: 2,
17
18
  isVerified: true,
18
19
  teamProfileUrl: 'https://test-prod-issue-create.atlassian.net/wiki/people/team/8ee37950-7de7-41ec-aee2-2c02c95949f4'
20
+ };
21
+ export const mockTeamContainersQueries = () => {
22
+ fetchMock.post({
23
+ matcher: url => url.includes('/gateway/api/graphql?q=TeamContainersQuery'),
24
+ response: () => {
25
+ return {
26
+ data: {
27
+ graphStore: {
28
+ cypherQuery: {
29
+ edges: [{
30
+ node: {
31
+ from: {
32
+ id: '1'
33
+ },
34
+ to: {
35
+ id: '2',
36
+ data: {
37
+ __typename: 'ConfluenceSpace',
38
+ id: '2',
39
+ confluenceSpaceName: 'Confluence Space',
40
+ type: 'confluence',
41
+ createdDate: '2021-01-01',
42
+ links: {
43
+ webUi: 'https://example.com/confluence'
44
+ },
45
+ icon: {
46
+ path: 'https://avatar-management--avatars.us-west-2.staging.public.atl-paas.net/712020:2981defd-17f1-440e-a377-8c7657b72a6f/4b5b0d55-614b-4e75-858f-9da3d0c7e3f8/128'
47
+ }
48
+ }
49
+ }
50
+ }
51
+ }, {
52
+ node: {
53
+ from: {
54
+ id: '1'
55
+ },
56
+ to: {
57
+ id: '3',
58
+ data: {
59
+ __typename: 'ConfluenceSpace',
60
+ id: '3',
61
+ confluenceSpaceName: 'Confluence Space 2',
62
+ type: 'confluence',
63
+ createdDate: '2021-01-01',
64
+ links: {
65
+ webUi: 'https://example.com/confluence'
66
+ },
67
+ icon: {
68
+ path: 'https://avatar-management--avatars.us-west-2.staging.public.atl-paas.net/712020:2981defd-17f1-440e-a377-8c7657b72a6f/4b5b0d55-614b-4e75-858f-9da3d0c7e3f8/128'
69
+ }
70
+ }
71
+ }
72
+ }
73
+ }, {
74
+ node: {
75
+ from: {
76
+ id: '1'
77
+ },
78
+ to: {
79
+ id: '4',
80
+ data: {
81
+ __typename: 'JiraProject',
82
+ id: '4',
83
+ jiraProjectName: 'Jira Project',
84
+ webUrl: 'https://example.com/jira',
85
+ created: '2021-01-01',
86
+ avatar: {
87
+ medium: 'https://avatar-management--avatars.us-west-2.staging.public.atl-paas.net/712020:2981defd-17f1-440e-a377-8c7657b72a6f/4b5b0d55-614b-4e75-858f-9da3d0c7e3f8/128'
88
+ }
89
+ }
90
+ }
91
+ }
92
+ }, {
93
+ node: {
94
+ from: {
95
+ id: '1'
96
+ },
97
+ to: {
98
+ id: '5',
99
+ data: {
100
+ __typename: 'JiraProject',
101
+ id: '5',
102
+ jiraProjectName: 'Jira Project 2',
103
+ webUrl: 'https://example.com/jira',
104
+ created: '2021-01-01',
105
+ avatar: {
106
+ medium: 'https://avatar-management--avatars.us-west-2.staging.public.atl-paas.net/712020:2981defd-17f1-440e-a377-8c7657b72a6f/4b5b0d55-614b-4e75-858f-9da3d0c7e3f8/128'
107
+ }
108
+ }
109
+ }
110
+ }
111
+ }, {
112
+ node: {
113
+ from: {
114
+ id: '1'
115
+ },
116
+ to: {
117
+ id: '6',
118
+ data: {
119
+ __typeName: 'JiraProject',
120
+ id: '6',
121
+ jiraProjectName: 'Jira Project 3',
122
+ webUrl: 'https://example.com/jira',
123
+ created: '2021-01-01',
124
+ avatar: {
125
+ medium: 'https://avatar-management--avatars.us-west-2.staging.public.atl-paas.net/712020:2981defd-17f1-440e-a377-8c7657b72a6f/4b5b0d55-614b-4e75-858f-9da3d0c7e3f8/128'
126
+ }
127
+ }
128
+ }
129
+ }
130
+ }]
131
+ }
132
+ }
133
+ }
134
+ };
135
+ },
136
+ name: 'getTeamContainers',
137
+ overwriteRoutes: true
138
+ });
19
139
  };
@@ -0,0 +1,12 @@
1
+
2
+ ._2rkoiti9{border-radius:var(--ds-border-radius-100,4px)}._189ee4h9{border-width:var(--ds-border-width,1px)}
3
+ ._1dqonqa1{border-style:solid}
4
+ ._1h6dmuej{border-color:var(--ds-border,#091e4224)}
5
+ ._18u01wug{margin-left:auto}
6
+ ._1bah1h6o{justify-content:center}
7
+ ._1bsb1ul9{width:30px}
8
+ ._1bsbgktf{width:20px}
9
+ ._1e0c1txw{display:flex}
10
+ ._4cvr1h6o{align-items:center}
11
+ ._4t3i1ul9{height:30px}
12
+ ._4t3igktf{height:20px}
@@ -0,0 +1,51 @@
1
+ /* main.tsx generated by @compiled/babel-plugin v0.36.1 */
2
+ import "./main.compiled.css";
3
+ import { ax, ix } from "@compiled/react/runtime";
4
+ import React from 'react';
5
+ import { FormattedMessage } from 'react-intl-next';
6
+ import { ConfluenceIcon, JiraIcon } from '@atlaskit/logo';
7
+ import { Box, Inline, Stack, Text } from '@atlaskit/primitives/compiled';
8
+ const styles = {
9
+ containerWrapperStyles: "_1e0c1txw _4cvr1h6o",
10
+ containerIconStyles: "_2rkoiti9 _4t3i1ul9 _1bsb1ul9",
11
+ containerTypeIconButtonStyles: "_2rkoiti9 _189ee4h9 _1dqonqa1 _1h6dmuej _1e0c1txw _4cvr1h6o _1bah1h6o _18u01wug _4t3igktf _1bsbgktf"
12
+ };
13
+ export const TeamConnections = ({
14
+ containerType,
15
+ title,
16
+ containerIcon
17
+ }) => {
18
+ return /*#__PURE__*/React.createElement(Inline, {
19
+ space: "space.100",
20
+ xcss: styles.containerWrapperStyles
21
+ }, /*#__PURE__*/React.createElement(Box, {
22
+ as: "img",
23
+ src: containerIcon,
24
+ alt: "",
25
+ testId: "linked-container-icon",
26
+ xcss: styles.containerIconStyles
27
+ }), /*#__PURE__*/React.createElement(Stack, null, /*#__PURE__*/React.createElement(Text, {
28
+ maxLines: 1,
29
+ weight: "medium",
30
+ color: "color.text"
31
+ }, title), /*#__PURE__*/React.createElement(Text, {
32
+ maxLines: 1,
33
+ color: "color.text.subtlest"
34
+ }, containerType === 'ConfluenceSpace' ? /*#__PURE__*/React.createElement(FormattedMessage, {
35
+ defaultMessage: "Confluence space",
36
+ id: "people-and-teams.team-connections.container-type"
37
+ }) : /*#__PURE__*/React.createElement(FormattedMessage, {
38
+ defaultMessage: "Jira project",
39
+ id: "people-and-teams.team-connections.container-type"
40
+ }))), /*#__PURE__*/React.createElement(Box, {
41
+ backgroundColor: 'color.background.neutral.subtle',
42
+ xcss: styles.containerTypeIconButtonStyles,
43
+ testId: "container-type-icon"
44
+ }, containerType === 'ConfluenceSpace' ? /*#__PURE__*/React.createElement(ConfluenceIcon, {
45
+ appearance: "brand",
46
+ size: "xsmall"
47
+ }) : /*#__PURE__*/React.createElement(JiraIcon, {
48
+ appearance: "brand",
49
+ size: "xsmall"
50
+ })));
51
+ };
@@ -32,7 +32,7 @@ const createEvent = (eventType, action, actionSubject, actionSubjectId, attribut
32
32
  actionSubjectId,
33
33
  attributes: {
34
34
  packageName: "@atlaskit/profilecard",
35
- packageVersion: "23.4.3",
35
+ packageVersion: "23.6.0",
36
36
  ...attributes,
37
37
  firedAt: Math.round(getPageTime())
38
38
  }
@@ -4,7 +4,7 @@ import { AGGQuery } from './graphqlUtils';
4
4
  var ORG_ID_FROM_CLOUD_ID_QUERY = "query OrgIdFromCloudId($cloudId: ID!) {\n\ttenantContexts(cloudIds: [$cloudId]) {\n\t\torgId\n\t}\n}";
5
5
  var addHeaders = function addHeaders(headers) {
6
6
  headers.append('atl-client-name', "@atlaskit/profilecard");
7
- headers.append('atl-client-version', "23.4.3");
7
+ headers.append('atl-client-version', "23.6.0");
8
8
  return headers;
9
9
  };
10
10
  export function getOrgIdForCloudIdFromAGG(_x, _x2) {
@@ -57,7 +57,7 @@ export var addHeaders = function addHeaders(headers) {
57
57
  headers.append('X-ExperimentalApi', 'teams-beta');
58
58
  headers.append('X-ExperimentalApi', 'team-members-beta');
59
59
  headers.append('atl-client-name', "@atlaskit/profilecard");
60
- headers.append('atl-client-version', "23.4.3");
60
+ headers.append('atl-client-version', "23.6.0");
61
61
  return headers;
62
62
  };
63
63
  export function getTeamFromAGG(_x, _x2, _x3) {
@@ -10,8 +10,8 @@
10
10
  ._19bv1ejb{padding-left:var(--ds-space-300,24px)}
11
11
  ._19pkpxbi{margin-top:var(--ds-space-200,1pc)}
12
12
  ._19pku2gc{margin-top:var(--ds-space-100,8px)}
13
+ ._1bsb1gwv{width:360px}
13
14
  ._1bsb1osq{width:100%}
14
- ._1bsb5x59{width:340px}
15
15
  ._1e0c1txw{display:flex}
16
16
  ._1i53muej{border-top-color:var(--ds-border,#091e4224)}
17
17
  ._1reo15vq{overflow-x:hidden}
@@ -1,19 +1,23 @@
1
1
  /* main.tsx generated by @compiled/babel-plugin v0.36.1 */
2
2
  import "./main.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
- import React from 'react';
4
+ import React, { useMemo } from 'react';
5
5
  import { FormattedMessage } from 'react-intl-next';
6
6
  import AvatarGroup from '@atlaskit/avatar-group';
7
7
  import Heading from '@atlaskit/heading';
8
8
  import { VerifiedTeamIcon } from '@atlaskit/people-teams-ui-public/verified-team-icon';
9
9
  import { Box, Inline, Pressable, Stack, Text } from '@atlaskit/primitives/compiled';
10
10
  import TeamAvatar from '@atlaskit/teams-avatar';
11
+ import { TeamContainers, useTeamContainers } from '@atlaskit/teams-public';
12
+ import { TeamConnections } from './team-connections/main';
13
+ var noop = function noop() {};
11
14
  var styles = {
12
- wrapperStyles: "_2rkopd34 _v564nm7n _1reo15vq _18m915vq _189ee4h9 _1dqonqa1 _1h6dmuej _1e0c1txw _2lx21bp4 _1bsb5x59 _1ul95x59 _4t3i1wug",
15
+ wrapperStyles: "_2rkopd34 _v564nm7n _1reo15vq _18m915vq _189ee4h9 _1dqonqa1 _1h6dmuej _1e0c1txw _2lx21bp4 _1bsb1gwv _1ul95x59 _4t3i1wug",
13
16
  containerStyles: "_otyrpxbi",
14
17
  avatarImageStyles: "_kqswstnw _18u01ejb",
15
18
  headerImageStyles: "_5ral1dfr _s7n4jp4b _4t3i53f4 _1bsb1osq",
16
19
  teamInformationStyles: "_18u01ejb _19pku2gc _2hwx1ejb",
20
+ teamConnectionStyles: "_18u01ejb _19pkpxbi _2hwx1ejb",
17
21
  viewProfileContainerStyles: "_4cvr1h6o _uwhke4h9 _15a5nqa1 _1i53muej _19bv1ejb _u5f31ejb",
18
22
  viewProfileButtonStyles: "_2rkoiti9 _189ee4h9 _1dqonqa1 _1h6dmuej _bfhksm61 _1bsb1osq _4t3i1ul9 _19pkpxbi"
19
23
  };
@@ -36,15 +40,26 @@ var HeaderImage = function HeaderImage(_ref2) {
36
40
  });
37
41
  };
38
42
  export var TeamProfileCard = function TeamProfileCard(_ref3) {
39
- var teamId = _ref3.teamId,
43
+ var containerId = _ref3.containerId,
44
+ teamId = _ref3.teamId,
40
45
  displayName = _ref3.displayName,
41
46
  description = _ref3.description,
42
47
  avatarImageUrl = _ref3.avatarImageUrl,
43
48
  headerImageUrl = _ref3.headerImageUrl,
44
49
  memberAvatars = _ref3.memberAvatars,
45
50
  memberCount = _ref3.memberCount,
51
+ cloudId = _ref3.cloudId,
52
+ userId = _ref3.userId,
46
53
  isVerified = _ref3.isVerified,
47
54
  teamProfileUrl = _ref3.teamProfileUrl;
55
+ var _useTeamContainers = useTeamContainers(teamId),
56
+ teamContainers = _useTeamContainers.teamContainers;
57
+ // Ensure that the current container is not the only connection for this team before showing the "Where we work" section
58
+ var hasOtherTeamConnections = useMemo(function () {
59
+ return teamContainers.filter(function (tc) {
60
+ return tc.id === containerId;
61
+ }).length < teamContainers.length;
62
+ }, [containerId, teamContainers]);
48
63
  return /*#__PURE__*/React.createElement(TeamCardWrapper, {
49
64
  id: teamId
50
65
  }, /*#__PURE__*/React.createElement(HeaderImage, {
@@ -83,7 +98,25 @@ export var TeamProfileCard = function TeamProfileCard(_ref3) {
83
98
  })), description && /*#__PURE__*/React.createElement(Text, {
84
99
  color: "color.text",
85
100
  maxLines: 3
86
- }, description)), teamProfileUrl && /*#__PURE__*/React.createElement(Stack, {
101
+ }, description)), hasOtherTeamConnections && /*#__PURE__*/React.createElement(Stack, {
102
+ xcss: styles.teamConnectionStyles,
103
+ space: "space.200"
104
+ }, /*#__PURE__*/React.createElement(Heading, {
105
+ size: "xxsmall"
106
+ }, /*#__PURE__*/React.createElement(FormattedMessage, {
107
+ defaultMessage: "Where we work",
108
+ id: "people-and-teams.team-profile-card.team-connections"
109
+ })), /*#__PURE__*/React.createElement(TeamContainers, {
110
+ teamId: teamId,
111
+ onAddAContainerClick: noop,
112
+ userId: userId,
113
+ cloudId: cloudId,
114
+ components: {
115
+ ContainerCard: TeamConnections
116
+ },
117
+ filterContainerId: containerId,
118
+ isDisplayedOnProfileCard: true
119
+ })), teamProfileUrl && /*#__PURE__*/React.createElement(Stack, {
87
120
  xcss: styles.viewProfileContainerStyles
88
121
  }, /*#__PURE__*/React.createElement(Pressable, {
89
122
  onClick: function onClick() {
@@ -1,3 +1,4 @@
1
+ import fetchMock from 'fetch-mock/cjs/client';
1
2
  export var mockProfileData = {
2
3
  teamId: '8ee37950-7de7-41ec-aee2-2c02c95949f4',
3
4
  displayName: 'THE SUPER TEAM',
@@ -16,4 +17,125 @@ export var mockProfileData = {
16
17
  memberCount: 2,
17
18
  isVerified: true,
18
19
  teamProfileUrl: 'https://test-prod-issue-create.atlassian.net/wiki/people/team/8ee37950-7de7-41ec-aee2-2c02c95949f4'
20
+ };
21
+ export var mockTeamContainersQueries = function mockTeamContainersQueries() {
22
+ fetchMock.post({
23
+ matcher: function matcher(url) {
24
+ return url.includes('/gateway/api/graphql?q=TeamContainersQuery');
25
+ },
26
+ response: function response() {
27
+ return {
28
+ data: {
29
+ graphStore: {
30
+ cypherQuery: {
31
+ edges: [{
32
+ node: {
33
+ from: {
34
+ id: '1'
35
+ },
36
+ to: {
37
+ id: '2',
38
+ data: {
39
+ __typename: 'ConfluenceSpace',
40
+ id: '2',
41
+ confluenceSpaceName: 'Confluence Space',
42
+ type: 'confluence',
43
+ createdDate: '2021-01-01',
44
+ links: {
45
+ webUi: 'https://example.com/confluence'
46
+ },
47
+ icon: {
48
+ path: 'https://avatar-management--avatars.us-west-2.staging.public.atl-paas.net/712020:2981defd-17f1-440e-a377-8c7657b72a6f/4b5b0d55-614b-4e75-858f-9da3d0c7e3f8/128'
49
+ }
50
+ }
51
+ }
52
+ }
53
+ }, {
54
+ node: {
55
+ from: {
56
+ id: '1'
57
+ },
58
+ to: {
59
+ id: '3',
60
+ data: {
61
+ __typename: 'ConfluenceSpace',
62
+ id: '3',
63
+ confluenceSpaceName: 'Confluence Space 2',
64
+ type: 'confluence',
65
+ createdDate: '2021-01-01',
66
+ links: {
67
+ webUi: 'https://example.com/confluence'
68
+ },
69
+ icon: {
70
+ path: 'https://avatar-management--avatars.us-west-2.staging.public.atl-paas.net/712020:2981defd-17f1-440e-a377-8c7657b72a6f/4b5b0d55-614b-4e75-858f-9da3d0c7e3f8/128'
71
+ }
72
+ }
73
+ }
74
+ }
75
+ }, {
76
+ node: {
77
+ from: {
78
+ id: '1'
79
+ },
80
+ to: {
81
+ id: '4',
82
+ data: {
83
+ __typename: 'JiraProject',
84
+ id: '4',
85
+ jiraProjectName: 'Jira Project',
86
+ webUrl: 'https://example.com/jira',
87
+ created: '2021-01-01',
88
+ avatar: {
89
+ medium: 'https://avatar-management--avatars.us-west-2.staging.public.atl-paas.net/712020:2981defd-17f1-440e-a377-8c7657b72a6f/4b5b0d55-614b-4e75-858f-9da3d0c7e3f8/128'
90
+ }
91
+ }
92
+ }
93
+ }
94
+ }, {
95
+ node: {
96
+ from: {
97
+ id: '1'
98
+ },
99
+ to: {
100
+ id: '5',
101
+ data: {
102
+ __typename: 'JiraProject',
103
+ id: '5',
104
+ jiraProjectName: 'Jira Project 2',
105
+ webUrl: 'https://example.com/jira',
106
+ created: '2021-01-01',
107
+ avatar: {
108
+ medium: 'https://avatar-management--avatars.us-west-2.staging.public.atl-paas.net/712020:2981defd-17f1-440e-a377-8c7657b72a6f/4b5b0d55-614b-4e75-858f-9da3d0c7e3f8/128'
109
+ }
110
+ }
111
+ }
112
+ }
113
+ }, {
114
+ node: {
115
+ from: {
116
+ id: '1'
117
+ },
118
+ to: {
119
+ id: '6',
120
+ data: {
121
+ __typeName: 'JiraProject',
122
+ id: '6',
123
+ jiraProjectName: 'Jira Project 3',
124
+ webUrl: 'https://example.com/jira',
125
+ created: '2021-01-01',
126
+ avatar: {
127
+ medium: 'https://avatar-management--avatars.us-west-2.staging.public.atl-paas.net/712020:2981defd-17f1-440e-a377-8c7657b72a6f/4b5b0d55-614b-4e75-858f-9da3d0c7e3f8/128'
128
+ }
129
+ }
130
+ }
131
+ }
132
+ }]
133
+ }
134
+ }
135
+ }
136
+ };
137
+ },
138
+ name: 'getTeamContainers',
139
+ overwriteRoutes: true
140
+ });
19
141
  };
@@ -0,0 +1,12 @@
1
+
2
+ ._2rkoiti9{border-radius:var(--ds-border-radius-100,4px)}._189ee4h9{border-width:var(--ds-border-width,1px)}
3
+ ._1dqonqa1{border-style:solid}
4
+ ._1h6dmuej{border-color:var(--ds-border,#091e4224)}
5
+ ._18u01wug{margin-left:auto}
6
+ ._1bah1h6o{justify-content:center}
7
+ ._1bsb1ul9{width:30px}
8
+ ._1bsbgktf{width:20px}
9
+ ._1e0c1txw{display:flex}
10
+ ._4cvr1h6o{align-items:center}
11
+ ._4t3i1ul9{height:30px}
12
+ ._4t3igktf{height:20px}
@@ -0,0 +1,50 @@
1
+ /* main.tsx generated by @compiled/babel-plugin v0.36.1 */
2
+ import "./main.compiled.css";
3
+ import { ax, ix } from "@compiled/react/runtime";
4
+ import React from 'react';
5
+ import { FormattedMessage } from 'react-intl-next';
6
+ import { ConfluenceIcon, JiraIcon } from '@atlaskit/logo';
7
+ import { Box, Inline, Stack, Text } from '@atlaskit/primitives/compiled';
8
+ var styles = {
9
+ containerWrapperStyles: "_1e0c1txw _4cvr1h6o",
10
+ containerIconStyles: "_2rkoiti9 _4t3i1ul9 _1bsb1ul9",
11
+ containerTypeIconButtonStyles: "_2rkoiti9 _189ee4h9 _1dqonqa1 _1h6dmuej _1e0c1txw _4cvr1h6o _1bah1h6o _18u01wug _4t3igktf _1bsbgktf"
12
+ };
13
+ export var TeamConnections = function TeamConnections(_ref) {
14
+ var containerType = _ref.containerType,
15
+ title = _ref.title,
16
+ containerIcon = _ref.containerIcon;
17
+ return /*#__PURE__*/React.createElement(Inline, {
18
+ space: "space.100",
19
+ xcss: styles.containerWrapperStyles
20
+ }, /*#__PURE__*/React.createElement(Box, {
21
+ as: "img",
22
+ src: containerIcon,
23
+ alt: "",
24
+ testId: "linked-container-icon",
25
+ xcss: styles.containerIconStyles
26
+ }), /*#__PURE__*/React.createElement(Stack, null, /*#__PURE__*/React.createElement(Text, {
27
+ maxLines: 1,
28
+ weight: "medium",
29
+ color: "color.text"
30
+ }, title), /*#__PURE__*/React.createElement(Text, {
31
+ maxLines: 1,
32
+ color: "color.text.subtlest"
33
+ }, containerType === 'ConfluenceSpace' ? /*#__PURE__*/React.createElement(FormattedMessage, {
34
+ defaultMessage: "Confluence space",
35
+ id: "people-and-teams.team-connections.container-type"
36
+ }) : /*#__PURE__*/React.createElement(FormattedMessage, {
37
+ defaultMessage: "Jira project",
38
+ id: "people-and-teams.team-connections.container-type"
39
+ }))), /*#__PURE__*/React.createElement(Box, {
40
+ backgroundColor: 'color.background.neutral.subtle',
41
+ xcss: styles.containerTypeIconButtonStyles,
42
+ testId: "container-type-icon"
43
+ }, containerType === 'ConfluenceSpace' ? /*#__PURE__*/React.createElement(ConfluenceIcon, {
44
+ appearance: "brand",
45
+ size: "xsmall"
46
+ }) : /*#__PURE__*/React.createElement(JiraIcon, {
47
+ appearance: "brand",
48
+ size: "xsmall"
49
+ })));
50
+ };
@@ -39,7 +39,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
39
39
  actionSubjectId: actionSubjectId,
40
40
  attributes: _objectSpread(_objectSpread({
41
41
  packageName: "@atlaskit/profilecard",
42
- packageVersion: "23.4.3"
42
+ packageVersion: "23.6.0"
43
43
  }, attributes), {}, {
44
44
  firedAt: Math.round(getPageTime())
45
45
  })
@@ -26,8 +26,8 @@ declare const _default: React.ForwardRefExoticComponent<Pick<Omit<ProfileCardRes
26
26
  trigger?: import("../../types").TriggerType | undefined;
27
27
  children?: React.ReactNode;
28
28
  addFlag?: ((flag: any) => void) | undefined;
29
+ userId?: string | undefined;
29
30
  reportingLinesProfileUrl?: string | undefined;
30
31
  onReportingLinesClick?: ((user: import("../../types").ReportingLinesUser) => void) | undefined;
31
- userId?: string | undefined;
32
32
  } & {} & React.RefAttributes<any>>;
33
33
  export default _default;
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { type AvatarProps } from '@atlaskit/avatar-group';
3
3
  interface TeamProfileCardProps {
4
+ containerId: string;
4
5
  teamId: string;
5
6
  displayName: string;
6
7
  description: string;
@@ -8,8 +9,10 @@ interface TeamProfileCardProps {
8
9
  headerImageUrl: string;
9
10
  memberAvatars: AvatarProps[];
10
11
  memberCount: number;
12
+ cloudId: string;
13
+ userId: string;
11
14
  isVerified?: boolean;
12
15
  teamProfileUrl?: string;
13
16
  }
14
- export declare const TeamProfileCard: ({ teamId, displayName, description, avatarImageUrl, headerImageUrl, memberAvatars, memberCount, isVerified, teamProfileUrl, }: TeamProfileCardProps) => JSX.Element;
17
+ export declare const TeamProfileCard: ({ containerId, teamId, displayName, description, avatarImageUrl, headerImageUrl, memberAvatars, memberCount, cloudId, userId, isVerified, teamProfileUrl, }: TeamProfileCardProps) => JSX.Element;
15
18
  export {};
@@ -13,3 +13,4 @@ export declare const mockProfileData: {
13
13
  isVerified: boolean;
14
14
  teamProfileUrl: string;
15
15
  };
16
+ export declare const mockTeamContainersQueries: () => void;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import type { LinkedContainerCardProps } from '@atlaskit/teams-public';
3
+ export declare const TeamConnections: ({ containerType, title, containerIcon, }: LinkedContainerCardProps) => React.JSX.Element;
@@ -26,8 +26,8 @@ declare const _default: React.ForwardRefExoticComponent<Pick<Omit<ProfileCardRes
26
26
  trigger?: import("../../types").TriggerType | undefined;
27
27
  children?: React.ReactNode;
28
28
  addFlag?: ((flag: any) => void) | undefined;
29
+ userId?: string | undefined;
29
30
  reportingLinesProfileUrl?: string | undefined;
30
31
  onReportingLinesClick?: ((user: import("../../types").ReportingLinesUser) => void) | undefined;
31
- userId?: string | undefined;
32
32
  } & {} & React.RefAttributes<any>>;
33
33
  export default _default;
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { type AvatarProps } from '@atlaskit/avatar-group';
3
3
  interface TeamProfileCardProps {
4
+ containerId: string;
4
5
  teamId: string;
5
6
  displayName: string;
6
7
  description: string;
@@ -8,8 +9,10 @@ interface TeamProfileCardProps {
8
9
  headerImageUrl: string;
9
10
  memberAvatars: AvatarProps[];
10
11
  memberCount: number;
12
+ cloudId: string;
13
+ userId: string;
11
14
  isVerified?: boolean;
12
15
  teamProfileUrl?: string;
13
16
  }
14
- export declare const TeamProfileCard: ({ teamId, displayName, description, avatarImageUrl, headerImageUrl, memberAvatars, memberCount, isVerified, teamProfileUrl, }: TeamProfileCardProps) => JSX.Element;
17
+ export declare const TeamProfileCard: ({ containerId, teamId, displayName, description, avatarImageUrl, headerImageUrl, memberAvatars, memberCount, cloudId, userId, isVerified, teamProfileUrl, }: TeamProfileCardProps) => JSX.Element;
15
18
  export {};
@@ -13,3 +13,4 @@ export declare const mockProfileData: {
13
13
  isVerified: boolean;
14
14
  teamProfileUrl: string;
15
15
  };
16
+ export declare const mockTeamContainersQueries: () => void;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import type { LinkedContainerCardProps } from '@atlaskit/teams-public';
3
+ export declare const TeamConnections: ({ containerType, title, containerIcon, }: LinkedContainerCardProps) => React.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/profilecard",
3
- "version": "23.4.3",
3
+ "version": "23.6.0",
4
4
  "description": "A React component to display a card with user information.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -62,6 +62,7 @@
62
62
  "@atlaskit/give-kudos": "^4.0.0",
63
63
  "@atlaskit/heading": "^5.1.0",
64
64
  "@atlaskit/icon": "^25.0.0",
65
+ "@atlaskit/logo": "^16.0.0",
65
66
  "@atlaskit/lozenge": "^12.2.0",
66
67
  "@atlaskit/menu": "^3.1.0",
67
68
  "@atlaskit/modal-dialog": "^13.4.0",
@@ -73,6 +74,7 @@
73
74
  "@atlaskit/rovo-triggers": "^2.4.0",
74
75
  "@atlaskit/spinner": "^18.0.0",
75
76
  "@atlaskit/teams-avatar": "^2.3.0",
77
+ "@atlaskit/teams-public": "^0.17.0",
76
78
  "@atlaskit/theme": "^18.0.0",
77
79
  "@atlaskit/tokens": "^4.5.0",
78
80
  "@atlaskit/tooltip": "^20.0.0",