@atlaskit/profilecard 19.15.9 → 19.16.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 +18 -0
- package/dist/cjs/client/getTeamFromAGG.js +1 -1
- package/dist/cjs/components/User/ProfileCardTrigger.js +4 -2
- package/dist/cjs/components/User/ProfileCardTriggerNext.js +4 -2
- package/dist/cjs/util/analytics.js +1 -1
- package/dist/es2019/client/getTeamFromAGG.js +1 -1
- package/dist/es2019/components/User/ProfileCardTrigger.js +3 -2
- package/dist/es2019/components/User/ProfileCardTriggerNext.js +4 -2
- package/dist/es2019/util/analytics.js +1 -1
- package/dist/esm/client/getTeamFromAGG.js +1 -1
- package/dist/esm/components/User/ProfileCardTrigger.js +4 -2
- package/dist/esm/components/User/ProfileCardTriggerNext.js +4 -2
- package/dist/esm/util/analytics.js +1 -1
- package/dist/types/components/User/ProfileCardTriggerNext.d.ts +1 -1
- package/dist/types/types.d.ts +1 -0
- package/dist/types-ts4.5/components/User/ProfileCardTriggerNext.d.ts +1 -1
- package/dist/types-ts4.5/types.d.ts +4 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/profilecard
|
|
2
2
|
|
|
3
|
+
## 19.16.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#119587](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/119587)
|
|
8
|
+
[`add3a324590a5`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/add3a324590a5) -
|
|
9
|
+
exposed offset prop to adjust offset of profile card popup from trigger
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
## 19.15.10
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 19.15.9
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -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.16.0");
|
|
61
61
|
return headers;
|
|
62
62
|
};
|
|
63
63
|
function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -277,7 +277,8 @@ var ProfilecardTrigger = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
277
277
|
key: "renderWithTrigger",
|
|
278
278
|
value: function renderWithTrigger() {
|
|
279
279
|
var _this3 = this,
|
|
280
|
-
_this$props$autoFocus
|
|
280
|
+
_this$props$autoFocus,
|
|
281
|
+
_this$props$offset;
|
|
281
282
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_popup.default, {
|
|
282
283
|
isOpen: !!this.state.visible,
|
|
283
284
|
onClose: this.hideProfilecard,
|
|
@@ -295,7 +296,8 @@ var ProfilecardTrigger = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
295
296
|
},
|
|
296
297
|
zIndex: _constants.layers.modal(),
|
|
297
298
|
shouldUseCaptureOnOutsideClick: true,
|
|
298
|
-
autoFocus: (_this$props$autoFocus = this.props.autoFocus) !== null && _this$props$autoFocus !== void 0 ? _this$props$autoFocus : this.props.trigger === 'click'
|
|
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]
|
|
299
301
|
}), this.state.shouldShowGiveKudos && /*#__PURE__*/_react.default.createElement(_react.Suspense, {
|
|
300
302
|
fallback: null
|
|
301
303
|
}, /*#__PURE__*/_react.default.createElement(_giveKudos.GiveKudosLauncherLazy, {
|
|
@@ -51,7 +51,8 @@ function ProfilecardTriggerNext(_ref) {
|
|
|
51
51
|
ariaLabelledBy = _ref.ariaLabelledBy,
|
|
52
52
|
prepopulatedData = _ref.prepopulatedData,
|
|
53
53
|
disabledAriaAttributes = _ref.disabledAriaAttributes,
|
|
54
|
-
onVisibilityChange = _ref.onVisibilityChange
|
|
54
|
+
onVisibilityChange = _ref.onVisibilityChange,
|
|
55
|
+
offset = _ref.offset;
|
|
55
56
|
var _useAnalyticsEvents = (0, _analyticsNext.useAnalyticsEvents)(),
|
|
56
57
|
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
57
58
|
var _useIntl = (0, _reactIntlNext.useIntl)(),
|
|
@@ -332,7 +333,8 @@ function ProfilecardTriggerNext(_ref) {
|
|
|
332
333
|
},
|
|
333
334
|
zIndex: _constants.layers.modal(),
|
|
334
335
|
shouldUseCaptureOnOutsideClick: true,
|
|
335
|
-
autoFocus: autoFocus !== null && autoFocus !== void 0 ? autoFocus : trigger === 'click'
|
|
336
|
+
autoFocus: autoFocus !== null && autoFocus !== void 0 ? autoFocus : trigger === 'click',
|
|
337
|
+
offset: offset !== null && offset !== void 0 ? offset : [0, 8]
|
|
336
338
|
}), shouldShowGiveKudos && /*#__PURE__*/_react.default.createElement(_react.Suspense, {
|
|
337
339
|
fallback: null
|
|
338
340
|
}, /*#__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.16.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.16.0");
|
|
71
71
|
return headers;
|
|
72
72
|
};
|
|
73
73
|
export async function getTeamFromAGG(url, teamId, siteId) {
|
|
@@ -230,7 +230,7 @@ class ProfilecardTrigger extends React.PureComponent {
|
|
|
230
230
|
}))));
|
|
231
231
|
}
|
|
232
232
|
renderWithTrigger() {
|
|
233
|
-
var _this$props$autoFocus;
|
|
233
|
+
var _this$props$autoFocus, _this$props$offset;
|
|
234
234
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Popup, {
|
|
235
235
|
isOpen: !!this.state.visible,
|
|
236
236
|
onClose: this.hideProfilecard,
|
|
@@ -250,7 +250,8 @@ class ProfilecardTrigger extends React.PureComponent {
|
|
|
250
250
|
},
|
|
251
251
|
zIndex: layers.modal(),
|
|
252
252
|
shouldUseCaptureOnOutsideClick: true,
|
|
253
|
-
autoFocus: (_this$props$autoFocus = this.props.autoFocus) !== null && _this$props$autoFocus !== void 0 ? _this$props$autoFocus : this.props.trigger === 'click'
|
|
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
255
|
}), this.state.shouldShowGiveKudos && /*#__PURE__*/React.createElement(Suspense, {
|
|
255
256
|
fallback: null
|
|
256
257
|
}, /*#__PURE__*/React.createElement(GiveKudosLauncherLazy, {
|
|
@@ -28,7 +28,8 @@ export default function ProfilecardTriggerNext({
|
|
|
28
28
|
ariaLabelledBy,
|
|
29
29
|
prepopulatedData,
|
|
30
30
|
disabledAriaAttributes,
|
|
31
|
-
onVisibilityChange
|
|
31
|
+
onVisibilityChange,
|
|
32
|
+
offset
|
|
32
33
|
}) {
|
|
33
34
|
const {
|
|
34
35
|
createAnalyticsEvent
|
|
@@ -260,7 +261,8 @@ export default function ProfilecardTriggerNext({
|
|
|
260
261
|
},
|
|
261
262
|
zIndex: layers.modal(),
|
|
262
263
|
shouldUseCaptureOnOutsideClick: true,
|
|
263
|
-
autoFocus: autoFocus !== null && autoFocus !== void 0 ? autoFocus : trigger === 'click'
|
|
264
|
+
autoFocus: autoFocus !== null && autoFocus !== void 0 ? autoFocus : trigger === 'click',
|
|
265
|
+
offset: offset !== null && offset !== void 0 ? offset : [0, 8]
|
|
264
266
|
}), shouldShowGiveKudos && /*#__PURE__*/React.createElement(Suspense, {
|
|
265
267
|
fallback: null
|
|
266
268
|
}, /*#__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.16.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.16.0");
|
|
52
52
|
return headers;
|
|
53
53
|
};
|
|
54
54
|
export function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -267,7 +267,8 @@ var ProfilecardTrigger = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
267
267
|
key: "renderWithTrigger",
|
|
268
268
|
value: function renderWithTrigger() {
|
|
269
269
|
var _this3 = this,
|
|
270
|
-
_this$props$autoFocus
|
|
270
|
+
_this$props$autoFocus,
|
|
271
|
+
_this$props$offset;
|
|
271
272
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Popup, {
|
|
272
273
|
isOpen: !!this.state.visible,
|
|
273
274
|
onClose: this.hideProfilecard,
|
|
@@ -285,7 +286,8 @@ var ProfilecardTrigger = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
285
286
|
},
|
|
286
287
|
zIndex: layers.modal(),
|
|
287
288
|
shouldUseCaptureOnOutsideClick: true,
|
|
288
|
-
autoFocus: (_this$props$autoFocus = this.props.autoFocus) !== null && _this$props$autoFocus !== void 0 ? _this$props$autoFocus : this.props.trigger === 'click'
|
|
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]
|
|
289
291
|
}), this.state.shouldShowGiveKudos && /*#__PURE__*/React.createElement(Suspense, {
|
|
290
292
|
fallback: null
|
|
291
293
|
}, /*#__PURE__*/React.createElement(GiveKudosLauncherLazy, {
|
|
@@ -41,7 +41,8 @@ export default function ProfilecardTriggerNext(_ref) {
|
|
|
41
41
|
ariaLabelledBy = _ref.ariaLabelledBy,
|
|
42
42
|
prepopulatedData = _ref.prepopulatedData,
|
|
43
43
|
disabledAriaAttributes = _ref.disabledAriaAttributes,
|
|
44
|
-
onVisibilityChange = _ref.onVisibilityChange
|
|
44
|
+
onVisibilityChange = _ref.onVisibilityChange,
|
|
45
|
+
offset = _ref.offset;
|
|
45
46
|
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
46
47
|
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
47
48
|
var _useIntl = useIntl(),
|
|
@@ -322,7 +323,8 @@ export default function ProfilecardTriggerNext(_ref) {
|
|
|
322
323
|
},
|
|
323
324
|
zIndex: layers.modal(),
|
|
324
325
|
shouldUseCaptureOnOutsideClick: true,
|
|
325
|
-
autoFocus: autoFocus !== null && autoFocus !== void 0 ? autoFocus : trigger === 'click'
|
|
326
|
+
autoFocus: autoFocus !== null && autoFocus !== void 0 ? autoFocus : trigger === 'click',
|
|
327
|
+
offset: offset !== null && offset !== void 0 ? offset : [0, 8]
|
|
326
328
|
}), shouldShowGiveKudos && /*#__PURE__*/React.createElement(Suspense, {
|
|
327
329
|
fallback: null
|
|
328
330
|
}, /*#__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.16.0"
|
|
42
42
|
}, attributes), {}, {
|
|
43
43
|
firedAt: Math.round(getPageTime())
|
|
44
44
|
})
|
|
@@ -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, }: 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, }: ProfileCardTriggerProps): JSX.Element;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -120,6 +120,7 @@ export interface ProfileCardTriggerProps {
|
|
|
120
120
|
disabledAriaAttributes?: boolean;
|
|
121
121
|
onVisibilityChange?: (isVisible: boolean) => void;
|
|
122
122
|
isVisible?: boolean;
|
|
123
|
+
offset?: [number, number];
|
|
123
124
|
}
|
|
124
125
|
export interface ProfileCardTriggerState {
|
|
125
126
|
visible?: boolean;
|
|
@@ -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, }: 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, }: ProfileCardTriggerProps): JSX.Element;
|
|
@@ -120,6 +120,10 @@ export interface ProfileCardTriggerProps {
|
|
|
120
120
|
disabledAriaAttributes?: boolean;
|
|
121
121
|
onVisibilityChange?: (isVisible: boolean) => void;
|
|
122
122
|
isVisible?: boolean;
|
|
123
|
+
offset?: [
|
|
124
|
+
number,
|
|
125
|
+
number
|
|
126
|
+
];
|
|
123
127
|
}
|
|
124
128
|
export interface ProfileCardTriggerState {
|
|
125
129
|
visible?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/profilecard",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.16.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,20 +56,20 @@
|
|
|
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": "^18.
|
|
59
|
+
"@atlaskit/button": "^18.4.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
64
|
"@atlaskit/icon": "^22.6.0",
|
|
65
|
-
"@atlaskit/lozenge": "^11.
|
|
65
|
+
"@atlaskit/lozenge": "^11.9.0",
|
|
66
66
|
"@atlaskit/menu": "^2.7.0",
|
|
67
67
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
68
68
|
"@atlaskit/popup": "^1.20.0",
|
|
69
|
-
"@atlaskit/primitives": "^
|
|
69
|
+
"@atlaskit/primitives": "^11.0.0",
|
|
70
70
|
"@atlaskit/spinner": "^16.2.0",
|
|
71
71
|
"@atlaskit/theme": "^12.11.0",
|
|
72
|
-
"@atlaskit/tokens": "^1.
|
|
72
|
+
"@atlaskit/tokens": "^1.54.0",
|
|
73
73
|
"@atlaskit/tooltip": "^18.5.0",
|
|
74
74
|
"@babel/runtime": "^7.0.0",
|
|
75
75
|
"@emotion/react": "^11.7.1",
|