windmill-components 1.394.7 → 1.405.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/package/ata/edgeCases.d.ts +0 -1
- package/package/ata/edgeCases.js +2 -8
- package/package/ata/index.js +4 -3
- package/package/common.d.ts +1 -1
- package/package/common.js +2 -2
- package/package/components/ApiConnectForm.svelte +33 -7
- package/package/components/ArgInput.svelte +4 -2
- package/package/components/CenteredModal.svelte +4 -1
- package/package/components/CenteredModal.svelte.d.ts +1 -0
- package/package/components/DateInput.svelte +2 -0
- package/package/components/DateInput.svelte.d.ts +1 -0
- package/package/components/DefaultScripts.svelte +8 -3
- package/package/components/DefaultScripts.svelte.d.ts +5 -1
- package/package/components/DefaultScriptsInner.svelte +16 -7
- package/package/components/DefaultScriptsInner.svelte.d.ts +3 -1
- package/package/components/Dev.svelte +68 -11
- package/package/components/DropdownV2.svelte.d.ts +3 -3
- package/package/components/DropdownV2Inner.svelte.d.ts +3 -3
- package/package/components/EditableSchemaForm.svelte +1 -0
- package/package/components/Editor.svelte +3 -2
- package/package/components/Editor.svelte.d.ts +1 -1
- package/package/components/ExecutionDuration.svelte +44 -0
- package/package/components/ExecutionDuration.svelte.d.ts +24 -0
- package/package/components/FlowBuilder.svelte +20 -12
- package/package/components/FlowGraphViewer.svelte +9 -2
- package/package/components/FlowGraphViewerStep.svelte +23 -10
- package/package/components/FlowJobResult.svelte +0 -1
- package/package/components/FlowStatusViewerInner.svelte +17 -4
- package/package/components/FlowTimeline.svelte +3 -3
- package/package/components/HighlightCode.svelte +3 -0
- package/package/components/IconedResourceType.svelte +17 -10
- package/package/components/IconedResourceType.svelte.d.ts +2 -0
- package/package/components/IdEditorInput.svelte +0 -1
- package/package/components/InstanceSettings.svelte +247 -129
- package/package/components/InstanceSettings.svelte.d.ts +2 -0
- package/package/components/JobArgs.svelte +3 -1
- package/package/components/LightweightArgInput.svelte +35 -10
- package/package/components/LightweightArgInput.svelte.d.ts +1 -0
- package/package/components/LightweightObjectResourceInput.svelte +2 -0
- package/package/components/LightweightObjectResourceInput.svelte.d.ts +1 -0
- package/package/components/LightweightSchemaForm.svelte +2 -0
- package/package/components/LightweightSchemaForm.svelte.d.ts +1 -0
- package/package/components/Login.svelte +10 -5
- package/package/components/Login.svelte.d.ts +1 -0
- package/package/components/ModulePreview.svelte +21 -2
- package/package/components/ModuleStatus.svelte +3 -0
- package/package/components/ModuleStatus.svelte.d.ts +1 -0
- package/package/components/OAuthSetting.svelte +40 -15
- package/package/components/ObjectStoreConfigSettings.svelte +78 -76
- package/package/components/ParqetCsvTableRenderer.svelte +25 -3
- package/package/components/Password.svelte.d.ts +1 -1
- package/package/components/Path.svelte +74 -54
- package/package/components/Path.svelte.d.ts +2 -1
- package/package/components/ResourceEditor.svelte +38 -9
- package/package/components/ResultJobLoader.svelte +6 -3
- package/package/components/ResultJobLoader.svelte.d.ts +1 -1
- package/package/components/ScheduleEditorInner.svelte +2 -2
- package/package/components/SchemaForm.svelte +6 -1
- package/package/components/ScriptBuilder.svelte +12 -5
- package/package/components/ScriptEditor.svelte +33 -3
- package/package/components/ScriptEditor.svelte.d.ts +1 -1
- package/package/components/Scrollable.svelte +47 -0
- package/package/components/Scrollable.svelte.d.ts +21 -0
- package/package/components/ShareModal.svelte.d.ts +2 -2
- package/package/components/SuperadminSettings.svelte +5 -7
- package/package/components/TestJobLoader.svelte +46 -5
- package/package/components/TestJobLoader.svelte.d.ts +2 -1
- package/package/components/ToggleHubWorkspaceQuick.svelte +14 -0
- package/package/components/ToggleHubWorkspaceQuick.svelte.d.ts +16 -0
- package/package/components/WorkspaceGroup.svelte +3 -2
- package/package/components/apps/components/helpers/DebouncedInput.svelte +9 -1
- package/package/components/apps/components/inputs/AppSelect.svelte +1 -1
- package/package/components/apps/editor/component/components.d.ts +79 -79
- package/package/components/apps/svelte-select/lib/Select.svelte +1 -1
- package/package/components/common/fileUpload/FileUpload.svelte +1 -1
- package/package/components/common/languageIcons/LanguageIcon.svelte +5 -2
- package/package/components/common/menu/Menu.svelte +2 -1
- package/package/components/common/menu/MenuV2.svelte +3 -1
- package/package/components/common/menu/MenuV2.svelte.d.ts +1 -0
- package/package/components/common/popup/Popup.svelte +22 -12
- package/package/components/common/popup/Popup.svelte.d.ts +2 -0
- package/package/components/common/popup/PopupV2.svelte +58 -0
- package/package/components/common/popup/PopupV2.svelte.d.ts +27 -0
- package/package/components/copilot/CronGen.svelte +1 -1
- package/package/components/copilot/RegexGen.svelte +4 -4
- package/package/components/copilot/StepGen.svelte +6 -6
- package/package/components/copilot/StepGenQuick.svelte +57 -0
- package/package/components/copilot/StepGenQuick.svelte.d.ts +23 -0
- package/package/components/copilot/flow.d.ts +2 -0
- package/package/components/copilot/flow.js +55 -0
- package/package/components/details/DetailPageDetailPanel.svelte +9 -1
- package/package/components/details/DetailPageDetailPanel.svelte.d.ts +2 -1
- package/package/components/details/DetailPageLayout.svelte +2 -0
- package/package/components/details/DetailPageLayout.svelte.d.ts +3 -0
- package/package/components/details/utils.d.ts +0 -1
- package/package/components/details/utils.js +1 -12
- package/package/components/flows/FlowEditor.svelte +2 -1
- package/package/components/flows/FlowProgressBar.svelte +16 -1
- package/package/components/flows/FlowProgressBar.svelte.d.ts +1 -0
- package/package/components/flows/content/FlowBranchesAllWrapper.svelte +8 -0
- package/package/components/flows/content/FlowBranchesAllWrapper.svelte.d.ts +1 -0
- package/package/components/flows/content/FlowBranchesOneWrapper.svelte +8 -0
- package/package/components/flows/content/FlowBranchesOneWrapper.svelte.d.ts +1 -0
- package/package/components/flows/content/FlowConstants.svelte +1 -1
- package/package/components/flows/content/FlowEditorPanel.svelte +3 -0
- package/package/components/flows/content/FlowInputs.svelte +7 -6
- package/package/components/flows/content/FlowInputs.svelte.d.ts +1 -0
- package/package/components/flows/content/FlowInputsFlowQuick.svelte +65 -0
- package/package/components/flows/content/FlowInputsFlowQuick.svelte.d.ts +19 -0
- package/package/components/flows/content/FlowInputsQuick.svelte +419 -0
- package/package/components/flows/content/FlowInputsQuick.svelte.d.ts +33 -0
- package/package/components/flows/content/FlowLoop.svelte +7 -1
- package/package/components/flows/content/FlowModuleComponent.svelte +12 -3
- package/package/components/flows/content/FlowModuleComponent.svelte.d.ts +1 -0
- package/package/components/flows/content/FlowModuleSkip.svelte +69 -0
- package/package/components/flows/content/FlowModuleSkip.svelte.d.ts +20 -0
- package/package/components/flows/content/FlowModuleWrapper.svelte +17 -4
- package/package/components/flows/content/FlowPreprocessorModule.svelte +16 -0
- package/package/components/flows/content/FlowPreprocessorModule.svelte.d.ts +16 -0
- package/package/components/flows/content/FlowWhileLoop.svelte +9 -0
- package/package/components/flows/content/FlowWhileLoop.svelte.d.ts +1 -0
- package/package/components/flows/content/GenAiQuick.svelte +30 -0
- package/package/components/flows/content/GenAiQuick.svelte.d.ts +20 -0
- package/package/components/flows/content/ScriptEditorDrawer.svelte +3 -2
- package/package/components/flows/flowInfers.js +1 -1
- package/package/components/flows/header/FlowPreviewButtons.svelte +1 -0
- package/package/components/flows/idUtils.js +3 -1
- package/package/components/flows/map/FlowCopilotButton.svelte +55 -0
- package/package/components/flows/map/FlowCopilotButton.svelte.d.ts +16 -0
- package/package/components/flows/map/FlowErrorHandlerItem.svelte +77 -47
- package/package/components/flows/map/FlowJobsMenu.svelte +1 -1
- package/package/components/flows/map/FlowModuleSchemaItem.svelte +25 -12
- package/package/components/flows/map/FlowModuleSchemaItem.svelte.d.ts +1 -0
- package/package/components/flows/map/FlowModuleSchemaMap.svelte +61 -18
- package/package/components/flows/map/InsertModuleButton.svelte +161 -138
- package/package/components/flows/map/InsertModuleButton.svelte.d.ts +7 -4
- package/package/components/flows/map/MapItem.svelte +11 -0
- package/package/components/flows/map/MapItem.svelte.d.ts +1 -0
- package/package/components/flows/pickers/FlowScriptPickerQuick.svelte +48 -0
- package/package/components/flows/pickers/FlowScriptPickerQuick.svelte.d.ts +23 -0
- package/package/components/flows/pickers/FlowToplevelNode.svelte +19 -0
- package/package/components/flows/pickers/FlowToplevelNode.svelte.d.ts +19 -0
- package/package/components/flows/pickers/PickHubScriptQuick.svelte +138 -0
- package/package/components/flows/pickers/PickHubScriptQuick.svelte.d.ts +33 -0
- package/package/components/flows/pickers/TopLevelNode.svelte +58 -0
- package/package/components/flows/pickers/TopLevelNode.svelte.d.ts +21 -0
- package/package/components/flows/pickers/WorkspaceScriptPickerQuick.svelte +120 -0
- package/package/components/flows/pickers/WorkspaceScriptPickerQuick.svelte.d.ts +35 -0
- package/package/components/flows/types.d.ts +1 -0
- package/package/components/graph/FlowGraphV2.svelte +93 -58
- package/package/components/graph/FlowGraphV2.svelte.d.ts +2 -1
- package/package/components/graph/graphBuilder.d.ts +2 -1
- package/package/components/graph/graphBuilder.js +345 -280
- package/package/components/graph/model.d.ts +1 -0
- package/package/components/graph/renderers/edges/BaseEdge.svelte +36 -14
- package/package/components/graph/renderers/nodes/BranchOneStart.svelte +1 -1
- package/package/components/graph/renderers/nodes/InputNode.svelte +31 -51
- package/package/components/graph/renderers/nodes/InputNode.svelte.d.ts +6 -1
- package/package/components/graph/renderers/nodes/ModuleNode.svelte +2 -1
- package/package/components/graph/util.d.ts +1 -1
- package/package/components/graph/util.js +7 -2
- package/package/components/home/ListFiltersQuick.svelte +51 -0
- package/package/components/home/ListFiltersQuick.svelte.d.ts +23 -0
- package/package/components/icons/AnsibleIcon.svelte +42 -0
- package/package/components/icons/AnsibleIcon.svelte.d.ts +25 -0
- package/package/components/icons/WindmillIcon2.svelte +141 -0
- package/package/components/icons/WindmillIcon2.svelte.d.ts +20 -0
- package/package/components/icons/index.d.ts +2 -1
- package/package/components/icons/index.js +2 -1
- package/package/components/instanceSettings.d.ts +2 -2
- package/package/components/instanceSettings.js +25 -58
- package/package/components/jobs/JobProgressBar.svelte +52 -0
- package/package/components/jobs/JobProgressBar.svelte.d.ts +23 -0
- package/package/components/progressBar/ProgressBar.svelte +18 -1
- package/package/components/progressBar/ProgressBar.svelte.d.ts +3 -0
- package/package/components/runs/JobPreview.svelte +1 -0
- package/package/components/runs/PreprocessedArgsDisplay.svelte +71 -0
- package/package/components/runs/PreprocessedArgsDisplay.svelte.d.ts +16 -0
- package/package/components/schema/AddProperty.svelte +1 -0
- package/package/components/schema/EditableSchemaWrapper.svelte +142 -19
- package/package/components/schema/EditableSchemaWrapper.svelte.d.ts +1 -0
- package/package/components/schema/FlowPropertyEditor.svelte +12 -0
- package/package/components/schema/FlowPropertyEditor.svelte.d.ts +1 -0
- package/package/components/scriptEditor/LogPanel.svelte +1 -0
- package/package/components/scriptEditor/LogPanel.svelte.d.ts +3 -1
- package/package/components/search/GlobalSearchModal.svelte +2 -1
- package/package/components/sidebar/SidebarContent.svelte +69 -8
- package/package/components/sidebar/changelogs.js +10 -0
- package/package/components/triggers/RouteEditor.svelte +19 -0
- package/package/components/triggers/RouteEditor.svelte.d.ts +21 -0
- package/package/components/triggers/RouteEditorInner.svelte +327 -0
- package/package/components/triggers/RouteEditorInner.svelte.d.ts +21 -0
- package/package/components/triggers/RoutesPanel.svelte +74 -0
- package/package/components/triggers/RoutesPanel.svelte.d.ts +17 -0
- package/package/editorUtils.js +2 -0
- package/package/gen/core/OpenAPI.js +1 -1
- package/package/gen/schemas.gen.d.ts +159 -8
- package/package/gen/schemas.gen.js +161 -8
- package/package/gen/services.gen.d.ts +139 -1
- package/package/gen/services.gen.js +282 -1
- package/package/gen/types.gen.d.ts +455 -12
- package/package/hubPaths.json +6 -8
- package/package/infer.d.ts +4 -2
- package/package/infer.js +25 -23
- package/package/inferArgSig.js +8 -2
- package/package/monaco_workers/build_workers.js +8 -13
- package/package/monaco_workers/graphql.worker.bundle.js +45440 -174
- package/package/relative_imports.d.ts +3 -0
- package/package/relative_imports.js +25 -0
- package/package/script_helpers.d.ts +7 -2
- package/package/script_helpers.js +151 -3
- package/package/scripts.d.ts +1 -1
- package/package/scripts.js +5 -1
- package/package/stores.d.ts +1 -0
- package/package/stores.js +1 -0
- package/package/utils.d.ts +1 -0
- package/package/utils.js +4 -0
- package/package.json +16 -7
- package/package/components/flows/map/InsertTriggerButton.svelte +0 -48
- package/package/components/flows/map/InsertTriggerButton.svelte.d.ts +0 -24
- package/package/monaco_workers/cssWorker-es.js +0 -43763
- package/package/monaco_workers/editorWorker-es.d.ts +0 -2
- package/package/monaco_workers/editorWorker-es.js +0 -8066
- package/package/monaco_workers/htmlWorker-es.js +0 -21551
- package/package/monaco_workers/jsonWorker-es.js +0 -13523
- package/package/monaco_workers/tsWorker-es.d.ts +0 -103
- package/package/monaco_workers/tsWorker-es.js +0 -212193
|
@@ -148,7 +148,7 @@ async function uploadFileToS3(fileToUpload, fileToUploadKey) {
|
|
|
148
148
|
});
|
|
149
149
|
return;
|
|
150
150
|
}
|
|
151
|
-
dispatch('addition', { path: uploadData.path });
|
|
151
|
+
dispatch('addition', { path: uploadData.path, filename: fileToUpload.name });
|
|
152
152
|
sendUserToast('File upload finished!');
|
|
153
153
|
uploadData.progress = 100;
|
|
154
154
|
$fileUploads = $fileUploads.map((fileUpload) => {
|
|
@@ -14,6 +14,7 @@ import BunIcon from '../../icons/BunIcon.svelte';
|
|
|
14
14
|
import DenoIcon from '../../icons/DenoIcon.svelte';
|
|
15
15
|
import PHPIcon from '../../icons/PHPIcon.svelte';
|
|
16
16
|
import RustIcon from '../../icons/RustIcon.svelte';
|
|
17
|
+
import AnsibleIcon from '../../icons/AnsibleIcon.svelte';
|
|
17
18
|
export let lang;
|
|
18
19
|
export let width = 30;
|
|
19
20
|
export let height = 30;
|
|
@@ -34,7 +35,8 @@ const languageLabel = {
|
|
|
34
35
|
mssql: 'MS SQL Server',
|
|
35
36
|
bun: 'TypeScript',
|
|
36
37
|
php: 'PHP',
|
|
37
|
-
rust: 'Rust'
|
|
38
|
+
rust: 'Rust',
|
|
39
|
+
ansible: 'Ansible Playbook'
|
|
38
40
|
};
|
|
39
41
|
const langToComponent = {
|
|
40
42
|
go: GoIcon,
|
|
@@ -57,7 +59,8 @@ const langToComponent = {
|
|
|
57
59
|
nativets: RestIcon,
|
|
58
60
|
graphql: GraphqlIcon,
|
|
59
61
|
php: PHPIcon,
|
|
60
|
-
rust: RustIcon
|
|
62
|
+
rust: RustIcon,
|
|
63
|
+
ansible: AnsibleIcon
|
|
61
64
|
};
|
|
62
65
|
let subIconScale = width === 30 ? 0.6 : 0.8;
|
|
63
66
|
</script>
|
|
@@ -41,7 +41,8 @@ const placementsClasses = {
|
|
|
41
41
|
'bottom-start': 'origin-top-left left-0',
|
|
42
42
|
'bottom-end': 'origin-top-right right-0',
|
|
43
43
|
'top-start': 'origin-bottom-left left-0 bottom-0',
|
|
44
|
-
'top-end': 'origin-bottom-right right-0 bottom-0'
|
|
44
|
+
'top-end': 'origin-bottom-right right-0 bottom-0',
|
|
45
|
+
'top-center': 'origin-top-left -top-full left-1/2 transform -translate-x-1/2 -translate-y-full'
|
|
45
46
|
};
|
|
46
47
|
const dispatch = createEventDispatcher();
|
|
47
48
|
</script>
|
|
@@ -7,6 +7,7 @@ import ResolveOpen from './ResolveOpen.svelte';
|
|
|
7
7
|
export let placement = 'bottom-start';
|
|
8
8
|
export let justifyEnd = false;
|
|
9
9
|
export let lightMode = false;
|
|
10
|
+
export let maxHeight = 900;
|
|
10
11
|
const [floatingRef, floatingContent] = createFloatingActions({
|
|
11
12
|
strategy: 'fixed',
|
|
12
13
|
middleware: [offset(), flip(), shift()],
|
|
@@ -34,9 +35,10 @@ const [floatingRef, floatingContent] = createFloatingActions({
|
|
|
34
35
|
>
|
|
35
36
|
<MenuItems
|
|
36
37
|
class={twMerge(
|
|
37
|
-
'border w-56 origin-top-right rounded-md shadow-md focus:outline-none',
|
|
38
|
+
'border w-56 origin-top-right rounded-md shadow-md focus:outline-none overflow-y-auto',
|
|
38
39
|
lightMode ? 'bg-surface-inverse' : 'bg-surface'
|
|
39
40
|
)}
|
|
41
|
+
style="max-height: {maxHeight}px;"
|
|
40
42
|
>
|
|
41
43
|
<div class="my-1">
|
|
42
44
|
<slot />
|
|
@@ -6,10 +6,12 @@ export let floatingConfig = {
|
|
|
6
6
|
placement: 'bottom-start'
|
|
7
7
|
};
|
|
8
8
|
export let containerClasses = 'rounded-lg shadow-md border p-4 bg-surface';
|
|
9
|
+
export let floatingClasses = '';
|
|
9
10
|
const [floatingRef, floatingContent] = createFloatingActions(floatingConfig);
|
|
10
11
|
export let blockOpen = false;
|
|
11
12
|
export let shouldUsePortal = true;
|
|
12
13
|
export let target = undefined;
|
|
14
|
+
export let noTransition = false;
|
|
13
15
|
</script>
|
|
14
16
|
|
|
15
17
|
<Popover on:close class="leading-none">
|
|
@@ -19,22 +21,30 @@ export let target = undefined;
|
|
|
19
21
|
</div>
|
|
20
22
|
</PopoverButton>
|
|
21
23
|
<ConditionalPortal condition={shouldUsePortal} {target}>
|
|
22
|
-
<div use:floatingContent class=
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
24
|
+
<div use:floatingContent class={`z5000 ${floatingClasses}`}>
|
|
25
|
+
{#if !noTransition}
|
|
26
|
+
<Transition
|
|
27
|
+
show={blockOpen || undefined}
|
|
28
|
+
enter="transition ease-out duration-200"
|
|
29
|
+
enterFrom="opacity-0 translate-y-1"
|
|
30
|
+
enterTo="opacity-100 translate-y-0"
|
|
31
|
+
leave="transition ease-in duration-150"
|
|
32
|
+
leaveFrom="opacity-100 translate-y-0"
|
|
33
|
+
leaveTo="opacity-0 translate-y-1"
|
|
34
|
+
>
|
|
35
|
+
<PopoverPanel let:close static={blockOpen}>
|
|
36
|
+
<div class={containerClasses}>
|
|
37
|
+
<slot {close} />
|
|
38
|
+
</div>
|
|
39
|
+
</PopoverPanel>
|
|
40
|
+
</Transition>
|
|
41
|
+
{:else}
|
|
42
|
+
<PopoverPanel focus={false} let:close static={blockOpen}>
|
|
33
43
|
<div class={containerClasses}>
|
|
34
44
|
<slot {close} />
|
|
35
45
|
</div>
|
|
36
46
|
</PopoverPanel>
|
|
37
|
-
|
|
47
|
+
{/if}
|
|
38
48
|
</div>
|
|
39
49
|
</ConditionalPortal>
|
|
40
50
|
</Popover>
|
|
@@ -4,9 +4,11 @@ declare const __propDef: {
|
|
|
4
4
|
props: {
|
|
5
5
|
floatingConfig?: ComputeConfig | undefined;
|
|
6
6
|
containerClasses?: string | undefined;
|
|
7
|
+
floatingClasses?: string | undefined;
|
|
7
8
|
blockOpen?: boolean | undefined;
|
|
8
9
|
shouldUsePortal?: boolean | undefined;
|
|
9
10
|
target?: string | HTMLElement | undefined;
|
|
11
|
+
noTransition?: boolean | undefined;
|
|
10
12
|
};
|
|
11
13
|
events: {
|
|
12
14
|
close: CustomEvent<any>;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<script>import Portal from '../../Portal.svelte';
|
|
2
|
+
import { clickOutside } from '../../../utils';
|
|
3
|
+
import { createFloatingActions } from 'svelte-floating-ui';
|
|
4
|
+
export let floatingConfig = {
|
|
5
|
+
strategy: 'absolute',
|
|
6
|
+
//@ts-ignore
|
|
7
|
+
placement: 'bottom-center'
|
|
8
|
+
};
|
|
9
|
+
export let open = false;
|
|
10
|
+
export let target = undefined;
|
|
11
|
+
// export let containerClasses: string = 'rounded-lg shadow-md border p-4 bg-surface'
|
|
12
|
+
// export let floatingClasses: string = ''
|
|
13
|
+
const [floatingRef, floatingContent] = createFloatingActions(floatingConfig);
|
|
14
|
+
function close(div) {
|
|
15
|
+
open = false;
|
|
16
|
+
}
|
|
17
|
+
let acceptClickoutside = false;
|
|
18
|
+
function pointerup() {
|
|
19
|
+
setTimeout(() => {
|
|
20
|
+
acceptClickoutside = true;
|
|
21
|
+
}, 100);
|
|
22
|
+
}
|
|
23
|
+
function pointerdown() {
|
|
24
|
+
if (acceptClickoutside && open) {
|
|
25
|
+
open = false;
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
acceptClickoutside = false;
|
|
29
|
+
open = true;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
</script>
|
|
33
|
+
|
|
34
|
+
<div use:floatingRef>
|
|
35
|
+
<slot {pointerup} {pointerdown} name="button" />
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
<Portal {target}>
|
|
39
|
+
{#if open}
|
|
40
|
+
<div
|
|
41
|
+
class="border rounded-lg shadow-lg bg-surface z5000"
|
|
42
|
+
style="position:absolute"
|
|
43
|
+
use:floatingContent
|
|
44
|
+
>
|
|
45
|
+
<div
|
|
46
|
+
use:clickOutside
|
|
47
|
+
on:click_outside={() => {
|
|
48
|
+
if (acceptClickoutside) {
|
|
49
|
+
acceptClickoutside = false
|
|
50
|
+
open = false
|
|
51
|
+
}
|
|
52
|
+
}}
|
|
53
|
+
>
|
|
54
|
+
<slot {close} />
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
{/if}
|
|
58
|
+
</Portal>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { type ComputeConfig } from 'svelte-floating-ui';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
floatingConfig?: ComputeConfig | undefined;
|
|
6
|
+
open?: boolean | undefined;
|
|
7
|
+
target?: string | undefined;
|
|
8
|
+
};
|
|
9
|
+
events: {
|
|
10
|
+
[evt: string]: CustomEvent<any>;
|
|
11
|
+
};
|
|
12
|
+
slots: {
|
|
13
|
+
button: {
|
|
14
|
+
pointerup: () => void;
|
|
15
|
+
pointerdown: () => void;
|
|
16
|
+
};
|
|
17
|
+
default: {
|
|
18
|
+
close: (div: Element | null) => void;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export type PopupV2Props = typeof __propDef.props;
|
|
23
|
+
export type PopupV2Events = typeof __propDef.events;
|
|
24
|
+
export type PopupV2Slots = typeof __propDef.slots;
|
|
25
|
+
export default class PopupV2 extends SvelteComponent<PopupV2Props, PopupV2Events, PopupV2Slots> {
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
@@ -11,7 +11,7 @@ let instructionsField = undefined;
|
|
|
11
11
|
let genLoading = false;
|
|
12
12
|
let abortController = new AbortController();
|
|
13
13
|
$: instructionsField && setTimeout(() => instructionsField?.focus(), 100);
|
|
14
|
-
const SYSTEM = "You are a helpful assitant for creating CRON schedules. The structure is 'second minute hour dayOfMonth month dayOfWeek'. Weekdays are Sunday (1), Monday (2), Tuesday (3), Wednesday (4), Thursday (5), Friday (6), Saturday (7). You only return the CRON string. If it is invalid, you will return an error message preceeded by 'ERROR:'.";
|
|
14
|
+
const SYSTEM = "You are a helpful assitant for creating CRON schedules. The structure is 'second minute hour dayOfMonth month dayOfWeek'. Weekdays are Sunday (1), Monday (2), Tuesday (3), Wednesday (4), Thursday (5), Friday (6), Saturday (7). You only return the CRON string without any wrapping characters. If it is invalid, you will return an error message preceeded by 'ERROR:'.";
|
|
15
15
|
const USER = 'CRON schedule instructions: {instructions}';
|
|
16
16
|
async function generateCron() {
|
|
17
17
|
genLoading = true;
|
|
@@ -14,7 +14,7 @@ let input;
|
|
|
14
14
|
let abortController = undefined;
|
|
15
15
|
const dispatch = createEventDispatcher();
|
|
16
16
|
async function onGenerate() {
|
|
17
|
-
if (funcDesc
|
|
17
|
+
if (funcDesc?.length <= 0) {
|
|
18
18
|
return;
|
|
19
19
|
}
|
|
20
20
|
savePrompt();
|
|
@@ -24,7 +24,7 @@ async function onGenerate() {
|
|
|
24
24
|
const res = await getNonStreamingCompletion([
|
|
25
25
|
{
|
|
26
26
|
role: 'system',
|
|
27
|
-
content: 'Generate a regex pattern that one can use in a javascript Regex object. Output only the regex itself. The regex should match the following:'
|
|
27
|
+
content: 'Generate a regex pattern that one can use in a javascript Regex object. Output only the regex itself without any wrapping characters including the / characters. The regex should match the following:'
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
role: 'user',
|
|
@@ -113,7 +113,7 @@ function clearPromptHistory() {
|
|
|
113
113
|
bind:this={input}
|
|
114
114
|
bind:value={funcDesc}
|
|
115
115
|
on:keypress={({ key }) => {
|
|
116
|
-
if (key === 'Enter' && funcDesc
|
|
116
|
+
if (key === 'Enter' && funcDesc?.length > 0) {
|
|
117
117
|
close(input || null)
|
|
118
118
|
onGenerate()
|
|
119
119
|
}
|
|
@@ -130,7 +130,7 @@ function clearPromptHistory() {
|
|
|
130
130
|
close(input || null)
|
|
131
131
|
onGenerate()
|
|
132
132
|
}}
|
|
133
|
-
disabled={funcDesc
|
|
133
|
+
disabled={funcDesc?.length <= 0}
|
|
134
134
|
iconOnly
|
|
135
135
|
startIcon={{ icon: Wand2 }}
|
|
136
136
|
/>
|
|
@@ -93,7 +93,7 @@ $: {
|
|
|
93
93
|
f={(x) => (emptyString(x.summary) ? x.path : x.summary + ' (' + x.path + ')')}
|
|
94
94
|
/>
|
|
95
95
|
|
|
96
|
-
<div class="text-primary transition-all {funcDesc
|
|
96
|
+
<div class="text-primary transition-all {funcDesc?.length > 0 ? 'w-96' : 'w-60'}">
|
|
97
97
|
<div>
|
|
98
98
|
<div class="flex p-2 relative">
|
|
99
99
|
<input
|
|
@@ -101,7 +101,7 @@ $: {
|
|
|
101
101
|
bind:this={input}
|
|
102
102
|
bind:value={funcDesc}
|
|
103
103
|
on:input={() => {
|
|
104
|
-
if (funcDesc
|
|
104
|
+
if (funcDesc?.length > 2) {
|
|
105
105
|
getHubCompletions(funcDesc)
|
|
106
106
|
} else {
|
|
107
107
|
hubCompletions = []
|
|
@@ -109,14 +109,14 @@ $: {
|
|
|
109
109
|
}}
|
|
110
110
|
placeholder="Search {trigger ? 'triggers' : 'scripts'} or AI gen"
|
|
111
111
|
/>
|
|
112
|
-
{#if funcDesc
|
|
112
|
+
{#if funcDesc?.length === 0}
|
|
113
113
|
<Wand2
|
|
114
114
|
size={14}
|
|
115
115
|
class="absolute right-4 top-1/2 -translate-y-1/2 fill-current opacity-70 text-violet-800 dark:text-violet-400"
|
|
116
116
|
/>
|
|
117
117
|
{/if}
|
|
118
118
|
</div>
|
|
119
|
-
{#if !disableAi && funcDesc
|
|
119
|
+
{#if !disableAi && funcDesc?.length > 0}
|
|
120
120
|
<ul class="transition-all divide-y">
|
|
121
121
|
<li>
|
|
122
122
|
<button
|
|
@@ -164,11 +164,11 @@ $: {
|
|
|
164
164
|
</li>
|
|
165
165
|
</ul>
|
|
166
166
|
{/if}
|
|
167
|
-
{#if funcDesc
|
|
167
|
+
{#if funcDesc?.length > 0 && filteredItems?.length > 0}
|
|
168
168
|
<div class="text-left mt-2">
|
|
169
169
|
<p class="text-xs text-secondary ml-2">Workspace {trigger ? 'Triggers' : 'Scripts'}</p>
|
|
170
170
|
<ul class="transition-all divide-y">
|
|
171
|
-
{#each filteredItems
|
|
171
|
+
{#each filteredItems?.slice(0, 3) ?? [] as item (item.path)}
|
|
172
172
|
<li>
|
|
173
173
|
<button
|
|
174
174
|
class="py-2 gap-4 flex flex-row hover:bg-surface-hover transition-all items-center justify-between w-full"
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<script>import { workspaceStore } from '../../stores';
|
|
2
|
+
import { ScriptService } from '../../gen';
|
|
3
|
+
import { Wand2, Loader2 } from 'lucide-svelte';
|
|
4
|
+
import SearchItems from '../SearchItems.svelte';
|
|
5
|
+
import { emptyString } from '../../utils';
|
|
6
|
+
import { onMount } from 'svelte';
|
|
7
|
+
export let funcDesc;
|
|
8
|
+
export let trigger = false;
|
|
9
|
+
export let loading = false;
|
|
10
|
+
export let preFilter;
|
|
11
|
+
let scripts = undefined;
|
|
12
|
+
export let filteredItems = [];
|
|
13
|
+
$: prefilteredItems = scripts ?? [];
|
|
14
|
+
async function loadScripts() {
|
|
15
|
+
const loadedScripts = await ScriptService.listScripts({
|
|
16
|
+
workspace: $workspaceStore,
|
|
17
|
+
perPage: 300,
|
|
18
|
+
kinds: trigger ? 'trigger' : 'script'
|
|
19
|
+
});
|
|
20
|
+
scripts = loadedScripts;
|
|
21
|
+
}
|
|
22
|
+
$: scripts == undefined && funcDesc?.length > 1 && loadScripts();
|
|
23
|
+
let input;
|
|
24
|
+
$: preFilter &&
|
|
25
|
+
setTimeout(() => {
|
|
26
|
+
input?.focus();
|
|
27
|
+
}, 50);
|
|
28
|
+
onMount(() => {
|
|
29
|
+
input?.focus();
|
|
30
|
+
});
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<SearchItems
|
|
34
|
+
filter={funcDesc}
|
|
35
|
+
items={prefilteredItems}
|
|
36
|
+
bind:filteredItems
|
|
37
|
+
f={(x) => (emptyString(x.summary) ? x.path : x.summary + ' (' + x.path + ')')}
|
|
38
|
+
/>
|
|
39
|
+
|
|
40
|
+
<div class="relative text-primary items-center transition-all flex-grow">
|
|
41
|
+
<div class="grow items-cente">
|
|
42
|
+
<input
|
|
43
|
+
bind:this={input}
|
|
44
|
+
type="text"
|
|
45
|
+
bind:value={funcDesc}
|
|
46
|
+
placeholder="Search {trigger ? 'triggers' : 'scripts'} or AI gen"
|
|
47
|
+
/>
|
|
48
|
+
</div>
|
|
49
|
+
<div class="absolute inset-y-0 right-3 flex items-center pointer-events-none">
|
|
50
|
+
{#if loading}
|
|
51
|
+
<Loader2 size={16} class="animate-spin text-gray-400" />
|
|
52
|
+
{/if}
|
|
53
|
+
{#if funcDesc?.length === 0 && !loading}
|
|
54
|
+
<Wand2 size={14} class="fill-current opacity-70 text-violet-800 dark:text-violet-400" />
|
|
55
|
+
{/if}
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { type Script } from '../../gen';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
funcDesc: string;
|
|
6
|
+
trigger?: boolean | undefined;
|
|
7
|
+
loading?: boolean | undefined;
|
|
8
|
+
preFilter: string;
|
|
9
|
+
filteredItems?: any[] | (Script & {
|
|
10
|
+
marked?: string | undefined;
|
|
11
|
+
})[] | undefined;
|
|
12
|
+
};
|
|
13
|
+
events: {
|
|
14
|
+
[evt: string]: CustomEvent<any>;
|
|
15
|
+
};
|
|
16
|
+
slots: {};
|
|
17
|
+
};
|
|
18
|
+
export type StepGenQuickProps = typeof __propDef.props;
|
|
19
|
+
export type StepGenQuickEvents = typeof __propDef.events;
|
|
20
|
+
export type StepGenQuickSlots = typeof __propDef.slots;
|
|
21
|
+
export default class StepGenQuick extends SvelteComponent<StepGenQuickProps, StepGenQuickEvents, StepGenQuickSlots> {
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -41,6 +41,59 @@ To maintain state across runs, you can use get_state() and set_state(value) whic
|
|
|
41
41
|
|
|
42
42
|
{additionalInformation}`
|
|
43
43
|
};
|
|
44
|
+
// const preprocessorPrompts: {
|
|
45
|
+
// bun: string
|
|
46
|
+
// python3: string
|
|
47
|
+
// } = {
|
|
48
|
+
// bun: `I'm building a workflow which is a sequence of script steps. Write the preprocessor step in {codeLang} which should check for {description} and return an array.
|
|
49
|
+
// The preprocessor step is executed before flow begins to map trigger specific inputs to the flow inputs.
|
|
50
|
+
// Here is an example of what the preprocessor step should look like:
|
|
51
|
+
// \`\`\`{codeLang}
|
|
52
|
+
// export async function preprocessor(
|
|
53
|
+
// wm_trigger: {
|
|
54
|
+
// kind: 'http' | 'email' | 'webhook',
|
|
55
|
+
// http?: {
|
|
56
|
+
// route: string // The route path, e.g. "/users/:id"
|
|
57
|
+
// path: string // The actual path called, e.g. "/users/123"
|
|
58
|
+
// method: string
|
|
59
|
+
// params: Record<string, string>
|
|
60
|
+
// query: Record<string, string>
|
|
61
|
+
// headers: Record<string, string>
|
|
62
|
+
// }
|
|
63
|
+
// },
|
|
64
|
+
// /* your other args */
|
|
65
|
+
// ) {
|
|
66
|
+
// return {
|
|
67
|
+
// // return the args to be passed to the flow
|
|
68
|
+
// }
|
|
69
|
+
// }
|
|
70
|
+
// \`\`\`
|
|
71
|
+
// {additionalInformation}`,
|
|
72
|
+
// python3: `I'm building a workflow which is a sequence of script steps. Write the preprocessor step in {codeLang} which should check for {description} and return an array.
|
|
73
|
+
// The preprocessor step is executed before flow begins to map trigger specific inputs to the flow inputs.
|
|
74
|
+
// Here is an example of what the preprocessor step should look like:
|
|
75
|
+
// \`\`\`{codeLang}
|
|
76
|
+
// from typing import TypedDict, Literal
|
|
77
|
+
// class Http(TypedDict):
|
|
78
|
+
// route: str # The route path, e.g. "/users/:id"
|
|
79
|
+
// path: str # The actual path called, e.g. "/users/123"
|
|
80
|
+
// method: str
|
|
81
|
+
// params: dict[str, str]
|
|
82
|
+
// query: dict[str, str]
|
|
83
|
+
// headers: dict[str, str]
|
|
84
|
+
// class WmTrigger(TypedDict):
|
|
85
|
+
// kind: Literal["http", "email", "webhook"]
|
|
86
|
+
// http: Http | None
|
|
87
|
+
// def preprocessor(
|
|
88
|
+
// wm_trigger: WmTrigger,
|
|
89
|
+
// # your other args
|
|
90
|
+
// ):
|
|
91
|
+
// return {
|
|
92
|
+
// # return the args to be passed to the flow
|
|
93
|
+
// }
|
|
94
|
+
// \`\`\`
|
|
95
|
+
// {additionalInformation}`
|
|
96
|
+
// }
|
|
44
97
|
const firstActionPrompt = `I'm building a workflow which is a sequence of script steps. Write a script in {codeLang} which should {description}.
|
|
45
98
|
Return the script's output.
|
|
46
99
|
|
|
@@ -111,6 +164,8 @@ export async function stepCopilot(module, deltaCodeStore, workspace, pastModule,
|
|
|
111
164
|
const codeLang = lang === 'python3' ? 'python' : 'typescript (Node.js)';
|
|
112
165
|
let prompt = module.type === 'trigger'
|
|
113
166
|
? triggerPrompts[lang]
|
|
167
|
+
// : module.type === 'preprocessor'
|
|
168
|
+
// ? preprocessorPrompts[lang]
|
|
114
169
|
: pastModule === undefined
|
|
115
170
|
? firstActionPrompt
|
|
116
171
|
: isFirstInLoop
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script>import { Tabs, Tab, TabContent } from '../common';
|
|
2
|
-
import { CalendarCheck2, MailIcon, Terminal, Webhook } from 'lucide-svelte';
|
|
2
|
+
import { CalendarCheck2, MailIcon, Route, Terminal, Webhook } from 'lucide-svelte';
|
|
3
3
|
import { Pane, Splitpanes } from 'svelte-splitpanes';
|
|
4
4
|
import HighlightTheme from '../HighlightTheme.svelte';
|
|
5
5
|
import FlowViewerInner from '../FlowViewerInner.svelte';
|
|
@@ -54,6 +54,12 @@ $: !hasStepDetails && selected === 'flow_step' && (selected = 'saved_inputs');
|
|
|
54
54
|
Schedules
|
|
55
55
|
</span>
|
|
56
56
|
</Tab>
|
|
57
|
+
<Tab value="routes">
|
|
58
|
+
<span class="flex flex-row gap-2 items-center">
|
|
59
|
+
<Route size={14} />
|
|
60
|
+
HTTP
|
|
61
|
+
</span>
|
|
62
|
+
</Tab>
|
|
57
63
|
<Tab value="email">
|
|
58
64
|
<span class="flex flex-row gap-2 items-center">
|
|
59
65
|
<MailIcon size={14} />
|
|
@@ -72,6 +78,8 @@ $: !hasStepDetails && selected === 'flow_step' && (selected = 'saved_inputs');
|
|
|
72
78
|
<div class="h-full overflow-auto">
|
|
73
79
|
{#if triggerSelected === 'webhooks'}
|
|
74
80
|
<slot name="webhooks" />
|
|
81
|
+
{:else if triggerSelected === 'routes'}
|
|
82
|
+
<slot name="routes" />
|
|
75
83
|
{:else if triggerSelected === 'email'}
|
|
76
84
|
<slot name="email" />
|
|
77
85
|
{:else if triggerSelected === 'schedule'}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
|
-
triggerSelected?: "email" | "schedule" | "webhooks" | "cli" | undefined;
|
|
4
|
+
triggerSelected?: "email" | "schedule" | "webhooks" | "cli" | "routes" | undefined;
|
|
5
5
|
flow_json?: any | undefined;
|
|
6
6
|
hasStepDetails?: boolean | undefined;
|
|
7
7
|
isOperator?: boolean | undefined;
|
|
@@ -14,6 +14,7 @@ declare const __propDef: {
|
|
|
14
14
|
save_inputs: {};
|
|
15
15
|
details: {};
|
|
16
16
|
webhooks: {};
|
|
17
|
+
routes: {};
|
|
17
18
|
email: {};
|
|
18
19
|
schedule: {};
|
|
19
20
|
cli: {};
|
|
@@ -29,6 +29,7 @@ let clientWidth = window.innerWidth;
|
|
|
29
29
|
{hasStepDetails}
|
|
30
30
|
>
|
|
31
31
|
<slot slot="webhooks" name="webhooks" />
|
|
32
|
+
<slot slot="routes" name="routes" />
|
|
32
33
|
<slot slot="email" name="email" />
|
|
33
34
|
<slot slot="schedule" name="schedule" />
|
|
34
35
|
<slot slot="cli" name="cli" />
|
|
@@ -54,6 +55,7 @@ let clientWidth = window.innerWidth;
|
|
|
54
55
|
<TabContent value="detail" class="flex flex-col flex-1 h-full">
|
|
55
56
|
<DetailPageDetailPanel bind:triggerSelected bind:selected {isOperator} {hasStepDetails}>
|
|
56
57
|
<slot slot="webhooks" name="webhooks" />
|
|
58
|
+
<slot slot="routes" name="routes" />
|
|
57
59
|
<slot slot="email" name="email" />
|
|
58
60
|
<slot slot="schedule" name="schedule" />
|
|
59
61
|
<slot slot="cli" name="cli" />
|
|
@@ -4,5 +4,4 @@ export declare function archiveScript(hash: string, workspace: string): Promise<
|
|
|
4
4
|
export declare function unarchiveScript(hash: string, workspace: string): Promise<string>;
|
|
5
5
|
export declare function getScriptDeploymentStatus(hash: string, workspace: string): Promise<any>;
|
|
6
6
|
export declare function loadScript(hash: string, workspace: string): Promise<any>;
|
|
7
|
-
export declare function runScript(scheduledForStr: string | undefined, args: Record<string, any>, hash: string, workspace: string, invisibleToOwner?: boolean): Promise<string>;
|
|
8
7
|
export declare function curlCommand(async: boolean, args: any, $page: any, workspace: string, script: any): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ScriptService
|
|
1
|
+
import { ScriptService } from '../../gen';
|
|
2
2
|
export async function deleteScript(hash, workspace) {
|
|
3
3
|
return await ScriptService.deleteScriptByHash({ workspace: workspace, hash });
|
|
4
4
|
}
|
|
@@ -34,17 +34,6 @@ export async function loadScript(hash, workspace) {
|
|
|
34
34
|
}
|
|
35
35
|
return { script, hash };
|
|
36
36
|
}
|
|
37
|
-
export async function runScript(scheduledForStr, args, hash, workspace, invisibleToOwner) {
|
|
38
|
-
const scheduledFor = scheduledForStr ? new Date(scheduledForStr).toISOString() : undefined;
|
|
39
|
-
let run = await JobService.runScriptByHash({
|
|
40
|
-
workspace: workspace,
|
|
41
|
-
hash: hash,
|
|
42
|
-
requestBody: args,
|
|
43
|
-
scheduledFor,
|
|
44
|
-
invisibleToOwner
|
|
45
|
-
});
|
|
46
|
-
return run;
|
|
47
|
-
}
|
|
48
37
|
export function curlCommand(async, args, $page, workspace, script) {
|
|
49
38
|
return `curl -H 'Content-Type: application/json' -H "Authorization: Bearer $TOKEN" -X POST -d '${JSON.stringify(args)}' ${$page.url.protocol}//${$page.url.hostname}/api/w/${workspace}/jobs/run${async ? '' : '_wait_result'}/p/${script?.path}`;
|
|
50
39
|
}
|
|
@@ -12,11 +12,12 @@ export let disableTutorials = false;
|
|
|
12
12
|
export let disableAi = false;
|
|
13
13
|
export let disableSettings = false;
|
|
14
14
|
export let smallErrorHandler = false;
|
|
15
|
-
let size =
|
|
15
|
+
let size = 50;
|
|
16
16
|
const { currentStepStore: copilotCurrentStepStore } = getContext('FlowCopilotContext');
|
|
17
17
|
</script>
|
|
18
18
|
|
|
19
19
|
<div
|
|
20
|
+
id="flow-editor"
|
|
20
21
|
class={classNames(
|
|
21
22
|
'h-full overflow-hidden transition-colors duration-[400ms] ease-linear border-t',
|
|
22
23
|
$copilotCurrentStepStore !== undefined ? 'border-gray-500/75' : ''
|