The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Update Panel types and move file
Nick Rayburn85241a401b1e
diff --git a/studio/components/interfaces/Authentication/Policies/PolicyTableRow/PolicyRow.tsx b/studio/components/interfaces/Authentication/Policies/PolicyTableRow/PolicyRow.tsxindex 9f1e73c247c..8170c6e3284 100644--- a/studio/components/interfaces/Authentication/Policies/PolicyTableRow/PolicyRow.tsx+++ b/studio/components/interfaces/Authentication/Policies/PolicyTableRow/PolicyRow.tsx@@ -1,6 +1,6 @@import { FC } from 'react'import { Button, Dropdown, IconEdit, IconTrash, IconMoreVertical } from '@supabase/ui'-import Panel from 'components/to-be-cleaned/Panel'+import Panel from 'components/ui/Panel'import { PostgresPolicy } from '@supabase/postgres-meta'interface Props {diff --git a/studio/components/interfaces/Authentication/Policies/PolicyTableRow/index.tsx b/studio/components/interfaces/Authentication/Policies/PolicyTableRow/index.tsxindex e65be554d8e..44a33315153 100644--- a/studio/components/interfaces/Authentication/Policies/PolicyTableRow/index.tsx+++ b/studio/components/interfaces/Authentication/Policies/PolicyTableRow/index.tsx@@ -3,7 +3,7 @@ import { PostgresTable, PostgresPolicy } from '@supabase/postgres-meta'import PolicyTableRowHeader from './PolicyTableRowHeader'import PolicyRow from './PolicyRow'-import Panel from 'components/to-be-cleaned/Panel'+import Panel from 'components/ui/Panel'interface Props {table: PostgresTablediff --git a/studio/components/interfaces/Database/Backups/BackupsList.tsx b/studio/components/interfaces/Database/Backups/BackupsList.tsxindex a66e989f6bf..6a7fa06cb1a 100644--- a/studio/components/interfaces/Database/Backups/BackupsList.tsx+++ b/studio/components/interfaces/Database/Backups/BackupsList.tsx@@ -7,7 +7,7 @@ import { STRIPE_PRODUCT_IDS } from 'lib/constants'import BackupItem from './BackupItem'import Loading from 'components/ui/Loading'import UpgradeToPro from 'components/ui/UpgradeToPro'-import Panel from 'components/to-be-cleaned/Panel'+import Panel from 'components/ui/Panel'interface Props {}diff --git a/studio/components/interfaces/Database/Functions/CreateFunction.tsx b/studio/components/interfaces/Database/Functions/CreateFunction.tsxindex dafd57350fe..890ada8f14d 100644--- a/studio/components/interfaces/Database/Functions/CreateFunction.tsx+++ b/studio/components/interfaces/Database/Functions/CreateFunction.tsx@@ -17,7 +17,7 @@ import { Dictionary } from '@supabase/grid'import { makeAutoObservable } from 'mobx'import { useStore } from 'hooks'-import Panel from 'components/to-be-cleaned/Panel'+import Panel from 'components/ui/Panel'import SqlEditor from 'components/to-be-cleaned/SqlEditor'import { POSTGRES_DATA_TYPES } from 'components/interfaces/TableGridEditor/SidePanelEditor/SidePanelEditor.constants'diff --git a/studio/components/interfaces/Database/Pooling/BouncerSettings.tsx b/studio/components/interfaces/Database/Pooling/BouncerSettings.tsxindex be0a2bf494c..1d6b726bc28 100644--- a/studio/components/interfaces/Database/Pooling/BouncerSettings.tsx+++ b/studio/components/interfaces/Database/Pooling/BouncerSettings.tsx@@ -5,7 +5,7 @@ import { Input, Typography } from '@supabase/ui'import { useStore } from 'hooks'import { pluckObjectFields } from 'lib/helpers'import Loading from 'components/ui/Loading'-import Panel from 'components/to-be-cleaned/Panel'+import Panel from 'components/ui/Panel'import PgBouncerConfig from './PgBouncerConfig'import DownloadCertificate from './DownloadCertificate'@@ -69,11 +69,11 @@ const BouncerSettings: FC<Props> = ({}) => {</div><Panel- title={[+ title={<Typography.Title key="panel-title" level={5} className="mb-0">Connection info- </Typography.Title>,- ]}+ </Typography.Title>+ }><div className=""><Panel.Content>@@ -145,11 +145,11 @@ const BouncerSettings: FC<Props> = ({}) => {<section><Panel- title={[+ title={<Typography.Title key="panel-title" level={5} className="mb-0">Connection string- </Typography.Title>,- ]}+ </Typography.Title>+ }><Panel.Content className="space-y-4"><Inputdiff --git a/studio/components/interfaces/Database/Roles/RolesSettings.tsx b/studio/components/interfaces/Database/Roles/RolesSettings.tsxindex 9726587c0b3..fcdaf1bb791 100644--- a/studio/components/interfaces/Database/Roles/RolesSettings.tsx+++ b/studio/components/interfaces/Database/Roles/RolesSettings.tsx@@ -3,7 +3,7 @@ import { observer } from 'mobx-react-lite'import { Button, Typography, IconChevronLeft } from '@supabase/ui'import Divider from 'components/ui/Divider'-import Panel from 'components/to-be-cleaned/Panel'+import Panel from 'components/ui/Panel'interface Props {selectedRole: anydiff --git a/studio/components/interfaces/Home/NewProjectPanel/GetStartedPanel.tsx b/studio/components/interfaces/Home/NewProjectPanel/GetStartedPanel.tsxindex 30dfe8bd910..ac872be7fe6 100644--- a/studio/components/interfaces/Home/NewProjectPanel/GetStartedPanel.tsx+++ b/studio/components/interfaces/Home/NewProjectPanel/GetStartedPanel.tsx@@ -2,7 +2,7 @@ import { FC } from 'react'import Link from 'next/link'import { useRouter } from 'next/router'import { Typography, Button, IconDatabase, IconKey, IconArchive } from '@supabase/ui'-import Panel from 'components/to-be-cleaned/Panel'+import Panel from 'components/ui/Panel'interface Props {}diff --git a/studio/components/interfaces/Home/ProjectUsage.tsx b/studio/components/interfaces/Home/ProjectUsage.tsxindex 7b3c9deb159..a0110d67924 100644--- a/studio/components/interfaces/Home/ProjectUsage.tsx+++ b/studio/components/interfaces/Home/ProjectUsage.tsx@@ -14,7 +14,7 @@ import {IconChevronDown,} from '@supabase/ui'-import Panel from 'components/to-be-cleaned/Panel'+import Panel from 'components/ui/Panel'import ChartHandler from 'components/to-be-cleaned/Charts/ChartHandler'import { ProjectUsageMinimal } from 'components/to-be-cleaned/Usage'diff --git a/studio/components/interfaces/Organization/BillingSettings/BillingAddress/BillingAddress.tsx b/studio/components/interfaces/Organization/BillingSettings/BillingAddress/BillingAddress.tsxindex 84e89d1e83b..d2f5fc5e1fa 100644--- a/studio/components/interfaces/Organization/BillingSettings/BillingAddress/BillingAddress.tsx+++ b/studio/components/interfaces/Organization/BillingSettings/BillingAddress/BillingAddress.tsx@@ -7,7 +7,7 @@ import { useStore } from 'hooks'import { patch } from 'lib/common/fetch'import { API_URL } from 'lib/constants'import { COUNTRIES } from './BillingAddress.constants'-import Panel from 'components/to-be-cleaned/Panel'+import Panel from 'components/ui/Panel'interface Props {loading: booleandiff --git a/studio/components/interfaces/Organization/BillingSettings/PaymentMethods.tsx b/studio/components/interfaces/Organization/BillingSettings/PaymentMethods.tsxindex fcacef33773..9d8032534c6 100644--- a/studio/components/interfaces/Organization/BillingSettings/PaymentMethods.tsx+++ b/studio/components/interfaces/Organization/BillingSettings/PaymentMethods.tsx@@ -18,7 +18,7 @@ import { useStore } from 'hooks'import { delete_, patch } from 'lib/common/fetch'import { getURL } from 'lib/helpers'import { API_URL } from 'lib/constants'-import Panel from 'components/to-be-cleaned/Panel'+import Panel from 'components/ui/Panel'import { AddNewPaymentMethodModal } from 'components/interfaces/Billing'interface Props {diff --git a/studio/components/interfaces/Organization/BillingSettings/ProjectsSummary.tsx b/studio/components/interfaces/Organization/BillingSettings/ProjectsSummary.tsxindex 193749b8ce7..3e9c8b105e0 100644--- a/studio/components/interfaces/Organization/BillingSettings/ProjectsSummary.tsx+++ b/studio/components/interfaces/Organization/BillingSettings/ProjectsSummary.tsx@@ -5,7 +5,7 @@ import { FC, useEffect } from 'react'import { IconChevronRight, IconLoader } from '@supabase/ui'import { useProjectSubscription, useStore } from 'hooks'-import Panel from 'components/to-be-cleaned/Panel'+import Panel from 'components/ui/Panel'dayjs.extend(utc)diff --git a/studio/components/interfaces/Organization/BillingSettings/TaxID/TaxID.tsx b/studio/components/interfaces/Organization/BillingSettings/TaxID/TaxID.tsxindex b5ae426da70..24016cd9e60 100644--- a/studio/components/interfaces/Organization/BillingSettings/TaxID/TaxID.tsx+++ b/studio/components/interfaces/Organization/BillingSettings/TaxID/TaxID.tsx@@ -6,7 +6,7 @@ import { useStore } from 'hooks'import { uuidv4 } from 'lib/helpers'import { post, delete_ } from 'lib/common/fetch'import { API_URL } from 'lib/constants'-import Panel from 'components/to-be-cleaned/Panel'+import Panel from 'components/ui/Panel'import { TAX_IDS } from './TaxID.constants'interface Props {diff --git a/studio/components/to-be-cleaned/Panel.tsx b/studio/components/ui/Panel.tsxsimilarity index 68%rename from studio/components/to-be-cleaned/Panel.tsxrename to studio/components/ui/Panel.tsxindex 9ee51559ef7..4d0ecddbbfe 100644--- a/studio/components/to-be-cleaned/Panel.tsx+++ b/studio/components/ui/Panel.tsx@@ -1,8 +1,19 @@import { Loading } from '@supabase/ui'-import React from 'react'+import React, { ReactNode } from 'react'-function Panel(props: any) {- let headerClasses = []+interface Props {+ bodyClassName?: string;+ children?: ReactNode;+ className?: string;+ footer?: JSX.Element | false;+ hideHeaderStyling?: boolean;+ loading?: boolean;+ noMargin?: boolean;+ title?: JSX.Element | false;+ wrapWithLoading?: boolean;+}+function Panel(props: Props) {+ let headerClasses: string[] = []if (!props.hideHeaderStyling) {headerClasses = [@@ -49,13 +60,13 @@ function Panel(props: any) {return content}- return <Loading active={props.loading}>{content}</Loading>+ return <Loading active={Boolean(props.loading)}>{content}</Loading>}-function Content(props: any) {+function Content({children, className}: {children: ReactNode; className?: string | false}) {let classes = ['px-6 py-4']- if (props.className) classes.push(props.className)- return <div className={classes.join(' ')}>{props.children}</div>+ if (className) classes.push(className)+ return <div className={classes.join(' ')}>{children}</div>}Panel.Content = Contentdiff --git a/studio/components/ui/ProjectSettings/DisplayApiSettings.tsx b/studio/components/ui/ProjectSettings/DisplayApiSettings.tsxindex 512a986c997..1691104ff96 100644--- a/studio/components/ui/ProjectSettings/DisplayApiSettings.tsx+++ b/studio/components/ui/ProjectSettings/DisplayApiSettings.tsx@@ -5,7 +5,7 @@ import { JwtSecretUpdateStatus } from '@supabase/shared-types/out/events'import { useJwtSecretUpdateStatus, useProjectSettings } from 'hooks'import { SettingsLoadingState } from './SettingsLoadingState'import { DEFAULT_PROJECT_API_SERVICE_ID } from 'lib/constants'-import Panel from 'components/to-be-cleaned/Panel'+import Panel from 'components/ui/Panel'const DisplayApiSettings = () => {const router = useRouter()diff --git a/studio/components/ui/ProjectSettings/DisplayConfigSettings.tsx b/studio/components/ui/ProjectSettings/DisplayConfigSettings.tsxindex eb099f75976..b106361439c 100644--- a/studio/components/ui/ProjectSettings/DisplayConfigSettings.tsx+++ b/studio/components/ui/ProjectSettings/DisplayConfigSettings.tsx@@ -5,7 +5,7 @@ import { JwtSecretUpdateStatus } from '@supabase/shared-types/out/events'import { useJwtSecretUpdateStatus, useProjectSettings } from 'hooks'import { SettingsLoadingState } from './SettingsLoadingState'import { DEFAULT_PROJECT_API_SERVICE_ID } from 'lib/constants'-import Panel from 'components/to-be-cleaned/Panel'+import Panel from 'components/ui/Panel'const DisplayConfigSettings = () => {const router = useRouter()diff --git a/studio/components/ui/ProjectSettings/SettingsLoadingState.tsx b/studio/components/ui/ProjectSettings/SettingsLoadingState.tsxindex 1c8dd232659..b35f19cd42e 100644--- a/studio/components/ui/ProjectSettings/SettingsLoadingState.tsx+++ b/studio/components/ui/ProjectSettings/SettingsLoadingState.tsx@@ -1,7 +1,7 @@import { FC } from 'react'import { IconAlertCircle, Loading, Typography } from '@supabase/ui'import { SettingsLoadingStateProps } from './SettingsLoadingState.types'-import Panel from 'components/to-be-cleaned/Panel'+import Panel from 'components/ui/Panel'export const SettingsLoadingState: FC<SettingsLoadingStateProps> = ({ isError, errorMessage }) => {return (diff --git a/studio/pages/account/me.tsx b/studio/pages/account/me.tsxindex 4b2f5d33bed..8da31cf3466 100644--- a/studio/pages/account/me.tsx+++ b/studio/pages/account/me.tsx@@ -6,7 +6,7 @@ import { useProfile, useStore } from 'hooks'import { post } from 'lib/common/fetch'import { API_URL } from 'lib/constants'import { AccountLayout } from 'components/layouts'-import Panel from 'components/to-be-cleaned/Panel'+import Panel from 'components/ui/Panel'import SchemaFormPanel from 'components/to-be-cleaned/forms/SchemaFormPanel'import { NextPageWithLayout } from 'types'@@ -90,11 +90,11 @@ const GithubProfile = observer(() => {return (<Panel- title={[+ title={<Typography.Title key="panel-title" level={5} className="mb-0">Account Information- </Typography.Title>,- ]}+ </Typography.Title>+ }><Panel.Content><div className="space-y-2">@@ -123,11 +123,11 @@ const ThemeSettings = observer(() => {return (<Panel- title={[+ title={<Typography.Title key="panel-title" level={5}>Theme- </Typography.Title>,- ]}+ </Typography.Title>+ }><Panel.Content><Listboxdiff --git a/studio/pages/new/[slug].tsx b/studio/pages/new/[slug].tsxindex 27bc4101257..9849cd41db0 100644--- a/studio/pages/new/[slug].tsx+++ b/studio/pages/new/[slug].tsx@@ -26,7 +26,7 @@ import {import { useStore, withAuth, useSubscriptionStats } from 'hooks'import { WizardLayoutWithoutAuth } from 'components/layouts'-import Panel from 'components/to-be-cleaned/Panel'+import Panel from 'components/ui/Panel'import InformationBox from 'components/ui/InformationBox'import PasswordStrengthBar from 'components/ui/PasswordStrengthBar'import { AddNewPaymentMethodModal } from 'components/interfaces/Billing'@@ -191,7 +191,7 @@ const Wizard: NextPageWithLayout = () => {return (<PanelhideHeaderStyling- isLoading={app.organizations.isInitialized}+ loading={app.organizations.isInitialized}title={<div key="panel-title"><h3>Create a new project</h3>diff --git a/studio/pages/new/index.tsx b/studio/pages/new/index.tsxindex 0c3675d85be..b1400188ffd 100644--- a/studio/pages/new/index.tsx+++ b/studio/pages/new/index.tsx@@ -7,7 +7,7 @@ import { API_URL } from 'lib/constants'import { useStore } from 'hooks'import { post } from 'lib/common/fetch'import { WizardLayout } from 'components/layouts'-import Panel from 'components/to-be-cleaned/Panel'+import Panel from 'components/ui/Panel'import { NextPageWithLayout } from 'types'/**@@ -58,12 +58,12 @@ const Wizard: NextPageWithLayout = () => {return (<PanelhideHeaderStyling- title={[+ title={<div key="panel-title"><h4>Create a new organization</h4>- </div>,- ]}- footer={[+ </div>+ }+ footer={<div key="panel-footer" className="flex w-full items-center justify-between"><Button type="default" onClick={() => router.push('/')}>Cancel@@ -74,8 +74,8 @@ const Wizard: NextPageWithLayout = () => {Create organization</Button></div>- </div>,- ]}+ </div>+ }><Panel.Content className="pt-0"><p className="text-sm">This is your organization's name within Supabase.</p>diff --git a/studio/pages/org/[slug]/settings.tsx b/studio/pages/org/[slug]/settings.tsxindex 5c25e938271..137aea7c95f 100644--- a/studio/pages/org/[slug]/settings.tsx+++ b/studio/pages/org/[slug]/settings.tsx@@ -27,7 +27,7 @@ import { AccountLayoutWithoutAuth } from 'components/layouts'import { BillingSettings, InvoicesSettings } from 'components/interfaces/Organization'import Table from 'components/to-be-cleaned/Table'-import Panel from 'components/to-be-cleaned/Panel'+import Panel from 'components/ui/Panel'import { confirmAlert } from 'components/to-be-cleaned/ModalsDeprecated/ConfirmModal'import InviteMemberModal from 'components/to-be-cleaned/ModalsDeprecated/InviteMemberModal'import TextConfirmModal from 'components/ui/Modals/TextConfirmModal'@@ -250,11 +250,11 @@ const OrgDeletePanel = observer(() => {if (!PageState.isOrgOwner) return nullreturn (<Panel- title={[+ title={<Typography.Text key="panel-title" className="uppercase">Danger Zone- </Typography.Text>,- ]}+ </Typography.Text>+ }><Panel.Content><Alertdiff --git a/studio/pages/project/[ref]/auth/settings.tsx b/studio/pages/project/[ref]/auth/settings.tsxindex 898bd73a8c6..5a133749383 100644--- a/studio/pages/project/[ref]/auth/settings.tsx+++ b/studio/pages/project/[ref]/auth/settings.tsx@@ -13,7 +13,7 @@ import { get, patch } from 'lib/common/fetch'import { pluckJsonSchemaFields } from 'lib/helpers'import { AuthLayout } from 'components/layouts'import Table from 'components/to-be-cleaned/Table'-import Panel from 'components/to-be-cleaned/Panel'+import Panel from 'components/ui/Panel'import Toggle from 'components/to-be-cleaned/forms/Toggle'import ToggleField from 'components/to-be-cleaned/forms/ToggleField'import SecretField from 'components/to-be-cleaned/forms/SecretField'diff --git a/studio/pages/project/[ref]/functions/[id]/index.tsx b/studio/pages/project/[ref]/functions/[id]/index.tsxindex 29166c46b2f..8a4687aaec9 100644--- a/studio/pages/project/[ref]/functions/[id]/index.tsx+++ b/studio/pages/project/[ref]/functions/[id]/index.tsx@@ -7,7 +7,7 @@ import { useState } from 'react'import { useRouter } from 'next/router'import { Button } from '@supabase/ui'-import Panel from 'components/to-be-cleaned/Panel'+import Panel from 'components/ui/Panel'import ChartHandler from 'components/to-be-cleaned/Charts/ChartHandler'import { get } from 'lib/common/fetch'diff --git a/studio/pages/project/[ref]/settings/api.tsx b/studio/pages/project/[ref]/settings/api.tsxindex d42025c3bda..2873d1119cf 100644--- a/studio/pages/project/[ref]/settings/api.tsx+++ b/studio/pages/project/[ref]/settings/api.tsx@@ -38,7 +38,7 @@ import { uuidv4 } from 'lib/helpers'import { patch, get } from 'lib/common/fetch'import { useStore, useJwtSecretUpdateStatus, withAuth } from 'hooks'-import Panel from 'components/to-be-cleaned/Panel'+import Panel from 'components/ui/Panel'import SchemaFormPanel from 'components/to-be-cleaned/forms/SchemaFormPanel'import { SettingsLayout } from 'components/layouts'diff --git a/studio/pages/project/[ref]/settings/database.tsx b/studio/pages/project/[ref]/settings/database.tsxindex 52e6c064560..41e0f78b40b 100644--- a/studio/pages/project/[ref]/settings/database.tsx+++ b/studio/pages/project/[ref]/settings/database.tsx@@ -17,7 +17,7 @@ import { API_URL, DEFAULT_MINIMUM_PASSWORD_STRENGTH, TIME_PERIODS_INFRA } from 'import { SettingsLayout } from 'components/layouts'import PasswordStrengthBar from 'components/ui/PasswordStrengthBar'-import Panel from 'components/to-be-cleaned/Panel'+import Panel from 'components/ui/Panel'import { ProjectUsageMinimal } from 'components/to-be-cleaned/Usage'import DateRangePicker from 'components/to-be-cleaned/DateRangePicker'import ChartHandler from 'components/to-be-cleaned/Charts/ChartHandler'@@ -328,12 +328,12 @@ const GeneralSettings: FC<any> = ({ projectRef }) => {<div className=""><section className="space-y-6 mt-6"><Panel- title={[+ title={<Typography.Title key="panel-title" level={5} className="mb-0">Connection info- </Typography.Title>,+ </Typography.Title>// <Title level={4}>Connection info</Title>- ]}+ }><Panel.Content className="space-y-6"><Inputdiff --git a/studio/pages/project/[ref]/settings/general.tsx b/studio/pages/project/[ref]/settings/general.tsxindex bf0e3bb4572..026dc1ca191 100644--- a/studio/pages/project/[ref]/settings/general.tsx+++ b/studio/pages/project/[ref]/settings/general.tsx@@ -11,7 +11,7 @@ import { pluckJsonSchemaFields, pluckObjectFields } from 'lib/helpers'import { post, delete_ } from 'lib/common/fetch'import { useStore, withAuth } from 'hooks'import { SettingsLayout } from 'components/layouts'-import Panel from 'components/to-be-cleaned/Panel'+import Panel from 'components/ui/Panel'import ConfirmModal from 'components/ui/Dialogs/ConfirmDialog'import SchemaFormPanel from 'components/to-be-cleaned/forms/SchemaFormPanel'import TextConfirmModal from 'components/ui/Modals/TextConfirmModal'