@contentful/field-editor-reference 4.6.1 → 4.6.4

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.
@@ -1924,7 +1924,7 @@ var nonNilResources = function nonNilResources(map) {
1924
1924
 
1925
1925
  function useEntitiesStore(props) {
1926
1926
  var spaceId = props.sdk.ids.space;
1927
- var environmentId = props.sdk.ids.environment;
1927
+ var environmentId = props.sdk.ids.environmentAlias || props.sdk.ids.environment;
1928
1928
 
1929
1929
  var _React$useState = useState(function () {
1930
1930
  return createClient({
@@ -3332,14 +3332,18 @@ var SortableLinkListInternal = /*#__PURE__*/SortableContainer(function (props) {
3332
3332
  }); // HOC does not support generics, so we mimic it via additional component
3333
3333
 
3334
3334
  function SortableLinkList(props) {
3335
- return React__default.createElement(SortableLinkListInternal, Object.assign({}, props), props.children);
3335
+ // with the default distance of 0 the drag start event is "confused" with the click event,
3336
+ // so the latter one isn't fired and click handlers on child elements don't work
3337
+ return React__default.createElement(SortableLinkListInternal, Object.assign({
3338
+ distance: 1
3339
+ }, props), props.children);
3336
3340
  }
3337
3341
 
3338
3342
  function MultipleEntryReferenceEditor(props) {
3339
3343
  return createElement(MultipleReferenceEditor, Object.assign({}, props, {
3340
3344
  entityType: "Entry"
3341
3345
  }), function (childrenProps) {
3342
- return createElement(SortableLinkList, Object.assign({}, props, childrenProps, {
3346
+ return createElement(SortableLinkList, Object.assign({}, childrenProps, {
3343
3347
  axis: "y",
3344
3348
  useDragHandle: true
3345
3349
  }), function (_ref) {
@@ -3349,7 +3353,7 @@ function MultipleEntryReferenceEditor(props) {
3349
3353
  isDisabled = _ref.isDisabled,
3350
3354
  DragHandle = _ref.DragHandle;
3351
3355
  var lastIndex = items.length - 1;
3352
- return createElement(FetchingWrappedEntryCard, Object.assign({}, props, {
3356
+ return createElement(FetchingWrappedEntryCard, Object.assign({}, childrenProps, {
3353
3357
  key: item.sys.id + "-" + index,
3354
3358
  index: index,
3355
3359
  allContentTypes: childrenProps.allContentTypes,
@@ -3801,7 +3805,7 @@ function MultipleMediaEditor(props) {
3801
3805
  index = _ref.index,
3802
3806
  isDisabled = _ref.isDisabled,
3803
3807
  DragHandle = _ref.DragHandle;
3804
- return createElement(FetchingWrappedAssetCard, Object.assign({}, props, {
3808
+ return createElement(FetchingWrappedAssetCard, Object.assign({}, childrenProps, {
3805
3809
  isDisabled: isDisabled,
3806
3810
  key: item.sys.id + "-" + index,
3807
3811
  assetId: item.sys.id,