Files
windmill/frontend/src/lib/components/flows/content/DynamicInputHelpBox.svelte
T
Diego ImbertandClaude Opus 4.6 5d79f33590 Final Svelte 5 migration (#8211)
* Remove $$props.field usage

* Rename slots to ensure no hyphen

* _props

* _trigger

* OnSelectedIteration type correct capitalization

* rename _content

* Remove afterUpdate

* Migrate everything to svelte 5

* array bind

* Fix popover

* type never

* nit fixes

* Fixed many trivial errors

* onClick

* Fix errors

* use let:

* nit typing

* fix: wrap state_referenced_locally vars with untrack()

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add untrack import

* Fix all syntax errors due to untrack migration

* Fix undefined errors

* Fix more undefined errors

* untrack(() => initialOpen)

* svelte-ignore

* Fix state_descriptors_fixed error in Chart.svelte

Use $state.snapshot() to pass plain copies of data/options to Chart.js
instead of $state proxies. Chart.js's listenArrayEvents tries to define
property descriptors on data arrays, which Svelte 5 proxies reject.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* nit typing

* Merge issue

* Fix "path is not set" error in resource picker / editor

* Fix InputTransformForm error when rerunning some flows

* fix npm run check

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-05 18:11:40 +01:00

47 lines
1.5 KiB
Svelte

<script lang="ts">
import Alert from '$lib/components/common/alert/Alert.svelte'
import Button from '$lib/components/common/button/Button.svelte'
import { ChevronDown } from 'lucide-svelte'
let opened = $state(false);
</script>
<div class="text-xs flex flex-row-reverse">
<Button
on:click={() => {
opened = !opened
}}
color="light"
variant="divider"
size="xs2"
endIcon={{ icon: ChevronDown, classes: `rotate-0 duration-300 ${opened ? '!rotate-180' : ''}` }}
btnClasses="text-hint text-2xs font-normal pt-1"
>
Help
</Button>
</div>
{#if opened}
<Alert title="Single JavaScript expression" class="mt-2">
The following functions and objects are available:
<ul class="ml-4 list-disc">
<li
><b>{'results.<id>'}</b>: the result of step at id 'id' (use optional chaining if id may not
exist because branch was not chosen, for example: <code>{'results.<id>?.[0]'}</code>)</li
>
<li><b>flow_input</b>: the object containing the flow input arguments</li>
<li><b>previous_result</b>: the result of previous step</li>
<li><b>params</b>: the object containing the current step static values</li>
<li>
<b>variable(path)</b>: the function returning the variable (including secrets) at given path
as a string
</li>
<li>
<b>resource(path)</b>: the function returning the resource at a given path as an object
</li>
</ul>
If using multiple statements, the last statement shall finish with a return. e.g: `return x`
</Alert>
{/if}