@firecms/core 3.0.0-alpha.58 → 3.0.0-alpha.60
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/components/ReferenceWidget.d.ts +20 -16
- package/dist/index.es.js +2812 -2900
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +5 -5
- package/dist/index.umd.js.map +1 -1
- package/dist/types/entities.d.ts +1 -1
- package/dist/util/entities.d.ts +1 -1
- package/package.json +3 -3
- package/src/components/ReferenceWidget.tsx +100 -210
- package/src/types/entities.ts +1 -1
- package/src/util/entities.ts +1 -1
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
import { EntityReference, FilterValues } from "../types";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* @param name
|
|
5
|
-
* @param path
|
|
6
|
-
* @param disabled
|
|
7
|
-
* @param value
|
|
8
|
-
* @param setValue
|
|
9
|
-
* @param previewProperties
|
|
10
|
-
* @param forceFilter
|
|
11
|
-
* @constructor
|
|
12
|
-
*/
|
|
13
|
-
export declare function ReferenceWidget<M extends Record<string, any>>({ name, path, disabled, value, setValue, previewProperties, forceFilter }: {
|
|
1
|
+
import { Entity, EntityReference, FilterValues } from "../types";
|
|
2
|
+
import { PreviewSize } from "../preview";
|
|
3
|
+
export type ReferenceWidgetProps<M extends Record<string, any>> = {
|
|
14
4
|
name?: string;
|
|
15
|
-
|
|
16
|
-
|
|
5
|
+
multiselect?: boolean;
|
|
6
|
+
value: EntityReference<M> | EntityReference<M>[] | null;
|
|
7
|
+
onReferenceSelected?: (params: {
|
|
8
|
+
reference: EntityReference<M> | null;
|
|
9
|
+
entity: Entity<M> | null;
|
|
10
|
+
}) => void;
|
|
11
|
+
onMultipleReferenceSelected?: (params: {
|
|
12
|
+
references: EntityReference<M>[] | null;
|
|
13
|
+
entities: Entity<M>[] | null;
|
|
14
|
+
}) => void;
|
|
17
15
|
path: string;
|
|
18
16
|
disabled?: boolean;
|
|
19
17
|
previewProperties?: string[];
|
|
@@ -21,4 +19,10 @@ export declare function ReferenceWidget<M extends Record<string, any>>({ name, p
|
|
|
21
19
|
* Allow selection of entities that pass the given filter only.
|
|
22
20
|
*/
|
|
23
21
|
forceFilter?: FilterValues<string>;
|
|
24
|
-
|
|
22
|
+
size: PreviewSize;
|
|
23
|
+
className?: string;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* This field allows selecting reference/s.
|
|
27
|
+
*/
|
|
28
|
+
export declare function ReferenceWidget<M extends Record<string, any>>({ name, multiselect, path, disabled, value, onReferenceSelected, onMultipleReferenceSelected, previewProperties, forceFilter, size, className }: ReferenceWidgetProps<M>): import("react/jsx-runtime").JSX.Element;
|