@atlaskit/profilecard 24.21.2 → 24.21.4
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 +13 -0
- package/afm-jira/tsconfig.json +1 -1
- package/dist/cjs/client/getTeamFromAGG.js +1 -1
- package/dist/cjs/components/Team/TeamProfileCard.js +13 -3
- package/dist/cjs/messages.js +5 -0
- package/dist/cjs/styled/CoverImage.compiled.css +1 -0
- package/dist/cjs/styled/CoverImage.js +6 -3
- package/dist/cjs/styled/TeamCard.js +8 -2
- package/dist/cjs/styled/TeamTrigger.compiled.css +1 -0
- package/dist/cjs/styled/TeamTrigger.js +7 -4
- package/dist/es2019/client/getTeamFromAGG.js +1 -0
- package/dist/es2019/components/Team/TeamProfileCard.js +14 -4
- package/dist/es2019/messages.js +5 -0
- package/dist/es2019/styled/CoverImage.compiled.css +1 -0
- package/dist/es2019/styled/CoverImage.js +6 -3
- package/dist/es2019/styled/TeamCard.js +6 -2
- package/dist/es2019/styled/TeamTrigger.compiled.css +1 -0
- package/dist/es2019/styled/TeamTrigger.js +7 -4
- package/dist/esm/client/getTeamFromAGG.js +1 -1
- package/dist/esm/components/Team/TeamProfileCard.js +14 -4
- package/dist/esm/messages.js +5 -0
- package/dist/esm/styled/CoverImage.compiled.css +1 -0
- package/dist/esm/styled/CoverImage.js +6 -3
- package/dist/esm/styled/TeamCard.js +8 -2
- package/dist/esm/styled/TeamTrigger.compiled.css +1 -0
- package/dist/esm/styled/TeamTrigger.js +7 -4
- package/dist/types/client/getTeamFromAGG.d.ts +1 -1
- package/dist/types/messages.d.ts +5 -0
- package/dist/types/styled/CoverImage.d.ts +2 -1
- package/dist/types/styled/TeamCard.d.ts +3 -0
- package/dist/types/styled/TeamTrigger.d.ts +2 -1
- package/dist/types/types.d.ts +1 -0
- package/dist/types-ts4.5/client/getTeamFromAGG.d.ts +1 -1
- package/dist/types-ts4.5/messages.d.ts +5 -0
- package/dist/types-ts4.5/styled/CoverImage.d.ts +2 -1
- package/dist/types-ts4.5/styled/TeamCard.d.ts +3 -0
- package/dist/types-ts4.5/styled/TeamTrigger.d.ts +2 -1
- package/dist/types-ts4.5/types.d.ts +1 -0
- package/package.json +10 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/profilecard
|
|
2
2
|
|
|
3
|
+
## 24.21.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`33e177c779f4a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/33e177c779f4a) -
|
|
8
|
+
[ux] Added fixes for archive team, hide actions, alignment fix on kebab menu in Team header
|
|
9
|
+
|
|
10
|
+
## 24.21.3
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
3
16
|
## 24.21.2
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/afm-jira/tsconfig.json
CHANGED
|
@@ -47,7 +47,7 @@ var convertTeam = exports.convertTeam = function convertTeam(result) {
|
|
|
47
47
|
};
|
|
48
48
|
|
|
49
49
|
// indented so it's
|
|
50
|
-
var TEAM_FRAGMENT = "\n id\n displayName\n description\n smallHeaderImageUrl\n largeHeaderImageUrl\n smallAvatarImageUrl\n largeAvatarImageUrl\n\t isVerified\n members {\n nodes {\n member {\n accountId\n name\n picture\n }\n }\n }\n";
|
|
50
|
+
var TEAM_FRAGMENT = "\n id\n displayName\n description\n smallHeaderImageUrl\n largeHeaderImageUrl\n smallAvatarImageUrl\n largeAvatarImageUrl\n\t isVerified\n\t state\n members {\n nodes {\n member {\n accountId\n name\n picture\n }\n }\n }\n";
|
|
51
51
|
|
|
52
52
|
// We alias the team node to always be team
|
|
53
53
|
var GATEWAY_QUERY_V2 = exports.GATEWAY_QUERY_V2 = "query TeamCard($teamId: ID!, $siteId: String!) {\n Team: team {\n team: teamV2(id: $teamId, siteId: $siteId) @optIn(to: \"Team-v2\") {\n ".concat(TEAM_FRAGMENT, "\n }\n }\n}");
|
|
@@ -15,7 +15,9 @@ var _reactIntlNext = require("react-intl-next");
|
|
|
15
15
|
var _avatar = _interopRequireDefault(require("@atlaskit/avatar"));
|
|
16
16
|
var _avatarGroup = _interopRequireDefault(require("@atlaskit/avatar-group"));
|
|
17
17
|
var _new = _interopRequireWildcard(require("@atlaskit/button/new"));
|
|
18
|
+
var _featureGateJsClient = _interopRequireDefault(require("@atlaskit/feature-gate-js-client"));
|
|
18
19
|
var _showMoreHorizontalMore = _interopRequireDefault(require("@atlaskit/icon/core/migration/show-more-horizontal--more"));
|
|
20
|
+
var _lozenge = _interopRequireDefault(require("@atlaskit/lozenge"));
|
|
19
21
|
var _menu = require("@atlaskit/menu");
|
|
20
22
|
var _verifiedTeamIcon = require("@atlaskit/people-teams-ui-public/verified-team-icon");
|
|
21
23
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
@@ -71,6 +73,7 @@ var TeamMembers = function TeamMembers(_ref) {
|
|
|
71
73
|
var analytics = _ref.analytics,
|
|
72
74
|
generateUserLink = _ref.generateUserLink,
|
|
73
75
|
members = _ref.members,
|
|
76
|
+
isArchived = _ref.isArchived,
|
|
74
77
|
onUserClick = _ref.onUserClick,
|
|
75
78
|
includingYou = _ref.includingYou,
|
|
76
79
|
analyticsNext = _ref.analyticsNext,
|
|
@@ -123,7 +126,10 @@ var TeamMembers = function TeamMembers(_ref) {
|
|
|
123
126
|
values: {
|
|
124
127
|
count: count
|
|
125
128
|
}
|
|
126
|
-
}))),
|
|
129
|
+
}))), isArchived && /*#__PURE__*/_react.default.createElement(_TeamCard.ArchiveLozengeWrapper, null, /*#__PURE__*/_react.default.createElement(_lozenge.default, {
|
|
130
|
+
appearance: "default",
|
|
131
|
+
isBold: true
|
|
132
|
+
}, /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.default.archivedLozenge))), members && members.length > 0 && /*#__PURE__*/_react.default.createElement(_TeamCard.AvatarSection, null, /*#__PURE__*/_react.default.createElement(_avatarGroup.default, {
|
|
127
133
|
appearance: "stack",
|
|
128
134
|
data: members.map(function (member, index) {
|
|
129
135
|
var href = generateUserLink === null || generateUserLink === void 0 ? void 0 : generateUserLink(member.id);
|
|
@@ -302,12 +308,14 @@ var TeamProfilecardContent = function TeamProfilecardContent(_ref5) {
|
|
|
302
308
|
viewProfileLink = _ref5.viewProfileLink,
|
|
303
309
|
viewProfileOnClick = _ref5.viewProfileOnClick,
|
|
304
310
|
isTriggeredByKeyboard = _ref5.isTriggeredByKeyboard;
|
|
311
|
+
var newTeamProfileEnabled = _featureGateJsClient.default.getExperimentValue('new_team_profile', 'isEnabled', false);
|
|
312
|
+
var isTeamArchived = team.state === 'DISBANDED' && (0, _platformFeatureFlags.fg)('legion-enable-archive-teams') && newTeamProfileEnabled;
|
|
305
313
|
var allActions = [{
|
|
306
314
|
label: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.default.teamViewProfile),
|
|
307
315
|
link: viewProfileLink,
|
|
308
316
|
callback: viewProfileOnClick,
|
|
309
317
|
id: 'view-profile'
|
|
310
|
-
}].concat((0, _toConsumableArray2.default)(actions || []));
|
|
318
|
+
}].concat((0, _toConsumableArray2.default)(isTeamArchived ? [] : actions || []));
|
|
311
319
|
var includingYou = team.members && team.members.some(function (member) {
|
|
312
320
|
return member.id === viewingUserId;
|
|
313
321
|
});
|
|
@@ -345,13 +353,15 @@ var TeamProfilecardContent = function TeamProfilecardContent(_ref5) {
|
|
|
345
353
|
testId: "team-profilecard"
|
|
346
354
|
}, /*#__PURE__*/_react.default.createElement(_TeamTrigger.CardHeader, {
|
|
347
355
|
image: team.largeHeaderImageUrl || team.smallHeaderImageUrl,
|
|
348
|
-
label: team.displayName
|
|
356
|
+
label: team.displayName,
|
|
357
|
+
isDisabled: isTeamArchived
|
|
349
358
|
}), /*#__PURE__*/_react.default.createElement(_TeamTrigger.CardContent, null, /*#__PURE__*/_react.default.createElement(_tooltip.default, {
|
|
350
359
|
content: team.displayName
|
|
351
360
|
}, /*#__PURE__*/_react.default.createElement(_compiled.Inline, null, /*#__PURE__*/_react.default.createElement(_TeamCard.TeamName, null, team.displayName), team.isVerified && /*#__PURE__*/_react.default.createElement(_verifiedTeamIcon.VerifiedTeamIcon, null))), /*#__PURE__*/_react.default.createElement(TeamMembers, {
|
|
352
361
|
analytics: analytics,
|
|
353
362
|
analyticsNext: analyticsNext,
|
|
354
363
|
members: team.members,
|
|
364
|
+
isArchived: isTeamArchived,
|
|
355
365
|
generateUserLink: generateUserLink,
|
|
356
366
|
includingYou: includingYou,
|
|
357
367
|
onUserClick: onUserClick,
|
package/dist/cjs/messages.js
CHANGED
|
@@ -186,6 +186,11 @@ var messages = (0, _reactIntlNext.defineMessages)({
|
|
|
186
186
|
id: 'pt.team.profile-card.members.more-icon-label',
|
|
187
187
|
defaultMessage: '+{count} more {count, plural, one {members} other {members}}',
|
|
188
188
|
description: 'Label for the "more members" indicator in the members section of the team profile card'
|
|
189
|
+
},
|
|
190
|
+
archivedLozenge: {
|
|
191
|
+
id: 'pt.team-profile-card.archived-lozenge',
|
|
192
|
+
defaultMessage: 'Archived',
|
|
193
|
+
description: 'Lozenge to indicate that a team is archived'
|
|
189
194
|
}
|
|
190
195
|
});
|
|
191
196
|
var _default = exports.default = messages;
|
|
@@ -9,13 +9,15 @@ exports.CoverImage = void 0;
|
|
|
9
9
|
require("./CoverImage.compiled.css");
|
|
10
10
|
var _runtime = require("@compiled/react/runtime");
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _css = require("@atlaskit/css");
|
|
12
13
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
14
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
14
15
|
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); }
|
|
15
16
|
var styles = {
|
|
16
17
|
container: "_1reo15vq _18m915vq _1bsb1osq _4t3i1qr7 _kqswh2mm _13li12b0 _qrwq12b0 _1e0c1txw _1bah1h6o _4cvr1h6o",
|
|
17
18
|
image: "_1bsbnklw _4t3i1wug",
|
|
18
|
-
imageNext: "_4t3i1osq _5ral1dfr"
|
|
19
|
+
imageNext: "_4t3i1osq _5ral1dfr",
|
|
20
|
+
grayoutImage: "_kdam7g3v"
|
|
19
21
|
};
|
|
20
22
|
|
|
21
23
|
/**
|
|
@@ -24,7 +26,8 @@ var styles = {
|
|
|
24
26
|
var CoverImage = exports.CoverImage = function CoverImage(_ref) {
|
|
25
27
|
var src = _ref.src,
|
|
26
28
|
_ref$alt = _ref.alt,
|
|
27
|
-
alt = _ref$alt === void 0 ? '' : _ref$alt
|
|
29
|
+
alt = _ref$alt === void 0 ? '' : _ref$alt,
|
|
30
|
+
isDisabled = _ref.isDisabled;
|
|
28
31
|
var containerRef = (0, _react.useRef)(null);
|
|
29
32
|
var imgRef = (0, _react.useRef)(null);
|
|
30
33
|
return /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
@@ -36,6 +39,6 @@ var CoverImage = exports.CoverImage = function CoverImage(_ref) {
|
|
|
36
39
|
ref: imgRef,
|
|
37
40
|
src: src,
|
|
38
41
|
alt: alt,
|
|
39
|
-
xcss: (0, _platformFeatureFlags.fg)('cover-header-image-team-profilecard') ? styles.imageNext : styles.image
|
|
42
|
+
xcss: (0, _css.cx)((0, _platformFeatureFlags.fg)('cover-header-image-team-profilecard') ? styles.imageNext : styles.image, isDisabled && styles.grayoutImage)
|
|
40
43
|
}));
|
|
41
44
|
};
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.WrappedButton = exports.TeamName = exports.TeamForbiddenErrorStateWrapper = exports.MoreButton = exports.MemberCount = exports.DescriptionWrapper = exports.Description = exports.AvatarSection = exports.ActionButtons = exports.AccessLockSVGWrapper = void 0;
|
|
8
|
+
exports.WrappedButton = exports.TeamName = exports.TeamForbiddenErrorStateWrapper = exports.MoreButton = exports.MemberCount = exports.DescriptionWrapper = exports.Description = exports.AvatarSection = exports.ArchiveLozengeWrapper = exports.ActionButtons = exports.AccessLockSVGWrapper = void 0;
|
|
9
9
|
require("./TeamCard.compiled.css");
|
|
10
10
|
var _runtime = require("@compiled/react/runtime");
|
|
11
11
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
@@ -25,7 +25,8 @@ var styles = {
|
|
|
25
25
|
actionbuttons: "_1bsb1osq _1e0c1txw _1bah1yb4 _19pk1ejb _2hwx10v4 _otyridpf _18u0x0bf",
|
|
26
26
|
wrappedbutton: "_i0dlidpf _16jlkb7n _18u0u2gc",
|
|
27
27
|
morebutton: "_18u0u2gc",
|
|
28
|
-
accesslocksvgwrapper: "_otyr1ejb"
|
|
28
|
+
accesslocksvgwrapper: "_otyr1ejb",
|
|
29
|
+
archiveLozengeWrapper: "_19pk1b66"
|
|
29
30
|
};
|
|
30
31
|
var TeamForbiddenErrorStateWrapper = exports.TeamForbiddenErrorStateWrapper = function TeamForbiddenErrorStateWrapper(props) {
|
|
31
32
|
return /*#__PURE__*/_react.default.createElement(_compiled.Box, (0, _extends2.default)({
|
|
@@ -85,4 +86,9 @@ var AccessLockSVGWrapper = exports.AccessLockSVGWrapper = function AccessLockSVG
|
|
|
85
86
|
return /*#__PURE__*/_react.default.createElement(_compiled.Box, (0, _extends2.default)({
|
|
86
87
|
xcss: (0, _css.cx)(styles.accesslocksvgwrapper)
|
|
87
88
|
}, props));
|
|
89
|
+
};
|
|
90
|
+
var ArchiveLozengeWrapper = exports.ArchiveLozengeWrapper = function ArchiveLozengeWrapper(props) {
|
|
91
|
+
return /*#__PURE__*/_react.default.createElement(_compiled.Inline, (0, _extends2.default)({
|
|
92
|
+
xcss: (0, _css.cx)(styles.archiveLozengeWrapper)
|
|
93
|
+
}, props));
|
|
88
94
|
};
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
._2lx21bp4{flex-direction:column}
|
|
10
10
|
._4t3i1qr7{height:8pc}
|
|
11
11
|
._ca0q1ejb{padding-top:var(--ds-space-300,24px)}
|
|
12
|
+
._kdam7g3v{filter:grayscale(100%)}
|
|
12
13
|
._kqswh2mm{position:relative}
|
|
13
14
|
._n3td1ejb{padding-bottom:var(--ds-space-300,24px)}
|
|
14
15
|
._otyr1jfw{margin-bottom:var(--ds-space-500,40px)}
|
|
@@ -18,7 +18,8 @@ var styles = {
|
|
|
18
18
|
cardwrapper: "_2rko12b0 _1bsbnklw _kqswh2mm",
|
|
19
19
|
cardheader: "_4t3i1qr7 _1bsb1osq",
|
|
20
20
|
cardcontent: "_1e0c1txw _2lx21bp4 _ca0q1ejb _u5f31ejb _n3td1ejb _19bv1ejb _1tke1l8a",
|
|
21
|
-
loadingwrapper: "_y3gn1h6o _19pk1jfw _otyr1jfw"
|
|
21
|
+
loadingwrapper: "_y3gn1h6o _19pk1jfw _otyr1jfw",
|
|
22
|
+
grayoutImage: "_kdam7g3v"
|
|
22
23
|
};
|
|
23
24
|
var CardTriggerWrapper = exports.CardTriggerWrapper = function CardTriggerWrapper() {
|
|
24
25
|
return /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
@@ -37,13 +38,15 @@ var CardWrapper = exports.CardWrapper = function CardWrapper(_ref) {
|
|
|
37
38
|
var CardHeader = exports.CardHeader = function CardHeader(_ref2) {
|
|
38
39
|
var image = _ref2.image,
|
|
39
40
|
isLoading = _ref2.isLoading,
|
|
40
|
-
label = _ref2.label
|
|
41
|
+
label = _ref2.label,
|
|
42
|
+
isDisabled = _ref2.isDisabled;
|
|
41
43
|
return isLoading || !image ? /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
42
|
-
xcss: (0, _css.cx)(styles.cardheader),
|
|
44
|
+
xcss: (0, _css.cx)(styles.cardheader, isDisabled && styles.grayoutImage),
|
|
43
45
|
backgroundColor: "color.background.neutral"
|
|
44
46
|
}) : /*#__PURE__*/_react.default.createElement(_CoverImage.CoverImage, {
|
|
45
47
|
alt: label || '',
|
|
46
|
-
src: image
|
|
48
|
+
src: image,
|
|
49
|
+
isDisabled: isDisabled
|
|
47
50
|
});
|
|
48
51
|
};
|
|
49
52
|
var CardContent = exports.CardContent = function CardContent(props) {
|
|
@@ -4,7 +4,9 @@ import { FormattedMessage, useIntl } from 'react-intl-next';
|
|
|
4
4
|
import Avatar from '@atlaskit/avatar';
|
|
5
5
|
import AvatarGroup from '@atlaskit/avatar-group';
|
|
6
6
|
import Button, { IconButton, LinkButton } from '@atlaskit/button/new';
|
|
7
|
+
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
7
8
|
import MoreIcon from '@atlaskit/icon/core/migration/show-more-horizontal--more';
|
|
9
|
+
import Lozenge from '@atlaskit/lozenge';
|
|
8
10
|
import { LinkItem, MenuGroup } from '@atlaskit/menu';
|
|
9
11
|
import { VerifiedTeamIcon } from '@atlaskit/people-teams-ui-public/verified-team-icon';
|
|
10
12
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
@@ -15,7 +17,7 @@ import Tooltip from '@atlaskit/tooltip';
|
|
|
15
17
|
import messages from '../../messages';
|
|
16
18
|
import { AnimatedKudosButton, AnimationWrapper, KudosBlobAnimation } from '../../styled/Card';
|
|
17
19
|
import { ErrorWrapper, TeamErrorText } from '../../styled/Error';
|
|
18
|
-
import { ActionButtons, AvatarSection, Description, DescriptionWrapper, MemberCount, MoreButton, TeamName, WrappedButton } from '../../styled/TeamCard';
|
|
20
|
+
import { ActionButtons, ArchiveLozengeWrapper, AvatarSection, Description, DescriptionWrapper, MemberCount, MoreButton, TeamName, WrappedButton } from '../../styled/TeamCard';
|
|
19
21
|
import { CardContent, CardHeader, CardWrapper } from '../../styled/TeamTrigger';
|
|
20
22
|
import { actionClicked, errorRetryClicked, moreActionsClicked, moreMembersClicked, PACKAGE_META_DATA, profileCardRendered, teamAvatarClicked } from '../../util/analytics';
|
|
21
23
|
import { isBasicClick } from '../../util/click';
|
|
@@ -54,6 +56,7 @@ const TeamMembers = ({
|
|
|
54
56
|
analytics,
|
|
55
57
|
generateUserLink,
|
|
56
58
|
members,
|
|
59
|
+
isArchived,
|
|
57
60
|
onUserClick,
|
|
58
61
|
includingYou,
|
|
59
62
|
analyticsNext,
|
|
@@ -107,7 +110,10 @@ const TeamMembers = ({
|
|
|
107
110
|
values: {
|
|
108
111
|
count
|
|
109
112
|
}
|
|
110
|
-
}))),
|
|
113
|
+
}))), isArchived && /*#__PURE__*/React.createElement(ArchiveLozengeWrapper, null, /*#__PURE__*/React.createElement(Lozenge, {
|
|
114
|
+
appearance: "default",
|
|
115
|
+
isBold: true
|
|
116
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.archivedLozenge))), members && members.length > 0 && /*#__PURE__*/React.createElement(AvatarSection, null, /*#__PURE__*/React.createElement(AvatarGroup, {
|
|
111
117
|
appearance: "stack",
|
|
112
118
|
data: members.map((member, index) => {
|
|
113
119
|
const href = generateUserLink === null || generateUserLink === void 0 ? void 0 : generateUserLink(member.id);
|
|
@@ -266,12 +272,14 @@ const TeamProfilecardContent = ({
|
|
|
266
272
|
viewProfileOnClick,
|
|
267
273
|
isTriggeredByKeyboard
|
|
268
274
|
}) => {
|
|
275
|
+
const newTeamProfileEnabled = FeatureGates.getExperimentValue('new_team_profile', 'isEnabled', false);
|
|
276
|
+
const isTeamArchived = team.state === 'DISBANDED' && fg('legion-enable-archive-teams') && newTeamProfileEnabled;
|
|
269
277
|
const allActions = [{
|
|
270
278
|
label: /*#__PURE__*/React.createElement(FormattedMessage, messages.teamViewProfile),
|
|
271
279
|
link: viewProfileLink,
|
|
272
280
|
callback: viewProfileOnClick,
|
|
273
281
|
id: 'view-profile'
|
|
274
|
-
}, ...(actions || [])];
|
|
282
|
+
}, ...(isTeamArchived ? [] : actions || [])];
|
|
275
283
|
const includingYou = team.members && team.members.some(member => member.id === viewingUserId);
|
|
276
284
|
useEffect(() => {
|
|
277
285
|
if (fg('ptc-enable-profile-card-analytics-refactor')) {
|
|
@@ -308,13 +316,15 @@ const TeamProfilecardContent = ({
|
|
|
308
316
|
testId: "team-profilecard"
|
|
309
317
|
}, /*#__PURE__*/React.createElement(CardHeader, {
|
|
310
318
|
image: team.largeHeaderImageUrl || team.smallHeaderImageUrl,
|
|
311
|
-
label: team.displayName
|
|
319
|
+
label: team.displayName,
|
|
320
|
+
isDisabled: isTeamArchived
|
|
312
321
|
}), /*#__PURE__*/React.createElement(CardContent, null, /*#__PURE__*/React.createElement(Tooltip, {
|
|
313
322
|
content: team.displayName
|
|
314
323
|
}, /*#__PURE__*/React.createElement(Inline, null, /*#__PURE__*/React.createElement(TeamName, null, team.displayName), team.isVerified && /*#__PURE__*/React.createElement(VerifiedTeamIcon, null))), /*#__PURE__*/React.createElement(TeamMembers, {
|
|
315
324
|
analytics: analytics,
|
|
316
325
|
analyticsNext: analyticsNext,
|
|
317
326
|
members: team.members,
|
|
327
|
+
isArchived: isTeamArchived,
|
|
318
328
|
generateUserLink: generateUserLink,
|
|
319
329
|
includingYou: includingYou,
|
|
320
330
|
onUserClick: onUserClick,
|
package/dist/es2019/messages.js
CHANGED
|
@@ -180,6 +180,11 @@ const messages = defineMessages({
|
|
|
180
180
|
id: 'pt.team.profile-card.members.more-icon-label',
|
|
181
181
|
defaultMessage: '+{count} more {count, plural, one {members} other {members}}',
|
|
182
182
|
description: 'Label for the "more members" indicator in the members section of the team profile card'
|
|
183
|
+
},
|
|
184
|
+
archivedLozenge: {
|
|
185
|
+
id: 'pt.team-profile-card.archived-lozenge',
|
|
186
|
+
defaultMessage: 'Archived',
|
|
187
|
+
description: 'Lozenge to indicate that a team is archived'
|
|
183
188
|
}
|
|
184
189
|
});
|
|
185
190
|
export default messages;
|
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
import "./CoverImage.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React, { useRef } from 'react';
|
|
5
|
+
import { cx } from '@atlaskit/css';
|
|
5
6
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
7
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
7
8
|
const styles = {
|
|
8
9
|
container: "_1reo15vq _18m915vq _1bsb1osq _4t3i1qr7 _kqswh2mm _13li12b0 _qrwq12b0 _1e0c1txw _1bah1h6o _4cvr1h6o",
|
|
9
10
|
image: "_1bsbnklw _4t3i1wug",
|
|
10
|
-
imageNext: "_4t3i1osq _5ral1dfr"
|
|
11
|
+
imageNext: "_4t3i1osq _5ral1dfr",
|
|
12
|
+
grayoutImage: "_kdam7g3v"
|
|
11
13
|
};
|
|
12
14
|
|
|
13
15
|
/**
|
|
@@ -15,7 +17,8 @@ const styles = {
|
|
|
15
17
|
*/
|
|
16
18
|
export const CoverImage = ({
|
|
17
19
|
src,
|
|
18
|
-
alt = ''
|
|
20
|
+
alt = '',
|
|
21
|
+
isDisabled
|
|
19
22
|
}) => {
|
|
20
23
|
const containerRef = useRef(null);
|
|
21
24
|
const imgRef = useRef(null);
|
|
@@ -28,6 +31,6 @@ export const CoverImage = ({
|
|
|
28
31
|
ref: imgRef,
|
|
29
32
|
src: src,
|
|
30
33
|
alt: alt,
|
|
31
|
-
xcss: fg('cover-header-image-team-profilecard') ? styles.imageNext : styles.image
|
|
34
|
+
xcss: cx(fg('cover-header-image-team-profilecard') ? styles.imageNext : styles.image, isDisabled && styles.grayoutImage)
|
|
32
35
|
}));
|
|
33
36
|
};
|
|
@@ -6,7 +6,7 @@ import React from 'react';
|
|
|
6
6
|
import { cx } from '@atlaskit/css';
|
|
7
7
|
import Heading from '@atlaskit/heading';
|
|
8
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
|
-
import { Box, Text } from '@atlaskit/primitives/compiled';
|
|
9
|
+
import { Box, Inline, Text } from '@atlaskit/primitives/compiled';
|
|
10
10
|
import { N200 } from '@atlaskit/theme/colors';
|
|
11
11
|
const styles = {
|
|
12
12
|
teamforbiddenerrorstatewrapper: "_1bsbnklw _kqswh2mm",
|
|
@@ -18,7 +18,8 @@ const styles = {
|
|
|
18
18
|
actionbuttons: "_1bsb1osq _1e0c1txw _1bah1yb4 _19pk1ejb _2hwx10v4 _otyridpf _18u0x0bf",
|
|
19
19
|
wrappedbutton: "_i0dlidpf _16jlkb7n _18u0u2gc",
|
|
20
20
|
morebutton: "_18u0u2gc",
|
|
21
|
-
accesslocksvgwrapper: "_otyr1ejb"
|
|
21
|
+
accesslocksvgwrapper: "_otyr1ejb",
|
|
22
|
+
archiveLozengeWrapper: "_19pk1b66"
|
|
22
23
|
};
|
|
23
24
|
export const TeamForbiddenErrorStateWrapper = props => /*#__PURE__*/React.createElement(Box, _extends({
|
|
24
25
|
xcss: cx(styles.teamforbiddenerrorstatewrapper)
|
|
@@ -58,4 +59,7 @@ export const MoreButton = props => /*#__PURE__*/React.createElement(Box, _extend
|
|
|
58
59
|
}, props));
|
|
59
60
|
export const AccessLockSVGWrapper = props => /*#__PURE__*/React.createElement(Box, _extends({
|
|
60
61
|
xcss: cx(styles.accesslocksvgwrapper)
|
|
62
|
+
}, props));
|
|
63
|
+
export const ArchiveLozengeWrapper = props => /*#__PURE__*/React.createElement(Inline, _extends({
|
|
64
|
+
xcss: cx(styles.archiveLozengeWrapper)
|
|
61
65
|
}, props));
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
._2lx21bp4{flex-direction:column}
|
|
10
10
|
._4t3i1qr7{height:8pc}
|
|
11
11
|
._ca0q1ejb{padding-top:var(--ds-space-300,24px)}
|
|
12
|
+
._kdam7g3v{filter:grayscale(100%)}
|
|
12
13
|
._kqswh2mm{position:relative}
|
|
13
14
|
._n3td1ejb{padding-bottom:var(--ds-space-300,24px)}
|
|
14
15
|
._otyr1jfw{margin-bottom:var(--ds-space-500,40px)}
|
|
@@ -11,7 +11,8 @@ const styles = {
|
|
|
11
11
|
cardwrapper: "_2rko12b0 _1bsbnklw _kqswh2mm",
|
|
12
12
|
cardheader: "_4t3i1qr7 _1bsb1osq",
|
|
13
13
|
cardcontent: "_1e0c1txw _2lx21bp4 _ca0q1ejb _u5f31ejb _n3td1ejb _19bv1ejb _1tke1l8a",
|
|
14
|
-
loadingwrapper: "_y3gn1h6o _19pk1jfw _otyr1jfw"
|
|
14
|
+
loadingwrapper: "_y3gn1h6o _19pk1jfw _otyr1jfw",
|
|
15
|
+
grayoutImage: "_kdam7g3v"
|
|
15
16
|
};
|
|
16
17
|
export const CardTriggerWrapper = () => /*#__PURE__*/React.createElement(Box, {
|
|
17
18
|
xcss: cx(styles.cardtriggerwrapper)
|
|
@@ -27,13 +28,15 @@ export const CardWrapper = ({
|
|
|
27
28
|
export const CardHeader = ({
|
|
28
29
|
image,
|
|
29
30
|
isLoading,
|
|
30
|
-
label
|
|
31
|
+
label,
|
|
32
|
+
isDisabled
|
|
31
33
|
}) => isLoading || !image ? /*#__PURE__*/React.createElement(Box, {
|
|
32
|
-
xcss: cx(styles.cardheader),
|
|
34
|
+
xcss: cx(styles.cardheader, isDisabled && styles.grayoutImage),
|
|
33
35
|
backgroundColor: "color.background.neutral"
|
|
34
36
|
}) : /*#__PURE__*/React.createElement(CoverImage, {
|
|
35
37
|
alt: label || '',
|
|
36
|
-
src: image
|
|
38
|
+
src: image,
|
|
39
|
+
isDisabled: isDisabled
|
|
37
40
|
});
|
|
38
41
|
export const CardContent = props => /*#__PURE__*/React.createElement(Box, _extends({
|
|
39
42
|
xcss: cx(styles.cardcontent)
|
|
@@ -40,7 +40,7 @@ export var convertTeam = function convertTeam(result) {
|
|
|
40
40
|
};
|
|
41
41
|
|
|
42
42
|
// indented so it's
|
|
43
|
-
var TEAM_FRAGMENT = "\n id\n displayName\n description\n smallHeaderImageUrl\n largeHeaderImageUrl\n smallAvatarImageUrl\n largeAvatarImageUrl\n\t isVerified\n members {\n nodes {\n member {\n accountId\n name\n picture\n }\n }\n }\n";
|
|
43
|
+
var TEAM_FRAGMENT = "\n id\n displayName\n description\n smallHeaderImageUrl\n largeHeaderImageUrl\n smallAvatarImageUrl\n largeAvatarImageUrl\n\t isVerified\n\t state\n members {\n nodes {\n member {\n accountId\n name\n picture\n }\n }\n }\n";
|
|
44
44
|
|
|
45
45
|
// We alias the team node to always be team
|
|
46
46
|
export var GATEWAY_QUERY_V2 = "query TeamCard($teamId: ID!, $siteId: String!) {\n Team: team {\n team: teamV2(id: $teamId, siteId: $siteId) @optIn(to: \"Team-v2\") {\n ".concat(TEAM_FRAGMENT, "\n }\n }\n}");
|
|
@@ -9,7 +9,9 @@ import { FormattedMessage, useIntl } from 'react-intl-next';
|
|
|
9
9
|
import Avatar from '@atlaskit/avatar';
|
|
10
10
|
import AvatarGroup from '@atlaskit/avatar-group';
|
|
11
11
|
import Button, { IconButton, LinkButton } from '@atlaskit/button/new';
|
|
12
|
+
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
12
13
|
import MoreIcon from '@atlaskit/icon/core/migration/show-more-horizontal--more';
|
|
14
|
+
import Lozenge from '@atlaskit/lozenge';
|
|
13
15
|
import { LinkItem, MenuGroup } from '@atlaskit/menu';
|
|
14
16
|
import { VerifiedTeamIcon } from '@atlaskit/people-teams-ui-public/verified-team-icon';
|
|
15
17
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
@@ -20,7 +22,7 @@ import Tooltip from '@atlaskit/tooltip';
|
|
|
20
22
|
import messages from '../../messages';
|
|
21
23
|
import { AnimatedKudosButton, AnimationWrapper, KudosBlobAnimation } from '../../styled/Card';
|
|
22
24
|
import { ErrorWrapper, TeamErrorText } from '../../styled/Error';
|
|
23
|
-
import { ActionButtons, AvatarSection, Description, DescriptionWrapper, MemberCount, MoreButton, TeamName, WrappedButton } from '../../styled/TeamCard';
|
|
25
|
+
import { ActionButtons, ArchiveLozengeWrapper, AvatarSection, Description, DescriptionWrapper, MemberCount, MoreButton, TeamName, WrappedButton } from '../../styled/TeamCard';
|
|
24
26
|
import { CardContent, CardHeader, CardWrapper } from '../../styled/TeamTrigger';
|
|
25
27
|
import { actionClicked, errorRetryClicked, moreActionsClicked, moreMembersClicked, PACKAGE_META_DATA, profileCardRendered, teamAvatarClicked } from '../../util/analytics';
|
|
26
28
|
import { isBasicClick } from '../../util/click';
|
|
@@ -62,6 +64,7 @@ var TeamMembers = function TeamMembers(_ref) {
|
|
|
62
64
|
var analytics = _ref.analytics,
|
|
63
65
|
generateUserLink = _ref.generateUserLink,
|
|
64
66
|
members = _ref.members,
|
|
67
|
+
isArchived = _ref.isArchived,
|
|
65
68
|
onUserClick = _ref.onUserClick,
|
|
66
69
|
includingYou = _ref.includingYou,
|
|
67
70
|
analyticsNext = _ref.analyticsNext,
|
|
@@ -114,7 +117,10 @@ var TeamMembers = function TeamMembers(_ref) {
|
|
|
114
117
|
values: {
|
|
115
118
|
count: count
|
|
116
119
|
}
|
|
117
|
-
}))),
|
|
120
|
+
}))), isArchived && /*#__PURE__*/React.createElement(ArchiveLozengeWrapper, null, /*#__PURE__*/React.createElement(Lozenge, {
|
|
121
|
+
appearance: "default",
|
|
122
|
+
isBold: true
|
|
123
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.archivedLozenge))), members && members.length > 0 && /*#__PURE__*/React.createElement(AvatarSection, null, /*#__PURE__*/React.createElement(AvatarGroup, {
|
|
118
124
|
appearance: "stack",
|
|
119
125
|
data: members.map(function (member, index) {
|
|
120
126
|
var href = generateUserLink === null || generateUserLink === void 0 ? void 0 : generateUserLink(member.id);
|
|
@@ -293,12 +299,14 @@ var TeamProfilecardContent = function TeamProfilecardContent(_ref5) {
|
|
|
293
299
|
viewProfileLink = _ref5.viewProfileLink,
|
|
294
300
|
viewProfileOnClick = _ref5.viewProfileOnClick,
|
|
295
301
|
isTriggeredByKeyboard = _ref5.isTriggeredByKeyboard;
|
|
302
|
+
var newTeamProfileEnabled = FeatureGates.getExperimentValue('new_team_profile', 'isEnabled', false);
|
|
303
|
+
var isTeamArchived = team.state === 'DISBANDED' && fg('legion-enable-archive-teams') && newTeamProfileEnabled;
|
|
296
304
|
var allActions = [{
|
|
297
305
|
label: /*#__PURE__*/React.createElement(FormattedMessage, messages.teamViewProfile),
|
|
298
306
|
link: viewProfileLink,
|
|
299
307
|
callback: viewProfileOnClick,
|
|
300
308
|
id: 'view-profile'
|
|
301
|
-
}].concat(_toConsumableArray(actions || []));
|
|
309
|
+
}].concat(_toConsumableArray(isTeamArchived ? [] : actions || []));
|
|
302
310
|
var includingYou = team.members && team.members.some(function (member) {
|
|
303
311
|
return member.id === viewingUserId;
|
|
304
312
|
});
|
|
@@ -336,13 +344,15 @@ var TeamProfilecardContent = function TeamProfilecardContent(_ref5) {
|
|
|
336
344
|
testId: "team-profilecard"
|
|
337
345
|
}, /*#__PURE__*/React.createElement(CardHeader, {
|
|
338
346
|
image: team.largeHeaderImageUrl || team.smallHeaderImageUrl,
|
|
339
|
-
label: team.displayName
|
|
347
|
+
label: team.displayName,
|
|
348
|
+
isDisabled: isTeamArchived
|
|
340
349
|
}), /*#__PURE__*/React.createElement(CardContent, null, /*#__PURE__*/React.createElement(Tooltip, {
|
|
341
350
|
content: team.displayName
|
|
342
351
|
}, /*#__PURE__*/React.createElement(Inline, null, /*#__PURE__*/React.createElement(TeamName, null, team.displayName), team.isVerified && /*#__PURE__*/React.createElement(VerifiedTeamIcon, null))), /*#__PURE__*/React.createElement(TeamMembers, {
|
|
343
352
|
analytics: analytics,
|
|
344
353
|
analyticsNext: analyticsNext,
|
|
345
354
|
members: team.members,
|
|
355
|
+
isArchived: isTeamArchived,
|
|
346
356
|
generateUserLink: generateUserLink,
|
|
347
357
|
includingYou: includingYou,
|
|
348
358
|
onUserClick: onUserClick,
|
package/dist/esm/messages.js
CHANGED
|
@@ -180,6 +180,11 @@ var messages = defineMessages({
|
|
|
180
180
|
id: 'pt.team.profile-card.members.more-icon-label',
|
|
181
181
|
defaultMessage: '+{count} more {count, plural, one {members} other {members}}',
|
|
182
182
|
description: 'Label for the "more members" indicator in the members section of the team profile card'
|
|
183
|
+
},
|
|
184
|
+
archivedLozenge: {
|
|
185
|
+
id: 'pt.team-profile-card.archived-lozenge',
|
|
186
|
+
defaultMessage: 'Archived',
|
|
187
|
+
description: 'Lozenge to indicate that a team is archived'
|
|
183
188
|
}
|
|
184
189
|
});
|
|
185
190
|
export default messages;
|
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
import "./CoverImage.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React, { useRef } from 'react';
|
|
5
|
+
import { cx } from '@atlaskit/css';
|
|
5
6
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
7
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
7
8
|
var styles = {
|
|
8
9
|
container: "_1reo15vq _18m915vq _1bsb1osq _4t3i1qr7 _kqswh2mm _13li12b0 _qrwq12b0 _1e0c1txw _1bah1h6o _4cvr1h6o",
|
|
9
10
|
image: "_1bsbnklw _4t3i1wug",
|
|
10
|
-
imageNext: "_4t3i1osq _5ral1dfr"
|
|
11
|
+
imageNext: "_4t3i1osq _5ral1dfr",
|
|
12
|
+
grayoutImage: "_kdam7g3v"
|
|
11
13
|
};
|
|
12
14
|
|
|
13
15
|
/**
|
|
@@ -16,7 +18,8 @@ var styles = {
|
|
|
16
18
|
export var CoverImage = function CoverImage(_ref) {
|
|
17
19
|
var src = _ref.src,
|
|
18
20
|
_ref$alt = _ref.alt,
|
|
19
|
-
alt = _ref$alt === void 0 ? '' : _ref$alt
|
|
21
|
+
alt = _ref$alt === void 0 ? '' : _ref$alt,
|
|
22
|
+
isDisabled = _ref.isDisabled;
|
|
20
23
|
var containerRef = useRef(null);
|
|
21
24
|
var imgRef = useRef(null);
|
|
22
25
|
return /*#__PURE__*/React.createElement(Box, {
|
|
@@ -28,6 +31,6 @@ export var CoverImage = function CoverImage(_ref) {
|
|
|
28
31
|
ref: imgRef,
|
|
29
32
|
src: src,
|
|
30
33
|
alt: alt,
|
|
31
|
-
xcss: fg('cover-header-image-team-profilecard') ? styles.imageNext : styles.image
|
|
34
|
+
xcss: cx(fg('cover-header-image-team-profilecard') ? styles.imageNext : styles.image, isDisabled && styles.grayoutImage)
|
|
32
35
|
}));
|
|
33
36
|
};
|
|
@@ -6,7 +6,7 @@ import React from 'react';
|
|
|
6
6
|
import { cx } from '@atlaskit/css';
|
|
7
7
|
import Heading from '@atlaskit/heading';
|
|
8
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
|
-
import { Box, Text } from '@atlaskit/primitives/compiled';
|
|
9
|
+
import { Box, Inline, Text } from '@atlaskit/primitives/compiled';
|
|
10
10
|
import { N200 } from '@atlaskit/theme/colors';
|
|
11
11
|
var styles = {
|
|
12
12
|
teamforbiddenerrorstatewrapper: "_1bsbnklw _kqswh2mm",
|
|
@@ -18,7 +18,8 @@ var styles = {
|
|
|
18
18
|
actionbuttons: "_1bsb1osq _1e0c1txw _1bah1yb4 _19pk1ejb _2hwx10v4 _otyridpf _18u0x0bf",
|
|
19
19
|
wrappedbutton: "_i0dlidpf _16jlkb7n _18u0u2gc",
|
|
20
20
|
morebutton: "_18u0u2gc",
|
|
21
|
-
accesslocksvgwrapper: "_otyr1ejb"
|
|
21
|
+
accesslocksvgwrapper: "_otyr1ejb",
|
|
22
|
+
archiveLozengeWrapper: "_19pk1b66"
|
|
22
23
|
};
|
|
23
24
|
export var TeamForbiddenErrorStateWrapper = function TeamForbiddenErrorStateWrapper(props) {
|
|
24
25
|
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
@@ -78,4 +79,9 @@ export var AccessLockSVGWrapper = function AccessLockSVGWrapper(props) {
|
|
|
78
79
|
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
79
80
|
xcss: cx(styles.accesslocksvgwrapper)
|
|
80
81
|
}, props));
|
|
82
|
+
};
|
|
83
|
+
export var ArchiveLozengeWrapper = function ArchiveLozengeWrapper(props) {
|
|
84
|
+
return /*#__PURE__*/React.createElement(Inline, _extends({
|
|
85
|
+
xcss: cx(styles.archiveLozengeWrapper)
|
|
86
|
+
}, props));
|
|
81
87
|
};
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
._2lx21bp4{flex-direction:column}
|
|
10
10
|
._4t3i1qr7{height:8pc}
|
|
11
11
|
._ca0q1ejb{padding-top:var(--ds-space-300,24px)}
|
|
12
|
+
._kdam7g3v{filter:grayscale(100%)}
|
|
12
13
|
._kqswh2mm{position:relative}
|
|
13
14
|
._n3td1ejb{padding-bottom:var(--ds-space-300,24px)}
|
|
14
15
|
._otyr1jfw{margin-bottom:var(--ds-space-500,40px)}
|
|
@@ -11,7 +11,8 @@ var styles = {
|
|
|
11
11
|
cardwrapper: "_2rko12b0 _1bsbnklw _kqswh2mm",
|
|
12
12
|
cardheader: "_4t3i1qr7 _1bsb1osq",
|
|
13
13
|
cardcontent: "_1e0c1txw _2lx21bp4 _ca0q1ejb _u5f31ejb _n3td1ejb _19bv1ejb _1tke1l8a",
|
|
14
|
-
loadingwrapper: "_y3gn1h6o _19pk1jfw _otyr1jfw"
|
|
14
|
+
loadingwrapper: "_y3gn1h6o _19pk1jfw _otyr1jfw",
|
|
15
|
+
grayoutImage: "_kdam7g3v"
|
|
15
16
|
};
|
|
16
17
|
export var CardTriggerWrapper = function CardTriggerWrapper() {
|
|
17
18
|
return /*#__PURE__*/React.createElement(Box, {
|
|
@@ -30,13 +31,15 @@ export var CardWrapper = function CardWrapper(_ref) {
|
|
|
30
31
|
export var CardHeader = function CardHeader(_ref2) {
|
|
31
32
|
var image = _ref2.image,
|
|
32
33
|
isLoading = _ref2.isLoading,
|
|
33
|
-
label = _ref2.label
|
|
34
|
+
label = _ref2.label,
|
|
35
|
+
isDisabled = _ref2.isDisabled;
|
|
34
36
|
return isLoading || !image ? /*#__PURE__*/React.createElement(Box, {
|
|
35
|
-
xcss: cx(styles.cardheader),
|
|
37
|
+
xcss: cx(styles.cardheader, isDisabled && styles.grayoutImage),
|
|
36
38
|
backgroundColor: "color.background.neutral"
|
|
37
39
|
}) : /*#__PURE__*/React.createElement(CoverImage, {
|
|
38
40
|
alt: label || '',
|
|
39
|
-
src: image
|
|
41
|
+
src: image,
|
|
42
|
+
isDisabled: isDisabled
|
|
40
43
|
});
|
|
41
44
|
};
|
|
42
45
|
export var CardContent = function CardContent(props) {
|
|
@@ -21,7 +21,7 @@ export declare const extractIdFromAri: (ari: string) => string;
|
|
|
21
21
|
export declare const idToAri: (teamId: string) => string;
|
|
22
22
|
export declare const idToAriSafe: (teamIdOrTeamAri: string) => string;
|
|
23
23
|
export declare const convertTeam: (result: AGGResult) => Team;
|
|
24
|
-
export declare const GATEWAY_QUERY_V2 = "query TeamCard($teamId: ID!, $siteId: String!) {\n Team: team {\n team: teamV2(id: $teamId, siteId: $siteId) @optIn(to: \"Team-v2\") {\n \n id\n displayName\n description\n smallHeaderImageUrl\n largeHeaderImageUrl\n smallAvatarImageUrl\n largeAvatarImageUrl\n\t isVerified\n members {\n nodes {\n member {\n accountId\n name\n picture\n }\n }\n }\n\n }\n }\n}";
|
|
24
|
+
export declare const GATEWAY_QUERY_V2 = "query TeamCard($teamId: ID!, $siteId: String!) {\n Team: team {\n team: teamV2(id: $teamId, siteId: $siteId) @optIn(to: \"Team-v2\") {\n \n id\n displayName\n description\n smallHeaderImageUrl\n largeHeaderImageUrl\n smallAvatarImageUrl\n largeAvatarImageUrl\n\t isVerified\n\t state\n members {\n nodes {\n member {\n accountId\n name\n picture\n }\n }\n }\n\n }\n }\n}";
|
|
25
25
|
type TeamQueryVariables = {
|
|
26
26
|
teamId: string;
|
|
27
27
|
siteId?: string;
|
package/dist/types/messages.d.ts
CHANGED
|
@@ -2,9 +2,10 @@ import React from 'react';
|
|
|
2
2
|
interface CoverImageProps {
|
|
3
3
|
src: string;
|
|
4
4
|
alt?: string;
|
|
5
|
+
isDisabled?: boolean;
|
|
5
6
|
}
|
|
6
7
|
/**
|
|
7
8
|
* This is instead of using background-image in CSS as design-system doesn't support that
|
|
8
9
|
*/
|
|
9
|
-
export declare const CoverImage: ({ src, alt }: CoverImageProps) => React.JSX.Element;
|
|
10
|
+
export declare const CoverImage: ({ src, alt, isDisabled }: CoverImageProps) => React.JSX.Element;
|
|
10
11
|
export {};
|
|
@@ -30,3 +30,6 @@ export declare const MoreButton: (props: {
|
|
|
30
30
|
export declare const AccessLockSVGWrapper: (props: {
|
|
31
31
|
children: React.ReactNode;
|
|
32
32
|
}) => React.JSX.Element;
|
|
33
|
+
export declare const ArchiveLozengeWrapper: (props: {
|
|
34
|
+
children: React.ReactNode;
|
|
35
|
+
}) => React.JSX.Element;
|
|
@@ -4,10 +4,11 @@ export declare const CardWrapper: ({ testId, children, }: {
|
|
|
4
4
|
testId?: string;
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
}) => React.JSX.Element;
|
|
7
|
-
export declare const CardHeader: ({ image, isLoading, label, }: {
|
|
7
|
+
export declare const CardHeader: ({ image, isLoading, label, isDisabled, }: {
|
|
8
8
|
image?: string;
|
|
9
9
|
isLoading?: boolean;
|
|
10
10
|
label?: string;
|
|
11
|
+
isDisabled?: boolean;
|
|
11
12
|
}) => React.JSX.Element;
|
|
12
13
|
export declare const CardContent: (props: {
|
|
13
14
|
children: React.ReactNode;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export declare const extractIdFromAri: (ari: string) => string;
|
|
|
21
21
|
export declare const idToAri: (teamId: string) => string;
|
|
22
22
|
export declare const idToAriSafe: (teamIdOrTeamAri: string) => string;
|
|
23
23
|
export declare const convertTeam: (result: AGGResult) => Team;
|
|
24
|
-
export declare const GATEWAY_QUERY_V2 = "query TeamCard($teamId: ID!, $siteId: String!) {\n Team: team {\n team: teamV2(id: $teamId, siteId: $siteId) @optIn(to: \"Team-v2\") {\n \n id\n displayName\n description\n smallHeaderImageUrl\n largeHeaderImageUrl\n smallAvatarImageUrl\n largeAvatarImageUrl\n\t isVerified\n members {\n nodes {\n member {\n accountId\n name\n picture\n }\n }\n }\n\n }\n }\n}";
|
|
24
|
+
export declare const GATEWAY_QUERY_V2 = "query TeamCard($teamId: ID!, $siteId: String!) {\n Team: team {\n team: teamV2(id: $teamId, siteId: $siteId) @optIn(to: \"Team-v2\") {\n \n id\n displayName\n description\n smallHeaderImageUrl\n largeHeaderImageUrl\n smallAvatarImageUrl\n largeAvatarImageUrl\n\t isVerified\n\t state\n members {\n nodes {\n member {\n accountId\n name\n picture\n }\n }\n }\n\n }\n }\n}";
|
|
25
25
|
type TeamQueryVariables = {
|
|
26
26
|
teamId: string;
|
|
27
27
|
siteId?: string;
|
|
@@ -2,9 +2,10 @@ import React from 'react';
|
|
|
2
2
|
interface CoverImageProps {
|
|
3
3
|
src: string;
|
|
4
4
|
alt?: string;
|
|
5
|
+
isDisabled?: boolean;
|
|
5
6
|
}
|
|
6
7
|
/**
|
|
7
8
|
* This is instead of using background-image in CSS as design-system doesn't support that
|
|
8
9
|
*/
|
|
9
|
-
export declare const CoverImage: ({ src, alt }: CoverImageProps) => React.JSX.Element;
|
|
10
|
+
export declare const CoverImage: ({ src, alt, isDisabled }: CoverImageProps) => React.JSX.Element;
|
|
10
11
|
export {};
|
|
@@ -30,3 +30,6 @@ export declare const MoreButton: (props: {
|
|
|
30
30
|
export declare const AccessLockSVGWrapper: (props: {
|
|
31
31
|
children: React.ReactNode;
|
|
32
32
|
}) => React.JSX.Element;
|
|
33
|
+
export declare const ArchiveLozengeWrapper: (props: {
|
|
34
|
+
children: React.ReactNode;
|
|
35
|
+
}) => React.JSX.Element;
|
|
@@ -4,10 +4,11 @@ export declare const CardWrapper: ({ testId, children, }: {
|
|
|
4
4
|
testId?: string;
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
}) => React.JSX.Element;
|
|
7
|
-
export declare const CardHeader: ({ image, isLoading, label, }: {
|
|
7
|
+
export declare const CardHeader: ({ image, isLoading, label, isDisabled, }: {
|
|
8
8
|
image?: string;
|
|
9
9
|
isLoading?: boolean;
|
|
10
10
|
label?: string;
|
|
11
|
+
isDisabled?: boolean;
|
|
11
12
|
}) => React.JSX.Element;
|
|
12
13
|
export declare const CardContent: (props: {
|
|
13
14
|
children: React.ReactNode;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/profilecard",
|
|
3
|
-
"version": "24.21.
|
|
3
|
+
"version": "24.21.4",
|
|
4
4
|
"description": "A React component to display a card with user information.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -56,22 +56,22 @@
|
|
|
56
56
|
"@atlaskit/logo": "^19.9.0",
|
|
57
57
|
"@atlaskit/lozenge": "^13.1.0",
|
|
58
58
|
"@atlaskit/menu": "^8.4.0",
|
|
59
|
-
"@atlaskit/modal-dialog": "^14.
|
|
60
|
-
"@atlaskit/people-teams-ui-public": "^3.
|
|
59
|
+
"@atlaskit/modal-dialog": "^14.7.0",
|
|
60
|
+
"@atlaskit/people-teams-ui-public": "^3.7.0",
|
|
61
61
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
62
62
|
"@atlaskit/platform-feature-flags-react": "^0.4.0",
|
|
63
63
|
"@atlaskit/popup": "^4.6.0",
|
|
64
64
|
"@atlaskit/primitives": "^16.1.0",
|
|
65
65
|
"@atlaskit/rovo-agent-components": "^3.11.0",
|
|
66
|
-
"@atlaskit/rovo-triggers": "^4.
|
|
66
|
+
"@atlaskit/rovo-triggers": "^4.3.0",
|
|
67
67
|
"@atlaskit/spinner": "^19.0.0",
|
|
68
68
|
"@atlaskit/teams-app-config": "^1.12.0",
|
|
69
|
-
"@atlaskit/teams-app-internal-analytics": "^1.
|
|
69
|
+
"@atlaskit/teams-app-internal-analytics": "^1.20.0",
|
|
70
70
|
"@atlaskit/teams-avatar": "^2.4.0",
|
|
71
|
-
"@atlaskit/teams-public": "^0.
|
|
71
|
+
"@atlaskit/teams-public": "^0.63.0",
|
|
72
72
|
"@atlaskit/theme": "^21.0.0",
|
|
73
73
|
"@atlaskit/tokens": "^8.0.0",
|
|
74
|
-
"@atlaskit/tooltip": "^20.
|
|
74
|
+
"@atlaskit/tooltip": "^20.10.0",
|
|
75
75
|
"@babel/runtime": "^7.0.0",
|
|
76
76
|
"@compiled/react": "^0.18.6",
|
|
77
77
|
"date-fns": "^2.17.0",
|
|
@@ -162,6 +162,9 @@
|
|
|
162
162
|
},
|
|
163
163
|
"agent_studio_permissions_settings_m3_profiles": {
|
|
164
164
|
"type": "boolean"
|
|
165
|
+
},
|
|
166
|
+
"legion-enable-archive-teams": {
|
|
167
|
+
"type": "boolean"
|
|
165
168
|
}
|
|
166
169
|
},
|
|
167
170
|
"sideEffects": [
|