@atlaskit/profilecard 26.8.4 → 26.8.5
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 +8 -0
- package/dist/cjs/client/RovoAgentCardClient.js +2 -2
- package/dist/cjs/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/cjs/client/getTeamFromAGG.js +1 -1
- package/dist/cjs/components/Agent/AgentProfileCardResourced.js +3 -2
- package/dist/cjs/util/analytics.js +2 -2
- package/dist/es2019/client/RovoAgentCardClient.js +2 -2
- package/dist/es2019/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/es2019/client/getTeamFromAGG.js +1 -1
- package/dist/es2019/components/Agent/AgentProfileCardResourced.js +3 -2
- package/dist/es2019/util/analytics.js +2 -2
- package/dist/esm/client/RovoAgentCardClient.js +2 -2
- package/dist/esm/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/esm/client/getTeamFromAGG.js +1 -1
- package/dist/esm/components/Agent/AgentProfileCardResourced.js +3 -2
- package/dist/esm/util/analytics.js +2 -2
- package/package.json +2 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/profilecard
|
|
2
2
|
|
|
3
|
+
## 26.8.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`763bf25cf903d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/763bf25cf903d) -
|
|
8
|
+
Converted platform_editor_reduced_agent_profile_card to be an experiment flag
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 26.8.4
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -238,7 +238,7 @@ var RovoAgentCardClient = exports.default = /*#__PURE__*/function (_CachingClien
|
|
|
238
238
|
mode: 'cors',
|
|
239
239
|
headers: headers
|
|
240
240
|
})).then(function (response) {
|
|
241
|
-
if (response.status === 403 && (
|
|
241
|
+
if (response.status === 403 && _featureGates.default.getExperimentValue('platform_editor_reduced_profile_cards', 'isEnabled', false)) {
|
|
242
242
|
throw new AgentForbiddenError();
|
|
243
243
|
}
|
|
244
244
|
return response.json();
|
|
@@ -250,7 +250,7 @@ var RovoAgentCardClient = exports.default = /*#__PURE__*/function (_CachingClien
|
|
|
250
250
|
mode: 'cors',
|
|
251
251
|
headers: headers
|
|
252
252
|
})).then(function (response) {
|
|
253
|
-
if (response.status === 403 && (
|
|
253
|
+
if (response.status === 403 && _featureGates.default.getExperimentValue('platform_editor_reduced_profile_cards', 'isEnabled', false)) {
|
|
254
254
|
throw new AgentForbiddenError();
|
|
255
255
|
}
|
|
256
256
|
return response.json();
|
|
@@ -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', "26.8.
|
|
14
|
+
headers.append('atl-client-version', "26.8.4");
|
|
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', "26.8.
|
|
69
|
+
headers.append('atl-client-version', "26.8.4");
|
|
70
70
|
return headers;
|
|
71
71
|
};
|
|
72
72
|
function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -11,6 +11,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
11
11
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
12
12
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
|
+
var _featureGates = _interopRequireDefault(require("@atlaskit/feature-gate-js-client/feature-gates"));
|
|
14
15
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
16
|
var _AgentProfileInfo = require("@atlaskit/rovo-agent-components/ui/AgentProfileInfo");
|
|
16
17
|
var _navigation = require("@atlaskit/teams-app-config/navigation");
|
|
@@ -141,7 +142,7 @@ var AgentProfileCardResourced = exports.AgentProfileCardResourced = function Age
|
|
|
141
142
|
case 4:
|
|
142
143
|
_context2.prev = 4;
|
|
143
144
|
_t2 = _context2["catch"](1);
|
|
144
|
-
if (_t2 instanceof _RovoAgentCardClient.AgentForbiddenError && (
|
|
145
|
+
if (_t2 instanceof _RovoAgentCardClient.AgentForbiddenError && _featureGates.default.getExperimentValue('platform_editor_reduced_profile_cards', 'isEnabled', false)) {
|
|
145
146
|
setIsPermitted(false);
|
|
146
147
|
} else {
|
|
147
148
|
setError(_t2);
|
|
@@ -176,7 +177,7 @@ var AgentProfileCardResourced = exports.AgentProfileCardResourced = function Age
|
|
|
176
177
|
}
|
|
177
178
|
fetchData();
|
|
178
179
|
}, [fetchData]);
|
|
179
|
-
if (!isPermitted && (
|
|
180
|
+
if (!isPermitted && _featureGates.default.getExperimentValue('platform_editor_reduced_profile_cards', 'isEnabled', false)) {
|
|
180
181
|
var _props$agentName;
|
|
181
182
|
return /*#__PURE__*/_react.default.createElement(_AgentProfileCardWrapper.AgentProfileCardWrapper, null, /*#__PURE__*/_react.default.createElement(_react.Suspense, {
|
|
182
183
|
fallback: null
|
|
@@ -12,7 +12,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
12
12
|
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; }
|
|
13
13
|
var PACKAGE_META_DATA = exports.PACKAGE_META_DATA = {
|
|
14
14
|
packageName: (_process$env$_PACKAGE = "@atlaskit/profilecard") !== null && _process$env$_PACKAGE !== void 0 ? _process$env$_PACKAGE : '',
|
|
15
|
-
packageVersion: (_process$env$_PACKAGE2 = "26.8.
|
|
15
|
+
packageVersion: (_process$env$_PACKAGE2 = "26.8.4") !== null && _process$env$_PACKAGE2 !== void 0 ? _process$env$_PACKAGE2 : ''
|
|
16
16
|
};
|
|
17
17
|
var TEAM_SUBJECT = 'teamProfileCard';
|
|
18
18
|
var USER_SUBJECT = 'profilecard';
|
|
@@ -31,7 +31,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
31
31
|
actionSubjectId: actionSubjectId,
|
|
32
32
|
attributes: _objectSpread(_objectSpread({
|
|
33
33
|
packageName: "@atlaskit/profilecard",
|
|
34
|
-
packageVersion: "26.8.
|
|
34
|
+
packageVersion: "26.8.4"
|
|
35
35
|
}, attributes), {}, {
|
|
36
36
|
firedAt: Math.round((0, _performance.getPageTime)())
|
|
37
37
|
})
|
|
@@ -174,7 +174,7 @@ export default class RovoAgentCardClient extends CachingClient {
|
|
|
174
174
|
mode: 'cors',
|
|
175
175
|
headers
|
|
176
176
|
})).then(response => {
|
|
177
|
-
if (response.status === 403 &&
|
|
177
|
+
if (response.status === 403 && FeatureGates.getExperimentValue('platform_editor_reduced_profile_cards', 'isEnabled', false)) {
|
|
178
178
|
throw new AgentForbiddenError();
|
|
179
179
|
}
|
|
180
180
|
return response.json();
|
|
@@ -186,7 +186,7 @@ export default class RovoAgentCardClient extends CachingClient {
|
|
|
186
186
|
mode: 'cors',
|
|
187
187
|
headers
|
|
188
188
|
})).then(response => {
|
|
189
|
-
if (response.status === 403 &&
|
|
189
|
+
if (response.status === 403 && FeatureGates.getExperimentValue('platform_editor_reduced_profile_cards', 'isEnabled', false)) {
|
|
190
190
|
throw new AgentForbiddenError();
|
|
191
191
|
}
|
|
192
192
|
return response.json();
|
|
@@ -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', "26.8.
|
|
9
|
+
headers.append('atl-client-version', "26.8.4");
|
|
10
10
|
return headers;
|
|
11
11
|
};
|
|
12
12
|
export async function getOrgIdForCloudIdFromAGG(url, cloudId) {
|
|
@@ -78,7 +78,7 @@ export const addHeaders = headers => {
|
|
|
78
78
|
headers.append('X-ExperimentalApi', 'teams-beta');
|
|
79
79
|
headers.append('X-ExperimentalApi', 'team-members-beta');
|
|
80
80
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
81
|
-
headers.append('atl-client-version', "26.8.
|
|
81
|
+
headers.append('atl-client-version', "26.8.4");
|
|
82
82
|
return headers;
|
|
83
83
|
};
|
|
84
84
|
export async function getTeamFromAGG(url, teamId, siteId) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { Suspense, useCallback, useEffect, useMemo, useState } from 'react';
|
|
2
|
+
import FeatureGates from '@atlaskit/feature-gate-js-client/feature-gates';
|
|
2
3
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
4
|
import { getAgentCreator } from '@atlaskit/rovo-agent-components/ui/AgentProfileInfo';
|
|
4
5
|
import { navigateToTeamsApp } from '@atlaskit/teams-app-config/navigation';
|
|
@@ -85,7 +86,7 @@ export const AgentProfileCardResourced = props => {
|
|
|
85
86
|
creatorInfo: agentCreatorInfo
|
|
86
87
|
});
|
|
87
88
|
} catch (err) {
|
|
88
|
-
if (err instanceof AgentForbiddenError &&
|
|
89
|
+
if (err instanceof AgentForbiddenError && FeatureGates.getExperimentValue('platform_editor_reduced_profile_cards', 'isEnabled', false)) {
|
|
89
90
|
setIsPermitted(false);
|
|
90
91
|
} else {
|
|
91
92
|
setError(err);
|
|
@@ -114,7 +115,7 @@ export const AgentProfileCardResourced = props => {
|
|
|
114
115
|
}
|
|
115
116
|
fetchData();
|
|
116
117
|
}, [fetchData]);
|
|
117
|
-
if (!isPermitted &&
|
|
118
|
+
if (!isPermitted && FeatureGates.getExperimentValue('platform_editor_reduced_profile_cards', 'isEnabled', false)) {
|
|
118
119
|
var _props$agentName;
|
|
119
120
|
return /*#__PURE__*/React.createElement(AgentProfileCardWrapper, null, /*#__PURE__*/React.createElement(Suspense, {
|
|
120
121
|
fallback: null
|
|
@@ -2,7 +2,7 @@ var _process$env$_PACKAGE, _process$env$_PACKAGE2;
|
|
|
2
2
|
import { getPageTime } from './performance';
|
|
3
3
|
export const PACKAGE_META_DATA = {
|
|
4
4
|
packageName: (_process$env$_PACKAGE = "@atlaskit/profilecard") !== null && _process$env$_PACKAGE !== void 0 ? _process$env$_PACKAGE : '',
|
|
5
|
-
packageVersion: (_process$env$_PACKAGE2 = "26.8.
|
|
5
|
+
packageVersion: (_process$env$_PACKAGE2 = "26.8.4") !== null && _process$env$_PACKAGE2 !== void 0 ? _process$env$_PACKAGE2 : ''
|
|
6
6
|
};
|
|
7
7
|
const TEAM_SUBJECT = 'teamProfileCard';
|
|
8
8
|
const USER_SUBJECT = 'profilecard';
|
|
@@ -19,7 +19,7 @@ const createEvent = (eventType, action, actionSubject, actionSubjectId, attribut
|
|
|
19
19
|
actionSubjectId,
|
|
20
20
|
attributes: {
|
|
21
21
|
packageName: "@atlaskit/profilecard",
|
|
22
|
-
packageVersion: "26.8.
|
|
22
|
+
packageVersion: "26.8.4",
|
|
23
23
|
...attributes,
|
|
24
24
|
firedAt: Math.round(getPageTime())
|
|
25
25
|
}
|
|
@@ -231,7 +231,7 @@ var RovoAgentCardClient = /*#__PURE__*/function (_CachingClient) {
|
|
|
231
231
|
mode: 'cors',
|
|
232
232
|
headers: headers
|
|
233
233
|
})).then(function (response) {
|
|
234
|
-
if (response.status === 403 &&
|
|
234
|
+
if (response.status === 403 && FeatureGates.getExperimentValue('platform_editor_reduced_profile_cards', 'isEnabled', false)) {
|
|
235
235
|
throw new AgentForbiddenError();
|
|
236
236
|
}
|
|
237
237
|
return response.json();
|
|
@@ -243,7 +243,7 @@ var RovoAgentCardClient = /*#__PURE__*/function (_CachingClient) {
|
|
|
243
243
|
mode: 'cors',
|
|
244
244
|
headers: headers
|
|
245
245
|
})).then(function (response) {
|
|
246
|
-
if (response.status === 403 &&
|
|
246
|
+
if (response.status === 403 && FeatureGates.getExperimentValue('platform_editor_reduced_profile_cards', 'isEnabled', false)) {
|
|
247
247
|
throw new AgentForbiddenError();
|
|
248
248
|
}
|
|
249
249
|
return response.json();
|
|
@@ -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', "26.8.
|
|
7
|
+
headers.append('atl-client-version', "26.8.4");
|
|
8
8
|
return headers;
|
|
9
9
|
};
|
|
10
10
|
export function getOrgIdForCloudIdFromAGG(_x, _x2) {
|
|
@@ -59,7 +59,7 @@ export var addHeaders = function addHeaders(headers) {
|
|
|
59
59
|
headers.append('X-ExperimentalApi', 'teams-beta');
|
|
60
60
|
headers.append('X-ExperimentalApi', 'team-members-beta');
|
|
61
61
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
62
|
-
headers.append('atl-client-version', "26.8.
|
|
62
|
+
headers.append('atl-client-version', "26.8.4");
|
|
63
63
|
return headers;
|
|
64
64
|
};
|
|
65
65
|
export function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -5,6 +5,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
5
5
|
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) { _defineProperty(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; }
|
|
6
6
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
7
7
|
import React, { Suspense, useCallback, useEffect, useMemo, useState } from 'react';
|
|
8
|
+
import FeatureGates from '@atlaskit/feature-gate-js-client/feature-gates';
|
|
8
9
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
10
|
import { getAgentCreator } from '@atlaskit/rovo-agent-components/ui/AgentProfileInfo';
|
|
10
11
|
import { navigateToTeamsApp } from '@atlaskit/teams-app-config/navigation';
|
|
@@ -132,7 +133,7 @@ export var AgentProfileCardResourced = function AgentProfileCardResourced(props)
|
|
|
132
133
|
case 4:
|
|
133
134
|
_context2.prev = 4;
|
|
134
135
|
_t2 = _context2["catch"](1);
|
|
135
|
-
if (_t2 instanceof AgentForbiddenError &&
|
|
136
|
+
if (_t2 instanceof AgentForbiddenError && FeatureGates.getExperimentValue('platform_editor_reduced_profile_cards', 'isEnabled', false)) {
|
|
136
137
|
setIsPermitted(false);
|
|
137
138
|
} else {
|
|
138
139
|
setError(_t2);
|
|
@@ -167,7 +168,7 @@ export var AgentProfileCardResourced = function AgentProfileCardResourced(props)
|
|
|
167
168
|
}
|
|
168
169
|
fetchData();
|
|
169
170
|
}, [fetchData]);
|
|
170
|
-
if (!isPermitted &&
|
|
171
|
+
if (!isPermitted && FeatureGates.getExperimentValue('platform_editor_reduced_profile_cards', 'isEnabled', false)) {
|
|
171
172
|
var _props$agentName;
|
|
172
173
|
return /*#__PURE__*/React.createElement(AgentProfileCardWrapper, null, /*#__PURE__*/React.createElement(Suspense, {
|
|
173
174
|
fallback: null
|
|
@@ -5,7 +5,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
5
5
|
import { getPageTime } from './performance';
|
|
6
6
|
export var PACKAGE_META_DATA = {
|
|
7
7
|
packageName: (_process$env$_PACKAGE = "@atlaskit/profilecard") !== null && _process$env$_PACKAGE !== void 0 ? _process$env$_PACKAGE : '',
|
|
8
|
-
packageVersion: (_process$env$_PACKAGE2 = "26.8.
|
|
8
|
+
packageVersion: (_process$env$_PACKAGE2 = "26.8.4") !== null && _process$env$_PACKAGE2 !== void 0 ? _process$env$_PACKAGE2 : ''
|
|
9
9
|
};
|
|
10
10
|
var TEAM_SUBJECT = 'teamProfileCard';
|
|
11
11
|
var USER_SUBJECT = 'profilecard';
|
|
@@ -24,7 +24,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
24
24
|
actionSubjectId: actionSubjectId,
|
|
25
25
|
attributes: _objectSpread(_objectSpread({
|
|
26
26
|
packageName: "@atlaskit/profilecard",
|
|
27
|
-
packageVersion: "26.8.
|
|
27
|
+
packageVersion: "26.8.4"
|
|
28
28
|
}, attributes), {}, {
|
|
29
29
|
firedAt: Math.round(getPageTime())
|
|
30
30
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/profilecard",
|
|
3
|
-
"version": "26.8.
|
|
3
|
+
"version": "26.8.5",
|
|
4
4
|
"description": "A React component to display a card with user information.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"@atlaskit/teams-avatar": "^3.1.0",
|
|
69
69
|
"@atlaskit/teams-public": "^2.4.0",
|
|
70
70
|
"@atlaskit/theme": "^26.1.0",
|
|
71
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
71
|
+
"@atlaskit/tmp-editor-statsig": "^123.0.0",
|
|
72
72
|
"@atlaskit/tokens": "^15.5.0",
|
|
73
73
|
"@atlaskit/tooltip": "^23.1.0",
|
|
74
74
|
"@atlassian/studio-entry-link": "^1.1.0",
|
|
@@ -180,9 +180,6 @@
|
|
|
180
180
|
},
|
|
181
181
|
"fix_aria_attribute_violation_on_agent_card_trigger": {
|
|
182
182
|
"type": "boolean"
|
|
183
|
-
},
|
|
184
|
-
"platform_editor_reduced_agent_profile_card": {
|
|
185
|
-
"type": "boolean"
|
|
186
183
|
}
|
|
187
184
|
},
|
|
188
185
|
"sideEffects": [
|