windmill-components 1.55.2 → 1.56.1

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.
Files changed (69) hide show
  1. package/components/Dropdown.svelte +7 -13
  2. package/components/FlowPreviewContent.svelte +1 -1
  3. package/components/FlowStatusViewer.svelte +57 -5
  4. package/components/FlowStatusViewer.svelte.d.ts +2 -0
  5. package/components/InputTransformForm.svelte +11 -4
  6. package/components/InputTransformForm.svelte.d.ts +0 -2
  7. package/components/ModulePreview.svelte +6 -2
  8. package/components/ModulePreview.svelte.d.ts +1 -1
  9. package/components/RunForm.svelte +10 -8
  10. package/components/ScheduleEditor.svelte +2 -2
  11. package/components/TemplateEditor.svelte +13 -1
  12. package/components/TestJobLoader.svelte +1 -1
  13. package/components/apps/components/DisplayComponent.svelte +1 -1
  14. package/components/apps/components/buttons/AppButton.svelte +19 -1
  15. package/components/apps/components/form/AppForm.svelte +18 -1
  16. package/components/apps/components/helpers/InputValue.svelte +0 -4
  17. package/components/apps/components/helpers/MissingConnectionWarning.svelte +11 -0
  18. package/components/apps/components/helpers/MissingConnectionWarning.svelte.d.ts +17 -0
  19. package/components/apps/components/helpers/RunnableComponent.svelte +82 -29
  20. package/components/apps/components/helpers/RunnableComponent.svelte.d.ts +1 -1
  21. package/components/apps/components/helpers/RunnableWrapper.svelte +1 -1
  22. package/components/apps/components/selectInputs/AppSelect.svelte +14 -3
  23. package/components/apps/components/table/AppTable.svelte +5 -5
  24. package/components/apps/editor/AppEditor.svelte +5 -7
  25. package/components/apps/editor/ComponentEditor.svelte +1 -0
  26. package/components/apps/editor/GridEditor.svelte +6 -2
  27. package/components/apps/editor/SettingsPanel.svelte +13 -0
  28. package/components/apps/editor/SettingsPanel.svelte.d.ts +14 -0
  29. package/components/apps/editor/TablePanel.svelte +16 -0
  30. package/components/apps/editor/TablePanel.svelte.d.ts +17 -0
  31. package/components/apps/editor/componentsPanel/ComponentList.svelte +25 -7
  32. package/components/apps/editor/contextPanel/ComponentOutputViewer.svelte +1 -1
  33. package/components/apps/editor/contextPanel/ContextPanel.svelte +3 -0
  34. package/components/apps/editor/inlineScriptsPanel/InlineScriptEditor.svelte +1 -1
  35. package/components/apps/editor/inlineScriptsPanel/InlineScriptEditorPanel.svelte +63 -46
  36. package/components/apps/editor/inlineScriptsPanel/InlineScriptEditorPanel.svelte.d.ts +2 -2
  37. package/components/apps/editor/inlineScriptsPanel/InlineScriptsPanelList.svelte +16 -2
  38. package/components/apps/editor/settingsPanel/ArrayStaticInputEditor.svelte.d.ts +9 -0
  39. package/components/apps/editor/settingsPanel/ComponentPanel.svelte +37 -2
  40. package/components/apps/editor/settingsPanel/InputsSpecsEditor.svelte +7 -4
  41. package/components/apps/editor/settingsPanel/InputsSpecsEditor.svelte.d.ts +1 -0
  42. package/components/apps/editor/settingsPanel/Recompute.svelte +6 -2
  43. package/components/apps/editor/settingsPanel/TableActions.svelte +9 -32
  44. package/components/apps/editor/settingsPanel/inputEditor/StaticInputEditor.svelte +25 -8
  45. package/components/apps/editor/settingsPanel/mainInput/RunnableSelector.svelte +10 -1
  46. package/components/apps/inputType.d.ts +2 -1
  47. package/components/apps/rx.js +1 -1
  48. package/components/apps/utils.js +5 -2
  49. package/components/common/drawer/Drawer.svelte +2 -1
  50. package/components/common/drawer/Drawer.svelte.d.ts +1 -0
  51. package/components/common/menu/Menu.svelte +3 -1
  52. package/components/common/table/Row.svelte +9 -11
  53. package/components/common/table/RowIcon.svelte +3 -2
  54. package/components/common/table/RowIcon.svelte.d.ts +1 -0
  55. package/components/flows/common/FlowCardHeader.svelte +29 -2
  56. package/components/flows/content/FlowModuleComponent.svelte +1 -1
  57. package/components/flows/content/FlowModuleScript.svelte +8 -3
  58. package/components/flows/content/FlowModuleScript.svelte.d.ts +1 -0
  59. package/components/flows/header/FlowPreviewButtons.svelte +2 -1
  60. package/components/flows/pickers/WorkspaceScriptPicker.svelte +1 -1
  61. package/components/flows/previousResults.d.ts +1 -1
  62. package/components/flows/previousResults.js +15 -3
  63. package/components/propertyPicker/PropPicker.svelte +2 -1
  64. package/gen/core/OpenAPI.js +1 -1
  65. package/gen/services/JobService.d.ts +10 -0
  66. package/gen/services/JobService.js +17 -0
  67. package/package.json +488 -485
  68. package/utils.d.ts +1 -0
  69. package/utils.js +4 -2
@@ -11,5 +11,5 @@ type StepPropPicker = {
11
11
  extraLib: string;
12
12
  };
13
13
  export declare function getStepPropPicker(flowState: FlowState, parentModule: FlowModule | undefined, previousModule: FlowModule | undefined, id: string, flow: Flow, args: any, include_node: boolean, approvers?: boolean): StepPropPicker;
14
- export declare function buildExtraLib(flowInput: Record<string, any>, results: Record<string, any>): string;
14
+ export declare function buildExtraLib(flowInput: Record<string, any>, results: Record<string, any>, resume: boolean): string;
15
15
  export {};
@@ -79,15 +79,15 @@ export function getStepPropPicker(flowState, parentModule, previousModule, id, f
79
79
  previousId: previousIds[0],
80
80
  hasResume: previousModule?.suspend != undefined,
81
81
  };
82
- if (approvers && ((previousModule?.suspend?.required_events ?? 0) > 0)) {
82
+ if (pickableProperties.hasResume) {
83
83
  pickableProperties["approvers"] = "The list of approvers";
84
84
  }
85
85
  return {
86
- extraLib: buildExtraLib(flowInput, priorIds),
86
+ extraLib: buildExtraLib(flowInput, priorIds, previousModule?.suspend != undefined),
87
87
  pickableProperties
88
88
  };
89
89
  }
90
- export function buildExtraLib(flowInput, results) {
90
+ export function buildExtraLib(flowInput, results, resume) {
91
91
  return `
92
92
  /**
93
93
  * get variable (including secret) at path
@@ -115,5 +115,17 @@ declare const params: any;
115
115
  * result by id
116
116
  */
117
117
  declare const results = ${JSON.stringify(results)};
118
+
119
+ ${resume ? `
120
+ /**
121
+ * resume payload
122
+ */
123
+ declare const resume: any
124
+
125
+ /**
126
+ * The list of approvers separated by ,
127
+ */
128
+ declare const approvers: string
129
+ ` : ''}
118
130
  `;
119
131
  }
@@ -108,7 +108,8 @@ async function loadResources() {
108
108
  pureViewer={!$propPickerConfig}
109
109
  json={{
110
110
  resume: 'The resume payload',
111
- resumes: 'All resume payloads from all approvers'
111
+ resumes: 'All resume payloads from all approvers',
112
+ approvers: 'The list of approvers'
112
113
  }}
113
114
  on:select={(e) => {
114
115
  dispatch('select', `${e.detail}`)
@@ -1,6 +1,6 @@
1
1
  export const OpenAPI = {
2
2
  BASE: '/api',
3
- VERSION: '1.55.0',
3
+ VERSION: '1.56.1',
4
4
  WITH_CREDENTIALS: false,
5
5
  CREDENTIALS: 'include',
6
6
  TOKEN: undefined,
@@ -458,6 +458,16 @@ export declare class JobService {
458
458
  requestBody: any;
459
459
  approver?: string;
460
460
  }): CancelablePromise<string>;
461
+ /**
462
+ * resume a job for a suspended flow as an owner
463
+ * @returns string job resumed
464
+ * @throws ApiError
465
+ */
466
+ static resumeSuspendedFlowAsOwner({ workspace, id, requestBody, }: {
467
+ workspace: string;
468
+ id: string;
469
+ requestBody: any;
470
+ }): CancelablePromise<string>;
461
471
  /**
462
472
  * cancel a job for a suspended flow
463
473
  * @returns string job resumed
@@ -396,6 +396,23 @@ export class JobService {
396
396
  mediaType: 'application/json',
397
397
  });
398
398
  }
399
+ /**
400
+ * resume a job for a suspended flow as an owner
401
+ * @returns string job resumed
402
+ * @throws ApiError
403
+ */
404
+ static resumeSuspendedFlowAsOwner({ workspace, id, requestBody, }) {
405
+ return __request(OpenAPI, {
406
+ method: 'POST',
407
+ url: '/w/{workspace}/jobs/flow/resume/{id}',
408
+ path: {
409
+ 'workspace': workspace,
410
+ 'id': id,
411
+ },
412
+ body: requestBody,
413
+ mediaType: 'application/json',
414
+ });
415
+ }
399
416
  /**
400
417
  * cancel a job for a suspended flow
401
418
  * @returns string job resumed