@atlaskit/profilecard 26.8.2 → 26.8.4
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 +17 -0
- package/dist/cjs/client/RovoAgentCardClient.js +5 -4
- package/dist/cjs/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/cjs/client/getTeamFromAGG.js +1 -1
- package/dist/cjs/components/common/ProfileCardTrigger.js +31 -13
- package/dist/cjs/util/analytics.js +2 -2
- package/dist/es2019/client/RovoAgentCardClient.js +5 -4
- package/dist/es2019/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/es2019/client/getTeamFromAGG.js +1 -1
- package/dist/es2019/components/common/ProfileCardTrigger.js +33 -14
- package/dist/es2019/util/analytics.js +2 -2
- package/dist/esm/client/RovoAgentCardClient.js +5 -4
- package/dist/esm/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/esm/client/getTeamFromAGG.js +1 -1
- package/dist/esm/components/common/ProfileCardTrigger.js +31 -13
- package/dist/esm/util/analytics.js +2 -2
- package/package.json +11 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/profilecard
|
|
2
2
|
|
|
3
|
+
## 26.8.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`5a003a25c1a41`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5a003a25c1a41) -
|
|
8
|
+
Converts the `platform_editor_agent_profile_card_favourite_sync` feature gate to an experiment
|
|
9
|
+
`platform_editor_agent_profile_card_fav_sync`
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 26.8.3
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [`47de4247d963e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/47de4247d963e) -
|
|
17
|
+
Remove aria-controls attribute from non interactive profile card trigger
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 26.8.2
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -16,6 +16,7 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
16
16
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
17
17
|
var _wrapNativeSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/wrapNativeSuper"));
|
|
18
18
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
19
|
+
var _featureGates = _interopRequireDefault(require("@atlaskit/feature-gate-js-client/feature-gates"));
|
|
19
20
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
20
21
|
var _analytics = require("../util/analytics");
|
|
21
22
|
var _performance = require("../util/performance");
|
|
@@ -110,7 +111,7 @@ var RovoAgentCardClient = exports.default = /*#__PURE__*/function (_CachingClien
|
|
|
110
111
|
}, {
|
|
111
112
|
key: "getCachedProfile",
|
|
112
113
|
value: function getCachedProfile(idValue) {
|
|
113
|
-
if (!(
|
|
114
|
+
if (!_featureGates.default.getExperimentValue('platform_editor_agent_profile_card_fav_sync', 'isEnabled', false)) {
|
|
114
115
|
return _superPropGet(RovoAgentCardClient, "getCachedProfile", this, 3)([idValue]);
|
|
115
116
|
}
|
|
116
117
|
var key = this.sharedCacheKey(idValue);
|
|
@@ -127,7 +128,7 @@ var RovoAgentCardClient = exports.default = /*#__PURE__*/function (_CachingClien
|
|
|
127
128
|
}, {
|
|
128
129
|
key: "setCachedProfile",
|
|
129
130
|
value: function setCachedProfile(idValue, profile) {
|
|
130
|
-
if (!(
|
|
131
|
+
if (!_featureGates.default.getExperimentValue('platform_editor_agent_profile_card_fav_sync', 'isEnabled', false)) {
|
|
131
132
|
_superPropGet(RovoAgentCardClient, "setCachedProfile", this, 3)([idValue, profile]);
|
|
132
133
|
return;
|
|
133
134
|
}
|
|
@@ -320,7 +321,7 @@ var RovoAgentCardClient = exports.default = /*#__PURE__*/function (_CachingClien
|
|
|
320
321
|
}, _analytics.PACKAGE_META_DATA));
|
|
321
322
|
}
|
|
322
323
|
_this4.makeRequest(id, analytics).then(function (data) {
|
|
323
|
-
if (_this4.cache || (
|
|
324
|
+
if (_this4.cache || _featureGates.default.getExperimentValue('platform_editor_agent_profile_card_fav_sync', 'isEnabled', false)) {
|
|
324
325
|
_this4.setCachedProfile(id.value, data);
|
|
325
326
|
}
|
|
326
327
|
if (analytics) {
|
|
@@ -424,7 +425,7 @@ var RovoAgentCardClient = exports.default = /*#__PURE__*/function (_CachingClien
|
|
|
424
425
|
firedAt: Math.round((0, _performance.getPageTime)())
|
|
425
426
|
}, _analytics.PACKAGE_META_DATA));
|
|
426
427
|
}
|
|
427
|
-
if ((
|
|
428
|
+
if (_featureGates.default.getExperimentValue('platform_editor_agent_profile_card_fav_sync', 'isEnabled', false)) {
|
|
428
429
|
_this6.syncFavouriteToCache(agentId, isFavourite);
|
|
429
430
|
}
|
|
430
431
|
resolve();
|
|
@@ -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.3");
|
|
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.3");
|
|
70
70
|
return headers;
|
|
71
71
|
};
|
|
72
72
|
function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -13,6 +13,7 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
|
|
|
13
13
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
14
14
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
15
15
|
var _react = _interopRequireWildcard(require("react"));
|
|
16
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
17
|
var _popup = _interopRequireDefault(require("@atlaskit/popup"));
|
|
17
18
|
var _constants = require("@atlaskit/theme/constants");
|
|
18
19
|
var _analytics = require("../../util/analytics");
|
|
@@ -22,7 +23,8 @@ var _LoadingState = require("./LoadingState");
|
|
|
22
23
|
var _PopupTrigger = require("./PopupTrigger");
|
|
23
24
|
var _ProfileCardWrapper = require("./ProfileCardWrapper");
|
|
24
25
|
var _excluded = ["trigger", "ariaLabelledBy", "children", "renderProfileCard", "fetchProfile", "disabledAriaAttributes", "profileCardType", "testId", "fireAnalytics"],
|
|
25
|
-
_excluded2 = ["aria-expanded", "aria-haspopup"]
|
|
26
|
+
_excluded2 = ["aria-expanded", "aria-haspopup", "aria-controls"],
|
|
27
|
+
_excluded3 = ["aria-expanded", "aria-haspopup"];
|
|
26
28
|
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); }
|
|
27
29
|
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; }
|
|
28
30
|
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; }
|
|
@@ -109,18 +111,34 @@ function ProfileCardTriggerInner(_ref, ref) {
|
|
|
109
111
|
zIndex: _constants.layers.modal(),
|
|
110
112
|
shouldFitContainer: false,
|
|
111
113
|
trigger: function trigger(triggerProps) {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
114
|
+
if ((0, _platformFeatureFlags.fg)('fix_aria_attribute_violation_on_agent_card_trigger')) {
|
|
115
|
+
var _ = triggerProps['aria-expanded'],
|
|
116
|
+
__ = triggerProps['aria-haspopup'],
|
|
117
|
+
___ = triggerProps['aria-controls'],
|
|
118
|
+
restInnerProps = (0, _objectWithoutProperties2.default)(triggerProps, _excluded2);
|
|
119
|
+
return /*#__PURE__*/_react.default.createElement(_PopupTrigger.PopupTrigger, (0, _extends2.default)({}, disabledAriaAttributes ? restInnerProps : triggerProps, {
|
|
120
|
+
ref: triggerProps.ref,
|
|
121
|
+
hideProfilecard: hideProfilecard,
|
|
122
|
+
showProfilecard: showProfilecard,
|
|
123
|
+
children: children,
|
|
124
|
+
ariaLabelledBy: ariaLabelledBy,
|
|
125
|
+
trigger: _trigger,
|
|
126
|
+
"data-testid": testId
|
|
127
|
+
}));
|
|
128
|
+
} else {
|
|
129
|
+
var _2 = triggerProps['aria-expanded'],
|
|
130
|
+
_3 = triggerProps['aria-haspopup'],
|
|
131
|
+
_restInnerProps = (0, _objectWithoutProperties2.default)(triggerProps, _excluded3);
|
|
132
|
+
return /*#__PURE__*/_react.default.createElement(_PopupTrigger.PopupTrigger, (0, _extends2.default)({}, disabledAriaAttributes ? _restInnerProps : triggerProps, {
|
|
133
|
+
ref: triggerProps.ref,
|
|
134
|
+
hideProfilecard: hideProfilecard,
|
|
135
|
+
showProfilecard: showProfilecard,
|
|
136
|
+
children: children,
|
|
137
|
+
ariaLabelledBy: ariaLabelledBy,
|
|
138
|
+
trigger: _trigger,
|
|
139
|
+
"data-testid": testId
|
|
140
|
+
}));
|
|
141
|
+
}
|
|
124
142
|
},
|
|
125
143
|
content: function content() {
|
|
126
144
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -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.3") !== 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.3"
|
|
35
35
|
}, attributes), {}, {
|
|
36
36
|
firedAt: Math.round((0, _performance.getPageTime)())
|
|
37
37
|
})
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import FeatureGates from '@atlaskit/feature-gate-js-client/feature-gates';
|
|
2
3
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
4
|
import { PACKAGE_META_DATA } from '../util/analytics';
|
|
4
5
|
import { getPageTime } from '../util/performance';
|
|
@@ -117,7 +118,7 @@ export default class RovoAgentCardClient extends CachingClient {
|
|
|
117
118
|
return `${(_this$options$cloudId = this.options.cloudId) !== null && _this$options$cloudId !== void 0 ? _this$options$cloudId : ''}:${idValue}`;
|
|
118
119
|
}
|
|
119
120
|
getCachedProfile(idValue) {
|
|
120
|
-
if (!
|
|
121
|
+
if (!FeatureGates.getExperimentValue('platform_editor_agent_profile_card_fav_sync', 'isEnabled', false)) {
|
|
121
122
|
return super.getCachedProfile(idValue);
|
|
122
123
|
}
|
|
123
124
|
const key = this.sharedCacheKey(idValue);
|
|
@@ -132,7 +133,7 @@ export default class RovoAgentCardClient extends CachingClient {
|
|
|
132
133
|
return cached.profile;
|
|
133
134
|
}
|
|
134
135
|
setCachedProfile(idValue, profile) {
|
|
135
|
-
if (!
|
|
136
|
+
if (!FeatureGates.getExperimentValue('platform_editor_agent_profile_card_fav_sync', 'isEnabled', false)) {
|
|
136
137
|
super.setCachedProfile(idValue, profile);
|
|
137
138
|
return;
|
|
138
139
|
}
|
|
@@ -251,7 +252,7 @@ export default class RovoAgentCardClient extends CachingClient {
|
|
|
251
252
|
});
|
|
252
253
|
}
|
|
253
254
|
this.makeRequest(id, analytics).then(data => {
|
|
254
|
-
if (this.cache ||
|
|
255
|
+
if (this.cache || FeatureGates.getExperimentValue('platform_editor_agent_profile_card_fav_sync', 'isEnabled', false)) {
|
|
255
256
|
this.setCachedProfile(id.value, data);
|
|
256
257
|
}
|
|
257
258
|
if (analytics) {
|
|
@@ -350,7 +351,7 @@ export default class RovoAgentCardClient extends CachingClient {
|
|
|
350
351
|
...PACKAGE_META_DATA
|
|
351
352
|
});
|
|
352
353
|
}
|
|
353
|
-
if (
|
|
354
|
+
if (FeatureGates.getExperimentValue('platform_editor_agent_profile_card_fav_sync', 'isEnabled', false)) {
|
|
354
355
|
this.syncFavouriteToCache(agentId, isFavourite);
|
|
355
356
|
}
|
|
356
357
|
resolve();
|
|
@@ -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.3");
|
|
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.3");
|
|
82
82
|
return headers;
|
|
83
83
|
};
|
|
84
84
|
export async function getTeamFromAGG(url, teamId, siteId) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react';
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
4
|
import Popup from '@atlaskit/popup';
|
|
4
5
|
import { layers } from '@atlaskit/theme/constants';
|
|
5
6
|
import { getActionSubject, PACKAGE_META_DATA } from '../../util/analytics';
|
|
@@ -80,20 +81,38 @@ function ProfileCardTriggerInner({
|
|
|
80
81
|
zIndex: layers.modal(),
|
|
81
82
|
shouldFitContainer: false,
|
|
82
83
|
trigger: triggerProps => {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
84
|
+
if (fg('fix_aria_attribute_violation_on_agent_card_trigger')) {
|
|
85
|
+
const {
|
|
86
|
+
'aria-expanded': _,
|
|
87
|
+
'aria-haspopup': __,
|
|
88
|
+
'aria-controls': ___,
|
|
89
|
+
...restInnerProps
|
|
90
|
+
} = triggerProps;
|
|
91
|
+
return /*#__PURE__*/React.createElement(PopupTrigger, _extends({}, disabledAriaAttributes ? restInnerProps : triggerProps, {
|
|
92
|
+
ref: triggerProps.ref,
|
|
93
|
+
hideProfilecard: hideProfilecard,
|
|
94
|
+
showProfilecard: showProfilecard,
|
|
95
|
+
children: children,
|
|
96
|
+
ariaLabelledBy: ariaLabelledBy,
|
|
97
|
+
trigger: trigger,
|
|
98
|
+
"data-testid": testId
|
|
99
|
+
}));
|
|
100
|
+
} else {
|
|
101
|
+
const {
|
|
102
|
+
'aria-expanded': _,
|
|
103
|
+
'aria-haspopup': __,
|
|
104
|
+
...restInnerProps
|
|
105
|
+
} = triggerProps;
|
|
106
|
+
return /*#__PURE__*/React.createElement(PopupTrigger, _extends({}, disabledAriaAttributes ? restInnerProps : triggerProps, {
|
|
107
|
+
ref: triggerProps.ref,
|
|
108
|
+
hideProfilecard: hideProfilecard,
|
|
109
|
+
showProfilecard: showProfilecard,
|
|
110
|
+
children: children,
|
|
111
|
+
ariaLabelledBy: ariaLabelledBy,
|
|
112
|
+
trigger: trigger,
|
|
113
|
+
"data-testid": testId
|
|
114
|
+
}));
|
|
115
|
+
}
|
|
97
116
|
},
|
|
98
117
|
content: () => /*#__PURE__*/React.createElement("div", {
|
|
99
118
|
onMouseEnter: onMouseEnter,
|
|
@@ -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.3") !== 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.3",
|
|
23
23
|
...attributes,
|
|
24
24
|
firedAt: Math.round(getPageTime())
|
|
25
25
|
}
|
|
@@ -14,6 +14,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
|
14
14
|
function _superPropGet(t, o, e, r) { var p = _get(_getPrototypeOf(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
|
|
15
15
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
16
16
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
17
|
+
import FeatureGates from '@atlaskit/feature-gate-js-client/feature-gates';
|
|
17
18
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
18
19
|
import { PACKAGE_META_DATA } from '../util/analytics';
|
|
19
20
|
import { getPageTime } from '../util/performance';
|
|
@@ -103,7 +104,7 @@ var RovoAgentCardClient = /*#__PURE__*/function (_CachingClient) {
|
|
|
103
104
|
}, {
|
|
104
105
|
key: "getCachedProfile",
|
|
105
106
|
value: function getCachedProfile(idValue) {
|
|
106
|
-
if (!
|
|
107
|
+
if (!FeatureGates.getExperimentValue('platform_editor_agent_profile_card_fav_sync', 'isEnabled', false)) {
|
|
107
108
|
return _superPropGet(RovoAgentCardClient, "getCachedProfile", this, 3)([idValue]);
|
|
108
109
|
}
|
|
109
110
|
var key = this.sharedCacheKey(idValue);
|
|
@@ -120,7 +121,7 @@ var RovoAgentCardClient = /*#__PURE__*/function (_CachingClient) {
|
|
|
120
121
|
}, {
|
|
121
122
|
key: "setCachedProfile",
|
|
122
123
|
value: function setCachedProfile(idValue, profile) {
|
|
123
|
-
if (!
|
|
124
|
+
if (!FeatureGates.getExperimentValue('platform_editor_agent_profile_card_fav_sync', 'isEnabled', false)) {
|
|
124
125
|
_superPropGet(RovoAgentCardClient, "setCachedProfile", this, 3)([idValue, profile]);
|
|
125
126
|
return;
|
|
126
127
|
}
|
|
@@ -313,7 +314,7 @@ var RovoAgentCardClient = /*#__PURE__*/function (_CachingClient) {
|
|
|
313
314
|
}, PACKAGE_META_DATA));
|
|
314
315
|
}
|
|
315
316
|
_this4.makeRequest(id, analytics).then(function (data) {
|
|
316
|
-
if (_this4.cache ||
|
|
317
|
+
if (_this4.cache || FeatureGates.getExperimentValue('platform_editor_agent_profile_card_fav_sync', 'isEnabled', false)) {
|
|
317
318
|
_this4.setCachedProfile(id.value, data);
|
|
318
319
|
}
|
|
319
320
|
if (analytics) {
|
|
@@ -417,7 +418,7 @@ var RovoAgentCardClient = /*#__PURE__*/function (_CachingClient) {
|
|
|
417
418
|
firedAt: Math.round(getPageTime())
|
|
418
419
|
}, PACKAGE_META_DATA));
|
|
419
420
|
}
|
|
420
|
-
if (
|
|
421
|
+
if (FeatureGates.getExperimentValue('platform_editor_agent_profile_card_fav_sync', 'isEnabled', false)) {
|
|
421
422
|
_this6.syncFavouriteToCache(agentId, isFavourite);
|
|
422
423
|
}
|
|
423
424
|
resolve();
|
|
@@ -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.3");
|
|
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.3");
|
|
63
63
|
return headers;
|
|
64
64
|
};
|
|
65
65
|
export function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -4,11 +4,13 @@ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
|
4
4
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
5
5
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
6
6
|
var _excluded = ["trigger", "ariaLabelledBy", "children", "renderProfileCard", "fetchProfile", "disabledAriaAttributes", "profileCardType", "testId", "fireAnalytics"],
|
|
7
|
-
_excluded2 = ["aria-expanded", "aria-haspopup"]
|
|
7
|
+
_excluded2 = ["aria-expanded", "aria-haspopup", "aria-controls"],
|
|
8
|
+
_excluded3 = ["aria-expanded", "aria-haspopup"];
|
|
8
9
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
9
10
|
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; }
|
|
10
11
|
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; }
|
|
11
12
|
import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react';
|
|
13
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
14
|
import Popup from '@atlaskit/popup';
|
|
13
15
|
import { layers } from '@atlaskit/theme/constants';
|
|
14
16
|
import { getActionSubject, PACKAGE_META_DATA } from '../../util/analytics';
|
|
@@ -100,18 +102,34 @@ function ProfileCardTriggerInner(_ref, ref) {
|
|
|
100
102
|
zIndex: layers.modal(),
|
|
101
103
|
shouldFitContainer: false,
|
|
102
104
|
trigger: function trigger(triggerProps) {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
105
|
+
if (fg('fix_aria_attribute_violation_on_agent_card_trigger')) {
|
|
106
|
+
var _ = triggerProps['aria-expanded'],
|
|
107
|
+
__ = triggerProps['aria-haspopup'],
|
|
108
|
+
___ = triggerProps['aria-controls'],
|
|
109
|
+
restInnerProps = _objectWithoutProperties(triggerProps, _excluded2);
|
|
110
|
+
return /*#__PURE__*/React.createElement(PopupTrigger, _extends({}, disabledAriaAttributes ? restInnerProps : triggerProps, {
|
|
111
|
+
ref: triggerProps.ref,
|
|
112
|
+
hideProfilecard: hideProfilecard,
|
|
113
|
+
showProfilecard: showProfilecard,
|
|
114
|
+
children: children,
|
|
115
|
+
ariaLabelledBy: ariaLabelledBy,
|
|
116
|
+
trigger: _trigger,
|
|
117
|
+
"data-testid": testId
|
|
118
|
+
}));
|
|
119
|
+
} else {
|
|
120
|
+
var _2 = triggerProps['aria-expanded'],
|
|
121
|
+
_3 = triggerProps['aria-haspopup'],
|
|
122
|
+
_restInnerProps = _objectWithoutProperties(triggerProps, _excluded3);
|
|
123
|
+
return /*#__PURE__*/React.createElement(PopupTrigger, _extends({}, disabledAriaAttributes ? _restInnerProps : triggerProps, {
|
|
124
|
+
ref: triggerProps.ref,
|
|
125
|
+
hideProfilecard: hideProfilecard,
|
|
126
|
+
showProfilecard: showProfilecard,
|
|
127
|
+
children: children,
|
|
128
|
+
ariaLabelledBy: ariaLabelledBy,
|
|
129
|
+
trigger: _trigger,
|
|
130
|
+
"data-testid": testId
|
|
131
|
+
}));
|
|
132
|
+
}
|
|
115
133
|
},
|
|
116
134
|
content: function content() {
|
|
117
135
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -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.3") !== 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.3"
|
|
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.4",
|
|
4
4
|
"description": "A React component to display a card with user information.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"@atlaskit/dropdown-menu": "^17.1.0",
|
|
48
48
|
"@atlaskit/empty-state": "^11.1.0",
|
|
49
49
|
"@atlaskit/feature-gate-js-client": "^6.0.0",
|
|
50
|
-
"@atlaskit/give-kudos": "^6.
|
|
51
|
-
"@atlaskit/heading": "^6.
|
|
50
|
+
"@atlaskit/give-kudos": "^6.5.0",
|
|
51
|
+
"@atlaskit/heading": "^6.2.0",
|
|
52
52
|
"@atlaskit/icon": "^36.2.0",
|
|
53
53
|
"@atlaskit/link": "4.1.0",
|
|
54
54
|
"@atlaskit/lozenge": "^14.1.0",
|
|
@@ -57,19 +57,19 @@
|
|
|
57
57
|
"@atlaskit/people-teams-ui-public": "^5.1.0",
|
|
58
58
|
"@atlaskit/platform-feature-flags": "^2.0.0",
|
|
59
59
|
"@atlaskit/popup": "^5.1.0",
|
|
60
|
-
"@atlaskit/primitives": "^20.
|
|
60
|
+
"@atlaskit/primitives": "^20.5.0",
|
|
61
61
|
"@atlaskit/react-compiler-gating": "^0.2.0",
|
|
62
|
-
"@atlaskit/rovo-agent-components": "^7.
|
|
62
|
+
"@atlaskit/rovo-agent-components": "^7.4.0",
|
|
63
63
|
"@atlaskit/rovo-triggers": "^9.7.0",
|
|
64
64
|
"@atlaskit/spinner": "^20.1.0",
|
|
65
65
|
"@atlaskit/teams-app-config": "^2.1.0",
|
|
66
66
|
"@atlaskit/teams-app-internal-analytics": "^2.2.0",
|
|
67
67
|
"@atlaskit/teams-app-internal-navigation": "^2.1.0",
|
|
68
68
|
"@atlaskit/teams-avatar": "^3.1.0",
|
|
69
|
-
"@atlaskit/teams-public": "^2.
|
|
69
|
+
"@atlaskit/teams-public": "^2.4.0",
|
|
70
70
|
"@atlaskit/theme": "^26.1.0",
|
|
71
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
72
|
-
"@atlaskit/tokens": "^15.
|
|
71
|
+
"@atlaskit/tmp-editor-statsig": "^122.0.0",
|
|
72
|
+
"@atlaskit/tokens": "^15.5.0",
|
|
73
73
|
"@atlaskit/tooltip": "^23.1.0",
|
|
74
74
|
"@atlassian/studio-entry-link": "^1.1.0",
|
|
75
75
|
"@babel/runtime": "^7.0.0",
|
|
@@ -92,8 +92,8 @@
|
|
|
92
92
|
"@atlassian/feature-flags-storybook-utils": "^0.5.0",
|
|
93
93
|
"@atlassian/feature-flags-test-utils": "^1.1.0",
|
|
94
94
|
"@atlassian/platform-storybook-helpers": "^0.4.0",
|
|
95
|
-
"@atlassian/ptc-test-utils": "^0.
|
|
96
|
-
"@atlassian/testing-library": "^0.
|
|
95
|
+
"@atlassian/ptc-test-utils": "^0.14.0",
|
|
96
|
+
"@atlassian/testing-library": "^0.10.0",
|
|
97
97
|
"@storybook/addon-actions": "^8.6.14",
|
|
98
98
|
"@storybook/test": "^8.6.14",
|
|
99
99
|
"@testing-library/react": "^16.3.0",
|
|
@@ -178,7 +178,7 @@
|
|
|
178
178
|
"create_modernization_ga_fixes_drop_2": {
|
|
179
179
|
"type": "boolean"
|
|
180
180
|
},
|
|
181
|
-
"
|
|
181
|
+
"fix_aria_attribute_violation_on_agent_card_trigger": {
|
|
182
182
|
"type": "boolean"
|
|
183
183
|
},
|
|
184
184
|
"platform_editor_reduced_agent_profile_card": {
|