@tinacms/schema-tools 0.1.4 → 0.1.5
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.
|
@@ -20,6 +20,9 @@ export declare type UIField<F extends UIField = any, Shape = any> = {
|
|
|
20
20
|
parse?: (value: Shape, name: string, field: F) => any;
|
|
21
21
|
format?: (value: Shape, name: string, field: F) => any;
|
|
22
22
|
validate?(value: Shape, allValues: any, meta: any, field: UIField<F, Shape>): string | object | undefined | void;
|
|
23
|
+
/**
|
|
24
|
+
* @deprecated use `defaultItem` at the collection level instead
|
|
25
|
+
*/
|
|
23
26
|
defaultValue?: Shape;
|
|
24
27
|
};
|
|
25
28
|
export interface TinaCloudSchema<WithNamespace extends boolean, Store = any> {
|
|
@@ -66,9 +69,14 @@ interface BaseCollection {
|
|
|
66
69
|
label?: string;
|
|
67
70
|
name: string;
|
|
68
71
|
path: string;
|
|
72
|
+
defaultItem?: () => unknown | unknown;
|
|
69
73
|
indexes?: TinaIndex[];
|
|
70
74
|
format?: FormatType;
|
|
71
75
|
ui?: {
|
|
76
|
+
filename?: {
|
|
77
|
+
slugify?: (values: unknown) => string;
|
|
78
|
+
disabled?: boolean;
|
|
79
|
+
};
|
|
72
80
|
/**
|
|
73
81
|
* Forms for this collection will be editable from the global sidebar rather than the form panel
|
|
74
82
|
*/
|