@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
|
@@ -4,9 +4,9 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.
|
|
7
|
+
exports.JiraInitialStateSVG = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var
|
|
9
|
+
var JiraInitialStateSVG = exports.JiraInitialStateSVG = function JiraInitialStateSVG() {
|
|
10
10
|
return /*#__PURE__*/_react.default.createElement("svg", {
|
|
11
11
|
width: "188",
|
|
12
12
|
height: "112",
|
|
@@ -55,5 +55,71 @@ var modalMessages = exports.modalMessages = (0, _reactIntlNext.defineMessages)({
|
|
|
55
55
|
id: 'linkDataSource.jira-issues.configmodal.issue',
|
|
56
56
|
description: 'Text that appears after issue count number.',
|
|
57
57
|
defaultMessage: '{totalCount, plural, one {issue} other {issues}}'
|
|
58
|
+
},
|
|
59
|
+
searchJiraTitleDuplicate: {
|
|
60
|
+
id: 'linkDataSource.jira-issues.searchJiraTitle',
|
|
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
|
+
// delete and remove duplicate from title above once EDM-9407 is merged
|
|
65
|
+
searchJiraTitle: {
|
|
66
|
+
id: 'linkDataSource.modal-initial-state.searchTitle',
|
|
67
|
+
description: 'The initial modal search state title that gives the user some idea about how to get information',
|
|
68
|
+
defaultMessage: 'Search for Jira issues'
|
|
69
|
+
},
|
|
70
|
+
searchDescriptionForJiraBasicSearchDuplicate: {
|
|
71
|
+
id: 'linkDataSource.jira-issues.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
|
+
// delete and remove duplicate from title above once EDM-9407 is merged
|
|
76
|
+
searchDescriptionForJiraBasicSearch: {
|
|
77
|
+
id: 'linkDataSource.modal-initial-state.searchDescription-basic',
|
|
78
|
+
description: 'The initial modal search state helper message displayed under the search title when basic search mode is selected',
|
|
79
|
+
defaultMessage: 'Search by keyword for issues to insert.'
|
|
80
|
+
},
|
|
81
|
+
searchDescriptionForJiraJQLSearchDuplicate: {
|
|
82
|
+
id: 'linkDataSource.jira-issues.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
|
+
// delete and remove duplicate from title above once EDM-9407 is merged
|
|
87
|
+
searchDescriptionForJiraJQLSearch: {
|
|
88
|
+
id: 'linkDataSource.modal-initial-state.searchDescription-jql',
|
|
89
|
+
description: 'The initial modal search state helper message displayed under the search title when JQL search mode is selected',
|
|
90
|
+
defaultMessage: 'Use JQL (Jira Query Language) to search for issues.'
|
|
91
|
+
},
|
|
92
|
+
learnMoreLinkDuplicate: {
|
|
93
|
+
id: 'linkDataSource.jira-issues.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
|
+
// delete and remove duplicate from title above once EDM-9407 is merged
|
|
98
|
+
learnMoreLink: {
|
|
99
|
+
id: 'linkDataSource.modal-initial-state.learnMoreLink',
|
|
100
|
+
description: 'The link that displays under the search description to help people know more about JQL',
|
|
101
|
+
defaultMessage: 'Learn how to search with JQL'
|
|
102
|
+
},
|
|
103
|
+
noAccessToJiraSitesTitleDuplicate: {
|
|
104
|
+
id: 'linkDataSource.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
|
+
// delete and remove duplicate from title above once EDM-9407 is merged
|
|
109
|
+
noAccessToJiraSitesTitle: {
|
|
110
|
+
id: 'linkDataSource.jira-issues.no.jira.sites.access.title',
|
|
111
|
+
description: 'Title that shows in the modal when user has no access to any Jira sites',
|
|
112
|
+
defaultMessage: "You don't have access to any Jira sites"
|
|
113
|
+
},
|
|
114
|
+
noAccessToJiraSitesDescriptionDuplicate: {
|
|
115
|
+
id: 'linkDataSource.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.'
|
|
118
|
+
},
|
|
119
|
+
// delete and remove duplicate from title above once EDM-9407 is merged
|
|
120
|
+
noAccessToJiraSitesDescription: {
|
|
121
|
+
id: 'linkDataSource.jira-issues.no.jira.sites.access.description',
|
|
122
|
+
description: 'Description that shows in the modal when user has no access to any Jira sites',
|
|
123
|
+
defaultMessage: 'To request access, contact your admin.'
|
|
58
124
|
}
|
|
59
125
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const
|
|
1
|
+
export const getAvailableSites = async product => {
|
|
2
2
|
const requestConfig = {
|
|
3
3
|
method: 'POST',
|
|
4
4
|
credentials: 'include',
|
|
@@ -8,7 +8,7 @@ export const getAvailableJiraSites = async () => {
|
|
|
8
8
|
'Content-Type': 'application/json'
|
|
9
9
|
},
|
|
10
10
|
body: JSON.stringify({
|
|
11
|
-
products: ['jira-software.ondemand', 'jira-core.ondemand', 'jira-incident-manager.ondemand', 'jira-product-discovery', 'jira-servicedesk.ondemand']
|
|
11
|
+
products: product === 'confluence' ? ['confluence.ondemand'] : ['jira-software.ondemand', 'jira-core.ondemand', 'jira-incident-manager.ondemand', 'jira-product-discovery', 'jira-servicedesk.ondemand']
|
|
12
12
|
})
|
|
13
13
|
};
|
|
14
14
|
const response = await fetch(`/gateway/api/available-sites`, requestConfig);
|
|
@@ -36,7 +36,7 @@ export const LoadingError = ({
|
|
|
36
36
|
}, [fireEvent]);
|
|
37
37
|
return jsx("div", {
|
|
38
38
|
css: errorContainerStyles,
|
|
39
|
-
"data-testid": "
|
|
39
|
+
"data-testid": "datasource--loading-error"
|
|
40
40
|
}, jsx(LoadingErrorSVG, null), jsx("div", {
|
|
41
41
|
css: errorMessageContainerStyles
|
|
42
42
|
}, jsx("span", {
|
|
@@ -1,55 +1,111 @@
|
|
|
1
1
|
import { defineMessages } from 'react-intl-next';
|
|
2
2
|
export const loadingErrorMessages = defineMessages({
|
|
3
|
+
accessInstructionsDuplicate: {
|
|
4
|
+
id: 'linkDataSource.accessInstructions',
|
|
5
|
+
description: "Instructions to let the user know they must contact their site administrator in order to access this site's content",
|
|
6
|
+
defaultMessage: 'To request access, contact your site administrator.'
|
|
7
|
+
},
|
|
8
|
+
//delete and remove duplicate from title above
|
|
3
9
|
accessInstructions: {
|
|
4
10
|
id: 'linkDataSource.jira-issues.accessInstructions',
|
|
5
11
|
description: "Instructions to let the user know they must contact their site administrator in order to access this site's content",
|
|
6
12
|
defaultMessage: 'To request access, contact your site administrator.'
|
|
7
13
|
},
|
|
14
|
+
accessRequiredDuplicate: {
|
|
15
|
+
id: 'linkDataSource.accessRequired',
|
|
16
|
+
description: 'Message letting user know that they do not have access to this content',
|
|
17
|
+
defaultMessage: "You don't have access to this content"
|
|
18
|
+
},
|
|
19
|
+
//delete and remove duplicate from title above
|
|
8
20
|
accessRequired: {
|
|
9
21
|
id: 'linkDataSource.jira-issues.accessRequired',
|
|
10
22
|
description: 'Message letting user know that they do not have access to this content',
|
|
11
23
|
defaultMessage: "You don't have access to this content"
|
|
12
24
|
},
|
|
25
|
+
accessRequiredWithSiteDuplicate: {
|
|
26
|
+
id: 'linkDataSource.accessRequiredWithSite',
|
|
27
|
+
description: 'Message letting user know that they do not have access to the site that will be listed below this message',
|
|
28
|
+
defaultMessage: "You don't have access to the following site:"
|
|
29
|
+
},
|
|
30
|
+
//delete and remove duplicate from title above
|
|
13
31
|
accessRequiredWithSite: {
|
|
14
32
|
id: 'linkDataSource.jira-issues.accessRequiredWithSite',
|
|
15
33
|
description: 'Message letting user know that they do not have access to the site that will be listed below this message',
|
|
16
34
|
defaultMessage: "You don't have access to the following site:"
|
|
17
35
|
},
|
|
36
|
+
checkConnectionDuplicate: {
|
|
37
|
+
id: 'linkDataSource.checkConnection',
|
|
38
|
+
description: 'Instructions to let the user know how to resolve the network error that occurred or to try again at a different time',
|
|
39
|
+
defaultMessage: 'Check your connection and refresh, or try again later.'
|
|
40
|
+
},
|
|
41
|
+
//delete and remove duplicate from title above
|
|
18
42
|
checkConnection: {
|
|
19
43
|
id: 'linkDataSource.jira-issues.checkConnection',
|
|
20
44
|
description: 'Instructions to let the user know how to resolve the network error that occurred or to try again at a different time',
|
|
21
45
|
defaultMessage: 'Check your connection and refresh, or try again later.'
|
|
22
46
|
},
|
|
47
|
+
checkConnectionWithSourceDuplicate: {
|
|
48
|
+
id: 'linkDataSource.checkConnectionWithSource',
|
|
49
|
+
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',
|
|
50
|
+
defaultMessage: 'Check your connection and refresh, or <a>open this query in Jira</a> to review.'
|
|
51
|
+
},
|
|
52
|
+
//delete and remove duplicate from title above
|
|
23
53
|
checkConnectionWithSource: {
|
|
24
54
|
id: 'linkDataSource.jira-issues.checkConnectionWithSource',
|
|
25
55
|
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',
|
|
26
56
|
defaultMessage: 'Check your connection and refresh, or <a>open this query in Jira</a> to review.'
|
|
27
57
|
},
|
|
58
|
+
noResultsFoundDuplicate: {
|
|
59
|
+
id: 'linkDataSource.noResultsFound',
|
|
60
|
+
description: 'Status message letting the user know their query did not have any results',
|
|
61
|
+
defaultMessage: 'No results found'
|
|
62
|
+
},
|
|
63
|
+
//delete and remove duplicate from title above
|
|
28
64
|
noResultsFound: {
|
|
29
65
|
id: 'linkDataSource.jira-issues.noResultsFound',
|
|
30
66
|
description: 'Status message letting the user know their query did not have any results',
|
|
31
67
|
defaultMessage: 'No results found'
|
|
32
68
|
},
|
|
69
|
+
refreshDuplicate: {
|
|
70
|
+
id: 'linkDataSource.refresh',
|
|
71
|
+
description: 'Button text to allow the user to refresh the table to see results',
|
|
72
|
+
defaultMessage: 'Refresh'
|
|
73
|
+
},
|
|
74
|
+
//delete and remove duplicate from title above
|
|
33
75
|
refresh: {
|
|
34
76
|
id: 'linkDataSource.jira-issues.refresh',
|
|
35
77
|
description: 'Button text to allow the user to refresh the table to see results',
|
|
36
78
|
defaultMessage: 'Refresh'
|
|
37
79
|
},
|
|
80
|
+
unableToLoadItemsDuplicate: {
|
|
81
|
+
id: 'linkDataSource.unableToLoadItems',
|
|
82
|
+
description: 'Error state message letting the user know we were unable the load the requested list of items',
|
|
83
|
+
defaultMessage: 'Unable to load items'
|
|
84
|
+
},
|
|
85
|
+
//delete and remove duplicate from title above
|
|
38
86
|
unableToLoadItems: {
|
|
39
87
|
id: 'linkDataSource.jira-issues.unableToLoadItems',
|
|
40
88
|
description: 'Error state message letting the user know we were unable the load the requested list of items',
|
|
41
89
|
defaultMessage: 'Unable to load items'
|
|
42
90
|
},
|
|
91
|
+
unableToLoadResultsDuplicate: {
|
|
92
|
+
id: 'linkDataSource.unableToLoadResults',
|
|
93
|
+
description: 'Error state message letting the user know we were unable the load the requested list of results',
|
|
94
|
+
defaultMessage: 'Unable to load results'
|
|
95
|
+
},
|
|
96
|
+
//delete and remove duplicate from title above
|
|
43
97
|
unableToLoadResults: {
|
|
44
98
|
id: 'linkDataSource.jira-issues.unableToLoadResults',
|
|
45
99
|
description: 'Error state message letting the user know we were unable the load the requested list of results',
|
|
46
100
|
defaultMessage: 'Unable to load results'
|
|
47
101
|
},
|
|
102
|
+
// delete once EDM-9407 is merged
|
|
48
103
|
noAccessToJiraSitesTitle: {
|
|
49
104
|
id: 'linkDataSource.jira-issues.no.jira.sites.access.title',
|
|
50
105
|
description: 'Title that shows in the modal when user has no access to any Jira sites',
|
|
51
106
|
defaultMessage: "You don't have access to any Jira sites"
|
|
52
107
|
},
|
|
108
|
+
// delete once EDM-9407 is merged
|
|
53
109
|
noAccessToJiraSitesDescription: {
|
|
54
110
|
id: 'linkDataSource.jira-issues.no.jira.sites.access.description',
|
|
55
111
|
description: 'Description that shows in the modal when user has no access to any Jira sites',
|
|
@@ -36,7 +36,7 @@ export const ModalLoadingError = ({
|
|
|
36
36
|
}, [fireEvent]);
|
|
37
37
|
return jsx("div", {
|
|
38
38
|
css: errorContainerStyles,
|
|
39
|
-
"data-testid": "
|
|
39
|
+
"data-testid": "datasource-modal--loading-error"
|
|
40
40
|
}, jsx(LoadingErrorSVG, null), jsx("div", {
|
|
41
41
|
css: errorMessageContainerStyles
|
|
42
42
|
}, jsx("span", {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { css, jsx } from '@emotion/react';
|
|
3
|
-
import {
|
|
3
|
+
import { useIntl } from 'react-intl-next';
|
|
4
4
|
import { Flex, xcss } from '@atlaskit/primitives';
|
|
5
|
-
import { loadingErrorMessages } from './messages';
|
|
6
5
|
import { NoInstancesSvg } from './no-instances-svg';
|
|
7
6
|
const titleStyles = css({
|
|
8
7
|
font: "var(--ds-font-heading-small, normal 600 16px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
@@ -14,13 +13,22 @@ const descriptionStyles = css({
|
|
|
14
13
|
const containerStyles = xcss({
|
|
15
14
|
marginTop: '60px'
|
|
16
15
|
});
|
|
17
|
-
export const NoInstancesView = (
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
16
|
+
export const NoInstancesView = ({
|
|
17
|
+
title,
|
|
18
|
+
description,
|
|
19
|
+
testId
|
|
20
|
+
}) => {
|
|
21
|
+
const {
|
|
22
|
+
formatMessage
|
|
23
|
+
} = useIntl();
|
|
24
|
+
return jsx(Flex, {
|
|
25
|
+
testId: testId,
|
|
26
|
+
direction: "column",
|
|
27
|
+
alignItems: "center",
|
|
28
|
+
xcss: containerStyles
|
|
29
|
+
}, jsx(NoInstancesSvg, null), jsx("span", {
|
|
30
|
+
css: titleStyles
|
|
31
|
+
}, formatMessage(title)), jsx("span", {
|
|
32
|
+
css: descriptionStyles
|
|
33
|
+
}, formatMessage(description)));
|
|
34
|
+
};
|
|
@@ -30,7 +30,7 @@ export const NoResults = ({
|
|
|
30
30
|
}, [fireEvent]);
|
|
31
31
|
return jsx("div", {
|
|
32
32
|
css: noResultsContainerStyles,
|
|
33
|
-
"data-testid": "
|
|
33
|
+
"data-testid": "datasource-modal--no-results"
|
|
34
34
|
}, jsx("svg", {
|
|
35
35
|
width: "131",
|
|
36
36
|
height: "120",
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
|
|
3
|
-
import { useMemo } from 'react';
|
|
4
2
|
import { css, jsx } from '@emotion/react';
|
|
5
|
-
import { FormattedMessage } from 'react-intl-next';
|
|
3
|
+
import { FormattedMessage, useIntl } from 'react-intl-next';
|
|
6
4
|
import Lozenge from '@atlaskit/lozenge';
|
|
7
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
8
5
|
import { N300 } from '@atlaskit/theme/colors';
|
|
9
|
-
import { InitialStateSVG } from './assets/initial-state-svg';
|
|
10
6
|
import { initialStateViewMessages } from './messages';
|
|
11
7
|
const initialStateViewContainerStyles = css({
|
|
12
8
|
display: 'flex',
|
|
@@ -17,8 +13,7 @@ const svgAndTextsWrapperStyles = css({
|
|
|
17
13
|
textAlign: 'center',
|
|
18
14
|
alignSelf: 'center',
|
|
19
15
|
paddingTop: "var(--ds-space-600, 48px)",
|
|
20
|
-
paddingBottom: "var(--ds-space-600, 48px)"
|
|
21
|
-
width: '260px'
|
|
16
|
+
paddingBottom: "var(--ds-space-600, 48px)"
|
|
22
17
|
});
|
|
23
18
|
const betaTagStyles = css({
|
|
24
19
|
display: 'flex'
|
|
@@ -40,36 +35,32 @@ const learnMoreLinkStyles = css({
|
|
|
40
35
|
paddingTop: "var(--ds-space-200, 16px)",
|
|
41
36
|
display: 'inline-block'
|
|
42
37
|
});
|
|
43
|
-
const methodToDescriptionMessage = {
|
|
44
|
-
basic: initialStateViewMessages.searchDescriptionForBasicSearch,
|
|
45
|
-
jql: initialStateViewMessages.searchDescriptionForJQLSearch
|
|
46
|
-
};
|
|
47
|
-
const jqlSupportDocumentLink = 'https://support.atlassian.com/jira-service-management-cloud/docs/use-advanced-search-with-jira-query-language-jql/';
|
|
48
38
|
export const InitialStateView = ({
|
|
49
|
-
|
|
39
|
+
icon,
|
|
40
|
+
showBeta = false,
|
|
41
|
+
title,
|
|
42
|
+
description,
|
|
43
|
+
learnMoreLink
|
|
50
44
|
}) => {
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
return false;
|
|
56
|
-
}, []);
|
|
45
|
+
const {
|
|
46
|
+
formatMessage
|
|
47
|
+
} = useIntl();
|
|
57
48
|
return jsx("div", {
|
|
58
49
|
css: initialStateViewContainerStyles,
|
|
59
|
-
"data-testid": "
|
|
50
|
+
"data-testid": "datasource-modal--initial-state-view"
|
|
60
51
|
}, jsx("div", {
|
|
61
52
|
css: svgAndTextsWrapperStyles
|
|
62
|
-
},
|
|
53
|
+
}, icon, jsx("div", {
|
|
63
54
|
css: searchTitleStyles
|
|
64
|
-
},
|
|
55
|
+
}, showBeta && jsx("div", {
|
|
65
56
|
css: betaTagStyles
|
|
66
57
|
}, jsx(Lozenge, {
|
|
67
58
|
appearance: "new"
|
|
68
|
-
}, jsx(FormattedMessage, initialStateViewMessages.beta))),
|
|
59
|
+
}, jsx(FormattedMessage, initialStateViewMessages.beta))), formatMessage(title)), jsx("div", {
|
|
69
60
|
css: mainTextStyles
|
|
70
|
-
},
|
|
71
|
-
href:
|
|
61
|
+
}, formatMessage(description)), learnMoreLink && jsx("a", {
|
|
62
|
+
href: learnMoreLink.href,
|
|
72
63
|
target: "_blank",
|
|
73
64
|
css: learnMoreLinkStyles
|
|
74
|
-
},
|
|
65
|
+
}, formatMessage(learnMoreLink.text))));
|
|
75
66
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineMessages } from 'react-intl-next';
|
|
2
2
|
export const initialStateViewMessages = defineMessages({
|
|
3
|
-
|
|
4
|
-
id: 'linkDataSource.modal-initial-state.
|
|
3
|
+
jiraSearchTitle: {
|
|
4
|
+
id: 'linkDataSource.modal-initial-state.jiraSearchTitle',
|
|
5
5
|
description: 'The initial modal search state title that gives the user some idea about how to get information',
|
|
6
6
|
defaultMessage: 'Search for Jira issues'
|
|
7
7
|
},
|
|
@@ -10,6 +10,13 @@ export const initialStateViewMessages = defineMessages({
|
|
|
10
10
|
description: 'Beta lozenge',
|
|
11
11
|
defaultMessage: 'Beta'
|
|
12
12
|
},
|
|
13
|
+
// everything below is a duplication from the work around EDM-9407
|
|
14
|
+
// needs to be cleaned up after that PR is merged
|
|
15
|
+
searchTitle: {
|
|
16
|
+
id: 'linkDataSource.modal-initial-state.searchTitle',
|
|
17
|
+
description: 'The initial modal search state title that gives the user some idea about how to get information',
|
|
18
|
+
defaultMessage: 'Search for Jira issues'
|
|
19
|
+
},
|
|
13
20
|
searchDescriptionForBasicSearch: {
|
|
14
21
|
id: 'linkDataSource.modal-initial-state.searchDescription-basic',
|
|
15
22
|
description: 'The initial modal search state helper message displayed under the search title when basic search mode is selected',
|
|
@@ -23,7 +23,9 @@ export const BasicSearchInput = ({
|
|
|
23
23
|
onChange,
|
|
24
24
|
onSearch,
|
|
25
25
|
searchTerm,
|
|
26
|
-
|
|
26
|
+
fullWidth,
|
|
27
|
+
testId,
|
|
28
|
+
placeholder
|
|
27
29
|
}) => {
|
|
28
30
|
const {
|
|
29
31
|
formatMessage
|
|
@@ -38,8 +40,9 @@ export const BasicSearchInput = ({
|
|
|
38
40
|
}
|
|
39
41
|
return false;
|
|
40
42
|
}, []);
|
|
43
|
+
const isFullWidth = fullWidth || !showBasicFilters;
|
|
41
44
|
return jsx("form", {
|
|
42
|
-
css:
|
|
45
|
+
css: isFullWidth ? formStyles : formWithMaxWidthStyles,
|
|
43
46
|
onSubmit: handleFormSubmit
|
|
44
47
|
}, jsx(Textfield, {
|
|
45
48
|
elemAfterInput: jsx(LoadingButton, {
|
|
@@ -53,12 +56,12 @@ export const BasicSearchInput = ({
|
|
|
53
56
|
isLoading: isSearching,
|
|
54
57
|
onClick: () => onSearch(searchTerm),
|
|
55
58
|
spacing: "none",
|
|
56
|
-
testId:
|
|
59
|
+
testId: `${testId}--basic-search-button`
|
|
57
60
|
}),
|
|
58
61
|
autoFocus: true,
|
|
59
62
|
onChange: onChange,
|
|
60
|
-
placeholder: formatMessage(
|
|
61
|
-
testId: testId
|
|
63
|
+
placeholder: formatMessage(placeholder),
|
|
64
|
+
testId: `${testId}--basic-search-input`,
|
|
62
65
|
value: searchTerm
|
|
63
66
|
}));
|
|
64
67
|
};
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { defineMessages } from 'react-intl-next';
|
|
2
2
|
export const basicSearchInputMessages = defineMessages({
|
|
3
|
+
basicTextSearchLabelDuplicate: {
|
|
4
|
+
id: 'linkDataSource.configmodal.basicTextSearchPlaceholder',
|
|
5
|
+
description: 'Placeholder text for the search input box',
|
|
6
|
+
defaultMessage: 'Search for issues by keyword'
|
|
7
|
+
},
|
|
3
8
|
basicTextSearchLabel: {
|
|
4
9
|
id: 'linkDataSource.jira-issues.configmodal.basicTextSearchPlaceholder',
|
|
5
10
|
description: 'Placeholder text for the search input box',
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
const contentContainerStyles = xcss({
|
|
8
|
+
display: 'grid',
|
|
9
|
+
maxHeight: '420px',
|
|
10
|
+
overflow: 'auto',
|
|
11
|
+
borderBottom: `2px solid ${`var(--ds-background-accent-gray-subtler, ${N40})`}`,
|
|
12
|
+
backgroundImage: scrollableContainerShadowsCssComponents.backgroundImage,
|
|
13
|
+
backgroundPosition: scrollableContainerShadowsCssComponents.backgroundPosition,
|
|
14
|
+
backgroundRepeat: scrollableContainerShadowsCssComponents.backgroundRepeat,
|
|
15
|
+
backgroundSize: scrollableContainerShadowsCssComponents.backgroundSize,
|
|
16
|
+
backgroundAttachment: scrollableContainerShadowsCssComponents.backgroundAttachment
|
|
17
|
+
});
|
|
18
|
+
const tableContainerStyles = xcss({
|
|
19
|
+
borderTopLeftRadius: "var(--ds-border-radius-200, 8px)",
|
|
20
|
+
borderTopRightRadius: "var(--ds-border-radius-200, 8px)",
|
|
21
|
+
border: `1px solid ${`var(--ds-border, ${N40})`}`
|
|
22
|
+
});
|
|
23
|
+
export const ContentContainer = ({
|
|
24
|
+
children,
|
|
25
|
+
withTableBorder
|
|
26
|
+
}) => {
|
|
27
|
+
return jsx(Box, {
|
|
28
|
+
xcss: [contentContainerStyles, withTableBorder && tableContainerStyles]
|
|
29
|
+
}, children);
|
|
30
|
+
};
|
|
@@ -2,19 +2,28 @@
|
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
3
|
import { css, jsx } from '@emotion/react';
|
|
4
4
|
import { useIntl } from 'react-intl-next';
|
|
5
|
+
import { Box, xcss } from '@atlaskit/primitives';
|
|
5
6
|
import Select from '@atlaskit/select';
|
|
6
|
-
import { siteSelectorIndex } from '
|
|
7
|
+
import { siteSelectorIndex } from '../../../../common/zindex';
|
|
7
8
|
import { siteSelectorMessages } from './messages';
|
|
9
|
+
const dropdownContainerStyles = xcss({
|
|
10
|
+
display: 'flex',
|
|
11
|
+
alignItems: 'center',
|
|
12
|
+
gap: 'space.100',
|
|
13
|
+
minHeight: '40px' // to prevent vertical shifting when site selector pops in
|
|
14
|
+
});
|
|
8
15
|
const selectStyles = css({
|
|
9
|
-
|
|
16
|
+
fontSize: "var(--ds-font-size-100, 14px)",
|
|
10
17
|
fontWeight: "var(--ds-font-weight-medium, 500)",
|
|
18
|
+
lineHeight: "var(--ds-space-250, 20px)",
|
|
11
19
|
zIndex: siteSelectorIndex
|
|
12
20
|
});
|
|
13
|
-
export const
|
|
21
|
+
export const SiteSelector = props => {
|
|
14
22
|
const {
|
|
15
23
|
availableSites,
|
|
16
24
|
onSiteSelection,
|
|
17
|
-
|
|
25
|
+
selectedSite,
|
|
26
|
+
label,
|
|
18
27
|
testId
|
|
19
28
|
} = props;
|
|
20
29
|
const {
|
|
@@ -30,11 +39,13 @@ export const JiraSiteSelector = props => {
|
|
|
30
39
|
label: site.displayName,
|
|
31
40
|
value: site.cloudId
|
|
32
41
|
})), [availableSites]);
|
|
33
|
-
const selectedSiteOption =
|
|
34
|
-
label:
|
|
35
|
-
value:
|
|
42
|
+
const selectedSiteOption = selectedSite && {
|
|
43
|
+
label: selectedSite.displayName,
|
|
44
|
+
value: selectedSite.cloudId
|
|
36
45
|
};
|
|
37
|
-
return jsx(
|
|
46
|
+
return jsx(Box, {
|
|
47
|
+
xcss: dropdownContainerStyles
|
|
48
|
+
}, formatMessage(label), availableSites && availableSites.length > 1 && jsx("span", {
|
|
38
49
|
"data-testid": `${testId}--trigger`
|
|
39
50
|
}, jsx(Select, {
|
|
40
51
|
css: selectStyles,
|
|
@@ -57,5 +68,5 @@ export const JiraSiteSelector = props => {
|
|
|
57
68
|
},
|
|
58
69
|
testId: testId,
|
|
59
70
|
value: selectedSiteOption
|
|
60
|
-
}));
|
|
71
|
+
})));
|
|
61
72
|
};
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { defineMessages } from 'react-intl-next';
|
|
2
2
|
export const siteSelectorMessages = defineMessages({
|
|
3
|
+
chooseSiteDuplicate: {
|
|
4
|
+
id: 'linkDataSource.site-selector.configmodal.chooseSite',
|
|
5
|
+
description: 'Label for input letting user know they have to choose a site',
|
|
6
|
+
defaultMessage: 'Choose site'
|
|
7
|
+
},
|
|
8
|
+
// delete this and remove duplicate from above once EDM-9407 is merged
|
|
3
9
|
chooseSite: {
|
|
4
10
|
id: 'linkDataSource.jira-issues.configmodal.chooseSite',
|
|
5
11
|
description: 'Label for input letting user know they have to choose a site',
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React, { lazy, Suspense } from 'react';
|
|
2
|
+
export const CONFLUENCE_SEARCH_DATASOURCE_ID = '768fc736-3af4-4a8f-b27e-203602bff8ca';
|
|
3
|
+
const LazyConfluenceSearchConfigModal = /*#__PURE__*/lazy(() => import( /* webpackChunkName: "@atlaskit-internal_linkdatasource-confluencesearchmodal" */'./modal').then(module => ({
|
|
4
|
+
default: module.ConfluenceSearchConfigModal
|
|
5
|
+
})));
|
|
6
|
+
const ConfluenceSearchConfigModalWithWrappers = props => {
|
|
7
|
+
return /*#__PURE__*/React.createElement(Suspense, {
|
|
8
|
+
fallback: /*#__PURE__*/React.createElement("div", {
|
|
9
|
+
"data-testid": 'confluence-search-datasource-table-suspense'
|
|
10
|
+
})
|
|
11
|
+
}, /*#__PURE__*/React.createElement(LazyConfluenceSearchConfigModal, props));
|
|
12
|
+
};
|
|
13
|
+
export default ConfluenceSearchConfigModalWithWrappers;
|