@contentful/field-editor-reference 5.9.0 → 5.11.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/cjs/__fixtures__/FakeSdk.js +183 -0
- package/dist/cjs/__fixtures__/asset/index.js +37 -0
- package/dist/cjs/__fixtures__/content-type/index.js +16 -0
- package/dist/cjs/__fixtures__/entry/index.js +33 -0
- package/dist/cjs/__fixtures__/fixtures.js +71 -0
- package/dist/cjs/__fixtures__/locale/index.js +40 -0
- package/dist/cjs/__fixtures__/space/index.js +16 -0
- package/dist/cjs/assets/MultipleMediaEditor.js +86 -0
- package/dist/cjs/assets/SingleMediaEditor.js +69 -0
- package/dist/cjs/assets/WrappedAssetCard/AssetCardActions.js +125 -0
- package/dist/cjs/assets/WrappedAssetCard/FetchingWrappedAssetCard.js +171 -0
- package/dist/cjs/assets/WrappedAssetCard/WrappedAssetCard.js +159 -0
- package/dist/cjs/assets/WrappedAssetCard/WrappedAssetLink.js +130 -0
- package/dist/cjs/assets/index.js +24 -0
- package/dist/cjs/common/EntityStore.js +420 -0
- package/dist/cjs/common/MultipleReferenceEditor.js +164 -0
- package/dist/cjs/common/ReferenceEditor.js +74 -0
- package/dist/cjs/common/SingleReferenceEditor.js +118 -0
- package/dist/cjs/common/SortableLinkList.js +95 -0
- package/dist/cjs/common/customCardTypes.js +44 -0
- package/dist/cjs/common/useAccessApi.js +19 -0
- package/dist/cjs/common/useContentTypePermissions.js +54 -0
- package/dist/cjs/common/useEditorPermissions.js +77 -0
- package/dist/cjs/common/useEditorPermissions.spec.js +205 -0
- package/dist/cjs/components/AssetThumbnail/AssetThumbnail.js +62 -0
- package/dist/cjs/components/CreateEntryLinkButton/CreateEntryLinkButton.js +102 -0
- package/dist/cjs/components/CreateEntryLinkButton/CreateEntryLinkButton.spec.js +254 -0
- package/dist/cjs/components/CreateEntryLinkButton/CreateEntryMenuTrigger.js +199 -0
- package/dist/cjs/components/CreateEntryLinkButton/CreateEntryMenuTrigger.spec.js +190 -0
- package/dist/cjs/components/CreateEntryLinkButton/useGlobalMouseUp.js +19 -0
- package/dist/cjs/components/LinkActions/CombinedLinkActions.js +167 -0
- package/dist/cjs/components/LinkActions/LinkActions.js +123 -0
- package/dist/cjs/components/LinkActions/LinkEntityActions.js +186 -0
- package/dist/cjs/components/LinkActions/NoLinkPermissionsInfo.js +54 -0
- package/dist/cjs/components/LinkActions/helpers.js +78 -0
- package/dist/cjs/components/LinkActions/redesignStyles.js +44 -0
- package/dist/cjs/components/LinkActions/styles.js +33 -0
- package/dist/cjs/components/MissingEntityCard/MissingEntityCard.js +75 -0
- package/dist/cjs/components/MissingEntityCard/styles.js +29 -0
- package/dist/cjs/components/ScheduledIconWithTooltip/ScheduleTooltip.js +75 -0
- package/dist/cjs/components/ScheduledIconWithTooltip/ScheduledIconWithTooltip.js +81 -0
- package/dist/cjs/components/ScheduledIconWithTooltip/formatDateAndTime.js +45 -0
- package/dist/cjs/components/SpaceName/SpaceName.js +91 -0
- package/dist/cjs/components/index.js +44 -0
- package/dist/cjs/entries/MultipleEntryReferenceEditor.js +86 -0
- package/dist/cjs/entries/SingleEntryReferenceEditor.js +74 -0
- package/dist/cjs/entries/WrappedEntryCard/FetchingWrappedEntryCard.js +189 -0
- package/dist/cjs/entries/WrappedEntryCard/WrappedEntryCard.js +181 -0
- package/dist/cjs/entries/index.js +24 -0
- package/dist/cjs/index.js +92 -0
- package/dist/cjs/resources/Cards/ContentfulEntryCard.js +87 -0
- package/dist/cjs/resources/Cards/ResourceCard.js +111 -0
- package/dist/cjs/resources/Cards/UnsupportedEntityCard.js +64 -0
- package/dist/cjs/resources/MultipleResourceReferenceEditor.js +157 -0
- package/dist/cjs/resources/MultipleResourceReferenceEditor.spec.js +297 -0
- package/dist/cjs/resources/SingleResourceReferenceEditor.js +87 -0
- package/dist/cjs/resources/SingleResourceReferenceEditor.spec.js +161 -0
- package/dist/cjs/resources/index.js +19 -0
- package/dist/cjs/resources/testHelpers/resourceEditorHelpers.js +121 -0
- package/dist/cjs/resources/useResourceLinkActions.js +88 -0
- package/dist/cjs/types.js +22 -0
- package/dist/cjs/utils/fromFieldValidations.js +54 -0
- package/dist/esm/__fixtures__/FakeSdk.js +173 -0
- package/dist/esm/__fixtures__/asset/index.js +6 -0
- package/dist/esm/__fixtures__/content-type/index.js +2 -0
- package/dist/esm/__fixtures__/entry/index.js +5 -0
- package/dist/esm/__fixtures__/fixtures.js +6 -0
- package/dist/esm/__fixtures__/locale/index.js +15 -0
- package/dist/esm/__fixtures__/space/index.js +2 -0
- package/dist/esm/assets/MultipleMediaEditor.js +37 -0
- package/dist/esm/assets/SingleMediaEditor.js +20 -0
- package/dist/esm/assets/WrappedAssetCard/AssetCardActions.js +63 -0
- package/dist/esm/assets/WrappedAssetCard/FetchingWrappedAssetCard.js +122 -0
- package/dist/esm/assets/WrappedAssetCard/WrappedAssetCard.js +105 -0
- package/dist/esm/assets/WrappedAssetCard/WrappedAssetLink.js +76 -0
- package/dist/esm/assets/index.js +3 -0
- package/dist/esm/common/EntityStore.js +347 -0
- package/dist/esm/common/MultipleReferenceEditor.js +111 -0
- package/dist/esm/common/ReferenceEditor.js +20 -0
- package/dist/esm/common/SingleReferenceEditor.js +70 -0
- package/dist/esm/common/SortableLinkList.js +41 -0
- package/dist/esm/common/customCardTypes.js +1 -0
- package/dist/esm/common/useAccessApi.js +9 -0
- package/dist/esm/common/useContentTypePermissions.js +44 -0
- package/dist/esm/common/useEditorPermissions.js +67 -0
- package/dist/esm/common/useEditorPermissions.spec.js +201 -0
- package/dist/esm/components/AssetThumbnail/AssetThumbnail.js +13 -0
- package/dist/esm/components/CreateEntryLinkButton/CreateEntryLinkButton.js +48 -0
- package/dist/esm/components/CreateEntryLinkButton/CreateEntryLinkButton.spec.js +206 -0
- package/dist/esm/components/CreateEntryLinkButton/CreateEntryMenuTrigger.js +145 -0
- package/dist/esm/components/CreateEntryLinkButton/CreateEntryMenuTrigger.spec.js +142 -0
- package/dist/esm/components/CreateEntryLinkButton/useGlobalMouseUp.js +9 -0
- package/dist/esm/components/LinkActions/CombinedLinkActions.js +118 -0
- package/dist/esm/components/LinkActions/LinkActions.js +66 -0
- package/dist/esm/components/LinkActions/LinkEntityActions.js +127 -0
- package/dist/esm/components/LinkActions/NoLinkPermissionsInfo.js +5 -0
- package/dist/esm/components/LinkActions/helpers.js +57 -0
- package/dist/esm/components/LinkActions/redesignStyles.js +18 -0
- package/dist/esm/components/LinkActions/styles.js +10 -0
- package/dist/esm/components/MissingEntityCard/MissingEntityCard.js +26 -0
- package/dist/esm/components/MissingEntityCard/styles.js +11 -0
- package/dist/esm/components/ScheduledIconWithTooltip/ScheduleTooltip.js +18 -0
- package/dist/esm/components/ScheduledIconWithTooltip/ScheduledIconWithTooltip.js +32 -0
- package/dist/esm/components/ScheduledIconWithTooltip/formatDateAndTime.js +19 -0
- package/dist/esm/components/SpaceName/SpaceName.js +37 -0
- package/dist/esm/components/index.js +8 -0
- package/dist/esm/entries/MultipleEntryReferenceEditor.js +37 -0
- package/dist/esm/entries/SingleEntryReferenceEditor.js +25 -0
- package/dist/esm/entries/WrappedEntryCard/FetchingWrappedEntryCard.js +135 -0
- package/dist/esm/entries/WrappedEntryCard/WrappedEntryCard.js +127 -0
- package/dist/esm/entries/index.js +3 -0
- package/dist/esm/index.js +7 -0
- package/dist/esm/resources/Cards/ContentfulEntryCard.js +38 -0
- package/dist/esm/resources/Cards/ResourceCard.js +62 -0
- package/dist/esm/resources/Cards/UnsupportedEntityCard.js +15 -0
- package/dist/esm/resources/MultipleResourceReferenceEditor.js +104 -0
- package/dist/esm/resources/MultipleResourceReferenceEditor.spec.js +254 -0
- package/dist/esm/resources/SingleResourceReferenceEditor.js +33 -0
- package/dist/esm/resources/SingleResourceReferenceEditor.spec.js +118 -0
- package/dist/esm/resources/index.js +2 -0
- package/dist/esm/resources/testHelpers/resourceEditorHelpers.js +103 -0
- package/dist/esm/resources/useResourceLinkActions.js +78 -0
- package/dist/esm/types.js +1 -0
- package/dist/esm/utils/fromFieldValidations.js +39 -0
- package/dist/{__fixtures__ → types/__fixtures__}/FakeSdk.d.ts +8 -8
- package/dist/{__fixtures__ → types/__fixtures__}/asset/index.d.ts +6 -6
- package/dist/{__fixtures__ → types/__fixtures__}/content-type/index.d.ts +2 -2
- package/dist/{__fixtures__ → types/__fixtures__}/entry/index.d.ts +5 -5
- package/dist/{__fixtures__ → types/__fixtures__}/fixtures.d.ts +6 -6
- package/dist/{__fixtures__ → types/__fixtures__}/locale/index.d.ts +42 -42
- package/dist/{__fixtures__ → types/__fixtures__}/space/index.d.ts +2 -2
- package/dist/{assets → types/assets}/MultipleMediaEditor.d.ts +10 -10
- package/dist/types/assets/SingleMediaEditor.d.ts +10 -0
- package/dist/{assets → types/assets}/WrappedAssetCard/AssetCardActions.d.ts +11 -11
- package/dist/{assets → types/assets}/WrappedAssetCard/FetchingWrappedAssetCard.d.ts +17 -17
- package/dist/{assets → types/assets}/WrappedAssetCard/WrappedAssetCard.d.ts +24 -24
- package/dist/{assets → types/assets}/WrappedAssetCard/WrappedAssetLink.d.ts +16 -16
- package/dist/{assets → types/assets}/index.d.ts +3 -3
- package/dist/{common → types/common}/EntityStore.d.ts +62 -62
- package/dist/{common → types/common}/MultipleReferenceEditor.d.ts +25 -25
- package/dist/{common → types/common}/ReferenceEditor.d.ts +46 -46
- package/dist/{common → types/common}/SingleReferenceEditor.d.ts +24 -24
- package/dist/{common → types/common}/SortableLinkList.d.ts +19 -19
- package/dist/{common → types/common}/customCardTypes.d.ts +29 -29
- package/dist/types/common/useAccessApi.d.ts +16 -0
- package/dist/{common → types/common}/useContentTypePermissions.d.ts +17 -17
- package/dist/{common → types/common}/useEditorPermissions.d.ts +17 -17
- package/dist/types/common/useEditorPermissions.spec.d.ts +1 -0
- package/dist/{components → types/components}/AssetThumbnail/AssetThumbnail.d.ts +7 -7
- package/dist/{components → types/components}/CreateEntryLinkButton/CreateEntryLinkButton.d.ts +19 -19
- package/dist/types/components/CreateEntryLinkButton/CreateEntryLinkButton.spec.d.ts +1 -0
- package/dist/{components → types/components}/CreateEntryLinkButton/CreateEntryMenuTrigger.d.ts +31 -31
- package/dist/types/components/CreateEntryLinkButton/CreateEntryMenuTrigger.spec.d.ts +1 -0
- package/dist/{components → types/components}/CreateEntryLinkButton/useGlobalMouseUp.d.ts +1 -1
- package/dist/{components → types/components}/LinkActions/CombinedLinkActions.d.ts +10 -10
- package/dist/{components → types/components}/LinkActions/LinkActions.d.ts +26 -26
- package/dist/{components → types/components}/LinkActions/LinkEntityActions.d.ts +24 -24
- package/dist/types/components/LinkActions/NoLinkPermissionsInfo.d.ts +2 -0
- package/dist/{components → types/components}/LinkActions/helpers.d.ts +26 -26
- package/dist/{components → types/components}/LinkActions/redesignStyles.d.ts +3 -3
- package/dist/{components → types/components}/LinkActions/styles.d.ts +2 -2
- package/dist/{components → types/components}/MissingEntityCard/MissingEntityCard.d.ts +8 -8
- package/dist/{components → types/components}/MissingEntityCard/styles.d.ts +2 -2
- package/dist/{components → types/components}/ScheduledIconWithTooltip/ScheduleTooltip.d.ts +11 -11
- package/dist/{components → types/components}/ScheduledIconWithTooltip/ScheduledIconWithTooltip.d.ts +10 -10
- package/dist/{components → types/components}/ScheduledIconWithTooltip/formatDateAndTime.d.ts +15 -15
- package/dist/types/components/SpaceName/SpaceName.d.ts +6 -0
- package/dist/{components → types/components}/index.d.ts +9 -9
- package/dist/{entries → types/entries}/MultipleEntryReferenceEditor.d.ts +3 -3
- package/dist/{entries → types/entries}/SingleEntryReferenceEditor.d.ts +8 -8
- package/dist/{entries → types/entries}/WrappedEntryCard/FetchingWrappedEntryCard.d.ts +18 -18
- package/dist/{entries → types/entries}/WrappedEntryCard/WrappedEntryCard.d.ts +35 -35
- package/dist/{entries → types/entries}/index.d.ts +3 -3
- package/dist/{index.d.ts → types/index.d.ts} +10 -8
- package/dist/{resources → types/resources}/Cards/ContentfulEntryCard.d.ts +21 -21
- package/dist/{resources → types/resources}/Cards/ResourceCard.d.ts +12 -12
- package/dist/{resources → types/resources}/Cards/UnsupportedEntityCard.d.ts +4 -4
- package/dist/{resources → types/resources}/MultipleResourceReferenceEditor.d.ts +7 -7
- package/dist/types/resources/MultipleResourceReferenceEditor.spec.d.ts +1 -0
- package/dist/{resources → types/resources}/SingleResourceReferenceEditor.d.ts +7 -7
- package/dist/types/resources/SingleResourceReferenceEditor.spec.d.ts +1 -0
- package/dist/{resources → types/resources}/index.d.ts +2 -2
- package/dist/{resources → types/resources}/testHelpers/resourceEditorHelpers.d.ts +50 -50
- package/dist/{resources → types/resources}/useResourceLinkActions.d.ts +7 -7
- package/dist/{types.d.ts → types/types.d.ts} +104 -104
- package/dist/{utils → types/utils}/fromFieldValidations.d.ts +21 -21
- package/package.json +25 -11
- package/CHANGELOG.md +0 -860
- package/dist/assets/SingleMediaEditor.d.ts +0 -10
- package/dist/common/useAccessApi.d.ts +0 -16
- package/dist/components/LinkActions/NoLinkPermissionsInfo.d.ts +0 -2
- package/dist/components/SpaceName/SpaceName.d.ts +0 -6
- package/dist/field-editor-reference.cjs.development.js +0 -2753
- package/dist/field-editor-reference.cjs.development.js.map +0 -1
- package/dist/field-editor-reference.cjs.production.min.js +0 -2
- package/dist/field-editor-reference.cjs.production.min.js.map +0 -1
- package/dist/field-editor-reference.esm.js +0 -2727
- package/dist/field-editor-reference.esm.js.map +0 -1
- package/dist/index.js +0 -8
package/dist/{components → types/components}/CreateEntryLinkButton/CreateEntryMenuTrigger.d.ts
RENAMED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ContentType } from '../../types';
|
|
3
|
-
|
|
4
|
-
isOpen: boolean;
|
|
5
|
-
isSelecting: boolean;
|
|
6
|
-
};
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
closeMenu: Function;
|
|
10
|
-
}) => React.ReactElement;
|
|
11
|
-
interface CreateEntryMenuTrigger {
|
|
12
|
-
contentTypes: ContentType[];
|
|
13
|
-
suggestedContentTypeId?: string;
|
|
14
|
-
contentTypesLabel?: string;
|
|
15
|
-
onSelect: (contentTypeId: string) => Promise<unknown>;
|
|
16
|
-
testId?: string;
|
|
17
|
-
dropdownSettings?: {
|
|
18
|
-
isAutoalignmentEnabled?: boolean;
|
|
19
|
-
position: 'bottom-left' | 'bottom-right';
|
|
20
|
-
};
|
|
21
|
-
customDropdownItems?: React.ReactNode;
|
|
22
|
-
children: CreateEntryMenuTriggerChild;
|
|
23
|
-
}
|
|
24
|
-
export declare const CreateEntryMenuTrigger: {
|
|
25
|
-
({ contentTypes, suggestedContentTypeId, contentTypesLabel, onSelect, testId, dropdownSettings, customDropdownItems, children, }: CreateEntryMenuTrigger): JSX.Element;
|
|
26
|
-
defaultProps: {
|
|
27
|
-
testId: string;
|
|
28
|
-
contentTypesLabel: string;
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
export {};
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ContentType } from '../../types';
|
|
3
|
+
type CreateEntryMenuTriggerChildProps = {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
isSelecting: boolean;
|
|
6
|
+
};
|
|
7
|
+
export type CreateEntryMenuTriggerChild = (props: CreateEntryMenuTriggerChildProps) => React.ReactElement;
|
|
8
|
+
export type CreateCustomEntryMenuItems = ({ closeMenu, }: {
|
|
9
|
+
closeMenu: Function;
|
|
10
|
+
}) => React.ReactElement;
|
|
11
|
+
interface CreateEntryMenuTrigger {
|
|
12
|
+
contentTypes: ContentType[];
|
|
13
|
+
suggestedContentTypeId?: string;
|
|
14
|
+
contentTypesLabel?: string;
|
|
15
|
+
onSelect: (contentTypeId: string) => Promise<unknown>;
|
|
16
|
+
testId?: string;
|
|
17
|
+
dropdownSettings?: {
|
|
18
|
+
isAutoalignmentEnabled?: boolean;
|
|
19
|
+
position: 'bottom-left' | 'bottom-right';
|
|
20
|
+
};
|
|
21
|
+
customDropdownItems?: React.ReactNode;
|
|
22
|
+
children: CreateEntryMenuTriggerChild;
|
|
23
|
+
}
|
|
24
|
+
export declare const CreateEntryMenuTrigger: {
|
|
25
|
+
({ contentTypes, suggestedContentTypeId, contentTypesLabel, onSelect, testId, dropdownSettings, customDropdownItems, children, }: CreateEntryMenuTrigger): React.JSX.Element;
|
|
26
|
+
defaultProps: {
|
|
27
|
+
testId: string;
|
|
28
|
+
contentTypesLabel: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom/extend-expect';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useGlobalMouseUp: (handler: (this: Document, ev: MouseEvent) => unknown) => void;
|
|
1
|
+
export declare const useGlobalMouseUp: (handler: (this: Document, ev: MouseEvent) => unknown) => void;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
import { LinkActionsProps } from './LinkActions';
|
|
3
|
-
/**
|
|
4
|
-
* Alternative, experimental alternative to <LinkActions /> that is planned to
|
|
5
|
-
* replace the current default LinkActions in reference and media editors.
|
|
6
|
-
*
|
|
7
|
-
* Places both actions to create and link new, as well as link existing, behind
|
|
8
|
-
* one action dropdown and introduces new copy for action labels.
|
|
9
|
-
*/
|
|
10
|
-
export declare function CombinedLinkActions(props: LinkActionsProps): JSX.Element | null;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { LinkActionsProps } from './LinkActions';
|
|
3
|
+
/**
|
|
4
|
+
* Alternative, experimental alternative to <LinkActions /> that is planned to
|
|
5
|
+
* replace the current default LinkActions in reference and media editors.
|
|
6
|
+
*
|
|
7
|
+
* Places both actions to create and link new, as well as link existing, behind
|
|
8
|
+
* one action dropdown and introduces new copy for action labels.
|
|
9
|
+
*/
|
|
10
|
+
export declare function CombinedLinkActions(props: LinkActionsProps): React.JSX.Element | null;
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ContentEntityType, ContentType, ActionLabels, Entry, Asset, NavigatorSlideInfo } from '../../types';
|
|
3
|
-
export interface LinkActionsProps {
|
|
4
|
-
entityType: ContentEntityType;
|
|
5
|
-
contentTypes: ContentType[];
|
|
6
|
-
canCreateEntity: boolean;
|
|
7
|
-
canLinkEntity: boolean;
|
|
8
|
-
canLinkMultiple: boolean;
|
|
9
|
-
isDisabled: boolean;
|
|
10
|
-
isFull: boolean;
|
|
11
|
-
isEmpty: boolean;
|
|
12
|
-
onCreate: (contentType?: string, index?: number) => Promise<unknown>;
|
|
13
|
-
onCreated: (entity: Entry | Asset, index?: number, slide?: NavigatorSlideInfo) => void;
|
|
14
|
-
onLinkExisting: (index?: number) => void;
|
|
15
|
-
onLinkedExisting: (entities: Array<Entry | Asset>, index?: number) => void;
|
|
16
|
-
actionLabels?: Partial<ActionLabels>;
|
|
17
|
-
combinedActionsLabel?: string | React.ReactElement;
|
|
18
|
-
itemsLength?: number;
|
|
19
|
-
}
|
|
20
|
-
export declare const testIds: {
|
|
21
|
-
dropdown: string;
|
|
22
|
-
createAndLink: string;
|
|
23
|
-
createAndLinkWrapper: string;
|
|
24
|
-
linkExisting: string;
|
|
25
|
-
};
|
|
26
|
-
export declare function LinkActions(props: LinkActionsProps): JSX.Element | null;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ContentEntityType, ContentType, ActionLabels, Entry, Asset, NavigatorSlideInfo } from '../../types';
|
|
3
|
+
export interface LinkActionsProps {
|
|
4
|
+
entityType: ContentEntityType;
|
|
5
|
+
contentTypes: ContentType[];
|
|
6
|
+
canCreateEntity: boolean;
|
|
7
|
+
canLinkEntity: boolean;
|
|
8
|
+
canLinkMultiple: boolean;
|
|
9
|
+
isDisabled: boolean;
|
|
10
|
+
isFull: boolean;
|
|
11
|
+
isEmpty: boolean;
|
|
12
|
+
onCreate: (contentType?: string, index?: number) => Promise<unknown>;
|
|
13
|
+
onCreated: (entity: Entry | Asset, index?: number, slide?: NavigatorSlideInfo) => void;
|
|
14
|
+
onLinkExisting: (index?: number) => void;
|
|
15
|
+
onLinkedExisting: (entities: Array<Entry | Asset>, index?: number) => void;
|
|
16
|
+
actionLabels?: Partial<ActionLabels>;
|
|
17
|
+
combinedActionsLabel?: string | React.ReactElement;
|
|
18
|
+
itemsLength?: number;
|
|
19
|
+
}
|
|
20
|
+
export declare const testIds: {
|
|
21
|
+
dropdown: string;
|
|
22
|
+
createAndLink: string;
|
|
23
|
+
createAndLinkWrapper: string;
|
|
24
|
+
linkExisting: string;
|
|
25
|
+
};
|
|
26
|
+
export declare function LinkActions(props: LinkActionsProps): React.JSX.Element | null;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { EditorPermissions } from '../../common/useEditorPermissions';
|
|
3
|
-
import { Action, ActionLabels, ContentEntityType, FieldExtensionSDK } from '../../types';
|
|
4
|
-
import { LinkActionsProps } from './LinkActions';
|
|
5
|
-
|
|
6
|
-
entityType: ContentEntityType;
|
|
7
|
-
canLinkMultiple: boolean;
|
|
8
|
-
sdk: FieldExtensionSDK;
|
|
9
|
-
isDisabled: boolean;
|
|
10
|
-
editorPermissions: EditorPermissions;
|
|
11
|
-
onCreate: (id: string, index?: number) => void;
|
|
12
|
-
onLink: (ids: string[], index?: number) => void;
|
|
13
|
-
onAction?: (action: Action) => void;
|
|
14
|
-
actionLabels?: Partial<ActionLabels>;
|
|
15
|
-
itemsLength?: number;
|
|
16
|
-
};
|
|
17
|
-
export declare function useLinkActionsProps(props: LinkEntityActionsProps): LinkActionsProps;
|
|
18
|
-
export declare function LinkEntityActions({ renderCustomActions, ...props }: LinkActionsProps & {
|
|
19
|
-
renderCustomActions?: (props: LinkActionsProps) => React.ReactElement;
|
|
20
|
-
}): JSX.Element;
|
|
21
|
-
export declare function CombinedLinkEntityActions({ renderCustomActions, ...props }: LinkActionsProps & {
|
|
22
|
-
renderCustomActions?: (props: LinkActionsProps) => React.ReactElement;
|
|
23
|
-
}): JSX.Element;
|
|
24
|
-
export {};
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { EditorPermissions } from '../../common/useEditorPermissions';
|
|
3
|
+
import { Action, ActionLabels, ContentEntityType, FieldExtensionSDK } from '../../types';
|
|
4
|
+
import { LinkActionsProps } from './LinkActions';
|
|
5
|
+
type LinkEntityActionsProps = {
|
|
6
|
+
entityType: ContentEntityType;
|
|
7
|
+
canLinkMultiple: boolean;
|
|
8
|
+
sdk: FieldExtensionSDK;
|
|
9
|
+
isDisabled: boolean;
|
|
10
|
+
editorPermissions: EditorPermissions;
|
|
11
|
+
onCreate: (id: string, index?: number) => void;
|
|
12
|
+
onLink: (ids: string[], index?: number) => void;
|
|
13
|
+
onAction?: (action: Action) => void;
|
|
14
|
+
actionLabels?: Partial<ActionLabels>;
|
|
15
|
+
itemsLength?: number;
|
|
16
|
+
};
|
|
17
|
+
export declare function useLinkActionsProps(props: LinkEntityActionsProps): LinkActionsProps;
|
|
18
|
+
export declare function LinkEntityActions({ renderCustomActions, ...props }: LinkActionsProps & {
|
|
19
|
+
renderCustomActions?: (props: LinkActionsProps) => React.ReactElement;
|
|
20
|
+
}): React.JSX.Element;
|
|
21
|
+
export declare function CombinedLinkEntityActions({ renderCustomActions, ...props }: LinkActionsProps & {
|
|
22
|
+
renderCustomActions?: (props: LinkActionsProps) => React.ReactElement;
|
|
23
|
+
}): React.JSX.Element;
|
|
24
|
+
export {};
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { EditorPermissions } from '../../common/useEditorPermissions';
|
|
2
|
-
import { Asset, ContentEntityType, Entry, FieldExtensionSDK } from '../../types';
|
|
3
|
-
export declare function createEntity(props: {
|
|
4
|
-
sdk: FieldExtensionSDK;
|
|
5
|
-
entityType: ContentEntityType;
|
|
6
|
-
contentTypeId?: string;
|
|
7
|
-
}): Promise<{
|
|
8
|
-
entity?: undefined;
|
|
9
|
-
slide?: undefined;
|
|
10
|
-
} | {
|
|
11
|
-
entity: Entry<Entry
|
|
12
|
-
slide: import("@contentful/app-sdk/dist/types/navigator.types").NavigatorSlideInfo | undefined;
|
|
13
|
-
} | {
|
|
14
|
-
entity: Asset | undefined;
|
|
15
|
-
slide: import("@contentful/app-sdk/dist/types/navigator.types").NavigatorSlideInfo | undefined;
|
|
16
|
-
}>;
|
|
17
|
-
export declare function selectSingleEntity(props: {
|
|
18
|
-
sdk: FieldExtensionSDK;
|
|
19
|
-
entityType: ContentEntityType;
|
|
20
|
-
editorPermissions: EditorPermissions;
|
|
21
|
-
}): Promise<Entry
|
|
22
|
-
export declare function selectMultipleEntities(props: {
|
|
23
|
-
sdk: FieldExtensionSDK;
|
|
24
|
-
entityType: ContentEntityType;
|
|
25
|
-
editorPermissions: EditorPermissions;
|
|
26
|
-
}): Promise<Entry
|
|
1
|
+
import { EditorPermissions } from '../../common/useEditorPermissions';
|
|
2
|
+
import { Asset, ContentEntityType, Entry, FieldExtensionSDK } from '../../types';
|
|
3
|
+
export declare function createEntity(props: {
|
|
4
|
+
sdk: FieldExtensionSDK;
|
|
5
|
+
entityType: ContentEntityType;
|
|
6
|
+
contentTypeId?: string;
|
|
7
|
+
}): Promise<{
|
|
8
|
+
entity?: undefined;
|
|
9
|
+
slide?: undefined;
|
|
10
|
+
} | {
|
|
11
|
+
entity: Entry<Entry> | undefined;
|
|
12
|
+
slide: import("@contentful/app-sdk/dist/types/navigator.types").NavigatorSlideInfo | undefined;
|
|
13
|
+
} | {
|
|
14
|
+
entity: Asset | undefined;
|
|
15
|
+
slide: import("@contentful/app-sdk/dist/types/navigator.types").NavigatorSlideInfo | undefined;
|
|
16
|
+
}>;
|
|
17
|
+
export declare function selectSingleEntity(props: {
|
|
18
|
+
sdk: FieldExtensionSDK;
|
|
19
|
+
entityType: ContentEntityType;
|
|
20
|
+
editorPermissions: EditorPermissions;
|
|
21
|
+
}): Promise<Entry | Asset | null>;
|
|
22
|
+
export declare function selectMultipleEntities(props: {
|
|
23
|
+
sdk: FieldExtensionSDK;
|
|
24
|
+
entityType: ContentEntityType;
|
|
25
|
+
editorPermissions: EditorPermissions;
|
|
26
|
+
}): Promise<Entry[] | Asset[] | null>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const container: string;
|
|
2
|
-
export declare const action: string;
|
|
3
|
-
export declare const chevronIcon: string;
|
|
1
|
+
export declare const container: string;
|
|
2
|
+
export declare const action: string;
|
|
3
|
+
export declare const chevronIcon: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const container: string;
|
|
2
|
-
export declare const separator: string;
|
|
1
|
+
export declare const container: string;
|
|
2
|
+
export declare const separator: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import { ContentEntityType } from '../../types';
|
|
3
|
-
export declare function MissingEntityCard(props: {
|
|
4
|
-
entityType: ContentEntityType;
|
|
5
|
-
asSquare?: boolean;
|
|
6
|
-
isDisabled: boolean;
|
|
7
|
-
onRemove?: Function;
|
|
8
|
-
}): JSX.Element;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ContentEntityType } from '../../types';
|
|
3
|
+
export declare function MissingEntityCard(props: {
|
|
4
|
+
entityType: ContentEntityType;
|
|
5
|
+
asSquare?: boolean;
|
|
6
|
+
isDisabled: boolean;
|
|
7
|
+
onRemove?: Function;
|
|
8
|
+
}): React.JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const card: string;
|
|
2
|
-
export declare const squareCard: string;
|
|
1
|
+
export declare const card: string;
|
|
2
|
+
export declare const squareCard: string;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ScheduledAction } from '@contentful/app-sdk';
|
|
3
|
-
export declare const getScheduleTooltipContent: ({ job, jobsCount, }: {
|
|
4
|
-
job: ScheduledAction;
|
|
5
|
-
jobsCount: number;
|
|
6
|
-
}) => string;
|
|
7
|
-
export declare const ScheduleTooltip: ({ job, jobsCount, children, }: {
|
|
8
|
-
job: ScheduledAction;
|
|
9
|
-
jobsCount: number;
|
|
10
|
-
children: React.ReactElement;
|
|
11
|
-
}) => JSX.Element;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ScheduledAction } from '@contentful/app-sdk';
|
|
3
|
+
export declare const getScheduleTooltipContent: ({ job, jobsCount, }: {
|
|
4
|
+
job: ScheduledAction;
|
|
5
|
+
jobsCount: number;
|
|
6
|
+
}) => string;
|
|
7
|
+
export declare const ScheduleTooltip: ({ job, jobsCount, children, }: {
|
|
8
|
+
job: ScheduledAction;
|
|
9
|
+
jobsCount: number;
|
|
10
|
+
children: React.ReactElement;
|
|
11
|
+
}) => React.JSX.Element;
|
package/dist/{components → types/components}/ScheduledIconWithTooltip/ScheduledIconWithTooltip.d.ts
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { SpaceAPI } from '@contentful/app-sdk';
|
|
3
|
-
|
|
4
|
-
getEntityScheduledActions: SpaceAPI['getEntityScheduledActions'];
|
|
5
|
-
entityType: 'Entry' | 'Asset';
|
|
6
|
-
entityId: string;
|
|
7
|
-
children: React.ReactElement;
|
|
8
|
-
};
|
|
9
|
-
export declare const ScheduledIconWithTooltip: ({ entityType, entityId, getEntityScheduledActions, children, }: ScheduledIconWithTooltipProps) => JSX.Element | null;
|
|
10
|
-
export {};
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { SpaceAPI } from '@contentful/app-sdk';
|
|
3
|
+
type ScheduledIconWithTooltipProps = {
|
|
4
|
+
getEntityScheduledActions: SpaceAPI['getEntityScheduledActions'];
|
|
5
|
+
entityType: 'Entry' | 'Asset';
|
|
6
|
+
entityId: string;
|
|
7
|
+
children: React.ReactElement;
|
|
8
|
+
};
|
|
9
|
+
export declare const ScheduledIconWithTooltip: ({ entityType, entityId, getEntityScheduledActions, children, }: ScheduledIconWithTooltipProps) => React.JSX.Element | null;
|
|
10
|
+
export {};
|
package/dist/{components → types/components}/ScheduledIconWithTooltip/formatDateAndTime.d.ts
RENAMED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* @param {Date|string} date A valid constructor argument for moment()
|
|
4
|
-
* @param {boolean=} short Render only Today/Tomorrow/Yesterday if valid. Defaults to false
|
|
5
|
-
*/
|
|
6
|
-
export declare const formatDate: DateFormatFn;
|
|
7
|
-
/**
|
|
8
|
-
* Returns the time portion of a date in the local time in the format H:MM AM/PM
|
|
9
|
-
*
|
|
10
|
-
* == Examples
|
|
11
|
-
* * `T15:36:45.000Z` => 3:36 PM (if in +0:00 offset)
|
|
12
|
-
*/
|
|
13
|
-
export declare const formatTime: DateFormatFn;
|
|
14
|
-
export declare const formatDateAndTime: DateFormatFn;
|
|
15
|
-
export {};
|
|
1
|
+
type DateFormatFn = (date: Date | string, short?: boolean) => string;
|
|
2
|
+
/**
|
|
3
|
+
* @param {Date|string} date A valid constructor argument for moment()
|
|
4
|
+
* @param {boolean=} short Render only Today/Tomorrow/Yesterday if valid. Defaults to false
|
|
5
|
+
*/
|
|
6
|
+
export declare const formatDate: DateFormatFn;
|
|
7
|
+
/**
|
|
8
|
+
* Returns the time portion of a date in the local time in the format H:MM AM/PM
|
|
9
|
+
*
|
|
10
|
+
* == Examples
|
|
11
|
+
* * `T15:36:45.000Z` => 3:36 PM (if in +0:00 offset)
|
|
12
|
+
*/
|
|
13
|
+
export declare const formatTime: DateFormatFn;
|
|
14
|
+
export declare const formatDateAndTime: DateFormatFn;
|
|
15
|
+
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export type { LinkActionsProps } from './LinkActions/LinkActions';
|
|
2
|
-
export { CombinedLinkActions } from './LinkActions/CombinedLinkActions';
|
|
3
|
-
export { MissingEntityCard } from './MissingEntityCard/MissingEntityCard';
|
|
4
|
-
export { LinkEntityActions } from './LinkActions/LinkEntityActions';
|
|
5
|
-
export { CreateEntryLinkButton } from './CreateEntryLinkButton/CreateEntryLinkButton';
|
|
6
|
-
export { CreateEntryMenuTrigger } from './CreateEntryLinkButton/CreateEntryMenuTrigger';
|
|
7
|
-
export { ScheduledIconWithTooltip } from './ScheduledIconWithTooltip/ScheduledIconWithTooltip';
|
|
8
|
-
export { getScheduleTooltipContent } from './ScheduledIconWithTooltip/ScheduleTooltip';
|
|
9
|
-
export { AssetThumbnail } from './AssetThumbnail/AssetThumbnail';
|
|
1
|
+
export type { LinkActionsProps } from './LinkActions/LinkActions';
|
|
2
|
+
export { CombinedLinkActions } from './LinkActions/CombinedLinkActions';
|
|
3
|
+
export { MissingEntityCard } from './MissingEntityCard/MissingEntityCard';
|
|
4
|
+
export { LinkEntityActions } from './LinkActions/LinkEntityActions';
|
|
5
|
+
export { CreateEntryLinkButton } from './CreateEntryLinkButton/CreateEntryLinkButton';
|
|
6
|
+
export { CreateEntryMenuTrigger } from './CreateEntryLinkButton/CreateEntryMenuTrigger';
|
|
7
|
+
export { ScheduledIconWithTooltip } from './ScheduledIconWithTooltip/ScheduledIconWithTooltip';
|
|
8
|
+
export { getScheduleTooltipContent } from './ScheduledIconWithTooltip/ScheduleTooltip';
|
|
9
|
+
export { AssetThumbnail } from './AssetThumbnail/AssetThumbnail';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
import { ReferenceEditorProps } from '../common/ReferenceEditor';
|
|
3
|
-
export declare function MultipleEntryReferenceEditor(props: ReferenceEditorProps): JSX.Element;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ReferenceEditorProps } from '../common/ReferenceEditor';
|
|
3
|
+
export declare function MultipleEntryReferenceEditor(props: ReferenceEditorProps): React.JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import { ReferenceEditorProps } from '../common/ReferenceEditor';
|
|
3
|
-
export declare function SingleEntryReferenceEditor(props: ReferenceEditorProps): JSX.Element;
|
|
4
|
-
export declare namespace SingleEntryReferenceEditor {
|
|
5
|
-
var defaultProps: {
|
|
6
|
-
isInitiallyDisabled: boolean;
|
|
7
|
-
};
|
|
8
|
-
}
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ReferenceEditorProps } from '../common/ReferenceEditor';
|
|
3
|
+
export declare function SingleEntryReferenceEditor(props: ReferenceEditorProps): React.JSX.Element;
|
|
4
|
+
export declare namespace SingleEntryReferenceEditor {
|
|
5
|
+
var defaultProps: {
|
|
6
|
+
isInitiallyDisabled: boolean;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
import { RenderCustomMissingEntityCard } from '../../common/customCardTypes';
|
|
3
|
-
import { ReferenceEditorProps } from '../../common/ReferenceEditor';
|
|
4
|
-
import { ContentType, RenderDragFn } from '../../types';
|
|
5
|
-
export
|
|
6
|
-
entryId: string;
|
|
7
|
-
index?: number;
|
|
8
|
-
allContentTypes: ContentType[];
|
|
9
|
-
isDisabled: boolean;
|
|
10
|
-
onRemove: () => void;
|
|
11
|
-
renderDragHandle?: RenderDragFn;
|
|
12
|
-
hasCardEditActions: boolean;
|
|
13
|
-
onMoveTop?: () => void;
|
|
14
|
-
onMoveBottom?: () => void;
|
|
15
|
-
renderCustomMissingEntityCard?: RenderCustomMissingEntityCard;
|
|
16
|
-
isBeingDragged?: boolean;
|
|
17
|
-
};
|
|
18
|
-
export declare function FetchingWrappedEntryCard(props: EntryCardReferenceEditorProps): JSX.Element;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { RenderCustomMissingEntityCard } from '../../common/customCardTypes';
|
|
3
|
+
import { ReferenceEditorProps } from '../../common/ReferenceEditor';
|
|
4
|
+
import { ContentType, RenderDragFn } from '../../types';
|
|
5
|
+
export type EntryCardReferenceEditorProps = ReferenceEditorProps & {
|
|
6
|
+
entryId: string;
|
|
7
|
+
index?: number;
|
|
8
|
+
allContentTypes: ContentType[];
|
|
9
|
+
isDisabled: boolean;
|
|
10
|
+
onRemove: () => void;
|
|
11
|
+
renderDragHandle?: RenderDragFn;
|
|
12
|
+
hasCardEditActions: boolean;
|
|
13
|
+
onMoveTop?: () => void;
|
|
14
|
+
onMoveBottom?: () => void;
|
|
15
|
+
renderCustomMissingEntityCard?: RenderCustomMissingEntityCard;
|
|
16
|
+
isBeingDragged?: boolean;
|
|
17
|
+
};
|
|
18
|
+
export declare function FetchingWrappedEntryCard(props: EntryCardReferenceEditorProps): React.JSX.Element;
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { SpaceAPI } from '@contentful/app-sdk';
|
|
3
|
-
import { ContentType, Entry, RenderDragFn } from '../../types';
|
|
4
|
-
export interface WrappedEntryCardProps {
|
|
5
|
-
getEntityScheduledActions: SpaceAPI['getEntityScheduledActions'];
|
|
6
|
-
getAsset: (assetId: string) => Promise<unknown>;
|
|
7
|
-
entryUrl?: string;
|
|
8
|
-
size: 'small' | 'default' | 'auto';
|
|
9
|
-
isDisabled: boolean;
|
|
10
|
-
isSelected?: boolean;
|
|
11
|
-
onRemove?: () => void;
|
|
12
|
-
onEdit?: () => void;
|
|
13
|
-
onClick?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
14
|
-
localeCode: string;
|
|
15
|
-
defaultLocaleCode: string;
|
|
16
|
-
contentType?: ContentType;
|
|
17
|
-
spaceName?: string;
|
|
18
|
-
entry: Entry;
|
|
19
|
-
renderDragHandle?: RenderDragFn;
|
|
20
|
-
isClickable?: boolean;
|
|
21
|
-
onMoveTop?: () => void;
|
|
22
|
-
onMoveBottom?: () => void;
|
|
23
|
-
hasCardEditActions: boolean;
|
|
24
|
-
hasCardMoveActions?: boolean;
|
|
25
|
-
hasCardRemoveActions?: boolean;
|
|
26
|
-
}
|
|
27
|
-
export declare function WrappedEntryCard(props: WrappedEntryCardProps): JSX.Element;
|
|
28
|
-
export declare namespace WrappedEntryCard {
|
|
29
|
-
var defaultProps: {
|
|
30
|
-
isClickable: boolean;
|
|
31
|
-
hasCardEditActions: boolean;
|
|
32
|
-
hasCardMoveActions: boolean;
|
|
33
|
-
hasCardRemoveActions: boolean;
|
|
34
|
-
};
|
|
35
|
-
}
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { SpaceAPI } from '@contentful/app-sdk';
|
|
3
|
+
import { ContentType, Entry, RenderDragFn } from '../../types';
|
|
4
|
+
export interface WrappedEntryCardProps {
|
|
5
|
+
getEntityScheduledActions: SpaceAPI['getEntityScheduledActions'];
|
|
6
|
+
getAsset: (assetId: string) => Promise<unknown>;
|
|
7
|
+
entryUrl?: string;
|
|
8
|
+
size: 'small' | 'default' | 'auto';
|
|
9
|
+
isDisabled: boolean;
|
|
10
|
+
isSelected?: boolean;
|
|
11
|
+
onRemove?: () => void;
|
|
12
|
+
onEdit?: () => void;
|
|
13
|
+
onClick?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
14
|
+
localeCode: string;
|
|
15
|
+
defaultLocaleCode: string;
|
|
16
|
+
contentType?: ContentType;
|
|
17
|
+
spaceName?: string;
|
|
18
|
+
entry: Entry;
|
|
19
|
+
renderDragHandle?: RenderDragFn;
|
|
20
|
+
isClickable?: boolean;
|
|
21
|
+
onMoveTop?: () => void;
|
|
22
|
+
onMoveBottom?: () => void;
|
|
23
|
+
hasCardEditActions: boolean;
|
|
24
|
+
hasCardMoveActions?: boolean;
|
|
25
|
+
hasCardRemoveActions?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export declare function WrappedEntryCard(props: WrappedEntryCardProps): React.JSX.Element;
|
|
28
|
+
export declare namespace WrappedEntryCard {
|
|
29
|
+
var defaultProps: {
|
|
30
|
+
isClickable: boolean;
|
|
31
|
+
hasCardEditActions: boolean;
|
|
32
|
+
hasCardMoveActions: boolean;
|
|
33
|
+
hasCardRemoveActions: boolean;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { SingleEntryReferenceEditor } from './SingleEntryReferenceEditor';
|
|
2
|
-
export { MultipleEntryReferenceEditor } from './MultipleEntryReferenceEditor';
|
|
3
|
-
export { WrappedEntryCard } from './WrappedEntryCard/WrappedEntryCard';
|
|
1
|
+
export { SingleEntryReferenceEditor } from './SingleEntryReferenceEditor';
|
|
2
|
+
export { MultipleEntryReferenceEditor } from './MultipleEntryReferenceEditor';
|
|
3
|
+
export { WrappedEntryCard } from './WrappedEntryCard/WrappedEntryCard';
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
export { CreateEntryMenuTrigger, CreateEntryLinkButton, getScheduleTooltipContent, ScheduledIconWithTooltip, AssetThumbnail, MissingEntityCard, CombinedLinkActions, } from './components';
|
|
2
|
-
export { SingleEntryReferenceEditor, MultipleEntryReferenceEditor, WrappedEntryCard, } from './entries';
|
|
3
|
-
export { SingleMediaEditor, MultipleMediaEditor, WrappedAssetCard } from './assets';
|
|
4
|
-
export type { CustomActionProps } from './common/ReferenceEditor';
|
|
5
|
-
export type { CustomEntityCardProps, DefaultCardRenderer, MissingEntityCardProps, RenderCustomMissingEntityCard, } from './common/customCardTypes';
|
|
6
|
-
export { SortableLinkList } from './common/SortableLinkList';
|
|
7
|
-
export { EntityProvider, useEntityLoader, useEntity, useResource } from './common/EntityStore';
|
|
8
|
-
export {
|
|
1
|
+
export { CreateEntryMenuTrigger, CreateEntryLinkButton, getScheduleTooltipContent, ScheduledIconWithTooltip, AssetThumbnail, MissingEntityCard, CombinedLinkActions, } from './components';
|
|
2
|
+
export { SingleEntryReferenceEditor, MultipleEntryReferenceEditor, WrappedEntryCard, } from './entries';
|
|
3
|
+
export { SingleMediaEditor, MultipleMediaEditor, WrappedAssetCard } from './assets';
|
|
4
|
+
export type { CustomActionProps } from './common/ReferenceEditor';
|
|
5
|
+
export type { CustomEntityCardProps, DefaultCardRenderer, MissingEntityCardProps, RenderCustomMissingEntityCard, } from './common/customCardTypes';
|
|
6
|
+
export { SortableLinkList } from './common/SortableLinkList';
|
|
7
|
+
export { EntityProvider, useEntityLoader, useEntity, useResource } from './common/EntityStore';
|
|
8
|
+
export type { ResourceInfo } from './common/EntityStore';
|
|
9
|
+
export { SingleResourceReferenceEditor, MultipleResourceReferenceEditor } from './resources';
|
|
10
|
+
export * from './types';
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
import { Entry } from '@contentful/field-editor-shared';
|
|
3
|
-
import { RenderDragFn, ResourceInfo } from '../../types';
|
|
4
|
-
export
|
|
5
|
-
onRemove?: VoidFunction;
|
|
6
|
-
onMoveTop?: VoidFunction;
|
|
7
|
-
onMoveBottom?: VoidFunction;
|
|
8
|
-
};
|
|
9
|
-
export
|
|
10
|
-
spaceId: string;
|
|
11
|
-
environmentId: string;
|
|
12
|
-
entryId: string;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
info: ResourceInfo<Entry>;
|
|
16
|
-
isDisabled: boolean;
|
|
17
|
-
renderDragHandle?: RenderDragFn;
|
|
18
|
-
getEntryRouteHref: (entryRoute: EntryRoute) => string;
|
|
19
|
-
} & CardActionsHandlers;
|
|
20
|
-
export declare function ContentfulEntryCard({ info, isDisabled, renderDragHandle, onRemove, onMoveTop, onMoveBottom, getEntryRouteHref, }: ContentfulEntryCardProps): JSX.Element;
|
|
21
|
-
export {};
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Entry } from '@contentful/field-editor-shared';
|
|
3
|
+
import { RenderDragFn, ResourceInfo } from '../../types';
|
|
4
|
+
export type CardActionsHandlers = {
|
|
5
|
+
onRemove?: VoidFunction;
|
|
6
|
+
onMoveTop?: VoidFunction;
|
|
7
|
+
onMoveBottom?: VoidFunction;
|
|
8
|
+
};
|
|
9
|
+
export type EntryRoute = {
|
|
10
|
+
spaceId: string;
|
|
11
|
+
environmentId: string;
|
|
12
|
+
entryId: string;
|
|
13
|
+
};
|
|
14
|
+
type ContentfulEntryCardProps = {
|
|
15
|
+
info: ResourceInfo<Entry>;
|
|
16
|
+
isDisabled: boolean;
|
|
17
|
+
renderDragHandle?: RenderDragFn;
|
|
18
|
+
getEntryRouteHref: (entryRoute: EntryRoute) => string;
|
|
19
|
+
} & CardActionsHandlers;
|
|
20
|
+
export declare function ContentfulEntryCard({ info, isDisabled, renderDragHandle, onRemove, onMoveTop, onMoveBottom, getEntryRouteHref, }: ContentfulEntryCardProps): React.JSX.Element;
|
|
21
|
+
export {};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
import { RenderDragFn, ResourceLink } from '../../types';
|
|
3
|
-
import { CardActionsHandlers, EntryRoute } from './ContentfulEntryCard';
|
|
4
|
-
|
|
5
|
-
index?: number;
|
|
6
|
-
resourceLink?: ResourceLink;
|
|
7
|
-
isDisabled: boolean;
|
|
8
|
-
renderDragHandle?: RenderDragFn;
|
|
9
|
-
getEntryRouteHref: (entryRoute: EntryRoute) => string;
|
|
10
|
-
} & CardActionsHandlers;
|
|
11
|
-
export declare function ResourceCard(props: ResourceCardProps): JSX.Element;
|
|
12
|
-
export {};
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { RenderDragFn, ResourceLink } from '../../types';
|
|
3
|
+
import { CardActionsHandlers, EntryRoute } from './ContentfulEntryCard';
|
|
4
|
+
type ResourceCardProps = {
|
|
5
|
+
index?: number;
|
|
6
|
+
resourceLink?: ResourceLink;
|
|
7
|
+
isDisabled: boolean;
|
|
8
|
+
renderDragHandle?: RenderDragFn;
|
|
9
|
+
getEntryRouteHref: (entryRoute: EntryRoute) => string;
|
|
10
|
+
} & CardActionsHandlers;
|
|
11
|
+
export declare function ResourceCard(props: ResourceCardProps): React.JSX.Element;
|
|
12
|
+
export {};
|