|
@@ -32,8 +32,15 @@ interface Option {
|
|
|
|
|
|
interface OptionsFieldMetaData extends SimpleFieldMetaData {
|
|
|
options; // Array of Options - for select, radio-button-group and other 'multiple-choice' types
|
|
|
- horizontal?; // Whether to arrang radio buttons or checkboxes horizontally (default false)
|
|
|
+ horizontal?: boolean; // Whether to arrang radio buttons or checkboxes horizontally (default false)
|
|
|
}
|
|
|
+
|
|
|
+// For components that include links to other pages
|
|
|
+interface Link {
|
|
|
+ label: string;
|
|
|
+ route: any[] | string;
|
|
|
+}
|
|
|
+
|
|
|
interface DropdownModifiedInputFieldMetaData extends SimpleFieldMetaData {
|
|
|
modifiers: string[];
|
|
|
transform: ValueTransformer;
|
|
@@ -124,6 +131,8 @@ abstract class OptionsField extends SimpleField {
|
|
|
|
|
|
class TextField extends SimpleField {
|
|
|
type = 'Text';
|
|
|
+ link?: Link;
|
|
|
+
|
|
|
}
|
|
|
|
|
|
class TextareaField extends SimpleField {
|
|
@@ -136,12 +145,17 @@ class PasswordField extends SimpleField {
|
|
|
|
|
|
class SelectField extends OptionsField {
|
|
|
type = 'Select';
|
|
|
+ link?: Link;
|
|
|
}
|
|
|
|
|
|
class RadioField extends OptionsField {
|
|
|
type = 'Radio';
|
|
|
}
|
|
|
|
|
|
+class HiddenField extends SimpleField {
|
|
|
+ type = 'Hidden';
|
|
|
+}
|
|
|
+
|
|
|
// ---------------------------------------------------------------------------------------------------------------------
|
|
|
// Concrete Implementations - Custom Form Components
|
|
|
|
|
@@ -261,7 +275,7 @@ class ButtonGroup {
|
|
|
|
|
|
export {
|
|
|
SimpleField,
|
|
|
- TextField, TextareaField, PasswordField, SelectField, RadioField,
|
|
|
+ TextField, TextareaField, PasswordField, SelectField, RadioField, HiddenField,
|
|
|
CheckbuttonField, DropdownModifiedInputField,
|
|
|
CheckbuttonGroup,
|
|
|
TimepickerField, DatepickerField,
|