@atlaskit/link-datasource 1.19.18 → 1.19.19
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 +6 -0
- package/dist/cjs/analytics/constants.js +1 -1
- package/dist/cjs/ui/assets-modal/modal/index.js +14 -14
- package/dist/cjs/ui/assets-modal/modal/render-assets-content/index.js +18 -20
- package/dist/cjs/ui/assets-modal/modal/render-assets-content/initial-state-view/index.js +4 -6
- package/dist/cjs/ui/assets-modal/search-container/aql-search-input/index.js +13 -15
- package/dist/cjs/ui/assets-modal/search-container/aql-search-input/loading-state.js +1 -4
- package/dist/cjs/ui/assets-modal/search-container/index.js +5 -8
- package/dist/cjs/ui/assets-modal/search-container/loading-state.js +3 -6
- package/dist/cjs/ui/assets-modal/search-container/object-schema-select/index.js +3 -4
- package/dist/cjs/ui/assets-modal/search-container/object-schema-select/loading-state.js +1 -4
- package/dist/cjs/ui/common/error-state/access-required.js +8 -10
- package/dist/cjs/ui/common/error-state/loading-error.js +6 -8
- package/dist/cjs/ui/common/error-state/modal-loading-error.js +7 -9
- package/dist/cjs/ui/common/error-state/no-instances.js +6 -6
- package/dist/cjs/ui/common/error-state/no-results.js +37 -39
- package/dist/cjs/ui/datasource-table-view/datasourceTableView.js +8 -9
- package/dist/cjs/ui/issue-like-table/column-picker/concatenated-menu-list.js +5 -6
- package/dist/cjs/ui/issue-like-table/column-picker/index.js +5 -7
- package/dist/cjs/ui/issue-like-table/drag-column-preview.js +5 -6
- package/dist/cjs/ui/issue-like-table/draggable-table-heading.js +6 -6
- package/dist/cjs/ui/issue-like-table/empty-state/index.js +13 -15
- package/dist/cjs/ui/issue-like-table/index.js +14 -15
- package/dist/cjs/ui/issue-like-table/render-type/richtext/index.js +3 -3
- package/dist/cjs/ui/jira-issues-modal/basic-filters/ui/async-popup-select/dropdownIndicator.js +2 -0
- package/dist/cjs/ui/jira-issues-modal/basic-filters/ui/async-popup-select/footer.js +2 -0
- package/dist/cjs/ui/jira-issues-modal/basic-filters/ui/async-popup-select/formatOptionLabel.js +2 -0
- package/dist/cjs/ui/jira-issues-modal/basic-filters/ui/async-popup-select/trigger.js +2 -0
- package/dist/cjs/ui/jira-issues-modal/basic-filters/ui/index.js +2 -0
- package/dist/cjs/ui/jira-issues-modal/basic-filters/ui/menu-list/index.js +2 -0
- package/dist/cjs/ui/jira-issues-modal/basic-filters/ui/menu-list/selectMessage.js +2 -0
- package/dist/cjs/ui/jira-issues-modal/basic-search-input/index.js +4 -6
- package/dist/cjs/ui/jira-issues-modal/initial-state-view/index.js +23 -17
- package/dist/cjs/ui/jira-issues-modal/jira-search-container/index.js +27 -16
- package/dist/cjs/ui/jira-issues-modal/modal/index.js +29 -29
- package/dist/cjs/ui/jira-issues-modal/mode-switcher/index.js +4 -6
- package/dist/cjs/ui/jira-issues-modal/site-selector/index.js +2 -3
- package/dist/cjs/ui/table-footer/index.js +10 -12
- package/dist/es2019/analytics/constants.js +1 -1
- package/dist/es2019/ui/assets-modal/modal/index.js +14 -15
- package/dist/es2019/ui/assets-modal/modal/render-assets-content/index.js +19 -20
- package/dist/es2019/ui/assets-modal/modal/render-assets-content/initial-state-view/index.js +5 -7
- package/dist/es2019/ui/assets-modal/search-container/aql-search-input/index.js +14 -15
- package/dist/es2019/ui/assets-modal/search-container/aql-search-input/loading-state.js +1 -3
- package/dist/es2019/ui/assets-modal/search-container/index.js +5 -7
- package/dist/es2019/ui/assets-modal/search-container/loading-state.js +3 -5
- package/dist/es2019/ui/assets-modal/search-container/object-schema-select/index.js +2 -5
- package/dist/es2019/ui/assets-modal/search-container/object-schema-select/loading-state.js +1 -3
- package/dist/es2019/ui/common/error-state/access-required.js +9 -10
- package/dist/es2019/ui/common/error-state/loading-error.js +7 -8
- package/dist/es2019/ui/common/error-state/modal-loading-error.js +8 -9
- package/dist/es2019/ui/common/error-state/no-instances.js +7 -6
- package/dist/es2019/ui/common/error-state/no-results.js +38 -39
- package/dist/es2019/ui/datasource-table-view/datasourceTableView.js +9 -9
- package/dist/es2019/ui/issue-like-table/column-picker/concatenated-menu-list.js +6 -7
- package/dist/es2019/ui/issue-like-table/column-picker/index.js +5 -7
- package/dist/es2019/ui/issue-like-table/drag-column-preview.js +4 -5
- package/dist/es2019/ui/issue-like-table/draggable-table-heading.js +6 -7
- package/dist/es2019/ui/issue-like-table/empty-state/index.js +14 -15
- package/dist/es2019/ui/issue-like-table/index.js +15 -16
- package/dist/es2019/ui/issue-like-table/render-type/richtext/index.js +3 -4
- package/dist/es2019/ui/jira-issues-modal/basic-filters/ui/async-popup-select/dropdownIndicator.js +2 -0
- package/dist/es2019/ui/jira-issues-modal/basic-filters/ui/async-popup-select/footer.js +2 -0
- package/dist/es2019/ui/jira-issues-modal/basic-filters/ui/async-popup-select/formatOptionLabel.js +2 -0
- package/dist/es2019/ui/jira-issues-modal/basic-filters/ui/async-popup-select/trigger.js +2 -0
- package/dist/es2019/ui/jira-issues-modal/basic-filters/ui/index.js +2 -0
- package/dist/es2019/ui/jira-issues-modal/basic-filters/ui/menu-list/index.js +2 -0
- package/dist/es2019/ui/jira-issues-modal/basic-filters/ui/menu-list/selectMessage.js +2 -0
- package/dist/es2019/ui/jira-issues-modal/basic-search-input/index.js +5 -6
- package/dist/es2019/ui/jira-issues-modal/initial-state-view/index.js +29 -21
- package/dist/es2019/ui/jira-issues-modal/jira-search-container/index.js +23 -17
- package/dist/es2019/ui/jira-issues-modal/modal/index.js +29 -30
- package/dist/es2019/ui/jira-issues-modal/mode-switcher/index.js +5 -6
- package/dist/es2019/ui/jira-issues-modal/site-selector/index.js +3 -4
- package/dist/es2019/ui/table-footer/index.js +10 -12
- package/dist/esm/analytics/constants.js +1 -1
- package/dist/esm/ui/assets-modal/modal/index.js +14 -15
- package/dist/esm/ui/assets-modal/modal/render-assets-content/index.js +19 -20
- package/dist/esm/ui/assets-modal/modal/render-assets-content/initial-state-view/index.js +5 -7
- package/dist/esm/ui/assets-modal/search-container/aql-search-input/index.js +14 -15
- package/dist/esm/ui/assets-modal/search-container/aql-search-input/loading-state.js +1 -3
- package/dist/esm/ui/assets-modal/search-container/index.js +5 -7
- package/dist/esm/ui/assets-modal/search-container/loading-state.js +3 -5
- package/dist/esm/ui/assets-modal/search-container/object-schema-select/index.js +2 -5
- package/dist/esm/ui/assets-modal/search-container/object-schema-select/loading-state.js +1 -3
- package/dist/esm/ui/common/error-state/access-required.js +9 -10
- package/dist/esm/ui/common/error-state/loading-error.js +7 -8
- package/dist/esm/ui/common/error-state/modal-loading-error.js +8 -9
- package/dist/esm/ui/common/error-state/no-instances.js +7 -6
- package/dist/esm/ui/common/error-state/no-results.js +38 -39
- package/dist/esm/ui/datasource-table-view/datasourceTableView.js +9 -9
- package/dist/esm/ui/issue-like-table/column-picker/concatenated-menu-list.js +6 -7
- package/dist/esm/ui/issue-like-table/column-picker/index.js +5 -7
- package/dist/esm/ui/issue-like-table/drag-column-preview.js +6 -7
- package/dist/esm/ui/issue-like-table/draggable-table-heading.js +6 -7
- package/dist/esm/ui/issue-like-table/empty-state/index.js +14 -15
- package/dist/esm/ui/issue-like-table/index.js +15 -16
- package/dist/esm/ui/issue-like-table/render-type/richtext/index.js +3 -4
- package/dist/esm/ui/jira-issues-modal/basic-filters/ui/async-popup-select/dropdownIndicator.js +2 -0
- package/dist/esm/ui/jira-issues-modal/basic-filters/ui/async-popup-select/footer.js +2 -0
- package/dist/esm/ui/jira-issues-modal/basic-filters/ui/async-popup-select/formatOptionLabel.js +2 -0
- package/dist/esm/ui/jira-issues-modal/basic-filters/ui/async-popup-select/trigger.js +2 -0
- package/dist/esm/ui/jira-issues-modal/basic-filters/ui/index.js +2 -0
- package/dist/esm/ui/jira-issues-modal/basic-filters/ui/menu-list/index.js +2 -0
- package/dist/esm/ui/jira-issues-modal/basic-filters/ui/menu-list/selectMessage.js +2 -0
- package/dist/esm/ui/jira-issues-modal/basic-search-input/index.js +5 -6
- package/dist/esm/ui/jira-issues-modal/initial-state-view/index.js +17 -11
- package/dist/esm/ui/jira-issues-modal/jira-search-container/index.js +27 -17
- package/dist/esm/ui/jira-issues-modal/modal/index.js +29 -30
- package/dist/esm/ui/jira-issues-modal/mode-switcher/index.js +5 -6
- package/dist/esm/ui/jira-issues-modal/site-selector/index.js +3 -4
- package/dist/esm/ui/table-footer/index.js +10 -12
- package/dist/types/ui/jira-issues-modal/mode-switcher/index.d.ts +7 -6
- package/dist/types-ts4.5/ui/jira-issues-modal/mode-switcher/index.d.ts +7 -6
- package/package.json +1 -1
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.26.1 */
|
|
2
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
1
3
|
import React, { useMemo } from 'react';
|
|
2
4
|
import { Flex, xcss } from '@atlaskit/primitives';
|
|
3
5
|
import { extractValuesFromNonComplexJQL } from '../utils/extractValuesFromNonComplexJQL';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
1
|
import { useMemo } from 'react';
|
|
3
|
-
import { css
|
|
2
|
+
import { css } from '@emotion/react';
|
|
4
3
|
import { useIntl } from 'react-intl-next';
|
|
5
4
|
import { LoadingButton } from '@atlaskit/button';
|
|
6
5
|
import SearchIcon from '@atlaskit/icon/glyph/editor/search';
|
|
@@ -38,14 +37,14 @@ export const BasicSearchInput = ({
|
|
|
38
37
|
}
|
|
39
38
|
return false;
|
|
40
39
|
}, []);
|
|
41
|
-
return
|
|
40
|
+
return /*#__PURE__*/React.createElement("form", {
|
|
42
41
|
css: showBasicFilters ? formWithMaxWidthStyles : formStyles,
|
|
43
42
|
onSubmit: handleFormSubmit
|
|
44
|
-
},
|
|
45
|
-
elemAfterInput:
|
|
43
|
+
}, /*#__PURE__*/React.createElement(Textfield, {
|
|
44
|
+
elemAfterInput: /*#__PURE__*/React.createElement(LoadingButton, {
|
|
46
45
|
appearance: "primary",
|
|
47
46
|
css: searchButtonStyles,
|
|
48
|
-
iconBefore:
|
|
47
|
+
iconBefore: /*#__PURE__*/React.createElement(SearchIcon, {
|
|
49
48
|
label: formatMessage(basicSearchInputMessages.basicTextSearchLabel),
|
|
50
49
|
size: "medium"
|
|
51
50
|
}),
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { css, jsx } from '@emotion/react';
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import { css } from '@emotion/react';
|
|
4
3
|
import { FormattedMessage } from 'react-intl-next';
|
|
5
4
|
import Lozenge from '@atlaskit/lozenge';
|
|
5
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
6
6
|
import { N300 } from '@atlaskit/theme/colors';
|
|
7
7
|
import { InitialStateSVG } from './assets/initial-state-svg';
|
|
8
8
|
import { initialStateViewMessages } from './messages';
|
|
@@ -47,21 +47,29 @@ const methodToDescriptionMessage = {
|
|
|
47
47
|
const jqlSupportDocumentLink = 'https://support.atlassian.com/jira-service-management-cloud/docs/use-advanced-search-with-jira-query-language-jql/';
|
|
48
48
|
export const InitialStateView = ({
|
|
49
49
|
searchMethod
|
|
50
|
-
}) =>
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
50
|
+
}) => {
|
|
51
|
+
const showBasicFilters = useMemo(() => {
|
|
52
|
+
if (getBooleanFF('platform.linking-platform.datasource.show-jlol-basic-filters')) {
|
|
53
|
+
return true;
|
|
54
|
+
}
|
|
55
|
+
return false;
|
|
56
|
+
}, []);
|
|
57
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
58
|
+
css: initialStateViewContainerStyles,
|
|
59
|
+
"data-testid": "jlol-datasource-modal--initial-state-view"
|
|
60
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
61
|
+
css: svgAndTextsWrapperStyles
|
|
62
|
+
}, /*#__PURE__*/React.createElement(InitialStateSVG, null), /*#__PURE__*/React.createElement("div", {
|
|
63
|
+
css: searchTitleStyles
|
|
64
|
+
}, !showBasicFilters && /*#__PURE__*/React.createElement("div", {
|
|
65
|
+
css: betaTagStyles
|
|
66
|
+
}, /*#__PURE__*/React.createElement(Lozenge, {
|
|
67
|
+
appearance: "new"
|
|
68
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, initialStateViewMessages.beta))), /*#__PURE__*/React.createElement(FormattedMessage, initialStateViewMessages.searchTitle)), /*#__PURE__*/React.createElement("div", {
|
|
69
|
+
css: mainTextStyles
|
|
70
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, methodToDescriptionMessage[searchMethod])), searchMethod === 'jql' ? /*#__PURE__*/React.createElement("a", {
|
|
71
|
+
href: jqlSupportDocumentLink,
|
|
72
|
+
target: "_blank",
|
|
73
|
+
css: learnMoreLinkStyles
|
|
74
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, initialStateViewMessages.learnMoreLink)) : null));
|
|
75
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.26.1 */
|
|
2
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
2
3
|
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
3
|
-
import { css
|
|
4
|
+
import { css } from '@emotion/react';
|
|
4
5
|
import { useIntl } from 'react-intl-next';
|
|
5
6
|
import { useDebouncedCallback } from 'use-debounce';
|
|
6
7
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
@@ -57,6 +58,19 @@ export const JiraSearchContainer = props => {
|
|
|
57
58
|
}
|
|
58
59
|
return false;
|
|
59
60
|
}, []);
|
|
61
|
+
const modeSwitcherOptionsMap = useMemo(() => ({
|
|
62
|
+
jql: {
|
|
63
|
+
label: 'JQL',
|
|
64
|
+
value: 'jql'
|
|
65
|
+
},
|
|
66
|
+
basic: {
|
|
67
|
+
label: formatMessage(modeSwitcherMessages.basicTextSearchLabel),
|
|
68
|
+
value: 'basic',
|
|
69
|
+
disabled: isComplexQuery,
|
|
70
|
+
tooltipText: isComplexQuery ? formatMessage(modeSwitcherMessages.basicModeSwitchDisabledTooltipText) : ''
|
|
71
|
+
}
|
|
72
|
+
}), [formatMessage, isComplexQuery]);
|
|
73
|
+
const modeSwitcherOptions = useMemo(() => showBasicFilters ? [modeSwitcherOptionsMap.basic, modeSwitcherOptionsMap.jql] : [modeSwitcherOptionsMap.jql, modeSwitcherOptionsMap.basic], [modeSwitcherOptionsMap, showBasicFilters]);
|
|
60
74
|
const {
|
|
61
75
|
hydratedOptions,
|
|
62
76
|
fetchHydratedJqlOptions,
|
|
@@ -168,40 +182,32 @@ export const JiraSearchContainer = props => {
|
|
|
168
182
|
setCloudId(currentCloudId);
|
|
169
183
|
}
|
|
170
184
|
}, [currentCloudId, cloudId, setSearchBarJql]);
|
|
171
|
-
return
|
|
185
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
172
186
|
css: inputContainerStyles,
|
|
173
187
|
"data-testid": "jira-search-container"
|
|
174
|
-
}, currentSearchMethod === 'basic' &&
|
|
188
|
+
}, currentSearchMethod === 'basic' && /*#__PURE__*/React.createElement(Flex, {
|
|
175
189
|
alignItems: "center",
|
|
176
190
|
xcss: basicSearchInputContainerStyles
|
|
177
|
-
},
|
|
191
|
+
}, /*#__PURE__*/React.createElement(BasicSearchInput, {
|
|
178
192
|
isSearching: isSearching,
|
|
179
193
|
onChange: handleBasicSearchChange,
|
|
180
194
|
onSearch: handleSearch,
|
|
181
195
|
searchTerm: basicSearchTerm
|
|
182
|
-
}), showBasicFilters &&
|
|
196
|
+
}), showBasicFilters && /*#__PURE__*/React.createElement(BasicFilters, {
|
|
183
197
|
jql: searchBarJql,
|
|
184
198
|
cloudId: cloudId || '',
|
|
185
199
|
onChange: handleBasicFilterSelectionChange,
|
|
186
200
|
selections: filterSelections,
|
|
187
201
|
isJQLHydrating: basicFilterHydrationStatus === 'loading'
|
|
188
|
-
})), currentSearchMethod === 'jql' &&
|
|
202
|
+
})), currentSearchMethod === 'jql' && /*#__PURE__*/React.createElement(JiraJQLEditor, {
|
|
189
203
|
cloudId: cloudId || '',
|
|
190
204
|
isSearching: isSearching,
|
|
191
205
|
onChange: onQueryChange,
|
|
192
206
|
onSearch: handleSearch,
|
|
193
207
|
query: searchBarJql
|
|
194
|
-
}),
|
|
208
|
+
}), /*#__PURE__*/React.createElement(ModeSwitcher, {
|
|
195
209
|
onOptionValueChange: onSearchMethodChange,
|
|
196
210
|
selectedOptionValue: currentSearchMethod,
|
|
197
|
-
options:
|
|
198
|
-
label: 'JQL',
|
|
199
|
-
value: 'jql'
|
|
200
|
-
}, {
|
|
201
|
-
label: formatMessage(modeSwitcherMessages.basicTextSearchLabel),
|
|
202
|
-
value: 'basic',
|
|
203
|
-
disabled: isComplexQuery,
|
|
204
|
-
tooltipText: isComplexQuery ? formatMessage(modeSwitcherMessages.basicModeSwitchDisabledTooltipText) : ''
|
|
205
|
-
}]
|
|
211
|
+
options: modeSwitcherOptions
|
|
206
212
|
}));
|
|
207
213
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
/** @jsx jsx */
|
|
3
2
|
import { Fragment, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
4
|
-
import { css
|
|
3
|
+
import { css } from '@emotion/react';
|
|
5
4
|
import { FormattedMessage, FormattedNumber, useIntl } from 'react-intl-next';
|
|
6
5
|
import { v4 as uuidv4 } from 'uuid';
|
|
7
6
|
import { withAnalyticsContext } from '@atlaskit/analytics-next';
|
|
@@ -417,9 +416,9 @@ export const PlainJiraIssuesConfigModal = props => {
|
|
|
417
416
|
visibleColumnCount.current = newVisibleColumnKeys.length;
|
|
418
417
|
setVisibleColumnKeys(newVisibleColumnKeys);
|
|
419
418
|
}, [visibleColumnKeys]);
|
|
420
|
-
const issueLikeDataTableView = useMemo(() =>
|
|
419
|
+
const issueLikeDataTableView = useMemo(() => /*#__PURE__*/React.createElement("div", {
|
|
421
420
|
css: [tableContainerStyles, contentContainerStyles]
|
|
422
|
-
},
|
|
421
|
+
}, /*#__PURE__*/React.createElement(IssueLikeDataTableView, {
|
|
423
422
|
testId: "jira-jql-datasource-table",
|
|
424
423
|
status: status,
|
|
425
424
|
columns: columns,
|
|
@@ -437,21 +436,21 @@ export const PlainJiraIssuesConfigModal = props => {
|
|
|
437
436
|
const renderCountModeContent = useCallback(() => {
|
|
438
437
|
const selectedJiraSiteUrl = selectedJiraSite === null || selectedJiraSite === void 0 ? void 0 : selectedJiraSite.url;
|
|
439
438
|
if (status === 'unauthorized') {
|
|
440
|
-
return
|
|
439
|
+
return /*#__PURE__*/React.createElement(AccessRequired, {
|
|
441
440
|
url: selectedJiraSiteUrl || urlBeingEdited
|
|
442
441
|
});
|
|
443
442
|
} else if (status === 'empty' || !jql || !selectedJiraSiteUrl) {
|
|
444
|
-
return
|
|
443
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
445
444
|
css: smartLinkContainerStyles
|
|
446
|
-
},
|
|
445
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
447
446
|
"data-testid": `jira-jql-datasource-modal--smart-card-placeholder`,
|
|
448
447
|
css: placeholderSmartLinkStyles
|
|
449
|
-
},
|
|
448
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, modalMessages.issuesCountSmartCardPlaceholderText)));
|
|
450
449
|
} else {
|
|
451
450
|
const urlWithEncodedJql = `${selectedJiraSiteUrl}/issues/?jql=${encodeURI(jql)}`;
|
|
452
|
-
return
|
|
451
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
453
452
|
css: smartLinkContainerStyles
|
|
454
|
-
},
|
|
453
|
+
}, /*#__PURE__*/React.createElement(LinkRenderType, {
|
|
455
454
|
url: urlWithEncodedJql
|
|
456
455
|
}));
|
|
457
456
|
}
|
|
@@ -459,48 +458,48 @@ export const PlainJiraIssuesConfigModal = props => {
|
|
|
459
458
|
const renderIssuesModeContent = useCallback(() => {
|
|
460
459
|
const selectedJiraSiteUrl = selectedJiraSite === null || selectedJiraSite === void 0 ? void 0 : selectedJiraSite.url;
|
|
461
460
|
if (status === 'rejected' && jqlUrl) {
|
|
462
|
-
return
|
|
461
|
+
return /*#__PURE__*/React.createElement(ModalLoadingError, {
|
|
463
462
|
url: jqlUrl
|
|
464
463
|
});
|
|
465
464
|
} else if (status === 'unauthorized') {
|
|
466
|
-
return
|
|
465
|
+
return /*#__PURE__*/React.createElement(AccessRequired, {
|
|
467
466
|
url: selectedJiraSiteUrl || urlBeingEdited
|
|
468
467
|
});
|
|
469
468
|
} else if (resolvedWithNoResults || status === 'forbidden') {
|
|
470
|
-
return
|
|
469
|
+
return /*#__PURE__*/React.createElement(NoResults, null);
|
|
471
470
|
} else if (status === 'empty' || !columns.length) {
|
|
472
471
|
// persist the empty state when making the initial /data request which contains the columns
|
|
473
|
-
return
|
|
472
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
474
473
|
css: [contentContainerStyles, !!jql && tableContainerStyles]
|
|
475
|
-
}, !!jql ?
|
|
474
|
+
}, !!jql ? /*#__PURE__*/React.createElement(EmptyState, {
|
|
476
475
|
testId: `jira-jql-datasource-modal--empty-state`
|
|
477
|
-
}) :
|
|
476
|
+
}) : /*#__PURE__*/React.createElement(InitialStateView, {
|
|
478
477
|
searchMethod: currentSearchMethod
|
|
479
478
|
}));
|
|
480
479
|
}
|
|
481
480
|
const firstIssueUrl = retrieveUrlForSmartCardRender();
|
|
482
481
|
if (responseItems.length === 1 && firstIssueUrl) {
|
|
483
|
-
return
|
|
482
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
484
483
|
css: smartLinkContainerStyles
|
|
485
|
-
},
|
|
484
|
+
}, /*#__PURE__*/React.createElement(LinkRenderType, {
|
|
486
485
|
url: firstIssueUrl
|
|
487
486
|
}));
|
|
488
487
|
}
|
|
489
488
|
return issueLikeDataTableView;
|
|
490
489
|
}, [columns.length, currentSearchMethod, issueLikeDataTableView, jql, jqlUrl, resolvedWithNoResults, responseItems.length, retrieveUrlForSmartCardRender, selectedJiraSite === null || selectedJiraSite === void 0 ? void 0 : selectedJiraSite.url, status, urlBeingEdited]);
|
|
491
|
-
return
|
|
490
|
+
return /*#__PURE__*/React.createElement(ModalTransition, null, /*#__PURE__*/React.createElement(Modal, {
|
|
492
491
|
testId: "jira-jql-datasource-modal",
|
|
493
492
|
onClose: onCancel,
|
|
494
493
|
width: "calc(100% - 80px)",
|
|
495
494
|
shouldScrollInViewport: true
|
|
496
|
-
},
|
|
495
|
+
}, /*#__PURE__*/React.createElement(ModalHeader, null, /*#__PURE__*/React.createElement(ModalTitle, null, /*#__PURE__*/React.createElement("div", {
|
|
497
496
|
css: dropdownContainerStyles
|
|
498
|
-
}, availableSites && availableSites.length > 1 ?
|
|
497
|
+
}, availableSites && availableSites.length > 1 ? /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(FormattedMessage, modalMessages.insertIssuesTitleManySites), /*#__PURE__*/React.createElement(JiraSiteSelector, {
|
|
499
498
|
availableSites: availableSites,
|
|
500
499
|
onSiteSelection: onSiteSelection,
|
|
501
500
|
selectedJiraSite: selectedJiraSite,
|
|
502
501
|
testId: "jira-jql-datasource-modal--site-selector"
|
|
503
|
-
})) :
|
|
502
|
+
})) : /*#__PURE__*/React.createElement(FormattedMessage, modalMessages.insertIssuesTitle))), !hasNoJiraSites && /*#__PURE__*/React.createElement(ModeSwitcher, {
|
|
504
503
|
isCompact: true,
|
|
505
504
|
options: [{
|
|
506
505
|
label: formatMessage(modalMessages.issueViewModeLabel),
|
|
@@ -511,7 +510,7 @@ export const PlainJiraIssuesConfigModal = props => {
|
|
|
511
510
|
}],
|
|
512
511
|
onOptionValueChange: handleViewModeChange,
|
|
513
512
|
selectedOptionValue: currentViewMode
|
|
514
|
-
})),
|
|
513
|
+
})), /*#__PURE__*/React.createElement(ModalBody, null, !hasNoJiraSites ? /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(JiraSearchContainer, {
|
|
515
514
|
setSearchBarJql: setSearchBarJql,
|
|
516
515
|
searchBarJql: searchBarJql,
|
|
517
516
|
isSearching: status === 'loading',
|
|
@@ -519,31 +518,31 @@ export const PlainJiraIssuesConfigModal = props => {
|
|
|
519
518
|
onSearch: onSearch,
|
|
520
519
|
initialSearchMethod: initialSearchMethod,
|
|
521
520
|
onSearchMethodChange: setCurrentSearchMethod
|
|
522
|
-
}), currentViewMode === 'count' ? renderCountModeContent() : renderIssuesModeContent()) :
|
|
521
|
+
}), currentViewMode === 'count' ? renderCountModeContent() : renderIssuesModeContent()) : /*#__PURE__*/React.createElement(NoInstancesView, null)), /*#__PURE__*/React.createElement(ModalFooter, null, shouldShowIssueCount && /*#__PURE__*/React.createElement("div", {
|
|
523
522
|
"data-testid": "jira-jql-datasource-modal-total-issues-count",
|
|
524
523
|
css: issueCountStyles
|
|
525
|
-
},
|
|
524
|
+
}, /*#__PURE__*/React.createElement(LinkUrl, {
|
|
526
525
|
href: jqlUrl,
|
|
527
526
|
target: "_blank",
|
|
528
527
|
testId: "item-count-url",
|
|
529
528
|
style: {
|
|
530
529
|
color: `var(--ds-text-accent-gray, ${N800})`
|
|
531
530
|
}
|
|
532
|
-
},
|
|
531
|
+
}, /*#__PURE__*/React.createElement(FormattedNumber, {
|
|
533
532
|
value: totalCount
|
|
534
|
-
}), ' ',
|
|
533
|
+
}), ' ', /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, modalMessages.issueText, {
|
|
535
534
|
values: {
|
|
536
535
|
totalCount
|
|
537
536
|
}
|
|
538
|
-
})))),
|
|
537
|
+
})))), /*#__PURE__*/React.createElement(Button, {
|
|
539
538
|
appearance: "default",
|
|
540
539
|
onClick: onCancelClick
|
|
541
|
-
},
|
|
540
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, modalMessages.cancelButtonText)), !hasNoJiraSites && /*#__PURE__*/React.createElement(Button, {
|
|
542
541
|
appearance: "primary",
|
|
543
542
|
onClick: onInsertPressed,
|
|
544
543
|
isDisabled: isInsertDisabled,
|
|
545
544
|
testId: "jira-jql-datasource-modal--insert-button"
|
|
546
|
-
},
|
|
545
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, modalMessages.insertIssuesButtonText)))));
|
|
547
546
|
};
|
|
548
547
|
const analyticsContextAttributes = {
|
|
549
548
|
dataProvider: 'jira-issues'
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
/** @jsx jsx */
|
|
3
2
|
import React from 'react';
|
|
4
|
-
import { css
|
|
3
|
+
import { css } from '@emotion/react';
|
|
5
4
|
import { N0, N20, N30A, N60, N700 } from '@atlaskit/theme/colors';
|
|
6
5
|
import Tooltip from '@atlaskit/tooltip';
|
|
7
6
|
const modeSwitcherStyles = css({
|
|
@@ -70,7 +69,7 @@ export const ModeSwitcher = props => {
|
|
|
70
69
|
const handleModeChange = event => {
|
|
71
70
|
onOptionValueChange(event.currentTarget.value);
|
|
72
71
|
};
|
|
73
|
-
return options.length > 0 ?
|
|
72
|
+
return options.length > 0 ? /*#__PURE__*/React.createElement("fieldset", {
|
|
74
73
|
css: [modeSwitcherStyles, isCompact && compactModeSwitcherStyles],
|
|
75
74
|
"data-testid": "mode-toggle-container",
|
|
76
75
|
disabled: isDisabled
|
|
@@ -81,13 +80,13 @@ export const ModeSwitcher = props => {
|
|
|
81
80
|
tooltipText
|
|
82
81
|
}) => {
|
|
83
82
|
const isSelected = value === selectedOptionValue;
|
|
84
|
-
return
|
|
83
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
85
84
|
content: tooltipText
|
|
86
|
-
}, tooltipProps =>
|
|
85
|
+
}, tooltipProps => /*#__PURE__*/React.createElement("label", _extends({}, tooltipProps, {
|
|
87
86
|
key: value,
|
|
88
87
|
css: [modeSwitcherLabelStyles, isCompact && compactModeSwitcherLabelStyles, isSelected && modeSwitcherLabelSelectedStyles, isDisabled && modeSwitcherDisabledStyles, isOptionDisabled && [modeSwitcherLabelDisabledStyles, modeSwitcherDisabledStyles]],
|
|
89
88
|
"data-testid": `mode-toggle-${value}`
|
|
90
|
-
}), label,
|
|
89
|
+
}), label, /*#__PURE__*/React.createElement("input", {
|
|
91
90
|
"aria-checked": isSelected,
|
|
92
91
|
"aria-disabled": isOptionDisabled,
|
|
93
92
|
checked: isSelected,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
1
|
import { useMemo } from 'react';
|
|
3
|
-
import { css
|
|
2
|
+
import { css } from '@emotion/react';
|
|
4
3
|
import { useIntl } from 'react-intl-next';
|
|
5
4
|
import Select from '@atlaskit/select';
|
|
6
5
|
import { siteSelectorIndex } from '../../../common/zindex';
|
|
@@ -35,9 +34,9 @@ export const JiraSiteSelector = props => {
|
|
|
35
34
|
label: selectedJiraSite.displayName,
|
|
36
35
|
value: selectedJiraSite.cloudId
|
|
37
36
|
};
|
|
38
|
-
return
|
|
37
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
39
38
|
"data-testid": `${testId}--trigger`
|
|
40
|
-
},
|
|
39
|
+
}, /*#__PURE__*/React.createElement(Select, {
|
|
41
40
|
css: selectStyles,
|
|
42
41
|
classNamePrefix: testId,
|
|
43
42
|
isLoading: !availableSites,
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
/** @jsx jsx */
|
|
3
2
|
import { Fragment, useEffect, useState } from 'react';
|
|
4
|
-
import { jsx } from '@emotion/react';
|
|
5
3
|
import styled from '@emotion/styled';
|
|
6
4
|
import { FormattedMessage, FormattedNumber, useIntl } from 'react-intl-next';
|
|
7
5
|
import Button from '@atlaskit/button';
|
|
@@ -56,11 +54,11 @@ export const TableFooter = ({
|
|
|
56
54
|
|
|
57
55
|
// If only one of the two is passed in, still show the other one (Note: We keep the div encapsulating the one not shown to
|
|
58
56
|
// ensure correct positioning since 'justify-content: space-between' is used).
|
|
59
|
-
return onRefresh || showItemCount ?
|
|
57
|
+
return onRefresh || showItemCount ? /*#__PURE__*/React.createElement(FooterWrapper, {
|
|
60
58
|
"data-testid": "table-footer"
|
|
61
|
-
},
|
|
59
|
+
}, /*#__PURE__*/React.createElement(TopBorderWrapper, null, /*#__PURE__*/React.createElement(ItemCounterWrapper, {
|
|
62
60
|
"data-testid": "item-count-wrapper"
|
|
63
|
-
}, showItemCount &&
|
|
61
|
+
}, showItemCount && /*#__PURE__*/React.createElement(LinkUrl, {
|
|
64
62
|
href: url,
|
|
65
63
|
target: "_blank",
|
|
66
64
|
testId: "item-count-url",
|
|
@@ -68,23 +66,23 @@ export const TableFooter = ({
|
|
|
68
66
|
color: `var(--ds-text-accent-gray, ${N800})`,
|
|
69
67
|
textDecoration: !url ? 'none' : ''
|
|
70
68
|
}
|
|
71
|
-
},
|
|
69
|
+
}, /*#__PURE__*/React.createElement(Heading, {
|
|
72
70
|
testId: "item-count",
|
|
73
71
|
level: "h200"
|
|
74
|
-
},
|
|
72
|
+
}, /*#__PURE__*/React.createElement(FormattedNumber, {
|
|
75
73
|
value: itemCount
|
|
76
|
-
}), ' ',
|
|
74
|
+
}), ' ', /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, footerMessages.itemText, {
|
|
77
75
|
values: {
|
|
78
76
|
itemCount
|
|
79
77
|
}
|
|
80
|
-
}))))),
|
|
78
|
+
}))))), /*#__PURE__*/React.createElement(SyncWrapper, null, onRefresh && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(SyncTextWrapper, {
|
|
81
79
|
"data-testid": "sync-text"
|
|
82
|
-
}, isLoading ?
|
|
80
|
+
}, isLoading ? /*#__PURE__*/React.createElement(FormattedMessage, footerMessages.loadingText) : /*#__PURE__*/React.createElement(SyncInfo, {
|
|
83
81
|
lastSyncTime: lastSyncTime
|
|
84
|
-
})),
|
|
82
|
+
})), /*#__PURE__*/React.createElement(Button, {
|
|
85
83
|
onClick: onRefresh,
|
|
86
84
|
appearance: "subtle",
|
|
87
|
-
iconBefore:
|
|
85
|
+
iconBefore: /*#__PURE__*/React.createElement(RefreshIcon, {
|
|
88
86
|
label: intl.formatMessage(footerMessages.refreshLabel)
|
|
89
87
|
}),
|
|
90
88
|
isDisabled: isLoading,
|
|
@@ -5,9 +5,8 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
5
5
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
6
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
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; }
|
|
8
|
-
/** @jsx jsx */
|
|
9
8
|
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
10
|
-
import { css
|
|
9
|
+
import { css } from '@emotion/react';
|
|
11
10
|
import { FormattedMessage } from 'react-intl-next';
|
|
12
11
|
import { v4 as uuidv4 } from 'uuid';
|
|
13
12
|
import { withAnalyticsContext } from '@atlaskit/analytics-next';
|
|
@@ -36,7 +35,7 @@ var modalBodyErrorWrapperStyles = css({
|
|
|
36
35
|
display: 'grid',
|
|
37
36
|
height: MODAL_HEIGHT
|
|
38
37
|
});
|
|
39
|
-
var AssetsModalTitle =
|
|
38
|
+
var AssetsModalTitle = /*#__PURE__*/React.createElement(ModalTitle, null, /*#__PURE__*/React.createElement(FormattedMessage, modalMessages.insertObjectsTitle));
|
|
40
39
|
var PlainAssetsConfigModal = function PlainAssetsConfigModal(props) {
|
|
41
40
|
var datasourceId = props.datasourceId,
|
|
42
41
|
initialParameters = props.parameters,
|
|
@@ -311,11 +310,11 @@ var PlainAssetsConfigModal = function PlainAssetsConfigModal(props) {
|
|
|
311
310
|
if (errorState) {
|
|
312
311
|
switch (errorState) {
|
|
313
312
|
case 'permission':
|
|
314
|
-
return
|
|
313
|
+
return /*#__PURE__*/React.createElement(AccessRequired, null);
|
|
315
314
|
case 'network':
|
|
316
|
-
return
|
|
315
|
+
return /*#__PURE__*/React.createElement(ModalLoadingError, null);
|
|
317
316
|
default:
|
|
318
|
-
return
|
|
317
|
+
return /*#__PURE__*/React.createElement(ModalLoadingError, null);
|
|
319
318
|
}
|
|
320
319
|
}
|
|
321
320
|
}, [errorState]);
|
|
@@ -324,11 +323,11 @@ var PlainAssetsConfigModal = function PlainAssetsConfigModal(props) {
|
|
|
324
323
|
return undefined;
|
|
325
324
|
} else {
|
|
326
325
|
if (!workspaceId || assetsClientLoading) {
|
|
327
|
-
return
|
|
326
|
+
return /*#__PURE__*/React.createElement(AssetsSearchContainerLoading, {
|
|
328
327
|
modalTitle: AssetsModalTitle
|
|
329
328
|
});
|
|
330
329
|
}
|
|
331
|
-
return
|
|
330
|
+
return /*#__PURE__*/React.createElement(AssetsSearchContainer, {
|
|
332
331
|
workspaceId: workspaceId,
|
|
333
332
|
initialSearchData: {
|
|
334
333
|
aql: aql,
|
|
@@ -341,18 +340,18 @@ var PlainAssetsConfigModal = function PlainAssetsConfigModal(props) {
|
|
|
341
340
|
});
|
|
342
341
|
}
|
|
343
342
|
}, [errorState, workspaceId, assetsClientLoading, aql, existingObjectSchema, objectSchemas, handleOnSearch, status]);
|
|
344
|
-
return
|
|
343
|
+
return /*#__PURE__*/React.createElement(IntlMessagesProvider, {
|
|
345
344
|
defaultMessages: i18nEN,
|
|
346
345
|
loaderFn: fetchMessagesForLocale
|
|
347
|
-
},
|
|
346
|
+
}, /*#__PURE__*/React.createElement(ModalTransition, null, /*#__PURE__*/React.createElement(Modal, {
|
|
348
347
|
testId: 'asset-datasource-modal',
|
|
349
348
|
onClose: onCancel,
|
|
350
349
|
width: "calc(100% - 80px)",
|
|
351
350
|
shouldScrollInViewport: true,
|
|
352
351
|
shouldCloseOnOverlayClick: false
|
|
353
|
-
},
|
|
352
|
+
}, /*#__PURE__*/React.createElement(ModalHeader, null, renderModalTitleContent()), /*#__PURE__*/React.createElement(ModalBody, null, errorState ? /*#__PURE__*/React.createElement("div", {
|
|
354
353
|
css: modalBodyErrorWrapperStyles
|
|
355
|
-
}, renderErrorState()) :
|
|
354
|
+
}, renderErrorState()) : /*#__PURE__*/React.createElement(RenderAssetsContent, {
|
|
356
355
|
isFetchingInitialData: assetsClientLoading,
|
|
357
356
|
status: status,
|
|
358
357
|
responseItems: responseItems,
|
|
@@ -367,16 +366,16 @@ var PlainAssetsConfigModal = function PlainAssetsConfigModal(props) {
|
|
|
367
366
|
columns: columns,
|
|
368
367
|
defaultVisibleColumnKeys: defaultVisibleColumnKeys,
|
|
369
368
|
modalRenderInstanceId: modalRenderInstanceId
|
|
370
|
-
})),
|
|
369
|
+
})), /*#__PURE__*/React.createElement(ModalFooter, null, /*#__PURE__*/React.createElement(Button, {
|
|
371
370
|
appearance: "default",
|
|
372
371
|
onClick: onCancelClick,
|
|
373
372
|
testId: 'asset-datasource-modal--cancel-button'
|
|
374
|
-
},
|
|
373
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, modalMessages.cancelButtonText)), /*#__PURE__*/React.createElement(Button, {
|
|
375
374
|
appearance: "primary",
|
|
376
375
|
onClick: onInsertPressed,
|
|
377
376
|
isDisabled: isDisabled,
|
|
378
377
|
testId: 'assets-datasource-modal--insert-button'
|
|
379
|
-
},
|
|
378
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, modalMessages.insertIssuesButtonText, {
|
|
380
379
|
values: {
|
|
381
380
|
objectsCount: responseItems.length
|
|
382
381
|
}
|