@atlaskit/profilecard 26.10.1 → 26.10.2

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,12 @@
1
1
  # @atlaskit/profilecard
2
2
 
3
+ ## 26.10.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`7f01be1f0dece`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7f01be1f0dece) -
8
+ Inline Studio entry link URL construction behind manual-studio-entry-link
9
+
3
10
  ## 26.10.1
4
11
 
5
12
  ### Patch Changes
@@ -117,9 +117,6 @@
117
117
  },
118
118
  {
119
119
  "path": "../../../design-system/tooltip/afm-cc/tsconfig.json"
120
- },
121
- {
122
- "path": "../../../studio-foundations/studio-entry-link/afm-cc/tsconfig.json"
123
120
  }
124
121
  ]
125
122
  }
@@ -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.10.0");
14
+ headers.append('atl-client-version', "26.10.1");
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.10.0");
69
+ headers.append('atl-client-version', "26.10.1");
70
70
  return headers;
71
71
  };
72
72
  function getTeamFromAGG(_x, _x2, _x3) {
@@ -4,22 +4,24 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.getStudioPath = exports.getStudioHost = exports.getAtlassianStudioAgentEditUrl = exports.getAtlassianStudioAgentDuplicateUrl = void 0;
7
- var _studioEntryLink = require("@atlassian/studio-entry-link");
7
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
8
8
  var STUDIO_PROD_URL = 'https://studio.atlassian.com';
9
9
  var STUDIO_STAGING_URL = 'https://atlassian-studio.stg-east.frontend.public.atl-paas.net';
10
10
  var isStaging = function isStaging() {
11
11
  var host = window.location.host;
12
12
  return host.includes('localhost') || host.includes('.stg.atlassian') || host.includes('.stg-east.frontend.public.atl-paas.net') || host.includes('jira-dev.com');
13
13
  };
14
- var getStudioEnv = function getStudioEnv() {
15
- return isStaging() ? 'staging' : 'production';
16
- };
17
14
  var getStudioHost = exports.getStudioHost = function getStudioHost() {
18
15
  return isStaging() ? STUDIO_STAGING_URL : STUDIO_PROD_URL;
19
16
  };
17
+ var getStudioSessionSyncUrl = function getStudioSessionSyncUrl(path, email) {
18
+ var url = new URL("".concat(getStudioHost()).concat(path));
19
+ url.searchParams.set('login_hint', email);
20
+ return url.toString();
21
+ };
20
22
  var getStudioPath = exports.getStudioPath = function getStudioPath(path, email) {
21
- if (email) {
22
- return (0, _studioEntryLink.getStudioSessionSyncUrl)(getStudioEnv(), path, email);
23
+ if (email && (0, _platformFeatureFlags.fg)('manual-studio-entry-link')) {
24
+ return getStudioSessionSyncUrl(path, email);
23
25
  }
24
26
  return "".concat(getStudioHost()).concat(path);
25
27
  };
@@ -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.10.0") !== null && _process$env$_PACKAGE2 !== void 0 ? _process$env$_PACKAGE2 : ''
15
+ packageVersion: (_process$env$_PACKAGE2 = "26.10.1") !== 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.10.0"
34
+ packageVersion: "26.10.1"
35
35
  }, attributes), {}, {
36
36
  firedAt: Math.round((0, _performance.getPageTime)())
37
37
  })
@@ -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.10.0");
9
+ headers.append('atl-client-version', "26.10.1");
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.10.0");
81
+ headers.append('atl-client-version', "26.10.1");
82
82
  return headers;
83
83
  };
84
84
  export async function getTeamFromAGG(url, teamId, siteId) {
@@ -1,17 +1,21 @@
1
- import { getStudioSessionSyncUrl } from '@atlassian/studio-entry-link';
1
+ import { fg } from '@atlaskit/platform-feature-flags';
2
2
  const STUDIO_PROD_URL = 'https://studio.atlassian.com';
3
3
  const STUDIO_STAGING_URL = 'https://atlassian-studio.stg-east.frontend.public.atl-paas.net';
4
4
  const isStaging = () => {
5
5
  const host = window.location.host;
6
6
  return host.includes('localhost') || host.includes('.stg.atlassian') || host.includes('.stg-east.frontend.public.atl-paas.net') || host.includes('jira-dev.com');
7
7
  };
8
- const getStudioEnv = () => isStaging() ? 'staging' : 'production';
9
8
  export const getStudioHost = () => {
10
9
  return isStaging() ? STUDIO_STAGING_URL : STUDIO_PROD_URL;
11
10
  };
11
+ const getStudioSessionSyncUrl = (path, email) => {
12
+ const url = new URL(`${getStudioHost()}${path}`);
13
+ url.searchParams.set('login_hint', email);
14
+ return url.toString();
15
+ };
12
16
  export const getStudioPath = (path, email) => {
13
- if (email) {
14
- return getStudioSessionSyncUrl(getStudioEnv(), path, email);
17
+ if (email && fg('manual-studio-entry-link')) {
18
+ return getStudioSessionSyncUrl(path, email);
15
19
  }
16
20
  return `${getStudioHost()}${path}`;
17
21
  };
@@ -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.10.0") !== null && _process$env$_PACKAGE2 !== void 0 ? _process$env$_PACKAGE2 : ''
5
+ packageVersion: (_process$env$_PACKAGE2 = "26.10.1") !== 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.10.0",
22
+ packageVersion: "26.10.1",
23
23
  ...attributes,
24
24
  firedAt: Math.round(getPageTime())
25
25
  }
@@ -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.10.0");
7
+ headers.append('atl-client-version', "26.10.1");
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.10.0");
62
+ headers.append('atl-client-version', "26.10.1");
63
63
  return headers;
64
64
  };
65
65
  export function getTeamFromAGG(_x, _x2, _x3) {
@@ -1,19 +1,21 @@
1
- import { getStudioSessionSyncUrl } from '@atlassian/studio-entry-link';
1
+ import { fg } from '@atlaskit/platform-feature-flags';
2
2
  var STUDIO_PROD_URL = 'https://studio.atlassian.com';
3
3
  var STUDIO_STAGING_URL = 'https://atlassian-studio.stg-east.frontend.public.atl-paas.net';
4
4
  var isStaging = function isStaging() {
5
5
  var host = window.location.host;
6
6
  return host.includes('localhost') || host.includes('.stg.atlassian') || host.includes('.stg-east.frontend.public.atl-paas.net') || host.includes('jira-dev.com');
7
7
  };
8
- var getStudioEnv = function getStudioEnv() {
9
- return isStaging() ? 'staging' : 'production';
10
- };
11
8
  export var getStudioHost = function getStudioHost() {
12
9
  return isStaging() ? STUDIO_STAGING_URL : STUDIO_PROD_URL;
13
10
  };
11
+ var getStudioSessionSyncUrl = function getStudioSessionSyncUrl(path, email) {
12
+ var url = new URL("".concat(getStudioHost()).concat(path));
13
+ url.searchParams.set('login_hint', email);
14
+ return url.toString();
15
+ };
14
16
  export var getStudioPath = function getStudioPath(path, email) {
15
- if (email) {
16
- return getStudioSessionSyncUrl(getStudioEnv(), path, email);
17
+ if (email && fg('manual-studio-entry-link')) {
18
+ return getStudioSessionSyncUrl(path, email);
17
19
  }
18
20
  return "".concat(getStudioHost()).concat(path);
19
21
  };
@@ -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.10.0") !== null && _process$env$_PACKAGE2 !== void 0 ? _process$env$_PACKAGE2 : ''
8
+ packageVersion: (_process$env$_PACKAGE2 = "26.10.1") !== 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.10.0"
27
+ packageVersion: "26.10.1"
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.10.1",
3
+ "version": "26.10.2",
4
4
  "description": "A React component to display a card with user information.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -71,7 +71,6 @@
71
71
  "@atlaskit/tmp-editor-statsig": "^126.3.0",
72
72
  "@atlaskit/tokens": "^16.0.0",
73
73
  "@atlaskit/tooltip": "^23.1.0",
74
- "@atlassian/studio-entry-link": "^1.1.0",
75
74
  "@babel/runtime": "^7.0.0",
76
75
  "@compiled/react": "^0.20.0",
77
76
  "date-fns": "^2.17.0",
@@ -124,6 +123,9 @@
124
123
  }
125
124
  },
126
125
  "platform-feature-flags": {
126
+ "manual-studio-entry-link": {
127
+ "type": "boolean"
128
+ },
127
129
  "enable_ptc_townsquare_reporting_lines_unsharded": {
128
130
  "type": "boolean"
129
131
  },