@atlaskit/profilecard 20.13.0 → 20.14.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 +14 -0
- package/afm-jira/tsconfig.json +3 -0
- package/afm-post-office/tsconfig.json +3 -0
- package/dist/cjs/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/cjs/client/getTeamFromAGG.js +1 -1
- package/dist/cjs/components/User/ProfileCardDetails.js +1 -3
- package/dist/cjs/components/User/ProfileCardTrigger.js +11 -5
- 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/User/ProfileCardDetails.js +1 -3
- package/dist/es2019/components/User/ProfileCardTrigger.js +10 -5
- 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/User/ProfileCardDetails.js +1 -3
- package/dist/esm/components/User/ProfileCardTrigger.js +11 -5
- package/dist/esm/util/analytics.js +1 -1
- package/dist/types/components/User/ProfileCardTrigger.d.ts +1 -1
- package/dist/types/types.d.ts +1 -0
- package/dist/types-ts4.5/components/User/ProfileCardTrigger.d.ts +1 -1
- package/dist/types-ts4.5/types.d.ts +1 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/profilecard
|
|
2
2
|
|
|
3
|
+
## 20.14.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#173927](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/173927)
|
|
8
|
+
[`af2002ae95b31`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/af2002ae95b31) -
|
|
9
|
+
Add ariaHideProfileTrigger to hide profile card trigger via aria-hidden="true" and tabIndex="-1"
|
|
10
|
+
|
|
11
|
+
## 20.13.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 20.13.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
package/afm-jira/tsconfig.json
CHANGED
|
@@ -56,6 +56,9 @@
|
|
|
56
56
|
{
|
|
57
57
|
"path": "../../../design-system/modal-dialog/afm-post-office/tsconfig.json"
|
|
58
58
|
},
|
|
59
|
+
{
|
|
60
|
+
"path": "../../people-teams-ui-public/afm-post-office/tsconfig.json"
|
|
61
|
+
},
|
|
59
62
|
{
|
|
60
63
|
"path": "../../../platform/feature-flags/afm-post-office/tsconfig.json"
|
|
61
64
|
},
|
|
@@ -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', "20.
|
|
14
|
+
headers.append('atl-client-version', "20.14.0");
|
|
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', "20.
|
|
60
|
+
headers.append('atl-client-version', "20.14.0");
|
|
61
61
|
return headers;
|
|
62
62
|
};
|
|
63
63
|
function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -26,9 +26,7 @@ var fullNameLabelStyles = (0, _primitives.xcss)({
|
|
|
26
26
|
overflow: 'hidden',
|
|
27
27
|
textOverflow: 'ellipsis',
|
|
28
28
|
whiteSpace: 'nowrap',
|
|
29
|
-
|
|
30
|
-
letterSpacing: 'normal',
|
|
31
|
-
lineHeight: "".concat(24 / 18, "em")
|
|
29
|
+
font: "var(--ds-font-body-large, normal 400 16px/24px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
|
|
32
30
|
});
|
|
33
31
|
var noMetaLabelStyles = (0, _primitives.xcss)({
|
|
34
32
|
marginTop: 'space.400',
|
|
@@ -94,7 +94,9 @@ function ProfilecardTriggerNext(_ref2) {
|
|
|
94
94
|
offset = _ref2.offset,
|
|
95
95
|
viewingUserId = _ref2.viewingUserId,
|
|
96
96
|
product = _ref2.product,
|
|
97
|
-
agentActions = _ref2.agentActions
|
|
97
|
+
agentActions = _ref2.agentActions,
|
|
98
|
+
_ref2$ariaHideProfile = _ref2.ariaHideProfileTrigger,
|
|
99
|
+
ariaHideProfileTrigger = _ref2$ariaHideProfile === void 0 ? false : _ref2$ariaHideProfile;
|
|
98
100
|
var _useAnalyticsEvents = (0, _analyticsNext.useAnalyticsEvents)(),
|
|
99
101
|
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
100
102
|
var _useIntl = (0, _reactIntlNext.useIntl)(),
|
|
@@ -372,12 +374,16 @@ function ProfilecardTriggerNext(_ref2) {
|
|
|
372
374
|
restInnerProps = (0, _objectWithoutProperties2.default)(innerProps, _excluded2);
|
|
373
375
|
return /*#__PURE__*/_react.default.createElement("span", (0, _extends2.default)({}, disabledAriaAttributes ? restInnerProps : triggerProps, containerListeners, {
|
|
374
376
|
ref: ref,
|
|
375
|
-
"data-testid": testId
|
|
376
|
-
|
|
377
|
+
"data-testid": testId
|
|
378
|
+
}, !ariaHideProfileTrigger && {
|
|
379
|
+
'aria-labelledby': ariaLabelledBy
|
|
377
380
|
}, disabledAriaAttributes ? {} : {
|
|
378
381
|
role: 'button',
|
|
379
|
-
|
|
380
|
-
|
|
382
|
+
// aria-hidden cannot contain focusable elements: https://dequeuniversity.com/rules/axe/3.5/aria-hidden-focus
|
|
383
|
+
tabIndex: ariaHideProfileTrigger ? -1 : 0,
|
|
384
|
+
'aria-label': ariaHideProfileTrigger ? undefined : (0, _getLabelMessage.default)(ariaLabel, profilecardProps.fullName, formatMessage)
|
|
385
|
+
}, ariaHideProfileTrigger && {
|
|
386
|
+
'aria-hidden': 'true'
|
|
381
387
|
}), children);
|
|
382
388
|
},
|
|
383
389
|
zIndex: _constants.layers.modal(),
|
|
@@ -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: "20.
|
|
48
|
+
packageVersion: "20.14.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', "20.
|
|
9
|
+
headers.append('atl-client-version', "20.14.0");
|
|
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', "20.
|
|
71
|
+
headers.append('atl-client-version', "20.14.0");
|
|
72
72
|
return headers;
|
|
73
73
|
};
|
|
74
74
|
export async function getTeamFromAGG(url, teamId, siteId) {
|
|
@@ -17,9 +17,7 @@ const fullNameLabelStyles = xcss({
|
|
|
17
17
|
overflow: 'hidden',
|
|
18
18
|
textOverflow: 'ellipsis',
|
|
19
19
|
whiteSpace: 'nowrap',
|
|
20
|
-
|
|
21
|
-
letterSpacing: 'normal',
|
|
22
|
-
lineHeight: `${24 / 18}em`
|
|
20
|
+
font: "var(--ds-font-body-large, normal 400 16px/24px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
|
|
23
21
|
});
|
|
24
22
|
const noMetaLabelStyles = xcss({
|
|
25
23
|
marginTop: 'space.400',
|
|
@@ -72,7 +72,8 @@ export default function ProfilecardTriggerNext({
|
|
|
72
72
|
offset,
|
|
73
73
|
viewingUserId,
|
|
74
74
|
product,
|
|
75
|
-
agentActions
|
|
75
|
+
agentActions,
|
|
76
|
+
ariaHideProfileTrigger = false
|
|
76
77
|
}) {
|
|
77
78
|
const {
|
|
78
79
|
createAnalyticsEvent
|
|
@@ -304,12 +305,16 @@ export default function ProfilecardTriggerNext({
|
|
|
304
305
|
} = innerProps;
|
|
305
306
|
return /*#__PURE__*/React.createElement("span", _extends({}, disabledAriaAttributes ? restInnerProps : triggerProps, containerListeners, {
|
|
306
307
|
ref: ref,
|
|
307
|
-
"data-testid": testId
|
|
308
|
-
|
|
308
|
+
"data-testid": testId
|
|
309
|
+
}, !ariaHideProfileTrigger && {
|
|
310
|
+
'aria-labelledby': ariaLabelledBy
|
|
309
311
|
}, disabledAriaAttributes ? {} : {
|
|
310
312
|
role: 'button',
|
|
311
|
-
|
|
312
|
-
|
|
313
|
+
// aria-hidden cannot contain focusable elements: https://dequeuniversity.com/rules/axe/3.5/aria-hidden-focus
|
|
314
|
+
tabIndex: ariaHideProfileTrigger ? -1 : 0,
|
|
315
|
+
'aria-label': ariaHideProfileTrigger ? undefined : getLabelMessage(ariaLabel, profilecardProps.fullName, formatMessage)
|
|
316
|
+
}, ariaHideProfileTrigger && {
|
|
317
|
+
'aria-hidden': 'true'
|
|
313
318
|
}), children);
|
|
314
319
|
},
|
|
315
320
|
zIndex: layers.modal(),
|
|
@@ -32,7 +32,7 @@ const createEvent = (eventType, action, actionSubject, actionSubjectId, attribut
|
|
|
32
32
|
actionSubjectId,
|
|
33
33
|
attributes: {
|
|
34
34
|
packageName: "@atlaskit/profilecard",
|
|
35
|
-
packageVersion: "20.
|
|
35
|
+
packageVersion: "20.14.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', "20.
|
|
7
|
+
headers.append('atl-client-version', "20.14.0");
|
|
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', "20.
|
|
51
|
+
headers.append('atl-client-version', "20.14.0");
|
|
52
52
|
return headers;
|
|
53
53
|
};
|
|
54
54
|
export function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -19,9 +19,7 @@ var fullNameLabelStyles = xcss({
|
|
|
19
19
|
overflow: 'hidden',
|
|
20
20
|
textOverflow: 'ellipsis',
|
|
21
21
|
whiteSpace: 'nowrap',
|
|
22
|
-
|
|
23
|
-
letterSpacing: 'normal',
|
|
24
|
-
lineHeight: "".concat(24 / 18, "em")
|
|
22
|
+
font: "var(--ds-font-body-large, normal 400 16px/24px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
|
|
25
23
|
});
|
|
26
24
|
var noMetaLabelStyles = xcss({
|
|
27
25
|
marginTop: 'space.400',
|
|
@@ -84,7 +84,9 @@ export default function ProfilecardTriggerNext(_ref2) {
|
|
|
84
84
|
offset = _ref2.offset,
|
|
85
85
|
viewingUserId = _ref2.viewingUserId,
|
|
86
86
|
product = _ref2.product,
|
|
87
|
-
agentActions = _ref2.agentActions
|
|
87
|
+
agentActions = _ref2.agentActions,
|
|
88
|
+
_ref2$ariaHideProfile = _ref2.ariaHideProfileTrigger,
|
|
89
|
+
ariaHideProfileTrigger = _ref2$ariaHideProfile === void 0 ? false : _ref2$ariaHideProfile;
|
|
88
90
|
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
89
91
|
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
90
92
|
var _useIntl = useIntl(),
|
|
@@ -362,12 +364,16 @@ export default function ProfilecardTriggerNext(_ref2) {
|
|
|
362
364
|
restInnerProps = _objectWithoutProperties(innerProps, _excluded2);
|
|
363
365
|
return /*#__PURE__*/React.createElement("span", _extends({}, disabledAriaAttributes ? restInnerProps : triggerProps, containerListeners, {
|
|
364
366
|
ref: ref,
|
|
365
|
-
"data-testid": testId
|
|
366
|
-
|
|
367
|
+
"data-testid": testId
|
|
368
|
+
}, !ariaHideProfileTrigger && {
|
|
369
|
+
'aria-labelledby': ariaLabelledBy
|
|
367
370
|
}, disabledAriaAttributes ? {} : {
|
|
368
371
|
role: 'button',
|
|
369
|
-
|
|
370
|
-
|
|
372
|
+
// aria-hidden cannot contain focusable elements: https://dequeuniversity.com/rules/axe/3.5/aria-hidden-focus
|
|
373
|
+
tabIndex: ariaHideProfileTrigger ? -1 : 0,
|
|
374
|
+
'aria-label': ariaHideProfileTrigger ? undefined : getLabelMessage(ariaLabel, profilecardProps.fullName, formatMessage)
|
|
375
|
+
}, ariaHideProfileTrigger && {
|
|
376
|
+
'aria-hidden': 'true'
|
|
371
377
|
}), children);
|
|
372
378
|
},
|
|
373
379
|
zIndex: layers.modal(),
|
|
@@ -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: "20.
|
|
42
|
+
packageVersion: "20.14.0"
|
|
43
43
|
}, attributes), {}, {
|
|
44
44
|
firedAt: Math.round(getPageTime())
|
|
45
45
|
})
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type ProfileCardTriggerProps } from '../../types';
|
|
3
|
-
export default function ProfilecardTriggerNext({ autoFocus, trigger, userId, cloudId, resourceClient, actions, position, children, testId, addFlag, onReportingLinesClick, ariaLabel, ariaLabelledBy, prepopulatedData, disabledAriaAttributes, onVisibilityChange, offset, viewingUserId, product, agentActions, }: ProfileCardTriggerProps): JSX.Element;
|
|
3
|
+
export default function ProfilecardTriggerNext({ autoFocus, trigger, userId, cloudId, resourceClient, actions, position, children, testId, addFlag, onReportingLinesClick, ariaLabel, ariaLabelledBy, prepopulatedData, disabledAriaAttributes, onVisibilityChange, offset, viewingUserId, product, agentActions, ariaHideProfileTrigger, }: ProfileCardTriggerProps): JSX.Element;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type ProfileCardTriggerProps } from '../../types';
|
|
3
|
-
export default function ProfilecardTriggerNext({ autoFocus, trigger, userId, cloudId, resourceClient, actions, position, children, testId, addFlag, onReportingLinesClick, ariaLabel, ariaLabelledBy, prepopulatedData, disabledAriaAttributes, onVisibilityChange, offset, viewingUserId, product, agentActions, }: ProfileCardTriggerProps): JSX.Element;
|
|
3
|
+
export default function ProfilecardTriggerNext({ autoFocus, trigger, userId, cloudId, resourceClient, actions, position, children, testId, addFlag, onReportingLinesClick, ariaLabel, ariaLabelledBy, prepopulatedData, disabledAriaAttributes, onVisibilityChange, offset, viewingUserId, product, agentActions, ariaHideProfileTrigger, }: ProfileCardTriggerProps): JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/profilecard",
|
|
3
|
-
"version": "20.
|
|
3
|
+
"version": "20.14.0",
|
|
4
4
|
"description": "A React component to display a card with user information.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -53,19 +53,19 @@
|
|
|
53
53
|
"@atlaskit/analytics-next": "^10.1.0",
|
|
54
54
|
"@atlaskit/atlassian-context": "^0.0.2",
|
|
55
55
|
"@atlaskit/avatar": "^21.17.0",
|
|
56
|
-
"@atlaskit/avatar-group": "^10.
|
|
56
|
+
"@atlaskit/avatar-group": "^10.1.0",
|
|
57
57
|
"@atlaskit/button": "^20.3.0",
|
|
58
58
|
"@atlaskit/dropdown-menu": "^12.23.0",
|
|
59
59
|
"@atlaskit/empty-state": "^8.0.0",
|
|
60
60
|
"@atlaskit/focus-ring": "^2.0.0",
|
|
61
61
|
"@atlaskit/give-kudos": "^2.3.0",
|
|
62
|
-
"@atlaskit/icon": "^
|
|
62
|
+
"@atlaskit/icon": "^23.0.0",
|
|
63
63
|
"@atlaskit/lozenge": "^11.12.0",
|
|
64
64
|
"@atlaskit/menu": "^2.13.0",
|
|
65
65
|
"@atlaskit/modal-dialog": "^12.18.0",
|
|
66
66
|
"@atlaskit/people-teams-ui-public": "^1.6.0",
|
|
67
67
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
68
|
-
"@atlaskit/popup": "^1.
|
|
68
|
+
"@atlaskit/popup": "^1.30.0",
|
|
69
69
|
"@atlaskit/primitives": "^13.3.0",
|
|
70
70
|
"@atlaskit/rovo-agent-components": "^1.14.0",
|
|
71
71
|
"@atlaskit/rovo-triggers": "^1.4.0",
|