@atlaskit/profilecard 21.0.2 → 21.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/cjs/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/cjs/client/getTeamFromAGG.js +1 -1
- package/dist/cjs/components/Error/ErrorMessage.js +4 -1
- package/dist/cjs/components/Team/TeamProfileCard.js +4 -1
- package/dist/cjs/styled/Error.js +5 -17
- package/dist/cjs/util/analytics.js +1 -1
- package/dist/es2019/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/es2019/client/getTeamFromAGG.js +1 -1
- package/dist/es2019/components/Error/ErrorMessage.js +5 -2
- package/dist/es2019/components/Team/TeamProfileCard.js +6 -3
- package/dist/es2019/styled/Error.js +2 -14
- package/dist/es2019/util/analytics.js +1 -1
- package/dist/esm/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/esm/client/getTeamFromAGG.js +1 -1
- package/dist/esm/components/Error/ErrorMessage.js +5 -2
- package/dist/esm/components/Team/TeamProfileCard.js +6 -3
- package/dist/esm/styled/Error.js +2 -14
- package/dist/esm/util/analytics.js +1 -1
- package/dist/types/styled/Error.d.ts +0 -8
- package/dist/types-ts4.5/styled/Error.d.ts +0 -8
- package/package.json +1 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/profilecard
|
|
2
2
|
|
|
3
|
+
## 21.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#178297](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/178297)
|
|
8
|
+
[`7abc8162b32ab`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/7abc8162b32ab) -
|
|
9
|
+
Internal changes to typography styles. There may be some minor visual changes to align with
|
|
10
|
+
modernized typography styles.
|
|
11
|
+
- [#172505](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/172505)
|
|
12
|
+
[`e43cba2a879aa`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e43cba2a879aa) -
|
|
13
|
+
Remove explicit jest extension with .toBeAccessible matcher
|
|
14
|
+
|
|
3
15
|
## 21.0.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -11,7 +11,7 @@ var _graphqlUtils = require("./graphqlUtils");
|
|
|
11
11
|
var ORG_ID_FROM_CLOUD_ID_QUERY = "query OrgIdFromCloudId($cloudId: ID!) {\n\ttenantContexts(cloudIds: [$cloudId]) {\n\t\torgId\n\t}\n}";
|
|
12
12
|
var addHeaders = function addHeaders(headers) {
|
|
13
13
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
14
|
-
headers.append('atl-client-version', "21.0.
|
|
14
|
+
headers.append('atl-client-version', "21.0.3");
|
|
15
15
|
return headers;
|
|
16
16
|
};
|
|
17
17
|
function getOrgIdForCloudIdFromAGG(_x, _x2) {
|
|
@@ -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', "21.0.
|
|
60
|
+
headers.append('atl-client-version', "21.0.3");
|
|
61
61
|
return headers;
|
|
62
62
|
};
|
|
63
63
|
function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -9,6 +9,7 @@ exports.default = void 0;
|
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _standardButton = _interopRequireDefault(require("@atlaskit/button/standard-button"));
|
|
11
11
|
var _crossCircle = _interopRequireDefault(require("@atlaskit/icon/glyph/cross-circle"));
|
|
12
|
+
var _primitives = require("@atlaskit/primitives");
|
|
12
13
|
var _Error = require("../../styled/Error");
|
|
13
14
|
var _analytics = require("../../util/analytics");
|
|
14
15
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
@@ -31,7 +32,9 @@ var ErrorMessage = function ErrorMessage(props) {
|
|
|
31
32
|
if (errorReason === 'NotFound') {
|
|
32
33
|
return /*#__PURE__*/_react.default.createElement(_Error.ErrorTitle, null, "The user is no longer available for the site");
|
|
33
34
|
}
|
|
34
|
-
return /*#__PURE__*/_react.default.createElement(_Error.ErrorTitle, null, "Oops, looks like we\u2019re having issues", /*#__PURE__*/_react.default.createElement("br", null), reload && /*#__PURE__*/_react.default.createElement(
|
|
35
|
+
return /*#__PURE__*/_react.default.createElement(_Error.ErrorTitle, null, "Oops, looks like we\u2019re having issues", /*#__PURE__*/_react.default.createElement("br", null), reload && /*#__PURE__*/_react.default.createElement(_primitives.Text, {
|
|
36
|
+
color: "color.text.subtlest"
|
|
37
|
+
}, "Try again and we\u2019ll give it another shot"));
|
|
35
38
|
};
|
|
36
39
|
return /*#__PURE__*/_react.default.createElement(_Error.ErrorWrapper, {
|
|
37
40
|
"data-testid": "profilecard-error"
|
|
@@ -293,7 +293,10 @@ var ErrorMessage = function ErrorMessage(_ref6) {
|
|
|
293
293
|
}, [analytics, clientFetchProfile]);
|
|
294
294
|
return /*#__PURE__*/_react.default.createElement(_Error.ErrorWrapper, {
|
|
295
295
|
"data-testid": "team-profilecard-error"
|
|
296
|
-
}, /*#__PURE__*/_react.default.createElement(_Error2.ErrorIllustration, null), /*#__PURE__*/_react.default.createElement(
|
|
296
|
+
}, /*#__PURE__*/_react.default.createElement(_Error2.ErrorIllustration, null), /*#__PURE__*/_react.default.createElement(_primitives.Text, {
|
|
297
|
+
as: "p",
|
|
298
|
+
weight: "semibold"
|
|
299
|
+
}, /*#__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(_loadingButton.default, {
|
|
297
300
|
testId: "client-fetch-profile-button",
|
|
298
301
|
shouldFitContainer: true,
|
|
299
302
|
onClick: retry,
|
package/dist/cjs/styled/Error.js
CHANGED
|
@@ -4,12 +4,10 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.
|
|
7
|
+
exports.TeamErrorText = exports.ErrorWrapper = exports.ErrorTitle = void 0;
|
|
8
8
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
9
9
|
var _colors = require("@atlaskit/theme/colors");
|
|
10
|
-
var _constants = require("
|
|
11
|
-
var _typography = require("@atlaskit/theme/typography");
|
|
12
|
-
var _constants2 = require("./constants");
|
|
10
|
+
var _constants = require("./constants");
|
|
13
11
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
14
12
|
|
|
15
13
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
@@ -17,27 +15,17 @@ var ErrorWrapper = exports.ErrorWrapper = _styled.default.div({
|
|
|
17
15
|
textAlign: 'center',
|
|
18
16
|
padding: "var(--ds-space-300, 24px)",
|
|
19
17
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
20
|
-
color:
|
|
18
|
+
color: _constants.errorIconColor
|
|
21
19
|
});
|
|
22
20
|
|
|
23
21
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
24
22
|
var ErrorTitle = exports.ErrorTitle = _styled.default.p({
|
|
23
|
+
font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
25
24
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
26
|
-
color:
|
|
27
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
28
|
-
lineHeight: "".concat((0, _constants.gridSize)() * 3, "px"),
|
|
25
|
+
color: _constants.errorTitleColor,
|
|
29
26
|
margin: "var(--ds-space-100, 8px)".concat(" 0")
|
|
30
27
|
});
|
|
31
28
|
|
|
32
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
33
|
-
var ErrorText = exports.ErrorText = _styled.default.span({
|
|
34
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
35
|
-
color: _constants2.errorTextColor
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
39
|
-
var TeamErrorTitle = exports.TeamErrorTitle = _styled.default.p(_typography.h400);
|
|
40
|
-
|
|
41
29
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
42
30
|
var TeamErrorText = exports.TeamErrorText = _styled.default.p({
|
|
43
31
|
color: "var(--ds-text-subtlest, ".concat(_colors.N200, ")"),
|
|
@@ -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: "21.0.
|
|
48
|
+
packageVersion: "21.0.3"
|
|
49
49
|
}, attributes), {}, {
|
|
50
50
|
firedAt: Math.round((0, _performance.getPageTime)())
|
|
51
51
|
})
|
|
@@ -6,7 +6,7 @@ const ORG_ID_FROM_CLOUD_ID_QUERY = `query OrgIdFromCloudId($cloudId: ID!) {
|
|
|
6
6
|
}`;
|
|
7
7
|
const addHeaders = headers => {
|
|
8
8
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
9
|
-
headers.append('atl-client-version', "21.0.
|
|
9
|
+
headers.append('atl-client-version', "21.0.3");
|
|
10
10
|
return headers;
|
|
11
11
|
};
|
|
12
12
|
export async function getOrgIdForCloudIdFromAGG(url, cloudId) {
|
|
@@ -68,7 +68,7 @@ export const addHeaders = headers => {
|
|
|
68
68
|
headers.append('X-ExperimentalApi', 'teams-beta');
|
|
69
69
|
headers.append('X-ExperimentalApi', 'team-members-beta');
|
|
70
70
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
71
|
-
headers.append('atl-client-version', "21.0.
|
|
71
|
+
headers.append('atl-client-version', "21.0.3");
|
|
72
72
|
return headers;
|
|
73
73
|
};
|
|
74
74
|
export async function getTeamFromAGG(url, teamId, siteId) {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React, { useEffect } from 'react';
|
|
2
2
|
import Button from '@atlaskit/button/standard-button';
|
|
3
3
|
import IconError from '@atlaskit/icon/glyph/cross-circle';
|
|
4
|
-
import {
|
|
4
|
+
import { Text } from '@atlaskit/primitives';
|
|
5
|
+
import { ErrorTitle, ErrorWrapper } from '../../styled/Error';
|
|
5
6
|
import { profileCardRendered } from '../../util/analytics';
|
|
6
7
|
const ErrorMessage = props => {
|
|
7
8
|
const errorType = props.errorType || {
|
|
@@ -23,7 +24,9 @@ const ErrorMessage = props => {
|
|
|
23
24
|
if (errorReason === 'NotFound') {
|
|
24
25
|
return /*#__PURE__*/React.createElement(ErrorTitle, null, "The user is no longer available for the site");
|
|
25
26
|
}
|
|
26
|
-
return /*#__PURE__*/React.createElement(ErrorTitle, null, "Oops, looks like we\u2019re having issues", /*#__PURE__*/React.createElement("br", null), reload && /*#__PURE__*/React.createElement(
|
|
27
|
+
return /*#__PURE__*/React.createElement(ErrorTitle, null, "Oops, looks like we\u2019re having issues", /*#__PURE__*/React.createElement("br", null), reload && /*#__PURE__*/React.createElement(Text, {
|
|
28
|
+
color: "color.text.subtlest"
|
|
29
|
+
}, "Try again and we\u2019ll give it another shot"));
|
|
27
30
|
};
|
|
28
31
|
return /*#__PURE__*/React.createElement(ErrorWrapper, {
|
|
29
32
|
"data-testid": "profilecard-error"
|
|
@@ -10,12 +10,12 @@ import { LinkItem, MenuGroup } from '@atlaskit/menu';
|
|
|
10
10
|
import { VerifiedTeamIcon } from '@atlaskit/people-teams-ui-public/verified-team-icon';
|
|
11
11
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
12
|
import Popup from '@atlaskit/popup';
|
|
13
|
-
import { Inline } from '@atlaskit/primitives';
|
|
13
|
+
import { Inline, Text } from '@atlaskit/primitives';
|
|
14
14
|
import { layers } from '@atlaskit/theme/constants';
|
|
15
15
|
import Tooltip from '@atlaskit/tooltip';
|
|
16
16
|
import messages from '../../messages';
|
|
17
17
|
import { AnimatedKudosButton, AnimationWrapper, KudosBlobAnimation } from '../../styled/Card';
|
|
18
|
-
import { ErrorWrapper, TeamErrorText
|
|
18
|
+
import { ErrorWrapper, TeamErrorText } from '../../styled/Error';
|
|
19
19
|
import { ActionButtons, AvatarSection, CardContent, CardHeader, CardWrapper, Description, DescriptionWrapper, MemberCount, MoreButton, TeamName, WrappedButton } from '../../styled/TeamCard';
|
|
20
20
|
import { actionClicked, errorRetryClicked, moreActionsClicked, moreMembersClicked, profileCardRendered, teamAvatarClicked } from '../../util/analytics';
|
|
21
21
|
import { isBasicClick } from '../../util/click';
|
|
@@ -254,7 +254,10 @@ const ErrorMessage = ({
|
|
|
254
254
|
}, [analytics, clientFetchProfile]);
|
|
255
255
|
return /*#__PURE__*/React.createElement(ErrorWrapper, {
|
|
256
256
|
"data-testid": "team-profilecard-error"
|
|
257
|
-
}, /*#__PURE__*/React.createElement(ErrorIllustration, null), /*#__PURE__*/React.createElement(
|
|
257
|
+
}, /*#__PURE__*/React.createElement(ErrorIllustration, null), /*#__PURE__*/React.createElement(Text, {
|
|
258
|
+
as: "p",
|
|
259
|
+
weight: "semibold"
|
|
260
|
+
}, /*#__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(LoadingButton, {
|
|
258
261
|
testId: "client-fetch-profile-button",
|
|
259
262
|
shouldFitContainer: true,
|
|
260
263
|
onClick: retry,
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
3
|
import { N200 } from '@atlaskit/theme/colors';
|
|
4
|
-
import {
|
|
5
|
-
import { h400 } from '@atlaskit/theme/typography';
|
|
6
|
-
import { errorIconColor, errorTextColor, errorTitleColor } from './constants';
|
|
4
|
+
import { errorIconColor, errorTitleColor } from './constants';
|
|
7
5
|
|
|
8
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
9
7
|
export const ErrorWrapper = styled.div({
|
|
@@ -15,22 +13,12 @@ export const ErrorWrapper = styled.div({
|
|
|
15
13
|
|
|
16
14
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
17
15
|
export const ErrorTitle = styled.p({
|
|
16
|
+
font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
18
17
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
19
18
|
color: errorTitleColor,
|
|
20
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
21
|
-
lineHeight: `${gridSize() * 3}px`,
|
|
22
19
|
margin: `${"var(--ds-space-100, 8px)"} 0`
|
|
23
20
|
});
|
|
24
21
|
|
|
25
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
26
|
-
export const ErrorText = styled.span({
|
|
27
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
28
|
-
color: errorTextColor
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
32
|
-
export const TeamErrorTitle = styled.p(h400);
|
|
33
|
-
|
|
34
22
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
35
23
|
export const TeamErrorText = styled.p({
|
|
36
24
|
color: `var(--ds-text-subtlest, ${N200})`,
|
|
@@ -32,7 +32,7 @@ const createEvent = (eventType, action, actionSubject, actionSubjectId, attribut
|
|
|
32
32
|
actionSubjectId,
|
|
33
33
|
attributes: {
|
|
34
34
|
packageName: "@atlaskit/profilecard",
|
|
35
|
-
packageVersion: "21.0.
|
|
35
|
+
packageVersion: "21.0.3",
|
|
36
36
|
...attributes,
|
|
37
37
|
firedAt: Math.round(getPageTime())
|
|
38
38
|
}
|
|
@@ -4,7 +4,7 @@ import { AGGQuery } from './graphqlUtils';
|
|
|
4
4
|
var ORG_ID_FROM_CLOUD_ID_QUERY = "query OrgIdFromCloudId($cloudId: ID!) {\n\ttenantContexts(cloudIds: [$cloudId]) {\n\t\torgId\n\t}\n}";
|
|
5
5
|
var addHeaders = function addHeaders(headers) {
|
|
6
6
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
7
|
-
headers.append('atl-client-version', "21.0.
|
|
7
|
+
headers.append('atl-client-version', "21.0.3");
|
|
8
8
|
return headers;
|
|
9
9
|
};
|
|
10
10
|
export function getOrgIdForCloudIdFromAGG(_x, _x2) {
|
|
@@ -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', "21.0.
|
|
51
|
+
headers.append('atl-client-version', "21.0.3");
|
|
52
52
|
return headers;
|
|
53
53
|
};
|
|
54
54
|
export function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React, { useEffect } from 'react';
|
|
2
2
|
import Button from '@atlaskit/button/standard-button';
|
|
3
3
|
import IconError from '@atlaskit/icon/glyph/cross-circle';
|
|
4
|
-
import {
|
|
4
|
+
import { Text } from '@atlaskit/primitives';
|
|
5
|
+
import { ErrorTitle, ErrorWrapper } from '../../styled/Error';
|
|
5
6
|
import { profileCardRendered } from '../../util/analytics';
|
|
6
7
|
var ErrorMessage = function ErrorMessage(props) {
|
|
7
8
|
var errorType = props.errorType || {
|
|
@@ -21,7 +22,9 @@ var ErrorMessage = function ErrorMessage(props) {
|
|
|
21
22
|
if (errorReason === 'NotFound') {
|
|
22
23
|
return /*#__PURE__*/React.createElement(ErrorTitle, null, "The user is no longer available for the site");
|
|
23
24
|
}
|
|
24
|
-
return /*#__PURE__*/React.createElement(ErrorTitle, null, "Oops, looks like we\u2019re having issues", /*#__PURE__*/React.createElement("br", null), reload && /*#__PURE__*/React.createElement(
|
|
25
|
+
return /*#__PURE__*/React.createElement(ErrorTitle, null, "Oops, looks like we\u2019re having issues", /*#__PURE__*/React.createElement("br", null), reload && /*#__PURE__*/React.createElement(Text, {
|
|
26
|
+
color: "color.text.subtlest"
|
|
27
|
+
}, "Try again and we\u2019ll give it another shot"));
|
|
25
28
|
};
|
|
26
29
|
return /*#__PURE__*/React.createElement(ErrorWrapper, {
|
|
27
30
|
"data-testid": "profilecard-error"
|
|
@@ -15,12 +15,12 @@ import { LinkItem, MenuGroup } from '@atlaskit/menu';
|
|
|
15
15
|
import { VerifiedTeamIcon } from '@atlaskit/people-teams-ui-public/verified-team-icon';
|
|
16
16
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
17
|
import Popup from '@atlaskit/popup';
|
|
18
|
-
import { Inline } from '@atlaskit/primitives';
|
|
18
|
+
import { Inline, Text } from '@atlaskit/primitives';
|
|
19
19
|
import { layers } from '@atlaskit/theme/constants';
|
|
20
20
|
import Tooltip from '@atlaskit/tooltip';
|
|
21
21
|
import messages from '../../messages';
|
|
22
22
|
import { AnimatedKudosButton, AnimationWrapper, KudosBlobAnimation } from '../../styled/Card';
|
|
23
|
-
import { ErrorWrapper, TeamErrorText
|
|
23
|
+
import { ErrorWrapper, TeamErrorText } from '../../styled/Error';
|
|
24
24
|
import { ActionButtons, AvatarSection, CardContent, CardHeader, CardWrapper, Description, DescriptionWrapper, MemberCount, MoreButton, TeamName, WrappedButton } from '../../styled/TeamCard';
|
|
25
25
|
import { actionClicked, errorRetryClicked, moreActionsClicked, moreMembersClicked, profileCardRendered, teamAvatarClicked } from '../../util/analytics';
|
|
26
26
|
import { isBasicClick } from '../../util/click';
|
|
@@ -283,7 +283,10 @@ var ErrorMessage = function ErrorMessage(_ref6) {
|
|
|
283
283
|
}, [analytics, clientFetchProfile]);
|
|
284
284
|
return /*#__PURE__*/React.createElement(ErrorWrapper, {
|
|
285
285
|
"data-testid": "team-profilecard-error"
|
|
286
|
-
}, /*#__PURE__*/React.createElement(ErrorIllustration, null), /*#__PURE__*/React.createElement(
|
|
286
|
+
}, /*#__PURE__*/React.createElement(ErrorIllustration, null), /*#__PURE__*/React.createElement(Text, {
|
|
287
|
+
as: "p",
|
|
288
|
+
weight: "semibold"
|
|
289
|
+
}, /*#__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(LoadingButton, {
|
|
287
290
|
testId: "client-fetch-profile-button",
|
|
288
291
|
shouldFitContainer: true,
|
|
289
292
|
onClick: retry,
|
package/dist/esm/styled/Error.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
3
|
import { N200 } from '@atlaskit/theme/colors';
|
|
4
|
-
import {
|
|
5
|
-
import { h400 } from '@atlaskit/theme/typography';
|
|
6
|
-
import { errorIconColor, errorTextColor, errorTitleColor } from './constants';
|
|
4
|
+
import { errorIconColor, errorTitleColor } from './constants';
|
|
7
5
|
|
|
8
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
9
7
|
export var ErrorWrapper = styled.div({
|
|
@@ -15,22 +13,12 @@ export var ErrorWrapper = styled.div({
|
|
|
15
13
|
|
|
16
14
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
17
15
|
export var ErrorTitle = styled.p({
|
|
16
|
+
font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
18
17
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
19
18
|
color: errorTitleColor,
|
|
20
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
21
|
-
lineHeight: "".concat(gridSize() * 3, "px"),
|
|
22
19
|
margin: "var(--ds-space-100, 8px)".concat(" 0")
|
|
23
20
|
});
|
|
24
21
|
|
|
25
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
26
|
-
export var ErrorText = styled.span({
|
|
27
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
28
|
-
color: errorTextColor
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
32
|
-
export var TeamErrorTitle = styled.p(h400);
|
|
33
|
-
|
|
34
22
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
35
23
|
export var TeamErrorText = styled.p({
|
|
36
24
|
color: "var(--ds-text-subtlest, ".concat(N200, ")"),
|
|
@@ -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: "21.0.
|
|
42
|
+
packageVersion: "21.0.3"
|
|
43
43
|
}, attributes), {}, {
|
|
44
44
|
firedAt: Math.round(getPageTime())
|
|
45
45
|
})
|
|
@@ -7,14 +7,6 @@ export declare const ErrorTitle: import("@emotion/styled").StyledComponent<{
|
|
|
7
7
|
theme?: import("@emotion/react").Theme | undefined;
|
|
8
8
|
as?: import("react").ElementType<any> | undefined;
|
|
9
9
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, {}>;
|
|
10
|
-
export declare const ErrorText: import("@emotion/styled").StyledComponent<{
|
|
11
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
12
|
-
as?: import("react").ElementType<any> | undefined;
|
|
13
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
14
|
-
export declare const TeamErrorTitle: import("@emotion/styled").StyledComponent<{
|
|
15
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
16
|
-
as?: import("react").ElementType<any> | undefined;
|
|
17
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, {}>;
|
|
18
10
|
export declare const TeamErrorText: import("@emotion/styled").StyledComponent<{
|
|
19
11
|
theme?: import("@emotion/react").Theme | undefined;
|
|
20
12
|
as?: import("react").ElementType<any> | undefined;
|
|
@@ -7,14 +7,6 @@ export declare const ErrorTitle: import("@emotion/styled").StyledComponent<{
|
|
|
7
7
|
theme?: import("@emotion/react").Theme | undefined;
|
|
8
8
|
as?: import("react").ElementType<any> | undefined;
|
|
9
9
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, {}>;
|
|
10
|
-
export declare const ErrorText: import("@emotion/styled").StyledComponent<{
|
|
11
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
12
|
-
as?: import("react").ElementType<any> | undefined;
|
|
13
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
14
|
-
export declare const TeamErrorTitle: import("@emotion/styled").StyledComponent<{
|
|
15
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
16
|
-
as?: import("react").ElementType<any> | undefined;
|
|
17
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, {}>;
|
|
18
10
|
export declare const TeamErrorText: import("@emotion/styled").StyledComponent<{
|
|
19
11
|
theme?: import("@emotion/react").Theme | undefined;
|
|
20
12
|
as?: import("react").ElementType<any> | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/profilecard",
|
|
3
|
-
"version": "21.0.
|
|
3
|
+
"version": "21.0.3",
|
|
4
4
|
"description": "A React component to display a card with user information.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -88,7 +88,6 @@
|
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|
|
90
90
|
"@af/visual-regression": "*",
|
|
91
|
-
"@atlassian/a11y-jest-testing": "*",
|
|
92
91
|
"@atlassian/feature-flags-test-utils": "*",
|
|
93
92
|
"@atlassian/ptc-test-utils": "^0.8.0",
|
|
94
93
|
"@testing-library/react": "^12.1.5",
|