1
0
Fork 0
mirror of synced 2024-09-21 03:43:21 +12:00
budibase/packages/builder/src/components/integration/index.svelte
2021-01-06 12:28:51 +00:00

28 lines
619 B
Svelte

<script>
import { TextArea, Label, Input } from "@budibase/bbui"
import Editor from "./Editor.svelte"
const CAPTURE_VAR_INSIDE_MUSTACHE = /{{([^}]+)}}/g
const QueryTypes = {
SQL: "sql",
}
export let type
export let query
// $: parameters = Array.from(
// query
// .matchAll(CAPTURE_VAR_INSIDE_MUSTACHE)
// .map(([_, paramName]) => paramName)
// )
</script>
<!-- {#each parameters as param}
<Label grey extraSmall>{param}</Label>
<Input thin bind:value={query.params[param]} />
{/each} -->
{#if type === QueryTypes.SQL}
<Editor label="Query" bind:value={query} />
{/if}