@contentful/field-editor-reference 5.6.0 → 5.8.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.
@@ -1597,7 +1597,8 @@ function _selectMultipleEntities() {
1597
1597
  return _selectMultipleEntities.apply(this, arguments);
1598
1598
  }
1599
1599
 
1600
- var _excluded = ["renderCustomActions"];
1600
+ var _excluded = ["renderCustomActions"],
1601
+ _excluded2 = ["renderCustomActions"];
1601
1602
  function useLinkActionsProps(props) {
1602
1603
  var _editorPermissions$va;
1603
1604
 
@@ -1796,10 +1797,13 @@ function LinkEntityActions(_ref4) {
1796
1797
  var renderCustomActions = _ref4.renderCustomActions,
1797
1798
  props = _objectWithoutPropertiesLoose(_ref4, _excluded);
1798
1799
 
1799
- var renderLinkActions = renderCustomActions ? renderCustomActions : function (props) {
1800
- return createElement(LinkActions, _extends({}, props));
1801
- };
1802
- return renderLinkActions(props);
1800
+ return renderCustomActions ? renderCustomActions(props) : createElement(LinkActions, _extends({}, props));
1801
+ }
1802
+ function CombinedLinkEntityActions(_ref5) {
1803
+ var renderCustomActions = _ref5.renderCustomActions,
1804
+ props = _objectWithoutPropertiesLoose(_ref5, _excluded2);
1805
+
1806
+ return renderCustomActions ? renderCustomActions(props) : createElement(CombinedLinkActions, _extends({}, props));
1803
1807
  }
1804
1808
 
1805
1809
  // eslint-disable-next-line -- TODO: describe this disable no-restricted-imports
@@ -1918,7 +1922,7 @@ function AssetThumbnail(props) {
1918
1922
  }
1919
1923
 
1920
1924
  var _excluded$1 = ["priority"],
1921
- _excluded2 = ["children"];
1925
+ _excluded2$1 = ["children"];
1922
1926
 
1923
1927
  var globalQueue = /*#__PURE__*/new PQueue({
1924
1928
  concurrency: 50
@@ -2368,7 +2372,7 @@ function useResource(resourceType, urn, options) {
2368
2372
 
2369
2373
  function EntityProvider(_ref9) {
2370
2374
  var children = _ref9.children,
2371
- props = _objectWithoutPropertiesLoose(_ref9, _excluded2);
2375
+ props = _objectWithoutPropertiesLoose(_ref9, _excluded2$1);
2372
2376
 
2373
2377
  var reactQueryClient = useMemo(function () {
2374
2378
  var queryCache = new QueryCache();
@@ -4231,7 +4235,9 @@ function ResourceEditor(props) {
4231
4235
  onSortEnd: onSortEnd,
4232
4236
  onMove: onMove,
4233
4237
  onRemoteItemAtIndex: onRemoteItemAtIndex
4234
- })), createElement(CombinedLinkActions, _extends({}, linkActionsProps)));
4238
+ })), createElement(CombinedLinkEntityActions, _extends({}, linkActionsProps, {
4239
+ renderCustomActions: props.renderCustomActions
4240
+ })));
4235
4241
  } // provides memoized callbacks bound to a given item
4236
4242
 
4237
4243
 
@@ -4279,6 +4285,7 @@ function MultipleResourceReferenceEditor(props) {
4279
4285
  items: value || EMPTY_ARRAY,
4280
4286
  isDisabled: disabled,
4281
4287
  setValue: setValue,
4288
+ renderCustomActions: props.renderCustomActions,
4282
4289
  key: externalReset + "-list"
4283
4290
  }), function (editorProps) {
4284
4291
  return createElement(SortableLinkList, _extends({}, editorProps), function (_ref4) {
@@ -4337,8 +4344,9 @@ function SingleResourceReferenceEditor(props) {
4337
4344
  resourceLink: value,
4338
4345
  isDisabled: disabled,
4339
4346
  getEntryRouteHref: props.getEntryRouteHref
4340
- }) : // TODO: support custom actions once publicly available
4341
- createElement(CombinedLinkActions, _extends({}, linkActionsProps));
4347
+ }) : createElement(CombinedLinkEntityActions, _extends({}, linkActionsProps, {
4348
+ renderCustomActions: props.renderCustomActions
4349
+ }));
4342
4350
  }));
4343
4351
  }
4344
4352