@atlaskit/teams-public 0.26.0 → 0.27.1
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.
- package/CHANGELOG.md +18 -0
- package/dist/cjs/common/assets/LoomIcon.svg +4 -0
- package/dist/cjs/common/utils/get-container-properties.js +24 -0
- package/dist/cjs/ui/team-containers/main.js +39 -24
- package/dist/es2019/common/assets/LoomIcon.svg +4 -0
- package/dist/es2019/common/utils/get-container-properties.js +24 -0
- package/dist/es2019/ui/team-containers/main.js +23 -9
- package/dist/esm/common/assets/LoomIcon.svg +4 -0
- package/dist/esm/common/utils/get-container-properties.js +24 -0
- package/dist/esm/ui/team-containers/main.js +39 -24
- package/dist/types/common/utils/get-container-properties.d.ts +10 -0
- package/dist/types/ui/team-containers/types.d.ts +1 -1
- package/dist/types-ts4.5/common/utils/get-container-properties.d.ts +10 -0
- package/dist/types-ts4.5/ui/team-containers/types.d.ts +1 -1
- package/package.json +5 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/teams-public
|
|
2
2
|
|
|
3
|
+
## 0.27.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 0.27.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#151399](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/151399)
|
|
14
|
+
[`f764a1f7a4600`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f764a1f7a4600) -
|
|
15
|
+
[ux] Add loom add container card on profile page
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 0.26.0
|
|
4
22
|
|
|
5
23
|
### Minor Changes
|
|
@@ -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="#1868DB"/>
|
|
3
|
+
<path d="M9.54165 5.60611H7.47038L9.26419 4.57045L8.87026 3.88794L7.07645 4.9236L8.11187 3.12992L7.42936 2.73576L6.39393 4.52943V2.45831H5.60602V4.52963L4.5702 2.73576L3.8879 3.12973L4.92353 4.9234L3.12971 3.88794L2.73575 4.57025L4.52957 5.60591H2.45831V6.39385H4.52937L2.73575 7.42951L3.12971 8.11202L4.92333 7.07656L3.8877 8.87023L4.5702 9.26419L5.60582 7.47034V9.54165H6.39374V7.47053L7.42917 9.26419L8.11165 8.87023L7.07603 7.07637L8.86985 8.11202L9.26382 7.42951L7.47019 6.39404H9.54123V5.60611H9.54165ZM5.99998 7.07159C5.40587 7.07159 4.92432 6.59005 4.92432 5.99592C4.92432 5.40179 5.40587 4.92023 5.99998 4.92023C6.59409 4.92023 7.07562 5.40179 7.07562 5.99592C7.07562 6.59005 6.59409 7.07159 5.99998 7.07159Z" fill="white"/>
|
|
4
|
+
</svg>
|
|
@@ -18,6 +18,7 @@ var _ConfluenceIcon = _interopRequireDefault(require("../assets/ConfluenceIcon.s
|
|
|
18
18
|
var _JiraIcon = _interopRequireDefault(require("../assets/JiraIcon.svg"));
|
|
19
19
|
var _JiraProjectDiscovery = _interopRequireDefault(require("../assets/JiraProjectDiscovery.svg"));
|
|
20
20
|
var _JiraServiceManagement = _interopRequireDefault(require("../assets/JiraServiceManagement.svg"));
|
|
21
|
+
var _LoomIcon = _interopRequireDefault(require("../assets/LoomIcon.svg"));
|
|
21
22
|
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; }
|
|
22
23
|
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; }
|
|
23
24
|
var styles = {
|
|
@@ -35,6 +36,16 @@ var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
|
|
|
35
36
|
defaultMessage: 'Confluence',
|
|
36
37
|
description: 'Description of the card to add a Confluence space to a team'
|
|
37
38
|
},
|
|
39
|
+
addLoomContainerTitle: {
|
|
40
|
+
id: 'ptc-directory.team-profile-page.team-containers.add-loom-space-title.non-final',
|
|
41
|
+
defaultMessage: 'Add space',
|
|
42
|
+
description: 'Title of the card to add a Loom space to a team'
|
|
43
|
+
},
|
|
44
|
+
confluenceLoomDescription: {
|
|
45
|
+
id: 'ptc-directory.team-profile-page.team-containers.add-loom-space-description.non-final',
|
|
46
|
+
defaultMessage: 'Loom',
|
|
47
|
+
description: 'Description of the card to add a Loom space to a team'
|
|
48
|
+
},
|
|
38
49
|
addJiraProjectTitle: {
|
|
39
50
|
id: 'ptc-directory.team-profile-page.team-containers.add-jira-project-title.non-final',
|
|
40
51
|
defaultMessage: 'Add project',
|
|
@@ -124,6 +135,19 @@ var getContainerProperties = exports.getContainerProperties = function getContai
|
|
|
124
135
|
alt: "",
|
|
125
136
|
testId: "confluence-space-container-icon"
|
|
126
137
|
})),
|
|
138
|
+
title: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, messages.addLoomContainerTitle),
|
|
139
|
+
containerTypeText: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, messages.spaceContainerText)
|
|
140
|
+
};
|
|
141
|
+
case 'LoomSpace':
|
|
142
|
+
return {
|
|
143
|
+
description: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, messages.loomSpaceDescription),
|
|
144
|
+
icon: /*#__PURE__*/_react.default.createElement(Comp, {
|
|
145
|
+
xcss: iconSize === 'medium' ? styles.mediumIconWrapper : styles.iconWrapper
|
|
146
|
+
}, /*#__PURE__*/_react.default.createElement(_image.default, {
|
|
147
|
+
src: _LoomIcon.default,
|
|
148
|
+
alt: "",
|
|
149
|
+
testId: "confluence-space-container-icon"
|
|
150
|
+
})),
|
|
127
151
|
title: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, messages.addConfluenceContainerTitle),
|
|
128
152
|
containerTypeText: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, messages.spaceContainerText)
|
|
129
153
|
};
|
|
@@ -14,6 +14,7 @@ var _reactIntlNext = require("react-intl-next");
|
|
|
14
14
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
15
15
|
var _new = _interopRequireDefault(require("@atlaskit/button/new"));
|
|
16
16
|
var _modalTransition = _interopRequireDefault(require("@atlaskit/modal-dialog/modal-transition"));
|
|
17
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
18
|
var _primitives = require("@atlaskit/primitives");
|
|
18
19
|
var _colors = require("@atlaskit/theme/colors");
|
|
19
20
|
var _analytics = require("../../common/utils/analytics");
|
|
@@ -50,28 +51,28 @@ var TeamContainers = exports.TeamContainers = function TeamContainers(_ref) {
|
|
|
50
51
|
actions = _useTeamContainersHoo2[1];
|
|
51
52
|
var _useState = (0, _react.useState)(false),
|
|
52
53
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
53
|
-
|
|
54
|
-
|
|
54
|
+
showMore = _useState2[0],
|
|
55
|
+
setShowMore = _useState2[1];
|
|
55
56
|
var _useState3 = (0, _react.useState)(false),
|
|
56
57
|
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
var _useState5 = (0, _react.useState)(
|
|
58
|
+
isDisconnectDialogOpen = _useState4[0],
|
|
59
|
+
setIsDisconnectDialogOpen = _useState4[1];
|
|
60
|
+
var _useState5 = (0, _react.useState)(),
|
|
60
61
|
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
var _useState7 = (0, _react.useState)(
|
|
62
|
+
selectedContainerDetails = _useState6[0],
|
|
63
|
+
setSelectedContainerDetails = _useState6[1];
|
|
64
|
+
var _useState7 = (0, _react.useState)(teamContainers),
|
|
64
65
|
_useState8 = (0, _slicedToArray2.default)(_useState7, 2),
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
var _useState9 = (0, _react.useState)(
|
|
66
|
+
filteredTeamContainers = _useState8[0],
|
|
67
|
+
setFilteredTeamContainers = _useState8[1];
|
|
68
|
+
var _useState9 = (0, _react.useState)({
|
|
69
|
+
Jira: false,
|
|
70
|
+
Confluence: false,
|
|
71
|
+
Loom: false
|
|
72
|
+
}),
|
|
68
73
|
_useState10 = (0, _slicedToArray2.default)(_useState9, 2),
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
var _useState11 = (0, _react.useState)(teamContainers),
|
|
72
|
-
_useState12 = (0, _slicedToArray2.default)(_useState11, 2),
|
|
73
|
-
filteredTeamContainers = _useState12[0],
|
|
74
|
-
setFilteredTeamContainers = _useState12[1];
|
|
74
|
+
showAddContainer = _useState10[0],
|
|
75
|
+
setShowAddContainer = _useState10[1];
|
|
75
76
|
var _usePeopleAndTeamAnal = (0, _analytics.usePeopleAndTeamAnalytics)(),
|
|
76
77
|
fireOperationalEvent = _usePeopleAndTeamAnal.fireOperationalEvent,
|
|
77
78
|
fireTrackEvent = _usePeopleAndTeamAnal.fireTrackEvent;
|
|
@@ -92,8 +93,11 @@ var TeamContainers = exports.TeamContainers = function TeamContainers(_ref) {
|
|
|
92
93
|
}, [isDisplayedOnProfileCard, filterContainerId, teamContainers]);
|
|
93
94
|
(0, _react.useEffect)(function () {
|
|
94
95
|
if (filteredTeamContainers.length > MAX_NUMBER_OF_CONTAINERS_TO_SHOW || isDisplayedOnProfileCard) {
|
|
95
|
-
|
|
96
|
-
|
|
96
|
+
setShowAddContainer({
|
|
97
|
+
Jira: false,
|
|
98
|
+
Confluence: false,
|
|
99
|
+
Loom: false
|
|
100
|
+
});
|
|
97
101
|
} else {
|
|
98
102
|
var hasJiraProject = filteredTeamContainers.some(function (container) {
|
|
99
103
|
return container.type === 'JiraProject';
|
|
@@ -101,8 +105,14 @@ var TeamContainers = exports.TeamContainers = function TeamContainers(_ref) {
|
|
|
101
105
|
var hasConfluenceSpace = filteredTeamContainers.some(function (container) {
|
|
102
106
|
return container.type === 'ConfluenceSpace';
|
|
103
107
|
});
|
|
104
|
-
|
|
105
|
-
|
|
108
|
+
var hasLoomSpace = filteredTeamContainers.some(function (container) {
|
|
109
|
+
return container.type === 'LoomSpace';
|
|
110
|
+
});
|
|
111
|
+
setShowAddContainer({
|
|
112
|
+
Jira: !hasJiraProject && !!productPermissions && !!(0, _controllers.hasProductPermission)(productPermissions, 'jira'),
|
|
113
|
+
Confluence: !hasConfluenceSpace && !!productPermissions && !!(0, _controllers.hasProductPermission)(productPermissions, 'confluence'),
|
|
114
|
+
Loom: !hasLoomSpace && !!productPermissions && !!(0, _controllers.hasProductPermission)(productPermissions, 'loom')
|
|
115
|
+
});
|
|
106
116
|
}
|
|
107
117
|
}, [isDisplayedOnProfileCard, productPermissions, filteredTeamContainers]);
|
|
108
118
|
var handleShowMore = function handleShowMore() {
|
|
@@ -167,7 +177,7 @@ var TeamContainers = exports.TeamContainers = function TeamContainers(_ref) {
|
|
|
167
177
|
numberOfContainers: MAX_NUMBER_OF_CONTAINERS_TO_SHOW
|
|
168
178
|
});
|
|
169
179
|
}
|
|
170
|
-
if (filteredTeamContainers.length === 0 && !isDisplayedOnProfileCard && (!productPermissions || !(productPermissions && ((0, _controllers.hasProductPermission)(productPermissions, 'jira') || (0, _controllers.hasProductPermission)(productPermissions, 'confluence'))))) {
|
|
180
|
+
if (filteredTeamContainers.length === 0 && !isDisplayedOnProfileCard && (!productPermissions || !(productPermissions && ((0, _controllers.hasProductPermission)(productPermissions, 'jira') || (0, _controllers.hasProductPermission)(productPermissions, 'confluence') || (0, _controllers.hasProductPermission)(productPermissions, 'loom'))))) {
|
|
171
181
|
return /*#__PURE__*/_react.default.createElement(_noProductAccessEmptyState.NoProductAccessState, null);
|
|
172
182
|
}
|
|
173
183
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_primitives.Stack, {
|
|
@@ -192,16 +202,21 @@ var TeamContainers = exports.TeamContainers = function TeamContainers(_ref) {
|
|
|
192
202
|
});
|
|
193
203
|
}
|
|
194
204
|
});
|
|
195
|
-
}),
|
|
205
|
+
}), showAddContainer.Jira && /*#__PURE__*/_react.default.createElement(_addContainerCard.AddContainerCard, {
|
|
196
206
|
onAddAContainerClick: function onAddAContainerClick(e) {
|
|
197
207
|
return _onAddAContainerClick(e, 'Jira');
|
|
198
208
|
},
|
|
199
209
|
containerType: "JiraProject"
|
|
200
|
-
}),
|
|
210
|
+
}), showAddContainer.Confluence && /*#__PURE__*/_react.default.createElement(_addContainerCard.AddContainerCard, {
|
|
201
211
|
onAddAContainerClick: function onAddAContainerClick(e) {
|
|
202
212
|
return _onAddAContainerClick(e, 'Confluence');
|
|
203
213
|
},
|
|
204
214
|
containerType: "ConfluenceSpace"
|
|
215
|
+
}), showAddContainer.Loom && (0, _platformFeatureFlags.fg)('loom_tab_in_container_linker_team_profile_page') && /*#__PURE__*/_react.default.createElement(_addContainerCard.AddContainerCard, {
|
|
216
|
+
onAddAContainerClick: function onAddAContainerClick(e) {
|
|
217
|
+
return _onAddAContainerClick(e, 'Loom');
|
|
218
|
+
},
|
|
219
|
+
containerType: "LoomSpace"
|
|
205
220
|
}), showMore && filteredTeamContainers.slice(MAX_NUMBER_OF_CONTAINERS_TO_SHOW).map(function (container) {
|
|
206
221
|
return /*#__PURE__*/_react.default.createElement(LinkedContainerCardComponent, {
|
|
207
222
|
key: container.id,
|
|
@@ -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="#1868DB"/>
|
|
3
|
+
<path d="M9.54165 5.60611H7.47038L9.26419 4.57045L8.87026 3.88794L7.07645 4.9236L8.11187 3.12992L7.42936 2.73576L6.39393 4.52943V2.45831H5.60602V4.52963L4.5702 2.73576L3.8879 3.12973L4.92353 4.9234L3.12971 3.88794L2.73575 4.57025L4.52957 5.60591H2.45831V6.39385H4.52937L2.73575 7.42951L3.12971 8.11202L4.92333 7.07656L3.8877 8.87023L4.5702 9.26419L5.60582 7.47034V9.54165H6.39374V7.47053L7.42917 9.26419L8.11165 8.87023L7.07603 7.07637L8.86985 8.11202L9.26382 7.42951L7.47019 6.39404H9.54123V5.60611H9.54165ZM5.99998 7.07159C5.40587 7.07159 4.92432 6.59005 4.92432 5.99592C4.92432 5.40179 5.40587 4.92023 5.99998 4.92023C6.59409 4.92023 7.07562 5.40179 7.07562 5.99592C7.07562 6.59005 6.59409 7.07159 5.99998 7.07159Z" fill="white"/>
|
|
4
|
+
</svg>
|
|
@@ -10,6 +10,7 @@ import ConfluenceIcon from '../assets/ConfluenceIcon.svg';
|
|
|
10
10
|
import JiraIcon from '../assets/JiraIcon.svg';
|
|
11
11
|
import JiraProjectDiscovery from '../assets/JiraProjectDiscovery.svg';
|
|
12
12
|
import JiraServiceManagement from '../assets/JiraServiceManagement.svg';
|
|
13
|
+
import LoomIcon from '../assets/LoomIcon.svg';
|
|
13
14
|
const styles = {
|
|
14
15
|
iconWrapper: "_1bsb1crf _4t3i1crf",
|
|
15
16
|
mediumIconWrapper: "_1bsb7vkz _4t3i7vkz"
|
|
@@ -25,6 +26,16 @@ export const messages = defineMessages({
|
|
|
25
26
|
defaultMessage: 'Confluence',
|
|
26
27
|
description: 'Description of the card to add a Confluence space to a team'
|
|
27
28
|
},
|
|
29
|
+
addLoomContainerTitle: {
|
|
30
|
+
id: 'ptc-directory.team-profile-page.team-containers.add-loom-space-title.non-final',
|
|
31
|
+
defaultMessage: 'Add space',
|
|
32
|
+
description: 'Title of the card to add a Loom space to a team'
|
|
33
|
+
},
|
|
34
|
+
confluenceLoomDescription: {
|
|
35
|
+
id: 'ptc-directory.team-profile-page.team-containers.add-loom-space-description.non-final',
|
|
36
|
+
defaultMessage: 'Loom',
|
|
37
|
+
description: 'Description of the card to add a Loom space to a team'
|
|
38
|
+
},
|
|
28
39
|
addJiraProjectTitle: {
|
|
29
40
|
id: 'ptc-directory.team-profile-page.team-containers.add-jira-project-title.non-final',
|
|
30
41
|
defaultMessage: 'Add project',
|
|
@@ -114,6 +125,19 @@ export const getContainerProperties = (containerType, iconSize = 'small', contai
|
|
|
114
125
|
alt: "",
|
|
115
126
|
testId: "confluence-space-container-icon"
|
|
116
127
|
})),
|
|
128
|
+
title: /*#__PURE__*/React.createElement(FormattedMessage, messages.addLoomContainerTitle),
|
|
129
|
+
containerTypeText: /*#__PURE__*/React.createElement(FormattedMessage, messages.spaceContainerText)
|
|
130
|
+
};
|
|
131
|
+
case 'LoomSpace':
|
|
132
|
+
return {
|
|
133
|
+
description: /*#__PURE__*/React.createElement(FormattedMessage, messages.loomSpaceDescription),
|
|
134
|
+
icon: /*#__PURE__*/React.createElement(Comp, {
|
|
135
|
+
xcss: iconSize === 'medium' ? styles.mediumIconWrapper : styles.iconWrapper
|
|
136
|
+
}, /*#__PURE__*/React.createElement(Image, {
|
|
137
|
+
src: LoomIcon,
|
|
138
|
+
alt: "",
|
|
139
|
+
testId: "confluence-space-container-icon"
|
|
140
|
+
})),
|
|
117
141
|
title: /*#__PURE__*/React.createElement(FormattedMessage, messages.addConfluenceContainerTitle),
|
|
118
142
|
containerTypeText: /*#__PURE__*/React.createElement(FormattedMessage, messages.spaceContainerText)
|
|
119
143
|
};
|
|
@@ -3,6 +3,7 @@ import { defineMessages, FormattedMessage } from 'react-intl-next';
|
|
|
3
3
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
4
4
|
import Button from '@atlaskit/button/new';
|
|
5
5
|
import ModalTransition from '@atlaskit/modal-dialog/modal-transition';
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
7
|
import { Grid, Inline, Stack } from '@atlaskit/primitives';
|
|
7
8
|
import { N0, N90 } from '@atlaskit/theme/colors';
|
|
8
9
|
import { AnalyticsAction, usePeopleAndTeamAnalytics } from '../../common/utils/analytics';
|
|
@@ -35,12 +36,15 @@ export const TeamContainers = ({
|
|
|
35
36
|
unlinkError
|
|
36
37
|
} = useTeamContainers(teamId);
|
|
37
38
|
const [_, actions] = useTeamContainersHook();
|
|
38
|
-
const [showAddJiraContainer, setShowAddJiraContainer] = useState(false);
|
|
39
|
-
const [showAddConfluenceContainer, setShowAddConfluenceContainer] = useState(false);
|
|
40
39
|
const [showMore, setShowMore] = useState(false);
|
|
41
40
|
const [isDisconnectDialogOpen, setIsDisconnectDialogOpen] = useState(false);
|
|
42
41
|
const [selectedContainerDetails, setSelectedContainerDetails] = useState();
|
|
43
42
|
const [filteredTeamContainers, setFilteredTeamContainers] = useState(teamContainers);
|
|
43
|
+
const [showAddContainer, setShowAddContainer] = useState({
|
|
44
|
+
Jira: false,
|
|
45
|
+
Confluence: false,
|
|
46
|
+
Loom: false
|
|
47
|
+
});
|
|
44
48
|
const {
|
|
45
49
|
fireOperationalEvent,
|
|
46
50
|
fireTrackEvent
|
|
@@ -61,13 +65,20 @@ export const TeamContainers = ({
|
|
|
61
65
|
}, [isDisplayedOnProfileCard, filterContainerId, teamContainers]);
|
|
62
66
|
useEffect(() => {
|
|
63
67
|
if (filteredTeamContainers.length > MAX_NUMBER_OF_CONTAINERS_TO_SHOW || isDisplayedOnProfileCard) {
|
|
64
|
-
|
|
65
|
-
|
|
68
|
+
setShowAddContainer({
|
|
69
|
+
Jira: false,
|
|
70
|
+
Confluence: false,
|
|
71
|
+
Loom: false
|
|
72
|
+
});
|
|
66
73
|
} else {
|
|
67
74
|
const hasJiraProject = filteredTeamContainers.some(container => container.type === 'JiraProject');
|
|
68
75
|
const hasConfluenceSpace = filteredTeamContainers.some(container => container.type === 'ConfluenceSpace');
|
|
69
|
-
|
|
70
|
-
|
|
76
|
+
const hasLoomSpace = filteredTeamContainers.some(container => container.type === 'LoomSpace');
|
|
77
|
+
setShowAddContainer({
|
|
78
|
+
Jira: !hasJiraProject && !!productPermissions && !!hasProductPermission(productPermissions, 'jira'),
|
|
79
|
+
Confluence: !hasConfluenceSpace && !!productPermissions && !!hasProductPermission(productPermissions, 'confluence'),
|
|
80
|
+
Loom: !hasLoomSpace && !!productPermissions && !!hasProductPermission(productPermissions, 'loom')
|
|
81
|
+
});
|
|
71
82
|
}
|
|
72
83
|
}, [isDisplayedOnProfileCard, productPermissions, filteredTeamContainers]);
|
|
73
84
|
const handleShowMore = () => {
|
|
@@ -114,7 +125,7 @@ export const TeamContainers = ({
|
|
|
114
125
|
numberOfContainers: MAX_NUMBER_OF_CONTAINERS_TO_SHOW
|
|
115
126
|
});
|
|
116
127
|
}
|
|
117
|
-
if (filteredTeamContainers.length === 0 && !isDisplayedOnProfileCard && (!productPermissions || !(productPermissions && (hasProductPermission(productPermissions, 'jira') || hasProductPermission(productPermissions, 'confluence'))))) {
|
|
128
|
+
if (filteredTeamContainers.length === 0 && !isDisplayedOnProfileCard && (!productPermissions || !(productPermissions && (hasProductPermission(productPermissions, 'jira') || hasProductPermission(productPermissions, 'confluence') || hasProductPermission(productPermissions, 'loom'))))) {
|
|
118
129
|
return /*#__PURE__*/React.createElement(NoProductAccessState, null);
|
|
119
130
|
}
|
|
120
131
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Stack, {
|
|
@@ -137,12 +148,15 @@ export const TeamContainers = ({
|
|
|
137
148
|
containerName: container.name
|
|
138
149
|
})
|
|
139
150
|
});
|
|
140
|
-
}),
|
|
151
|
+
}), showAddContainer.Jira && /*#__PURE__*/React.createElement(AddContainerCard, {
|
|
141
152
|
onAddAContainerClick: e => onAddAContainerClick(e, 'Jira'),
|
|
142
153
|
containerType: "JiraProject"
|
|
143
|
-
}),
|
|
154
|
+
}), showAddContainer.Confluence && /*#__PURE__*/React.createElement(AddContainerCard, {
|
|
144
155
|
onAddAContainerClick: e => onAddAContainerClick(e, 'Confluence'),
|
|
145
156
|
containerType: "ConfluenceSpace"
|
|
157
|
+
}), showAddContainer.Loom && fg('loom_tab_in_container_linker_team_profile_page') && /*#__PURE__*/React.createElement(AddContainerCard, {
|
|
158
|
+
onAddAContainerClick: e => onAddAContainerClick(e, 'Loom'),
|
|
159
|
+
containerType: "LoomSpace"
|
|
146
160
|
}), showMore && filteredTeamContainers.slice(MAX_NUMBER_OF_CONTAINERS_TO_SHOW).map(container => {
|
|
147
161
|
return /*#__PURE__*/React.createElement(LinkedContainerCardComponent, {
|
|
148
162
|
key: container.id,
|
|
@@ -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="#1868DB"/>
|
|
3
|
+
<path d="M9.54165 5.60611H7.47038L9.26419 4.57045L8.87026 3.88794L7.07645 4.9236L8.11187 3.12992L7.42936 2.73576L6.39393 4.52943V2.45831H5.60602V4.52963L4.5702 2.73576L3.8879 3.12973L4.92353 4.9234L3.12971 3.88794L2.73575 4.57025L4.52957 5.60591H2.45831V6.39385H4.52937L2.73575 7.42951L3.12971 8.11202L4.92333 7.07656L3.8877 8.87023L4.5702 9.26419L5.60582 7.47034V9.54165H6.39374V7.47053L7.42917 9.26419L8.11165 8.87023L7.07603 7.07637L8.86985 8.11202L9.26382 7.42951L7.47019 6.39404H9.54123V5.60611H9.54165ZM5.99998 7.07159C5.40587 7.07159 4.92432 6.59005 4.92432 5.99592C4.92432 5.40179 5.40587 4.92023 5.99998 4.92023C6.59409 4.92023 7.07562 5.40179 7.07562 5.99592C7.07562 6.59005 6.59409 7.07159 5.99998 7.07159Z" fill="white"/>
|
|
4
|
+
</svg>
|
|
@@ -13,6 +13,7 @@ import ConfluenceIcon from '../assets/ConfluenceIcon.svg';
|
|
|
13
13
|
import JiraIcon from '../assets/JiraIcon.svg';
|
|
14
14
|
import JiraProjectDiscovery from '../assets/JiraProjectDiscovery.svg';
|
|
15
15
|
import JiraServiceManagement from '../assets/JiraServiceManagement.svg';
|
|
16
|
+
import LoomIcon from '../assets/LoomIcon.svg';
|
|
16
17
|
var styles = {
|
|
17
18
|
iconWrapper: "_1bsb1crf _4t3i1crf",
|
|
18
19
|
mediumIconWrapper: "_1bsb7vkz _4t3i7vkz"
|
|
@@ -28,6 +29,16 @@ export var messages = defineMessages({
|
|
|
28
29
|
defaultMessage: 'Confluence',
|
|
29
30
|
description: 'Description of the card to add a Confluence space to a team'
|
|
30
31
|
},
|
|
32
|
+
addLoomContainerTitle: {
|
|
33
|
+
id: 'ptc-directory.team-profile-page.team-containers.add-loom-space-title.non-final',
|
|
34
|
+
defaultMessage: 'Add space',
|
|
35
|
+
description: 'Title of the card to add a Loom space to a team'
|
|
36
|
+
},
|
|
37
|
+
confluenceLoomDescription: {
|
|
38
|
+
id: 'ptc-directory.team-profile-page.team-containers.add-loom-space-description.non-final',
|
|
39
|
+
defaultMessage: 'Loom',
|
|
40
|
+
description: 'Description of the card to add a Loom space to a team'
|
|
41
|
+
},
|
|
31
42
|
addJiraProjectTitle: {
|
|
32
43
|
id: 'ptc-directory.team-profile-page.team-containers.add-jira-project-title.non-final',
|
|
33
44
|
defaultMessage: 'Add project',
|
|
@@ -117,6 +128,19 @@ export var getContainerProperties = function getContainerProperties(containerTyp
|
|
|
117
128
|
alt: "",
|
|
118
129
|
testId: "confluence-space-container-icon"
|
|
119
130
|
})),
|
|
131
|
+
title: /*#__PURE__*/React.createElement(FormattedMessage, messages.addLoomContainerTitle),
|
|
132
|
+
containerTypeText: /*#__PURE__*/React.createElement(FormattedMessage, messages.spaceContainerText)
|
|
133
|
+
};
|
|
134
|
+
case 'LoomSpace':
|
|
135
|
+
return {
|
|
136
|
+
description: /*#__PURE__*/React.createElement(FormattedMessage, messages.loomSpaceDescription),
|
|
137
|
+
icon: /*#__PURE__*/React.createElement(Comp, {
|
|
138
|
+
xcss: iconSize === 'medium' ? styles.mediumIconWrapper : styles.iconWrapper
|
|
139
|
+
}, /*#__PURE__*/React.createElement(Image, {
|
|
140
|
+
src: LoomIcon,
|
|
141
|
+
alt: "",
|
|
142
|
+
testId: "confluence-space-container-icon"
|
|
143
|
+
})),
|
|
120
144
|
title: /*#__PURE__*/React.createElement(FormattedMessage, messages.addConfluenceContainerTitle),
|
|
121
145
|
containerTypeText: /*#__PURE__*/React.createElement(FormattedMessage, messages.spaceContainerText)
|
|
122
146
|
};
|
|
@@ -6,6 +6,7 @@ import { defineMessages, FormattedMessage } from 'react-intl-next';
|
|
|
6
6
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
7
7
|
import Button from '@atlaskit/button/new';
|
|
8
8
|
import ModalTransition from '@atlaskit/modal-dialog/modal-transition';
|
|
9
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
10
|
import { Grid, Inline, Stack } from '@atlaskit/primitives';
|
|
10
11
|
import { N0, N90 } from '@atlaskit/theme/colors';
|
|
11
12
|
import { AnalyticsAction, usePeopleAndTeamAnalytics } from '../../common/utils/analytics';
|
|
@@ -40,28 +41,28 @@ export var TeamContainers = function TeamContainers(_ref) {
|
|
|
40
41
|
actions = _useTeamContainersHoo2[1];
|
|
41
42
|
var _useState = useState(false),
|
|
42
43
|
_useState2 = _slicedToArray(_useState, 2),
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
showMore = _useState2[0],
|
|
45
|
+
setShowMore = _useState2[1];
|
|
45
46
|
var _useState3 = useState(false),
|
|
46
47
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
var _useState5 = useState(
|
|
48
|
+
isDisconnectDialogOpen = _useState4[0],
|
|
49
|
+
setIsDisconnectDialogOpen = _useState4[1];
|
|
50
|
+
var _useState5 = useState(),
|
|
50
51
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
var _useState7 = useState(
|
|
52
|
+
selectedContainerDetails = _useState6[0],
|
|
53
|
+
setSelectedContainerDetails = _useState6[1];
|
|
54
|
+
var _useState7 = useState(teamContainers),
|
|
54
55
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
var _useState9 = useState(
|
|
56
|
+
filteredTeamContainers = _useState8[0],
|
|
57
|
+
setFilteredTeamContainers = _useState8[1];
|
|
58
|
+
var _useState9 = useState({
|
|
59
|
+
Jira: false,
|
|
60
|
+
Confluence: false,
|
|
61
|
+
Loom: false
|
|
62
|
+
}),
|
|
58
63
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
var _useState11 = useState(teamContainers),
|
|
62
|
-
_useState12 = _slicedToArray(_useState11, 2),
|
|
63
|
-
filteredTeamContainers = _useState12[0],
|
|
64
|
-
setFilteredTeamContainers = _useState12[1];
|
|
64
|
+
showAddContainer = _useState10[0],
|
|
65
|
+
setShowAddContainer = _useState10[1];
|
|
65
66
|
var _usePeopleAndTeamAnal = usePeopleAndTeamAnalytics(),
|
|
66
67
|
fireOperationalEvent = _usePeopleAndTeamAnal.fireOperationalEvent,
|
|
67
68
|
fireTrackEvent = _usePeopleAndTeamAnal.fireTrackEvent;
|
|
@@ -82,8 +83,11 @@ export var TeamContainers = function TeamContainers(_ref) {
|
|
|
82
83
|
}, [isDisplayedOnProfileCard, filterContainerId, teamContainers]);
|
|
83
84
|
useEffect(function () {
|
|
84
85
|
if (filteredTeamContainers.length > MAX_NUMBER_OF_CONTAINERS_TO_SHOW || isDisplayedOnProfileCard) {
|
|
85
|
-
|
|
86
|
-
|
|
86
|
+
setShowAddContainer({
|
|
87
|
+
Jira: false,
|
|
88
|
+
Confluence: false,
|
|
89
|
+
Loom: false
|
|
90
|
+
});
|
|
87
91
|
} else {
|
|
88
92
|
var hasJiraProject = filteredTeamContainers.some(function (container) {
|
|
89
93
|
return container.type === 'JiraProject';
|
|
@@ -91,8 +95,14 @@ export var TeamContainers = function TeamContainers(_ref) {
|
|
|
91
95
|
var hasConfluenceSpace = filteredTeamContainers.some(function (container) {
|
|
92
96
|
return container.type === 'ConfluenceSpace';
|
|
93
97
|
});
|
|
94
|
-
|
|
95
|
-
|
|
98
|
+
var hasLoomSpace = filteredTeamContainers.some(function (container) {
|
|
99
|
+
return container.type === 'LoomSpace';
|
|
100
|
+
});
|
|
101
|
+
setShowAddContainer({
|
|
102
|
+
Jira: !hasJiraProject && !!productPermissions && !!hasProductPermission(productPermissions, 'jira'),
|
|
103
|
+
Confluence: !hasConfluenceSpace && !!productPermissions && !!hasProductPermission(productPermissions, 'confluence'),
|
|
104
|
+
Loom: !hasLoomSpace && !!productPermissions && !!hasProductPermission(productPermissions, 'loom')
|
|
105
|
+
});
|
|
96
106
|
}
|
|
97
107
|
}, [isDisplayedOnProfileCard, productPermissions, filteredTeamContainers]);
|
|
98
108
|
var handleShowMore = function handleShowMore() {
|
|
@@ -157,7 +167,7 @@ export var TeamContainers = function TeamContainers(_ref) {
|
|
|
157
167
|
numberOfContainers: MAX_NUMBER_OF_CONTAINERS_TO_SHOW
|
|
158
168
|
});
|
|
159
169
|
}
|
|
160
|
-
if (filteredTeamContainers.length === 0 && !isDisplayedOnProfileCard && (!productPermissions || !(productPermissions && (hasProductPermission(productPermissions, 'jira') || hasProductPermission(productPermissions, 'confluence'))))) {
|
|
170
|
+
if (filteredTeamContainers.length === 0 && !isDisplayedOnProfileCard && (!productPermissions || !(productPermissions && (hasProductPermission(productPermissions, 'jira') || hasProductPermission(productPermissions, 'confluence') || hasProductPermission(productPermissions, 'loom'))))) {
|
|
161
171
|
return /*#__PURE__*/React.createElement(NoProductAccessState, null);
|
|
162
172
|
}
|
|
163
173
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Stack, {
|
|
@@ -182,16 +192,21 @@ export var TeamContainers = function TeamContainers(_ref) {
|
|
|
182
192
|
});
|
|
183
193
|
}
|
|
184
194
|
});
|
|
185
|
-
}),
|
|
195
|
+
}), showAddContainer.Jira && /*#__PURE__*/React.createElement(AddContainerCard, {
|
|
186
196
|
onAddAContainerClick: function onAddAContainerClick(e) {
|
|
187
197
|
return _onAddAContainerClick(e, 'Jira');
|
|
188
198
|
},
|
|
189
199
|
containerType: "JiraProject"
|
|
190
|
-
}),
|
|
200
|
+
}), showAddContainer.Confluence && /*#__PURE__*/React.createElement(AddContainerCard, {
|
|
191
201
|
onAddAContainerClick: function onAddAContainerClick(e) {
|
|
192
202
|
return _onAddAContainerClick(e, 'Confluence');
|
|
193
203
|
},
|
|
194
204
|
containerType: "ConfluenceSpace"
|
|
205
|
+
}), showAddContainer.Loom && fg('loom_tab_in_container_linker_team_profile_page') && /*#__PURE__*/React.createElement(AddContainerCard, {
|
|
206
|
+
onAddAContainerClick: function onAddAContainerClick(e) {
|
|
207
|
+
return _onAddAContainerClick(e, 'Loom');
|
|
208
|
+
},
|
|
209
|
+
containerType: "LoomSpace"
|
|
195
210
|
}), showMore && filteredTeamContainers.slice(MAX_NUMBER_OF_CONTAINERS_TO_SHOW).map(function (container) {
|
|
196
211
|
return /*#__PURE__*/React.createElement(LinkedContainerCardComponent, {
|
|
197
212
|
key: container.id,
|
|
@@ -18,6 +18,16 @@ export declare const messages: {
|
|
|
18
18
|
defaultMessage: string;
|
|
19
19
|
description: string;
|
|
20
20
|
};
|
|
21
|
+
addLoomContainerTitle: {
|
|
22
|
+
id: string;
|
|
23
|
+
defaultMessage: string;
|
|
24
|
+
description: string;
|
|
25
|
+
};
|
|
26
|
+
confluenceLoomDescription: {
|
|
27
|
+
id: string;
|
|
28
|
+
defaultMessage: string;
|
|
29
|
+
description: string;
|
|
30
|
+
};
|
|
21
31
|
addJiraProjectTitle: {
|
|
22
32
|
id: string;
|
|
23
33
|
defaultMessage: string;
|
|
@@ -9,7 +9,7 @@ export interface TeamContainerProps {
|
|
|
9
9
|
/**
|
|
10
10
|
* The function to call when the add a container button is clicked
|
|
11
11
|
*/
|
|
12
|
-
onAddAContainerClick: (e: React.MouseEvent<HTMLButtonElement>, containerType: 'Confluence' | 'Jira') => void;
|
|
12
|
+
onAddAContainerClick: (e: React.MouseEvent<HTMLButtonElement>, containerType: 'Confluence' | 'Jira' | 'Loom') => void;
|
|
13
13
|
/**
|
|
14
14
|
* The component to replace current components
|
|
15
15
|
*/
|
|
@@ -18,6 +18,16 @@ export declare const messages: {
|
|
|
18
18
|
defaultMessage: string;
|
|
19
19
|
description: string;
|
|
20
20
|
};
|
|
21
|
+
addLoomContainerTitle: {
|
|
22
|
+
id: string;
|
|
23
|
+
defaultMessage: string;
|
|
24
|
+
description: string;
|
|
25
|
+
};
|
|
26
|
+
confluenceLoomDescription: {
|
|
27
|
+
id: string;
|
|
28
|
+
defaultMessage: string;
|
|
29
|
+
description: string;
|
|
30
|
+
};
|
|
21
31
|
addJiraProjectTitle: {
|
|
22
32
|
id: string;
|
|
23
33
|
defaultMessage: string;
|
|
@@ -9,7 +9,7 @@ export interface TeamContainerProps {
|
|
|
9
9
|
/**
|
|
10
10
|
* The function to call when the add a container button is clicked
|
|
11
11
|
*/
|
|
12
|
-
onAddAContainerClick: (e: React.MouseEvent<HTMLButtonElement>, containerType: 'Confluence' | 'Jira') => void;
|
|
12
|
+
onAddAContainerClick: (e: React.MouseEvent<HTMLButtonElement>, containerType: 'Confluence' | 'Jira' | 'Loom') => void;
|
|
13
13
|
/**
|
|
14
14
|
* The component to replace current components
|
|
15
15
|
*/
|
package/package.json
CHANGED
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@atlaskit/button": "^23.0.0",
|
|
35
35
|
"@atlaskit/css": "^0.10.0",
|
|
36
36
|
"@atlaskit/heading": "^5.2.0",
|
|
37
|
-
"@atlaskit/icon": "^
|
|
37
|
+
"@atlaskit/icon": "^26.0.0",
|
|
38
38
|
"@atlaskit/image": "^3.0.0",
|
|
39
39
|
"@atlaskit/link": "^3.1.0",
|
|
40
40
|
"@atlaskit/logo": "^18.0.0",
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
}
|
|
108
108
|
},
|
|
109
109
|
"name": "@atlaskit/teams-public",
|
|
110
|
-
"version": "0.
|
|
110
|
+
"version": "0.27.1",
|
|
111
111
|
"description": "Public components related to teams",
|
|
112
112
|
"author": "Atlassian Pty Ltd",
|
|
113
113
|
"license": "Apache-2.0",
|
|
@@ -120,6 +120,9 @@
|
|
|
120
120
|
"platform-feature-flags": {
|
|
121
121
|
"enable_card_alignment_fix": {
|
|
122
122
|
"type": "boolean"
|
|
123
|
+
},
|
|
124
|
+
"loom_tab_in_container_linker_team_profile_page": {
|
|
125
|
+
"type": "boolean"
|
|
123
126
|
}
|
|
124
127
|
}
|
|
125
128
|
}
|