@atlaskit/link-datasource 1.3.1 → 1.4.1
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/hooks/useDatasourceTableState.js +5 -4
- 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/hooks/useDatasourceTableState.js +5 -4
- 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/hooks/useDatasourceTableState.js +5 -4
- 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 +2 -1
- 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.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`c8a7c9e33a8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c8a7c9e33a8) - [ux] Fixed columns not updating on reinsertion with new columns
|
|
8
|
+
|
|
9
|
+
## 1.4.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`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
|
|
14
|
+
|
|
3
15
|
## 1.3.1
|
|
4
16
|
|
|
5
17
|
### Patch 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;
|
|
@@ -10,6 +10,7 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers
|
|
|
10
10
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
11
11
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
12
12
|
var _react = require("react");
|
|
13
|
+
var _isEqual = _interopRequireDefault(require("lodash/isEqual"));
|
|
13
14
|
var _linkClientExtension = require("@atlaskit/link-client-extension");
|
|
14
15
|
var _analytics = require("../analytics");
|
|
15
16
|
var useDatasourceTableState = function useDatasourceTableState(_ref) {
|
|
@@ -114,7 +115,7 @@ var useDatasourceTableState = function useDatasourceTableState(_ref) {
|
|
|
114
115
|
}, _callee, null, [[2, 17]]);
|
|
115
116
|
})), [columns, datasourceId, getDatasourceDetails, parameters]);
|
|
116
117
|
var applySchemaProperties = (0, _react.useCallback)(function (properties) {
|
|
117
|
-
if (columns
|
|
118
|
+
if (!(0, _isEqual.default)(columns, properties)) {
|
|
118
119
|
setColumns(properties);
|
|
119
120
|
}
|
|
120
121
|
var defaultProperties = properties.map(function (prop) {
|
|
@@ -123,13 +124,13 @@ var useDatasourceTableState = function useDatasourceTableState(_ref) {
|
|
|
123
124
|
|
|
124
125
|
// when loading for the first time, we will need to set default visible props as /data does not give you that info
|
|
125
126
|
// also, since we dont pass any fields, we will need to set this info as lastRequestedFieldKeys
|
|
126
|
-
if (defaultVisibleColumnKeys
|
|
127
|
+
if (!(0, _isEqual.default)(defaultVisibleColumnKeys, defaultProperties)) {
|
|
127
128
|
setDefaultVisibleColumnKeys(defaultProperties);
|
|
128
129
|
}
|
|
129
|
-
if (lastRequestedFieldKeys
|
|
130
|
+
if (!(0, _isEqual.default)(lastRequestedFieldKeys, defaultProperties)) {
|
|
130
131
|
setLastRequestedFieldKeys(defaultProperties);
|
|
131
132
|
}
|
|
132
|
-
}, [columns
|
|
133
|
+
}, [columns, defaultVisibleColumnKeys, lastRequestedFieldKeys]);
|
|
133
134
|
var onNextPage = (0, _react.useCallback)( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
134
135
|
var requestInfo,
|
|
135
136
|
_requestInfo$isSchema,
|
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.1",
|
|
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
|
+
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { useCallback, useEffect, useState } from 'react';
|
|
2
|
+
import isEqual from 'lodash/isEqual';
|
|
2
3
|
import { DEFAULT_GET_DATASOURCE_DATA_PAGE_SIZE, useDatasourceClientExtension } from '@atlaskit/link-client-extension';
|
|
3
4
|
import { useDatasourceAnalyticsEvents } from '../analytics';
|
|
4
5
|
export const useDatasourceTableState = ({
|
|
@@ -52,20 +53,20 @@ export const useDatasourceTableState = ({
|
|
|
52
53
|
}
|
|
53
54
|
}, [columns, datasourceId, getDatasourceDetails, parameters]);
|
|
54
55
|
const applySchemaProperties = useCallback(properties => {
|
|
55
|
-
if (columns
|
|
56
|
+
if (!isEqual(columns, properties)) {
|
|
56
57
|
setColumns(properties);
|
|
57
58
|
}
|
|
58
59
|
const defaultProperties = properties.map(prop => prop.key);
|
|
59
60
|
|
|
60
61
|
// when loading for the first time, we will need to set default visible props as /data does not give you that info
|
|
61
62
|
// also, since we dont pass any fields, we will need to set this info as lastRequestedFieldKeys
|
|
62
|
-
if (defaultVisibleColumnKeys
|
|
63
|
+
if (!isEqual(defaultVisibleColumnKeys, defaultProperties)) {
|
|
63
64
|
setDefaultVisibleColumnKeys(defaultProperties);
|
|
64
65
|
}
|
|
65
|
-
if (lastRequestedFieldKeys
|
|
66
|
+
if (!isEqual(lastRequestedFieldKeys, defaultProperties)) {
|
|
66
67
|
setLastRequestedFieldKeys(defaultProperties);
|
|
67
68
|
}
|
|
68
|
-
}, [columns
|
|
69
|
+
}, [columns, defaultVisibleColumnKeys, lastRequestedFieldKeys]);
|
|
69
70
|
const onNextPage = useCallback(async (requestInfo = {}) => {
|
|
70
71
|
if (!parameters) {
|
|
71
72
|
return;
|
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
|
+
});
|
|
@@ -3,6 +3,7 @@ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
4
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
5
5
|
import { useCallback, useEffect, useState } from 'react';
|
|
6
|
+
import isEqual from 'lodash/isEqual';
|
|
6
7
|
import { DEFAULT_GET_DATASOURCE_DATA_PAGE_SIZE, useDatasourceClientExtension } from '@atlaskit/link-client-extension';
|
|
7
8
|
import { useDatasourceAnalyticsEvents } from '../analytics';
|
|
8
9
|
export var useDatasourceTableState = function useDatasourceTableState(_ref) {
|
|
@@ -107,7 +108,7 @@ export var useDatasourceTableState = function useDatasourceTableState(_ref) {
|
|
|
107
108
|
}, _callee, null, [[2, 17]]);
|
|
108
109
|
})), [columns, datasourceId, getDatasourceDetails, parameters]);
|
|
109
110
|
var applySchemaProperties = useCallback(function (properties) {
|
|
110
|
-
if (columns
|
|
111
|
+
if (!isEqual(columns, properties)) {
|
|
111
112
|
setColumns(properties);
|
|
112
113
|
}
|
|
113
114
|
var defaultProperties = properties.map(function (prop) {
|
|
@@ -116,13 +117,13 @@ export var useDatasourceTableState = function useDatasourceTableState(_ref) {
|
|
|
116
117
|
|
|
117
118
|
// when loading for the first time, we will need to set default visible props as /data does not give you that info
|
|
118
119
|
// also, since we dont pass any fields, we will need to set this info as lastRequestedFieldKeys
|
|
119
|
-
if (defaultVisibleColumnKeys
|
|
120
|
+
if (!isEqual(defaultVisibleColumnKeys, defaultProperties)) {
|
|
120
121
|
setDefaultVisibleColumnKeys(defaultProperties);
|
|
121
122
|
}
|
|
122
|
-
if (lastRequestedFieldKeys
|
|
123
|
+
if (!isEqual(lastRequestedFieldKeys, defaultProperties)) {
|
|
123
124
|
setLastRequestedFieldKeys(defaultProperties);
|
|
124
125
|
}
|
|
125
|
-
}, [columns
|
|
126
|
+
}, [columns, defaultVisibleColumnKeys, lastRequestedFieldKeys]);
|
|
126
127
|
var onNextPage = useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
127
128
|
var requestInfo,
|
|
128
129
|
_requestInfo$isSchema,
|
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.1",
|
|
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.1",
|
|
4
4
|
"description": "UI Components to support linking platform dataset feature",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -67,6 +67,7 @@
|
|
|
67
67
|
"@emotion/react": "^11.7.1",
|
|
68
68
|
"@emotion/styled": "^11.0.0",
|
|
69
69
|
"debounce-promise": "^3.1.2",
|
|
70
|
+
"lodash": "^4.17.21",
|
|
70
71
|
"react-dom": "^16.8.0",
|
|
71
72
|
"tiny-invariant": "^1.2.0",
|
|
72
73
|
"uuid": "^3.1.0"
|
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
|
|