Fix client errors
This commit is contained in:
parent
299dcbab3d
commit
bf5aa49e4d
|
@ -2,7 +2,7 @@ import { attachChildren } from "./render/attachChildren"
|
|||
import { createTreeNode } from "./render/prepareRenderComponent"
|
||||
import { screenRouter } from "./render/screenRouter"
|
||||
import { createStateManager } from "./state/stateManager"
|
||||
import { getAppId } from "./render/getAppId"
|
||||
import { getAppId } from "../../component-sdk/src/utils"
|
||||
|
||||
export const createApp = ({
|
||||
componentLibraries,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { createApp } from "./createApp"
|
||||
import { builtins, builtinLibName } from "./render/builtinComponents"
|
||||
import { getAppId } from "./render/getAppId"
|
||||
import { getAppId } from "../../component-sdk/src/utils"
|
||||
|
||||
/**
|
||||
* create a web application from static budibase definition files.
|
||||
|
|
|
@ -1,20 +1,12 @@
|
|||
import setBindableComponentProp from "./setBindableComponentProp"
|
||||
import { attachChildren } from "../render/attachChildren"
|
||||
import store from "../state/store"
|
||||
import { baseApiCall } from "../api/index"
|
||||
|
||||
export const bbFactory = ({
|
||||
componentLibraries,
|
||||
onScreenSlotRendered,
|
||||
runEventActions,
|
||||
}) => {
|
||||
const api = {
|
||||
post: (url, body) => baseApiCall("POST", url, body),
|
||||
get: (url, body) => baseApiCall("GET", url, body),
|
||||
patch: (url, body) => baseApiCall("PATCH", url, body),
|
||||
delete: (url, body) => baseApiCall("DELETE", url, body),
|
||||
}
|
||||
|
||||
return (treeNode, setupState) => {
|
||||
const attachParams = {
|
||||
componentLibraries,
|
||||
|
@ -33,7 +25,6 @@ export const bbFactory = ({
|
|||
store.getState(treeNode.contextStoreKey)
|
||||
)),
|
||||
setBinding: setBindableComponentProp(treeNode),
|
||||
api,
|
||||
parent,
|
||||
store: store.getStore(treeNode.contextStoreKey),
|
||||
// these parameters are populated by screenRouter
|
||||
|
|
|
@ -1,15 +1,14 @@
|
|||
import api from "../api"
|
||||
import renderTemplateString from "./renderTemplateString"
|
||||
import { updateRow, saveRow, deleteRow } from "../../../component-sdk"
|
||||
|
||||
export const EVENT_TYPE_MEMBER_NAME = "##eventHandlerType"
|
||||
|
||||
export const eventHandlers = routeTo => {
|
||||
const handlers = {
|
||||
"Navigate To": param => routeTo(param && param.url),
|
||||
"Update Row": api.updateRow,
|
||||
"Save Row": api.saveRow,
|
||||
"Delete Row": api.deleteRow,
|
||||
"Trigger Workflow": api.triggerWorkflow,
|
||||
"Update Row": updateRow,
|
||||
"Save Row": saveRow,
|
||||
"Delete Row": deleteRow,
|
||||
}
|
||||
|
||||
// when an event is called, this is what gets run
|
||||
|
|
Loading…
Reference in New Issue