@atlaskit/profilecard 24.13.7 → 24.14.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 +11 -0
- package/afm-cc/tsconfig.json +6 -0
- package/afm-dev-agents/tsconfig.json +6 -0
- package/afm-jira/tsconfig.json +6 -0
- package/afm-passionfruit/tsconfig.json +6 -0
- package/afm-post-office/tsconfig.json +6 -0
- package/afm-rovo-extension/tsconfig.json +6 -0
- package/afm-townsquare/tsconfig.json +6 -0
- package/dist/cjs/client/ProfileCardClient.js +2 -2
- package/dist/cjs/client/UserProfileCardClient.js +45 -11
- package/dist/cjs/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/cjs/client/getTeamFromAGG.js +1 -1
- package/dist/cjs/components/Agent/AgentProfileCard.js +3 -0
- package/dist/cjs/components/Agent/AgentProfileCardResourced.js +2 -1
- package/dist/cjs/components/Error/ErrorMessage.js +18 -7
- package/dist/cjs/components/User/OverflowProfileCardButtons.js +22 -7
- package/dist/cjs/components/User/ProfileCard.js +80 -28
- package/dist/cjs/components/User/ProfileCardDetails.js +2 -1
- package/dist/cjs/components/User/ProfileCardResourced.js +40 -16
- package/dist/cjs/components/User/ProfileCardTrigger.js +52 -12
- package/dist/cjs/components/User/ReportingLinesDetails.js +36 -11
- package/dist/cjs/components/User/UserLoadingState.js +15 -3
- package/dist/cjs/components/common/LoadingState.js +17 -3
- package/dist/cjs/components/common/ProfileCardTrigger.js +29 -7
- package/dist/cjs/components/common/ProfileCardWrapper.js +4 -2
- package/dist/cjs/util/analytics.js +7 -3
- package/dist/es2019/client/ProfileCardClient.js +2 -2
- package/dist/es2019/client/UserProfileCardClient.js +50 -13
- package/dist/es2019/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/es2019/client/getTeamFromAGG.js +1 -1
- package/dist/es2019/components/Agent/AgentProfileCard.js +3 -0
- package/dist/es2019/components/Agent/AgentProfileCardResourced.js +2 -1
- package/dist/es2019/components/Error/ErrorMessage.js +17 -6
- package/dist/es2019/components/User/OverflowProfileCardButtons.js +18 -7
- package/dist/es2019/components/User/ProfileCard.js +72 -25
- package/dist/es2019/components/User/ProfileCardDetails.js +2 -1
- package/dist/es2019/components/User/ProfileCardResourced.js +25 -4
- package/dist/es2019/components/User/ProfileCardTrigger.js +54 -13
- package/dist/es2019/components/User/ReportingLinesDetails.js +30 -9
- package/dist/es2019/components/User/UserLoadingState.js +14 -4
- package/dist/es2019/components/common/LoadingState.js +16 -4
- package/dist/es2019/components/common/ProfileCardTrigger.js +26 -7
- package/dist/es2019/components/common/ProfileCardWrapper.js +4 -2
- package/dist/es2019/util/analytics.js +6 -2
- package/dist/esm/client/ProfileCardClient.js +2 -2
- package/dist/esm/client/UserProfileCardClient.js +46 -12
- package/dist/esm/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/esm/client/getTeamFromAGG.js +1 -1
- package/dist/esm/components/Agent/AgentProfileCard.js +3 -0
- package/dist/esm/components/Agent/AgentProfileCardResourced.js +2 -1
- package/dist/esm/components/Error/ErrorMessage.js +19 -6
- package/dist/esm/components/User/OverflowProfileCardButtons.js +23 -8
- package/dist/esm/components/User/ProfileCard.js +80 -28
- package/dist/esm/components/User/ProfileCardDetails.js +2 -1
- package/dist/esm/components/User/ProfileCardResourced.js +40 -16
- package/dist/esm/components/User/ProfileCardTrigger.js +53 -13
- package/dist/esm/components/User/ReportingLinesDetails.js +37 -11
- package/dist/esm/components/User/UserLoadingState.js +16 -4
- package/dist/esm/components/common/LoadingState.js +18 -4
- package/dist/esm/components/common/ProfileCardTrigger.js +30 -8
- package/dist/esm/components/common/ProfileCardWrapper.js +4 -2
- package/dist/esm/util/analytics.js +6 -2
- package/dist/types/client/ProfileCardClient.d.ts +2 -1
- package/dist/types/client/UserProfileCardClient.d.ts +2 -1
- package/dist/types/components/Error/ErrorMessage.d.ts +2 -0
- package/dist/types/components/User/ProfileCard.d.ts +3 -2
- package/dist/types/components/User/ProfileCardResourced.d.ts +4 -2
- package/dist/types/components/User/UserLoadingState.d.ts +3 -1
- package/dist/types/components/User/lazyProfileCard.d.ts +1 -1
- package/dist/types/components/common/LoadingState.d.ts +3 -1
- package/dist/types/components/common/ProfileCardWrapper.d.ts +2 -1
- package/dist/types/components/common/types.d.ts +3 -0
- package/dist/types/types.d.ts +13 -6
- package/dist/types/util/analytics.d.ts +5 -0
- package/dist/types-ts4.5/client/ProfileCardClient.d.ts +2 -1
- package/dist/types-ts4.5/client/UserProfileCardClient.d.ts +2 -1
- package/dist/types-ts4.5/components/Error/ErrorMessage.d.ts +2 -0
- package/dist/types-ts4.5/components/User/ProfileCard.d.ts +3 -2
- package/dist/types-ts4.5/components/User/ProfileCardResourced.d.ts +4 -2
- package/dist/types-ts4.5/components/User/UserLoadingState.d.ts +3 -1
- package/dist/types-ts4.5/components/User/lazyProfileCard.d.ts +1 -1
- package/dist/types-ts4.5/components/common/LoadingState.d.ts +3 -1
- package/dist/types-ts4.5/components/common/ProfileCardWrapper.d.ts +2 -1
- package/dist/types-ts4.5/components/common/types.d.ts +3 -0
- package/dist/types-ts4.5/types.d.ts +13 -6
- package/dist/types-ts4.5/util/analytics.d.ts +5 -0
- package/package.json +10 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @atlaskit/profilecard
|
|
2
2
|
|
|
3
|
+
## 24.14.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`a5484f724ef0b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a5484f724ef0b) -
|
|
8
|
+
Migrated user profile card analytics to @atlaskit/teams-app-internal-analytics
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
3
14
|
## 24.13.7
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
package/afm-cc/tsconfig.json
CHANGED
|
@@ -80,6 +80,9 @@
|
|
|
80
80
|
{
|
|
81
81
|
"path": "../../../platform/feature-flags/afm-cc/tsconfig.json"
|
|
82
82
|
},
|
|
83
|
+
{
|
|
84
|
+
"path": "../../../platform/feature-flags-react/afm-cc/tsconfig.json"
|
|
85
|
+
},
|
|
83
86
|
{
|
|
84
87
|
"path": "../../../design-system/popup/afm-cc/tsconfig.json"
|
|
85
88
|
},
|
|
@@ -98,6 +101,9 @@
|
|
|
98
101
|
{
|
|
99
102
|
"path": "../../teams-app-config/afm-cc/tsconfig.json"
|
|
100
103
|
},
|
|
104
|
+
{
|
|
105
|
+
"path": "../../teams-app-internal-analytics/afm-cc/tsconfig.json"
|
|
106
|
+
},
|
|
101
107
|
{
|
|
102
108
|
"path": "../../teams-avatar/afm-cc/tsconfig.json"
|
|
103
109
|
},
|
|
@@ -80,6 +80,9 @@
|
|
|
80
80
|
{
|
|
81
81
|
"path": "../../../platform/feature-flags/afm-dev-agents/tsconfig.json"
|
|
82
82
|
},
|
|
83
|
+
{
|
|
84
|
+
"path": "../../../platform/feature-flags-react/afm-dev-agents/tsconfig.json"
|
|
85
|
+
},
|
|
83
86
|
{
|
|
84
87
|
"path": "../../../design-system/popup/afm-dev-agents/tsconfig.json"
|
|
85
88
|
},
|
|
@@ -98,6 +101,9 @@
|
|
|
98
101
|
{
|
|
99
102
|
"path": "../../teams-app-config/afm-dev-agents/tsconfig.json"
|
|
100
103
|
},
|
|
104
|
+
{
|
|
105
|
+
"path": "../../teams-app-internal-analytics/afm-dev-agents/tsconfig.json"
|
|
106
|
+
},
|
|
101
107
|
{
|
|
102
108
|
"path": "../../teams-avatar/afm-dev-agents/tsconfig.json"
|
|
103
109
|
},
|
package/afm-jira/tsconfig.json
CHANGED
|
@@ -80,6 +80,9 @@
|
|
|
80
80
|
{
|
|
81
81
|
"path": "../../../platform/feature-flags/afm-jira/tsconfig.json"
|
|
82
82
|
},
|
|
83
|
+
{
|
|
84
|
+
"path": "../../../platform/feature-flags-react/afm-jira/tsconfig.json"
|
|
85
|
+
},
|
|
83
86
|
{
|
|
84
87
|
"path": "../../../design-system/popup/afm-jira/tsconfig.json"
|
|
85
88
|
},
|
|
@@ -98,6 +101,9 @@
|
|
|
98
101
|
{
|
|
99
102
|
"path": "../../teams-app-config/afm-jira/tsconfig.json"
|
|
100
103
|
},
|
|
104
|
+
{
|
|
105
|
+
"path": "../../teams-app-internal-analytics/afm-jira/tsconfig.json"
|
|
106
|
+
},
|
|
101
107
|
{
|
|
102
108
|
"path": "../../teams-avatar/afm-jira/tsconfig.json"
|
|
103
109
|
},
|
|
@@ -80,6 +80,9 @@
|
|
|
80
80
|
{
|
|
81
81
|
"path": "../../../platform/feature-flags/afm-passionfruit/tsconfig.json"
|
|
82
82
|
},
|
|
83
|
+
{
|
|
84
|
+
"path": "../../../platform/feature-flags-react/afm-passionfruit/tsconfig.json"
|
|
85
|
+
},
|
|
83
86
|
{
|
|
84
87
|
"path": "../../../design-system/popup/afm-passionfruit/tsconfig.json"
|
|
85
88
|
},
|
|
@@ -98,6 +101,9 @@
|
|
|
98
101
|
{
|
|
99
102
|
"path": "../../teams-app-config/afm-passionfruit/tsconfig.json"
|
|
100
103
|
},
|
|
104
|
+
{
|
|
105
|
+
"path": "../../teams-app-internal-analytics/afm-passionfruit/tsconfig.json"
|
|
106
|
+
},
|
|
101
107
|
{
|
|
102
108
|
"path": "../../teams-avatar/afm-passionfruit/tsconfig.json"
|
|
103
109
|
},
|
|
@@ -80,6 +80,9 @@
|
|
|
80
80
|
{
|
|
81
81
|
"path": "../../../platform/feature-flags/afm-post-office/tsconfig.json"
|
|
82
82
|
},
|
|
83
|
+
{
|
|
84
|
+
"path": "../../../platform/feature-flags-react/afm-post-office/tsconfig.json"
|
|
85
|
+
},
|
|
83
86
|
{
|
|
84
87
|
"path": "../../../design-system/popup/afm-post-office/tsconfig.json"
|
|
85
88
|
},
|
|
@@ -98,6 +101,9 @@
|
|
|
98
101
|
{
|
|
99
102
|
"path": "../../teams-app-config/afm-post-office/tsconfig.json"
|
|
100
103
|
},
|
|
104
|
+
{
|
|
105
|
+
"path": "../../teams-app-internal-analytics/afm-post-office/tsconfig.json"
|
|
106
|
+
},
|
|
101
107
|
{
|
|
102
108
|
"path": "../../teams-avatar/afm-post-office/tsconfig.json"
|
|
103
109
|
},
|
|
@@ -80,6 +80,9 @@
|
|
|
80
80
|
{
|
|
81
81
|
"path": "../../../platform/feature-flags/afm-rovo-extension/tsconfig.json"
|
|
82
82
|
},
|
|
83
|
+
{
|
|
84
|
+
"path": "../../../platform/feature-flags-react/afm-rovo-extension/tsconfig.json"
|
|
85
|
+
},
|
|
83
86
|
{
|
|
84
87
|
"path": "../../../design-system/popup/afm-rovo-extension/tsconfig.json"
|
|
85
88
|
},
|
|
@@ -98,6 +101,9 @@
|
|
|
98
101
|
{
|
|
99
102
|
"path": "../../teams-app-config/afm-rovo-extension/tsconfig.json"
|
|
100
103
|
},
|
|
104
|
+
{
|
|
105
|
+
"path": "../../teams-app-internal-analytics/afm-rovo-extension/tsconfig.json"
|
|
106
|
+
},
|
|
101
107
|
{
|
|
102
108
|
"path": "../../teams-avatar/afm-rovo-extension/tsconfig.json"
|
|
103
109
|
},
|
|
@@ -80,6 +80,9 @@
|
|
|
80
80
|
{
|
|
81
81
|
"path": "../../../platform/feature-flags/afm-townsquare/tsconfig.json"
|
|
82
82
|
},
|
|
83
|
+
{
|
|
84
|
+
"path": "../../../platform/feature-flags-react/afm-townsquare/tsconfig.json"
|
|
85
|
+
},
|
|
83
86
|
{
|
|
84
87
|
"path": "../../../design-system/popup/afm-townsquare/tsconfig.json"
|
|
85
88
|
},
|
|
@@ -98,6 +101,9 @@
|
|
|
98
101
|
{
|
|
99
102
|
"path": "../../teams-app-config/afm-townsquare/tsconfig.json"
|
|
100
103
|
},
|
|
104
|
+
{
|
|
105
|
+
"path": "../../teams-app-internal-analytics/afm-townsquare/tsconfig.json"
|
|
106
|
+
},
|
|
101
107
|
{
|
|
102
108
|
"path": "../../teams-avatar/afm-townsquare/tsconfig.json"
|
|
103
109
|
},
|
|
@@ -44,8 +44,8 @@ var ProfileCardClient = /*#__PURE__*/function () {
|
|
|
44
44
|
}
|
|
45
45
|
}, {
|
|
46
46
|
key: "getProfile",
|
|
47
|
-
value: function getProfile(cloudId, userId, analytics) {
|
|
48
|
-
return this.userClient.getProfile(cloudId, userId, analytics);
|
|
47
|
+
value: function getProfile(cloudId, userId, analytics, analyticsNext) {
|
|
48
|
+
return this.userClient.getProfile(cloudId, userId, analytics, analyticsNext);
|
|
49
49
|
}
|
|
50
50
|
}, {
|
|
51
51
|
key: "getTeamProfile",
|
|
@@ -153,7 +153,7 @@ var UserProfileCardClient = exports.default = /*#__PURE__*/function (_CachingCli
|
|
|
153
153
|
}()
|
|
154
154
|
}, {
|
|
155
155
|
key: "getProfile",
|
|
156
|
-
value: function getProfile(cloudId, userId, analytics) {
|
|
156
|
+
value: function getProfile(cloudId, userId, analytics, analyticsNext) {
|
|
157
157
|
var _this2 = this;
|
|
158
158
|
if (!userId) {
|
|
159
159
|
return Promise.reject(new Error('userId missing'));
|
|
@@ -165,24 +165,58 @@ var UserProfileCardClient = exports.default = /*#__PURE__*/function (_CachingCli
|
|
|
165
165
|
}
|
|
166
166
|
return new Promise(function (resolve, reject) {
|
|
167
167
|
var startTime = (0, _performance.getPageTime)();
|
|
168
|
-
if (analytics) {
|
|
169
|
-
|
|
168
|
+
if ((0, _platformFeatureFlags.fg)('ptc-enable-profile-card-analytics-refactor')) {
|
|
169
|
+
if (analyticsNext) {
|
|
170
|
+
analyticsNext('operational.profilecard.triggered.request', _objectSpread({
|
|
171
|
+
firedAt: Math.round((0, _performance.getPageTime)())
|
|
172
|
+
}, _analytics.PACKAGE_META_DATA));
|
|
173
|
+
}
|
|
174
|
+
} else {
|
|
175
|
+
if (analytics) {
|
|
176
|
+
analytics((0, _analytics.userRequestAnalytics)('triggered'));
|
|
177
|
+
}
|
|
170
178
|
}
|
|
171
179
|
_this2.makeRequest(cloudId, userId).then(function (data) {
|
|
172
180
|
if (_this2.cache) {
|
|
173
181
|
_this2.setCachedProfile(cacheIdentifier, data);
|
|
174
182
|
}
|
|
175
|
-
if (analytics) {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
183
|
+
if ((0, _platformFeatureFlags.fg)('ptc-enable-profile-card-analytics-refactor')) {
|
|
184
|
+
if (analyticsNext) {
|
|
185
|
+
analyticsNext('operational.profilecard.succeeded.request', _objectSpread({
|
|
186
|
+
duration: (0, _performance.getPageTime)() - startTime,
|
|
187
|
+
firedAt: Math.round((0, _performance.getPageTime)())
|
|
188
|
+
}, _analytics.PACKAGE_META_DATA));
|
|
189
|
+
}
|
|
190
|
+
} else {
|
|
191
|
+
if (analytics) {
|
|
192
|
+
analytics((0, _analytics.userRequestAnalytics)('succeeded', {
|
|
193
|
+
duration: (0, _performance.getPageTime)() - startTime
|
|
194
|
+
}));
|
|
195
|
+
}
|
|
179
196
|
}
|
|
180
197
|
resolve(data);
|
|
181
198
|
}).catch(function (error) {
|
|
182
|
-
if (analytics) {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
199
|
+
if ((0, _platformFeatureFlags.fg)('ptc-enable-profile-card-analytics-refactor')) {
|
|
200
|
+
if (analyticsNext) {
|
|
201
|
+
var errorAttributes = (0, _errorUtils.getErrorAttributes)(error);
|
|
202
|
+
analyticsNext('operational.profilecard.failed.request', _objectSpread(_objectSpread({
|
|
203
|
+
duration: (0, _performance.getPageTime)() - startTime
|
|
204
|
+
}, errorAttributes), {}, {
|
|
205
|
+
traceId: errorAttributes.traceId || null,
|
|
206
|
+
errorCategory: errorAttributes.errorCategory || null,
|
|
207
|
+
errorType: errorAttributes.errorType || null,
|
|
208
|
+
errorPath: errorAttributes.errorPath || null,
|
|
209
|
+
errorNumber: errorAttributes.errorNumber || null,
|
|
210
|
+
errorStatusCode: errorAttributes.errorStatusCode || null,
|
|
211
|
+
firedAt: Math.round((0, _performance.getPageTime)())
|
|
212
|
+
}, _analytics.PACKAGE_META_DATA));
|
|
213
|
+
}
|
|
214
|
+
} else {
|
|
215
|
+
if (analytics) {
|
|
216
|
+
analytics((0, _analytics.userRequestAnalytics)('failed', _objectSpread({
|
|
217
|
+
duration: (0, _performance.getPageTime)() - startTime
|
|
218
|
+
}, (0, _errorUtils.getErrorAttributes)(error))));
|
|
219
|
+
}
|
|
186
220
|
}
|
|
187
221
|
reject(error);
|
|
188
222
|
});
|
|
@@ -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.13.
|
|
14
|
+
headers.append('atl-client-version', "24.13.7");
|
|
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', "24.13.
|
|
69
|
+
headers.append('atl-client-version', "24.13.7");
|
|
70
70
|
return headers;
|
|
71
71
|
};
|
|
72
72
|
function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -174,6 +174,9 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
174
174
|
return /*#__PURE__*/_react.default.createElement(_AgentProfileCardWrapper.AgentProfileCardWrapper, null, /*#__PURE__*/_react.default.createElement(_Error.ErrorMessage, {
|
|
175
175
|
errorType: errorType,
|
|
176
176
|
fireAnalytics: fireAnalytics
|
|
177
|
+
// TODO: Add fireAnalyticsNext
|
|
178
|
+
,
|
|
179
|
+
fireAnalyticsNext: function fireAnalyticsNext() {}
|
|
177
180
|
}));
|
|
178
181
|
}
|
|
179
182
|
return /*#__PURE__*/_react.default.createElement(_AgentProfileCardWrapper.AgentProfileCardWrapper, null, /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
@@ -157,7 +157,8 @@ var AgentProfileCardResourced = exports.AgentProfileCardResourced = function Age
|
|
|
157
157
|
fetchData();
|
|
158
158
|
},
|
|
159
159
|
errorType: error || null,
|
|
160
|
-
fireAnalytics: function fireAnalytics() {}
|
|
160
|
+
fireAnalytics: function fireAnalytics() {},
|
|
161
|
+
fireAnalyticsNext: function fireAnalyticsNext() {}
|
|
161
162
|
}));
|
|
162
163
|
}
|
|
163
164
|
return /*#__PURE__*/_react.default.createElement(_react.Suspense, {
|
|
@@ -6,30 +6,41 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
11
|
var _new = _interopRequireDefault(require("@atlaskit/button/new"));
|
|
11
12
|
var _crossCircle = _interopRequireDefault(require("@atlaskit/icon/core/cross-circle"));
|
|
12
13
|
var _crossCircle2 = _interopRequireDefault(require("@atlaskit/icon/glyph/cross-circle"));
|
|
14
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
15
|
var _primitives = require("@atlaskit/primitives");
|
|
14
16
|
var _Error = require("../../styled/Error");
|
|
15
17
|
var _analytics = require("../../util/analytics");
|
|
16
18
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
20
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
19
21
|
var ErrorMessage = function ErrorMessage(props) {
|
|
20
22
|
var errorType = props.errorType || {
|
|
21
23
|
reason: 'default'
|
|
22
24
|
};
|
|
23
25
|
var errorReason = errorType.reason;
|
|
24
26
|
var fireAnalytics = props.fireAnalytics,
|
|
27
|
+
fireAnalyticsNext = props.fireAnalyticsNext,
|
|
25
28
|
reload = props.reload;
|
|
26
29
|
var hasRetry = !!reload;
|
|
27
30
|
(0, _react.useEffect)(function () {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
if ((0, _platformFeatureFlags.fg)('ptc-enable-profile-card-analytics-refactor')) {
|
|
32
|
+
fireAnalyticsNext('ui.profilecard.rendered.error', _objectSpread({
|
|
33
|
+
hasRetry: hasRetry,
|
|
34
|
+
errorType: errorReason,
|
|
35
|
+
firedAt: Math.round(performance.now())
|
|
36
|
+
}, _analytics.PACKAGE_META_DATA));
|
|
37
|
+
} else {
|
|
38
|
+
fireAnalytics((0, _analytics.profileCardRendered)('user', 'error', {
|
|
39
|
+
hasRetry: hasRetry,
|
|
40
|
+
errorType: errorReason
|
|
41
|
+
}));
|
|
42
|
+
}
|
|
43
|
+
}, [errorReason, fireAnalytics, fireAnalyticsNext, hasRetry]);
|
|
33
44
|
var errorContent = function errorContent() {
|
|
34
45
|
if (errorReason === 'NotFound') {
|
|
35
46
|
return /*#__PURE__*/_react.default.createElement(_Error.ErrorTitle, null, "The user is no longer available for the site");
|
|
@@ -8,6 +8,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.OverflowProfileCardButtons = exports.ACTION_OVERFLOW_THRESHOLD = void 0;
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
12
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
12
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
14
|
var _reactIntlNext = require("react-intl-next");
|
|
@@ -18,8 +19,11 @@ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
|
18
19
|
var _messages = _interopRequireDefault(require("../../messages"));
|
|
19
20
|
var _Card = require("../../styled/Card");
|
|
20
21
|
var _analytics = require("../../util/analytics");
|
|
22
|
+
var _performance = require("../../util/performance");
|
|
21
23
|
var _excluded = ["triggerRef", "isSelected", "testId"];
|
|
22
24
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
25
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
26
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
23
27
|
var ACTION_OVERFLOW_THRESHOLD = exports.ACTION_OVERFLOW_THRESHOLD = 2;
|
|
24
28
|
var OverflowProfileCardButtons = exports.OverflowProfileCardButtons = function OverflowProfileCardButtons(props) {
|
|
25
29
|
var intl = (0, _reactIntlNext.useIntl)();
|
|
@@ -28,22 +32,33 @@ var OverflowProfileCardButtons = exports.OverflowProfileCardButtons = function O
|
|
|
28
32
|
setOpen = _useState2[1];
|
|
29
33
|
var actions = props.actions,
|
|
30
34
|
onItemClick = props.onItemClick,
|
|
31
|
-
fireAnalyticsWithDuration = props.fireAnalyticsWithDuration
|
|
35
|
+
fireAnalyticsWithDuration = props.fireAnalyticsWithDuration,
|
|
36
|
+
fireAnalyticsWithDurationNext = props.fireAnalyticsWithDurationNext;
|
|
32
37
|
var numActions = actions.length + ACTION_OVERFLOW_THRESHOLD;
|
|
33
38
|
var onOpenChange = (0, _react.useCallback)(function (_ref) {
|
|
34
39
|
var nextOpen = _ref.isOpen;
|
|
35
40
|
setOpen(function (prevOpen) {
|
|
36
41
|
if (nextOpen && !prevOpen) {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
42
|
+
if ((0, _platformFeatureFlags.fg)('ptc-enable-profile-card-analytics-refactor')) {
|
|
43
|
+
fireAnalyticsWithDurationNext('ui.profilecard.clicked.moreActions', function (duration) {
|
|
44
|
+
return _objectSpread({
|
|
45
|
+
duration: duration,
|
|
46
|
+
numActions: numActions,
|
|
47
|
+
firedAt: Math.round((0, _performance.getPageTime)())
|
|
48
|
+
}, _analytics.PACKAGE_META_DATA);
|
|
41
49
|
});
|
|
42
|
-
}
|
|
50
|
+
} else {
|
|
51
|
+
fireAnalyticsWithDuration(function (duration) {
|
|
52
|
+
return (0, _analytics.moreActionsClicked)('user', {
|
|
53
|
+
duration: duration,
|
|
54
|
+
numActions: numActions
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
}
|
|
43
58
|
}
|
|
44
59
|
return nextOpen;
|
|
45
60
|
});
|
|
46
|
-
}, [numActions, fireAnalyticsWithDuration]);
|
|
61
|
+
}, [numActions, fireAnalyticsWithDuration, fireAnalyticsWithDurationNext]);
|
|
47
62
|
return /*#__PURE__*/_react.default.createElement(_Card.OverflowActionButtonsWrapper, {
|
|
48
63
|
testId: "profilecard-actions-overflow"
|
|
49
64
|
}, /*#__PURE__*/_react.default.createElement(_dropdownMenu.default, {
|
|
@@ -5,9 +5,10 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.default = exports.ProfilecardInternal = void 0;
|
|
8
|
+
exports.default = exports.ProfilecardInternal = exports.LoadingView = void 0;
|
|
9
9
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
10
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
12
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
12
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
14
|
var _reactIntlNext = require("react-intl-next");
|
|
@@ -15,7 +16,9 @@ var _analyticsNext = require("@atlaskit/analytics-next");
|
|
|
15
16
|
var _avatar = _interopRequireDefault(require("@atlaskit/avatar"));
|
|
16
17
|
var _new = require("@atlaskit/button/new");
|
|
17
18
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
19
|
+
var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
|
|
18
20
|
var _spinner = _interopRequireDefault(require("@atlaskit/spinner"));
|
|
21
|
+
var _teamsAppInternalAnalytics = require("@atlaskit/teams-app-internal-analytics");
|
|
19
22
|
var _colors = require("@atlaskit/theme/colors");
|
|
20
23
|
var _messages = _interopRequireDefault(require("../../messages"));
|
|
21
24
|
var _Card = require("../../styled/Card");
|
|
@@ -27,6 +30,8 @@ var _Error = require("../Error");
|
|
|
27
30
|
var _OverflowProfileCardButtons = require("./OverflowProfileCardButtons");
|
|
28
31
|
var _ProfileCardDetails = require("./ProfileCardDetails");
|
|
29
32
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
33
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
34
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
30
35
|
var GIVE_KUDOS_ACTION_ID = 'give-kudos';
|
|
31
36
|
var useKudos = function useKudos(cloudId, userId, teamCentralBaseUrl, openKudosDrawer) {
|
|
32
37
|
var kudosUrl = (0, _react.useMemo)(function () {
|
|
@@ -67,6 +72,8 @@ var ProfilecardInternal = exports.ProfilecardInternal = function ProfilecardInte
|
|
|
67
72
|
_useState2 = (0, _slicedToArray2.default)(_useState, 1),
|
|
68
73
|
openTime = _useState2[0];
|
|
69
74
|
var createAnalyticsEvent = props.createAnalyticsEvent;
|
|
75
|
+
var _useAnalyticsEvents = (0, _teamsAppInternalAnalytics.useAnalyticsEvents)(),
|
|
76
|
+
fireEventNext = _useAnalyticsEvents.fireEvent;
|
|
70
77
|
var fireAnalytics = (0, _react.useCallback)(function (payload) {
|
|
71
78
|
if (createAnalyticsEvent) {
|
|
72
79
|
(0, _analytics.fireEvent)(createAnalyticsEvent, payload);
|
|
@@ -77,6 +84,11 @@ var ProfilecardInternal = exports.ProfilecardInternal = function ProfilecardInte
|
|
|
77
84
|
var event = generator(elapsed);
|
|
78
85
|
fireAnalytics(event);
|
|
79
86
|
}, [fireAnalytics, openTime]);
|
|
87
|
+
var fireAnalyticsWithDurationNext = (0, _react.useCallback)(function (eventKey, generator) {
|
|
88
|
+
var duration = (0, _performance.getPageTime)() - openTime;
|
|
89
|
+
var attributes = generator(duration);
|
|
90
|
+
fireEventNext(eventKey, attributes);
|
|
91
|
+
}, [openTime, fireEventNext]);
|
|
80
92
|
var _useKudos = useKudos(props.cloudId, props.userId, props.teamCentralBaseUrl, props.openKudosDrawer),
|
|
81
93
|
kudosAction = _useKudos.kudosAction;
|
|
82
94
|
var _props$actions = props.actions,
|
|
@@ -97,24 +109,36 @@ var ProfilecardInternal = exports.ProfilecardInternal = function ProfilecardInte
|
|
|
97
109
|
var canRender = !hasError && !isLoading && !!(fullName || status === 'closed');
|
|
98
110
|
(0, _react.useEffect)(function () {
|
|
99
111
|
if (canRender) {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
112
|
+
if ((0, _platformFeatureFlags.fg)('ptc-enable-profile-card-analytics-refactor')) {
|
|
113
|
+
fireAnalyticsWithDurationNext('ui.profilecard.rendered.content', function (duration) {
|
|
114
|
+
return _objectSpread({
|
|
115
|
+
duration: duration,
|
|
116
|
+
numActions: realActions.length,
|
|
117
|
+
firedAt: Math.round((0, _performance.getPageTime)())
|
|
118
|
+
}, _analytics.PACKAGE_META_DATA);
|
|
104
119
|
});
|
|
105
|
-
}
|
|
120
|
+
} else {
|
|
121
|
+
fireAnalyticsWithDuration(function (duration) {
|
|
122
|
+
return (0, _analytics.profileCardRendered)('user', 'content', {
|
|
123
|
+
duration: duration,
|
|
124
|
+
numActions: realActions.length
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
}
|
|
106
128
|
}
|
|
107
|
-
}, [canRender, fireAnalyticsWithDuration, realActions]);
|
|
129
|
+
}, [canRender, fireAnalyticsWithDuration, fireAnalyticsWithDurationNext, realActions]);
|
|
108
130
|
if (hasError) {
|
|
109
131
|
return /*#__PURE__*/_react.default.createElement(Wrapper, null, /*#__PURE__*/_react.default.createElement(_Error.ErrorMessage, {
|
|
110
132
|
reload: props.clientFetchProfile,
|
|
111
133
|
errorType: props.errorType || null,
|
|
112
|
-
fireAnalytics: fireAnalytics
|
|
134
|
+
fireAnalytics: fireAnalytics,
|
|
135
|
+
fireAnalyticsNext: fireEventNext
|
|
113
136
|
}));
|
|
114
137
|
}
|
|
115
138
|
if (isLoading) {
|
|
116
139
|
return /*#__PURE__*/_react.default.createElement(Wrapper, null, /*#__PURE__*/_react.default.createElement(LoadingView, {
|
|
117
|
-
fireAnalyticsWithDuration: fireAnalyticsWithDuration
|
|
140
|
+
fireAnalyticsWithDuration: fireAnalyticsWithDuration,
|
|
141
|
+
fireAnalyticsWithDurationNext: fireAnalyticsWithDurationNext
|
|
118
142
|
}));
|
|
119
143
|
}
|
|
120
144
|
if (!canRender) {
|
|
@@ -130,36 +154,53 @@ var ProfilecardInternal = exports.ProfilecardInternal = function ProfilecardInte
|
|
|
130
154
|
borderColor: "var(--ds-shadow-overlay, ".concat(_colors.N0, ")")
|
|
131
155
|
})), /*#__PURE__*/_react.default.createElement(_Card.CardContent, null, /*#__PURE__*/_react.default.createElement(_ProfileCardDetails.ProfileCardDetails, (0, _extends2.default)({}, props, {
|
|
132
156
|
status: status,
|
|
133
|
-
fireAnalyticsWithDuration: fireAnalyticsWithDuration
|
|
157
|
+
fireAnalyticsWithDuration: fireAnalyticsWithDuration,
|
|
158
|
+
fireAnalyticsWithDurationNext: fireAnalyticsWithDurationNext
|
|
134
159
|
})), 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
160
|
fullName: fullName
|
|
136
161
|
}, {
|
|
137
162
|
fullName: fullName,
|
|
138
163
|
actions: realActions,
|
|
139
164
|
fireAnalyticsWithDuration: fireAnalyticsWithDuration,
|
|
140
|
-
isTriggeredUsingKeyboard: props.isTriggeredUsingKeyboard
|
|
165
|
+
isTriggeredUsingKeyboard: props.isTriggeredUsingKeyboard,
|
|
166
|
+
fireAnalyticsWithDurationNext: fireAnalyticsWithDurationNext
|
|
141
167
|
}))))));
|
|
142
168
|
};
|
|
143
169
|
var Actions = function Actions(_ref) {
|
|
144
170
|
var actions = _ref.actions,
|
|
145
171
|
fireAnalyticsWithDuration = _ref.fireAnalyticsWithDuration,
|
|
172
|
+
fireAnalyticsWithDurationNext = _ref.fireAnalyticsWithDurationNext,
|
|
146
173
|
isTriggeredUsingKeyboard = _ref.isTriggeredUsingKeyboard,
|
|
147
174
|
fullName = _ref.fullName;
|
|
148
175
|
var onActionClick = (0, _react.useCallback)(function (action, args, event, index) {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
176
|
+
if ((0, _platformFeatureFlags.fg)('ptc-enable-profile-card-analytics-refactor')) {
|
|
177
|
+
fireAnalyticsWithDurationNext('ui.profilecard.clicked.action', function (duration) {
|
|
178
|
+
return _objectSpread({
|
|
179
|
+
method: 'click',
|
|
180
|
+
firedAt: Math.round((0, _performance.getPageTime)()),
|
|
181
|
+
duration: duration,
|
|
182
|
+
hasHref: !!action.link,
|
|
183
|
+
hasOnClick: !!action.callback,
|
|
184
|
+
index: index,
|
|
185
|
+
actionId: action.id || 'no-id-specified'
|
|
186
|
+
}, _analytics.PACKAGE_META_DATA);
|
|
156
187
|
});
|
|
157
|
-
}
|
|
188
|
+
} else {
|
|
189
|
+
fireAnalyticsWithDuration(function (duration) {
|
|
190
|
+
return (0, _analytics.actionClicked)('user', {
|
|
191
|
+
duration: duration,
|
|
192
|
+
hasHref: !!action.link,
|
|
193
|
+
hasOnClick: !!action.callback,
|
|
194
|
+
index: index,
|
|
195
|
+
actionId: action.id || 'no-id-specified'
|
|
196
|
+
});
|
|
197
|
+
});
|
|
198
|
+
}
|
|
158
199
|
if (action.callback && (0, _click.isBasicClick)(event)) {
|
|
159
200
|
event.preventDefault();
|
|
160
201
|
action.callback.apply(action, [event].concat((0, _toConsumableArray2.default)(args)));
|
|
161
202
|
}
|
|
162
|
-
}, [fireAnalyticsWithDuration]);
|
|
203
|
+
}, [fireAnalyticsWithDuration, fireAnalyticsWithDurationNext]);
|
|
163
204
|
if (!actions || actions.length === 0) {
|
|
164
205
|
return null;
|
|
165
206
|
}
|
|
@@ -193,6 +234,7 @@ var Actions = function Actions(_ref) {
|
|
|
193
234
|
}), overflowActions && /*#__PURE__*/_react.default.createElement(_OverflowProfileCardButtons.OverflowProfileCardButtons, (0, _extends2.default)({
|
|
194
235
|
actions: overflowActions,
|
|
195
236
|
fireAnalyticsWithDuration: fireAnalyticsWithDuration,
|
|
237
|
+
fireAnalyticsWithDurationNext: fireAnalyticsWithDurationNext,
|
|
196
238
|
onItemClick: function onItemClick(action, args, event, index) {
|
|
197
239
|
return onActionClick(action, args, event, index + _OverflowProfileCardButtons.ACTION_OVERFLOW_THRESHOLD);
|
|
198
240
|
}
|
|
@@ -200,17 +242,27 @@ var Actions = function Actions(_ref) {
|
|
|
200
242
|
fullName: fullName
|
|
201
243
|
})));
|
|
202
244
|
};
|
|
203
|
-
var LoadingView = function LoadingView(_ref2) {
|
|
204
|
-
var fireAnalyticsWithDuration = _ref2.fireAnalyticsWithDuration
|
|
245
|
+
var LoadingView = exports.LoadingView = function LoadingView(_ref2) {
|
|
246
|
+
var fireAnalyticsWithDuration = _ref2.fireAnalyticsWithDuration,
|
|
247
|
+
fireAnalyticsWithDurationNext = _ref2.fireAnalyticsWithDurationNext;
|
|
205
248
|
(0, _react.useEffect)(function () {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
249
|
+
if ((0, _platformFeatureFlags.fg)('ptc-enable-profile-card-analytics-refactor')) {
|
|
250
|
+
fireAnalyticsWithDurationNext('ui.profilecard.rendered.spinner', function (duration) {
|
|
251
|
+
return _objectSpread({
|
|
252
|
+
firedAt: Math.round((0, _performance.getPageTime)()),
|
|
253
|
+
duration: duration
|
|
254
|
+
}, _analytics.PACKAGE_META_DATA);
|
|
255
|
+
});
|
|
256
|
+
} else {
|
|
257
|
+
fireAnalyticsWithDuration(function (duration) {
|
|
258
|
+
return (0, _analytics.profileCardRendered)('user', 'spinner', {
|
|
259
|
+
duration: duration
|
|
260
|
+
});
|
|
209
261
|
});
|
|
210
|
-
}
|
|
211
|
-
}, [fireAnalyticsWithDuration]);
|
|
262
|
+
}
|
|
263
|
+
}, [fireAnalyticsWithDuration, fireAnalyticsWithDurationNext]);
|
|
212
264
|
return /*#__PURE__*/_react.default.createElement(_UserTrigger.SpinnerContainer, {
|
|
213
265
|
testId: "profilecard-spinner-container"
|
|
214
266
|
}, /*#__PURE__*/_react.default.createElement(_spinner.default, null));
|
|
215
267
|
};
|
|
216
|
-
var _default = exports.default = (0, _analyticsNext.withAnalyticsEvents)()(ProfilecardInternal);
|
|
268
|
+
var _default = exports.default = (0, _platformFeatureFlagsReact.componentWithFG)('ptc-enable-profile-card-analytics-refactor', ProfilecardInternal, (0, _analyticsNext.withAnalyticsEvents)()(ProfilecardInternal));
|
|
@@ -140,6 +140,7 @@ var ProfileCardDetails = exports.ProfileCardDetails = function ProfileCardDetail
|
|
|
140
140
|
reportingLines: props.reportingLines,
|
|
141
141
|
reportingLinesProfileUrl: props.reportingLinesProfileUrl,
|
|
142
142
|
onReportingLinesClick: props.onReportingLinesClick,
|
|
143
|
-
fireAnalyticsWithDuration: props.fireAnalyticsWithDuration
|
|
143
|
+
fireAnalyticsWithDuration: props.fireAnalyticsWithDuration,
|
|
144
|
+
fireAnalyticsWithDurationNext: props.fireAnalyticsWithDurationNext
|
|
144
145
|
}));
|
|
145
146
|
};
|