@atlaskit/profilecard 24.20.4 → 24.20.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/__tests__/vr-tests/__snapshots__/agent-profilecard/agent-profile-card-example--default.png +0 -0
- package/__tests__/vr-tests/__snapshots__/user-profilecard/alternate-actions--default.png +0 -0
- package/__tests__/vr-tests/__snapshots__/user-profilecard/best-case-profile--default.png +0 -0
- package/__tests__/vr-tests/__snapshots__/user-profilecard/bot-case-profile--default.png +0 -0
- package/__tests__/vr-tests/__snapshots__/user-profilecard/error-state--default.png +0 -0
- package/__tests__/vr-tests/__snapshots__/user-profilecard/error-state-not-found--default.png +0 -0
- package/__tests__/vr-tests/__snapshots__/user-profilecard/worst-case-profile--default.png +0 -0
- package/compass.yml +3 -0
- package/dist/cjs/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/cjs/client/getTeamFromAGG.js +1 -1
- package/dist/cjs/components/common/ProfileCardTrigger.js +17 -21
- package/dist/cjs/components/team-profile-card/main.compiled.css +1 -15
- package/dist/cjs/components/team-profile-card/main.js +81 -185
- package/dist/cjs/components/team-profile-card/team-connections/main.compiled.css +1 -6
- package/dist/cjs/components/team-profile-card/team-connections/main.js +1 -65
- package/dist/cjs/util/analytics.js +2 -2
- package/dist/es2019/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/es2019/client/getTeamFromAGG.js +1 -1
- package/dist/es2019/components/common/ProfileCardTrigger.js +1 -4
- package/dist/es2019/components/team-profile-card/main.compiled.css +1 -15
- package/dist/es2019/components/team-profile-card/main.js +55 -157
- package/dist/es2019/components/team-profile-card/team-connections/main.compiled.css +1 -6
- package/dist/es2019/components/team-profile-card/team-connections/main.js +1 -69
- package/dist/es2019/util/analytics.js +2 -2
- package/dist/esm/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/esm/client/getTeamFromAGG.js +1 -1
- package/dist/esm/components/common/ProfileCardTrigger.js +17 -21
- package/dist/esm/components/team-profile-card/main.compiled.css +1 -15
- package/dist/esm/components/team-profile-card/main.js +69 -173
- package/dist/esm/components/team-profile-card/team-connections/main.compiled.css +1 -6
- package/dist/esm/components/team-profile-card/team-connections/main.js +1 -65
- package/dist/esm/util/analytics.js +2 -2
- package/dist/types/components/team-profile-card/team-connections/main.d.ts +0 -1
- package/dist/types-ts4.5/components/team-profile-card/team-connections/main.d.ts +0 -1
- package/package.json +11 -19
- package/afm-post-office/tsconfig.json +0 -123
- package/afm-townsquare/tsconfig.json +0 -123
package/CHANGELOG.md
CHANGED
package/__tests__/vr-tests/__snapshots__/agent-profilecard/agent-profile-card-example--default.png
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/__tests__/vr-tests/__snapshots__/user-profilecard/error-state-not-found--default.png
CHANGED
|
Binary file
|
|
Binary file
|
package/compass.yml
CHANGED
|
@@ -7,6 +7,9 @@ ownerId: 'ari:cloud:teams::team/229da7a2-bf93-4813-9e24-a6efbd2d445e'
|
|
|
7
7
|
fields:
|
|
8
8
|
tier: 2
|
|
9
9
|
links:
|
|
10
|
+
- name: Root Repository
|
|
11
|
+
type: REPOSITORY
|
|
12
|
+
url: https://bitbucket.org/atlassian/atlassian-frontend-monorepo/src/master
|
|
10
13
|
- name: ''
|
|
11
14
|
type: REPOSITORY
|
|
12
15
|
url: 'https://bitbucket.org/atlassian/atlassian-frontend/src/master/packages/people-and-teams/profilecard/'
|
|
@@ -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', "
|
|
14
|
+
headers.append('atl-client-version', "0.0.0-development");
|
|
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', "
|
|
69
|
+
headers.append('atl-client-version', "0.0.0-development");
|
|
70
70
|
return headers;
|
|
71
71
|
};
|
|
72
72
|
function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -131,27 +131,23 @@ function ProfileCardTriggerInner(_ref, ref) {
|
|
|
131
131
|
}));
|
|
132
132
|
},
|
|
133
133
|
content: function content() {
|
|
134
|
-
return (
|
|
135
|
-
|
|
136
|
-
// eslint-disable-next-line @atlassian/a11y/
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
profileData: profileData,
|
|
152
|
-
error: error
|
|
153
|
-
}))
|
|
154
|
-
);
|
|
134
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
135
|
+
onMouseEnter: onMouseEnter
|
|
136
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
137
|
+
,
|
|
138
|
+
onMouseLeave: hideProfilecard,
|
|
139
|
+
onFocus: showProfilecard,
|
|
140
|
+
"data-testid": "profile-card--trigger-content"
|
|
141
|
+
}, isLoading ? /*#__PURE__*/_react.default.createElement(_ProfileCardWrapper.ProfileCardWrapper, {
|
|
142
|
+
testId: "profilecard.profilecardtrigger.loading"
|
|
143
|
+
}, /*#__PURE__*/_react.default.createElement(_LoadingState.LoadingState, {
|
|
144
|
+
fireAnalytics: fireAnalytics,
|
|
145
|
+
fireAnalyticsNext: fireAnalyticsNext,
|
|
146
|
+
profileType: profileCardType
|
|
147
|
+
})) : renderProfileCard({
|
|
148
|
+
profileData: profileData,
|
|
149
|
+
error: error
|
|
150
|
+
}));
|
|
155
151
|
}
|
|
156
152
|
}));
|
|
157
153
|
}
|
|
@@ -1,45 +1,31 @@
|
|
|
1
1
|
._11c81vhk{font:var(--ds-font-heading-xxsmall,normal 600 9pt/1pc ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
2
|
-
._2rko12b0{border-radius:var(--ds-radius-small,4px)}
|
|
3
2
|
._2rko1mok{border-radius:var(--ds-radius-large,8px)}
|
|
4
3
|
._v564nm7n{transition:box-shadow .25s ease-in-out}
|
|
5
|
-
._189ee4h9{border-width:var(--ds-border-width,1px)}
|
|
6
|
-
._1dqonqa1{border-style:solid}
|
|
7
|
-
._1h6dmuej{border-color:var(--ds-border,#091e4224)}
|
|
8
|
-
._15a5nqa1{border-top-style:solid}
|
|
9
4
|
._18m915vq{overflow-y:hidden}
|
|
10
5
|
._18m91wug{overflow-y:auto}
|
|
11
6
|
._18u01ejb{margin-left:var(--ds-space-300,24px)}
|
|
12
7
|
._18u01wug{margin-left:auto}
|
|
13
8
|
._18u0pxbi{margin-left:var(--ds-space-200,1pc)}
|
|
14
9
|
._18u0u2gc{margin-left:var(--ds-space-100,8px)}
|
|
15
|
-
._19bv1ejb{padding-left:var(--ds-space-300,24px)}
|
|
16
10
|
._19pk1b66{margin-top:var(--ds-space-050,4px)}
|
|
17
|
-
._19pkpxbi{margin-top:var(--ds-space-200,1pc)}
|
|
18
11
|
._19pku2gc{margin-top:var(--ds-space-100,8px)}
|
|
19
12
|
._1bsb1gwv{width:360px}
|
|
20
13
|
._1bsb1osq{width:100%}
|
|
21
14
|
._1bsb7vkz{width:1pc}
|
|
22
15
|
._1e0c1txw{display:flex}
|
|
23
|
-
._1i53muej{border-top-color:var(--ds-border,#091e4224)}
|
|
24
16
|
._1reo15vq{overflow-x:hidden}
|
|
25
17
|
._1ul95x59{min-width:340px}
|
|
26
18
|
._2hwx1ejb{margin-right:var(--ds-space-300,24px)}
|
|
27
19
|
._2hwxpxbi{margin-right:var(--ds-space-200,1pc)}
|
|
28
20
|
._2hwxu2gc{margin-right:var(--ds-space-100,8px)}
|
|
29
21
|
._2lx21bp4{flex-direction:column}
|
|
30
|
-
._4cvr1h6o{align-items:center}
|
|
31
22
|
._4t3i12am{height:50px}
|
|
32
|
-
._4t3i1ul9{height:30px}
|
|
33
23
|
._4t3i1wug{height:auto}
|
|
34
|
-
._4t3i53f4{height:75pt}
|
|
35
24
|
._4t3i7vkz{height:1pc}
|
|
36
25
|
._5ral1dfr{object-fit:cover}
|
|
37
|
-
._bfhksm61{background-color:var(--ds-background-neutral-subtle,#00000000)}
|
|
38
26
|
._c71lx2si{max-height:265px}
|
|
39
27
|
._kqswstnw{position:absolute}
|
|
40
28
|
._otyr12x7{margin-bottom:var(--ds-space-075,6px)}
|
|
41
29
|
._otyrpxbi{margin-bottom:var(--ds-space-200,1pc)}
|
|
42
30
|
._s7n4jp4b{vertical-align:top}
|
|
43
|
-
._syaz1gjq{color:var(--ds-text-subtle,#44546f)}
|
|
44
|
-
._u5f31ejb{padding-right:var(--ds-space-300,24px)}
|
|
45
|
-
._uwhke4h9{border-top-width:var(--ds-border-width,1px)}
|
|
31
|
+
._syaz1gjq{color:var(--ds-text-subtle,#44546f)}
|
|
@@ -8,10 +8,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
});
|
|
9
9
|
exports.TeamProfileCard = void 0;
|
|
10
10
|
require("./main.compiled.css");
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
+
var React = _react;
|
|
11
13
|
var _runtime = require("@compiled/react/runtime");
|
|
12
14
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
15
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
14
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
15
16
|
var _reactIntlNext = require("react-intl-next");
|
|
16
17
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
17
18
|
var _avatarGroup = _interopRequireDefault(require("@atlaskit/avatar-group"));
|
|
@@ -35,50 +36,27 @@ var styles = {
|
|
|
35
36
|
wrapperStyles: "_2rko1mok _v564nm7n _1reo15vq _18m915vq _1e0c1txw _2lx21bp4 _1bsb1gwv _1ul95x59 _4t3i1wug",
|
|
36
37
|
containerStyles: "_otyrpxbi",
|
|
37
38
|
avatarImageStyles: "_kqswstnw _18u01ejb",
|
|
38
|
-
headerImageStyles: "_5ral1dfr _s7n4jp4b
|
|
39
|
-
newHeaderImageStyles: "_5ral1dfr _s7n4jp4b _4t3i12am _1bsb1osq",
|
|
39
|
+
headerImageStyles: "_5ral1dfr _s7n4jp4b _4t3i12am _1bsb1osq",
|
|
40
40
|
teamInformationStyles: "_18u01ejb _19pku2gc _2hwx1ejb",
|
|
41
|
-
teamConnectionHeaderStyles: "_18u0u2gc _2hwxu2gc _c71lx2si _18m91wug",
|
|
42
|
-
teamConnectionContainerStyles: "_18u0u2gc _2hwxu2gc",
|
|
43
41
|
teamConnectionStyles: "_18u0u2gc _2hwxu2gc",
|
|
44
42
|
teamConnectionItemsStyles: "_c71lx2si _18m91wug",
|
|
45
43
|
connectionTitleStyles: "_11c81vhk _18u0pxbi _19pk1b66 _2hwxpxbi _otyr12x7 _syaz1gjq",
|
|
46
|
-
teamAppTileStyles: "_18u01wug _4t3i7vkz _1bsb7vkz"
|
|
47
|
-
viewProfileContainerStyles: "_4cvr1h6o _uwhke4h9 _15a5nqa1 _1i53muej _19bv1ejb _u5f31ejb",
|
|
48
|
-
viewProfileButtonStyles: "_2rko12b0 _189ee4h9 _1dqonqa1 _1h6dmuej _bfhksm61 _syaz1gjq _1bsb1osq _4t3i1ul9 _19pkpxbi"
|
|
49
|
-
};
|
|
50
|
-
var TeamCardWrapper = function TeamCardWrapper(_ref) {
|
|
51
|
-
var id = _ref.id,
|
|
52
|
-
children = _ref.children;
|
|
53
|
-
return /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
54
|
-
xcss: styles.wrapperStyles,
|
|
55
|
-
testId: "team-card-".concat(id)
|
|
56
|
-
}, children);
|
|
57
|
-
};
|
|
58
|
-
var HeaderImage = function HeaderImage(_ref2) {
|
|
59
|
-
var srcUrl = _ref2.srcUrl;
|
|
60
|
-
return /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
61
|
-
as: "img",
|
|
62
|
-
src: srcUrl,
|
|
63
|
-
xcss: styles.headerImageStyles,
|
|
64
|
-
testId: "profile-header-image",
|
|
65
|
-
alt: "team-header-image"
|
|
66
|
-
});
|
|
44
|
+
teamAppTileStyles: "_18u01wug _4t3i7vkz _1bsb7vkz"
|
|
67
45
|
};
|
|
68
|
-
var TeamProfileCard = exports.TeamProfileCard = function TeamProfileCard(
|
|
69
|
-
var containerId =
|
|
70
|
-
teamId =
|
|
71
|
-
displayName =
|
|
72
|
-
description =
|
|
73
|
-
avatarImageUrl =
|
|
74
|
-
headerImageUrl =
|
|
75
|
-
memberAvatars =
|
|
76
|
-
memberCount =
|
|
77
|
-
cloudId =
|
|
78
|
-
userId =
|
|
79
|
-
isVerified =
|
|
80
|
-
teamProfileUrl =
|
|
81
|
-
props = (0, _objectWithoutProperties2.default)(
|
|
46
|
+
var TeamProfileCard = exports.TeamProfileCard = function TeamProfileCard(_ref) {
|
|
47
|
+
var containerId = _ref.containerId,
|
|
48
|
+
teamId = _ref.teamId,
|
|
49
|
+
displayName = _ref.displayName,
|
|
50
|
+
description = _ref.description,
|
|
51
|
+
avatarImageUrl = _ref.avatarImageUrl,
|
|
52
|
+
headerImageUrl = _ref.headerImageUrl,
|
|
53
|
+
memberAvatars = _ref.memberAvatars,
|
|
54
|
+
memberCount = _ref.memberCount,
|
|
55
|
+
cloudId = _ref.cloudId,
|
|
56
|
+
userId = _ref.userId,
|
|
57
|
+
isVerified = _ref.isVerified,
|
|
58
|
+
teamProfileUrl = _ref.teamProfileUrl,
|
|
59
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
82
60
|
var _useTeamContainers = (0, _teamsPublic.useTeamContainers)(teamId),
|
|
83
61
|
teamContainers = _useTeamContainers.teamContainers,
|
|
84
62
|
loading = _useTeamContainers.loading;
|
|
@@ -92,9 +70,6 @@ var TeamProfileCard = exports.TeamProfileCard = function TeamProfileCard(_ref3)
|
|
|
92
70
|
return tc.id === containerId;
|
|
93
71
|
}).length < teamContainers.length;
|
|
94
72
|
}, [containerId, teamContainers]);
|
|
95
|
-
|
|
96
|
-
// TODO: set isNewLayout to be true when clean up 'team-bi-directional-container-connection' experiment
|
|
97
|
-
var isNewLayout = Boolean(props.isKudosEnabled || props.otherActions);
|
|
98
73
|
var onClick = (0, _react.useCallback)(function () {
|
|
99
74
|
if ((0, _platformFeatureFlags.fg)('ptc-enable-profile-card-analytics-refactor')) {
|
|
100
75
|
fireEventNext('ui.button.clicked.viewTeamProfileButton', {});
|
|
@@ -108,167 +83,96 @@ var TeamProfileCard = exports.TeamProfileCard = function TeamProfileCard(_ref3)
|
|
|
108
83
|
});
|
|
109
84
|
}
|
|
110
85
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
xcss: styles.newHeaderImageStyles,
|
|
123
|
-
testId: "profile-header-image",
|
|
124
|
-
alt: "team-header-image"
|
|
125
|
-
}), /*#__PURE__*/_react.default.createElement(_compiled.Stack, {
|
|
126
|
-
space: "space.200",
|
|
127
|
-
xcss: styles.containerStyles
|
|
128
|
-
}, /*#__PURE__*/_react.default.createElement(_compiled.Inline, {
|
|
129
|
-
spread: "space-between",
|
|
130
|
-
alignBlock: "center"
|
|
131
|
-
}, /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
132
|
-
xcss: styles.avatarImageStyles
|
|
133
|
-
}, /*#__PURE__*/_react.default.createElement(_teamsAvatar.default, {
|
|
134
|
-
size: "medium",
|
|
135
|
-
src: avatarImageUrl
|
|
136
|
-
}))), /*#__PURE__*/_react.default.createElement(_compiled.Stack, {
|
|
137
|
-
xcss: styles.teamInformationStyles,
|
|
138
|
-
space: "space.200"
|
|
139
|
-
}, /*#__PURE__*/_react.default.createElement(_compiled.Flex, {
|
|
140
|
-
justifyContent: "space-between"
|
|
141
|
-
}, /*#__PURE__*/_react.default.createElement(_compiled.Stack, {
|
|
142
|
-
space: "space.050"
|
|
143
|
-
}, /*#__PURE__*/_react.default.createElement(_compiled.Inline, {
|
|
144
|
-
alignBlock: "center"
|
|
145
|
-
}, /*#__PURE__*/_react.default.createElement(_heading.default, {
|
|
146
|
-
size: "medium"
|
|
147
|
-
}, displayName), isVerified && /*#__PURE__*/_react.default.createElement(_verifiedTeamIcon.VerifiedTeamIcon, {
|
|
148
|
-
showTooltip: true
|
|
149
|
-
})), /*#__PURE__*/_react.default.createElement(_compiled.Text, {
|
|
150
|
-
color: "color.text.subtlest"
|
|
151
|
-
}, typeof memberCount === 'string' ? /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, {
|
|
152
|
-
defaultMessage: "Contributing team \u2022 {memberCount} members",
|
|
153
|
-
values: {
|
|
154
|
-
memberCount: memberCount
|
|
155
|
-
},
|
|
156
|
-
id: "people-and-teams.team-profile-card.large-member-count"
|
|
157
|
-
}) : /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, {
|
|
158
|
-
defaultMessage: "Contributing team \u2022 {count, plural, one {# member} other {# members}}",
|
|
159
|
-
values: {
|
|
160
|
-
count: memberCount
|
|
161
|
-
},
|
|
162
|
-
id: "people-and-teams.team-profile-card.member-count"
|
|
163
|
-
}))), /*#__PURE__*/_react.default.createElement(_teamActions.TeamActions, (0, _extends2.default)({
|
|
164
|
-
cloudId: cloudId,
|
|
165
|
-
teamId: teamId
|
|
166
|
-
}, props))), /*#__PURE__*/_react.default.createElement(_compiled.Inline, null, /*#__PURE__*/_react.default.createElement(_avatarGroup.default, {
|
|
167
|
-
appearance: "stack",
|
|
168
|
-
data: memberAvatars
|
|
169
|
-
})), description && /*#__PURE__*/_react.default.createElement(_compiled.Text, {
|
|
170
|
-
color: "color.text",
|
|
171
|
-
maxLines: 3
|
|
172
|
-
}, description)), /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
173
|
-
xcss: styles.teamConnectionStyles
|
|
174
|
-
}, /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
175
|
-
xcss: styles.connectionTitleStyles
|
|
176
|
-
}, /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, {
|
|
177
|
-
defaultMessage: "Team links",
|
|
178
|
-
id: "people-and-teams.team-profile-card.team-connections"
|
|
179
|
-
})), /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
180
|
-
xcss: styles.teamConnectionItemsStyles
|
|
181
|
-
}, /*#__PURE__*/_react.default.createElement(_linkItem.default, {
|
|
182
|
-
href: teamProfileUrl,
|
|
183
|
-
target: "_blank",
|
|
184
|
-
onClick: onClick,
|
|
185
|
-
description: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, {
|
|
186
|
-
defaultMessage: "Team profile",
|
|
187
|
-
id: "people-and-teams.team-profile-card.team-profile-description"
|
|
188
|
-
}),
|
|
189
|
-
iconBefore: /*#__PURE__*/_react.default.createElement(_teamsAvatar.default, {
|
|
190
|
-
size: "small",
|
|
191
|
-
src: avatarImageUrl
|
|
192
|
-
}),
|
|
193
|
-
iconAfter: /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
194
|
-
as: "img",
|
|
195
|
-
src: _TeamAppTile.default,
|
|
196
|
-
testId: "team-app-tile",
|
|
197
|
-
alt: "team-app-tile",
|
|
198
|
-
xcss: styles.teamAppTileStyles
|
|
199
|
-
}),
|
|
200
|
-
testId: "team-profile-card-profile-link-item"
|
|
201
|
-
}, /*#__PURE__*/_react.default.createElement(_compiled.Text, {
|
|
202
|
-
maxLines: 1,
|
|
203
|
-
color: "color.text"
|
|
204
|
-
}, displayName)), (loading || hasOtherTeamConnections) && /*#__PURE__*/_react.default.createElement(_teamsPublic.TeamContainers, {
|
|
205
|
-
teamId: teamId,
|
|
206
|
-
onAddAContainerClick: noop,
|
|
207
|
-
userId: userId,
|
|
208
|
-
cloudId: cloudId,
|
|
209
|
-
components: {
|
|
210
|
-
ContainerCard: _main.NewTeamConnections,
|
|
211
|
-
TeamContainersSkeleton: _teamContainersSkeleton.TeamContainersSkeleton
|
|
212
|
-
},
|
|
213
|
-
filterContainerId: containerId,
|
|
214
|
-
isDisplayedOnProfileCard: true,
|
|
215
|
-
maxNumberOfContainersToShow: loading ? 0 : 9
|
|
216
|
-
})))));
|
|
217
|
-
}
|
|
218
|
-
return /*#__PURE__*/_react.default.createElement(TeamCardWrapper, {
|
|
219
|
-
id: teamId
|
|
220
|
-
}, /*#__PURE__*/_react.default.createElement(HeaderImage, {
|
|
221
|
-
srcUrl: headerImageUrl
|
|
222
|
-
}), /*#__PURE__*/_react.default.createElement(_compiled.Stack, {
|
|
86
|
+
}, [createAnalyticsEvent, fireEventNext]);
|
|
87
|
+
return /*#__PURE__*/React.createElement(_compiled.Box, {
|
|
88
|
+
xcss: styles.wrapperStyles,
|
|
89
|
+
testId: "team-card-".concat(teamId)
|
|
90
|
+
}, /*#__PURE__*/React.createElement(_compiled.Box, {
|
|
91
|
+
as: "img",
|
|
92
|
+
src: headerImageUrl,
|
|
93
|
+
xcss: styles.headerImageStyles,
|
|
94
|
+
testId: "profile-header-image",
|
|
95
|
+
alt: "team-header-image"
|
|
96
|
+
}), /*#__PURE__*/React.createElement(_compiled.Stack, {
|
|
223
97
|
space: "space.200",
|
|
224
98
|
xcss: styles.containerStyles
|
|
225
|
-
}, /*#__PURE__*/
|
|
99
|
+
}, /*#__PURE__*/React.createElement(_compiled.Inline, {
|
|
226
100
|
spread: "space-between",
|
|
227
101
|
alignBlock: "center"
|
|
228
|
-
}, /*#__PURE__*/
|
|
102
|
+
}, /*#__PURE__*/React.createElement(_compiled.Box, {
|
|
229
103
|
xcss: styles.avatarImageStyles
|
|
230
|
-
}, /*#__PURE__*/
|
|
104
|
+
}, /*#__PURE__*/React.createElement(_teamsAvatar.default, {
|
|
231
105
|
size: "medium",
|
|
232
106
|
src: avatarImageUrl
|
|
233
|
-
}))), /*#__PURE__*/
|
|
107
|
+
}))), /*#__PURE__*/React.createElement(_compiled.Stack, {
|
|
234
108
|
xcss: styles.teamInformationStyles,
|
|
235
109
|
space: "space.200"
|
|
236
|
-
}, /*#__PURE__*/
|
|
110
|
+
}, /*#__PURE__*/React.createElement(_compiled.Flex, {
|
|
111
|
+
justifyContent: "space-between"
|
|
112
|
+
}, /*#__PURE__*/React.createElement(_compiled.Stack, {
|
|
237
113
|
space: "space.050"
|
|
238
|
-
}, /*#__PURE__*/
|
|
114
|
+
}, /*#__PURE__*/React.createElement(_compiled.Inline, {
|
|
239
115
|
alignBlock: "center"
|
|
240
|
-
}, /*#__PURE__*/
|
|
116
|
+
}, /*#__PURE__*/React.createElement(_heading.default, {
|
|
241
117
|
size: "medium"
|
|
242
|
-
}, displayName), isVerified && /*#__PURE__*/
|
|
118
|
+
}, displayName), isVerified && /*#__PURE__*/React.createElement(_verifiedTeamIcon.VerifiedTeamIcon, {
|
|
243
119
|
showTooltip: true
|
|
244
|
-
})), /*#__PURE__*/
|
|
120
|
+
})), /*#__PURE__*/React.createElement(_compiled.Text, {
|
|
245
121
|
color: "color.text.subtlest"
|
|
246
|
-
}, typeof memberCount === 'string' ? /*#__PURE__*/
|
|
122
|
+
}, typeof memberCount === 'string' ? /*#__PURE__*/React.createElement(_reactIntlNext.FormattedMessage, {
|
|
247
123
|
defaultMessage: "Contributing team \u2022 {memberCount} members",
|
|
248
124
|
values: {
|
|
249
125
|
memberCount: memberCount
|
|
250
126
|
},
|
|
251
127
|
id: "people-and-teams.team-profile-card.large-member-count"
|
|
252
|
-
}) : /*#__PURE__*/
|
|
128
|
+
}) : /*#__PURE__*/React.createElement(_reactIntlNext.FormattedMessage, {
|
|
253
129
|
defaultMessage: "Contributing team \u2022 {count, plural, one {# member} other {# members}}",
|
|
254
130
|
values: {
|
|
255
131
|
count: memberCount
|
|
256
132
|
},
|
|
257
133
|
id: "people-and-teams.team-profile-card.member-count"
|
|
258
|
-
}))), /*#__PURE__*/
|
|
134
|
+
}))), /*#__PURE__*/React.createElement(_teamActions.TeamActions, (0, _extends2.default)({
|
|
135
|
+
cloudId: cloudId,
|
|
136
|
+
teamId: teamId
|
|
137
|
+
}, props))), /*#__PURE__*/React.createElement(_compiled.Inline, null, /*#__PURE__*/React.createElement(_avatarGroup.default, {
|
|
259
138
|
appearance: "stack",
|
|
260
139
|
data: memberAvatars
|
|
261
|
-
})), description && /*#__PURE__*/
|
|
140
|
+
})), description && /*#__PURE__*/React.createElement(_compiled.Text, {
|
|
262
141
|
color: "color.text",
|
|
263
142
|
maxLines: 3
|
|
264
|
-
}, description)),
|
|
265
|
-
xcss:
|
|
266
|
-
},
|
|
143
|
+
}, description)), /*#__PURE__*/React.createElement(_compiled.Box, {
|
|
144
|
+
xcss: styles.teamConnectionStyles
|
|
145
|
+
}, /*#__PURE__*/React.createElement(_compiled.Box, {
|
|
267
146
|
xcss: styles.connectionTitleStyles
|
|
268
|
-
}, /*#__PURE__*/
|
|
269
|
-
defaultMessage: "
|
|
270
|
-
id: "people-and-teams.team-profile-card.team-connections
|
|
271
|
-
})), /*#__PURE__*/
|
|
147
|
+
}, /*#__PURE__*/React.createElement(_reactIntlNext.FormattedMessage, {
|
|
148
|
+
defaultMessage: "Team links",
|
|
149
|
+
id: "people-and-teams.team-profile-card.team-connections"
|
|
150
|
+
})), /*#__PURE__*/React.createElement(_compiled.Box, {
|
|
151
|
+
xcss: styles.teamConnectionItemsStyles
|
|
152
|
+
}, /*#__PURE__*/React.createElement(_linkItem.default, {
|
|
153
|
+
href: teamProfileUrl,
|
|
154
|
+
target: "_blank",
|
|
155
|
+
onClick: onClick,
|
|
156
|
+
description: /*#__PURE__*/React.createElement(_reactIntlNext.FormattedMessage, {
|
|
157
|
+
defaultMessage: "Team profile",
|
|
158
|
+
id: "people-and-teams.team-profile-card.team-profile-description"
|
|
159
|
+
}),
|
|
160
|
+
iconBefore: /*#__PURE__*/React.createElement(_teamsAvatar.default, {
|
|
161
|
+
size: "small",
|
|
162
|
+
src: avatarImageUrl
|
|
163
|
+
}),
|
|
164
|
+
iconAfter: /*#__PURE__*/React.createElement(_compiled.Box, {
|
|
165
|
+
as: "img",
|
|
166
|
+
src: _TeamAppTile.default,
|
|
167
|
+
testId: "team-app-tile",
|
|
168
|
+
alt: "team-app-tile",
|
|
169
|
+
xcss: styles.teamAppTileStyles
|
|
170
|
+
}),
|
|
171
|
+
testId: "team-profile-card-profile-link-item"
|
|
172
|
+
}, /*#__PURE__*/React.createElement(_compiled.Text, {
|
|
173
|
+
maxLines: 1,
|
|
174
|
+
color: "color.text"
|
|
175
|
+
}, displayName)), (loading || hasOtherTeamConnections) && /*#__PURE__*/React.createElement(_teamsPublic.TeamContainers, {
|
|
272
176
|
teamId: teamId,
|
|
273
177
|
onAddAContainerClick: noop,
|
|
274
178
|
userId: userId,
|
|
@@ -278,15 +182,7 @@ var TeamProfileCard = exports.TeamProfileCard = function TeamProfileCard(_ref3)
|
|
|
278
182
|
TeamContainersSkeleton: _teamContainersSkeleton.TeamContainersSkeleton
|
|
279
183
|
},
|
|
280
184
|
filterContainerId: containerId,
|
|
281
|
-
isDisplayedOnProfileCard: true
|
|
282
|
-
|
|
283
|
-
xcss: styles.viewProfileContainerStyles
|
|
284
|
-
}, /*#__PURE__*/_react.default.createElement(_compiled.Pressable, {
|
|
285
|
-
onClick: onClick,
|
|
286
|
-
xcss: styles.viewProfileButtonStyles,
|
|
287
|
-
testId: "view-profile-button"
|
|
288
|
-
}, /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, {
|
|
289
|
-
defaultMessage: "View profile",
|
|
290
|
-
id: "people-and-teams.team-profile-card.view-profile"
|
|
185
|
+
isDisplayedOnProfileCard: true,
|
|
186
|
+
maxNumberOfContainersToShow: loading ? 0 : 9
|
|
291
187
|
})))));
|
|
292
188
|
};
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
._2rko12b0{border-radius:var(--ds-radius-small,4px)}._18u01wug{margin-left:auto}
|
|
3
|
-
._1bsb1tcg{width:24px}
|
|
1
|
+
._18u01wug{margin-left:auto}
|
|
4
2
|
._1bsb7vkz{width:1pc}
|
|
5
|
-
._1e0c1txw{display:flex}
|
|
6
|
-
._4cvr1h6o{align-items:center}
|
|
7
|
-
._4t3i1tcg{height:24px}
|
|
8
3
|
._4t3i7vkz{height:1pc}
|
|
@@ -5,7 +5,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.TeamConnections =
|
|
8
|
+
exports.TeamConnections = void 0;
|
|
9
9
|
require("./main.compiled.css");
|
|
10
10
|
var _runtime = require("@compiled/react/runtime");
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
@@ -18,8 +18,6 @@ var _teamsPublic = require("@atlaskit/teams-public");
|
|
|
18
18
|
var _analytics = require("../../../util/analytics");
|
|
19
19
|
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); }
|
|
20
20
|
var styles = {
|
|
21
|
-
containerWrapperStyles: "_1e0c1txw _4cvr1h6o",
|
|
22
|
-
containerIconStyles: "_2rko12b0 _4t3i1tcg _1bsb1tcg",
|
|
23
21
|
containerTypeIconButtonStyles: "_18u01wug _4t3i7vkz _1bsb7vkz"
|
|
24
22
|
};
|
|
25
23
|
var TeamConnections = exports.TeamConnections = function TeamConnections(_ref) {
|
|
@@ -55,68 +53,6 @@ var TeamConnections = exports.TeamConnections = function TeamConnections(_ref) {
|
|
|
55
53
|
});
|
|
56
54
|
}
|
|
57
55
|
}, [containerType, createAnalyticsEvent, fireEventNext]);
|
|
58
|
-
return /*#__PURE__*/_react.default.createElement(_menu.LinkItem, {
|
|
59
|
-
href: link,
|
|
60
|
-
onClick: onClick,
|
|
61
|
-
target: "_blank"
|
|
62
|
-
}, /*#__PURE__*/_react.default.createElement(_compiled.Inline, {
|
|
63
|
-
space: "space.100",
|
|
64
|
-
xcss: styles.containerWrapperStyles
|
|
65
|
-
}, /*#__PURE__*/_react.default.createElement(_teamsPublic.ContainerIcon, {
|
|
66
|
-
containerType: containerType,
|
|
67
|
-
title: title,
|
|
68
|
-
containerIcon: containerIcon,
|
|
69
|
-
size: "small"
|
|
70
|
-
}), /*#__PURE__*/_react.default.createElement(_compiled.Stack, null, /*#__PURE__*/_react.default.createElement(_compiled.Text, {
|
|
71
|
-
maxLines: 1,
|
|
72
|
-
color: "color.text"
|
|
73
|
-
}, title), /*#__PURE__*/_react.default.createElement(_compiled.Inline, {
|
|
74
|
-
space: "space.050"
|
|
75
|
-
}, /*#__PURE__*/_react.default.createElement(_compiled.Text, {
|
|
76
|
-
size: "small",
|
|
77
|
-
color: "color.text.subtlest"
|
|
78
|
-
}, description), /*#__PURE__*/_react.default.createElement(_compiled.Text, {
|
|
79
|
-
size: "small",
|
|
80
|
-
color: "color.text.subtlest"
|
|
81
|
-
}, containerTypeText))), /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
82
|
-
backgroundColor: 'color.background.neutral.subtle',
|
|
83
|
-
xcss: styles.containerTypeIconButtonStyles,
|
|
84
|
-
testId: "container-type-icon"
|
|
85
|
-
}, icon)));
|
|
86
|
-
};
|
|
87
|
-
var NewTeamConnections = exports.NewTeamConnections = function NewTeamConnections(_ref2) {
|
|
88
|
-
var containerType = _ref2.containerType,
|
|
89
|
-
title = _ref2.title,
|
|
90
|
-
containerIcon = _ref2.containerIcon,
|
|
91
|
-
link = _ref2.link;
|
|
92
|
-
var _getContainerProperti2 = (0, _teamsPublic.getContainerProperties)({
|
|
93
|
-
containerType: containerType,
|
|
94
|
-
iconSize: 'medium',
|
|
95
|
-
isDisplayedOnProfileCard: true
|
|
96
|
-
}),
|
|
97
|
-
description = _getContainerProperti2.description,
|
|
98
|
-
icon = _getContainerProperti2.icon,
|
|
99
|
-
containerTypeText = _getContainerProperti2.containerTypeText;
|
|
100
|
-
var _useAnalyticsEvents2 = (0, _analyticsNext.useAnalyticsEvents)(),
|
|
101
|
-
createAnalyticsEvent = _useAnalyticsEvents2.createAnalyticsEvent;
|
|
102
|
-
var _useAnalyticsEventsNe2 = (0, _teamsAppInternalAnalytics.useAnalyticsEvents)(),
|
|
103
|
-
fireEventNext = _useAnalyticsEventsNe2.fireEvent;
|
|
104
|
-
var onClick = (0, _react.useCallback)(function () {
|
|
105
|
-
if ((0, _platformFeatureFlags.fg)('ptc-enable-profile-card-analytics-refactor')) {
|
|
106
|
-
fireEventNext('ui.teamConnectionItem.clicked.teamProfileCard', {
|
|
107
|
-
container: containerType
|
|
108
|
-
});
|
|
109
|
-
} else {
|
|
110
|
-
(0, _analytics.fireEvent)(createAnalyticsEvent, {
|
|
111
|
-
action: 'clicked',
|
|
112
|
-
actionSubject: 'teamConnectionItem',
|
|
113
|
-
actionSubjectId: 'teamProfileCard',
|
|
114
|
-
attributes: {
|
|
115
|
-
container: containerType
|
|
116
|
-
}
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
}, [containerType, createAnalyticsEvent, fireEventNext]);
|
|
120
56
|
return /*#__PURE__*/_react.default.createElement(_menu.LinkItem, {
|
|
121
57
|
href: link,
|
|
122
58
|
onClick: onClick,
|
|
@@ -13,7 +13,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
13
13
|
var ANALYTICS_CHANNEL = 'peopleTeams';
|
|
14
14
|
var PACKAGE_META_DATA = exports.PACKAGE_META_DATA = {
|
|
15
15
|
packageName: "@atlaskit/profilecard",
|
|
16
|
-
packageVersion: "
|
|
16
|
+
packageVersion: "0.0.0-development"
|
|
17
17
|
};
|
|
18
18
|
var runItLater = function runItLater(cb) {
|
|
19
19
|
var requestIdleCallback = window.requestIdleCallback;
|
|
@@ -58,7 +58,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
58
58
|
actionSubjectId: actionSubjectId,
|
|
59
59
|
attributes: _objectSpread(_objectSpread({
|
|
60
60
|
packageName: "@atlaskit/profilecard",
|
|
61
|
-
packageVersion: "
|
|
61
|
+
packageVersion: "0.0.0-development"
|
|
62
62
|
}, attributes), {}, {
|
|
63
63
|
firedAt: Math.round((0, _performance.getPageTime)())
|
|
64
64
|
})
|
|
@@ -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', "
|
|
9
|
+
headers.append('atl-client-version', "0.0.0-development");
|
|
10
10
|
return headers;
|
|
11
11
|
};
|
|
12
12
|
export async function getOrgIdForCloudIdFromAGG(url, cloudId) {
|
|
@@ -77,7 +77,7 @@ export const addHeaders = headers => {
|
|
|
77
77
|
headers.append('X-ExperimentalApi', 'teams-beta');
|
|
78
78
|
headers.append('X-ExperimentalApi', 'team-members-beta');
|
|
79
79
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
80
|
-
headers.append('atl-client-version', "
|
|
80
|
+
headers.append('atl-client-version', "0.0.0-development");
|
|
81
81
|
return headers;
|
|
82
82
|
};
|
|
83
83
|
export async function getTeamFromAGG(url, teamId, siteId) {
|
|
@@ -103,10 +103,7 @@ function ProfileCardTriggerInner({
|
|
|
103
103
|
"data-testid": testId
|
|
104
104
|
}));
|
|
105
105
|
},
|
|
106
|
-
content: () =>
|
|
107
|
-
/*#__PURE__*/
|
|
108
|
-
// eslint-disable-next-line @atlassian/a11y/no-static-element-interactions
|
|
109
|
-
React.createElement("div", {
|
|
106
|
+
content: () => /*#__PURE__*/React.createElement("div", {
|
|
110
107
|
onMouseEnter: onMouseEnter
|
|
111
108
|
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
112
109
|
,
|