diff --git a/apps/dokploy/components/dashboard/application/domains/columns.tsx b/apps/dokploy/components/dashboard/application/domains/columns.tsx index 506bb9cb85a..982b770032a 100644 --- a/apps/dokploy/components/dashboard/application/domains/columns.tsx +++ b/apps/dokploy/components/dashboard/application/domains/columns.tsx @@ -24,7 +24,7 @@ import { import type { RouterOutputs } from "@/utils/api"; import { DnsHelperModal } from "./dns-helper-modal"; import { AddDomain } from "./handle-domain"; -import type { ValidationStates } from "./show-domains"; +import type { features, ValidationStates } from "./show-domains"; export type Domain = | RouterOutputs["domain"]["byApplicationId"][0] @@ -56,7 +56,7 @@ export const createColumns = ({ serverIp, canCreateDomain, canDeleteDomain, -}: ColumnsProps): ColumnDef[] => [ +}: ColumnsProps): ColumnDef[] => [ ...(type === "compose" ? [ { @@ -72,7 +72,7 @@ export const createColumns = ({ ); }, - } satisfies ColumnDef, + } satisfies ColumnDef, ] : []), { diff --git a/apps/dokploy/components/dashboard/application/domains/show-domains.tsx b/apps/dokploy/components/dashboard/application/domains/show-domains.tsx index f4206ee95df..542380d8797 100644 --- a/apps/dokploy/components/dashboard/application/domains/show-domains.tsx +++ b/apps/dokploy/components/dashboard/application/domains/show-domains.tsx @@ -1,13 +1,23 @@ import { type ColumnFiltersState, + type ColumnVisibilityState, + columnFilteringFeature, + columnVisibilityFeature, + createFilteredRowModel, + createPaginatedRowModel, + createSortedRowModel, + filterFn_equals, + filterFn_includesString, flexRender, - getCoreRowModel, - getFilteredRowModel, - getPaginationRowModel, - getSortedRowModel, + rowPaginationFeature, + rowSelectionFeature, + rowSortingFeature, type SortingState, - useReactTable, - type VisibilityState, + sortFn_alphanumeric, + sortFn_datetime, + sortFn_text, + tableFeatures, + useTable, } from "@tanstack/react-table"; import { CheckCircle2, @@ -67,6 +77,26 @@ import { AddDomain } from "./handle-domain"; import { HandleForwardAuth } from "./handle-forward-auth"; import { COMPOSE_REDEPLOY_TOAST, ComposeRedeployAlert } from "./redeploy-hint"; +export const features = tableFeatures({ + columnFilteringFeature, + rowSortingFeature, + rowPaginationFeature, + columnVisibilityFeature, + rowSelectionFeature, + filteredRowModel: createFilteredRowModel(), + sortedRowModel: createSortedRowModel(), + paginatedRowModel: createPaginatedRowModel(), + filterFns: { + equals: filterFn_equals, + includesString: filterFn_includesString, + }, + sortFns: { + alphanumeric: sortFn_alphanumeric, + datetime: sortFn_datetime, + text: sortFn_text, + }, +}); + export type ValidationState = { isLoading: boolean; isValid?: boolean; @@ -119,7 +149,8 @@ export const ShowDomains = ({ id, type }: Props) => { }); const [sorting, setSorting] = useState([]); const [columnFilters, setColumnFilters] = useState([]); - const [columnVisibility, setColumnVisibility] = useState({}); + const [columnVisibility, setColumnVisibility] = + useState({}); const [rowSelection, setRowSelection] = useState({}); const { data: ip } = api.settings.getIp.useQuery(); @@ -232,15 +263,12 @@ export const ShowDomains = ({ id, type }: Props) => { canDeleteDomain, }); - const table = useReactTable({ + const table = useTable({ + features, data: data ?? [], columns, onSortingChange: setSorting, onColumnFiltersChange: setColumnFilters, - getCoreRowModel: getCoreRowModel(), - getPaginationRowModel: getPaginationRowModel(), - getSortedRowModel: getSortedRowModel(), - getFilteredRowModel: getFilteredRowModel(), onColumnVisibilityChange: setColumnVisibility, onRowSelectionChange: setRowSelection, state: { diff --git a/apps/dokploy/components/dashboard/deployments/show-deployments-table.tsx b/apps/dokploy/components/dashboard/deployments/show-deployments-table.tsx index ad860745a0c..6c534889cec 100644 --- a/apps/dokploy/components/dashboard/deployments/show-deployments-table.tsx +++ b/apps/dokploy/components/dashboard/deployments/show-deployments-table.tsx @@ -1,13 +1,19 @@ "use client"; import { + columnVisibilityFeature, + createPaginatedRowModel, + createSortedRowModel, flexRender, - getCoreRowModel, - getPaginationRowModel, - getSortedRowModel, type PaginationState, + rowPaginationFeature, + rowSortingFeature, type SortingState, - useReactTable, + sortFn_alphanumeric, + sortFn_datetime, + sortFn_text, + tableFeatures, + useTable, } from "@tanstack/react-table"; import type { inferRouterOutputs } from "@trpc/server"; import { @@ -43,6 +49,19 @@ import { import type { AppRouter } from "@/server/api/root"; import { api } from "@/utils/api"; +const features = tableFeatures({ + rowSortingFeature, + rowPaginationFeature, + columnVisibilityFeature, + sortedRowModel: createSortedRowModel(), + paginatedRowModel: createPaginatedRowModel(), + sortFns: { + alphanumeric: sortFn_alphanumeric, + datetime: sortFn_datetime, + text: sortFn_text, + }, +}); + type DeploymentRow = inferRouterOutputs["deployment"]["allCentralized"][number]; @@ -445,7 +464,8 @@ export function ShowDeploymentsTable({ [], ); - const table = useReactTable({ + const table = useTable({ + features, data: filteredData, columns, state: { @@ -454,9 +474,6 @@ export function ShowDeploymentsTable({ }, onSortingChange: setSorting, onPaginationChange: setPagination, - getCoreRowModel: getCoreRowModel(), - getSortedRowModel: getSortedRowModel(), - getPaginationRowModel: getPaginationRowModel(), }); return ( diff --git a/apps/dokploy/components/dashboard/docker/disk-usage/show-disk-usage.tsx b/apps/dokploy/components/dashboard/docker/disk-usage/show-disk-usage.tsx index 0ce4f21ea24..f7bcc2df95a 100644 --- a/apps/dokploy/components/dashboard/docker/disk-usage/show-disk-usage.tsx +++ b/apps/dokploy/components/dashboard/docker/disk-usage/show-disk-usage.tsx @@ -2,13 +2,19 @@ import { type ColumnDef, + columnVisibilityFeature, + createPaginatedRowModel, + createSortedRowModel, flexRender, - getCoreRowModel, - getPaginationRowModel, - getSortedRowModel, type PaginationState, + rowPaginationFeature, + rowSortingFeature, type SortingState, - useReactTable, + sortFn_alphanumeric, + sortFn_datetime, + sortFn_text, + tableFeatures, + useTable, } from "@tanstack/react-table"; import type { inferRouterOutputs } from "@trpc/server"; import { @@ -46,6 +52,19 @@ import { import type { AppRouter } from "@/server/api/root"; import { api } from "@/utils/api"; +const features = tableFeatures({ + rowSortingFeature, + rowPaginationFeature, + columnVisibilityFeature, + sortedRowModel: createSortedRowModel(), + paginatedRowModel: createPaginatedRowModel(), + sortFns: { + alphanumeric: sortFn_alphanumeric, + datetime: sortFn_datetime, + text: sortFn_text, + }, +}); + type DiskUsageItem = inferRouterOutputs["dockerDiskUsage"]["getDiskUsage"][number]; type BuildCacheBase = @@ -176,7 +195,7 @@ export const ShowDiskUsage = ({ serverId }: Props) => { } }; - const columns = useMemo[]>( + const columns = useMemo[]>( () => [ { accessorKey: "id", @@ -263,7 +282,8 @@ export const ShowDiskUsage = ({ serverId }: Props) => { [], ); - const table = useReactTable({ + const table = useTable({ + features, data: filteredData, columns, getRowId: (row) => row.key, @@ -273,9 +293,6 @@ export const ShowDiskUsage = ({ serverId }: Props) => { }, onSortingChange: setSorting, onPaginationChange: setPagination, - getCoreRowModel: getCoreRowModel(), - getSortedRowModel: getSortedRowModel(), - getPaginationRowModel: getPaginationRowModel(), }); return ( @@ -395,7 +412,7 @@ export const ShowDiskUsage = ({ serverId }: Props) => { {table.getPageCount() > 1 && (
- Page {table.getState().pagination.pageIndex + 1} of{" "} + Page {table.state.pagination.pageIndex + 1} of{" "} {table.getPageCount()}
diff --git a/apps/dokploy/components/dashboard/docker/events/show-docker-events.tsx b/apps/dokploy/components/dashboard/docker/events/show-docker-events.tsx index 8a6d76db896..90ae2e3de1c 100644 --- a/apps/dokploy/components/dashboard/docker/events/show-docker-events.tsx +++ b/apps/dokploy/components/dashboard/docker/events/show-docker-events.tsx @@ -1,12 +1,18 @@ import { type ColumnDef, + columnVisibilityFeature, + createPaginatedRowModel, + createSortedRowModel, flexRender, - getCoreRowModel, - getPaginationRowModel, - getSortedRowModel, type PaginationState, + rowPaginationFeature, + rowSortingFeature, type SortingState, - useReactTable, + sortFn_alphanumeric, + sortFn_datetime, + sortFn_text, + tableFeatures, + useTable, } from "@tanstack/react-table"; import { Activity, ArrowUpDown, Loader2, RefreshCw } from "lucide-react"; import { useMemo, useState } from "react"; @@ -37,6 +43,19 @@ import { } from "@/components/ui/table"; import { api, type RouterOutputs } from "@/utils/api"; +const features = tableFeatures({ + rowSortingFeature, + rowPaginationFeature, + columnVisibilityFeature, + sortedRowModel: createSortedRowModel(), + paginatedRowModel: createPaginatedRowModel(), + sortFns: { + alphanumeric: sortFn_alphanumeric, + datetime: sortFn_datetime, + text: sortFn_text, + }, +}); + interface Props { serverId?: string; } @@ -153,7 +172,7 @@ export const ShowDockerEvents = ({ serverId }: Props) => { }); }, [events, search]); - const columns = useMemo[]>( + const columns = useMemo[]>( () => [ { id: "time", @@ -228,7 +247,8 @@ export const ShowDockerEvents = ({ serverId }: Props) => { [], ); - const table = useReactTable({ + const table = useTable({ + features, data: filteredEvents, columns, getRowId: (row) => row.key, @@ -238,9 +258,6 @@ export const ShowDockerEvents = ({ serverId }: Props) => { }, onSortingChange: setSorting, onPaginationChange: setPagination, - getCoreRowModel: getCoreRowModel(), - getSortedRowModel: getSortedRowModel(), - getPaginationRowModel: getPaginationRowModel(), }); return ( @@ -362,7 +379,7 @@ export const ShowDockerEvents = ({ serverId }: Props) => { {table.getPageCount() > 1 && (
- Page {table.getState().pagination.pageIndex + 1} of{" "} + Page {table.state.pagination.pageIndex + 1} of{" "} {table.getPageCount()}
@@ -371,8 +388,8 @@ export const ShowDockerEvents = ({ serverId }: Props) => { type="number" min={1} max={table.getPageCount()} - defaultValue={table.getState().pagination.pageIndex + 1} - key={table.getState().pagination.pageIndex} + defaultValue={table.state.pagination.pageIndex + 1} + key={table.state.pagination.pageIndex} onKeyDown={(e) => { if (e.key !== "Enter") return; const value = Number( diff --git a/apps/dokploy/components/dashboard/docker/images/show-images.tsx b/apps/dokploy/components/dashboard/docker/images/show-images.tsx index bb694f12824..fd6a945b8e8 100644 --- a/apps/dokploy/components/dashboard/docker/images/show-images.tsx +++ b/apps/dokploy/components/dashboard/docker/images/show-images.tsx @@ -2,13 +2,19 @@ import { type ColumnDef, + columnVisibilityFeature, + createPaginatedRowModel, + createSortedRowModel, flexRender, - getCoreRowModel, - getPaginationRowModel, - getSortedRowModel, type PaginationState, + rowPaginationFeature, + rowSortingFeature, type SortingState, - useReactTable, + sortFn_alphanumeric, + sortFn_datetime, + sortFn_text, + tableFeatures, + useTable, } from "@tanstack/react-table"; import type { inferRouterOutputs } from "@trpc/server"; import { ArrowUpDown, Eye, Layers, Loader2, Trash2 } from "lucide-react"; @@ -56,6 +62,19 @@ import { import type { AppRouter } from "@/server/api/root"; import { api } from "@/utils/api"; +const features = tableFeatures({ + rowSortingFeature, + rowPaginationFeature, + columnVisibilityFeature, + sortedRowModel: createSortedRowModel(), + paginatedRowModel: createPaginatedRowModel(), + sortFns: { + alphanumeric: sortFn_alphanumeric, + datetime: sortFn_datetime, + text: sortFn_text, + }, +}); + type ImageBase = inferRouterOutputs["dockerImage"]["getImages"][number]; type ImageRow = ImageBase & { key: string }; @@ -226,7 +245,7 @@ export const ShowImages = ({ serverId }: Props) => { } }; - const columns = useMemo[]>( + const columns = useMemo[]>( () => [ { accessorKey: "Repository", @@ -304,7 +323,8 @@ export const ShowImages = ({ serverId }: Props) => { [serverId], ); - const table = useReactTable({ + const table = useTable({ + features, data: filteredData, columns, getRowId: (row) => row.key, @@ -314,9 +334,6 @@ export const ShowImages = ({ serverId }: Props) => { }, onSortingChange: setSorting, onPaginationChange: setPagination, - getCoreRowModel: getCoreRowModel(), - getSortedRowModel: getSortedRowModel(), - getPaginationRowModel: getPaginationRowModel(), }); return ( @@ -410,7 +427,7 @@ export const ShowImages = ({ serverId }: Props) => { {table.getPageCount() > 1 && (
- Page {table.getState().pagination.pageIndex + 1} of{" "} + Page {table.state.pagination.pageIndex + 1} of{" "} {table.getPageCount()}
diff --git a/apps/dokploy/components/dashboard/docker/show/columns.tsx b/apps/dokploy/components/dashboard/docker/show/columns.tsx index 3a105aefa5b..4732b9a4a06 100644 --- a/apps/dokploy/components/dashboard/docker/show/columns.tsx +++ b/apps/dokploy/components/dashboard/docker/show/columns.tsx @@ -19,9 +19,9 @@ import { ShowContainerNetworks } from "../networks/show-container-networks"; import { RemoveContainerDialog } from "../remove/remove-container"; import { DockerTerminalModal } from "../terminal/docker-terminal-modal"; import { UploadFileModal } from "../upload/upload-file-modal"; -import type { Container } from "./show-containers"; +import type { Container, features } from "./show-containers"; -export const columns: ColumnDef[] = [ +export const columns: ColumnDef[] = [ { accessorKey: "name", header: ({ column }) => { diff --git a/apps/dokploy/components/dashboard/docker/show/show-containers.tsx b/apps/dokploy/components/dashboard/docker/show/show-containers.tsx index f5766f7c41e..07f4097e8e8 100644 --- a/apps/dokploy/components/dashboard/docker/show/show-containers.tsx +++ b/apps/dokploy/components/dashboard/docker/show/show-containers.tsx @@ -1,13 +1,23 @@ import { type ColumnFiltersState, + type ColumnVisibilityState, + columnFilteringFeature, + columnVisibilityFeature, + createFilteredRowModel, + createPaginatedRowModel, + createSortedRowModel, + filterFn_equals, + filterFn_includesString, flexRender, - getCoreRowModel, - getFilteredRowModel, - getPaginationRowModel, - getSortedRowModel, + rowPaginationFeature, + rowSelectionFeature, + rowSortingFeature, type SortingState, - useReactTable, - type VisibilityState, + sortFn_alphanumeric, + sortFn_datetime, + sortFn_text, + tableFeatures, + useTable, } from "@tanstack/react-table"; import { ChevronDown, Container, RefreshCw } from "lucide-react"; import * as React from "react"; @@ -43,6 +53,27 @@ import { } from "@/components/ui/table"; import { api, type RouterOutputs } from "@/utils/api"; import { columns } from "./columns"; + +export const features = tableFeatures({ + columnFilteringFeature, + rowSortingFeature, + rowPaginationFeature, + columnVisibilityFeature, + rowSelectionFeature, + filteredRowModel: createFilteredRowModel(), + sortedRowModel: createSortedRowModel(), + paginatedRowModel: createPaginatedRowModel(), + filterFns: { + equals: filterFn_equals, + includesString: filterFn_includesString, + }, + sortFns: { + alphanumeric: sortFn_alphanumeric, + datetime: sortFn_datetime, + text: sortFn_text, + }, +}); + export type Container = NonNullable< RouterOutputs["docker"]["getContainers"] >[0]; @@ -77,18 +108,15 @@ export const ShowContainers = ({ serverId }: Props) => { [], ); const [columnVisibility, setColumnVisibility] = - React.useState({}); + React.useState({}); const [rowSelection, setRowSelection] = React.useState({}); - const table = useReactTable({ + const table = useTable({ + features, data: data ?? [], columns, onSortingChange: setSorting, onColumnFiltersChange: setColumnFilters, - getCoreRowModel: getCoreRowModel(), - getPaginationRowModel: getPaginationRowModel(), - getSortedRowModel: getSortedRowModel(), - getFilteredRowModel: getFilteredRowModel(), onColumnVisibilityChange: setColumnVisibility, onRowSelectionChange: setRowSelection, state: { diff --git a/apps/dokploy/components/dashboard/docker/volumes/show-volumes.tsx b/apps/dokploy/components/dashboard/docker/volumes/show-volumes.tsx index d8c76662f93..c5dc406e631 100644 --- a/apps/dokploy/components/dashboard/docker/volumes/show-volumes.tsx +++ b/apps/dokploy/components/dashboard/docker/volumes/show-volumes.tsx @@ -2,13 +2,19 @@ import { type ColumnDef, + columnVisibilityFeature, + createPaginatedRowModel, + createSortedRowModel, flexRender, - getCoreRowModel, - getPaginationRowModel, - getSortedRowModel, type PaginationState, + rowPaginationFeature, + rowSortingFeature, type SortingState, - useReactTable, + sortFn_alphanumeric, + sortFn_datetime, + sortFn_text, + tableFeatures, + useTable, } from "@tanstack/react-table"; import type { inferRouterOutputs } from "@trpc/server"; import { @@ -54,6 +60,19 @@ import { import type { AppRouter } from "@/server/api/root"; import { api } from "@/utils/api"; +const features = tableFeatures({ + rowSortingFeature, + rowPaginationFeature, + columnVisibilityFeature, + sortedRowModel: createSortedRowModel(), + paginatedRowModel: createPaginatedRowModel(), + sortFns: { + alphanumeric: sortFn_alphanumeric, + datetime: sortFn_datetime, + text: sortFn_text, + }, +}); + type VolumeRow = inferRouterOutputs["dockerVolume"]["getVolumes"][number]; @@ -183,7 +202,7 @@ export const ShowVolumes = ({ serverId }: Props) => { return list.filter((volume) => volume.Name.toLowerCase().includes(query)); }, [volumes, globalFilter]); - const columns = useMemo[]>( + const columns = useMemo[]>( () => [ { accessorKey: "Name", @@ -218,7 +237,7 @@ export const ShowVolumes = ({ serverId }: Props) => { { id: "Size", header: ({ column }) => , - sortingFn: (a, b) => + sortFn: (a, b) => parseSize(sizeByName.get(a.original.Name) ?? undefined) - parseSize(sizeByName.get(b.original.Name) ?? undefined), cell: ({ row }) => @@ -297,7 +316,8 @@ export const ShowVolumes = ({ serverId }: Props) => { [serverId, removeVolume, utils, sizeByName, isLoadingSizes], ); - const table = useReactTable({ + const table = useTable({ + features, data: filteredData, columns, state: { @@ -306,9 +326,6 @@ export const ShowVolumes = ({ serverId }: Props) => { }, onSortingChange: setSorting, onPaginationChange: setPagination, - getCoreRowModel: getCoreRowModel(), - getSortedRowModel: getSortedRowModel(), - getPaginationRowModel: getPaginationRowModel(), }); return ( @@ -401,7 +418,7 @@ export const ShowVolumes = ({ serverId }: Props) => { {table.getPageCount() > 1 && (
- Page {table.getState().pagination.pageIndex + 1} of{" "} + Page {table.state.pagination.pageIndex + 1} of{" "} {table.getPageCount()}
diff --git a/apps/dokploy/components/dashboard/networks/show-networks.tsx b/apps/dokploy/components/dashboard/networks/show-networks.tsx index d87278b1e86..cdc45a0ff8e 100644 --- a/apps/dokploy/components/dashboard/networks/show-networks.tsx +++ b/apps/dokploy/components/dashboard/networks/show-networks.tsx @@ -2,13 +2,19 @@ import { type ColumnDef, + columnVisibilityFeature, + createPaginatedRowModel, + createSortedRowModel, flexRender, - getCoreRowModel, - getPaginationRowModel, - getSortedRowModel, type PaginationState, + rowPaginationFeature, + rowSortingFeature, type SortingState, - useReactTable, + sortFn_alphanumeric, + sortFn_datetime, + sortFn_text, + tableFeatures, + useTable, } from "@tanstack/react-table"; import type { inferRouterOutputs } from "@trpc/server"; import { @@ -54,6 +60,19 @@ import { import type { AppRouter } from "@/server/api/root"; import { api } from "@/utils/api"; +const features = tableFeatures({ + rowSortingFeature, + rowPaginationFeature, + columnVisibilityFeature, + sortedRowModel: createSortedRowModel(), + paginatedRowModel: createPaginatedRowModel(), + sortFns: { + alphanumeric: sortFn_alphanumeric, + datetime: sortFn_datetime, + text: sortFn_text, + }, +}); + type NetworkRow = inferRouterOutputs["network"]["all"][number]; interface Props { @@ -154,7 +173,7 @@ export const ShowNetworks = ({ serverId }: Props) => { return list; }, [networks, driverFilter, globalFilter]); - const columns = useMemo[]>( + const columns = useMemo[]>( () => [ { accessorKey: "name", @@ -326,7 +345,8 @@ export const ShowNetworks = ({ serverId }: Props) => { [verified, syncStatus, missingIds, removeNetwork, recreateMutation, utils], ); - const table = useReactTable({ + const table = useTable({ + features, data: filteredData, columns, state: { @@ -335,9 +355,6 @@ export const ShowNetworks = ({ serverId }: Props) => { }, onSortingChange: setSorting, onPaginationChange: setPagination, - getCoreRowModel: getCoreRowModel(), - getSortedRowModel: getSortedRowModel(), - getPaginationRowModel: getPaginationRowModel(), }); return ( @@ -461,7 +478,7 @@ export const ShowNetworks = ({ serverId }: Props) => { {table.getPageCount() > 1 && (
- Page {table.getState().pagination.pageIndex + 1} of{" "} + Page {table.state.pagination.pageIndex + 1} of{" "} {table.getPageCount()}
diff --git a/apps/dokploy/components/dashboard/requests/columns.tsx b/apps/dokploy/components/dashboard/requests/columns.tsx index 7322dc098df..00be39251ed 100644 --- a/apps/dokploy/components/dashboard/requests/columns.tsx +++ b/apps/dokploy/components/dashboard/requests/columns.tsx @@ -3,6 +3,7 @@ import { format } from "date-fns"; import { ArrowUpDown } from "lucide-react"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; +import type { features } from "./requests-table"; import type { LogEntry } from "./show-requests"; export const getStatusColor = (status: number) => { @@ -42,7 +43,7 @@ const formatDuration = (nanos: number) => { return `${(ms / 1000).toFixed(2)} s`; }; -export const columns: ColumnDef[] = [ +export const columns: ColumnDef[] = [ { accessorKey: "level", header: () => { diff --git a/apps/dokploy/components/dashboard/requests/requests-table.tsx b/apps/dokploy/components/dashboard/requests/requests-table.tsx index c8ca5f3f380..3511aa0e536 100644 --- a/apps/dokploy/components/dashboard/requests/requests-table.tsx +++ b/apps/dokploy/components/dashboard/requests/requests-table.tsx @@ -1,13 +1,23 @@ import { type ColumnFiltersState, + type ColumnVisibilityState, + columnFilteringFeature, + columnVisibilityFeature, + createFilteredRowModel, + createSortedRowModel, + filterFn_equals, + filterFn_includesString, flexRender, - getCoreRowModel, - getFilteredRowModel, - getSortedRowModel, type PaginationState, + rowPaginationFeature, + rowSelectionFeature, + rowSortingFeature, type SortingState, - useReactTable, - type VisibilityState, + sortFn_alphanumeric, + sortFn_datetime, + sortFn_text, + tableFeatures, + useTable, } from "@tanstack/react-table"; import copy from "copy-to-clipboard"; import { @@ -54,6 +64,25 @@ import { columns, getStatusColor } from "./columns"; import type { LogEntry } from "./show-requests"; import { DataTableFacetedFilter } from "./status-request-filter"; +export const features = tableFeatures({ + columnFilteringFeature, + rowSortingFeature, + rowPaginationFeature, + columnVisibilityFeature, + rowSelectionFeature, + filteredRowModel: createFilteredRowModel(), + sortedRowModel: createSortedRowModel(), + filterFns: { + equals: filterFn_equals, + includesString: filterFn_includesString, + }, + sortFns: { + alphanumeric: sortFn_alphanumeric, + datetime: sortFn_datetime, + text: sortFn_text, + }, +}); + export const priorities = [ { label: "100 - 199", @@ -94,7 +123,8 @@ export const RequestsTable = ({ dateRange }: RequestsTableProps) => { const [search, setSearch] = useState(""); const [selectedRow, setSelectedRow] = useState(); const [sorting, setSorting] = useState([]); - const [columnVisibility, setColumnVisibility] = useState({}); + const [columnVisibility, setColumnVisibility] = + useState({}); const [rowSelection, setRowSelection] = useState({}); const [columnFilters, setColumnFilters] = useState([]); const [pagination, setPagination] = useState({ @@ -132,16 +162,14 @@ export const RequestsTable = ({ dateRange }: RequestsTableProps) => { return -1; }, [statsLogs?.totalCount, pagination.pageSize]); - const table = useReactTable({ + const table = useTable({ + features, data: statsLogs?.data ?? [], columns, onPaginationChange: setPagination, onSortingChange: setSorting, pageCount: pageCount, onColumnFiltersChange: setColumnFilters, - getCoreRowModel: getCoreRowModel(), - getSortedRowModel: getSortedRowModel(), - getFilteredRowModel: getFilteredRowModel(), onColumnVisibilityChange: setColumnVisibility, onRowSelectionChange: setRowSelection, manualPagination: true, diff --git a/apps/dokploy/components/dashboard/settings/dns/show-dns-records.tsx b/apps/dokploy/components/dashboard/settings/dns/show-dns-records.tsx index 1264b66966b..eaec1f1483c 100644 --- a/apps/dokploy/components/dashboard/settings/dns/show-dns-records.tsx +++ b/apps/dokploy/components/dashboard/settings/dns/show-dns-records.tsx @@ -1,12 +1,18 @@ import { type ColumnDef, + columnVisibilityFeature, + createPaginatedRowModel, + createSortedRowModel, flexRender, - getCoreRowModel, - getPaginationRowModel, - getSortedRowModel, type PaginationState, + rowPaginationFeature, + rowSortingFeature, type SortingState, - useReactTable, + sortFn_alphanumeric, + sortFn_datetime, + sortFn_text, + tableFeatures, + useTable, } from "@tanstack/react-table"; import { ArrowLeft, @@ -64,6 +70,19 @@ import { } from "./dns-record-panel"; import { DnsRecordTypeBadge } from "./dns-record-type-badge"; +const features = tableFeatures({ + rowSortingFeature, + rowPaginationFeature, + columnVisibilityFeature, + sortedRowModel: createSortedRowModel(), + paginatedRowModel: createPaginatedRowModel(), + sortFns: { + alphanumeric: sortFn_alphanumeric, + datetime: sortFn_datetime, + text: sortFn_text, + }, +}); + interface Props { dnsProviderId: string; zoneId: string; @@ -159,7 +178,7 @@ export const ShowDnsRecords = ({ dnsProviderId, zoneId }: Props) => { .finally(() => setDeletingId(null)); }; - const columns = useMemo[]>( + const columns = useMemo[]>( () => [ { accessorKey: "type", @@ -233,7 +252,7 @@ export const ShowDnsRecords = ({ dnsProviderId, zoneId }: Props) => { ); }, - } satisfies ColumnDef, + } satisfies ColumnDef, ] : []), { @@ -303,7 +322,8 @@ export const ShowDnsRecords = ({ dnsProviderId, zoneId }: Props) => { const resetToFirstPage = () => setPagination((previous) => ({ ...previous, pageIndex: 0 })); - const table = useReactTable({ + const table = useTable({ + features, data: filteredRecords, columns, getRowId: (row) => row.id, @@ -313,9 +333,6 @@ export const ShowDnsRecords = ({ dnsProviderId, zoneId }: Props) => { }, onSortingChange: setSorting, onPaginationChange: setPagination, - getCoreRowModel: getCoreRowModel(), - getSortedRowModel: getSortedRowModel(), - getPaginationRowModel: getPaginationRowModel(), }); return ( diff --git a/apps/dokploy/components/dashboard/settings/sessions/show-sessions.tsx b/apps/dokploy/components/dashboard/settings/sessions/show-sessions.tsx index 6f0eab1e21e..b7e1ed2092c 100644 --- a/apps/dokploy/components/dashboard/settings/sessions/show-sessions.tsx +++ b/apps/dokploy/components/dashboard/settings/sessions/show-sessions.tsx @@ -1,12 +1,18 @@ import { type ColumnDef, + columnVisibilityFeature, + createPaginatedRowModel, + createSortedRowModel, flexRender, - getCoreRowModel, - getPaginationRowModel, - getSortedRowModel, type PaginationState, + rowPaginationFeature, + rowSortingFeature, type SortingState, - useReactTable, + sortFn_alphanumeric, + sortFn_datetime, + sortFn_text, + tableFeatures, + useTable, } from "@tanstack/react-table"; import { format } from "date-fns"; import { ArrowUpDown, Loader2, LogOut, Smartphone } from "lucide-react"; @@ -40,6 +46,19 @@ import { } from "@/components/ui/table"; import { api } from "@/utils/api"; +const features = tableFeatures({ + rowSortingFeature, + rowPaginationFeature, + columnVisibilityFeature, + sortedRowModel: createSortedRowModel(), + paginatedRowModel: createPaginatedRowModel(), + sortFns: { + alphanumeric: sortFn_alphanumeric, + datetime: sortFn_datetime, + text: sortFn_text, + }, +}); + type SessionRow = { id: string; userId: string; @@ -139,7 +158,7 @@ export const ShowSessions = () => { return list; }, [sessions, statusFilter, userFilter, isOwner, globalFilter]); - const columns = useMemo[]>( + const columns = useMemo[]>( () => [ { id: "user", @@ -259,7 +278,8 @@ export const ShowSessions = () => { [isRevoking, handleRevoke], ); - const table = useReactTable({ + const table = useTable({ + features, data: filteredData, columns, state: { @@ -268,9 +288,6 @@ export const ShowSessions = () => { }, onSortingChange: setSorting, onPaginationChange: setPagination, - getCoreRowModel: getCoreRowModel(), - getSortedRowModel: getSortedRowModel(), - getPaginationRowModel: getPaginationRowModel(), }); return ( @@ -400,7 +417,7 @@ export const ShowSessions = () => { {table.getPageCount() > 1 && (
- Page {table.getState().pagination.pageIndex + 1} of{" "} + Page {table.state.pagination.pageIndex + 1} of{" "} {table.getPageCount()}
diff --git a/apps/dokploy/components/dashboard/swarm/applications/columns.tsx b/apps/dokploy/components/dashboard/swarm/applications/columns.tsx index c23f57d77cc..5fd7631d46a 100644 --- a/apps/dokploy/components/dashboard/swarm/applications/columns.tsx +++ b/apps/dokploy/components/dashboard/swarm/applications/columns.tsx @@ -9,6 +9,7 @@ import { DropdownMenuTrigger, } from "@/components/ui/dropdown-menu"; import { ShowDockerModalStackLogs } from "../../docker/logs/show-docker-modal-stack-logs"; +import type { features } from "./data-table"; export interface ApplicationList { ID: string; @@ -24,7 +25,7 @@ export interface ApplicationList { serverId: string; } -export const columns: ColumnDef[] = [ +export const columns: ColumnDef[] = [ { accessorKey: "ID", accessorFn: (row) => row.ID, diff --git a/apps/dokploy/components/dashboard/swarm/applications/data-table.tsx b/apps/dokploy/components/dashboard/swarm/applications/data-table.tsx index b1691ffe5ae..c234d3e4954 100644 --- a/apps/dokploy/components/dashboard/swarm/applications/data-table.tsx +++ b/apps/dokploy/components/dashboard/swarm/applications/data-table.tsx @@ -3,14 +3,25 @@ import { type ColumnDef, type ColumnFiltersState, + type ColumnVisibilityState, + columnFilteringFeature, + columnVisibilityFeature, + createFilteredRowModel, + createPaginatedRowModel, + createSortedRowModel, + filterFn_equals, + filterFn_includesString, flexRender, - getCoreRowModel, - getFilteredRowModel, - getPaginationRowModel, - getSortedRowModel, + type RowData, + rowPaginationFeature, + rowSelectionFeature, + rowSortingFeature, type SortingState, - useReactTable, - type VisibilityState, + sortFn_alphanumeric, + sortFn_datetime, + sortFn_text, + tableFeatures, + useTable, } from "@tanstack/react-table"; import { ChevronDown } from "lucide-react"; import React from "react"; @@ -31,36 +42,53 @@ import { TableRow, } from "@/components/ui/table"; -interface DataTableProps { - columns: ColumnDef[]; +export const features = tableFeatures({ + columnFilteringFeature, + rowSortingFeature, + rowPaginationFeature, + columnVisibilityFeature, + rowSelectionFeature, + filteredRowModel: createFilteredRowModel(), + sortedRowModel: createSortedRowModel(), + paginatedRowModel: createPaginatedRowModel(), + filterFns: { + equals: filterFn_equals, + includesString: filterFn_includesString, + }, + sortFns: { + alphanumeric: sortFn_alphanumeric, + datetime: sortFn_datetime, + text: sortFn_text, + }, +}); + +interface DataTableProps { + columns: ColumnDef[]; data: TData[]; } -export function DataTable({ +export function DataTable({ columns, data, -}: DataTableProps) { +}: DataTableProps) { const [sorting, setSorting] = React.useState([]); const [columnFilters, setColumnFilters] = React.useState( [], ); const [columnVisibility, setColumnVisibility] = - React.useState({}); + React.useState({}); const [rowSelection, setRowSelection] = React.useState({}); const [_pagination, _setPagination] = React.useState({ pageIndex: 0, //initial page index pageSize: 8, //default page size }); - const table = useReactTable({ + const table = useTable({ + features, data, columns, onSortingChange: setSorting, onColumnFiltersChange: setColumnFilters, - getCoreRowModel: getCoreRowModel(), - getPaginationRowModel: getPaginationRowModel(), - getSortedRowModel: getSortedRowModel(), - getFilteredRowModel: getFilteredRowModel(), onColumnVisibilityChange: setColumnVisibility, onRowSelectionChange: setRowSelection, state: { diff --git a/apps/dokploy/components/proprietary/audit-logs/columns.tsx b/apps/dokploy/components/proprietary/audit-logs/columns.tsx index 65770a57001..5dbe629150d 100644 --- a/apps/dokploy/components/proprietary/audit-logs/columns.tsx +++ b/apps/dokploy/components/proprietary/audit-logs/columns.tsx @@ -27,6 +27,7 @@ import { DialogTitle, DialogTrigger, } from "@/components/ui/dialog"; +import type { features } from "./data-table"; const ACTION_CONFIG: Record< string, @@ -148,7 +149,7 @@ function MetadataCell({ metadata }: { metadata: string | null }) { ); } -export const columns: ColumnDef[] = [ +export const columns: ColumnDef[] = [ { accessorKey: "createdAt", header: ({ column }) => ( diff --git a/apps/dokploy/components/proprietary/audit-logs/data-table.tsx b/apps/dokploy/components/proprietary/audit-logs/data-table.tsx index a1b66fde63c..5775e37d708 100644 --- a/apps/dokploy/components/proprietary/audit-logs/data-table.tsx +++ b/apps/dokploy/components/proprietary/audit-logs/data-table.tsx @@ -3,12 +3,19 @@ import type { AuditLog } from "@dokploy/server/db/schema"; import { type ColumnDef, + type ColumnVisibilityState, + columnFilteringFeature, + columnVisibilityFeature, + createSortedRowModel, flexRender, - getCoreRowModel, - getSortedRowModel, + rowPaginationFeature, + rowSortingFeature, type SortingState, - useReactTable, - type VisibilityState, + sortFn_alphanumeric, + sortFn_datetime, + sortFn_text, + tableFeatures, + useTable, } from "@tanstack/react-table"; import { format } from "date-fns"; import { CalendarIcon, ChevronDown, X } from "lucide-react"; @@ -44,6 +51,19 @@ import { TableRow, } from "@/components/ui/table"; +export const features = tableFeatures({ + columnFilteringFeature, + rowSortingFeature, + rowPaginationFeature, + columnVisibilityFeature, + sortedRowModel: createSortedRowModel(), + sortFns: { + alphanumeric: sortFn_alphanumeric, + datetime: sortFn_datetime, + text: sortFn_text, + }, +}); + const ACTION_OPTIONS = [ { value: "create", label: "Created" }, { value: "update", label: "Updated" }, @@ -114,7 +134,7 @@ export interface AuditLogFilters { } interface DataTableProps { - columns: ColumnDef[]; + columns: ColumnDef[]; data: AuditLog[]; total: number; pageIndex: number; @@ -145,14 +165,13 @@ export function DataTable({ { id: "createdAt", desc: true }, ]); const [columnVisibility, setColumnVisibility] = - React.useState({}); + React.useState({}); - const table = useReactTable({ + const table = useTable({ + features, data, columns, onSortingChange: setSorting, - getCoreRowModel: getCoreRowModel(), - getSortedRowModel: getSortedRowModel(), onColumnVisibilityChange: setColumnVisibility, manualPagination: true, manualFiltering: true, diff --git a/apps/dokploy/package.json b/apps/dokploy/package.json index 9f924f845ab..dcc78d328ad 100644 --- a/apps/dokploy/package.json +++ b/apps/dokploy/package.json @@ -79,7 +79,7 @@ "@stripe/stripe-js": "4.10.0", "@tailwindcss/typography": "0.5.20", "@tanstack/react-query": "^5.105.0", - "@tanstack/react-table": "^8.21.3", + "@tanstack/react-table": "^9.3.1", "@trpc/client": "^11.19.0", "@trpc/next": "^11.19.0", "@trpc/react-query": "^11.19.0", @@ -100,7 +100,7 @@ "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "cmdk": "^1.1.1", - "copy-to-clipboard": "^3.3.3", + "copy-to-clipboard": "^4.0.2", "date-fns": "4.4.0", "dockerode": "5.0.1", "dompurify": "^3.4.17", @@ -133,7 +133,7 @@ "react-day-picker": "10.0.2", "react-dom": "19.3.1", "react-hook-form": "^7.91.0", - "react-markdown": "^9.1.0", + "react-markdown": "^10.1.0", "recharts": "^3.10.1", "resend": "^6.34.1", "semver": "7.8.5", diff --git a/bun.lock b/bun.lock index 83cbd232bbb..24756f6e0f5 100644 --- a/bun.lock +++ b/bun.lock @@ -79,7 +79,7 @@ "@stripe/stripe-js": "4.10.0", "@tailwindcss/typography": "0.5.20", "@tanstack/react-query": "^5.105.0", - "@tanstack/react-table": "^8.21.3", + "@tanstack/react-table": "^9.3.1", "@trpc/client": "^11.19.0", "@trpc/next": "^11.19.0", "@trpc/react-query": "^11.19.0", @@ -100,7 +100,7 @@ "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "cmdk": "^1.1.1", - "copy-to-clipboard": "^3.3.3", + "copy-to-clipboard": "^4.0.2", "date-fns": "4.4.0", "dockerode": "5.0.1", "dompurify": "^3.4.17", @@ -133,7 +133,7 @@ "react-day-picker": "10.0.2", "react-dom": "19.3.1", "react-hook-form": "^7.91.0", - "react-markdown": "^9.1.0", + "react-markdown": "^10.1.0", "recharts": "^3.10.1", "resend": "^6.34.1", "semver": "7.8.5", @@ -1483,11 +1483,15 @@ "@tanstack/react-query": ["@tanstack/react-query@5.105.0", "", { "dependencies": { "@tanstack/query-core": "5.105.0" }, "peerDependencies": { "@types/react": "^18 || ^19", "react": "^18 || ^19" }, "optionalPeers": ["@types/react"] }, "sha512-y+hMuDERvgg6ay1da0V1a6ZC0ZONt7dELxSFkqRZuwm7p1TTZs0MoXrPlBRflIpRoYjvzQVYxycnLImpFLhWrw=="], - "@tanstack/react-table": ["@tanstack/react-table@8.21.3", "", { "dependencies": { "@tanstack/table-core": "8.21.3" }, "peerDependencies": { "react": ">=16.8", "react-dom": ">=16.8" } }, "sha512-5nNMTSETP4ykGegmVkhjcS8tTLW6Vl4axfEGQN3v0zdHYbK4UfoqfPChclTrJ4EoK9QynqAu9oUf8VEmrpZ5Ww=="], + "@tanstack/react-store": ["@tanstack/react-store@0.11.2", "", { "dependencies": { "@tanstack/store": "0.11.2", "use-sync-external-store": "^1.6.0" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-oj5O5DmiMWE+ih+SioX2ayC1kbK7d3fpLx0B75fPJr9nY3zU+hoW010yr64qXsY/9fyiLVE2bn5mGNV3owm8RQ=="], + + "@tanstack/react-table": ["@tanstack/react-table@9.3.1", "", { "dependencies": { "@tanstack/react-store": "^0.11.2", "@tanstack/table-core": "9.3.1" }, "peerDependencies": { "react": ">=18" } }, "sha512-E6Ya5TnY6EaGyZYIUqig/29Lr/gJSAubQkLJFqiWkUl5nRCr0Xr9hvJot+NiRTtG+TzGxHTiqUW3bnLtQxlHug=="], "@tanstack/react-virtual": ["@tanstack/react-virtual@3.14.10", "", { "dependencies": { "@tanstack/virtual-core": "3.17.8" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-SRyoUbdFMRHuYXMijV5H4ZarQWpXkj3iANq8OFre+pybeVap8ZJjZ3Nz9bVjx4d8PfobVUQUdKyyyHYk3E+djw=="], - "@tanstack/table-core": ["@tanstack/table-core@8.21.3", "", {}, "sha512-ldZXEhOBb8Is7xLs01fR3YEc3DERiz5silj8tnGkFZytt1abEvl/GhUmCE0PMLaMPTa3Jk4HbKmRlHmu+gCftg=="], + "@tanstack/store": ["@tanstack/store@0.11.2", "", {}, "sha512-sJ4mjol8uQsHV0gOJzzjwXfh2Fwm+Sz0+8deqiTm4jGbMdjzNSW+xZCFm0kUa870uhd8yi+DpKnZb5Kc4apa0Q=="], + + "@tanstack/table-core": ["@tanstack/table-core@9.3.1", "", { "dependencies": { "@tanstack/store": "^0.11.2" } }, "sha512-zQvlxSNi2qGM3L4jh85Z6hqMfdIR5qOfD9KHOU32nuKFJGN0RlJ7UvV1lsPb1fPVhpFYI0VP3jJGxLdLDpTKjQ=="], "@tanstack/virtual-core": ["@tanstack/virtual-core@3.17.8", "", {}, "sha512-BfEvehNpOT75r5Ksc5xW6NZuXujTfb7nlSEyVu4XHG3gdxNg1KqXruWbDewXOUaUYIo4oRbSfkjIajz4MAT8tA=="], @@ -1883,7 +1887,7 @@ "copy-anything": ["copy-anything@4.1.5", "", {}, "sha512-vePst2VLTSqPglW7Q98VwFpGiGpOHTyXIo81MO5VyLecA5zMbZw/P/V1vmwD1jksa2iJpn/YkDrJ3XhTfzUyhQ=="], - "copy-to-clipboard": ["copy-to-clipboard@3.3.3", "", { "dependencies": { "toggle-selection": "^1.0.6" } }, "sha512-2KV8NhB5JqC3ky0r9PMCAZKbUHSwtEo4CwCs0KXgruG43gX5PMqDEBbVU4OUzw2MuAWUfsuFmWvEKG5QRfSnJA=="], + "copy-to-clipboard": ["copy-to-clipboard@4.0.2", "", {}, "sha512-gklSft7IuhriZKHKpuoA1fpJSLPNgvUMWMo5BlnzAJm0zNKnznoSv23IjtNqclx8eKi6ZcdvFFzYEER/+U1LoQ=="], "core-js-pure": ["core-js-pure@3.51.0", "", { "hasInstallScript": true }, "sha512-NE4SFDJ+qzQeqHG2vVSNwopzS6zZNPYJ5kinIqs+OofTqGzOmICgT89E/yvS9XY7rwb3eU1utWXTJ9nVFqv74A=="], @@ -2787,7 +2791,7 @@ "react-is": ["react-is@16.13.1", "", {}, "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="], - "react-markdown": ["react-markdown@9.1.0", "", { "dependencies": { "@types/hast": "^3.0.0", "@types/mdast": "^4.0.0", "devlop": "^1.0.0", "hast-util-to-jsx-runtime": "^2.0.0", "html-url-attributes": "^3.0.0", "mdast-util-to-hast": "^13.0.0", "remark-parse": "^11.0.0", "remark-rehype": "^11.0.0", "unified": "^11.0.0", "unist-util-visit": "^5.0.0", "vfile": "^6.0.0" }, "peerDependencies": { "@types/react": ">=18", "react": ">=18" } }, "sha512-xaijuJB0kzGiUdG7nc2MOMDUDBWPyGAjZtUrow9XxUeua8IqeP+VlIfAZ3bphpcLTnSZXz6z9jcVC/TCwbfgdw=="], + "react-markdown": ["react-markdown@10.1.0", "", { "dependencies": { "@types/hast": "^3.0.0", "@types/mdast": "^4.0.0", "devlop": "^1.0.0", "hast-util-to-jsx-runtime": "^2.0.0", "html-url-attributes": "^3.0.0", "mdast-util-to-hast": "^13.0.0", "remark-parse": "^11.0.0", "remark-rehype": "^11.0.0", "unified": "^11.0.0", "unist-util-visit": "^5.0.0", "vfile": "^6.0.0" }, "peerDependencies": { "@types/react": ">=18", "react": ">=18" } }, "sha512-qKxVopLT/TyA6BX3Ue5NwabOsAzm0Q7kAPwq6L+wWDwisYs7R8vZ0nRXqq6rkueboxpkjvLGU9fWifiX/ZZFxQ=="], "react-redux": ["react-redux@9.3.0", "", { "dependencies": { "@types/use-sync-external-store": "^0.0.6", "use-sync-external-store": "^1.4.0" }, "peerDependencies": { "@types/react": "^18.2.25 || ^19", "react": "^18.0 || ^19", "redux": "^5.0.0" }, "optionalPeers": ["@types/react", "redux"] }, "sha512-KQopgqFo/p/fgmAs5qz6p5RWaNAzq40WAu7fJIXnQpYxFPbJYtsJPWvGeF2rOBaY/kEuV77AVsX8TsQzKm+A/g=="], @@ -3569,6 +3573,8 @@ "raw-body/iconv-lite": ["iconv-lite@0.4.24", "", { "dependencies": { "safer-buffer": ">= 2.1.2 < 3" } }, "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA=="], + "react-copy-to-clipboard/copy-to-clipboard": ["copy-to-clipboard@3.3.3", "", { "dependencies": { "toggle-selection": "^1.0.6" } }, "sha512-2KV8NhB5JqC3ky0r9PMCAZKbUHSwtEo4CwCs0KXgruG43gX5PMqDEBbVU4OUzw2MuAWUfsuFmWvEKG5QRfSnJA=="], + "readdirp/picomatch": ["picomatch@2.3.2", "", {}, "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA=="], "restore-cursor/onetime": ["onetime@7.0.0", "", { "dependencies": { "mimic-function": "^5.0.0" } }, "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ=="],