@atlaskit/profilecard 20.8.2 → 20.9.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 (33) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/afm-jira/tsconfig.json +83 -83
  3. package/afm-post-office/tsconfig.json +83 -83
  4. package/dist/cjs/client/UserProfileCardClient.js +6 -37
  5. package/dist/cjs/client/getOrgIdForCloudIdFromAGG.js +1 -1
  6. package/dist/cjs/client/getTeamFromAGG.js +1 -1
  7. package/dist/cjs/components/User/ProfileCardDetails.js +40 -1
  8. package/dist/cjs/components/User/ProfileCardTrigger.js +4 -1
  9. package/dist/cjs/components/User/ReportingLinesDetails.js +20 -2
  10. package/dist/cjs/mocks/simple-mock-clients.js +2 -1
  11. package/dist/cjs/util/analytics.js +1 -1
  12. package/dist/es2019/client/UserProfileCardClient.js +28 -69
  13. package/dist/es2019/client/getOrgIdForCloudIdFromAGG.js +1 -1
  14. package/dist/es2019/client/getTeamFromAGG.js +1 -1
  15. package/dist/es2019/components/User/ProfileCardDetails.js +40 -1
  16. package/dist/es2019/components/User/ProfileCardTrigger.js +4 -1
  17. package/dist/es2019/components/User/ReportingLinesDetails.js +20 -2
  18. package/dist/es2019/mocks/simple-mock-clients.js +2 -1
  19. package/dist/es2019/util/analytics.js +1 -1
  20. package/dist/esm/client/UserProfileCardClient.js +6 -37
  21. package/dist/esm/client/getOrgIdForCloudIdFromAGG.js +1 -1
  22. package/dist/esm/client/getTeamFromAGG.js +1 -1
  23. package/dist/esm/components/User/ProfileCardDetails.js +40 -1
  24. package/dist/esm/components/User/ProfileCardTrigger.js +4 -1
  25. package/dist/esm/components/User/ReportingLinesDetails.js +20 -2
  26. package/dist/esm/mocks/simple-mock-clients.js +2 -1
  27. package/dist/esm/util/analytics.js +1 -1
  28. package/dist/types/client/UserProfileCardClient.d.ts +0 -12
  29. package/dist/types/types.d.ts +1 -9
  30. package/dist/types-ts4.5/client/UserProfileCardClient.d.ts +0 -12
  31. package/dist/types-ts4.5/types.d.ts +1 -9
  32. package/package.json +7 -7
  33. package/.eslintrc +0 -14
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @atlaskit/profilecard
2
2
 
3
+ ## 20.9.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`2e6586eb695c1`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/2e6586eb695c1) -
8
+ Clean up feature flag migrate_cloud_user_to_agg_user_query_profile_card
9
+
10
+ ## 20.8.3
11
+
12
+ ### Patch Changes
13
+
14
+ - [#159176](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/159176)
15
+ [`b8e7f2a47aae5`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b8e7f2a47aae5) -
16
+ A11Y-7954 Fix expandable button reading order
17
+
3
18
  ## 20.8.2
4
19
 
5
20
  ### Patch Changes
@@ -1,84 +1,84 @@
1
1
  {
2
- "extends": "../../../../tsconfig.entry-points.jira.json",
3
- "compilerOptions": {
4
- "declaration": true,
5
- "target": "es5",
6
- "outDir": "../../../../../tsDist/@atlaskit__profilecard/app",
7
- "composite": true,
8
- "rootDir": "../"
9
- },
10
- "include": [
11
- "../src/**/*.ts",
12
- "../src/**/*.tsx"
13
- ],
14
- "exclude": [
15
- "../src/**/__tests__/*",
16
- "../src/**/*.test.*",
17
- "../src/**/test.*"
18
- ],
19
- "references": [
20
- {
21
- "path": "../../../analytics/analytics-next/afm-jira/tsconfig.json"
22
- },
23
- {
24
- "path": "../../../uip/atlassian-context/afm-jira/tsconfig.json"
25
- },
26
- {
27
- "path": "../../../design-system/avatar/afm-jira/tsconfig.json"
28
- },
29
- {
30
- "path": "../../../design-system/avatar-group/afm-jira/tsconfig.json"
31
- },
32
- {
33
- "path": "../../../design-system/button/afm-jira/tsconfig.json"
34
- },
35
- {
36
- "path": "../../../design-system/dropdown-menu/afm-jira/tsconfig.json"
37
- },
38
- {
39
- "path": "../../../design-system/empty-state/afm-jira/tsconfig.json"
40
- },
41
- {
42
- "path": "../../../design-system/focus-ring/afm-jira/tsconfig.json"
43
- },
44
- {
45
- "path": "../../../team-central/give-kudos/afm-jira/tsconfig.json"
46
- },
47
- {
48
- "path": "../../../design-system/icon/afm-jira/tsconfig.json"
49
- },
50
- {
51
- "path": "../../../design-system/lozenge/afm-jira/tsconfig.json"
52
- },
53
- {
54
- "path": "../../../design-system/menu/afm-jira/tsconfig.json"
55
- },
56
- {
57
- "path": "../../../design-system/modal-dialog/afm-jira/tsconfig.json"
58
- },
59
- {
60
- "path": "../../../platform/feature-flags/afm-jira/tsconfig.json"
61
- },
62
- {
63
- "path": "../../../design-system/popup/afm-jira/tsconfig.json"
64
- },
65
- {
66
- "path": "../../../design-system/primitives/afm-jira/tsconfig.json"
67
- },
68
- {
69
- "path": "../../../ai-mate/rovo-agent-components/afm-jira/tsconfig.json"
70
- },
71
- {
72
- "path": "../../../design-system/spinner/afm-jira/tsconfig.json"
73
- },
74
- {
75
- "path": "../../../design-system/theme/afm-jira/tsconfig.json"
76
- },
77
- {
78
- "path": "../../../design-system/tokens/afm-jira/tsconfig.json"
79
- },
80
- {
81
- "path": "../../../design-system/tooltip/afm-jira/tsconfig.json"
82
- }
83
- ]
84
- }
2
+ "extends": "../../../../tsconfig.entry-points.jira.json",
3
+ "compilerOptions": {
4
+ "declaration": true,
5
+ "target": "es5",
6
+ "outDir": "../../../../../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
+ ],
19
+ "references": [
20
+ {
21
+ "path": "../../../analytics/analytics-next/afm-jira/tsconfig.json"
22
+ },
23
+ {
24
+ "path": "../../../uip/atlassian-context/afm-jira/tsconfig.json"
25
+ },
26
+ {
27
+ "path": "../../../design-system/avatar/afm-jira/tsconfig.json"
28
+ },
29
+ {
30
+ "path": "../../../design-system/avatar-group/afm-jira/tsconfig.json"
31
+ },
32
+ {
33
+ "path": "../../../design-system/button/afm-jira/tsconfig.json"
34
+ },
35
+ {
36
+ "path": "../../../design-system/dropdown-menu/afm-jira/tsconfig.json"
37
+ },
38
+ {
39
+ "path": "../../../design-system/empty-state/afm-jira/tsconfig.json"
40
+ },
41
+ {
42
+ "path": "../../../design-system/focus-ring/afm-jira/tsconfig.json"
43
+ },
44
+ {
45
+ "path": "../../../team-central/give-kudos/afm-jira/tsconfig.json"
46
+ },
47
+ {
48
+ "path": "../../../design-system/icon/afm-jira/tsconfig.json"
49
+ },
50
+ {
51
+ "path": "../../../design-system/lozenge/afm-jira/tsconfig.json"
52
+ },
53
+ {
54
+ "path": "../../../design-system/menu/afm-jira/tsconfig.json"
55
+ },
56
+ {
57
+ "path": "../../../design-system/modal-dialog/afm-jira/tsconfig.json"
58
+ },
59
+ {
60
+ "path": "../../../platform/feature-flags/afm-jira/tsconfig.json"
61
+ },
62
+ {
63
+ "path": "../../../design-system/popup/afm-jira/tsconfig.json"
64
+ },
65
+ {
66
+ "path": "../../../design-system/primitives/afm-jira/tsconfig.json"
67
+ },
68
+ {
69
+ "path": "../../../ai-mate/rovo-agent-components/afm-jira/tsconfig.json"
70
+ },
71
+ {
72
+ "path": "../../../design-system/spinner/afm-jira/tsconfig.json"
73
+ },
74
+ {
75
+ "path": "../../../design-system/theme/afm-jira/tsconfig.json"
76
+ },
77
+ {
78
+ "path": "../../../design-system/tokens/afm-jira/tsconfig.json"
79
+ },
80
+ {
81
+ "path": "../../../design-system/tooltip/afm-jira/tsconfig.json"
82
+ }
83
+ ]
84
+ }
@@ -1,84 +1,84 @@
1
1
  {
2
- "extends": "../../../../tsconfig.entry-points.post-office.json",
3
- "compilerOptions": {
4
- "declaration": true,
5
- "target": "es5",
6
- "outDir": "../../../../../tsDist/@atlaskit__profilecard/app",
7
- "composite": true,
8
- "rootDir": "../"
9
- },
10
- "include": [
11
- "../src/**/*.ts",
12
- "../src/**/*.tsx"
13
- ],
14
- "exclude": [
15
- "../src/**/__tests__/*",
16
- "../src/**/*.test.*",
17
- "../src/**/test.*"
18
- ],
19
- "references": [
20
- {
21
- "path": "../../../analytics/analytics-next/afm-post-office/tsconfig.json"
22
- },
23
- {
24
- "path": "../../../uip/atlassian-context/afm-post-office/tsconfig.json"
25
- },
26
- {
27
- "path": "../../../design-system/avatar/afm-post-office/tsconfig.json"
28
- },
29
- {
30
- "path": "../../../design-system/avatar-group/afm-post-office/tsconfig.json"
31
- },
32
- {
33
- "path": "../../../design-system/button/afm-post-office/tsconfig.json"
34
- },
35
- {
36
- "path": "../../../design-system/dropdown-menu/afm-post-office/tsconfig.json"
37
- },
38
- {
39
- "path": "../../../design-system/empty-state/afm-post-office/tsconfig.json"
40
- },
41
- {
42
- "path": "../../../design-system/focus-ring/afm-post-office/tsconfig.json"
43
- },
44
- {
45
- "path": "../../../team-central/give-kudos/afm-post-office/tsconfig.json"
46
- },
47
- {
48
- "path": "../../../design-system/icon/afm-post-office/tsconfig.json"
49
- },
50
- {
51
- "path": "../../../design-system/lozenge/afm-post-office/tsconfig.json"
52
- },
53
- {
54
- "path": "../../../design-system/menu/afm-post-office/tsconfig.json"
55
- },
56
- {
57
- "path": "../../../design-system/modal-dialog/afm-post-office/tsconfig.json"
58
- },
59
- {
60
- "path": "../../../platform/feature-flags/afm-post-office/tsconfig.json"
61
- },
62
- {
63
- "path": "../../../design-system/popup/afm-post-office/tsconfig.json"
64
- },
65
- {
66
- "path": "../../../design-system/primitives/afm-post-office/tsconfig.json"
67
- },
68
- {
69
- "path": "../../../ai-mate/rovo-agent-components/afm-post-office/tsconfig.json"
70
- },
71
- {
72
- "path": "../../../design-system/spinner/afm-post-office/tsconfig.json"
73
- },
74
- {
75
- "path": "../../../design-system/theme/afm-post-office/tsconfig.json"
76
- },
77
- {
78
- "path": "../../../design-system/tokens/afm-post-office/tsconfig.json"
79
- },
80
- {
81
- "path": "../../../design-system/tooltip/afm-post-office/tsconfig.json"
82
- }
83
- ]
84
- }
2
+ "extends": "../../../../tsconfig.entry-points.post-office.json",
3
+ "compilerOptions": {
4
+ "declaration": true,
5
+ "target": "es5",
6
+ "outDir": "../../../../../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
+ ],
19
+ "references": [
20
+ {
21
+ "path": "../../../analytics/analytics-next/afm-post-office/tsconfig.json"
22
+ },
23
+ {
24
+ "path": "../../../uip/atlassian-context/afm-post-office/tsconfig.json"
25
+ },
26
+ {
27
+ "path": "../../../design-system/avatar/afm-post-office/tsconfig.json"
28
+ },
29
+ {
30
+ "path": "../../../design-system/avatar-group/afm-post-office/tsconfig.json"
31
+ },
32
+ {
33
+ "path": "../../../design-system/button/afm-post-office/tsconfig.json"
34
+ },
35
+ {
36
+ "path": "../../../design-system/dropdown-menu/afm-post-office/tsconfig.json"
37
+ },
38
+ {
39
+ "path": "../../../design-system/empty-state/afm-post-office/tsconfig.json"
40
+ },
41
+ {
42
+ "path": "../../../design-system/focus-ring/afm-post-office/tsconfig.json"
43
+ },
44
+ {
45
+ "path": "../../../team-central/give-kudos/afm-post-office/tsconfig.json"
46
+ },
47
+ {
48
+ "path": "../../../design-system/icon/afm-post-office/tsconfig.json"
49
+ },
50
+ {
51
+ "path": "../../../design-system/lozenge/afm-post-office/tsconfig.json"
52
+ },
53
+ {
54
+ "path": "../../../design-system/menu/afm-post-office/tsconfig.json"
55
+ },
56
+ {
57
+ "path": "../../../design-system/modal-dialog/afm-post-office/tsconfig.json"
58
+ },
59
+ {
60
+ "path": "../../../platform/feature-flags/afm-post-office/tsconfig.json"
61
+ },
62
+ {
63
+ "path": "../../../design-system/popup/afm-post-office/tsconfig.json"
64
+ },
65
+ {
66
+ "path": "../../../design-system/primitives/afm-post-office/tsconfig.json"
67
+ },
68
+ {
69
+ "path": "../../../ai-mate/rovo-agent-components/afm-post-office/tsconfig.json"
70
+ },
71
+ {
72
+ "path": "../../../design-system/spinner/afm-post-office/tsconfig.json"
73
+ },
74
+ {
75
+ "path": "../../../design-system/theme/afm-post-office/tsconfig.json"
76
+ },
77
+ {
78
+ "path": "../../../design-system/tokens/afm-post-office/tsconfig.json"
79
+ },
80
+ {
81
+ "path": "../../../design-system/tooltip/afm-post-office/tsconfig.json"
82
+ }
83
+ ]
84
+ }
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.modifyResponse = exports.default = exports.buildUserQuery = exports.buildAggUserQuery = void 0;
7
+ exports.modifyResponse = exports.default = exports.buildAggUserQuery = void 0;
8
8
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
9
9
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
10
10
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
@@ -13,7 +13,6 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
13
13
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
14
14
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
15
15
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
16
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
17
16
  var _analytics = require("../util/analytics");
18
17
  var _date = require("../util/date");
19
18
  var _performance = require("../util/performance");
@@ -54,21 +53,6 @@ var modifyResponse = exports.modifyResponse = function modifyResponse(response)
54
53
  accountType: data.accountType || undefined
55
54
  };
56
55
  };
57
-
58
- /**
59
- * @param {string} userId
60
- * @param {string} cloudId
61
- * @return {string} GraphQL Query String
62
- */
63
- var buildUserQuery = exports.buildUserQuery = function buildUserQuery(cloudId, userId) {
64
- return {
65
- query: "query User($userId: String!, $cloudId: String!) {\n User: CloudUser(userId: $userId, cloudId: $cloudId) {\n id\n isCurrentUser\n status\n statusModifiedDate\n isBot\n isNotMentionable\n fullName\n nickname\n email\n meta: title\n location\n companyName\n avatarUrl(size: 192)\n remoteWeekdayIndex: localTime(format: \"d\")\n remoteWeekdayString: localTime(format: \"ddd\")\n remoteTimeString: localTime(format: \"h:mma\")\n }\n }",
66
- variables: {
67
- cloudId: cloudId,
68
- userId: userId
69
- }
70
- };
71
- };
72
56
  var buildAggUserQuery = exports.buildAggUserQuery = function buildAggUserQuery(userId) {
73
57
  return {
74
58
  query: "query user($userId: ID!) {\n\t\tuser(accountId: $userId) {\n\t\t\tid\n\t\t\tname\n\t\t\tpicture\n\t\t\taccountStatus\n\t\t\t__typename\n\t\t\t... on AtlassianAccountUser {\n\t\t\t\temail\n\t\t\t\tnickname\n\t\t\t\tzoneinfo\n\t\t\t\textendedProfile {\n\t\t\t\t\tjobTitle\n\t\t\t\t\torganization\n\t\t\t\t\tlocation\n\t\t\t\t\tclosedDate\n\t\t\t\t\tinactiveDate\n\t\t\t\t}\n\t\t\t}\n\t\t\t... on CustomerUser {\n\t\t\t\temail\n\t\t\t\tzoneinfo\n\t\t\t}\n\t\t\t... on AppUser {\n \t\t\tappType\n \t\t}\n\t\t}\n\t}",
@@ -114,16 +98,14 @@ var UserProfileCardClient = exports.default = /*#__PURE__*/function (_CachingCli
114
98
  key: "makeRequest",
115
99
  value: function () {
116
100
  var _makeRequest = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(cloudId, userId) {
117
- var _user$extendedProfile, _user$extendedProfile2, _user$extendedProfile3, _user$extendedProfile4, _user$extendedProfile5, gatewayGraphqlUrl, userQueryPromise, user, timestring, localWeekdayIndex, query, response;
101
+ var _user$extendedProfile, _user$extendedProfile2, _user$extendedProfile3, _user$extendedProfile4, _user$extendedProfile5;
102
+ var gatewayGraphqlUrl, urlWithOperationName, userQueryPromise, user, timestring, localWeekdayIndex;
118
103
  return _regenerator.default.wrap(function _callee2$(_context2) {
119
104
  while (1) switch (_context2.prev = _context2.next) {
120
105
  case 0:
121
- if (!(0, _platformFeatureFlags.fg)('migrate_cloud_user_to_agg_user_query_profile_card')) {
122
- _context2.next = 11;
123
- break;
124
- }
125
106
  gatewayGraphqlUrl = this.options.gatewayGraphqlUrl || '/gateway/api/graphql';
126
- userQueryPromise = queryAGGUser(gatewayGraphqlUrl, userId);
107
+ urlWithOperationName = "".concat(gatewayGraphqlUrl, "?operationName=aggUserQuery");
108
+ userQueryPromise = queryAGGUser(urlWithOperationName, userId);
127
109
  _context2.next = 5;
128
110
  return userQueryPromise;
129
111
  case 5:
@@ -150,20 +132,7 @@ var UserProfileCardClient = exports.default = /*#__PURE__*/function (_CachingCli
150
132
  companyName: (_user$extendedProfile5 = user.extendedProfile) === null || _user$extendedProfile5 === void 0 ? void 0 : _user$extendedProfile5.organization,
151
133
  timestring: timestring
152
134
  }));
153
- case 11:
154
- if (this.options.url) {
155
- _context2.next = 13;
156
- break;
157
- }
158
- throw new Error('options.url is a required parameter');
159
- case 13:
160
- query = buildUserQuery(cloudId, userId);
161
- _context2.next = 16;
162
- return (0, _graphqlUtils.directoryGraphqlQuery)(this.options.url, query);
163
- case 16:
164
- response = _context2.sent;
165
- return _context2.abrupt("return", modifyResponse(response));
166
- case 18:
135
+ case 9:
167
136
  case "end":
168
137
  return _context2.stop();
169
138
  }
@@ -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.8.2");
14
+ headers.append('atl-client-version', "20.9.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.8.2");
60
+ headers.append('atl-client-version', "20.9.0");
61
61
  return headers;
62
62
  };
63
63
  function getTeamFromAGG(_x, _x2, _x3) {
@@ -10,6 +10,7 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
10
10
  var _react = _interopRequireDefault(require("react"));
11
11
  var _reactIntlNext = require("react-intl-next");
12
12
  var _lozenge = _interopRequireDefault(require("@atlaskit/lozenge"));
13
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
13
14
  var _primitives = require("@atlaskit/primitives");
14
15
  var _relativeDate = _interopRequireDefault(require("../../internal/relative-date"));
15
16
  var _messages = _interopRequireDefault(require("../../messages"));
@@ -21,6 +22,33 @@ var detailedListWrapperStyles = (0, _primitives.xcss)({
21
22
  margin: 'space.0',
22
23
  padding: 'space.0'
23
24
  });
25
+ var fullNameLabelStyles = (0, _primitives.xcss)({
26
+ overflow: 'hidden',
27
+ textOverflow: 'ellipsis',
28
+ whiteSpace: 'nowrap',
29
+ fontSize: '18px',
30
+ fontWeight: '400',
31
+ letterSpacing: 'normal',
32
+ lineHeight: "".concat(24 / 18, "em")
33
+ });
34
+ var noMetaLabelStyles = (0, _primitives.xcss)({
35
+ marginTop: 'space.400',
36
+ marginRight: '0',
37
+ marginBottom: 'space.150',
38
+ marginLeft: '0'
39
+ });
40
+ var metaLabelStyles = (0, _primitives.xcss)({
41
+ marginTop: 'space.150',
42
+ marginRight: '0',
43
+ marginBottom: '0',
44
+ marginLeft: '0'
45
+ });
46
+ var disabledAccountStyles = (0, _primitives.xcss)({
47
+ color: 'color.text'
48
+ });
49
+ var activeAccountStyles = (0, _primitives.xcss)({
50
+ color: 'color.text.inverse'
51
+ });
24
52
  var renderName = function renderName(nickname, fullName, meta) {
25
53
  if (!fullName && !nickname) {
26
54
  return null;
@@ -28,6 +56,13 @@ var renderName = function renderName(nickname, fullName, meta) {
28
56
  var isNicknameRedundant = !nickname || nickname === fullName;
29
57
  var shownNickname = " (".concat(nickname, ") ");
30
58
  var displayName = isNicknameRedundant ? fullName : "".concat(fullName).concat(shownNickname);
59
+ if ((0, _platformFeatureFlags.fg)('platform_profile_card_css_refactor')) {
60
+ return /*#__PURE__*/_react.default.createElement(_primitives.Box, {
61
+ xcss: [fullNameLabelStyles, activeAccountStyles, meta ? metaLabelStyles : noMetaLabelStyles],
62
+ testId: "profilecard-name",
63
+ id: "profilecard-name-label"
64
+ }, displayName);
65
+ }
31
66
  return /*#__PURE__*/_react.default.createElement(_Card.FullNameLabel, {
32
67
  noMeta: !meta,
33
68
  "data-testid": "profilecard-name",
@@ -78,7 +113,11 @@ var DisabledProfileCardDetails = function DisabledProfileCardDetails(props) {
78
113
  status = props.status,
79
114
  statusModifiedDate = props.statusModifiedDate;
80
115
  var name = status === 'inactive' ? fullName || nickname : nickname || /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.default.disabledAccountDefaultName);
81
- return /*#__PURE__*/_react.default.createElement(_Card.DetailsGroup, null, /*#__PURE__*/_react.default.createElement(_Card.FullNameLabel, {
116
+ return /*#__PURE__*/_react.default.createElement(_Card.DetailsGroup, null, (0, _platformFeatureFlags.fg)('platform_profile_card_css_refactor') ? /*#__PURE__*/_react.default.createElement(_primitives.Box, {
117
+ xcss: [fullNameLabelStyles, noMetaLabelStyles, disabledAccountStyles],
118
+ testId: "profilecard-name",
119
+ id: "profilecard-name-label"
120
+ }, name) : /*#__PURE__*/_react.default.createElement(_Card.FullNameLabel, {
82
121
  noMeta: true,
83
122
  isDisabledAccount: true,
84
123
  "data-testid": "profilecard-name",
@@ -319,7 +319,7 @@ function ProfilecardTriggerNext(_ref2) {
319
319
  var profilecardProps = _objectSpread(_objectSpread({
320
320
  userId: userId,
321
321
  fullName: prepopulatedData === null || prepopulatedData === void 0 ? void 0 : prepopulatedData.fullName,
322
- isCurrentUser: (0, _platformFeatureFlags.fg)('migrate_cloud_user_to_agg_user_query_profile_card') ? userId === viewingUserId : data === null || data === void 0 ? void 0 : data.isCurrentUser,
322
+ isCurrentUser: userId === viewingUserId,
323
323
  clientFetchProfile: clientFetchProfile
324
324
  }, data), {}, {
325
325
  reportingLines: reportingLinesData,
@@ -385,6 +385,9 @@ function ProfilecardTriggerNext(_ref2) {
385
385
  // eslint-disable-next-line jsx-a11y/no-autofocus
386
386
  ,
387
387
  autoFocus: autoFocus !== null && autoFocus !== void 0 ? autoFocus : trigger === 'click'
388
+ // This feature gate is currently enabled only for Jira_Web to avoid UI issues in Confluence_Web.
389
+ ,
390
+ shouldRenderToParent: (0, _platformFeatureFlags.fg)('enable_appropriate_reading_order_in_profile_card')
388
391
  }), shouldShowGiveKudos && teamCentralBaseUrl && /*#__PURE__*/_react.default.createElement(_react.Suspense, {
389
392
  fallback: null
390
393
  }, /*#__PURE__*/_react.default.createElement(_giveKudos.GiveKudosLauncherLazy, {
@@ -10,12 +10,23 @@ var _reactIntlNext = require("react-intl-next");
10
10
  var _avatar = _interopRequireDefault(require("@atlaskit/avatar"));
11
11
  var _avatarGroup = _interopRequireDefault(require("@atlaskit/avatar-group"));
12
12
  var _button = _interopRequireDefault(require("@atlaskit/button"));
13
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
14
+ var _primitives = require("@atlaskit/primitives");
13
15
  var _messages = _interopRequireDefault(require("../../messages"));
14
16
  var _ReportingLines = require("../../styled/ReportingLines");
15
17
  var _analytics = require("../../util/analytics");
16
18
  function getProfileHref(userId, profileUrl) {
17
19
  return profileUrl ? profileUrl + userId : undefined;
18
20
  }
21
+ var reportingLinesHeadingDefaultStyles = (0, _primitives.xcss)({
22
+ color: 'color.text',
23
+ font: 'font.heading.xxsmall',
24
+ fontWeight: 600,
25
+ marginBottom: 'space.100'
26
+ });
27
+ var reportingLinesHeadingStyles = (0, _primitives.xcss)({
28
+ marginBottom: '0'
29
+ });
19
30
  var ReportingLinesDetails = function ReportingLinesDetails(props) {
20
31
  var _manager$pii, _manager$pii2;
21
32
  var fireAnalyticsWithDuration = props.fireAnalyticsWithDuration,
@@ -40,7 +51,12 @@ var ReportingLinesDetails = function ReportingLinesDetails(props) {
40
51
  onReportingLinesClick(user);
41
52
  } : undefined;
42
53
  };
43
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, manager && /*#__PURE__*/_react.default.createElement(_ReportingLines.ReportingLinesSection, null, /*#__PURE__*/_react.default.createElement(_ReportingLines.ReportingLinesHeading, {
54
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, manager && /*#__PURE__*/_react.default.createElement(_ReportingLines.ReportingLinesSection, null, (0, _platformFeatureFlags.fg)('platform_profile_card_css_refactor') ? /*#__PURE__*/_react.default.createElement(_primitives.Box, {
55
+ xcss: [reportingLinesHeadingDefaultStyles, reportingLinesHeadingStyles]
56
+ }, /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.default.managerSectionHeading)) :
57
+ /*#__PURE__*/
58
+ /* eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766 */
59
+ _react.default.createElement(_ReportingLines.ReportingLinesHeading, {
44
60
  style: {
45
61
  marginBottom: 0
46
62
  }
@@ -53,7 +69,9 @@ var ReportingLinesDetails = function ReportingLinesDetails(props) {
53
69
  }, /*#__PURE__*/_react.default.createElement(_ReportingLines.ManagerSection, null, /*#__PURE__*/_react.default.createElement(_avatar.default, {
54
70
  size: "xsmall",
55
71
  src: (_manager$pii = manager.pii) === null || _manager$pii === void 0 ? void 0 : _manager$pii.picture
56
- }), /*#__PURE__*/_react.default.createElement(_ReportingLines.ManagerName, null, (_manager$pii2 = manager.pii) === null || _manager$pii2 === void 0 ? void 0 : _manager$pii2.name))))), hasReports && /*#__PURE__*/_react.default.createElement(_ReportingLines.ReportingLinesSection, null, /*#__PURE__*/_react.default.createElement(_ReportingLines.ReportingLinesHeading, null, /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.default.directReportsSectionHeading)), /*#__PURE__*/_react.default.createElement(_avatarGroup.default, {
72
+ }), /*#__PURE__*/_react.default.createElement(_ReportingLines.ManagerName, null, (_manager$pii2 = manager.pii) === null || _manager$pii2 === void 0 ? void 0 : _manager$pii2.name))))), hasReports && /*#__PURE__*/_react.default.createElement(_ReportingLines.ReportingLinesSection, null, (0, _platformFeatureFlags.fg)('platform_profile_card_css_refactor') ? /*#__PURE__*/_react.default.createElement(_primitives.Box, {
73
+ xcss: reportingLinesHeadingDefaultStyles
74
+ }, /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.default.directReportsSectionHeading)) : /*#__PURE__*/_react.default.createElement(_ReportingLines.ReportingLinesHeading, null, /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.default.directReportsSectionHeading)), /*#__PURE__*/_react.default.createElement(_avatarGroup.default, {
57
75
  appearance: "stack",
58
76
  size: "small",
59
77
  data: reports.map(function (member) {
@@ -82,7 +82,8 @@ var SimpleMockAgentClient = /*#__PURE__*/function (_RovoAgentCardClient) {
82
82
  var args = {
83
83
  cacheSize: 10,
84
84
  maxCacheAge: 0,
85
- url: '/graphql/directory'
85
+ url: '/graphql/directory',
86
+ gatewayGraphqlUrl: '/gateway/api/graphql'
86
87
  };
87
88
  var simpleMockUserClient = exports.simpleMockUserClient = new SimpleMockUserClient(args);
88
89
  var simpleMockTeamClient = exports.simpleMockTeamClient = new SimpleMockTeamClient(args);
@@ -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.8.2"
48
+ packageVersion: "20.9.0"
49
49
  }, attributes), {}, {
50
50
  firedAt: Math.round((0, _performance.getPageTime)())
51
51
  })