mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-21 08:02:26 +00:00
e053f270a8
* feat(frontend): wip * feat(frontend): wip * feat(frontend): implement cellRenderer * feat(frontend): wip * feat(frontend): wip * feat(frontend): Fix actions width * feat(frontend): Fix interactions * feat(frontend): Fix styling * feat(frontend): Correctly handleAgGrid EE * feat(frontend): Fix select * feat(frontend): Fix select * feat(frontend): Fix how row is passed * feat(frontend): Fix update * feat(frontend): Correctly implement cache * feat(frontend): Correctly implement cache * feat(frontend): simplify how refreshActions work * feat(frontend): improve comparaison * feat(frontend): simplify refreshactins * feat(frontend): clean up * feat(frontend): clean up * feat(frontend): add inputs output + fix row eval * feat(frontend): add config to wrap actions * feat(frontend): add config to wrap actions --------- Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
64 lines
2.4 KiB
Svelte
64 lines
2.4 KiB
Svelte
<script lang="ts">
|
|
import { getContext } from 'svelte'
|
|
import type { AppEditorContext, GridItem } from '../../types'
|
|
import InlineScriptEditorPanel from './InlineScriptEditorPanel.svelte'
|
|
|
|
const { selectedComponentInEditor } = getContext<AppEditorContext>('AppEditorContext')
|
|
|
|
export let gridItem: GridItem
|
|
</script>
|
|
|
|
{#if gridItem?.data?.id === $selectedComponentInEditor || gridItem?.data?.id + '_transformer' === $selectedComponentInEditor}
|
|
<InlineScriptEditorPanel
|
|
on:createScriptFromInlineScript
|
|
defaultUserInput={gridItem.data?.type == 'formcomponent' ||
|
|
gridItem?.data?.type == 'formbuttoncomponent'}
|
|
id={gridItem.data.id}
|
|
componentType={gridItem.data.type}
|
|
transformer={$selectedComponentInEditor?.endsWith('_transformer')}
|
|
bind:componentInput={gridItem.data.componentInput}
|
|
/>
|
|
{/if}
|
|
|
|
{#if gridItem?.data?.type === 'tablecomponent'}
|
|
{#each gridItem.data.actionButtons as actionButton, index (index)}
|
|
{#if actionButton?.id === $selectedComponentInEditor || actionButton?.id + '_transformer' === $selectedComponentInEditor}
|
|
<InlineScriptEditorPanel
|
|
on:createScriptFromInlineScript
|
|
componentType={actionButton.type}
|
|
id={actionButton.id}
|
|
transformer={$selectedComponentInEditor?.endsWith('_transformer')}
|
|
bind:componentInput={actionButton.componentInput}
|
|
/>
|
|
{/if}
|
|
{/each}
|
|
{/if}
|
|
|
|
{#if gridItem?.data?.type === 'aggridcomponent' || gridItem?.data?.type === 'aggridcomponentee'}
|
|
{#each gridItem.data.actions as actionButton, index (index)}
|
|
{#if actionButton?.id === $selectedComponentInEditor || actionButton?.id + '_transformer' === $selectedComponentInEditor}
|
|
<InlineScriptEditorPanel
|
|
on:createScriptFromInlineScript
|
|
componentType={actionButton.type}
|
|
id={actionButton.id}
|
|
transformer={$selectedComponentInEditor?.endsWith('_transformer')}
|
|
bind:componentInput={actionButton.componentInput}
|
|
/>
|
|
{/if}
|
|
{/each}
|
|
{/if}
|
|
|
|
{#if gridItem?.data?.type === 'menucomponent'}
|
|
{#each gridItem.data.menuItems as actionButton, index (index)}
|
|
{#if actionButton?.id === $selectedComponentInEditor || actionButton?.id + '_transformer' === $selectedComponentInEditor}
|
|
<InlineScriptEditorPanel
|
|
on:createScriptFromInlineScript
|
|
componentType={actionButton.type}
|
|
id={actionButton.id}
|
|
transformer={$selectedComponentInEditor?.endsWith('_transformer')}
|
|
bind:componentInput={actionButton.componentInput}
|
|
/>
|
|
{/if}
|
|
{/each}
|
|
{/if}
|