@atlaskit/profilecard 24.47.0 → 24.48.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 +11 -0
- package/afm-cc/tsconfig.json +3 -0
- package/afm-products/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/ProfileCard.js +16 -1
- package/dist/cjs/components/User/ProfileCardResourced.js +9 -1
- package/dist/cjs/components/User/ProfileCardTrigger.js +10 -1
- package/dist/cjs/util/analytics.js +2 -2
- package/dist/es2019/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/es2019/client/getTeamFromAGG.js +1 -1
- package/dist/es2019/components/User/ProfileCard.js +11 -1
- package/dist/es2019/components/User/ProfileCardResourced.js +9 -1
- package/dist/es2019/components/User/ProfileCardTrigger.js +10 -1
- package/dist/es2019/util/analytics.js +2 -2
- package/dist/esm/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/esm/client/getTeamFromAGG.js +1 -1
- package/dist/esm/components/User/ProfileCard.js +16 -1
- package/dist/esm/components/User/ProfileCardResourced.js +9 -1
- package/dist/esm/components/User/ProfileCardTrigger.js +10 -1
- package/dist/esm/util/analytics.js +2 -2
- package/package.json +7 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @atlaskit/profilecard
|
|
2
2
|
|
|
3
|
+
## 24.48.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`ecc20e3c9d89b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ecc20e3c9d89b) -
|
|
8
|
+
Migrate all ADS LinkButton components to TeamsLinkButton
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
3
14
|
## 24.47.0
|
|
4
15
|
|
|
5
16
|
### Minor Changes
|
package/afm-cc/tsconfig.json
CHANGED
|
@@ -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.47.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', "24.
|
|
69
|
+
headers.append('atl-client-version', "24.47.0");
|
|
70
70
|
return headers;
|
|
71
71
|
};
|
|
72
72
|
function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -17,6 +17,7 @@ var _new = require("@atlaskit/button/new");
|
|
|
17
17
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
18
18
|
var _spinner = _interopRequireDefault(require("@atlaskit/spinner"));
|
|
19
19
|
var _teamsAppInternalAnalytics = require("@atlaskit/teams-app-internal-analytics");
|
|
20
|
+
var _teamsLinkButton = require("@atlaskit/teams-app-internal-navigation/teams-link-button");
|
|
20
21
|
var _messages = _interopRequireDefault(require("../../messages"));
|
|
21
22
|
var _Card = require("../../styled/Card");
|
|
22
23
|
var _UserTrigger = require("../../styled/UserTrigger");
|
|
@@ -180,7 +181,7 @@ var Actions = function Actions(_ref) {
|
|
|
180
181
|
testId: "profilecard-actions"
|
|
181
182
|
}, regularActions.map(function (action, index) {
|
|
182
183
|
var isKudos = action.id === GIVE_KUDOS_ACTION_ID;
|
|
183
|
-
var button = /*#__PURE__*/_react.default.createElement(
|
|
184
|
+
var button = (0, _platformFeatureFlags.fg)('ptc-links-migrate-atlaskit-link-button') ? /*#__PURE__*/_react.default.createElement(_teamsLinkButton.TeamsLinkButton, {
|
|
184
185
|
appearance: "default",
|
|
185
186
|
key: action.id || index,
|
|
186
187
|
onClick: function onClick(event) {
|
|
@@ -190,6 +191,20 @@ var Actions = function Actions(_ref) {
|
|
|
190
191
|
return onActionClick(action, args, event, index);
|
|
191
192
|
},
|
|
192
193
|
href: action.link || '',
|
|
194
|
+
intent: "action",
|
|
195
|
+
autoFocus: index === 0 && isTriggeredUsingKeyboard && !isRenderedInPortal,
|
|
196
|
+
id: "action-button-".concat(action.id),
|
|
197
|
+
"aria-labelledby": "action-button-".concat(action.id, " profilecard-name-label")
|
|
198
|
+
}, action.label, isKudos && /*#__PURE__*/_react.default.createElement(_Card.AnimationWrapper, null, /*#__PURE__*/_react.default.createElement(_Card.KudosBlobAnimation, null))) : /*#__PURE__*/_react.default.createElement(_new.LinkButton, {
|
|
199
|
+
appearance: "default",
|
|
200
|
+
key: action.id || index,
|
|
201
|
+
onClick: function onClick(event) {
|
|
202
|
+
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
203
|
+
args[_key2 - 1] = arguments[_key2];
|
|
204
|
+
}
|
|
205
|
+
return onActionClick(action, args, event, index);
|
|
206
|
+
},
|
|
207
|
+
href: action.link || '',
|
|
193
208
|
target: action.target,
|
|
194
209
|
autoFocus: index === 0 && isTriggeredUsingKeyboard && !isRenderedInPortal,
|
|
195
210
|
id: "action-button-".concat(action.id),
|
|
@@ -18,6 +18,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
18
18
|
var _giveKudos = require("@atlaskit/give-kudos");
|
|
19
19
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
20
20
|
var _teamsAppInternalAnalytics = require("@atlaskit/teams-app-internal-analytics");
|
|
21
|
+
var _teamsAppInternalNavigation = require("@atlaskit/teams-app-internal-navigation");
|
|
21
22
|
var _filterActions = _interopRequireDefault(require("../../internal/filterActions"));
|
|
22
23
|
var _UserTrigger = require("../../styled/UserTrigger");
|
|
23
24
|
var _Error = require("../Error");
|
|
@@ -219,7 +220,14 @@ var ProfileCardResourced = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
219
220
|
cloudId: this.props.cloudId,
|
|
220
221
|
addFlag: this.props.addFlag,
|
|
221
222
|
onClose: this.closeKudosDrawer
|
|
222
|
-
})), /*#__PURE__*/_react.default.createElement(
|
|
223
|
+
})), (0, _platformFeatureFlags.fg)('ptc-links-migrate-atlaskit-link-button') ? /*#__PURE__*/_react.default.createElement(_teamsAppInternalNavigation.TeamsNavigationProvider, {
|
|
224
|
+
value: {
|
|
225
|
+
forceExternalIntent: false,
|
|
226
|
+
navigate: function navigate() {}
|
|
227
|
+
}
|
|
228
|
+
}, /*#__PURE__*/_react.default.createElement(_ProfileCard.default, (0, _extends2.default)({}, newProps, {
|
|
229
|
+
actions: this.filterActions()
|
|
230
|
+
}))) : /*#__PURE__*/_react.default.createElement(_ProfileCard.default, (0, _extends2.default)({}, newProps, {
|
|
223
231
|
actions: this.filterActions()
|
|
224
232
|
}))));
|
|
225
233
|
}
|
|
@@ -19,6 +19,7 @@ var _giveKudos = require("@atlaskit/give-kudos");
|
|
|
19
19
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
20
20
|
var _popup = _interopRequireDefault(require("@atlaskit/popup"));
|
|
21
21
|
var _teamsAppInternalAnalytics = require("@atlaskit/teams-app-internal-analytics");
|
|
22
|
+
var _teamsAppInternalNavigation = require("@atlaskit/teams-app-internal-navigation");
|
|
22
23
|
var _constants = require("@atlaskit/theme/constants");
|
|
23
24
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
24
25
|
var _filterActions = _interopRequireDefault(require("../../internal/filterActions"));
|
|
@@ -64,7 +65,7 @@ function ProfileCardContent(_ref) {
|
|
|
64
65
|
hideAiDisclaimer: hideAiDisclaimer
|
|
65
66
|
});
|
|
66
67
|
} else {
|
|
67
|
-
|
|
68
|
+
var profileCard = /*#__PURE__*/_react.default.createElement(_react.Suspense, {
|
|
68
69
|
fallback: null
|
|
69
70
|
}, /*#__PURE__*/_react.default.createElement(_lazyProfileCard.ProfileCardLazy, (0, _extends2.default)({}, profilecardProps, {
|
|
70
71
|
isRenderedInPortal: isRenderedInPortal,
|
|
@@ -73,6 +74,14 @@ function ProfileCardContent(_ref) {
|
|
|
73
74
|
errorType: errorType,
|
|
74
75
|
withoutElevation: true
|
|
75
76
|
})));
|
|
77
|
+
if ((0, _platformFeatureFlags.fg)('ptc-links-migrate-atlaskit-link-button')) {
|
|
78
|
+
return /*#__PURE__*/_react.default.createElement(_teamsAppInternalNavigation.TeamsNavigationProvider, {
|
|
79
|
+
value: {
|
|
80
|
+
navigate: function navigate() {}
|
|
81
|
+
}
|
|
82
|
+
}, profileCard);
|
|
83
|
+
}
|
|
84
|
+
return profileCard;
|
|
76
85
|
}
|
|
77
86
|
}
|
|
78
87
|
function ProfilecardTriggerNext(_ref2) {
|
|
@@ -12,7 +12,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
12
12
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13
13
|
var PACKAGE_META_DATA = exports.PACKAGE_META_DATA = {
|
|
14
14
|
packageName: (_process$env$_PACKAGE = "@atlaskit/profilecard") !== null && _process$env$_PACKAGE !== void 0 ? _process$env$_PACKAGE : '',
|
|
15
|
-
packageVersion: (_process$env$_PACKAGE2 = "24.
|
|
15
|
+
packageVersion: (_process$env$_PACKAGE2 = "24.47.0") !== null && _process$env$_PACKAGE2 !== void 0 ? _process$env$_PACKAGE2 : ''
|
|
16
16
|
};
|
|
17
17
|
var TEAM_SUBJECT = 'teamProfileCard';
|
|
18
18
|
var USER_SUBJECT = 'profilecard';
|
|
@@ -31,7 +31,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
31
31
|
actionSubjectId: actionSubjectId,
|
|
32
32
|
attributes: _objectSpread(_objectSpread({
|
|
33
33
|
packageName: "@atlaskit/profilecard",
|
|
34
|
-
packageVersion: "24.
|
|
34
|
+
packageVersion: "24.47.0"
|
|
35
35
|
}, attributes), {}, {
|
|
36
36
|
firedAt: Math.round((0, _performance.getPageTime)())
|
|
37
37
|
})
|
|
@@ -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.47.0");
|
|
10
10
|
return headers;
|
|
11
11
|
};
|
|
12
12
|
export async function getOrgIdForCloudIdFromAGG(url, cloudId) {
|
|
@@ -78,7 +78,7 @@ export const addHeaders = headers => {
|
|
|
78
78
|
headers.append('X-ExperimentalApi', 'teams-beta');
|
|
79
79
|
headers.append('X-ExperimentalApi', 'team-members-beta');
|
|
80
80
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
81
|
-
headers.append('atl-client-version', "24.
|
|
81
|
+
headers.append('atl-client-version', "24.47.0");
|
|
82
82
|
return headers;
|
|
83
83
|
};
|
|
84
84
|
export async function getTeamFromAGG(url, teamId, siteId) {
|
|
@@ -6,6 +6,7 @@ import { LinkButton } from '@atlaskit/button/new';
|
|
|
6
6
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
7
|
import Spinner from '@atlaskit/spinner';
|
|
8
8
|
import { useAnalyticsEvents } from '@atlaskit/teams-app-internal-analytics';
|
|
9
|
+
import { TeamsLinkButton } from '@atlaskit/teams-app-internal-navigation/teams-link-button';
|
|
9
10
|
import messages from '../../messages';
|
|
10
11
|
import { ActionButtonGroup, ActionsFlexSpacer, AnimatedKudosButton, AnimationWrapper, CardContainer, CardContent, KudosBlobAnimation, ProfileImage } from '../../styled/Card';
|
|
11
12
|
import { CardWrapper, SpinnerContainer } from '../../styled/UserTrigger';
|
|
@@ -165,7 +166,16 @@ const Actions = ({
|
|
|
165
166
|
testId: "profilecard-actions"
|
|
166
167
|
}, regularActions.map((action, index) => {
|
|
167
168
|
const isKudos = action.id === GIVE_KUDOS_ACTION_ID;
|
|
168
|
-
const button = /*#__PURE__*/React.createElement(
|
|
169
|
+
const button = fg('ptc-links-migrate-atlaskit-link-button') ? /*#__PURE__*/React.createElement(TeamsLinkButton, {
|
|
170
|
+
appearance: "default",
|
|
171
|
+
key: action.id || index,
|
|
172
|
+
onClick: (event, ...args) => onActionClick(action, args, event, index),
|
|
173
|
+
href: action.link || '',
|
|
174
|
+
intent: "action",
|
|
175
|
+
autoFocus: index === 0 && isTriggeredUsingKeyboard && !isRenderedInPortal,
|
|
176
|
+
id: `action-button-${action.id}`,
|
|
177
|
+
"aria-labelledby": `action-button-${action.id} profilecard-name-label`
|
|
178
|
+
}, action.label, isKudos && /*#__PURE__*/React.createElement(AnimationWrapper, null, /*#__PURE__*/React.createElement(KudosBlobAnimation, null))) : /*#__PURE__*/React.createElement(LinkButton, {
|
|
169
179
|
appearance: "default",
|
|
170
180
|
key: action.id || index,
|
|
171
181
|
onClick: (event, ...args) => onActionClick(action, args, event, index),
|
|
@@ -4,6 +4,7 @@ import React, { Suspense } from 'react';
|
|
|
4
4
|
import { GiveKudosLauncherLazy, KudosType } from '@atlaskit/give-kudos';
|
|
5
5
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
6
|
import { useAnalyticsEvents } from '@atlaskit/teams-app-internal-analytics';
|
|
7
|
+
import { TeamsNavigationProvider } from '@atlaskit/teams-app-internal-navigation';
|
|
7
8
|
import filterActions from '../../internal/filterActions';
|
|
8
9
|
import { CardWrapper } from '../../styled/UserTrigger';
|
|
9
10
|
import { ErrorMessage } from '../Error';
|
|
@@ -174,7 +175,14 @@ class ProfileCardResourced extends React.PureComponent {
|
|
|
174
175
|
cloudId: this.props.cloudId,
|
|
175
176
|
addFlag: this.props.addFlag,
|
|
176
177
|
onClose: this.closeKudosDrawer
|
|
177
|
-
})), /*#__PURE__*/React.createElement(
|
|
178
|
+
})), fg('ptc-links-migrate-atlaskit-link-button') ? /*#__PURE__*/React.createElement(TeamsNavigationProvider, {
|
|
179
|
+
value: {
|
|
180
|
+
forceExternalIntent: false,
|
|
181
|
+
navigate: () => {}
|
|
182
|
+
}
|
|
183
|
+
}, /*#__PURE__*/React.createElement(ProfileCard, _extends({}, newProps, {
|
|
184
|
+
actions: this.filterActions()
|
|
185
|
+
}))) : /*#__PURE__*/React.createElement(ProfileCard, _extends({}, newProps, {
|
|
178
186
|
actions: this.filterActions()
|
|
179
187
|
}))));
|
|
180
188
|
}
|
|
@@ -5,6 +5,7 @@ import { GiveKudosLauncherLazy, KudosType } from '@atlaskit/give-kudos';
|
|
|
5
5
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
6
|
import Popup from '@atlaskit/popup';
|
|
7
7
|
import { useAnalyticsEvents } from '@atlaskit/teams-app-internal-analytics';
|
|
8
|
+
import { TeamsNavigationProvider } from '@atlaskit/teams-app-internal-navigation';
|
|
8
9
|
import { layers } from '@atlaskit/theme/constants';
|
|
9
10
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
10
11
|
import filterActionsInner from '../../internal/filterActions';
|
|
@@ -46,7 +47,7 @@ function ProfileCardContent({
|
|
|
46
47
|
hideAiDisclaimer: hideAiDisclaimer
|
|
47
48
|
});
|
|
48
49
|
} else {
|
|
49
|
-
|
|
50
|
+
const profileCard = /*#__PURE__*/React.createElement(Suspense, {
|
|
50
51
|
fallback: null
|
|
51
52
|
}, /*#__PURE__*/React.createElement(ProfileCardLazy, _extends({}, profilecardProps, {
|
|
52
53
|
isRenderedInPortal: isRenderedInPortal,
|
|
@@ -55,6 +56,14 @@ function ProfileCardContent({
|
|
|
55
56
|
errorType: errorType,
|
|
56
57
|
withoutElevation: true
|
|
57
58
|
})));
|
|
59
|
+
if (fg('ptc-links-migrate-atlaskit-link-button')) {
|
|
60
|
+
return /*#__PURE__*/React.createElement(TeamsNavigationProvider, {
|
|
61
|
+
value: {
|
|
62
|
+
navigate: () => {}
|
|
63
|
+
}
|
|
64
|
+
}, profileCard);
|
|
65
|
+
}
|
|
66
|
+
return profileCard;
|
|
58
67
|
}
|
|
59
68
|
}
|
|
60
69
|
export default function ProfilecardTriggerNext({
|
|
@@ -2,7 +2,7 @@ var _process$env$_PACKAGE, _process$env$_PACKAGE2;
|
|
|
2
2
|
import { getPageTime } from './performance';
|
|
3
3
|
export const PACKAGE_META_DATA = {
|
|
4
4
|
packageName: (_process$env$_PACKAGE = "@atlaskit/profilecard") !== null && _process$env$_PACKAGE !== void 0 ? _process$env$_PACKAGE : '',
|
|
5
|
-
packageVersion: (_process$env$_PACKAGE2 = "24.
|
|
5
|
+
packageVersion: (_process$env$_PACKAGE2 = "24.47.0") !== null && _process$env$_PACKAGE2 !== void 0 ? _process$env$_PACKAGE2 : ''
|
|
6
6
|
};
|
|
7
7
|
const TEAM_SUBJECT = 'teamProfileCard';
|
|
8
8
|
const USER_SUBJECT = 'profilecard';
|
|
@@ -19,7 +19,7 @@ const createEvent = (eventType, action, actionSubject, actionSubjectId, attribut
|
|
|
19
19
|
actionSubjectId,
|
|
20
20
|
attributes: {
|
|
21
21
|
packageName: "@atlaskit/profilecard",
|
|
22
|
-
packageVersion: "24.
|
|
22
|
+
packageVersion: "24.47.0",
|
|
23
23
|
...attributes,
|
|
24
24
|
firedAt: Math.round(getPageTime())
|
|
25
25
|
}
|
|
@@ -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.47.0");
|
|
8
8
|
return headers;
|
|
9
9
|
};
|
|
10
10
|
export function getOrgIdForCloudIdFromAGG(_x, _x2) {
|
|
@@ -59,7 +59,7 @@ export var addHeaders = function addHeaders(headers) {
|
|
|
59
59
|
headers.append('X-ExperimentalApi', 'teams-beta');
|
|
60
60
|
headers.append('X-ExperimentalApi', 'team-members-beta');
|
|
61
61
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
62
|
-
headers.append('atl-client-version', "24.
|
|
62
|
+
headers.append('atl-client-version', "24.47.0");
|
|
63
63
|
return headers;
|
|
64
64
|
};
|
|
65
65
|
export function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -11,6 +11,7 @@ import { LinkButton } from '@atlaskit/button/new';
|
|
|
11
11
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
12
|
import Spinner from '@atlaskit/spinner';
|
|
13
13
|
import { useAnalyticsEvents } from '@atlaskit/teams-app-internal-analytics';
|
|
14
|
+
import { TeamsLinkButton } from '@atlaskit/teams-app-internal-navigation/teams-link-button';
|
|
14
15
|
import messages from '../../messages';
|
|
15
16
|
import { ActionButtonGroup, ActionsFlexSpacer, AnimatedKudosButton, AnimationWrapper, CardContainer, CardContent, KudosBlobAnimation, ProfileImage } from '../../styled/Card';
|
|
16
17
|
import { CardWrapper, SpinnerContainer } from '../../styled/UserTrigger';
|
|
@@ -171,7 +172,7 @@ var Actions = function Actions(_ref) {
|
|
|
171
172
|
testId: "profilecard-actions"
|
|
172
173
|
}, regularActions.map(function (action, index) {
|
|
173
174
|
var isKudos = action.id === GIVE_KUDOS_ACTION_ID;
|
|
174
|
-
var button = /*#__PURE__*/React.createElement(
|
|
175
|
+
var button = fg('ptc-links-migrate-atlaskit-link-button') ? /*#__PURE__*/React.createElement(TeamsLinkButton, {
|
|
175
176
|
appearance: "default",
|
|
176
177
|
key: action.id || index,
|
|
177
178
|
onClick: function onClick(event) {
|
|
@@ -181,6 +182,20 @@ var Actions = function Actions(_ref) {
|
|
|
181
182
|
return onActionClick(action, args, event, index);
|
|
182
183
|
},
|
|
183
184
|
href: action.link || '',
|
|
185
|
+
intent: "action",
|
|
186
|
+
autoFocus: index === 0 && isTriggeredUsingKeyboard && !isRenderedInPortal,
|
|
187
|
+
id: "action-button-".concat(action.id),
|
|
188
|
+
"aria-labelledby": "action-button-".concat(action.id, " profilecard-name-label")
|
|
189
|
+
}, action.label, isKudos && /*#__PURE__*/React.createElement(AnimationWrapper, null, /*#__PURE__*/React.createElement(KudosBlobAnimation, null))) : /*#__PURE__*/React.createElement(LinkButton, {
|
|
190
|
+
appearance: "default",
|
|
191
|
+
key: action.id || index,
|
|
192
|
+
onClick: function onClick(event) {
|
|
193
|
+
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
194
|
+
args[_key2 - 1] = arguments[_key2];
|
|
195
|
+
}
|
|
196
|
+
return onActionClick(action, args, event, index);
|
|
197
|
+
},
|
|
198
|
+
href: action.link || '',
|
|
184
199
|
target: action.target,
|
|
185
200
|
autoFocus: index === 0 && isTriggeredUsingKeyboard && !isRenderedInPortal,
|
|
186
201
|
id: "action-button-".concat(action.id),
|
|
@@ -14,6 +14,7 @@ import React, { Suspense } from 'react';
|
|
|
14
14
|
import { GiveKudosLauncherLazy, KudosType } from '@atlaskit/give-kudos';
|
|
15
15
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
16
16
|
import { useAnalyticsEvents } from '@atlaskit/teams-app-internal-analytics';
|
|
17
|
+
import { TeamsNavigationProvider } from '@atlaskit/teams-app-internal-navigation';
|
|
17
18
|
import filterActions from '../../internal/filterActions';
|
|
18
19
|
import { CardWrapper } from '../../styled/UserTrigger';
|
|
19
20
|
import { ErrorMessage } from '../Error';
|
|
@@ -210,7 +211,14 @@ var ProfileCardResourced = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
210
211
|
cloudId: this.props.cloudId,
|
|
211
212
|
addFlag: this.props.addFlag,
|
|
212
213
|
onClose: this.closeKudosDrawer
|
|
213
|
-
})), /*#__PURE__*/React.createElement(
|
|
214
|
+
})), fg('ptc-links-migrate-atlaskit-link-button') ? /*#__PURE__*/React.createElement(TeamsNavigationProvider, {
|
|
215
|
+
value: {
|
|
216
|
+
forceExternalIntent: false,
|
|
217
|
+
navigate: function navigate() {}
|
|
218
|
+
}
|
|
219
|
+
}, /*#__PURE__*/React.createElement(ProfileCard, _extends({}, newProps, {
|
|
220
|
+
actions: this.filterActions()
|
|
221
|
+
}))) : /*#__PURE__*/React.createElement(ProfileCard, _extends({}, newProps, {
|
|
214
222
|
actions: this.filterActions()
|
|
215
223
|
}))));
|
|
216
224
|
}
|
|
@@ -15,6 +15,7 @@ import { GiveKudosLauncherLazy, KudosType } from '@atlaskit/give-kudos';
|
|
|
15
15
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
16
16
|
import Popup from '@atlaskit/popup';
|
|
17
17
|
import { useAnalyticsEvents } from '@atlaskit/teams-app-internal-analytics';
|
|
18
|
+
import { TeamsNavigationProvider } from '@atlaskit/teams-app-internal-navigation';
|
|
18
19
|
import { layers } from '@atlaskit/theme/constants';
|
|
19
20
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
20
21
|
import filterActionsInner from '../../internal/filterActions';
|
|
@@ -55,7 +56,7 @@ function ProfileCardContent(_ref) {
|
|
|
55
56
|
hideAiDisclaimer: hideAiDisclaimer
|
|
56
57
|
});
|
|
57
58
|
} else {
|
|
58
|
-
|
|
59
|
+
var profileCard = /*#__PURE__*/React.createElement(Suspense, {
|
|
59
60
|
fallback: null
|
|
60
61
|
}, /*#__PURE__*/React.createElement(ProfileCardLazy, _extends({}, profilecardProps, {
|
|
61
62
|
isRenderedInPortal: isRenderedInPortal,
|
|
@@ -64,6 +65,14 @@ function ProfileCardContent(_ref) {
|
|
|
64
65
|
errorType: errorType,
|
|
65
66
|
withoutElevation: true
|
|
66
67
|
})));
|
|
68
|
+
if (fg('ptc-links-migrate-atlaskit-link-button')) {
|
|
69
|
+
return /*#__PURE__*/React.createElement(TeamsNavigationProvider, {
|
|
70
|
+
value: {
|
|
71
|
+
navigate: function navigate() {}
|
|
72
|
+
}
|
|
73
|
+
}, profileCard);
|
|
74
|
+
}
|
|
75
|
+
return profileCard;
|
|
67
76
|
}
|
|
68
77
|
}
|
|
69
78
|
export default function ProfilecardTriggerNext(_ref2) {
|
|
@@ -5,7 +5,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
5
5
|
import { getPageTime } from './performance';
|
|
6
6
|
export var PACKAGE_META_DATA = {
|
|
7
7
|
packageName: (_process$env$_PACKAGE = "@atlaskit/profilecard") !== null && _process$env$_PACKAGE !== void 0 ? _process$env$_PACKAGE : '',
|
|
8
|
-
packageVersion: (_process$env$_PACKAGE2 = "24.
|
|
8
|
+
packageVersion: (_process$env$_PACKAGE2 = "24.47.0") !== null && _process$env$_PACKAGE2 !== void 0 ? _process$env$_PACKAGE2 : ''
|
|
9
9
|
};
|
|
10
10
|
var TEAM_SUBJECT = 'teamProfileCard';
|
|
11
11
|
var USER_SUBJECT = 'profilecard';
|
|
@@ -24,7 +24,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
24
24
|
actionSubjectId: actionSubjectId,
|
|
25
25
|
attributes: _objectSpread(_objectSpread({
|
|
26
26
|
packageName: "@atlaskit/profilecard",
|
|
27
|
-
packageVersion: "24.
|
|
27
|
+
packageVersion: "24.47.0"
|
|
28
28
|
}, attributes), {}, {
|
|
29
29
|
firedAt: Math.round(getPageTime())
|
|
30
30
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/profilecard",
|
|
3
|
-
"version": "24.
|
|
3
|
+
"version": "24.48.0",
|
|
4
4
|
"description": "A React component to display a card with user information.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@atlaskit/css": "^0.19.0",
|
|
48
48
|
"@atlaskit/dropdown-menu": "^16.8.0",
|
|
49
49
|
"@atlaskit/empty-state": "^10.1.0",
|
|
50
|
-
"@atlaskit/give-kudos": "^4.
|
|
50
|
+
"@atlaskit/give-kudos": "^4.19.0",
|
|
51
51
|
"@atlaskit/heading": "^5.3.0",
|
|
52
52
|
"@atlaskit/icon": "^34.0.0",
|
|
53
53
|
"@atlaskit/link": "3.3.4",
|
|
@@ -63,10 +63,11 @@
|
|
|
63
63
|
"@atlaskit/spinner": "^19.0.0",
|
|
64
64
|
"@atlaskit/teams-app-config": "^1.12.0",
|
|
65
65
|
"@atlaskit/teams-app-internal-analytics": "^1.27.0",
|
|
66
|
+
"@atlaskit/teams-app-internal-navigation": "^1.6.0",
|
|
66
67
|
"@atlaskit/teams-avatar": "^2.4.0",
|
|
67
68
|
"@atlaskit/teams-public": "^0.74.0",
|
|
68
69
|
"@atlaskit/theme": "^22.0.0",
|
|
69
|
-
"@atlaskit/tmp-editor-statsig": "^54.
|
|
70
|
+
"@atlaskit/tmp-editor-statsig": "^54.5.0",
|
|
70
71
|
"@atlaskit/tokens": "^11.4.0",
|
|
71
72
|
"@atlaskit/tooltip": "^21.1.0",
|
|
72
73
|
"@babel/runtime": "^7.0.0",
|
|
@@ -120,6 +121,9 @@
|
|
|
120
121
|
}
|
|
121
122
|
},
|
|
122
123
|
"platform-feature-flags": {
|
|
124
|
+
"ptc-links-migrate-atlaskit-link-button": {
|
|
125
|
+
"type": "boolean"
|
|
126
|
+
},
|
|
123
127
|
"enable_appropriate_reading_order_in_profile_card": {
|
|
124
128
|
"type": "boolean"
|
|
125
129
|
},
|