@atlaskit/teams-public 0.62.4 → 0.62.5
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 +6 -0
- package/dist/cjs/common/ui/container-icon/index.js +2 -1
- package/dist/cjs/common/utils/get-container-properties.js +3 -2
- package/dist/cjs/common/utils/get-is-experiment-enabled.js +41 -0
- package/dist/cjs/index.js +8 -1
- package/dist/cjs/ui/team-containers/team-link-card/index.js +18 -11
- package/dist/cjs/ui/team-containers/team-link-card/team-link-card-title.compiled.css +7 -0
- package/dist/cjs/ui/team-containers/team-link-card/team-link-card-title.js +38 -0
- package/dist/es2019/common/ui/container-icon/index.js +2 -1
- package/dist/es2019/common/utils/get-container-properties.js +3 -2
- package/dist/es2019/common/utils/get-is-experiment-enabled.js +31 -0
- package/dist/es2019/index.js +2 -1
- package/dist/es2019/ui/team-containers/team-link-card/index.js +18 -11
- package/dist/es2019/ui/team-containers/team-link-card/team-link-card-title.compiled.css +7 -0
- package/dist/es2019/ui/team-containers/team-link-card/team-link-card-title.js +31 -0
- package/dist/esm/common/ui/container-icon/index.js +2 -1
- package/dist/esm/common/utils/get-container-properties.js +3 -2
- package/dist/esm/common/utils/get-is-experiment-enabled.js +34 -0
- package/dist/esm/index.js +2 -1
- package/dist/esm/ui/team-containers/team-link-card/index.js +18 -11
- package/dist/esm/ui/team-containers/team-link-card/team-link-card-title.compiled.css +7 -0
- package/dist/esm/ui/team-containers/team-link-card/team-link-card-title.js +31 -0
- package/dist/types/common/utils/get-is-experiment-enabled.d.ts +23 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/ui/team-containers/team-link-card/team-link-card-title.d.ts +9 -0
- package/dist/types-ts4.5/common/utils/get-is-experiment-enabled.d.ts +23 -0
- package/dist/types-ts4.5/index.d.ts +1 -0
- package/dist/types-ts4.5/ui/team-containers/team-link-card/team-link-card-title.d.ts +9 -0
- package/package.json +12 -18
package/CHANGELOG.md
CHANGED
|
@@ -16,6 +16,7 @@ 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");
|
|
19
20
|
var _loomAvatar = require("../loom-avatar");
|
|
20
21
|
var styles = {
|
|
21
22
|
globeIconWrapperMedium: "_2rko1mok _1bsb1u1b _4t3i1u1b _1e0c1txw _4cvr1h6o _1bah1h6o _12jimuej _1qu2nqa1 _bfhkqbzx",
|
|
@@ -42,7 +43,7 @@ var ContainerIcon = exports.ContainerIcon = function ContainerIcon(_ref2) {
|
|
|
42
43
|
_ref2$iconHasLoaded = _ref2.iconHasLoaded,
|
|
43
44
|
iconHasLoaded = _ref2$iconHasLoaded === void 0 ? true : _ref2$iconHasLoaded;
|
|
44
45
|
var isMedium = size === 'medium';
|
|
45
|
-
var isTeamLensInHomeEnabled =
|
|
46
|
+
var isTeamLensInHomeEnabled = (0, _getIsExperimentEnabled.getIsExperimentEnabled)('team_lens_in_atlassian_home');
|
|
46
47
|
var isNewTeamProfilePageEnabled = _featureGateJsClient.default.getExperimentValue('new_team_profile', 'isEnabled', false);
|
|
47
48
|
if (containerType === 'LoomSpace') {
|
|
48
49
|
return /*#__PURE__*/_react.default.createElement(_loomAvatar.LoomSpaceAvatar, {
|
|
@@ -22,6 +22,7 @@ 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");
|
|
25
26
|
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; }
|
|
26
27
|
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; }
|
|
27
28
|
var styles = {
|
|
@@ -134,7 +135,7 @@ var getJiraContainerProperties = function getJiraContainerProperties(_ref) {
|
|
|
134
135
|
_ref$iconSize = _ref.iconSize,
|
|
135
136
|
iconSize = _ref$iconSize === void 0 ? 'small' : _ref$iconSize;
|
|
136
137
|
var newTeamProfilePage = _featureGateJsClient.default.getExperimentValue('new_team_profile', 'isEnabled', false);
|
|
137
|
-
var isTeamLensInHomeEnabled =
|
|
138
|
+
var isTeamLensInHomeEnabled = (0, _getIsExperimentEnabled.getIsExperimentEnabled)('team_lens_in_atlassian_home');
|
|
138
139
|
var _ref2 = containerTypeProperties || {},
|
|
139
140
|
subType = _ref2.subType,
|
|
140
141
|
name = _ref2.name;
|
|
@@ -205,7 +206,7 @@ var getContainerProperties = exports.getContainerProperties = function getContai
|
|
|
205
206
|
isEmptyContainer = _ref4.isEmptyContainer,
|
|
206
207
|
isDisplayedOnProfileCard = _ref4.isDisplayedOnProfileCard;
|
|
207
208
|
var newTeamProfilePage = _featureGateJsClient.default.getExperimentValue('new_team_profile', 'isEnabled', false);
|
|
208
|
-
var isTeamLensInHomeEnabled =
|
|
209
|
+
var isTeamLensInHomeEnabled = (0, _getIsExperimentEnabled.getIsExperimentEnabled)('team_lens_in_atlassian_home');
|
|
209
210
|
switch (containerType) {
|
|
210
211
|
case 'ConfluenceSpace':
|
|
211
212
|
return {
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.getIsExperimentEnabled = exports.cohorts = exports.VARIATION = exports.VAR4 = exports.VAR3 = exports.VAR2 = exports.VAR1 = exports.NOT_ENROLLED = exports.EXPERIMENT = exports.DEFAULT_VALID_EXPERIMENT_COHORTS = exports.CONTROL = exports.COHORT_PARAMETER = void 0;
|
|
8
|
+
var _featureGateJsClient = _interopRequireDefault(require("@atlaskit/feature-gate-js-client"));
|
|
9
|
+
var COHORT_PARAMETER = exports.COHORT_PARAMETER = 'cohort';
|
|
10
|
+
var NOT_ENROLLED = exports.NOT_ENROLLED = 'not-enrolled';
|
|
11
|
+
var CONTROL = exports.CONTROL = 'control';
|
|
12
|
+
var EXPERIMENT = exports.EXPERIMENT = 'experiment';
|
|
13
|
+
var VARIATION = exports.VARIATION = 'variation';
|
|
14
|
+
var VAR1 = exports.VAR1 = 'variation_1';
|
|
15
|
+
var VAR2 = exports.VAR2 = 'variation_2';
|
|
16
|
+
var VAR3 = exports.VAR3 = 'variation_3';
|
|
17
|
+
var VAR4 = exports.VAR4 = 'variation_4';
|
|
18
|
+
var cohorts = exports.cohorts = {
|
|
19
|
+
NOT_ENROLLED: NOT_ENROLLED,
|
|
20
|
+
CONTROL: CONTROL,
|
|
21
|
+
EXPERIMENT: EXPERIMENT,
|
|
22
|
+
VARIATION: VARIATION,
|
|
23
|
+
VAR1: VAR1,
|
|
24
|
+
VAR2: VAR2,
|
|
25
|
+
VAR3: VAR3,
|
|
26
|
+
VAR4: VAR4
|
|
27
|
+
};
|
|
28
|
+
var DEFAULT_VALID_EXPERIMENT_COHORTS = exports.DEFAULT_VALID_EXPERIMENT_COHORTS = Object.values(cohorts);
|
|
29
|
+
var getIsExperimentEnabled = exports.getIsExperimentEnabled = function getIsExperimentEnabled(experimentName) {
|
|
30
|
+
var variantKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : VARIATION;
|
|
31
|
+
var validExperimentCohorts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : DEFAULT_VALID_EXPERIMENT_COHORTS;
|
|
32
|
+
var fireExperimentExposure = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
|
|
33
|
+
if (_featureGateJsClient.default.initializeCalled()) {
|
|
34
|
+
var cohort = _featureGateJsClient.default.getExperimentValue(experimentName, COHORT_PARAMETER, NOT_ENROLLED, {
|
|
35
|
+
fireExperimentExposure: fireExperimentExposure
|
|
36
|
+
});
|
|
37
|
+
var isValid = typeof cohort === 'string' && validExperimentCohorts.includes(cohort);
|
|
38
|
+
return (isValid ? cohort : NOT_ENROLLED) === variantKey;
|
|
39
|
+
}
|
|
40
|
+
return false;
|
|
41
|
+
};
|
package/dist/cjs/index.js
CHANGED
|
@@ -51,6 +51,12 @@ Object.defineProperty(exports, "getContainerProperties", {
|
|
|
51
51
|
return _getContainerProperties.getContainerProperties;
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
|
+
Object.defineProperty(exports, "getIsExperimentEnabled", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function get() {
|
|
57
|
+
return _getIsExperimentEnabled.getIsExperimentEnabled;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
54
60
|
Object.defineProperty(exports, "hasProductPermission", {
|
|
55
61
|
enumerable: true,
|
|
56
62
|
get: function get() {
|
|
@@ -110,4 +116,5 @@ var _useProductPermission = require("./controllers/hooks/use-product-permission"
|
|
|
110
116
|
var _utils = require("./controllers/product-permission/utils");
|
|
111
117
|
var _getContainerProperties = require("./common/utils/get-container-properties");
|
|
112
118
|
var _assets = require("./common/assets");
|
|
113
|
-
var _separator = require("./common/ui/separator");
|
|
119
|
+
var _separator = require("./common/ui/separator");
|
|
120
|
+
var _getIsExperimentEnabled = require("./common/utils/get-is-experiment-enabled");
|
|
@@ -33,7 +33,9 @@ var _separator = require("../../../common/ui/separator");
|
|
|
33
33
|
var _teamLinkCardActions = require("../../../common/ui/team-link-card-actions");
|
|
34
34
|
var _analytics = require("../../../common/utils/analytics");
|
|
35
35
|
var _getContainerProperties = require("../../../common/utils/get-container-properties");
|
|
36
|
+
var _getIsExperimentEnabled = require("../../../common/utils/get-is-experiment-enabled");
|
|
36
37
|
var _getLinkDomain = require("../../../common/utils/get-link-domain");
|
|
38
|
+
var _teamLinkCardTitle = require("./team-link-card-title");
|
|
37
39
|
var _excluded = ["triggerRef"];
|
|
38
40
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
39
41
|
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; }
|
|
@@ -109,7 +111,7 @@ var TeamLinkCard = exports.TeamLinkCard = function TeamLinkCard(_ref) {
|
|
|
109
111
|
fireUIEvent = _usePeopleAndTeamAnal.fireUIEvent;
|
|
110
112
|
var _useAnalyticsEventsNe = (0, _teamsAppInternalAnalytics.useAnalyticsEvents)(),
|
|
111
113
|
fireEvent = _useAnalyticsEventsNe.fireEvent;
|
|
112
|
-
var isTeamLensInHomeEnabled =
|
|
114
|
+
var isTeamLensInHomeEnabled = (0, _getIsExperimentEnabled.getIsExperimentEnabled)('team_lens_in_atlassian_home');
|
|
113
115
|
var isNewTeamProfilePageEnabled = _featureGateJsClient.default.getExperimentValue('new_team_profile', 'isEnabled', false);
|
|
114
116
|
var isOpenWebLinkInNewTabEnabled = containerType === 'WebLink' && (isNewTeamProfilePageEnabled || isTeamLensInHomeEnabled);
|
|
115
117
|
var handleMouseEnter = function handleMouseEnter() {
|
|
@@ -153,6 +155,7 @@ var TeamLinkCard = exports.TeamLinkCard = function TeamLinkCard(_ref) {
|
|
|
153
155
|
}
|
|
154
156
|
};
|
|
155
157
|
var handleLinkClick = function handleLinkClick(e) {
|
|
158
|
+
e.stopPropagation();
|
|
156
159
|
var baseAttributes = {
|
|
157
160
|
container: containerType,
|
|
158
161
|
containerId: containerId
|
|
@@ -203,11 +206,13 @@ var TeamLinkCard = exports.TeamLinkCard = function TeamLinkCard(_ref) {
|
|
|
203
206
|
onClick: handleLinkClick,
|
|
204
207
|
testId: "team-link-card-linkable-content",
|
|
205
208
|
target: isOpenWebLinkInNewTabEnabled ? '_blank' : '_self'
|
|
206
|
-
}, /*#__PURE__*/_react.default.createElement(_compiled.Stack, null, /*#__PURE__*/_react.default.createElement(
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
209
|
+
}, /*#__PURE__*/_react.default.createElement(_compiled.Stack, null, /*#__PURE__*/_react.default.createElement(_teamLinkCardTitle.TeamLinkCardTitle, {
|
|
210
|
+
isTeamLensInHomeEnabled: isTeamLensInHomeEnabled,
|
|
211
|
+
isOpenWebLinkInNewTabEnabled: isOpenWebLinkInNewTabEnabled,
|
|
212
|
+
link: link || '#',
|
|
213
|
+
handleLinkClick: handleLinkClick,
|
|
214
|
+
title: title
|
|
215
|
+
}), /*#__PURE__*/_react.default.createElement(_compiled.Flex, {
|
|
211
216
|
gap: "space.050",
|
|
212
217
|
alignItems: "center"
|
|
213
218
|
}, !hideSubTextIcon ? icon : null, /*#__PURE__*/_react.default.createElement(_compiled.Inline, {
|
|
@@ -249,11 +254,13 @@ var TeamLinkCard = exports.TeamLinkCard = function TeamLinkCard(_ref) {
|
|
|
249
254
|
href: link || '#',
|
|
250
255
|
appearance: "subtle",
|
|
251
256
|
onClick: handleLinkClick
|
|
252
|
-
}, /*#__PURE__*/_react.default.createElement(_compiled.Stack, null, /*#__PURE__*/_react.default.createElement(
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
+
}, /*#__PURE__*/_react.default.createElement(_compiled.Stack, null, /*#__PURE__*/_react.default.createElement(_teamLinkCardTitle.TeamLinkCardTitle, {
|
|
258
|
+
isTeamLensInHomeEnabled: isTeamLensInHomeEnabled,
|
|
259
|
+
isOpenWebLinkInNewTabEnabled: isOpenWebLinkInNewTabEnabled,
|
|
260
|
+
link: link || '#',
|
|
261
|
+
handleLinkClick: handleLinkClick,
|
|
262
|
+
title: title
|
|
263
|
+
}), /*#__PURE__*/_react.default.createElement(_compiled.Flex, {
|
|
257
264
|
gap: "space.050",
|
|
258
265
|
alignItems: "center"
|
|
259
266
|
}, !hideSubTextIcon ? icon : null, /*#__PURE__*/_react.default.createElement(_compiled.Inline, {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
|
|
2
|
+
._1hmsglyw{text-decoration-line:none}
|
|
3
|
+
._4bfu1r31{text-decoration-color:currentColor}
|
|
4
|
+
._ajmmnqa1{text-decoration-style:solid}._1bnx8stv:hover{text-decoration-line:underline}
|
|
5
|
+
._30l31fxt:hover{color:var(--ds-text,#172b4d)}
|
|
6
|
+
._9oik1r31:hover{text-decoration-color:currentColor}
|
|
7
|
+
._jf4cnqa1:hover{text-decoration-style:solid}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/* team-link-card-title.tsx generated by @compiled/babel-plugin v0.38.1 */
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.TeamLinkCardTitle = void 0;
|
|
9
|
+
require("./team-link-card-title.compiled.css");
|
|
10
|
+
var _runtime = require("@compiled/react/runtime");
|
|
11
|
+
var _react = _interopRequireDefault(require("react"));
|
|
12
|
+
var _compiled = require("@atlaskit/primitives/compiled");
|
|
13
|
+
var styles = {
|
|
14
|
+
anchorWithUnderline: "_4bfu1r31 _1hmsglyw _ajmmnqa1 _9oik1r31 _1bnx8stv _jf4cnqa1 _30l31fxt"
|
|
15
|
+
};
|
|
16
|
+
var TeamLinkCardTitle = exports.TeamLinkCardTitle = function TeamLinkCardTitle(_ref) {
|
|
17
|
+
var isTeamLensInHomeEnabled = _ref.isTeamLensInHomeEnabled,
|
|
18
|
+
isOpenWebLinkInNewTabEnabled = _ref.isOpenWebLinkInNewTabEnabled,
|
|
19
|
+
_ref$link = _ref.link,
|
|
20
|
+
link = _ref$link === void 0 ? '#' : _ref$link,
|
|
21
|
+
handleLinkClick = _ref.handleLinkClick,
|
|
22
|
+
title = _ref.title;
|
|
23
|
+
return isTeamLensInHomeEnabled ? /*#__PURE__*/_react.default.createElement(_compiled.Anchor, {
|
|
24
|
+
xcss: styles.anchorWithUnderline,
|
|
25
|
+
href: link,
|
|
26
|
+
onClick: handleLinkClick,
|
|
27
|
+
testId: "team-link-card-linkable-content",
|
|
28
|
+
target: isOpenWebLinkInNewTabEnabled ? '_blank' : '_self'
|
|
29
|
+
}, /*#__PURE__*/_react.default.createElement(_compiled.Text, {
|
|
30
|
+
maxLines: 1,
|
|
31
|
+
weight: "medium",
|
|
32
|
+
color: "color.text"
|
|
33
|
+
}, title)) : /*#__PURE__*/_react.default.createElement(_compiled.Text, {
|
|
34
|
+
maxLines: 1,
|
|
35
|
+
weight: "medium",
|
|
36
|
+
color: "color.text"
|
|
37
|
+
}, title);
|
|
38
|
+
};
|
|
@@ -9,6 +9,7 @@ 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';
|
|
12
13
|
import { LoomSpaceAvatar } from '../loom-avatar';
|
|
13
14
|
const styles = {
|
|
14
15
|
globeIconWrapperMedium: "_2rko1mok _1bsb1u1b _4t3i1u1b _1e0c1txw _4cvr1h6o _1bah1h6o _12jimuej _1qu2nqa1 _bfhkqbzx",
|
|
@@ -34,7 +35,7 @@ export const ContainerIcon = ({
|
|
|
34
35
|
iconHasLoaded = true
|
|
35
36
|
}) => {
|
|
36
37
|
const isMedium = size === 'medium';
|
|
37
|
-
const isTeamLensInHomeEnabled =
|
|
38
|
+
const isTeamLensInHomeEnabled = getIsExperimentEnabled('team_lens_in_atlassian_home');
|
|
38
39
|
const isNewTeamProfilePageEnabled = FeatureGates.getExperimentValue('new_team_profile', 'isEnabled', false);
|
|
39
40
|
if (containerType === 'LoomSpace') {
|
|
40
41
|
return /*#__PURE__*/React.createElement(LoomSpaceAvatar, {
|
|
@@ -14,6 +14,7 @@ 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';
|
|
17
18
|
const styles = {
|
|
18
19
|
iconWrapper: "_1bsb1crf _4t3i1crf",
|
|
19
20
|
avatarWrapper: "_1bsb1tcg _4t3i1tcg",
|
|
@@ -124,7 +125,7 @@ const getJiraContainerProperties = ({
|
|
|
124
125
|
iconSize = 'small'
|
|
125
126
|
}) => {
|
|
126
127
|
const newTeamProfilePage = FeatureGates.getExperimentValue('new_team_profile', 'isEnabled', false);
|
|
127
|
-
const isTeamLensInHomeEnabled =
|
|
128
|
+
const isTeamLensInHomeEnabled = getIsExperimentEnabled('team_lens_in_atlassian_home');
|
|
128
129
|
const {
|
|
129
130
|
subType,
|
|
130
131
|
name
|
|
@@ -198,7 +199,7 @@ export const getContainerProperties = ({
|
|
|
198
199
|
isDisplayedOnProfileCard
|
|
199
200
|
}) => {
|
|
200
201
|
const newTeamProfilePage = FeatureGates.getExperimentValue('new_team_profile', 'isEnabled', false);
|
|
201
|
-
const isTeamLensInHomeEnabled =
|
|
202
|
+
const isTeamLensInHomeEnabled = getIsExperimentEnabled('team_lens_in_atlassian_home');
|
|
202
203
|
switch (containerType) {
|
|
203
204
|
case 'ConfluenceSpace':
|
|
204
205
|
return {
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
2
|
+
export const COHORT_PARAMETER = 'cohort';
|
|
3
|
+
export const NOT_ENROLLED = 'not-enrolled';
|
|
4
|
+
export const CONTROL = 'control';
|
|
5
|
+
export const EXPERIMENT = 'experiment';
|
|
6
|
+
export const VARIATION = 'variation';
|
|
7
|
+
export const VAR1 = 'variation_1';
|
|
8
|
+
export const VAR2 = 'variation_2';
|
|
9
|
+
export const VAR3 = 'variation_3';
|
|
10
|
+
export const VAR4 = 'variation_4';
|
|
11
|
+
export const cohorts = {
|
|
12
|
+
NOT_ENROLLED,
|
|
13
|
+
CONTROL,
|
|
14
|
+
EXPERIMENT,
|
|
15
|
+
VARIATION,
|
|
16
|
+
VAR1,
|
|
17
|
+
VAR2,
|
|
18
|
+
VAR3,
|
|
19
|
+
VAR4
|
|
20
|
+
};
|
|
21
|
+
export const DEFAULT_VALID_EXPERIMENT_COHORTS = Object.values(cohorts);
|
|
22
|
+
export const getIsExperimentEnabled = (experimentName, variantKey = VARIATION, validExperimentCohorts = DEFAULT_VALID_EXPERIMENT_COHORTS, fireExperimentExposure = true) => {
|
|
23
|
+
if (FeatureGates.initializeCalled()) {
|
|
24
|
+
const cohort = FeatureGates.getExperimentValue(experimentName, COHORT_PARAMETER, NOT_ENROLLED, {
|
|
25
|
+
fireExperimentExposure
|
|
26
|
+
});
|
|
27
|
+
const isValid = typeof cohort === 'string' && validExperimentCohorts.includes(cohort);
|
|
28
|
+
return (isValid ? cohort : NOT_ENROLLED) === variantKey;
|
|
29
|
+
}
|
|
30
|
+
return false;
|
|
31
|
+
};
|
package/dist/es2019/index.js
CHANGED
|
@@ -9,4 +9,5 @@ export { useProductPermissions } from './controllers/hooks/use-product-permissio
|
|
|
9
9
|
export { hasProductPermission } from './controllers/product-permission/utils';
|
|
10
10
|
export { getContainerProperties } from './common/utils/get-container-properties';
|
|
11
11
|
export { ConfluenceIcon, JiraIcon, LoomIcon } from './common/assets';
|
|
12
|
-
export { Separator } from './common/ui/separator';
|
|
12
|
+
export { Separator } from './common/ui/separator';
|
|
13
|
+
export { getIsExperimentEnabled } from './common/utils/get-is-experiment-enabled';
|
|
@@ -22,7 +22,9 @@ import { Separator } from '../../../common/ui/separator';
|
|
|
22
22
|
import { TeamLinkCardActions } from '../../../common/ui/team-link-card-actions';
|
|
23
23
|
import { AnalyticsAction, usePeopleAndTeamAnalytics } from '../../../common/utils/analytics';
|
|
24
24
|
import { getContainerProperties } from '../../../common/utils/get-container-properties';
|
|
25
|
+
import { getIsExperimentEnabled } from '../../../common/utils/get-is-experiment-enabled';
|
|
25
26
|
import { getDomainFromLinkUri } from '../../../common/utils/get-link-domain';
|
|
27
|
+
import { TeamLinkCardTitle } from './team-link-card-title';
|
|
26
28
|
const styles = {
|
|
27
29
|
container: "_2rkoy0do _1h6dz9xs _12y3e4h9 _12jimuej _1qu2nqa1 _ca0qutpp _u5f3pxbi _n3tdutpp _19bvpxbi _syaz1fxt _bfhkhp5a _irr3108i",
|
|
28
30
|
card: "_4cvr1h6o _1bsb1osq",
|
|
@@ -85,7 +87,7 @@ export const TeamLinkCard = ({
|
|
|
85
87
|
const {
|
|
86
88
|
fireEvent
|
|
87
89
|
} = useAnalyticsEventsNext();
|
|
88
|
-
const isTeamLensInHomeEnabled =
|
|
90
|
+
const isTeamLensInHomeEnabled = getIsExperimentEnabled('team_lens_in_atlassian_home');
|
|
89
91
|
const isNewTeamProfilePageEnabled = FeatureGates.getExperimentValue('new_team_profile', 'isEnabled', false);
|
|
90
92
|
const isOpenWebLinkInNewTabEnabled = containerType === 'WebLink' && (isNewTeamProfilePageEnabled || isTeamLensInHomeEnabled);
|
|
91
93
|
const handleMouseEnter = () => {
|
|
@@ -129,6 +131,7 @@ export const TeamLinkCard = ({
|
|
|
129
131
|
}
|
|
130
132
|
};
|
|
131
133
|
const handleLinkClick = e => {
|
|
134
|
+
e.stopPropagation();
|
|
132
135
|
const baseAttributes = {
|
|
133
136
|
container: containerType,
|
|
134
137
|
containerId
|
|
@@ -180,11 +183,13 @@ export const TeamLinkCard = ({
|
|
|
180
183
|
onClick: handleLinkClick,
|
|
181
184
|
testId: "team-link-card-linkable-content",
|
|
182
185
|
target: isOpenWebLinkInNewTabEnabled ? '_blank' : '_self'
|
|
183
|
-
}, /*#__PURE__*/React.createElement(Stack, null, /*#__PURE__*/React.createElement(
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
186
|
+
}, /*#__PURE__*/React.createElement(Stack, null, /*#__PURE__*/React.createElement(TeamLinkCardTitle, {
|
|
187
|
+
isTeamLensInHomeEnabled: isTeamLensInHomeEnabled,
|
|
188
|
+
isOpenWebLinkInNewTabEnabled: isOpenWebLinkInNewTabEnabled,
|
|
189
|
+
link: link || '#',
|
|
190
|
+
handleLinkClick: handleLinkClick,
|
|
191
|
+
title: title
|
|
192
|
+
}), /*#__PURE__*/React.createElement(Flex, {
|
|
188
193
|
gap: "space.050",
|
|
189
194
|
alignItems: "center"
|
|
190
195
|
}, !hideSubTextIcon ? icon : null, /*#__PURE__*/React.createElement(Inline, {
|
|
@@ -226,11 +231,13 @@ export const TeamLinkCard = ({
|
|
|
226
231
|
href: link || '#',
|
|
227
232
|
appearance: "subtle",
|
|
228
233
|
onClick: handleLinkClick
|
|
229
|
-
}, /*#__PURE__*/React.createElement(Stack, null, /*#__PURE__*/React.createElement(
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
+
}, /*#__PURE__*/React.createElement(Stack, null, /*#__PURE__*/React.createElement(TeamLinkCardTitle, {
|
|
235
|
+
isTeamLensInHomeEnabled: isTeamLensInHomeEnabled,
|
|
236
|
+
isOpenWebLinkInNewTabEnabled: isOpenWebLinkInNewTabEnabled,
|
|
237
|
+
link: link || '#',
|
|
238
|
+
handleLinkClick: handleLinkClick,
|
|
239
|
+
title: title
|
|
240
|
+
}), /*#__PURE__*/React.createElement(Flex, {
|
|
234
241
|
gap: "space.050",
|
|
235
242
|
alignItems: "center"
|
|
236
243
|
}, !hideSubTextIcon ? icon : null, /*#__PURE__*/React.createElement(Inline, {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
|
|
2
|
+
._1hmsglyw{text-decoration-line:none}
|
|
3
|
+
._4bfu1r31{text-decoration-color:currentColor}
|
|
4
|
+
._ajmmnqa1{text-decoration-style:solid}._1bnx8stv:hover{text-decoration-line:underline}
|
|
5
|
+
._30l31fxt:hover{color:var(--ds-text,#172b4d)}
|
|
6
|
+
._9oik1r31:hover{text-decoration-color:currentColor}
|
|
7
|
+
._jf4cnqa1:hover{text-decoration-style:solid}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* team-link-card-title.tsx generated by @compiled/babel-plugin v0.38.1 */
|
|
2
|
+
import "./team-link-card-title.compiled.css";
|
|
3
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { Anchor, Text } from '@atlaskit/primitives/compiled';
|
|
6
|
+
const styles = {
|
|
7
|
+
anchorWithUnderline: "_4bfu1r31 _1hmsglyw _ajmmnqa1 _9oik1r31 _1bnx8stv _jf4cnqa1 _30l31fxt"
|
|
8
|
+
};
|
|
9
|
+
export const TeamLinkCardTitle = ({
|
|
10
|
+
isTeamLensInHomeEnabled,
|
|
11
|
+
isOpenWebLinkInNewTabEnabled,
|
|
12
|
+
link = '#',
|
|
13
|
+
handleLinkClick,
|
|
14
|
+
title
|
|
15
|
+
}) => {
|
|
16
|
+
return isTeamLensInHomeEnabled ? /*#__PURE__*/React.createElement(Anchor, {
|
|
17
|
+
xcss: styles.anchorWithUnderline,
|
|
18
|
+
href: link,
|
|
19
|
+
onClick: handleLinkClick,
|
|
20
|
+
testId: "team-link-card-linkable-content",
|
|
21
|
+
target: isOpenWebLinkInNewTabEnabled ? '_blank' : '_self'
|
|
22
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
23
|
+
maxLines: 1,
|
|
24
|
+
weight: "medium",
|
|
25
|
+
color: "color.text"
|
|
26
|
+
}, title)) : /*#__PURE__*/React.createElement(Text, {
|
|
27
|
+
maxLines: 1,
|
|
28
|
+
weight: "medium",
|
|
29
|
+
color: "color.text"
|
|
30
|
+
}, title);
|
|
31
|
+
};
|
|
@@ -9,6 +9,7 @@ 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';
|
|
12
13
|
import { LoomSpaceAvatar } from '../loom-avatar';
|
|
13
14
|
var styles = {
|
|
14
15
|
globeIconWrapperMedium: "_2rko1mok _1bsb1u1b _4t3i1u1b _1e0c1txw _4cvr1h6o _1bah1h6o _12jimuej _1qu2nqa1 _bfhkqbzx",
|
|
@@ -35,7 +36,7 @@ export var ContainerIcon = function ContainerIcon(_ref2) {
|
|
|
35
36
|
_ref2$iconHasLoaded = _ref2.iconHasLoaded,
|
|
36
37
|
iconHasLoaded = _ref2$iconHasLoaded === void 0 ? true : _ref2$iconHasLoaded;
|
|
37
38
|
var isMedium = size === 'medium';
|
|
38
|
-
var isTeamLensInHomeEnabled =
|
|
39
|
+
var isTeamLensInHomeEnabled = getIsExperimentEnabled('team_lens_in_atlassian_home');
|
|
39
40
|
var isNewTeamProfilePageEnabled = FeatureGates.getExperimentValue('new_team_profile', 'isEnabled', false);
|
|
40
41
|
if (containerType === 'LoomSpace') {
|
|
41
42
|
return /*#__PURE__*/React.createElement(LoomSpaceAvatar, {
|
|
@@ -17,6 +17,7 @@ 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';
|
|
20
21
|
var styles = {
|
|
21
22
|
iconWrapper: "_1bsb1crf _4t3i1crf",
|
|
22
23
|
avatarWrapper: "_1bsb1tcg _4t3i1tcg",
|
|
@@ -127,7 +128,7 @@ var getJiraContainerProperties = function getJiraContainerProperties(_ref) {
|
|
|
127
128
|
_ref$iconSize = _ref.iconSize,
|
|
128
129
|
iconSize = _ref$iconSize === void 0 ? 'small' : _ref$iconSize;
|
|
129
130
|
var newTeamProfilePage = FeatureGates.getExperimentValue('new_team_profile', 'isEnabled', false);
|
|
130
|
-
var isTeamLensInHomeEnabled =
|
|
131
|
+
var isTeamLensInHomeEnabled = getIsExperimentEnabled('team_lens_in_atlassian_home');
|
|
131
132
|
var _ref2 = containerTypeProperties || {},
|
|
132
133
|
subType = _ref2.subType,
|
|
133
134
|
name = _ref2.name;
|
|
@@ -198,7 +199,7 @@ export var getContainerProperties = function getContainerProperties(_ref4) {
|
|
|
198
199
|
isEmptyContainer = _ref4.isEmptyContainer,
|
|
199
200
|
isDisplayedOnProfileCard = _ref4.isDisplayedOnProfileCard;
|
|
200
201
|
var newTeamProfilePage = FeatureGates.getExperimentValue('new_team_profile', 'isEnabled', false);
|
|
201
|
-
var isTeamLensInHomeEnabled =
|
|
202
|
+
var isTeamLensInHomeEnabled = getIsExperimentEnabled('team_lens_in_atlassian_home');
|
|
202
203
|
switch (containerType) {
|
|
203
204
|
case 'ConfluenceSpace':
|
|
204
205
|
return {
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
2
|
+
export var COHORT_PARAMETER = 'cohort';
|
|
3
|
+
export var NOT_ENROLLED = 'not-enrolled';
|
|
4
|
+
export var CONTROL = 'control';
|
|
5
|
+
export var EXPERIMENT = 'experiment';
|
|
6
|
+
export var VARIATION = 'variation';
|
|
7
|
+
export var VAR1 = 'variation_1';
|
|
8
|
+
export var VAR2 = 'variation_2';
|
|
9
|
+
export var VAR3 = 'variation_3';
|
|
10
|
+
export var VAR4 = 'variation_4';
|
|
11
|
+
export var cohorts = {
|
|
12
|
+
NOT_ENROLLED: NOT_ENROLLED,
|
|
13
|
+
CONTROL: CONTROL,
|
|
14
|
+
EXPERIMENT: EXPERIMENT,
|
|
15
|
+
VARIATION: VARIATION,
|
|
16
|
+
VAR1: VAR1,
|
|
17
|
+
VAR2: VAR2,
|
|
18
|
+
VAR3: VAR3,
|
|
19
|
+
VAR4: VAR4
|
|
20
|
+
};
|
|
21
|
+
export var DEFAULT_VALID_EXPERIMENT_COHORTS = Object.values(cohorts);
|
|
22
|
+
export var getIsExperimentEnabled = function getIsExperimentEnabled(experimentName) {
|
|
23
|
+
var variantKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : VARIATION;
|
|
24
|
+
var validExperimentCohorts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : DEFAULT_VALID_EXPERIMENT_COHORTS;
|
|
25
|
+
var fireExperimentExposure = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
|
|
26
|
+
if (FeatureGates.initializeCalled()) {
|
|
27
|
+
var cohort = FeatureGates.getExperimentValue(experimentName, COHORT_PARAMETER, NOT_ENROLLED, {
|
|
28
|
+
fireExperimentExposure: fireExperimentExposure
|
|
29
|
+
});
|
|
30
|
+
var isValid = typeof cohort === 'string' && validExperimentCohorts.includes(cohort);
|
|
31
|
+
return (isValid ? cohort : NOT_ENROLLED) === variantKey;
|
|
32
|
+
}
|
|
33
|
+
return false;
|
|
34
|
+
};
|
package/dist/esm/index.js
CHANGED
|
@@ -9,4 +9,5 @@ export { useProductPermissions } from './controllers/hooks/use-product-permissio
|
|
|
9
9
|
export { hasProductPermission } from './controllers/product-permission/utils';
|
|
10
10
|
export { getContainerProperties } from './common/utils/get-container-properties';
|
|
11
11
|
export { ConfluenceIcon, JiraIcon, LoomIcon } from './common/assets';
|
|
12
|
-
export { Separator } from './common/ui/separator';
|
|
12
|
+
export { Separator } from './common/ui/separator';
|
|
13
|
+
export { getIsExperimentEnabled } from './common/utils/get-is-experiment-enabled';
|
|
@@ -28,7 +28,9 @@ import { Separator } from '../../../common/ui/separator';
|
|
|
28
28
|
import { TeamLinkCardActions } from '../../../common/ui/team-link-card-actions';
|
|
29
29
|
import { AnalyticsAction, usePeopleAndTeamAnalytics } from '../../../common/utils/analytics';
|
|
30
30
|
import { getContainerProperties } from '../../../common/utils/get-container-properties';
|
|
31
|
+
import { getIsExperimentEnabled } from '../../../common/utils/get-is-experiment-enabled';
|
|
31
32
|
import { getDomainFromLinkUri } from '../../../common/utils/get-link-domain';
|
|
33
|
+
import { TeamLinkCardTitle } from './team-link-card-title';
|
|
32
34
|
var styles = {
|
|
33
35
|
container: "_2rkoy0do _1h6dz9xs _12y3e4h9 _12jimuej _1qu2nqa1 _ca0qutpp _u5f3pxbi _n3tdutpp _19bvpxbi _syaz1fxt _bfhkhp5a _irr3108i",
|
|
34
36
|
card: "_4cvr1h6o _1bsb1osq",
|
|
@@ -100,7 +102,7 @@ export var TeamLinkCard = function TeamLinkCard(_ref) {
|
|
|
100
102
|
fireUIEvent = _usePeopleAndTeamAnal.fireUIEvent;
|
|
101
103
|
var _useAnalyticsEventsNe = useAnalyticsEventsNext(),
|
|
102
104
|
fireEvent = _useAnalyticsEventsNe.fireEvent;
|
|
103
|
-
var isTeamLensInHomeEnabled =
|
|
105
|
+
var isTeamLensInHomeEnabled = getIsExperimentEnabled('team_lens_in_atlassian_home');
|
|
104
106
|
var isNewTeamProfilePageEnabled = FeatureGates.getExperimentValue('new_team_profile', 'isEnabled', false);
|
|
105
107
|
var isOpenWebLinkInNewTabEnabled = containerType === 'WebLink' && (isNewTeamProfilePageEnabled || isTeamLensInHomeEnabled);
|
|
106
108
|
var handleMouseEnter = function handleMouseEnter() {
|
|
@@ -144,6 +146,7 @@ export var TeamLinkCard = function TeamLinkCard(_ref) {
|
|
|
144
146
|
}
|
|
145
147
|
};
|
|
146
148
|
var handleLinkClick = function handleLinkClick(e) {
|
|
149
|
+
e.stopPropagation();
|
|
147
150
|
var baseAttributes = {
|
|
148
151
|
container: containerType,
|
|
149
152
|
containerId: containerId
|
|
@@ -194,11 +197,13 @@ export var TeamLinkCard = function TeamLinkCard(_ref) {
|
|
|
194
197
|
onClick: handleLinkClick,
|
|
195
198
|
testId: "team-link-card-linkable-content",
|
|
196
199
|
target: isOpenWebLinkInNewTabEnabled ? '_blank' : '_self'
|
|
197
|
-
}, /*#__PURE__*/React.createElement(Stack, null, /*#__PURE__*/React.createElement(
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
200
|
+
}, /*#__PURE__*/React.createElement(Stack, null, /*#__PURE__*/React.createElement(TeamLinkCardTitle, {
|
|
201
|
+
isTeamLensInHomeEnabled: isTeamLensInHomeEnabled,
|
|
202
|
+
isOpenWebLinkInNewTabEnabled: isOpenWebLinkInNewTabEnabled,
|
|
203
|
+
link: link || '#',
|
|
204
|
+
handleLinkClick: handleLinkClick,
|
|
205
|
+
title: title
|
|
206
|
+
}), /*#__PURE__*/React.createElement(Flex, {
|
|
202
207
|
gap: "space.050",
|
|
203
208
|
alignItems: "center"
|
|
204
209
|
}, !hideSubTextIcon ? icon : null, /*#__PURE__*/React.createElement(Inline, {
|
|
@@ -240,11 +245,13 @@ export var TeamLinkCard = function TeamLinkCard(_ref) {
|
|
|
240
245
|
href: link || '#',
|
|
241
246
|
appearance: "subtle",
|
|
242
247
|
onClick: handleLinkClick
|
|
243
|
-
}, /*#__PURE__*/React.createElement(Stack, null, /*#__PURE__*/React.createElement(
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
+
}, /*#__PURE__*/React.createElement(Stack, null, /*#__PURE__*/React.createElement(TeamLinkCardTitle, {
|
|
249
|
+
isTeamLensInHomeEnabled: isTeamLensInHomeEnabled,
|
|
250
|
+
isOpenWebLinkInNewTabEnabled: isOpenWebLinkInNewTabEnabled,
|
|
251
|
+
link: link || '#',
|
|
252
|
+
handleLinkClick: handleLinkClick,
|
|
253
|
+
title: title
|
|
254
|
+
}), /*#__PURE__*/React.createElement(Flex, {
|
|
248
255
|
gap: "space.050",
|
|
249
256
|
alignItems: "center"
|
|
250
257
|
}, !hideSubTextIcon ? icon : null, /*#__PURE__*/React.createElement(Inline, {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
|
|
2
|
+
._1hmsglyw{text-decoration-line:none}
|
|
3
|
+
._4bfu1r31{text-decoration-color:currentColor}
|
|
4
|
+
._ajmmnqa1{text-decoration-style:solid}._1bnx8stv:hover{text-decoration-line:underline}
|
|
5
|
+
._30l31fxt:hover{color:var(--ds-text,#172b4d)}
|
|
6
|
+
._9oik1r31:hover{text-decoration-color:currentColor}
|
|
7
|
+
._jf4cnqa1:hover{text-decoration-style:solid}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* team-link-card-title.tsx generated by @compiled/babel-plugin v0.38.1 */
|
|
2
|
+
import "./team-link-card-title.compiled.css";
|
|
3
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { Anchor, Text } from '@atlaskit/primitives/compiled';
|
|
6
|
+
var styles = {
|
|
7
|
+
anchorWithUnderline: "_4bfu1r31 _1hmsglyw _ajmmnqa1 _9oik1r31 _1bnx8stv _jf4cnqa1 _30l31fxt"
|
|
8
|
+
};
|
|
9
|
+
export var TeamLinkCardTitle = function TeamLinkCardTitle(_ref) {
|
|
10
|
+
var isTeamLensInHomeEnabled = _ref.isTeamLensInHomeEnabled,
|
|
11
|
+
isOpenWebLinkInNewTabEnabled = _ref.isOpenWebLinkInNewTabEnabled,
|
|
12
|
+
_ref$link = _ref.link,
|
|
13
|
+
link = _ref$link === void 0 ? '#' : _ref$link,
|
|
14
|
+
handleLinkClick = _ref.handleLinkClick,
|
|
15
|
+
title = _ref.title;
|
|
16
|
+
return isTeamLensInHomeEnabled ? /*#__PURE__*/React.createElement(Anchor, {
|
|
17
|
+
xcss: styles.anchorWithUnderline,
|
|
18
|
+
href: link,
|
|
19
|
+
onClick: handleLinkClick,
|
|
20
|
+
testId: "team-link-card-linkable-content",
|
|
21
|
+
target: isOpenWebLinkInNewTabEnabled ? '_blank' : '_self'
|
|
22
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
23
|
+
maxLines: 1,
|
|
24
|
+
weight: "medium",
|
|
25
|
+
color: "color.text"
|
|
26
|
+
}, title)) : /*#__PURE__*/React.createElement(Text, {
|
|
27
|
+
maxLines: 1,
|
|
28
|
+
weight: "medium",
|
|
29
|
+
color: "color.text"
|
|
30
|
+
}, title);
|
|
31
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare const COHORT_PARAMETER = "cohort";
|
|
2
|
+
export declare const NOT_ENROLLED = "not-enrolled";
|
|
3
|
+
export declare const CONTROL = "control";
|
|
4
|
+
export declare const EXPERIMENT = "experiment";
|
|
5
|
+
export declare const VARIATION = "variation";
|
|
6
|
+
export declare const VAR1 = "variation_1";
|
|
7
|
+
export declare const VAR2 = "variation_2";
|
|
8
|
+
export declare const VAR3 = "variation_3";
|
|
9
|
+
export declare const VAR4 = "variation_4";
|
|
10
|
+
export declare const cohorts: {
|
|
11
|
+
readonly NOT_ENROLLED: "not-enrolled";
|
|
12
|
+
readonly CONTROL: "control";
|
|
13
|
+
readonly EXPERIMENT: "experiment";
|
|
14
|
+
readonly VARIATION: "variation";
|
|
15
|
+
readonly VAR1: "variation_1";
|
|
16
|
+
readonly VAR2: "variation_2";
|
|
17
|
+
readonly VAR3: "variation_3";
|
|
18
|
+
readonly VAR4: "variation_4";
|
|
19
|
+
};
|
|
20
|
+
export declare const DEFAULT_VALID_EXPERIMENT_COHORTS: ("not-enrolled" | "control" | "experiment" | "variation" | "variation_1" | "variation_2" | "variation_3" | "variation_4")[];
|
|
21
|
+
export type CohortKeys = keyof typeof cohorts;
|
|
22
|
+
export type Cohort = (typeof cohorts)[CohortKeys];
|
|
23
|
+
export declare const getIsExperimentEnabled: (experimentName: string, variantKey?: Cohort, validExperimentCohorts?: Cohort[], fireExperimentExposure?: boolean) => boolean;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -15,3 +15,4 @@ export { hasProductPermission } from './controllers/product-permission/utils';
|
|
|
15
15
|
export { getContainerProperties } from './common/utils/get-container-properties';
|
|
16
16
|
export { ConfluenceIcon, JiraIcon, LoomIcon } from './common/assets';
|
|
17
17
|
export { Separator } from './common/ui/separator';
|
|
18
|
+
export { getIsExperimentEnabled } from './common/utils/get-is-experiment-enabled';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface TeamLinkCardTitleProps {
|
|
3
|
+
isTeamLensInHomeEnabled: boolean;
|
|
4
|
+
isOpenWebLinkInNewTabEnabled: boolean;
|
|
5
|
+
link: string;
|
|
6
|
+
handleLinkClick: (e: React.MouseEvent<HTMLAnchorElement>) => void;
|
|
7
|
+
title: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const TeamLinkCardTitle: ({ isTeamLensInHomeEnabled, isOpenWebLinkInNewTabEnabled, link, handleLinkClick, title, }: TeamLinkCardTitleProps) => React.JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare const COHORT_PARAMETER = "cohort";
|
|
2
|
+
export declare const NOT_ENROLLED = "not-enrolled";
|
|
3
|
+
export declare const CONTROL = "control";
|
|
4
|
+
export declare const EXPERIMENT = "experiment";
|
|
5
|
+
export declare const VARIATION = "variation";
|
|
6
|
+
export declare const VAR1 = "variation_1";
|
|
7
|
+
export declare const VAR2 = "variation_2";
|
|
8
|
+
export declare const VAR3 = "variation_3";
|
|
9
|
+
export declare const VAR4 = "variation_4";
|
|
10
|
+
export declare const cohorts: {
|
|
11
|
+
readonly NOT_ENROLLED: "not-enrolled";
|
|
12
|
+
readonly CONTROL: "control";
|
|
13
|
+
readonly EXPERIMENT: "experiment";
|
|
14
|
+
readonly VARIATION: "variation";
|
|
15
|
+
readonly VAR1: "variation_1";
|
|
16
|
+
readonly VAR2: "variation_2";
|
|
17
|
+
readonly VAR3: "variation_3";
|
|
18
|
+
readonly VAR4: "variation_4";
|
|
19
|
+
};
|
|
20
|
+
export declare const DEFAULT_VALID_EXPERIMENT_COHORTS: ("not-enrolled" | "control" | "experiment" | "variation" | "variation_1" | "variation_2" | "variation_3" | "variation_4")[];
|
|
21
|
+
export type CohortKeys = keyof typeof cohorts;
|
|
22
|
+
export type Cohort = (typeof cohorts)[CohortKeys];
|
|
23
|
+
export declare const getIsExperimentEnabled: (experimentName: string, variantKey?: Cohort, validExperimentCohorts?: Cohort[], fireExperimentExposure?: boolean) => boolean;
|
|
@@ -15,3 +15,4 @@ export { hasProductPermission } from './controllers/product-permission/utils';
|
|
|
15
15
|
export { getContainerProperties } from './common/utils/get-container-properties';
|
|
16
16
|
export { ConfluenceIcon, JiraIcon, LoomIcon } from './common/assets';
|
|
17
17
|
export { Separator } from './common/ui/separator';
|
|
18
|
+
export { getIsExperimentEnabled } from './common/utils/get-is-experiment-enabled';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface TeamLinkCardTitleProps {
|
|
3
|
+
isTeamLensInHomeEnabled: boolean;
|
|
4
|
+
isOpenWebLinkInNewTabEnabled: boolean;
|
|
5
|
+
link: string;
|
|
6
|
+
handleLinkClick: (e: React.MouseEvent<HTMLAnchorElement>) => void;
|
|
7
|
+
title: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const TeamLinkCardTitle: ({ isTeamLensInHomeEnabled, isOpenWebLinkInNewTabEnabled, link, handleLinkClick, title, }: TeamLinkCardTitleProps) => React.JSX.Element;
|
package/package.json
CHANGED
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@atlaskit/afm-i18n-platform-people-and-teams-teams-public": "2.7.0",
|
|
28
28
|
"@atlaskit/analytics-next": "^11.1.0",
|
|
29
|
-
"@atlaskit/avatar": "^25.
|
|
30
|
-
"@atlaskit/button": "^23.
|
|
29
|
+
"@atlaskit/avatar": "^25.5.0",
|
|
30
|
+
"@atlaskit/button": "^23.6.0",
|
|
31
31
|
"@atlaskit/css": "^0.15.0",
|
|
32
32
|
"@atlaskit/dropdown-menu": "^16.3.0",
|
|
33
33
|
"@atlaskit/feature-gate-js-client": "^5.5.0",
|
|
@@ -35,21 +35,21 @@
|
|
|
35
35
|
"@atlaskit/frontend-utilities": "^3.2.0",
|
|
36
36
|
"@atlaskit/heading": "^5.2.0",
|
|
37
37
|
"@atlaskit/icon": "^28.5.0",
|
|
38
|
-
"@atlaskit/icon-lab": "^5.
|
|
38
|
+
"@atlaskit/icon-lab": "^5.11.0",
|
|
39
39
|
"@atlaskit/image": "^3.0.0",
|
|
40
40
|
"@atlaskit/link": "^3.2.0",
|
|
41
41
|
"@atlaskit/logo": "^19.9.0",
|
|
42
|
-
"@atlaskit/modal-dialog": "^14.
|
|
43
|
-
"@atlaskit/people-teams-ui-public": "^3.
|
|
42
|
+
"@atlaskit/modal-dialog": "^14.6.0",
|
|
43
|
+
"@atlaskit/people-teams-ui-public": "^3.6.0",
|
|
44
44
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
45
|
-
"@atlaskit/primitives": "^16.
|
|
45
|
+
"@atlaskit/primitives": "^16.1.0",
|
|
46
46
|
"@atlaskit/skeleton": "^2.1.0",
|
|
47
|
-
"@atlaskit/teams-app-internal-analytics": "^1.
|
|
47
|
+
"@atlaskit/teams-app-internal-analytics": "^1.19.0",
|
|
48
48
|
"@atlaskit/teams-app-internal-product-permissions": "^1.2.0",
|
|
49
|
-
"@atlaskit/teams-client": "^4.
|
|
49
|
+
"@atlaskit/teams-client": "^4.22.0",
|
|
50
50
|
"@atlaskit/theme": "^21.0.0",
|
|
51
|
-
"@atlaskit/tokens": "^
|
|
52
|
-
"@atlaskit/tooltip": "^20.
|
|
51
|
+
"@atlaskit/tokens": "^8.0.0",
|
|
52
|
+
"@atlaskit/tooltip": "^20.8.0",
|
|
53
53
|
"@babel/runtime": "^7.0.0",
|
|
54
54
|
"@compiled/react": "^0.18.6",
|
|
55
55
|
"@types/string-hash": "^1.1.3",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"@af/integration-testing": "workspace:^",
|
|
69
69
|
"@af/visual-regression": "workspace:^",
|
|
70
70
|
"@atlaskit/ssr": "workspace:^",
|
|
71
|
-
"@atlassian/feature-flags-test-utils": "^0.
|
|
71
|
+
"@atlassian/feature-flags-test-utils": "^1.0.0",
|
|
72
72
|
"@atlassian/ptc-test-utils": "^0.11.0",
|
|
73
73
|
"@testing-library/react": "^13.4.0",
|
|
74
74
|
"@testing-library/react-hooks": "^8.0.1",
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
}
|
|
112
112
|
},
|
|
113
113
|
"name": "@atlaskit/teams-public",
|
|
114
|
-
"version": "0.62.
|
|
114
|
+
"version": "0.62.5",
|
|
115
115
|
"description": "Public components related to teams",
|
|
116
116
|
"author": "Atlassian Pty Ltd",
|
|
117
117
|
"license": "Apache-2.0",
|
|
@@ -126,9 +126,6 @@
|
|
|
126
126
|
"enable_medium_size_icons_for_team_link_cards": {
|
|
127
127
|
"type": "boolean"
|
|
128
128
|
},
|
|
129
|
-
"should-render-to-parent-should-be-true-people-and-": {
|
|
130
|
-
"type": "boolean"
|
|
131
|
-
},
|
|
132
129
|
"enable_team_containers_null_check": {
|
|
133
130
|
"type": "boolean"
|
|
134
131
|
},
|
|
@@ -144,9 +141,6 @@
|
|
|
144
141
|
"prevent_parallel_team_web_links_fetch": {
|
|
145
142
|
"type": "boolean"
|
|
146
143
|
},
|
|
147
|
-
"enable_new_team_profile": {
|
|
148
|
-
"type": "boolean"
|
|
149
|
-
},
|
|
150
144
|
"ptc-enable-teams-public-analytics-refactor": {
|
|
151
145
|
"type": "boolean"
|
|
152
146
|
}
|