@atlaskit/link-datasource 1.22.0 → 1.22.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 +14 -0
- package/dist/cjs/ui/common/error-state/provider-auth-required.js +15 -6
- package/dist/cjs/ui/issue-like-table/render-type/user/index.js +1 -1
- package/dist/es2019/ui/common/error-state/provider-auth-required.js +11 -2
- package/dist/es2019/ui/issue-like-table/render-type/user/index.js +2 -7
- package/dist/esm/ui/common/error-state/provider-auth-required.js +16 -7
- package/dist/esm/ui/issue-like-table/render-type/user/index.js +1 -1
- package/dist/types/analytics/generated/analytics.types.d.ts +16 -1
- package/dist/types-ts4.5/analytics/generated/analytics.types.d.ts +16 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/link-datasource
|
|
2
2
|
|
|
3
|
+
## 1.22.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#70489](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/70489) [`8bf6a93203db`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8bf6a93203db) - Define analytics events to fire when provider Authentication succeeds or fail.
|
|
8
|
+
- [#70400](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/70400) [`933b3c1e55d4`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/933b3c1e55d4) - [ux] css styling for Avatar group styles is increased in specificity for inserting and rendering from Jira Issues modal to ensure that editor css does not apply to the component
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 1.22.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#70152](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/70152) [`53ed3673df28`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/53ed3673df28) - Updating adf-schema version to 35.5.1
|
|
16
|
+
|
|
3
17
|
## 1.22.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
|
@@ -54,19 +54,28 @@ var ProviderAuthRequired = exports.ProviderAuthRequired = function ProviderAuthR
|
|
|
54
54
|
_context.next = 4;
|
|
55
55
|
return (0, _outboundAuthFlowClient.auth)(authInfo.url);
|
|
56
56
|
case 4:
|
|
57
|
+
fireEvent('operational.provider.authSuccess', {
|
|
58
|
+
extensionKey: authInfo.key,
|
|
59
|
+
experience: 'datasource'
|
|
60
|
+
});
|
|
57
61
|
onAuthSuccess === null || onAuthSuccess === void 0 || onAuthSuccess();
|
|
58
|
-
_context.next =
|
|
62
|
+
_context.next = 13;
|
|
59
63
|
break;
|
|
60
|
-
case
|
|
61
|
-
_context.prev =
|
|
64
|
+
case 8:
|
|
65
|
+
_context.prev = 8;
|
|
62
66
|
_context.t0 = _context["catch"](1);
|
|
63
|
-
|
|
67
|
+
fireEvent('operational.provider.authFailure', {
|
|
68
|
+
reason: _context.t0 instanceof _outboundAuthFlowClient.AuthError && _context.t0.type ? _context.t0.type : null,
|
|
69
|
+
extensionKey: authInfo.key,
|
|
70
|
+
experience: 'datasource'
|
|
71
|
+
});
|
|
64
72
|
captureError('ProviderOnAuthRequest', _context.t0);
|
|
65
|
-
|
|
73
|
+
onAuthError === null || onAuthError === void 0 || onAuthError();
|
|
74
|
+
case 13:
|
|
66
75
|
case "end":
|
|
67
76
|
return _context.stop();
|
|
68
77
|
}
|
|
69
|
-
}, _callee, null, [[1,
|
|
78
|
+
}, _callee, null, [[1, 8]]);
|
|
70
79
|
}));
|
|
71
80
|
return function onAuthRequest() {
|
|
72
81
|
return _ref2.apply(this, arguments);
|
|
@@ -33,7 +33,7 @@ var avatarWrapperStyles = (0, _primitives.xcss)({
|
|
|
33
33
|
var widthObserverWrapperStyles = (0, _primitives.xcss)({
|
|
34
34
|
position: 'relative'
|
|
35
35
|
});
|
|
36
|
-
var AvatarGroupWrapperStyles = _styled.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n
|
|
36
|
+
var AvatarGroupWrapperStyles = _styled.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n ul {\n padding-left: 0px !important;\n }\n"])));
|
|
37
37
|
var getMaxUserCount = function getMaxUserCount(userCount, availableWidth) {
|
|
38
38
|
if (availableWidth <= 28) {
|
|
39
39
|
// If width is less than or equal to 28px, we should only display the user count
|
|
@@ -4,7 +4,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
4
4
|
import { useIntl } from 'react-intl-next';
|
|
5
5
|
import Button from '@atlaskit/button';
|
|
6
6
|
import EmptyState from '@atlaskit/empty-state';
|
|
7
|
-
import { auth as outboundAuth } from '@atlaskit/outbound-auth-flow-client';
|
|
7
|
+
import { AuthError, auth as outboundAuth } from '@atlaskit/outbound-auth-flow-client';
|
|
8
8
|
import { useDatasourceAnalyticsEvents } from '../../../analytics';
|
|
9
9
|
import useErrorLogger from '../../../hooks/useErrorLogger';
|
|
10
10
|
import { loadingErrorMessages } from './messages';
|
|
@@ -36,10 +36,19 @@ export const ProviderAuthRequired = ({
|
|
|
36
36
|
const [authInfo] = auth;
|
|
37
37
|
try {
|
|
38
38
|
await outboundAuth(authInfo.url);
|
|
39
|
+
fireEvent('operational.provider.authSuccess', {
|
|
40
|
+
extensionKey: authInfo.key,
|
|
41
|
+
experience: 'datasource'
|
|
42
|
+
});
|
|
39
43
|
onAuthSuccess === null || onAuthSuccess === void 0 ? void 0 : onAuthSuccess();
|
|
40
44
|
} catch (error) {
|
|
41
|
-
|
|
45
|
+
fireEvent('operational.provider.authFailure', {
|
|
46
|
+
reason: error instanceof AuthError && error.type ? error.type : null,
|
|
47
|
+
extensionKey: authInfo.key,
|
|
48
|
+
experience: 'datasource'
|
|
49
|
+
});
|
|
42
50
|
captureError('ProviderOnAuthRequest', error);
|
|
51
|
+
onAuthError === null || onAuthError === void 0 ? void 0 : onAuthError();
|
|
43
52
|
}
|
|
44
53
|
};
|
|
45
54
|
const renderAuthDescription = () => jsx(React.Fragment, null, formatMessage(loadingErrorMessages.authScreenDescriptionText), ' ', jsx("a", {
|
|
@@ -21,13 +21,8 @@ const widthObserverWrapperStyles = xcss({
|
|
|
21
21
|
position: 'relative'
|
|
22
22
|
});
|
|
23
23
|
const AvatarGroupWrapperStyles = styled.div`
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
The & refers to the parent selector (.<generated className>),
|
|
27
|
-
so && becomes .<generated className>.<generated className> which increases its specificity
|
|
28
|
-
*/
|
|
29
|
-
&& ul {
|
|
30
|
-
padding-left: 0px;
|
|
24
|
+
ul {
|
|
25
|
+
padding-left: 0px !important;
|
|
31
26
|
}
|
|
32
27
|
`;
|
|
33
28
|
const getMaxUserCount = (userCount, availableWidth) => {
|
|
@@ -7,7 +7,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
7
7
|
import { useIntl } from 'react-intl-next';
|
|
8
8
|
import Button from '@atlaskit/button';
|
|
9
9
|
import EmptyState from '@atlaskit/empty-state';
|
|
10
|
-
import { auth as outboundAuth } from '@atlaskit/outbound-auth-flow-client';
|
|
10
|
+
import { AuthError, auth as outboundAuth } from '@atlaskit/outbound-auth-flow-client';
|
|
11
11
|
import { useDatasourceAnalyticsEvents } from '../../../analytics';
|
|
12
12
|
import useErrorLogger from '../../../hooks/useErrorLogger';
|
|
13
13
|
import { loadingErrorMessages } from './messages';
|
|
@@ -43,19 +43,28 @@ export var ProviderAuthRequired = function ProviderAuthRequired(_ref) {
|
|
|
43
43
|
_context.next = 4;
|
|
44
44
|
return outboundAuth(authInfo.url);
|
|
45
45
|
case 4:
|
|
46
|
+
fireEvent('operational.provider.authSuccess', {
|
|
47
|
+
extensionKey: authInfo.key,
|
|
48
|
+
experience: 'datasource'
|
|
49
|
+
});
|
|
46
50
|
onAuthSuccess === null || onAuthSuccess === void 0 || onAuthSuccess();
|
|
47
|
-
_context.next =
|
|
51
|
+
_context.next = 13;
|
|
48
52
|
break;
|
|
49
|
-
case
|
|
50
|
-
_context.prev =
|
|
53
|
+
case 8:
|
|
54
|
+
_context.prev = 8;
|
|
51
55
|
_context.t0 = _context["catch"](1);
|
|
52
|
-
|
|
56
|
+
fireEvent('operational.provider.authFailure', {
|
|
57
|
+
reason: _context.t0 instanceof AuthError && _context.t0.type ? _context.t0.type : null,
|
|
58
|
+
extensionKey: authInfo.key,
|
|
59
|
+
experience: 'datasource'
|
|
60
|
+
});
|
|
53
61
|
captureError('ProviderOnAuthRequest', _context.t0);
|
|
54
|
-
|
|
62
|
+
onAuthError === null || onAuthError === void 0 || onAuthError();
|
|
63
|
+
case 13:
|
|
55
64
|
case "end":
|
|
56
65
|
return _context.stop();
|
|
57
66
|
}
|
|
58
|
-
}, _callee, null, [[1,
|
|
67
|
+
}, _callee, null, [[1, 8]]);
|
|
59
68
|
}));
|
|
60
69
|
return function onAuthRequest() {
|
|
61
70
|
return _ref2.apply(this, arguments);
|
|
@@ -23,7 +23,7 @@ var avatarWrapperStyles = xcss({
|
|
|
23
23
|
var widthObserverWrapperStyles = xcss({
|
|
24
24
|
position: 'relative'
|
|
25
25
|
});
|
|
26
|
-
var AvatarGroupWrapperStyles = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n
|
|
26
|
+
var AvatarGroupWrapperStyles = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ul {\n padding-left: 0px !important;\n }\n"])));
|
|
27
27
|
var getMaxUserCount = function getMaxUserCount(userCount, availableWidth) {
|
|
28
28
|
if (availableWidth <= 28) {
|
|
29
29
|
// If width is less than or equal to 28px, we should only display the user count
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Generates Typescript types for analytics events from analytics.spec.yaml
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::e9179418960d1cbfd58428448cf63c82>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen link-datasource
|
|
8
8
|
*/
|
|
9
9
|
export type ComponentMetaDataType = {
|
|
@@ -70,6 +70,15 @@ export type DatasourceOperationFailedAttributesType = {
|
|
|
70
70
|
traceId: string | null;
|
|
71
71
|
status: number | null;
|
|
72
72
|
};
|
|
73
|
+
export type ProviderAuthSuccessAttributesType = {
|
|
74
|
+
extensionKey: string | null;
|
|
75
|
+
experience: 'datasource';
|
|
76
|
+
};
|
|
77
|
+
export type ProviderAuthFailureAttributesType = {
|
|
78
|
+
extensionKey: string | null;
|
|
79
|
+
reason: 'auth_window_closed' | 'invalid_request' | 'unauthorized_client' | 'access_denied' | 'unsupported_response_type' | 'invalid_scope' | 'server_error' | 'temporarily_unavailable' | 'authclientoauth2.autherror' | null;
|
|
80
|
+
experience: 'datasource';
|
|
81
|
+
};
|
|
73
82
|
export type NextItemLoadedAttributesType = {
|
|
74
83
|
destinationObjectTypes: unknown[];
|
|
75
84
|
extensionKey: string | null;
|
|
@@ -169,6 +178,12 @@ export type AnalyticsEventAttributes = {
|
|
|
169
178
|
/**
|
|
170
179
|
* Fired when a generic operation failed */
|
|
171
180
|
'operational.datasource.operationFailed': DatasourceOperationFailedAttributesType;
|
|
181
|
+
/**
|
|
182
|
+
* Fired when an auth provider connection is successful. */
|
|
183
|
+
'operational.provider.authSuccess': ProviderAuthSuccessAttributesType;
|
|
184
|
+
/**
|
|
185
|
+
* Fired when an auth provider connection failed to complete. */
|
|
186
|
+
'operational.provider.authFailure': ProviderAuthFailureAttributesType;
|
|
172
187
|
/**
|
|
173
188
|
* Fired when user scrolls to the next page/list of the objects */
|
|
174
189
|
'track.nextItem.loaded': NextItemLoadedAttributesType;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Generates Typescript types for analytics events from analytics.spec.yaml
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::e9179418960d1cbfd58428448cf63c82>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen link-datasource
|
|
8
8
|
*/
|
|
9
9
|
export type ComponentMetaDataType = {
|
|
@@ -70,6 +70,15 @@ export type DatasourceOperationFailedAttributesType = {
|
|
|
70
70
|
traceId: string | null;
|
|
71
71
|
status: number | null;
|
|
72
72
|
};
|
|
73
|
+
export type ProviderAuthSuccessAttributesType = {
|
|
74
|
+
extensionKey: string | null;
|
|
75
|
+
experience: 'datasource';
|
|
76
|
+
};
|
|
77
|
+
export type ProviderAuthFailureAttributesType = {
|
|
78
|
+
extensionKey: string | null;
|
|
79
|
+
reason: 'auth_window_closed' | 'invalid_request' | 'unauthorized_client' | 'access_denied' | 'unsupported_response_type' | 'invalid_scope' | 'server_error' | 'temporarily_unavailable' | 'authclientoauth2.autherror' | null;
|
|
80
|
+
experience: 'datasource';
|
|
81
|
+
};
|
|
73
82
|
export type NextItemLoadedAttributesType = {
|
|
74
83
|
destinationObjectTypes: unknown[];
|
|
75
84
|
extensionKey: string | null;
|
|
@@ -169,6 +178,12 @@ export type AnalyticsEventAttributes = {
|
|
|
169
178
|
/**
|
|
170
179
|
* Fired when a generic operation failed */
|
|
171
180
|
'operational.datasource.operationFailed': DatasourceOperationFailedAttributesType;
|
|
181
|
+
/**
|
|
182
|
+
* Fired when an auth provider connection is successful. */
|
|
183
|
+
'operational.provider.authSuccess': ProviderAuthSuccessAttributesType;
|
|
184
|
+
/**
|
|
185
|
+
* Fired when an auth provider connection failed to complete. */
|
|
186
|
+
'operational.provider.authFailure': ProviderAuthFailureAttributesType;
|
|
172
187
|
/**
|
|
173
188
|
* Fired when user scrolls to the next page/list of the objects */
|
|
174
189
|
'track.nextItem.loaded': NextItemLoadedAttributesType;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-datasource",
|
|
3
|
-
"version": "1.22.
|
|
3
|
+
"version": "1.22.2",
|
|
4
4
|
"description": "UI Components to support linking platform dataset feature",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -30,17 +30,17 @@
|
|
|
30
30
|
"analytics:codegen": "yarn workspace @atlassian/analytics-tooling run analytics:codegen link-datasource --output ./src/analytics/generated"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@atlaskit/adf-schema": "^35.
|
|
34
|
-
"@atlaskit/analytics-next": "^9.
|
|
33
|
+
"@atlaskit/adf-schema": "^35.5.1",
|
|
34
|
+
"@atlaskit/analytics-next": "^9.2.0",
|
|
35
35
|
"@atlaskit/avatar": "^21.4.0",
|
|
36
36
|
"@atlaskit/avatar-group": "^9.5.0",
|
|
37
37
|
"@atlaskit/badge": "^15.2.0",
|
|
38
38
|
"@atlaskit/button": "^17.3.0",
|
|
39
|
-
"@atlaskit/dropdown-menu": "^12.
|
|
39
|
+
"@atlaskit/dropdown-menu": "^12.4.0",
|
|
40
40
|
"@atlaskit/editor-prosemirror": "1.1.0",
|
|
41
41
|
"@atlaskit/empty-state": "^7.5.0",
|
|
42
42
|
"@atlaskit/form": "^9.0.3",
|
|
43
|
-
"@atlaskit/heading": "^1.
|
|
43
|
+
"@atlaskit/heading": "^1.6.0",
|
|
44
44
|
"@atlaskit/icon": "^22.0.0",
|
|
45
45
|
"@atlaskit/icon-object": "^6.3.0",
|
|
46
46
|
"@atlaskit/image": "^1.1.0",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"@atlaskit/ssr": "*",
|
|
93
93
|
"@atlaskit/visual-regression": "*",
|
|
94
94
|
"@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
|
|
95
|
-
"@atlassian/feature-flags-test-utils": "^0.
|
|
95
|
+
"@atlassian/feature-flags-test-utils": "^0.2.0",
|
|
96
96
|
"@faker-js/faker": "^7.5.0",
|
|
97
97
|
"@testing-library/dom": "^8.17.1",
|
|
98
98
|
"@testing-library/react": "^12.1.5",
|