@contentful/field-editor-reference 2.21.0 → 4.0.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 +74 -406
- package/dist/assets/WrappedAssetCard/AssetCardActions.d.ts +2 -2
- package/dist/assets/WrappedAssetCard/FetchingWrappedAssetCard.d.ts +3 -3
- package/dist/assets/WrappedAssetCard/WrappedAssetCard.d.ts +3 -3
- package/dist/assets/WrappedAssetCard/WrappedAssetLink.d.ts +3 -3
- package/dist/common/customCardTypes.d.ts +2 -2
- package/dist/components/CreateEntryLinkButton/CreateEntryLinkButton.d.ts +2 -3
- package/dist/components/CreateEntryLinkButton/CreateEntryMenuTrigger.d.ts +2 -3
- package/dist/components/ScheduledIconWithTooltip/ScheduleTooltip.d.ts +2 -2
- package/dist/components/index.d.ts +1 -1
- package/dist/entries/WrappedEntryCard/FetchingWrappedEntryCard.d.ts +3 -3
- package/dist/entries/WrappedEntryCard/WrappedEntryCard.d.ts +3 -3
- package/dist/field-editor-reference.cjs.development.js +265 -362
- 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 +253 -350
- package/dist/field-editor-reference.esm.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/types.d.ts +5 -0
- package/package.json +7 -7
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import { File } from '../../types';
|
|
3
3
|
export declare function renderAssetInfo(props: {
|
|
4
4
|
entityFile: File;
|
|
5
|
-
}): JSX.Element;
|
|
5
|
+
}): ("" | JSX.Element)[];
|
|
6
6
|
export declare function renderActions(props: {
|
|
7
7
|
onEdit?: () => void;
|
|
8
8
|
onRemove?: () => void;
|
|
9
9
|
isDisabled: boolean;
|
|
10
10
|
entityFile?: File;
|
|
11
|
-
}): JSX.Element;
|
|
11
|
+
}): (JSX.Element | null)[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import { Action, FieldExtensionSDK, ViewType } from '../../types';
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Action, FieldExtensionSDK, ViewType, RenderDragFn } from '../../types';
|
|
3
3
|
import { CustomCardRenderer, RenderCustomMissingEntityCard } from '../../common/customCardTypes';
|
|
4
4
|
declare type FetchingWrappedAssetCardProps = {
|
|
5
5
|
assetId: string;
|
|
@@ -9,7 +9,7 @@ declare type FetchingWrappedAssetCardProps = {
|
|
|
9
9
|
onRemove: () => void;
|
|
10
10
|
getEntityUrl?: (id: string) => string;
|
|
11
11
|
onAction?: (action: Action) => void;
|
|
12
|
-
|
|
12
|
+
renderDragHandle?: RenderDragFn;
|
|
13
13
|
renderCustomCard?: CustomCardRenderer;
|
|
14
14
|
renderCustomMissingEntityCard?: RenderCustomMissingEntityCard;
|
|
15
15
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { SpaceAPI } from '@contentful/app-sdk';
|
|
3
|
-
import { Asset } from '../../types';
|
|
3
|
+
import { Asset, RenderDragFn } from '../../types';
|
|
4
4
|
export interface WrappedAssetCardProps {
|
|
5
5
|
getEntityScheduledActions: SpaceAPI['getEntityScheduledActions'];
|
|
6
6
|
asset: Asset;
|
|
@@ -13,7 +13,7 @@ export interface WrappedAssetCardProps {
|
|
|
13
13
|
onEdit?: () => void;
|
|
14
14
|
onRemove?: () => void;
|
|
15
15
|
size: 'default' | 'small';
|
|
16
|
-
|
|
16
|
+
renderDragHandle?: RenderDragFn;
|
|
17
17
|
isClickable: boolean;
|
|
18
18
|
}
|
|
19
19
|
export declare const WrappedAssetCard: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import { Asset } from '../../types';
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Asset, RenderDragFn } from '../../types';
|
|
3
3
|
import { SpaceAPI } from '@contentful/field-editor-shared';
|
|
4
4
|
export interface WrappedAssetLinkProps {
|
|
5
5
|
getEntityScheduledActions: SpaceAPI['getEntityScheduledActions'];
|
|
@@ -11,6 +11,6 @@ export interface WrappedAssetLinkProps {
|
|
|
11
11
|
isDisabled: boolean;
|
|
12
12
|
onEdit: () => void;
|
|
13
13
|
onRemove: () => void;
|
|
14
|
-
|
|
14
|
+
renderDragHandle?: RenderDragFn;
|
|
15
15
|
}
|
|
16
16
|
export declare const WrappedAssetLink: (props: WrappedAssetLinkProps) => JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Asset, ContentType, Entry } from '../types';
|
|
1
|
+
import { Asset, ContentType, Entry, RenderDragFn } from '../types';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { CustomActionProps } from './ReferenceEditor';
|
|
4
4
|
export declare type MissingEntityCardProps = {
|
|
@@ -20,7 +20,7 @@ export declare type CustomEntityCardProps = {
|
|
|
20
20
|
defaultLocaleCode: string;
|
|
21
21
|
isDisabled: boolean;
|
|
22
22
|
size: 'default' | 'small';
|
|
23
|
-
|
|
23
|
+
renderDragHandle?: RenderDragFn;
|
|
24
24
|
onEdit?: () => void;
|
|
25
25
|
onRemove?: () => void;
|
|
26
26
|
onMoveTop?: () => void;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ContentType } from '../../types';
|
|
3
|
-
import { CreateCustomEntryMenuItems } from './CreateEntryMenuTrigger';
|
|
4
3
|
interface CreateEntryLinkButtonProps {
|
|
5
4
|
contentTypes: ContentType[];
|
|
6
5
|
suggestedContentTypeId?: string;
|
|
7
6
|
onSelect: (contentTypeId: string) => Promise<unknown>;
|
|
8
|
-
|
|
7
|
+
customDropdownItems?: React.ReactNode;
|
|
9
8
|
disabled?: boolean;
|
|
10
9
|
hasPlusIcon?: boolean;
|
|
11
10
|
useExperimentalStyles?: boolean;
|
|
@@ -16,5 +15,5 @@ interface CreateEntryLinkButtonProps {
|
|
|
16
15
|
position: 'bottom-left' | 'bottom-right';
|
|
17
16
|
};
|
|
18
17
|
}
|
|
19
|
-
export declare const CreateEntryLinkButton: ({ contentTypes, onSelect,
|
|
18
|
+
export declare const CreateEntryLinkButton: ({ contentTypes, onSelect, customDropdownItems, text, testId, hasPlusIcon, useExperimentalStyles, suggestedContentTypeId, dropdownSettings, disabled, }: CreateEntryLinkButtonProps) => JSX.Element;
|
|
20
19
|
export {};
|
|
@@ -3,7 +3,6 @@ import { ContentType } from '../../types';
|
|
|
3
3
|
declare type CreateEntryMenuTriggerChildProps = {
|
|
4
4
|
isOpen: boolean;
|
|
5
5
|
isSelecting: boolean;
|
|
6
|
-
openMenu: Function;
|
|
7
6
|
};
|
|
8
7
|
export declare type CreateEntryMenuTriggerChild = (props: CreateEntryMenuTriggerChildProps) => React.ReactElement;
|
|
9
8
|
export declare type CreateCustomEntryMenuItems = ({ closeMenu, }: {
|
|
@@ -19,11 +18,11 @@ interface CreateEntryMenuTrigger {
|
|
|
19
18
|
isAutoalignmentEnabled?: boolean;
|
|
20
19
|
position: 'bottom-left' | 'bottom-right';
|
|
21
20
|
};
|
|
22
|
-
|
|
21
|
+
customDropdownItems?: React.ReactNode;
|
|
23
22
|
children: CreateEntryMenuTriggerChild;
|
|
24
23
|
}
|
|
25
24
|
export declare const CreateEntryMenuTrigger: {
|
|
26
|
-
({ contentTypes, suggestedContentTypeId, contentTypesLabel, onSelect, testId, dropdownSettings,
|
|
25
|
+
({ contentTypes, suggestedContentTypeId, contentTypesLabel, onSelect, testId, dropdownSettings, customDropdownItems, children, }: CreateEntryMenuTrigger): JSX.Element;
|
|
27
26
|
defaultProps: {
|
|
28
27
|
testId: string;
|
|
29
28
|
contentTypesLabel: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ScheduledAction } from '@contentful/app-sdk';
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const getScheduleTooltipContent: ({ job, jobsCount, }: {
|
|
4
4
|
job: ScheduledAction;
|
|
5
5
|
jobsCount: number;
|
|
6
|
-
}) =>
|
|
6
|
+
}) => string;
|
|
7
7
|
export declare const ScheduleTooltip: ({ job, jobsCount, children, }: {
|
|
8
8
|
job: ScheduledAction;
|
|
9
9
|
jobsCount: number;
|
|
@@ -5,5 +5,5 @@ export { LinkEntityActions } from './LinkActions/LinkEntityActions';
|
|
|
5
5
|
export { CreateEntryLinkButton } from './CreateEntryLinkButton/CreateEntryLinkButton';
|
|
6
6
|
export { CreateEntryMenuTrigger } from './CreateEntryLinkButton/CreateEntryMenuTrigger';
|
|
7
7
|
export { ScheduledIconWithTooltip } from './ScheduledIconWithTooltip/ScheduledIconWithTooltip';
|
|
8
|
-
export {
|
|
8
|
+
export { getScheduleTooltipContent } from './ScheduledIconWithTooltip/ScheduleTooltip';
|
|
9
9
|
export { AssetThumbnail } from './AssetThumbnail/AssetThumbnail';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import { ContentType } from '../../types';
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ContentType, RenderDragFn } from '../../types';
|
|
3
3
|
import { ReferenceEditorProps } from '../../common/ReferenceEditor';
|
|
4
4
|
import { RenderCustomMissingEntityCard } from '../../common/customCardTypes';
|
|
5
5
|
export declare type EntryCardReferenceEditorProps = ReferenceEditorProps & {
|
|
@@ -8,7 +8,7 @@ export declare type EntryCardReferenceEditorProps = ReferenceEditorProps & {
|
|
|
8
8
|
allContentTypes: ContentType[];
|
|
9
9
|
isDisabled: boolean;
|
|
10
10
|
onRemove: () => void;
|
|
11
|
-
|
|
11
|
+
renderDragHandle?: RenderDragFn;
|
|
12
12
|
hasCardEditActions: boolean;
|
|
13
13
|
onMoveTop?: () => void;
|
|
14
14
|
onMoveBottom?: () => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { SpaceAPI } from '@contentful/app-sdk';
|
|
3
|
-
import { ContentType, Entry } from '../../types';
|
|
3
|
+
import { ContentType, Entry, RenderDragFn } from '../../types';
|
|
4
4
|
export interface WrappedEntryCardProps {
|
|
5
5
|
getEntityScheduledActions: SpaceAPI['getEntityScheduledActions'];
|
|
6
6
|
getAsset: (assetId: string) => Promise<unknown>;
|
|
@@ -14,7 +14,7 @@ export interface WrappedEntryCardProps {
|
|
|
14
14
|
defaultLocaleCode: string;
|
|
15
15
|
contentType?: ContentType;
|
|
16
16
|
entry: Entry;
|
|
17
|
-
|
|
17
|
+
renderDragHandle?: RenderDragFn;
|
|
18
18
|
isClickable?: boolean;
|
|
19
19
|
hasCardEditActions: boolean;
|
|
20
20
|
onMoveTop?: () => void;
|