@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
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [4.6.6](https://github.com/contentful/field-editors/compare/@contentful/field-editor-reference@4.6.5...@contentful/field-editor-reference@4.6.6) (2022-07-22)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- truncate long space names on entry card [DANTE-634] ([#1198](https://github.com/contentful/field-editors/issues/1198)) ([5f81224](https://github.com/contentful/field-editors/commit/5f81224a29c8eac3638c57f968e79bb747afa028))
|
|
11
|
+
|
|
12
|
+
## [4.6.5](https://github.com/contentful/field-editors/compare/@contentful/field-editor-reference@4.6.4...@contentful/field-editor-reference@4.6.5) (2022-07-21)
|
|
13
|
+
|
|
14
|
+
**Note:** Version bump only for package @contentful/field-editor-reference
|
|
15
|
+
|
|
16
|
+
## [4.6.4](https://github.com/contentful/field-editors/compare/@contentful/field-editor-reference@4.6.3...@contentful/field-editor-reference@4.6.4) (2022-07-21)
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
- check the env alias for the field editor reference [ZEND-2488] ([#1194](https://github.com/contentful/field-editors/issues/1194)) ([0b8e1c7](https://github.com/contentful/field-editors/commit/0b8e1c7dc0ecc3644332fd89ef2daaff275655cb))
|
|
21
|
+
|
|
6
22
|
## [4.6.3](https://github.com/contentful/field-editors/compare/@contentful/field-editor-reference@4.6.2...@contentful/field-editor-reference@4.6.3) (2022-07-19)
|
|
7
23
|
|
|
8
24
|
### Bug Fixes
|
|
@@ -1,88 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
getEntityScheduledActions(): Promise<never[]>;
|
|
8
|
-
getCachedContentTypes: () => import("@contentful/app-sdk").ContentType[];
|
|
9
|
-
getContentType: (id: string) => Promise<import("@contentful/app-sdk").ContentType>;
|
|
10
|
-
getContentTypes: <Query extends import("@contentful/app-sdk").SearchQuery = import("@contentful/app-sdk").SearchQuery>(query?: Query | undefined) => Promise<import("@contentful/app-sdk").CollectionResponse<import("@contentful/app-sdk").ContentType>>;
|
|
11
|
-
createContentType: (data: import("@contentful/app-sdk").WithOptionalId<import("@contentful/app-sdk").ContentType>) => Promise<import("@contentful/app-sdk").ContentType>;
|
|
12
|
-
updateContentType: (data: import("@contentful/app-sdk").ContentType) => Promise<import("@contentful/app-sdk").ContentType>;
|
|
13
|
-
deleteContentType: (contentTypeId: string) => Promise<void>;
|
|
14
|
-
getEntry: <Fields extends Record<string, any> = Record<string, any>>(id: string) => Promise<import("@contentful/app-sdk").Entry<Fields>>;
|
|
15
|
-
getEntrySnapshots: <Fields_1 extends Record<string, any> = Record<string, any>>(id: string) => Promise<import("@contentful/app-sdk").CollectionResponse<{
|
|
16
|
-
sys: {
|
|
17
|
-
space?: Link<string, string> | undefined;
|
|
18
|
-
status?: Link<string, string> | undefined;
|
|
19
|
-
publishedVersion?: number | undefined;
|
|
20
|
-
archivedVersion?: number | undefined;
|
|
21
|
-
archivedBy?: Link<string, string> | undefined;
|
|
22
|
-
archivedAt?: string | undefined;
|
|
23
|
-
deletedVersion?: number | undefined;
|
|
24
|
-
deletedBy?: Link<string, string> | undefined;
|
|
25
|
-
deletedAt?: string | undefined;
|
|
26
|
-
snapshotType: string;
|
|
27
|
-
snapshotEntityType: string;
|
|
28
|
-
};
|
|
29
|
-
snapshot: import("@contentful/app-sdk").Entry<Fields_1>;
|
|
30
|
-
}>>;
|
|
31
|
-
getEntries: <Fields_2, Query_1 extends import("@contentful/app-sdk").SearchQuery = import("@contentful/app-sdk").SearchQuery>(query?: Query_1 | undefined) => Promise<import("@contentful/app-sdk").CollectionResponse<import("@contentful/app-sdk").Entry<Fields_2>>>;
|
|
32
|
-
createEntry: <Fields_3>(contentTypeId: string, data: import("@contentful/app-sdk").WithOptionalId<import("@contentful/app-sdk").Entry<Fields_3>>) => Promise<import("@contentful/app-sdk").Entry<Fields_3>>;
|
|
33
|
-
updateEntry: <Fields_4 extends Record<string, any> = Record<string, any>>(data: import("@contentful/app-sdk").Entry<Fields_4>) => Promise<import("@contentful/app-sdk").Entry<Fields_4>>;
|
|
34
|
-
publishEntry: <Fields_5 extends Record<string, any> = Record<string, any>>(data: import("@contentful/app-sdk").Entry<Fields_5>) => Promise<import("@contentful/app-sdk").Entry<Fields_5>>;
|
|
35
|
-
unpublishEntry: <Fields_6 extends Record<string, any> = Record<string, any>>(data: import("@contentful/app-sdk").Entry<Fields_6>) => Promise<import("@contentful/app-sdk").Entry<Fields_6>>;
|
|
36
|
-
archiveEntry: <Fields_7 extends Record<string, any> = Record<string, any>>(data: import("@contentful/app-sdk").Entry<Fields_7>) => Promise<import("@contentful/app-sdk").Entry<Fields_7>>;
|
|
37
|
-
unarchiveEntry: <Fields_8 extends Record<string, any> = Record<string, any>>(data: import("@contentful/app-sdk").Entry<Fields_8>) => Promise<import("@contentful/app-sdk").Entry<Fields_8>>;
|
|
38
|
-
deleteEntry: <Fields_9 extends Record<string, any> = Record<string, any>>(data: import("@contentful/app-sdk").Entry<Fields_9>) => Promise<void>;
|
|
39
|
-
getPublishedEntries: <Fields_10, Query_2 extends import("@contentful/app-sdk").SearchQuery = import("@contentful/app-sdk").SearchQuery>(query?: Query_2 | undefined) => Promise<import("@contentful/app-sdk").CollectionResponse<import("@contentful/app-sdk").Entry<Fields_10>>>;
|
|
40
|
-
getAsset: (id: string) => Promise<import("@contentful/app-sdk").Asset>;
|
|
41
|
-
getAssets: <Query_3 extends import("@contentful/app-sdk").SearchQuery = import("@contentful/app-sdk").SearchQuery>(query?: Query_3 | undefined) => Promise<import("@contentful/app-sdk").CollectionResponse<import("@contentful/app-sdk").Asset>>;
|
|
42
|
-
createAsset: (data: import("@contentful/app-sdk").WithOptionalId<import("@contentful/app-sdk").Asset>) => Promise<import("@contentful/app-sdk").Asset>;
|
|
43
|
-
updateAsset: (data: import("@contentful/app-sdk").Asset) => Promise<import("@contentful/app-sdk").Asset>;
|
|
44
|
-
deleteAsset: (data: import("@contentful/app-sdk").Asset) => Promise<void>;
|
|
45
|
-
publishAsset: (data: import("@contentful/app-sdk").Asset) => Promise<import("@contentful/app-sdk").Asset>;
|
|
46
|
-
unpublishAsset: (data: import("@contentful/app-sdk").Asset) => Promise<import("@contentful/app-sdk").Asset>;
|
|
47
|
-
archiveAsset: (data: import("@contentful/app-sdk").Asset) => Promise<import("@contentful/app-sdk").Asset>;
|
|
48
|
-
processAsset: (data: import("@contentful/app-sdk").Asset, locale: string) => Promise<import("@contentful/app-sdk").Asset>;
|
|
49
|
-
unarchiveAsset: (data: import("@contentful/app-sdk").Asset) => Promise<import("@contentful/app-sdk").Asset>;
|
|
50
|
-
getPublishedAssets: <Query_4 extends import("@contentful/app-sdk").SearchQuery = import("@contentful/app-sdk").SearchQuery>(query?: Query_4 | undefined) => Promise<import("@contentful/app-sdk").CollectionResponse<import("@contentful/app-sdk").Asset>>;
|
|
51
|
-
createUpload: (base64data: string) => Promise<import("contentful-management").UploadProps>;
|
|
52
|
-
waitUntilAssetProcessed: (assetId: string, locale: string) => Promise<import("@contentful/app-sdk").Asset>;
|
|
53
|
-
getUsers: () => Promise<import("@contentful/app-sdk").CollectionResponse<import("@contentful/app-sdk").User>>;
|
|
54
|
-
getEditorInterface: (contentTypeId: string) => Promise<import("@contentful/app-sdk").EditorInterface>;
|
|
55
|
-
getEditorInterfaces: () => Promise<import("@contentful/app-sdk").CollectionResponse<import("@contentful/app-sdk").EditorInterface>>;
|
|
56
|
-
getAllScheduledActions: () => Promise<import("@contentful/app-sdk").ScheduledAction[]>;
|
|
57
|
-
signRequest: (request: import("@contentful/app-sdk").CanonicalRequest) => Promise<Record<string, string>>;
|
|
58
|
-
createTag: (id: string, name: string, visibility?: "private" | "public" | undefined) => Promise<import("@contentful/app-sdk").Tag>;
|
|
59
|
-
readTags: (skip: number, limit: number) => Promise<import("@contentful/app-sdk").CollectionResponse<import("@contentful/app-sdk").Tag>>;
|
|
60
|
-
updateTag: (id: string, name: string, version: number) => Promise<import("@contentful/app-sdk").Tag>;
|
|
61
|
-
deleteTag: (id: string, version: number) => Promise<boolean>;
|
|
62
|
-
getTeams: (query: import("contentful-management").QueryOptions) => Promise<import("@contentful/app-sdk").CollectionResponse<import("contentful-management").TeamProps>>;
|
|
63
|
-
};
|
|
64
|
-
dialogs: {
|
|
65
|
-
selectSingleAsset: () => Promise<Link<string, string>>;
|
|
66
|
-
selectMultipleAssets: () => Promise<Link<string, string>[]>;
|
|
67
|
-
selectSingleEntry: () => Promise<Link<string, string>>;
|
|
68
|
-
selectMultipleEntries: () => Promise<Link<string, string>[]>;
|
|
69
|
-
};
|
|
70
|
-
navigator: {
|
|
71
|
-
openNewAsset: () => Promise<{
|
|
72
|
-
entity: Link<string, string>;
|
|
73
|
-
}>;
|
|
74
|
-
openAsset: () => Promise<{}>;
|
|
75
|
-
openNewEntry: () => Promise<{
|
|
76
|
-
entity: Link<string, string>;
|
|
77
|
-
}>;
|
|
78
|
-
openEntry: () => Promise<{}>;
|
|
79
|
-
onSlideInNavigation: () => () => {};
|
|
80
|
-
};
|
|
81
|
-
access: {
|
|
82
|
-
can: () => Promise<boolean>;
|
|
83
|
-
};
|
|
84
|
-
ids: {
|
|
85
|
-
space: string;
|
|
86
|
-
environment: string;
|
|
87
|
-
};
|
|
88
|
-
})[];
|
|
1
|
+
import { Emitter } from 'mitt';
|
|
2
|
+
import { FieldExtensionSDK } from '../types';
|
|
3
|
+
export declare type ReferenceEditorSdkProps = {
|
|
4
|
+
validations?: any;
|
|
5
|
+
};
|
|
6
|
+
export declare function newReferenceEditorFakeSdk(props?: ReferenceEditorSdkProps): [FieldExtensionSDK, Emitter];
|
|
@@ -627,30 +627,27 @@ var squareCard = /*#__PURE__*/emotion.css({
|
|
|
627
627
|
height: '160px',
|
|
628
628
|
textAlign: 'center'
|
|
629
629
|
});
|
|
630
|
-
var close = /*#__PURE__*/emotion.css({
|
|
631
|
-
position: 'absolute',
|
|
632
|
-
top: tokens.spacingS,
|
|
633
|
-
right: tokens.spacingS
|
|
634
|
-
});
|
|
635
630
|
|
|
636
631
|
function MissingEntityCard(props) {
|
|
637
632
|
return React__default.createElement(f36Components.Card, {
|
|
638
633
|
className: card
|
|
634
|
+
}, React__default.createElement(f36Components.Flex, {
|
|
635
|
+
alignItems: "center",
|
|
636
|
+
justifyContent: "space-between"
|
|
639
637
|
}, React__default.createElement("div", {
|
|
640
638
|
className: props.asSquare ? squareCard : ''
|
|
641
639
|
}, React__default.createElement(f36Components.SectionHeading, {
|
|
642
640
|
marginBottom: "none"
|
|
643
|
-
}, props.entityType
|
|
641
|
+
}, props.entityType, " is missing or inaccessible")), !props.isDisabled && props.onRemove && React__default.createElement(f36Components.IconButton, {
|
|
644
642
|
variant: "transparent",
|
|
645
643
|
icon: React__default.createElement(f36Icons.CloseIcon, {
|
|
646
644
|
variant: "muted"
|
|
647
645
|
}),
|
|
648
|
-
className: close,
|
|
649
646
|
"aria-label": "Delete",
|
|
650
647
|
onClick: function onClick() {
|
|
651
648
|
props.onRemove && props.onRemove();
|
|
652
649
|
}
|
|
653
|
-
}));
|
|
650
|
+
})));
|
|
654
651
|
}
|
|
655
652
|
|
|
656
653
|
function createCommonjsModule(fn, module) {
|
|
@@ -1931,7 +1928,7 @@ var nonNilResources = function nonNilResources(map) {
|
|
|
1931
1928
|
|
|
1932
1929
|
function useEntitiesStore(props) {
|
|
1933
1930
|
var spaceId = props.sdk.ids.space;
|
|
1934
|
-
var environmentId = props.sdk.ids.environment;
|
|
1931
|
+
var environmentId = props.sdk.ids.environmentAlias || props.sdk.ids.environment;
|
|
1935
1932
|
|
|
1936
1933
|
var _React$useState = React.useState(function () {
|
|
1937
1934
|
return contentfulManagement.createClient({
|
|
@@ -2822,14 +2819,18 @@ var styles$1 = {
|
|
|
2822
2819
|
spaceName: /*#__PURE__*/emotion.css({
|
|
2823
2820
|
color: tokens.gray700,
|
|
2824
2821
|
fontSize: tokens.fontSizeS,
|
|
2825
|
-
fontWeight: tokens.fontWeightDemiBold
|
|
2822
|
+
fontWeight: tokens.fontWeightDemiBold,
|
|
2823
|
+
maxWidth: '80px',
|
|
2824
|
+
textOverflow: 'ellipsis',
|
|
2825
|
+
overflow: 'hidden',
|
|
2826
|
+
whiteSpace: 'nowrap'
|
|
2826
2827
|
})
|
|
2827
2828
|
};
|
|
2828
2829
|
function SpaceName(props) {
|
|
2829
2830
|
return React.createElement(f36Components.Tooltip, {
|
|
2830
2831
|
placement: "top",
|
|
2831
2832
|
as: "div",
|
|
2832
|
-
content: "Space"
|
|
2833
|
+
content: "Space: " + props.spaceName
|
|
2833
2834
|
}, React.createElement(f36Components.Flex, {
|
|
2834
2835
|
alignItems: "center",
|
|
2835
2836
|
gap: "spacingXs",
|