@atlaskit/profilecard 23.8.0 → 23.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/cjs/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/cjs/client/getTeamFromAGG.js +1 -1
- package/dist/cjs/components/team-profile-card/main.js +9 -2
- package/dist/cjs/components/team-profile-card/team-actions/index.compiled.css +7 -0
- package/dist/cjs/components/team-profile-card/team-actions/index.js +71 -0
- package/dist/cjs/components/team-profile-card/team-actions/messages.js +19 -0
- package/dist/cjs/components/team-profile-card/team-actions/more-actions/index.js +59 -0
- package/dist/cjs/components/team-profile-card/team-actions/more-actions/messages.js +14 -0
- package/dist/cjs/util/analytics.js +1 -1
- package/dist/es2019/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/es2019/client/getTeamFromAGG.js +1 -1
- package/dist/es2019/components/team-profile-card/main.js +9 -2
- package/dist/es2019/components/team-profile-card/team-actions/index.compiled.css +7 -0
- package/dist/es2019/components/team-profile-card/team-actions/index.js +63 -0
- package/dist/es2019/components/team-profile-card/team-actions/messages.js +13 -0
- package/dist/es2019/components/team-profile-card/team-actions/more-actions/index.js +37 -0
- package/dist/es2019/components/team-profile-card/team-actions/more-actions/messages.js +8 -0
- package/dist/es2019/util/analytics.js +1 -1
- package/dist/esm/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/esm/client/getTeamFromAGG.js +1 -1
- package/dist/esm/components/team-profile-card/main.js +9 -2
- package/dist/esm/components/team-profile-card/team-actions/index.compiled.css +7 -0
- package/dist/esm/components/team-profile-card/team-actions/index.js +61 -0
- package/dist/esm/components/team-profile-card/team-actions/messages.js +13 -0
- package/dist/esm/components/team-profile-card/team-actions/more-actions/index.js +49 -0
- package/dist/esm/components/team-profile-card/team-actions/more-actions/messages.js +8 -0
- package/dist/esm/util/analytics.js +1 -1
- package/dist/types/components/team-profile-card/main.d.ts +11 -2
- package/dist/types/components/team-profile-card/team-actions/index.d.ts +9 -0
- package/dist/types/components/team-profile-card/team-actions/messages.d.ts +12 -0
- package/dist/types/components/team-profile-card/team-actions/more-actions/index.d.ts +10 -0
- package/dist/types/components/team-profile-card/team-actions/more-actions/messages.d.ts +7 -0
- package/dist/types-ts4.5/components/team-profile-card/main.d.ts +11 -2
- package/dist/types-ts4.5/components/team-profile-card/team-actions/index.d.ts +9 -0
- package/dist/types-ts4.5/components/team-profile-card/team-actions/messages.d.ts +12 -0
- package/dist/types-ts4.5/components/team-profile-card/team-actions/more-actions/index.d.ts +10 -0
- package/dist/types-ts4.5/components/team-profile-card/team-actions/more-actions/messages.d.ts +7 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/profilecard
|
|
2
2
|
|
|
3
|
+
## 23.9.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#145365](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/145365)
|
|
8
|
+
[`f172c99cc3866`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f172c99cc3866) -
|
|
9
|
+
[ux] show more icon in the team profile card if more action provided
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 23.8.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
|
@@ -11,7 +11,7 @@ var _graphqlUtils = require("./graphqlUtils");
|
|
|
11
11
|
var ORG_ID_FROM_CLOUD_ID_QUERY = "query OrgIdFromCloudId($cloudId: ID!) {\n\ttenantContexts(cloudIds: [$cloudId]) {\n\t\torgId\n\t}\n}";
|
|
12
12
|
var addHeaders = function addHeaders(headers) {
|
|
13
13
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
14
|
-
headers.append('atl-client-version', "23.
|
|
14
|
+
headers.append('atl-client-version', "23.9.0");
|
|
15
15
|
return headers;
|
|
16
16
|
};
|
|
17
17
|
function getOrgIdForCloudIdFromAGG(_x, _x2) {
|
|
@@ -66,7 +66,7 @@ var addHeaders = exports.addHeaders = function addHeaders(headers) {
|
|
|
66
66
|
headers.append('X-ExperimentalApi', 'teams-beta');
|
|
67
67
|
headers.append('X-ExperimentalApi', 'team-members-beta');
|
|
68
68
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
69
|
-
headers.append('atl-client-version', "23.
|
|
69
|
+
headers.append('atl-client-version', "23.9.0");
|
|
70
70
|
return headers;
|
|
71
71
|
};
|
|
72
72
|
function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -19,6 +19,7 @@ var _compiled = require("@atlaskit/primitives/compiled");
|
|
|
19
19
|
var _teamsAvatar = _interopRequireDefault(require("@atlaskit/teams-avatar"));
|
|
20
20
|
var _teamsPublic = require("@atlaskit/teams-public");
|
|
21
21
|
var _analytics = require("../../util/analytics");
|
|
22
|
+
var _teamActions = require("./team-actions");
|
|
22
23
|
var _main = require("./team-connections/main");
|
|
23
24
|
var _teamContainersSkeleton = require("./team-containers-skeleton");
|
|
24
25
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
@@ -66,7 +67,9 @@ var TeamProfileCard = exports.TeamProfileCard = function TeamProfileCard(_ref3)
|
|
|
66
67
|
cloudId = _ref3.cloudId,
|
|
67
68
|
userId = _ref3.userId,
|
|
68
69
|
isVerified = _ref3.isVerified,
|
|
69
|
-
teamProfileUrl = _ref3.teamProfileUrl
|
|
70
|
+
teamProfileUrl = _ref3.teamProfileUrl,
|
|
71
|
+
isKudosEnabled = _ref3.isKudosEnabled,
|
|
72
|
+
otherActions = _ref3.otherActions;
|
|
70
73
|
var _useTeamContainers = (0, _teamsPublic.useTeamContainers)(teamId),
|
|
71
74
|
teamContainers = _useTeamContainers.teamContainers,
|
|
72
75
|
loading = _useTeamContainers.loading;
|
|
@@ -147,7 +150,11 @@ var TeamProfileCard = exports.TeamProfileCard = function TeamProfileCard(_ref3)
|
|
|
147
150
|
},
|
|
148
151
|
filterContainerId: containerId,
|
|
149
152
|
isDisplayedOnProfileCard: true
|
|
150
|
-
})),
|
|
153
|
+
})), isKudosEnabled || otherActions ? /*#__PURE__*/_react.default.createElement(_teamActions.ButtonSection, {
|
|
154
|
+
teamProfileUrl: teamProfileUrl,
|
|
155
|
+
isKudosEnabled: isKudosEnabled,
|
|
156
|
+
otherActions: otherActions
|
|
157
|
+
}) : teamProfileUrl && /*#__PURE__*/_react.default.createElement(_compiled.Stack, {
|
|
151
158
|
xcss: styles.viewProfileContainerStyles
|
|
152
159
|
}, /*#__PURE__*/_react.default.createElement(_compiled.Pressable, {
|
|
153
160
|
onClick: onClick,
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
._15a5nqa1{border-top-style:solid}
|
|
2
|
+
._16jlkb7n{flex-grow:1}
|
|
3
|
+
._19bv1ejb{padding-left:var(--ds-space-300,24px)}
|
|
4
|
+
._1i53muej{border-top-color:var(--ds-border,#091e4224)}
|
|
5
|
+
._ca0qpxbi{padding-top:var(--ds-space-200,1pc)}
|
|
6
|
+
._u5f31ejb{padding-right:var(--ds-space-300,24px)}
|
|
7
|
+
._uwhke4h9{border-top-width:var(--ds-border-width,1px)}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
Object.defineProperty(exports, "__esModule", {
|
|
7
|
+
value: true
|
|
8
|
+
});
|
|
9
|
+
exports.ButtonSection = void 0;
|
|
10
|
+
require("./index.compiled.css");
|
|
11
|
+
var _runtime = require("@compiled/react/runtime");
|
|
12
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
13
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
14
|
+
var _reactIntlNext = require("react-intl-next");
|
|
15
|
+
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
16
|
+
var _new = require("@atlaskit/button/new");
|
|
17
|
+
var _menu = require("@atlaskit/menu");
|
|
18
|
+
var _primitives = require("@atlaskit/primitives");
|
|
19
|
+
var _analytics = require("../../../util/analytics");
|
|
20
|
+
var _messages = require("./messages");
|
|
21
|
+
var _moreActions = require("./more-actions");
|
|
22
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
23
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
24
|
+
var GIVE_KUDOS_ACTION_ID = 'give-kudos';
|
|
25
|
+
var styles = {
|
|
26
|
+
containerStyles: "_uwhke4h9 _15a5nqa1 _1i53muej _19bv1ejb _u5f31ejb _ca0qpxbi",
|
|
27
|
+
actionContainerStyles: "_16jlkb7n"
|
|
28
|
+
};
|
|
29
|
+
var ButtonSection = exports.ButtonSection = function ButtonSection(_ref) {
|
|
30
|
+
var teamProfileUrl = _ref.teamProfileUrl,
|
|
31
|
+
isKudosEnabled = _ref.isKudosEnabled,
|
|
32
|
+
otherActions = _ref.otherActions;
|
|
33
|
+
var _useAnalyticsEvents = (0, _analyticsNext.useAnalyticsEvents)(),
|
|
34
|
+
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
35
|
+
var _useIntl = (0, _reactIntlNext.useIntl)(),
|
|
36
|
+
formatMessage = _useIntl.formatMessage;
|
|
37
|
+
var onTeamProfileClick = (0, _react.useCallback)(function () {
|
|
38
|
+
if (createAnalyticsEvent) {
|
|
39
|
+
(0, _analytics.fireEvent)(createAnalyticsEvent, {
|
|
40
|
+
action: 'clicked',
|
|
41
|
+
actionSubject: 'button',
|
|
42
|
+
actionSubjectId: 'viewTeamProfileButton',
|
|
43
|
+
attributes: {}
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}, [createAnalyticsEvent]);
|
|
47
|
+
var extraActions = [];
|
|
48
|
+
if (isKudosEnabled) {
|
|
49
|
+
extraActions.push({
|
|
50
|
+
id: GIVE_KUDOS_ACTION_ID,
|
|
51
|
+
item: /*#__PURE__*/_react.default.createElement(_menu.ButtonItem, null, formatMessage(_messages.messages.giveKudos))
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
if (otherActions) {
|
|
55
|
+
extraActions.push.apply(extraActions, (0, _toConsumableArray2.default)(otherActions));
|
|
56
|
+
}
|
|
57
|
+
return /*#__PURE__*/_react.default.createElement(_primitives.Stack, {
|
|
58
|
+
xcss: styles.containerStyles
|
|
59
|
+
}, /*#__PURE__*/_react.default.createElement(_primitives.Inline, {
|
|
60
|
+
space: "space.050"
|
|
61
|
+
}, teamProfileUrl && /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
62
|
+
xcss: styles.actionContainerStyles
|
|
63
|
+
}, /*#__PURE__*/_react.default.createElement(_new.LinkButton, {
|
|
64
|
+
onClick: onTeamProfileClick,
|
|
65
|
+
href: teamProfileUrl,
|
|
66
|
+
target: "_blank",
|
|
67
|
+
shouldFitContainer: true
|
|
68
|
+
}, formatMessage(_messages.messages.viewProfile))), extraActions.length > 0 && /*#__PURE__*/_react.default.createElement(_moreActions.MoreActions, {
|
|
69
|
+
actions: extraActions
|
|
70
|
+
})));
|
|
71
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.messages = void 0;
|
|
7
|
+
var _reactIntlNext = require("react-intl-next");
|
|
8
|
+
var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
|
|
9
|
+
viewProfile: {
|
|
10
|
+
id: 'team-profile-card.team-actions.view-profile',
|
|
11
|
+
defaultMessage: 'View profile',
|
|
12
|
+
description: 'View profile button text'
|
|
13
|
+
},
|
|
14
|
+
giveKudos: {
|
|
15
|
+
id: 'team-profile-card.team-actions.give-kudos',
|
|
16
|
+
defaultMessage: 'Give kudos',
|
|
17
|
+
description: 'Give kudos button text'
|
|
18
|
+
}
|
|
19
|
+
});
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.MoreActions = void 0;
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _reactIntlNext = require("react-intl-next");
|
|
13
|
+
var _new = require("@atlaskit/button/new");
|
|
14
|
+
var _showMoreHorizontalMore = _interopRequireDefault(require("@atlaskit/icon/core/migration/show-more-horizontal--more"));
|
|
15
|
+
var _menu = require("@atlaskit/menu");
|
|
16
|
+
var _popup = _interopRequireDefault(require("@atlaskit/popup"));
|
|
17
|
+
var _primitives = require("@atlaskit/primitives");
|
|
18
|
+
var _messages = require("./messages");
|
|
19
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
20
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
21
|
+
var MoreActions = exports.MoreActions = function MoreActions(_ref) {
|
|
22
|
+
var actions = _ref.actions;
|
|
23
|
+
var _useIntl = (0, _reactIntlNext.useIntl)(),
|
|
24
|
+
formatMessage = _useIntl.formatMessage;
|
|
25
|
+
var _useState = (0, _react.useState)(false),
|
|
26
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
27
|
+
isOpen = _useState2[0],
|
|
28
|
+
setOpen = _useState2[1];
|
|
29
|
+
var onMoreClick = (0, _react.useCallback)(function (shouldBeOpen) {
|
|
30
|
+
setOpen(shouldBeOpen);
|
|
31
|
+
}, []);
|
|
32
|
+
return /*#__PURE__*/_react.default.createElement(_popup.default, {
|
|
33
|
+
isOpen: isOpen,
|
|
34
|
+
onClose: function onClose() {
|
|
35
|
+
return setOpen(false);
|
|
36
|
+
},
|
|
37
|
+
content: function content() {
|
|
38
|
+
return /*#__PURE__*/_react.default.createElement(_menu.MenuGroup, {
|
|
39
|
+
spacing: "cozy"
|
|
40
|
+
}, /*#__PURE__*/_react.default.createElement(_menu.Section, null, actions.map(function (action) {
|
|
41
|
+
return /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
42
|
+
key: action.id
|
|
43
|
+
}, action.item);
|
|
44
|
+
})));
|
|
45
|
+
},
|
|
46
|
+
trigger: function trigger(triggerProps) {
|
|
47
|
+
return /*#__PURE__*/_react.default.createElement(_new.IconButton, (0, _extends2.default)({}, triggerProps, {
|
|
48
|
+
icon: _showMoreHorizontalMore.default,
|
|
49
|
+
label: formatMessage(_messages.messages.showMoreIconLabel),
|
|
50
|
+
onClick: function onClick() {
|
|
51
|
+
return onMoreClick(!isOpen);
|
|
52
|
+
},
|
|
53
|
+
isSelected: isOpen
|
|
54
|
+
}));
|
|
55
|
+
},
|
|
56
|
+
placement: "right-start",
|
|
57
|
+
shouldRenderToParent: false
|
|
58
|
+
});
|
|
59
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.messages = void 0;
|
|
7
|
+
var _reactIntlNext = require("react-intl-next");
|
|
8
|
+
var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
|
|
9
|
+
showMoreIconLabel: {
|
|
10
|
+
id: 'team-profile-card.team-actions.more-actions.show-more-icon-label',
|
|
11
|
+
defaultMessage: 'Show more',
|
|
12
|
+
description: 'Show more icon label'
|
|
13
|
+
}
|
|
14
|
+
});
|
|
@@ -45,7 +45,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
45
45
|
actionSubjectId: actionSubjectId,
|
|
46
46
|
attributes: _objectSpread(_objectSpread({
|
|
47
47
|
packageName: "@atlaskit/profilecard",
|
|
48
|
-
packageVersion: "23.
|
|
48
|
+
packageVersion: "23.9.0"
|
|
49
49
|
}, attributes), {}, {
|
|
50
50
|
firedAt: Math.round((0, _performance.getPageTime)())
|
|
51
51
|
})
|
|
@@ -6,7 +6,7 @@ const ORG_ID_FROM_CLOUD_ID_QUERY = `query OrgIdFromCloudId($cloudId: ID!) {
|
|
|
6
6
|
}`;
|
|
7
7
|
const addHeaders = headers => {
|
|
8
8
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
9
|
-
headers.append('atl-client-version', "23.
|
|
9
|
+
headers.append('atl-client-version', "23.9.0");
|
|
10
10
|
return headers;
|
|
11
11
|
};
|
|
12
12
|
export async function getOrgIdForCloudIdFromAGG(url, cloudId) {
|
|
@@ -75,7 +75,7 @@ export const addHeaders = headers => {
|
|
|
75
75
|
headers.append('X-ExperimentalApi', 'teams-beta');
|
|
76
76
|
headers.append('X-ExperimentalApi', 'team-members-beta');
|
|
77
77
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
78
|
-
headers.append('atl-client-version', "23.
|
|
78
|
+
headers.append('atl-client-version', "23.9.0");
|
|
79
79
|
return headers;
|
|
80
80
|
};
|
|
81
81
|
export async function getTeamFromAGG(url, teamId, siteId) {
|
|
@@ -11,6 +11,7 @@ import { Box, Inline, Pressable, Stack, Text } from '@atlaskit/primitives/compil
|
|
|
11
11
|
import TeamAvatar from '@atlaskit/teams-avatar';
|
|
12
12
|
import { TeamContainers, useTeamContainers } from '@atlaskit/teams-public';
|
|
13
13
|
import { fireEvent } from '../../util/analytics';
|
|
14
|
+
import { ButtonSection } from './team-actions';
|
|
14
15
|
import { TeamConnections } from './team-connections/main';
|
|
15
16
|
import { TeamContainersSkeleton } from './team-containers-skeleton';
|
|
16
17
|
const noop = () => {};
|
|
@@ -54,7 +55,9 @@ export const TeamProfileCard = ({
|
|
|
54
55
|
cloudId,
|
|
55
56
|
userId,
|
|
56
57
|
isVerified,
|
|
57
|
-
teamProfileUrl
|
|
58
|
+
teamProfileUrl,
|
|
59
|
+
isKudosEnabled,
|
|
60
|
+
otherActions
|
|
58
61
|
}) => {
|
|
59
62
|
const {
|
|
60
63
|
teamContainers,
|
|
@@ -134,7 +137,11 @@ export const TeamProfileCard = ({
|
|
|
134
137
|
},
|
|
135
138
|
filterContainerId: containerId,
|
|
136
139
|
isDisplayedOnProfileCard: true
|
|
137
|
-
})),
|
|
140
|
+
})), isKudosEnabled || otherActions ? /*#__PURE__*/React.createElement(ButtonSection, {
|
|
141
|
+
teamProfileUrl: teamProfileUrl,
|
|
142
|
+
isKudosEnabled: isKudosEnabled,
|
|
143
|
+
otherActions: otherActions
|
|
144
|
+
}) : teamProfileUrl && /*#__PURE__*/React.createElement(Stack, {
|
|
138
145
|
xcss: styles.viewProfileContainerStyles
|
|
139
146
|
}, /*#__PURE__*/React.createElement(Pressable, {
|
|
140
147
|
onClick: onClick,
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
._15a5nqa1{border-top-style:solid}
|
|
2
|
+
._16jlkb7n{flex-grow:1}
|
|
3
|
+
._19bv1ejb{padding-left:var(--ds-space-300,24px)}
|
|
4
|
+
._1i53muej{border-top-color:var(--ds-border,#091e4224)}
|
|
5
|
+
._ca0qpxbi{padding-top:var(--ds-space-200,1pc)}
|
|
6
|
+
._u5f31ejb{padding-right:var(--ds-space-300,24px)}
|
|
7
|
+
._uwhke4h9{border-top-width:var(--ds-border-width,1px)}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
+
import "./index.compiled.css";
|
|
3
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
4
|
+
import React, { useCallback } from 'react';
|
|
5
|
+
import { useIntl } from 'react-intl-next';
|
|
6
|
+
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
7
|
+
import { LinkButton } from '@atlaskit/button/new';
|
|
8
|
+
import { ButtonItem } from '@atlaskit/menu';
|
|
9
|
+
import { Box, Inline, Stack } from '@atlaskit/primitives';
|
|
10
|
+
import { fireEvent } from '../../../util/analytics';
|
|
11
|
+
import { messages } from './messages';
|
|
12
|
+
import { MoreActions } from './more-actions';
|
|
13
|
+
const GIVE_KUDOS_ACTION_ID = 'give-kudos';
|
|
14
|
+
const styles = {
|
|
15
|
+
containerStyles: "_uwhke4h9 _15a5nqa1 _1i53muej _19bv1ejb _u5f31ejb _ca0qpxbi",
|
|
16
|
+
actionContainerStyles: "_16jlkb7n"
|
|
17
|
+
};
|
|
18
|
+
export const ButtonSection = ({
|
|
19
|
+
teamProfileUrl,
|
|
20
|
+
isKudosEnabled,
|
|
21
|
+
otherActions
|
|
22
|
+
}) => {
|
|
23
|
+
const {
|
|
24
|
+
createAnalyticsEvent
|
|
25
|
+
} = useAnalyticsEvents();
|
|
26
|
+
const {
|
|
27
|
+
formatMessage
|
|
28
|
+
} = useIntl();
|
|
29
|
+
const onTeamProfileClick = useCallback(() => {
|
|
30
|
+
if (createAnalyticsEvent) {
|
|
31
|
+
fireEvent(createAnalyticsEvent, {
|
|
32
|
+
action: 'clicked',
|
|
33
|
+
actionSubject: 'button',
|
|
34
|
+
actionSubjectId: 'viewTeamProfileButton',
|
|
35
|
+
attributes: {}
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}, [createAnalyticsEvent]);
|
|
39
|
+
const extraActions = [];
|
|
40
|
+
if (isKudosEnabled) {
|
|
41
|
+
extraActions.push({
|
|
42
|
+
id: GIVE_KUDOS_ACTION_ID,
|
|
43
|
+
item: /*#__PURE__*/React.createElement(ButtonItem, null, formatMessage(messages.giveKudos))
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
if (otherActions) {
|
|
47
|
+
extraActions.push(...otherActions);
|
|
48
|
+
}
|
|
49
|
+
return /*#__PURE__*/React.createElement(Stack, {
|
|
50
|
+
xcss: styles.containerStyles
|
|
51
|
+
}, /*#__PURE__*/React.createElement(Inline, {
|
|
52
|
+
space: "space.050"
|
|
53
|
+
}, teamProfileUrl && /*#__PURE__*/React.createElement(Box, {
|
|
54
|
+
xcss: styles.actionContainerStyles
|
|
55
|
+
}, /*#__PURE__*/React.createElement(LinkButton, {
|
|
56
|
+
onClick: onTeamProfileClick,
|
|
57
|
+
href: teamProfileUrl,
|
|
58
|
+
target: "_blank",
|
|
59
|
+
shouldFitContainer: true
|
|
60
|
+
}, formatMessage(messages.viewProfile))), extraActions.length > 0 && /*#__PURE__*/React.createElement(MoreActions, {
|
|
61
|
+
actions: extraActions
|
|
62
|
+
})));
|
|
63
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineMessages } from 'react-intl-next';
|
|
2
|
+
export const messages = defineMessages({
|
|
3
|
+
viewProfile: {
|
|
4
|
+
id: 'team-profile-card.team-actions.view-profile',
|
|
5
|
+
defaultMessage: 'View profile',
|
|
6
|
+
description: 'View profile button text'
|
|
7
|
+
},
|
|
8
|
+
giveKudos: {
|
|
9
|
+
id: 'team-profile-card.team-actions.give-kudos',
|
|
10
|
+
defaultMessage: 'Give kudos',
|
|
11
|
+
description: 'Give kudos button text'
|
|
12
|
+
}
|
|
13
|
+
});
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React, { useCallback, useState } from 'react';
|
|
3
|
+
import { useIntl } from 'react-intl-next';
|
|
4
|
+
import { IconButton } from '@atlaskit/button/new';
|
|
5
|
+
import MoreIcon from '@atlaskit/icon/core/migration/show-more-horizontal--more';
|
|
6
|
+
import { MenuGroup, Section } from '@atlaskit/menu';
|
|
7
|
+
import Popup from '@atlaskit/popup';
|
|
8
|
+
import { Box } from '@atlaskit/primitives';
|
|
9
|
+
import { messages } from './messages';
|
|
10
|
+
export const MoreActions = ({
|
|
11
|
+
actions
|
|
12
|
+
}) => {
|
|
13
|
+
const {
|
|
14
|
+
formatMessage
|
|
15
|
+
} = useIntl();
|
|
16
|
+
const [isOpen, setOpen] = useState(false);
|
|
17
|
+
const onMoreClick = useCallback(shouldBeOpen => {
|
|
18
|
+
setOpen(shouldBeOpen);
|
|
19
|
+
}, []);
|
|
20
|
+
return /*#__PURE__*/React.createElement(Popup, {
|
|
21
|
+
isOpen: isOpen,
|
|
22
|
+
onClose: () => setOpen(false),
|
|
23
|
+
content: () => /*#__PURE__*/React.createElement(MenuGroup, {
|
|
24
|
+
spacing: "cozy"
|
|
25
|
+
}, /*#__PURE__*/React.createElement(Section, null, actions.map(action => /*#__PURE__*/React.createElement(Box, {
|
|
26
|
+
key: action.id
|
|
27
|
+
}, action.item)))),
|
|
28
|
+
trigger: triggerProps => /*#__PURE__*/React.createElement(IconButton, _extends({}, triggerProps, {
|
|
29
|
+
icon: MoreIcon,
|
|
30
|
+
label: formatMessage(messages.showMoreIconLabel),
|
|
31
|
+
onClick: () => onMoreClick(!isOpen),
|
|
32
|
+
isSelected: isOpen
|
|
33
|
+
})),
|
|
34
|
+
placement: "right-start",
|
|
35
|
+
shouldRenderToParent: false
|
|
36
|
+
});
|
|
37
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { defineMessages } from 'react-intl-next';
|
|
2
|
+
export const messages = defineMessages({
|
|
3
|
+
showMoreIconLabel: {
|
|
4
|
+
id: 'team-profile-card.team-actions.more-actions.show-more-icon-label',
|
|
5
|
+
defaultMessage: 'Show more',
|
|
6
|
+
description: 'Show more icon label'
|
|
7
|
+
}
|
|
8
|
+
});
|
|
@@ -32,7 +32,7 @@ const createEvent = (eventType, action, actionSubject, actionSubjectId, attribut
|
|
|
32
32
|
actionSubjectId,
|
|
33
33
|
attributes: {
|
|
34
34
|
packageName: "@atlaskit/profilecard",
|
|
35
|
-
packageVersion: "23.
|
|
35
|
+
packageVersion: "23.9.0",
|
|
36
36
|
...attributes,
|
|
37
37
|
firedAt: Math.round(getPageTime())
|
|
38
38
|
}
|
|
@@ -4,7 +4,7 @@ import { AGGQuery } from './graphqlUtils';
|
|
|
4
4
|
var ORG_ID_FROM_CLOUD_ID_QUERY = "query OrgIdFromCloudId($cloudId: ID!) {\n\ttenantContexts(cloudIds: [$cloudId]) {\n\t\torgId\n\t}\n}";
|
|
5
5
|
var addHeaders = function addHeaders(headers) {
|
|
6
6
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
7
|
-
headers.append('atl-client-version', "23.
|
|
7
|
+
headers.append('atl-client-version', "23.9.0");
|
|
8
8
|
return headers;
|
|
9
9
|
};
|
|
10
10
|
export function getOrgIdForCloudIdFromAGG(_x, _x2) {
|
|
@@ -57,7 +57,7 @@ export var addHeaders = function addHeaders(headers) {
|
|
|
57
57
|
headers.append('X-ExperimentalApi', 'teams-beta');
|
|
58
58
|
headers.append('X-ExperimentalApi', 'team-members-beta');
|
|
59
59
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
60
|
-
headers.append('atl-client-version', "23.
|
|
60
|
+
headers.append('atl-client-version', "23.9.0");
|
|
61
61
|
return headers;
|
|
62
62
|
};
|
|
63
63
|
export function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -11,6 +11,7 @@ import { Box, Inline, Pressable, Stack, Text } from '@atlaskit/primitives/compil
|
|
|
11
11
|
import TeamAvatar from '@atlaskit/teams-avatar';
|
|
12
12
|
import { TeamContainers, useTeamContainers } from '@atlaskit/teams-public';
|
|
13
13
|
import { fireEvent } from '../../util/analytics';
|
|
14
|
+
import { ButtonSection } from './team-actions';
|
|
14
15
|
import { TeamConnections } from './team-connections/main';
|
|
15
16
|
import { TeamContainersSkeleton } from './team-containers-skeleton';
|
|
16
17
|
var noop = function noop() {};
|
|
@@ -56,7 +57,9 @@ export var TeamProfileCard = function TeamProfileCard(_ref3) {
|
|
|
56
57
|
cloudId = _ref3.cloudId,
|
|
57
58
|
userId = _ref3.userId,
|
|
58
59
|
isVerified = _ref3.isVerified,
|
|
59
|
-
teamProfileUrl = _ref3.teamProfileUrl
|
|
60
|
+
teamProfileUrl = _ref3.teamProfileUrl,
|
|
61
|
+
isKudosEnabled = _ref3.isKudosEnabled,
|
|
62
|
+
otherActions = _ref3.otherActions;
|
|
60
63
|
var _useTeamContainers = useTeamContainers(teamId),
|
|
61
64
|
teamContainers = _useTeamContainers.teamContainers,
|
|
62
65
|
loading = _useTeamContainers.loading;
|
|
@@ -137,7 +140,11 @@ export var TeamProfileCard = function TeamProfileCard(_ref3) {
|
|
|
137
140
|
},
|
|
138
141
|
filterContainerId: containerId,
|
|
139
142
|
isDisplayedOnProfileCard: true
|
|
140
|
-
})),
|
|
143
|
+
})), isKudosEnabled || otherActions ? /*#__PURE__*/React.createElement(ButtonSection, {
|
|
144
|
+
teamProfileUrl: teamProfileUrl,
|
|
145
|
+
isKudosEnabled: isKudosEnabled,
|
|
146
|
+
otherActions: otherActions
|
|
147
|
+
}) : teamProfileUrl && /*#__PURE__*/React.createElement(Stack, {
|
|
141
148
|
xcss: styles.viewProfileContainerStyles
|
|
142
149
|
}, /*#__PURE__*/React.createElement(Pressable, {
|
|
143
150
|
onClick: onClick,
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
._15a5nqa1{border-top-style:solid}
|
|
2
|
+
._16jlkb7n{flex-grow:1}
|
|
3
|
+
._19bv1ejb{padding-left:var(--ds-space-300,24px)}
|
|
4
|
+
._1i53muej{border-top-color:var(--ds-border,#091e4224)}
|
|
5
|
+
._ca0qpxbi{padding-top:var(--ds-space-200,1pc)}
|
|
6
|
+
._u5f31ejb{padding-right:var(--ds-space-300,24px)}
|
|
7
|
+
._uwhke4h9{border-top-width:var(--ds-border-width,1px)}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
+
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
3
|
+
import "./index.compiled.css";
|
|
4
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
+
import React, { useCallback } from 'react';
|
|
6
|
+
import { useIntl } from 'react-intl-next';
|
|
7
|
+
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
8
|
+
import { LinkButton } from '@atlaskit/button/new';
|
|
9
|
+
import { ButtonItem } from '@atlaskit/menu';
|
|
10
|
+
import { Box, Inline, Stack } from '@atlaskit/primitives';
|
|
11
|
+
import { fireEvent } from '../../../util/analytics';
|
|
12
|
+
import { messages } from './messages';
|
|
13
|
+
import { MoreActions } from './more-actions';
|
|
14
|
+
var GIVE_KUDOS_ACTION_ID = 'give-kudos';
|
|
15
|
+
var styles = {
|
|
16
|
+
containerStyles: "_uwhke4h9 _15a5nqa1 _1i53muej _19bv1ejb _u5f31ejb _ca0qpxbi",
|
|
17
|
+
actionContainerStyles: "_16jlkb7n"
|
|
18
|
+
};
|
|
19
|
+
export var ButtonSection = function ButtonSection(_ref) {
|
|
20
|
+
var teamProfileUrl = _ref.teamProfileUrl,
|
|
21
|
+
isKudosEnabled = _ref.isKudosEnabled,
|
|
22
|
+
otherActions = _ref.otherActions;
|
|
23
|
+
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
24
|
+
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
25
|
+
var _useIntl = useIntl(),
|
|
26
|
+
formatMessage = _useIntl.formatMessage;
|
|
27
|
+
var onTeamProfileClick = useCallback(function () {
|
|
28
|
+
if (createAnalyticsEvent) {
|
|
29
|
+
fireEvent(createAnalyticsEvent, {
|
|
30
|
+
action: 'clicked',
|
|
31
|
+
actionSubject: 'button',
|
|
32
|
+
actionSubjectId: 'viewTeamProfileButton',
|
|
33
|
+
attributes: {}
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}, [createAnalyticsEvent]);
|
|
37
|
+
var extraActions = [];
|
|
38
|
+
if (isKudosEnabled) {
|
|
39
|
+
extraActions.push({
|
|
40
|
+
id: GIVE_KUDOS_ACTION_ID,
|
|
41
|
+
item: /*#__PURE__*/React.createElement(ButtonItem, null, formatMessage(messages.giveKudos))
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
if (otherActions) {
|
|
45
|
+
extraActions.push.apply(extraActions, _toConsumableArray(otherActions));
|
|
46
|
+
}
|
|
47
|
+
return /*#__PURE__*/React.createElement(Stack, {
|
|
48
|
+
xcss: styles.containerStyles
|
|
49
|
+
}, /*#__PURE__*/React.createElement(Inline, {
|
|
50
|
+
space: "space.050"
|
|
51
|
+
}, teamProfileUrl && /*#__PURE__*/React.createElement(Box, {
|
|
52
|
+
xcss: styles.actionContainerStyles
|
|
53
|
+
}, /*#__PURE__*/React.createElement(LinkButton, {
|
|
54
|
+
onClick: onTeamProfileClick,
|
|
55
|
+
href: teamProfileUrl,
|
|
56
|
+
target: "_blank",
|
|
57
|
+
shouldFitContainer: true
|
|
58
|
+
}, formatMessage(messages.viewProfile))), extraActions.length > 0 && /*#__PURE__*/React.createElement(MoreActions, {
|
|
59
|
+
actions: extraActions
|
|
60
|
+
})));
|
|
61
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineMessages } from 'react-intl-next';
|
|
2
|
+
export var messages = defineMessages({
|
|
3
|
+
viewProfile: {
|
|
4
|
+
id: 'team-profile-card.team-actions.view-profile',
|
|
5
|
+
defaultMessage: 'View profile',
|
|
6
|
+
description: 'View profile button text'
|
|
7
|
+
},
|
|
8
|
+
giveKudos: {
|
|
9
|
+
id: 'team-profile-card.team-actions.give-kudos',
|
|
10
|
+
defaultMessage: 'Give kudos',
|
|
11
|
+
description: 'Give kudos button text'
|
|
12
|
+
}
|
|
13
|
+
});
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
+
import React, { useCallback, useState } from 'react';
|
|
4
|
+
import { useIntl } from 'react-intl-next';
|
|
5
|
+
import { IconButton } from '@atlaskit/button/new';
|
|
6
|
+
import MoreIcon from '@atlaskit/icon/core/migration/show-more-horizontal--more';
|
|
7
|
+
import { MenuGroup, Section } from '@atlaskit/menu';
|
|
8
|
+
import Popup from '@atlaskit/popup';
|
|
9
|
+
import { Box } from '@atlaskit/primitives';
|
|
10
|
+
import { messages } from './messages';
|
|
11
|
+
export var MoreActions = function MoreActions(_ref) {
|
|
12
|
+
var actions = _ref.actions;
|
|
13
|
+
var _useIntl = useIntl(),
|
|
14
|
+
formatMessage = _useIntl.formatMessage;
|
|
15
|
+
var _useState = useState(false),
|
|
16
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
17
|
+
isOpen = _useState2[0],
|
|
18
|
+
setOpen = _useState2[1];
|
|
19
|
+
var onMoreClick = useCallback(function (shouldBeOpen) {
|
|
20
|
+
setOpen(shouldBeOpen);
|
|
21
|
+
}, []);
|
|
22
|
+
return /*#__PURE__*/React.createElement(Popup, {
|
|
23
|
+
isOpen: isOpen,
|
|
24
|
+
onClose: function onClose() {
|
|
25
|
+
return setOpen(false);
|
|
26
|
+
},
|
|
27
|
+
content: function content() {
|
|
28
|
+
return /*#__PURE__*/React.createElement(MenuGroup, {
|
|
29
|
+
spacing: "cozy"
|
|
30
|
+
}, /*#__PURE__*/React.createElement(Section, null, actions.map(function (action) {
|
|
31
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
32
|
+
key: action.id
|
|
33
|
+
}, action.item);
|
|
34
|
+
})));
|
|
35
|
+
},
|
|
36
|
+
trigger: function trigger(triggerProps) {
|
|
37
|
+
return /*#__PURE__*/React.createElement(IconButton, _extends({}, triggerProps, {
|
|
38
|
+
icon: MoreIcon,
|
|
39
|
+
label: formatMessage(messages.showMoreIconLabel),
|
|
40
|
+
onClick: function onClick() {
|
|
41
|
+
return onMoreClick(!isOpen);
|
|
42
|
+
},
|
|
43
|
+
isSelected: isOpen
|
|
44
|
+
}));
|
|
45
|
+
},
|
|
46
|
+
placement: "right-start",
|
|
47
|
+
shouldRenderToParent: false
|
|
48
|
+
});
|
|
49
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { defineMessages } from 'react-intl-next';
|
|
2
|
+
export var messages = defineMessages({
|
|
3
|
+
showMoreIconLabel: {
|
|
4
|
+
id: 'team-profile-card.team-actions.more-actions.show-more-icon-label',
|
|
5
|
+
defaultMessage: 'Show more',
|
|
6
|
+
description: 'Show more icon label'
|
|
7
|
+
}
|
|
8
|
+
});
|
|
@@ -39,7 +39,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
39
39
|
actionSubjectId: actionSubjectId,
|
|
40
40
|
attributes: _objectSpread(_objectSpread({
|
|
41
41
|
packageName: "@atlaskit/profilecard",
|
|
42
|
-
packageVersion: "23.
|
|
42
|
+
packageVersion: "23.9.0"
|
|
43
43
|
}, attributes), {}, {
|
|
44
44
|
firedAt: Math.round(getPageTime())
|
|
45
45
|
})
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
2
6
|
import { type AvatarProps } from '@atlaskit/avatar-group';
|
|
3
7
|
interface TeamProfileCardProps {
|
|
4
8
|
containerId: string;
|
|
@@ -13,6 +17,11 @@ interface TeamProfileCardProps {
|
|
|
13
17
|
userId: string;
|
|
14
18
|
isVerified?: boolean;
|
|
15
19
|
teamProfileUrl?: string;
|
|
20
|
+
isKudosEnabled?: boolean;
|
|
21
|
+
otherActions?: {
|
|
22
|
+
id: string;
|
|
23
|
+
item: React.ReactNode;
|
|
24
|
+
}[];
|
|
16
25
|
}
|
|
17
|
-
export declare const TeamProfileCard: ({ containerId, teamId, displayName, description, avatarImageUrl, headerImageUrl, memberAvatars, memberCount, cloudId, userId, isVerified, teamProfileUrl, }: TeamProfileCardProps) => JSX.Element;
|
|
26
|
+
export declare const TeamProfileCard: ({ containerId, teamId, displayName, description, avatarImageUrl, headerImageUrl, memberAvatars, memberCount, cloudId, userId, isVerified, teamProfileUrl, isKudosEnabled, otherActions, }: TeamProfileCardProps) => JSX.Element;
|
|
18
27
|
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ActionItem } from './more-actions';
|
|
3
|
+
type ButtonSectionProps = {
|
|
4
|
+
teamProfileUrl?: string;
|
|
5
|
+
isKudosEnabled?: boolean;
|
|
6
|
+
otherActions?: ActionItem[];
|
|
7
|
+
};
|
|
8
|
+
export declare const ButtonSection: ({ teamProfileUrl, isKudosEnabled, otherActions, }: ButtonSectionProps) => React.JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type ActionItem = {
|
|
3
|
+
id: string;
|
|
4
|
+
item: React.ReactNode;
|
|
5
|
+
};
|
|
6
|
+
type MoreActionsProps = {
|
|
7
|
+
actions: ActionItem[];
|
|
8
|
+
};
|
|
9
|
+
export declare const MoreActions: ({ actions }: MoreActionsProps) => React.JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
2
6
|
import { type AvatarProps } from '@atlaskit/avatar-group';
|
|
3
7
|
interface TeamProfileCardProps {
|
|
4
8
|
containerId: string;
|
|
@@ -13,6 +17,11 @@ interface TeamProfileCardProps {
|
|
|
13
17
|
userId: string;
|
|
14
18
|
isVerified?: boolean;
|
|
15
19
|
teamProfileUrl?: string;
|
|
20
|
+
isKudosEnabled?: boolean;
|
|
21
|
+
otherActions?: {
|
|
22
|
+
id: string;
|
|
23
|
+
item: React.ReactNode;
|
|
24
|
+
}[];
|
|
16
25
|
}
|
|
17
|
-
export declare const TeamProfileCard: ({ containerId, teamId, displayName, description, avatarImageUrl, headerImageUrl, memberAvatars, memberCount, cloudId, userId, isVerified, teamProfileUrl, }: TeamProfileCardProps) => JSX.Element;
|
|
26
|
+
export declare const TeamProfileCard: ({ containerId, teamId, displayName, description, avatarImageUrl, headerImageUrl, memberAvatars, memberCount, cloudId, userId, isVerified, teamProfileUrl, isKudosEnabled, otherActions, }: TeamProfileCardProps) => JSX.Element;
|
|
18
27
|
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ActionItem } from './more-actions';
|
|
3
|
+
type ButtonSectionProps = {
|
|
4
|
+
teamProfileUrl?: string;
|
|
5
|
+
isKudosEnabled?: boolean;
|
|
6
|
+
otherActions?: ActionItem[];
|
|
7
|
+
};
|
|
8
|
+
export declare const ButtonSection: ({ teamProfileUrl, isKudosEnabled, otherActions, }: ButtonSectionProps) => React.JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type ActionItem = {
|
|
3
|
+
id: string;
|
|
4
|
+
item: React.ReactNode;
|
|
5
|
+
};
|
|
6
|
+
type MoreActionsProps = {
|
|
7
|
+
actions: ActionItem[];
|
|
8
|
+
};
|
|
9
|
+
export declare const MoreActions: ({ actions }: MoreActionsProps) => React.JSX.Element;
|
|
10
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/profilecard",
|
|
3
|
-
"version": "23.
|
|
3
|
+
"version": "23.9.0",
|
|
4
4
|
"description": "A React component to display a card with user information.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -56,10 +56,10 @@
|
|
|
56
56
|
"@atlaskit/avatar-group": "^12.0.0",
|
|
57
57
|
"@atlaskit/button": "^23.0.0",
|
|
58
58
|
"@atlaskit/css": "^0.10.0",
|
|
59
|
-
"@atlaskit/dropdown-menu": "^14.
|
|
59
|
+
"@atlaskit/dropdown-menu": "^14.1.0",
|
|
60
60
|
"@atlaskit/empty-state": "^9.0.0",
|
|
61
61
|
"@atlaskit/focus-ring": "^3.0.0",
|
|
62
|
-
"@atlaskit/give-kudos": "^4.
|
|
62
|
+
"@atlaskit/give-kudos": "^4.1.0",
|
|
63
63
|
"@atlaskit/heading": "^5.2.0",
|
|
64
64
|
"@atlaskit/icon": "^25.6.0",
|
|
65
65
|
"@atlaskit/logo": "^16.0.0",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"react-dom": "^18.2.0"
|
|
96
96
|
},
|
|
97
97
|
"devDependencies": {
|
|
98
|
-
"@af/visual-regression": "
|
|
98
|
+
"@af/visual-regression": "workspace:^",
|
|
99
99
|
"@atlassian/feature-flags-test-utils": "^0.3.0",
|
|
100
100
|
"@atlassian/ptc-test-utils": "^0.8.0",
|
|
101
101
|
"@testing-library/react": "^13.4.0",
|