@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,193 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import integrationSettingViews from './integrations'
|
|
3
|
+
|
|
4
|
+
interface IntegrationAction {
|
|
5
|
+
integration: string
|
|
6
|
+
integrationType: string
|
|
7
|
+
serviceType: string
|
|
8
|
+
actionType: string
|
|
9
|
+
actionTypeConfig: any
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const { builderState, onConfirm, onCancel } = useIntegrationActionBuilder()
|
|
13
|
+
|
|
14
|
+
const route = useRoute()
|
|
15
|
+
|
|
16
|
+
const { getProjectIntegrations } = useIntegrations()
|
|
17
|
+
|
|
18
|
+
const integrations = ref([])
|
|
19
|
+
const serviceTypes = ref([])
|
|
20
|
+
const actionTypes = ref([])
|
|
21
|
+
|
|
22
|
+
const projectId = computed(() => route.params.slug as string)
|
|
23
|
+
|
|
24
|
+
const integrationAction = ref<IntegrationAction>({
|
|
25
|
+
integration: "",
|
|
26
|
+
integrationType: "",
|
|
27
|
+
serviceType: "",
|
|
28
|
+
actionType: "",
|
|
29
|
+
actionTypeConfig: {}
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
watch(() => projectId.value, async () => {
|
|
33
|
+
projectId.value ? loadIntegrations() : integrations.value = []
|
|
34
|
+
serviceTypes.value = []
|
|
35
|
+
actionTypes.value = []
|
|
36
|
+
resetForm()
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
const initForm = () => {
|
|
40
|
+
loadIntegrations()
|
|
41
|
+
loadServiceTypes(integrationAction.value?.integration)
|
|
42
|
+
loadActionTypes(integrationAction.value?.serviceType)
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
watch(() => builderState.value.show, async (val) => {
|
|
46
|
+
if (val) {
|
|
47
|
+
let action = builderState.value.action ? JSON.parse(JSON.stringify(builderState.value.action)) : null
|
|
48
|
+
await resetForm()
|
|
49
|
+
if (action) {
|
|
50
|
+
Object.assign(integrationAction.value, action)
|
|
51
|
+
} else {
|
|
52
|
+
Object.assign(integrationAction.value, {
|
|
53
|
+
integration: "",
|
|
54
|
+
integrationType: "",
|
|
55
|
+
serviceType: "",
|
|
56
|
+
actionType: "",
|
|
57
|
+
actionTypeConfig: {}
|
|
58
|
+
})
|
|
59
|
+
}
|
|
60
|
+
initForm()
|
|
61
|
+
}
|
|
62
|
+
})
|
|
63
|
+
|
|
64
|
+
watch(() => integrationAction.value.integration, (val) => {
|
|
65
|
+
loadServiceTypes(val)
|
|
66
|
+
integrationAction.value.integrationType = integrations.value?.find(i => i.id === val)?.type
|
|
67
|
+
// integrationAction.value.actionTypeConfig = {}
|
|
68
|
+
})
|
|
69
|
+
|
|
70
|
+
watch(() => integrationAction.value.serviceType, (val) => {
|
|
71
|
+
loadActionTypes(val)
|
|
72
|
+
// integrationAction.value.actionTypeConfig = {}
|
|
73
|
+
})
|
|
74
|
+
|
|
75
|
+
watch(() => integrationAction.value.actionTypeConfig, (val) => {
|
|
76
|
+
console.log("actionTypeConfig", val)
|
|
77
|
+
})
|
|
78
|
+
|
|
79
|
+
const loadIntegrations = async () => {
|
|
80
|
+
if (!projectId.value) return integrations.value = [];
|
|
81
|
+
integrations.value = await getProjectIntegrations(projectId.value)
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const loadServiceTypes = (integrationId: string) => {
|
|
85
|
+
if (!integrationId) return serviceTypes.value = [];
|
|
86
|
+
serviceTypes.value = integrationSettingViews?.[integrations.value?.find(i => i.id === integrationId)?.type]?.serviceTypes ? Object.entries(integrationSettingViews?.[integrations.value?.find(i => i.id === integrationId)?.type]?.serviceTypes)?.map(([key, value]) => ({ text: value.name, value: key, actionTypes: value.actionTypes })) : []
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const loadActionTypes = (serviceTypeId: string) => {
|
|
90
|
+
if (!serviceTypeId) return actionTypes.value = [];
|
|
91
|
+
actionTypes.value = serviceTypes.value?.find(st => st.value === serviceTypeId)?.actionTypes ? Object.entries(serviceTypes.value?.find(st => st.value === serviceTypeId)?.actionTypes)?.map(([key, value]) => ({ text: value.name, value: key, component: value.component })) : []
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const resetForm = async () => {
|
|
95
|
+
Object.assign(integrationAction.value, {
|
|
96
|
+
integration: "",
|
|
97
|
+
integrationType: "",
|
|
98
|
+
serviceType: "",
|
|
99
|
+
actionType: "",
|
|
100
|
+
actionTypeConfig: {}
|
|
101
|
+
})
|
|
102
|
+
|
|
103
|
+
serviceTypes.value = []
|
|
104
|
+
actionTypes.value = []
|
|
105
|
+
|
|
106
|
+
await nextTick()
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
const cancel = () => {
|
|
110
|
+
resetForm()
|
|
111
|
+
onCancel()
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
const createIntegrationAction = () => {
|
|
115
|
+
onConfirm(integrationAction.value)
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
onMounted(async () => {
|
|
119
|
+
initForm()
|
|
120
|
+
})
|
|
121
|
+
</script>
|
|
122
|
+
|
|
123
|
+
<template>
|
|
124
|
+
<Teleport to="body" v-if="builderState.show">
|
|
125
|
+
<Sheet v-model:open="builderState.show">
|
|
126
|
+
<SheetContent side="left" class="w-full sm:w-3/4 xl:w-1/2 sm:max-w-3xl">
|
|
127
|
+
<SheetHeader>
|
|
128
|
+
<SheetTitle>New integration action</SheetTitle>
|
|
129
|
+
<SheetDescription>
|
|
130
|
+
Make external calls to your integrations or APIs.
|
|
131
|
+
</SheetDescription>
|
|
132
|
+
</SheetHeader>
|
|
133
|
+
|
|
134
|
+
<div class="flex flex-col gap-4 p-4">
|
|
135
|
+
<div class="flex flex-wrap gap-4">
|
|
136
|
+
<div class="flex flex-col gap-2">
|
|
137
|
+
<p class="text-sm font-semibold">Integration</p>
|
|
138
|
+
<ResourceSelect v-model="integrationAction.integration" />
|
|
139
|
+
</div>
|
|
140
|
+
<div class="flex flex-col gap-2">
|
|
141
|
+
<p class="text-sm font-semibold">Service type</p>
|
|
142
|
+
<Select v-model="integrationAction.serviceType" :disabled="!integrationAction.integration">
|
|
143
|
+
<SelectTrigger class="w-[190px]">
|
|
144
|
+
<SelectValue placeholder="Select a service type" />
|
|
145
|
+
</SelectTrigger>
|
|
146
|
+
<SelectContent>
|
|
147
|
+
<SelectGroup>
|
|
148
|
+
<SelectItem v-for="serviceType in serviceTypes" :key="serviceType.value" :value="serviceType.value">
|
|
149
|
+
{{ serviceType.text }}
|
|
150
|
+
</SelectItem>
|
|
151
|
+
</SelectGroup>
|
|
152
|
+
</SelectContent>
|
|
153
|
+
</Select>
|
|
154
|
+
</div>
|
|
155
|
+
<div class="flex flex-col gap-2">
|
|
156
|
+
<p class="text-sm font-semibold">Action type</p>
|
|
157
|
+
<Select v-model="integrationAction.actionType" :disabled="!integrationAction.serviceType">
|
|
158
|
+
<SelectTrigger class="w-[190px]">
|
|
159
|
+
<SelectValue placeholder="Select an action type" />
|
|
160
|
+
</SelectTrigger>
|
|
161
|
+
<SelectContent>
|
|
162
|
+
<SelectGroup>
|
|
163
|
+
<SelectItem v-for="actionType in actionTypes" :key="actionType.value" :value="actionType.value">
|
|
164
|
+
{{ actionType.text }}
|
|
165
|
+
</SelectItem>
|
|
166
|
+
</SelectGroup>
|
|
167
|
+
</SelectContent>
|
|
168
|
+
</Select>
|
|
169
|
+
</div>
|
|
170
|
+
</div>
|
|
171
|
+
|
|
172
|
+
<Separator class="my-4" />
|
|
173
|
+
|
|
174
|
+
<div v-if="!integrationAction.actionType">
|
|
175
|
+
<p>Choose an action type to get started.</p>
|
|
176
|
+
</div>
|
|
177
|
+
|
|
178
|
+
<div v-else>
|
|
179
|
+
<component :is="actionTypes.find(at => at.value === integrationAction.actionType)?.component" v-model="integrationAction.actionTypeConfig" />
|
|
180
|
+
</div>
|
|
181
|
+
</div>
|
|
182
|
+
|
|
183
|
+
<SheetFooter>
|
|
184
|
+
<div class="flex justify-end gap-2">
|
|
185
|
+
<Button variant="ghost" @click="cancel">Cancel</Button>
|
|
186
|
+
<Button @click="createIntegrationAction">Create</Button>
|
|
187
|
+
</div>
|
|
188
|
+
</SheetFooter>
|
|
189
|
+
</SheetContent>
|
|
190
|
+
</Sheet>
|
|
191
|
+
</Teleport>
|
|
192
|
+
</template>
|
|
193
|
+
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
const { builderState } = useIntegrationActionBuilder()
|
|
3
|
+
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
modelValue: {
|
|
6
|
+
type: String,
|
|
7
|
+
required: true
|
|
8
|
+
},
|
|
9
|
+
placeholder: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: ''
|
|
12
|
+
}
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
const emit = defineEmits(['update:modelValue'])
|
|
16
|
+
|
|
17
|
+
const mutableValue = computed({
|
|
18
|
+
get() {
|
|
19
|
+
return props.modelValue
|
|
20
|
+
},
|
|
21
|
+
set(value) {
|
|
22
|
+
emit('update:modelValue', value)
|
|
23
|
+
}
|
|
24
|
+
})
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<template>
|
|
28
|
+
<Sandbox v-model="mutableValue" :variables="builderState.variableContext" style="max-height: 200px" :placeholder="placeholder" />
|
|
29
|
+
</template>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as IntegrationActionBuilder } from './IntegrationActionBuilder.vue'
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import InterpolationField from '../../InterpolationField.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 form = computed({
|
|
14
|
+
get() {
|
|
15
|
+
return props.modelValue
|
|
16
|
+
},
|
|
17
|
+
set(value) {
|
|
18
|
+
emit('update:modelValue', value)
|
|
19
|
+
}
|
|
20
|
+
})
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<template>
|
|
24
|
+
<div>
|
|
25
|
+
<h2 class="text-lg font-semibold mb-2">Add document</h2>
|
|
26
|
+
|
|
27
|
+
<div class="flex flex-col gap-2">
|
|
28
|
+
<div class="flex flex-col gap-1">
|
|
29
|
+
<p class="text-sm font-semibold">Collection</p>
|
|
30
|
+
<InterpolationField v-model="form.collection" />
|
|
31
|
+
</div>
|
|
32
|
+
<div class="flex flex-col gap-1">
|
|
33
|
+
<p class="text-sm font-semibold">Document ID</p>
|
|
34
|
+
<InterpolationField v-model="form.documentId" />
|
|
35
|
+
<p class="text-xs text-muted-foreground">Leave blank to let Firestore generate a random ID</p>
|
|
36
|
+
</div>
|
|
37
|
+
<div class="flex flex-col gap-1">
|
|
38
|
+
<p class="text-sm font-semibold">Data</p>
|
|
39
|
+
<InterpolationField v-model="form.data" />
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
</template>
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ChevronsUpDown } from 'lucide-vue-next'
|
|
3
|
+
import InterpolationField from '../../InterpolationField.vue'
|
|
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 form = computed({
|
|
15
|
+
get() {
|
|
16
|
+
return props.modelValue || {
|
|
17
|
+
resource: '',
|
|
18
|
+
filters: [],
|
|
19
|
+
sorts: [],
|
|
20
|
+
limit: null,
|
|
21
|
+
startAt: null,
|
|
22
|
+
endAt: null
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
set(value) {
|
|
26
|
+
emit('update:modelValue', value)
|
|
27
|
+
}
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
const showAdvanced = ref(false);
|
|
31
|
+
|
|
32
|
+
// Filters
|
|
33
|
+
const operatorOptions = [
|
|
34
|
+
{ label: '=', value: '==' },
|
|
35
|
+
{ label: '≠', value: '!=' },
|
|
36
|
+
{ label: '<', value: '<' },
|
|
37
|
+
{ label: '≤', value: '<=' },
|
|
38
|
+
{ label: '≥', value: '>=' },
|
|
39
|
+
{ label: '>', value: '>' },
|
|
40
|
+
{ label: 'IN', value: 'in' },
|
|
41
|
+
{ label: 'NOT IN', value: 'not-in' },
|
|
42
|
+
{ label: 'CONTAINS', value: 'array-contains' },
|
|
43
|
+
{ label: 'CONTAINS ANY', value: 'array-contains-any' }
|
|
44
|
+
]
|
|
45
|
+
|
|
46
|
+
async function addFilter() {
|
|
47
|
+
if (!form.value.filters) {
|
|
48
|
+
form.value.filters = []
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
form.value.filters.push({ field: '', operator: '==', value: '' });
|
|
52
|
+
await nextTick()
|
|
53
|
+
const filterFields = document.querySelectorAll('#integration_action_builder_dialog_filters .filter-field')
|
|
54
|
+
if (filterFields.length) {
|
|
55
|
+
(filterFields[filterFields.length - 1] as HTMLInputElement).focus()
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function removeFilter(idx: number) {
|
|
60
|
+
form.value.filters.splice(idx, 1);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Sorts
|
|
64
|
+
function addSort() {
|
|
65
|
+
if (!form.value.sorts) {
|
|
66
|
+
form.value.sorts = []
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
form.value.sorts.push({ field: '', direction: 'asc' });
|
|
70
|
+
}
|
|
71
|
+
function removeSort(idx: number) {
|
|
72
|
+
form.value.sorts.splice(idx, 1);
|
|
73
|
+
}
|
|
74
|
+
</script>
|
|
75
|
+
|
|
76
|
+
<template>
|
|
77
|
+
<h2 class="text-lg font-semibold mb-2">Query Firestore</h2>
|
|
78
|
+
|
|
79
|
+
<div class="flex flex-col gap-2">
|
|
80
|
+
<div class="flex flex-col gap-1">
|
|
81
|
+
<p class="text-sm font-semibold">Resource</p>
|
|
82
|
+
<InterpolationField v-model="form.resource" />
|
|
83
|
+
</div>
|
|
84
|
+
|
|
85
|
+
<div id="integration_action_builder_dialog_filters">
|
|
86
|
+
<Label class="block text-sm font-medium text-muted-foreground mb-2">Filters</Label>
|
|
87
|
+
<div class="space-y-2">
|
|
88
|
+
<div v-for="(filter, idx) in form.filters" :key="idx" class="flex items-center gap-2">
|
|
89
|
+
<InterpolationField v-model="filter.field" placeholder="Field" class="w-32 filter-field" />
|
|
90
|
+
<Select v-model="filter.operator">
|
|
91
|
+
<SelectTrigger class="w-[170px]">
|
|
92
|
+
<SelectValue />
|
|
93
|
+
</SelectTrigger>
|
|
94
|
+
<SelectContent>
|
|
95
|
+
<SelectGroup>
|
|
96
|
+
<SelectItem v-for="op in operatorOptions" :key="op.value" :value="op.value">{{ op.label }}</SelectItem>
|
|
97
|
+
</SelectGroup>
|
|
98
|
+
</SelectContent>
|
|
99
|
+
</Select>
|
|
100
|
+
<InterpolationField v-model="filter.value" placeholder="Value" class="w-32" />
|
|
101
|
+
<Button variant="ghost" @click="removeFilter(idx)" title="Remove filter">✕</Button>
|
|
102
|
+
</div>
|
|
103
|
+
<Button variant="outline" @click="addFilter">+ Add Filter</Button>
|
|
104
|
+
</div>
|
|
105
|
+
</div>
|
|
106
|
+
|
|
107
|
+
<!-- Sort Section -->
|
|
108
|
+
<div>
|
|
109
|
+
<Label class="block text-sm font-medium text-muted-foreground mb-2">Sort</Label>
|
|
110
|
+
<div class="space-y-2">
|
|
111
|
+
<div v-for="(sort, idx) in form.sorts" :key="idx" class="flex items-center gap-2">
|
|
112
|
+
<InterpolationField v-model="sort.field" placeholder="Sort By" class="w-32" />
|
|
113
|
+
<Select v-model="sort.direction">
|
|
114
|
+
<SelectTrigger class="w-[180px]">
|
|
115
|
+
<SelectValue placeholder="Sort by" />
|
|
116
|
+
</SelectTrigger>
|
|
117
|
+
<SelectContent>
|
|
118
|
+
<SelectGroup>
|
|
119
|
+
<SelectItem value="asc">ASC</SelectItem>
|
|
120
|
+
<SelectItem value="desc">DESC</SelectItem>
|
|
121
|
+
</SelectGroup>
|
|
122
|
+
</SelectContent>
|
|
123
|
+
</Select>
|
|
124
|
+
<Button variant="ghost" @click="removeSort(idx)" title="Remove sort">✕</Button>
|
|
125
|
+
</div>
|
|
126
|
+
<Button variant="outline" @click="addSort">+ Add Sort</Button>
|
|
127
|
+
</div>
|
|
128
|
+
</div>
|
|
129
|
+
|
|
130
|
+
<!-- Advanced Options -->
|
|
131
|
+
<Collapsible v-model="showAdvanced">
|
|
132
|
+
<div class="flex items-center justify-between space-x-4 px-4">
|
|
133
|
+
<h4 class="text-sm font-semibold">
|
|
134
|
+
Advanced Options
|
|
135
|
+
</h4>
|
|
136
|
+
<CollapsibleTrigger as-child>
|
|
137
|
+
<Button variant="ghost" size="sm" class="w-9 p-0">
|
|
138
|
+
<ChevronsUpDown class="size-4" />
|
|
139
|
+
<span class="sr-only">Toggle</span>
|
|
140
|
+
</Button>
|
|
141
|
+
</CollapsibleTrigger>
|
|
142
|
+
</div>
|
|
143
|
+
<CollapsibleContent>
|
|
144
|
+
<div class="grid grid-cols-2 gap-4 mt-2">
|
|
145
|
+
<div>
|
|
146
|
+
<Label for="limit">Limit</Label>
|
|
147
|
+
<InterpolationField v-model="form.limit" placeholder="Limit" />
|
|
148
|
+
</div>
|
|
149
|
+
<div>
|
|
150
|
+
<Label for="offset">Offset</Label>
|
|
151
|
+
<InterpolationField v-model="form.offset" placeholder="Offset" />
|
|
152
|
+
</div>
|
|
153
|
+
<div>
|
|
154
|
+
<Label for="startAt">StartAt</Label>
|
|
155
|
+
<InterpolationField v-model="form.startAt" placeholder="StartAt" />
|
|
156
|
+
</div>
|
|
157
|
+
<div>
|
|
158
|
+
<Label for="endAt">EndAt</Label>
|
|
159
|
+
<InterpolationField v-model="form.endAt" placeholder="EndAt" />
|
|
160
|
+
</div>
|
|
161
|
+
</div>
|
|
162
|
+
</CollapsibleContent>
|
|
163
|
+
</Collapsible>
|
|
164
|
+
</div>
|
|
165
|
+
</template>
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import AddDocument from "./AddDocument.vue"
|
|
2
|
+
import DeleteDocument from "./DeleteDocument.vue"
|
|
3
|
+
import GetDocumentById from "./GetDocumentById.vue"
|
|
4
|
+
import GetCollections from "./GetCollections.vue"
|
|
5
|
+
import QueryCollectionGroup from "./QueryCollectionGroup.vue"
|
|
6
|
+
import QueryFirestore from "./QueryFirestore.vue"
|
|
7
|
+
import UpdateDocument from "./UpdateDocument.vue"
|
|
8
|
+
|
|
9
|
+
export default {
|
|
10
|
+
name: "Firebase",
|
|
11
|
+
serviceTypes: {
|
|
12
|
+
firestore: {
|
|
13
|
+
name: "Firestore",
|
|
14
|
+
actionTypes: {
|
|
15
|
+
addDocument: {
|
|
16
|
+
name: "Add document",
|
|
17
|
+
component: AddDocument,
|
|
18
|
+
outputs: {
|
|
19
|
+
success: [
|
|
20
|
+
{
|
|
21
|
+
name: "result",
|
|
22
|
+
type: {
|
|
23
|
+
success: "boolean",
|
|
24
|
+
documentId: "string",
|
|
25
|
+
message: "string?",
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
error: [
|
|
30
|
+
{
|
|
31
|
+
name: "result",
|
|
32
|
+
type: {
|
|
33
|
+
success: "false",
|
|
34
|
+
error: "string | { message: string; code?: string }",
|
|
35
|
+
statusCode: "number?",
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
deleteDocument: {
|
|
43
|
+
name: "Delete document",
|
|
44
|
+
component: DeleteDocument,
|
|
45
|
+
outputs: {
|
|
46
|
+
success: [
|
|
47
|
+
{
|
|
48
|
+
name: "result",
|
|
49
|
+
type: {
|
|
50
|
+
success: "boolean",
|
|
51
|
+
message: "string?",
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
error: [
|
|
56
|
+
{
|
|
57
|
+
name: "result",
|
|
58
|
+
type: {
|
|
59
|
+
success: "false",
|
|
60
|
+
error: "string",
|
|
61
|
+
statusCode: "number?",
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
|
|
68
|
+
getDocumentById: {
|
|
69
|
+
name: "Get document by id",
|
|
70
|
+
component: GetDocumentById,
|
|
71
|
+
outputs: {
|
|
72
|
+
success: [
|
|
73
|
+
{
|
|
74
|
+
name: "result",
|
|
75
|
+
type: {
|
|
76
|
+
success: "boolean",
|
|
77
|
+
document: "DocumentData",
|
|
78
|
+
message: "string?",
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
],
|
|
82
|
+
error: [
|
|
83
|
+
{
|
|
84
|
+
name: "result",
|
|
85
|
+
type: {
|
|
86
|
+
success: "false",
|
|
87
|
+
error: "string",
|
|
88
|
+
statusCode: "number?",
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
|
|
95
|
+
getCollections: {
|
|
96
|
+
name: "Get collections",
|
|
97
|
+
component: GetCollections,
|
|
98
|
+
outputs: {
|
|
99
|
+
success: [
|
|
100
|
+
{
|
|
101
|
+
name: "result",
|
|
102
|
+
type: {
|
|
103
|
+
success: "boolean",
|
|
104
|
+
collections: "string[]",
|
|
105
|
+
message: "string?",
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
],
|
|
109
|
+
error: [
|
|
110
|
+
{
|
|
111
|
+
name: "result",
|
|
112
|
+
type: {
|
|
113
|
+
success: "false",
|
|
114
|
+
error: "string",
|
|
115
|
+
statusCode: "number?",
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
],
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
|
|
122
|
+
queryCollectionGroup: {
|
|
123
|
+
name: "Query collection group",
|
|
124
|
+
component: QueryCollectionGroup,
|
|
125
|
+
outputs: {
|
|
126
|
+
success: [
|
|
127
|
+
{
|
|
128
|
+
name: "result",
|
|
129
|
+
type: {
|
|
130
|
+
success: "boolean",
|
|
131
|
+
data: "DocumentData[]",
|
|
132
|
+
message: "string?",
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
],
|
|
136
|
+
error: [
|
|
137
|
+
{
|
|
138
|
+
name: "result",
|
|
139
|
+
type: {
|
|
140
|
+
success: "false",
|
|
141
|
+
error: "string",
|
|
142
|
+
statusCode: "number?",
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
],
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
|
|
149
|
+
queryFirestore: {
|
|
150
|
+
name: "Query firestore",
|
|
151
|
+
component: QueryFirestore,
|
|
152
|
+
outputs: {
|
|
153
|
+
success: [
|
|
154
|
+
{
|
|
155
|
+
name: "result",
|
|
156
|
+
type: {
|
|
157
|
+
success: "boolean",
|
|
158
|
+
documents: "DocumentData[]",
|
|
159
|
+
message: "string?",
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
],
|
|
163
|
+
error: [
|
|
164
|
+
{
|
|
165
|
+
name: "result",
|
|
166
|
+
type: {
|
|
167
|
+
success: "false",
|
|
168
|
+
error: "string",
|
|
169
|
+
statusCode: "number?",
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
],
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
|
|
176
|
+
updateDocument: {
|
|
177
|
+
name: "Update document",
|
|
178
|
+
component: UpdateDocument,
|
|
179
|
+
outputs: {
|
|
180
|
+
success: [
|
|
181
|
+
{
|
|
182
|
+
name: "result",
|
|
183
|
+
type: {
|
|
184
|
+
success: "boolean",
|
|
185
|
+
message: "string?",
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
],
|
|
189
|
+
error: [
|
|
190
|
+
{
|
|
191
|
+
name: "result",
|
|
192
|
+
type: {
|
|
193
|
+
success: "false",
|
|
194
|
+
error: "string",
|
|
195
|
+
statusCode: "number?",
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
],
|
|
199
|
+
},
|
|
200
|
+
},
|
|
201
|
+
},
|
|
202
|
+
},
|
|
203
|
+
},
|
|
204
|
+
}
|