@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,389 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref, computed, watch, nextTick } from 'vue';
|
|
3
|
+
import { ExternalLink, ChevronsUpDown } from 'lucide-vue-next'
|
|
4
|
+
|
|
5
|
+
const route = useRoute()
|
|
6
|
+
const projectId = route.params.slug as string
|
|
7
|
+
|
|
8
|
+
const props = defineProps({
|
|
9
|
+
modelValue: {
|
|
10
|
+
type: Object,
|
|
11
|
+
default: () => ({})
|
|
12
|
+
},
|
|
13
|
+
integrationId: {
|
|
14
|
+
type: String
|
|
15
|
+
},
|
|
16
|
+
needPredefinedIntegration: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: false
|
|
19
|
+
},
|
|
20
|
+
noTrigger: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: false
|
|
23
|
+
}
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
const dialogIsOpen = ref(false)
|
|
27
|
+
|
|
28
|
+
const openDialog = async (query: any) => {
|
|
29
|
+
dialogIsOpen.value = true
|
|
30
|
+
await nextTick();
|
|
31
|
+
|
|
32
|
+
if (query) {
|
|
33
|
+
selectedIntegrationId.value = query.integration.id
|
|
34
|
+
resource.value = query.resource
|
|
35
|
+
filters.value = query.filters
|
|
36
|
+
sorts.value = query.sorts
|
|
37
|
+
limit.value = query.limit
|
|
38
|
+
offset.value = query.offset
|
|
39
|
+
startAt.value = query.startAt
|
|
40
|
+
endAt.value = query.endAt
|
|
41
|
+
groupBy.value = query.groupBy
|
|
42
|
+
distinct.value = query.distinct
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
watch(dialogIsOpen, (val) => {
|
|
47
|
+
if (val) {
|
|
48
|
+
let modelValue = JSON.parse(JSON.stringify(props.modelValue))
|
|
49
|
+
selectedIntegrationId.value = modelValue?.integration?.id || null
|
|
50
|
+
resource.value = modelValue?.resource || ''
|
|
51
|
+
filters.value = modelValue?.filters || []
|
|
52
|
+
sorts.value = modelValue?.sorts || []
|
|
53
|
+
limit.value = modelValue?.limit || null
|
|
54
|
+
offset.value = modelValue?.offset || null
|
|
55
|
+
startAt.value = modelValue?.startAt || null
|
|
56
|
+
endAt.value = modelValue?.endAt || null
|
|
57
|
+
groupBy.value = modelValue?.groupBy || ''
|
|
58
|
+
distinct.value = modelValue?.distinct || false
|
|
59
|
+
}
|
|
60
|
+
})
|
|
61
|
+
|
|
62
|
+
const emit = defineEmits(['update:modelValue', 'saved'])
|
|
63
|
+
|
|
64
|
+
const { getProjectIntegrations } = useIntegrations()
|
|
65
|
+
const integrations = ref<any[]>([])
|
|
66
|
+
integrations.value = await getProjectIntegrations(projectId)
|
|
67
|
+
|
|
68
|
+
const { buildFirebaseQuery, buildSQLQuery } = useQueryBuilder();
|
|
69
|
+
|
|
70
|
+
const selectedIntegrationId = ref<string | null>(props.integrationId)
|
|
71
|
+
|
|
72
|
+
const integration = computed(() => {
|
|
73
|
+
if (props.integrationId) {
|
|
74
|
+
return integrations.value.find(integration => integration.id === props.integrationId)
|
|
75
|
+
}
|
|
76
|
+
return integrations.value.find(integration => integration.id === selectedIntegrationId.value)
|
|
77
|
+
})
|
|
78
|
+
|
|
79
|
+
const errorMessage = ref<string | null>(null)
|
|
80
|
+
const indexUrl = ref<string | null>(null)
|
|
81
|
+
|
|
82
|
+
// Resource selector
|
|
83
|
+
const resource = ref('');
|
|
84
|
+
const resourceOptions = ref<string[]>(['team-building-requests', 'users', 'projects']); // Example options
|
|
85
|
+
|
|
86
|
+
// Filters
|
|
87
|
+
interface Filter {
|
|
88
|
+
field: string;
|
|
89
|
+
operator: string;
|
|
90
|
+
value: string | number | boolean;
|
|
91
|
+
}
|
|
92
|
+
const filters = ref<Filter[]>([]);
|
|
93
|
+
const operatorOptions = [
|
|
94
|
+
{ label: '=', value: '==' },
|
|
95
|
+
{ label: '≠', value: '!=' },
|
|
96
|
+
{ label: '<', value: '<' },
|
|
97
|
+
{ label: '≤', value: '<=' },
|
|
98
|
+
{ label: '≥', value: '>=' },
|
|
99
|
+
{ label: '>', value: '>' },
|
|
100
|
+
{ label: 'IN', value: 'in' },
|
|
101
|
+
{ label: 'NOT IN', value: 'not-in' },
|
|
102
|
+
{ label: 'CONTAINS', value: 'array-contains' },
|
|
103
|
+
{ label: 'CONTAINS ANY', value: 'array-contains-any' }
|
|
104
|
+
]
|
|
105
|
+
|
|
106
|
+
async function addFilter() {
|
|
107
|
+
filters.value.push({ field: '', operator: '==', value: '' });
|
|
108
|
+
await nextTick()
|
|
109
|
+
const filterFields = document.querySelectorAll('#query_builder_dialog_filters .filter-field')
|
|
110
|
+
if (filterFields.length) {
|
|
111
|
+
(filterFields[filterFields.length - 1] as HTMLInputElement).focus()
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
function removeFilter(idx: number) {
|
|
116
|
+
filters.value.splice(idx, 1);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// Sorts
|
|
120
|
+
interface Sort {
|
|
121
|
+
field: string;
|
|
122
|
+
direction: 'asc' | 'desc';
|
|
123
|
+
}
|
|
124
|
+
const sorts = ref<Sort[]>([]);
|
|
125
|
+
function addSort() {
|
|
126
|
+
sorts.value.push({ field: '', direction: 'asc' });
|
|
127
|
+
}
|
|
128
|
+
function removeSort(idx: number) {
|
|
129
|
+
sorts.value.splice(idx, 1);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// Advanced options
|
|
133
|
+
const showAdvanced = ref(false);
|
|
134
|
+
const limit = ref<number | null>(null);
|
|
135
|
+
const offset = ref<number | null>(null);
|
|
136
|
+
const startAt = ref<any>(null);
|
|
137
|
+
const endAt = ref<any>(null);
|
|
138
|
+
const groupBy = ref<string>('');
|
|
139
|
+
const distinct = ref(false);
|
|
140
|
+
|
|
141
|
+
// Query preview
|
|
142
|
+
const queryPreview = ref('');
|
|
143
|
+
const queryResult = ref<any>(null);
|
|
144
|
+
|
|
145
|
+
function resetOutput() {
|
|
146
|
+
queryPreview.value = '';
|
|
147
|
+
queryResult.value = null;
|
|
148
|
+
errorMessage.value = null;
|
|
149
|
+
indexUrl.value = null;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
function previewQuery() {
|
|
153
|
+
resetOutput()
|
|
154
|
+
if (integration.value.type === 'FIREBASE') {
|
|
155
|
+
queryPreview.value = buildFirebaseQuery({
|
|
156
|
+
resource: resource.value,
|
|
157
|
+
filters: filters.value,
|
|
158
|
+
sorts: sorts.value,
|
|
159
|
+
limit: limit.value,
|
|
160
|
+
startAt: startAt.value,
|
|
161
|
+
endAt: endAt.value
|
|
162
|
+
})
|
|
163
|
+
} else {
|
|
164
|
+
queryPreview.value = buildSQLQuery({
|
|
165
|
+
resource: resource.value,
|
|
166
|
+
filters: filters.value,
|
|
167
|
+
sorts: sorts.value,
|
|
168
|
+
limit: limit.value,
|
|
169
|
+
offset: offset.value,
|
|
170
|
+
groupBy: groupBy.value,
|
|
171
|
+
distinct: distinct.value
|
|
172
|
+
})
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
async function runQuery() {
|
|
177
|
+
resetOutput()
|
|
178
|
+
if (integration.value.type === 'FIREBASE') {
|
|
179
|
+
try {
|
|
180
|
+
const { find } = useFirebaseIntegration(selectedIntegrationId.value)
|
|
181
|
+
let res = await find(resource.value, {
|
|
182
|
+
filters: filters.value,
|
|
183
|
+
sorts: sorts.value,
|
|
184
|
+
limit: limit.value,
|
|
185
|
+
startAt: startAt.value,
|
|
186
|
+
endAt: endAt.value
|
|
187
|
+
})
|
|
188
|
+
queryResult.value = `Found ${res.length} results`
|
|
189
|
+
} catch (error: any) {
|
|
190
|
+
errorMessage.value = error.response.data?.message || 'Failed to run query'
|
|
191
|
+
indexUrl.value = error.response.data?.data?.indexUrl || null
|
|
192
|
+
}
|
|
193
|
+
} else {
|
|
194
|
+
try {
|
|
195
|
+
queryResult.value = buildSQLQuery({
|
|
196
|
+
resource: resource.value,
|
|
197
|
+
filters: filters.value,
|
|
198
|
+
sorts: sorts.value,
|
|
199
|
+
limit: limit.value,
|
|
200
|
+
offset: offset.value,
|
|
201
|
+
groupBy: groupBy.value,
|
|
202
|
+
distinct: distinct.value
|
|
203
|
+
})
|
|
204
|
+
} catch (error: any) {
|
|
205
|
+
errorMessage.value = error.response.data?.message || 'Failed to run query'
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
const closeDialog = () => {
|
|
211
|
+
dialogIsOpen.value = false
|
|
212
|
+
resetOutput()
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
const saveQuery = () => {
|
|
216
|
+
let newValue = {
|
|
217
|
+
integration: {
|
|
218
|
+
id: selectedIntegrationId.value,
|
|
219
|
+
type: integration.value.type
|
|
220
|
+
},
|
|
221
|
+
resource: resource.value,
|
|
222
|
+
filters: filters.value,
|
|
223
|
+
sorts: sorts.value,
|
|
224
|
+
limit: limit.value,
|
|
225
|
+
offset: offset.value,
|
|
226
|
+
groupBy: groupBy.value,
|
|
227
|
+
distinct: distinct.value,
|
|
228
|
+
startAt: startAt.value,
|
|
229
|
+
endAt: endAt.value
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
emit('update:modelValue', newValue)
|
|
233
|
+
emit('saved', newValue)
|
|
234
|
+
|
|
235
|
+
closeDialog()
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
defineExpose({
|
|
239
|
+
openDialog
|
|
240
|
+
})
|
|
241
|
+
</script>
|
|
242
|
+
|
|
243
|
+
<template>
|
|
244
|
+
<Dialog v-model:open="dialogIsOpen">
|
|
245
|
+
<DialogTrigger as-child v-if="!noTrigger">
|
|
246
|
+
<slot>
|
|
247
|
+
<Button :disabled="!integrationId && needPredefinedIntegration">
|
|
248
|
+
<span v-if="modelValue">Update Query</span>
|
|
249
|
+
<span v-else>Build Query</span>
|
|
250
|
+
</Button>
|
|
251
|
+
</slot>
|
|
252
|
+
</DialogTrigger>
|
|
253
|
+
<DialogContent class="sm:max-w-xl w-full">
|
|
254
|
+
<DialogHeader>
|
|
255
|
+
<DialogTitle>Query Builder</DialogTitle>
|
|
256
|
+
</DialogHeader>
|
|
257
|
+
<div class="space-y-6 py-4">
|
|
258
|
+
<ResourceSelect v-model="selectedIntegrationId" />
|
|
259
|
+
|
|
260
|
+
<div>
|
|
261
|
+
<Label for="query_builder_dialog_resource" class="block text-sm font-medium text-muted-foreground mb-2">Resource</Label>
|
|
262
|
+
<Input v-model="resource" placeholder="team-building-requests" id="query_builder_dialog_resource" />
|
|
263
|
+
<!-- <Combobox v-model="resource">
|
|
264
|
+
<ComboboxInput placeholder="team-building-requests" />
|
|
265
|
+
<ComboboxList>
|
|
266
|
+
<ComboboxItem v-for="option in resourceOptions" :key="option" :value="option">
|
|
267
|
+
{{ option }}
|
|
268
|
+
</ComboboxItem>
|
|
269
|
+
</ComboboxList>
|
|
270
|
+
</Combobox> -->
|
|
271
|
+
</div>
|
|
272
|
+
|
|
273
|
+
<div id="query_builder_dialog_filters">
|
|
274
|
+
<Label class="block text-sm font-medium text-muted-foreground mb-2">Filters</Label>
|
|
275
|
+
<div class="space-y-2">
|
|
276
|
+
<div v-for="(filter, idx) in filters" :key="idx" class="flex items-center gap-2">
|
|
277
|
+
<Input v-model="filter.field" placeholder="Field" class="w-32 filter-field" />
|
|
278
|
+
<Select v-model="filter.operator">
|
|
279
|
+
<SelectTrigger class="w-[170px]">
|
|
280
|
+
<SelectValue />
|
|
281
|
+
</SelectTrigger>
|
|
282
|
+
<SelectContent>
|
|
283
|
+
<SelectGroup>
|
|
284
|
+
<SelectItem v-for="op in operatorOptions" :key="op.value" :value="op.value">{{ op.label }}</SelectItem>
|
|
285
|
+
</SelectGroup>
|
|
286
|
+
</SelectContent>
|
|
287
|
+
</Select>
|
|
288
|
+
<Input v-model="filter.value" placeholder="Value" class="w-32" />
|
|
289
|
+
<Button variant="ghost" @click="removeFilter(idx)" title="Remove filter">✕</Button>
|
|
290
|
+
</div>
|
|
291
|
+
<Button variant="outline" @click="addFilter">+ Add Filter</Button>
|
|
292
|
+
</div>
|
|
293
|
+
</div>
|
|
294
|
+
|
|
295
|
+
<!-- 3. Sort Section -->
|
|
296
|
+
<div>
|
|
297
|
+
<Label class="block text-sm font-medium text-muted-foreground mb-2">Sort</Label>
|
|
298
|
+
<div class="space-y-2">
|
|
299
|
+
<div v-for="(sort, idx) in sorts" :key="idx" class="flex items-center gap-2">
|
|
300
|
+
<Input v-model="sort.field" placeholder="Sort By" class="w-32" />
|
|
301
|
+
<Select v-model="sort.direction">
|
|
302
|
+
<SelectTrigger class="w-[180px]">
|
|
303
|
+
<SelectValue placeholder="Sort by" />
|
|
304
|
+
</SelectTrigger>
|
|
305
|
+
<SelectContent>
|
|
306
|
+
<SelectGroup>
|
|
307
|
+
<SelectItem value="asc">ASC</SelectItem>
|
|
308
|
+
<SelectItem value="desc">DESC</SelectItem>
|
|
309
|
+
</SelectGroup>
|
|
310
|
+
</SelectContent>
|
|
311
|
+
</Select>
|
|
312
|
+
<Button variant="ghost" @click="removeSort(idx)" title="Remove sort">✕</Button>
|
|
313
|
+
</div>
|
|
314
|
+
<Button variant="outline" @click="addSort">+ Add Sort</Button>
|
|
315
|
+
</div>
|
|
316
|
+
</div>
|
|
317
|
+
|
|
318
|
+
<!-- 4. Advanced Options -->
|
|
319
|
+
<Collapsible v-model="showAdvanced">
|
|
320
|
+
<div class="flex items-center justify-between space-x-4 px-4">
|
|
321
|
+
<h4 class="text-sm font-semibold">
|
|
322
|
+
Advanced Options
|
|
323
|
+
</h4>
|
|
324
|
+
<CollapsibleTrigger as-child>
|
|
325
|
+
<Button variant="ghost" size="sm" class="w-9 p-0">
|
|
326
|
+
<ChevronsUpDown class="size-4" />
|
|
327
|
+
<span class="sr-only">Toggle</span>
|
|
328
|
+
</Button>
|
|
329
|
+
</CollapsibleTrigger>
|
|
330
|
+
</div>
|
|
331
|
+
<CollapsibleContent>
|
|
332
|
+
<div class="grid grid-cols-2 gap-4 mt-2">
|
|
333
|
+
<div>
|
|
334
|
+
<Label for="limit">Limit</Label>
|
|
335
|
+
<Input type="number" v-model="limit" placeholder="Limit" />
|
|
336
|
+
</div>
|
|
337
|
+
<div>
|
|
338
|
+
<Label for="offset">Offset</Label>
|
|
339
|
+
<Input type="number" v-model="offset" placeholder="Offset" />
|
|
340
|
+
</div>
|
|
341
|
+
<div>
|
|
342
|
+
<Label for="startAt">StartAt</Label>
|
|
343
|
+
<Input v-model="startAt" placeholder="StartAt (optional)" />
|
|
344
|
+
</div>
|
|
345
|
+
<div>
|
|
346
|
+
<Label for="endAt">EndAt</Label>
|
|
347
|
+
<Input v-model="endAt" placeholder="EndAt (optional)" />
|
|
348
|
+
</div>
|
|
349
|
+
<div v-if="integration?.type !== 'FIREBASE'">
|
|
350
|
+
<Label for="groupBy">Group By</Label>
|
|
351
|
+
<Input v-model="groupBy" placeholder="Group By" />
|
|
352
|
+
</div>
|
|
353
|
+
<div class="flex items-center gap-2 col-span-2">
|
|
354
|
+
<Checkbox v-model="distinct" id="distinct" />
|
|
355
|
+
<Label for="distinct">DISTINCT</Label>
|
|
356
|
+
</div>
|
|
357
|
+
</div>
|
|
358
|
+
</CollapsibleContent>
|
|
359
|
+
</Collapsible>
|
|
360
|
+
|
|
361
|
+
<!-- 5. Preview & Actions -->
|
|
362
|
+
<div class="space-y-2">
|
|
363
|
+
<div class="flex gap-2 mb-4">
|
|
364
|
+
<Button @click="previewQuery">Preview Query</Button>
|
|
365
|
+
<Button variant="secondary" @click="runQuery">Run Query</Button>
|
|
366
|
+
</div>
|
|
367
|
+
<div v-if="queryPreview" class="bg-gray-100/10 rounded p-2 text-xs font-mono text-gray-300 border border-gray-500">
|
|
368
|
+
{{ queryPreview }}
|
|
369
|
+
</div>
|
|
370
|
+
|
|
371
|
+
<div v-if="queryResult" class="bg-green-100/10 rounded p-2 text-xs font-bold text-green-500 border border-green-500">
|
|
372
|
+
{{ queryResult }}
|
|
373
|
+
</div>
|
|
374
|
+
|
|
375
|
+
<div class="flex gap-2 flex-col bg-red-100/10 rounded-lg p-4 pt-3 border border-red-500" v-if="errorMessage">
|
|
376
|
+
<p class="text-red-500 text-xs font-bold mb-1">{{ errorMessage }}</p>
|
|
377
|
+
<a v-if="indexUrl" :href="indexUrl" target="_blank">
|
|
378
|
+
<Button size="sm">Create index in Firebase Console <ExternalLink class="size-3.5 ml-0.5" /></Button>
|
|
379
|
+
</a>
|
|
380
|
+
</div>
|
|
381
|
+
</div>
|
|
382
|
+
</div>
|
|
383
|
+
<DialogFooter>
|
|
384
|
+
<Button variant="ghost" @click="closeDialog">Close</Button>
|
|
385
|
+
<Button @click="saveQuery">Save Query</Button>
|
|
386
|
+
</DialogFooter>
|
|
387
|
+
</DialogContent>
|
|
388
|
+
</Dialog>
|
|
389
|
+
</template>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as QueryBuilderDialog } from './QueryBuilderDialog.vue'
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { cn } from '../../../lib/utils'
|
|
3
|
+
import { RadioGroupRoot, type RadioGroupRootEmits, type RadioGroupRootProps, useForwardPropsEmits } from 'reka-ui'
|
|
4
|
+
import { computed, type HTMLAttributes } from 'vue'
|
|
5
|
+
|
|
6
|
+
const props = defineProps<RadioGroupRootProps & { class?: HTMLAttributes['class'], orientation?: 'vertical' | 'horizontal' }>()
|
|
7
|
+
const emits = defineEmits<RadioGroupRootEmits>()
|
|
8
|
+
|
|
9
|
+
const delegatedProps = computed(() => {
|
|
10
|
+
const { class: _, ...delegated } = props
|
|
11
|
+
|
|
12
|
+
return delegated
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<RadioGroupRoot
|
|
20
|
+
data-slot="radio-group"
|
|
21
|
+
:class="cn(
|
|
22
|
+
'flex gap-3',
|
|
23
|
+
props.orientation === 'vertical' ? 'flex-col' : 'flex-row',
|
|
24
|
+
props.class
|
|
25
|
+
)"
|
|
26
|
+
v-bind="forwarded"
|
|
27
|
+
>
|
|
28
|
+
<slot />
|
|
29
|
+
</RadioGroupRoot>
|
|
30
|
+
</template>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { RadioGroupItemProps } from 'reka-ui'
|
|
3
|
+
import type { HTMLAttributes } from 'vue'
|
|
4
|
+
import { cn } from '../../../lib/utils'
|
|
5
|
+
import { CircleIcon } from 'lucide-vue-next'
|
|
6
|
+
import {
|
|
7
|
+
RadioGroupIndicator,
|
|
8
|
+
RadioGroupItem,
|
|
9
|
+
|
|
10
|
+
useForwardProps,
|
|
11
|
+
} from 'reka-ui'
|
|
12
|
+
import { computed } from 'vue'
|
|
13
|
+
|
|
14
|
+
const props = defineProps<RadioGroupItemProps & { class?: HTMLAttributes['class'] }>()
|
|
15
|
+
|
|
16
|
+
const delegatedProps = computed(() => {
|
|
17
|
+
const { class: _, ...delegated } = props
|
|
18
|
+
|
|
19
|
+
return delegated
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
const forwardedProps = useForwardProps(delegatedProps)
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<template>
|
|
26
|
+
<RadioGroupItem
|
|
27
|
+
data-slot="radio-group-item"
|
|
28
|
+
v-bind="forwardedProps"
|
|
29
|
+
:class="
|
|
30
|
+
cn(
|
|
31
|
+
'border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50',
|
|
32
|
+
props.class,
|
|
33
|
+
)
|
|
34
|
+
"
|
|
35
|
+
>
|
|
36
|
+
<RadioGroupIndicator
|
|
37
|
+
data-slot="radio-group-indicator"
|
|
38
|
+
class="relative flex items-center justify-center"
|
|
39
|
+
>
|
|
40
|
+
<CircleIcon class="fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2" />
|
|
41
|
+
</RadioGroupIndicator>
|
|
42
|
+
</RadioGroupItem>
|
|
43
|
+
</template>
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import type { HTMLAttributes } from 'vue'
|
|
3
|
+
import { reactiveOmit } from '@vueuse/core'
|
|
4
|
+
import { RangeCalendarRoot, type RangeCalendarRootEmits, type RangeCalendarRootProps, useForwardPropsEmits } from 'reka-ui'
|
|
5
|
+
import { cn } from '../../../lib/utils'
|
|
6
|
+
import { RangeCalendarCell, RangeCalendarCellTrigger, RangeCalendarGrid, RangeCalendarGridBody, RangeCalendarGridHead, RangeCalendarGridRow, RangeCalendarHeadCell, RangeCalendarHeader, RangeCalendarHeading, RangeCalendarNextButton, RangeCalendarPrevButton } from '.'
|
|
7
|
+
|
|
8
|
+
const props = defineProps<RangeCalendarRootProps & { class?: HTMLAttributes['class'] }>()
|
|
9
|
+
|
|
10
|
+
const emits = defineEmits<RangeCalendarRootEmits>()
|
|
11
|
+
|
|
12
|
+
const delegatedProps = reactiveOmit(props, 'class')
|
|
13
|
+
|
|
14
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<template>
|
|
18
|
+
<RangeCalendarRoot
|
|
19
|
+
v-slot="{ grid, weekDays }"
|
|
20
|
+
:class="cn('p-3', props.class)"
|
|
21
|
+
v-bind="forwarded"
|
|
22
|
+
>
|
|
23
|
+
<RangeCalendarHeader>
|
|
24
|
+
<RangeCalendarPrevButton />
|
|
25
|
+
<RangeCalendarHeading />
|
|
26
|
+
<RangeCalendarNextButton />
|
|
27
|
+
</RangeCalendarHeader>
|
|
28
|
+
|
|
29
|
+
<div class="flex flex-col gap-y-4 mt-4 sm:flex-row sm:gap-x-4 sm:gap-y-0">
|
|
30
|
+
<RangeCalendarGrid v-for="month in grid" :key="month.value.toString()">
|
|
31
|
+
<RangeCalendarGridHead>
|
|
32
|
+
<RangeCalendarGridRow>
|
|
33
|
+
<RangeCalendarHeadCell
|
|
34
|
+
v-for="day in weekDays" :key="day"
|
|
35
|
+
>
|
|
36
|
+
{{ day }}
|
|
37
|
+
</RangeCalendarHeadCell>
|
|
38
|
+
</RangeCalendarGridRow>
|
|
39
|
+
</RangeCalendarGridHead>
|
|
40
|
+
<RangeCalendarGridBody>
|
|
41
|
+
<RangeCalendarGridRow v-for="(weekDates, index) in month.rows" :key="`weekDate-${index}`" class="mt-2 w-full">
|
|
42
|
+
<RangeCalendarCell
|
|
43
|
+
v-for="weekDate in weekDates"
|
|
44
|
+
:key="weekDate.toString()"
|
|
45
|
+
:date="weekDate"
|
|
46
|
+
>
|
|
47
|
+
<RangeCalendarCellTrigger
|
|
48
|
+
:day="weekDate"
|
|
49
|
+
:month="month.value"
|
|
50
|
+
/>
|
|
51
|
+
</RangeCalendarCell>
|
|
52
|
+
</RangeCalendarGridRow>
|
|
53
|
+
</RangeCalendarGridBody>
|
|
54
|
+
</RangeCalendarGrid>
|
|
55
|
+
</div>
|
|
56
|
+
</RangeCalendarRoot>
|
|
57
|
+
</template>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import type { HTMLAttributes } from 'vue'
|
|
3
|
+
import { reactiveOmit } from '@vueuse/core'
|
|
4
|
+
import { RangeCalendarCell, type RangeCalendarCellProps, useForwardProps } from 'reka-ui'
|
|
5
|
+
import { cn } from '../../../lib/utils'
|
|
6
|
+
|
|
7
|
+
const props = defineProps<RangeCalendarCellProps & { class?: HTMLAttributes['class'] }>()
|
|
8
|
+
|
|
9
|
+
const delegatedProps = reactiveOmit(props, 'class')
|
|
10
|
+
|
|
11
|
+
const forwardedProps = useForwardProps(delegatedProps)
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<RangeCalendarCell
|
|
16
|
+
:class="cn('relative h-9 w-9 p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([data-selected])]:bg-accent first:[&:has([data-selected])]:rounded-l-md last:[&:has([data-selected])]:rounded-r-md [&:has([data-selected][data-outside-view])]:bg-accent/50 [&:has([data-selected][data-selection-end])]:rounded-r-md [&:has([data-selected][data-selection-start])]:rounded-l-md', props.class)"
|
|
17
|
+
v-bind="forwardedProps"
|
|
18
|
+
>
|
|
19
|
+
<slot />
|
|
20
|
+
</RangeCalendarCell>
|
|
21
|
+
</template>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import type { HTMLAttributes } from 'vue'
|
|
3
|
+
import { reactiveOmit } from '@vueuse/core'
|
|
4
|
+
import { RangeCalendarCellTrigger, type RangeCalendarCellTriggerProps, useForwardProps } from 'reka-ui'
|
|
5
|
+
import { cn } from '../../../lib/utils'
|
|
6
|
+
import { buttonVariants } from '../button'
|
|
7
|
+
|
|
8
|
+
const props = defineProps<RangeCalendarCellTriggerProps & { class?: HTMLAttributes['class'] }>()
|
|
9
|
+
|
|
10
|
+
const delegatedProps = reactiveOmit(props, 'class')
|
|
11
|
+
|
|
12
|
+
const forwardedProps = useForwardProps(delegatedProps)
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<RangeCalendarCellTrigger
|
|
17
|
+
:class="cn(
|
|
18
|
+
buttonVariants({ variant: 'ghost' }),
|
|
19
|
+
'h-9 w-9 p-0 font-normal data-[selected]:opacity-100',
|
|
20
|
+
'[&[data-today]:not([data-selected])]:bg-accent [&[data-today]:not([data-selected])]:text-accent-foreground',
|
|
21
|
+
// Selection Start
|
|
22
|
+
'data-[selection-start]:bg-primary data-[selection-start]:text-primary-foreground data-[selection-start]:hover:bg-primary data-[selection-start]:hover:text-primary-foreground data-[selection-start]:focus:bg-primary data-[selection-start]:focus:text-primary-foreground',
|
|
23
|
+
// Selection End
|
|
24
|
+
'data-[selection-end]:bg-primary data-[selection-end]:text-primary-foreground data-[selection-end]:hover:bg-primary data-[selection-end]:hover:text-primary-foreground data-[selection-end]:focus:bg-primary data-[selection-end]:focus:text-primary-foreground',
|
|
25
|
+
// Outside months
|
|
26
|
+
'data-[outside-view]:text-muted-foreground data-[outside-view]:opacity-50 [&[data-outside-view][data-selected]]:bg-accent/50 [&[data-outside-view][data-selected]]:text-muted-foreground [&[data-outside-view][data-selected]]:opacity-30',
|
|
27
|
+
// Disabled
|
|
28
|
+
'data-[disabled]:text-muted-foreground data-[disabled]:opacity-50',
|
|
29
|
+
// Unavailable
|
|
30
|
+
'data-[unavailable]:text-destructive-foreground data-[unavailable]:line-through',
|
|
31
|
+
props.class,
|
|
32
|
+
)"
|
|
33
|
+
v-bind="forwardedProps"
|
|
34
|
+
>
|
|
35
|
+
<slot />
|
|
36
|
+
</RangeCalendarCellTrigger>
|
|
37
|
+
</template>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import type { HTMLAttributes } from 'vue'
|
|
3
|
+
import { reactiveOmit } from '@vueuse/core'
|
|
4
|
+
import { RangeCalendarGrid, type RangeCalendarGridProps, useForwardProps } from 'reka-ui'
|
|
5
|
+
import { cn } from '../../../lib/utils'
|
|
6
|
+
|
|
7
|
+
const props = defineProps<RangeCalendarGridProps & { class?: HTMLAttributes['class'] }>()
|
|
8
|
+
|
|
9
|
+
const delegatedProps = reactiveOmit(props, 'class')
|
|
10
|
+
|
|
11
|
+
const forwardedProps = useForwardProps(delegatedProps)
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<RangeCalendarGrid
|
|
16
|
+
:class="cn('w-full border-collapse space-y-1', props.class)"
|
|
17
|
+
v-bind="forwardedProps"
|
|
18
|
+
>
|
|
19
|
+
<slot />
|
|
20
|
+
</RangeCalendarGrid>
|
|
21
|
+
</template>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { RangeCalendarGridBody, type RangeCalendarGridBodyProps } from 'reka-ui'
|
|
3
|
+
|
|
4
|
+
const props = defineProps<RangeCalendarGridBodyProps>()
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<RangeCalendarGridBody v-bind="props">
|
|
9
|
+
<slot />
|
|
10
|
+
</RangeCalendarGridBody>
|
|
11
|
+
</template>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { RangeCalendarGridHead, type RangeCalendarGridHeadProps } from 'reka-ui'
|
|
3
|
+
|
|
4
|
+
const props = defineProps<RangeCalendarGridHeadProps>()
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<RangeCalendarGridHead v-bind="props">
|
|
9
|
+
<slot />
|
|
10
|
+
</RangeCalendarGridHead>
|
|
11
|
+
</template>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import type { HTMLAttributes } from 'vue'
|
|
3
|
+
import { reactiveOmit } from '@vueuse/core'
|
|
4
|
+
import { RangeCalendarGridRow, type RangeCalendarGridRowProps, useForwardProps } from 'reka-ui'
|
|
5
|
+
import { cn } from '../../../lib/utils'
|
|
6
|
+
|
|
7
|
+
const props = defineProps<RangeCalendarGridRowProps & { class?: HTMLAttributes['class'] }>()
|
|
8
|
+
|
|
9
|
+
const delegatedProps = reactiveOmit(props, 'class')
|
|
10
|
+
|
|
11
|
+
const forwardedProps = useForwardProps(delegatedProps)
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<RangeCalendarGridRow :class="cn('flex mt-2 w-full', props.class)" v-bind="forwardedProps">
|
|
16
|
+
<slot />
|
|
17
|
+
</RangeCalendarGridRow>
|
|
18
|
+
</template>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import type { HTMLAttributes } from 'vue'
|
|
3
|
+
import { reactiveOmit } from '@vueuse/core'
|
|
4
|
+
import { RangeCalendarHeadCell, type RangeCalendarHeadCellProps, useForwardProps } from 'reka-ui'
|
|
5
|
+
import { cn } from '../../../lib/utils'
|
|
6
|
+
|
|
7
|
+
const props = defineProps<RangeCalendarHeadCellProps & { class?: HTMLAttributes['class'] }>()
|
|
8
|
+
|
|
9
|
+
const delegatedProps = reactiveOmit(props, 'class')
|
|
10
|
+
|
|
11
|
+
const forwardedProps = useForwardProps(delegatedProps)
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<RangeCalendarHeadCell :class="cn('w-9 rounded-md text-[0.8rem] font-normal text-muted-foreground', props.class)" v-bind="forwardedProps">
|
|
16
|
+
<slot />
|
|
17
|
+
</RangeCalendarHeadCell>
|
|
18
|
+
</template>
|