diff --git a/packages/builder/package.json b/packages/builder/package.json index a98da6e8d1..41b98750e9 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -63,7 +63,7 @@ } }, "dependencies": { - "@budibase/bbui": "^1.54.0", + "@budibase/bbui": "^1.54.1", "@budibase/client": "^0.5.3", "@budibase/colorpicker": "^1.0.1", "@budibase/string-templates": "^0.5.3", diff --git a/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte b/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte index aa8954cb8d..2369f99e74 100644 --- a/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte +++ b/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte @@ -43,8 +43,8 @@
+ height="18" + width="18" />
@@ -61,3 +61,10 @@ {/each} {/if} + + diff --git a/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/IntegrationConfigForm.svelte b/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/IntegrationConfigForm.svelte index 79bb951c01..f92224e39a 100644 --- a/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/IntegrationConfigForm.svelte +++ b/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/IntegrationConfigForm.svelte @@ -7,10 +7,9 @@
{#each Object.keys(integration) as configKey} - + {/each} diff --git a/packages/builder/src/components/backend/DatasourceNavigator/popovers/EditQueryParamsPopover.svelte b/packages/builder/src/components/backend/DatasourceNavigator/popovers/EditQueryParamsPopover.svelte new file mode 100644 index 0000000000..bc34d4d80c --- /dev/null +++ b/packages/builder/src/components/backend/DatasourceNavigator/popovers/EditQueryParamsPopover.svelte @@ -0,0 +1,42 @@ + + +
+ + + Add Parameters + + +
+ +
+
+
+ + \ No newline at end of file diff --git a/packages/builder/src/components/integration/QueryEditor.svelte b/packages/builder/src/components/integration/QueryEditor.svelte index 22cddb5606..2b5965613e 100644 --- a/packages/builder/src/components/integration/QueryEditor.svelte +++ b/packages/builder/src/components/integration/QueryEditor.svelte @@ -155,8 +155,9 @@ } :global(.CodeMirror) { - height: auto !important; - border-radius: var(--border-radius-m); - font-family: var(--font-sans) !important; + height: 500px !important; + border-radius: var(--border-radius-s); + font-family: monospace !important; + line-height: 1.3; } diff --git a/packages/builder/src/components/integration/QueryFieldsBuilder.svelte b/packages/builder/src/components/integration/QueryFieldsBuilder.svelte index 83a03c72d1..d5f4b3bd8b 100644 --- a/packages/builder/src/components/integration/QueryFieldsBuilder.svelte +++ b/packages/builder/src/components/integration/QueryFieldsBuilder.svelte @@ -24,18 +24,18 @@
+
{#each schemaKeys as field} - -
-
{/each} +
- {#if schema.customisable} - import { Button, TextArea, Label, Input, Heading } from "@budibase/bbui" + import { + Button, + TextArea, + Label, + Input, + Heading, + Spacer, + } from "@budibase/bbui" import BindableInput from "components/userInterface/BindableInput.svelte" import { readableToRuntimeBinding, @@ -31,19 +38,22 @@
Parameters +
- - - {#if bindable} - - {:else} -
- {/if} {#each parameters as parameter, idx} - - + + {#if bindable} onBindingChange(parameter.name, evt.detail)} @@ -57,9 +67,7 @@ {/each}
{#if !bindable} - + {/if}
diff --git a/packages/builder/src/components/integration/QueryViewer.svelte b/packages/builder/src/components/integration/QueryViewer.svelte index 5ac3e550c1..da5f4e1a40 100644 --- a/packages/builder/src/components/integration/QueryViewer.svelte +++ b/packages/builder/src/components/integration/QueryViewer.svelte @@ -16,6 +16,7 @@ import { FIELDS } from "constants/backend" import IntegrationQueryEditor from "components/integration/index.svelte" import ExternalDataSourceTable from "components/backend/DataTable/ExternalDataSourceTable.svelte" + import EditQueryParamsPopover from "components/backend/DatasourceNavigator/popovers/EditQueryParamsPopover.svelte" import { backendUiStore } from "builderStore" const PREVIEW_HEADINGS = [ @@ -40,6 +41,7 @@ let tab = "JSON" let parameters let data = [] + let popover $: datasource = $backendUiStore.datasources.find( ds => ds._id === query.datasourceId @@ -61,7 +63,7 @@ $: config = $backendUiStore.integrations[datasourceType]?.query $: docsLink = $backendUiStore.integrations[datasourceType]?.docs - $: shouldShowQueryConfig = config && query.queryVerb && query.queryType + $: shouldShowQueryConfig = config && query.queryVerb function newField() { fields = [...fields, {}] @@ -129,62 +131,44 @@
- {query.name} +
+ +
{#if config} -
- {#each Object.keys(config) as queryVerb} -
{ - query.queryVerb = queryVerb - }}> - {queryVerb} -
- {/each} -
- {#if query.queryVerb} - + {#each Object.keys(config) as queryVerb} + {/each} - {/if} - - + + + {/if}
- - + {#if shouldShowQueryConfig}
- - - - - - + +
- +
@@ -196,10 +180,11 @@ {:else if tab === 'SCHEMA'} {#each fields as field, idx} +
- - +