@atlaskit/link-datasource 7.12.0 → 7.12.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
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/link-datasource
|
|
2
2
|
|
|
3
|
+
## 7.12.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`6c40bad082f67`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6c40bad082f67) -
|
|
8
|
+
Clean up feature gate `platform_sllv_duplicated_row`: datasource rows that share an ARI are now
|
|
9
|
+
always deduplicated.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 7.12.1
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [`4d0e8142c81f3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4d0e8142c81f3) -
|
|
17
|
+
Request 100 items per page for Assets datasource tables behind
|
|
18
|
+
`astral_assets_default_page_size_100`.
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 7.12.0
|
|
4
22
|
|
|
5
23
|
### Minor Changes
|
|
@@ -17,6 +17,7 @@ var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
|
17
17
|
var _analytics = require("../analytics");
|
|
18
18
|
var _state = require("../state");
|
|
19
19
|
var _useDiscoverActions2 = require("../state/actions/useDiscoverActions");
|
|
20
|
+
var _assetsModal = require("../ui/assets-modal");
|
|
20
21
|
var _useErrorLogger2 = _interopRequireDefault(require("./useErrorLogger"));
|
|
21
22
|
var _useIsInPDFRender = require("./useIsInPDFRender");
|
|
22
23
|
var INCREASED_DATASOURCE_DATA_PAGE_SIZE = exports.INCREASED_DATASOURCE_DATA_PAGE_SIZE = 100;
|
|
@@ -220,6 +221,7 @@ var useDatasourceTableState = exports.useDatasourceTableState = function useData
|
|
|
220
221
|
_requestInfo$shouldFo,
|
|
221
222
|
shouldForceRequest,
|
|
222
223
|
isFullSchemaLoaded,
|
|
224
|
+
pageSize,
|
|
223
225
|
datasourceDataRequest,
|
|
224
226
|
_currentAbortControll,
|
|
225
227
|
_yield$getDatasourceD3,
|
|
@@ -236,7 +238,6 @@ var useDatasourceTableState = exports.useDatasourceTableState = function useData
|
|
|
236
238
|
nextPageCursor,
|
|
237
239
|
_totalCount,
|
|
238
240
|
schema,
|
|
239
|
-
isDuplicateRowDeduplicationEnabled,
|
|
240
241
|
itemsToAdd,
|
|
241
242
|
integrationKey,
|
|
242
243
|
entityType,
|
|
@@ -268,9 +269,18 @@ var useDatasourceTableState = exports.useDatasourceTableState = function useData
|
|
|
268
269
|
case 1:
|
|
269
270
|
_requestInfo$isSchema = requestInfo.isSchemaFromData, isSchemaFromData = _requestInfo$isSchema === void 0 ? true : _requestInfo$isSchema, shouldRequestFirstPage = requestInfo.shouldRequestFirstPage, _requestInfo$shouldFo = requestInfo.shouldForceRequest, shouldForceRequest = _requestInfo$shouldFo === void 0 ? false : _requestInfo$shouldFo;
|
|
270
271
|
isFullSchemaLoaded = fullSchema.properties.length > 0;
|
|
272
|
+
/*
|
|
273
|
+
Note: The Assets backend currently ignores `pageSize` and always returns 100 items, so we request
|
|
274
|
+
always returns 100 items, so we request 100 explicitly to keep the same behaviour once the backend starts honouring it.
|
|
275
|
+
*/
|
|
276
|
+
if ((0, _fg.fg)('astral_assets_default_page_size_100')) {
|
|
277
|
+
pageSize = isInPDFRender || datasourceId === _assetsModal.ASSETS_LIST_OF_LINKS_DATASOURCE_ID ? INCREASED_DATASOURCE_DATA_PAGE_SIZE : _useDataSourceClientExtension.DEFAULT_GET_DATASOURCE_DATA_PAGE_SIZE;
|
|
278
|
+
} else {
|
|
279
|
+
pageSize = isInPDFRender ? INCREASED_DATASOURCE_DATA_PAGE_SIZE : _useDataSourceClientExtension.DEFAULT_GET_DATASOURCE_DATA_PAGE_SIZE;
|
|
280
|
+
}
|
|
271
281
|
datasourceDataRequest = {
|
|
272
282
|
parameters: parameters,
|
|
273
|
-
pageSize:
|
|
283
|
+
pageSize: pageSize,
|
|
274
284
|
pageCursor: shouldRequestFirstPage ? undefined : nextCursor,
|
|
275
285
|
fields: fieldKeys,
|
|
276
286
|
includeSchema: isFullSchemaLoaded ? false : isSchemaFromData
|
|
@@ -313,11 +323,10 @@ var useDatasourceTableState = exports.useDatasourceTableState = function useData
|
|
|
313
323
|
setDestinationObjectTypes(_destinationObjectTypes);
|
|
314
324
|
setTotalCount(_totalCount);
|
|
315
325
|
setNextCursor(nextPageCursor);
|
|
316
|
-
|
|
317
|
-
if (shouldRequestFirstPage && isDuplicateRowDeduplicationEnabled) {
|
|
326
|
+
if (shouldRequestFirstPage) {
|
|
318
327
|
responseItemAris.current.clear();
|
|
319
328
|
}
|
|
320
|
-
itemsToAdd =
|
|
329
|
+
itemsToAdd = items.filter(function (item) {
|
|
321
330
|
var _item$ari;
|
|
322
331
|
var ari = (_item$ari = item.ari) === null || _item$ari === void 0 ? void 0 : _item$ari.data;
|
|
323
332
|
if (typeof ari !== 'string') {
|
|
@@ -328,7 +337,7 @@ var useDatasourceTableState = exports.useDatasourceTableState = function useData
|
|
|
328
337
|
}
|
|
329
338
|
responseItemAris.current.add(ari);
|
|
330
339
|
return true;
|
|
331
|
-
})
|
|
340
|
+
});
|
|
332
341
|
setResponseItems(function (currentResponseItems) {
|
|
333
342
|
if (shouldRequestFirstPage) {
|
|
334
343
|
return itemsToAdd;
|
|
@@ -346,7 +355,7 @@ var useDatasourceTableState = exports.useDatasourceTableState = function useData
|
|
|
346
355
|
entityType = objectTypesEntity;
|
|
347
356
|
newIds = onAddItems(itemsToAdd, typeof integrationKey === 'string' ? integrationKey : undefined, entityType);
|
|
348
357
|
setResponseItemIds(function (currentIds) {
|
|
349
|
-
return
|
|
358
|
+
return shouldRequestFirstPage ? newIds : [].concat((0, _toConsumableArray2.default)(currentIds), (0, _toConsumableArray2.default)(newIds));
|
|
350
359
|
});
|
|
351
360
|
if (!(0, _isFedramp.isFedRamp)()) {
|
|
352
361
|
if (typeof integrationKey === 'string') {
|
|
@@ -6,6 +6,7 @@ import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
|
6
6
|
import { useDatasourceAnalyticsEvents } from '../analytics';
|
|
7
7
|
import { useDatasourceActions } from '../state';
|
|
8
8
|
import { useDiscoverActions } from '../state/actions/useDiscoverActions';
|
|
9
|
+
import { ASSETS_LIST_OF_LINKS_DATASOURCE_ID } from '../ui/assets-modal';
|
|
9
10
|
import useErrorLogger from './useErrorLogger';
|
|
10
11
|
import { useIsInPDFRender } from './useIsInPDFRender';
|
|
11
12
|
export const INCREASED_DATASOURCE_DATA_PAGE_SIZE = 100;
|
|
@@ -150,9 +151,19 @@ export const useDatasourceTableState = ({
|
|
|
150
151
|
shouldForceRequest = false
|
|
151
152
|
} = requestInfo;
|
|
152
153
|
const isFullSchemaLoaded = fullSchema.properties.length > 0;
|
|
154
|
+
let pageSize;
|
|
155
|
+
/*
|
|
156
|
+
Note: The Assets backend currently ignores `pageSize` and always returns 100 items, so we request
|
|
157
|
+
always returns 100 items, so we request 100 explicitly to keep the same behaviour once the backend starts honouring it.
|
|
158
|
+
*/
|
|
159
|
+
if (fg('astral_assets_default_page_size_100')) {
|
|
160
|
+
pageSize = isInPDFRender || datasourceId === ASSETS_LIST_OF_LINKS_DATASOURCE_ID ? INCREASED_DATASOURCE_DATA_PAGE_SIZE : DEFAULT_GET_DATASOURCE_DATA_PAGE_SIZE;
|
|
161
|
+
} else {
|
|
162
|
+
pageSize = isInPDFRender ? INCREASED_DATASOURCE_DATA_PAGE_SIZE : DEFAULT_GET_DATASOURCE_DATA_PAGE_SIZE;
|
|
163
|
+
}
|
|
153
164
|
const datasourceDataRequest = {
|
|
154
165
|
parameters,
|
|
155
|
-
pageSize
|
|
166
|
+
pageSize,
|
|
156
167
|
pageCursor: shouldRequestFirstPage ? undefined : nextCursor,
|
|
157
168
|
fields: fieldKeys,
|
|
158
169
|
includeSchema: isFullSchemaLoaded ? false : isSchemaFromData
|
|
@@ -194,11 +205,10 @@ export const useDatasourceTableState = ({
|
|
|
194
205
|
setDestinationObjectTypes(destinationObjectTypes);
|
|
195
206
|
setTotalCount(totalCount);
|
|
196
207
|
setNextCursor(nextPageCursor);
|
|
197
|
-
|
|
198
|
-
if (shouldRequestFirstPage && isDuplicateRowDeduplicationEnabled) {
|
|
208
|
+
if (shouldRequestFirstPage) {
|
|
199
209
|
responseItemAris.current.clear();
|
|
200
210
|
}
|
|
201
|
-
const itemsToAdd =
|
|
211
|
+
const itemsToAdd = items.filter(item => {
|
|
202
212
|
var _item$ari;
|
|
203
213
|
const ari = (_item$ari = item.ari) === null || _item$ari === void 0 ? void 0 : _item$ari.data;
|
|
204
214
|
if (typeof ari !== 'string') {
|
|
@@ -209,7 +219,7 @@ export const useDatasourceTableState = ({
|
|
|
209
219
|
}
|
|
210
220
|
responseItemAris.current.add(ari);
|
|
211
221
|
return true;
|
|
212
|
-
})
|
|
222
|
+
});
|
|
213
223
|
setResponseItems(currentResponseItems => {
|
|
214
224
|
if (shouldRequestFirstPage) {
|
|
215
225
|
return itemsToAdd;
|
|
@@ -227,7 +237,7 @@ export const useDatasourceTableState = ({
|
|
|
227
237
|
*/
|
|
228
238
|
const entityType = objectTypesEntity;
|
|
229
239
|
const newIds = onAddItems(itemsToAdd, typeof integrationKey === 'string' ? integrationKey : undefined, entityType);
|
|
230
|
-
setResponseItemIds(currentIds =>
|
|
240
|
+
setResponseItemIds(currentIds => shouldRequestFirstPage ? newIds : [...currentIds, ...newIds]);
|
|
231
241
|
if (!isFedRamp()) {
|
|
232
242
|
if (typeof integrationKey === 'string') {
|
|
233
243
|
const aris = itemsToAdd.reduce((acc, item) => {
|
|
@@ -10,6 +10,7 @@ import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
|
10
10
|
import { useDatasourceAnalyticsEvents } from '../analytics';
|
|
11
11
|
import { useDatasourceActions } from '../state';
|
|
12
12
|
import { useDiscoverActions } from '../state/actions/useDiscoverActions';
|
|
13
|
+
import { ASSETS_LIST_OF_LINKS_DATASOURCE_ID } from '../ui/assets-modal';
|
|
13
14
|
import useErrorLogger from './useErrorLogger';
|
|
14
15
|
import { useIsInPDFRender } from './useIsInPDFRender';
|
|
15
16
|
export var INCREASED_DATASOURCE_DATA_PAGE_SIZE = 100;
|
|
@@ -213,6 +214,7 @@ export var useDatasourceTableState = function useDatasourceTableState(_ref) {
|
|
|
213
214
|
_requestInfo$shouldFo,
|
|
214
215
|
shouldForceRequest,
|
|
215
216
|
isFullSchemaLoaded,
|
|
217
|
+
pageSize,
|
|
216
218
|
datasourceDataRequest,
|
|
217
219
|
_currentAbortControll,
|
|
218
220
|
_yield$getDatasourceD3,
|
|
@@ -229,7 +231,6 @@ export var useDatasourceTableState = function useDatasourceTableState(_ref) {
|
|
|
229
231
|
nextPageCursor,
|
|
230
232
|
_totalCount,
|
|
231
233
|
schema,
|
|
232
|
-
isDuplicateRowDeduplicationEnabled,
|
|
233
234
|
itemsToAdd,
|
|
234
235
|
integrationKey,
|
|
235
236
|
entityType,
|
|
@@ -261,9 +262,18 @@ export var useDatasourceTableState = function useDatasourceTableState(_ref) {
|
|
|
261
262
|
case 1:
|
|
262
263
|
_requestInfo$isSchema = requestInfo.isSchemaFromData, isSchemaFromData = _requestInfo$isSchema === void 0 ? true : _requestInfo$isSchema, shouldRequestFirstPage = requestInfo.shouldRequestFirstPage, _requestInfo$shouldFo = requestInfo.shouldForceRequest, shouldForceRequest = _requestInfo$shouldFo === void 0 ? false : _requestInfo$shouldFo;
|
|
263
264
|
isFullSchemaLoaded = fullSchema.properties.length > 0;
|
|
265
|
+
/*
|
|
266
|
+
Note: The Assets backend currently ignores `pageSize` and always returns 100 items, so we request
|
|
267
|
+
always returns 100 items, so we request 100 explicitly to keep the same behaviour once the backend starts honouring it.
|
|
268
|
+
*/
|
|
269
|
+
if (fg('astral_assets_default_page_size_100')) {
|
|
270
|
+
pageSize = isInPDFRender || datasourceId === ASSETS_LIST_OF_LINKS_DATASOURCE_ID ? INCREASED_DATASOURCE_DATA_PAGE_SIZE : DEFAULT_GET_DATASOURCE_DATA_PAGE_SIZE;
|
|
271
|
+
} else {
|
|
272
|
+
pageSize = isInPDFRender ? INCREASED_DATASOURCE_DATA_PAGE_SIZE : DEFAULT_GET_DATASOURCE_DATA_PAGE_SIZE;
|
|
273
|
+
}
|
|
264
274
|
datasourceDataRequest = {
|
|
265
275
|
parameters: parameters,
|
|
266
|
-
pageSize:
|
|
276
|
+
pageSize: pageSize,
|
|
267
277
|
pageCursor: shouldRequestFirstPage ? undefined : nextCursor,
|
|
268
278
|
fields: fieldKeys,
|
|
269
279
|
includeSchema: isFullSchemaLoaded ? false : isSchemaFromData
|
|
@@ -306,11 +316,10 @@ export var useDatasourceTableState = function useDatasourceTableState(_ref) {
|
|
|
306
316
|
setDestinationObjectTypes(_destinationObjectTypes);
|
|
307
317
|
setTotalCount(_totalCount);
|
|
308
318
|
setNextCursor(nextPageCursor);
|
|
309
|
-
|
|
310
|
-
if (shouldRequestFirstPage && isDuplicateRowDeduplicationEnabled) {
|
|
319
|
+
if (shouldRequestFirstPage) {
|
|
311
320
|
responseItemAris.current.clear();
|
|
312
321
|
}
|
|
313
|
-
itemsToAdd =
|
|
322
|
+
itemsToAdd = items.filter(function (item) {
|
|
314
323
|
var _item$ari;
|
|
315
324
|
var ari = (_item$ari = item.ari) === null || _item$ari === void 0 ? void 0 : _item$ari.data;
|
|
316
325
|
if (typeof ari !== 'string') {
|
|
@@ -321,7 +330,7 @@ export var useDatasourceTableState = function useDatasourceTableState(_ref) {
|
|
|
321
330
|
}
|
|
322
331
|
responseItemAris.current.add(ari);
|
|
323
332
|
return true;
|
|
324
|
-
})
|
|
333
|
+
});
|
|
325
334
|
setResponseItems(function (currentResponseItems) {
|
|
326
335
|
if (shouldRequestFirstPage) {
|
|
327
336
|
return itemsToAdd;
|
|
@@ -339,7 +348,7 @@ export var useDatasourceTableState = function useDatasourceTableState(_ref) {
|
|
|
339
348
|
entityType = objectTypesEntity;
|
|
340
349
|
newIds = onAddItems(itemsToAdd, typeof integrationKey === 'string' ? integrationKey : undefined, entityType);
|
|
341
350
|
setResponseItemIds(function (currentIds) {
|
|
342
|
-
return
|
|
351
|
+
return shouldRequestFirstPage ? newIds : [].concat(_toConsumableArray(currentIds), _toConsumableArray(newIds));
|
|
343
352
|
});
|
|
344
353
|
if (!isFedRamp()) {
|
|
345
354
|
if (typeof integrationKey === 'string') {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-datasource",
|
|
3
|
-
"version": "7.12.
|
|
3
|
+
"version": "7.12.2",
|
|
4
4
|
"description": "UI Components to support linking platform dataset feature",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@atlaskit/analytics-cross-product": "^2.3.0",
|
|
44
44
|
"@atlaskit/analytics-next": "^12.6.0",
|
|
45
45
|
"@atlaskit/atlassian-context": "^2.0.0",
|
|
46
|
-
"@atlaskit/avatar": "^30.
|
|
46
|
+
"@atlaskit/avatar": "^30.1.0",
|
|
47
47
|
"@atlaskit/avatar-group": "^14.4.0",
|
|
48
48
|
"@atlaskit/badge": "^22.0.0",
|
|
49
49
|
"@atlaskit/button": "^25.7.0",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"@atlaskit/heading": "^8.0.0",
|
|
60
60
|
"@atlaskit/icon": "^38.0.0",
|
|
61
61
|
"@atlaskit/image": "^5.2.0",
|
|
62
|
-
"@atlaskit/inline-edit": "^16.
|
|
62
|
+
"@atlaskit/inline-edit": "^16.5.0",
|
|
63
63
|
"@atlaskit/intl-messages-provider": "^5.0.0",
|
|
64
64
|
"@atlaskit/jql-ast": "^4.2.0",
|
|
65
65
|
"@atlaskit/jql-editor": "^8.5.0",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"@atlaskit/layering": "^6.1.0",
|
|
68
68
|
"@atlaskit/link": "^5.1.0",
|
|
69
69
|
"@atlaskit/link-client-extension": "^8.0.0",
|
|
70
|
-
"@atlaskit/link-provider": "^6.
|
|
70
|
+
"@atlaskit/link-provider": "^6.1.0",
|
|
71
71
|
"@atlaskit/linking-common": "^13.0.0",
|
|
72
72
|
"@atlaskit/linking-types": "^16.1.0",
|
|
73
73
|
"@atlaskit/logo": "^23.3.0",
|
|
@@ -170,15 +170,15 @@
|
|
|
170
170
|
"platform_lp_sllv_on_request_settled": {
|
|
171
171
|
"type": "boolean"
|
|
172
172
|
},
|
|
173
|
-
"platform_sllv_duplicated_row": {
|
|
174
|
-
"type": "boolean"
|
|
175
|
-
},
|
|
176
173
|
"astral_units_workspace_host_resolver": {
|
|
177
174
|
"type": "boolean"
|
|
178
175
|
},
|
|
179
176
|
"platform_lp_sllv_assets_default_schema_aql": {
|
|
180
177
|
"type": "boolean"
|
|
181
178
|
},
|
|
179
|
+
"astral_assets_default_page_size_100": {
|
|
180
|
+
"type": "boolean"
|
|
181
|
+
},
|
|
182
182
|
"astral_assets_macro_table_ui_uplift": {
|
|
183
183
|
"type": "boolean"
|
|
184
184
|
},
|