@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/CHANGELOG.md +18 -0
- package/dist/__fixtures__/FakeSdk.d.ts +20 -151
- package/dist/assets/WrappedAssetCard/FetchingWrappedAssetCard.d.ts +1 -1
- package/dist/common/EntityStore.d.ts +7 -1
- package/dist/common/SortableLinkList.d.ts +19 -0
- package/dist/entries/WrappedEntryCard/FetchingWrappedEntryCard.d.ts +2 -2
- package/dist/field-editor-reference.cjs.development.js +509 -165
- 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 +510 -167
- package/dist/field-editor-reference.esm.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/types.d.ts +30 -1
- package/package.json +4 -3
- package/dist/assets/SortableElements.d.ts +0 -8
- package/dist/entries/SortableElements.d.ts +0 -10
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.
|
|
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.
|
|
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": "
|
|
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>;
|