@atlaskit/link-datasource 4.30.8 → 4.30.10
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 +17 -0
- package/dist/cjs/hooks/useDatasourceTableState.js +10 -3
- package/dist/cjs/hooks/useIsInPDFRender.js +15 -0
- package/dist/cjs/ui/datasource-table-view/datasourceTableView.js +8 -2
- package/dist/es2019/hooks/useDatasourceTableState.js +9 -2
- package/dist/es2019/hooks/useIsInPDFRender.js +9 -0
- package/dist/es2019/ui/datasource-table-view/datasourceTableView.js +8 -2
- package/dist/esm/hooks/useDatasourceTableState.js +9 -2
- package/dist/esm/hooks/useIsInPDFRender.js +9 -0
- package/dist/esm/ui/datasource-table-view/datasourceTableView.js +8 -2
- package/dist/types/hooks/useDatasourceTableState.d.ts +1 -0
- package/dist/types/hooks/useIsInPDFRender.d.ts +1 -0
- package/dist/types-ts4.5/hooks/useDatasourceTableState.d.ts +1 -0
- package/dist/types-ts4.5/hooks/useIsInPDFRender.d.ts +1 -0
- package/package.json +10 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/link-datasource
|
|
2
2
|
|
|
3
|
+
## 4.30.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`cd68ae62874a2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/cd68ae62874a2) -
|
|
8
|
+
Change page size to 100 for pdf export
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 4.30.9
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`76f021290097e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/76f021290097e) -
|
|
16
|
+
Remove the max height restriction for exporting data source table to PDF in Confluence. FG:
|
|
17
|
+
lp_disable_datasource_table_max_height_restriction
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 4.30.8
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.useDatasourceTableState = void 0;
|
|
7
|
+
exports.useDatasourceTableState = exports.INCREASED_DATASOURCE_DATA_PAGE_SIZE = void 0;
|
|
8
8
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
9
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
10
10
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
@@ -13,10 +13,13 @@ var _react = require("react");
|
|
|
13
13
|
var _isEqual = _interopRequireDefault(require("lodash/isEqual"));
|
|
14
14
|
var _atlassianContext = require("@atlaskit/atlassian-context");
|
|
15
15
|
var _linkClientExtension = require("@atlaskit/link-client-extension");
|
|
16
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
17
|
var _analytics = require("../analytics");
|
|
17
18
|
var _state = require("../state");
|
|
18
19
|
var _actions = require("../state/actions");
|
|
19
20
|
var _useErrorLogger2 = _interopRequireDefault(require("./useErrorLogger"));
|
|
21
|
+
var _useIsInPDFRender = require("./useIsInPDFRender");
|
|
22
|
+
var INCREASED_DATASOURCE_DATA_PAGE_SIZE = exports.INCREASED_DATASOURCE_DATA_PAGE_SIZE = 100;
|
|
20
23
|
var useDatasourceTableState = exports.useDatasourceTableState = function useDatasourceTableState(_ref) {
|
|
21
24
|
var datasourceId = _ref.datasourceId,
|
|
22
25
|
parameters = _ref.parameters,
|
|
@@ -35,6 +38,10 @@ var useDatasourceTableState = exports.useDatasourceTableState = function useData
|
|
|
35
38
|
fireEvent: fireEvent
|
|
36
39
|
}),
|
|
37
40
|
discoverActions = _useDiscoverActions.discoverActions;
|
|
41
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
42
|
+
var isInPDFRender = (0, _platformFeatureFlags.fg)('lp_disable_datasource_table_max_height_restriction') ?
|
|
43
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
44
|
+
(0, _useIsInPDFRender.useIsInPDFRender)() : false;
|
|
38
45
|
var idFieldCount = 1;
|
|
39
46
|
var keyFieldCount = 1;
|
|
40
47
|
var _useState = (0, _react.useState)([]),
|
|
@@ -262,7 +269,7 @@ var useDatasourceTableState = exports.useDatasourceTableState = function useData
|
|
|
262
269
|
isFullSchemaLoaded = fullSchema.properties.length > 0;
|
|
263
270
|
datasourceDataRequest = {
|
|
264
271
|
parameters: parameters,
|
|
265
|
-
pageSize: _linkClientExtension.DEFAULT_GET_DATASOURCE_DATA_PAGE_SIZE,
|
|
272
|
+
pageSize: isInPDFRender ? INCREASED_DATASOURCE_DATA_PAGE_SIZE : _linkClientExtension.DEFAULT_GET_DATASOURCE_DATA_PAGE_SIZE,
|
|
266
273
|
pageCursor: shouldRequestFirstPage ? undefined : nextCursor,
|
|
267
274
|
fields: fieldKeys,
|
|
268
275
|
includeSchema: isFullSchemaLoaded ? false : isSchemaFromData
|
|
@@ -390,7 +397,7 @@ var useDatasourceTableState = exports.useDatasourceTableState = function useData
|
|
|
390
397
|
return _context2.stop();
|
|
391
398
|
}
|
|
392
399
|
}, _callee2, null, [[10, 52]]);
|
|
393
|
-
})), [captureError, parameters, fieldKeys, nextCursor, responseItems, setResponseItemIds, onAddItems, getDatasourceData, datasourceId, applySchemaProperties, fireEvent, fullSchema, initialEmptyArray, discoverActions]);
|
|
400
|
+
})), [captureError, parameters, fieldKeys, nextCursor, responseItems, setResponseItemIds, onAddItems, getDatasourceData, datasourceId, applySchemaProperties, fireEvent, fullSchema, initialEmptyArray, discoverActions, isInPDFRender]);
|
|
394
401
|
var reset = (0, _react.useCallback)(function (options) {
|
|
395
402
|
setResponseItems(initialEmptyArray);
|
|
396
403
|
setResponseItemIds(initialEmptyArray);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useIsInPDFRender = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _linkProvider = require("@atlaskit/link-provider");
|
|
9
|
+
var useIsInPDFRender = exports.useIsInPDFRender = function useIsInPDFRender() {
|
|
10
|
+
var smartCardContext = (0, _linkProvider.useSmartCardContext)();
|
|
11
|
+
return (0, _react.useMemo)(function () {
|
|
12
|
+
var _smartCardContext$val;
|
|
13
|
+
return !!(smartCardContext !== null && smartCardContext !== void 0 && (_smartCardContext$val = smartCardContext.value) !== null && _smartCardContext$val !== void 0 && _smartCardContext$val.shouldControlDataExport);
|
|
14
|
+
}, [smartCardContext]);
|
|
15
|
+
};
|
|
@@ -23,6 +23,7 @@ var _fetchMessagesForLocale = require("../../common/utils/locale/fetch-messages-
|
|
|
23
23
|
var _datasourceExperienceId = require("../../contexts/datasource-experience-id");
|
|
24
24
|
var _useDatasourceTableState = require("../../hooks/useDatasourceTableState");
|
|
25
25
|
var _useDeepEffect = require("../../hooks/useDeepEffect");
|
|
26
|
+
var _useIsInPDFRender = require("../../hooks/useIsInPDFRender");
|
|
26
27
|
var _en = _interopRequireDefault(require("../../i18n/en"));
|
|
27
28
|
var _state = require("../../state");
|
|
28
29
|
var _assetsModal = require("../assets-modal");
|
|
@@ -68,6 +69,11 @@ var DatasourceTableViewWithoutAnalytics = function DatasourceTableViewWithoutAna
|
|
|
68
69
|
providerName = _useDatasourceTableSt.providerName,
|
|
69
70
|
destinationObjectTypes = _useDatasourceTableSt.destinationObjectTypes,
|
|
70
71
|
authDetails = _useDatasourceTableSt.authDetails;
|
|
72
|
+
|
|
73
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
74
|
+
var isInPDFRender = (0, _platformFeatureFlags.fg)('lp_disable_datasource_table_max_height_restriction') ?
|
|
75
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
76
|
+
(0, _useIsInPDFRender.useIsInPDFRender)() : false;
|
|
71
77
|
var _useDatasourceAnalyti = (0, _analytics.useDatasourceAnalyticsEvents)(),
|
|
72
78
|
fireEvent = _useDatasourceAnalyti.fireEvent;
|
|
73
79
|
var experienceId = (0, _datasourceExperienceId.useDatasourceExperienceId)();
|
|
@@ -84,7 +90,7 @@ var DatasourceTableViewWithoutAnalytics = function DatasourceTableViewWithoutAna
|
|
|
84
90
|
if ((0, _platformFeatureFlags.fg)('navx-1334-datasource-deep-compare-params')) {
|
|
85
91
|
// parameters is an object that we want to track, and when something inside it changes we want to
|
|
86
92
|
// call effect callback. Normal useEffect will not do deep comparison, but only reference one.
|
|
87
|
-
// This hook will do deep comparison making sure we don
|
|
93
|
+
// This hook will do deep comparison making sure we don't call reset() when only reference to an object
|
|
88
94
|
// has changed but not the content.
|
|
89
95
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
90
96
|
(0, _useDeepEffect.useDeepEffect)(function () {
|
|
@@ -193,7 +199,7 @@ var DatasourceTableViewWithoutAnalytics = function DatasourceTableViewWithoutAna
|
|
|
193
199
|
onColumnResize: onColumnResize,
|
|
194
200
|
wrappedColumnKeys: wrappedColumnKeys,
|
|
195
201
|
onWrappedColumnChange: onWrappedColumnChange,
|
|
196
|
-
scrollableContainerHeight: (0, _platformFeatureFlags.fg)('lp_enable_datasource-table-view_height_override') ? scrollableContainerHeight : DefaultScrollableContainerHeight,
|
|
202
|
+
scrollableContainerHeight: isInPDFRender ? undefined : (0, _platformFeatureFlags.fg)('lp_enable_datasource-table-view_height_override') ? scrollableContainerHeight : DefaultScrollableContainerHeight,
|
|
197
203
|
extensionKey: extensionKey
|
|
198
204
|
}) : /*#__PURE__*/React.createElement(_emptyState.default, {
|
|
199
205
|
testId: "datasource-table-view-skeleton",
|
|
@@ -2,10 +2,13 @@ import { useCallback, useEffect, useRef, useState } from 'react';
|
|
|
2
2
|
import isEqual from 'lodash/isEqual';
|
|
3
3
|
import { isFedRamp } from '@atlaskit/atlassian-context';
|
|
4
4
|
import { DEFAULT_GET_DATASOURCE_DATA_PAGE_SIZE, useDatasourceClientExtension } from '@atlaskit/link-client-extension';
|
|
5
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
6
|
import { useDatasourceAnalyticsEvents } from '../analytics';
|
|
6
7
|
import { useDatasourceActions } from '../state';
|
|
7
8
|
import { useDiscoverActions } from '../state/actions';
|
|
8
9
|
import useErrorLogger from './useErrorLogger';
|
|
10
|
+
import { useIsInPDFRender } from './useIsInPDFRender';
|
|
11
|
+
export const INCREASED_DATASOURCE_DATA_PAGE_SIZE = 100;
|
|
9
12
|
export const useDatasourceTableState = ({
|
|
10
13
|
datasourceId,
|
|
11
14
|
parameters,
|
|
@@ -28,6 +31,10 @@ export const useDatasourceTableState = ({
|
|
|
28
31
|
captureError,
|
|
29
32
|
fireEvent
|
|
30
33
|
});
|
|
34
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
35
|
+
const isInPDFRender = fg('lp_disable_datasource_table_max_height_restriction') ?
|
|
36
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
37
|
+
useIsInPDFRender() : false;
|
|
31
38
|
const idFieldCount = 1;
|
|
32
39
|
const keyFieldCount = 1;
|
|
33
40
|
const [initialEmptyArray] = useState([]);
|
|
@@ -147,7 +154,7 @@ export const useDatasourceTableState = ({
|
|
|
147
154
|
const isFullSchemaLoaded = fullSchema.properties.length > 0;
|
|
148
155
|
const datasourceDataRequest = {
|
|
149
156
|
parameters,
|
|
150
|
-
pageSize: DEFAULT_GET_DATASOURCE_DATA_PAGE_SIZE,
|
|
157
|
+
pageSize: isInPDFRender ? INCREASED_DATASOURCE_DATA_PAGE_SIZE : DEFAULT_GET_DATASOURCE_DATA_PAGE_SIZE,
|
|
151
158
|
pageCursor: shouldRequestFirstPage ? undefined : nextCursor,
|
|
152
159
|
fields: fieldKeys,
|
|
153
160
|
includeSchema: isFullSchemaLoaded ? false : isSchemaFromData
|
|
@@ -262,7 +269,7 @@ export const useDatasourceTableState = ({
|
|
|
262
269
|
}
|
|
263
270
|
setStatus('rejected');
|
|
264
271
|
}
|
|
265
|
-
}, [captureError, parameters, fieldKeys, nextCursor, responseItems, setResponseItemIds, onAddItems, getDatasourceData, datasourceId, applySchemaProperties, fireEvent, fullSchema, initialEmptyArray, discoverActions]);
|
|
272
|
+
}, [captureError, parameters, fieldKeys, nextCursor, responseItems, setResponseItemIds, onAddItems, getDatasourceData, datasourceId, applySchemaProperties, fireEvent, fullSchema, initialEmptyArray, discoverActions, isInPDFRender]);
|
|
266
273
|
const reset = useCallback(options => {
|
|
267
274
|
setResponseItems(initialEmptyArray);
|
|
268
275
|
setResponseItemIds(initialEmptyArray);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import { useSmartCardContext } from '@atlaskit/link-provider';
|
|
3
|
+
export const useIsInPDFRender = () => {
|
|
4
|
+
const smartCardContext = useSmartCardContext();
|
|
5
|
+
return useMemo(() => {
|
|
6
|
+
var _smartCardContext$val;
|
|
7
|
+
return !!(smartCardContext !== null && smartCardContext !== void 0 && (_smartCardContext$val = smartCardContext.value) !== null && _smartCardContext$val !== void 0 && _smartCardContext$val.shouldControlDataExport);
|
|
8
|
+
}, [smartCardContext]);
|
|
9
|
+
};
|
|
@@ -15,6 +15,7 @@ import { fetchMessagesForLocale } from '../../common/utils/locale/fetch-messages
|
|
|
15
15
|
import { DatasourceExperienceIdProvider, useDatasourceExperienceId } from '../../contexts/datasource-experience-id';
|
|
16
16
|
import { useDatasourceTableState } from '../../hooks/useDatasourceTableState';
|
|
17
17
|
import { useDeepEffect } from '../../hooks/useDeepEffect';
|
|
18
|
+
import { useIsInPDFRender } from '../../hooks/useIsInPDFRender';
|
|
18
19
|
import i18nEN from '../../i18n/en';
|
|
19
20
|
import { StoreContainer } from '../../state';
|
|
20
21
|
import { ASSETS_LIST_OF_LINKS_DATASOURCE_ID } from '../assets-modal';
|
|
@@ -59,6 +60,11 @@ const DatasourceTableViewWithoutAnalytics = ({
|
|
|
59
60
|
parameters,
|
|
60
61
|
fieldKeys: visibleColumnKeys
|
|
61
62
|
});
|
|
63
|
+
|
|
64
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
65
|
+
const isInPDFRender = fg('lp_disable_datasource_table_max_height_restriction') ?
|
|
66
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
67
|
+
useIsInPDFRender() : false;
|
|
62
68
|
const {
|
|
63
69
|
fireEvent
|
|
64
70
|
} = useDatasourceAnalyticsEvents();
|
|
@@ -76,7 +82,7 @@ const DatasourceTableViewWithoutAnalytics = ({
|
|
|
76
82
|
if (fg('navx-1334-datasource-deep-compare-params')) {
|
|
77
83
|
// parameters is an object that we want to track, and when something inside it changes we want to
|
|
78
84
|
// call effect callback. Normal useEffect will not do deep comparison, but only reference one.
|
|
79
|
-
// This hook will do deep comparison making sure we don
|
|
85
|
+
// This hook will do deep comparison making sure we don't call reset() when only reference to an object
|
|
80
86
|
// has changed but not the content.
|
|
81
87
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
82
88
|
useDeepEffect(() => {
|
|
@@ -185,7 +191,7 @@ const DatasourceTableViewWithoutAnalytics = ({
|
|
|
185
191
|
onColumnResize: onColumnResize,
|
|
186
192
|
wrappedColumnKeys: wrappedColumnKeys,
|
|
187
193
|
onWrappedColumnChange: onWrappedColumnChange,
|
|
188
|
-
scrollableContainerHeight: fg('lp_enable_datasource-table-view_height_override') ? scrollableContainerHeight : DefaultScrollableContainerHeight,
|
|
194
|
+
scrollableContainerHeight: isInPDFRender ? undefined : fg('lp_enable_datasource-table-view_height_override') ? scrollableContainerHeight : DefaultScrollableContainerHeight,
|
|
189
195
|
extensionKey: extensionKey
|
|
190
196
|
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
191
197
|
testId: "datasource-table-view-skeleton",
|
|
@@ -6,10 +6,13 @@ import { useCallback, useEffect, useRef, useState } from 'react';
|
|
|
6
6
|
import isEqual from 'lodash/isEqual';
|
|
7
7
|
import { isFedRamp } from '@atlaskit/atlassian-context';
|
|
8
8
|
import { DEFAULT_GET_DATASOURCE_DATA_PAGE_SIZE, useDatasourceClientExtension } from '@atlaskit/link-client-extension';
|
|
9
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
10
|
import { useDatasourceAnalyticsEvents } from '../analytics';
|
|
10
11
|
import { useDatasourceActions } from '../state';
|
|
11
12
|
import { useDiscoverActions } from '../state/actions';
|
|
12
13
|
import useErrorLogger from './useErrorLogger';
|
|
14
|
+
import { useIsInPDFRender } from './useIsInPDFRender';
|
|
15
|
+
export var INCREASED_DATASOURCE_DATA_PAGE_SIZE = 100;
|
|
13
16
|
export var useDatasourceTableState = function useDatasourceTableState(_ref) {
|
|
14
17
|
var datasourceId = _ref.datasourceId,
|
|
15
18
|
parameters = _ref.parameters,
|
|
@@ -28,6 +31,10 @@ export var useDatasourceTableState = function useDatasourceTableState(_ref) {
|
|
|
28
31
|
fireEvent: fireEvent
|
|
29
32
|
}),
|
|
30
33
|
discoverActions = _useDiscoverActions.discoverActions;
|
|
34
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
35
|
+
var isInPDFRender = fg('lp_disable_datasource_table_max_height_restriction') ?
|
|
36
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
37
|
+
useIsInPDFRender() : false;
|
|
31
38
|
var idFieldCount = 1;
|
|
32
39
|
var keyFieldCount = 1;
|
|
33
40
|
var _useState = useState([]),
|
|
@@ -255,7 +262,7 @@ export var useDatasourceTableState = function useDatasourceTableState(_ref) {
|
|
|
255
262
|
isFullSchemaLoaded = fullSchema.properties.length > 0;
|
|
256
263
|
datasourceDataRequest = {
|
|
257
264
|
parameters: parameters,
|
|
258
|
-
pageSize: DEFAULT_GET_DATASOURCE_DATA_PAGE_SIZE,
|
|
265
|
+
pageSize: isInPDFRender ? INCREASED_DATASOURCE_DATA_PAGE_SIZE : DEFAULT_GET_DATASOURCE_DATA_PAGE_SIZE,
|
|
259
266
|
pageCursor: shouldRequestFirstPage ? undefined : nextCursor,
|
|
260
267
|
fields: fieldKeys,
|
|
261
268
|
includeSchema: isFullSchemaLoaded ? false : isSchemaFromData
|
|
@@ -383,7 +390,7 @@ export var useDatasourceTableState = function useDatasourceTableState(_ref) {
|
|
|
383
390
|
return _context2.stop();
|
|
384
391
|
}
|
|
385
392
|
}, _callee2, null, [[10, 52]]);
|
|
386
|
-
})), [captureError, parameters, fieldKeys, nextCursor, responseItems, setResponseItemIds, onAddItems, getDatasourceData, datasourceId, applySchemaProperties, fireEvent, fullSchema, initialEmptyArray, discoverActions]);
|
|
393
|
+
})), [captureError, parameters, fieldKeys, nextCursor, responseItems, setResponseItemIds, onAddItems, getDatasourceData, datasourceId, applySchemaProperties, fireEvent, fullSchema, initialEmptyArray, discoverActions, isInPDFRender]);
|
|
387
394
|
var reset = useCallback(function (options) {
|
|
388
395
|
setResponseItems(initialEmptyArray);
|
|
389
396
|
setResponseItemIds(initialEmptyArray);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import { useSmartCardContext } from '@atlaskit/link-provider';
|
|
3
|
+
export var useIsInPDFRender = function useIsInPDFRender() {
|
|
4
|
+
var smartCardContext = useSmartCardContext();
|
|
5
|
+
return useMemo(function () {
|
|
6
|
+
var _smartCardContext$val;
|
|
7
|
+
return !!(smartCardContext !== null && smartCardContext !== void 0 && (_smartCardContext$val = smartCardContext.value) !== null && _smartCardContext$val !== void 0 && _smartCardContext$val.shouldControlDataExport);
|
|
8
|
+
}, [smartCardContext]);
|
|
9
|
+
};
|
|
@@ -15,6 +15,7 @@ import { fetchMessagesForLocale } from '../../common/utils/locale/fetch-messages
|
|
|
15
15
|
import { DatasourceExperienceIdProvider, useDatasourceExperienceId } from '../../contexts/datasource-experience-id';
|
|
16
16
|
import { useDatasourceTableState } from '../../hooks/useDatasourceTableState';
|
|
17
17
|
import { useDeepEffect } from '../../hooks/useDeepEffect';
|
|
18
|
+
import { useIsInPDFRender } from '../../hooks/useIsInPDFRender';
|
|
18
19
|
import i18nEN from '../../i18n/en';
|
|
19
20
|
import { StoreContainer } from '../../state';
|
|
20
21
|
import { ASSETS_LIST_OF_LINKS_DATASOURCE_ID } from '../assets-modal';
|
|
@@ -59,6 +60,11 @@ var DatasourceTableViewWithoutAnalytics = function DatasourceTableViewWithoutAna
|
|
|
59
60
|
providerName = _useDatasourceTableSt.providerName,
|
|
60
61
|
destinationObjectTypes = _useDatasourceTableSt.destinationObjectTypes,
|
|
61
62
|
authDetails = _useDatasourceTableSt.authDetails;
|
|
63
|
+
|
|
64
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
65
|
+
var isInPDFRender = fg('lp_disable_datasource_table_max_height_restriction') ?
|
|
66
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
67
|
+
useIsInPDFRender() : false;
|
|
62
68
|
var _useDatasourceAnalyti = useDatasourceAnalyticsEvents(),
|
|
63
69
|
fireEvent = _useDatasourceAnalyti.fireEvent;
|
|
64
70
|
var experienceId = useDatasourceExperienceId();
|
|
@@ -75,7 +81,7 @@ var DatasourceTableViewWithoutAnalytics = function DatasourceTableViewWithoutAna
|
|
|
75
81
|
if (fg('navx-1334-datasource-deep-compare-params')) {
|
|
76
82
|
// parameters is an object that we want to track, and when something inside it changes we want to
|
|
77
83
|
// call effect callback. Normal useEffect will not do deep comparison, but only reference one.
|
|
78
|
-
// This hook will do deep comparison making sure we don
|
|
84
|
+
// This hook will do deep comparison making sure we don't call reset() when only reference to an object
|
|
79
85
|
// has changed but not the content.
|
|
80
86
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
81
87
|
useDeepEffect(function () {
|
|
@@ -184,7 +190,7 @@ var DatasourceTableViewWithoutAnalytics = function DatasourceTableViewWithoutAna
|
|
|
184
190
|
onColumnResize: onColumnResize,
|
|
185
191
|
wrappedColumnKeys: wrappedColumnKeys,
|
|
186
192
|
onWrappedColumnChange: onWrappedColumnChange,
|
|
187
|
-
scrollableContainerHeight: fg('lp_enable_datasource-table-view_height_override') ? scrollableContainerHeight : DefaultScrollableContainerHeight,
|
|
193
|
+
scrollableContainerHeight: isInPDFRender ? undefined : fg('lp_enable_datasource-table-view_height_override') ? scrollableContainerHeight : DefaultScrollableContainerHeight,
|
|
188
194
|
extensionKey: extensionKey
|
|
189
195
|
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
190
196
|
testId: "datasource-table-view-skeleton",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type DatasourceDataResponseItem, type DatasourceMeta, type DatasourceParameters, type DatasourceResponseSchemaProperty, type DatasourceTableStatusType } from '@atlaskit/linking-types';
|
|
2
|
+
export declare const INCREASED_DATASOURCE_DATA_PAGE_SIZE = 100;
|
|
2
3
|
export interface onNextPageProps {
|
|
3
4
|
isSchemaFromData?: boolean;
|
|
4
5
|
shouldForceRequest?: boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useIsInPDFRender: () => boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type DatasourceDataResponseItem, type DatasourceMeta, type DatasourceParameters, type DatasourceResponseSchemaProperty, type DatasourceTableStatusType } from '@atlaskit/linking-types';
|
|
2
|
+
export declare const INCREASED_DATASOURCE_DATA_PAGE_SIZE = 100;
|
|
2
3
|
export interface onNextPageProps {
|
|
3
4
|
isSchemaFromData?: boolean;
|
|
4
5
|
shouldForceRequest?: boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useIsInPDFRender: () => boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-datasource",
|
|
3
|
-
"version": "4.30.
|
|
3
|
+
"version": "4.30.10",
|
|
4
4
|
"description": "UI Components to support linking platform dataset feature",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -59,11 +59,12 @@
|
|
|
59
59
|
"@atlaskit/inline-edit": "^15.3.0",
|
|
60
60
|
"@atlaskit/intl-messages-provider": "^2.0.0",
|
|
61
61
|
"@atlaskit/jql-ast": "^3.3.0",
|
|
62
|
-
"@atlaskit/jql-editor": "^5.
|
|
62
|
+
"@atlaskit/jql-editor": "^5.9.0",
|
|
63
63
|
"@atlaskit/jql-editor-autocomplete-rest": "^3.0.0",
|
|
64
64
|
"@atlaskit/layering": "^3.4.0",
|
|
65
65
|
"@atlaskit/link": "^3.2.0",
|
|
66
66
|
"@atlaskit/link-client-extension": "^6.0.0",
|
|
67
|
+
"@atlaskit/link-provider": "^4.0.0",
|
|
67
68
|
"@atlaskit/linking-common": "^9.9.0",
|
|
68
69
|
"@atlaskit/linking-types": "^14.2.0",
|
|
69
70
|
"@atlaskit/logo": "^19.9.0",
|
|
@@ -79,14 +80,14 @@
|
|
|
79
80
|
"@atlaskit/primitives": "^16.4.0",
|
|
80
81
|
"@atlaskit/react-select": "^3.9.0",
|
|
81
82
|
"@atlaskit/select": "^21.4.0",
|
|
82
|
-
"@atlaskit/smart-card": "^43.
|
|
83
|
-
"@atlaskit/smart-user-picker": "^8.
|
|
83
|
+
"@atlaskit/smart-card": "^43.14.0",
|
|
84
|
+
"@atlaskit/smart-user-picker": "^8.5.0",
|
|
84
85
|
"@atlaskit/spinner": "^19.0.0",
|
|
85
86
|
"@atlaskit/tag": "^14.1.0",
|
|
86
87
|
"@atlaskit/textfield": "^8.1.0",
|
|
87
88
|
"@atlaskit/theme": "^21.0.0",
|
|
88
89
|
"@atlaskit/tokens": "^8.4.0",
|
|
89
|
-
"@atlaskit/tooltip": "^20.
|
|
90
|
+
"@atlaskit/tooltip": "^20.11.0",
|
|
90
91
|
"@atlaskit/ufo": "^0.4.0",
|
|
91
92
|
"@atlaskit/width-detector": "^5.0.0",
|
|
92
93
|
"@babel/runtime": "^7.0.0",
|
|
@@ -110,8 +111,7 @@
|
|
|
110
111
|
"@af/integration-testing": "workspace:^",
|
|
111
112
|
"@af/visual-regression": "workspace:^",
|
|
112
113
|
"@atlaskit/json-ld-types": "^1.4.0",
|
|
113
|
-
"@atlaskit/link-
|
|
114
|
-
"@atlaskit/link-test-helpers": "^8.5.0",
|
|
114
|
+
"@atlaskit/link-test-helpers": "^9.0.0",
|
|
115
115
|
"@atlaskit/ssr": "workspace:^",
|
|
116
116
|
"@atlassian/feature-flags-test-utils": "^1.0.0",
|
|
117
117
|
"@faker-js/faker": "^7.5.0",
|
|
@@ -188,6 +188,9 @@
|
|
|
188
188
|
"jpd_confluence_date_fields_improvements": {
|
|
189
189
|
"type": "boolean"
|
|
190
190
|
},
|
|
191
|
+
"lp_disable_datasource_table_max_height_restriction": {
|
|
192
|
+
"type": "boolean"
|
|
193
|
+
},
|
|
191
194
|
"navx-2825-eslint-translation-fix-linking-platform": {
|
|
192
195
|
"type": "boolean"
|
|
193
196
|
}
|