@atlaskit/profilecard 23.1.0 → 23.2.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/dist/cjs/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/cjs/client/getTeamFromAGG.js +1 -1
- package/dist/cjs/components/Error/ErrorMessage.js +13 -2
- package/dist/cjs/styled/CoverImage.compiled.css +12 -0
- package/dist/cjs/styled/CoverImage.js +40 -0
- package/dist/cjs/styled/TeamCard.compiled.css +0 -3
- package/dist/cjs/styled/TeamCard.js +4 -6
- 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 +12 -1
- package/dist/es2019/styled/CoverImage.compiled.css +12 -0
- package/dist/es2019/styled/CoverImage.js +31 -0
- package/dist/es2019/styled/TeamCard.compiled.css +0 -3
- package/dist/es2019/styled/TeamCard.js +4 -6
- 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 +12 -1
- package/dist/esm/styled/CoverImage.compiled.css +12 -0
- package/dist/esm/styled/CoverImage.js +31 -0
- package/dist/esm/styled/TeamCard.compiled.css +0 -3
- package/dist/esm/styled/TeamCard.js +4 -6
- package/dist/esm/util/analytics.js +1 -1
- package/dist/types/styled/CoverImage.d.ts +10 -0
- package/dist/types-ts4.5/styled/CoverImage.d.ts +10 -0
- package/package.json +8 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/profilecard
|
|
2
2
|
|
|
3
|
+
## 23.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#117986](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/117986)
|
|
8
|
+
[`65187910ea922`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/65187910ea922) -
|
|
9
|
+
[ux] Migrate legacy icons [ENGHEALTH-23682]
|
|
10
|
+
|
|
11
|
+
## 23.1.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#118134](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/118134)
|
|
16
|
+
[`a1a66a777882a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a1a66a777882a) -
|
|
17
|
+
Fix for team profilecard header image in compiled
|
|
18
|
+
|
|
3
19
|
## 23.1.0
|
|
4
20
|
|
|
5
21
|
### Minor 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', "23.
|
|
14
|
+
headers.append('atl-client-version', "23.2.0");
|
|
15
15
|
return headers;
|
|
16
16
|
};
|
|
17
17
|
function getOrgIdForCloudIdFromAGG(_x, _x2) {
|
|
@@ -66,7 +66,7 @@ var addHeaders = exports.addHeaders = function addHeaders(headers) {
|
|
|
66
66
|
headers.append('X-ExperimentalApi', 'teams-beta');
|
|
67
67
|
headers.append('X-ExperimentalApi', 'team-members-beta');
|
|
68
68
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
69
|
-
headers.append('atl-client-version', "23.
|
|
69
|
+
headers.append('atl-client-version', "23.2.0");
|
|
70
70
|
return headers;
|
|
71
71
|
};
|
|
72
72
|
function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -8,7 +8,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _standardButton = _interopRequireDefault(require("@atlaskit/button/standard-button"));
|
|
11
|
-
var
|
|
11
|
+
var _icon = require("@atlaskit/icon");
|
|
12
|
+
var _crossCircle = _interopRequireDefault(require("@atlaskit/icon/core/migration/cross-circle"));
|
|
13
|
+
var _crossCircle2 = _interopRequireDefault(require("@atlaskit/icon/glyph/cross-circle"));
|
|
14
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
15
|
var _primitives = require("@atlaskit/primitives");
|
|
13
16
|
var _Error = require("../../styled/Error");
|
|
14
17
|
var _analytics = require("../../util/analytics");
|
|
@@ -38,7 +41,15 @@ var ErrorMessage = function ErrorMessage(props) {
|
|
|
38
41
|
};
|
|
39
42
|
return /*#__PURE__*/_react.default.createElement(_Error.ErrorWrapper, {
|
|
40
43
|
testId: "profilecard-error"
|
|
41
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
44
|
+
}, (0, _platformFeatureFlags.fg)('ptc-migrate-legacy-icons-profilecard') ? /*#__PURE__*/_react.default.createElement(_icon.IconTile, {
|
|
45
|
+
icon: _crossCircle.default,
|
|
46
|
+
label: "icon error",
|
|
47
|
+
size: "48",
|
|
48
|
+
appearance: 'gray'
|
|
49
|
+
}) :
|
|
50
|
+
/*#__PURE__*/
|
|
51
|
+
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
|
|
52
|
+
_react.default.createElement(_crossCircle2.default, {
|
|
42
53
|
label: "icon error",
|
|
43
54
|
size: "xlarge"
|
|
44
55
|
}), errorContent(), reload && /*#__PURE__*/_react.default.createElement(_standardButton.default, {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
._13liglpi{border-top-left-radius:var(--ds-border-radius,4px)}
|
|
2
|
+
._18m915vq{overflow-y:hidden}
|
|
3
|
+
._1bah1h6o{justify-content:center}
|
|
4
|
+
._1bsb1osq{width:100%}
|
|
5
|
+
._1bsbnklw{width:20pc}
|
|
6
|
+
._1e0c1txw{display:flex}
|
|
7
|
+
._1reo15vq{overflow-x:hidden}
|
|
8
|
+
._4cvr1h6o{align-items:center}
|
|
9
|
+
._4t3i1qr7{height:8pc}
|
|
10
|
+
._4t3i1wug{height:auto}
|
|
11
|
+
._kqswh2mm{position:relative}
|
|
12
|
+
._qrwqglpi{border-top-right-radius:var(--ds-border-radius,4px)}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/* CoverImage.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.CoverImage = void 0;
|
|
9
|
+
require("./CoverImage.compiled.css");
|
|
10
|
+
var _runtime = require("@compiled/react/runtime");
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _compiled = require("@atlaskit/primitives/compiled");
|
|
13
|
+
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); }
|
|
14
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
15
|
+
var styles = {
|
|
16
|
+
container: "_1reo15vq _18m915vq _1bsb1osq _4t3i1qr7 _kqswh2mm _13liglpi _qrwqglpi _1e0c1txw _1bah1h6o _4cvr1h6o",
|
|
17
|
+
image: "_1bsbnklw _4t3i1wug"
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* This is instead of using background-image in CSS as design-system doesn't support that
|
|
22
|
+
*/
|
|
23
|
+
var CoverImage = exports.CoverImage = function CoverImage(_ref) {
|
|
24
|
+
var src = _ref.src,
|
|
25
|
+
_ref$alt = _ref.alt,
|
|
26
|
+
alt = _ref$alt === void 0 ? '' : _ref$alt;
|
|
27
|
+
var containerRef = (0, _react.useRef)(null);
|
|
28
|
+
var imgRef = (0, _react.useRef)(null);
|
|
29
|
+
return /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
30
|
+
ref: containerRef,
|
|
31
|
+
xcss: styles.container,
|
|
32
|
+
backgroundColor: "color.background.neutral"
|
|
33
|
+
}, /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
34
|
+
as: "img",
|
|
35
|
+
ref: imgRef,
|
|
36
|
+
src: src,
|
|
37
|
+
alt: alt,
|
|
38
|
+
xcss: styles.image
|
|
39
|
+
}));
|
|
40
|
+
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
._11c8o0gd{font:var(--ds-font-heading-medium,normal 500 20px/24px ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,system-ui,"Helvetica Neue",sans-serif)}
|
|
2
2
|
._2rkoglpi{border-radius:var(--ds-border-radius,4px)}
|
|
3
|
-
._12vemgnk{background-repeat:no-repeat}
|
|
4
3
|
._16jlkb7n{flex-grow:1}
|
|
5
4
|
._18m915vq{overflow-y:hidden}
|
|
6
5
|
._18u01i6y{margin-left:var(--ds-space-negative-025,-2px)}
|
|
@@ -17,7 +16,6 @@
|
|
|
17
16
|
._1e0c1kw7{display:inherit}
|
|
18
17
|
._1e0c1txw{display:flex}
|
|
19
18
|
._1e0ccj1k{display:-webkit-box}
|
|
20
|
-
._1lrw1dfr{background-size:cover}
|
|
21
19
|
._1p1dglyw{text-transform:none}
|
|
22
20
|
._1reo15vq{overflow-x:hidden}
|
|
23
21
|
._1tke1l8a{min-height:78pt}
|
|
@@ -34,7 +32,6 @@
|
|
|
34
32
|
._otyr1ejb{margin-bottom:var(--ds-space-300,24px)}
|
|
35
33
|
._otyr1jfw{margin-bottom:var(--ds-space-500,40px)}
|
|
36
34
|
._otyridpf{margin-bottom:0}
|
|
37
|
-
._ouxl1ssb{background-position:50%}
|
|
38
35
|
._syaz1wmz{color:var(--ds-text-subtlest,#6b778c)}
|
|
39
36
|
._u5f31ejb{padding-right:var(--ds-space-300,24px)}
|
|
40
37
|
._y3gn1h6o{text-align:center}
|
|
@@ -18,12 +18,13 @@ var _compiled = require("@atlaskit/primitives/compiled");
|
|
|
18
18
|
var _colors = require("@atlaskit/theme/colors");
|
|
19
19
|
var _constants = require("@atlaskit/theme/constants");
|
|
20
20
|
var _constants2 = require("./constants");
|
|
21
|
+
var _CoverImage = require("./CoverImage");
|
|
21
22
|
var _templateObject; // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
22
23
|
var styles = {
|
|
23
24
|
cardtriggerwrapper: "_1e0c1kw7",
|
|
24
25
|
cardwrapper: "_2rkoglpi _1bsbnklw _kqswh2mm",
|
|
25
26
|
teamforbiddenerrorstatewrapper: "_1bsbnklw _kqswh2mm",
|
|
26
|
-
cardheader: "
|
|
27
|
+
cardheader: "_4t3i1qr7 _1bsb1osq",
|
|
27
28
|
cardcontent: "_1e0c1txw _2lx21bp4 _ca0q1ejb _u5f31ejb _n3td1ejb _19bv1ejb _1tke1l8a",
|
|
28
29
|
teamname: "_11c8o0gd _1reo15vq _18m915vq _1p1dglyw _c71lckbl _1e0ccj1k",
|
|
29
30
|
membercount: "_syaz1wmz _19pk1b66",
|
|
@@ -88,12 +89,9 @@ var CardHeader = exports.CardHeader = function CardHeader(_ref2) {
|
|
|
88
89
|
return (0, _platformFeatureFlags.fg)('compiled-migration-profilecard') ? isLoading || !image ? /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
89
90
|
xcss: (0, _css.cx)(styles.cardheader),
|
|
90
91
|
backgroundColor: "color.background.neutral"
|
|
91
|
-
}) : /*#__PURE__*/_react.default.createElement(
|
|
92
|
-
as: "img",
|
|
92
|
+
}) : /*#__PURE__*/_react.default.createElement(_CoverImage.CoverImage, {
|
|
93
93
|
alt: label || '',
|
|
94
|
-
src: image
|
|
95
|
-
xcss: (0, _css.cx)(styles.cardheader),
|
|
96
|
-
backgroundColor: "color.background.neutral"
|
|
94
|
+
src: image
|
|
97
95
|
}) : /*#__PURE__*/_react.default.createElement(CardHeaderLegacy, {
|
|
98
96
|
image: image,
|
|
99
97
|
isLoading: isLoading
|
|
@@ -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.
|
|
48
|
+
packageVersion: "23.2.0"
|
|
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', "23.
|
|
9
|
+
headers.append('atl-client-version', "23.2.0");
|
|
10
10
|
return headers;
|
|
11
11
|
};
|
|
12
12
|
export async function getOrgIdForCloudIdFromAGG(url, cloudId) {
|
|
@@ -75,7 +75,7 @@ export const addHeaders = headers => {
|
|
|
75
75
|
headers.append('X-ExperimentalApi', 'teams-beta');
|
|
76
76
|
headers.append('X-ExperimentalApi', 'team-members-beta');
|
|
77
77
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
78
|
-
headers.append('atl-client-version', "23.
|
|
78
|
+
headers.append('atl-client-version', "23.2.0");
|
|
79
79
|
return headers;
|
|
80
80
|
};
|
|
81
81
|
export async function getTeamFromAGG(url, teamId, siteId) {
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import React, { useEffect } from 'react';
|
|
2
2
|
import Button from '@atlaskit/button/standard-button';
|
|
3
|
+
import { IconTile } from '@atlaskit/icon';
|
|
4
|
+
import CrossCircleIcon from '@atlaskit/icon/core/migration/cross-circle';
|
|
3
5
|
import IconError from '@atlaskit/icon/glyph/cross-circle';
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
7
|
import { Text } from '@atlaskit/primitives';
|
|
5
8
|
import { ErrorTitle, ErrorWrapper } from '../../styled/Error';
|
|
6
9
|
import { profileCardRendered } from '../../util/analytics';
|
|
@@ -30,7 +33,15 @@ const ErrorMessage = props => {
|
|
|
30
33
|
};
|
|
31
34
|
return /*#__PURE__*/React.createElement(ErrorWrapper, {
|
|
32
35
|
testId: "profilecard-error"
|
|
33
|
-
}, /*#__PURE__*/React.createElement(
|
|
36
|
+
}, fg('ptc-migrate-legacy-icons-profilecard') ? /*#__PURE__*/React.createElement(IconTile, {
|
|
37
|
+
icon: CrossCircleIcon,
|
|
38
|
+
label: "icon error",
|
|
39
|
+
size: "48",
|
|
40
|
+
appearance: 'gray'
|
|
41
|
+
}) :
|
|
42
|
+
/*#__PURE__*/
|
|
43
|
+
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
|
|
44
|
+
React.createElement(IconError, {
|
|
34
45
|
label: "icon error",
|
|
35
46
|
size: "xlarge"
|
|
36
47
|
}), errorContent(), reload && /*#__PURE__*/React.createElement(Button, {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
._13liglpi{border-top-left-radius:var(--ds-border-radius,4px)}
|
|
2
|
+
._18m915vq{overflow-y:hidden}
|
|
3
|
+
._1bah1h6o{justify-content:center}
|
|
4
|
+
._1bsb1osq{width:100%}
|
|
5
|
+
._1bsbnklw{width:20pc}
|
|
6
|
+
._1e0c1txw{display:flex}
|
|
7
|
+
._1reo15vq{overflow-x:hidden}
|
|
8
|
+
._4cvr1h6o{align-items:center}
|
|
9
|
+
._4t3i1qr7{height:8pc}
|
|
10
|
+
._4t3i1wug{height:auto}
|
|
11
|
+
._kqswh2mm{position:relative}
|
|
12
|
+
._qrwqglpi{border-top-right-radius:var(--ds-border-radius,4px)}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* CoverImage.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
+
import "./CoverImage.compiled.css";
|
|
3
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
4
|
+
import React, { useRef } from 'react';
|
|
5
|
+
import { Box } from '@atlaskit/primitives/compiled';
|
|
6
|
+
const styles = {
|
|
7
|
+
container: "_1reo15vq _18m915vq _1bsb1osq _4t3i1qr7 _kqswh2mm _13liglpi _qrwqglpi _1e0c1txw _1bah1h6o _4cvr1h6o",
|
|
8
|
+
image: "_1bsbnklw _4t3i1wug"
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* This is instead of using background-image in CSS as design-system doesn't support that
|
|
13
|
+
*/
|
|
14
|
+
export const CoverImage = ({
|
|
15
|
+
src,
|
|
16
|
+
alt = ''
|
|
17
|
+
}) => {
|
|
18
|
+
const containerRef = useRef(null);
|
|
19
|
+
const imgRef = useRef(null);
|
|
20
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
21
|
+
ref: containerRef,
|
|
22
|
+
xcss: styles.container,
|
|
23
|
+
backgroundColor: "color.background.neutral"
|
|
24
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
25
|
+
as: "img",
|
|
26
|
+
ref: imgRef,
|
|
27
|
+
src: src,
|
|
28
|
+
alt: alt,
|
|
29
|
+
xcss: styles.image
|
|
30
|
+
}));
|
|
31
|
+
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
._11c8o0gd{font:var(--ds-font-heading-medium,normal 500 20px/24px ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,system-ui,"Helvetica Neue",sans-serif)}
|
|
2
2
|
._2rkoglpi{border-radius:var(--ds-border-radius,4px)}
|
|
3
|
-
._12vemgnk{background-repeat:no-repeat}
|
|
4
3
|
._16jlkb7n{flex-grow:1}
|
|
5
4
|
._18m915vq{overflow-y:hidden}
|
|
6
5
|
._18u01i6y{margin-left:var(--ds-space-negative-025,-2px)}
|
|
@@ -17,7 +16,6 @@
|
|
|
17
16
|
._1e0c1kw7{display:inherit}
|
|
18
17
|
._1e0c1txw{display:flex}
|
|
19
18
|
._1e0ccj1k{display:-webkit-box}
|
|
20
|
-
._1lrw1dfr{background-size:cover}
|
|
21
19
|
._1p1dglyw{text-transform:none}
|
|
22
20
|
._1reo15vq{overflow-x:hidden}
|
|
23
21
|
._1tke1l8a{min-height:78pt}
|
|
@@ -34,7 +32,6 @@
|
|
|
34
32
|
._otyr1ejb{margin-bottom:var(--ds-space-300,24px)}
|
|
35
33
|
._otyr1jfw{margin-bottom:var(--ds-space-500,40px)}
|
|
36
34
|
._otyridpf{margin-bottom:0}
|
|
37
|
-
._ouxl1ssb{background-position:50%}
|
|
38
35
|
._syaz1wmz{color:var(--ds-text-subtlest,#6b778c)}
|
|
39
36
|
._u5f31ejb{padding-right:var(--ds-space-300,24px)}
|
|
40
37
|
._y3gn1h6o{text-align:center}
|
|
@@ -12,11 +12,12 @@ import { Box, Text } from '@atlaskit/primitives/compiled';
|
|
|
12
12
|
import { N20, N200 } from '@atlaskit/theme/colors';
|
|
13
13
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
14
14
|
import { bgColor, teamHeaderBgColor } from './constants';
|
|
15
|
+
import { CoverImage } from './CoverImage';
|
|
15
16
|
const styles = {
|
|
16
17
|
cardtriggerwrapper: "_1e0c1kw7",
|
|
17
18
|
cardwrapper: "_2rkoglpi _1bsbnklw _kqswh2mm",
|
|
18
19
|
teamforbiddenerrorstatewrapper: "_1bsbnklw _kqswh2mm",
|
|
19
|
-
cardheader: "
|
|
20
|
+
cardheader: "_4t3i1qr7 _1bsb1osq",
|
|
20
21
|
cardcontent: "_1e0c1txw _2lx21bp4 _ca0q1ejb _u5f31ejb _n3td1ejb _19bv1ejb _1tke1l8a",
|
|
21
22
|
teamname: "_11c8o0gd _1reo15vq _18m915vq _1p1dglyw _c71lckbl _1e0ccj1k",
|
|
22
23
|
membercount: "_syaz1wmz _19pk1b66",
|
|
@@ -76,12 +77,9 @@ export const CardHeader = ({
|
|
|
76
77
|
}) => fg('compiled-migration-profilecard') ? isLoading || !image ? /*#__PURE__*/React.createElement(Box, {
|
|
77
78
|
xcss: cx(styles.cardheader),
|
|
78
79
|
backgroundColor: "color.background.neutral"
|
|
79
|
-
}) : /*#__PURE__*/React.createElement(
|
|
80
|
-
as: "img",
|
|
80
|
+
}) : /*#__PURE__*/React.createElement(CoverImage, {
|
|
81
81
|
alt: label || '',
|
|
82
|
-
src: image
|
|
83
|
-
xcss: cx(styles.cardheader),
|
|
84
|
-
backgroundColor: "color.background.neutral"
|
|
82
|
+
src: image
|
|
85
83
|
}) : /*#__PURE__*/React.createElement(CardHeaderLegacy, {
|
|
86
84
|
image: image,
|
|
87
85
|
isLoading: isLoading
|
|
@@ -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.
|
|
35
|
+
packageVersion: "23.2.0",
|
|
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', "23.
|
|
7
|
+
headers.append('atl-client-version', "23.2.0");
|
|
8
8
|
return headers;
|
|
9
9
|
};
|
|
10
10
|
export function getOrgIdForCloudIdFromAGG(_x, _x2) {
|
|
@@ -57,7 +57,7 @@ export var 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', "23.
|
|
60
|
+
headers.append('atl-client-version', "23.2.0");
|
|
61
61
|
return headers;
|
|
62
62
|
};
|
|
63
63
|
export function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import React, { useEffect } from 'react';
|
|
2
2
|
import Button from '@atlaskit/button/standard-button';
|
|
3
|
+
import { IconTile } from '@atlaskit/icon';
|
|
4
|
+
import CrossCircleIcon from '@atlaskit/icon/core/migration/cross-circle';
|
|
3
5
|
import IconError from '@atlaskit/icon/glyph/cross-circle';
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
7
|
import { Text } from '@atlaskit/primitives';
|
|
5
8
|
import { ErrorTitle, ErrorWrapper } from '../../styled/Error';
|
|
6
9
|
import { profileCardRendered } from '../../util/analytics';
|
|
@@ -28,7 +31,15 @@ var ErrorMessage = function ErrorMessage(props) {
|
|
|
28
31
|
};
|
|
29
32
|
return /*#__PURE__*/React.createElement(ErrorWrapper, {
|
|
30
33
|
testId: "profilecard-error"
|
|
31
|
-
}, /*#__PURE__*/React.createElement(
|
|
34
|
+
}, fg('ptc-migrate-legacy-icons-profilecard') ? /*#__PURE__*/React.createElement(IconTile, {
|
|
35
|
+
icon: CrossCircleIcon,
|
|
36
|
+
label: "icon error",
|
|
37
|
+
size: "48",
|
|
38
|
+
appearance: 'gray'
|
|
39
|
+
}) :
|
|
40
|
+
/*#__PURE__*/
|
|
41
|
+
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
|
|
42
|
+
React.createElement(IconError, {
|
|
32
43
|
label: "icon error",
|
|
33
44
|
size: "xlarge"
|
|
34
45
|
}), errorContent(), reload && /*#__PURE__*/React.createElement(Button, {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
._13liglpi{border-top-left-radius:var(--ds-border-radius,4px)}
|
|
2
|
+
._18m915vq{overflow-y:hidden}
|
|
3
|
+
._1bah1h6o{justify-content:center}
|
|
4
|
+
._1bsb1osq{width:100%}
|
|
5
|
+
._1bsbnklw{width:20pc}
|
|
6
|
+
._1e0c1txw{display:flex}
|
|
7
|
+
._1reo15vq{overflow-x:hidden}
|
|
8
|
+
._4cvr1h6o{align-items:center}
|
|
9
|
+
._4t3i1qr7{height:8pc}
|
|
10
|
+
._4t3i1wug{height:auto}
|
|
11
|
+
._kqswh2mm{position:relative}
|
|
12
|
+
._qrwqglpi{border-top-right-radius:var(--ds-border-radius,4px)}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* CoverImage.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
+
import "./CoverImage.compiled.css";
|
|
3
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
4
|
+
import React, { useRef } from 'react';
|
|
5
|
+
import { Box } from '@atlaskit/primitives/compiled';
|
|
6
|
+
var styles = {
|
|
7
|
+
container: "_1reo15vq _18m915vq _1bsb1osq _4t3i1qr7 _kqswh2mm _13liglpi _qrwqglpi _1e0c1txw _1bah1h6o _4cvr1h6o",
|
|
8
|
+
image: "_1bsbnklw _4t3i1wug"
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* This is instead of using background-image in CSS as design-system doesn't support that
|
|
13
|
+
*/
|
|
14
|
+
export var CoverImage = function CoverImage(_ref) {
|
|
15
|
+
var src = _ref.src,
|
|
16
|
+
_ref$alt = _ref.alt,
|
|
17
|
+
alt = _ref$alt === void 0 ? '' : _ref$alt;
|
|
18
|
+
var containerRef = useRef(null);
|
|
19
|
+
var imgRef = useRef(null);
|
|
20
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
21
|
+
ref: containerRef,
|
|
22
|
+
xcss: styles.container,
|
|
23
|
+
backgroundColor: "color.background.neutral"
|
|
24
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
25
|
+
as: "img",
|
|
26
|
+
ref: imgRef,
|
|
27
|
+
src: src,
|
|
28
|
+
alt: alt,
|
|
29
|
+
xcss: styles.image
|
|
30
|
+
}));
|
|
31
|
+
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
._11c8o0gd{font:var(--ds-font-heading-medium,normal 500 20px/24px ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,system-ui,"Helvetica Neue",sans-serif)}
|
|
2
2
|
._2rkoglpi{border-radius:var(--ds-border-radius,4px)}
|
|
3
|
-
._12vemgnk{background-repeat:no-repeat}
|
|
4
3
|
._16jlkb7n{flex-grow:1}
|
|
5
4
|
._18m915vq{overflow-y:hidden}
|
|
6
5
|
._18u01i6y{margin-left:var(--ds-space-negative-025,-2px)}
|
|
@@ -17,7 +16,6 @@
|
|
|
17
16
|
._1e0c1kw7{display:inherit}
|
|
18
17
|
._1e0c1txw{display:flex}
|
|
19
18
|
._1e0ccj1k{display:-webkit-box}
|
|
20
|
-
._1lrw1dfr{background-size:cover}
|
|
21
19
|
._1p1dglyw{text-transform:none}
|
|
22
20
|
._1reo15vq{overflow-x:hidden}
|
|
23
21
|
._1tke1l8a{min-height:78pt}
|
|
@@ -34,7 +32,6 @@
|
|
|
34
32
|
._otyr1ejb{margin-bottom:var(--ds-space-300,24px)}
|
|
35
33
|
._otyr1jfw{margin-bottom:var(--ds-space-500,40px)}
|
|
36
34
|
._otyridpf{margin-bottom:0}
|
|
37
|
-
._ouxl1ssb{background-position:50%}
|
|
38
35
|
._syaz1wmz{color:var(--ds-text-subtlest,#6b778c)}
|
|
39
36
|
._u5f31ejb{padding-right:var(--ds-space-300,24px)}
|
|
40
37
|
._y3gn1h6o{text-align:center}
|
|
@@ -14,11 +14,12 @@ import { Box, Text } from '@atlaskit/primitives/compiled';
|
|
|
14
14
|
import { N20, N200 } from '@atlaskit/theme/colors';
|
|
15
15
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
16
16
|
import { bgColor, teamHeaderBgColor } from './constants';
|
|
17
|
+
import { CoverImage } from './CoverImage';
|
|
17
18
|
var styles = {
|
|
18
19
|
cardtriggerwrapper: "_1e0c1kw7",
|
|
19
20
|
cardwrapper: "_2rkoglpi _1bsbnklw _kqswh2mm",
|
|
20
21
|
teamforbiddenerrorstatewrapper: "_1bsbnklw _kqswh2mm",
|
|
21
|
-
cardheader: "
|
|
22
|
+
cardheader: "_4t3i1qr7 _1bsb1osq",
|
|
22
23
|
cardcontent: "_1e0c1txw _2lx21bp4 _ca0q1ejb _u5f31ejb _n3td1ejb _19bv1ejb _1tke1l8a",
|
|
23
24
|
teamname: "_11c8o0gd _1reo15vq _18m915vq _1p1dglyw _c71lckbl _1e0ccj1k",
|
|
24
25
|
membercount: "_syaz1wmz _19pk1b66",
|
|
@@ -83,12 +84,9 @@ export var CardHeader = function CardHeader(_ref2) {
|
|
|
83
84
|
return fg('compiled-migration-profilecard') ? isLoading || !image ? /*#__PURE__*/React.createElement(Box, {
|
|
84
85
|
xcss: cx(styles.cardheader),
|
|
85
86
|
backgroundColor: "color.background.neutral"
|
|
86
|
-
}) : /*#__PURE__*/React.createElement(
|
|
87
|
-
as: "img",
|
|
87
|
+
}) : /*#__PURE__*/React.createElement(CoverImage, {
|
|
88
88
|
alt: label || '',
|
|
89
|
-
src: image
|
|
90
|
-
xcss: cx(styles.cardheader),
|
|
91
|
-
backgroundColor: "color.background.neutral"
|
|
89
|
+
src: image
|
|
92
90
|
}) : /*#__PURE__*/React.createElement(CardHeaderLegacy, {
|
|
93
91
|
image: image,
|
|
94
92
|
isLoading: isLoading
|
|
@@ -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.
|
|
42
|
+
packageVersion: "23.2.0"
|
|
43
43
|
}, attributes), {}, {
|
|
44
44
|
firedAt: Math.round(getPageTime())
|
|
45
45
|
})
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface CoverImageProps {
|
|
3
|
+
src: string;
|
|
4
|
+
alt?: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* This is instead of using background-image in CSS as design-system doesn't support that
|
|
8
|
+
*/
|
|
9
|
+
export declare const CoverImage: ({ src, alt }: CoverImageProps) => React.JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface CoverImageProps {
|
|
3
|
+
src: string;
|
|
4
|
+
alt?: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* This is instead of using background-image in CSS as design-system doesn't support that
|
|
8
|
+
*/
|
|
9
|
+
export declare const CoverImage: ({ src, alt }: CoverImageProps) => React.JSX.Element;
|
|
10
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/profilecard",
|
|
3
|
-
"version": "23.
|
|
3
|
+
"version": "23.2.0",
|
|
4
4
|
"description": "A React component to display a card with user information.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -60,19 +60,19 @@
|
|
|
60
60
|
"@atlaskit/empty-state": "^9.0.0",
|
|
61
61
|
"@atlaskit/focus-ring": "^3.0.0",
|
|
62
62
|
"@atlaskit/give-kudos": "^4.0.0",
|
|
63
|
-
"@atlaskit/icon": "^24.
|
|
63
|
+
"@atlaskit/icon": "^24.1.0",
|
|
64
64
|
"@atlaskit/lozenge": "^12.0.0",
|
|
65
|
-
"@atlaskit/menu": "^3.
|
|
65
|
+
"@atlaskit/menu": "^3.1.0",
|
|
66
66
|
"@atlaskit/modal-dialog": "^13.0.0",
|
|
67
67
|
"@atlaskit/people-teams-ui-public": "^3.0.0",
|
|
68
68
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
69
69
|
"@atlaskit/popup": "^2.0.0",
|
|
70
|
-
"@atlaskit/primitives": "^14.
|
|
70
|
+
"@atlaskit/primitives": "^14.1.0",
|
|
71
71
|
"@atlaskit/rovo-agent-components": "^2.0.0",
|
|
72
72
|
"@atlaskit/rovo-triggers": "^2.0.0",
|
|
73
73
|
"@atlaskit/spinner": "^18.0.0",
|
|
74
74
|
"@atlaskit/theme": "^17.0.0",
|
|
75
|
-
"@atlaskit/tokens": "^4.
|
|
75
|
+
"@atlaskit/tokens": "^4.2.0",
|
|
76
76
|
"@atlaskit/tooltip": "^20.0.0",
|
|
77
77
|
"@babel/runtime": "^7.0.0",
|
|
78
78
|
"@compiled/react": "^0.18.2",
|
|
@@ -152,6 +152,9 @@
|
|
|
152
152
|
},
|
|
153
153
|
"platform_profilecard-enable_reporting_lines_label": {
|
|
154
154
|
"type": "boolean"
|
|
155
|
+
},
|
|
156
|
+
"ptc-migrate-legacy-icons-profilecard": {
|
|
157
|
+
"type": "boolean"
|
|
155
158
|
}
|
|
156
159
|
}
|
|
157
160
|
}
|