diff --git a/packages/builder/src/builderStore/store/screenTemplates/newRowScreen.js b/packages/builder/src/builderStore/store/screenTemplates/newRowScreen.js index 90c7d2d3fd..1e699dad95 100644 --- a/packages/builder/src/builderStore/store/screenTemplates/newRowScreen.js +++ b/packages/builder/src/builderStore/store/screenTemplates/newRowScreen.js @@ -1,7 +1,12 @@ import sanitizeUrl from "./utils/sanitizeUrl" import { Component } from "./utils/Component" import { Screen } from "./utils/Screen" -import { makeBreadcrumbContainer, makeMainContainer, makeTitleContainer, makeSaveButton } from "./utils/commonComponents" +import { + makeBreadcrumbContainer, + makeMainContainer, + makeTitleContainer, + makeSaveButton, +} from "./utils/commonComponents" export default function(tables) { return tables.map(table => { @@ -17,20 +22,21 @@ export const newRowUrl = table => sanitizeUrl(`/${table.name}/new`) export const NEW_ROW_TEMPLATE = "NEW_ROW_TEMPLATE" function generateTitleContainer(table) { - return makeTitleContainer("New Row") - .addChild(makeSaveButton(table)) + return makeTitleContainer("New Row").addChild(makeSaveButton(table)) } const createScreen = table => { - const dataform = new Component("@budibase/standard-components/dataformwide") - .instanceName("Form") + const dataform = new Component( + "@budibase/standard-components/dataformwide" + ).instanceName("Form") const container = makeMainContainer() .addChild(makeBreadcrumbContainer(table.name, "New")) .addChild(generateTitleContainer(table)) .addChild(dataform) - return new Screen().component("@budibase/standard-components/newrow") + return new Screen() + .component("@budibase/standard-components/newrow") .table(table._id) .route(newRowUrl(table)) .instanceName(`${table.name} - New`) diff --git a/packages/builder/src/builderStore/store/screenTemplates/rowDetailScreen.js b/packages/builder/src/builderStore/store/screenTemplates/rowDetailScreen.js index 795ac09ea0..526f457f3e 100644 --- a/packages/builder/src/builderStore/store/screenTemplates/rowDetailScreen.js +++ b/packages/builder/src/builderStore/store/screenTemplates/rowDetailScreen.js @@ -2,7 +2,12 @@ import sanitizeUrl from "./utils/sanitizeUrl" import { rowListUrl } from "./rowListScreen" import { Screen } from "./utils/Screen" import { Component } from "./utils/Component" -import { makeMainContainer, makeBreadcrumbContainer, makeTitleContainer, makeSaveButton } from "./utils/commonComponents" +import { + makeMainContainer, + makeBreadcrumbContainer, + makeTitleContainer, + makeSaveButton, +} from "./utils/commonComponents" export default function(tables) { return tables.map(table => { @@ -22,16 +27,15 @@ export const rowDetailUrl = table => sanitizeUrl(`/${table.name}/:id`) function generateTitleContainer(table, title) { // have to override style for this, its missing margin - const saveButton = makeSaveButton(table) - .normalStyle({ - background: "#000000", - "border-width": "0", - "border-style": "None", - color: "#fff", - "font-family": "Inter", - "font-weight": "500", - "font-size": "14px", - }) + const saveButton = makeSaveButton(table).normalStyle({ + background: "#000000", + "border-width": "0", + "border-style": "None", + color: "#fff", + "font-family": "Inter", + "font-weight": "500", + "font-size": "14px", + }) const deleteButton = new Component("@budibase/standard-components/button") .normalStyle({ @@ -78,8 +82,9 @@ function generateTitleContainer(table, title) { } const createScreen = (table, heading) => { - const dataform = new Component("@budibase/standard-components/dataformwide") - .instanceName("Form") + const dataform = new Component( + "@budibase/standard-components/dataformwide" + ).instanceName("Form") const container = makeMainContainer() .addChild(makeBreadcrumbContainer(table.name, heading || "Edit")) diff --git a/packages/builder/src/builderStore/store/screenTemplates/rowListScreen.js b/packages/builder/src/builderStore/store/screenTemplates/rowListScreen.js index a54ae961be..54a066af9c 100644 --- a/packages/builder/src/builderStore/store/screenTemplates/rowListScreen.js +++ b/packages/builder/src/builderStore/store/screenTemplates/rowListScreen.js @@ -82,7 +82,7 @@ const createScreen = table => { theme: "alpine", height: "540", pagination: true, - detailUrl: `${table.name.toLowerCase()}/:id` + detailUrl: `${table.name.toLowerCase()}/:id`, }) .instanceName("Grid") @@ -107,7 +107,8 @@ const createScreen = table => { .addChild(generateTitleContainer(table)) .addChild(datagrid) - return new Screen().component("@budibase/standard-components/container") + return new Screen() + .component("@budibase/standard-components/container") .mainType("div") .route(rowListUrl(table)) .instanceName(`${table.name} - List`) diff --git a/packages/builder/src/builderStore/store/screenTemplates/utils/BaseStructure.js b/packages/builder/src/builderStore/store/screenTemplates/utils/BaseStructure.js index 7b2bb8e927..71daca9d1b 100644 --- a/packages/builder/src/builderStore/store/screenTemplates/utils/BaseStructure.js +++ b/packages/builder/src/builderStore/store/screenTemplates/utils/BaseStructure.js @@ -4,8 +4,7 @@ export class BaseStructure { constructor(isScreen) { this._isScreen = isScreen this._children = [] - this._json = { - } + this._json = {} } addChild(child) { diff --git a/packages/builder/src/builderStore/store/screenTemplates/utils/commonComponents.js b/packages/builder/src/builderStore/store/screenTemplates/utils/commonComponents.js index 9f5bd81d11..89e08cecdb 100644 --- a/packages/builder/src/builderStore/store/screenTemplates/utils/commonComponents.js +++ b/packages/builder/src/builderStore/store/screenTemplates/utils/commonComponents.js @@ -142,4 +142,4 @@ export function makeTitleContainer(title) { }) .instanceName("Title Container") .addChild(heading) -} \ No newline at end of file +} diff --git a/packages/builder/src/components/backend/TableNavigator/modals/CreateTableModal.svelte b/packages/builder/src/components/backend/TableNavigator/modals/CreateTableModal.svelte index f73810c340..f064ff923c 100644 --- a/packages/builder/src/components/backend/TableNavigator/modals/CreateTableModal.svelte +++ b/packages/builder/src/components/backend/TableNavigator/modals/CreateTableModal.svelte @@ -62,7 +62,10 @@ const listScreen = screens.find(screen => screen.props._instanceName.endsWith("List") ) - await store.actions.components.links.save(listScreen.routing.route, table.name) + await store.actions.components.links.save( + listScreen.routing.route, + table.name + ) // Navigate to new table $goto(`./table/${table._id}`) diff --git a/packages/builder/src/components/userInterface/EventsEditor/StateBindingCascader.svelte b/packages/builder/src/components/userInterface/EventsEditor/StateBindingCascader.svelte index 3de945adc5..3475a14eed 100644 --- a/packages/builder/src/components/userInterface/EventsEditor/StateBindingCascader.svelte +++ b/packages/builder/src/components/userInterface/EventsEditor/StateBindingCascader.svelte @@ -25,7 +25,9 @@ + {/each} {:else} diff --git a/packages/server/src/api/index.js b/packages/server/src/api/index.js index 500ca50ff2..c76eb82643 100644 --- a/packages/server/src/api/index.js +++ b/packages/server/src/api/index.js @@ -4,7 +4,7 @@ const compress = require("koa-compress") const zlib = require("zlib") const { budibaseAppsDir } = require("../utilities/budibaseDir") const { isDev } = require("../utilities") -const {mainRoutes, authRoutes, staticRoutes} = require("./routes") +const { mainRoutes, authRoutes, staticRoutes } = require("./routes") const router = new Router() const env = require("../environment")