* refactoring server for screens & page layout restructure * Disable API calls, UI placeholders. * buildPropsHierarchy is gone & screen has url * Recent changes. * router * router * updated git-ignore to reinclude server/utilities/builder * modified cli - budi new create new file structure * Fix uuid import. * prettier fixes * prettier fixes * prettier fixes * page/screen restructure.. broken tests * all tests passing at last * screen routing tests * Working screen editor and preview. * Render page previews to the screen. * Key input lists to ensure new array references when updating styles. * Ensure the iframe html and body fills the container. * Save screens via the API. * Get all save APIs almost working. * Write pages.json to disk. * Use correct API endpoint for saving styles. * Differentiate between saving properties of screens and pages. * Add required fields to default pages layouts. * Add _css default property to newly created screens. * Add default code property. * page layout / screens - app output Co-authored-by: pngwn <pnda007@gmail.com>
108 lines
2.2 KiB
JavaScript
108 lines
2.2 KiB
JavaScript
export const componentsAndScreens = () => ({
|
|
components: [
|
|
{
|
|
name: "budibase-components/TextBox",
|
|
tags: ["Text", "input"],
|
|
children: false,
|
|
props: {
|
|
size: { type: "options", options: ["small", "medium", "large"] },
|
|
isPassword: "bool",
|
|
placeholder: "string",
|
|
label: "string",
|
|
},
|
|
},
|
|
{
|
|
name: "budibase-components/Button",
|
|
tags: ["input"],
|
|
children: true,
|
|
props: {
|
|
size: { type: "options", options: ["small", "medium", "large"] },
|
|
css: "string",
|
|
contentText: "string",
|
|
},
|
|
},
|
|
{
|
|
name: "budibase-components/div",
|
|
tags: ["input"],
|
|
props: {
|
|
width: "number",
|
|
},
|
|
},
|
|
{
|
|
name: "budibase-components/RecordView",
|
|
tags: ["record"],
|
|
props: {
|
|
data: "state",
|
|
},
|
|
},
|
|
],
|
|
screens: [
|
|
{
|
|
name: "common/SmallTextbox",
|
|
props: {
|
|
_component: "budibase-components/TextBox",
|
|
size: "small",
|
|
},
|
|
},
|
|
|
|
{
|
|
name: "common/PasswordBox",
|
|
tags: ["mask"],
|
|
props: {
|
|
_component: "budibase-components/TextBox",
|
|
isPassword: true,
|
|
size: "small",
|
|
},
|
|
},
|
|
|
|
{
|
|
name: "PrimaryButton",
|
|
props: {
|
|
_component: "budibase-components/Button",
|
|
css: "btn-primary",
|
|
},
|
|
},
|
|
|
|
{
|
|
name: "Screen 1",
|
|
route: "",
|
|
props: {
|
|
_component: "budibase-components/div",
|
|
width: 100,
|
|
_children: [
|
|
{
|
|
_component: "budibase-components/Button",
|
|
contentText: "Button 1",
|
|
},
|
|
{
|
|
_component: "budibase-components/Button",
|
|
contentText: "Button 2",
|
|
},
|
|
{
|
|
_component: "budibase-components/TextBox",
|
|
isPassword: true,
|
|
size: "small",
|
|
},
|
|
],
|
|
},
|
|
},
|
|
|
|
{
|
|
name: "Field",
|
|
props: {
|
|
_component: "budibase-components/div",
|
|
_children: [
|
|
{
|
|
_component: "common/SmallTextbox",
|
|
},
|
|
],
|
|
},
|
|
},
|
|
],
|
|
})
|
|
|
|
export const stripStandardProps = props => {
|
|
delete props._code
|
|
delete props._id
|
|
delete props._styles
|
|
}
|