mirror of
https://github.com/fosrl/pangolin.git
synced 2026-06-05 23:28:44 +00:00
Merge pull request #3085 from marcschaeferger-org/security-updates
Normalize request parameters and update dependencies for Security
This commit is contained in:
@@ -49,7 +49,7 @@ import { build } from "@server/build";
|
||||
import { tierMatrix } from "@server/lib/billing/tierMatrix";
|
||||
import { UserType } from "@server/types/UserTypes";
|
||||
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
||||
import SetResourcePasswordForm from "components/SetResourcePasswordForm";
|
||||
import SetResourcePasswordForm from "@app/components/SetResourcePasswordForm";
|
||||
import { Binary, Bot, InfoIcon, Key } from "lucide-react";
|
||||
import { useTranslations } from "next-intl";
|
||||
import { useRouter } from "next/navigation";
|
||||
|
||||
@@ -101,16 +101,41 @@ ${colorConfig
|
||||
|
||||
const ChartTooltip = RechartsPrimitive.Tooltip;
|
||||
|
||||
type ChartTooltipValue = number | string | Array<number | string>;
|
||||
type ChartTooltipName = number | string;
|
||||
type ChartTooltipPayload = RechartsPrimitive.DefaultTooltipContentProps<
|
||||
ChartTooltipValue,
|
||||
ChartTooltipName
|
||||
>["payload"];
|
||||
type ChartTooltipPayloadItem = NonNullable<ChartTooltipPayload>[number];
|
||||
|
||||
type ChartTooltipContentProps = React.ComponentProps<"div"> & {
|
||||
active?: boolean;
|
||||
payload?: ChartTooltipPayload;
|
||||
label?: RechartsPrimitive.DefaultTooltipContentProps<
|
||||
ChartTooltipValue,
|
||||
ChartTooltipName
|
||||
>["label"];
|
||||
labelFormatter?: RechartsPrimitive.DefaultTooltipContentProps<
|
||||
ChartTooltipValue,
|
||||
ChartTooltipName
|
||||
>["labelFormatter"];
|
||||
formatter?: RechartsPrimitive.DefaultTooltipContentProps<
|
||||
ChartTooltipValue,
|
||||
ChartTooltipName
|
||||
>["formatter"];
|
||||
hideLabel?: boolean;
|
||||
hideIndicator?: boolean;
|
||||
indicator?: "line" | "dot" | "dashed";
|
||||
nameKey?: string;
|
||||
labelKey?: string;
|
||||
color?: string;
|
||||
labelClassName?: string;
|
||||
};
|
||||
|
||||
const ChartTooltipContent = React.forwardRef<
|
||||
HTMLDivElement,
|
||||
React.ComponentProps<typeof RechartsPrimitive.Tooltip> &
|
||||
React.ComponentProps<"div"> & {
|
||||
hideLabel?: boolean;
|
||||
hideIndicator?: boolean;
|
||||
indicator?: "line" | "dot" | "dashed";
|
||||
nameKey?: string;
|
||||
labelKey?: string;
|
||||
}
|
||||
ChartTooltipContentProps
|
||||
>(
|
||||
(
|
||||
{
|
||||
@@ -187,8 +212,11 @@ const ChartTooltipContent = React.forwardRef<
|
||||
{!nestLabel ? tooltipLabel : null}
|
||||
<div className="grid gap-1.5">
|
||||
{payload
|
||||
.filter((item) => item.type !== "none")
|
||||
.map((item, index) => {
|
||||
.filter(
|
||||
(item: ChartTooltipPayloadItem) =>
|
||||
item.type !== "none"
|
||||
)
|
||||
.map((item: ChartTooltipPayloadItem, index: number) => {
|
||||
const key = `${nameKey || item.name || item.dataKey || "value"}`;
|
||||
|
||||
const itemConfig = getPayloadConfigFromPayload(
|
||||
@@ -201,7 +229,7 @@ const ChartTooltipContent = React.forwardRef<
|
||||
|
||||
return (
|
||||
<div
|
||||
key={item.dataKey}
|
||||
key={String(item.dataKey ?? index)}
|
||||
className={cn(
|
||||
"flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",
|
||||
indicator === "dot" && "items-center"
|
||||
@@ -301,13 +329,20 @@ ChartTooltipContent.displayName = "ChartTooltip";
|
||||
|
||||
const ChartLegend = RechartsPrimitive.Legend;
|
||||
|
||||
type ChartLegendPayload =
|
||||
RechartsPrimitive.DefaultLegendContentProps["payload"];
|
||||
type ChartLegendPayloadItem = NonNullable<ChartLegendPayload>[number];
|
||||
|
||||
type ChartLegendContentProps = React.ComponentProps<"div"> & {
|
||||
payload?: ChartLegendPayload;
|
||||
verticalAlign?: RechartsPrimitive.DefaultLegendContentProps["verticalAlign"];
|
||||
hideIcon?: boolean;
|
||||
nameKey?: string;
|
||||
};
|
||||
|
||||
const ChartLegendContent = React.forwardRef<
|
||||
HTMLDivElement,
|
||||
React.ComponentProps<"div"> &
|
||||
Pick<RechartsPrimitive.LegendProps, "payload" | "verticalAlign"> & {
|
||||
hideIcon?: boolean;
|
||||
nameKey?: string;
|
||||
}
|
||||
ChartLegendContentProps
|
||||
>(
|
||||
(
|
||||
{
|
||||
@@ -335,8 +370,10 @@ const ChartLegendContent = React.forwardRef<
|
||||
)}
|
||||
>
|
||||
{payload
|
||||
.filter((item) => item.type !== "none")
|
||||
.map((item) => {
|
||||
.filter(
|
||||
(item: ChartLegendPayloadItem) => item.type !== "none"
|
||||
)
|
||||
.map((item: ChartLegendPayloadItem) => {
|
||||
const key = `${nameKey || item.dataKey || "value"}`;
|
||||
const itemConfig = getPayloadConfigFromPayload(
|
||||
config,
|
||||
|
||||
1
src/types/css.d.ts
vendored
Normal file
1
src/types/css.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
declare module "*.css";
|
||||
Reference in New Issue
Block a user