@atlaskit/link-datasource 1.22.4 → 1.22.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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # @atlaskit/link-datasource
2
2
 
3
+ ## 1.22.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [#72501](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/72501) [`0257e7b1b408`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0257e7b1b408) - Fix attribute for auth analytics events uses meta.extensionKey instead of auth.key
8
+ - Updated dependencies
9
+
3
10
  ## 1.22.4
4
11
 
5
12
  ### Patch Changes
@@ -31,7 +31,8 @@ var ProviderAuthRequired = exports.ProviderAuthRequired = function ProviderAuthR
31
31
  var _ref$auth = _ref.auth,
32
32
  auth = _ref$auth === void 0 ? [] : _ref$auth,
33
33
  onAuthSuccess = _ref.onAuthSuccess,
34
- onAuthError = _ref.onAuthError;
34
+ onAuthError = _ref.onAuthError,
35
+ extensionKey = _ref.extensionKey;
35
36
  var _useIntl = (0, _reactIntlNext.useIntl)(),
36
37
  formatMessage = _useIntl.formatMessage;
37
38
  var _useErrorLogger = (0, _useErrorLogger2.default)(),
@@ -55,7 +56,7 @@ var ProviderAuthRequired = exports.ProviderAuthRequired = function ProviderAuthR
55
56
  return (0, _outboundAuthFlowClient.auth)(authInfo.url);
56
57
  case 4:
57
58
  fireEvent('operational.provider.authSuccess', {
58
- extensionKey: authInfo.key,
59
+ extensionKey: extensionKey,
59
60
  experience: 'datasource'
60
61
  });
61
62
  onAuthSuccess === null || onAuthSuccess === void 0 || onAuthSuccess();
@@ -66,7 +67,7 @@ var ProviderAuthRequired = exports.ProviderAuthRequired = function ProviderAuthR
66
67
  _context.t0 = _context["catch"](1);
67
68
  fireEvent('operational.provider.authFailure', {
68
69
  reason: _context.t0 instanceof _outboundAuthFlowClient.AuthError && _context.t0.type ? _context.t0.type : null,
69
- extensionKey: authInfo.key,
70
+ extensionKey: extensionKey,
70
71
  experience: 'datasource'
71
72
  });
72
73
  captureError('ProviderOnAuthRequest', _context.t0);
@@ -134,6 +134,7 @@ var DatasourceTableViewWithoutAnalytics = function DatasourceTableViewWithoutAna
134
134
  if (status === 'unauthorized') {
135
135
  return authDetails !== null && authDetails !== void 0 && authDetails.length && authDetails.length > 0 ? (0, _react2.jsx)(_providerAuthRequired.ProviderAuthRequired, {
136
136
  auth: authDetails,
137
+ extensionKey: extensionKey,
137
138
  onAuthSuccess: forcedReset,
138
139
  onAuthError: forcedReset
139
140
  }) : (0, _react2.jsx)(_accessRequired.AccessRequired, {
@@ -16,7 +16,8 @@ const learnMoreAboutSmartLinksUrl = 'https://support.atlassian.com/confluence-cl
16
16
  export const ProviderAuthRequired = ({
17
17
  auth = [],
18
18
  onAuthSuccess,
19
- onAuthError
19
+ onAuthError,
20
+ extensionKey
20
21
  }) => {
21
22
  const {
22
23
  formatMessage
@@ -37,14 +38,14 @@ export const ProviderAuthRequired = ({
37
38
  try {
38
39
  await outboundAuth(authInfo.url);
39
40
  fireEvent('operational.provider.authSuccess', {
40
- extensionKey: authInfo.key,
41
+ extensionKey,
41
42
  experience: 'datasource'
42
43
  });
43
44
  onAuthSuccess === null || onAuthSuccess === void 0 ? void 0 : onAuthSuccess();
44
45
  } catch (error) {
45
46
  fireEvent('operational.provider.authFailure', {
46
47
  reason: error instanceof AuthError && error.type ? error.type : null,
47
- extensionKey: authInfo.key,
48
+ extensionKey,
48
49
  experience: 'datasource'
49
50
  });
50
51
  captureError('ProviderOnAuthRequest', error);
@@ -129,6 +129,7 @@ const DatasourceTableViewWithoutAnalytics = ({
129
129
  if (status === 'unauthorized') {
130
130
  return authDetails !== null && authDetails !== void 0 && authDetails.length && authDetails.length > 0 ? jsx(ProviderAuthRequired, {
131
131
  auth: authDetails,
132
+ extensionKey: extensionKey,
132
133
  onAuthSuccess: forcedReset,
133
134
  onAuthError: forcedReset
134
135
  }) : jsx(AccessRequired, {
@@ -20,7 +20,8 @@ export var ProviderAuthRequired = function ProviderAuthRequired(_ref) {
20
20
  var _ref$auth = _ref.auth,
21
21
  auth = _ref$auth === void 0 ? [] : _ref$auth,
22
22
  onAuthSuccess = _ref.onAuthSuccess,
23
- onAuthError = _ref.onAuthError;
23
+ onAuthError = _ref.onAuthError,
24
+ extensionKey = _ref.extensionKey;
24
25
  var _useIntl = useIntl(),
25
26
  formatMessage = _useIntl.formatMessage;
26
27
  var _useErrorLogger = useErrorLogger(),
@@ -44,7 +45,7 @@ export var ProviderAuthRequired = function ProviderAuthRequired(_ref) {
44
45
  return outboundAuth(authInfo.url);
45
46
  case 4:
46
47
  fireEvent('operational.provider.authSuccess', {
47
- extensionKey: authInfo.key,
48
+ extensionKey: extensionKey,
48
49
  experience: 'datasource'
49
50
  });
50
51
  onAuthSuccess === null || onAuthSuccess === void 0 || onAuthSuccess();
@@ -55,7 +56,7 @@ export var ProviderAuthRequired = function ProviderAuthRequired(_ref) {
55
56
  _context.t0 = _context["catch"](1);
56
57
  fireEvent('operational.provider.authFailure', {
57
58
  reason: _context.t0 instanceof AuthError && _context.t0.type ? _context.t0.type : null,
58
- extensionKey: authInfo.key,
59
+ extensionKey: extensionKey,
59
60
  experience: 'datasource'
60
61
  });
61
62
  captureError('ProviderOnAuthRequest', _context.t0);
@@ -126,6 +126,7 @@ var DatasourceTableViewWithoutAnalytics = function DatasourceTableViewWithoutAna
126
126
  if (status === 'unauthorized') {
127
127
  return authDetails !== null && authDetails !== void 0 && authDetails.length && authDetails.length > 0 ? jsx(ProviderAuthRequired, {
128
128
  auth: authDetails,
129
+ extensionKey: extensionKey,
129
130
  onAuthSuccess: forcedReset,
130
131
  onAuthError: forcedReset
131
132
  }) : jsx(AccessRequired, {
@@ -4,6 +4,7 @@ interface ProviderAuthRequiredProps {
4
4
  auth: DatasourceMeta['auth'];
5
5
  onAuthSuccess: () => void;
6
6
  onAuthError: () => void;
7
+ extensionKey: string | null;
7
8
  }
8
- export declare const ProviderAuthRequired: ({ auth, onAuthSuccess, onAuthError, }: ProviderAuthRequiredProps) => jsx.JSX.Element;
9
+ export declare const ProviderAuthRequired: ({ auth, onAuthSuccess, onAuthError, extensionKey, }: ProviderAuthRequiredProps) => jsx.JSX.Element;
9
10
  export {};
@@ -4,6 +4,7 @@ interface ProviderAuthRequiredProps {
4
4
  auth: DatasourceMeta['auth'];
5
5
  onAuthSuccess: () => void;
6
6
  onAuthError: () => void;
7
+ extensionKey: string | null;
7
8
  }
8
- export declare const ProviderAuthRequired: ({ auth, onAuthSuccess, onAuthError, }: ProviderAuthRequiredProps) => jsx.JSX.Element;
9
+ export declare const ProviderAuthRequired: ({ auth, onAuthSuccess, onAuthError, extensionKey, }: ProviderAuthRequiredProps) => jsx.JSX.Element;
9
10
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-datasource",
3
- "version": "1.22.4",
3
+ "version": "1.22.5",
4
4
  "description": "UI Components to support linking platform dataset feature",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -66,7 +66,7 @@
66
66
  "@atlaskit/tag": "^12.0.0",
67
67
  "@atlaskit/textfield": "6.0.0",
68
68
  "@atlaskit/theme": "^12.6.0",
69
- "@atlaskit/tokens": "^1.36.0",
69
+ "@atlaskit/tokens": "^1.37.0",
70
70
  "@atlaskit/tooltip": "^18.1.0",
71
71
  "@atlaskit/ufo": "^0.2.4",
72
72
  "@atlaskit/width-detector": "^4.1.7",