windmill-components 1.46.3 → 1.52.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/common.d.ts +6 -5
- package/components/ApiConnectForm.svelte +21 -0
- package/components/ApiConnectForm.svelte.d.ts +18 -0
- package/components/AppConnect.svelte +229 -174
- package/components/AppConnect.svelte.d.ts +4 -3
- package/components/ArgInfo.svelte +2 -2
- package/components/ArgInfo.svelte.d.ts +3 -3
- package/components/ArgInput.svelte +82 -28
- package/components/ArgInput.svelte.d.ts +10 -3
- package/components/Badge.svelte.d.ts +3 -3
- package/components/Button.svelte +1 -1
- package/components/Button.svelte.d.ts +3 -3
- package/components/ButtonAndDropdown.svelte.d.ts +3 -3
- package/components/CenteredModal.svelte +20 -13
- package/components/CenteredModal.svelte.d.ts +3 -3
- package/components/ChevronButton.svelte.d.ts +3 -3
- package/components/CollapseLink.svelte.d.ts +3 -3
- package/components/CronInput.svelte +1 -1
- package/components/CronInput.svelte.d.ts +3 -3
- package/components/DisplayResult.svelte.d.ts +3 -3
- package/components/Dropdown.svelte +13 -7
- package/components/Dropdown.svelte.d.ts +3 -3
- package/components/Editor.svelte +3 -2
- package/components/Editor.svelte.d.ts +4 -3
- package/components/EditorBar.svelte +34 -38
- package/components/EditorBar.svelte.d.ts +3 -3
- package/components/FieldHeader.svelte +4 -3
- package/components/FieldHeader.svelte.d.ts +3 -3
- package/components/FlowBuilder.svelte +37 -14
- package/components/FlowBuilder.svelte.d.ts +4 -3
- package/components/FlowGraphViewer.svelte +76 -0
- package/components/FlowGraphViewer.svelte.d.ts +23 -0
- package/components/FlowJobResult.svelte.d.ts +3 -3
- package/components/FlowMetadata.svelte.d.ts +3 -3
- package/components/FlowPreviewContent.svelte +54 -64
- package/components/FlowPreviewContent.svelte.d.ts +3 -3
- package/components/FlowStatusViewer.svelte +156 -106
- package/components/FlowStatusViewer.svelte.d.ts +5 -4
- package/components/FlowViewer.svelte +3 -78
- package/components/FlowViewer.svelte.d.ts +3 -3
- package/components/GroupModal.svelte.d.ts +3 -3
- package/components/HighlightCode.svelte.d.ts +3 -3
- package/components/IconedPath.svelte.d.ts +3 -3
- package/components/IconedResourceType.svelte +3 -61
- package/components/IconedResourceType.svelte.d.ts +3 -3
- package/components/InputTransformForm.svelte +108 -77
- package/components/InputTransformForm.svelte.d.ts +10 -5
- package/components/InputTransformsViewer.svelte.d.ts +3 -3
- package/components/InviteGlobalUser.svelte.d.ts +3 -3
- package/components/InviteUser.svelte.d.ts +3 -3
- package/components/ItemPicker.svelte +77 -29
- package/components/ItemPicker.svelte.d.ts +6 -4
- package/components/JobArgs.svelte +5 -5
- package/components/JobArgs.svelte.d.ts +3 -3
- package/components/JobStatus.svelte.d.ts +3 -3
- package/components/LogViewer.svelte +19 -4
- package/components/LogViewer.svelte.d.ts +3 -3
- package/components/Modal.svelte.d.ts +3 -3
- package/components/ModulePreview.svelte +8 -0
- package/components/ModulePreview.svelte.d.ts +3 -3
- package/components/ObjectResourceInput.svelte +37 -21
- package/components/ObjectResourceInput.svelte.d.ts +4 -3
- package/components/ObjectTypeNarrowing.svelte.d.ts +3 -3
- package/components/PageHeader.svelte +2 -2
- package/components/PageHeader.svelte.d.ts +3 -3
- package/components/Password.svelte +2 -2
- package/components/Password.svelte.d.ts +4 -4
- package/components/Path.svelte +4 -1
- package/components/Path.svelte.d.ts +5 -4
- package/components/Popover.svelte.d.ts +3 -3
- package/components/RadioButton.svelte.d.ts +3 -3
- package/components/Required.svelte.d.ts +3 -3
- package/components/ResourceEditor.svelte +73 -163
- package/components/ResourceEditor.svelte.d.ts +3 -5
- package/components/ResourcePicker.svelte +33 -30
- package/components/ResourcePicker.svelte.d.ts +3 -3
- package/components/ResourceTypePicker.svelte.d.ts +3 -3
- package/components/RunChart.svelte.d.ts +3 -3
- package/components/RunForm.svelte.d.ts +3 -3
- package/components/SchemaEditor.svelte +55 -23
- package/components/SchemaEditor.svelte.d.ts +3 -3
- package/components/SchemaEditorProperty.svelte.d.ts +3 -3
- package/components/SchemaForm.svelte +97 -33
- package/components/SchemaForm.svelte.d.ts +8 -4
- package/components/SchemaModal.svelte.d.ts +4 -4
- package/components/SchemaViewer.svelte.d.ts +3 -3
- package/components/ScriptBuilder.svelte +64 -66
- package/components/ScriptBuilder.svelte.d.ts +3 -3
- package/components/ScriptEditor.svelte +26 -28
- package/components/ScriptEditor.svelte.d.ts +4 -3
- package/components/ScriptPicker.svelte +28 -38
- package/components/ScriptPicker.svelte.d.ts +4 -3
- package/components/ScriptSchema.svelte +1 -1
- package/components/ScriptSchema.svelte.d.ts +3 -3
- package/components/SearchItems.svelte +29 -0
- package/components/SearchItems.svelte.d.ts +23 -0
- package/components/ShareModal.svelte.d.ts +3 -3
- package/components/SharedBadge.svelte +4 -2
- package/components/SharedBadge.svelte.d.ts +3 -3
- package/components/SimpleEditor.svelte +33 -7
- package/components/SimpleEditor.svelte.d.ts +4 -4
- package/components/Star.svelte +42 -0
- package/components/Star.svelte.d.ts +19 -0
- package/components/StringTypeNarrowing.svelte.d.ts +3 -3
- package/components/SuperadminSettings.svelte +18 -15
- package/components/SuperadminSettings.svelte.d.ts +3 -3
- package/components/TableCustom.svelte +1 -1
- package/components/TableCustom.svelte.d.ts +3 -3
- package/components/TableSimple.svelte.d.ts +3 -3
- package/components/TestJobLoader.svelte +41 -24
- package/components/TestJobLoader.svelte.d.ts +9 -3
- package/components/Toggle.svelte.d.ts +3 -3
- package/components/Tooltip.svelte.d.ts +3 -3
- package/components/UserSettings.svelte.d.ts +3 -3
- package/components/VariableEditor.svelte +71 -32
- package/components/VariableEditor.svelte.d.ts +5 -3
- package/components/apps/CreateApp.svelte +65 -0
- package/components/apps/CreateApp.svelte.d.ts +14 -0
- package/components/apps/components/DisplayComponent.svelte +23 -0
- package/components/apps/components/DisplayComponent.svelte.d.ts +19 -0
- package/components/apps/components/buttons/AppButton.svelte +42 -0
- package/components/apps/components/buttons/AppButton.svelte.d.ts +25 -0
- package/components/apps/components/dataDisplay/AppBarChart.svelte +18 -0
- package/components/apps/components/dataDisplay/AppBarChart.svelte.d.ts +23 -0
- package/components/apps/components/dataDisplay/AppPieChart.svelte +22 -0
- package/components/apps/components/dataDisplay/AppPieChart.svelte.d.ts +23 -0
- package/components/apps/components/dataDisplay/AppTable.svelte +135 -0
- package/components/apps/components/dataDisplay/AppTable.svelte.d.ts +27 -0
- package/components/apps/components/dataDisplay/AppText.svelte +15 -0
- package/components/apps/components/dataDisplay/AppText.svelte.d.ts +21 -0
- package/components/apps/components/helpers/AlignWrapper.svelte +29 -0
- package/components/apps/components/helpers/AlignWrapper.svelte.d.ts +19 -0
- package/components/apps/components/helpers/DebouncedInput.svelte +16 -0
- package/components/apps/components/helpers/DebouncedInput.svelte.d.ts +19 -0
- package/components/apps/components/helpers/InputValue.svelte +37 -0
- package/components/apps/components/helpers/InputValue.svelte.d.ts +18 -0
- package/components/apps/components/helpers/RunnableComponent.svelte +182 -0
- package/components/apps/components/helpers/RunnableComponent.svelte.d.ts +28 -0
- package/components/apps/components/index.d.ts +22 -0
- package/components/apps/components/index.js +42 -0
- package/components/apps/components/selectInputs/AppCheckbox.svelte +26 -0
- package/components/apps/components/selectInputs/AppCheckbox.svelte.d.ts +22 -0
- package/components/apps/editor/AppEditor.svelte +105 -0
- package/components/apps/editor/AppEditor.svelte.d.ts +19 -0
- package/components/apps/editor/AppEditorHeader.svelte +75 -0
- package/components/apps/editor/AppEditorHeader.svelte.d.ts +19 -0
- package/components/apps/editor/ComponentEditor.svelte +64 -0
- package/components/apps/editor/ComponentEditor.svelte.d.ts +18 -0
- package/components/apps/editor/GridEditor.svelte +45 -0
- package/components/apps/editor/GridEditor.svelte.d.ts +14 -0
- package/components/apps/editor/componentsPanel/ComponentList.svelte +92 -0
- package/components/apps/editor/componentsPanel/ComponentList.svelte.d.ts +14 -0
- package/components/apps/editor/componentsPanel/componentDefaultProps.d.ts +7 -0
- package/components/apps/editor/componentsPanel/componentDefaultProps.js +9 -0
- package/components/apps/editor/componentsPanel/componentStaticValues.d.ts +4 -0
- package/components/apps/editor/componentsPanel/componentStaticValues.js +6 -0
- package/components/apps/editor/componentsPanel/data.d.ts +3 -0
- package/components/apps/editor/componentsPanel/data.js +158 -0
- package/components/apps/editor/componentsPanel/store.d.ts +9 -0
- package/components/apps/editor/componentsPanel/store.js +16 -0
- package/components/apps/editor/contextPanel/ComponentOutputViewer.svelte +22 -0
- package/components/apps/editor/contextPanel/ComponentOutputViewer.svelte.d.ts +19 -0
- package/components/apps/editor/contextPanel/ContextPanel.svelte +184 -0
- package/components/apps/editor/contextPanel/ContextPanel.svelte.d.ts +16 -0
- package/components/apps/editor/contextPanel/InlineScriptCreationPanel.svelte +29 -0
- package/components/apps/editor/contextPanel/InlineScriptCreationPanel.svelte.d.ts +16 -0
- package/components/apps/editor/settingsPanel/ComponentPanel.svelte +196 -0
- package/components/apps/editor/settingsPanel/ComponentPanel.svelte.d.ts +18 -0
- package/components/apps/editor/settingsPanel/DynamicInputEditor.svelte +64 -0
- package/components/apps/editor/settingsPanel/DynamicInputEditor.svelte.d.ts +17 -0
- package/components/apps/editor/settingsPanel/InputsSpecEditor.svelte +11 -0
- package/components/apps/editor/settingsPanel/InputsSpecEditor.svelte.d.ts +18 -0
- package/components/apps/editor/settingsPanel/InputsSpecsEditor.svelte +99 -0
- package/components/apps/editor/settingsPanel/InputsSpecsEditor.svelte.d.ts +20 -0
- package/components/apps/editor/settingsPanel/PickFlow.svelte +37 -0
- package/components/apps/editor/settingsPanel/PickFlow.svelte.d.ts +16 -0
- package/components/apps/editor/settingsPanel/PickInlineScript.svelte +38 -0
- package/components/apps/editor/settingsPanel/PickInlineScript.svelte.d.ts +20 -0
- package/components/apps/editor/settingsPanel/SectionPanel.svelte +70 -0
- package/components/apps/editor/settingsPanel/SectionPanel.svelte.d.ts +19 -0
- package/components/apps/editor/settingsPanel/StaticInputEditor.svelte +29 -0
- package/components/apps/editor/settingsPanel/StaticInputEditor.svelte.d.ts +18 -0
- package/components/apps/editor/settingsPanel/TableActions.svelte +107 -0
- package/components/apps/editor/settingsPanel/TableActions.svelte.d.ts +19 -0
- package/components/apps/editor/settingsPanel/UserInputEditor.svelte +2 -0
- package/components/apps/editor/settingsPanel/UserInputEditor.svelte.d.ts +14 -0
- package/components/apps/editor/settingsPanel/common/PanelSection.svelte +11 -0
- package/components/apps/editor/settingsPanel/common/PanelSection.svelte.d.ts +19 -0
- package/components/apps/gridUtils.d.ts +11 -0
- package/components/apps/gridUtils.js +24 -0
- package/components/apps/rx.d.ts +27 -0
- package/components/apps/rx.js +87 -0
- package/components/apps/types.d.ts +120 -0
- package/components/apps/types.js +1 -0
- package/components/apps/utils.d.ts +36 -0
- package/components/apps/utils.js +96 -0
- package/components/common/actionRow/ActionRow.svelte.d.ts +3 -3
- package/components/common/alert/Alert.svelte +29 -7
- package/components/common/alert/Alert.svelte.d.ts +4 -3
- package/components/common/alert/model.d.ts +1 -1
- package/components/common/badge/Badge.svelte +3 -7
- package/components/common/badge/Badge.svelte.d.ts +6 -4
- package/components/common/badge/model.d.ts +2 -2
- package/components/common/breadcrumb/Breadcrumb.svelte.d.ts +3 -3
- package/components/common/button/Button.svelte +24 -6
- package/components/common/button/Button.svelte.d.ts +6 -4
- package/components/common/button/ButtonPopup.svelte +3 -1
- package/components/common/button/ButtonPopup.svelte.d.ts +5 -4
- package/components/common/button/ButtonPopupItem.svelte.d.ts +3 -3
- package/components/common/button/model.d.ts +2 -1
- package/components/common/button/model.js +2 -1
- package/components/common/confirmationModal/ConfirmationModal.svelte.d.ts +3 -3
- package/components/common/confirmationModal/UnsavedConfirmationModal.svelte.d.ts +3 -3
- package/components/common/drawer/Drawer.svelte +5 -1
- package/components/common/drawer/Drawer.svelte.d.ts +3 -3
- package/components/common/drawer/DrawerContent.svelte +11 -3
- package/components/common/drawer/DrawerContent.svelte.d.ts +5 -3
- package/components/common/languageIcons/LanguageIcon.svelte +6 -4
- package/components/common/languageIcons/LanguageIcon.svelte.d.ts +4 -4
- package/components/common/menu/Menu.svelte +7 -5
- package/components/common/menu/Menu.svelte.d.ts +7 -6
- package/components/common/menu/MenuItem.svelte +1 -0
- package/components/common/popup/Popup.svelte.d.ts +3 -3
- package/components/common/skeleton/Skeleton.svelte.d.ts +3 -3
- package/components/common/skeleton/SkeletonElement.svelte.d.ts +3 -3
- package/components/common/skeleton/model.d.ts +4 -4
- package/components/common/table/AppRow.svelte +61 -0
- package/components/common/table/AppRow.svelte.d.ts +23 -0
- package/components/common/table/FlowRow.svelte +136 -0
- package/components/common/table/FlowRow.svelte.d.ts +25 -0
- package/components/common/table/LanguageBadge.svelte +32 -0
- package/components/common/table/LanguageBadge.svelte.d.ts +24 -0
- package/components/common/table/Row.svelte +47 -0
- package/components/common/table/Row.svelte.d.ts +27 -0
- package/components/common/table/RowIcon.svelte +23 -0
- package/components/common/table/RowIcon.svelte.d.ts +16 -0
- package/components/common/table/ScriptRow.svelte +147 -0
- package/components/common/table/ScriptRow.svelte.d.ts +25 -0
- package/components/common/table/Table.svelte +9 -0
- package/components/common/table/Table.svelte.d.ts +23 -0
- package/components/common/tabs/Tab.svelte +15 -4
- package/components/common/tabs/Tab.svelte.d.ts +5 -3
- package/components/common/tabs/TabContent.svelte.d.ts +3 -3
- package/components/common/tabs/Tabs.svelte +5 -1
- package/components/common/tabs/Tabs.svelte.d.ts +4 -4
- package/components/common/toggleButton/ToggleButton.svelte +12 -9
- package/components/common/toggleButton/ToggleButton.svelte.d.ts +6 -4
- package/components/common/toggleButton/ToggleButtonGroup.svelte +12 -19
- package/components/common/toggleButton/ToggleButtonGroup.svelte.d.ts +10 -8
- package/components/flows/CreateActionsFlow.svelte +66 -0
- package/components/flows/CreateActionsFlow.svelte.d.ts +14 -0
- package/components/flows/FlowEditor.svelte +22 -5
- package/components/flows/FlowEditor.svelte.d.ts +4 -3
- package/components/flows/FlowProgressBar.svelte.d.ts +3 -3
- package/components/flows/common/FlowCard.svelte.d.ts +3 -3
- package/components/flows/common/FlowCardHeader.svelte +3 -1
- package/components/flows/common/FlowCardHeader.svelte.d.ts +3 -3
- package/components/flows/content/CapturePayload.svelte.d.ts +3 -3
- package/components/flows/content/DynamicInputHelpBox.svelte +2 -32
- package/components/flows/content/DynamicInputHelpBox.svelte.d.ts +4 -6
- package/components/flows/content/FlowBranchAllWrapper.svelte.d.ts +3 -3
- package/components/flows/content/FlowBranchOneWrapper.svelte +3 -2
- package/components/flows/content/FlowBranchOneWrapper.svelte.d.ts +3 -3
- package/components/flows/content/FlowBranchesWrapper.svelte +2 -2
- package/components/flows/content/FlowBranchesWrapper.svelte.d.ts +3 -3
- package/components/flows/content/FlowEditorPanel.svelte +2 -0
- package/components/flows/content/FlowEditorPanel.svelte.d.ts +3 -3
- package/components/flows/content/FlowFailureModule.svelte.d.ts +3 -3
- package/components/flows/content/FlowInput.svelte +9 -12
- package/components/flows/content/FlowInput.svelte.d.ts +3 -3
- package/components/flows/content/FlowInputs.svelte +119 -140
- package/components/flows/content/FlowInputs.svelte.d.ts +4 -7
- package/components/flows/content/FlowLoop.svelte +3 -2
- package/components/flows/content/FlowLoop.svelte.d.ts +3 -3
- package/components/flows/content/FlowModuleComponent.svelte +49 -45
- package/components/flows/content/FlowModuleComponent.svelte.d.ts +3 -3
- package/components/flows/content/FlowModuleEarlyStop.svelte +3 -2
- package/components/flows/content/FlowModuleEarlyStop.svelte.d.ts +3 -3
- package/components/flows/content/FlowModuleHeader.svelte +6 -3
- package/components/flows/content/FlowModuleHeader.svelte.d.ts +3 -3
- package/components/flows/content/FlowModuleScript.svelte.d.ts +3 -3
- package/components/flows/content/FlowModuleSuspend.svelte +9 -3
- package/components/flows/content/FlowModuleSuspend.svelte.d.ts +3 -3
- package/components/flows/content/FlowModuleWrapper.svelte +0 -22
- package/components/flows/content/FlowModuleWrapper.svelte.d.ts +3 -3
- package/components/flows/content/FlowRetries.svelte.d.ts +3 -3
- package/components/flows/content/FlowSchedules.svelte.d.ts +3 -3
- package/components/flows/content/FlowSettings.svelte +88 -93
- package/components/flows/content/FlowSettings.svelte.d.ts +3 -3
- package/components/flows/content/RemoveStepConfirmationModal.svelte.d.ts +3 -3
- package/components/flows/flowState.d.ts +2 -2
- package/components/flows/flowStateUtils.d.ts +1 -0
- package/components/flows/flowStateUtils.js +13 -2
- package/components/flows/flowStore.d.ts +1 -1
- package/components/flows/flowStore.js +1 -1
- package/components/flows/header/FlowImportExportMenu.svelte +9 -23
- package/components/flows/header/FlowImportExportMenu.svelte.d.ts +3 -3
- package/components/flows/header/FlowPreviewButtons.svelte +20 -16
- package/components/flows/header/FlowPreviewButtons.svelte.d.ts +3 -3
- package/components/flows/map/FlowBranchAllMap.svelte +47 -37
- package/components/flows/map/FlowBranchAllMap.svelte.d.ts +3 -3
- package/components/flows/map/FlowBranchOneMap.svelte +50 -42
- package/components/flows/map/FlowBranchOneMap.svelte.d.ts +3 -3
- package/components/flows/map/FlowErrorHandlerItem.svelte +5 -3
- package/components/flows/map/FlowErrorHandlerItem.svelte.d.ts +3 -3
- package/components/flows/map/FlowInputsItem.svelte +3 -2
- package/components/flows/map/FlowInputsItem.svelte.d.ts +3 -3
- package/components/flows/map/FlowModuleSchemaItem.svelte +26 -31
- package/components/flows/map/FlowModuleSchemaItem.svelte.d.ts +5 -5
- package/components/flows/map/FlowModuleSchemaMap.svelte +50 -92
- package/components/flows/map/FlowModuleSchemaMap.svelte.d.ts +3 -4
- package/components/flows/map/FlowSettingsItem.svelte +8 -7
- package/components/flows/map/FlowSettingsItem.svelte.d.ts +3 -3
- package/components/flows/map/InsertModuleButton.svelte +62 -8
- package/components/flows/map/InsertModuleButton.svelte.d.ts +4 -4
- package/components/flows/map/MapItem.svelte +30 -16
- package/components/flows/map/MapItem.svelte.d.ts +4 -6
- package/components/flows/pickers/FlowScriptPicker.svelte +11 -4
- package/components/flows/pickers/FlowScriptPicker.svelte.d.ts +8 -6
- package/components/flows/pickers/PickHubScript.svelte +74 -29
- package/components/flows/pickers/PickHubScript.svelte.d.ts +5 -6
- package/components/flows/pickers/PickScript.svelte +16 -9
- package/components/flows/pickers/PickScript.svelte.d.ts +3 -4
- package/components/flows/pickers/WorkspaceScriptPicker.svelte +53 -0
- package/components/flows/pickers/WorkspaceScriptPicker.svelte.d.ts +19 -0
- package/components/flows/pickers/model.d.ts +5 -3
- package/components/flows/previousResults.d.ts +2 -2
- package/components/flows/previousResults.js +5 -5
- package/components/flows/propPicker/PropPickerWrapper.svelte +2 -2
- package/components/flows/propPicker/PropPickerWrapper.svelte.d.ts +7 -7
- package/components/flows/scheduleUtils.d.ts +1 -1
- package/components/flows/scheduleUtils.js +1 -1
- package/components/flows/types.d.ts +1 -1
- package/components/flows/utils.d.ts +1 -1
- package/components/flows/utils.js +4 -9
- package/components/graph/FlowGraph.svelte +57 -18
- package/components/graph/FlowGraph.svelte.d.ts +6 -4
- package/components/graph/model.d.ts +7 -6
- package/components/icons/AirtableIcon.svelte.d.ts +3 -3
- package/components/icons/DbIcon.svelte.d.ts +3 -3
- package/components/icons/DiscordIcon.svelte.d.ts +3 -3
- package/components/icons/GCloudIcon.svelte.d.ts +3 -3
- package/components/icons/GItlabIcon.svelte.d.ts +3 -3
- package/components/icons/GSheetsIcon.svelte.d.ts +3 -3
- package/components/icons/GcalIcon.svelte.d.ts +3 -3
- package/components/icons/GdriveIcon.svelte.d.ts +3 -3
- package/components/icons/GithubIcon.svelte.d.ts +3 -3
- package/components/icons/GmailIcon.svelte.d.ts +3 -3
- package/components/icons/HatIcon.svelte.d.ts +3 -3
- package/components/icons/HttpIcon.svelte.d.ts +3 -3
- package/components/icons/Mail.svelte.d.ts +3 -3
- package/components/icons/MailchimpIcon.svelte +18 -0
- package/components/icons/MailchimpIcon.svelte.d.ts +17 -0
- package/components/icons/MastodonIcon.svelte.d.ts +3 -3
- package/components/icons/MatrixIcon.svelte.d.ts +3 -3
- package/components/icons/Mysql.svelte.d.ts +3 -3
- package/components/icons/PostgresIcon.svelte.d.ts +3 -3
- package/components/icons/S3Icon.svelte.d.ts +3 -3
- package/components/icons/SendgridIcon.svelte +66 -0
- package/components/icons/SendgridIcon.svelte.d.ts +17 -0
- package/components/icons/Slack.svelte.d.ts +3 -3
- package/components/icons/TogglIcon.svelte.d.ts +3 -3
- package/components/icons/WindmillIcon.svelte.d.ts +3 -3
- package/components/icons/index.d.ts +48 -0
- package/components/icons/index.js +48 -0
- package/components/jobs/JobDetail.svelte +2 -2
- package/components/jobs/JobDetail.svelte.d.ts +3 -3
- package/components/preview/FlowPreviewStatus.svelte.d.ts +3 -3
- package/components/progressBar/ProgressBar.svelte.d.ts +3 -3
- package/components/progressBar/ProgressBarGeneralPart.svelte.d.ts +3 -3
- package/components/progressBar/ProgressBarLoopAccessor.svelte.d.ts +3 -3
- package/components/progressBar/ProgressBarLoopPart.svelte.d.ts +3 -3
- package/components/progressBar/model.d.ts +9 -9
- package/components/propertyPicker/ObjectViewer.svelte +34 -9
- package/components/propertyPicker/ObjectViewer.svelte.d.ts +4 -3
- package/components/propertyPicker/PropPicker.svelte +118 -110
- package/components/propertyPicker/PropPicker.svelte.d.ts +3 -3
- package/components/propertyPicker/PropPickerResult.svelte +0 -1
- package/components/propertyPicker/PropPickerResult.svelte.d.ts +3 -3
- package/components/scriptEditor/LogPanel.svelte +4 -4
- package/components/scriptEditor/LogPanel.svelte.d.ts +3 -3
- package/components/scripts/{CreateActions.svelte → CreateActionsScript.svelte} +7 -46
- package/components/scripts/CreateActionsScript.svelte.d.ts +14 -0
- package/components/sidebar/MenuLink.svelte +7 -4
- package/components/sidebar/MenuLink.svelte.d.ts +4 -3
- package/components/sidebar/SidebarContent.svelte +25 -18
- package/components/sidebar/SidebarContent.svelte.d.ts +7 -3
- package/components/sidebar/UserMenu.svelte +1 -1
- package/components/sidebar/UserMenu.svelte.d.ts +3 -3
- package/components/sidebar/WorkspaceMenu.svelte +3 -3
- package/components/sidebar/WorkspaceMenu.svelte.d.ts +3 -3
- package/components/splitPanes/SplitPanesWrapper.svelte.d.ts +3 -3
- package/editorUtils.d.ts +1 -1
- package/editorUtils.js +2 -2
- package/gen/core/ApiRequestOptions.d.ts +1 -1
- package/gen/core/ApiResult.d.ts +1 -1
- package/gen/core/OpenAPI.d.ts +3 -3
- package/gen/core/OpenAPI.js +1 -1
- package/gen/index.d.ts +2 -0
- package/gen/index.js +1 -0
- package/gen/models/AppWithLastVersion.d.ts +12 -12
- package/gen/models/AuditLog.d.ts +1 -1
- package/gen/models/BranchAll.d.ts +1 -1
- package/gen/models/BranchOne.d.ts +1 -1
- package/gen/models/CompletedJob.d.ts +1 -1
- package/gen/models/ContextualVariable.d.ts +1 -1
- package/gen/models/CreateResource.d.ts +1 -2
- package/gen/models/CreateVariable.d.ts +1 -1
- package/gen/models/CreateWorkspace.d.ts +1 -1
- package/gen/models/EditResource.d.ts +1 -1
- package/gen/models/EditResourceType.d.ts +1 -1
- package/gen/models/EditSchedule.d.ts +1 -1
- package/gen/models/EditVariable.d.ts +1 -1
- package/gen/models/EditWorkspaceUser.d.ts +1 -1
- package/gen/models/Flow.d.ts +1 -1
- package/gen/models/FlowMetadata.d.ts +2 -1
- package/gen/models/FlowModule.d.ts +1 -1
- package/gen/models/FlowModuleValue.d.ts +1 -1
- package/gen/models/FlowPreview.d.ts +1 -1
- package/gen/models/FlowStatus.d.ts +1 -1
- package/gen/models/FlowStatusModule.d.ts +1 -1
- package/gen/models/FlowValue.d.ts +1 -1
- package/gen/models/ForloopFlow.d.ts +1 -1
- package/gen/models/GlobalUserInfo.d.ts +1 -1
- package/gen/models/Group.d.ts +1 -1
- package/gen/models/Identity.d.ts +1 -1
- package/gen/models/InputTransform.d.ts +1 -1
- package/gen/models/JavascriptTransform.d.ts +1 -1
- package/gen/models/Job.d.ts +1 -1
- package/gen/models/ListableApp.d.ts +10 -8
- package/gen/models/ListableResource.d.ts +13 -0
- package/gen/models/ListableResource.js +4 -0
- package/gen/models/ListableVariable.d.ts +4 -1
- package/gen/models/Login.d.ts +1 -1
- package/gen/models/MainArgSignature.d.ts +1 -1
- package/gen/models/NewSchedule.d.ts +1 -1
- package/gen/models/NewToken.d.ts +1 -1
- package/gen/models/NewUser.d.ts +1 -1
- package/gen/models/OpenFlow.d.ts +1 -1
- package/gen/models/OpenFlowWPath.d.ts +1 -1
- package/gen/models/PathScript.d.ts +1 -1
- package/gen/models/Policy.d.ts +1 -1
- package/gen/models/Preview.d.ts +1 -1
- package/gen/models/QueuedJob.d.ts +1 -1
- package/gen/models/RawScript.d.ts +2 -1
- package/gen/models/Resource.d.ts +1 -1
- package/gen/models/ResourceType.d.ts +1 -1
- package/gen/models/Retry.d.ts +1 -1
- package/gen/models/Schedule.d.ts +1 -1
- package/gen/models/Script.d.ts +2 -1
- package/gen/models/ScriptArgs.d.ts +1 -1
- package/gen/models/SlackToken.d.ts +1 -1
- package/gen/models/StaticTransform.d.ts +1 -1
- package/gen/models/TokenResponse.d.ts +1 -1
- package/gen/models/TruncatedToken.d.ts +1 -1
- package/gen/models/Usage.d.ts +1 -1
- package/gen/models/User.d.ts +1 -1
- package/gen/models/UserWorkspaceList.d.ts +1 -1
- package/gen/models/WorkerPing.d.ts +1 -1
- package/gen/models/Workspace.d.ts +1 -1
- package/gen/models/WorkspaceInvite.d.ts +1 -1
- package/gen/services/AppService.d.ts +101 -1
- package/gen/services/AppService.js +88 -1
- package/gen/services/FavoriteService.d.ts +27 -0
- package/gen/services/FavoriteService.js +36 -0
- package/gen/services/FlowService.d.ts +7 -91
- package/gen/services/FlowService.js +2 -73
- package/gen/services/JobService.d.ts +15 -0
- package/gen/services/JobService.js +19 -0
- package/gen/services/ResourceService.d.ts +3 -2
- package/gen/services/ResourceService.js +1 -1
- package/gen/services/ScheduleService.d.ts +1 -1
- package/gen/services/ScheduleService.js +1 -1
- package/gen/services/ScriptService.d.ts +7 -1
- package/gen/services/ScriptService.js +2 -1
- package/package.json +422 -361
- package/script_helpers.d.ts +3 -1
- package/script_helpers.js +73 -25
- package/stateMachine.d.ts +4 -4
- package/stores.d.ts +2 -0
- package/stores.js +1 -0
- package/utils.d.ts +4 -2
- package/utils.js +20 -3
- package/components/FlowModulesViewer.svelte +0 -191
- package/components/FlowModulesViewer.svelte.d.ts +0 -18
- package/components/landing/FlowGettingStarted.svelte +0 -50
- package/components/landing/FlowGettingStarted.svelte.d.ts +0 -19
- package/components/landing/FlowLandingBox.svelte +0 -39
- package/components/landing/FlowLandingBox.svelte.d.ts +0 -17
- package/components/landing/RessourceGettingStarted.svelte +0 -21
- package/components/landing/RessourceGettingStarted.svelte.d.ts +0 -19
- package/components/landing/ScriptBox.svelte +0 -52
- package/components/landing/ScriptBox.svelte.d.ts +0 -17
- package/components/landing/ScriptGettingStarted.svelte +0 -48
- package/components/landing/ScriptGettingStarted.svelte.d.ts +0 -19
- package/components/scripts/CreateActions.svelte.d.ts +0 -14
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import type { Schema } from '../../common';
|
|
2
|
+
import type { Preview } from '../../gen';
|
|
3
|
+
import type { FilledItem } from 'svelte-grid';
|
|
4
|
+
import type { Writable } from 'svelte/store';
|
|
5
|
+
import type { staticValues } from './editor/componentsPanel/componentStaticValues';
|
|
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
|
+
type BaseComponent<T extends string> = {
|
|
42
|
+
type: T;
|
|
43
|
+
};
|
|
44
|
+
export type TextComponent = BaseComponent<'textcomponent'>;
|
|
45
|
+
export type TextInputComponent = BaseComponent<'textinputcomponent'>;
|
|
46
|
+
export type ButtonComponent = Runnable & BaseComponent<'buttoncomponent'>;
|
|
47
|
+
export type RunFormComponent = Runnable & BaseComponent<'runformcomponent'>;
|
|
48
|
+
export type BarChartComponent = BaseComponent<'barchartcomponent'>;
|
|
49
|
+
export type PieChartComponent = Runnable & BaseComponent<'piechartcomponent'>;
|
|
50
|
+
export type TableComponent = Runnable & BaseComponent<'tablecomponent'> & {
|
|
51
|
+
actionButtons: (BaseAppComponent & ButtonComponent)[];
|
|
52
|
+
};
|
|
53
|
+
export type DisplayComponent = BaseComponent<'displaycomponent'>;
|
|
54
|
+
export type ImageComponent = BaseComponent<'imagecomponent'>;
|
|
55
|
+
export type InputComponent = BaseComponent<'inputcomponent'>;
|
|
56
|
+
export type SelectComponent = BaseComponent<'selectcomponent'>;
|
|
57
|
+
export type CheckboxComponent = BaseComponent<'checkboxcomponent'>;
|
|
58
|
+
export type RadioComponent = BaseComponent<'radiocomponent'>;
|
|
59
|
+
export type HorizontalAlignment = 'left' | 'center' | 'right';
|
|
60
|
+
export type VerticalAlignment = 'top' | 'center' | 'bottom';
|
|
61
|
+
export type Aligned = {
|
|
62
|
+
horizontalAlignment: HorizontalAlignment;
|
|
63
|
+
verticalAlignment: VerticalAlignment;
|
|
64
|
+
};
|
|
65
|
+
export interface BaseAppComponent extends Partial<Aligned> {
|
|
66
|
+
id: ComponentID;
|
|
67
|
+
inputs: InputsSpec;
|
|
68
|
+
componentInputs: InputsSpec;
|
|
69
|
+
runnable?: boolean | undefined;
|
|
70
|
+
card?: boolean | undefined;
|
|
71
|
+
}
|
|
72
|
+
export type AppComponent = BaseAppComponent & (RunFormComponent | DisplayComponent | TextInputComponent | BarChartComponent | TableComponent | TextComponent | TableComponent | ButtonComponent | PieChartComponent | ImageComponent | InputComponent | SelectComponent | CheckboxComponent | RadioComponent);
|
|
73
|
+
export type ComponentSet = {
|
|
74
|
+
title: string;
|
|
75
|
+
components: AppComponent[];
|
|
76
|
+
};
|
|
77
|
+
type SectionID = string;
|
|
78
|
+
export type AppSection = {
|
|
79
|
+
components: AppComponent[];
|
|
80
|
+
id: SectionID;
|
|
81
|
+
};
|
|
82
|
+
export type GridItem = FilledItem<{
|
|
83
|
+
data: AppComponent;
|
|
84
|
+
id: string;
|
|
85
|
+
}>;
|
|
86
|
+
export type InlineScript = {
|
|
87
|
+
content: string;
|
|
88
|
+
language: Preview.language;
|
|
89
|
+
path: string;
|
|
90
|
+
schema: Schema;
|
|
91
|
+
};
|
|
92
|
+
export type App = {
|
|
93
|
+
grid: GridItem[];
|
|
94
|
+
inlineScripts: Record<string, InlineScript>;
|
|
95
|
+
title: string;
|
|
96
|
+
};
|
|
97
|
+
export type ConnectingInput<T, V> = {
|
|
98
|
+
opened: boolean;
|
|
99
|
+
input?: DynamicInput<T, V>;
|
|
100
|
+
};
|
|
101
|
+
export type AppEditorContext = {
|
|
102
|
+
worldStore: Writable<World | undefined>;
|
|
103
|
+
staticOutputs: Writable<Record<string, string[]>>;
|
|
104
|
+
app: Writable<App>;
|
|
105
|
+
selectedComponent: Writable<string | undefined>;
|
|
106
|
+
mode: Writable<EditorMode>;
|
|
107
|
+
connectingInput: Writable<ConnectingInput<any, any>>;
|
|
108
|
+
breakpoint: Writable<EditorBreakpoint>;
|
|
109
|
+
};
|
|
110
|
+
export type EditorMode = 'dnd' | 'preview';
|
|
111
|
+
export type EditorBreakpoint = 'sm' | 'lg';
|
|
112
|
+
type FieldID = string;
|
|
113
|
+
type ComponentID = string;
|
|
114
|
+
export type EditorConfig = {
|
|
115
|
+
staticInputDisabled: boolean;
|
|
116
|
+
outputInputDisabled: boolean;
|
|
117
|
+
userInputEnabled: boolean;
|
|
118
|
+
visibiltyEnabled: boolean;
|
|
119
|
+
};
|
|
120
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { InputsSpec, InputType } from './types';
|
|
2
|
+
import type { Schema } from '../../common';
|
|
3
|
+
export declare function loadSchema(workspace: string, path: string, runType: 'script' | 'flow'): Promise<Schema>;
|
|
4
|
+
export declare function schemaToInputsSpec(schema: Schema): InputsSpec;
|
|
5
|
+
export declare const displayData: {
|
|
6
|
+
displaycomponent: {
|
|
7
|
+
name: string;
|
|
8
|
+
icon: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
9
|
+
};
|
|
10
|
+
textcomponent: {
|
|
11
|
+
name: string;
|
|
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
|
+
};
|
|
35
|
+
export declare function accessPropertyByPath<T>(object: T, path: string): T | undefined;
|
|
36
|
+
export declare function fieldTypeToTsType(InputType: InputType): string;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { FlowService, ScriptService } from '../../gen';
|
|
2
|
+
import { faBarChart, faDisplay, faFile, faMobileScreenButton, faPieChart } from '@fortawesome/free-solid-svg-icons';
|
|
3
|
+
export async function loadSchema(workspace, path, runType) {
|
|
4
|
+
if (runType === 'script') {
|
|
5
|
+
const script = await ScriptService.getScriptByPath({
|
|
6
|
+
workspace,
|
|
7
|
+
path
|
|
8
|
+
});
|
|
9
|
+
return script.schema;
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
const flow = await FlowService.getFlowByPath({
|
|
13
|
+
workspace,
|
|
14
|
+
path
|
|
15
|
+
});
|
|
16
|
+
return flow.schema;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export function schemaToInputsSpec(schema) {
|
|
20
|
+
return Object.keys(schema.properties).reduce((accu, key) => {
|
|
21
|
+
const property = schema.properties[key];
|
|
22
|
+
accu[key] = {
|
|
23
|
+
type: 'static',
|
|
24
|
+
defaultValue: property.default,
|
|
25
|
+
value: undefined,
|
|
26
|
+
visible: true,
|
|
27
|
+
fieldType: property.type
|
|
28
|
+
};
|
|
29
|
+
return accu;
|
|
30
|
+
}, {});
|
|
31
|
+
}
|
|
32
|
+
export const displayData = {
|
|
33
|
+
displaycomponent: {
|
|
34
|
+
name: 'Result',
|
|
35
|
+
icon: faDisplay
|
|
36
|
+
},
|
|
37
|
+
textcomponent: {
|
|
38
|
+
name: 'Text',
|
|
39
|
+
icon: faFile
|
|
40
|
+
},
|
|
41
|
+
buttoncomponent: {
|
|
42
|
+
name: 'Button',
|
|
43
|
+
icon: faMobileScreenButton
|
|
44
|
+
},
|
|
45
|
+
piechartcomponent: {
|
|
46
|
+
name: 'Pie chart',
|
|
47
|
+
icon: faPieChart
|
|
48
|
+
},
|
|
49
|
+
barchartcomponent: {
|
|
50
|
+
name: 'Bar chart',
|
|
51
|
+
icon: faBarChart
|
|
52
|
+
},
|
|
53
|
+
tablecomponent: {
|
|
54
|
+
name: 'Table',
|
|
55
|
+
icon: faBarChart
|
|
56
|
+
},
|
|
57
|
+
checkboxcomponent: {
|
|
58
|
+
name: 'Checkbox',
|
|
59
|
+
icon: faBarChart
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
export function accessPropertyByPath(object, path) {
|
|
63
|
+
// convert indexes to properties
|
|
64
|
+
path = path.replace(/\[(\w+)\]/g, '.$1');
|
|
65
|
+
// strip a leading dot
|
|
66
|
+
path = path.replace(/^\./, '');
|
|
67
|
+
let a = path.split('.');
|
|
68
|
+
for (let i = 0, depth = a.length; i < depth; ++i) {
|
|
69
|
+
let key = a[i];
|
|
70
|
+
if (object[key]) {
|
|
71
|
+
object = object[key];
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
// Value not found
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return object;
|
|
79
|
+
}
|
|
80
|
+
export function fieldTypeToTsType(InputType) {
|
|
81
|
+
switch (InputType) {
|
|
82
|
+
case 'text':
|
|
83
|
+
case 'textarea':
|
|
84
|
+
case 'date':
|
|
85
|
+
case 'time':
|
|
86
|
+
case 'datetime':
|
|
87
|
+
case 'select':
|
|
88
|
+
return 'string';
|
|
89
|
+
case 'number':
|
|
90
|
+
return 'number';
|
|
91
|
+
case 'boolean':
|
|
92
|
+
return 'boolean';
|
|
93
|
+
case 'object':
|
|
94
|
+
return 'object';
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -14,9 +14,9 @@ declare const __propDef: {
|
|
|
14
14
|
right: {};
|
|
15
15
|
};
|
|
16
16
|
};
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
17
|
+
export type ActionRowProps = typeof __propDef.props;
|
|
18
|
+
export type ActionRowEvents = typeof __propDef.events;
|
|
19
|
+
export type ActionRowSlots = typeof __propDef.slots;
|
|
20
20
|
export default class ActionRow extends SvelteComponentTyped<ActionRowProps, ActionRowEvents, ActionRowSlots> {
|
|
21
21
|
}
|
|
22
22
|
export {};
|
|
@@ -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 size = 'sm';
|
|
6
7
|
const icons = {
|
|
7
8
|
info: faInfoCircle,
|
|
8
9
|
warning: faWarning,
|
|
@@ -11,25 +12,25 @@ const icons = {
|
|
|
11
12
|
};
|
|
12
13
|
const classes = {
|
|
13
14
|
info: {
|
|
14
|
-
bgClass: 'bg-blue-50',
|
|
15
|
+
bgClass: 'bg-blue-50 border-blue-200 border',
|
|
15
16
|
iconClass: 'text-blue-500',
|
|
16
17
|
titleClass: 'text-blue-800',
|
|
17
18
|
descriptionClass: 'text-blue-700'
|
|
18
19
|
},
|
|
19
20
|
warning: {
|
|
20
|
-
bgClass: 'bg-yellow-50',
|
|
21
|
+
bgClass: 'bg-yellow-50 border-yellow-200 border',
|
|
21
22
|
iconClass: 'text-yellow-500',
|
|
22
23
|
titleClass: 'text-yellow-800',
|
|
23
24
|
descriptionClass: 'text-yellow-700'
|
|
24
25
|
},
|
|
25
26
|
error: {
|
|
26
|
-
bgClass: 'bg-red-50',
|
|
27
|
+
bgClass: 'bg-red-50 border-red-200 border',
|
|
27
28
|
iconClass: 'text-red-500',
|
|
28
29
|
titleClass: 'text-red-800',
|
|
29
30
|
descriptionClass: 'text-red-700'
|
|
30
31
|
},
|
|
31
32
|
success: {
|
|
32
|
-
bgClass: 'bg-green-50',
|
|
33
|
+
bgClass: 'bg-green-50 border-green-200 border',
|
|
33
34
|
iconClass: 'text-green-500',
|
|
34
35
|
titleClass: 'text-green-800',
|
|
35
36
|
descriptionClass: 'text-green-700'
|
|
@@ -37,15 +38,36 @@ const classes = {
|
|
|
37
38
|
};
|
|
38
39
|
</script>
|
|
39
40
|
|
|
40
|
-
<div
|
|
41
|
+
<div
|
|
42
|
+
class={classNames(
|
|
43
|
+
'rounded-md',
|
|
44
|
+
size === 'sm' ? 'p-4' : 'p-2 ',
|
|
45
|
+
classes[type].bgClass,
|
|
46
|
+
$$props.class
|
|
47
|
+
)}
|
|
48
|
+
>
|
|
41
49
|
<div class="flex">
|
|
42
50
|
<div class="flex h-8 w-8 items-center justify-center rounded-full">
|
|
43
51
|
<Icon data={icons[type]} class={classes[type].iconClass} />
|
|
44
52
|
</div>
|
|
45
53
|
|
|
46
54
|
<div class="ml-2 w-full">
|
|
47
|
-
<span
|
|
48
|
-
|
|
55
|
+
<span
|
|
56
|
+
class={classNames(
|
|
57
|
+
size === 'sm' ? 'text-sm' : 'text-xs ',
|
|
58
|
+
'font-medium',
|
|
59
|
+
classes[type].titleClass
|
|
60
|
+
)}
|
|
61
|
+
>
|
|
62
|
+
{title}
|
|
63
|
+
</span>
|
|
64
|
+
<div
|
|
65
|
+
class={classNames(
|
|
66
|
+
size === 'sm' ? 'text-sm' : 'text-xs ',
|
|
67
|
+
'mt-2',
|
|
68
|
+
classes[type].descriptionClass
|
|
69
|
+
)}
|
|
70
|
+
>
|
|
49
71
|
<slot />
|
|
50
72
|
</div>
|
|
51
73
|
</div>
|
|
@@ -5,6 +5,7 @@ declare const __propDef: {
|
|
|
5
5
|
[x: string]: any;
|
|
6
6
|
type?: AlertType | undefined;
|
|
7
7
|
title: string;
|
|
8
|
+
size?: "xs" | "sm" | undefined;
|
|
8
9
|
};
|
|
9
10
|
events: {
|
|
10
11
|
[evt: string]: CustomEvent<any>;
|
|
@@ -13,9 +14,9 @@ declare const __propDef: {
|
|
|
13
14
|
default: {};
|
|
14
15
|
};
|
|
15
16
|
};
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
17
|
+
export type AlertProps = typeof __propDef.props;
|
|
18
|
+
export type AlertEvents = typeof __propDef.events;
|
|
19
|
+
export type AlertSlots = typeof __propDef.slots;
|
|
19
20
|
export default class Alert extends SvelteComponentTyped<AlertProps, AlertEvents, AlertSlots> {
|
|
20
21
|
}
|
|
21
22
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type AlertType = 'success' | 'error' | 'warning' | 'info';
|
|
@@ -6,9 +6,8 @@ export let color = 'gray';
|
|
|
6
6
|
export let large = false;
|
|
7
7
|
export let href = '';
|
|
8
8
|
export let rounded = false;
|
|
9
|
-
export let index = false;
|
|
10
9
|
export let dismissable = false;
|
|
11
|
-
export let baseClass = 'text-center
|
|
10
|
+
export let baseClass = 'text-center';
|
|
12
11
|
export let capitalize = false;
|
|
13
12
|
export let icon = undefined;
|
|
14
13
|
let defaulIconProps = {
|
|
@@ -40,15 +39,12 @@ const hovers = {
|
|
|
40
39
|
indigo: 'hover:bg-indigo-200 dark:hover:bg-indigo-300'
|
|
41
40
|
};
|
|
42
41
|
$: badgeClass = classNames(baseClass, large ? 'text-sm font-medium' : 'text-xs font-semibold', colors[color], href &&
|
|
43
|
-
(color.startsWith(ColorModifier) ? hovers[color.replace(ColorModifier, '')] : hovers[color]), rounded ? 'rounded-full px-2 py-1' : 'rounded px-2.5 py-0.5',
|
|
44
|
-
? 'absolute flex justify-center items-center font-bold overflow-hidden border-2 border-white dark:border-gray-900' +
|
|
45
|
-
(large ? 'w-7 h-7 -top-3.5 -right-3.5' : 'w-6 h-6 -top-3 -right-3')
|
|
46
|
-
: '', $$props.class);
|
|
42
|
+
(color.startsWith(ColorModifier) ? hovers[color.replace(ColorModifier, '')] : hovers[color]), rounded ? 'rounded-full px-2 py-1' : 'rounded px-2.5 py-0.5', $$props.class);
|
|
47
43
|
$: iconProps = icon ? { ...defaulIconProps, ...icon } : { data: undefined };
|
|
48
44
|
const handleHide = () => (hidden = !hidden);
|
|
49
45
|
</script>
|
|
50
46
|
|
|
51
|
-
<span class="inline-flex justify-center items-center whitespace-nowrap">
|
|
47
|
+
<span on:click on:keydown class="inline-flex justify-center items-center whitespace-nowrap">
|
|
52
48
|
<svelte:element
|
|
53
49
|
this={href ? 'a' : 'span'}
|
|
54
50
|
{href}
|
|
@@ -7,22 +7,24 @@ declare const __propDef: {
|
|
|
7
7
|
large?: boolean | undefined;
|
|
8
8
|
href?: string | undefined;
|
|
9
9
|
rounded?: boolean | undefined;
|
|
10
|
-
index?: boolean | undefined;
|
|
11
10
|
dismissable?: boolean | undefined;
|
|
12
11
|
baseClass?: string | undefined;
|
|
13
12
|
capitalize?: boolean | undefined;
|
|
14
13
|
icon?: BadgeIconProps | undefined;
|
|
15
14
|
};
|
|
16
15
|
events: {
|
|
16
|
+
click: MouseEvent;
|
|
17
|
+
keydown: KeyboardEvent;
|
|
18
|
+
} & {
|
|
17
19
|
[evt: string]: CustomEvent<any>;
|
|
18
20
|
};
|
|
19
21
|
slots: {
|
|
20
22
|
default: {};
|
|
21
23
|
};
|
|
22
24
|
};
|
|
23
|
-
export
|
|
24
|
-
export
|
|
25
|
-
export
|
|
25
|
+
export type BadgeProps = typeof __propDef.props;
|
|
26
|
+
export type BadgeEvents = typeof __propDef.events;
|
|
27
|
+
export type BadgeSlots = typeof __propDef.slots;
|
|
26
28
|
export default class Badge extends SvelteComponentTyped<BadgeProps, BadgeEvents, BadgeSlots> {
|
|
27
29
|
}
|
|
28
30
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { IconProps } from 'svelte-awesome/components/Icon.svelte';
|
|
2
|
-
|
|
2
|
+
type BaseColor = 'blue' | 'gray' | 'red' | 'green' | 'yellow' | 'indigo';
|
|
3
3
|
export declare const ColorModifier = "dark-";
|
|
4
|
-
export
|
|
4
|
+
export type BadgeColor = BaseColor | `${typeof ColorModifier}${BaseColor}`;
|
|
5
5
|
export interface BadgeIconProps extends IconProps {
|
|
6
6
|
position?: 'left' | 'right';
|
|
7
7
|
}
|
|
@@ -14,9 +14,9 @@ declare const __propDef: {
|
|
|
14
14
|
separator: {};
|
|
15
15
|
};
|
|
16
16
|
};
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
17
|
+
export type BreadcrumbProps = typeof __propDef.props;
|
|
18
|
+
export type BreadcrumbEvents = typeof __propDef.events;
|
|
19
|
+
export type BreadcrumbSlots = typeof __propDef.slots;
|
|
20
20
|
export default class Breadcrumb extends SvelteComponentTyped<BreadcrumbProps, BreadcrumbEvents, BreadcrumbSlots> {
|
|
21
21
|
}
|
|
22
22
|
export {};
|
|
@@ -3,6 +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 { faArrowsRotate, faSpinner } from '@fortawesome/free-solid-svg-icons';
|
|
6
7
|
export let size = 'md';
|
|
7
8
|
export let spacingSize = size;
|
|
8
9
|
export let color = 'blue';
|
|
@@ -17,6 +18,8 @@ export let endIcon = undefined;
|
|
|
17
18
|
export let element = undefined;
|
|
18
19
|
export let id = '';
|
|
19
20
|
export let nonCaptureEvent = false;
|
|
21
|
+
export let buttonType = 'button';
|
|
22
|
+
export let loading = false;
|
|
20
23
|
const dispatch = createEventDispatcher();
|
|
21
24
|
// Order of classes: border, border modifier, bg, bg modifier, text, text modifier, everything else
|
|
22
25
|
const colorVariants = {
|
|
@@ -36,6 +39,10 @@ const colorVariants = {
|
|
|
36
39
|
border: 'border-gray-800 hover:border-gray-900 focus:border-gray-900 bg-white hover:bg-gray-200 focus:bg-gray-200 text-gray-800 hover:text-gray-900 focus:text-gray-900 focus:ring-gray-300',
|
|
37
40
|
contained: 'bg-gray-700 hover:bg-gray-900 focus:bg-gray-900 text-white focus:ring-gray-300'
|
|
38
41
|
},
|
|
42
|
+
gray: {
|
|
43
|
+
border: 'border-gray-600 hover:border-gray-900 focus:border-gray-900 bg-white hover:bg-gray-200 focus:bg-gray-200 text-gray-800 hover:text-gray-900 focus:text-gray-900 focus:ring-gray-300',
|
|
44
|
+
contained: 'bg-gray-700/90 hover:bg-gray-900/90 focus:bg-gray-900/90 text-white focus:ring-gray-300'
|
|
45
|
+
},
|
|
39
46
|
light: {
|
|
40
47
|
border: 'border border-gray-300 bg-white hover:bg-gray-100 focus:bg-gray-100 text-gray-700 hover:text-gray-800 focus:text-gray-800 focus:ring-gray-300',
|
|
41
48
|
contained: 'bg-white border-gray-300 hover:bg-gray-100 focus:bg-gray-100 text-gray-700 focus:ring-gray-300'
|
|
@@ -43,13 +50,13 @@ const colorVariants = {
|
|
|
43
50
|
};
|
|
44
51
|
$: buttonProps = {
|
|
45
52
|
id,
|
|
46
|
-
class: classNames(colorVariants[color][variant], variant === 'border' ? 'border' : '', ButtonType.FontSizeClasses[size], ButtonType.SpacingClasses[spacingSize], 'focus:ring-
|
|
47
|
-
disabled,
|
|
53
|
+
class: classNames(colorVariants[color][variant], variant === 'border' ? 'border' : '', ButtonType.FontSizeClasses[size], ButtonType.SpacingClasses[spacingSize], 'focus:ring-2 font-semibold', 'rounded-md', 'justify-center items-center text-center whitespace-nowrap inline-flex', btnClasses, disabled ? 'bg-gray-300' : ''),
|
|
48
54
|
href,
|
|
49
55
|
target,
|
|
50
|
-
tabindex: disabled ? -1 : 0
|
|
56
|
+
tabindex: disabled ? -1 : 0,
|
|
57
|
+
type: buttonType
|
|
51
58
|
};
|
|
52
|
-
function onClick(event) {
|
|
59
|
+
async function onClick(event) {
|
|
53
60
|
if (!nonCaptureEvent) {
|
|
54
61
|
event.preventDefault();
|
|
55
62
|
dispatch('click', event);
|
|
@@ -58,7 +65,9 @@ function onClick(event) {
|
|
|
58
65
|
window.open(href, target);
|
|
59
66
|
}
|
|
60
67
|
else {
|
|
61
|
-
|
|
68
|
+
loading = true;
|
|
69
|
+
await goto(href);
|
|
70
|
+
loading = false;
|
|
62
71
|
}
|
|
63
72
|
}
|
|
64
73
|
}
|
|
@@ -75,10 +84,19 @@ $: endIconClass = classNames(iconOnly ? undefined : isSmall ? 'ml-1' : 'ml-2', e
|
|
|
75
84
|
on:focus
|
|
76
85
|
on:blur
|
|
77
86
|
{...buttonProps}
|
|
87
|
+
disabled={disabled || loading}
|
|
88
|
+
type="submit"
|
|
78
89
|
>
|
|
79
|
-
{#if
|
|
90
|
+
{#if loading}
|
|
91
|
+
<Icon
|
|
92
|
+
data={faSpinner}
|
|
93
|
+
class={`animate-spin ${startIconClass}`}
|
|
94
|
+
scale={ButtonType.IconScale[size]}
|
|
95
|
+
/>
|
|
96
|
+
{:else if startIcon}
|
|
80
97
|
<Icon data={startIcon.icon} class={startIconClass} scale={ButtonType.IconScale[size]} />
|
|
81
98
|
{/if}
|
|
99
|
+
|
|
82
100
|
{#if !iconOnly}
|
|
83
101
|
<slot />
|
|
84
102
|
{/if}
|
|
@@ -5,7 +5,7 @@ declare const __propDef: {
|
|
|
5
5
|
props: {
|
|
6
6
|
size?: ButtonType.Size | undefined;
|
|
7
7
|
spacingSize?: ButtonType.Size | undefined;
|
|
8
|
-
color?:
|
|
8
|
+
color?: "blue" | "gray" | "red" | "green" | "dark" | "light" | undefined;
|
|
9
9
|
variant?: ButtonType.Variant | undefined;
|
|
10
10
|
btnClasses?: string | undefined;
|
|
11
11
|
disabled?: boolean | undefined;
|
|
@@ -17,6 +17,8 @@ declare const __propDef: {
|
|
|
17
17
|
element?: ButtonType.Element | undefined;
|
|
18
18
|
id?: string | undefined;
|
|
19
19
|
nonCaptureEvent?: boolean | undefined;
|
|
20
|
+
buttonType?: "reset" | "submit" | "button" | undefined;
|
|
21
|
+
loading?: boolean | undefined;
|
|
20
22
|
};
|
|
21
23
|
events: {
|
|
22
24
|
focus: FocusEvent;
|
|
@@ -29,9 +31,9 @@ declare const __propDef: {
|
|
|
29
31
|
default: {};
|
|
30
32
|
};
|
|
31
33
|
};
|
|
32
|
-
export
|
|
33
|
-
export
|
|
34
|
-
export
|
|
34
|
+
export type ButtonProps = typeof __propDef.props;
|
|
35
|
+
export type ButtonEvents = typeof __propDef.events;
|
|
36
|
+
export type ButtonSlots = typeof __propDef.slots;
|
|
35
37
|
export default class Button extends SvelteComponentTyped<ButtonProps, ButtonEvents, ButtonSlots> {
|
|
36
38
|
}
|
|
37
39
|
export {};
|
|
@@ -12,6 +12,7 @@ export let href = undefined;
|
|
|
12
12
|
export let target = '_self';
|
|
13
13
|
export let startIcon = undefined;
|
|
14
14
|
export let endIcon = undefined;
|
|
15
|
+
export let spacingSize = size;
|
|
15
16
|
let ref;
|
|
16
17
|
setContext(ButtonType.ItemContextKey, { size, color });
|
|
17
18
|
$: separator = color === 'red' || color === 'blue' ? 'border-gray-200' : 'border-gray-400';
|
|
@@ -19,7 +20,8 @@ $: commonProps = {
|
|
|
19
20
|
size,
|
|
20
21
|
color,
|
|
21
22
|
variant,
|
|
22
|
-
disabled
|
|
23
|
+
disabled,
|
|
24
|
+
spacingSize
|
|
23
25
|
};
|
|
24
26
|
</script>
|
|
25
27
|
|
|
@@ -4,7 +4,7 @@ import { ButtonType } from '..';
|
|
|
4
4
|
declare const __propDef: {
|
|
5
5
|
props: {
|
|
6
6
|
size?: ButtonType.Size | undefined;
|
|
7
|
-
color?:
|
|
7
|
+
color?: "blue" | "gray" | "red" | "green" | "dark" | "light" | undefined;
|
|
8
8
|
variant?: ButtonType.Variant | undefined;
|
|
9
9
|
mainClasses?: string | undefined;
|
|
10
10
|
toggleClasses?: string | undefined;
|
|
@@ -13,6 +13,7 @@ declare const __propDef: {
|
|
|
13
13
|
target?: ButtonType.Target | undefined;
|
|
14
14
|
startIcon?: ButtonType.Icon | undefined;
|
|
15
15
|
endIcon?: ButtonType.Icon | undefined;
|
|
16
|
+
spacingSize?: ButtonType.Size | undefined;
|
|
16
17
|
};
|
|
17
18
|
events: {
|
|
18
19
|
click: CustomEvent<any>;
|
|
@@ -25,9 +26,9 @@ declare const __propDef: {
|
|
|
25
26
|
default: {};
|
|
26
27
|
};
|
|
27
28
|
};
|
|
28
|
-
export
|
|
29
|
-
export
|
|
30
|
-
export
|
|
29
|
+
export type ButtonPopupProps = typeof __propDef.props;
|
|
30
|
+
export type ButtonPopupEvents = typeof __propDef.events;
|
|
31
|
+
export type ButtonPopupSlots = typeof __propDef.slots;
|
|
31
32
|
export default class ButtonPopup extends SvelteComponentTyped<ButtonPopupProps, ButtonPopupEvents, ButtonPopupSlots> {
|
|
32
33
|
}
|
|
33
34
|
export {};
|
|
@@ -19,9 +19,9 @@ declare const __propDef: {
|
|
|
19
19
|
default: {};
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
|
-
export
|
|
23
|
-
export
|
|
24
|
-
export
|
|
22
|
+
export type ButtonPopupItemProps = typeof __propDef.props;
|
|
23
|
+
export type ButtonPopupItemEvents = typeof __propDef.events;
|
|
24
|
+
export type ButtonPopupItemSlots = typeof __propDef.slots;
|
|
25
25
|
export default class ButtonPopupItem extends SvelteComponentTyped<ButtonPopupItemProps, ButtonPopupItemEvents, ButtonPopupItemSlots> {
|
|
26
26
|
}
|
|
27
27
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
export declare const BUTTON_COLORS: readonly ["blue", "red", "dark", "light", "green", "gray"];
|
|
1
2
|
export declare namespace ButtonType {
|
|
2
3
|
type Size = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
3
|
-
type Color =
|
|
4
|
+
type Color = typeof BUTTON_COLORS[number];
|
|
4
5
|
type Variant = 'contained' | 'border';
|
|
5
6
|
type Target = '_self' | '_blank';
|
|
6
7
|
type Element = HTMLButtonElement | HTMLAnchorElement;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export const BUTTON_COLORS = ['blue', 'red', 'dark', 'light', 'green', 'gray'];
|
|
1
2
|
export var ButtonType;
|
|
2
3
|
(function (ButtonType) {
|
|
3
4
|
ButtonType.FontSizeClasses = {
|
|
@@ -10,7 +11,7 @@ export var ButtonType;
|
|
|
10
11
|
ButtonType.SpacingClasses = {
|
|
11
12
|
xs: 'px-3 py-1.5',
|
|
12
13
|
sm: 'px-3 py-1.5',
|
|
13
|
-
md: 'px-
|
|
14
|
+
md: 'px-3 py-1.5',
|
|
14
15
|
lg: 'px-4 py-2',
|
|
15
16
|
xl: 'px-4 py-2'
|
|
16
17
|
};
|
|
@@ -15,9 +15,9 @@ declare const __propDef: {
|
|
|
15
15
|
default: {};
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
|
-
export
|
|
19
|
-
export
|
|
20
|
-
export
|
|
18
|
+
export type ConfirmationModalProps = typeof __propDef.props;
|
|
19
|
+
export type ConfirmationModalEvents = typeof __propDef.events;
|
|
20
|
+
export type ConfirmationModalSlots = typeof __propDef.slots;
|
|
21
21
|
export default class ConfirmationModal extends SvelteComponentTyped<ConfirmationModalProps, ConfirmationModalEvents, ConfirmationModalSlots> {
|
|
22
22
|
}
|
|
23
23
|
export {};
|