@atlaskit/profilecard 24.4.0 → 24.5.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 +8 -0
- package/dist/cjs/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/cjs/client/getTeamFromAGG.js +1 -1
- package/dist/cjs/components/User/ProfileCardTrigger.js +5 -3
- 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/ProfileCardTrigger.js +5 -3
- 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/ProfileCardTrigger.js +5 -3
- package/dist/esm/util/analytics.js +1 -1
- package/dist/types/components/User/ProfileCardTrigger.d.ts +1 -1
- package/dist/types/types.d.ts +2 -0
- package/dist/types-ts4.5/components/User/ProfileCardTrigger.d.ts +1 -1
- package/dist/types-ts4.5/types.d.ts +2 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/profilecard
|
|
2
2
|
|
|
3
|
+
## 24.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#200836](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/200836)
|
|
8
|
+
[`4403807b49aca`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4403807b49aca) -
|
|
9
|
+
add option to customise showDelay and hideDelay
|
|
10
|
+
|
|
3
11
|
## 24.4.0
|
|
4
12
|
|
|
5
13
|
### 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', "24.
|
|
14
|
+
headers.append('atl-client-version', "24.4.0");
|
|
15
15
|
return headers;
|
|
16
16
|
};
|
|
17
17
|
function getOrgIdForCloudIdFromAGG(_x, _x2) {
|
|
@@ -65,7 +65,7 @@ var addHeaders = exports.addHeaders = function addHeaders(headers) {
|
|
|
65
65
|
headers.append('X-ExperimentalApi', 'teams-beta');
|
|
66
66
|
headers.append('X-ExperimentalApi', 'team-members-beta');
|
|
67
67
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
68
|
-
headers.append('atl-client-version', "24.
|
|
68
|
+
headers.append('atl-client-version', "24.4.0");
|
|
69
69
|
return headers;
|
|
70
70
|
};
|
|
71
71
|
function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -93,14 +93,16 @@ function ProfilecardTriggerNext(_ref2) {
|
|
|
93
93
|
_ref2$ariaHideProfile = _ref2.ariaHideProfileTrigger,
|
|
94
94
|
ariaHideProfileTrigger = _ref2$ariaHideProfile === void 0 ? false : _ref2$ariaHideProfile,
|
|
95
95
|
propsIsVisible = _ref2.isVisible,
|
|
96
|
-
ssrPlaceholderId = _ref2.ssrPlaceholderId
|
|
96
|
+
ssrPlaceholderId = _ref2.ssrPlaceholderId,
|
|
97
|
+
customShowDelay = _ref2.showDelay,
|
|
98
|
+
customHideDelay = _ref2.hideDelay;
|
|
97
99
|
var _useAnalyticsEvents = (0, _analyticsNext.useAnalyticsEvents)(),
|
|
98
100
|
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
99
101
|
var _useIntl = (0, _reactIntlNext.useIntl)(),
|
|
100
102
|
formatMessage = _useIntl.formatMessage;
|
|
101
103
|
var isMounted = (0, _react.useRef)(false);
|
|
102
|
-
var showDelay = trigger === 'click' || propsIsVisible && (0, _platformFeatureFlags.fg)('fix_profilecard_trigger_isvisible') ? 0 : _config.DELAY_MS_SHOW;
|
|
103
|
-
var hideDelay = trigger === 'click' || propsIsVisible && (0, _platformFeatureFlags.fg)('fix_profilecard_trigger_isvisible') ? 0 : _config.DELAY_MS_HIDE;
|
|
104
|
+
var showDelay = trigger === 'click' || propsIsVisible && (0, _platformFeatureFlags.fg)('fix_profilecard_trigger_isvisible') ? 0 : customShowDelay !== null && customShowDelay !== void 0 ? customShowDelay : _config.DELAY_MS_SHOW;
|
|
105
|
+
var hideDelay = trigger === 'click' || propsIsVisible && (0, _platformFeatureFlags.fg)('fix_profilecard_trigger_isvisible') ? 0 : customHideDelay !== null && customHideDelay !== void 0 ? customHideDelay : _config.DELAY_MS_HIDE;
|
|
104
106
|
var showTimer = (0, _react.useRef)(0);
|
|
105
107
|
var hideTimer = (0, _react.useRef)(0);
|
|
106
108
|
var _useState = (0, _react.useState)(false),
|
|
@@ -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: "24.
|
|
48
|
+
packageVersion: "24.4.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', "24.
|
|
9
|
+
headers.append('atl-client-version', "24.4.0");
|
|
10
10
|
return headers;
|
|
11
11
|
};
|
|
12
12
|
export async function getOrgIdForCloudIdFromAGG(url, cloudId) {
|
|
@@ -74,7 +74,7 @@ export const addHeaders = headers => {
|
|
|
74
74
|
headers.append('X-ExperimentalApi', 'teams-beta');
|
|
75
75
|
headers.append('X-ExperimentalApi', 'team-members-beta');
|
|
76
76
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
77
|
-
headers.append('atl-client-version', "24.
|
|
77
|
+
headers.append('atl-client-version', "24.4.0");
|
|
78
78
|
return headers;
|
|
79
79
|
};
|
|
80
80
|
export async function getTeamFromAGG(url, teamId, siteId) {
|
|
@@ -71,7 +71,9 @@ export default function ProfilecardTriggerNext({
|
|
|
71
71
|
agentActions,
|
|
72
72
|
ariaHideProfileTrigger = false,
|
|
73
73
|
isVisible: propsIsVisible,
|
|
74
|
-
ssrPlaceholderId
|
|
74
|
+
ssrPlaceholderId,
|
|
75
|
+
showDelay: customShowDelay,
|
|
76
|
+
hideDelay: customHideDelay
|
|
75
77
|
}) {
|
|
76
78
|
const {
|
|
77
79
|
createAnalyticsEvent
|
|
@@ -80,8 +82,8 @@ export default function ProfilecardTriggerNext({
|
|
|
80
82
|
formatMessage
|
|
81
83
|
} = useIntl();
|
|
82
84
|
const isMounted = useRef(false);
|
|
83
|
-
const showDelay = trigger === 'click' || propsIsVisible && fg('fix_profilecard_trigger_isvisible') ? 0 : DELAY_MS_SHOW;
|
|
84
|
-
const hideDelay = trigger === 'click' || propsIsVisible && fg('fix_profilecard_trigger_isvisible') ? 0 : DELAY_MS_HIDE;
|
|
85
|
+
const showDelay = trigger === 'click' || propsIsVisible && fg('fix_profilecard_trigger_isvisible') ? 0 : customShowDelay !== null && customShowDelay !== void 0 ? customShowDelay : DELAY_MS_SHOW;
|
|
86
|
+
const hideDelay = trigger === 'click' || propsIsVisible && fg('fix_profilecard_trigger_isvisible') ? 0 : customHideDelay !== null && customHideDelay !== void 0 ? customHideDelay : DELAY_MS_HIDE;
|
|
85
87
|
const showTimer = useRef(0);
|
|
86
88
|
const hideTimer = useRef(0);
|
|
87
89
|
const [visible, setVisible] = useState(false);
|
|
@@ -32,7 +32,7 @@ const createEvent = (eventType, action, actionSubject, actionSubjectId, attribut
|
|
|
32
32
|
actionSubjectId,
|
|
33
33
|
attributes: {
|
|
34
34
|
packageName: "@atlaskit/profilecard",
|
|
35
|
-
packageVersion: "24.
|
|
35
|
+
packageVersion: "24.4.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', "24.
|
|
7
|
+
headers.append('atl-client-version', "24.4.0");
|
|
8
8
|
return headers;
|
|
9
9
|
};
|
|
10
10
|
export function getOrgIdForCloudIdFromAGG(_x, _x2) {
|
|
@@ -56,7 +56,7 @@ export var addHeaders = function addHeaders(headers) {
|
|
|
56
56
|
headers.append('X-ExperimentalApi', 'teams-beta');
|
|
57
57
|
headers.append('X-ExperimentalApi', 'team-members-beta');
|
|
58
58
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
59
|
-
headers.append('atl-client-version', "24.
|
|
59
|
+
headers.append('atl-client-version', "24.4.0");
|
|
60
60
|
return headers;
|
|
61
61
|
};
|
|
62
62
|
export function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -84,14 +84,16 @@ export default function ProfilecardTriggerNext(_ref2) {
|
|
|
84
84
|
_ref2$ariaHideProfile = _ref2.ariaHideProfileTrigger,
|
|
85
85
|
ariaHideProfileTrigger = _ref2$ariaHideProfile === void 0 ? false : _ref2$ariaHideProfile,
|
|
86
86
|
propsIsVisible = _ref2.isVisible,
|
|
87
|
-
ssrPlaceholderId = _ref2.ssrPlaceholderId
|
|
87
|
+
ssrPlaceholderId = _ref2.ssrPlaceholderId,
|
|
88
|
+
customShowDelay = _ref2.showDelay,
|
|
89
|
+
customHideDelay = _ref2.hideDelay;
|
|
88
90
|
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
89
91
|
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
90
92
|
var _useIntl = useIntl(),
|
|
91
93
|
formatMessage = _useIntl.formatMessage;
|
|
92
94
|
var isMounted = useRef(false);
|
|
93
|
-
var showDelay = trigger === 'click' || propsIsVisible && fg('fix_profilecard_trigger_isvisible') ? 0 : DELAY_MS_SHOW;
|
|
94
|
-
var hideDelay = trigger === 'click' || propsIsVisible && fg('fix_profilecard_trigger_isvisible') ? 0 : DELAY_MS_HIDE;
|
|
95
|
+
var showDelay = trigger === 'click' || propsIsVisible && fg('fix_profilecard_trigger_isvisible') ? 0 : customShowDelay !== null && customShowDelay !== void 0 ? customShowDelay : DELAY_MS_SHOW;
|
|
96
|
+
var hideDelay = trigger === 'click' || propsIsVisible && fg('fix_profilecard_trigger_isvisible') ? 0 : customHideDelay !== null && customHideDelay !== void 0 ? customHideDelay : DELAY_MS_HIDE;
|
|
95
97
|
var showTimer = useRef(0);
|
|
96
98
|
var hideTimer = useRef(0);
|
|
97
99
|
var _useState = useState(false),
|
|
@@ -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: "24.
|
|
42
|
+
packageVersion: "24.4.0"
|
|
43
43
|
}, attributes), {}, {
|
|
44
44
|
firedAt: Math.round(getPageTime())
|
|
45
45
|
})
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from '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, ariaHideProfileTrigger, isVisible: propsIsVisible, ssrPlaceholderId, }: ProfileCardTriggerProps): React.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, isVisible: propsIsVisible, ssrPlaceholderId, showDelay: customShowDelay, hideDelay: customHideDelay, }: ProfileCardTriggerProps): React.JSX.Element;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -183,6 +183,8 @@ export interface ProfileCardTriggerProps {
|
|
|
183
183
|
agentActions?: AgentActionsType;
|
|
184
184
|
ariaHideProfileTrigger?: boolean;
|
|
185
185
|
ssrPlaceholderId?: string;
|
|
186
|
+
showDelay?: number;
|
|
187
|
+
hideDelay?: number;
|
|
186
188
|
}
|
|
187
189
|
export interface ProfileCardTriggerState {
|
|
188
190
|
visible?: boolean;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from '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, ariaHideProfileTrigger, isVisible: propsIsVisible, ssrPlaceholderId, }: ProfileCardTriggerProps): React.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, isVisible: propsIsVisible, ssrPlaceholderId, showDelay: customShowDelay, hideDelay: customHideDelay, }: ProfileCardTriggerProps): React.JSX.Element;
|
|
@@ -186,6 +186,8 @@ export interface ProfileCardTriggerProps {
|
|
|
186
186
|
agentActions?: AgentActionsType;
|
|
187
187
|
ariaHideProfileTrigger?: boolean;
|
|
188
188
|
ssrPlaceholderId?: string;
|
|
189
|
+
showDelay?: number;
|
|
190
|
+
hideDelay?: number;
|
|
189
191
|
}
|
|
190
192
|
export interface ProfileCardTriggerState {
|
|
191
193
|
visible?: boolean;
|