@atlaskit/profilecard 23.19.3 → 23.20.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 +24 -0
- package/dist/cjs/client/UserProfileCardClient.js +1 -0
- package/dist/cjs/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/cjs/client/getTeamFromAGG.js +1 -1
- package/dist/cjs/components/Error/ErrorMessage.js +2 -7
- package/dist/cjs/components/Team/TeamProfileCard.js +3 -27
- package/dist/cjs/components/User/OverflowProfileCardButtons.js +1 -12
- package/dist/cjs/components/User/ProfileCard.js +1 -13
- package/dist/cjs/components/User/ProfileCardDetails.js +8 -0
- package/dist/cjs/components/User/ProfileCardTrigger.js +6 -2
- package/dist/cjs/components/User/ReportingLinesDetails.js +3 -13
- package/dist/cjs/util/analytics.js +1 -1
- package/dist/es2019/client/UserProfileCardClient.js +1 -0
- package/dist/es2019/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/es2019/client/getTeamFromAGG.js +1 -1
- package/dist/es2019/components/Error/ErrorMessage.js +2 -7
- package/dist/es2019/components/Team/TeamProfileCard.js +3 -25
- package/dist/es2019/components/User/OverflowProfileCardButtons.js +1 -12
- package/dist/es2019/components/User/ProfileCard.js +1 -8
- package/dist/es2019/components/User/ProfileCardDetails.js +10 -0
- package/dist/es2019/components/User/ProfileCardTrigger.js +6 -2
- package/dist/es2019/components/User/ReportingLinesDetails.js +3 -13
- package/dist/es2019/util/analytics.js +1 -1
- package/dist/esm/client/UserProfileCardClient.js +1 -0
- package/dist/esm/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/esm/client/getTeamFromAGG.js +1 -1
- package/dist/esm/components/Error/ErrorMessage.js +2 -7
- package/dist/esm/components/Team/TeamProfileCard.js +3 -27
- package/dist/esm/components/User/OverflowProfileCardButtons.js +1 -12
- package/dist/esm/components/User/ProfileCard.js +1 -13
- package/dist/esm/components/User/ProfileCardDetails.js +8 -0
- package/dist/esm/components/User/ProfileCardTrigger.js +6 -2
- package/dist/esm/components/User/ReportingLinesDetails.js +3 -13
- package/dist/esm/util/analytics.js +1 -1
- package/dist/types/components/User/ProfileCardTrigger.d.ts +1 -1
- package/dist/types/types.d.ts +3 -0
- package/dist/types-ts4.5/components/User/ProfileCardTrigger.d.ts +1 -1
- package/dist/types-ts4.5/types.d.ts +3 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @atlaskit/profilecard
|
|
2
2
|
|
|
3
|
+
## 23.20.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#172553](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/172553)
|
|
8
|
+
[`7e8e9711f4e15`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7e8e9711f4e15) -
|
|
9
|
+
Clean up ptc_migrate_buttons feature gate
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
## 23.19.4
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [#174177](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/174177)
|
|
20
|
+
[`3094c6ed637b3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3094c6ed637b3) -
|
|
21
|
+
[ux] Displaying Service Account tag for Service Account user profile
|
|
22
|
+
- [#173636](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/173636)
|
|
23
|
+
[`22b85a186fb8a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/22b85a186fb8a) -
|
|
24
|
+
SSR placeholder for mention profile card trigger
|
|
25
|
+
- Updated dependencies
|
|
26
|
+
|
|
3
27
|
## 23.19.3
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
|
@@ -128,6 +128,7 @@ var UserProfileCardClient = exports.default = /*#__PURE__*/function (_CachingCli
|
|
|
128
128
|
return _context2.abrupt("return", _objectSpread(_objectSpread({}, user), {}, {
|
|
129
129
|
isBot: user.__typename === 'AppUser',
|
|
130
130
|
isAgent: user.appType === 'agent',
|
|
131
|
+
isServiceAccount: user.__typename === 'AppUser' && user.appType === 'service',
|
|
131
132
|
status: user.accountStatus,
|
|
132
133
|
statusModifiedDate: ((_user$extendedProfile = user.extendedProfile) === null || _user$extendedProfile === void 0 ? void 0 : _user$extendedProfile.closedDate) || ((_user$extendedProfile2 = user.extendedProfile) === null || _user$extendedProfile2 === void 0 ? void 0 : _user$extendedProfile2.inactiveDate),
|
|
133
134
|
avatarUrl: user.picture,
|
|
@@ -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.19.
|
|
14
|
+
headers.append('atl-client-version', "23.19.4");
|
|
15
15
|
return headers;
|
|
16
16
|
};
|
|
17
17
|
function getOrgIdForCloudIdFromAGG(_x, _x2) {
|
|
@@ -65,7 +65,7 @@ var addHeaders = exports.addHeaders = function addHeaders(headers) {
|
|
|
65
65
|
headers.append('X-ExperimentalApi', 'teams-beta');
|
|
66
66
|
headers.append('X-ExperimentalApi', 'team-members-beta');
|
|
67
67
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
68
|
-
headers.append('atl-client-version', "23.19.
|
|
68
|
+
headers.append('atl-client-version', "23.19.4");
|
|
69
69
|
return headers;
|
|
70
70
|
};
|
|
71
71
|
function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -7,11 +7,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _button = _interopRequireDefault(require("@atlaskit/button"));
|
|
11
10
|
var _new = _interopRequireDefault(require("@atlaskit/button/new"));
|
|
12
11
|
var _crossCircle = _interopRequireDefault(require("@atlaskit/icon/core/cross-circle"));
|
|
13
12
|
var _crossCircle2 = _interopRequireDefault(require("@atlaskit/icon/glyph/cross-circle"));
|
|
14
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
13
|
var _primitives = require("@atlaskit/primitives");
|
|
16
14
|
var _Error = require("../../styled/Error");
|
|
17
15
|
var _analytics = require("../../util/analytics");
|
|
@@ -44,11 +42,8 @@ var ErrorMessage = function ErrorMessage(props) {
|
|
|
44
42
|
label: "icon error",
|
|
45
43
|
LEGACY_fallbackIcon: _crossCircle2.default,
|
|
46
44
|
LEGACY_size: "xlarge"
|
|
47
|
-
}), errorContent(), reload &&
|
|
45
|
+
}), errorContent(), reload && /*#__PURE__*/_react.default.createElement(_new.default, {
|
|
48
46
|
onClick: reload
|
|
49
|
-
}, "Try again")
|
|
50
|
-
appearance: "link",
|
|
51
|
-
onClick: reload
|
|
52
|
-
}, "Try again")));
|
|
47
|
+
}, "Try again"));
|
|
53
48
|
};
|
|
54
49
|
var _default = exports.default = ErrorMessage;
|
|
@@ -14,9 +14,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
14
14
|
var _reactIntlNext = require("react-intl-next");
|
|
15
15
|
var _avatar = _interopRequireDefault(require("@atlaskit/avatar"));
|
|
16
16
|
var _avatarGroup = _interopRequireDefault(require("@atlaskit/avatar-group"));
|
|
17
|
-
var _loadingButton = _interopRequireDefault(require("@atlaskit/button/loading-button"));
|
|
18
17
|
var _new = _interopRequireWildcard(require("@atlaskit/button/new"));
|
|
19
|
-
var _standardButton = _interopRequireDefault(require("@atlaskit/button/standard-button"));
|
|
20
18
|
var _focusRing = _interopRequireDefault(require("@atlaskit/focus-ring"));
|
|
21
19
|
var _showMoreHorizontalMore = _interopRequireDefault(require("@atlaskit/icon/core/migration/show-more-horizontal--more"));
|
|
22
20
|
var _menu = require("@atlaskit/menu");
|
|
@@ -175,16 +173,11 @@ var ActionButton = function ActionButton(_ref2) {
|
|
|
175
173
|
var isGiveKudosActionButton = action.id === GIVE_KUDOS_ACTION_ID;
|
|
176
174
|
var actionButton = /*#__PURE__*/_react.default.createElement(_focusRing.default, {
|
|
177
175
|
isInset: true
|
|
178
|
-
},
|
|
176
|
+
}, /*#__PURE__*/_react.default.createElement(_new.LinkButton, {
|
|
179
177
|
key: action.id || index,
|
|
180
178
|
onClick: onActionClick(action, analytics, index),
|
|
181
179
|
href: action.link || '',
|
|
182
180
|
shouldFitContainer: true
|
|
183
|
-
}, action.label, isGiveKudosActionButton && /*#__PURE__*/_react.default.createElement(_Card.AnimationWrapper, null, /*#__PURE__*/_react.default.createElement(_Card.KudosBlobAnimation, null))) : /*#__PURE__*/_react.default.createElement(_standardButton.default, {
|
|
184
|
-
key: action.id || index,
|
|
185
|
-
onClick: onActionClick(action, analytics, index),
|
|
186
|
-
href: action.link,
|
|
187
|
-
shouldFitContainer: true
|
|
188
181
|
}, action.label, isGiveKudosActionButton && /*#__PURE__*/_react.default.createElement(_Card.AnimationWrapper, null, /*#__PURE__*/_react.default.createElement(_Card.KudosBlobAnimation, null))));
|
|
189
182
|
if (isGiveKudosActionButton) {
|
|
190
183
|
return /*#__PURE__*/_react.default.createElement(_Card.AnimatedKudosButton, null, actionButton);
|
|
@@ -230,7 +223,7 @@ var ExtraActions = function ExtraActions(_ref3) {
|
|
|
230
223
|
}));
|
|
231
224
|
},
|
|
232
225
|
trigger: function trigger(triggerProps) {
|
|
233
|
-
return
|
|
226
|
+
return /*#__PURE__*/_react.default.createElement(_new.IconButton, (0, _extends2.default)({
|
|
234
227
|
testId: "more-actions-button"
|
|
235
228
|
}, triggerProps, {
|
|
236
229
|
isSelected: isOpen,
|
|
@@ -239,18 +232,6 @@ var ExtraActions = function ExtraActions(_ref3) {
|
|
|
239
232
|
},
|
|
240
233
|
icon: _showMoreHorizontalMore.default,
|
|
241
234
|
label: "actions"
|
|
242
|
-
})) : /*#__PURE__*/_react.default.createElement(_standardButton.default, (0, _extends2.default)({
|
|
243
|
-
testId: "more-actions-button"
|
|
244
|
-
}, triggerProps, {
|
|
245
|
-
isSelected: isOpen,
|
|
246
|
-
onClick: function onClick() {
|
|
247
|
-
return onMoreClick(!isOpen);
|
|
248
|
-
},
|
|
249
|
-
iconAfter: /*#__PURE__*/_react.default.createElement(_showMoreHorizontalMore.default, {
|
|
250
|
-
spacing: "spacious",
|
|
251
|
-
label: "actions",
|
|
252
|
-
color: "currentColor"
|
|
253
|
-
})
|
|
254
235
|
}));
|
|
255
236
|
},
|
|
256
237
|
zIndex: _constants.layers.modal(),
|
|
@@ -357,12 +338,7 @@ var ErrorMessage = function ErrorMessage(_ref6) {
|
|
|
357
338
|
}, /*#__PURE__*/_react.default.createElement(_Error2.ErrorIllustration, null), /*#__PURE__*/_react.default.createElement(_compiled.Text, {
|
|
358
339
|
as: "p",
|
|
359
340
|
weight: "semibold"
|
|
360
|
-
}, /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.default.teamErrorTitle)), /*#__PURE__*/_react.default.createElement(_Error.TeamErrorText, null, /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.default.teamErrorText)), clientFetchProfile && /*#__PURE__*/_react.default.createElement(_TeamCard.ActionButtons, null, /*#__PURE__*/_react.default.createElement(_TeamCard.WrappedButton, null,
|
|
361
|
-
testId: "client-fetch-profile-button",
|
|
362
|
-
shouldFitContainer: true,
|
|
363
|
-
onClick: retry,
|
|
364
|
-
isLoading: isLoading
|
|
365
|
-
}, /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.default.teamErrorButton)) : /*#__PURE__*/_react.default.createElement(_loadingButton.default, {
|
|
341
|
+
}, /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.default.teamErrorTitle)), /*#__PURE__*/_react.default.createElement(_Error.TeamErrorText, null, /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.default.teamErrorText)), clientFetchProfile && /*#__PURE__*/_react.default.createElement(_TeamCard.ActionButtons, null, /*#__PURE__*/_react.default.createElement(_TeamCard.WrappedButton, null, /*#__PURE__*/_react.default.createElement(_new.default, {
|
|
366
342
|
testId: "client-fetch-profile-button",
|
|
367
343
|
shouldFitContainer: true,
|
|
368
344
|
onClick: retry,
|
|
@@ -11,11 +11,9 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
11
11
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
12
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _reactIntlNext = require("react-intl-next");
|
|
14
|
-
var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom-theme-button"));
|
|
15
14
|
var _new = require("@atlaskit/button/new");
|
|
16
15
|
var _dropdownMenu = _interopRequireWildcard(require("@atlaskit/dropdown-menu"));
|
|
17
16
|
var _showMoreHorizontalMore = _interopRequireDefault(require("@atlaskit/icon/core/migration/show-more-horizontal--more"));
|
|
18
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
19
17
|
var _messages = _interopRequireDefault(require("../../messages"));
|
|
20
18
|
var _Card = require("../../styled/Card");
|
|
21
19
|
var _analytics = require("../../util/analytics");
|
|
@@ -55,21 +53,12 @@ var OverflowProfileCardButtons = exports.OverflowProfileCardButtons = function O
|
|
|
55
53
|
isSelected = _ref2.isSelected,
|
|
56
54
|
testId = _ref2.testId,
|
|
57
55
|
providedProps = (0, _objectWithoutProperties2.default)(_ref2, _excluded);
|
|
58
|
-
return
|
|
56
|
+
return /*#__PURE__*/_react.default.createElement(_new.IconButton, (0, _extends2.default)({
|
|
59
57
|
type: "button"
|
|
60
58
|
}, providedProps, {
|
|
61
59
|
ref: triggerRef,
|
|
62
60
|
label: intl.formatMessage(_messages.default.profileCardMoreIconLabel),
|
|
63
61
|
icon: _showMoreHorizontalMore.default
|
|
64
|
-
})) : /*#__PURE__*/_react.default.createElement(_customThemeButton.default, (0, _extends2.default)({
|
|
65
|
-
type: "button"
|
|
66
|
-
}, providedProps, {
|
|
67
|
-
ref: triggerRef,
|
|
68
|
-
iconBefore: /*#__PURE__*/_react.default.createElement(_showMoreHorizontalMore.default, {
|
|
69
|
-
color: "currentColor",
|
|
70
|
-
spacing: "spacious",
|
|
71
|
-
label: intl.formatMessage(_messages.default.profileCardMoreIconLabel)
|
|
72
|
-
})
|
|
73
62
|
}));
|
|
74
63
|
}
|
|
75
64
|
}, /*#__PURE__*/_react.default.createElement(_dropdownMenu.DropdownItemGroup, null, actions.map(function (action, index) {
|
|
@@ -13,7 +13,6 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
13
13
|
var _reactIntlNext = require("react-intl-next");
|
|
14
14
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
15
15
|
var _avatar = _interopRequireDefault(require("@atlaskit/avatar"));
|
|
16
|
-
var _button = _interopRequireDefault(require("@atlaskit/button"));
|
|
17
16
|
var _new = require("@atlaskit/button/new");
|
|
18
17
|
var _focusRing = _interopRequireDefault(require("@atlaskit/focus-ring"));
|
|
19
18
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
@@ -170,7 +169,7 @@ var Actions = function Actions(_ref) {
|
|
|
170
169
|
var button = /*#__PURE__*/_react.default.createElement(_focusRing.default, {
|
|
171
170
|
isInset: true,
|
|
172
171
|
key: "profile-card-action-focus-ring_".concat(action.id || index)
|
|
173
|
-
},
|
|
172
|
+
}, /*#__PURE__*/_react.default.createElement(_new.LinkButton, {
|
|
174
173
|
appearance: "default",
|
|
175
174
|
key: action.id || index,
|
|
176
175
|
onClick: function onClick(event) {
|
|
@@ -183,17 +182,6 @@ var Actions = function Actions(_ref) {
|
|
|
183
182
|
autoFocus: index === 0 && isTriggeredUsingKeyboard,
|
|
184
183
|
id: "action-button-".concat(action.id),
|
|
185
184
|
"aria-labelledby": (0, _platformFeatureFlags.fg)('enable_userprofilecard_arialabelfix') ? "action-button-".concat(action.id, " profilecard-name-label") : ''
|
|
186
|
-
}, action.label, isKudos && /*#__PURE__*/_react.default.createElement(_Card.AnimationWrapper, null, /*#__PURE__*/_react.default.createElement(_Card.KudosBlobAnimation, null))) : /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
187
|
-
appearance: "default",
|
|
188
|
-
key: action.id || index,
|
|
189
|
-
onClick: function onClick(event) {
|
|
190
|
-
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
191
|
-
args[_key2 - 1] = arguments[_key2];
|
|
192
|
-
}
|
|
193
|
-
return onActionClick(action, args, event, index);
|
|
194
|
-
},
|
|
195
|
-
href: action.link,
|
|
196
|
-
autoFocus: index === 0 && isTriggeredUsingKeyboard
|
|
197
185
|
}, action.label, isKudos && /*#__PURE__*/_react.default.createElement(_Card.AnimationWrapper, null, /*#__PURE__*/_react.default.createElement(_Card.KudosBlobAnimation, null))));
|
|
198
186
|
if (isKudos) {
|
|
199
187
|
return /*#__PURE__*/_react.default.createElement(_Card.AnimatedKudosButton, {
|
|
@@ -73,6 +73,11 @@ var CustomLozenges = function CustomLozenges(_ref) {
|
|
|
73
73
|
}), text);
|
|
74
74
|
}));
|
|
75
75
|
};
|
|
76
|
+
var ServiceAccountProfileCardDetails = function ServiceAccountProfileCardDetails(props) {
|
|
77
|
+
var fullName = props.fullName,
|
|
78
|
+
nickname = props.nickname;
|
|
79
|
+
return /*#__PURE__*/_react.default.createElement(_Card.DetailsGroup, null, renderName(nickname, fullName), /*#__PURE__*/_react.default.createElement(_Card.AppTitleLabel, null, "SERVICE ACCOUNT"));
|
|
80
|
+
};
|
|
76
81
|
var BotProfileCardDetails = function BotProfileCardDetails(props) {
|
|
77
82
|
var fullName = props.fullName,
|
|
78
83
|
nickname = props.nickname;
|
|
@@ -103,6 +108,9 @@ var DisabledProfileCardDetails = function DisabledProfileCardDetails(props) {
|
|
|
103
108
|
var ProfileCardDetails = exports.ProfileCardDetails = function ProfileCardDetails(props) {
|
|
104
109
|
var meta = props.meta,
|
|
105
110
|
status = props.status;
|
|
111
|
+
if (props.isServiceAccount) {
|
|
112
|
+
return /*#__PURE__*/_react.default.createElement(ServiceAccountProfileCardDetails, props);
|
|
113
|
+
}
|
|
106
114
|
if (props.isBot) {
|
|
107
115
|
return /*#__PURE__*/_react.default.createElement(BotProfileCardDetails, props);
|
|
108
116
|
}
|
|
@@ -96,7 +96,8 @@ function ProfilecardTriggerNext(_ref2) {
|
|
|
96
96
|
agentActions = _ref2.agentActions,
|
|
97
97
|
_ref2$ariaHideProfile = _ref2.ariaHideProfileTrigger,
|
|
98
98
|
ariaHideProfileTrigger = _ref2$ariaHideProfile === void 0 ? false : _ref2$ariaHideProfile,
|
|
99
|
-
propsIsVisible = _ref2.isVisible
|
|
99
|
+
propsIsVisible = _ref2.isVisible,
|
|
100
|
+
ssrPlaceholderId = _ref2.ssrPlaceholderId;
|
|
100
101
|
var _useAnalyticsEvents = (0, _analyticsNext.useAnalyticsEvents)(),
|
|
101
102
|
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
102
103
|
var _useIntl = (0, _reactIntlNext.useIntl)(),
|
|
@@ -348,6 +349,9 @@ function ProfilecardTriggerNext(_ref2) {
|
|
|
348
349
|
isTriggeredUsingKeyboard: isTriggeredUsingKeyboard,
|
|
349
350
|
disabledAriaAttributes: disabledAriaAttributes
|
|
350
351
|
});
|
|
352
|
+
var ssrPlaceholderProp = (0, _platformFeatureFlags.fg)('cc_mention_ssr_placeholder') ? {
|
|
353
|
+
"data-ssr-placeholder-replace": ssrPlaceholderId
|
|
354
|
+
} : {};
|
|
351
355
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_popup.default, {
|
|
352
356
|
isOpen: !!visible,
|
|
353
357
|
onClose: function onClose(event) {
|
|
@@ -399,7 +403,7 @@ function ProfilecardTriggerNext(_ref2) {
|
|
|
399
403
|
'aria-label': ariaHideProfileTrigger ? undefined : (0, _getLabelMessage.default)(ariaLabel, profilecardProps.fullName, formatMessage)
|
|
400
404
|
}, ariaHideProfileTrigger && {
|
|
401
405
|
'aria-hidden': 'true'
|
|
402
|
-
}), children);
|
|
406
|
+
}, ssrPlaceholderProp), children);
|
|
403
407
|
},
|
|
404
408
|
zIndex: _constants.layers.modal(),
|
|
405
409
|
shouldUseCaptureOnOutsideClick: true,
|
|
@@ -12,7 +12,6 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
12
12
|
var _reactIntlNext = require("react-intl-next");
|
|
13
13
|
var _avatar = _interopRequireDefault(require("@atlaskit/avatar"));
|
|
14
14
|
var _avatarGroup = _interopRequireDefault(require("@atlaskit/avatar-group"));
|
|
15
|
-
var _button = _interopRequireDefault(require("@atlaskit/button"));
|
|
16
15
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
16
|
var _primitives = require("@atlaskit/primitives");
|
|
18
17
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
@@ -36,7 +35,7 @@ var styles = {
|
|
|
36
35
|
};
|
|
37
36
|
var avatarGroupMaxCount = 5;
|
|
38
37
|
var ReportingLinesDetails = function ReportingLinesDetails(props) {
|
|
39
|
-
var _manager$pii, _manager$pii2
|
|
38
|
+
var _manager$pii, _manager$pii2;
|
|
40
39
|
var _useIntl = (0, _reactIntlNext.useIntl)(),
|
|
41
40
|
formatMessage = _useIntl.formatMessage;
|
|
42
41
|
var fireAnalyticsWithDuration = props.fireAnalyticsWithDuration,
|
|
@@ -82,7 +81,7 @@ var ReportingLinesDetails = function ReportingLinesDetails(props) {
|
|
|
82
81
|
} : undefined;
|
|
83
82
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, manager && /*#__PURE__*/_react.default.createElement(_ReportingLines.ReportingLinesSection, null, /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
84
83
|
xcss: [reportingLinesHeadingDefaultStyles, reportingLinesHeadingStyles]
|
|
85
|
-
}, /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.default.managerSectionHeading)), /*#__PURE__*/_react.default.createElement(_ReportingLines.OffsetWrapper, null,
|
|
84
|
+
}, /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.default.managerSectionHeading)), /*#__PURE__*/_react.default.createElement(_ReportingLines.OffsetWrapper, null, /*#__PURE__*/_react.default.createElement(_compiled.Pressable, {
|
|
86
85
|
onClick: function onClick() {
|
|
87
86
|
return onReportingLinksClick(manager, 'manager', getProfileHref(manager.accountIdentifier, reportingLinesProfileUrl));
|
|
88
87
|
},
|
|
@@ -91,16 +90,7 @@ var ReportingLinesDetails = function ReportingLinesDetails(props) {
|
|
|
91
90
|
}, /*#__PURE__*/_react.default.createElement(_ReportingLines.ManagerSection, null, /*#__PURE__*/_react.default.createElement(_avatar.default, {
|
|
92
91
|
size: "xsmall",
|
|
93
92
|
src: (_manager$pii = manager.pii) === null || _manager$pii === void 0 ? void 0 : _manager$pii.picture
|
|
94
|
-
}), /*#__PURE__*/_react.default.createElement(_ReportingLines.ManagerName, null, (_manager$pii2 = manager.pii) === null || _manager$pii2 === void 0 ? void 0 : _manager$pii2.name)))
|
|
95
|
-
appearance: "subtle",
|
|
96
|
-
spacing: "none",
|
|
97
|
-
href: getProfileHref(manager.accountIdentifier, reportingLinesProfileUrl),
|
|
98
|
-
onClick: getReportingLinesOnClick(manager, 'manager'),
|
|
99
|
-
isDisabled: !onReportingLinesClick
|
|
100
|
-
}, /*#__PURE__*/_react.default.createElement(_ReportingLines.ManagerSection, null, /*#__PURE__*/_react.default.createElement(_avatar.default, {
|
|
101
|
-
size: "xsmall",
|
|
102
|
-
src: (_manager$pii3 = manager.pii) === null || _manager$pii3 === void 0 ? void 0 : _manager$pii3.picture
|
|
103
|
-
}), /*#__PURE__*/_react.default.createElement(_ReportingLines.ManagerName, null, (_manager$pii4 = manager.pii) === null || _manager$pii4 === void 0 ? void 0 : _manager$pii4.name))))), hasReports && /*#__PURE__*/_react.default.createElement(_ReportingLines.ReportingLinesSection, null, /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
93
|
+
}), /*#__PURE__*/_react.default.createElement(_ReportingLines.ManagerName, null, (_manager$pii2 = manager.pii) === null || _manager$pii2 === void 0 ? void 0 : _manager$pii2.name))))), hasReports && /*#__PURE__*/_react.default.createElement(_ReportingLines.ReportingLinesSection, null, /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
104
94
|
xcss: reportingLinesHeadingDefaultStyles
|
|
105
95
|
}, /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.default.directReportsSectionHeading)), /*#__PURE__*/_react.default.createElement(_avatarGroup.default, {
|
|
106
96
|
appearance: "stack",
|
|
@@ -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.19.
|
|
48
|
+
packageVersion: "23.19.4"
|
|
49
49
|
}, attributes), {}, {
|
|
50
50
|
firedAt: Math.round((0, _performance.getPageTime)())
|
|
51
51
|
})
|
|
@@ -136,6 +136,7 @@ export default class UserProfileCardClient extends CachingClient {
|
|
|
136
136
|
...user,
|
|
137
137
|
isBot: user.__typename === 'AppUser',
|
|
138
138
|
isAgent: user.appType === 'agent',
|
|
139
|
+
isServiceAccount: user.__typename === 'AppUser' && user.appType === 'service',
|
|
139
140
|
status: user.accountStatus,
|
|
140
141
|
statusModifiedDate: ((_user$extendedProfile = user.extendedProfile) === null || _user$extendedProfile === void 0 ? void 0 : _user$extendedProfile.closedDate) || ((_user$extendedProfile2 = user.extendedProfile) === null || _user$extendedProfile2 === void 0 ? void 0 : _user$extendedProfile2.inactiveDate),
|
|
141
142
|
avatarUrl: user.picture,
|
|
@@ -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.19.
|
|
9
|
+
headers.append('atl-client-version', "23.19.4");
|
|
10
10
|
return headers;
|
|
11
11
|
};
|
|
12
12
|
export async function getOrgIdForCloudIdFromAGG(url, cloudId) {
|
|
@@ -74,7 +74,7 @@ export const addHeaders = headers => {
|
|
|
74
74
|
headers.append('X-ExperimentalApi', 'teams-beta');
|
|
75
75
|
headers.append('X-ExperimentalApi', 'team-members-beta');
|
|
76
76
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
77
|
-
headers.append('atl-client-version', "23.19.
|
|
77
|
+
headers.append('atl-client-version', "23.19.4");
|
|
78
78
|
return headers;
|
|
79
79
|
};
|
|
80
80
|
export async function getTeamFromAGG(url, teamId, siteId) {
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import React, { useEffect } from 'react';
|
|
2
|
-
import ButtonLegacy from '@atlaskit/button';
|
|
3
2
|
import Button from '@atlaskit/button/new';
|
|
4
3
|
import CrossCircleIcon from '@atlaskit/icon/core/cross-circle';
|
|
5
4
|
import IconError from '@atlaskit/icon/glyph/cross-circle';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
5
|
import { Text } from '@atlaskit/primitives';
|
|
8
6
|
import { ErrorTitle, ErrorWrapper } from '../../styled/Error';
|
|
9
7
|
import { profileCardRendered } from '../../util/analytics';
|
|
@@ -37,11 +35,8 @@ const ErrorMessage = props => {
|
|
|
37
35
|
label: "icon error",
|
|
38
36
|
LEGACY_fallbackIcon: IconError,
|
|
39
37
|
LEGACY_size: "xlarge"
|
|
40
|
-
}), errorContent(), reload &&
|
|
38
|
+
}), errorContent(), reload && /*#__PURE__*/React.createElement(Button, {
|
|
41
39
|
onClick: reload
|
|
42
|
-
}, "Try again")
|
|
43
|
-
appearance: "link",
|
|
44
|
-
onClick: reload
|
|
45
|
-
}, "Try again")));
|
|
40
|
+
}, "Try again"));
|
|
46
41
|
};
|
|
47
42
|
export default ErrorMessage;
|
|
@@ -3,9 +3,7 @@ import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
|
3
3
|
import { FormattedMessage, useIntl } from 'react-intl-next';
|
|
4
4
|
import Avatar from '@atlaskit/avatar';
|
|
5
5
|
import AvatarGroup from '@atlaskit/avatar-group';
|
|
6
|
-
import LoadingButton from '@atlaskit/button/loading-button';
|
|
7
6
|
import Button, { IconButton, LinkButton } from '@atlaskit/button/new';
|
|
8
|
-
import ButtonLegacy from '@atlaskit/button/standard-button';
|
|
9
7
|
import FocusRing from '@atlaskit/focus-ring';
|
|
10
8
|
import MoreIcon from '@atlaskit/icon/core/migration/show-more-horizontal--more';
|
|
11
9
|
import { LinkItem, MenuGroup } from '@atlaskit/menu';
|
|
@@ -156,16 +154,11 @@ const ActionButton = ({
|
|
|
156
154
|
const isGiveKudosActionButton = action.id === GIVE_KUDOS_ACTION_ID;
|
|
157
155
|
const actionButton = /*#__PURE__*/React.createElement(FocusRing, {
|
|
158
156
|
isInset: true
|
|
159
|
-
},
|
|
157
|
+
}, /*#__PURE__*/React.createElement(LinkButton, {
|
|
160
158
|
key: action.id || index,
|
|
161
159
|
onClick: onActionClick(action, analytics, index),
|
|
162
160
|
href: action.link || '',
|
|
163
161
|
shouldFitContainer: true
|
|
164
|
-
}, action.label, isGiveKudosActionButton && /*#__PURE__*/React.createElement(AnimationWrapper, null, /*#__PURE__*/React.createElement(KudosBlobAnimation, null))) : /*#__PURE__*/React.createElement(ButtonLegacy, {
|
|
165
|
-
key: action.id || index,
|
|
166
|
-
onClick: onActionClick(action, analytics, index),
|
|
167
|
-
href: action.link,
|
|
168
|
-
shouldFitContainer: true
|
|
169
162
|
}, action.label, isGiveKudosActionButton && /*#__PURE__*/React.createElement(AnimationWrapper, null, /*#__PURE__*/React.createElement(KudosBlobAnimation, null))));
|
|
170
163
|
if (isGiveKudosActionButton) {
|
|
171
164
|
return /*#__PURE__*/React.createElement(AnimatedKudosButton, null, actionButton);
|
|
@@ -201,23 +194,13 @@ const ExtraActions = ({
|
|
|
201
194
|
href: action.link
|
|
202
195
|
}, action.label))),
|
|
203
196
|
trigger: triggerProps => {
|
|
204
|
-
return
|
|
197
|
+
return /*#__PURE__*/React.createElement(IconButton, _extends({
|
|
205
198
|
testId: "more-actions-button"
|
|
206
199
|
}, triggerProps, {
|
|
207
200
|
isSelected: isOpen,
|
|
208
201
|
onClick: () => onMoreClick(!isOpen),
|
|
209
202
|
icon: MoreIcon,
|
|
210
203
|
label: "actions"
|
|
211
|
-
})) : /*#__PURE__*/React.createElement(ButtonLegacy, _extends({
|
|
212
|
-
testId: "more-actions-button"
|
|
213
|
-
}, triggerProps, {
|
|
214
|
-
isSelected: isOpen,
|
|
215
|
-
onClick: () => onMoreClick(!isOpen),
|
|
216
|
-
iconAfter: /*#__PURE__*/React.createElement(MoreIcon, {
|
|
217
|
-
spacing: "spacious",
|
|
218
|
-
label: "actions",
|
|
219
|
-
color: "currentColor"
|
|
220
|
-
})
|
|
221
204
|
}));
|
|
222
205
|
},
|
|
223
206
|
zIndex: layers.modal(),
|
|
@@ -319,12 +302,7 @@ const ErrorMessage = ({
|
|
|
319
302
|
}, /*#__PURE__*/React.createElement(ErrorIllustration, null), /*#__PURE__*/React.createElement(Text, {
|
|
320
303
|
as: "p",
|
|
321
304
|
weight: "semibold"
|
|
322
|
-
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.teamErrorTitle)), /*#__PURE__*/React.createElement(TeamErrorText, null, /*#__PURE__*/React.createElement(FormattedMessage, messages.teamErrorText)), clientFetchProfile && /*#__PURE__*/React.createElement(ActionButtons, null, /*#__PURE__*/React.createElement(WrappedButton, null,
|
|
323
|
-
testId: "client-fetch-profile-button",
|
|
324
|
-
shouldFitContainer: true,
|
|
325
|
-
onClick: retry,
|
|
326
|
-
isLoading: isLoading
|
|
327
|
-
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.teamErrorButton)) : /*#__PURE__*/React.createElement(LoadingButton, {
|
|
305
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.teamErrorTitle)), /*#__PURE__*/React.createElement(TeamErrorText, null, /*#__PURE__*/React.createElement(FormattedMessage, messages.teamErrorText)), clientFetchProfile && /*#__PURE__*/React.createElement(ActionButtons, null, /*#__PURE__*/React.createElement(WrappedButton, null, /*#__PURE__*/React.createElement(Button, {
|
|
328
306
|
testId: "client-fetch-profile-button",
|
|
329
307
|
shouldFitContainer: true,
|
|
330
308
|
onClick: retry,
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useCallback, useState } from 'react';
|
|
3
3
|
import { useIntl } from 'react-intl-next';
|
|
4
|
-
import Button from '@atlaskit/button/custom-theme-button';
|
|
5
4
|
import { IconButton } from '@atlaskit/button/new';
|
|
6
5
|
import DropdownMenu, { DropdownItem, DropdownItemGroup } from '@atlaskit/dropdown-menu';
|
|
7
6
|
import MoreIcon from '@atlaskit/icon/core/migration/show-more-horizontal--more';
|
|
8
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
7
|
import messages from '../../messages';
|
|
10
8
|
import { OverflowActionButtonsWrapper } from '../../styled/Card';
|
|
11
9
|
import { moreActionsClicked } from '../../util/analytics';
|
|
@@ -43,21 +41,12 @@ export const OverflowProfileCardButtons = props => {
|
|
|
43
41
|
testId,
|
|
44
42
|
...providedProps
|
|
45
43
|
}) => {
|
|
46
|
-
return
|
|
44
|
+
return /*#__PURE__*/React.createElement(IconButton, _extends({
|
|
47
45
|
type: "button"
|
|
48
46
|
}, providedProps, {
|
|
49
47
|
ref: triggerRef,
|
|
50
48
|
label: intl.formatMessage(messages.profileCardMoreIconLabel),
|
|
51
49
|
icon: MoreIcon
|
|
52
|
-
})) : /*#__PURE__*/React.createElement(Button, _extends({
|
|
53
|
-
type: "button"
|
|
54
|
-
}, providedProps, {
|
|
55
|
-
ref: triggerRef,
|
|
56
|
-
iconBefore: /*#__PURE__*/React.createElement(MoreIcon, {
|
|
57
|
-
color: "currentColor",
|
|
58
|
-
spacing: "spacious",
|
|
59
|
-
label: intl.formatMessage(messages.profileCardMoreIconLabel)
|
|
60
|
-
})
|
|
61
50
|
}));
|
|
62
51
|
}
|
|
63
52
|
}, /*#__PURE__*/React.createElement(DropdownItemGroup, null, actions.map((action, index) => /*#__PURE__*/React.createElement(DropdownItem, {
|
|
@@ -3,7 +3,6 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
|
3
3
|
import { FormattedMessage } from 'react-intl-next';
|
|
4
4
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
5
5
|
import Avatar from '@atlaskit/avatar';
|
|
6
|
-
import ButtonLegacy from '@atlaskit/button';
|
|
7
6
|
import { LinkButton } from '@atlaskit/button/new';
|
|
8
7
|
import FocusRing from '@atlaskit/focus-ring';
|
|
9
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
@@ -157,7 +156,7 @@ const Actions = ({
|
|
|
157
156
|
const button = /*#__PURE__*/React.createElement(FocusRing, {
|
|
158
157
|
isInset: true,
|
|
159
158
|
key: `profile-card-action-focus-ring_${action.id || index}`
|
|
160
|
-
},
|
|
159
|
+
}, /*#__PURE__*/React.createElement(LinkButton, {
|
|
161
160
|
appearance: "default",
|
|
162
161
|
key: action.id || index,
|
|
163
162
|
onClick: (event, ...args) => onActionClick(action, args, event, index),
|
|
@@ -165,12 +164,6 @@ const Actions = ({
|
|
|
165
164
|
autoFocus: index === 0 && isTriggeredUsingKeyboard,
|
|
166
165
|
id: `action-button-${action.id}`,
|
|
167
166
|
"aria-labelledby": fg('enable_userprofilecard_arialabelfix') ? `action-button-${action.id} profilecard-name-label` : ''
|
|
168
|
-
}, action.label, isKudos && /*#__PURE__*/React.createElement(AnimationWrapper, null, /*#__PURE__*/React.createElement(KudosBlobAnimation, null))) : /*#__PURE__*/React.createElement(ButtonLegacy, {
|
|
169
|
-
appearance: "default",
|
|
170
|
-
key: action.id || index,
|
|
171
|
-
onClick: (event, ...args) => onActionClick(action, args, event, index),
|
|
172
|
-
href: action.link,
|
|
173
|
-
autoFocus: index === 0 && isTriggeredUsingKeyboard
|
|
174
167
|
}, action.label, isKudos && /*#__PURE__*/React.createElement(AnimationWrapper, null, /*#__PURE__*/React.createElement(KudosBlobAnimation, null))));
|
|
175
168
|
if (isKudos) {
|
|
176
169
|
return /*#__PURE__*/React.createElement(AnimatedKudosButton, {
|
|
@@ -62,6 +62,13 @@ const CustomLozenges = ({
|
|
|
62
62
|
key: index
|
|
63
63
|
}), text)));
|
|
64
64
|
};
|
|
65
|
+
const ServiceAccountProfileCardDetails = props => {
|
|
66
|
+
const {
|
|
67
|
+
fullName,
|
|
68
|
+
nickname
|
|
69
|
+
} = props;
|
|
70
|
+
return /*#__PURE__*/React.createElement(DetailsGroup, null, renderName(nickname, fullName), /*#__PURE__*/React.createElement(AppTitleLabel, null, "SERVICE ACCOUNT"));
|
|
71
|
+
};
|
|
65
72
|
const BotProfileCardDetails = props => {
|
|
66
73
|
const {
|
|
67
74
|
fullName,
|
|
@@ -97,6 +104,9 @@ export const ProfileCardDetails = props => {
|
|
|
97
104
|
meta,
|
|
98
105
|
status
|
|
99
106
|
} = props;
|
|
107
|
+
if (props.isServiceAccount) {
|
|
108
|
+
return /*#__PURE__*/React.createElement(ServiceAccountProfileCardDetails, props);
|
|
109
|
+
}
|
|
100
110
|
if (props.isBot) {
|
|
101
111
|
return /*#__PURE__*/React.createElement(BotProfileCardDetails, props);
|
|
102
112
|
}
|
|
@@ -74,7 +74,8 @@ export default function ProfilecardTriggerNext({
|
|
|
74
74
|
product,
|
|
75
75
|
agentActions,
|
|
76
76
|
ariaHideProfileTrigger = false,
|
|
77
|
-
isVisible: propsIsVisible
|
|
77
|
+
isVisible: propsIsVisible,
|
|
78
|
+
ssrPlaceholderId
|
|
78
79
|
}) {
|
|
79
80
|
const {
|
|
80
81
|
createAnalyticsEvent
|
|
@@ -278,6 +279,9 @@ export default function ProfilecardTriggerNext({
|
|
|
278
279
|
isTriggeredUsingKeyboard: isTriggeredUsingKeyboard,
|
|
279
280
|
disabledAriaAttributes: disabledAriaAttributes
|
|
280
281
|
};
|
|
282
|
+
const ssrPlaceholderProp = fg('cc_mention_ssr_placeholder') ? {
|
|
283
|
+
"data-ssr-placeholder-replace": ssrPlaceholderId
|
|
284
|
+
} : {};
|
|
281
285
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Popup, {
|
|
282
286
|
isOpen: !!visible,
|
|
283
287
|
onClose: event => {
|
|
@@ -331,7 +335,7 @@ export default function ProfilecardTriggerNext({
|
|
|
331
335
|
'aria-label': ariaHideProfileTrigger ? undefined : getLabelMessage(ariaLabel, profilecardProps.fullName, formatMessage)
|
|
332
336
|
}, ariaHideProfileTrigger && {
|
|
333
337
|
'aria-hidden': 'true'
|
|
334
|
-
}), children);
|
|
338
|
+
}, ssrPlaceholderProp), children);
|
|
335
339
|
},
|
|
336
340
|
zIndex: layers.modal(),
|
|
337
341
|
shouldUseCaptureOnOutsideClick: true,
|
|
@@ -5,7 +5,6 @@ import React from 'react';
|
|
|
5
5
|
import { FormattedMessage, useIntl } from 'react-intl-next';
|
|
6
6
|
import Avatar from '@atlaskit/avatar';
|
|
7
7
|
import AvatarGroup from '@atlaskit/avatar-group';
|
|
8
|
-
import ButtonLegacy from '@atlaskit/button';
|
|
9
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
9
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
11
10
|
import { Pressable } from '@atlaskit/primitives/compiled';
|
|
@@ -29,7 +28,7 @@ const styles = {
|
|
|
29
28
|
};
|
|
30
29
|
const avatarGroupMaxCount = 5;
|
|
31
30
|
const ReportingLinesDetails = props => {
|
|
32
|
-
var _manager$pii, _manager$pii2
|
|
31
|
+
var _manager$pii, _manager$pii2;
|
|
33
32
|
const {
|
|
34
33
|
formatMessage
|
|
35
34
|
} = useIntl();
|
|
@@ -71,23 +70,14 @@ const ReportingLinesDetails = props => {
|
|
|
71
70
|
} : undefined;
|
|
72
71
|
return /*#__PURE__*/React.createElement(React.Fragment, null, manager && /*#__PURE__*/React.createElement(ReportingLinesSection, null, /*#__PURE__*/React.createElement(Box, {
|
|
73
72
|
xcss: [reportingLinesHeadingDefaultStyles, reportingLinesHeadingStyles]
|
|
74
|
-
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.managerSectionHeading)), /*#__PURE__*/React.createElement(OffsetWrapper, null,
|
|
73
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.managerSectionHeading)), /*#__PURE__*/React.createElement(OffsetWrapper, null, /*#__PURE__*/React.createElement(Pressable, {
|
|
75
74
|
onClick: () => onReportingLinksClick(manager, 'manager', getProfileHref(manager.accountIdentifier, reportingLinesProfileUrl)),
|
|
76
75
|
isDisabled: !onReportingLinesClick,
|
|
77
76
|
xcss: styles.reportingLinesButton
|
|
78
77
|
}, /*#__PURE__*/React.createElement(ManagerSection, null, /*#__PURE__*/React.createElement(Avatar, {
|
|
79
78
|
size: "xsmall",
|
|
80
79
|
src: (_manager$pii = manager.pii) === null || _manager$pii === void 0 ? void 0 : _manager$pii.picture
|
|
81
|
-
}), /*#__PURE__*/React.createElement(ManagerName, null, (_manager$pii2 = manager.pii) === null || _manager$pii2 === void 0 ? void 0 : _manager$pii2.name)))
|
|
82
|
-
appearance: "subtle",
|
|
83
|
-
spacing: "none",
|
|
84
|
-
href: getProfileHref(manager.accountIdentifier, reportingLinesProfileUrl),
|
|
85
|
-
onClick: getReportingLinesOnClick(manager, 'manager'),
|
|
86
|
-
isDisabled: !onReportingLinesClick
|
|
87
|
-
}, /*#__PURE__*/React.createElement(ManagerSection, null, /*#__PURE__*/React.createElement(Avatar, {
|
|
88
|
-
size: "xsmall",
|
|
89
|
-
src: (_manager$pii3 = manager.pii) === null || _manager$pii3 === void 0 ? void 0 : _manager$pii3.picture
|
|
90
|
-
}), /*#__PURE__*/React.createElement(ManagerName, null, (_manager$pii4 = manager.pii) === null || _manager$pii4 === void 0 ? void 0 : _manager$pii4.name))))), hasReports && /*#__PURE__*/React.createElement(ReportingLinesSection, null, /*#__PURE__*/React.createElement(Box, {
|
|
80
|
+
}), /*#__PURE__*/React.createElement(ManagerName, null, (_manager$pii2 = manager.pii) === null || _manager$pii2 === void 0 ? void 0 : _manager$pii2.name))))), hasReports && /*#__PURE__*/React.createElement(ReportingLinesSection, null, /*#__PURE__*/React.createElement(Box, {
|
|
91
81
|
xcss: reportingLinesHeadingDefaultStyles
|
|
92
82
|
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.directReportsSectionHeading)), /*#__PURE__*/React.createElement(AvatarGroup, {
|
|
93
83
|
appearance: "stack",
|
|
@@ -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.19.
|
|
35
|
+
packageVersion: "23.19.4",
|
|
36
36
|
...attributes,
|
|
37
37
|
firedAt: Math.round(getPageTime())
|
|
38
38
|
}
|
|
@@ -122,6 +122,7 @@ var UserProfileCardClient = /*#__PURE__*/function (_CachingClient) {
|
|
|
122
122
|
return _context2.abrupt("return", _objectSpread(_objectSpread({}, user), {}, {
|
|
123
123
|
isBot: user.__typename === 'AppUser',
|
|
124
124
|
isAgent: user.appType === 'agent',
|
|
125
|
+
isServiceAccount: user.__typename === 'AppUser' && user.appType === 'service',
|
|
125
126
|
status: user.accountStatus,
|
|
126
127
|
statusModifiedDate: ((_user$extendedProfile = user.extendedProfile) === null || _user$extendedProfile === void 0 ? void 0 : _user$extendedProfile.closedDate) || ((_user$extendedProfile2 = user.extendedProfile) === null || _user$extendedProfile2 === void 0 ? void 0 : _user$extendedProfile2.inactiveDate),
|
|
127
128
|
avatarUrl: user.picture,
|
|
@@ -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.19.
|
|
7
|
+
headers.append('atl-client-version', "23.19.4");
|
|
8
8
|
return headers;
|
|
9
9
|
};
|
|
10
10
|
export function getOrgIdForCloudIdFromAGG(_x, _x2) {
|
|
@@ -56,7 +56,7 @@ export var addHeaders = function addHeaders(headers) {
|
|
|
56
56
|
headers.append('X-ExperimentalApi', 'teams-beta');
|
|
57
57
|
headers.append('X-ExperimentalApi', 'team-members-beta');
|
|
58
58
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
59
|
-
headers.append('atl-client-version', "23.19.
|
|
59
|
+
headers.append('atl-client-version', "23.19.4");
|
|
60
60
|
return headers;
|
|
61
61
|
};
|
|
62
62
|
export function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import React, { useEffect } from 'react';
|
|
2
|
-
import ButtonLegacy from '@atlaskit/button';
|
|
3
2
|
import Button from '@atlaskit/button/new';
|
|
4
3
|
import CrossCircleIcon from '@atlaskit/icon/core/cross-circle';
|
|
5
4
|
import IconError from '@atlaskit/icon/glyph/cross-circle';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
5
|
import { Text } from '@atlaskit/primitives';
|
|
8
6
|
import { ErrorTitle, ErrorWrapper } from '../../styled/Error';
|
|
9
7
|
import { profileCardRendered } from '../../util/analytics';
|
|
@@ -35,11 +33,8 @@ var ErrorMessage = function ErrorMessage(props) {
|
|
|
35
33
|
label: "icon error",
|
|
36
34
|
LEGACY_fallbackIcon: IconError,
|
|
37
35
|
LEGACY_size: "xlarge"
|
|
38
|
-
}), errorContent(), reload &&
|
|
36
|
+
}), errorContent(), reload && /*#__PURE__*/React.createElement(Button, {
|
|
39
37
|
onClick: reload
|
|
40
|
-
}, "Try again")
|
|
41
|
-
appearance: "link",
|
|
42
|
-
onClick: reload
|
|
43
|
-
}, "Try again")));
|
|
38
|
+
}, "Try again"));
|
|
44
39
|
};
|
|
45
40
|
export default ErrorMessage;
|
|
@@ -8,9 +8,7 @@ import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
|
8
8
|
import { FormattedMessage, useIntl } from 'react-intl-next';
|
|
9
9
|
import Avatar from '@atlaskit/avatar';
|
|
10
10
|
import AvatarGroup from '@atlaskit/avatar-group';
|
|
11
|
-
import LoadingButton from '@atlaskit/button/loading-button';
|
|
12
11
|
import Button, { IconButton, LinkButton } from '@atlaskit/button/new';
|
|
13
|
-
import ButtonLegacy from '@atlaskit/button/standard-button';
|
|
14
12
|
import FocusRing from '@atlaskit/focus-ring';
|
|
15
13
|
import MoreIcon from '@atlaskit/icon/core/migration/show-more-horizontal--more';
|
|
16
14
|
import { LinkItem, MenuGroup } from '@atlaskit/menu';
|
|
@@ -166,16 +164,11 @@ var ActionButton = function ActionButton(_ref2) {
|
|
|
166
164
|
var isGiveKudosActionButton = action.id === GIVE_KUDOS_ACTION_ID;
|
|
167
165
|
var actionButton = /*#__PURE__*/React.createElement(FocusRing, {
|
|
168
166
|
isInset: true
|
|
169
|
-
},
|
|
167
|
+
}, /*#__PURE__*/React.createElement(LinkButton, {
|
|
170
168
|
key: action.id || index,
|
|
171
169
|
onClick: onActionClick(action, analytics, index),
|
|
172
170
|
href: action.link || '',
|
|
173
171
|
shouldFitContainer: true
|
|
174
|
-
}, action.label, isGiveKudosActionButton && /*#__PURE__*/React.createElement(AnimationWrapper, null, /*#__PURE__*/React.createElement(KudosBlobAnimation, null))) : /*#__PURE__*/React.createElement(ButtonLegacy, {
|
|
175
|
-
key: action.id || index,
|
|
176
|
-
onClick: onActionClick(action, analytics, index),
|
|
177
|
-
href: action.link,
|
|
178
|
-
shouldFitContainer: true
|
|
179
172
|
}, action.label, isGiveKudosActionButton && /*#__PURE__*/React.createElement(AnimationWrapper, null, /*#__PURE__*/React.createElement(KudosBlobAnimation, null))));
|
|
180
173
|
if (isGiveKudosActionButton) {
|
|
181
174
|
return /*#__PURE__*/React.createElement(AnimatedKudosButton, null, actionButton);
|
|
@@ -221,7 +214,7 @@ var ExtraActions = function ExtraActions(_ref3) {
|
|
|
221
214
|
}));
|
|
222
215
|
},
|
|
223
216
|
trigger: function trigger(triggerProps) {
|
|
224
|
-
return
|
|
217
|
+
return /*#__PURE__*/React.createElement(IconButton, _extends({
|
|
225
218
|
testId: "more-actions-button"
|
|
226
219
|
}, triggerProps, {
|
|
227
220
|
isSelected: isOpen,
|
|
@@ -230,18 +223,6 @@ var ExtraActions = function ExtraActions(_ref3) {
|
|
|
230
223
|
},
|
|
231
224
|
icon: MoreIcon,
|
|
232
225
|
label: "actions"
|
|
233
|
-
})) : /*#__PURE__*/React.createElement(ButtonLegacy, _extends({
|
|
234
|
-
testId: "more-actions-button"
|
|
235
|
-
}, triggerProps, {
|
|
236
|
-
isSelected: isOpen,
|
|
237
|
-
onClick: function onClick() {
|
|
238
|
-
return onMoreClick(!isOpen);
|
|
239
|
-
},
|
|
240
|
-
iconAfter: /*#__PURE__*/React.createElement(MoreIcon, {
|
|
241
|
-
spacing: "spacious",
|
|
242
|
-
label: "actions",
|
|
243
|
-
color: "currentColor"
|
|
244
|
-
})
|
|
245
226
|
}));
|
|
246
227
|
},
|
|
247
228
|
zIndex: layers.modal(),
|
|
@@ -348,12 +329,7 @@ var ErrorMessage = function ErrorMessage(_ref6) {
|
|
|
348
329
|
}, /*#__PURE__*/React.createElement(ErrorIllustration, null), /*#__PURE__*/React.createElement(Text, {
|
|
349
330
|
as: "p",
|
|
350
331
|
weight: "semibold"
|
|
351
|
-
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.teamErrorTitle)), /*#__PURE__*/React.createElement(TeamErrorText, null, /*#__PURE__*/React.createElement(FormattedMessage, messages.teamErrorText)), clientFetchProfile && /*#__PURE__*/React.createElement(ActionButtons, null, /*#__PURE__*/React.createElement(WrappedButton, null,
|
|
352
|
-
testId: "client-fetch-profile-button",
|
|
353
|
-
shouldFitContainer: true,
|
|
354
|
-
onClick: retry,
|
|
355
|
-
isLoading: isLoading
|
|
356
|
-
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.teamErrorButton)) : /*#__PURE__*/React.createElement(LoadingButton, {
|
|
332
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.teamErrorTitle)), /*#__PURE__*/React.createElement(TeamErrorText, null, /*#__PURE__*/React.createElement(FormattedMessage, messages.teamErrorText)), clientFetchProfile && /*#__PURE__*/React.createElement(ActionButtons, null, /*#__PURE__*/React.createElement(WrappedButton, null, /*#__PURE__*/React.createElement(Button, {
|
|
357
333
|
testId: "client-fetch-profile-button",
|
|
358
334
|
shouldFitContainer: true,
|
|
359
335
|
onClick: retry,
|
|
@@ -4,11 +4,9 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
4
4
|
var _excluded = ["triggerRef", "isSelected", "testId"];
|
|
5
5
|
import React, { useCallback, useState } from 'react';
|
|
6
6
|
import { useIntl } from 'react-intl-next';
|
|
7
|
-
import Button from '@atlaskit/button/custom-theme-button';
|
|
8
7
|
import { IconButton } from '@atlaskit/button/new';
|
|
9
8
|
import DropdownMenu, { DropdownItem, DropdownItemGroup } from '@atlaskit/dropdown-menu';
|
|
10
9
|
import MoreIcon from '@atlaskit/icon/core/migration/show-more-horizontal--more';
|
|
11
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
10
|
import messages from '../../messages';
|
|
13
11
|
import { OverflowActionButtonsWrapper } from '../../styled/Card';
|
|
14
12
|
import { moreActionsClicked } from '../../util/analytics';
|
|
@@ -46,21 +44,12 @@ export var OverflowProfileCardButtons = function OverflowProfileCardButtons(prop
|
|
|
46
44
|
isSelected = _ref2.isSelected,
|
|
47
45
|
testId = _ref2.testId,
|
|
48
46
|
providedProps = _objectWithoutProperties(_ref2, _excluded);
|
|
49
|
-
return
|
|
47
|
+
return /*#__PURE__*/React.createElement(IconButton, _extends({
|
|
50
48
|
type: "button"
|
|
51
49
|
}, providedProps, {
|
|
52
50
|
ref: triggerRef,
|
|
53
51
|
label: intl.formatMessage(messages.profileCardMoreIconLabel),
|
|
54
52
|
icon: MoreIcon
|
|
55
|
-
})) : /*#__PURE__*/React.createElement(Button, _extends({
|
|
56
|
-
type: "button"
|
|
57
|
-
}, providedProps, {
|
|
58
|
-
ref: triggerRef,
|
|
59
|
-
iconBefore: /*#__PURE__*/React.createElement(MoreIcon, {
|
|
60
|
-
color: "currentColor",
|
|
61
|
-
spacing: "spacious",
|
|
62
|
-
label: intl.formatMessage(messages.profileCardMoreIconLabel)
|
|
63
|
-
})
|
|
64
53
|
}));
|
|
65
54
|
}
|
|
66
55
|
}, /*#__PURE__*/React.createElement(DropdownItemGroup, null, actions.map(function (action, index) {
|
|
@@ -5,7 +5,6 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
|
5
5
|
import { FormattedMessage } from 'react-intl-next';
|
|
6
6
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
7
7
|
import Avatar from '@atlaskit/avatar';
|
|
8
|
-
import ButtonLegacy from '@atlaskit/button';
|
|
9
8
|
import { LinkButton } from '@atlaskit/button/new';
|
|
10
9
|
import FocusRing from '@atlaskit/focus-ring';
|
|
11
10
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
@@ -161,7 +160,7 @@ var Actions = function Actions(_ref) {
|
|
|
161
160
|
var button = /*#__PURE__*/React.createElement(FocusRing, {
|
|
162
161
|
isInset: true,
|
|
163
162
|
key: "profile-card-action-focus-ring_".concat(action.id || index)
|
|
164
|
-
},
|
|
163
|
+
}, /*#__PURE__*/React.createElement(LinkButton, {
|
|
165
164
|
appearance: "default",
|
|
166
165
|
key: action.id || index,
|
|
167
166
|
onClick: function onClick(event) {
|
|
@@ -174,17 +173,6 @@ var Actions = function Actions(_ref) {
|
|
|
174
173
|
autoFocus: index === 0 && isTriggeredUsingKeyboard,
|
|
175
174
|
id: "action-button-".concat(action.id),
|
|
176
175
|
"aria-labelledby": fg('enable_userprofilecard_arialabelfix') ? "action-button-".concat(action.id, " profilecard-name-label") : ''
|
|
177
|
-
}, action.label, isKudos && /*#__PURE__*/React.createElement(AnimationWrapper, null, /*#__PURE__*/React.createElement(KudosBlobAnimation, null))) : /*#__PURE__*/React.createElement(ButtonLegacy, {
|
|
178
|
-
appearance: "default",
|
|
179
|
-
key: action.id || index,
|
|
180
|
-
onClick: function onClick(event) {
|
|
181
|
-
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
182
|
-
args[_key2 - 1] = arguments[_key2];
|
|
183
|
-
}
|
|
184
|
-
return onActionClick(action, args, event, index);
|
|
185
|
-
},
|
|
186
|
-
href: action.link,
|
|
187
|
-
autoFocus: index === 0 && isTriggeredUsingKeyboard
|
|
188
176
|
}, action.label, isKudos && /*#__PURE__*/React.createElement(AnimationWrapper, null, /*#__PURE__*/React.createElement(KudosBlobAnimation, null))));
|
|
189
177
|
if (isKudos) {
|
|
190
178
|
return /*#__PURE__*/React.createElement(AnimatedKudosButton, {
|
|
@@ -66,6 +66,11 @@ var CustomLozenges = function CustomLozenges(_ref) {
|
|
|
66
66
|
}), text);
|
|
67
67
|
}));
|
|
68
68
|
};
|
|
69
|
+
var ServiceAccountProfileCardDetails = function ServiceAccountProfileCardDetails(props) {
|
|
70
|
+
var fullName = props.fullName,
|
|
71
|
+
nickname = props.nickname;
|
|
72
|
+
return /*#__PURE__*/React.createElement(DetailsGroup, null, renderName(nickname, fullName), /*#__PURE__*/React.createElement(AppTitleLabel, null, "SERVICE ACCOUNT"));
|
|
73
|
+
};
|
|
69
74
|
var BotProfileCardDetails = function BotProfileCardDetails(props) {
|
|
70
75
|
var fullName = props.fullName,
|
|
71
76
|
nickname = props.nickname;
|
|
@@ -96,6 +101,9 @@ var DisabledProfileCardDetails = function DisabledProfileCardDetails(props) {
|
|
|
96
101
|
export var ProfileCardDetails = function ProfileCardDetails(props) {
|
|
97
102
|
var meta = props.meta,
|
|
98
103
|
status = props.status;
|
|
104
|
+
if (props.isServiceAccount) {
|
|
105
|
+
return /*#__PURE__*/React.createElement(ServiceAccountProfileCardDetails, props);
|
|
106
|
+
}
|
|
99
107
|
if (props.isBot) {
|
|
100
108
|
return /*#__PURE__*/React.createElement(BotProfileCardDetails, props);
|
|
101
109
|
}
|
|
@@ -87,7 +87,8 @@ export default function ProfilecardTriggerNext(_ref2) {
|
|
|
87
87
|
agentActions = _ref2.agentActions,
|
|
88
88
|
_ref2$ariaHideProfile = _ref2.ariaHideProfileTrigger,
|
|
89
89
|
ariaHideProfileTrigger = _ref2$ariaHideProfile === void 0 ? false : _ref2$ariaHideProfile,
|
|
90
|
-
propsIsVisible = _ref2.isVisible
|
|
90
|
+
propsIsVisible = _ref2.isVisible,
|
|
91
|
+
ssrPlaceholderId = _ref2.ssrPlaceholderId;
|
|
91
92
|
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
92
93
|
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
93
94
|
var _useIntl = useIntl(),
|
|
@@ -339,6 +340,9 @@ export default function ProfilecardTriggerNext(_ref2) {
|
|
|
339
340
|
isTriggeredUsingKeyboard: isTriggeredUsingKeyboard,
|
|
340
341
|
disabledAriaAttributes: disabledAriaAttributes
|
|
341
342
|
});
|
|
343
|
+
var ssrPlaceholderProp = fg('cc_mention_ssr_placeholder') ? {
|
|
344
|
+
"data-ssr-placeholder-replace": ssrPlaceholderId
|
|
345
|
+
} : {};
|
|
342
346
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Popup, {
|
|
343
347
|
isOpen: !!visible,
|
|
344
348
|
onClose: function onClose(event) {
|
|
@@ -390,7 +394,7 @@ export default function ProfilecardTriggerNext(_ref2) {
|
|
|
390
394
|
'aria-label': ariaHideProfileTrigger ? undefined : getLabelMessage(ariaLabel, profilecardProps.fullName, formatMessage)
|
|
391
395
|
}, ariaHideProfileTrigger && {
|
|
392
396
|
'aria-hidden': 'true'
|
|
393
|
-
}), children);
|
|
397
|
+
}, ssrPlaceholderProp), children);
|
|
394
398
|
},
|
|
395
399
|
zIndex: layers.modal(),
|
|
396
400
|
shouldUseCaptureOnOutsideClick: true,
|
|
@@ -5,7 +5,6 @@ import React from 'react';
|
|
|
5
5
|
import { FormattedMessage, useIntl } from 'react-intl-next';
|
|
6
6
|
import Avatar from '@atlaskit/avatar';
|
|
7
7
|
import AvatarGroup from '@atlaskit/avatar-group';
|
|
8
|
-
import ButtonLegacy from '@atlaskit/button';
|
|
9
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
9
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
11
10
|
import { Pressable } from '@atlaskit/primitives/compiled';
|
|
@@ -29,7 +28,7 @@ var styles = {
|
|
|
29
28
|
};
|
|
30
29
|
var avatarGroupMaxCount = 5;
|
|
31
30
|
var ReportingLinesDetails = function ReportingLinesDetails(props) {
|
|
32
|
-
var _manager$pii, _manager$pii2
|
|
31
|
+
var _manager$pii, _manager$pii2;
|
|
33
32
|
var _useIntl = useIntl(),
|
|
34
33
|
formatMessage = _useIntl.formatMessage;
|
|
35
34
|
var fireAnalyticsWithDuration = props.fireAnalyticsWithDuration,
|
|
@@ -75,7 +74,7 @@ var ReportingLinesDetails = function ReportingLinesDetails(props) {
|
|
|
75
74
|
} : undefined;
|
|
76
75
|
return /*#__PURE__*/React.createElement(React.Fragment, null, manager && /*#__PURE__*/React.createElement(ReportingLinesSection, null, /*#__PURE__*/React.createElement(Box, {
|
|
77
76
|
xcss: [reportingLinesHeadingDefaultStyles, reportingLinesHeadingStyles]
|
|
78
|
-
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.managerSectionHeading)), /*#__PURE__*/React.createElement(OffsetWrapper, null,
|
|
77
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.managerSectionHeading)), /*#__PURE__*/React.createElement(OffsetWrapper, null, /*#__PURE__*/React.createElement(Pressable, {
|
|
79
78
|
onClick: function onClick() {
|
|
80
79
|
return onReportingLinksClick(manager, 'manager', getProfileHref(manager.accountIdentifier, reportingLinesProfileUrl));
|
|
81
80
|
},
|
|
@@ -84,16 +83,7 @@ var ReportingLinesDetails = function ReportingLinesDetails(props) {
|
|
|
84
83
|
}, /*#__PURE__*/React.createElement(ManagerSection, null, /*#__PURE__*/React.createElement(Avatar, {
|
|
85
84
|
size: "xsmall",
|
|
86
85
|
src: (_manager$pii = manager.pii) === null || _manager$pii === void 0 ? void 0 : _manager$pii.picture
|
|
87
|
-
}), /*#__PURE__*/React.createElement(ManagerName, null, (_manager$pii2 = manager.pii) === null || _manager$pii2 === void 0 ? void 0 : _manager$pii2.name)))
|
|
88
|
-
appearance: "subtle",
|
|
89
|
-
spacing: "none",
|
|
90
|
-
href: getProfileHref(manager.accountIdentifier, reportingLinesProfileUrl),
|
|
91
|
-
onClick: getReportingLinesOnClick(manager, 'manager'),
|
|
92
|
-
isDisabled: !onReportingLinesClick
|
|
93
|
-
}, /*#__PURE__*/React.createElement(ManagerSection, null, /*#__PURE__*/React.createElement(Avatar, {
|
|
94
|
-
size: "xsmall",
|
|
95
|
-
src: (_manager$pii3 = manager.pii) === null || _manager$pii3 === void 0 ? void 0 : _manager$pii3.picture
|
|
96
|
-
}), /*#__PURE__*/React.createElement(ManagerName, null, (_manager$pii4 = manager.pii) === null || _manager$pii4 === void 0 ? void 0 : _manager$pii4.name))))), hasReports && /*#__PURE__*/React.createElement(ReportingLinesSection, null, /*#__PURE__*/React.createElement(Box, {
|
|
86
|
+
}), /*#__PURE__*/React.createElement(ManagerName, null, (_manager$pii2 = manager.pii) === null || _manager$pii2 === void 0 ? void 0 : _manager$pii2.name))))), hasReports && /*#__PURE__*/React.createElement(ReportingLinesSection, null, /*#__PURE__*/React.createElement(Box, {
|
|
97
87
|
xcss: reportingLinesHeadingDefaultStyles
|
|
98
88
|
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.directReportsSectionHeading)), /*#__PURE__*/React.createElement(AvatarGroup, {
|
|
99
89
|
appearance: "stack",
|
|
@@ -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.19.
|
|
42
|
+
packageVersion: "23.19.4"
|
|
43
43
|
}, attributes), {}, {
|
|
44
44
|
firedAt: Math.round(getPageTime())
|
|
45
45
|
})
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type ProfileCardTriggerProps } from '../../types';
|
|
3
|
-
export default function ProfilecardTriggerNext({ autoFocus, trigger, userId, cloudId, resourceClient, actions, position, children, testId, addFlag, onReportingLinesClick, ariaLabel, ariaLabelledBy, prepopulatedData, disabledAriaAttributes, onVisibilityChange, offset, viewingUserId, product, agentActions, ariaHideProfileTrigger, isVisible: propsIsVisible, }: ProfileCardTriggerProps): React.JSX.Element;
|
|
3
|
+
export default function ProfilecardTriggerNext({ autoFocus, trigger, userId, cloudId, resourceClient, actions, position, children, testId, addFlag, onReportingLinesClick, ariaLabel, ariaLabelledBy, prepopulatedData, disabledAriaAttributes, onVisibilityChange, offset, viewingUserId, product, agentActions, ariaHideProfileTrigger, isVisible: propsIsVisible, ssrPlaceholderId, }: ProfileCardTriggerProps): React.JSX.Element;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -109,6 +109,7 @@ export interface ProfileCardClientData {
|
|
|
109
109
|
customLozenges?: LozengeProps[];
|
|
110
110
|
accountType?: string;
|
|
111
111
|
isAgent?: boolean;
|
|
112
|
+
isServiceAccount?: boolean;
|
|
112
113
|
}
|
|
113
114
|
export interface ReportingLinesUserPII {
|
|
114
115
|
name: string;
|
|
@@ -181,6 +182,7 @@ export interface ProfileCardTriggerProps {
|
|
|
181
182
|
viewingUserId?: string;
|
|
182
183
|
agentActions?: AgentActionsType;
|
|
183
184
|
ariaHideProfileTrigger?: boolean;
|
|
185
|
+
ssrPlaceholderId?: string;
|
|
184
186
|
}
|
|
185
187
|
export interface ProfileCardTriggerState {
|
|
186
188
|
visible?: boolean;
|
|
@@ -384,6 +386,7 @@ export interface ProfilecardProps {
|
|
|
384
386
|
accountType?: string;
|
|
385
387
|
status?: StatusType;
|
|
386
388
|
isBot?: boolean;
|
|
389
|
+
isServiceAccount?: boolean;
|
|
387
390
|
avatarUrl?: string;
|
|
388
391
|
fullName?: string;
|
|
389
392
|
meta?: string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type ProfileCardTriggerProps } from '../../types';
|
|
3
|
-
export default function ProfilecardTriggerNext({ autoFocus, trigger, userId, cloudId, resourceClient, actions, position, children, testId, addFlag, onReportingLinesClick, ariaLabel, ariaLabelledBy, prepopulatedData, disabledAriaAttributes, onVisibilityChange, offset, viewingUserId, product, agentActions, ariaHideProfileTrigger, isVisible: propsIsVisible, }: ProfileCardTriggerProps): React.JSX.Element;
|
|
3
|
+
export default function ProfilecardTriggerNext({ autoFocus, trigger, userId, cloudId, resourceClient, actions, position, children, testId, addFlag, onReportingLinesClick, ariaLabel, ariaLabelledBy, prepopulatedData, disabledAriaAttributes, onVisibilityChange, offset, viewingUserId, product, agentActions, ariaHideProfileTrigger, isVisible: propsIsVisible, ssrPlaceholderId, }: ProfileCardTriggerProps): React.JSX.Element;
|
|
@@ -109,6 +109,7 @@ export interface ProfileCardClientData {
|
|
|
109
109
|
customLozenges?: LozengeProps[];
|
|
110
110
|
accountType?: string;
|
|
111
111
|
isAgent?: boolean;
|
|
112
|
+
isServiceAccount?: boolean;
|
|
112
113
|
}
|
|
113
114
|
export interface ReportingLinesUserPII {
|
|
114
115
|
name: string;
|
|
@@ -184,6 +185,7 @@ export interface ProfileCardTriggerProps {
|
|
|
184
185
|
viewingUserId?: string;
|
|
185
186
|
agentActions?: AgentActionsType;
|
|
186
187
|
ariaHideProfileTrigger?: boolean;
|
|
188
|
+
ssrPlaceholderId?: string;
|
|
187
189
|
}
|
|
188
190
|
export interface ProfileCardTriggerState {
|
|
189
191
|
visible?: boolean;
|
|
@@ -390,6 +392,7 @@ export interface ProfilecardProps {
|
|
|
390
392
|
accountType?: string;
|
|
391
393
|
status?: StatusType;
|
|
392
394
|
isBot?: boolean;
|
|
395
|
+
isServiceAccount?: boolean;
|
|
393
396
|
avatarUrl?: string;
|
|
394
397
|
fullName?: string;
|
|
395
398
|
meta?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/profilecard",
|
|
3
|
-
"version": "23.
|
|
3
|
+
"version": "23.20.0",
|
|
4
4
|
"description": "A React component to display a card with user information.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"@atlaskit/popup": "^4.3.0",
|
|
75
75
|
"@atlaskit/primitives": "^14.9.0",
|
|
76
76
|
"@atlaskit/rovo-agent-components": "^2.11.0",
|
|
77
|
-
"@atlaskit/rovo-triggers": "^
|
|
77
|
+
"@atlaskit/rovo-triggers": "^3.0.0",
|
|
78
78
|
"@atlaskit/spinner": "^18.0.0",
|
|
79
79
|
"@atlaskit/teams-avatar": "^2.3.0",
|
|
80
80
|
"@atlaskit/teams-public": "^0.39.0",
|
|
@@ -148,9 +148,6 @@
|
|
|
148
148
|
"platform_profilecard-enable_reporting_lines_label": {
|
|
149
149
|
"type": "boolean"
|
|
150
150
|
},
|
|
151
|
-
"ptc_migrate_buttons": {
|
|
152
|
-
"type": "boolean"
|
|
153
|
-
},
|
|
154
151
|
"enable_team_profilecard_toggletip_a11y_fix": {
|
|
155
152
|
"type": "boolean"
|
|
156
153
|
},
|
|
@@ -175,6 +172,9 @@
|
|
|
175
172
|
"should-render-to-parent-should-be-true-people-and-": {
|
|
176
173
|
"type": "boolean"
|
|
177
174
|
},
|
|
175
|
+
"cc_mention_ssr_placeholder": {
|
|
176
|
+
"type": "boolean"
|
|
177
|
+
},
|
|
178
178
|
"loom_tab_in_container_linker_team_profile_page": {
|
|
179
179
|
"type": "boolean"
|
|
180
180
|
},
|