@atlaskit/link-datasource 4.7.0 → 4.7.1
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
|
+
## 4.7.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#145369](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/145369)
|
|
8
|
+
[`995c7b4234127`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/995c7b4234127) -
|
|
9
|
+
Clean up FG enable_datasource_fetch_action_inputs
|
|
10
|
+
|
|
3
11
|
## 4.7.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
|
@@ -12,7 +12,6 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
|
|
|
12
12
|
var _react = require("react");
|
|
13
13
|
var _reactSweetState = require("react-sweet-state");
|
|
14
14
|
var _linkClientExtension = require("@atlaskit/link-client-extension");
|
|
15
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
15
|
var _analytics = require("../../analytics");
|
|
17
16
|
var _useErrorLogger2 = _interopRequireDefault(require("../../hooks/useErrorLogger"));
|
|
18
17
|
var _index = require("../index");
|
|
@@ -204,11 +203,9 @@ var useExecuteAtomicAction = exports.useExecuteAtomicAction = function useExecut
|
|
|
204
203
|
_useAtomicUpdateActio3 = _useAtomicUpdateActio2[0],
|
|
205
204
|
schema = _useAtomicUpdateActio3.schema,
|
|
206
205
|
fetchSchema = _useAtomicUpdateActio3.fetchSchema;
|
|
207
|
-
var item = (0,
|
|
208
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
209
|
-
(0, _index.useDatasourceItem)({
|
|
206
|
+
var item = (0, _index.useDatasourceItem)({
|
|
210
207
|
id: ari
|
|
211
|
-
})
|
|
208
|
+
});
|
|
212
209
|
var _useDatasourceClientE2 = (0, _linkClientExtension.useDatasourceClientExtension)(),
|
|
213
210
|
executeAction = _useDatasourceClientE2.executeAtomicAction,
|
|
214
211
|
invalidateDatasourceDataCacheByAri = _useDatasourceClientE2.invalidateDatasourceDataCacheByAri;
|
|
@@ -257,10 +254,7 @@ var useExecuteAtomicAction = exports.useExecuteAtomicAction = function useExecut
|
|
|
257
254
|
* controlled inputs are useful for search fields, where a variable query is passed to the fetchAction
|
|
258
255
|
*/
|
|
259
256
|
var inputs = controlledInputs;
|
|
260
|
-
|
|
261
|
-
* When FF is on and `controlledInputs` are not provided we look for required inputs in the fetchSchema
|
|
262
|
-
*/
|
|
263
|
-
if (!Object.keys(inputs).length && fetchSchema.inputs && !!Object.keys(fetchSchema.inputs).length && (0, _platformFeatureFlags.fg)('enable_datasource_fetch_action_inputs')) {
|
|
257
|
+
if (!Object.keys(inputs).length && fetchSchema.inputs && !!Object.keys(fetchSchema.inputs).length) {
|
|
264
258
|
var inputKeys = Object.keys(fetchSchema.inputs);
|
|
265
259
|
/**
|
|
266
260
|
* If present return the input value from the datasource item
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { useCallback, useMemo } from 'react';
|
|
2
2
|
import { createActionsHook, createHook, createStore } from 'react-sweet-state';
|
|
3
3
|
import { useDatasourceClientExtension } from '@atlaskit/link-client-extension';
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
4
|
import { useDatasourceAnalyticsEvents } from '../../analytics';
|
|
6
5
|
import useErrorLogger from '../../hooks/useErrorLogger';
|
|
7
6
|
import { useDatasourceItem } from '../index';
|
|
@@ -186,11 +185,9 @@ export const useExecuteAtomicAction = ({
|
|
|
186
185
|
fieldKey,
|
|
187
186
|
integrationKey
|
|
188
187
|
});
|
|
189
|
-
const item =
|
|
190
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
191
|
-
useDatasourceItem({
|
|
188
|
+
const item = useDatasourceItem({
|
|
192
189
|
id: ari
|
|
193
|
-
})
|
|
190
|
+
});
|
|
194
191
|
const {
|
|
195
192
|
executeAtomicAction: executeAction,
|
|
196
193
|
invalidateDatasourceDataCacheByAri
|
|
@@ -242,10 +239,7 @@ export const useExecuteAtomicAction = ({
|
|
|
242
239
|
* controlled inputs are useful for search fields, where a variable query is passed to the fetchAction
|
|
243
240
|
*/
|
|
244
241
|
let inputs = controlledInputs;
|
|
245
|
-
|
|
246
|
-
* When FF is on and `controlledInputs` are not provided we look for required inputs in the fetchSchema
|
|
247
|
-
*/
|
|
248
|
-
if (!Object.keys(inputs).length && fetchSchema.inputs && !!Object.keys(fetchSchema.inputs).length && fg('enable_datasource_fetch_action_inputs')) {
|
|
242
|
+
if (!Object.keys(inputs).length && fetchSchema.inputs && !!Object.keys(fetchSchema.inputs).length) {
|
|
249
243
|
const inputKeys = Object.keys(fetchSchema.inputs);
|
|
250
244
|
/**
|
|
251
245
|
* If present return the input value from the datasource item
|
|
@@ -7,7 +7,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
7
7
|
import { useCallback, useMemo } from 'react';
|
|
8
8
|
import { createActionsHook, createHook, createStore } from 'react-sweet-state';
|
|
9
9
|
import { useDatasourceClientExtension } from '@atlaskit/link-client-extension';
|
|
10
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
10
|
import { useDatasourceAnalyticsEvents } from '../../analytics';
|
|
12
11
|
import useErrorLogger from '../../hooks/useErrorLogger';
|
|
13
12
|
import { useDatasourceItem } from '../index';
|
|
@@ -198,11 +197,9 @@ export var useExecuteAtomicAction = function useExecuteAtomicAction(_ref5) {
|
|
|
198
197
|
_useAtomicUpdateActio3 = _useAtomicUpdateActio2[0],
|
|
199
198
|
schema = _useAtomicUpdateActio3.schema,
|
|
200
199
|
fetchSchema = _useAtomicUpdateActio3.fetchSchema;
|
|
201
|
-
var item =
|
|
202
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
203
|
-
useDatasourceItem({
|
|
200
|
+
var item = useDatasourceItem({
|
|
204
201
|
id: ari
|
|
205
|
-
})
|
|
202
|
+
});
|
|
206
203
|
var _useDatasourceClientE2 = useDatasourceClientExtension(),
|
|
207
204
|
executeAction = _useDatasourceClientE2.executeAtomicAction,
|
|
208
205
|
invalidateDatasourceDataCacheByAri = _useDatasourceClientE2.invalidateDatasourceDataCacheByAri;
|
|
@@ -251,10 +248,7 @@ export var useExecuteAtomicAction = function useExecuteAtomicAction(_ref5) {
|
|
|
251
248
|
* controlled inputs are useful for search fields, where a variable query is passed to the fetchAction
|
|
252
249
|
*/
|
|
253
250
|
var inputs = controlledInputs;
|
|
254
|
-
|
|
255
|
-
* When FF is on and `controlledInputs` are not provided we look for required inputs in the fetchSchema
|
|
256
|
-
*/
|
|
257
|
-
if (!Object.keys(inputs).length && fetchSchema.inputs && !!Object.keys(fetchSchema.inputs).length && fg('enable_datasource_fetch_action_inputs')) {
|
|
251
|
+
if (!Object.keys(inputs).length && fetchSchema.inputs && !!Object.keys(fetchSchema.inputs).length) {
|
|
258
252
|
var inputKeys = Object.keys(fetchSchema.inputs);
|
|
259
253
|
/**
|
|
260
254
|
* If present return the input value from the datasource item
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-datasource",
|
|
3
|
-
"version": "4.7.
|
|
3
|
+
"version": "4.7.1",
|
|
4
4
|
"description": "UI Components to support linking platform dataset feature",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -104,13 +104,13 @@
|
|
|
104
104
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
105
105
|
},
|
|
106
106
|
"devDependencies": {
|
|
107
|
-
"@af/integration-testing": "
|
|
108
|
-
"@af/visual-regression": "
|
|
107
|
+
"@af/integration-testing": "workspace:^",
|
|
108
|
+
"@af/visual-regression": "workspace:^",
|
|
109
109
|
"@atlaskit/json-ld-types": "^1.2.0",
|
|
110
110
|
"@atlaskit/link-provider": "^2.1.0",
|
|
111
111
|
"@atlaskit/link-test-helpers": "^8.0.0",
|
|
112
|
-
"@atlaskit/ssr": "
|
|
113
|
-
"@atlaskit/visual-regression": "
|
|
112
|
+
"@atlaskit/ssr": "workspace:^",
|
|
113
|
+
"@atlaskit/visual-regression": "workspace:^",
|
|
114
114
|
"@atlassian/feature-flags-test-utils": "^0.3.0",
|
|
115
115
|
"@faker-js/faker": "^7.5.0",
|
|
116
116
|
"@testing-library/dom": "^10.1.0",
|
|
@@ -161,9 +161,6 @@
|
|
|
161
161
|
"./elements": "./src/elements.ts"
|
|
162
162
|
},
|
|
163
163
|
"platform-feature-flags": {
|
|
164
|
-
"enable_datasource_fetch_action_inputs": {
|
|
165
|
-
"type": "boolean"
|
|
166
|
-
},
|
|
167
164
|
"platform-datasources-enable-two-way-sync-statuses": {
|
|
168
165
|
"type": "boolean"
|
|
169
166
|
},
|