@atlaskit/link-datasource 4.30.9 → 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 +8 -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 +4 -6
- 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 +4 -6
- 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 +4 -6
- 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 +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
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
|
+
|
|
3
11
|
## 4.30.9
|
|
4
12
|
|
|
5
13
|
### 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
|
+
};
|
|
@@ -13,7 +13,6 @@ var React = _react;
|
|
|
13
13
|
var _runtime = require("@compiled/react/runtime");
|
|
14
14
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
15
15
|
var _intlMessagesProvider = require("@atlaskit/intl-messages-provider");
|
|
16
|
-
var _linkProvider = require("@atlaskit/link-provider");
|
|
17
16
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
18
17
|
var _analytics = require("../../analytics");
|
|
19
18
|
var _constants = require("../../analytics/constants");
|
|
@@ -24,6 +23,7 @@ var _fetchMessagesForLocale = require("../../common/utils/locale/fetch-messages-
|
|
|
24
23
|
var _datasourceExperienceId = require("../../contexts/datasource-experience-id");
|
|
25
24
|
var _useDatasourceTableState = require("../../hooks/useDatasourceTableState");
|
|
26
25
|
var _useDeepEffect = require("../../hooks/useDeepEffect");
|
|
26
|
+
var _useIsInPDFRender = require("../../hooks/useIsInPDFRender");
|
|
27
27
|
var _en = _interopRequireDefault(require("../../i18n/en"));
|
|
28
28
|
var _state = require("../../state");
|
|
29
29
|
var _assetsModal = require("../assets-modal");
|
|
@@ -38,7 +38,6 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
38
38
|
var containerStyles = null;
|
|
39
39
|
var DefaultScrollableContainerHeight = 590;
|
|
40
40
|
var DatasourceTableViewWithoutAnalytics = function DatasourceTableViewWithoutAnalytics(_ref) {
|
|
41
|
-
var _smartCardContext$val;
|
|
42
41
|
var datasourceId = _ref.datasourceId,
|
|
43
42
|
parameters = _ref.parameters,
|
|
44
43
|
visibleColumnKeys = _ref.visibleColumnKeys,
|
|
@@ -72,10 +71,9 @@ var DatasourceTableViewWithoutAnalytics = function DatasourceTableViewWithoutAna
|
|
|
72
71
|
authDetails = _useDatasourceTableSt.authDetails;
|
|
73
72
|
|
|
74
73
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
75
|
-
var
|
|
74
|
+
var isInPDFRender = (0, _platformFeatureFlags.fg)('lp_disable_datasource_table_max_height_restriction') ?
|
|
76
75
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
77
|
-
(0,
|
|
78
|
-
var shouldNotRestrictHeight = (smartCardContext === null || smartCardContext === void 0 || (_smartCardContext$val = smartCardContext.value) === null || _smartCardContext$val === void 0 ? void 0 : _smartCardContext$val.shouldControlDataExport) && (0, _platformFeatureFlags.fg)('lp_disable_datasource_table_max_height_restriction');
|
|
76
|
+
(0, _useIsInPDFRender.useIsInPDFRender)() : false;
|
|
79
77
|
var _useDatasourceAnalyti = (0, _analytics.useDatasourceAnalyticsEvents)(),
|
|
80
78
|
fireEvent = _useDatasourceAnalyti.fireEvent;
|
|
81
79
|
var experienceId = (0, _datasourceExperienceId.useDatasourceExperienceId)();
|
|
@@ -201,7 +199,7 @@ var DatasourceTableViewWithoutAnalytics = function DatasourceTableViewWithoutAna
|
|
|
201
199
|
onColumnResize: onColumnResize,
|
|
202
200
|
wrappedColumnKeys: wrappedColumnKeys,
|
|
203
201
|
onWrappedColumnChange: onWrappedColumnChange,
|
|
204
|
-
scrollableContainerHeight:
|
|
202
|
+
scrollableContainerHeight: isInPDFRender ? undefined : (0, _platformFeatureFlags.fg)('lp_enable_datasource-table-view_height_override') ? scrollableContainerHeight : DefaultScrollableContainerHeight,
|
|
205
203
|
extensionKey: extensionKey
|
|
206
204
|
}) : /*#__PURE__*/React.createElement(_emptyState.default, {
|
|
207
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
|
+
};
|
|
@@ -5,7 +5,6 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
5
5
|
import { useCallback, useEffect, useRef } from 'react';
|
|
6
6
|
import { withAnalyticsContext } from '@atlaskit/analytics-next';
|
|
7
7
|
import { IntlMessagesProvider } from '@atlaskit/intl-messages-provider';
|
|
8
|
-
import { useSmartCardContext } from '@atlaskit/link-provider';
|
|
9
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
9
|
import { useDatasourceAnalyticsEvents } from '../../analytics';
|
|
11
10
|
import { componentMetadata } from '../../analytics/constants';
|
|
@@ -16,6 +15,7 @@ import { fetchMessagesForLocale } from '../../common/utils/locale/fetch-messages
|
|
|
16
15
|
import { DatasourceExperienceIdProvider, useDatasourceExperienceId } from '../../contexts/datasource-experience-id';
|
|
17
16
|
import { useDatasourceTableState } from '../../hooks/useDatasourceTableState';
|
|
18
17
|
import { useDeepEffect } from '../../hooks/useDeepEffect';
|
|
18
|
+
import { useIsInPDFRender } from '../../hooks/useIsInPDFRender';
|
|
19
19
|
import i18nEN from '../../i18n/en';
|
|
20
20
|
import { StoreContainer } from '../../state';
|
|
21
21
|
import { ASSETS_LIST_OF_LINKS_DATASOURCE_ID } from '../assets-modal';
|
|
@@ -40,7 +40,6 @@ const DatasourceTableViewWithoutAnalytics = ({
|
|
|
40
40
|
onWrappedColumnChange,
|
|
41
41
|
scrollableContainerHeight = DefaultScrollableContainerHeight
|
|
42
42
|
}) => {
|
|
43
|
-
var _smartCardContext$val;
|
|
44
43
|
const {
|
|
45
44
|
reset,
|
|
46
45
|
status,
|
|
@@ -63,10 +62,9 @@ const DatasourceTableViewWithoutAnalytics = ({
|
|
|
63
62
|
});
|
|
64
63
|
|
|
65
64
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
66
|
-
const
|
|
65
|
+
const isInPDFRender = fg('lp_disable_datasource_table_max_height_restriction') ?
|
|
67
66
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
68
|
-
|
|
69
|
-
const shouldNotRestrictHeight = (smartCardContext === null || smartCardContext === void 0 ? void 0 : (_smartCardContext$val = smartCardContext.value) === null || _smartCardContext$val === void 0 ? void 0 : _smartCardContext$val.shouldControlDataExport) && fg('lp_disable_datasource_table_max_height_restriction');
|
|
67
|
+
useIsInPDFRender() : false;
|
|
70
68
|
const {
|
|
71
69
|
fireEvent
|
|
72
70
|
} = useDatasourceAnalyticsEvents();
|
|
@@ -193,7 +191,7 @@ const DatasourceTableViewWithoutAnalytics = ({
|
|
|
193
191
|
onColumnResize: onColumnResize,
|
|
194
192
|
wrappedColumnKeys: wrappedColumnKeys,
|
|
195
193
|
onWrappedColumnChange: onWrappedColumnChange,
|
|
196
|
-
scrollableContainerHeight:
|
|
194
|
+
scrollableContainerHeight: isInPDFRender ? undefined : fg('lp_enable_datasource-table-view_height_override') ? scrollableContainerHeight : DefaultScrollableContainerHeight,
|
|
197
195
|
extensionKey: extensionKey
|
|
198
196
|
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
199
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
|
+
};
|
|
@@ -5,7 +5,6 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
5
5
|
import { useCallback, useEffect, useRef } from 'react';
|
|
6
6
|
import { withAnalyticsContext } from '@atlaskit/analytics-next';
|
|
7
7
|
import { IntlMessagesProvider } from '@atlaskit/intl-messages-provider';
|
|
8
|
-
import { useSmartCardContext } from '@atlaskit/link-provider';
|
|
9
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
9
|
import { useDatasourceAnalyticsEvents } from '../../analytics';
|
|
11
10
|
import { componentMetadata } from '../../analytics/constants';
|
|
@@ -16,6 +15,7 @@ import { fetchMessagesForLocale } from '../../common/utils/locale/fetch-messages
|
|
|
16
15
|
import { DatasourceExperienceIdProvider, useDatasourceExperienceId } from '../../contexts/datasource-experience-id';
|
|
17
16
|
import { useDatasourceTableState } from '../../hooks/useDatasourceTableState';
|
|
18
17
|
import { useDeepEffect } from '../../hooks/useDeepEffect';
|
|
18
|
+
import { useIsInPDFRender } from '../../hooks/useIsInPDFRender';
|
|
19
19
|
import i18nEN from '../../i18n/en';
|
|
20
20
|
import { StoreContainer } from '../../state';
|
|
21
21
|
import { ASSETS_LIST_OF_LINKS_DATASOURCE_ID } from '../assets-modal';
|
|
@@ -29,7 +29,6 @@ import { TableFooter } from '../table-footer';
|
|
|
29
29
|
var containerStyles = null;
|
|
30
30
|
var DefaultScrollableContainerHeight = 590;
|
|
31
31
|
var DatasourceTableViewWithoutAnalytics = function DatasourceTableViewWithoutAnalytics(_ref) {
|
|
32
|
-
var _smartCardContext$val;
|
|
33
32
|
var datasourceId = _ref.datasourceId,
|
|
34
33
|
parameters = _ref.parameters,
|
|
35
34
|
visibleColumnKeys = _ref.visibleColumnKeys,
|
|
@@ -63,10 +62,9 @@ var DatasourceTableViewWithoutAnalytics = function DatasourceTableViewWithoutAna
|
|
|
63
62
|
authDetails = _useDatasourceTableSt.authDetails;
|
|
64
63
|
|
|
65
64
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
66
|
-
var
|
|
65
|
+
var isInPDFRender = fg('lp_disable_datasource_table_max_height_restriction') ?
|
|
67
66
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
68
|
-
|
|
69
|
-
var shouldNotRestrictHeight = (smartCardContext === null || smartCardContext === void 0 || (_smartCardContext$val = smartCardContext.value) === null || _smartCardContext$val === void 0 ? void 0 : _smartCardContext$val.shouldControlDataExport) && fg('lp_disable_datasource_table_max_height_restriction');
|
|
67
|
+
useIsInPDFRender() : false;
|
|
70
68
|
var _useDatasourceAnalyti = useDatasourceAnalyticsEvents(),
|
|
71
69
|
fireEvent = _useDatasourceAnalyti.fireEvent;
|
|
72
70
|
var experienceId = useDatasourceExperienceId();
|
|
@@ -192,7 +190,7 @@ var DatasourceTableViewWithoutAnalytics = function DatasourceTableViewWithoutAna
|
|
|
192
190
|
onColumnResize: onColumnResize,
|
|
193
191
|
wrappedColumnKeys: wrappedColumnKeys,
|
|
194
192
|
onWrappedColumnChange: onWrappedColumnChange,
|
|
195
|
-
scrollableContainerHeight:
|
|
193
|
+
scrollableContainerHeight: isInPDFRender ? undefined : fg('lp_enable_datasource-table-view_height_override') ? scrollableContainerHeight : DefaultScrollableContainerHeight,
|
|
196
194
|
extensionKey: extensionKey
|
|
197
195
|
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
198
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",
|
|
@@ -80,14 +80,14 @@
|
|
|
80
80
|
"@atlaskit/primitives": "^16.4.0",
|
|
81
81
|
"@atlaskit/react-select": "^3.9.0",
|
|
82
82
|
"@atlaskit/select": "^21.4.0",
|
|
83
|
-
"@atlaskit/smart-card": "^43.
|
|
84
|
-
"@atlaskit/smart-user-picker": "^8.
|
|
83
|
+
"@atlaskit/smart-card": "^43.14.0",
|
|
84
|
+
"@atlaskit/smart-user-picker": "^8.5.0",
|
|
85
85
|
"@atlaskit/spinner": "^19.0.0",
|
|
86
86
|
"@atlaskit/tag": "^14.1.0",
|
|
87
87
|
"@atlaskit/textfield": "^8.1.0",
|
|
88
88
|
"@atlaskit/theme": "^21.0.0",
|
|
89
89
|
"@atlaskit/tokens": "^8.4.0",
|
|
90
|
-
"@atlaskit/tooltip": "^20.
|
|
90
|
+
"@atlaskit/tooltip": "^20.11.0",
|
|
91
91
|
"@atlaskit/ufo": "^0.4.0",
|
|
92
92
|
"@atlaskit/width-detector": "^5.0.0",
|
|
93
93
|
"@babel/runtime": "^7.0.0",
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
"@af/integration-testing": "workspace:^",
|
|
112
112
|
"@af/visual-regression": "workspace:^",
|
|
113
113
|
"@atlaskit/json-ld-types": "^1.4.0",
|
|
114
|
-
"@atlaskit/link-test-helpers": "^
|
|
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",
|