@atlaskit/link-datasource 0.27.4 → 0.28.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 +14 -0
- package/dist/cjs/index.js +13 -0
- package/dist/cjs/ui/assets-modal/index.js +31 -0
- package/dist/cjs/ui/assets-modal/modal/index.js +68 -0
- package/dist/cjs/ui/assets-modal/modal/messages.js +20 -0
- package/dist/cjs/ui/assets-modal/modal/render-assets-content/index.js +27 -0
- package/dist/cjs/ui/assets-modal/modal/styled.js +12 -0
- package/dist/cjs/ui/assets-modal/types.js +5 -0
- package/dist/cjs/ui/common/error-state/modal-loading-error.js +2 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/index.js +3 -1
- package/dist/es2019/ui/assets-modal/index.js +13 -0
- package/dist/es2019/ui/assets-modal/modal/index.js +52 -0
- package/dist/es2019/ui/assets-modal/modal/messages.js +13 -0
- package/dist/es2019/ui/assets-modal/modal/render-assets-content/index.js +21 -0
- package/dist/es2019/ui/assets-modal/modal/styled.js +6 -0
- package/dist/es2019/ui/assets-modal/types.js +1 -0
- package/dist/es2019/ui/common/error-state/modal-loading-error.js +2 -2
- package/dist/es2019/version.json +1 -1
- package/dist/esm/index.js +3 -1
- package/dist/esm/ui/assets-modal/index.js +17 -0
- package/dist/esm/ui/assets-modal/modal/index.js +56 -0
- package/dist/esm/ui/assets-modal/modal/messages.js +13 -0
- package/dist/esm/ui/assets-modal/modal/render-assets-content/index.js +19 -0
- package/dist/esm/ui/assets-modal/modal/styled.js +4 -0
- package/dist/esm/ui/assets-modal/types.js +1 -0
- package/dist/esm/ui/common/error-state/modal-loading-error.js +2 -2
- package/dist/esm/version.json +1 -1
- package/dist/types/index.d.ts +3 -0
- package/dist/types/ui/assets-modal/index.d.ts +5 -0
- package/dist/types/ui/assets-modal/modal/index.d.ts +3 -0
- package/dist/types/ui/assets-modal/modal/messages.d.ts +12 -0
- package/dist/types/ui/assets-modal/modal/render-assets-content/index.d.ts +8 -0
- package/dist/types/ui/assets-modal/modal/styled.d.ts +5 -0
- package/dist/types/ui/assets-modal/types.d.ts +23 -0
- package/dist/types/ui/common/error-state/modal-loading-error.d.ts +1 -1
- package/dist/types-ts4.5/index.d.ts +3 -0
- package/dist/types-ts4.5/ui/assets-modal/index.d.ts +5 -0
- package/dist/types-ts4.5/ui/assets-modal/modal/index.d.ts +3 -0
- package/dist/types-ts4.5/ui/assets-modal/modal/messages.d.ts +12 -0
- package/dist/types-ts4.5/ui/assets-modal/modal/render-assets-content/index.d.ts +8 -0
- package/dist/types-ts4.5/ui/assets-modal/modal/styled.d.ts +5 -0
- package/dist/types-ts4.5/ui/assets-modal/types.d.ts +23 -0
- package/dist/types-ts4.5/ui/common/error-state/modal-loading-error.d.ts +1 -1
- package/package.json +3 -2
- package/report.api.md +46 -0
- package/tmp/api-report-tmp.d.ts +143 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/link-datasource
|
|
2
2
|
|
|
3
|
+
## 0.28.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`1c595c5a9d1`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1c595c5a9d1) - Added assets modal to link-datasource, which includes the following API additions:
|
|
8
|
+
|
|
9
|
+
- datasource ID for assets: `ASSETS_LIST_OF_LINKS_DATASOURCE_ID`
|
|
10
|
+
- new component: `JSMAssetsConfigModal`
|
|
11
|
+
- addition of 2 new types: `AssetsDatasourceAdf` and `AssetsDatasourceParameters`
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 0.27.4
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/cjs/index.js
CHANGED
|
@@ -5,6 +5,12 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
+
Object.defineProperty(exports, "ASSETS_LIST_OF_LINKS_DATASOURCE_ID", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function get() {
|
|
11
|
+
return _assetsModal.ASSETS_LIST_OF_LINKS_DATASOURCE_ID;
|
|
12
|
+
}
|
|
13
|
+
});
|
|
8
14
|
Object.defineProperty(exports, "DatasourceTableView", {
|
|
9
15
|
enumerable: true,
|
|
10
16
|
get: function get() {
|
|
@@ -17,6 +23,12 @@ Object.defineProperty(exports, "JIRA_LIST_OF_LINKS_DATASOURCE_ID", {
|
|
|
17
23
|
return _jiraIssuesModal.JIRA_LIST_OF_LINKS_DATASOURCE_ID;
|
|
18
24
|
}
|
|
19
25
|
});
|
|
26
|
+
Object.defineProperty(exports, "JSMAssetsConfigModal", {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
get: function get() {
|
|
29
|
+
return _assetsModal.default;
|
|
30
|
+
}
|
|
31
|
+
});
|
|
20
32
|
Object.defineProperty(exports, "JiraIssuesConfigModal", {
|
|
21
33
|
enumerable: true,
|
|
22
34
|
get: function get() {
|
|
@@ -25,5 +37,6 @@ Object.defineProperty(exports, "JiraIssuesConfigModal", {
|
|
|
25
37
|
});
|
|
26
38
|
var _jiraIssuesModal = _interopRequireWildcard(require("./ui/jira-issues-modal"));
|
|
27
39
|
var _datasourceTableView = _interopRequireDefault(require("./ui/datasource-table-view"));
|
|
40
|
+
var _assetsModal = _interopRequireWildcard(require("./ui/assets-modal"));
|
|
28
41
|
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); }
|
|
29
42
|
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; }
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = exports.ASSETS_LIST_OF_LINKS_DATASOURCE_ID = void 0;
|
|
8
|
+
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
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); }
|
|
11
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || (0, _typeof2.default)(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; }
|
|
12
|
+
var ASSETS_LIST_OF_LINKS_DATASOURCE_ID = '361d618a-3c04-40ad-9b27-3c8ea6927020';
|
|
13
|
+
exports.ASSETS_LIST_OF_LINKS_DATASOURCE_ID = ASSETS_LIST_OF_LINKS_DATASOURCE_ID;
|
|
14
|
+
var LazyAssetsConfigModal = /*#__PURE__*/(0, _react.lazy)(function () {
|
|
15
|
+
return Promise.resolve().then(function () {
|
|
16
|
+
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_linkdatasource-assetsmodal" */'./modal'));
|
|
17
|
+
}).then(function (module) {
|
|
18
|
+
return {
|
|
19
|
+
default: module.AssetsConfigModal
|
|
20
|
+
};
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
var AssetsConfigModalWithWrappers = function AssetsConfigModalWithWrappers(props) {
|
|
24
|
+
return /*#__PURE__*/_react.default.createElement(_react.Suspense, {
|
|
25
|
+
fallback: /*#__PURE__*/_react.default.createElement("div", {
|
|
26
|
+
"data-testid": 'assets-aql-datasource-table-suspense'
|
|
27
|
+
})
|
|
28
|
+
}, /*#__PURE__*/_react.default.createElement(LazyAssetsConfigModal, props));
|
|
29
|
+
};
|
|
30
|
+
var _default = AssetsConfigModalWithWrappers;
|
|
31
|
+
exports.default = _default;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.AssetsConfigModal = void 0;
|
|
9
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
|
+
var _react = require("react");
|
|
11
|
+
var _react2 = require("@emotion/react");
|
|
12
|
+
var _reactIntlNext = require("react-intl-next");
|
|
13
|
+
var _standardButton = _interopRequireDefault(require("@atlaskit/button/standard-button"));
|
|
14
|
+
var _modalDialog = _interopRequireWildcard(require("@atlaskit/modal-dialog"));
|
|
15
|
+
var _useDatasourceTableState = require("../../../hooks/useDatasourceTableState");
|
|
16
|
+
var _messages = require("./messages");
|
|
17
|
+
var _renderAssetsContent = require("./render-assets-content");
|
|
18
|
+
var _styled = require("./styled");
|
|
19
|
+
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); }
|
|
20
|
+
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; }
|
|
21
|
+
/** @jsx jsx */
|
|
22
|
+
|
|
23
|
+
var AssetsConfigModal = function AssetsConfigModal(props) {
|
|
24
|
+
var datasourceId = props.datasourceId,
|
|
25
|
+
initialParameters = props.parameters,
|
|
26
|
+
onCancel = props.onCancel;
|
|
27
|
+
var _useState = (0, _react.useState)(initialParameters === null || initialParameters === void 0 ? void 0 : initialParameters.aql),
|
|
28
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 1),
|
|
29
|
+
aql = _useState2[0];
|
|
30
|
+
var _useState3 = (0, _react.useState)(initialParameters === null || initialParameters === void 0 ? void 0 : initialParameters.schemaId),
|
|
31
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 1),
|
|
32
|
+
schemaId = _useState4[0];
|
|
33
|
+
var parameters = (0, _react.useMemo)(function () {
|
|
34
|
+
return {
|
|
35
|
+
aql: aql || '',
|
|
36
|
+
schemaId: schemaId || '',
|
|
37
|
+
workspaceId: '' /* TODO FLY-1240: Add workspace Id */
|
|
38
|
+
};
|
|
39
|
+
}, [aql, schemaId]);
|
|
40
|
+
var _useDatasourceTableSt = (0, _useDatasourceTableState.useDatasourceTableState)({
|
|
41
|
+
datasourceId: datasourceId,
|
|
42
|
+
parameters: parameters
|
|
43
|
+
}),
|
|
44
|
+
status = _useDatasourceTableSt.status,
|
|
45
|
+
responseItems = _useDatasourceTableSt.responseItems;
|
|
46
|
+
var isDisabled = status === 'rejected' || status === 'loading' || status === 'empty' || status === 'resolved' && !responseItems.length;
|
|
47
|
+
var onInsertPressed = (0, _react.useCallback)(function () {
|
|
48
|
+
/* Placeholder for inserting of ADF, to do in FLY-1241 */
|
|
49
|
+
}, []);
|
|
50
|
+
return (0, _react2.jsx)(_modalDialog.ModalTransition, null, (0, _react2.jsx)(_modalDialog.default, {
|
|
51
|
+
testId: 'asset-datasource-modal',
|
|
52
|
+
onClose: onCancel,
|
|
53
|
+
width: "x-large",
|
|
54
|
+
shouldScrollInViewport: true
|
|
55
|
+
}, (0, _react2.jsx)(_modalDialog.ModalHeader, null, (0, _react2.jsx)(_modalDialog.ModalTitle, null)), (0, _react2.jsx)(_modalDialog.ModalBody, null, (0, _react2.jsx)(_styled.ModalContentContainer, null, (0, _react2.jsx)(_renderAssetsContent.RenderAssetsContent, {
|
|
56
|
+
status: status,
|
|
57
|
+
responseItems: responseItems
|
|
58
|
+
}))), (0, _react2.jsx)(_modalDialog.ModalFooter, null, (0, _react2.jsx)(_standardButton.default, {
|
|
59
|
+
appearance: "default",
|
|
60
|
+
onClick: onCancel
|
|
61
|
+
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _messages.modalMessages.cancelButtonText)), (0, _react2.jsx)(_standardButton.default, {
|
|
62
|
+
appearance: "primary",
|
|
63
|
+
onClick: onInsertPressed,
|
|
64
|
+
isDisabled: isDisabled,
|
|
65
|
+
testId: 'asset-datasource-modal--insert-button'
|
|
66
|
+
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _messages.modalMessages.insertIssuesButtonText)))));
|
|
67
|
+
};
|
|
68
|
+
exports.AssetsConfigModal = AssetsConfigModal;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.modalMessages = void 0;
|
|
7
|
+
var _reactIntlNext = require("react-intl-next");
|
|
8
|
+
var modalMessages = (0, _reactIntlNext.defineMessages)({
|
|
9
|
+
cancelButtonText: {
|
|
10
|
+
id: 'linkDataSource.assets.configmodal.cancelButtonText',
|
|
11
|
+
description: 'Button text to close the modal with no changes being made',
|
|
12
|
+
defaultMessage: 'Cancel'
|
|
13
|
+
},
|
|
14
|
+
insertIssuesButtonText: {
|
|
15
|
+
id: 'linkDataSource.assets.configmodal.insertIssuesButtonText',
|
|
16
|
+
description: 'Button text to insert the displayed content',
|
|
17
|
+
defaultMessage: 'Insert objects'
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
exports.modalMessages = modalMessages;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.RenderAssetsContent = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _modalLoadingError = require("../../../common/error-state/modal-loading-error");
|
|
10
|
+
var _noResults = require("../../../common/error-state/no-results");
|
|
11
|
+
var _issueLikeTable = require("../../../issue-like-table");
|
|
12
|
+
var RenderAssetsContent = function RenderAssetsContent(props) {
|
|
13
|
+
var status = props.status,
|
|
14
|
+
responseItems = props.responseItems;
|
|
15
|
+
var resolvedWithNoResults = status === 'resolved' && !responseItems.length;
|
|
16
|
+
if (status === 'rejected') {
|
|
17
|
+
return /*#__PURE__*/_react.default.createElement(_modalLoadingError.ModalLoadingError, null);
|
|
18
|
+
} else if (resolvedWithNoResults) {
|
|
19
|
+
return /*#__PURE__*/_react.default.createElement(_noResults.NoResults, null);
|
|
20
|
+
} else if (status === 'empty') {
|
|
21
|
+
return /*#__PURE__*/_react.default.createElement(_issueLikeTable.EmptyState, {
|
|
22
|
+
testId: "assets-aql-datasource-modal--empty-state"
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
return /*#__PURE__*/_react.default.createElement("p", null, "TODO add IssueLikeDataTableView component.");
|
|
26
|
+
};
|
|
27
|
+
exports.RenderAssetsContent = RenderAssetsContent;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.ModalContentContainer = void 0;
|
|
8
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
|
+
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
10
|
+
var _templateObject;
|
|
11
|
+
var ModalContentContainer = _styled.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: 'grid';\n height: '420px';\n overflow: 'auto';\n"])));
|
|
12
|
+
exports.ModalContentContainer = ModalContentContainer;
|
|
@@ -41,7 +41,7 @@ var ModalLoadingError = function ModalLoadingError(_ref) {
|
|
|
41
41
|
css: errorMessageStyles
|
|
42
42
|
}, (0, _react.jsx)(_reactIntlNext.FormattedMessage, _messages.loadingErrorMessages.unableToLoadResults)), (0, _react.jsx)("p", {
|
|
43
43
|
css: errorDescriptionStyles
|
|
44
|
-
}, (0, _react.jsx)(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, _messages.loadingErrorMessages.checkConnectionWithSource, {
|
|
44
|
+
}, url ? (0, _react.jsx)(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, _messages.loadingErrorMessages.checkConnectionWithSource, {
|
|
45
45
|
values: {
|
|
46
46
|
a: function a(chunk) {
|
|
47
47
|
return (0, _react.jsx)("a", {
|
|
@@ -49,6 +49,6 @@ var ModalLoadingError = function ModalLoadingError(_ref) {
|
|
|
49
49
|
}, chunk);
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
})))));
|
|
52
|
+
})) : (0, _react.jsx)(_reactIntlNext.FormattedMessage, _messages.loadingErrorMessages.checkConnection))));
|
|
53
53
|
};
|
|
54
54
|
exports.ModalLoadingError = ModalLoadingError;
|
package/dist/cjs/version.json
CHANGED
package/dist/es2019/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export { default as JiraIssuesConfigModal } from './ui/jira-issues-modal';
|
|
2
2
|
export { default as DatasourceTableView } from './ui/datasource-table-view';
|
|
3
|
-
export {
|
|
3
|
+
export { default as JSMAssetsConfigModal } from './ui/assets-modal';
|
|
4
|
+
export { JIRA_LIST_OF_LINKS_DATASOURCE_ID } from './ui/jira-issues-modal';
|
|
5
|
+
export { ASSETS_LIST_OF_LINKS_DATASOURCE_ID } from './ui/assets-modal';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React, { lazy, Suspense } from 'react';
|
|
2
|
+
export const ASSETS_LIST_OF_LINKS_DATASOURCE_ID = '361d618a-3c04-40ad-9b27-3c8ea6927020';
|
|
3
|
+
const LazyAssetsConfigModal = /*#__PURE__*/lazy(() => import( /* webpackChunkName: "@atlaskit-internal_linkdatasource-assetsmodal" */'./modal').then(module => ({
|
|
4
|
+
default: module.AssetsConfigModal
|
|
5
|
+
})));
|
|
6
|
+
const AssetsConfigModalWithWrappers = props => {
|
|
7
|
+
return /*#__PURE__*/React.createElement(Suspense, {
|
|
8
|
+
fallback: /*#__PURE__*/React.createElement("div", {
|
|
9
|
+
"data-testid": 'assets-aql-datasource-table-suspense'
|
|
10
|
+
})
|
|
11
|
+
}, /*#__PURE__*/React.createElement(LazyAssetsConfigModal, props));
|
|
12
|
+
};
|
|
13
|
+
export default AssetsConfigModalWithWrappers;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { useCallback, useMemo, useState } from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
import { FormattedMessage } from 'react-intl-next';
|
|
5
|
+
import Button from '@atlaskit/button/standard-button';
|
|
6
|
+
import Modal, { ModalBody, ModalFooter, ModalHeader, ModalTitle, ModalTransition } from '@atlaskit/modal-dialog';
|
|
7
|
+
import { useDatasourceTableState } from '../../../hooks/useDatasourceTableState';
|
|
8
|
+
import { modalMessages } from './messages';
|
|
9
|
+
import { RenderAssetsContent } from './render-assets-content';
|
|
10
|
+
import { ModalContentContainer } from './styled';
|
|
11
|
+
export const AssetsConfigModal = props => {
|
|
12
|
+
const {
|
|
13
|
+
datasourceId,
|
|
14
|
+
parameters: initialParameters,
|
|
15
|
+
onCancel
|
|
16
|
+
} = props;
|
|
17
|
+
const [aql] = useState(initialParameters === null || initialParameters === void 0 ? void 0 : initialParameters.aql);
|
|
18
|
+
const [schemaId] = useState(initialParameters === null || initialParameters === void 0 ? void 0 : initialParameters.schemaId);
|
|
19
|
+
const parameters = useMemo(() => ({
|
|
20
|
+
aql: aql || '',
|
|
21
|
+
schemaId: schemaId || '',
|
|
22
|
+
workspaceId: '' /* TODO FLY-1240: Add workspace Id */
|
|
23
|
+
}), [aql, schemaId]);
|
|
24
|
+
const {
|
|
25
|
+
status,
|
|
26
|
+
responseItems
|
|
27
|
+
} = useDatasourceTableState({
|
|
28
|
+
datasourceId,
|
|
29
|
+
parameters
|
|
30
|
+
});
|
|
31
|
+
const isDisabled = status === 'rejected' || status === 'loading' || status === 'empty' || status === 'resolved' && !responseItems.length;
|
|
32
|
+
const onInsertPressed = useCallback(() => {
|
|
33
|
+
/* Placeholder for inserting of ADF, to do in FLY-1241 */
|
|
34
|
+
}, []);
|
|
35
|
+
return jsx(ModalTransition, null, jsx(Modal, {
|
|
36
|
+
testId: 'asset-datasource-modal',
|
|
37
|
+
onClose: onCancel,
|
|
38
|
+
width: "x-large",
|
|
39
|
+
shouldScrollInViewport: true
|
|
40
|
+
}, jsx(ModalHeader, null, jsx(ModalTitle, null)), jsx(ModalBody, null, jsx(ModalContentContainer, null, jsx(RenderAssetsContent, {
|
|
41
|
+
status: status,
|
|
42
|
+
responseItems: responseItems
|
|
43
|
+
}))), jsx(ModalFooter, null, jsx(Button, {
|
|
44
|
+
appearance: "default",
|
|
45
|
+
onClick: onCancel
|
|
46
|
+
}, jsx(FormattedMessage, modalMessages.cancelButtonText)), jsx(Button, {
|
|
47
|
+
appearance: "primary",
|
|
48
|
+
onClick: onInsertPressed,
|
|
49
|
+
isDisabled: isDisabled,
|
|
50
|
+
testId: 'asset-datasource-modal--insert-button'
|
|
51
|
+
}, jsx(FormattedMessage, modalMessages.insertIssuesButtonText)))));
|
|
52
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineMessages } from 'react-intl-next';
|
|
2
|
+
export const modalMessages = defineMessages({
|
|
3
|
+
cancelButtonText: {
|
|
4
|
+
id: 'linkDataSource.assets.configmodal.cancelButtonText',
|
|
5
|
+
description: 'Button text to close the modal with no changes being made',
|
|
6
|
+
defaultMessage: 'Cancel'
|
|
7
|
+
},
|
|
8
|
+
insertIssuesButtonText: {
|
|
9
|
+
id: 'linkDataSource.assets.configmodal.insertIssuesButtonText',
|
|
10
|
+
description: 'Button text to insert the displayed content',
|
|
11
|
+
defaultMessage: 'Insert objects'
|
|
12
|
+
}
|
|
13
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ModalLoadingError } from '../../../common/error-state/modal-loading-error';
|
|
3
|
+
import { NoResults } from '../../../common/error-state/no-results';
|
|
4
|
+
import { EmptyState } from '../../../issue-like-table';
|
|
5
|
+
export const RenderAssetsContent = props => {
|
|
6
|
+
const {
|
|
7
|
+
status,
|
|
8
|
+
responseItems
|
|
9
|
+
} = props;
|
|
10
|
+
const resolvedWithNoResults = status === 'resolved' && !responseItems.length;
|
|
11
|
+
if (status === 'rejected') {
|
|
12
|
+
return /*#__PURE__*/React.createElement(ModalLoadingError, null);
|
|
13
|
+
} else if (resolvedWithNoResults) {
|
|
14
|
+
return /*#__PURE__*/React.createElement(NoResults, null);
|
|
15
|
+
} else if (status === 'empty') {
|
|
16
|
+
return /*#__PURE__*/React.createElement(EmptyState, {
|
|
17
|
+
testId: "assets-aql-datasource-modal--empty-state"
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return /*#__PURE__*/React.createElement("p", null, "TODO add IssueLikeDataTableView component.");
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -34,11 +34,11 @@ export const ModalLoadingError = ({
|
|
|
34
34
|
css: errorMessageStyles
|
|
35
35
|
}, jsx(FormattedMessage, loadingErrorMessages.unableToLoadResults)), jsx("p", {
|
|
36
36
|
css: errorDescriptionStyles
|
|
37
|
-
}, jsx(FormattedMessage, _extends({}, loadingErrorMessages.checkConnectionWithSource, {
|
|
37
|
+
}, url ? jsx(FormattedMessage, _extends({}, loadingErrorMessages.checkConnectionWithSource, {
|
|
38
38
|
values: {
|
|
39
39
|
a: chunk => jsx("a", {
|
|
40
40
|
href: url
|
|
41
41
|
}, chunk)
|
|
42
42
|
}
|
|
43
|
-
})))));
|
|
43
|
+
})) : jsx(FormattedMessage, loadingErrorMessages.checkConnection))));
|
|
44
44
|
};
|
package/dist/es2019/version.json
CHANGED
package/dist/esm/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export { default as JiraIssuesConfigModal } from './ui/jira-issues-modal';
|
|
2
2
|
export { default as DatasourceTableView } from './ui/datasource-table-view';
|
|
3
|
-
export {
|
|
3
|
+
export { default as JSMAssetsConfigModal } from './ui/assets-modal';
|
|
4
|
+
export { JIRA_LIST_OF_LINKS_DATASOURCE_ID } from './ui/jira-issues-modal';
|
|
5
|
+
export { ASSETS_LIST_OF_LINKS_DATASOURCE_ID } from './ui/assets-modal';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React, { lazy, Suspense } from 'react';
|
|
2
|
+
export var ASSETS_LIST_OF_LINKS_DATASOURCE_ID = '361d618a-3c04-40ad-9b27-3c8ea6927020';
|
|
3
|
+
var LazyAssetsConfigModal = /*#__PURE__*/lazy(function () {
|
|
4
|
+
return import( /* webpackChunkName: "@atlaskit-internal_linkdatasource-assetsmodal" */'./modal').then(function (module) {
|
|
5
|
+
return {
|
|
6
|
+
default: module.AssetsConfigModal
|
|
7
|
+
};
|
|
8
|
+
});
|
|
9
|
+
});
|
|
10
|
+
var AssetsConfigModalWithWrappers = function AssetsConfigModalWithWrappers(props) {
|
|
11
|
+
return /*#__PURE__*/React.createElement(Suspense, {
|
|
12
|
+
fallback: /*#__PURE__*/React.createElement("div", {
|
|
13
|
+
"data-testid": 'assets-aql-datasource-table-suspense'
|
|
14
|
+
})
|
|
15
|
+
}, /*#__PURE__*/React.createElement(LazyAssetsConfigModal, props));
|
|
16
|
+
};
|
|
17
|
+
export default AssetsConfigModalWithWrappers;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
+
/** @jsx jsx */
|
|
3
|
+
import { useCallback, useMemo, useState } from 'react';
|
|
4
|
+
import { jsx } from '@emotion/react';
|
|
5
|
+
import { FormattedMessage } from 'react-intl-next';
|
|
6
|
+
import Button from '@atlaskit/button/standard-button';
|
|
7
|
+
import Modal, { ModalBody, ModalFooter, ModalHeader, ModalTitle, ModalTransition } from '@atlaskit/modal-dialog';
|
|
8
|
+
import { useDatasourceTableState } from '../../../hooks/useDatasourceTableState';
|
|
9
|
+
import { modalMessages } from './messages';
|
|
10
|
+
import { RenderAssetsContent } from './render-assets-content';
|
|
11
|
+
import { ModalContentContainer } from './styled';
|
|
12
|
+
export var AssetsConfigModal = function AssetsConfigModal(props) {
|
|
13
|
+
var datasourceId = props.datasourceId,
|
|
14
|
+
initialParameters = props.parameters,
|
|
15
|
+
onCancel = props.onCancel;
|
|
16
|
+
var _useState = useState(initialParameters === null || initialParameters === void 0 ? void 0 : initialParameters.aql),
|
|
17
|
+
_useState2 = _slicedToArray(_useState, 1),
|
|
18
|
+
aql = _useState2[0];
|
|
19
|
+
var _useState3 = useState(initialParameters === null || initialParameters === void 0 ? void 0 : initialParameters.schemaId),
|
|
20
|
+
_useState4 = _slicedToArray(_useState3, 1),
|
|
21
|
+
schemaId = _useState4[0];
|
|
22
|
+
var parameters = useMemo(function () {
|
|
23
|
+
return {
|
|
24
|
+
aql: aql || '',
|
|
25
|
+
schemaId: schemaId || '',
|
|
26
|
+
workspaceId: '' /* TODO FLY-1240: Add workspace Id */
|
|
27
|
+
};
|
|
28
|
+
}, [aql, schemaId]);
|
|
29
|
+
var _useDatasourceTableSt = useDatasourceTableState({
|
|
30
|
+
datasourceId: datasourceId,
|
|
31
|
+
parameters: parameters
|
|
32
|
+
}),
|
|
33
|
+
status = _useDatasourceTableSt.status,
|
|
34
|
+
responseItems = _useDatasourceTableSt.responseItems;
|
|
35
|
+
var isDisabled = status === 'rejected' || status === 'loading' || status === 'empty' || status === 'resolved' && !responseItems.length;
|
|
36
|
+
var onInsertPressed = useCallback(function () {
|
|
37
|
+
/* Placeholder for inserting of ADF, to do in FLY-1241 */
|
|
38
|
+
}, []);
|
|
39
|
+
return jsx(ModalTransition, null, jsx(Modal, {
|
|
40
|
+
testId: 'asset-datasource-modal',
|
|
41
|
+
onClose: onCancel,
|
|
42
|
+
width: "x-large",
|
|
43
|
+
shouldScrollInViewport: true
|
|
44
|
+
}, jsx(ModalHeader, null, jsx(ModalTitle, null)), jsx(ModalBody, null, jsx(ModalContentContainer, null, jsx(RenderAssetsContent, {
|
|
45
|
+
status: status,
|
|
46
|
+
responseItems: responseItems
|
|
47
|
+
}))), jsx(ModalFooter, null, jsx(Button, {
|
|
48
|
+
appearance: "default",
|
|
49
|
+
onClick: onCancel
|
|
50
|
+
}, jsx(FormattedMessage, modalMessages.cancelButtonText)), jsx(Button, {
|
|
51
|
+
appearance: "primary",
|
|
52
|
+
onClick: onInsertPressed,
|
|
53
|
+
isDisabled: isDisabled,
|
|
54
|
+
testId: 'asset-datasource-modal--insert-button'
|
|
55
|
+
}, jsx(FormattedMessage, modalMessages.insertIssuesButtonText)))));
|
|
56
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineMessages } from 'react-intl-next';
|
|
2
|
+
export var modalMessages = defineMessages({
|
|
3
|
+
cancelButtonText: {
|
|
4
|
+
id: 'linkDataSource.assets.configmodal.cancelButtonText',
|
|
5
|
+
description: 'Button text to close the modal with no changes being made',
|
|
6
|
+
defaultMessage: 'Cancel'
|
|
7
|
+
},
|
|
8
|
+
insertIssuesButtonText: {
|
|
9
|
+
id: 'linkDataSource.assets.configmodal.insertIssuesButtonText',
|
|
10
|
+
description: 'Button text to insert the displayed content',
|
|
11
|
+
defaultMessage: 'Insert objects'
|
|
12
|
+
}
|
|
13
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ModalLoadingError } from '../../../common/error-state/modal-loading-error';
|
|
3
|
+
import { NoResults } from '../../../common/error-state/no-results';
|
|
4
|
+
import { EmptyState } from '../../../issue-like-table';
|
|
5
|
+
export var RenderAssetsContent = function RenderAssetsContent(props) {
|
|
6
|
+
var status = props.status,
|
|
7
|
+
responseItems = props.responseItems;
|
|
8
|
+
var resolvedWithNoResults = status === 'resolved' && !responseItems.length;
|
|
9
|
+
if (status === 'rejected') {
|
|
10
|
+
return /*#__PURE__*/React.createElement(ModalLoadingError, null);
|
|
11
|
+
} else if (resolvedWithNoResults) {
|
|
12
|
+
return /*#__PURE__*/React.createElement(NoResults, null);
|
|
13
|
+
} else if (status === 'empty') {
|
|
14
|
+
return /*#__PURE__*/React.createElement(EmptyState, {
|
|
15
|
+
testId: "assets-aql-datasource-modal--empty-state"
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return /*#__PURE__*/React.createElement("p", null, "TODO add IssueLikeDataTableView component.");
|
|
19
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
+
var _templateObject;
|
|
3
|
+
import styled from '@emotion/styled';
|
|
4
|
+
export var ModalContentContainer = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: 'grid';\n height: '420px';\n overflow: 'auto';\n"])));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -33,7 +33,7 @@ export var ModalLoadingError = function ModalLoadingError(_ref) {
|
|
|
33
33
|
css: errorMessageStyles
|
|
34
34
|
}, jsx(FormattedMessage, loadingErrorMessages.unableToLoadResults)), jsx("p", {
|
|
35
35
|
css: errorDescriptionStyles
|
|
36
|
-
}, jsx(FormattedMessage, _extends({}, loadingErrorMessages.checkConnectionWithSource, {
|
|
36
|
+
}, url ? jsx(FormattedMessage, _extends({}, loadingErrorMessages.checkConnectionWithSource, {
|
|
37
37
|
values: {
|
|
38
38
|
a: function a(chunk) {
|
|
39
39
|
return jsx("a", {
|
|
@@ -41,5 +41,5 @@ export var ModalLoadingError = function ModalLoadingError(_ref) {
|
|
|
41
41
|
}, chunk);
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
})))));
|
|
44
|
+
})) : jsx(FormattedMessage, loadingErrorMessages.checkConnection))));
|
|
45
45
|
};
|
package/dist/esm/version.json
CHANGED
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export { default as JiraIssuesConfigModal } from './ui/jira-issues-modal';
|
|
2
2
|
export { default as DatasourceTableView } from './ui/datasource-table-view';
|
|
3
|
+
export { default as JSMAssetsConfigModal } from './ui/assets-modal';
|
|
3
4
|
export type { JiraIssuesDatasourceAdf, JiraIssueDatasourceParameters, } from './ui/jira-issues-modal/types';
|
|
5
|
+
export type { AssetsDatasourceAdf, AssetsDatasourceParameters, } from './ui/assets-modal/types';
|
|
4
6
|
export { JIRA_LIST_OF_LINKS_DATASOURCE_ID } from './ui/jira-issues-modal';
|
|
7
|
+
export { ASSETS_LIST_OF_LINKS_DATASOURCE_ID } from './ui/assets-modal';
|
|
5
8
|
export type { DatasourceAdf, DatasourceAdfView, DatasourceAdfTableView, } from '@atlaskit/linking-common/types';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AssetsConfigModalProps } from './types';
|
|
3
|
+
export declare const ASSETS_LIST_OF_LINKS_DATASOURCE_ID = "361d618a-3c04-40ad-9b27-3c8ea6927020";
|
|
4
|
+
declare const AssetsConfigModalWithWrappers: (props: AssetsConfigModalProps) => JSX.Element;
|
|
5
|
+
export default AssetsConfigModalWithWrappers;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DatasourceDataResponseItem, DatasourceTableStatusType } from '@atlaskit/linking-types';
|
|
3
|
+
interface RenderAssetsContentProps {
|
|
4
|
+
status: DatasourceTableStatusType;
|
|
5
|
+
responseItems: DatasourceDataResponseItem[];
|
|
6
|
+
}
|
|
7
|
+
export declare const RenderAssetsContent: (props: RenderAssetsContentProps) => JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const ModalContentContainer: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
as?: import("react").ElementType<any> | undefined;
|
|
5
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { DatasourceAdf, DatasourceAdfView, InlineCardAdf } from '@atlaskit/linking-common/types';
|
|
2
|
+
export interface AssetsDatasourceParameters {
|
|
3
|
+
cloudId: string;
|
|
4
|
+
aql: string;
|
|
5
|
+
schemaId?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface AssetsDatasourceAdf extends DatasourceAdf {
|
|
8
|
+
attrs: {
|
|
9
|
+
url?: string;
|
|
10
|
+
datasource: {
|
|
11
|
+
id: string;
|
|
12
|
+
parameters: AssetsDatasourceParameters;
|
|
13
|
+
views: DatasourceAdfView[];
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export interface AssetsConfigModalProps {
|
|
18
|
+
datasourceId: string;
|
|
19
|
+
visibleColumnKeys?: string[];
|
|
20
|
+
parameters?: AssetsDatasourceParameters;
|
|
21
|
+
onCancel: () => void;
|
|
22
|
+
onInsert: (adf: InlineCardAdf | AssetsDatasourceAdf) => void;
|
|
23
|
+
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export { default as JiraIssuesConfigModal } from './ui/jira-issues-modal';
|
|
2
2
|
export { default as DatasourceTableView } from './ui/datasource-table-view';
|
|
3
|
+
export { default as JSMAssetsConfigModal } from './ui/assets-modal';
|
|
3
4
|
export type { JiraIssuesDatasourceAdf, JiraIssueDatasourceParameters, } from './ui/jira-issues-modal/types';
|
|
5
|
+
export type { AssetsDatasourceAdf, AssetsDatasourceParameters, } from './ui/assets-modal/types';
|
|
4
6
|
export { JIRA_LIST_OF_LINKS_DATASOURCE_ID } from './ui/jira-issues-modal';
|
|
7
|
+
export { ASSETS_LIST_OF_LINKS_DATASOURCE_ID } from './ui/assets-modal';
|
|
5
8
|
export type { DatasourceAdf, DatasourceAdfView, DatasourceAdfTableView, } from '@atlaskit/linking-common/types';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AssetsConfigModalProps } from './types';
|
|
3
|
+
export declare const ASSETS_LIST_OF_LINKS_DATASOURCE_ID = "361d618a-3c04-40ad-9b27-3c8ea6927020";
|
|
4
|
+
declare const AssetsConfigModalWithWrappers: (props: AssetsConfigModalProps) => JSX.Element;
|
|
5
|
+
export default AssetsConfigModalWithWrappers;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DatasourceDataResponseItem, DatasourceTableStatusType } from '@atlaskit/linking-types';
|
|
3
|
+
interface RenderAssetsContentProps {
|
|
4
|
+
status: DatasourceTableStatusType;
|
|
5
|
+
responseItems: DatasourceDataResponseItem[];
|
|
6
|
+
}
|
|
7
|
+
export declare const RenderAssetsContent: (props: RenderAssetsContentProps) => JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const ModalContentContainer: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
as?: import("react").ElementType<any> | undefined;
|
|
5
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { DatasourceAdf, DatasourceAdfView, InlineCardAdf } from '@atlaskit/linking-common/types';
|
|
2
|
+
export interface AssetsDatasourceParameters {
|
|
3
|
+
cloudId: string;
|
|
4
|
+
aql: string;
|
|
5
|
+
schemaId?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface AssetsDatasourceAdf extends DatasourceAdf {
|
|
8
|
+
attrs: {
|
|
9
|
+
url?: string;
|
|
10
|
+
datasource: {
|
|
11
|
+
id: string;
|
|
12
|
+
parameters: AssetsDatasourceParameters;
|
|
13
|
+
views: DatasourceAdfView[];
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export interface AssetsConfigModalProps {
|
|
18
|
+
datasourceId: string;
|
|
19
|
+
visibleColumnKeys?: string[];
|
|
20
|
+
parameters?: AssetsDatasourceParameters;
|
|
21
|
+
onCancel: () => void;
|
|
22
|
+
onInsert: (adf: InlineCardAdf | AssetsDatasourceAdf) => void;
|
|
23
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-datasource",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.0",
|
|
4
4
|
"description": "UI Components to support linking platform dataset feature",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@atlaskit/icon-object": "^6.3.0",
|
|
37
37
|
"@atlaskit/image": "^1.1.0",
|
|
38
38
|
"@atlaskit/link-client-extension": "^1.5.0",
|
|
39
|
-
"@atlaskit/linking-common": "^3.
|
|
39
|
+
"@atlaskit/linking-common": "^3.3.0",
|
|
40
40
|
"@atlaskit/linking-types": "^8.1.0",
|
|
41
41
|
"@atlaskit/lozenge": "^11.4.0",
|
|
42
42
|
"@atlaskit/modal-dialog": "^12.6.0",
|
|
@@ -64,6 +64,7 @@
|
|
|
64
64
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
+
"@af/visual-regression": "*",
|
|
67
68
|
"@atlaskit/link-provider": "^1.6.0",
|
|
68
69
|
"@atlaskit/link-test-helpers": "^4.1.0",
|
|
69
70
|
"@atlaskit/ssr": "*",
|
package/report.api.md
CHANGED
|
@@ -22,6 +22,47 @@ import { DatasourceAdfTableView } from '@atlaskit/linking-common/types';
|
|
|
22
22
|
import { DatasourceAdfView } from '@atlaskit/linking-common/types';
|
|
23
23
|
import { InlineCardAdf } from '@atlaskit/linking-common/types';
|
|
24
24
|
|
|
25
|
+
// @public (undocumented)
|
|
26
|
+
export const ASSETS_LIST_OF_LINKS_DATASOURCE_ID =
|
|
27
|
+
'361d618a-3c04-40ad-9b27-3c8ea6927020';
|
|
28
|
+
|
|
29
|
+
// @public (undocumented)
|
|
30
|
+
interface AssetsConfigModalProps {
|
|
31
|
+
// (undocumented)
|
|
32
|
+
datasourceId: string;
|
|
33
|
+
// (undocumented)
|
|
34
|
+
onCancel: () => void;
|
|
35
|
+
// (undocumented)
|
|
36
|
+
onInsert: (adf: AssetsDatasourceAdf | InlineCardAdf) => void;
|
|
37
|
+
// (undocumented)
|
|
38
|
+
parameters?: AssetsDatasourceParameters;
|
|
39
|
+
// (undocumented)
|
|
40
|
+
visibleColumnKeys?: string[];
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// @public (undocumented)
|
|
44
|
+
export interface AssetsDatasourceAdf extends DatasourceAdf {
|
|
45
|
+
// (undocumented)
|
|
46
|
+
attrs: {
|
|
47
|
+
url?: string;
|
|
48
|
+
datasource: {
|
|
49
|
+
id: string;
|
|
50
|
+
parameters: AssetsDatasourceParameters;
|
|
51
|
+
views: DatasourceAdfView[];
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// @public (undocumented)
|
|
57
|
+
export interface AssetsDatasourceParameters {
|
|
58
|
+
// (undocumented)
|
|
59
|
+
aql: string;
|
|
60
|
+
// (undocumented)
|
|
61
|
+
cloudId: string;
|
|
62
|
+
// (undocumented)
|
|
63
|
+
schemaId?: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
25
66
|
export { DatasourceAdf };
|
|
26
67
|
|
|
27
68
|
export { DatasourceAdfTableView };
|
|
@@ -107,6 +148,11 @@ export interface JiraIssuesDatasourceAdf extends DatasourceAdf {
|
|
|
107
148
|
};
|
|
108
149
|
}
|
|
109
150
|
|
|
151
|
+
// @public (undocumented)
|
|
152
|
+
export const JSMAssetsConfigModal: (
|
|
153
|
+
props: AssetsConfigModalProps,
|
|
154
|
+
) => JSX.Element;
|
|
155
|
+
|
|
110
156
|
// @public (undocumented)
|
|
111
157
|
type XOR<T1, T2> =
|
|
112
158
|
| (T1 & {
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
## API Report File for "@atlaskit/link-datasource"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
/// <reference types="react" />
|
|
8
|
+
|
|
9
|
+
import { DatasourceAdf } from '@atlaskit/linking-common/types';
|
|
10
|
+
import { DatasourceAdfTableView } from '@atlaskit/linking-common/types';
|
|
11
|
+
import { DatasourceAdfView } from '@atlaskit/linking-common/types';
|
|
12
|
+
import { InlineCardAdf } from '@atlaskit/linking-common/types';
|
|
13
|
+
|
|
14
|
+
// @public (undocumented)
|
|
15
|
+
export const ASSETS_LIST_OF_LINKS_DATASOURCE_ID = "361d618a-3c04-40ad-9b27-3c8ea6927020";
|
|
16
|
+
|
|
17
|
+
// @public (undocumented)
|
|
18
|
+
interface AssetsConfigModalProps {
|
|
19
|
+
// (undocumented)
|
|
20
|
+
datasourceId: string;
|
|
21
|
+
// (undocumented)
|
|
22
|
+
onCancel: () => void;
|
|
23
|
+
// (undocumented)
|
|
24
|
+
onInsert: (adf: AssetsDatasourceAdf | InlineCardAdf) => void;
|
|
25
|
+
// (undocumented)
|
|
26
|
+
parameters?: AssetsDatasourceParameters;
|
|
27
|
+
// (undocumented)
|
|
28
|
+
visibleColumnKeys?: string[];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// @public (undocumented)
|
|
32
|
+
export interface AssetsDatasourceAdf extends DatasourceAdf {
|
|
33
|
+
// (undocumented)
|
|
34
|
+
attrs: {
|
|
35
|
+
url?: string;
|
|
36
|
+
datasource: {
|
|
37
|
+
id: string;
|
|
38
|
+
parameters: AssetsDatasourceParameters;
|
|
39
|
+
views: DatasourceAdfView[];
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// @public (undocumented)
|
|
45
|
+
export interface AssetsDatasourceParameters {
|
|
46
|
+
// (undocumented)
|
|
47
|
+
aql: string;
|
|
48
|
+
// (undocumented)
|
|
49
|
+
cloudId: string;
|
|
50
|
+
// (undocumented)
|
|
51
|
+
schemaId?: string;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export { DatasourceAdf }
|
|
55
|
+
|
|
56
|
+
export { DatasourceAdfTableView }
|
|
57
|
+
|
|
58
|
+
export { DatasourceAdfView }
|
|
59
|
+
|
|
60
|
+
// @public (undocumented)
|
|
61
|
+
export const DatasourceTableView: (props: DatasourceTableViewProps) => JSX.Element;
|
|
62
|
+
|
|
63
|
+
// @public (undocumented)
|
|
64
|
+
interface DatasourceTableViewProps {
|
|
65
|
+
// (undocumented)
|
|
66
|
+
datasourceId: string;
|
|
67
|
+
// (undocumented)
|
|
68
|
+
fields?: string[];
|
|
69
|
+
// (undocumented)
|
|
70
|
+
onVisibleColumnKeysChange?: (visibleColumnKeys: string[]) => void;
|
|
71
|
+
// (undocumented)
|
|
72
|
+
parameters: object;
|
|
73
|
+
// (undocumented)
|
|
74
|
+
visibleColumnKeys?: string[];
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// @public (undocumented)
|
|
78
|
+
export const JIRA_LIST_OF_LINKS_DATASOURCE_ID = "d8b75300-dfda-4519-b6cd-e49abbd50401";
|
|
79
|
+
|
|
80
|
+
// @public (undocumented)
|
|
81
|
+
export type JiraIssueDatasourceParameters = {
|
|
82
|
+
cloudId: string;
|
|
83
|
+
} & JiraIssueDatasourceParametersQuery;
|
|
84
|
+
|
|
85
|
+
// @public (undocumented)
|
|
86
|
+
type JiraIssueDatasourceParametersQuery = XOR<{
|
|
87
|
+
jql: string;
|
|
88
|
+
}, {
|
|
89
|
+
filter: string;
|
|
90
|
+
}>;
|
|
91
|
+
|
|
92
|
+
// @public (undocumented)
|
|
93
|
+
export const JiraIssuesConfigModal: (props: JiraIssuesConfigModalProps) => JSX.Element;
|
|
94
|
+
|
|
95
|
+
// @public (undocumented)
|
|
96
|
+
interface JiraIssuesConfigModalProps {
|
|
97
|
+
// (undocumented)
|
|
98
|
+
datasourceId: string;
|
|
99
|
+
// (undocumented)
|
|
100
|
+
onCancel: () => void;
|
|
101
|
+
// (undocumented)
|
|
102
|
+
onInsert: (adf: InlineCardAdf | JiraIssuesDatasourceAdf) => void;
|
|
103
|
+
// (undocumented)
|
|
104
|
+
parameters?: JiraIssueDatasourceParameters;
|
|
105
|
+
// (undocumented)
|
|
106
|
+
visibleColumnKeys?: string[];
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// @public (undocumented)
|
|
110
|
+
export interface JiraIssuesDatasourceAdf extends DatasourceAdf {
|
|
111
|
+
// (undocumented)
|
|
112
|
+
attrs: {
|
|
113
|
+
url?: string;
|
|
114
|
+
datasource: {
|
|
115
|
+
id: string;
|
|
116
|
+
parameters: JiraIssueDatasourceParameters;
|
|
117
|
+
views: [
|
|
118
|
+
{
|
|
119
|
+
type: 'table';
|
|
120
|
+
properties?: {
|
|
121
|
+
columns: {
|
|
122
|
+
key: string;
|
|
123
|
+
}[];
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
];
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// @public (undocumented)
|
|
132
|
+
export const JSMAssetsConfigModal: (props: AssetsConfigModalProps) => JSX.Element;
|
|
133
|
+
|
|
134
|
+
// @public (undocumented)
|
|
135
|
+
type XOR<T1, T2> = (T1 & {
|
|
136
|
+
[k in Exclude<keyof T2, keyof T1>]?: never;
|
|
137
|
+
}) | (T2 & {
|
|
138
|
+
[k in Exclude<keyof T1, keyof T2>]?: never;
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
// (No @packageDocumentation comment for this package)
|
|
142
|
+
|
|
143
|
+
```
|