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