@ericbutera/kaleido 0.7.0 → 0.8.4
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/dist/admin/components/users/List.d.ts +1 -2
- package/dist/admin/components/users/Modal.d.ts +1 -2
- package/dist/auth/components/OAuthProviderControls.d.ts +6 -0
- package/dist/auth/components/SsoOnlyNotice.d.ts +5 -0
- package/dist/auth/components/SsoProviderButtons.d.ts +13 -0
- package/dist/auth/index.d.ts +4 -1
- package/dist/auth/lib/AuthContext.d.ts +2 -2
- package/dist/auth/lib/types.d.ts +19 -3
- package/dist/auth/pages/auth/SignUp.d.ts +1 -3
- package/dist/components/common/QueryState.d.ts +37 -0
- package/dist/components/common/ReactQueryActivityIndicator.d.ts +6 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/featureFlags/defaults.d.ts +0 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3130 -3039
- package/dist/lib/apiHelpers.d.ts +8 -1
- package/dist/openapi/createKaleidoOpenApiAdapters.d.ts +0 -3
- package/dist/users/index.d.ts +2 -2
- package/dist/users/useUsers.d.ts +2 -13
- package/package.json +1 -2
- package/dist/auth/components/GoogleOAuthButton.d.ts +0 -8
package/dist/lib/apiHelpers.d.ts
CHANGED
|
@@ -5,8 +5,15 @@ export type ApiError = {
|
|
|
5
5
|
message?: string;
|
|
6
6
|
errors?: Record<string, string[]>;
|
|
7
7
|
};
|
|
8
|
+
export type KaleidoQueryClientOptions = {
|
|
9
|
+
queryErrorToastThrottleMs?: number;
|
|
10
|
+
suppressQueryErrorToast?: (error: unknown) => boolean;
|
|
11
|
+
toast?: {
|
|
12
|
+
error: (message: string) => void;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
8
15
|
export declare function handleApiError(err: any): ApiError;
|
|
9
|
-
export declare function newQueryClient(): QueryClient;
|
|
16
|
+
export declare function newQueryClient(options?: KaleidoQueryClientOptions): QueryClient;
|
|
10
17
|
export declare const fetchWithCredentials: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
|
|
11
18
|
export declare function createFetchClient(opts: {
|
|
12
19
|
baseUrl: string;
|
|
@@ -24,10 +24,7 @@ export interface TasksOpenApiMapping {
|
|
|
24
24
|
export interface UsersOpenApiMapping {
|
|
25
25
|
listPath: string;
|
|
26
26
|
detailPath: string;
|
|
27
|
-
createPath: string;
|
|
28
27
|
updatePath: string;
|
|
29
|
-
resendForgotPasswordPath: string;
|
|
30
|
-
resendConfirmationPath: string;
|
|
31
28
|
disablePath: string;
|
|
32
29
|
extractListData?: (responseData: any) => User[];
|
|
33
30
|
extractDetailData?: (responseData: any) => User | null;
|
package/dist/users/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { configureUsers,
|
|
2
|
-
export type {
|
|
1
|
+
export { configureUsers, useDisableUserAccount, useUpdateUser, useUser, useUsers, } from './useUsers';
|
|
2
|
+
export type { DisableUserInput, UpdateUserInput, User, UserFormData, UsersConfig, UsersMutation, UseUsersResult, } from './useUsers';
|
package/dist/users/useUsers.d.ts
CHANGED
|
@@ -20,16 +20,11 @@ export type UsersMutation<TInput = any, TResult = any> = {
|
|
|
20
20
|
mutateAsync: (input: TInput) => Promise<TResult>;
|
|
21
21
|
isPending: boolean;
|
|
22
22
|
};
|
|
23
|
-
export interface
|
|
23
|
+
export interface UserFormData {
|
|
24
24
|
email: string;
|
|
25
25
|
name?: string;
|
|
26
|
-
password?: string;
|
|
27
|
-
is_admin?: boolean;
|
|
28
|
-
[key: string]: any;
|
|
29
|
-
}
|
|
30
|
-
export type UserFormData = Omit<CreateUserInput, "is_admin"> & {
|
|
31
26
|
is_admin: boolean;
|
|
32
|
-
}
|
|
27
|
+
}
|
|
33
28
|
export interface UpdateUserInput {
|
|
34
29
|
email?: string;
|
|
35
30
|
name?: string;
|
|
@@ -49,13 +44,10 @@ export interface UsersConfig {
|
|
|
49
44
|
data: User | null;
|
|
50
45
|
isLoading: boolean;
|
|
51
46
|
};
|
|
52
|
-
useCreateUser: () => UsersMutation<CreateUserInput, any>;
|
|
53
47
|
useUpdateUser: () => UsersMutation<{
|
|
54
48
|
id: string;
|
|
55
49
|
data: UpdateUserInput;
|
|
56
50
|
}, any>;
|
|
57
|
-
useResendForgotPassword: () => UsersMutation<UserActionInput, any>;
|
|
58
|
-
useResendConfirmationEmail: () => UsersMutation<UserActionInput, any>;
|
|
59
51
|
useDisableUserAccount: () => UsersMutation<DisableUserInput, any>;
|
|
60
52
|
}
|
|
61
53
|
export declare function configureUsers(cfg: UsersConfig): void;
|
|
@@ -64,11 +56,8 @@ export declare function useUser(id: string | null): {
|
|
|
64
56
|
data: User | null;
|
|
65
57
|
isLoading: boolean;
|
|
66
58
|
};
|
|
67
|
-
export declare function useCreateUser(): UsersMutation<CreateUserInput, any>;
|
|
68
59
|
export declare function useUpdateUser(): UsersMutation<{
|
|
69
60
|
id: string;
|
|
70
61
|
data: UpdateUserInput;
|
|
71
62
|
}, any>;
|
|
72
|
-
export declare function useResendForgotPassword(): UsersMutation<UserActionInput, any>;
|
|
73
|
-
export declare function useResendConfirmationEmail(): UsersMutation<UserActionInput, any>;
|
|
74
63
|
export declare function useDisableUserAccount(): UsersMutation<DisableUserInput, any>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ericbutera/kaleido",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.4",
|
|
4
4
|
"description": "Shared UI components and framework utilities for Kaleido",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -27,7 +27,6 @@
|
|
|
27
27
|
"react-router-dom": "^6.0.0 || ^7.0.0"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@fortawesome/free-brands-svg-icons": "^7.2.0",
|
|
31
30
|
"openapi-fetch": "^0.17.0",
|
|
32
31
|
"openapi-react-query": "^0.5.4",
|
|
33
32
|
"@types/lodash-es": "^4.17.12",
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
interface GoogleOAuthButtonProps {
|
|
2
|
-
redirectUrl?: string;
|
|
3
|
-
text?: string;
|
|
4
|
-
className?: string;
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
}
|
|
7
|
-
export default function GoogleOAuthButton({ redirectUrl, text, className, disabled, }: GoogleOAuthButtonProps): import("react").JSX.Element;
|
|
8
|
-
export {};
|