Skip to content

Commit c4447f7

Browse files
committed
chore: review comments addressed
1 parent b194e31 commit c4447f7

4 files changed

Lines changed: 51 additions & 53 deletions

File tree

packages/react/src/components/auth0/my-organization/shared/member-management/invitations/invitation-details/organization-invitation-details-modal.tsx

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
* @module organization-invitation-details-modal
44
*/
55

6-
import type { MemberInvitation } from '@auth0/universal-components-core';
76
import { Link } from 'lucide-react';
87
import * as React from 'react';
98

@@ -25,26 +24,10 @@ import { useTranslator } from '@/hooks/shared/use-translator';
2524
import { getInvitationStatus } from '@/lib/utils/my-organization/member-management/member-management-utils';
2625
import type {
2726
InvitationStatus,
28-
RoleOption,
29-
IdentityProviderOption,
30-
OrganizationInvitationTabMessages,
27+
OrganizationInvitationDetailsModalProps,
3128
} from '@/types/my-organization/member-management/organization-invitation-table-types';
3229

33-
export interface OrganizationInvitationDetailsModalProps {
34-
invitation: MemberInvitation | null;
35-
isOpen: boolean;
36-
isRevoking?: boolean;
37-
isResending?: boolean;
38-
customMessages?: Partial<OrganizationInvitationTabMessages>;
39-
availableRoles?: RoleOption[];
40-
availableProviders?: IdentityProviderOption[];
41-
readOnly?: boolean;
42-
onClose: () => void;
43-
onCopyUrl?: (invitation: MemberInvitation) => void;
44-
onRevoke?: (invitation?: MemberInvitation) => void;
45-
onResend?: (invitation?: MemberInvitation) => void;
46-
className?: string;
47-
}
30+
export type { OrganizationInvitationDetailsModalProps };
4831

4932
/**
5033
* Returns the badge variant for a given invitation status.

packages/react/src/components/auth0/my-organization/shared/member-management/invitations/invitation-revoke/organization-invitation-revoke-modal.tsx

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
* @module organization-invitation-revoke-modal
44
*/
55

6-
import type { MemberInvitation } from '@auth0/universal-components-core';
76
import * as React from 'react';
87

98
import { Button } from '@/components/ui/button';
@@ -16,18 +15,9 @@ import {
1615
DialogTitle,
1716
} from '@/components/ui/dialog';
1817
import { useTranslator } from '@/hooks/shared/use-translator';
19-
import type { OrganizationInvitationTabMessages } from '@/types/my-organization/member-management/organization-invitation-table-types';
18+
import type { OrganizationInvitationRevokeModalProps } from '@/types/my-organization/member-management/organization-invitation-table-types';
2019

21-
export interface OrganizationInvitationRevokeModalProps {
22-
invitation: MemberInvitation | null;
23-
isOpen: boolean;
24-
isLoading?: boolean;
25-
isRevokeAndResend?: boolean;
26-
customMessages?: Partial<OrganizationInvitationTabMessages>;
27-
onClose: () => void;
28-
onConfirm: (invitation: MemberInvitation) => void;
29-
className?: string;
30-
}
20+
export type { OrganizationInvitationRevokeModalProps };
3121

3222
/**
3323
* Modal for confirming invitation revocation or revoke and resend.

packages/react/src/components/auth0/my-organization/shared/member-management/shared/invitation-create/organization-invitation-create-modal.tsx

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33
* @module organization-invitation-create-modal
44
*/
55

6-
import {
7-
createInvitationCreateSchema,
8-
type InvitationCreateSchemas,
9-
} from '@auth0/universal-components-core';
6+
import { createInvitationCreateSchema } from '@auth0/universal-components-core';
107
import * as React from 'react';
118

129
import { Button } from '@/components/ui/button';
@@ -30,25 +27,9 @@ import {
3027
import { TextFieldGroup } from '@/components/ui/text-field-group';
3128
import type { ChipItem } from '@/components/ui/text-field-group';
3229
import { useTranslator } from '@/hooks/shared/use-translator';
33-
import type {
34-
CreateInvitationInput,
35-
RoleOption,
36-
IdentityProviderOption,
37-
OrganizationInvitationTabMessages,
38-
} from '@/types/my-organization/member-management/organization-invitation-table-types';
30+
import type { OrganizationInvitationCreateModalProps } from '@/types/my-organization/member-management/organization-invitation-table-types';
3931

40-
export interface OrganizationInvitationCreateModalProps {
41-
isOpen: boolean;
42-
isLoading?: boolean;
43-
customMessages?: Partial<OrganizationInvitationTabMessages>;
44-
availableRoles?: RoleOption[];
45-
availableProviders?: IdentityProviderOption[];
46-
inviterName?: string;
47-
schema?: InvitationCreateSchemas;
48-
onClose: () => void;
49-
onCreate: (data: CreateInvitationInput) => void;
50-
className?: string;
51-
}
32+
export type { OrganizationInvitationCreateModalProps };
5233

5334
/**
5435
* Modal for creating a new invitation.

packages/react/src/types/my-organization/member-management/organization-invitation-table-types.ts

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import type {
77
SharedComponentProps,
88
ComponentAction,
99
MemberInvitation,
10+
InvitationCreateSchemas,
1011
} from '@auth0/universal-components-core';
1112

1213
/** Invitation status. */
@@ -211,3 +212,46 @@ export interface SearchFilterProps {
211212
className?: string;
212213
onRoleFilterChange?: (roleId: string | undefined) => void;
213214
}
215+
216+
/** Props for OrganizationInvitationCreateModal component. */
217+
export interface OrganizationInvitationCreateModalProps {
218+
isOpen: boolean;
219+
isLoading?: boolean;
220+
customMessages?: Partial<OrganizationInvitationTabMessages>;
221+
availableRoles?: RoleOption[];
222+
availableProviders?: IdentityProviderOption[];
223+
inviterName?: string;
224+
schema?: InvitationCreateSchemas;
225+
onClose: () => void;
226+
onCreate: (data: CreateInvitationInput) => void;
227+
className?: string;
228+
}
229+
230+
/** Props for OrganizationInvitationDetailsModal component. */
231+
export interface OrganizationInvitationDetailsModalProps {
232+
invitation: MemberInvitation | null;
233+
isOpen: boolean;
234+
isRevoking?: boolean;
235+
isResending?: boolean;
236+
customMessages?: Partial<OrganizationInvitationTabMessages>;
237+
availableRoles?: RoleOption[];
238+
availableProviders?: IdentityProviderOption[];
239+
readOnly?: boolean;
240+
onClose: () => void;
241+
onCopyUrl?: (invitation: MemberInvitation) => void;
242+
onRevoke?: (invitation?: MemberInvitation) => void;
243+
onResend?: (invitation?: MemberInvitation) => void;
244+
className?: string;
245+
}
246+
247+
/** Props for OrganizationInvitationRevokeModal component. */
248+
export interface OrganizationInvitationRevokeModalProps {
249+
invitation: MemberInvitation | null;
250+
isOpen: boolean;
251+
isLoading?: boolean;
252+
isRevokeAndResend?: boolean;
253+
customMessages?: Partial<OrganizationInvitationTabMessages>;
254+
onClose: () => void;
255+
onConfirm: (invitation: MemberInvitation) => void;
256+
className?: string;
257+
}

0 commit comments

Comments
 (0)