@contentful/field-editor-rich-text 2.2.1 → 2.3.2
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 +16 -0
- package/dist/field-editor-rich-text.cjs.development.js +6 -6
- package/dist/field-editor-rich-text.cjs.development.js.map +1 -1
- package/dist/field-editor-rich-text.cjs.production.min.js +1 -1
- package/dist/field-editor-rich-text.cjs.production.min.js.map +1 -1
- package/dist/field-editor-rich-text.esm.js +6 -6
- package/dist/field-editor-rich-text.esm.js.map +1 -1
- package/package.json +4 -4
|
@@ -2146,8 +2146,8 @@ function useFetchedEntity(_ref) {
|
|
|
2146
2146
|
var _useEntities = useEntities(),
|
|
2147
2147
|
entries = _useEntities.entries,
|
|
2148
2148
|
assets = _useEntities.assets,
|
|
2149
|
-
|
|
2150
|
-
|
|
2149
|
+
getEntry = _useEntities.getEntry,
|
|
2150
|
+
getAsset = _useEntities.getAsset;
|
|
2151
2151
|
|
|
2152
2152
|
var store = type === 'Entry' ? entries : assets;
|
|
2153
2153
|
|
|
@@ -2165,7 +2165,7 @@ function useFetchedEntity(_ref) {
|
|
|
2165
2165
|
}, [store, entity, id]); // Fetch the entity if needed
|
|
2166
2166
|
|
|
2167
2167
|
useEffect(function () {
|
|
2168
|
-
(type === 'Entry' ?
|
|
2168
|
+
(type === 'Entry' ? getEntry : getAsset)(id); // "getEntry" and "getAsset" instances change with every
|
|
2169
2169
|
// entity store update causing page lag on initial load
|
|
2170
2170
|
// TODO: consider rewriting useEntities() hook to avoid that happening in
|
|
2171
2171
|
// first place.
|
|
@@ -2718,7 +2718,7 @@ var styles$3 = {
|
|
|
2718
2718
|
};
|
|
2719
2719
|
function FetchingWrappedInlineEntryCard(props) {
|
|
2720
2720
|
var _useEntities = useEntities(),
|
|
2721
|
-
|
|
2721
|
+
getEntry = _useEntities.getEntry,
|
|
2722
2722
|
loadEntityScheduledActions = _useEntities.loadEntityScheduledActions,
|
|
2723
2723
|
entries = _useEntities.entries;
|
|
2724
2724
|
|
|
@@ -2752,7 +2752,7 @@ function FetchingWrappedInlineEntryCard(props) {
|
|
|
2752
2752
|
}, [entry, contentType, props.sdk.field.locale, props.sdk.locales["default"]]);
|
|
2753
2753
|
React__default.useEffect(function () {
|
|
2754
2754
|
if (!props.entryId) return;
|
|
2755
|
-
|
|
2755
|
+
getEntry(props.entryId); // We don't include getEntry below because it's part of the constate-derived
|
|
2756
2756
|
// useEntities(), not props.
|
|
2757
2757
|
// eslint-disable-next-line -- TODO: explain this disable
|
|
2758
2758
|
}, [props.entryId]);
|
|
@@ -3282,7 +3282,7 @@ var createHeadingPlugin = function createHeadingPlugin() {
|
|
|
3282
3282
|
match: {
|
|
3283
3283
|
type: BLOCKS.LIST_ITEM
|
|
3284
3284
|
}
|
|
3285
|
-
});
|
|
3285
|
+
}) && !isMarkActive(editor, COMMAND_PROMPT);
|
|
3286
3286
|
}
|
|
3287
3287
|
}
|
|
3288
3288
|
}]
|