{ if (e.key === 'Escape') { if (replResultData) { replResultData = undefined } } }} /> {#if dbSchema && $workspaceStore && input} {@const _input = input} {@const dbType = getDbType(_input)}
{ // Only proceed if the click is directly on this div and not on the child elements if (e.target === e.currentTarget) { replResultData = undefined } }} > {#if replResultData} {#key replResultData} {/key} {/if}
dbTableOpsWithPreviewScripts({ colDefs, tableKey, input: _input, workspace: $workspaceStore })} dbSchemaOps={dbSchemaOpsWithPreviewScripts({ input: _input, workspace: $workspaceStore })} initialTableKey={input.specificTable} initialSchemaKey={input.type == 'database' ? input.specificSchema : undefined} asset={_input.type == 'ducklake' ? { kind: 'ducklake', path: _input.ducklake } : _input.resourcePath.startsWith('datatable://') ? { kind: 'datatable', path: _input.resourcePath.substring('datatable://'.length) } : undefined} {dbType} refresh={() => refresh()} {dbSelector} bind:selectedSchemaKey bind:selectedTableKey {multiSelectMode} bind:selectedTables bind:this={_dbManager} {disabledTables} features={getDbFeatures(input)} />
{#if showRepl} { replResultData = data }} placeholderTableName={sortArray( Object.keys( dbSchema?.schema[ 'public' in dbSchema?.schema ? 'public' : 'dbo' in dbSchema?.schema ? 'dbo' : Object.keys(dbSchema?.schema ?? {})?.[0] ] ?? {} ) )?.[0]} /> {/if}
{:else} {/if}