@atlaskit/profilecard 24.13.6 → 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 +19 -0
- package/__tests__/vr-tests/__snapshots__/agent-profilecard/agent-profile-card-example--default.png +0 -0
- package/__tests__/vr-tests/__snapshots__/user-profilecard/alternate-actions--default.png +0 -0
- package/__tests__/vr-tests/__snapshots__/user-profilecard/best-case-profile--default.png +0 -0
- package/__tests__/vr-tests/__snapshots__/user-profilecard/bot-case-profile--default.png +0 -0
- package/__tests__/vr-tests/__snapshots__/user-profilecard/error-state--default.png +0 -0
- package/__tests__/vr-tests/__snapshots__/user-profilecard/error-state-not-found--default.png +0 -0
- package/__tests__/vr-tests/__snapshots__/user-profilecard/worst-case-profile--default.png +0 -0
- package/__tests__/vr-tests/agent-profilecard.vr.tsx +5 -0
- package/__tests__/vr-tests/user-profilecard.vr.tsx +17 -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 +3 -2
- package/dist/cjs/components/User/ProfileCardResourced.js +40 -16
- package/dist/cjs/components/User/ProfileCardTrigger.js +53 -13
- package/dist/cjs/components/User/ReportingLinesDetails.js +37 -12
- 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/components/team-profile-card/main.js +1 -1
- package/dist/cjs/components/team-profile-card/team-connections/main.js +3 -19
- package/dist/cjs/components/team-profile-card/team-containers-skeleton/index.js +1 -1
- package/dist/cjs/components/team-profile-card/team-containers-skeleton/linked-container-card-skeleton/index.js +1 -1
- package/dist/cjs/mocks/mock-profile-client.js +10 -0
- package/dist/cjs/mocks/profile-data.js +2 -2
- package/dist/cjs/mocks/reporting-lines-data.js +4 -3
- package/dist/cjs/styled/Card.js +1 -1
- package/dist/cjs/styled/CoverImage.js +1 -1
- package/dist/cjs/styled/Error.js +1 -1
- package/dist/cjs/styled/ReportingLines.js +1 -1
- package/dist/cjs/styled/TeamCard.js +1 -1
- package/dist/cjs/styled/TeamTrigger.js +1 -1
- package/dist/cjs/styled/UserTrigger.js +1 -1
- 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 +3 -2
- package/dist/es2019/components/User/ProfileCardResourced.js +25 -4
- package/dist/es2019/components/User/ProfileCardTrigger.js +55 -14
- package/dist/es2019/components/User/ReportingLinesDetails.js +31 -10
- 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/components/team-profile-card/main.js +1 -1
- package/dist/es2019/components/team-profile-card/team-connections/main.js +3 -18
- package/dist/es2019/components/team-profile-card/team-containers-skeleton/index.js +1 -1
- package/dist/es2019/components/team-profile-card/team-containers-skeleton/linked-container-card-skeleton/index.js +1 -1
- package/dist/es2019/mocks/mock-profile-client.js +6 -0
- package/dist/es2019/mocks/profile-data.js +1 -1
- package/dist/es2019/mocks/reporting-lines-data.js +2 -2
- package/dist/es2019/styled/Card.js +1 -1
- package/dist/es2019/styled/CoverImage.js +1 -1
- package/dist/es2019/styled/Error.js +1 -1
- package/dist/es2019/styled/ReportingLines.js +1 -1
- package/dist/es2019/styled/TeamCard.js +1 -1
- package/dist/es2019/styled/TeamTrigger.js +1 -1
- package/dist/es2019/styled/UserTrigger.js +1 -1
- 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 +3 -2
- package/dist/esm/components/User/ProfileCardResourced.js +40 -16
- package/dist/esm/components/User/ProfileCardTrigger.js +54 -14
- package/dist/esm/components/User/ReportingLinesDetails.js +38 -12
- 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/components/team-profile-card/main.js +1 -1
- package/dist/esm/components/team-profile-card/team-connections/main.js +3 -18
- package/dist/esm/components/team-profile-card/team-containers-skeleton/index.js +1 -1
- package/dist/esm/components/team-profile-card/team-containers-skeleton/linked-container-card-skeleton/index.js +1 -1
- package/dist/esm/mocks/mock-profile-client.js +10 -0
- package/dist/esm/mocks/profile-data.js +1 -1
- package/dist/esm/mocks/reporting-lines-data.js +2 -2
- package/dist/esm/styled/Card.js +1 -1
- package/dist/esm/styled/CoverImage.js +1 -1
- package/dist/esm/styled/Error.js +1 -1
- package/dist/esm/styled/ReportingLines.js +1 -1
- package/dist/esm/styled/TeamCard.js +1 -1
- package/dist/esm/styled/TeamTrigger.js +1 -1
- package/dist/esm/styled/UserTrigger.js +1 -1
- package/dist/esm/util/analytics.js +6 -2
- package/dist/types/client/ProfileCardClient.d.ts +2 -1
- package/dist/types/client/TeamCentralCardClient.d.ts +2 -2
- 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/mocks/profile-data.d.ts +1 -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/TeamCentralCardClient.d.ts +2 -2
- 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/mocks/profile-data.d.ts +1 -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 +12 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
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
|
+
|
|
14
|
+
## 24.13.7
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- [`f6b139b8c3922`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f6b139b8c3922) -
|
|
19
|
+
Clean up loom_tab_in_container_linker_team_profile_page
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
|
|
3
22
|
## 24.13.6
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/__tests__/vr-tests/__snapshots__/agent-profilecard/agent-profile-card-example--default.png
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { snapshot } from '@af/visual-regression';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
AlternateActions,
|
|
5
|
+
BestCaseProfile,
|
|
6
|
+
BotCaseProfile,
|
|
7
|
+
ErrorState,
|
|
8
|
+
ErrorStateNotFound,
|
|
9
|
+
WorstCaseProfile,
|
|
10
|
+
} from '../../examples/03-profilecard-overview';
|
|
11
|
+
|
|
12
|
+
snapshot(ErrorState);
|
|
13
|
+
snapshot(ErrorStateNotFound);
|
|
14
|
+
snapshot(BestCaseProfile);
|
|
15
|
+
snapshot(WorstCaseProfile);
|
|
16
|
+
snapshot(BotCaseProfile);
|
|
17
|
+
snapshot(AlternateActions);
|
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, {
|