@atlaskit/profilecard 19.7.9 → 19.7.11

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,18 @@
1
1
  # @atlaskit/profilecard
2
2
 
3
+ ## 19.7.11
4
+
5
+ ### Patch Changes
6
+
7
+ - [#64821](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/64821) [`64e3db3a22e4`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/64e3db3a22e4) - Remove SST feature flag
8
+ - Updated dependencies
9
+
10
+ ## 19.7.10
11
+
12
+ ### Patch Changes
13
+
14
+ - [#63681](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/63681) [`0a62538b713e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0a62538b713e) - role attribute updated for profile card. Previously we are not providing any role attribute for hover state. Now, we are providing dialog as role since it will open popup and show user's detail in popup. Also atlaskit component that we used for openning popup is providing popup aria attributes so just providing dialog is enough to pass a11y checks.
15
+
3
16
  ## 19.7.9
4
17
 
5
18
  ### Patch Changes
@@ -4,13 +4,12 @@ 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 = exports.GATEWAY_QUERY_V2 = exports.GATEWAY_QUERY = void 0;
7
+ exports.extractIdFromAri = exports.convertTeam = exports.buildGatewayQuery = exports.addHeaders = exports.GATEWAY_QUERY_V2 = 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
13
  var _graphqlUtils = require("./graphqlUtils");
15
14
  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; }
16
15
  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; }
@@ -43,24 +42,22 @@ var TEAM_FRAGMENT = "\n id\n displayName\n description\n sma
43
42
 
44
43
  // We alias the team node to always be team
45
44
  var GATEWAY_QUERY_V2 = exports.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}");
46
- var GATEWAY_QUERY = exports.GATEWAY_QUERY = "query TeamCard($teamId: ID!) {\n Team: team {\n team(id: $teamId) {\n ".concat(TEAM_FRAGMENT, "\n }\n }\n}");
47
45
  var buildGatewayQuery = exports.buildGatewayQuery = function buildGatewayQuery(_ref2) {
48
46
  var teamId = _ref2.teamId,
49
47
  siteId = _ref2.siteId;
50
48
  return {
51
- query: (0, _platformFeatureFlags.getBooleanFF)('platform.teams.site-scoped.m1') ? GATEWAY_QUERY_V2 : GATEWAY_QUERY,
52
- variables: _objectSpread({
53
- teamId: idToAri(teamId)
54
- }, (0, _platformFeatureFlags.getBooleanFF)('platform.teams.site-scoped.m1') ? {
49
+ query: GATEWAY_QUERY_V2,
50
+ variables: {
51
+ teamId: idToAri(teamId),
55
52
  siteId: siteId || 'None'
56
- } : {})
53
+ }
57
54
  };
58
55
  };
59
56
  var addHeaders = exports.addHeaders = function addHeaders(headers) {
60
57
  headers.append('X-ExperimentalApi', 'teams-beta');
61
58
  headers.append('X-ExperimentalApi', 'team-members-beta');
62
59
  headers.append('atl-client-name', "@atlaskit/profilecard");
63
- headers.append('atl-client-version', "19.7.9");
60
+ headers.append('atl-client-version', "19.7.11");
64
61
  return headers;
65
62
  };
66
63
  function getTeamFromAGG(_x, _x2, _x3) {
@@ -286,7 +286,7 @@ var ProfilecardTrigger = /*#__PURE__*/function (_React$PureComponent) {
286
286
  return /*#__PURE__*/_react.default.createElement("span", (0, _extends2.default)({}, innerProps, _this3.containerListeners, {
287
287
  ref: ref,
288
288
  "data-testid": _this3.props.testId,
289
- role: _this3.props.trigger !== 'hover' ? 'button' : '',
289
+ role: _this3.props.trigger === 'click' ? 'button' : 'dialog',
290
290
  tabIndex: 0
291
291
  }), _this3.props.children);
292
292
  },
@@ -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.7.9"
47
+ packageVersion: "19.7.11"
48
48
  }, attributes), {}, {
49
49
  firedAt: Math.round((0, _performance.getPageTime)())
50
50
  })
@@ -1,4 +1,3 @@
1
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
2
1
  import { AGGQuery } from './graphqlUtils';
3
2
  export const extractIdFromAri = ari => {
4
3
  const slashPos = ari.indexOf('/');
@@ -54,30 +53,21 @@ export const GATEWAY_QUERY_V2 = `query TeamCard($teamId: ID!, $siteId: String!)
54
53
  }
55
54
  }
56
55
  }`;
57
- export const GATEWAY_QUERY = `query TeamCard($teamId: ID!) {
58
- Team: team {
59
- team(id: $teamId) {
60
- ${TEAM_FRAGMENT}
61
- }
62
- }
63
- }`;
64
56
  export const buildGatewayQuery = ({
65
57
  teamId,
66
58
  siteId
67
59
  }) => ({
68
- query: getBooleanFF('platform.teams.site-scoped.m1') ? GATEWAY_QUERY_V2 : GATEWAY_QUERY,
60
+ query: GATEWAY_QUERY_V2,
69
61
  variables: {
70
62
  teamId: idToAri(teamId),
71
- ...(getBooleanFF('platform.teams.site-scoped.m1') ? {
72
- siteId: siteId || 'None'
73
- } : {})
63
+ siteId: siteId || 'None'
74
64
  }
75
65
  });
76
66
  export const addHeaders = headers => {
77
67
  headers.append('X-ExperimentalApi', 'teams-beta');
78
68
  headers.append('X-ExperimentalApi', 'team-members-beta');
79
69
  headers.append('atl-client-name', "@atlaskit/profilecard");
80
- headers.append('atl-client-version', "19.7.9");
70
+ headers.append('atl-client-version', "19.7.11");
81
71
  return headers;
82
72
  };
83
73
  export async function getTeamFromAGG(url, teamId, siteId) {
@@ -241,7 +241,7 @@ class ProfilecardTrigger extends React.PureComponent {
241
241
  return /*#__PURE__*/React.createElement("span", _extends({}, innerProps, this.containerListeners, {
242
242
  ref: ref,
243
243
  "data-testid": this.props.testId,
244
- role: this.props.trigger !== 'hover' ? 'button' : '',
244
+ role: this.props.trigger === 'click' ? 'button' : 'dialog',
245
245
  tabIndex: 0
246
246
  }), this.props.children);
247
247
  },
@@ -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.7.9",
34
+ packageVersion: "19.7.11",
35
35
  ...attributes,
36
36
  firedAt: Math.round(getPageTime())
37
37
  }
@@ -3,7 +3,6 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import _regeneratorRuntime from "@babel/runtime/regenerator";
4
4
  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; }
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
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
7
6
  import { AGGQuery } from './graphqlUtils';
8
7
  export var extractIdFromAri = function extractIdFromAri(ari) {
9
8
  var slashPos = ari.indexOf('/');
@@ -34,24 +33,22 @@ var TEAM_FRAGMENT = "\n id\n displayName\n description\n sma
34
33
 
35
34
  // We alias the team node to always be team
36
35
  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}");
38
36
  export var buildGatewayQuery = function buildGatewayQuery(_ref2) {
39
37
  var teamId = _ref2.teamId,
40
38
  siteId = _ref2.siteId;
41
39
  return {
42
- query: getBooleanFF('platform.teams.site-scoped.m1') ? GATEWAY_QUERY_V2 : GATEWAY_QUERY,
43
- variables: _objectSpread({
44
- teamId: idToAri(teamId)
45
- }, getBooleanFF('platform.teams.site-scoped.m1') ? {
40
+ query: GATEWAY_QUERY_V2,
41
+ variables: {
42
+ teamId: idToAri(teamId),
46
43
  siteId: siteId || 'None'
47
- } : {})
44
+ }
48
45
  };
49
46
  };
50
47
  export var addHeaders = function addHeaders(headers) {
51
48
  headers.append('X-ExperimentalApi', 'teams-beta');
52
49
  headers.append('X-ExperimentalApi', 'team-members-beta');
53
50
  headers.append('atl-client-name', "@atlaskit/profilecard");
54
- headers.append('atl-client-version', "19.7.9");
51
+ headers.append('atl-client-version', "19.7.11");
55
52
  return headers;
56
53
  };
57
54
  export function getTeamFromAGG(_x, _x2, _x3) {
@@ -276,7 +276,7 @@ var ProfilecardTrigger = /*#__PURE__*/function (_React$PureComponent) {
276
276
  return /*#__PURE__*/React.createElement("span", _extends({}, innerProps, _this3.containerListeners, {
277
277
  ref: ref,
278
278
  "data-testid": _this3.props.testId,
279
- role: _this3.props.trigger !== 'hover' ? 'button' : '',
279
+ role: _this3.props.trigger === 'click' ? 'button' : 'dialog',
280
280
  tabIndex: 0
281
281
  }), _this3.props.children);
282
282
  },
@@ -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.7.9"
41
+ packageVersion: "19.7.11"
42
42
  }, attributes), {}, {
43
43
  firedAt: Math.round(getPageTime())
44
44
  })
@@ -18,7 +18,6 @@ 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
20
  export declare const GATEWAY_QUERY_V2: string;
21
- export declare const GATEWAY_QUERY: string;
22
21
  type TeamQueryVariables = {
23
22
  teamId: string;
24
23
  siteId?: string;
@@ -26,8 +25,8 @@ type TeamQueryVariables = {
26
25
  export declare const buildGatewayQuery: ({ teamId, siteId }: TeamQueryVariables) => {
27
26
  query: string;
28
27
  variables: {
29
- siteId?: string | undefined;
30
28
  teamId: string;
29
+ siteId: string;
31
30
  };
32
31
  };
33
32
  export declare const addHeaders: (headers: Headers) => Headers;
@@ -18,7 +18,6 @@ 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
20
  export declare const GATEWAY_QUERY_V2: string;
21
- export declare const GATEWAY_QUERY: string;
22
21
  type TeamQueryVariables = {
23
22
  teamId: string;
24
23
  siteId?: string;
@@ -26,8 +25,8 @@ type TeamQueryVariables = {
26
25
  export declare const buildGatewayQuery: ({ teamId, siteId }: TeamQueryVariables) => {
27
26
  query: string;
28
27
  variables: {
29
- siteId?: string | undefined;
30
28
  teamId: string;
29
+ siteId: string;
31
30
  };
32
31
  };
33
32
  export declare const addHeaders: (headers: Headers) => Headers;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/profilecard",
3
- "version": "19.7.9",
3
+ "version": "19.7.11",
4
4
  "description": "A React component to display a card with user information.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -55,7 +55,7 @@
55
55
  "@atlaskit/analytics-next": "^9.1.0",
56
56
  "@atlaskit/avatar": "^21.4.0",
57
57
  "@atlaskit/avatar-group": "^9.5.0",
58
- "@atlaskit/button": "^17.1.0",
58
+ "@atlaskit/button": "^17.2.0",
59
59
  "@atlaskit/dropdown-menu": "^12.1.0",
60
60
  "@atlaskit/empty-state": "^7.6.0",
61
61
  "@atlaskit/focus-ring": "^1.3.4",
@@ -63,11 +63,10 @@
63
63
  "@atlaskit/icon": "^22.0.0",
64
64
  "@atlaskit/lozenge": "^11.5.0",
65
65
  "@atlaskit/menu": "^2.1.0",
66
- "@atlaskit/platform-feature-flags": "^0.2.4",
67
66
  "@atlaskit/popup": "^1.11.0",
68
67
  "@atlaskit/spinner": "^16.0.0",
69
68
  "@atlaskit/theme": "^12.6.0",
70
- "@atlaskit/tokens": "^1.31.0",
69
+ "@atlaskit/tokens": "^1.33.0",
71
70
  "@atlaskit/tooltip": "^18.1.0",
72
71
  "@babel/runtime": "^7.0.0",
73
72
  "@emotion/react": "^11.7.1",
@@ -109,10 +108,5 @@
109
108
  ]
110
109
  }
111
110
  },
112
- "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1",
113
- "platform-feature-flags": {
114
- "platform.teams.site-scoped.m1": {
115
- "type": "boolean"
116
- }
117
- }
111
+ "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
118
112
  }