@atlaskit/link-datasource 1.24.5 → 1.24.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/cjs/common/types.js +5 -1
- package/dist/cjs/services/{getAvailableJiraSites.js → getAvailableSites.js} +5 -5
- package/dist/cjs/ui/common/error-state/loading-error.js +1 -1
- package/dist/cjs/ui/common/error-state/messages.js +56 -0
- package/dist/cjs/ui/common/error-state/modal-loading-error.js +1 -1
- package/dist/cjs/ui/common/error-state/no-instances.js +9 -5
- package/dist/cjs/ui/common/error-state/no-results.js +1 -1
- package/dist/cjs/ui/common/initial-state-view/index.js +73 -0
- package/dist/cjs/ui/{jira-issues-modal → common}/initial-state-view/messages.js +9 -2
- package/dist/cjs/ui/{jira-issues-modal → common/modal}/basic-search-input/index.js +8 -6
- package/dist/cjs/ui/{jira-issues-modal → common/modal}/basic-search-input/messages.js +5 -0
- package/dist/cjs/ui/common/modal/content-container/index.js +35 -0
- package/dist/cjs/ui/{jira-issues-modal → common/modal}/site-selector/index.js +21 -10
- package/dist/cjs/ui/{jira-issues-modal → common/modal}/site-selector/messages.js +6 -0
- package/dist/cjs/ui/confluence-search-modal/index.js +29 -0
- package/dist/cjs/ui/confluence-search-modal/modal/confluence-search-initial-state-svg.js +152 -0
- package/dist/cjs/ui/confluence-search-modal/modal/index.js +138 -0
- package/dist/cjs/ui/confluence-search-modal/modal/messages.js +54 -0
- package/dist/cjs/ui/issue-like-table/index.js +2 -0
- package/dist/cjs/ui/jira-issues-modal/index.js +1 -1
- package/dist/cjs/ui/jira-issues-modal/jira-search-container/index.js +8 -5
- package/dist/cjs/ui/jira-issues-modal/modal/index.js +46 -52
- package/dist/cjs/ui/jira-issues-modal/modal/{display-view-dropdown/display-view-drop-down.js → jira-display-view-dropdown/jira-display-view-drop-down.js} +3 -3
- package/dist/cjs/ui/jira-issues-modal/{initial-state-view/assets/initial-state-svg.js → modal/jira-issues-initial-state-svg.js} +2 -2
- package/dist/cjs/ui/jira-issues-modal/modal/messages.js +66 -0
- package/dist/es2019/common/types.js +1 -0
- package/dist/es2019/services/{getAvailableJiraSites.js → getAvailableSites.js} +2 -2
- package/dist/es2019/ui/common/error-state/loading-error.js +1 -1
- package/dist/es2019/ui/common/error-state/messages.js +56 -0
- package/dist/es2019/ui/common/error-state/modal-loading-error.js +1 -1
- package/dist/es2019/ui/common/error-state/no-instances.js +20 -12
- package/dist/es2019/ui/common/error-state/no-results.js +1 -1
- package/dist/es2019/ui/{jira-issues-modal → common}/initial-state-view/index.js +17 -26
- package/dist/es2019/ui/{jira-issues-modal → common}/initial-state-view/messages.js +9 -2
- package/dist/es2019/ui/{jira-issues-modal → common/modal}/basic-search-input/index.js +8 -5
- package/dist/es2019/ui/{jira-issues-modal → common/modal}/basic-search-input/messages.js +5 -0
- package/dist/es2019/ui/common/modal/content-container/index.js +30 -0
- package/dist/es2019/ui/{jira-issues-modal → common/modal}/site-selector/index.js +20 -9
- package/dist/es2019/ui/{jira-issues-modal → common/modal}/site-selector/messages.js +6 -0
- package/dist/es2019/ui/confluence-search-modal/index.js +13 -0
- package/dist/es2019/ui/confluence-search-modal/modal/confluence-search-initial-state-svg.js +143 -0
- package/dist/es2019/ui/confluence-search-modal/modal/index.js +93 -0
- package/dist/es2019/ui/confluence-search-modal/modal/messages.js +48 -0
- package/dist/es2019/ui/issue-like-table/index.js +5 -0
- package/dist/es2019/ui/jira-issues-modal/index.js +1 -1
- package/dist/es2019/ui/jira-issues-modal/jira-search-container/index.js +5 -2
- package/dist/es2019/ui/jira-issues-modal/modal/index.js +43 -49
- package/dist/es2019/ui/jira-issues-modal/modal/{display-view-dropdown/display-view-drop-down.js → jira-display-view-dropdown/jira-display-view-drop-down.js} +2 -2
- package/dist/es2019/ui/jira-issues-modal/{initial-state-view/assets/initial-state-svg.js → modal/jira-issues-initial-state-svg.js} +1 -1
- package/dist/es2019/ui/jira-issues-modal/modal/messages.js +66 -0
- package/dist/esm/common/types.js +1 -0
- package/dist/esm/services/{getAvailableJiraSites.js → getAvailableSites.js} +4 -4
- package/dist/esm/ui/common/error-state/loading-error.js +1 -1
- package/dist/esm/ui/common/error-state/messages.js +56 -0
- package/dist/esm/ui/common/error-state/modal-loading-error.js +1 -1
- package/dist/esm/ui/common/error-state/no-instances.js +10 -6
- package/dist/esm/ui/common/error-state/no-results.js +1 -1
- package/dist/esm/ui/{jira-issues-modal → common}/initial-state-view/index.js +17 -26
- package/dist/esm/ui/{jira-issues-modal → common}/initial-state-view/messages.js +9 -2
- package/dist/esm/ui/{jira-issues-modal → common/modal}/basic-search-input/index.js +8 -6
- package/dist/esm/ui/{jira-issues-modal → common/modal}/basic-search-input/messages.js +5 -0
- package/dist/esm/ui/common/modal/content-container/index.js +29 -0
- package/dist/esm/ui/{jira-issues-modal → common/modal}/site-selector/index.js +20 -9
- package/dist/esm/ui/{jira-issues-modal → common/modal}/site-selector/messages.js +6 -0
- package/dist/esm/ui/confluence-search-modal/index.js +17 -0
- package/dist/esm/ui/confluence-search-modal/modal/confluence-search-initial-state-svg.js +145 -0
- package/dist/esm/ui/confluence-search-modal/modal/index.js +127 -0
- package/dist/esm/ui/confluence-search-modal/modal/messages.js +48 -0
- package/dist/esm/ui/issue-like-table/index.js +2 -0
- package/dist/esm/ui/jira-issues-modal/index.js +1 -1
- package/dist/esm/ui/jira-issues-modal/jira-search-container/index.js +5 -2
- package/dist/esm/ui/jira-issues-modal/modal/index.js +43 -49
- package/dist/esm/ui/jira-issues-modal/modal/{display-view-dropdown/display-view-drop-down.js → jira-display-view-dropdown/jira-display-view-drop-down.js} +2 -2
- package/dist/esm/ui/jira-issues-modal/{initial-state-view/assets/initial-state-svg.js → modal/jira-issues-initial-state-svg.js} +1 -1
- package/dist/esm/ui/jira-issues-modal/modal/messages.js +66 -0
- package/dist/types/common/types.d.ts +30 -0
- package/dist/types/services/getAvailableSites.d.ts +2 -0
- package/dist/types/ui/common/error-state/messages.d.ts +45 -0
- package/dist/types/ui/common/error-state/no-instances.d.ts +8 -1
- package/dist/types/ui/common/initial-state-view/index.d.ts +16 -0
- package/dist/{types-ts4.5/ui/jira-issues-modal → types/ui/common}/initial-state-view/messages.d.ts +6 -1
- package/dist/types/ui/{jira-issues-modal → common/modal}/basic-search-input/index.d.ts +5 -2
- package/dist/types/ui/{jira-issues-modal → common/modal}/basic-search-input/messages.d.ts +5 -0
- package/dist/types/ui/common/modal/content-container/index.d.ts +8 -0
- package/dist/types/ui/common/modal/site-selector/index.d.ts +11 -0
- package/dist/{types-ts4.5/ui/jira-issues-modal → types/ui/common/modal}/site-selector/messages.d.ts +5 -0
- package/dist/types/ui/confluence-search-modal/index.d.ts +5 -0
- package/dist/types/ui/confluence-search-modal/modal/confluence-search-initial-state-svg.d.ts +2 -0
- package/dist/types/ui/confluence-search-modal/modal/index.d.ts +3 -0
- package/dist/types/ui/confluence-search-modal/modal/messages.d.ts +47 -0
- package/dist/types/ui/jira-issues-modal/basic-filters/hooks/useFilterOptions.d.ts +1 -1
- package/dist/types/ui/jira-issues-modal/basic-filters/ui/async-popup-select/index.d.ts +1 -1
- package/dist/types/ui/jira-issues-modal/basic-filters/ui/index.d.ts +1 -1
- package/dist/types/ui/jira-issues-modal/index.d.ts +2 -2
- package/dist/types/ui/jira-issues-modal/jira-search-container/index.d.ts +2 -2
- package/dist/types/ui/jira-issues-modal/modal/index.d.ts +6 -5
- package/dist/types/ui/jira-issues-modal/modal/jira-display-view-dropdown/jira-display-view-drop-down.d.ts +8 -0
- package/dist/types/ui/jira-issues-modal/modal/jira-issues-initial-state-svg.d.ts +2 -0
- package/dist/types/ui/jira-issues-modal/modal/messages.d.ts +60 -0
- package/dist/types/ui/jira-issues-modal/types.d.ts +1 -28
- package/dist/types-ts4.5/common/types.d.ts +30 -0
- package/dist/types-ts4.5/services/getAvailableSites.d.ts +2 -0
- package/dist/types-ts4.5/ui/common/error-state/messages.d.ts +45 -0
- package/dist/types-ts4.5/ui/common/error-state/no-instances.d.ts +8 -1
- package/dist/types-ts4.5/ui/common/initial-state-view/index.d.ts +16 -0
- package/dist/{types/ui/jira-issues-modal → types-ts4.5/ui/common}/initial-state-view/messages.d.ts +6 -1
- package/dist/types-ts4.5/ui/{jira-issues-modal → common/modal}/basic-search-input/index.d.ts +5 -2
- package/dist/types-ts4.5/ui/{jira-issues-modal → common/modal}/basic-search-input/messages.d.ts +5 -0
- package/dist/types-ts4.5/ui/common/modal/content-container/index.d.ts +8 -0
- package/dist/types-ts4.5/ui/common/modal/site-selector/index.d.ts +11 -0
- package/dist/{types/ui/jira-issues-modal → types-ts4.5/ui/common/modal}/site-selector/messages.d.ts +5 -0
- package/dist/types-ts4.5/ui/confluence-search-modal/index.d.ts +5 -0
- package/dist/types-ts4.5/ui/confluence-search-modal/modal/confluence-search-initial-state-svg.d.ts +2 -0
- package/dist/types-ts4.5/ui/confluence-search-modal/modal/index.d.ts +3 -0
- package/dist/types-ts4.5/ui/confluence-search-modal/modal/messages.d.ts +47 -0
- package/dist/types-ts4.5/ui/jira-issues-modal/basic-filters/hooks/useFilterOptions.d.ts +1 -1
- package/dist/types-ts4.5/ui/jira-issues-modal/basic-filters/ui/async-popup-select/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/jira-issues-modal/basic-filters/ui/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/jira-issues-modal/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/jira-issues-modal/jira-search-container/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/jira-issues-modal/modal/index.d.ts +6 -5
- package/dist/types-ts4.5/ui/jira-issues-modal/modal/jira-display-view-dropdown/jira-display-view-drop-down.d.ts +8 -0
- package/dist/types-ts4.5/ui/jira-issues-modal/modal/jira-issues-initial-state-svg.d.ts +2 -0
- package/dist/types-ts4.5/ui/jira-issues-modal/modal/messages.d.ts +60 -0
- package/dist/types-ts4.5/ui/jira-issues-modal/types.d.ts +1 -28
- package/examples-helpers/mockSmartLinkData.ts +44 -0
- package/examples-helpers/smartLinkCustomClient.ts +31 -20
- package/package.json +5 -2
- package/dist/cjs/ui/jira-issues-modal/initial-state-view/index.js +0 -81
- package/dist/types/services/getAvailableJiraSites.d.ts +0 -2
- package/dist/types/ui/jira-issues-modal/initial-state-view/assets/initial-state-svg.d.ts +0 -2
- package/dist/types/ui/jira-issues-modal/initial-state-view/index.d.ts +0 -8
- package/dist/types/ui/jira-issues-modal/modal/display-view-dropdown/display-view-drop-down.d.ts +0 -8
- package/dist/types/ui/jira-issues-modal/site-selector/index.d.ts +0 -9
- package/dist/types-ts4.5/services/getAvailableJiraSites.d.ts +0 -2
- package/dist/types-ts4.5/ui/jira-issues-modal/initial-state-view/assets/initial-state-svg.d.ts +0 -2
- package/dist/types-ts4.5/ui/jira-issues-modal/initial-state-view/index.d.ts +0 -8
- package/dist/types-ts4.5/ui/jira-issues-modal/modal/display-view-dropdown/display-view-drop-down.d.ts +0 -8
- package/dist/types-ts4.5/ui/jira-issues-modal/site-selector/index.d.ts +0 -9
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
|
+
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
5
|
+
/** @jsx jsx */
|
|
6
|
+
import { Fragment, useCallback, useEffect, useMemo, useState } from 'react';
|
|
7
|
+
import { jsx } from '@emotion/react';
|
|
8
|
+
import { FormattedMessage } from 'react-intl-next';
|
|
9
|
+
import Button from '@atlaskit/button/standard-button';
|
|
10
|
+
import { IntlMessagesProvider } from '@atlaskit/intl-messages-provider';
|
|
11
|
+
import Modal, { ModalBody, ModalFooter, ModalHeader, ModalTitle } from '@atlaskit/modal-dialog';
|
|
12
|
+
import { fetchMessagesForLocale } from '../../../common/utils/locale/fetch-messages-for-locale';
|
|
13
|
+
import i18nEN from '../../../i18n/en';
|
|
14
|
+
import { getAvailableSites } from '../../../services/getAvailableSites';
|
|
15
|
+
import { NoInstancesView } from '../../common/error-state/no-instances';
|
|
16
|
+
import { InitialStateView } from '../../common/initial-state-view';
|
|
17
|
+
import { BasicSearchInput } from '../../common/modal/basic-search-input';
|
|
18
|
+
import { ContentContainer } from '../../common/modal/content-container';
|
|
19
|
+
import { SiteSelector } from '../../common/modal/site-selector';
|
|
20
|
+
import { ConfluenceSearchInitialStateSVG } from './confluence-search-initial-state-svg';
|
|
21
|
+
import { confluenceSearchModalMessages } from './messages';
|
|
22
|
+
export var ConfluenceSearchConfigModal = function ConfluenceSearchConfigModal(props) {
|
|
23
|
+
var initialParameters = props.parameters,
|
|
24
|
+
onCancel = props.onCancel;
|
|
25
|
+
var _useState = useState(undefined),
|
|
26
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
27
|
+
availableSites = _useState2[0],
|
|
28
|
+
setAvailableSites = _useState2[1];
|
|
29
|
+
var _useState3 = useState(initialParameters === null || initialParameters === void 0 ? void 0 : initialParameters.cloudId),
|
|
30
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
31
|
+
cloudId = _useState4[0],
|
|
32
|
+
setCloudId = _useState4[1];
|
|
33
|
+
var _useState5 = useState(''),
|
|
34
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
35
|
+
searchTerm = _useState6[0],
|
|
36
|
+
setSearchTerm = _useState6[1];
|
|
37
|
+
var onSiteSelection = useCallback(function (site) {
|
|
38
|
+
setCloudId(site.cloudId);
|
|
39
|
+
}, [setCloudId]);
|
|
40
|
+
var hasNoConfluenceSites = availableSites && availableSites.length === 0;
|
|
41
|
+
var selectedConfluenceSite = useMemo(function () {
|
|
42
|
+
if (cloudId) {
|
|
43
|
+
return availableSites === null || availableSites === void 0 ? void 0 : availableSites.find(function (confluenceSite) {
|
|
44
|
+
return confluenceSite.cloudId === cloudId;
|
|
45
|
+
});
|
|
46
|
+
} else {
|
|
47
|
+
var currentlyLoggedInSiteUrl;
|
|
48
|
+
if (typeof window.location !== 'undefined') {
|
|
49
|
+
currentlyLoggedInSiteUrl = window.location.origin;
|
|
50
|
+
}
|
|
51
|
+
return (availableSites === null || availableSites === void 0 ? void 0 : availableSites.find(function (confluenceSite) {
|
|
52
|
+
return confluenceSite.url === currentlyLoggedInSiteUrl;
|
|
53
|
+
})) || (availableSites === null || availableSites === void 0 ? void 0 : availableSites[0]);
|
|
54
|
+
}
|
|
55
|
+
}, [availableSites, cloudId]);
|
|
56
|
+
var handleSearchChange = useCallback(function (e) {
|
|
57
|
+
var rawSearch = e.currentTarget.value;
|
|
58
|
+
setSearchTerm(rawSearch);
|
|
59
|
+
}, [setSearchTerm]);
|
|
60
|
+
useEffect(function () {
|
|
61
|
+
var fetchSiteDisplayNames = /*#__PURE__*/function () {
|
|
62
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
63
|
+
var confluenceSites, sortedAvailableSites;
|
|
64
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
65
|
+
while (1) switch (_context.prev = _context.next) {
|
|
66
|
+
case 0:
|
|
67
|
+
_context.next = 2;
|
|
68
|
+
return getAvailableSites('confluence');
|
|
69
|
+
case 2:
|
|
70
|
+
confluenceSites = _context.sent;
|
|
71
|
+
sortedAvailableSites = _toConsumableArray(confluenceSites).sort(function (a, b) {
|
|
72
|
+
return a.displayName.localeCompare(b.displayName);
|
|
73
|
+
});
|
|
74
|
+
setAvailableSites(sortedAvailableSites);
|
|
75
|
+
case 5:
|
|
76
|
+
case "end":
|
|
77
|
+
return _context.stop();
|
|
78
|
+
}
|
|
79
|
+
}, _callee);
|
|
80
|
+
}));
|
|
81
|
+
return function fetchSiteDisplayNames() {
|
|
82
|
+
return _ref.apply(this, arguments);
|
|
83
|
+
};
|
|
84
|
+
}();
|
|
85
|
+
void fetchSiteDisplayNames();
|
|
86
|
+
}, []);
|
|
87
|
+
var siteSelectorLabel = availableSites && availableSites.length > 1 ? confluenceSearchModalMessages.insertIssuesTitleManySites : confluenceSearchModalMessages.insertIssuesTitle;
|
|
88
|
+
return jsx(IntlMessagesProvider, {
|
|
89
|
+
defaultMessages: i18nEN,
|
|
90
|
+
loaderFn: fetchMessagesForLocale
|
|
91
|
+
}, jsx(Modal, {
|
|
92
|
+
testId: "confluence-search-datasource-modal",
|
|
93
|
+
onClose: onCancel,
|
|
94
|
+
width: "calc(100% - 80px)",
|
|
95
|
+
shouldScrollInViewport: true
|
|
96
|
+
}, jsx(ModalHeader, null, jsx(ModalTitle, null, jsx(SiteSelector, {
|
|
97
|
+
availableSites: availableSites,
|
|
98
|
+
onSiteSelection: onSiteSelection,
|
|
99
|
+
selectedSite: selectedConfluenceSite,
|
|
100
|
+
testId: "confluence-search-datasource-modal--site-selector",
|
|
101
|
+
label: siteSelectorLabel
|
|
102
|
+
}))), jsx(ModalBody, null, !hasNoConfluenceSites ? jsx(Fragment, null, jsx(BasicSearchInput, {
|
|
103
|
+
testId: "confluence-search-datasource-modal",
|
|
104
|
+
isSearching: status === 'loading',
|
|
105
|
+
onChange: handleSearchChange,
|
|
106
|
+
onSearch: function onSearch() {},
|
|
107
|
+
searchTerm: searchTerm,
|
|
108
|
+
placeholder: confluenceSearchModalMessages.searchLabel,
|
|
109
|
+
fullWidth: true
|
|
110
|
+
}), jsx(ContentContainer, null, jsx(InitialStateView, {
|
|
111
|
+
icon: jsx(ConfluenceSearchInitialStateSVG, null),
|
|
112
|
+
title: confluenceSearchModalMessages.initialViewSearchTitle,
|
|
113
|
+
description: confluenceSearchModalMessages.initialViewSearchDescription
|
|
114
|
+
}))) : jsx(NoInstancesView, {
|
|
115
|
+
title: confluenceSearchModalMessages.noAccessToConfluenceSitesTitle,
|
|
116
|
+
description: confluenceSearchModalMessages.noAccessToConfluenceSitesDescription,
|
|
117
|
+
testId: 'no-confluence-instances-content'
|
|
118
|
+
})), jsx(ModalFooter, null, jsx(Button, {
|
|
119
|
+
appearance: "default",
|
|
120
|
+
onClick: onCancel
|
|
121
|
+
}, jsx(FormattedMessage, confluenceSearchModalMessages.cancelButtonText)), !hasNoConfluenceSites && jsx(Button, {
|
|
122
|
+
appearance: "primary",
|
|
123
|
+
onClick: function onClick() {},
|
|
124
|
+
isDisabled: true,
|
|
125
|
+
testId: "confluence-search-datasource-modal--insert-button"
|
|
126
|
+
}, jsx(FormattedMessage, confluenceSearchModalMessages.insertResultsButtonText)))));
|
|
127
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { defineMessages } from 'react-intl-next';
|
|
2
|
+
export var confluenceSearchModalMessages = defineMessages({
|
|
3
|
+
cancelButtonText: {
|
|
4
|
+
id: 'linkDataSource.confluence-search.configmodal.cancelButtonText',
|
|
5
|
+
description: 'Button text to close the modal with no changes being made',
|
|
6
|
+
defaultMessage: 'Cancel'
|
|
7
|
+
},
|
|
8
|
+
insertResultsButtonText: {
|
|
9
|
+
id: 'linkDataSource.confluence-search.configmodal.insertResultsButtonText',
|
|
10
|
+
description: 'Button text to insert the displayed content',
|
|
11
|
+
defaultMessage: 'Insert results'
|
|
12
|
+
},
|
|
13
|
+
searchLabel: {
|
|
14
|
+
id: 'linkDataSource.confluence-search.configmodal.searchLabel',
|
|
15
|
+
description: 'Placeholder text for the search input box',
|
|
16
|
+
defaultMessage: 'Enter keywords to find pages, attachments, and more'
|
|
17
|
+
},
|
|
18
|
+
insertIssuesTitle: {
|
|
19
|
+
id: 'linkDataSource.confluence-search.configmodal.insertConfluenceTitle',
|
|
20
|
+
description: 'Title for the Confluence Search Datasource Confluence Search config modal',
|
|
21
|
+
defaultMessage: 'Insert Confluence list'
|
|
22
|
+
},
|
|
23
|
+
insertIssuesTitleManySites: {
|
|
24
|
+
id: 'linkDataSource.confluence-search.configmodal.insertConfluenceTitleManySites',
|
|
25
|
+
description: 'Title for the Confluence Search config modal when a user has to select a site to insert issues from',
|
|
26
|
+
defaultMessage: 'Insert Confluence list from'
|
|
27
|
+
},
|
|
28
|
+
initialViewSearchTitle: {
|
|
29
|
+
id: 'linkDataSource.modal-initial-state.confluenceSearchTitle',
|
|
30
|
+
description: 'The initial modal search state title explains to user how to get information',
|
|
31
|
+
defaultMessage: 'Search for Confluence pages'
|
|
32
|
+
},
|
|
33
|
+
initialViewSearchDescription: {
|
|
34
|
+
id: 'linkDataSource.modal-initial-state.searchDescription-confluence',
|
|
35
|
+
description: 'The initial modal search state helper message for confluence search displayed under the search title',
|
|
36
|
+
defaultMessage: 'Search by keyword for pages to insert.'
|
|
37
|
+
},
|
|
38
|
+
noAccessToConfluenceSitesTitle: {
|
|
39
|
+
id: 'linkDataSource.confluence-search.no.confluence.sites.access.title',
|
|
40
|
+
description: 'Title that shows in the modal when user has no access to any Confluence sites',
|
|
41
|
+
defaultMessage: "You don't have access to any Confluence sites"
|
|
42
|
+
},
|
|
43
|
+
noAccessToConfluenceSitesDescription: {
|
|
44
|
+
id: 'linkDataSource.confluence-search.no.confluence.sites.access.description',
|
|
45
|
+
description: 'Description that shows in the modal when user has no access to any Confluence sites',
|
|
46
|
+
defaultMessage: 'To request access, contact your admin.'
|
|
47
|
+
}
|
|
48
|
+
});
|
|
@@ -78,6 +78,8 @@ var TableCell = styled.td((_styled$td = {}, _defineProperty(_styled$td, "".conca
|
|
|
78
78
|
}), _defineProperty(_styled$td, "".concat(withTablePluginBodyPrefix('&:last-child')), {
|
|
79
79
|
borderRight: 0,
|
|
80
80
|
paddingRight: "var(--ds-space-100, 8px)"
|
|
81
|
+
}), _defineProperty(_styled$td, "& [data-testid='inline-card-icon-and-title'], " + "& [data-testid='button-connect-account'] > span", {
|
|
82
|
+
whiteSpace: 'unset'
|
|
81
83
|
}), _styled$td));
|
|
82
84
|
var tableContainerStyles = css({
|
|
83
85
|
borderRadius: 'inherit',
|
|
@@ -10,7 +10,7 @@ var LazyJiraIssuesConfigModal = /*#__PURE__*/lazy(function () {
|
|
|
10
10
|
var JiraIssuesConfigModalWithWrappers = function JiraIssuesConfigModalWithWrappers(props) {
|
|
11
11
|
return /*#__PURE__*/React.createElement(Suspense, {
|
|
12
12
|
fallback: /*#__PURE__*/React.createElement("div", {
|
|
13
|
-
"data-testid": 'jira-
|
|
13
|
+
"data-testid": 'jira-datasource-table-suspense'
|
|
14
14
|
})
|
|
15
15
|
}, /*#__PURE__*/React.createElement(LazyJiraIssuesConfigModal, props));
|
|
16
16
|
};
|
|
@@ -12,10 +12,11 @@ import { useDebouncedCallback } from 'use-debounce';
|
|
|
12
12
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
13
13
|
import { Flex, xcss } from '@atlaskit/primitives';
|
|
14
14
|
import { useDatasourceAnalyticsEvents } from '../../../analytics';
|
|
15
|
+
import { BasicSearchInput } from '../../common/modal/basic-search-input';
|
|
16
|
+
import { basicSearchInputMessages } from '../../common/modal/basic-search-input/messages';
|
|
15
17
|
import { BasicFilters } from '../basic-filters';
|
|
16
18
|
import { useHydrateJqlQuery } from '../basic-filters/hooks/useHydrateJqlQuery';
|
|
17
19
|
import { isQueryTooComplex } from '../basic-filters/utils/isQueryTooComplex';
|
|
18
|
-
import { BasicSearchInput } from '../basic-search-input';
|
|
19
20
|
import { JiraJQLEditor } from '../jql-editor';
|
|
20
21
|
import { ModeSwitcher } from '../mode-switcher';
|
|
21
22
|
import { buildJQL } from './buildJQL';
|
|
@@ -217,7 +218,9 @@ export var JiraSearchContainer = function JiraSearchContainer(props) {
|
|
|
217
218
|
isSearching: isSearching,
|
|
218
219
|
onChange: handleBasicSearchChange,
|
|
219
220
|
onSearch: handleSearch,
|
|
220
|
-
searchTerm: basicSearchTerm
|
|
221
|
+
searchTerm: basicSearchTerm,
|
|
222
|
+
placeholder: basicSearchInputMessages.basicTextSearchLabel,
|
|
223
|
+
testId: "jira-datasource-modal"
|
|
221
224
|
}), showBasicFilters && jsx(BasicFilters, {
|
|
222
225
|
jql: searchBarJql,
|
|
223
226
|
site: site,
|
|
@@ -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';
|
|
@@ -29,42 +29,24 @@ import { buildDatasourceAdf } from '../../../common/utils/adf';
|
|
|
29
29
|
import { fetchMessagesForLocale } from '../../../common/utils/locale/fetch-messages-for-locale';
|
|
30
30
|
import { useDatasourceTableState } from '../../../hooks/useDatasourceTableState';
|
|
31
31
|
import i18nEN from '../../../i18n/en';
|
|
32
|
-
import {
|
|
32
|
+
import { getAvailableSites } from '../../../services/getAvailableSites';
|
|
33
33
|
import { AccessRequired } from '../../common/error-state/access-required';
|
|
34
|
+
import { loadingErrorMessages } from '../../common/error-state/messages';
|
|
34
35
|
import { ModalLoadingError } from '../../common/error-state/modal-loading-error';
|
|
35
36
|
import { NoInstancesView } from '../../common/error-state/no-instances';
|
|
36
37
|
import { NoResults } from '../../common/error-state/no-results';
|
|
37
|
-
import {
|
|
38
|
+
import { InitialStateView } from '../../common/initial-state-view';
|
|
39
|
+
import { initialStateViewMessages } from '../../common/initial-state-view/messages';
|
|
40
|
+
import { ContentContainer } from '../../common/modal/content-container';
|
|
41
|
+
import { SiteSelector } from '../../common/modal/site-selector';
|
|
42
|
+
import { EmptyState, IssueLikeDataTableView } from '../../issue-like-table';
|
|
38
43
|
import LinkRenderType from '../../issue-like-table/render-type/link';
|
|
39
44
|
import { availableBasicFilterTypes } from '../basic-filters/ui';
|
|
40
45
|
import { isQueryTooComplex } from '../basic-filters/utils/isQueryTooComplex';
|
|
41
|
-
import { InitialStateView } from '../initial-state-view';
|
|
42
46
|
import { JiraSearchContainer } from '../jira-search-container';
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
47
|
+
import { JiraDisplayViewDropDown } from './jira-display-view-dropdown/jira-display-view-drop-down';
|
|
48
|
+
import { JiraInitialStateSVG } from './jira-issues-initial-state-svg';
|
|
45
49
|
import { modalMessages } from './messages';
|
|
46
|
-
var dropdownContainerStyles = css({
|
|
47
|
-
display: 'flex',
|
|
48
|
-
alignItems: 'center',
|
|
49
|
-
gap: "var(--ds-space-100, 0.5rem)",
|
|
50
|
-
minHeight: '40px' // to prevent vertical shifting when site selector pops in
|
|
51
|
-
});
|
|
52
|
-
var tableContainerStyles = css({
|
|
53
|
-
borderTopLeftRadius: "var(--ds-border-radius-200, 8px)",
|
|
54
|
-
borderTopRightRadius: "var(--ds-border-radius-200, 8px)",
|
|
55
|
-
border: "1px solid ".concat("var(--ds-border, ".concat(N40, ")"))
|
|
56
|
-
});
|
|
57
|
-
var contentContainerStyles = css({
|
|
58
|
-
display: 'grid',
|
|
59
|
-
maxHeight: '420px',
|
|
60
|
-
overflow: 'auto',
|
|
61
|
-
borderBottom: "2px solid ".concat("var(--ds-background-accent-gray-subtler, ".concat(N40, ")")),
|
|
62
|
-
backgroundImage: scrollableContainerShadowsCssComponents.backgroundImage,
|
|
63
|
-
backgroundPosition: scrollableContainerShadowsCssComponents.backgroundPosition,
|
|
64
|
-
backgroundRepeat: scrollableContainerShadowsCssComponents.backgroundRepeat,
|
|
65
|
-
backgroundSize: scrollableContainerShadowsCssComponents.backgroundSize,
|
|
66
|
-
backgroundAttachment: scrollableContainerShadowsCssComponents.backgroundAttachment
|
|
67
|
-
});
|
|
68
50
|
var placeholderSmartLinkStyles = css({
|
|
69
51
|
backgroundColor: "var(--ds-surface-raised, ".concat(N0, ")"),
|
|
70
52
|
borderRadius: "var(--ds-border-radius-200, 3px)",
|
|
@@ -85,6 +67,7 @@ var getDisplayValue = function getDisplayValue(currentViewMode, itemCount) {
|
|
|
85
67
|
}
|
|
86
68
|
return itemCount === 1 ? DatasourceDisplay.INLINE : DatasourceDisplay.DATASOURCE_INLINE;
|
|
87
69
|
};
|
|
70
|
+
var jqlSupportDocumentLink = 'https://support.atlassian.com/jira-service-management-cloud/docs/use-advanced-search-with-jira-query-language-jql/';
|
|
88
71
|
|
|
89
72
|
/**
|
|
90
73
|
* This method should be called when one atomic action is performed on columns: adding new item, removing one item, changing items order.
|
|
@@ -255,7 +238,7 @@ export var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(prop
|
|
|
255
238
|
while (1) switch (_context.prev = _context.next) {
|
|
256
239
|
case 0:
|
|
257
240
|
_context.next = 2;
|
|
258
|
-
return
|
|
241
|
+
return getAvailableSites('jira');
|
|
259
242
|
case 2:
|
|
260
243
|
jiraSites = _context.sent;
|
|
261
244
|
sortedAvailableSites = _toConsumableArray(jiraSites).sort(function (a, b) {
|
|
@@ -378,7 +361,7 @@ export var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(prop
|
|
|
378
361
|
// During insertion, we want the JQL of the datasource to be whatever is in the search bar,
|
|
379
362
|
// even if the user didn't previously click search
|
|
380
363
|
var upToDateJql = searchBarJql !== null && searchBarJql !== void 0 ? searchBarJql : jql;
|
|
381
|
-
var upToDateJqlUrl = selectedJiraSite && jql && "".concat(selectedJiraSite.url, "/issues/?jql=").concat(encodeURI(upToDateJql));
|
|
364
|
+
var upToDateJqlUrl = selectedJiraSite && jql && "".concat(selectedJiraSite.url, "/issues/?jql=").concat(getBooleanFF('platform.linking-platform.datasource.enable-stricter-jql-encoding') ? encodeURIComponent(upToDateJql) : encodeURI(upToDateJql));
|
|
382
365
|
var filterSelectionCount = availableBasicFilterTypes.reduce(function (current, filter) {
|
|
383
366
|
var _basicFilterSelection;
|
|
384
367
|
return _objectSpread(_objectSpread({}, current), {}, _defineProperty({}, "".concat(filter, "BasicFilterSelectionCount"), ((_basicFilterSelection = basicFilterSelectionsSearchedWith.current[filter]) === null || _basicFilterSelection === void 0 ? void 0 : _basicFilterSelection.length) || 0));
|
|
@@ -468,10 +451,10 @@ export var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(prop
|
|
|
468
451
|
setVisibleColumnKeys(newVisibleColumnKeys);
|
|
469
452
|
}, [visibleColumnKeys]);
|
|
470
453
|
var issueLikeDataTableView = useMemo(function () {
|
|
471
|
-
return jsx(
|
|
472
|
-
|
|
454
|
+
return jsx(ContentContainer, {
|
|
455
|
+
withTableBorder: true
|
|
473
456
|
}, jsx(IssueLikeDataTableView, {
|
|
474
|
-
testId: "jira-
|
|
457
|
+
testId: "jira-datasource-table",
|
|
475
458
|
status: status,
|
|
476
459
|
columns: columns,
|
|
477
460
|
items: responseItems,
|
|
@@ -498,7 +481,7 @@ export var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(prop
|
|
|
498
481
|
return jsx("div", {
|
|
499
482
|
css: smartLinkContainerStyles
|
|
500
483
|
}, jsx("span", {
|
|
501
|
-
"data-testid": "jira-
|
|
484
|
+
"data-testid": "jira-datasource-modal--smart-card-placeholder",
|
|
502
485
|
css: placeholderSmartLinkStyles
|
|
503
486
|
}, jsx(FormattedMessage, modalMessages.issuesCountSmartCardPlaceholderText)));
|
|
504
487
|
} else {
|
|
@@ -506,7 +489,7 @@ export var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(prop
|
|
|
506
489
|
if (responseItems.length === 1 && retrieveUrlForSmartCardRender()) {
|
|
507
490
|
url = retrieveUrlForSmartCardRender();
|
|
508
491
|
} else {
|
|
509
|
-
url = "".concat(selectedJiraSiteUrl, "/issues/?jql=").concat(encodeURI(jql));
|
|
492
|
+
url = "".concat(selectedJiraSiteUrl, "/issues/?jql=").concat(getBooleanFF('platform.linking-platform.datasource.enable-stricter-jql-encoding') ? encodeURIComponent(jql) : encodeURI(jql));
|
|
510
493
|
}
|
|
511
494
|
return jsx("div", {
|
|
512
495
|
css: smartLinkContainerStyles
|
|
@@ -529,32 +512,39 @@ export var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(prop
|
|
|
529
512
|
return jsx(NoResults, null);
|
|
530
513
|
} else if (status === 'empty' || !columns.length) {
|
|
531
514
|
// persist the empty state when making the initial /data request which contains the columns
|
|
532
|
-
return jsx(
|
|
533
|
-
|
|
515
|
+
return jsx(ContentContainer, {
|
|
516
|
+
withTableBorder: !!jql
|
|
534
517
|
}, !!jql ? jsx(EmptyState, {
|
|
535
|
-
testId: "jira-
|
|
518
|
+
testId: "jira-datasource-modal--empty-state"
|
|
536
519
|
}) : jsx(InitialStateView, {
|
|
537
|
-
|
|
520
|
+
showBeta: !getBooleanFF('platform.linking-platform.datasource.show-jlol-basic-filters'),
|
|
521
|
+
icon: jsx(JiraInitialStateSVG, null),
|
|
522
|
+
title: modalMessages.searchJiraTitle,
|
|
523
|
+
description: currentSearchMethod === 'jql' ? initialStateViewMessages.searchDescriptionForJQLSearch : initialStateViewMessages.searchDescriptionForBasicSearch,
|
|
524
|
+
learnMoreLink: currentSearchMethod === 'jql' ? {
|
|
525
|
+
href: jqlSupportDocumentLink,
|
|
526
|
+
text: initialStateViewMessages.learnMoreLink
|
|
527
|
+
} : undefined
|
|
538
528
|
}));
|
|
539
529
|
}
|
|
540
530
|
return issueLikeDataTableView;
|
|
541
531
|
}, [columns.length, currentSearchMethod, issueLikeDataTableView, jql, jqlUrl, resolvedWithNoResults, selectedJiraSite === null || selectedJiraSite === void 0 ? void 0 : selectedJiraSite.url, status, urlBeingEdited]);
|
|
532
|
+
var siteSelectorLabel = availableSites && availableSites.length > 1 ? modalMessages.insertIssuesTitleManySites : modalMessages.insertIssuesTitle;
|
|
542
533
|
return jsx(IntlMessagesProvider, {
|
|
543
534
|
defaultMessages: i18nEN,
|
|
544
535
|
loaderFn: fetchMessagesForLocale
|
|
545
536
|
}, jsx(ModalTransition, null, jsx(Modal, {
|
|
546
|
-
testId: "jira-
|
|
537
|
+
testId: "jira-datasource-modal",
|
|
547
538
|
onClose: onCancel,
|
|
548
539
|
width: "calc(100% - 80px)",
|
|
549
540
|
shouldScrollInViewport: true
|
|
550
|
-
}, jsx(ModalHeader, null, jsx(ModalTitle, null, jsx(
|
|
551
|
-
css: dropdownContainerStyles
|
|
552
|
-
}, availableSites && availableSites.length > 1 ? jsx(Fragment, null, jsx(FormattedMessage, modalMessages.insertIssuesTitleManySites), jsx(JiraSiteSelector, {
|
|
541
|
+
}, jsx(ModalHeader, null, jsx(ModalTitle, null, jsx(SiteSelector, {
|
|
553
542
|
availableSites: availableSites,
|
|
554
543
|
onSiteSelection: onSiteSelection,
|
|
555
|
-
|
|
556
|
-
testId: "jira-
|
|
557
|
-
|
|
544
|
+
selectedSite: selectedJiraSite,
|
|
545
|
+
testId: "jira-datasource-modal--site-selector",
|
|
546
|
+
label: siteSelectorLabel
|
|
547
|
+
})), !hasNoJiraSites && jsx(JiraDisplayViewDropDown, {
|
|
558
548
|
onViewModeChange: handleViewModeChange,
|
|
559
549
|
viewMode: currentViewMode
|
|
560
550
|
})), jsx(ModalBody, null, !hasNoJiraSites ? jsx(Fragment, null, jsx(JiraSearchContainer, {
|
|
@@ -566,8 +556,12 @@ export var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(prop
|
|
|
566
556
|
initialSearchMethod: initialSearchMethod,
|
|
567
557
|
onSearchMethodChange: setCurrentSearchMethod,
|
|
568
558
|
site: selectedJiraSite
|
|
569
|
-
}), currentViewMode === 'count' ? renderCountModeContent() : renderIssuesModeContent()) : jsx(NoInstancesView,
|
|
570
|
-
|
|
559
|
+
}), currentViewMode === 'count' ? renderCountModeContent() : renderIssuesModeContent()) : jsx(NoInstancesView, {
|
|
560
|
+
title: loadingErrorMessages.noAccessToJiraSitesTitle,
|
|
561
|
+
description: loadingErrorMessages.noAccessToJiraSitesDescription,
|
|
562
|
+
testId: "no-jira-instances-content"
|
|
563
|
+
})), jsx(ModalFooter, null, shouldShowIssueCount && jsx("div", {
|
|
564
|
+
"data-testid": "jira-datasource-modal-total-issues-count",
|
|
571
565
|
css: issueCountStyles
|
|
572
566
|
}, jsx(LinkUrl, {
|
|
573
567
|
href: jqlUrl,
|
|
@@ -589,7 +583,7 @@ export var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(prop
|
|
|
589
583
|
appearance: "primary",
|
|
590
584
|
onClick: onInsertPressed,
|
|
591
585
|
isDisabled: isInsertDisabled,
|
|
592
|
-
testId: "jira-
|
|
586
|
+
testId: "jira-datasource-modal--insert-button"
|
|
593
587
|
}, jsx(FormattedMessage, modalMessages.insertIssuesButtonText))))));
|
|
594
588
|
};
|
|
595
589
|
var analyticsContextAttributes = {
|
|
@@ -24,7 +24,7 @@ var InlineIcon = jsx("svg", {
|
|
|
24
24
|
d: "M4 9C2.89543 9 2 9.67155 2 10.5V13.5C2 14.3285 2.89543 15 4 15H20C21.1046 15 22 14.3285 22 13.5V10.5C22 9.67155 21.1046 9 20 9H4ZM4.22222 11.25C4.22222 10.5 4.22222 10.5 5 10.5H7C7.55556 10.5 7.55556 10.5 7.55556 11.25V13C7.55556 13.5 7.55556 13.5 7 13.5H5C4.22222 13.5 4.22222 13.5 4.22222 13V11.25ZM9 12C9 11.7929 9.2239 11.625 9.5 11.625H19.5C19.7761 11.625 20 11.7929 20 12C20 12.2071 19.7761 12.375 19.5 12.375H9.5C9.2239 12.375 9 12.2071 9 12Z",
|
|
25
25
|
fill: 'currentColor'
|
|
26
26
|
}));
|
|
27
|
-
export var
|
|
27
|
+
export var JiraDisplayViewDropDown = function JiraDisplayViewDropDown(_ref) {
|
|
28
28
|
var onViewModeChange = _ref.onViewModeChange,
|
|
29
29
|
viewMode = _ref.viewMode;
|
|
30
30
|
var _useIntl = useIntl(),
|
|
@@ -32,7 +32,7 @@ export var DisplayViewDropDown = function DisplayViewDropDown(_ref) {
|
|
|
32
32
|
var triggerText = viewMode === 'issue' ? formatMessage(modalMessages.tableViewModeLabel) : formatMessage(modalMessages.inlineLinkViewModeLabel);
|
|
33
33
|
return jsx(DropdownMenu, {
|
|
34
34
|
trigger: triggerText,
|
|
35
|
-
testId: "jira-
|
|
35
|
+
testId: "jira-datasource-modal--view-drop-down"
|
|
36
36
|
}, jsx(Box, {
|
|
37
37
|
xcss: dropDownItemGroupStyles
|
|
38
38
|
}, jsx(DropdownItemGroup, null, jsx(DropdownItem, {
|
|
@@ -49,5 +49,71 @@ export var modalMessages = defineMessages({
|
|
|
49
49
|
id: 'linkDataSource.jira-issues.configmodal.issue',
|
|
50
50
|
description: 'Text that appears after issue count number.',
|
|
51
51
|
defaultMessage: '{totalCount, plural, one {issue} other {issues}}'
|
|
52
|
+
},
|
|
53
|
+
searchJiraTitleDuplicate: {
|
|
54
|
+
id: 'linkDataSource.jira-issues.searchJiraTitle',
|
|
55
|
+
description: 'The initial modal search state title that gives the user some idea about how to get information',
|
|
56
|
+
defaultMessage: 'Search for Jira issues'
|
|
57
|
+
},
|
|
58
|
+
// delete and remove duplicate from title above once EDM-9407 is merged
|
|
59
|
+
searchJiraTitle: {
|
|
60
|
+
id: 'linkDataSource.modal-initial-state.searchTitle',
|
|
61
|
+
description: 'The initial modal search state title that gives the user some idea about how to get information',
|
|
62
|
+
defaultMessage: 'Search for Jira issues'
|
|
63
|
+
},
|
|
64
|
+
searchDescriptionForJiraBasicSearchDuplicate: {
|
|
65
|
+
id: 'linkDataSource.jira-issues.searchDescription-basic',
|
|
66
|
+
description: 'The initial modal search state helper message displayed under the search title when basic search mode is selected',
|
|
67
|
+
defaultMessage: 'Search by keyword for issues to insert.'
|
|
68
|
+
},
|
|
69
|
+
// delete and remove duplicate from title above once EDM-9407 is merged
|
|
70
|
+
searchDescriptionForJiraBasicSearch: {
|
|
71
|
+
id: 'linkDataSource.modal-initial-state.searchDescription-basic',
|
|
72
|
+
description: 'The initial modal search state helper message displayed under the search title when basic search mode is selected',
|
|
73
|
+
defaultMessage: 'Search by keyword for issues to insert.'
|
|
74
|
+
},
|
|
75
|
+
searchDescriptionForJiraJQLSearchDuplicate: {
|
|
76
|
+
id: 'linkDataSource.jira-issues.searchDescription-jql',
|
|
77
|
+
description: 'The initial modal search state helper message displayed under the search title when JQL search mode is selected',
|
|
78
|
+
defaultMessage: 'Use JQL (Jira Query Language) to search for issues.'
|
|
79
|
+
},
|
|
80
|
+
// delete and remove duplicate from title above once EDM-9407 is merged
|
|
81
|
+
searchDescriptionForJiraJQLSearch: {
|
|
82
|
+
id: 'linkDataSource.modal-initial-state.searchDescription-jql',
|
|
83
|
+
description: 'The initial modal search state helper message displayed under the search title when JQL search mode is selected',
|
|
84
|
+
defaultMessage: 'Use JQL (Jira Query Language) to search for issues.'
|
|
85
|
+
},
|
|
86
|
+
learnMoreLinkDuplicate: {
|
|
87
|
+
id: 'linkDataSource.jira-issues.learnMoreLink',
|
|
88
|
+
description: 'The link that displays under the search description to help people know more about JQL',
|
|
89
|
+
defaultMessage: 'Learn how to search with JQL'
|
|
90
|
+
},
|
|
91
|
+
// delete and remove duplicate from title above once EDM-9407 is merged
|
|
92
|
+
learnMoreLink: {
|
|
93
|
+
id: 'linkDataSource.modal-initial-state.learnMoreLink',
|
|
94
|
+
description: 'The link that displays under the search description to help people know more about JQL',
|
|
95
|
+
defaultMessage: 'Learn how to search with JQL'
|
|
96
|
+
},
|
|
97
|
+
noAccessToJiraSitesTitleDuplicate: {
|
|
98
|
+
id: 'linkDataSource.no.jira.sites.access.title',
|
|
99
|
+
description: 'Title that shows in the modal when user has no access to any Jira sites',
|
|
100
|
+
defaultMessage: "You don't have access to any Jira sites"
|
|
101
|
+
},
|
|
102
|
+
// delete and remove duplicate from title above once EDM-9407 is merged
|
|
103
|
+
noAccessToJiraSitesTitle: {
|
|
104
|
+
id: 'linkDataSource.jira-issues.no.jira.sites.access.title',
|
|
105
|
+
description: 'Title that shows in the modal when user has no access to any Jira sites',
|
|
106
|
+
defaultMessage: "You don't have access to any Jira sites"
|
|
107
|
+
},
|
|
108
|
+
noAccessToJiraSitesDescriptionDuplicate: {
|
|
109
|
+
id: 'linkDataSource.no.jira.sites.access.description',
|
|
110
|
+
description: 'Description that shows in the modal when user has no access to any Jira sites',
|
|
111
|
+
defaultMessage: 'To request access, contact your admin.'
|
|
112
|
+
},
|
|
113
|
+
// delete and remove duplicate from title above once EDM-9407 is merged
|
|
114
|
+
noAccessToJiraSitesDescription: {
|
|
115
|
+
id: 'linkDataSource.jira-issues.no.jira.sites.access.description',
|
|
116
|
+
description: 'Description that shows in the modal when user has no access to any Jira sites',
|
|
117
|
+
defaultMessage: 'To request access, contact your admin.'
|
|
52
118
|
}
|
|
53
119
|
});
|
|
@@ -1 +1,31 @@
|
|
|
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
|
+
import { IssueLikeDataTableViewProps } from '../ui/issue-like-table/types';
|
|
5
|
+
import { JiraIssueDatasourceParameters } from '../ui/jira-issues-modal/types';
|
|
1
6
|
export type JiraSearchMethod = 'basic' | 'jql';
|
|
7
|
+
export interface Site {
|
|
8
|
+
cloudId: string;
|
|
9
|
+
displayName: string;
|
|
10
|
+
url: string;
|
|
11
|
+
}
|
|
12
|
+
export type IssueViewModes = 'issue' | 'count';
|
|
13
|
+
export type ConfigModalProps = {
|
|
14
|
+
/** Unique identifier for which type of datasource is being rendered and for making its requests */
|
|
15
|
+
datasourceId: string;
|
|
16
|
+
/** The url that was used to insert a List of Links */
|
|
17
|
+
url?: string;
|
|
18
|
+
/** Parameters for making the data requests necessary to render data within the table */
|
|
19
|
+
parameters?: DatasourceParameters | JiraIssueDatasourceParameters;
|
|
20
|
+
/** Callback function to be invoked when the modal is closed either via cancel button click, esc keydown, or modal blanket click */
|
|
21
|
+
onCancel: () => void;
|
|
22
|
+
/** Callback function to be invoked when the insert issues button is clicked */
|
|
23
|
+
onInsert: (adf: InlineCardAdf | DatasourceAdf, analyticsEvent?: UIAnalyticsEvent) => void;
|
|
24
|
+
/** The view mode that the modal will show on open:
|
|
25
|
+
* - Table = Displays a list of links in table format
|
|
26
|
+
* - 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.
|
|
27
|
+
|
|
28
|
+
* The view modes in 'IssueViewModes' have not been changed from 'count' to 'inline link' and 'issue' to 'table'
|
|
29
|
+
* because it will introduce breaking changes to the public API requiring a major version bump*/
|
|
30
|
+
viewMode?: IssueViewModes;
|
|
31
|
+
} & Partial<Pick<IssueLikeDataTableViewProps, 'visibleColumnKeys' | 'wrappedColumnKeys' | 'columnCustomSizes'>>;
|
|
@@ -1,44 +1,89 @@
|
|
|
1
1
|
export declare const loadingErrorMessages: {
|
|
2
|
+
accessInstructionsDuplicate: {
|
|
3
|
+
id: string;
|
|
4
|
+
description: string;
|
|
5
|
+
defaultMessage: string;
|
|
6
|
+
};
|
|
2
7
|
accessInstructions: {
|
|
3
8
|
id: string;
|
|
4
9
|
description: string;
|
|
5
10
|
defaultMessage: string;
|
|
6
11
|
};
|
|
12
|
+
accessRequiredDuplicate: {
|
|
13
|
+
id: string;
|
|
14
|
+
description: string;
|
|
15
|
+
defaultMessage: string;
|
|
16
|
+
};
|
|
7
17
|
accessRequired: {
|
|
8
18
|
id: string;
|
|
9
19
|
description: string;
|
|
10
20
|
defaultMessage: string;
|
|
11
21
|
};
|
|
22
|
+
accessRequiredWithSiteDuplicate: {
|
|
23
|
+
id: string;
|
|
24
|
+
description: string;
|
|
25
|
+
defaultMessage: string;
|
|
26
|
+
};
|
|
12
27
|
accessRequiredWithSite: {
|
|
13
28
|
id: string;
|
|
14
29
|
description: string;
|
|
15
30
|
defaultMessage: string;
|
|
16
31
|
};
|
|
32
|
+
checkConnectionDuplicate: {
|
|
33
|
+
id: string;
|
|
34
|
+
description: string;
|
|
35
|
+
defaultMessage: string;
|
|
36
|
+
};
|
|
17
37
|
checkConnection: {
|
|
18
38
|
id: string;
|
|
19
39
|
description: string;
|
|
20
40
|
defaultMessage: string;
|
|
21
41
|
};
|
|
42
|
+
checkConnectionWithSourceDuplicate: {
|
|
43
|
+
id: string;
|
|
44
|
+
description: string;
|
|
45
|
+
defaultMessage: string;
|
|
46
|
+
};
|
|
22
47
|
checkConnectionWithSource: {
|
|
23
48
|
id: string;
|
|
24
49
|
description: string;
|
|
25
50
|
defaultMessage: string;
|
|
26
51
|
};
|
|
52
|
+
noResultsFoundDuplicate: {
|
|
53
|
+
id: string;
|
|
54
|
+
description: string;
|
|
55
|
+
defaultMessage: string;
|
|
56
|
+
};
|
|
27
57
|
noResultsFound: {
|
|
28
58
|
id: string;
|
|
29
59
|
description: string;
|
|
30
60
|
defaultMessage: string;
|
|
31
61
|
};
|
|
62
|
+
refreshDuplicate: {
|
|
63
|
+
id: string;
|
|
64
|
+
description: string;
|
|
65
|
+
defaultMessage: string;
|
|
66
|
+
};
|
|
32
67
|
refresh: {
|
|
33
68
|
id: string;
|
|
34
69
|
description: string;
|
|
35
70
|
defaultMessage: string;
|
|
36
71
|
};
|
|
72
|
+
unableToLoadItemsDuplicate: {
|
|
73
|
+
id: string;
|
|
74
|
+
description: string;
|
|
75
|
+
defaultMessage: string;
|
|
76
|
+
};
|
|
37
77
|
unableToLoadItems: {
|
|
38
78
|
id: string;
|
|
39
79
|
description: string;
|
|
40
80
|
defaultMessage: string;
|
|
41
81
|
};
|
|
82
|
+
unableToLoadResultsDuplicate: {
|
|
83
|
+
id: string;
|
|
84
|
+
description: string;
|
|
85
|
+
defaultMessage: string;
|
|
86
|
+
};
|
|
42
87
|
unableToLoadResults: {
|
|
43
88
|
id: string;
|
|
44
89
|
description: string;
|
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
|
-
|
|
3
|
+
import { MessageDescriptor } from 'react-intl-next';
|
|
4
|
+
interface NoInstanceViewProps {
|
|
5
|
+
title: MessageDescriptor;
|
|
6
|
+
description: MessageDescriptor;
|
|
7
|
+
testId: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const NoInstancesView: ({ title, description, testId, }: NoInstanceViewProps) => jsx.JSX.Element;
|
|
10
|
+
export {};
|