@atlaskit/profilecard 24.3.1 → 24.4.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.
Files changed (31) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/afm-passionfruit/tsconfig.json +117 -0
  3. package/afm-volt/tsconfig.json +7 -4
  4. package/dist/cjs/client/getOrgIdForCloudIdFromAGG.js +1 -1
  5. package/dist/cjs/client/getTeamFromAGG.js +1 -1
  6. package/dist/cjs/components/Team/TeamProfileCard.js +1 -0
  7. package/dist/cjs/components/User/OverflowProfileCardButtons.js +6 -2
  8. package/dist/cjs/components/User/ProfileCard.js +12 -5
  9. package/dist/cjs/messages.js +6 -0
  10. package/dist/cjs/util/analytics.js +1 -1
  11. package/dist/es2019/client/getOrgIdForCloudIdFromAGG.js +1 -1
  12. package/dist/es2019/client/getTeamFromAGG.js +1 -1
  13. package/dist/es2019/components/Team/TeamProfileCard.js +1 -0
  14. package/dist/es2019/components/User/OverflowProfileCardButtons.js +6 -2
  15. package/dist/es2019/components/User/ProfileCard.js +12 -5
  16. package/dist/es2019/messages.js +6 -0
  17. package/dist/es2019/util/analytics.js +1 -1
  18. package/dist/esm/client/getOrgIdForCloudIdFromAGG.js +1 -1
  19. package/dist/esm/client/getTeamFromAGG.js +1 -1
  20. package/dist/esm/components/Team/TeamProfileCard.js +1 -0
  21. package/dist/esm/components/User/OverflowProfileCardButtons.js +6 -2
  22. package/dist/esm/components/User/ProfileCard.js +12 -5
  23. package/dist/esm/messages.js +6 -0
  24. package/dist/esm/util/analytics.js +1 -1
  25. package/dist/types/components/User/OverflowProfileCardButtons.d.ts +1 -0
  26. package/dist/types/messages.d.ts +5 -0
  27. package/dist/types/types.d.ts +1 -0
  28. package/dist/types-ts4.5/components/User/OverflowProfileCardButtons.d.ts +1 -0
  29. package/dist/types-ts4.5/messages.d.ts +5 -0
  30. package/dist/types-ts4.5/types.d.ts +1 -0
  31. package/package.json +6 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # @atlaskit/profilecard
2
2
 
3
+ ## 24.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#200712](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/200712)
8
+ [`79f68c9a9ad77`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/79f68c9a9ad77) -
9
+ Allow target to be passed to action
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
15
+ ## 24.3.2
16
+
17
+ ### Patch Changes
18
+
19
+ - [`ddbbad68f52cd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ddbbad68f52cd) -
20
+ Actions button aria-label change to support screen reader to be more descriptive
21
+
3
22
  ## 24.3.1
4
23
 
5
24
  ### Patch Changes
@@ -0,0 +1,117 @@
1
+ {
2
+ "extends": "../../../../tsconfig.entry-points.passionfruit.json",
3
+ "compilerOptions": {
4
+ "declaration": true,
5
+ "target": "es5",
6
+ "outDir": "../../../../../passionfruit/tsDist/@atlaskit__profilecard/app",
7
+ "rootDir": "../",
8
+ "composite": true
9
+ },
10
+ "include": [
11
+ "../src/**/*.ts",
12
+ "../src/**/*.tsx"
13
+ ],
14
+ "exclude": [
15
+ "../src/**/__tests__/*",
16
+ "../src/**/*.test.*",
17
+ "../src/**/test.*",
18
+ "../src/**/examples.*",
19
+ "../src/**/examples/*",
20
+ "../src/**/examples/**/*",
21
+ "../src/**/*.stories.*",
22
+ "../src/**/stories/*",
23
+ "../src/**/stories/**/*"
24
+ ],
25
+ "references": [
26
+ {
27
+ "path": "../../../analytics/analytics-next/afm-passionfruit/tsconfig.json"
28
+ },
29
+ {
30
+ "path": "../../../uip/atlassian-context/afm-passionfruit/tsconfig.json"
31
+ },
32
+ {
33
+ "path": "../../../design-system/avatar/afm-passionfruit/tsconfig.json"
34
+ },
35
+ {
36
+ "path": "../../../design-system/avatar-group/afm-passionfruit/tsconfig.json"
37
+ },
38
+ {
39
+ "path": "../../../design-system/button/afm-passionfruit/tsconfig.json"
40
+ },
41
+ {
42
+ "path": "../../../design-system/css/afm-passionfruit/tsconfig.json"
43
+ },
44
+ {
45
+ "path": "../../../design-system/dropdown-menu/afm-passionfruit/tsconfig.json"
46
+ },
47
+ {
48
+ "path": "../../../design-system/empty-state/afm-passionfruit/tsconfig.json"
49
+ },
50
+ {
51
+ "path": "../../../measurement/feature-gate-js-client/afm-passionfruit/tsconfig.json"
52
+ },
53
+ {
54
+ "path": "../../../team-central/give-kudos/afm-passionfruit/tsconfig.json"
55
+ },
56
+ {
57
+ "path": "../../../design-system/heading/afm-passionfruit/tsconfig.json"
58
+ },
59
+ {
60
+ "path": "../../../design-system/icon/afm-passionfruit/tsconfig.json"
61
+ },
62
+ {
63
+ "path": "../../../design-system/link/afm-passionfruit/tsconfig.json"
64
+ },
65
+ {
66
+ "path": "../../../design-system/logo/afm-passionfruit/tsconfig.json"
67
+ },
68
+ {
69
+ "path": "../../../design-system/lozenge/afm-passionfruit/tsconfig.json"
70
+ },
71
+ {
72
+ "path": "../../../design-system/menu/afm-passionfruit/tsconfig.json"
73
+ },
74
+ {
75
+ "path": "../../../design-system/modal-dialog/afm-passionfruit/tsconfig.json"
76
+ },
77
+ {
78
+ "path": "../../people-teams-ui-public/afm-passionfruit/tsconfig.json"
79
+ },
80
+ {
81
+ "path": "../../../platform/feature-flags/afm-passionfruit/tsconfig.json"
82
+ },
83
+ {
84
+ "path": "../../../design-system/popup/afm-passionfruit/tsconfig.json"
85
+ },
86
+ {
87
+ "path": "../../../design-system/primitives/afm-passionfruit/tsconfig.json"
88
+ },
89
+ {
90
+ "path": "../../../ai-mate/rovo-agent-components/afm-passionfruit/tsconfig.json"
91
+ },
92
+ {
93
+ "path": "../../../ai-mate/rovo-triggers/afm-passionfruit/tsconfig.json"
94
+ },
95
+ {
96
+ "path": "../../../design-system/spinner/afm-passionfruit/tsconfig.json"
97
+ },
98
+ {
99
+ "path": "../../teams-app-config/afm-passionfruit/tsconfig.json"
100
+ },
101
+ {
102
+ "path": "../../teams-avatar/afm-passionfruit/tsconfig.json"
103
+ },
104
+ {
105
+ "path": "../../teams-public/afm-passionfruit/tsconfig.json"
106
+ },
107
+ {
108
+ "path": "../../../design-system/theme/afm-passionfruit/tsconfig.json"
109
+ },
110
+ {
111
+ "path": "../../../design-system/tokens/afm-passionfruit/tsconfig.json"
112
+ },
113
+ {
114
+ "path": "../../../design-system/tooltip/afm-passionfruit/tsconfig.json"
115
+ }
116
+ ]
117
+ }
@@ -14,7 +14,13 @@
14
14
  "exclude": [
15
15
  "../src/**/__tests__/*",
16
16
  "../src/**/*.test.*",
17
- "../src/**/test.*"
17
+ "../src/**/test.*",
18
+ "../src/**/examples.*",
19
+ "../src/**/examples/*",
20
+ "../src/**/examples/**/*",
21
+ "../src/**/*.stories.*",
22
+ "../src/**/stories/*",
23
+ "../src/**/stories/**/*"
18
24
  ],
19
25
  "references": [
20
26
  {
@@ -44,9 +50,6 @@
44
50
  {
45
51
  "path": "../../../measurement/feature-gate-js-client/afm-volt/tsconfig.json"
46
52
  },
47
- {
48
- "path": "../../../design-system/focus-ring/afm-volt/tsconfig.json"
49
- },
50
53
  {
51
54
  "path": "../../../team-central/give-kudos/afm-volt/tsconfig.json"
52
55
  },
@@ -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.3.0");
14
+ headers.append('atl-client-version', "24.3.2");
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.3.0");
68
+ headers.append('atl-client-version', "24.3.2");
69
69
  return headers;
70
70
  };
71
71
  function getTeamFromAGG(_x, _x2, _x3) {
@@ -157,6 +157,7 @@ var ActionButton = function ActionButton(_ref2) {
157
157
  key: action.id || index,
158
158
  onClick: onActionClick(action, analytics, index),
159
159
  href: action.link || '',
160
+ target: action.target,
160
161
  shouldFitContainer: true
161
162
  }, action.label, isGiveKudosActionButton && /*#__PURE__*/_react.default.createElement(_Card.AnimationWrapper, null, /*#__PURE__*/_react.default.createElement(_Card.KudosBlobAnimation, null)));
162
163
  if (isGiveKudosActionButton) {
@@ -14,6 +14,7 @@ var _reactIntlNext = require("react-intl-next");
14
14
  var _new = require("@atlaskit/button/new");
15
15
  var _dropdownMenu = _interopRequireWildcard(require("@atlaskit/dropdown-menu"));
16
16
  var _showMoreHorizontalMore = _interopRequireDefault(require("@atlaskit/icon/core/migration/show-more-horizontal--more"));
17
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
17
18
  var _messages = _interopRequireDefault(require("../../messages"));
18
19
  var _Card = require("../../styled/Card");
19
20
  var _analytics = require("../../util/analytics");
@@ -57,7 +58,9 @@ var OverflowProfileCardButtons = exports.OverflowProfileCardButtons = function O
57
58
  type: "button"
58
59
  }, providedProps, {
59
60
  ref: triggerRef,
60
- label: intl.formatMessage(_messages.default.profileCardMoreIconLabel),
61
+ label: (0, _platformFeatureFlags.fg)('jfp_a11y_team_profile_card_actions_label') ? intl.formatMessage(_messages.default.profileCardMoreIconLabelWithName, {
62
+ fullName: props.fullName
63
+ }) : intl.formatMessage(_messages.default.profileCardMoreIconLabel),
61
64
  icon: _showMoreHorizontalMore.default
62
65
  }));
63
66
  }
@@ -70,7 +73,8 @@ var OverflowProfileCardButtons = exports.OverflowProfileCardButtons = function O
70
73
  }
71
74
  onItemClick(action, args, event, index);
72
75
  },
73
- href: action.link
76
+ href: action.link,
77
+ target: action.target
74
78
  }, action.label);
75
79
  }))));
76
80
  };
@@ -131,16 +131,20 @@ var ProfilecardInternal = exports.ProfilecardInternal = function ProfilecardInte
131
131
  })), /*#__PURE__*/_react.default.createElement(_Card.CardContent, null, /*#__PURE__*/_react.default.createElement(_ProfileCardDetails.ProfileCardDetails, (0, _extends2.default)({}, props, {
132
132
  status: status,
133
133
  fireAnalyticsWithDuration: fireAnalyticsWithDuration
134
- })), realActions && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Card.ActionsFlexSpacer, null), /*#__PURE__*/_react.default.createElement(Actions, {
134
+ })), realActions && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Card.ActionsFlexSpacer, null), /*#__PURE__*/_react.default.createElement(Actions, (0, _extends2.default)({}, (0, _platformFeatureFlags.fg)('jfp_a11y_team_profile_card_actions_label') && {
135
+ fullName: fullName
136
+ }, {
137
+ fullName: fullName,
135
138
  actions: realActions,
136
139
  fireAnalyticsWithDuration: fireAnalyticsWithDuration,
137
140
  isTriggeredUsingKeyboard: props.isTriggeredUsingKeyboard
138
- })))));
141
+ }))))));
139
142
  };
140
143
  var Actions = function Actions(_ref) {
141
144
  var actions = _ref.actions,
142
145
  fireAnalyticsWithDuration = _ref.fireAnalyticsWithDuration,
143
- isTriggeredUsingKeyboard = _ref.isTriggeredUsingKeyboard;
146
+ isTriggeredUsingKeyboard = _ref.isTriggeredUsingKeyboard,
147
+ fullName = _ref.fullName;
144
148
  var onActionClick = (0, _react.useCallback)(function (action, args, event, index) {
145
149
  fireAnalyticsWithDuration(function (duration) {
146
150
  return (0, _analytics.actionClicked)('user', {
@@ -175,6 +179,7 @@ var Actions = function Actions(_ref) {
175
179
  return onActionClick(action, args, event, index);
176
180
  },
177
181
  href: action.link || '',
182
+ target: action.target,
178
183
  autoFocus: index === 0 && isTriggeredUsingKeyboard,
179
184
  id: "action-button-".concat(action.id),
180
185
  "aria-labelledby": (0, _platformFeatureFlags.fg)('enable_userprofilecard_arialabelfix') ? "action-button-".concat(action.id, " profilecard-name-label") : ''
@@ -185,13 +190,15 @@ var Actions = function Actions(_ref) {
185
190
  }, button);
186
191
  }
187
192
  return button;
188
- }), overflowActions && /*#__PURE__*/_react.default.createElement(_OverflowProfileCardButtons.OverflowProfileCardButtons, {
193
+ }), overflowActions && /*#__PURE__*/_react.default.createElement(_OverflowProfileCardButtons.OverflowProfileCardButtons, (0, _extends2.default)({
189
194
  actions: overflowActions,
190
195
  fireAnalyticsWithDuration: fireAnalyticsWithDuration,
191
196
  onItemClick: function onItemClick(action, args, event, index) {
192
197
  return onActionClick(action, args, event, index + _OverflowProfileCardButtons.ACTION_OVERFLOW_THRESHOLD);
193
198
  }
194
- }));
199
+ }, (0, _platformFeatureFlags.fg)('jfp_a11y_team_profile_card_actions_label') && {
200
+ fullName: fullName
201
+ })));
195
202
  };
196
203
  var LoadingView = function LoadingView(_ref2) {
197
204
  var fireAnalyticsWithDuration = _ref2.fireAnalyticsWithDuration;
@@ -166,11 +166,17 @@ var messages = (0, _reactIntlNext.defineMessages)({
166
166
  defaultMessage: 'Give kudos',
167
167
  description: 'Title for the button on the profile card for a user to give a kudos'
168
168
  },
169
+ // Remove this as part of the FG Cleanup for jfp_a11y_team_profile_card_actions_label
169
170
  profileCardMoreIconLabel: {
170
171
  id: 'pt.profile-card.more-icon-label',
171
172
  defaultMessage: 'More',
172
173
  description: 'Label for the meatballs icon on the profile card, which when clicked will provide more options'
173
174
  },
175
+ profileCardMoreIconLabelWithName: {
176
+ id: 'pt.profile-card.more-icon-label-with-name',
177
+ defaultMessage: 'More actions for {fullName}',
178
+ description: 'Label for the meatballs icon on the profile card, which when clicked will provide more options'
179
+ },
174
180
  profileCardMoreReportingLinesLabel: {
175
181
  id: 'pt.user-profile-card.reporting-lines.more-icon-label',
176
182
  defaultMessage: '+{count} more {count, plural, one {profile} other {profiles}}',
@@ -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.3.0"
48
+ packageVersion: "24.3.2"
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.3.0");
9
+ headers.append('atl-client-version', "24.3.2");
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.3.0");
77
+ headers.append('atl-client-version', "24.3.2");
78
78
  return headers;
79
79
  };
80
80
  export async function getTeamFromAGG(url, teamId, siteId) {
@@ -137,6 +137,7 @@ const ActionButton = ({
137
137
  key: action.id || index,
138
138
  onClick: onActionClick(action, analytics, index),
139
139
  href: action.link || '',
140
+ target: action.target,
140
141
  shouldFitContainer: true
141
142
  }, action.label, isGiveKudosActionButton && /*#__PURE__*/React.createElement(AnimationWrapper, null, /*#__PURE__*/React.createElement(KudosBlobAnimation, null)));
142
143
  if (isGiveKudosActionButton) {
@@ -4,6 +4,7 @@ import { useIntl } from 'react-intl-next';
4
4
  import { IconButton } from '@atlaskit/button/new';
5
5
  import DropdownMenu, { DropdownItem, DropdownItemGroup } from '@atlaskit/dropdown-menu';
6
6
  import MoreIcon from '@atlaskit/icon/core/migration/show-more-horizontal--more';
7
+ import { fg } from '@atlaskit/platform-feature-flags';
7
8
  import messages from '../../messages';
8
9
  import { OverflowActionButtonsWrapper } from '../../styled/Card';
9
10
  import { moreActionsClicked } from '../../util/analytics';
@@ -45,7 +46,9 @@ export const OverflowProfileCardButtons = props => {
45
46
  type: "button"
46
47
  }, providedProps, {
47
48
  ref: triggerRef,
48
- label: intl.formatMessage(messages.profileCardMoreIconLabel),
49
+ label: fg('jfp_a11y_team_profile_card_actions_label') ? intl.formatMessage(messages.profileCardMoreIconLabelWithName, {
50
+ fullName: props.fullName
51
+ }) : intl.formatMessage(messages.profileCardMoreIconLabel),
49
52
  icon: MoreIcon
50
53
  }));
51
54
  }
@@ -54,6 +57,7 @@ export const OverflowProfileCardButtons = props => {
54
57
  onClick: (event, ...args) => {
55
58
  onItemClick(action, args, event, index);
56
59
  },
57
- href: action.link
60
+ href: action.link,
61
+ target: action.target
58
62
  }, action.label)))));
59
63
  };
@@ -119,16 +119,20 @@ export const ProfilecardInternal = props => {
119
119
  })), /*#__PURE__*/React.createElement(CardContent, null, /*#__PURE__*/React.createElement(ProfileCardDetails, _extends({}, props, {
120
120
  status: status,
121
121
  fireAnalyticsWithDuration: fireAnalyticsWithDuration
122
- })), realActions && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ActionsFlexSpacer, null), /*#__PURE__*/React.createElement(Actions, {
122
+ })), realActions && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ActionsFlexSpacer, null), /*#__PURE__*/React.createElement(Actions, _extends({}, fg('jfp_a11y_team_profile_card_actions_label') && {
123
+ fullName
124
+ }, {
125
+ fullName: fullName,
123
126
  actions: realActions,
124
127
  fireAnalyticsWithDuration: fireAnalyticsWithDuration,
125
128
  isTriggeredUsingKeyboard: props.isTriggeredUsingKeyboard
126
- })))));
129
+ }))))));
127
130
  };
128
131
  const Actions = ({
129
132
  actions,
130
133
  fireAnalyticsWithDuration,
131
- isTriggeredUsingKeyboard
134
+ isTriggeredUsingKeyboard,
135
+ fullName
132
136
  }) => {
133
137
  const onActionClick = useCallback((action, args, event, index) => {
134
138
  fireAnalyticsWithDuration(duration => actionClicked('user', {
@@ -157,6 +161,7 @@ const Actions = ({
157
161
  key: action.id || index,
158
162
  onClick: (event, ...args) => onActionClick(action, args, event, index),
159
163
  href: action.link || '',
164
+ target: action.target,
160
165
  autoFocus: index === 0 && isTriggeredUsingKeyboard,
161
166
  id: `action-button-${action.id}`,
162
167
  "aria-labelledby": fg('enable_userprofilecard_arialabelfix') ? `action-button-${action.id} profilecard-name-label` : ''
@@ -167,11 +172,13 @@ const Actions = ({
167
172
  }, button);
168
173
  }
169
174
  return button;
170
- }), overflowActions && /*#__PURE__*/React.createElement(OverflowProfileCardButtons, {
175
+ }), overflowActions && /*#__PURE__*/React.createElement(OverflowProfileCardButtons, _extends({
171
176
  actions: overflowActions,
172
177
  fireAnalyticsWithDuration: fireAnalyticsWithDuration,
173
178
  onItemClick: (action, args, event, index) => onActionClick(action, args, event, index + ACTION_OVERFLOW_THRESHOLD)
174
- }));
179
+ }, fg('jfp_a11y_team_profile_card_actions_label') && {
180
+ fullName
181
+ })));
175
182
  };
176
183
  const LoadingView = ({
177
184
  fireAnalyticsWithDuration
@@ -160,11 +160,17 @@ const messages = defineMessages({
160
160
  defaultMessage: 'Give kudos',
161
161
  description: 'Title for the button on the profile card for a user to give a kudos'
162
162
  },
163
+ // Remove this as part of the FG Cleanup for jfp_a11y_team_profile_card_actions_label
163
164
  profileCardMoreIconLabel: {
164
165
  id: 'pt.profile-card.more-icon-label',
165
166
  defaultMessage: 'More',
166
167
  description: 'Label for the meatballs icon on the profile card, which when clicked will provide more options'
167
168
  },
169
+ profileCardMoreIconLabelWithName: {
170
+ id: 'pt.profile-card.more-icon-label-with-name',
171
+ defaultMessage: 'More actions for {fullName}',
172
+ description: 'Label for the meatballs icon on the profile card, which when clicked will provide more options'
173
+ },
168
174
  profileCardMoreReportingLinesLabel: {
169
175
  id: 'pt.user-profile-card.reporting-lines.more-icon-label',
170
176
  defaultMessage: '+{count} more {count, plural, one {profile} other {profiles}}',
@@ -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.3.0",
35
+ packageVersion: "24.3.2",
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.3.0");
7
+ headers.append('atl-client-version', "24.3.2");
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.3.0");
59
+ headers.append('atl-client-version', "24.3.2");
60
60
  return headers;
61
61
  };
62
62
  export function getTeamFromAGG(_x, _x2, _x3) {
@@ -148,6 +148,7 @@ var ActionButton = function ActionButton(_ref2) {
148
148
  key: action.id || index,
149
149
  onClick: onActionClick(action, analytics, index),
150
150
  href: action.link || '',
151
+ target: action.target,
151
152
  shouldFitContainer: true
152
153
  }, action.label, isGiveKudosActionButton && /*#__PURE__*/React.createElement(AnimationWrapper, null, /*#__PURE__*/React.createElement(KudosBlobAnimation, null)));
153
154
  if (isGiveKudosActionButton) {
@@ -7,6 +7,7 @@ import { useIntl } from 'react-intl-next';
7
7
  import { IconButton } from '@atlaskit/button/new';
8
8
  import DropdownMenu, { DropdownItem, DropdownItemGroup } from '@atlaskit/dropdown-menu';
9
9
  import MoreIcon from '@atlaskit/icon/core/migration/show-more-horizontal--more';
10
+ import { fg } from '@atlaskit/platform-feature-flags';
10
11
  import messages from '../../messages';
11
12
  import { OverflowActionButtonsWrapper } from '../../styled/Card';
12
13
  import { moreActionsClicked } from '../../util/analytics';
@@ -48,7 +49,9 @@ export var OverflowProfileCardButtons = function OverflowProfileCardButtons(prop
48
49
  type: "button"
49
50
  }, providedProps, {
50
51
  ref: triggerRef,
51
- label: intl.formatMessage(messages.profileCardMoreIconLabel),
52
+ label: fg('jfp_a11y_team_profile_card_actions_label') ? intl.formatMessage(messages.profileCardMoreIconLabelWithName, {
53
+ fullName: props.fullName
54
+ }) : intl.formatMessage(messages.profileCardMoreIconLabel),
52
55
  icon: MoreIcon
53
56
  }));
54
57
  }
@@ -61,7 +64,8 @@ export var OverflowProfileCardButtons = function OverflowProfileCardButtons(prop
61
64
  }
62
65
  onItemClick(action, args, event, index);
63
66
  },
64
- href: action.link
67
+ href: action.link,
68
+ target: action.target
65
69
  }, action.label);
66
70
  }))));
67
71
  };
@@ -122,16 +122,20 @@ export var ProfilecardInternal = function ProfilecardInternal(props) {
122
122
  })), /*#__PURE__*/React.createElement(CardContent, null, /*#__PURE__*/React.createElement(ProfileCardDetails, _extends({}, props, {
123
123
  status: status,
124
124
  fireAnalyticsWithDuration: fireAnalyticsWithDuration
125
- })), realActions && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ActionsFlexSpacer, null), /*#__PURE__*/React.createElement(Actions, {
125
+ })), realActions && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ActionsFlexSpacer, null), /*#__PURE__*/React.createElement(Actions, _extends({}, fg('jfp_a11y_team_profile_card_actions_label') && {
126
+ fullName: fullName
127
+ }, {
128
+ fullName: fullName,
126
129
  actions: realActions,
127
130
  fireAnalyticsWithDuration: fireAnalyticsWithDuration,
128
131
  isTriggeredUsingKeyboard: props.isTriggeredUsingKeyboard
129
- })))));
132
+ }))))));
130
133
  };
131
134
  var Actions = function Actions(_ref) {
132
135
  var actions = _ref.actions,
133
136
  fireAnalyticsWithDuration = _ref.fireAnalyticsWithDuration,
134
- isTriggeredUsingKeyboard = _ref.isTriggeredUsingKeyboard;
137
+ isTriggeredUsingKeyboard = _ref.isTriggeredUsingKeyboard,
138
+ fullName = _ref.fullName;
135
139
  var onActionClick = useCallback(function (action, args, event, index) {
136
140
  fireAnalyticsWithDuration(function (duration) {
137
141
  return actionClicked('user', {
@@ -166,6 +170,7 @@ var Actions = function Actions(_ref) {
166
170
  return onActionClick(action, args, event, index);
167
171
  },
168
172
  href: action.link || '',
173
+ target: action.target,
169
174
  autoFocus: index === 0 && isTriggeredUsingKeyboard,
170
175
  id: "action-button-".concat(action.id),
171
176
  "aria-labelledby": fg('enable_userprofilecard_arialabelfix') ? "action-button-".concat(action.id, " profilecard-name-label") : ''
@@ -176,13 +181,15 @@ var Actions = function Actions(_ref) {
176
181
  }, button);
177
182
  }
178
183
  return button;
179
- }), overflowActions && /*#__PURE__*/React.createElement(OverflowProfileCardButtons, {
184
+ }), overflowActions && /*#__PURE__*/React.createElement(OverflowProfileCardButtons, _extends({
180
185
  actions: overflowActions,
181
186
  fireAnalyticsWithDuration: fireAnalyticsWithDuration,
182
187
  onItemClick: function onItemClick(action, args, event, index) {
183
188
  return onActionClick(action, args, event, index + ACTION_OVERFLOW_THRESHOLD);
184
189
  }
185
- }));
190
+ }, fg('jfp_a11y_team_profile_card_actions_label') && {
191
+ fullName: fullName
192
+ })));
186
193
  };
187
194
  var LoadingView = function LoadingView(_ref2) {
188
195
  var fireAnalyticsWithDuration = _ref2.fireAnalyticsWithDuration;
@@ -160,11 +160,17 @@ var messages = defineMessages({
160
160
  defaultMessage: 'Give kudos',
161
161
  description: 'Title for the button on the profile card for a user to give a kudos'
162
162
  },
163
+ // Remove this as part of the FG Cleanup for jfp_a11y_team_profile_card_actions_label
163
164
  profileCardMoreIconLabel: {
164
165
  id: 'pt.profile-card.more-icon-label',
165
166
  defaultMessage: 'More',
166
167
  description: 'Label for the meatballs icon on the profile card, which when clicked will provide more options'
167
168
  },
169
+ profileCardMoreIconLabelWithName: {
170
+ id: 'pt.profile-card.more-icon-label-with-name',
171
+ defaultMessage: 'More actions for {fullName}',
172
+ description: 'Label for the meatballs icon on the profile card, which when clicked will provide more options'
173
+ },
168
174
  profileCardMoreReportingLinesLabel: {
169
175
  id: 'pt.user-profile-card.reporting-lines.more-icon-label',
170
176
  defaultMessage: '+{count} more {count, plural, one {profile} other {profiles}}',
@@ -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.3.0"
42
+ packageVersion: "24.3.2"
43
43
  }, attributes), {}, {
44
44
  firedAt: Math.round(getPageTime())
45
45
  })
@@ -3,6 +3,7 @@ import { type AnalyticsWithDurationProps, type ProfileCardAction } from '../../t
3
3
  type OverflowButtonsProps = {
4
4
  actions: ProfileCardAction[];
5
5
  onItemClick: (action: ProfileCardAction, args: any, event: React.MouseEvent | React.KeyboardEvent, index: number) => void;
6
+ fullName?: string;
6
7
  } & AnalyticsWithDurationProps;
7
8
  export declare const ACTION_OVERFLOW_THRESHOLD = 2;
8
9
  export declare const OverflowProfileCardButtons: (props: OverflowButtonsProps) => React.JSX.Element;
@@ -164,6 +164,11 @@ declare const messages: {
164
164
  defaultMessage: string;
165
165
  description: string;
166
166
  };
167
+ profileCardMoreIconLabelWithName: {
168
+ id: string;
169
+ defaultMessage: string;
170
+ description: string;
171
+ };
167
172
  profileCardMoreReportingLinesLabel: {
168
173
  id: string;
169
174
  defaultMessage: string;
@@ -370,6 +370,7 @@ export interface ProfileCardAction {
370
370
  id?: string;
371
371
  label: React.ReactNode;
372
372
  link?: string;
373
+ target?: string;
373
374
  }
374
375
  export type LozengeColor = 'default' | 'success' | 'removed' | 'inprogress' | 'new' | 'moved';
375
376
  export interface LozengeProps {
@@ -3,6 +3,7 @@ import { type AnalyticsWithDurationProps, type ProfileCardAction } from '../../t
3
3
  type OverflowButtonsProps = {
4
4
  actions: ProfileCardAction[];
5
5
  onItemClick: (action: ProfileCardAction, args: any, event: React.MouseEvent | React.KeyboardEvent, index: number) => void;
6
+ fullName?: string;
6
7
  } & AnalyticsWithDurationProps;
7
8
  export declare const ACTION_OVERFLOW_THRESHOLD = 2;
8
9
  export declare const OverflowProfileCardButtons: (props: OverflowButtonsProps) => React.JSX.Element;
@@ -164,6 +164,11 @@ declare const messages: {
164
164
  defaultMessage: string;
165
165
  description: string;
166
166
  };
167
+ profileCardMoreIconLabelWithName: {
168
+ id: string;
169
+ defaultMessage: string;
170
+ description: string;
171
+ };
167
172
  profileCardMoreReportingLinesLabel: {
168
173
  id: string;
169
174
  defaultMessage: string;
@@ -376,6 +376,7 @@ export interface ProfileCardAction {
376
376
  id?: string;
377
377
  label: React.ReactNode;
378
378
  link?: string;
379
+ target?: string;
379
380
  }
380
381
  export type LozengeColor = 'default' | 'success' | 'removed' | 'inprogress' | 'new' | 'moved';
381
382
  export interface LozengeProps {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/profilecard",
3
- "version": "24.3.1",
3
+ "version": "24.4.0",
4
4
  "description": "A React component to display a card with user information.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -61,11 +61,11 @@
61
61
  "@atlaskit/feature-gate-js-client": "^5.5.0",
62
62
  "@atlaskit/give-kudos": "^4.3.0",
63
63
  "@atlaskit/heading": "^5.2.0",
64
- "@atlaskit/icon": "^27.11.0",
64
+ "@atlaskit/icon": "^27.12.0",
65
65
  "@atlaskit/link": "^3.2.0",
66
66
  "@atlaskit/logo": "^19.6.0",
67
67
  "@atlaskit/lozenge": "^13.0.0",
68
- "@atlaskit/menu": "^8.1.0",
68
+ "@atlaskit/menu": "^8.3.0",
69
69
  "@atlaskit/modal-dialog": "^14.3.0",
70
70
  "@atlaskit/people-teams-ui-public": "^3.1.0",
71
71
  "@atlaskit/platform-feature-flags": "^1.1.0",
@@ -176,6 +176,9 @@
176
176
  },
177
177
  "agent_studio_fe_permissions_settings_m1": {
178
178
  "type": "boolean"
179
+ },
180
+ "jfp_a11y_team_profile_card_actions_label": {
181
+ "type": "boolean"
179
182
  }
180
183
  },
181
184
  "sideEffects": [