@atlaskit/link-datasource 5.6.3 → 5.6.6
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 +21 -0
- package/dist/cjs/hooks/useDatasourceTableState.js +2 -14
- package/dist/cjs/ui/datasource-table-view/datasourceTableView.js +1 -14
- package/dist/es2019/hooks/useDatasourceTableState.js +2 -12
- package/dist/es2019/ui/datasource-table-view/datasourceTableView.js +1 -10
- package/dist/esm/hooks/useDatasourceTableState.js +2 -14
- package/dist/esm/ui/datasource-table-view/datasourceTableView.js +1 -14
- package/package.json +13 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @atlaskit/link-datasource
|
|
2
2
|
|
|
3
|
+
## 5.6.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`0da2911694dd8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0da2911694dd8) -
|
|
8
|
+
Cleanup the temporary SLLV column fallback workaround that was previously gated behind the
|
|
9
|
+
`fallback_to_default_columns_to_display_in_sllv` feature gate.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 5.6.5
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
18
|
+
## 5.6.4
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
|
|
3
24
|
## 5.6.3
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
|
@@ -13,7 +13,6 @@ 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");
|
|
17
16
|
var _analytics = require("../analytics");
|
|
18
17
|
var _state = require("../state");
|
|
19
18
|
var _actions = require("../state/actions");
|
|
@@ -187,14 +186,6 @@ var useDatasourceTableState = exports.useDatasourceTableState = function useData
|
|
|
187
186
|
});
|
|
188
187
|
}
|
|
189
188
|
|
|
190
|
-
// Fallback to schema.defaultProperties when stored fieldKeys don't overlap with the response schema.
|
|
191
|
-
var useFallback = fieldKeys.length > 0 && propertiesToBeUsed.length === 0 && properties.length > 0 && (0, _platformFeatureFlags.fg)('fallback_to_default_columns_to_display_in_sllv');
|
|
192
|
-
if (useFallback) {
|
|
193
|
-
propertiesToBeUsed = properties.filter(function (property) {
|
|
194
|
-
return defaultProperties.includes(property.key);
|
|
195
|
-
});
|
|
196
|
-
}
|
|
197
|
-
|
|
198
189
|
/*Jira adds identifier fields like id and key to all data responses
|
|
199
190
|
Since defaultProperties already send back the keyField, we are accounting only
|
|
200
191
|
for the idField when we are using defaultProperties
|
|
@@ -214,11 +205,8 @@ var useDatasourceTableState = exports.useDatasourceTableState = function useData
|
|
|
214
205
|
if (!(0, _isEqual.default)(defaultVisibleColumnKeys, newProperties)) {
|
|
215
206
|
setDefaultVisibleColumnKeys(newProperties);
|
|
216
207
|
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
var nextLastRequestedFieldKeys = useFallback ? fieldKeys : newProperties;
|
|
220
|
-
if (!(0, _isEqual.default)(lastRequestedFieldKeys, nextLastRequestedFieldKeys)) {
|
|
221
|
-
setLastRequestedFieldKeys(nextLastRequestedFieldKeys);
|
|
208
|
+
if (!(0, _isEqual.default)(lastRequestedFieldKeys, newProperties)) {
|
|
209
|
+
setLastRequestedFieldKeys(newProperties);
|
|
222
210
|
}
|
|
223
211
|
}, [columns, defaultVisibleColumnKeys, lastRequestedFieldKeys]);
|
|
224
212
|
var onNextPage = (0, _react.useCallback)( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
@@ -114,19 +114,6 @@ var DatasourceTableViewWithoutAnalytics = function DatasourceTableViewWithoutAna
|
|
|
114
114
|
var isDataReady = hasColumns && responseItems.length > 0 && totalCount && totalCount > 0;
|
|
115
115
|
visibleColumnCount.current = (visibleColumnKeys === null || visibleColumnKeys === void 0 ? void 0 : visibleColumnKeys.length) || 0;
|
|
116
116
|
|
|
117
|
-
// SLLV bug fix: This check exists because of JIM to SLLV conversion job
|
|
118
|
-
// which misconfigured the customfield mapping (stored name instead of ID) when converted to SLLV.
|
|
119
|
-
// Ideally, BE API should support both customfield name as well as ID.
|
|
120
|
-
// stored visibleColumnKeys (e.g. customfield names) may not match the
|
|
121
|
-
// resolved columns (e.g. customfield ids) returned by the API. When that happens the table
|
|
122
|
-
// would otherwise stay on the loading skeleton forever, so we render with defaultVisibleColumnKeys
|
|
123
|
-
// instead.
|
|
124
|
-
var hasStaleVisibleColumnKeys = (visibleColumnKeys || []).length > 0 && columns.length > 0 && !(visibleColumnKeys || []).some(function (key) {
|
|
125
|
-
return columns.some(function (col) {
|
|
126
|
-
return col.key === key;
|
|
127
|
-
});
|
|
128
|
-
}) && (0, _platformFeatureFlags.fg)('fallback_to_default_columns_to_display_in_sllv');
|
|
129
|
-
|
|
130
117
|
// parameters is an object that we want to track, and when something inside it changes we want to
|
|
131
118
|
// call effect callback. Normal useEffect will not do deep comparison, but only reference one.
|
|
132
119
|
// This hook will do deep comparison making sure we don't call reset() when only reference to an object
|
|
@@ -236,7 +223,7 @@ var DatasourceTableViewWithoutAnalytics = function DatasourceTableViewWithoutAna
|
|
|
236
223
|
onLoadDatasourceDetails: loadDatasourceDetails,
|
|
237
224
|
status: status,
|
|
238
225
|
columns: columns,
|
|
239
|
-
visibleColumnKeys:
|
|
226
|
+
visibleColumnKeys: visibleColumnKeys || defaultVisibleColumnKeys,
|
|
240
227
|
onVisibleColumnKeysChange: onVisibleColumnKeysChange,
|
|
241
228
|
columnCustomSizes: columnCustomSizes,
|
|
242
229
|
onColumnResize: onColumnResize
|
|
@@ -2,7 +2,6 @@ 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';
|
|
6
5
|
import { useDatasourceAnalyticsEvents } from '../analytics';
|
|
7
6
|
import { useDatasourceActions } from '../state';
|
|
8
7
|
import { useDiscoverActions } from '../state/actions';
|
|
@@ -108,12 +107,6 @@ export const useDatasourceTableState = ({
|
|
|
108
107
|
});
|
|
109
108
|
}
|
|
110
109
|
|
|
111
|
-
// Fallback to schema.defaultProperties when stored fieldKeys don't overlap with the response schema.
|
|
112
|
-
const useFallback = fieldKeys.length > 0 && propertiesToBeUsed.length === 0 && properties.length > 0 && fg('fallback_to_default_columns_to_display_in_sllv');
|
|
113
|
-
if (useFallback) {
|
|
114
|
-
propertiesToBeUsed = properties.filter(property => defaultProperties.includes(property.key));
|
|
115
|
-
}
|
|
116
|
-
|
|
117
110
|
/*Jira adds identifier fields like id and key to all data responses
|
|
118
111
|
Since defaultProperties already send back the keyField, we are accounting only
|
|
119
112
|
for the idField when we are using defaultProperties
|
|
@@ -131,11 +124,8 @@ export const useDatasourceTableState = ({
|
|
|
131
124
|
if (!isEqual(defaultVisibleColumnKeys, newProperties)) {
|
|
132
125
|
setDefaultVisibleColumnKeys(newProperties);
|
|
133
126
|
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
const nextLastRequestedFieldKeys = useFallback ? fieldKeys : newProperties;
|
|
137
|
-
if (!isEqual(lastRequestedFieldKeys, nextLastRequestedFieldKeys)) {
|
|
138
|
-
setLastRequestedFieldKeys(nextLastRequestedFieldKeys);
|
|
127
|
+
if (!isEqual(lastRequestedFieldKeys, newProperties)) {
|
|
128
|
+
setLastRequestedFieldKeys(newProperties);
|
|
139
129
|
}
|
|
140
130
|
}, [columns, defaultVisibleColumnKeys, lastRequestedFieldKeys]);
|
|
141
131
|
const onNextPage = useCallback(async (requestInfo = {}) => {
|
|
@@ -99,15 +99,6 @@ const DatasourceTableViewWithoutAnalytics = ({
|
|
|
99
99
|
const isDataReady = hasColumns && responseItems.length > 0 && totalCount && totalCount > 0;
|
|
100
100
|
visibleColumnCount.current = (visibleColumnKeys === null || visibleColumnKeys === void 0 ? void 0 : visibleColumnKeys.length) || 0;
|
|
101
101
|
|
|
102
|
-
// SLLV bug fix: This check exists because of JIM to SLLV conversion job
|
|
103
|
-
// which misconfigured the customfield mapping (stored name instead of ID) when converted to SLLV.
|
|
104
|
-
// Ideally, BE API should support both customfield name as well as ID.
|
|
105
|
-
// stored visibleColumnKeys (e.g. customfield names) may not match the
|
|
106
|
-
// resolved columns (e.g. customfield ids) returned by the API. When that happens the table
|
|
107
|
-
// would otherwise stay on the loading skeleton forever, so we render with defaultVisibleColumnKeys
|
|
108
|
-
// instead.
|
|
109
|
-
const hasStaleVisibleColumnKeys = (visibleColumnKeys || []).length > 0 && columns.length > 0 && !(visibleColumnKeys || []).some(key => columns.some(col => col.key === key)) && fg('fallback_to_default_columns_to_display_in_sllv');
|
|
110
|
-
|
|
111
102
|
// parameters is an object that we want to track, and when something inside it changes we want to
|
|
112
103
|
// call effect callback. Normal useEffect will not do deep comparison, but only reference one.
|
|
113
104
|
// This hook will do deep comparison making sure we don't call reset() when only reference to an object
|
|
@@ -217,7 +208,7 @@ const DatasourceTableViewWithoutAnalytics = ({
|
|
|
217
208
|
onLoadDatasourceDetails: loadDatasourceDetails,
|
|
218
209
|
status: status,
|
|
219
210
|
columns: columns,
|
|
220
|
-
visibleColumnKeys:
|
|
211
|
+
visibleColumnKeys: visibleColumnKeys || defaultVisibleColumnKeys,
|
|
221
212
|
onVisibleColumnKeysChange: onVisibleColumnKeysChange,
|
|
222
213
|
columnCustomSizes: columnCustomSizes,
|
|
223
214
|
onColumnResize: onColumnResize
|
|
@@ -6,7 +6,6 @@ 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';
|
|
10
9
|
import { useDatasourceAnalyticsEvents } from '../analytics';
|
|
11
10
|
import { useDatasourceActions } from '../state';
|
|
12
11
|
import { useDiscoverActions } from '../state/actions';
|
|
@@ -180,14 +179,6 @@ export var useDatasourceTableState = function useDatasourceTableState(_ref) {
|
|
|
180
179
|
});
|
|
181
180
|
}
|
|
182
181
|
|
|
183
|
-
// Fallback to schema.defaultProperties when stored fieldKeys don't overlap with the response schema.
|
|
184
|
-
var useFallback = fieldKeys.length > 0 && propertiesToBeUsed.length === 0 && properties.length > 0 && fg('fallback_to_default_columns_to_display_in_sllv');
|
|
185
|
-
if (useFallback) {
|
|
186
|
-
propertiesToBeUsed = properties.filter(function (property) {
|
|
187
|
-
return defaultProperties.includes(property.key);
|
|
188
|
-
});
|
|
189
|
-
}
|
|
190
|
-
|
|
191
182
|
/*Jira adds identifier fields like id and key to all data responses
|
|
192
183
|
Since defaultProperties already send back the keyField, we are accounting only
|
|
193
184
|
for the idField when we are using defaultProperties
|
|
@@ -207,11 +198,8 @@ export var useDatasourceTableState = function useDatasourceTableState(_ref) {
|
|
|
207
198
|
if (!isEqual(defaultVisibleColumnKeys, newProperties)) {
|
|
208
199
|
setDefaultVisibleColumnKeys(newProperties);
|
|
209
200
|
}
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
var nextLastRequestedFieldKeys = useFallback ? fieldKeys : newProperties;
|
|
213
|
-
if (!isEqual(lastRequestedFieldKeys, nextLastRequestedFieldKeys)) {
|
|
214
|
-
setLastRequestedFieldKeys(nextLastRequestedFieldKeys);
|
|
201
|
+
if (!isEqual(lastRequestedFieldKeys, newProperties)) {
|
|
202
|
+
setLastRequestedFieldKeys(newProperties);
|
|
215
203
|
}
|
|
216
204
|
}, [columns, defaultVisibleColumnKeys, lastRequestedFieldKeys]);
|
|
217
205
|
var onNextPage = useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
@@ -105,19 +105,6 @@ var DatasourceTableViewWithoutAnalytics = function DatasourceTableViewWithoutAna
|
|
|
105
105
|
var isDataReady = hasColumns && responseItems.length > 0 && totalCount && totalCount > 0;
|
|
106
106
|
visibleColumnCount.current = (visibleColumnKeys === null || visibleColumnKeys === void 0 ? void 0 : visibleColumnKeys.length) || 0;
|
|
107
107
|
|
|
108
|
-
// SLLV bug fix: This check exists because of JIM to SLLV conversion job
|
|
109
|
-
// which misconfigured the customfield mapping (stored name instead of ID) when converted to SLLV.
|
|
110
|
-
// Ideally, BE API should support both customfield name as well as ID.
|
|
111
|
-
// stored visibleColumnKeys (e.g. customfield names) may not match the
|
|
112
|
-
// resolved columns (e.g. customfield ids) returned by the API. When that happens the table
|
|
113
|
-
// would otherwise stay on the loading skeleton forever, so we render with defaultVisibleColumnKeys
|
|
114
|
-
// instead.
|
|
115
|
-
var hasStaleVisibleColumnKeys = (visibleColumnKeys || []).length > 0 && columns.length > 0 && !(visibleColumnKeys || []).some(function (key) {
|
|
116
|
-
return columns.some(function (col) {
|
|
117
|
-
return col.key === key;
|
|
118
|
-
});
|
|
119
|
-
}) && fg('fallback_to_default_columns_to_display_in_sllv');
|
|
120
|
-
|
|
121
108
|
// parameters is an object that we want to track, and when something inside it changes we want to
|
|
122
109
|
// call effect callback. Normal useEffect will not do deep comparison, but only reference one.
|
|
123
110
|
// This hook will do deep comparison making sure we don't call reset() when only reference to an object
|
|
@@ -227,7 +214,7 @@ var DatasourceTableViewWithoutAnalytics = function DatasourceTableViewWithoutAna
|
|
|
227
214
|
onLoadDatasourceDetails: loadDatasourceDetails,
|
|
228
215
|
status: status,
|
|
229
216
|
columns: columns,
|
|
230
|
-
visibleColumnKeys:
|
|
217
|
+
visibleColumnKeys: visibleColumnKeys || defaultVisibleColumnKeys,
|
|
231
218
|
onVisibleColumnKeysChange: onVisibleColumnKeysChange,
|
|
232
219
|
columnCustomSizes: columnCustomSizes,
|
|
233
220
|
onColumnResize: onColumnResize
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-datasource",
|
|
3
|
-
"version": "5.6.
|
|
3
|
+
"version": "5.6.6",
|
|
4
4
|
"description": "UI Components to support linking platform dataset feature",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -43,21 +43,21 @@
|
|
|
43
43
|
"ak-postbuild": "ls -d dist/* | xargs -n 1 copyfiles -u 1 -V src/**/*.{svg,png}"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@atlaskit/adf-schema": "^
|
|
46
|
+
"@atlaskit/adf-schema": "^53.0.0",
|
|
47
47
|
"@atlaskit/afm-i18n-platform-linking-platform-link-datasource": "2.7.0",
|
|
48
48
|
"@atlaskit/analytics-next": "^11.3.0",
|
|
49
|
-
"@atlaskit/atlassian-context": "^0.
|
|
49
|
+
"@atlaskit/atlassian-context": "^0.11.0",
|
|
50
50
|
"@atlaskit/avatar": "^25.15.0",
|
|
51
51
|
"@atlaskit/avatar-group": "^12.10.0",
|
|
52
|
-
"@atlaskit/badge": "^18.
|
|
52
|
+
"@atlaskit/badge": "^18.7.0",
|
|
53
53
|
"@atlaskit/button": "^23.11.0",
|
|
54
54
|
"@atlaskit/css": "^0.19.0",
|
|
55
55
|
"@atlaskit/datetime-picker": "^17.9.0",
|
|
56
56
|
"@atlaskit/dropdown-menu": "^16.10.0",
|
|
57
57
|
"@atlaskit/editor-prosemirror": "^7.3.0",
|
|
58
58
|
"@atlaskit/empty-state": "^10.2.0",
|
|
59
|
-
"@atlaskit/feature-gate-js-client": "^5.
|
|
60
|
-
"@atlaskit/flag": "^17.
|
|
59
|
+
"@atlaskit/feature-gate-js-client": "^5.8.0",
|
|
60
|
+
"@atlaskit/flag": "^17.13.0",
|
|
61
61
|
"@atlaskit/form": "^15.5.0",
|
|
62
62
|
"@atlaskit/heading": "^5.4.0",
|
|
63
63
|
"@atlaskit/icon": "^35.4.0",
|
|
@@ -65,12 +65,12 @@
|
|
|
65
65
|
"@atlaskit/inline-edit": "^15.6.0",
|
|
66
66
|
"@atlaskit/intl-messages-provider": "^3.3.0",
|
|
67
67
|
"@atlaskit/jql-ast": "^3.5.0",
|
|
68
|
-
"@atlaskit/jql-editor": "^6.
|
|
68
|
+
"@atlaskit/jql-editor": "^6.5.0",
|
|
69
69
|
"@atlaskit/jql-editor-autocomplete-rest": "^3.3.0",
|
|
70
70
|
"@atlaskit/layering": "^3.8.0",
|
|
71
71
|
"@atlaskit/link": "^3.4.0",
|
|
72
72
|
"@atlaskit/link-client-extension": "^6.1.0",
|
|
73
|
-
"@atlaskit/link-provider": "^4.
|
|
73
|
+
"@atlaskit/link-provider": "^4.7.0",
|
|
74
74
|
"@atlaskit/linking-common": "^9.13.0",
|
|
75
75
|
"@atlaskit/linking-types": "^14.4.0",
|
|
76
76
|
"@atlaskit/logo": "^20.2.0",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"@atlaskit/object": "^1.0.0",
|
|
80
80
|
"@atlaskit/outbound-auth-flow-client": "^3.4.0",
|
|
81
81
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
82
|
-
"@atlaskit/popup": "^4.
|
|
82
|
+
"@atlaskit/popup": "^4.24.0",
|
|
83
83
|
"@atlaskit/pragmatic-drag-and-drop": "^1.8.0",
|
|
84
84
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.2.0",
|
|
85
85
|
"@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-autoscroll": "^2.0.0",
|
|
@@ -87,13 +87,13 @@
|
|
|
87
87
|
"@atlaskit/primitives": "^19.0.0",
|
|
88
88
|
"@atlaskit/react-select": "^3.16.0",
|
|
89
89
|
"@atlaskit/select": "^21.12.0",
|
|
90
|
-
"@atlaskit/smart-card": "^44.
|
|
90
|
+
"@atlaskit/smart-card": "^44.28.0",
|
|
91
91
|
"@atlaskit/smart-user-picker": "^10.2.0",
|
|
92
92
|
"@atlaskit/spinner": "^19.1.0",
|
|
93
|
-
"@atlaskit/tag": "^14.
|
|
93
|
+
"@atlaskit/tag": "^14.16.0",
|
|
94
94
|
"@atlaskit/textfield": "^8.3.0",
|
|
95
95
|
"@atlaskit/theme": "^25.0.0",
|
|
96
|
-
"@atlaskit/tokens": "^13.
|
|
96
|
+
"@atlaskit/tokens": "^13.3.0",
|
|
97
97
|
"@atlaskit/tooltip": "^22.6.0",
|
|
98
98
|
"@atlaskit/ufo": "^0.5.0",
|
|
99
99
|
"@atlaskit/width-detector": "^5.1.0",
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
"@atlaskit/json-ld-types": "^1.5.0",
|
|
122
122
|
"@atlaskit/link-test-helpers": "^10.4.0",
|
|
123
123
|
"@atlaskit/ssr": "workspace:^",
|
|
124
|
-
"@atlassian/a11y-jest-testing": "^0.
|
|
124
|
+
"@atlassian/a11y-jest-testing": "^0.12.0",
|
|
125
125
|
"@atlassian/a11y-playwright-testing": "^0.10.0",
|
|
126
126
|
"@atlassian/feature-flags-test-utils": "^1.1.0",
|
|
127
127
|
"@atlassian/react-compiler-gating": "workspace:^",
|
|
@@ -202,9 +202,6 @@
|
|
|
202
202
|
"platform_lp_jira_sllv_renderer_column_sorting": {
|
|
203
203
|
"type": "boolean"
|
|
204
204
|
},
|
|
205
|
-
"fallback_to_default_columns_to_display_in_sllv": {
|
|
206
|
-
"type": "boolean"
|
|
207
|
-
},
|
|
208
205
|
"linking_platform_link_datasource_unit_compliant": {
|
|
209
206
|
"type": "boolean"
|
|
210
207
|
},
|