@atlaskit/link-datasource 1.24.7 → 1.24.9
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 +14 -0
- package/dist/cjs/ui/assets-modal/modal/render-assets-content/initial-state-view/index.js +2 -1
- package/dist/cjs/ui/common/error-state/access-required.js +2 -1
- package/dist/cjs/ui/common/error-state/loading-error.js +2 -1
- package/dist/cjs/ui/common/error-state/messages.js +0 -11
- package/dist/cjs/ui/common/error-state/modal-loading-error.js +5 -13
- package/dist/cjs/ui/common/error-state/no-instances.js +2 -1
- package/dist/cjs/ui/common/error-state/no-results.js +2 -1
- package/dist/cjs/ui/common/initial-state-view/index.js +2 -1
- package/dist/cjs/ui/confluence-search-modal/confluence-search-container/index.js +48 -0
- package/dist/cjs/ui/confluence-search-modal/confluence-search-container/messages.js +14 -0
- package/dist/cjs/ui/confluence-search-modal/modal/index.js +223 -30
- package/dist/cjs/ui/confluence-search-modal/modal/messages.js +4 -4
- package/dist/cjs/ui/confluence-search-modal/types.js +5 -0
- package/dist/cjs/ui/issue-like-table/column-picker/concatenated-menu-list.js +2 -1
- package/dist/cjs/ui/issue-like-table/drag-column-preview.js +2 -1
- package/dist/cjs/ui/issue-like-table/index.js +2 -1
- package/dist/cjs/ui/issue-like-table/styled.js +2 -1
- package/dist/cjs/ui/jira-issues-modal/modal/index.js +9 -1
- package/dist/cjs/ui/jira-issues-modal/modal/messages.js +5 -0
- package/dist/cjs/ui/jira-issues-modal/mode-switcher/index.js +1 -0
- package/dist/es2019/ui/assets-modal/modal/render-assets-content/initial-state-view/index.js +2 -1
- package/dist/es2019/ui/common/error-state/access-required.js +2 -1
- package/dist/es2019/ui/common/error-state/loading-error.js +2 -1
- package/dist/es2019/ui/common/error-state/messages.js +0 -11
- package/dist/es2019/ui/common/error-state/modal-loading-error.js +4 -10
- package/dist/es2019/ui/common/error-state/no-instances.js +2 -1
- package/dist/es2019/ui/common/error-state/no-results.js +2 -1
- package/dist/es2019/ui/common/initial-state-view/index.js +2 -1
- package/dist/es2019/ui/confluence-search-modal/confluence-search-container/index.js +35 -0
- package/dist/es2019/ui/confluence-search-modal/confluence-search-container/messages.js +8 -0
- package/dist/es2019/ui/confluence-search-modal/modal/index.js +210 -27
- package/dist/es2019/ui/confluence-search-modal/modal/messages.js +4 -4
- package/dist/es2019/ui/confluence-search-modal/types.js +1 -0
- package/dist/es2019/ui/issue-like-table/column-picker/concatenated-menu-list.js +2 -1
- package/dist/es2019/ui/issue-like-table/drag-column-preview.js +2 -1
- package/dist/es2019/ui/issue-like-table/index.js +2 -1
- package/dist/es2019/ui/issue-like-table/styled.js +2 -1
- package/dist/es2019/ui/jira-issues-modal/modal/index.js +7 -1
- package/dist/es2019/ui/jira-issues-modal/modal/messages.js +5 -0
- package/dist/es2019/ui/jira-issues-modal/mode-switcher/index.js +1 -0
- package/dist/esm/ui/assets-modal/modal/render-assets-content/initial-state-view/index.js +2 -1
- package/dist/esm/ui/common/error-state/access-required.js +2 -1
- package/dist/esm/ui/common/error-state/loading-error.js +2 -1
- package/dist/esm/ui/common/error-state/messages.js +0 -11
- package/dist/esm/ui/common/error-state/modal-loading-error.js +5 -12
- package/dist/esm/ui/common/error-state/no-instances.js +2 -1
- package/dist/esm/ui/common/error-state/no-results.js +2 -1
- package/dist/esm/ui/common/initial-state-view/index.js +2 -1
- package/dist/esm/ui/confluence-search-modal/confluence-search-container/index.js +38 -0
- package/dist/esm/ui/confluence-search-modal/confluence-search-container/messages.js +8 -0
- package/dist/esm/ui/confluence-search-modal/modal/index.js +225 -30
- package/dist/esm/ui/confluence-search-modal/modal/messages.js +4 -4
- package/dist/esm/ui/confluence-search-modal/types.js +1 -0
- package/dist/esm/ui/issue-like-table/column-picker/concatenated-menu-list.js +2 -1
- package/dist/esm/ui/issue-like-table/drag-column-preview.js +2 -1
- package/dist/esm/ui/issue-like-table/index.js +2 -1
- package/dist/esm/ui/issue-like-table/styled.js +2 -1
- package/dist/esm/ui/jira-issues-modal/modal/index.js +9 -1
- package/dist/esm/ui/jira-issues-modal/modal/messages.js +5 -0
- package/dist/esm/ui/jira-issues-modal/mode-switcher/index.js +1 -0
- package/dist/types/common/types.d.ts +3 -6
- package/dist/types/ui/common/error-state/messages.d.ts +0 -10
- package/dist/types/ui/common/error-state/modal-loading-error.d.ts +3 -2
- package/dist/types/ui/confluence-search-modal/confluence-search-container/index.d.ts +9 -0
- package/dist/types/ui/confluence-search-modal/confluence-search-container/messages.d.ts +7 -0
- package/dist/types/ui/confluence-search-modal/index.d.ts +2 -2
- package/dist/types/ui/confluence-search-modal/modal/index.d.ts +2 -2
- package/dist/types/ui/confluence-search-modal/modal/messages.d.ts +1 -1
- package/dist/types/ui/confluence-search-modal/types.d.ts +22 -0
- package/dist/types/ui/jira-issues-modal/index.d.ts +2 -2
- package/dist/types/ui/jira-issues-modal/modal/index.d.ts +3 -13
- package/dist/types/ui/jira-issues-modal/modal/messages.d.ts +5 -0
- package/dist/types/ui/jira-issues-modal/types.d.ts +5 -1
- package/dist/types-ts4.5/common/types.d.ts +3 -6
- package/dist/types-ts4.5/ui/common/error-state/messages.d.ts +0 -10
- package/dist/types-ts4.5/ui/common/error-state/modal-loading-error.d.ts +3 -2
- package/dist/types-ts4.5/ui/confluence-search-modal/confluence-search-container/index.d.ts +9 -0
- package/dist/types-ts4.5/ui/confluence-search-modal/confluence-search-container/messages.d.ts +7 -0
- package/dist/types-ts4.5/ui/confluence-search-modal/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/confluence-search-modal/modal/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/confluence-search-modal/modal/messages.d.ts +1 -1
- package/dist/types-ts4.5/ui/confluence-search-modal/types.d.ts +22 -0
- package/dist/types-ts4.5/ui/jira-issues-modal/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/jira-issues-modal/modal/index.d.ts +3 -13
- package/dist/types-ts4.5/ui/jira-issues-modal/modal/messages.d.ts +5 -0
- package/dist/types-ts4.5/ui/jira-issues-modal/types.d.ts +5 -1
- package/examples-helpers/buildConfluenceSearchTable.tsx +77 -0
- package/package.json +4 -4
|
@@ -459,7 +459,13 @@ export const PlainJiraIssuesConfigModal = props => {
|
|
|
459
459
|
const selectedJiraSiteUrl = selectedJiraSite === null || selectedJiraSite === void 0 ? void 0 : selectedJiraSite.url;
|
|
460
460
|
if (status === 'rejected' && jqlUrl) {
|
|
461
461
|
return jsx(ModalLoadingError, {
|
|
462
|
-
|
|
462
|
+
errorMessage: jqlUrl ? jsx(FormattedMessage, _extends({}, modalMessages.checkConnectionWithSource, {
|
|
463
|
+
values: {
|
|
464
|
+
a: urlText => jsx("a", {
|
|
465
|
+
href: jqlUrl
|
|
466
|
+
}, urlText)
|
|
467
|
+
}
|
|
468
|
+
})) : undefined
|
|
463
469
|
});
|
|
464
470
|
} else if (status === 'unauthorized') {
|
|
465
471
|
return jsx(AccessRequired, {
|
|
@@ -115,5 +115,10 @@ export const modalMessages = defineMessages({
|
|
|
115
115
|
id: 'linkDataSource.jira-issues.no.jira.sites.access.description',
|
|
116
116
|
description: 'Description that shows in the modal when user has no access to any Jira sites',
|
|
117
117
|
defaultMessage: 'To request access, contact your admin.'
|
|
118
|
+
},
|
|
119
|
+
checkConnectionWithSource: {
|
|
120
|
+
id: 'linkDataSource.jira-issues.checkConnectionWithSource',
|
|
121
|
+
description: 'Instructions to let the user know how to resolve the error that occured, or click the link provided to open the query in Jira',
|
|
122
|
+
defaultMessage: 'Check your connection and refresh, or <a>open this query in Jira</a> to review.'
|
|
118
123
|
}
|
|
119
124
|
});
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { css, jsx } from '@emotion/react';
|
|
4
4
|
import { useIntl } from 'react-intl-next';
|
|
5
|
+
import { fontFallback } from '@atlaskit/theme/typography';
|
|
5
6
|
import { CrystalBallSVG } from './assets/crystal-ball-svg';
|
|
6
7
|
import { initialStateViewMessages } from './messages';
|
|
7
8
|
var initialStateViewContainerStyles = css({
|
|
@@ -14,7 +15,7 @@ var svgAndTextsWrapperStyles = css({
|
|
|
14
15
|
alignSelf: 'center'
|
|
15
16
|
});
|
|
16
17
|
var searchTitleStyles = css({
|
|
17
|
-
font: "var(--ds-font-heading-small,
|
|
18
|
+
font: "var(--ds-font-heading-small, ".concat(fontFallback.heading.small, ")"),
|
|
18
19
|
paddingTop: "var(--ds-space-200, 16px)",
|
|
19
20
|
paddingBottom: "var(--ds-space-100, 8px)"
|
|
20
21
|
});
|
|
@@ -5,12 +5,13 @@ import { useIntl } from 'react-intl-next';
|
|
|
5
5
|
import EmptyState from '@atlaskit/empty-state';
|
|
6
6
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
7
7
|
import { N400 } from '@atlaskit/theme/colors';
|
|
8
|
+
import { fontFallback } from '@atlaskit/theme/typography';
|
|
8
9
|
import { useDatasourceAnalyticsEvents } from '../../../analytics';
|
|
9
10
|
import { AccessRequiredSVG } from './access-required-svg';
|
|
10
11
|
import { loadingErrorMessages } from './messages';
|
|
11
12
|
var urlStyles = css({
|
|
12
13
|
color: "var(--ds-text-subtlest, ".concat(N400, ")"),
|
|
13
|
-
font: "var(--ds-font-body,
|
|
14
|
+
font: "var(--ds-font-body, ".concat(fontFallback.body.medium, ")")
|
|
14
15
|
});
|
|
15
16
|
var descriptionMessageStyles = css({
|
|
16
17
|
display: 'flex',
|
|
@@ -3,6 +3,7 @@ import { useEffect } from 'react';
|
|
|
3
3
|
import { css, jsx } from '@emotion/react';
|
|
4
4
|
import { FormattedMessage } from 'react-intl-next';
|
|
5
5
|
import Button from '@atlaskit/button/standard-button';
|
|
6
|
+
import { fontFallback } from '@atlaskit/theme/typography';
|
|
6
7
|
import { useDatasourceAnalyticsEvents } from '../../../analytics';
|
|
7
8
|
import { LoadingErrorSVG } from './loading-error-svg';
|
|
8
9
|
import { loadingErrorMessages } from './messages';
|
|
@@ -18,7 +19,7 @@ var errorMessageContainerStyles = css({
|
|
|
18
19
|
placeItems: 'center'
|
|
19
20
|
});
|
|
20
21
|
var errorMessageStyles = css({
|
|
21
|
-
font: "var(--ds-font-heading-small,
|
|
22
|
+
font: "var(--ds-font-heading-small, ".concat(fontFallback.heading.small, ")")
|
|
22
23
|
});
|
|
23
24
|
var errorDescriptionStyles = css({
|
|
24
25
|
margin: 0
|
|
@@ -44,17 +44,6 @@ export var loadingErrorMessages = defineMessages({
|
|
|
44
44
|
description: 'Instructions to let the user know how to resolve the network error that occurred or to try again at a different time',
|
|
45
45
|
defaultMessage: 'Check your connection and refresh, or try again later.'
|
|
46
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
|
|
53
|
-
checkConnectionWithSource: {
|
|
54
|
-
id: 'linkDataSource.jira-issues.checkConnectionWithSource',
|
|
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',
|
|
56
|
-
defaultMessage: 'Check your connection and refresh, or <a>open this query in Jira</a> to review.'
|
|
57
|
-
},
|
|
58
47
|
noResultsFoundDuplicate: {
|
|
59
48
|
id: 'linkDataSource.noResultsFound',
|
|
60
49
|
description: 'Status message letting the user know their query did not have any results',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
/** @jsx jsx */
|
|
3
2
|
import { useEffect } from 'react';
|
|
4
3
|
import { css, jsx } from '@emotion/react';
|
|
5
4
|
import { FormattedMessage } from 'react-intl-next';
|
|
5
|
+
import { fontFallback } from '@atlaskit/theme/typography';
|
|
6
6
|
import { useDatasourceAnalyticsEvents } from '../../../analytics';
|
|
7
7
|
import { LoadingErrorSVG } from './loading-error-svg';
|
|
8
8
|
import { loadingErrorMessages } from './messages';
|
|
@@ -18,13 +18,14 @@ var errorMessageContainerStyles = css({
|
|
|
18
18
|
placeItems: 'center'
|
|
19
19
|
});
|
|
20
20
|
var errorMessageStyles = css({
|
|
21
|
-
font: "var(--ds-font-heading-small,
|
|
21
|
+
font: "var(--ds-font-heading-small, ".concat(fontFallback.heading.small, ")")
|
|
22
22
|
});
|
|
23
23
|
var errorDescriptionStyles = css({
|
|
24
24
|
margin: 0
|
|
25
25
|
});
|
|
26
26
|
export var ModalLoadingError = function ModalLoadingError(_ref) {
|
|
27
|
-
var
|
|
27
|
+
var _ref$errorMessage = _ref.errorMessage,
|
|
28
|
+
errorMessage = _ref$errorMessage === void 0 ? jsx(FormattedMessage, loadingErrorMessages.checkConnection) : _ref$errorMessage;
|
|
28
29
|
var _useDatasourceAnalyti = useDatasourceAnalyticsEvents(),
|
|
29
30
|
fireEvent = _useDatasourceAnalyti.fireEvent;
|
|
30
31
|
useEffect(function () {
|
|
@@ -41,13 +42,5 @@ export var ModalLoadingError = function ModalLoadingError(_ref) {
|
|
|
41
42
|
css: errorMessageStyles
|
|
42
43
|
}, jsx(FormattedMessage, loadingErrorMessages.unableToLoadResults)), jsx("p", {
|
|
43
44
|
css: errorDescriptionStyles
|
|
44
|
-
},
|
|
45
|
-
values: {
|
|
46
|
-
a: function a(chunk) {
|
|
47
|
-
return jsx("a", {
|
|
48
|
-
href: url
|
|
49
|
-
}, chunk);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
})) : jsx(FormattedMessage, loadingErrorMessages.checkConnection))));
|
|
45
|
+
}, errorMessage)));
|
|
53
46
|
};
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
import { css, jsx } from '@emotion/react';
|
|
3
3
|
import { useIntl } from 'react-intl-next';
|
|
4
4
|
import { Flex, xcss } from '@atlaskit/primitives';
|
|
5
|
+
import { fontFallback } from '@atlaskit/theme/typography';
|
|
5
6
|
import { NoInstancesSvg } from './no-instances-svg';
|
|
6
7
|
var titleStyles = css({
|
|
7
|
-
font: "var(--ds-font-heading-small,
|
|
8
|
+
font: "var(--ds-font-heading-small, ".concat(fontFallback.heading.small, ")"),
|
|
8
9
|
marginTop: "var(--ds-space-200, 16px)"
|
|
9
10
|
});
|
|
10
11
|
var descriptionStyles = css({
|
|
@@ -3,6 +3,7 @@ import { useEffect } from 'react';
|
|
|
3
3
|
import { css, jsx } from '@emotion/react';
|
|
4
4
|
import { FormattedMessage } from 'react-intl-next';
|
|
5
5
|
import Button from '@atlaskit/button/standard-button';
|
|
6
|
+
import { fontFallback } from '@atlaskit/theme/typography';
|
|
6
7
|
import { useDatasourceAnalyticsEvents } from '../../../analytics';
|
|
7
8
|
import { loadingErrorMessages } from './messages';
|
|
8
9
|
var noResultsContainerStyles = css({
|
|
@@ -17,7 +18,7 @@ var noResultsMessageContainerStyles = css({
|
|
|
17
18
|
placeItems: 'center'
|
|
18
19
|
});
|
|
19
20
|
var noResultsMessageStyles = css({
|
|
20
|
-
font: "var(--ds-font-heading-small,
|
|
21
|
+
font: "var(--ds-font-heading-small, ".concat(fontFallback.heading.small, ")")
|
|
21
22
|
});
|
|
22
23
|
export var NoResults = function NoResults(_ref) {
|
|
23
24
|
var onRefresh = _ref.onRefresh;
|
|
@@ -3,6 +3,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
3
3
|
import { FormattedMessage, useIntl } from 'react-intl-next';
|
|
4
4
|
import Lozenge from '@atlaskit/lozenge';
|
|
5
5
|
import { N300 } from '@atlaskit/theme/colors';
|
|
6
|
+
import { fontFallback } from '@atlaskit/theme/typography';
|
|
6
7
|
import { initialStateViewMessages } from './messages';
|
|
7
8
|
var initialStateViewContainerStyles = css({
|
|
8
9
|
display: 'flex',
|
|
@@ -20,7 +21,7 @@ var betaTagStyles = css({
|
|
|
20
21
|
});
|
|
21
22
|
var searchTitleStyles = css({
|
|
22
23
|
color: "var(--ds-text-subtlest, ".concat(N300, ")"),
|
|
23
|
-
font: "var(--ds-font-heading-medium,
|
|
24
|
+
font: "var(--ds-font-heading-medium, ".concat(fontFallback.heading.medium, ")"),
|
|
24
25
|
paddingTop: "var(--ds-space-200, 16px)",
|
|
25
26
|
paddingBottom: "var(--ds-space-100, 8px)",
|
|
26
27
|
display: 'flex',
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
+
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
3
|
+
import { BasicSearchInput } from '../../common/modal/basic-search-input';
|
|
4
|
+
import { searchMessages } from './messages';
|
|
5
|
+
var ConfluenceSearchContainer = function ConfluenceSearchContainer(_ref) {
|
|
6
|
+
var cloudId = _ref.cloudId,
|
|
7
|
+
initialSearchValue = _ref.initialSearchValue,
|
|
8
|
+
isSearching = _ref.isSearching,
|
|
9
|
+
onSearch = _ref.onSearch;
|
|
10
|
+
var currentCloudId = useRef(cloudId);
|
|
11
|
+
var _useState = useState(initialSearchValue !== null && initialSearchValue !== void 0 ? initialSearchValue : ''),
|
|
12
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
13
|
+
searchBarSearchString = _useState2[0],
|
|
14
|
+
setSearchBarSearchString = _useState2[1];
|
|
15
|
+
var handleSearchChange = useCallback(function (e) {
|
|
16
|
+
var rawSearch = e.currentTarget.value;
|
|
17
|
+
setSearchBarSearchString(rawSearch);
|
|
18
|
+
}, []);
|
|
19
|
+
|
|
20
|
+
// TODO: further refactoring in EDM-9573
|
|
21
|
+
// https://stash.atlassian.com/projects/ATLASSIAN/repos/atlassian-frontend-monorepo/pull-requests/82725/overview?commentId=6827913
|
|
22
|
+
useEffect(function () {
|
|
23
|
+
if (currentCloudId.current !== cloudId) {
|
|
24
|
+
setSearchBarSearchString('');
|
|
25
|
+
currentCloudId.current = cloudId;
|
|
26
|
+
}
|
|
27
|
+
}, [cloudId]);
|
|
28
|
+
return /*#__PURE__*/React.createElement(BasicSearchInput, {
|
|
29
|
+
testId: "confluence-search-datasource-modal",
|
|
30
|
+
isSearching: isSearching,
|
|
31
|
+
onChange: handleSearchChange,
|
|
32
|
+
onSearch: onSearch,
|
|
33
|
+
searchTerm: searchBarSearchString,
|
|
34
|
+
placeholder: searchMessages.searchLabel,
|
|
35
|
+
fullWidth: true
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
export default ConfluenceSearchContainer;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { defineMessages } from 'react-intl-next';
|
|
2
|
+
export var searchMessages = defineMessages({
|
|
3
|
+
searchLabel: {
|
|
4
|
+
id: 'linkDataSource.confluence-search.configmodal.searchLabel',
|
|
5
|
+
description: 'Placeholder text for the search input box',
|
|
6
|
+
defaultMessage: 'Enter keywords to find pages, attachments, and more'
|
|
7
|
+
}
|
|
8
|
+
});
|
|
@@ -1,27 +1,59 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
3
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
4
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
5
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
6
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
7
|
+
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; }
|
|
8
|
+
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; }
|
|
5
9
|
/** @jsx jsx */
|
|
6
|
-
import { Fragment, useCallback, useEffect, useMemo, useState } from 'react';
|
|
10
|
+
import { Fragment, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
7
11
|
import { jsx } from '@emotion/react';
|
|
8
|
-
import { FormattedMessage } from 'react-intl-next';
|
|
12
|
+
import { FormattedMessage, FormattedNumber } from 'react-intl-next';
|
|
13
|
+
import { v4 as uuidv4 } from 'uuid';
|
|
9
14
|
import Button from '@atlaskit/button/standard-button';
|
|
10
15
|
import { IntlMessagesProvider } from '@atlaskit/intl-messages-provider';
|
|
11
16
|
import Modal, { ModalBody, ModalFooter, ModalHeader, ModalTitle } from '@atlaskit/modal-dialog';
|
|
17
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
18
|
+
import { Box, xcss } from '@atlaskit/primitives';
|
|
19
|
+
import LinkUrl from '@atlaskit/smart-card/link-url';
|
|
20
|
+
import { N800 } from '@atlaskit/theme/colors';
|
|
21
|
+
import { buildDatasourceAdf } from '../../../common/utils/adf';
|
|
12
22
|
import { fetchMessagesForLocale } from '../../../common/utils/locale/fetch-messages-for-locale';
|
|
23
|
+
import { useDatasourceTableState } from '../../../hooks/useDatasourceTableState';
|
|
13
24
|
import i18nEN from '../../../i18n/en';
|
|
14
25
|
import { getAvailableSites } from '../../../services/getAvailableSites';
|
|
26
|
+
import { AccessRequired } from '../../common/error-state/access-required';
|
|
27
|
+
import { ModalLoadingError } from '../../common/error-state/modal-loading-error';
|
|
15
28
|
import { NoInstancesView } from '../../common/error-state/no-instances';
|
|
29
|
+
import { NoResults } from '../../common/error-state/no-results';
|
|
16
30
|
import { InitialStateView } from '../../common/initial-state-view';
|
|
17
|
-
import { BasicSearchInput } from '../../common/modal/basic-search-input';
|
|
18
31
|
import { ContentContainer } from '../../common/modal/content-container';
|
|
19
32
|
import { SiteSelector } from '../../common/modal/site-selector';
|
|
33
|
+
import { EmptyState, IssueLikeDataTableView } from '../../issue-like-table';
|
|
34
|
+
import ConfluenceSearchContainer from '../confluence-search-container';
|
|
20
35
|
import { ConfluenceSearchInitialStateSVG } from './confluence-search-initial-state-svg';
|
|
21
36
|
import { confluenceSearchModalMessages } from './messages';
|
|
37
|
+
var inputContainerStyles = xcss({
|
|
38
|
+
alignItems: 'baseline',
|
|
39
|
+
display: 'flex',
|
|
40
|
+
minHeight: '72px'
|
|
41
|
+
});
|
|
42
|
+
var searchCountStyles = xcss({
|
|
43
|
+
flex: 1,
|
|
44
|
+
fontWeight: 600
|
|
45
|
+
});
|
|
22
46
|
export var ConfluenceSearchConfigModal = function ConfluenceSearchConfigModal(props) {
|
|
23
|
-
var
|
|
24
|
-
|
|
47
|
+
var _useRef = useRef(uuidv4()),
|
|
48
|
+
modalRenderInstanceId = _useRef.current;
|
|
49
|
+
var datasourceId = props.datasourceId,
|
|
50
|
+
initialColumnCustomSizes = props.columnCustomSizes,
|
|
51
|
+
initialWrappedColumnKeys = props.wrappedColumnKeys,
|
|
52
|
+
onCancel = props.onCancel,
|
|
53
|
+
onInsert = props.onInsert,
|
|
54
|
+
initialParameters = props.parameters,
|
|
55
|
+
urlBeingEdited = props.url,
|
|
56
|
+
initialVisibleColumnKeys = props.visibleColumnKeys;
|
|
25
57
|
var _useState = useState(undefined),
|
|
26
58
|
_useState2 = _slicedToArray(_useState, 2),
|
|
27
59
|
availableSites = _useState2[0],
|
|
@@ -30,13 +62,44 @@ export var ConfluenceSearchConfigModal = function ConfluenceSearchConfigModal(pr
|
|
|
30
62
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
31
63
|
cloudId = _useState4[0],
|
|
32
64
|
setCloudId = _useState4[1];
|
|
33
|
-
var _useState5 = useState(
|
|
65
|
+
var _useState5 = useState(initialParameters === null || initialParameters === void 0 ? void 0 : initialParameters.searchString),
|
|
34
66
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
var
|
|
38
|
-
|
|
39
|
-
|
|
67
|
+
searchString = _useState6[0],
|
|
68
|
+
setSearchString = _useState6[1];
|
|
69
|
+
var _useState7 = useState(initialVisibleColumnKeys),
|
|
70
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
71
|
+
visibleColumnKeys = _useState8[0],
|
|
72
|
+
setVisibleColumnKeys = _useState8[1];
|
|
73
|
+
|
|
74
|
+
// TODO: further refactoring in EDM-9573
|
|
75
|
+
// https://stash.atlassian.com/projects/ATLASSIAN/repos/atlassian-frontend-monorepo/pull-requests/82725/overview?commentId=6829210
|
|
76
|
+
var parameters = useMemo(function () {
|
|
77
|
+
return _objectSpread(_objectSpread({}, initialParameters), {}, {
|
|
78
|
+
cloudId: cloudId,
|
|
79
|
+
searchString: searchString
|
|
80
|
+
});
|
|
81
|
+
}, [cloudId, initialParameters, searchString /** Add more parameters when more filters are added */]);
|
|
82
|
+
var isParametersSet = useMemo(function () {
|
|
83
|
+
return !!cloudId && Object.values(parameters !== null && parameters !== void 0 ? parameters : {}).filter(function (v) {
|
|
84
|
+
return v !== undefined;
|
|
85
|
+
}).length > 1;
|
|
86
|
+
}, [cloudId, parameters]);
|
|
87
|
+
var _useDatasourceTableSt = useDatasourceTableState({
|
|
88
|
+
datasourceId: datasourceId,
|
|
89
|
+
parameters: isParametersSet ? parameters : undefined,
|
|
90
|
+
fieldKeys: visibleColumnKeys
|
|
91
|
+
}),
|
|
92
|
+
reset = _useDatasourceTableSt.reset,
|
|
93
|
+
status = _useDatasourceTableSt.status,
|
|
94
|
+
onNextPage = _useDatasourceTableSt.onNextPage,
|
|
95
|
+
responseItems = _useDatasourceTableSt.responseItems,
|
|
96
|
+
hasNextPage = _useDatasourceTableSt.hasNextPage,
|
|
97
|
+
columns = _useDatasourceTableSt.columns,
|
|
98
|
+
defaultVisibleColumnKeys = _useDatasourceTableSt.defaultVisibleColumnKeys,
|
|
99
|
+
loadDatasourceDetails = _useDatasourceTableSt.loadDatasourceDetails,
|
|
100
|
+
_useDatasourceTableSt2 = _useDatasourceTableSt.extensionKey,
|
|
101
|
+
extensionKey = _useDatasourceTableSt2 === void 0 ? null : _useDatasourceTableSt2,
|
|
102
|
+
totalCount = _useDatasourceTableSt.totalCount;
|
|
40
103
|
var hasNoConfluenceSites = availableSites && availableSites.length === 0;
|
|
41
104
|
var selectedConfluenceSite = useMemo(function () {
|
|
42
105
|
if (cloudId) {
|
|
@@ -53,10 +116,24 @@ export var ConfluenceSearchConfigModal = function ConfluenceSearchConfigModal(pr
|
|
|
53
116
|
})) || (availableSites === null || availableSites === void 0 ? void 0 : availableSites[0]);
|
|
54
117
|
}
|
|
55
118
|
}, [availableSites, cloudId]);
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
119
|
+
|
|
120
|
+
// TODO: further refactoring in EDM-9573
|
|
121
|
+
// https://stash.atlassian.com/projects/ATLASSIAN/repos/atlassian-frontend-monorepo/pull-requests/82725/overview?commentId=6828283
|
|
122
|
+
useEffect(function () {
|
|
123
|
+
if (selectedConfluenceSite && (!cloudId || cloudId !== selectedConfluenceSite.cloudId)) {
|
|
124
|
+
setCloudId(selectedConfluenceSite.cloudId);
|
|
125
|
+
}
|
|
126
|
+
}, [cloudId, selectedConfluenceSite]);
|
|
127
|
+
|
|
128
|
+
// TODO: further refactoring in EDM-9573
|
|
129
|
+
// https://stash.atlassian.com/projects/ATLASSIAN/repos/atlassian-frontend-monorepo/pull-requests/82725/overview?commentId=6829171
|
|
130
|
+
var onSiteSelection = useCallback(function (site) {
|
|
131
|
+
setSearchString(undefined);
|
|
132
|
+
setCloudId(site.cloudId);
|
|
133
|
+
reset({
|
|
134
|
+
shouldForceRequest: true
|
|
135
|
+
});
|
|
136
|
+
}, [reset]);
|
|
60
137
|
useEffect(function () {
|
|
61
138
|
var fetchSiteDisplayNames = /*#__PURE__*/function () {
|
|
62
139
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
@@ -85,6 +162,113 @@ export var ConfluenceSearchConfigModal = function ConfluenceSearchConfigModal(pr
|
|
|
85
162
|
void fetchSiteDisplayNames();
|
|
86
163
|
}, []);
|
|
87
164
|
var siteSelectorLabel = availableSites && availableSites.length > 1 ? confluenceSearchModalMessages.insertIssuesTitleManySites : confluenceSearchModalMessages.insertIssuesTitle;
|
|
165
|
+
var _useState9 = useState(initialColumnCustomSizes),
|
|
166
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
167
|
+
columnCustomSizes = _useState10[0],
|
|
168
|
+
setColumnCustomSizes = _useState10[1];
|
|
169
|
+
var onColumnResize = useCallback(function (key, width) {
|
|
170
|
+
setColumnCustomSizes(_objectSpread(_objectSpread({}, columnCustomSizes), {}, _defineProperty({}, key, width)));
|
|
171
|
+
}, [columnCustomSizes]);
|
|
172
|
+
var _useState11 = useState(initialWrappedColumnKeys),
|
|
173
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
174
|
+
wrappedColumnKeys = _useState12[0],
|
|
175
|
+
setWrappedColumnKeys = _useState12[1];
|
|
176
|
+
var onWrappedColumnChange = useCallback(function (key, isWrapped) {
|
|
177
|
+
var set = new Set(wrappedColumnKeys);
|
|
178
|
+
if (isWrapped) {
|
|
179
|
+
set.add(key);
|
|
180
|
+
} else {
|
|
181
|
+
set.delete(key);
|
|
182
|
+
}
|
|
183
|
+
setWrappedColumnKeys(Array.from(set));
|
|
184
|
+
}, [wrappedColumnKeys]);
|
|
185
|
+
|
|
186
|
+
// TODO: further refactoring in EDM-9573
|
|
187
|
+
// https://stash.atlassian.com/projects/ATLASSIAN/repos/atlassian-frontend-monorepo/pull-requests/82725/overview?commentId=6798258
|
|
188
|
+
var confluenceSearchTable = useMemo(function () {
|
|
189
|
+
return jsx(ContentContainer, {
|
|
190
|
+
withTableBorder: true
|
|
191
|
+
}, jsx(IssueLikeDataTableView, {
|
|
192
|
+
testId: "confluence-search-datasource-table",
|
|
193
|
+
status: status,
|
|
194
|
+
columns: columns,
|
|
195
|
+
items: responseItems,
|
|
196
|
+
hasNextPage: hasNextPage,
|
|
197
|
+
visibleColumnKeys: visibleColumnKeys || defaultVisibleColumnKeys,
|
|
198
|
+
onNextPage: onNextPage,
|
|
199
|
+
onLoadDatasourceDetails: loadDatasourceDetails,
|
|
200
|
+
onVisibleColumnKeysChange: setVisibleColumnKeys,
|
|
201
|
+
parentContainerRenderInstanceId: modalRenderInstanceId,
|
|
202
|
+
extensionKey: extensionKey,
|
|
203
|
+
columnCustomSizes: columnCustomSizes,
|
|
204
|
+
onColumnResize: onColumnResize,
|
|
205
|
+
wrappedColumnKeys: wrappedColumnKeys,
|
|
206
|
+
onWrappedColumnChange: getBooleanFF('platform.linking-platform.datasource-word_wrap') ? onWrappedColumnChange : undefined
|
|
207
|
+
}));
|
|
208
|
+
}, [status, columns, responseItems, hasNextPage, visibleColumnKeys, defaultVisibleColumnKeys, onNextPage, loadDatasourceDetails, setVisibleColumnKeys, modalRenderInstanceId, extensionKey, columnCustomSizes, onColumnResize, wrappedColumnKeys, onWrappedColumnChange]);
|
|
209
|
+
var resolvedWithNoResults = status === 'resolved' && !responseItems.length;
|
|
210
|
+
var hasConfluenceSearchParams = selectedConfluenceSite && searchString;
|
|
211
|
+
var selectedConfluenceSiteUrl = selectedConfluenceSite === null || selectedConfluenceSite === void 0 ? void 0 : selectedConfluenceSite.url;
|
|
212
|
+
var confluenceSearchUrl = selectedConfluenceSiteUrl && searchString !== undefined && "".concat(selectedConfluenceSiteUrl, "/wiki/search/?text=").concat(encodeURI(searchString));
|
|
213
|
+
var renderModalContent = useCallback(function () {
|
|
214
|
+
if (status === 'rejected') {
|
|
215
|
+
return jsx(ModalLoadingError, null);
|
|
216
|
+
} else if (status === 'unauthorized') {
|
|
217
|
+
return jsx(AccessRequired, {
|
|
218
|
+
url: selectedConfluenceSiteUrl || urlBeingEdited
|
|
219
|
+
});
|
|
220
|
+
} else if (resolvedWithNoResults || status === 'forbidden') {
|
|
221
|
+
return jsx(NoResults, null);
|
|
222
|
+
} else if (status === 'empty' || !columns.length) {
|
|
223
|
+
// persist the empty state when making the initial /data request which contains the columns
|
|
224
|
+
if (hasConfluenceSearchParams !== undefined) {
|
|
225
|
+
return jsx(EmptyState, {
|
|
226
|
+
testId: "confluence-search-datasource-modal--empty-state"
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
return jsx(ContentContainer, null, jsx(InitialStateView, {
|
|
230
|
+
icon: jsx(ConfluenceSearchInitialStateSVG, null),
|
|
231
|
+
title: confluenceSearchModalMessages.initialViewSearchTitle,
|
|
232
|
+
description: confluenceSearchModalMessages.initialViewSearchDescription
|
|
233
|
+
}));
|
|
234
|
+
}
|
|
235
|
+
return confluenceSearchTable;
|
|
236
|
+
}, [columns.length, selectedConfluenceSiteUrl, confluenceSearchTable, resolvedWithNoResults, status, urlBeingEdited, hasConfluenceSearchParams]);
|
|
237
|
+
var shouldShowResultsCount = !!totalCount && totalCount !== 1;
|
|
238
|
+
var onInsertPressed = useCallback(function () {
|
|
239
|
+
if (!isParametersSet || !cloudId) {
|
|
240
|
+
return;
|
|
241
|
+
}
|
|
242
|
+
onInsert(buildDatasourceAdf({
|
|
243
|
+
id: datasourceId,
|
|
244
|
+
parameters: _objectSpread(_objectSpread({}, parameters), {}, {
|
|
245
|
+
cloudId: cloudId
|
|
246
|
+
}),
|
|
247
|
+
views: [{
|
|
248
|
+
type: 'table',
|
|
249
|
+
properties: {
|
|
250
|
+
columns: (visibleColumnKeys || []).map(function (key) {
|
|
251
|
+
var width = columnCustomSizes === null || columnCustomSizes === void 0 ? void 0 : columnCustomSizes[key];
|
|
252
|
+
var isWrapped = wrappedColumnKeys === null || wrappedColumnKeys === void 0 ? void 0 : wrappedColumnKeys.includes(key);
|
|
253
|
+
return _objectSpread(_objectSpread({
|
|
254
|
+
key: key
|
|
255
|
+
}, width ? {
|
|
256
|
+
width: width
|
|
257
|
+
} : {}), isWrapped ? {
|
|
258
|
+
isWrapped: isWrapped
|
|
259
|
+
} : {});
|
|
260
|
+
})
|
|
261
|
+
}
|
|
262
|
+
}]
|
|
263
|
+
}));
|
|
264
|
+
}, [cloudId, isParametersSet, onInsert, datasourceId, parameters, visibleColumnKeys, columnCustomSizes, wrappedColumnKeys]);
|
|
265
|
+
var onSearch = useCallback(function (newSearchString) {
|
|
266
|
+
setSearchString(newSearchString);
|
|
267
|
+
reset({
|
|
268
|
+
shouldForceRequest: true
|
|
269
|
+
});
|
|
270
|
+
}, [reset]);
|
|
271
|
+
var isInsertDisabled = !isParametersSet || status === 'rejected' || status === 'unauthorized' || status === 'loading';
|
|
88
272
|
return jsx(IntlMessagesProvider, {
|
|
89
273
|
defaultMessages: i18nEN,
|
|
90
274
|
loaderFn: fetchMessagesForLocale
|
|
@@ -99,29 +283,40 @@ export var ConfluenceSearchConfigModal = function ConfluenceSearchConfigModal(pr
|
|
|
99
283
|
selectedSite: selectedConfluenceSite,
|
|
100
284
|
testId: "confluence-search-datasource-modal--site-selector",
|
|
101
285
|
label: siteSelectorLabel
|
|
102
|
-
}))), jsx(ModalBody, null, !hasNoConfluenceSites ? jsx(Fragment, null, jsx(
|
|
103
|
-
|
|
286
|
+
}))), jsx(ModalBody, null, !hasNoConfluenceSites ? jsx(Fragment, null, jsx(Box, {
|
|
287
|
+
xcss: inputContainerStyles
|
|
288
|
+
}, jsx(ConfluenceSearchContainer, {
|
|
289
|
+
cloudId: cloudId,
|
|
104
290
|
isSearching: status === 'loading',
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
placeholder: confluenceSearchModalMessages.searchLabel,
|
|
109
|
-
fullWidth: true
|
|
110
|
-
}), jsx(ContentContainer, null, jsx(InitialStateView, {
|
|
111
|
-
icon: jsx(ConfluenceSearchInitialStateSVG, null),
|
|
112
|
-
title: confluenceSearchModalMessages.initialViewSearchTitle,
|
|
113
|
-
description: confluenceSearchModalMessages.initialViewSearchDescription
|
|
114
|
-
}))) : jsx(NoInstancesView, {
|
|
291
|
+
onSearch: onSearch,
|
|
292
|
+
initialSearchValue: initialParameters === null || initialParameters === void 0 ? void 0 : initialParameters.searchString
|
|
293
|
+
})), renderModalContent()) : jsx(NoInstancesView, {
|
|
115
294
|
title: confluenceSearchModalMessages.noAccessToConfluenceSitesTitle,
|
|
116
295
|
description: confluenceSearchModalMessages.noAccessToConfluenceSitesDescription,
|
|
117
296
|
testId: 'no-confluence-instances-content'
|
|
118
|
-
})), jsx(ModalFooter, null, jsx(
|
|
297
|
+
})), jsx(ModalFooter, null, shouldShowResultsCount && confluenceSearchUrl && jsx(Box, {
|
|
298
|
+
testId: "confluence-search-datasource-modal-total-results-count",
|
|
299
|
+
xcss: searchCountStyles
|
|
300
|
+
}, jsx(LinkUrl, {
|
|
301
|
+
href: confluenceSearchUrl,
|
|
302
|
+
target: "_blank",
|
|
303
|
+
testId: "item-count-url",
|
|
304
|
+
style: {
|
|
305
|
+
color: "var(--ds-text-accent-gray, ".concat(N800, ")")
|
|
306
|
+
}
|
|
307
|
+
}, jsx(FormattedNumber, {
|
|
308
|
+
value: totalCount
|
|
309
|
+
}), ' ', jsx(FormattedMessage, _extends({}, confluenceSearchModalMessages.searchCountText, {
|
|
310
|
+
values: {
|
|
311
|
+
totalCount: totalCount
|
|
312
|
+
}
|
|
313
|
+
})))), jsx(Button, {
|
|
119
314
|
appearance: "default",
|
|
120
315
|
onClick: onCancel
|
|
121
316
|
}, jsx(FormattedMessage, confluenceSearchModalMessages.cancelButtonText)), !hasNoConfluenceSites && jsx(Button, {
|
|
122
317
|
appearance: "primary",
|
|
123
|
-
onClick:
|
|
124
|
-
isDisabled:
|
|
318
|
+
onClick: onInsertPressed,
|
|
319
|
+
isDisabled: isInsertDisabled,
|
|
125
320
|
testId: "confluence-search-datasource-modal--insert-button"
|
|
126
321
|
}, jsx(FormattedMessage, confluenceSearchModalMessages.insertResultsButtonText)))));
|
|
127
322
|
};
|
|
@@ -10,10 +10,10 @@ export var confluenceSearchModalMessages = defineMessages({
|
|
|
10
10
|
description: 'Button text to insert the displayed content',
|
|
11
11
|
defaultMessage: 'Insert results'
|
|
12
12
|
},
|
|
13
|
-
|
|
14
|
-
id: 'linkDataSource.confluence-search.configmodal.
|
|
15
|
-
description: '
|
|
16
|
-
defaultMessage: '
|
|
13
|
+
searchCountText: {
|
|
14
|
+
id: 'linkDataSource.confluence-search.configmodal.resultsCountText',
|
|
15
|
+
description: 'Text that appears after search count number.',
|
|
16
|
+
defaultMessage: '{totalCount, plural, one {result} other {results}}'
|
|
17
17
|
},
|
|
18
18
|
insertIssuesTitle: {
|
|
19
19
|
id: 'linkDataSource.confluence-search.configmodal.insertConfluenceTitle',
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -5,11 +5,12 @@ var _excluded = ["children"];
|
|
|
5
5
|
import { css, jsx } from '@emotion/react';
|
|
6
6
|
import { FormattedMessage } from 'react-intl-next';
|
|
7
7
|
import { components } from '@atlaskit/select';
|
|
8
|
+
import { fontFallback } from '@atlaskit/theme/typography';
|
|
8
9
|
import { columnPickerMessages } from './messages';
|
|
9
10
|
export var SELECT_ITEMS_MAXIMUM_THRESHOLD = 200;
|
|
10
11
|
var messageStyles = css({
|
|
11
12
|
color: "var(--ds-text-subtle, #44546F)",
|
|
12
|
-
font: "var(--ds-font-body-small,
|
|
13
|
+
font: "var(--ds-font-body-small, ".concat(fontFallback.body.small, ")"),
|
|
13
14
|
fontWeight: "var(--ds-font-weight-regular, 400)"
|
|
14
15
|
});
|
|
15
16
|
export var ConcatenatedMenuList = function ConcatenatedMenuList(_ref) {
|
|
@@ -3,6 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import { css, jsx } from '@emotion/react';
|
|
4
4
|
import styled from '@emotion/styled';
|
|
5
5
|
import { N40 } from '@atlaskit/theme/colors';
|
|
6
|
+
import { fontFallback } from '@atlaskit/theme/typography';
|
|
6
7
|
import { TableHeading } from './styled';
|
|
7
8
|
var maxWidth = '200px';
|
|
8
9
|
var firstLastChildOverride = "\n &:first-of-type, &:last-of-type {\n padding-left: ".concat("var(--ds-space-100, 8px)", ";\n padding-right: ", "var(--ds-space-100, 8px)", ";\n }\n");
|
|
@@ -27,7 +28,7 @@ var tableStyles = css({
|
|
|
27
28
|
background: "var(--ds-surface, #FFF)",
|
|
28
29
|
borderCollapse: 'separate',
|
|
29
30
|
borderSpacing: 0,
|
|
30
|
-
font: "var(--ds-font-body,
|
|
31
|
+
font: "var(--ds-font-body, ".concat(fontFallback.body.medium, ")"),
|
|
31
32
|
maxWidth: maxWidth
|
|
32
33
|
});
|
|
33
34
|
export var DragColumnPreview = function DragColumnPreview(_ref) {
|
|
@@ -20,6 +20,7 @@ import { autoScroller } from '@atlaskit/pragmatic-drag-and-drop-react-beautiful-
|
|
|
20
20
|
import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
|
|
21
21
|
import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
|
|
22
22
|
import { N40 } from '@atlaskit/theme/colors';
|
|
23
|
+
import { fontFallback } from '@atlaskit/theme/typography';
|
|
23
24
|
import Tooltip from '@atlaskit/tooltip';
|
|
24
25
|
import { startUfoExperience, succeedUfoExperience } from '../../analytics/ufoExperiences';
|
|
25
26
|
import { stickyTableHeadersIndex } from '../../common/zindex';
|
|
@@ -190,7 +191,7 @@ var noDefaultBorderStyles = css({
|
|
|
190
191
|
borderBottom: 0
|
|
191
192
|
});
|
|
192
193
|
var headerStyles = css({
|
|
193
|
-
font: "var(--ds-font-body-UNSAFE_small,
|
|
194
|
+
font: "var(--ds-font-body-UNSAFE_small, ".concat(fontFallback.body.UNSAFE_small, ")"),
|
|
194
195
|
fontWeight: "var(--ds-font-weight-medium, 500)"
|
|
195
196
|
});
|
|
196
197
|
var headingHoverEffectStyles = css({
|
|
@@ -2,8 +2,9 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
var _styled$th;
|
|
3
3
|
import styled from '@emotion/styled';
|
|
4
4
|
import { N40 } from '@atlaskit/theme/colors';
|
|
5
|
+
import { fontFallback } from '@atlaskit/theme/typography';
|
|
5
6
|
export var ScrollableContainerHeight = 590;
|
|
6
|
-
export var fieldTextFontSize = "var(--ds-font-body,
|
|
7
|
+
export var fieldTextFontSize = "var(--ds-font-body, ".concat(fontFallback.body.medium, ")");
|
|
7
8
|
export var Table = styled.table({
|
|
8
9
|
width: '100%'
|
|
9
10
|
});
|