2019-09-12 08:11:25 +00:00
|
|
|
import React from "react";
|
2019-09-13 10:45:49 +00:00
|
|
|
import BaseWidget, { WidgetProps, WidgetState } from "./BaseWidget";
|
2019-09-12 08:11:25 +00:00
|
|
|
import { WidgetType } from "../constants/WidgetConstants";
|
|
|
|
|
|
2019-09-13 10:45:49 +00:00
|
|
|
class InputWidget extends BaseWidget<InputWidgetProps, WidgetState> {
|
2019-09-12 08:11:25 +00:00
|
|
|
getPageView() {
|
2019-09-13 10:45:49 +00:00
|
|
|
return <div />;
|
2019-09-12 08:11:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getWidgetType(): WidgetType {
|
|
|
|
|
return "INPUT_WIDGET";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2019-09-13 10:45:49 +00:00
|
|
|
export type InputType =
|
|
|
|
|
| "TEXT"
|
|
|
|
|
| "NUMBER"
|
|
|
|
|
| "INTEGER"
|
|
|
|
|
| "PHONE_NUMBER"
|
|
|
|
|
| "EMAIL"
|
|
|
|
|
| "PASSWORD"
|
|
|
|
|
| "CURRENCY"
|
|
|
|
|
| "SEARCH";
|
2019-09-12 08:11:25 +00:00
|
|
|
|
2019-09-13 10:45:49 +00:00
|
|
|
export interface InputWidgetProps extends WidgetProps {
|
|
|
|
|
errorMessage?: string;
|
2019-09-12 08:11:25 +00:00
|
|
|
inputType: InputType;
|
|
|
|
|
defaultText?: string;
|
|
|
|
|
placeholder?: string;
|
|
|
|
|
label: string;
|
2019-09-13 10:45:49 +00:00
|
|
|
focusIndex?: number;
|
2019-09-12 08:11:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default InputWidget;
|