@atlaskit/profilecard 19.16.2 → 19.17.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 +16 -0
- package/afm-post-office/tsconfig.json +78 -0
- package/dist/cjs/client/getTeamFromAGG.js +1 -1
- package/dist/cjs/components/Icon/IconLabel.js +7 -6
- package/dist/cjs/components/Team/TeamProfileCard.js +8 -4
- package/dist/cjs/components/Team/TeamProfileCardTrigger.js +3 -1
- package/dist/cjs/components/User/OverflowProfileCardButtons.js +4 -2
- package/dist/cjs/components/User/ProfileCardTrigger.js +3 -2
- package/dist/cjs/components/User/ProfileCardTriggerNext.js +3 -1
- package/dist/cjs/util/analytics.js +1 -1
- package/dist/es2019/client/getTeamFromAGG.js +1 -1
- package/dist/es2019/components/Icon/IconLabel.js +6 -5
- package/dist/es2019/components/Team/TeamProfileCard.js +7 -3
- package/dist/es2019/components/Team/TeamProfileCardTrigger.js +3 -1
- package/dist/es2019/components/User/OverflowProfileCardButtons.js +3 -1
- package/dist/es2019/components/User/ProfileCardTrigger.js +4 -3
- package/dist/es2019/components/User/ProfileCardTriggerNext.js +3 -1
- package/dist/es2019/util/analytics.js +1 -1
- package/dist/esm/client/getTeamFromAGG.js +1 -1
- package/dist/esm/components/Icon/IconLabel.js +6 -5
- package/dist/esm/components/Team/TeamProfileCard.js +7 -3
- package/dist/esm/components/Team/TeamProfileCardTrigger.js +3 -1
- package/dist/esm/components/User/OverflowProfileCardButtons.js +3 -1
- package/dist/esm/components/User/ProfileCardTrigger.js +4 -3
- package/dist/esm/components/User/ProfileCardTriggerNext.js +3 -1
- package/dist/esm/util/analytics.js +1 -1
- package/package.json +7 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/profilecard
|
|
2
2
|
|
|
3
|
+
## 19.17.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#124211](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/124211)
|
|
8
|
+
[`6a213831a2e92`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/6a213831a2e92) -
|
|
9
|
+
[ux] Updated components to use new iconography behind a feature flag
|
|
10
|
+
|
|
11
|
+
## 19.16.3
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#122361](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/122361)
|
|
16
|
+
[`dc17551b4b23c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/dc17551b4b23c) -
|
|
17
|
+
Fix reading order in Profile card
|
|
18
|
+
|
|
3
19
|
## 19.16.2
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../../../tsconfig.entry-points.post-office.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"declaration": true,
|
|
5
|
+
"target": "es5",
|
|
6
|
+
"outDir": "../../../../../tsDist/@atlaskit__profilecard/app",
|
|
7
|
+
"composite": true,
|
|
8
|
+
"rootDir": "../"
|
|
9
|
+
},
|
|
10
|
+
"include": [
|
|
11
|
+
"../src/**/*.ts",
|
|
12
|
+
"../src/**/*.tsx"
|
|
13
|
+
],
|
|
14
|
+
"exclude": [
|
|
15
|
+
"../src/**/__tests__/*",
|
|
16
|
+
"../src/**/*.test.*",
|
|
17
|
+
"../src/**/test.*"
|
|
18
|
+
],
|
|
19
|
+
"references": [
|
|
20
|
+
{
|
|
21
|
+
"path": "../../../analytics/analytics-next/afm-post-office/tsconfig.json"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"path": "../../../uip/atlassian-context/afm-post-office/tsconfig.json"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"path": "../../../design-system/avatar/afm-post-office/tsconfig.json"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"path": "../../../design-system/avatar-group/afm-post-office/tsconfig.json"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"path": "../../../design-system/button/afm-post-office/tsconfig.json"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"path": "../../../design-system/dropdown-menu/afm-post-office/tsconfig.json"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"path": "../../../design-system/empty-state/afm-post-office/tsconfig.json"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"path": "../../../design-system/focus-ring/afm-post-office/tsconfig.json"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"path": "../../../team-central/give-kudos/afm-post-office/tsconfig.json"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"path": "../../../design-system/icon/afm-post-office/tsconfig.json"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"path": "../../../design-system/lozenge/afm-post-office/tsconfig.json"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"path": "../../../design-system/menu/afm-post-office/tsconfig.json"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"path": "../../../platform/feature-flags/afm-post-office/tsconfig.json"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"path": "../../../design-system/popup/afm-post-office/tsconfig.json"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"path": "../../../design-system/primitives/afm-post-office/tsconfig.json"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"path": "../../../design-system/spinner/afm-post-office/tsconfig.json"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"path": "../../../design-system/theme/afm-post-office/tsconfig.json"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"path": "../../../design-system/tokens/afm-post-office/tsconfig.json"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"path": "../../../design-system/tooltip/afm-post-office/tsconfig.json"
|
|
76
|
+
}
|
|
77
|
+
]
|
|
78
|
+
}
|
|
@@ -57,7 +57,7 @@ var addHeaders = exports.addHeaders = function addHeaders(headers) {
|
|
|
57
57
|
headers.append('X-ExperimentalApi', 'teams-beta');
|
|
58
58
|
headers.append('X-ExperimentalApi', 'team-members-beta');
|
|
59
59
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
60
|
-
headers.append('atl-client-version', "19.
|
|
60
|
+
headers.append('atl-client-version', "19.17.0");
|
|
61
61
|
return headers;
|
|
62
62
|
};
|
|
63
63
|
function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -12,16 +12,16 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
|
|
|
12
12
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
13
13
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
14
|
var _react = _interopRequireDefault(require("react"));
|
|
15
|
-
var
|
|
16
|
-
var
|
|
17
|
-
var
|
|
18
|
-
var
|
|
15
|
+
var _clockRecent = _interopRequireDefault(require("@atlaskit/icon/core/migration/clock--recent"));
|
|
16
|
+
var _email = _interopRequireDefault(require("@atlaskit/icon/core/migration/email"));
|
|
17
|
+
var _location = _interopRequireDefault(require("@atlaskit/icon/core/migration/location"));
|
|
18
|
+
var _officeBuilding = _interopRequireDefault(require("@atlaskit/icon/core/migration/office-building"));
|
|
19
19
|
var _Card = require("../../styled/Card");
|
|
20
20
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
21
21
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
22
22
|
var icons = {
|
|
23
23
|
location: _location.default,
|
|
24
|
-
time:
|
|
24
|
+
time: _clockRecent.default,
|
|
25
25
|
email: _email.default,
|
|
26
26
|
companyName: _officeBuilding.default
|
|
27
27
|
};
|
|
@@ -43,7 +43,8 @@ var IconLabel = exports.default = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
43
43
|
var IconElement = this.props.icon && icons[this.props.icon];
|
|
44
44
|
var displayIcon = IconElement ? /*#__PURE__*/_react.default.createElement(IconElement, {
|
|
45
45
|
label: "".concat(this.props.icon),
|
|
46
|
-
|
|
46
|
+
LEGACY_size: "small",
|
|
47
|
+
color: "currentColor"
|
|
47
48
|
}) : null;
|
|
48
49
|
return /*#__PURE__*/_react.default.createElement(_Card.DetailsLabel, null, /*#__PURE__*/_react.default.createElement(_Card.DetailsLabelIcon, null, displayIcon), /*#__PURE__*/_react.default.createElement(_Card.DetailsLabelText, null, this.props.children));
|
|
49
50
|
}
|
|
@@ -16,8 +16,9 @@ var _avatarGroup = _interopRequireDefault(require("@atlaskit/avatar-group"));
|
|
|
16
16
|
var _loadingButton = _interopRequireDefault(require("@atlaskit/button/loading-button"));
|
|
17
17
|
var _standardButton = _interopRequireDefault(require("@atlaskit/button/standard-button"));
|
|
18
18
|
var _focusRing = _interopRequireDefault(require("@atlaskit/focus-ring"));
|
|
19
|
-
var
|
|
19
|
+
var _showMoreHorizontalMore = _interopRequireDefault(require("@atlaskit/icon/core/migration/show-more-horizontal--more"));
|
|
20
20
|
var _menu = require("@atlaskit/menu");
|
|
21
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
21
22
|
var _popup = _interopRequireDefault(require("@atlaskit/popup"));
|
|
22
23
|
var _constants = require("@atlaskit/theme/constants");
|
|
23
24
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
@@ -183,12 +184,15 @@ var ExtraActions = function ExtraActions(_ref3) {
|
|
|
183
184
|
onClick: function onClick() {
|
|
184
185
|
return onMoreClick(!isOpen);
|
|
185
186
|
},
|
|
186
|
-
iconAfter: /*#__PURE__*/_react.default.createElement(
|
|
187
|
-
|
|
187
|
+
iconAfter: /*#__PURE__*/_react.default.createElement(_showMoreHorizontalMore.default, {
|
|
188
|
+
spacing: "spacious",
|
|
189
|
+
label: "actions",
|
|
190
|
+
color: "currentColor"
|
|
188
191
|
})
|
|
189
192
|
}));
|
|
190
193
|
},
|
|
191
|
-
zIndex: _constants.layers.modal()
|
|
194
|
+
zIndex: _constants.layers.modal(),
|
|
195
|
+
shouldRenderToParent: (0, _platformFeatureFlags.fg)('enable_appropriate_reading_order_in_profile_card')
|
|
192
196
|
}));
|
|
193
197
|
};
|
|
194
198
|
var ButtonSection = function ButtonSection(_ref4) {
|
|
@@ -19,6 +19,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
19
19
|
var _reactIntlNext = require("react-intl-next");
|
|
20
20
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
21
21
|
var _giveKudos = require("@atlaskit/give-kudos");
|
|
22
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
22
23
|
var _popup = _interopRequireDefault(require("@atlaskit/popup"));
|
|
23
24
|
var _constants = require("@atlaskit/theme/constants");
|
|
24
25
|
var _filterActions2 = _interopRequireDefault(require("../../internal/filterActions"));
|
|
@@ -369,7 +370,8 @@ var TeamProfileCardTriggerInternal = exports.TeamProfileCardTriggerInternal = /*
|
|
|
369
370
|
},
|
|
370
371
|
zIndex: _constants.layers.modal(),
|
|
371
372
|
shouldFlip: true,
|
|
372
|
-
autoFocus: this.props.trigger !== 'hover' && !this.openedByHover
|
|
373
|
+
autoFocus: this.props.trigger !== 'hover' && !this.openedByHover,
|
|
374
|
+
shouldRenderToParent: (0, _platformFeatureFlags.fg)('enable_appropriate_reading_order_in_profile_card')
|
|
373
375
|
}));
|
|
374
376
|
}
|
|
375
377
|
}, {
|
|
@@ -13,7 +13,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
13
13
|
var _reactIntlNext = require("react-intl-next");
|
|
14
14
|
var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom-theme-button"));
|
|
15
15
|
var _dropdownMenu = _interopRequireWildcard(require("@atlaskit/dropdown-menu"));
|
|
16
|
-
var
|
|
16
|
+
var _showMoreHorizontalMore = _interopRequireDefault(require("@atlaskit/icon/core/migration/show-more-horizontal--more"));
|
|
17
17
|
var _messages = _interopRequireDefault(require("../../messages"));
|
|
18
18
|
var _Card = require("../../styled/Card");
|
|
19
19
|
var _analytics = require("../../util/analytics");
|
|
@@ -58,7 +58,9 @@ var OverflowProfileCardButtons = exports.OverflowProfileCardButtons = function O
|
|
|
58
58
|
type: "button"
|
|
59
59
|
}, providedProps, {
|
|
60
60
|
ref: triggerRef,
|
|
61
|
-
iconBefore: /*#__PURE__*/_react.default.createElement(
|
|
61
|
+
iconBefore: /*#__PURE__*/_react.default.createElement(_showMoreHorizontalMore.default, {
|
|
62
|
+
color: "currentColor",
|
|
63
|
+
spacing: "spacious",
|
|
62
64
|
label: intl.formatMessage(_messages.default.profileCardMoreIconLabel)
|
|
63
65
|
})
|
|
64
66
|
}));
|
|
@@ -297,7 +297,8 @@ var ProfilecardTrigger = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
297
297
|
zIndex: _constants.layers.modal(),
|
|
298
298
|
shouldUseCaptureOnOutsideClick: true,
|
|
299
299
|
autoFocus: (_this$props$autoFocus = this.props.autoFocus) !== null && _this$props$autoFocus !== void 0 ? _this$props$autoFocus : this.props.trigger === 'click',
|
|
300
|
-
offset: (_this$props$offset = this.props.offset) !== null && _this$props$offset !== void 0 ? _this$props$offset : [0, 8]
|
|
300
|
+
offset: (_this$props$offset = this.props.offset) !== null && _this$props$offset !== void 0 ? _this$props$offset : [0, 8],
|
|
301
|
+
shouldRenderToParent: (0, _platformFeatureFlags.fg)('enable_appropriate_reading_order_in_profile_card')
|
|
301
302
|
}), this.state.shouldShowGiveKudos && /*#__PURE__*/_react.default.createElement(_react.Suspense, {
|
|
302
303
|
fallback: null
|
|
303
304
|
}, /*#__PURE__*/_react.default.createElement(_giveKudos.GiveKudosLauncherLazy, {
|
|
@@ -332,7 +333,7 @@ var ProfilecardTrigger = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
332
333
|
});
|
|
333
334
|
var ProfilecardTriggerLegacy = (0, _analyticsNext.withAnalyticsEvents)()(ProfilecardTrigger);
|
|
334
335
|
function ProfilecardTriggerSwitch(props) {
|
|
335
|
-
return (0, _platformFeatureFlags.
|
|
336
|
+
return (0, _platformFeatureFlags.fg)('platform.profile-card-trigger-next') ? /*#__PURE__*/_react.default.createElement(_ProfileCardTriggerNext.default, (0, _extends2.default)({}, props, {
|
|
336
337
|
onVisibilityChange: function onVisibilityChange(isVisible) {
|
|
337
338
|
if (props.onVisibilityChange) {
|
|
338
339
|
props.onVisibilityChange(isVisible);
|
|
@@ -17,6 +17,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
17
17
|
var _reactIntlNext = require("react-intl-next");
|
|
18
18
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
19
19
|
var _giveKudos = require("@atlaskit/give-kudos");
|
|
20
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
20
21
|
var _popup = _interopRequireDefault(require("@atlaskit/popup"));
|
|
21
22
|
var _constants = require("@atlaskit/theme/constants");
|
|
22
23
|
var _filterActions = _interopRequireDefault(require("../../internal/filterActions"));
|
|
@@ -334,7 +335,8 @@ function ProfilecardTriggerNext(_ref) {
|
|
|
334
335
|
zIndex: _constants.layers.modal(),
|
|
335
336
|
shouldUseCaptureOnOutsideClick: true,
|
|
336
337
|
autoFocus: autoFocus !== null && autoFocus !== void 0 ? autoFocus : trigger === 'click',
|
|
337
|
-
offset: offset !== null && offset !== void 0 ? offset : [0, 8]
|
|
338
|
+
offset: offset !== null && offset !== void 0 ? offset : [0, 8],
|
|
339
|
+
shouldRenderToParent: (0, _platformFeatureFlags.fg)('enable_appropriate_reading_order_in_profile_card')
|
|
338
340
|
}), shouldShowGiveKudos && /*#__PURE__*/_react.default.createElement(_react.Suspense, {
|
|
339
341
|
fallback: null
|
|
340
342
|
}, /*#__PURE__*/_react.default.createElement(_giveKudos.GiveKudosLauncherLazy, {
|
|
@@ -44,7 +44,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
44
44
|
actionSubjectId: actionSubjectId,
|
|
45
45
|
attributes: _objectSpread(_objectSpread({
|
|
46
46
|
packageName: "@atlaskit/profilecard",
|
|
47
|
-
packageVersion: "19.
|
|
47
|
+
packageVersion: "19.17.0"
|
|
48
48
|
}, attributes), {}, {
|
|
49
49
|
firedAt: Math.round((0, _performance.getPageTime)())
|
|
50
50
|
})
|
|
@@ -67,7 +67,7 @@ export const addHeaders = headers => {
|
|
|
67
67
|
headers.append('X-ExperimentalApi', 'teams-beta');
|
|
68
68
|
headers.append('X-ExperimentalApi', 'team-members-beta');
|
|
69
69
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
70
|
-
headers.append('atl-client-version', "19.
|
|
70
|
+
headers.append('atl-client-version', "19.17.0");
|
|
71
71
|
return headers;
|
|
72
72
|
};
|
|
73
73
|
export async function getTeamFromAGG(url, teamId, siteId) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
3
|
+
import IconRecent from '@atlaskit/icon/core/migration/clock--recent';
|
|
4
|
+
import IconEmail from '@atlaskit/icon/core/migration/email';
|
|
5
|
+
import IconLocation from '@atlaskit/icon/core/migration/location';
|
|
6
|
+
import OfficeBuildingIcon from '@atlaskit/icon/core/migration/office-building';
|
|
7
7
|
import { DetailsLabel, DetailsLabelIcon, DetailsLabelText } from '../../styled/Card';
|
|
8
8
|
const icons = {
|
|
9
9
|
location: IconLocation,
|
|
@@ -21,7 +21,8 @@ export default class IconLabel extends React.PureComponent {
|
|
|
21
21
|
const IconElement = this.props.icon && icons[this.props.icon];
|
|
22
22
|
const displayIcon = IconElement ? /*#__PURE__*/React.createElement(IconElement, {
|
|
23
23
|
label: `${this.props.icon}`,
|
|
24
|
-
|
|
24
|
+
LEGACY_size: "small",
|
|
25
|
+
color: "currentColor"
|
|
25
26
|
}) : null;
|
|
26
27
|
return /*#__PURE__*/React.createElement(DetailsLabel, null, /*#__PURE__*/React.createElement(DetailsLabelIcon, null, displayIcon), /*#__PURE__*/React.createElement(DetailsLabelText, null, this.props.children));
|
|
27
28
|
}
|
|
@@ -5,8 +5,9 @@ import AvatarGroup from '@atlaskit/avatar-group';
|
|
|
5
5
|
import LoadingButton from '@atlaskit/button/loading-button';
|
|
6
6
|
import Button from '@atlaskit/button/standard-button';
|
|
7
7
|
import FocusRing from '@atlaskit/focus-ring';
|
|
8
|
-
import MoreIcon from '@atlaskit/icon/
|
|
8
|
+
import MoreIcon from '@atlaskit/icon/core/migration/show-more-horizontal--more';
|
|
9
9
|
import { LinkItem, MenuGroup } from '@atlaskit/menu';
|
|
10
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
11
|
import Popup from '@atlaskit/popup';
|
|
11
12
|
import { layers } from '@atlaskit/theme/constants';
|
|
12
13
|
import Tooltip from '@atlaskit/tooltip';
|
|
@@ -151,10 +152,13 @@ const ExtraActions = ({
|
|
|
151
152
|
isSelected: isOpen,
|
|
152
153
|
onClick: () => onMoreClick(!isOpen),
|
|
153
154
|
iconAfter: /*#__PURE__*/React.createElement(MoreIcon, {
|
|
154
|
-
|
|
155
|
+
spacing: "spacious",
|
|
156
|
+
label: "actions",
|
|
157
|
+
color: "currentColor"
|
|
155
158
|
})
|
|
156
159
|
})),
|
|
157
|
-
zIndex: layers.modal()
|
|
160
|
+
zIndex: layers.modal(),
|
|
161
|
+
shouldRenderToParent: fg('enable_appropriate_reading_order_in_profile_card')
|
|
158
162
|
}));
|
|
159
163
|
};
|
|
160
164
|
const ButtonSection = ({
|
|
@@ -4,6 +4,7 @@ import React, { Suspense } from 'react';
|
|
|
4
4
|
import { FormattedMessage } from 'react-intl-next';
|
|
5
5
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
6
6
|
import { GiveKudosLauncherLazy, KudosType } from '@atlaskit/give-kudos';
|
|
7
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
8
|
import Popup from '@atlaskit/popup';
|
|
8
9
|
import { layers } from '@atlaskit/theme/constants';
|
|
9
10
|
import filterActions from '../../internal/filterActions';
|
|
@@ -324,7 +325,8 @@ export class TeamProfileCardTriggerInternal extends React.PureComponent {
|
|
|
324
325
|
trigger: triggerProps => this.renderTrigger(triggerProps),
|
|
325
326
|
zIndex: layers.modal(),
|
|
326
327
|
shouldFlip: true,
|
|
327
|
-
autoFocus: this.props.trigger !== 'hover' && !this.openedByHover
|
|
328
|
+
autoFocus: this.props.trigger !== 'hover' && !this.openedByHover,
|
|
329
|
+
shouldRenderToParent: fg('enable_appropriate_reading_order_in_profile_card')
|
|
328
330
|
}));
|
|
329
331
|
}
|
|
330
332
|
render() {
|
|
@@ -3,7 +3,7 @@ import React, { useCallback, useState } from 'react';
|
|
|
3
3
|
import { useIntl } from 'react-intl-next';
|
|
4
4
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
5
5
|
import DropdownMenu, { DropdownItem, DropdownItemGroup } from '@atlaskit/dropdown-menu';
|
|
6
|
-
import MoreIcon from '@atlaskit/icon/
|
|
6
|
+
import MoreIcon from '@atlaskit/icon/core/migration/show-more-horizontal--more';
|
|
7
7
|
import messages from '../../messages';
|
|
8
8
|
import { OverflowActionButtonsWrapper } from '../../styled/Card';
|
|
9
9
|
import { moreActionsClicked } from '../../util/analytics';
|
|
@@ -45,6 +45,8 @@ export const OverflowProfileCardButtons = props => {
|
|
|
45
45
|
}, providedProps, {
|
|
46
46
|
ref: triggerRef,
|
|
47
47
|
iconBefore: /*#__PURE__*/React.createElement(MoreIcon, {
|
|
48
|
+
color: "currentColor",
|
|
49
|
+
spacing: "spacious",
|
|
48
50
|
label: intl.formatMessage(messages.profileCardMoreIconLabel)
|
|
49
51
|
})
|
|
50
52
|
}))
|
|
@@ -3,7 +3,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
3
3
|
import React, { Suspense } from 'react';
|
|
4
4
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
5
5
|
import { GiveKudosLauncherLazy, KudosType } from '@atlaskit/give-kudos';
|
|
6
|
-
import {
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
7
|
import Popup from '@atlaskit/popup';
|
|
8
8
|
import { layers } from '@atlaskit/theme/constants';
|
|
9
9
|
import filterActions from '../../internal/filterActions';
|
|
@@ -251,7 +251,8 @@ class ProfilecardTrigger extends React.PureComponent {
|
|
|
251
251
|
zIndex: layers.modal(),
|
|
252
252
|
shouldUseCaptureOnOutsideClick: true,
|
|
253
253
|
autoFocus: (_this$props$autoFocus = this.props.autoFocus) !== null && _this$props$autoFocus !== void 0 ? _this$props$autoFocus : this.props.trigger === 'click',
|
|
254
|
-
offset: (_this$props$offset = this.props.offset) !== null && _this$props$offset !== void 0 ? _this$props$offset : [0, 8]
|
|
254
|
+
offset: (_this$props$offset = this.props.offset) !== null && _this$props$offset !== void 0 ? _this$props$offset : [0, 8],
|
|
255
|
+
shouldRenderToParent: fg('enable_appropriate_reading_order_in_profile_card')
|
|
255
256
|
}), this.state.shouldShowGiveKudos && /*#__PURE__*/React.createElement(Suspense, {
|
|
256
257
|
fallback: null
|
|
257
258
|
}, /*#__PURE__*/React.createElement(GiveKudosLauncherLazy, {
|
|
@@ -282,7 +283,7 @@ _defineProperty(ProfilecardTrigger, "defaultProps", {
|
|
|
282
283
|
});
|
|
283
284
|
const ProfilecardTriggerLegacy = withAnalyticsEvents()(ProfilecardTrigger);
|
|
284
285
|
export default function ProfilecardTriggerSwitch(props) {
|
|
285
|
-
return
|
|
286
|
+
return fg('platform.profile-card-trigger-next') ? /*#__PURE__*/React.createElement(ProfilecardTriggerNext, _extends({}, props, {
|
|
286
287
|
onVisibilityChange: isVisible => {
|
|
287
288
|
if (props.onVisibilityChange) {
|
|
288
289
|
props.onVisibilityChange(isVisible);
|
|
@@ -3,6 +3,7 @@ import React, { Suspense, useCallback, useEffect, useMemo, useRef, useState } fr
|
|
|
3
3
|
import { useIntl } from 'react-intl-next';
|
|
4
4
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
5
5
|
import { GiveKudosLauncherLazy, KudosType } from '@atlaskit/give-kudos';
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
7
|
import Popup from '@atlaskit/popup';
|
|
7
8
|
import { layers } from '@atlaskit/theme/constants';
|
|
8
9
|
import filterActionsInner from '../../internal/filterActions';
|
|
@@ -262,7 +263,8 @@ export default function ProfilecardTriggerNext({
|
|
|
262
263
|
zIndex: layers.modal(),
|
|
263
264
|
shouldUseCaptureOnOutsideClick: true,
|
|
264
265
|
autoFocus: autoFocus !== null && autoFocus !== void 0 ? autoFocus : trigger === 'click',
|
|
265
|
-
offset: offset !== null && offset !== void 0 ? offset : [0, 8]
|
|
266
|
+
offset: offset !== null && offset !== void 0 ? offset : [0, 8],
|
|
267
|
+
shouldRenderToParent: fg('enable_appropriate_reading_order_in_profile_card')
|
|
266
268
|
}), shouldShowGiveKudos && /*#__PURE__*/React.createElement(Suspense, {
|
|
267
269
|
fallback: null
|
|
268
270
|
}, /*#__PURE__*/React.createElement(GiveKudosLauncherLazy, {
|
|
@@ -31,7 +31,7 @@ const createEvent = (eventType, action, actionSubject, actionSubjectId, attribut
|
|
|
31
31
|
actionSubjectId,
|
|
32
32
|
attributes: {
|
|
33
33
|
packageName: "@atlaskit/profilecard",
|
|
34
|
-
packageVersion: "19.
|
|
34
|
+
packageVersion: "19.17.0",
|
|
35
35
|
...attributes,
|
|
36
36
|
firedAt: Math.round(getPageTime())
|
|
37
37
|
}
|
|
@@ -48,7 +48,7 @@ export var addHeaders = function addHeaders(headers) {
|
|
|
48
48
|
headers.append('X-ExperimentalApi', 'teams-beta');
|
|
49
49
|
headers.append('X-ExperimentalApi', 'team-members-beta');
|
|
50
50
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
51
|
-
headers.append('atl-client-version', "19.
|
|
51
|
+
headers.append('atl-client-version', "19.17.0");
|
|
52
52
|
return headers;
|
|
53
53
|
};
|
|
54
54
|
export function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -7,10 +7,10 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
7
7
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
8
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
9
9
|
import React from 'react';
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
10
|
+
import IconRecent from '@atlaskit/icon/core/migration/clock--recent';
|
|
11
|
+
import IconEmail from '@atlaskit/icon/core/migration/email';
|
|
12
|
+
import IconLocation from '@atlaskit/icon/core/migration/location';
|
|
13
|
+
import OfficeBuildingIcon from '@atlaskit/icon/core/migration/office-building';
|
|
14
14
|
import { DetailsLabel, DetailsLabelIcon, DetailsLabelText } from '../../styled/Card';
|
|
15
15
|
var icons = {
|
|
16
16
|
location: IconLocation,
|
|
@@ -36,7 +36,8 @@ var IconLabel = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
36
36
|
var IconElement = this.props.icon && icons[this.props.icon];
|
|
37
37
|
var displayIcon = IconElement ? /*#__PURE__*/React.createElement(IconElement, {
|
|
38
38
|
label: "".concat(this.props.icon),
|
|
39
|
-
|
|
39
|
+
LEGACY_size: "small",
|
|
40
|
+
color: "currentColor"
|
|
40
41
|
}) : null;
|
|
41
42
|
return /*#__PURE__*/React.createElement(DetailsLabel, null, /*#__PURE__*/React.createElement(DetailsLabelIcon, null, displayIcon), /*#__PURE__*/React.createElement(DetailsLabelText, null, this.props.children));
|
|
42
43
|
}
|
|
@@ -10,8 +10,9 @@ import AvatarGroup from '@atlaskit/avatar-group';
|
|
|
10
10
|
import LoadingButton from '@atlaskit/button/loading-button';
|
|
11
11
|
import Button from '@atlaskit/button/standard-button';
|
|
12
12
|
import FocusRing from '@atlaskit/focus-ring';
|
|
13
|
-
import MoreIcon from '@atlaskit/icon/
|
|
13
|
+
import MoreIcon from '@atlaskit/icon/core/migration/show-more-horizontal--more';
|
|
14
14
|
import { LinkItem, MenuGroup } from '@atlaskit/menu';
|
|
15
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
16
|
import Popup from '@atlaskit/popup';
|
|
16
17
|
import { layers } from '@atlaskit/theme/constants';
|
|
17
18
|
import Tooltip from '@atlaskit/tooltip';
|
|
@@ -174,11 +175,14 @@ var ExtraActions = function ExtraActions(_ref3) {
|
|
|
174
175
|
return onMoreClick(!isOpen);
|
|
175
176
|
},
|
|
176
177
|
iconAfter: /*#__PURE__*/React.createElement(MoreIcon, {
|
|
177
|
-
|
|
178
|
+
spacing: "spacious",
|
|
179
|
+
label: "actions",
|
|
180
|
+
color: "currentColor"
|
|
178
181
|
})
|
|
179
182
|
}));
|
|
180
183
|
},
|
|
181
|
-
zIndex: layers.modal()
|
|
184
|
+
zIndex: layers.modal(),
|
|
185
|
+
shouldRenderToParent: fg('enable_appropriate_reading_order_in_profile_card')
|
|
182
186
|
}));
|
|
183
187
|
};
|
|
184
188
|
var ButtonSection = function ButtonSection(_ref4) {
|
|
@@ -13,6 +13,7 @@ import React, { Suspense } from 'react';
|
|
|
13
13
|
import { FormattedMessage } from 'react-intl-next';
|
|
14
14
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
15
15
|
import { GiveKudosLauncherLazy, KudosType } from '@atlaskit/give-kudos';
|
|
16
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
16
17
|
import Popup from '@atlaskit/popup';
|
|
17
18
|
import { layers } from '@atlaskit/theme/constants';
|
|
18
19
|
import _filterActions from '../../internal/filterActions';
|
|
@@ -359,7 +360,8 @@ export var TeamProfileCardTriggerInternal = /*#__PURE__*/function (_React$PureCo
|
|
|
359
360
|
},
|
|
360
361
|
zIndex: layers.modal(),
|
|
361
362
|
shouldFlip: true,
|
|
362
|
-
autoFocus: this.props.trigger !== 'hover' && !this.openedByHover
|
|
363
|
+
autoFocus: this.props.trigger !== 'hover' && !this.openedByHover,
|
|
364
|
+
shouldRenderToParent: fg('enable_appropriate_reading_order_in_profile_card')
|
|
363
365
|
}));
|
|
364
366
|
}
|
|
365
367
|
}, {
|
|
@@ -6,7 +6,7 @@ import React, { useCallback, useState } from 'react';
|
|
|
6
6
|
import { useIntl } from 'react-intl-next';
|
|
7
7
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
8
8
|
import DropdownMenu, { DropdownItem, DropdownItemGroup } from '@atlaskit/dropdown-menu';
|
|
9
|
-
import MoreIcon from '@atlaskit/icon/
|
|
9
|
+
import MoreIcon from '@atlaskit/icon/core/migration/show-more-horizontal--more';
|
|
10
10
|
import messages from '../../messages';
|
|
11
11
|
import { OverflowActionButtonsWrapper } from '../../styled/Card';
|
|
12
12
|
import { moreActionsClicked } from '../../util/analytics';
|
|
@@ -49,6 +49,8 @@ export var OverflowProfileCardButtons = function OverflowProfileCardButtons(prop
|
|
|
49
49
|
}, providedProps, {
|
|
50
50
|
ref: triggerRef,
|
|
51
51
|
iconBefore: /*#__PURE__*/React.createElement(MoreIcon, {
|
|
52
|
+
color: "currentColor",
|
|
53
|
+
spacing: "spacious",
|
|
52
54
|
label: intl.formatMessage(messages.profileCardMoreIconLabel)
|
|
53
55
|
})
|
|
54
56
|
}));
|
|
@@ -16,7 +16,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
16
16
|
import React, { Suspense } from 'react';
|
|
17
17
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
18
18
|
import { GiveKudosLauncherLazy, KudosType } from '@atlaskit/give-kudos';
|
|
19
|
-
import {
|
|
19
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
20
20
|
import Popup from '@atlaskit/popup';
|
|
21
21
|
import { layers } from '@atlaskit/theme/constants';
|
|
22
22
|
import _filterActions from '../../internal/filterActions';
|
|
@@ -287,7 +287,8 @@ var ProfilecardTrigger = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
287
287
|
zIndex: layers.modal(),
|
|
288
288
|
shouldUseCaptureOnOutsideClick: true,
|
|
289
289
|
autoFocus: (_this$props$autoFocus = this.props.autoFocus) !== null && _this$props$autoFocus !== void 0 ? _this$props$autoFocus : this.props.trigger === 'click',
|
|
290
|
-
offset: (_this$props$offset = this.props.offset) !== null && _this$props$offset !== void 0 ? _this$props$offset : [0, 8]
|
|
290
|
+
offset: (_this$props$offset = this.props.offset) !== null && _this$props$offset !== void 0 ? _this$props$offset : [0, 8],
|
|
291
|
+
shouldRenderToParent: fg('enable_appropriate_reading_order_in_profile_card')
|
|
291
292
|
}), this.state.shouldShowGiveKudos && /*#__PURE__*/React.createElement(Suspense, {
|
|
292
293
|
fallback: null
|
|
293
294
|
}, /*#__PURE__*/React.createElement(GiveKudosLauncherLazy, {
|
|
@@ -322,7 +323,7 @@ _defineProperty(ProfilecardTrigger, "defaultProps", {
|
|
|
322
323
|
});
|
|
323
324
|
var ProfilecardTriggerLegacy = withAnalyticsEvents()(ProfilecardTrigger);
|
|
324
325
|
export default function ProfilecardTriggerSwitch(props) {
|
|
325
|
-
return
|
|
326
|
+
return fg('platform.profile-card-trigger-next') ? /*#__PURE__*/React.createElement(ProfilecardTriggerNext, _extends({}, props, {
|
|
326
327
|
onVisibilityChange: function onVisibilityChange(isVisible) {
|
|
327
328
|
if (props.onVisibilityChange) {
|
|
328
329
|
props.onVisibilityChange(isVisible);
|
|
@@ -13,6 +13,7 @@ import React, { Suspense, useCallback, useEffect, useMemo, useRef, useState } fr
|
|
|
13
13
|
import { useIntl } from 'react-intl-next';
|
|
14
14
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
15
15
|
import { GiveKudosLauncherLazy, KudosType } from '@atlaskit/give-kudos';
|
|
16
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
16
17
|
import Popup from '@atlaskit/popup';
|
|
17
18
|
import { layers } from '@atlaskit/theme/constants';
|
|
18
19
|
import filterActionsInner from '../../internal/filterActions';
|
|
@@ -324,7 +325,8 @@ export default function ProfilecardTriggerNext(_ref) {
|
|
|
324
325
|
zIndex: layers.modal(),
|
|
325
326
|
shouldUseCaptureOnOutsideClick: true,
|
|
326
327
|
autoFocus: autoFocus !== null && autoFocus !== void 0 ? autoFocus : trigger === 'click',
|
|
327
|
-
offset: offset !== null && offset !== void 0 ? offset : [0, 8]
|
|
328
|
+
offset: offset !== null && offset !== void 0 ? offset : [0, 8],
|
|
329
|
+
shouldRenderToParent: fg('enable_appropriate_reading_order_in_profile_card')
|
|
328
330
|
}), shouldShowGiveKudos && /*#__PURE__*/React.createElement(Suspense, {
|
|
329
331
|
fallback: null
|
|
330
332
|
}, /*#__PURE__*/React.createElement(GiveKudosLauncherLazy, {
|
|
@@ -38,7 +38,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
38
38
|
actionSubjectId: actionSubjectId,
|
|
39
39
|
attributes: _objectSpread(_objectSpread({
|
|
40
40
|
packageName: "@atlaskit/profilecard",
|
|
41
|
-
packageVersion: "19.
|
|
41
|
+
packageVersion: "19.17.0"
|
|
42
42
|
}, attributes), {}, {
|
|
43
43
|
firedAt: Math.round(getPageTime())
|
|
44
44
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/profilecard",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.17.0",
|
|
4
4
|
"description": "A React component to display a card with user information.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -56,17 +56,17 @@
|
|
|
56
56
|
"@atlaskit/atlassian-context": "^0.0.0",
|
|
57
57
|
"@atlaskit/avatar": "^21.11.0",
|
|
58
58
|
"@atlaskit/avatar-group": "^9.9.0",
|
|
59
|
-
"@atlaskit/button": "^19.
|
|
59
|
+
"@atlaskit/button": "^19.1.0",
|
|
60
60
|
"@atlaskit/dropdown-menu": "^12.14.0",
|
|
61
61
|
"@atlaskit/empty-state": "^7.9.0",
|
|
62
62
|
"@atlaskit/focus-ring": "^1.5.0",
|
|
63
63
|
"@atlaskit/give-kudos": "^2.1.1",
|
|
64
|
-
"@atlaskit/icon": "^22.
|
|
64
|
+
"@atlaskit/icon": "^22.8.0",
|
|
65
65
|
"@atlaskit/lozenge": "^11.9.0",
|
|
66
66
|
"@atlaskit/menu": "^2.8.0",
|
|
67
67
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
68
68
|
"@atlaskit/popup": "^1.20.0",
|
|
69
|
-
"@atlaskit/primitives": "^11.
|
|
69
|
+
"@atlaskit/primitives": "^11.1.0",
|
|
70
70
|
"@atlaskit/spinner": "^16.2.0",
|
|
71
71
|
"@atlaskit/theme": "^12.11.0",
|
|
72
72
|
"@atlaskit/tokens": "^1.56.0",
|
|
@@ -115,6 +115,9 @@
|
|
|
115
115
|
"platform-feature-flags": {
|
|
116
116
|
"platform.profile-card-trigger-next": {
|
|
117
117
|
"type": "boolean"
|
|
118
|
+
},
|
|
119
|
+
"enable_appropriate_reading_order_in_profile_card": {
|
|
120
|
+
"type": "boolean"
|
|
118
121
|
}
|
|
119
122
|
}
|
|
120
123
|
}
|