@atlaskit/profilecard 23.7.8 → 23.8.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 +14 -0
- package/dist/cjs/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/cjs/client/getTeamFromAGG.js +1 -1
- package/dist/cjs/components/Team/TeamProfileCardTrigger.js +3 -3
- package/dist/cjs/components/User/ProfileCardTrigger.js +1 -1
- package/dist/cjs/util/analytics.js +6 -4
- package/dist/es2019/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/es2019/client/getTeamFromAGG.js +1 -1
- package/dist/es2019/components/Team/TeamProfileCardTrigger.js +3 -3
- package/dist/es2019/components/User/ProfileCardTrigger.js +1 -1
- package/dist/es2019/util/analytics.js +6 -3
- package/dist/esm/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/esm/client/getTeamFromAGG.js +1 -1
- package/dist/esm/components/Team/TeamProfileCardTrigger.js +3 -3
- package/dist/esm/components/User/ProfileCardTrigger.js +1 -1
- package/dist/esm/util/analytics.js +6 -4
- package/dist/types/util/analytics.d.ts +1 -1
- package/dist/types-ts4.5/util/analytics.d.ts +1 -1
- package/package.json +8 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/profilecard
|
|
2
2
|
|
|
3
|
+
## 23.8.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#141734](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/141734)
|
|
8
|
+
[`f714a477da668`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f714a477da668) -
|
|
9
|
+
Added Teamid to profilecard triggered ui event
|
|
10
|
+
|
|
11
|
+
## 23.7.9
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 23.7.8
|
|
4
18
|
|
|
5
19
|
### Patch 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', "23.
|
|
14
|
+
headers.append('atl-client-version', "23.8.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', "23.
|
|
69
|
+
headers.append('atl-client-version', "23.8.0");
|
|
70
70
|
return headers;
|
|
71
71
|
};
|
|
72
72
|
function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -102,7 +102,7 @@ var TeamProfileCardTriggerInternal = exports.TeamProfileCardTriggerInternal = /*
|
|
|
102
102
|
_this.openedByHover = false;
|
|
103
103
|
_this.showProfilecard(0);
|
|
104
104
|
if (!_this.state.visible) {
|
|
105
|
-
_this.fireAnalytics((0, _analytics.cardTriggered)('team', 'click'));
|
|
105
|
+
_this.fireAnalytics((0, _analytics.cardTriggered)('team', 'click', _this.props.teamId));
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
});
|
|
@@ -112,7 +112,7 @@ var TeamProfileCardTriggerInternal = exports.TeamProfileCardTriggerInternal = /*
|
|
|
112
112
|
}
|
|
113
113
|
if (!_this.state.visible) {
|
|
114
114
|
_this.openedByHover = true;
|
|
115
|
-
_this.fireAnalytics((0, _analytics.cardTriggered)('team', 'hover'));
|
|
115
|
+
_this.fireAnalytics((0, _analytics.cardTriggered)('team', 'hover', _this.props.teamId));
|
|
116
116
|
}
|
|
117
117
|
_this.showProfilecard(_config.DELAY_MS_SHOW);
|
|
118
118
|
});
|
|
@@ -132,7 +132,7 @@ var TeamProfileCardTriggerInternal = exports.TeamProfileCardTriggerInternal = /*
|
|
|
132
132
|
});
|
|
133
133
|
_this.showProfilecard(0);
|
|
134
134
|
if (!_this.state.visible) {
|
|
135
|
-
_this.fireAnalytics((0, _analytics.cardTriggered)('team', 'click'));
|
|
135
|
+
_this.fireAnalytics((0, _analytics.cardTriggered)('team', 'click', _this.props.teamId));
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
138
|
});
|
|
@@ -48,7 +48,7 @@ function ProfileCardContent(_ref) {
|
|
|
48
48
|
errorType = _ref.errorType,
|
|
49
49
|
agentActions = _ref.agentActions,
|
|
50
50
|
addFlag = _ref.addFlag;
|
|
51
|
-
if (isAgent
|
|
51
|
+
if (isAgent) {
|
|
52
52
|
return /*#__PURE__*/_react.default.createElement(_AgentProfileCardResourced.AgentProfileCardResourced, {
|
|
53
53
|
accountId: userId,
|
|
54
54
|
cloudId: cloudId,
|
|
@@ -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: "23.
|
|
48
|
+
packageVersion: "23.8.0"
|
|
49
49
|
}, attributes), {}, {
|
|
50
50
|
firedAt: Math.round((0, _performance.getPageTime)())
|
|
51
51
|
})
|
|
@@ -63,10 +63,12 @@ var getActionSubject = function getActionSubject(type) {
|
|
|
63
63
|
return 'user';
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
|
-
var cardTriggered = exports.cardTriggered = function cardTriggered(type, method) {
|
|
67
|
-
return createEvent('ui', 'triggered', getActionSubject(type), undefined, {
|
|
66
|
+
var cardTriggered = exports.cardTriggered = function cardTriggered(type, method, teamId) {
|
|
67
|
+
return createEvent('ui', 'triggered', getActionSubject(type), undefined, _objectSpread({
|
|
68
68
|
method: method
|
|
69
|
-
}
|
|
69
|
+
}, type === 'team' && teamId ? {
|
|
70
|
+
teamId: teamId
|
|
71
|
+
} : {}));
|
|
70
72
|
};
|
|
71
73
|
var teamRequestAnalytics = exports.teamRequestAnalytics = function teamRequestAnalytics(action, attributes) {
|
|
72
74
|
return createEvent('operational', action, TEAM_SUBJECT, 'request', attributes);
|
|
@@ -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', "23.
|
|
9
|
+
headers.append('atl-client-version', "23.8.0");
|
|
10
10
|
return headers;
|
|
11
11
|
};
|
|
12
12
|
export async function getOrgIdForCloudIdFromAGG(url, cloudId) {
|
|
@@ -75,7 +75,7 @@ export const addHeaders = headers => {
|
|
|
75
75
|
headers.append('X-ExperimentalApi', 'teams-beta');
|
|
76
76
|
headers.append('X-ExperimentalApi', 'team-members-beta');
|
|
77
77
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
78
|
-
headers.append('atl-client-version', "23.
|
|
78
|
+
headers.append('atl-client-version', "23.8.0");
|
|
79
79
|
return headers;
|
|
80
80
|
};
|
|
81
81
|
export async function getTeamFromAGG(url, teamId, siteId) {
|
|
@@ -77,7 +77,7 @@ export class TeamProfileCardTriggerInternal extends React.PureComponent {
|
|
|
77
77
|
this.openedByHover = false;
|
|
78
78
|
this.showProfilecard(0);
|
|
79
79
|
if (!this.state.visible) {
|
|
80
|
-
this.fireAnalytics(cardTriggered('team', 'click'));
|
|
80
|
+
this.fireAnalytics(cardTriggered('team', 'click', this.props.teamId));
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
});
|
|
@@ -87,7 +87,7 @@ export class TeamProfileCardTriggerInternal extends React.PureComponent {
|
|
|
87
87
|
}
|
|
88
88
|
if (!this.state.visible) {
|
|
89
89
|
this.openedByHover = true;
|
|
90
|
-
this.fireAnalytics(cardTriggered('team', 'hover'));
|
|
90
|
+
this.fireAnalytics(cardTriggered('team', 'hover', this.props.teamId));
|
|
91
91
|
}
|
|
92
92
|
this.showProfilecard(DELAY_MS_SHOW);
|
|
93
93
|
});
|
|
@@ -107,7 +107,7 @@ export class TeamProfileCardTriggerInternal extends React.PureComponent {
|
|
|
107
107
|
});
|
|
108
108
|
this.showProfilecard(0);
|
|
109
109
|
if (!this.state.visible) {
|
|
110
|
-
this.fireAnalytics(cardTriggered('team', 'click'));
|
|
110
|
+
this.fireAnalytics(cardTriggered('team', 'click', this.props.teamId));
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
});
|
|
@@ -32,7 +32,7 @@ const createEvent = (eventType, action, actionSubject, actionSubjectId, attribut
|
|
|
32
32
|
actionSubjectId,
|
|
33
33
|
attributes: {
|
|
34
34
|
packageName: "@atlaskit/profilecard",
|
|
35
|
-
packageVersion: "23.
|
|
35
|
+
packageVersion: "23.8.0",
|
|
36
36
|
...attributes,
|
|
37
37
|
firedAt: Math.round(getPageTime())
|
|
38
38
|
}
|
|
@@ -49,9 +49,12 @@ const getActionSubject = type => {
|
|
|
49
49
|
return 'user';
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
|
-
export const cardTriggered = (type, method) => {
|
|
52
|
+
export const cardTriggered = (type, method, teamId) => {
|
|
53
53
|
return createEvent('ui', 'triggered', getActionSubject(type), undefined, {
|
|
54
|
-
method
|
|
54
|
+
method,
|
|
55
|
+
...(type === 'team' && teamId ? {
|
|
56
|
+
teamId
|
|
57
|
+
} : {})
|
|
55
58
|
});
|
|
56
59
|
};
|
|
57
60
|
export const teamRequestAnalytics = (action, attributes) => createEvent('operational', action, TEAM_SUBJECT, 'request', attributes);
|
|
@@ -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', "23.
|
|
7
|
+
headers.append('atl-client-version', "23.8.0");
|
|
8
8
|
return headers;
|
|
9
9
|
};
|
|
10
10
|
export function getOrgIdForCloudIdFromAGG(_x, _x2) {
|
|
@@ -57,7 +57,7 @@ export var 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', "23.
|
|
60
|
+
headers.append('atl-client-version', "23.8.0");
|
|
61
61
|
return headers;
|
|
62
62
|
};
|
|
63
63
|
export function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -92,7 +92,7 @@ export var TeamProfileCardTriggerInternal = /*#__PURE__*/function (_React$PureCo
|
|
|
92
92
|
_this.openedByHover = false;
|
|
93
93
|
_this.showProfilecard(0);
|
|
94
94
|
if (!_this.state.visible) {
|
|
95
|
-
_this.fireAnalytics(cardTriggered('team', 'click'));
|
|
95
|
+
_this.fireAnalytics(cardTriggered('team', 'click', _this.props.teamId));
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
});
|
|
@@ -102,7 +102,7 @@ export var TeamProfileCardTriggerInternal = /*#__PURE__*/function (_React$PureCo
|
|
|
102
102
|
}
|
|
103
103
|
if (!_this.state.visible) {
|
|
104
104
|
_this.openedByHover = true;
|
|
105
|
-
_this.fireAnalytics(cardTriggered('team', 'hover'));
|
|
105
|
+
_this.fireAnalytics(cardTriggered('team', 'hover', _this.props.teamId));
|
|
106
106
|
}
|
|
107
107
|
_this.showProfilecard(DELAY_MS_SHOW);
|
|
108
108
|
});
|
|
@@ -122,7 +122,7 @@ export var TeamProfileCardTriggerInternal = /*#__PURE__*/function (_React$PureCo
|
|
|
122
122
|
});
|
|
123
123
|
_this.showProfilecard(0);
|
|
124
124
|
if (!_this.state.visible) {
|
|
125
|
-
_this.fireAnalytics(cardTriggered('team', 'click'));
|
|
125
|
+
_this.fireAnalytics(cardTriggered('team', 'click', _this.props.teamId));
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
});
|
|
@@ -38,7 +38,7 @@ function ProfileCardContent(_ref) {
|
|
|
38
38
|
errorType = _ref.errorType,
|
|
39
39
|
agentActions = _ref.agentActions,
|
|
40
40
|
addFlag = _ref.addFlag;
|
|
41
|
-
if (isAgent
|
|
41
|
+
if (isAgent) {
|
|
42
42
|
return /*#__PURE__*/React.createElement(AgentProfileCardResourced, {
|
|
43
43
|
accountId: userId,
|
|
44
44
|
cloudId: cloudId,
|
|
@@ -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: "23.
|
|
42
|
+
packageVersion: "23.8.0"
|
|
43
43
|
}, attributes), {}, {
|
|
44
44
|
firedAt: Math.round(getPageTime())
|
|
45
45
|
})
|
|
@@ -57,10 +57,12 @@ var getActionSubject = function getActionSubject(type) {
|
|
|
57
57
|
return 'user';
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
|
-
export var cardTriggered = function cardTriggered(type, method) {
|
|
61
|
-
return createEvent('ui', 'triggered', getActionSubject(type), undefined, {
|
|
60
|
+
export var cardTriggered = function cardTriggered(type, method, teamId) {
|
|
61
|
+
return createEvent('ui', 'triggered', getActionSubject(type), undefined, _objectSpread({
|
|
62
62
|
method: method
|
|
63
|
-
}
|
|
63
|
+
}, type === 'team' && teamId ? {
|
|
64
|
+
teamId: teamId
|
|
65
|
+
} : {}));
|
|
64
66
|
};
|
|
65
67
|
export var teamRequestAnalytics = function teamRequestAnalytics(action, attributes) {
|
|
66
68
|
return createEvent('operational', action, TEAM_SUBJECT, 'request', attributes);
|
|
@@ -12,7 +12,7 @@ interface AnalyticsEvent {
|
|
|
12
12
|
source?: string;
|
|
13
13
|
}
|
|
14
14
|
export declare const fireEvent: (createAnalyticsEvent: CreateUIAnalyticsEvent | undefined, body: AnalyticsEvent) => void;
|
|
15
|
-
export declare const cardTriggered: (type: ProfileType, method: 'hover' | 'click') => AnalyticsEventPayload;
|
|
15
|
+
export declare const cardTriggered: (type: ProfileType, method: 'hover' | 'click', teamId?: string) => AnalyticsEventPayload;
|
|
16
16
|
export declare const teamRequestAnalytics: (action: 'triggered' | 'succeeded' | 'failed', attributes?: {
|
|
17
17
|
duration: number;
|
|
18
18
|
} & GenericAttributes) => AnalyticsEventPayload;
|
|
@@ -12,7 +12,7 @@ interface AnalyticsEvent {
|
|
|
12
12
|
source?: string;
|
|
13
13
|
}
|
|
14
14
|
export declare const fireEvent: (createAnalyticsEvent: CreateUIAnalyticsEvent | undefined, body: AnalyticsEvent) => void;
|
|
15
|
-
export declare const cardTriggered: (type: ProfileType, method: 'hover' | 'click') => AnalyticsEventPayload;
|
|
15
|
+
export declare const cardTriggered: (type: ProfileType, method: 'hover' | 'click', teamId?: string) => AnalyticsEventPayload;
|
|
16
16
|
export declare const teamRequestAnalytics: (action: 'triggered' | 'succeeded' | 'failed', attributes?: {
|
|
17
17
|
duration: number;
|
|
18
18
|
} & GenericAttributes) => AnalyticsEventPayload;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/profilecard",
|
|
3
|
-
"version": "23.
|
|
3
|
+
"version": "23.8.0",
|
|
4
4
|
"description": "A React component to display a card with user information.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -60,23 +60,23 @@
|
|
|
60
60
|
"@atlaskit/empty-state": "^9.0.0",
|
|
61
61
|
"@atlaskit/focus-ring": "^3.0.0",
|
|
62
62
|
"@atlaskit/give-kudos": "^4.0.0",
|
|
63
|
-
"@atlaskit/heading": "^5.
|
|
64
|
-
"@atlaskit/icon": "^25.
|
|
63
|
+
"@atlaskit/heading": "^5.2.0",
|
|
64
|
+
"@atlaskit/icon": "^25.6.0",
|
|
65
65
|
"@atlaskit/logo": "^16.0.0",
|
|
66
66
|
"@atlaskit/lozenge": "^12.2.0",
|
|
67
67
|
"@atlaskit/menu": "^3.2.0",
|
|
68
68
|
"@atlaskit/modal-dialog": "^14.1.0",
|
|
69
69
|
"@atlaskit/people-teams-ui-public": "^3.1.0",
|
|
70
70
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
71
|
-
"@atlaskit/popup": "^4.
|
|
72
|
-
"@atlaskit/primitives": "^14.
|
|
73
|
-
"@atlaskit/rovo-agent-components": "^2.
|
|
71
|
+
"@atlaskit/popup": "^4.1.0",
|
|
72
|
+
"@atlaskit/primitives": "^14.4.0",
|
|
73
|
+
"@atlaskit/rovo-agent-components": "^2.7.0",
|
|
74
74
|
"@atlaskit/rovo-triggers": "^2.10.0",
|
|
75
75
|
"@atlaskit/spinner": "^18.0.0",
|
|
76
76
|
"@atlaskit/teams-avatar": "^2.3.0",
|
|
77
|
-
"@atlaskit/teams-public": "^0.
|
|
77
|
+
"@atlaskit/teams-public": "^0.24.0",
|
|
78
78
|
"@atlaskit/theme": "^18.0.0",
|
|
79
|
-
"@atlaskit/tokens": "^4.
|
|
79
|
+
"@atlaskit/tokens": "^4.8.0",
|
|
80
80
|
"@atlaskit/tooltip": "^20.0.0",
|
|
81
81
|
"@babel/runtime": "^7.0.0",
|
|
82
82
|
"@compiled/react": "^0.18.3",
|
|
@@ -130,9 +130,6 @@
|
|
|
130
130
|
"enable_appropriate_reading_order_in_profile_card": {
|
|
131
131
|
"type": "boolean"
|
|
132
132
|
},
|
|
133
|
-
"enable_agent_profile_card": {
|
|
134
|
-
"type": "boolean"
|
|
135
|
-
},
|
|
136
133
|
"enable_ptc_townsquare_reporting_lines_unsharded": {
|
|
137
134
|
"type": "boolean"
|
|
138
135
|
},
|