2020-01-18 00:06:42 +01:00
|
|
|
export const componentsAndScreens = () => ({
|
2020-02-03 10:24:25 +01:00
|
|
|
components: [
|
|
|
|
{
|
2020-06-15 17:01:24 +02:00
|
|
|
_instanceName: "TextBox",
|
2020-02-03 10:24:25 +01:00
|
|
|
tags: ["Text", "input"],
|
|
|
|
children: false,
|
|
|
|
props: {
|
|
|
|
size: { type: "options", options: ["small", "medium", "large"] },
|
|
|
|
isPassword: "bool",
|
|
|
|
placeholder: "string",
|
|
|
|
label: "string",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
2020-06-15 17:01:24 +02:00
|
|
|
_instanceName: "Button",
|
2020-02-03 10:24:25 +01:00
|
|
|
tags: ["input"],
|
|
|
|
children: true,
|
|
|
|
props: {
|
|
|
|
size: { type: "options", options: ["small", "medium", "large"] },
|
|
|
|
css: "string",
|
|
|
|
contentText: "string",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
2020-06-15 17:01:24 +02:00
|
|
|
_instanceName: "div",
|
2020-02-03 10:24:25 +01:00
|
|
|
tags: ["input"],
|
|
|
|
props: {
|
|
|
|
width: "number",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
2020-06-15 17:01:24 +02:00
|
|
|
_instanceName: "Record View",
|
2020-02-03 10:24:25 +01:00
|
|
|
tags: ["record"],
|
|
|
|
props: {
|
|
|
|
data: "state",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
screens: [
|
|
|
|
{
|
|
|
|
props: {
|
|
|
|
_component: "budibase-components/TextBox",
|
2020-06-15 17:01:24 +02:00
|
|
|
_instanceName: "SmallTextbox",
|
2020-02-03 10:24:25 +01:00
|
|
|
size: "small",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
name: "common/PasswordBox",
|
|
|
|
tags: ["mask"],
|
|
|
|
props: {
|
|
|
|
_component: "budibase-components/TextBox",
|
2020-06-15 17:01:24 +02:00
|
|
|
_instanceName: "PasswordBox",
|
2020-02-03 10:24:25 +01:00
|
|
|
isPassword: true,
|
|
|
|
size: "small",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
props: {
|
|
|
|
_component: "budibase-components/Button",
|
2020-06-15 17:01:24 +02:00
|
|
|
_instanceName: "PrimaryButton",
|
2020-02-03 10:24:25 +01:00
|
|
|
css: "btn-primary",
|
|
|
|
},
|
|
|
|
},
|
2019-09-06 18:25:06 +02:00
|
|
|
|
2020-06-15 17:01:24 +02:00
|
|
|
{
|
2020-02-10 16:51:09 +01:00
|
|
|
route: "",
|
2020-02-03 10:24:25 +01:00
|
|
|
props: {
|
|
|
|
_component: "budibase-components/div",
|
|
|
|
width: 100,
|
2020-06-15 17:01:24 +02:00
|
|
|
_instanceName: "Screen 1",
|
2020-02-03 10:24:25 +01:00
|
|
|
_children: [
|
|
|
|
{
|
|
|
|
_component: "budibase-components/Button",
|
|
|
|
contentText: "Button 1",
|
2020-06-15 17:01:24 +02:00
|
|
|
_instanceName: "Button 1",
|
2020-02-03 10:24:25 +01:00
|
|
|
},
|
|
|
|
{
|
|
|
|
_component: "budibase-components/Button",
|
|
|
|
contentText: "Button 2",
|
2020-06-15 17:01:24 +02:00
|
|
|
_instanceName: "Button 2",
|
2020-02-03 10:24:25 +01:00
|
|
|
},
|
|
|
|
{
|
|
|
|
_component: "budibase-components/TextBox",
|
2020-06-15 17:01:24 +02:00
|
|
|
_instanceName: "TextBox",
|
2020-02-03 10:24:25 +01:00
|
|
|
isPassword: true,
|
|
|
|
size: "small",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
2020-01-18 00:06:42 +01:00
|
|
|
|
2020-02-03 10:24:25 +01:00
|
|
|
{
|
|
|
|
props: {
|
|
|
|
_component: "budibase-components/div",
|
2020-06-15 17:01:24 +02:00
|
|
|
_instanceName: "Field",
|
2020-02-03 10:24:25 +01:00
|
|
|
_children: [
|
|
|
|
{
|
|
|
|
_component: "common/SmallTextbox",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
})
|
2020-02-10 16:51:09 +01:00
|
|
|
|
|
|
|
export const stripStandardProps = props => {
|
|
|
|
delete props._code
|
|
|
|
delete props._id
|
|
|
|
delete props._styles
|
|
|
|
}
|