@contentful/field-editor-reference 4.6.5 → 4.6.8
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 +14 -0
- package/dist/__fixtures__/FakeSdk.d.ts +8 -88
- package/dist/field-editor-reference.cjs.development.js +10 -6
- 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 +10 -6
- package/dist/field-editor-reference.esm.js.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,20 @@
|
|
|
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.8](https://github.com/contentful/field-editors/compare/@contentful/field-editor-reference@4.6.7...@contentful/field-editor-reference@4.6.8) (2022-07-29)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @contentful/field-editor-reference
|
|
9
|
+
|
|
10
|
+
## [4.6.7](https://github.com/contentful/field-editors/compare/@contentful/field-editor-reference@4.6.6...@contentful/field-editor-reference@4.6.7) (2022-07-29)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @contentful/field-editor-reference
|
|
13
|
+
|
|
14
|
+
## [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)
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
- 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))
|
|
19
|
+
|
|
6
20
|
## [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)
|
|
7
21
|
|
|
8
22
|
**Note:** Version bump only for package @contentful/field-editor-reference
|
|
@@ -1,88 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
+
initialValue?: any;
|
|
5
|
+
validations?: any;
|
|
6
|
+
fetchDelay?: number;
|
|
7
|
+
};
|
|
8
|
+
export declare function newReferenceEditorFakeSdk(props?: ReferenceEditorSdkProps): [FieldExtensionSDK, Emitter];
|
|
@@ -400,6 +400,10 @@ var CreateEntryLinkButton = function CreateEntryLinkButton(_ref) {
|
|
|
400
400
|
});
|
|
401
401
|
};
|
|
402
402
|
|
|
403
|
+
function NoLinkPermissionsInfo() {
|
|
404
|
+
return React__default.createElement(f36Components.Paragraph, null, "You don't have permission to view this content or this field is not correctly configured. Contact your administrator for help.");
|
|
405
|
+
}
|
|
406
|
+
|
|
403
407
|
var container$1 = /*#__PURE__*/emotion.css({
|
|
404
408
|
display: 'flex',
|
|
405
409
|
width: '100%',
|
|
@@ -409,10 +413,6 @@ var separator = /*#__PURE__*/emotion.css({
|
|
|
409
413
|
marginRight: tokens.spacingXl
|
|
410
414
|
});
|
|
411
415
|
|
|
412
|
-
function NoLinkPermissionsInfo() {
|
|
413
|
-
return React__default.createElement(f36Components.Paragraph, null, "You don't have permission to view this content or this field is not correctly configured. Contact your administrator for help.");
|
|
414
|
-
}
|
|
415
|
-
|
|
416
416
|
var defaultEntryLabels = {
|
|
417
417
|
createNew: function createNew(props) {
|
|
418
418
|
return props != null && props.contentType ? "Create new " + props.contentType + " and link" : 'Create new entry and link';
|
|
@@ -2819,14 +2819,18 @@ var styles$1 = {
|
|
|
2819
2819
|
spaceName: /*#__PURE__*/emotion.css({
|
|
2820
2820
|
color: tokens.gray700,
|
|
2821
2821
|
fontSize: tokens.fontSizeS,
|
|
2822
|
-
fontWeight: tokens.fontWeightDemiBold
|
|
2822
|
+
fontWeight: tokens.fontWeightDemiBold,
|
|
2823
|
+
maxWidth: '80px',
|
|
2824
|
+
textOverflow: 'ellipsis',
|
|
2825
|
+
overflow: 'hidden',
|
|
2826
|
+
whiteSpace: 'nowrap'
|
|
2823
2827
|
})
|
|
2824
2828
|
};
|
|
2825
2829
|
function SpaceName(props) {
|
|
2826
2830
|
return React.createElement(f36Components.Tooltip, {
|
|
2827
2831
|
placement: "top",
|
|
2828
2832
|
as: "div",
|
|
2829
|
-
content: "Space"
|
|
2833
|
+
content: "Space: " + props.spaceName
|
|
2830
2834
|
}, React.createElement(f36Components.Flex, {
|
|
2831
2835
|
alignItems: "center",
|
|
2832
2836
|
gap: "spacingXs",
|