hazo_auth 1.6.7 → 3.0.0
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 +114 -14
- package/dist/components/layouts/email_verification/hooks/use_email_verification.d.ts.map +1 -1
- package/dist/components/layouts/email_verification/hooks/use_email_verification.js +5 -3
- package/dist/components/layouts/email_verification/index.d.ts +2 -1
- package/dist/components/layouts/email_verification/index.d.ts.map +1 -1
- package/dist/components/layouts/forgot_password/hooks/use_forgot_password_form.d.ts.map +1 -1
- package/dist/components/layouts/forgot_password/hooks/use_forgot_password_form.js +3 -1
- package/dist/components/layouts/forgot_password/index.d.ts +2 -1
- package/dist/components/layouts/forgot_password/index.d.ts.map +1 -1
- package/dist/components/layouts/login/hooks/use_login_form.d.ts.map +1 -1
- package/dist/components/layouts/login/hooks/use_login_form.js +3 -1
- package/dist/components/layouts/login/index.d.ts +2 -1
- package/dist/components/layouts/login/index.d.ts.map +1 -1
- package/dist/components/layouts/my_settings/components/profile_picture_dialog.d.ts.map +1 -1
- package/dist/components/layouts/my_settings/components/profile_picture_dialog.js +3 -1
- package/dist/components/layouts/my_settings/components/profile_picture_library_tab.d.ts.map +1 -1
- package/dist/components/layouts/my_settings/components/profile_picture_library_tab.js +4 -2
- package/dist/components/layouts/my_settings/hooks/use_my_settings.d.ts.map +1 -1
- package/dist/components/layouts/my_settings/hooks/use_my_settings.js +7 -5
- package/dist/components/layouts/my_settings/index.d.ts +2 -1
- package/dist/components/layouts/my_settings/index.d.ts.map +1 -1
- package/dist/components/layouts/my_settings/index.js +3 -2
- package/dist/components/layouts/register/hooks/use_register_form.d.ts.map +1 -1
- package/dist/components/layouts/register/hooks/use_register_form.js +3 -1
- package/dist/components/layouts/register/index.d.ts +2 -1
- package/dist/components/layouts/register/index.d.ts.map +1 -1
- package/dist/components/layouts/reset_password/hooks/use_reset_password_form.d.ts.map +1 -1
- package/dist/components/layouts/reset_password/hooks/use_reset_password_form.js +4 -2
- package/dist/components/layouts/reset_password/index.d.ts +2 -1
- package/dist/components/layouts/reset_password/index.d.ts.map +1 -1
- package/dist/components/layouts/shared/components/already_logged_in_guard.d.ts +2 -1
- package/dist/components/layouts/shared/components/already_logged_in_guard.d.ts.map +1 -1
- package/dist/components/layouts/shared/components/logout_button.d.ts.map +1 -1
- package/dist/components/layouts/shared/components/logout_button.js +3 -1
- package/dist/components/layouts/shared/components/profile_pic_menu.d.ts.map +1 -1
- package/dist/components/layouts/shared/components/profile_pic_menu.js +8 -4
- package/dist/components/layouts/shared/components/two_column_auth_layout.d.ts +2 -1
- package/dist/components/layouts/shared/components/two_column_auth_layout.d.ts.map +1 -1
- package/dist/components/layouts/shared/components/visual_panel.d.ts +2 -1
- package/dist/components/layouts/shared/components/visual_panel.d.ts.map +1 -1
- package/dist/components/layouts/shared/components/visual_panel.js +2 -1
- package/dist/components/layouts/shared/hooks/use_auth_status.d.ts.map +1 -1
- package/dist/components/layouts/shared/hooks/use_auth_status.js +4 -2
- package/dist/components/layouts/shared/hooks/use_hazo_auth.d.ts.map +1 -1
- package/dist/components/layouts/shared/hooks/use_hazo_auth.js +4 -2
- package/dist/components/layouts/shared/index.d.ts +0 -2
- package/dist/components/layouts/shared/index.d.ts.map +1 -1
- package/dist/components/layouts/shared/index.js +2 -2
- package/dist/components/layouts/user_management/components/roles_matrix.d.ts.map +1 -1
- package/dist/components/layouts/user_management/components/roles_matrix.js +8 -6
- package/dist/components/layouts/user_management/index.d.ts.map +1 -1
- package/dist/components/layouts/user_management/index.js +15 -13
- package/dist/contexts/hazo_auth_config.d.ts +18 -0
- package/dist/contexts/hazo_auth_config.d.ts.map +1 -0
- package/dist/contexts/hazo_auth_config.js +10 -0
- package/dist/contexts/hazo_auth_provider.d.ts +73 -0
- package/dist/contexts/hazo_auth_provider.d.ts.map +1 -0
- package/dist/contexts/hazo_auth_provider.js +82 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/lib/config/default_config.d.ts +237 -0
- package/dist/lib/config/default_config.d.ts.map +1 -0
- package/dist/lib/config/default_config.js +159 -0
- package/dist/lib/email_verification_config.server.d.ts +4 -0
- package/dist/lib/email_verification_config.server.d.ts.map +1 -1
- package/dist/lib/email_verification_config.server.js +12 -0
- package/dist/lib/forgot_password_config.server.d.ts +4 -0
- package/dist/lib/forgot_password_config.server.d.ts.map +1 -1
- package/dist/lib/forgot_password_config.server.js +12 -0
- package/dist/lib/login_config.server.d.ts +4 -0
- package/dist/lib/login_config.server.d.ts.map +1 -1
- package/dist/lib/login_config.server.js +10 -0
- package/dist/lib/password_requirements_config.server.d.ts +1 -1
- package/dist/lib/password_requirements_config.server.d.ts.map +1 -1
- package/dist/lib/password_requirements_config.server.js +8 -7
- package/dist/lib/register_config.server.d.ts +4 -0
- package/dist/lib/register_config.server.d.ts.map +1 -1
- package/dist/lib/register_config.server.js +10 -0
- package/dist/lib/reset_password_config.server.d.ts +4 -0
- package/dist/lib/reset_password_config.server.d.ts.map +1 -1
- package/dist/lib/reset_password_config.server.js +10 -0
- package/dist/page_components/forgot_password.d.ts.map +1 -1
- package/dist/page_components/forgot_password.js +14 -0
- package/dist/page_components/login.d.ts +4 -0
- package/dist/page_components/login.d.ts.map +1 -1
- package/dist/page_components/login.js +14 -0
- package/dist/page_components/register.d.ts.map +1 -1
- package/dist/page_components/register.js +14 -0
- package/dist/page_components/reset_password.d.ts.map +1 -1
- package/dist/page_components/reset_password.js +14 -0
- package/dist/page_components/verify_email.d.ts.map +1 -1
- package/dist/page_components/verify_email.js +14 -0
- package/dist/pages/forgot_password.d.ts +52 -0
- package/dist/pages/forgot_password.d.ts.map +1 -0
- package/dist/pages/forgot_password.js +41 -0
- package/dist/pages/index.d.ts +33 -0
- package/dist/pages/index.d.ts.map +1 -0
- package/dist/pages/index.js +28 -0
- package/dist/pages/login.d.ts +43 -0
- package/dist/pages/login.d.ts.map +1 -0
- package/dist/pages/login.js +45 -0
- package/dist/pages/my_settings.d.ts +54 -0
- package/dist/pages/my_settings.d.ts.map +1 -0
- package/dist/pages/my_settings.js +57 -0
- package/dist/pages/register.d.ts +44 -0
- package/dist/pages/register.d.ts.map +1 -0
- package/dist/pages/register.js +46 -0
- package/dist/pages/reset_password.d.ts +43 -0
- package/dist/pages/reset_password.d.ts.map +1 -0
- package/dist/pages/reset_password.js +42 -0
- package/dist/pages/verify_email.d.ts +52 -0
- package/dist/pages/verify_email.d.ts.map +1 -0
- package/dist/pages/verify_email.js +41 -0
- package/dist/server_pages/forgot_password.d.ts +53 -0
- package/dist/server_pages/forgot_password.d.ts.map +1 -0
- package/dist/server_pages/forgot_password.js +40 -0
- package/dist/server_pages/forgot_password_client_wrapper.d.ts +15 -0
- package/dist/server_pages/forgot_password_client_wrapper.d.ts.map +1 -0
- package/dist/server_pages/forgot_password_client_wrapper.js +27 -0
- package/dist/server_pages/index.d.ts +13 -0
- package/dist/server_pages/index.d.ts.map +1 -0
- package/dist/server_pages/index.js +7 -0
- package/dist/server_pages/login.d.ts +43 -0
- package/dist/server_pages/login.d.ts.map +1 -0
- package/dist/server_pages/login.js +39 -0
- package/dist/server_pages/login_client_wrapper.d.ts +13 -0
- package/dist/server_pages/login_client_wrapper.d.ts.map +1 -0
- package/dist/server_pages/login_client_wrapper.js +29 -0
- package/dist/server_pages/my_settings.d.ts +53 -0
- package/dist/server_pages/my_settings.d.ts.map +1 -0
- package/dist/server_pages/my_settings.js +57 -0
- package/dist/server_pages/register.d.ts +45 -0
- package/dist/server_pages/register.d.ts.map +1 -0
- package/dist/server_pages/register.js +41 -0
- package/dist/server_pages/register_client_wrapper.d.ts +13 -0
- package/dist/server_pages/register_client_wrapper.d.ts.map +1 -0
- package/dist/server_pages/register_client_wrapper.js +27 -0
- package/dist/server_pages/reset_password.d.ts +44 -0
- package/dist/server_pages/reset_password.d.ts.map +1 -0
- package/dist/server_pages/reset_password.js +40 -0
- package/dist/server_pages/reset_password_client_wrapper.d.ts +13 -0
- package/dist/server_pages/reset_password_client_wrapper.d.ts.map +1 -0
- package/dist/server_pages/reset_password_client_wrapper.js +27 -0
- package/dist/server_pages/verify_email.d.ts +53 -0
- package/dist/server_pages/verify_email.d.ts.map +1 -0
- package/dist/server_pages/verify_email.js +40 -0
- package/dist/server_pages/verify_email_client_wrapper.d.ts +15 -0
- package/dist/server_pages/verify_email_client_wrapper.d.ts.map +1 -0
- package/dist/server_pages/verify_email_client_wrapper.js +27 -0
- package/package.json +34 -10
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// file_description: Zero-config LoginPage server component - drop in and use with no configuration required
|
|
3
|
+
// section: imports
|
|
4
|
+
import { get_hazo_connect_instance } from "../lib/hazo_connect_instance.server";
|
|
5
|
+
import { createLayoutDataClient } from "../components/layouts/shared/data/layout_data_client";
|
|
6
|
+
import { get_login_config } from "../lib/login_config.server";
|
|
7
|
+
import { create_app_logger } from "../lib/app_logger";
|
|
8
|
+
import LoginLayout from "../components/layouts/login";
|
|
9
|
+
import { DEFAULT_UI_SHELL } from "../lib/config/default_config";
|
|
10
|
+
// section: component
|
|
11
|
+
/**
|
|
12
|
+
* Zero-config LoginPage server component
|
|
13
|
+
*
|
|
14
|
+
* This component initializes everything server-side:
|
|
15
|
+
* - Database connection via hazo_connect singleton
|
|
16
|
+
* - Configuration from hazo_auth_config.ini (with sensible defaults)
|
|
17
|
+
* - Logger instance
|
|
18
|
+
* - Layout data client
|
|
19
|
+
*
|
|
20
|
+
* Usage in consuming apps:
|
|
21
|
+
* ```tsx
|
|
22
|
+
* // app/login/page.tsx
|
|
23
|
+
* import { LoginPage } from "hazo_auth/pages/login";
|
|
24
|
+
*
|
|
25
|
+
* export default function Page() {
|
|
26
|
+
* return <LoginPage />;
|
|
27
|
+
* }
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* Zero configuration required - works out of the box!
|
|
31
|
+
*
|
|
32
|
+
* @param props - Optional visual customization props
|
|
33
|
+
* @returns Server-rendered login page
|
|
34
|
+
*/
|
|
35
|
+
export default function LoginPage({ image_src = DEFAULT_UI_SHELL.image_src, image_alt = "Login illustration", image_background_color = "#f1f5f9", }) {
|
|
36
|
+
// Initialize database connection server-side
|
|
37
|
+
const hazoConnect = get_hazo_connect_instance();
|
|
38
|
+
const dataClient = createLayoutDataClient(hazoConnect);
|
|
39
|
+
// Load configuration from INI file (with defaults)
|
|
40
|
+
const config = get_login_config();
|
|
41
|
+
// Create logger instance
|
|
42
|
+
const logger = create_app_logger();
|
|
43
|
+
// Render layout with all server-initialized dependencies
|
|
44
|
+
return (_jsx(LoginLayout, { image_src: image_src, image_alt: image_alt, image_background_color: image_background_color, data_client: dataClient, logger: logger, redirectRoute: config.redirectRoute, successMessage: config.successMessage, alreadyLoggedInMessage: config.alreadyLoggedInMessage, showLogoutButton: config.showLogoutButton, showReturnHomeButton: config.showReturnHomeButton, returnHomeButtonLabel: config.returnHomeButtonLabel, returnHomePath: config.returnHomePath, forgot_password_path: config.forgotPasswordPath, forgot_password_label: config.forgotPasswordLabel, create_account_path: config.createAccountPath, create_account_label: config.createAccountLabel }));
|
|
45
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export type MySettingsPageProps = {
|
|
2
|
+
/**
|
|
3
|
+
* Optional className for custom styling
|
|
4
|
+
* Allows embedding in existing layouts
|
|
5
|
+
*/
|
|
6
|
+
className?: string;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Zero-config MySettingsPage server component
|
|
10
|
+
*
|
|
11
|
+
* This component initializes everything server-side:
|
|
12
|
+
* - Configuration from hazo_auth_config.ini (with sensible defaults)
|
|
13
|
+
* - User field visibility settings
|
|
14
|
+
* - Password requirements
|
|
15
|
+
* - Profile picture configuration
|
|
16
|
+
* - UI messages and labels
|
|
17
|
+
*
|
|
18
|
+
* Usage in consuming apps:
|
|
19
|
+
*
|
|
20
|
+
* **As a full page:**
|
|
21
|
+
* ```tsx
|
|
22
|
+
* // app/settings/page.tsx
|
|
23
|
+
* import { MySettingsPage } from "hazo_auth/pages/my_settings";
|
|
24
|
+
*
|
|
25
|
+
* export default function Page() {
|
|
26
|
+
* return <MySettingsPage />;
|
|
27
|
+
* }
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* **Embedded in a dashboard:**
|
|
31
|
+
* ```tsx
|
|
32
|
+
* // app/dashboard/page.tsx
|
|
33
|
+
* import { MySettingsPage } from "hazo_auth/pages/my_settings";
|
|
34
|
+
*
|
|
35
|
+
* export default function Page() {
|
|
36
|
+
* return (
|
|
37
|
+
* <div className="dashboard-container">
|
|
38
|
+
* <Sidebar />
|
|
39
|
+
* <main>
|
|
40
|
+
* <MySettingsPage className="max-w-4xl mx-auto" />
|
|
41
|
+
* </main>
|
|
42
|
+
* </div>
|
|
43
|
+
* );
|
|
44
|
+
* }
|
|
45
|
+
* ```
|
|
46
|
+
*
|
|
47
|
+
* Zero configuration required - works out of the box!
|
|
48
|
+
* The component is fully embeddable and adapts to its container.
|
|
49
|
+
*
|
|
50
|
+
* @param props - Optional className for custom styling
|
|
51
|
+
* @returns Server-rendered my settings component
|
|
52
|
+
*/
|
|
53
|
+
export default function MySettingsPage({ className, }: MySettingsPageProps): import("react/jsx-runtime").JSX.Element;
|
|
54
|
+
//# sourceMappingURL=my_settings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"my_settings.d.ts","sourceRoot":"","sources":["../../src/pages/my_settings.tsx"],"names":[],"mappings":"AAMA,MAAM,MAAM,mBAAmB,GAAG;IAChC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAGF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,SAAS,GACV,EAAE,mBAAmB,2CA8BrB"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// file_description: Zero-config MySettingsPage server component - drop in and use with no configuration required
|
|
3
|
+
// section: imports
|
|
4
|
+
import { get_my_settings_config } from "../lib/my_settings_config.server";
|
|
5
|
+
import MySettingsLayout from "../components/layouts/my_settings";
|
|
6
|
+
// section: component
|
|
7
|
+
/**
|
|
8
|
+
* Zero-config MySettingsPage server component
|
|
9
|
+
*
|
|
10
|
+
* This component initializes everything server-side:
|
|
11
|
+
* - Configuration from hazo_auth_config.ini (with sensible defaults)
|
|
12
|
+
* - User field visibility settings
|
|
13
|
+
* - Password requirements
|
|
14
|
+
* - Profile picture configuration
|
|
15
|
+
* - UI messages and labels
|
|
16
|
+
*
|
|
17
|
+
* Usage in consuming apps:
|
|
18
|
+
*
|
|
19
|
+
* **As a full page:**
|
|
20
|
+
* ```tsx
|
|
21
|
+
* // app/settings/page.tsx
|
|
22
|
+
* import { MySettingsPage } from "hazo_auth/pages/my_settings";
|
|
23
|
+
*
|
|
24
|
+
* export default function Page() {
|
|
25
|
+
* return <MySettingsPage />;
|
|
26
|
+
* }
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* **Embedded in a dashboard:**
|
|
30
|
+
* ```tsx
|
|
31
|
+
* // app/dashboard/page.tsx
|
|
32
|
+
* import { MySettingsPage } from "hazo_auth/pages/my_settings";
|
|
33
|
+
*
|
|
34
|
+
* export default function Page() {
|
|
35
|
+
* return (
|
|
36
|
+
* <div className="dashboard-container">
|
|
37
|
+
* <Sidebar />
|
|
38
|
+
* <main>
|
|
39
|
+
* <MySettingsPage className="max-w-4xl mx-auto" />
|
|
40
|
+
* </main>
|
|
41
|
+
* </div>
|
|
42
|
+
* );
|
|
43
|
+
* }
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* Zero configuration required - works out of the box!
|
|
47
|
+
* The component is fully embeddable and adapts to its container.
|
|
48
|
+
*
|
|
49
|
+
* @param props - Optional className for custom styling
|
|
50
|
+
* @returns Server-rendered my settings component
|
|
51
|
+
*/
|
|
52
|
+
export default function MySettingsPage({ className, }) {
|
|
53
|
+
// Load configuration from INI file (with defaults)
|
|
54
|
+
const config = get_my_settings_config();
|
|
55
|
+
// Render layout with all server-initialized configuration
|
|
56
|
+
return (_jsx(MySettingsLayout, { className: className, password_requirements: config.passwordRequirements, profilePicture: config.profilePicture, userFields: config.userFields, unauthorizedMessage: config.unauthorizedMessage, loginButtonLabel: config.loginButtonLabel, loginPath: config.loginPath, heading: config.heading, subHeading: config.subHeading, profilePhotoLabel: config.profilePhotoLabel, profilePhotoRecommendation: config.profilePhotoRecommendation, uploadPhotoButtonLabel: config.uploadPhotoButtonLabel, removePhotoButtonLabel: config.removePhotoButtonLabel, profileInformationLabel: config.profileInformationLabel, passwordLabel: config.passwordLabel, currentPasswordLabel: config.currentPasswordLabel, newPasswordLabel: config.newPasswordLabel, confirmPasswordLabel: config.confirmPasswordLabel, messages: config.messages, uiSizes: config.uiSizes, fileTypes: config.fileTypes }));
|
|
57
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export type RegisterPageProps = {
|
|
2
|
+
/**
|
|
3
|
+
* Optional image source for the visual panel
|
|
4
|
+
* Defaults from hazo_auth_config.ini or "/globe.svg"
|
|
5
|
+
*/
|
|
6
|
+
image_src?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Optional image alt text
|
|
9
|
+
* Defaults from hazo_auth_config.ini or "Registration illustration"
|
|
10
|
+
*/
|
|
11
|
+
image_alt?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Optional image background color
|
|
14
|
+
* Defaults from hazo_auth_config.ini or "#e2e8f0"
|
|
15
|
+
*/
|
|
16
|
+
image_background_color?: string;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Zero-config RegisterPage server component
|
|
20
|
+
*
|
|
21
|
+
* This component initializes everything server-side:
|
|
22
|
+
* - Database connection via hazo_connect singleton
|
|
23
|
+
* - Configuration from hazo_auth_config.ini (with sensible defaults)
|
|
24
|
+
* - Password requirements
|
|
25
|
+
* - User field visibility
|
|
26
|
+
* - Layout data client
|
|
27
|
+
*
|
|
28
|
+
* Usage in consuming apps:
|
|
29
|
+
* ```tsx
|
|
30
|
+
* // app/register/page.tsx
|
|
31
|
+
* import { RegisterPage } from "hazo_auth/pages/register";
|
|
32
|
+
*
|
|
33
|
+
* export default function Page() {
|
|
34
|
+
* return <RegisterPage />;
|
|
35
|
+
* }
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* Zero configuration required - works out of the box!
|
|
39
|
+
*
|
|
40
|
+
* @param props - Optional visual customization props
|
|
41
|
+
* @returns Server-rendered register page
|
|
42
|
+
*/
|
|
43
|
+
export default function RegisterPage({ image_src, image_alt, image_background_color, }: RegisterPageProps): import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
//# sourceMappingURL=register.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../src/pages/register.tsx"],"names":[],"mappings":"AAQA,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC,CAAC;AAGF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,SAAS,EACT,SAAS,EACT,sBAAsB,GACvB,EAAE,iBAAiB,2CA+BnB"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// file_description: Zero-config RegisterPage server component - drop in and use with no configuration required
|
|
3
|
+
// section: imports
|
|
4
|
+
import { get_hazo_connect_instance } from "../lib/hazo_connect_instance.server";
|
|
5
|
+
import { createLayoutDataClient } from "../components/layouts/shared/data/layout_data_client";
|
|
6
|
+
import { get_register_config } from "../lib/register_config.server";
|
|
7
|
+
import RegisterLayout from "../components/layouts/register";
|
|
8
|
+
// section: component
|
|
9
|
+
/**
|
|
10
|
+
* Zero-config RegisterPage server component
|
|
11
|
+
*
|
|
12
|
+
* This component initializes everything server-side:
|
|
13
|
+
* - Database connection via hazo_connect singleton
|
|
14
|
+
* - Configuration from hazo_auth_config.ini (with sensible defaults)
|
|
15
|
+
* - Password requirements
|
|
16
|
+
* - User field visibility
|
|
17
|
+
* - Layout data client
|
|
18
|
+
*
|
|
19
|
+
* Usage in consuming apps:
|
|
20
|
+
* ```tsx
|
|
21
|
+
* // app/register/page.tsx
|
|
22
|
+
* import { RegisterPage } from "hazo_auth/pages/register";
|
|
23
|
+
*
|
|
24
|
+
* export default function Page() {
|
|
25
|
+
* return <RegisterPage />;
|
|
26
|
+
* }
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* Zero configuration required - works out of the box!
|
|
30
|
+
*
|
|
31
|
+
* @param props - Optional visual customization props
|
|
32
|
+
* @returns Server-rendered register page
|
|
33
|
+
*/
|
|
34
|
+
export default function RegisterPage({ image_src, image_alt, image_background_color, }) {
|
|
35
|
+
// Initialize database connection server-side
|
|
36
|
+
const hazoConnect = get_hazo_connect_instance();
|
|
37
|
+
const dataClient = createLayoutDataClient(hazoConnect);
|
|
38
|
+
// Load configuration from INI file (with defaults)
|
|
39
|
+
const config = get_register_config();
|
|
40
|
+
// Use props if provided, otherwise fall back to config
|
|
41
|
+
const finalImageSrc = image_src || config.imageSrc || "/globe.svg";
|
|
42
|
+
const finalImageAlt = image_alt || config.imageAlt || "Registration illustration";
|
|
43
|
+
const finalImageBackgroundColor = image_background_color || config.imageBackgroundColor || "#e2e8f0";
|
|
44
|
+
// Render layout with all server-initialized dependencies
|
|
45
|
+
return (_jsx(RegisterLayout, { image_src: finalImageSrc, image_alt: finalImageAlt, image_background_color: finalImageBackgroundColor, data_client: dataClient, show_name_field: config.showNameField, password_requirements: config.passwordRequirements, alreadyLoggedInMessage: config.alreadyLoggedInMessage, showLogoutButton: config.showLogoutButton, showReturnHomeButton: config.showReturnHomeButton, returnHomeButtonLabel: config.returnHomeButtonLabel, returnHomePath: config.returnHomePath, signInPath: config.signInPath, signInLabel: config.signInLabel }));
|
|
46
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export type ResetPasswordPageProps = {
|
|
2
|
+
/**
|
|
3
|
+
* Optional image source for the visual panel
|
|
4
|
+
* @default "/globe.svg" (from default_config.ts)
|
|
5
|
+
*/
|
|
6
|
+
image_src?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Optional image alt text
|
|
9
|
+
* @default "Reset password illustration"
|
|
10
|
+
*/
|
|
11
|
+
image_alt?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Optional image background color
|
|
14
|
+
* @default "#f1f5f9"
|
|
15
|
+
*/
|
|
16
|
+
image_background_color?: string;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Zero-config ResetPasswordPage server component
|
|
20
|
+
*
|
|
21
|
+
* This component initializes everything server-side:
|
|
22
|
+
* - Database connection via hazo_connect singleton
|
|
23
|
+
* - Configuration from hazo_auth_config.ini (with sensible defaults)
|
|
24
|
+
* - Password requirements
|
|
25
|
+
* - Layout data client
|
|
26
|
+
*
|
|
27
|
+
* Usage in consuming apps:
|
|
28
|
+
* ```tsx
|
|
29
|
+
* // app/reset-password/page.tsx
|
|
30
|
+
* import { ResetPasswordPage } from "hazo_auth/pages/reset_password";
|
|
31
|
+
*
|
|
32
|
+
* export default function Page() {
|
|
33
|
+
* return <ResetPasswordPage />;
|
|
34
|
+
* }
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* Zero configuration required - works out of the box!
|
|
38
|
+
*
|
|
39
|
+
* @param props - Optional visual customization props
|
|
40
|
+
* @returns Server-rendered reset password page
|
|
41
|
+
*/
|
|
42
|
+
export default function ResetPasswordPage({ image_src, image_alt, image_background_color, }: ResetPasswordPageProps): import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
//# sourceMappingURL=reset_password.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reset_password.d.ts","sourceRoot":"","sources":["../../src/pages/reset_password.tsx"],"names":[],"mappings":"AASA,MAAM,MAAM,sBAAsB,GAAG;IACnC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC,CAAC;AAGF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EACxC,SAAsC,EACtC,SAAyC,EACzC,sBAAkC,GACnC,EAAE,sBAAsB,2CA2BxB"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// file_description: Zero-config ResetPasswordPage server component - drop in and use with no configuration required
|
|
3
|
+
// section: imports
|
|
4
|
+
import { get_hazo_connect_instance } from "../lib/hazo_connect_instance.server";
|
|
5
|
+
import { createLayoutDataClient } from "../components/layouts/shared/data/layout_data_client";
|
|
6
|
+
import { get_reset_password_config } from "../lib/reset_password_config.server";
|
|
7
|
+
import ResetPasswordLayout from "../components/layouts/reset_password";
|
|
8
|
+
import { DEFAULT_UI_SHELL } from "../lib/config/default_config";
|
|
9
|
+
// section: component
|
|
10
|
+
/**
|
|
11
|
+
* Zero-config ResetPasswordPage server component
|
|
12
|
+
*
|
|
13
|
+
* This component initializes everything server-side:
|
|
14
|
+
* - Database connection via hazo_connect singleton
|
|
15
|
+
* - Configuration from hazo_auth_config.ini (with sensible defaults)
|
|
16
|
+
* - Password requirements
|
|
17
|
+
* - Layout data client
|
|
18
|
+
*
|
|
19
|
+
* Usage in consuming apps:
|
|
20
|
+
* ```tsx
|
|
21
|
+
* // app/reset-password/page.tsx
|
|
22
|
+
* import { ResetPasswordPage } from "hazo_auth/pages/reset_password";
|
|
23
|
+
*
|
|
24
|
+
* export default function Page() {
|
|
25
|
+
* return <ResetPasswordPage />;
|
|
26
|
+
* }
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* Zero configuration required - works out of the box!
|
|
30
|
+
*
|
|
31
|
+
* @param props - Optional visual customization props
|
|
32
|
+
* @returns Server-rendered reset password page
|
|
33
|
+
*/
|
|
34
|
+
export default function ResetPasswordPage({ image_src = DEFAULT_UI_SHELL.image_src, image_alt = "Reset password illustration", image_background_color = "#f1f5f9", }) {
|
|
35
|
+
// Initialize database connection server-side
|
|
36
|
+
const hazoConnect = get_hazo_connect_instance();
|
|
37
|
+
const dataClient = createLayoutDataClient(hazoConnect);
|
|
38
|
+
// Load configuration from INI file (with defaults)
|
|
39
|
+
const config = get_reset_password_config();
|
|
40
|
+
// Render layout with all server-initialized dependencies
|
|
41
|
+
return (_jsx(ResetPasswordLayout, { image_src: image_src, image_alt: image_alt, image_background_color: image_background_color, data_client: dataClient, password_requirements: config.passwordRequirements, errorMessage: config.errorMessage, successMessage: config.successMessage, loginPath: config.loginPath, forgotPasswordPath: config.forgotPasswordPath, alreadyLoggedInMessage: config.alreadyLoggedInMessage, showLogoutButton: config.showLogoutButton, showReturnHomeButton: config.showReturnHomeButton, returnHomeButtonLabel: config.returnHomeButtonLabel, returnHomePath: config.returnHomePath }));
|
|
42
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export type VerifyEmailPageProps = {
|
|
2
|
+
/**
|
|
3
|
+
* Optional image source for the visual panel
|
|
4
|
+
* @default "/globe.svg" (from default_config.ts)
|
|
5
|
+
*/
|
|
6
|
+
image_src?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Optional image alt text
|
|
9
|
+
* @default "Email verification illustration"
|
|
10
|
+
*/
|
|
11
|
+
image_alt?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Optional image background color
|
|
14
|
+
* @default "#f1f5f9"
|
|
15
|
+
*/
|
|
16
|
+
image_background_color?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Optional redirect delay in seconds after successful verification
|
|
19
|
+
* @default 5 (from default_config.ts)
|
|
20
|
+
*/
|
|
21
|
+
redirect_delay?: number;
|
|
22
|
+
/**
|
|
23
|
+
* Optional path to login page
|
|
24
|
+
* @default "/hazo_auth/login" (from default_config.ts)
|
|
25
|
+
*/
|
|
26
|
+
login_path?: string;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Zero-config VerifyEmailPage server component
|
|
30
|
+
*
|
|
31
|
+
* This component initializes everything server-side:
|
|
32
|
+
* - Database connection via hazo_connect singleton
|
|
33
|
+
* - Configuration from hazo_auth_config.ini (with sensible defaults)
|
|
34
|
+
* - Layout data client
|
|
35
|
+
*
|
|
36
|
+
* Usage in consuming apps:
|
|
37
|
+
* ```tsx
|
|
38
|
+
* // app/verify-email/page.tsx
|
|
39
|
+
* import { VerifyEmailPage } from "hazo_auth/pages/verify_email";
|
|
40
|
+
*
|
|
41
|
+
* export default function Page() {
|
|
42
|
+
* return <VerifyEmailPage />;
|
|
43
|
+
* }
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* Zero configuration required - works out of the box!
|
|
47
|
+
*
|
|
48
|
+
* @param props - Optional visual and behavior customization props
|
|
49
|
+
* @returns Server-rendered email verification page
|
|
50
|
+
*/
|
|
51
|
+
export default function VerifyEmailPage({ image_src, image_alt, image_background_color, redirect_delay, login_path, }: VerifyEmailPageProps): import("react/jsx-runtime").JSX.Element;
|
|
52
|
+
//# sourceMappingURL=verify_email.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify_email.d.ts","sourceRoot":"","sources":["../../src/pages/verify_email.tsx"],"names":[],"mappings":"AASA,MAAM,MAAM,oBAAoB,GAAG;IACjC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAEhC;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAGF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EACtC,SAAsC,EACtC,SAA6C,EAC7C,sBAAkC,EAClC,cAAyD,EACzD,UAAiD,GAClD,EAAE,oBAAoB,2CAyBtB"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// file_description: Zero-config VerifyEmailPage server component - drop in and use with no configuration required
|
|
3
|
+
// section: imports
|
|
4
|
+
import { get_hazo_connect_instance } from "../lib/hazo_connect_instance.server";
|
|
5
|
+
import { createLayoutDataClient } from "../components/layouts/shared/data/layout_data_client";
|
|
6
|
+
import { get_email_verification_config } from "../lib/email_verification_config.server";
|
|
7
|
+
import EmailVerificationLayout from "../components/layouts/email_verification";
|
|
8
|
+
import { DEFAULT_UI_SHELL, DEFAULT_EMAIL_VERIFICATION } from "../lib/config/default_config";
|
|
9
|
+
// section: component
|
|
10
|
+
/**
|
|
11
|
+
* Zero-config VerifyEmailPage server component
|
|
12
|
+
*
|
|
13
|
+
* This component initializes everything server-side:
|
|
14
|
+
* - Database connection via hazo_connect singleton
|
|
15
|
+
* - Configuration from hazo_auth_config.ini (with sensible defaults)
|
|
16
|
+
* - Layout data client
|
|
17
|
+
*
|
|
18
|
+
* Usage in consuming apps:
|
|
19
|
+
* ```tsx
|
|
20
|
+
* // app/verify-email/page.tsx
|
|
21
|
+
* import { VerifyEmailPage } from "hazo_auth/pages/verify_email";
|
|
22
|
+
*
|
|
23
|
+
* export default function Page() {
|
|
24
|
+
* return <VerifyEmailPage />;
|
|
25
|
+
* }
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* Zero configuration required - works out of the box!
|
|
29
|
+
*
|
|
30
|
+
* @param props - Optional visual and behavior customization props
|
|
31
|
+
* @returns Server-rendered email verification page
|
|
32
|
+
*/
|
|
33
|
+
export default function VerifyEmailPage({ image_src = DEFAULT_UI_SHELL.image_src, image_alt = "Email verification illustration", image_background_color = "#f1f5f9", redirect_delay = DEFAULT_EMAIL_VERIFICATION.redirectDelay, login_path = DEFAULT_EMAIL_VERIFICATION.loginPath, }) {
|
|
34
|
+
// Initialize database connection server-side
|
|
35
|
+
const hazoConnect = get_hazo_connect_instance();
|
|
36
|
+
const dataClient = createLayoutDataClient(hazoConnect);
|
|
37
|
+
// Load configuration from INI file (with defaults)
|
|
38
|
+
const config = get_email_verification_config();
|
|
39
|
+
// Render layout with all server-initialized dependencies
|
|
40
|
+
return (_jsx(EmailVerificationLayout, { image_src: image_src, image_alt: image_alt, image_background_color: image_background_color, data_client: dataClient, redirect_delay: redirect_delay, login_path: login_path, sign_in_label: "Back to login", already_logged_in_message: config.alreadyLoggedInMessage, showLogoutButton: config.showLogoutButton, showReturnHomeButton: config.showReturnHomeButton, returnHomeButtonLabel: config.returnHomeButtonLabel, returnHomePath: config.returnHomePath }));
|
|
41
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { StaticImageData } from "next/image";
|
|
2
|
+
export type ForgotPasswordPageProps = {
|
|
3
|
+
/**
|
|
4
|
+
* Optional image source for the visual panel
|
|
5
|
+
* Defaults from hazo_auth_config.ini or package default image
|
|
6
|
+
*/
|
|
7
|
+
image_src?: string | StaticImageData;
|
|
8
|
+
/**
|
|
9
|
+
* Optional image alt text
|
|
10
|
+
* Defaults to "Password recovery illustration"
|
|
11
|
+
*/
|
|
12
|
+
image_alt?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Optional image background color
|
|
15
|
+
* Defaults to "#f1f5f9"
|
|
16
|
+
*/
|
|
17
|
+
image_background_color?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Optional sign in path
|
|
20
|
+
* Defaults from DEFAULT_FORGOT_PASSWORD.loginPath
|
|
21
|
+
*/
|
|
22
|
+
sign_in_path?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Optional sign in label
|
|
25
|
+
* Defaults from DEFAULT_FORGOT_PASSWORD.loginLabel
|
|
26
|
+
*/
|
|
27
|
+
sign_in_label?: string;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Zero-config ForgotPasswordPage server component
|
|
31
|
+
*
|
|
32
|
+
* This component initializes everything server-side:
|
|
33
|
+
* - Configuration from hazo_auth_config.ini (with sensible defaults)
|
|
34
|
+
*
|
|
35
|
+
* The data client is initialized on the client side to avoid serialization issues.
|
|
36
|
+
*
|
|
37
|
+
* Usage in consuming apps:
|
|
38
|
+
* ```tsx
|
|
39
|
+
* // app/forgot-password/page.tsx
|
|
40
|
+
* import { ForgotPasswordPage } from "hazo_auth/pages/forgot_password";
|
|
41
|
+
*
|
|
42
|
+
* export default function Page() {
|
|
43
|
+
* return <ForgotPasswordPage />;
|
|
44
|
+
* }
|
|
45
|
+
* ```
|
|
46
|
+
*
|
|
47
|
+
* Zero configuration required - works out of the box!
|
|
48
|
+
*
|
|
49
|
+
* @param props - Optional visual and navigation customization props
|
|
50
|
+
* @returns Server-rendered forgot password page
|
|
51
|
+
*/
|
|
52
|
+
export default function ForgotPasswordPage({ image_src, image_alt, image_background_color, sign_in_path, sign_in_label, }?: ForgotPasswordPageProps): import("react/jsx-runtime").JSX.Element;
|
|
53
|
+
//# sourceMappingURL=forgot_password.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forgot_password.d.ts","sourceRoot":"","sources":["../../src/server_pages/forgot_password.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,MAAM,MAAM,uBAAuB,GAAG;IACpC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,eAAe,CAAC;IAErC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAEhC;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAGF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EACzC,SAAS,EACT,SAAS,EACT,sBAAsB,EACtB,YAAgD,EAChD,aAAkD,GACnD,GAAE,uBAA4B,2CAwB9B"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// file_description: Zero-config ForgotPasswordPage server component - drop in and use with no configuration required
|
|
3
|
+
// section: imports
|
|
4
|
+
import { get_forgot_password_config } from "../lib/forgot_password_config.server";
|
|
5
|
+
import { ForgotPasswordClientWrapper } from "./forgot_password_client_wrapper";
|
|
6
|
+
import { DEFAULT_FORGOT_PASSWORD } from "../lib/config/default_config";
|
|
7
|
+
// section: component
|
|
8
|
+
/**
|
|
9
|
+
* Zero-config ForgotPasswordPage server component
|
|
10
|
+
*
|
|
11
|
+
* This component initializes everything server-side:
|
|
12
|
+
* - Configuration from hazo_auth_config.ini (with sensible defaults)
|
|
13
|
+
*
|
|
14
|
+
* The data client is initialized on the client side to avoid serialization issues.
|
|
15
|
+
*
|
|
16
|
+
* Usage in consuming apps:
|
|
17
|
+
* ```tsx
|
|
18
|
+
* // app/forgot-password/page.tsx
|
|
19
|
+
* import { ForgotPasswordPage } from "hazo_auth/pages/forgot_password";
|
|
20
|
+
*
|
|
21
|
+
* export default function Page() {
|
|
22
|
+
* return <ForgotPasswordPage />;
|
|
23
|
+
* }
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* Zero configuration required - works out of the box!
|
|
27
|
+
*
|
|
28
|
+
* @param props - Optional visual and navigation customization props
|
|
29
|
+
* @returns Server-rendered forgot password page
|
|
30
|
+
*/
|
|
31
|
+
export default function ForgotPasswordPage({ image_src, image_alt, image_background_color, sign_in_path = DEFAULT_FORGOT_PASSWORD.loginPath, sign_in_label = DEFAULT_FORGOT_PASSWORD.loginLabel, } = {}) {
|
|
32
|
+
// Load configuration from INI file (with defaults including asset images)
|
|
33
|
+
const config = get_forgot_password_config();
|
|
34
|
+
// Use props if provided, otherwise fall back to config (which includes default asset image)
|
|
35
|
+
const finalImageSrc = image_src || config.imageSrc;
|
|
36
|
+
const finalImageAlt = image_alt || config.imageAlt;
|
|
37
|
+
const finalImageBackgroundColor = image_background_color || config.imageBackgroundColor;
|
|
38
|
+
// Pass serializable config to client wrapper
|
|
39
|
+
return (_jsx(ForgotPasswordClientWrapper, { image_src: finalImageSrc, image_alt: finalImageAlt, image_background_color: finalImageBackgroundColor, sign_in_path: sign_in_path, sign_in_label: sign_in_label, alreadyLoggedInMessage: config.alreadyLoggedInMessage, showLogoutButton: config.showLogoutButton, showReturnHomeButton: config.showReturnHomeButton, returnHomeButtonLabel: config.returnHomeButtonLabel, returnHomePath: config.returnHomePath }));
|
|
40
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ForgotPasswordConfig } from "../lib/forgot_password_config.server";
|
|
2
|
+
import type { StaticImageData } from "next/image";
|
|
3
|
+
export type ForgotPasswordClientWrapperProps = Omit<ForgotPasswordConfig, 'imageSrc' | 'imageAlt' | 'imageBackgroundColor'> & {
|
|
4
|
+
image_src: string | StaticImageData;
|
|
5
|
+
image_alt: string;
|
|
6
|
+
image_background_color: string;
|
|
7
|
+
sign_in_path: string;
|
|
8
|
+
sign_in_label: string;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Client wrapper for ForgotPasswordLayout
|
|
12
|
+
* Initializes hazo_connect data client on client side and passes config from server
|
|
13
|
+
*/
|
|
14
|
+
export declare function ForgotPasswordClientWrapper({ image_src, image_alt, image_background_color, sign_in_path, sign_in_label, alreadyLoggedInMessage, showLogoutButton, showReturnHomeButton, returnHomeButtonLabel, returnHomePath, }: ForgotPasswordClientWrapperProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
//# sourceMappingURL=forgot_password_client_wrapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forgot_password_client_wrapper.d.ts","sourceRoot":"","sources":["../../src/server_pages/forgot_password_client_wrapper.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAGjF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,MAAM,MAAM,gCAAgC,GAAG,IAAI,CAAC,oBAAoB,EAAE,UAAU,GAAG,UAAU,GAAG,sBAAsB,CAAC,GAAG;IAC5H,SAAS,EAAE,MAAM,GAAG,eAAe,CAAC;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAGF;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,EAC1C,SAAS,EACT,SAAS,EACT,sBAAsB,EACtB,YAAY,EACZ,aAAa,EACb,sBAAsB,EACtB,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACrB,cAAc,GACf,EAAE,gCAAgC,2CAmClC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// file_description: Client wrapper for ForgotPasswordLayout - handles data client initialization on client side
|
|
2
|
+
"use client";
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
// section: imports
|
|
5
|
+
import { useEffect, useState } from "react";
|
|
6
|
+
import ForgotPasswordLayout from "../components/layouts/forgot_password";
|
|
7
|
+
import { createLayoutDataClient } from "../components/layouts/shared/data/layout_data_client";
|
|
8
|
+
import { create_sqlite_hazo_connect } from "../lib/hazo_connect_setup";
|
|
9
|
+
// section: component
|
|
10
|
+
/**
|
|
11
|
+
* Client wrapper for ForgotPasswordLayout
|
|
12
|
+
* Initializes hazo_connect data client on client side and passes config from server
|
|
13
|
+
*/
|
|
14
|
+
export function ForgotPasswordClientWrapper({ image_src, image_alt, image_background_color, sign_in_path, sign_in_label, alreadyLoggedInMessage, showLogoutButton, showReturnHomeButton, returnHomeButtonLabel, returnHomePath, }) {
|
|
15
|
+
const [dataClient, setDataClient] = useState(null);
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
// Initialize hazo_connect on client side
|
|
18
|
+
const hazoConnect = create_sqlite_hazo_connect();
|
|
19
|
+
const client = createLayoutDataClient(hazoConnect);
|
|
20
|
+
setDataClient(client);
|
|
21
|
+
}, []);
|
|
22
|
+
// Show loading state while initializing
|
|
23
|
+
if (!dataClient) {
|
|
24
|
+
return (_jsx("div", { className: "cls_forgot_password_page_loading flex items-center justify-center min-h-screen", children: _jsx("div", { className: "text-slate-600 animate-pulse", children: "Loading..." }) }));
|
|
25
|
+
}
|
|
26
|
+
return (_jsx(ForgotPasswordLayout, { image_src: image_src, image_alt: image_alt, image_background_color: image_background_color, data_client: dataClient, sign_in_path: sign_in_path, sign_in_label: sign_in_label, alreadyLoggedInMessage: alreadyLoggedInMessage, showLogoutButton: showLogoutButton, showReturnHomeButton: showReturnHomeButton, returnHomeButtonLabel: returnHomeButtonLabel, returnHomePath: returnHomePath }));
|
|
27
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { default as LoginPage } from "./login";
|
|
2
|
+
export { default as RegisterPage } from "./register";
|
|
3
|
+
export { default as ForgotPasswordPage } from "./forgot_password";
|
|
4
|
+
export { default as ResetPasswordPage } from "./reset_password";
|
|
5
|
+
export { default as VerifyEmailPage } from "./verify_email";
|
|
6
|
+
export { default as MySettingsPage } from "./my_settings";
|
|
7
|
+
export type { LoginPageProps } from "./login";
|
|
8
|
+
export type { RegisterPageProps } from "./register";
|
|
9
|
+
export type { ForgotPasswordPageProps } from "./forgot_password";
|
|
10
|
+
export type { ResetPasswordPageProps } from "./reset_password";
|
|
11
|
+
export type { VerifyEmailPageProps } from "./verify_email";
|
|
12
|
+
export type { MySettingsPageProps } from "./my_settings";
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server_pages/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,eAAe,CAAC;AAG1D,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,YAAY,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACpD,YAAY,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AACjE,YAAY,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC/D,YAAY,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,YAAY,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// file_description: Barrel export for all zero-config page components
|
|
2
|
+
export { default as LoginPage } from "./login";
|
|
3
|
+
export { default as RegisterPage } from "./register";
|
|
4
|
+
export { default as ForgotPasswordPage } from "./forgot_password";
|
|
5
|
+
export { default as ResetPasswordPage } from "./reset_password";
|
|
6
|
+
export { default as VerifyEmailPage } from "./verify_email";
|
|
7
|
+
export { default as MySettingsPage } from "./my_settings";
|