fields

package
v1.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2021 License: MIT Imports: 0 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatetimeFieldOptions

type DatetimeFieldOptions struct {
	Label    string
	Sortable *bool
	ShowTime *bool
}

type DatetimeInputOptions

type DatetimeInputOptions struct {
	Label      string
	HelperText string
	FullWidth  *bool
	Disabled   *bool
}

type Field

type Field struct {
	Name    string       `json:"name"`
	Type    string       `json:"type"`
	Options FieldOptions `json:"options"`
}

func NewDatetimeField

func NewDatetimeField(name string, opts *DatetimeFieldOptions) Field

func NewNumberField

func NewNumberField(name string, opts *NumberFieldOptions) Field

func NewReferenceField

func NewReferenceField(name string, resourceName string, opts *ReferenceFieldOptions) Field

func NewReferenceListField

func NewReferenceListField(name string, resourceName string, opts *ReferenceListFieldOptions) Field

func NewSelectField

func NewSelectField(name string, opts *SelectFieldOptions) Field

func NewTextField

func NewTextField(name string, opts *TextFieldOptions) Field

type FieldOptions

type FieldOptions = map[string]interface{}

type Input

type Input Field

func NewDatetimeInput

func NewDatetimeInput(name string, opts *DatetimeInputOptions) Input

func NewNumberInput

func NewNumberInput(name string, opts *NumberInputOptions) Input

func NewReferenceInput

func NewReferenceInput(name string, resourceName string, opts *ReferenceInputOptions) Input

func NewReferenceListInput

func NewReferenceListInput(resourceName string, resourceFieldName string, opts *ReferenceListInputOptions) Input

func NewSelectInput

func NewSelectInput(name string, opts *SelectInputOptions) Input

func NewTextInput

func NewTextInput(name string, opts *TextInputOptions) Input

type InputOptions

type InputOptions FieldOptions

type NumberFieldOptions

type NumberFieldOptions struct {
	Label    string
	Sortable *bool
}

type NumberInputOptions

type NumberInputOptions struct {
	Label      string
	HelperText string
	FullWidth  *bool
	Disabled   *bool
	Max        *int64
	Min        *int64
	Step       *int64
}

type ReferenceFieldOptions

type ReferenceFieldOptions struct {
	Label         string
	Sortable      *bool
	TextFieldName string
}

type ReferenceInputAutocomplete

type ReferenceInputAutocomplete struct {
	Enabled          bool     `json:"enabled"`
	SearchableFields []string `json:"searchable_fields"`
}

type ReferenceInputOptions

type ReferenceInputOptions struct {
	Label           string
	HelperText      string
	FullWidth       *bool
	InitialValue    string
	Disabled        *bool
	OptionTextField string
	Autocomplete    ReferenceInputAutocomplete
	Filter          map[string]interface{}
}

type ReferenceListFieldOptions

type ReferenceListFieldOptions struct {
	Label         string
	TextFieldName string
}

type ReferenceListInputAutocomplete

type ReferenceListInputAutocomplete struct {
	Enabled          bool     `json:"enabled"`
	SearchableFields []string `json:"searchable_fields"`
}

type ReferenceListInputOptions

type ReferenceListInputOptions struct {
	Label      string
	HelperText string
	Disabled   *bool
}

type SelectFieldOptions

type SelectFieldOptions struct {
	Label    string
	Sortable *bool
}

type SelectInputChoice

type SelectInputChoice struct {
	Name  string      `json:"name"`
	Value interface{} `json:"value"`
}

type SelectInputOptions

type SelectInputOptions struct {
	Label        string
	HelperSelect string
	FullWidth    *bool
	InitialValue string
	Disabled     *bool
	Choices      []SelectInputChoice
	EmptyText    string
}

type TextFieldOptions

type TextFieldOptions struct {
	Label    string
	Sortable *bool
}

type TextInputOptions

type TextInputOptions struct {
	Label        string
	HelperText   string
	FullWidth    *bool
	InitialValue string
	Disabled     *bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL