From c0d29e784afeeff9713b07279202141becf98f27 Mon Sep 17 00:00:00 2001 From: Samuel Andert Date: Thu, 3 Aug 2023 17:34:53 +0200 Subject: [PATCH] abtracted generic services interface and mapping --- src/lib/components/refactor/ComposerAlice.svelte | 2 +- src/lib/core/refactor/Composer.svelte | 12 ++---------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/lib/components/refactor/ComposerAlice.svelte b/src/lib/components/refactor/ComposerAlice.svelte index f41fa48..7d5836d 100644 --- a/src/lib/components/refactor/ComposerAlice.svelte +++ b/src/lib/components/refactor/ComposerAlice.svelte @@ -8,7 +8,7 @@ let childStore; $: if (me.do) { - childStore = me.do.subscribeComposer('@ComposerBob'); + childStore = me.do.core.subscribeComposer('@ComposerBob'); } $: { diff --git a/src/lib/core/refactor/Composer.svelte b/src/lib/core/refactor/Composer.svelte index 750face..3698765 100644 --- a/src/lib/core/refactor/Composer.svelte +++ b/src/lib/core/refactor/Composer.svelte @@ -12,7 +12,7 @@ columns?: string; rows?: string; gap?: string; - tailwindClasses?: string; + style?: string; } interface IComposer { @@ -24,13 +24,9 @@ store?: Record; children?: IComposer[]; machine?: any; - machineService?: any; } export let composer: IComposer; - let loadedServices: Record = { - 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}