@atlaskit/profilecard 19.4.1 → 19.5.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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/profilecard
2
2
 
3
+ ## 19.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`5a5c412a944`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5a5c412a944) - Site scoped changes for TeamProfileCard - behind FF platform.teams.site-scoped.m1
8
+
9
+ ## 19.4.2
10
+
11
+ ### Patch Changes
12
+
13
+ - [`61cb5313358`](https://bitbucket.org/atlassian/atlassian-frontend/commits/61cb5313358) - Removing unused dependencies and dev dependencies
14
+
3
15
  ## 19.4.1
4
16
 
5
17
  ### Patch Changes
@@ -36,7 +36,7 @@ var TeamProfileCardClient = /*#__PURE__*/function (_CachingClient) {
36
36
  if (!this.options.gatewayGraphqlUrl) {
37
37
  throw new Error('Trying to fetch via gateway with no specified config.gatewayGraphqlUrl');
38
38
  }
39
- return (0, _getTeamFromAGG.getTeamFromAGG)(this.options.gatewayGraphqlUrl, teamId);
39
+ return (0, _getTeamFromAGG.getTeamFromAGG)(this.options.gatewayGraphqlUrl, teamId, this.options.cloudId);
40
40
  }
41
41
  }, {
42
42
  key: "getProfile",
@@ -4,12 +4,14 @@ 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.addExperimentalHeaders = void 0;
7
+ exports.extractIdFromAri = exports.convertTeam = exports.buildGatewayQuery = exports.addHeaders = 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
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
14
+ var _version = _interopRequireDefault(require("../version.json"));
13
15
  var _graphqlUtils = require("./graphqlUtils");
14
16
  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; }
15
17
  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; }
@@ -38,35 +40,50 @@ var convertTeam = function convertTeam(result) {
38
40
  })
39
41
  });
40
42
  };
43
+
44
+ // indented so it's
41
45
  exports.convertTeam = convertTeam;
42
- var GATEWAY_QUERY = "query TeamCard($teamId: ID!) {\n Team: team {\n team (id: $teamId) {\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 }\n }\n}";
43
- var buildGatewayQuery = function buildGatewayQuery(teamId) {
46
+ 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";
47
+
48
+ // We alias the team node to always be team
49
+ var GATEWAY_QUERY_V2 = "query TeamCard($teamId: ID!, $siteID: ID!) {\n Team: team {\n team: teamV2(id: $teamId, siteId: $siteId) {\n".concat(TEAM_FRAGMENT, "\n }\n }\n}");
50
+ var GATEWAY_QUERY = "query TeamCard($teamId: ID!) {\n Team: team {\n team(id: $teamId) {\n".concat(TEAM_FRAGMENT, "\n }\n }\n}");
51
+ var buildGatewayQuery = function buildGatewayQuery(_ref2) {
52
+ var teamId = _ref2.teamId,
53
+ siteId = _ref2.siteId;
44
54
  return {
45
- query: GATEWAY_QUERY,
46
- variables: {
55
+ query: (0, _platformFeatureFlags.getBooleanFF)('platform.teams.site-scoped.m1') && siteId ? GATEWAY_QUERY_V2 : GATEWAY_QUERY,
56
+ variables: _objectSpread({
47
57
  teamId: idToAri(teamId)
48
- }
58
+ }, (0, _platformFeatureFlags.getBooleanFF)('platform.teams.site-scoped.m1') && siteId ? {
59
+ siteId: siteId
60
+ } : {})
49
61
  };
50
62
  };
51
63
  exports.buildGatewayQuery = buildGatewayQuery;
52
- var addExperimentalHeaders = function addExperimentalHeaders(headers) {
64
+ var addHeaders = function addHeaders(headers) {
53
65
  headers.append('X-ExperimentalApi', 'teams-beta');
54
66
  headers.append('X-ExperimentalApi', 'team-members-beta');
67
+ headers.append('atl-client-name', _version.default.name);
68
+ headers.append('atl-client-version', _version.default.version);
55
69
  return headers;
56
70
  };
57
- exports.addExperimentalHeaders = addExperimentalHeaders;
58
- function getTeamFromAGG(_x, _x2) {
71
+ exports.addHeaders = addHeaders;
72
+ function getTeamFromAGG(_x, _x2, _x3) {
59
73
  return _getTeamFromAGG.apply(this, arguments);
60
74
  }
61
75
  function _getTeamFromAGG() {
62
- _getTeamFromAGG = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(url, teamId) {
76
+ _getTeamFromAGG = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(url, teamId, siteId) {
63
77
  var query, _yield$graphqlQuery, Team;
64
78
  return _regenerator.default.wrap(function _callee$(_context) {
65
79
  while (1) switch (_context.prev = _context.next) {
66
80
  case 0:
67
- query = buildGatewayQuery(teamId);
81
+ query = buildGatewayQuery({
82
+ teamId: teamId,
83
+ siteId: siteId
84
+ });
68
85
  _context.next = 3;
69
- return (0, _graphqlUtils.graphqlQuery)(url, query, addExperimentalHeaders);
86
+ return (0, _graphqlUtils.graphqlQuery)(url, query, addHeaders);
70
87
  case 3:
71
88
  _yield$graphqlQuery = _context.sent;
72
89
  Team = _yield$graphqlQuery.Team;
@@ -37,6 +37,8 @@ var _default = {
37
37
  'pt.team-profile-card.error.refresh-button': '⁣⁢Try again⁡⁠‍‌⁠⁠⁡⁠؜⁠⁡‍⁣⁤',
38
38
  'pt.team-profile-card.error.suggestion': '⁣⁢Wait a few moments, then try again.‌⁡‌‌‍⁠⁠⁡‍؜‌⁡⁠⁠⁡⁠‍‍⁣⁤',
39
39
  'pt.team-profile-card.error.title': '⁣⁢We’re having trouble retrieving this teams information؜‍‌⁠⁡⁡⁡⁡⁣⁤',
40
+ 'pt.team-profile-card.forbidden-error-state.description': '⁣⁢You don’t have access to view this team.؜؜‍⁡‌⁠‌؜؜⁠‍‍⁠⁠‌⁣⁤',
41
+ 'pt.team-profile-card.forbidden-error-state.title': '⁣⁢We can’t show you this team⁡‌‌‍؜⁠⁠‌⁠‌؜⁠⁣⁤',
40
42
  'pt.team-profile-card.manager.heading': '⁣⁢Manager⁡؜⁡⁡⁡⁡؜‍‍‍⁡‍؜⁠⁣⁤',
41
43
  'pt.team-profile-card.team.action.view-profile': '⁣⁢View profile‌⁠‌‌⁡‌⁠⁠؜‍⁡⁣⁤',
42
44
  'pt.team-profile-card.team.member.count': '{count, plural, one {⁣⁢Team • {count} member⁠⁠‍⁠؜‌‌‌⁡⁠‌‍؜؜‍؜⁣⁤} other {⁣⁢Team • {count} members⁠⁠‍⁠؜‌‌‌⁡⁠‌‍؜؜‍؜⁣⁤}}',
@@ -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.4.1"
47
+ packageVersion: "19.5.0"
48
48
  }, attributes), {}, {
49
49
  firedAt: Math.round((0, _performance.getPageTime)())
50
50
  })
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/profilecard",
3
- "version": "19.4.1"
3
+ "version": "19.5.0"
4
4
  }
@@ -12,7 +12,7 @@ export default class TeamProfileCardClient extends CachingClient {
12
12
  if (!this.options.gatewayGraphqlUrl) {
13
13
  throw new Error('Trying to fetch via gateway with no specified config.gatewayGraphqlUrl');
14
14
  }
15
- return getTeamFromAGG(this.options.gatewayGraphqlUrl, teamId);
15
+ return getTeamFromAGG(this.options.gatewayGraphqlUrl, teamId, this.options.cloudId);
16
16
  }
17
17
  getProfile(teamId, orgId, analytics) {
18
18
  if (!teamId) {
@@ -1,3 +1,5 @@
1
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
2
+ import packageInfo from '../version.json';
1
3
  import { graphqlQuery } from './graphqlUtils';
2
4
  export const extractIdFromAri = ari => {
3
5
  const slashPos = ari.indexOf('/');
@@ -24,9 +26,9 @@ export const convertTeam = result => {
24
26
  }))
25
27
  };
26
28
  };
27
- const GATEWAY_QUERY = `query TeamCard($teamId: ID!) {
28
- Team: team {
29
- team (id: $teamId) {
29
+
30
+ // indented so it's
31
+ const TEAM_FRAGMENT = `
30
32
  id
31
33
  displayName
32
34
  description
@@ -42,25 +44,49 @@ const GATEWAY_QUERY = `query TeamCard($teamId: ID!) {
42
44
  picture
43
45
  }
44
46
  }
45
- }
47
+ `;
48
+
49
+ // We alias the team node to always be team
50
+ const GATEWAY_QUERY_V2 = `query TeamCard($teamId: ID!, $siteID: ID!) {
51
+ Team: team {
52
+ team: teamV2(id: $teamId, siteId: $siteId) {
53
+ ${TEAM_FRAGMENT}
54
+ }
55
+ }
56
+ }`;
57
+ const GATEWAY_QUERY = `query TeamCard($teamId: ID!) {
58
+ Team: team {
59
+ team(id: $teamId) {
60
+ ${TEAM_FRAGMENT}
46
61
  }
47
62
  }
48
63
  }`;
49
- export const buildGatewayQuery = teamId => ({
50
- query: GATEWAY_QUERY,
64
+ export const buildGatewayQuery = ({
65
+ teamId,
66
+ siteId
67
+ }) => ({
68
+ query: getBooleanFF('platform.teams.site-scoped.m1') && siteId ? GATEWAY_QUERY_V2 : GATEWAY_QUERY,
51
69
  variables: {
52
- teamId: idToAri(teamId)
70
+ teamId: idToAri(teamId),
71
+ ...(getBooleanFF('platform.teams.site-scoped.m1') && siteId ? {
72
+ siteId
73
+ } : {})
53
74
  }
54
75
  });
55
- export const addExperimentalHeaders = headers => {
76
+ export const addHeaders = headers => {
56
77
  headers.append('X-ExperimentalApi', 'teams-beta');
57
78
  headers.append('X-ExperimentalApi', 'team-members-beta');
79
+ headers.append('atl-client-name', packageInfo.name);
80
+ headers.append('atl-client-version', packageInfo.version);
58
81
  return headers;
59
82
  };
60
- export async function getTeamFromAGG(url, teamId) {
61
- const query = buildGatewayQuery(teamId);
83
+ export async function getTeamFromAGG(url, teamId, siteId) {
84
+ const query = buildGatewayQuery({
85
+ teamId,
86
+ siteId
87
+ });
62
88
  const {
63
89
  Team
64
- } = await graphqlQuery(url, query, addExperimentalHeaders);
90
+ } = await graphqlQuery(url, query, addHeaders);
65
91
  return convertTeam(Team);
66
92
  }
@@ -31,6 +31,8 @@ export default {
31
31
  'pt.team-profile-card.error.refresh-button': '⁣⁢Try again⁡⁠‍‌⁠⁠⁡⁠؜⁠⁡‍⁣⁤',
32
32
  'pt.team-profile-card.error.suggestion': '⁣⁢Wait a few moments, then try again.‌⁡‌‌‍⁠⁠⁡‍؜‌⁡⁠⁠⁡⁠‍‍⁣⁤',
33
33
  'pt.team-profile-card.error.title': '⁣⁢We’re having trouble retrieving this teams information؜‍‌⁠⁡⁡⁡⁡⁣⁤',
34
+ 'pt.team-profile-card.forbidden-error-state.description': '⁣⁢You don’t have access to view this team.؜؜‍⁡‌⁠‌؜؜⁠‍‍⁠⁠‌⁣⁤',
35
+ 'pt.team-profile-card.forbidden-error-state.title': '⁣⁢We can’t show you this team⁡‌‌‍؜⁠⁠‌⁠‌؜⁠⁣⁤',
34
36
  'pt.team-profile-card.manager.heading': '⁣⁢Manager⁡؜⁡⁡⁡⁡؜‍‍‍⁡‍؜⁠⁣⁤',
35
37
  'pt.team-profile-card.team.action.view-profile': '⁣⁢View profile‌⁠‌‌⁡‌⁠⁠؜‍⁡⁣⁤',
36
38
  'pt.team-profile-card.team.member.count': '{count, plural, one {⁣⁢Team • {count} member⁠⁠‍⁠؜‌‌‌⁡⁠‌‍؜؜‍؜⁣⁤} other {⁣⁢Team • {count} members⁠⁠‍⁠؜‌‌‌⁡⁠‌‍؜؜‍؜⁣⁤}}',
@@ -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.4.1",
34
+ packageVersion: "19.5.0",
35
35
  ...attributes,
36
36
  firedAt: Math.round(getPageTime())
37
37
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/profilecard",
3
- "version": "19.4.1"
3
+ "version": "19.5.0"
4
4
  }
@@ -29,7 +29,7 @@ var TeamProfileCardClient = /*#__PURE__*/function (_CachingClient) {
29
29
  if (!this.options.gatewayGraphqlUrl) {
30
30
  throw new Error('Trying to fetch via gateway with no specified config.gatewayGraphqlUrl');
31
31
  }
32
- return getTeamFromAGG(this.options.gatewayGraphqlUrl, teamId);
32
+ return getTeamFromAGG(this.options.gatewayGraphqlUrl, teamId, this.options.cloudId);
33
33
  }
34
34
  }, {
35
35
  key: "getProfile",
@@ -3,6 +3,8 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  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
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
7
+ import packageInfo from '../version.json';
6
8
  import { graphqlQuery } from './graphqlUtils';
7
9
  export var extractIdFromAri = function extractIdFromAri(ari) {
8
10
  var slashPos = ari.indexOf('/');
@@ -27,32 +29,47 @@ export var convertTeam = function convertTeam(result) {
27
29
  })
28
30
  });
29
31
  };
30
- var GATEWAY_QUERY = "query TeamCard($teamId: ID!) {\n Team: team {\n team (id: $teamId) {\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 }\n }\n}";
31
- export var buildGatewayQuery = function buildGatewayQuery(teamId) {
32
+
33
+ // indented so it's
34
+ 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";
35
+
36
+ // We alias the team node to always be team
37
+ var GATEWAY_QUERY_V2 = "query TeamCard($teamId: ID!, $siteID: ID!) {\n Team: team {\n team: teamV2(id: $teamId, siteId: $siteId) {\n".concat(TEAM_FRAGMENT, "\n }\n }\n}");
38
+ var GATEWAY_QUERY = "query TeamCard($teamId: ID!) {\n Team: team {\n team(id: $teamId) {\n".concat(TEAM_FRAGMENT, "\n }\n }\n}");
39
+ export var buildGatewayQuery = function buildGatewayQuery(_ref2) {
40
+ var teamId = _ref2.teamId,
41
+ siteId = _ref2.siteId;
32
42
  return {
33
- query: GATEWAY_QUERY,
34
- variables: {
43
+ query: getBooleanFF('platform.teams.site-scoped.m1') && siteId ? GATEWAY_QUERY_V2 : GATEWAY_QUERY,
44
+ variables: _objectSpread({
35
45
  teamId: idToAri(teamId)
36
- }
46
+ }, getBooleanFF('platform.teams.site-scoped.m1') && siteId ? {
47
+ siteId: siteId
48
+ } : {})
37
49
  };
38
50
  };
39
- export var addExperimentalHeaders = function addExperimentalHeaders(headers) {
51
+ export var addHeaders = function addHeaders(headers) {
40
52
  headers.append('X-ExperimentalApi', 'teams-beta');
41
53
  headers.append('X-ExperimentalApi', 'team-members-beta');
54
+ headers.append('atl-client-name', packageInfo.name);
55
+ headers.append('atl-client-version', packageInfo.version);
42
56
  return headers;
43
57
  };
44
- export function getTeamFromAGG(_x, _x2) {
58
+ export function getTeamFromAGG(_x, _x2, _x3) {
45
59
  return _getTeamFromAGG.apply(this, arguments);
46
60
  }
47
61
  function _getTeamFromAGG() {
48
- _getTeamFromAGG = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(url, teamId) {
62
+ _getTeamFromAGG = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(url, teamId, siteId) {
49
63
  var query, _yield$graphqlQuery, Team;
50
64
  return _regeneratorRuntime.wrap(function _callee$(_context) {
51
65
  while (1) switch (_context.prev = _context.next) {
52
66
  case 0:
53
- query = buildGatewayQuery(teamId);
67
+ query = buildGatewayQuery({
68
+ teamId: teamId,
69
+ siteId: siteId
70
+ });
54
71
  _context.next = 3;
55
- return graphqlQuery(url, query, addExperimentalHeaders);
72
+ return graphqlQuery(url, query, addHeaders);
56
73
  case 3:
57
74
  _yield$graphqlQuery = _context.sent;
58
75
  Team = _yield$graphqlQuery.Team;
@@ -31,6 +31,8 @@ export default {
31
31
  'pt.team-profile-card.error.refresh-button': '⁣⁢Try again⁡⁠‍‌⁠⁠⁡⁠؜⁠⁡‍⁣⁤',
32
32
  'pt.team-profile-card.error.suggestion': '⁣⁢Wait a few moments, then try again.‌⁡‌‌‍⁠⁠⁡‍؜‌⁡⁠⁠⁡⁠‍‍⁣⁤',
33
33
  'pt.team-profile-card.error.title': '⁣⁢We’re having trouble retrieving this teams information؜‍‌⁠⁡⁡⁡⁡⁣⁤',
34
+ 'pt.team-profile-card.forbidden-error-state.description': '⁣⁢You don’t have access to view this team.؜؜‍⁡‌⁠‌؜؜⁠‍‍⁠⁠‌⁣⁤',
35
+ 'pt.team-profile-card.forbidden-error-state.title': '⁣⁢We can’t show you this team⁡‌‌‍؜⁠⁠‌⁠‌؜⁠⁣⁤',
34
36
  'pt.team-profile-card.manager.heading': '⁣⁢Manager⁡؜⁡⁡⁡⁡؜‍‍‍⁡‍؜⁠⁣⁤',
35
37
  'pt.team-profile-card.team.action.view-profile': '⁣⁢View profile‌⁠‌‌⁡‌⁠⁠؜‍⁡⁣⁤',
36
38
  'pt.team-profile-card.team.member.count': '{count, plural, one {⁣⁢Team • {count} member⁠⁠‍⁠؜‌‌‌⁡⁠‌‍؜؜‍؜⁣⁤} other {⁣⁢Team • {count} members⁠⁠‍⁠؜‌‌‌⁡⁠‌‍؜؜‍؜⁣⁤}}',
@@ -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.4.1"
41
+ packageVersion: "19.5.0"
42
42
  }, attributes), {}, {
43
43
  firedAt: Math.round(getPageTime())
44
44
  })
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/profilecard",
3
- "version": "19.4.1"
3
+ "version": "19.5.0"
4
4
  }
@@ -17,12 +17,17 @@ 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 buildGatewayQuery: (teamId: string) => {
20
+ type TeamQueryVariables = {
21
+ teamId: string;
22
+ siteId?: string;
23
+ };
24
+ export declare const buildGatewayQuery: ({ teamId, siteId }: TeamQueryVariables) => {
21
25
  query: string;
22
26
  variables: {
27
+ siteId?: string | undefined;
23
28
  teamId: string;
24
29
  };
25
30
  };
26
- export declare const addExperimentalHeaders: (headers: Headers) => Headers;
27
- export declare function getTeamFromAGG(url: string, teamId: string): Promise<Team>;
31
+ export declare const addHeaders: (headers: Headers) => Headers;
32
+ export declare function getTeamFromAGG(url: string, teamId: string, siteId?: string): Promise<Team>;
28
33
  export {};
@@ -29,6 +29,8 @@ declare const _default: {
29
29
  'pt.team-profile-card.error.refresh-button': string;
30
30
  'pt.team-profile-card.error.suggestion': string;
31
31
  'pt.team-profile-card.error.title': string;
32
+ 'pt.team-profile-card.forbidden-error-state.description': string;
33
+ 'pt.team-profile-card.forbidden-error-state.title': string;
32
34
  'pt.team-profile-card.manager.heading': string;
33
35
  'pt.team-profile-card.team.action.view-profile': string;
34
36
  'pt.team-profile-card.team.member.count': string;
@@ -17,12 +17,17 @@ 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 buildGatewayQuery: (teamId: string) => {
20
+ type TeamQueryVariables = {
21
+ teamId: string;
22
+ siteId?: string;
23
+ };
24
+ export declare const buildGatewayQuery: ({ teamId, siteId }: TeamQueryVariables) => {
21
25
  query: string;
22
26
  variables: {
27
+ siteId?: string | undefined;
23
28
  teamId: string;
24
29
  };
25
30
  };
26
- export declare const addExperimentalHeaders: (headers: Headers) => Headers;
27
- export declare function getTeamFromAGG(url: string, teamId: string): Promise<Team>;
31
+ export declare const addHeaders: (headers: Headers) => Headers;
32
+ export declare function getTeamFromAGG(url: string, teamId: string, siteId?: string): Promise<Team>;
28
33
  export {};
@@ -29,6 +29,8 @@ declare const _default: {
29
29
  'pt.team-profile-card.error.refresh-button': string;
30
30
  'pt.team-profile-card.error.suggestion': string;
31
31
  'pt.team-profile-card.error.title': string;
32
+ 'pt.team-profile-card.forbidden-error-state.description': string;
33
+ 'pt.team-profile-card.forbidden-error-state.title': string;
32
34
  'pt.team-profile-card.manager.heading': string;
33
35
  'pt.team-profile-card.team.action.view-profile': string;
34
36
  'pt.team-profile-card.team.member.count': string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/profilecard",
3
- "version": "19.4.1",
3
+ "version": "19.5.0",
4
4
  "description": "A React component to display a card with user information.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -52,17 +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.7.0",
55
+ "@atlaskit/button": "^16.8.0",
56
56
  "@atlaskit/dropdown-menu": "^11.9.0",
57
- "@atlaskit/empty-state": "^7.5.0",
57
+ "@atlaskit/empty-state": "^7.6.0",
58
58
  "@atlaskit/give-kudos": "^1.1.0",
59
59
  "@atlaskit/icon": "^21.12.0",
60
60
  "@atlaskit/lozenge": "^11.4.0",
61
61
  "@atlaskit/menu": "^1.7.0",
62
- "@atlaskit/popup": "^1.6.0",
62
+ "@atlaskit/platform-feature-flags": "^0.2.3",
63
+ "@atlaskit/popup": "^1.7.0",
63
64
  "@atlaskit/spinner": "^15.5.0",
64
65
  "@atlaskit/theme": "^12.5.0",
65
- "@atlaskit/tokens": "^1.4.0",
66
+ "@atlaskit/tokens": "^1.9.0",
66
67
  "@babel/runtime": "^7.0.0",
67
68
  "@emotion/react": "^11.7.1",
68
69
  "@emotion/styled": "^11.0.0",
@@ -77,11 +78,9 @@
77
78
  },
78
79
  "devDependencies": {
79
80
  "@atlaskit/docs": "*",
80
- "@atlaskit/dynamic-table": "^14.9.0",
81
81
  "@atlaskit/flag": "^15.2.0",
82
82
  "@atlaskit/inline-edit": "^12.3.0",
83
- "@atlaskit/select": "^16.4.0",
84
- "@atlaskit/util-data-test": "^17.8.0",
83
+ "@atlaskit/select": "^16.5.0",
85
84
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
86
85
  "@testing-library/react": "^12.1.5",
87
86
  "enzyme": "^3.10.0",
@@ -108,5 +107,10 @@
108
107
  ]
109
108
  }
110
109
  },
111
- "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
110
+ "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1",
111
+ "platform-feature-flags": {
112
+ "platform.teams.site-scoped.m1": {
113
+ "type": "boolean"
114
+ }
115
+ }
112
116
  }