diff --git a/apps/docs/components/AuthProviders.tsx b/apps/docs/components/AuthProviders.tsx index a1903636904..82a57180a4b 100644 --- a/apps/docs/components/AuthProviders.tsx +++ b/apps/docs/components/AuthProviders.tsx @@ -1,53 +1,21 @@ import providers from '../data/authProviders' -import ButtonCard from './ButtonCard' +import { IconPanel } from 'ui' +import Link from 'next/link' + +export default function AuthProviders({ type }: { type: string }) { + const filterProviders = providers.filter((item) => item.authType === type) -export default function AuthProviders() { return ( -
- {providers.map((x) => ( -
- -
-
-

{x.name}

-

- {x.official ? ( - Official - ) : ( - Unofficial - )} -

-
-
-
- Platform: - {x.platform.toString()} -
-
- Self-Hosted: - {x.selfHosted.toString()} -
-
-
-
-
- ))} -
+ <> +
+ {filterProviders.map((x) => ( + + + + + + ))} +
+ ) } diff --git a/apps/docs/components/Clippy/ClippyModal.tsx b/apps/docs/components/Clippy/ClippyModal.tsx index 3bbbd7c69de..8347e85d1ef 100644 --- a/apps/docs/components/Clippy/ClippyModal.tsx +++ b/apps/docs/components/Clippy/ClippyModal.tsx @@ -30,12 +30,12 @@ const questions = [ 'How do I connect to my database?', 'How do I run migrations? ', 'How do I listen to changes in a table?', - 'How do I setup authentication?', + 'How do I set up authentication?', ] function getEdgeFunctionUrl() { - const supabaseUrl = process.env.NEXT_PUBLIC_SUPABASE_URL.replace(/\/$/, '') - const isPlatform = supabaseUrl.match(/(supabase\.co)|(supabase\.in)/) + const supabaseUrl = process.env.NEXT_PUBLIC_SUPABASE_URL?.replace(/\/$/, '') + const isPlatform = supabaseUrl?.match(/(supabase\.co)|(supabase\.in)/) if (isPlatform) { const [schemeAndProjectId, domain, tld] = supabaseUrl.split('.') diff --git a/apps/docs/components/Flag/FlagProvider.tsx b/apps/docs/components/Flag/FlagProvider.tsx index 870b6ee435e..4cb3f362fa7 100644 --- a/apps/docs/components/Flag/FlagProvider.tsx +++ b/apps/docs/components/Flag/FlagProvider.tsx @@ -1,34 +1,33 @@ import { FC, useEffect, useState } from 'react' -import createConfigCatClient from 'configcat-js' +// import createConfigCatClient from 'configcat-js' import FlagContext from './FlagContext' const FlagProvider: FC = ({ children }) => { const [store, setStore] = useState({}) - const { Provider } = FlagContext - useEffect(() => { - getFlags() - }, []) + // useEffect(() => { + // getFlags() + // }, []) - const getFlags = async () => { - const setFlagValues = async () => { - const flagValues = await client.getAllValuesAsync() - const flagStore: any = {} + // const getFlags = async () => { + // const setFlagValues = async () => { + // const flagValues = await client.getAllValuesAsync() + // const flagStore: any = {} - flagValues.forEach((item: any) => { - flagStore[item.settingKey] = item.settingValue - }) - setStore(flagStore) - } + // flagValues.forEach((item: any) => { + // flagStore[item.settingKey] = item.settingValue + // }) + // setStore(flagStore) + // } - const client = createConfigCatClient(process.env.NEXT_PUBLIC_CONFIGCAT_SDK_KEY ?? '', { - configChanged: setFlagValues, - pollIntervalSeconds: 600, - }) + // const client = createConfigCatClient(process.env.NEXT_PUBLIC_CONFIGCAT_SDK_KEY ?? '', { + // configChanged: setFlagValues, + // pollIntervalSeconds: 600, + // }) - await setFlagValues() - } + // await setFlagValues() + // } return {children} } diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts index 6354ad15db1..39320a813ff 100644 --- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts +++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts @@ -658,6 +658,11 @@ export const resources = { url: '/guides/resources/migrating-to-supabase/heroku', items: [], }, + { + name: 'Render', + url: '/guides/resources/migrating-to-supabase/render', + items: [], + }, ], }, { @@ -720,6 +725,7 @@ export const migrate = { { name: 'Firestore Data', url: '/guides/migrations/firestore-data', items: [] }, { name: 'Firebase Storage', url: '/guides/migrations/firebase-storage', items: [] }, { name: 'Heroku', url: '/guides/migrations/heroku', items: [] }, + { name: 'Render', url: '/guides/migrations/render', items: [] }, ], } diff --git a/apps/docs/data/authProviders.ts b/apps/docs/data/authProviders.ts index 95c2f6b2dbf..44958476ba6 100644 --- a/apps/docs/data/authProviders.ts +++ b/apps/docs/data/authProviders.ts @@ -1,172 +1,193 @@ const authProviders = [ { name: 'Apple', - // logo: '/img/libraries/dart-icon.svg', + logo: '/docs/img/icons/apple-icon', href: '/guides/auth/social-login/auth-apple', official: true, supporter: 'Supabase', platform: true, selfHosted: true, + authType: 'social', }, { name: 'Azure', - // logo: '/img/libraries/dart-icon.svg', + logo: '/docs/img/icons/microsoft-icon', href: '/guides/auth/social-login/auth-azure', official: false, supporter: 'TBD', platform: true, selfHosted: true, + authType: 'social', }, { name: 'Bitbucket', - // logo: '/img/libraries/dart-icon.svg', + logo: '/docs/img/icons/bitbucket-icon', href: '/guides/auth/social-login/auth-bitbucket', official: true, supporter: 'Supabase', platform: true, selfHosted: true, + authType: 'social', }, { name: 'Discord', - // logo: '/img/libraries/dart-icon.svg', + logo: '/docs/img/icons/discord-icon', href: '/guides/auth/social-login/auth-discord', official: true, supporter: 'Supabase', platform: true, selfHosted: true, + authType: 'social', }, { name: 'Facebook', - // logo: '/img/libraries/dart-icon.svg', + logo: '/docs/img/icons/facebook-icon', href: '/guides/auth/social-login/auth-facebook', official: true, supporter: 'Supabase', platform: true, selfHosted: true, + authType: 'social', }, { name: 'GitHub', - // logo: '/img/libraries/dart-icon.svg', + logo: '/docs/img/icons/github-icon', href: '/guides/auth/social-login/auth-github', official: true, supporter: 'Supabase', platform: true, selfHosted: true, + authType: 'social', }, { name: 'GitLab', - // logo: '/img/libraries/dart-icon.svg', + logo: '/docs/img/icons/gitlab-icon', href: '/guides/auth/social-login/auth-gitlab', official: true, supporter: 'Supabase', platform: true, selfHosted: true, + authType: 'social', }, { name: 'Google', - // logo: '/img/libraries/dart-icon.svg', + logo: '/docs/img/icons/google-icon', href: '/guides/auth/social-login/auth-google', official: true, supporter: 'Supabase', platform: true, selfHosted: true, + authType: 'social', }, { name: 'Keycloak', + logo: '/docs/img/icons/keycloak-icon', href: '/guides/auth/social-login/auth-keycloak', official: true, supporter: 'Supabase', platform: true, selfHosted: true, + authType: 'social', }, { name: 'LinkedIn', - // logo: '/img/libraries/dart-icon.svg', + logo: '/docs/img/icons/linkedin-icon', href: '/guides/auth/social-login/auth-linkedin', official: true, supporter: 'Supabase', platform: true, selfHosted: true, + authType: 'social', }, { name: 'MessageBird', - // logo: '/img/libraries/dart-icon.svg', + logo: '/docs/img/icons/messagebird-icon', href: '/guides/auth/phone-login/messagebird', official: false, supporter: 'MessageBird', platform: true, selfHosted: true, + authType: 'phone' }, { name: 'Notion', - // logo: '/img/libraries/notion-icon.svg', + logo: '/docs/img/icons/notion-icon', href: '/guides/auth/social-login/auth-notion', official: true, supporter: 'Supabase', platform: true, selfHosted: true, + authType: 'social', }, { name: 'Slack', - // logo: '/img/libraries/dart-icon.svg', + logo: '/docs/img/icons/slack-icon', href: '/guides/auth/social-login/auth-slack', official: true, supporter: 'Supabase', platform: true, selfHosted: true, + authType: 'social', }, { name: 'Spotify', - // logo: '/img/libraries/dart-icon.svg', + logo: '/docs/img/icons/spotify-icon', href: '/guides/auth/social-login/auth-spotify', official: true, supporter: 'Supabase', platform: true, selfHosted: true, + authType: 'social', }, { name: 'Twitter', - // logo: '/img/libraries/dart-icon.svg', + logo: '/docs/img/icons/twitter-icon', href: '/guides/auth/social-login/auth-twitter', official: true, supporter: 'Supabase', platform: true, selfHosted: true, + authType: 'social', }, { name: 'Twitch', - // logo: '/img/libraries/dart-icon.svg', + logo: '/docs/img/icons/twitch-icon', href: '/guides/auth/social-login/auth-twitch', official: true, supporter: 'Supabase', platform: true, selfHosted: true, + authType: 'social', }, { name: 'Zoom', - // logo: '/img/libraries/dart-icon.svg', + logo: '/docs/img/icons/zoom-icon', href: '/guides/auth/social-login/auth-zoom', official: true, supporter: 'Supabase', platform: true, selfHosted: true, + authType: 'social', }, { name: 'Twilio', - // logo: '/img/libraries/dart-icon.svg', + logo: '/docs/img/icons/twilio-icon', href: '/guides/auth/phone-login/twilio', official: true, supporter: 'Supabase', platform: true, selfHosted: true, + authType: 'phone', }, { name: 'Vonage', + logo: '/docs/img/icons/vonage-icon', href: '/guides/auth/phone-login/vonage', official: false, supporter: 'Supabase', platform: true, selfHosted: true, + authType: 'phone', }, ] diff --git a/apps/docs/pages/guides/auth/auth-helpers/sveltekit.mdx b/apps/docs/pages/guides/auth/auth-helpers/sveltekit.mdx index bcdcef28fc2..7598037b2d8 100644 --- a/apps/docs/pages/guides/auth/auth-helpers/sveltekit.mdx +++ b/apps/docs/pages/guides/auth/auth-helpers/sveltekit.mdx @@ -257,7 +257,7 @@ Wrap an Action to check that the user has a valid session. If they're not logged ```ts title=src/routes/posts/+page.server.ts import type { Actions } from './$types' import { getSupabase } from '@supabase/auth-helpers-sveltekit' -import { error, invalid } from '@sveltejs/kit' +import { error, fail } from '@sveltejs/kit' export const actions: Actions = { createPost: async (event) => { @@ -276,7 +276,7 @@ export const actions: Actions = { .insert({ content }) if (createPostError) { - return invalid(500, { + return fail(500, { supabaseErrorMessage: createPostError.message, }) } @@ -293,7 +293,7 @@ If you try to submit a form with the action `?/createPost` without a valid sessi ```ts import type { Actions } from './$types' -import { invalid, redirect } from '@sveltejs/kit' +import { fail, redirect } from '@sveltejs/kit' import { getSupabase } from '@supabase/auth-helpers-sveltekit' import { AuthApiError } from '@supabase/supabase-js' @@ -313,14 +313,14 @@ export const actions: Actions = { if (error) { if (error instanceof AuthApiError && error.status === 400) { - return invalid(400, { + return fail(400, { error: 'Invalid credentials.', values: { email, }, }) } - return invalid(500, { + return fail(500, { error: 'Server error. Try again later.', values: { email, diff --git a/apps/docs/pages/guides/auth/overview.mdx b/apps/docs/pages/guides/auth/overview.mdx index 07cbc79859f..a0b80e6f018 100644 --- a/apps/docs/pages/guides/auth/overview.mdx +++ b/apps/docs/pages/guides/auth/overview.mdx @@ -44,8 +44,16 @@ You can authenticate your users in several ways: We provide a suite of Providers and login methods, as well as [Auth helpers](/docs/guides/auth/auth-helpers/). +#### Social Auth +
- + +
+ +#### Phone Auth + +
+
### Configure third-party providers diff --git a/apps/docs/pages/guides/resources.mdx b/apps/docs/pages/guides/resources.mdx index c85f5447d3c..c5242d1aef4 100644 --- a/apps/docs/pages/guides/resources.mdx +++ b/apps/docs/pages/guides/resources.mdx @@ -135,6 +135,12 @@ export const migrationGuides = [ href: '/guides/resources/migrating-to-supabase/heroku', description: 'Migrate your Heroku Postgres database to Supabase.', }, + { + title: 'Render', + icon: '/docs/img/icons/render-icon', + href: '/guides/resources/migrating-to-supabase/render', + description: 'Migrate your Render Postgres database to Supabase.', + }, ] export const postgres = [ diff --git a/apps/docs/pages/guides/resources/migrating-to-supabase/render.mdx b/apps/docs/pages/guides/resources/migrating-to-supabase/render.mdx new file mode 100644 index 00000000000..1e477b0e586 --- /dev/null +++ b/apps/docs/pages/guides/resources/migrating-to-supabase/render.mdx @@ -0,0 +1,88 @@ +import Layout from '~/layouts/DefaultGuideLayout' + +export const meta = { + title: 'Migrate from Render to Supabase', + description: 'Migrate your Render Postgres database to Supabase.', +} + +Render is a popular Web Hosting service in the online services category that also has a managed Postgres service. Render has a great developer experience, allowing users to deploy straight from GitHub or GitLab. This is the core of their product and they do it really well. However, when it comes to Postgres databases, it may not be the best option. + +Supabase is one of the best free alternative to Render Postgres. Supabase provide all the backend features developers need to build a product: a Postgres database, authentication, instant APIs, edge functions, realtime subscriptions, and storage. Postgres is the core of Supabase—for example, you can use row-level security and there are more than 40 Postgres extensions available. + +This guide demonstrates how to migrate from Render to Supabase to get the most out of Postgres while gaining access to all the features you need to build a project. + +## Retrieve your Render database credentials [#retrieve-render-credentials] + +1. Log in to your [Render account](https://render.com) and select the project you want to migrate. +1. Click **Dashboard** in the menu and click in your **Postgres** database. +1. Scroll down in the **Info** tab. +1. Click on **PSQL Command** and edit it adding the content after `PSQL_COMMAND=`. + +![Copying PSQL command from Render dashboard](/docs/img/guides/resources/migrating-to-supabase/render/render_dashboard.png) +Example: + +```bash +%env PSQL_COMMAND=PGPASSWORD=RgaMDfTS_password_FTPa7 psql -h dpg-a_server_in.oregon-postgres.render.com -U my_db_pxl0_user my_db_pxl0 +``` + +## Retrieve your Supabase Host [#retrieve-supabase-host] + +1. If you're new to Supabase, [create a project](https://app.supabase.com). +1. Go to the [Database settings](https://app.supabase.com/project/_/settings/database) for your project in the Supabase Dashboard. +1. Under **Connection Info**, note your Host (`$SUPABASE_HOST`). +1. Save your password or [reset it](https://app.supabase.com/project/_/settings/database) if you forgot it. + +![Finding Supabase host address](/docs/img/guides/resources/migrating-to-supabase/render/supabase_dashboard.png) + +## Migrate the database + +The fastest way to migrate your database is with the Supabase migration tool on [Google Colab](https://colab.research.google.com/github/mansueli/Supa-Migrate/blob/main/Migrate_Postgres_Supabase.ipynb). Alternatively, you can use the [pg_dump](https://www.postgresql.org/docs/current/app-pgdump.html) and [psql](https://www.postgresql.org/docs/current/app-psql.html) command line tools, which are included in a full PostgreSQL installation. + + + + +1. Set the environment variables (`PSQL_COMMAND`, `SUPABASE_HOST`, `SUPABASE_PASSWORD`) in the Colab notebook. +1. Run the first two steps in [the notebook](https://colab.research.google.com/github/mansueli/Supa-Migrate/blob/main/Migrate_Postgres_Supabase.ipynb) in order. The first sets the variables and the second installs PSQL and the migration script. +1. Run the third step to start the migration. This will take a few minutes. + + + + +### Export your Render database to a file in console [#export-render-database] + +Use `pg_dump` with your Render credentials to export your Render database to a file (e.g., `render_dump.sql`). + +```bash +pg_dump --clean --if-exists --quote-all-identifiers \ + -h $RENDER_HOST -U $RENDER_USER -d $RENDER_DATABASE \ + --no-owner --no-privileges > render_dump.sql +``` + +### Import the database to your Supabase project [#import-database-to-supabase] + +Use `psql` to import the Render database file to your Supabase project. + +```bash +psql -h $SUPA_URL -U postgres --file render_dump.sql -p 6543 -d postgres +``` + +### Additional options + +- To only migrate a single database schema, add the `--schema=PATTERN` parameter to your `pg_dump` command. +- To exclude a schema: `--exclude-schema=PATTERN`. +- To only migrate a single table: `--table=PATTERN`. +- To exclude a table: `--exclude-table=PATTERN`. + +Run `pg_dump --help` for a full list of options. + + + + +export const Page = ({ children }) => + +export default Page diff --git a/apps/docs/public/img/guides/resources/migrating-to-supabase/render/render_dashboard.png b/apps/docs/public/img/guides/resources/migrating-to-supabase/render/render_dashboard.png new file mode 100644 index 00000000000..1645901dc23 Binary files /dev/null and b/apps/docs/public/img/guides/resources/migrating-to-supabase/render/render_dashboard.png differ diff --git a/apps/docs/public/img/guides/resources/migrating-to-supabase/render/supabase_dashboard.png b/apps/docs/public/img/guides/resources/migrating-to-supabase/render/supabase_dashboard.png new file mode 100644 index 00000000000..3a1ff5b9daf Binary files /dev/null and b/apps/docs/public/img/guides/resources/migrating-to-supabase/render/supabase_dashboard.png differ diff --git a/apps/docs/public/img/icons/render-icon.svg b/apps/docs/public/img/icons/render-icon.svg new file mode 100644 index 00000000000..49e41abdba4 --- /dev/null +++ b/apps/docs/public/img/icons/render-icon.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/apps/docs/styles/docsearch.scss b/apps/docs/styles/docsearch.scss index 8d0cb5f6cd6..569965efcd9 100644 --- a/apps/docs/styles/docsearch.scss +++ b/apps/docs/styles/docsearch.scss @@ -7,6 +7,7 @@ .DocSearch-Container { background: rgba(0, 0, 0, 0.3); @apply fixed top-0 left-0 z-[200] flex h-screen w-screen flex-col p-4 backdrop-blur-sm sm:p-6 md:p-[10vh] lg:p-[12vh]; + @apply cursor-auto #{!important}; } .DocSearch-LoadingIndicator svg { diff --git a/apps/www/public/images/blog/2023-02-08-january-beta-update/supabase-beta-update-january-2023.jpg b/apps/www/public/images/blog/2023-02-08-january-beta-update/supabase-beta-update-january-2023.jpg index f8ba97d4f8d..e1a91839e93 100644 Binary files a/apps/www/public/images/blog/2023-02-08-january-beta-update/supabase-beta-update-january-2023.jpg and b/apps/www/public/images/blog/2023-02-08-january-beta-update/supabase-beta-update-january-2023.jpg differ diff --git a/examples/edge-functions/supabase/functions/oak-server/index.ts b/examples/edge-functions/supabase/functions/oak-server/index.ts index 3f9f192f3ca..9be189be65a 100644 --- a/examples/edge-functions/supabase/functions/oak-server/index.ts +++ b/examples/edge-functions/supabase/functions/oak-server/index.ts @@ -2,7 +2,7 @@ import { Application, Router } from 'https://deno.land/x/oak/mod.ts' const router = new Router() router - // Note: path will be prefixed with function name + // Note: path should be prefixed with function name .get('/oak-server', (context) => { context.response.body = 'This is an example Oak server running on Edge Functions!' }) diff --git a/package-lock.json b/package-lock.json index 78869d57003..68a4aa07f60 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14115,20 +14115,6 @@ "resolved": "packages/config", "link": true }, - "node_modules/configcat-common": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/configcat-common/-/configcat-common-5.3.0.tgz", - "integrity": "sha512-yM9SNuG8XQa0aHNK5eUhtzAD+a6yFEOQw0qg6f/ZvIWGHkY+7FYvDbSkvMHW1ERQaUmAIt2QLZB6rMJzFCDCmg==" - }, - "node_modules/configcat-js": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/configcat-js/-/configcat-js-5.10.0.tgz", - "integrity": "sha512-ta827/ONGd9sIKIRItQPS+URTb90BYjy+YXv5F0dF9T0X7tUZWt0b9V4Liy2Vlq+VaJR3DqrjyZyeD9vG7Z0Bg==", - "deprecated": "Please upgrade to version 6 or higher.", - "dependencies": { - "configcat-common": "^5.3.0" - } - }, "node_modules/console-browserify": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", @@ -38931,7 +38917,7 @@ "clipboard": "^2.0.8", "common": "*", "config": "*", - "configcat-js": "^5.6.0", + "configcat-js": "^7.0.0", "dayjs": "^1.11.0", "file-saver": "^2.0.5", "generate-password": "^1.7.0", @@ -39196,6 +39182,23 @@ "postcss": "^8.1.0" } }, + "studio/node_modules/configcat-common": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/configcat-common/-/configcat-common-7.0.1.tgz", + "integrity": "sha512-9SxX4/6NzK1l+2iDWLyr/0tsli/eKzSJhBIepptF+GPy/7CprnA0coQz8fF8Gx1IF3wBZsJg0vRaC3LtNa0vRg==", + "dependencies": { + "tslib": "^2.4.1" + } + }, + "studio/node_modules/configcat-js": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/configcat-js/-/configcat-js-7.0.0.tgz", + "integrity": "sha512-ECVS5rV4wzU+r+81Fc1Rho1pvbSMpZXUKpO/Ei0Ms+Qmo21U8x1NVMWF0hIplHmDdEsCtEIa5AgXVceDURGAuA==", + "dependencies": { + "configcat-common": "^7.0.1", + "tslib": "^2.4.1" + } + }, "studio/node_modules/d3-array": { "version": "2.12.1", "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-2.12.1.tgz", @@ -46181,7 +46184,7 @@ "@sinclair/typebox": "^0.25.1", "pg": "^8.7.1", "pg-format": "^1.0.4", - "pgsql-parser": "^13.3.0", + "pgsql-parser": "13.4.0", "postgres-array": "^3.0.1", "prettier": "^2.6.0", "prettier-plugin-sql": "^0.12.1" @@ -49533,19 +49536,6 @@ } } }, - "configcat-common": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/configcat-common/-/configcat-common-5.3.0.tgz", - "integrity": "sha512-yM9SNuG8XQa0aHNK5eUhtzAD+a6yFEOQw0qg6f/ZvIWGHkY+7FYvDbSkvMHW1ERQaUmAIt2QLZB6rMJzFCDCmg==" - }, - "configcat-js": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/configcat-js/-/configcat-js-5.10.0.tgz", - "integrity": "sha512-ta827/ONGd9sIKIRItQPS+URTb90BYjy+YXv5F0dF9T0X7tUZWt0b9V4Liy2Vlq+VaJR3DqrjyZyeD9vG7Z0Bg==", - "requires": { - "configcat-common": "^5.3.0" - } - }, "console-browserify": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", @@ -65797,7 +65787,7 @@ "clipboard": "^2.0.8", "common": "*", "config": "*", - "configcat-js": "^5.6.0", + "configcat-js": "^7.0.0", "dayjs": "^1.11.0", "file-saver": "^2.0.5", "generate-password": "^1.7.0", @@ -65960,6 +65950,23 @@ "postcss-value-parser": "^4.2.0" } }, + "configcat-common": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/configcat-common/-/configcat-common-7.0.1.tgz", + "integrity": "sha512-9SxX4/6NzK1l+2iDWLyr/0tsli/eKzSJhBIepptF+GPy/7CprnA0coQz8fF8Gx1IF3wBZsJg0vRaC3LtNa0vRg==", + "requires": { + "tslib": "^2.4.1" + } + }, + "configcat-js": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/configcat-js/-/configcat-js-7.0.0.tgz", + "integrity": "sha512-ECVS5rV4wzU+r+81Fc1Rho1pvbSMpZXUKpO/Ei0Ms+Qmo21U8x1NVMWF0hIplHmDdEsCtEIa5AgXVceDURGAuA==", + "requires": { + "configcat-common": "^7.0.1", + "tslib": "^2.4.1" + } + }, "d3-array": { "version": "2.12.1", "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-2.12.1.tgz", diff --git a/packages/ui/src/components/Listbox/Listbox2.tsx b/packages/ui/src/components/Listbox/Listbox2.tsx index 5366c6062b5..78f9a4bbd06 100644 --- a/packages/ui/src/components/Listbox/Listbox2.tsx +++ b/packages/ui/src/components/Listbox/Listbox2.tsx @@ -18,8 +18,7 @@ function classNames(...classes: any) { return classes.filter(Boolean).join(' ') } -export interface Props - extends Omit, 'size'> { +export interface Props extends Omit, 'size'> { className?: string children: React.ReactNode descriptionText?: string @@ -73,14 +72,8 @@ function Listbox({ const triggerRef = useRef(null) - const { - formContextOnChange, - values, - errors, - handleBlur, - touched, - fieldLevelValidation, - } = useFormContext() + const { formContextOnChange, values, errors, handleBlur, touched, fieldLevelValidation } = + useFormContext() if (values && !value) { defaultValue = values[id || name] @@ -257,9 +250,7 @@ function Listbox({ className={__styles.options_container} >
- + {children}
@@ -313,9 +304,7 @@ function SelectOption({
{addOnBefore && addOnBefore({ active, selected })} - {typeof children === 'function' - ? children({ active, selected }) - : children} + {typeof children === 'function' ? children({ active, selected }) : children}
@@ -326,10 +315,7 @@ function SelectOption({ active ? __styles.option_check_active : '' )} > -