windmill-components 1.472.6 → 1.473.0

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.
@@ -44,7 +44,6 @@ export let shouldDispatchChanges = false;
44
44
  export let isValid = true;
45
45
  export let customUi = undefined;
46
46
  const dispatch = createEventDispatcher();
47
- const noVariablePickerOnPreview = noVariablePicker || customUi?.disableVariablePicker === true;
48
47
  let clazz = '';
49
48
  export { clazz as class };
50
49
  $: if (args == undefined || typeof args !== 'object') {
@@ -169,7 +168,7 @@ function renameProperty(oldName, key) {
169
168
  sendUserToast('Argument renamed successfully');
170
169
  }
171
170
  }
172
- let jsonView = customUi?.jsonOnly;
171
+ let jsonView = customUi?.jsonOnly == true;
173
172
  let schemaString = JSON.stringify(schema, null, '\t');
174
173
  let error = undefined;
175
174
  let editor = undefined;
@@ -269,7 +268,7 @@ export function updateJson() {
269
268
  }}
270
269
  {shouldDispatchChanges}
271
270
  bind:isValid
272
- noVariablePicker={noVariablePickerOnPreview}
271
+ noVariablePicker={noVariablePicker || customUi?.disableVariablePicker === true}
273
272
  />
274
273
 
275
274
  <slot name="runButton" />
@@ -288,7 +287,7 @@ export function updateJson() {
288
287
  <slot name="extraTab" />
289
288
  {:else}
290
289
  <!-- WIP -->
291
- {#if jsonEnabled && !customUi?.jsonOnly}
290
+ {#if jsonEnabled && !customUi?.jsonOnly != true}
292
291
  <div class="w-full p-3 flex justify-end">
293
292
  <Toggle
294
293
  bind:checked={jsonView}
@@ -85,11 +85,12 @@ const dispatch = createEventDispatcher();
85
85
  $: initialPath != '' && loadTriggers();
86
86
  onMount(() => {
87
87
  if (functionExports) {
88
+ console.log('functionExports set');
88
89
  functionExports({
89
90
  setPreviewArgs: (args) => {
90
91
  scriptEditor?.setArgs(args);
91
92
  },
92
- runPreview: () => scriptEditor?.runTest(),
93
+ runPreview: async () => await scriptEditor?.runTest(),
93
94
  setCode: (code, language) => {
94
95
  if (language) {
95
96
  script.language = language;
@@ -1332,7 +1333,7 @@ function addPreprocessor() {
1332
1333
  {#if customUi?.topBar?.path != false}
1333
1334
  <div class="flex justify-start w-full border rounded-md overflow-hidden">
1334
1335
  <div>
1335
- {#if customUi?.topBar?.editablePath}
1336
+ {#if customUi?.topBar?.editablePath != false}
1336
1337
  <button
1337
1338
  on:click={async () => {
1338
1339
  metadataOpen = true
@@ -194,7 +194,7 @@ export const settings = {
194
194
  storage: 'setting'
195
195
  },
196
196
  {
197
- label: 'Pip index url',
197
+ label: 'UV index url',
198
198
  description: 'Add private Pip registry',
199
199
  key: 'pip_index_url',
200
200
  fieldType: 'text',
@@ -203,7 +203,7 @@ export const settings = {
203
203
  ee_only: ''
204
204
  },
205
205
  {
206
- label: 'Pip extra index url',
206
+ label: 'UV extra index url',
207
207
  description: 'Add private extra Pip registry',
208
208
  key: 'pip_extra_index_url',
209
209
  fieldType: 'text',
@@ -1,7 +1,7 @@
1
1
  import type { Script } from "../gen";
2
2
  export type ScriptBuilderFunctionExports = {
3
3
  setPreviewArgs: (args: Record<string, any>) => void;
4
- runPreview: () => Promise<string>;
4
+ runPreview: () => Promise<string | undefined>;
5
5
  setCode: (code: string, language?: Script["language"]) => void;
6
6
  getCode: () => string;
7
7
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "windmill-components",
3
- "version": "1.472.6",
3
+ "version": "1.473.0",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build",