@krak-stack/auth 0.1.52 → 0.1.54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,7 +9,7 @@ export { AdminOrganizationForm } from "./admin-organization-form";
9
9
  export { AdminUsersTable, useAdminUsersTotal } from "./admin-users";
10
10
  export { assetUrl } from "./utils";
11
11
  export type { KrakstackAuthContextValue, KrakstackAuthLocale, KrakstackAuthProviderProps, } from "./auth-provider";
12
- export type { OrganizationSwitcherDialog, OrganizationSwitcherProps, } from "./organization-switcher";
12
+ export type { OrganizationSwitcherDialog, OrganizationSwitcherFeatures, OrganizationSwitcherProps, } from "./organization-switcher";
13
13
  export type { UserButtonDialog } from "./user-button";
14
14
  export type { AuthUiClient } from "./auth-client";
15
- export type { MemberRequiredMessages, MemberRequiredProps } from "./member-required";
15
+ export type { MemberRequiredMessages, MemberRequiredProps, } from "./member-required";
@@ -39,6 +39,9 @@ declare const messages: {
39
39
  readonly organization_invite_member_title: "Invite a member";
40
40
  readonly organization_loading: "Loading...";
41
41
  readonly organization_location: "Location";
42
+ readonly organization_parent: "Parent organization";
43
+ readonly organization_parent_description: "Optionally group this organization under another organization.";
44
+ readonly organization_parent_none: "No parent organization";
42
45
  readonly organization_icon: "Icon";
43
46
  readonly organization_logo: "Logo";
44
47
  readonly organization_logo_upload_error: "Could not upload the organization logo.";
@@ -127,6 +130,9 @@ declare const messages: {
127
130
  readonly organization_invite_member_title: "Inviter un membre";
128
131
  readonly organization_loading: "Chargement...";
129
132
  readonly organization_location: "Emplacement";
133
+ readonly organization_parent: "Organisation parente";
134
+ readonly organization_parent_description: "Regroupez facultativement cette organisation sous une autre organisation.";
135
+ readonly organization_parent_none: "Aucune organisation parente";
130
136
  readonly organization_icon: "Icône";
131
137
  readonly organization_logo: "Logo";
132
138
  readonly organization_logo_upload_error: "Impossible de téléverser le logo de l'organisation.";
@@ -181,16 +187,22 @@ declare const messages: {
181
187
  };
182
188
  type OrganizationSwitcherMessageKey = keyof (typeof messages)["en"];
183
189
  export type OrganizationSwitcherMessages = Partial<Record<OrganizationSwitcherMessageKey, string>>;
190
+ export type OrganizationSwitcherFeatures = {
191
+ organizationSwitching?: boolean;
192
+ organizationCreation?: boolean;
193
+ userInvitations?: boolean;
194
+ };
184
195
  export type OrganizationSwitcherProps = {
185
196
  authClient?: AuthUiClient;
186
197
  baseUrl?: string | undefined;
187
198
  side?: ComponentProps<typeof DropdownMenuContent>["side"];
188
199
  className?: string;
189
200
  defaultDialog?: OrganizationSwitcherDialog | null;
201
+ features?: OrganizationSwitcherFeatures;
190
202
  hideTrigger?: boolean;
191
203
  menuActions?: ReactNode;
192
204
  renderUnauthenticated?: () => ReactNode;
193
- locked?: boolean;
205
+ allowedOrganizationIds?: readonly string[];
194
206
  messages?: OrganizationSwitcherMessages;
195
207
  dialog?: OrganizationSwitcherDialog | null;
196
208
  onChange?: (organization: OrganizationSummary | null) => void;
@@ -203,7 +215,8 @@ type OrganizationSummary = {
203
215
  slug: string;
204
216
  metadata?: unknown;
205
217
  userId?: string | null;
218
+ parentId?: string | null;
206
219
  };
207
220
  export type OrganizationSwitcherDialog = "create" | "manage" | "members" | "apiKeys" | "invitations";
208
- export declare function OrganizationSwitcher({ authClient: providedAuthClient, baseUrl, side, className, defaultDialog, hideTrigger, menuActions, renderUnauthenticated, locked, messages, dialog: controlledDialog, onChange, onCreate, onDialogChange, }: OrganizationSwitcherProps): import("react").JSX.Element;
221
+ export declare function OrganizationSwitcher({ authClient: providedAuthClient, baseUrl, side, className, defaultDialog, features, hideTrigger, menuActions, renderUnauthenticated, allowedOrganizationIds, messages, dialog: controlledDialog, onChange, onCreate, onDialogChange, }: OrganizationSwitcherProps): import("react").JSX.Element;
209
222
  export {};