diff --git a/frontend/src/lib/components/ApiConnectForm.svelte b/frontend/src/lib/components/ApiConnectForm.svelte index 33c3ffb5e6..0e90ec56c7 100644 --- a/frontend/src/lib/components/ApiConnectForm.svelte +++ b/frontend/src/lib/components/ApiConnectForm.svelte @@ -4,12 +4,13 @@ import { base } from '$lib/base' import { emptySchema, emptyString } from '$lib/utils' import SchemaForm from './SchemaForm.svelte' - import SimpleEditor from './SimpleEditor.svelte' + import type SimpleEditor from './SimpleEditor.svelte' import Toggle from './Toggle.svelte' import TestConnection from './TestConnection.svelte' import SupabaseIcon from './icons/SupabaseIcon.svelte' import Popup from './common/popup/Popup.svelte' import Button from './common/button/Button.svelte' + import { Loader2 } from 'lucide-svelte' export let resourceType: string export let resourceTypeInfo: ResourceType | undefined @@ -195,13 +196,17 @@ >{error}{:else}
{/if}
- + {#await import('$lib/components/SimpleEditor.svelte')} + + {:then Module} + + {/await}
{:else if resourceTypeInfo?.format_extension}
@@ -209,13 +214,17 @@
- + {#await import('$lib/components/SimpleEditor.svelte')} + + {:then Module} + + {/await}
{:else} | undefined = undefined + export let appPath: string | undefined = undefined + export let computeS3ForceViewerPolicies: + | (() => + | { + allowed_resources: string[] + allow_user_resources: boolean + allow_workspace_resource: boolean + file_key_regex: string + } + | undefined) + | undefined = undefined + export let workspace: string | undefined = undefined $: inputCat = computeInputCat(type, format, itemsType?.type, enum_, contentEncoding) @@ -402,11 +416,13 @@ {format} {simpleTooltip} {lightHeader} + {displayType} + labelClass={css?.label?.class} /> {/if} {#if description} -
+
{description}
{/if} @@ -512,7 +528,11 @@ multiple={false} /> {:else if itemsType?.type == 'object' && itemsType?.resourceType === undefined && itemsType?.properties === undefined} - + {#await import('$lib/components/JsonEditor.svelte')} + + {:then Module} + + {/await} {:else if Array.isArray(itemsType?.enum)} {:else if itemsType?.type == 'resource'} - { - dispatch('focus') - }} - on:blur={(e) => { - dispatch('blur') - }} - code={JSON.stringify(v, null, 2)} - bind:value={v} - /> + {#await import('$lib/components/JsonEditor.svelte')} + + {:then Module} + { + dispatch('focus') + }} + on:blur={(e) => { + dispatch('blur') + }} + code={JSON.stringify(v, null, 2)} + bind:value={v} + /> + {/await} {:else if itemsType?.type === 'object' && itemsType?.properties}
{#if s3FileUploadRawMode} - { - dispatch('focus') - }} - on:blur={(e) => { - dispatch('blur') - }} - code={JSON.stringify(value ?? defaultValue ?? { s3: '' }, null, 2)} - bind:value - /> + {#await import('$lib/components/JsonEditor.svelte')} + + {:then Module} + { + dispatch('focus') + }} + on:blur={(e) => { + dispatch('blur') + }} + code={JSON.stringify(value ?? defaultValue ?? { s3: '' }, null, 2)} + bind:value + /> + {/await}