Budibase is an open-source low-code platform for creating internal apps in minutes. Supports PostgreSQL, MySQL, MSSQL, MongoDB, Rest API, Docker, K8s 🚀
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

21 lines
710 B

import { eventHandlers } from "../../../client/src/state/eventHandlers"
import { writable } from "svelte/store"
export { EVENT_TYPE_MEMBER_NAME } from "../../../client/src/state/eventHandlers"
import { createCoreApi } from "../../../client/src/core"
export const allHandlers = (appDefinition, user) => {
const coreApi = createCoreApi(appDefinition, user)
appDefinition.hierarchy = coreApi.templateApi.constructHierarchy(
appDefinition.hierarchy
)
const store = writable({
_bbuser: user,
})
const handlersObj = eventHandlers(store, coreApi)
const handlersArray = []
for (let key in handlersObj) {
handlersArray.push({ name: key, ...handlersObj[key] })
}
return handlersArray
}