@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.
- package/README.md +6 -0
- package/dist/admin/api.group.d.ts +60 -0
- package/dist/admin/schema.d.ts +64 -0
- package/dist/admin/schema.js +41 -0
- package/dist/api.d.ts +82 -1
- package/dist/components/admin-organization-form.js +110 -69
- package/dist/components/admin-organizations.js +107 -7
- package/dist/components/admin-users.js +45 -4
- package/dist/components/auth-client-api.d.ts +60 -0
- package/dist/components/auth-client.d.ts +4 -0
- package/dist/components/auth-client.js +4 -0
- package/dist/components/auth-forms.js +274 -292
- package/dist/components/index.d.ts +2 -2
- package/dist/components/organization-switcher.d.ts +15 -2
- package/dist/components/organization-switcher.js +250 -200
- package/dist/components/user-button.js +197 -178
- package/dist/index.d.ts +1 -1
- package/dist/schema.d.ts +1 -0
- package/dist/schema.js +2 -0
- package/dist/server/api.group.d.ts +22 -1
- package/dist/server/api.group.js +10 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +1 -1
- package/dist/server/schema.d.ts +20 -0
- package/dist/server/schema.js +5 -0
- package/dist/service.d.ts +50 -0
- package/package.json +1 -1
|
@@ -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
|
-
|
|
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,
|
|
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 {};
|