@atlaskit/link-datasource 1.15.2 → 1.15.4
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/hooks/useAssetsClient.js +71 -27
- package/dist/cjs/services/cmdbService.js +128 -28
- package/dist/cjs/services/cmdbService.utils.js +64 -0
- package/dist/cjs/ui/assets-modal/modal/index.js +73 -9
- package/dist/cjs/ui/assets-modal/modal/render-assets-content/index.js +25 -12
- package/dist/cjs/ui/assets-modal/search-container/index.js +2 -1
- package/dist/cjs/ui/assets-modal/search-container/object-schema-select/index.js +21 -63
- package/dist/cjs/ui/issue-like-table/render-type/date-time/index.js +7 -1
- package/dist/es2019/analytics/constants.js +1 -1
- package/dist/es2019/hooks/useAssetsClient.js +39 -15
- package/dist/es2019/services/cmdbService.js +60 -14
- package/dist/es2019/services/cmdbService.utils.js +39 -0
- package/dist/es2019/ui/assets-modal/modal/index.js +70 -9
- package/dist/es2019/ui/assets-modal/modal/render-assets-content/index.js +24 -9
- package/dist/es2019/ui/assets-modal/search-container/index.js +2 -1
- package/dist/es2019/ui/assets-modal/search-container/object-schema-select/index.js +2 -25
- package/dist/es2019/ui/issue-like-table/render-type/date-time/index.js +7 -1
- package/dist/esm/analytics/constants.js +1 -1
- package/dist/esm/hooks/useAssetsClient.js +72 -28
- package/dist/esm/services/cmdbService.js +128 -28
- package/dist/esm/services/cmdbService.utils.js +57 -0
- package/dist/esm/ui/assets-modal/modal/index.js +73 -9
- package/dist/esm/ui/assets-modal/modal/render-assets-content/index.js +24 -9
- package/dist/esm/ui/assets-modal/search-container/index.js +2 -1
- package/dist/esm/ui/assets-modal/search-container/object-schema-select/index.js +18 -60
- package/dist/esm/ui/issue-like-table/render-type/date-time/index.js +7 -1
- package/dist/types/hooks/useAssetsClient.d.ts +5 -1
- package/dist/types/services/cmdbService.utils.d.ts +9 -0
- package/dist/types/ui/assets-modal/modal/render-assets-content/index.d.ts +3 -2
- package/dist/types/ui/assets-modal/search-container/index.d.ts +1 -0
- package/dist/types/ui/assets-modal/search-container/object-schema-select/index.d.ts +2 -1
- package/dist/types-ts4.5/hooks/useAssetsClient.d.ts +5 -1
- package/dist/types-ts4.5/services/cmdbService.utils.d.ts +9 -0
- package/dist/types-ts4.5/ui/assets-modal/modal/render-assets-content/index.d.ts +3 -2
- package/dist/types-ts4.5/ui/assets-modal/search-container/index.d.ts +1 -0
- package/dist/types-ts4.5/ui/assets-modal/search-container/object-schema-select/index.d.ts +2 -1
- package/package.json +1 -1
|
@@ -1,9 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
import { css, jsx } from '@emotion/react';
|
|
2
4
|
import { AccessRequired } from '../../../common/error-state/access-required';
|
|
3
5
|
import { ModalLoadingError } from '../../../common/error-state/modal-loading-error';
|
|
4
6
|
import { NoResults } from '../../../common/error-state/no-results';
|
|
5
7
|
import { EmptyState, IssueLikeDataTableView } from '../../../issue-like-table';
|
|
6
8
|
import { InitialStateView } from './initial-state-view';
|
|
9
|
+
// This is to prevent y scrollbar when initially fetching data
|
|
10
|
+
var emptyStateOverrideStyles = css({
|
|
11
|
+
height: '420px',
|
|
12
|
+
overflow: 'hidden'
|
|
13
|
+
});
|
|
7
14
|
export var RenderAssetsContent = function RenderAssetsContent(props) {
|
|
8
15
|
var status = props.status,
|
|
9
16
|
responseItems = props.responseItems,
|
|
@@ -14,10 +21,11 @@ export var RenderAssetsContent = function RenderAssetsContent(props) {
|
|
|
14
21
|
columns = props.columns,
|
|
15
22
|
defaultVisibleColumnKeys = props.defaultVisibleColumnKeys,
|
|
16
23
|
onVisibleColumnKeysChange = props.onVisibleColumnKeysChange,
|
|
17
|
-
modalRenderInstanceId = props.modalRenderInstanceId
|
|
24
|
+
modalRenderInstanceId = props.modalRenderInstanceId,
|
|
25
|
+
isFetchingInitialData = props.isFetchingInitialData;
|
|
18
26
|
var resolvedWithNoResults = status === 'resolved' && !responseItems.length;
|
|
19
27
|
var issueLikeDataTableView = useMemo(function () {
|
|
20
|
-
return
|
|
28
|
+
return jsx(IssueLikeDataTableView, {
|
|
21
29
|
testId: "asset-datasource-table",
|
|
22
30
|
status: status,
|
|
23
31
|
columns: columns,
|
|
@@ -30,16 +38,23 @@ export var RenderAssetsContent = function RenderAssetsContent(props) {
|
|
|
30
38
|
parentContainerRenderInstanceId: modalRenderInstanceId
|
|
31
39
|
});
|
|
32
40
|
}, [columns, defaultVisibleColumnKeys, hasNextPage, loadDatasourceDetails, onNextPage, onVisibleColumnKeysChange, responseItems, status, visibleColumnKeys, modalRenderInstanceId]);
|
|
33
|
-
if (
|
|
34
|
-
|
|
41
|
+
if (isFetchingInitialData) {
|
|
42
|
+
// Placing this check first as it's a priority before all others
|
|
43
|
+
return jsx("div", {
|
|
44
|
+
css: emptyStateOverrideStyles
|
|
45
|
+
}, jsx(EmptyState, {
|
|
46
|
+
testId: "assets-aql-datasource-modal--loading-state"
|
|
47
|
+
}));
|
|
48
|
+
} else if (status === 'rejected') {
|
|
49
|
+
return jsx(ModalLoadingError, null);
|
|
35
50
|
} else if (status === 'unauthorized') {
|
|
36
|
-
return
|
|
51
|
+
return jsx(AccessRequired, null);
|
|
37
52
|
} else if (status === 'empty') {
|
|
38
|
-
return
|
|
53
|
+
return jsx(InitialStateView, null);
|
|
39
54
|
} else if (resolvedWithNoResults) {
|
|
40
|
-
return
|
|
55
|
+
return jsx(NoResults, null);
|
|
41
56
|
} else if (status === 'loading' && !columns.length) {
|
|
42
|
-
return
|
|
57
|
+
return jsx(EmptyState, {
|
|
43
58
|
testId: "assets-aql-datasource-modal--loading-state"
|
|
44
59
|
});
|
|
45
60
|
}
|
|
@@ -28,7 +28,7 @@ export var AssetsSearchContainer = function AssetsSearchContainer(props) {
|
|
|
28
28
|
return jsx(Form, {
|
|
29
29
|
onSubmit: onFormSubmit
|
|
30
30
|
}, function (_ref) {
|
|
31
|
-
var _initialSearchData$ob, _initialSearchData$aq;
|
|
31
|
+
var _initialSearchData$ob, _initialSearchData$ob2, _initialSearchData$aq;
|
|
32
32
|
var formProps = _ref.formProps;
|
|
33
33
|
return jsx(FormContainer, _extends({}, formProps, {
|
|
34
34
|
id: SEARCH_FORM_ID
|
|
@@ -37,6 +37,7 @@ export var AssetsSearchContainer = function AssetsSearchContainer(props) {
|
|
|
37
37
|
}, modalTitle, jsx(SchemaSelectContainer, null, jsx(AssetsObjectSchemaSelect, {
|
|
38
38
|
value: (_initialSearchData$ob = initialSearchData.objectSchema) !== null && _initialSearchData$ob !== void 0 ? _initialSearchData$ob : undefined,
|
|
39
39
|
workspaceId: workspaceId,
|
|
40
|
+
initialObjectSchemas: (_initialSearchData$ob2 = initialSearchData.objectSchemas) !== null && _initialSearchData$ob2 !== void 0 ? _initialSearchData$ob2 : undefined,
|
|
40
41
|
classNamePrefix: "assets-datasource-modal--object-schema-select"
|
|
41
42
|
}))), jsx(FormRowContainer, null, jsx(AqlSearchInput, {
|
|
42
43
|
value: (_initialSearchData$aq = initialSearchData.aql) !== null && _initialSearchData$aq !== void 0 ? _initialSearchData$aq : DEFAULT_AQL_QUERY,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
4
|
-
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
5
4
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
6
5
|
var _excluded = ["onChange", "onFocus"];
|
|
7
6
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
@@ -9,14 +8,12 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
9
8
|
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) { _defineProperty(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; }
|
|
10
9
|
/** @jsx jsx */
|
|
11
10
|
|
|
12
|
-
import { useEffect, useState } from 'react';
|
|
13
11
|
import { jsx } from '@emotion/react';
|
|
14
12
|
import debounce from 'debounce-promise';
|
|
15
13
|
import { useIntl } from 'react-intl-next';
|
|
16
14
|
import { Field } from '@atlaskit/form';
|
|
17
15
|
import { AsyncSelect } from '@atlaskit/select';
|
|
18
16
|
import { layers } from '@atlaskit/theme/constants';
|
|
19
|
-
import { useDatasourceAnalyticsEvents } from '../../../../analytics';
|
|
20
17
|
import { useObjectSchemas } from '../../../../hooks/useObjectSchemas';
|
|
21
18
|
import { objectSchemaKey } from '../../../../types/assets/types';
|
|
22
19
|
import { FieldContainer } from '../styled';
|
|
@@ -46,74 +43,35 @@ export var selectInAModalStyleFixProps = {
|
|
|
46
43
|
export var AssetsObjectSchemaSelect = function AssetsObjectSchemaSelect(_ref) {
|
|
47
44
|
var value = _ref.value,
|
|
48
45
|
workspaceId = _ref.workspaceId,
|
|
46
|
+
initialObjectSchemas = _ref.initialObjectSchemas,
|
|
49
47
|
_ref$classNamePrefix = _ref.classNamePrefix,
|
|
50
48
|
classNamePrefix = _ref$classNamePrefix === void 0 ? 'assets-datasource-modal--object-schema-select' : _ref$classNamePrefix;
|
|
51
|
-
var _useState = useState(null),
|
|
52
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
53
|
-
defaultOptions = _useState2[0],
|
|
54
|
-
setDefaultOptions = _useState2[1];
|
|
55
|
-
var _useDatasourceAnalyti = useDatasourceAnalyticsEvents(),
|
|
56
|
-
fireEvent = _useDatasourceAnalyti.fireEvent;
|
|
57
49
|
var _useIntl = useIntl(),
|
|
58
50
|
formatMessage = _useIntl.formatMessage;
|
|
59
51
|
var _useObjectSchemas = useObjectSchemas(workspaceId),
|
|
60
52
|
fetchObjectSchemas = _useObjectSchemas.fetchObjectSchemas,
|
|
61
53
|
objectSchemasLoading = _useObjectSchemas.objectSchemasLoading;
|
|
62
54
|
var selectedObjectSchema = value ? objectSchemaToSelectOption(value) : undefined;
|
|
63
|
-
useEffect(function () {
|
|
64
|
-
var fetchInitialData = /*#__PURE__*/function () {
|
|
65
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
66
|
-
var _yield$fetchObjectSch, objectSchemas, totalObjectSchemas;
|
|
67
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
68
|
-
while (1) switch (_context.prev = _context.next) {
|
|
69
|
-
case 0:
|
|
70
|
-
_context.next = 2;
|
|
71
|
-
return fetchObjectSchemas('');
|
|
72
|
-
case 2:
|
|
73
|
-
_yield$fetchObjectSch = _context.sent;
|
|
74
|
-
objectSchemas = _yield$fetchObjectSch.objectSchemas;
|
|
75
|
-
totalObjectSchemas = _yield$fetchObjectSch.totalObjectSchemas;
|
|
76
|
-
// We only want to send modal ready event once after we've fetched the schema count
|
|
77
|
-
fireEvent('ui.modal.ready.datasource', {
|
|
78
|
-
schemasCount: totalObjectSchemas !== null && totalObjectSchemas !== void 0 ? totalObjectSchemas : 0,
|
|
79
|
-
instancesCount: null
|
|
80
|
-
});
|
|
81
|
-
setDefaultOptions(mapObjectSchemasToOptions(objectSchemas));
|
|
82
|
-
case 7:
|
|
83
|
-
case "end":
|
|
84
|
-
return _context.stop();
|
|
85
|
-
}
|
|
86
|
-
}, _callee);
|
|
87
|
-
}));
|
|
88
|
-
return function fetchInitialData() {
|
|
89
|
-
return _ref2.apply(this, arguments);
|
|
90
|
-
};
|
|
91
|
-
}();
|
|
92
|
-
if (defaultOptions === null) {
|
|
93
|
-
fetchInitialData();
|
|
94
|
-
}
|
|
95
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
96
|
-
}, []);
|
|
97
55
|
var loadOptions = /*#__PURE__*/function () {
|
|
98
|
-
var
|
|
99
|
-
var _yield$
|
|
100
|
-
return _regeneratorRuntime.wrap(function
|
|
101
|
-
while (1) switch (
|
|
56
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(inputValue) {
|
|
57
|
+
var _yield$fetchObjectSch, objectSchemas;
|
|
58
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
59
|
+
while (1) switch (_context.prev = _context.next) {
|
|
102
60
|
case 0:
|
|
103
|
-
|
|
61
|
+
_context.next = 2;
|
|
104
62
|
return fetchObjectSchemas(inputValue);
|
|
105
63
|
case 2:
|
|
106
|
-
_yield$
|
|
107
|
-
objectSchemas = _yield$
|
|
108
|
-
return
|
|
64
|
+
_yield$fetchObjectSch = _context.sent;
|
|
65
|
+
objectSchemas = _yield$fetchObjectSch.objectSchemas;
|
|
66
|
+
return _context.abrupt("return", mapObjectSchemasToOptions(objectSchemas));
|
|
109
67
|
case 5:
|
|
110
68
|
case "end":
|
|
111
|
-
return
|
|
69
|
+
return _context.stop();
|
|
112
70
|
}
|
|
113
|
-
},
|
|
71
|
+
}, _callee);
|
|
114
72
|
}));
|
|
115
73
|
return function loadOptions(_x) {
|
|
116
|
-
return
|
|
74
|
+
return _ref2.apply(this, arguments);
|
|
117
75
|
};
|
|
118
76
|
}();
|
|
119
77
|
var debouncedLoadOptions = debounce(loadOptions, SEARCH_DEBOUNCE_MS);
|
|
@@ -129,16 +87,16 @@ export var AssetsObjectSchemaSelect = function AssetsObjectSchemaSelect(_ref) {
|
|
|
129
87
|
validate: function validate(value) {
|
|
130
88
|
return validateSchema(value);
|
|
131
89
|
}
|
|
132
|
-
}, function (
|
|
133
|
-
var
|
|
134
|
-
_onChange =
|
|
135
|
-
onFocus =
|
|
136
|
-
restFieldProps = _objectWithoutProperties(
|
|
90
|
+
}, function (_ref3) {
|
|
91
|
+
var _ref3$fieldProps = _ref3.fieldProps,
|
|
92
|
+
_onChange = _ref3$fieldProps.onChange,
|
|
93
|
+
onFocus = _ref3$fieldProps.onFocus,
|
|
94
|
+
restFieldProps = _objectWithoutProperties(_ref3$fieldProps, _excluded);
|
|
137
95
|
return jsx(AsyncSelect, _extends({
|
|
138
96
|
autoFocus: true,
|
|
139
97
|
classNamePrefix: classNamePrefix,
|
|
140
98
|
isLoading: objectSchemasLoading,
|
|
141
|
-
defaultOptions:
|
|
99
|
+
defaultOptions: mapObjectSchemasToOptions(initialObjectSchemas),
|
|
142
100
|
isSearchable: true,
|
|
143
101
|
loadOptions: debouncedLoadOptions,
|
|
144
102
|
placeholder: formatMessage(objectSchemaSelectMessages.placeholder),
|
|
@@ -25,8 +25,14 @@ var DateTimeRenderType = function DateTimeRenderType(_ref) {
|
|
|
25
25
|
testId = _ref$testId === void 0 ? DATETIME_TYPE_TEST_ID : _ref$testId,
|
|
26
26
|
_ref$display = _ref.display,
|
|
27
27
|
display = _ref$display === void 0 ? 'datetime' : _ref$display;
|
|
28
|
-
var date = new Date(value);
|
|
29
28
|
var intl = useIntl();
|
|
29
|
+
/* In some cases we get a value of `2023-12-20` which when parsed by JS assumes meantime timezone, causing the date
|
|
30
|
+
to be one day off in some timezones. We want it to display the date without converting timezones and a solution
|
|
31
|
+
is to replace the hyphens with slashes. So it should be 20th Dec regardless of the timezone in this case.
|
|
32
|
+
See https://stackoverflow.com/a/31732581
|
|
33
|
+
*/
|
|
34
|
+
var dateValue = /^\d{4}-\d{2}-\d{2}$/.exec(value) ? value.replace(/-/g, '/') : value;
|
|
35
|
+
var date = new Date(dateValue);
|
|
30
36
|
if (!value || isNaN(date.getTime())) {
|
|
31
37
|
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
32
38
|
}
|
|
@@ -3,7 +3,11 @@ import { AssetsDatasourceParameters } from '../ui/assets-modal/types';
|
|
|
3
3
|
export type UseAssetsClientState = {
|
|
4
4
|
workspaceId: string | undefined;
|
|
5
5
|
workspaceError: Error | undefined;
|
|
6
|
-
|
|
6
|
+
existingObjectSchema: ObjectSchema | undefined;
|
|
7
|
+
existingObjectSchemaError: Error | undefined;
|
|
8
|
+
objectSchemas: ObjectSchema[] | undefined;
|
|
9
|
+
objectSchemasError: Error | undefined;
|
|
10
|
+
totalObjectSchemas: number | undefined;
|
|
7
11
|
assetsClientLoading: boolean;
|
|
8
12
|
};
|
|
9
13
|
export declare const useAssetsClient: (initialParameters?: AssetsDatasourceParameters) => UseAssetsClientState;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const mapFetchErrors: (error: any) => Error;
|
|
2
|
+
export declare const getStatusCodeGroup: (error: Error) => "1xx" | "3xx" | "4xx" | "5xx" | "unknown";
|
|
3
|
+
export declare class PermissionError extends Error {
|
|
4
|
+
constructor(message: string);
|
|
5
|
+
}
|
|
6
|
+
export declare class FetchError extends Error {
|
|
7
|
+
statusCode: number;
|
|
8
|
+
constructor(statusCode: number, message?: string);
|
|
9
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsx } from '@emotion/react';
|
|
2
2
|
import { DatasourceDataResponseItem, DatasourceResponseSchemaProperty, DatasourceTableStatusType } from '@atlaskit/linking-types';
|
|
3
3
|
export interface RenderAssetsContentProps {
|
|
4
|
+
isFetchingInitialData: boolean;
|
|
4
5
|
status: DatasourceTableStatusType;
|
|
5
6
|
responseItems: DatasourceDataResponseItem[];
|
|
6
7
|
visibleColumnKeys?: string[];
|
|
@@ -15,4 +16,4 @@ export interface RenderAssetsContentProps {
|
|
|
15
16
|
onVisibleColumnKeysChange: (visibleColumnKeys: string[]) => void;
|
|
16
17
|
modalRenderInstanceId: string;
|
|
17
18
|
}
|
|
18
|
-
export declare const RenderAssetsContent: (props: RenderAssetsContentProps) => JSX.Element;
|
|
19
|
+
export declare const RenderAssetsContent: (props: RenderAssetsContentProps) => jsx.JSX.Element;
|
|
@@ -4,6 +4,7 @@ import { ObjectSchema } from '../../../../types/assets/types';
|
|
|
4
4
|
type AssetsObjectSchemaSelectProps = {
|
|
5
5
|
value: ObjectSchema | undefined;
|
|
6
6
|
workspaceId: string;
|
|
7
|
+
initialObjectSchemas: ObjectSchema[] | undefined;
|
|
7
8
|
classNamePrefix?: string;
|
|
8
9
|
};
|
|
9
10
|
export declare const SEARCH_DEBOUNCE_MS = 350;
|
|
@@ -17,5 +18,5 @@ export declare const selectInAModalStyleFixProps: {
|
|
|
17
18
|
};
|
|
18
19
|
menuPortalTarget: HTMLElement;
|
|
19
20
|
};
|
|
20
|
-
export declare const AssetsObjectSchemaSelect: ({ value, workspaceId, classNamePrefix, }: AssetsObjectSchemaSelectProps) => jsx.JSX.Element;
|
|
21
|
+
export declare const AssetsObjectSchemaSelect: ({ value, workspaceId, initialObjectSchemas, classNamePrefix, }: AssetsObjectSchemaSelectProps) => jsx.JSX.Element;
|
|
21
22
|
export {};
|
|
@@ -3,7 +3,11 @@ import { AssetsDatasourceParameters } from '../ui/assets-modal/types';
|
|
|
3
3
|
export type UseAssetsClientState = {
|
|
4
4
|
workspaceId: string | undefined;
|
|
5
5
|
workspaceError: Error | undefined;
|
|
6
|
-
|
|
6
|
+
existingObjectSchema: ObjectSchema | undefined;
|
|
7
|
+
existingObjectSchemaError: Error | undefined;
|
|
8
|
+
objectSchemas: ObjectSchema[] | undefined;
|
|
9
|
+
objectSchemasError: Error | undefined;
|
|
10
|
+
totalObjectSchemas: number | undefined;
|
|
7
11
|
assetsClientLoading: boolean;
|
|
8
12
|
};
|
|
9
13
|
export declare const useAssetsClient: (initialParameters?: AssetsDatasourceParameters) => UseAssetsClientState;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const mapFetchErrors: (error: any) => Error;
|
|
2
|
+
export declare const getStatusCodeGroup: (error: Error) => "1xx" | "3xx" | "4xx" | "5xx" | "unknown";
|
|
3
|
+
export declare class PermissionError extends Error {
|
|
4
|
+
constructor(message: string);
|
|
5
|
+
}
|
|
6
|
+
export declare class FetchError extends Error {
|
|
7
|
+
statusCode: number;
|
|
8
|
+
constructor(statusCode: number, message?: string);
|
|
9
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsx } from '@emotion/react';
|
|
2
2
|
import { DatasourceDataResponseItem, DatasourceResponseSchemaProperty, DatasourceTableStatusType } from '@atlaskit/linking-types';
|
|
3
3
|
export interface RenderAssetsContentProps {
|
|
4
|
+
isFetchingInitialData: boolean;
|
|
4
5
|
status: DatasourceTableStatusType;
|
|
5
6
|
responseItems: DatasourceDataResponseItem[];
|
|
6
7
|
visibleColumnKeys?: string[];
|
|
@@ -15,4 +16,4 @@ export interface RenderAssetsContentProps {
|
|
|
15
16
|
onVisibleColumnKeysChange: (visibleColumnKeys: string[]) => void;
|
|
16
17
|
modalRenderInstanceId: string;
|
|
17
18
|
}
|
|
18
|
-
export declare const RenderAssetsContent: (props: RenderAssetsContentProps) => JSX.Element;
|
|
19
|
+
export declare const RenderAssetsContent: (props: RenderAssetsContentProps) => jsx.JSX.Element;
|
|
@@ -4,6 +4,7 @@ import { ObjectSchema } from '../../../../types/assets/types';
|
|
|
4
4
|
type AssetsObjectSchemaSelectProps = {
|
|
5
5
|
value: ObjectSchema | undefined;
|
|
6
6
|
workspaceId: string;
|
|
7
|
+
initialObjectSchemas: ObjectSchema[] | undefined;
|
|
7
8
|
classNamePrefix?: string;
|
|
8
9
|
};
|
|
9
10
|
export declare const SEARCH_DEBOUNCE_MS = 350;
|
|
@@ -17,5 +18,5 @@ export declare const selectInAModalStyleFixProps: {
|
|
|
17
18
|
};
|
|
18
19
|
menuPortalTarget: HTMLElement;
|
|
19
20
|
};
|
|
20
|
-
export declare const AssetsObjectSchemaSelect: ({ value, workspaceId, classNamePrefix, }: AssetsObjectSchemaSelectProps) => jsx.JSX.Element;
|
|
21
|
+
export declare const AssetsObjectSchemaSelect: ({ value, workspaceId, initialObjectSchemas, classNamePrefix, }: AssetsObjectSchemaSelectProps) => jsx.JSX.Element;
|
|
21
22
|
export {};
|