windmill-components 1.408.1 → 1.408.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3,7 +3,7 @@ import { ScriptService } from '../../gen';
|
|
|
3
3
|
import { Wand2, Loader2 } from 'lucide-svelte';
|
|
4
4
|
import SearchItems from '../SearchItems.svelte';
|
|
5
5
|
import { emptyString } from '../../utils';
|
|
6
|
-
import { onMount } from 'svelte';
|
|
6
|
+
import { createEventDispatcher, onMount } from 'svelte';
|
|
7
7
|
export let funcDesc;
|
|
8
8
|
export let trigger = false;
|
|
9
9
|
export let loading = false;
|
|
@@ -12,6 +12,7 @@ export let disableAi = false;
|
|
|
12
12
|
let scripts = undefined;
|
|
13
13
|
export let filteredItems = [];
|
|
14
14
|
$: prefilteredItems = scripts ?? [];
|
|
15
|
+
const dispatch = createEventDispatcher();
|
|
15
16
|
async function loadScripts() {
|
|
16
17
|
const loadedScripts = await ScriptService.listScripts({
|
|
17
18
|
workspace: $workspaceStore,
|
|
@@ -43,6 +44,11 @@ onMount(() => {
|
|
|
43
44
|
<input
|
|
44
45
|
bind:this={input}
|
|
45
46
|
type="text"
|
|
47
|
+
on:keydown={(e) => {
|
|
48
|
+
if (e.key === 'Escape') {
|
|
49
|
+
dispatch('escape')
|
|
50
|
+
}
|
|
51
|
+
}}
|
|
46
52
|
bind:value={funcDesc}
|
|
47
53
|
placeholder="Search {trigger ? 'triggers' : 'scripts'} {disableAi ? '' : 'or AI gen'}"
|
|
48
54
|
/>
|
|
@@ -82,7 +82,14 @@ shouldUsePortal={true} -->
|
|
|
82
82
|
role="none"
|
|
83
83
|
>
|
|
84
84
|
<div class="flex flex-row items-center gap-2">
|
|
85
|
-
<StepGenQuick
|
|
85
|
+
<StepGenQuick
|
|
86
|
+
on:escape={() => close(null)}
|
|
87
|
+
{disableAi}
|
|
88
|
+
on:insert
|
|
89
|
+
bind:funcDesc
|
|
90
|
+
{preFilter}
|
|
91
|
+
{loading}
|
|
92
|
+
/>
|
|
86
93
|
{#if selectedKind != 'preprocessor' && selectedKind != 'flow'}
|
|
87
94
|
<ToggleHubWorkspaceQuick bind:selected={preFilter} />
|
|
88
95
|
{/if}
|