@contentful/field-editor-reference 2.20.11 → 3.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.
Files changed (31) hide show
  1. package/CHANGELOG.md +74 -399
  2. package/dist/__fixtures__/FakeSdk.d.ts +51 -36
  3. package/dist/assets/WrappedAssetCard/AssetCardActions.d.ts +2 -2
  4. package/dist/assets/WrappedAssetCard/FetchingWrappedAssetCard.d.ts +3 -3
  5. package/dist/assets/WrappedAssetCard/WrappedAssetCard.d.ts +3 -3
  6. package/dist/assets/WrappedAssetCard/WrappedAssetLink.d.ts +3 -3
  7. package/dist/common/MultipleReferenceEditor.d.ts +3 -3
  8. package/dist/common/SingleReferenceEditor.d.ts +3 -3
  9. package/dist/common/customCardTypes.d.ts +2 -2
  10. package/dist/common/useAccessApi.d.ts +1 -0
  11. package/dist/common/useContentTypePermissions.d.ts +2 -2
  12. package/dist/common/useEditorPermissions.d.ts +2 -2
  13. package/dist/components/CreateEntryLinkButton/CreateEntryLinkButton.d.ts +2 -3
  14. package/dist/components/CreateEntryLinkButton/CreateEntryMenuTrigger.d.ts +2 -3
  15. package/dist/components/LinkActions/LinkActions.d.ts +2 -2
  16. package/dist/components/LinkActions/LinkEntityActions.d.ts +2 -2
  17. package/dist/components/LinkActions/helpers.d.ts +11 -8
  18. package/dist/components/MissingEntityCard/MissingEntityCard.d.ts +2 -2
  19. package/dist/components/ScheduledIconWithTooltip/ScheduleTooltip.d.ts +2 -2
  20. package/dist/components/index.d.ts +1 -1
  21. package/dist/entries/WrappedEntryCard/FetchingWrappedEntryCard.d.ts +3 -3
  22. package/dist/entries/WrappedEntryCard/WrappedEntryCard.d.ts +3 -3
  23. package/dist/field-editor-reference.cjs.development.js +268 -363
  24. package/dist/field-editor-reference.cjs.development.js.map +1 -1
  25. package/dist/field-editor-reference.cjs.production.min.js +1 -1
  26. package/dist/field-editor-reference.cjs.production.min.js.map +1 -1
  27. package/dist/field-editor-reference.esm.js +256 -351
  28. package/dist/field-editor-reference.esm.js.map +1 -1
  29. package/dist/index.d.ts +1 -1
  30. package/dist/types.d.ts +13 -8
  31. package/package.json +9 -9
@@ -143,57 +143,72 @@ export declare function newReferenceEditorFakeSdk(): (import("mitt").Emitter | {
143
143
  }>;
144
144
  getEntityScheduledActions(): Promise<never[]>;
145
145
  getCachedContentTypes: () => import("@contentful/app-sdk").ContentType[];
146
- getContentType: <T = Object>(id: string) => Promise<T>;
147
- getContentTypes: <T_1 = Object>() => Promise<import("@contentful/app-sdk").CollectionResponse<T_1>>;
148
- createContentType: <T_2 = Object, InputArgs = any>(data: InputArgs) => Promise<T_2>;
149
- updateContentType: <T_3 = Object, InputArgs_1 = any>(data: InputArgs_1) => Promise<T_3>;
150
- deleteContentType: <T_4 = Object, InputArgs_2 = any>(data: InputArgs_2) => Promise<T_4>;
151
- getEntrySnapshots: <T_5 = Object>(id: string) => Promise<import("@contentful/app-sdk").CollectionResponse<T_5>>;
152
- getEntries: <T_6 = Object, InputArgs_3 = import("@contentful/app-sdk").SearchQuery>(query?: InputArgs_3 | undefined) => Promise<import("@contentful/app-sdk").CollectionResponse<T_6>>;
153
- createEntry: <T_7 = Object, InputArgs_4 = any>(contentTypeId: string, data: InputArgs_4) => Promise<T_7>;
154
- updateEntry: <T_8 = Object, InputArgs_5 = any>(data: InputArgs_5) => Promise<T_8>;
155
- publishEntry: <T_9 = Object, InputArgs_6 = any>(data: InputArgs_6) => Promise<T_9>;
156
- unpublishEntry: <T_10 = Object, InputArgs_7 = any>(data: InputArgs_7) => Promise<T_10>;
157
- archiveEntry: <T_11 = Object, InputArgs_8 = any>(data: InputArgs_8) => Promise<T_11>;
158
- unarchiveEntry: <T_12 = Object, InputArgs_9 = any>(data: InputArgs_9) => Promise<T_12>;
159
- deleteEntry: <T_13 = Object, InputArgs_10 = any>(data: InputArgs_10) => Promise<T_13>;
160
- getPublishedEntries: <T_14 = Object, InputArgs_11 = import("@contentful/app-sdk").SearchQuery>(query?: InputArgs_11 | undefined) => Promise<import("@contentful/app-sdk").CollectionResponse<T_14>>;
161
- getAssets: <T_15 = Object, InputArgs_12 = import("@contentful/app-sdk").SearchQuery>(query?: InputArgs_12 | undefined) => Promise<import("@contentful/app-sdk").CollectionResponse<T_15>>;
162
- createAsset: <T_16 = Object, InputArgs_13 = any>(data: InputArgs_13) => Promise<T_16>;
163
- updateAsset: <T_17 = Object, InputArgs_14 = any>(data: InputArgs_14) => Promise<T_17>;
164
- deleteAsset: <T_18 = Object, InputArgs_15 = any>(data: InputArgs_15) => Promise<T_18>;
165
- publishAsset: <T_19 = Object, InputArgs_16 = any>(data: InputArgs_16) => Promise<T_19>;
166
- unpublishAsset: <T_20 = Object, InputArgs_17 = any>(data: InputArgs_17) => Promise<T_20>;
167
- archiveAsset: <T_21 = Object, InputArgs_18 = any>(data: InputArgs_18) => Promise<T_21>;
168
- processAsset: <T_22 = Object, InputArgs_19 = any>(data: InputArgs_19, locale: string) => Promise<T_22>;
169
- unarchiveAsset: <T_23 = Object, InputArgs_20 = any>(data: InputArgs_20) => Promise<T_23>;
170
- getPublishedAssets: <T_24 = Object, InputArgs_21 = import("@contentful/app-sdk").SearchQuery>(query?: InputArgs_21 | undefined) => Promise<import("@contentful/app-sdk").CollectionResponse<T_24>>;
171
- createUpload: (base64data: string) => void;
172
- waitUntilAssetProcessed: (assetId: string, locale: string) => Promise<void>;
173
- getUsers: <T_25 = Object>() => Promise<import("@contentful/app-sdk").CollectionResponse<T_25>>;
146
+ getContentType: (id: string) => Promise<import("@contentful/app-sdk").ContentType>;
147
+ getContentTypes: <Query extends import("@contentful/app-sdk").SearchQuery = import("@contentful/app-sdk").SearchQuery>(query?: Query | undefined) => Promise<import("@contentful/app-sdk").CollectionResponse<import("@contentful/app-sdk").ContentType>>;
148
+ createContentType: (data: import("@contentful/app-sdk").WithOptionalId<import("@contentful/app-sdk").ContentType>) => Promise<import("@contentful/app-sdk").ContentType>;
149
+ updateContentType: (data: import("@contentful/app-sdk").ContentType) => Promise<import("@contentful/app-sdk").ContentType>;
150
+ deleteContentType: (contentTypeId: string) => Promise<void>;
151
+ getEntrySnapshots: <Fields extends Record<string, any> = Record<string, any>>(id: string) => Promise<import("@contentful/app-sdk").CollectionResponse<{
152
+ sys: {
153
+ space?: Link<string, string> | undefined;
154
+ status?: Link<string, string> | undefined;
155
+ publishedVersion?: number | undefined;
156
+ archivedVersion?: number | undefined;
157
+ archivedBy?: Link<string, string> | undefined;
158
+ archivedAt?: string | undefined;
159
+ deletedVersion?: number | undefined;
160
+ deletedBy?: Link<string, string> | undefined;
161
+ deletedAt?: string | undefined;
162
+ snapshotType: string;
163
+ snapshotEntityType: string;
164
+ };
165
+ snapshot: import("@contentful/app-sdk").Entry<Fields>;
166
+ }>>;
167
+ getEntries: <Fields_1, Query_1 extends import("@contentful/app-sdk").SearchQuery = import("@contentful/app-sdk").SearchQuery>(query?: Query_1 | undefined) => Promise<import("@contentful/app-sdk").CollectionResponse<import("@contentful/app-sdk").Entry<Fields_1>>>;
168
+ createEntry: <Fields_2>(contentTypeId: string, data: import("@contentful/app-sdk").WithOptionalId<import("@contentful/app-sdk").Entry<Fields_2>>) => Promise<import("@contentful/app-sdk").Entry<Fields_2>>;
169
+ updateEntry: <Fields_3 extends Record<string, any> = Record<string, any>>(data: import("@contentful/app-sdk").Entry<Fields_3>) => Promise<import("@contentful/app-sdk").Entry<Fields_3>>;
170
+ publishEntry: <Fields_4 extends Record<string, any> = Record<string, any>>(data: import("@contentful/app-sdk").Entry<Fields_4>) => Promise<import("@contentful/app-sdk").Entry<Fields_4>>;
171
+ unpublishEntry: <Fields_5 extends Record<string, any> = Record<string, any>>(data: import("@contentful/app-sdk").Entry<Fields_5>) => Promise<import("@contentful/app-sdk").Entry<Fields_5>>;
172
+ archiveEntry: <Fields_6 extends Record<string, any> = Record<string, any>>(data: import("@contentful/app-sdk").Entry<Fields_6>) => Promise<import("@contentful/app-sdk").Entry<Fields_6>>;
173
+ unarchiveEntry: <Fields_7 extends Record<string, any> = Record<string, any>>(data: import("@contentful/app-sdk").Entry<Fields_7>) => Promise<import("@contentful/app-sdk").Entry<Fields_7>>;
174
+ deleteEntry: <Fields_8 extends Record<string, any> = Record<string, any>>(data: import("@contentful/app-sdk").Entry<Fields_8>) => Promise<void>;
175
+ getPublishedEntries: <Fields_9, Query_2 extends import("@contentful/app-sdk").SearchQuery = import("@contentful/app-sdk").SearchQuery>(query?: Query_2 | undefined) => Promise<import("@contentful/app-sdk").CollectionResponse<import("@contentful/app-sdk").Entry<Fields_9>>>;
176
+ getAssets: <Query_3 extends import("@contentful/app-sdk").SearchQuery = import("@contentful/app-sdk").SearchQuery>(query?: Query_3 | undefined) => Promise<import("@contentful/app-sdk").CollectionResponse<import("@contentful/app-sdk").Asset>>;
177
+ createAsset: (data: import("@contentful/app-sdk").WithOptionalId<import("@contentful/app-sdk").Asset>) => Promise<import("@contentful/app-sdk").Asset>;
178
+ updateAsset: (data: import("@contentful/app-sdk").Asset) => Promise<import("@contentful/app-sdk").Asset>;
179
+ deleteAsset: (data: import("@contentful/app-sdk").Asset) => Promise<void>;
180
+ publishAsset: (data: import("@contentful/app-sdk").Asset) => Promise<import("@contentful/app-sdk").Asset>;
181
+ unpublishAsset: (data: import("@contentful/app-sdk").Asset) => Promise<import("@contentful/app-sdk").Asset>;
182
+ archiveAsset: (data: import("@contentful/app-sdk").Asset) => Promise<import("@contentful/app-sdk").Asset>;
183
+ processAsset: (data: import("@contentful/app-sdk").Asset, locale: string) => Promise<import("@contentful/app-sdk").Asset>;
184
+ unarchiveAsset: (data: import("@contentful/app-sdk").Asset) => Promise<import("@contentful/app-sdk").Asset>;
185
+ getPublishedAssets: <Query_4 extends import("@contentful/app-sdk").SearchQuery = import("@contentful/app-sdk").SearchQuery>(query?: Query_4 | undefined) => Promise<import("@contentful/app-sdk").CollectionResponse<import("@contentful/app-sdk").Asset>>;
186
+ createUpload: (base64data: string) => Promise<import("contentful-management/types").UploadProps>;
187
+ waitUntilAssetProcessed: (assetId: string, locale: string) => Promise<import("@contentful/app-sdk").Asset>;
188
+ getUsers: () => Promise<import("@contentful/app-sdk").CollectionResponse<import("@contentful/app-sdk").User>>;
174
189
  getEditorInterface: (contentTypeId: string) => Promise<import("@contentful/app-sdk").EditorInterface>;
175
190
  getEditorInterfaces: () => Promise<import("@contentful/app-sdk").CollectionResponse<import("@contentful/app-sdk").EditorInterface>>;
176
191
  getAllScheduledActions: () => Promise<import("@contentful/app-sdk").ScheduledAction[]>;
177
192
  signRequest: (request: import("@contentful/app-sdk").CanonicalRequest) => Promise<Record<string, string>>;
178
- createTag: (id: string, name: string, visibility?: "private" | "public" | undefined) => Promise<import("@contentful/app-sdk").Tag>;
193
+ createTag: (id: string, name: string, visibility?: any) => Promise<import("@contentful/app-sdk").Tag>;
179
194
  readTags: (skip: number, limit: number) => Promise<import("@contentful/app-sdk").CollectionResponse<import("@contentful/app-sdk").Tag>>;
180
195
  updateTag: (id: string, name: string, version: number) => Promise<import("@contentful/app-sdk").Tag>;
181
196
  deleteTag: (id: string, version: number) => Promise<boolean>;
182
- getTeams: () => Promise<import("@contentful/app-sdk").CollectionResponse<import("@contentful/app-sdk").Team>>;
197
+ getTeams: (query: import("contentful-management/types").QueryOptions) => Promise<import("@contentful/app-sdk").CollectionResponse<import("contentful-management/types").TeamProps>>;
183
198
  };
184
199
  dialogs: {
185
- selectSingleAsset: () => Promise<Link>;
186
- selectMultipleAssets: () => Promise<Link[]>;
187
- selectSingleEntry: () => Promise<Link>;
188
- selectMultipleEntries: () => Promise<Link[]>;
200
+ selectSingleAsset: () => Promise<Link<string, string>>;
201
+ selectMultipleAssets: () => Promise<Link<string, string>[]>;
202
+ selectSingleEntry: () => Promise<Link<string, string>>;
203
+ selectMultipleEntries: () => Promise<Link<string, string>[]>;
189
204
  };
190
205
  navigator: {
191
206
  openNewAsset: () => Promise<{
192
- entity: Link;
207
+ entity: Link<string, string>;
193
208
  }>;
194
209
  openAsset: () => Promise<{}>;
195
210
  openNewEntry: () => Promise<{
196
- entity: Link;
211
+ entity: Link<string, string>;
197
212
  }>;
198
213
  openEntry: () => Promise<{}>;
199
214
  onSlideInNavigation: () => () => {};
@@ -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
- import * as React from 'react';
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
- cardDragHandle?: React.ReactElement;
12
+ renderDragHandle?: RenderDragFn;
13
13
  renderCustomCard?: CustomCardRenderer;
14
14
  renderCustomMissingEntityCard?: RenderCustomMissingEntityCard;
15
15
  };
@@ -1,6 +1,6 @@
1
- import React from 'react';
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
- cardDragHandle?: React.ReactElement;
16
+ renderDragHandle?: RenderDragFn;
17
17
  isClickable: boolean;
18
18
  }
19
19
  export declare const WrappedAssetCard: {
@@ -1,5 +1,5 @@
1
- import React from 'react';
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
- cardDragHandle?: React.ReactElement;
14
+ renderDragHandle?: RenderDragFn;
15
15
  }
16
16
  export declare const WrappedAssetLink: (props: WrappedAssetLinkProps) => JSX.Element;
@@ -1,9 +1,9 @@
1
1
  import * as React from 'react';
2
- import { ReferenceValue, EntityType, ContentType } from '../types';
2
+ import { ReferenceValue, ContentEntityType, ContentType } from '../types';
3
3
  import { ReferenceEditorProps } from './ReferenceEditor';
4
4
  import { SortEndHandler, SortStartHandler } from 'react-sortable-hoc';
5
5
  declare type ChildProps = {
6
- entityType: EntityType;
6
+ entityType: ContentEntityType;
7
7
  items: ReferenceValue[];
8
8
  isDisabled: boolean;
9
9
  setValue: (value: ReferenceValue[]) => void;
@@ -13,7 +13,7 @@ declare type ChildProps = {
13
13
  onMove: (oldIndex: number, newIndex: number) => void;
14
14
  };
15
15
  export declare function MultipleReferenceEditor(props: ReferenceEditorProps & {
16
- entityType: EntityType;
16
+ entityType: ContentEntityType;
17
17
  children: (props: ReferenceEditorProps & ChildProps) => React.ReactElement;
18
18
  }): JSX.Element;
19
19
  export declare namespace MultipleReferenceEditor {
@@ -1,9 +1,9 @@
1
1
  import * as React from 'react';
2
- import { ContentType, EntityType, ReferenceValue } from '../types';
2
+ import { ContentType, ContentEntityType, ReferenceValue } from '../types';
3
3
  import { ReferenceEditorProps } from './ReferenceEditor';
4
4
  declare type ChildProps = {
5
5
  entityId: string;
6
- entityType: EntityType;
6
+ entityType: ContentEntityType;
7
7
  isDisabled: boolean;
8
8
  setValue: (value: ReferenceValue | null | undefined) => void;
9
9
  allContentTypes: ContentType[];
@@ -11,7 +11,7 @@ declare type ChildProps = {
11
11
  hasCardEditActions: boolean;
12
12
  };
13
13
  export declare function SingleReferenceEditor(props: ReferenceEditorProps & {
14
- entityType: EntityType;
14
+ entityType: ContentEntityType;
15
15
  children: (props: ChildProps) => React.ReactElement;
16
16
  }): JSX.Element;
17
17
  export declare namespace SingleReferenceEditor {
@@ -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
- cardDragHandle?: React.ReactElement;
23
+ renderDragHandle?: RenderDragFn;
24
24
  onEdit?: () => void;
25
25
  onRemove?: () => void;
26
26
  onMoveTop?: () => void;
@@ -9,6 +9,7 @@ export declare function useAccessApi(accessApi: AccessAPI & Partial<ExtendedAcce
9
9
  <T = Object>(action: CrudAction, entity: T | "ContentType" | import("@contentful/app-sdk").ContentType | "Asset" | "Entry"): Promise<boolean>;
10
10
  <T_1 = Object>(action: PublishableAction, entity: T_1 | "ContentType" | import("@contentful/app-sdk").ContentType | "Asset" | "Entry"): Promise<boolean>;
11
11
  <T_2 = Object>(action: ArchiveableAction, entity: T_2 | "Asset" | "Entry"): Promise<boolean>;
12
+ (action: "update", entity: import("@contentful/app-sdk").Entry<Record<string, any>> | import("@contentful/app-sdk").Task | import("@contentful/app-sdk").Asset, patch: import("@contentful/app-sdk").JSONPatchItem[]): Promise<boolean>;
12
13
  };
13
14
  canPerformActionOnEntryOfType: (action: EntryAction, contentTypeId: string) => Promise<boolean>;
14
15
  };
@@ -1,9 +1,9 @@
1
- import { ContentType, EntityType, FieldExtensionSDK } from '../types';
1
+ import { ContentType, ContentEntityType, FieldExtensionSDK } from '../types';
2
2
  import { ReferenceEditorProps } from './ReferenceEditor';
3
3
  import { ReferenceValidations } from '../utils/fromFieldValidations';
4
4
  declare type ContentTypePermissionsProps = {
5
5
  sdk: FieldExtensionSDK;
6
- entityType: EntityType;
6
+ entityType: ContentEntityType;
7
7
  parameters: ReferenceEditorProps['parameters'];
8
8
  allContentTypes: ContentType[];
9
9
  validations: ReferenceValidations;
@@ -1,8 +1,8 @@
1
- import { ContentType, EntityType, FieldExtensionSDK } from '../types';
1
+ import { ContentType, ContentEntityType, FieldExtensionSDK } from '../types';
2
2
  import { ReferenceEditorProps } from './ReferenceEditor';
3
3
  export declare type EditorPermissionsProps = {
4
4
  sdk: FieldExtensionSDK;
5
- entityType: EntityType;
5
+ entityType: ContentEntityType;
6
6
  parameters: ReferenceEditorProps['parameters'];
7
7
  allContentTypes: ContentType[];
8
8
  };
@@ -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
- renderCustomDropdownItems?: CreateCustomEntryMenuItems;
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, renderCustomDropdownItems, text, testId, hasPlusIcon, useExperimentalStyles, suggestedContentTypeId, dropdownSettings, disabled, }: CreateEntryLinkButtonProps) => JSX.Element;
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
- renderCustomDropdownItems?: CreateCustomEntryMenuItems;
21
+ customDropdownItems?: React.ReactNode;
23
22
  children: CreateEntryMenuTriggerChild;
24
23
  }
25
24
  export declare const CreateEntryMenuTrigger: {
26
- ({ contentTypes, suggestedContentTypeId, contentTypesLabel, onSelect, testId, dropdownSettings, renderCustomDropdownItems, children, }: CreateEntryMenuTrigger): JSX.Element;
25
+ ({ contentTypes, suggestedContentTypeId, contentTypesLabel, onSelect, testId, dropdownSettings, customDropdownItems, children, }: CreateEntryMenuTrigger): JSX.Element;
27
26
  defaultProps: {
28
27
  testId: string;
29
28
  contentTypesLabel: string;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
- import { EntityType, ContentType, ActionLabels, Entry, Asset, NavigatorSlideInfo } from '../../types';
2
+ import { ContentEntityType, ContentType, ActionLabels, Entry, Asset, NavigatorSlideInfo } from '../../types';
3
3
  export interface LinkActionsProps {
4
- entityType: EntityType;
4
+ entityType: ContentEntityType;
5
5
  contentTypes: ContentType[];
6
6
  canCreateEntity: boolean;
7
7
  canLinkEntity: boolean;
@@ -1,9 +1,9 @@
1
1
  import * as React from 'react';
2
- import { Action, ActionLabels, EntityType, FieldExtensionSDK } from '../../types';
2
+ import { Action, ActionLabels, ContentEntityType, FieldExtensionSDK } from '../../types';
3
3
  import { LinkActionsProps } from './LinkActions';
4
4
  import { EditorPermissions } from '../../common/useEditorPermissions';
5
5
  declare type LinkEntityActionsProps = {
6
- entityType: EntityType;
6
+ entityType: ContentEntityType;
7
7
  canLinkMultiple: boolean;
8
8
  sdk: FieldExtensionSDK;
9
9
  isDisabled: boolean;
@@ -1,23 +1,26 @@
1
- import { EntityType, Entry, FieldExtensionSDK } from '../../types';
1
+ import { Asset, ContentEntityType, Entry, FieldExtensionSDK } from '../../types';
2
2
  import { EditorPermissions } from '../../common/useEditorPermissions';
3
3
  export declare function createEntity(props: {
4
4
  sdk: FieldExtensionSDK;
5
- entityType: EntityType;
5
+ entityType: ContentEntityType;
6
6
  contentTypeId?: string;
7
7
  }): Promise<{
8
8
  entity?: undefined;
9
9
  slide?: undefined;
10
10
  } | {
11
- entity: Entry | undefined;
12
- slide: import("@contentful/app-sdk/dist/types").NavigatorSlideInfo | undefined;
11
+ entity: Entry<Entry<Record<string, any>>> | 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;
13
16
  }>;
14
17
  export declare function selectSingleEntity(props: {
15
18
  sdk: FieldExtensionSDK;
16
- entityType: EntityType;
19
+ entityType: ContentEntityType;
17
20
  editorPermissions: EditorPermissions;
18
- }): Promise<Entry | null>;
21
+ }): Promise<Entry<Record<string, any>> | null>;
19
22
  export declare function selectMultipleEntities(props: {
20
23
  sdk: FieldExtensionSDK;
21
- entityType: EntityType;
24
+ entityType: ContentEntityType;
22
25
  editorPermissions: EditorPermissions;
23
- }): Promise<Entry[] | null>;
26
+ }): Promise<Entry<Record<string, any>>[] | null>;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
- import { EntityType } from '../../types';
2
+ import { ContentEntityType } from '../../types';
3
3
  export declare function MissingEntityCard(props: {
4
- entityType: EntityType;
4
+ entityType: ContentEntityType;
5
5
  asSquare?: boolean;
6
6
  isDisabled: boolean;
7
7
  onRemove?: Function;
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
2
  import { ScheduledAction } from '@contentful/app-sdk';
3
- export declare const ScheduleTooltipContent: ({ job, jobsCount, }: {
3
+ export declare const getScheduleTooltipContent: ({ job, jobsCount, }: {
4
4
  job: ScheduledAction;
5
5
  jobsCount: number;
6
- }) => JSX.Element;
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 { ScheduleTooltipContent } from './ScheduledIconWithTooltip/ScheduleTooltip';
8
+ export { getScheduleTooltipContent } from './ScheduledIconWithTooltip/ScheduleTooltip';
9
9
  export { AssetThumbnail } from './AssetThumbnail/AssetThumbnail';
@@ -1,5 +1,5 @@
1
- import * as React from 'react';
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
- cardDragHandle?: React.ReactElement;
11
+ renderDragHandle?: RenderDragFn;
12
12
  hasCardEditActions: boolean;
13
13
  onMoveTop?: () => void;
14
14
  onMoveBottom?: () => void;
@@ -1,6 +1,6 @@
1
- import * as React from 'react';
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
- cardDragHandle?: React.ReactElement;
17
+ renderDragHandle?: RenderDragFn;
18
18
  isClickable?: boolean;
19
19
  hasCardEditActions: boolean;
20
20
  onMoveTop?: () => void;