@atlaskit/link-datasource 2.0.4 → 2.1.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 +22 -0
- package/dist/cjs/ui/confluence-search-modal/modal/index.js +3 -15
- package/dist/cjs/ui/issue-like-table/utils.js +18 -1
- package/dist/cjs/ui/jira-issues-modal/modal/index.js +3 -18
- package/dist/es2019/ui/confluence-search-modal/modal/index.js +1 -13
- package/dist/es2019/ui/issue-like-table/utils.js +17 -0
- package/dist/es2019/ui/jira-issues-modal/modal/index.js +1 -16
- package/dist/esm/ui/confluence-search-modal/modal/index.js +1 -13
- package/dist/esm/ui/issue-like-table/utils.js +17 -0
- package/dist/esm/ui/jira-issues-modal/modal/index.js +1 -16
- package/dist/types/ui/assets-modal/modal/index.d.ts +1 -1
- package/dist/types/ui/assets-modal/types.d.ts +4 -8
- package/dist/types/ui/confluence-search-modal/modal/index.d.ts +0 -2
- package/dist/types/ui/confluence-search-modal/types.d.ts +2 -1
- package/dist/types/ui/issue-like-table/utils.d.ts +6 -0
- package/dist/types/ui/jira-issues-modal/modal/index.d.ts +0 -6
- package/dist/types-ts4.5/ui/assets-modal/modal/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/assets-modal/types.d.ts +4 -8
- package/dist/types-ts4.5/ui/confluence-search-modal/modal/index.d.ts +0 -2
- package/dist/types-ts4.5/ui/confluence-search-modal/types.d.ts +2 -1
- package/dist/types-ts4.5/ui/issue-like-table/utils.d.ts +6 -0
- package/dist/types-ts4.5/ui/jira-issues-modal/modal/index.d.ts +0 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @atlaskit/link-datasource
|
|
2
2
|
|
|
3
|
+
## 2.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#97537](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/97537)
|
|
8
|
+
[`ab7caf1bf7ee`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ab7caf1bf7ee) -
|
|
9
|
+
Update AssetsConfigModalProps to be aligned with other modals. New fields made available
|
|
10
|
+
including:
|
|
11
|
+
|
|
12
|
+
- `url`: The url that was used to insert a List of Links
|
|
13
|
+
- `viewMode`: 2 viewModes `inline` and `table` for different display.
|
|
14
|
+
- `wrappedColumnKeys`: toggle line-wrapping for each column.
|
|
15
|
+
- `columnCustomSizes`: allow customized column sizes.
|
|
16
|
+
|
|
17
|
+
The new fields are not required for each modal to implement.
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- [#98158](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/98158)
|
|
22
|
+
[`2ec887a95a61`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/2ec887a95a61) -
|
|
23
|
+
Minor internal refactor. No expected functional changes.
|
|
24
|
+
|
|
3
25
|
## 2.0.4
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
|
@@ -5,7 +5,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.PlainConfluenceSearchConfigModal = exports.ConfluenceSearchConfigModal = void 0;
|
|
9
9
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
10
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
11
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
@@ -45,6 +45,7 @@ var _siteSelector = require("../../common/modal/site-selector");
|
|
|
45
45
|
var _issueLikeTable = require("../../issue-like-table");
|
|
46
46
|
var _useColumnResize2 = require("../../issue-like-table/use-column-resize");
|
|
47
47
|
var _useColumnWrapping2 = require("../../issue-like-table/use-column-wrapping");
|
|
48
|
+
var _utils = require("../../issue-like-table/utils");
|
|
48
49
|
var _confluenceSearchContainer = _interopRequireDefault(require("../confluence-search-container"));
|
|
49
50
|
var _confluenceSearchInitialStateSvg = require("./confluence-search-initial-state-svg");
|
|
50
51
|
var _messages = require("./messages");
|
|
@@ -61,19 +62,6 @@ var searchCountStyles = (0, _primitives.xcss)({
|
|
|
61
62
|
flex: 1,
|
|
62
63
|
fontWeight: 600
|
|
63
64
|
});
|
|
64
|
-
|
|
65
|
-
// TODO: common functionality of all modals refactor in EDM-9573
|
|
66
|
-
var getColumnAction = exports.getColumnAction = function getColumnAction(oldVisibleColumnKeys, newVisibleColumnKeys) {
|
|
67
|
-
var newColumnSize = newVisibleColumnKeys.length;
|
|
68
|
-
var oldColumnSize = oldVisibleColumnKeys.length;
|
|
69
|
-
if (newColumnSize > oldColumnSize) {
|
|
70
|
-
return _types.DatasourceAction.COLUMN_ADDED;
|
|
71
|
-
} else if (newColumnSize < oldColumnSize) {
|
|
72
|
-
return _types.DatasourceAction.COLUMN_REMOVED;
|
|
73
|
-
} else {
|
|
74
|
-
return _types.DatasourceAction.COLUMN_REORDERED;
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
65
|
var PlainConfluenceSearchConfigModal = exports.PlainConfluenceSearchConfigModal = function PlainConfluenceSearchConfigModal(props) {
|
|
78
66
|
var _useRef = (0, _react.useRef)((0, _uuid.v4)()),
|
|
79
67
|
modalRenderInstanceId = _useRef.current;
|
|
@@ -254,7 +242,7 @@ var PlainConfluenceSearchConfigModal = exports.PlainConfluenceSearchConfigModal
|
|
|
254
242
|
// TODO: common functionality of all modals refactor in EDM-9573
|
|
255
243
|
var handleVisibleColumnKeysChange = (0, _react.useCallback)(function () {
|
|
256
244
|
var newVisibleColumnKeys = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
257
|
-
var columnAction = getColumnAction(visibleColumnKeys || [], newVisibleColumnKeys);
|
|
245
|
+
var columnAction = (0, _utils.getColumnAction)(visibleColumnKeys || [], newVisibleColumnKeys);
|
|
258
246
|
userInteractionActions.current.add(columnAction);
|
|
259
247
|
visibleColumnCount.current = newVisibleColumnKeys.length;
|
|
260
248
|
setVisibleColumnKeys(newVisibleColumnKeys);
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.getWidthCss = exports.COLUMN_MIN_WIDTH = exports.COLUMN_BASE_WIDTH = void 0;
|
|
6
|
+
exports.getWidthCss = exports.getColumnAction = exports.COLUMN_MIN_WIDTH = exports.COLUMN_BASE_WIDTH = void 0;
|
|
7
|
+
var _types = require("../../analytics/types");
|
|
7
8
|
var COLUMN_BASE_WIDTH = exports.COLUMN_BASE_WIDTH = 8;
|
|
8
9
|
var COLUMN_MIN_WIDTH = exports.COLUMN_MIN_WIDTH = COLUMN_BASE_WIDTH * 3;
|
|
9
10
|
/**
|
|
@@ -23,4 +24,20 @@ var getWidthCss = exports.getWidthCss = function getWidthCss(_ref) {
|
|
|
23
24
|
} : {
|
|
24
25
|
maxWidth: width
|
|
25
26
|
};
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* This method should be called when one atomic action is performed on columns: adding new item, removing one item, changing items order.
|
|
31
|
+
* The assumption is that since only one action is changed at each time, we don't have to verify the actual contents of the lists.
|
|
32
|
+
*/
|
|
33
|
+
var getColumnAction = exports.getColumnAction = function getColumnAction(oldVisibleColumnKeys, newVisibleColumnKeys) {
|
|
34
|
+
var newColumnSize = newVisibleColumnKeys.length;
|
|
35
|
+
var oldColumnSize = oldVisibleColumnKeys.length;
|
|
36
|
+
if (newColumnSize > oldColumnSize) {
|
|
37
|
+
return _types.DatasourceAction.COLUMN_ADDED;
|
|
38
|
+
} else if (newColumnSize < oldColumnSize) {
|
|
39
|
+
return _types.DatasourceAction.COLUMN_REMOVED;
|
|
40
|
+
} else {
|
|
41
|
+
return _types.DatasourceAction.COLUMN_REORDERED;
|
|
42
|
+
}
|
|
26
43
|
};
|
|
@@ -5,7 +5,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.PlainJiraIssuesConfigModal = exports.JiraIssuesConfigModal = void 0;
|
|
9
9
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
10
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
11
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
@@ -50,6 +50,7 @@ var _siteSelector = require("../../common/modal/site-selector");
|
|
|
50
50
|
var _issueLikeTable = require("../../issue-like-table");
|
|
51
51
|
var _useColumnResize2 = require("../../issue-like-table/use-column-resize");
|
|
52
52
|
var _useColumnWrapping2 = require("../../issue-like-table/use-column-wrapping");
|
|
53
|
+
var _utils2 = require("../../issue-like-table/utils");
|
|
53
54
|
var _ui = require("../basic-filters/ui");
|
|
54
55
|
var _isQueryTooComplex = require("../basic-filters/utils/isQueryTooComplex");
|
|
55
56
|
var _jiraSearchContainer = require("../jira-search-container");
|
|
@@ -70,22 +71,6 @@ var getDisplayValue = function getDisplayValue(currentViewMode, itemCount) {
|
|
|
70
71
|
return itemCount === 1 ? _types.DatasourceDisplay.INLINE : _types.DatasourceDisplay.DATASOURCE_INLINE;
|
|
71
72
|
};
|
|
72
73
|
var jqlSupportDocumentLink = 'https://support.atlassian.com/jira-service-management-cloud/docs/use-advanced-search-with-jira-query-language-jql/';
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* This method should be called when one atomic action is performed on columns: adding new item, removing one item, changing items order.
|
|
76
|
-
* The assumption is that since only one action is changed at each time, we don't have to verify the actual contents of the lists.
|
|
77
|
-
*/
|
|
78
|
-
var getColumnAction = exports.getColumnAction = function getColumnAction(oldVisibleColumnKeys, newVisibleColumnKeys) {
|
|
79
|
-
var newColumnSize = newVisibleColumnKeys.length;
|
|
80
|
-
var oldColumnSize = oldVisibleColumnKeys.length;
|
|
81
|
-
if (newColumnSize > oldColumnSize) {
|
|
82
|
-
return _types.DatasourceAction.COLUMN_ADDED;
|
|
83
|
-
} else if (newColumnSize < oldColumnSize) {
|
|
84
|
-
return _types.DatasourceAction.COLUMN_REMOVED;
|
|
85
|
-
} else {
|
|
86
|
-
return _types.DatasourceAction.COLUMN_REORDERED;
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
74
|
var PlainJiraIssuesConfigModal = exports.PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(props) {
|
|
90
75
|
var datasourceId = props.datasourceId,
|
|
91
76
|
initialColumnCustomSizes = props.columnCustomSizes,
|
|
@@ -422,7 +407,7 @@ var PlainJiraIssuesConfigModal = exports.PlainJiraIssuesConfigModal = function P
|
|
|
422
407
|
}, [onNextPage]);
|
|
423
408
|
var handleVisibleColumnKeysChange = (0, _react.useCallback)(function () {
|
|
424
409
|
var newVisibleColumnKeys = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
425
|
-
var columnAction = getColumnAction(visibleColumnKeys || [], newVisibleColumnKeys);
|
|
410
|
+
var columnAction = (0, _utils2.getColumnAction)(visibleColumnKeys || [], newVisibleColumnKeys);
|
|
426
411
|
userInteractionActions.current.add(columnAction);
|
|
427
412
|
visibleColumnCount.current = newVisibleColumnKeys.length;
|
|
428
413
|
setVisibleColumnKeys(newVisibleColumnKeys);
|
|
@@ -33,6 +33,7 @@ import { SiteSelector } from '../../common/modal/site-selector';
|
|
|
33
33
|
import { EmptyState, IssueLikeDataTableView } from '../../issue-like-table';
|
|
34
34
|
import { useColumnResize } from '../../issue-like-table/use-column-resize';
|
|
35
35
|
import { useColumnWrapping } from '../../issue-like-table/use-column-wrapping';
|
|
36
|
+
import { getColumnAction } from '../../issue-like-table/utils';
|
|
36
37
|
import ConfluenceSearchContainer from '../confluence-search-container';
|
|
37
38
|
import { ConfluenceSearchInitialStateSVG } from './confluence-search-initial-state-svg';
|
|
38
39
|
import { confluenceSearchModalMessages } from './messages';
|
|
@@ -45,19 +46,6 @@ const searchCountStyles = xcss({
|
|
|
45
46
|
flex: 1,
|
|
46
47
|
fontWeight: 600
|
|
47
48
|
});
|
|
48
|
-
|
|
49
|
-
// TODO: common functionality of all modals refactor in EDM-9573
|
|
50
|
-
export const getColumnAction = (oldVisibleColumnKeys, newVisibleColumnKeys) => {
|
|
51
|
-
const newColumnSize = newVisibleColumnKeys.length;
|
|
52
|
-
const oldColumnSize = oldVisibleColumnKeys.length;
|
|
53
|
-
if (newColumnSize > oldColumnSize) {
|
|
54
|
-
return DatasourceAction.COLUMN_ADDED;
|
|
55
|
-
} else if (newColumnSize < oldColumnSize) {
|
|
56
|
-
return DatasourceAction.COLUMN_REMOVED;
|
|
57
|
-
} else {
|
|
58
|
-
return DatasourceAction.COLUMN_REORDERED;
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
49
|
export const PlainConfluenceSearchConfigModal = props => {
|
|
62
50
|
const {
|
|
63
51
|
current: modalRenderInstanceId
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DatasourceAction } from '../../analytics/types';
|
|
1
2
|
export const COLUMN_BASE_WIDTH = 8;
|
|
2
3
|
export const COLUMN_MIN_WIDTH = COLUMN_BASE_WIDTH * 3;
|
|
3
4
|
/**
|
|
@@ -16,4 +17,20 @@ export const getWidthCss = ({
|
|
|
16
17
|
width
|
|
17
18
|
} : {
|
|
18
19
|
maxWidth: width
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* This method should be called when one atomic action is performed on columns: adding new item, removing one item, changing items order.
|
|
24
|
+
* The assumption is that since only one action is changed at each time, we don't have to verify the actual contents of the lists.
|
|
25
|
+
*/
|
|
26
|
+
export const getColumnAction = (oldVisibleColumnKeys, newVisibleColumnKeys) => {
|
|
27
|
+
const newColumnSize = newVisibleColumnKeys.length;
|
|
28
|
+
const oldColumnSize = oldVisibleColumnKeys.length;
|
|
29
|
+
if (newColumnSize > oldColumnSize) {
|
|
30
|
+
return DatasourceAction.COLUMN_ADDED;
|
|
31
|
+
} else if (newColumnSize < oldColumnSize) {
|
|
32
|
+
return DatasourceAction.COLUMN_REMOVED;
|
|
33
|
+
} else {
|
|
34
|
+
return DatasourceAction.COLUMN_REORDERED;
|
|
35
|
+
}
|
|
19
36
|
};
|
|
@@ -38,6 +38,7 @@ import { SiteSelector } from '../../common/modal/site-selector';
|
|
|
38
38
|
import { EmptyState, IssueLikeDataTableView } from '../../issue-like-table';
|
|
39
39
|
import { useColumnResize } from '../../issue-like-table/use-column-resize';
|
|
40
40
|
import { useColumnWrapping } from '../../issue-like-table/use-column-wrapping';
|
|
41
|
+
import { getColumnAction } from '../../issue-like-table/utils';
|
|
41
42
|
import { availableBasicFilterTypes } from '../basic-filters/ui';
|
|
42
43
|
import { isQueryTooComplex } from '../basic-filters/utils/isQueryTooComplex';
|
|
43
44
|
import { JiraSearchContainer } from '../jira-search-container';
|
|
@@ -54,22 +55,6 @@ const getDisplayValue = (currentViewMode, itemCount) => {
|
|
|
54
55
|
return itemCount === 1 ? DatasourceDisplay.INLINE : DatasourceDisplay.DATASOURCE_INLINE;
|
|
55
56
|
};
|
|
56
57
|
const jqlSupportDocumentLink = 'https://support.atlassian.com/jira-service-management-cloud/docs/use-advanced-search-with-jira-query-language-jql/';
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* This method should be called when one atomic action is performed on columns: adding new item, removing one item, changing items order.
|
|
60
|
-
* The assumption is that since only one action is changed at each time, we don't have to verify the actual contents of the lists.
|
|
61
|
-
*/
|
|
62
|
-
export const getColumnAction = (oldVisibleColumnKeys, newVisibleColumnKeys) => {
|
|
63
|
-
const newColumnSize = newVisibleColumnKeys.length;
|
|
64
|
-
const oldColumnSize = oldVisibleColumnKeys.length;
|
|
65
|
-
if (newColumnSize > oldColumnSize) {
|
|
66
|
-
return DatasourceAction.COLUMN_ADDED;
|
|
67
|
-
} else if (newColumnSize < oldColumnSize) {
|
|
68
|
-
return DatasourceAction.COLUMN_REMOVED;
|
|
69
|
-
} else {
|
|
70
|
-
return DatasourceAction.COLUMN_REORDERED;
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
58
|
export const PlainJiraIssuesConfigModal = props => {
|
|
74
59
|
const {
|
|
75
60
|
datasourceId,
|
|
@@ -40,6 +40,7 @@ import { SiteSelector } from '../../common/modal/site-selector';
|
|
|
40
40
|
import { EmptyState, IssueLikeDataTableView } from '../../issue-like-table';
|
|
41
41
|
import { useColumnResize } from '../../issue-like-table/use-column-resize';
|
|
42
42
|
import { useColumnWrapping } from '../../issue-like-table/use-column-wrapping';
|
|
43
|
+
import { getColumnAction } from '../../issue-like-table/utils';
|
|
43
44
|
import ConfluenceSearchContainer from '../confluence-search-container';
|
|
44
45
|
import { ConfluenceSearchInitialStateSVG } from './confluence-search-initial-state-svg';
|
|
45
46
|
import { confluenceSearchModalMessages } from './messages';
|
|
@@ -52,19 +53,6 @@ var searchCountStyles = xcss({
|
|
|
52
53
|
flex: 1,
|
|
53
54
|
fontWeight: 600
|
|
54
55
|
});
|
|
55
|
-
|
|
56
|
-
// TODO: common functionality of all modals refactor in EDM-9573
|
|
57
|
-
export var getColumnAction = function getColumnAction(oldVisibleColumnKeys, newVisibleColumnKeys) {
|
|
58
|
-
var newColumnSize = newVisibleColumnKeys.length;
|
|
59
|
-
var oldColumnSize = oldVisibleColumnKeys.length;
|
|
60
|
-
if (newColumnSize > oldColumnSize) {
|
|
61
|
-
return DatasourceAction.COLUMN_ADDED;
|
|
62
|
-
} else if (newColumnSize < oldColumnSize) {
|
|
63
|
-
return DatasourceAction.COLUMN_REMOVED;
|
|
64
|
-
} else {
|
|
65
|
-
return DatasourceAction.COLUMN_REORDERED;
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
56
|
export var PlainConfluenceSearchConfigModal = function PlainConfluenceSearchConfigModal(props) {
|
|
69
57
|
var _useRef = useRef(uuidv4()),
|
|
70
58
|
modalRenderInstanceId = _useRef.current;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DatasourceAction } from '../../analytics/types';
|
|
1
2
|
export var COLUMN_BASE_WIDTH = 8;
|
|
2
3
|
export var COLUMN_MIN_WIDTH = COLUMN_BASE_WIDTH * 3;
|
|
3
4
|
/**
|
|
@@ -17,4 +18,20 @@ export var getWidthCss = function getWidthCss(_ref) {
|
|
|
17
18
|
} : {
|
|
18
19
|
maxWidth: width
|
|
19
20
|
};
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* This method should be called when one atomic action is performed on columns: adding new item, removing one item, changing items order.
|
|
25
|
+
* The assumption is that since only one action is changed at each time, we don't have to verify the actual contents of the lists.
|
|
26
|
+
*/
|
|
27
|
+
export var getColumnAction = function getColumnAction(oldVisibleColumnKeys, newVisibleColumnKeys) {
|
|
28
|
+
var newColumnSize = newVisibleColumnKeys.length;
|
|
29
|
+
var oldColumnSize = oldVisibleColumnKeys.length;
|
|
30
|
+
if (newColumnSize > oldColumnSize) {
|
|
31
|
+
return DatasourceAction.COLUMN_ADDED;
|
|
32
|
+
} else if (newColumnSize < oldColumnSize) {
|
|
33
|
+
return DatasourceAction.COLUMN_REMOVED;
|
|
34
|
+
} else {
|
|
35
|
+
return DatasourceAction.COLUMN_REORDERED;
|
|
36
|
+
}
|
|
20
37
|
};
|
|
@@ -45,6 +45,7 @@ import { SiteSelector } from '../../common/modal/site-selector';
|
|
|
45
45
|
import { EmptyState, IssueLikeDataTableView } from '../../issue-like-table';
|
|
46
46
|
import { useColumnResize } from '../../issue-like-table/use-column-resize';
|
|
47
47
|
import { useColumnWrapping } from '../../issue-like-table/use-column-wrapping';
|
|
48
|
+
import { getColumnAction } from '../../issue-like-table/utils';
|
|
48
49
|
import { availableBasicFilterTypes } from '../basic-filters/ui';
|
|
49
50
|
import { isQueryTooComplex } from '../basic-filters/utils/isQueryTooComplex';
|
|
50
51
|
import { JiraSearchContainer } from '../jira-search-container';
|
|
@@ -61,22 +62,6 @@ var getDisplayValue = function getDisplayValue(currentViewMode, itemCount) {
|
|
|
61
62
|
return itemCount === 1 ? DatasourceDisplay.INLINE : DatasourceDisplay.DATASOURCE_INLINE;
|
|
62
63
|
};
|
|
63
64
|
var jqlSupportDocumentLink = 'https://support.atlassian.com/jira-service-management-cloud/docs/use-advanced-search-with-jira-query-language-jql/';
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* This method should be called when one atomic action is performed on columns: adding new item, removing one item, changing items order.
|
|
67
|
-
* The assumption is that since only one action is changed at each time, we don't have to verify the actual contents of the lists.
|
|
68
|
-
*/
|
|
69
|
-
export var getColumnAction = function getColumnAction(oldVisibleColumnKeys, newVisibleColumnKeys) {
|
|
70
|
-
var newColumnSize = newVisibleColumnKeys.length;
|
|
71
|
-
var oldColumnSize = oldVisibleColumnKeys.length;
|
|
72
|
-
if (newColumnSize > oldColumnSize) {
|
|
73
|
-
return DatasourceAction.COLUMN_ADDED;
|
|
74
|
-
} else if (newColumnSize < oldColumnSize) {
|
|
75
|
-
return DatasourceAction.COLUMN_REMOVED;
|
|
76
|
-
} else {
|
|
77
|
-
return DatasourceAction.COLUMN_REORDERED;
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
65
|
export var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(props) {
|
|
81
66
|
var datasourceId = props.datasourceId,
|
|
82
67
|
initialColumnCustomSizes = props.columnCustomSizes,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { AssetsConfigModalProps } from '../types';
|
|
2
|
+
import { type AssetsConfigModalProps } from '../types';
|
|
3
3
|
export declare const AssetsConfigModal: import("react").ForwardRefExoticComponent<AssetsConfigModalProps & import("@atlaskit/analytics-next").WithContextProps & import("react").RefAttributes<any>>;
|
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import {
|
|
1
|
+
import { type DatasourceAdf, type InlineCardAdf } from '@atlaskit/linking-common/types';
|
|
2
|
+
import { type DatasourceParameters } from '@atlaskit/linking-types';
|
|
3
|
+
import { type ConfigModalProps } from '../../common/types';
|
|
3
4
|
export type AssetsDatasourceParameters = {
|
|
4
5
|
workspaceId: string;
|
|
5
6
|
aql: string;
|
|
6
7
|
schemaId: string;
|
|
7
8
|
};
|
|
8
9
|
export type AssetsDatasourceAdf = DatasourceAdf<AssetsDatasourceParameters>;
|
|
9
|
-
export interface AssetsConfigModalProps {
|
|
10
|
-
datasourceId: string;
|
|
11
|
-
visibleColumnKeys?: string[];
|
|
12
|
-
parameters?: AssetsDatasourceParameters;
|
|
13
|
-
onCancel: () => void;
|
|
14
|
-
onInsert: (adf: InlineCardAdf | AssetsDatasourceAdf, analyticsEvent?: UIAnalyticsEvent) => void;
|
|
10
|
+
export interface AssetsConfigModalProps extends ConfigModalProps<InlineCardAdf | AssetsDatasourceAdf, DatasourceParameters | AssetsDatasourceParameters> {
|
|
15
11
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
|
-
import { DatasourceAction } from '../../../analytics/types';
|
|
4
3
|
import { type ConfluenceSearchConfigModalProps } from '../types';
|
|
5
|
-
export declare const getColumnAction: (oldVisibleColumnKeys: string[], newVisibleColumnKeys: string[]) => DatasourceAction;
|
|
6
4
|
export declare const PlainConfluenceSearchConfigModal: (props: ConfluenceSearchConfigModalProps) => jsx.JSX.Element;
|
|
7
5
|
export declare const ConfluenceSearchConfigModal: import("react").ForwardRefExoticComponent<ConfluenceSearchConfigModalProps & import("@atlaskit/analytics-next").WithContextProps & import("react").RefAttributes<any>>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { type DatasourceAdf, type InlineCardAdf } from '@atlaskit/linking-common/types';
|
|
2
|
+
import type { DatasourceParameters } from '@atlaskit/linking-types';
|
|
2
3
|
import { type ConfigModalProps } from '../../common/types';
|
|
3
4
|
import { type DateRangeType } from '../common/modal/popup-select/types';
|
|
4
|
-
export interface ConfluenceSearchConfigModalProps extends ConfigModalProps<InlineCardAdf | ConfluenceSearchDatasourceAdf, ConfluenceSearchDatasourceParameters> {
|
|
5
|
+
export interface ConfluenceSearchConfigModalProps extends ConfigModalProps<InlineCardAdf | ConfluenceSearchDatasourceAdf, DatasourceParameters | ConfluenceSearchDatasourceParameters> {
|
|
5
6
|
disableDisplayDropdown?: boolean;
|
|
6
7
|
overrideParameters?: Pick<ConfluenceSearchDatasourceParameters, 'entityTypes'>;
|
|
7
8
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { DatasourceAction } from '../../analytics/types';
|
|
2
3
|
export declare const COLUMN_BASE_WIDTH = 8;
|
|
3
4
|
export declare const COLUMN_MIN_WIDTH: number;
|
|
4
5
|
export type GetWidthCss = (arg: {
|
|
@@ -15,3 +16,8 @@ export type GetWidthCss = (arg: {
|
|
|
15
16
|
* @param width
|
|
16
17
|
*/
|
|
17
18
|
export declare const getWidthCss: GetWidthCss;
|
|
19
|
+
/**
|
|
20
|
+
* This method should be called when one atomic action is performed on columns: adding new item, removing one item, changing items order.
|
|
21
|
+
* The assumption is that since only one action is changed at each time, we don't have to verify the actual contents of the lists.
|
|
22
|
+
*/
|
|
23
|
+
export declare const getColumnAction: (oldVisibleColumnKeys: string[], newVisibleColumnKeys: string[]) => DatasourceAction;
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
|
-
import { DatasourceAction } from '../../../analytics/types';
|
|
4
3
|
import type { JiraConfigModalProps } from '../types';
|
|
5
|
-
/**
|
|
6
|
-
* This method should be called when one atomic action is performed on columns: adding new item, removing one item, changing items order.
|
|
7
|
-
* The assumption is that since only one action is changed at each time, we don't have to verify the actual contents of the lists.
|
|
8
|
-
*/
|
|
9
|
-
export declare const getColumnAction: (oldVisibleColumnKeys: string[], newVisibleColumnKeys: string[]) => DatasourceAction;
|
|
10
4
|
export declare const PlainJiraIssuesConfigModal: (props: JiraConfigModalProps) => jsx.JSX.Element;
|
|
11
5
|
export declare const JiraIssuesConfigModal: import("react").ForwardRefExoticComponent<JiraConfigModalProps & import("@atlaskit/analytics-next").WithContextProps & import("react").RefAttributes<any>>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { AssetsConfigModalProps } from '../types';
|
|
2
|
+
import { type AssetsConfigModalProps } from '../types';
|
|
3
3
|
export declare const AssetsConfigModal: import("react").ForwardRefExoticComponent<AssetsConfigModalProps & import("@atlaskit/analytics-next").WithContextProps & import("react").RefAttributes<any>>;
|
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import {
|
|
1
|
+
import { type DatasourceAdf, type InlineCardAdf } from '@atlaskit/linking-common/types';
|
|
2
|
+
import { type DatasourceParameters } from '@atlaskit/linking-types';
|
|
3
|
+
import { type ConfigModalProps } from '../../common/types';
|
|
3
4
|
export type AssetsDatasourceParameters = {
|
|
4
5
|
workspaceId: string;
|
|
5
6
|
aql: string;
|
|
6
7
|
schemaId: string;
|
|
7
8
|
};
|
|
8
9
|
export type AssetsDatasourceAdf = DatasourceAdf<AssetsDatasourceParameters>;
|
|
9
|
-
export interface AssetsConfigModalProps {
|
|
10
|
-
datasourceId: string;
|
|
11
|
-
visibleColumnKeys?: string[];
|
|
12
|
-
parameters?: AssetsDatasourceParameters;
|
|
13
|
-
onCancel: () => void;
|
|
14
|
-
onInsert: (adf: InlineCardAdf | AssetsDatasourceAdf, analyticsEvent?: UIAnalyticsEvent) => void;
|
|
10
|
+
export interface AssetsConfigModalProps extends ConfigModalProps<InlineCardAdf | AssetsDatasourceAdf, DatasourceParameters | AssetsDatasourceParameters> {
|
|
15
11
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
|
-
import { DatasourceAction } from '../../../analytics/types';
|
|
4
3
|
import { type ConfluenceSearchConfigModalProps } from '../types';
|
|
5
|
-
export declare const getColumnAction: (oldVisibleColumnKeys: string[], newVisibleColumnKeys: string[]) => DatasourceAction;
|
|
6
4
|
export declare const PlainConfluenceSearchConfigModal: (props: ConfluenceSearchConfigModalProps) => jsx.JSX.Element;
|
|
7
5
|
export declare const ConfluenceSearchConfigModal: import("react").ForwardRefExoticComponent<ConfluenceSearchConfigModalProps & import("@atlaskit/analytics-next").WithContextProps & import("react").RefAttributes<any>>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { type DatasourceAdf, type InlineCardAdf } from '@atlaskit/linking-common/types';
|
|
2
|
+
import type { DatasourceParameters } from '@atlaskit/linking-types';
|
|
2
3
|
import { type ConfigModalProps } from '../../common/types';
|
|
3
4
|
import { type DateRangeType } from '../common/modal/popup-select/types';
|
|
4
|
-
export interface ConfluenceSearchConfigModalProps extends ConfigModalProps<InlineCardAdf | ConfluenceSearchDatasourceAdf, ConfluenceSearchDatasourceParameters> {
|
|
5
|
+
export interface ConfluenceSearchConfigModalProps extends ConfigModalProps<InlineCardAdf | ConfluenceSearchDatasourceAdf, DatasourceParameters | ConfluenceSearchDatasourceParameters> {
|
|
5
6
|
disableDisplayDropdown?: boolean;
|
|
6
7
|
overrideParameters?: Pick<ConfluenceSearchDatasourceParameters, 'entityTypes'>;
|
|
7
8
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { DatasourceAction } from '../../analytics/types';
|
|
2
3
|
export declare const COLUMN_BASE_WIDTH = 8;
|
|
3
4
|
export declare const COLUMN_MIN_WIDTH: number;
|
|
4
5
|
export type GetWidthCss = (arg: {
|
|
@@ -15,3 +16,8 @@ export type GetWidthCss = (arg: {
|
|
|
15
16
|
* @param width
|
|
16
17
|
*/
|
|
17
18
|
export declare const getWidthCss: GetWidthCss;
|
|
19
|
+
/**
|
|
20
|
+
* This method should be called when one atomic action is performed on columns: adding new item, removing one item, changing items order.
|
|
21
|
+
* The assumption is that since only one action is changed at each time, we don't have to verify the actual contents of the lists.
|
|
22
|
+
*/
|
|
23
|
+
export declare const getColumnAction: (oldVisibleColumnKeys: string[], newVisibleColumnKeys: string[]) => DatasourceAction;
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
|
-
import { DatasourceAction } from '../../../analytics/types';
|
|
4
3
|
import type { JiraConfigModalProps } from '../types';
|
|
5
|
-
/**
|
|
6
|
-
* This method should be called when one atomic action is performed on columns: adding new item, removing one item, changing items order.
|
|
7
|
-
* The assumption is that since only one action is changed at each time, we don't have to verify the actual contents of the lists.
|
|
8
|
-
*/
|
|
9
|
-
export declare const getColumnAction: (oldVisibleColumnKeys: string[], newVisibleColumnKeys: string[]) => DatasourceAction;
|
|
10
4
|
export declare const PlainJiraIssuesConfigModal: (props: JiraConfigModalProps) => jsx.JSX.Element;
|
|
11
5
|
export declare const JiraIssuesConfigModal: import("react").ForwardRefExoticComponent<JiraConfigModalProps & import("@atlaskit/analytics-next").WithContextProps & import("react").RefAttributes<any>>;
|