{#if arg != undefined}
{#if !checked && arg.type === 'javascript'} {'${...}'} {/if}
{ const type = e.detail ? 'javascript' : 'static' const staticTemplate = isStaticTemplate(inputCat) if (type === 'javascript') { arg.expr = getDefaultExpr( importPath, argName, staticTemplate ? `\`${arg.value ?? ''}\`` : arg.value ) arg.value = undefined propertyType = 'javascript' } else { arg.value = staticTemplate ? codeToStaticTemplate(arg.expr) : undefined arg.expr = undefined propertyType = 'static' } arg.type = type }} />
{ focusProp(argName, 'connect', (path) => { connectProperty(path) return false }) }} >
{#if propertyType === undefined || !checked} onFocus()} label={argName} bind:editor={monaco} bind:description={schema.properties[argName].description} bind:value={arg.value} type={schema.properties[argName].type} required={schema.required.includes(argName)} bind:pattern={schema.properties[argName].pattern} bind:valid={inputCheck} defaultValue={schema.properties[argName].default} bind:enum_={schema.properties[argName].enum} bind:format={schema.properties[argName].format} contentEncoding={schema.properties[argName].contentEncoding} bind:itemsType={schema.properties[argName].items} properties={schema.properties[argName].properties} displayHeader={false} bind:inputCat on:input={(e) => { if (isStaticTemplate(inputCat)) { setPropertyType(e.detail.rawValue) } }} /> {:else if checked} {#if arg.expr != undefined}
{ focusProp(argName, 'insert', (path) => { monaco?.insertAtCursor(path) return false }) }} bind:code={arg.expr} lang="javascript" class="few-lines-editor" {extraLib} extraLibPath="file:///node_modules/@types/windmill@{importPath}/index.d.ts" shouldBindKey={false} />
{/if} {:else}

Not recognized arg type {arg.type}

{/if} {:else}

Arg at {argName} is undefined

{/if}