hazo_auth 1.4.2 → 1.6.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/README.md +65 -19
- package/SETUP_CHECKLIST.md +779 -0
- package/dist/app/api/hazo_auth/change_password/route.d.ts +8 -0
- package/dist/app/api/hazo_auth/change_password/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/change_password/route.js +98 -0
- package/dist/app/api/hazo_auth/forgot_password/route.d.ts +8 -0
- package/dist/app/api/hazo_auth/forgot_password/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/forgot_password/route.js +78 -0
- package/dist/app/api/hazo_auth/get_auth/route.d.ts +10 -0
- package/dist/app/api/hazo_auth/get_auth/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/get_auth/route.js +63 -0
- package/dist/app/api/hazo_auth/invalidate_cache/route.d.ts +14 -0
- package/dist/app/api/hazo_auth/invalidate_cache/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/invalidate_cache/route.js +96 -0
- package/dist/app/api/hazo_auth/library_photo/[category]/[filename]/route.d.ts +9 -0
- package/dist/app/api/hazo_auth/library_photo/[category]/[filename]/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/library_photo/[category]/[filename]/route.js +82 -0
- package/dist/app/api/hazo_auth/library_photos/route.d.ts +22 -0
- package/dist/app/api/hazo_auth/library_photos/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/library_photos/route.js +80 -0
- package/dist/app/api/hazo_auth/login/route.d.ts +12 -0
- package/dist/app/api/hazo_auth/login/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/login/route.js +140 -0
- package/dist/app/api/hazo_auth/logout/route.d.ts +8 -0
- package/dist/app/api/hazo_auth/logout/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/logout/route.js +71 -0
- package/dist/app/api/hazo_auth/me/route.d.ts +3 -0
- package/dist/app/api/hazo_auth/me/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/me/route.js +34 -0
- package/dist/app/api/hazo_auth/profile_picture/[filename]/route.d.ts +7 -0
- package/dist/app/api/hazo_auth/profile_picture/[filename]/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/profile_picture/[filename]/route.js +43 -0
- package/dist/app/api/hazo_auth/register/route.d.ts +9 -0
- package/dist/app/api/hazo_auth/register/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/register/route.js +80 -0
- package/dist/app/api/hazo_auth/remove_profile_picture/route.d.ts +8 -0
- package/dist/app/api/hazo_auth/remove_profile_picture/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/remove_profile_picture/route.js +64 -0
- package/dist/app/api/hazo_auth/resend_verification/route.d.ts +8 -0
- package/dist/app/api/hazo_auth/resend_verification/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/resend_verification/route.js +79 -0
- package/dist/app/api/hazo_auth/reset_password/route.d.ts +8 -0
- package/dist/app/api/hazo_auth/reset_password/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/reset_password/route.js +76 -0
- package/dist/app/api/hazo_auth/update_user/route.d.ts +9 -0
- package/dist/app/api/hazo_auth/update_user/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/update_user/route.js +95 -0
- package/dist/app/api/hazo_auth/upload_profile_picture/route.d.ts +9 -0
- package/dist/app/api/hazo_auth/upload_profile_picture/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/upload_profile_picture/route.js +204 -0
- package/dist/app/api/hazo_auth/validate_reset_token/route.d.ts +6 -0
- package/dist/app/api/hazo_auth/validate_reset_token/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/validate_reset_token/route.js +58 -0
- package/dist/app/api/hazo_auth/verify_email/route.d.ts +11 -0
- package/dist/app/api/hazo_auth/verify_email/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/verify_email/route.js +63 -0
- package/dist/cli/generate.d.ts +7 -0
- package/dist/cli/generate.d.ts.map +1 -0
- package/dist/cli/generate.js +184 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +173 -0
- package/dist/cli/init.d.ts +2 -0
- package/dist/cli/init.d.ts.map +1 -0
- package/dist/cli/init.js +201 -0
- package/dist/cli/validate.d.ts +15 -0
- package/dist/cli/validate.d.ts.map +1 -0
- package/dist/cli/validate.js +509 -0
- package/dist/components/ui/card.d.ts +9 -0
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/card.js +45 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -1
- package/dist/hooks/use-mobile.js +17 -3
- package/dist/lib/services/profile_picture_service.d.ts +34 -2
- package/dist/lib/services/profile_picture_service.d.ts.map +1 -1
- package/dist/lib/services/profile_picture_service.js +157 -15
- package/dist/page_components/forgot_password.d.ts +19 -0
- package/dist/page_components/forgot_password.d.ts.map +1 -0
- package/dist/page_components/forgot_password.js +36 -0
- package/dist/page_components/index.d.ts +7 -0
- package/dist/page_components/index.d.ts.map +1 -0
- package/dist/page_components/index.js +9 -0
- package/dist/page_components/login.d.ts +26 -0
- package/dist/page_components/login.d.ts.map +1 -0
- package/dist/page_components/login.js +40 -0
- package/dist/page_components/my_settings.d.ts +64 -0
- package/dist/page_components/my_settings.d.ts.map +1 -0
- package/dist/page_components/my_settings.js +67 -0
- package/dist/page_components/register.d.ts +25 -0
- package/dist/page_components/register.d.ts.map +1 -0
- package/dist/page_components/register.js +43 -0
- package/dist/page_components/reset_password.d.ts +25 -0
- package/dist/page_components/reset_password.d.ts.map +1 -0
- package/dist/page_components/reset_password.js +43 -0
- package/dist/page_components/verify_email.d.ts +21 -0
- package/dist/page_components/verify_email.d.ts.map +1 -0
- package/dist/page_components/verify_email.js +36 -0
- package/dist/server/routes/change_password.d.ts +2 -0
- package/dist/server/routes/change_password.d.ts.map +1 -0
- package/dist/server/routes/change_password.js +2 -0
- package/dist/server/routes/forgot_password.d.ts +2 -0
- package/dist/server/routes/forgot_password.d.ts.map +1 -0
- package/dist/server/routes/forgot_password.js +2 -0
- package/dist/server/routes/get_auth.d.ts +2 -0
- package/dist/server/routes/get_auth.d.ts.map +1 -0
- package/dist/server/routes/get_auth.js +2 -0
- package/dist/server/routes/index.d.ts +19 -0
- package/dist/server/routes/index.d.ts.map +1 -0
- package/dist/server/routes/index.js +25 -0
- package/dist/server/routes/invalidate_cache.d.ts +2 -0
- package/dist/server/routes/invalidate_cache.d.ts.map +1 -0
- package/dist/server/routes/invalidate_cache.js +2 -0
- package/dist/server/routes/library_photo.d.ts +2 -0
- package/dist/server/routes/library_photo.d.ts.map +1 -0
- package/dist/server/routes/library_photo.js +3 -0
- package/dist/server/routes/library_photos.d.ts +2 -0
- package/dist/server/routes/library_photos.d.ts.map +1 -0
- package/dist/server/routes/library_photos.js +2 -0
- package/dist/server/routes/login.d.ts +2 -0
- package/dist/server/routes/login.d.ts.map +1 -0
- package/dist/server/routes/login.js +2 -0
- package/dist/server/routes/logout.d.ts +2 -0
- package/dist/server/routes/logout.d.ts.map +1 -0
- package/dist/server/routes/logout.js +2 -0
- package/dist/server/routes/me.d.ts +2 -0
- package/dist/server/routes/me.d.ts.map +1 -0
- package/dist/server/routes/me.js +2 -0
- package/dist/server/routes/profile_picture_filename.d.ts +2 -0
- package/dist/server/routes/profile_picture_filename.d.ts.map +1 -0
- package/dist/server/routes/profile_picture_filename.js +3 -0
- package/dist/server/routes/register.d.ts +2 -0
- package/dist/server/routes/register.d.ts.map +1 -0
- package/dist/server/routes/register.js +2 -0
- package/dist/server/routes/remove_profile_picture.d.ts +2 -0
- package/dist/server/routes/remove_profile_picture.d.ts.map +1 -0
- package/dist/server/routes/remove_profile_picture.js +2 -0
- package/dist/server/routes/resend_verification.d.ts +2 -0
- package/dist/server/routes/resend_verification.d.ts.map +1 -0
- package/dist/server/routes/resend_verification.js +2 -0
- package/dist/server/routes/reset_password.d.ts +2 -0
- package/dist/server/routes/reset_password.d.ts.map +1 -0
- package/dist/server/routes/reset_password.js +2 -0
- package/dist/server/routes/update_user.d.ts +2 -0
- package/dist/server/routes/update_user.d.ts.map +1 -0
- package/dist/server/routes/update_user.js +2 -0
- package/dist/server/routes/upload_profile_picture.d.ts +2 -0
- package/dist/server/routes/upload_profile_picture.d.ts.map +1 -0
- package/dist/server/routes/upload_profile_picture.js +2 -0
- package/dist/server/routes/validate_reset_token.d.ts +2 -0
- package/dist/server/routes/validate_reset_token.d.ts.map +1 -0
- package/dist/server/routes/validate_reset_token.js +2 -0
- package/dist/server/routes/verify_email.d.ts +2 -0
- package/dist/server/routes/verify_email.d.ts.map +1 -0
- package/dist/server/routes/verify_email.js +2 -0
- package/package.json +40 -17
- package/components.json +0 -22
- package/instrumentation.ts +0 -32
- package/migrations/001_add_token_type_to_refresh_tokens.sql +0 -14
- package/migrations/002_add_name_to_hazo_users.sql +0 -7
- package/migrations/003_add_url_on_logon_to_hazo_users.sql +0 -8
- package/next.config.mjs +0 -67
- package/postcss.config.mjs +0 -8
- package/public/file.svg +0 -1
- package/public/globe.svg +0 -1
- package/public/next.svg +0 -1
- package/public/vercel.svg +0 -1
- package/public/window.svg +0 -1
- package/scripts/apply_migration.ts +0 -118
- package/scripts/init_users.ts +0 -378
- package/src/app/api/hazo_auth/auth/upload_profile_picture/route.ts +0 -268
- package/src/app/api/hazo_auth/change_password/route.ts +0 -132
- package/src/app/api/hazo_auth/forgot_password/route.ts +0 -107
- package/src/app/api/hazo_auth/get_auth/route.ts +0 -89
- package/src/app/api/hazo_auth/invalidate_cache/route.ts +0 -139
- package/src/app/api/hazo_auth/library_photos/route.ts +0 -73
- package/src/app/api/hazo_auth/login/route.ts +0 -181
- package/src/app/api/hazo_auth/logout/route.ts +0 -89
- package/src/app/api/hazo_auth/me/route.ts +0 -47
- package/src/app/api/hazo_auth/profile_picture/[filename]/route.ts +0 -67
- package/src/app/api/hazo_auth/register/route.ts +0 -109
- package/src/app/api/hazo_auth/remove_profile_picture/route.ts +0 -86
- package/src/app/api/hazo_auth/resend_verification/route.ts +0 -108
- package/src/app/api/hazo_auth/reset_password/route.ts +0 -107
- package/src/app/api/hazo_auth/update_user/route.ts +0 -126
- package/src/app/api/hazo_auth/upload_profile_picture/route.ts +0 -268
- package/src/app/api/hazo_auth/user_management/permissions/route.ts +0 -367
- package/src/app/api/hazo_auth/user_management/roles/route.ts +0 -442
- package/src/app/api/hazo_auth/user_management/users/roles/route.ts +0 -367
- package/src/app/api/hazo_auth/user_management/users/route.ts +0 -239
- package/src/app/api/hazo_auth/validate_reset_token/route.ts +0 -83
- package/src/app/api/hazo_auth/verify_email/route.ts +0 -88
- package/src/app/api/migrations/apply/route.ts +0 -91
- package/src/app/favicon.ico +0 -0
- package/src/app/fonts/GeistMonoVF.woff +0 -0
- package/src/app/fonts/GeistVF.woff +0 -0
- package/src/app/globals.css +0 -89
- package/src/app/hazo_auth/forgot_password/forgot_password_page_client.tsx +0 -60
- package/src/app/hazo_auth/forgot_password/page.tsx +0 -24
- package/src/app/hazo_auth/login/login_page_client.tsx +0 -86
- package/src/app/hazo_auth/login/page.tsx +0 -38
- package/src/app/hazo_auth/my_settings/my_settings_page_client.tsx +0 -120
- package/src/app/hazo_auth/my_settings/page.tsx +0 -40
- package/src/app/hazo_auth/register/page.tsx +0 -36
- package/src/app/hazo_auth/register/register_page_client.tsx +0 -81
- package/src/app/hazo_auth/reset_password/page.tsx +0 -29
- package/src/app/hazo_auth/reset_password/reset_password_page_client.tsx +0 -81
- package/src/app/hazo_auth/user_management/page.tsx +0 -14
- package/src/app/hazo_auth/user_management/user_management_page_client.tsx +0 -16
- package/src/app/hazo_auth/verify_email/page.tsx +0 -24
- package/src/app/hazo_auth/verify_email/verify_email_page_client.tsx +0 -60
- package/src/app/hazo_connect/api/sqlite/data/route.ts +0 -203
- package/src/app/hazo_connect/api/sqlite/schema/route.ts +0 -45
- package/src/app/hazo_connect/api/sqlite/tables/route.ts +0 -36
- package/src/app/hazo_connect/sqlite_admin/page.tsx +0 -51
- package/src/app/hazo_connect/sqlite_admin/sqlite-admin-client.tsx +0 -984
- package/src/app/layout.tsx +0 -43
- package/src/app/page.tsx +0 -170
- package/src/components/index.ts +0 -7
- package/src/components/layouts/email_verification/config/email_verification_field_config.ts +0 -86
- package/src/components/layouts/email_verification/hooks/use_email_verification.ts +0 -297
- package/src/components/layouts/email_verification/index.tsx +0 -297
- package/src/components/layouts/forgot_password/config/forgot_password_field_config.ts +0 -58
- package/src/components/layouts/forgot_password/hooks/use_forgot_password_form.ts +0 -179
- package/src/components/layouts/forgot_password/index.tsx +0 -168
- package/src/components/layouts/index.ts +0 -26
- package/src/components/layouts/login/config/login_field_config.ts +0 -67
- package/src/components/layouts/login/hooks/use_login_form.ts +0 -286
- package/src/components/layouts/login/index.tsx +0 -252
- package/src/components/layouts/my_settings/components/editable_field.tsx +0 -177
- package/src/components/layouts/my_settings/components/password_change_dialog.tsx +0 -301
- package/src/components/layouts/my_settings/components/profile_picture_dialog.tsx +0 -385
- package/src/components/layouts/my_settings/components/profile_picture_display.tsx +0 -66
- package/src/components/layouts/my_settings/components/profile_picture_gravatar_tab.tsx +0 -143
- package/src/components/layouts/my_settings/components/profile_picture_library_tab.tsx +0 -311
- package/src/components/layouts/my_settings/components/profile_picture_upload_tab.tsx +0 -341
- package/src/components/layouts/my_settings/config/my_settings_field_config.ts +0 -61
- package/src/components/layouts/my_settings/hooks/use_my_settings.ts +0 -458
- package/src/components/layouts/my_settings/index.tsx +0 -351
- package/src/components/layouts/register/config/register_field_config.ts +0 -101
- package/src/components/layouts/register/hooks/use_register_form.ts +0 -275
- package/src/components/layouts/register/index.tsx +0 -226
- package/src/components/layouts/reset_password/config/reset_password_field_config.ts +0 -86
- package/src/components/layouts/reset_password/hooks/use_reset_password_form.ts +0 -276
- package/src/components/layouts/reset_password/index.tsx +0 -294
- package/src/components/layouts/shared/components/already_logged_in_guard.tsx +0 -95
- package/src/components/layouts/shared/components/auth_page_shell.tsx +0 -36
- package/src/components/layouts/shared/components/field_error_message.tsx +0 -29
- package/src/components/layouts/shared/components/form_action_buttons.tsx +0 -64
- package/src/components/layouts/shared/components/form_field_wrapper.tsx +0 -44
- package/src/components/layouts/shared/components/form_header.tsx +0 -36
- package/src/components/layouts/shared/components/logout_button.tsx +0 -76
- package/src/components/layouts/shared/components/password_field.tsx +0 -72
- package/src/components/layouts/shared/components/profile_pic_menu.tsx +0 -321
- package/src/components/layouts/shared/components/profile_pic_menu_wrapper.tsx +0 -40
- package/src/components/layouts/shared/components/sidebar_layout_wrapper.tsx +0 -214
- package/src/components/layouts/shared/components/standalone_layout_wrapper.tsx +0 -53
- package/src/components/layouts/shared/components/two_column_auth_layout.tsx +0 -44
- package/src/components/layouts/shared/components/unauthorized_guard.tsx +0 -78
- package/src/components/layouts/shared/components/visual_panel.tsx +0 -41
- package/src/components/layouts/shared/config/layout_customization.ts +0 -95
- package/src/components/layouts/shared/data/layout_data_client.ts +0 -19
- package/src/components/layouts/shared/hooks/use_auth_status.ts +0 -103
- package/src/components/layouts/shared/hooks/use_hazo_auth.ts +0 -158
- package/src/components/layouts/shared/index.ts +0 -34
- package/src/components/layouts/shared/utils/ip_address.ts +0 -37
- package/src/components/layouts/shared/utils/validation.ts +0 -66
- package/src/components/layouts/user_management/components/roles_matrix.tsx +0 -607
- package/src/components/layouts/user_management/index.tsx +0 -1295
- package/src/components/ui/alert-dialog.tsx +0 -141
- package/src/components/ui/avatar.tsx +0 -50
- package/src/components/ui/button.tsx +0 -57
- package/src/components/ui/checkbox.tsx +0 -30
- package/src/components/ui/dialog.tsx +0 -122
- package/src/components/ui/dropdown-menu.tsx +0 -201
- package/src/components/ui/hazo_ui_tooltip.tsx +0 -67
- package/src/components/ui/index.ts +0 -22
- package/src/components/ui/input.tsx +0 -22
- package/src/components/ui/label.tsx +0 -26
- package/src/components/ui/separator.tsx +0 -31
- package/src/components/ui/sheet.tsx +0 -139
- package/src/components/ui/sidebar.tsx +0 -773
- package/src/components/ui/skeleton.tsx +0 -15
- package/src/components/ui/sonner.tsx +0 -31
- package/src/components/ui/switch.tsx +0 -29
- package/src/components/ui/table.tsx +0 -120
- package/src/components/ui/tabs.tsx +0 -55
- package/src/components/ui/tooltip.tsx +0 -32
- package/src/components/ui/vertical-tabs.tsx +0 -59
- package/src/hooks/use-mobile.tsx +0 -19
- package/src/index.ts +0 -7
- package/src/lib/already_logged_in_config.server.ts +0 -46
- package/src/lib/app_logger.ts +0 -24
- package/src/lib/auth/auth_cache.ts +0 -220
- package/src/lib/auth/auth_rate_limiter.ts +0 -121
- package/src/lib/auth/auth_types.ts +0 -65
- package/src/lib/auth/auth_utils.server.ts +0 -196
- package/src/lib/auth/hazo_get_auth.server.ts +0 -333
- package/src/lib/auth/index.ts +0 -23
- package/src/lib/auth/server_auth.ts +0 -88
- package/src/lib/auth_utility_config.server.ts +0 -136
- package/src/lib/config/config_loader.server.ts +0 -164
- package/src/lib/email_verification_config.server.ts +0 -32
- package/src/lib/file_types_config.server.ts +0 -25
- package/src/lib/forgot_password_config.server.ts +0 -32
- package/src/lib/hazo_connect_instance.server.ts +0 -101
- package/src/lib/hazo_connect_setup.server.ts +0 -194
- package/src/lib/hazo_connect_setup.ts +0 -54
- package/src/lib/index.ts +0 -44
- package/src/lib/login_config.server.ts +0 -71
- package/src/lib/messages_config.server.ts +0 -45
- package/src/lib/migrations/apply_migration.ts +0 -105
- package/src/lib/my_settings_config.server.ts +0 -135
- package/src/lib/password_requirements_config.server.ts +0 -39
- package/src/lib/profile_pic_menu_config.server.ts +0 -138
- package/src/lib/profile_picture_config.server.ts +0 -56
- package/src/lib/register_config.server.ts +0 -73
- package/src/lib/reset_password_config.server.ts +0 -75
- package/src/lib/services/email_service.ts +0 -581
- package/src/lib/services/email_verification_service.ts +0 -270
- package/src/lib/services/index.ts +0 -15
- package/src/lib/services/login_service.ts +0 -134
- package/src/lib/services/password_change_service.ts +0 -154
- package/src/lib/services/password_reset_service.ts +0 -405
- package/src/lib/services/profile_picture_remove_service.ts +0 -120
- package/src/lib/services/profile_picture_service.ts +0 -215
- package/src/lib/services/profile_picture_source_mapper.ts +0 -62
- package/src/lib/services/registration_service.ts +0 -184
- package/src/lib/services/token_service.ts +0 -240
- package/src/lib/services/user_profiles_service.ts +0 -143
- package/src/lib/services/user_update_service.ts +0 -141
- package/src/lib/ui_shell_config.server.ts +0 -73
- package/src/lib/ui_sizes_config.server.ts +0 -37
- package/src/lib/user_fields_config.server.ts +0 -31
- package/src/lib/user_management_config.server.ts +0 -39
- package/src/lib/utils/api_route_helpers.ts +0 -60
- package/src/lib/utils/error_sanitizer.ts +0 -75
- package/src/lib/utils.ts +0 -11
- package/src/middleware.ts +0 -94
- package/src/routes/index.ts +0 -34
- package/src/server/config/config_loader.ts +0 -496
- package/src/server/index.ts +0 -38
- package/src/server/logging/logger_service.ts +0 -56
- package/src/server/routes/root_router.ts +0 -16
- package/src/server/server.ts +0 -28
- package/src/server/types/app_types.ts +0 -74
- package/src/server/types/express.d.ts +0 -16
- package/src/stories/email_verification_layout.stories.tsx +0 -137
- package/src/stories/forgot_password_layout.stories.tsx +0 -85
- package/src/stories/login_layout.stories.tsx +0 -85
- package/src/stories/project_overview.stories.tsx +0 -33
- package/src/stories/register_layout.stories.tsx +0 -107
- package/tailwind.config.ts +0 -77
- package/tsconfig.build.json +0 -36
- package/tsconfig.json +0 -28
|
@@ -7,7 +7,52 @@ import { create_app_logger } from "../app_logger";
|
|
|
7
7
|
import path from "path";
|
|
8
8
|
import fs from "fs";
|
|
9
9
|
import { map_ui_source_to_db } from "./profile_picture_source_mapper";
|
|
10
|
+
// section: cache
|
|
11
|
+
// Cache the resolved library path to avoid repeated filesystem checks
|
|
12
|
+
let cached_library_path = null;
|
|
13
|
+
let cached_library_source = null;
|
|
10
14
|
// section: helpers
|
|
15
|
+
/**
|
|
16
|
+
* Resolves the library path, checking project's public folder first, then node_modules
|
|
17
|
+
* @returns Object with path and source, or null if not found
|
|
18
|
+
*/
|
|
19
|
+
function resolve_library_path() {
|
|
20
|
+
// Return cached value if available
|
|
21
|
+
if (cached_library_path && cached_library_source) {
|
|
22
|
+
if (fs.existsSync(cached_library_path)) {
|
|
23
|
+
return { path: cached_library_path, source: cached_library_source };
|
|
24
|
+
}
|
|
25
|
+
// Cache is stale, clear it
|
|
26
|
+
cached_library_path = null;
|
|
27
|
+
cached_library_source = null;
|
|
28
|
+
}
|
|
29
|
+
const config = get_profile_picture_config();
|
|
30
|
+
const library_subpath = config.library_photo_path.replace(/^\//, "");
|
|
31
|
+
// Try 1: Project's public folder
|
|
32
|
+
const project_library_path = path.resolve(process.cwd(), "public", library_subpath);
|
|
33
|
+
if (fs.existsSync(project_library_path)) {
|
|
34
|
+
// Check if it has any content (not just empty directory)
|
|
35
|
+
try {
|
|
36
|
+
const entries = fs.readdirSync(project_library_path);
|
|
37
|
+
if (entries.length > 0) {
|
|
38
|
+
cached_library_path = project_library_path;
|
|
39
|
+
cached_library_source = "project";
|
|
40
|
+
return { path: project_library_path, source: "project" };
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
catch (_a) {
|
|
44
|
+
// Continue to fallback
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
// Try 2: node_modules/hazo_auth/public folder
|
|
48
|
+
const node_modules_library_path = path.resolve(process.cwd(), "node_modules", "hazo_auth", "public", library_subpath);
|
|
49
|
+
if (fs.existsSync(node_modules_library_path)) {
|
|
50
|
+
cached_library_path = node_modules_library_path;
|
|
51
|
+
cached_library_source = "node_modules";
|
|
52
|
+
return { path: node_modules_library_path, source: "node_modules" };
|
|
53
|
+
}
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
11
56
|
/**
|
|
12
57
|
* Generates Gravatar URL from email address
|
|
13
58
|
* @param email - User's email address
|
|
@@ -27,13 +72,12 @@ export function get_gravatar_url(email, size) {
|
|
|
27
72
|
* @returns Array of category names
|
|
28
73
|
*/
|
|
29
74
|
export function get_library_categories() {
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
if (!fs.existsSync(library_path)) {
|
|
75
|
+
const resolved = resolve_library_path();
|
|
76
|
+
if (!resolved) {
|
|
33
77
|
return [];
|
|
34
78
|
}
|
|
35
79
|
try {
|
|
36
|
-
const entries = fs.readdirSync(
|
|
80
|
+
const entries = fs.readdirSync(resolved.path, { withFileTypes: true });
|
|
37
81
|
return entries
|
|
38
82
|
.filter((entry) => entry.isDirectory())
|
|
39
83
|
.map((entry) => entry.name)
|
|
@@ -45,37 +89,84 @@ export function get_library_categories() {
|
|
|
45
89
|
logger.warn("profile_picture_service_read_categories_failed", {
|
|
46
90
|
filename: "profile_picture_service.ts",
|
|
47
91
|
line_number: 0,
|
|
48
|
-
library_path,
|
|
92
|
+
library_path: resolved.path,
|
|
93
|
+
source: resolved.source,
|
|
49
94
|
error: error_message,
|
|
50
95
|
});
|
|
51
96
|
return [];
|
|
52
97
|
}
|
|
53
98
|
}
|
|
54
99
|
/**
|
|
55
|
-
* Gets photos in a specific library category
|
|
100
|
+
* Gets photos in a specific library category with pagination support
|
|
56
101
|
* @param category - Category name
|
|
57
|
-
* @
|
|
102
|
+
* @param page - Page number (1-indexed, default 1)
|
|
103
|
+
* @param page_size - Number of photos per page (default 20, max 100)
|
|
104
|
+
* @returns Object with photos array and pagination info
|
|
58
105
|
*/
|
|
59
|
-
export function
|
|
106
|
+
export function get_library_photos_paginated(category, page = 1, page_size = 20) {
|
|
107
|
+
const resolved = resolve_library_path();
|
|
60
108
|
const config = get_profile_picture_config();
|
|
61
|
-
|
|
109
|
+
// Ensure page_size is within bounds
|
|
110
|
+
const effective_page_size = Math.min(Math.max(1, page_size), 100);
|
|
111
|
+
const effective_page = Math.max(1, page);
|
|
112
|
+
if (!resolved) {
|
|
113
|
+
return {
|
|
114
|
+
photos: [],
|
|
115
|
+
total: 0,
|
|
116
|
+
page: effective_page,
|
|
117
|
+
page_size: effective_page_size,
|
|
118
|
+
has_more: false,
|
|
119
|
+
source: "project",
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
const category_path = path.join(resolved.path, category);
|
|
62
123
|
if (!fs.existsSync(category_path)) {
|
|
63
|
-
return
|
|
124
|
+
return {
|
|
125
|
+
photos: [],
|
|
126
|
+
total: 0,
|
|
127
|
+
page: effective_page,
|
|
128
|
+
page_size: effective_page_size,
|
|
129
|
+
has_more: false,
|
|
130
|
+
source: resolved.source,
|
|
131
|
+
};
|
|
64
132
|
}
|
|
65
133
|
try {
|
|
66
134
|
const fileTypes = get_file_types_config();
|
|
67
|
-
const allowedExtensions = fileTypes.allowed_image_extensions.map(ext => `.${ext.toLowerCase()}`);
|
|
135
|
+
const allowedExtensions = fileTypes.allowed_image_extensions.map(ext => ext.startsWith(".") ? ext.toLowerCase() : `.${ext.toLowerCase()}`);
|
|
68
136
|
const entries = fs.readdirSync(category_path, { withFileTypes: true });
|
|
69
|
-
const
|
|
137
|
+
const all_photos = entries
|
|
70
138
|
.filter((entry) => {
|
|
71
139
|
if (!entry.isFile())
|
|
72
140
|
return false;
|
|
73
141
|
const ext = path.extname(entry.name).toLowerCase();
|
|
74
142
|
return allowedExtensions.includes(ext);
|
|
75
143
|
})
|
|
76
|
-
.map((entry) =>
|
|
144
|
+
.map((entry) => entry.name)
|
|
77
145
|
.sort();
|
|
78
|
-
|
|
146
|
+
const total = all_photos.length;
|
|
147
|
+
const start_index = (effective_page - 1) * effective_page_size;
|
|
148
|
+
const end_index = start_index + effective_page_size;
|
|
149
|
+
const page_photos = all_photos.slice(start_index, end_index);
|
|
150
|
+
// Generate URLs based on source
|
|
151
|
+
// For node_modules source, we need to serve via API route
|
|
152
|
+
const photo_urls = page_photos.map((filename) => {
|
|
153
|
+
if (resolved.source === "node_modules") {
|
|
154
|
+
// Serve via API route that reads from node_modules
|
|
155
|
+
return `/api/hazo_auth/library_photo/${category}/${filename}`;
|
|
156
|
+
}
|
|
157
|
+
else {
|
|
158
|
+
// Serve directly from public folder
|
|
159
|
+
return `${config.library_photo_path}/${category}/${filename}`;
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
return {
|
|
163
|
+
photos: photo_urls,
|
|
164
|
+
total,
|
|
165
|
+
page: effective_page,
|
|
166
|
+
page_size: effective_page_size,
|
|
167
|
+
has_more: end_index < total,
|
|
168
|
+
source: resolved.source,
|
|
169
|
+
};
|
|
79
170
|
}
|
|
80
171
|
catch (error) {
|
|
81
172
|
const logger = create_app_logger();
|
|
@@ -85,10 +176,61 @@ export function get_library_photos(category) {
|
|
|
85
176
|
line_number: 0,
|
|
86
177
|
category,
|
|
87
178
|
category_path,
|
|
179
|
+
source: resolved.source,
|
|
88
180
|
error: error_message,
|
|
89
181
|
});
|
|
90
|
-
return
|
|
182
|
+
return {
|
|
183
|
+
photos: [],
|
|
184
|
+
total: 0,
|
|
185
|
+
page: effective_page,
|
|
186
|
+
page_size: effective_page_size,
|
|
187
|
+
has_more: false,
|
|
188
|
+
source: resolved.source,
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Gets photos in a specific library category (legacy non-paginated version)
|
|
194
|
+
* @param category - Category name
|
|
195
|
+
* @returns Array of photo URLs (relative to public directory or API route)
|
|
196
|
+
*/
|
|
197
|
+
export function get_library_photos(category) {
|
|
198
|
+
// Use paginated version with large page size for backwards compatibility
|
|
199
|
+
const result = get_library_photos_paginated(category, 1, 1000);
|
|
200
|
+
return result.photos;
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Gets the physical file path for a library photo (used for serving from node_modules)
|
|
204
|
+
* @param category - Category name
|
|
205
|
+
* @param filename - Photo filename
|
|
206
|
+
* @returns Full file path or null if not found
|
|
207
|
+
*/
|
|
208
|
+
export function get_library_photo_path(category, filename) {
|
|
209
|
+
const resolved = resolve_library_path();
|
|
210
|
+
if (!resolved) {
|
|
211
|
+
return null;
|
|
212
|
+
}
|
|
213
|
+
const photo_path = path.join(resolved.path, category, filename);
|
|
214
|
+
if (fs.existsSync(photo_path)) {
|
|
215
|
+
return photo_path;
|
|
91
216
|
}
|
|
217
|
+
return null;
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Gets the source of library photos (for diagnostic purposes)
|
|
221
|
+
* @returns Source type or null if no library found
|
|
222
|
+
*/
|
|
223
|
+
export function get_library_source() {
|
|
224
|
+
var _a;
|
|
225
|
+
const resolved = resolve_library_path();
|
|
226
|
+
return (_a = resolved === null || resolved === void 0 ? void 0 : resolved.source) !== null && _a !== void 0 ? _a : null;
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Clears the library path cache (useful for testing or after copying files)
|
|
230
|
+
*/
|
|
231
|
+
export function clear_library_cache() {
|
|
232
|
+
cached_library_path = null;
|
|
233
|
+
cached_library_source = null;
|
|
92
234
|
}
|
|
93
235
|
/**
|
|
94
236
|
* Gets default profile picture based on configuration priority
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type ForgotPasswordPageProps = {
|
|
2
|
+
alreadyLoggedInMessage?: string;
|
|
3
|
+
showLogoutButton?: boolean;
|
|
4
|
+
showReturnHomeButton?: boolean;
|
|
5
|
+
returnHomeButtonLabel?: string;
|
|
6
|
+
returnHomePath?: string;
|
|
7
|
+
imageSrc?: string;
|
|
8
|
+
imageAlt?: string;
|
|
9
|
+
imageBackgroundColor?: string;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Zero-config forgot password page component
|
|
13
|
+
* Uses sensible defaults and can be customized via props
|
|
14
|
+
* @param props - Optional configuration overrides
|
|
15
|
+
* @returns Forgot password page component
|
|
16
|
+
*/
|
|
17
|
+
export declare function ForgotPasswordPage({ alreadyLoggedInMessage, showLogoutButton, showReturnHomeButton, returnHomeButtonLabel, returnHomePath, imageSrc, imageAlt, imageBackgroundColor, }?: ForgotPasswordPageProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export default ForgotPasswordPage;
|
|
19
|
+
//# sourceMappingURL=forgot_password.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forgot_password.d.ts","sourceRoot":"","sources":["../../src/page_components/forgot_password.tsx"],"names":[],"mappings":"AAiBA,MAAM,MAAM,uBAAuB,GAAG;IACpC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,CAAC;AAGF;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,sBAAoD,EACpD,gBAAuB,EACvB,oBAA4B,EAC5B,qBAAqC,EACrC,cAAoB,EACpB,QAA4B,EAC5B,QAA4B,EAC5B,oBAAuC,GACxC,GAAE,uBAA4B,2CAmC9B;AAED,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// file_description: zero-config forgot password page component for hazo_auth
|
|
2
|
+
// Consumers can use this directly without needing to configure props
|
|
3
|
+
"use client";
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
// section: imports
|
|
6
|
+
import { useEffect, useState } from "react";
|
|
7
|
+
import forgot_password_layout from "../components/layouts/forgot_password";
|
|
8
|
+
import { createLayoutDataClient } from "../components/layouts/shared/data/layout_data_client";
|
|
9
|
+
import { create_sqlite_hazo_connect } from "../lib/hazo_connect_setup";
|
|
10
|
+
// section: constants
|
|
11
|
+
const DEFAULT_IMAGE_SRC = "/globe.svg";
|
|
12
|
+
const DEFAULT_IMAGE_ALT = "Illustration of a globe representing secure authentication workflows";
|
|
13
|
+
const DEFAULT_IMAGE_BG = "#e2e8f0";
|
|
14
|
+
// section: component
|
|
15
|
+
/**
|
|
16
|
+
* Zero-config forgot password page component
|
|
17
|
+
* Uses sensible defaults and can be customized via props
|
|
18
|
+
* @param props - Optional configuration overrides
|
|
19
|
+
* @returns Forgot password page component
|
|
20
|
+
*/
|
|
21
|
+
export function ForgotPasswordPage({ alreadyLoggedInMessage = "You are already logged in", showLogoutButton = true, showReturnHomeButton = false, returnHomeButtonLabel = "Return home", returnHomePath = "/", imageSrc = DEFAULT_IMAGE_SRC, imageAlt = DEFAULT_IMAGE_ALT, imageBackgroundColor = DEFAULT_IMAGE_BG, } = {}) {
|
|
22
|
+
const [dataClient, setDataClient] = useState(null);
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
// Initialize hazo_connect on client side
|
|
25
|
+
const hazoConnect = create_sqlite_hazo_connect();
|
|
26
|
+
const client = createLayoutDataClient(hazoConnect);
|
|
27
|
+
setDataClient(client);
|
|
28
|
+
}, []);
|
|
29
|
+
// Show loading state while initializing
|
|
30
|
+
if (!dataClient) {
|
|
31
|
+
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..." }) }));
|
|
32
|
+
}
|
|
33
|
+
const ForgotPasswordLayout = forgot_password_layout;
|
|
34
|
+
return (_jsx(ForgotPasswordLayout, { image_src: imageSrc, image_alt: imageAlt, image_background_color: imageBackgroundColor, data_client: dataClient, alreadyLoggedInMessage: alreadyLoggedInMessage, showLogoutButton: showLogoutButton, showReturnHomeButton: showReturnHomeButton, returnHomeButtonLabel: returnHomeButtonLabel, returnHomePath: returnHomePath }));
|
|
35
|
+
}
|
|
36
|
+
export default ForgotPasswordPage;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { LoginPage, type LoginPageProps } from "./login.js";
|
|
2
|
+
export { RegisterPage, type RegisterPageProps } from "./register.js";
|
|
3
|
+
export { ForgotPasswordPage, type ForgotPasswordPageProps } from "./forgot_password.js";
|
|
4
|
+
export { ResetPasswordPage, type ResetPasswordPageProps } from "./reset_password.js";
|
|
5
|
+
export { VerifyEmailPage, type VerifyEmailPageProps } from "./verify_email.js";
|
|
6
|
+
export { MySettingsPage, type MySettingsPageProps } from "./my_settings.js";
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/page_components/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,KAAK,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACxF,OAAO,EAAE,iBAAiB,EAAE,KAAK,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AACrF,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC/E,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// file_description: barrel export for zero-config page components
|
|
2
|
+
// These components can be used directly by consumers with sensible defaults
|
|
3
|
+
// section: page_exports
|
|
4
|
+
export { LoginPage } from "./login.js";
|
|
5
|
+
export { RegisterPage } from "./register.js";
|
|
6
|
+
export { ForgotPasswordPage } from "./forgot_password.js";
|
|
7
|
+
export { ResetPasswordPage } from "./reset_password.js";
|
|
8
|
+
export { VerifyEmailPage } from "./verify_email.js";
|
|
9
|
+
export { MySettingsPage } from "./my_settings.js";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export type LoginPageProps = {
|
|
2
|
+
redirectRoute?: string;
|
|
3
|
+
successMessage?: string;
|
|
4
|
+
alreadyLoggedInMessage?: string;
|
|
5
|
+
showLogoutButton?: boolean;
|
|
6
|
+
showReturnHomeButton?: boolean;
|
|
7
|
+
returnHomeButtonLabel?: string;
|
|
8
|
+
returnHomePath?: string;
|
|
9
|
+
forgotPasswordPath?: string;
|
|
10
|
+
forgotPasswordLabel?: string;
|
|
11
|
+
createAccountPath?: string;
|
|
12
|
+
createAccountLabel?: string;
|
|
13
|
+
urlOnLogon?: string;
|
|
14
|
+
imageSrc?: string;
|
|
15
|
+
imageAlt?: string;
|
|
16
|
+
imageBackgroundColor?: string;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Zero-config login page component
|
|
20
|
+
* Uses sensible defaults and can be customized via props
|
|
21
|
+
* @param props - Optional configuration overrides
|
|
22
|
+
* @returns Login page component
|
|
23
|
+
*/
|
|
24
|
+
export declare function LoginPage({ redirectRoute, successMessage, alreadyLoggedInMessage, showLogoutButton, showReturnHomeButton, returnHomeButtonLabel, returnHomePath, forgotPasswordPath, forgotPasswordLabel, createAccountPath, createAccountLabel, urlOnLogon, imageSrc, imageAlt, imageBackgroundColor, }?: LoginPageProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export default LoginPage;
|
|
26
|
+
//# sourceMappingURL=login.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../src/page_components/login.tsx"],"names":[],"mappings":"AAkBA,MAAM,MAAM,cAAc,GAAG;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,CAAC;AAGF;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,EACxB,aAAa,EACb,cAAyC,EACzC,sBAAoD,EACpD,gBAAuB,EACvB,oBAA4B,EAC5B,qBAAqC,EACrC,cAAoB,EACpB,kBAAiD,EACjD,mBAAwC,EACxC,iBAAyC,EACzC,kBAAqC,EACrC,UAAU,EACV,QAA4B,EAC5B,QAA4B,EAC5B,oBAAuC,GACxC,GAAE,cAAmB,2CA8CrB;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// file_description: zero-config login page component for hazo_auth
|
|
2
|
+
// Consumers can use this directly without needing to configure props
|
|
3
|
+
"use client";
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
// section: imports
|
|
6
|
+
import { useEffect, useState } from "react";
|
|
7
|
+
import login_layout from "../components/layouts/login";
|
|
8
|
+
import { createLayoutDataClient } from "../components/layouts/shared/data/layout_data_client";
|
|
9
|
+
import { create_sqlite_hazo_connect } from "../lib/hazo_connect_setup";
|
|
10
|
+
import { create_app_logger } from "../lib/app_logger";
|
|
11
|
+
// section: constants
|
|
12
|
+
const DEFAULT_IMAGE_SRC = "/globe.svg";
|
|
13
|
+
const DEFAULT_IMAGE_ALT = "Illustration of a globe representing secure authentication workflows";
|
|
14
|
+
const DEFAULT_IMAGE_BG = "#e2e8f0";
|
|
15
|
+
// section: component
|
|
16
|
+
/**
|
|
17
|
+
* Zero-config login page component
|
|
18
|
+
* Uses sensible defaults and can be customized via props
|
|
19
|
+
* @param props - Optional configuration overrides
|
|
20
|
+
* @returns Login page component
|
|
21
|
+
*/
|
|
22
|
+
export function LoginPage({ redirectRoute, successMessage = "Successfully logged in", alreadyLoggedInMessage = "You are already logged in", showLogoutButton = true, showReturnHomeButton = false, returnHomeButtonLabel = "Return home", returnHomePath = "/", forgotPasswordPath = "/hazo_auth/forgot_password", forgotPasswordLabel = "Forgot password?", createAccountPath = "/hazo_auth/register", createAccountLabel = "Create account", urlOnLogon, imageSrc = DEFAULT_IMAGE_SRC, imageAlt = DEFAULT_IMAGE_ALT, imageBackgroundColor = DEFAULT_IMAGE_BG, } = {}) {
|
|
23
|
+
const [dataClient, setDataClient] = useState(null);
|
|
24
|
+
const [logger, setLogger] = useState(null);
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
// Initialize hazo_connect and logger on client side
|
|
27
|
+
const hazoConnect = create_sqlite_hazo_connect();
|
|
28
|
+
const client = createLayoutDataClient(hazoConnect);
|
|
29
|
+
const appLogger = create_app_logger();
|
|
30
|
+
setDataClient(client);
|
|
31
|
+
setLogger(appLogger);
|
|
32
|
+
}, []);
|
|
33
|
+
// Show loading state while initializing
|
|
34
|
+
if (!dataClient || !logger) {
|
|
35
|
+
return (_jsx("div", { className: "cls_login_page_loading flex items-center justify-center min-h-screen", children: _jsx("div", { className: "text-slate-600 animate-pulse", children: "Loading..." }) }));
|
|
36
|
+
}
|
|
37
|
+
const LoginLayout = login_layout;
|
|
38
|
+
return (_jsx(LoginLayout, { image_src: imageSrc, image_alt: imageAlt, image_background_color: imageBackgroundColor, data_client: dataClient, logger: logger, redirectRoute: redirectRoute, successMessage: successMessage, alreadyLoggedInMessage: alreadyLoggedInMessage, showLogoutButton: showLogoutButton, showReturnHomeButton: showReturnHomeButton, returnHomeButtonLabel: returnHomeButtonLabel, returnHomePath: returnHomePath, forgot_password_path: forgotPasswordPath, forgot_password_label: forgotPasswordLabel, create_account_path: createAccountPath, create_account_label: createAccountLabel, urlOnLogon: urlOnLogon }));
|
|
39
|
+
}
|
|
40
|
+
export default LoginPage;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { PasswordRequirementOptions } from "../components/layouts/shared/config/layout_customization";
|
|
2
|
+
declare const DEFAULT_MESSAGES: {
|
|
3
|
+
photo_upload_disabled_message: string;
|
|
4
|
+
gravatar_setup_message: string;
|
|
5
|
+
gravatar_no_account_message: string;
|
|
6
|
+
library_tooltip_message: string;
|
|
7
|
+
};
|
|
8
|
+
declare const DEFAULT_UI_SIZES: {
|
|
9
|
+
gravatar_size: number;
|
|
10
|
+
profile_picture_size: number;
|
|
11
|
+
tooltip_icon_size_default: number;
|
|
12
|
+
tooltip_icon_size_small: number;
|
|
13
|
+
library_photo_grid_columns: number;
|
|
14
|
+
library_photo_preview_size: number;
|
|
15
|
+
image_compression_max_dimension: number;
|
|
16
|
+
upload_file_hard_limit_bytes: number;
|
|
17
|
+
};
|
|
18
|
+
export type MySettingsPageProps = {
|
|
19
|
+
userFields?: {
|
|
20
|
+
show_name_field?: boolean;
|
|
21
|
+
show_email_field?: boolean;
|
|
22
|
+
show_password_field?: boolean;
|
|
23
|
+
};
|
|
24
|
+
passwordRequirements?: Partial<PasswordRequirementOptions>;
|
|
25
|
+
profilePicture?: {
|
|
26
|
+
allow_photo_upload?: boolean;
|
|
27
|
+
upload_photo_path?: string;
|
|
28
|
+
max_photo_size?: number;
|
|
29
|
+
user_photo_default?: boolean;
|
|
30
|
+
user_photo_default_priority1?: "gravatar" | "library";
|
|
31
|
+
user_photo_default_priority2?: "library" | "gravatar";
|
|
32
|
+
library_photo_path?: string;
|
|
33
|
+
};
|
|
34
|
+
heading?: string;
|
|
35
|
+
subHeading?: string;
|
|
36
|
+
profilePhotoLabel?: string;
|
|
37
|
+
profilePhotoRecommendation?: string;
|
|
38
|
+
uploadPhotoButtonLabel?: string;
|
|
39
|
+
removePhotoButtonLabel?: string;
|
|
40
|
+
profileInformationLabel?: string;
|
|
41
|
+
passwordLabel?: string;
|
|
42
|
+
currentPasswordLabel?: string;
|
|
43
|
+
newPasswordLabel?: string;
|
|
44
|
+
confirmPasswordLabel?: string;
|
|
45
|
+
savePasswordButtonLabel?: string;
|
|
46
|
+
unauthorizedMessage?: string;
|
|
47
|
+
loginButtonLabel?: string;
|
|
48
|
+
loginPath?: string;
|
|
49
|
+
messages?: Partial<typeof DEFAULT_MESSAGES>;
|
|
50
|
+
uiSizes?: Partial<typeof DEFAULT_UI_SIZES>;
|
|
51
|
+
fileTypes?: {
|
|
52
|
+
allowed_image_extensions?: string[];
|
|
53
|
+
allowed_image_mime_types?: string[];
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Zero-config my settings page component
|
|
58
|
+
* Uses sensible defaults and can be customized via props
|
|
59
|
+
* @param props - Optional configuration overrides
|
|
60
|
+
* @returns My settings page component
|
|
61
|
+
*/
|
|
62
|
+
export declare function MySettingsPage({ userFields, passwordRequirements, profilePicture, heading, subHeading, profilePhotoLabel, profilePhotoRecommendation, uploadPhotoButtonLabel, removePhotoButtonLabel, profileInformationLabel, passwordLabel, currentPasswordLabel, newPasswordLabel, confirmPasswordLabel, savePasswordButtonLabel, unauthorizedMessage, loginButtonLabel, loginPath, messages, uiSizes, fileTypes, }?: MySettingsPageProps): import("react/jsx-runtime").JSX.Element;
|
|
63
|
+
export default MySettingsPage;
|
|
64
|
+
//# sourceMappingURL=my_settings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"my_settings.d.ts","sourceRoot":"","sources":["../../src/page_components/my_settings.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,0DAA0D,CAAC;AA2B3G,QAAA,MAAM,gBAAgB;;;;;CAKrB,CAAC;AAEF,QAAA,MAAM,gBAAgB;;;;;;;;;CASrB,CAAC;AAQF,MAAM,MAAM,mBAAmB,GAAG;IAChC,UAAU,CAAC,EAAE;QACX,eAAe,CAAC,EAAE,OAAO,CAAC;QAC1B,gBAAgB,CAAC,EAAE,OAAO,CAAC;QAC3B,mBAAmB,CAAC,EAAE,OAAO,CAAC;KAC/B,CAAC;IACF,oBAAoB,CAAC,EAAE,OAAO,CAAC,0BAA0B,CAAC,CAAC;IAC3D,cAAc,CAAC,EAAE;QACf,kBAAkB,CAAC,EAAE,OAAO,CAAC;QAC7B,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,kBAAkB,CAAC,EAAE,OAAO,CAAC;QAC7B,4BAA4B,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;QACtD,4BAA4B,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC;QACtD,kBAAkB,CAAC,EAAE,MAAM,CAAC;KAC7B,CAAC;IACF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC,OAAO,gBAAgB,CAAC,CAAC;IAC5C,OAAO,CAAC,EAAE,OAAO,CAAC,OAAO,gBAAgB,CAAC,CAAC;IAC3C,SAAS,CAAC,EAAE;QACV,wBAAwB,CAAC,EAAE,MAAM,EAAE,CAAC;QACpC,wBAAwB,CAAC,EAAE,MAAM,EAAE,CAAC;KACrC,CAAC;CACH,CAAC;AAGF;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,EAC7B,UAAU,EACV,oBAAoB,EACpB,cAAc,EACd,OAA4B,EAC5B,UAAoE,EACpE,iBAAmC,EACnC,0BAAiF,EACjF,sBAAuC,EACvC,sBAAiC,EACjC,uBAA+C,EAC/C,aAA0B,EAC1B,oBAAyC,EACzC,gBAAiC,EACjC,oBAAyC,EACzC,uBAA2C,EAC3C,mBAAkE,EAClE,gBAAgC,EAChC,SAA8B,EAC9B,QAAQ,EACR,OAAO,EACP,SAAS,GACV,GAAE,mBAAwB,2CA0D1B;AAED,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
// file_description: zero-config my settings page component for hazo_auth
|
|
2
|
+
// Consumers can use this directly without needing to configure props
|
|
3
|
+
"use client";
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
// section: imports
|
|
6
|
+
import my_settings_layout from "../components/layouts/my_settings";
|
|
7
|
+
// section: default_configuration
|
|
8
|
+
const DEFAULT_USER_FIELDS = {
|
|
9
|
+
show_name_field: true,
|
|
10
|
+
show_email_field: true,
|
|
11
|
+
show_password_field: true,
|
|
12
|
+
};
|
|
13
|
+
const DEFAULT_PASSWORD_REQUIREMENTS = {
|
|
14
|
+
minimum_length: 8,
|
|
15
|
+
require_uppercase: true,
|
|
16
|
+
require_lowercase: true,
|
|
17
|
+
require_number: true,
|
|
18
|
+
require_special: false,
|
|
19
|
+
};
|
|
20
|
+
const DEFAULT_PROFILE_PICTURE = {
|
|
21
|
+
allow_photo_upload: true,
|
|
22
|
+
upload_photo_path: "/api/hazo_auth/upload_profile_picture",
|
|
23
|
+
max_photo_size: 5242880, // 5MB
|
|
24
|
+
user_photo_default: true,
|
|
25
|
+
user_photo_default_priority1: "gravatar",
|
|
26
|
+
user_photo_default_priority2: "library",
|
|
27
|
+
library_photo_path: "/profile_pictures/library",
|
|
28
|
+
};
|
|
29
|
+
const DEFAULT_MESSAGES = {
|
|
30
|
+
photo_upload_disabled_message: "Photo upload is currently disabled. Contact your administrator.",
|
|
31
|
+
gravatar_setup_message: "To use Gravatar, create a free account at gravatar.com with the same email address you use here.",
|
|
32
|
+
gravatar_no_account_message: "No Gravatar account found for your email. Using library photo instead.",
|
|
33
|
+
library_tooltip_message: "Choose from our library of profile pictures",
|
|
34
|
+
};
|
|
35
|
+
const DEFAULT_UI_SIZES = {
|
|
36
|
+
gravatar_size: 200,
|
|
37
|
+
profile_picture_size: 128,
|
|
38
|
+
tooltip_icon_size_default: 16,
|
|
39
|
+
tooltip_icon_size_small: 14,
|
|
40
|
+
library_photo_grid_columns: 4,
|
|
41
|
+
library_photo_preview_size: 80,
|
|
42
|
+
image_compression_max_dimension: 800,
|
|
43
|
+
upload_file_hard_limit_bytes: 10485760, // 10MB
|
|
44
|
+
};
|
|
45
|
+
const DEFAULT_FILE_TYPES = {
|
|
46
|
+
allowed_image_extensions: [".jpg", ".jpeg", ".png", ".gif", ".webp"],
|
|
47
|
+
allowed_image_mime_types: ["image/jpeg", "image/png", "image/gif", "image/webp"],
|
|
48
|
+
};
|
|
49
|
+
// section: component
|
|
50
|
+
/**
|
|
51
|
+
* Zero-config my settings page component
|
|
52
|
+
* Uses sensible defaults and can be customized via props
|
|
53
|
+
* @param props - Optional configuration overrides
|
|
54
|
+
* @returns My settings page component
|
|
55
|
+
*/
|
|
56
|
+
export function MySettingsPage({ userFields, passwordRequirements, profilePicture, heading = "Account Settings", subHeading = "Manage your profile, password, and email preferences.", profilePhotoLabel = "Profile Photo", profilePhotoRecommendation = "Recommended: Square image, at least 200x200 pixels", uploadPhotoButtonLabel = "Upload Photo", removePhotoButtonLabel = "Remove", profileInformationLabel = "Profile Information", passwordLabel = "Password", currentPasswordLabel = "Current Password", newPasswordLabel = "New Password", confirmPasswordLabel = "Confirm Password", savePasswordButtonLabel = "Update Password", unauthorizedMessage = "You must be logged in to access this page.", loginButtonLabel = "Go to login", loginPath = "/hazo_auth/login", messages, uiSizes, fileTypes, } = {}) {
|
|
57
|
+
// Merge provided props with defaults
|
|
58
|
+
const mergedUserFields = Object.assign(Object.assign({}, DEFAULT_USER_FIELDS), userFields);
|
|
59
|
+
const mergedPasswordRequirements = Object.assign(Object.assign({}, DEFAULT_PASSWORD_REQUIREMENTS), passwordRequirements);
|
|
60
|
+
const mergedProfilePicture = Object.assign(Object.assign({}, DEFAULT_PROFILE_PICTURE), profilePicture);
|
|
61
|
+
const mergedMessages = Object.assign(Object.assign({}, DEFAULT_MESSAGES), messages);
|
|
62
|
+
const mergedUiSizes = Object.assign(Object.assign({}, DEFAULT_UI_SIZES), uiSizes);
|
|
63
|
+
const mergedFileTypes = Object.assign(Object.assign({}, DEFAULT_FILE_TYPES), fileTypes);
|
|
64
|
+
const MySettingsLayout = my_settings_layout;
|
|
65
|
+
return (_jsx(MySettingsLayout, { userFields: mergedUserFields, password_requirements: mergedPasswordRequirements, profilePicture: mergedProfilePicture, heading: heading, subHeading: subHeading, profilePhotoLabel: profilePhotoLabel, profilePhotoRecommendation: profilePhotoRecommendation, uploadPhotoButtonLabel: uploadPhotoButtonLabel, removePhotoButtonLabel: removePhotoButtonLabel, profileInformationLabel: profileInformationLabel, passwordLabel: passwordLabel, currentPasswordLabel: currentPasswordLabel, newPasswordLabel: newPasswordLabel, confirmPasswordLabel: confirmPasswordLabel, unauthorizedMessage: unauthorizedMessage, loginButtonLabel: loginButtonLabel, loginPath: loginPath, messages: mergedMessages, uiSizes: mergedUiSizes, fileTypes: mergedFileTypes }));
|
|
66
|
+
}
|
|
67
|
+
export default MySettingsPage;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { PasswordRequirementOverrides } from "../components/layouts/shared/config/layout_customization";
|
|
2
|
+
export type RegisterPageProps = {
|
|
3
|
+
showNameField?: boolean;
|
|
4
|
+
passwordRequirements?: PasswordRequirementOverrides;
|
|
5
|
+
alreadyLoggedInMessage?: string;
|
|
6
|
+
showLogoutButton?: boolean;
|
|
7
|
+
showReturnHomeButton?: boolean;
|
|
8
|
+
returnHomeButtonLabel?: string;
|
|
9
|
+
returnHomePath?: string;
|
|
10
|
+
signInPath?: string;
|
|
11
|
+
signInLabel?: string;
|
|
12
|
+
urlOnLogon?: string;
|
|
13
|
+
imageSrc?: string;
|
|
14
|
+
imageAlt?: string;
|
|
15
|
+
imageBackgroundColor?: string;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Zero-config register page component
|
|
19
|
+
* Uses sensible defaults and can be customized via props
|
|
20
|
+
* @param props - Optional configuration overrides
|
|
21
|
+
* @returns Register page component
|
|
22
|
+
*/
|
|
23
|
+
export declare function RegisterPage({ showNameField, passwordRequirements, alreadyLoggedInMessage, showLogoutButton, showReturnHomeButton, returnHomeButtonLabel, returnHomePath, signInPath, signInLabel, urlOnLogon, imageSrc, imageAlt, imageBackgroundColor, }?: RegisterPageProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export default RegisterPage;
|
|
25
|
+
//# sourceMappingURL=register.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../src/page_components/register.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,0DAA0D,CAAC;AAgB7G,MAAM,MAAM,iBAAiB,GAAG;IAC9B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,oBAAoB,CAAC,EAAE,4BAA4B,CAAC;IACpD,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,CAAC;AAGF;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,EAC3B,aAAoB,EACpB,oBAAoD,EACpD,sBAAoD,EACpD,gBAAuB,EACvB,oBAA4B,EAC5B,qBAAqC,EACrC,cAAoB,EACpB,UAA+B,EAC/B,WAAuB,EACvB,UAAU,EACV,QAA4B,EAC5B,QAA4B,EAC5B,oBAAuC,GACxC,GAAE,iBAAsB,2CAwCxB;AAED,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// file_description: zero-config register page component for hazo_auth
|
|
2
|
+
// Consumers can use this directly without needing to configure props
|
|
3
|
+
"use client";
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
// section: imports
|
|
6
|
+
import { useEffect, useState } from "react";
|
|
7
|
+
import register_layout from "../components/layouts/register";
|
|
8
|
+
import { createLayoutDataClient } from "../components/layouts/shared/data/layout_data_client";
|
|
9
|
+
import { create_sqlite_hazo_connect } from "../lib/hazo_connect_setup";
|
|
10
|
+
// section: constants
|
|
11
|
+
const DEFAULT_IMAGE_SRC = "/globe.svg";
|
|
12
|
+
const DEFAULT_IMAGE_ALT = "Illustration of a globe representing secure authentication workflows";
|
|
13
|
+
const DEFAULT_IMAGE_BG = "#e2e8f0";
|
|
14
|
+
const DEFAULT_PASSWORD_REQUIREMENTS = {
|
|
15
|
+
minimum_length: 8,
|
|
16
|
+
require_uppercase: true,
|
|
17
|
+
require_lowercase: true,
|
|
18
|
+
require_number: true,
|
|
19
|
+
require_special: false,
|
|
20
|
+
};
|
|
21
|
+
// section: component
|
|
22
|
+
/**
|
|
23
|
+
* Zero-config register page component
|
|
24
|
+
* Uses sensible defaults and can be customized via props
|
|
25
|
+
* @param props - Optional configuration overrides
|
|
26
|
+
* @returns Register page component
|
|
27
|
+
*/
|
|
28
|
+
export function RegisterPage({ showNameField = true, passwordRequirements = DEFAULT_PASSWORD_REQUIREMENTS, alreadyLoggedInMessage = "You are already logged in", showLogoutButton = true, showReturnHomeButton = false, returnHomeButtonLabel = "Return home", returnHomePath = "/", signInPath = "/hazo_auth/login", signInLabel = "Sign in", urlOnLogon, imageSrc = DEFAULT_IMAGE_SRC, imageAlt = DEFAULT_IMAGE_ALT, imageBackgroundColor = DEFAULT_IMAGE_BG, } = {}) {
|
|
29
|
+
const [dataClient, setDataClient] = useState(null);
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
// Initialize hazo_connect on client side
|
|
32
|
+
const hazoConnect = create_sqlite_hazo_connect();
|
|
33
|
+
const client = createLayoutDataClient(hazoConnect);
|
|
34
|
+
setDataClient(client);
|
|
35
|
+
}, []);
|
|
36
|
+
// Show loading state while initializing
|
|
37
|
+
if (!dataClient) {
|
|
38
|
+
return (_jsx("div", { className: "cls_register_page_loading flex items-center justify-center min-h-screen", children: _jsx("div", { className: "text-slate-600 animate-pulse", children: "Loading..." }) }));
|
|
39
|
+
}
|
|
40
|
+
const RegisterLayout = register_layout;
|
|
41
|
+
return (_jsx(RegisterLayout, { image_src: imageSrc, image_alt: imageAlt, image_background_color: imageBackgroundColor, password_requirements: passwordRequirements, show_name_field: showNameField, data_client: dataClient, alreadyLoggedInMessage: alreadyLoggedInMessage, showLogoutButton: showLogoutButton, showReturnHomeButton: showReturnHomeButton, returnHomeButtonLabel: returnHomeButtonLabel, returnHomePath: returnHomePath, signInPath: signInPath, signInLabel: signInLabel, urlOnLogon: urlOnLogon }));
|
|
42
|
+
}
|
|
43
|
+
export default RegisterPage;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { PasswordRequirementOverrides } from "../components/layouts/shared/config/layout_customization";
|
|
2
|
+
export type ResetPasswordPageProps = {
|
|
3
|
+
errorMessage?: string;
|
|
4
|
+
successMessage?: string;
|
|
5
|
+
loginPath?: string;
|
|
6
|
+
forgotPasswordPath?: string;
|
|
7
|
+
passwordRequirements?: PasswordRequirementOverrides;
|
|
8
|
+
alreadyLoggedInMessage?: string;
|
|
9
|
+
showLogoutButton?: boolean;
|
|
10
|
+
showReturnHomeButton?: boolean;
|
|
11
|
+
returnHomeButtonLabel?: string;
|
|
12
|
+
returnHomePath?: string;
|
|
13
|
+
imageSrc?: string;
|
|
14
|
+
imageAlt?: string;
|
|
15
|
+
imageBackgroundColor?: string;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Zero-config reset password page component
|
|
19
|
+
* Uses sensible defaults and can be customized via props
|
|
20
|
+
* @param props - Optional configuration overrides
|
|
21
|
+
* @returns Reset password page component
|
|
22
|
+
*/
|
|
23
|
+
export declare function ResetPasswordPage({ errorMessage, successMessage, loginPath, forgotPasswordPath, passwordRequirements, alreadyLoggedInMessage, showLogoutButton, showReturnHomeButton, returnHomeButtonLabel, returnHomePath, imageSrc, imageAlt, imageBackgroundColor, }?: ResetPasswordPageProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export default ResetPasswordPage;
|
|
25
|
+
//# sourceMappingURL=reset_password.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reset_password.d.ts","sourceRoot":"","sources":["../../src/page_components/reset_password.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,0DAA0D,CAAC;AAgB7G,MAAM,MAAM,sBAAsB,GAAG;IACnC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,oBAAoB,CAAC,EAAE,4BAA4B,CAAC;IACpD,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,CAAC;AAGF;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,YAAmE,EACnE,cAAwF,EACxF,SAA8B,EAC9B,kBAAiD,EACjD,oBAAoD,EACpD,sBAAoD,EACpD,gBAAuB,EACvB,oBAA4B,EAC5B,qBAAqC,EACrC,cAAoB,EACpB,QAA4B,EAC5B,QAA4B,EAC5B,oBAAuC,GACxC,GAAE,sBAA2B,2CAsC7B;AAED,eAAe,iBAAiB,CAAC"}
|