@contentful/field-editor-reference 4.6.3 → 4.6.6
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 +16 -0
- package/dist/__fixtures__/FakeSdk.d.ts +6 -88
- package/dist/components/MissingEntityCard/styles.d.ts +0 -1
- package/dist/field-editor-reference.cjs.development.js +12 -11
- package/dist/field-editor-reference.cjs.development.js.map +1 -1
- package/dist/field-editor-reference.cjs.production.min.js +1 -1
- package/dist/field-editor-reference.cjs.production.min.js.map +1 -1
- package/dist/field-editor-reference.esm.js +13 -12
- package/dist/field-editor-reference.esm.js.map +1 -1
- package/package.json +2 -2
|
@@ -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,
|
|
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
|
|
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({
|
|
@@ -2815,14 +2812,18 @@ var styles$1 = {
|
|
|
2815
2812
|
spaceName: /*#__PURE__*/css({
|
|
2816
2813
|
color: tokens.gray700,
|
|
2817
2814
|
fontSize: tokens.fontSizeS,
|
|
2818
|
-
fontWeight: tokens.fontWeightDemiBold
|
|
2815
|
+
fontWeight: tokens.fontWeightDemiBold,
|
|
2816
|
+
maxWidth: '80px',
|
|
2817
|
+
textOverflow: 'ellipsis',
|
|
2818
|
+
overflow: 'hidden',
|
|
2819
|
+
whiteSpace: 'nowrap'
|
|
2819
2820
|
})
|
|
2820
2821
|
};
|
|
2821
2822
|
function SpaceName(props) {
|
|
2822
2823
|
return createElement(Tooltip, {
|
|
2823
2824
|
placement: "top",
|
|
2824
2825
|
as: "div",
|
|
2825
|
-
content: "Space"
|
|
2826
|
+
content: "Space: " + props.spaceName
|
|
2826
2827
|
}, createElement(Flex, {
|
|
2827
2828
|
alignItems: "center",
|
|
2828
2829
|
gap: "spacingXs",
|