@contentful/field-editor-reference 6.22.1 → 6.22.2-canary.4
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.
|
@@ -417,7 +417,9 @@ const [InternalServiceProvider, useFetch, useEntityLoader, useCurrentIds] = (0,
|
|
|
417
417
|
resourceType,
|
|
418
418
|
urn,
|
|
419
419
|
options?.locale,
|
|
420
|
-
options?.referencingEntryId
|
|
420
|
+
options?.referencingEntryId,
|
|
421
|
+
currentSpaceId,
|
|
422
|
+
currentEnvironmentId
|
|
421
423
|
];
|
|
422
424
|
return fetch(queryKey, ()=>{
|
|
423
425
|
if (resourceType === 'Contentful:Entry') {
|
|
@@ -607,12 +609,15 @@ function useResource(resourceType, urn, { locale, referencingEntryId, ...options
|
|
|
607
609
|
locale = undefined;
|
|
608
610
|
referencingEntryId = undefined;
|
|
609
611
|
}
|
|
612
|
+
const { space, environment } = useCurrentIds();
|
|
610
613
|
const queryKey = [
|
|
611
614
|
'Resource',
|
|
612
615
|
resourceType,
|
|
613
616
|
urn,
|
|
614
617
|
locale,
|
|
615
|
-
referencingEntryId
|
|
618
|
+
referencingEntryId,
|
|
619
|
+
space,
|
|
620
|
+
environment
|
|
616
621
|
];
|
|
617
622
|
const { getResource } = useEntityLoader();
|
|
618
623
|
const { status, data, error } = (0, _queryClient.useQuery)(queryKey, ()=>getResource(resourceType, urn, {
|
|
@@ -329,7 +329,9 @@ const [InternalServiceProvider, useFetch, useEntityLoader, useCurrentIds] = cons
|
|
|
329
329
|
resourceType,
|
|
330
330
|
urn,
|
|
331
331
|
options?.locale,
|
|
332
|
-
options?.referencingEntryId
|
|
332
|
+
options?.referencingEntryId,
|
|
333
|
+
currentSpaceId,
|
|
334
|
+
currentEnvironmentId
|
|
333
335
|
];
|
|
334
336
|
return fetch(queryKey, ()=>{
|
|
335
337
|
if (resourceType === 'Contentful:Entry') {
|
|
@@ -519,12 +521,15 @@ export function useResource(resourceType, urn, { locale, referencingEntryId, ...
|
|
|
519
521
|
locale = undefined;
|
|
520
522
|
referencingEntryId = undefined;
|
|
521
523
|
}
|
|
524
|
+
const { space, environment } = useCurrentIds();
|
|
522
525
|
const queryKey = [
|
|
523
526
|
'Resource',
|
|
524
527
|
resourceType,
|
|
525
528
|
urn,
|
|
526
529
|
locale,
|
|
527
|
-
referencingEntryId
|
|
530
|
+
referencingEntryId,
|
|
531
|
+
space,
|
|
532
|
+
environment
|
|
528
533
|
];
|
|
529
534
|
const { getResource } = useEntityLoader();
|
|
530
535
|
const { status, data, error } = useQuery(queryKey, ()=>getResource(resourceType, urn, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/field-editor-reference",
|
|
3
|
-
"version": "6.22.
|
|
3
|
+
"version": "6.22.2-canary.4+bae5c57b",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"publishConfig": {
|
|
69
69
|
"registry": "https://npm.pkg.github.com/"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "bae5c57b7b0d6070d7cdd3f376b214bb84d7aeb9"
|
|
72
72
|
}
|