hazo_auth 1.0.3 → 1.0.5
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 +22 -1
- package/package.json +3 -3
- package/src/app/api/hazo_auth/auth/upload_profile_picture/route.ts +8 -8
- package/src/app/api/hazo_auth/change_password/route.ts +7 -7
- package/src/app/api/hazo_auth/forgot_password/route.ts +4 -4
- package/src/app/api/hazo_auth/get_auth/route.ts +4 -4
- package/src/app/api/hazo_auth/invalidate_cache/route.ts +5 -5
- package/src/app/api/hazo_auth/library_photos/route.ts +3 -3
- package/src/app/api/hazo_auth/login/route.ts +4 -4
- package/src/app/api/hazo_auth/logout/route.ts +4 -4
- package/src/app/api/hazo_auth/me/route.ts +1 -1
- package/src/app/api/hazo_auth/profile_picture/[filename]/route.ts +1 -1
- package/src/app/api/hazo_auth/register/route.ts +4 -4
- package/src/app/api/hazo_auth/remove_profile_picture/route.ts +5 -5
- package/src/app/api/hazo_auth/resend_verification/route.ts +4 -4
- package/src/app/api/hazo_auth/reset_password/route.ts +5 -5
- package/src/app/api/hazo_auth/update_user/route.ts +5 -5
- package/src/app/api/hazo_auth/upload_profile_picture/route.ts +8 -8
- package/src/app/api/hazo_auth/user_management/permissions/route.ts +4 -4
- package/src/app/api/hazo_auth/user_management/roles/route.ts +5 -5
- package/src/app/api/hazo_auth/user_management/users/roles/route.ts +5 -5
- package/src/app/api/hazo_auth/user_management/users/route.ts +6 -6
- package/src/app/api/hazo_auth/validate_reset_token/route.ts +4 -4
- package/src/app/api/hazo_auth/verify_email/route.ts +4 -4
- package/src/app/api/migrations/apply/route.ts +3 -3
- package/src/app/hazo_auth/forgot_password/forgot_password_page_client.tsx +4 -4
- package/src/app/hazo_auth/forgot_password/page.tsx +2 -2
- package/src/app/hazo_auth/login/login_page_client.tsx +5 -5
- package/src/app/hazo_auth/login/page.tsx +2 -2
- package/src/app/hazo_auth/my_settings/my_settings_page_client.tsx +3 -3
- package/src/app/hazo_auth/my_settings/page.tsx +2 -2
- package/src/app/hazo_auth/register/page.tsx +2 -2
- package/src/app/hazo_auth/register/register_page_client.tsx +4 -4
- package/src/app/hazo_auth/reset_password/page.tsx +2 -2
- package/src/app/hazo_auth/reset_password/reset_password_page_client.tsx +4 -4
- package/src/app/hazo_auth/user_management/page.tsx +1 -1
- package/src/app/hazo_auth/user_management/user_management_page_client.tsx +1 -1
- package/src/app/hazo_auth/verify_email/page.tsx +2 -2
- package/src/app/hazo_auth/verify_email/verify_email_page_client.tsx +4 -4
- package/src/app/hazo_connect/api/sqlite/data/route.ts +1 -1
- package/src/app/hazo_connect/api/sqlite/schema/route.ts +1 -1
- package/src/app/hazo_connect/api/sqlite/tables/route.ts +1 -1
- package/src/app/layout.tsx +1 -1
- package/src/app/page.tsx +1 -1
- 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 +4 -4
- 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 +5 -5
- 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/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 +1 -1
- package/src/components/layouts/shared/components/sidebar_layout_wrapper.tsx +3 -3
- 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 +10 -10
- 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/app_logger.ts +1 -1
- package/src/lib/hazo_connect_setup.server.ts +2 -2
- package/src/stories/email_verification_layout.stories.tsx +2 -2
- package/src/stories/forgot_password_layout.stories.tsx +2 -2
- package/src/stories/login_layout.stories.tsx +2 -2
- package/src/stories/register_layout.stories.tsx +2 -2
- package/tsconfig.json +1 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// file_description: reset password layout specific configuration helpers
|
|
2
2
|
// section: imports
|
|
3
|
-
import type { LayoutFieldMap, LayoutFieldMapOverrides } from "
|
|
3
|
+
import type { LayoutFieldMap, LayoutFieldMapOverrides } from "../../shared/config/layout_customization";
|
|
4
4
|
import {
|
|
5
5
|
resolveButtonPalette,
|
|
6
6
|
resolveFieldDefinitions,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
type PasswordRequirementOptions,
|
|
13
13
|
type PasswordRequirementOverrides,
|
|
14
14
|
resolvePasswordRequirements,
|
|
15
|
-
} from "
|
|
15
|
+
} from "../../shared/config/layout_customization";
|
|
16
16
|
|
|
17
17
|
// section: field_identifiers
|
|
18
18
|
export const RESET_PASSWORD_FIELD_IDS = {
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
import { useCallback, useMemo, useState, useEffect } from "react";
|
|
4
4
|
import { useSearchParams, useRouter } from "next/navigation";
|
|
5
5
|
import { toast } from "sonner";
|
|
6
|
-
import type { LayoutDataClient } from "
|
|
7
|
-
import type { PasswordRequirementOptions } from "
|
|
8
|
-
import { RESET_PASSWORD_FIELD_IDS, type ResetPasswordFieldId } from "
|
|
9
|
-
import { validatePassword } from "
|
|
6
|
+
import type { LayoutDataClient } from "../../shared/data/layout_data_client";
|
|
7
|
+
import type { PasswordRequirementOptions } from "../../shared/config/layout_customization";
|
|
8
|
+
import { RESET_PASSWORD_FIELD_IDS, type ResetPasswordFieldId } from "../config/reset_password_field_config";
|
|
9
|
+
import { validatePassword } from "../../shared/utils/validation";
|
|
10
10
|
|
|
11
11
|
// section: constants
|
|
12
12
|
const PASSWORD_FIELDS: Array<ResetPasswordFieldId> = [
|
|
@@ -3,31 +3,31 @@
|
|
|
3
3
|
"use client";
|
|
4
4
|
|
|
5
5
|
// section: imports
|
|
6
|
-
import { PasswordField } from "
|
|
7
|
-
import { FormFieldWrapper } from "
|
|
8
|
-
import { FormHeader } from "
|
|
9
|
-
import { FormActionButtons } from "
|
|
10
|
-
import { TwoColumnAuthLayout } from "
|
|
6
|
+
import { PasswordField } from "../shared/components/password_field";
|
|
7
|
+
import { FormFieldWrapper } from "../shared/components/form_field_wrapper";
|
|
8
|
+
import { FormHeader } from "../shared/components/form_header";
|
|
9
|
+
import { FormActionButtons } from "../shared/components/form_action_buttons";
|
|
10
|
+
import { TwoColumnAuthLayout } from "../shared/components/two_column_auth_layout";
|
|
11
11
|
import { CheckCircle, XCircle, Loader2 } from "lucide-react";
|
|
12
|
-
import { AlreadyLoggedInGuard } from "
|
|
12
|
+
import { AlreadyLoggedInGuard } from "../shared/components/already_logged_in_guard";
|
|
13
13
|
import {
|
|
14
14
|
type ButtonPaletteOverrides,
|
|
15
15
|
type LayoutFieldMapOverrides,
|
|
16
16
|
type LayoutLabelOverrides,
|
|
17
17
|
type PasswordRequirementOverrides,
|
|
18
|
-
} from "
|
|
18
|
+
} from "../shared/config/layout_customization";
|
|
19
19
|
import {
|
|
20
20
|
RESET_PASSWORD_FIELD_IDS,
|
|
21
21
|
createResetPasswordFieldDefinitions,
|
|
22
22
|
resolveResetPasswordButtonPalette,
|
|
23
23
|
resolveResetPasswordLabels,
|
|
24
24
|
resolveResetPasswordPasswordRequirements,
|
|
25
|
-
} from "
|
|
25
|
+
} from "./config/reset_password_field_config";
|
|
26
26
|
import {
|
|
27
27
|
use_reset_password_form,
|
|
28
28
|
type UseResetPasswordFormResult,
|
|
29
|
-
} from "
|
|
30
|
-
import { type LayoutDataClient } from "
|
|
29
|
+
} from "./hooks/use_reset_password_form";
|
|
30
|
+
import { type LayoutDataClient } from "../shared/data/layout_data_client";
|
|
31
31
|
import Link from "next/link";
|
|
32
32
|
|
|
33
33
|
// section: types
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
"use client";
|
|
4
4
|
|
|
5
5
|
// section: imports
|
|
6
|
-
import { use_auth_status } from "
|
|
7
|
-
import { LogoutButton } from "
|
|
8
|
-
import { Button } from "
|
|
9
|
-
import { TwoColumnAuthLayout } from "
|
|
6
|
+
import { use_auth_status } from "../hooks/use_auth_status";
|
|
7
|
+
import { LogoutButton } from "./logout_button";
|
|
8
|
+
import { Button } from "../../../ui/button";
|
|
9
|
+
import { TwoColumnAuthLayout } from "./two_column_auth_layout";
|
|
10
10
|
import { useRouter } from "next/navigation";
|
|
11
11
|
import { Home } from "lucide-react";
|
|
12
12
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// file_description: reusable form action buttons component with submit (positive, left) and cancel (negative, right) buttons
|
|
2
2
|
// section: imports
|
|
3
3
|
import { CircleCheckBig, CircleX } from "lucide-react";
|
|
4
|
-
import { Button } from "
|
|
5
|
-
import type { ButtonPaletteDefaults } from "
|
|
4
|
+
import { Button } from "../../../ui/button";
|
|
5
|
+
import type { ButtonPaletteDefaults } from "../config/layout_customization";
|
|
6
6
|
|
|
7
7
|
// section: types
|
|
8
8
|
type FormActionButtonsProps = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// file_description: reusable wrapper component for form fields that standardizes label, input, and error message structure
|
|
2
2
|
// section: imports
|
|
3
|
-
import { Label } from "
|
|
4
|
-
import { FieldErrorMessage } from "
|
|
3
|
+
import { Label } from "../../../ui/label";
|
|
4
|
+
import { FieldErrorMessage } from "./field_error_message";
|
|
5
5
|
|
|
6
6
|
// section: types
|
|
7
7
|
type FormFieldWrapperProps = {
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
// section: imports
|
|
6
6
|
import { useState } from "react";
|
|
7
7
|
import { useRouter } from "next/navigation";
|
|
8
|
-
import { Button } from "
|
|
8
|
+
import { Button } from "../../../ui/button";
|
|
9
9
|
import { LogOut } from "lucide-react";
|
|
10
10
|
import { toast } from "sonner";
|
|
11
|
-
import { trigger_auth_status_refresh } from "
|
|
11
|
+
import { trigger_auth_status_refresh } from "../hooks/use_auth_status";
|
|
12
12
|
|
|
13
13
|
// section: types
|
|
14
14
|
export type LogoutButtonProps = {
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
// section: imports
|
|
6
6
|
import { Eye, EyeOff } from "lucide-react";
|
|
7
|
-
import { Button } from "
|
|
8
|
-
import { Input } from "
|
|
9
|
-
import { FieldErrorMessage } from "
|
|
7
|
+
import { Button } from "../../../ui/button";
|
|
8
|
+
import { Input } from "../../../ui/input";
|
|
9
|
+
import { FieldErrorMessage } from "./field_error_message";
|
|
10
10
|
|
|
11
11
|
// section: types
|
|
12
12
|
export type PasswordFieldProps = {
|
|
@@ -6,20 +6,20 @@
|
|
|
6
6
|
import { useState, useMemo } from "react";
|
|
7
7
|
import { useRouter } from "next/navigation";
|
|
8
8
|
import Link from "next/link";
|
|
9
|
-
import { Avatar, AvatarImage, AvatarFallback } from "
|
|
10
|
-
import { Button } from "
|
|
9
|
+
import { Avatar, AvatarImage, AvatarFallback } from "../../../ui/avatar";
|
|
10
|
+
import { Button } from "../../../ui/button";
|
|
11
11
|
import {
|
|
12
12
|
DropdownMenu,
|
|
13
13
|
DropdownMenuContent,
|
|
14
14
|
DropdownMenuItem,
|
|
15
15
|
DropdownMenuSeparator,
|
|
16
16
|
DropdownMenuTrigger,
|
|
17
|
-
} from "
|
|
17
|
+
} from "../../../ui/dropdown-menu";
|
|
18
18
|
import { Settings, LogOut } from "lucide-react";
|
|
19
19
|
import { toast } from "sonner";
|
|
20
|
-
import { use_auth_status, trigger_auth_status_refresh } from "
|
|
20
|
+
import { use_auth_status, trigger_auth_status_refresh } from "../hooks/use_auth_status";
|
|
21
21
|
// Type-only import from server file is safe (types are erased at runtime)
|
|
22
|
-
import type { ProfilePicMenuMenuItem } from "
|
|
22
|
+
import type { ProfilePicMenuMenuItem } from "../../../../lib/profile_pic_menu_config.server";
|
|
23
23
|
|
|
24
24
|
// section: types
|
|
25
25
|
export type ProfilePicMenuProps = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// file_description: server wrapper component that loads profile picture menu configuration and passes to client component
|
|
2
2
|
// section: imports
|
|
3
3
|
import { ProfilePicMenu } from "./profile_pic_menu";
|
|
4
|
-
import { get_profile_pic_menu_config } from "
|
|
4
|
+
import { get_profile_pic_menu_config } from "../../../../lib/profile_pic_menu_config.server";
|
|
5
5
|
|
|
6
6
|
// section: types
|
|
7
7
|
export type ProfilePicMenuWrapperProps = {
|
|
@@ -16,10 +16,10 @@ import {
|
|
|
16
16
|
SidebarProvider,
|
|
17
17
|
SidebarTrigger,
|
|
18
18
|
SidebarInset,
|
|
19
|
-
} from "
|
|
19
|
+
} from "../../../ui/sidebar";
|
|
20
20
|
import { LogIn, UserPlus, BookOpen, ExternalLink, Database, KeyRound, MailCheck, Key, Settings, User } from "lucide-react";
|
|
21
|
-
import { use_auth_status } from "
|
|
22
|
-
import { ProfilePicMenu } from "
|
|
21
|
+
import { use_auth_status } from "../hooks/use_auth_status";
|
|
22
|
+
import { ProfilePicMenu } from "./profile_pic_menu";
|
|
23
23
|
|
|
24
24
|
// section: types
|
|
25
25
|
type SidebarLayoutWrapperProps = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// file_description: reusable two-column authentication layout shell that combines visual panel and form content
|
|
2
2
|
// section: imports
|
|
3
|
-
import { VisualPanel } from "
|
|
3
|
+
import { VisualPanel } from "./visual_panel";
|
|
4
4
|
|
|
5
5
|
// section: types
|
|
6
6
|
type TwoColumnAuthLayoutProps = {
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
"use client";
|
|
4
4
|
|
|
5
5
|
// section: imports
|
|
6
|
-
import { use_auth_status } from "
|
|
7
|
-
import { Button } from "
|
|
6
|
+
import { use_auth_status } from "../hooks/use_auth_status";
|
|
7
|
+
import { Button } from "../../../ui/button";
|
|
8
8
|
import { useRouter } from "next/navigation";
|
|
9
9
|
import { LogIn } from "lucide-react";
|
|
10
10
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// file_description: provide shared validation utilities for email and password fields across layout components
|
|
2
2
|
// section: imports
|
|
3
|
-
import type { PasswordRequirementOptions } from "
|
|
3
|
+
import type { PasswordRequirementOptions } from "../config/layout_customization";
|
|
4
4
|
|
|
5
5
|
// section: constants
|
|
6
6
|
const EMAIL_PATTERN = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
// section: imports
|
|
6
6
|
import { useState, useEffect, useMemo } from "react";
|
|
7
|
-
import { Button } from "
|
|
8
|
-
import { Checkbox } from "
|
|
7
|
+
import { Button } from "../../../ui/button";
|
|
8
|
+
import { Checkbox } from "../../../ui/checkbox";
|
|
9
9
|
import {
|
|
10
10
|
Table,
|
|
11
11
|
TableBody,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
TableHead,
|
|
14
14
|
TableHeader,
|
|
15
15
|
TableRow,
|
|
16
|
-
} from "
|
|
16
|
+
} from "../../../ui/table";
|
|
17
17
|
import {
|
|
18
18
|
Dialog,
|
|
19
19
|
DialogContent,
|
|
@@ -21,12 +21,12 @@ import {
|
|
|
21
21
|
DialogFooter,
|
|
22
22
|
DialogHeader,
|
|
23
23
|
DialogTitle,
|
|
24
|
-
} from "
|
|
25
|
-
import { Input } from "
|
|
26
|
-
import { Label } from "
|
|
24
|
+
} from "../../../ui/dialog";
|
|
25
|
+
import { Input } from "../../../ui/input";
|
|
26
|
+
import { Label } from "../../../ui/label";
|
|
27
27
|
import { Plus, Save, Loader2, CircleCheck, CircleX } from "lucide-react";
|
|
28
28
|
import { toast } from "sonner";
|
|
29
|
-
import { Avatar, AvatarImage, AvatarFallback } from "
|
|
29
|
+
import { Avatar, AvatarImage, AvatarFallback } from "../../../ui/avatar";
|
|
30
30
|
|
|
31
31
|
// section: types
|
|
32
32
|
export type RolesMatrixData = {
|
|
@@ -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 "
|
|
36
|
+
} from "../../ui/dialog";
|
|
37
|
+
import { Input } from "../../ui/input";
|
|
38
|
+
import { Label } from "../../ui/label";
|
|
39
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"
|
|
@@ -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
|
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";
|
|
@@ -166,8 +166,8 @@ export function get_hazo_connect_config_options(): {
|
|
|
166
166
|
sqlitePath?: string;
|
|
167
167
|
enableAdminUi?: boolean;
|
|
168
168
|
readOnly?: boolean;
|
|
169
|
-
|
|
170
|
-
|
|
169
|
+
baseUrl?: string;
|
|
170
|
+
apiKey?: string;
|
|
171
171
|
} {
|
|
172
172
|
const config = get_hazo_connect_config();
|
|
173
173
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// file_description: showcase the email_verification_layout component within storybook for review and testing
|
|
2
2
|
// section: imports
|
|
3
3
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
4
|
-
import EmailVerificationLayout from "
|
|
5
|
-
import { createLayoutDataClient } from "
|
|
4
|
+
import EmailVerificationLayout from "../components/layouts/email_verification";
|
|
5
|
+
import { createLayoutDataClient } from "../components/layouts/shared/data/layout_data_client";
|
|
6
6
|
|
|
7
7
|
// section: metadata
|
|
8
8
|
const meta: Meta<typeof EmailVerificationLayout> = {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// file_description: showcase the forgot_password_layout component within storybook for review and testing
|
|
2
2
|
// section: imports
|
|
3
3
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
4
|
-
import ForgotPasswordLayout from "
|
|
5
|
-
import { createLayoutDataClient } from "
|
|
4
|
+
import ForgotPasswordLayout from "../components/layouts/forgot_password";
|
|
5
|
+
import { createLayoutDataClient } from "../components/layouts/shared/data/layout_data_client";
|
|
6
6
|
|
|
7
7
|
// section: metadata
|
|
8
8
|
const meta: Meta<typeof ForgotPasswordLayout> = {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// file_description: showcase the login_layout component within storybook for review and testing
|
|
2
2
|
// section: imports
|
|
3
3
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
4
|
-
import LoginLayout from "
|
|
5
|
-
import { createLayoutDataClient } from "
|
|
4
|
+
import LoginLayout from "../components/layouts/login";
|
|
5
|
+
import { createLayoutDataClient } from "../components/layouts/shared/data/layout_data_client";
|
|
6
6
|
|
|
7
7
|
// section: metadata
|
|
8
8
|
const meta: Meta<typeof LoginLayout> = {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// file_description: showcase the register_layout component within storybook for review and testing
|
|
2
2
|
// section: imports
|
|
3
3
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
4
|
-
import RegisterLayout from "
|
|
5
|
-
import { createLayoutDataClient } from "
|
|
4
|
+
import RegisterLayout from "../components/layouts/register";
|
|
5
|
+
import { createLayoutDataClient } from "../components/layouts/shared/data/layout_data_client";
|
|
6
6
|
|
|
7
7
|
// section: metadata
|
|
8
8
|
const meta: Meta<typeof RegisterLayout> = {
|