2022-09-17 11:45:44 +02:00
|
|
|
<script>
|
|
|
|
import KeyValueBuilder from "components/integration/KeyValueBuilder.svelte"
|
2024-02-05 13:08:45 +01:00
|
|
|
import { getUserBindings } from "dataBinding"
|
2023-11-20 21:52:29 +01:00
|
|
|
|
2022-09-17 11:45:44 +02:00
|
|
|
export let queryBindings = []
|
|
|
|
|
|
|
|
const userBindings = getUserBindings()
|
|
|
|
|
|
|
|
let internalBindings = queryBindings.reduce((acc, binding) => {
|
|
|
|
acc[binding.name] = binding.default
|
|
|
|
return acc
|
|
|
|
}, {})
|
|
|
|
</script>
|
|
|
|
|
2023-09-26 13:27:27 +02:00
|
|
|
<KeyValueBuilder
|
|
|
|
bind:object={internalBindings}
|
|
|
|
tooltip="Set the name of the binding which can be used in Handlebars statements throughout your query"
|
|
|
|
name="binding"
|
|
|
|
customButtonText="Bindings"
|
|
|
|
headings
|
|
|
|
keyPlaceholder="Binding name"
|
|
|
|
valuePlaceholder="Default"
|
|
|
|
bindings={[...userBindings]}
|
|
|
|
bindingDrawerLeft="260px"
|
|
|
|
allowHelpers={false}
|
|
|
|
on:change
|
|
|
|
/>
|