windmill-components 1.35.42 → 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 +19 -19
- package/components/ArgInput.svelte.d.ts +1 -1
- package/components/DisplayResult.svelte +73 -67
- package/components/Editor.svelte +177 -164
- package/components/Editor.svelte.d.ts +4 -2
- 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/InputTransformForm.svelte +87 -106
- 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 +3 -1
- 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 +4 -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/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 +65 -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
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
<script>import { getScriptByPath } from '../../utils';
|
|
2
|
-
import { faArrowDown, faClose, faCode, faCodeBranch, faSave, faTrashAlt } from '@fortawesome/free-solid-svg-icons';
|
|
3
|
-
import { Button } from 'flowbite-svelte';
|
|
4
|
-
import { createEventDispatcher } from 'svelte';
|
|
5
|
-
import Icon from 'svelte-awesome';
|
|
6
|
-
import { Highlight } from 'svelte-highlight';
|
|
7
|
-
import python from 'svelte-highlight/languages/python';
|
|
8
|
-
import typescript from 'svelte-highlight/languages/typescript';
|
|
9
|
-
import IconedPath from '../IconedPath.svelte';
|
|
10
|
-
import Modal from '../Modal.svelte';
|
|
11
|
-
import { isEmptyFlowModule } from './flowStateUtils';
|
|
12
|
-
import { stepOpened } from './stepOpenedStore';
|
|
13
|
-
export let indexes;
|
|
14
|
-
export let mod;
|
|
15
|
-
$: shouldPick = isEmptyFlowModule(mod);
|
|
16
|
-
let modalViewer;
|
|
17
|
-
let modalViewerContent = '';
|
|
18
|
-
let modalViewerLanguage = 'deno';
|
|
19
|
-
async function viewCode() {
|
|
20
|
-
if (mod.value.type == 'script') {
|
|
21
|
-
const { content, language } = await getScriptByPath(mod.value.path);
|
|
22
|
-
modalViewerContent = content;
|
|
23
|
-
modalViewerLanguage = language;
|
|
24
|
-
modalViewer.openModal();
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
throw Error('Not a script');
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
const dispatch = createEventDispatcher();
|
|
31
|
-
$: opened = $stepOpened === String(indexes.join('-'));
|
|
32
|
-
</script>
|
|
33
|
-
|
|
34
|
-
<div>
|
|
35
|
-
<h3 class="text-sm font-bold text-gray-900 flex flex-col">
|
|
36
|
-
<span class="text-xs shrink">
|
|
37
|
-
{#if 'path' in mod.value && mod.value.path}
|
|
38
|
-
<IconedPath path={mod.value.path} />
|
|
39
|
-
{:else if 'language' in mod.value && mod.value.language}
|
|
40
|
-
Inline {mod.value.language}
|
|
41
|
-
{:else}
|
|
42
|
-
Select a script
|
|
43
|
-
{/if}
|
|
44
|
-
</span>
|
|
45
|
-
{#if ('path' in mod.value && mod.value.path) || ('language' in mod.value && mod.value.language)}
|
|
46
|
-
<input
|
|
47
|
-
on:click|stopPropagation={() => undefined}
|
|
48
|
-
class="overflow-x-auto"
|
|
49
|
-
type="text"
|
|
50
|
-
bind:value={mod.summary}
|
|
51
|
-
placeholder="Summary"
|
|
52
|
-
/>
|
|
53
|
-
{/if}
|
|
54
|
-
</h3>
|
|
55
|
-
</div>
|
|
56
|
-
|
|
57
|
-
<div class="flex flex-row space-x-2" on:click|stopPropagation={() => undefined}>
|
|
58
|
-
{#if mod.value.type === 'script' && !shouldPick}
|
|
59
|
-
<Button size="xs" color="alternative" on:click={() => dispatch('fork')}>
|
|
60
|
-
<Icon data={faCodeBranch} class="mr-2" />
|
|
61
|
-
Fork
|
|
62
|
-
</Button>
|
|
63
|
-
<Button size="xs" color="alternative" on:click={viewCode}>
|
|
64
|
-
<Icon data={faCode} class="mr-2" />
|
|
65
|
-
View code
|
|
66
|
-
</Button>
|
|
67
|
-
{/if}
|
|
68
|
-
|
|
69
|
-
{#if mod.value.type === 'rawscript' && !shouldPick}
|
|
70
|
-
<Button size="xs" color="alternative" on:click={() => dispatch('createScriptFromInlineScript')}>
|
|
71
|
-
<Icon data={faSave} class="mr-2" />
|
|
72
|
-
Save to workspace
|
|
73
|
-
</Button>
|
|
74
|
-
{/if}
|
|
75
|
-
<Button
|
|
76
|
-
size="xs"
|
|
77
|
-
color="alternative"
|
|
78
|
-
on:click={() => {
|
|
79
|
-
dispatch('delete')
|
|
80
|
-
}}
|
|
81
|
-
>
|
|
82
|
-
<Icon data={faTrashAlt} class="mr-2" />
|
|
83
|
-
Remove step
|
|
84
|
-
</Button>
|
|
85
|
-
{#if opened}
|
|
86
|
-
<Button size="xs" color="dark" on:click={() => stepOpened.update(() => undefined)}>
|
|
87
|
-
<Icon data={faClose} />
|
|
88
|
-
</Button>
|
|
89
|
-
{:else}
|
|
90
|
-
<Button
|
|
91
|
-
size="xs"
|
|
92
|
-
color="light"
|
|
93
|
-
on:click={() => stepOpened.update(() => String(indexes.join('-')))}
|
|
94
|
-
>
|
|
95
|
-
<Icon data={faArrowDown} />
|
|
96
|
-
</Button>
|
|
97
|
-
{/if}
|
|
98
|
-
</div>
|
|
99
|
-
|
|
100
|
-
<Modal bind:this={modalViewer}>
|
|
101
|
-
<div slot="title">Script {'path' in mod?.value ? mod?.value.path : ''}</div>
|
|
102
|
-
<div slot="content">
|
|
103
|
-
{#if modalViewerLanguage === 'python3'}
|
|
104
|
-
<Highlight language={python} code={modalViewerContent} />
|
|
105
|
-
{:else if modalViewerLanguage === 'deno'}
|
|
106
|
-
<Highlight language={typescript} code={modalViewerContent} />
|
|
107
|
-
{/if}
|
|
108
|
-
</div>
|
|
109
|
-
</Modal>
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
<script>import { sendUserToast } from '../../utils';
|
|
2
|
-
import { faFileExport, faFileImport, faGlobe } from '@fortawesome/free-solid-svg-icons';
|
|
3
|
-
import { Button } from 'flowbite-svelte';
|
|
4
|
-
import Icon from 'svelte-awesome';
|
|
5
|
-
import Menu from '../common/menu/Menu.svelte';
|
|
6
|
-
import MenuItem from '../common/menu/MenuItem.svelte';
|
|
7
|
-
import FlowViewer from '../FlowViewer.svelte';
|
|
8
|
-
import Modal from '../Modal.svelte';
|
|
9
|
-
import SimpleEditor from '../SimpleEditor.svelte';
|
|
10
|
-
import CollapseLink from './../CollapseLink.svelte';
|
|
11
|
-
import CronInput from './../CronInput.svelte';
|
|
12
|
-
import FlowBox from './../flows/FlowBox.svelte';
|
|
13
|
-
import { flowStore, initFlow } from './../flows/flowStore';
|
|
14
|
-
import Path from './../Path.svelte';
|
|
15
|
-
import Required from './../Required.svelte';
|
|
16
|
-
import SchemaForm from './../SchemaForm.svelte';
|
|
17
|
-
import Toggle from './../Toggle.svelte';
|
|
18
|
-
import Tooltip from './../Tooltip.svelte';
|
|
19
|
-
import { stepOpened } from './stepOpenedStore';
|
|
20
|
-
import { cleanInputs } from './utils';
|
|
21
|
-
export let pathError = '';
|
|
22
|
-
export let initialPath = '';
|
|
23
|
-
export let previewArgs = {};
|
|
24
|
-
export let scheduleArgs = {};
|
|
25
|
-
export let scheduleEnabled = false;
|
|
26
|
-
export let scheduleCron = '0 */5 * * *';
|
|
27
|
-
let jsonSetter;
|
|
28
|
-
let jsonViewer;
|
|
29
|
-
let jsonValue = '';
|
|
30
|
-
</script>
|
|
31
|
-
|
|
32
|
-
<Modal bind:this={jsonSetter}>
|
|
33
|
-
<div slot="title">Import JSON</div>
|
|
34
|
-
<div slot="content" class="h-full">
|
|
35
|
-
<SimpleEditor bind:code={jsonValue} lang="json" class="h-full" />
|
|
36
|
-
</div>
|
|
37
|
-
<div slot="submission">
|
|
38
|
-
<button
|
|
39
|
-
class="default-button px-4 py-2 font-semibold"
|
|
40
|
-
on:click={() => {
|
|
41
|
-
Object.assign($flowStore, JSON.parse(jsonValue))
|
|
42
|
-
initFlow($flowStore)
|
|
43
|
-
stepOpened.update(() => undefined)
|
|
44
|
-
sendUserToast('OpenFlow imported from JSON')
|
|
45
|
-
jsonSetter.closeModal()
|
|
46
|
-
}}
|
|
47
|
-
>
|
|
48
|
-
Import
|
|
49
|
-
</button>
|
|
50
|
-
</div>
|
|
51
|
-
</Modal>
|
|
52
|
-
|
|
53
|
-
<Modal bind:this={jsonViewer}>
|
|
54
|
-
<div slot="title">See JSON</div>
|
|
55
|
-
<div slot="content" class="h-full">
|
|
56
|
-
<FlowViewer flow={cleanInputs($flowStore)} tab="json" />
|
|
57
|
-
</div>
|
|
58
|
-
</Modal>
|
|
59
|
-
|
|
60
|
-
<FlowBox title="Flow Settings">
|
|
61
|
-
<div slot="header">
|
|
62
|
-
<div class="flex flex-row-reverse">
|
|
63
|
-
<Menu placement="bottom-end">
|
|
64
|
-
<button slot="trigger" class="text-gray-900 bg-white dark:text-white dark:bg-gray-800">
|
|
65
|
-
...
|
|
66
|
-
</button>
|
|
67
|
-
<div class="divide-y divide-gray-200">
|
|
68
|
-
<MenuItem
|
|
69
|
-
on:click={() => {
|
|
70
|
-
jsonSetter.openModal()
|
|
71
|
-
}}
|
|
72
|
-
>
|
|
73
|
-
<Icon data={faFileImport} scale={0.6} class="inline mr-2" />
|
|
74
|
-
Import from a JSON OpenFlow
|
|
75
|
-
</MenuItem>
|
|
76
|
-
<MenuItem
|
|
77
|
-
on:click={() => {
|
|
78
|
-
jsonViewer.openModal()
|
|
79
|
-
}}
|
|
80
|
-
>
|
|
81
|
-
<Icon data={faFileExport} scale={0.6} class="inline mr-2" />
|
|
82
|
-
Export to a JSON OpenFlow
|
|
83
|
-
</MenuItem>
|
|
84
|
-
<MenuItem
|
|
85
|
-
on:click={() => {
|
|
86
|
-
const url = new URL('https://hub.windmill.dev/flows/add')
|
|
87
|
-
const openFlow = {
|
|
88
|
-
value: $flowStore.value,
|
|
89
|
-
summary: $flowStore.summary,
|
|
90
|
-
description: $flowStore.description,
|
|
91
|
-
schema: $flowStore.schema
|
|
92
|
-
}
|
|
93
|
-
url.searchParams.append('flow', btoa(JSON.stringify(openFlow)))
|
|
94
|
-
window.open(url, '_blank')?.focus()
|
|
95
|
-
}}
|
|
96
|
-
>
|
|
97
|
-
<Icon data={faGlobe} scale={0.6} class="inline mr-2" />
|
|
98
|
-
Publish to Hub
|
|
99
|
-
</MenuItem>
|
|
100
|
-
</div>
|
|
101
|
-
</Menu>
|
|
102
|
-
</div>
|
|
103
|
-
</div>
|
|
104
|
-
|
|
105
|
-
<div slot="content">
|
|
106
|
-
<div class="p-6 border-t border-gray-300">
|
|
107
|
-
<Path
|
|
108
|
-
bind:error={pathError}
|
|
109
|
-
bind:path={$flowStore.path}
|
|
110
|
-
{initialPath}
|
|
111
|
-
namePlaceholder="my_flow"
|
|
112
|
-
kind="flow"
|
|
113
|
-
>
|
|
114
|
-
<div slot="ownerToolkit">
|
|
115
|
-
Flow permissions depend on their path. Select the group <span class="font-mono">all</span>
|
|
116
|
-
to share your flow, and <span class="font-mono">user</span> to keep it private.
|
|
117
|
-
<a href="https://docs.windmill.dev/docs/reference/namespaces">docs</a>
|
|
118
|
-
</div>
|
|
119
|
-
</Path>
|
|
120
|
-
|
|
121
|
-
<label class="block mt-4">
|
|
122
|
-
<span class="text-gray-700">Summary <Required required={false} /></span>
|
|
123
|
-
<textarea
|
|
124
|
-
bind:value={$flowStore.summary}
|
|
125
|
-
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"
|
|
126
|
-
placeholder="A very short summary of the flow displayed when the flow is listed"
|
|
127
|
-
rows="1"
|
|
128
|
-
/>
|
|
129
|
-
</label>
|
|
130
|
-
|
|
131
|
-
<CollapseLink text="set primary schedule" open={true}>
|
|
132
|
-
<Tooltip>
|
|
133
|
-
The primary schedule of a flow is simply a schedule that has the same name as a flow. It
|
|
134
|
-
can be set and enabled directly within the flow editor. "Watching for new changes" flows
|
|
135
|
-
are meant to be watching regularly for new items in an external systems. The primary
|
|
136
|
-
schedule purpose is there to set the periodicity at which you want this watcher to
|
|
137
|
-
operate.
|
|
138
|
-
</Tooltip>
|
|
139
|
-
<Toggle
|
|
140
|
-
bind:checked={scheduleEnabled}
|
|
141
|
-
options={{
|
|
142
|
-
left: 'disabled',
|
|
143
|
-
right: 'enabled'
|
|
144
|
-
}}
|
|
145
|
-
/>
|
|
146
|
-
<div class="p-2 my-2 rounded" class:bg-gray-300={!scheduleEnabled}>
|
|
147
|
-
{#if !scheduleEnabled}
|
|
148
|
-
<span class="font-black">No next scheduled run when disabled</span>
|
|
149
|
-
{/if}
|
|
150
|
-
<CronInput bind:schedule={scheduleCron} />
|
|
151
|
-
</div>
|
|
152
|
-
<div class="flex flex-row-reverse">
|
|
153
|
-
<Button
|
|
154
|
-
color="alternative"
|
|
155
|
-
size="sm"
|
|
156
|
-
on:click={() => (scheduleArgs = JSON.parse(JSON.stringify(previewArgs)))}
|
|
157
|
-
>
|
|
158
|
-
Copy from preview arguments
|
|
159
|
-
</Button>
|
|
160
|
-
</div>
|
|
161
|
-
<SchemaForm schema={$flowStore.schema} bind:args={scheduleArgs} />
|
|
162
|
-
</CollapseLink>
|
|
163
|
-
</div>
|
|
164
|
-
</div>
|
|
165
|
-
</FlowBox>
|
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
<script>import { faInfoCircle, faPen, faPlus, faSliders, faTrashAlt } from '@fortawesome/free-solid-svg-icons';
|
|
2
|
-
import { Button, Toggle, Tooltip } from 'flowbite-svelte';
|
|
3
|
-
import Icon from 'svelte-awesome';
|
|
4
|
-
import ModuleStep from '../ModuleStep.svelte';
|
|
5
|
-
import FlowInput from './FlowInput.svelte';
|
|
6
|
-
import { emptyFlowModuleSchema } from './flowStateUtils';
|
|
7
|
-
import { stepOpened } from './stepOpenedStore';
|
|
8
|
-
export let args = {};
|
|
9
|
-
export let flowModuleSchemas;
|
|
10
|
-
export let parentIndex = undefined;
|
|
11
|
-
const root = parentIndex === undefined;
|
|
12
|
-
function insertAtIndex(index) {
|
|
13
|
-
flowModuleSchemas.splice(index, 0, emptyFlowModuleSchema());
|
|
14
|
-
flowModuleSchemas = flowModuleSchemas;
|
|
15
|
-
const indexes = getIndexes(parentIndex, index);
|
|
16
|
-
stepOpened.update(() => String(indexes.join('-')));
|
|
17
|
-
}
|
|
18
|
-
function removeAtIndex(index) {
|
|
19
|
-
flowModuleSchemas.splice(index, 1);
|
|
20
|
-
flowModuleSchemas = flowModuleSchemas;
|
|
21
|
-
}
|
|
22
|
-
function getIndexes(parentIndex, childIndex) {
|
|
23
|
-
const indexes = [];
|
|
24
|
-
if (parentIndex !== undefined) {
|
|
25
|
-
indexes.push(parentIndex);
|
|
26
|
-
}
|
|
27
|
-
indexes.push(childIndex);
|
|
28
|
-
return indexes;
|
|
29
|
-
}
|
|
30
|
-
const color = root ? 'blue' : 'orange';
|
|
31
|
-
</script>
|
|
32
|
-
|
|
33
|
-
<div class="w-full">
|
|
34
|
-
<ol class="relative ml-4 border-l border-gray-200 dark:border-gray-700 space-y-12 border-dashed">
|
|
35
|
-
{#if root}
|
|
36
|
-
<li class="ml-8">
|
|
37
|
-
<span class="relative">
|
|
38
|
-
<span
|
|
39
|
-
class={`flex absolute -left-12 justify-center items-center w-8 h-8 bg-${color}-200 rounded-full ring-8 ring-white dark:ring-gray-900 dark:bg-${color}-900`}
|
|
40
|
-
>
|
|
41
|
-
<Icon
|
|
42
|
-
class={`text-${color}-600 dark:text-${color}-400 text-font-bold text-center`}
|
|
43
|
-
data={faSliders}
|
|
44
|
-
/>
|
|
45
|
-
</span>
|
|
46
|
-
</span>
|
|
47
|
-
<slot name="settings" />
|
|
48
|
-
</li>
|
|
49
|
-
<li class="ml-8 ">
|
|
50
|
-
<span class="relative">
|
|
51
|
-
<span
|
|
52
|
-
class={`flex absolute top-4 -left-12 justify-center items-center w-8 h-8 bg-${color}-200 rounded-full ring-8 ring-white dark:ring-gray-900 dark:bg-${color}-900`}
|
|
53
|
-
>
|
|
54
|
-
<Icon
|
|
55
|
-
class={`text-${color}-600 dark:text-${color}-400 font-bold text-center`}
|
|
56
|
-
data={faPen}
|
|
57
|
-
/>
|
|
58
|
-
</span>
|
|
59
|
-
</span>
|
|
60
|
-
<FlowInput />
|
|
61
|
-
</li>
|
|
62
|
-
{/if}
|
|
63
|
-
{#each flowModuleSchemas as flowModuleSchema, index (index)}
|
|
64
|
-
{#if flowModuleSchema.flowModule.value.type === 'forloopflow'}
|
|
65
|
-
<li id="module-{index}" class="ml-4 relative">
|
|
66
|
-
<button
|
|
67
|
-
on:click={() => insertAtIndex(index)}
|
|
68
|
-
class="flex absolute -top-10 -left-8 justify-center items-center bg-white border-2 border-gray-200 w-8 h-8 rounded-full ring-8 ring-white dark:ring-gray-900 dark:bg-${color}-900"
|
|
69
|
-
>
|
|
70
|
-
<Icon class="text-gray-400" data={faPlus} />
|
|
71
|
-
</button>
|
|
72
|
-
<div
|
|
73
|
-
class="py-2 px-6 ml-4 mb-16 flex justify-between text-sm font-bold border border-gray-300 rounded-md shadow-md"
|
|
74
|
-
role="alert"
|
|
75
|
-
>
|
|
76
|
-
<span class="flex items-center z-50">
|
|
77
|
-
For loop
|
|
78
|
-
<Tooltip
|
|
79
|
-
content="Inside a loop, the flow input has an 'iter' property. It contains the value and the index of the iteration"
|
|
80
|
-
placement="bottom"
|
|
81
|
-
arrow
|
|
82
|
-
>
|
|
83
|
-
<Icon data={faInfoCircle} class="ml-2" /></Tooltip
|
|
84
|
-
>
|
|
85
|
-
</span>
|
|
86
|
-
<span class="flex items-center space-x-2">
|
|
87
|
-
<Toggle size="small" bind:checked={flowModuleSchema.flowModule.value.skip_failures}>
|
|
88
|
-
Skip failures
|
|
89
|
-
</Toggle>
|
|
90
|
-
<Button size="xs" color="alternative" on:click={() => removeAtIndex(index)}>
|
|
91
|
-
<Icon data={faTrashAlt} class="mr-2" />
|
|
92
|
-
Remove loop
|
|
93
|
-
</Button>
|
|
94
|
-
</span>
|
|
95
|
-
</div>
|
|
96
|
-
<span
|
|
97
|
-
class="flex absolute top-3 -left-8 justify-center items-center w-8 h-8 bg-orange-200 rounded-full ring-8 ring-white dark:ring-gray-900 dark:bg-orange-900"
|
|
98
|
-
>
|
|
99
|
-
<span class={`text-orange-600 dark:text-orange-400 font-bold text-center`}>
|
|
100
|
-
{index + 1}
|
|
101
|
-
</span>
|
|
102
|
-
</span>
|
|
103
|
-
|
|
104
|
-
<svelte:self
|
|
105
|
-
bind:args
|
|
106
|
-
bind:flowModuleSchemas={flowModuleSchema.childFlowModules}
|
|
107
|
-
parentIndex={index}
|
|
108
|
-
/>
|
|
109
|
-
|
|
110
|
-
<div
|
|
111
|
-
class="flex px-6 py-4 ml-4 mt-4 text-sm font-bold border border-gray-300 rounded-md shadow-md z-50"
|
|
112
|
-
role="alert"
|
|
113
|
-
>
|
|
114
|
-
End of For Loop
|
|
115
|
-
<Tooltip
|
|
116
|
-
content="The results of each iteration are collecting in an array and is the result of the step. "
|
|
117
|
-
placement="bottom"
|
|
118
|
-
arrow
|
|
119
|
-
>
|
|
120
|
-
<Icon data={faInfoCircle} class="ml-2" /></Tooltip
|
|
121
|
-
>
|
|
122
|
-
</div>
|
|
123
|
-
</li>
|
|
124
|
-
{:else}
|
|
125
|
-
<li id="module-{String(getIndexes(parentIndex, index).join('-'))}" class="ml-8">
|
|
126
|
-
<span class="relative">
|
|
127
|
-
<button
|
|
128
|
-
on:click={() => insertAtIndex(index)}
|
|
129
|
-
class="flex absolute -top-10 -left-12 justify-center items-center bg-white border-2 border-gray-200 w-8 h-8 rounded-full ring-8 ring-white dark:ring-gray-900 dark:bg-${color}-900"
|
|
130
|
-
>
|
|
131
|
-
<Icon class="text-gray-400" data={faPlus} />
|
|
132
|
-
</button>
|
|
133
|
-
<span
|
|
134
|
-
class={`flex absolute top-4 -left-12 justify-center items-center w-8 h-8 bg-${color}-200 rounded-full ring-8 ring-white dark:ring-gray-900 dark:bg-${color}-900`}
|
|
135
|
-
>
|
|
136
|
-
<span class={`text-${color}-600 dark:text-${color}-400 font-bold text-center`}>
|
|
137
|
-
{index + 1}
|
|
138
|
-
</span>
|
|
139
|
-
</span>
|
|
140
|
-
<ModuleStep
|
|
141
|
-
indexes={getIndexes(parentIndex, index)}
|
|
142
|
-
bind:mod={flowModuleSchema.flowModule}
|
|
143
|
-
bind:args
|
|
144
|
-
bind:schema={flowModuleSchema.schema}
|
|
145
|
-
bind:childFlowModules={flowModuleSchema.childFlowModules}
|
|
146
|
-
on:delete={() => removeAtIndex(index)}
|
|
147
|
-
/>
|
|
148
|
-
</span>
|
|
149
|
-
</li>
|
|
150
|
-
{/if}
|
|
151
|
-
{#if flowModuleSchemas.length - 1 === index}
|
|
152
|
-
<button
|
|
153
|
-
on:click={() => insertAtIndex(flowModuleSchemas.length)}
|
|
154
|
-
class="-ml-4 -mt-4 flex justify-center items-center bg-white border-2 border-gray-200 w-8 h-8 rounded-full ring-8 ring-white dark:ring-gray-900 dark:bg-${color}-900"
|
|
155
|
-
>
|
|
156
|
-
<Icon class="text-gray-400" data={faPlus} />
|
|
157
|
-
</button>
|
|
158
|
-
{/if}
|
|
159
|
-
{/each}
|
|
160
|
-
{#if flowModuleSchemas.length === 0}
|
|
161
|
-
<button
|
|
162
|
-
on:click={() => insertAtIndex(0)}
|
|
163
|
-
class="-ml-4 flex justify-center items-center bg-white border-2 border-gray-200 w-8 h-8 rounded-full ring-8 ring-white dark:ring-gray-900 dark:bg-${color}-900"
|
|
164
|
-
>
|
|
165
|
-
<Icon class="text-gray-400" data={faPlus} />
|
|
166
|
-
</button>
|
|
167
|
-
{/if}
|
|
168
|
-
</ol>
|
|
169
|
-
</div>
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type { FlowState } from './flowState';
|
|
3
|
-
declare const __propDef: {
|
|
4
|
-
props: {
|
|
5
|
-
args?: Record<string, any> | undefined;
|
|
6
|
-
flowModuleSchemas: FlowState;
|
|
7
|
-
parentIndex?: number | undefined;
|
|
8
|
-
};
|
|
9
|
-
events: {
|
|
10
|
-
[evt: string]: CustomEvent<any>;
|
|
11
|
-
};
|
|
12
|
-
slots: {
|
|
13
|
-
settings: {};
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
export declare type FlowTimelineProps = typeof __propDef.props;
|
|
17
|
-
export declare type FlowTimelineEvents = typeof __propDef.events;
|
|
18
|
-
export declare type FlowTimelineSlots = typeof __propDef.slots;
|
|
19
|
-
export default class FlowTimeline extends SvelteComponentTyped<FlowTimelineProps, FlowTimelineEvents, FlowTimelineSlots> {
|
|
20
|
-
}
|
|
21
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const stepOpened: import("svelte/store").Writable<string | undefined>;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
<script>import { createEventDispatcher } from 'svelte';
|
|
2
|
-
import { createPopperActions } from 'svelte-popperjs';
|
|
3
|
-
import PropPicker from './PropPicker.svelte';
|
|
4
|
-
const [popperRef, popperContent] = createPopperActions({
|
|
5
|
-
placement: 'bottom',
|
|
6
|
-
strategy: 'fixed'
|
|
7
|
-
});
|
|
8
|
-
export let pickableProperties;
|
|
9
|
-
let isOpen = false;
|
|
10
|
-
let isFocused = false;
|
|
11
|
-
let timeout;
|
|
12
|
-
let pickerVariation = 'append';
|
|
13
|
-
export function unfocus() {
|
|
14
|
-
isFocused = false;
|
|
15
|
-
close();
|
|
16
|
-
}
|
|
17
|
-
export function focus(newPickerVariation) {
|
|
18
|
-
if (newPickerVariation) {
|
|
19
|
-
pickerVariation = newPickerVariation;
|
|
20
|
-
}
|
|
21
|
-
isFocused = true;
|
|
22
|
-
open();
|
|
23
|
-
}
|
|
24
|
-
function open() {
|
|
25
|
-
if (isFocused) {
|
|
26
|
-
clearTimeout(timeout);
|
|
27
|
-
!isOpen && (isOpen = true);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
function close() {
|
|
31
|
-
if (pickerVariation === 'append') {
|
|
32
|
-
timeout = setTimeout(() => (isOpen = false), 50);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
function closePropertyPicker() {
|
|
36
|
-
timeout = setTimeout(() => (isOpen = false), 50);
|
|
37
|
-
}
|
|
38
|
-
const dispatch = createEventDispatcher();
|
|
39
|
-
</script>
|
|
40
|
-
|
|
41
|
-
<div class="w-full">
|
|
42
|
-
<div use:popperRef on:click={open} on:input={open} on:mouseleave={close}>
|
|
43
|
-
<slot />
|
|
44
|
-
</div>
|
|
45
|
-
|
|
46
|
-
{#if isOpen}
|
|
47
|
-
<div class="content" use:popperContent on:mouseenter={open} on:mouseleave={closePropertyPicker}>
|
|
48
|
-
<PropPicker
|
|
49
|
-
bind:pickableProperties
|
|
50
|
-
on:select={(event) => {
|
|
51
|
-
dispatch('select', { propPath: event.detail, pickerVariation })
|
|
52
|
-
isOpen = false
|
|
53
|
-
pickerVariation = 'append'
|
|
54
|
-
}}
|
|
55
|
-
/>
|
|
56
|
-
</div>
|
|
57
|
-
{/if}
|
|
58
|
-
</div>
|
|
59
|
-
|
|
60
|
-
<style>
|
|
61
|
-
.content {
|
|
62
|
-
--tw-drop-shadow: drop-shadow(0 20px 13px rgb(0 0 0 / 0.03)) drop-shadow(0 8px 5px rgb(0 0 0 / 0.08));
|
|
63
|
-
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
|
64
|
-
width: 100%;
|
|
65
|
-
max-width: 56rem;
|
|
66
|
-
padding-left: 1.5rem;
|
|
67
|
-
padding-right: 1.5rem;
|
|
68
|
-
z-index: 50
|
|
69
|
-
}</style>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
declare const __propDef: {
|
|
3
|
-
props: {
|
|
4
|
-
pickableProperties: Object | undefined;
|
|
5
|
-
unfocus?: (() => void) | undefined;
|
|
6
|
-
focus?: ((newPickerVariation?: ("append" | "connect") | undefined) => void) | undefined;
|
|
7
|
-
};
|
|
8
|
-
events: {
|
|
9
|
-
select: CustomEvent<any>;
|
|
10
|
-
} & {
|
|
11
|
-
[evt: string]: CustomEvent<any>;
|
|
12
|
-
};
|
|
13
|
-
slots: {
|
|
14
|
-
default: {};
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
export declare type OverlayPropertyPickerProps = typeof __propDef.props;
|
|
18
|
-
export declare type OverlayPropertyPickerEvents = typeof __propDef.events;
|
|
19
|
-
export declare type OverlayPropertyPickerSlots = typeof __propDef.slots;
|
|
20
|
-
export default class OverlayPropertyPicker extends SvelteComponentTyped<OverlayPropertyPickerProps, OverlayPropertyPickerEvents, OverlayPropertyPickerSlots> {
|
|
21
|
-
get unfocus(): () => void;
|
|
22
|
-
get focus(): (newPickerVariation?: ("append" | "connect") | undefined) => void;
|
|
23
|
-
}
|
|
24
|
-
export {};
|