@atlaskit/teams-public 0.21.0 → 0.23.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 (50) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/common/assets/ConfluenceIcon.svg +4 -22
  3. package/dist/cjs/common/assets/JiraIcon.svg +4 -22
  4. package/dist/cjs/common/assets/JiraProjectDiscovery.svg +4 -0
  5. package/dist/cjs/common/assets/JiraServiceManagement.svg +4 -0
  6. package/dist/cjs/common/types.js +9 -1
  7. package/dist/cjs/common/utils/get-container-properties.js +48 -13
  8. package/dist/cjs/services/agg-client/index.js +5 -1
  9. package/dist/cjs/services/agg-client/utils/queries/team-containers-query.js +1 -1
  10. package/dist/cjs/ui/team-containers/linked-container-card/index.js +2 -1
  11. package/dist/cjs/ui/team-containers/main.js +5 -2
  12. package/dist/es2019/common/assets/ConfluenceIcon.svg +4 -22
  13. package/dist/es2019/common/assets/JiraIcon.svg +4 -22
  14. package/dist/es2019/common/assets/JiraProjectDiscovery.svg +4 -0
  15. package/dist/es2019/common/assets/JiraServiceManagement.svg +4 -0
  16. package/dist/es2019/common/types.js +8 -0
  17. package/dist/es2019/common/utils/get-container-properties.js +45 -13
  18. package/dist/es2019/services/agg-client/index.js +5 -1
  19. package/dist/es2019/services/agg-client/utils/queries/team-containers-query.js +2 -0
  20. package/dist/es2019/ui/team-containers/linked-container-card/index.js +2 -1
  21. package/dist/es2019/ui/team-containers/main.js +5 -2
  22. package/dist/esm/common/assets/ConfluenceIcon.svg +4 -22
  23. package/dist/esm/common/assets/JiraIcon.svg +4 -22
  24. package/dist/esm/common/assets/JiraProjectDiscovery.svg +4 -0
  25. package/dist/esm/common/assets/JiraServiceManagement.svg +4 -0
  26. package/dist/esm/common/types.js +8 -0
  27. package/dist/esm/common/utils/get-container-properties.js +48 -13
  28. package/dist/esm/services/agg-client/index.js +5 -1
  29. package/dist/esm/services/agg-client/utils/queries/team-containers-query.js +1 -1
  30. package/dist/esm/ui/team-containers/linked-container-card/index.js +2 -1
  31. package/dist/esm/ui/team-containers/main.js +5 -2
  32. package/dist/types/common/types.d.ts +12 -0
  33. package/dist/types/common/utils/get-container-properties.d.ts +5 -2
  34. package/dist/types/index.d.ts +2 -1
  35. package/dist/types/services/agg-client/index.d.ts +4 -0
  36. package/dist/types/services/agg-client/utils/queries/team-containers-query.d.ts +2 -0
  37. package/dist/types/ui/team-containers/index.d.ts +1 -0
  38. package/dist/types/ui/team-containers/linked-container-card/index.d.ts +6 -2
  39. package/dist/types/ui/team-containers/team-containers-skeleton/index.d.ts +1 -2
  40. package/dist/types/ui/team-containers/types.d.ts +2 -0
  41. package/dist/types-ts4.5/common/types.d.ts +12 -0
  42. package/dist/types-ts4.5/common/utils/get-container-properties.d.ts +5 -2
  43. package/dist/types-ts4.5/index.d.ts +2 -1
  44. package/dist/types-ts4.5/services/agg-client/index.d.ts +4 -0
  45. package/dist/types-ts4.5/services/agg-client/utils/queries/team-containers-query.d.ts +2 -0
  46. package/dist/types-ts4.5/ui/team-containers/index.d.ts +1 -0
  47. package/dist/types-ts4.5/ui/team-containers/linked-container-card/index.d.ts +6 -2
  48. package/dist/types-ts4.5/ui/team-containers/team-containers-skeleton/index.d.ts +1 -2
  49. package/dist/types-ts4.5/ui/team-containers/types.d.ts +2 -0
  50. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @atlaskit/teams-public
2
2
 
3
+ ## 0.23.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#132911](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/132911)
8
+ [`ade9c4818f77b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ade9c4818f77b) -
9
+ [ux] Render app icon for jira according to its type
10
+
11
+ ## 0.22.0
12
+
13
+ ### Minor Changes
14
+
15
+ - [#131460](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/131460)
16
+ [`c890581942f6e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c890581942f6e) -
17
+ [ux] Add loading skeleton for team containers in profile card
18
+
3
19
  ## 0.21.0
4
20
 
5
21
  ### Minor Changes
@@ -1,22 +1,4 @@
1
- <svg height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path
3
- fill="#1868DB"
4
- d="M0 4a4 4 0 0 1 4-4h12a4 4 0 0 1 4 4v12a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4z"
5
- />
6
- <g clipPath="url(#a)">
7
- <g clipPath="url(#b)">
8
- <path
9
- fill="#fff"
10
- d="M15.19 12.14c-3.498-1.692-4.52-1.945-5.994-1.945-1.729 0-3.202.72-4.519 2.741l-.216.33c-.177.273-.216.37-.216.487s.059.213.275.35l2.22 1.38a.57.57 0 0 0 .315.116c.118 0 .196-.058.314-.233l.354-.544c.55-.836 1.041-1.108 1.67-1.108.55 0 1.198.155 2.004.544l2.319 1.089c.236.116.491.058.609-.214l1.1-2.41c.118-.273.04-.448-.236-.584M4.99 7.881c3.498 1.691 4.52 1.944 5.994 1.944 1.729 0 3.202-.72 4.519-2.741l.216-.33c.177-.273.216-.37.216-.486 0-.117-.059-.214-.275-.35l-2.22-1.38a.57.57 0 0 0-.315-.117c-.118 0-.196.058-.314.233l-.354.544c-.55.836-1.041 1.108-1.67 1.108-.55 0-1.199-.155-2.004-.544L6.465 4.675c-.236-.117-.491-.059-.609.213l-1.1 2.41c-.118.273-.04.448.235.584"
11
- />
12
- </g>
13
- </g>
14
- <defs>
15
- <clipPath id="a">
16
- <path fill="#fff" d="M1.5 1.5h17v17h-17z" />
17
- </clipPath>
18
- <clipPath id="b">
19
- <path fill="#fff" d="M4.245 4.422h11.69V15.6H4.246z" />
20
- </clipPath>
21
- </defs>
22
- </svg>
1
+ <svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M0 3C0 1.34315 1.34315 0 3 0H9C10.6569 0 12 1.34315 12 3V9C12 10.6569 10.6569 12 9 12H3C1.34315 12 0 10.6569 0 9V3Z" fill="#1868DB"/>
3
+ <path d="M8.94391 7.2306C6.92458 6.25419 6.33466 6.10829 5.48382 6.10829C4.4855 6.10829 3.63466 6.52355 2.87458 7.69075L2.74979 7.88155C2.64769 8.03867 2.625 8.09478 2.625 8.16212C2.625 8.22946 2.65903 8.28558 2.78382 8.36414L4.06576 9.16098C4.13382 9.20587 4.19055 9.22832 4.24727 9.22832C4.31534 9.22832 4.36071 9.19465 4.42878 9.09364L4.63298 8.7794C4.95063 8.2968 5.23424 8.13968 5.59727 8.13968C5.91492 8.13968 6.28929 8.22946 6.75441 8.45392L8.09307 9.08242C8.2292 9.14976 8.37668 9.11609 8.44475 8.95897L9.08004 7.5673C9.14811 7.41017 9.10273 7.30917 8.94391 7.2306ZM3.05609 4.77274C5.07542 5.74915 5.66534 5.89505 6.51618 5.89505C7.5145 5.89505 8.36534 5.4798 9.12542 4.31259L9.25021 4.1218C9.35231 3.96468 9.375 3.90856 9.375 3.84122C9.375 3.77388 9.34097 3.71777 9.21618 3.6392L7.93424 2.84236C7.86618 2.79747 7.80945 2.77502 7.75273 2.77502C7.68466 2.77502 7.63929 2.80869 7.57122 2.9097L7.36702 3.22395C7.04937 3.70654 6.76576 3.86367 6.40273 3.86367C6.08508 3.86367 5.71071 3.77388 5.24559 3.54942L3.90693 2.92093C3.7708 2.85359 3.62332 2.88726 3.55525 3.04438L2.91996 4.43605C2.85189 4.59317 2.89727 4.69418 3.05609 4.77274Z" fill="white"/>
4
+ </svg>
@@ -1,22 +1,4 @@
1
- <svg height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path
3
- fill="#1868DB"
4
- d="M0 4a4 4 0 0 1 4-4h12a4 4 0 0 1 4 4v12a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4z"
5
- />
6
- <g clipPath="url(#a)">
7
- <g clipPath="url(#b)">
8
- <path
9
- fill="#fff"
10
- d="M7.517 12.891h-1.11c-1.673 0-2.874-1.025-2.874-2.525H9.5c.309 0 .509.22.509.53V16.9c-1.492 0-2.492-1.208-2.492-2.892zm2.947-2.983h-1.11C7.681 9.908 6.48 8.9 6.48 7.4h5.966c.31 0 .528.202.528.513v6.003c-1.492 0-2.51-1.208-2.51-2.892zm2.965-2.965h-1.11c-1.673 0-2.874-1.025-2.874-2.526h5.966c.31 0 .51.22.51.512v6.004c-1.492 0-2.492-1.208-2.492-2.892z"
11
- />
12
- </g>
13
- </g>
14
- <defs>
15
- <clipPath id="a">
16
- <path fill="#fff" d="M2 2h16v16H2z" />
17
- </clipPath>
18
- <clipPath id="b">
19
- <path fill="#fff" d="M3.533 4.417H15.92V16.9H3.533z" />
20
- </clipPath>
21
- </defs>
22
- </svg>
1
+ <svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M0 3C0 1.34315 1.34315 0 3 0H9C10.6569 0 12 1.34315 12 3V9C12 10.6569 10.6569 12 9 12H3C1.34315 12 0 10.6569 0 9V3Z" fill="#1868DB"/>
3
+ <path d="M4.44805 7.80716H3.75456C2.70865 7.80716 1.95831 7.16652 1.95831 6.22844H5.68724C5.88051 6.22844 6.00556 6.36572 6.00556 6.5602V10.3125C5.07333 10.3125 4.44805 9.55748 4.44805 8.505V7.80716ZM6.28978 5.94244H5.59629C4.55037 5.94244 3.80004 5.31324 3.80004 4.37516H7.52896C7.72223 4.37516 7.85865 4.501 7.85865 4.69548V8.4478C6.92642 8.4478 6.28978 7.69276 6.28978 6.64028V5.94244ZM8.14287 4.08916H7.44938C6.40346 4.08916 5.65313 3.44852 5.65313 2.51044H9.38206C9.57532 2.51044 9.70038 2.64772 9.70038 2.83076V6.58308C8.76815 6.58308 8.14287 5.82804 8.14287 4.77556V4.08916Z" fill="white"/>
4
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M0 3C0 1.34315 1.34315 0 3 0H9C10.6569 0 12 1.34315 12 3V9C12 10.6569 10.6569 12 9 12H3C1.34315 12 0 10.6569 0 9V3Z" fill="#C97CF4"/>
3
+ <path d="M6.7333 2.44089C7.63402 2.70512 8.54358 2.70512 9.4443 2.44089C9.52377 2.42328 9.57676 2.47612 9.5591 2.55539C9.30301 3.48019 9.30301 4.33452 9.5591 5.25932C9.57676 5.32978 9.52377 5.39143 9.4443 5.36501C8.54358 5.1184 7.63402 5.1184 6.7333 5.36501C6.66265 5.39143 6.60084 5.32978 6.62733 5.25932C6.86576 4.33452 6.86576 3.48019 6.62733 2.55539C6.60084 2.47612 6.66265 2.42328 6.7333 2.44089ZM7.09535 5.71731V5.86704C7.09535 6.56284 6.60967 7.07368 6.00919 7.07368C5.4087 7.07368 4.93185 6.58927 4.93185 5.99035C4.93185 5.39143 5.41753 4.91582 6.09749 4.91582H6.2741V2.81081C6.1858 2.80201 6.09749 2.80201 6.00919 2.80201C4.24306 2.80201 2.8125 4.22883 2.8125 5.99916C2.8125 7.76948 4.24306 9.1875 6.00919 9.1875C7.77531 9.1875 9.2147 7.76067 9.2147 5.99916V5.71731H7.09535Z" fill="#101214"/>
4
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M0 3C0 1.34315 1.34315 0 3 0H9C10.6569 0 12 1.34315 12 3V9C12 10.6569 10.6569 12 9 12H3C1.34315 12 0 10.6569 0 9V3Z" fill="#FFC716"/>
3
+ <path d="M6.87223 5.07804H9.1611C9.50485 5.07804 9.62223 5.40502 9.41262 5.66493L5.83259 10.0834C4.67558 9.16112 4.78457 7.70228 5.63137 6.63749L6.87223 5.07804ZM5.10317 6.83871H2.8143C2.47055 6.83871 2.35317 6.51173 2.56278 6.25182L6.14281 1.83337C7.29982 2.75563 7.17406 4.1977 6.33564 5.27087L5.10317 6.83871Z" fill="#101214"/>
4
+ </svg>
@@ -3,6 +3,14 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.USER_ARI_PREFIX = exports.TEAM_ARI_PREFIX = void 0;
6
+ exports.USER_ARI_PREFIX = exports.TEAM_ARI_PREFIX = exports.JiraProjectTypes = void 0;
7
+ var JiraProjectTypes = exports.JiraProjectTypes = /*#__PURE__*/function (JiraProjectTypes) {
8
+ JiraProjectTypes["PRODUCT_DISCOVERY"] = "Product Discovery";
9
+ JiraProjectTypes["SOFTWARE"] = "Software";
10
+ JiraProjectTypes["SERVICE_DESK"] = "Service Desk";
11
+ JiraProjectTypes["BUSINESS"] = "Business";
12
+ JiraProjectTypes["CUSTOMER_SERVICE"] = "Customer Service";
13
+ return JiraProjectTypes;
14
+ }({});
7
15
  var USER_ARI_PREFIX = exports.USER_ARI_PREFIX = 'ari:cloud:identity::user/';
8
16
  var TEAM_ARI_PREFIX = exports.TEAM_ARI_PREFIX = 'ari:cloud:identity::team/';
@@ -8,12 +8,17 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.messages = exports.getContainerProperties = void 0;
9
9
  require("./get-container-properties.compiled.css");
10
10
  var _runtime = require("@compiled/react/runtime");
11
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
12
  var _react = _interopRequireDefault(require("react"));
12
13
  var _reactIntlNext = require("react-intl-next");
13
14
  var _image = _interopRequireDefault(require("@atlaskit/image"));
14
15
  var _compiled = require("@atlaskit/primitives/compiled");
15
16
  var _ConfluenceIcon = _interopRequireDefault(require("../assets/ConfluenceIcon.svg"));
16
17
  var _JiraIcon = _interopRequireDefault(require("../assets/JiraIcon.svg"));
18
+ var _JiraProjectDiscovery = _interopRequireDefault(require("../assets/JiraProjectDiscovery.svg"));
19
+ var _JiraServiceManagement = _interopRequireDefault(require("../assets/JiraServiceManagement.svg"));
20
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
21
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
17
22
  var styles = {
18
23
  iconWrapper: "_1bsb1crf _4t3i1crf",
19
24
  mediumIconWrapper: "_1bsb7vkz _4t3i7vkz"
@@ -60,7 +65,46 @@ var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
60
65
  description: 'Text for space type containers'
61
66
  }
62
67
  });
63
- var getContainerProperties = exports.getContainerProperties = function getContainerProperties(containerType, iconSize) {
68
+ var getJiraIcon = function getJiraIcon(containerSubTypes) {
69
+ switch (containerSubTypes) {
70
+ case 'PRODUCT_DISCOVERY':
71
+ return _JiraProjectDiscovery.default;
72
+ case 'SERVICE_DESK':
73
+ return _JiraServiceManagement.default;
74
+ default:
75
+ return _JiraIcon.default;
76
+ }
77
+ };
78
+ var getJiraContainerProperties = function getJiraContainerProperties(containerTypeProperties) {
79
+ var _ref = containerTypeProperties || {},
80
+ subType = _ref.subType,
81
+ name = _ref.name;
82
+ var baseProperties = {
83
+ description: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, messages.jiraProjectDescription),
84
+ icon: /*#__PURE__*/_react.default.createElement(_compiled.Box, {
85
+ xcss: styles.iconWrapper
86
+ }, /*#__PURE__*/_react.default.createElement(_image.default, {
87
+ src: getJiraIcon(subType),
88
+ alt: "",
89
+ testId: "jira-project-container-icon"
90
+ })),
91
+ title: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, messages.addJiraProjectTitle),
92
+ containerTypeText: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, messages.projectContainerText)
93
+ };
94
+ switch (subType) {
95
+ case 'PRODUCT_DISCOVERY':
96
+ case 'SERVICE_DESK':
97
+ return _objectSpread(_objectSpread({}, baseProperties), {}, {
98
+ containerTypeText: '',
99
+ description: name || baseProperties.description
100
+ });
101
+ default:
102
+ return baseProperties;
103
+ }
104
+ };
105
+ var getContainerProperties = exports.getContainerProperties = function getContainerProperties(containerType) {
106
+ var iconSize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'small';
107
+ var containerTypeProperties = arguments.length > 2 ? arguments[2] : undefined;
64
108
  switch (containerType) {
65
109
  case 'ConfluenceSpace':
66
110
  return {
@@ -69,23 +113,14 @@ var getContainerProperties = exports.getContainerProperties = function getContai
69
113
  xcss: iconSize === 'medium' ? styles.mediumIconWrapper : styles.iconWrapper
70
114
  }, /*#__PURE__*/_react.default.createElement(_image.default, {
71
115
  src: _ConfluenceIcon.default,
72
- alt: "confluence-project"
116
+ alt: "",
117
+ testId: "confluence-space-container-icon"
73
118
  })),
74
119
  title: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, messages.addConfluenceContainerTitle),
75
120
  containerTypeText: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, messages.spaceContainerText)
76
121
  };
77
122
  case 'JiraProject':
78
- return {
79
- description: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, messages.jiraProjectDescription),
80
- icon: /*#__PURE__*/_react.default.createElement(_compiled.Box, {
81
- xcss: iconSize === 'medium' ? styles.mediumIconWrapper : styles.iconWrapper
82
- }, /*#__PURE__*/_react.default.createElement(_image.default, {
83
- src: _JiraIcon.default,
84
- alt: "jira-project"
85
- })),
86
- title: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, messages.addJiraProjectTitle),
87
- containerTypeText: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, messages.projectContainerText)
88
- };
123
+ return getJiraContainerProperties(containerTypeProperties);
89
124
  default:
90
125
  return {
91
126
  description: null,
@@ -61,7 +61,11 @@ var AGGClient = exports.AGGClient = /*#__PURE__*/function (_BaseGraphQlClient) {
61
61
  name: edge.node.to.data.__typename === 'ConfluenceSpace' ? edge.node.to.data.confluenceSpaceName || '' : edge.node.to.data.jiraProjectName,
62
62
  icon: edge.node.to.data.__typename === 'ConfluenceSpace' ? "".concat(edge.node.to.data.links.base).concat(edge.node.to.data.icon.path) : edge.node.to.data.avatar.medium,
63
63
  createdDate: edge.node.to.data.__typename === 'ConfluenceSpace' ? new Date(edge.node.to.data.createdDate) : new Date(edge.node.to.data.created),
64
- link: edge.node.to.data.__typename === 'ConfluenceSpace' ? "".concat(edge.node.to.data.links.base).concat(edge.node.to.data.links.webUi) : edge.node.to.data.webUrl
64
+ link: edge.node.to.data.__typename === 'ConfluenceSpace' ? "".concat(edge.node.to.data.links.base).concat(edge.node.to.data.links.webUi) : edge.node.to.data.webUrl,
65
+ containerTypeProperties: {
66
+ subType: edge.node.to.data.__typename === 'JiraProject' ? edge.node.to.data.projectType || '' : undefined,
67
+ name: edge.node.to.data.__typename === 'JiraProject' ? edge.node.to.data.projectTypeName || '' : undefined
68
+ }
65
69
  };
66
70
  });
67
71
  return _context.abrupt("return", containersResult);
@@ -9,4 +9,4 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
9
9
  var _graphql = require("graphql");
10
10
  var _graphqlTag = _interopRequireDefault(require("graphql-tag"));
11
11
  var _templateObject;
12
- var TeamContainersQuery = exports.TeamContainersQuery = (0, _graphql.print)((0, _graphqlTag.default)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\tquery TeamContainersQuery($cypherQuery: String!) {\n\t\tgraphStore @optIn(to: [\"GraphStore\"]) {\n\t\t\tcypherQuery(query: $cypherQuery) @optIn(to: [\"GraphStoreCypherQuery\"]) {\n\t\t\t\tedges {\n\t\t\t\t\t__typename\n\t\t\t\t\tnode {\n\t\t\t\t\t\tfrom {\n\t\t\t\t\t\t\tid\n\t\t\t\t\t\t}\n\t\t\t\t\t\tto {\n\t\t\t\t\t\t\tid\n\t\t\t\t\t\t\tdata {\n\t\t\t\t\t\t\t\t__typename\n\t\t\t\t\t\t\t\t... on ConfluenceSpace {\n\t\t\t\t\t\t\t\t\tid\n\t\t\t\t\t\t\t\t\tconfluenceSpaceName: name\n\t\t\t\t\t\t\t\t\ttype\n\t\t\t\t\t\t\t\t\tcreatedDate\n\t\t\t\t\t\t\t\t\tlinks {\n\t\t\t\t\t\t\t\t\t\tbase\n\t\t\t\t\t\t\t\t\t\twebUi\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\ticon {\n\t\t\t\t\t\t\t\t\t\tpath\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t... on JiraProject {\n\t\t\t\t\t\t\t\t\tid\n\t\t\t\t\t\t\t\t\tjiraProjectName: name\n\t\t\t\t\t\t\t\t\twebUrl\n\t\t\t\t\t\t\t\t\tcreated\n\t\t\t\t\t\t\t\t\tavatar {\n\t\t\t\t\t\t\t\t\t\tmedium\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n"]))));
12
+ var TeamContainersQuery = exports.TeamContainersQuery = (0, _graphql.print)((0, _graphqlTag.default)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\tquery TeamContainersQuery($cypherQuery: String!) {\n\t\tgraphStore @optIn(to: [\"GraphStore\"]) {\n\t\t\tcypherQuery(query: $cypherQuery) @optIn(to: [\"GraphStoreCypherQuery\"]) {\n\t\t\t\tedges {\n\t\t\t\t\t__typename\n\t\t\t\t\tnode {\n\t\t\t\t\t\tfrom {\n\t\t\t\t\t\t\tid\n\t\t\t\t\t\t}\n\t\t\t\t\t\tto {\n\t\t\t\t\t\t\tid\n\t\t\t\t\t\t\tdata {\n\t\t\t\t\t\t\t\t__typename\n\t\t\t\t\t\t\t\t... on ConfluenceSpace {\n\t\t\t\t\t\t\t\t\tid\n\t\t\t\t\t\t\t\t\tconfluenceSpaceName: name\n\t\t\t\t\t\t\t\t\ttype\n\t\t\t\t\t\t\t\t\tcreatedDate\n\t\t\t\t\t\t\t\t\tlinks {\n\t\t\t\t\t\t\t\t\t\tbase\n\t\t\t\t\t\t\t\t\t\twebUi\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\ticon {\n\t\t\t\t\t\t\t\t\t\tpath\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t... on JiraProject {\n\t\t\t\t\t\t\t\t\tid\n\t\t\t\t\t\t\t\t\tjiraProjectName: name\n\t\t\t\t\t\t\t\t\twebUrl\n\t\t\t\t\t\t\t\t\tcreated\n\t\t\t\t\t\t\t\t\tavatar {\n\t\t\t\t\t\t\t\t\t\tmedium\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tprojectType\n\t\t\t\t\t\t\t\t\tprojectTypeName\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n"]))));
@@ -82,10 +82,11 @@ var LinkedContainerCard = exports.LinkedContainerCard = function LinkedContainer
82
82
  containerIcon = _ref2.containerIcon,
83
83
  link = _ref2.link,
84
84
  containerId = _ref2.containerId,
85
+ containerTypeProperties = _ref2.containerTypeProperties,
85
86
  onDisconnectButtonClick = _ref2.onDisconnectButtonClick;
86
87
  var _useAnalyticsEvents2 = (0, _analyticsNext.useAnalyticsEvents)(),
87
88
  createAnalyticsEvent = _useAnalyticsEvents2.createAnalyticsEvent;
88
- var _getContainerProperti = (0, _getContainerProperties.getContainerProperties)(containerType),
89
+ var _getContainerProperti = (0, _getContainerProperties.getContainerProperties)(containerType, 'small', containerTypeProperties),
89
90
  description = _getContainerProperti.description,
90
91
  icon = _getContainerProperti.icon,
91
92
  containerTypeText = _getContainerProperti.containerTypeText;
@@ -161,12 +161,13 @@ var TeamContainers = exports.TeamContainers = function TeamContainers(_ref) {
161
161
  return _ref2.apply(this, arguments);
162
162
  };
163
163
  }(), [actions, createAnalyticsEvent, fireOperationalEvent, filteredTeamContainers, teamId, unlinkError]);
164
+ var TeamContainersSkeletonComponent = (components === null || components === void 0 ? void 0 : components.TeamContainersSkeleton) || _teamContainersSkeleton.TeamContainersSkeleton;
164
165
  if (loading || productPermissionIsLoading) {
165
- return /*#__PURE__*/_react.default.createElement(_teamContainersSkeleton.TeamContainersSkeleton, {
166
+ return /*#__PURE__*/_react.default.createElement(TeamContainersSkeletonComponent, {
166
167
  numberOfContainers: MAX_NUMBER_OF_CONTAINERS_TO_SHOW
167
168
  });
168
169
  }
169
- if (filteredTeamContainers.length === 0 && (!productPermissions || !(productPermissions && ((0, _controllers.hasProductPermission)(productPermissions, 'jira') || (0, _controllers.hasProductPermission)(productPermissions, 'confluence'))))) {
170
+ if (filteredTeamContainers.length === 0 && !isDisplayedOnProfileCard && (!productPermissions || !(productPermissions && ((0, _controllers.hasProductPermission)(productPermissions, 'jira') || (0, _controllers.hasProductPermission)(productPermissions, 'confluence'))))) {
170
171
  return /*#__PURE__*/_react.default.createElement(_noProductAccessEmptyState.NoProductAccessState, null);
171
172
  }
172
173
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_primitives.Stack, {
@@ -178,6 +179,7 @@ var TeamContainers = exports.TeamContainers = function TeamContainers(_ref) {
178
179
  return /*#__PURE__*/_react.default.createElement(LinkedContainerCardComponent, {
179
180
  key: container.id,
180
181
  containerType: container.type,
182
+ containerTypeProperties: container.containerTypeProperties,
181
183
  title: container.name,
182
184
  containerIcon: container.icon || undefined,
183
185
  link: container.link || undefined,
@@ -204,6 +206,7 @@ var TeamContainers = exports.TeamContainers = function TeamContainers(_ref) {
204
206
  return /*#__PURE__*/_react.default.createElement(LinkedContainerCardComponent, {
205
207
  key: container.id,
206
208
  containerType: container.type,
209
+ containerTypeProperties: container.containerTypeProperties,
207
210
  title: container.name,
208
211
  containerId: container.id,
209
212
  containerIcon: container.icon || undefined,
@@ -1,22 +1,4 @@
1
- <svg height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path
3
- fill="#1868DB"
4
- d="M0 4a4 4 0 0 1 4-4h12a4 4 0 0 1 4 4v12a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4z"
5
- />
6
- <g clipPath="url(#a)">
7
- <g clipPath="url(#b)">
8
- <path
9
- fill="#fff"
10
- d="M15.19 12.14c-3.498-1.692-4.52-1.945-5.994-1.945-1.729 0-3.202.72-4.519 2.741l-.216.33c-.177.273-.216.37-.216.487s.059.213.275.35l2.22 1.38a.57.57 0 0 0 .315.116c.118 0 .196-.058.314-.233l.354-.544c.55-.836 1.041-1.108 1.67-1.108.55 0 1.198.155 2.004.544l2.319 1.089c.236.116.491.058.609-.214l1.1-2.41c.118-.273.04-.448-.236-.584M4.99 7.881c3.498 1.691 4.52 1.944 5.994 1.944 1.729 0 3.202-.72 4.519-2.741l.216-.33c.177-.273.216-.37.216-.486 0-.117-.059-.214-.275-.35l-2.22-1.38a.57.57 0 0 0-.315-.117c-.118 0-.196.058-.314.233l-.354.544c-.55.836-1.041 1.108-1.67 1.108-.55 0-1.199-.155-2.004-.544L6.465 4.675c-.236-.117-.491-.059-.609.213l-1.1 2.41c-.118.273-.04.448.235.584"
11
- />
12
- </g>
13
- </g>
14
- <defs>
15
- <clipPath id="a">
16
- <path fill="#fff" d="M1.5 1.5h17v17h-17z" />
17
- </clipPath>
18
- <clipPath id="b">
19
- <path fill="#fff" d="M4.245 4.422h11.69V15.6H4.246z" />
20
- </clipPath>
21
- </defs>
22
- </svg>
1
+ <svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M0 3C0 1.34315 1.34315 0 3 0H9C10.6569 0 12 1.34315 12 3V9C12 10.6569 10.6569 12 9 12H3C1.34315 12 0 10.6569 0 9V3Z" fill="#1868DB"/>
3
+ <path d="M8.94391 7.2306C6.92458 6.25419 6.33466 6.10829 5.48382 6.10829C4.4855 6.10829 3.63466 6.52355 2.87458 7.69075L2.74979 7.88155C2.64769 8.03867 2.625 8.09478 2.625 8.16212C2.625 8.22946 2.65903 8.28558 2.78382 8.36414L4.06576 9.16098C4.13382 9.20587 4.19055 9.22832 4.24727 9.22832C4.31534 9.22832 4.36071 9.19465 4.42878 9.09364L4.63298 8.7794C4.95063 8.2968 5.23424 8.13968 5.59727 8.13968C5.91492 8.13968 6.28929 8.22946 6.75441 8.45392L8.09307 9.08242C8.2292 9.14976 8.37668 9.11609 8.44475 8.95897L9.08004 7.5673C9.14811 7.41017 9.10273 7.30917 8.94391 7.2306ZM3.05609 4.77274C5.07542 5.74915 5.66534 5.89505 6.51618 5.89505C7.5145 5.89505 8.36534 5.4798 9.12542 4.31259L9.25021 4.1218C9.35231 3.96468 9.375 3.90856 9.375 3.84122C9.375 3.77388 9.34097 3.71777 9.21618 3.6392L7.93424 2.84236C7.86618 2.79747 7.80945 2.77502 7.75273 2.77502C7.68466 2.77502 7.63929 2.80869 7.57122 2.9097L7.36702 3.22395C7.04937 3.70654 6.76576 3.86367 6.40273 3.86367C6.08508 3.86367 5.71071 3.77388 5.24559 3.54942L3.90693 2.92093C3.7708 2.85359 3.62332 2.88726 3.55525 3.04438L2.91996 4.43605C2.85189 4.59317 2.89727 4.69418 3.05609 4.77274Z" fill="white"/>
4
+ </svg>
@@ -1,22 +1,4 @@
1
- <svg height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path
3
- fill="#1868DB"
4
- d="M0 4a4 4 0 0 1 4-4h12a4 4 0 0 1 4 4v12a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4z"
5
- />
6
- <g clipPath="url(#a)">
7
- <g clipPath="url(#b)">
8
- <path
9
- fill="#fff"
10
- d="M7.517 12.891h-1.11c-1.673 0-2.874-1.025-2.874-2.525H9.5c.309 0 .509.22.509.53V16.9c-1.492 0-2.492-1.208-2.492-2.892zm2.947-2.983h-1.11C7.681 9.908 6.48 8.9 6.48 7.4h5.966c.31 0 .528.202.528.513v6.003c-1.492 0-2.51-1.208-2.51-2.892zm2.965-2.965h-1.11c-1.673 0-2.874-1.025-2.874-2.526h5.966c.31 0 .51.22.51.512v6.004c-1.492 0-2.492-1.208-2.492-2.892z"
11
- />
12
- </g>
13
- </g>
14
- <defs>
15
- <clipPath id="a">
16
- <path fill="#fff" d="M2 2h16v16H2z" />
17
- </clipPath>
18
- <clipPath id="b">
19
- <path fill="#fff" d="M3.533 4.417H15.92V16.9H3.533z" />
20
- </clipPath>
21
- </defs>
22
- </svg>
1
+ <svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M0 3C0 1.34315 1.34315 0 3 0H9C10.6569 0 12 1.34315 12 3V9C12 10.6569 10.6569 12 9 12H3C1.34315 12 0 10.6569 0 9V3Z" fill="#1868DB"/>
3
+ <path d="M4.44805 7.80716H3.75456C2.70865 7.80716 1.95831 7.16652 1.95831 6.22844H5.68724C5.88051 6.22844 6.00556 6.36572 6.00556 6.5602V10.3125C5.07333 10.3125 4.44805 9.55748 4.44805 8.505V7.80716ZM6.28978 5.94244H5.59629C4.55037 5.94244 3.80004 5.31324 3.80004 4.37516H7.52896C7.72223 4.37516 7.85865 4.501 7.85865 4.69548V8.4478C6.92642 8.4478 6.28978 7.69276 6.28978 6.64028V5.94244ZM8.14287 4.08916H7.44938C6.40346 4.08916 5.65313 3.44852 5.65313 2.51044H9.38206C9.57532 2.51044 9.70038 2.64772 9.70038 2.83076V6.58308C8.76815 6.58308 8.14287 5.82804 8.14287 4.77556V4.08916Z" fill="white"/>
4
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M0 3C0 1.34315 1.34315 0 3 0H9C10.6569 0 12 1.34315 12 3V9C12 10.6569 10.6569 12 9 12H3C1.34315 12 0 10.6569 0 9V3Z" fill="#C97CF4"/>
3
+ <path d="M6.7333 2.44089C7.63402 2.70512 8.54358 2.70512 9.4443 2.44089C9.52377 2.42328 9.57676 2.47612 9.5591 2.55539C9.30301 3.48019 9.30301 4.33452 9.5591 5.25932C9.57676 5.32978 9.52377 5.39143 9.4443 5.36501C8.54358 5.1184 7.63402 5.1184 6.7333 5.36501C6.66265 5.39143 6.60084 5.32978 6.62733 5.25932C6.86576 4.33452 6.86576 3.48019 6.62733 2.55539C6.60084 2.47612 6.66265 2.42328 6.7333 2.44089ZM7.09535 5.71731V5.86704C7.09535 6.56284 6.60967 7.07368 6.00919 7.07368C5.4087 7.07368 4.93185 6.58927 4.93185 5.99035C4.93185 5.39143 5.41753 4.91582 6.09749 4.91582H6.2741V2.81081C6.1858 2.80201 6.09749 2.80201 6.00919 2.80201C4.24306 2.80201 2.8125 4.22883 2.8125 5.99916C2.8125 7.76948 4.24306 9.1875 6.00919 9.1875C7.77531 9.1875 9.2147 7.76067 9.2147 5.99916V5.71731H7.09535Z" fill="#101214"/>
4
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M0 3C0 1.34315 1.34315 0 3 0H9C10.6569 0 12 1.34315 12 3V9C12 10.6569 10.6569 12 9 12H3C1.34315 12 0 10.6569 0 9V3Z" fill="#FFC716"/>
3
+ <path d="M6.87223 5.07804H9.1611C9.50485 5.07804 9.62223 5.40502 9.41262 5.66493L5.83259 10.0834C4.67558 9.16112 4.78457 7.70228 5.63137 6.63749L6.87223 5.07804ZM5.10317 6.83871H2.8143C2.47055 6.83871 2.35317 6.51173 2.56278 6.25182L6.14281 1.83337C7.29982 2.75563 7.17406 4.1977 6.33564 5.27087L5.10317 6.83871Z" fill="#101214"/>
4
+ </svg>
@@ -1,2 +1,10 @@
1
+ export let JiraProjectTypes = /*#__PURE__*/function (JiraProjectTypes) {
2
+ JiraProjectTypes["PRODUCT_DISCOVERY"] = "Product Discovery";
3
+ JiraProjectTypes["SOFTWARE"] = "Software";
4
+ JiraProjectTypes["SERVICE_DESK"] = "Service Desk";
5
+ JiraProjectTypes["BUSINESS"] = "Business";
6
+ JiraProjectTypes["CUSTOMER_SERVICE"] = "Customer Service";
7
+ return JiraProjectTypes;
8
+ }({});
1
9
  export const USER_ARI_PREFIX = 'ari:cloud:identity::user/';
2
10
  export const TEAM_ARI_PREFIX = 'ari:cloud:identity::team/';
@@ -7,6 +7,8 @@ import Image from '@atlaskit/image';
7
7
  import { Box } from '@atlaskit/primitives/compiled';
8
8
  import ConfluenceIcon from '../assets/ConfluenceIcon.svg';
9
9
  import JiraIcon from '../assets/JiraIcon.svg';
10
+ import JiraProjectDiscovery from '../assets/JiraProjectDiscovery.svg';
11
+ import JiraServiceManagement from '../assets/JiraServiceManagement.svg';
10
12
  const styles = {
11
13
  iconWrapper: "_1bsb1crf _4t3i1crf",
12
14
  mediumIconWrapper: "_1bsb7vkz _4t3i7vkz"
@@ -53,7 +55,46 @@ export const messages = defineMessages({
53
55
  description: 'Text for space type containers'
54
56
  }
55
57
  });
56
- export const getContainerProperties = (containerType, iconSize) => {
58
+ const getJiraIcon = containerSubTypes => {
59
+ switch (containerSubTypes) {
60
+ case 'PRODUCT_DISCOVERY':
61
+ return JiraProjectDiscovery;
62
+ case 'SERVICE_DESK':
63
+ return JiraServiceManagement;
64
+ default:
65
+ return JiraIcon;
66
+ }
67
+ };
68
+ const getJiraContainerProperties = containerTypeProperties => {
69
+ const {
70
+ subType,
71
+ name
72
+ } = containerTypeProperties || {};
73
+ const baseProperties = {
74
+ description: /*#__PURE__*/React.createElement(FormattedMessage, messages.jiraProjectDescription),
75
+ icon: /*#__PURE__*/React.createElement(Box, {
76
+ xcss: styles.iconWrapper
77
+ }, /*#__PURE__*/React.createElement(Image, {
78
+ src: getJiraIcon(subType),
79
+ alt: "",
80
+ testId: "jira-project-container-icon"
81
+ })),
82
+ title: /*#__PURE__*/React.createElement(FormattedMessage, messages.addJiraProjectTitle),
83
+ containerTypeText: /*#__PURE__*/React.createElement(FormattedMessage, messages.projectContainerText)
84
+ };
85
+ switch (subType) {
86
+ case 'PRODUCT_DISCOVERY':
87
+ case 'SERVICE_DESK':
88
+ return {
89
+ ...baseProperties,
90
+ containerTypeText: '',
91
+ description: name || baseProperties.description
92
+ };
93
+ default:
94
+ return baseProperties;
95
+ }
96
+ };
97
+ export const getContainerProperties = (containerType, iconSize = 'small', containerTypeProperties) => {
57
98
  switch (containerType) {
58
99
  case 'ConfluenceSpace':
59
100
  return {
@@ -62,23 +103,14 @@ export const getContainerProperties = (containerType, iconSize) => {
62
103
  xcss: iconSize === 'medium' ? styles.mediumIconWrapper : styles.iconWrapper
63
104
  }, /*#__PURE__*/React.createElement(Image, {
64
105
  src: ConfluenceIcon,
65
- alt: "confluence-project"
106
+ alt: "",
107
+ testId: "confluence-space-container-icon"
66
108
  })),
67
109
  title: /*#__PURE__*/React.createElement(FormattedMessage, messages.addConfluenceContainerTitle),
68
110
  containerTypeText: /*#__PURE__*/React.createElement(FormattedMessage, messages.spaceContainerText)
69
111
  };
70
112
  case 'JiraProject':
71
- return {
72
- description: /*#__PURE__*/React.createElement(FormattedMessage, messages.jiraProjectDescription),
73
- icon: /*#__PURE__*/React.createElement(Box, {
74
- xcss: iconSize === 'medium' ? styles.mediumIconWrapper : styles.iconWrapper
75
- }, /*#__PURE__*/React.createElement(Image, {
76
- src: JiraIcon,
77
- alt: "jira-project"
78
- })),
79
- title: /*#__PURE__*/React.createElement(FormattedMessage, messages.addJiraProjectTitle),
80
- containerTypeText: /*#__PURE__*/React.createElement(FormattedMessage, messages.projectContainerText)
81
- };
113
+ return getJiraContainerProperties(containerTypeProperties);
82
114
  default:
83
115
  return {
84
116
  description: null,
@@ -30,7 +30,11 @@ export class AGGClient extends BaseGraphQlClient {
30
30
  name: edge.node.to.data.__typename === 'ConfluenceSpace' ? edge.node.to.data.confluenceSpaceName || '' : edge.node.to.data.jiraProjectName,
31
31
  icon: edge.node.to.data.__typename === 'ConfluenceSpace' ? `${edge.node.to.data.links.base}${edge.node.to.data.icon.path}` : edge.node.to.data.avatar.medium,
32
32
  createdDate: edge.node.to.data.__typename === 'ConfluenceSpace' ? new Date(edge.node.to.data.createdDate) : new Date(edge.node.to.data.created),
33
- link: edge.node.to.data.__typename === 'ConfluenceSpace' ? `${edge.node.to.data.links.base}${edge.node.to.data.links.webUi}` : edge.node.to.data.webUrl
33
+ link: edge.node.to.data.__typename === 'ConfluenceSpace' ? `${edge.node.to.data.links.base}${edge.node.to.data.links.webUi}` : edge.node.to.data.webUrl,
34
+ containerTypeProperties: {
35
+ subType: edge.node.to.data.__typename === 'JiraProject' ? edge.node.to.data.projectType || '' : undefined,
36
+ name: edge.node.to.data.__typename === 'JiraProject' ? edge.node.to.data.projectTypeName || '' : undefined
37
+ }
34
38
  }));
35
39
  return containersResult;
36
40
  }
@@ -35,6 +35,8 @@ export const TeamContainersQuery = print(gql`
35
35
  avatar {
36
36
  medium
37
37
  }
38
+ projectType
39
+ projectTypeName
38
40
  }
39
41
  }
40
42
  }
@@ -71,6 +71,7 @@ export const LinkedContainerCard = ({
71
71
  containerIcon,
72
72
  link,
73
73
  containerId,
74
+ containerTypeProperties,
74
75
  onDisconnectButtonClick
75
76
  }) => {
76
77
  const {
@@ -80,7 +81,7 @@ export const LinkedContainerCard = ({
80
81
  description,
81
82
  icon,
82
83
  containerTypeText
83
- } = getContainerProperties(containerType);
84
+ } = getContainerProperties(containerType, 'small', containerTypeProperties);
84
85
  const [showCloseIcon, setShowCloseIcon] = useState(false);
85
86
  const {
86
87
  formatMessage
@@ -108,12 +108,13 @@ export const TeamContainers = ({
108
108
  });
109
109
  }
110
110
  }, [actions, createAnalyticsEvent, fireOperationalEvent, filteredTeamContainers, teamId, unlinkError]);
111
+ const TeamContainersSkeletonComponent = (components === null || components === void 0 ? void 0 : components.TeamContainersSkeleton) || TeamContainersSkeleton;
111
112
  if (loading || productPermissionIsLoading) {
112
- return /*#__PURE__*/React.createElement(TeamContainersSkeleton, {
113
+ return /*#__PURE__*/React.createElement(TeamContainersSkeletonComponent, {
113
114
  numberOfContainers: MAX_NUMBER_OF_CONTAINERS_TO_SHOW
114
115
  });
115
116
  }
116
- if (filteredTeamContainers.length === 0 && (!productPermissions || !(productPermissions && (hasProductPermission(productPermissions, 'jira') || hasProductPermission(productPermissions, 'confluence'))))) {
117
+ if (filteredTeamContainers.length === 0 && !isDisplayedOnProfileCard && (!productPermissions || !(productPermissions && (hasProductPermission(productPermissions, 'jira') || hasProductPermission(productPermissions, 'confluence'))))) {
117
118
  return /*#__PURE__*/React.createElement(NoProductAccessState, null);
118
119
  }
119
120
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Stack, {
@@ -125,6 +126,7 @@ export const TeamContainers = ({
125
126
  return /*#__PURE__*/React.createElement(LinkedContainerCardComponent, {
126
127
  key: container.id,
127
128
  containerType: container.type,
129
+ containerTypeProperties: container.containerTypeProperties,
128
130
  title: container.name,
129
131
  containerIcon: container.icon || undefined,
130
132
  link: container.link || undefined,
@@ -145,6 +147,7 @@ export const TeamContainers = ({
145
147
  return /*#__PURE__*/React.createElement(LinkedContainerCardComponent, {
146
148
  key: container.id,
147
149
  containerType: container.type,
150
+ containerTypeProperties: container.containerTypeProperties,
148
151
  title: container.name,
149
152
  containerId: container.id,
150
153
  containerIcon: container.icon || undefined,
@@ -1,22 +1,4 @@
1
- <svg height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path
3
- fill="#1868DB"
4
- d="M0 4a4 4 0 0 1 4-4h12a4 4 0 0 1 4 4v12a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4z"
5
- />
6
- <g clipPath="url(#a)">
7
- <g clipPath="url(#b)">
8
- <path
9
- fill="#fff"
10
- d="M15.19 12.14c-3.498-1.692-4.52-1.945-5.994-1.945-1.729 0-3.202.72-4.519 2.741l-.216.33c-.177.273-.216.37-.216.487s.059.213.275.35l2.22 1.38a.57.57 0 0 0 .315.116c.118 0 .196-.058.314-.233l.354-.544c.55-.836 1.041-1.108 1.67-1.108.55 0 1.198.155 2.004.544l2.319 1.089c.236.116.491.058.609-.214l1.1-2.41c.118-.273.04-.448-.236-.584M4.99 7.881c3.498 1.691 4.52 1.944 5.994 1.944 1.729 0 3.202-.72 4.519-2.741l.216-.33c.177-.273.216-.37.216-.486 0-.117-.059-.214-.275-.35l-2.22-1.38a.57.57 0 0 0-.315-.117c-.118 0-.196.058-.314.233l-.354.544c-.55.836-1.041 1.108-1.67 1.108-.55 0-1.199-.155-2.004-.544L6.465 4.675c-.236-.117-.491-.059-.609.213l-1.1 2.41c-.118.273-.04.448.235.584"
11
- />
12
- </g>
13
- </g>
14
- <defs>
15
- <clipPath id="a">
16
- <path fill="#fff" d="M1.5 1.5h17v17h-17z" />
17
- </clipPath>
18
- <clipPath id="b">
19
- <path fill="#fff" d="M4.245 4.422h11.69V15.6H4.246z" />
20
- </clipPath>
21
- </defs>
22
- </svg>
1
+ <svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M0 3C0 1.34315 1.34315 0 3 0H9C10.6569 0 12 1.34315 12 3V9C12 10.6569 10.6569 12 9 12H3C1.34315 12 0 10.6569 0 9V3Z" fill="#1868DB"/>
3
+ <path d="M8.94391 7.2306C6.92458 6.25419 6.33466 6.10829 5.48382 6.10829C4.4855 6.10829 3.63466 6.52355 2.87458 7.69075L2.74979 7.88155C2.64769 8.03867 2.625 8.09478 2.625 8.16212C2.625 8.22946 2.65903 8.28558 2.78382 8.36414L4.06576 9.16098C4.13382 9.20587 4.19055 9.22832 4.24727 9.22832C4.31534 9.22832 4.36071 9.19465 4.42878 9.09364L4.63298 8.7794C4.95063 8.2968 5.23424 8.13968 5.59727 8.13968C5.91492 8.13968 6.28929 8.22946 6.75441 8.45392L8.09307 9.08242C8.2292 9.14976 8.37668 9.11609 8.44475 8.95897L9.08004 7.5673C9.14811 7.41017 9.10273 7.30917 8.94391 7.2306ZM3.05609 4.77274C5.07542 5.74915 5.66534 5.89505 6.51618 5.89505C7.5145 5.89505 8.36534 5.4798 9.12542 4.31259L9.25021 4.1218C9.35231 3.96468 9.375 3.90856 9.375 3.84122C9.375 3.77388 9.34097 3.71777 9.21618 3.6392L7.93424 2.84236C7.86618 2.79747 7.80945 2.77502 7.75273 2.77502C7.68466 2.77502 7.63929 2.80869 7.57122 2.9097L7.36702 3.22395C7.04937 3.70654 6.76576 3.86367 6.40273 3.86367C6.08508 3.86367 5.71071 3.77388 5.24559 3.54942L3.90693 2.92093C3.7708 2.85359 3.62332 2.88726 3.55525 3.04438L2.91996 4.43605C2.85189 4.59317 2.89727 4.69418 3.05609 4.77274Z" fill="white"/>
4
+ </svg>
@@ -1,22 +1,4 @@
1
- <svg height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path
3
- fill="#1868DB"
4
- d="M0 4a4 4 0 0 1 4-4h12a4 4 0 0 1 4 4v12a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4z"
5
- />
6
- <g clipPath="url(#a)">
7
- <g clipPath="url(#b)">
8
- <path
9
- fill="#fff"
10
- d="M7.517 12.891h-1.11c-1.673 0-2.874-1.025-2.874-2.525H9.5c.309 0 .509.22.509.53V16.9c-1.492 0-2.492-1.208-2.492-2.892zm2.947-2.983h-1.11C7.681 9.908 6.48 8.9 6.48 7.4h5.966c.31 0 .528.202.528.513v6.003c-1.492 0-2.51-1.208-2.51-2.892zm2.965-2.965h-1.11c-1.673 0-2.874-1.025-2.874-2.526h5.966c.31 0 .51.22.51.512v6.004c-1.492 0-2.492-1.208-2.492-2.892z"
11
- />
12
- </g>
13
- </g>
14
- <defs>
15
- <clipPath id="a">
16
- <path fill="#fff" d="M2 2h16v16H2z" />
17
- </clipPath>
18
- <clipPath id="b">
19
- <path fill="#fff" d="M3.533 4.417H15.92V16.9H3.533z" />
20
- </clipPath>
21
- </defs>
22
- </svg>
1
+ <svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M0 3C0 1.34315 1.34315 0 3 0H9C10.6569 0 12 1.34315 12 3V9C12 10.6569 10.6569 12 9 12H3C1.34315 12 0 10.6569 0 9V3Z" fill="#1868DB"/>
3
+ <path d="M4.44805 7.80716H3.75456C2.70865 7.80716 1.95831 7.16652 1.95831 6.22844H5.68724C5.88051 6.22844 6.00556 6.36572 6.00556 6.5602V10.3125C5.07333 10.3125 4.44805 9.55748 4.44805 8.505V7.80716ZM6.28978 5.94244H5.59629C4.55037 5.94244 3.80004 5.31324 3.80004 4.37516H7.52896C7.72223 4.37516 7.85865 4.501 7.85865 4.69548V8.4478C6.92642 8.4478 6.28978 7.69276 6.28978 6.64028V5.94244ZM8.14287 4.08916H7.44938C6.40346 4.08916 5.65313 3.44852 5.65313 2.51044H9.38206C9.57532 2.51044 9.70038 2.64772 9.70038 2.83076V6.58308C8.76815 6.58308 8.14287 5.82804 8.14287 4.77556V4.08916Z" fill="white"/>
4
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M0 3C0 1.34315 1.34315 0 3 0H9C10.6569 0 12 1.34315 12 3V9C12 10.6569 10.6569 12 9 12H3C1.34315 12 0 10.6569 0 9V3Z" fill="#C97CF4"/>
3
+ <path d="M6.7333 2.44089C7.63402 2.70512 8.54358 2.70512 9.4443 2.44089C9.52377 2.42328 9.57676 2.47612 9.5591 2.55539C9.30301 3.48019 9.30301 4.33452 9.5591 5.25932C9.57676 5.32978 9.52377 5.39143 9.4443 5.36501C8.54358 5.1184 7.63402 5.1184 6.7333 5.36501C6.66265 5.39143 6.60084 5.32978 6.62733 5.25932C6.86576 4.33452 6.86576 3.48019 6.62733 2.55539C6.60084 2.47612 6.66265 2.42328 6.7333 2.44089ZM7.09535 5.71731V5.86704C7.09535 6.56284 6.60967 7.07368 6.00919 7.07368C5.4087 7.07368 4.93185 6.58927 4.93185 5.99035C4.93185 5.39143 5.41753 4.91582 6.09749 4.91582H6.2741V2.81081C6.1858 2.80201 6.09749 2.80201 6.00919 2.80201C4.24306 2.80201 2.8125 4.22883 2.8125 5.99916C2.8125 7.76948 4.24306 9.1875 6.00919 9.1875C7.77531 9.1875 9.2147 7.76067 9.2147 5.99916V5.71731H7.09535Z" fill="#101214"/>
4
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M0 3C0 1.34315 1.34315 0 3 0H9C10.6569 0 12 1.34315 12 3V9C12 10.6569 10.6569 12 9 12H3C1.34315 12 0 10.6569 0 9V3Z" fill="#FFC716"/>
3
+ <path d="M6.87223 5.07804H9.1611C9.50485 5.07804 9.62223 5.40502 9.41262 5.66493L5.83259 10.0834C4.67558 9.16112 4.78457 7.70228 5.63137 6.63749L6.87223 5.07804ZM5.10317 6.83871H2.8143C2.47055 6.83871 2.35317 6.51173 2.56278 6.25182L6.14281 1.83337C7.29982 2.75563 7.17406 4.1977 6.33564 5.27087L5.10317 6.83871Z" fill="#101214"/>
4
+ </svg>
@@ -1,2 +1,10 @@
1
+ export var JiraProjectTypes = /*#__PURE__*/function (JiraProjectTypes) {
2
+ JiraProjectTypes["PRODUCT_DISCOVERY"] = "Product Discovery";
3
+ JiraProjectTypes["SOFTWARE"] = "Software";
4
+ JiraProjectTypes["SERVICE_DESK"] = "Service Desk";
5
+ JiraProjectTypes["BUSINESS"] = "Business";
6
+ JiraProjectTypes["CUSTOMER_SERVICE"] = "Customer Service";
7
+ return JiraProjectTypes;
8
+ }({});
1
9
  export var USER_ARI_PREFIX = 'ari:cloud:identity::user/';
2
10
  export var TEAM_ARI_PREFIX = 'ari:cloud:identity::team/';
@@ -1,12 +1,17 @@
1
1
  /* get-container-properties.tsx generated by @compiled/babel-plugin v0.36.1 */
2
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
3
  import "./get-container-properties.compiled.css";
3
4
  import { ax, ix } from "@compiled/react/runtime";
5
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
6
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
7
  import React from 'react';
5
8
  import { defineMessages, FormattedMessage } from 'react-intl-next';
6
9
  import Image from '@atlaskit/image';
7
10
  import { Box } from '@atlaskit/primitives/compiled';
8
11
  import ConfluenceIcon from '../assets/ConfluenceIcon.svg';
9
12
  import JiraIcon from '../assets/JiraIcon.svg';
13
+ import JiraProjectDiscovery from '../assets/JiraProjectDiscovery.svg';
14
+ import JiraServiceManagement from '../assets/JiraServiceManagement.svg';
10
15
  var styles = {
11
16
  iconWrapper: "_1bsb1crf _4t3i1crf",
12
17
  mediumIconWrapper: "_1bsb7vkz _4t3i7vkz"
@@ -53,7 +58,46 @@ export var messages = defineMessages({
53
58
  description: 'Text for space type containers'
54
59
  }
55
60
  });
56
- export var getContainerProperties = function getContainerProperties(containerType, iconSize) {
61
+ var getJiraIcon = function getJiraIcon(containerSubTypes) {
62
+ switch (containerSubTypes) {
63
+ case 'PRODUCT_DISCOVERY':
64
+ return JiraProjectDiscovery;
65
+ case 'SERVICE_DESK':
66
+ return JiraServiceManagement;
67
+ default:
68
+ return JiraIcon;
69
+ }
70
+ };
71
+ var getJiraContainerProperties = function getJiraContainerProperties(containerTypeProperties) {
72
+ var _ref = containerTypeProperties || {},
73
+ subType = _ref.subType,
74
+ name = _ref.name;
75
+ var baseProperties = {
76
+ description: /*#__PURE__*/React.createElement(FormattedMessage, messages.jiraProjectDescription),
77
+ icon: /*#__PURE__*/React.createElement(Box, {
78
+ xcss: styles.iconWrapper
79
+ }, /*#__PURE__*/React.createElement(Image, {
80
+ src: getJiraIcon(subType),
81
+ alt: "",
82
+ testId: "jira-project-container-icon"
83
+ })),
84
+ title: /*#__PURE__*/React.createElement(FormattedMessage, messages.addJiraProjectTitle),
85
+ containerTypeText: /*#__PURE__*/React.createElement(FormattedMessage, messages.projectContainerText)
86
+ };
87
+ switch (subType) {
88
+ case 'PRODUCT_DISCOVERY':
89
+ case 'SERVICE_DESK':
90
+ return _objectSpread(_objectSpread({}, baseProperties), {}, {
91
+ containerTypeText: '',
92
+ description: name || baseProperties.description
93
+ });
94
+ default:
95
+ return baseProperties;
96
+ }
97
+ };
98
+ export var getContainerProperties = function getContainerProperties(containerType) {
99
+ var iconSize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'small';
100
+ var containerTypeProperties = arguments.length > 2 ? arguments[2] : undefined;
57
101
  switch (containerType) {
58
102
  case 'ConfluenceSpace':
59
103
  return {
@@ -62,23 +106,14 @@ export var getContainerProperties = function getContainerProperties(containerTyp
62
106
  xcss: iconSize === 'medium' ? styles.mediumIconWrapper : styles.iconWrapper
63
107
  }, /*#__PURE__*/React.createElement(Image, {
64
108
  src: ConfluenceIcon,
65
- alt: "confluence-project"
109
+ alt: "",
110
+ testId: "confluence-space-container-icon"
66
111
  })),
67
112
  title: /*#__PURE__*/React.createElement(FormattedMessage, messages.addConfluenceContainerTitle),
68
113
  containerTypeText: /*#__PURE__*/React.createElement(FormattedMessage, messages.spaceContainerText)
69
114
  };
70
115
  case 'JiraProject':
71
- return {
72
- description: /*#__PURE__*/React.createElement(FormattedMessage, messages.jiraProjectDescription),
73
- icon: /*#__PURE__*/React.createElement(Box, {
74
- xcss: iconSize === 'medium' ? styles.mediumIconWrapper : styles.iconWrapper
75
- }, /*#__PURE__*/React.createElement(Image, {
76
- src: JiraIcon,
77
- alt: "jira-project"
78
- })),
79
- title: /*#__PURE__*/React.createElement(FormattedMessage, messages.addJiraProjectTitle),
80
- containerTypeText: /*#__PURE__*/React.createElement(FormattedMessage, messages.projectContainerText)
81
- };
116
+ return getJiraContainerProperties(containerTypeProperties);
82
117
  default:
83
118
  return {
84
119
  description: null,
@@ -54,7 +54,11 @@ export var AGGClient = /*#__PURE__*/function (_BaseGraphQlClient) {
54
54
  name: edge.node.to.data.__typename === 'ConfluenceSpace' ? edge.node.to.data.confluenceSpaceName || '' : edge.node.to.data.jiraProjectName,
55
55
  icon: edge.node.to.data.__typename === 'ConfluenceSpace' ? "".concat(edge.node.to.data.links.base).concat(edge.node.to.data.icon.path) : edge.node.to.data.avatar.medium,
56
56
  createdDate: edge.node.to.data.__typename === 'ConfluenceSpace' ? new Date(edge.node.to.data.createdDate) : new Date(edge.node.to.data.created),
57
- link: edge.node.to.data.__typename === 'ConfluenceSpace' ? "".concat(edge.node.to.data.links.base).concat(edge.node.to.data.links.webUi) : edge.node.to.data.webUrl
57
+ link: edge.node.to.data.__typename === 'ConfluenceSpace' ? "".concat(edge.node.to.data.links.base).concat(edge.node.to.data.links.webUi) : edge.node.to.data.webUrl,
58
+ containerTypeProperties: {
59
+ subType: edge.node.to.data.__typename === 'JiraProject' ? edge.node.to.data.projectType || '' : undefined,
60
+ name: edge.node.to.data.__typename === 'JiraProject' ? edge.node.to.data.projectTypeName || '' : undefined
61
+ }
58
62
  };
59
63
  });
60
64
  return _context.abrupt("return", containersResult);
@@ -2,4 +2,4 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
2
2
  var _templateObject;
3
3
  import { print } from 'graphql';
4
4
  import gql from 'graphql-tag';
5
- export var TeamContainersQuery = print(gql(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tquery TeamContainersQuery($cypherQuery: String!) {\n\t\tgraphStore @optIn(to: [\"GraphStore\"]) {\n\t\t\tcypherQuery(query: $cypherQuery) @optIn(to: [\"GraphStoreCypherQuery\"]) {\n\t\t\t\tedges {\n\t\t\t\t\t__typename\n\t\t\t\t\tnode {\n\t\t\t\t\t\tfrom {\n\t\t\t\t\t\t\tid\n\t\t\t\t\t\t}\n\t\t\t\t\t\tto {\n\t\t\t\t\t\t\tid\n\t\t\t\t\t\t\tdata {\n\t\t\t\t\t\t\t\t__typename\n\t\t\t\t\t\t\t\t... on ConfluenceSpace {\n\t\t\t\t\t\t\t\t\tid\n\t\t\t\t\t\t\t\t\tconfluenceSpaceName: name\n\t\t\t\t\t\t\t\t\ttype\n\t\t\t\t\t\t\t\t\tcreatedDate\n\t\t\t\t\t\t\t\t\tlinks {\n\t\t\t\t\t\t\t\t\t\tbase\n\t\t\t\t\t\t\t\t\t\twebUi\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\ticon {\n\t\t\t\t\t\t\t\t\t\tpath\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t... on JiraProject {\n\t\t\t\t\t\t\t\t\tid\n\t\t\t\t\t\t\t\t\tjiraProjectName: name\n\t\t\t\t\t\t\t\t\twebUrl\n\t\t\t\t\t\t\t\t\tcreated\n\t\t\t\t\t\t\t\t\tavatar {\n\t\t\t\t\t\t\t\t\t\tmedium\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n"]))));
5
+ export var TeamContainersQuery = print(gql(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tquery TeamContainersQuery($cypherQuery: String!) {\n\t\tgraphStore @optIn(to: [\"GraphStore\"]) {\n\t\t\tcypherQuery(query: $cypherQuery) @optIn(to: [\"GraphStoreCypherQuery\"]) {\n\t\t\t\tedges {\n\t\t\t\t\t__typename\n\t\t\t\t\tnode {\n\t\t\t\t\t\tfrom {\n\t\t\t\t\t\t\tid\n\t\t\t\t\t\t}\n\t\t\t\t\t\tto {\n\t\t\t\t\t\t\tid\n\t\t\t\t\t\t\tdata {\n\t\t\t\t\t\t\t\t__typename\n\t\t\t\t\t\t\t\t... on ConfluenceSpace {\n\t\t\t\t\t\t\t\t\tid\n\t\t\t\t\t\t\t\t\tconfluenceSpaceName: name\n\t\t\t\t\t\t\t\t\ttype\n\t\t\t\t\t\t\t\t\tcreatedDate\n\t\t\t\t\t\t\t\t\tlinks {\n\t\t\t\t\t\t\t\t\t\tbase\n\t\t\t\t\t\t\t\t\t\twebUi\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\ticon {\n\t\t\t\t\t\t\t\t\t\tpath\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t... on JiraProject {\n\t\t\t\t\t\t\t\t\tid\n\t\t\t\t\t\t\t\t\tjiraProjectName: name\n\t\t\t\t\t\t\t\t\twebUrl\n\t\t\t\t\t\t\t\t\tcreated\n\t\t\t\t\t\t\t\t\tavatar {\n\t\t\t\t\t\t\t\t\t\tmedium\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tprojectType\n\t\t\t\t\t\t\t\t\tprojectTypeName\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n"]))));
@@ -72,10 +72,11 @@ export var LinkedContainerCard = function LinkedContainerCard(_ref2) {
72
72
  containerIcon = _ref2.containerIcon,
73
73
  link = _ref2.link,
74
74
  containerId = _ref2.containerId,
75
+ containerTypeProperties = _ref2.containerTypeProperties,
75
76
  onDisconnectButtonClick = _ref2.onDisconnectButtonClick;
76
77
  var _useAnalyticsEvents2 = useAnalyticsEvents(),
77
78
  createAnalyticsEvent = _useAnalyticsEvents2.createAnalyticsEvent;
78
- var _getContainerProperti = getContainerProperties(containerType),
79
+ var _getContainerProperti = getContainerProperties(containerType, 'small', containerTypeProperties),
79
80
  description = _getContainerProperti.description,
80
81
  icon = _getContainerProperti.icon,
81
82
  containerTypeText = _getContainerProperti.containerTypeText;
@@ -151,12 +151,13 @@ export var TeamContainers = function TeamContainers(_ref) {
151
151
  return _ref2.apply(this, arguments);
152
152
  };
153
153
  }(), [actions, createAnalyticsEvent, fireOperationalEvent, filteredTeamContainers, teamId, unlinkError]);
154
+ var TeamContainersSkeletonComponent = (components === null || components === void 0 ? void 0 : components.TeamContainersSkeleton) || TeamContainersSkeleton;
154
155
  if (loading || productPermissionIsLoading) {
155
- return /*#__PURE__*/React.createElement(TeamContainersSkeleton, {
156
+ return /*#__PURE__*/React.createElement(TeamContainersSkeletonComponent, {
156
157
  numberOfContainers: MAX_NUMBER_OF_CONTAINERS_TO_SHOW
157
158
  });
158
159
  }
159
- if (filteredTeamContainers.length === 0 && (!productPermissions || !(productPermissions && (hasProductPermission(productPermissions, 'jira') || hasProductPermission(productPermissions, 'confluence'))))) {
160
+ if (filteredTeamContainers.length === 0 && !isDisplayedOnProfileCard && (!productPermissions || !(productPermissions && (hasProductPermission(productPermissions, 'jira') || hasProductPermission(productPermissions, 'confluence'))))) {
160
161
  return /*#__PURE__*/React.createElement(NoProductAccessState, null);
161
162
  }
162
163
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Stack, {
@@ -168,6 +169,7 @@ export var TeamContainers = function TeamContainers(_ref) {
168
169
  return /*#__PURE__*/React.createElement(LinkedContainerCardComponent, {
169
170
  key: container.id,
170
171
  containerType: container.type,
172
+ containerTypeProperties: container.containerTypeProperties,
171
173
  title: container.name,
172
174
  containerIcon: container.icon || undefined,
173
175
  link: container.link || undefined,
@@ -194,6 +196,7 @@ export var TeamContainers = function TeamContainers(_ref) {
194
196
  return /*#__PURE__*/React.createElement(LinkedContainerCardComponent, {
195
197
  key: container.id,
196
198
  containerType: container.type,
199
+ containerTypeProperties: container.containerTypeProperties,
197
200
  title: container.name,
198
201
  containerId: container.id,
199
202
  containerIcon: container.icon || undefined,
@@ -1,4 +1,12 @@
1
1
  export type ContainerTypes = 'ConfluenceSpace' | 'JiraProject';
2
+ export declare enum JiraProjectTypes {
3
+ PRODUCT_DISCOVERY = "Product Discovery",
4
+ SOFTWARE = "Software",
5
+ SERVICE_DESK = "Service Desk",
6
+ BUSINESS = "Business",
7
+ CUSTOMER_SERVICE = "Customer Service"
8
+ }
9
+ export type ContainerSubTypes = keyof typeof JiraProjectTypes | string;
2
10
  export type TeamContainer = {
3
11
  id: string;
4
12
  type: ContainerTypes;
@@ -6,6 +14,10 @@ export type TeamContainer = {
6
14
  icon?: string | null;
7
15
  createdDate: Date;
8
16
  link?: string | null;
17
+ containerTypeProperties?: {
18
+ subType?: ContainerSubTypes;
19
+ name?: string;
20
+ };
9
21
  };
10
22
  export declare const USER_ARI_PREFIX: "ari:cloud:identity::user/";
11
23
  export type UserARI = `${typeof USER_ARI_PREFIX}${string}`;
@@ -1,5 +1,5 @@
1
1
  import { type ReactNode } from 'react';
2
- import { type ContainerTypes } from '../types';
2
+ import { type ContainerSubTypes, type ContainerTypes } from '../types';
3
3
  interface ContainerProperties {
4
4
  description: ReactNode;
5
5
  icon: ReactNode;
@@ -49,5 +49,8 @@ export declare const messages: {
49
49
  description: string;
50
50
  };
51
51
  };
52
- export declare const getContainerProperties: (containerType: ContainerTypes, iconSize?: IconSize) => ContainerProperties;
52
+ export declare const getContainerProperties: (containerType: ContainerTypes, iconSize?: IconSize, containerTypeProperties?: {
53
+ subType?: ContainerSubTypes;
54
+ name?: string;
55
+ }) => ContainerProperties;
53
56
  export {};
@@ -1,8 +1,9 @@
1
1
  export { TeamContainers } from './ui/team-containers';
2
2
  export type { LinkedContainerCardProps } from './ui/team-containers';
3
+ export type { TeamContainersSkeletonProps } from './ui/team-containers';
3
4
  export type { TeamContainerProps } from './ui/team-containers/types';
4
- export type { TeamContainer } from './common/types';
5
5
  export { useTeamContainers, useConnectedTeams } from './controllers/hooks/use-team-containers';
6
+ export type { TeamContainer, ContainerSubTypes } from './common/types';
6
7
  export { useProductPermissions } from './controllers/hooks/use-product-permission';
7
8
  export { hasProductPermission } from './controllers/product-permission/utils';
8
9
  export { getContainerProperties } from './common/utils/get-container-properties';
@@ -12,6 +12,10 @@ export declare class AGGClient extends BaseGraphQlClient {
12
12
  icon: string;
13
13
  createdDate: Date;
14
14
  link: string;
15
+ containerTypeProperties: {
16
+ subType: string | undefined;
17
+ name: string | undefined;
18
+ };
15
19
  }[]>;
16
20
  unlinkTeamContainer(teamId: string, containerId: string): Promise<UnlinkContainerMutationResponse>;
17
21
  queryNumberOfTeamConnectedToContainer(containerId: string): Promise<number>;
@@ -26,6 +26,8 @@ type JiraProject = {
26
26
  avatar: {
27
27
  medium: string;
28
28
  };
29
+ projectType: string;
30
+ projectTypeName: string;
29
31
  };
30
32
  type ConfluenceSpace = {
31
33
  __typename: 'ConfluenceSpace';
@@ -1,2 +1,3 @@
1
1
  export { TeamContainers } from './main';
2
2
  export type { LinkedContainerCardProps } from './linked-container-card';
3
+ export type { TeamContainersSkeletonProps } from './team-containers-skeleton';
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { type ContainerTypes } from '../../../common/types';
2
+ import { type ContainerSubTypes, type ContainerTypes } from '../../../common/types';
3
3
  export interface LinkedContainerCardProps {
4
4
  containerType: ContainerTypes;
5
5
  title: string;
@@ -7,5 +7,9 @@ export interface LinkedContainerCardProps {
7
7
  containerIcon?: string;
8
8
  link?: string;
9
9
  onDisconnectButtonClick: () => void;
10
+ containerTypeProperties?: {
11
+ subType?: ContainerSubTypes;
12
+ name?: string;
13
+ };
10
14
  }
11
- export declare const LinkedContainerCard: ({ containerType, title, containerIcon, link, containerId, onDisconnectButtonClick, }: LinkedContainerCardProps) => React.JSX.Element;
15
+ export declare const LinkedContainerCard: ({ containerType, title, containerIcon, link, containerId, containerTypeProperties, onDisconnectButtonClick, }: LinkedContainerCardProps) => React.JSX.Element;
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
- interface TeamContainersSkeletonProps {
2
+ export interface TeamContainersSkeletonProps {
3
3
  numberOfContainers: number;
4
4
  }
5
5
  export declare const TeamContainersSkeleton: ({ numberOfContainers }: TeamContainersSkeletonProps) => React.JSX.Element;
6
- export {};
@@ -1,5 +1,6 @@
1
1
  import { type ComponentType } from 'react';
2
2
  import { type LinkedContainerCardProps } from './linked-container-card';
3
+ import { type TeamContainersSkeletonProps } from './team-containers-skeleton';
3
4
  export interface TeamContainerProps {
4
5
  /**
5
6
  * The team id to fetch the team container for
@@ -32,4 +33,5 @@ export interface TeamContainerProps {
32
33
  }
33
34
  export interface TeamContainersComponent {
34
35
  ContainerCard: ComponentType<LinkedContainerCardProps>;
36
+ TeamContainersSkeleton: ComponentType<TeamContainersSkeletonProps>;
35
37
  }
@@ -1,4 +1,12 @@
1
1
  export type ContainerTypes = 'ConfluenceSpace' | 'JiraProject';
2
+ export declare enum JiraProjectTypes {
3
+ PRODUCT_DISCOVERY = "Product Discovery",
4
+ SOFTWARE = "Software",
5
+ SERVICE_DESK = "Service Desk",
6
+ BUSINESS = "Business",
7
+ CUSTOMER_SERVICE = "Customer Service"
8
+ }
9
+ export type ContainerSubTypes = keyof typeof JiraProjectTypes | string;
2
10
  export type TeamContainer = {
3
11
  id: string;
4
12
  type: ContainerTypes;
@@ -6,6 +14,10 @@ export type TeamContainer = {
6
14
  icon?: string | null;
7
15
  createdDate: Date;
8
16
  link?: string | null;
17
+ containerTypeProperties?: {
18
+ subType?: ContainerSubTypes;
19
+ name?: string;
20
+ };
9
21
  };
10
22
  export declare const USER_ARI_PREFIX: "ari:cloud:identity::user/";
11
23
  export type UserARI = `${typeof USER_ARI_PREFIX}${string}`;
@@ -1,5 +1,5 @@
1
1
  import { type ReactNode } from 'react';
2
- import { type ContainerTypes } from '../types';
2
+ import { type ContainerSubTypes, type ContainerTypes } from '../types';
3
3
  interface ContainerProperties {
4
4
  description: ReactNode;
5
5
  icon: ReactNode;
@@ -49,5 +49,8 @@ export declare const messages: {
49
49
  description: string;
50
50
  };
51
51
  };
52
- export declare const getContainerProperties: (containerType: ContainerTypes, iconSize?: IconSize) => ContainerProperties;
52
+ export declare const getContainerProperties: (containerType: ContainerTypes, iconSize?: IconSize, containerTypeProperties?: {
53
+ subType?: ContainerSubTypes;
54
+ name?: string;
55
+ }) => ContainerProperties;
53
56
  export {};
@@ -1,8 +1,9 @@
1
1
  export { TeamContainers } from './ui/team-containers';
2
2
  export type { LinkedContainerCardProps } from './ui/team-containers';
3
+ export type { TeamContainersSkeletonProps } from './ui/team-containers';
3
4
  export type { TeamContainerProps } from './ui/team-containers/types';
4
- export type { TeamContainer } from './common/types';
5
5
  export { useTeamContainers, useConnectedTeams } from './controllers/hooks/use-team-containers';
6
+ export type { TeamContainer, ContainerSubTypes } from './common/types';
6
7
  export { useProductPermissions } from './controllers/hooks/use-product-permission';
7
8
  export { hasProductPermission } from './controllers/product-permission/utils';
8
9
  export { getContainerProperties } from './common/utils/get-container-properties';
@@ -12,6 +12,10 @@ export declare class AGGClient extends BaseGraphQlClient {
12
12
  icon: string;
13
13
  createdDate: Date;
14
14
  link: string;
15
+ containerTypeProperties: {
16
+ subType: string | undefined;
17
+ name: string | undefined;
18
+ };
15
19
  }[]>;
16
20
  unlinkTeamContainer(teamId: string, containerId: string): Promise<UnlinkContainerMutationResponse>;
17
21
  queryNumberOfTeamConnectedToContainer(containerId: string): Promise<number>;
@@ -26,6 +26,8 @@ type JiraProject = {
26
26
  avatar: {
27
27
  medium: string;
28
28
  };
29
+ projectType: string;
30
+ projectTypeName: string;
29
31
  };
30
32
  type ConfluenceSpace = {
31
33
  __typename: 'ConfluenceSpace';
@@ -1,2 +1,3 @@
1
1
  export { TeamContainers } from './main';
2
2
  export type { LinkedContainerCardProps } from './linked-container-card';
3
+ export type { TeamContainersSkeletonProps } from './team-containers-skeleton';
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { type ContainerTypes } from '../../../common/types';
2
+ import { type ContainerSubTypes, type ContainerTypes } from '../../../common/types';
3
3
  export interface LinkedContainerCardProps {
4
4
  containerType: ContainerTypes;
5
5
  title: string;
@@ -7,5 +7,9 @@ export interface LinkedContainerCardProps {
7
7
  containerIcon?: string;
8
8
  link?: string;
9
9
  onDisconnectButtonClick: () => void;
10
+ containerTypeProperties?: {
11
+ subType?: ContainerSubTypes;
12
+ name?: string;
13
+ };
10
14
  }
11
- export declare const LinkedContainerCard: ({ containerType, title, containerIcon, link, containerId, onDisconnectButtonClick, }: LinkedContainerCardProps) => React.JSX.Element;
15
+ export declare const LinkedContainerCard: ({ containerType, title, containerIcon, link, containerId, containerTypeProperties, onDisconnectButtonClick, }: LinkedContainerCardProps) => React.JSX.Element;
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
- interface TeamContainersSkeletonProps {
2
+ export interface TeamContainersSkeletonProps {
3
3
  numberOfContainers: number;
4
4
  }
5
5
  export declare const TeamContainersSkeleton: ({ numberOfContainers }: TeamContainersSkeletonProps) => React.JSX.Element;
6
- export {};
@@ -1,5 +1,6 @@
1
1
  import { type ComponentType } from 'react';
2
2
  import { type LinkedContainerCardProps } from './linked-container-card';
3
+ import { type TeamContainersSkeletonProps } from './team-containers-skeleton';
3
4
  export interface TeamContainerProps {
4
5
  /**
5
6
  * The team id to fetch the team container for
@@ -32,4 +33,5 @@ export interface TeamContainerProps {
32
33
  }
33
34
  export interface TeamContainersComponent {
34
35
  ContainerCard: ComponentType<LinkedContainerCardProps>;
36
+ TeamContainersSkeleton: ComponentType<TeamContainersSkeletonProps>;
35
37
  }
package/package.json CHANGED
@@ -106,7 +106,7 @@
106
106
  }
107
107
  },
108
108
  "name": "@atlaskit/teams-public",
109
- "version": "0.21.0",
109
+ "version": "0.23.0",
110
110
  "description": "Public components related to teams",
111
111
  "author": "Atlassian Pty Ltd",
112
112
  "license": "Apache-2.0",