budibase/packages/client/src/sdk.js

93 lines
1.8 KiB
JavaScript
Raw Normal View History

import { API } from "api"
2021-01-22 12:44:43 +01:00
import {
authStore,
notificationStore,
routeStore,
screenStore,
builderStore,
uploadStore,
rowSelectionStore,
componentStore,
currentRole,
environmentStore,
sidePanelStore,
modalStore,
dndIsDragging,
2022-11-24 21:06:31 +01:00
confirmationStore,
roleStore,
2023-10-30 13:46:44 +01:00
appStore,
2023-11-07 15:36:57 +01:00
stateStore,
createContextStore,
} from "stores"
import { styleable } from "utils/styleable"
import { linkable } from "utils/linkable"
import { getAction } from "utils/getAction"
import Provider from "components/context/Provider.svelte"
import Block from "components/Block.svelte"
import BlockComponent from "components/BlockComponent.svelte"
import { ActionTypes } from "./constants"
import {
fetchDatasourceSchema,
fetchDatasourceDefinition,
} from "./utils/schema.js"
import { getAPIKey } from "./utils/api.js"
2023-11-01 17:45:37 +01:00
import { enrichButtonActions } from "./utils/buttonActions.js"
2023-11-20 09:30:42 +01:00
import { processStringSync, makePropSafe } from "@budibase/string-templates"
import {
fetchData,
2024-06-12 16:04:56 +02:00
QueryUtils,
Constants,
RowUtils,
2024-03-21 10:14:01 +01:00
memo,
derivedMemo,
} from "@budibase/frontend-core"
export default {
API,
2023-11-01 17:45:37 +01:00
// Stores
authStore,
2023-10-30 13:46:44 +01:00
appStore,
notificationStore,
routeStore,
rowSelectionStore,
screenStore,
builderStore,
uploadStore,
componentStore,
environmentStore,
sidePanelStore,
modalStore,
dndIsDragging,
currentRole,
2022-11-24 21:06:31 +01:00
confirmationStore,
roleStore,
2023-11-07 15:36:57 +01:00
stateStore,
2023-11-01 17:45:37 +01:00
// Utils
styleable,
linkable,
getAction,
fetchDatasourceSchema,
fetchDatasourceDefinition,
2024-01-20 22:11:31 +01:00
fetchData,
2024-06-12 16:04:56 +02:00
QueryUtils,
ContextScopes: Constants.ContextScopes,
getAPIKey,
2023-11-01 17:45:37 +01:00
enrichButtonActions,
2023-11-07 15:36:57 +01:00
processStringSync,
2023-11-20 09:30:42 +01:00
makePropSafe,
createContextStore,
generateGoldenSample: RowUtils.generateGoldenSample,
2024-03-21 10:14:01 +01:00
memo,
derivedMemo,
2023-11-01 17:45:37 +01:00
// Components
Provider,
Block,
BlockComponent,
2023-11-01 17:45:37 +01:00
// Constants
ActionTypes,
}