@atlaskit/profilecard 16.8.0 → 16.10.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 +22 -0
- package/dist/cjs/components/Team/TeamProfileCard.js +15 -3
- package/dist/cjs/components/Team/TeamProfileCardTrigger.js +77 -12
- package/dist/cjs/components/User/ProfileCardResourced.js +0 -1
- package/dist/cjs/components/User/ProfileCardTrigger.js +0 -1
- package/dist/cjs/i18n/en.js +1 -0
- package/dist/cjs/i18n/en_GB.js +1 -0
- package/dist/cjs/i18n/en_ZZ.js +1 -0
- package/dist/cjs/styled/Card.js +1 -1
- package/dist/cjs/util/analytics.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/Team/TeamProfileCard.js +13 -3
- package/dist/es2019/components/Team/TeamProfileCardTrigger.js +68 -9
- package/dist/es2019/components/User/ProfileCardResourced.js +0 -1
- package/dist/es2019/components/User/ProfileCardTrigger.js +0 -1
- package/dist/es2019/i18n/en.js +1 -0
- package/dist/es2019/i18n/en_GB.js +1 -0
- package/dist/es2019/i18n/en_ZZ.js +1 -0
- package/dist/es2019/styled/Card.js +1 -0
- package/dist/es2019/util/analytics.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/client/TeamCentralCardClient.js +1 -1
- package/dist/esm/client/UserProfileCardClient.js +1 -1
- package/dist/esm/client/getTeamFromAGG.js +1 -1
- package/dist/esm/components/Team/TeamProfileCard.js +13 -3
- package/dist/esm/components/Team/TeamProfileCardTrigger.js +77 -12
- package/dist/esm/components/User/ProfileCardResourced.js +0 -1
- package/dist/esm/components/User/ProfileCardTrigger.js +0 -1
- package/dist/esm/i18n/en.js +1 -0
- package/dist/esm/i18n/en_GB.js +1 -0
- package/dist/esm/i18n/en_ZZ.js +1 -0
- package/dist/esm/styled/Card.js +1 -1
- package/dist/esm/util/analytics.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/components/Team/TeamProfileCardTrigger.d.ts +5 -1
- package/dist/types/i18n/en.d.ts +1 -0
- package/dist/types/i18n/en_GB.d.ts +1 -0
- package/dist/types/i18n/en_ZZ.d.ts +1 -0
- package/dist/types/types.d.ts +11 -0
- package/package.json +2 -2
- package/report.api.md +614 -0
|
@@ -18,6 +18,7 @@ import { LinkItem, MenuGroup } from '@atlaskit/menu';
|
|
|
18
18
|
import Popup from '@atlaskit/popup';
|
|
19
19
|
import { layers } from '@atlaskit/theme/constants';
|
|
20
20
|
import messages from '../../messages';
|
|
21
|
+
import { AnimatedKudosButton, KudosBlobAnimation } from '../../styled/Card';
|
|
21
22
|
import { ErrorWrapper, TeamErrorText, TeamErrorTitle } from '../../styled/Error';
|
|
22
23
|
import { ActionButtons, AvatarSection, CardContent, CardHeader, CardWrapper, Description, DescriptionWrapper, MemberCount, MoreButton, TeamName, WrappedButton } from '../../styled/TeamCard';
|
|
23
24
|
import { errorRetryClicked, moreActionsClicked, moreMembersClicked, teamActionClicked, teamAvatarClicked, teamProfileCardRendered } from '../../util/analytics';
|
|
@@ -25,6 +26,7 @@ import { isBasicClick } from '../../util/click';
|
|
|
25
26
|
import { ErrorIllustration } from '../Error';
|
|
26
27
|
import TeamLoadingState from './TeamLoadingState';
|
|
27
28
|
var LARGE_MEMBER_COUNT = 50;
|
|
29
|
+
var GIVE_KUDOS_ACTION_ID = 'give-kudos';
|
|
28
30
|
|
|
29
31
|
function onMemberClick(callback, userId, analytics, index, hasHref) {
|
|
30
32
|
return function (event) {
|
|
@@ -121,11 +123,19 @@ var ActionButton = function ActionButton(_ref2) {
|
|
|
121
123
|
var action = _ref2.action,
|
|
122
124
|
analytics = _ref2.analytics,
|
|
123
125
|
index = _ref2.index;
|
|
124
|
-
|
|
125
|
-
|
|
126
|
+
var isGiveKudosActionButton = action.id === GIVE_KUDOS_ACTION_ID;
|
|
127
|
+
var actionButton = /*#__PURE__*/React.createElement(Button, {
|
|
128
|
+
key: action.id || index,
|
|
126
129
|
onClick: onActionClick(action, analytics, index),
|
|
130
|
+
href: action.link,
|
|
127
131
|
shouldFitContainer: true
|
|
128
|
-
}, action.label));
|
|
132
|
+
}, action.label, isGiveKudosActionButton && /*#__PURE__*/React.createElement(KudosBlobAnimation, null));
|
|
133
|
+
|
|
134
|
+
if (isGiveKudosActionButton) {
|
|
135
|
+
return /*#__PURE__*/React.createElement(AnimatedKudosButton, null, actionButton);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
return /*#__PURE__*/React.createElement(WrappedButton, null, actionButton);
|
|
129
139
|
};
|
|
130
140
|
|
|
131
141
|
var ExtraActions = function ExtraActions(_ref3) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
3
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
4
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
5
|
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
@@ -12,10 +13,13 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
12
13
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
13
14
|
|
|
14
15
|
import React, { Suspense } from 'react';
|
|
16
|
+
import { FormattedMessage } from 'react-intl-next';
|
|
15
17
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
18
|
+
import { GiveKudosLauncherLazy, KudosType } from '@atlaskit/give-kudos';
|
|
16
19
|
import Popup from '@atlaskit/popup';
|
|
17
20
|
import { layers } from '@atlaskit/theme/constants';
|
|
18
21
|
import _filterActions from '../../internal/filterActions';
|
|
22
|
+
import messages from '../../messages';
|
|
19
23
|
import { fireEvent, teamCardTriggered, teamProfileCardRendered } from '../../util/analytics';
|
|
20
24
|
import { isBasicClick } from '../../util/click';
|
|
21
25
|
import { DELAY_MS_HIDE, DELAY_MS_SHOW } from '../../util/config';
|
|
@@ -144,6 +148,26 @@ export var TeamProfileCardTriggerInternal = /*#__PURE__*/function (_React$PureCo
|
|
|
144
148
|
}
|
|
145
149
|
});
|
|
146
150
|
|
|
151
|
+
_defineProperty(_assertThisInitialized(_this), "openKudosDrawer", function () {
|
|
152
|
+
_this.hideProfilecard(DELAY_MS_HIDE);
|
|
153
|
+
|
|
154
|
+
_this.setState({
|
|
155
|
+
kudosDrawerOpen: true
|
|
156
|
+
});
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
_defineProperty(_assertThisInitialized(_this), "closeKudosDrawer", function () {
|
|
160
|
+
_this.setState({
|
|
161
|
+
kudosDrawerOpen: false
|
|
162
|
+
});
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
_defineProperty(_assertThisInitialized(_this), "kudosUrl", function () {
|
|
166
|
+
var recipientId = _this.props.teamId && "&recipientId=".concat(_this.props.teamId) || '';
|
|
167
|
+
var cloudId = _this.props.cloudId && "&cloudId=".concat(_this.props.cloudId) || '';
|
|
168
|
+
return "".concat(_this.state.teamCentralBaseUrl, "/kudos/give?type=team").concat(recipientId).concat(cloudId);
|
|
169
|
+
});
|
|
170
|
+
|
|
147
171
|
_defineProperty(_assertThisInitialized(_this), "stopPropagation", function (event) {
|
|
148
172
|
// We need to stop propagation when users click on the card, so that it
|
|
149
173
|
// doesn't trigger any special effects that occur when clicking the trigger.
|
|
@@ -167,7 +191,10 @@ export var TeamProfileCardTriggerInternal = /*#__PURE__*/function (_React$PureCo
|
|
|
167
191
|
isLoading: undefined,
|
|
168
192
|
hasError: false,
|
|
169
193
|
error: null,
|
|
170
|
-
data: null
|
|
194
|
+
data: null,
|
|
195
|
+
shouldShowGiveKudos: false,
|
|
196
|
+
teamCentralBaseUrl: undefined,
|
|
197
|
+
kudosDrawerOpen: false
|
|
171
198
|
});
|
|
172
199
|
|
|
173
200
|
_defineProperty(_assertThisInitialized(_this), "clientFetchProfile", function () {
|
|
@@ -189,8 +216,11 @@ export var TeamProfileCardTriggerInternal = /*#__PURE__*/function (_React$PureCo
|
|
|
189
216
|
_this.fireAnalytics(event);
|
|
190
217
|
};
|
|
191
218
|
|
|
192
|
-
_this.props.resourceClient.getTeamProfile(teamId, orgId, fireEvent).
|
|
193
|
-
|
|
219
|
+
var requests = Promise.all([_this.props.resourceClient.getTeamProfile(teamId, orgId, fireEvent), _this.props.resourceClient.shouldShowGiveKudos()]);
|
|
220
|
+
requests.then(function (res) {
|
|
221
|
+
var _this2;
|
|
222
|
+
|
|
223
|
+
return (_this2 = _this).handleClientSuccess.apply(_this2, _toConsumableArray(res));
|
|
194
224
|
}, function (err) {
|
|
195
225
|
return _this.handleClientError(err);
|
|
196
226
|
}).catch(function (err) {
|
|
@@ -243,6 +273,23 @@ export var TeamProfileCardTriggerInternal = /*#__PURE__*/function (_React$PureCo
|
|
|
243
273
|
}))));
|
|
244
274
|
});
|
|
245
275
|
|
|
276
|
+
_defineProperty(_assertThisInitialized(_this), "renderKudosLauncher", function () {
|
|
277
|
+
return _this.state.shouldShowGiveKudos && /*#__PURE__*/React.createElement(Suspense, {
|
|
278
|
+
fallback: null
|
|
279
|
+
}, /*#__PURE__*/React.createElement(GiveKudosLauncherLazy, {
|
|
280
|
+
isOpen: _this.state.kudosDrawerOpen,
|
|
281
|
+
recipient: {
|
|
282
|
+
type: KudosType.TEAM,
|
|
283
|
+
recipientId: _this.props.teamId
|
|
284
|
+
},
|
|
285
|
+
analyticsSource: "team-profile-card",
|
|
286
|
+
teamCentralBaseUrl: _this.state.teamCentralBaseUrl,
|
|
287
|
+
cloudId: _this.props.cloudId || '',
|
|
288
|
+
addFlag: _this.props.addFlag,
|
|
289
|
+
onClose: _this.closeKudosDrawer
|
|
290
|
+
}));
|
|
291
|
+
});
|
|
292
|
+
|
|
246
293
|
_defineProperty(_assertThisInitialized(_this), "renderTrigger", function (triggerProps) {
|
|
247
294
|
var _this$props3 = _this.props,
|
|
248
295
|
children = _this$props3.children,
|
|
@@ -250,12 +297,12 @@ export var TeamProfileCardTriggerInternal = /*#__PURE__*/function (_React$PureCo
|
|
|
250
297
|
viewProfileLink = _this$props3.viewProfileLink;
|
|
251
298
|
|
|
252
299
|
if (triggerLinkType === 'none') {
|
|
253
|
-
return /*#__PURE__*/React.createElement("span", _extends({
|
|
300
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, _this.renderKudosLauncher(), /*#__PURE__*/React.createElement("span", _extends({
|
|
254
301
|
"data-testid": "team-profilecard-trigger-wrapper"
|
|
255
|
-
}, triggerProps, _this.triggerListeners), children);
|
|
302
|
+
}, triggerProps, _this.triggerListeners), children));
|
|
256
303
|
}
|
|
257
304
|
|
|
258
|
-
return /*#__PURE__*/React.createElement("a", _extends({
|
|
305
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, _this.renderKudosLauncher(), /*#__PURE__*/React.createElement("a", _extends({
|
|
259
306
|
"data-testid": "team-profilecard-trigger-wrapper",
|
|
260
307
|
style: {
|
|
261
308
|
color: 'initial',
|
|
@@ -264,7 +311,7 @@ export var TeamProfileCardTriggerInternal = /*#__PURE__*/function (_React$PureCo
|
|
|
264
311
|
href: viewProfileLink
|
|
265
312
|
}, triggerProps, {
|
|
266
313
|
ref: triggerProps.ref
|
|
267
|
-
}, _this.triggerListeners), children);
|
|
314
|
+
}, _this.triggerListeners), children));
|
|
268
315
|
});
|
|
269
316
|
|
|
270
317
|
return _this;
|
|
@@ -299,7 +346,7 @@ export var TeamProfileCardTriggerInternal = /*#__PURE__*/function (_React$PureCo
|
|
|
299
346
|
}
|
|
300
347
|
}, {
|
|
301
348
|
key: "handleClientSuccess",
|
|
302
|
-
value: function handleClientSuccess(
|
|
349
|
+
value: function handleClientSuccess(team, shouldShowGiveKudos) {
|
|
303
350
|
if (!this._isMounted) {
|
|
304
351
|
return;
|
|
305
352
|
}
|
|
@@ -307,7 +354,9 @@ export var TeamProfileCardTriggerInternal = /*#__PURE__*/function (_React$PureCo
|
|
|
307
354
|
this.setState({
|
|
308
355
|
isLoading: false,
|
|
309
356
|
hasError: false,
|
|
310
|
-
data:
|
|
357
|
+
data: team,
|
|
358
|
+
shouldShowGiveKudos: shouldShowGiveKudos,
|
|
359
|
+
teamCentralBaseUrl: this.props.resourceClient.getTeamCentralBaseUrl()
|
|
311
360
|
});
|
|
312
361
|
}
|
|
313
362
|
}, {
|
|
@@ -326,12 +375,28 @@ export var TeamProfileCardTriggerInternal = /*#__PURE__*/function (_React$PureCo
|
|
|
326
375
|
}, {
|
|
327
376
|
key: "filterActions",
|
|
328
377
|
value: function filterActions() {
|
|
329
|
-
|
|
378
|
+
var _this3 = this;
|
|
379
|
+
|
|
380
|
+
var actions = _filterActions(this.props.actions, this.state.data);
|
|
381
|
+
|
|
382
|
+
if (this.state.shouldShowGiveKudos) {
|
|
383
|
+
var kudosAction = {
|
|
384
|
+
label: /*#__PURE__*/React.createElement(FormattedMessage, messages.giveKudosButton),
|
|
385
|
+
id: 'give-kudos',
|
|
386
|
+
callback: function callback() {
|
|
387
|
+
_this3.openKudosDrawer();
|
|
388
|
+
},
|
|
389
|
+
link: this.kudosUrl()
|
|
390
|
+
};
|
|
391
|
+
return actions.concat([kudosAction]);
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
return actions;
|
|
330
395
|
}
|
|
331
396
|
}, {
|
|
332
397
|
key: "renderPopup",
|
|
333
398
|
value: function renderPopup() {
|
|
334
|
-
var
|
|
399
|
+
var _this4 = this;
|
|
335
400
|
|
|
336
401
|
if (this.state.renderError) {
|
|
337
402
|
return this.props.children;
|
|
@@ -345,7 +410,7 @@ export var TeamProfileCardTriggerInternal = /*#__PURE__*/function (_React$PureCo
|
|
|
345
410
|
placement: this.props.position,
|
|
346
411
|
content: this.renderProfileCard,
|
|
347
412
|
trigger: function trigger(triggerProps) {
|
|
348
|
-
return
|
|
413
|
+
return _this4.renderTrigger(triggerProps);
|
|
349
414
|
},
|
|
350
415
|
zIndex: layers.modal(),
|
|
351
416
|
shouldFlip: true
|
|
@@ -220,7 +220,6 @@ var ProfileCardResourced = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
220
220
|
type: KudosType.INDIVIDUAL,
|
|
221
221
|
recipientId: this.props.userId
|
|
222
222
|
},
|
|
223
|
-
analytics: this.props.analytics,
|
|
224
223
|
analyticsSource: "profile-card",
|
|
225
224
|
teamCentralBaseUrl: newProps.teamCentralBaseUrl,
|
|
226
225
|
cloudId: this.props.cloudId,
|
|
@@ -292,7 +292,6 @@ var ProfilecardTrigger = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
292
292
|
type: KudosType.INDIVIDUAL,
|
|
293
293
|
recipientId: this.props.userId
|
|
294
294
|
},
|
|
295
|
-
analytics: this.props.analytics,
|
|
296
295
|
analyticsSource: "profile-card",
|
|
297
296
|
teamCentralBaseUrl: this.state.teamCentralBaseUrl,
|
|
298
297
|
cloudId: this.props.cloudId,
|
package/dist/esm/i18n/en.js
CHANGED
|
@@ -25,6 +25,7 @@ export default {
|
|
|
25
25
|
'pt.profile-card.inactive.account.has.date.this.month': 'Their account was deactivated this month.',
|
|
26
26
|
'pt.profile-card.inactive.account.has.date.this.week': 'Their account was deactivated this week.',
|
|
27
27
|
'pt.profile-card.inactive.account.no.date': 'Their account has been deactivated.',
|
|
28
|
+
'pt.profile-card.more-icon-label': 'More',
|
|
28
29
|
'pt.team-profile-card.directReports.heading': 'Direct reports',
|
|
29
30
|
'pt.team-profile-card.error.refresh-button': 'Try again',
|
|
30
31
|
'pt.team-profile-card.error.suggestion': 'Wait a few moments, then try again.',
|
package/dist/esm/i18n/en_GB.js
CHANGED
|
@@ -25,6 +25,7 @@ export default {
|
|
|
25
25
|
'pt.profile-card.inactive.account.has.date.this.month': 'Their account was deactivated this month.',
|
|
26
26
|
'pt.profile-card.inactive.account.has.date.this.week': 'Their account was deactivated this week.',
|
|
27
27
|
'pt.profile-card.inactive.account.no.date': 'Their account has been deactivated.',
|
|
28
|
+
'pt.profile-card.more-icon-label': 'More',
|
|
28
29
|
'pt.team-profile-card.directReports.heading': 'Direct reports',
|
|
29
30
|
'pt.team-profile-card.error.refresh-button': 'Try again',
|
|
30
31
|
'pt.team-profile-card.error.suggestion': 'Wait a few moments, then try again.',
|
package/dist/esm/i18n/en_ZZ.js
CHANGED
|
@@ -25,6 +25,7 @@ export default {
|
|
|
25
25
|
'pt.profile-card.inactive.account.has.date.this.month': 'Their account was deactivated this month.',
|
|
26
26
|
'pt.profile-card.inactive.account.has.date.this.week': 'Their account was deactivated this week.',
|
|
27
27
|
'pt.profile-card.inactive.account.no.date': 'Their account has been deactivated.',
|
|
28
|
+
'pt.profile-card.more-icon-label': 'More',
|
|
28
29
|
'pt.team-profile-card.directReports.heading': 'Direct reports',
|
|
29
30
|
'pt.team-profile-card.error.refresh-button': 'Try again',
|
|
30
31
|
'pt.team-profile-card.error.suggestion': 'Wait a few moments, then try again.',
|
package/dist/esm/styled/Card.js
CHANGED
|
@@ -17,7 +17,7 @@ export var ProfileImage = styled.div(_templateObject3 || (_templateObject3 = _ta
|
|
|
17
17
|
export var ActionsFlexSpacer = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n flex: 1 0 auto;\n"])));
|
|
18
18
|
var kudosButtonAnimationTransformation = keyframes(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["{\n 0% { transform: translate(-80px, -50px); }\n 100% { transform: translate(90px, -70px); }\n}"])));
|
|
19
19
|
export var KudosBlobAnimation = styled.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n display: none;\n height: 150px;\n width: 150px;\n z-index: -1;\n position: absolute;\n animation-name: ", ";\n animation-iteration-count: 1;\n animation-duration: 3s;\n background-image: radial-gradient(\n circle,\n ", " 0%,\n ", " 25%,\n transparent 50%\n );\n overflow: hidden;\n"])), kudosButtonAnimationTransformation, token('color.background.information.pressed', '#85B8FF'), token('color.background.discovery.pressed', '#B8ACF6'));
|
|
20
|
-
export var AnimatedKudosButton = styled.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n margin-left: ", "px;\n &:hover ", " {\n display: block;\n }\n\n button,\n a {\n clip-path: inset(0px 0px 0px 0px round ", "px);\n }\n"])), gridSize, KudosBlobAnimation, borderRadius);
|
|
20
|
+
export var AnimatedKudosButton = styled.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n margin-left: ", "px;\n &:hover ", " {\n display: block;\n }\n\n button,\n a {\n clip-path: inset(0px 0px 0px 0px round ", "px);\n }\n overflow: hidden;\n"])), gridSize, KudosBlobAnimation, borderRadius);
|
|
21
21
|
export var ActionButtonGroup = styled.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n user-select: none;\n margin: ", "px 0 0 0;\n text-align: right;\n display: flex;\n justify-content: flex-end;\n\n button,\n a,\n span {\n margin-left: ", "px;\n\n &:first-child {\n margin-left: 0;\n }\n }\n"])), 2 * gridSize(), gridSize);
|
|
22
22
|
export var OverflowActionButtonsWrapper = styled.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n display: inline-block;\n width: 32px;\n height: 32px;\n margin-left: ", "px;\n"])), gridSize);
|
|
23
23
|
export var CardContent = styled.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n min-height: ", "px;\n"])), gridSize() * 17);
|
|
@@ -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: "16.
|
|
48
|
+
packageVersion: "16.10.0"
|
|
49
49
|
}, attributes), {}, {
|
|
50
50
|
firedAt: getPageTime()
|
|
51
51
|
})
|
package/dist/esm/version.json
CHANGED
|
@@ -18,6 +18,9 @@ export declare class TeamProfileCardTriggerInternal extends React.PureComponent<
|
|
|
18
18
|
onClick: (event: React.MouseEvent<HTMLElement>) => void;
|
|
19
19
|
onMouseEnter: () => void;
|
|
20
20
|
onMouseLeave: () => void;
|
|
21
|
+
openKudosDrawer: () => void;
|
|
22
|
+
closeKudosDrawer: () => void;
|
|
23
|
+
kudosUrl: () => string;
|
|
21
24
|
stopPropagation: (event: React.MouseEvent<HTMLElement>) => void;
|
|
22
25
|
triggerListeners: {
|
|
23
26
|
onClick: (event: React.MouseEvent<HTMLElement>) => void;
|
|
@@ -35,10 +38,11 @@ export declare class TeamProfileCardTriggerInternal extends React.PureComponent<
|
|
|
35
38
|
componentWillUnmount(): void;
|
|
36
39
|
clientFetchProfile: () => void;
|
|
37
40
|
onErrorBoundary: () => void;
|
|
38
|
-
handleClientSuccess(
|
|
41
|
+
handleClientSuccess(team: Team, shouldShowGiveKudos: boolean): void;
|
|
39
42
|
handleClientError(err: any): void;
|
|
40
43
|
filterActions(): ProfileCardAction[];
|
|
41
44
|
renderProfileCard: () => JSX.Element;
|
|
45
|
+
renderKudosLauncher: () => false | JSX.Element | undefined;
|
|
42
46
|
renderTrigger: (triggerProps: TriggerProps) => JSX.Element;
|
|
43
47
|
renderPopup(): React.ReactNode;
|
|
44
48
|
render(): React.ReactNode;
|
package/dist/types/i18n/en.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ declare const _default: {
|
|
|
18
18
|
'pt.profile-card.inactive.account.has.date.this.month': string;
|
|
19
19
|
'pt.profile-card.inactive.account.has.date.this.week': string;
|
|
20
20
|
'pt.profile-card.inactive.account.no.date': string;
|
|
21
|
+
'pt.profile-card.more-icon-label': string;
|
|
21
22
|
'pt.team-profile-card.directReports.heading': string;
|
|
22
23
|
'pt.team-profile-card.error.refresh-button': string;
|
|
23
24
|
'pt.team-profile-card.error.suggestion': string;
|
|
@@ -18,6 +18,7 @@ declare const _default: {
|
|
|
18
18
|
'pt.profile-card.inactive.account.has.date.this.month': string;
|
|
19
19
|
'pt.profile-card.inactive.account.has.date.this.week': string;
|
|
20
20
|
'pt.profile-card.inactive.account.no.date': string;
|
|
21
|
+
'pt.profile-card.more-icon-label': string;
|
|
21
22
|
'pt.team-profile-card.directReports.heading': string;
|
|
22
23
|
'pt.team-profile-card.error.refresh-button': string;
|
|
23
24
|
'pt.team-profile-card.error.suggestion': string;
|
|
@@ -18,6 +18,7 @@ declare const _default: {
|
|
|
18
18
|
'pt.profile-card.inactive.account.has.date.this.month': string;
|
|
19
19
|
'pt.profile-card.inactive.account.has.date.this.week': string;
|
|
20
20
|
'pt.profile-card.inactive.account.no.date': string;
|
|
21
|
+
'pt.profile-card.more-icon-label': string;
|
|
21
22
|
'pt.team-profile-card.directReports.heading': string;
|
|
22
23
|
'pt.team-profile-card.error.refresh-button': string;
|
|
23
24
|
'pt.team-profile-card.error.suggestion': string;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -133,6 +133,9 @@ export interface TeamProfileCardTriggerState {
|
|
|
133
133
|
error?: any;
|
|
134
134
|
data: Team | null;
|
|
135
135
|
renderError?: boolean;
|
|
136
|
+
shouldShowGiveKudos?: boolean;
|
|
137
|
+
teamCentralBaseUrl?: string;
|
|
138
|
+
kudosDrawerOpen: boolean;
|
|
136
139
|
}
|
|
137
140
|
export interface TeamProfilecardCoreProps {
|
|
138
141
|
/**
|
|
@@ -236,6 +239,14 @@ export interface TeamProfileCardTriggerProps extends TeamProfilecardCoreProps {
|
|
|
236
239
|
interacted with according to the method specified by the trigger prop.
|
|
237
240
|
*/
|
|
238
241
|
children?: React.ReactNode;
|
|
242
|
+
/**
|
|
243
|
+
* Used by the card to show Flags.
|
|
244
|
+
*/
|
|
245
|
+
addFlag?: (flag: any) => void;
|
|
246
|
+
/**
|
|
247
|
+
* Optional cloudId. Pass this if rendering card within a sited context.
|
|
248
|
+
*/
|
|
249
|
+
cloudId?: string;
|
|
239
250
|
}
|
|
240
251
|
export declare type StatusType = 'active' | 'inactive' | 'closed';
|
|
241
252
|
export declare type TriggerType = 'hover' | 'click';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/profilecard",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.10.0",
|
|
4
4
|
"description": "A React component to display a card with user information.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@atlaskit/avatar-group": "^9.0.0",
|
|
44
44
|
"@atlaskit/button": "^16.3.0",
|
|
45
45
|
"@atlaskit/dropdown-menu": "^11.2.0",
|
|
46
|
-
"@atlaskit/give-kudos": "^0.
|
|
46
|
+
"@atlaskit/give-kudos": "^0.5.0",
|
|
47
47
|
"@atlaskit/icon": "^21.10.0",
|
|
48
48
|
"@atlaskit/lozenge": "^11.0.0",
|
|
49
49
|
"@atlaskit/menu": "^1.3.0",
|