@contentful/field-editor-reference 5.1.4 → 5.1.7
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 +14 -0
- package/dist/__fixtures__/FakeSdk.d.ts +1 -1
- package/dist/__fixtures__/asset/index.d.ts +6 -0
- package/dist/__fixtures__/content-type/index.d.ts +2 -0
- package/dist/__fixtures__/entry/index.d.ts +5 -0
- package/dist/__fixtures__/fixtures.d.ts +6 -0
- package/dist/__fixtures__/locale/index.d.ts +42 -0
- package/dist/__fixtures__/space/index.d.ts +2 -0
- package/dist/field-editor-reference.cjs.development.js +14 -5
- package/dist/field-editor-reference.cjs.development.js.map +1 -1
- package/dist/field-editor-reference.cjs.production.min.js +1 -1
- package/dist/field-editor-reference.cjs.production.min.js.map +1 -1
- package/dist/field-editor-reference.esm.js +14 -5
- package/dist/field-editor-reference.esm.js.map +1 -1
- package/dist/resources/Cards/ResourceCard.d.ts +1 -1
- package/package.json +3 -3
|
@@ -679,7 +679,8 @@ var squareCard = /*#__PURE__*/css({
|
|
|
679
679
|
|
|
680
680
|
function MissingEntityCard(props) {
|
|
681
681
|
return React__default.createElement(Card, {
|
|
682
|
-
className: card
|
|
682
|
+
className: card,
|
|
683
|
+
testId: "cf-ui-missing-entry-card"
|
|
683
684
|
}, React__default.createElement(Flex, {
|
|
684
685
|
alignItems: "center",
|
|
685
686
|
justifyContent: "space-between"
|
|
@@ -2051,6 +2052,9 @@ var _constate = /*#__PURE__*/constate(function useInitServices(props) {
|
|
|
2051
2052
|
|
|
2052
2053
|
var currentSpaceId = props.sdk.ids.space;
|
|
2053
2054
|
var currentEnvironmentId = (_props$sdk$ids$enviro = props.sdk.ids.environmentAlias) != null ? _props$sdk$ids$enviro : props.sdk.ids.environment;
|
|
2055
|
+
var environmentIds = useMemo(function () {
|
|
2056
|
+
return [props.sdk.ids.environmentAlias, props.sdk.ids.environment];
|
|
2057
|
+
}, [props.sdk.ids.environmentAlias, props.sdk.ids.environment]);
|
|
2054
2058
|
var queryClient = useQueryClient();
|
|
2055
2059
|
var queryCache = queryClient.getQueryCache();
|
|
2056
2060
|
var entityChangeUnsubscribers = useRef({});
|
|
@@ -2205,9 +2209,9 @@ var _constate = /*#__PURE__*/constate(function useInitServices(props) {
|
|
|
2205
2209
|
}, [fetch]);
|
|
2206
2210
|
var isSameSpaceEntityQueryKey = useCallback(function (queryKey) {
|
|
2207
2211
|
var isEntityKey = isEntityQueryKey(queryKey);
|
|
2208
|
-
var isSameSpaceEntityKey = isEntityKey && queryKey[2] === currentSpaceId && queryKey[3]
|
|
2212
|
+
var isSameSpaceEntityKey = isEntityKey && queryKey[2] === currentSpaceId && environmentIds.includes(queryKey[3]);
|
|
2209
2213
|
return isSameSpaceEntityKey;
|
|
2210
|
-
}, [currentSpaceId,
|
|
2214
|
+
}, [currentSpaceId, environmentIds]); // @ts-expect-error ...
|
|
2211
2215
|
|
|
2212
2216
|
// @ts-expect-error ...
|
|
2213
2217
|
var onEntityChanged = props.sdk.space.onEntityChanged;
|
|
@@ -2267,11 +2271,11 @@ var _constate = /*#__PURE__*/constate(function useInitServices(props) {
|
|
|
2267
2271
|
};
|
|
2268
2272
|
}, [onEntityChanged, queryCache, isSameSpaceEntityQueryKey, queryClient]);
|
|
2269
2273
|
return {
|
|
2274
|
+
ids: props.sdk.ids,
|
|
2270
2275
|
cmaClient: cmaClient,
|
|
2271
2276
|
fetch: fetch,
|
|
2272
2277
|
getResource: getResource,
|
|
2273
2278
|
getEntity: getEntity,
|
|
2274
|
-
ids: props.sdk.ids,
|
|
2275
2279
|
getEntityScheduledActions: getEntityScheduledActions
|
|
2276
2280
|
};
|
|
2277
2281
|
}, function (_ref5) {
|
|
@@ -2287,8 +2291,13 @@ var _constate = /*#__PURE__*/constate(function useInitServices(props) {
|
|
|
2287
2291
|
getEntityScheduledActions: getEntityScheduledActions
|
|
2288
2292
|
};
|
|
2289
2293
|
}, function (_ref7) {
|
|
2294
|
+
var _ids$environmentAlias;
|
|
2295
|
+
|
|
2290
2296
|
var ids = _ref7.ids;
|
|
2291
|
-
return
|
|
2297
|
+
return {
|
|
2298
|
+
environment: (_ids$environmentAlias = ids.environmentAlias) != null ? _ids$environmentAlias : ids.environment,
|
|
2299
|
+
space: ids.space
|
|
2300
|
+
};
|
|
2292
2301
|
}),
|
|
2293
2302
|
InternalServiceProvider = _constate[0],
|
|
2294
2303
|
useEntityLoader = _constate[2],
|