2019-09-27 16:05:33 +00:00
|
|
|
import { WidgetCardProps } from "../widgets/BaseWidget";
|
2019-09-16 08:08:03 +00:00
|
|
|
import { generateReactKey } from "../utils/generators";
|
2019-08-21 12:49:16 +00:00
|
|
|
|
2019-10-18 08:16:26 +00:00
|
|
|
const WidgetSidebarResponse: {
|
2019-09-27 16:05:33 +00:00
|
|
|
[id: string]: WidgetCardProps[];
|
|
|
|
|
} = {
|
2019-10-30 10:23:20 +00:00
|
|
|
["Common Widgets"]: [
|
2019-09-27 16:05:33 +00:00
|
|
|
{
|
|
|
|
|
type: "TEXT_WIDGET",
|
|
|
|
|
icon: "icon-text",
|
|
|
|
|
widgetCardName: "Text",
|
|
|
|
|
key: generateReactKey(),
|
|
|
|
|
},
|
2019-10-30 10:23:20 +00:00
|
|
|
{
|
|
|
|
|
type: "INPUT_WIDGET",
|
|
|
|
|
icon: "icon-input",
|
|
|
|
|
widgetCardName: "Input",
|
|
|
|
|
key: generateReactKey(),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: "TABLE_WIDGET",
|
|
|
|
|
icon: "icon-table",
|
|
|
|
|
widgetCardName: "Table",
|
|
|
|
|
key: generateReactKey(),
|
|
|
|
|
},
|
2019-09-27 16:05:33 +00:00
|
|
|
{
|
|
|
|
|
type: "BUTTON_WIDGET",
|
|
|
|
|
icon: "icon-button",
|
|
|
|
|
widgetCardName: "Button",
|
|
|
|
|
key: generateReactKey(),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: "CONTAINER_WIDGET",
|
|
|
|
|
icon: "icon-container",
|
|
|
|
|
widgetCardName: "Container",
|
|
|
|
|
key: generateReactKey(),
|
|
|
|
|
},
|
|
|
|
|
],
|
2019-10-30 10:23:20 +00:00
|
|
|
["Form Widgets"]: [
|
2019-09-27 16:05:33 +00:00
|
|
|
{
|
|
|
|
|
type: "DROP_DOWN_WIDGET",
|
|
|
|
|
icon: "icon-dropdown",
|
|
|
|
|
widgetCardName: "Dropdown",
|
|
|
|
|
key: generateReactKey(),
|
|
|
|
|
},
|
|
|
|
|
{
|
2019-10-30 10:23:20 +00:00
|
|
|
type: "CHECKBOX_WIDGET",
|
|
|
|
|
icon: "icon-checkbox",
|
|
|
|
|
widgetCardName: "Checkbox",
|
2019-09-27 16:05:33 +00:00
|
|
|
key: generateReactKey(),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: "RADIO_GROUP_WIDGET",
|
|
|
|
|
icon: "icon-radio",
|
|
|
|
|
widgetCardName: "Radio Button",
|
|
|
|
|
key: generateReactKey(),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: "SWITCH_WIDGET",
|
|
|
|
|
icon: "icon-switch",
|
2019-10-21 11:40:24 +00:00
|
|
|
widgetCardName: "Switch",
|
2019-09-27 16:05:33 +00:00
|
|
|
key: generateReactKey(),
|
|
|
|
|
},
|
2019-10-30 10:23:20 +00:00
|
|
|
{
|
|
|
|
|
type: "DATE_PICKER_WIDGET",
|
|
|
|
|
icon: "icon-datepicker",
|
|
|
|
|
widgetCardName: "DatePicker",
|
|
|
|
|
key: generateReactKey(),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: "BUTTON_WIDGET",
|
|
|
|
|
icon: "icon-button",
|
|
|
|
|
widgetCardName: "Button",
|
|
|
|
|
key: generateReactKey(),
|
|
|
|
|
},
|
2019-09-27 16:05:33 +00:00
|
|
|
],
|
2019-10-30 10:23:20 +00:00
|
|
|
["View widgets"]: [
|
|
|
|
|
{
|
|
|
|
|
type: "IMAGE_WIDGET",
|
|
|
|
|
icon: "icon-image",
|
|
|
|
|
widgetCardName: "Image",
|
|
|
|
|
key: generateReactKey(),
|
|
|
|
|
},
|
2019-09-27 16:05:33 +00:00
|
|
|
{
|
|
|
|
|
type: "TEXT_WIDGET",
|
|
|
|
|
icon: "icon-text",
|
|
|
|
|
widgetCardName: "Text",
|
|
|
|
|
key: generateReactKey(),
|
|
|
|
|
},
|
|
|
|
|
{
|
2019-10-30 10:23:20 +00:00
|
|
|
type: "SPINNER_WIDGET",
|
|
|
|
|
icon: "icon-spinner",
|
|
|
|
|
widgetCardName: "Spinner",
|
2019-09-27 16:05:33 +00:00
|
|
|
key: generateReactKey(),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: "TABLE_WIDGET",
|
|
|
|
|
icon: "icon-table",
|
|
|
|
|
widgetCardName: "Table",
|
|
|
|
|
key: generateReactKey(),
|
|
|
|
|
},
|
|
|
|
|
],
|
2019-10-30 10:23:20 +00:00
|
|
|
["Layout widgets"]: [
|
|
|
|
|
{
|
|
|
|
|
type: "CONTAINER_WIDGET",
|
|
|
|
|
icon: "icon-container",
|
|
|
|
|
widgetCardName: "Container",
|
|
|
|
|
key: generateReactKey(),
|
|
|
|
|
},
|
|
|
|
|
],
|
2019-08-21 12:49:16 +00:00
|
|
|
};
|
2019-09-06 09:30:22 +00:00
|
|
|
|
2019-10-18 08:16:26 +00:00
|
|
|
export default WidgetSidebarResponse;
|