@contentful/field-editor-rich-text 3.30.0 → 4.0.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/dist/cjs/plugins/shared/FetchingWrappedAssetCard.js +1 -1
- package/dist/cjs/plugins/shared/FetchingWrappedEntryCard.js +1 -1
- package/dist/cjs/plugins/shared/__tests__/FetchingWrappedAssetCard.test.js +7 -1
- package/dist/cjs/plugins/shared/__tests__/FetchingWrappedEntryCard.test.js +7 -1
- package/dist/cjs/plugins/shared/__tests__/FetchingWrappedResourceCard.test.js +7 -1
- package/dist/esm/plugins/shared/FetchingWrappedAssetCard.js +2 -2
- package/dist/esm/plugins/shared/FetchingWrappedEntryCard.js +2 -2
- package/dist/esm/plugins/shared/__tests__/FetchingWrappedAssetCard.test.js +7 -1
- package/dist/esm/plugins/shared/__tests__/FetchingWrappedEntryCard.test.js +7 -1
- package/dist/esm/plugins/shared/__tests__/FetchingWrappedResourceCard.test.js +7 -1
- package/package.json +4 -4
|
@@ -84,7 +84,7 @@ function FetchingWrappedAssetCard(props) {
|
|
|
84
84
|
getEntityScheduledActions,
|
|
85
85
|
props.assetId
|
|
86
86
|
]);
|
|
87
|
-
const localesStatusMap = (0, _fieldeditorshared.
|
|
87
|
+
const localesStatusMap = (0, _fieldeditorshared.useLocalePublishStatus)(asset, props.sdk.locales);
|
|
88
88
|
_react.useEffect(()=>{
|
|
89
89
|
if (status === 'success') {
|
|
90
90
|
onEntityFetchComplete?.();
|
|
@@ -90,7 +90,7 @@ const FetchingWrappedEntryCard = (props)=>{
|
|
|
90
90
|
getEntityScheduledActions,
|
|
91
91
|
entryId
|
|
92
92
|
]);
|
|
93
|
-
const localesStatusMap = (0, _fieldeditorshared.
|
|
93
|
+
const localesStatusMap = (0, _fieldeditorshared.useLocalePublishStatus)(entry, props.sdk.locales);
|
|
94
94
|
_react.useEffect(()=>{
|
|
95
95
|
if (status === 'success') {
|
|
96
96
|
onEntityFetchComplete?.();
|
|
@@ -62,7 +62,13 @@ let sdk;
|
|
|
62
62
|
beforeEach(()=>{
|
|
63
63
|
sdk = {
|
|
64
64
|
locales: {
|
|
65
|
-
default: 'en-US'
|
|
65
|
+
default: 'en-US',
|
|
66
|
+
available: [
|
|
67
|
+
'en-US'
|
|
68
|
+
],
|
|
69
|
+
names: {
|
|
70
|
+
'en-US': 'English (United States)'
|
|
71
|
+
}
|
|
66
72
|
},
|
|
67
73
|
cmaAdapter: (0, _fieldeditortestutils.createFakeCMAAdapter)({
|
|
68
74
|
Asset: {
|
|
@@ -63,7 +63,13 @@ let sdk;
|
|
|
63
63
|
beforeEach(()=>{
|
|
64
64
|
sdk = {
|
|
65
65
|
locales: {
|
|
66
|
-
default: 'en-US'
|
|
66
|
+
default: 'en-US',
|
|
67
|
+
available: [
|
|
68
|
+
'en-US'
|
|
69
|
+
],
|
|
70
|
+
names: {
|
|
71
|
+
'en-US': 'English (United States)'
|
|
72
|
+
}
|
|
67
73
|
},
|
|
68
74
|
cmaAdapter: (0, _fieldeditortestutils.createFakeCMAAdapter)({
|
|
69
75
|
Entry: {
|
|
@@ -66,7 +66,13 @@ const unknownEntryUrn = 'crn:contentful:::content:spaces/space-id/entries/unknow
|
|
|
66
66
|
beforeEach(()=>{
|
|
67
67
|
sdk = {
|
|
68
68
|
locales: {
|
|
69
|
-
default: 'en-US'
|
|
69
|
+
default: 'en-US',
|
|
70
|
+
available: [
|
|
71
|
+
'en-US'
|
|
72
|
+
],
|
|
73
|
+
names: {
|
|
74
|
+
'en-US': 'English (United States)'
|
|
75
|
+
}
|
|
70
76
|
},
|
|
71
77
|
cmaAdapter: (0, _fieldeditortestutils.createFakeCMAAdapter)({
|
|
72
78
|
ContentType: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { AssetCard } from '@contentful/f36-components';
|
|
3
3
|
import { useEntity, useEntityLoader, MissingEntityCard, WrappedAssetCard } from '@contentful/field-editor-reference';
|
|
4
|
-
import {
|
|
4
|
+
import { useLocalePublishStatus } from '@contentful/field-editor-shared';
|
|
5
5
|
import areEqual from 'fast-deep-equal';
|
|
6
6
|
const InternalAssetCard = React.memo((props)=>React.createElement(WrappedAssetCard, {
|
|
7
7
|
getEntityScheduledActions: props.loadEntityScheduledActions,
|
|
@@ -28,7 +28,7 @@ export function FetchingWrappedAssetCard(props) {
|
|
|
28
28
|
getEntityScheduledActions,
|
|
29
29
|
props.assetId
|
|
30
30
|
]);
|
|
31
|
-
const localesStatusMap =
|
|
31
|
+
const localesStatusMap = useLocalePublishStatus(asset, props.sdk.locales);
|
|
32
32
|
React.useEffect(()=>{
|
|
33
33
|
if (status === 'success') {
|
|
34
34
|
onEntityFetchComplete?.();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { EntryCard } from '@contentful/f36-components';
|
|
3
3
|
import { useEntity, MissingEntityCard, WrappedEntryCard, useEntityLoader } from '@contentful/field-editor-reference';
|
|
4
|
-
import {
|
|
4
|
+
import { useLocalePublishStatus } from '@contentful/field-editor-shared';
|
|
5
5
|
import areEqual from 'fast-deep-equal';
|
|
6
6
|
const InternalEntryCard = React.memo((props)=>{
|
|
7
7
|
const { entry, sdk, loadEntityScheduledActions } = props;
|
|
@@ -34,7 +34,7 @@ export const FetchingWrappedEntryCard = (props)=>{
|
|
|
34
34
|
getEntityScheduledActions,
|
|
35
35
|
entryId
|
|
36
36
|
]);
|
|
37
|
-
const localesStatusMap =
|
|
37
|
+
const localesStatusMap = useLocalePublishStatus(entry, props.sdk.locales);
|
|
38
38
|
React.useEffect(()=>{
|
|
39
39
|
if (status === 'success') {
|
|
40
40
|
onEntityFetchComplete?.();
|
|
@@ -16,7 +16,13 @@ const unknownEntryUrn = 'crn:contentful:::content:spaces/space-id/entries/unknow
|
|
|
16
16
|
beforeEach(()=>{
|
|
17
17
|
sdk = {
|
|
18
18
|
locales: {
|
|
19
|
-
default: 'en-US'
|
|
19
|
+
default: 'en-US',
|
|
20
|
+
available: [
|
|
21
|
+
'en-US'
|
|
22
|
+
],
|
|
23
|
+
names: {
|
|
24
|
+
'en-US': 'English (United States)'
|
|
25
|
+
}
|
|
20
26
|
},
|
|
21
27
|
cmaAdapter: createFakeCMAAdapter({
|
|
22
28
|
ContentType: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/field-editor-rich-text",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.1",
|
|
4
4
|
"source": "./src/index.tsx",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"@contentful/f36-icons": "^4.29.0",
|
|
45
45
|
"@contentful/f36-tokens": "^4.0.5",
|
|
46
46
|
"@contentful/f36-utils": "^4.24.3",
|
|
47
|
-
"@contentful/field-editor-reference": "^
|
|
48
|
-
"@contentful/field-editor-shared": "^1.
|
|
47
|
+
"@contentful/field-editor-reference": "^6.1.0",
|
|
48
|
+
"@contentful/field-editor-shared": "^2.1.0",
|
|
49
49
|
"@contentful/rich-text-plain-text-renderer": "^17.0.0",
|
|
50
50
|
"@contentful/rich-text-types": "^17.0.0",
|
|
51
51
|
"@popperjs/core": "^2.11.5",
|
|
@@ -86,5 +86,5 @@
|
|
|
86
86
|
"publishConfig": {
|
|
87
87
|
"registry": "https://npm.pkg.github.com/"
|
|
88
88
|
},
|
|
89
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "7eb324a42380b43ee842dfb521f7bc7db0d2eba4"
|
|
90
90
|
}
|