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