Merge pull request #15734 from Budibase/fix/readable-binding-quotes

JS V2 Step bindings parsing and JS quote pattern update
This commit is contained in:
deanhannigan 2025-03-13 10:32:32 +00:00 committed by GitHub
commit 12e87f0e52
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 3 deletions

View File

@ -56,7 +56,10 @@
memo,
fetchData,
} from "@budibase/frontend-core"
import { getSchemaForDatasourcePlus } from "@/dataBinding"
import {
getSchemaForDatasourcePlus,
readableToRuntimeBinding,
} from "@/dataBinding"
import { TriggerStepID, ActionStepID } from "@/constants/backend/automations"
import { onMount, createEventDispatcher } from "svelte"
import { writable } from "svelte/store"
@ -1034,7 +1037,10 @@
{bindings}
{schema}
panel={AutomationBindingPanel}
on:change={e => onChange({ [key]: e.detail })}
on:change={e =>
onChange({
[key]: readableToRuntimeBinding(bindings, e.detail),
})}
context={$memoContext}
value={inputData[key]}
/>

View File

@ -37,7 +37,7 @@ const { ContextScopes } = Constants
// Regex to match all instances of template strings
const CAPTURE_VAR_INSIDE_TEMPLATE = /{{([^}]+)}}/g
const CAPTURE_VAR_INSIDE_JS = /\$\("([^")]+)"\)/g
const CAPTURE_VAR_INSIDE_JS = /\$\((["'`])([^"'`]+)\1\)/g
const CAPTURE_HBS_TEMPLATE = /{{[\S\s]*?}}/g
const UpdateReferenceAction = {