separate workflow components from routify routes

This commit is contained in:
Martin McKeaveney 2020-05-30 00:40:33 +01:00
parent 7129b9c225
commit 7d871ff9cf
27 changed files with 11 additions and 20 deletions

View File

@ -0,0 +1,3 @@
export { default as WorkflowBuilder } from "./WorkflowBuilder/WorkflowBuilder.svelte";
export { default as SetupPanel } from "./SetupPanel/SetupPanel.svelte";
export { default as WorkflowPanel } from "./WorkflowPanel/WorkflowPanel.svelte";

View File

@ -1,7 +1,6 @@
<script>
import { workflowStore } from "builderStore"
import { WorkflowPanel } from "./WorkflowPanel"
import { SetupPanel } from "./SetupPanel"
import { WorkflowPanel, SetupPanel } from "components/workflow"
</script>
<div class="root">

View File

@ -1,5 +1,5 @@
<script>
import WorkflowBuilder from "./WorkflowBuilder/WorkflowBuilder.svelte"
import { WorkflowBuilder } from "components/workflow"
</script>
<WorkflowBuilder />

View File

@ -9,7 +9,6 @@ export const attachChildren = initialiseOpts => (htmlElement, options) => {
treeNode,
onScreenSlotRendered,
setupState,
getCurrentState,
} = initialiseOpts
const anchor = options && options.anchor ? options.anchor : null
@ -43,8 +42,7 @@ export const attachChildren = initialiseOpts => (htmlElement, options) => {
parentNode: treeNode,
ComponentConstructor,
htmlElement,
anchor,
getCurrentState,
anchor
})
for (let childNode of childNodesThisIteration) {

View File

@ -1,7 +1,5 @@
// import { getStateOrValue } from "./getState"
import { setState, setStateFromBinding } from "./setState"
import { trimSlash } from "../common/trimSlash"
import { isBound } from "./parseBinding"
import { setState } from "./setState"
// import { isBound } from "./parseBinding"
import { attachChildren } from "../render/attachChildren"
import { getContext, setContext } from "./getSetContext"
@ -9,7 +7,6 @@ export const trimSlash = str => str.replace(/^\/+|\/+$/g, "")
export const bbFactory = ({
store,
getCurrentState,
frontendDefinition,
componentLibraries,
onScreenSlotRendered,
@ -54,8 +51,7 @@ export const bbFactory = ({
componentLibraries,
treeNode,
onScreenSlotRendered,
setupState,
getCurrentState,
setupState
}
return {
@ -69,7 +65,6 @@ export const bbFactory = ({
store: store,
relativeUrl,
api,
isBound,
parent,
}
}

View File

@ -4,14 +4,10 @@ import {
EVENT_TYPE_MEMBER_NAME,
} from "./eventHandlers"
import { bbFactory } from "./bbComponentApi"
import { createTreeNode } from "../render/prepareRenderComponent"
import { getState } from "./getState"
import { attachChildren } from "../render/attachChildren"
import mustache from "mustache"
import { get } from "svelte/store";
import { appStore } from "./store";
import { parseBinding } from "./parseBinding"
const doNothing = () => {}
doNothing.isPlaceholder = true
@ -175,7 +171,7 @@ const _setup = ({
const context = node.context || {}
const initialProps = { ...props }
// const storeBoundProps = []
const currentStoreState = getCurrentState()
const currentStoreState = get(appStore)
console.log("node", node);