@atlaskit/profilecard 20.1.2 → 20.2.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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/profilecard
2
2
 
3
+ ## 20.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#146229](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/146229)
8
+ [`d15674651dd75`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d15674651dd75) -
9
+ [ux] Add forge type for agent creator type
10
+
3
11
  ## 20.1.2
4
12
 
5
13
  ### Patch Changes
@@ -57,7 +57,7 @@ var addHeaders = exports.addHeaders = function addHeaders(headers) {
57
57
  headers.append('X-ExperimentalApi', 'teams-beta');
58
58
  headers.append('X-ExperimentalApi', 'team-members-beta');
59
59
  headers.append('atl-client-name', "@atlaskit/profilecard");
60
- headers.append('atl-client-version', "20.1.2");
60
+ headers.append('atl-client-version', "20.2.0");
61
61
  return headers;
62
62
  };
63
63
  function getTeamFromAGG(_x, _x2, _x3) {
@@ -51,7 +51,7 @@ var AgentProfileCardTrigger = exports.AgentProfileCardTrigger = function AgentPr
51
51
  return _context.abrupt("return", undefined);
52
52
  case 2:
53
53
  _context.t0 = creator_type;
54
- _context.next = _context.t0 === 'SYSTEM' ? 5 : _context.t0 === ('THIRD_PARTY' || 'FORGE') ? 6 : _context.t0 === 'CUSTOMER' ? 7 : 20;
54
+ _context.next = _context.t0 === 'SYSTEM' ? 5 : _context.t0 === 'THIRD_PARTY' ? 6 : _context.t0 === 'FORGE' ? 7 : _context.t0 === 'CUSTOMER' ? 8 : 21;
55
55
  break;
56
56
  case 5:
57
57
  return _context.abrupt("return", {
@@ -63,17 +63,22 @@ var AgentProfileCardTrigger = exports.AgentProfileCardTrigger = function AgentPr
63
63
  name: creator !== null && creator !== void 0 ? creator : ''
64
64
  });
65
65
  case 7:
66
+ return _context.abrupt("return", {
67
+ type: 'THIRD_PARTY',
68
+ name: creator !== null && creator !== void 0 ? creator : ''
69
+ });
70
+ case 8:
66
71
  _userId = (0, _rovoAgentUtils.getAAIDFromARI)(creator) || '';
67
- _context.prev = 8;
72
+ _context.prev = 9;
68
73
  if (!(!_userId || !cloudId)) {
69
- _context.next = 11;
74
+ _context.next = 12;
70
75
  break;
71
76
  }
72
77
  return _context.abrupt("return", undefined);
73
- case 11:
74
- _context.next = 13;
78
+ case 12:
79
+ _context.next = 14;
75
80
  return props.resourceClient.getProfile(cloudId, _userId, fireAnalytics);
76
- case 13:
81
+ case 14:
77
82
  creatorInfo = _context.sent;
78
83
  return _context.abrupt("return", {
79
84
  type: 'CUSTOMER',
@@ -81,17 +86,17 @@ var AgentProfileCardTrigger = exports.AgentProfileCardTrigger = function AgentPr
81
86
  profileLink: "/people/".concat(_userId),
82
87
  id: _userId
83
88
  });
84
- case 17:
85
- _context.prev = 17;
86
- _context.t1 = _context["catch"](8);
87
- return _context.abrupt("return", undefined);
88
- case 20:
89
+ case 18:
90
+ _context.prev = 18;
91
+ _context.t1 = _context["catch"](9);
89
92
  return _context.abrupt("return", undefined);
90
93
  case 21:
94
+ return _context.abrupt("return", undefined);
95
+ case 22:
91
96
  case "end":
92
97
  return _context.stop();
93
98
  }
94
- }, _callee, null, [[8, 17]]);
99
+ }, _callee, null, [[9, 18]]);
95
100
  }));
96
101
  return function getCreator(_x, _x2) {
97
102
  return _ref2.apply(this, arguments);
@@ -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.1.2"
48
+ packageVersion: "20.2.0"
49
49
  }, attributes), {}, {
50
50
  firedAt: Math.round((0, _performance.getPageTime)())
51
51
  })
@@ -67,7 +67,7 @@ export const addHeaders = headers => {
67
67
  headers.append('X-ExperimentalApi', 'teams-beta');
68
68
  headers.append('X-ExperimentalApi', 'team-members-beta');
69
69
  headers.append('atl-client-name', "@atlaskit/profilecard");
70
- headers.append('atl-client-version', "20.1.2");
70
+ headers.append('atl-client-version', "20.2.0");
71
71
  return headers;
72
72
  };
73
73
  export async function getTeamFromAGG(url, teamId, siteId) {
@@ -33,7 +33,12 @@ export const AgentProfileCardTrigger = ({
33
33
  return {
34
34
  type: 'SYSTEM'
35
35
  };
36
- case 'THIRD_PARTY' || 'FORGE':
36
+ case 'THIRD_PARTY':
37
+ return {
38
+ type: 'THIRD_PARTY',
39
+ name: creator !== null && creator !== void 0 ? creator : ''
40
+ };
41
+ case 'FORGE':
37
42
  return {
38
43
  type: 'THIRD_PARTY',
39
44
  name: creator !== null && creator !== void 0 ? creator : ''
@@ -32,7 +32,7 @@ const createEvent = (eventType, action, actionSubject, actionSubjectId, attribut
32
32
  actionSubjectId,
33
33
  attributes: {
34
34
  packageName: "@atlaskit/profilecard",
35
- packageVersion: "20.1.2",
35
+ packageVersion: "20.2.0",
36
36
  ...attributes,
37
37
  firedAt: Math.round(getPageTime())
38
38
  }
@@ -48,7 +48,7 @@ export var addHeaders = function addHeaders(headers) {
48
48
  headers.append('X-ExperimentalApi', 'teams-beta');
49
49
  headers.append('X-ExperimentalApi', 'team-members-beta');
50
50
  headers.append('atl-client-name', "@atlaskit/profilecard");
51
- headers.append('atl-client-version', "20.1.2");
51
+ headers.append('atl-client-version', "20.2.0");
52
52
  return headers;
53
53
  };
54
54
  export function getTeamFromAGG(_x, _x2, _x3) {
@@ -41,7 +41,7 @@ export var AgentProfileCardTrigger = function AgentProfileCardTrigger(_ref) {
41
41
  return _context.abrupt("return", undefined);
42
42
  case 2:
43
43
  _context.t0 = creator_type;
44
- _context.next = _context.t0 === 'SYSTEM' ? 5 : _context.t0 === ('THIRD_PARTY' || 'FORGE') ? 6 : _context.t0 === 'CUSTOMER' ? 7 : 20;
44
+ _context.next = _context.t0 === 'SYSTEM' ? 5 : _context.t0 === 'THIRD_PARTY' ? 6 : _context.t0 === 'FORGE' ? 7 : _context.t0 === 'CUSTOMER' ? 8 : 21;
45
45
  break;
46
46
  case 5:
47
47
  return _context.abrupt("return", {
@@ -53,17 +53,22 @@ export var AgentProfileCardTrigger = function AgentProfileCardTrigger(_ref) {
53
53
  name: creator !== null && creator !== void 0 ? creator : ''
54
54
  });
55
55
  case 7:
56
+ return _context.abrupt("return", {
57
+ type: 'THIRD_PARTY',
58
+ name: creator !== null && creator !== void 0 ? creator : ''
59
+ });
60
+ case 8:
56
61
  _userId = getAAIDFromARI(creator) || '';
57
- _context.prev = 8;
62
+ _context.prev = 9;
58
63
  if (!(!_userId || !cloudId)) {
59
- _context.next = 11;
64
+ _context.next = 12;
60
65
  break;
61
66
  }
62
67
  return _context.abrupt("return", undefined);
63
- case 11:
64
- _context.next = 13;
68
+ case 12:
69
+ _context.next = 14;
65
70
  return props.resourceClient.getProfile(cloudId, _userId, fireAnalytics);
66
- case 13:
71
+ case 14:
67
72
  creatorInfo = _context.sent;
68
73
  return _context.abrupt("return", {
69
74
  type: 'CUSTOMER',
@@ -71,17 +76,17 @@ export var AgentProfileCardTrigger = function AgentProfileCardTrigger(_ref) {
71
76
  profileLink: "/people/".concat(_userId),
72
77
  id: _userId
73
78
  });
74
- case 17:
75
- _context.prev = 17;
76
- _context.t1 = _context["catch"](8);
77
- return _context.abrupt("return", undefined);
78
- case 20:
79
+ case 18:
80
+ _context.prev = 18;
81
+ _context.t1 = _context["catch"](9);
79
82
  return _context.abrupt("return", undefined);
80
83
  case 21:
84
+ return _context.abrupt("return", undefined);
85
+ case 22:
81
86
  case "end":
82
87
  return _context.stop();
83
88
  }
84
- }, _callee, null, [[8, 17]]);
89
+ }, _callee, null, [[9, 18]]);
85
90
  }));
86
91
  return function getCreator(_x, _x2) {
87
92
  return _ref2.apply(this, arguments);
@@ -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: "20.1.2"
42
+ packageVersion: "20.2.0"
43
43
  }, attributes), {}, {
44
44
  firedAt: Math.round(getPageTime())
45
45
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/profilecard",
3
- "version": "20.1.2",
3
+ "version": "20.2.0",
4
4
  "description": "A React component to display a card with user information.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -58,8 +58,8 @@
58
58
  "@atlaskit/empty-state": "^7.11.0",
59
59
  "@atlaskit/focus-ring": "^1.6.0",
60
60
  "@atlaskit/give-kudos": "^2.1.1",
61
- "@atlaskit/icon": "^22.18.0",
62
- "@atlaskit/lozenge": "^11.10.0",
61
+ "@atlaskit/icon": "^22.19.0",
62
+ "@atlaskit/lozenge": "^11.11.0",
63
63
  "@atlaskit/menu": "^2.12.0",
64
64
  "@atlaskit/modal-dialog": "^12.17.0",
65
65
  "@atlaskit/platform-feature-flags": "^0.3.0",