@contentful/field-editor-reference 4.4.0 → 4.6.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/index.d.ts CHANGED
@@ -4,3 +4,4 @@ export { SingleMediaEditor, MultipleMediaEditor, WrappedAssetCard } from './asse
4
4
  export { EntityProvider, useEntities } from './common/EntityStore';
5
5
  export type { CustomActionProps } from './common/ReferenceEditor';
6
6
  export type { CustomEntityCardProps, DefaultCardRenderer, MissingEntityCardProps, RenderCustomMissingEntityCard, } from './common/customCardTypes';
7
+ export { SortableLinkList } from './common/SortableLinkList';
package/dist/types.d.ts CHANGED
@@ -1,8 +1,31 @@
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 type { ResourceInfo } from './common/EntityStore';
8
+ export declare type Entity = Entry | Asset;
9
+ export declare type EntryLink = {
10
+ sys: {
11
+ type: 'Link';
12
+ linkType: 'Entry';
13
+ id: string;
14
+ };
15
+ };
16
+ export declare type AssetLink = {
17
+ sys: {
18
+ type: 'Link';
19
+ linkType: 'Asset';
20
+ id: string;
21
+ };
22
+ };
23
+ export declare type EntityLink = EntryLink | AssetLink;
24
+ export declare type ResourceType = 'Contentful:Entry';
25
+ export declare type Resource = Entry | Asset;
26
+ /**
27
+ * @deprecated use `EntityLink` type
28
+ */
6
29
  export declare type ReferenceValue = {
7
30
  sys: {
8
31
  type: 'Link';
@@ -10,6 +33,9 @@ export declare type ReferenceValue = {
10
33
  linkType: ContentEntityType;
11
34
  };
12
35
  };
36
+ /**
37
+ * @deprecated use `EntryLink` type
38
+ */
13
39
  export declare type EntryReferenceValue = {
14
40
  sys: {
15
41
  type: 'Link';
@@ -17,6 +43,9 @@ export declare type EntryReferenceValue = {
17
43
  linkType: 'Entry';
18
44
  };
19
45
  };
46
+ /**
47
+ * @deprecated use `AssetLink` type
48
+ */
20
49
  export declare type AssetReferenceValue = {
21
50
  sys: {
22
51
  type: 'Link';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/field-editor-reference",
3
- "version": "4.4.0",
3
+ "version": "4.6.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": "3a8e906e1176c6a78ab9a7dff53138aa67f42e37"
59
+ "gitHead": "e7cd35347c9438108b89a0372cde1b6a0b276cf6"
59
60
  }
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import { ReferenceValue } from '../types';
3
- import { ReferenceEditorProps } from '../common/ReferenceEditor';
4
- export declare const SortableLinkList: React.ComponentClass<ReferenceEditorProps & {
5
- items: ReferenceValue[];
6
- setValue: (value: ReferenceValue[]) => void;
7
- isDisabled: boolean;
8
- } & import("react-sortable-hoc").SortableContainerProps, any>;
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import { ContentType, ReferenceValue } from '../types';
3
- import { ReferenceEditorProps } from '../common/ReferenceEditor';
4
- export declare const SortableLinkList: React.ComponentClass<ReferenceEditorProps & {
5
- items: ReferenceValue[];
6
- setValue: (value: ReferenceValue[]) => void;
7
- isDisabled: boolean;
8
- allContentTypes: ContentType[];
9
- onMove: (oldIndex: number, newIndex: number) => void;
10
- } & import("react-sortable-hoc").SortableContainerProps, any>;