added dynamically loading of xstates machines from composite definitions
This commit is contained in:
@ -7,6 +7,7 @@
|
||||
import { dataStore } from '$lib/core/dataLoader';
|
||||
import { createCompositeStore, getCompositeStore } from '$lib/core/compositeStores';
|
||||
import { coreServices } from './coreServices';
|
||||
import { Machine } from 'xstate';
|
||||
|
||||
interface ICompositeLayout {
|
||||
areas: string;
|
||||
@ -26,6 +27,7 @@
|
||||
store?: Record<string, any>;
|
||||
children?: IComposite[];
|
||||
servicesLoaded?: boolean;
|
||||
machine?: any;
|
||||
}
|
||||
|
||||
export let composite: IComposite;
|
||||
@ -185,6 +187,7 @@
|
||||
this={Component}
|
||||
id={composite.id}
|
||||
store={getCompositeStore(composite.id)}
|
||||
machine={composite.machine}
|
||||
services={loadedServices}
|
||||
/>
|
||||
{/await}
|
||||
@ -201,6 +204,7 @@
|
||||
this={ChildComponent}
|
||||
id={child.id}
|
||||
store={getCompositeStore(child.id)}
|
||||
machine={child.machine}
|
||||
services={loadedServices}
|
||||
/>
|
||||
{#if child.children && child.children.length}
|
||||
|
Reference in New Issue
Block a user