API support for added template functions (eg. cookies)

This commit is contained in:
Gregory Schier
2025-05-25 20:25:13 -07:00
parent 9d54e40aa8
commit 0a932798a0
14 changed files with 285 additions and 46 deletions

View File

@@ -237,6 +237,7 @@ function TextArg({
defaultValue={value === DYNAMIC_FORM_NULL_ARG ? arg.defaultValue : value}
required={!arg.optional}
disabled={arg.disabled}
help={arg.description}
type={arg.password ? 'password' : 'text'}
label={arg.label ?? arg.name}
size={INPUT_SIZE}
@@ -278,6 +279,7 @@ function EditorArg({
htmlFor={id}
required={!arg.optional}
visuallyHidden={arg.hideLabel}
help={arg.description}
tags={arg.language ? [capitalize(arg.language)] : undefined}
>
{arg.label}
@@ -319,6 +321,7 @@ function SelectArg({
<Select
label={arg.label ?? arg.name}
name={arg.name}
help={arg.description}
onChange={onChange}
hideLabel={arg.hideLabel}
value={value}
@@ -341,6 +344,7 @@ function FileArg({
return (
<SelectFile
disabled={arg.disabled}
help={arg.description}
onChange={({ filePath }) => onChange(filePath)}
filePath={filePath === '__NULL__' ? null : filePath}
directory={!!arg.directory}
@@ -365,6 +369,7 @@ function HttpRequestArg({
label={arg.label ?? arg.name}
name={arg.name}
onChange={onChange}
help={arg.description}
value={value}
disabled={arg.disabled}
options={[
@@ -412,6 +417,7 @@ function CheckboxArg({
<Checkbox
onChange={onChange}
checked={value}
help={arg.description}
disabled={arg.disabled}
title={arg.label ?? arg.name}
hideLabel={arg.label == null}