@contentful/field-editor-reference 4.3.10 → 4.5.0

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/dist/types.d.ts CHANGED
@@ -1,8 +1,30 @@
1
1
  /// <reference types="react" />
2
2
  import { NavigatorSlideInfo, ContentEntityType } from '@contentful/app-sdk';
3
3
  import { Entry, Asset } from '@contentful/field-editor-shared';
4
- export { BaseExtensionSDK, FieldExtensionSDK, ContentType, ContentTypeField, Link, ContentEntityType, NavigatorSlideInfo, ScheduledAction, } from '@contentful/app-sdk';
4
+ export type { BaseExtensionSDK, FieldExtensionSDK, ContentType, ContentTypeField, Link, ContentEntityType, NavigatorSlideInfo, ScheduledAction, } from '@contentful/app-sdk';
5
+ export type { SpaceProps as Space } from 'contentful-management';
5
6
  export { Entry, File, Asset } from '@contentful/field-editor-shared';
7
+ export declare type Entity = Entry | Asset;
8
+ export declare type EntryLink = {
9
+ sys: {
10
+ type: 'Link';
11
+ linkType: 'Entry';
12
+ id: string;
13
+ };
14
+ };
15
+ export declare type AssetLink = {
16
+ sys: {
17
+ type: 'Link';
18
+ linkType: 'Asset';
19
+ id: string;
20
+ };
21
+ };
22
+ export declare type EntityLink = EntryLink | AssetLink;
23
+ export declare type ResourceType = 'Contentful:Entry';
24
+ export declare type Resource = Entry | Asset;
25
+ /**
26
+ * @deprecated use `EntityLink` type
27
+ */
6
28
  export declare type ReferenceValue = {
7
29
  sys: {
8
30
  type: 'Link';
@@ -10,6 +32,9 @@ export declare type ReferenceValue = {
10
32
  linkType: ContentEntityType;
11
33
  };
12
34
  };
35
+ /**
36
+ * @deprecated use `EntryLink` type
37
+ */
13
38
  export declare type EntryReferenceValue = {
14
39
  sys: {
15
40
  type: 'Link';
@@ -17,6 +42,9 @@ export declare type EntryReferenceValue = {
17
42
  linkType: 'Entry';
18
43
  };
19
44
  };
45
+ /**
46
+ * @deprecated use `AssetLink` type
47
+ */
20
48
  export declare type AssetReferenceValue = {
21
49
  sys: {
22
50
  type: 'Link';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/field-editor-reference",
3
- "version": "4.3.10",
3
+ "version": "4.5.0",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/field-editor-reference.esm.js",
6
6
  "typings": "dist/index.d.ts",
@@ -29,6 +29,7 @@
29
29
  "@types/deep-equal": "^1.0.1",
30
30
  "array-move": "^3.0.0",
31
31
  "constate": "3.2.0",
32
+ "contentful-management": "^10.8.0",
32
33
  "deep-equal": "2.0.5",
33
34
  "emotion": "^10.0.17",
34
35
  "lodash": "^4.17.15",
@@ -38,7 +39,7 @@
38
39
  },
39
40
  "devDependencies": {
40
41
  "@contentful/app-sdk": "^4.2.0",
41
- "@contentful/field-editor-test-utils": "^1.1.3",
42
+ "@contentful/field-editor-test-utils": "^1.2.0",
42
43
  "@testing-library/react-hooks": "^5.0.3"
43
44
  },
44
45
  "peerDependencies": {
@@ -55,5 +56,5 @@
55
56
  }
56
57
  }
57
58
  },
58
- "gitHead": "1d89ccc17095a0d9deffe66b1992d14e248fdaf6"
59
+ "gitHead": "6cee7fea6ac7d0f8cf1c6689ad8c95fc5814d85e"
59
60
  }