@atlaskit/link-datasource 2.9.0 → 2.9.2
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 +18 -0
- package/dist/cjs/hooks/useDatasourceTableState.js +2 -0
- package/dist/cjs/ui/assets-modal/modal/index.js +2 -0
- package/dist/cjs/ui/assets-modal/modal/render-assets-content/index.js +3 -1
- package/dist/cjs/ui/common/modal/datasource-modal/createDatasourceModal.js +55 -0
- package/dist/cjs/ui/common/modal/datasources-table-in-modal-preview/index.js +15 -2
- package/dist/cjs/ui/common/modal/insert-button/index.js +5 -4
- package/dist/cjs/ui/confluence-search-modal/modal/ModalOld.js +3 -1
- package/dist/cjs/ui/confluence-search-modal/modal/index.js +35 -39
- package/dist/cjs/ui/datasource-table-view/datasourceTableView.js +2 -0
- package/dist/cjs/ui/issue-like-table/index.js +56 -66
- package/dist/cjs/ui/issue-like-table/styled.js +25 -3
- package/dist/cjs/ui/issue-like-table/table-cell-content/index.js +54 -0
- package/dist/cjs/ui/issue-like-table/truncate-text-tag/index.js +32 -0
- package/dist/cjs/ui/jira-issues-modal/modal/ModalOld.js +3 -1
- package/dist/cjs/ui/jira-issues-modal/modal/index.js +141 -211
- package/dist/es2019/hooks/useDatasourceTableState.js +2 -1
- package/dist/es2019/ui/assets-modal/modal/index.js +2 -0
- package/dist/es2019/ui/assets-modal/modal/render-assets-content/index.js +3 -1
- package/dist/es2019/ui/common/modal/datasource-context/index.js +1 -1
- package/dist/es2019/ui/common/modal/datasource-modal/createDatasourceModal.js +51 -0
- package/dist/es2019/ui/common/modal/datasources-table-in-modal-preview/index.js +11 -2
- package/dist/es2019/ui/common/modal/insert-button/index.js +5 -4
- package/dist/es2019/ui/confluence-search-modal/modal/ModalOld.js +3 -1
- package/dist/es2019/ui/confluence-search-modal/modal/index.js +35 -39
- package/dist/es2019/ui/datasource-table-view/datasourceTableView.js +2 -0
- package/dist/es2019/ui/issue-like-table/index.js +32 -52
- package/dist/es2019/ui/issue-like-table/styled.js +33 -0
- package/dist/es2019/ui/issue-like-table/table-cell-content/index.js +44 -0
- package/dist/es2019/ui/issue-like-table/truncate-text-tag/index.js +21 -0
- package/dist/es2019/ui/jira-issues-modal/modal/ModalOld.js +3 -1
- package/dist/es2019/ui/jira-issues-modal/modal/index.js +133 -202
- package/dist/esm/hooks/useDatasourceTableState.js +2 -0
- package/dist/esm/ui/assets-modal/modal/index.js +2 -0
- package/dist/esm/ui/assets-modal/modal/render-assets-content/index.js +3 -1
- package/dist/esm/ui/common/modal/datasource-modal/createDatasourceModal.js +48 -0
- package/dist/esm/ui/common/modal/datasources-table-in-modal-preview/index.js +12 -2
- package/dist/esm/ui/common/modal/insert-button/index.js +5 -4
- package/dist/esm/ui/confluence-search-modal/modal/ModalOld.js +3 -1
- package/dist/esm/ui/confluence-search-modal/modal/index.js +38 -42
- package/dist/esm/ui/datasource-table-view/datasourceTableView.js +2 -0
- package/dist/esm/ui/issue-like-table/index.js +53 -61
- package/dist/esm/ui/issue-like-table/styled.js +24 -2
- package/dist/esm/ui/issue-like-table/table-cell-content/index.js +47 -0
- package/dist/esm/ui/issue-like-table/truncate-text-tag/index.js +21 -0
- package/dist/esm/ui/jira-issues-modal/modal/ModalOld.js +3 -1
- package/dist/esm/ui/jira-issues-modal/modal/index.js +146 -216
- package/dist/types/common/types.d.ts +2 -1
- package/dist/types/hooks/useDatasourceTableState.d.ts +2 -0
- package/dist/types/ui/assets-modal/modal/render-assets-content/index.d.ts +1 -0
- package/dist/types/ui/common/modal/datasource-context/index.d.ts +9 -12
- package/dist/types/ui/common/modal/datasource-modal/createDatasourceModal.d.ts +15 -0
- package/dist/types/ui/common/modal/insert-button/index.d.ts +4 -2
- package/dist/types/ui/confluence-search-modal/modal/index.d.ts +3 -4
- package/dist/types/ui/confluence-search-modal/types.d.ts +6 -1
- package/dist/types/ui/issue-like-table/index.d.ts +1 -17
- package/dist/types/ui/issue-like-table/styled.d.ts +4 -0
- package/dist/types/ui/issue-like-table/table-cell-content/index.d.ts +12 -0
- package/dist/types/ui/issue-like-table/truncate-text-tag/index.d.ts +6 -0
- package/dist/types/ui/issue-like-table/types.d.ts +20 -1
- package/dist/types/ui/jira-issues-modal/modal/index.d.ts +3 -3
- package/dist/types/ui/jira-issues-modal/types.d.ts +3 -0
- package/dist/types-ts4.5/common/types.d.ts +2 -1
- package/dist/types-ts4.5/hooks/useDatasourceTableState.d.ts +2 -0
- package/dist/types-ts4.5/ui/assets-modal/modal/render-assets-content/index.d.ts +1 -0
- package/dist/types-ts4.5/ui/common/modal/datasource-context/index.d.ts +9 -12
- package/dist/types-ts4.5/ui/common/modal/datasource-modal/createDatasourceModal.d.ts +15 -0
- package/dist/types-ts4.5/ui/common/modal/insert-button/index.d.ts +4 -2
- package/dist/types-ts4.5/ui/confluence-search-modal/modal/index.d.ts +3 -4
- package/dist/types-ts4.5/ui/confluence-search-modal/types.d.ts +6 -1
- package/dist/types-ts4.5/ui/issue-like-table/index.d.ts +1 -17
- package/dist/types-ts4.5/ui/issue-like-table/styled.d.ts +4 -0
- package/dist/types-ts4.5/ui/issue-like-table/table-cell-content/index.d.ts +12 -0
- package/dist/types-ts4.5/ui/issue-like-table/truncate-text-tag/index.d.ts +6 -0
- package/dist/types-ts4.5/ui/issue-like-table/types.d.ts +20 -1
- package/dist/types-ts4.5/ui/jira-issues-modal/modal/index.d.ts +3 -3
- package/dist/types-ts4.5/ui/jira-issues-modal/types.d.ts +3 -0
- package/examples-helpers/buildIssueLikeTable.tsx +2 -0
- package/package.json +8 -8
|
@@ -32,7 +32,7 @@ export const useDatasourceTableState = ({
|
|
|
32
32
|
const [status, setStatus] = useState('empty');
|
|
33
33
|
const [authDetails, setAuthDetails] = useState([]);
|
|
34
34
|
const [responseItems, setResponseItems] = useState(initialEmptyArray);
|
|
35
|
-
const [, setResponseItemIds] = useState(initialEmptyArray);
|
|
35
|
+
const [responseItemIds, setResponseItemIds] = useState(initialEmptyArray);
|
|
36
36
|
const [hasNextPage, setHasNextPage] = useState(true);
|
|
37
37
|
const [nextCursor, setNextCursor] = useState(undefined);
|
|
38
38
|
const [columns, setColumns] = useState([]);
|
|
@@ -291,6 +291,7 @@ export const useDatasourceTableState = ({
|
|
|
291
291
|
status,
|
|
292
292
|
onNextPage,
|
|
293
293
|
responseItems,
|
|
294
|
+
responseItemIds,
|
|
294
295
|
reset,
|
|
295
296
|
loadDatasourceDetails,
|
|
296
297
|
hasNextPage,
|
|
@@ -117,6 +117,7 @@ const PlainAssetsConfigModal = props => {
|
|
|
117
117
|
status,
|
|
118
118
|
onNextPage,
|
|
119
119
|
responseItems,
|
|
120
|
+
responseItemIds,
|
|
120
121
|
reset,
|
|
121
122
|
loadDatasourceDetails,
|
|
122
123
|
hasNextPage,
|
|
@@ -339,6 +340,7 @@ const PlainAssetsConfigModal = props => {
|
|
|
339
340
|
isFetchingInitialData: assetsClientLoading,
|
|
340
341
|
status: status,
|
|
341
342
|
responseItems: responseItems,
|
|
343
|
+
responseItemIds: responseItemIds,
|
|
342
344
|
visibleColumnKeys: visibleColumnKeys,
|
|
343
345
|
onVisibleColumnKeysChange: onVisibleColumnKeysChange,
|
|
344
346
|
datasourceId: datasourceId,
|
|
@@ -58,6 +58,7 @@ export const RenderAssetsContent = props => {
|
|
|
58
58
|
const {
|
|
59
59
|
status,
|
|
60
60
|
responseItems,
|
|
61
|
+
responseItemIds,
|
|
61
62
|
visibleColumnKeys,
|
|
62
63
|
onNextPage,
|
|
63
64
|
hasNextPage,
|
|
@@ -75,12 +76,13 @@ export const RenderAssetsContent = props => {
|
|
|
75
76
|
status: status,
|
|
76
77
|
columns: columns,
|
|
77
78
|
items: responseItems,
|
|
79
|
+
itemIds: responseItemIds,
|
|
78
80
|
hasNextPage: hasNextPage,
|
|
79
81
|
visibleColumnKeys: visibleColumnKeys || defaultVisibleColumnKeys,
|
|
80
82
|
onNextPage: onNextPage,
|
|
81
83
|
onLoadDatasourceDetails: loadDatasourceDetails,
|
|
82
84
|
onVisibleColumnKeysChange: onVisibleColumnKeysChange
|
|
83
|
-
})), [columns, defaultVisibleColumnKeys, hasNextPage, loadDatasourceDetails, onNextPage, onVisibleColumnKeysChange, responseItems, status, visibleColumnKeys]);
|
|
85
|
+
})), [columns, defaultVisibleColumnKeys, hasNextPage, loadDatasourceDetails, onNextPage, onVisibleColumnKeysChange, responseItems, responseItemIds, status, visibleColumnKeys]);
|
|
84
86
|
const renderAssetsContentView = useCallback(() => {
|
|
85
87
|
if (isFetchingInitialData) {
|
|
86
88
|
// Placing this check first as it's a priority before all others
|
|
@@ -51,7 +51,7 @@ export const DatasourceContextProvider = ({
|
|
|
51
51
|
onWrappedColumnChange,
|
|
52
52
|
parameters,
|
|
53
53
|
setParameters,
|
|
54
|
-
onInsert
|
|
54
|
+
onInsert: onInsert
|
|
55
55
|
}), [datasourceId, isValidParameters, tableState, visibleColumnCount, visibleColumnKeys, onVisibleColumnKeysChange, columnCustomSizes, onColumnResize, wrappedColumnKeys, onWrappedColumnChange, parameters, onInsert]);
|
|
56
56
|
return /*#__PURE__*/React.createElement(DatasourceContext.Provider, {
|
|
57
57
|
value: contextValue
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import React from 'react';
|
|
7
|
+
|
|
8
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
|
+
import { jsx } from '@emotion/react';
|
|
10
|
+
import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
11
|
+
import { DatasourceExperienceIdProvider } from '../../../../contexts/datasource-experience-id';
|
|
12
|
+
import { UserInteractionsProvider } from '../../../../contexts/user-interactions';
|
|
13
|
+
import { DatasourceContextProvider } from '../datasource-context';
|
|
14
|
+
import { DatasourceViewModeProvider } from '../mode-switcher/useViewModeContext';
|
|
15
|
+
const DEFAULT_VIEW_MODE = 'table';
|
|
16
|
+
export const createDatasourceModal = ({
|
|
17
|
+
isValidParameters,
|
|
18
|
+
dataProvider,
|
|
19
|
+
component: ModalContent
|
|
20
|
+
}) => {
|
|
21
|
+
return props => {
|
|
22
|
+
const {
|
|
23
|
+
datasourceId,
|
|
24
|
+
visibleColumnKeys,
|
|
25
|
+
columnCustomSizes,
|
|
26
|
+
wrappedColumnKeys,
|
|
27
|
+
parameters,
|
|
28
|
+
onInsert,
|
|
29
|
+
viewMode
|
|
30
|
+
} = props;
|
|
31
|
+
return jsx(AnalyticsContext, {
|
|
32
|
+
data: {
|
|
33
|
+
source: 'datasourceConfigModal',
|
|
34
|
+
component: 'datasourceConfigModal',
|
|
35
|
+
attributes: {
|
|
36
|
+
dataProvider
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}, jsx(DatasourceExperienceIdProvider, null, jsx(UserInteractionsProvider, null, jsx(DatasourceContextProvider, {
|
|
40
|
+
datasourceId: datasourceId,
|
|
41
|
+
initialVisibleColumnKeys: visibleColumnKeys,
|
|
42
|
+
initialColumnCustomSizes: columnCustomSizes,
|
|
43
|
+
initialWrappedColumnKeys: wrappedColumnKeys,
|
|
44
|
+
initialParameters: parameters,
|
|
45
|
+
isValidParameters: isValidParameters,
|
|
46
|
+
onInsert: onInsert
|
|
47
|
+
}, jsx(DatasourceViewModeProvider, {
|
|
48
|
+
viewMode: viewMode !== null && viewMode !== void 0 ? viewMode : DEFAULT_VIEW_MODE
|
|
49
|
+
}, jsx(ModalContent, props))))));
|
|
50
|
+
};
|
|
51
|
+
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import React from 'react';
|
|
2
|
+
import React, { useCallback } from 'react';
|
|
3
3
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
|
+
import { DatasourceAction } from '../../../../analytics/types';
|
|
5
|
+
import { useUserInteractions } from '../../../../contexts/user-interactions';
|
|
4
6
|
import { IssueLikeDataTableView } from '../../../issue-like-table';
|
|
5
7
|
import { useDatasourceContext } from '../datasource-context';
|
|
6
8
|
const Table = props => {
|
|
@@ -15,6 +17,7 @@ const Table = props => {
|
|
|
15
17
|
status,
|
|
16
18
|
onNextPage,
|
|
17
19
|
responseItems,
|
|
20
|
+
responseItemIds,
|
|
18
21
|
hasNextPage,
|
|
19
22
|
columns,
|
|
20
23
|
defaultVisibleColumnKeys,
|
|
@@ -22,13 +25,19 @@ const Table = props => {
|
|
|
22
25
|
extensionKey = null
|
|
23
26
|
}
|
|
24
27
|
} = useDatasourceContext();
|
|
28
|
+
const userInteractions = useUserInteractions();
|
|
29
|
+
const handleOnNextPage = useCallback((onNextPageProps = {}) => {
|
|
30
|
+
userInteractions.add(DatasourceAction.NEXT_PAGE_SCROLLED);
|
|
31
|
+
onNextPage(onNextPageProps);
|
|
32
|
+
}, [onNextPage, userInteractions]);
|
|
25
33
|
return /*#__PURE__*/React.createElement(IssueLikeDataTableView, _extends({}, props, {
|
|
26
34
|
status: status,
|
|
27
35
|
columns: columns,
|
|
28
36
|
items: responseItems,
|
|
37
|
+
itemIds: responseItemIds,
|
|
29
38
|
hasNextPage: hasNextPage,
|
|
30
39
|
visibleColumnKeys: visibleColumnKeys || defaultVisibleColumnKeys,
|
|
31
|
-
onNextPage:
|
|
40
|
+
onNextPage: handleOnNextPage,
|
|
32
41
|
onLoadDatasourceDetails: loadDatasourceDetails,
|
|
33
42
|
onVisibleColumnKeysChange: onVisibleColumnKeysChange,
|
|
34
43
|
extensionKey: extensionKey,
|
|
@@ -18,6 +18,7 @@ export const InsertButton = ({
|
|
|
18
18
|
testId,
|
|
19
19
|
url,
|
|
20
20
|
getAnalyticsPayload,
|
|
21
|
+
overwriteParameters,
|
|
21
22
|
children
|
|
22
23
|
}) => {
|
|
23
24
|
const {
|
|
@@ -47,12 +48,12 @@ export const InsertButton = ({
|
|
|
47
48
|
const insertButtonClickedEvent = analyticsEvent.update({
|
|
48
49
|
actionSubjectId: 'insert',
|
|
49
50
|
attributes: {
|
|
50
|
-
...getAnalyticsPayload(),
|
|
51
51
|
totalItemCount: totalCount || 0,
|
|
52
52
|
displayedColumnCount: visibleColumnCount.current,
|
|
53
53
|
display: currentViewMode === 'inline' ? DatasourceDisplay.DATASOURCE_INLINE : DatasourceDisplay.DATASOURCE_TABLE,
|
|
54
54
|
searchMethod: DatasourceSearchMethod.DATASOURCE_SEARCH_QUERY,
|
|
55
|
-
actions: userInteractions.get()
|
|
55
|
+
actions: userInteractions.get(),
|
|
56
|
+
...getAnalyticsPayload()
|
|
56
57
|
},
|
|
57
58
|
eventType: 'ui'
|
|
58
59
|
});
|
|
@@ -68,7 +69,7 @@ export const InsertButton = ({
|
|
|
68
69
|
} else {
|
|
69
70
|
onInsert(buildDatasourceAdf({
|
|
70
71
|
id: datasourceId,
|
|
71
|
-
parameters: parameters,
|
|
72
|
+
parameters: overwriteParameters ? overwriteParameters(parameters) : parameters,
|
|
72
73
|
views: [{
|
|
73
74
|
type: 'table',
|
|
74
75
|
properties: {
|
|
@@ -89,7 +90,7 @@ export const InsertButton = ({
|
|
|
89
90
|
}]
|
|
90
91
|
}, url), consumerEvent);
|
|
91
92
|
}
|
|
92
|
-
}, [
|
|
93
|
+
}, [columnCustomSizes, currentViewMode, datasourceId, getAnalyticsPayload, isValidParameters, onInsert, overwriteParameters, parameters, totalCount, url, userInteractions, visibleColumnCount, visibleColumnKeys, wrappedColumnKeys]);
|
|
93
94
|
return jsx(Button, {
|
|
94
95
|
appearance: "primary",
|
|
95
96
|
onClick: onInsertPressed,
|
|
@@ -101,6 +101,7 @@ export const PlainConfluenceSearchConfigModal = props => {
|
|
|
101
101
|
status,
|
|
102
102
|
onNextPage,
|
|
103
103
|
responseItems,
|
|
104
|
+
responseItemIds,
|
|
104
105
|
hasNextPage,
|
|
105
106
|
columns,
|
|
106
107
|
defaultVisibleColumnKeys,
|
|
@@ -178,6 +179,7 @@ export const PlainConfluenceSearchConfigModal = props => {
|
|
|
178
179
|
status: status,
|
|
179
180
|
columns: columns,
|
|
180
181
|
items: responseItems,
|
|
182
|
+
itemIds: responseItemIds,
|
|
181
183
|
hasNextPage: hasNextPage,
|
|
182
184
|
visibleColumnKeys: visibleColumnKeys || defaultVisibleColumnKeys,
|
|
183
185
|
onNextPage: onNextPage,
|
|
@@ -188,7 +190,7 @@ export const PlainConfluenceSearchConfigModal = props => {
|
|
|
188
190
|
onColumnResize: onColumnResize,
|
|
189
191
|
wrappedColumnKeys: wrappedColumnKeys,
|
|
190
192
|
onWrappedColumnChange: fg('platform.linking-platform.datasource-word_wrap') ? onWrappedColumnChange : undefined
|
|
191
|
-
})), [status, columns, responseItems, hasNextPage, visibleColumnKeys, defaultVisibleColumnKeys, onNextPage, loadDatasourceDetails, handleVisibleColumnKeysChange, extensionKey, columnCustomSizes, onColumnResize, wrappedColumnKeys, onWrappedColumnChange]);
|
|
193
|
+
})), [status, columns, responseItems, responseItemIds, hasNextPage, visibleColumnKeys, defaultVisibleColumnKeys, onNextPage, loadDatasourceDetails, handleVisibleColumnKeysChange, extensionKey, columnCustomSizes, onColumnResize, wrappedColumnKeys, onWrappedColumnChange]);
|
|
192
194
|
const resolvedWithNoResults = status === 'resolved' && !responseItems.length;
|
|
193
195
|
const hasConfluenceSearchParams = selectedConfluenceSite && searchString;
|
|
194
196
|
const selectedConfluenceSiteUrl = selectedConfluenceSite === null || selectedConfluenceSite === void 0 ? void 0 : selectedConfluenceSite.url;
|
|
@@ -8,7 +8,7 @@ import { Fragment, useCallback, useEffect, useMemo, useRef, useState } from 'rea
|
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
9
|
import { jsx } from '@emotion/react';
|
|
10
10
|
import { FormattedMessage } from 'react-intl-next';
|
|
11
|
-
import {
|
|
11
|
+
import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
12
12
|
import { IntlMessagesProvider } from '@atlaskit/intl-messages-provider';
|
|
13
13
|
import { ModalBody, ModalFooter, ModalHeader, ModalTitle } from '@atlaskit/modal-dialog';
|
|
14
14
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
@@ -30,12 +30,13 @@ import { InitialStateView } from '../../common/initial-state-view';
|
|
|
30
30
|
import { CancelButton } from '../../common/modal/cancel-button';
|
|
31
31
|
import { ContentContainer } from '../../common/modal/content-container';
|
|
32
32
|
import { SmartCardPlaceholder, SmartLink } from '../../common/modal/count-view-smart-link';
|
|
33
|
-
import {
|
|
33
|
+
import { useDatasourceContext } from '../../common/modal/datasource-context';
|
|
34
34
|
import { DatasourceModal } from '../../common/modal/datasource-modal';
|
|
35
|
+
import { createDatasourceModal } from '../../common/modal/datasource-modal/createDatasourceModal';
|
|
35
36
|
import DatasourcesTableInModalPreview from '../../common/modal/datasources-table-in-modal-preview';
|
|
36
37
|
import { InsertButton } from '../../common/modal/insert-button';
|
|
37
38
|
import { DatasourceViewModeDropDown } from '../../common/modal/mode-switcher';
|
|
38
|
-
import {
|
|
39
|
+
import { useViewModeContext } from '../../common/modal/mode-switcher/useViewModeContext';
|
|
39
40
|
import TableSearchCount from '../../common/modal/search-count';
|
|
40
41
|
import { SiteSelector } from '../../common/modal/site-selector';
|
|
41
42
|
import { EmptyState } from '../../issue-like-table';
|
|
@@ -43,7 +44,6 @@ import ConfluenceSearchContainer from '../confluence-search-container';
|
|
|
43
44
|
import { ConfluenceSearchInitialStateSVG } from './confluence-search-initial-state-svg';
|
|
44
45
|
import { confluenceSearchModalMessages } from './messages';
|
|
45
46
|
import { PlainConfluenceSearchConfigModal as PlainConfluenceSearchConfigModalOld } from './ModalOld';
|
|
46
|
-
const DEFAULT_VIEW_MODE = 'table';
|
|
47
47
|
const inputContainerStyles = xcss({
|
|
48
48
|
alignItems: 'baseline',
|
|
49
49
|
display: 'flex',
|
|
@@ -75,7 +75,6 @@ const useUpdateParametersOnFormUpdate = (cloudId, searchString, lastModified, co
|
|
|
75
75
|
export const PlainConfluenceSearchConfigModal = props => {
|
|
76
76
|
const {
|
|
77
77
|
onCancel,
|
|
78
|
-
parameters: initialParameters,
|
|
79
78
|
url: urlBeingEdited,
|
|
80
79
|
disableDisplayDropdown = false,
|
|
81
80
|
overrideParameters
|
|
@@ -83,23 +82,6 @@ export const PlainConfluenceSearchConfigModal = props => {
|
|
|
83
82
|
const {
|
|
84
83
|
currentViewMode
|
|
85
84
|
} = useViewModeContext();
|
|
86
|
-
const [cloudId, setCloudId] = useState(initialParameters === null || initialParameters === void 0 ? void 0 : initialParameters.cloudId);
|
|
87
|
-
const {
|
|
88
|
-
availableSites,
|
|
89
|
-
selectedSite: selectedConfluenceSite
|
|
90
|
-
} = useAvailableSites('confluence', cloudId);
|
|
91
|
-
const [searchString, setSearchString] = useState(initialParameters === null || initialParameters === void 0 ? void 0 : initialParameters.searchString);
|
|
92
|
-
const [contributorAccountIds, setContributorAccountIds] = useState((initialParameters === null || initialParameters === void 0 ? void 0 : initialParameters.contributorAccountIds) || []);
|
|
93
|
-
const [lastModified, setLastModified] = useState(initialParameters !== null && initialParameters !== void 0 && initialParameters.lastModified ? {
|
|
94
|
-
value: initialParameters === null || initialParameters === void 0 ? void 0 : initialParameters.lastModified,
|
|
95
|
-
from: initialParameters === null || initialParameters === void 0 ? void 0 : initialParameters.lastModifiedFrom,
|
|
96
|
-
to: initialParameters === null || initialParameters === void 0 ? void 0 : initialParameters.lastModifiedTo
|
|
97
|
-
} : undefined);
|
|
98
|
-
|
|
99
|
-
// analytics related parameters
|
|
100
|
-
const searchCount = useRef(0);
|
|
101
|
-
const userInteractions = useUserInteractions();
|
|
102
|
-
useUpdateParametersOnFormUpdate(cloudId, searchString, lastModified, contributorAccountIds, overrideParameters);
|
|
103
85
|
const {
|
|
104
86
|
visibleColumnKeys,
|
|
105
87
|
tableState: {
|
|
@@ -114,6 +96,23 @@ export const PlainConfluenceSearchConfigModal = props => {
|
|
|
114
96
|
visibleColumnCount,
|
|
115
97
|
parameters
|
|
116
98
|
} = useDatasourceContext();
|
|
99
|
+
const [cloudId, setCloudId] = useState(parameters === null || parameters === void 0 ? void 0 : parameters.cloudId);
|
|
100
|
+
const {
|
|
101
|
+
availableSites,
|
|
102
|
+
selectedSite: selectedConfluenceSite
|
|
103
|
+
} = useAvailableSites('confluence', cloudId);
|
|
104
|
+
const [searchString, setSearchString] = useState(parameters === null || parameters === void 0 ? void 0 : parameters.searchString);
|
|
105
|
+
const [contributorAccountIds, setContributorAccountIds] = useState((parameters === null || parameters === void 0 ? void 0 : parameters.contributorAccountIds) || []);
|
|
106
|
+
const [lastModified, setLastModified] = useState(parameters !== null && parameters !== void 0 && parameters.lastModified ? {
|
|
107
|
+
value: parameters === null || parameters === void 0 ? void 0 : parameters.lastModified,
|
|
108
|
+
from: parameters === null || parameters === void 0 ? void 0 : parameters.lastModifiedFrom,
|
|
109
|
+
to: parameters === null || parameters === void 0 ? void 0 : parameters.lastModifiedTo
|
|
110
|
+
} : undefined);
|
|
111
|
+
|
|
112
|
+
// analytics related parameters
|
|
113
|
+
const searchCount = useRef(0);
|
|
114
|
+
const userInteractions = useUserInteractions();
|
|
115
|
+
useUpdateParametersOnFormUpdate(cloudId, searchString, lastModified, contributorAccountIds, overrideParameters);
|
|
117
116
|
const {
|
|
118
117
|
fireEvent
|
|
119
118
|
} = useDatasourceAnalyticsEvents();
|
|
@@ -306,7 +305,7 @@ export const PlainConfluenceSearchConfigModal = props => {
|
|
|
306
305
|
}, jsx(ConfluenceSearchContainer, {
|
|
307
306
|
isSearching: status === 'loading',
|
|
308
307
|
onSearch: onSearch,
|
|
309
|
-
parameters: isValidParameters(parameters) ? parameters : {
|
|
308
|
+
parameters: parameters && isValidParameters(parameters) ? parameters : {
|
|
310
309
|
cloudId: ''
|
|
311
310
|
}
|
|
312
311
|
})), currentViewMode === 'inline' ? renderInlineLinkModalContent() : renderTableModalContent()) : jsx(NoInstancesView, {
|
|
@@ -341,19 +340,16 @@ const contextData = {
|
|
|
341
340
|
...analyticsContextAttributes
|
|
342
341
|
}
|
|
343
342
|
};
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
// TODO on cleanup 'use-refactored-config-modal' ff, delete `ModalOld.tsx` as well
|
|
358
|
-
jsx(PlainConfluenceSearchConfigModalOld, props))));
|
|
359
|
-
});
|
|
343
|
+
const ConnectedConfluenceSearchConfigModal = createDatasourceModal({
|
|
344
|
+
isValidParameters,
|
|
345
|
+
dataProvider: 'confluence-search',
|
|
346
|
+
component: PlainConfluenceSearchConfigModal
|
|
347
|
+
});
|
|
348
|
+
export const ConfluenceSearchConfigModal = props => {
|
|
349
|
+
if (fg('platform-datasources-use-refactored-config-modal')) {
|
|
350
|
+
return jsx(StoreContainer, null, jsx(ConnectedConfluenceSearchConfigModal, props));
|
|
351
|
+
}
|
|
352
|
+
return jsx(StoreContainer, null, jsx(AnalyticsContext, {
|
|
353
|
+
data: contextData
|
|
354
|
+
}, jsx(DatasourceExperienceIdProvider, null, jsx(UserInteractionsProvider, null, jsx(PlainConfluenceSearchConfigModalOld, props)))));
|
|
355
|
+
};
|
|
@@ -47,6 +47,7 @@ const DatasourceTableViewWithoutAnalytics = ({
|
|
|
47
47
|
status,
|
|
48
48
|
onNextPage,
|
|
49
49
|
responseItems,
|
|
50
|
+
responseItemIds,
|
|
50
51
|
hasNextPage,
|
|
51
52
|
columns,
|
|
52
53
|
defaultVisibleColumnKeys,
|
|
@@ -163,6 +164,7 @@ const DatasourceTableViewWithoutAnalytics = ({
|
|
|
163
164
|
testId: 'datasource-table-view',
|
|
164
165
|
hasNextPage: hasNextPage,
|
|
165
166
|
items: responseItems,
|
|
167
|
+
itemIds: responseItemIds,
|
|
166
168
|
onNextPage: onNextPage,
|
|
167
169
|
onLoadDatasourceDetails: loadDatasourceDetails,
|
|
168
170
|
status: status,
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
/**
|
|
3
2
|
* @jsxRuntime classic
|
|
4
3
|
* @jsx jsx
|
|
5
4
|
*/
|
|
6
|
-
import {
|
|
5
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
7
6
|
|
|
8
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
8
|
import { css, jsx } from '@emotion/react';
|
|
@@ -13,6 +12,7 @@ import debounce from 'lodash/debounce';
|
|
|
13
12
|
import { useIntl } from 'react-intl-next';
|
|
14
13
|
import invariant from 'tiny-invariant';
|
|
15
14
|
import { Skeleton } from '@atlaskit/linking-common';
|
|
15
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
16
16
|
import { extractClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
|
|
17
17
|
import { reorderWithEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/util/reorder-with-edge';
|
|
18
18
|
import { autoScroller } from '@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-autoscroll';
|
|
@@ -30,7 +30,9 @@ import { DragColumnPreview } from './drag-column-preview';
|
|
|
30
30
|
import { DraggableTableHeading } from './draggable-table-heading';
|
|
31
31
|
import TableEmptyState from './empty-state';
|
|
32
32
|
import { renderType, stringifyType } from './render-type';
|
|
33
|
-
import {
|
|
33
|
+
import { Table, TableCell, TableHeading, withTablePluginHeaderPrefix } from './styled';
|
|
34
|
+
import { TableCellContent } from './table-cell-content';
|
|
35
|
+
import { TruncateTextTag } from './truncate-text-tag';
|
|
34
36
|
import { useIsOnScreen } from './useIsOnScreen';
|
|
35
37
|
import { COLUMN_BASE_WIDTH, getWidthCss } from './utils';
|
|
36
38
|
const tableSidePadding = "var(--ds-space-200, 16px)";
|
|
@@ -41,11 +43,6 @@ const tableHeadStyles = css({
|
|
|
41
43
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
42
44
|
zIndex: stickyTableHeadersIndex
|
|
43
45
|
});
|
|
44
|
-
const truncateTextStyles = css({
|
|
45
|
-
overflow: 'hidden',
|
|
46
|
-
textOverflow: 'ellipsis',
|
|
47
|
-
whiteSpace: 'nowrap'
|
|
48
|
-
});
|
|
49
46
|
const columnPickerWidth = 80;
|
|
50
47
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
51
48
|
const ColumnPickerHeader = styled.th({
|
|
@@ -72,39 +69,6 @@ const truncateStyles = css({
|
|
|
72
69
|
textOverflow: 'ellipsis',
|
|
73
70
|
whiteSpace: 'nowrap'
|
|
74
71
|
});
|
|
75
|
-
|
|
76
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
77
|
-
const TableCell = styled.td({
|
|
78
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
79
|
-
[`${withTablePluginBodyPrefix()}`]: {
|
|
80
|
-
/* First section here is to override things editor table plugin css defines */
|
|
81
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
82
|
-
font: fieldTextFontSize,
|
|
83
|
-
padding: `${"var(--ds-space-050, 4px)"} ${"var(--ds-space-100, 8px)"}`,
|
|
84
|
-
border: 0,
|
|
85
|
-
minWidth: 'auto',
|
|
86
|
-
verticalAlign: 'inherit',
|
|
87
|
-
boxSizing: 'border-box',
|
|
88
|
-
borderRight: `0.5px solid ${`var(--ds-border, ${N40})`}`,
|
|
89
|
-
borderBottom: `0.5px solid ${`var(--ds-border, ${N40})`}`,
|
|
90
|
-
overflow: 'hidden'
|
|
91
|
-
},
|
|
92
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
93
|
-
[`${withTablePluginBodyPrefix('&:first-child')}`]: {
|
|
94
|
-
paddingLeft: "var(--ds-space-100, 8px)"
|
|
95
|
-
},
|
|
96
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
97
|
-
[`${withTablePluginBodyPrefix('&:last-child')}`]: {
|
|
98
|
-
borderRight: 0,
|
|
99
|
-
paddingRight: "var(--ds-space-100, 8px)"
|
|
100
|
-
},
|
|
101
|
-
// Inline smart links are pretty opinionated about word-wrapping.
|
|
102
|
-
// We want it to be controlled by user, so we make it overflow and truncate by default.
|
|
103
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
104
|
-
["& [data-testid='inline-card-icon-and-title'], " + "& [data-testid='button-connect-account'] > span"]: {
|
|
105
|
-
whiteSpace: 'unset'
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
72
|
const tableContainerStyles = css({
|
|
109
73
|
borderRadius: 'inherit',
|
|
110
74
|
borderBottomLeftRadius: 0,
|
|
@@ -314,18 +278,12 @@ function getDefaultColumnWidth(key, type) {
|
|
|
314
278
|
return DEFAULT_WIDTH;
|
|
315
279
|
}
|
|
316
280
|
}
|
|
317
|
-
const TruncateTextTag = /*#__PURE__*/forwardRef((props, ref) => {
|
|
318
|
-
return jsx("span", _extends({
|
|
319
|
-
css: truncateTextStyles
|
|
320
|
-
}, props, {
|
|
321
|
-
ref: ref
|
|
322
|
-
}), props.children);
|
|
323
|
-
});
|
|
324
281
|
export const IssueLikeDataTableView = ({
|
|
325
282
|
testId,
|
|
326
283
|
onNextPage,
|
|
327
284
|
onLoadDatasourceDetails,
|
|
328
285
|
items,
|
|
286
|
+
itemIds,
|
|
329
287
|
columns,
|
|
330
288
|
renderItem = renderType,
|
|
331
289
|
visibleColumnKeys,
|
|
@@ -406,13 +364,13 @@ export const IssueLikeDataTableView = ({
|
|
|
406
364
|
const loadingRow = useMemo(() => ({
|
|
407
365
|
key: 'loading',
|
|
408
366
|
cells: headerColumns.map(column => ({
|
|
409
|
-
...column,
|
|
410
367
|
content: jsx(Skeleton, {
|
|
411
368
|
borderRadius: 8,
|
|
412
369
|
width: "100%",
|
|
413
370
|
height: 14,
|
|
414
371
|
testId: "issues-table-row-loading"
|
|
415
|
-
})
|
|
372
|
+
}),
|
|
373
|
+
key: column.key
|
|
416
374
|
}))
|
|
417
375
|
}), [headerColumns]);
|
|
418
376
|
useEffect(() => {
|
|
@@ -499,7 +457,29 @@ export const IssueLikeDataTableView = ({
|
|
|
499
457
|
}
|
|
500
458
|
}));
|
|
501
459
|
}, [visibleColumnKeys, onVisibleColumnKeysChange, tableId, hasData]);
|
|
502
|
-
const tableRows = useMemo(() =>
|
|
460
|
+
const tableRows = useMemo(() => fg('enable_datasource_react_sweet_state') ? itemIds.map((id, rowIndex) => {
|
|
461
|
+
return {
|
|
462
|
+
key: id,
|
|
463
|
+
cells: visibleSortedColumns.map(({
|
|
464
|
+
key,
|
|
465
|
+
type
|
|
466
|
+
}, cellIndex) => {
|
|
467
|
+
return {
|
|
468
|
+
key,
|
|
469
|
+
columnKey: key,
|
|
470
|
+
content: jsx(TableCellContent, {
|
|
471
|
+
id: id,
|
|
472
|
+
columnKey: key,
|
|
473
|
+
columnType: type,
|
|
474
|
+
wrappedColumnKeys: wrappedColumnKeys,
|
|
475
|
+
renderItem: renderItem
|
|
476
|
+
}),
|
|
477
|
+
width: getColumnWidth(key, type, cellIndex === visibleSortedColumns.length - 1)
|
|
478
|
+
};
|
|
479
|
+
}),
|
|
480
|
+
ref: rowIndex === items.length - 1 ? el => setLastRowElement(el) : undefined
|
|
481
|
+
};
|
|
482
|
+
}) : items.map((newRowData, rowIndex) => ({
|
|
503
483
|
key: `${identityColumnKey && newRowData[identityColumnKey] && newRowData[identityColumnKey].data || rowIndex}`,
|
|
504
484
|
cells: visibleSortedColumns.map(({
|
|
505
485
|
key,
|
|
@@ -531,7 +511,7 @@ export const IssueLikeDataTableView = ({
|
|
|
531
511
|
};
|
|
532
512
|
}),
|
|
533
513
|
ref: rowIndex === items.length - 1 ? el => setLastRowElement(el) : undefined
|
|
534
|
-
})), [items,
|
|
514
|
+
})), [items, itemIds, renderItem, wrappedColumnKeys, visibleSortedColumns, getColumnWidth, intl.formatMessage, intl.formatDate]);
|
|
535
515
|
const rows = useMemo(() => {
|
|
536
516
|
if (status !== 'loading') {
|
|
537
517
|
return tableRows;
|
|
@@ -75,4 +75,37 @@ export const TableHeading = styled.th({
|
|
|
75
75
|
overflow: 'hidden',
|
|
76
76
|
wordWrap: 'break-word'
|
|
77
77
|
}
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
81
|
+
export const TableCell = styled.td({
|
|
82
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
83
|
+
[`${withTablePluginBodyPrefix()}`]: {
|
|
84
|
+
/* First section here is to override things editor table plugin css defines */
|
|
85
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
86
|
+
font: fieldTextFontSize,
|
|
87
|
+
padding: `${"var(--ds-space-050, 4px)"} ${"var(--ds-space-100, 8px)"}`,
|
|
88
|
+
border: 0,
|
|
89
|
+
minWidth: 'auto',
|
|
90
|
+
verticalAlign: 'inherit',
|
|
91
|
+
boxSizing: 'border-box',
|
|
92
|
+
borderRight: `0.5px solid ${`var(--ds-border, ${N40})`}`,
|
|
93
|
+
borderBottom: `0.5px solid ${`var(--ds-border, ${N40})`}`,
|
|
94
|
+
overflow: 'hidden'
|
|
95
|
+
},
|
|
96
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
97
|
+
[`${withTablePluginBodyPrefix('&:first-child')}`]: {
|
|
98
|
+
paddingLeft: "var(--ds-space-100, 8px)"
|
|
99
|
+
},
|
|
100
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
101
|
+
[`${withTablePluginBodyPrefix('&:last-child')}`]: {
|
|
102
|
+
borderRight: 0,
|
|
103
|
+
paddingRight: "var(--ds-space-100, 8px)"
|
|
104
|
+
},
|
|
105
|
+
// Inline smart links are pretty opinionated about word-wrapping.
|
|
106
|
+
// We want it to be controlled by user, so we make it overflow and truncate by default.
|
|
107
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
108
|
+
["& [data-testid='inline-card-icon-and-title'], " + "& [data-testid='button-connect-account'] > span"]: {
|
|
109
|
+
whiteSpace: 'unset'
|
|
110
|
+
}
|
|
78
111
|
});
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useIntl } from 'react-intl-next';
|
|
3
|
+
import Tooltip from '@atlaskit/tooltip';
|
|
4
|
+
import { useDatasourceItem } from '../../../state';
|
|
5
|
+
import { stringifyType } from '../render-type';
|
|
6
|
+
import { TruncateTextTag } from '../truncate-text-tag';
|
|
7
|
+
export const TableCellContent = ({
|
|
8
|
+
columnKey,
|
|
9
|
+
columnType,
|
|
10
|
+
id,
|
|
11
|
+
renderItem,
|
|
12
|
+
wrappedColumnKeys
|
|
13
|
+
}) => {
|
|
14
|
+
var _rowData$columnKey;
|
|
15
|
+
const intl = useIntl();
|
|
16
|
+
const rowData = useDatasourceItem({
|
|
17
|
+
id
|
|
18
|
+
});
|
|
19
|
+
if (!rowData || !columnKey || !rowData[columnKey]) {
|
|
20
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// Need to make sure we keep falsy values like 0 and '', as well as the boolean false.
|
|
24
|
+
const value = (_rowData$columnKey = rowData[columnKey]) === null || _rowData$columnKey === void 0 ? void 0 : _rowData$columnKey.data;
|
|
25
|
+
const values = Array.isArray(value) ? value : [value];
|
|
26
|
+
const renderedValues = renderItem({
|
|
27
|
+
type: columnType,
|
|
28
|
+
values
|
|
29
|
+
});
|
|
30
|
+
const stringifiedContent = values.map(value => stringifyType({
|
|
31
|
+
type: columnType,
|
|
32
|
+
value
|
|
33
|
+
}, intl.formatMessage, intl.formatDate)).filter(value => value !== '').join(', ');
|
|
34
|
+
if (stringifiedContent && !(wrappedColumnKeys !== null && wrappedColumnKeys !== void 0 && wrappedColumnKeys.includes(columnKey))) {
|
|
35
|
+
return /*#__PURE__*/React.createElement(Tooltip
|
|
36
|
+
// @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
|
|
37
|
+
, {
|
|
38
|
+
tag: TruncateTextTag,
|
|
39
|
+
content: stringifiedContent,
|
|
40
|
+
testId: "issues-table-cell-tooltip"
|
|
41
|
+
}, renderedValues);
|
|
42
|
+
}
|
|
43
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, renderedValues);
|
|
44
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
* @jsx jsx
|
|
5
|
+
*/
|
|
6
|
+
import React, { forwardRef } from 'react';
|
|
7
|
+
|
|
8
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
9
|
+
import { css, jsx } from '@emotion/react';
|
|
10
|
+
const truncateTextStyles = css({
|
|
11
|
+
overflow: 'hidden',
|
|
12
|
+
textOverflow: 'ellipsis',
|
|
13
|
+
whiteSpace: 'nowrap'
|
|
14
|
+
});
|
|
15
|
+
export const TruncateTextTag = /*#__PURE__*/forwardRef((props, ref) => {
|
|
16
|
+
return jsx("span", _extends({
|
|
17
|
+
css: truncateTextStyles
|
|
18
|
+
}, props, {
|
|
19
|
+
ref: ref
|
|
20
|
+
}), props.children);
|
|
21
|
+
});
|
|
@@ -105,6 +105,7 @@ export const PlainJiraIssuesConfigModalOld = props => {
|
|
|
105
105
|
status,
|
|
106
106
|
onNextPage,
|
|
107
107
|
responseItems,
|
|
108
|
+
responseItemIds,
|
|
108
109
|
hasNextPage,
|
|
109
110
|
columns,
|
|
110
111
|
defaultVisibleColumnKeys,
|
|
@@ -355,6 +356,7 @@ export const PlainJiraIssuesConfigModalOld = props => {
|
|
|
355
356
|
status: status,
|
|
356
357
|
columns: columns,
|
|
357
358
|
items: responseItems,
|
|
359
|
+
itemIds: responseItemIds,
|
|
358
360
|
hasNextPage: hasNextPage,
|
|
359
361
|
visibleColumnKeys: visibleColumnKeys || defaultVisibleColumnKeys,
|
|
360
362
|
onNextPage: handleOnNextPage,
|
|
@@ -365,7 +367,7 @@ export const PlainJiraIssuesConfigModalOld = props => {
|
|
|
365
367
|
onColumnResize: onColumnResize,
|
|
366
368
|
wrappedColumnKeys: wrappedColumnKeys,
|
|
367
369
|
onWrappedColumnChange: fg('platform.linking-platform.datasource-word_wrap') ? onWrappedColumnChange : undefined
|
|
368
|
-
})), [status, columns, responseItems, hasNextPage, visibleColumnKeys, defaultVisibleColumnKeys, handleOnNextPage, loadDatasourceDetails, handleVisibleColumnKeysChange, extensionKey, columnCustomSizes, onColumnResize, wrappedColumnKeys, onWrappedColumnChange]);
|
|
370
|
+
})), [status, columns, responseItems, responseItemIds, hasNextPage, visibleColumnKeys, defaultVisibleColumnKeys, handleOnNextPage, loadDatasourceDetails, handleVisibleColumnKeysChange, extensionKey, columnCustomSizes, onColumnResize, wrappedColumnKeys, onWrappedColumnChange]);
|
|
369
371
|
const renderCountModeContent = useCallback(() => {
|
|
370
372
|
const selectedJiraSiteUrl = selectedJiraSite === null || selectedJiraSite === void 0 ? void 0 : selectedJiraSite.url;
|
|
371
373
|
if (status === 'unauthorized') {
|