@interopio/home-ui-react 1.2.5 → 1.2.7
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/constants/storageKeys.d.ts +1 -0
- package/decoders/validation.d.ts +3 -0
- package/index.css +1 -1
- package/index.d.ts +1 -1
- package/index.js +12 -12
- package/index.js.map +1 -1
- package/index.mjs +1997 -1968
- package/index.mjs.map +1 -1
- package/lib/io-connect-home/types.d.ts +13 -1
- package/lib/io-connect-home/useUser.d.ts +8 -0
- package/lib/login/auth0/auth0-login-page.d.ts +3 -1
- package/lib/login/index.d.ts +0 -1
- package/package.json +1 -1
- package/lib/login/auth0/auth0-login-form.d.ts +0 -4
|
@@ -39,8 +39,16 @@ export interface LaunchpadConfig {
|
|
|
39
39
|
}
|
|
40
40
|
export type Auth0LoginProviderOptions = Auth0ProviderOptions;
|
|
41
41
|
export type LoginType = (typeof AUTH0_LOGIN_TYPES)[keyof typeof AUTH0_LOGIN_TYPES];
|
|
42
|
+
type ValidationResult = {
|
|
43
|
+
ok: true;
|
|
44
|
+
} | {
|
|
45
|
+
ok: false;
|
|
46
|
+
message: string;
|
|
47
|
+
};
|
|
48
|
+
export type ValidateUser = (auth0User: Auth0BaseUser) => ValidationResult;
|
|
42
49
|
export interface Auth0LoginConfig {
|
|
43
50
|
type: 'auth0';
|
|
51
|
+
validateUser?: ValidateUser;
|
|
44
52
|
loginType?: LoginType;
|
|
45
53
|
providerOptions: Auth0LoginProviderOptions;
|
|
46
54
|
components?: LoginPageComponents;
|
|
@@ -54,7 +62,7 @@ export interface SimpleLoginConfig {
|
|
|
54
62
|
}
|
|
55
63
|
export type LoginConfig = Auth0LoginConfig | SimpleLoginConfig;
|
|
56
64
|
export interface IOConnectHomeConfig {
|
|
57
|
-
getIOConnectConfig: (user
|
|
65
|
+
getIOConnectConfig: (user?: Auth0User | User) => IOConnectInitSettings;
|
|
58
66
|
login?: LoginConfig;
|
|
59
67
|
setupFlow?: SetupFlowConfig;
|
|
60
68
|
workspaces?: WorkspacesConfig;
|
|
@@ -63,3 +71,7 @@ export interface IOConnectHomeConfig {
|
|
|
63
71
|
export interface IOConnectHomeProps {
|
|
64
72
|
config: IOConnectHomeConfig;
|
|
65
73
|
}
|
|
74
|
+
export type Auth0ValidationError = {
|
|
75
|
+
message: string;
|
|
76
|
+
};
|
|
77
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ValidateUser, Auth0ValidationError, User } from './types';
|
|
2
|
+
export declare const useUser: (validateUser: ValidateUser | undefined) => {
|
|
3
|
+
isLoading: boolean;
|
|
4
|
+
validationError: Auth0ValidationError | null;
|
|
5
|
+
user: (User & {
|
|
6
|
+
token: string;
|
|
7
|
+
}) | null;
|
|
8
|
+
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { LoginPageComponents } from '../types';
|
|
2
|
+
import { Auth0ValidationError } from '../../io-connect-home/types';
|
|
2
3
|
export interface Auth0LoginPageProps {
|
|
3
4
|
className?: string;
|
|
4
5
|
onLogin: () => void;
|
|
5
6
|
isLoading: boolean;
|
|
6
7
|
components?: LoginPageComponents;
|
|
8
|
+
validationError: Auth0ValidationError | null;
|
|
7
9
|
}
|
|
8
|
-
export declare const Auth0LoginPage: ({ className, onLogin, isLoading, components }: Auth0LoginPageProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const Auth0LoginPage: ({ className, onLogin, isLoading, components, validationError }: Auth0LoginPageProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
11
|
export default Auth0LoginPage;
|
package/lib/login/index.d.ts
CHANGED
package/package.json
CHANGED