windmill-components 1.35.1 → 1.35.43
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/ArgInput.svelte +21 -21
- package/components/ArgInput.svelte.d.ts +3 -3
- package/components/DisplayResult.svelte +73 -67
- package/components/Editor.svelte +184 -246
- package/components/Editor.svelte.d.ts +4 -4
- package/components/EditorBar.svelte +58 -45
- package/components/EditorBar.svelte.d.ts +2 -1
- package/components/FlowBuilder.svelte +113 -121
- package/components/FlowJobResult.svelte +4 -5
- package/components/FlowModulesViewer.svelte +89 -7
- package/components/FlowModulesViewer.svelte.d.ts +1 -0
- package/components/FlowPreviewContent.svelte +56 -15
- package/components/FlowPreviewContent.svelte.d.ts +1 -1
- package/components/FlowStatusViewer.svelte +42 -24
- package/components/FlowStatusViewer.svelte.d.ts +0 -1
- package/components/FlowViewer.svelte +7 -3
- package/components/HighlightCode.svelte +21 -0
- package/components/HighlightCode.svelte.d.ts +17 -0
- package/components/IconedPath.svelte +9 -7
- package/components/IconedResourceType.svelte +1 -1
- package/components/InputTransformForm.svelte +88 -107
- package/components/InputTransformForm.svelte.d.ts +0 -1
- package/components/ItemPicker.svelte +2 -2
- package/components/LogViewer.svelte +23 -0
- package/components/LogViewer.svelte.d.ts +19 -0
- package/components/ModulePreview.svelte +108 -0
- package/components/ModulePreview.svelte.d.ts +24 -0
- package/components/RunForm.svelte +29 -18
- package/components/RunForm.svelte.d.ts +6 -2
- package/components/SchemaEditor.svelte +5 -3
- package/components/SchemaForm.svelte +0 -2
- package/components/SchemaForm.svelte.d.ts +0 -1
- package/components/ScriptBuilder.svelte +77 -66
- package/components/ScriptBuilder.svelte.d.ts +2 -4
- package/components/ScriptEditor.svelte +69 -142
- package/components/ScriptEditor.svelte.d.ts +0 -5
- package/components/ScriptPicker.svelte +3 -3
- package/components/ScriptPicker.svelte.d.ts +2 -1
- package/components/SharedBadge.svelte +5 -13
- package/components/SimpleEditor.svelte +147 -0
- package/components/SimpleEditor.svelte.d.ts +35 -0
- package/components/TestJobLoader.svelte +98 -0
- package/components/TestJobLoader.svelte.d.ts +26 -0
- package/components/Tooltip.svelte +2 -1
- package/components/common/actionRow/ActionRow.svelte +26 -0
- package/components/common/actionRow/ActionRow.svelte.d.ts +21 -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 +82 -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 +107 -0
- package/components/common/button/Button.svelte.d.ts +37 -0
- package/components/common/button/model.d.ts +6 -0
- package/components/common/button/model.js +1 -0
- package/components/common/confirmationModal/ConfirmationModal.svelte +55 -0
- package/components/common/confirmationModal/ConfirmationModal.svelte.d.ts +23 -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 -8
- 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 +26 -0
- package/components/flows/content/FlowEditorPanel.svelte.d.ts +14 -0
- package/components/flows/content/FlowFailureModule.svelte +17 -0
- package/components/flows/content/FlowFailureModule.svelte.d.ts +14 -0
- package/components/flows/content/FlowInput.svelte +22 -0
- package/components/flows/{FlowInput.svelte.d.ts → content/FlowInput.svelte.d.ts} +0 -0
- package/components/flows/{FlowInputs.svelte → content/FlowInputs.svelte} +24 -13
- package/components/flows/{FlowInputs.svelte.d.ts → content/FlowInputs.svelte.d.ts} +0 -0
- package/components/flows/content/FlowLoop.svelte +38 -0
- package/components/flows/content/FlowLoop.svelte.d.ts +14 -0
- package/components/flows/content/FlowModule.svelte +190 -0
- package/components/flows/content/FlowModule.svelte.d.ts +29 -0
- package/components/flows/content/FlowModuleAdvancedSettings.svelte +64 -0
- package/components/flows/content/FlowModuleAdvancedSettings.svelte.d.ts +17 -0
- package/components/flows/content/FlowModuleHeader.svelte +68 -0
- package/components/flows/{FlowModuleHeader.svelte.d.ts → content/FlowModuleHeader.svelte.d.ts} +2 -3
- package/components/flows/content/FlowModuleScript.svelte +21 -0
- package/components/flows/content/FlowModuleScript.svelte.d.ts +17 -0
- package/components/flows/content/FlowModuleWrapper.svelte +47 -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 +14 -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 +51 -0
- package/components/flows/{FlowSettings.svelte.d.ts → content/FlowSettings.svelte.d.ts} +1 -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 +15 -13
- package/components/flows/flowStateUtils.js +80 -72
- package/components/flows/flowStore.js +7 -4
- package/components/flows/header/FlowEditorHeader.svelte +23 -0
- package/components/flows/header/FlowEditorHeader.svelte.d.ts +14 -0
- package/components/flows/header/FlowImportExportMenu.svelte +56 -0
- package/components/flows/header/FlowImportExportMenu.svelte.d.ts +14 -0
- package/components/flows/header/FlowPreviewButtons.svelte +49 -0
- package/components/flows/header/FlowPreviewButtons.svelte.d.ts +14 -0
- package/components/flows/header/FlowStatus.svelte +36 -0
- package/components/flows/header/FlowStatus.svelte.d.ts +14 -0
- package/components/flows/map/FlowErrorHandlerItem.svelte +54 -0
- package/components/flows/map/FlowErrorHandlerItem.svelte.d.ts +14 -0
- package/components/flows/map/FlowModuleSchemaItem.svelte +58 -0
- package/components/flows/map/FlowModuleSchemaItem.svelte.d.ts +27 -0
- package/components/flows/map/FlowModuleSchemaMap.svelte +161 -0
- package/components/flows/map/FlowModuleSchemaMap.svelte.d.ts +20 -0
- package/components/flows/pickers/PickHubScript.svelte +4 -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 +42 -0
- package/components/flows/propPicker/PropPickerWrapper.svelte.d.ts +31 -0
- package/components/flows/scheduleUtils.d.ts +0 -1
- package/components/flows/scheduleUtils.js +0 -1
- package/components/flows/types.d.ts +9 -0
- package/components/flows/types.js +1 -0
- package/components/flows/utils.d.ts +1 -1
- package/components/flows/utils.js +8 -11
- package/components/icons/HatIcon.svelte +19 -0
- package/components/icons/HatIcon.svelte.d.ts +16 -0
- 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 +16 -7
- package/components/propertyPicker/PropPicker.svelte +38 -12
- 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 +25 -0
- package/editorUtils.js +43 -0
- package/gen/models/CompletedJob.d.ts +2 -1
- package/gen/models/CompletedJob.js +1 -0
- package/gen/models/FlowModule.d.ts +1 -0
- package/gen/models/FlowStatus.d.ts +3 -0
- package/gen/models/FlowStatusModule.d.ts +1 -1
- package/gen/models/FlowValue.d.ts +11 -0
- 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/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 +67 -35
- package/script_helpers.d.ts +5 -2
- package/script_helpers.js +41 -13
- package/stores.d.ts +1 -1
- package/utils.d.ts +6 -4
- package/utils.js +27 -4
- 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/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,20 @@
|
|
|
1
|
+
<script>import { classNames } from '../../../utils';
|
|
2
|
+
import { getContext } from 'svelte';
|
|
3
|
+
export let value;
|
|
4
|
+
export let position;
|
|
5
|
+
const { select, selected } = getContext('ToggleButtonGroup');
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<button
|
|
9
|
+
type="button"
|
|
10
|
+
on:click={() => select(value)}
|
|
11
|
+
class={classNames(
|
|
12
|
+
'py-1 px-2 text-sm font-medium border-gray-200 ',
|
|
13
|
+
position === 'left' ? 'rounded-l-lg border' : '',
|
|
14
|
+
position === 'center' ? 'border-t border-b' : '',
|
|
15
|
+
position === 'right' ? 'rounded-r-md border border-l-0' : '',
|
|
16
|
+
$selected.includes(value) ? 'text-white bg-gray-900 ' : 'text-gray-900 bg-white '
|
|
17
|
+
)}
|
|
18
|
+
>
|
|
19
|
+
<slot />
|
|
20
|
+
</button>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
value: string;
|
|
5
|
+
position: 'left' | 'center' | 'right';
|
|
6
|
+
};
|
|
7
|
+
events: {
|
|
8
|
+
[evt: string]: CustomEvent<any>;
|
|
9
|
+
};
|
|
10
|
+
slots: {
|
|
11
|
+
default: {};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export declare type ToggleButtonProps = typeof __propDef.props;
|
|
15
|
+
export declare type ToggleButtonEvents = typeof __propDef.events;
|
|
16
|
+
export declare type ToggleButtonSlots = typeof __propDef.slots;
|
|
17
|
+
export default class ToggleButton extends SvelteComponentTyped<ToggleButtonProps, ToggleButtonEvents, ToggleButtonSlots> {
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<script context="module">export {};
|
|
2
|
+
</script>
|
|
3
|
+
|
|
4
|
+
<script>import { setContext } from 'svelte';
|
|
5
|
+
import { writable } from 'svelte/store';
|
|
6
|
+
export let exclusive = true;
|
|
7
|
+
export let selected = [];
|
|
8
|
+
const selectedContent = writable(selected);
|
|
9
|
+
setContext('ToggleButtonGroup', {
|
|
10
|
+
selected: selectedContent,
|
|
11
|
+
select: (value) => {
|
|
12
|
+
if (exclusive) {
|
|
13
|
+
selectedContent.set([value]);
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
selectedContent.update((selected) => {
|
|
17
|
+
const index = selected.findIndex((val) => val === value);
|
|
18
|
+
if (index !== -1) {
|
|
19
|
+
selected.splice(index, 1);
|
|
20
|
+
return selected;
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
return [value, ...selected];
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<div class="inline-flex rounded-md shadow-sm" role="group">
|
|
32
|
+
<slot />
|
|
33
|
+
</div>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
export declare type ToggleButtonContext = {
|
|
3
|
+
selected: Writable<string[]>;
|
|
4
|
+
select: (value: string) => void;
|
|
5
|
+
};
|
|
6
|
+
import { type Writable } from 'svelte/store';
|
|
7
|
+
declare const __propDef: {
|
|
8
|
+
props: {
|
|
9
|
+
exclusive?: boolean | undefined;
|
|
10
|
+
selected?: string[] | undefined;
|
|
11
|
+
};
|
|
12
|
+
events: {
|
|
13
|
+
[evt: string]: CustomEvent<any>;
|
|
14
|
+
};
|
|
15
|
+
slots: {
|
|
16
|
+
default: {};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export declare type ToggleButtonGroupProps = typeof __propDef.props;
|
|
20
|
+
export declare type ToggleButtonGroupEvents = typeof __propDef.events;
|
|
21
|
+
export declare type ToggleButtonGroupSlots = typeof __propDef.slots;
|
|
22
|
+
export default class ToggleButtonGroup extends SvelteComponentTyped<ToggleButtonGroupProps, ToggleButtonGroupEvents, ToggleButtonGroupSlots> {
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<!-- Flow Editor: Top level component -->
|
|
2
|
+
<script>import { HSplitPane } from 'svelte-split-pane';
|
|
3
|
+
import FlowEditorHeader from './header/FlowEditorHeader.svelte';
|
|
4
|
+
import FlowEditorPanel from './content/FlowEditorPanel.svelte';
|
|
5
|
+
import FlowModuleSchemaMap from './map/FlowModuleSchemaMap.svelte';
|
|
6
|
+
import { flowStore } from './flowStore';
|
|
7
|
+
import { flowStateStore } from './flowState';
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<FlowEditorHeader />
|
|
11
|
+
|
|
12
|
+
<div class="h-full overflow-hidden">
|
|
13
|
+
<HSplitPane leftPaneSize="25%" rightPaneSize="75%" minLeftPaneSize="20%" minRightPaneSize="40%">
|
|
14
|
+
<left slot="left" class="h-full ">
|
|
15
|
+
<div class="h-full overflow-auto p-4 bg-gray-50">
|
|
16
|
+
{#if $flowStore.value.modules && $flowStateStore.modules}
|
|
17
|
+
<FlowModuleSchemaMap
|
|
18
|
+
bind:modules={$flowStore.value.modules}
|
|
19
|
+
bind:moduleStates={$flowStateStore.modules}
|
|
20
|
+
/>
|
|
21
|
+
{/if}
|
|
22
|
+
</div>
|
|
23
|
+
</left>
|
|
24
|
+
<right slot="right" class="h-full">
|
|
25
|
+
<div class="h-full overflow-auto bg-white ">
|
|
26
|
+
<FlowEditorPanel />
|
|
27
|
+
</div>
|
|
28
|
+
</right>
|
|
29
|
+
</HSplitPane>
|
|
30
|
+
</div>
|
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
2
|
declare const __propDef: {
|
|
3
|
-
props: {
|
|
4
|
-
pathError?: string | undefined;
|
|
5
|
-
initialPath?: string | undefined;
|
|
6
|
-
scheduleArgs?: Record<string, any> | undefined;
|
|
7
|
-
scheduleEnabled?: boolean | undefined;
|
|
8
|
-
scheduleCron?: string | undefined;
|
|
9
|
-
previewArgs?: Record<string, any> | undefined;
|
|
10
|
-
};
|
|
3
|
+
props: {};
|
|
11
4
|
events: {
|
|
12
5
|
[evt: string]: CustomEvent<any>;
|
|
13
6
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import type { FlowModule } from '../../../gen';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
title?: string | undefined;
|
|
6
|
+
flowModule?: FlowModule | undefined;
|
|
7
|
+
};
|
|
8
|
+
events: {
|
|
9
|
+
[evt: string]: CustomEvent<any>;
|
|
10
|
+
};
|
|
11
|
+
slots: {
|
|
12
|
+
header: {};
|
|
13
|
+
default: {};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export declare type FlowCardProps = typeof __propDef.props;
|
|
17
|
+
export declare type FlowCardEvents = typeof __propDef.events;
|
|
18
|
+
export declare type FlowCardSlots = typeof __propDef.slots;
|
|
19
|
+
export default class FlowCard extends SvelteComponentTyped<FlowCardProps, FlowCardEvents, FlowCardSlots> {
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<script>import Badge from '../../common/badge/Badge.svelte';
|
|
2
|
+
import IconedPath from '../../IconedPath.svelte';
|
|
3
|
+
import { RawScript } from '../../../gen';
|
|
4
|
+
import { isEmptyFlowModule } from '../flowStateUtils';
|
|
5
|
+
export let flowModule = undefined;
|
|
6
|
+
export let title = undefined;
|
|
7
|
+
$: shouldPick = flowModule && isEmptyFlowModule(flowModule);
|
|
8
|
+
const languageColors = {
|
|
9
|
+
[RawScript.language.GO]: 'dark-indigo',
|
|
10
|
+
[RawScript.language.DENO]: 'dark-blue',
|
|
11
|
+
[RawScript.language.PYTHON3]: 'dark-green'
|
|
12
|
+
};
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<div
|
|
16
|
+
class="flex items-center justify-between py-2 px-4 border-b bg-gray-50 shadow-sm space-x-2 h-12 flex-nowrap"
|
|
17
|
+
>
|
|
18
|
+
{#if flowModule}
|
|
19
|
+
<span class="text-sm w-full">
|
|
20
|
+
<div class="flex items-center space-x-2">
|
|
21
|
+
{#if shouldPick}
|
|
22
|
+
<span class="font-bold text-xs">Select a script</span>
|
|
23
|
+
{:else if flowModule?.value.type === 'rawscript'}
|
|
24
|
+
<Badge color={languageColors[flowModule?.value.language] ?? 'gray'} capitalize>
|
|
25
|
+
{flowModule?.value.language}
|
|
26
|
+
</Badge>
|
|
27
|
+
<input bind:value={flowModule.summary} placeholder={'Summary'} />
|
|
28
|
+
{:else if flowModule?.value.type === 'script' && 'path' in flowModule.value && flowModule.value.path}
|
|
29
|
+
<IconedPath path={flowModule.value.path} />
|
|
30
|
+
<input bind:value={flowModule.summary} placeholder="Summary" class="ml-2" />
|
|
31
|
+
{/if}
|
|
32
|
+
</div>
|
|
33
|
+
</span>
|
|
34
|
+
{/if}
|
|
35
|
+
{#if title}
|
|
36
|
+
<span class="text-xs font-bold text-gray-900 flex flex-col">{title}</span>
|
|
37
|
+
{/if}
|
|
38
|
+
<slot />
|
|
39
|
+
</div>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import { type FlowModule } from '../../../gen';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
flowModule?: FlowModule | undefined;
|
|
6
|
+
title?: string | undefined;
|
|
7
|
+
};
|
|
8
|
+
events: {
|
|
9
|
+
[evt: string]: CustomEvent<any>;
|
|
10
|
+
};
|
|
11
|
+
slots: {
|
|
12
|
+
default: {};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export declare type FlowCardHeaderProps = typeof __propDef.props;
|
|
16
|
+
export declare type FlowCardHeaderEvents = typeof __propDef.events;
|
|
17
|
+
export declare type FlowCardHeaderSlots = typeof __propDef.slots;
|
|
18
|
+
export default class FlowCardHeader extends SvelteComponentTyped<FlowCardHeaderProps, FlowCardHeaderEvents, FlowCardHeaderSlots> {
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<script>import { Button } from 'flowbite-svelte';
|
|
2
|
+
import { isEmptyFlowModule } from '../flowStateUtils';
|
|
3
|
+
import { copyFirstStepSchema, flowStore } from '../flowStore';
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<Button
|
|
7
|
+
color="light"
|
|
8
|
+
size="xs"
|
|
9
|
+
disabled={$flowStore.value.modules.length === 0 || isEmptyFlowModule($flowStore.value.modules[0])}
|
|
10
|
+
on:click={copyFirstStepSchema}
|
|
11
|
+
>
|
|
12
|
+
Copy from first step schema
|
|
13
|
+
</Button>
|
package/components/flows/{CopyFirstStepSchema.svelte.d.ts → content/CopyFirstStepSchema.svelte.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
package/components/flows/{DynamicInputHelpBox.svelte.d.ts → content/DynamicInputHelpBox.svelte.d.ts}
RENAMED
|
File without changes
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script>import { getContext } from 'svelte';
|
|
2
|
+
import FlowModuleWrapper from './FlowModuleWrapper.svelte';
|
|
3
|
+
import FlowSettings from './FlowSettings.svelte';
|
|
4
|
+
import FlowInput from './FlowInput.svelte';
|
|
5
|
+
import FlowLoop from './FlowLoop.svelte';
|
|
6
|
+
import FlowFailureModule from './FlowFailureModule.svelte';
|
|
7
|
+
const { selectedId } = getContext('FlowEditorContext');
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
{#key $selectedId}
|
|
11
|
+
{#if $selectedId === 'settings'}
|
|
12
|
+
<FlowSettings />
|
|
13
|
+
{:else if $selectedId === 'settings-schedule'}
|
|
14
|
+
<FlowSettings defaultTab="schedule" />
|
|
15
|
+
{:else if $selectedId === 'settings-retries'}
|
|
16
|
+
<FlowSettings defaultTab="retries" />
|
|
17
|
+
{:else if $selectedId.includes('loop')}
|
|
18
|
+
<FlowLoop />
|
|
19
|
+
{:else if $selectedId === 'inputs'}
|
|
20
|
+
<FlowInput />
|
|
21
|
+
{:else if $selectedId === 'failure'}
|
|
22
|
+
<FlowFailureModule />
|
|
23
|
+
{:else}
|
|
24
|
+
<FlowModuleWrapper />
|
|
25
|
+
{/if}
|
|
26
|
+
{/key}
|
|
@@ -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 FlowEditorPanelProps = typeof __propDef.props;
|
|
10
|
+
export declare type FlowEditorPanelEvents = typeof __propDef.events;
|
|
11
|
+
export declare type FlowEditorPanelSlots = typeof __propDef.slots;
|
|
12
|
+
export default class FlowEditorPanel extends SvelteComponentTyped<FlowEditorPanelProps, FlowEditorPanelEvents, FlowEditorPanelSlots> {
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script>import { getContext } from 'svelte';
|
|
2
|
+
import { flowStateStore } from '../flowState';
|
|
3
|
+
import { flowStore } from '../flowStore';
|
|
4
|
+
import FlowModule from './FlowModule.svelte';
|
|
5
|
+
const { previewArgs } = getContext('FlowEditorContext');
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
{#if $flowStore.value.failure_module}
|
|
9
|
+
<FlowModule
|
|
10
|
+
previewArgs={previewArgs}
|
|
11
|
+
bind:flowModule={$flowStore.value.failure_module}
|
|
12
|
+
bind:flowModuleState={$flowStateStore.failureModule}
|
|
13
|
+
on:delete={() => {
|
|
14
|
+
$flowStore.value.failure_module = undefined
|
|
15
|
+
}}
|
|
16
|
+
/>
|
|
17
|
+
{/if}
|
|
@@ -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 FlowFailureModuleProps = typeof __propDef.props;
|
|
10
|
+
export declare type FlowFailureModuleEvents = typeof __propDef.events;
|
|
11
|
+
export declare type FlowFailureModuleSlots = typeof __propDef.slots;
|
|
12
|
+
export default class FlowFailureModule extends SvelteComponentTyped<FlowFailureModuleProps, FlowFailureModuleEvents, FlowFailureModuleSlots> {
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script>import { flowStore } from '../flowStore';
|
|
2
|
+
import SchemaEditor from '../../SchemaEditor.svelte';
|
|
3
|
+
import { emptySchema } from '../../../utils';
|
|
4
|
+
import FlowCard from '../common/FlowCard.svelte';
|
|
5
|
+
import CopyFirstStepSchema from './CopyFirstStepSchema.svelte';
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<FlowCard title="Flow Inputs">
|
|
9
|
+
<div slot="header">
|
|
10
|
+
<CopyFirstStepSchema />
|
|
11
|
+
</div>
|
|
12
|
+
<div>
|
|
13
|
+
<div class="p-6">
|
|
14
|
+
<SchemaEditor
|
|
15
|
+
on:change={() => {
|
|
16
|
+
$flowStore = $flowStore
|
|
17
|
+
}}
|
|
18
|
+
schema={$flowStore?.schema ?? emptySchema()}
|
|
19
|
+
/>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
</FlowCard>
|
|
File without changes
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
<script>import { RawScript } from '
|
|
1
|
+
<script>import { RawScript, Script } from '../../../gen';
|
|
2
2
|
import { faCode, faRepeat } from '@fortawesome/free-solid-svg-icons';
|
|
3
3
|
import { createEventDispatcher } from 'svelte';
|
|
4
|
-
import FlowScriptPicker from '
|
|
5
|
-
import PickHubScript from '
|
|
6
|
-
import PickScript from '
|
|
4
|
+
import FlowScriptPicker from '../pickers/FlowScriptPicker.svelte';
|
|
5
|
+
import PickHubScript from '../pickers/PickHubScript.svelte';
|
|
6
|
+
import PickScript from '../pickers/PickScript.svelte';
|
|
7
7
|
export let shouldDisableLoopCreation = false;
|
|
8
8
|
export let shouldDisableTriggerScripts = false;
|
|
9
9
|
const dispatch = createEventDispatcher();
|
|
10
10
|
</script>
|
|
11
11
|
|
|
12
|
-
<div class="space-y-4">
|
|
12
|
+
<div class="space-y-4 p-4">
|
|
13
13
|
{#if !shouldDisableTriggerScripts}
|
|
14
14
|
<div class="text-sm font-bold">Scripts</div>
|
|
15
15
|
{/if}
|
|
16
16
|
|
|
17
17
|
<div class="grid sm:grid-col-2 lg:grid-cols-3 gap-4">
|
|
18
|
-
<PickScript on:pick />
|
|
19
|
-
<PickHubScript on:pick />
|
|
18
|
+
<PickScript kind={Script.kind.SCRIPT} on:pick />
|
|
19
|
+
<PickHubScript kind={Script.kind.SCRIPT} on:pick />
|
|
20
20
|
|
|
21
21
|
<FlowScriptPicker
|
|
22
22
|
label={`Create a for-loop here`}
|
|
@@ -30,21 +30,32 @@ const dispatch = createEventDispatcher();
|
|
|
30
30
|
label={`New PostgreSQL query`}
|
|
31
31
|
icon={faCode}
|
|
32
32
|
iconColor="text-blue-800"
|
|
33
|
-
on:click={() =>
|
|
33
|
+
on:click={() =>
|
|
34
|
+
dispatch('new', { language: RawScript.language.DENO, kind: 'script', subkind: 'pgsql' })}
|
|
34
35
|
/>
|
|
35
36
|
|
|
36
37
|
<FlowScriptPicker
|
|
37
38
|
label="New Python script (3.10)"
|
|
38
39
|
icon={faCode}
|
|
39
40
|
iconColor="text-green-500"
|
|
40
|
-
on:click={() =>
|
|
41
|
+
on:click={() =>
|
|
42
|
+
dispatch('new', { language: RawScript.language.PYTHON3, kind: 'script', subkind: 'flow' })}
|
|
41
43
|
/>
|
|
42
44
|
|
|
43
45
|
<FlowScriptPicker
|
|
44
46
|
label="New Typescript script (Deno)"
|
|
45
47
|
icon={faCode}
|
|
46
48
|
iconColor="text-blue-800"
|
|
47
|
-
on:click={() =>
|
|
49
|
+
on:click={() =>
|
|
50
|
+
dispatch('new', { language: RawScript.language.DENO, kind: 'script', subkind: 'flow' })}
|
|
51
|
+
/>
|
|
52
|
+
|
|
53
|
+
<FlowScriptPicker
|
|
54
|
+
label="New Go script"
|
|
55
|
+
icon={faCode}
|
|
56
|
+
iconColor="text-blue-700"
|
|
57
|
+
on:click={() =>
|
|
58
|
+
dispatch('new', { language: RawScript.language.GO, kind: 'script', subkind: 'flow' })}
|
|
48
59
|
/>
|
|
49
60
|
</div>
|
|
50
61
|
|
|
@@ -52,13 +63,13 @@ const dispatch = createEventDispatcher();
|
|
|
52
63
|
<div class="text-sm font-bold">Trigger scripts</div>
|
|
53
64
|
|
|
54
65
|
<div class="grid sm:grid-col-1 md:grid-col-2 lg:grid-cols-3 gap-4">
|
|
55
|
-
<PickScript
|
|
56
|
-
<PickHubScript
|
|
66
|
+
<PickScript kind={Script.kind.TRIGGER} on:pick />
|
|
67
|
+
<PickHubScript kind={Script.kind.TRIGGER} on:pick />
|
|
57
68
|
<FlowScriptPicker
|
|
58
69
|
label="New Typescript script (Deno)"
|
|
59
70
|
icon={faCode}
|
|
60
71
|
iconColor="text-blue-800"
|
|
61
|
-
on:click={() => dispatch('new', { language: RawScript.language.DENO,
|
|
72
|
+
on:click={() => dispatch('new', { language: RawScript.language.DENO, kind: 'trigger' })}
|
|
62
73
|
/>
|
|
63
74
|
</div>
|
|
64
75
|
{/if}
|
|
File without changes
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<script>import { getContext } from 'svelte';
|
|
2
|
+
import FlowCard from '../common/FlowCard.svelte';
|
|
3
|
+
import Toggle from '../../Toggle.svelte';
|
|
4
|
+
import SimpleEditor from '../../SimpleEditor.svelte';
|
|
5
|
+
import Tooltip from '../../Tooltip.svelte';
|
|
6
|
+
import { flowStore } from '../flowStore';
|
|
7
|
+
const { selectedId } = getContext('FlowEditorContext');
|
|
8
|
+
const [prefix, index] = $selectedId.split('-');
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<FlowCard title="For loop">
|
|
12
|
+
<div>
|
|
13
|
+
<div class="p-6 flex flex-col">
|
|
14
|
+
{#if $flowStore.value.modules[index].value.type === 'forloopflow'}
|
|
15
|
+
<span class="mb-2 text-sm font-bold"
|
|
16
|
+
>Iterator expression
|
|
17
|
+
<Tooltip>
|
|
18
|
+
List to iterate over. For more information see the
|
|
19
|
+
<a href="https://docs.windmill.dev/docs/getting_started/flows#for-loops">docs.</a>
|
|
20
|
+
</Tooltip>
|
|
21
|
+
</span>
|
|
22
|
+
<SimpleEditor
|
|
23
|
+
lang="javascript"
|
|
24
|
+
bind:code={$flowStore.value.modules[index].value.iterator.expr}
|
|
25
|
+
class="few-lines-editor"
|
|
26
|
+
/>
|
|
27
|
+
<span class="mb-2 text-sm font-bold">Skip failures</span>
|
|
28
|
+
|
|
29
|
+
<Toggle
|
|
30
|
+
bind:checked={$flowStore.value.modules[index].value.skip_failures}
|
|
31
|
+
options={{
|
|
32
|
+
right: 'Skip failures'
|
|
33
|
+
}}
|
|
34
|
+
/>
|
|
35
|
+
{/if}
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
</FlowCard>
|
|
@@ -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 FlowLoopProps = typeof __propDef.props;
|
|
10
|
+
export declare type FlowLoopEvents = typeof __propDef.events;
|
|
11
|
+
export declare type FlowLoopSlots = typeof __propDef.slots;
|
|
12
|
+
export default class FlowLoop extends SvelteComponentTyped<FlowLoopProps, FlowLoopEvents, FlowLoopSlots> {
|
|
13
|
+
}
|
|
14
|
+
export {};
|