@atlaskit/profilecard 19.5.3 → 19.5.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 +12 -0
- package/dist/cjs/client/getTeamFromAGG.js +6 -5
- package/dist/cjs/util/analytics.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/client/getTeamFromAGG.js +5 -6
- package/dist/es2019/util/analytics.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/client/getTeamFromAGG.js +4 -5
- package/dist/esm/util/analytics.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/client/getTeamFromAGG.d.ts +2 -0
- package/dist/types-ts4.5/client/getTeamFromAGG.d.ts +2 -0
- package/package.json +6 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/profilecard
|
|
2
2
|
|
|
3
|
+
## 19.5.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`f01deb5e6ab`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f01deb5e6ab) - Use injected env vars instead of version.json
|
|
8
|
+
|
|
9
|
+
## 19.5.4
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`cc13658d9b4`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cc13658d9b4) - Fix for incorrect GraphQL query variable in team card
|
|
14
|
+
|
|
3
15
|
## 19.5.3
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -4,14 +4,13 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.extractIdFromAri = exports.convertTeam = exports.buildGatewayQuery = exports.addHeaders = void 0;
|
|
7
|
+
exports.extractIdFromAri = exports.convertTeam = exports.buildGatewayQuery = exports.addHeaders = exports.GATEWAY_QUERY_V2 = exports.GATEWAY_QUERY = void 0;
|
|
8
8
|
exports.getTeamFromAGG = getTeamFromAGG;
|
|
9
9
|
exports.idToAri = void 0;
|
|
10
10
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
11
11
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
12
12
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
13
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
|
-
var _version = _interopRequireDefault(require("../version.json"));
|
|
15
14
|
var _graphqlUtils = require("./graphqlUtils");
|
|
16
15
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
17
16
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -46,8 +45,10 @@ exports.convertTeam = convertTeam;
|
|
|
46
45
|
var TEAM_FRAGMENT = "\n id\n displayName\n description\n smallHeaderImageUrl\n largeHeaderImageUrl\n smallAvatarImageUrl\n largeAvatarImageUrl\n members {\n nodes {\n member {\n accountId\n name\n picture\n }\n }\n }\n";
|
|
47
46
|
|
|
48
47
|
// We alias the team node to always be team
|
|
49
|
-
var GATEWAY_QUERY_V2 = "query TeamCard($teamId: ID!, $
|
|
48
|
+
var GATEWAY_QUERY_V2 = "query TeamCard($teamId: ID!, $siteId: String!) {\n Team: team {\n team: teamV2(id: $teamId, siteId: $siteId) @optIn(to: \"Team-v2\") {\n ".concat(TEAM_FRAGMENT, "\n }\n }\n}");
|
|
49
|
+
exports.GATEWAY_QUERY_V2 = GATEWAY_QUERY_V2;
|
|
50
50
|
var GATEWAY_QUERY = "query TeamCard($teamId: ID!) {\n Team: team {\n team(id: $teamId) {\n ".concat(TEAM_FRAGMENT, "\n }\n }\n}");
|
|
51
|
+
exports.GATEWAY_QUERY = GATEWAY_QUERY;
|
|
51
52
|
var buildGatewayQuery = function buildGatewayQuery(_ref2) {
|
|
52
53
|
var teamId = _ref2.teamId,
|
|
53
54
|
siteId = _ref2.siteId;
|
|
@@ -64,8 +65,8 @@ exports.buildGatewayQuery = buildGatewayQuery;
|
|
|
64
65
|
var addHeaders = function addHeaders(headers) {
|
|
65
66
|
headers.append('X-ExperimentalApi', 'teams-beta');
|
|
66
67
|
headers.append('X-ExperimentalApi', 'team-members-beta');
|
|
67
|
-
headers.append('atl-client-name',
|
|
68
|
-
headers.append('atl-client-version',
|
|
68
|
+
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
69
|
+
headers.append('atl-client-version', "19.5.5");
|
|
69
70
|
return headers;
|
|
70
71
|
};
|
|
71
72
|
exports.addHeaders = addHeaders;
|
|
@@ -44,7 +44,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
44
44
|
actionSubjectId: actionSubjectId,
|
|
45
45
|
attributes: _objectSpread(_objectSpread({
|
|
46
46
|
packageName: "@atlaskit/profilecard",
|
|
47
|
-
packageVersion: "19.5.
|
|
47
|
+
packageVersion: "19.5.5"
|
|
48
48
|
}, attributes), {}, {
|
|
49
49
|
firedAt: Math.round((0, _performance.getPageTime)())
|
|
50
50
|
})
|
package/dist/cjs/version.json
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
2
|
-
import packageInfo from '../version.json';
|
|
3
2
|
import { graphqlQuery } from './graphqlUtils';
|
|
4
3
|
export const extractIdFromAri = ari => {
|
|
5
4
|
const slashPos = ari.indexOf('/');
|
|
@@ -48,14 +47,14 @@ const TEAM_FRAGMENT = `
|
|
|
48
47
|
`;
|
|
49
48
|
|
|
50
49
|
// We alias the team node to always be team
|
|
51
|
-
const GATEWAY_QUERY_V2 = `query TeamCard($teamId: ID!, $
|
|
50
|
+
export const GATEWAY_QUERY_V2 = `query TeamCard($teamId: ID!, $siteId: String!) {
|
|
52
51
|
Team: team {
|
|
53
|
-
team: teamV2(id: $teamId, siteId: $siteId) {
|
|
52
|
+
team: teamV2(id: $teamId, siteId: $siteId) @optIn(to: "Team-v2") {
|
|
54
53
|
${TEAM_FRAGMENT}
|
|
55
54
|
}
|
|
56
55
|
}
|
|
57
56
|
}`;
|
|
58
|
-
const GATEWAY_QUERY = `query TeamCard($teamId: ID!) {
|
|
57
|
+
export const GATEWAY_QUERY = `query TeamCard($teamId: ID!) {
|
|
59
58
|
Team: team {
|
|
60
59
|
team(id: $teamId) {
|
|
61
60
|
${TEAM_FRAGMENT}
|
|
@@ -77,8 +76,8 @@ export const buildGatewayQuery = ({
|
|
|
77
76
|
export const addHeaders = headers => {
|
|
78
77
|
headers.append('X-ExperimentalApi', 'teams-beta');
|
|
79
78
|
headers.append('X-ExperimentalApi', 'team-members-beta');
|
|
80
|
-
headers.append('atl-client-name',
|
|
81
|
-
headers.append('atl-client-version',
|
|
79
|
+
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
80
|
+
headers.append('atl-client-version', "19.5.5");
|
|
82
81
|
return headers;
|
|
83
82
|
};
|
|
84
83
|
export async function getTeamFromAGG(url, teamId, siteId) {
|
|
@@ -31,7 +31,7 @@ const createEvent = (eventType, action, actionSubject, actionSubjectId, attribut
|
|
|
31
31
|
actionSubjectId,
|
|
32
32
|
attributes: {
|
|
33
33
|
packageName: "@atlaskit/profilecard",
|
|
34
|
-
packageVersion: "19.5.
|
|
34
|
+
packageVersion: "19.5.5",
|
|
35
35
|
...attributes,
|
|
36
36
|
firedAt: Math.round(getPageTime())
|
|
37
37
|
}
|
package/dist/es2019/version.json
CHANGED
|
@@ -4,7 +4,6 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
|
4
4
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
5
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
6
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
7
|
-
import packageInfo from '../version.json';
|
|
8
7
|
import { graphqlQuery } from './graphqlUtils';
|
|
9
8
|
export var extractIdFromAri = function extractIdFromAri(ari) {
|
|
10
9
|
var slashPos = ari.indexOf('/');
|
|
@@ -34,8 +33,8 @@ export var convertTeam = function convertTeam(result) {
|
|
|
34
33
|
var TEAM_FRAGMENT = "\n id\n displayName\n description\n smallHeaderImageUrl\n largeHeaderImageUrl\n smallAvatarImageUrl\n largeAvatarImageUrl\n members {\n nodes {\n member {\n accountId\n name\n picture\n }\n }\n }\n";
|
|
35
34
|
|
|
36
35
|
// We alias the team node to always be team
|
|
37
|
-
var GATEWAY_QUERY_V2 = "query TeamCard($teamId: ID!, $
|
|
38
|
-
var GATEWAY_QUERY = "query TeamCard($teamId: ID!) {\n Team: team {\n team(id: $teamId) {\n ".concat(TEAM_FRAGMENT, "\n }\n }\n}");
|
|
36
|
+
export var GATEWAY_QUERY_V2 = "query TeamCard($teamId: ID!, $siteId: String!) {\n Team: team {\n team: teamV2(id: $teamId, siteId: $siteId) @optIn(to: \"Team-v2\") {\n ".concat(TEAM_FRAGMENT, "\n }\n }\n}");
|
|
37
|
+
export var GATEWAY_QUERY = "query TeamCard($teamId: ID!) {\n Team: team {\n team(id: $teamId) {\n ".concat(TEAM_FRAGMENT, "\n }\n }\n}");
|
|
39
38
|
export var buildGatewayQuery = function buildGatewayQuery(_ref2) {
|
|
40
39
|
var teamId = _ref2.teamId,
|
|
41
40
|
siteId = _ref2.siteId;
|
|
@@ -51,8 +50,8 @@ export var buildGatewayQuery = function buildGatewayQuery(_ref2) {
|
|
|
51
50
|
export var addHeaders = function addHeaders(headers) {
|
|
52
51
|
headers.append('X-ExperimentalApi', 'teams-beta');
|
|
53
52
|
headers.append('X-ExperimentalApi', 'team-members-beta');
|
|
54
|
-
headers.append('atl-client-name',
|
|
55
|
-
headers.append('atl-client-version',
|
|
53
|
+
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
54
|
+
headers.append('atl-client-version', "19.5.5");
|
|
56
55
|
return headers;
|
|
57
56
|
};
|
|
58
57
|
export function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -38,7 +38,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
38
38
|
actionSubjectId: actionSubjectId,
|
|
39
39
|
attributes: _objectSpread(_objectSpread({
|
|
40
40
|
packageName: "@atlaskit/profilecard",
|
|
41
|
-
packageVersion: "19.5.
|
|
41
|
+
packageVersion: "19.5.5"
|
|
42
42
|
}, attributes), {}, {
|
|
43
43
|
firedAt: Math.round(getPageTime())
|
|
44
44
|
})
|
package/dist/esm/version.json
CHANGED
|
@@ -17,6 +17,8 @@ interface AGGResult {
|
|
|
17
17
|
export declare const extractIdFromAri: (ari: string) => string;
|
|
18
18
|
export declare const idToAri: (teamId: string) => string;
|
|
19
19
|
export declare const convertTeam: (result: AGGResult) => Team;
|
|
20
|
+
export declare const GATEWAY_QUERY_V2: string;
|
|
21
|
+
export declare const GATEWAY_QUERY: string;
|
|
20
22
|
type TeamQueryVariables = {
|
|
21
23
|
teamId: string;
|
|
22
24
|
siteId?: string;
|
|
@@ -17,6 +17,8 @@ interface AGGResult {
|
|
|
17
17
|
export declare const extractIdFromAri: (ari: string) => string;
|
|
18
18
|
export declare const idToAri: (teamId: string) => string;
|
|
19
19
|
export declare const convertTeam: (result: AGGResult) => Team;
|
|
20
|
+
export declare const GATEWAY_QUERY_V2: string;
|
|
21
|
+
export declare const GATEWAY_QUERY: string;
|
|
20
22
|
type TeamQueryVariables = {
|
|
21
23
|
teamId: string;
|
|
22
24
|
siteId?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/profilecard",
|
|
3
|
-
"version": "19.5.
|
|
3
|
+
"version": "19.5.5",
|
|
4
4
|
"description": "A React component to display a card with user information.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -52,18 +52,18 @@
|
|
|
52
52
|
"@atlaskit/analytics-next": "^9.1.0",
|
|
53
53
|
"@atlaskit/avatar": "^21.3.0",
|
|
54
54
|
"@atlaskit/avatar-group": "^9.3.0",
|
|
55
|
-
"@atlaskit/button": "^16.
|
|
56
|
-
"@atlaskit/dropdown-menu": "^11.
|
|
55
|
+
"@atlaskit/button": "^16.9.0",
|
|
56
|
+
"@atlaskit/dropdown-menu": "^11.11.0",
|
|
57
57
|
"@atlaskit/empty-state": "^7.6.0",
|
|
58
58
|
"@atlaskit/give-kudos": "^2.0.0",
|
|
59
59
|
"@atlaskit/icon": "^21.12.0",
|
|
60
60
|
"@atlaskit/lozenge": "^11.4.0",
|
|
61
61
|
"@atlaskit/menu": "^1.9.0",
|
|
62
62
|
"@atlaskit/platform-feature-flags": "^0.2.4",
|
|
63
|
-
"@atlaskit/popup": "^1.
|
|
63
|
+
"@atlaskit/popup": "^1.9.0",
|
|
64
64
|
"@atlaskit/spinner": "^15.5.0",
|
|
65
65
|
"@atlaskit/theme": "^12.5.0",
|
|
66
|
-
"@atlaskit/tokens": "^1.
|
|
66
|
+
"@atlaskit/tokens": "^1.14.0",
|
|
67
67
|
"@babel/runtime": "^7.0.0",
|
|
68
68
|
"@emotion/react": "^11.7.1",
|
|
69
69
|
"@emotion/styled": "^11.0.0",
|
|
@@ -78,6 +78,7 @@
|
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
81
|
+
"@atlassian/ptc-test-utils": "^0.6.3",
|
|
81
82
|
"@testing-library/react": "^12.1.5",
|
|
82
83
|
"enzyme": "^3.10.0",
|
|
83
84
|
"es6-promise": "^4.0.5",
|