@atlaskit/teams-public 0.67.2 → 0.68.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 +17 -0
- package/dist/cjs/common/ui/container-icon/index.js +1 -3
- 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/cjs/ui/team-containers/team-link-card/index.js +6 -8
- package/dist/es2019/common/ui/container-icon/index.js +1 -3
- 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/es2019/ui/team-containers/team-link-card/index.js +6 -8
- package/dist/esm/common/ui/container-icon/index.js +1 -3
- 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/esm/ui/team-containers/team-link-card/index.js +6 -8
- 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 +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/teams-public
|
|
2
2
|
|
|
3
|
+
## 0.68.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 0.68.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`daa158d9edf95`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/daa158d9edf95) -
|
|
14
|
+
Updated team container properties icon sizing
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 0.67.2
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -16,7 +16,6 @@ var _featureGateJsClient = _interopRequireDefault(require("@atlaskit/feature-gat
|
|
|
16
16
|
var _globe = _interopRequireDefault(require("@atlaskit/icon/core/globe"));
|
|
17
17
|
var _link = _interopRequireDefault(require("@atlaskit/icon/core/link"));
|
|
18
18
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
19
|
-
var _getIsExperimentEnabled = require("../../utils/get-is-experiment-enabled");
|
|
20
19
|
var _loomAvatar = require("../loom-avatar");
|
|
21
20
|
var styles = {
|
|
22
21
|
globeIconWrapperMedium: "_2rko1mok _1bsb1u1b _4t3i1u1b _1e0c1txw _4cvr1h6o _1bah1h6o _12ji1l7x _1qu2nqa1 _bfhkhfxm",
|
|
@@ -43,7 +42,6 @@ var ContainerIcon = exports.ContainerIcon = function ContainerIcon(_ref2) {
|
|
|
43
42
|
_ref2$iconHasLoaded = _ref2.iconHasLoaded,
|
|
44
43
|
iconHasLoaded = _ref2$iconHasLoaded === void 0 ? true : _ref2$iconHasLoaded;
|
|
45
44
|
var isMedium = size === 'medium';
|
|
46
|
-
var isTeamLensInHomeEnabled = (0, _getIsExperimentEnabled.getIsExperimentEnabled)('team_lens_in_atlassian_home');
|
|
47
45
|
var isNewTeamProfilePageEnabled = _featureGateJsClient.default.getExperimentValue('new_team_profile', 'isEnabled', false);
|
|
48
46
|
if (containerType === 'LoomSpace') {
|
|
49
47
|
return /*#__PURE__*/_react.default.createElement(_loomAvatar.LoomSpaceAvatar, {
|
|
@@ -55,7 +53,7 @@ var ContainerIcon = exports.ContainerIcon = function ContainerIcon(_ref2) {
|
|
|
55
53
|
|
|
56
54
|
// This is a fallback icon for WebLink if the containerIcon is not present
|
|
57
55
|
if (containerType === 'WebLink' && !containerIcon) {
|
|
58
|
-
if (
|
|
56
|
+
if (isNewTeamProfilePageEnabled) {
|
|
59
57
|
return /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
60
58
|
xcss: (0, _css.cx)(!isMedium && styles.linkIconWrapperSmall)
|
|
61
59
|
}, /*#__PURE__*/_react.default.createElement(_new.IconButton, {
|
|
@@ -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({
|
|
@@ -31,7 +31,6 @@ var _containerIcon = require("../../../common/ui/container-icon");
|
|
|
31
31
|
var _separator = require("../../../common/ui/separator");
|
|
32
32
|
var _teamLinkCardActions = require("../../../common/ui/team-link-card-actions");
|
|
33
33
|
var _getContainerProperties = require("../../../common/utils/get-container-properties");
|
|
34
|
-
var _getIsExperimentEnabled = require("../../../common/utils/get-is-experiment-enabled");
|
|
35
34
|
var _getLinkDomain = require("../../../common/utils/get-link-domain");
|
|
36
35
|
var _teamLinkCardTitle = require("./team-link-card-title");
|
|
37
36
|
var _excluded = ["triggerRef"];
|
|
@@ -105,9 +104,8 @@ var TeamLinkCard = exports.TeamLinkCard = function TeamLinkCard(_ref) {
|
|
|
105
104
|
formatMessage = _useIntl.formatMessage;
|
|
106
105
|
var _useAnalyticsEvents = (0, _teamsAppInternalAnalytics.useAnalyticsEvents)(),
|
|
107
106
|
fireEvent = _useAnalyticsEvents.fireEvent;
|
|
108
|
-
var isTeamLensInHomeEnabled = (0, _getIsExperimentEnabled.getIsExperimentEnabled)('team_lens_in_atlassian_home');
|
|
109
107
|
var isNewTeamProfilePageEnabled = _featureGateJsClient.default.getExperimentValue('new_team_profile', 'isEnabled', false);
|
|
110
|
-
var isOpenWebLinkInNewTabEnabled = containerType === 'WebLink' &&
|
|
108
|
+
var isOpenWebLinkInNewTabEnabled = containerType === 'WebLink' && isNewTeamProfilePageEnabled;
|
|
111
109
|
var handleMouseEnter = function handleMouseEnter() {
|
|
112
110
|
if (isReadOnly) {
|
|
113
111
|
return;
|
|
@@ -186,13 +184,13 @@ var TeamLinkCard = exports.TeamLinkCard = function TeamLinkCard(_ref) {
|
|
|
186
184
|
iconsLoading: iconsLoading,
|
|
187
185
|
iconHasLoaded: iconHasLoaded
|
|
188
186
|
}), (0, _platformFeatureFlags.fg)('fix_team_link_card_a11y') ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_compiled.Anchor, {
|
|
189
|
-
xcss: (0, _css.cx)(styles.anchor,
|
|
187
|
+
xcss: (0, _css.cx)(styles.anchor, styles.anchorNoUnderline, isOpenWebLinkInNewTabEnabled && styles.anchorWithExternalLinkIcon),
|
|
190
188
|
href: link || '#',
|
|
191
189
|
onClick: handleLinkClick,
|
|
192
190
|
testId: "team-link-card-linkable-content",
|
|
193
191
|
target: isOpenWebLinkInNewTabEnabled ? '_blank' : '_self'
|
|
194
192
|
}, /*#__PURE__*/_react.default.createElement(_compiled.Stack, null, /*#__PURE__*/_react.default.createElement(_teamLinkCardTitle.TeamLinkCardTitle, {
|
|
195
|
-
isTeamLensInHomeEnabled:
|
|
193
|
+
isTeamLensInHomeEnabled: true,
|
|
196
194
|
isOpenWebLinkInNewTabEnabled: isOpenWebLinkInNewTabEnabled,
|
|
197
195
|
link: link || '#',
|
|
198
196
|
handleLinkClick: handleLinkClick,
|
|
@@ -203,7 +201,7 @@ var TeamLinkCard = exports.TeamLinkCard = function TeamLinkCard(_ref) {
|
|
|
203
201
|
}, !hideSubTextIcon ? icon : null, /*#__PURE__*/_react.default.createElement(_compiled.Inline, {
|
|
204
202
|
space: "space.050",
|
|
205
203
|
alignBlock: "center"
|
|
206
|
-
}, isNewTeamProfilePageEnabled
|
|
204
|
+
}, isNewTeamProfilePageEnabled ? renderContainerTypeTextWithSeparator(containerTypeText, description) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_compiled.Text, {
|
|
207
205
|
size: "small",
|
|
208
206
|
color: "color.text.subtle"
|
|
209
207
|
}, description), /*#__PURE__*/_react.default.createElement(_compiled.Text, {
|
|
@@ -240,7 +238,7 @@ var TeamLinkCard = exports.TeamLinkCard = function TeamLinkCard(_ref) {
|
|
|
240
238
|
appearance: "subtle",
|
|
241
239
|
onClick: handleLinkClick
|
|
242
240
|
}, /*#__PURE__*/_react.default.createElement(_compiled.Stack, null, /*#__PURE__*/_react.default.createElement(_teamLinkCardTitle.TeamLinkCardTitle, {
|
|
243
|
-
isTeamLensInHomeEnabled:
|
|
241
|
+
isTeamLensInHomeEnabled: true,
|
|
244
242
|
isOpenWebLinkInNewTabEnabled: isOpenWebLinkInNewTabEnabled,
|
|
245
243
|
link: link || '#',
|
|
246
244
|
handleLinkClick: handleLinkClick,
|
|
@@ -251,7 +249,7 @@ var TeamLinkCard = exports.TeamLinkCard = function TeamLinkCard(_ref) {
|
|
|
251
249
|
}, !hideSubTextIcon ? icon : null, /*#__PURE__*/_react.default.createElement(_compiled.Inline, {
|
|
252
250
|
space: "space.050",
|
|
253
251
|
alignBlock: "center"
|
|
254
|
-
}, isNewTeamProfilePageEnabled
|
|
252
|
+
}, isNewTeamProfilePageEnabled ? renderContainerTypeTextWithSeparator(containerTypeText, description) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_compiled.Text, {
|
|
255
253
|
size: "small",
|
|
256
254
|
color: "color.text.subtle"
|
|
257
255
|
}, description), /*#__PURE__*/_react.default.createElement(_compiled.Text, {
|
|
@@ -9,7 +9,6 @@ import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
|
9
9
|
import GlobeIcon from '@atlaskit/icon/core/globe';
|
|
10
10
|
import LinkIcon from '@atlaskit/icon/core/link';
|
|
11
11
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
12
|
-
import { getIsExperimentEnabled } from '../../utils/get-is-experiment-enabled';
|
|
13
12
|
import { LoomSpaceAvatar } from '../loom-avatar';
|
|
14
13
|
const styles = {
|
|
15
14
|
globeIconWrapperMedium: "_2rko1mok _1bsb1u1b _4t3i1u1b _1e0c1txw _4cvr1h6o _1bah1h6o _12ji1l7x _1qu2nqa1 _bfhkhfxm",
|
|
@@ -35,7 +34,6 @@ export const ContainerIcon = ({
|
|
|
35
34
|
iconHasLoaded = true
|
|
36
35
|
}) => {
|
|
37
36
|
const isMedium = size === 'medium';
|
|
38
|
-
const isTeamLensInHomeEnabled = getIsExperimentEnabled('team_lens_in_atlassian_home');
|
|
39
37
|
const isNewTeamProfilePageEnabled = FeatureGates.getExperimentValue('new_team_profile', 'isEnabled', false);
|
|
40
38
|
if (containerType === 'LoomSpace') {
|
|
41
39
|
return /*#__PURE__*/React.createElement(LoomSpaceAvatar, {
|
|
@@ -47,7 +45,7 @@ export const ContainerIcon = ({
|
|
|
47
45
|
|
|
48
46
|
// This is a fallback icon for WebLink if the containerIcon is not present
|
|
49
47
|
if (containerType === 'WebLink' && !containerIcon) {
|
|
50
|
-
if (
|
|
48
|
+
if (isNewTeamProfilePageEnabled) {
|
|
51
49
|
return /*#__PURE__*/React.createElement(Box, {
|
|
52
50
|
xcss: cx(!isMedium && styles.linkIconWrapperSmall)
|
|
53
51
|
}, /*#__PURE__*/React.createElement(IconButton, {
|
|
@@ -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({
|
|
@@ -20,7 +20,6 @@ import { ContainerIcon } from '../../../common/ui/container-icon';
|
|
|
20
20
|
import { Separator } from '../../../common/ui/separator';
|
|
21
21
|
import { TeamLinkCardActions } from '../../../common/ui/team-link-card-actions';
|
|
22
22
|
import { getContainerProperties } from '../../../common/utils/get-container-properties';
|
|
23
|
-
import { getIsExperimentEnabled } from '../../../common/utils/get-is-experiment-enabled';
|
|
24
23
|
import { getDomainFromLinkUri } from '../../../common/utils/get-link-domain';
|
|
25
24
|
import { TeamLinkCardTitle } from './team-link-card-title';
|
|
26
25
|
const styles = {
|
|
@@ -79,9 +78,8 @@ export const TeamLinkCard = ({
|
|
|
79
78
|
const {
|
|
80
79
|
fireEvent
|
|
81
80
|
} = useAnalyticsEvents();
|
|
82
|
-
const isTeamLensInHomeEnabled = getIsExperimentEnabled('team_lens_in_atlassian_home');
|
|
83
81
|
const isNewTeamProfilePageEnabled = FeatureGates.getExperimentValue('new_team_profile', 'isEnabled', false);
|
|
84
|
-
const isOpenWebLinkInNewTabEnabled = containerType === 'WebLink' &&
|
|
82
|
+
const isOpenWebLinkInNewTabEnabled = containerType === 'WebLink' && isNewTeamProfilePageEnabled;
|
|
85
83
|
const handleMouseEnter = () => {
|
|
86
84
|
if (isReadOnly) {
|
|
87
85
|
return;
|
|
@@ -161,13 +159,13 @@ export const TeamLinkCard = ({
|
|
|
161
159
|
iconsLoading: iconsLoading,
|
|
162
160
|
iconHasLoaded: iconHasLoaded
|
|
163
161
|
}), fg('fix_team_link_card_a11y') ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Anchor, {
|
|
164
|
-
xcss: cx(styles.anchor,
|
|
162
|
+
xcss: cx(styles.anchor, styles.anchorNoUnderline, isOpenWebLinkInNewTabEnabled && styles.anchorWithExternalLinkIcon),
|
|
165
163
|
href: link || '#',
|
|
166
164
|
onClick: handleLinkClick,
|
|
167
165
|
testId: "team-link-card-linkable-content",
|
|
168
166
|
target: isOpenWebLinkInNewTabEnabled ? '_blank' : '_self'
|
|
169
167
|
}, /*#__PURE__*/React.createElement(Stack, null, /*#__PURE__*/React.createElement(TeamLinkCardTitle, {
|
|
170
|
-
isTeamLensInHomeEnabled:
|
|
168
|
+
isTeamLensInHomeEnabled: true,
|
|
171
169
|
isOpenWebLinkInNewTabEnabled: isOpenWebLinkInNewTabEnabled,
|
|
172
170
|
link: link || '#',
|
|
173
171
|
handleLinkClick: handleLinkClick,
|
|
@@ -178,7 +176,7 @@ export const TeamLinkCard = ({
|
|
|
178
176
|
}, !hideSubTextIcon ? icon : null, /*#__PURE__*/React.createElement(Inline, {
|
|
179
177
|
space: "space.050",
|
|
180
178
|
alignBlock: "center"
|
|
181
|
-
}, isNewTeamProfilePageEnabled
|
|
179
|
+
}, isNewTeamProfilePageEnabled ? renderContainerTypeTextWithSeparator(containerTypeText, description) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Text, {
|
|
182
180
|
size: "small",
|
|
183
181
|
color: "color.text.subtle"
|
|
184
182
|
}, description), /*#__PURE__*/React.createElement(Text, {
|
|
@@ -215,7 +213,7 @@ export const TeamLinkCard = ({
|
|
|
215
213
|
appearance: "subtle",
|
|
216
214
|
onClick: handleLinkClick
|
|
217
215
|
}, /*#__PURE__*/React.createElement(Stack, null, /*#__PURE__*/React.createElement(TeamLinkCardTitle, {
|
|
218
|
-
isTeamLensInHomeEnabled:
|
|
216
|
+
isTeamLensInHomeEnabled: true,
|
|
219
217
|
isOpenWebLinkInNewTabEnabled: isOpenWebLinkInNewTabEnabled,
|
|
220
218
|
link: link || '#',
|
|
221
219
|
handleLinkClick: handleLinkClick,
|
|
@@ -226,7 +224,7 @@ export const TeamLinkCard = ({
|
|
|
226
224
|
}, !hideSubTextIcon ? icon : null, /*#__PURE__*/React.createElement(Inline, {
|
|
227
225
|
space: "space.050",
|
|
228
226
|
alignBlock: "center"
|
|
229
|
-
}, isNewTeamProfilePageEnabled
|
|
227
|
+
}, isNewTeamProfilePageEnabled ? renderContainerTypeTextWithSeparator(containerTypeText, description) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Text, {
|
|
230
228
|
size: "small",
|
|
231
229
|
color: "color.text.subtle"
|
|
232
230
|
}, description), /*#__PURE__*/React.createElement(Text, {
|
|
@@ -9,7 +9,6 @@ import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
|
9
9
|
import GlobeIcon from '@atlaskit/icon/core/globe';
|
|
10
10
|
import LinkIcon from '@atlaskit/icon/core/link';
|
|
11
11
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
12
|
-
import { getIsExperimentEnabled } from '../../utils/get-is-experiment-enabled';
|
|
13
12
|
import { LoomSpaceAvatar } from '../loom-avatar';
|
|
14
13
|
var styles = {
|
|
15
14
|
globeIconWrapperMedium: "_2rko1mok _1bsb1u1b _4t3i1u1b _1e0c1txw _4cvr1h6o _1bah1h6o _12ji1l7x _1qu2nqa1 _bfhkhfxm",
|
|
@@ -36,7 +35,6 @@ export var ContainerIcon = function ContainerIcon(_ref2) {
|
|
|
36
35
|
_ref2$iconHasLoaded = _ref2.iconHasLoaded,
|
|
37
36
|
iconHasLoaded = _ref2$iconHasLoaded === void 0 ? true : _ref2$iconHasLoaded;
|
|
38
37
|
var isMedium = size === 'medium';
|
|
39
|
-
var isTeamLensInHomeEnabled = getIsExperimentEnabled('team_lens_in_atlassian_home');
|
|
40
38
|
var isNewTeamProfilePageEnabled = FeatureGates.getExperimentValue('new_team_profile', 'isEnabled', false);
|
|
41
39
|
if (containerType === 'LoomSpace') {
|
|
42
40
|
return /*#__PURE__*/React.createElement(LoomSpaceAvatar, {
|
|
@@ -48,7 +46,7 @@ export var ContainerIcon = function ContainerIcon(_ref2) {
|
|
|
48
46
|
|
|
49
47
|
// This is a fallback icon for WebLink if the containerIcon is not present
|
|
50
48
|
if (containerType === 'WebLink' && !containerIcon) {
|
|
51
|
-
if (
|
|
49
|
+
if (isNewTeamProfilePageEnabled) {
|
|
52
50
|
return /*#__PURE__*/React.createElement(Box, {
|
|
53
51
|
xcss: cx(!isMedium && styles.linkIconWrapperSmall)
|
|
54
52
|
}, /*#__PURE__*/React.createElement(IconButton, {
|
|
@@ -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({
|
|
@@ -26,7 +26,6 @@ import { ContainerIcon } from '../../../common/ui/container-icon';
|
|
|
26
26
|
import { Separator } from '../../../common/ui/separator';
|
|
27
27
|
import { TeamLinkCardActions } from '../../../common/ui/team-link-card-actions';
|
|
28
28
|
import { getContainerProperties } from '../../../common/utils/get-container-properties';
|
|
29
|
-
import { getIsExperimentEnabled } from '../../../common/utils/get-is-experiment-enabled';
|
|
30
29
|
import { getDomainFromLinkUri } from '../../../common/utils/get-link-domain';
|
|
31
30
|
import { TeamLinkCardTitle } from './team-link-card-title';
|
|
32
31
|
var styles = {
|
|
@@ -96,9 +95,8 @@ export var TeamLinkCard = function TeamLinkCard(_ref) {
|
|
|
96
95
|
formatMessage = _useIntl.formatMessage;
|
|
97
96
|
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
98
97
|
fireEvent = _useAnalyticsEvents.fireEvent;
|
|
99
|
-
var isTeamLensInHomeEnabled = getIsExperimentEnabled('team_lens_in_atlassian_home');
|
|
100
98
|
var isNewTeamProfilePageEnabled = FeatureGates.getExperimentValue('new_team_profile', 'isEnabled', false);
|
|
101
|
-
var isOpenWebLinkInNewTabEnabled = containerType === 'WebLink' &&
|
|
99
|
+
var isOpenWebLinkInNewTabEnabled = containerType === 'WebLink' && isNewTeamProfilePageEnabled;
|
|
102
100
|
var handleMouseEnter = function handleMouseEnter() {
|
|
103
101
|
if (isReadOnly) {
|
|
104
102
|
return;
|
|
@@ -177,13 +175,13 @@ export var TeamLinkCard = function TeamLinkCard(_ref) {
|
|
|
177
175
|
iconsLoading: iconsLoading,
|
|
178
176
|
iconHasLoaded: iconHasLoaded
|
|
179
177
|
}), fg('fix_team_link_card_a11y') ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Anchor, {
|
|
180
|
-
xcss: cx(styles.anchor,
|
|
178
|
+
xcss: cx(styles.anchor, styles.anchorNoUnderline, isOpenWebLinkInNewTabEnabled && styles.anchorWithExternalLinkIcon),
|
|
181
179
|
href: link || '#',
|
|
182
180
|
onClick: handleLinkClick,
|
|
183
181
|
testId: "team-link-card-linkable-content",
|
|
184
182
|
target: isOpenWebLinkInNewTabEnabled ? '_blank' : '_self'
|
|
185
183
|
}, /*#__PURE__*/React.createElement(Stack, null, /*#__PURE__*/React.createElement(TeamLinkCardTitle, {
|
|
186
|
-
isTeamLensInHomeEnabled:
|
|
184
|
+
isTeamLensInHomeEnabled: true,
|
|
187
185
|
isOpenWebLinkInNewTabEnabled: isOpenWebLinkInNewTabEnabled,
|
|
188
186
|
link: link || '#',
|
|
189
187
|
handleLinkClick: handleLinkClick,
|
|
@@ -194,7 +192,7 @@ export var TeamLinkCard = function TeamLinkCard(_ref) {
|
|
|
194
192
|
}, !hideSubTextIcon ? icon : null, /*#__PURE__*/React.createElement(Inline, {
|
|
195
193
|
space: "space.050",
|
|
196
194
|
alignBlock: "center"
|
|
197
|
-
}, isNewTeamProfilePageEnabled
|
|
195
|
+
}, isNewTeamProfilePageEnabled ? renderContainerTypeTextWithSeparator(containerTypeText, description) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Text, {
|
|
198
196
|
size: "small",
|
|
199
197
|
color: "color.text.subtle"
|
|
200
198
|
}, description), /*#__PURE__*/React.createElement(Text, {
|
|
@@ -231,7 +229,7 @@ export var TeamLinkCard = function TeamLinkCard(_ref) {
|
|
|
231
229
|
appearance: "subtle",
|
|
232
230
|
onClick: handleLinkClick
|
|
233
231
|
}, /*#__PURE__*/React.createElement(Stack, null, /*#__PURE__*/React.createElement(TeamLinkCardTitle, {
|
|
234
|
-
isTeamLensInHomeEnabled:
|
|
232
|
+
isTeamLensInHomeEnabled: true,
|
|
235
233
|
isOpenWebLinkInNewTabEnabled: isOpenWebLinkInNewTabEnabled,
|
|
236
234
|
link: link || '#',
|
|
237
235
|
handleLinkClick: handleLinkClick,
|
|
@@ -242,7 +240,7 @@ export var TeamLinkCard = function TeamLinkCard(_ref) {
|
|
|
242
240
|
}, !hideSubTextIcon ? icon : null, /*#__PURE__*/React.createElement(Inline, {
|
|
243
241
|
space: "space.050",
|
|
244
242
|
alignBlock: "center"
|
|
245
|
-
}, isNewTeamProfilePageEnabled
|
|
243
|
+
}, isNewTeamProfilePageEnabled ? renderContainerTypeTextWithSeparator(containerTypeText, description) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Text, {
|
|
246
244
|
size: "small",
|
|
247
245
|
color: "color.text.subtle"
|
|
248
246
|
}, description), /*#__PURE__*/React.createElement(Text, {
|
|
@@ -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
|
@@ -40,13 +40,13 @@
|
|
|
40
40
|
"@atlaskit/modal-dialog": "^14.10.0",
|
|
41
41
|
"@atlaskit/people-teams-ui-public": "^3.7.0",
|
|
42
42
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
43
|
-
"@atlaskit/primitives": "^
|
|
43
|
+
"@atlaskit/primitives": "^18.0.0",
|
|
44
44
|
"@atlaskit/skeleton": "^2.1.0",
|
|
45
45
|
"@atlaskit/teams-app-internal-analytics": "^1.23.0",
|
|
46
46
|
"@atlaskit/teams-app-internal-product-permissions": "^1.2.0",
|
|
47
47
|
"@atlaskit/teams-client": "^4.30.0",
|
|
48
48
|
"@atlaskit/theme": "^21.0.0",
|
|
49
|
-
"@atlaskit/tokens": "^
|
|
49
|
+
"@atlaskit/tokens": "^11.0.0",
|
|
50
50
|
"@atlaskit/tooltip": "^20.14.0",
|
|
51
51
|
"@babel/runtime": "^7.0.0",
|
|
52
52
|
"@compiled/react": "^0.18.6",
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
}
|
|
110
110
|
},
|
|
111
111
|
"name": "@atlaskit/teams-public",
|
|
112
|
-
"version": "0.
|
|
112
|
+
"version": "0.68.1",
|
|
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
|
}
|