From f747f51db83444281d0aa4a6821a5ac9818fc971 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Keviin=20=C3=85berg=20Kultalahti?= Date: Tue, 27 Apr 2021 15:26:03 +0200 Subject: [PATCH] converts QueryViewer to use new Layout component --- .../integration/QueryParameterBuilder.svelte | 33 +++---- .../components/integration/QueryViewer.svelte | 97 ++++++++----------- 2 files changed, 56 insertions(+), 74 deletions(-) diff --git a/packages/builder/src/components/integration/QueryParameterBuilder.svelte b/packages/builder/src/components/integration/QueryParameterBuilder.svelte index 5daf6774c9..29711177ec 100644 --- a/packages/builder/src/components/integration/QueryParameterBuilder.svelte +++ b/packages/builder/src/components/integration/QueryParameterBuilder.svelte @@ -52,22 +52,32 @@ placeholder="Parameter Name" thin disabled={bindable} - bind:value={parameter.name} /> + bind:value={parameter.name} + /> + bind:value={parameter.default} + /> {#if bindable} onBindingChange(parameter.name, evt.detail)} - value={runtimeToReadableBinding(bindings, customParams?.[parameter.name])} - {bindings} /> + on:change={(evt) => onBindingChange(parameter.name, evt.detail)} + value={runtimeToReadableBinding( + bindings, + customParams?.[parameter.name] + )} + {bindings} + /> {:else} - deleteQueryParameter(idx)} /> + deleteQueryParameter(idx)} + /> {/if} {/each} @@ -90,16 +100,5 @@ grid-template-columns: 1fr 1fr 5%; grid-gap: 10px; align-items: center; - margin-bottom: var(--spacing-xl); - } - - .delete { - transition: all 0.2s; - } - - .delete:hover { - transform: scale(1.1); - font-weight: 500; - cursor: pointer; } diff --git a/packages/builder/src/components/integration/QueryViewer.svelte b/packages/builder/src/components/integration/QueryViewer.svelte index ca8d5036b9..956ab1b158 100644 --- a/packages/builder/src/components/integration/QueryViewer.svelte +++ b/packages/builder/src/components/integration/QueryViewer.svelte @@ -6,6 +6,7 @@ Button, Body, Label, + Layout, Input, Heading, Spacer, @@ -110,46 +111,33 @@ } -
- + Query {integrationInfo?.friendlyName} - - Config - Provide a name for your query and select its function. - -
- - -
- - {#if queryConfig} +
- -
- + {#if queryConfig} +
+ +