@atlaskit/profilecard 24.8.0 → 24.9.1

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,18 @@
1
1
  # @atlaskit/profilecard
2
2
 
3
+ ## 24.9.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 24.9.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`10f9ee672770a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/10f9ee672770a) -
14
+ Fix default behavior of nav item click
15
+
3
16
  ## 24.8.0
4
17
 
5
18
  ### Minor Changes
@@ -11,7 +11,7 @@ var _graphqlUtils = require("./graphqlUtils");
11
11
  var ORG_ID_FROM_CLOUD_ID_QUERY = "query OrgIdFromCloudId($cloudId: ID!) {\n\ttenantContexts(cloudIds: [$cloudId]) {\n\t\torgId\n\t}\n}";
12
12
  var addHeaders = function addHeaders(headers) {
13
13
  headers.append('atl-client-name', "@atlaskit/profilecard");
14
- headers.append('atl-client-version', "0.0.0-development");
14
+ headers.append('atl-client-version', "24.9.0");
15
15
  return headers;
16
16
  };
17
17
  function getOrgIdForCloudIdFromAGG(_x, _x2) {
@@ -65,7 +65,7 @@ var addHeaders = exports.addHeaders = function addHeaders(headers) {
65
65
  headers.append('X-ExperimentalApi', 'teams-beta');
66
66
  headers.append('X-ExperimentalApi', 'team-members-beta');
67
67
  headers.append('atl-client-name', "@atlaskit/profilecard");
68
- headers.append('atl-client-version', "0.0.0-development");
68
+ headers.append('atl-client-version', "24.9.0");
69
69
  return headers;
70
70
  };
71
71
  function getTeamFromAGG(_x, _x2, _x3) {
@@ -115,7 +115,7 @@ var AgentActions = exports.AgentActions = function AgentActions(_ref) {
115
115
  shouldFitContainer: true,
116
116
  onClick: function onClick(e) {
117
117
  e.stopPropagation();
118
- onChatClick();
118
+ onChatClick(e);
119
119
  }
120
120
  }, /*#__PURE__*/_react.default.createElement(_primitives.Box, {
121
121
  xcss: chatToAgentButtonWrapper
@@ -44,7 +44,7 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
44
44
  var agent = _ref.agent,
45
45
  isLoading = _ref.isLoading,
46
46
  cloudId = _ref.cloudId,
47
- _onChatClick = _ref.onChatClick,
47
+ onChatClick = _ref.onChatClick,
48
48
  hasError = _ref.hasError,
49
49
  errorType = _ref.errorType,
50
50
  onConversationStartersClick = _ref.onConversationStartersClick,
@@ -235,8 +235,10 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
235
235
  return _onDuplicateAgent(agent.id);
236
236
  },
237
237
  onDeleteAgent: handleOnDelete,
238
- onChatClick: function onChatClick() {
239
- return _onChatClick ? _onChatClick() : onOpenChatFullScreen(agent.id, agent.name);
238
+ onChatClick: onChatClick ? function (event) {
239
+ return onChatClick(event);
240
+ } : function () {
241
+ return onOpenChatFullScreen(agent.id, agent.name);
240
242
  },
241
243
  resourceClient: resourceClient,
242
244
  onViewFullProfileClick: function onViewFullProfileClick() {
@@ -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: "0.0.0-development"
48
+ packageVersion: "24.9.0"
49
49
  }, attributes), {}, {
50
50
  firedAt: Math.round((0, _performance.getPageTime)())
51
51
  })
@@ -6,7 +6,7 @@ const ORG_ID_FROM_CLOUD_ID_QUERY = `query OrgIdFromCloudId($cloudId: ID!) {
6
6
  }`;
7
7
  const addHeaders = headers => {
8
8
  headers.append('atl-client-name', "@atlaskit/profilecard");
9
- headers.append('atl-client-version', "0.0.0-development");
9
+ headers.append('atl-client-version', "24.9.0");
10
10
  return headers;
11
11
  };
12
12
  export async function getOrgIdForCloudIdFromAGG(url, cloudId) {
@@ -74,7 +74,7 @@ export const addHeaders = headers => {
74
74
  headers.append('X-ExperimentalApi', 'teams-beta');
75
75
  headers.append('X-ExperimentalApi', 'team-members-beta');
76
76
  headers.append('atl-client-name', "@atlaskit/profilecard");
77
- headers.append('atl-client-version', "0.0.0-development");
77
+ headers.append('atl-client-version', "24.9.0");
78
78
  return headers;
79
79
  };
80
80
  export async function getTeamFromAGG(url, teamId, siteId) {
@@ -92,7 +92,7 @@ export const AgentActions = ({
92
92
  shouldFitContainer: true,
93
93
  onClick: e => {
94
94
  e.stopPropagation();
95
- onChatClick();
95
+ onChatClick(e);
96
96
  }
97
97
  }, /*#__PURE__*/React.createElement(Box, {
98
98
  xcss: chatToAgentButtonWrapper
@@ -184,7 +184,7 @@ const AgentProfileCard = ({
184
184
  onCopyAgent: () => onCopyAgent(agent.id),
185
185
  onDuplicateAgent: () => onDuplicateAgent(agent.id),
186
186
  onDeleteAgent: handleOnDelete,
187
- onChatClick: () => onChatClick ? onChatClick() : onOpenChatFullScreen(agent.id, agent.name),
187
+ onChatClick: onChatClick ? event => onChatClick(event) : () => onOpenChatFullScreen(agent.id, agent.name),
188
188
  resourceClient: resourceClient,
189
189
  onViewFullProfileClick: () => onViewFullProfile(agent.id)
190
190
  })));
@@ -32,7 +32,7 @@ const createEvent = (eventType, action, actionSubject, actionSubjectId, attribut
32
32
  actionSubjectId,
33
33
  attributes: {
34
34
  packageName: "@atlaskit/profilecard",
35
- packageVersion: "0.0.0-development",
35
+ packageVersion: "24.9.0",
36
36
  ...attributes,
37
37
  firedAt: Math.round(getPageTime())
38
38
  }
@@ -4,7 +4,7 @@ import { AGGQuery } from './graphqlUtils';
4
4
  var ORG_ID_FROM_CLOUD_ID_QUERY = "query OrgIdFromCloudId($cloudId: ID!) {\n\ttenantContexts(cloudIds: [$cloudId]) {\n\t\torgId\n\t}\n}";
5
5
  var addHeaders = function addHeaders(headers) {
6
6
  headers.append('atl-client-name', "@atlaskit/profilecard");
7
- headers.append('atl-client-version', "0.0.0-development");
7
+ headers.append('atl-client-version', "24.9.0");
8
8
  return headers;
9
9
  };
10
10
  export function getOrgIdForCloudIdFromAGG(_x, _x2) {
@@ -56,7 +56,7 @@ export var addHeaders = function addHeaders(headers) {
56
56
  headers.append('X-ExperimentalApi', 'teams-beta');
57
57
  headers.append('X-ExperimentalApi', 'team-members-beta');
58
58
  headers.append('atl-client-name', "@atlaskit/profilecard");
59
- headers.append('atl-client-version', "0.0.0-development");
59
+ headers.append('atl-client-version', "24.9.0");
60
60
  return headers;
61
61
  };
62
62
  export function getTeamFromAGG(_x, _x2, _x3) {
@@ -107,7 +107,7 @@ export var AgentActions = function AgentActions(_ref) {
107
107
  shouldFitContainer: true,
108
108
  onClick: function onClick(e) {
109
109
  e.stopPropagation();
110
- onChatClick();
110
+ onChatClick(e);
111
111
  }
112
112
  }, /*#__PURE__*/React.createElement(Box, {
113
113
  xcss: chatToAgentButtonWrapper
@@ -34,7 +34,7 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
34
34
  var agent = _ref.agent,
35
35
  isLoading = _ref.isLoading,
36
36
  cloudId = _ref.cloudId,
37
- _onChatClick = _ref.onChatClick,
37
+ onChatClick = _ref.onChatClick,
38
38
  hasError = _ref.hasError,
39
39
  errorType = _ref.errorType,
40
40
  onConversationStartersClick = _ref.onConversationStartersClick,
@@ -225,8 +225,10 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
225
225
  return _onDuplicateAgent(agent.id);
226
226
  },
227
227
  onDeleteAgent: handleOnDelete,
228
- onChatClick: function onChatClick() {
229
- return _onChatClick ? _onChatClick() : onOpenChatFullScreen(agent.id, agent.name);
228
+ onChatClick: onChatClick ? function (event) {
229
+ return onChatClick(event);
230
+ } : function () {
231
+ return onOpenChatFullScreen(agent.id, agent.name);
230
232
  },
231
233
  resourceClient: resourceClient,
232
234
  onViewFullProfileClick: function onViewFullProfileClick() {
@@ -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: "0.0.0-development"
42
+ packageVersion: "24.9.0"
43
43
  }, attributes), {}, {
44
44
  firedAt: Math.round(getPageTime())
45
45
  })
@@ -6,7 +6,7 @@ type AgentActionsProps = {
6
6
  onCopyAgent: () => void;
7
7
  onDuplicateAgent: () => void;
8
8
  onDeleteAgent: () => void;
9
- onChatClick: () => void;
9
+ onChatClick: (event: React.MouseEvent) => void;
10
10
  onViewFullProfileClick: () => void;
11
11
  resourceClient: ProfileClient;
12
12
  };
@@ -330,7 +330,7 @@ export interface TeamProfileCardTriggerProps extends TeamProfilecardCoreProps {
330
330
  shouldRenderToParent?: boolean;
331
331
  }
332
332
  export interface AgentActionsType {
333
- onChatClick?: () => void;
333
+ onChatClick?: (event: React.MouseEvent) => void;
334
334
  onConversationStartersClick?: (starter: ConversationStarter) => void;
335
335
  }
336
336
  export interface AgentProfileCardTriggerProps extends AgentActionsType {
@@ -6,7 +6,7 @@ type AgentActionsProps = {
6
6
  onCopyAgent: () => void;
7
7
  onDuplicateAgent: () => void;
8
8
  onDeleteAgent: () => void;
9
- onChatClick: () => void;
9
+ onChatClick: (event: React.MouseEvent) => void;
10
10
  onViewFullProfileClick: () => void;
11
11
  resourceClient: ProfileClient;
12
12
  };
@@ -333,7 +333,7 @@ export interface TeamProfileCardTriggerProps extends TeamProfilecardCoreProps {
333
333
  shouldRenderToParent?: boolean;
334
334
  }
335
335
  export interface AgentActionsType {
336
- onChatClick?: () => void;
336
+ onChatClick?: (event: React.MouseEvent) => void;
337
337
  onConversationStartersClick?: (starter: ConversationStarter) => void;
338
338
  }
339
339
  export interface AgentProfileCardTriggerProps extends AgentActionsType {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/profilecard",
3
- "version": "24.8.0",
3
+ "version": "24.9.1",
4
4
  "description": "A React component to display a card with user information.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -76,7 +76,7 @@
76
76
  "@atlaskit/spinner": "^19.0.0",
77
77
  "@atlaskit/teams-app-config": "^1.11.0",
78
78
  "@atlaskit/teams-avatar": "^2.3.0",
79
- "@atlaskit/teams-public": "^0.55.0",
79
+ "@atlaskit/teams-public": "^0.56.0",
80
80
  "@atlaskit/theme": "^20.0.0",
81
81
  "@atlaskit/tokens": "^6.1.0",
82
82
  "@atlaskit/tooltip": "^20.4.0",