Files
windmill/frontend/src/lib/components/InputTransformsViewer.svelte
Ádám Kovács 9bf0f6e70d feat(frontend): Flow graph (#827)
* chore(frontend): Install d3@7.6.1

* feat(frontend): Add basic graph components

* feat: Add graph node component

* feat: Add graph edges

* fix: Rename graph flow module

* feat: Add flow graph to editor

* feat: Add loops

* feat: Add hub scripts to graph

* fix: Display hub scripts

* fix: Nested loops

* feat: Graph displaying packages

* fix: Remove unused parts

* feat: Update graph layout

* fix: Clean up imports

* feat: Add icons to graph nodes

* feat: Add graph viewer to flow details page

* fix: Action row component on scroll behaviour

* fix: Update supported languages type

* fix: Add bash language icons

* fix: Support empty scripts and branches

* fix: Ellipsizing virtual node text

* feat: Display script id in node

* fix: Remove graph from flow editor

* fix: Update node id display

* chore: Remove unused packages

* flow viewer

Co-authored-by: Ruben Fiszel <ruben@rubenfiszel.com>
2022-11-12 20:14:29 +01:00

24 lines
722 B
Svelte

<script lang="ts">
import type { InputTransform } from '$lib/gen'
import { Highlight } from 'svelte-highlight'
import ObjectViewer from './propertyPicker/ObjectViewer.svelte'
import typescript from 'svelte-highlight/languages/typescript'
import { cleanExpr } from './flows/utils'
export let inputTransforms: Record<string, InputTransform>
</script>
<ul class="mb-1">
{#each Object.entries(inputTransforms) as [key, val]}
<li>
<span class="font-black text-gray-700">{key}</span>: {#if val.type == 'static'}<ObjectViewer
json={val.value}
/>{:else}
<span class="text-xs">
<Highlight offsetTop={0} language={typescript} code={cleanExpr(val.expr)} />
</span>
{/if}
</li>
{/each}
</ul>