@atlaskit/link-datasource 1.24.6 → 1.24.8
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 +13 -0
- package/dist/cjs/ui/assets-modal/modal/render-assets-content/initial-state-view/index.js +2 -1
- package/dist/cjs/ui/common/error-state/access-required.js +2 -1
- package/dist/cjs/ui/common/error-state/loading-error.js +2 -1
- package/dist/cjs/ui/common/error-state/messages.js +0 -11
- package/dist/cjs/ui/common/error-state/modal-loading-error.js +5 -13
- package/dist/cjs/ui/common/error-state/no-instances.js +2 -1
- package/dist/cjs/ui/common/error-state/no-results.js +2 -1
- package/dist/cjs/ui/common/initial-state-view/index.js +2 -1
- package/dist/cjs/ui/common/modal/content-container/index.js +35 -0
- package/dist/cjs/ui/confluence-search-modal/confluence-search-container/index.js +48 -0
- package/dist/cjs/ui/confluence-search-modal/confluence-search-container/messages.js +14 -0
- package/dist/cjs/ui/confluence-search-modal/modal/index.js +206 -42
- package/dist/cjs/ui/confluence-search-modal/modal/messages.js +4 -4
- package/dist/cjs/ui/confluence-search-modal/types.js +5 -0
- package/dist/cjs/ui/issue-like-table/column-picker/concatenated-menu-list.js +2 -1
- package/dist/cjs/ui/issue-like-table/drag-column-preview.js +2 -1
- package/dist/cjs/ui/issue-like-table/index.js +4 -1
- package/dist/cjs/ui/issue-like-table/styled.js +2 -1
- package/dist/cjs/ui/jira-issues-modal/modal/index.js +14 -21
- package/dist/cjs/ui/jira-issues-modal/modal/messages.js +5 -0
- package/dist/cjs/ui/jira-issues-modal/mode-switcher/index.js +1 -0
- package/dist/es2019/ui/assets-modal/modal/render-assets-content/initial-state-view/index.js +2 -1
- package/dist/es2019/ui/common/error-state/access-required.js +2 -1
- package/dist/es2019/ui/common/error-state/loading-error.js +2 -1
- package/dist/es2019/ui/common/error-state/messages.js +0 -11
- package/dist/es2019/ui/common/error-state/modal-loading-error.js +4 -10
- package/dist/es2019/ui/common/error-state/no-instances.js +2 -1
- package/dist/es2019/ui/common/error-state/no-results.js +2 -1
- package/dist/es2019/ui/common/initial-state-view/index.js +2 -1
- package/dist/es2019/ui/common/modal/content-container/index.js +30 -0
- package/dist/es2019/ui/confluence-search-modal/confluence-search-container/index.js +35 -0
- package/dist/es2019/ui/confluence-search-modal/confluence-search-container/messages.js +8 -0
- package/dist/es2019/ui/confluence-search-modal/modal/index.js +191 -41
- package/dist/es2019/ui/confluence-search-modal/modal/messages.js +4 -4
- package/dist/es2019/ui/confluence-search-modal/types.js +1 -0
- package/dist/es2019/ui/issue-like-table/column-picker/concatenated-menu-list.js +2 -1
- package/dist/es2019/ui/issue-like-table/drag-column-preview.js +2 -1
- package/dist/es2019/ui/issue-like-table/index.js +7 -1
- package/dist/es2019/ui/issue-like-table/styled.js +2 -1
- package/dist/es2019/ui/jira-issues-modal/modal/index.js +14 -23
- package/dist/es2019/ui/jira-issues-modal/modal/messages.js +5 -0
- package/dist/es2019/ui/jira-issues-modal/mode-switcher/index.js +1 -0
- package/dist/esm/ui/assets-modal/modal/render-assets-content/initial-state-view/index.js +2 -1
- package/dist/esm/ui/common/error-state/access-required.js +2 -1
- package/dist/esm/ui/common/error-state/loading-error.js +2 -1
- package/dist/esm/ui/common/error-state/messages.js +0 -11
- package/dist/esm/ui/common/error-state/modal-loading-error.js +5 -12
- package/dist/esm/ui/common/error-state/no-instances.js +2 -1
- package/dist/esm/ui/common/error-state/no-results.js +2 -1
- package/dist/esm/ui/common/initial-state-view/index.js +2 -1
- package/dist/esm/ui/common/modal/content-container/index.js +29 -0
- package/dist/esm/ui/confluence-search-modal/confluence-search-container/index.js +38 -0
- package/dist/esm/ui/confluence-search-modal/confluence-search-container/messages.js +8 -0
- package/dist/esm/ui/confluence-search-modal/modal/index.js +210 -44
- package/dist/esm/ui/confluence-search-modal/modal/messages.js +4 -4
- package/dist/esm/ui/confluence-search-modal/types.js +1 -0
- package/dist/esm/ui/issue-like-table/column-picker/concatenated-menu-list.js +2 -1
- package/dist/esm/ui/issue-like-table/drag-column-preview.js +2 -1
- package/dist/esm/ui/issue-like-table/index.js +4 -1
- package/dist/esm/ui/issue-like-table/styled.js +2 -1
- package/dist/esm/ui/jira-issues-modal/modal/index.js +16 -23
- package/dist/esm/ui/jira-issues-modal/modal/messages.js +5 -0
- package/dist/esm/ui/jira-issues-modal/mode-switcher/index.js +1 -0
- package/dist/types/common/types.d.ts +3 -6
- package/dist/types/ui/common/error-state/messages.d.ts +0 -10
- package/dist/types/ui/common/error-state/modal-loading-error.d.ts +3 -2
- package/dist/types/ui/common/modal/content-container/index.d.ts +8 -0
- package/dist/types/ui/confluence-search-modal/confluence-search-container/index.d.ts +9 -0
- package/dist/types/ui/confluence-search-modal/confluence-search-container/messages.d.ts +7 -0
- package/dist/types/ui/confluence-search-modal/index.d.ts +2 -2
- package/dist/types/ui/confluence-search-modal/modal/index.d.ts +2 -2
- package/dist/types/ui/confluence-search-modal/modal/messages.d.ts +1 -1
- package/dist/types/ui/confluence-search-modal/types.d.ts +12 -0
- package/dist/types/ui/jira-issues-modal/index.d.ts +2 -2
- package/dist/types/ui/jira-issues-modal/modal/index.d.ts +3 -13
- package/dist/types/ui/jira-issues-modal/modal/messages.d.ts +5 -0
- package/dist/types/ui/jira-issues-modal/types.d.ts +5 -1
- package/dist/types-ts4.5/common/types.d.ts +3 -6
- package/dist/types-ts4.5/ui/common/error-state/messages.d.ts +0 -10
- package/dist/types-ts4.5/ui/common/error-state/modal-loading-error.d.ts +3 -2
- package/dist/types-ts4.5/ui/common/modal/content-container/index.d.ts +8 -0
- package/dist/types-ts4.5/ui/confluence-search-modal/confluence-search-container/index.d.ts +9 -0
- package/dist/types-ts4.5/ui/confluence-search-modal/confluence-search-container/messages.d.ts +7 -0
- package/dist/types-ts4.5/ui/confluence-search-modal/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/confluence-search-modal/modal/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/confluence-search-modal/modal/messages.d.ts +1 -1
- package/dist/types-ts4.5/ui/confluence-search-modal/types.d.ts +12 -0
- package/dist/types-ts4.5/ui/jira-issues-modal/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/jira-issues-modal/modal/index.d.ts +3 -13
- package/dist/types-ts4.5/ui/jira-issues-modal/modal/messages.d.ts +5 -0
- package/dist/types-ts4.5/ui/jira-issues-modal/types.d.ts +5 -1
- package/examples-helpers/buildConfluenceSearchTable.tsx +77 -0
- package/examples-helpers/mockSmartLinkData.ts +44 -0
- package/examples-helpers/smartLinkCustomClient.ts +31 -20
- package/package.json +3 -3
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
import { Box, xcss } from '@atlaskit/primitives';
|
|
5
|
+
import { N40 } from '@atlaskit/theme/colors';
|
|
6
|
+
import { scrollableContainerShadowsCssComponents } from '../../../issue-like-table';
|
|
7
|
+
var contentContainerStyles = xcss({
|
|
8
|
+
display: 'grid',
|
|
9
|
+
maxHeight: '420px',
|
|
10
|
+
overflow: 'auto',
|
|
11
|
+
borderBottom: "2px solid ".concat("var(--ds-background-accent-gray-subtler, ".concat(N40, ")")),
|
|
12
|
+
backgroundImage: scrollableContainerShadowsCssComponents.backgroundImage,
|
|
13
|
+
backgroundPosition: scrollableContainerShadowsCssComponents.backgroundPosition,
|
|
14
|
+
backgroundRepeat: scrollableContainerShadowsCssComponents.backgroundRepeat,
|
|
15
|
+
backgroundSize: scrollableContainerShadowsCssComponents.backgroundSize,
|
|
16
|
+
backgroundAttachment: scrollableContainerShadowsCssComponents.backgroundAttachment
|
|
17
|
+
});
|
|
18
|
+
var tableContainerStyles = xcss({
|
|
19
|
+
borderTopLeftRadius: "var(--ds-border-radius-200, 8px)",
|
|
20
|
+
borderTopRightRadius: "var(--ds-border-radius-200, 8px)",
|
|
21
|
+
border: "1px solid ".concat("var(--ds-border, ".concat(N40, ")"))
|
|
22
|
+
});
|
|
23
|
+
export var ContentContainer = function ContentContainer(_ref) {
|
|
24
|
+
var children = _ref.children,
|
|
25
|
+
withTableBorder = _ref.withTableBorder;
|
|
26
|
+
return jsx(Box, {
|
|
27
|
+
xcss: [contentContainerStyles, withTableBorder && tableContainerStyles]
|
|
28
|
+
}, children);
|
|
29
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
+
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
3
|
+
import { BasicSearchInput } from '../../common/modal/basic-search-input';
|
|
4
|
+
import { searchMessages } from './messages';
|
|
5
|
+
var ConfluenceSearchContainer = function ConfluenceSearchContainer(_ref) {
|
|
6
|
+
var cloudId = _ref.cloudId,
|
|
7
|
+
initialSearchValue = _ref.initialSearchValue,
|
|
8
|
+
isSearching = _ref.isSearching,
|
|
9
|
+
onSearch = _ref.onSearch;
|
|
10
|
+
var currentCloudId = useRef(cloudId);
|
|
11
|
+
var _useState = useState(initialSearchValue !== null && initialSearchValue !== void 0 ? initialSearchValue : ''),
|
|
12
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
13
|
+
searchBarSearchString = _useState2[0],
|
|
14
|
+
setSearchBarSearchString = _useState2[1];
|
|
15
|
+
var handleSearchChange = useCallback(function (e) {
|
|
16
|
+
var rawSearch = e.currentTarget.value;
|
|
17
|
+
setSearchBarSearchString(rawSearch);
|
|
18
|
+
}, []);
|
|
19
|
+
|
|
20
|
+
// TODO: further refactoring in EDM-9573
|
|
21
|
+
// https://stash.atlassian.com/projects/ATLASSIAN/repos/atlassian-frontend-monorepo/pull-requests/82725/overview?commentId=6827913
|
|
22
|
+
useEffect(function () {
|
|
23
|
+
if (currentCloudId.current !== cloudId) {
|
|
24
|
+
setSearchBarSearchString('');
|
|
25
|
+
currentCloudId.current = cloudId;
|
|
26
|
+
}
|
|
27
|
+
}, [cloudId]);
|
|
28
|
+
return /*#__PURE__*/React.createElement(BasicSearchInput, {
|
|
29
|
+
testId: "confluence-search-datasource-modal--search-input",
|
|
30
|
+
isSearching: isSearching,
|
|
31
|
+
onChange: handleSearchChange,
|
|
32
|
+
onSearch: onSearch,
|
|
33
|
+
searchTerm: searchBarSearchString,
|
|
34
|
+
placeholder: searchMessages.searchLabel,
|
|
35
|
+
fullWidth: true
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
export default ConfluenceSearchContainer;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { defineMessages } from 'react-intl-next';
|
|
2
|
+
export var searchMessages = defineMessages({
|
|
3
|
+
searchLabel: {
|
|
4
|
+
id: 'linkDataSource.confluence-search.configmodal.searchLabel',
|
|
5
|
+
description: 'Placeholder text for the search input box',
|
|
6
|
+
defaultMessage: 'Enter keywords to find pages, attachments, and more'
|
|
7
|
+
}
|
|
8
|
+
});
|
|
@@ -1,40 +1,57 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
1
3
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
4
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
5
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
6
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
|
+
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; }
|
|
4
8
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
5
9
|
/** @jsx jsx */
|
|
6
|
-
import { Fragment, useCallback, useEffect, useMemo, useState } from 'react';
|
|
10
|
+
import { Fragment, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
7
11
|
import { jsx } from '@emotion/react';
|
|
8
|
-
import { FormattedMessage } from 'react-intl-next';
|
|
12
|
+
import { FormattedMessage, FormattedNumber } from 'react-intl-next';
|
|
13
|
+
import { v4 as uuidv4 } from 'uuid';
|
|
9
14
|
import Button from '@atlaskit/button/standard-button';
|
|
10
15
|
import { IntlMessagesProvider } from '@atlaskit/intl-messages-provider';
|
|
11
16
|
import Modal, { ModalBody, ModalFooter, ModalHeader, ModalTitle } from '@atlaskit/modal-dialog';
|
|
17
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
12
18
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
13
|
-
import
|
|
19
|
+
import LinkUrl from '@atlaskit/smart-card/link-url';
|
|
20
|
+
import { N800 } from '@atlaskit/theme/colors';
|
|
14
21
|
import { fetchMessagesForLocale } from '../../../common/utils/locale/fetch-messages-for-locale';
|
|
22
|
+
import { useDatasourceTableState } from '../../../hooks/useDatasourceTableState';
|
|
15
23
|
import i18nEN from '../../../i18n/en';
|
|
16
24
|
import { getAvailableSites } from '../../../services/getAvailableSites';
|
|
25
|
+
import { AccessRequired } from '../../common/error-state/access-required';
|
|
26
|
+
import { ModalLoadingError } from '../../common/error-state/modal-loading-error';
|
|
17
27
|
import { NoInstancesView } from '../../common/error-state/no-instances';
|
|
28
|
+
import { NoResults } from '../../common/error-state/no-results';
|
|
18
29
|
import { InitialStateView } from '../../common/initial-state-view';
|
|
19
|
-
import {
|
|
30
|
+
import { ContentContainer } from '../../common/modal/content-container';
|
|
20
31
|
import { SiteSelector } from '../../common/modal/site-selector';
|
|
21
|
-
import {
|
|
32
|
+
import { EmptyState, IssueLikeDataTableView } from '../../issue-like-table';
|
|
33
|
+
import ConfluenceSearchContainer from '../confluence-search-container';
|
|
22
34
|
import { ConfluenceSearchInitialStateSVG } from './confluence-search-initial-state-svg';
|
|
23
35
|
import { confluenceSearchModalMessages } from './messages';
|
|
24
|
-
var
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
backgroundSize: scrollableContainerShadowsCssComponents.backgroundSize,
|
|
33
|
-
backgroundAttachment: scrollableContainerShadowsCssComponents.backgroundAttachment
|
|
36
|
+
var inputContainerStyles = xcss({
|
|
37
|
+
alignItems: 'baseline',
|
|
38
|
+
display: 'flex',
|
|
39
|
+
minHeight: '72px'
|
|
40
|
+
});
|
|
41
|
+
var searchCountStyles = xcss({
|
|
42
|
+
flex: 1,
|
|
43
|
+
fontWeight: 600
|
|
34
44
|
});
|
|
35
45
|
export var ConfluenceSearchConfigModal = function ConfluenceSearchConfigModal(props) {
|
|
36
|
-
var
|
|
37
|
-
|
|
46
|
+
var _useRef = useRef(uuidv4()),
|
|
47
|
+
modalRenderInstanceId = _useRef.current;
|
|
48
|
+
var datasourceId = props.datasourceId,
|
|
49
|
+
initialColumnCustomSizes = props.columnCustomSizes,
|
|
50
|
+
initialWrappedColumnKeys = props.wrappedColumnKeys,
|
|
51
|
+
onCancel = props.onCancel,
|
|
52
|
+
initialParameters = props.parameters,
|
|
53
|
+
urlBeingEdited = props.url,
|
|
54
|
+
initialVisibleColumnKeys = props.visibleColumnKeys;
|
|
38
55
|
var _useState = useState(undefined),
|
|
39
56
|
_useState2 = _slicedToArray(_useState, 2),
|
|
40
57
|
availableSites = _useState2[0],
|
|
@@ -43,13 +60,44 @@ export var ConfluenceSearchConfigModal = function ConfluenceSearchConfigModal(pr
|
|
|
43
60
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
44
61
|
cloudId = _useState4[0],
|
|
45
62
|
setCloudId = _useState4[1];
|
|
46
|
-
var _useState5 = useState(
|
|
63
|
+
var _useState5 = useState(initialParameters === null || initialParameters === void 0 ? void 0 : initialParameters.searchString),
|
|
47
64
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
var
|
|
51
|
-
|
|
52
|
-
|
|
65
|
+
searchString = _useState6[0],
|
|
66
|
+
setSearchString = _useState6[1];
|
|
67
|
+
var _useState7 = useState(initialVisibleColumnKeys),
|
|
68
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
69
|
+
visibleColumnKeys = _useState8[0],
|
|
70
|
+
setVisibleColumnKeys = _useState8[1];
|
|
71
|
+
|
|
72
|
+
// TODO: further refactoring in EDM-9573
|
|
73
|
+
// https://stash.atlassian.com/projects/ATLASSIAN/repos/atlassian-frontend-monorepo/pull-requests/82725/overview?commentId=6829210
|
|
74
|
+
var parameters = useMemo(function () {
|
|
75
|
+
return cloudId ? {
|
|
76
|
+
cloudId: cloudId,
|
|
77
|
+
searchString: searchString
|
|
78
|
+
} : undefined;
|
|
79
|
+
}, [cloudId, searchString /** Add more parameters when more filters are added */]);
|
|
80
|
+
var isParametersSet = useMemo(function () {
|
|
81
|
+
return !!cloudId && Object.values(parameters !== null && parameters !== void 0 ? parameters : {}).filter(function (v) {
|
|
82
|
+
return v !== undefined;
|
|
83
|
+
}).length > 1;
|
|
84
|
+
}, [cloudId, parameters]);
|
|
85
|
+
var _useDatasourceTableSt = useDatasourceTableState({
|
|
86
|
+
datasourceId: datasourceId,
|
|
87
|
+
parameters: isParametersSet ? parameters : undefined,
|
|
88
|
+
fieldKeys: visibleColumnKeys
|
|
89
|
+
}),
|
|
90
|
+
reset = _useDatasourceTableSt.reset,
|
|
91
|
+
status = _useDatasourceTableSt.status,
|
|
92
|
+
onNextPage = _useDatasourceTableSt.onNextPage,
|
|
93
|
+
responseItems = _useDatasourceTableSt.responseItems,
|
|
94
|
+
hasNextPage = _useDatasourceTableSt.hasNextPage,
|
|
95
|
+
columns = _useDatasourceTableSt.columns,
|
|
96
|
+
defaultVisibleColumnKeys = _useDatasourceTableSt.defaultVisibleColumnKeys,
|
|
97
|
+
loadDatasourceDetails = _useDatasourceTableSt.loadDatasourceDetails,
|
|
98
|
+
_useDatasourceTableSt2 = _useDatasourceTableSt.extensionKey,
|
|
99
|
+
extensionKey = _useDatasourceTableSt2 === void 0 ? null : _useDatasourceTableSt2,
|
|
100
|
+
totalCount = _useDatasourceTableSt.totalCount;
|
|
53
101
|
var hasNoConfluenceSites = availableSites && availableSites.length === 0;
|
|
54
102
|
var selectedConfluenceSite = useMemo(function () {
|
|
55
103
|
if (cloudId) {
|
|
@@ -66,10 +114,24 @@ export var ConfluenceSearchConfigModal = function ConfluenceSearchConfigModal(pr
|
|
|
66
114
|
})) || (availableSites === null || availableSites === void 0 ? void 0 : availableSites[0]);
|
|
67
115
|
}
|
|
68
116
|
}, [availableSites, cloudId]);
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
117
|
+
|
|
118
|
+
// TODO: further refactoring in EDM-9573
|
|
119
|
+
// https://stash.atlassian.com/projects/ATLASSIAN/repos/atlassian-frontend-monorepo/pull-requests/82725/overview?commentId=6828283
|
|
120
|
+
useEffect(function () {
|
|
121
|
+
if (selectedConfluenceSite && (!cloudId || cloudId !== selectedConfluenceSite.cloudId)) {
|
|
122
|
+
setCloudId(selectedConfluenceSite.cloudId);
|
|
123
|
+
}
|
|
124
|
+
}, [cloudId, selectedConfluenceSite]);
|
|
125
|
+
|
|
126
|
+
// TODO: further refactoring in EDM-9573
|
|
127
|
+
// https://stash.atlassian.com/projects/ATLASSIAN/repos/atlassian-frontend-monorepo/pull-requests/82725/overview?commentId=6829171
|
|
128
|
+
var onSiteSelection = useCallback(function (site) {
|
|
129
|
+
setSearchString(undefined);
|
|
130
|
+
setCloudId(site.cloudId);
|
|
131
|
+
reset({
|
|
132
|
+
shouldForceRequest: true
|
|
133
|
+
});
|
|
134
|
+
}, [reset]);
|
|
73
135
|
useEffect(function () {
|
|
74
136
|
var fetchSiteDisplayNames = /*#__PURE__*/function () {
|
|
75
137
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
@@ -98,6 +160,101 @@ export var ConfluenceSearchConfigModal = function ConfluenceSearchConfigModal(pr
|
|
|
98
160
|
void fetchSiteDisplayNames();
|
|
99
161
|
}, []);
|
|
100
162
|
var siteSelectorLabel = availableSites && availableSites.length > 1 ? confluenceSearchModalMessages.insertIssuesTitleManySites : confluenceSearchModalMessages.insertIssuesTitle;
|
|
163
|
+
var _useState9 = useState(initialColumnCustomSizes),
|
|
164
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
165
|
+
columnCustomSizes = _useState10[0],
|
|
166
|
+
setColumnCustomSizes = _useState10[1];
|
|
167
|
+
var onColumnResize = useCallback(function (key, width) {
|
|
168
|
+
setColumnCustomSizes(_objectSpread(_objectSpread({}, columnCustomSizes), {}, _defineProperty({}, key, width)));
|
|
169
|
+
}, [columnCustomSizes]);
|
|
170
|
+
var _useState11 = useState(initialWrappedColumnKeys),
|
|
171
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
172
|
+
wrappedColumnKeys = _useState12[0],
|
|
173
|
+
setWrappedColumnKeys = _useState12[1];
|
|
174
|
+
var onWrappedColumnChange = useCallback(function (key, isWrapped) {
|
|
175
|
+
var set = new Set(wrappedColumnKeys);
|
|
176
|
+
if (isWrapped) {
|
|
177
|
+
set.add(key);
|
|
178
|
+
} else {
|
|
179
|
+
set.delete(key);
|
|
180
|
+
}
|
|
181
|
+
setWrappedColumnKeys(Array.from(set));
|
|
182
|
+
}, [wrappedColumnKeys]);
|
|
183
|
+
|
|
184
|
+
// TODO: further refactoring in EDM-9573
|
|
185
|
+
// https://stash.atlassian.com/projects/ATLASSIAN/repos/atlassian-frontend-monorepo/pull-requests/82725/overview?commentId=6798258
|
|
186
|
+
var confluenceSearchTable = useMemo(function () {
|
|
187
|
+
return jsx(ContentContainer, {
|
|
188
|
+
withTableBorder: true
|
|
189
|
+
}, jsx(IssueLikeDataTableView, {
|
|
190
|
+
testId: "confluence-search-datasource-table",
|
|
191
|
+
status: status,
|
|
192
|
+
columns: columns,
|
|
193
|
+
items: responseItems,
|
|
194
|
+
hasNextPage: hasNextPage,
|
|
195
|
+
visibleColumnKeys: visibleColumnKeys || defaultVisibleColumnKeys,
|
|
196
|
+
onNextPage: onNextPage,
|
|
197
|
+
onLoadDatasourceDetails: loadDatasourceDetails,
|
|
198
|
+
onVisibleColumnKeysChange: setVisibleColumnKeys,
|
|
199
|
+
parentContainerRenderInstanceId: modalRenderInstanceId,
|
|
200
|
+
extensionKey: extensionKey,
|
|
201
|
+
columnCustomSizes: columnCustomSizes,
|
|
202
|
+
onColumnResize: onColumnResize,
|
|
203
|
+
wrappedColumnKeys: wrappedColumnKeys,
|
|
204
|
+
onWrappedColumnChange: getBooleanFF('platform.linking-platform.datasource-word_wrap') ? onWrappedColumnChange : undefined
|
|
205
|
+
}));
|
|
206
|
+
}, [status, columns, responseItems, hasNextPage, visibleColumnKeys, defaultVisibleColumnKeys, onNextPage, loadDatasourceDetails, setVisibleColumnKeys, modalRenderInstanceId, extensionKey, columnCustomSizes, onColumnResize, wrappedColumnKeys, onWrappedColumnChange]);
|
|
207
|
+
var resolvedWithNoResults = status === 'resolved' && !responseItems.length;
|
|
208
|
+
var hasConfluenceSearchParams = selectedConfluenceSite && searchString;
|
|
209
|
+
var selectedConfluenceSiteUrl = selectedConfluenceSite === null || selectedConfluenceSite === void 0 ? void 0 : selectedConfluenceSite.url;
|
|
210
|
+
var confluenceSearchUrl = selectedConfluenceSiteUrl && searchString !== undefined && "".concat(selectedConfluenceSiteUrl, "/wiki/search/?text=").concat(encodeURI(searchString));
|
|
211
|
+
var renderModalContent = useCallback(function () {
|
|
212
|
+
if (status === 'rejected') {
|
|
213
|
+
return jsx(ModalLoadingError, null);
|
|
214
|
+
} else if (status === 'unauthorized') {
|
|
215
|
+
return jsx(AccessRequired, {
|
|
216
|
+
url: selectedConfluenceSiteUrl || urlBeingEdited
|
|
217
|
+
});
|
|
218
|
+
} else if (resolvedWithNoResults || status === 'forbidden') {
|
|
219
|
+
return jsx(NoResults, null);
|
|
220
|
+
} else if (status === 'empty' || !columns.length) {
|
|
221
|
+
// persist the empty state when making the initial /data request which contains the columns
|
|
222
|
+
if (hasConfluenceSearchParams !== undefined) {
|
|
223
|
+
return jsx(EmptyState, {
|
|
224
|
+
testId: "confluence-search-datasource-modal--empty-state"
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
return jsx(ContentContainer, null, jsx(InitialStateView, {
|
|
228
|
+
icon: jsx(ConfluenceSearchInitialStateSVG, null),
|
|
229
|
+
title: confluenceSearchModalMessages.initialViewSearchTitle,
|
|
230
|
+
description: confluenceSearchModalMessages.initialViewSearchDescription
|
|
231
|
+
}));
|
|
232
|
+
}
|
|
233
|
+
return confluenceSearchTable;
|
|
234
|
+
}, [columns.length, selectedConfluenceSiteUrl, confluenceSearchTable, resolvedWithNoResults, status, urlBeingEdited, hasConfluenceSearchParams]);
|
|
235
|
+
var shouldShowResultsCount = !!totalCount && totalCount !== 1;
|
|
236
|
+
var onInsertPressed = useCallback(function () {
|
|
237
|
+
// eslint-disable-next-line no-console
|
|
238
|
+
// TODO: Implement onInsert in EDM-9412
|
|
239
|
+
/**
|
|
240
|
+
* onInsert(
|
|
241
|
+
{
|
|
242
|
+
type: 'inlineCard',
|
|
243
|
+
attrs: {
|
|
244
|
+
url,
|
|
245
|
+
},
|
|
246
|
+
} as InlineCardAdf,
|
|
247
|
+
consumerEvent,
|
|
248
|
+
);
|
|
249
|
+
*/
|
|
250
|
+
}, []);
|
|
251
|
+
var onSearch = useCallback(function (newSearchString) {
|
|
252
|
+
setSearchString(newSearchString);
|
|
253
|
+
reset({
|
|
254
|
+
shouldForceRequest: true
|
|
255
|
+
});
|
|
256
|
+
}, [reset]);
|
|
257
|
+
var isInsertDisabled = !isParametersSet || status === 'rejected' || status === 'unauthorized' || status === 'loading';
|
|
101
258
|
return jsx(IntlMessagesProvider, {
|
|
102
259
|
defaultMessages: i18nEN,
|
|
103
260
|
loaderFn: fetchMessagesForLocale
|
|
@@ -112,31 +269,40 @@ export var ConfluenceSearchConfigModal = function ConfluenceSearchConfigModal(pr
|
|
|
112
269
|
selectedSite: selectedConfluenceSite,
|
|
113
270
|
testId: "confluence-search-datasource-modal--site-selector",
|
|
114
271
|
label: siteSelectorLabel
|
|
115
|
-
}))), jsx(ModalBody, null, !hasNoConfluenceSites ? jsx(Fragment, null, jsx(
|
|
116
|
-
|
|
272
|
+
}))), jsx(ModalBody, null, !hasNoConfluenceSites ? jsx(Fragment, null, jsx(Box, {
|
|
273
|
+
xcss: inputContainerStyles
|
|
274
|
+
}, jsx(ConfluenceSearchContainer, {
|
|
275
|
+
cloudId: cloudId,
|
|
117
276
|
isSearching: status === 'loading',
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
placeholder: confluenceSearchModalMessages.searchLabel,
|
|
122
|
-
fullWidth: true
|
|
123
|
-
}), jsx(Box, {
|
|
124
|
-
xcss: contentContainerStyles
|
|
125
|
-
}, jsx(InitialStateView, {
|
|
126
|
-
icon: jsx(ConfluenceSearchInitialStateSVG, null),
|
|
127
|
-
title: confluenceSearchModalMessages.initialViewSearchTitle,
|
|
128
|
-
description: confluenceSearchModalMessages.initialViewSearchDescription
|
|
129
|
-
}))) : jsx(NoInstancesView, {
|
|
277
|
+
onSearch: onSearch,
|
|
278
|
+
initialSearchValue: initialParameters === null || initialParameters === void 0 ? void 0 : initialParameters.searchString
|
|
279
|
+
})), renderModalContent()) : jsx(NoInstancesView, {
|
|
130
280
|
title: confluenceSearchModalMessages.noAccessToConfluenceSitesTitle,
|
|
131
281
|
description: confluenceSearchModalMessages.noAccessToConfluenceSitesDescription,
|
|
132
282
|
testId: 'no-confluence-instances-content'
|
|
133
|
-
})), jsx(ModalFooter, null, jsx(
|
|
283
|
+
})), jsx(ModalFooter, null, shouldShowResultsCount && confluenceSearchUrl && jsx(Box, {
|
|
284
|
+
testId: "confluence-search-datasource-modal-total-results-count",
|
|
285
|
+
xcss: searchCountStyles
|
|
286
|
+
}, jsx(LinkUrl, {
|
|
287
|
+
href: confluenceSearchUrl,
|
|
288
|
+
target: "_blank",
|
|
289
|
+
testId: "item-count-url",
|
|
290
|
+
style: {
|
|
291
|
+
color: "var(--ds-text-accent-gray, ".concat(N800, ")")
|
|
292
|
+
}
|
|
293
|
+
}, jsx(FormattedNumber, {
|
|
294
|
+
value: totalCount
|
|
295
|
+
}), ' ', jsx(FormattedMessage, _extends({}, confluenceSearchModalMessages.searchCountText, {
|
|
296
|
+
values: {
|
|
297
|
+
totalCount: totalCount
|
|
298
|
+
}
|
|
299
|
+
})))), jsx(Button, {
|
|
134
300
|
appearance: "default",
|
|
135
301
|
onClick: onCancel
|
|
136
302
|
}, jsx(FormattedMessage, confluenceSearchModalMessages.cancelButtonText)), !hasNoConfluenceSites && jsx(Button, {
|
|
137
303
|
appearance: "primary",
|
|
138
|
-
onClick:
|
|
139
|
-
isDisabled:
|
|
304
|
+
onClick: onInsertPressed,
|
|
305
|
+
isDisabled: isInsertDisabled,
|
|
140
306
|
testId: "confluence-search-datasource-modal--insert-button"
|
|
141
307
|
}, jsx(FormattedMessage, confluenceSearchModalMessages.insertResultsButtonText)))));
|
|
142
308
|
};
|
|
@@ -10,10 +10,10 @@ export var confluenceSearchModalMessages = defineMessages({
|
|
|
10
10
|
description: 'Button text to insert the displayed content',
|
|
11
11
|
defaultMessage: 'Insert results'
|
|
12
12
|
},
|
|
13
|
-
|
|
14
|
-
id: 'linkDataSource.confluence-search.configmodal.
|
|
15
|
-
description: '
|
|
16
|
-
defaultMessage: '
|
|
13
|
+
searchCountText: {
|
|
14
|
+
id: 'linkDataSource.confluence-search.configmodal.resultsCountText',
|
|
15
|
+
description: 'Text that appears after search count number.',
|
|
16
|
+
defaultMessage: '{totalCount, plural, one {result} other {results}}'
|
|
17
17
|
},
|
|
18
18
|
insertIssuesTitle: {
|
|
19
19
|
id: 'linkDataSource.confluence-search.configmodal.insertConfluenceTitle',
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -5,11 +5,12 @@ var _excluded = ["children"];
|
|
|
5
5
|
import { css, jsx } from '@emotion/react';
|
|
6
6
|
import { FormattedMessage } from 'react-intl-next';
|
|
7
7
|
import { components } from '@atlaskit/select';
|
|
8
|
+
import { fontFallback } from '@atlaskit/theme/typography';
|
|
8
9
|
import { columnPickerMessages } from './messages';
|
|
9
10
|
export var SELECT_ITEMS_MAXIMUM_THRESHOLD = 200;
|
|
10
11
|
var messageStyles = css({
|
|
11
12
|
color: "var(--ds-text-subtle, #44546F)",
|
|
12
|
-
font: "var(--ds-font-body-small,
|
|
13
|
+
font: "var(--ds-font-body-small, ".concat(fontFallback.body.small, ")"),
|
|
13
14
|
fontWeight: "var(--ds-font-weight-regular, 400)"
|
|
14
15
|
});
|
|
15
16
|
export var ConcatenatedMenuList = function ConcatenatedMenuList(_ref) {
|
|
@@ -3,6 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import { css, jsx } from '@emotion/react';
|
|
4
4
|
import styled from '@emotion/styled';
|
|
5
5
|
import { N40 } from '@atlaskit/theme/colors';
|
|
6
|
+
import { fontFallback } from '@atlaskit/theme/typography';
|
|
6
7
|
import { TableHeading } from './styled';
|
|
7
8
|
var maxWidth = '200px';
|
|
8
9
|
var firstLastChildOverride = "\n &:first-of-type, &:last-of-type {\n padding-left: ".concat("var(--ds-space-100, 8px)", ";\n padding-right: ", "var(--ds-space-100, 8px)", ";\n }\n");
|
|
@@ -27,7 +28,7 @@ var tableStyles = css({
|
|
|
27
28
|
background: "var(--ds-surface, #FFF)",
|
|
28
29
|
borderCollapse: 'separate',
|
|
29
30
|
borderSpacing: 0,
|
|
30
|
-
font: "var(--ds-font-body,
|
|
31
|
+
font: "var(--ds-font-body, ".concat(fontFallback.body.medium, ")"),
|
|
31
32
|
maxWidth: maxWidth
|
|
32
33
|
});
|
|
33
34
|
export var DragColumnPreview = function DragColumnPreview(_ref) {
|
|
@@ -20,6 +20,7 @@ import { autoScroller } from '@atlaskit/pragmatic-drag-and-drop-react-beautiful-
|
|
|
20
20
|
import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
|
|
21
21
|
import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
|
|
22
22
|
import { N40 } from '@atlaskit/theme/colors';
|
|
23
|
+
import { fontFallback } from '@atlaskit/theme/typography';
|
|
23
24
|
import Tooltip from '@atlaskit/tooltip';
|
|
24
25
|
import { startUfoExperience, succeedUfoExperience } from '../../analytics/ufoExperiences';
|
|
25
26
|
import { stickyTableHeadersIndex } from '../../common/zindex';
|
|
@@ -78,6 +79,8 @@ var TableCell = styled.td((_styled$td = {}, _defineProperty(_styled$td, "".conca
|
|
|
78
79
|
}), _defineProperty(_styled$td, "".concat(withTablePluginBodyPrefix('&:last-child')), {
|
|
79
80
|
borderRight: 0,
|
|
80
81
|
paddingRight: "var(--ds-space-100, 8px)"
|
|
82
|
+
}), _defineProperty(_styled$td, "& [data-testid='inline-card-icon-and-title'], " + "& [data-testid='button-connect-account'] > span", {
|
|
83
|
+
whiteSpace: 'unset'
|
|
81
84
|
}), _styled$td));
|
|
82
85
|
var tableContainerStyles = css({
|
|
83
86
|
borderRadius: 'inherit',
|
|
@@ -188,7 +191,7 @@ var noDefaultBorderStyles = css({
|
|
|
188
191
|
borderBottom: 0
|
|
189
192
|
});
|
|
190
193
|
var headerStyles = css({
|
|
191
|
-
font: "var(--ds-font-body-UNSAFE_small,
|
|
194
|
+
font: "var(--ds-font-body-UNSAFE_small, ".concat(fontFallback.body.UNSAFE_small, ")"),
|
|
192
195
|
fontWeight: "var(--ds-font-weight-medium, 500)"
|
|
193
196
|
});
|
|
194
197
|
var headingHoverEffectStyles = css({
|
|
@@ -2,8 +2,9 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
var _styled$th;
|
|
3
3
|
import styled from '@emotion/styled';
|
|
4
4
|
import { N40 } from '@atlaskit/theme/colors';
|
|
5
|
+
import { fontFallback } from '@atlaskit/theme/typography';
|
|
5
6
|
export var ScrollableContainerHeight = 590;
|
|
6
|
-
export var fieldTextFontSize = "var(--ds-font-body,
|
|
7
|
+
export var fieldTextFontSize = "var(--ds-font-body, ".concat(fontFallback.body.medium, ")");
|
|
7
8
|
export var Table = styled.table({
|
|
8
9
|
width: '100%'
|
|
9
10
|
});
|
|
@@ -17,7 +17,7 @@ import { IntlMessagesProvider } from '@atlaskit/intl-messages-provider';
|
|
|
17
17
|
import Modal, { ModalBody, ModalFooter, ModalHeader, ModalTitle, ModalTransition } from '@atlaskit/modal-dialog';
|
|
18
18
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
19
19
|
import LinkUrl from '@atlaskit/smart-card/link-url';
|
|
20
|
-
import { B400, N0,
|
|
20
|
+
import { B400, N0, N800 } from '@atlaskit/theme/colors';
|
|
21
21
|
import { EVENT_CHANNEL, useDatasourceAnalyticsEvents } from '../../../analytics';
|
|
22
22
|
import { componentMetadata } from '../../../analytics/constants';
|
|
23
23
|
import { DatasourceAction, DatasourceDisplay } from '../../../analytics/types';
|
|
@@ -37,8 +37,9 @@ import { NoInstancesView } from '../../common/error-state/no-instances';
|
|
|
37
37
|
import { NoResults } from '../../common/error-state/no-results';
|
|
38
38
|
import { InitialStateView } from '../../common/initial-state-view';
|
|
39
39
|
import { initialStateViewMessages } from '../../common/initial-state-view/messages';
|
|
40
|
+
import { ContentContainer } from '../../common/modal/content-container';
|
|
40
41
|
import { SiteSelector } from '../../common/modal/site-selector';
|
|
41
|
-
import { EmptyState, IssueLikeDataTableView
|
|
42
|
+
import { EmptyState, IssueLikeDataTableView } from '../../issue-like-table';
|
|
42
43
|
import LinkRenderType from '../../issue-like-table/render-type/link';
|
|
43
44
|
import { availableBasicFilterTypes } from '../basic-filters/ui';
|
|
44
45
|
import { isQueryTooComplex } from '../basic-filters/utils/isQueryTooComplex';
|
|
@@ -46,22 +47,6 @@ import { JiraSearchContainer } from '../jira-search-container';
|
|
|
46
47
|
import { JiraDisplayViewDropDown } from './jira-display-view-dropdown/jira-display-view-drop-down';
|
|
47
48
|
import { JiraInitialStateSVG } from './jira-issues-initial-state-svg';
|
|
48
49
|
import { modalMessages } from './messages';
|
|
49
|
-
var tableContainerStyles = css({
|
|
50
|
-
borderTopLeftRadius: "var(--ds-border-radius-200, 8px)",
|
|
51
|
-
borderTopRightRadius: "var(--ds-border-radius-200, 8px)",
|
|
52
|
-
border: "1px solid ".concat("var(--ds-border, ".concat(N40, ")"))
|
|
53
|
-
});
|
|
54
|
-
var contentContainerStyles = css({
|
|
55
|
-
display: 'grid',
|
|
56
|
-
maxHeight: '420px',
|
|
57
|
-
overflow: 'auto',
|
|
58
|
-
borderBottom: "2px solid ".concat("var(--ds-background-accent-gray-subtler, ".concat(N40, ")")),
|
|
59
|
-
backgroundImage: scrollableContainerShadowsCssComponents.backgroundImage,
|
|
60
|
-
backgroundPosition: scrollableContainerShadowsCssComponents.backgroundPosition,
|
|
61
|
-
backgroundRepeat: scrollableContainerShadowsCssComponents.backgroundRepeat,
|
|
62
|
-
backgroundSize: scrollableContainerShadowsCssComponents.backgroundSize,
|
|
63
|
-
backgroundAttachment: scrollableContainerShadowsCssComponents.backgroundAttachment
|
|
64
|
-
});
|
|
65
50
|
var placeholderSmartLinkStyles = css({
|
|
66
51
|
backgroundColor: "var(--ds-surface-raised, ".concat(N0, ")"),
|
|
67
52
|
borderRadius: "var(--ds-border-radius-200, 3px)",
|
|
@@ -466,8 +451,8 @@ export var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(prop
|
|
|
466
451
|
setVisibleColumnKeys(newVisibleColumnKeys);
|
|
467
452
|
}, [visibleColumnKeys]);
|
|
468
453
|
var issueLikeDataTableView = useMemo(function () {
|
|
469
|
-
return jsx(
|
|
470
|
-
|
|
454
|
+
return jsx(ContentContainer, {
|
|
455
|
+
withTableBorder: true
|
|
471
456
|
}, jsx(IssueLikeDataTableView, {
|
|
472
457
|
testId: "jira-datasource-table",
|
|
473
458
|
status: status,
|
|
@@ -517,7 +502,15 @@ export var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(prop
|
|
|
517
502
|
var selectedJiraSiteUrl = selectedJiraSite === null || selectedJiraSite === void 0 ? void 0 : selectedJiraSite.url;
|
|
518
503
|
if (status === 'rejected' && jqlUrl) {
|
|
519
504
|
return jsx(ModalLoadingError, {
|
|
520
|
-
|
|
505
|
+
errorMessage: jqlUrl ? jsx(FormattedMessage, _extends({}, modalMessages.checkConnectionWithSource, {
|
|
506
|
+
values: {
|
|
507
|
+
a: function a(urlText) {
|
|
508
|
+
return jsx("a", {
|
|
509
|
+
href: jqlUrl
|
|
510
|
+
}, urlText);
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
})) : undefined
|
|
521
514
|
});
|
|
522
515
|
} else if (status === 'unauthorized') {
|
|
523
516
|
return jsx(AccessRequired, {
|
|
@@ -527,8 +520,8 @@ export var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(prop
|
|
|
527
520
|
return jsx(NoResults, null);
|
|
528
521
|
} else if (status === 'empty' || !columns.length) {
|
|
529
522
|
// persist the empty state when making the initial /data request which contains the columns
|
|
530
|
-
return jsx(
|
|
531
|
-
|
|
523
|
+
return jsx(ContentContainer, {
|
|
524
|
+
withTableBorder: !!jql
|
|
532
525
|
}, !!jql ? jsx(EmptyState, {
|
|
533
526
|
testId: "jira-datasource-modal--empty-state"
|
|
534
527
|
}) : jsx(InitialStateView, {
|
|
@@ -115,5 +115,10 @@ export var modalMessages = defineMessages({
|
|
|
115
115
|
id: 'linkDataSource.jira-issues.no.jira.sites.access.description',
|
|
116
116
|
description: 'Description that shows in the modal when user has no access to any Jira sites',
|
|
117
117
|
defaultMessage: 'To request access, contact your admin.'
|
|
118
|
+
},
|
|
119
|
+
checkConnectionWithSource: {
|
|
120
|
+
id: 'linkDataSource.jira-issues.checkConnectionWithSource',
|
|
121
|
+
description: 'Instructions to let the user know how to resolve the error that occured, or click the link provided to open the query in Jira',
|
|
122
|
+
defaultMessage: 'Check your connection and refresh, or <a>open this query in Jira</a> to review.'
|
|
118
123
|
}
|
|
119
124
|
});
|
|
@@ -80,6 +80,7 @@ export var ModeSwitcher = function ModeSwitcher(props) {
|
|
|
80
80
|
tooltipText = _ref.tooltipText;
|
|
81
81
|
var isSelected = value === selectedOptionValue;
|
|
82
82
|
return jsx(Tooltip, {
|
|
83
|
+
key: value,
|
|
83
84
|
content: tooltipText
|
|
84
85
|
}, function (tooltipProps) {
|
|
85
86
|
return jsx("label", _extends({}, tooltipProps, {
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import type { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
|
-
import { DatasourceAdf, InlineCardAdf } from '@atlaskit/linking-common/types';
|
|
3
|
-
import { DatasourceParameters } from '@atlaskit/linking-types';
|
|
4
2
|
import { IssueLikeDataTableViewProps } from '../ui/issue-like-table/types';
|
|
5
|
-
import { JiraIssueDatasourceParameters } from '../ui/jira-issues-modal/types';
|
|
6
3
|
export type JiraSearchMethod = 'basic' | 'jql';
|
|
7
4
|
export interface Site {
|
|
8
5
|
cloudId: string;
|
|
@@ -10,17 +7,17 @@ export interface Site {
|
|
|
10
7
|
url: string;
|
|
11
8
|
}
|
|
12
9
|
export type IssueViewModes = 'issue' | 'count';
|
|
13
|
-
export type ConfigModalProps = {
|
|
10
|
+
export type ConfigModalProps<ADF, Parameters> = {
|
|
14
11
|
/** Unique identifier for which type of datasource is being rendered and for making its requests */
|
|
15
12
|
datasourceId: string;
|
|
16
13
|
/** The url that was used to insert a List of Links */
|
|
17
14
|
url?: string;
|
|
18
15
|
/** Parameters for making the data requests necessary to render data within the table */
|
|
19
|
-
parameters?:
|
|
16
|
+
parameters?: Parameters;
|
|
20
17
|
/** Callback function to be invoked when the modal is closed either via cancel button click, esc keydown, or modal blanket click */
|
|
21
18
|
onCancel: () => void;
|
|
22
19
|
/** Callback function to be invoked when the insert issues button is clicked */
|
|
23
|
-
onInsert: (adf:
|
|
20
|
+
onInsert: (adf: ADF, analyticsEvent?: UIAnalyticsEvent) => void;
|
|
24
21
|
/** The view mode that the modal will show on open:
|
|
25
22
|
* - Table = Displays a list of links in table format
|
|
26
23
|
* - Inline link = Presents a smart link that shows the count of query results. However, if there's only one result, it converts to an inline smart link of that issue.
|
|
@@ -39,16 +39,6 @@ export declare const loadingErrorMessages: {
|
|
|
39
39
|
description: string;
|
|
40
40
|
defaultMessage: string;
|
|
41
41
|
};
|
|
42
|
-
checkConnectionWithSourceDuplicate: {
|
|
43
|
-
id: string;
|
|
44
|
-
description: string;
|
|
45
|
-
defaultMessage: string;
|
|
46
|
-
};
|
|
47
|
-
checkConnectionWithSource: {
|
|
48
|
-
id: string;
|
|
49
|
-
description: string;
|
|
50
|
-
defaultMessage: string;
|
|
51
|
-
};
|
|
52
42
|
noResultsFoundDuplicate: {
|
|
53
43
|
id: string;
|
|
54
44
|
description: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { jsx } from '@emotion/react';
|
|
2
3
|
interface ModalLoadingErrorProps {
|
|
3
|
-
|
|
4
|
+
errorMessage?: React.ReactNode;
|
|
4
5
|
}
|
|
5
|
-
export declare const ModalLoadingError: ({
|
|
6
|
+
export declare const ModalLoadingError: ({ errorMessage, }: ModalLoadingErrorProps) => jsx.JSX.Element;
|
|
6
7
|
export {};
|