@contentful/field-editor-reference 4.1.0 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,22 @@
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
+ # [4.2.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-reference@4.1.2...@contentful/field-editor-reference@4.2.0) (2022-03-02)
7
+
8
+ ### Features
9
+
10
+ - support onclick on wrappedentrycard components ([#1053](https://github.com/contentful/field-editors/issues/1053)) ([2480c9c](https://github.com/contentful/field-editors/commit/2480c9cbf1609b9ee2da73a951355a6972fdd859))
11
+
12
+ ## [4.1.2](https://github.com/contentful/field-editors/compare/@contentful/field-editor-reference@4.1.1...@contentful/field-editor-reference@4.1.2) (2022-02-15)
13
+
14
+ ### Bug Fixes
15
+
16
+ - bump f36 packages ([#1025](https://github.com/contentful/field-editors/issues/1025)) ([ec37a40](https://github.com/contentful/field-editors/commit/ec37a4000db7cd75c66dd9621136b2272c9feeea))
17
+
18
+ ## [4.1.1](https://github.com/contentful/field-editors/compare/@contentful/field-editor-reference@4.1.0...@contentful/field-editor-reference@4.1.1) (2022-02-14)
19
+
20
+ **Note:** Version bump only for package @contentful/field-editor-reference
21
+
6
22
  # [4.1.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-reference@4.0.7...@contentful/field-editor-reference@4.1.0) (2022-01-11)
7
23
 
8
24
  ### Features
@@ -190,7 +190,7 @@ export declare function newReferenceEditorFakeSdk(): (import("mitt").Emitter | {
190
190
  getEditorInterfaces: () => Promise<import("@contentful/app-sdk").CollectionResponse<import("@contentful/app-sdk").EditorInterface>>;
191
191
  getAllScheduledActions: () => Promise<import("@contentful/app-sdk").ScheduledAction[]>;
192
192
  signRequest: (request: import("@contentful/app-sdk").CanonicalRequest) => Promise<Record<string, string>>;
193
- createTag: (id: string, name: string, visibility?: any) => Promise<import("@contentful/app-sdk").Tag>;
193
+ createTag: (id: string, name: string, visibility?: "private" | "public" | undefined) => Promise<import("@contentful/app-sdk").Tag>;
194
194
  readTags: (skip: number, limit: number) => Promise<import("@contentful/app-sdk").CollectionResponse<import("@contentful/app-sdk").Tag>>;
195
195
  updateTag: (id: string, name: string, version: number) => Promise<import("@contentful/app-sdk").Tag>;
196
196
  deleteTag: (id: string, version: number) => Promise<boolean>;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import * as React from 'react';
2
2
  import { SpaceAPI } from '@contentful/app-sdk';
3
3
  import { ContentType, Entry, RenderDragFn } from '../../types';
4
4
  export interface WrappedEntryCardProps {
@@ -10,6 +10,7 @@ export interface WrappedEntryCardProps {
10
10
  isSelected?: boolean;
11
11
  onRemove?: () => void;
12
12
  onEdit?: () => void;
13
+ onClick?: (e: React.MouseEvent<HTMLElement>) => void;
13
14
  localeCode: string;
14
15
  defaultLocaleCode: string;
15
16
  contentType?: ContentType;
@@ -2528,6 +2528,7 @@ function WrappedEntryCard(props) {
2528
2528
  onClick: function onClick(e) {
2529
2529
  e.preventDefault();
2530
2530
  if (!props.isClickable) return;
2531
+ if (props.onClick) return props.onClick(e);
2531
2532
  props.onEdit && props.onEdit();
2532
2533
  }
2533
2534
  });