windmill-components 1.35.42 → 1.36.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.
- package/components/AppConnect.svelte +85 -59
- package/components/ArgInput.svelte +50 -33
- package/components/ArgInput.svelte.d.ts +1 -1
- package/components/Button.svelte +15 -48
- package/components/Button.svelte.d.ts +1 -1
- package/components/CronInput.svelte +1 -1
- package/components/DisplayResult.svelte +75 -67
- package/components/Dropdown.svelte +9 -7
- package/components/Editor.svelte +187 -178
- package/components/Editor.svelte.d.ts +4 -2
- package/components/EditorBar.svelte +135 -98
- package/components/EditorBar.svelte.d.ts +2 -1
- package/components/FlowBuilder.svelte +115 -134
- package/components/FlowJobResult.svelte +4 -5
- package/components/FlowModulesViewer.svelte +89 -7
- package/components/FlowModulesViewer.svelte.d.ts +1 -0
- package/components/FlowPreviewContent.svelte +88 -27
- package/components/FlowPreviewContent.svelte.d.ts +1 -1
- package/components/FlowStatusViewer.svelte +39 -24
- package/components/FlowStatusViewer.svelte.d.ts +0 -1
- package/components/FlowViewer.svelte +17 -11
- package/components/GroupModal.svelte +10 -1
- package/components/HighlightCode.svelte +22 -0
- package/components/HighlightCode.svelte.d.ts +17 -0
- package/components/IconedPath.svelte +9 -7
- package/components/InputTransformForm.svelte +97 -115
- package/components/InputTransformForm.svelte.d.ts +0 -1
- package/components/InputTransformsViewer.svelte +1 -1
- package/components/InviteGlobalUser.svelte +8 -8
- package/components/InviteUser.svelte +9 -9
- package/components/ItemPicker.svelte +37 -30
- package/components/ItemPicker.svelte.d.ts +2 -1
- package/components/JobStatus.svelte +2 -1
- package/components/LogViewer.svelte +23 -0
- package/components/LogViewer.svelte.d.ts +19 -0
- package/components/ModulePreview.svelte +107 -0
- package/components/ModulePreview.svelte.d.ts +24 -0
- package/components/Path.svelte +1 -1
- package/components/RadioButton.svelte +3 -2
- package/components/ResourceEditor.svelte +22 -34
- package/components/ResourceTypePicker.svelte +23 -34
- package/components/RunForm.svelte +34 -31
- package/components/RunForm.svelte.d.ts +6 -2
- package/components/SchemaEditor.svelte +19 -11
- package/components/SchemaForm.svelte +3 -3
- package/components/SchemaForm.svelte.d.ts +1 -1
- package/components/SchemaModal.svelte +18 -7
- package/components/ScriptBuilder.svelte +99 -83
- package/components/ScriptBuilder.svelte.d.ts +2 -4
- package/components/ScriptEditor.svelte +71 -143
- package/components/ScriptEditor.svelte.d.ts +0 -5
- package/components/ScriptPicker.svelte +24 -14
- package/components/ScriptPicker.svelte.d.ts +2 -1
- package/components/ScriptSchema.svelte +8 -11
- package/components/ScriptSchema.svelte.d.ts +0 -1
- package/components/ShareModal.svelte +6 -6
- package/components/SharedBadge.svelte +5 -13
- package/components/SimpleEditor.svelte +14 -10
- package/components/StringTypeNarrowing.svelte +24 -30
- package/components/TestJobLoader.svelte +106 -0
- package/components/TestJobLoader.svelte.d.ts +26 -0
- package/components/Tooltip.svelte +3 -2
- package/components/VariableEditor.svelte +15 -24
- package/components/common/actionRow/ActionRow.svelte +31 -0
- package/components/common/actionRow/ActionRow.svelte.d.ts +22 -0
- package/components/common/alert/Alert.svelte +53 -0
- package/components/common/alert/Alert.svelte.d.ts +20 -0
- package/components/common/alert/model.d.ts +1 -0
- package/components/common/alert/model.js +1 -0
- package/components/common/badge/Badge.svelte +76 -0
- package/components/common/badge/Badge.svelte.d.ts +28 -0
- package/components/common/badge/model.d.ts +8 -0
- package/components/common/badge/model.js +1 -0
- package/components/common/button/Button.svelte +110 -0
- package/components/common/button/Button.svelte.d.ts +39 -0
- package/components/common/button/model.d.ts +6 -0
- package/components/common/button/model.js +1 -0
- package/components/common/confirmationModal/ConfirmationModal.svelte +72 -0
- package/components/common/confirmationModal/ConfirmationModal.svelte.d.ts +23 -0
- package/components/common/confirmationModal/UnsavedConfirmationModal.svelte +41 -0
- package/components/common/confirmationModal/UnsavedConfirmationModal.svelte.d.ts +14 -0
- package/components/common/confirmationModal/dirtyStore.d.ts +1 -0
- package/components/common/confirmationModal/dirtyStore.js +2 -0
- package/components/common/drawer/Drawer.svelte +3 -0
- package/components/common/drawer/Drawer.svelte.d.ts +2 -0
- package/components/common/index.d.ts +14 -0
- package/components/common/index.js +14 -0
- package/components/common/tabs/TabContent.svelte +3 -2
- package/components/common/tabs/TabContent.svelte.d.ts +1 -0
- package/components/common/tabs/Tabs.svelte +8 -1
- package/components/common/tabs/Tabs.svelte.d.ts +2 -0
- package/components/common/toggleButton/ToggleButton.svelte +20 -0
- package/components/common/toggleButton/ToggleButton.svelte.d.ts +19 -0
- package/components/common/toggleButton/ToggleButtonGroup.svelte +33 -0
- package/components/common/toggleButton/ToggleButtonGroup.svelte.d.ts +24 -0
- package/components/flows/FlowEditor.svelte +30 -0
- package/components/{FlowEditor.svelte.d.ts → flows/FlowEditor.svelte.d.ts} +1 -6
- package/components/flows/common/FlowCard.svelte +9 -0
- package/components/flows/common/FlowCard.svelte.d.ts +21 -0
- package/components/flows/common/FlowCardHeader.svelte +39 -0
- package/components/flows/common/FlowCardHeader.svelte.d.ts +20 -0
- package/components/flows/content/CopyFirstStepSchema.svelte +13 -0
- package/components/flows/{CopyFirstStepSchema.svelte.d.ts → content/CopyFirstStepSchema.svelte.d.ts} +0 -0
- package/components/flows/{DynamicInputHelpBox.svelte → content/DynamicInputHelpBox.svelte} +0 -0
- package/components/flows/{DynamicInputHelpBox.svelte.d.ts → content/DynamicInputHelpBox.svelte.d.ts} +0 -0
- package/components/flows/content/FlowEditorPanel.svelte +25 -0
- package/components/flows/content/FlowEditorPanel.svelte.d.ts +16 -0
- package/components/flows/content/FlowFailureModule.svelte +15 -0
- package/components/flows/content/FlowFailureModule.svelte.d.ts +14 -0
- package/components/flows/content/FlowInput.svelte +26 -0
- package/components/flows/{FlowInput.svelte.d.ts → content/FlowInput.svelte.d.ts} +0 -0
- package/components/flows/content/FlowInputs.svelte +91 -0
- package/components/flows/{FlowInputs.svelte.d.ts → content/FlowInputs.svelte.d.ts} +1 -0
- package/components/flows/content/FlowLoop.svelte +168 -0
- package/components/flows/content/FlowLoop.svelte.d.ts +18 -0
- package/components/flows/content/FlowLoopWrapper.svelte +9 -0
- package/components/flows/content/FlowLoopWrapper.svelte.d.ts +14 -0
- package/components/flows/content/FlowModule.svelte +211 -0
- package/components/flows/content/FlowModule.svelte.d.ts +29 -0
- package/components/flows/content/FlowModuleEarlyStop.svelte +76 -0
- package/components/flows/content/FlowModuleEarlyStop.svelte.d.ts +17 -0
- package/components/flows/content/FlowModuleHeader.svelte +157 -0
- package/components/flows/{FlowModuleHeader.svelte.d.ts → content/FlowModuleHeader.svelte.d.ts} +5 -3
- package/components/flows/content/FlowModuleScript.svelte +21 -0
- package/components/flows/content/FlowModuleScript.svelte.d.ts +17 -0
- package/components/flows/content/FlowModuleSuspend.svelte +27 -0
- package/components/flows/content/FlowModuleSuspend.svelte.d.ts +17 -0
- package/components/flows/content/FlowModuleWrapper.svelte +45 -0
- package/components/flows/content/FlowModuleWrapper.svelte.d.ts +14 -0
- package/components/flows/content/FlowRetries.svelte +80 -0
- package/components/flows/content/FlowRetries.svelte.d.ts +17 -0
- package/components/flows/content/FlowSchedules.svelte +18 -0
- package/components/flows/content/FlowSchedules.svelte.d.ts +14 -0
- package/components/flows/content/FlowSettings.svelte +78 -0
- package/components/flows/{FlowSettings.svelte.d.ts → content/FlowSettings.svelte.d.ts} +2 -6
- package/components/flows/content/RemoveStepConfirmationModal.svelte +32 -0
- package/components/flows/content/RemoveStepConfirmationModal.svelte.d.ts +19 -0
- package/components/flows/flowState.d.ts +8 -7
- package/components/flows/flowState.js +25 -46
- package/components/flows/flowStateUtils.d.ts +16 -14
- package/components/flows/flowStateUtils.js +81 -73
- package/components/flows/flowStore.js +7 -4
- package/components/flows/header/FlowImportExportMenu.svelte +55 -0
- package/components/flows/header/FlowImportExportMenu.svelte.d.ts +14 -0
- package/components/flows/header/FlowPreviewButtons.svelte +57 -0
- package/components/flows/header/FlowPreviewButtons.svelte.d.ts +14 -0
- package/components/flows/map/FlowErrorHandlerItem.svelte +60 -0
- package/components/flows/map/FlowErrorHandlerItem.svelte.d.ts +14 -0
- package/components/flows/map/FlowModuleSchemaItem.svelte +80 -0
- package/components/flows/map/FlowModuleSchemaItem.svelte.d.ts +32 -0
- package/components/flows/map/FlowModuleSchemaMap.svelte +241 -0
- package/components/flows/map/FlowModuleSchemaMap.svelte.d.ts +20 -0
- package/components/flows/pickers/PickHubScript.svelte +5 -3
- package/components/flows/pickers/PickHubScript.svelte.d.ts +2 -1
- package/components/flows/pickers/PickScript.svelte +4 -12
- package/components/flows/pickers/PickScript.svelte.d.ts +1 -1
- package/components/flows/propPicker/PropPickerWrapper.svelte +44 -0
- package/components/flows/propPicker/PropPickerWrapper.svelte.d.ts +33 -0
- package/components/flows/scheduleUtils.d.ts +0 -1
- package/components/flows/scheduleUtils.js +0 -1
- package/components/flows/types.d.ts +8 -0
- package/components/flows/types.js +1 -0
- package/components/flows/utils.d.ts +3 -1
- package/components/flows/utils.js +26 -10
- package/components/icons/AirtableIcon.svelte +1 -1
- package/components/icons/DiscordIcon.svelte +1 -1
- package/components/icons/GCloudIcon.svelte +1 -1
- package/components/icons/GItlabIcon.svelte +1 -1
- package/components/icons/GSheetsIcon.svelte +1 -1
- package/components/icons/GcalIcon.svelte +1 -1
- package/components/icons/GdriveIcon.svelte +1 -1
- package/components/icons/GithubIcon.svelte +1 -1
- package/components/icons/GmailIcon.svelte +1 -1
- package/components/icons/HatIcon.svelte +19 -0
- package/components/icons/HatIcon.svelte.d.ts +16 -0
- package/components/icons/MastodonIcon.svelte +1 -1
- package/components/icons/MatrixIcon.svelte +1 -1
- package/components/icons/PostgresIcon.svelte +1 -1
- package/components/icons/S3Icon.svelte +1 -1
- package/components/icons/Slack.svelte +1 -1
- package/components/icons/TogglIcon.svelte +8 -46
- package/components/jobs/JobDetail.svelte +1 -1
- package/components/landing/FlowGettingStarted.svelte +22 -68
- package/components/landing/FlowLandingBox.svelte +1 -1
- package/components/landing/RessourceGettingStarted.svelte +7 -37
- package/components/landing/ScriptBox.svelte +33 -60
- package/components/landing/ScriptGettingStarted.svelte +23 -69
- package/components/propertyPicker/ObjectViewer.svelte +18 -12
- package/components/propertyPicker/ObjectViewer.svelte.d.ts +1 -0
- package/components/propertyPicker/PropPicker.svelte +108 -11
- package/components/propertyPicker/WarningMessage.svelte +2 -15
- package/components/script_editor/LogPanel.svelte +108 -119
- package/components/script_editor/LogPanel.svelte.d.ts +2 -0
- package/components/sidebar/SidebarContent.svelte +2 -2
- package/editorUtils.d.ts +3 -0
- package/editorUtils.js +1 -0
- package/gen/core/OpenAPI.js +1 -1
- package/gen/index.d.ts +1 -0
- package/gen/models/CompletedJob.d.ts +2 -1
- package/gen/models/CompletedJob.js +1 -0
- package/gen/models/FlowModule.d.ts +3 -0
- package/gen/models/FlowStatus.d.ts +3 -0
- package/gen/models/FlowStatusModule.d.ts +1 -1
- package/gen/models/Preview.d.ts +2 -1
- package/gen/models/Preview.js +1 -0
- package/gen/models/QueuedJob.d.ts +2 -1
- package/gen/models/QueuedJob.js +1 -0
- package/gen/models/RawScript.d.ts +2 -1
- package/gen/models/RawScript.js +1 -0
- package/gen/models/Retry.d.ts +11 -0
- package/gen/models/Retry.js +4 -0
- package/gen/models/Script.d.ts +9 -2
- package/gen/models/Script.js +8 -0
- package/gen/services/JobService.d.ts +40 -0
- package/gen/services/JobService.js +70 -0
- package/gen/services/ScriptService.d.ts +14 -3
- package/gen/services/ScriptService.js +13 -0
- package/infer.d.ts +1 -1
- package/infer.js +6 -1
- package/package.json +71 -38
- package/script_helpers.d.ts +8 -2
- package/script_helpers.js +88 -16
- package/stores.d.ts +1 -1
- package/utils.d.ts +8 -6
- package/utils.js +57 -21
- package/components/FlowEditor.svelte +0 -55
- package/components/FlowPreview.svelte +0 -107
- package/components/FlowPreview.svelte.d.ts +0 -23
- package/components/ModuleStep.svelte +0 -131
- package/components/ModuleStep.svelte.d.ts +0 -25
- package/components/flows/CopyFirstStepSchema.svelte +0 -13
- package/components/flows/FlowBox.svelte +0 -16
- package/components/flows/FlowBox.svelte.d.ts +0 -23
- package/components/flows/FlowBoxHeader.svelte +0 -16
- package/components/flows/FlowBoxHeader.svelte.d.ts +0 -21
- package/components/flows/FlowInput.svelte +0 -22
- package/components/flows/FlowInputs.svelte +0 -65
- package/components/flows/FlowModuleHeader.svelte +0 -109
- package/components/flows/FlowSettings.svelte +0 -165
- package/components/flows/FlowTimeline.svelte +0 -169
- package/components/flows/FlowTimeline.svelte.d.ts +0 -21
- package/components/flows/stepOpenedStore.d.ts +0 -1
- package/components/flows/stepOpenedStore.js +0 -6
- package/components/propertyPicker/OverlayPropertyPicker.svelte +0 -69
- package/components/propertyPicker/OverlayPropertyPicker.svelte.d.ts +0 -24
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
<script>import Toggle from '../../Toggle.svelte';
|
|
2
|
+
export let flowModule;
|
|
3
|
+
function setConstantRetries() {
|
|
4
|
+
flowModule.retry = {
|
|
5
|
+
...flowModule.retry,
|
|
6
|
+
constant: {
|
|
7
|
+
attempts: 0,
|
|
8
|
+
seconds: 0
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
function setExpoentialRetries() {
|
|
13
|
+
flowModule.retry = {
|
|
14
|
+
...flowModule.retry,
|
|
15
|
+
exponential: {
|
|
16
|
+
attempts: 0,
|
|
17
|
+
multiplier: 1,
|
|
18
|
+
seconds: 0
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
$: isConstantRetryEnabled = Boolean(flowModule.retry?.constant);
|
|
23
|
+
$: isExponentialRetryEnabled = Boolean(flowModule.retry?.exponential);
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<div class="flex flex-col items-start space-y-1">
|
|
27
|
+
<Toggle
|
|
28
|
+
checked={isConstantRetryEnabled}
|
|
29
|
+
on:change={() => {
|
|
30
|
+
if (isConstantRetryEnabled && flowModule.retry?.constant) {
|
|
31
|
+
flowModule.retry.constant = undefined
|
|
32
|
+
} else {
|
|
33
|
+
setConstantRetries()
|
|
34
|
+
}
|
|
35
|
+
}}
|
|
36
|
+
options={{
|
|
37
|
+
right: 'Constant retry enabled'
|
|
38
|
+
}}
|
|
39
|
+
/>
|
|
40
|
+
{#if flowModule.retry?.constant}
|
|
41
|
+
<span class="text-xs font-bold">Attempts</span>
|
|
42
|
+
<input bind:value={flowModule.retry.constant.attempts} type="number" />
|
|
43
|
+
<span class="text-xs font-bold">Delay (seconds)</span>
|
|
44
|
+
<input bind:value={flowModule.retry.constant.seconds} type="number" />
|
|
45
|
+
{:else}
|
|
46
|
+
<span class="text-xs font-bold">Attempts</span>
|
|
47
|
+
<input type="number" disabled />
|
|
48
|
+
<span class="text-xs font-bold">Delay (seconds)</span>
|
|
49
|
+
<input type="number" disabled />
|
|
50
|
+
{/if}
|
|
51
|
+
|
|
52
|
+
<Toggle
|
|
53
|
+
checked={isExponentialRetryEnabled}
|
|
54
|
+
on:change={() => {
|
|
55
|
+
if (isExponentialRetryEnabled && flowModule.retry?.exponential) {
|
|
56
|
+
flowModule.retry.exponential = undefined
|
|
57
|
+
} else {
|
|
58
|
+
setExpoentialRetries()
|
|
59
|
+
}
|
|
60
|
+
}}
|
|
61
|
+
options={{
|
|
62
|
+
right: 'Exponential retry enabled'
|
|
63
|
+
}}
|
|
64
|
+
/>
|
|
65
|
+
{#if flowModule.retry?.exponential}
|
|
66
|
+
<span class="text-xs font-bold">Attempts</span>
|
|
67
|
+
<input bind:value={flowModule.retry.exponential.attempts} type="number" />
|
|
68
|
+
<span class="text-xs font-bold">Mulitplier</span>
|
|
69
|
+
<input bind:value={flowModule.retry.exponential.multiplier} type="number" />
|
|
70
|
+
<span class="text-xs font-bold">Initial delay (seconds)</span>
|
|
71
|
+
<input bind:value={flowModule.retry.exponential.seconds} type="number" />
|
|
72
|
+
{:else}
|
|
73
|
+
<span class="text-xs font-bold">Attempts</span>
|
|
74
|
+
<input type="number" disabled />
|
|
75
|
+
<span class="text-xs font-bold">Mulitplier</span>
|
|
76
|
+
<input type="number" disabled />
|
|
77
|
+
<span class="text-xs font-bold">Initial delay (seconds)</span>
|
|
78
|
+
<input type="number" disabled />
|
|
79
|
+
{/if}
|
|
80
|
+
</div>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import type { FlowModule } from '../../../gen';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
flowModule: FlowModule;
|
|
6
|
+
};
|
|
7
|
+
events: {
|
|
8
|
+
[evt: string]: CustomEvent<any>;
|
|
9
|
+
};
|
|
10
|
+
slots: {};
|
|
11
|
+
};
|
|
12
|
+
export declare type FlowRetriesProps = typeof __propDef.props;
|
|
13
|
+
export declare type FlowRetriesEvents = typeof __propDef.events;
|
|
14
|
+
export declare type FlowRetriesSlots = typeof __propDef.slots;
|
|
15
|
+
export default class FlowRetries extends SvelteComponentTyped<FlowRetriesProps, FlowRetriesEvents, FlowRetriesSlots> {
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<script>import CronInput from '../../CronInput.svelte';
|
|
2
|
+
import SchemaForm from '../../SchemaForm.svelte';
|
|
3
|
+
import Toggle from '../../Toggle.svelte';
|
|
4
|
+
import { getContext } from 'svelte';
|
|
5
|
+
import { flowStore } from '../flowStore';
|
|
6
|
+
const { schedule } = getContext('FlowEditorContext');
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<CronInput bind:schedule={$schedule.cron} />
|
|
10
|
+
|
|
11
|
+
<SchemaForm schema={$flowStore.schema} bind:args={$schedule.args} />
|
|
12
|
+
|
|
13
|
+
<Toggle
|
|
14
|
+
bind:checked={$schedule.enabled}
|
|
15
|
+
options={{
|
|
16
|
+
right: 'Schedule enabled'
|
|
17
|
+
}}
|
|
18
|
+
/>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {};
|
|
4
|
+
events: {
|
|
5
|
+
[evt: string]: CustomEvent<any>;
|
|
6
|
+
};
|
|
7
|
+
slots: {};
|
|
8
|
+
};
|
|
9
|
+
export declare type FlowSchedulesProps = typeof __propDef.props;
|
|
10
|
+
export declare type FlowSchedulesEvents = typeof __propDef.events;
|
|
11
|
+
export declare type FlowSchedulesSlots = typeof __propDef.slots;
|
|
12
|
+
export default class FlowSchedules extends SvelteComponentTyped<FlowSchedulesProps, FlowSchedulesEvents, FlowSchedulesSlots> {
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
<script>import Tabs from '../../common/tabs/Tabs.svelte';
|
|
2
|
+
import Tab from '../../common/tabs/Tab.svelte';
|
|
3
|
+
import TabContent from '../../common/tabs/TabContent.svelte';
|
|
4
|
+
import { flowStore } from '../flowStore';
|
|
5
|
+
import Path from '../../Path.svelte';
|
|
6
|
+
import Required from '../../Required.svelte';
|
|
7
|
+
import FlowCard from '../common/FlowCard.svelte';
|
|
8
|
+
import FlowSchedules from './FlowSchedules.svelte';
|
|
9
|
+
import SvelteMarkdown from 'svelte-markdown';
|
|
10
|
+
export let initialPath;
|
|
11
|
+
export let defaultTab = 'metadata';
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<FlowCard title="Settings">
|
|
15
|
+
<Tabs selected={defaultTab}>
|
|
16
|
+
<Tab value="metadata">Metadata</Tab>
|
|
17
|
+
<Tab value="schedule">Schedule</Tab>
|
|
18
|
+
|
|
19
|
+
<svelte:fragment slot="content">
|
|
20
|
+
<TabContent value="metadata" class="p-4">
|
|
21
|
+
<Path bind:path={$flowStore.path} {initialPath} namePlaceholder="my_flow" kind="flow">
|
|
22
|
+
<div slot="ownerToolkit">
|
|
23
|
+
Flow permissions depend on their path. Select the group <span class="font-mono"
|
|
24
|
+
>all</span
|
|
25
|
+
>
|
|
26
|
+
to share your flow, and <span class="font-mono">user</span> to keep it private.
|
|
27
|
+
<a href="https://docs.windmill.dev/docs/reference/namespaces">docs</a>
|
|
28
|
+
</div>
|
|
29
|
+
</Path>
|
|
30
|
+
|
|
31
|
+
<label class="block my-4">
|
|
32
|
+
<span class="text-gray-700">Summary <Required required={false} /></span>
|
|
33
|
+
<textarea
|
|
34
|
+
bind:value={$flowStore.summary}
|
|
35
|
+
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50"
|
|
36
|
+
placeholder="A very short summary of the flow displayed when the flow is listed"
|
|
37
|
+
rows="1"
|
|
38
|
+
id="flow-summary"
|
|
39
|
+
/>
|
|
40
|
+
</label>
|
|
41
|
+
|
|
42
|
+
<label class="block my-4" for="inp">
|
|
43
|
+
<span class="text-gray-700"
|
|
44
|
+
>Description<Required required={false} detail="accept markdown formatting" />
|
|
45
|
+
<textarea
|
|
46
|
+
id="inp"
|
|
47
|
+
bind:value={$flowStore.description}
|
|
48
|
+
class="
|
|
49
|
+
mt-1
|
|
50
|
+
block
|
|
51
|
+
w-full
|
|
52
|
+
rounded-md
|
|
53
|
+
border-gray-300
|
|
54
|
+
shadow-sm
|
|
55
|
+
focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50
|
|
56
|
+
"
|
|
57
|
+
placeholder="A description to help users understand what this script does and how to use it."
|
|
58
|
+
rows="3"
|
|
59
|
+
/>
|
|
60
|
+
</span>
|
|
61
|
+
</label>
|
|
62
|
+
|
|
63
|
+
<div>
|
|
64
|
+
<h3 class="text-gray-700 ">Description rendered</h3>
|
|
65
|
+
<div
|
|
66
|
+
class="prose mt-5 text-xs shadow-inner shadow-blue p-4 overflow-auto"
|
|
67
|
+
style="max-height: 200px;"
|
|
68
|
+
>
|
|
69
|
+
<SvelteMarkdown source={$flowStore.description ?? ''} />
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
</TabContent>
|
|
73
|
+
<TabContent value="schedule" class="p-4">
|
|
74
|
+
<FlowSchedules />
|
|
75
|
+
</TabContent>
|
|
76
|
+
</svelte:fragment>
|
|
77
|
+
</Tabs>
|
|
78
|
+
</FlowCard>
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
previewArgs?: Record<string, any> | undefined;
|
|
7
|
-
scheduleArgs?: Record<string, any> | undefined;
|
|
8
|
-
scheduleEnabled?: boolean | undefined;
|
|
9
|
-
scheduleCron?: string | undefined;
|
|
4
|
+
initialPath: string;
|
|
5
|
+
defaultTab?: string | undefined;
|
|
10
6
|
};
|
|
11
7
|
events: {
|
|
12
8
|
[evt: string]: CustomEvent<any>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<script>import Alert from '../../common/alert/Alert.svelte';
|
|
2
|
+
import Badge from '../../common/badge/Badge.svelte';
|
|
3
|
+
import ConfirmationModal from '../../common/confirmationModal/ConfirmationModal.svelte';
|
|
4
|
+
import { createEventDispatcher } from 'svelte';
|
|
5
|
+
export let open;
|
|
6
|
+
const dispatch = createEventDispatcher();
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<ConfirmationModal
|
|
10
|
+
{open}
|
|
11
|
+
title="Remove step"
|
|
12
|
+
confirmationText="Remove"
|
|
13
|
+
on:canceled={() => {
|
|
14
|
+
open = false
|
|
15
|
+
dispatch('canceled')
|
|
16
|
+
}}
|
|
17
|
+
on:confirmed={() => {
|
|
18
|
+
open = false
|
|
19
|
+
dispatch('confirmed')
|
|
20
|
+
}}
|
|
21
|
+
>
|
|
22
|
+
<div class="flex flex-col w-full space-y-4">
|
|
23
|
+
<span>Are you sure you want to remove this step?</span>
|
|
24
|
+
<Alert type="info" title="Bypass confirmation">
|
|
25
|
+
<div>
|
|
26
|
+
You can press
|
|
27
|
+
<kbd color="dark-gray">SHIFT</kbd>
|
|
28
|
+
while removing a step to bypass confirmation.
|
|
29
|
+
</div>
|
|
30
|
+
</Alert>
|
|
31
|
+
</div>
|
|
32
|
+
</ConfirmationModal>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
open: boolean;
|
|
5
|
+
};
|
|
6
|
+
events: {
|
|
7
|
+
canceled: CustomEvent<any>;
|
|
8
|
+
confirmed: CustomEvent<any>;
|
|
9
|
+
} & {
|
|
10
|
+
[evt: string]: CustomEvent<any>;
|
|
11
|
+
};
|
|
12
|
+
slots: {};
|
|
13
|
+
};
|
|
14
|
+
export declare type RemoveStepConfirmationModalProps = typeof __propDef.props;
|
|
15
|
+
export declare type RemoveStepConfirmationModalEvents = typeof __propDef.events;
|
|
16
|
+
export declare type RemoveStepConfirmationModalSlots = typeof __propDef.slots;
|
|
17
|
+
export default class RemoveStepConfirmationModal extends SvelteComponentTyped<RemoveStepConfirmationModalProps, RemoveStepConfirmationModalEvents, RemoveStepConfirmationModalSlots> {
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import type { Schema } from '../../common';
|
|
2
2
|
import type { Flow, FlowModule } from '../../gen';
|
|
3
|
-
export declare type
|
|
4
|
-
flowModule: FlowModule;
|
|
3
|
+
export declare type FlowModuleState = {
|
|
5
4
|
schema: Schema;
|
|
6
|
-
childFlowModules?:
|
|
5
|
+
childFlowModules?: FlowModuleState[];
|
|
6
|
+
previewArgs?: any;
|
|
7
7
|
previewResult?: any;
|
|
8
8
|
};
|
|
9
|
-
export declare type FlowState =
|
|
9
|
+
export declare type FlowState = {
|
|
10
|
+
modules: FlowModuleState[];
|
|
11
|
+
failureModule: FlowModuleState;
|
|
12
|
+
};
|
|
10
13
|
export declare const flowStateStore: import("svelte/store").Writable<FlowState>;
|
|
11
14
|
export declare function initFlowState(flow: Flow): Promise<void>;
|
|
12
|
-
export declare
|
|
13
|
-
export declare function flowModulesToFlowState(flowModules: FlowModule[]): Promise<FlowState>;
|
|
14
|
-
export declare function flowStateToFlow(flowState: FlowState, flow: Flow): Flow;
|
|
15
|
+
export declare function mapFlowModules(flowModules: FlowModule[]): Promise<FlowModuleState[]>;
|
|
@@ -1,52 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
export const flowStateStore = writable(
|
|
1
|
+
import { writable } from 'svelte/store';
|
|
2
|
+
import { emptyFlowModuleState, isEmptyFlowModule, loadFlowModuleSchema } from './flowStateUtils';
|
|
3
|
+
export const flowStateStore = writable({ modules: [], failureModule: emptyFlowModuleState() });
|
|
4
4
|
export async function initFlowState(flow) {
|
|
5
|
-
const
|
|
6
|
-
|
|
5
|
+
const modules = await mapFlowModules(flow.value.modules);
|
|
6
|
+
const failureModule = flow.value.failure_module
|
|
7
|
+
? await mapFlowModule(flow.value.failure_module)
|
|
8
|
+
: emptyFlowModuleState();
|
|
9
|
+
flowStateStore.set({
|
|
10
|
+
modules,
|
|
11
|
+
failureModule
|
|
12
|
+
});
|
|
7
13
|
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
async function mapFlowModule(flowModule) {
|
|
15
|
+
const value = flowModule.value;
|
|
16
|
+
if (value.type === 'forloopflow') {
|
|
17
|
+
const childFlowModules = await Promise.all(value.modules.map(async (module) => loadFlowModuleSchema(module)));
|
|
18
|
+
const loopFlowModule = await loadFlowModuleSchema(flowModule);
|
|
19
|
+
return {
|
|
20
|
+
...loopFlowModule,
|
|
21
|
+
childFlowModules
|
|
22
|
+
};
|
|
16
23
|
}
|
|
17
|
-
|
|
18
|
-
return
|
|
24
|
+
if (isEmptyFlowModule(flowModule)) {
|
|
25
|
+
return emptyFlowModuleState();
|
|
19
26
|
}
|
|
20
|
-
|
|
21
|
-
export async function flowModulesToFlowState(flowModules) {
|
|
22
|
-
return Promise.all(flowModules.map(async (flowModule) => {
|
|
23
|
-
const value = flowModule.value;
|
|
24
|
-
if (value.type === 'forloopflow') {
|
|
25
|
-
const childFlowModules = await Promise.all(value.modules.map(async (module) => loadFlowModuleSchema(module)));
|
|
26
|
-
const loopFlowModule = await loadFlowModuleSchema(flowModule);
|
|
27
|
-
return {
|
|
28
|
-
...loopFlowModule,
|
|
29
|
-
childFlowModules
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
if (isEmptyFlowModule(flowModule)) {
|
|
33
|
-
return emptyFlowModuleSchema();
|
|
34
|
-
}
|
|
35
|
-
return loadFlowModuleSchema(flowModule);
|
|
36
|
-
}));
|
|
27
|
+
return loadFlowModuleSchema(flowModule);
|
|
37
28
|
}
|
|
38
|
-
export function
|
|
39
|
-
|
|
40
|
-
return flow;
|
|
41
|
-
}
|
|
42
|
-
const modules = flowState.map(({ flowModule, childFlowModules }) => {
|
|
43
|
-
const fmv = flowModule.value;
|
|
44
|
-
if (fmv.type === 'forloopflow' && childFlowModules && Array.isArray(childFlowModules)) {
|
|
45
|
-
fmv.modules = childFlowModules.map((cfm) => cfm.flowModule);
|
|
46
|
-
flowModule.value = fmv;
|
|
47
|
-
}
|
|
48
|
-
return flowModule;
|
|
49
|
-
});
|
|
50
|
-
flow.value.modules = modules;
|
|
51
|
-
return flow;
|
|
29
|
+
export async function mapFlowModules(flowModules) {
|
|
30
|
+
return Promise.all(flowModules.map(async (flowModule) => mapFlowModule(flowModule)));
|
|
52
31
|
}
|
|
@@ -1,37 +1,39 @@
|
|
|
1
1
|
import type { Schema } from '../../common';
|
|
2
|
-
import { Job, type FlowModule, type RawScript } from '../../gen';
|
|
3
|
-
import { type
|
|
4
|
-
export declare function
|
|
5
|
-
export declare function loadFlowModuleSchema(flowModule: FlowModule): Promise<
|
|
6
|
-
export declare function pickScript(path: string): Promise<
|
|
7
|
-
export declare function createInlineScriptModule({ language,
|
|
2
|
+
import { Job, Script, type FlowModule, type RawScript } from '../../gen';
|
|
3
|
+
import { type FlowModuleState, type FlowState } from './flowState';
|
|
4
|
+
export declare function emptyFlowModuleState(): FlowModuleState;
|
|
5
|
+
export declare function loadFlowModuleSchema(flowModule: FlowModule): Promise<FlowModuleState>;
|
|
6
|
+
export declare function pickScript(path: string): Promise<[FlowModule, FlowModuleState]>;
|
|
7
|
+
export declare function createInlineScriptModule({ language, kind, subkind }: {
|
|
8
8
|
language: RawScript.language;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export declare function
|
|
9
|
+
kind: Script.kind;
|
|
10
|
+
subkind: 'pgsql' | 'flow';
|
|
11
|
+
}): Promise<[FlowModule, FlowModuleState]>;
|
|
12
|
+
export declare function createLoop(): Promise<[FlowModule, FlowModuleState]>;
|
|
13
|
+
export declare function fork(flowModule: FlowModule): Promise<[FlowModule, FlowModuleState]>;
|
|
13
14
|
export declare function createInlineScriptModuleFromPath(path: string): Promise<FlowModule>;
|
|
14
15
|
export declare function createScriptFromInlineScript({ flowModule, suffix, schema }: {
|
|
15
16
|
flowModule: FlowModule;
|
|
16
17
|
suffix: string;
|
|
17
18
|
schema: Schema;
|
|
18
|
-
}): Promise<
|
|
19
|
+
}): Promise<[FlowModule, FlowModuleState]>;
|
|
19
20
|
export declare function isEmptyFlowModule(flowModule: FlowModule): boolean;
|
|
20
21
|
declare type Result = any;
|
|
21
22
|
declare type PickableProperties = {
|
|
22
23
|
flow_input?: Object;
|
|
23
24
|
previous_result: Result | undefined;
|
|
24
|
-
step
|
|
25
|
+
step?: Result[];
|
|
25
26
|
};
|
|
26
27
|
declare type StepPropPicker = {
|
|
27
28
|
pickableProperties: PickableProperties;
|
|
28
29
|
extraLib: string;
|
|
29
30
|
};
|
|
31
|
+
export declare const NEVER_TESTED_THIS_FAR = "never tested this far";
|
|
30
32
|
export declare function getStepPropPicker(indexes: number[], flowInputSchema: Schema, flowState: FlowState, args: Record<string, any>): StepPropPicker;
|
|
31
33
|
export declare type JobResult = {
|
|
32
34
|
job?: Job;
|
|
33
|
-
innerJobs
|
|
35
|
+
innerJobs: JobResult[];
|
|
34
36
|
loopJobs?: JobResult[];
|
|
35
37
|
};
|
|
36
|
-
export declare function mapJobResultsToFlowState(jobs: JobResult,
|
|
38
|
+
export declare function mapJobResultsToFlowState(jobs: JobResult, upto: number): void;
|
|
37
39
|
export {};
|