@oneclick.dev/cms-kit 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/components/ui/apple-emoji/AppleEmoji.vue +32 -0
- package/components/ui/apple-emoji/index.ts +1 -0
- package/components/ui/avatar/Avatar.vue +18 -0
- package/components/ui/avatar/AvatarFallback.vue +23 -0
- package/components/ui/avatar/AvatarImage.vue +16 -0
- package/components/ui/avatar/index.ts +3 -0
- package/components/ui/badge/Badge.vue +39 -0
- package/components/ui/badge/index.ts +1 -0
- package/components/ui/breadcrumb/Breadcrumb.vue +17 -0
- package/components/ui/breadcrumb/BreadcrumbEllipsis.vue +23 -0
- package/components/ui/breadcrumb/BreadcrumbItem.vue +17 -0
- package/components/ui/breadcrumb/BreadcrumbLink.vue +20 -0
- package/components/ui/breadcrumb/BreadcrumbList.vue +17 -0
- package/components/ui/breadcrumb/BreadcrumbPage.vue +20 -0
- package/components/ui/breadcrumb/BreadcrumbSeparator.vue +22 -0
- package/components/ui/breadcrumb/index.ts +7 -0
- package/components/ui/button/Button.vue +39 -0
- package/components/ui/button/index.ts +36 -0
- package/components/ui/calendar/Calendar.vue +63 -0
- package/components/ui/calendar/CalendarCell.vue +25 -0
- package/components/ui/calendar/CalendarCellTrigger.vue +41 -0
- package/components/ui/calendar/CalendarGrid.vue +25 -0
- package/components/ui/calendar/CalendarGridBody.vue +14 -0
- package/components/ui/calendar/CalendarGridHead.vue +15 -0
- package/components/ui/calendar/CalendarGridRow.vue +24 -0
- package/components/ui/calendar/CalendarHeadCell.vue +25 -0
- package/components/ui/calendar/CalendarHeader.vue +25 -0
- package/components/ui/calendar/CalendarHeading.vue +32 -0
- package/components/ui/calendar/CalendarNextButton.vue +34 -0
- package/components/ui/calendar/CalendarPrevButton.vue +34 -0
- package/components/ui/calendar/index.ts +12 -0
- package/components/ui/card/Card.vue +22 -0
- package/components/ui/card/CardAction.vue +17 -0
- package/components/ui/card/CardContent.vue +17 -0
- package/components/ui/card/CardDescription.vue +17 -0
- package/components/ui/card/CardFooter.vue +17 -0
- package/components/ui/card/CardHeader.vue +17 -0
- package/components/ui/card/CardTitle.vue +17 -0
- package/components/ui/card/index.ts +7 -0
- package/components/ui/checkbox/Checkbox.vue +37 -0
- package/components/ui/checkbox/index.ts +1 -0
- package/components/ui/code-editor/CodeEditor.vue +88 -0
- package/components/ui/code-editor/index.ts +1 -0
- package/components/ui/code-editor/interpolationHighlight.ts +39 -0
- package/components/ui/collapsible/Collapsible.vue +19 -0
- package/components/ui/collapsible/CollapsibleContent.vue +14 -0
- package/components/ui/collapsible/CollapsibleTrigger.vue +14 -0
- package/components/ui/collapsible/index.ts +3 -0
- package/components/ui/combobox/Combobox.vue +17 -0
- package/components/ui/combobox/ComboboxAnchor.vue +26 -0
- package/components/ui/combobox/ComboboxEmpty.vue +24 -0
- package/components/ui/combobox/ComboboxGroup.vue +30 -0
- package/components/ui/combobox/ComboboxInput.vue +47 -0
- package/components/ui/combobox/ComboboxItem.vue +27 -0
- package/components/ui/combobox/ComboboxItemIndicator.vue +26 -0
- package/components/ui/combobox/ComboboxList.vue +31 -0
- package/components/ui/combobox/ComboboxSeparator.vue +24 -0
- package/components/ui/combobox/ComboboxTrigger.vue +27 -0
- package/components/ui/combobox/ComboboxViewport.vue +26 -0
- package/components/ui/combobox/index.ts +12 -0
- package/components/ui/command/Command.vue +93 -0
- package/components/ui/command/CommandDialog.vue +31 -0
- package/components/ui/command/CommandEmpty.vue +29 -0
- package/components/ui/command/CommandGroup.vue +47 -0
- package/components/ui/command/CommandInput.vue +41 -0
- package/components/ui/command/CommandItem.vue +79 -0
- package/components/ui/command/CommandList.vue +28 -0
- package/components/ui/command/CommandSeparator.vue +24 -0
- package/components/ui/command/CommandShortcut.vue +17 -0
- package/components/ui/command/index.ts +25 -0
- package/components/ui/context-menu/ContextMenu.vue +18 -0
- package/components/ui/context-menu/ContextMenuCheckboxItem.vue +41 -0
- package/components/ui/context-menu/ContextMenuContent.vue +37 -0
- package/components/ui/context-menu/ContextMenuGroup.vue +14 -0
- package/components/ui/context-menu/ContextMenuItem.vue +42 -0
- package/components/ui/context-menu/ContextMenuLabel.vue +24 -0
- package/components/ui/context-menu/ContextMenuPortal.vue +14 -0
- package/components/ui/context-menu/ContextMenuRadioGroup.vue +22 -0
- package/components/ui/context-menu/ContextMenuRadioItem.vue +41 -0
- package/components/ui/context-menu/ContextMenuSeparator.vue +24 -0
- package/components/ui/context-menu/ContextMenuShortcut.vue +17 -0
- package/components/ui/context-menu/ContextMenuSub.vue +22 -0
- package/components/ui/context-menu/ContextMenuSubContent.vue +36 -0
- package/components/ui/context-menu/ContextMenuSubTrigger.vue +35 -0
- package/components/ui/context-menu/ContextMenuTrigger.vue +16 -0
- package/components/ui/context-menu/index.ts +14 -0
- package/components/ui/custom-dialog/CustomDialog.vue +31 -0
- package/components/ui/custom-dialog/index.ts +1 -0
- package/components/ui/dialog/Dialog.vue +17 -0
- package/components/ui/dialog/DialogClose.vue +14 -0
- package/components/ui/dialog/DialogContent.vue +49 -0
- package/components/ui/dialog/DialogDescription.vue +25 -0
- package/components/ui/dialog/DialogFooter.vue +15 -0
- package/components/ui/dialog/DialogHeader.vue +17 -0
- package/components/ui/dialog/DialogOverlay.vue +23 -0
- package/components/ui/dialog/DialogScrollContent.vue +59 -0
- package/components/ui/dialog/DialogTitle.vue +25 -0
- package/components/ui/dialog/DialogTrigger.vue +14 -0
- package/components/ui/dialog/index.ts +10 -0
- package/components/ui/drawer/Drawer.vue +22 -0
- package/components/ui/drawer/DrawerClose.vue +15 -0
- package/components/ui/drawer/DrawerContent.vue +34 -0
- package/components/ui/drawer/DrawerDescription.vue +24 -0
- package/components/ui/drawer/DrawerFooter.vue +17 -0
- package/components/ui/drawer/DrawerHeader.vue +17 -0
- package/components/ui/drawer/DrawerOverlay.vue +22 -0
- package/components/ui/drawer/DrawerTitle.vue +24 -0
- package/components/ui/drawer/DrawerTrigger.vue +15 -0
- package/components/ui/drawer/index.ts +9 -0
- package/components/ui/dropdown-menu/DropdownMenu.vue +17 -0
- package/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +41 -0
- package/components/ui/dropdown-menu/DropdownMenuContent.vue +39 -0
- package/components/ui/dropdown-menu/DropdownMenuGroup.vue +14 -0
- package/components/ui/dropdown-menu/DropdownMenuItem.vue +30 -0
- package/components/ui/dropdown-menu/DropdownMenuLabel.vue +22 -0
- package/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue +22 -0
- package/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +42 -0
- package/components/ui/dropdown-menu/DropdownMenuSeparator.vue +26 -0
- package/components/ui/dropdown-menu/DropdownMenuShortcut.vue +17 -0
- package/components/ui/dropdown-menu/DropdownMenuSub.vue +19 -0
- package/components/ui/dropdown-menu/DropdownMenuSubContent.vue +31 -0
- package/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +30 -0
- package/components/ui/dropdown-menu/DropdownMenuTrigger.vue +16 -0
- package/components/ui/dropdown-menu/index.ts +16 -0
- package/components/ui/emoji-picker/EmojiPicker.vue +71 -0
- package/components/ui/emoji-picker/index.ts +1 -0
- package/components/ui/flow-builder/FlowBuilder.vue +48 -0
- package/components/ui/flow-builder/FlowBuilderSelect.vue +33 -0
- package/components/ui/flow-builder/components/Builder.vue +287 -0
- package/components/ui/flow-builder/components/DropzoneBackground.vue +13 -0
- package/components/ui/flow-builder/components/EdgeEditor.vue +36 -0
- package/components/ui/flow-builder/components/Menu.vue +78 -0
- package/components/ui/flow-builder/components/NodeEditor.vue +181 -0
- package/components/ui/flow-builder/components/edge-editor/DataEdgeEditor.vue +64 -0
- package/components/ui/flow-builder/components/edges/DataEdge.vue +87 -0
- package/components/ui/flow-builder/components/node-editor/ApiRequestEditor.vue +150 -0
- package/components/ui/flow-builder/components/node-editor/ConfettiEditor.vue +23 -0
- package/components/ui/flow-builder/components/node-editor/ConfirmEditor.vue +30 -0
- package/components/ui/flow-builder/components/node-editor/FinishFlowEditor.vue +33 -0
- package/components/ui/flow-builder/components/node-editor/IntegrationActionEditor.vue +50 -0
- package/components/ui/flow-builder/components/node-editor/SetVariableEditor.vue +71 -0
- package/components/ui/flow-builder/components/node-editor/ShowDialogEditor.vue +26 -0
- package/components/ui/flow-builder/components/node-editor/ShowModuleEditor.vue +92 -0
- package/components/ui/flow-builder/components/node-editor/ShowToastEditor.vue +28 -0
- package/components/ui/flow-builder/components/node-editor/TransformDataEditor.vue +27 -0
- package/components/ui/flow-builder/components/node-editor/VisitUrlEditor.vue +31 -0
- package/components/ui/flow-builder/components/nodes/ApiRequestNode.vue +45 -0
- package/components/ui/flow-builder/components/nodes/ConfettiNode.vue +32 -0
- package/components/ui/flow-builder/components/nodes/ConfirmNode.vue +45 -0
- package/components/ui/flow-builder/components/nodes/EmptyNode.vue +26 -0
- package/components/ui/flow-builder/components/nodes/FinishFlowNode.vue +30 -0
- package/components/ui/flow-builder/components/nodes/IntegrationActionNode.vue +52 -0
- package/components/ui/flow-builder/components/nodes/SetVariableNode.vue +34 -0
- package/components/ui/flow-builder/components/nodes/ShowDialogNode.vue +34 -0
- package/components/ui/flow-builder/components/nodes/ShowModuleNode.vue +34 -0
- package/components/ui/flow-builder/components/nodes/ShowToastNode.vue +35 -0
- package/components/ui/flow-builder/components/nodes/StartNode.vue +27 -0
- package/components/ui/flow-builder/components/nodes/TransformDataNode.vue +34 -0
- package/components/ui/flow-builder/components/nodes/VisitUrlNode.vue +34 -0
- package/components/ui/flow-builder/components/toolbars/ApiRequestToolbar.vue +45 -0
- package/components/ui/flow-builder/components/toolbars/ConfirmToolbar.vue +45 -0
- package/components/ui/flow-builder/components/toolbars/DefaultToolbar.vue +42 -0
- package/components/ui/flow-builder/components/toolbars/IntegrationActionToolbar.vue +45 -0
- package/components/ui/flow-builder/components/variables/Widget.vue +137 -0
- package/components/ui/flow-builder/composables/outputRegistry.ts +33 -0
- package/components/ui/flow-builder/composables/taskHandlers.js +185 -0
- package/components/ui/flow-builder/composables/useLayout.js +60 -0
- package/components/ui/flow-builder/composables/useProcessNodeLogic.js +55 -0
- package/components/ui/flow-builder/composables/useRunProcess.js +267 -0
- package/components/ui/flow-builder/index.ts +5 -0
- package/components/ui/flow-builder/types.ts +7 -0
- package/components/ui/form/FormControl.vue +17 -0
- package/components/ui/form/FormDescription.vue +21 -0
- package/components/ui/form/FormItem.vue +22 -0
- package/components/ui/form/FormLabel.vue +25 -0
- package/components/ui/form/FormMessage.vue +22 -0
- package/components/ui/form/index.ts +7 -0
- package/components/ui/form/injectionKeys.ts +4 -0
- package/components/ui/form/useFormField.ts +30 -0
- package/components/ui/form-builder/FormBuilder.vue +45 -0
- package/components/ui/form-builder/FormBuilderSelect.vue +42 -0
- package/components/ui/form-builder/FormDisplayer.vue +39 -0
- package/components/ui/form-builder/components/AdminElementEditor.vue +48 -0
- package/components/ui/form-builder/components/AdminToolbar.vue +60 -0
- package/components/ui/form-builder/components/AdminToolbarView.vue +19 -0
- package/components/ui/form-builder/components/CustomDashboard.vue +312 -0
- package/components/ui/form-builder/components/FormBuilderWrapper.vue +333 -0
- package/components/ui/form-builder/components/admin/Transformer.vue +25 -0
- package/components/ui/form-builder/components/admin/element-setting-views/Button.vue +30 -0
- package/components/ui/form-builder/components/admin/element-setting-views/Checkbox.vue +23 -0
- package/components/ui/form-builder/components/admin/element-setting-views/Label.vue +13 -0
- package/components/ui/form-builder/components/admin/element-setting-views/Radios.vue +85 -0
- package/components/ui/form-builder/components/admin/element-setting-views/Scanner.vue +15 -0
- package/components/ui/form-builder/components/admin/element-setting-views/Select.vue +75 -0
- package/components/ui/form-builder/components/admin/element-setting-views/Text.vue +13 -0
- package/components/ui/form-builder/components/admin/element-setting-views/Textarea.vue +20 -0
- package/components/ui/form-builder/components/admin/element-setting-views/Textfield.vue +20 -0
- package/components/ui/form-builder/components/admin/element-setting-views/index.ts +21 -0
- package/components/ui/form-builder/components/admin/setting-views/ApiActionsView.vue +111 -0
- package/components/ui/form-builder/components/admin/setting-views/NewElementView.vue +200 -0
- package/components/ui/form-builder/components/admin/setting-views/VariablesView.vue +19 -0
- package/components/ui/form-builder/components/admin/setting-views/new-element-view/DraggableElement.vue +107 -0
- package/components/ui/form-builder/components/admin/setting-views/variables-view/ApiActionVariables.vue +27 -0
- package/components/ui/form-builder/components/admin/setting-views/variables-view/RouteQueryParams.vue +47 -0
- package/components/ui/form-builder/components/admin/setting-views/variables-view/Transformers.vue +61 -0
- package/components/ui/form-builder/components/admin/setting-views/variables-view/Variables.vue +74 -0
- package/components/ui/form-builder/components/elements/button/Button.vue +60 -0
- package/components/ui/form-builder/components/elements/button/index.ts +1 -0
- package/components/ui/form-builder/components/elements/checkbox/Checkbox.vue +40 -0
- package/components/ui/form-builder/components/elements/checkbox/index.ts +1 -0
- package/components/ui/form-builder/components/elements/file/File.vue +6 -0
- package/components/ui/form-builder/components/elements/file/index.ts +1 -0
- package/components/ui/form-builder/components/elements/images/Images.vue +28 -0
- package/components/ui/form-builder/components/elements/images/index.ts +1 -0
- package/components/ui/form-builder/components/elements/index.ts +31 -0
- package/components/ui/form-builder/components/elements/items/Items.vue +6 -0
- package/components/ui/form-builder/components/elements/items/index.ts +1 -0
- package/components/ui/form-builder/components/elements/label/Label.vue +20 -0
- package/components/ui/form-builder/components/elements/label/index.ts +1 -0
- package/components/ui/form-builder/components/elements/location/Location.vue +6 -0
- package/components/ui/form-builder/components/elements/location/index.ts +1 -0
- package/components/ui/form-builder/components/elements/radios/Radios.vue +42 -0
- package/components/ui/form-builder/components/elements/radios/index.ts +1 -0
- package/components/ui/form-builder/components/elements/richtext/Richtext.vue +6 -0
- package/components/ui/form-builder/components/elements/richtext/index.ts +1 -0
- package/components/ui/form-builder/components/elements/scanner/Scanner.vue +173 -0
- package/components/ui/form-builder/components/elements/scanner/index.ts +1 -0
- package/components/ui/form-builder/components/elements/select/Select.vue +49 -0
- package/components/ui/form-builder/components/elements/select/index.ts +1 -0
- package/components/ui/form-builder/components/elements/text/Text.vue +20 -0
- package/components/ui/form-builder/components/elements/text/index.ts +1 -0
- package/components/ui/form-builder/components/elements/textarea/Textarea.vue +30 -0
- package/components/ui/form-builder/components/elements/textarea/index.ts +1 -0
- package/components/ui/form-builder/components/elements/textfield/Textfield.vue +30 -0
- package/components/ui/form-builder/components/elements/textfield/index.ts +1 -0
- package/components/ui/form-builder/index.ts +3 -0
- package/components/ui/input/Input.vue +33 -0
- package/components/ui/input/index.ts +1 -0
- package/components/ui/integration-action-builder/IntegrationActionBuilder.vue +193 -0
- package/components/ui/integration-action-builder/InterpolationField.vue +29 -0
- package/components/ui/integration-action-builder/index.ts +1 -0
- package/components/ui/integration-action-builder/integrations/firebase/AddDocument.vue +43 -0
- package/components/ui/integration-action-builder/integrations/firebase/DeleteDocument.vue +6 -0
- package/components/ui/integration-action-builder/integrations/firebase/GetCollections.vue +6 -0
- package/components/ui/integration-action-builder/integrations/firebase/GetDocumentById.vue +6 -0
- package/components/ui/integration-action-builder/integrations/firebase/QueryCollectionGroup.vue +6 -0
- package/components/ui/integration-action-builder/integrations/firebase/QueryFirestore.vue +165 -0
- package/components/ui/integration-action-builder/integrations/firebase/UpdateDocument.vue +6 -0
- package/components/ui/integration-action-builder/integrations/firebase/index.ts +204 -0
- package/components/ui/integration-action-builder/integrations/index.ts +9 -0
- package/components/ui/integration-action-builder/integrations/openai/AddDocument.vue +43 -0
- package/components/ui/integration-action-builder/integrations/openai/GenerateText.vue +40 -0
- package/components/ui/integration-action-builder/integrations/openai/components/ModelSelector.vue +75 -0
- package/components/ui/integration-action-builder/integrations/openai/index.ts +116 -0
- package/components/ui/integration-action-builder/integrations/twilio/MakeCall.vue +40 -0
- package/components/ui/integration-action-builder/integrations/twilio/SendSMS.vue +39 -0
- package/components/ui/integration-action-builder/integrations/twilio/components/ModelSelector.vue +75 -0
- package/components/ui/integration-action-builder/integrations/twilio/index.ts +68 -0
- package/components/ui/integration-icon/IntegrationIcon.vue +18 -0
- package/components/ui/integration-icon/index.ts +1 -0
- package/components/ui/label/Label.vue +28 -0
- package/components/ui/label/index.ts +1 -0
- package/components/ui/lucide-icon-selector/LucideIconPicker.vue +34 -0
- package/components/ui/lucide-icon-selector/LucideIconSelector.vue +55 -0
- package/components/ui/lucide-icon-selector/index.ts +2 -0
- package/components/ui/media-picker/MediaPicker.vue +40 -0
- package/components/ui/media-picker/MediaPickerDialog.vue +306 -0
- package/components/ui/media-picker/MediaPickerItems.vue +342 -0
- package/components/ui/media-picker/index.ts +2 -0
- package/components/ui/media-picker/media-picker-dialog/Dropzone.vue +104 -0
- package/components/ui/media-picker/media-picker-dialog/FileItem.vue +108 -0
- package/components/ui/media-picker/media-picker-dialog/Filters.vue +78 -0
- package/components/ui/menubar/Menubar.vue +36 -0
- package/components/ui/menubar/MenubarCheckboxItem.vue +41 -0
- package/components/ui/menubar/MenubarContent.vue +44 -0
- package/components/ui/menubar/MenubarGroup.vue +14 -0
- package/components/ui/menubar/MenubarItem.vue +37 -0
- package/components/ui/menubar/MenubarLabel.vue +19 -0
- package/components/ui/menubar/MenubarMenu.vue +14 -0
- package/components/ui/menubar/MenubarRadioGroup.vue +22 -0
- package/components/ui/menubar/MenubarRadioItem.vue +41 -0
- package/components/ui/menubar/MenubarSeparator.vue +23 -0
- package/components/ui/menubar/MenubarShortcut.vue +17 -0
- package/components/ui/menubar/MenubarSub.vue +22 -0
- package/components/ui/menubar/MenubarSubContent.vue +39 -0
- package/components/ui/menubar/MenubarSubTrigger.vue +27 -0
- package/components/ui/menubar/MenubarTrigger.vue +30 -0
- package/components/ui/menubar/index.ts +15 -0
- package/components/ui/number-field/NumberField.vue +23 -0
- package/components/ui/number-field/NumberFieldContent.vue +14 -0
- package/components/ui/number-field/NumberFieldDecrement.vue +25 -0
- package/components/ui/number-field/NumberFieldIncrement.vue +25 -0
- package/components/ui/number-field/NumberFieldInput.vue +16 -0
- package/components/ui/number-field/index.ts +5 -0
- package/components/ui/pagination/PaginationEllipsis.vue +22 -0
- package/components/ui/pagination/PaginationFirst.vue +29 -0
- package/components/ui/pagination/PaginationLast.vue +29 -0
- package/components/ui/pagination/PaginationNext.vue +29 -0
- package/components/ui/pagination/PaginationPrev.vue +29 -0
- package/components/ui/pagination/index.ts +10 -0
- package/components/ui/popover/Popover.vue +18 -0
- package/components/ui/popover/PopoverAnchor.vue +15 -0
- package/components/ui/popover/PopoverContent.vue +49 -0
- package/components/ui/popover/PopoverTrigger.vue +14 -0
- package/components/ui/popover/index.ts +4 -0
- package/components/ui/query-builder-dialog/QueryBuilderDialog.vue +389 -0
- package/components/ui/query-builder-dialog/index.ts +1 -0
- package/components/ui/radio-group/RadioGroup.vue +30 -0
- package/components/ui/radio-group/RadioGroupItem.vue +43 -0
- package/components/ui/radio-group/index.ts +2 -0
- package/components/ui/range-calendar/RangeCalendar.vue +57 -0
- package/components/ui/range-calendar/RangeCalendarCell.vue +21 -0
- package/components/ui/range-calendar/RangeCalendarCellTrigger.vue +37 -0
- package/components/ui/range-calendar/RangeCalendarGrid.vue +21 -0
- package/components/ui/range-calendar/RangeCalendarGridBody.vue +11 -0
- package/components/ui/range-calendar/RangeCalendarGridHead.vue +11 -0
- package/components/ui/range-calendar/RangeCalendarGridRow.vue +18 -0
- package/components/ui/range-calendar/RangeCalendarHeadCell.vue +18 -0
- package/components/ui/range-calendar/RangeCalendarHeader.vue +18 -0
- package/components/ui/range-calendar/RangeCalendarHeading.vue +28 -0
- package/components/ui/range-calendar/RangeCalendarNextButton.vue +29 -0
- package/components/ui/range-calendar/RangeCalendarPrevButton.vue +29 -0
- package/components/ui/range-calendar/index.ts +12 -0
- package/components/ui/resizable/ResizableHandle.vue +27 -0
- package/components/ui/resizable/ResizablePanel.vue +18 -0
- package/components/ui/resizable/ResizablePanelGroup.vue +25 -0
- package/components/ui/resizable/index.ts +3 -0
- package/components/ui/ripple-button/RippleButton.vue +97 -0
- package/components/ui/ripple-button/index.ts +1 -0
- package/components/ui/sandbox/Sandbox.vue +35 -0
- package/components/ui/sandbox/index.ts +1 -0
- package/components/ui/scroll-area/ScrollArea.vue +36 -0
- package/components/ui/scroll-area/ScrollBar.vue +34 -0
- package/components/ui/scroll-area/index.ts +2 -0
- package/components/ui/segmented-control/SegmentedControl.vue +121 -0
- package/components/ui/segmented-control/SegmentedControlButton.vue +64 -0
- package/components/ui/segmented-control/index.ts +2 -0
- package/components/ui/select/Select.vue +18 -0
- package/components/ui/select/SelectContent.vue +55 -0
- package/components/ui/select/SelectGroup.vue +14 -0
- package/components/ui/select/SelectItem.vue +45 -0
- package/components/ui/select/SelectItemText.vue +14 -0
- package/components/ui/select/SelectLabel.vue +16 -0
- package/components/ui/select/SelectScrollDownButton.vue +28 -0
- package/components/ui/select/SelectScrollUpButton.vue +28 -0
- package/components/ui/select/SelectSeparator.vue +21 -0
- package/components/ui/select/SelectTrigger.vue +32 -0
- package/components/ui/select/SelectValue.vue +15 -0
- package/components/ui/select/index.ts +11 -0
- package/components/ui/separator/Separator.vue +28 -0
- package/components/ui/separator/index.ts +1 -0
- package/components/ui/sheet/Sheet.vue +17 -0
- package/components/ui/sheet/SheetClose.vue +14 -0
- package/components/ui/sheet/SheetContent.vue +65 -0
- package/components/ui/sheet/SheetDescription.vue +20 -0
- package/components/ui/sheet/SheetFooter.vue +16 -0
- package/components/ui/sheet/SheetHeader.vue +15 -0
- package/components/ui/sheet/SheetOverlay.vue +24 -0
- package/components/ui/sheet/SheetTitle.vue +20 -0
- package/components/ui/sheet/SheetTrigger.vue +14 -0
- package/components/ui/sheet/index.ts +8 -0
- package/components/ui/sidebar/Sidebar.vue +96 -0
- package/components/ui/sidebar/SidebarContent.vue +18 -0
- package/components/ui/sidebar/SidebarFooter.vue +18 -0
- package/components/ui/sidebar/SidebarGroup.vue +18 -0
- package/components/ui/sidebar/SidebarGroupAction.vue +27 -0
- package/components/ui/sidebar/SidebarGroupContent.vue +18 -0
- package/components/ui/sidebar/SidebarGroupLabel.vue +25 -0
- package/components/ui/sidebar/SidebarHeader.vue +18 -0
- package/components/ui/sidebar/SidebarInput.vue +22 -0
- package/components/ui/sidebar/SidebarInset.vue +21 -0
- package/components/ui/sidebar/SidebarMenu.vue +18 -0
- package/components/ui/sidebar/SidebarMenuAction.vue +34 -0
- package/components/ui/sidebar/SidebarMenuBadge.vue +26 -0
- package/components/ui/sidebar/SidebarMenuButton.vue +49 -0
- package/components/ui/sidebar/SidebarMenuButtonChild.vue +34 -0
- package/components/ui/sidebar/SidebarMenuItem.vue +18 -0
- package/components/ui/sidebar/SidebarMenuSkeleton.vue +34 -0
- package/components/ui/sidebar/SidebarMenuSub.vue +22 -0
- package/components/ui/sidebar/SidebarMenuSubButton.vue +36 -0
- package/components/ui/sidebar/SidebarMenuSubItem.vue +18 -0
- package/components/ui/sidebar/SidebarProvider.vue +81 -0
- package/components/ui/sidebar/SidebarRail.vue +33 -0
- package/components/ui/sidebar/SidebarSeparator.vue +19 -0
- package/components/ui/sidebar/SidebarTrigger.vue +27 -0
- package/components/ui/sidebar/index.ts +60 -0
- package/components/ui/sidebar/utils.ts +19 -0
- package/components/ui/skeleton/Skeleton.vue +17 -0
- package/components/ui/skeleton/index.ts +1 -0
- package/components/ui/sonner/Sonner.vue +18 -0
- package/components/ui/sonner/index.ts +1 -0
- package/components/ui/spring-calendar/SpringCalendar.vue +110 -0
- package/components/ui/spring-calendar/TextMorph.vue +160 -0
- package/components/ui/spring-calendar/index.ts +2 -0
- package/components/ui/switch/Switch.vue +41 -0
- package/components/ui/switch/index.ts +1 -0
- package/components/ui/table/Table.vue +16 -0
- package/components/ui/table/TableBody.vue +17 -0
- package/components/ui/table/TableCaption.vue +17 -0
- package/components/ui/table/TableCell.vue +22 -0
- package/components/ui/table/TableEmpty.vue +37 -0
- package/components/ui/table/TableFooter.vue +17 -0
- package/components/ui/table/TableHead.vue +17 -0
- package/components/ui/table/TableHeader.vue +17 -0
- package/components/ui/table/TableRow.vue +17 -0
- package/components/ui/table/index.ts +9 -0
- package/components/ui/table/utils.ts +9 -0
- package/components/ui/tabs/Tabs.vue +15 -0
- package/components/ui/tabs/TabsContent.vue +22 -0
- package/components/ui/tabs/TabsList.vue +25 -0
- package/components/ui/tabs/TabsTrigger.vue +29 -0
- package/components/ui/tabs/index.ts +4 -0
- package/components/ui/tailwind-color-picker/TailwindColorPicker.vue +58 -0
- package/components/ui/tailwind-color-picker/index.ts +1 -0
- package/components/ui/textarea/Textarea.vue +28 -0
- package/components/ui/textarea/index.ts +1 -0
- package/components/ui/toggle/Toggle.vue +32 -0
- package/components/ui/toggle/index.ts +27 -0
- package/components/ui/tooltip/Tooltip.vue +17 -0
- package/components/ui/tooltip/TooltipContent.vue +33 -0
- package/components/ui/tooltip/TooltipProvider.vue +13 -0
- package/components/ui/tooltip/TooltipTrigger.vue +14 -0
- package/components/ui/tooltip/index.ts +4 -0
- package/composables/useCms.ts +11 -0
- package/index.ts +10 -0
- package/lib/interpolation.ts +77 -0
- package/lib/utils.ts +24 -0
- package/package.json +52 -0
- package/styles/components/code-editor.css +52 -0
- package/styles/components/flow-builder.css +159 -0
- package/styles/index.css +2 -0
- package/tsconfig.json +19 -0
- package/types/index.ts +41 -0
- package/vite.config.ts +25 -0
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed } from 'vue';
|
|
3
|
+
import { X, ChevronsLeftRightEllipsis, MessageSquare, MessageSquareWarning, PartyPopper, Braces, Variable, MessageSquareCode, Globe, Goal, Package } from 'lucide-vue-next'
|
|
4
|
+
import IntegrationActionEditor from './node-editor/IntegrationActionEditor.vue';
|
|
5
|
+
import ShowToastEditor from './node-editor/ShowToastEditor.vue';
|
|
6
|
+
import TransformDataEditor from './node-editor/TransformDataEditor.vue';
|
|
7
|
+
import VisitUrlEditor from './node-editor/VisitUrlEditor.vue';
|
|
8
|
+
import SetVariableEditor from './node-editor/SetVariableEditor.vue';
|
|
9
|
+
import ShowDialogEditor from './node-editor/ShowDialogEditor.vue';
|
|
10
|
+
import ConfirmEditor from './node-editor/ConfirmEditor.vue';
|
|
11
|
+
import FinishFlowEditor from './node-editor/FinishFlowEditor.vue';
|
|
12
|
+
import ShowModuleEditor from './node-editor/ShowModuleEditor.vue';
|
|
13
|
+
import ApiRequestEditor from './node-editor/ApiRequestEditor.vue';
|
|
14
|
+
import { useVueFlow } from '@vue-flow/core'
|
|
15
|
+
|
|
16
|
+
const props = defineProps({
|
|
17
|
+
modelValue: {
|
|
18
|
+
type: Object,
|
|
19
|
+
required: true,
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
const emit = defineEmits(['update:modelValue', 'close', 'remove']);
|
|
24
|
+
|
|
25
|
+
const { setNodes, getNodes } = useVueFlow()
|
|
26
|
+
|
|
27
|
+
const node = computed({
|
|
28
|
+
get: () => props.modelValue,
|
|
29
|
+
set: (value) => {
|
|
30
|
+
emit('update:modelValue', value)
|
|
31
|
+
|
|
32
|
+
// setNodes(getNodes().map((n: any) =>
|
|
33
|
+
// n.id === value.id
|
|
34
|
+
// ? { ...n, ...value, data: { ...n.data, ...value.data } }
|
|
35
|
+
// : n
|
|
36
|
+
// ))
|
|
37
|
+
},
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
const NODE_TYPES = [
|
|
41
|
+
{
|
|
42
|
+
label: 'API request',
|
|
43
|
+
value: 'api-request',
|
|
44
|
+
icon: ChevronsLeftRightEllipsis,
|
|
45
|
+
buttonClass: 'bg-gray-100 dark:bg-gray-500/50 dark:text-gray-200'
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
label: 'Integration action',
|
|
49
|
+
value: 'integration-action',
|
|
50
|
+
icon: ChevronsLeftRightEllipsis,
|
|
51
|
+
buttonClass: 'bg-gray-100 dark:bg-gray-500/50 dark:text-gray-200'
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
label: 'Ask confirmation',
|
|
55
|
+
value: 'confirm',
|
|
56
|
+
icon: MessageSquareWarning,
|
|
57
|
+
buttonClass: 'bg-red-500 text-white'
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
label: 'Show dialog',
|
|
61
|
+
value: 'show-dialog',
|
|
62
|
+
icon: MessageSquareCode,
|
|
63
|
+
buttonClass: 'bg-green-500 text-white'
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
label: 'Show toast',
|
|
67
|
+
value: 'show-toast',
|
|
68
|
+
icon: MessageSquare,
|
|
69
|
+
buttonClass: 'bg-orange-500 text-white'
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
label: 'Show module',
|
|
73
|
+
value: 'show-module',
|
|
74
|
+
icon: Package,
|
|
75
|
+
buttonClass: 'bg-purple-500 text-white'
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
label: 'Set variable',
|
|
79
|
+
value: 'set-variable',
|
|
80
|
+
icon: Variable,
|
|
81
|
+
buttonClass: 'bg-blue-500 text-white'
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
label: 'Transform data',
|
|
85
|
+
value: 'transform-data',
|
|
86
|
+
icon: Braces,
|
|
87
|
+
buttonClass: 'bg-yellow-500 text-white'
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
label: 'Visit URL',
|
|
91
|
+
value: 'visit-url',
|
|
92
|
+
icon: Globe,
|
|
93
|
+
buttonClass: 'bg-blue-500 text-white'
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
label: 'Confetti',
|
|
97
|
+
value: 'confetti',
|
|
98
|
+
icon: PartyPopper,
|
|
99
|
+
buttonClass: 'bg-pink-500 text-white'
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
label: 'Finish flow / return data',
|
|
103
|
+
value: 'finish-flow',
|
|
104
|
+
icon: Goal,
|
|
105
|
+
buttonClass: 'bg-gray-800 text-white'
|
|
106
|
+
},
|
|
107
|
+
]
|
|
108
|
+
|
|
109
|
+
const nodeType = computed(() => NODE_TYPES?.find(type => type.value === node.value.type))
|
|
110
|
+
</script>
|
|
111
|
+
|
|
112
|
+
<template>
|
|
113
|
+
<div class="flex flex-col absolute top-4 right-4 w-[320px] h-[calc(100%-2em)] bg-background shadow-sm p-4 rounded-lg overflow-y-auto border z-[10]">
|
|
114
|
+
<template v-if="node.type !== 'start'">
|
|
115
|
+
<div class="flex items-center justify-between gap-2 mb-2">
|
|
116
|
+
<span class="font-bold text-xl">Edit node</span>
|
|
117
|
+
<Button size="icon" variant="ghost" @click="emit('close')">
|
|
118
|
+
<X class="size-4" />
|
|
119
|
+
</Button>
|
|
120
|
+
</div>
|
|
121
|
+
|
|
122
|
+
<Select v-model="node.type">
|
|
123
|
+
<SelectTrigger class="w-full">
|
|
124
|
+
<div class="flex items-center gap-2">
|
|
125
|
+
<div class="size-6 rounded-lg flex items-center justify-center" v-if="nodeType" :class="nodeType.buttonClass">
|
|
126
|
+
<img :src="nodeType.icon" class="size-5" v-if="typeof nodeType.icon === 'string' && nodeType.icon.includes('.webp')" />
|
|
127
|
+
<component :is="nodeType.icon" class="size-4 text-inherit" v-else />
|
|
128
|
+
</div>
|
|
129
|
+
<SelectValue placeholder="Select an action" />
|
|
130
|
+
</div>
|
|
131
|
+
</SelectTrigger>
|
|
132
|
+
<SelectContent>
|
|
133
|
+
<SelectGroup>
|
|
134
|
+
<SelectItem v-for="type in NODE_TYPES" :key="type.value" :value="type.value">
|
|
135
|
+
<div class="flex items-center gap-4 px-1 py-0.5" @click="node.type = type.value" v-if="type !== '-'">
|
|
136
|
+
<div class="size-8 rounded-xl flex items-center justify-center" v-if="type.icon" :class="type.buttonClass">
|
|
137
|
+
<img :src="type.icon" class="size-5" v-if="typeof type.icon === 'string' && type.icon.includes('.webp')" />
|
|
138
|
+
<component :is="type.icon" class="size-5 text-inherit" v-else />
|
|
139
|
+
</div>
|
|
140
|
+
<span class="text-sm text-muted-foreground">
|
|
141
|
+
{{ type.label }}
|
|
142
|
+
</span>
|
|
143
|
+
</div>
|
|
144
|
+
</SelectItem>
|
|
145
|
+
</SelectGroup>
|
|
146
|
+
</SelectContent>
|
|
147
|
+
</Select>
|
|
148
|
+
|
|
149
|
+
<hr class="my-4">
|
|
150
|
+
|
|
151
|
+
<ApiRequestEditor v-if="node.type === 'api-request'" v-model="node" />
|
|
152
|
+
<IntegrationActionEditor v-else-if="node.type === 'integration-action'" v-model="node" />
|
|
153
|
+
<ShowToastEditor v-else-if="node.type === 'show-toast'" v-model="node" />
|
|
154
|
+
<ShowDialogEditor v-else-if="node.type === 'show-dialog'" v-model="node" />
|
|
155
|
+
<ShowModuleEditor v-else-if="node.type === 'show-module'" v-model="node" />
|
|
156
|
+
<ConfirmEditor v-else-if="node.type === 'confirm'" v-model="node" />
|
|
157
|
+
<TransformDataEditor v-else-if="node.type === 'transform-data'" v-model="node" />
|
|
158
|
+
<VisitUrlEditor v-else-if="node.type === 'visit-url'" v-model="node" />
|
|
159
|
+
<SetVariableEditor v-else-if="node.type === 'set-variable'" v-model="node" />
|
|
160
|
+
<FinishFlowEditor v-else-if="node.type === 'finish-flow'" v-model="node" />
|
|
161
|
+
|
|
162
|
+
<div class="mt-auto"></div>
|
|
163
|
+
<hr class="my-4">
|
|
164
|
+
|
|
165
|
+
<Button class="w-full" variant="destructive" @click="emit('remove')">Delete node</Button>
|
|
166
|
+
</template>
|
|
167
|
+
|
|
168
|
+
<template v-else>
|
|
169
|
+
<div class="flex items-center justify-between gap-2 mb-2">
|
|
170
|
+
<span class="font-bold text-xl">Start node</span>
|
|
171
|
+
<Button size="icon" variant="ghost" @click="emit('close')">
|
|
172
|
+
<X class="size-4" />
|
|
173
|
+
</Button>
|
|
174
|
+
</div>
|
|
175
|
+
|
|
176
|
+
<p class="text-gray-400 text-sm">
|
|
177
|
+
The workflow will start from here. You can link as many nodes as you want to this node.
|
|
178
|
+
</p>
|
|
179
|
+
</template>
|
|
180
|
+
</div>
|
|
181
|
+
</template>
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed } from 'vue';
|
|
3
|
+
import { useVueFlow } from '@vue-flow/core'
|
|
4
|
+
import { getOutputsForNode } from '../../composables/outputRegistry'
|
|
5
|
+
|
|
6
|
+
const props = defineProps({
|
|
7
|
+
modelValue: {
|
|
8
|
+
type: Object,
|
|
9
|
+
required: true,
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
const emit = defineEmits(['update:modelValue']);
|
|
14
|
+
|
|
15
|
+
const { findNode } = useVueFlow()
|
|
16
|
+
|
|
17
|
+
const edge = computed({
|
|
18
|
+
get: () => props.modelValue,
|
|
19
|
+
set: (value) => {
|
|
20
|
+
emit('update:modelValue', value);
|
|
21
|
+
},
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
const prettify = (type: string) => {
|
|
25
|
+
if (!type?.startsWith('{') || !type.endsWith('}')) return type
|
|
26
|
+
|
|
27
|
+
const inner = type.slice(1, -1).trim()
|
|
28
|
+
const lines = inner.split(';').filter(Boolean).map(line => ` ${line.trim()};`)
|
|
29
|
+
return ['{', ...lines, '}'].join('\n')
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const outputs = computed(() => {
|
|
33
|
+
let sourceNode = findNode(edge.value.source)
|
|
34
|
+
return getOutputsForNode(sourceNode, edge.value.data.sourceHandle) || []
|
|
35
|
+
})
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
<template>
|
|
39
|
+
<div class="w-full">
|
|
40
|
+
<div class="text-xs text-gray-500 mt-1 mb-4">
|
|
41
|
+
<p v-if="edge.sourceHandle === 'error'">
|
|
42
|
+
If the integration action fails, it will follow this connection.
|
|
43
|
+
</p>
|
|
44
|
+
<p v-if="edge.sourceHandle === 'success'">
|
|
45
|
+
If the integration action succeeds, it will follow this connection.
|
|
46
|
+
</p>
|
|
47
|
+
</div>
|
|
48
|
+
|
|
49
|
+
<div class="space-y-2">
|
|
50
|
+
<div
|
|
51
|
+
v-for="output in outputs"
|
|
52
|
+
:key="output.name"
|
|
53
|
+
class="rounded-md border border-gray-200 dark:border-gray-700 p-3 bg-gray-50 dark:bg-gray-900"
|
|
54
|
+
>
|
|
55
|
+
<div class="text-sm font-semibold text-gray-800 dark:text-white">
|
|
56
|
+
{{ output.name }}
|
|
57
|
+
<span class="ml-2 text-xs text-gray-500">({{ output.shortType }})</span>
|
|
58
|
+
</div>
|
|
59
|
+
<pre class="mt-1 text-xs text-gray-600 dark:text-gray-400 whitespace-pre-wrap break-words">
|
|
60
|
+
{{ prettify(output.type) }}</pre>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
</template>
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useVueFlow, BaseEdge, EdgeLabelRenderer, getBezierPath } from '@vue-flow/core'
|
|
3
|
+
import { computed } from 'vue'
|
|
4
|
+
import { getOutputsForNode } from '../../composables/outputRegistry'
|
|
5
|
+
|
|
6
|
+
defineOptions({ inheritAttrs: false })
|
|
7
|
+
|
|
8
|
+
const props = defineProps({
|
|
9
|
+
source: {
|
|
10
|
+
type: String,
|
|
11
|
+
required: true,
|
|
12
|
+
},
|
|
13
|
+
sourceHandle: {
|
|
14
|
+
type: String,
|
|
15
|
+
required: true,
|
|
16
|
+
},
|
|
17
|
+
sourceX: {
|
|
18
|
+
type: Number,
|
|
19
|
+
required: true,
|
|
20
|
+
},
|
|
21
|
+
sourceY: {
|
|
22
|
+
type: Number,
|
|
23
|
+
required: true,
|
|
24
|
+
},
|
|
25
|
+
targetX: {
|
|
26
|
+
type: Number,
|
|
27
|
+
required: true,
|
|
28
|
+
},
|
|
29
|
+
targetY: {
|
|
30
|
+
type: Number,
|
|
31
|
+
required: true,
|
|
32
|
+
},
|
|
33
|
+
sourcePosition: {
|
|
34
|
+
type: String,
|
|
35
|
+
required: true,
|
|
36
|
+
},
|
|
37
|
+
targetPosition: {
|
|
38
|
+
type: String,
|
|
39
|
+
required: true,
|
|
40
|
+
},
|
|
41
|
+
data: {
|
|
42
|
+
type: Object,
|
|
43
|
+
required: true,
|
|
44
|
+
}
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
const emit = defineEmits(['select'])
|
|
48
|
+
|
|
49
|
+
const { findNode } = useVueFlow()
|
|
50
|
+
|
|
51
|
+
const path = computed(() => getBezierPath(props))
|
|
52
|
+
|
|
53
|
+
const label = computed(() => {
|
|
54
|
+
let sourceNode = findNode(props.source)
|
|
55
|
+
let outputs = getOutputsForNode(sourceNode, props.data.sourceHandle) || []
|
|
56
|
+
return outputs.map(o => `${o.name}: ${o.shortType ?? o.type}`).join(', ')
|
|
57
|
+
})
|
|
58
|
+
</script>
|
|
59
|
+
|
|
60
|
+
<template>
|
|
61
|
+
<!-- You can use the `BaseEdge` component to create your own custom edge more easily -->
|
|
62
|
+
<BaseEdge :path="path[0]" />
|
|
63
|
+
|
|
64
|
+
<!-- Use the `EdgeLabelRenderer` to escape the SVG world of edges and render your own custom label in a `<div>` ctx -->
|
|
65
|
+
<EdgeLabelRenderer>
|
|
66
|
+
<div
|
|
67
|
+
:style="{
|
|
68
|
+
pointerEvents: 'all',
|
|
69
|
+
position: 'absolute',
|
|
70
|
+
transform: `translate(-50%, -50%) translate(${path[1]}px,${path[2]}px)`,
|
|
71
|
+
background: 'rgb(255 255 255 / 20%)',
|
|
72
|
+
border: '2px solid rgb(255 255 255 / 32%)',
|
|
73
|
+
padding: '0.5em 1em',
|
|
74
|
+
borderRadius: '0.5em',
|
|
75
|
+
maxWidth: '200px',
|
|
76
|
+
textShadow: '0 1px 5px black',
|
|
77
|
+
backdropFilter: 'blur(2px)',
|
|
78
|
+
fontSize: '10px',
|
|
79
|
+
}"
|
|
80
|
+
class="nodrag nopan truncate text-xs cursor-pointer"
|
|
81
|
+
@click="$emit('select')"
|
|
82
|
+
v-if="label"
|
|
83
|
+
>
|
|
84
|
+
{{ label }}
|
|
85
|
+
</div>
|
|
86
|
+
</EdgeLabelRenderer>
|
|
87
|
+
</template>
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed } from 'vue';
|
|
3
|
+
import { Plus } from 'lucide-vue-next'
|
|
4
|
+
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
modelValue: {
|
|
7
|
+
type: Object,
|
|
8
|
+
required: true,
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
const emit = defineEmits(['update:modelValue']);
|
|
13
|
+
|
|
14
|
+
const node = computed({
|
|
15
|
+
get: () => props.modelValue,
|
|
16
|
+
set: (value) => {
|
|
17
|
+
emit('update:modelValue', value);
|
|
18
|
+
},
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
const addKeyValuePair = (type: string) => {
|
|
22
|
+
if (!node.value.data[type]) {
|
|
23
|
+
node.value.data[type] = [];
|
|
24
|
+
}
|
|
25
|
+
node.value.data[type].push({ key: '', value: '' });
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const removeKeyValuePair = (type: string, idx: number) => {
|
|
29
|
+
node.value.data[type].splice(idx, 1);
|
|
30
|
+
}
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<template>
|
|
34
|
+
<div class="w-full grid gap-2">
|
|
35
|
+
<div class="grid gap-2">
|
|
36
|
+
<p class="text-sm font-semibold">URL</p>
|
|
37
|
+
<Sandbox v-model="node.data.url" :variables="[]" placeholder="https://example.com" />
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
<div class="grid gap-2">
|
|
41
|
+
<p class="text-sm font-semibold">Method</p>
|
|
42
|
+
<Select v-model="node.data.method">
|
|
43
|
+
<SelectTrigger class="w-full">
|
|
44
|
+
<SelectValue placeholder="Select a method" />
|
|
45
|
+
</SelectTrigger>
|
|
46
|
+
<SelectContent>
|
|
47
|
+
<SelectGroup>
|
|
48
|
+
<SelectItem value="GET">GET</SelectItem>
|
|
49
|
+
<SelectItem value="POST">POST</SelectItem>
|
|
50
|
+
<SelectItem value="PUT">PUT</SelectItem>
|
|
51
|
+
<SelectItem value="PATCH">PATCH</SelectItem>
|
|
52
|
+
<SelectItem value="DELETE">DELETE</SelectItem>
|
|
53
|
+
</SelectGroup>
|
|
54
|
+
</SelectContent>
|
|
55
|
+
</Select>
|
|
56
|
+
</div>
|
|
57
|
+
|
|
58
|
+
<div class="grid gap-2">
|
|
59
|
+
<Label class="text-sm font-semibold mb-2">URL parameters</Label>
|
|
60
|
+
<div class="col-span-2">
|
|
61
|
+
<div v-for="(pair, idx) in node.data.urlParameters" :key="idx" class="flex items-center gap-2 mb-2">
|
|
62
|
+
<Sandbox v-model="pair.key" :variables="[]" placeholder="Key" class="w-full max-h-[200px]" />
|
|
63
|
+
<Sandbox v-model="pair.value" :variables="[]" placeholder="Value" class="w-full max-h-[200px]" />
|
|
64
|
+
|
|
65
|
+
<button
|
|
66
|
+
type="button"
|
|
67
|
+
class="text-red-500 hover:text-red-700 ml-2"
|
|
68
|
+
@click="removeKeyValuePair('urlParameters', idx)"
|
|
69
|
+
title="Delete"
|
|
70
|
+
>
|
|
71
|
+
×
|
|
72
|
+
</button>
|
|
73
|
+
</div>
|
|
74
|
+
<Button @click="addKeyValuePair('urlParameters')" variant="outline">
|
|
75
|
+
<Plus class="size-4" />
|
|
76
|
+
Add Key-Value Pair
|
|
77
|
+
</Button>
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
80
|
+
|
|
81
|
+
<div class="grid gap-2">
|
|
82
|
+
<Label class="text-sm font-semibold mb-2">Headers</Label>
|
|
83
|
+
<div class="col-span-2">
|
|
84
|
+
<div v-for="(pair, idx) in node.data.headers" :key="idx" class="flex items-center gap-2 mb-2">
|
|
85
|
+
<Sandbox v-model="pair.key" :variables="[]" placeholder="Key" class="w-full max-h-[200px]" />
|
|
86
|
+
<Sandbox v-model="pair.value" :variables="[]" placeholder="Value" class="w-full max-h-[200px]" />
|
|
87
|
+
|
|
88
|
+
<button
|
|
89
|
+
type="button"
|
|
90
|
+
class="text-red-500 hover:text-red-700 ml-2"
|
|
91
|
+
@click="removeKeyValuePair('headers', idx)"
|
|
92
|
+
title="Delete"
|
|
93
|
+
>
|
|
94
|
+
×
|
|
95
|
+
</button>
|
|
96
|
+
</div>
|
|
97
|
+
<Button @click="addKeyValuePair('headers')" variant="outline">
|
|
98
|
+
<Plus class="size-4" />
|
|
99
|
+
Add Key-Value Pair
|
|
100
|
+
</Button>
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
103
|
+
|
|
104
|
+
<div class="grid gap-2" v-if="['POST', 'PUT', 'PATCH'].includes(node.data.method)">
|
|
105
|
+
<Label class="text-sm font-semibold mb-2">Body</Label>
|
|
106
|
+
<div class="col-span-2">
|
|
107
|
+
<div v-for="(pair, idx) in node.data.body" :key="idx" class="flex items-center gap-2 mb-2">
|
|
108
|
+
<Sandbox v-model="pair.key" :variables="[]" placeholder="Key" class="w-full max-h-[200px]" />
|
|
109
|
+
<Sandbox v-model="pair.value" :variables="[]" placeholder="Value" class="w-full max-h-[200px]" />
|
|
110
|
+
|
|
111
|
+
<button
|
|
112
|
+
type="button"
|
|
113
|
+
class="text-red-500 hover:text-red-700 ml-2"
|
|
114
|
+
@click="removeKeyValuePair('body', idx)"
|
|
115
|
+
title="Delete"
|
|
116
|
+
>
|
|
117
|
+
×
|
|
118
|
+
</button>
|
|
119
|
+
</div>
|
|
120
|
+
<Button @click="addKeyValuePair('body')" variant="outline">
|
|
121
|
+
<Plus class="size-4" />
|
|
122
|
+
Add Key-Value Pair
|
|
123
|
+
</Button>
|
|
124
|
+
</div>
|
|
125
|
+
</div>
|
|
126
|
+
|
|
127
|
+
<div class="grid gap-2">
|
|
128
|
+
<Label class="text-sm font-semibold mb-2">Cookies</Label>
|
|
129
|
+
<div class="col-span-2">
|
|
130
|
+
<div v-for="(pair, idx) in node.data.cookies" :key="idx" class="flex items-center gap-2 mb-2">
|
|
131
|
+
<Sandbox v-model="pair.key" :variables="[]" placeholder="Key" class="w-full max-h-[200px]" />
|
|
132
|
+
<Sandbox v-model="pair.value" :variables="[]" placeholder="Value" class="w-full max-h-[200px]" />
|
|
133
|
+
|
|
134
|
+
<button
|
|
135
|
+
type="button"
|
|
136
|
+
class="text-red-500 hover:text-red-700 ml-2"
|
|
137
|
+
@click="removeKeyValuePair('cookies', idx)"
|
|
138
|
+
title="Delete"
|
|
139
|
+
>
|
|
140
|
+
×
|
|
141
|
+
</button>
|
|
142
|
+
</div>
|
|
143
|
+
<Button @click="addKeyValuePair('cookies')" variant="outline">
|
|
144
|
+
<Plus class="size-4" />
|
|
145
|
+
Add Key-Value Pair
|
|
146
|
+
</Button>
|
|
147
|
+
</div>
|
|
148
|
+
</div>
|
|
149
|
+
</div>
|
|
150
|
+
</template>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
const props = defineProps({
|
|
3
|
+
modelValue: {
|
|
4
|
+
type: Object,
|
|
5
|
+
required: true,
|
|
6
|
+
}
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
const emit = defineEmits(['update:modelValue']);
|
|
10
|
+
|
|
11
|
+
const node = computed({
|
|
12
|
+
get: () => props.modelValue,
|
|
13
|
+
set: (value) => {
|
|
14
|
+
emit('update:modelValue', value);
|
|
15
|
+
},
|
|
16
|
+
})
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<div class="w-full">
|
|
21
|
+
<p>Pops some confetti on the whole screen</p>
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed } from 'vue';
|
|
3
|
+
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
modelValue: {
|
|
6
|
+
type: Object,
|
|
7
|
+
required: true,
|
|
8
|
+
}
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
const emit = defineEmits(['update:modelValue']);
|
|
12
|
+
|
|
13
|
+
const node = computed({
|
|
14
|
+
get: () => props.modelValue,
|
|
15
|
+
set: (value) => {
|
|
16
|
+
emit('update:modelValue', value);
|
|
17
|
+
},
|
|
18
|
+
})
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<template>
|
|
22
|
+
<div class="w-full">
|
|
23
|
+
<p class="text-sm font-semibold mb-2">Title</p>
|
|
24
|
+
<Sandbox v-model="node.data.title" :variables="[]" placeholder="Confirmation" class="mb-4" />
|
|
25
|
+
<p class="text-sm font-semibold mb-2">Message</p>
|
|
26
|
+
<Sandbox v-model="node.data.message" :variables="[]" placeholder="Are you sure you want to proceed?" class="mb-4" />
|
|
27
|
+
<p class="text-sm font-semibold mb-2">Confirm text</p>
|
|
28
|
+
<Sandbox v-model="node.data.confirmText" :variables="[]" placeholder="Confirm" />
|
|
29
|
+
</div>
|
|
30
|
+
</template>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
const props = defineProps({
|
|
3
|
+
modelValue: {
|
|
4
|
+
type: Object,
|
|
5
|
+
required: true,
|
|
6
|
+
}
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
const emit = defineEmits(['update:modelValue']);
|
|
10
|
+
|
|
11
|
+
const node = computed({
|
|
12
|
+
get: () => props.modelValue,
|
|
13
|
+
set: (value) => {
|
|
14
|
+
emit('update:modelValue', value);
|
|
15
|
+
},
|
|
16
|
+
})
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<div class="w-full">
|
|
21
|
+
<p class="text-sm text-muted-foreground mb-4">Finishes the flow, closing any open dialogs returning data if needed</p>
|
|
22
|
+
|
|
23
|
+
<div class="flex items-center justify-between gap-2">
|
|
24
|
+
<label class="text-sm font-semibold select-none" for="return-data">Return data</label>
|
|
25
|
+
<Switch v-model="node.data.returnData" id="return-data" />
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
<div v-if="node.data.returnData" class="mt-4">
|
|
29
|
+
<CodeEditor v-model="node.data.transform" :variables="[]" placeholder="return ..." class="mb-1" />
|
|
30
|
+
<p class="text-xs text-stone-500">Just make sure you <b>return</b> a value</p>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</template>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, toRaw } from 'vue';
|
|
3
|
+
import integrationSettingViews from '../../../integration-action-builder/integrations'
|
|
4
|
+
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
modelValue: {
|
|
7
|
+
type: Object,
|
|
8
|
+
required: true,
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
const emit = defineEmits(['update:modelValue']);
|
|
13
|
+
|
|
14
|
+
const { showBuilder } = useIntegrationActionBuilder()
|
|
15
|
+
|
|
16
|
+
const node = computed({
|
|
17
|
+
get: () => props.modelValue,
|
|
18
|
+
set: (value) => {
|
|
19
|
+
emit('update:modelValue', value);
|
|
20
|
+
},
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
const editBuilder = async () => {
|
|
24
|
+
let action = node.value.data.action ? structuredClone(toRaw(node.value.data.action)) : null
|
|
25
|
+
let newAction = await showBuilder([], action);
|
|
26
|
+
if (newAction) {
|
|
27
|
+
node.value.data.action = newAction
|
|
28
|
+
// node.value.data.action = JSON.parse(JSON.stringify(newAction))
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const outputValues = computed(() => {
|
|
33
|
+
if (!node.value.data.action?.integrationType || !node.value.data.action?.serviceType || !node.value.data.action?.actionType) return {}
|
|
34
|
+
return integrationSettingViews?.[node.value.data.action?.integrationType]?.serviceTypes?.[node.value.data.action?.serviceType]?.actionTypes?.[node.value.data.action?.actionType]?.outputs
|
|
35
|
+
})
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
<template>
|
|
39
|
+
<div class="w-full">
|
|
40
|
+
<p class="text-sm font-semibold mb-2">Integration action</p>
|
|
41
|
+
<Button @click="editBuilder">
|
|
42
|
+
<span v-if="node.data.action">{{ node.data.action.serviceType }} - {{ node.data.action.actionType }}</span>
|
|
43
|
+
<span v-else>Add integration action</span>
|
|
44
|
+
</Button>
|
|
45
|
+
|
|
46
|
+
<div v-if="outputValues">
|
|
47
|
+
{{ outputValues }}
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
</template>
|