@contentful/field-editor-rich-text 2.2.1 → 2.3.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/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [2.3.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@2.2.1...@contentful/field-editor-rich-text@2.3.0) (2022-07-11)
7
+
8
+ ### Features
9
+
10
+ - add simple fetching for resources ([#1179](https://github.com/contentful/field-editors/issues/1179)) ([b29daac](https://github.com/contentful/field-editors/commit/b29daac6460f93a4350bf45f90ae938f65de96ee))
11
+
6
12
  ## [2.2.1](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@2.2.0...@contentful/field-editor-rich-text@2.2.1) (2022-07-06)
7
13
 
8
14
  ### Bug Fixes
@@ -2153,8 +2153,8 @@ function useFetchedEntity(_ref) {
2153
2153
  var _useEntities = fieldEditorReference.useEntities(),
2154
2154
  entries = _useEntities.entries,
2155
2155
  assets = _useEntities.assets,
2156
- getOrLoadEntry = _useEntities.getOrLoadEntry,
2157
- getOrLoadAsset = _useEntities.getOrLoadAsset;
2156
+ getEntry = _useEntities.getEntry,
2157
+ getAsset = _useEntities.getAsset;
2158
2158
 
2159
2159
  var store = type === 'Entry' ? entries : assets;
2160
2160
 
@@ -2172,7 +2172,7 @@ function useFetchedEntity(_ref) {
2172
2172
  }, [store, entity, id]); // Fetch the entity if needed
2173
2173
 
2174
2174
  React.useEffect(function () {
2175
- (type === 'Entry' ? getOrLoadEntry : getOrLoadAsset)(id); // "getOrLoadEntry" and "getOrLoadAsset" instances change with every
2175
+ (type === 'Entry' ? getEntry : getAsset)(id); // "getEntry" and "getAsset" instances change with every
2176
2176
  // entity store update causing page lag on initial load
2177
2177
  // TODO: consider rewriting useEntities() hook to avoid that happening in
2178
2178
  // first place.
@@ -2725,7 +2725,7 @@ var styles$3 = {
2725
2725
  };
2726
2726
  function FetchingWrappedInlineEntryCard(props) {
2727
2727
  var _useEntities = fieldEditorReference.useEntities(),
2728
- getOrLoadEntry = _useEntities.getOrLoadEntry,
2728
+ getEntry = _useEntities.getEntry,
2729
2729
  loadEntityScheduledActions = _useEntities.loadEntityScheduledActions,
2730
2730
  entries = _useEntities.entries;
2731
2731
 
@@ -2759,7 +2759,7 @@ function FetchingWrappedInlineEntryCard(props) {
2759
2759
  }, [entry, contentType, props.sdk.field.locale, props.sdk.locales["default"]]);
2760
2760
  React__default.useEffect(function () {
2761
2761
  if (!props.entryId) return;
2762
- getOrLoadEntry(props.entryId); // We don't include getOrLoadEntry below because it's part of the constate-derived
2762
+ getEntry(props.entryId); // We don't include getEntry below because it's part of the constate-derived
2763
2763
  // useEntities(), not props.
2764
2764
  // eslint-disable-next-line -- TODO: explain this disable
2765
2765
  }, [props.entryId]);