fix typecheck

This commit is contained in:
Ruben Fiszel
2023-01-11 17:21:02 +01:00
parent dbcc6f5792
commit 781d2ed7c4
3 changed files with 11 additions and 17 deletions
@@ -25,7 +25,9 @@
<div class="flex flex-col gap-1">
<div class="flex justify-between items-end gap-1">
<span class="text-sm font-semibold truncate">
{shouldCapitalize ? capitalize(addWhitespaceBeforeCapitals(inputSpecKey)) : inputSpecKey}
{shouldCapitalize
? capitalize(addWhitespaceBeforeCapitals(inputSpecKey))
: inputSpecKey}
{#if input.tooltip}
<Tooltip>
{input.tooltip}
@@ -44,7 +46,6 @@
<ToggleButtonGroup
bind:selected={inputSpecs[inputSpecKey].type}
on:selected={(e) => {
console.log(inputSpecs[inputSpecKey])
if (e.detail == 'connected' && !inputSpecs[inputSpecKey]['connection']) {
$connectingInput = {
opened: true,
@@ -62,9 +63,7 @@
size="xs"
iconOnly
/>
<svelte:fragment slot="text">
Static
</svelte:fragment>
<svelte:fragment slot="text">Static</svelte:fragment>
</Popover>
{#if rowColumns}
<Popover placement="bottom" notClickable disapperTimoout={0}>
@@ -79,12 +78,10 @@
Use the column name to have the value of the cell be passed to the action
</Tooltip>
</ToggleButton>
<svelte:fragment slot="text">
Column
</svelte:fragment>
<svelte:fragment slot="text">Column</svelte:fragment>
</Popover>
{/if}
{#if userInputEnabled && (!input.format?.startsWith('resource-'))}
{#if userInputEnabled && !input.format?.startsWith('resource-')}
<Popover placement="bottom" notClickable disapperTimoout={0}>
<ToggleButton
position="center"
@@ -94,9 +91,7 @@
iconOnly
disabled={staticOnly}
/>
<svelte:fragment slot="text">
User Input
</svelte:fragment>
<svelte:fragment slot="text">User Input</svelte:fragment>
</Popover>
{/if}
<Popover placement="bottom" notClickable disapperTimoout={0}>
@@ -108,9 +103,7 @@
iconOnly
disabled={staticOnly}
/>
<svelte:fragment slot="text">
Connect
</svelte:fragment>
<svelte:fragment slot="text">Connect</svelte:fragment>
</Popover>
</ToggleButtonGroup>
{/if}
@@ -69,7 +69,7 @@ export type Runnable = RunnableByPath | RunnableByName | undefined
// Runnable input, set by the developer in the component panel
export type ResultInput = {
runnable: Runnable
fields: Record<string, StaticAppInput | ConnectedAppInput | RowAppInput | UserAppInput>
fields: Record<string, (StaticAppInput | ConnectedAppInput | RowAppInput | UserAppInput)>
type: 'runnable'
value?: any
}
+2 -1
View File
@@ -6,6 +6,7 @@ import type {
AppInput,
ConnectedAppInput,
ConnectedInput,
RowAppInput,
StaticAppInput,
UserAppInput
} from './inputType'
@@ -57,7 +58,7 @@ export type Aligned = {
export interface BaseAppComponent extends Partial<Aligned> {
id: ComponentID
componentInput: AppInput | undefined
configuration: Record<string, (StaticAppInput | ConnectedAppInput | UserAppInput) & {
configuration: Record<string, (StaticAppInput | ConnectedAppInput | UserAppInput | RowAppInput) & {
onlyStatic?: boolean,
tooltip?: string
}>