@atlaskit/teams-public 0.67.2 → 0.68.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.
- package/CHANGELOG.md +11 -0
- package/dist/cjs/common/utils/get-container-properties.compiled.css +3 -3
- package/dist/cjs/common/utils/get-container-properties.js +21 -78
- package/dist/es2019/common/utils/get-container-properties.compiled.css +3 -3
- package/dist/es2019/common/utils/get-container-properties.js +21 -78
- package/dist/esm/common/utils/get-container-properties.compiled.css +3 -3
- package/dist/esm/common/utils/get-container-properties.js +21 -78
- package/dist/types/common/utils/get-container-properties.d.ts +0 -35
- package/dist/types-ts4.5/common/utils/get-container-properties.d.ts +0 -35
- package/package.json +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @atlaskit/teams-public
|
|
2
2
|
|
|
3
|
+
## 0.68.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`daa158d9edf95`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/daa158d9edf95) -
|
|
8
|
+
Updated team container properties icon sizing
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
3
14
|
## 0.67.2
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
|
|
2
2
|
._2rko1eiz{border-radius:var(--ds-radius-small,6px)}
|
|
3
|
-
._2rkofajl{border-radius:var(--ds-radius-small,3px)}
|
|
3
|
+
._2rkofajl{border-radius:var(--ds-radius-small,3px)}
|
|
4
|
+
._195gidpf{margin-inline:0}
|
|
5
|
+
._1mouidpf{margin-block:0}._12ji1l7x{outline-color:var(--ds-border,#0b120e24)}
|
|
4
6
|
._18u0v77o{margin-left:var(--ds-space-025,2px)}
|
|
5
7
|
._19pkv77o{margin-top:var(--ds-space-025,2px)}
|
|
6
8
|
._1bah1h6o{justify-content:center}
|
|
7
|
-
._1bsb1crf{width:9pt}
|
|
8
9
|
._1bsb1tcg{width:24px}
|
|
9
10
|
._1bsb7vkz{width:1pc}
|
|
10
11
|
._1e0c1txw{display:flex}
|
|
11
12
|
._1qu2nqa1{outline-style:solid}
|
|
12
13
|
._2hwxv77o{margin-right:var(--ds-space-025,2px)}
|
|
13
14
|
._4cvr1h6o{align-items:center}
|
|
14
|
-
._4t3i1crf{height:9pt}
|
|
15
15
|
._4t3i1tcg{height:24px}
|
|
16
16
|
._4t3i7vkz{height:1pc}
|
|
17
17
|
._bfhki8nm{background-color:var(--ds-background-neutral,#0515240f)}
|
|
@@ -12,24 +12,23 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
12
12
|
var _react = _interopRequireDefault(require("react"));
|
|
13
13
|
var _reactIntlNext = require("react-intl-next");
|
|
14
14
|
var _css = require("@atlaskit/css");
|
|
15
|
-
var _featureGateJsClient = _interopRequireDefault(require("@atlaskit/feature-gate-js-client"));
|
|
16
15
|
var _link = _interopRequireDefault(require("@atlaskit/icon/core/link"));
|
|
17
16
|
var _linkExternal = _interopRequireDefault(require("@atlaskit/icon/core/link-external"));
|
|
18
17
|
var _image = _interopRequireDefault(require("@atlaskit/image"));
|
|
18
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
19
19
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
20
20
|
var _ConfluenceIcon = _interopRequireDefault(require("../assets/ConfluenceIcon.svg"));
|
|
21
21
|
var _JiraIcon = _interopRequireDefault(require("../assets/JiraIcon.svg"));
|
|
22
22
|
var _JiraProjectDiscovery = _interopRequireDefault(require("../assets/JiraProjectDiscovery.svg"));
|
|
23
23
|
var _JiraServiceManagement = _interopRequireDefault(require("../assets/JiraServiceManagement.svg"));
|
|
24
24
|
var _LoomIcon = _interopRequireDefault(require("../assets/LoomIcon.svg"));
|
|
25
|
-
var _getIsExperimentEnabled = require("./get-is-experiment-enabled");
|
|
26
25
|
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; }
|
|
27
26
|
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; }
|
|
28
27
|
var styles = {
|
|
29
|
-
iconWrapper: "_1bsb1crf _4t3i1crf",
|
|
30
28
|
avatarWrapper: "_1bsb1tcg _4t3i1tcg",
|
|
31
29
|
avatarMargin: "_19pkv77o _2hwxv77o _otyrv77o _18u0v77o",
|
|
32
|
-
|
|
30
|
+
smallAvatarWrapper: "_1bsb7vkz _4t3i7vkz",
|
|
31
|
+
smallAvatarMargin: "_195gidpf _1mouidpf",
|
|
33
32
|
linkIconWrapper: "_2rkofajl _1bsb7vkz _4t3i7vkz _1e0c1txw _4cvr1h6o _1bah1h6o _12ji1l7x _1qu2nqa1",
|
|
34
33
|
linkAvatarWrapper: "_2rko1eiz _1bsb1tcg _4t3i1tcg _1e0c1txw _4cvr1h6o _1bah1h6o _bfhki8nm"
|
|
35
34
|
};
|
|
@@ -39,36 +38,16 @@ var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
|
|
|
39
38
|
defaultMessage: 'Add space',
|
|
40
39
|
description: 'Title of the card to add a Confluence space to a team'
|
|
41
40
|
},
|
|
42
|
-
addConfluenceSpace: {
|
|
43
|
-
id: 'ptc-directory.team-profile-page.team-containers.add-confluence-space',
|
|
44
|
-
defaultMessage: 'Add Confluence Space',
|
|
45
|
-
description: 'Title of the card to add a Confluence space to a team'
|
|
46
|
-
},
|
|
47
41
|
confluenceContainerDescription: {
|
|
48
42
|
id: 'ptc-directory.team-profile-page.team-containers.add-confluence-space-description',
|
|
49
43
|
defaultMessage: 'Confluence',
|
|
50
44
|
description: 'Description of the card to add a Confluence space to a team'
|
|
51
45
|
},
|
|
52
|
-
addLoomContainerTitle: {
|
|
53
|
-
id: 'ptc-directory.team-profile-page.team-containers.add-loom-space-title',
|
|
54
|
-
defaultMessage: 'Add space',
|
|
55
|
-
description: 'Title of the card to add a Loom space to a team'
|
|
56
|
-
},
|
|
57
46
|
addLoomSpace: {
|
|
58
47
|
id: 'ptc-directory.team-profile-page.team-containers.add-loom-space',
|
|
59
48
|
defaultMessage: 'Add Loom Space',
|
|
60
49
|
description: 'Title of the card to add a Loom space to a team'
|
|
61
50
|
},
|
|
62
|
-
confluenceLoomDescription: {
|
|
63
|
-
id: 'ptc-directory.team-profile-page.team-containers.add-loom-space-description',
|
|
64
|
-
defaultMessage: 'Loom',
|
|
65
|
-
description: 'Description of the card to add a Loom space to a team'
|
|
66
|
-
},
|
|
67
|
-
addJiraProjectTitle: {
|
|
68
|
-
id: 'ptc-directory.team-profile-page.team-containers.add-jira-project-title',
|
|
69
|
-
defaultMessage: 'Add project',
|
|
70
|
-
description: 'Title of the card to add a Jira project to a team'
|
|
71
|
-
},
|
|
72
51
|
addJiraProject: {
|
|
73
52
|
id: 'ptc-directory.team-profile-page.team-containers.add-jira-project',
|
|
74
53
|
defaultMessage: 'Add Jira Project',
|
|
@@ -79,26 +58,11 @@ var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
|
|
|
79
58
|
defaultMessage: 'Jira',
|
|
80
59
|
description: 'Description of the card to add a Jira project to a team'
|
|
81
60
|
},
|
|
82
|
-
addLoomSpaceTitle: {
|
|
83
|
-
id: 'ptc-directory.team-profile-page.team-containers.add-loom-space-title',
|
|
84
|
-
defaultMessage: 'Add space',
|
|
85
|
-
description: 'Title of the card to add a Loom space to a team'
|
|
86
|
-
},
|
|
87
61
|
loomSpaceDescription: {
|
|
88
62
|
id: 'ptc-directory.team-profile-page.team-containers.add-loom-space-description',
|
|
89
63
|
defaultMessage: 'Loom',
|
|
90
64
|
description: 'Description of the card to add a Loom space to a team'
|
|
91
65
|
},
|
|
92
|
-
projectContainerText: {
|
|
93
|
-
id: 'ptc-directory.team-profile-page.team-containers.project-container-text',
|
|
94
|
-
defaultMessage: 'project',
|
|
95
|
-
description: 'Text for project type containers'
|
|
96
|
-
},
|
|
97
|
-
spaceContainerText: {
|
|
98
|
-
id: 'ptc-directory.team-profile-page.team-containers.space-container-text',
|
|
99
|
-
defaultMessage: 'space',
|
|
100
|
-
description: 'Text for space type containers'
|
|
101
|
-
},
|
|
102
66
|
spaceContainerTextOverride: {
|
|
103
67
|
id: 'ptc-directory.team-profile-page.team-containers.space-container-text-override',
|
|
104
68
|
defaultMessage: 'Space',
|
|
@@ -133,29 +97,22 @@ var getJiraIcon = function getJiraIcon(containerSubTypes) {
|
|
|
133
97
|
var getJiraContainerProperties = function getJiraContainerProperties(_ref) {
|
|
134
98
|
var containerTypeProperties = _ref.containerTypeProperties,
|
|
135
99
|
_ref$iconSize = _ref.iconSize,
|
|
136
|
-
iconSize = _ref$iconSize === void 0 ? 'small' : _ref$iconSize;
|
|
137
|
-
var newTeamProfilePage = _featureGateJsClient.default.getExperimentValue('new_team_profile', 'isEnabled', false);
|
|
138
|
-
var isTeamLensInHomeEnabled = (0, _getIsExperimentEnabled.getIsExperimentEnabled)('team_lens_in_atlassian_home');
|
|
100
|
+
iconSize = _ref$iconSize === void 0 ? (0, _platformFeatureFlags.fg)('ptc-fix-containers-after-icon-size') ? 'medium' : 'small' : _ref$iconSize;
|
|
139
101
|
var _ref2 = containerTypeProperties || {},
|
|
140
102
|
subType = _ref2.subType,
|
|
141
103
|
name = _ref2.name;
|
|
104
|
+
var isAfterIconSizeFixEnabled = (0, _platformFeatureFlags.fg)('ptc-fix-containers-after-icon-size');
|
|
142
105
|
var baseProperties = {
|
|
143
106
|
description: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, messages.jiraProjectDescription),
|
|
144
|
-
icon:
|
|
145
|
-
xcss: (0, _css.cx)(styles.avatarWrapper, styles.avatarMargin)
|
|
146
|
-
}, /*#__PURE__*/_react.default.createElement(_image.default, {
|
|
147
|
-
src: getJiraIcon(subType),
|
|
148
|
-
alt: "",
|
|
149
|
-
testId: "jira-project-container-icon"
|
|
150
|
-
})) : /*#__PURE__*/_react.default.createElement(_compiled.Flex, {
|
|
151
|
-
xcss: iconSize === 'medium' ? styles.mediumIconWrapper : styles.iconWrapper
|
|
107
|
+
icon: /*#__PURE__*/_react.default.createElement(_compiled.Flex, {
|
|
108
|
+
xcss: (0, _css.cx)(iconSize === 'small' && isAfterIconSizeFixEnabled ? styles.smallAvatarWrapper : styles.avatarWrapper, iconSize === 'small' && isAfterIconSizeFixEnabled ? styles.smallAvatarMargin : styles.avatarMargin)
|
|
152
109
|
}, /*#__PURE__*/_react.default.createElement(_image.default, {
|
|
153
110
|
src: getJiraIcon(subType),
|
|
154
111
|
alt: "",
|
|
155
112
|
testId: "jira-project-container-icon"
|
|
156
113
|
})),
|
|
157
|
-
title:
|
|
158
|
-
containerTypeText:
|
|
114
|
+
title: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, messages.addJiraProject),
|
|
115
|
+
containerTypeText: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, messages.spaceContainerTextOverride)
|
|
159
116
|
};
|
|
160
117
|
switch (subType) {
|
|
161
118
|
case 'PRODUCT_DISCOVERY':
|
|
@@ -171,14 +128,13 @@ var getJiraContainerProperties = function getJiraContainerProperties(_ref) {
|
|
|
171
128
|
var getWebLinkContainerProperties = function getWebLinkContainerProperties(_ref3) {
|
|
172
129
|
var isEmptyContainer = _ref3.isEmptyContainer,
|
|
173
130
|
isDisplayedOnProfileCard = _ref3.isDisplayedOnProfileCard;
|
|
174
|
-
var newTeamProfilePage = _featureGateJsClient.default.getExperimentValue('new_team_profile', 'isEnabled', false);
|
|
175
131
|
return {
|
|
176
132
|
description: isEmptyContainer ? /*#__PURE__*/_react.default.createElement(_compiled.Text, {
|
|
177
133
|
size: "medium",
|
|
178
134
|
weight: "medium"
|
|
179
135
|
}, /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, messages.emptyLinkContainerDescription)) : /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, messages.linkContainerDescription),
|
|
180
136
|
icon: isEmptyContainer ? /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
181
|
-
xcss: (0, _css.cx)(styles.linkAvatarWrapper,
|
|
137
|
+
xcss: (0, _css.cx)(styles.linkAvatarWrapper, styles.avatarMargin),
|
|
182
138
|
testId: "team-link-card-globe-icon"
|
|
183
139
|
}, /*#__PURE__*/_react.default.createElement(_link.default, {
|
|
184
140
|
label: "",
|
|
@@ -194,57 +150,44 @@ var getWebLinkContainerProperties = function getWebLinkContainerProperties(_ref3
|
|
|
194
150
|
label: "",
|
|
195
151
|
size: "small"
|
|
196
152
|
})),
|
|
197
|
-
title:
|
|
153
|
+
title: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, messages.addLink),
|
|
198
154
|
containerTypeText: null
|
|
199
155
|
};
|
|
200
156
|
};
|
|
201
157
|
var getContainerProperties = exports.getContainerProperties = function getContainerProperties(_ref4) {
|
|
202
158
|
var containerType = _ref4.containerType,
|
|
203
159
|
_ref4$iconSize = _ref4.iconSize,
|
|
204
|
-
iconSize = _ref4$iconSize === void 0 ? 'small' : _ref4$iconSize,
|
|
160
|
+
iconSize = _ref4$iconSize === void 0 ? (0, _platformFeatureFlags.fg)('ptc-fix-containers-after-icon-size') ? 'medium' : 'small' : _ref4$iconSize,
|
|
205
161
|
containerTypeProperties = _ref4.containerTypeProperties,
|
|
206
162
|
isEmptyContainer = _ref4.isEmptyContainer,
|
|
207
163
|
isDisplayedOnProfileCard = _ref4.isDisplayedOnProfileCard;
|
|
208
|
-
var
|
|
209
|
-
var isTeamLensInHomeEnabled = (0, _getIsExperimentEnabled.getIsExperimentEnabled)('team_lens_in_atlassian_home');
|
|
164
|
+
var isAfterIconSizeFixEnabled = (0, _platformFeatureFlags.fg)('ptc-fix-containers-after-icon-size');
|
|
210
165
|
switch (containerType) {
|
|
211
166
|
case 'ConfluenceSpace':
|
|
212
167
|
return {
|
|
213
168
|
description: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, messages.confluenceContainerDescription),
|
|
214
|
-
icon:
|
|
215
|
-
xcss: (0, _css.cx)(styles.avatarWrapper, styles.avatarMargin)
|
|
216
|
-
}, /*#__PURE__*/_react.default.createElement(_image.default, {
|
|
217
|
-
src: _ConfluenceIcon.default,
|
|
218
|
-
alt: "",
|
|
219
|
-
testId: "confluence-space-container-icon"
|
|
220
|
-
})) : /*#__PURE__*/_react.default.createElement(_compiled.Flex, {
|
|
221
|
-
xcss: iconSize === 'medium' ? styles.mediumIconWrapper : styles.iconWrapper
|
|
169
|
+
icon: /*#__PURE__*/_react.default.createElement(_compiled.Flex, {
|
|
170
|
+
xcss: (0, _css.cx)(iconSize === 'small' && isAfterIconSizeFixEnabled ? styles.smallAvatarWrapper : styles.avatarWrapper, iconSize === 'small' && isAfterIconSizeFixEnabled ? styles.smallAvatarMargin : styles.avatarMargin)
|
|
222
171
|
}, /*#__PURE__*/_react.default.createElement(_image.default, {
|
|
223
172
|
src: _ConfluenceIcon.default,
|
|
224
173
|
alt: "",
|
|
225
174
|
testId: "confluence-space-container-icon"
|
|
226
175
|
})),
|
|
227
|
-
title:
|
|
228
|
-
containerTypeText:
|
|
176
|
+
title: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, messages.addConfluenceContainerTitle),
|
|
177
|
+
containerTypeText: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, messages.spaceContainerTextOverride)
|
|
229
178
|
};
|
|
230
179
|
case 'LoomSpace':
|
|
231
180
|
return {
|
|
232
181
|
description: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, messages.loomSpaceDescription),
|
|
233
|
-
icon:
|
|
234
|
-
xcss: (0, _css.cx)(styles.avatarWrapper, styles.avatarMargin)
|
|
235
|
-
}, /*#__PURE__*/_react.default.createElement(_image.default, {
|
|
236
|
-
src: _LoomIcon.default,
|
|
237
|
-
alt: "",
|
|
238
|
-
testId: "loom-space-container-icon"
|
|
239
|
-
})) : /*#__PURE__*/_react.default.createElement(_compiled.Flex, {
|
|
240
|
-
xcss: iconSize === 'medium' ? styles.mediumIconWrapper : styles.iconWrapper
|
|
182
|
+
icon: /*#__PURE__*/_react.default.createElement(_compiled.Flex, {
|
|
183
|
+
xcss: (0, _css.cx)(iconSize === 'small' && isAfterIconSizeFixEnabled ? styles.smallAvatarWrapper : styles.avatarWrapper, iconSize === 'small' && isAfterIconSizeFixEnabled ? styles.smallAvatarMargin : styles.avatarMargin)
|
|
241
184
|
}, /*#__PURE__*/_react.default.createElement(_image.default, {
|
|
242
185
|
src: _LoomIcon.default,
|
|
243
186
|
alt: "",
|
|
244
187
|
testId: "loom-space-container-icon"
|
|
245
188
|
})),
|
|
246
|
-
title:
|
|
247
|
-
containerTypeText:
|
|
189
|
+
title: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, messages.addLoomSpace),
|
|
190
|
+
containerTypeText: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, messages.spaceContainerTextOverride)
|
|
248
191
|
};
|
|
249
192
|
case 'JiraProject':
|
|
250
193
|
return getJiraContainerProperties({
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
|
|
2
2
|
._2rko1eiz{border-radius:var(--ds-radius-small,6px)}
|
|
3
|
-
._2rkofajl{border-radius:var(--ds-radius-small,3px)}
|
|
3
|
+
._2rkofajl{border-radius:var(--ds-radius-small,3px)}
|
|
4
|
+
._195gidpf{margin-inline:0}
|
|
5
|
+
._1mouidpf{margin-block:0}._12ji1l7x{outline-color:var(--ds-border,#0b120e24)}
|
|
4
6
|
._18u0v77o{margin-left:var(--ds-space-025,2px)}
|
|
5
7
|
._19pkv77o{margin-top:var(--ds-space-025,2px)}
|
|
6
8
|
._1bah1h6o{justify-content:center}
|
|
7
|
-
._1bsb1crf{width:9pt}
|
|
8
9
|
._1bsb1tcg{width:24px}
|
|
9
10
|
._1bsb7vkz{width:1pc}
|
|
10
11
|
._1e0c1txw{display:flex}
|
|
11
12
|
._1qu2nqa1{outline-style:solid}
|
|
12
13
|
._2hwxv77o{margin-right:var(--ds-space-025,2px)}
|
|
13
14
|
._4cvr1h6o{align-items:center}
|
|
14
|
-
._4t3i1crf{height:9pt}
|
|
15
15
|
._4t3i1tcg{height:24px}
|
|
16
16
|
._4t3i7vkz{height:1pc}
|
|
17
17
|
._bfhki8nm{background-color:var(--ds-background-neutral,#0515240f)}
|
|
@@ -4,22 +4,21 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { defineMessages, FormattedMessage } from 'react-intl-next';
|
|
6
6
|
import { cx } from '@atlaskit/css';
|
|
7
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
8
7
|
import LinkIcon from '@atlaskit/icon/core/link';
|
|
9
8
|
import LinkExternalIcon from '@atlaskit/icon/core/link-external';
|
|
10
9
|
import Image from '@atlaskit/image';
|
|
10
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
11
|
import { Box, Flex, Text } from '@atlaskit/primitives/compiled';
|
|
12
12
|
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
16
|
import LoomIcon from '../assets/LoomIcon.svg';
|
|
17
|
-
import { getIsExperimentEnabled } from './get-is-experiment-enabled';
|
|
18
17
|
const styles = {
|
|
19
|
-
iconWrapper: "_1bsb1crf _4t3i1crf",
|
|
20
18
|
avatarWrapper: "_1bsb1tcg _4t3i1tcg",
|
|
21
19
|
avatarMargin: "_19pkv77o _2hwxv77o _otyrv77o _18u0v77o",
|
|
22
|
-
|
|
20
|
+
smallAvatarWrapper: "_1bsb7vkz _4t3i7vkz",
|
|
21
|
+
smallAvatarMargin: "_195gidpf _1mouidpf",
|
|
23
22
|
linkIconWrapper: "_2rkofajl _1bsb7vkz _4t3i7vkz _1e0c1txw _4cvr1h6o _1bah1h6o _12ji1l7x _1qu2nqa1",
|
|
24
23
|
linkAvatarWrapper: "_2rko1eiz _1bsb1tcg _4t3i1tcg _1e0c1txw _4cvr1h6o _1bah1h6o _bfhki8nm"
|
|
25
24
|
};
|
|
@@ -29,36 +28,16 @@ export const messages = defineMessages({
|
|
|
29
28
|
defaultMessage: 'Add space',
|
|
30
29
|
description: 'Title of the card to add a Confluence space to a team'
|
|
31
30
|
},
|
|
32
|
-
addConfluenceSpace: {
|
|
33
|
-
id: 'ptc-directory.team-profile-page.team-containers.add-confluence-space',
|
|
34
|
-
defaultMessage: 'Add Confluence Space',
|
|
35
|
-
description: 'Title of the card to add a Confluence space to a team'
|
|
36
|
-
},
|
|
37
31
|
confluenceContainerDescription: {
|
|
38
32
|
id: 'ptc-directory.team-profile-page.team-containers.add-confluence-space-description',
|
|
39
33
|
defaultMessage: 'Confluence',
|
|
40
34
|
description: 'Description of the card to add a Confluence space to a team'
|
|
41
35
|
},
|
|
42
|
-
addLoomContainerTitle: {
|
|
43
|
-
id: 'ptc-directory.team-profile-page.team-containers.add-loom-space-title',
|
|
44
|
-
defaultMessage: 'Add space',
|
|
45
|
-
description: 'Title of the card to add a Loom space to a team'
|
|
46
|
-
},
|
|
47
36
|
addLoomSpace: {
|
|
48
37
|
id: 'ptc-directory.team-profile-page.team-containers.add-loom-space',
|
|
49
38
|
defaultMessage: 'Add Loom Space',
|
|
50
39
|
description: 'Title of the card to add a Loom space to a team'
|
|
51
40
|
},
|
|
52
|
-
confluenceLoomDescription: {
|
|
53
|
-
id: 'ptc-directory.team-profile-page.team-containers.add-loom-space-description',
|
|
54
|
-
defaultMessage: 'Loom',
|
|
55
|
-
description: 'Description of the card to add a Loom space to a team'
|
|
56
|
-
},
|
|
57
|
-
addJiraProjectTitle: {
|
|
58
|
-
id: 'ptc-directory.team-profile-page.team-containers.add-jira-project-title',
|
|
59
|
-
defaultMessage: 'Add project',
|
|
60
|
-
description: 'Title of the card to add a Jira project to a team'
|
|
61
|
-
},
|
|
62
41
|
addJiraProject: {
|
|
63
42
|
id: 'ptc-directory.team-profile-page.team-containers.add-jira-project',
|
|
64
43
|
defaultMessage: 'Add Jira Project',
|
|
@@ -69,26 +48,11 @@ export const messages = defineMessages({
|
|
|
69
48
|
defaultMessage: 'Jira',
|
|
70
49
|
description: 'Description of the card to add a Jira project to a team'
|
|
71
50
|
},
|
|
72
|
-
addLoomSpaceTitle: {
|
|
73
|
-
id: 'ptc-directory.team-profile-page.team-containers.add-loom-space-title',
|
|
74
|
-
defaultMessage: 'Add space',
|
|
75
|
-
description: 'Title of the card to add a Loom space to a team'
|
|
76
|
-
},
|
|
77
51
|
loomSpaceDescription: {
|
|
78
52
|
id: 'ptc-directory.team-profile-page.team-containers.add-loom-space-description',
|
|
79
53
|
defaultMessage: 'Loom',
|
|
80
54
|
description: 'Description of the card to add a Loom space to a team'
|
|
81
55
|
},
|
|
82
|
-
projectContainerText: {
|
|
83
|
-
id: 'ptc-directory.team-profile-page.team-containers.project-container-text',
|
|
84
|
-
defaultMessage: 'project',
|
|
85
|
-
description: 'Text for project type containers'
|
|
86
|
-
},
|
|
87
|
-
spaceContainerText: {
|
|
88
|
-
id: 'ptc-directory.team-profile-page.team-containers.space-container-text',
|
|
89
|
-
defaultMessage: 'space',
|
|
90
|
-
description: 'Text for space type containers'
|
|
91
|
-
},
|
|
92
56
|
spaceContainerTextOverride: {
|
|
93
57
|
id: 'ptc-directory.team-profile-page.team-containers.space-container-text-override',
|
|
94
58
|
defaultMessage: 'Space',
|
|
@@ -122,31 +86,24 @@ const getJiraIcon = containerSubTypes => {
|
|
|
122
86
|
};
|
|
123
87
|
const getJiraContainerProperties = ({
|
|
124
88
|
containerTypeProperties,
|
|
125
|
-
iconSize = 'small'
|
|
89
|
+
iconSize = fg('ptc-fix-containers-after-icon-size') ? 'medium' : 'small'
|
|
126
90
|
}) => {
|
|
127
|
-
const newTeamProfilePage = FeatureGates.getExperimentValue('new_team_profile', 'isEnabled', false);
|
|
128
|
-
const isTeamLensInHomeEnabled = getIsExperimentEnabled('team_lens_in_atlassian_home');
|
|
129
91
|
const {
|
|
130
92
|
subType,
|
|
131
93
|
name
|
|
132
94
|
} = containerTypeProperties || {};
|
|
95
|
+
const isAfterIconSizeFixEnabled = fg('ptc-fix-containers-after-icon-size');
|
|
133
96
|
const baseProperties = {
|
|
134
97
|
description: /*#__PURE__*/React.createElement(FormattedMessage, messages.jiraProjectDescription),
|
|
135
|
-
icon:
|
|
136
|
-
xcss: cx(styles.avatarWrapper, styles.avatarMargin)
|
|
137
|
-
}, /*#__PURE__*/React.createElement(Image, {
|
|
138
|
-
src: getJiraIcon(subType),
|
|
139
|
-
alt: "",
|
|
140
|
-
testId: "jira-project-container-icon"
|
|
141
|
-
})) : /*#__PURE__*/React.createElement(Flex, {
|
|
142
|
-
xcss: iconSize === 'medium' ? styles.mediumIconWrapper : styles.iconWrapper
|
|
98
|
+
icon: /*#__PURE__*/React.createElement(Flex, {
|
|
99
|
+
xcss: cx(iconSize === 'small' && isAfterIconSizeFixEnabled ? styles.smallAvatarWrapper : styles.avatarWrapper, iconSize === 'small' && isAfterIconSizeFixEnabled ? styles.smallAvatarMargin : styles.avatarMargin)
|
|
143
100
|
}, /*#__PURE__*/React.createElement(Image, {
|
|
144
101
|
src: getJiraIcon(subType),
|
|
145
102
|
alt: "",
|
|
146
103
|
testId: "jira-project-container-icon"
|
|
147
104
|
})),
|
|
148
|
-
title:
|
|
149
|
-
containerTypeText:
|
|
105
|
+
title: /*#__PURE__*/React.createElement(FormattedMessage, messages.addJiraProject),
|
|
106
|
+
containerTypeText: /*#__PURE__*/React.createElement(FormattedMessage, messages.spaceContainerTextOverride)
|
|
150
107
|
};
|
|
151
108
|
switch (subType) {
|
|
152
109
|
case 'PRODUCT_DISCOVERY':
|
|
@@ -164,14 +121,13 @@ const getWebLinkContainerProperties = ({
|
|
|
164
121
|
isEmptyContainer,
|
|
165
122
|
isDisplayedOnProfileCard
|
|
166
123
|
}) => {
|
|
167
|
-
const newTeamProfilePage = FeatureGates.getExperimentValue('new_team_profile', 'isEnabled', false);
|
|
168
124
|
return {
|
|
169
125
|
description: isEmptyContainer ? /*#__PURE__*/React.createElement(Text, {
|
|
170
126
|
size: "medium",
|
|
171
127
|
weight: "medium"
|
|
172
128
|
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.emptyLinkContainerDescription)) : /*#__PURE__*/React.createElement(FormattedMessage, messages.linkContainerDescription),
|
|
173
129
|
icon: isEmptyContainer ? /*#__PURE__*/React.createElement(Box, {
|
|
174
|
-
xcss: cx(styles.linkAvatarWrapper,
|
|
130
|
+
xcss: cx(styles.linkAvatarWrapper, styles.avatarMargin),
|
|
175
131
|
testId: "team-link-card-globe-icon"
|
|
176
132
|
}, /*#__PURE__*/React.createElement(LinkIcon, {
|
|
177
133
|
label: "",
|
|
@@ -187,57 +143,44 @@ const getWebLinkContainerProperties = ({
|
|
|
187
143
|
label: "",
|
|
188
144
|
size: "small"
|
|
189
145
|
})),
|
|
190
|
-
title:
|
|
146
|
+
title: /*#__PURE__*/React.createElement(FormattedMessage, messages.addLink),
|
|
191
147
|
containerTypeText: null
|
|
192
148
|
};
|
|
193
149
|
};
|
|
194
150
|
export const getContainerProperties = ({
|
|
195
151
|
containerType,
|
|
196
|
-
iconSize = 'small',
|
|
152
|
+
iconSize = fg('ptc-fix-containers-after-icon-size') ? 'medium' : 'small',
|
|
197
153
|
containerTypeProperties,
|
|
198
154
|
isEmptyContainer,
|
|
199
155
|
isDisplayedOnProfileCard
|
|
200
156
|
}) => {
|
|
201
|
-
const
|
|
202
|
-
const isTeamLensInHomeEnabled = getIsExperimentEnabled('team_lens_in_atlassian_home');
|
|
157
|
+
const isAfterIconSizeFixEnabled = fg('ptc-fix-containers-after-icon-size');
|
|
203
158
|
switch (containerType) {
|
|
204
159
|
case 'ConfluenceSpace':
|
|
205
160
|
return {
|
|
206
161
|
description: /*#__PURE__*/React.createElement(FormattedMessage, messages.confluenceContainerDescription),
|
|
207
|
-
icon:
|
|
208
|
-
xcss: cx(styles.avatarWrapper, styles.avatarMargin)
|
|
209
|
-
}, /*#__PURE__*/React.createElement(Image, {
|
|
210
|
-
src: ConfluenceIcon,
|
|
211
|
-
alt: "",
|
|
212
|
-
testId: "confluence-space-container-icon"
|
|
213
|
-
})) : /*#__PURE__*/React.createElement(Flex, {
|
|
214
|
-
xcss: iconSize === 'medium' ? styles.mediumIconWrapper : styles.iconWrapper
|
|
162
|
+
icon: /*#__PURE__*/React.createElement(Flex, {
|
|
163
|
+
xcss: cx(iconSize === 'small' && isAfterIconSizeFixEnabled ? styles.smallAvatarWrapper : styles.avatarWrapper, iconSize === 'small' && isAfterIconSizeFixEnabled ? styles.smallAvatarMargin : styles.avatarMargin)
|
|
215
164
|
}, /*#__PURE__*/React.createElement(Image, {
|
|
216
165
|
src: ConfluenceIcon,
|
|
217
166
|
alt: "",
|
|
218
167
|
testId: "confluence-space-container-icon"
|
|
219
168
|
})),
|
|
220
|
-
title:
|
|
221
|
-
containerTypeText:
|
|
169
|
+
title: /*#__PURE__*/React.createElement(FormattedMessage, messages.addConfluenceContainerTitle),
|
|
170
|
+
containerTypeText: /*#__PURE__*/React.createElement(FormattedMessage, messages.spaceContainerTextOverride)
|
|
222
171
|
};
|
|
223
172
|
case 'LoomSpace':
|
|
224
173
|
return {
|
|
225
174
|
description: /*#__PURE__*/React.createElement(FormattedMessage, messages.loomSpaceDescription),
|
|
226
|
-
icon:
|
|
227
|
-
xcss: cx(styles.avatarWrapper, styles.avatarMargin)
|
|
228
|
-
}, /*#__PURE__*/React.createElement(Image, {
|
|
229
|
-
src: LoomIcon,
|
|
230
|
-
alt: "",
|
|
231
|
-
testId: "loom-space-container-icon"
|
|
232
|
-
})) : /*#__PURE__*/React.createElement(Flex, {
|
|
233
|
-
xcss: iconSize === 'medium' ? styles.mediumIconWrapper : styles.iconWrapper
|
|
175
|
+
icon: /*#__PURE__*/React.createElement(Flex, {
|
|
176
|
+
xcss: cx(iconSize === 'small' && isAfterIconSizeFixEnabled ? styles.smallAvatarWrapper : styles.avatarWrapper, iconSize === 'small' && isAfterIconSizeFixEnabled ? styles.smallAvatarMargin : styles.avatarMargin)
|
|
234
177
|
}, /*#__PURE__*/React.createElement(Image, {
|
|
235
178
|
src: LoomIcon,
|
|
236
179
|
alt: "",
|
|
237
180
|
testId: "loom-space-container-icon"
|
|
238
181
|
})),
|
|
239
|
-
title:
|
|
240
|
-
containerTypeText:
|
|
182
|
+
title: /*#__PURE__*/React.createElement(FormattedMessage, messages.addLoomSpace),
|
|
183
|
+
containerTypeText: /*#__PURE__*/React.createElement(FormattedMessage, messages.spaceContainerTextOverride)
|
|
241
184
|
};
|
|
242
185
|
case 'JiraProject':
|
|
243
186
|
return getJiraContainerProperties({
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
|
|
2
2
|
._2rko1eiz{border-radius:var(--ds-radius-small,6px)}
|
|
3
|
-
._2rkofajl{border-radius:var(--ds-radius-small,3px)}
|
|
3
|
+
._2rkofajl{border-radius:var(--ds-radius-small,3px)}
|
|
4
|
+
._195gidpf{margin-inline:0}
|
|
5
|
+
._1mouidpf{margin-block:0}._12ji1l7x{outline-color:var(--ds-border,#0b120e24)}
|
|
4
6
|
._18u0v77o{margin-left:var(--ds-space-025,2px)}
|
|
5
7
|
._19pkv77o{margin-top:var(--ds-space-025,2px)}
|
|
6
8
|
._1bah1h6o{justify-content:center}
|
|
7
|
-
._1bsb1crf{width:9pt}
|
|
8
9
|
._1bsb1tcg{width:24px}
|
|
9
10
|
._1bsb7vkz{width:1pc}
|
|
10
11
|
._1e0c1txw{display:flex}
|
|
11
12
|
._1qu2nqa1{outline-style:solid}
|
|
12
13
|
._2hwxv77o{margin-right:var(--ds-space-025,2px)}
|
|
13
14
|
._4cvr1h6o{align-items:center}
|
|
14
|
-
._4t3i1crf{height:9pt}
|
|
15
15
|
._4t3i1tcg{height:24px}
|
|
16
16
|
._4t3i7vkz{height:1pc}
|
|
17
17
|
._bfhki8nm{background-color:var(--ds-background-neutral,#0515240f)}
|
|
@@ -7,22 +7,21 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import { defineMessages, FormattedMessage } from 'react-intl-next';
|
|
9
9
|
import { cx } from '@atlaskit/css';
|
|
10
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
11
10
|
import LinkIcon from '@atlaskit/icon/core/link';
|
|
12
11
|
import LinkExternalIcon from '@atlaskit/icon/core/link-external';
|
|
13
12
|
import Image from '@atlaskit/image';
|
|
13
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
14
|
import { Box, Flex, Text } from '@atlaskit/primitives/compiled';
|
|
15
15
|
import ConfluenceIcon from '../assets/ConfluenceIcon.svg';
|
|
16
16
|
import JiraIcon from '../assets/JiraIcon.svg';
|
|
17
17
|
import JiraProjectDiscovery from '../assets/JiraProjectDiscovery.svg';
|
|
18
18
|
import JiraServiceManagement from '../assets/JiraServiceManagement.svg';
|
|
19
19
|
import LoomIcon from '../assets/LoomIcon.svg';
|
|
20
|
-
import { getIsExperimentEnabled } from './get-is-experiment-enabled';
|
|
21
20
|
var styles = {
|
|
22
|
-
iconWrapper: "_1bsb1crf _4t3i1crf",
|
|
23
21
|
avatarWrapper: "_1bsb1tcg _4t3i1tcg",
|
|
24
22
|
avatarMargin: "_19pkv77o _2hwxv77o _otyrv77o _18u0v77o",
|
|
25
|
-
|
|
23
|
+
smallAvatarWrapper: "_1bsb7vkz _4t3i7vkz",
|
|
24
|
+
smallAvatarMargin: "_195gidpf _1mouidpf",
|
|
26
25
|
linkIconWrapper: "_2rkofajl _1bsb7vkz _4t3i7vkz _1e0c1txw _4cvr1h6o _1bah1h6o _12ji1l7x _1qu2nqa1",
|
|
27
26
|
linkAvatarWrapper: "_2rko1eiz _1bsb1tcg _4t3i1tcg _1e0c1txw _4cvr1h6o _1bah1h6o _bfhki8nm"
|
|
28
27
|
};
|
|
@@ -32,36 +31,16 @@ export var messages = defineMessages({
|
|
|
32
31
|
defaultMessage: 'Add space',
|
|
33
32
|
description: 'Title of the card to add a Confluence space to a team'
|
|
34
33
|
},
|
|
35
|
-
addConfluenceSpace: {
|
|
36
|
-
id: 'ptc-directory.team-profile-page.team-containers.add-confluence-space',
|
|
37
|
-
defaultMessage: 'Add Confluence Space',
|
|
38
|
-
description: 'Title of the card to add a Confluence space to a team'
|
|
39
|
-
},
|
|
40
34
|
confluenceContainerDescription: {
|
|
41
35
|
id: 'ptc-directory.team-profile-page.team-containers.add-confluence-space-description',
|
|
42
36
|
defaultMessage: 'Confluence',
|
|
43
37
|
description: 'Description of the card to add a Confluence space to a team'
|
|
44
38
|
},
|
|
45
|
-
addLoomContainerTitle: {
|
|
46
|
-
id: 'ptc-directory.team-profile-page.team-containers.add-loom-space-title',
|
|
47
|
-
defaultMessage: 'Add space',
|
|
48
|
-
description: 'Title of the card to add a Loom space to a team'
|
|
49
|
-
},
|
|
50
39
|
addLoomSpace: {
|
|
51
40
|
id: 'ptc-directory.team-profile-page.team-containers.add-loom-space',
|
|
52
41
|
defaultMessage: 'Add Loom Space',
|
|
53
42
|
description: 'Title of the card to add a Loom space to a team'
|
|
54
43
|
},
|
|
55
|
-
confluenceLoomDescription: {
|
|
56
|
-
id: 'ptc-directory.team-profile-page.team-containers.add-loom-space-description',
|
|
57
|
-
defaultMessage: 'Loom',
|
|
58
|
-
description: 'Description of the card to add a Loom space to a team'
|
|
59
|
-
},
|
|
60
|
-
addJiraProjectTitle: {
|
|
61
|
-
id: 'ptc-directory.team-profile-page.team-containers.add-jira-project-title',
|
|
62
|
-
defaultMessage: 'Add project',
|
|
63
|
-
description: 'Title of the card to add a Jira project to a team'
|
|
64
|
-
},
|
|
65
44
|
addJiraProject: {
|
|
66
45
|
id: 'ptc-directory.team-profile-page.team-containers.add-jira-project',
|
|
67
46
|
defaultMessage: 'Add Jira Project',
|
|
@@ -72,26 +51,11 @@ export var messages = defineMessages({
|
|
|
72
51
|
defaultMessage: 'Jira',
|
|
73
52
|
description: 'Description of the card to add a Jira project to a team'
|
|
74
53
|
},
|
|
75
|
-
addLoomSpaceTitle: {
|
|
76
|
-
id: 'ptc-directory.team-profile-page.team-containers.add-loom-space-title',
|
|
77
|
-
defaultMessage: 'Add space',
|
|
78
|
-
description: 'Title of the card to add a Loom space to a team'
|
|
79
|
-
},
|
|
80
54
|
loomSpaceDescription: {
|
|
81
55
|
id: 'ptc-directory.team-profile-page.team-containers.add-loom-space-description',
|
|
82
56
|
defaultMessage: 'Loom',
|
|
83
57
|
description: 'Description of the card to add a Loom space to a team'
|
|
84
58
|
},
|
|
85
|
-
projectContainerText: {
|
|
86
|
-
id: 'ptc-directory.team-profile-page.team-containers.project-container-text',
|
|
87
|
-
defaultMessage: 'project',
|
|
88
|
-
description: 'Text for project type containers'
|
|
89
|
-
},
|
|
90
|
-
spaceContainerText: {
|
|
91
|
-
id: 'ptc-directory.team-profile-page.team-containers.space-container-text',
|
|
92
|
-
defaultMessage: 'space',
|
|
93
|
-
description: 'Text for space type containers'
|
|
94
|
-
},
|
|
95
59
|
spaceContainerTextOverride: {
|
|
96
60
|
id: 'ptc-directory.team-profile-page.team-containers.space-container-text-override',
|
|
97
61
|
defaultMessage: 'Space',
|
|
@@ -126,29 +90,22 @@ var getJiraIcon = function getJiraIcon(containerSubTypes) {
|
|
|
126
90
|
var getJiraContainerProperties = function getJiraContainerProperties(_ref) {
|
|
127
91
|
var containerTypeProperties = _ref.containerTypeProperties,
|
|
128
92
|
_ref$iconSize = _ref.iconSize,
|
|
129
|
-
iconSize = _ref$iconSize === void 0 ? 'small' : _ref$iconSize;
|
|
130
|
-
var newTeamProfilePage = FeatureGates.getExperimentValue('new_team_profile', 'isEnabled', false);
|
|
131
|
-
var isTeamLensInHomeEnabled = getIsExperimentEnabled('team_lens_in_atlassian_home');
|
|
93
|
+
iconSize = _ref$iconSize === void 0 ? fg('ptc-fix-containers-after-icon-size') ? 'medium' : 'small' : _ref$iconSize;
|
|
132
94
|
var _ref2 = containerTypeProperties || {},
|
|
133
95
|
subType = _ref2.subType,
|
|
134
96
|
name = _ref2.name;
|
|
97
|
+
var isAfterIconSizeFixEnabled = fg('ptc-fix-containers-after-icon-size');
|
|
135
98
|
var baseProperties = {
|
|
136
99
|
description: /*#__PURE__*/React.createElement(FormattedMessage, messages.jiraProjectDescription),
|
|
137
|
-
icon:
|
|
138
|
-
xcss: cx(styles.avatarWrapper, styles.avatarMargin)
|
|
139
|
-
}, /*#__PURE__*/React.createElement(Image, {
|
|
140
|
-
src: getJiraIcon(subType),
|
|
141
|
-
alt: "",
|
|
142
|
-
testId: "jira-project-container-icon"
|
|
143
|
-
})) : /*#__PURE__*/React.createElement(Flex, {
|
|
144
|
-
xcss: iconSize === 'medium' ? styles.mediumIconWrapper : styles.iconWrapper
|
|
100
|
+
icon: /*#__PURE__*/React.createElement(Flex, {
|
|
101
|
+
xcss: cx(iconSize === 'small' && isAfterIconSizeFixEnabled ? styles.smallAvatarWrapper : styles.avatarWrapper, iconSize === 'small' && isAfterIconSizeFixEnabled ? styles.smallAvatarMargin : styles.avatarMargin)
|
|
145
102
|
}, /*#__PURE__*/React.createElement(Image, {
|
|
146
103
|
src: getJiraIcon(subType),
|
|
147
104
|
alt: "",
|
|
148
105
|
testId: "jira-project-container-icon"
|
|
149
106
|
})),
|
|
150
|
-
title:
|
|
151
|
-
containerTypeText:
|
|
107
|
+
title: /*#__PURE__*/React.createElement(FormattedMessage, messages.addJiraProject),
|
|
108
|
+
containerTypeText: /*#__PURE__*/React.createElement(FormattedMessage, messages.spaceContainerTextOverride)
|
|
152
109
|
};
|
|
153
110
|
switch (subType) {
|
|
154
111
|
case 'PRODUCT_DISCOVERY':
|
|
@@ -164,14 +121,13 @@ var getJiraContainerProperties = function getJiraContainerProperties(_ref) {
|
|
|
164
121
|
var getWebLinkContainerProperties = function getWebLinkContainerProperties(_ref3) {
|
|
165
122
|
var isEmptyContainer = _ref3.isEmptyContainer,
|
|
166
123
|
isDisplayedOnProfileCard = _ref3.isDisplayedOnProfileCard;
|
|
167
|
-
var newTeamProfilePage = FeatureGates.getExperimentValue('new_team_profile', 'isEnabled', false);
|
|
168
124
|
return {
|
|
169
125
|
description: isEmptyContainer ? /*#__PURE__*/React.createElement(Text, {
|
|
170
126
|
size: "medium",
|
|
171
127
|
weight: "medium"
|
|
172
128
|
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.emptyLinkContainerDescription)) : /*#__PURE__*/React.createElement(FormattedMessage, messages.linkContainerDescription),
|
|
173
129
|
icon: isEmptyContainer ? /*#__PURE__*/React.createElement(Box, {
|
|
174
|
-
xcss: cx(styles.linkAvatarWrapper,
|
|
130
|
+
xcss: cx(styles.linkAvatarWrapper, styles.avatarMargin),
|
|
175
131
|
testId: "team-link-card-globe-icon"
|
|
176
132
|
}, /*#__PURE__*/React.createElement(LinkIcon, {
|
|
177
133
|
label: "",
|
|
@@ -187,57 +143,44 @@ var getWebLinkContainerProperties = function getWebLinkContainerProperties(_ref3
|
|
|
187
143
|
label: "",
|
|
188
144
|
size: "small"
|
|
189
145
|
})),
|
|
190
|
-
title:
|
|
146
|
+
title: /*#__PURE__*/React.createElement(FormattedMessage, messages.addLink),
|
|
191
147
|
containerTypeText: null
|
|
192
148
|
};
|
|
193
149
|
};
|
|
194
150
|
export var getContainerProperties = function getContainerProperties(_ref4) {
|
|
195
151
|
var containerType = _ref4.containerType,
|
|
196
152
|
_ref4$iconSize = _ref4.iconSize,
|
|
197
|
-
iconSize = _ref4$iconSize === void 0 ? 'small' : _ref4$iconSize,
|
|
153
|
+
iconSize = _ref4$iconSize === void 0 ? fg('ptc-fix-containers-after-icon-size') ? 'medium' : 'small' : _ref4$iconSize,
|
|
198
154
|
containerTypeProperties = _ref4.containerTypeProperties,
|
|
199
155
|
isEmptyContainer = _ref4.isEmptyContainer,
|
|
200
156
|
isDisplayedOnProfileCard = _ref4.isDisplayedOnProfileCard;
|
|
201
|
-
var
|
|
202
|
-
var isTeamLensInHomeEnabled = getIsExperimentEnabled('team_lens_in_atlassian_home');
|
|
157
|
+
var isAfterIconSizeFixEnabled = fg('ptc-fix-containers-after-icon-size');
|
|
203
158
|
switch (containerType) {
|
|
204
159
|
case 'ConfluenceSpace':
|
|
205
160
|
return {
|
|
206
161
|
description: /*#__PURE__*/React.createElement(FormattedMessage, messages.confluenceContainerDescription),
|
|
207
|
-
icon:
|
|
208
|
-
xcss: cx(styles.avatarWrapper, styles.avatarMargin)
|
|
209
|
-
}, /*#__PURE__*/React.createElement(Image, {
|
|
210
|
-
src: ConfluenceIcon,
|
|
211
|
-
alt: "",
|
|
212
|
-
testId: "confluence-space-container-icon"
|
|
213
|
-
})) : /*#__PURE__*/React.createElement(Flex, {
|
|
214
|
-
xcss: iconSize === 'medium' ? styles.mediumIconWrapper : styles.iconWrapper
|
|
162
|
+
icon: /*#__PURE__*/React.createElement(Flex, {
|
|
163
|
+
xcss: cx(iconSize === 'small' && isAfterIconSizeFixEnabled ? styles.smallAvatarWrapper : styles.avatarWrapper, iconSize === 'small' && isAfterIconSizeFixEnabled ? styles.smallAvatarMargin : styles.avatarMargin)
|
|
215
164
|
}, /*#__PURE__*/React.createElement(Image, {
|
|
216
165
|
src: ConfluenceIcon,
|
|
217
166
|
alt: "",
|
|
218
167
|
testId: "confluence-space-container-icon"
|
|
219
168
|
})),
|
|
220
|
-
title:
|
|
221
|
-
containerTypeText:
|
|
169
|
+
title: /*#__PURE__*/React.createElement(FormattedMessage, messages.addConfluenceContainerTitle),
|
|
170
|
+
containerTypeText: /*#__PURE__*/React.createElement(FormattedMessage, messages.spaceContainerTextOverride)
|
|
222
171
|
};
|
|
223
172
|
case 'LoomSpace':
|
|
224
173
|
return {
|
|
225
174
|
description: /*#__PURE__*/React.createElement(FormattedMessage, messages.loomSpaceDescription),
|
|
226
|
-
icon:
|
|
227
|
-
xcss: cx(styles.avatarWrapper, styles.avatarMargin)
|
|
228
|
-
}, /*#__PURE__*/React.createElement(Image, {
|
|
229
|
-
src: LoomIcon,
|
|
230
|
-
alt: "",
|
|
231
|
-
testId: "loom-space-container-icon"
|
|
232
|
-
})) : /*#__PURE__*/React.createElement(Flex, {
|
|
233
|
-
xcss: iconSize === 'medium' ? styles.mediumIconWrapper : styles.iconWrapper
|
|
175
|
+
icon: /*#__PURE__*/React.createElement(Flex, {
|
|
176
|
+
xcss: cx(iconSize === 'small' && isAfterIconSizeFixEnabled ? styles.smallAvatarWrapper : styles.avatarWrapper, iconSize === 'small' && isAfterIconSizeFixEnabled ? styles.smallAvatarMargin : styles.avatarMargin)
|
|
234
177
|
}, /*#__PURE__*/React.createElement(Image, {
|
|
235
178
|
src: LoomIcon,
|
|
236
179
|
alt: "",
|
|
237
180
|
testId: "loom-space-container-icon"
|
|
238
181
|
})),
|
|
239
|
-
title:
|
|
240
|
-
containerTypeText:
|
|
182
|
+
title: /*#__PURE__*/React.createElement(FormattedMessage, messages.addLoomSpace),
|
|
183
|
+
containerTypeText: /*#__PURE__*/React.createElement(FormattedMessage, messages.spaceContainerTextOverride)
|
|
241
184
|
};
|
|
242
185
|
case 'JiraProject':
|
|
243
186
|
return getJiraContainerProperties({
|
|
@@ -14,36 +14,16 @@ export declare const messages: {
|
|
|
14
14
|
defaultMessage: string;
|
|
15
15
|
description: string;
|
|
16
16
|
};
|
|
17
|
-
addConfluenceSpace: {
|
|
18
|
-
id: string;
|
|
19
|
-
defaultMessage: string;
|
|
20
|
-
description: string;
|
|
21
|
-
};
|
|
22
17
|
confluenceContainerDescription: {
|
|
23
18
|
id: string;
|
|
24
19
|
defaultMessage: string;
|
|
25
20
|
description: string;
|
|
26
21
|
};
|
|
27
|
-
addLoomContainerTitle: {
|
|
28
|
-
id: string;
|
|
29
|
-
defaultMessage: string;
|
|
30
|
-
description: string;
|
|
31
|
-
};
|
|
32
22
|
addLoomSpace: {
|
|
33
23
|
id: string;
|
|
34
24
|
defaultMessage: string;
|
|
35
25
|
description: string;
|
|
36
26
|
};
|
|
37
|
-
confluenceLoomDescription: {
|
|
38
|
-
id: string;
|
|
39
|
-
defaultMessage: string;
|
|
40
|
-
description: string;
|
|
41
|
-
};
|
|
42
|
-
addJiraProjectTitle: {
|
|
43
|
-
id: string;
|
|
44
|
-
defaultMessage: string;
|
|
45
|
-
description: string;
|
|
46
|
-
};
|
|
47
27
|
addJiraProject: {
|
|
48
28
|
id: string;
|
|
49
29
|
defaultMessage: string;
|
|
@@ -54,26 +34,11 @@ export declare const messages: {
|
|
|
54
34
|
defaultMessage: string;
|
|
55
35
|
description: string;
|
|
56
36
|
};
|
|
57
|
-
addLoomSpaceTitle: {
|
|
58
|
-
id: string;
|
|
59
|
-
defaultMessage: string;
|
|
60
|
-
description: string;
|
|
61
|
-
};
|
|
62
37
|
loomSpaceDescription: {
|
|
63
38
|
id: string;
|
|
64
39
|
defaultMessage: string;
|
|
65
40
|
description: string;
|
|
66
41
|
};
|
|
67
|
-
projectContainerText: {
|
|
68
|
-
id: string;
|
|
69
|
-
defaultMessage: string;
|
|
70
|
-
description: string;
|
|
71
|
-
};
|
|
72
|
-
spaceContainerText: {
|
|
73
|
-
id: string;
|
|
74
|
-
defaultMessage: string;
|
|
75
|
-
description: string;
|
|
76
|
-
};
|
|
77
42
|
spaceContainerTextOverride: {
|
|
78
43
|
id: string;
|
|
79
44
|
defaultMessage: string;
|
|
@@ -14,36 +14,16 @@ export declare const messages: {
|
|
|
14
14
|
defaultMessage: string;
|
|
15
15
|
description: string;
|
|
16
16
|
};
|
|
17
|
-
addConfluenceSpace: {
|
|
18
|
-
id: string;
|
|
19
|
-
defaultMessage: string;
|
|
20
|
-
description: string;
|
|
21
|
-
};
|
|
22
17
|
confluenceContainerDescription: {
|
|
23
18
|
id: string;
|
|
24
19
|
defaultMessage: string;
|
|
25
20
|
description: string;
|
|
26
21
|
};
|
|
27
|
-
addLoomContainerTitle: {
|
|
28
|
-
id: string;
|
|
29
|
-
defaultMessage: string;
|
|
30
|
-
description: string;
|
|
31
|
-
};
|
|
32
22
|
addLoomSpace: {
|
|
33
23
|
id: string;
|
|
34
24
|
defaultMessage: string;
|
|
35
25
|
description: string;
|
|
36
26
|
};
|
|
37
|
-
confluenceLoomDescription: {
|
|
38
|
-
id: string;
|
|
39
|
-
defaultMessage: string;
|
|
40
|
-
description: string;
|
|
41
|
-
};
|
|
42
|
-
addJiraProjectTitle: {
|
|
43
|
-
id: string;
|
|
44
|
-
defaultMessage: string;
|
|
45
|
-
description: string;
|
|
46
|
-
};
|
|
47
27
|
addJiraProject: {
|
|
48
28
|
id: string;
|
|
49
29
|
defaultMessage: string;
|
|
@@ -54,26 +34,11 @@ export declare const messages: {
|
|
|
54
34
|
defaultMessage: string;
|
|
55
35
|
description: string;
|
|
56
36
|
};
|
|
57
|
-
addLoomSpaceTitle: {
|
|
58
|
-
id: string;
|
|
59
|
-
defaultMessage: string;
|
|
60
|
-
description: string;
|
|
61
|
-
};
|
|
62
37
|
loomSpaceDescription: {
|
|
63
38
|
id: string;
|
|
64
39
|
defaultMessage: string;
|
|
65
40
|
description: string;
|
|
66
41
|
};
|
|
67
|
-
projectContainerText: {
|
|
68
|
-
id: string;
|
|
69
|
-
defaultMessage: string;
|
|
70
|
-
description: string;
|
|
71
|
-
};
|
|
72
|
-
spaceContainerText: {
|
|
73
|
-
id: string;
|
|
74
|
-
defaultMessage: string;
|
|
75
|
-
description: string;
|
|
76
|
-
};
|
|
77
42
|
spaceContainerTextOverride: {
|
|
78
43
|
id: string;
|
|
79
44
|
defaultMessage: string;
|
package/package.json
CHANGED
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
}
|
|
110
110
|
},
|
|
111
111
|
"name": "@atlaskit/teams-public",
|
|
112
|
-
"version": "0.
|
|
112
|
+
"version": "0.68.0",
|
|
113
113
|
"description": "Public components related to teams",
|
|
114
114
|
"author": "Atlassian Pty Ltd",
|
|
115
115
|
"license": "Apache-2.0",
|
|
@@ -138,6 +138,9 @@
|
|
|
138
138
|
},
|
|
139
139
|
"enable-fix-team-container-height": {
|
|
140
140
|
"type": "boolean"
|
|
141
|
+
},
|
|
142
|
+
"ptc-fix-containers-after-icon-size": {
|
|
143
|
+
"type": "boolean"
|
|
141
144
|
}
|
|
142
145
|
}
|
|
143
146
|
}
|