@contentful/field-editor-rich-text 4.17.8 → 4.18.0
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/EmbeddedResourceInline/FetchingWrappedResourceInlineCard.js +2 -1
- package/dist/cjs/plugins/Hyperlink/HyperlinkModal.js +2 -1
- package/dist/cjs/plugins/shared/FetchingWrappedResourceCard.js +2 -1
- package/dist/esm/plugins/EmbeddedResourceInline/FetchingWrappedResourceInlineCard.js +2 -1
- package/dist/esm/plugins/Hyperlink/HyperlinkModal.js +2 -1
- package/dist/esm/plugins/shared/FetchingWrappedResourceCard.js +2 -1
- package/package.json +4 -4
|
@@ -59,7 +59,8 @@ const { getEntryTitle, getEntityStatus } = _fieldeditorshared.entityHelpers;
|
|
|
59
59
|
function FetchingWrappedResourceInlineCard(props) {
|
|
60
60
|
const { link, onEntityFetchComplete, sdk } = props;
|
|
61
61
|
const { data, status: requestStatus } = (0, _fieldeditorreference.useResource)(link.linkType, link.urn, {
|
|
62
|
-
locale: sdk.field.locale
|
|
62
|
+
locale: sdk.field.locale,
|
|
63
|
+
referencingEntryId: sdk.ids.entry
|
|
63
64
|
});
|
|
64
65
|
_react.useEffect(()=>{
|
|
65
66
|
if (requestStatus === 'success') {
|
|
@@ -177,7 +177,8 @@ function HyperlinkModal(props) {
|
|
|
177
177
|
async function selectResourceEntry() {
|
|
178
178
|
const options = {
|
|
179
179
|
allowedResources: (0, _getAllowedResourcesForNodeType.default)(props.sdk.field, _richtexttypes.INLINES.RESOURCE_HYPERLINK),
|
|
180
|
-
locale: props.sdk.field.locale
|
|
180
|
+
locale: props.sdk.field.locale,
|
|
181
|
+
referencingEntryId: props.sdk.ids.entry
|
|
181
182
|
};
|
|
182
183
|
const entityLink = await props.sdk.dialogs.selectSingleResourceEntity(options);
|
|
183
184
|
if (entityLink) {
|
|
@@ -90,7 +90,8 @@ InternalEntryCard.displayName = 'ReferenceCard';
|
|
|
90
90
|
const FetchingWrappedResourceCard = (props)=>{
|
|
91
91
|
const { link, onEntityFetchComplete, sdk } = props;
|
|
92
92
|
const { data, status, error } = (0, _fieldeditorreference.useResource)(link.linkType, link.urn, {
|
|
93
|
-
locale: sdk.field.locale
|
|
93
|
+
locale: sdk.field.locale,
|
|
94
|
+
referencingEntryId: sdk.ids.entry
|
|
94
95
|
});
|
|
95
96
|
_react.useEffect(()=>{
|
|
96
97
|
if (status === 'success') {
|
|
@@ -8,7 +8,8 @@ const { getEntryTitle, getEntityStatus } = entityHelpers;
|
|
|
8
8
|
export function FetchingWrappedResourceInlineCard(props) {
|
|
9
9
|
const { link, onEntityFetchComplete, sdk } = props;
|
|
10
10
|
const { data, status: requestStatus } = useResource(link.linkType, link.urn, {
|
|
11
|
-
locale: sdk.field.locale
|
|
11
|
+
locale: sdk.field.locale,
|
|
12
|
+
referencingEntryId: sdk.ids.entry
|
|
12
13
|
});
|
|
13
14
|
React.useEffect(()=>{
|
|
14
15
|
if (requestStatus === 'success') {
|
|
@@ -113,7 +113,8 @@ export function HyperlinkModal(props) {
|
|
|
113
113
|
async function selectResourceEntry() {
|
|
114
114
|
const options = {
|
|
115
115
|
allowedResources: getAllowedResourcesForNodeType(props.sdk.field, INLINES.RESOURCE_HYPERLINK),
|
|
116
|
-
locale: props.sdk.field.locale
|
|
116
|
+
locale: props.sdk.field.locale,
|
|
117
|
+
referencingEntryId: props.sdk.ids.entry
|
|
117
118
|
};
|
|
118
119
|
const entityLink = await props.sdk.dialogs.selectSingleResourceEntity(options);
|
|
119
120
|
if (entityLink) {
|
|
@@ -34,7 +34,8 @@ InternalEntryCard.displayName = 'ReferenceCard';
|
|
|
34
34
|
export const FetchingWrappedResourceCard = (props)=>{
|
|
35
35
|
const { link, onEntityFetchComplete, sdk } = props;
|
|
36
36
|
const { data, status, error } = useResource(link.linkType, link.urn, {
|
|
37
|
-
locale: sdk.field.locale
|
|
37
|
+
locale: sdk.field.locale,
|
|
38
|
+
referencingEntryId: sdk.ids.entry
|
|
38
39
|
});
|
|
39
40
|
React.useEffect(()=>{
|
|
40
41
|
if (status === 'success') {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/field-editor-rich-text",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.18.0",
|
|
4
4
|
"source": "./src/index.tsx",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -44,10 +44,10 @@
|
|
|
44
44
|
"@contentful/f36-icons": "^5.4.1",
|
|
45
45
|
"@contentful/f36-tokens": "^5.1.0",
|
|
46
46
|
"@contentful/f36-utils": "^5.1.0",
|
|
47
|
-
"@contentful/field-editor-reference": "^6.
|
|
47
|
+
"@contentful/field-editor-reference": "^6.19.0",
|
|
48
48
|
"@contentful/field-editor-shared": "^2.17.0",
|
|
49
49
|
"@contentful/rich-text-plain-text-renderer": "^17.0.0",
|
|
50
|
-
"@contentful/rich-text-types": "^17.
|
|
50
|
+
"@contentful/rich-text-types": "^17.2.5",
|
|
51
51
|
"@popperjs/core": "^2.11.5",
|
|
52
52
|
"@udecode/plate-basic-marks": "36.0.0",
|
|
53
53
|
"@udecode/plate-break": "36.0.0",
|
|
@@ -90,5 +90,5 @@
|
|
|
90
90
|
"publishConfig": {
|
|
91
91
|
"registry": "https://npm.pkg.github.com/"
|
|
92
92
|
},
|
|
93
|
-
"gitHead": "
|
|
93
|
+
"gitHead": "67068016b57ce3057ddddfb8dd3a53ef86499a02"
|
|
94
94
|
}
|