hazo_auth 1.4.1 → 1.4.2
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 +25 -38
- package/dist/components/layouts/email_verification/config/email_verification_field_config.d.ts +2 -2
- package/dist/components/layouts/email_verification/config/email_verification_field_config.d.ts.map +1 -1
- package/dist/components/layouts/email_verification/config/email_verification_field_config.js +1 -1
- package/dist/components/layouts/email_verification/hooks/use_email_verification.d.ts +2 -2
- 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 +2 -2
- package/dist/components/layouts/email_verification/index.d.ts +3 -3
- package/dist/components/layouts/email_verification/index.d.ts.map +1 -1
- package/dist/components/layouts/email_verification/index.js +9 -9
- package/dist/components/layouts/forgot_password/config/forgot_password_field_config.d.ts +2 -2
- package/dist/components/layouts/forgot_password/config/forgot_password_field_config.d.ts.map +1 -1
- package/dist/components/layouts/forgot_password/config/forgot_password_field_config.js +1 -1
- package/dist/components/layouts/forgot_password/hooks/use_forgot_password_form.d.ts +2 -2
- 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 +2 -2
- package/dist/components/layouts/forgot_password/index.d.ts +2 -2
- package/dist/components/layouts/forgot_password/index.d.ts.map +1 -1
- package/dist/components/layouts/forgot_password/index.js +8 -8
- package/dist/components/layouts/login/config/login_field_config.d.ts +2 -2
- package/dist/components/layouts/login/config/login_field_config.d.ts.map +1 -1
- package/dist/components/layouts/login/config/login_field_config.js +1 -1
- package/dist/components/layouts/login/hooks/use_login_form.d.ts +2 -2
- package/dist/components/layouts/login/hooks/use_login_form.d.ts.map +1 -1
- package/dist/components/layouts/login/hooks/use_login_form.js +4 -4
- package/dist/components/layouts/login/index.d.ts +2 -2
- package/dist/components/layouts/login/index.d.ts.map +1 -1
- package/dist/components/layouts/login/index.js +9 -9
- package/dist/components/layouts/my_settings/components/editable_field.js +3 -3
- package/dist/components/layouts/my_settings/components/password_change_dialog.d.ts +1 -1
- package/dist/components/layouts/my_settings/components/password_change_dialog.d.ts.map +1 -1
- package/dist/components/layouts/my_settings/components/password_change_dialog.js +4 -4
- package/dist/components/layouts/my_settings/components/profile_picture_dialog.js +7 -7
- package/dist/components/layouts/my_settings/components/profile_picture_display.js +1 -1
- package/dist/components/layouts/my_settings/components/profile_picture_gravatar_tab.js +3 -3
- package/dist/components/layouts/my_settings/components/profile_picture_library_tab.js +5 -5
- package/dist/components/layouts/my_settings/components/profile_picture_upload_tab.js +4 -4
- package/dist/components/layouts/my_settings/config/my_settings_field_config.d.ts +1 -1
- package/dist/components/layouts/my_settings/config/my_settings_field_config.d.ts.map +1 -1
- package/dist/components/layouts/my_settings/config/my_settings_field_config.js +1 -1
- package/dist/components/layouts/my_settings/hooks/use_my_settings.d.ts +1 -1
- 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 +1 -1
- package/dist/components/layouts/my_settings/index.d.ts +2 -2
- package/dist/components/layouts/my_settings/index.d.ts.map +1 -1
- package/dist/components/layouts/my_settings/index.js +9 -9
- package/dist/components/layouts/register/config/register_field_config.d.ts +2 -2
- package/dist/components/layouts/register/config/register_field_config.d.ts.map +1 -1
- package/dist/components/layouts/register/config/register_field_config.js +1 -1
- package/dist/components/layouts/register/hooks/use_register_form.d.ts +3 -3
- package/dist/components/layouts/register/hooks/use_register_form.d.ts.map +1 -1
- package/dist/components/layouts/register/hooks/use_register_form.js +2 -2
- package/dist/components/layouts/register/index.d.ts +2 -2
- package/dist/components/layouts/register/index.d.ts.map +1 -1
- package/dist/components/layouts/register/index.js +9 -9
- package/dist/components/layouts/reset_password/config/reset_password_field_config.d.ts +2 -2
- package/dist/components/layouts/reset_password/config/reset_password_field_config.d.ts.map +1 -1
- package/dist/components/layouts/reset_password/config/reset_password_field_config.js +1 -1
- package/dist/components/layouts/reset_password/hooks/use_reset_password_form.d.ts +3 -3
- 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 +2 -2
- package/dist/components/layouts/reset_password/index.d.ts +2 -2
- package/dist/components/layouts/reset_password/index.d.ts.map +1 -1
- package/dist/components/layouts/reset_password/index.js +8 -8
- package/dist/components/layouts/shared/components/already_logged_in_guard.js +4 -4
- package/dist/components/layouts/shared/components/auth_page_shell.js +3 -3
- package/dist/components/layouts/shared/components/form_action_buttons.d.ts +1 -1
- package/dist/components/layouts/shared/components/form_action_buttons.d.ts.map +1 -1
- package/dist/components/layouts/shared/components/form_action_buttons.js +1 -1
- package/dist/components/layouts/shared/components/form_field_wrapper.js +2 -2
- package/dist/components/layouts/shared/components/logout_button.js +2 -2
- package/dist/components/layouts/shared/components/password_field.js +3 -3
- package/dist/components/layouts/shared/components/profile_pic_menu.d.ts +1 -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 +4 -4
- package/dist/components/layouts/shared/components/profile_pic_menu_wrapper.js +2 -2
- package/dist/components/layouts/shared/components/sidebar_layout_wrapper.js +3 -3
- package/dist/components/layouts/shared/components/standalone_layout_wrapper.js +1 -1
- package/dist/components/layouts/shared/components/two_column_auth_layout.js +1 -1
- package/dist/components/layouts/shared/components/unauthorized_guard.js +2 -2
- package/dist/components/layouts/shared/hooks/use_hazo_auth.d.ts +1 -1
- package/dist/components/layouts/shared/hooks/use_hazo_auth.d.ts.map +1 -1
- package/dist/components/layouts/shared/utils/validation.d.ts +1 -1
- package/dist/components/layouts/shared/utils/validation.d.ts.map +1 -1
- package/dist/components/layouts/user_management/components/roles_matrix.js +7 -7
- package/dist/components/layouts/user_management/index.js +11 -11
- package/dist/components/ui/alert-dialog.js +2 -2
- package/dist/components/ui/avatar.js +1 -1
- package/dist/components/ui/button.js +1 -1
- package/dist/components/ui/checkbox.js +1 -1
- package/dist/components/ui/dialog.js +1 -1
- package/dist/components/ui/dropdown-menu.js +1 -1
- package/dist/components/ui/hazo_ui_tooltip.js +1 -1
- package/dist/components/ui/input.js +1 -1
- package/dist/components/ui/label.js +1 -1
- package/dist/components/ui/separator.js +1 -1
- package/dist/components/ui/sheet.js +1 -1
- package/dist/components/ui/sidebar.d.ts +2 -2
- package/dist/components/ui/sidebar.d.ts.map +1 -1
- package/dist/components/ui/sidebar.js +8 -8
- package/dist/components/ui/skeleton.js +1 -1
- package/dist/components/ui/switch.js +1 -1
- package/dist/components/ui/table.js +1 -1
- package/dist/components/ui/tabs.js +1 -1
- package/dist/components/ui/tooltip.js +1 -1
- package/dist/components/ui/vertical-tabs.js +1 -1
- package/dist/lib/already_logged_in_config.server.js +1 -1
- package/dist/lib/app_logger.js +1 -1
- package/dist/lib/auth/auth_cache.d.ts +1 -1
- package/dist/lib/auth/auth_cache.d.ts.map +1 -1
- package/dist/lib/auth/auth_utils.server.js +2 -2
- package/dist/lib/auth/hazo_get_auth.server.d.ts +1 -1
- package/dist/lib/auth/hazo_get_auth.server.d.ts.map +1 -1
- package/dist/lib/auth/hazo_get_auth.server.js +7 -7
- package/dist/lib/auth/server_auth.js +2 -2
- package/dist/lib/auth_utility_config.server.js +1 -1
- package/dist/lib/config/config_loader.server.js +1 -1
- package/dist/lib/email_verification_config.server.js +1 -1
- package/dist/lib/file_types_config.server.js +1 -1
- package/dist/lib/forgot_password_config.server.js +1 -1
- package/dist/lib/hazo_connect_instance.server.js +2 -2
- package/dist/lib/hazo_connect_setup.server.js +2 -2
- package/dist/lib/login_config.server.js +2 -2
- package/dist/lib/messages_config.server.js +1 -1
- package/dist/lib/my_settings_config.server.js +7 -7
- package/dist/lib/password_requirements_config.server.js +1 -1
- package/dist/lib/profile_pic_menu_config.server.js +1 -1
- package/dist/lib/profile_picture_config.server.js +2 -2
- package/dist/lib/register_config.server.js +4 -4
- package/dist/lib/reset_password_config.server.js +3 -3
- package/dist/lib/services/email_service.js +2 -2
- package/dist/lib/services/email_verification_service.js +3 -3
- package/dist/lib/services/login_service.js +3 -3
- package/dist/lib/services/password_change_service.js +3 -3
- package/dist/lib/services/password_reset_service.js +3 -3
- package/dist/lib/services/profile_picture_remove_service.js +3 -3
- package/dist/lib/services/profile_picture_service.d.ts +1 -1
- package/dist/lib/services/profile_picture_service.d.ts.map +1 -1
- package/dist/lib/services/profile_picture_service.js +5 -5
- package/dist/lib/services/registration_service.js +8 -8
- package/dist/lib/services/token_service.js +2 -2
- package/dist/lib/services/user_profiles_service.js +2 -2
- package/dist/lib/services/user_update_service.d.ts +1 -1
- package/dist/lib/services/user_update_service.d.ts.map +1 -1
- package/dist/lib/services/user_update_service.js +4 -4
- package/dist/lib/ui_shell_config.server.js +1 -1
- package/dist/lib/ui_sizes_config.server.js +1 -1
- package/dist/lib/user_fields_config.server.js +1 -1
- package/dist/lib/user_management_config.server.js +1 -1
- package/dist/lib/utils/error_sanitizer.d.ts +1 -1
- package/dist/lib/utils/error_sanitizer.d.ts.map +1 -1
- package/dist/server/config/config_loader.d.ts +1 -1
- package/dist/server/config/config_loader.d.ts.map +1 -1
- package/dist/server/config/config_loader.js +1 -1
- package/dist/server/index.js +2 -2
- package/dist/server/logging/logger_service.d.ts +1 -1
- package/dist/server/logging/logger_service.d.ts.map +1 -1
- package/dist/server/server.js +2 -2
- package/package.json +4 -100
- package/src/components/layouts/email_verification/config/email_verification_field_config.ts +2 -2
- package/src/components/layouts/email_verification/hooks/use_email_verification.ts +3 -3
- package/src/components/layouts/email_verification/index.tsx +11 -11
- package/src/components/layouts/forgot_password/config/forgot_password_field_config.ts +2 -2
- package/src/components/layouts/forgot_password/hooks/use_forgot_password_form.ts +3 -3
- package/src/components/layouts/forgot_password/index.tsx +10 -10
- package/src/components/layouts/login/config/login_field_config.ts +2 -2
- package/src/components/layouts/login/hooks/use_login_form.ts +5 -5
- package/src/components/layouts/login/index.tsx +11 -11
- package/src/components/layouts/my_settings/components/editable_field.tsx +3 -3
- package/src/components/layouts/my_settings/components/password_change_dialog.tsx +5 -5
- package/src/components/layouts/my_settings/components/profile_picture_dialog.tsx +7 -7
- package/src/components/layouts/my_settings/components/profile_picture_display.tsx +2 -2
- package/src/components/layouts/my_settings/components/profile_picture_gravatar_tab.tsx +3 -3
- package/src/components/layouts/my_settings/components/profile_picture_library_tab.tsx +5 -5
- package/src/components/layouts/my_settings/components/profile_picture_upload_tab.tsx +4 -4
- package/src/components/layouts/my_settings/config/my_settings_field_config.ts +2 -2
- package/src/components/layouts/my_settings/hooks/use_my_settings.ts +2 -2
- package/src/components/layouts/my_settings/index.tsx +10 -10
- package/src/components/layouts/register/config/register_field_config.ts +2 -2
- package/src/components/layouts/register/hooks/use_register_form.ts +4 -4
- package/src/components/layouts/register/index.tsx +11 -11
- package/src/components/layouts/reset_password/config/reset_password_field_config.ts +2 -2
- package/src/components/layouts/reset_password/hooks/use_reset_password_form.ts +4 -4
- package/src/components/layouts/reset_password/index.tsx +10 -10
- package/src/components/layouts/shared/components/already_logged_in_guard.tsx +4 -4
- package/src/components/layouts/shared/components/auth_page_shell.tsx +3 -3
- package/src/components/layouts/shared/components/form_action_buttons.tsx +2 -2
- package/src/components/layouts/shared/components/form_field_wrapper.tsx +2 -2
- package/src/components/layouts/shared/components/logout_button.tsx +2 -2
- package/src/components/layouts/shared/components/password_field.tsx +3 -3
- package/src/components/layouts/shared/components/profile_pic_menu.tsx +5 -5
- package/src/components/layouts/shared/components/profile_pic_menu_wrapper.tsx +2 -2
- package/src/components/layouts/shared/components/sidebar_layout_wrapper.tsx +3 -3
- package/src/components/layouts/shared/components/standalone_layout_wrapper.tsx +1 -1
- package/src/components/layouts/shared/components/two_column_auth_layout.tsx +1 -1
- package/src/components/layouts/shared/components/unauthorized_guard.tsx +2 -2
- package/src/components/layouts/shared/hooks/use_hazo_auth.ts +1 -1
- package/src/components/layouts/shared/utils/validation.ts +1 -1
- package/src/components/layouts/user_management/components/roles_matrix.tsx +7 -7
- package/src/components/layouts/user_management/index.tsx +11 -11
- package/src/components/ui/alert-dialog.tsx +2 -2
- package/src/components/ui/avatar.tsx +1 -1
- package/src/components/ui/button.tsx +1 -1
- package/src/components/ui/checkbox.tsx +1 -1
- package/src/components/ui/dialog.tsx +1 -1
- package/src/components/ui/dropdown-menu.tsx +1 -1
- package/src/components/ui/hazo_ui_tooltip.tsx +1 -1
- package/src/components/ui/input.tsx +1 -1
- package/src/components/ui/label.tsx +1 -1
- package/src/components/ui/separator.tsx +1 -1
- package/src/components/ui/sheet.tsx +1 -1
- package/src/components/ui/sidebar.tsx +8 -8
- package/src/components/ui/skeleton.tsx +1 -1
- package/src/components/ui/switch.tsx +1 -1
- package/src/components/ui/table.tsx +1 -1
- package/src/components/ui/tabs.tsx +1 -1
- package/src/components/ui/tooltip.tsx +1 -1
- package/src/components/ui/vertical-tabs.tsx +1 -1
- package/src/lib/already_logged_in_config.server.ts +1 -1
- package/src/lib/app_logger.ts +1 -1
- package/src/lib/auth/auth_cache.ts +1 -1
- package/src/lib/auth/auth_utils.server.ts +2 -2
- package/src/lib/auth/hazo_get_auth.server.ts +8 -8
- package/src/lib/auth/server_auth.ts +2 -2
- package/src/lib/auth_utility_config.server.ts +1 -1
- package/src/lib/config/config_loader.server.ts +1 -1
- package/src/lib/email_verification_config.server.ts +1 -1
- package/src/lib/file_types_config.server.ts +1 -1
- package/src/lib/forgot_password_config.server.ts +1 -1
- package/src/lib/hazo_connect_instance.server.ts +2 -2
- package/src/lib/hazo_connect_setup.server.ts +2 -2
- package/src/lib/login_config.server.ts +2 -2
- package/src/lib/messages_config.server.ts +1 -1
- package/src/lib/my_settings_config.server.ts +7 -7
- package/src/lib/password_requirements_config.server.ts +1 -1
- package/src/lib/profile_pic_menu_config.server.ts +1 -1
- package/src/lib/profile_picture_config.server.ts +2 -2
- package/src/lib/register_config.server.ts +4 -4
- package/src/lib/reset_password_config.server.ts +3 -3
- package/src/lib/services/email_service.ts +2 -2
- package/src/lib/services/email_verification_service.ts +3 -3
- package/src/lib/services/login_service.ts +3 -3
- package/src/lib/services/password_change_service.ts +3 -3
- package/src/lib/services/password_reset_service.ts +3 -3
- package/src/lib/services/profile_picture_remove_service.ts +3 -3
- package/src/lib/services/profile_picture_service.ts +5 -5
- package/src/lib/services/registration_service.ts +8 -8
- package/src/lib/services/token_service.ts +2 -2
- package/src/lib/services/user_profiles_service.ts +2 -2
- package/src/lib/services/user_update_service.ts +4 -4
- package/src/lib/ui_shell_config.server.ts +1 -1
- package/src/lib/ui_sizes_config.server.ts +1 -1
- package/src/lib/user_fields_config.server.ts +1 -1
- package/src/lib/user_management_config.server.ts +1 -1
- package/src/lib/utils/error_sanitizer.ts +1 -1
- package/src/server/config/config_loader.ts +2 -2
- package/src/server/index.ts +2 -2
- package/src/server/logging/logger_service.ts +1 -1
- package/src/server/server.ts +2 -2
- package/src/server/types/express.d.ts +1 -1
- package/tsconfig.build.json +0 -3
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
// section: imports
|
|
6
6
|
import { useState, useEffect, useCallback } from "react";
|
|
7
|
-
import { Tabs, TabsContent, TabsList, TabsTrigger } from "
|
|
8
|
-
import { use_hazo_auth } from "
|
|
7
|
+
import { Tabs, TabsContent, TabsList, TabsTrigger } from "../../ui/tabs";
|
|
8
|
+
import { use_hazo_auth } from "../shared/hooks/use_hazo_auth";
|
|
9
9
|
import {
|
|
10
10
|
Table,
|
|
11
11
|
TableBody,
|
|
@@ -13,9 +13,9 @@ import {
|
|
|
13
13
|
TableHead,
|
|
14
14
|
TableHeader,
|
|
15
15
|
TableRow,
|
|
16
|
-
} from "
|
|
17
|
-
import { Button } from "
|
|
18
|
-
import { Avatar, AvatarImage, AvatarFallback } from "
|
|
16
|
+
} from "../../ui/table";
|
|
17
|
+
import { Button } from "../../ui/button";
|
|
18
|
+
import { Avatar, AvatarImage, AvatarFallback } from "../../ui/avatar";
|
|
19
19
|
import {
|
|
20
20
|
AlertDialog,
|
|
21
21
|
AlertDialogAction,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
AlertDialogFooter,
|
|
26
26
|
AlertDialogHeader,
|
|
27
27
|
AlertDialogTitle,
|
|
28
|
-
} from "
|
|
28
|
+
} from "../../ui/alert-dialog";
|
|
29
29
|
import {
|
|
30
30
|
Dialog,
|
|
31
31
|
DialogContent,
|
|
@@ -33,13 +33,13 @@ import {
|
|
|
33
33
|
DialogFooter,
|
|
34
34
|
DialogHeader,
|
|
35
35
|
DialogTitle,
|
|
36
|
-
} from "
|
|
37
|
-
import { Input } from "
|
|
38
|
-
import { Label } from "
|
|
39
|
-
import { RolesMatrix } from "
|
|
36
|
+
} from "../../ui/dialog";
|
|
37
|
+
import { Input } from "../../ui/input";
|
|
38
|
+
import { Label } from "../../ui/label";
|
|
39
|
+
import { RolesMatrix } from "./components/roles_matrix";
|
|
40
40
|
import { UserX, KeyRound, Edit, Trash2, Loader2, CircleCheck, CircleX, Plus, UserPlus } from "lucide-react";
|
|
41
41
|
import { toast } from "sonner";
|
|
42
|
-
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "
|
|
42
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../../ui/tooltip";
|
|
43
43
|
|
|
44
44
|
// section: types
|
|
45
45
|
export type UserManagementLayoutProps = {
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import * as React from "react"
|
|
4
4
|
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog"
|
|
5
5
|
|
|
6
|
-
import { cn } from "
|
|
7
|
-
import { buttonVariants } from "
|
|
6
|
+
import { cn } from "../../lib/utils"
|
|
7
|
+
import { buttonVariants } from "./button"
|
|
8
8
|
|
|
9
9
|
const AlertDialog = AlertDialogPrimitive.Root
|
|
10
10
|
|
|
@@ -2,7 +2,7 @@ import * as React from "react"
|
|
|
2
2
|
import { Slot } from "@radix-ui/react-slot"
|
|
3
3
|
import { cva, type VariantProps } from "class-variance-authority"
|
|
4
4
|
|
|
5
|
-
import { cn } from "
|
|
5
|
+
import { cn } from "../../lib/utils"
|
|
6
6
|
|
|
7
7
|
const buttonVariants = cva(
|
|
8
8
|
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
@@ -4,7 +4,7 @@ import * as React from "react"
|
|
|
4
4
|
import * as CheckboxPrimitive from "@radix-ui/react-checkbox"
|
|
5
5
|
import { Check } from "lucide-react"
|
|
6
6
|
|
|
7
|
-
import { cn } from "
|
|
7
|
+
import { cn } from "../../lib/utils"
|
|
8
8
|
|
|
9
9
|
const Checkbox = React.forwardRef<
|
|
10
10
|
React.ElementRef<typeof CheckboxPrimitive.Root>,
|
|
@@ -4,7 +4,7 @@ import * as React from "react"
|
|
|
4
4
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu"
|
|
5
5
|
import { Check, ChevronRight, Circle } from "lucide-react"
|
|
6
6
|
|
|
7
|
-
import { cn } from "
|
|
7
|
+
import { cn } from "../../lib/utils"
|
|
8
8
|
|
|
9
9
|
const DropdownMenu = DropdownMenuPrimitive.Root
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
// section: imports
|
|
6
6
|
import { HelpCircle } from "lucide-react";
|
|
7
|
-
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "
|
|
7
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./tooltip";
|
|
8
8
|
|
|
9
9
|
// section: types
|
|
10
10
|
export type HazoUITooltipProps = {
|
|
@@ -4,7 +4,7 @@ import * as React from "react"
|
|
|
4
4
|
import * as LabelPrimitive from "@radix-ui/react-label"
|
|
5
5
|
import { cva, type VariantProps } from "class-variance-authority"
|
|
6
6
|
|
|
7
|
-
import { cn } from "
|
|
7
|
+
import { cn } from "../../lib/utils"
|
|
8
8
|
|
|
9
9
|
const labelVariants = cva(
|
|
10
10
|
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import * as React from "react"
|
|
4
4
|
import * as SeparatorPrimitive from "@radix-ui/react-separator"
|
|
5
5
|
|
|
6
|
-
import { cn } from "
|
|
6
|
+
import { cn } from "../../lib/utils"
|
|
7
7
|
|
|
8
8
|
const Separator = React.forwardRef<
|
|
9
9
|
React.ElementRef<typeof SeparatorPrimitive.Root>,
|
|
@@ -5,7 +5,7 @@ import * as SheetPrimitive from "@radix-ui/react-dialog"
|
|
|
5
5
|
import { cva, type VariantProps } from "class-variance-authority"
|
|
6
6
|
import { X } from "lucide-react"
|
|
7
7
|
|
|
8
|
-
import { cn } from "
|
|
8
|
+
import { cn } from "../../lib/utils"
|
|
9
9
|
|
|
10
10
|
const Sheet = SheetPrimitive.Root
|
|
11
11
|
|
|
@@ -5,25 +5,25 @@ import { Slot } from "@radix-ui/react-slot"
|
|
|
5
5
|
import { cva, type VariantProps } from "class-variance-authority"
|
|
6
6
|
import { PanelLeft } from "lucide-react"
|
|
7
7
|
|
|
8
|
-
import { useIsMobile } from "
|
|
9
|
-
import { cn } from "
|
|
10
|
-
import { Button } from "
|
|
11
|
-
import { Input } from "
|
|
12
|
-
import { Separator } from "
|
|
8
|
+
import { useIsMobile } from "../../hooks/use-mobile"
|
|
9
|
+
import { cn } from "../../lib/utils"
|
|
10
|
+
import { Button } from "./button"
|
|
11
|
+
import { Input } from "./input"
|
|
12
|
+
import { Separator } from "./separator"
|
|
13
13
|
import {
|
|
14
14
|
Sheet,
|
|
15
15
|
SheetContent,
|
|
16
16
|
SheetDescription,
|
|
17
17
|
SheetHeader,
|
|
18
18
|
SheetTitle,
|
|
19
|
-
} from "
|
|
20
|
-
import { Skeleton } from "
|
|
19
|
+
} from "./sheet"
|
|
20
|
+
import { Skeleton } from "./skeleton"
|
|
21
21
|
import {
|
|
22
22
|
Tooltip,
|
|
23
23
|
TooltipContent,
|
|
24
24
|
TooltipProvider,
|
|
25
25
|
TooltipTrigger,
|
|
26
|
-
} from "
|
|
26
|
+
} from "./tooltip"
|
|
27
27
|
|
|
28
28
|
const SIDEBAR_COOKIE_NAME = "sidebar_state"
|
|
29
29
|
const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// section: imports
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
8
|
-
import { cn } from "
|
|
8
|
+
import { cn } from "../../lib/utils";
|
|
9
9
|
|
|
10
10
|
// section: components
|
|
11
11
|
const VerticalTabs = TabsPrimitive.Root;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// file_description: server-only helper to read already logged in configuration from hazo_auth_config.ini
|
|
2
2
|
// section: imports
|
|
3
|
-
import { get_config_value, get_config_boolean } from "
|
|
3
|
+
import { get_config_value, get_config_boolean } from "./config/config_loader.server";
|
|
4
4
|
|
|
5
5
|
// section: types
|
|
6
6
|
export type AlreadyLoggedInConfig = {
|
package/src/lib/app_logger.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// file_description: client-accessible wrapper for the main app logging service
|
|
2
2
|
// section: imports
|
|
3
|
-
import { create_logger_service } from "
|
|
3
|
+
import { create_logger_service } from "../server/logging/logger_service";
|
|
4
4
|
|
|
5
5
|
// section: constants
|
|
6
6
|
const APP_NAMESPACE = "hazo_auth_ui";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// file_description: server-side authentication utilities for checking login status in API routes
|
|
2
2
|
// section: imports
|
|
3
3
|
import { NextRequest, NextResponse } from "next/server";
|
|
4
|
-
import { get_hazo_connect_instance } from "
|
|
4
|
+
import { get_hazo_connect_instance } from "../hazo_connect_instance.server";
|
|
5
5
|
import { createCrudService } from "hazo_connect/server";
|
|
6
|
-
import { map_db_source_to_ui } from "
|
|
6
|
+
import { map_db_source_to_ui } from "../services/profile_picture_source_mapper";
|
|
7
7
|
|
|
8
8
|
// section: types
|
|
9
9
|
export type AuthUser = {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
// file_description: server-side implementation of hazo_get_auth utility for API routes
|
|
2
2
|
// section: imports
|
|
3
3
|
import { NextRequest } from "next/server";
|
|
4
|
-
import { get_hazo_connect_instance } from "
|
|
4
|
+
import { get_hazo_connect_instance } from "../hazo_connect_instance.server";
|
|
5
5
|
import { createCrudService } from "hazo_connect/server";
|
|
6
|
-
import { create_app_logger } from "
|
|
7
|
-
import { get_filename, get_line_number } from "
|
|
8
|
-
import type { HazoAuthResult, HazoAuthUser, HazoAuthOptions } from "
|
|
9
|
-
import { PermissionError } from "
|
|
10
|
-
import { get_auth_cache } from "
|
|
11
|
-
import { get_rate_limiter } from "
|
|
12
|
-
import { get_auth_utility_config } from "
|
|
6
|
+
import { create_app_logger } from "../app_logger";
|
|
7
|
+
import { get_filename, get_line_number } from "../utils/api_route_helpers";
|
|
8
|
+
import type { HazoAuthResult, HazoAuthUser, HazoAuthOptions } from "./auth_types";
|
|
9
|
+
import { PermissionError } from "./auth_types";
|
|
10
|
+
import { get_auth_cache } from "./auth_cache";
|
|
11
|
+
import { get_rate_limiter } from "./auth_rate_limiter";
|
|
12
|
+
import { get_auth_utility_config } from "../auth_utility_config.server";
|
|
13
13
|
|
|
14
14
|
// section: helpers
|
|
15
15
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// file_description: server-side auth utilities for server components and pages
|
|
2
2
|
// section: imports
|
|
3
3
|
import { cookies } from "next/headers";
|
|
4
|
-
import { get_hazo_connect_instance } from "
|
|
4
|
+
import { get_hazo_connect_instance } from "../hazo_connect_instance.server";
|
|
5
5
|
import { createCrudService } from "hazo_connect/server";
|
|
6
|
-
import { map_db_source_to_ui } from "
|
|
6
|
+
import { map_db_source_to_ui } from "../services/profile_picture_source_mapper";
|
|
7
7
|
|
|
8
8
|
// section: types
|
|
9
9
|
export type ServerAuthUser = {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { HazoConfig } from "hazo_config/dist/lib";
|
|
4
4
|
import path from "path";
|
|
5
5
|
import fs from "fs";
|
|
6
|
-
import { create_app_logger } from "
|
|
6
|
+
import { create_app_logger } from "../app_logger";
|
|
7
7
|
|
|
8
8
|
// section: constants
|
|
9
9
|
const DEFAULT_CONFIG_FILE = "hazo_auth_config.ini";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// file_description: server-only helper to read email verification layout configuration from hazo_auth_config.ini
|
|
2
2
|
// section: imports
|
|
3
|
-
import { get_already_logged_in_config } from "
|
|
3
|
+
import { get_already_logged_in_config } from "./already_logged_in_config.server";
|
|
4
4
|
|
|
5
5
|
// section: types
|
|
6
6
|
export type EmailVerificationConfig = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// file_description: server-only helper to read file type configuration from hazo_auth_config.ini
|
|
2
2
|
// section: imports
|
|
3
|
-
import { get_config_array } from "
|
|
3
|
+
import { get_config_array } from "./config/config_loader.server";
|
|
4
4
|
|
|
5
5
|
// section: types
|
|
6
6
|
export type FileTypesConfig = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// file_description: server-only helper to read forgot password layout configuration from hazo_auth_config.ini
|
|
2
2
|
// section: imports
|
|
3
|
-
import { get_already_logged_in_config } from "
|
|
3
|
+
import { get_already_logged_in_config } from "./already_logged_in_config.server";
|
|
4
4
|
|
|
5
5
|
// section: types
|
|
6
6
|
export type ForgotPasswordConfig = {
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
// section: imports
|
|
6
6
|
import type { HazoConnectAdapter } from "hazo_connect";
|
|
7
7
|
import { getHazoConnectSingleton } from "hazo_connect/nextjs/setup";
|
|
8
|
-
import { create_sqlite_hazo_connect_server, get_hazo_connect_config_options } from "
|
|
8
|
+
import { create_sqlite_hazo_connect_server, get_hazo_connect_config_options } from "./hazo_connect_setup.server";
|
|
9
9
|
import { initializeAdminService, getSqliteAdminService } from "hazo_connect/server";
|
|
10
|
-
import { create_app_logger } from "
|
|
10
|
+
import { create_app_logger } from "./app_logger";
|
|
11
11
|
|
|
12
12
|
// section: singleton_state
|
|
13
13
|
let hazoConnectInstance: HazoConnectAdapter | null = null;
|
|
@@ -6,8 +6,8 @@ import { createHazoConnect } from "hazo_connect/server";
|
|
|
6
6
|
import { HazoConfig } from "hazo_config/dist/lib";
|
|
7
7
|
import path from "path";
|
|
8
8
|
import fs from "fs";
|
|
9
|
-
import { create_app_logger } from "
|
|
10
|
-
import { read_config_section } from "
|
|
9
|
+
import { create_app_logger } from "./app_logger";
|
|
10
|
+
import { read_config_section } from "./config/config_loader.server";
|
|
11
11
|
|
|
12
12
|
// section: helpers
|
|
13
13
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// file_description: server-only helper to read login layout configuration from hazo_auth_config.ini
|
|
2
2
|
// section: imports
|
|
3
|
-
import { get_config_value } from "
|
|
4
|
-
import { get_already_logged_in_config } from "
|
|
3
|
+
import { get_config_value } from "./config/config_loader.server";
|
|
4
|
+
import { get_already_logged_in_config } from "./already_logged_in_config.server";
|
|
5
5
|
|
|
6
6
|
// section: types
|
|
7
7
|
export type LoginConfig = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// file_description: server-only helper to read user-facing messages from hazo_auth_config.ini
|
|
2
2
|
// section: imports
|
|
3
|
-
import { get_config_value } from "
|
|
3
|
+
import { get_config_value } from "./config/config_loader.server";
|
|
4
4
|
|
|
5
5
|
// section: types
|
|
6
6
|
export type MessagesConfig = {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// file_description: server-only helper to read my settings layout configuration from hazo_auth_config.ini
|
|
2
2
|
// section: imports
|
|
3
|
-
import { get_config_value } from "
|
|
4
|
-
import { get_user_fields_config } from "
|
|
5
|
-
import { get_password_requirements_config } from "
|
|
6
|
-
import { get_profile_picture_config } from "
|
|
7
|
-
import { get_messages_config } from "
|
|
8
|
-
import { get_ui_sizes_config } from "
|
|
9
|
-
import { get_file_types_config } from "
|
|
3
|
+
import { get_config_value } from "./config/config_loader.server";
|
|
4
|
+
import { get_user_fields_config } from "./user_fields_config.server";
|
|
5
|
+
import { get_password_requirements_config } from "./password_requirements_config.server";
|
|
6
|
+
import { get_profile_picture_config } from "./profile_picture_config.server";
|
|
7
|
+
import { get_messages_config } from "./messages_config.server";
|
|
8
|
+
import { get_ui_sizes_config } from "./ui_sizes_config.server";
|
|
9
|
+
import { get_file_types_config } from "./file_types_config.server";
|
|
10
10
|
|
|
11
11
|
// section: types
|
|
12
12
|
export type MySettingsConfig = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// file_description: server-only helper to read shared password requirements configuration from hazo_auth_config.ini
|
|
2
2
|
// section: imports
|
|
3
|
-
import { get_config_number, get_config_boolean } from "
|
|
3
|
+
import { get_config_number, get_config_boolean } from "./config/config_loader.server";
|
|
4
4
|
|
|
5
5
|
// section: types
|
|
6
6
|
export type PasswordRequirementsConfig = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// file_description: server-only helper to read profile picture menu configuration from hazo_auth_config.ini
|
|
2
2
|
// section: imports
|
|
3
|
-
import { get_config_value, get_config_boolean, get_config_array } from "
|
|
3
|
+
import { get_config_value, get_config_boolean, get_config_array } from "./config/config_loader.server";
|
|
4
4
|
|
|
5
5
|
// section: types
|
|
6
6
|
// Note: These types are also used in client components, but TypeScript types are erased at runtime
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// file_description: server-only helper to read profile picture configuration from hazo_auth_config.ini
|
|
2
2
|
// section: imports
|
|
3
|
-
import { get_config_boolean, get_config_value, get_config_number, read_config_section } from "
|
|
4
|
-
import { create_app_logger } from "
|
|
3
|
+
import { get_config_boolean, get_config_value, get_config_number, read_config_section } from "./config/config_loader.server";
|
|
4
|
+
import { create_app_logger } from "./app_logger";
|
|
5
5
|
|
|
6
6
|
// section: types
|
|
7
7
|
export type ProfilePictureConfig = {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// file_description: server-only helper to read register layout configuration from hazo_auth_config.ini
|
|
2
2
|
// section: imports
|
|
3
|
-
import { get_config_boolean, get_config_value, read_config_section } from "
|
|
4
|
-
import { get_password_requirements_config } from "
|
|
5
|
-
import { get_already_logged_in_config } from "
|
|
6
|
-
import { get_user_fields_config } from "
|
|
3
|
+
import { get_config_boolean, get_config_value, read_config_section } from "./config/config_loader.server";
|
|
4
|
+
import { get_password_requirements_config } from "./password_requirements_config.server";
|
|
5
|
+
import { get_already_logged_in_config } from "./already_logged_in_config.server";
|
|
6
|
+
import { get_user_fields_config } from "./user_fields_config.server";
|
|
7
7
|
|
|
8
8
|
// section: types
|
|
9
9
|
export type RegisterConfig = {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// file_description: server-only helper to read reset password layout configuration from hazo_auth_config.ini
|
|
2
2
|
// section: imports
|
|
3
|
-
import { get_config_value } from "
|
|
4
|
-
import { get_already_logged_in_config } from "
|
|
5
|
-
import { get_password_requirements_config } from "
|
|
3
|
+
import { get_config_value } from "./config/config_loader.server";
|
|
4
|
+
import { get_already_logged_in_config } from "./already_logged_in_config.server";
|
|
5
|
+
import { get_password_requirements_config } from "./password_requirements_config.server";
|
|
6
6
|
|
|
7
7
|
// section: types
|
|
8
8
|
export type ResetPasswordConfig = {
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
// section: imports
|
|
3
3
|
import fs from "fs";
|
|
4
4
|
import path from "path";
|
|
5
|
-
import { create_app_logger } from "
|
|
6
|
-
import { read_config_section } from "
|
|
5
|
+
import { create_app_logger } from "../app_logger";
|
|
6
|
+
import { read_config_section } from "../config/config_loader.server";
|
|
7
7
|
import type { EmailerConfig, SendEmailOptions } from "hazo_notify";
|
|
8
8
|
|
|
9
9
|
// section: types
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
import type { HazoConnectAdapter } from "hazo_connect";
|
|
4
4
|
import { createCrudService } from "hazo_connect/server";
|
|
5
5
|
import argon2 from "argon2";
|
|
6
|
-
import { create_token } from "
|
|
7
|
-
import { send_template_email } from "
|
|
8
|
-
import { create_app_logger } from "
|
|
6
|
+
import { create_token } from "./token_service";
|
|
7
|
+
import { send_template_email } from "./email_service";
|
|
8
|
+
import { create_app_logger } from "../app_logger";
|
|
9
9
|
|
|
10
10
|
// section: types
|
|
11
11
|
export type EmailVerificationTokenData = {
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
import type { HazoConnectAdapter } from "hazo_connect";
|
|
4
4
|
import { createCrudService } from "hazo_connect/server";
|
|
5
5
|
import argon2 from "argon2";
|
|
6
|
-
import { create_app_logger } from "
|
|
7
|
-
import { sanitize_error_for_user } from "
|
|
8
|
-
import { get_filename, get_line_number } from "
|
|
6
|
+
import { create_app_logger } from "../app_logger";
|
|
7
|
+
import { sanitize_error_for_user } from "../utils/error_sanitizer";
|
|
8
|
+
import { get_filename, get_line_number } from "../utils/api_route_helpers";
|
|
9
9
|
|
|
10
10
|
// section: types
|
|
11
11
|
export type LoginData = {
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
import type { HazoConnectAdapter } from "hazo_connect";
|
|
4
4
|
import { createCrudService } from "hazo_connect/server";
|
|
5
5
|
import argon2 from "argon2";
|
|
6
|
-
import { get_password_requirements_config } from "
|
|
7
|
-
import { send_template_email } from "
|
|
8
|
-
import { create_app_logger } from "
|
|
6
|
+
import { get_password_requirements_config } from "../password_requirements_config.server";
|
|
7
|
+
import { send_template_email } from "./email_service";
|
|
8
|
+
import { create_app_logger } from "../app_logger";
|
|
9
9
|
|
|
10
10
|
// section: types
|
|
11
11
|
export type PasswordChangeData = {
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
// section: imports
|
|
3
3
|
import type { HazoConnectAdapter } from "hazo_connect";
|
|
4
4
|
import { createCrudService } from "hazo_connect/server";
|
|
5
|
-
import { create_token } from "
|
|
5
|
+
import { create_token } from "./token_service";
|
|
6
6
|
import argon2 from "argon2";
|
|
7
|
-
import { create_app_logger } from "
|
|
8
|
-
import { send_template_email } from "
|
|
7
|
+
import { create_app_logger } from "../app_logger";
|
|
8
|
+
import { send_template_email } from "./email_service";
|
|
9
9
|
|
|
10
10
|
// section: types
|
|
11
11
|
export type PasswordResetRequestData = {
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
// section: imports
|
|
3
3
|
import type { HazoConnectAdapter } from "hazo_connect";
|
|
4
4
|
import { createCrudService } from "hazo_connect/server";
|
|
5
|
-
import { map_db_source_to_ui } from "
|
|
6
|
-
import { get_profile_picture_config } from "
|
|
7
|
-
import { create_app_logger } from "
|
|
5
|
+
import { map_db_source_to_ui } from "./profile_picture_source_mapper";
|
|
6
|
+
import { get_profile_picture_config } from "../profile_picture_config.server";
|
|
7
|
+
import { create_app_logger } from "../app_logger";
|
|
8
8
|
import fs from "fs";
|
|
9
9
|
import path from "path";
|
|
10
10
|
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
import type { HazoConnectAdapter } from "hazo_connect";
|
|
4
4
|
import { createCrudService } from "hazo_connect/server";
|
|
5
5
|
import gravatarUrl from "gravatar-url";
|
|
6
|
-
import { get_profile_picture_config } from "
|
|
7
|
-
import { get_ui_sizes_config } from "
|
|
8
|
-
import { get_file_types_config } from "
|
|
9
|
-
import { create_app_logger } from "
|
|
6
|
+
import { get_profile_picture_config } from "../profile_picture_config.server";
|
|
7
|
+
import { get_ui_sizes_config } from "../ui_sizes_config.server";
|
|
8
|
+
import { get_file_types_config } from "../file_types_config.server";
|
|
9
|
+
import { create_app_logger } from "../app_logger";
|
|
10
10
|
import path from "path";
|
|
11
11
|
import fs from "fs";
|
|
12
|
-
import { map_ui_source_to_db, type ProfilePictureSourceUI } from "
|
|
12
|
+
import { map_ui_source_to_db, type ProfilePictureSourceUI } from "./profile_picture_source_mapper";
|
|
13
13
|
|
|
14
14
|
// section: types
|
|
15
15
|
export type ProfilePictureSource = ProfilePictureSourceUI;
|