windmill-components 1.21.0 → 1.28.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/AppConnect.svelte +93 -47
- package/components/AppConnect.svelte.d.ts +2 -2
- package/components/ArgInfo.svelte +0 -5
- package/components/ArgInput.svelte +91 -66
- package/components/ArgInput.svelte.d.ts +8 -3
- package/components/Button.svelte +4 -4
- package/components/CenteredPage.svelte +1 -1
- package/components/CollapseLink.svelte +12 -0
- package/components/CollapseLink.svelte.d.ts +19 -0
- package/components/CronInput.svelte +84 -0
- package/components/CronInput.svelte.d.ts +18 -0
- package/components/DisplayResult.svelte +23 -7
- package/components/Editor.svelte +144 -61
- package/components/Editor.svelte.d.ts +2 -0
- package/components/EditorBar.svelte +215 -0
- package/components/EditorBar.svelte.d.ts +23 -0
- package/components/FlowBuilder.svelte +151 -79
- package/components/FlowEditor.svelte +77 -130
- package/components/FlowEditor.svelte.d.ts +3 -2
- package/components/FlowJobResult.svelte +1 -1
- package/components/FlowPreview.svelte +18 -24
- package/components/FlowPreviewContent.svelte +68 -0
- package/components/FlowPreviewContent.svelte.d.ts +21 -0
- package/components/FlowStatusViewer.svelte +85 -37
- package/components/FlowStatusViewer.svelte.d.ts +3 -2
- package/components/FlowViewer.svelte +100 -26
- package/components/FlowViewer.svelte.d.ts +8 -3
- package/components/IconedResourceType.svelte +30 -5
- package/components/InputTransformForm.svelte +209 -0
- package/components/InputTransformForm.svelte.d.ts +26 -0
- package/components/InviteGlobalUser.svelte +2 -2
- package/components/InviteUser.svelte +2 -2
- package/components/JobStatus.svelte +32 -25
- package/components/Modal.svelte +47 -43
- package/components/ModuleStep.svelte +100 -54
- package/components/ObjectResourceInput.svelte +58 -38
- package/components/ObjectTypeNarrowing.svelte +4 -19
- package/components/Path.svelte +3 -3
- package/components/Path.svelte.d.ts +1 -1
- package/components/RadioButton.svelte +11 -96
- package/components/RadioButton.svelte.d.ts +4 -2
- package/components/ResourceEditor.svelte +5 -6
- package/components/ResourceEditor.svelte.d.ts +2 -2
- package/components/ResourcePicker.svelte +25 -2
- package/components/ResourcePicker.svelte.d.ts +3 -0
- package/components/ResourceTypePicker.svelte +17 -29
- package/components/ResourceTypePicker.svelte.d.ts +1 -0
- package/components/RunForm.svelte +14 -15
- package/components/RunForm.svelte.d.ts +1 -1
- package/components/SchemaEditor.svelte +87 -71
- package/components/SchemaEditor.svelte.d.ts +2 -0
- package/components/SchemaEditorProperty.svelte +11 -0
- package/components/SchemaEditorProperty.svelte.d.ts +17 -0
- package/components/SchemaForm.svelte +21 -127
- package/components/SchemaForm.svelte.d.ts +3 -4
- package/components/SchemaModal.svelte +20 -33
- package/components/SchemaModal.svelte.d.ts +1 -1
- package/components/SchemaViewer.svelte +5 -7
- package/components/ScriptBuilder.svelte +41 -44
- package/components/ScriptEditor.svelte +76 -248
- package/components/ScriptPicker.svelte +13 -26
- package/components/ScriptPicker.svelte.d.ts +1 -1
- package/components/ScriptSchema.svelte +0 -5
- package/components/ShareModal.svelte +1 -1
- package/components/SharedBadge.svelte +12 -10
- package/components/StringTypeNarrowing.svelte +8 -4
- package/components/StringTypeNarrowing.svelte.d.ts +1 -0
- package/components/TableCustom.svelte +7 -9
- package/components/TableSimple.svelte +1 -1
- package/components/Toggle.svelte +8 -10
- package/components/Toggle.svelte.d.ts +5 -11
- package/components/Tooltip.svelte +56 -82
- package/components/Tooltip.svelte.d.ts +1 -5
- package/components/VariableEditor.svelte +21 -6
- package/components/flows/CopyFirstStepSchema.svelte +7 -5
- package/components/flows/DynamicInputHelpBox.svelte +1 -1
- package/components/flows/FlowBox.svelte +3 -0
- package/components/flows/FlowBox.svelte.d.ts +23 -0
- package/components/flows/FlowBoxHeader.svelte +9 -0
- package/components/flows/FlowBoxHeader.svelte.d.ts +18 -0
- package/components/flows/FlowInput.svelte +20 -0
- package/components/flows/FlowInput.svelte.d.ts +14 -0
- package/components/flows/FlowInputs.svelte +7 -3
- package/components/flows/FlowModuleHeader.svelte +44 -41
- package/components/flows/FlowModuleHeader.svelte.d.ts +1 -1
- package/components/flows/FlowSettings.svelte +174 -0
- package/components/flows/FlowSettings.svelte.d.ts +21 -0
- package/components/flows/flowStore.d.ts +5 -2
- package/components/flows/flowStore.js +65 -9
- package/components/flows/pickers/FlowScriptPicker.svelte +6 -1
- package/components/flows/pickers/FlowScriptPicker.svelte.d.ts +1 -0
- package/components/flows/utils.d.ts +11 -11
- package/components/flows/utils.js +103 -63
- package/components/icons/AirtableIcon.svelte +17 -0
- package/components/icons/AirtableIcon.svelte.d.ts +17 -0
- package/components/icons/GCloudIcon.svelte +16 -0
- package/components/icons/GCloudIcon.svelte.d.ts +17 -0
- package/components/icons/GItlabIcon.svelte +16 -0
- package/components/icons/GItlabIcon.svelte.d.ts +17 -0
- package/components/icons/GSheetsIcon.svelte +16 -0
- package/components/icons/GSheetsIcon.svelte.d.ts +17 -0
- package/components/icons/GcalIcon.svelte +16 -0
- package/components/icons/GcalIcon.svelte.d.ts +17 -0
- package/components/icons/GdriveIcon.svelte +16 -0
- package/components/icons/GdriveIcon.svelte.d.ts +17 -0
- package/components/icons/GmailIcon.svelte +16 -0
- package/components/icons/GmailIcon.svelte.d.ts +17 -0
- package/components/icons/PostgresIcon.svelte +8 -49
- package/components/icons/Slack.svelte +9 -18
- package/components/icons/TogglIcon.svelte +59 -0
- package/components/icons/TogglIcon.svelte.d.ts +17 -0
- package/components/propertyPicker/ObjectViewer.svelte +35 -37
- package/components/propertyPicker/ObjectViewer.svelte.d.ts +1 -0
- package/components/propertyPicker/OverlayPropertyPicker.svelte +53 -53
- package/components/propertyPicker/OverlayPropertyPicker.svelte.d.ts +5 -2
- package/components/propertyPicker/PropPicker.svelte +13 -15
- package/components/propertyPicker/PropPicker.svelte.d.ts +1 -1
- package/components/propertyPicker/WarningMessage.svelte +14 -41
- package/components/propertyPicker/WarningMessage.svelte.d.ts +11 -8
- package/components/propertyPicker/utils.d.ts +1 -0
- package/components/propertyPicker/utils.js +25 -0
- package/gen/core/OpenAPI.js +1 -1
- package/gen/index.d.ts +12 -2
- package/gen/index.js +1 -2
- package/gen/models/CompletedJob.d.ts +1 -1
- package/gen/models/Flow.d.ts +3 -13
- package/gen/models/FlowMetadata.d.ts +9 -0
- package/gen/models/FlowMetadata.js +4 -0
- package/gen/models/FlowModuleValue.d.ts +5 -22
- package/gen/models/FlowModuleValue.js +1 -15
- package/gen/models/ForloopFlow.d.ts +8 -0
- package/gen/models/ForloopFlow.js +4 -0
- package/gen/models/InputTransform.d.ts +3 -12
- package/gen/models/InputTransform.js +1 -8
- package/gen/models/JavascriptTransform.d.ts +4 -0
- package/gen/models/JavascriptTransform.js +4 -0
- package/gen/models/MainArgSignature.d.ts +1 -1
- package/gen/models/NewSchedule.d.ts +1 -0
- package/gen/models/OpenFlow.d.ts +7 -0
- package/gen/models/OpenFlow.js +4 -0
- package/gen/models/OpenFlowWPath.d.ts +4 -0
- package/gen/models/OpenFlowWPath.js +4 -0
- package/gen/models/PathFlow.d.ts +4 -0
- package/gen/models/PathFlow.js +4 -0
- package/gen/models/PathScript.d.ts +4 -0
- package/gen/models/PathScript.js +4 -0
- package/gen/models/RawScript.d.ts +12 -0
- package/gen/models/RawScript.js +11 -0
- package/gen/models/Schedule.d.ts +1 -1
- package/gen/models/StaticTransform.d.ts +4 -0
- package/gen/models/StaticTransform.js +4 -0
- package/gen/models/TokenResponse.d.ts +3 -3
- package/gen/models/Usage.d.ts +5 -0
- package/gen/models/Usage.js +4 -0
- package/gen/models/User.d.ts +2 -0
- package/gen/schemas/$AuditLog.d.ts +32 -0
- package/gen/schemas/$AuditLog.js +35 -0
- package/gen/schemas/$CompletedJob.d.ts +98 -0
- package/gen/schemas/$CompletedJob.js +103 -0
- package/gen/schemas/$ContextualVariable.d.ts +16 -0
- package/gen/schemas/$ContextualVariable.js +19 -0
- package/gen/schemas/$CreateResource.d.ts +22 -0
- package/gen/schemas/$CreateResource.js +25 -0
- package/gen/schemas/$CreateVariable.d.ts +26 -0
- package/gen/schemas/$CreateVariable.js +29 -0
- package/gen/schemas/$CreateWorkspace.d.ts +20 -0
- package/gen/schemas/$CreateWorkspace.js +23 -0
- package/gen/schemas/$EditResource.d.ts +13 -0
- package/gen/schemas/$EditResource.js +16 -0
- package/gen/schemas/$EditResourceType.d.ts +10 -0
- package/gen/schemas/$EditResourceType.js +13 -0
- package/gen/schemas/$EditSchedule.d.ts +20 -0
- package/gen/schemas/$EditSchedule.js +23 -0
- package/gen/schemas/$EditVariable.d.ts +16 -0
- package/gen/schemas/$EditVariable.js +19 -0
- package/gen/schemas/$EditWorkspaceUser.d.ts +7 -0
- package/gen/schemas/$EditWorkspaceUser.js +10 -0
- package/gen/schemas/$Flow.d.ts +23 -0
- package/gen/schemas/$Flow.js +26 -0
- package/gen/schemas/$FlowMetadata.d.ts +31 -0
- package/gen/schemas/$FlowMetadata.js +34 -0
- package/gen/schemas/$FlowPreview.d.ts +80 -0
- package/gen/schemas/$FlowPreview.js +83 -0
- package/gen/schemas/$GlobalUserInfo.d.ts +26 -0
- package/gen/schemas/$GlobalUserInfo.js +29 -0
- package/gen/schemas/$Group.d.ts +23 -0
- package/gen/schemas/$Group.js +26 -0
- package/gen/schemas/$Job.d.ts +17 -0
- package/gen/schemas/$Job.js +20 -0
- package/gen/schemas/$ListableVariable.d.ts +35 -0
- package/gen/schemas/$ListableVariable.js +38 -0
- package/gen/schemas/$Login.d.ts +12 -0
- package/gen/schemas/$Login.js +15 -0
- package/gen/schemas/$MainArgSignature.d.ts +50 -0
- package/gen/schemas/$MainArgSignature.js +53 -0
- package/gen/schemas/$NewSchedule.d.ts +30 -0
- package/gen/schemas/$NewSchedule.js +33 -0
- package/gen/schemas/$NewToken.d.ts +11 -0
- package/gen/schemas/$NewToken.js +14 -0
- package/gen/schemas/$NewUser.d.ts +16 -0
- package/gen/schemas/$NewUser.js +19 -0
- package/gen/schemas/$Preview.d.ts +19 -0
- package/gen/schemas/$Preview.js +22 -0
- package/gen/schemas/$QueuedJob.d.ts +139 -0
- package/gen/schemas/$QueuedJob.js +144 -0
- package/gen/schemas/$Resource.d.ts +31 -0
- package/gen/schemas/$Resource.js +34 -0
- package/gen/schemas/$ResourceType.d.ts +17 -0
- package/gen/schemas/$ResourceType.js +20 -0
- package/gen/schemas/$Schedule.d.ts +47 -0
- package/gen/schemas/$Schedule.js +50 -0
- package/gen/schemas/$Script.d.ts +77 -0
- package/gen/schemas/$Script.js +80 -0
- package/gen/schemas/$ScriptArgs.d.ts +6 -0
- package/gen/schemas/$ScriptArgs.js +9 -0
- package/gen/schemas/$SlackToken.d.ts +24 -0
- package/gen/schemas/$SlackToken.js +27 -0
- package/gen/schemas/$TokenResponse.d.ts +23 -0
- package/gen/schemas/$TokenResponse.js +26 -0
- package/gen/schemas/$TruncatedToken.d.ts +25 -0
- package/gen/schemas/$TruncatedToken.js +28 -0
- package/gen/schemas/$Usage.d.ts +13 -0
- package/gen/schemas/$Usage.js +16 -0
- package/gen/schemas/$User.d.ts +42 -0
- package/gen/schemas/$User.js +45 -0
- package/gen/schemas/$UserWorkspaceList.d.ts +28 -0
- package/gen/schemas/$UserWorkspaceList.js +31 -0
- package/gen/schemas/$WorkerPing.d.ts +31 -0
- package/gen/schemas/$WorkerPing.js +34 -0
- package/gen/schemas/$Workspace.d.ts +19 -0
- package/gen/schemas/$Workspace.js +22 -0
- package/gen/schemas/$WorkspaceInvite.d.ts +16 -0
- package/gen/schemas/$WorkspaceInvite.js +19 -0
- package/gen/services/FlowService.d.ts +30 -16
- package/gen/services/FlowService.js +25 -0
- package/gen/services/JobService.d.ts +1 -1
- package/gen/services/ScriptService.d.ts +13 -8
- package/gen/services/WorkspaceService.d.ts +1 -1
- package/gen/services/WorkspaceService.js +1 -1
- package/infer.js +8 -1
- package/package.json +87 -15
- package/script_helpers.d.ts +1 -1
- package/script_helpers.js +7 -6
- package/sql.d.ts +89 -0
- package/sql.js +817 -0
- package/stores.d.ts +1 -1
- package/stores.js +0 -6
- package/utils.d.ts +26 -6
- package/utils.js +94 -7
- package/components/RadioButtonV2.svelte +0 -38
- package/components/RadioButtonV2.svelte.d.ts +0 -20
|
@@ -10,7 +10,7 @@ const dispatch = createEventDispatcher();
|
|
|
10
10
|
- the second slot should be a <tbody>, containing th elements
|
|
11
11
|
-->
|
|
12
12
|
<div class="flex flex-col {$$props.class} min-w-full">
|
|
13
|
-
<div class="inline-block min-w-full py-2 align-middle
|
|
13
|
+
<div class="inline-block min-w-full py-2 align-middle">
|
|
14
14
|
<table id="table-custom" class="min-w-full divide-y divide-gray-300 table-auto">
|
|
15
15
|
<thead>
|
|
16
16
|
<slot name="header-row" />
|
|
@@ -22,18 +22,16 @@ const dispatch = createEventDispatcher();
|
|
|
22
22
|
<div class="flex flex-row-reverse text-gray-500 mb-6">
|
|
23
23
|
<button
|
|
24
24
|
class="ml-2 drop-shadow-md {showNext ? 'visible' : 'invisible'}"
|
|
25
|
-
on:click={() =>
|
|
26
|
-
dispatch('next')
|
|
27
|
-
}}>Next</button
|
|
25
|
+
on:click={() => dispatch('next')}
|
|
28
26
|
>
|
|
27
|
+
Next
|
|
28
|
+
</button>
|
|
29
29
|
<button
|
|
30
30
|
class="mx-2 drop-shadow-md {currentPage === 1 ? 'hidden' : ''}"
|
|
31
|
-
on:click={() =>
|
|
32
|
-
dispatch('previous')
|
|
33
|
-
}}>Previous</button
|
|
31
|
+
on:click={() => dispatch('previous')}
|
|
34
32
|
>
|
|
33
|
+
Previous
|
|
34
|
+
</button>
|
|
35
35
|
</div>
|
|
36
36
|
{/if}
|
|
37
37
|
</div>
|
|
38
|
-
|
|
39
|
-
<style></style>
|
|
@@ -10,7 +10,7 @@ const dispatch = createEventDispatcher();
|
|
|
10
10
|
</script>
|
|
11
11
|
|
|
12
12
|
<div class="mt-8 flex flex-col {$$props.class}">
|
|
13
|
-
<div class="inline-block min-w-full
|
|
13
|
+
<div class="inline-block min-w-full align-middle">
|
|
14
14
|
<table class="min-w-full divide-y divide-gray-300 table-auto">
|
|
15
15
|
<thead>
|
|
16
16
|
<tr class={twTextSize}>
|
package/components/Toggle.svelte
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
<script>import { createEventDispatcher } from 'svelte';
|
|
2
|
-
export let
|
|
3
|
-
export let
|
|
4
|
-
|
|
5
|
-
const id = Date.now().toString(36);
|
|
2
|
+
export let options = {};
|
|
3
|
+
export let checked = false;
|
|
4
|
+
const id = (Math.random() + 1).toString(36).substring(10);
|
|
6
5
|
const dispatch = createEventDispatcher();
|
|
7
6
|
</script>
|
|
8
7
|
|
|
9
8
|
<span>
|
|
10
9
|
<label for={id} class="inline-flex items-center cursor-pointer mt-2">
|
|
11
|
-
{#if Boolean(options
|
|
12
|
-
<span class="mr-2 text-sm font-medium text-gray-900">{options
|
|
10
|
+
{#if Boolean(options?.left)}
|
|
11
|
+
<span class="mr-2 text-sm font-medium text-gray-900">{options?.left}</span>
|
|
13
12
|
{/if}
|
|
14
13
|
<div class="relative">
|
|
15
14
|
<input
|
|
@@ -19,16 +18,15 @@ const dispatch = createEventDispatcher();
|
|
|
19
18
|
class="sr-only peer"
|
|
20
19
|
bind:checked
|
|
21
20
|
on:change={() => {
|
|
22
|
-
|
|
23
|
-
dispatch('change', value)
|
|
21
|
+
dispatch('change', checked)
|
|
24
22
|
}}
|
|
25
23
|
/>
|
|
26
24
|
<div
|
|
27
25
|
class="w-11 h-6 bg-gray-200 rounded-full peer peer-focus:ring-4 peer-focus:ring-blue-300 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-600"
|
|
28
26
|
/>
|
|
29
27
|
</div>
|
|
30
|
-
{#if Boolean(options
|
|
31
|
-
<span class="ml-2 text-sm font-medium text-gray-900">{options
|
|
28
|
+
{#if Boolean(options?.right)}
|
|
29
|
+
<span class="ml-2 text-sm font-medium text-gray-900">{options?.right}</span>
|
|
32
30
|
{/if}
|
|
33
31
|
</label>
|
|
34
32
|
</span>
|
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
10
|
-
right: {
|
|
11
|
-
label?: string | undefined;
|
|
12
|
-
value: any;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
4
|
+
options?: {
|
|
5
|
+
left?: string | undefined;
|
|
6
|
+
right?: string | undefined;
|
|
7
|
+
} | undefined;
|
|
8
|
+
checked?: boolean | undefined;
|
|
15
9
|
};
|
|
16
10
|
events: {
|
|
17
11
|
change: CustomEvent<any>;
|
|
@@ -1,93 +1,67 @@
|
|
|
1
|
-
<script>import
|
|
2
|
-
import
|
|
1
|
+
<script>import { faInfoCircle } from '@fortawesome/free-solid-svg-icons';
|
|
2
|
+
import Icon from 'svelte-awesome';
|
|
3
|
+
import { createPopperActions } from 'svelte-popperjs';
|
|
3
4
|
import { fade } from 'svelte/transition';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
5
|
+
const [popperRef, popperContent] = createPopperActions({
|
|
6
|
+
placement: 'auto'
|
|
7
|
+
});
|
|
8
|
+
const betterPreventOverflow = (options) => ({
|
|
9
|
+
name: 'preventOverflow',
|
|
10
|
+
options,
|
|
11
|
+
effect: ({ state }) => {
|
|
12
|
+
const { padding = 0 } = options;
|
|
13
|
+
state.elements.popper.style.maxWidth = `calc(100vw - ${padding * 2}px)`;
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
const extraOpts = {
|
|
17
|
+
modifiers: [
|
|
18
|
+
betterPreventOverflow({ padding: 50 }),
|
|
19
|
+
{ name: 'offset', options: { offset: [8, 8] } },
|
|
20
|
+
{
|
|
21
|
+
name: 'arrow',
|
|
22
|
+
options: {
|
|
23
|
+
padding: 10 // 5px from the edges of the popper
|
|
24
|
+
}
|
|
15
25
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
26
|
+
]
|
|
27
|
+
};
|
|
28
|
+
let showTooltip = false;
|
|
29
|
+
let timeout;
|
|
30
|
+
function open() {
|
|
31
|
+
clearTimeout(timeout);
|
|
32
|
+
showTooltip = true;
|
|
33
|
+
}
|
|
34
|
+
function close() {
|
|
35
|
+
timeout = setTimeout(() => (showTooltip = false), 200);
|
|
20
36
|
}
|
|
21
37
|
</script>
|
|
22
38
|
|
|
23
|
-
<
|
|
24
|
-
{
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
class="tooltip rounded shadow-lg p-1 leading-4 {position === 'above' ? '-mt-8' : 'mt-6'}
|
|
28
|
-
{viewTooltip ? 'tooltip-visible' : 'tooltip'} {direction === 'left' ? 'right-0' : ''}
|
|
29
|
-
text-2xs text-gray-700"
|
|
30
|
-
on:mouseover={() => {
|
|
31
|
-
mouseOnMessage = true
|
|
32
|
-
}}
|
|
33
|
-
on:focus={() => {}}
|
|
34
|
-
on:mouseout={() => {
|
|
35
|
-
mouseOnMessage = false
|
|
36
|
-
}}
|
|
37
|
-
on:blur={() => {}}
|
|
38
|
-
><slot />
|
|
39
|
-
</span>
|
|
40
|
-
{/if}
|
|
41
|
-
<Icon class="text-gray-500 font-thin inline-block align-middle" data={faInfoCircle} scale={0.6} />
|
|
42
|
-
<!-- Hovering on this (invisible) area triggers the apparition of the tooltip. Needed because the icon is too small-->
|
|
39
|
+
<button use:popperRef on:mouseenter={open} on:mouseleave={close}>
|
|
40
|
+
<Icon class="text-gray-500 font-thin inline-block align-middle" data={faInfoCircle} scale={0.8} />
|
|
41
|
+
</button>
|
|
42
|
+
{#if showTooltip}
|
|
43
43
|
<div
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}}
|
|
56
|
-
on:blur={() => {}}
|
|
57
|
-
/>
|
|
58
|
-
</div>
|
|
44
|
+
transition:fade
|
|
45
|
+
id="tooltip"
|
|
46
|
+
use:popperContent={extraOpts}
|
|
47
|
+
on:mouseenter={open}
|
|
48
|
+
on:mouseleave={close}
|
|
49
|
+
class="w-96 text-left"
|
|
50
|
+
>
|
|
51
|
+
<slot />
|
|
52
|
+
<div id="arrow" data-popper-arrow />
|
|
53
|
+
</div>
|
|
54
|
+
{/if}
|
|
59
55
|
|
|
60
56
|
<style>
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
visibility: hidden;
|
|
64
|
-
|
|
65
|
-
position: absolute;
|
|
66
|
-
|
|
67
|
-
transition-property: opacity;
|
|
68
|
-
|
|
69
|
-
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
70
|
-
|
|
71
|
-
transition-duration: 100ms
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.tooltip-visible {
|
|
75
|
-
|
|
76
|
-
visibility: visible;
|
|
77
|
-
|
|
78
|
-
position: absolute;
|
|
79
|
-
|
|
57
|
+
#tooltip {
|
|
80
58
|
z-index: 50;
|
|
81
|
-
|
|
59
|
+
white-space: normal;
|
|
60
|
+
border-radius: 0.75rem;
|
|
82
61
|
--tw-bg-opacity: 1;
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
transition-property: opacity;
|
|
89
|
-
|
|
90
|
-
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
91
|
-
|
|
92
|
-
transition-duration: 150ms
|
|
62
|
+
background-color: rgb(39 39 42 / var(--tw-bg-opacity));
|
|
63
|
+
padding: 1rem;
|
|
64
|
+
font-weight: 400;
|
|
65
|
+
--tw-text-opacity: 1;
|
|
66
|
+
color: rgb(209 213 219 / var(--tw-text-opacity))
|
|
93
67
|
}</style>
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
2
|
declare const __propDef: {
|
|
3
|
-
props: {
|
|
4
|
-
[x: string]: any;
|
|
5
|
-
position?: ("above" | "below") | undefined;
|
|
6
|
-
direction?: ("default" | "left") | undefined;
|
|
7
|
-
};
|
|
3
|
+
props: {};
|
|
8
4
|
events: {
|
|
9
5
|
[evt: string]: CustomEvent<any>;
|
|
10
6
|
};
|
|
@@ -7,6 +7,7 @@ import Modal from './Modal.svelte';
|
|
|
7
7
|
import { createEventDispatcher } from 'svelte';
|
|
8
8
|
import { workspaceStore } from '../stores';
|
|
9
9
|
import Required from './Required.svelte';
|
|
10
|
+
import Tooltip from './Tooltip.svelte';
|
|
10
11
|
const dispatch = createEventDispatcher();
|
|
11
12
|
let path = '';
|
|
12
13
|
let variable = {
|
|
@@ -120,19 +121,33 @@ async function updateVariable() {
|
|
|
120
121
|
<label class="block pb-6">
|
|
121
122
|
<input type="checkbox" bind:checked={variable.is_secret} />
|
|
122
123
|
<span class="ml-2">Secret</span>
|
|
123
|
-
</label>
|
|
124
|
-
<div class="font-semibold text-gray-700 col-span-10 }">
|
|
125
124
|
{#if variable.is_secret}
|
|
125
|
+
<div
|
|
126
|
+
class="bg-orange-100 border-l-4 border-orange-500 text-orange-700 p-1 mt-1 text-sm"
|
|
127
|
+
role="alert"
|
|
128
|
+
>
|
|
129
|
+
When a secret, you will not be able to read this variable value from the variable editor
|
|
130
|
+
UI but only within scripts. <Tooltip>
|
|
131
|
+
Within scripts, every read of the value create the audit log:
|
|
132
|
+
'variables.decrypt_secret'</Tooltip
|
|
133
|
+
>
|
|
134
|
+
</div>
|
|
135
|
+
{/if}
|
|
136
|
+
</label>
|
|
137
|
+
{#if variable.is_secret}
|
|
138
|
+
<div class="font-semibold text-gray-700 col-span-10 }">
|
|
126
139
|
<Password
|
|
127
140
|
bind:password={variable.value}
|
|
128
141
|
placeholder={'******** (only fill to update value)'}
|
|
129
142
|
label={'variable (max 3000 characters)'}
|
|
130
143
|
/>
|
|
131
|
-
|
|
132
|
-
|
|
144
|
+
</div>
|
|
145
|
+
{:else}
|
|
146
|
+
<div>
|
|
147
|
+
<span>Variable (max 3000 characters)</span>
|
|
133
148
|
<AutosizedTextarea bind:value={variable.value} minRows={5} />
|
|
134
|
-
|
|
135
|
-
|
|
149
|
+
</div>
|
|
150
|
+
{/if}
|
|
136
151
|
|
|
137
152
|
<div class="flex flex-col w-full">
|
|
138
153
|
<span class="text-gray-700">Description<Required required={false} /></span>
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
<script>import {
|
|
1
|
+
<script>import { Button } from 'flowbite-svelte';
|
|
2
|
+
import { copyFirstStepSchema, isCopyFirstStepSchemaDisabled } from './flowStore';
|
|
2
3
|
</script>
|
|
3
4
|
|
|
4
|
-
<
|
|
5
|
-
|
|
5
|
+
<Button
|
|
6
|
+
color="alternative"
|
|
7
|
+
size="sm"
|
|
6
8
|
disabled={$isCopyFirstStepSchemaDisabled}
|
|
7
9
|
on:click={copyFirstStepSchema}
|
|
8
10
|
>
|
|
9
|
-
Copy from step
|
|
10
|
-
</
|
|
11
|
+
Copy from first step schema
|
|
12
|
+
</Button>
|
|
@@ -58,7 +58,7 @@ belong to us`</code
|
|
|
58
58
|
<li><b>params</b>: the object containing the current step static values</li>
|
|
59
59
|
<li>
|
|
60
60
|
<b>step(n)</b>: the function returning the result of step number n. One can also use a
|
|
61
|
-
negative n. step(0) ==
|
|
61
|
+
negative n. step(0) == result of the first step , step(-1) == previous_result
|
|
62
62
|
</li>
|
|
63
63
|
<li>
|
|
64
64
|
<b>variable(path)</b>: the function returning the variable (including secrets) at given path
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} FlowBoxProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} FlowBoxEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} FlowBoxSlots */
|
|
4
|
+
export default class FlowBox extends SvelteComponentTyped<{}, {
|
|
5
|
+
[evt: string]: CustomEvent<any>;
|
|
6
|
+
}, {
|
|
7
|
+
default: {};
|
|
8
|
+
}> {
|
|
9
|
+
}
|
|
10
|
+
export type FlowBoxProps = typeof __propDef.props;
|
|
11
|
+
export type FlowBoxEvents = typeof __propDef.events;
|
|
12
|
+
export type FlowBoxSlots = typeof __propDef.slots;
|
|
13
|
+
import { SvelteComponentTyped } from "svelte";
|
|
14
|
+
declare const __propDef: {
|
|
15
|
+
props: {};
|
|
16
|
+
events: {
|
|
17
|
+
[evt: string]: CustomEvent<any>;
|
|
18
|
+
};
|
|
19
|
+
slots: {
|
|
20
|
+
default: {};
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
title?: string | undefined;
|
|
5
|
+
};
|
|
6
|
+
events: {
|
|
7
|
+
[evt: string]: CustomEvent<any>;
|
|
8
|
+
};
|
|
9
|
+
slots: {
|
|
10
|
+
default: {};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export declare type FlowBoxHeaderProps = typeof __propDef.props;
|
|
14
|
+
export declare type FlowBoxHeaderEvents = typeof __propDef.events;
|
|
15
|
+
export declare type FlowBoxHeaderSlots = typeof __propDef.slots;
|
|
16
|
+
export default class FlowBoxHeader extends SvelteComponentTyped<FlowBoxHeaderProps, FlowBoxHeaderEvents, FlowBoxHeaderSlots> {
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script>import SchemaEditor from '../SchemaEditor.svelte';
|
|
2
|
+
import { flowStore } from './../flows/flowStore';
|
|
3
|
+
import CopyFirstStepSchema from './CopyFirstStepSchema.svelte';
|
|
4
|
+
import FlowBox from './FlowBox.svelte';
|
|
5
|
+
import FlowBoxHeader from './FlowBoxHeader.svelte';
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<FlowBox>
|
|
9
|
+
<FlowBoxHeader title="Flow Inputs">
|
|
10
|
+
<CopyFirstStepSchema />
|
|
11
|
+
</FlowBoxHeader>
|
|
12
|
+
<div class="p-6 ">
|
|
13
|
+
<SchemaEditor
|
|
14
|
+
on:change={() => {
|
|
15
|
+
$flowStore = $flowStore
|
|
16
|
+
}}
|
|
17
|
+
schema={$flowStore.schema}
|
|
18
|
+
/>
|
|
19
|
+
</div>
|
|
20
|
+
</FlowBox>
|
|
@@ -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 FlowInputProps = typeof __propDef.props;
|
|
10
|
+
export declare type FlowInputEvents = typeof __propDef.events;
|
|
11
|
+
export declare type FlowInputSlots = typeof __propDef.slots;
|
|
12
|
+
export default class FlowInput extends SvelteComponentTyped<FlowInputProps, FlowInputEvents, FlowInputSlots> {
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<script>import {
|
|
1
|
+
<script>import { RawScript } from '../../gen';
|
|
2
2
|
import { faCode } from '@fortawesome/free-solid-svg-icons';
|
|
3
3
|
import { createEventDispatcher } from 'svelte';
|
|
4
4
|
import FlowScriptPicker from './pickers/FlowScriptPicker.svelte';
|
|
@@ -15,13 +15,17 @@ const dispatch = createEventDispatcher();
|
|
|
15
15
|
label="New Typescript {isTrigger ? 'trigger ' : ''}script (Deno)"
|
|
16
16
|
icon={faCode}
|
|
17
17
|
iconColor="text-blue-800"
|
|
18
|
-
on:click={() => dispatch('new', { language:
|
|
18
|
+
on:click={() => dispatch('new', { language: RawScript.language.DENO })}
|
|
19
19
|
/>
|
|
20
|
+
|
|
20
21
|
<FlowScriptPicker
|
|
21
22
|
disabled={isTrigger}
|
|
22
23
|
label="New Python {isTrigger ? 'trigger ' : ''}script (3.10)"
|
|
23
24
|
icon={faCode}
|
|
24
25
|
iconColor="text-yellow-500"
|
|
25
|
-
on:click={() => dispatch('new', { language:
|
|
26
|
+
on:click={() => dispatch('new', { language: RawScript.language.PYTHON3 })}
|
|
27
|
+
tooltip={isTrigger
|
|
28
|
+
? 'Python is not supported for trigger scripts yet but is supported for every other steps'
|
|
29
|
+
: undefined}
|
|
26
30
|
/>
|
|
27
31
|
</div>
|
|
@@ -1,24 +1,31 @@
|
|
|
1
|
-
<script>import {
|
|
1
|
+
<script>import { getScriptByPath } from '../../utils';
|
|
2
2
|
import { faCode, faCodeBranch, faSave, faTrashAlt } from '@fortawesome/free-solid-svg-icons';
|
|
3
|
+
import { Button } from 'flowbite-svelte';
|
|
3
4
|
import Icon from 'svelte-awesome';
|
|
4
5
|
import { Highlight } from 'svelte-highlight';
|
|
5
|
-
import
|
|
6
|
-
import
|
|
6
|
+
import python from 'svelte-highlight/languages/python';
|
|
7
|
+
import typescript from 'svelte-highlight/languages/typescript';
|
|
7
8
|
import Modal from '../Modal.svelte';
|
|
9
|
+
import FlowBoxHeader from './FlowBoxHeader.svelte';
|
|
8
10
|
import { createScriptFromInlineScript, fork, removeModule } from './flowStore';
|
|
9
|
-
import {
|
|
11
|
+
import { scrollIntoView } from './utils';
|
|
10
12
|
export let open;
|
|
11
13
|
export let i;
|
|
12
14
|
export let shouldPick = false;
|
|
13
15
|
export let mod;
|
|
14
16
|
let modalViewer;
|
|
15
17
|
let modalViewerContent = '';
|
|
16
|
-
let modalViewerLanguage =
|
|
18
|
+
let modalViewerLanguage = 'deno';
|
|
17
19
|
async function viewCode() {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
+
}
|
|
22
29
|
}
|
|
23
30
|
function scrollTo({ target }) {
|
|
24
31
|
const el = document.querySelector(target.getAttribute('href'));
|
|
@@ -26,61 +33,57 @@ function scrollTo({ target }) {
|
|
|
26
33
|
}
|
|
27
34
|
</script>
|
|
28
35
|
|
|
29
|
-
<
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
<a href="#module-{i}" class="grow" on:click={() => (open = i)} on:click|preventDefault={scrollTo}
|
|
36
|
-
><div class="w-full" /></a
|
|
36
|
+
<FlowBoxHeader>
|
|
37
|
+
<a
|
|
38
|
+
href="#module-{i}"
|
|
39
|
+
class="grow text-inherit"
|
|
40
|
+
on:click={() => (open = i)}
|
|
41
|
+
on:click|preventDefault={scrollTo}
|
|
37
42
|
>
|
|
43
|
+
<slot />
|
|
44
|
+
</a>
|
|
38
45
|
|
|
39
46
|
<div class="flex flex-row space-x-2">
|
|
40
|
-
{#if mod.value.type ===
|
|
41
|
-
<
|
|
42
|
-
type="button"
|
|
47
|
+
{#if mod.value.type === 'script' && !shouldPick}
|
|
48
|
+
<Button
|
|
43
49
|
on:click={() => {
|
|
44
50
|
open = i
|
|
45
51
|
fork(i)
|
|
46
52
|
}}
|
|
47
|
-
|
|
53
|
+
size="sm"
|
|
54
|
+
color="alternative"
|
|
48
55
|
>
|
|
49
|
-
<Icon data={faCodeBranch} class=
|
|
56
|
+
<Icon data={faCodeBranch} class="mr-2" />
|
|
50
57
|
Fork
|
|
51
|
-
</
|
|
52
|
-
<
|
|
53
|
-
<Icon data={faCode} class="
|
|
58
|
+
</Button>
|
|
59
|
+
<Button size="sm" color="alternative" on:click={viewCode}>
|
|
60
|
+
<Icon data={faCode} class="mr-2" />
|
|
54
61
|
View code
|
|
55
|
-
</
|
|
62
|
+
</Button>
|
|
56
63
|
{/if}
|
|
57
64
|
|
|
58
|
-
{#if mod.value.type ===
|
|
59
|
-
<
|
|
60
|
-
|
|
61
|
-
on:click={() => createScriptFromInlineScript(i)}
|
|
62
|
-
class="default-secondary-button-v2 text-sm"
|
|
63
|
-
>
|
|
64
|
-
<Icon data={faSave} class="w-4 mr-4" />
|
|
65
|
+
{#if mod.value.type === 'rawscript' && !shouldPick}
|
|
66
|
+
<Button size="sm" color="alternative" on:click={() => createScriptFromInlineScript(i)}>
|
|
67
|
+
<Icon data={faSave} class="mr-2" />
|
|
65
68
|
Save to workspace
|
|
66
|
-
</
|
|
69
|
+
</Button>
|
|
67
70
|
{/if}
|
|
68
|
-
<
|
|
69
|
-
|
|
71
|
+
<Button
|
|
72
|
+
size="sm"
|
|
73
|
+
color="alternative"
|
|
70
74
|
on:click={() => {
|
|
71
75
|
open = -1
|
|
72
76
|
removeModule(i)
|
|
73
77
|
}}
|
|
74
|
-
class="default-secondary-button-v2 text-xs"
|
|
75
78
|
>
|
|
76
|
-
<Icon data={faTrashAlt} class="
|
|
79
|
+
<Icon data={faTrashAlt} class="mr-2" />
|
|
77
80
|
Remove step
|
|
78
|
-
</
|
|
81
|
+
</Button>
|
|
79
82
|
</div>
|
|
80
|
-
</
|
|
83
|
+
</FlowBoxHeader>
|
|
81
84
|
|
|
82
85
|
<Modal bind:this={modalViewer}>
|
|
83
|
-
<div slot="title">Script {mod?.value.path}</div>
|
|
86
|
+
<div slot="title">Script {'path' in mod?.value ? mod?.value.path : ''}</div>
|
|
84
87
|
<div slot="content">
|
|
85
88
|
{#if modalViewerLanguage === 'python3'}
|
|
86
89
|
<Highlight language={python} code={modalViewerContent} />
|