@atlaskit/link-datasource 1.3.0 → 1.4.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 +12 -0
- package/dist/cjs/analytics/constants.js +1 -1
- package/dist/cjs/analytics/index.js +15 -1
- package/dist/cjs/index.js +7 -0
- package/dist/cjs/ui/assets-modal/modal/index.js +1 -1
- package/dist/es2019/analytics/constants.js +1 -1
- package/dist/es2019/analytics/index.js +15 -1
- package/dist/es2019/index.js +2 -1
- package/dist/es2019/ui/assets-modal/modal/index.js +1 -1
- package/dist/esm/analytics/constants.js +1 -1
- package/dist/esm/analytics/index.js +14 -1
- package/dist/esm/index.js +2 -1
- package/dist/esm/ui/assets-modal/modal/index.js +1 -1
- package/dist/types/analytics/generated/analytics.types.d.ts +5 -1
- package/dist/types/analytics/index.d.ts +2 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types-ts4.5/analytics/generated/analytics.types.d.ts +5 -1
- package/dist/types-ts4.5/analytics/index.d.ts +2 -0
- package/dist/types-ts4.5/index.d.ts +1 -0
- package/package.json +4 -4
- package/report.api.md +7 -0
- package/tmp/api-report-tmp.d.ts +5 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/link-datasource
|
|
2
2
|
|
|
3
|
+
## 1.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`b2a9540c8d8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b2a9540c8d8) - Export a new DatasourceRenderFailedAnalyticsWrapper - a component that can be consumed to emit 'ui.datasource.renderFailed' events when an inserted datasource fails to render
|
|
8
|
+
|
|
9
|
+
## 1.3.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`1fedffbd64b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1fedffbd64b) - Update json-ld-types dependencies to be compatible with version
|
|
14
|
+
|
|
3
15
|
## 1.3.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.DatasourceRenderFailedAnalyticsWrapper = void 0;
|
|
6
7
|
Object.defineProperty(exports, "EVENT_CHANNEL", {
|
|
7
8
|
enumerable: true,
|
|
8
9
|
get: function get() {
|
|
@@ -10,9 +11,22 @@ Object.defineProperty(exports, "EVENT_CHANNEL", {
|
|
|
10
11
|
}
|
|
11
12
|
});
|
|
12
13
|
exports.useDatasourceAnalyticsEvents = void 0;
|
|
14
|
+
var _react = require("react");
|
|
13
15
|
var _constants = require("./constants");
|
|
16
|
+
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
14
17
|
var _useAnalyticsEvents = require("./generated/use-analytics-events");
|
|
15
18
|
var useDatasourceAnalyticsEvents = function useDatasourceAnalyticsEvents() {
|
|
16
19
|
return (0, _useAnalyticsEvents.useAnalyticsEvents)();
|
|
17
20
|
};
|
|
18
|
-
exports.useDatasourceAnalyticsEvents = useDatasourceAnalyticsEvents;
|
|
21
|
+
exports.useDatasourceAnalyticsEvents = useDatasourceAnalyticsEvents;
|
|
22
|
+
var DatasourceRenderFailedAnalyticsWrapper = (0, _analyticsNext.withAnalyticsContext)(_constants.packageMetaData)(function (props) {
|
|
23
|
+
var _useDatasourceAnalyti = useDatasourceAnalyticsEvents(),
|
|
24
|
+
fireEvent = _useDatasourceAnalyti.fireEvent;
|
|
25
|
+
(0, _react.useEffect)(function () {
|
|
26
|
+
fireEvent('ui.datasource.renderFailure', {
|
|
27
|
+
reason: 'internal'
|
|
28
|
+
});
|
|
29
|
+
}, [fireEvent]);
|
|
30
|
+
return props.children;
|
|
31
|
+
});
|
|
32
|
+
exports.DatasourceRenderFailedAnalyticsWrapper = DatasourceRenderFailedAnalyticsWrapper;
|
package/dist/cjs/index.js
CHANGED
|
@@ -17,6 +17,12 @@ Object.defineProperty(exports, "AssetsConfigModal", {
|
|
|
17
17
|
return _assetsModal.default;
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
|
+
Object.defineProperty(exports, "DatasourceRenderFailedAnalyticsWrapper", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function get() {
|
|
23
|
+
return _analytics.DatasourceRenderFailedAnalyticsWrapper;
|
|
24
|
+
}
|
|
25
|
+
});
|
|
20
26
|
Object.defineProperty(exports, "DatasourceTableView", {
|
|
21
27
|
enumerable: true,
|
|
22
28
|
get: function get() {
|
|
@@ -44,5 +50,6 @@ Object.defineProperty(exports, "JiraIssuesConfigModal", {
|
|
|
44
50
|
var _jiraIssuesModal = _interopRequireWildcard(require("./ui/jira-issues-modal"));
|
|
45
51
|
var _assetsModal = _interopRequireWildcard(require("./ui/assets-modal"));
|
|
46
52
|
var _datasourceTableView = _interopRequireDefault(require("./ui/datasource-table-view"));
|
|
53
|
+
var _analytics = require("./analytics");
|
|
47
54
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
48
55
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -231,7 +231,7 @@ var analyticsContextAttributes = {
|
|
|
231
231
|
};
|
|
232
232
|
var analyticsContextData = {
|
|
233
233
|
packageName: "@atlaskit/link-datasource",
|
|
234
|
-
packageVersion: "1.
|
|
234
|
+
packageVersion: "1.4.0",
|
|
235
235
|
source: 'datasourceConfigModal'
|
|
236
236
|
};
|
|
237
237
|
var contextData = _objectSpread(_objectSpread({}, analyticsContextData), {}, {
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
import { useEffect } from 'react';
|
|
1
2
|
export { EVENT_CHANNEL } from './constants';
|
|
3
|
+
import { withAnalyticsContext } from '@atlaskit/analytics-next';
|
|
4
|
+
import { packageMetaData } from './constants';
|
|
2
5
|
import { useAnalyticsEvents } from './generated/use-analytics-events';
|
|
3
|
-
export const useDatasourceAnalyticsEvents = () => useAnalyticsEvents();
|
|
6
|
+
export const useDatasourceAnalyticsEvents = () => useAnalyticsEvents();
|
|
7
|
+
export const DatasourceRenderFailedAnalyticsWrapper = withAnalyticsContext(packageMetaData)(props => {
|
|
8
|
+
const {
|
|
9
|
+
fireEvent
|
|
10
|
+
} = useDatasourceAnalyticsEvents();
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
fireEvent('ui.datasource.renderFailure', {
|
|
13
|
+
reason: 'internal'
|
|
14
|
+
});
|
|
15
|
+
}, [fireEvent]);
|
|
16
|
+
return props.children;
|
|
17
|
+
});
|
package/dist/es2019/index.js
CHANGED
|
@@ -3,4 +3,5 @@ export { default as AssetsConfigModal } from './ui/assets-modal';
|
|
|
3
3
|
export { default as DatasourceTableView } from './ui/datasource-table-view';
|
|
4
4
|
export { default as JSMAssetsConfigModal } from './ui/assets-modal';
|
|
5
5
|
export { JIRA_LIST_OF_LINKS_DATASOURCE_ID } from './ui/jira-issues-modal';
|
|
6
|
-
export { ASSETS_LIST_OF_LINKS_DATASOURCE_ID } from './ui/assets-modal';
|
|
6
|
+
export { ASSETS_LIST_OF_LINKS_DATASOURCE_ID } from './ui/assets-modal';
|
|
7
|
+
export { DatasourceRenderFailedAnalyticsWrapper } from './analytics';
|
|
@@ -1,5 +1,18 @@
|
|
|
1
|
+
import { useEffect } from 'react';
|
|
1
2
|
export { EVENT_CHANNEL } from './constants';
|
|
3
|
+
import { withAnalyticsContext } from '@atlaskit/analytics-next';
|
|
4
|
+
import { packageMetaData } from './constants';
|
|
2
5
|
import { useAnalyticsEvents } from './generated/use-analytics-events';
|
|
3
6
|
export var useDatasourceAnalyticsEvents = function useDatasourceAnalyticsEvents() {
|
|
4
7
|
return useAnalyticsEvents();
|
|
5
|
-
};
|
|
8
|
+
};
|
|
9
|
+
export var DatasourceRenderFailedAnalyticsWrapper = withAnalyticsContext(packageMetaData)(function (props) {
|
|
10
|
+
var _useDatasourceAnalyti = useDatasourceAnalyticsEvents(),
|
|
11
|
+
fireEvent = _useDatasourceAnalyti.fireEvent;
|
|
12
|
+
useEffect(function () {
|
|
13
|
+
fireEvent('ui.datasource.renderFailure', {
|
|
14
|
+
reason: 'internal'
|
|
15
|
+
});
|
|
16
|
+
}, [fireEvent]);
|
|
17
|
+
return props.children;
|
|
18
|
+
});
|
package/dist/esm/index.js
CHANGED
|
@@ -3,4 +3,5 @@ export { default as AssetsConfigModal } from './ui/assets-modal';
|
|
|
3
3
|
export { default as DatasourceTableView } from './ui/datasource-table-view';
|
|
4
4
|
export { default as JSMAssetsConfigModal } from './ui/assets-modal';
|
|
5
5
|
export { JIRA_LIST_OF_LINKS_DATASOURCE_ID } from './ui/jira-issues-modal';
|
|
6
|
-
export { ASSETS_LIST_OF_LINKS_DATASOURCE_ID } from './ui/assets-modal';
|
|
6
|
+
export { ASSETS_LIST_OF_LINKS_DATASOURCE_ID } from './ui/assets-modal';
|
|
7
|
+
export { DatasourceRenderFailedAnalyticsWrapper } from './analytics';
|
|
@@ -222,7 +222,7 @@ var analyticsContextAttributes = {
|
|
|
222
222
|
};
|
|
223
223
|
var analyticsContextData = {
|
|
224
224
|
packageName: "@atlaskit/link-datasource",
|
|
225
|
-
packageVersion: "1.
|
|
225
|
+
packageVersion: "1.4.0",
|
|
226
226
|
source: 'datasourceConfigModal'
|
|
227
227
|
};
|
|
228
228
|
var contextData = _objectSpread(_objectSpread({}, analyticsContextData), {}, {
|
|
@@ -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::05b7b33172b55f75035f0d77317a3f4f>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen link-datasource
|
|
8
8
|
*/
|
|
9
9
|
export type PackageMetaDataType = {
|
|
@@ -57,6 +57,7 @@ export type DatasourceRenderSuccessAttributesType = {
|
|
|
57
57
|
extensionKey: string | null;
|
|
58
58
|
display: 'table';
|
|
59
59
|
};
|
|
60
|
+
export type DatasourceRenderFailureAttributesType = {};
|
|
60
61
|
export type NextItemLoadedAttributesType = {
|
|
61
62
|
destinationObjectTypes: unknown[];
|
|
62
63
|
extensionKey: string | null;
|
|
@@ -114,6 +115,9 @@ export type AnalyticsEventAttributes = {
|
|
|
114
115
|
/**
|
|
115
116
|
* Fired when an inserted datasource resolves / renders. */
|
|
116
117
|
'ui.datasource.renderSuccess': DatasourceRenderSuccessAttributesType;
|
|
118
|
+
/**
|
|
119
|
+
* Fired when an inserted datasource fails to render */
|
|
120
|
+
'ui.datasource.renderFailure': DatasourceRenderFailureAttributesType;
|
|
117
121
|
/**
|
|
118
122
|
* Fired when user scrolls to the next page/list of the objects */
|
|
119
123
|
'track.nextItem.loaded': NextItemLoadedAttributesType;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export { EVENT_CHANNEL } from './constants';
|
|
2
3
|
export declare const useDatasourceAnalyticsEvents: () => {
|
|
3
4
|
fireEvent: <K extends keyof import("./generated/analytics.types").AnalyticsEventAttributes>(params_0: K, ...params_1: undefined extends import("./generated/analytics.types").AnalyticsEventAttributes[K] ? [param?: import("./generated/analytics.types").AnalyticsEventAttributes[K] | undefined] : [param: import("./generated/analytics.types").AnalyticsEventAttributes[K]]) => void;
|
|
4
5
|
};
|
|
6
|
+
export declare const DatasourceRenderFailedAnalyticsWrapper: import("react").ForwardRefExoticComponent<Pick<any, string | number | symbol> & import("react").RefAttributes<any>>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -7,3 +7,4 @@ export type { AssetsDatasourceAdf, AssetsDatasourceParameters, } from './ui/asse
|
|
|
7
7
|
export { JIRA_LIST_OF_LINKS_DATASOURCE_ID } from './ui/jira-issues-modal';
|
|
8
8
|
export { ASSETS_LIST_OF_LINKS_DATASOURCE_ID } from './ui/assets-modal';
|
|
9
9
|
export type { DatasourceAdf, DatasourceAdfView, DatasourceAdfTableView, } from '@atlaskit/linking-common/types';
|
|
10
|
+
export { DatasourceRenderFailedAnalyticsWrapper } from './analytics';
|
|
@@ -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::05b7b33172b55f75035f0d77317a3f4f>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen link-datasource
|
|
8
8
|
*/
|
|
9
9
|
export type PackageMetaDataType = {
|
|
@@ -57,6 +57,7 @@ export type DatasourceRenderSuccessAttributesType = {
|
|
|
57
57
|
extensionKey: string | null;
|
|
58
58
|
display: 'table';
|
|
59
59
|
};
|
|
60
|
+
export type DatasourceRenderFailureAttributesType = {};
|
|
60
61
|
export type NextItemLoadedAttributesType = {
|
|
61
62
|
destinationObjectTypes: unknown[];
|
|
62
63
|
extensionKey: string | null;
|
|
@@ -114,6 +115,9 @@ export type AnalyticsEventAttributes = {
|
|
|
114
115
|
/**
|
|
115
116
|
* Fired when an inserted datasource resolves / renders. */
|
|
116
117
|
'ui.datasource.renderSuccess': DatasourceRenderSuccessAttributesType;
|
|
118
|
+
/**
|
|
119
|
+
* Fired when an inserted datasource fails to render */
|
|
120
|
+
'ui.datasource.renderFailure': DatasourceRenderFailureAttributesType;
|
|
117
121
|
/**
|
|
118
122
|
* Fired when user scrolls to the next page/list of the objects */
|
|
119
123
|
'track.nextItem.loaded': NextItemLoadedAttributesType;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export { EVENT_CHANNEL } from './constants';
|
|
2
3
|
export declare const useDatasourceAnalyticsEvents: () => {
|
|
3
4
|
fireEvent: <K extends keyof import("./generated/analytics.types").AnalyticsEventAttributes>(params_0: K, ...params_1: undefined extends import("./generated/analytics.types").AnalyticsEventAttributes[K] ? [
|
|
@@ -6,3 +7,4 @@ export declare const useDatasourceAnalyticsEvents: () => {
|
|
|
6
7
|
param: import("./generated/analytics.types").AnalyticsEventAttributes[K]
|
|
7
8
|
]) => void;
|
|
8
9
|
};
|
|
10
|
+
export declare const DatasourceRenderFailedAnalyticsWrapper: import("react").ForwardRefExoticComponent<Pick<any, string | number | symbol> & import("react").RefAttributes<any>>;
|
|
@@ -7,3 +7,4 @@ export type { AssetsDatasourceAdf, AssetsDatasourceParameters, } from './ui/asse
|
|
|
7
7
|
export { JIRA_LIST_OF_LINKS_DATASOURCE_ID } from './ui/jira-issues-modal';
|
|
8
8
|
export { ASSETS_LIST_OF_LINKS_DATASOURCE_ID } from './ui/assets-modal';
|
|
9
9
|
export type { DatasourceAdf, DatasourceAdfView, DatasourceAdfTableView, } from '@atlaskit/linking-common/types';
|
|
10
|
+
export { DatasourceRenderFailedAnalyticsWrapper } from './analytics';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-datasource",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "UI Components to support linking platform dataset feature",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
"@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-autoscroll": "^0.6.0",
|
|
54
54
|
"@atlaskit/pragmatic-drag-and-drop-react-indicator": "^0.16.0",
|
|
55
55
|
"@atlaskit/select": "^16.7.0",
|
|
56
|
-
"@atlaskit/smart-card": "^26.
|
|
57
|
-
"@atlaskit/spinner": "^15.
|
|
56
|
+
"@atlaskit/smart-card": "^26.28.0",
|
|
57
|
+
"@atlaskit/spinner": "^15.6.0",
|
|
58
58
|
"@atlaskit/tag": "^11.6.0",
|
|
59
59
|
"@atlaskit/textfield": "5.6.7",
|
|
60
60
|
"@atlaskit/theme": "^12.6.0",
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"@testing-library/user-event": "^14.4.3",
|
|
90
90
|
"fetch-mock": "^8.0.0",
|
|
91
91
|
"jest-fetch-mock": "^3.0.3",
|
|
92
|
-
"json-ld-types": "3.9.1",
|
|
92
|
+
"json-ld-types": "^3.9.1",
|
|
93
93
|
"typescript": "~4.9.5",
|
|
94
94
|
"wait-for-expect": "^1.2.0"
|
|
95
95
|
},
|
package/report.api.md
CHANGED
|
@@ -20,7 +20,9 @@
|
|
|
20
20
|
import { DatasourceAdf } from '@atlaskit/linking-common/types';
|
|
21
21
|
import { DatasourceAdfTableView } from '@atlaskit/linking-common/types';
|
|
22
22
|
import { DatasourceAdfView } from '@atlaskit/linking-common/types';
|
|
23
|
+
import { ForwardRefExoticComponent } from 'react';
|
|
23
24
|
import { InlineCardAdf } from '@atlaskit/linking-common/types';
|
|
25
|
+
import { RefAttributes } from 'react';
|
|
24
26
|
import type { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
25
27
|
|
|
26
28
|
// @public (undocumented)
|
|
@@ -77,6 +79,11 @@ export { DatasourceAdfTableView };
|
|
|
77
79
|
|
|
78
80
|
export { DatasourceAdfView };
|
|
79
81
|
|
|
82
|
+
// @public (undocumented)
|
|
83
|
+
export const DatasourceRenderFailedAnalyticsWrapper: ForwardRefExoticComponent<
|
|
84
|
+
Pick<any, number | string | symbol> & RefAttributes<any>
|
|
85
|
+
>;
|
|
86
|
+
|
|
80
87
|
// @public (undocumented)
|
|
81
88
|
export const DatasourceTableView: (
|
|
82
89
|
props: DatasourceTableViewProps,
|
package/tmp/api-report-tmp.d.ts
CHANGED
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
import { DatasourceAdf } from '@atlaskit/linking-common/types';
|
|
10
10
|
import { DatasourceAdfTableView } from '@atlaskit/linking-common/types';
|
|
11
11
|
import { DatasourceAdfView } from '@atlaskit/linking-common/types';
|
|
12
|
+
import { ForwardRefExoticComponent } from 'react';
|
|
12
13
|
import { InlineCardAdf } from '@atlaskit/linking-common/types';
|
|
14
|
+
import { RefAttributes } from 'react';
|
|
13
15
|
import type { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
14
16
|
|
|
15
17
|
// @public (undocumented)
|
|
@@ -63,6 +65,9 @@ export { DatasourceAdfTableView }
|
|
|
63
65
|
|
|
64
66
|
export { DatasourceAdfView }
|
|
65
67
|
|
|
68
|
+
// @public (undocumented)
|
|
69
|
+
export const DatasourceRenderFailedAnalyticsWrapper: ForwardRefExoticComponent<Pick<any, number | string | symbol> & RefAttributes<any>>;
|
|
70
|
+
|
|
66
71
|
// @public (undocumented)
|
|
67
72
|
export const DatasourceTableView: (props: DatasourceTableViewProps) => JSX.Element;
|
|
68
73
|
|