Skip to content

Commit 8036996

Browse files
committed
Revert pnpm-lock.yaml changes
Revert pnpm-lock.yaml changes
1 parent be67680 commit 8036996

File tree

6 files changed

+32
-102
lines changed

6 files changed

+32
-102
lines changed

packages/clerk-js/src/core/clerk.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,7 @@ export class Clerk implements ClerkInterface {
825825
if (disabledOrganizationsFeature(this, this.environment)) {
826826
if (this.#instanceType === 'development') {
827827
this.__internal_openEnableOrganizationsPrompt({
828-
callerName: 'OrganizationSwitcher',
828+
componentName: 'OrganizationProfile',
829829
});
830830
}
831831
return;
@@ -855,7 +855,7 @@ export class Clerk implements ClerkInterface {
855855
if (disabledOrganizationsFeature(this, this.environment)) {
856856
if (this.#instanceType === 'development') {
857857
this.__internal_openEnableOrganizationsPrompt({
858-
callerName: 'OrganizationSwitcher',
858+
componentName: 'OrganizationSwitcher',
859859
});
860860
}
861861
return;
@@ -997,7 +997,7 @@ export class Clerk implements ClerkInterface {
997997
if (disabledOrganizationsFeature(this, this.environment)) {
998998
if (this.#instanceType === 'development') {
999999
this.__internal_openEnableOrganizationsPrompt({
1000-
callerName: 'OrganizationProfile',
1000+
componentName: 'OrganizationProfile',
10011001
});
10021002
}
10031003
return;
@@ -1037,7 +1037,7 @@ export class Clerk implements ClerkInterface {
10371037
if (disabledOrganizationsFeature(this, this.environment)) {
10381038
if (this.#instanceType === 'development') {
10391039
this.__internal_openEnableOrganizationsPrompt({
1040-
callerName: 'OrganizationSwitcher',
1040+
componentName: 'OrganizationSwitcher',
10411041
});
10421042
}
10431043
return;
@@ -1068,7 +1068,7 @@ export class Clerk implements ClerkInterface {
10681068
if (disabledOrganizationsFeature(this, this.environment)) {
10691069
if (this.#instanceType === 'development') {
10701070
this.__internal_openEnableOrganizationsPrompt({
1071-
callerName: 'OrganizationSwitcher',
1071+
componentName: 'OrganizationSwitcher',
10721072
});
10731073
}
10741074
return;
@@ -1107,7 +1107,7 @@ export class Clerk implements ClerkInterface {
11071107
if (disabledOrganizationsFeature(this, this.environment)) {
11081108
if (this.#instanceType === 'development') {
11091109
this.__internal_openEnableOrganizationsPrompt({
1110-
callerName: 'OrganizationList',
1110+
componentName: 'OrganizationList',
11111111
});
11121112
}
11131113
return;
@@ -1294,7 +1294,7 @@ export class Clerk implements ClerkInterface {
12941294
if (disabledOrganizationsFeature(this, this.environment)) {
12951295
if (this.#instanceType === 'development') {
12961296
this.__internal_openEnableOrganizationsPrompt({
1297-
callerName: 'OrganizationSwitcher',
1297+
componentName: 'OrganizationSwitcher',
12981298
});
12991299
}
13001300
return;

packages/clerk-js/src/ui/components/devPrompts/EnableOrganizationsPrompt/index.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import type { __internal_EnableOrganizationsPromptProps } from '@clerk/shared/types';
12
import { css } from '@emotion/react';
23

34
import { Modal } from '@/ui/elements/Modal';
@@ -7,11 +8,9 @@ import { Flex } from '../../../customizables';
78
import { Portal } from '../../../elements/Portal';
89
import { basePromptElementStyles, PromptContainer } from '../shared';
910

10-
type EnableOrganizationsPromptProps = {
11-
callerName: string;
12-
};
11+
const EnableOrganizationsPromptInternal = (props: __internal_EnableOrganizationsPromptProps) => {
12+
const ctaText = 'componentName' in props ? `<${props.componentName} /> component` : props.utilityName;
1313

14-
const EnableOrganizationsPromptInternal = (_props: EnableOrganizationsPromptProps) => {
1514
return (
1615
<Portal>
1716
<Modal
@@ -114,7 +113,7 @@ const EnableOrganizationsPromptInternal = (_props: EnableOrganizationsPromptProp
114113
color: white;
115114
`}
116115
>
117-
useOrganization
116+
{ctaText}
118117
</code>{' '}
119118
hook,
120119
<br />
@@ -219,7 +218,7 @@ const EnableOrganizationsPromptInternal = (_props: EnableOrganizationsPromptProp
219218
* A prompt that allows the user to enable the Organizations feature for their development instance
220219
* @internal
221220
*/
222-
export const EnableOrganizationsPrompt = (props: EnableOrganizationsPromptProps) => {
221+
export const EnableOrganizationsPrompt = (props: __internal_EnableOrganizationsPromptProps) => {
223222
return (
224223
<InternalThemeProvider>
225224
<EnableOrganizationsPromptInternal {...props} />

packages/shared/src/organization.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { LoadedClerk, OrganizationMembershipResource } from './types';
1+
import type { __internal_EnableOrganizationsPromptProps, LoadedClerk, OrganizationMembershipResource } from './types';
22

33
/**
44
* Finds the organization membership for a given organization ID from a list of memberships
@@ -26,7 +26,7 @@ export const withOrganizationSettingsEnabled =
2626
<TParams extends any[], TReturn>(
2727
hook: (...args: TParams) => TReturn,
2828
getLoadedClerk: () => LoadedClerk | null | undefined,
29-
callerName?: string,
29+
utilityName?: __internal_EnableOrganizationsPromptProps['utilityName'],
3030
) =>
3131
(...args: TParams): TReturn => {
3232
const clerk = getLoadedClerk();
@@ -35,7 +35,7 @@ export const withOrganizationSettingsEnabled =
3535

3636
if (!environment?.organizationSettings.enabled) {
3737
clerk?.__internal_openEnableOrganizationsPrompt({
38-
callerName,
38+
utilityName,
3939
});
4040
}
4141

packages/shared/src/types/clerk.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1436,9 +1436,13 @@ export type __internal_UserVerificationProps = RoutingOptions & {
14361436

14371437
export type __internal_UserVerificationModalProps = WithoutRouting<__internal_UserVerificationProps>;
14381438

1439-
export type __internal_EnableOrganizationsPromptProps = {
1440-
callerName: string;
1441-
};
1439+
export type __internal_EnableOrganizationsPromptProps =
1440+
| {
1441+
componentName: 'OrganizationSwitcher' | 'OrganizationProfile' | 'OrganizationList';
1442+
}
1443+
| {
1444+
utilityName: 'useOrganizationList' | 'useOrganization';
1445+
};
14421446

14431447
type GoogleOneTapRedirectUrlProps = SignInForceRedirectUrl & SignUpForceRedirectUrl;
14441448

playground/app-router/src/app/layout.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { Links } from '@/common/Links';
2-
import { ClerkProvider } from '@clerk/nextjs';
3-
import { Inter } from 'next/font/google';
41
import './globals.css';
2+
import { Inter } from 'next/font/google';
3+
import { ClerkProvider } from '@clerk/nextjs';
4+
import { Links } from '@/common/Links';
55

66
const inter = Inter({ subsets: ['latin'] });
77

@@ -15,13 +15,13 @@ export default function RootLayout({ children }: { children: React.ReactNode })
1515
return (
1616
<ClerkProvider clerkJSUrl={'https://js.lclclerk.com/npm/clerk.browser.js'}>
1717
<html lang='en'>
18-
<body className={inter.className}>
19-
<Links />
20-
<div style={{ margin: '1rem', padding: '1rem', border: '1px solid green' }}>
21-
<h2>Root layout</h2>
22-
{children}
23-
</div>
24-
</body>
18+
<body className={inter.className}>
19+
<Links />
20+
<div style={{ margin: '1rem', padding: '1rem', border: '1px solid green' }}>
21+
<h2>Root layout</h2>
22+
{children}
23+
</div>
24+
</body>
2525
</html>
2626
</ClerkProvider>
2727
);

pnpm-lock.yaml

Lines changed: 0 additions & 73 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)