separate workflow components from routify routes
This commit is contained in:
parent
7129b9c225
commit
7d871ff9cf
Before Width: | Height: | Size: 241 B After Width: | Height: | Size: 241 B |
|
@ -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";
|
|
@ -1,7 +1,6 @@
|
||||||
<script>
|
<script>
|
||||||
import { workflowStore } from "builderStore"
|
import { workflowStore } from "builderStore"
|
||||||
import { WorkflowPanel } from "./WorkflowPanel"
|
import { WorkflowPanel, SetupPanel } from "components/workflow"
|
||||||
import { SetupPanel } from "./SetupPanel"
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="root">
|
<div class="root">
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script>
|
<script>
|
||||||
import WorkflowBuilder from "./WorkflowBuilder/WorkflowBuilder.svelte"
|
import { WorkflowBuilder } from "components/workflow"
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<WorkflowBuilder />
|
<WorkflowBuilder />
|
||||||
|
|
|
@ -9,7 +9,6 @@ export const attachChildren = initialiseOpts => (htmlElement, options) => {
|
||||||
treeNode,
|
treeNode,
|
||||||
onScreenSlotRendered,
|
onScreenSlotRendered,
|
||||||
setupState,
|
setupState,
|
||||||
getCurrentState,
|
|
||||||
} = initialiseOpts
|
} = initialiseOpts
|
||||||
|
|
||||||
const anchor = options && options.anchor ? options.anchor : null
|
const anchor = options && options.anchor ? options.anchor : null
|
||||||
|
@ -43,8 +42,7 @@ export const attachChildren = initialiseOpts => (htmlElement, options) => {
|
||||||
parentNode: treeNode,
|
parentNode: treeNode,
|
||||||
ComponentConstructor,
|
ComponentConstructor,
|
||||||
htmlElement,
|
htmlElement,
|
||||||
anchor,
|
anchor
|
||||||
getCurrentState,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
for (let childNode of childNodesThisIteration) {
|
for (let childNode of childNodesThisIteration) {
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
// import { getStateOrValue } from "./getState"
|
import { setState } from "./setState"
|
||||||
import { setState, setStateFromBinding } from "./setState"
|
// import { isBound } from "./parseBinding"
|
||||||
import { trimSlash } from "../common/trimSlash"
|
|
||||||
import { isBound } from "./parseBinding"
|
|
||||||
import { attachChildren } from "../render/attachChildren"
|
import { attachChildren } from "../render/attachChildren"
|
||||||
import { getContext, setContext } from "./getSetContext"
|
import { getContext, setContext } from "./getSetContext"
|
||||||
|
|
||||||
|
@ -9,7 +7,6 @@ export const trimSlash = str => str.replace(/^\/+|\/+$/g, "")
|
||||||
|
|
||||||
export const bbFactory = ({
|
export const bbFactory = ({
|
||||||
store,
|
store,
|
||||||
getCurrentState,
|
|
||||||
frontendDefinition,
|
frontendDefinition,
|
||||||
componentLibraries,
|
componentLibraries,
|
||||||
onScreenSlotRendered,
|
onScreenSlotRendered,
|
||||||
|
@ -54,8 +51,7 @@ export const bbFactory = ({
|
||||||
componentLibraries,
|
componentLibraries,
|
||||||
treeNode,
|
treeNode,
|
||||||
onScreenSlotRendered,
|
onScreenSlotRendered,
|
||||||
setupState,
|
setupState
|
||||||
getCurrentState,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@ -69,7 +65,6 @@ export const bbFactory = ({
|
||||||
store: store,
|
store: store,
|
||||||
relativeUrl,
|
relativeUrl,
|
||||||
api,
|
api,
|
||||||
isBound,
|
|
||||||
parent,
|
parent,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,14 +4,10 @@ import {
|
||||||
EVENT_TYPE_MEMBER_NAME,
|
EVENT_TYPE_MEMBER_NAME,
|
||||||
} from "./eventHandlers"
|
} from "./eventHandlers"
|
||||||
import { bbFactory } from "./bbComponentApi"
|
import { bbFactory } from "./bbComponentApi"
|
||||||
import { createTreeNode } from "../render/prepareRenderComponent"
|
|
||||||
import { getState } from "./getState"
|
|
||||||
import { attachChildren } from "../render/attachChildren"
|
|
||||||
import mustache from "mustache"
|
import mustache from "mustache"
|
||||||
|
import { get } from "svelte/store";
|
||||||
import { appStore } from "./store";
|
import { appStore } from "./store";
|
||||||
|
|
||||||
import { parseBinding } from "./parseBinding"
|
|
||||||
|
|
||||||
const doNothing = () => {}
|
const doNothing = () => {}
|
||||||
doNothing.isPlaceholder = true
|
doNothing.isPlaceholder = true
|
||||||
|
|
||||||
|
@ -175,7 +171,7 @@ const _setup = ({
|
||||||
const context = node.context || {}
|
const context = node.context || {}
|
||||||
const initialProps = { ...props }
|
const initialProps = { ...props }
|
||||||
// const storeBoundProps = []
|
// const storeBoundProps = []
|
||||||
const currentStoreState = getCurrentState()
|
const currentStoreState = get(appStore)
|
||||||
|
|
||||||
console.log("node", node);
|
console.log("node", node);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue