windmill-components 1.36.2 → 1.46.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/common.d.ts +1 -0
- package/components/AppConnect.svelte +45 -49
- package/components/ArgInfo.svelte +37 -15
- package/components/ArgInput.svelte +33 -34
- package/components/ArgInput.svelte.d.ts +3 -1
- package/components/ButtonAndDropdown.svelte +1 -1
- package/components/CenteredPage.svelte +2 -2
- package/components/CronInput.svelte +24 -20
- package/components/CronInput.svelte.d.ts +1 -0
- package/components/DisplayResult.svelte +4 -4
- package/components/Dropdown.svelte +10 -13
- package/components/Dropdown.svelte.d.ts +4 -1
- package/components/Editor.svelte +39 -6
- package/components/Editor.svelte.d.ts +4 -1
- package/components/EditorBar.svelte +81 -37
- package/components/EditorBar.svelte.d.ts +4 -1
- package/components/FieldHeader.svelte +6 -5
- package/components/FlowBuilder.svelte +52 -55
- package/components/FlowBuilder.svelte.d.ts +2 -0
- package/components/FlowJobResult.svelte +11 -18
- package/components/FlowJobResult.svelte.d.ts +2 -2
- package/components/FlowMetadata.svelte +65 -0
- package/components/FlowMetadata.svelte.d.ts +17 -0
- package/components/FlowModulesViewer.svelte +18 -6
- package/components/FlowPreviewContent.svelte +88 -51
- package/components/FlowPreviewContent.svelte.d.ts +1 -0
- package/components/FlowStatusViewer.svelte +129 -52
- package/components/FlowStatusViewer.svelte.d.ts +8 -3
- package/components/FlowViewer.svelte +84 -9
- package/components/FlowViewer.svelte.d.ts +1 -0
- package/components/GroupModal.svelte +43 -44
- package/components/GroupModal.svelte.d.ts +2 -2
- package/components/HighlightCode.svelte +4 -1
- package/components/HighlightCode.svelte.d.ts +1 -1
- package/components/IconedResourceType.svelte +6 -4
- package/components/IconedResourceType.svelte.d.ts +1 -0
- package/components/InputTransformForm.svelte +50 -40
- package/components/InputTransformForm.svelte.d.ts +3 -3
- package/components/InputTransformsViewer.svelte +2 -1
- package/components/InviteGlobalUser.svelte +6 -10
- package/components/InviteGlobalUser.svelte.d.ts +1 -4
- package/components/InviteUser.svelte +4 -8
- package/components/InviteUser.svelte.d.ts +1 -4
- package/components/ItemPicker.svelte +50 -43
- package/components/ItemPicker.svelte.d.ts +2 -2
- package/components/JobArgs.svelte +33 -0
- package/components/JobArgs.svelte.d.ts +16 -0
- package/components/JobStatus.svelte +21 -17
- package/components/LogViewer.svelte +11 -6
- package/components/Modal.svelte +5 -5
- package/components/Modal.svelte.d.ts +4 -4
- package/components/ModulePreview.svelte +47 -63
- package/components/ModulePreview.svelte.d.ts +0 -1
- package/components/PageHeader.svelte +8 -8
- package/components/Password.svelte +1 -1
- package/components/Path.svelte +28 -7
- package/components/Path.svelte.d.ts +4 -4
- package/components/Popover.svelte +61 -0
- package/components/Popover.svelte.d.ts +17 -0
- package/components/Required.svelte +4 -4
- package/components/Required.svelte.d.ts +1 -0
- package/components/ResourceEditor.svelte +105 -116
- package/components/ResourceEditor.svelte.d.ts +0 -1
- package/components/ResourcePicker.svelte +9 -6
- package/components/ResourceTypePicker.svelte +3 -1
- package/components/RunChart.svelte +102 -0
- package/components/RunChart.svelte.d.ts +20 -0
- package/components/RunForm.svelte +58 -41
- package/components/RunForm.svelte.d.ts +13 -0
- package/components/SchemaEditor.svelte +5 -5
- package/components/SchemaEditorProperty.svelte +1 -1
- package/components/SchemaForm.svelte +5 -3
- package/components/SchemaForm.svelte.d.ts +1 -0
- package/components/SchemaModal.svelte +113 -105
- package/components/SchemaModal.svelte.d.ts +4 -4
- package/components/SchemaViewer.svelte +7 -4
- package/components/ScriptBuilder.svelte +143 -163
- package/components/ScriptBuilder.svelte.d.ts +1 -0
- package/components/ScriptEditor.svelte +119 -131
- package/components/ScriptEditor.svelte.d.ts +1 -0
- package/components/ScriptPicker.svelte +16 -24
- package/components/ScriptPicker.svelte.d.ts +1 -1
- package/components/ScriptSchema.svelte +33 -32
- package/components/ShareModal.svelte +74 -68
- package/components/ShareModal.svelte.d.ts +2 -2
- package/components/SharedBadge.svelte +4 -0
- package/components/SimpleEditor.svelte +4 -2
- package/components/SuperadminSettings.svelte +134 -0
- package/components/SuperadminSettings.svelte.d.ts +19 -0
- package/components/TableCustom.svelte +1 -1
- package/components/TableSimple.svelte +1 -1
- package/components/TestJobLoader.svelte +16 -9
- package/components/TestJobLoader.svelte.d.ts +4 -2
- package/components/Toggle.svelte +5 -3
- package/components/Toggle.svelte.d.ts +2 -0
- package/components/Tooltip.svelte +9 -64
- package/components/UserSettings.svelte +241 -0
- package/components/UserSettings.svelte.d.ts +19 -0
- package/components/VariableEditor.svelte +80 -74
- package/components/common/actionRow/ActionRow.svelte +5 -4
- package/components/common/alert/Alert.svelte +1 -1
- package/components/common/alert/Alert.svelte.d.ts +1 -0
- package/components/common/badge/Badge.svelte +4 -9
- package/components/common/breadcrumb/Breadcrumb.svelte +24 -0
- package/components/common/breadcrumb/Breadcrumb.svelte.d.ts +22 -0
- package/components/common/button/Button.svelte +23 -8
- package/components/common/button/Button.svelte.d.ts +1 -0
- package/components/common/button/ButtonPopup.svelte +1 -0
- package/components/common/button/model.d.ts +1 -1
- package/components/common/confirmationModal/ConfirmationModal.svelte +1 -0
- package/components/common/confirmationModal/UnsavedConfirmationModal.svelte +2 -1
- package/components/common/drawer/Drawer.svelte +38 -7
- package/components/common/drawer/Drawer.svelte.d.ts +6 -0
- package/components/common/drawer/DrawerContent.svelte +21 -7
- package/components/common/drawer/DrawerContent.svelte.d.ts +4 -0
- package/components/common/index.d.ts +5 -0
- package/components/common/index.js +5 -0
- package/components/common/kbd/Kbd.svelte +1 -1
- package/components/common/languageIcons/Bash.svelte +18 -0
- package/components/common/languageIcons/Bash.svelte.d.ts +27 -0
- package/components/common/languageIcons/Go.svelte +34 -0
- package/components/common/languageIcons/Go.svelte.d.ts +27 -0
- package/components/common/languageIcons/LanguageIcon.svelte +19 -0
- package/components/common/languageIcons/LanguageIcon.svelte.d.ts +21 -0
- package/components/common/languageIcons/Python.svelte +51 -0
- package/components/common/languageIcons/Python.svelte.d.ts +27 -0
- package/components/common/languageIcons/TypeScript.svelte +31 -0
- package/components/common/languageIcons/TypeScript.svelte.d.ts +27 -0
- package/components/common/languageIcons/index.d.ts +5 -0
- package/components/common/languageIcons/index.js +5 -0
- package/components/common/menu/Menu.svelte +15 -19
- package/components/common/skeleton/Skeleton.svelte +37 -0
- package/components/common/skeleton/Skeleton.svelte.d.ts +20 -0
- package/components/common/skeleton/SkeletonElement.svelte +8 -0
- package/components/common/skeleton/SkeletonElement.svelte.d.ts +17 -0
- package/components/common/skeleton/model.d.ts +21 -0
- package/components/common/skeleton/model.js +1 -0
- package/components/common/tabs/TabContent.svelte +2 -1
- package/components/common/tabs/TabContent.svelte.d.ts +1 -0
- package/components/common/tabs/Tabs.svelte +8 -6
- package/components/common/tabs/Tabs.svelte.d.ts +1 -0
- package/components/flows/FlowEditor.svelte +11 -20
- package/components/flows/FlowProgressBar.svelte +55 -0
- package/components/flows/FlowProgressBar.svelte.d.ts +21 -0
- package/components/flows/common/FlowCardHeader.svelte +5 -6
- package/components/flows/content/CapturePayload.svelte +112 -0
- package/components/flows/content/CapturePayload.svelte.d.ts +17 -0
- package/components/flows/content/DynamicInputHelpBox.svelte +6 -10
- package/components/flows/content/FlowBranchAllWrapper.svelte +21 -0
- package/components/flows/content/FlowBranchAllWrapper.svelte.d.ts +21 -0
- package/components/flows/content/FlowBranchOneWrapper.svelte +49 -0
- package/components/flows/content/FlowBranchOneWrapper.svelte.d.ts +23 -0
- package/components/flows/content/FlowBranchesWrapper.svelte +140 -0
- package/components/flows/content/FlowBranchesWrapper.svelte.d.ts +19 -0
- package/components/flows/content/FlowEditorPanel.svelte +8 -6
- package/components/flows/content/FlowFailureModule.svelte +4 -6
- package/components/flows/content/FlowInput.svelte +31 -6
- package/components/flows/content/FlowInputs.svelte +119 -50
- package/components/flows/content/FlowInputs.svelte.d.ts +5 -4
- package/components/flows/content/FlowLoop.svelte +85 -142
- package/components/flows/content/FlowLoop.svelte.d.ts +2 -1
- package/components/flows/content/FlowModuleComponent.svelte +231 -0
- package/components/flows/content/FlowModuleComponent.svelte.d.ts +20 -0
- package/components/flows/content/FlowModuleEarlyStop.svelte +45 -48
- package/components/flows/content/FlowModuleEarlyStop.svelte.d.ts +1 -0
- package/components/flows/content/FlowModuleHeader.svelte +11 -40
- package/components/flows/content/FlowModuleHeader.svelte.d.ts +0 -1
- package/components/flows/content/FlowModuleScript.svelte +7 -12
- package/components/flows/content/FlowModuleScript.svelte.d.ts +1 -2
- package/components/flows/content/FlowModuleSuspend.svelte +84 -6
- package/components/flows/content/FlowModuleSuspend.svelte.d.ts +1 -0
- package/components/flows/content/FlowModuleWrapper.svelte +138 -38
- package/components/flows/content/FlowModuleWrapper.svelte.d.ts +6 -1
- package/components/flows/content/FlowRetries.svelte +13 -2
- package/components/flows/content/FlowRetries.svelte.d.ts +1 -0
- package/components/flows/content/FlowSchedules.svelte +0 -2
- package/components/flows/content/FlowSettings.svelte +103 -72
- package/components/flows/content/RemoveStepConfirmationModal.svelte +0 -1
- package/components/flows/flowState.d.ts +8 -8
- package/components/flows/flowState.js +32 -17
- package/components/flows/flowStateUtils.d.ts +21 -38
- package/components/flows/flowStateUtils.js +87 -159
- package/components/flows/flowStore.d.ts +3 -2
- package/components/flows/flowStore.js +60 -7
- package/components/flows/header/FlowImportExportMenu.svelte +11 -21
- package/components/flows/header/FlowPreviewButtons.svelte +13 -12
- package/components/flows/map/FlowBranchAllMap.svelte +90 -0
- package/components/flows/map/FlowBranchAllMap.svelte.d.ts +17 -0
- package/components/flows/map/FlowBranchOneMap.svelte +116 -0
- package/components/flows/map/FlowBranchOneMap.svelte.d.ts +17 -0
- package/components/flows/map/FlowErrorHandlerItem.svelte +14 -11
- package/components/flows/map/FlowInputsItem.svelte +19 -0
- package/components/flows/map/FlowInputsItem.svelte.d.ts +14 -0
- package/components/flows/map/FlowModuleSchemaItem.svelte +53 -36
- package/components/flows/map/FlowModuleSchemaItem.svelte.d.ts +5 -5
- package/components/flows/map/FlowModuleSchemaMap.svelte +73 -144
- package/components/flows/map/FlowModuleSchemaMap.svelte.d.ts +2 -3
- package/components/flows/map/FlowSettingsItem.svelte +29 -0
- package/components/flows/map/FlowSettingsItem.svelte.d.ts +14 -0
- package/components/flows/map/InsertModuleButton.svelte +11 -0
- package/components/flows/map/InsertModuleButton.svelte.d.ts +16 -0
- package/components/flows/map/MapItem.svelte +105 -0
- package/components/flows/map/MapItem.svelte.d.ts +22 -0
- package/components/flows/pickers/FlowScriptPicker.svelte +14 -4
- package/components/flows/pickers/FlowScriptPicker.svelte.d.ts +1 -1
- package/components/flows/pickers/PickHubScript.svelte +5 -4
- package/components/flows/pickers/PickHubScript.svelte.d.ts +1 -0
- package/components/flows/pickers/PickScript.svelte +6 -5
- package/components/flows/pickers/PickScript.svelte.d.ts +1 -0
- package/components/flows/previousResults.d.ts +14 -0
- package/components/flows/previousResults.js +118 -0
- package/components/flows/propPicker/PropPickerWrapper.svelte +24 -15
- package/components/flows/propPicker/PropPickerWrapper.svelte.d.ts +7 -2
- package/components/flows/utils.d.ts +8 -3
- package/components/flows/utils.js +86 -46
- package/components/graph/FlowGraph.svelte +259 -0
- package/components/graph/FlowGraph.svelte.d.ts +20 -0
- package/components/graph/index.d.ts +3 -0
- package/components/graph/index.js +3 -0
- package/components/graph/model.d.ts +20 -0
- package/components/graph/model.js +9 -0
- package/components/graph/util.d.ts +9 -0
- package/components/graph/util.js +14 -0
- package/components/icons/WindmillIcon.svelte +85 -52
- package/components/icons/WindmillIcon.svelte.d.ts +2 -0
- package/components/jobs/JobDetail.svelte +40 -30
- package/components/landing/FlowGettingStarted.svelte +4 -3
- package/components/landing/FlowLandingBox.svelte +23 -53
- package/components/landing/RessourceGettingStarted.svelte +1 -1
- package/components/landing/ScriptBox.svelte +25 -27
- package/components/landing/ScriptGettingStarted.svelte +4 -3
- package/components/preview/FlowPreviewStatus.svelte +1 -1
- package/components/progressBar/ProgressBar.svelte +89 -0
- package/components/{ProgressBar.svelte.d.ts → progressBar/ProgressBar.svelte.d.ts} +5 -2
- package/components/progressBar/ProgressBarGeneralPart.svelte +22 -0
- package/components/progressBar/ProgressBarGeneralPart.svelte.d.ts +19 -0
- package/components/progressBar/ProgressBarLoopAccessor.svelte +14 -0
- package/components/progressBar/ProgressBarLoopAccessor.svelte.d.ts +19 -0
- package/components/progressBar/ProgressBarLoopPart.svelte +34 -0
- package/components/progressBar/ProgressBarLoopPart.svelte.d.ts +19 -0
- package/components/progressBar/index.d.ts +2 -0
- package/components/progressBar/index.js +2 -0
- package/components/progressBar/model.d.ts +32 -0
- package/components/progressBar/model.js +14 -0
- package/components/propertyPicker/ObjectViewer.svelte +18 -13
- package/components/propertyPicker/ObjectViewer.svelte.d.ts +1 -0
- package/components/propertyPicker/PropPicker.svelte +133 -84
- package/components/propertyPicker/PropPicker.svelte.d.ts +5 -1
- package/components/propertyPicker/PropPickerResult.svelte +12 -0
- package/components/propertyPicker/PropPickerResult.svelte.d.ts +18 -0
- package/components/propertyPicker/utils.d.ts +1 -1
- package/components/propertyPicker/utils.js +4 -1
- package/components/{script_editor → scriptEditor}/LogPanel.svelte +30 -20
- package/components/{script_editor → scriptEditor}/LogPanel.svelte.d.ts +0 -0
- package/components/scripts/CreateActions.svelte +2 -2
- package/components/sidebar/SidebarContent.svelte +1 -1
- package/components/sidebar/UserMenu.svelte +17 -1
- package/components/sidebar/UserMenu.svelte.d.ts +3 -0
- package/components/sidebar/WorkspaceMenu.svelte +16 -14
- package/components/splitPanes/SplitPanesWrapper.svelte +34 -0
- package/components/splitPanes/SplitPanesWrapper.svelte.d.ts +20 -0
- package/editorUtils.js +4 -0
- package/gen/core/OpenAPI.js +1 -1
- package/gen/index.d.ts +8 -1
- package/gen/index.js +5 -0
- package/gen/models/AppWithLastVersion.d.ts +21 -0
- package/gen/models/AppWithLastVersion.js +12 -0
- package/gen/models/BranchAll.d.ts +10 -0
- package/gen/models/{PathFlow.js → BranchAll.js} +0 -0
- package/gen/models/BranchOne.d.ts +10 -0
- package/gen/models/BranchOne.js +4 -0
- package/gen/models/CompletedJob.d.ts +4 -2
- package/gen/models/CompletedJob.js +2 -0
- package/gen/models/FlowModule.d.ts +7 -2
- package/gen/models/FlowModuleValue.d.ts +4 -2
- package/gen/models/FlowStatus.d.ts +1 -0
- package/gen/models/FlowStatusModule.d.ts +14 -1
- package/gen/models/ForloopFlow.d.ts +1 -0
- package/gen/models/Identity.d.ts +3 -0
- package/gen/models/Identity.js +4 -0
- package/gen/models/ListableApp.d.ts +16 -0
- package/gen/models/ListableApp.js +12 -0
- package/gen/models/ListableVariable.d.ts +1 -1
- package/gen/models/PathScript.d.ts +2 -0
- package/gen/models/Policy.d.ts +12 -0
- package/gen/models/Policy.js +12 -0
- package/gen/models/Preview.d.ts +2 -1
- package/gen/models/Preview.js +1 -0
- package/gen/models/QueuedJob.d.ts +4 -2
- package/gen/models/QueuedJob.js +2 -0
- package/gen/models/RawScript.d.ts +4 -1
- package/gen/models/RawScript.js +1 -0
- package/gen/models/Script.d.ts +4 -2
- package/gen/models/Script.js +2 -0
- package/gen/services/AppService.d.ts +31 -0
- package/gen/services/AppService.js +49 -0
- package/gen/services/CaptureService.d.ts +30 -0
- package/gen/services/CaptureService.js +52 -0
- package/gen/services/FlowService.d.ts +90 -0
- package/gen/services/FlowService.js +72 -0
- package/gen/services/JobService.d.ts +69 -16
- package/gen/services/JobService.js +86 -14
- package/gen/services/OauthService.d.ts +6 -15
- package/gen/services/OauthService.js +6 -19
- package/gen/services/ResourceService.d.ts +10 -1
- package/gen/services/ResourceService.js +16 -1
- package/gen/services/ScriptService.d.ts +28 -3
- package/gen/services/ScriptService.js +27 -0
- package/gen/services/UserService.d.ts +14 -6
- package/gen/services/UserService.js +25 -11
- package/infer.d.ts +1 -1
- package/infer.js +35 -18
- package/logout.d.ts +1 -1
- package/logout.js +7 -9
- package/package.json +80 -72
- package/script_helpers.d.ts +6 -4
- package/script_helpers.js +48 -14
- package/scripts.js +9 -4
- package/utils.d.ts +8 -9
- package/utils.js +42 -81
- package/components/AutosizedTextarea.svelte +0 -34
- package/components/AutosizedTextarea.svelte.d.ts +0 -19
- package/components/ProgressBar.svelte +0 -31
- package/components/ProgressBarPart.svelte +0 -20
- package/components/ProgressBarPart.svelte.d.ts +0 -20
- package/components/Switch.svelte +0 -61
- package/components/Switch.svelte.d.ts +0 -31
- package/components/Tabs.svelte +0 -21
- package/components/Tabs.svelte.d.ts +0 -20
- package/components/flows/content/CopyFirstStepSchema.svelte +0 -13
- package/components/flows/content/CopyFirstStepSchema.svelte.d.ts +0 -14
- package/components/flows/content/FlowLoopWrapper.svelte +0 -9
- package/components/flows/content/FlowLoopWrapper.svelte.d.ts +0 -14
- package/components/flows/content/FlowModule.svelte +0 -211
- package/components/flows/content/FlowModule.svelte.d.ts +0 -29
- package/gen/models/PathFlow.d.ts +0 -4
- package/gen/schemas/$AuditLog.d.ts +0 -32
- package/gen/schemas/$AuditLog.js +0 -35
- package/gen/schemas/$CompletedJob.d.ts +0 -98
- package/gen/schemas/$CompletedJob.js +0 -103
- package/gen/schemas/$ContextualVariable.d.ts +0 -16
- package/gen/schemas/$ContextualVariable.js +0 -19
- package/gen/schemas/$CreateResource.d.ts +0 -22
- package/gen/schemas/$CreateResource.js +0 -25
- package/gen/schemas/$CreateVariable.d.ts +0 -26
- package/gen/schemas/$CreateVariable.js +0 -29
- package/gen/schemas/$CreateWorkspace.d.ts +0 -20
- package/gen/schemas/$CreateWorkspace.js +0 -23
- package/gen/schemas/$EditResource.d.ts +0 -13
- package/gen/schemas/$EditResource.js +0 -16
- package/gen/schemas/$EditResourceType.d.ts +0 -10
- package/gen/schemas/$EditResourceType.js +0 -13
- package/gen/schemas/$EditSchedule.d.ts +0 -20
- package/gen/schemas/$EditSchedule.js +0 -23
- package/gen/schemas/$EditVariable.d.ts +0 -16
- package/gen/schemas/$EditVariable.js +0 -19
- package/gen/schemas/$EditWorkspaceUser.d.ts +0 -7
- package/gen/schemas/$EditWorkspaceUser.js +0 -10
- package/gen/schemas/$Flow.d.ts +0 -23
- package/gen/schemas/$Flow.js +0 -26
- package/gen/schemas/$FlowMetadata.d.ts +0 -31
- package/gen/schemas/$FlowMetadata.js +0 -34
- package/gen/schemas/$FlowPreview.d.ts +0 -80
- package/gen/schemas/$FlowPreview.js +0 -83
- package/gen/schemas/$GlobalUserInfo.d.ts +0 -26
- package/gen/schemas/$GlobalUserInfo.js +0 -29
- package/gen/schemas/$Group.d.ts +0 -23
- package/gen/schemas/$Group.js +0 -26
- package/gen/schemas/$Job.d.ts +0 -17
- package/gen/schemas/$Job.js +0 -20
- package/gen/schemas/$ListableVariable.d.ts +0 -35
- package/gen/schemas/$ListableVariable.js +0 -38
- package/gen/schemas/$Login.d.ts +0 -12
- package/gen/schemas/$Login.js +0 -15
- package/gen/schemas/$MainArgSignature.d.ts +0 -50
- package/gen/schemas/$MainArgSignature.js +0 -53
- package/gen/schemas/$NewSchedule.d.ts +0 -30
- package/gen/schemas/$NewSchedule.js +0 -33
- package/gen/schemas/$NewToken.d.ts +0 -11
- package/gen/schemas/$NewToken.js +0 -14
- package/gen/schemas/$NewUser.d.ts +0 -16
- package/gen/schemas/$NewUser.js +0 -19
- package/gen/schemas/$Preview.d.ts +0 -19
- package/gen/schemas/$Preview.js +0 -22
- package/gen/schemas/$QueuedJob.d.ts +0 -139
- package/gen/schemas/$QueuedJob.js +0 -144
- package/gen/schemas/$Resource.d.ts +0 -31
- package/gen/schemas/$Resource.js +0 -34
- package/gen/schemas/$ResourceType.d.ts +0 -17
- package/gen/schemas/$ResourceType.js +0 -20
- package/gen/schemas/$Schedule.d.ts +0 -47
- package/gen/schemas/$Schedule.js +0 -50
- package/gen/schemas/$Script.d.ts +0 -77
- package/gen/schemas/$Script.js +0 -80
- package/gen/schemas/$ScriptArgs.d.ts +0 -6
- package/gen/schemas/$ScriptArgs.js +0 -9
- package/gen/schemas/$SlackToken.d.ts +0 -24
- package/gen/schemas/$SlackToken.js +0 -27
- package/gen/schemas/$TokenResponse.d.ts +0 -23
- package/gen/schemas/$TokenResponse.js +0 -26
- package/gen/schemas/$TruncatedToken.d.ts +0 -25
- package/gen/schemas/$TruncatedToken.js +0 -28
- package/gen/schemas/$Usage.d.ts +0 -13
- package/gen/schemas/$Usage.js +0 -16
- package/gen/schemas/$User.d.ts +0 -42
- package/gen/schemas/$User.js +0 -45
- package/gen/schemas/$UserWorkspaceList.d.ts +0 -28
- package/gen/schemas/$UserWorkspaceList.js +0 -31
- package/gen/schemas/$WorkerPing.d.ts +0 -31
- package/gen/schemas/$WorkerPing.js +0 -34
- package/gen/schemas/$Workspace.d.ts +0 -19
- package/gen/schemas/$Workspace.js +0 -22
- package/gen/schemas/$WorkspaceInvite.d.ts +0 -16
- package/gen/schemas/$WorkspaceInvite.js +0 -19
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script>import { getContext } from 'svelte';
|
|
2
|
+
import { getTween } from './model';
|
|
3
|
+
export let step;
|
|
4
|
+
export let index;
|
|
5
|
+
export let duration = 200;
|
|
6
|
+
const state = getContext('state');
|
|
7
|
+
let progress = getTween(0, duration);
|
|
8
|
+
$: finishedAndNotLast = $state.finished && $state.length - 1 !== index;
|
|
9
|
+
$: if (finishedAndNotLast || $state.index > index)
|
|
10
|
+
progress = getTween(100, duration);
|
|
11
|
+
$: if ($state.finished || step.isDone) {
|
|
12
|
+
if (index > $state.index) {
|
|
13
|
+
state.update((prev) => ({ ...prev, index }));
|
|
14
|
+
}
|
|
15
|
+
progress.set(100);
|
|
16
|
+
}
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<div
|
|
20
|
+
class="absolute left-0 bottom-0 h-full {$state.error ? 'bg-red-400' : 'bg-blue-400'}"
|
|
21
|
+
style="width: {$progress}%"
|
|
22
|
+
/>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import { type GeneralState } from './model';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
step: GeneralState;
|
|
6
|
+
index: number;
|
|
7
|
+
duration?: number | undefined;
|
|
8
|
+
};
|
|
9
|
+
events: {
|
|
10
|
+
[evt: string]: CustomEvent<any>;
|
|
11
|
+
};
|
|
12
|
+
slots: {};
|
|
13
|
+
};
|
|
14
|
+
export declare type ProgressBarGeneralPartProps = typeof __propDef.props;
|
|
15
|
+
export declare type ProgressBarGeneralPartEvents = typeof __propDef.events;
|
|
16
|
+
export declare type ProgressBarGeneralPartSlots = typeof __propDef.slots;
|
|
17
|
+
export default class ProgressBarGeneralPart extends SvelteComponentTyped<ProgressBarGeneralPartProps, ProgressBarGeneralPartEvents, ProgressBarGeneralPartSlots> {
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script>import { getContext } from 'svelte';
|
|
2
|
+
export let progress;
|
|
3
|
+
export let index;
|
|
4
|
+
export let length;
|
|
5
|
+
const state = getContext('state');
|
|
6
|
+
$: isLast = index === length - 1;
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<div
|
|
10
|
+
class="h-full absolute left-0 bottom-0 overflow-hidden {$state.error
|
|
11
|
+
? 'bg-red-400'
|
|
12
|
+
: 'bg-blue-400'}"
|
|
13
|
+
style="width: {$progress}%; opacity: {isLast ? 100 : 100 / length}%"
|
|
14
|
+
/>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import type { Tweened } from 'svelte/motion';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
progress: Tweened<number>;
|
|
6
|
+
index: number;
|
|
7
|
+
length: number;
|
|
8
|
+
};
|
|
9
|
+
events: {
|
|
10
|
+
[evt: string]: CustomEvent<any>;
|
|
11
|
+
};
|
|
12
|
+
slots: {};
|
|
13
|
+
};
|
|
14
|
+
export declare type ProgressBarLoopAccessorProps = typeof __propDef.props;
|
|
15
|
+
export declare type ProgressBarLoopAccessorEvents = typeof __propDef.events;
|
|
16
|
+
export declare type ProgressBarLoopAccessorSlots = typeof __propDef.slots;
|
|
17
|
+
export default class ProgressBarLoopAccessor extends SvelteComponentTyped<ProgressBarLoopAccessorProps, ProgressBarLoopAccessorEvents, ProgressBarLoopAccessorSlots> {
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<script>import { getContext } from 'svelte';
|
|
2
|
+
import { get } from 'svelte/store';
|
|
3
|
+
import ProgressBarLoopAccessor from './ProgressBarLoopAccessor.svelte';
|
|
4
|
+
import { getTween } from './model';
|
|
5
|
+
export let step;
|
|
6
|
+
export let index;
|
|
7
|
+
export let duration = 200;
|
|
8
|
+
const state = getContext('state');
|
|
9
|
+
let progresses = getTweenArray();
|
|
10
|
+
$: finishedAndNotLast = $state.finished && $state.length - 1 !== index;
|
|
11
|
+
$: if (!$state.error && ($state.index > index || finishedAndNotLast)) {
|
|
12
|
+
progresses = getTweenArray(100);
|
|
13
|
+
}
|
|
14
|
+
$: if (!$state.error && step.indexChanged) {
|
|
15
|
+
progresses.filter((p, i) => get(p) === 0 && i < step.index).forEach((p) => p.set(100));
|
|
16
|
+
progresses.forEach((p, i) => {
|
|
17
|
+
if (get(p) === 0 && i < step.index) {
|
|
18
|
+
p.set(100);
|
|
19
|
+
if (index > $state.index) {
|
|
20
|
+
state.update((prev) => ({ ...prev, index }));
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
$: if (!$state.error && $state.finished)
|
|
26
|
+
progresses.forEach((p) => p.set(100));
|
|
27
|
+
function getTweenArray(initial = 0) {
|
|
28
|
+
return Array.from({ length: step.length }, () => getTween(initial, duration));
|
|
29
|
+
}
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
{#each progresses as progress, i}
|
|
33
|
+
<ProgressBarLoopAccessor {progress} index={i} length={step.length} />
|
|
34
|
+
{/each}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import { type LoopState } from './model';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
step: LoopState;
|
|
6
|
+
index: number;
|
|
7
|
+
duration?: number | undefined;
|
|
8
|
+
};
|
|
9
|
+
events: {
|
|
10
|
+
[evt: string]: CustomEvent<any>;
|
|
11
|
+
};
|
|
12
|
+
slots: {};
|
|
13
|
+
};
|
|
14
|
+
export declare type ProgressBarLoopPartProps = typeof __propDef.props;
|
|
15
|
+
export declare type ProgressBarLoopPartEvents = typeof __propDef.events;
|
|
16
|
+
export declare type ProgressBarLoopPartSlots = typeof __propDef.slots;
|
|
17
|
+
export default class ProgressBarLoopPart extends SvelteComponentTyped<ProgressBarLoopPartProps, ProgressBarLoopPartEvents, ProgressBarLoopPartSlots> {
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export interface ProgressStateStoreValue {
|
|
2
|
+
length: number;
|
|
3
|
+
index: number;
|
|
4
|
+
finished: boolean;
|
|
5
|
+
error: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare type StepKind = 'general' | 'loop';
|
|
8
|
+
declare type Step<T extends StepKind> = {
|
|
9
|
+
type: T;
|
|
10
|
+
isDone: boolean;
|
|
11
|
+
};
|
|
12
|
+
export declare type GeneralStep = Step<'general'>;
|
|
13
|
+
export declare type LoopStep = Step<'loop'> & {
|
|
14
|
+
index: number;
|
|
15
|
+
length: number;
|
|
16
|
+
};
|
|
17
|
+
export declare type ProgressStep = GeneralStep | LoopStep;
|
|
18
|
+
export declare function isLoopStep(step: ProgressStep | undefined): step is LoopStep;
|
|
19
|
+
declare type State<T extends StepKind> = {
|
|
20
|
+
type: T;
|
|
21
|
+
isDone: boolean;
|
|
22
|
+
isDoneChanged: boolean;
|
|
23
|
+
};
|
|
24
|
+
export declare type GeneralState = State<'general'>;
|
|
25
|
+
export declare type LoopState = LoopStep & {
|
|
26
|
+
index: number;
|
|
27
|
+
indexChanged: boolean;
|
|
28
|
+
};
|
|
29
|
+
export declare type ProgressState = GeneralState | LoopState;
|
|
30
|
+
export declare function isLoopState(state: ProgressState | undefined): state is LoopState;
|
|
31
|
+
export declare function getTween(initialValue?: number, duration?: number): import("svelte/motion").Tweened<number>;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { tweened } from 'svelte/motion';
|
|
2
|
+
import { cubicOut } from 'svelte/easing';
|
|
3
|
+
export function isLoopStep(step) {
|
|
4
|
+
return step?.type === 'loop';
|
|
5
|
+
}
|
|
6
|
+
export function isLoopState(state) {
|
|
7
|
+
return state?.type === 'loop';
|
|
8
|
+
}
|
|
9
|
+
export function getTween(initialValue = 0, duration = 200) {
|
|
10
|
+
return tweened(initialValue, {
|
|
11
|
+
duration,
|
|
12
|
+
easing: cubicOut
|
|
13
|
+
});
|
|
14
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script>import { truncate } from '../../utils';
|
|
2
2
|
import { createEventDispatcher } from 'svelte';
|
|
3
|
-
import { NEVER_TESTED_THIS_FAR } from '../flows/
|
|
3
|
+
import { NEVER_TESTED_THIS_FAR } from '../flows/utils';
|
|
4
4
|
import { getTypeAsString } from '../flows/utils';
|
|
5
5
|
import { computeKey } from './utils';
|
|
6
6
|
import WarningMessage from './WarningMessage.svelte';
|
|
@@ -11,6 +11,7 @@ export let currentPath = '';
|
|
|
11
11
|
export let pureViewer = false;
|
|
12
12
|
export let collapsed = level == 3 || Array.isArray(json);
|
|
13
13
|
export let rawKey = false;
|
|
14
|
+
export let topBrackets = false;
|
|
14
15
|
const collapsedSymbol = '...';
|
|
15
16
|
let keys;
|
|
16
17
|
let isArray;
|
|
@@ -36,10 +37,14 @@ function selectProp(key) {
|
|
|
36
37
|
{#if level != 0}
|
|
37
38
|
<span class="cursor-pointer hover:bg-gray-200 px-1 rounded" on:click={collapse}> (-) </span>
|
|
38
39
|
{/if}
|
|
40
|
+
{#if level == 0 && topBrackets}<span class="h-0">{openBracket}</span>{/if}
|
|
39
41
|
<ul class="w-full">
|
|
40
42
|
{#each keys as key, index}
|
|
41
43
|
<li class="pt-1">
|
|
42
|
-
<button
|
|
44
|
+
<button
|
|
45
|
+
on:click={() => selectProp(key)}
|
|
46
|
+
class="key {pureViewer ? 'cursor-auto' : ''} font-normal rounded px-1 hover:bg-blue-100"
|
|
47
|
+
>
|
|
43
48
|
{!isArray ? key : index}:
|
|
44
49
|
</button>
|
|
45
50
|
|
|
@@ -54,7 +59,9 @@ function selectProp(key) {
|
|
|
54
59
|
/>
|
|
55
60
|
{:else}
|
|
56
61
|
<button
|
|
57
|
-
class="val
|
|
62
|
+
class="val {pureViewer
|
|
63
|
+
? 'cursor-auto'
|
|
64
|
+
: ''} rounded px-1 hover:bg-blue-100 {getTypeAsString(json[key])}"
|
|
58
65
|
on:click={() => selectProp(key)}
|
|
59
66
|
>
|
|
60
67
|
{#if json[key] === NEVER_TESTED_THIS_FAR}
|
|
@@ -69,6 +76,7 @@ function selectProp(key) {
|
|
|
69
76
|
</li>
|
|
70
77
|
{/each}
|
|
71
78
|
</ul>
|
|
79
|
+
{#if level == 0 && topBrackets}<span class="h-0">{closeBracket}</span>{/if}
|
|
72
80
|
</span>
|
|
73
81
|
<span class="cursor-pointer hover:bg-gray-200" class:hidden={!collapsed} on:click={collapse}>
|
|
74
82
|
{openBracket}{collapsedSymbol}{closeBracket}
|
|
@@ -85,33 +93,30 @@ function selectProp(key) {
|
|
|
85
93
|
list-style: none;
|
|
86
94
|
padding-left: 1rem;
|
|
87
95
|
border-left: 1px dotted lightgray;
|
|
88
|
-
--tw-text-opacity: 1;
|
|
89
|
-
color: rgb(0 0 0 / var(--tw-text-opacity));
|
|
90
96
|
font-size: 0.875rem;
|
|
91
97
|
line-height: 1.25rem;
|
|
92
98
|
}
|
|
93
99
|
|
|
94
100
|
.val {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
}
|
|
101
|
+
/* @apply font-black; */
|
|
102
|
+
}
|
|
98
103
|
.val.undefined {
|
|
99
104
|
--tw-text-opacity: 1;
|
|
100
|
-
color: rgb(
|
|
105
|
+
color: rgb(239 68 68 / var(--tw-text-opacity));
|
|
101
106
|
}
|
|
102
107
|
.val.null {
|
|
103
108
|
--tw-text-opacity: 1;
|
|
104
|
-
color: rgb(
|
|
109
|
+
color: rgb(239 68 68 / var(--tw-text-opacity));
|
|
105
110
|
}
|
|
106
111
|
.val.string {
|
|
107
112
|
--tw-text-opacity: 1;
|
|
108
|
-
color: rgb(
|
|
113
|
+
color: rgb(22 163 74 / var(--tw-text-opacity));
|
|
109
114
|
}
|
|
110
115
|
.val.number {
|
|
111
116
|
--tw-text-opacity: 1;
|
|
112
|
-
color: rgb(
|
|
117
|
+
color: rgb(234 88 12 / var(--tw-text-opacity));
|
|
113
118
|
}
|
|
114
119
|
.val.boolean {
|
|
115
120
|
--tw-text-opacity: 1;
|
|
116
|
-
color: rgb(
|
|
121
|
+
color: rgb(37 99 235 / var(--tw-text-opacity));
|
|
117
122
|
}</style>
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
<script>import { ResourceService, VariableService } from '../../gen';
|
|
2
2
|
import { workspaceStore } from '../../stores';
|
|
3
|
-
import { faClose } from '@fortawesome/free-solid-svg-icons';
|
|
4
3
|
import { getContext } from 'svelte';
|
|
5
|
-
import
|
|
6
|
-
import { Button } from '../common';
|
|
4
|
+
import { Badge, Button } from '../common';
|
|
7
5
|
import { createEventDispatcher } from 'svelte';
|
|
8
6
|
import ObjectViewer from './ObjectViewer.svelte';
|
|
9
7
|
import { keepByKey } from './utils';
|
|
10
|
-
export let pickableProperties
|
|
8
|
+
export let pickableProperties;
|
|
9
|
+
export let displayContext = true;
|
|
10
|
+
export let notSelectable;
|
|
11
|
+
export let error = false;
|
|
12
|
+
$: previousId = pickableProperties?.previousId;
|
|
11
13
|
let variables = {};
|
|
12
14
|
let resources = {};
|
|
13
15
|
let displayVariable = false;
|
|
@@ -16,8 +18,14 @@ const dispatch = createEventDispatcher();
|
|
|
16
18
|
const EMPTY_STRING = '';
|
|
17
19
|
let search = '';
|
|
18
20
|
const { propPickerConfig, clearFocus } = getContext('PropPickerWrapper');
|
|
19
|
-
$:
|
|
20
|
-
search === EMPTY_STRING
|
|
21
|
+
$: flowInputsFiltered =
|
|
22
|
+
search === EMPTY_STRING
|
|
23
|
+
? pickableProperties.flow_input
|
|
24
|
+
: keepByKey(pickableProperties.flow_input, search);
|
|
25
|
+
$: resultByIdFiltered =
|
|
26
|
+
search === EMPTY_STRING
|
|
27
|
+
? pickableProperties.priorIds
|
|
28
|
+
: keepByKey(pickableProperties.priorIds, search);
|
|
21
29
|
async function loadVariables() {
|
|
22
30
|
variables = Object.fromEntries((await VariableService.listVariable({
|
|
23
31
|
workspace: $workspaceStore ?? ''
|
|
@@ -30,90 +38,131 @@ async function loadResources() {
|
|
|
30
38
|
}
|
|
31
39
|
</script>
|
|
32
40
|
|
|
33
|
-
|
|
34
|
-
<
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
41
|
+
{#if !notSelectable}
|
|
42
|
+
<div class="flex flex-row space-x-1">
|
|
43
|
+
{#if $propPickerConfig}
|
|
44
|
+
<Badge color="blue">
|
|
45
|
+
{`Selected: ${$propPickerConfig?.propName}`}
|
|
46
|
+
</Badge>
|
|
47
|
+
<Badge color="blue">
|
|
48
|
+
{`Mode: ${$propPickerConfig?.insertionMode}`}
|
|
49
|
+
</Badge>
|
|
50
|
+
{:else}
|
|
51
|
+
<Badge>← Select a step input</Badge>
|
|
52
|
+
{/if}
|
|
53
|
+
</div>
|
|
54
|
+
{/if}
|
|
55
|
+
<input
|
|
56
|
+
type="text"
|
|
57
|
+
bind:value={search}
|
|
58
|
+
class="bg-gray-50 mt-1 border border-gray-300 text-gray-900 text-sm rounded-lg block px-2 mb-2 w-full"
|
|
59
|
+
placeholder="Search prop..."
|
|
60
|
+
/>
|
|
61
|
+
<div class:bg-gray-100={!$propPickerConfig && !notSelectable}>
|
|
40
62
|
<div class="flex justify-between items-center space-x-1">
|
|
41
|
-
<span class="font-bold text-sm">
|
|
42
|
-
<div class="flex space-x-2 items-center"
|
|
43
|
-
{#if $propPickerConfig}
|
|
44
|
-
<span
|
|
45
|
-
class="flex items-center bg-blue-100 text-blue-800 text-xs font-semibold px-2 py-1 rounded dark:bg-green-200 dark:text-green-900"
|
|
46
|
-
>
|
|
47
|
-
{`Selected: ${$propPickerConfig?.propName}`}
|
|
48
|
-
</span>
|
|
49
|
-
<span
|
|
50
|
-
class="flex items-center bg-blue-100 text-blue-800 text-xs font-semibold px-2 py-1 rounded dark:bg-green-200 dark:text-green-900"
|
|
51
|
-
>
|
|
52
|
-
{`Mode: ${$propPickerConfig?.insertionMode}`}
|
|
53
|
-
</span>
|
|
54
|
-
<button
|
|
55
|
-
class="border px-2 py-1 text-xs rounded-md flex items-center hover:bg-gray-50 hover:text-gray-900"
|
|
56
|
-
on:click={() => clearFocus()}
|
|
57
|
-
>
|
|
58
|
-
<Icon data={faClose} class="mr-2" scale={0.8} />
|
|
59
|
-
Deselect
|
|
60
|
-
</button>
|
|
61
|
-
{/if}
|
|
62
|
-
</div>
|
|
63
|
+
<span class="font-bold text-sm">Flow Input</span>
|
|
64
|
+
<div class="flex space-x-2 items-center" />
|
|
63
65
|
</div>
|
|
64
66
|
<div class="overflow-y-auto mb-2">
|
|
65
|
-
<ObjectViewer
|
|
67
|
+
<ObjectViewer
|
|
68
|
+
pureViewer={!$propPickerConfig}
|
|
69
|
+
json={flowInputsFiltered}
|
|
70
|
+
on:select={(e) => {
|
|
71
|
+
dispatch('select', `flow_input.${e.detail}`)
|
|
72
|
+
}}
|
|
73
|
+
/>
|
|
66
74
|
</div>
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
<Button
|
|
71
|
-
color="light"
|
|
72
|
-
size="xs"
|
|
73
|
-
on:click={() => {
|
|
74
|
-
displayVariable = false
|
|
75
|
-
}}>(-)</Button
|
|
76
|
-
>
|
|
75
|
+
{#if error}
|
|
76
|
+
<span class="font-bold text-sm">Error</span>
|
|
77
|
+
<div class="overflow-y-auto mb-2">
|
|
77
78
|
<ObjectViewer
|
|
78
|
-
|
|
79
|
-
json={
|
|
80
|
-
on:select
|
|
79
|
+
pureViewer={!$propPickerConfig}
|
|
80
|
+
json={{ previous_result: { error: 'The error to handle' } }}
|
|
81
|
+
on:select
|
|
81
82
|
/>
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
83
|
+
</div>
|
|
84
|
+
{:else}
|
|
85
|
+
{#if previousId}
|
|
86
|
+
<span class="font-bold text-sm">Previous Result</span>
|
|
87
|
+
<div class="overflow-y-auto mb-2">
|
|
88
|
+
<ObjectViewer
|
|
89
|
+
pureViewer={!$propPickerConfig}
|
|
90
|
+
json={Object.fromEntries(
|
|
91
|
+
Object.entries(resultByIdFiltered).filter(([k, v]) => k == previousId)
|
|
92
|
+
)}
|
|
93
|
+
on:select={(e) => {
|
|
94
|
+
dispatch('select', `results.${e.detail}`)
|
|
95
|
+
}}
|
|
96
|
+
/>
|
|
97
|
+
</div>
|
|
91
98
|
{/if}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
rawKey={true}
|
|
105
|
-
json={resources}
|
|
106
|
-
on:select={(e) => dispatch('select', `resource('${e.detail}')`)}
|
|
107
|
-
/>
|
|
108
|
-
{:else}
|
|
109
|
-
<Button
|
|
110
|
-
color="light"
|
|
111
|
-
size="xs"
|
|
112
|
-
on:click={async () => {
|
|
113
|
-
await loadResources()
|
|
114
|
-
displayResources = true
|
|
115
|
-
}}>{'{...}'}</Button
|
|
116
|
-
>
|
|
99
|
+
{#if Object.keys(pickableProperties.priorIds).length > 0}
|
|
100
|
+
<span class="font-bold text-sm">All Results</span>
|
|
101
|
+
<div class="overflow-y-auto mb-2">
|
|
102
|
+
<ObjectViewer
|
|
103
|
+
pureViewer={!$propPickerConfig}
|
|
104
|
+
collapsed={true}
|
|
105
|
+
json={resultByIdFiltered}
|
|
106
|
+
on:select={(e) => {
|
|
107
|
+
dispatch('select', `results.${e.detail}`)
|
|
108
|
+
}}
|
|
109
|
+
/>
|
|
110
|
+
</div>
|
|
117
111
|
{/if}
|
|
118
|
-
|
|
112
|
+
{/if}
|
|
113
|
+
|
|
114
|
+
{#if displayContext}
|
|
115
|
+
<span class="font-bold text-sm">Variables </span>
|
|
116
|
+
<div class="overflow-y-auto mb-2">
|
|
117
|
+
{#if displayVariable}
|
|
118
|
+
<Button
|
|
119
|
+
color="light"
|
|
120
|
+
size="xs"
|
|
121
|
+
on:click={() => {
|
|
122
|
+
displayVariable = false
|
|
123
|
+
}}>(-)</Button
|
|
124
|
+
>
|
|
125
|
+
<ObjectViewer
|
|
126
|
+
pureViewer={!$propPickerConfig}
|
|
127
|
+
rawKey={true}
|
|
128
|
+
json={variables}
|
|
129
|
+
on:select={(e) => dispatch('select', `variable('${e.detail}')`)}
|
|
130
|
+
/>
|
|
131
|
+
{:else}
|
|
132
|
+
<button
|
|
133
|
+
class="key font-normal rounded px-1 hover:bg-blue-100 !p-0"
|
|
134
|
+
on:click={async () => {
|
|
135
|
+
await loadVariables()
|
|
136
|
+
displayVariable = true
|
|
137
|
+
}}>{'{...}'}</button
|
|
138
|
+
>
|
|
139
|
+
{/if}
|
|
140
|
+
</div>
|
|
141
|
+
<span class="font-bold text-sm">Resources</span>
|
|
142
|
+
<div class="overflow-y-auto mb-2">
|
|
143
|
+
{#if displayResources}
|
|
144
|
+
<Button
|
|
145
|
+
color="light"
|
|
146
|
+
size="xs"
|
|
147
|
+
on:click={() => {
|
|
148
|
+
displayResources = false
|
|
149
|
+
}}>(-)</Button
|
|
150
|
+
>
|
|
151
|
+
<ObjectViewer
|
|
152
|
+
pureViewer={!$propPickerConfig}
|
|
153
|
+
rawKey={true}
|
|
154
|
+
json={resources}
|
|
155
|
+
on:select={(e) => dispatch('select', `resource('${e.detail}')`)}
|
|
156
|
+
/>
|
|
157
|
+
{:else}
|
|
158
|
+
<button
|
|
159
|
+
class="key font-normal rounded px-1 hover:bg-blue-100 !p-0"
|
|
160
|
+
on:click={async () => {
|
|
161
|
+
await loadResources()
|
|
162
|
+
displayResources = true
|
|
163
|
+
}}>{'{...}'}</button
|
|
164
|
+
>
|
|
165
|
+
{/if}
|
|
166
|
+
</div>
|
|
167
|
+
{/if}
|
|
119
168
|
</div>
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import type { PickableProperties } from '../flows/previousResults';
|
|
2
3
|
declare const __propDef: {
|
|
3
4
|
props: {
|
|
4
|
-
pickableProperties
|
|
5
|
+
pickableProperties: PickableProperties;
|
|
6
|
+
displayContext?: boolean | undefined;
|
|
7
|
+
notSelectable: boolean;
|
|
8
|
+
error?: boolean | undefined;
|
|
5
9
|
};
|
|
6
10
|
events: {
|
|
7
11
|
select: CustomEvent<any>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<script>import { createEventDispatcher } from 'svelte';
|
|
2
|
+
import ObjectViewer from './ObjectViewer.svelte';
|
|
3
|
+
export let result;
|
|
4
|
+
const dispatch = createEventDispatcher();
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<div class="w-full">
|
|
8
|
+
<span class="font-bold text-sm">Result</span>
|
|
9
|
+
<div class="overflow-y-auto mb-2 w-full">
|
|
10
|
+
<ObjectViewer json={{ result }} on:select />
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
result: any;
|
|
5
|
+
};
|
|
6
|
+
events: {
|
|
7
|
+
select: CustomEvent<any>;
|
|
8
|
+
} & {
|
|
9
|
+
[evt: string]: CustomEvent<any>;
|
|
10
|
+
};
|
|
11
|
+
slots: {};
|
|
12
|
+
};
|
|
13
|
+
export declare type PropPickerResultProps = typeof __propDef.props;
|
|
14
|
+
export declare type PropPickerResultEvents = typeof __propDef.events;
|
|
15
|
+
export declare type PropPickerResultSlots = typeof __propDef.slots;
|
|
16
|
+
export default class PropPickerResult extends SvelteComponentTyped<PropPickerResultProps, PropPickerResultEvents, PropPickerResultSlots> {
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare function keepByKey(json: Object, key: string): Object;
|
|
1
|
+
export declare function keepByKey(json: Object | undefined, key: string): Object;
|
|
2
2
|
export declare function getTypeAsString(arg: any): string;
|
|
3
3
|
export declare function computeKey(key: string, isArray: boolean, currentPath?: string): string;
|
|
@@ -16,7 +16,7 @@ function diff(target, source) {
|
|
|
16
16
|
return target;
|
|
17
17
|
}
|
|
18
18
|
const result = {};
|
|
19
|
-
Object.keys(target).forEach((key) => {
|
|
19
|
+
Object.keys(target ?? {}).forEach((key) => {
|
|
20
20
|
if (typeof source[key] === 'object') {
|
|
21
21
|
const difference = diff(target[key], source[key]);
|
|
22
22
|
if (Object.keys(difference).length > 0) {
|
|
@@ -30,6 +30,9 @@ function diff(target, source) {
|
|
|
30
30
|
return result;
|
|
31
31
|
}
|
|
32
32
|
export function keepByKey(json, key) {
|
|
33
|
+
if (!json) {
|
|
34
|
+
return {};
|
|
35
|
+
}
|
|
33
36
|
return diff(json, filterByKey(json, key));
|
|
34
37
|
}
|
|
35
38
|
export function getTypeAsString(arg) {
|