@contentful/field-editor-reference 4.3.9 → 4.3.10

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.
@@ -1541,7 +1541,8 @@ function useLinkActionsProps(props) {
1541
1541
  slide: slide,
1542
1542
  index: index
1543
1543
  });
1544
- }, [entityType, props.onCreate, props.onAction]);
1544
+ }, // eslint-disable-next-line react-hooks/exhaustive-deps -- TODO: Evaluate the dependencies
1545
+ [entityType, props.onCreate, props.onAction]);
1545
1546
  var onLinkedExisting = useCallback(function (entities, index) {
1546
1547
  if (index === void 0) {
1547
1548
  index = itemsLength;
@@ -1558,7 +1559,8 @@ function useLinkActionsProps(props) {
1558
1559
  index: index === undefined ? undefined : index + i
1559
1560
  });
1560
1561
  });
1561
- }, [entityType, props.onLink, props.onAction]);
1562
+ }, // eslint-disable-next-line react-hooks/exhaustive-deps -- TODO: Evaluate the dependencies
1563
+ [entityType, props.onLink, props.onAction]);
1562
1564
  var onCreate = useCallback( /*#__PURE__*/function () {
1563
1565
  var _ref = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(contentTypeId, index) {
1564
1566
  var _yield$createEntity, entity, slide;
@@ -1680,7 +1682,7 @@ function useLinkActionsProps(props) {
1680
1682
  return function onLinkSeveralExisting(_x4) {
1681
1683
  return _ref3.apply(this, arguments);
1682
1684
  };
1683
- }(); // FIXME: The memoization might rerun every time due to the always changing callback identities above
1685
+ }(); // FIXME: The memoization might rerun every time due to the always changing callback identities above
1684
1686
 
1685
1687
 
1686
1688
  return useMemo(function () {
@@ -1700,7 +1702,9 @@ function useLinkActionsProps(props) {
1700
1702
  onLinkedExisting: onLinkedExisting,
1701
1703
  itemsLength: itemsLength
1702
1704
  };
1703
- }, [entityType, canLinkMultiple, isDisabled, isEmpty, isFull, editorPermissions.canCreateEntity, editorPermissions.canLinkEntity, actionLabels, editorPermissions.creatableContentTypes.map(function (ct) {
1705
+ }, // eslint-disable-next-line react-hooks/exhaustive-deps -- TODO: Evaluate the dependencies
1706
+ [entityType, canLinkMultiple, isDisabled, isEmpty, isFull, editorPermissions.canCreateEntity, editorPermissions.canLinkEntity, actionLabels, // eslint-disable-next-line react-hooks/exhaustive-deps -- TODO: Evaluate the dependencies
1707
+ editorPermissions.creatableContentTypes.map(function (ct) {
1704
1708
  return ct.sys.id;
1705
1709
  }).join(':'), onCreate, onLinkExisting, onLinkSeveralExisting, onCreated, onLinkedExisting, itemsLength]);
1706
1710
  }
@@ -1714,7 +1718,7 @@ function LinkEntityActions(_ref4) {
1714
1718
  return renderLinkActions(props);
1715
1719
  }
1716
1720
 
1717
- // eslint-disable-next-line no-restricted-imports
1721
+ // eslint-disable-next-line -- TODO: describe this disable no-restricted-imports
1718
1722
  /**
1719
1723
  * @param {Date|string} date A valid constructor argument for moment()
1720
1724
  * @param {boolean=} short Render only Today/Tomorrow/Yesterday if valid. Defaults to false
@@ -1794,7 +1798,7 @@ var ScheduledIconWithTooltip = function ScheduledIconWithTooltip(_ref) {
1794
1798
  });
1795
1799
  }); // This should only be ever called once. Following the eslint hint to add used
1796
1800
  // dependencies will cause page freeze (infinite loop)
1797
- // eslint-disable-next-line
1801
+ // eslint-disable-next-line -- TODO: describe this disable
1798
1802
  }, []);
1799
1803
 
1800
1804
  if (status.type === 'loading' || status.type === 'error') {
@@ -1990,7 +1994,7 @@ function useEntitiesStore(props) {
1990
1994
  }
1991
1995
  });
1992
1996
  }
1993
- });
1997
+ }); // eslint-disable-next-line react-hooks/exhaustive-deps -- TODO: Evaluate the dependencies
1994
1998
  }, [props.sdk, state.assets, state.entries]);
1995
1999
  return _extends({
1996
2000
  getOrLoadEntry: getOrLoadEntry,
@@ -2172,7 +2176,7 @@ function useContentTypePermissions(props) {
2172
2176
  return _checkContentTypeAccess.apply(this, arguments);
2173
2177
  }
2174
2178
 
2175
- void checkContentTypeAccess();
2179
+ void checkContentTypeAccess(); // eslint-disable-next-line react-hooks/exhaustive-deps -- TODO: Evaluate the dependencies
2176
2180
  }, [availableContentTypes]);
2177
2181
  return {
2178
2182
  creatableContentTypes: creatableContentTypes,
@@ -2184,7 +2188,7 @@ function useContentTypePermissions(props) {
2184
2188
  function fromFieldValidations(field) {
2185
2189
  var _field$items$validati, _field$items, _linkContentTypeValid, _linkMimetypeGroupVal;
2186
2190
 
2187
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2191
+ // eslint-disable-next-line -- TODO: describe this disable @typescript-eslint/no-explicit-any
2188
2192
  var validations = [].concat(field.validations, (_field$items$validati = (_field$items = field.items) == null ? void 0 : _field$items.validations) != null ? _field$items$validati : []);
2189
2193
  var linkContentTypeValidations = validations.find(function (v) {
2190
2194
  return 'linkContentType' in v;
@@ -2312,7 +2316,7 @@ function useEditorPermissions(props) {
2312
2316
  return _checkCreateAccess.apply(this, arguments);
2313
2317
  }
2314
2318
 
2315
- void checkCreateAccess();
2319
+ void checkCreateAccess(); // eslint-disable-next-line react-hooks/exhaustive-deps -- TODO: Evaluate the dependencies
2316
2320
  }, [entityType, parameters.instance, creatableContentTypes]);
2317
2321
  useEffect(function () {
2318
2322
  if (parameters.instance.showLinkEntityAction === false) {
@@ -2374,7 +2378,7 @@ function useEditorPermissions(props) {
2374
2378
  return _checkLinkAccess.apply(this, arguments);
2375
2379
  }
2376
2380
 
2377
- void checkLinkAccess();
2381
+ void checkLinkAccess(); // eslint-disable-next-line react-hooks/exhaustive-deps -- TODO: Evaluate the dependencies
2378
2382
  }, [entityType, parameters.instance, readableContentTypes]);
2379
2383
  return {
2380
2384
  canCreateEntity: canCreateEntity,
@@ -2418,7 +2422,8 @@ function Editor(props) {
2418
2422
 
2419
2423
  var customCardRenderer = useCallback(function (cardProps, _, renderDefaultCard) {
2420
2424
  return props.renderCustomCard ? props.renderCustomCard(cardProps, linkActionsProps, renderDefaultCard) : false;
2421
- }, [linkActionsProps]);
2425
+ }, // eslint-disable-next-line react-hooks/exhaustive-deps -- TODO: Evaluate the dependencies
2426
+ [linkActionsProps]);
2422
2427
 
2423
2428
  if (!props.entityId) {
2424
2429
  return createElement(LinkEntityActions, Object.assign({
@@ -2637,7 +2642,7 @@ function FetchingWrappedEntryCard(props) {
2637
2642
  entries = _useEntities.entries;
2638
2643
 
2639
2644
  useEffect(function () {
2640
- getOrLoadEntry(props.entryId);
2645
+ getOrLoadEntry(props.entryId); // eslint-disable-next-line react-hooks/exhaustive-deps -- TODO: Evaluate the dependencies
2641
2646
  }, [props.entryId]);
2642
2647
  var size = props.viewType === 'link' ? 'small' : 'default';
2643
2648
  var entry = entries[props.entryId];
@@ -2695,7 +2700,8 @@ function FetchingWrappedEntryCard(props) {
2695
2700
  type: 'rendered',
2696
2701
  entity: 'Entry'
2697
2702
  });
2698
- }
2703
+ } // eslint-disable-next-line react-hooks/exhaustive-deps -- TODO: Evaluate the dependencies
2704
+
2699
2705
  }, [entry]);
2700
2706
  return useMemo(function () {
2701
2707
  if (entry === 'failed') {
@@ -2769,7 +2775,7 @@ function FetchingWrappedEntryCard(props) {
2769
2775
  }
2770
2776
  }
2771
2777
 
2772
- return renderDefaultCard();
2778
+ return renderDefaultCard(); // eslint-disable-next-line react-hooks/exhaustive-deps -- TODO: Evaluate the dependencies
2773
2779
  }, [props, entityKey]);
2774
2780
  }
2775
2781
 
@@ -2868,7 +2874,8 @@ function Editor$1(props) {
2868
2874
  }));
2869
2875
  var customCardRenderer = useCallback(function (cardProps, _, renderDefaultCard) {
2870
2876
  return props.renderCustomCard ? props.renderCustomCard(cardProps, linkActionsProps, renderDefaultCard) : false;
2871
- }, [linkActionsProps]);
2877
+ }, // eslint-disable-next-line react-hooks/exhaustive-deps -- TODO: Evaluate the dependencies
2878
+ [linkActionsProps]);
2872
2879
  return createElement(Fragment, null, props.children(_extends({}, props, {
2873
2880
  onSortStart: onSortStart,
2874
2881
  onSortEnd: onSortEnd,
@@ -3039,7 +3046,7 @@ var styles$3 = {
3039
3046
  };
3040
3047
  var defaultProps$1 = {
3041
3048
  isClickable: true
3042
- }; // eslint-disable-next-line @typescript-eslint/no-explicit-any
3049
+ }; // eslint-disable-next-line -- TODO: describe this disable @typescript-eslint/no-explicit-any
3043
3050
 
3044
3051
  function getFileType(file) {
3045
3052
  if (!file) {
@@ -3200,7 +3207,7 @@ function FetchingWrappedAssetCard(props) {
3200
3207
  assets = _useEntities.assets;
3201
3208
 
3202
3209
  useEffect(function () {
3203
- getOrLoadAsset(props.assetId);
3210
+ getOrLoadAsset(props.assetId); // eslint-disable-next-line react-hooks/exhaustive-deps -- TODO: Evaluate the dependencies
3204
3211
  }, [props.assetId]);
3205
3212
  var asset = assets[props.assetId];
3206
3213
  var entityKey = asset === 'failed' ? 'failed' : asset === undefined ? 'undefined' : ":" + asset.sys.id + ":" + asset.sys.version;
@@ -3210,7 +3217,8 @@ function FetchingWrappedAssetCard(props) {
3210
3217
  type: 'rendered',
3211
3218
  entity: 'Asset'
3212
3219
  });
3213
- }
3220
+ } // eslint-disable-next-line react-hooks/exhaustive-deps -- TODO: Evaluate the dependencies
3221
+
3214
3222
  }, [asset]);
3215
3223
 
3216
3224
  var onEdit = /*#__PURE__*/function () {
@@ -3342,7 +3350,7 @@ function FetchingWrappedAssetCard(props) {
3342
3350
  }
3343
3351
  }
3344
3352
 
3345
- return renderDefaultCard();
3353
+ return renderDefaultCard(); // eslint-disable-next-line react-hooks/exhaustive-deps -- TODO: Evaluate the dependencies
3346
3354
  }, [props, entityKey]);
3347
3355
  }
3348
3356