2023-03-30 13:29:09 -04:00
|
|
|
import type {
|
|
|
|
BooleanField,
|
2023-04-19 10:57:34 -04:00
|
|
|
ColorField,
|
2023-03-30 13:29:09 -04:00
|
|
|
DateTimeField,
|
|
|
|
FileOrImageField,
|
2023-09-06 16:30:51 -04:00
|
|
|
KeyValueField,
|
2023-03-30 13:29:09 -04:00
|
|
|
MarkdownField,
|
|
|
|
NumberField,
|
|
|
|
RelationField,
|
|
|
|
SelectField,
|
|
|
|
StringOrTextField,
|
2023-04-20 12:55:49 -04:00
|
|
|
UUIDField,
|
2023-03-30 13:29:09 -04:00
|
|
|
} from '@staticcms/core';
|
|
|
|
|
|
|
|
export const mockBooleanField: BooleanField = {
|
|
|
|
label: 'Boolean',
|
|
|
|
name: 'mock_boolean',
|
|
|
|
widget: 'boolean',
|
|
|
|
};
|
|
|
|
|
2023-04-19 10:57:34 -04:00
|
|
|
export const mockColorField: ColorField = {
|
|
|
|
label: 'Color',
|
|
|
|
name: 'mock_color',
|
|
|
|
widget: 'color',
|
|
|
|
};
|
|
|
|
|
2023-03-30 13:29:09 -04:00
|
|
|
export const mockDateTimeField: DateTimeField = {
|
|
|
|
label: 'DateTime',
|
|
|
|
name: 'mock_datetime',
|
|
|
|
widget: 'datetime',
|
|
|
|
};
|
|
|
|
|
|
|
|
export const mockDateField: DateTimeField = {
|
|
|
|
label: 'Date',
|
|
|
|
name: 'mock_date',
|
|
|
|
widget: 'datetime',
|
|
|
|
time_format: false,
|
|
|
|
};
|
|
|
|
|
|
|
|
export const mockTimeField: DateTimeField = {
|
|
|
|
label: 'Time',
|
|
|
|
name: 'mock_time',
|
|
|
|
widget: 'datetime',
|
|
|
|
date_format: false,
|
|
|
|
};
|
|
|
|
|
|
|
|
export const mockFileField: FileOrImageField = {
|
|
|
|
label: 'File',
|
|
|
|
name: 'mock_file',
|
|
|
|
widget: 'file',
|
|
|
|
};
|
|
|
|
|
2023-05-04 14:36:33 -04:00
|
|
|
export const mockImageField: FileOrImageField = {
|
|
|
|
label: 'Image',
|
|
|
|
name: 'mock_image',
|
|
|
|
widget: 'image',
|
|
|
|
};
|
|
|
|
|
2023-09-06 16:30:51 -04:00
|
|
|
export const mockKeyValueField: KeyValueField = {
|
|
|
|
label: 'Key Value',
|
|
|
|
name: 'mock_key_value',
|
|
|
|
widget: 'keyvalue',
|
|
|
|
};
|
|
|
|
|
2023-03-30 13:29:09 -04:00
|
|
|
export const mockMarkdownField: MarkdownField = {
|
|
|
|
label: 'Body',
|
|
|
|
name: 'body',
|
|
|
|
widget: 'markdown',
|
|
|
|
hint: 'Main content goes here.',
|
|
|
|
};
|
|
|
|
|
|
|
|
export const mockNumberField: NumberField = {
|
|
|
|
label: 'Number',
|
|
|
|
name: 'mock_number',
|
|
|
|
widget: 'number',
|
|
|
|
};
|
|
|
|
|
|
|
|
export const mockRelationField: RelationField = {
|
|
|
|
label: 'Relation',
|
|
|
|
name: 'relation',
|
|
|
|
widget: 'relation',
|
|
|
|
collection: 'posts',
|
|
|
|
display_fields: ['title', 'date'],
|
|
|
|
search_fields: ['title', 'body'],
|
|
|
|
value_field: 'title',
|
|
|
|
};
|
|
|
|
|
|
|
|
export const mockSelectField: SelectField = {
|
|
|
|
label: 'Select',
|
|
|
|
name: 'mock_select',
|
|
|
|
widget: 'select',
|
|
|
|
options: ['Option 1', 'Option 2', 'Option 3'],
|
|
|
|
};
|
|
|
|
|
|
|
|
export const mockStringField: StringOrTextField = {
|
|
|
|
label: 'String',
|
|
|
|
name: 'mock_string',
|
|
|
|
widget: 'string',
|
|
|
|
};
|
|
|
|
|
|
|
|
export const mockTextField: StringOrTextField = {
|
|
|
|
label: 'Text',
|
|
|
|
name: 'mock_text',
|
|
|
|
widget: 'text',
|
|
|
|
};
|
2023-04-20 12:55:49 -04:00
|
|
|
|
|
|
|
export const mockUUIDField: UUIDField = {
|
|
|
|
label: 'UUID',
|
|
|
|
name: 'mock_uuid',
|
|
|
|
widget: 'uuid',
|
|
|
|
};
|