windmill-components 1.52.0 → 1.55.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/components/ApiConnectForm.svelte +42 -7
- package/components/ApiConnectForm.svelte.d.ts +2 -1
- package/components/AppConnect.svelte +19 -11
- package/components/ArgInfo.svelte +6 -2
- package/components/ArgInput.svelte +9 -3
- package/components/ArgInput.svelte.d.ts +1 -0
- package/components/CenteredPage.svelte +1 -1
- package/components/CenteredPage.svelte.d.ts +6 -2
- package/components/CronInput.svelte +1 -1
- package/components/DisplayResult.svelte +39 -2
- package/components/Dropdown.svelte +73 -100
- package/components/Dropdown.svelte.d.ts +1 -3
- package/components/Editor.svelte +16 -5
- package/components/EditorBar.svelte +69 -63
- package/components/EditorBar.svelte.d.ts +1 -0
- package/components/FlowBuilder.svelte +74 -68
- package/components/FlowGraphViewer.svelte +136 -34
- package/components/FlowGraphViewer.svelte.d.ts +1 -0
- package/components/FlowJobResult.svelte +6 -1
- package/components/FlowJobResult.svelte.d.ts +2 -0
- package/components/FlowMetadata.svelte +4 -2
- package/components/FlowPreviewContent.svelte +10 -23
- package/components/FlowPreviewContent.svelte.d.ts +3 -0
- package/components/FlowStatusViewer.svelte +155 -30
- package/components/FlowStatusViewer.svelte.d.ts +4 -2
- package/components/FlowViewer.svelte +3 -3
- package/components/FlowViewer.svelte.d.ts +1 -0
- package/components/HighlightCode.svelte +1 -1
- package/components/HighlightCode.svelte.d.ts +1 -0
- package/components/IconedPath.svelte +16 -6
- package/components/IconedPath.svelte.d.ts +2 -0
- package/components/IconedResourceType.svelte +5 -2
- package/components/InputTransformForm.svelte +92 -73
- package/components/InviteGlobalUser.svelte +2 -2
- package/components/InviteGlobalUser.svelte.d.ts +1 -1
- package/components/InviteUser.svelte +20 -6
- package/components/InviteUser.svelte.d.ts +1 -1
- package/components/ItemPicker.svelte +38 -27
- package/components/ItemPicker.svelte.d.ts +2 -1
- package/components/JobStatus.svelte +19 -13
- package/components/LogViewer.svelte +11 -3
- package/components/LogViewer.svelte.d.ts +1 -0
- package/components/ModuleStatus.svelte +38 -0
- package/components/ModuleStatus.svelte.d.ts +18 -0
- package/components/ObjectResourceInput.svelte +8 -52
- package/components/ObjectResourceInput.svelte.d.ts +0 -1
- package/components/Path.svelte +2 -2
- package/components/Path.svelte.d.ts +1 -1
- package/components/Popover.svelte +7 -1
- package/components/Popover.svelte.d.ts +3 -1
- package/components/ResourceEditor.svelte +57 -29
- package/components/ResourcePicker.svelte +12 -2
- package/components/SchemaEditor.svelte +2 -1
- package/components/SchemaForm.svelte +2 -1
- package/components/SchemaForm.svelte.d.ts +1 -0
- package/components/SchemaModal.svelte +11 -10
- package/components/ScriptBuilder.svelte +207 -192
- package/components/ScriptBuilder.svelte.d.ts +1 -1
- package/components/ScriptEditor.svelte +49 -45
- package/components/ScriptEditor.svelte.d.ts +1 -0
- package/components/ScriptPicker.svelte.d.ts +1 -1
- package/components/ScriptSchema.svelte +11 -30
- package/components/ScriptSchema.svelte.d.ts +0 -1
- package/components/SharedBadge.svelte +2 -3
- package/components/SimpleEditor.svelte +6 -7
- package/components/SimpleEditor.svelte.d.ts +1 -0
- package/components/Star.svelte +2 -2
- package/components/SuperadminSettings.svelte +9 -38
- package/components/TableSimple.svelte +1 -1
- package/components/TestJobLoader.svelte +20 -8
- package/components/ToggleHubWorkspace.svelte +16 -0
- package/components/ToggleHubWorkspace.svelte.d.ts +16 -0
- package/components/Tooltip.svelte.d.ts +1 -1
- package/components/VariableEditor.svelte +22 -9
- package/components/apps/CreateApp.svelte +5 -2
- package/components/apps/CreateApp.svelte.d.ts +1 -1
- package/components/apps/components/DisplayComponent.svelte +7 -14
- package/components/apps/components/DisplayComponent.svelte.d.ts +3 -2
- package/components/apps/components/buttons/AppButton.svelte +34 -27
- package/components/apps/components/buttons/AppButton.svelte.d.ts +6 -6
- package/components/apps/components/dataDisplay/AppBarChart.svelte +33 -9
- package/components/apps/components/dataDisplay/AppBarChart.svelte.d.ts +3 -5
- package/components/apps/components/dataDisplay/AppPieChart.svelte +33 -12
- package/components/apps/components/dataDisplay/AppPieChart.svelte.d.ts +3 -5
- package/components/apps/components/dataDisplay/AppTable.svelte +27 -30
- package/components/apps/components/dataDisplay/AppTable.svelte.d.ts +4 -8
- package/components/apps/components/dataDisplay/AppText.svelte +16 -9
- package/components/apps/components/dataDisplay/AppText.svelte.d.ts +3 -2
- package/components/apps/components/dataDisplay/app.md +49 -0
- package/components/apps/components/form/AppForm.svelte +50 -0
- package/components/apps/components/form/AppForm.svelte.d.ts +25 -0
- package/components/apps/components/helpers/AlignWrapper.svelte +2 -1
- package/components/apps/components/helpers/AlignWrapper.svelte.d.ts +1 -0
- package/components/apps/components/helpers/DebouncedInput.svelte +9 -1
- package/components/apps/components/helpers/DebouncedInput.svelte.d.ts +2 -1
- package/components/apps/components/helpers/InputValue.svelte +15 -6
- package/components/apps/components/helpers/InputValue.svelte.d.ts +2 -2
- package/components/apps/components/helpers/NonRunnableComponent.svelte +20 -0
- package/components/apps/components/helpers/NonRunnableComponent.svelte.d.ts +21 -0
- package/components/apps/components/helpers/RunnableComponent.svelte +36 -30
- package/components/apps/components/helpers/RunnableComponent.svelte.d.ts +6 -7
- package/components/apps/components/helpers/RunnableWrapper.svelte +32 -0
- package/components/apps/components/helpers/RunnableWrapper.svelte.d.ts +26 -0
- package/components/apps/components/numberInputs/AppNumberInput.svelte +36 -0
- package/components/apps/components/numberInputs/AppNumberInput.svelte.d.ts +20 -0
- package/components/apps/components/selectInputs/AppCheckbox.svelte +4 -2
- package/components/apps/components/selectInputs/AppCheckbox.svelte.d.ts +2 -2
- package/components/apps/components/textInputs/AppTextInput.svelte +21 -0
- package/components/apps/components/textInputs/AppTextInput.svelte.d.ts +20 -0
- package/components/apps/editor/AppEditor.svelte +66 -55
- package/components/apps/editor/AppEditorHeader.svelte +4 -4
- package/components/apps/editor/AppPreview.svelte +42 -0
- package/components/apps/editor/AppPreview.svelte.d.ts +17 -0
- package/components/apps/editor/ComponentEditor.svelte +41 -20
- package/components/apps/editor/ComponentEditor.svelte.d.ts +2 -0
- package/components/apps/editor/ComponentHeader.svelte +28 -0
- package/components/apps/editor/ComponentHeader.svelte.d.ts +20 -0
- package/components/apps/editor/GridEditor.svelte +54 -5
- package/components/apps/editor/GridEditor.svelte.d.ts +1 -1
- package/components/apps/editor/RecomputeAllComponents.svelte +28 -0
- package/components/apps/editor/RecomputeAllComponents.svelte.d.ts +14 -0
- package/components/apps/editor/componentsPanel/ComponentList.svelte +94 -26
- package/components/apps/editor/componentsPanel/ComponentList.svelte.d.ts +1 -1
- package/components/apps/editor/componentsPanel/componentDefaultProps.d.ts +2 -6
- package/components/apps/editor/componentsPanel/componentDefaultProps.js +1 -5
- package/components/apps/editor/componentsPanel/componentStaticValues.d.ts +2 -0
- package/components/apps/editor/componentsPanel/componentStaticValues.js +3 -1
- package/components/apps/editor/componentsPanel/data.js +191 -76
- package/components/apps/editor/contextPanel/ContextPanel.svelte +56 -48
- package/components/apps/editor/settingsPanel/ArrayStaticInputEditor.svelte +67 -0
- package/components/apps/editor/settingsPanel/ArrayStaticInputEditor.svelte.d.ts +55 -0
- package/components/apps/editor/settingsPanel/ComponentPanel.svelte +154 -129
- package/components/apps/editor/settingsPanel/ConnectedInputEditor.svelte +70 -0
- package/components/apps/editor/settingsPanel/ConnectedInputEditor.svelte.d.ts +17 -0
- package/components/apps/editor/settingsPanel/InputsSpecEditor.svelte +6 -6
- package/components/apps/editor/settingsPanel/InputsSpecEditor.svelte.d.ts +2 -2
- package/components/apps/editor/settingsPanel/InputsSpecsEditor.svelte +55 -87
- package/components/apps/editor/settingsPanel/InputsSpecsEditor.svelte.d.ts +3 -4
- package/components/apps/editor/settingsPanel/PickFlow.svelte +3 -2
- package/components/apps/editor/settingsPanel/PickFlow.svelte.d.ts +1 -1
- package/components/apps/editor/settingsPanel/PickInlineScript.svelte +3 -3
- package/components/apps/editor/settingsPanel/Recompute.svelte +46 -0
- package/components/apps/editor/settingsPanel/Recompute.svelte.d.ts +17 -0
- package/components/apps/editor/settingsPanel/StaticInputEditor.svelte +31 -14
- package/components/apps/editor/settingsPanel/StaticInputEditor.svelte.d.ts +3 -3
- package/components/apps/editor/settingsPanel/SubTypeEditor.svelte +17 -0
- package/components/apps/editor/settingsPanel/SubTypeEditor.svelte.d.ts +19 -0
- package/components/apps/editor/settingsPanel/TableActionLabel.svelte +10 -0
- package/components/apps/editor/settingsPanel/TableActionLabel.svelte.d.ts +17 -0
- package/components/apps/editor/settingsPanel/TableActions.svelte +13 -9
- package/components/apps/editor/settingsPanel/UserInputEditor.svelte.d.ts +1 -1
- package/components/apps/editor/settingsPanel/common/PanelSection.svelte +3 -2
- package/components/apps/editor/settingsPanel/common/PanelSection.svelte.d.ts +1 -0
- package/components/apps/editor/settingsPanel/mainInput/InlineScriptList.svelte +53 -0
- package/components/apps/editor/settingsPanel/mainInput/InlineScriptList.svelte.d.ts +21 -0
- package/components/apps/editor/settingsPanel/mainInput/RunnableSelector.svelte +98 -0
- package/components/apps/editor/settingsPanel/mainInput/RunnableSelector.svelte.d.ts +18 -0
- package/components/apps/editor/settingsPanel/mainInput/WorkspaceFlowList.svelte +81 -0
- package/components/apps/editor/settingsPanel/mainInput/WorkspaceFlowList.svelte.d.ts +20 -0
- package/components/apps/editor/settingsPanel/mainInput/WorkspaceScriptList.svelte +81 -0
- package/components/apps/editor/settingsPanel/mainInput/WorkspaceScriptList.svelte.d.ts +20 -0
- package/components/apps/inputType.d.ts +62 -0
- package/components/apps/inputType.js +1 -0
- package/components/apps/rx.d.ts +4 -4
- package/components/apps/rx.js +16 -4
- package/components/apps/types.d.ts +20 -54
- package/components/apps/utils.d.ts +11 -34
- package/components/apps/utils.js +54 -18
- package/components/common/alert/Alert.svelte +2 -1
- package/components/common/alert/Alert.svelte.d.ts +1 -0
- package/components/common/button/Button.svelte +1 -1
- package/components/common/confirmationModal/UnsavedConfirmationModal.svelte.d.ts +1 -1
- package/components/common/drawer/DrawerContent.svelte +23 -22
- package/components/common/drawer/DrawerContent.svelte.d.ts +1 -3
- package/components/common/kbd/Kbd.svelte.d.ts +2 -2
- package/components/common/languageIcons/LanguageIcon.svelte +4 -2
- package/components/common/languageIcons/LanguageIcon.svelte.d.ts +1 -1
- package/components/common/menu/Menu.svelte +0 -1
- package/components/common/menu/MenuItem.svelte.d.ts +6 -2
- package/components/common/popup/Popup.svelte +0 -11
- package/components/common/table/AppRow.svelte +42 -26
- package/components/common/table/AppRow.svelte.d.ts +1 -1
- package/components/common/table/FlowRow.svelte +54 -49
- package/components/common/table/LanguageBadge.svelte +1 -1
- package/components/common/table/Row.svelte +27 -16
- package/components/common/table/Row.svelte.d.ts +2 -1
- package/components/common/table/RowIcon.svelte +13 -8
- package/components/common/table/ScriptRow.svelte +65 -57
- package/components/common/table/Table.svelte.d.ts +6 -2
- package/components/flows/CreateActionsFlow.svelte +14 -41
- package/components/flows/CreateActionsFlow.svelte.d.ts +1 -1
- package/components/flows/common/FlowCardHeader.svelte +7 -8
- package/components/flows/content/BranchPredicateEditor.svelte +30 -0
- package/components/flows/content/BranchPredicateEditor.svelte.d.ts +23 -0
- package/components/flows/content/CapturePayload.svelte +12 -8
- package/components/flows/content/DynamicInputHelpBox.svelte.d.ts +1 -1
- package/components/flows/content/FlowBranchAllWrapper.svelte +2 -2
- package/components/flows/content/FlowBranchOneWrapper.svelte +4 -36
- package/components/flows/content/FlowBranchesAllWrapper.svelte +91 -0
- package/components/flows/content/FlowBranchesAllWrapper.svelte.d.ts +18 -0
- package/components/flows/content/FlowBranchesOneWrapper.svelte +88 -0
- package/components/flows/content/FlowBranchesOneWrapper.svelte.d.ts +18 -0
- package/components/flows/content/FlowFailureModule.svelte.d.ts +1 -1
- package/components/flows/content/FlowInput.svelte +1 -2
- package/components/flows/content/FlowInput.svelte.d.ts +1 -1
- package/components/flows/content/FlowInputs.svelte +28 -26
- package/components/flows/content/FlowInputsFlow.svelte +101 -0
- package/components/flows/content/FlowInputsFlow.svelte.d.ts +20 -0
- package/components/flows/content/FlowLoop.svelte +10 -3
- package/components/flows/content/FlowModuleComponent.svelte +46 -35
- package/components/flows/content/FlowModuleEarlyStop.svelte +4 -3
- package/components/flows/content/FlowModuleHeader.svelte +22 -21
- package/components/flows/content/FlowModuleHeader.svelte.d.ts +1 -0
- package/components/flows/content/FlowModuleSleep.svelte +69 -0
- package/components/flows/content/FlowModuleSleep.svelte.d.ts +18 -0
- package/components/flows/content/FlowModuleSuspend.svelte +5 -63
- package/components/flows/content/FlowModuleSuspend.svelte.d.ts +0 -1
- package/components/flows/content/FlowModuleWrapper.svelte +59 -35
- package/components/flows/content/FlowPathViewer.svelte +20 -0
- package/components/flows/content/FlowPathViewer.svelte.d.ts +17 -0
- package/components/flows/content/FlowSchedules.svelte.d.ts +1 -1
- package/components/flows/content/FlowSettings.svelte +8 -12
- package/components/flows/flowState.js +2 -2
- package/components/flows/flowStateUtils.d.ts +7 -3
- package/components/flows/flowStateUtils.js +29 -8
- package/components/flows/header/FlowImportExportMenu.svelte.d.ts +1 -1
- package/components/flows/header/FlowPreviewButtons.svelte +6 -2
- package/components/flows/header/FlowPreviewButtons.svelte.d.ts +1 -1
- package/components/flows/map/FlowErrorHandlerItem.svelte +5 -5
- package/components/flows/map/FlowErrorHandlerItem.svelte.d.ts +1 -1
- package/components/flows/map/FlowInputsItem.svelte.d.ts +1 -1
- package/components/flows/map/FlowModuleSchemaItem.svelte +30 -11
- package/components/flows/map/FlowModuleSchemaMap.svelte +26 -20
- package/components/flows/map/FlowModuleSchemaMap.svelte.d.ts +1 -1
- package/components/flows/map/FlowSettingsItem.svelte +1 -1
- package/components/flows/map/FlowSettingsItem.svelte.d.ts +1 -1
- package/components/flows/map/InsertModuleButton.svelte +20 -4
- package/components/flows/map/InsertModuleButton.svelte.d.ts +1 -1
- package/components/flows/map/MapItem.svelte +11 -5
- package/components/flows/pickers/FlowScriptPicker.svelte.d.ts +1 -1
- package/components/flows/pickers/PickHubFlow.svelte +72 -0
- package/components/flows/pickers/PickHubFlow.svelte.d.ts +20 -0
- package/components/flows/pickers/PickHubScript.svelte +65 -56
- package/components/flows/pickers/PickHubScript.svelte.d.ts +3 -1
- package/components/flows/pickers/PickScript.svelte +2 -2
- package/components/flows/pickers/WorkspaceScriptPicker.svelte +79 -19
- package/components/flows/pickers/WorkspaceScriptPicker.svelte.d.ts +5 -1
- package/components/flows/previousResults.d.ts +1 -0
- package/components/flows/previousResults.js +2 -1
- package/components/flows/propPicker/PropPickerWrapper.svelte +9 -1
- package/components/flows/utils.d.ts +0 -1
- package/components/flows/utils.js +6 -6
- package/components/graph/FlowGraph.svelte +120 -54
- package/components/graph/FlowGraph.svelte.d.ts +3 -2
- package/components/graph/model.d.ts +11 -0
- package/components/home/ItemsList.svelte +265 -0
- package/components/home/ItemsList.svelte.d.ts +16 -0
- package/components/home/ListFilters.svelte +37 -0
- package/components/home/ListFilters.svelte.d.ts +18 -0
- package/components/home/NoItemFound.svelte +6 -0
- package/components/home/NoItemFound.svelte.d.ts +23 -0
- package/components/icons/DatadogIcon.svelte +48 -0
- package/components/icons/DatadogIcon.svelte.d.ts +17 -0
- package/components/icons/FunkwhaleIcon.svelte +90 -0
- package/components/icons/FunkwhaleIcon.svelte.d.ts +17 -0
- package/components/icons/GdocsIcon.svelte +9 -0
- package/components/icons/GdocsIcon.svelte.d.ts +17 -0
- package/components/icons/HubspotIcon.svelte +9 -0
- package/components/icons/HubspotIcon.svelte.d.ts +17 -0
- package/components/icons/LinkedinIcon.svelte +9 -0
- package/components/icons/LinkedinIcon.svelte.d.ts +17 -0
- package/components/icons/Mail.svelte +9 -53
- package/components/icons/Mysql.svelte +8 -8
- package/components/icons/NextcloudIcon.svelte +9 -0
- package/components/icons/NextcloudIcon.svelte.d.ts +17 -0
- package/components/icons/QRCodeIcon.svelte +5 -0
- package/components/icons/QRCodeIcon.svelte.d.ts +16 -0
- package/components/icons/SendflakeIcon.svelte +15 -0
- package/components/icons/SendflakeIcon.svelte.d.ts +17 -0
- package/components/icons/StripeIcon.svelte +9 -0
- package/components/icons/StripeIcon.svelte.d.ts +17 -0
- package/components/icons/TelegramIcon.svelte +9 -0
- package/components/icons/TelegramIcon.svelte.d.ts +17 -0
- package/components/icons/WindmillIcon.svelte +3 -3
- package/components/icons/index.d.ts +23 -1
- package/components/icons/index.js +23 -1
- package/components/jobs/JobDetail.svelte +2 -2
- package/components/preview/FlowPreviewStatus.svelte +12 -23
- package/components/propertyPicker/PropPicker.svelte +16 -0
- package/components/propertyPicker/PropPickerResult.svelte +2 -3
- package/components/propertyPicker/WarningMessage.svelte.d.ts +6 -2
- package/components/scriptEditor/LogPanel.svelte +11 -4
- package/components/scripts/CreateActionsScript.svelte +13 -59
- package/components/scripts/CreateActionsScript.svelte.d.ts +1 -1
- package/components/sidebar/FavoriteMenu.svelte +52 -0
- package/components/sidebar/FavoriteMenu.svelte.d.ts +21 -0
- package/components/sidebar/SidebarContent.svelte +10 -19
- package/components/sidebar/SidebarContent.svelte.d.ts +0 -4
- package/components/sidebar/UserMenu.svelte +21 -4
- package/components/sidebar/WorkspaceMenu.svelte +6 -7
- package/editorUtils.d.ts +2 -0
- package/editorUtils.js +3 -1
- package/gen/core/OpenAPI.js +1 -1
- package/gen/index.d.ts +1 -0
- package/gen/models/CompletedJob.d.ts +1 -0
- package/gen/models/CreateWorkspace.d.ts +0 -1
- package/gen/models/EditWorkspaceUser.d.ts +2 -0
- package/gen/models/FlowModuleValue.d.ts +2 -1
- package/gen/models/FlowStatus.d.ts +3 -1
- package/gen/models/FlowStatusModule.d.ts +1 -1
- package/gen/models/FlowStatusModule.js +1 -1
- package/gen/models/Identity.d.ts +1 -0
- package/gen/models/ListableResource.d.ts +1 -0
- package/gen/models/ListableVariable.d.ts +1 -0
- package/gen/models/PathFlow.d.ts +6 -0
- package/gen/models/PathFlow.js +4 -0
- package/gen/models/PathScript.d.ts +1 -0
- package/gen/models/QueuedJob.d.ts +1 -0
- package/gen/models/Schedule.d.ts +2 -0
- package/gen/models/Usage.d.ts +1 -3
- package/gen/models/WorkspaceInvite.d.ts +1 -0
- package/gen/services/AppService.d.ts +7 -1
- package/gen/services/AppService.js +2 -1
- package/gen/services/JobService.d.ts +35 -5
- package/gen/services/JobService.js +14 -5
- package/gen/services/OauthService.d.ts +1 -1
- package/gen/services/ResourceService.d.ts +6 -2
- package/gen/services/ResourceService.js +2 -1
- package/gen/services/UserService.d.ts +6 -0
- package/gen/services/UserService.js +11 -0
- package/gen/services/WorkspaceService.d.ts +35 -0
- package/gen/services/WorkspaceService.js +41 -0
- package/package.json +56 -17
- package/script_helpers.d.ts +2 -1
- package/script_helpers.js +20 -3
- package/scripts.d.ts +1 -0
- package/scripts.js +8 -1
- package/stores.d.ts +11 -2
- package/stores.js +24 -6
- package/utils.d.ts +3 -1
- package/utils.js +11 -4
- package/components/ButtonAndDropdown.svelte +0 -25
- package/components/ButtonAndDropdown.svelte.d.ts +0 -23
- package/components/apps/components/index.d.ts +0 -22
- package/components/apps/components/index.js +0 -42
- package/components/apps/editor/settingsPanel/DynamicInputEditor.svelte +0 -64
- package/components/apps/editor/settingsPanel/DynamicInputEditor.svelte.d.ts +0 -17
- package/components/flows/content/FlowBranchesWrapper.svelte +0 -140
- package/components/flows/content/FlowBranchesWrapper.svelte.d.ts +0 -19
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<script>import { createEventDispatcher, onMount } from 'svelte';
|
|
2
|
+
import SearchItems from '../../../../SearchItems.svelte';
|
|
3
|
+
import NoItemFound from '../../../../home/NoItemFound.svelte';
|
|
4
|
+
import RowIcon from '../../../../common/table/RowIcon.svelte';
|
|
5
|
+
import { Script, ScriptService } from '../../../../../gen';
|
|
6
|
+
import { workspaceStore } from '../../../../../stores';
|
|
7
|
+
import { emptyString } from '../../../../../utils';
|
|
8
|
+
import { Skeleton } from '../../../../common';
|
|
9
|
+
export let filter = '';
|
|
10
|
+
let scripts = undefined;
|
|
11
|
+
let loading = false;
|
|
12
|
+
let filteredItems = [];
|
|
13
|
+
$: prefilteredItems = scripts ?? [];
|
|
14
|
+
const dispatch = createEventDispatcher();
|
|
15
|
+
async function loadScripts() {
|
|
16
|
+
const loadedScripts = await ScriptService.listScripts({
|
|
17
|
+
workspace: $workspaceStore,
|
|
18
|
+
perPage: 300
|
|
19
|
+
});
|
|
20
|
+
scripts = loadedScripts;
|
|
21
|
+
loading = false;
|
|
22
|
+
}
|
|
23
|
+
onMount(() => {
|
|
24
|
+
loading = true;
|
|
25
|
+
loadScripts();
|
|
26
|
+
});
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<SearchItems
|
|
30
|
+
{filter}
|
|
31
|
+
items={prefilteredItems}
|
|
32
|
+
bind:filteredItems
|
|
33
|
+
f={(x) => (emptyString(x.summary) ? x.path : x.summary + ' (' + x.path + ')')}
|
|
34
|
+
/>
|
|
35
|
+
<div class="w-full flex mt-1 items-center gap-2">
|
|
36
|
+
<slot />
|
|
37
|
+
<input
|
|
38
|
+
type="text"
|
|
39
|
+
placeholder="Search workspace scripts"
|
|
40
|
+
bind:value={filter}
|
|
41
|
+
class="text-2xl grow mb-4"
|
|
42
|
+
/>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
{#if scripts}
|
|
46
|
+
{#if filteredItems.length == 0}
|
|
47
|
+
<NoItemFound />
|
|
48
|
+
{:else}
|
|
49
|
+
<ul class="divide-y divide-gray-200 border rounded-md">
|
|
50
|
+
{#each filteredItems as item (item)}
|
|
51
|
+
<li class="flex flex-row w-full">
|
|
52
|
+
<button
|
|
53
|
+
class="p-4 gap-4 flex flex-row grow justify-between hover:bg-gray-50 bg-white transition-all items-center rounded-md"
|
|
54
|
+
on:click={() => dispatch('pick', item.path)}
|
|
55
|
+
>
|
|
56
|
+
<div class="flex items-center gap-4">
|
|
57
|
+
<RowIcon kind="script" />
|
|
58
|
+
|
|
59
|
+
<div class="w-full text-left font-normal ">
|
|
60
|
+
<div class="text-gray-900 flex-wrap text-md font-semibold mb-1">
|
|
61
|
+
{#if item.marked}
|
|
62
|
+
{@html item.marked ?? ''}
|
|
63
|
+
{:else}
|
|
64
|
+
{!item.summary || item.summary.length == 0 ? item.path : item.summary}
|
|
65
|
+
{/if}
|
|
66
|
+
</div>
|
|
67
|
+
<div class="text-gray-600 text-xs ">
|
|
68
|
+
{item.path}
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
</button>
|
|
73
|
+
</li>
|
|
74
|
+
{/each}
|
|
75
|
+
</ul>
|
|
76
|
+
{/if}
|
|
77
|
+
{:else}
|
|
78
|
+
{#each Array(10).fill(0) as _}
|
|
79
|
+
<Skeleton layout={[[4], 0.5]} />
|
|
80
|
+
{/each}
|
|
81
|
+
{/if}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
filter?: string | undefined;
|
|
5
|
+
};
|
|
6
|
+
events: {
|
|
7
|
+
pick: CustomEvent<any>;
|
|
8
|
+
} & {
|
|
9
|
+
[evt: string]: CustomEvent<any>;
|
|
10
|
+
};
|
|
11
|
+
slots: {
|
|
12
|
+
default: {};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export type WorkspaceScriptListProps = typeof __propDef.props;
|
|
16
|
+
export type WorkspaceScriptListEvents = typeof __propDef.events;
|
|
17
|
+
export type WorkspaceScriptListSlots = typeof __propDef.slots;
|
|
18
|
+
export default class WorkspaceScriptList extends SvelteComponentTyped<WorkspaceScriptListProps, WorkspaceScriptListEvents, WorkspaceScriptListSlots> {
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { staticValues } from './editor/componentsPanel/componentStaticValues';
|
|
2
|
+
export type InputType = 'text' | 'textarea' | 'number' | 'boolean' | 'select' | 'date' | 'time' | 'datetime' | 'object' | 'array';
|
|
3
|
+
export type InputConnection = {
|
|
4
|
+
componentId: string;
|
|
5
|
+
path: string;
|
|
6
|
+
};
|
|
7
|
+
export type ConnectedInput = {
|
|
8
|
+
type: 'connected';
|
|
9
|
+
connection: InputConnection | undefined;
|
|
10
|
+
};
|
|
11
|
+
export type UserInput<U> = {
|
|
12
|
+
type: 'user';
|
|
13
|
+
value: U | undefined;
|
|
14
|
+
};
|
|
15
|
+
export type StaticInput<U> = {
|
|
16
|
+
value: U | undefined;
|
|
17
|
+
type: 'static';
|
|
18
|
+
visible?: boolean | undefined;
|
|
19
|
+
};
|
|
20
|
+
type RunnableByPath = {
|
|
21
|
+
path: string;
|
|
22
|
+
runType: 'script' | 'flow' | 'hubscript';
|
|
23
|
+
type: 'runnableByPath';
|
|
24
|
+
};
|
|
25
|
+
type RunnableByName = {
|
|
26
|
+
inlineScriptName: string;
|
|
27
|
+
type: 'runnableByName';
|
|
28
|
+
};
|
|
29
|
+
export type Runnable = RunnableByPath | RunnableByName | undefined;
|
|
30
|
+
export type ResultInput = {
|
|
31
|
+
runnable: Runnable;
|
|
32
|
+
fields: Record<string, StaticAppInput | ConnectedAppInput>;
|
|
33
|
+
type: 'runnable';
|
|
34
|
+
};
|
|
35
|
+
type AppInputSpec<T extends InputType, U, V extends InputType = never> = (StaticInput<U> | ConnectedInput | UserInput<U> | ResultInput) & InputConfiguration<T, U, V>;
|
|
36
|
+
type InputConfiguration<T extends InputType, U, V extends InputType> = {
|
|
37
|
+
fieldType: T;
|
|
38
|
+
defaultValue: U;
|
|
39
|
+
subFieldType?: V;
|
|
40
|
+
};
|
|
41
|
+
export type AppInput = AppInputSpec<'text', string> | AppInputSpec<'textarea', string> | AppInputSpec<'number', number> | AppInputSpec<'boolean', boolean> | AppInputSpec<'date', string> | AppInputSpec<'time', string> | AppInputSpec<'datetime', string> | AppInputSpec<'object', Record<string | number, any>> | (AppInputSpec<'select', string> & {
|
|
42
|
+
/**
|
|
43
|
+
* One of the keys of `staticValues` from `lib/components/apps/editor/componentsPanel/componentStaticValues`
|
|
44
|
+
*/
|
|
45
|
+
optionValuesKey: keyof typeof staticValues;
|
|
46
|
+
}) | AppInputSpec<'array', string[], 'text'> | AppInputSpec<'array', string[], 'textarea'> | AppInputSpec<'array', number[], 'number'> | AppInputSpec<'array', boolean[], 'boolean'> | AppInputSpec<'array', string[], 'date'> | AppInputSpec<'array', string[], 'time'> | AppInputSpec<'array', string[], 'datetime'> | AppInputSpec<'array', object[], 'object'> | (AppInputSpec<'array', string[], 'select'> & {
|
|
47
|
+
optionValuesKey: keyof typeof staticValues;
|
|
48
|
+
});
|
|
49
|
+
export type StaticAppInput = Extract<AppInput, {
|
|
50
|
+
type: 'static';
|
|
51
|
+
}>;
|
|
52
|
+
export type ConnectedAppInput = Extract<AppInput, {
|
|
53
|
+
type: 'connected';
|
|
54
|
+
}>;
|
|
55
|
+
export type UserAppInput = Extract<AppInput, {
|
|
56
|
+
type: 'user';
|
|
57
|
+
}>;
|
|
58
|
+
export type ResultAppInput = Extract<AppInput, {
|
|
59
|
+
type: 'runnable';
|
|
60
|
+
}>;
|
|
61
|
+
export type AppInputs = Record<string, AppInput>;
|
|
62
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/components/apps/rx.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AppInput } from './inputType';
|
|
2
2
|
export interface Subscriber<T> {
|
|
3
3
|
next(v: T): any;
|
|
4
4
|
}
|
|
@@ -13,14 +13,14 @@ export interface Input<T> extends Subscriber<T> {
|
|
|
13
13
|
}
|
|
14
14
|
export type World = {
|
|
15
15
|
outputsById: Record<string, Record<string, Output<any>>>;
|
|
16
|
-
connect: <T>(inputSpec:
|
|
16
|
+
connect: <T>(inputSpec: AppInput, next: (x: T) => void) => Input<T>;
|
|
17
17
|
};
|
|
18
18
|
export declare function buildWorld(components: Record<string, string[]>): {
|
|
19
19
|
outputsById: Record<string, Record<string, Output<any>>>;
|
|
20
|
-
connect: <T>(inputSpec:
|
|
20
|
+
connect: <T>(inputSpec: AppInput, next: (x: T) => void) => Input<T>;
|
|
21
21
|
};
|
|
22
22
|
export declare function buildObservableWorld(): {
|
|
23
|
-
connect: <T>(inputSpec:
|
|
23
|
+
connect: <T>(inputSpec: AppInput, next: (x: T) => void) => Input<T>;
|
|
24
24
|
newOutput: <T_1>(id: string, name: string) => Output<T_1>;
|
|
25
25
|
};
|
|
26
26
|
export declare function cachedInput<T>(nextParan: (x: T) => void): Input<T>;
|
package/components/apps/rx.js
CHANGED
|
@@ -18,12 +18,20 @@ export function buildObservableWorld() {
|
|
|
18
18
|
next: () => { }
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
-
else if (inputSpec.type === '
|
|
21
|
+
else if (inputSpec.type === 'connected') {
|
|
22
22
|
const input = cachedInput(next);
|
|
23
|
-
const
|
|
24
|
-
|
|
23
|
+
const connection = inputSpec.connection;
|
|
24
|
+
if (!connection) {
|
|
25
|
+
return {
|
|
26
|
+
peak: () => undefined,
|
|
27
|
+
next: () => { }
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
const { componentId, path } = connection;
|
|
31
|
+
const [p] = path ? path.split('.') : [undefined];
|
|
32
|
+
let obs = observables[`${componentId}.${p}`];
|
|
25
33
|
if (!obs) {
|
|
26
|
-
console.warn('Observable at ' +
|
|
34
|
+
console.warn('Observable at ' + componentId + '.' + p + ' not found');
|
|
27
35
|
return {
|
|
28
36
|
peak: () => undefined,
|
|
29
37
|
next: () => { }
|
|
@@ -72,6 +80,10 @@ export function settableOutput() {
|
|
|
72
80
|
function subscribe(x) {
|
|
73
81
|
if (!subscribers.includes(x)) {
|
|
74
82
|
subscribers.push(x);
|
|
83
|
+
// Send the current value to the new subscriber if it already exists
|
|
84
|
+
if (value !== undefined) {
|
|
85
|
+
x.next(value);
|
|
86
|
+
}
|
|
75
87
|
}
|
|
76
88
|
}
|
|
77
89
|
function set(x, force = false) {
|
|
@@ -2,52 +2,24 @@ import type { Schema } from '../../common';
|
|
|
2
2
|
import type { Preview } from '../../gen';
|
|
3
3
|
import type { FilledItem } from 'svelte-grid';
|
|
4
4
|
import type { Writable } from 'svelte/store';
|
|
5
|
-
import type {
|
|
5
|
+
import type { AppInput, ConnectedAppInput, ConnectedInput, StaticAppInput, UserAppInput } from './inputType';
|
|
6
6
|
import type { World } from './rx';
|
|
7
|
-
export type UserInput<T, V> = {
|
|
8
|
-
type: 'user';
|
|
9
|
-
value: V | undefined;
|
|
10
|
-
defaultValue: V;
|
|
11
|
-
fieldType: T;
|
|
12
|
-
};
|
|
13
|
-
export type DynamicInput<T, V> = {
|
|
14
|
-
type: 'output';
|
|
15
|
-
id: FieldID | undefined;
|
|
16
|
-
name: string | undefined;
|
|
17
|
-
defaultValue: V;
|
|
18
|
-
fieldType: T;
|
|
19
|
-
};
|
|
20
|
-
export type InputType = 'text' | 'textarea' | 'number' | 'boolean' | 'select' | 'date' | 'time' | 'datetime' | 'object';
|
|
21
|
-
export type StaticInput<T, V> = {
|
|
22
|
-
value: V | undefined;
|
|
23
|
-
type: 'static';
|
|
24
|
-
visible?: boolean;
|
|
25
|
-
defaultValue: V;
|
|
26
|
-
fieldType: T;
|
|
27
|
-
};
|
|
28
|
-
type AppInput<T extends InputType, V> = StaticInput<T, V> | DynamicInput<T, V> | UserInput<T, V>;
|
|
29
|
-
export type AppInputTransform = AppInput<'text', string> | AppInput<'textarea', string> | AppInput<'number', number> | AppInput<'boolean', boolean> | (AppInput<'select', string> & {
|
|
30
|
-
/**
|
|
31
|
-
* One of the keys of `staticValues` from `lib/components/apps/editor/componentsPanel/componentStaticValues`
|
|
32
|
-
*/
|
|
33
|
-
optionValuesKey: keyof typeof staticValues;
|
|
34
|
-
}) | AppInput<'date', string> | AppInput<'time', string> | AppInput<'datetime', string> | AppInput<'object', Record<string | number, any>>;
|
|
35
|
-
export type InputsSpec = Record<FieldID, AppInputTransform>;
|
|
36
|
-
type Runnable = {
|
|
37
|
-
inlineScriptName?: string;
|
|
38
|
-
path?: string;
|
|
39
|
-
runType?: 'script' | 'flow';
|
|
40
|
-
};
|
|
41
7
|
type BaseComponent<T extends string> = {
|
|
42
8
|
type: T;
|
|
43
9
|
};
|
|
44
10
|
export type TextComponent = BaseComponent<'textcomponent'>;
|
|
45
11
|
export type TextInputComponent = BaseComponent<'textinputcomponent'>;
|
|
46
|
-
export type
|
|
47
|
-
export type
|
|
12
|
+
export type NumberInputComponent = BaseComponent<'numberinputcomponent'>;
|
|
13
|
+
export type ButtonComponent = BaseComponent<'buttoncomponent'> & {
|
|
14
|
+
recomputeIds: string[] | undefined;
|
|
15
|
+
};
|
|
16
|
+
export type FormComponent = BaseComponent<'formcomponent'> & {
|
|
17
|
+
recomputeIds: string[] | undefined;
|
|
18
|
+
};
|
|
19
|
+
export type RunFormComponent = BaseComponent<'runformcomponent'>;
|
|
48
20
|
export type BarChartComponent = BaseComponent<'barchartcomponent'>;
|
|
49
|
-
export type PieChartComponent =
|
|
50
|
-
export type TableComponent =
|
|
21
|
+
export type PieChartComponent = BaseComponent<'piechartcomponent'>;
|
|
22
|
+
export type TableComponent = BaseComponent<'tablecomponent'> & {
|
|
51
23
|
actionButtons: (BaseAppComponent & ButtonComponent)[];
|
|
52
24
|
};
|
|
53
25
|
export type DisplayComponent = BaseComponent<'displaycomponent'>;
|
|
@@ -64,12 +36,11 @@ export type Aligned = {
|
|
|
64
36
|
};
|
|
65
37
|
export interface BaseAppComponent extends Partial<Aligned> {
|
|
66
38
|
id: ComponentID;
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
card?: boolean | undefined;
|
|
39
|
+
componentInput: AppInput | undefined;
|
|
40
|
+
configuration: Record<string, StaticAppInput | ConnectedAppInput | UserAppInput>;
|
|
41
|
+
card: boolean | undefined;
|
|
71
42
|
}
|
|
72
|
-
export type AppComponent = BaseAppComponent & (RunFormComponent | DisplayComponent | TextInputComponent | BarChartComponent | TableComponent | TextComponent | TableComponent | ButtonComponent | PieChartComponent | ImageComponent | InputComponent | SelectComponent | CheckboxComponent | RadioComponent);
|
|
43
|
+
export type AppComponent = BaseAppComponent & (RunFormComponent | DisplayComponent | TextInputComponent | NumberInputComponent | BarChartComponent | TableComponent | TextComponent | TableComponent | ButtonComponent | PieChartComponent | ImageComponent | InputComponent | SelectComponent | CheckboxComponent | RadioComponent | FormComponent);
|
|
73
44
|
export type ComponentSet = {
|
|
74
45
|
title: string;
|
|
75
46
|
components: AppComponent[];
|
|
@@ -94,9 +65,10 @@ export type App = {
|
|
|
94
65
|
inlineScripts: Record<string, InlineScript>;
|
|
95
66
|
title: string;
|
|
96
67
|
};
|
|
97
|
-
export type ConnectingInput
|
|
68
|
+
export type ConnectingInput = {
|
|
98
69
|
opened: boolean;
|
|
99
|
-
input?:
|
|
70
|
+
input?: ConnectedInput;
|
|
71
|
+
sourceName?: string;
|
|
100
72
|
};
|
|
101
73
|
export type AppEditorContext = {
|
|
102
74
|
worldStore: Writable<World | undefined>;
|
|
@@ -104,17 +76,11 @@ export type AppEditorContext = {
|
|
|
104
76
|
app: Writable<App>;
|
|
105
77
|
selectedComponent: Writable<string | undefined>;
|
|
106
78
|
mode: Writable<EditorMode>;
|
|
107
|
-
connectingInput: Writable<ConnectingInput
|
|
79
|
+
connectingInput: Writable<ConnectingInput>;
|
|
108
80
|
breakpoint: Writable<EditorBreakpoint>;
|
|
81
|
+
runnableComponents: Writable<Record<string, () => void>>;
|
|
109
82
|
};
|
|
110
83
|
export type EditorMode = 'dnd' | 'preview';
|
|
111
84
|
export type EditorBreakpoint = 'sm' | 'lg';
|
|
112
|
-
type FieldID = string;
|
|
113
85
|
type ComponentID = string;
|
|
114
|
-
export type EditorConfig = {
|
|
115
|
-
staticInputDisabled: boolean;
|
|
116
|
-
outputInputDisabled: boolean;
|
|
117
|
-
userInputEnabled: boolean;
|
|
118
|
-
visibiltyEnabled: boolean;
|
|
119
|
-
};
|
|
120
86
|
export {};
|
|
@@ -1,36 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="node" />
|
|
2
2
|
import type { Schema } from '../../common';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
icon: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
13
|
-
};
|
|
14
|
-
buttoncomponent: {
|
|
15
|
-
name: string;
|
|
16
|
-
icon: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
17
|
-
};
|
|
18
|
-
piechartcomponent: {
|
|
19
|
-
name: string;
|
|
20
|
-
icon: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
21
|
-
};
|
|
22
|
-
barchartcomponent: {
|
|
23
|
-
name: string;
|
|
24
|
-
icon: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
25
|
-
};
|
|
26
|
-
tablecomponent: {
|
|
27
|
-
name: string;
|
|
28
|
-
icon: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
29
|
-
};
|
|
30
|
-
checkboxcomponent: {
|
|
31
|
-
name: string;
|
|
32
|
-
icon: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
33
|
-
};
|
|
34
|
-
};
|
|
3
|
+
import type { InputType } from 'zlib';
|
|
4
|
+
import type { AppInputs } from './inputType';
|
|
5
|
+
import type { AppComponent } from './types';
|
|
6
|
+
export declare function loadSchema(workspace: string, path: string, runType: 'script' | 'flow' | 'hubscript'): Promise<Schema>;
|
|
7
|
+
export declare function schemaToInputsSpec(schema: Schema): AppInputs;
|
|
8
|
+
export declare const displayData: Record<AppComponent['type'], {
|
|
9
|
+
name: string;
|
|
10
|
+
icon: any;
|
|
11
|
+
}>;
|
|
35
12
|
export declare function accessPropertyByPath<T>(object: T, path: string): T | undefined;
|
|
36
|
-
export declare function fieldTypeToTsType(
|
|
13
|
+
export declare function fieldTypeToTsType(inputType: InputType): string;
|
package/components/apps/utils.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FlowService, ScriptService } from '../../gen';
|
|
2
|
-
import {
|
|
2
|
+
import { BarChart4, Binary, BoxSelect, CircleDot, FormInput, Inspect, List, Monitor, PieChart, Play, Table2, TextCursorInput, Type, FolderInput } from 'lucide-svelte';
|
|
3
3
|
export async function loadSchema(workspace, path, runType) {
|
|
4
4
|
if (runType === 'script') {
|
|
5
5
|
const script = await ScriptService.getScriptByPath({
|
|
@@ -8,13 +8,20 @@ export async function loadSchema(workspace, path, runType) {
|
|
|
8
8
|
});
|
|
9
9
|
return script.schema;
|
|
10
10
|
}
|
|
11
|
-
else {
|
|
11
|
+
else if (runType === 'flow') {
|
|
12
12
|
const flow = await FlowService.getFlowByPath({
|
|
13
13
|
workspace,
|
|
14
14
|
path
|
|
15
15
|
});
|
|
16
16
|
return flow.schema;
|
|
17
17
|
}
|
|
18
|
+
else {
|
|
19
|
+
const script = await ScriptService.getHubScriptByPath({
|
|
20
|
+
path
|
|
21
|
+
});
|
|
22
|
+
debugger;
|
|
23
|
+
return script.schema;
|
|
24
|
+
}
|
|
18
25
|
}
|
|
19
26
|
export function schemaToInputsSpec(schema) {
|
|
20
27
|
return Object.keys(schema.properties).reduce((accu, key) => {
|
|
@@ -32,31 +39,63 @@ export function schemaToInputsSpec(schema) {
|
|
|
32
39
|
export const displayData = {
|
|
33
40
|
displaycomponent: {
|
|
34
41
|
name: 'Result',
|
|
35
|
-
icon:
|
|
42
|
+
icon: Monitor
|
|
36
43
|
},
|
|
37
44
|
textcomponent: {
|
|
38
45
|
name: 'Text',
|
|
39
|
-
icon:
|
|
46
|
+
icon: Type
|
|
40
47
|
},
|
|
41
48
|
buttoncomponent: {
|
|
42
49
|
name: 'Button',
|
|
43
|
-
icon:
|
|
50
|
+
icon: Inspect
|
|
51
|
+
},
|
|
52
|
+
formcomponent: {
|
|
53
|
+
name: 'Form',
|
|
54
|
+
icon: FolderInput
|
|
44
55
|
},
|
|
45
56
|
piechartcomponent: {
|
|
46
57
|
name: 'Pie chart',
|
|
47
|
-
icon:
|
|
58
|
+
icon: PieChart
|
|
48
59
|
},
|
|
49
60
|
barchartcomponent: {
|
|
50
61
|
name: 'Bar chart',
|
|
51
|
-
icon:
|
|
62
|
+
icon: BarChart4
|
|
52
63
|
},
|
|
53
64
|
tablecomponent: {
|
|
54
65
|
name: 'Table',
|
|
55
|
-
icon:
|
|
66
|
+
icon: Table2
|
|
56
67
|
},
|
|
57
68
|
checkboxcomponent: {
|
|
58
69
|
name: 'Checkbox',
|
|
59
|
-
icon:
|
|
70
|
+
icon: BoxSelect
|
|
71
|
+
},
|
|
72
|
+
textinputcomponent: {
|
|
73
|
+
name: 'Text input',
|
|
74
|
+
icon: TextCursorInput
|
|
75
|
+
},
|
|
76
|
+
imagecomponent: {
|
|
77
|
+
name: 'Image',
|
|
78
|
+
icon: Image
|
|
79
|
+
},
|
|
80
|
+
inputcomponent: {
|
|
81
|
+
name: 'Input',
|
|
82
|
+
icon: FormInput
|
|
83
|
+
},
|
|
84
|
+
radiocomponent: {
|
|
85
|
+
name: 'Radio button',
|
|
86
|
+
icon: CircleDot
|
|
87
|
+
},
|
|
88
|
+
runformcomponent: {
|
|
89
|
+
name: 'Run form',
|
|
90
|
+
icon: Play
|
|
91
|
+
},
|
|
92
|
+
selectcomponent: {
|
|
93
|
+
name: 'Select',
|
|
94
|
+
icon: List
|
|
95
|
+
},
|
|
96
|
+
numberinputcomponent: {
|
|
97
|
+
name: 'Number input',
|
|
98
|
+
icon: Binary
|
|
60
99
|
}
|
|
61
100
|
};
|
|
62
101
|
export function accessPropertyByPath(object, path) {
|
|
@@ -77,20 +116,17 @@ export function accessPropertyByPath(object, path) {
|
|
|
77
116
|
}
|
|
78
117
|
return object;
|
|
79
118
|
}
|
|
80
|
-
export function fieldTypeToTsType(
|
|
81
|
-
switch (
|
|
82
|
-
case 'text':
|
|
83
|
-
case 'textarea':
|
|
84
|
-
case 'date':
|
|
85
|
-
case 'time':
|
|
86
|
-
case 'datetime':
|
|
87
|
-
case 'select':
|
|
88
|
-
return 'string';
|
|
119
|
+
export function fieldTypeToTsType(inputType) {
|
|
120
|
+
switch (inputType) {
|
|
89
121
|
case 'number':
|
|
90
122
|
return 'number';
|
|
91
123
|
case 'boolean':
|
|
92
124
|
return 'boolean';
|
|
93
125
|
case 'object':
|
|
94
126
|
return 'object';
|
|
127
|
+
case 'array':
|
|
128
|
+
return 'array';
|
|
129
|
+
default:
|
|
130
|
+
return 'string';
|
|
95
131
|
}
|
|
96
132
|
}
|
|
@@ -3,6 +3,7 @@ import { faCheckCircle, faInfoCircle, faWarning } from '@fortawesome/free-solid-
|
|
|
3
3
|
import Icon from 'svelte-awesome';
|
|
4
4
|
export let type = 'info';
|
|
5
5
|
export let title;
|
|
6
|
+
export let notRounded = false;
|
|
6
7
|
export let size = 'sm';
|
|
7
8
|
const icons = {
|
|
8
9
|
info: faInfoCircle,
|
|
@@ -40,7 +41,7 @@ const classes = {
|
|
|
40
41
|
|
|
41
42
|
<div
|
|
42
43
|
class={classNames(
|
|
43
|
-
'rounded-md',
|
|
44
|
+
notRounded ? '' : 'rounded-md',
|
|
44
45
|
size === 'sm' ? 'p-4' : 'p-2 ',
|
|
45
46
|
classes[type].bgClass,
|
|
46
47
|
$$props.class
|
|
@@ -3,7 +3,7 @@ import { classNames } from '../../../utils';
|
|
|
3
3
|
import Icon from 'svelte-awesome';
|
|
4
4
|
import { ButtonType } from './model';
|
|
5
5
|
import { goto } from '$app/navigation';
|
|
6
|
-
import {
|
|
6
|
+
import { faSpinner } from '@fortawesome/free-solid-svg-icons';
|
|
7
7
|
export let size = 'md';
|
|
8
8
|
export let spacingSize = size;
|
|
9
9
|
export let color = 'blue';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
<script>import {
|
|
1
|
+
<script>import { classNames } from '../../../utils';
|
|
2
|
+
import { faClose } from '@fortawesome/free-solid-svg-icons';
|
|
2
3
|
import { createEventDispatcher } from 'svelte';
|
|
3
|
-
import Icon from 'svelte-awesome';
|
|
4
|
+
import { Icon } from 'svelte-awesome';
|
|
4
5
|
import Button from '../button/Button.svelte';
|
|
5
6
|
export let title = undefined;
|
|
6
7
|
export let overflow_y = true;
|
|
@@ -10,30 +11,30 @@ const dispatch = createEventDispatcher();
|
|
|
10
11
|
</script>
|
|
11
12
|
|
|
12
13
|
<div class="flex flex-col divide-y h-screen max-h-screen">
|
|
13
|
-
<div class="flex justify-between items-center
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
<Icon data={faClose} />
|
|
24
|
-
</Button>
|
|
25
|
-
<span class="font-bold truncate">{title}</span>
|
|
26
|
-
<div class="flex flex-row m-1">
|
|
27
|
-
{#if $$slots.submission}
|
|
28
|
-
<slot name="submission" class="sticky" />
|
|
29
|
-
{/if}
|
|
14
|
+
<div class="flex justify-between w-wull items-center px-2 py-2 ">
|
|
15
|
+
<div class="flex items-center gap-2">
|
|
16
|
+
<button
|
|
17
|
+
on:click={() => dispatch('close')}
|
|
18
|
+
class="hover:bg-gray-200 bg-gray-100 rounded-full w-8 h-8 flex items-center justify-center transition-all"
|
|
19
|
+
>
|
|
20
|
+
<Icon data={faClose} class="text-gray-500" />
|
|
21
|
+
</button>
|
|
22
|
+
|
|
23
|
+
<span class="font-semibold truncate text-gray-800">{title}</span>
|
|
30
24
|
</div>
|
|
25
|
+
{#if $$slots.actions}
|
|
26
|
+
<div class="flex gap-1 items-center justify-end">
|
|
27
|
+
<slot name="actions" />
|
|
28
|
+
</div>
|
|
29
|
+
{/if}
|
|
31
30
|
</div>
|
|
32
31
|
|
|
33
32
|
<div
|
|
34
|
-
class=
|
|
35
|
-
? '
|
|
36
|
-
|
|
33
|
+
class={classNames(
|
|
34
|
+
noPadding ? '' : 'p-4',
|
|
35
|
+
'grow h-full max-h-full',
|
|
36
|
+
forceOverflowVisible ? '!overflow-visible' : ''
|
|
37
|
+
)}
|
|
37
38
|
class:overflow-y-auto={overflow_y}
|
|
38
39
|
>
|
|
39
40
|
<slot />
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/** @typedef {typeof __propDef.events} KbdEvents */
|
|
3
3
|
/** @typedef {typeof __propDef.slots} KbdSlots */
|
|
4
4
|
export default class Kbd extends SvelteComponentTyped<{
|
|
5
|
-
[x: string]:
|
|
5
|
+
[x: string]: never;
|
|
6
6
|
}, {
|
|
7
7
|
[evt: string]: CustomEvent<any>;
|
|
8
8
|
}, {
|
|
@@ -15,7 +15,7 @@ export type KbdSlots = typeof __propDef.slots;
|
|
|
15
15
|
import { SvelteComponentTyped } from "svelte";
|
|
16
16
|
declare const __propDef: {
|
|
17
17
|
props: {
|
|
18
|
-
[x: string]:
|
|
18
|
+
[x: string]: never;
|
|
19
19
|
};
|
|
20
20
|
events: {
|
|
21
21
|
[evt: string]: CustomEvent<any>;
|