PromucFlow_constructor/app/client/src/mockResponses/WidgetConfigResponse.tsx

162 lines
3.8 KiB
TypeScript
Raw Normal View History

2019-11-25 05:07:27 +00:00
import { WidgetConfigReducerState } from "reducers/entityReducers/widgetConfigReducer";
2019-09-12 08:11:25 +00:00
const WidgetConfigResponse: WidgetConfigReducerState = {
config: {
BUTTON_WIDGET: {
text: "Submit",
buttonStyle: "PRIMARY_BUTTON",
rows: 1,
columns: 5,
widgetName: "Button",
isDisabled: false,
isVisible: true,
2020-02-13 09:32:24 +00:00
isDefaultClickDisabled: true,
},
TEXT_WIDGET: {
2019-10-31 05:28:11 +00:00
text: "Label me",
textStyle: "LABEL",
rows: 1,
2019-11-14 17:06:32 +00:00
columns: 3,
widgetName: "Text",
},
IMAGE_WIDGET: {
2019-11-14 17:06:32 +00:00
defaultImage:
"https://www.cowgirlcontractcleaning.com/wp-content/uploads/sites/360/2018/05/placeholder-img-5.jpg",
imageShape: "RECTANGLE",
image: "",
rows: 3,
columns: 3,
widgetName: "Image",
},
INPUT_WIDGET: {
inputType: "TEXT",
label: "Label me",
rows: 1,
columns: 8,
widgetName: "Input",
2020-01-27 13:53:33 +00:00
text: "",
},
SWITCH_WIDGET: {
isOn: false,
2019-10-31 05:28:11 +00:00
label: "Switch",
rows: 1,
columns: 4,
widgetName: "Switch",
},
CONTAINER_WIDGET: {
backgroundColor: "#FFFFFF",
2019-10-31 05:28:11 +00:00
rows: 8,
columns: 8,
widgetName: "Container",
},
SPINNER_WIDGET: {
rows: 1,
columns: 1,
widgetName: "Spinner",
},
DATE_PICKER_WIDGET: {
2019-11-06 12:12:41 +00:00
enableTimePicker: true,
datePickerType: "DATE_PICKER",
rows: 1,
2019-11-06 12:12:41 +00:00
dateFormat: "DD/MM/YYYY",
columns: 8,
label: "Date",
2019-11-06 12:12:41 +00:00
widgetName: "DatePicker",
},
TABLE_WIDGET: {
rows: 7,
columns: 14,
2019-10-31 05:28:11 +00:00
label: "Data",
widgetName: "Table",
2019-11-14 17:06:32 +00:00
tableData: [
{
2020-01-16 09:34:36 +00:00
id: 2381224,
email: "michael.lawson@reqres.in",
userName: "Michael Lawson",
productName: "Chicken Sandwich",
orderAmount: 4.99,
2019-11-14 17:06:32 +00:00
},
{
2020-01-16 09:34:36 +00:00
id: 2736212,
email: "lindsay.ferguson@reqres.in",
userName: "Lindsay Ferguson",
productName: "Tuna Salad",
orderAmount: 9.99,
2019-11-14 17:06:32 +00:00
},
{
2020-01-16 09:34:36 +00:00
id: 6788734,
email: "tobias.funke@reqres.in",
userName: "Tobias Funke",
productName: "Beef steak",
orderAmount: 19.99,
2019-11-14 17:06:32 +00:00
},
{
2020-01-16 09:34:36 +00:00
id: 7434532,
email: "byron.fields@reqres.in",
userName: "Byron Fields",
productName: "Chicken Sandwich",
orderAmount: 4.99,
2019-11-14 17:06:32 +00:00
},
{
2020-01-16 09:34:36 +00:00
id: 7434532,
email: "ryan.holmes@reqres.in",
userName: "Ryan Holmes",
productName: "Avocado Panini",
orderAmount: 7.99,
2019-11-14 17:06:32 +00:00
},
],
},
DROP_DOWN_WIDGET: {
rows: 1,
columns: 8,
selectionType: "SINGLE_SELECT",
2019-10-31 05:28:11 +00:00
label: "Select",
options: [
{ id: "1", label: "Option 1", value: "1" },
{ id: "2", label: "Option 2", value: "2" },
{ id: "3", label: "Option 3", value: "3" },
2020-02-06 07:01:25 +00:00
{ id: "4", label: "Option 4", value: "4" },
{ id: "5", label: "Option 5", value: "5" },
2019-10-31 05:28:11 +00:00
],
widgetName: "Dropdown",
2020-01-27 13:53:33 +00:00
selectedIndex: 0,
},
CHECKBOX_WIDGET: {
rows: 1,
columns: 3,
label: "Label me",
defaultCheckedState: true,
widgetName: "Checkbox",
},
RADIO_GROUP_WIDGET: {
rows: 2,
columns: 5,
2020-01-28 08:21:22 +00:00
label: "Label",
options: [
{ id: "1", label: "Alpha", value: "1" },
{ id: "2", label: "Bravo", value: "2" },
{ id: "3", label: "Charlie", value: "3" },
],
selectedOptionValue: "1",
widgetName: "RadioGroup",
},
ALERT_WIDGET: {
alertType: "NOTIFICATION",
intent: "SUCCESS",
rows: 3,
columns: 3,
header: "",
message: "",
widgetName: "Alert",
},
2019-11-04 14:22:50 +00:00
FILE_PICKER_WIDGET: {
rows: 3,
columns: 3,
widgetName: "FilePicker",
},
},
configVersion: 1,
2019-09-12 08:11:25 +00:00
};
export default WidgetConfigResponse;