@zango-core/appbuilder 1.0.0-rc.1
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/ConfigurePage-DRzSb06z.js +29 -0
- package/dist/ConfigurePage-DRzSb06z.js.map +1 -0
- package/dist/LoginPageWithRoleSelection-xTr_eIWh.js +662 -0
- package/dist/LoginPageWithRoleSelection-xTr_eIWh.js.map +1 -0
- package/dist/PageTypeRegistry-5269IpiS.js +53 -0
- package/dist/PageTypeRegistry-5269IpiS.js.map +1 -0
- package/dist/index.framework-B8SMzgN1.js +28005 -0
- package/dist/index.framework-B8SMzgN1.js.map +1 -0
- package/dist/types/App.d.ts +14 -0
- package/dist/types/__tests__/mocks/data/appInitData.d.ts +197 -0
- package/dist/types/__tests__/mocks/data/authConfigData.d.ts +356 -0
- package/dist/types/__tests__/mocks/externalPackages.d.ts +42 -0
- package/dist/types/__tests__/mocks/handlers/appInit.handlers.d.ts +3 -0
- package/dist/types/__tests__/mocks/handlers/auth.handlers.d.ts +1 -0
- package/dist/types/__tests__/mocks/handlers/index.d.ts +5 -0
- package/dist/types/__tests__/mocks/handlers/profile.handlers.d.ts +15 -0
- package/dist/types/__tests__/mocks/handlers/session.handlers.d.ts +2 -0
- package/dist/types/__tests__/setup/setupDOMMatchers.d.ts +0 -0
- package/dist/types/__tests__/setup/setupMSW.d.ts +1 -0
- package/dist/types/__tests__/setup/setupTests.d.ts +34 -0
- package/dist/types/__tests__/utils/mockRouterUtils.d.ts +62 -0
- package/dist/types/__tests__/utils/renderWithProviders.d.ts +22 -0
- package/dist/types/__tests__/utils/waitForHelpers.d.ts +36 -0
- package/dist/types/auth/components/AuthMobileShell.d.ts +8 -0
- package/dist/types/auth/components/AuthProvider.d.ts +30 -0
- package/dist/types/auth/components/DynamicLoginForm.d.ts +9 -0
- package/dist/types/auth/components/ForgotPasswordForm.d.ts +11 -0
- package/dist/types/auth/components/LoginForm.d.ts +7 -0
- package/dist/types/auth/components/LoginRouter.d.ts +197 -0
- package/dist/types/auth/components/OAuthCallback.d.ts +19 -0
- package/dist/types/auth/components/OTPForm.d.ts +11 -0
- package/dist/types/auth/components/OTPInput.d.ts +8 -0
- package/dist/types/auth/components/PasswordResetRequired.d.ts +23 -0
- package/dist/types/auth/components/ProviderButton.d.ts +17 -0
- package/dist/types/auth/components/ResetPasswordForm.d.ts +12 -0
- package/dist/types/auth/components/RoleSelection.d.ts +25 -0
- package/dist/types/auth/components/SecondFactorAuth.d.ts +21 -0
- package/dist/types/auth/components/composable/OTPLoginForm.d.ts +17 -0
- package/dist/types/auth/components/composable/PasswordLoginForm.d.ts +17 -0
- package/dist/types/auth/components/composable/SSOButtons.d.ts +61 -0
- package/dist/types/auth/components/composable/index.d.ts +42 -0
- package/dist/types/auth/contexts/LoginContext.d.ts +6 -0
- package/dist/types/auth/hocs/withMultiStepAuth.d.ts +35 -0
- package/dist/types/auth/index.d.ts +23 -0
- package/dist/types/auth/pages/CompleteAuthFlow.d.ts +24 -0
- package/dist/types/auth/pages/LoginPage.d.ts +8 -0
- package/dist/types/auth/pages/LoginPageWithRoleSelection.d.ts +13 -0
- package/dist/types/auth/pages/OAuthCallbackPage.d.ts +17 -0
- package/dist/types/auth/pages/SAMLCallbackPage.d.ts +16 -0
- package/dist/types/auth/services/authService.d.ts +87 -0
- package/dist/types/auth/services/internal/apiClients.d.ts +9 -0
- package/dist/types/auth/services/internal/authState.d.ts +12 -0
- package/dist/types/auth/services/internal/errorHelper.d.ts +1 -0
- package/dist/types/auth/services/internal/oauthSamlService.d.ts +46 -0
- package/dist/types/auth/services/internal/passwordValidator.d.ts +17 -0
- package/dist/types/auth/services/network/api.d.ts +1629 -0
- package/dist/types/auth/services/network/base.d.ts +31 -0
- package/dist/types/auth/services/network/configuration.d.ts +74 -0
- package/dist/types/auth/services/network/index.d.ts +13 -0
- package/dist/types/auth/stores/index.d.ts +1 -0
- package/dist/types/auth/stores/useAuthStore.d.ts +6 -0
- package/dist/types/auth/types/index.d.ts +57 -0
- package/dist/types/auth/utils/authFlowHandler.d.ts +72 -0
- package/dist/types/auth/utils/authUtils.d.ts +21 -0
- package/dist/types/auth/utils/validators.d.ts +18 -0
- package/dist/types/components/ErrorBoundary.d.ts +23 -0
- package/dist/types/components/ErrorFallback.d.ts +8 -0
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components/ui/avatar.d.ts +11 -0
- package/dist/types/components/ui/button.d.ts +10 -0
- package/dist/types/components/ui/collapsible.d.ts +5 -0
- package/dist/types/components/ui/dialog.d.ts +13 -0
- package/dist/types/components/ui/dropdown-menu.d.ts +10 -0
- package/dist/types/components/ui/empty.d.ts +8 -0
- package/dist/types/components/ui/index.d.ts +12 -0
- package/dist/types/components/ui/input.d.ts +3 -0
- package/dist/types/components/ui/separator.d.ts +4 -0
- package/dist/types/components/ui/sheet.d.ts +14 -0
- package/dist/types/components/ui/sidebar.d.ts +69 -0
- package/dist/types/components/ui/skeleton.d.ts +2 -0
- package/dist/types/components/ui/tooltip.d.ts +7 -0
- package/dist/types/framework/ZangoApp.d.ts +19 -0
- package/dist/types/framework/components/CachedLogo.d.ts +9 -0
- package/dist/types/framework/components/CustomPageFallback.d.ts +13 -0
- package/dist/types/framework/components/CustomPageLoader.d.ts +10 -0
- package/dist/types/framework/components/DocumentHead.d.ts +5 -0
- package/dist/types/framework/components/RouteErrorBoundary.d.ts +16 -0
- package/dist/types/framework/components/SessionSecurityDialog.d.ts +10 -0
- package/dist/types/framework/components/SessionSecurityProvider.d.ts +8 -0
- package/dist/types/framework/components/SmartLink.d.ts +13 -0
- package/dist/types/framework/components/layout/AppSidebar.d.ts +36 -0
- package/dist/types/framework/components/layout/Breadcrumbs.d.ts +2 -0
- package/dist/types/framework/components/layout/CommandPalette.d.ts +2 -0
- package/dist/types/framework/components/layout/Layout.d.ts +2 -0
- package/dist/types/framework/components/layout/Navbar.d.ts +9 -0
- package/dist/types/framework/components/layout/NavbarIcon.d.ts +12 -0
- package/dist/types/framework/components/layout/Topbar.d.ts +50 -0
- package/dist/types/framework/components/layout/UserProfileDrawer.d.ts +7 -0
- package/dist/types/framework/components/layout/profile/PasswordCard.d.ts +18 -0
- package/dist/types/framework/components/layout/profile/PersonalInfoCard.d.ts +12 -0
- package/dist/types/framework/components/layout/profile/ProfileRail.d.ts +23 -0
- package/dist/types/framework/components/layout/profile/SessionsCard.d.ts +8 -0
- package/dist/types/framework/components/layout/profile/TokensCard.d.ts +11 -0
- package/dist/types/framework/components/layout/profile/TwoFactorCard.d.ts +7 -0
- package/dist/types/framework/config/defaultLayoutConfig.d.ts +34 -0
- package/dist/types/framework/constants/routes.d.ts +5 -0
- package/dist/types/framework/contexts/AppContext.d.ts +57 -0
- package/dist/types/framework/contexts/AuthConfigContext.d.ts +22 -0
- package/dist/types/framework/hooks/useProfileData.d.ts +73 -0
- package/dist/types/framework/hooks/useRoutes.d.ts +10 -0
- package/dist/types/framework/hooks/useSessionSecurity.d.ts +17 -0
- package/dist/types/framework/hooks/useSmartNavigation.d.ts +15 -0
- package/dist/types/framework/index.d.ts +35 -0
- package/dist/types/framework/pages/ConfigurePage.d.ts +2 -0
- package/dist/types/framework/pages/CrudPage.d.ts +6 -0
- package/dist/types/framework/pages/LoginPage.d.ts +5 -0
- package/dist/types/framework/pages/LogoutPage.d.ts +2 -0
- package/dist/types/framework/pages/NotFoundPage.d.ts +6 -0
- package/dist/types/framework/pages/TrainingPage.d.ts +6 -0
- package/dist/types/framework/routing/PageTypeRegistry.d.ts +43 -0
- package/dist/types/framework/routing/PageTypeRouter.d.ts +12 -0
- package/dist/types/framework/routing/dynamicPageRegistry.d.ts +41 -0
- package/dist/types/framework/routing/getRenderComponent.d.ts +6 -0
- package/dist/types/framework/types/layout.types.d.ts +107 -0
- package/dist/types/framework/utils/apiConfig.d.ts +41 -0
- package/dist/types/framework/utils/apiInterceptor.d.ts +12 -0
- package/dist/types/framework/utils/apiUrlUtils.d.ts +9 -0
- package/dist/types/framework/utils/authThemeUtils.d.ts +64 -0
- package/dist/types/framework/utils/colorUtils.d.ts +53 -0
- package/dist/types/framework/utils/cookieUtils.d.ts +20 -0
- package/dist/types/framework/utils/csrf.d.ts +27 -0
- package/dist/types/framework/utils/logoCache.d.ts +21 -0
- package/dist/types/framework/utils/logoutUtils.d.ts +15 -0
- package/dist/types/framework/utils/redirectUtils.d.ts +48 -0
- package/dist/types/framework/utils/safeRedirect.d.ts +21 -0
- package/dist/types/framework/utils/storageKeys.d.ts +44 -0
- package/dist/types/framework/utils/storageSanitizer.d.ts +20 -0
- package/dist/types/hooks/index.d.ts +2 -0
- package/dist/types/hooks/queries/index.d.ts +4 -0
- package/dist/types/hooks/queries/useAppInitQuery.d.ts +1 -0
- package/dist/types/hooks/queries/useAuthConfigQuery.d.ts +1 -0
- package/dist/types/hooks/queries/useProfileQuery.d.ts +8 -0
- package/dist/types/hooks/useBreakpoint.d.ts +2 -0
- package/dist/types/hooks/useMobile.d.ts +1 -0
- package/dist/types/index.d.ts +0 -0
- package/dist/types/index.framework.d.ts +39 -0
- package/dist/types/index.zango.d.ts +12 -0
- package/dist/types/lib/index.d.ts +1 -0
- package/dist/types/lib/utils.d.ts +2 -0
- package/dist/types/schemas/appInit.schema.d.ts +61 -0
- package/dist/types/schemas/index.d.ts +10 -0
- package/dist/types/schemas/profile.schema.d.ts +18 -0
- package/dist/types/schemas/route.schema.d.ts +9 -0
- package/dist/types/schemas/session.schema.d.ts +8 -0
- package/dist/types/schemas/theme.schema.d.ts +27 -0
- package/dist/types/services/api/index.d.ts +2 -0
- package/dist/types/services/api.d.ts +109 -0
- package/dist/types/services/index.d.ts +7 -0
- package/dist/types/services/legacyAdapter.d.ts +10 -0
- package/dist/types/services/logger.d.ts +32 -0
- package/dist/types/services/normalizeResponse.d.ts +29 -0
- package/dist/types/types/auth.d.ts +103 -0
- package/dist/types/types/common.d.ts +343 -0
- package/dist/types/types/index.d.ts +278 -0
- package/dist/zango-appbuilder.js +99 -0
- package/dist/zango-appbuilder.js.map +1 -0
- package/dist/zango-appbuilder.umd.cjs +247 -0
- package/dist/zango-appbuilder.umd.cjs.map +1 -0
- package/package.json +140 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Configuration } from './configuration';
|
|
2
|
+
import { AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
3
|
+
export declare const BASE_PATH: string;
|
|
4
|
+
export declare const COLLECTION_FORMATS: {
|
|
5
|
+
csv: string;
|
|
6
|
+
ssv: string;
|
|
7
|
+
tsv: string;
|
|
8
|
+
pipes: string;
|
|
9
|
+
};
|
|
10
|
+
export interface RequestArgs {
|
|
11
|
+
url: string;
|
|
12
|
+
options: RawAxiosRequestConfig;
|
|
13
|
+
}
|
|
14
|
+
export declare class BaseAPI {
|
|
15
|
+
protected basePath: string;
|
|
16
|
+
protected axios: AxiosInstance;
|
|
17
|
+
protected configuration: Configuration | undefined;
|
|
18
|
+
constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
|
|
19
|
+
}
|
|
20
|
+
export declare class RequiredError extends Error {
|
|
21
|
+
field: string;
|
|
22
|
+
constructor(field: string, msg?: string);
|
|
23
|
+
}
|
|
24
|
+
interface ServerMap {
|
|
25
|
+
[key: string]: {
|
|
26
|
+
url: string;
|
|
27
|
+
description: string;
|
|
28
|
+
}[];
|
|
29
|
+
}
|
|
30
|
+
export declare const operationServerMap: ServerMap;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auth API
|
|
3
|
+
* API collection for app authentication
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
export interface ConfigurationParameters {
|
|
13
|
+
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
|
14
|
+
username?: string;
|
|
15
|
+
password?: string;
|
|
16
|
+
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
|
17
|
+
basePath?: string;
|
|
18
|
+
serverIndex?: number;
|
|
19
|
+
baseOptions?: any;
|
|
20
|
+
formDataCtor?: new () => any;
|
|
21
|
+
}
|
|
22
|
+
export declare class Configuration {
|
|
23
|
+
/**
|
|
24
|
+
* parameter for apiKey security
|
|
25
|
+
* @param name security name
|
|
26
|
+
*/
|
|
27
|
+
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
|
28
|
+
/**
|
|
29
|
+
* parameter for basic security
|
|
30
|
+
*/
|
|
31
|
+
username?: string;
|
|
32
|
+
/**
|
|
33
|
+
* parameter for basic security
|
|
34
|
+
*/
|
|
35
|
+
password?: string;
|
|
36
|
+
/**
|
|
37
|
+
* parameter for oauth2 security
|
|
38
|
+
* @param name security name
|
|
39
|
+
* @param scopes oauth2 scope
|
|
40
|
+
*/
|
|
41
|
+
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
|
42
|
+
/**
|
|
43
|
+
* override base path
|
|
44
|
+
*/
|
|
45
|
+
basePath?: string;
|
|
46
|
+
/**
|
|
47
|
+
* override server index
|
|
48
|
+
*/
|
|
49
|
+
serverIndex?: number;
|
|
50
|
+
/**
|
|
51
|
+
* base options for axios calls
|
|
52
|
+
*/
|
|
53
|
+
baseOptions?: any;
|
|
54
|
+
/**
|
|
55
|
+
* The FormData constructor that will be used to create multipart form data
|
|
56
|
+
* requests. You can inject this here so that execution environments that
|
|
57
|
+
* do not support the FormData class can still run the generated client.
|
|
58
|
+
*
|
|
59
|
+
* @type {new () => FormData}
|
|
60
|
+
*/
|
|
61
|
+
formDataCtor?: new () => any;
|
|
62
|
+
constructor(param?: ConfigurationParameters);
|
|
63
|
+
/**
|
|
64
|
+
* Check if the given MIME is a JSON MIME.
|
|
65
|
+
* JSON MIME examples:
|
|
66
|
+
* application/json
|
|
67
|
+
* application/json; charset=UTF8
|
|
68
|
+
* APPLICATION/JSON
|
|
69
|
+
* application/vnd.company+json
|
|
70
|
+
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
71
|
+
* @return True if the given MIME is JSON, false otherwise.
|
|
72
|
+
*/
|
|
73
|
+
isJsonMime(mime: string): boolean;
|
|
74
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auth API
|
|
3
|
+
* API collection for app authentication
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
export * from './api';
|
|
13
|
+
export * from './configuration';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useAuthStore } from './useAuthStore';
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { UserProfile, UserRole } from '../../types/common';
|
|
2
|
+
export type { PendingAuthResult } from '../../types/common';
|
|
3
|
+
export interface ApiConfig {
|
|
4
|
+
apiUrl?: string;
|
|
5
|
+
headers?: Record<string, string>;
|
|
6
|
+
tokenKey?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface LoginCredentials {
|
|
9
|
+
username: string;
|
|
10
|
+
password: string;
|
|
11
|
+
[key: string]: unknown;
|
|
12
|
+
}
|
|
13
|
+
export interface AuthResult {
|
|
14
|
+
user?: UserProfile;
|
|
15
|
+
token?: string;
|
|
16
|
+
roles?: UserRole[];
|
|
17
|
+
requires2FA?: boolean;
|
|
18
|
+
twoFactorMethods?: string[];
|
|
19
|
+
requiresPasswordReset?: boolean;
|
|
20
|
+
passwordResetReason?: string;
|
|
21
|
+
provider?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface LoginPageProps {
|
|
24
|
+
onLogin?: (credentials: LoginCredentials) => Promise<AuthResult>;
|
|
25
|
+
logo?: React.ReactNode;
|
|
26
|
+
title?: string;
|
|
27
|
+
subtitle?: string;
|
|
28
|
+
basePath?: string;
|
|
29
|
+
apiConfig?: ApiConfig;
|
|
30
|
+
}
|
|
31
|
+
export interface LoginPageWithRoleSelectionProps extends LoginPageProps {
|
|
32
|
+
onLoginSuccess?: (result: AuthResult) => void;
|
|
33
|
+
roleSelectionTitle?: string;
|
|
34
|
+
roleSelectionSubtitle?: string;
|
|
35
|
+
}
|
|
36
|
+
export interface OAuthCallbackPageProps {
|
|
37
|
+
logo?: React.ReactNode;
|
|
38
|
+
apiConfig?: ApiConfig;
|
|
39
|
+
onAuthComplete?: (result: AuthResult) => void;
|
|
40
|
+
roleSelectionTitle?: string;
|
|
41
|
+
roleSelectionSubtitle?: string;
|
|
42
|
+
twoFactorTitle?: string;
|
|
43
|
+
twoFactorSubtitle?: string;
|
|
44
|
+
passwordResetTitle?: string;
|
|
45
|
+
passwordResetSubtitle?: string;
|
|
46
|
+
}
|
|
47
|
+
export interface DynamicLoginFormProps {
|
|
48
|
+
onLogin: (credentials: LoginCredentials) => Promise<AuthResult>;
|
|
49
|
+
apiConfig: ApiConfig;
|
|
50
|
+
}
|
|
51
|
+
export interface RoleSelectionProps {
|
|
52
|
+
user: UserProfile | null;
|
|
53
|
+
roles: UserRole[];
|
|
54
|
+
onRoleSelect: (role: UserRole) => Promise<void>;
|
|
55
|
+
title?: string;
|
|
56
|
+
subtitle?: string;
|
|
57
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility functions for handling multi-step authentication flow
|
|
3
|
+
*/
|
|
4
|
+
export interface NextStep {
|
|
5
|
+
id: string;
|
|
6
|
+
is_pending: boolean;
|
|
7
|
+
metadata?: Record<string, unknown>;
|
|
8
|
+
}
|
|
9
|
+
export interface AuthResponse {
|
|
10
|
+
status?: number;
|
|
11
|
+
data?: {
|
|
12
|
+
next_step?: NextStep;
|
|
13
|
+
message?: string;
|
|
14
|
+
[key: string]: unknown;
|
|
15
|
+
};
|
|
16
|
+
next_step?: NextStep;
|
|
17
|
+
meta?: {
|
|
18
|
+
is_authenticated?: boolean;
|
|
19
|
+
[key: string]: unknown;
|
|
20
|
+
};
|
|
21
|
+
response?: {
|
|
22
|
+
status?: number;
|
|
23
|
+
data?: {
|
|
24
|
+
next_step?: NextStep;
|
|
25
|
+
[key: string]: unknown;
|
|
26
|
+
};
|
|
27
|
+
meta?: {
|
|
28
|
+
is_authenticated?: boolean;
|
|
29
|
+
[key: string]: unknown;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
redirect_url?: string;
|
|
33
|
+
[key: string]: unknown;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Extract next_step from various response formats
|
|
37
|
+
*/
|
|
38
|
+
export declare const extractNextStep: (result: AuthResponse | Record<string, unknown>) => NextStep | null;
|
|
39
|
+
/**
|
|
40
|
+
* Check if the response requires next_step handling
|
|
41
|
+
*/
|
|
42
|
+
export declare const hasNextStep: (result: AuthResponse | Record<string, unknown>) => boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Get the redirect URL for a given next_step
|
|
45
|
+
*/
|
|
46
|
+
export declare const getNextStepRedirectUrl: (nextStep: NextStep, basePath?: string) => string;
|
|
47
|
+
/**
|
|
48
|
+
* Handle authentication response and redirect appropriately
|
|
49
|
+
* This function checks for next_step and redirects to the appropriate page
|
|
50
|
+
*
|
|
51
|
+
* @param result - The authentication response
|
|
52
|
+
* @param options - Configuration options
|
|
53
|
+
* @returns The redirect URL to use
|
|
54
|
+
*/
|
|
55
|
+
export declare const handleAuthResponse: (result: AuthResponse | Record<string, unknown>, options?: {
|
|
56
|
+
basePath?: string;
|
|
57
|
+
defaultRedirect?: string;
|
|
58
|
+
onNextStep?: (nextStep: NextStep) => void;
|
|
59
|
+
}) => string;
|
|
60
|
+
/**
|
|
61
|
+
* Process authentication result and redirect
|
|
62
|
+
* This is a convenience function that handles the entire flow
|
|
63
|
+
*
|
|
64
|
+
* @param result - The authentication response
|
|
65
|
+
* @param options - Configuration options
|
|
66
|
+
*/
|
|
67
|
+
export declare const processAuthResultAndRedirect: (result: AuthResponse | Record<string, unknown>, options?: {
|
|
68
|
+
basePath?: string;
|
|
69
|
+
defaultRedirect?: string;
|
|
70
|
+
onNextStep?: (nextStep: NextStep) => void;
|
|
71
|
+
useLocationHref?: boolean;
|
|
72
|
+
}) => string | undefined;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const getAuthToken: (tokenKey?: string) => string | null;
|
|
2
|
+
export declare const setAuthToken: (token: string, tokenKey?: string) => void;
|
|
3
|
+
export declare const removeAuthToken: (tokenKey?: string) => void;
|
|
4
|
+
export declare const isTokenExpired: (token: string) => boolean;
|
|
5
|
+
export declare const decodeToken: (token: string) => any;
|
|
6
|
+
export declare const getAuthHeaders: (token: string) => {
|
|
7
|
+
Authorization: string;
|
|
8
|
+
} | {
|
|
9
|
+
Authorization?: undefined;
|
|
10
|
+
};
|
|
11
|
+
export declare const validatePassword: (password: string) => {
|
|
12
|
+
isValid: boolean;
|
|
13
|
+
errors: string[];
|
|
14
|
+
strength: {
|
|
15
|
+
hasUpperCase: boolean;
|
|
16
|
+
hasLowerCase: boolean;
|
|
17
|
+
hasNumbers: boolean;
|
|
18
|
+
hasSpecialChar: boolean;
|
|
19
|
+
length: boolean;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
interface PasswordPolicy {
|
|
2
|
+
min_length?: number;
|
|
3
|
+
[key: string]: unknown;
|
|
4
|
+
}
|
|
5
|
+
export declare function isEmail(value: string): boolean;
|
|
6
|
+
export declare function getPasswordMinLength(policy?: PasswordPolicy | null): number;
|
|
7
|
+
export declare function passwordMinLengthRule(policy?: PasswordPolicy | null, customMessage?: string): {
|
|
8
|
+
min: number;
|
|
9
|
+
message: string;
|
|
10
|
+
};
|
|
11
|
+
export declare function validatePasswordForForm(value: string, policy: PasswordPolicy | null | undefined, validateFn: (password: string) => {
|
|
12
|
+
valid: boolean;
|
|
13
|
+
errors: string[];
|
|
14
|
+
}, messages?: {
|
|
15
|
+
required?: string;
|
|
16
|
+
tooShort?: string;
|
|
17
|
+
}): Promise<void>;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Component, ErrorInfo, ReactNode } from 'react';
|
|
2
|
+
interface Props {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
}
|
|
5
|
+
interface State {
|
|
6
|
+
hasError: boolean;
|
|
7
|
+
error: Error | null;
|
|
8
|
+
}
|
|
9
|
+
export declare class ErrorBoundary extends Component<Props, State> {
|
|
10
|
+
constructor(props: Props);
|
|
11
|
+
static getDerivedStateFromError(error: Error): State;
|
|
12
|
+
componentDidCatch(error: Error, info: ErrorInfo): void;
|
|
13
|
+
handleReset(): void;
|
|
14
|
+
render(): ReactNode;
|
|
15
|
+
}
|
|
16
|
+
export declare class FeatureErrorBoundary extends Component<Props, State> {
|
|
17
|
+
constructor(props: Props);
|
|
18
|
+
static getDerivedStateFromError(error: Error): State;
|
|
19
|
+
componentDidCatch(error: Error, info: ErrorInfo): void;
|
|
20
|
+
handleReset(): void;
|
|
21
|
+
render(): ReactNode;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface ErrorFallbackProps {
|
|
3
|
+
error: Error;
|
|
4
|
+
resetErrorBoundary: () => void;
|
|
5
|
+
variant: 'full-page' | 'page' | 'inline';
|
|
6
|
+
}
|
|
7
|
+
export declare function ErrorFallback({ error, resetErrorBoundary, variant }: ErrorFallbackProps): React.JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ui';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
interface AvatarProps {
|
|
3
|
+
size?: number | 'default' | 'large' | 'small';
|
|
4
|
+
icon?: React.ReactNode;
|
|
5
|
+
src?: string;
|
|
6
|
+
style?: React.CSSProperties;
|
|
7
|
+
className?: string;
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
declare function Avatar({ size, icon, src, style, className, children }: AvatarProps): React.JSX.Element;
|
|
11
|
+
export { Avatar, type AvatarProps };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import type * as React from 'react';
|
|
3
|
+
declare const buttonVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
|
|
5
|
+
size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
7
|
+
declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<'button'> & VariantProps<typeof buttonVariants> & {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
}): React.JSX.Element;
|
|
10
|
+
export { Button, buttonVariants };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Collapsible as CollapsiblePrimitive } from 'radix-ui';
|
|
2
|
+
declare function Collapsible({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Root>): import("react").JSX.Element;
|
|
3
|
+
declare function CollapsibleTrigger({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>): import("react").JSX.Element;
|
|
4
|
+
declare function CollapsibleContent({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>): import("react").JSX.Element;
|
|
5
|
+
export { Collapsible, CollapsibleContent, CollapsibleTrigger };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Dialog as DialogPrimitive } from 'radix-ui';
|
|
2
|
+
import type * as React from 'react';
|
|
3
|
+
declare function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): React.JSX.Element;
|
|
4
|
+
declare function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): React.JSX.Element;
|
|
5
|
+
declare function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>): React.JSX.Element;
|
|
6
|
+
declare function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>): React.JSX.Element;
|
|
7
|
+
declare function DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>): React.JSX.Element;
|
|
8
|
+
declare function DialogContent({ className, children, showCloseButton, ...props }: React.ComponentProps<typeof DialogPrimitive.Content> & {
|
|
9
|
+
showCloseButton?: boolean;
|
|
10
|
+
}): React.JSX.Element;
|
|
11
|
+
declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): React.JSX.Element;
|
|
12
|
+
declare function DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>): React.JSX.Element;
|
|
13
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DropdownMenu as DropdownMenuPrimitive } from 'radix-ui';
|
|
2
|
+
import type * as React from 'react';
|
|
3
|
+
declare function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>): React.JSX.Element;
|
|
4
|
+
declare function DropdownMenuTrigger({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): React.JSX.Element;
|
|
5
|
+
declare function DropdownMenuContent({ className, sideOffset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>): React.JSX.Element;
|
|
6
|
+
declare function DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>): React.JSX.Element;
|
|
7
|
+
declare function DropdownMenuItem({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Item>): React.JSX.Element;
|
|
8
|
+
declare function DropdownMenuLabel({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Label>): React.JSX.Element;
|
|
9
|
+
declare function DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>): React.JSX.Element;
|
|
10
|
+
export { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
interface EmptyProps {
|
|
3
|
+
description?: React.ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
image?: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
declare function Empty({ description, className, image }: EmptyProps): React.JSX.Element;
|
|
8
|
+
export { Empty, type EmptyProps };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { Avatar } from './avatar';
|
|
2
|
+
export { Button, buttonVariants } from './button';
|
|
3
|
+
export { Collapsible, CollapsibleContent, CollapsibleTrigger } from './collapsible';
|
|
4
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, } from './dialog';
|
|
5
|
+
export { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, } from './dropdown-menu';
|
|
6
|
+
export { Empty } from './empty';
|
|
7
|
+
export { Input } from './input';
|
|
8
|
+
export { Separator } from './separator';
|
|
9
|
+
export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, } from './sheet';
|
|
10
|
+
export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar, } from './sidebar';
|
|
11
|
+
export { Skeleton } from './skeleton';
|
|
12
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from './tooltip';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Separator as SeparatorPrimitive } from 'radix-ui';
|
|
2
|
+
import type * as React from 'react';
|
|
3
|
+
declare function Separator({ className, orientation, decorative, ...props }: React.ComponentProps<typeof SeparatorPrimitive.Root>): React.JSX.Element;
|
|
4
|
+
export { Separator };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Dialog as SheetPrimitive } from 'radix-ui';
|
|
2
|
+
import type * as React from 'react';
|
|
3
|
+
declare function Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>): React.JSX.Element;
|
|
4
|
+
declare function SheetTrigger({ ...props }: React.ComponentProps<typeof SheetPrimitive.Trigger>): React.JSX.Element;
|
|
5
|
+
declare function SheetClose({ ...props }: React.ComponentProps<typeof SheetPrimitive.Close>): React.JSX.Element;
|
|
6
|
+
declare function SheetContent({ className, children, side, showCloseButton, ...props }: React.ComponentProps<typeof SheetPrimitive.Content> & {
|
|
7
|
+
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
8
|
+
showCloseButton?: boolean;
|
|
9
|
+
}): React.JSX.Element;
|
|
10
|
+
declare function SheetHeader({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
11
|
+
declare function SheetFooter({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
12
|
+
declare function SheetTitle({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Title>): React.JSX.Element;
|
|
13
|
+
declare function SheetDescription({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Description>): React.JSX.Element;
|
|
14
|
+
export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { Button } from './button';
|
|
3
|
+
import { Input } from './input';
|
|
4
|
+
import { Separator } from './separator';
|
|
5
|
+
import { TooltipContent } from './tooltip';
|
|
6
|
+
import * as React from 'react';
|
|
7
|
+
type SidebarContextProps = {
|
|
8
|
+
state: 'expanded' | 'collapsed';
|
|
9
|
+
open: boolean;
|
|
10
|
+
setOpen: (open: boolean) => void;
|
|
11
|
+
openMobile: boolean;
|
|
12
|
+
setOpenMobile: (open: boolean) => void;
|
|
13
|
+
isMobile: boolean;
|
|
14
|
+
toggleSidebar: () => void;
|
|
15
|
+
};
|
|
16
|
+
declare function useSidebar(): SidebarContextProps;
|
|
17
|
+
declare function SidebarProvider({ defaultOpen, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }: React.ComponentProps<'div'> & {
|
|
18
|
+
defaultOpen?: boolean;
|
|
19
|
+
open?: boolean;
|
|
20
|
+
onOpenChange?: (open: boolean) => void;
|
|
21
|
+
}): React.JSX.Element;
|
|
22
|
+
declare function Sidebar({ side, variant, collapsible, className, children, ...props }: React.ComponentProps<'div'> & {
|
|
23
|
+
side?: 'left' | 'right';
|
|
24
|
+
variant?: 'sidebar' | 'floating' | 'inset';
|
|
25
|
+
collapsible?: 'offcanvas' | 'icon' | 'none';
|
|
26
|
+
}): React.JSX.Element;
|
|
27
|
+
declare function SidebarTrigger({ className, onClick, ...props }: React.ComponentProps<typeof Button>): React.JSX.Element;
|
|
28
|
+
declare function SidebarRail({ className, ...props }: React.ComponentProps<'button'>): React.JSX.Element;
|
|
29
|
+
declare function SidebarInset({ className, ...props }: React.ComponentProps<'main'>): React.JSX.Element;
|
|
30
|
+
declare function SidebarInput({ className, ...props }: React.ComponentProps<typeof Input>): React.JSX.Element;
|
|
31
|
+
declare function SidebarHeader({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
32
|
+
declare function SidebarFooter({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
33
|
+
declare function SidebarSeparator({ className, ...props }: React.ComponentProps<typeof Separator>): React.JSX.Element;
|
|
34
|
+
declare function SidebarContent({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
35
|
+
declare function SidebarGroup({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
36
|
+
declare function SidebarGroupLabel({ className, asChild, ...props }: React.ComponentProps<'div'> & {
|
|
37
|
+
asChild?: boolean;
|
|
38
|
+
}): React.JSX.Element;
|
|
39
|
+
declare function SidebarGroupAction({ className, asChild, ...props }: React.ComponentProps<'button'> & {
|
|
40
|
+
asChild?: boolean;
|
|
41
|
+
}): React.JSX.Element;
|
|
42
|
+
declare function SidebarGroupContent({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
43
|
+
declare function SidebarMenu({ className, ...props }: React.ComponentProps<'ul'>): React.JSX.Element;
|
|
44
|
+
declare function SidebarMenuItem({ className, ...props }: React.ComponentProps<'li'>): React.JSX.Element;
|
|
45
|
+
declare const sidebarMenuButtonVariants: (props?: ({
|
|
46
|
+
variant?: "default" | "outline" | null | undefined;
|
|
47
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
48
|
+
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
49
|
+
declare function SidebarMenuButton({ asChild, isActive, variant, size, tooltip, className, ...props }: React.ComponentProps<'button'> & {
|
|
50
|
+
asChild?: boolean;
|
|
51
|
+
isActive?: boolean;
|
|
52
|
+
tooltip?: string | React.ComponentProps<typeof TooltipContent>;
|
|
53
|
+
} & VariantProps<typeof sidebarMenuButtonVariants>): React.JSX.Element;
|
|
54
|
+
declare function SidebarMenuAction({ className, asChild, showOnHover, ...props }: React.ComponentProps<'button'> & {
|
|
55
|
+
asChild?: boolean;
|
|
56
|
+
showOnHover?: boolean;
|
|
57
|
+
}): React.JSX.Element;
|
|
58
|
+
declare function SidebarMenuBadge({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
59
|
+
declare function SidebarMenuSkeleton({ className, showIcon, ...props }: React.ComponentProps<'div'> & {
|
|
60
|
+
showIcon?: boolean;
|
|
61
|
+
}): React.JSX.Element;
|
|
62
|
+
declare function SidebarMenuSub({ className, ...props }: React.ComponentProps<'ul'>): React.JSX.Element;
|
|
63
|
+
declare function SidebarMenuSubItem({ className, ...props }: React.ComponentProps<'li'>): React.JSX.Element;
|
|
64
|
+
declare function SidebarMenuSubButton({ asChild, size, isActive, className, ...props }: React.ComponentProps<'a'> & {
|
|
65
|
+
asChild?: boolean;
|
|
66
|
+
size?: 'sm' | 'md';
|
|
67
|
+
isActive?: boolean;
|
|
68
|
+
}): React.JSX.Element;
|
|
69
|
+
export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar, };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Tooltip as TooltipPrimitive } from 'radix-ui';
|
|
2
|
+
import type * as React from 'react';
|
|
3
|
+
declare function TooltipProvider({ delayDuration, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>): React.JSX.Element;
|
|
4
|
+
declare function Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>): React.JSX.Element;
|
|
5
|
+
declare function TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>): React.JSX.Element;
|
|
6
|
+
declare function TooltipContent({ className, sideOffset, children, ...props }: React.ComponentProps<typeof TooltipPrimitive.Content>): React.JSX.Element;
|
|
7
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { AuthConfig } from '../types';
|
|
3
|
+
declare global {
|
|
4
|
+
interface Window {
|
|
5
|
+
app_initializer_endpoint?: string;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
interface ZangoAppProps {
|
|
9
|
+
config?: Record<string, unknown>;
|
|
10
|
+
customPages?: Record<string, React.ComponentType<Record<string, unknown>>>;
|
|
11
|
+
layoutConfig?: Record<string, unknown>;
|
|
12
|
+
topbarConfig?: Record<string, unknown>;
|
|
13
|
+
navbarConfig?: Record<string, unknown>;
|
|
14
|
+
customComponents?: Record<string, unknown>;
|
|
15
|
+
authConfig?: AuthConfig;
|
|
16
|
+
appInitializerEndpoint?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare const ZangoApp: React.FC<ZangoAppProps>;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface CustomPageFallbackProps {
|
|
3
|
+
componentName?: string;
|
|
4
|
+
routeConfig?: {
|
|
5
|
+
path?: string;
|
|
6
|
+
component?: string;
|
|
7
|
+
[key: string]: unknown;
|
|
8
|
+
} | null;
|
|
9
|
+
customPagesDir?: string;
|
|
10
|
+
fileExtension?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const CustomPageFallback: React.FC<CustomPageFallbackProps>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface CustomPageLoaderProps {
|
|
3
|
+
componentName?: string;
|
|
4
|
+
routeConfig?: Record<string, unknown> | null;
|
|
5
|
+
location?: unknown;
|
|
6
|
+
customPagesDir?: string;
|
|
7
|
+
fileExtension?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const CustomPageLoader: React.FC<CustomPageLoaderProps>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Component, ErrorInfo, ReactNode } from 'react';
|
|
2
|
+
interface Props {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
}
|
|
5
|
+
interface State {
|
|
6
|
+
hasError: boolean;
|
|
7
|
+
error: Error | null;
|
|
8
|
+
}
|
|
9
|
+
export declare class RouteErrorBoundary extends Component<Props, State> {
|
|
10
|
+
constructor(props: Props);
|
|
11
|
+
static getDerivedStateFromError(error: Error): State;
|
|
12
|
+
componentDidCatch(error: Error, info: ErrorInfo): void;
|
|
13
|
+
handleReset(): void;
|
|
14
|
+
render(): ReactNode;
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface SessionSecurityDialogProps {
|
|
3
|
+
open: boolean;
|
|
4
|
+
countdown: number;
|
|
5
|
+
onContinue: () => void;
|
|
6
|
+
onLogout: () => void;
|
|
7
|
+
onDismiss?: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const SessionSecurityDialog: React.FC<SessionSecurityDialogProps>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SessionSecurityConfig } from '../../types';
|
|
3
|
+
interface SessionSecurityProviderProps {
|
|
4
|
+
config: SessionSecurityConfig;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare const SessionSecurityProvider: React.FC<SessionSecurityProviderProps>;
|
|
8
|
+
export {};
|