@contentful/field-editor-reference 2.20.10 → 2.21.2
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 +41 -0
- package/dist/__fixtures__/FakeSdk.d.ts +51 -36
- package/dist/common/MultipleReferenceEditor.d.ts +3 -3
- package/dist/common/SingleReferenceEditor.d.ts +3 -3
- package/dist/common/useAccessApi.d.ts +1 -0
- package/dist/common/useContentTypePermissions.d.ts +2 -2
- package/dist/common/useEditorPermissions.d.ts +2 -2
- package/dist/components/LinkActions/LinkActions.d.ts +2 -2
- package/dist/components/LinkActions/LinkEntityActions.d.ts +2 -2
- package/dist/components/LinkActions/helpers.d.ts +11 -8
- package/dist/components/MissingEntityCard/MissingEntityCard.d.ts +2 -2
- package/dist/field-editor-reference.cjs.development.js +9 -7
- 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 +9 -7
- package/dist/field-editor-reference.esm.js.map +1 -1
- package/dist/types.d.ts +8 -8
- package/package.json +6 -7
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,47 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [2.21.2](https://github.com/contentful/field-editors/compare/@contentful/field-editor-reference@2.21.1...@contentful/field-editor-reference@2.21.2) (2021-10-18)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* [] Remove test utils from peer dependencies ([#889](https://github.com/contentful/field-editors/issues/889)) ([3694bd7](https://github.com/contentful/field-editors/commit/3694bd7e706b8beb1f685167125f36ef0cbe82de))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [2.21.1](https://github.com/contentful/field-editors/compare/@contentful/field-editor-reference@2.21.0...@contentful/field-editor-reference@2.21.1) (2021-10-14)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @contentful/field-editor-reference
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
# [2.21.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-reference@2.20.11...@contentful/field-editor-reference@2.21.0) (2021-10-06)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Features
|
|
29
|
+
|
|
30
|
+
* [EXT-3161] bump app sdk to v4 ([#881](https://github.com/contentful/field-editors/issues/881)) ([9c4a2af](https://github.com/contentful/field-editors/commit/9c4a2af07da203d59fb5f15c3a5188ecc64b1d44))
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
## [2.20.11](https://github.com/contentful/field-editors/compare/@contentful/field-editor-reference@2.20.10...@contentful/field-editor-reference@2.20.11) (2021-10-06)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
### Bug Fixes
|
|
40
|
+
|
|
41
|
+
* **reference:** consistent ordering of link actions ([#884](https://github.com/contentful/field-editors/issues/884)) ([1a6bae7](https://github.com/contentful/field-editors/commit/1a6bae7825b09d91151bd80e7f55c0c1cf5ec27c))
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
6
47
|
## [2.20.10](https://github.com/contentful/field-editors/compare/@contentful/field-editor-reference@2.20.9...@contentful/field-editor-reference@2.20.10) (2021-09-20)
|
|
7
48
|
|
|
8
49
|
**Note:** Version bump only for package @contentful/field-editor-reference
|
|
@@ -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:
|
|
147
|
-
getContentTypes: <
|
|
148
|
-
createContentType:
|
|
149
|
-
updateContentType:
|
|
150
|
-
deleteContentType:
|
|
151
|
-
getEntrySnapshots: <
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
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?:
|
|
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("
|
|
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: () => () => {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { ReferenceValue,
|
|
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:
|
|
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:
|
|
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,
|
|
2
|
+
import { ContentType, ContentEntityType, ReferenceValue } from '../types';
|
|
3
3
|
import { ReferenceEditorProps } from './ReferenceEditor';
|
|
4
4
|
declare type ChildProps = {
|
|
5
5
|
entityId: string;
|
|
6
|
-
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:
|
|
14
|
+
entityType: ContentEntityType;
|
|
15
15
|
children: (props: ChildProps) => React.ReactElement;
|
|
16
16
|
}): JSX.Element;
|
|
17
17
|
export declare namespace SingleReferenceEditor {
|
|
@@ -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,
|
|
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:
|
|
6
|
+
entityType: ContentEntityType;
|
|
7
7
|
parameters: ReferenceEditorProps['parameters'];
|
|
8
8
|
allContentTypes: ContentType[];
|
|
9
9
|
validations: ReferenceValidations;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ContentType,
|
|
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:
|
|
5
|
+
entityType: ContentEntityType;
|
|
6
6
|
parameters: ReferenceEditorProps['parameters'];
|
|
7
7
|
allContentTypes: ContentType[];
|
|
8
8
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ContentEntityType, ContentType, ActionLabels, Entry, Asset, NavigatorSlideInfo } from '../../types';
|
|
3
3
|
export interface LinkActionsProps {
|
|
4
|
-
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,
|
|
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:
|
|
6
|
+
entityType: ContentEntityType;
|
|
7
7
|
canLinkMultiple: boolean;
|
|
8
8
|
sdk: FieldExtensionSDK;
|
|
9
9
|
isDisabled: boolean;
|
|
@@ -1,23 +1,26 @@
|
|
|
1
|
-
import {
|
|
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:
|
|
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:
|
|
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:
|
|
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 {
|
|
2
|
+
import { ContentEntityType } from '../../types';
|
|
3
3
|
export declare function MissingEntityCard(props: {
|
|
4
|
-
entityType:
|
|
4
|
+
entityType: ContentEntityType;
|
|
5
5
|
asSquare?: boolean;
|
|
6
6
|
isDisabled: boolean;
|
|
7
7
|
onRemove?: Function;
|
|
@@ -604,18 +604,18 @@ function CombinedAssetLinkActions(props) {
|
|
|
604
604
|
}, React.createElement(forma36ReactComponents.DropdownList, {
|
|
605
605
|
testId: testIds$1.dropdown
|
|
606
606
|
}, React.createElement(forma36ReactComponents.DropdownListItem, {
|
|
607
|
-
testId: testIds$1.
|
|
607
|
+
testId: testIds$1.linkExisting,
|
|
608
608
|
onClick: function onClick() {
|
|
609
609
|
setOpen(false);
|
|
610
|
-
props.
|
|
610
|
+
props.onLinkExisting();
|
|
611
611
|
}
|
|
612
|
-
}, "Add
|
|
613
|
-
testId: testIds$1.
|
|
612
|
+
}, "Add existing media"), React.createElement(forma36ReactComponents.DropdownListItem, {
|
|
613
|
+
testId: testIds$1.createAndLink,
|
|
614
614
|
onClick: function onClick() {
|
|
615
615
|
setOpen(false);
|
|
616
|
-
props.
|
|
616
|
+
props.onCreate();
|
|
617
617
|
}
|
|
618
|
-
}, "Add
|
|
618
|
+
}, "Add new media")));
|
|
619
619
|
}
|
|
620
620
|
|
|
621
621
|
var card = /*#__PURE__*/emotion.css({
|
|
@@ -3052,7 +3052,9 @@ function renderActions(props) {
|
|
|
3052
3052
|
testId: "card-action-edit"
|
|
3053
3053
|
}, "Edit"), entityFile && React__default.createElement(forma36ReactComponents.DropdownListItem, {
|
|
3054
3054
|
onClick: function onClick() {
|
|
3055
|
-
|
|
3055
|
+
if (typeof entityFile.url === 'string') {
|
|
3056
|
+
downloadAsset(entityFile.url);
|
|
3057
|
+
}
|
|
3056
3058
|
},
|
|
3057
3059
|
testId: "card-action-download"
|
|
3058
3060
|
}, "Download"), onRemove && React__default.createElement(forma36ReactComponents.DropdownListItem, {
|