code
stringlengths
1
1.05M
repo_name
stringlengths
6
83
path
stringlengths
3
242
language
stringclasses
222 values
license
stringclasses
20 values
size
int64
1
1.05M
import * as React from "react" import { cva, type VariantProps } from "class-variance-authority" import { cn } from "@/lib/utils" const alertVariants = cva( "relative w-full rounded-lg border px-4 py-3 text-sm [&:has(svg)]:pl-11 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:te...
2302_79757062/commit
dashboard/src/components/ui/alert.tsx
TSX
agpl-3.0
1,602
import * as React from "react" import * as AvatarPrimitive from "@radix-ui/react-avatar" import { cn } from "@/lib/utils" const Avatar = React.forwardRef< React.ElementRef<typeof AvatarPrimitive.Root>, React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root> >(({ className, ...props }, ref) => ( <AvatarPrimi...
2302_79757062/commit
dashboard/src/components/ui/avatar.tsx
TSX
agpl-3.0
1,405
import * as React from "react" import { cva, type VariantProps } from "class-variance-authority" import { cn } from "@/lib/utils" const badgeVariants = cva( "inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-of...
2302_79757062/commit
dashboard/src/components/ui/badge.tsx
TSX
agpl-3.0
1,140
import * as React from "react" import { Slot } from "@radix-ui/react-slot" import { cva, type VariantProps } from "class-variance-authority" import { cn } from "@/lib/utils" const buttonVariants = cva( "inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-no...
2302_79757062/commit
dashboard/src/components/ui/button.tsx
TSX
agpl-3.0
1,818
import * as React from "react" import { cn } from "@/lib/utils" const Card = React.forwardRef< HTMLDivElement, React.HTMLAttributes<HTMLDivElement> >(({ className, ...props }, ref) => ( <div ref={ref} className={cn( "rounded-xl border bg-card text-card-foreground shadow", className )} ...
2302_79757062/commit
dashboard/src/components/ui/card.tsx
TSX
agpl-3.0
1,848
import * as React from "react" import * as CheckboxPrimitive from "@radix-ui/react-checkbox" import { CheckIcon } from "@radix-ui/react-icons" import { cn } from "@/lib/utils" const Checkbox = React.forwardRef< React.ElementRef<typeof CheckboxPrimitive.Root>, React.ComponentPropsWithoutRef<typeof CheckboxPrimitiv...
2302_79757062/commit
dashboard/src/components/ui/checkbox.tsx
TSX
agpl-3.0
1,029
import * as React from "react" import { DialogProps } from "@radix-ui/react-dialog" import { MagnifyingGlassIcon } from "@radix-ui/react-icons" import { Command as CommandPrimitive } from "cmdk" import { cn } from "@/lib/utils" import { Dialog, DialogContent } from "@/components/ui/dialog" const Command = React.forwa...
2302_79757062/commit
dashboard/src/components/ui/command.tsx
TSX
agpl-3.0
4,873
import * as React from "react" import * as DialogPrimitive from "@radix-ui/react-dialog" import { Cross2Icon } from "@radix-ui/react-icons" import { cn } from "@/lib/utils" const Dialog = DialogPrimitive.Root const DialogTrigger = DialogPrimitive.Trigger const DialogPortal = ({ className, ...props }: DialogPrim...
2302_79757062/commit
dashboard/src/components/ui/dialog.tsx
TSX
agpl-3.0
3,979
import * as React from "react" import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu" import { CheckIcon, ChevronRightIcon, DotFilledIcon, } from "@radix-ui/react-icons" import { cn } from "@/lib/utils" const DropdownMenu = DropdownMenuPrimitive.Root const DropdownMenuTrigger = DropdownMenuPrim...
2302_79757062/commit
dashboard/src/components/ui/dropdown-menu.tsx
TSX
agpl-3.0
7,352
import * as React from "react" import * as LabelPrimitive from "@radix-ui/react-label" import { Slot } from "@radix-ui/react-slot" import { Controller, ControllerProps, FieldPath, FieldValues, FormProvider, useFormContext, } from "react-hook-form" import { cn } from "@/lib/utils" import { Label } from "@/c...
2302_79757062/commit
dashboard/src/components/ui/form.tsx
TSX
agpl-3.0
4,097
import * as React from "react" import * as HoverCardPrimitive from "@radix-ui/react-hover-card" import { cn } from "@/lib/utils" const HoverCard = HoverCardPrimitive.Root const HoverCardTrigger = HoverCardPrimitive.Trigger const HoverCardContent = React.forwardRef< React.ElementRef<typeof HoverCardPrimitive.Conte...
2302_79757062/commit
dashboard/src/components/ui/hover-card.tsx
TSX
agpl-3.0
1,184
import * as React from "react" import { cn } from "@/lib/utils" export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {} const Input = React.forwardRef<HTMLInputElement, InputProps>( ({ className, type, ...props }, ref) => { return ( <input type={type} classNam...
2302_79757062/commit
dashboard/src/components/ui/input.tsx
TSX
agpl-3.0
800
import * as React from "react" import * as LabelPrimitive from "@radix-ui/react-label" import { cva, type VariantProps } from "class-variance-authority" import { cn } from "@/lib/utils" const labelVariants = cva( "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" ) const L...
2302_79757062/commit
dashboard/src/components/ui/label.tsx
TSX
agpl-3.0
710
import * as React from "react" import * as PopoverPrimitive from "@radix-ui/react-popover" import { cn } from "@/lib/utils" const Popover = PopoverPrimitive.Root const PopoverTrigger = PopoverPrimitive.Trigger const PopoverContent = React.forwardRef< React.ElementRef<typeof PopoverPrimitive.Content>, React.Comp...
2302_79757062/commit
dashboard/src/components/ui/popover.tsx
TSX
agpl-3.0
1,230
import * as React from "react" import * as ProgressPrimitive from "@radix-ui/react-progress" import { cn } from "@/lib/utils" const Progress = React.forwardRef< React.ElementRef<typeof ProgressPrimitive.Root>, React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root> >(({ className, value, ...props }, ref) =>...
2302_79757062/commit
dashboard/src/components/ui/progress.tsx
TSX
agpl-3.0
778
import * as React from "react" import { CheckIcon } from "@radix-ui/react-icons" import * as RadioGroupPrimitive from "@radix-ui/react-radio-group" import { cn } from "@/lib/utils" const RadioGroup = React.forwardRef< React.ElementRef<typeof RadioGroupPrimitive.Root>, React.ComponentPropsWithoutRef<typeof RadioGr...
2302_79757062/commit
dashboard/src/components/ui/radio-group.tsx
TSX
agpl-3.0
1,435
import * as React from "react" import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area" import { cn } from "@/lib/utils" const ScrollArea = React.forwardRef< React.ElementRef<typeof ScrollAreaPrimitive.Root>, React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root> >(({ className, children, ...pr...
2302_79757062/commit
dashboard/src/components/ui/scroll-area.tsx
TSX
agpl-3.0
1,633
import * as React from "react" import { CaretSortIcon, CheckIcon } from "@radix-ui/react-icons" import * as SelectPrimitive from "@radix-ui/react-select" import { cn } from "@/lib/utils" const Select = SelectPrimitive.Root const SelectGroup = SelectPrimitive.Group const SelectValue = SelectPrimitive.Value const Se...
2302_79757062/commit
dashboard/src/components/ui/select.tsx
TSX
agpl-3.0
4,361
import * as React from "react" import * as SeparatorPrimitive from "@radix-ui/react-separator" import { cn } from "@/lib/utils" const Separator = React.forwardRef< React.ElementRef<typeof SeparatorPrimitive.Root>, React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root> >( ( { className, orientation =...
2302_79757062/commit
dashboard/src/components/ui/separator.tsx
TSX
agpl-3.0
756
import * as React from "react" import * as SheetPrimitive from "@radix-ui/react-dialog" import { Cross2Icon } from "@radix-ui/react-icons" import { cva, type VariantProps } from "class-variance-authority" import { cn } from "@/lib/utils" const Sheet = SheetPrimitive.Root const SheetTrigger = SheetPrimitive.Trigger ...
2302_79757062/commit
dashboard/src/components/ui/sheet.tsx
TSX
agpl-3.0
4,457
import { cn } from "@/lib/utils" function Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) { return ( <div className={cn("animate-pulse rounded-md bg-primary/10", className)} {...props} /> ) } export { Skeleton }
2302_79757062/commit
dashboard/src/components/ui/skeleton.tsx
TSX
agpl-3.0
266
import * as React from "react" import { cn } from "@/lib/utils" const Table = React.forwardRef< HTMLTableElement, React.HTMLAttributes<HTMLTableElement> >(({ className, ...props }, ref) => ( <div className="w-full overflow-auto"> <table ref={ref} className={cn("w-full caption-bottom text-sm", cl...
2302_79757062/commit
dashboard/src/components/ui/table.tsx
TSX
agpl-3.0
2,823
import * as React from "react" import * as TabsPrimitive from "@radix-ui/react-tabs" import { cn } from "@/lib/utils" const Tabs = TabsPrimitive.Root const TabsList = React.forwardRef< React.ElementRef<typeof TabsPrimitive.List>, React.ComponentPropsWithoutRef<typeof TabsPrimitive.List> >(({ className, ...props ...
2302_79757062/commit
dashboard/src/components/ui/tabs.tsx
TSX
agpl-3.0
1,877
import * as React from "react" import { cn } from "@/lib/utils" export interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {} const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>( ({ className, ...props }, ref) => { return ( <textarea className={cn...
2302_79757062/commit
dashboard/src/components/ui/textArea.tsx
TSX
agpl-3.0
732
import * as React from "react" import { Cross2Icon } from "@radix-ui/react-icons" import * as ToastPrimitives from "@radix-ui/react-toast" import { cva, type VariantProps } from "class-variance-authority" import { cn } from "@/lib/utils" const ToastProvider = ToastPrimitives.Provider const ToastViewport = React.forw...
2302_79757062/commit
dashboard/src/components/ui/toast.tsx
TSX
agpl-3.0
4,829
import { Toast, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, } from "@/components/ui/toast" import { useToast } from "@/components/ui/use-toast" export function Toaster() { const { toasts } = useToast() return ( <ToastProvider> {toasts.map(function ({ id, title, de...
2302_79757062/commit
dashboard/src/components/ui/toaster.tsx
TSX
agpl-3.0
780
import * as React from "react" import * as TooltipPrimitive from "@radix-ui/react-tooltip" import { cn } from "@/lib/utils" const TooltipProvider = TooltipPrimitive.Provider const Tooltip = TooltipPrimitive.Root const TooltipTrigger = TooltipPrimitive.Trigger const TooltipContent = React.forwardRef< React.Elemen...
2302_79757062/commit
dashboard/src/components/ui/tooltip.tsx
TSX
agpl-3.0
1,128
// Inspired by react-hot-toast library import * as React from "react" import type { ToastActionElement, ToastProps, } from "@/components/ui/toast" const TOAST_LIMIT = 1 const TOAST_REMOVE_DELAY = 1000000 type ToasterToast = ToastProps & { id: string title?: React.ReactNode description?: React.ReactNode a...
2302_79757062/commit
dashboard/src/components/ui/use-toast.ts
TypeScript
agpl-3.0
3,927
import moment from "moment" import { Moment } from "moment-timezone" /** * Converts a Frappe timestamp to a readable time ago string * @param timestamp A frappe timestamp string in the format YYYY-MM-DD HH:mm:ss * @param withoutSuffix remove the suffix from the time ago string * @returns */ export const convertF...
2302_79757062/commit
dashboard/src/components/utils/dateconversion.ts
TypeScript
agpl-3.0
977
const host = window.location.hostname; const web_port = window.location.port ? `:${window.location.port}` : ''; const protocol = web_port ? 'http' : 'https'; export const web_url = `${protocol}://${host}${web_port}`;
2302_79757062/commit
dashboard/src/config/socket.ts
TypeScript
agpl-3.0
217
import { useState, useEffect } from 'react'; /** * Hook to debounce a value * @param value Value to be debounced * @param delay Delay in milliseconds (default 200) * @returns Debounced value */ export const useDebounce = <T = any>(value: T, delay = 200): T => { const [debouncedValue, setDebouncedValue] = use...
2302_79757062/commit
dashboard/src/hooks/useDebounce.ts
TypeScript
agpl-3.0
580
import { FrappeConfig, FrappeContext, useFrappeGetCall } from "frappe-react-sdk" import { useContext } from "react" export const useGetDoctypeMeta = (doctype: string, with_parent: 0 | 1 = 1, cached_timestamp?: Date) => { //@ts-ignore const localData = locals?.['DocType']?.[doctype] || null const { data, e...
2302_79757062/commit
dashboard/src/hooks/useGetDoctypeMeta.ts
TypeScript
agpl-3.0
4,549
@tailwind base; @tailwind components; @tailwind utilities; @layer base { :root { --background: 0 0% 100%; --foreground: 222.2 84% 4.9%; --muted: 210 40% 96.1%; --muted-foreground: 215.4 16.3% 46.9%; --popover: 0 0% 100%; --popover-foreground: 222.2 84% 4.9%; --card: 0 0% 100%; ...
2302_79757062/commit
dashboard/src/index.css
CSS
agpl-3.0
1,603
import { type ClassValue, clsx } from "clsx" import { twMerge } from "tailwind-merge" import moment from "moment-timezone" export function cn(...inputs: ClassValue[]) { return twMerge(clsx(inputs)) } export const convertStringDateToMoment = (date: string) => { if (date) { return moment(date, 'YYYY/MM/DD') ...
2302_79757062/commit
dashboard/src/lib/utils.ts
TypeScript
agpl-3.0
543
import React from 'react' import ReactDOM from 'react-dom/client' import App from './App.tsx' import './index.css' import { Toaster } from './components/ui/toaster.tsx' import './utils/namespace' if (import.meta.env.DEV) { fetch('/api/method/commit.www.commit.get_context_for_dev', { method: 'POST', }) .th...
2302_79757062/commit
dashboard/src/main.tsx
TSX
agpl-3.0
812
import { Button } from "@/components/ui/button"; import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuTrigger } from "@/components/ui/dropdown-menu"; import { DocField } from "@/types/Core/DocField"; import { DotsHorizontalIcon } from "@radix-ui/react-icons"; import { useState } ...
2302_79757062/commit
dashboard/src/pages/features/TableDrawer/FieldTable/FieldActionButton.tsx
TSX
agpl-3.0
1,337
import CopyButton from "@/components/common/CopyToClipboard/CopyToClipboard" import { Badge } from "@/components/ui/badge" import { Button } from "@/components/ui/button" import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle } from "@/components/ui/dialog" import { convertFrappeTim...
2302_79757062/commit
dashboard/src/pages/features/TableDrawer/FieldTable/FieldModal.tsx
TSX
agpl-3.0
15,963
import { Badge } from "@/components/ui/badge" import { Button } from "@/components/ui/button" import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator } from "@/components/ui/command" import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover" import {...
2302_79757062/commit
dashboard/src/pages/features/TableDrawer/FieldTable/FieldTypeFilters.tsx
TSX
agpl-3.0
7,276
import { ICON_KEY_MAP } from "@/components/common/Icons" export interface FieldTypeOptionsType { label: string value: string icon?: React.ComponentType<{ className?: string }> } export type ICON_KEY = 'Autocomplete' | 'Attach' | 'Attach Image' | 'Check' | 'Color' | 'Currency' | 'Data' | 'Date' | 'Datetime...
2302_79757062/commit
dashboard/src/pages/features/TableDrawer/FieldTable/FieldTypeOptions.ts
TypeScript
agpl-3.0
3,741
import { ChevronDownIcon, } from "@radix-ui/react-icons" import { ColumnDef, ColumnFiltersState, SortingState, VisibilityState, flexRender, getCoreRowModel, getFilteredRowModel, getSortedRowModel, getFacetedUniqueValues, useReactTable, } from "@tanstack/react-table" import ...
2302_79757062/commit
dashboard/src/pages/features/TableDrawer/FieldTable/FieldsTable.tsx
TSX
agpl-3.0
10,561
import { Badge } from "@/components/ui/badge" import { DocField } from "@/types/Core/DocField" export const OptionsComponent = ({ field }: { field: DocField }) => { if (field.fieldtype === 'Link' || field.fieldtype === 'Table' || field.fieldtype === 'Table MultiSelect') { return <div className='flex flex-r...
2302_79757062/commit
dashboard/src/pages/features/TableDrawer/FieldTable/IconTextComponent.tsx
TSX
agpl-3.0
1,645
import { Button } from "@/components/ui/button"; import { Checkbox } from "@/components/ui/checkbox"; import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuTrigger } from "@/components/ui/dropdown-menu"; import { Table, TableHeader, TableRow, TableHead, TableBody, TableCell } from "@/compone...
2302_79757062/commit
dashboard/src/pages/features/TableDrawer/LinkTable/LinkTable.tsx
TSX
agpl-3.0
6,679
import { LinkIcon, XMarkIcon } from '@heroicons/react/24/outline' import { useFrappeGetCall } from "frappe-react-sdk" import { DocType } from "@/types/Core/DocType" import { convertFrappeTimestampToReadableDate } from '@/lib/utils' import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs" import {...
2302_79757062/commit
dashboard/src/pages/features/TableDrawer/MetaTableDrawer.tsx
TSX
agpl-3.0
6,220
import { Button } from "@/components/ui/button"; import { Checkbox } from "@/components/ui/checkbox"; import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuTrigger } from "@/components/ui/dropdown-menu"; import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/compone...
2302_79757062/commit
dashboard/src/pages/features/TableDrawer/PermissionsTable/PermissionsTable.tsx
TSX
agpl-3.0
8,864
// import { Dialog, Transition } from '@headlessui/react' import { LinkIcon, XMarkIcon } from '@heroicons/react/24/outline' import { useFrappeGetCall } from "frappe-react-sdk" import { DocType } from "@/types/Core/DocType" import { convertFrappeTimestampToReadableDate } from '@/lib/utils' import { Tabs, TabsContent, Ta...
2302_79757062/commit
dashboard/src/pages/features/TableDrawer/TableDrawer.tsx
TSX
agpl-3.0
6,367
import { APIDetails } from "@/components/features/api_viewer/APIDetails" import { APIList } from "@/components/features/api_viewer/APIList" import { useState } from "react" import { useFrappeGetCall } from "frappe-react-sdk" import { APIData } from "@/types/APIData" import { useParams } from "react-router-dom" import {...
2302_79757062/commit
dashboard/src/pages/features/api_viewer/APIViewer.tsx
TSX
agpl-3.0
3,129
import { ErrorBanner } from "@/components/common/ErrorBanner/ErrorBanner" import { FullPageLoader } from "@/components/common/FullPageLoader/FullPageLoader" import { Header } from "@/components/common/Header" import { APIDetails } from "@/components/features/api_viewer/APIDetails" import { APIList } from "@/components/...
2302_79757062/commit
dashboard/src/pages/features/api_viewer/AppAPIViewer.tsx
TSX
agpl-3.0
2,772
import { FullPageLoader } from "@/components/common/FullPageLoader/FullPageLoader" import { PostgresRelationship, PostgresTable } from "@/types/Table" import { useFrappePostCall } from "frappe-react-sdk" import { Graph } from "./Graph" import { useEffect, useState } from "react" import { ErrorBanner } from "@/component...
2302_79757062/commit
dashboard/src/pages/features/erd/ERDForDoctypes.tsx
TSX
agpl-3.0
1,653
import { FullPageLoader } from "@/components/common/FullPageLoader/FullPageLoader" import { Button } from "@/components/ui/button" import { Checkbox } from "@/components/ui/checkbox" import { AppModuleData } from "@/types/CommitProjectBranch" import { Dialog, Transition } from "@headlessui/react" import { XMarkIcon } f...
2302_79757062/commit
dashboard/src/pages/features/erd/ERDViewer.tsx
TSX
agpl-3.0
13,773
import dagre from '@dagrejs/dagre' import { FC, useCallback, useEffect, useMemo, useState } from 'react' import '../../../styles/flow.css' import ReactFlow, { Background, Controls, Edge, Node, Position, ReactFlowProvider, useReactFlow, MarkerType, ControlButton, getConnectedEdges...
2302_79757062/commit
dashboard/src/pages/features/erd/Graph.tsx
TSX
agpl-3.0
12,457
export function Markers() { return ( <svg style={{ position: "absolute", top: 0, left: 0 }}> <defs> <marker id="hasMany" viewBox="0 0 10 13" markerHeight="10" markerWidth="13" refX="10" refY="6.5" fill="none"> <path d="M10 12C2.57803 12 0.909955 8.66667 1.00367 7" stroke="#B1B1B6" /> ...
2302_79757062/commit
dashboard/src/pages/features/erd/Markers.tsx
TSX
agpl-3.0
3,625
import { ICON_KEY, ICON_KEY_MAP } from "@/components/common/Icons"; import { PostgresColumn } from "@/types/Table"; import { Arrow, HoverCardContent } from "@radix-ui/react-hover-card"; // import { AiOutlineLink } from "react-icons/ai"; export const TableHoverCard = ({ column }: { column: PostgresColumn }) => { ...
2302_79757062/commit
dashboard/src/pages/features/erd/TableHoverCard.tsx
TSX
agpl-3.0
1,339
import { PostgresTable } from "@/types/Table"; import { NodeProps, Handle, useReactFlow } from "reactflow"; import { NODE_WIDTH } from "./Graph"; import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip"; import { XMarkIcon } from '@heroicons/react/24/outline' import { cn } from...
2302_79757062/commit
dashboard/src/pages/features/erd/TableNode.tsx
TSX
agpl-3.0
3,651
import { Header } from "@/components/common/Header" import { Button } from "@/components/ui/button" import { Dialog, Transition } from "@headlessui/react" import { Fragment, useEffect, useRef, useState } from "react" import { XMarkIcon } from "@heroicons/react/20/solid" import { ErrorBanner } from "@/components/common/...
2302_79757062/commit
dashboard/src/pages/features/erd/meta/CreateERDForMeta.tsx
TSX
agpl-3.0
10,704
import { ErrorBanner } from "@/components/common/ErrorBanner/ErrorBanner"; import { FullPageLoader } from "@/components/common/FullPageLoader/FullPageLoader"; import { ProjectData } from "@/components/features/projects/Projects"; import { ViewERDProjectCard } from "@/components/features/projects/ViewERDAppDialog"; impo...
2302_79757062/commit
dashboard/src/pages/features/erd/meta/ERDDoctypeAndAppModal.tsx
TSX
agpl-3.0
5,088
import { FullPageLoader } from "@/components/common/FullPageLoader/FullPageLoader" import { PostgresRelationship, PostgresTable } from "@/types/Table" import { useFrappePostCall } from "frappe-react-sdk" import { useEffect, useState } from "react" import { ErrorBanner } from "@/components/common/ErrorBanner/ErrorBanner...
2302_79757062/commit
dashboard/src/pages/features/erd/meta/ERDForMetaDoctype.tsx
TSX
agpl-3.0
1,447
import dagre from '@dagrejs/dagre' import { FC, useCallback, useEffect, useMemo, useState } from 'react' import '../../../../styles/flow.css' import ReactFlow, { Background, Controls, Edge, Node, Position, ReactFlowProvider, useReactFlow, MarkerType, ControlButton, getConnectedEd...
2302_79757062/commit
dashboard/src/pages/features/erd/meta/MetaGraph.tsx
TSX
agpl-3.0
12,331
import { PostgresTable, PostgresRelationship } from "@/types/Table"; const tables: PostgresTable[] = [ { "name": "Opportunity", "id": "Opportunity", "module": "CRM", "columns": [ { "name": "ID", "id": "name", "format": "Da...
2302_79757062/commit
dashboard/src/pages/features/erd/tables.ts
TypeScript
agpl-3.0
20,606
import { Header } from "@/components/common/Header" import { YourApps } from "@/components/features/meta_apps/YourApps" import { Projects } from "@/components/features/projects/Projects" import { TabsContent, TabsList, TabsTrigger, Tabs } from "@/components/ui/tabs" import { isSystemAppAvailable } from "@/utils/roles" ...
2302_79757062/commit
dashboard/src/pages/overview/Overview.tsx
TSX
agpl-3.0
1,122
.Flow { width: 100%; height: 100%; flex-grow: 1; font-size: 12px; } :not(:root):fullscreen::backdrop { background-color: #fff; }
2302_79757062/commit
dashboard/src/styles/flow.css
CSS
agpl-3.0
141
export interface APIData { name: string arguments: Argument[] def: string def_index: number request_types: string[] xss_safe: boolean allow_guest: boolean other_decorators: string[] index: number file: string api_path: string block_start: number block_end: number ...
2302_79757062/commit
dashboard/src/types/APIData.ts
TypeScript
agpl-3.0
433
export interface CommitProjectBranch { commit_project: string branch_name: string path_to_folder: string commit_hash: string app_name: string last_fetched: string modules: string module_doctypes_map: string doctype_module_map: string whitelisted_apis: string } export interface M...
2302_79757062/commit
dashboard/src/types/CommitProjectBranch.ts
TypeScript
agpl-3.0
552
export interface DocField{ creation: string name: string modified: string owner: string modified_by: string docstatus: 0 | 1 | 2 parent?: string parentfield?: string parenttype?: string idx?: number /** Label : Data */ label?: string /** Type : Select */ fieldtype: "Autocomplete" | "Attach" | "Attach Ima...
2302_79757062/commit
dashboard/src/types/Core/DocField.ts
TypeScript
agpl-3.0
3,849
export interface DocPerm{ creation: string name: string modified: string owner: string modified_by: string docstatus: 0 | 1 | 2 parent?: string parentfield?: string parenttype?: string idx?: number /** Role : Link - Role */ role: string /** If user is the owner : Check - Apply this rule if the User is the...
2302_79757062/commit
dashboard/src/types/Core/DocPerm.ts
TypeScript
agpl-3.0
921
import { DocPerm } from './DocPerm' import { DocTypeAction } from './DocTypeAction' import { DocTypeLink } from './DocTypeLink' import { DocTypeState } from './DocTypeState' import { DocField } from './DocField' export interface DocType { creation: string name: string modified: string owner: string modified_by: s...
2302_79757062/commit
dashboard/src/types/Core/DocType.ts
TypeScript
agpl-3.0
5,796
export interface DocTypeAction{ creation: string name: string modified: string owner: string modified_by: string docstatus: 0 | 1 | 2 parent?: string parentfield?: string parenttype?: string idx?: number /** Label : Data */ label: string /** Action Type : Select */ action_type: "Server Action" | "Route" ...
2302_79757062/commit
dashboard/src/types/Core/DocTypeAction.ts
TypeScript
agpl-3.0
488
export interface DocTypeLink{ creation: string name: string modified: string owner: string modified_by: string docstatus: 0 | 1 | 2 parent?: string parentfield?: string parenttype?: string idx?: number /** Link DocType : Link - DocType */ link_doctype: string /** Link Fieldname : Data */ link_fieldname: ...
2302_79757062/commit
dashboard/src/types/Core/DocTypeLink.ts
TypeScript
agpl-3.0
620
export interface DocTypeState{ creation: string name: string modified: string owner: string modified_by: string docstatus: 0 | 1 | 2 parent?: string parentfield?: string parenttype?: string idx?: number /** Title : Data */ title: string /** Color : Select */ color: "Blue" | "Cyan" | "Gray" | "Green" | "L...
2302_79757062/commit
dashboard/src/types/Core/DocTypeState.ts
TypeScript
agpl-3.0
421
export interface File{ creation: string name: string modified: string owner: string modified_by: string docstatus: 0 | 1 | 2 parent?: string parentfield?: string parenttype?: string idx?: number /** File Name : Data */ file_name?: string /** File Description : Small Text */ file_description?: string /**...
2302_79757062/commit
dashboard/src/types/Core/File.ts
TypeScript
agpl-3.0
1,203
export type TableNodeData = { name: string columns: { id: string name: string format: string }[] } export type PostgresTable = { name: string, id: string, module: string, creation?: string, modified?: string, modified_by?: string, istable?: number, co...
2302_79757062/commit
dashboard/src/types/Table.ts
TypeScript
agpl-3.0
989
export interface CommitOrganization{ creation: string name: string modified: string owner: string modified_by: string docstatus: 0 | 1 | 2 parent?: string parentfield?: string parenttype?: string idx?: number /** Organization Name : Data */ organization_name: string /** Github Org : Data */ github_org: s...
2302_79757062/commit
dashboard/src/types/commit/CommitOrganization.ts
TypeScript
agpl-3.0
409
export interface CommitProject{ creation: string name: string modified: string owner: string modified_by: string docstatus: 0 | 1 | 2 parent?: string parentfield?: string parenttype?: string idx?: number /** Organization : Link - Commit Organization */ org: string /** Display Name : Data */ display_name:...
2302_79757062/commit
dashboard/src/types/commit/CommitProject.ts
TypeScript
agpl-3.0
626
export interface CommitProjectBranch{ creation: string name: string modified: string owner: string modified_by: string docstatus: 0 | 1 | 2 parent?: string parentfield?: string parenttype?: string idx?: number /** Commit Project : Link - Commit Project */ project: string /** Branch Name : Data */ branch_...
2302_79757062/commit
dashboard/src/types/commit/CommitProjectBranch.ts
TypeScript
agpl-3.0
809
export interface CommitSettings{ creation: string name: string modified: string owner: string modified_by: string docstatus: 0 | 1 | 2 parent?: string parentfield?: string parenttype?: string idx?: number /** Show System Apps : Check */ show_system_apps?: 0 | 1 }
2302_79757062/commit
dashboard/src/types/commit/CommitSettings.ts
TypeScript
agpl-3.0
276
export interface GithubSettings{ creation: string name: string modified: string owner: string modified_by: string docstatus: 0 | 1 | 2 parent?: string parentfield?: string parenttype?: string idx?: number /** Github App name : Data */ github_app_name?: string /** Client ID : Data */ client_id: string /*...
2302_79757062/commit
dashboard/src/types/commit/GithubSettings.ts
TypeScript
agpl-3.0
630
export const getSystemDefault = (fieldName: string, fallback?: any) => { // @ts-expect-error return window.frappe?.boot?.sysdefaults?.[fieldName] ?? fallback } export const getUserDefaults = (fieldName: string, fallback?: any) => { // @ts-expect-error return window.frappe?.boot?.user?.defaults?.[fieldN...
2302_79757062/commit
dashboard/src/utils/defaults.ts
TypeScript
agpl-3.0
338
frappe.defaults = { get_user_default: function (key) { let defaults = frappe.boot.user.defaults; let d = defaults[key]; if (!d) { key = key.replace(/ /g, '_').toLowerCase(); d = defaults[key]; } if (Array.isArray(d)) d = d[0]; return d; }, };
2302_79757062/commit
dashboard/src/utils/namespace/defaults.js
JavaScript
agpl-3.0
283
import './namespace'; import './sync'; import './locals'; import './defaults';
2302_79757062/commit
dashboard/src/utils/namespace/index.js
JavaScript
agpl-3.0
79
// frappe.model.sync(window.frappe.boot.docs);
2302_79757062/commit
dashboard/src/utils/namespace/locals.js
JavaScript
agpl-3.0
47
if (!window.frappe) window.frappe = {}; frappe.provide = function (namespace) { // docs: create a namespace // var nsl = namespace.split('.'); var parent = window; for (var i = 0; i < nsl.length; i++) { var n = nsl[i]; if (!parent[n]) { parent[n] = {}; } parent = parent[n]; } return p...
2302_79757062/commit
dashboard/src/utils/namespace/namespace.js
JavaScript
agpl-3.0
525
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors // MIT License. See license.txt import isPlainObject from 'lodash.isplainobject'; Object.assign(frappe.model, { docinfo: {}, sync: function (r) { /* docs: extract docs, docinfo (attachments, comments, assignments) fr...
2302_79757062/commit
dashboard/src/utils/namespace/sync.js
JavaScript
agpl-3.0
5,688
export const isSystemManager = () => { if (import.meta.env.DEV) { return true } //@ts-expect-error return (window?.frappe?.boot?.user?.roles ?? []).includes('System Manager'); } export const isSystemAppAvailable = () => { if (import.meta.env.DEV) { return true } //@ts-expec...
2302_79757062/commit
dashboard/src/utils/roles.ts
TypeScript
agpl-3.0
396
/** @type {import('tailwindcss').Config} */ module.exports = { darkMode: ["class"], content: [ './pages/**/*.{ts,tsx}', './components/**/*.{ts,tsx}', './app/**/*.{ts,tsx}', './src/**/*.{ts,tsx}', ], theme: { container: { center: true, padding: "2rem", screens: { "2x...
2302_79757062/commit
dashboard/tailwind.config.js
JavaScript
agpl-3.0
2,125
import path from 'path'; import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react' import proxyOptions from './proxyOptions'; // https://vitejs.dev/config/ export default defineConfig({ plugins: [react()], server: { port: 8080, proxy: proxyOptions }, resolve: { alias: { "@": path.resol...
2302_79757062/commit
dashboard/vite.config.ts
TypeScript
agpl-3.0
449
from setuptools import setup, find_packages with open("requirements.txt") as f: install_requires = f.read().strip().split("\n") # get version from __version__ variable in commit/__init__.py from commit import __version__ as version setup( name="commit", version=version, description="The Commit Company", author=...
2302_79757062/commit
setup.py
Python
agpl-3.0
496
__version__ = "1.0.0-dev"
2302_79757062/builder
builder/__init__.py
Python
agpl-3.0
26
import json import os from io import BytesIO from urllib.parse import unquote import frappe import requests from frappe.core.doctype.file.file import get_local_image from frappe.core.doctype.file.utils import delete_file from frappe.integrations.utils import make_post_request from frappe.model.document import Document...
2302_79757062/builder
builder/api.py
Python
agpl-3.0
6,163
// Copyright (c) 2024, Frappe Technologies Pvt Ltd and contributors // For license information, please see license.txt // frappe.ui.form.on("Block Template", { // refresh(frm) { // }, // });
2302_79757062/builder
builder/builder/doctype/block_template/block_template.js
JavaScript
agpl-3.0
195
# Copyright (c) 2024, Frappe Technologies Pvt Ltd and contributors # For license information, please see license.txt import os import shutil import frappe from frappe import _ from frappe.model.document import Document from frappe.modules import scrub from frappe.modules.export_file import export_to_files from build...
2302_79757062/builder
builder/builder/doctype/block_template/block_template.py
Python
agpl-3.0
1,407
// Copyright (c) 2023, Frappe Technologies Pvt Ltd and contributors // For license information, please see license.txt frappe.ui.form.on("Builder Client Script", { refresh(frm) { frm.trigger("set_editor_options"); }, script_type(frm) { frm.trigger("set_editor_options"); }, set_editor_options(frm) { if (!frm...
2302_79757062/builder
builder/builder/doctype/builder_client_script/builder_client_script.js
JavaScript
agpl-3.0
608
# Copyright (c) 2023, Frappe Technologies Pvt Ltd and contributors # For license information, please see license.txt import os import frappe from frappe.model.document import Document from frappe.modules.export_file import export_to_files from frappe.utils import get_files_path class BuilderClientScript(Document): ...
2302_79757062/builder
builder/builder/doctype/builder_client_script/builder_client_script.py
Python
agpl-3.0
2,134
// Copyright (c) 2023, asdf and contributors // For license information, please see license.txt // frappe.ui.form.on("Builder Component", { // refresh(frm) { // }, // });
2302_79757062/builder
builder/builder/doctype/builder_component/builder_component.js
JavaScript
agpl-3.0
175
# Copyright (c) 2023, asdf and contributors # For license information, please see license.txt import os import frappe from frappe.model.document import Document from frappe.modules.export_file import export_to_files from frappe.website.utils import clear_website_cache class BuilderComponent(Document): def before_i...
2302_79757062/builder
builder/builder/doctype/builder_component/builder_component.py
Python
agpl-3.0
1,169
import frappe def execute(): """Set Component ID""" component_list = frappe.get_all("Builder Component") for component in component_list: component_doc = frappe.get_doc("Builder Component", component) component_doc.component_id = component_doc.name component_doc.db_set("component_id", component_doc.name, up...
2302_79757062/builder
builder/builder/doctype/builder_component/patches/set_component_id.py
Python
agpl-3.0
340
// Copyright (c) 2023, asdf and contributors // For license information, please see license.txt frappe.ui.form.on("Builder Page", { refresh(frm) { // only show in developer mode if (frappe.boot.developer_mode || !frm.doc.is_template) { frm.sidebar .add_user_action(__("Open in Builder")) ...
2302_79757062/builder
builder/builder/doctype/builder_page/builder_page.js
JavaScript
agpl-3.0
642
# Copyright (c) 2023, asdf and contributors # For license information, please see license.txt import os import shutil import bs4 as bs import frappe import frappe.utils from frappe.modules import scrub from frappe.modules.export_file import export_to_files from frappe.utils.caching import redis_cache from frappe.util...
2302_79757062/builder
builder/builder/doctype/builder_page/builder_page.py
Python
agpl-3.0
17,624
import frappe def execute(): """Attach Client Script to Builder Page""" for builder_page in frappe.db.sql("""select name, client_script, style from `tabBuilder Page`""", as_dict=True): if builder_page.client_script: script_doc = get_or_create_builder_script("Builder Client Script", builder_page.client_script, "...
2302_79757062/builder
builder/builder/doctype/builder_page/patches/attach_client_script_to_builder_page.py
Python
agpl-3.0
1,265
import frappe from frappe.core.api.file import create_new_folder def execute(): """create upload folder for builder""" create_new_folder("Builder Uploads", "Home")
2302_79757062/builder
builder/builder/doctype/builder_page/patches/create_upload_folder_for_builder.py
Python
agpl-3.0
167
import frappe def execute(): frappe.db.set_value("Builder Settings", None, "auto_convert_images_to_webp", 1, update_modified=False)
2302_79757062/builder
builder/builder/doctype/builder_page/patches/enable_auto_convert_to_webp_by_default.py
Python
agpl-3.0
135
import frappe def execute(): """Properly extend blocks from component""" web_pages = frappe.get_all("Builder Page", fields=["name", "blocks"]) for web_page in web_pages: blocks = frappe.parse_json(web_page.blocks) if blocks: update_blocks(blocks) frappe.db.set_value("Builder Page", web_page.name, "blocks...
2302_79757062/builder
builder/builder/doctype/builder_page/patches/properly_extend_blocks_from_component.py
Python
agpl-3.0
3,485