@atlaskit/link-datasource 7.8.1 → 7.8.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,13 @@
|
|
|
1
1
|
# @atlaskit/link-datasource
|
|
2
2
|
|
|
3
|
+
## 7.8.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`1a4bf8ba80113`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1a4bf8ba80113) -
|
|
8
|
+
Remove the `platform_lp_sllv_preserve_assets_columns` feature gate and permanently preserve
|
|
9
|
+
selected Assets columns when editing AQL within the same object schema.
|
|
10
|
+
|
|
3
11
|
## 7.8.1
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -165,7 +165,7 @@ var PlainAssetsConfigModal = function PlainAssetsConfigModal(props) {
|
|
|
165
165
|
// newly selected ones - refetching for them, and throwing away the results just received. The
|
|
166
166
|
// re-render this schedules is discarded before commit, so the hook only ever sees the reconciled
|
|
167
167
|
// selection.
|
|
168
|
-
if (
|
|
168
|
+
if (hasPreservedColumns && status === 'resolved' && columns.length > 0) {
|
|
169
169
|
var availableKeys = new Set(columns.map(function (_ref) {
|
|
170
170
|
var key = _ref.key;
|
|
171
171
|
return key;
|
|
@@ -241,7 +241,7 @@ var PlainAssetsConfigModal = function PlainAssetsConfigModal(props) {
|
|
|
241
241
|
}, []);
|
|
242
242
|
(0, _react.useEffect)(function () {
|
|
243
243
|
// A preserved selection owns the columns, so restoring the saved or default ones would undo it
|
|
244
|
-
if (
|
|
244
|
+
if (hasPreservedColumns) {
|
|
245
245
|
return;
|
|
246
246
|
}
|
|
247
247
|
var newVisibleColumnKeys = initialVisibleColumnKeys && initialVisibleColumnKeys.length > 0 && apiVersion === VERSION_TWO ? initialVisibleColumnKeys : defaultVisibleColumnKeys;
|
|
@@ -251,7 +251,7 @@ var PlainAssetsConfigModal = function PlainAssetsConfigModal(props) {
|
|
|
251
251
|
// The response described none of the requested fields, so there is nothing valid to keep and
|
|
252
252
|
// no reported defaults to fall back to. Give up preserving and re-request the schema's own
|
|
253
253
|
// defaults. This one has to stay an effect because it issues a request.
|
|
254
|
-
if (!
|
|
254
|
+
if (!hasPreservedColumns || status !== 'resolved' || columns.length > 0) {
|
|
255
255
|
return;
|
|
256
256
|
}
|
|
257
257
|
setHasPreservedColumns(false);
|
|
@@ -339,7 +339,7 @@ var PlainAssetsConfigModal = function PlainAssetsConfigModal(props) {
|
|
|
339
339
|
}
|
|
340
340
|
// An empty selection has nothing worth preserving, and keeping it would stop the
|
|
341
341
|
// response's defaults from being adopted
|
|
342
|
-
var shouldPreserveColumns =
|
|
342
|
+
var shouldPreserveColumns = schemaId === searchSchemaId && (visibleColumnKeys !== null && visibleColumnKeys !== void 0 ? visibleColumnKeys : []).length > 0;
|
|
343
343
|
setHasPreservedColumns(shouldPreserveColumns);
|
|
344
344
|
setAql(searchAql);
|
|
345
345
|
setSchemaId(searchSchemaId);
|
|
@@ -135,7 +135,7 @@ const PlainAssetsConfigModal = props => {
|
|
|
135
135
|
// newly selected ones - refetching for them, and throwing away the results just received. The
|
|
136
136
|
// re-render this schedules is discarded before commit, so the hook only ever sees the reconciled
|
|
137
137
|
// selection.
|
|
138
|
-
if (
|
|
138
|
+
if (hasPreservedColumns && status === 'resolved' && columns.length > 0) {
|
|
139
139
|
const availableKeys = new Set(columns.map(({
|
|
140
140
|
key
|
|
141
141
|
}) => key));
|
|
@@ -209,7 +209,7 @@ const PlainAssetsConfigModal = props => {
|
|
|
209
209
|
}, []);
|
|
210
210
|
useEffect(() => {
|
|
211
211
|
// A preserved selection owns the columns, so restoring the saved or default ones would undo it
|
|
212
|
-
if (
|
|
212
|
+
if (hasPreservedColumns) {
|
|
213
213
|
return;
|
|
214
214
|
}
|
|
215
215
|
const newVisibleColumnKeys = initialVisibleColumnKeys && initialVisibleColumnKeys.length > 0 && apiVersion === VERSION_TWO ? initialVisibleColumnKeys : defaultVisibleColumnKeys;
|
|
@@ -219,7 +219,7 @@ const PlainAssetsConfigModal = props => {
|
|
|
219
219
|
// The response described none of the requested fields, so there is nothing valid to keep and
|
|
220
220
|
// no reported defaults to fall back to. Give up preserving and re-request the schema's own
|
|
221
221
|
// defaults. This one has to stay an effect because it issues a request.
|
|
222
|
-
if (!
|
|
222
|
+
if (!hasPreservedColumns || status !== 'resolved' || columns.length > 0) {
|
|
223
223
|
return;
|
|
224
224
|
}
|
|
225
225
|
setHasPreservedColumns(false);
|
|
@@ -305,7 +305,7 @@ const PlainAssetsConfigModal = props => {
|
|
|
305
305
|
}
|
|
306
306
|
// An empty selection has nothing worth preserving, and keeping it would stop the
|
|
307
307
|
// response's defaults from being adopted
|
|
308
|
-
const shouldPreserveColumns =
|
|
308
|
+
const shouldPreserveColumns = schemaId === searchSchemaId && (visibleColumnKeys !== null && visibleColumnKeys !== void 0 ? visibleColumnKeys : []).length > 0;
|
|
309
309
|
setHasPreservedColumns(shouldPreserveColumns);
|
|
310
310
|
setAql(searchAql);
|
|
311
311
|
setSchemaId(searchSchemaId);
|
|
@@ -157,7 +157,7 @@ var PlainAssetsConfigModal = function PlainAssetsConfigModal(props) {
|
|
|
157
157
|
// newly selected ones - refetching for them, and throwing away the results just received. The
|
|
158
158
|
// re-render this schedules is discarded before commit, so the hook only ever sees the reconciled
|
|
159
159
|
// selection.
|
|
160
|
-
if (
|
|
160
|
+
if (hasPreservedColumns && status === 'resolved' && columns.length > 0) {
|
|
161
161
|
var availableKeys = new Set(columns.map(function (_ref) {
|
|
162
162
|
var key = _ref.key;
|
|
163
163
|
return key;
|
|
@@ -233,7 +233,7 @@ var PlainAssetsConfigModal = function PlainAssetsConfigModal(props) {
|
|
|
233
233
|
}, []);
|
|
234
234
|
useEffect(function () {
|
|
235
235
|
// A preserved selection owns the columns, so restoring the saved or default ones would undo it
|
|
236
|
-
if (
|
|
236
|
+
if (hasPreservedColumns) {
|
|
237
237
|
return;
|
|
238
238
|
}
|
|
239
239
|
var newVisibleColumnKeys = initialVisibleColumnKeys && initialVisibleColumnKeys.length > 0 && apiVersion === VERSION_TWO ? initialVisibleColumnKeys : defaultVisibleColumnKeys;
|
|
@@ -243,7 +243,7 @@ var PlainAssetsConfigModal = function PlainAssetsConfigModal(props) {
|
|
|
243
243
|
// The response described none of the requested fields, so there is nothing valid to keep and
|
|
244
244
|
// no reported defaults to fall back to. Give up preserving and re-request the schema's own
|
|
245
245
|
// defaults. This one has to stay an effect because it issues a request.
|
|
246
|
-
if (!
|
|
246
|
+
if (!hasPreservedColumns || status !== 'resolved' || columns.length > 0) {
|
|
247
247
|
return;
|
|
248
248
|
}
|
|
249
249
|
setHasPreservedColumns(false);
|
|
@@ -331,7 +331,7 @@ var PlainAssetsConfigModal = function PlainAssetsConfigModal(props) {
|
|
|
331
331
|
}
|
|
332
332
|
// An empty selection has nothing worth preserving, and keeping it would stop the
|
|
333
333
|
// response's defaults from being adopted
|
|
334
|
-
var shouldPreserveColumns =
|
|
334
|
+
var shouldPreserveColumns = schemaId === searchSchemaId && (visibleColumnKeys !== null && visibleColumnKeys !== void 0 ? visibleColumnKeys : []).length > 0;
|
|
335
335
|
setHasPreservedColumns(shouldPreserveColumns);
|
|
336
336
|
setAql(searchAql);
|
|
337
337
|
setSchemaId(searchSchemaId);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-datasource",
|
|
3
|
-
"version": "7.8.
|
|
3
|
+
"version": "7.8.2",
|
|
4
4
|
"description": "UI Components to support linking platform dataset feature",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@atlaskit/dropdown-menu": "^21.0.0",
|
|
54
54
|
"@atlaskit/editor-prosemirror": "^9.0.0",
|
|
55
55
|
"@atlaskit/empty-state": "^12.2.0",
|
|
56
|
-
"@atlaskit/feature-gate-js-client": "^7.
|
|
56
|
+
"@atlaskit/feature-gate-js-client": "^7.1.0",
|
|
57
57
|
"@atlaskit/flag": "^19.0.0",
|
|
58
58
|
"@atlaskit/form": "^18.3.0",
|
|
59
59
|
"@atlaskit/heading": "^8.0.0",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"@atlaskit/tooltip": "^24.4.0",
|
|
99
99
|
"@atlaskit/top-layer": "^7.0.0",
|
|
100
100
|
"@atlaskit/ufo": "^2.0.0",
|
|
101
|
-
"@atlaskit/user-picker": "^14.
|
|
101
|
+
"@atlaskit/user-picker": "^14.4.0",
|
|
102
102
|
"@atlaskit/visually-hidden": "^4.4.0",
|
|
103
103
|
"@atlaskit/width-detector": "^7.2.0",
|
|
104
104
|
"@babel/runtime": "^7.0.0",
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
"@atlaskit/link-test-helpers": "^11.2.0",
|
|
128
128
|
"@atlaskit/radio": "^10.2.0",
|
|
129
129
|
"@atlaskit/ssr": "workspace:^",
|
|
130
|
-
"@atlaskit/textarea": "^10.
|
|
130
|
+
"@atlaskit/textarea": "^10.3.0",
|
|
131
131
|
"@atlassian/a11y-jest-testing": "^0.17.0",
|
|
132
132
|
"@atlassian/a11y-playwright-testing": "^0.13.0",
|
|
133
133
|
"@atlassian/experiment-test-utils": "^0.2.0",
|
|
@@ -166,9 +166,6 @@
|
|
|
166
166
|
"linking_platform_link_datasource_unit_compliant": {
|
|
167
167
|
"type": "boolean"
|
|
168
168
|
},
|
|
169
|
-
"platform_lp_sllv_preserve_assets_columns": {
|
|
170
|
-
"type": "boolean"
|
|
171
|
-
},
|
|
172
169
|
"platform_lp_sllv_on_request_settled": {
|
|
173
170
|
"type": "boolean"
|
|
174
171
|
},
|