@contentful/field-editor-reference 6.13.6 → 6.13.8
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.
|
@@ -43,6 +43,7 @@ _export(exports, {
|
|
|
43
43
|
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
44
44
|
const _constate = /*#__PURE__*/ _interop_require_default(require("constate"));
|
|
45
45
|
const _contentfulmanagement = require("contentful-management");
|
|
46
|
+
const _lodash = require("lodash");
|
|
46
47
|
const _pqueue = /*#__PURE__*/ _interop_require_default(require("p-queue"));
|
|
47
48
|
const _queryClient = require("./queryClient");
|
|
48
49
|
function _define_property(obj, key, value) {
|
|
@@ -479,9 +480,11 @@ const [InternalServiceProvider, useFetch, useEntityLoader, useCurrentIds] = (0,
|
|
|
479
480
|
});
|
|
480
481
|
}
|
|
481
482
|
const subscribeQuery = ({ queryKey, queryHash })=>{
|
|
482
|
-
const [entityType, entityId] = queryKey;
|
|
483
|
+
const [entityType, entityId, , , releaseId] = queryKey;
|
|
483
484
|
entityChangeUnsubscribers.current[queryHash] = onEntityChanged(entityType, entityId, (data)=>{
|
|
484
|
-
|
|
485
|
+
if ((0, _lodash.get)(data, 'sys.release.id') === releaseId) {
|
|
486
|
+
queryClient.setQueryData(queryKey, data);
|
|
487
|
+
}
|
|
485
488
|
});
|
|
486
489
|
};
|
|
487
490
|
findSameSpaceQueries().forEach(subscribeQuery);
|
|
@@ -14,6 +14,7 @@ function _define_property(obj, key, value) {
|
|
|
14
14
|
import React, { useCallback, useEffect, useMemo, useRef } from 'react';
|
|
15
15
|
import constate from 'constate';
|
|
16
16
|
import { fetchAll } from 'contentful-management';
|
|
17
|
+
import { get } from 'lodash';
|
|
17
18
|
import PQueue from 'p-queue';
|
|
18
19
|
import { SharedQueryClientProvider, useQuery, useQueryClient } from './queryClient';
|
|
19
20
|
export function isContentfulResourceInfo(info) {
|
|
@@ -391,9 +392,11 @@ const [InternalServiceProvider, useFetch, useEntityLoader, useCurrentIds] = cons
|
|
|
391
392
|
});
|
|
392
393
|
}
|
|
393
394
|
const subscribeQuery = ({ queryKey, queryHash })=>{
|
|
394
|
-
const [entityType, entityId] = queryKey;
|
|
395
|
+
const [entityType, entityId, , , releaseId] = queryKey;
|
|
395
396
|
entityChangeUnsubscribers.current[queryHash] = onEntityChanged(entityType, entityId, (data)=>{
|
|
396
|
-
|
|
397
|
+
if (get(data, 'sys.release.id') === releaseId) {
|
|
398
|
+
queryClient.setQueryData(queryKey, data);
|
|
399
|
+
}
|
|
397
400
|
});
|
|
398
401
|
};
|
|
399
402
|
findSameSpaceQueries().forEach(subscribeQuery);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/field-editor-reference",
|
|
3
|
-
"version": "6.13.
|
|
3
|
+
"version": "6.13.8",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@contentful/f36-components": "^5.4.1",
|
|
40
40
|
"@contentful/f36-icons": "^5.4.1",
|
|
41
41
|
"@contentful/f36-tokens": "^5.1.0",
|
|
42
|
-
"@contentful/field-editor-shared": "^2.13.
|
|
42
|
+
"@contentful/field-editor-shared": "^2.13.6",
|
|
43
43
|
"@contentful/mimetype": "^2.2.29",
|
|
44
44
|
"@dnd-kit/core": "^6.0.8",
|
|
45
45
|
"@dnd-kit/modifiers": "^7.0.0",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"publishConfig": {
|
|
68
68
|
"registry": "https://npm.pkg.github.com/"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "28ca8ba08919eaca85309e6ae5b9f241b96138c4"
|
|
71
71
|
}
|