mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-25 08:00:59 +00:00
23 lines
582 B
Svelte
23 lines
582 B
Svelte
<script lang="ts">
|
|
import ObjectViewer from '$lib/components/propertyPicker/ObjectViewer.svelte'
|
|
import { getContext } from 'svelte'
|
|
import type { AppEditorContext } from '../../types'
|
|
|
|
export let outputs: string[] = []
|
|
export let componentId: string
|
|
|
|
const { worldStore } = getContext<AppEditorContext>('AppEditorContext')
|
|
|
|
let object = {}
|
|
|
|
outputs.forEach((output: string) => {
|
|
$worldStore?.outputsById[componentId][output].subscribe({
|
|
next: (value) => {
|
|
object[output] = value
|
|
}
|
|
})
|
|
})
|
|
</script>
|
|
|
|
<ObjectViewer json={object} on:select topBrackets={true} />
|