mirror of
https://github.com/coder/coder.git
synced 2025-07-12 00:14:10 +00:00
chore: remove unused exports (#18038)
This commit is contained in:
@ -8,10 +8,5 @@
|
||||
"@types/react-virtualized-auto-sizer",
|
||||
"jest_workaround",
|
||||
"ts-proto"
|
||||
],
|
||||
// Don't report unused exports of types as long as they are used within the file.
|
||||
"ignoreExportsUsedInFile": {
|
||||
"interface": true,
|
||||
"type": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
12
site/pnpm-lock.yaml
generated
12
site/pnpm-lock.yaml
generated
@ -4007,10 +4007,6 @@ packages:
|
||||
immediate@3.0.6:
|
||||
resolution: {integrity: sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==, tarball: https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz}
|
||||
|
||||
import-fresh@3.3.0:
|
||||
resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==, tarball: https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz}
|
||||
engines: {node: '>=6'}
|
||||
|
||||
import-fresh@3.3.1:
|
||||
resolution: {integrity: sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==, tarball: https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz}
|
||||
engines: {node: '>=6'}
|
||||
@ -9416,7 +9412,7 @@ snapshots:
|
||||
cosmiconfig@7.1.0:
|
||||
dependencies:
|
||||
'@types/parse-json': 4.0.0
|
||||
import-fresh: 3.3.0
|
||||
import-fresh: 3.3.1
|
||||
parse-json: 5.2.0
|
||||
path-type: 4.0.0
|
||||
yaml: 1.10.2
|
||||
@ -10318,16 +10314,10 @@ snapshots:
|
||||
|
||||
immediate@3.0.6: {}
|
||||
|
||||
import-fresh@3.3.0:
|
||||
dependencies:
|
||||
parent-module: 1.0.1
|
||||
resolve-from: 4.0.0
|
||||
|
||||
import-fresh@3.3.1:
|
||||
dependencies:
|
||||
parent-module: 1.0.1
|
||||
resolve-from: 4.0.0
|
||||
optional: true
|
||||
|
||||
import-local@3.2.0:
|
||||
dependencies:
|
||||
|
@ -11,7 +11,7 @@ export interface FieldError {
|
||||
detail: string;
|
||||
}
|
||||
|
||||
export type FieldErrors = Record<FieldError["field"], FieldError["detail"]>;
|
||||
type FieldErrors = Record<FieldError["field"], FieldError["detail"]>;
|
||||
|
||||
export interface ApiErrorResponse {
|
||||
message: string;
|
||||
@ -19,7 +19,7 @@ export interface ApiErrorResponse {
|
||||
validations?: FieldError[];
|
||||
}
|
||||
|
||||
export type ApiError = AxiosError<ApiErrorResponse> & {
|
||||
type ApiError = AxiosError<ApiErrorResponse> & {
|
||||
response: AxiosResponse<ApiErrorResponse>;
|
||||
};
|
||||
|
||||
|
@ -355,7 +355,7 @@ export const agentLogs = (agentId: string) => {
|
||||
};
|
||||
|
||||
// workspace usage options
|
||||
export interface WorkspaceUsageOptions {
|
||||
interface WorkspaceUsageOptions {
|
||||
usageApp: UsageAppName;
|
||||
connectionStatus: ConnectionStatus;
|
||||
workspaceId: string | undefined;
|
||||
|
@ -20,7 +20,7 @@ const chartConfig = {
|
||||
color: "hsl(var(--highlight-purple))",
|
||||
},
|
||||
} satisfies ChartConfig;
|
||||
export interface ActiveUserChartProps {
|
||||
interface ActiveUserChartProps {
|
||||
data: { date: string; amount: number }[];
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Avatar } from "components/Avatar/Avatar";
|
||||
import type { FC, ReactNode } from "react";
|
||||
|
||||
export interface AvatarDataProps {
|
||||
interface AvatarDataProps {
|
||||
title: ReactNode;
|
||||
subtitle?: ReactNode;
|
||||
src?: string;
|
||||
|
@ -50,7 +50,7 @@ const badgeVariants = cva(
|
||||
},
|
||||
);
|
||||
|
||||
export interface BadgeProps
|
||||
interface BadgeProps
|
||||
extends React.HTMLAttributes<HTMLDivElement>,
|
||||
VariantProps<typeof badgeVariants> {
|
||||
asChild?: boolean;
|
||||
|
@ -3,7 +3,7 @@ import type { FC } from "react";
|
||||
import { MONOSPACE_FONT_FAMILY } from "theme/constants";
|
||||
import { CopyButton } from "../CopyButton/CopyButton";
|
||||
|
||||
export interface CodeExampleProps {
|
||||
interface CodeExampleProps {
|
||||
code: string;
|
||||
secret?: boolean;
|
||||
className?: string;
|
||||
|
@ -20,7 +20,7 @@ const collapsibleSummaryVariants = cva(
|
||||
},
|
||||
);
|
||||
|
||||
export interface CollapsibleSummaryProps
|
||||
interface CollapsibleSummaryProps
|
||||
extends VariantProps<typeof collapsibleSummaryVariants> {
|
||||
/**
|
||||
* The label to display for the collapsible section
|
||||
|
@ -5,7 +5,7 @@ import {
|
||||
type ReactNode,
|
||||
} from "react";
|
||||
|
||||
export interface CondProps {
|
||||
interface CondProps {
|
||||
condition?: boolean;
|
||||
children?: ReactNode;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ import { type FC, type FormEvent, useId, useState } from "react";
|
||||
import { Stack } from "../../Stack/Stack";
|
||||
import { ConfirmDialog } from "../ConfirmDialog/ConfirmDialog";
|
||||
|
||||
export interface DeleteDialogProps {
|
||||
interface DeleteDialogProps {
|
||||
isOpen: boolean;
|
||||
onConfirm: () => void;
|
||||
onCancel: () => void;
|
||||
|
@ -4,7 +4,7 @@ import Link from "@mui/material/Link";
|
||||
import { DropdownArrow } from "components/DropdownArrow/DropdownArrow";
|
||||
import type { FC, ReactNode } from "react";
|
||||
|
||||
export interface ExpanderProps {
|
||||
interface ExpanderProps {
|
||||
expanded: boolean;
|
||||
setExpanded: (val: boolean) => void;
|
||||
children?: ReactNode;
|
||||
|
@ -6,7 +6,7 @@ import { useClickable } from "hooks/useClickable";
|
||||
import { CloudUploadIcon, FolderIcon, TrashIcon } from "lucide-react";
|
||||
import { type DragEvent, type FC, type ReactNode, useRef } from "react";
|
||||
|
||||
export interface FileUploadProps {
|
||||
interface FileUploadProps {
|
||||
isUploading: boolean;
|
||||
onUpload: (file: File) => void;
|
||||
onRemove?: () => void;
|
||||
|
@ -18,7 +18,7 @@ import { ChevronDownIcon } from "lucide-react";
|
||||
import { type FC, type ReactNode, useEffect, useRef, useState } from "react";
|
||||
import type { useSearchParams } from "react-router-dom";
|
||||
|
||||
export type PresetFilter = {
|
||||
type PresetFilter = {
|
||||
name: string;
|
||||
query: string;
|
||||
};
|
||||
|
@ -20,7 +20,7 @@ export type SelectFilterOption = {
|
||||
value: string;
|
||||
};
|
||||
|
||||
export type SelectFilterProps = {
|
||||
type SelectFilterProps = {
|
||||
options: SelectFilterOption[] | undefined;
|
||||
selectedOption?: SelectFilterOption;
|
||||
// Used to add a accessibility label to the select
|
||||
|
@ -7,7 +7,7 @@ import {
|
||||
} from "components/PageHeader/PageHeader";
|
||||
import type { FC, ReactNode } from "react";
|
||||
|
||||
export interface FullPageHorizontalFormProps {
|
||||
interface FullPageHorizontalFormProps {
|
||||
title: string;
|
||||
detail?: ReactNode;
|
||||
onCancel?: () => void;
|
||||
|
@ -9,7 +9,7 @@ import type { FC } from "react";
|
||||
|
||||
type EnterpriseSnackbarVariant = "error" | "info" | "success";
|
||||
|
||||
export interface EnterpriseSnackbarProps extends MuiSnackbarProps {
|
||||
interface EnterpriseSnackbarProps extends MuiSnackbarProps {
|
||||
/** Called when the snackbar should close, either from timeout or clicking close */
|
||||
onClose: () => void;
|
||||
/** Variant of snackbar, for theming */
|
||||
|
@ -23,7 +23,7 @@ const linkVariants = cva(
|
||||
},
|
||||
);
|
||||
|
||||
export interface LinkProps
|
||||
interface LinkProps
|
||||
extends React.AnchorHTMLAttributes<HTMLAnchorElement>,
|
||||
VariantProps<typeof linkVariants> {
|
||||
asChild?: boolean;
|
||||
|
@ -5,7 +5,7 @@ import { type Line, LogLine, LogLinePrefix } from "./LogLine";
|
||||
|
||||
export const DEFAULT_LOG_LINE_SIDE_PADDING = 24;
|
||||
|
||||
export interface LogsProps {
|
||||
interface LogsProps {
|
||||
lines: Line[];
|
||||
hideTimestamps?: boolean;
|
||||
className?: string;
|
||||
|
@ -97,7 +97,7 @@ interface MultiSelectComboboxProps {
|
||||
hideClearAllButton?: boolean;
|
||||
}
|
||||
|
||||
export interface MultiSelectComboboxRef {
|
||||
interface MultiSelectComboboxRef {
|
||||
selectedValue: Option[];
|
||||
input: HTMLInputElement;
|
||||
focus: () => void;
|
||||
|
@ -10,7 +10,7 @@ import { AvatarData } from "components/Avatar/AvatarData";
|
||||
import { type ComponentProps, type FC, useEffect, useState } from "react";
|
||||
import { useQuery } from "react-query";
|
||||
|
||||
export type OrganizationAutocompleteProps = {
|
||||
type OrganizationAutocompleteProps = {
|
||||
onChange: (organization: Organization | null) => void;
|
||||
label?: string;
|
||||
className?: string;
|
||||
|
@ -1,7 +1,7 @@
|
||||
import type { FC, PropsWithChildren, ReactNode } from "react";
|
||||
import { Stack } from "../Stack/Stack";
|
||||
|
||||
export interface PageHeaderProps {
|
||||
interface PageHeaderProps {
|
||||
actions?: ReactNode;
|
||||
className?: string;
|
||||
children?: ReactNode;
|
||||
|
@ -6,7 +6,7 @@ import { Stack } from "components/Stack/Stack";
|
||||
import { CircleCheckBigIcon } from "lucide-react";
|
||||
import type { FC, ReactNode } from "react";
|
||||
|
||||
export interface PaywallProps {
|
||||
interface PaywallProps {
|
||||
message: string;
|
||||
description?: ReactNode;
|
||||
documentationLink?: string;
|
||||
|
@ -6,7 +6,7 @@ import { Stack } from "components/Stack/Stack";
|
||||
import { CircleCheckBigIcon } from "lucide-react";
|
||||
import type { FC, ReactNode } from "react";
|
||||
|
||||
export interface PopoverPaywallProps {
|
||||
interface PopoverPaywallProps {
|
||||
message: string;
|
||||
description?: ReactNode;
|
||||
documentationLink?: string;
|
||||
|
@ -11,7 +11,7 @@ import {
|
||||
} from "react";
|
||||
import type { ThemeRole } from "theme/roles";
|
||||
|
||||
export type PillProps = HTMLAttributes<HTMLDivElement> & {
|
||||
type PillProps = HTMLAttributes<HTMLDivElement> & {
|
||||
icon?: ReactNode;
|
||||
type?: ThemeRole;
|
||||
size?: "md" | "lg";
|
||||
|
@ -121,7 +121,7 @@ const styles = {
|
||||
}),
|
||||
} satisfies Record<string, Interpolation<Theme>>;
|
||||
|
||||
export interface ParameterLabelProps {
|
||||
interface ParameterLabelProps {
|
||||
parameter: TemplateVersionParameter;
|
||||
isPreset?: boolean;
|
||||
}
|
||||
@ -191,10 +191,7 @@ const ParameterLabel: FC<ParameterLabelProps> = ({ parameter, isPreset }) => {
|
||||
|
||||
type Size = "medium" | "small";
|
||||
|
||||
export type RichParameterInputProps = Omit<
|
||||
TextFieldProps,
|
||||
"size" | "onChange"
|
||||
> & {
|
||||
type RichParameterInputProps = Omit<TextFieldProps, "size" | "onChange"> & {
|
||||
parameter: TemplateVersionParameter;
|
||||
parameterAutofill?: AutofillBuildParameter;
|
||||
onChange: (value: string) => void;
|
||||
|
@ -29,7 +29,7 @@ export const SelectMenuTrigger = PopoverTrigger;
|
||||
|
||||
export const SelectMenuContent = PopoverContent;
|
||||
|
||||
export type SelectMenuButtonProps = ButtonProps & {
|
||||
type SelectMenuButtonProps = ButtonProps & {
|
||||
startIcon?: React.ReactNode;
|
||||
};
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import type { CSSObject } from "@emotion/react";
|
||||
import { forwardRef } from "react";
|
||||
|
||||
export type StackProps = {
|
||||
type StackProps = {
|
||||
className?: string;
|
||||
direction?: "column" | "row";
|
||||
spacing?: number;
|
||||
|
@ -6,7 +6,7 @@ import {
|
||||
} from "components/EmptyState/EmptyState";
|
||||
import type { FC } from "react";
|
||||
|
||||
export type TableEmptyProps = EmptyStateProps;
|
||||
type TableEmptyProps = EmptyStateProps;
|
||||
|
||||
export const TableEmpty: FC<TableEmptyProps> = (props) => {
|
||||
return (
|
||||
|
@ -2,7 +2,7 @@ import Chip from "@mui/material/Chip";
|
||||
import FormHelperText from "@mui/material/FormHelperText";
|
||||
import { type FC, useId, useMemo } from "react";
|
||||
|
||||
export type TagInputProps = {
|
||||
type TagInputProps = {
|
||||
label: string;
|
||||
id?: string;
|
||||
values: string[];
|
||||
|
@ -22,7 +22,7 @@ const groupByDate = <TData,>(
|
||||
return itemsByDate;
|
||||
};
|
||||
|
||||
export interface TimelineProps<TData> {
|
||||
interface TimelineProps<TData> {
|
||||
items: readonly TData[];
|
||||
getDate: GetDateFn<TData>;
|
||||
row: (item: TData) => JSX.Element;
|
||||
|
@ -19,13 +19,13 @@ import { keepPreviousData, useQuery } from "react-query";
|
||||
import { prepareQuery } from "utils/filters";
|
||||
|
||||
// The common properties between users and org members that we need.
|
||||
export type SelectedUser = {
|
||||
type SelectedUser = {
|
||||
avatar_url?: string;
|
||||
email: string;
|
||||
username: string;
|
||||
};
|
||||
|
||||
export type CommonAutocompleteProps<T extends SelectedUser> = {
|
||||
type CommonAutocompleteProps<T extends SelectedUser> = {
|
||||
className?: string;
|
||||
label?: string;
|
||||
onChange: (user: T | null) => void;
|
||||
@ -34,7 +34,7 @@ export type CommonAutocompleteProps<T extends SelectedUser> = {
|
||||
value: T | null;
|
||||
};
|
||||
|
||||
export type UserAutocompleteProps = CommonAutocompleteProps<User>;
|
||||
type UserAutocompleteProps = CommonAutocompleteProps<User>;
|
||||
|
||||
export const UserAutocomplete: FC<UserAutocompleteProps> = (props) => {
|
||||
const [filter, setFilter] = useState<string>();
|
||||
@ -58,7 +58,7 @@ export const UserAutocomplete: FC<UserAutocompleteProps> = (props) => {
|
||||
);
|
||||
};
|
||||
|
||||
export type MemberAutocompleteProps =
|
||||
type MemberAutocompleteProps =
|
||||
CommonAutocompleteProps<OrganizationMemberWithUserData> & {
|
||||
organizationId: string;
|
||||
};
|
||||
|
@ -1,13 +1,13 @@
|
||||
import { useSearchParams } from "react-router-dom";
|
||||
|
||||
export type UseSearchParamsKeyConfig = Readonly<{
|
||||
type UseSearchParamsKeyConfig = Readonly<{
|
||||
key: string;
|
||||
searchParams?: URLSearchParams;
|
||||
defaultValue?: string;
|
||||
replace?: boolean;
|
||||
}>;
|
||||
|
||||
export type UseSearchParamKeyResult = Readonly<{
|
||||
type UseSearchParamKeyResult = Readonly<{
|
||||
value: string;
|
||||
setValue: (newValue: string) => void;
|
||||
deleteValue: () => void;
|
||||
|
@ -79,7 +79,7 @@ export const openAppInNewWindow = (href: string) => {
|
||||
window.open(href, "_blank", "width=900,height=600");
|
||||
};
|
||||
|
||||
export type GetAppHrefParams = {
|
||||
type GetAppHrefParams = {
|
||||
path: string;
|
||||
host: string;
|
||||
workspace: Workspace;
|
||||
|
@ -6,7 +6,7 @@ import { useClassName } from "hooks/useClassName";
|
||||
import type { FC } from "react";
|
||||
import { getDisplayWorkspaceBuildStatus } from "utils/workspace";
|
||||
|
||||
export interface BuildAvatarProps {
|
||||
interface BuildAvatarProps {
|
||||
build: WorkspaceBuild;
|
||||
size?: AvatarProps["size"];
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ import { InlineMarkdown } from "components/Markdown/Markdown";
|
||||
import type { FC } from "react";
|
||||
import { readableForegroundColor } from "utils/colors";
|
||||
|
||||
export interface AnnouncementBannerViewProps {
|
||||
interface AnnouncementBannerViewProps {
|
||||
message?: string;
|
||||
backgroundColor?: string;
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ import { getDisplayWorkspaceStatus } from "utils/workspace";
|
||||
|
||||
const bannerHeight = 36;
|
||||
|
||||
export interface DeploymentBannerViewProps {
|
||||
interface DeploymentBannerViewProps {
|
||||
health?: HealthcheckReport;
|
||||
stats?: DeploymentStats;
|
||||
fetchStats?: () => void;
|
||||
|
@ -36,7 +36,7 @@ const formatMessage = (message: string) => {
|
||||
return message;
|
||||
};
|
||||
|
||||
export interface LicenseBannerViewProps {
|
||||
interface LicenseBannerViewProps {
|
||||
errors: readonly string[];
|
||||
warnings: readonly string[];
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ import { MobileMenu } from "./MobileMenu";
|
||||
import { ProxyMenu } from "./ProxyMenu";
|
||||
import { UserDropdown } from "./UserDropdown/UserDropdown";
|
||||
|
||||
export interface NavbarViewProps {
|
||||
interface NavbarViewProps {
|
||||
logo_url?: string;
|
||||
user?: TypesGen.User;
|
||||
buildInfo?: TypesGen.BuildInfoResponse;
|
||||
|
@ -9,7 +9,7 @@ import {
|
||||
import { type FC, useState } from "react";
|
||||
import { UserDropdownContent } from "./UserDropdownContent";
|
||||
|
||||
export interface UserDropdownProps {
|
||||
interface UserDropdownProps {
|
||||
user: TypesGen.User;
|
||||
buildInfo?: TypesGen.BuildInfoResponse;
|
||||
supportLinks?: readonly TypesGen.LinkConfig[];
|
||||
|
@ -28,7 +28,7 @@ export const Language = {
|
||||
copyrightText: `\u00a9 ${new Date().getFullYear()} Coder Technologies, Inc.`,
|
||||
};
|
||||
|
||||
export interface UserDropdownContentProps {
|
||||
interface UserDropdownContentProps {
|
||||
user: TypesGen.User;
|
||||
buildInfo?: TypesGen.BuildInfoResponse;
|
||||
supportLinks?: readonly TypesGen.LinkConfig[];
|
||||
|
@ -24,7 +24,7 @@ export const OrganizationSettingsContext = createContext<
|
||||
OrganizationSettingsValue | undefined
|
||||
>(undefined);
|
||||
|
||||
export type OrganizationSettingsValue = Readonly<{
|
||||
type OrganizationSettingsValue = Readonly<{
|
||||
organizations: readonly Organization[];
|
||||
organizationPermissionsByOrganizationId: Record<
|
||||
string,
|
||||
|
@ -9,7 +9,7 @@ import {
|
||||
import { Link } from "components/Link/Link";
|
||||
import type { FC, ReactNode } from "react";
|
||||
|
||||
export interface RequirePermissionProps {
|
||||
interface RequirePermissionProps {
|
||||
children?: ReactNode;
|
||||
isFeatureVisible: boolean;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ export type Permissions = {
|
||||
[k in PermissionName]: boolean;
|
||||
};
|
||||
|
||||
export type PermissionName = keyof typeof permissionChecks;
|
||||
type PermissionName = keyof typeof permissionChecks;
|
||||
|
||||
/**
|
||||
* Site-wide permission checks
|
||||
|
@ -23,7 +23,7 @@ import type { OneWayWebSocket } from "utils/OneWayWebSocket";
|
||||
|
||||
type ItemStatus = "stale" | "valid" | "loading";
|
||||
|
||||
export interface AgentMetadataViewProps {
|
||||
interface AgentMetadataViewProps {
|
||||
metadata: WorkspaceAgentMetadata[];
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@ interface AgentRowPreviewStyles {
|
||||
// When it is only one row, it is better to have than "flex" and not hard aligned
|
||||
alignValues?: boolean;
|
||||
}
|
||||
export interface AgentRowPreviewProps extends AgentRowPreviewStyles {
|
||||
interface AgentRowPreviewProps extends AgentRowPreviewStyles {
|
||||
agent: WorkspaceAgent;
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@ export const DisplayAppNameMap: Record<TypesGen.DisplayApp, string> = {
|
||||
web_terminal: "Terminal",
|
||||
};
|
||||
|
||||
export interface AppLinkProps {
|
||||
interface AppLinkProps {
|
||||
workspace: TypesGen.Workspace;
|
||||
app: TypesGen.WorkspaceApp;
|
||||
agent: TypesGen.WorkspaceAgent;
|
||||
|
@ -4,7 +4,7 @@ import Tooltip from "@mui/material/Tooltip";
|
||||
import type * as TypesGen from "api/typesGenerated";
|
||||
import { SquareArrowOutUpRightIcon } from "lucide-react";
|
||||
|
||||
export interface ShareIconProps {
|
||||
interface ShareIconProps {
|
||||
app: TypesGen.WorkspaceApp;
|
||||
}
|
||||
|
||||
|
@ -62,7 +62,7 @@ import {
|
||||
} from "utils/portForward";
|
||||
import * as Yup from "yup";
|
||||
|
||||
export interface PortForwardButtonProps {
|
||||
interface PortForwardButtonProps {
|
||||
host: string;
|
||||
username: string;
|
||||
workspaceName: string;
|
||||
|
@ -3,7 +3,7 @@ import { Avatar } from "components/Avatar/Avatar";
|
||||
import type { FC } from "react";
|
||||
import { getResourceIconPath } from "utils/workspace";
|
||||
|
||||
export type ResourceAvatarProps = { resource: WorkspaceResource };
|
||||
type ResourceAvatarProps = { resource: WorkspaceResource };
|
||||
|
||||
export const ResourceAvatar: FC<ResourceAvatarProps> = ({ resource }) => {
|
||||
const avatarSrc = resource.icon || getResourceIconPath(resource.type);
|
||||
|
@ -70,7 +70,7 @@ const styles = {
|
||||
}),
|
||||
} satisfies Record<string, Interpolation<Theme>>;
|
||||
|
||||
export interface ResourceCardProps {
|
||||
interface ResourceCardProps {
|
||||
resource: WorkspaceResource;
|
||||
agentRow: (agent: WorkspaceAgent) => JSX.Element;
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ import { ChevronDownIcon } from "lucide-react";
|
||||
import type { FC } from "react";
|
||||
import { docs } from "utils/docs";
|
||||
|
||||
export interface AgentSSHButtonProps {
|
||||
interface AgentSSHButtonProps {
|
||||
workspaceName: string;
|
||||
agentName: string;
|
||||
sshPrefix?: string;
|
||||
@ -82,7 +82,7 @@ export const AgentSSHButton: FC<AgentSSHButtonProps> = ({
|
||||
);
|
||||
};
|
||||
|
||||
export interface AgentDevcontainerSSHButtonProps {
|
||||
interface AgentDevcontainerSSHButtonProps {
|
||||
workspace: string;
|
||||
container: string;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ import type { FC, MouseEvent } from "react";
|
||||
import { AgentButton } from "../AgentButton";
|
||||
import { DisplayAppNameMap } from "../AppLink/AppLink";
|
||||
|
||||
export interface TerminalLinkProps {
|
||||
interface TerminalLinkProps {
|
||||
workspaceName: string;
|
||||
agentName?: string;
|
||||
userName?: string;
|
||||
|
@ -10,7 +10,7 @@ import { type FC, useRef, useState } from "react";
|
||||
import { AgentButton } from "../AgentButton";
|
||||
import { DisplayAppNameMap } from "../AppLink/AppLink";
|
||||
|
||||
export interface VSCodeDesktopButtonProps {
|
||||
interface VSCodeDesktopButtonProps {
|
||||
userName: string;
|
||||
workspaceName: string;
|
||||
agentName?: string;
|
||||
|
@ -9,7 +9,7 @@ import { type FC, useRef, useState } from "react";
|
||||
import { AgentButton } from "../AgentButton";
|
||||
import { DisplayAppNameMap } from "../AppLink/AppLink";
|
||||
|
||||
export interface VSCodeDevContainerButtonProps {
|
||||
interface VSCodeDevContainerButtonProps {
|
||||
userName: string;
|
||||
workspaceName: string;
|
||||
agentName?: string;
|
||||
|
@ -3,7 +3,7 @@ import { AgentRowPreview } from "modules/resources/AgentRowPreview";
|
||||
import { Resources } from "modules/resources/Resources";
|
||||
import type { FC } from "react";
|
||||
|
||||
export interface TemplateResourcesProps {
|
||||
interface TemplateResourcesProps {
|
||||
resources: WorkspaceResource[];
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ import { type FC, useEffect, useId, useRef, useState } from "react";
|
||||
import type { AutofillBuildParameter } from "utils/richParameters";
|
||||
import * as Yup from "yup";
|
||||
|
||||
export interface DynamicParameterProps {
|
||||
interface DynamicParameterProps {
|
||||
parameter: PreviewParameter;
|
||||
value?: string;
|
||||
onChange: (value: string) => void;
|
||||
|
@ -8,7 +8,7 @@ import {
|
||||
relativeTimeWithoutSuffix,
|
||||
} from "utils/time";
|
||||
|
||||
export type WorkspaceDormantBadgeProps = {
|
||||
type WorkspaceDormantBadgeProps = {
|
||||
workspace: Workspace;
|
||||
};
|
||||
|
||||
|
@ -20,7 +20,7 @@ import { type FC, useState } from "react";
|
||||
import { useQuery } from "react-query";
|
||||
import { createDayString } from "utils/createDayString";
|
||||
|
||||
export type ChangeWorkspaceVersionDialogProps = DialogProps & {
|
||||
type ChangeWorkspaceVersionDialogProps = DialogProps & {
|
||||
workspace: Workspace;
|
||||
onClose: () => void;
|
||||
onConfirm: (version: TemplateVersion) => void;
|
||||
|
@ -22,7 +22,7 @@ import {
|
||||
} from "utils/richParameters";
|
||||
import * as Yup from "yup";
|
||||
|
||||
export type UpdateBuildParametersDialogProps = DialogProps & {
|
||||
type UpdateBuildParametersDialogProps = DialogProps & {
|
||||
onClose: () => void;
|
||||
onUpdate: (buildParameters: WorkspaceBuildParameter[]) => void;
|
||||
missedParameters: TemplateVersionParameter[];
|
||||
|
@ -36,7 +36,7 @@ type ResourceTiming = {
|
||||
range: TimeRange;
|
||||
};
|
||||
|
||||
export type ResourcesChartProps = {
|
||||
type ResourcesChartProps = {
|
||||
stage: Stage;
|
||||
timings: ResourceTiming[];
|
||||
onBack: () => void;
|
||||
|
@ -36,7 +36,7 @@ type ScriptTiming = {
|
||||
range: TimeRange;
|
||||
};
|
||||
|
||||
export type ScriptsChartProps = {
|
||||
type ScriptsChartProps = {
|
||||
stage: Stage;
|
||||
timings: ScriptTiming[];
|
||||
onBack: () => void;
|
||||
|
@ -70,7 +70,7 @@ type StageTiming = {
|
||||
error?: boolean;
|
||||
};
|
||||
|
||||
export type StagesChartProps = {
|
||||
type StagesChartProps = {
|
||||
timings: StageTiming[];
|
||||
onSelectStage: (stage: Stage) => void;
|
||||
};
|
||||
|
@ -96,7 +96,7 @@ export const useActionFilterMenu = ({
|
||||
});
|
||||
};
|
||||
|
||||
export type ActionFilterMenu = ReturnType<typeof useActionFilterMenu>;
|
||||
type ActionFilterMenu = ReturnType<typeof useActionFilterMenu>;
|
||||
|
||||
interface ActionMenuProps {
|
||||
menu: ActionFilterMenu;
|
||||
@ -154,9 +154,7 @@ export const useResourceTypeFilterMenu = ({
|
||||
});
|
||||
};
|
||||
|
||||
export type ResourceTypeFilterMenu = ReturnType<
|
||||
typeof useResourceTypeFilterMenu
|
||||
>;
|
||||
type ResourceTypeFilterMenu = ReturnType<typeof useResourceTypeFilterMenu>;
|
||||
|
||||
interface ResourceTypeMenuProps {
|
||||
menu: ResourceTypeFilterMenu;
|
||||
|
@ -37,7 +37,7 @@ const httpStatusColor = (httpStatus: number): ThemeRole => {
|
||||
return "success";
|
||||
};
|
||||
|
||||
export interface AuditLogRowProps {
|
||||
interface AuditLogRowProps {
|
||||
auditLog: AuditLog;
|
||||
// Useful for Storybook
|
||||
defaultIsDiffOpen?: boolean;
|
||||
|
@ -31,7 +31,7 @@ const Language = {
|
||||
subtitle: "View events in your audit log.",
|
||||
};
|
||||
|
||||
export interface AuditPageViewProps {
|
||||
interface AuditPageViewProps {
|
||||
auditLogs?: readonly AuditLog[];
|
||||
isNonInitialPage: boolean;
|
||||
isAuditLogVisible: boolean;
|
||||
|
@ -24,7 +24,7 @@ import {
|
||||
import { useMutation, useQuery, useQueryClient } from "react-query";
|
||||
import { Link, Outlet, useNavigate, useParams } from "react-router-dom";
|
||||
|
||||
export interface ChatContext {
|
||||
interface ChatContext {
|
||||
selectedModel: string;
|
||||
modelConfig: LanguageModelConfig;
|
||||
|
||||
@ -38,7 +38,7 @@ export const useChatContext = (): ChatContext => {
|
||||
return context;
|
||||
};
|
||||
|
||||
export const ChatContext = createContext<ChatContext | undefined>(undefined);
|
||||
const ChatContext = createContext<ChatContext | undefined>(undefined);
|
||||
|
||||
const SELECTED_MODEL_KEY = "coder_chat_selected_model";
|
||||
|
||||
|
@ -7,7 +7,7 @@ import { CheckIcon, CopyIcon } from "lucide-react";
|
||||
import type { FC } from "react";
|
||||
import { Link as RouterLink } from "react-router-dom";
|
||||
|
||||
export interface CliAuthPageViewProps {
|
||||
interface CliAuthPageViewProps {
|
||||
sessionToken?: string;
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@ import { Link as RouterLink } from "react-router-dom";
|
||||
import type { StarterTemplatesByTag } from "utils/starterTemplates";
|
||||
import { StarterTemplates } from "./StarterTemplates";
|
||||
|
||||
export interface CreateTemplateGalleryPageViewProps {
|
||||
interface CreateTemplateGalleryPageViewProps {
|
||||
starterTemplatesByTag?: StarterTemplatesByTag;
|
||||
error?: unknown;
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ const sortVisibleTemplates = (templates: TemplateExample[]) => {
|
||||
});
|
||||
};
|
||||
|
||||
export interface StarterTemplatesProps {
|
||||
interface StarterTemplatesProps {
|
||||
starterTemplatesByTag?: StarterTemplatesByTag;
|
||||
}
|
||||
|
||||
|
@ -172,7 +172,7 @@ type CopiedTemplateForm = { copiedTemplate: Template };
|
||||
type StarterTemplateForm = { starterTemplate: TemplateExample };
|
||||
type UploadTemplateForm = { upload: TemplateUploadProps };
|
||||
|
||||
export type CreateTemplateFormProps = (
|
||||
type CreateTemplateFormProps = (
|
||||
| CopiedTemplateForm
|
||||
| StarterTemplateForm
|
||||
| UploadTemplateForm
|
||||
|
@ -27,7 +27,7 @@ const VariableLabel: FC<VariableLabelProps> = ({ variable }) => {
|
||||
);
|
||||
};
|
||||
|
||||
export interface VariableInputProps {
|
||||
interface VariableInputProps {
|
||||
disabled?: boolean;
|
||||
variable: TemplateVersionVariable;
|
||||
onChange: (value: string) => void;
|
||||
|
@ -77,7 +77,7 @@ type CreateUserFormData = {
|
||||
readonly password: string;
|
||||
};
|
||||
|
||||
export interface CreateUserFormProps {
|
||||
interface CreateUserFormProps {
|
||||
error?: unknown;
|
||||
isLoading: boolean;
|
||||
onSubmit: (user: CreateUserFormData) => void;
|
||||
|
@ -38,8 +38,8 @@ import {
|
||||
} from "./permissions";
|
||||
|
||||
const createWorkspaceModes = ["form", "auto", "duplicate"] as const;
|
||||
export type CreateWorkspaceMode = (typeof createWorkspaceModes)[number];
|
||||
export type ExternalAuthPollingState = "idle" | "polling" | "abandoned";
|
||||
type CreateWorkspaceMode = (typeof createWorkspaceModes)[number];
|
||||
type ExternalAuthPollingState = "idle" | "polling" | "abandoned";
|
||||
|
||||
const CreateWorkspacePageExperimental: FC = () => {
|
||||
const { organization: organizationName = "default", template: templateName } =
|
||||
|
@ -60,7 +60,7 @@ export const Language = {
|
||||
"Duplicating a workspace only copies its parameters. No state from the old workspace is copied over.",
|
||||
} as const;
|
||||
|
||||
export interface CreateWorkspacePageViewProps {
|
||||
interface CreateWorkspacePageViewProps {
|
||||
mode: CreateWorkspaceMode;
|
||||
defaultName?: string | null;
|
||||
disabledParams?: string[];
|
||||
|
@ -61,7 +61,7 @@ import { ExperimentalFormContext } from "./ExperimentalFormContext";
|
||||
import { ExternalAuthButton } from "./ExternalAuthButton";
|
||||
import type { CreateWorkspacePermissions } from "./permissions";
|
||||
|
||||
export interface CreateWorkspacePageViewExperimentalProps {
|
||||
interface CreateWorkspacePageViewExperimentalProps {
|
||||
autofillParameters: AutofillBuildParameter[];
|
||||
creatingWorkspace: boolean;
|
||||
defaultName?: string | null;
|
||||
|
@ -12,7 +12,7 @@ import {
|
||||
import { Check, Redo } from "lucide-react";
|
||||
import type { FC } from "react";
|
||||
|
||||
export interface ExternalAuthButtonProps {
|
||||
interface ExternalAuthButtonProps {
|
||||
auth: TemplateVersionExternalAuth;
|
||||
displayRetry: boolean;
|
||||
isLoading: boolean;
|
||||
|
@ -4,7 +4,7 @@ import { Avatar } from "components/Avatar/Avatar";
|
||||
import { Stack } from "components/Stack/Stack";
|
||||
import type { FC } from "react";
|
||||
|
||||
export interface SelectedTemplateProps {
|
||||
interface SelectedTemplateProps {
|
||||
template: Template | TemplateExample;
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@ import { getFormHelpers } from "utils/formUtils";
|
||||
import { Fieldset } from "../Fieldset";
|
||||
import { AnnouncementBannerSettings } from "./AnnouncementBannerSettings";
|
||||
|
||||
export type AppearanceSettingsPageViewProps = {
|
||||
type AppearanceSettingsPageViewProps = {
|
||||
appearance: UpdateAppearanceConfig;
|
||||
isEntitled: boolean;
|
||||
isPremium: boolean;
|
||||
|
@ -17,7 +17,7 @@ import {
|
||||
import type { FC } from "react";
|
||||
import { docs } from "utils/docs";
|
||||
|
||||
export type ExternalAuthSettingsPageViewProps = {
|
||||
type ExternalAuthSettingsPageViewProps = {
|
||||
config: DeploymentValues;
|
||||
};
|
||||
|
||||
|
@ -32,7 +32,7 @@ const chartConfig = {
|
||||
},
|
||||
} satisfies ChartConfig;
|
||||
|
||||
export type LicenseSeatConsumptionChartProps = {
|
||||
type LicenseSeatConsumptionChartProps = {
|
||||
limit: number | undefined;
|
||||
data:
|
||||
| {
|
||||
|
@ -15,7 +15,7 @@ import {
|
||||
import { docs } from "utils/docs";
|
||||
import OptionsTable from "../OptionsTable";
|
||||
|
||||
export type NetworkSettingsPageViewProps = {
|
||||
type NetworkSettingsPageViewProps = {
|
||||
options: SerpentOption[];
|
||||
};
|
||||
|
||||
|
@ -30,7 +30,7 @@ import { Link as RouterLink, useSearchParams } from "react-router-dom";
|
||||
import { createDayString } from "utils/createDayString";
|
||||
import { OAuth2AppForm } from "./OAuth2AppForm";
|
||||
|
||||
export type MutatingResource = {
|
||||
type MutatingResource = {
|
||||
updateApp: boolean;
|
||||
createSecret: boolean;
|
||||
deleteApp: boolean;
|
||||
|
@ -22,7 +22,7 @@ import { deploymentGroupHasParent } from "utils/deployOptions";
|
||||
import { docs } from "utils/docs";
|
||||
import OptionsTable from "../OptionsTable";
|
||||
|
||||
export type ObservabilitySettingsPageViewProps = {
|
||||
type ObservabilitySettingsPageViewProps = {
|
||||
options: SerpentOption[];
|
||||
featureAuditLogEnabled: boolean;
|
||||
isPremium: boolean;
|
||||
|
@ -19,7 +19,7 @@ import { Alert } from "../../../components/Alert/Alert";
|
||||
import OptionsTable from "../OptionsTable";
|
||||
import { UserEngagementChart } from "./UserEngagementChart";
|
||||
|
||||
export type OverviewPageViewProps = {
|
||||
type OverviewPageViewProps = {
|
||||
deploymentOptions: SerpentOption[];
|
||||
dailyActiveUsers: DAUsResponse | undefined;
|
||||
readonly invalidExperiments: Experiments | string[];
|
||||
|
@ -24,7 +24,7 @@ const chartConfig = {
|
||||
},
|
||||
} satisfies ChartConfig;
|
||||
|
||||
export type UserEngagementChartProps = {
|
||||
type UserEngagementChartProps = {
|
||||
data:
|
||||
| {
|
||||
date: string;
|
||||
|
@ -3,7 +3,7 @@ import { Activity, Coins, Expand, SquareArrowOutUpRight } from "lucide-react";
|
||||
import type { FC } from "react";
|
||||
import { docs } from "utils/docs";
|
||||
|
||||
export type PremiumPageViewProps = { isEnterprise: boolean };
|
||||
type PremiumPageViewProps = { isEnterprise: boolean };
|
||||
|
||||
export const PremiumPageView: FC<PremiumPageViewProps> = ({ isEnterprise }) => {
|
||||
return isEnterprise ? <EnterpriseVersion /> : <OSSVersion />;
|
||||
|
@ -20,7 +20,7 @@ import {
|
||||
import { docs } from "utils/docs";
|
||||
import OptionsTable from "../OptionsTable";
|
||||
|
||||
export type SecuritySettingsPageViewProps = {
|
||||
type SecuritySettingsPageViewProps = {
|
||||
options: SerpentOption[];
|
||||
featureBrowserOnlyEnabled: boolean;
|
||||
};
|
||||
|
@ -14,7 +14,7 @@ import {
|
||||
import { docs } from "utils/docs";
|
||||
import OptionsTable from "../OptionsTable";
|
||||
|
||||
export type UserAuthSettingsPageViewProps = {
|
||||
type UserAuthSettingsPageViewProps = {
|
||||
options: SerpentOption[];
|
||||
};
|
||||
|
||||
|
@ -30,7 +30,7 @@ const validationSchema = Yup.object({
|
||||
name: nameValidator("Name"),
|
||||
});
|
||||
|
||||
export type CreateGroupPageViewProps = {
|
||||
type CreateGroupPageViewProps = {
|
||||
onSubmit: (data: CreateGroupRequest) => void;
|
||||
error?: unknown;
|
||||
isLoading: boolean;
|
||||
|
@ -132,7 +132,7 @@ const UpdateGroupForm: FC<UpdateGroupFormProps> = ({
|
||||
);
|
||||
};
|
||||
|
||||
export type SettingsGroupPageViewProps = {
|
||||
type SettingsGroupPageViewProps = {
|
||||
onCancel: () => void;
|
||||
onSubmit: (data: FormData) => void;
|
||||
group: Group | undefined;
|
||||
|
@ -27,7 +27,7 @@ import type { FC } from "react";
|
||||
import { Link as RouterLink, useNavigate } from "react-router-dom";
|
||||
import { docs } from "utils/docs";
|
||||
|
||||
export type GroupsPageViewProps = {
|
||||
type GroupsPageViewProps = {
|
||||
groups: Group[] | undefined;
|
||||
canCreateGroup: boolean;
|
||||
groupsEnabled: boolean;
|
||||
|
@ -6,7 +6,7 @@ import { SignInLayout } from "components/SignInLayout/SignInLayout";
|
||||
import { Welcome } from "components/Welcome/Welcome";
|
||||
import type { FC } from "react";
|
||||
|
||||
export interface LoginOAuthDevicePageViewProps {
|
||||
interface LoginOAuthDevicePageViewProps {
|
||||
authenticated: boolean;
|
||||
redirectUrl: string;
|
||||
externalAuthDevice?: ExternalAuthDevice;
|
||||
|
@ -8,7 +8,7 @@ import { useLocation } from "react-router-dom";
|
||||
import { SignInForm } from "./SignInForm";
|
||||
import { TermsOfServiceLink } from "./TermsOfServiceLink";
|
||||
|
||||
export interface LoginPageViewProps {
|
||||
interface LoginPageViewProps {
|
||||
authMethods: AuthMethods | undefined;
|
||||
error: unknown;
|
||||
isLoading: boolean;
|
||||
|
@ -50,7 +50,7 @@ const styles = {
|
||||
},
|
||||
} satisfies Record<string, Interpolation<Theme>>;
|
||||
|
||||
export interface SignInFormProps {
|
||||
interface SignInFormProps {
|
||||
isSigningIn: boolean;
|
||||
redirectTo: string;
|
||||
error?: unknown;
|
||||
|
@ -40,7 +40,7 @@ const validationSchema = Yup.object({
|
||||
name: nameValidator("Name"),
|
||||
});
|
||||
|
||||
export type CreateEditRolePageViewProps = {
|
||||
type CreateEditRolePageViewProps = {
|
||||
role: AssignableRoles | undefined;
|
||||
onSubmit: (data: CustomRoleRequest) => void;
|
||||
error?: unknown;
|
||||
|
@ -8,7 +8,7 @@ import {
|
||||
import { TriangleAlertIcon } from "lucide-react";
|
||||
import type { FC } from "react";
|
||||
|
||||
export type ProvisionerVersionProps = {
|
||||
type ProvisionerVersionProps = {
|
||||
buildVersion: string | undefined;
|
||||
provisionerVersion: string;
|
||||
};
|
||||
|
@ -66,7 +66,7 @@ const Option: FC<OptionProps> = ({
|
||||
);
|
||||
};
|
||||
|
||||
export interface EditRolesButtonProps {
|
||||
interface EditRolesButtonProps {
|
||||
isLoading: boolean;
|
||||
roles: readonly SlimRole[];
|
||||
selectedRoleNames: Set<string>;
|
||||
|
@ -104,7 +104,7 @@ const iconStyles = {
|
||||
height: 16,
|
||||
};
|
||||
|
||||
export interface SetupPageViewProps {
|
||||
interface SetupPageViewProps {
|
||||
onSubmit: (firstUser: TypesGen.CreateFirstUserRequest) => void;
|
||||
error?: unknown;
|
||||
isLoading?: boolean;
|
||||
|
@ -16,7 +16,7 @@ import { ExternalLinkIcon, PlusIcon } from "lucide-react";
|
||||
import type { FC } from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
|
||||
export interface StarterTemplatePageViewProps {
|
||||
interface StarterTemplatePageViewProps {
|
||||
starterTemplate?: TemplateExample;
|
||||
error?: unknown;
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user