Fixes
This commit is contained in:
parent
12d596e7ab
commit
0d096132b8
|
@ -2,6 +2,7 @@ import { writable, get } from "svelte/store"
|
|||
import { findComponentParent, findComponentPath } from "@/helpers/components"
|
||||
import { selectedScreen, componentStore } from "@/stores/builder"
|
||||
import { DropPosition } from "@budibase/types"
|
||||
export { DropPosition } from "@budibase/types"
|
||||
|
||||
const initialState = {
|
||||
source: null,
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
import { layoutStore } from "./layouts.js"
|
||||
import { appStore } from "./app.js"
|
||||
import { layoutStore } from "./layouts"
|
||||
import { appStore } from "./app"
|
||||
import { componentStore, selectedComponent } from "./components"
|
||||
import { navigationStore } from "./navigation.js"
|
||||
import { themeStore } from "./theme.js"
|
||||
import { navigationStore } from "./navigation"
|
||||
import { themeStore } from "./theme"
|
||||
import { screenStore, selectedScreen, sortedScreens } from "./screens"
|
||||
import { builderStore } from "./builder.js"
|
||||
import { hoverStore } from "./hover.js"
|
||||
import { previewStore } from "./preview.js"
|
||||
import { builderStore } from "./builder"
|
||||
import { hoverStore } from "./hover"
|
||||
import { previewStore } from "./preview"
|
||||
import {
|
||||
automationStore,
|
||||
selectedAutomation,
|
||||
automationHistoryStore,
|
||||
} from "./automations.js"
|
||||
import { userStore, userSelectedResourceMap, isOnlyUser } from "./users.js"
|
||||
import { deploymentStore } from "./deployments.js"
|
||||
import { contextMenuStore } from "./contextMenu.js"
|
||||
} from "./automations"
|
||||
import { userStore, userSelectedResourceMap, isOnlyUser } from "./users"
|
||||
import { deploymentStore } from "./deployments"
|
||||
import { contextMenuStore } from "./contextMenu"
|
||||
import { snippets } from "./snippets"
|
||||
import {
|
||||
screenComponentsList,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script>
|
||||
import { getContext, onDestroy, onMount, setContext } from "svelte"
|
||||
import { builderStore } from "@/stores/builder"
|
||||
import { builderStore } from "stores/builder"
|
||||
import { blockStore } from "stores/blocks"
|
||||
|
||||
const component = getContext("component")
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script>
|
||||
import { getContext, onDestroy } from "svelte"
|
||||
import { generate } from "shortid"
|
||||
import { builderStore } from "../stores/builder.js"
|
||||
import { builderStore } from "../stores/builder"
|
||||
import Component from "components/Component.svelte"
|
||||
|
||||
export let type
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
import Field from "./Field.svelte"
|
||||
import { CoreDropzone, ProgressCircle, Helpers } from "@budibase/bbui"
|
||||
import { getContext, onMount, onDestroy } from "svelte"
|
||||
import { builderStore } from "@/stores/builder"
|
||||
import { builderStore } from "stores/builder"
|
||||
import { processStringSync } from "@budibase/string-templates"
|
||||
|
||||
export let datasourceId
|
||||
|
|
|
@ -2,7 +2,7 @@ import { writable, get } from "svelte/store"
|
|||
import { API } from "api"
|
||||
import { devToolsStore } from "./devTools.js"
|
||||
import { eventStore } from "./events.js"
|
||||
import { DropPosition, PreviewDevice } from "@budibase/types"
|
||||
import { DropPosition, PingSource, PreviewDevice } from "@budibase/types"
|
||||
|
||||
interface BuilderStore {
|
||||
inBuilder: boolean
|
||||
|
@ -81,34 +81,38 @@ const createBuilderStore = () => {
|
|||
selectComponent,
|
||||
})
|
||||
},
|
||||
deleteComponent: id => {
|
||||
deleteComponent: (id: string) => {
|
||||
eventStore.actions.dispatchEvent("delete-component", { id })
|
||||
},
|
||||
notifyLoaded: () => {
|
||||
eventStore.actions.dispatchEvent("preview-loaded")
|
||||
},
|
||||
analyticsPing: async ({ embedded }) => {
|
||||
analyticsPing: async ({ embedded }: { embedded: boolean }) => {
|
||||
try {
|
||||
await API.analyticsPing({ source: "app", embedded })
|
||||
await API.analyticsPing({ source: PingSource.APP, embedded })
|
||||
} catch (error) {
|
||||
// Do nothing
|
||||
}
|
||||
},
|
||||
moveComponent: async (componentId, destinationComponentId, mode) => {
|
||||
moveComponent: async (
|
||||
componentId: string,
|
||||
destinationComponentId: string,
|
||||
mode: DropPosition
|
||||
) => {
|
||||
await eventStore.actions.dispatchEvent("move-component", {
|
||||
componentId,
|
||||
destinationComponentId,
|
||||
mode,
|
||||
})
|
||||
},
|
||||
dropNewComponent: (component, parent, index) => {
|
||||
dropNewComponent: (component: string, parent: string, index: number) => {
|
||||
eventStore.actions.dispatchEvent("drop-new-component", {
|
||||
component,
|
||||
parent,
|
||||
index,
|
||||
})
|
||||
},
|
||||
setEditMode: enabled => {
|
||||
setEditMode: (enabled: boolean) => {
|
||||
if (enabled === get(store).editMode) {
|
||||
return
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { derived } from "svelte/store"
|
||||
import { appStore } from "../app.js"
|
||||
import { builderStore } from "../builder.js"
|
||||
import { builderStore } from "../builder"
|
||||
|
||||
export const devToolsEnabled = derived(
|
||||
[appStore, builderStore],
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { appStore } from "../app.js"
|
||||
import { builderStore } from "../builder.js"
|
||||
import { builderStore } from "../builder"
|
||||
import { derivedMemo } from "@budibase/frontend-core"
|
||||
|
||||
export const snippets = derivedMemo(
|
||||
|
|
Loading…
Reference in New Issue