abtracted generic services interface and mapping
This commit is contained in:
parent
472e4e33ec
commit
c0d29e784a
@ -8,7 +8,7 @@
|
||||
let childStore;
|
||||
|
||||
$: if (me.do) {
|
||||
childStore = me.do.subscribeComposer('@ComposerBob');
|
||||
childStore = me.do.core.subscribeComposer('@ComposerBob');
|
||||
}
|
||||
|
||||
$: {
|
||||
|
@ -12,7 +12,7 @@
|
||||
columns?: string;
|
||||
rows?: string;
|
||||
gap?: string;
|
||||
tailwindClasses?: string;
|
||||
style?: string;
|
||||
}
|
||||
|
||||
interface IComposer {
|
||||
@ -24,13 +24,9 @@
|
||||
store?: Record<string, any>;
|
||||
children?: IComposer[];
|
||||
machine?: any;
|
||||
machineService?: any;
|
||||
}
|
||||
|
||||
export let composer: IComposer;
|
||||
let loadedServices: Record<string, any> = {
|
||||
core: coreServices
|
||||
};
|
||||
let layoutStyle = '';
|
||||
|
||||
let machineService;
|
||||
@ -115,7 +111,7 @@
|
||||
component.me = {
|
||||
id: component.id,
|
||||
do: {
|
||||
...loadedServices.core,
|
||||
core: coreServices,
|
||||
machine: component.machineService || null
|
||||
}
|
||||
};
|
||||
@ -133,8 +129,6 @@
|
||||
id={composer.id}
|
||||
store={getComposerStore(composer.id)}
|
||||
machine={composer.machine}
|
||||
services={loadedServices}
|
||||
machineService={child.machineService}
|
||||
me={composer.me}
|
||||
/>
|
||||
{/await}
|
||||
@ -150,8 +144,6 @@
|
||||
id={child.id}
|
||||
store={getComposerStore(child.id)}
|
||||
machine={child.machine}
|
||||
services={loadedServices}
|
||||
machineService={child.machineService}
|
||||
me={child.me}
|
||||
/>
|
||||
{#if child.children && child.children.length}
|
||||
|
Loading…
Reference in New Issue
Block a user