@contentful/field-editor-reference 4.6.2 → 4.6.5

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.
@@ -2,7 +2,7 @@ import React__default, { useState, useRef, useEffect, createElement, Fragment, u
2
2
  import { css, cx } from 'emotion';
3
3
  import tokens from '@contentful/f36-tokens';
4
4
  import get from 'lodash-es/get';
5
- import { Menu, TextInput, Button, Paragraph, Card, SectionHeading, IconButton, Tooltip, Flex, Text, EntryCard, MenuItem, MenuDivider, AssetCard } from '@contentful/f36-components';
5
+ import { Menu, TextInput, Button, Paragraph, Card, Flex, SectionHeading, IconButton, Tooltip, Text, EntryCard, MenuItem, MenuDivider, AssetCard } from '@contentful/f36-components';
6
6
  import { SearchIcon, PlusIcon, ChevronDownIcon, LinkIcon, CloseIcon, FolderOpenTrimmedIcon, ClockIcon } from '@contentful/f36-icons';
7
7
  import moment from 'moment';
8
8
  import deepEqual from 'deep-equal';
@@ -620,30 +620,27 @@ var squareCard = /*#__PURE__*/css({
620
620
  height: '160px',
621
621
  textAlign: 'center'
622
622
  });
623
- var close = /*#__PURE__*/css({
624
- position: 'absolute',
625
- top: tokens.spacingS,
626
- right: tokens.spacingS
627
- });
628
623
 
629
624
  function MissingEntityCard(props) {
630
625
  return React__default.createElement(Card, {
631
626
  className: card
627
+ }, React__default.createElement(Flex, {
628
+ alignItems: "center",
629
+ justifyContent: "space-between"
632
630
  }, React__default.createElement("div", {
633
631
  className: props.asSquare ? squareCard : ''
634
632
  }, React__default.createElement(SectionHeading, {
635
633
  marginBottom: "none"
636
- }, props.entityType === 'Entry' && 'Entry is missing or inaccessible', props.entityType === 'Asset' && 'Asset is missing or inaccessible')), !props.isDisabled && props.onRemove && React__default.createElement(IconButton, {
634
+ }, props.entityType, " is missing or inaccessible")), !props.isDisabled && props.onRemove && React__default.createElement(IconButton, {
637
635
  variant: "transparent",
638
636
  icon: React__default.createElement(CloseIcon, {
639
637
  variant: "muted"
640
638
  }),
641
- className: close,
642
639
  "aria-label": "Delete",
643
640
  onClick: function onClick() {
644
641
  props.onRemove && props.onRemove();
645
642
  }
646
- }));
643
+ })));
647
644
  }
648
645
 
649
646
  function createCommonjsModule(fn, module) {
@@ -1924,7 +1921,7 @@ var nonNilResources = function nonNilResources(map) {
1924
1921
 
1925
1922
  function useEntitiesStore(props) {
1926
1923
  var spaceId = props.sdk.ids.space;
1927
- var environmentId = props.sdk.ids.environment;
1924
+ var environmentId = props.sdk.ids.environmentAlias || props.sdk.ids.environment;
1928
1925
 
1929
1926
  var _React$useState = useState(function () {
1930
1927
  return createClient({
@@ -3343,7 +3340,7 @@ function MultipleEntryReferenceEditor(props) {
3343
3340
  return createElement(MultipleReferenceEditor, Object.assign({}, props, {
3344
3341
  entityType: "Entry"
3345
3342
  }), function (childrenProps) {
3346
- return createElement(SortableLinkList, Object.assign({}, props, childrenProps, {
3343
+ return createElement(SortableLinkList, Object.assign({}, childrenProps, {
3347
3344
  axis: "y",
3348
3345
  useDragHandle: true
3349
3346
  }), function (_ref) {
@@ -3353,7 +3350,7 @@ function MultipleEntryReferenceEditor(props) {
3353
3350
  isDisabled = _ref.isDisabled,
3354
3351
  DragHandle = _ref.DragHandle;
3355
3352
  var lastIndex = items.length - 1;
3356
- return createElement(FetchingWrappedEntryCard, Object.assign({}, props, {
3353
+ return createElement(FetchingWrappedEntryCard, Object.assign({}, childrenProps, {
3357
3354
  key: item.sys.id + "-" + index,
3358
3355
  index: index,
3359
3356
  allContentTypes: childrenProps.allContentTypes,
@@ -3805,7 +3802,7 @@ function MultipleMediaEditor(props) {
3805
3802
  index = _ref.index,
3806
3803
  isDisabled = _ref.isDisabled,
3807
3804
  DragHandle = _ref.DragHandle;
3808
- return createElement(FetchingWrappedAssetCard, Object.assign({}, props, {
3805
+ return createElement(FetchingWrappedAssetCard, Object.assign({}, childrenProps, {
3809
3806
  isDisabled: isDisabled,
3810
3807
  key: item.sys.id + "-" + index,
3811
3808
  assetId: item.sys.id,