windmill-components 1.138.2 → 1.138.4

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.
@@ -6,16 +6,12 @@ import { Button, Drawer, DrawerContent } from './common';
6
6
  import { ClipboardCopy, Download, Expand } from 'lucide-svelte';
7
7
  import Portal from 'svelte-portal';
8
8
  import ObjectViewer from './propertyPicker/ObjectViewer.svelte';
9
- import ScriptFix from './codeGen/ScriptFix.svelte';
10
9
  export let result;
11
10
  export let requireHtmlApproval = false;
12
11
  export let filename = undefined;
13
12
  export let disableExpand = false;
14
13
  export let jobId = undefined;
15
14
  export let workspaceId = undefined;
16
- export let editor = undefined;
17
- export let diffEditor = undefined;
18
- export let lang = undefined;
19
15
  let resultKind;
20
16
  $: resultKind = inferResultKind(result);
21
17
  let forceJson = false;
@@ -207,9 +203,7 @@ $: jsonStr = JSON.stringify(result, null, 4);
207
203
  .message}{:else}{JSON.stringify(result.error, null, 4)}{/if}</span
208
204
  >
209
205
  <pre class="text-sm whitespace-pre-wrap text-primary">{result.error.stack ?? ''}</pre>
210
- {#if lang && editor && diffEditor}
211
- <ScriptFix error={JSON.stringify(result.error)} {lang} {editor} {diffEditor} />
212
- {/if}
206
+ <slot />
213
207
  </div>
214
208
  {:else if !forceJson && resultKind == 'approval'}<div class="flex flex-col gap-3 mt-8 mx-4">
215
209
  <Button
@@ -1,7 +1,4 @@
1
1
  import { SvelteComponentTyped } from "svelte";
2
- import type { Preview } from '../gen';
3
- import type Editor from './Editor.svelte';
4
- import type DiffEditor from './DiffEditor.svelte';
5
2
  declare const __propDef: {
6
3
  props: {
7
4
  result: any;
@@ -10,14 +7,13 @@ declare const __propDef: {
10
7
  disableExpand?: boolean | undefined;
11
8
  jobId?: string | undefined;
12
9
  workspaceId?: string | undefined;
13
- editor?: Editor | undefined;
14
- diffEditor?: DiffEditor | undefined;
15
- lang?: Preview.language | undefined;
16
10
  };
17
11
  events: {
18
12
  [evt: string]: CustomEvent<any>;
19
13
  };
20
- slots: {};
14
+ slots: {
15
+ default: {};
16
+ };
21
17
  };
22
18
  export type DisplayResultProps = typeof __propDef.props;
23
19
  export type DisplayResultEvents = typeof __propDef.events;
@@ -12,6 +12,7 @@ import TestJobLoader from './TestJobLoader.svelte';
12
12
  import ModulePreviewForm from './ModulePreviewForm.svelte';
13
13
  import { Kbd } from './common';
14
14
  import { evalValue } from './flows/utils';
15
+ import ScriptFix from './codeGen/ScriptFix.svelte';
15
16
  export let mod;
16
17
  export let schema;
17
18
  export let pickableProperties;
@@ -101,14 +102,16 @@ function jobDone() {
101
102
  <Pane size={50} minSize={10} class="text-sm text-tertiary">
102
103
  {#if testJob != undefined && 'result' in testJob && testJob.result != undefined}
103
104
  <pre class="overflow-x-auto break-words relative h-full px-2">
104
- <DisplayResult
105
- workspaceId={testJob?.workspace_id}
106
- jobId={testJob?.id}
107
- result={testJob.result}
108
- {editor}
109
- {diffEditor}
110
- {lang}
111
- />
105
+ <DisplayResult workspaceId={testJob?.workspace_id} jobId={testJob?.id} result={testJob.result}>
106
+ {#if lang && editor && diffEditor && testJob?.result?.error}
107
+ <ScriptFix
108
+ error={JSON.stringify(testJob.result.error)}
109
+ {lang}
110
+ {editor}
111
+ {diffEditor}
112
+ />
113
+ {/if}
114
+ </DisplayResult>
112
115
  </pre>
113
116
  {:else}
114
117
  <div class="p-2">
@@ -1,6 +1,6 @@
1
1
  <script>import { getContext } from 'svelte';
2
2
  import { initOutput } from '../../editor/appUtils';
3
- import '../../../../../../node_modules/quill/dist/quill.snow.css';
3
+ import 'quill/dist/quill.snow.css';
4
4
  import InputValue from '../helpers/InputValue.svelte';
5
5
  import InitializeComponent from '../helpers/InitializeComponent.svelte';
6
6
  export let id;
@@ -1,6 +1,6 @@
1
1
  import { SvelteComponentTyped } from "svelte";
2
2
  import type { RichConfigurations } from '../../types';
3
- import '../../../../../../node_modules/quill/dist/quill.snow.css';
3
+ import 'quill/dist/quill.snow.css';
4
4
  declare const __propDef: {
5
5
  props: {
6
6
  id: string;
@@ -18,6 +18,7 @@ import LogViewer from '../LogViewer.svelte';
18
18
  import { Pane, Splitpanes } from 'svelte-splitpanes';
19
19
  import SplitPanesWrapper from '../splitPanes/SplitPanesWrapper.svelte';
20
20
  import { Loader2 } from 'lucide-svelte';
21
+ import ScriptFix from '../codeGen/ScriptFix.svelte';
21
22
  export let lang;
22
23
  export let previewIsLoading = false;
23
24
  export let previewJob;
@@ -82,10 +83,16 @@ function closeDrawer() {
82
83
  workspaceId={previewJob?.workspace_id}
83
84
  jobId={previewJob?.id}
84
85
  result={previewJob.result}
85
- {editor}
86
- {diffEditor}
87
- {lang}
88
- />
86
+ >
87
+ {#if lang && editor && diffEditor && previewJob?.result?.error}
88
+ <ScriptFix
89
+ error={JSON.stringify(previewJob.result.error)}
90
+ {lang}
91
+ {editor}
92
+ {diffEditor}
93
+ />
94
+ {/if}
95
+ </DisplayResult>
89
96
  </div>
90
97
  {:else}
91
98
  <div class="text-sm text-tertiary p-2">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "windmill-components",
3
- "version": "1.138.2",
3
+ "version": "1.138.4",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build",