@m5kdev/web-ui 0.8.6 → 0.8.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/packages/backend/dist/src/modules/auth/auth.dto.d.mts +2 -2
- package/dist/packages/backend/dist/src/modules/billing/billing.repository.d.mts +10 -10
- package/dist/packages/backend/dist/src/modules/billing/billing.service.d.mts +6 -6
- package/dist/src/components/AvatarUpload.mjs +2 -2
- package/dist/src/components/CardsSelect.mjs +1 -1
- package/dist/src/components/CollapsibleSidebarMenuItem.mjs +1 -1
- package/dist/src/components/ColorPicker.d.mts +1 -1
- package/dist/src/components/ColorPicker.mjs +2 -2
- package/dist/src/components/CopyButton.d.mts +1 -1
- package/dist/src/components/CopyButton.mjs +3 -3
- package/dist/src/components/CropDialog.mjs +2 -2
- package/dist/src/components/DialogProvider.d.mts +1 -1
- package/dist/src/components/DialogProvider.mjs +1 -1
- package/dist/src/components/FileDropzone.mjs +1 -1
- package/dist/src/components/MultiSelectDropdown.mjs +1 -1
- package/dist/src/components/PageAlert.mjs +2 -2
- package/dist/src/components/SelectChips.d.mts +1 -1
- package/dist/src/components/SelectChips.mjs +1 -1
- package/dist/src/components/Steps.mjs +1 -1
- package/dist/src/components/TablerIconPicker.d.mts +1 -1
- package/dist/src/components/TablerIconPicker.mjs +1 -1
- package/dist/src/components/mode-toggle.mjs +1 -1
- package/dist/src/components/nav-main.d.mts +1 -1
- package/dist/src/components/nav-main.mjs +1 -1
- package/dist/src/components/pricing-cards.mjs +1 -1
- package/dist/src/components/shared/ButtonCopy.mjs +2 -2
- package/dist/src/components/team-switcher.mjs +1 -1
- package/dist/src/components/ui/alert.d.mts +1 -1
- package/dist/src/components/ui/alert.mjs +1 -1
- package/dist/src/components/ui/badge.d.mts +2 -2
- package/dist/src/components/ui/badge.mjs +1 -1
- package/dist/src/components/ui/breadcrumb.mjs +2 -2
- package/dist/src/components/ui/button.d.mts +1 -1
- package/dist/src/components/ui/button.mjs +1 -1
- package/dist/src/components/ui/checkbox.mjs +1 -1
- package/dist/src/components/ui/dialog.mjs +1 -1
- package/dist/src/components/ui/dropdown-menu.mjs +1 -1
- package/dist/src/components/ui/form.d.mts +1 -1
- package/dist/src/components/ui/form.mjs +1 -1
- package/dist/src/components/ui/label.mjs +1 -1
- package/dist/src/components/ui/pagination.mjs +1 -1
- package/dist/src/components/ui/resizable-navbar.mjs +1 -1
- package/dist/src/components/ui/select.mjs +1 -1
- package/dist/src/components/ui/sheet.d.mts +1 -1
- package/dist/src/components/ui/sheet.mjs +2 -2
- package/dist/src/components/ui/sidebar.mjs +3 -3
- package/dist/src/components/ui/spinner.d.mts +1 -1
- package/dist/src/components/ui/spinner.mjs +1 -1
- package/dist/src/components/ui/toast.mjs +2 -2
- package/dist/src/modules/app/components/AppLoader.d.mts +1 -1
- package/dist/src/modules/app/components/AppLoader.mjs +1 -1
- package/dist/src/modules/app/components/AppSidebarHeader.mjs +4 -4
- package/dist/src/modules/app/components/AppSidebarHeader.mjs.map +1 -1
- package/dist/src/modules/app/components/AppSidebarInvites.mjs +4 -4
- package/dist/src/modules/app/components/AppSidebarInvites.mjs.map +1 -1
- package/dist/src/modules/app/components/AppSidebarUser.mjs +1 -1
- package/dist/src/modules/auth/components/AdminUserManagement.mjs +2 -2
- package/dist/src/modules/auth/components/AdminWaitlist.mjs +2 -2
- package/dist/src/modules/auth/components/AuthProviders.mjs +2 -2
- package/dist/src/modules/auth/components/ClaimAccountRoute.mjs +1 -1
- package/dist/src/modules/auth/components/ErrorAuthRoute.mjs +5 -5
- package/dist/src/modules/auth/components/ErrorAuthRoute.mjs.map +1 -1
- package/dist/src/modules/auth/components/ForgotPasswordForm.mjs +2 -2
- package/dist/src/modules/auth/components/ForgotPasswordRoute.mjs +4 -4
- package/dist/src/modules/auth/components/ForgotPasswordRoute.mjs.map +1 -1
- package/dist/src/modules/auth/components/InviteFriends.mjs +2 -2
- package/dist/src/modules/auth/components/LastUsedBadge.d.mts +1 -1
- package/dist/src/modules/auth/components/LastUsedBadge.mjs +2 -2
- package/dist/src/modules/auth/components/LoginForm.mjs +5 -5
- package/dist/src/modules/auth/components/LoginForm.mjs.map +1 -1
- package/dist/src/modules/auth/components/LoginRoute.mjs +5 -5
- package/dist/src/modules/auth/components/LoginRoute.mjs.map +1 -1
- package/dist/src/modules/auth/components/LogoutRoute.mjs +1 -1
- package/dist/src/modules/auth/components/OrganizationAcceptInvitationRoute.mjs +2 -2
- package/dist/src/modules/auth/components/OrganizationMembersRoute.mjs +3 -3
- package/dist/src/modules/auth/components/OrganizationPreferences.mjs +2 -2
- package/dist/src/modules/auth/components/OrganizationSettingsRoute.mjs +2 -2
- package/dist/src/modules/auth/components/OrganizationSwitcher.mjs +5 -5
- package/dist/src/modules/auth/components/OrganizationSwitcher.mjs.map +1 -1
- package/dist/src/modules/auth/components/PreferencesEditor.mjs +1 -1
- package/dist/src/modules/auth/components/ProfileRoute.mjs +2 -2
- package/dist/src/modules/auth/components/RangeNuqsDatePicker.mjs +2 -2
- package/dist/src/modules/auth/components/ResetPasswordForm.mjs +4 -4
- package/dist/src/modules/auth/components/ResetPasswordForm.mjs.map +1 -1
- package/dist/src/modules/auth/components/ResetPasswordRoute.mjs +4 -4
- package/dist/src/modules/auth/components/ResetPasswordRoute.mjs.map +1 -1
- package/dist/src/modules/auth/components/SignupFormRoute.mjs +2 -2
- package/dist/src/modules/auth/components/SignupRoute.mjs +4 -4
- package/dist/src/modules/auth/components/SignupRoute.mjs.map +1 -1
- package/dist/src/modules/auth/components/UserPreferences.mjs +1 -1
- package/dist/src/modules/auth/components/WaitlistCard.mjs +2 -2
- package/dist/src/modules/auth/components/WaitlistCodeValidation.mjs +2 -2
- package/dist/src/modules/billing/components/BillingBetaPage.mjs +1 -1
- package/dist/src/modules/billing/components/BillingInvoicePage.mjs +2 -2
- package/dist/src/modules/billing/components/BillingSinglePlanSelect.mjs +5 -5
- package/dist/src/modules/billing/components/BillingSinglePlanSelect.mjs.map +1 -1
- package/dist/src/modules/table/components/ColumnOrderAndVisibility.mjs +1 -1
- package/dist/src/modules/table/components/NuqsTable.mjs +2 -2
- package/dist/src/modules/table/components/TableFiltering.mjs +2 -2
- package/package.json +5 -5
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { cn } from "../../lib/utils.mjs";
|
|
2
|
-
import * as React$1 from "react";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
2
|
import { X } from "lucide-react";
|
|
3
|
+
import * as React$1 from "react";
|
|
5
4
|
import { cva } from "class-variance-authority";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
import * as ToastPrimitives from "@radix-ui/react-toast";
|
|
7
7
|
//#region src/components/ui/toast.tsx
|
|
8
8
|
const ToastProvider = ToastPrimitives.Provider;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SpinnerProps } from "@heroui/react";
|
|
2
1
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
import { SpinnerProps } from "@heroui/react";
|
|
3
3
|
|
|
4
4
|
//#region src/modules/app/components/AppLoader.d.ts
|
|
5
5
|
declare function AppLoader(props: SpinnerProps): _$react_jsx_runtime0.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Button } from "@heroui/react";
|
|
2
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
1
|
import { ChevronsLeftIcon, ChevronsRightIcon } from "lucide-react";
|
|
4
|
-
import {
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Link } from "react-router";
|
|
4
|
+
import { Button } from "@heroui/react";
|
|
5
5
|
import { useSidebar } from "@m5kdev/web-ui/components/ui/sidebar";
|
|
6
6
|
import { cn } from "@m5kdev/web-ui/utils";
|
|
7
7
|
//#region src/modules/app/components/AppSidebarHeader.tsx
|
|
@@ -9,7 +9,7 @@ function AppSidebarHeader({ logo, title, size = 30 }) {
|
|
|
9
9
|
const { open, toggleSidebar } = useSidebar();
|
|
10
10
|
return /* @__PURE__ */ jsxs("div", {
|
|
11
11
|
className: cn("flex justify-between items-center overflow-hidden gap-2", open ? "w-[239px] px-2 flex-row" : "w-auto flex-col"),
|
|
12
|
-
children: [/* @__PURE__ */ jsxs(Link
|
|
12
|
+
children: [/* @__PURE__ */ jsxs(Link, {
|
|
13
13
|
to: "/",
|
|
14
14
|
className: cn("flex items-center font-medium overflow-hidden gap-2", open ? "w-[239px] px-2" : "w-auto"),
|
|
15
15
|
style: { height: size },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppSidebarHeader.mjs","names":[
|
|
1
|
+
{"version":3,"file":"AppSidebarHeader.mjs","names":[],"sources":["../../../../../src/modules/app/components/AppSidebarHeader.tsx"],"sourcesContent":["import { Button } from \"@heroui/react\";\r\nimport { useSidebar } from \"@m5kdev/web-ui/components/ui/sidebar\";\r\nimport { cn } from \"@m5kdev/web-ui/utils\";\r\nimport { ChevronsLeftIcon, ChevronsRightIcon } from \"lucide-react\";\r\nimport { Link } from \"react-router\";\r\n\r\nexport function AppSidebarHeader({\r\n logo,\r\n title,\r\n size = 30,\r\n}: {\r\n logo: { src: string; alt: string };\r\n title: string;\r\n size?: number;\r\n}) {\r\n const { open, toggleSidebar } = useSidebar();\r\n return (\r\n <div\r\n className={cn(\r\n \"flex justify-between items-center overflow-hidden gap-2\",\r\n open ? \"w-[239px] px-2 flex-row\" : \"w-auto flex-col\"\r\n )}\r\n >\r\n <Link\r\n to=\"/\"\r\n className={cn(\r\n \"flex items-center font-medium overflow-hidden gap-2\",\r\n open ? \"w-[239px] px-2\" : \"w-auto\"\r\n )}\r\n style={{ height: size }}\r\n >\r\n <img\r\n className=\"shrink-0\"\r\n src={logo.src}\r\n alt={logo.alt}\r\n style={{ width: size, height: size }}\r\n />\r\n <span className=\"group-data-[collapsible=icon]:hidden font-semibold text-lg text-neutral-900\">\r\n {title}\r\n </span>\r\n </Link>\r\n <Button\r\n isIconOnly\r\n variant=\"faded\"\r\n size=\"sm\"\r\n className=\"w-4 h-6\"\r\n onPress={() => toggleSidebar()}\r\n >\r\n {open ? (\r\n <ChevronsLeftIcon className=\"w-4 h-4\" />\r\n ) : (\r\n <ChevronsRightIcon className=\"w-4 h-4\" />\r\n )}\r\n </Button>\r\n </div>\r\n );\r\n}\r\n"],"mappings":";;;;;;;AAMA,SAAgB,iBAAiB,EAC/B,MACA,OACA,OAAO,MAKN;CACD,MAAM,EAAE,MAAM,kBAAkB,YAAY;AAC5C,QACE,qBAAC,OAAD;EACE,WAAW,GACT,4DACA,OAAO,4BAA4B,kBACpC;YAJH,CAME,qBAAC,MAAD;GACE,IAAG;GACH,WAAW,GACT,uDACA,OAAO,mBAAmB,SAC3B;GACD,OAAO,EAAE,QAAQ,MAAM;aANzB,CAQE,oBAAC,OAAD;IACE,WAAU;IACV,KAAK,KAAK;IACV,KAAK,KAAK;IACV,OAAO;KAAE,OAAO;KAAM,QAAQ;KAAM;IACpC,CAAA,EACF,oBAAC,QAAD;IAAM,WAAU;cACb;IACI,CAAA,CACF;MACP,oBAAC,QAAD;GACE,YAAA;GACA,SAAQ;GACR,MAAK;GACL,WAAU;GACV,eAAe,eAAe;aAE7B,OACC,oBAAC,kBAAD,EAAkB,WAAU,WAAY,CAAA,GAExC,oBAAC,mBAAD,EAAmB,WAAU,WAAY,CAAA;GAEpC,CAAA,CACL"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Badge, Button, Tooltip } from "@heroui/react";
|
|
2
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
1
|
import { GiftIcon } from "lucide-react";
|
|
4
2
|
import { useTranslation } from "react-i18next";
|
|
5
|
-
import {
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { Link } from "react-router";
|
|
5
|
+
import { Badge, Button, Tooltip } from "@heroui/react";
|
|
6
6
|
import { useSidebar } from "@m5kdev/web-ui/components/ui/sidebar";
|
|
7
7
|
import { cn } from "@m5kdev/web-ui/utils";
|
|
8
8
|
//#region src/modules/app/components/AppSidebarInvites.tsx
|
|
@@ -22,7 +22,7 @@ function AppSidebarInvites({ count }) {
|
|
|
22
22
|
size: "sm",
|
|
23
23
|
isOneChar: true,
|
|
24
24
|
children: /* @__PURE__ */ jsxs(Button, {
|
|
25
|
-
as: Link
|
|
25
|
+
as: Link,
|
|
26
26
|
to: "/invites",
|
|
27
27
|
className: cn("flex items-center gap-2"),
|
|
28
28
|
isIconOnly: !open,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppSidebarInvites.mjs","names":[
|
|
1
|
+
{"version":3,"file":"AppSidebarInvites.mjs","names":[],"sources":["../../../../../src/modules/app/components/AppSidebarInvites.tsx"],"sourcesContent":["import { Badge, Button, Tooltip } from \"@heroui/react\";\r\nimport { useSidebar } from \"@m5kdev/web-ui/components/ui/sidebar\";\r\nimport { cn } from \"@m5kdev/web-ui/utils\";\r\nimport { GiftIcon } from \"lucide-react\";\r\nimport { useTranslation } from \"react-i18next\";\r\nimport { Link } from \"react-router\";\r\n\r\nexport function AppSidebarInvites({ count }: { count: number }) {\r\n const { open } = useSidebar();\r\n const { t } = useTranslation(\"web-ui\");\r\n return (\r\n <div className={cn(\"flex justify-center w-auto\")}>\r\n <Tooltip content={t(\"sidebar.invites.title\")} placement=\"right\" isDisabled={open}>\r\n <Badge color=\"primary\" variant=\"faded\" content={count} size=\"sm\" isOneChar>\r\n <Button\r\n as={Link}\r\n to=\"/invites\"\r\n className={cn(\"flex items-center gap-2\")}\r\n isIconOnly={!open}\r\n size=\"sm\"\r\n variant=\"light\"\r\n >\r\n <GiftIcon className=\"w-4 h-4 text-neutral-500\" />\r\n <span className=\"group-data-[collapsible=icon]:hidden text-sm text-neutral-500\">\r\n {t(\"sidebar.invites.title\")}\r\n </span>\r\n </Button>\r\n </Badge>\r\n </Tooltip>\r\n </div>\r\n );\r\n}\r\n"],"mappings":";;;;;;;;AAOA,SAAgB,kBAAkB,EAAE,SAA4B;CAC9D,MAAM,EAAE,SAAS,YAAY;CAC7B,MAAM,EAAE,MAAM,eAAe,SAAS;AACtC,QACE,oBAAC,OAAD;EAAK,WAAW,GAAG,6BAA6B;YAC9C,oBAAC,SAAD;GAAS,SAAS,EAAE,wBAAwB;GAAE,WAAU;GAAQ,YAAY;aAC1E,oBAAC,OAAD;IAAO,OAAM;IAAU,SAAQ;IAAQ,SAAS;IAAO,MAAK;IAAK,WAAA;cAC/D,qBAAC,QAAD;KACE,IAAI;KACJ,IAAG;KACH,WAAW,GAAG,0BAA0B;KACxC,YAAY,CAAC;KACb,MAAK;KACL,SAAQ;eANV,CAQE,oBAAC,UAAD,EAAU,WAAU,4BAA6B,CAAA,EACjD,oBAAC,QAAD;MAAM,WAAU;gBACb,EAAE,wBAAwB;MACtB,CAAA,CACA;;IACH,CAAA;GACA,CAAA;EACN,CAAA"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Avatar, AvatarFallback, AvatarImage } from "../../../components/ui/avatar.mjs";
|
|
2
2
|
import { SidebarMenu, SidebarMenuButton, SidebarMenuItem, useSidebar } from "../../../components/ui/sidebar.mjs";
|
|
3
3
|
import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger } from "../../../components/ui/dropdown-menu.mjs";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
4
|
import { Building2, ChevronsUpDown, CreditCard, LogOut, Settings, Sparkles, User } from "lucide-react";
|
|
6
5
|
import { useTranslation } from "react-i18next";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { Link } from "react-router";
|
|
8
8
|
//#region src/modules/app/components/AppSidebarUser.tsx
|
|
9
9
|
function AppSidebarUser({ user, onSignOut, organizationSettingsPath }) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { BarChart3, CalendarClock, ChevronDown, ChevronUp, Copy, Filter, Info, Link2, List, MoreHorizontal, Search, UserPlus, X } from "lucide-react";
|
|
1
2
|
import { useCallback, useEffect, useId, useState } from "react";
|
|
2
|
-
import { Button, Dropdown, DropdownItem, DropdownMenu, DropdownTrigger, Input, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader, Select, SelectItem, Spinner, Table, TableBody, TableCell, TableColumn, TableHeader, TableRow, Tooltip } from "@heroui/react";
|
|
3
3
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
import { BarChart3, CalendarClock, ChevronDown, ChevronUp, Copy, Filter, Info, Link2, List, MoreHorizontal, Search, UserPlus, X } from "lucide-react";
|
|
5
4
|
import { useNavigate } from "react-router";
|
|
5
|
+
import { Button, Dropdown, DropdownItem, DropdownMenu, DropdownTrigger, Input, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader, Select, SelectItem, Spinner, Table, TableBody, TableCell, TableColumn, TableHeader, TableRow, Tooltip } from "@heroui/react";
|
|
6
6
|
import { toast } from "sonner";
|
|
7
7
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
8
8
|
import { authClient } from "@m5kdev/frontend/modules/auth/auth.lib";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { Mail, MoreHorizontal, Search, Trash2, UserPlus, X } from "lucide-react";
|
|
1
2
|
import { useEffect, useId, useState } from "react";
|
|
2
|
-
import { Button, Dropdown, DropdownItem, DropdownMenu, DropdownTrigger, Input, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader, Spinner, Table, TableBody, TableCell, TableColumn, TableHeader, TableRow } from "@heroui/react";
|
|
3
3
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
import {
|
|
4
|
+
import { Button, Dropdown, DropdownItem, DropdownMenu, DropdownTrigger, Input, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader, Spinner, Table, TableBody, TableCell, TableColumn, TableHeader, TableRow } from "@heroui/react";
|
|
5
5
|
import { toast } from "sonner";
|
|
6
6
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
7
7
|
//#region src/modules/auth/components/AdminWaitlist.tsx
|
|
@@ -2,9 +2,9 @@ import { GoogleIcon } from "../../../icons/GoogleIcon.mjs";
|
|
|
2
2
|
import { LinkedInIcon } from "../../../icons/LinkedInIcon.mjs";
|
|
3
3
|
import { MicrosoftIcon } from "../../../icons/MicrosoftIcon.mjs";
|
|
4
4
|
import { LastUsedBadge } from "./LastUsedBadge.mjs";
|
|
5
|
-
import { Button } from "@heroui/react";
|
|
6
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
5
|
import { useTranslation } from "react-i18next";
|
|
6
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { Button } from "@heroui/react";
|
|
8
8
|
import { toast } from "sonner";
|
|
9
9
|
import { authClient } from "@m5kdev/frontend/modules/auth/auth.lib";
|
|
10
10
|
//#region src/modules/auth/components/AuthProviders.tsx
|
|
@@ -2,9 +2,9 @@ import { GoogleIcon } from "../../../icons/GoogleIcon.mjs";
|
|
|
2
2
|
import { LinkedInIcon } from "../../../icons/LinkedInIcon.mjs";
|
|
3
3
|
import { MicrosoftIcon } from "../../../icons/MicrosoftIcon.mjs";
|
|
4
4
|
import { useEffect, useMemo, useState } from "react";
|
|
5
|
-
import { Alert, Button, Card, CardBody, CardHeader, Input } from "@heroui/react";
|
|
6
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
6
|
import { useLocation, useNavigate } from "react-router";
|
|
7
|
+
import { Alert, Button, Card, CardBody, CardHeader, Input } from "@heroui/react";
|
|
8
8
|
import { toast } from "sonner";
|
|
9
9
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
10
10
|
import { useSession } from "@m5kdev/frontend/modules/auth/hooks/useSession";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Button, Card, CardBody, CardHeader } from "@heroui/react";
|
|
2
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
1
|
import { AlertCircle } from "lucide-react";
|
|
4
2
|
import { useTranslation } from "react-i18next";
|
|
5
|
-
import {
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { Link } from "react-router";
|
|
5
|
+
import { Button, Card, CardBody, CardHeader } from "@heroui/react";
|
|
6
6
|
import { useQueryState } from "nuqs";
|
|
7
7
|
//#region src/modules/auth/components/ErrorAuthRoute.tsx
|
|
8
8
|
function ErrorAuthRoute() {
|
|
@@ -109,12 +109,12 @@ function ErrorAuthRoute() {
|
|
|
109
109
|
children: /* @__PURE__ */ jsxs("div", {
|
|
110
110
|
className: "flex flex-col gap-2",
|
|
111
111
|
children: [buttons.includes("login") && /* @__PURE__ */ jsx(Button, {
|
|
112
|
-
as: Link
|
|
112
|
+
as: Link,
|
|
113
113
|
to: "/login",
|
|
114
114
|
variant: "bordered",
|
|
115
115
|
children: t("web-ui:auth.error.backToLogin")
|
|
116
116
|
}), buttons.includes("signup") && /* @__PURE__ */ jsx(Button, {
|
|
117
|
-
as: Link
|
|
117
|
+
as: Link,
|
|
118
118
|
to: "/signup",
|
|
119
119
|
variant: "bordered",
|
|
120
120
|
children: signupLabel || t("web-ui:auth.error.backToSignup")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorAuthRoute.mjs","names":[
|
|
1
|
+
{"version":3,"file":"ErrorAuthRoute.mjs","names":[],"sources":["../../../../../src/modules/auth/components/ErrorAuthRoute.tsx"],"sourcesContent":["import { Button, Card, CardBody, CardHeader } from \"@heroui/react\";\r\nimport { AlertCircle } from \"lucide-react\";\r\nimport { useQueryState } from \"nuqs\";\r\nimport { useTranslation } from \"react-i18next\";\r\nimport { Link } from \"react-router\";\r\n\r\nexport function ErrorAuthRoute() {\r\n const { t } = useTranslation();\r\n const [error] = useQueryState(\"error\");\r\n\r\n const ErrorEnum = {\r\n invalid_callback_request: {\r\n title: \"Invalid callback request\",\r\n description: \"The callback request is invalid. Please try again.\",\r\n buttons: [\"login\", \"signup\"],\r\n signupLabel: null,\r\n },\r\n state_not_found: {\r\n title: \"State not found\",\r\n description: \"The state was not found. Please try again.\",\r\n buttons: [\"login\", \"signup\"],\r\n signupLabel: null,\r\n },\r\n account_already_linked_to_different_user: {\r\n title: \"Account already linked to different user\",\r\n description: \"The account is already linked to a different user. Please try again.\",\r\n buttons: [\"signup\"],\r\n signupLabel: null,\r\n },\r\n \"email_doesn't_match\": {\r\n title: \"Email doesn't match\",\r\n description: \"The email doesn't match. Please try again.\",\r\n buttons: [\"login\", \"signup\"],\r\n signupLabel: null,\r\n },\r\n email_not_found: {\r\n title: \"Email not found\",\r\n description: \"The email was not found. Please try again.\",\r\n buttons: [\"login\", \"signup\"],\r\n signupLabel: null,\r\n },\r\n no_callback_url: {\r\n title: \"No callback URL\",\r\n description: \"The callback URL is not set. Please try again.\",\r\n buttons: [\"login\", \"signup\"],\r\n signupLabel: null,\r\n },\r\n no_code: {\r\n title: \"No code\",\r\n description: \"The code is not set. Please try again.\",\r\n buttons: [\"login\", \"signup\"],\r\n signupLabel: null,\r\n },\r\n oauth_provider_not_found: {\r\n title: \"OAuth provider not found\",\r\n description: \"The OAuth provider was not found. Please try again.\",\r\n buttons: [\"login\", \"signup\"],\r\n signupLabel: null,\r\n },\r\n unable_to_link_account: {\r\n title: \"Unable to link account\",\r\n description: \"The account could not be linked. Please try again.\",\r\n buttons: [\"login\", \"signup\"],\r\n signupLabel: null,\r\n },\r\n unable_to_get_user_info: {\r\n title: \"Unable to get user info\",\r\n description: \"The user info could not be retrieved. Please try again.\",\r\n buttons: [\"login\", \"signup\"],\r\n signupLabel: null,\r\n },\r\n state_mismatch: {\r\n title: \"State mismatch\",\r\n description: \"The state mismatch. Please try again.\",\r\n buttons: [\"login\", \"signup\"],\r\n signupLabel: null,\r\n },\r\n signup_disabled: {\r\n title: \"Signup disabled\",\r\n description:\r\n \"The signup is disabled while we are in beta. Please join the waitlist to be notified when we launch.\",\r\n buttons: [\"signup\"],\r\n signupLabel: \"Join the waitlist\",\r\n },\r\n default: {\r\n title: \"Authentication Failed\",\r\n description: \"We encountered an issue with your authentication request\",\r\n buttons: [\"login\", \"signup\"],\r\n signupLabel: null,\r\n },\r\n };\r\n\r\n const errorData = ErrorEnum[error as keyof typeof ErrorEnum] || ErrorEnum.default;\r\n const { title, description, buttons, signupLabel } = errorData;\r\n\r\n return (\r\n <div className=\"flex flex-col gap-6\">\r\n <Card>\r\n <CardHeader className=\"text-center flex flex-col gap-2 items-center\">\r\n <AlertCircle className=\"w-10 h-10 text-red-500\" />\r\n <p className=\"text-xl font-semibold\">{title}</p>\r\n <p className=\"text-sm text-default-600\">{description}</p>\r\n </CardHeader>\r\n <CardBody className=\"flex flex-col gap-4\">\r\n <div className=\"flex flex-col gap-2\">\r\n {buttons.includes(\"login\") && (\r\n <Button as={Link} to=\"/login\" variant=\"bordered\">\r\n {t(\"web-ui:auth.error.backToLogin\")}\r\n </Button>\r\n )}\r\n {buttons.includes(\"signup\") && (\r\n <Button as={Link} to=\"/signup\" variant=\"bordered\">\r\n {signupLabel || t(\"web-ui:auth.error.backToSignup\")}\r\n </Button>\r\n )}\r\n </div>\r\n </CardBody>\r\n </Card>\r\n </div>\r\n );\r\n}\r\n"],"mappings":";;;;;;;AAMA,SAAgB,iBAAiB;CAC/B,MAAM,EAAE,MAAM,gBAAgB;CAC9B,MAAM,CAAC,SAAS,cAAc,QAAQ;CAEtC,MAAM,YAAY;EAChB,0BAA0B;GACxB,OAAO;GACP,aAAa;GACb,SAAS,CAAC,SAAS,SAAS;GAC5B,aAAa;GACd;EACD,iBAAiB;GACf,OAAO;GACP,aAAa;GACb,SAAS,CAAC,SAAS,SAAS;GAC5B,aAAa;GACd;EACD,0CAA0C;GACxC,OAAO;GACP,aAAa;GACb,SAAS,CAAC,SAAS;GACnB,aAAa;GACd;EACD,uBAAuB;GACrB,OAAO;GACP,aAAa;GACb,SAAS,CAAC,SAAS,SAAS;GAC5B,aAAa;GACd;EACD,iBAAiB;GACf,OAAO;GACP,aAAa;GACb,SAAS,CAAC,SAAS,SAAS;GAC5B,aAAa;GACd;EACD,iBAAiB;GACf,OAAO;GACP,aAAa;GACb,SAAS,CAAC,SAAS,SAAS;GAC5B,aAAa;GACd;EACD,SAAS;GACP,OAAO;GACP,aAAa;GACb,SAAS,CAAC,SAAS,SAAS;GAC5B,aAAa;GACd;EACD,0BAA0B;GACxB,OAAO;GACP,aAAa;GACb,SAAS,CAAC,SAAS,SAAS;GAC5B,aAAa;GACd;EACD,wBAAwB;GACtB,OAAO;GACP,aAAa;GACb,SAAS,CAAC,SAAS,SAAS;GAC5B,aAAa;GACd;EACD,yBAAyB;GACvB,OAAO;GACP,aAAa;GACb,SAAS,CAAC,SAAS,SAAS;GAC5B,aAAa;GACd;EACD,gBAAgB;GACd,OAAO;GACP,aAAa;GACb,SAAS,CAAC,SAAS,SAAS;GAC5B,aAAa;GACd;EACD,iBAAiB;GACf,OAAO;GACP,aACE;GACF,SAAS,CAAC,SAAS;GACnB,aAAa;GACd;EACD,SAAS;GACP,OAAO;GACP,aAAa;GACb,SAAS,CAAC,SAAS,SAAS;GAC5B,aAAa;GACd;EACF;CAGD,MAAM,EAAE,OAAO,aAAa,SAAS,gBADnB,UAAU,UAAoC,UAAU;AAG1E,QACE,oBAAC,OAAD;EAAK,WAAU;YACb,qBAAC,MAAD,EAAA,UAAA,CACE,qBAAC,YAAD;GAAY,WAAU;aAAtB;IACE,oBAAC,aAAD,EAAa,WAAU,0BAA2B,CAAA;IAClD,oBAAC,KAAD;KAAG,WAAU;eAAyB;KAAU,CAAA;IAChD,oBAAC,KAAD;KAAG,WAAU;eAA4B;KAAgB,CAAA;IAC9C;MACb,oBAAC,UAAD;GAAU,WAAU;aAClB,qBAAC,OAAD;IAAK,WAAU;cAAf,CACG,QAAQ,SAAS,QAAQ,IACxB,oBAAC,QAAD;KAAQ,IAAI;KAAM,IAAG;KAAS,SAAQ;eACnC,EAAE,gCAAgC;KAC5B,CAAA,EAEV,QAAQ,SAAS,SAAS,IACzB,oBAAC,QAAD;KAAQ,IAAI;KAAM,IAAG;KAAU,SAAQ;eACpC,eAAe,EAAE,iCAAiC;KAC5C,CAAA,CAEP;;GACG,CAAA,CACN,EAAA,CAAA;EACH,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useState } from "react";
|
|
2
|
-
import { Button, Input } from "@heroui/react";
|
|
3
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
2
|
import { useTranslation } from "react-i18next";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { Button, Input } from "@heroui/react";
|
|
5
5
|
import { toast } from "sonner";
|
|
6
6
|
import { useForm } from "react-hook-form";
|
|
7
7
|
import { authClient } from "@m5kdev/frontend/modules/auth/auth.lib";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ForgotPasswordForm } from "./ForgotPasswordForm.mjs";
|
|
2
|
-
import { Card, CardBody, CardHeader } from "@heroui/react";
|
|
3
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
2
|
import { useTranslation } from "react-i18next";
|
|
5
|
-
import {
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { Link } from "react-router";
|
|
5
|
+
import { Card, CardBody, CardHeader } from "@heroui/react";
|
|
6
6
|
//#region src/modules/auth/components/ForgotPasswordRoute.tsx
|
|
7
7
|
function ForgotPasswordRoute() {
|
|
8
8
|
const { t } = useTranslation();
|
|
@@ -22,7 +22,7 @@ function ForgotPasswordRoute() {
|
|
|
22
22
|
children: [
|
|
23
23
|
t("web-ui:auth.forgotPassword.rememberPassword"),
|
|
24
24
|
" ",
|
|
25
|
-
/* @__PURE__ */ jsx(Link
|
|
25
|
+
/* @__PURE__ */ jsx(Link, {
|
|
26
26
|
to: "/login",
|
|
27
27
|
className: "underline underline-offset-4 hover:text-primary",
|
|
28
28
|
children: t("web-ui:auth.login.button")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ForgotPasswordRoute.mjs","names":[
|
|
1
|
+
{"version":3,"file":"ForgotPasswordRoute.mjs","names":[],"sources":["../../../../../src/modules/auth/components/ForgotPasswordRoute.tsx"],"sourcesContent":["import { Card, CardBody, CardHeader } from \"@heroui/react\";\r\nimport { useTranslation } from \"react-i18next\";\r\nimport { Link } from \"react-router\";\r\nimport { ForgotPasswordForm } from \"./ForgotPasswordForm\";\r\n\r\nexport function ForgotPasswordRoute() {\r\n const { t } = useTranslation();\r\n return (\r\n <div className=\"flex flex-col gap-6\">\r\n <Card>\r\n <CardHeader className=\"text-center flex flex-col gap-1\">\r\n <p className=\"text-xl font-semibold\">{t(\"web-ui:auth.forgotPassword.title\")}</p>\r\n <p className=\"text-sm text-default-600\">{t(\"web-ui:auth.forgotPassword.description\")}</p>\r\n </CardHeader>\r\n <CardBody>\r\n <ForgotPasswordForm />\r\n </CardBody>\r\n </Card>\r\n <div className=\"text-center text-xs text-muted-foreground\">\r\n {t(\"web-ui:auth.forgotPassword.rememberPassword\")}{\" \"}\r\n <Link to=\"/login\" className=\"underline underline-offset-4 hover:text-primary\">\r\n {t(\"web-ui:auth.login.button\")}\r\n </Link>\r\n </div>\r\n </div>\r\n );\r\n}\r\n"],"mappings":";;;;;;AAKA,SAAgB,sBAAsB;CACpC,MAAM,EAAE,MAAM,gBAAgB;AAC9B,QACE,qBAAC,OAAD;EAAK,WAAU;YAAf,CACE,qBAAC,MAAD,EAAA,UAAA,CACE,qBAAC,YAAD;GAAY,WAAU;aAAtB,CACE,oBAAC,KAAD;IAAG,WAAU;cAAyB,EAAE,mCAAmC;IAAK,CAAA,EAChF,oBAAC,KAAD;IAAG,WAAU;cAA4B,EAAE,yCAAyC;IAAK,CAAA,CAC9E;MACb,oBAAC,UAAD,EAAA,UACE,oBAAC,oBAAD,EAAsB,CAAA,EACb,CAAA,CACN,EAAA,CAAA,EACP,qBAAC,OAAD;GAAK,WAAU;aAAf;IACG,EAAE,8CAA8C;IAAE;IACnD,oBAAC,MAAD;KAAM,IAAG;KAAS,WAAU;eACzB,EAAE,2BAA2B;KACzB,CAAA;IACH;KACF"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CopyButton } from "../../../components/CopyButton.mjs";
|
|
2
|
+
import { CheckCircle2, Link2Icon, Mail, Send, Ticket, Users, Zap } from "lucide-react";
|
|
2
3
|
import { useMemo, useState } from "react";
|
|
3
|
-
import { Button, Card, CardBody, CardHeader, Chip, Input } from "@heroui/react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
import {
|
|
5
|
+
import { Button, Card, CardBody, CardHeader, Chip, Input } from "@heroui/react";
|
|
6
6
|
import { toast } from "sonner";
|
|
7
7
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
8
8
|
import { z } from "zod";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _$react from "react";
|
|
2
|
-
import { BadgeProps } from "@heroui/react";
|
|
3
2
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
import { BadgeProps } from "@heroui/react";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/auth/components/LastUsedBadge.d.ts
|
|
6
6
|
declare function LastUsedBadge({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Badge } from "@heroui/react";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
1
|
import { useTranslation } from "react-i18next";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Badge } from "@heroui/react";
|
|
4
4
|
//#region src/modules/auth/components/LastUsedBadge.tsx
|
|
5
5
|
function LastUsedBadge({ lastMethod, method, children, ...props }) {
|
|
6
6
|
const { t } = useTranslation();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { LastUsedBadge } from "./LastUsedBadge.mjs";
|
|
2
2
|
import { AuthProviders } from "./AuthProviders.mjs";
|
|
3
|
-
import { Button, Input } from "@heroui/react";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
3
|
import { useTranslation } from "react-i18next";
|
|
6
|
-
import {
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { Link, useNavigate } from "react-router";
|
|
6
|
+
import { Button, Input } from "@heroui/react";
|
|
7
7
|
import { toast } from "sonner";
|
|
8
8
|
import { useForm } from "react-hook-form";
|
|
9
9
|
import { authClient } from "@m5kdev/frontend/modules/auth/auth.lib";
|
|
@@ -68,7 +68,7 @@ function LoginForm({ providers }) {
|
|
|
68
68
|
htmlFor: "password",
|
|
69
69
|
className: "text-sm font-medium",
|
|
70
70
|
children: t("web-ui:auth.login.password")
|
|
71
|
-
}), /* @__PURE__ */ jsx(Link
|
|
71
|
+
}), /* @__PURE__ */ jsx(Link, {
|
|
72
72
|
to: "/forgot-password",
|
|
73
73
|
className: "ml-auto text-sm underline-offset-4 hover:underline",
|
|
74
74
|
children: t("web-ui:auth.login.forgotPassword")
|
|
@@ -94,7 +94,7 @@ function LoginForm({ providers }) {
|
|
|
94
94
|
children: [
|
|
95
95
|
t("web-ui:auth.login.noAccount"),
|
|
96
96
|
" ",
|
|
97
|
-
/* @__PURE__ */ jsx(Link
|
|
97
|
+
/* @__PURE__ */ jsx(Link, {
|
|
98
98
|
to: "/signup",
|
|
99
99
|
className: "underline underline-offset-4",
|
|
100
100
|
children: t("web-ui:auth.login.signUp")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoginForm.mjs","names":[
|
|
1
|
+
{"version":3,"file":"LoginForm.mjs","names":[],"sources":["../../../../../src/modules/auth/components/LoginForm.tsx"],"sourcesContent":["import { Button, Input } from \"@heroui/react\";\r\nimport { authClient } from \"@m5kdev/frontend/modules/auth/auth.lib\";\r\nimport { useSession } from \"@m5kdev/frontend/modules/auth/hooks/useSession\";\r\nimport { type SubmitHandler, useForm } from \"react-hook-form\";\r\nimport { useTranslation } from \"react-i18next\";\r\nimport { Link, useNavigate } from \"react-router\";\r\nimport { toast } from \"sonner\";\r\nimport { AuthProviders } from \"./AuthProviders\";\r\nimport { LastUsedBadge } from \"./LastUsedBadge\";\r\n\r\ntype Inputs = {\r\n email: string;\r\n password: string;\r\n};\r\n\r\nexport function LoginForm({ providers }: { providers?: string[] }) {\r\n const lastMethod = authClient.getLastUsedLoginMethod();\r\n const { register, handleSubmit } = useForm<Inputs>();\r\n const { registerSession } = useSession();\r\n const navigate = useNavigate();\r\n const { t } = useTranslation();\r\n\r\n const onSubmit: SubmitHandler<Inputs> = (data) => {\r\n console.log(data);\r\n authClient.signIn\r\n .email({\r\n email: data.email,\r\n password: data.password,\r\n })\r\n .then((res) => {\r\n console.log(res);\r\n if (res.data?.user) {\r\n registerSession(() => {\r\n navigate(\"/\");\r\n });\r\n } else if (res.error) {\r\n toast.error(t(\"web-ui:auth.errors.authentication\"), {\r\n description: res.error.message,\r\n });\r\n }\r\n })\r\n .catch((error) => {\r\n toast.error(t(\"web-ui:auth.errors.server\"), {\r\n description: error.message,\r\n });\r\n });\r\n };\r\n\r\n return (\r\n <form onSubmit={handleSubmit(onSubmit)}>\r\n <div className=\"grid gap-6\">\r\n <AuthProviders providers={providers} lastMethod={lastMethod} />\r\n\r\n <div className=\"grid gap-6\">\r\n <div className=\"grid gap-2\">\r\n <LastUsedBadge lastMethod={lastMethod} method=\"email\">\r\n <label htmlFor=\"email\" className=\"text-sm font-medium\">\r\n {t(\"web-ui:auth.login.email\")}\r\n </label>\r\n </LastUsedBadge>\r\n <Input\r\n type=\"email\"\r\n placeholder={t(\"web-ui:auth.login.placeholder.email\")}\r\n variant=\"bordered\"\r\n isRequired\r\n {...register(\"email\", { required: true })}\r\n />\r\n </div>\r\n\r\n <div className=\"grid gap-2\">\r\n <div className=\"flex items-center\">\r\n <label htmlFor=\"password\" className=\"text-sm font-medium\">\r\n {t(\"web-ui:auth.login.password\")}\r\n </label>\r\n <Link\r\n to=\"/forgot-password\"\r\n className=\"ml-auto text-sm underline-offset-4 hover:underline\"\r\n >\r\n {t(\"web-ui:auth.login.forgotPassword\")}\r\n </Link>\r\n </div>\r\n <Input\r\n placeholder={t(\"web-ui:auth.login.password\")}\r\n type=\"password\"\r\n variant=\"bordered\"\r\n isRequired\r\n {...register(\"password\", { required: true })}\r\n />\r\n </div>\r\n <Button type=\"submit\" className=\"w-full\" color=\"primary\">\r\n {t(\"web-ui:auth.login.button\")}\r\n </Button>\r\n </div>\r\n\r\n <div className=\"text-center text-sm\">\r\n {t(\"web-ui:auth.login.noAccount\")}{\" \"}\r\n <Link to=\"/signup\" className=\"underline underline-offset-4\">\r\n {t(\"web-ui:auth.login.signUp\")}\r\n </Link>\r\n </div>\r\n </div>\r\n </form>\r\n );\r\n}\r\n"],"mappings":";;;;;;;;;;;AAeA,SAAgB,UAAU,EAAE,aAAuC;CACjE,MAAM,aAAa,WAAW,wBAAwB;CACtD,MAAM,EAAE,UAAU,iBAAiB,SAAiB;CACpD,MAAM,EAAE,oBAAoB,YAAY;CACxC,MAAM,WAAW,aAAa;CAC9B,MAAM,EAAE,MAAM,gBAAgB;CAE9B,MAAM,YAAmC,SAAS;AAChD,UAAQ,IAAI,KAAK;AACjB,aAAW,OACR,MAAM;GACL,OAAO,KAAK;GACZ,UAAU,KAAK;GAChB,CAAC,CACD,MAAM,QAAQ;AACb,WAAQ,IAAI,IAAI;AAChB,OAAI,IAAI,MAAM,KACZ,uBAAsB;AACpB,aAAS,IAAI;KACb;YACO,IAAI,MACb,OAAM,MAAM,EAAE,oCAAoC,EAAE,EAClD,aAAa,IAAI,MAAM,SACxB,CAAC;IAEJ,CACD,OAAO,UAAU;AAChB,SAAM,MAAM,EAAE,4BAA4B,EAAE,EAC1C,aAAa,MAAM,SACpB,CAAC;IACF;;AAGN,QACE,oBAAC,QAAD;EAAM,UAAU,aAAa,SAAS;YACpC,qBAAC,OAAD;GAAK,WAAU;aAAf;IACE,oBAAC,eAAD;KAA0B;KAAuB;KAAc,CAAA;IAE/D,qBAAC,OAAD;KAAK,WAAU;eAAf;MACE,qBAAC,OAAD;OAAK,WAAU;iBAAf,CACE,oBAAC,eAAD;QAA2B;QAAY,QAAO;kBAC5C,oBAAC,SAAD;SAAO,SAAQ;SAAQ,WAAU;mBAC9B,EAAE,0BAA0B;SACvB,CAAA;QACM,CAAA,EAChB,oBAAC,OAAD;QACE,MAAK;QACL,aAAa,EAAE,sCAAsC;QACrD,SAAQ;QACR,YAAA;QACA,GAAI,SAAS,SAAS,EAAE,UAAU,MAAM,CAAC;QACzC,CAAA,CACE;;MAEN,qBAAC,OAAD;OAAK,WAAU;iBAAf,CACE,qBAAC,OAAD;QAAK,WAAU;kBAAf,CACE,oBAAC,SAAD;SAAO,SAAQ;SAAW,WAAU;mBACjC,EAAE,6BAA6B;SAC1B,CAAA,EACR,oBAAC,MAAD;SACE,IAAG;SACH,WAAU;mBAET,EAAE,mCAAmC;SACjC,CAAA,CACH;WACN,oBAAC,OAAD;QACE,aAAa,EAAE,6BAA6B;QAC5C,MAAK;QACL,SAAQ;QACR,YAAA;QACA,GAAI,SAAS,YAAY,EAAE,UAAU,MAAM,CAAC;QAC5C,CAAA,CACE;;MACN,oBAAC,QAAD;OAAQ,MAAK;OAAS,WAAU;OAAS,OAAM;iBAC5C,EAAE,2BAA2B;OACvB,CAAA;MACL;;IAEN,qBAAC,OAAD;KAAK,WAAU;eAAf;MACG,EAAE,8BAA8B;MAAE;MACnC,oBAAC,MAAD;OAAM,IAAG;OAAU,WAAU;iBAC1B,EAAE,2BAA2B;OACzB,CAAA;MACH;;IACF;;EACD,CAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { LoginForm } from "./LoginForm.mjs";
|
|
2
|
-
import { Card, CardBody, CardHeader } from "@heroui/react";
|
|
3
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
2
|
import { useTranslation } from "react-i18next";
|
|
5
|
-
import {
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { Link } from "react-router";
|
|
5
|
+
import { Card, CardBody, CardHeader } from "@heroui/react";
|
|
6
6
|
//#region src/modules/auth/components/LoginRoute.tsx
|
|
7
7
|
function LoginRoute({ providers }) {
|
|
8
8
|
const { t } = useTranslation();
|
|
@@ -22,14 +22,14 @@ function LoginRoute({ providers }) {
|
|
|
22
22
|
children: [
|
|
23
23
|
t("web-ui:common.byClickingContinue"),
|
|
24
24
|
" ",
|
|
25
|
-
/* @__PURE__ */ jsx(Link
|
|
25
|
+
/* @__PURE__ */ jsx(Link, {
|
|
26
26
|
to: "/terms-of-service",
|
|
27
27
|
children: t("web-ui:common.termsOfService")
|
|
28
28
|
}),
|
|
29
29
|
" ",
|
|
30
30
|
t("web-ui:common.and"),
|
|
31
31
|
" ",
|
|
32
|
-
/* @__PURE__ */ jsx(Link
|
|
32
|
+
/* @__PURE__ */ jsx(Link, {
|
|
33
33
|
to: "/privacy-policy",
|
|
34
34
|
children: t("web-ui:common.privacyPolicy")
|
|
35
35
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoginRoute.mjs","names":[
|
|
1
|
+
{"version":3,"file":"LoginRoute.mjs","names":[],"sources":["../../../../../src/modules/auth/components/LoginRoute.tsx"],"sourcesContent":["import { Card, CardBody, CardHeader } from \"@heroui/react\";\r\nimport { useTranslation } from \"react-i18next\";\r\nimport { Link } from \"react-router\";\r\nimport { LoginForm } from \"./LoginForm\";\r\n\r\nexport function LoginRoute({ providers }: { providers?: string[] }) {\r\n const { t } = useTranslation();\r\n return (\r\n <div className=\"flex flex-col gap-6\">\r\n <Card>\r\n <CardHeader className=\"text-center flex flex-col gap-1\">\r\n <p className=\"text-xl font-semibold\">{t(\"web-ui:auth.login.welcome\")}</p>\r\n <p className=\"text-sm text-default-600\">\r\n {providers\r\n ? t(\"web-ui:auth.login.descriptionWithProviders\")\r\n : t(\"web-ui:auth.login.description\")}\r\n </p>\r\n </CardHeader>\r\n <CardBody>\r\n <LoginForm providers={providers} />\r\n </CardBody>\r\n </Card>\r\n <div className=\"text-balance text-center text-xs text-muted-foreground [&_a]:underline [&_a]:underline-offset-4 [&_a]:hover:text-primary \">\r\n {t(\"web-ui:common.byClickingContinue\")}{\" \"}\r\n <Link to=\"/terms-of-service\">{t(\"web-ui:common.termsOfService\")}</Link>{\" \"}\r\n {t(\"web-ui:common.and\")}{\" \"}\r\n <Link to=\"/privacy-policy\">{t(\"web-ui:common.privacyPolicy\")}</Link>.\r\n </div>\r\n </div>\r\n );\r\n}\r\n"],"mappings":";;;;;;AAKA,SAAgB,WAAW,EAAE,aAAuC;CAClE,MAAM,EAAE,MAAM,gBAAgB;AAC9B,QACE,qBAAC,OAAD;EAAK,WAAU;YAAf,CACE,qBAAC,MAAD,EAAA,UAAA,CACE,qBAAC,YAAD;GAAY,WAAU;aAAtB,CACE,oBAAC,KAAD;IAAG,WAAU;cAAyB,EAAE,4BAA4B;IAAK,CAAA,EACzE,oBAAC,KAAD;IAAG,WAAU;cACV,YACG,EAAE,6CAA6C,GAC/C,EAAE,gCAAgC;IACpC,CAAA,CACO;MACb,oBAAC,UAAD,EAAA,UACE,oBAAC,WAAD,EAAsB,WAAa,CAAA,EAC1B,CAAA,CACN,EAAA,CAAA,EACP,qBAAC,OAAD;GAAK,WAAU;aAAf;IACG,EAAE,mCAAmC;IAAE;IACxC,oBAAC,MAAD;KAAM,IAAG;eAAqB,EAAE,+BAA+B;KAAQ,CAAA;IAAC;IACvE,EAAE,oBAAoB;IAAE;IACzB,oBAAC,MAAD;KAAM,IAAG;eAAmB,EAAE,8BAA8B;KAAQ,CAAA;;IAChE;KACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useEffect } from "react";
|
|
2
|
-
import { Spinner } from "@heroui/react";
|
|
3
2
|
import { jsx } from "react/jsx-runtime";
|
|
4
3
|
import { useNavigate } from "react-router";
|
|
4
|
+
import { Spinner } from "@heroui/react";
|
|
5
5
|
import { authClient } from "@m5kdev/frontend/modules/auth/auth.lib";
|
|
6
6
|
//#region src/modules/auth/components/LogoutRoute.tsx
|
|
7
7
|
function Logout() {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useEffect, useMemo, useState } from "react";
|
|
2
|
-
import { Card, CardBody, CardHeader, Spinner } from "@heroui/react";
|
|
3
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
2
|
import { useTranslation } from "react-i18next";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
4
|
import { useLocation, useNavigate, useSearchParams } from "react-router";
|
|
5
|
+
import { Card, CardBody, CardHeader, Spinner } from "@heroui/react";
|
|
6
6
|
import { toast } from "sonner";
|
|
7
7
|
import { authClient } from "@m5kdev/frontend/modules/auth/auth.lib";
|
|
8
8
|
import { useSession } from "@m5kdev/frontend/modules/auth/hooks/useSession";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
2
|
-
import { Button, Card, CardBody, CardHeader, Chip, Input, Select, SelectItem, Spinner, Table, TableBody, TableCell, TableColumn, TableHeader, TableRow } from "@heroui/react";
|
|
3
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
1
|
import { Copy, Trash2, UserPlus, Users } from "lucide-react";
|
|
2
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
5
3
|
import { useTranslation } from "react-i18next";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { Button, Card, CardBody, CardHeader, Chip, Input, Select, SelectItem, Spinner, Table, TableBody, TableCell, TableColumn, TableHeader, TableRow } from "@heroui/react";
|
|
6
6
|
import { toast } from "sonner";
|
|
7
7
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
8
8
|
import { authClient } from "@m5kdev/frontend/modules/auth/auth.lib";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { PreferencesEditor } from "./PreferencesEditor.mjs";
|
|
2
2
|
import { useCallback, useMemo } from "react";
|
|
3
|
-
import { Card, CardBody, CardHeader } from "@heroui/react";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
3
|
import { useTranslation } from "react-i18next";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { Card, CardBody, CardHeader } from "@heroui/react";
|
|
6
6
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
7
7
|
import { useSession } from "@m5kdev/frontend/modules/auth/hooks/useSession";
|
|
8
8
|
//#region src/modules/auth/components/OrganizationPreferences.tsx
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
2
|
-
import { Button, Card, CardBody, CardHeader, Chip, Input, Spinner, Textarea } from "@heroui/react";
|
|
3
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
2
|
import { useTranslation } from "react-i18next";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { Button, Card, CardBody, CardHeader, Chip, Input, Spinner, Textarea } from "@heroui/react";
|
|
5
5
|
import { toast } from "sonner";
|
|
6
6
|
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
|
7
7
|
import { authClient } from "@m5kdev/frontend/modules/auth/auth.lib";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { cn } from "../../../lib/utils.mjs";
|
|
2
2
|
import { useSidebar } from "../../../components/ui/sidebar.mjs";
|
|
3
|
-
import { useCallback, useMemo, useState } from "react";
|
|
4
|
-
import { Button, Select, SelectItem } from "@heroui/react";
|
|
5
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
3
|
import { Building2 } from "lucide-react";
|
|
4
|
+
import { useCallback, useMemo, useState } from "react";
|
|
7
5
|
import { useTranslation } from "react-i18next";
|
|
8
|
-
import {
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { Link } from "react-router";
|
|
8
|
+
import { Button, Select, SelectItem } from "@heroui/react";
|
|
9
9
|
import { toast } from "sonner";
|
|
10
10
|
import { useQuery } from "@tanstack/react-query";
|
|
11
11
|
import { authClient } from "@m5kdev/frontend/modules/auth/auth.lib";
|
|
@@ -50,7 +50,7 @@ function OrganizationSwitcher({ onInvalidateScopedQueries, managerRoles = ["admi
|
|
|
50
50
|
t
|
|
51
51
|
]);
|
|
52
52
|
if (!open) return /* @__PURE__ */ jsx(Button, {
|
|
53
|
-
as: Link
|
|
53
|
+
as: Link,
|
|
54
54
|
to: canManageOrganization ? managerPath : fallbackPath,
|
|
55
55
|
variant: "light",
|
|
56
56
|
size: "sm",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrganizationSwitcher.mjs","names":[
|
|
1
|
+
{"version":3,"file":"OrganizationSwitcher.mjs","names":[],"sources":["../../../../../src/modules/auth/components/OrganizationSwitcher.tsx"],"sourcesContent":["import { Button, Select, SelectItem } from \"@heroui/react\";\r\nimport { authClient } from \"@m5kdev/frontend/modules/auth/auth.lib\";\r\nimport { useSession } from \"@m5kdev/frontend/modules/auth/hooks/useSession\";\r\nimport { useQuery } from \"@tanstack/react-query\";\r\nimport { Building2 } from \"lucide-react\";\r\nimport { useCallback, useMemo, useState } from \"react\";\r\nimport { useTranslation } from \"react-i18next\";\r\nimport { Link } from \"react-router\";\r\nimport { toast } from \"sonner\";\r\nimport { useSidebar } from \"../../../components/ui/sidebar\";\r\nimport { cn } from \"../../../lib/utils\";\r\n\r\ntype OrganizationOption = {\r\n id: string;\r\n name: string;\r\n slug: string;\r\n};\r\n\r\nexport type OrganizationSwitcherProps = {\r\n onInvalidateScopedQueries?: () => void | Promise<void>;\r\n managerRoles?: string[];\r\n managerPath?: string;\r\n fallbackPath?: string;\r\n};\r\n\r\nexport function OrganizationSwitcher({\r\n onInvalidateScopedQueries,\r\n managerRoles = [\"admin\", \"owner\"],\r\n managerPath = \"/organization/members\",\r\n fallbackPath = \"/\",\r\n}: OrganizationSwitcherProps) {\r\n const { t } = useTranslation();\r\n const { data: session, registerSession } = useSession();\r\n const { open } = useSidebar();\r\n const [isSwitching, setIsSwitching] = useState(false);\r\n const activeOrganizationId = session?.session.activeOrganizationId ?? null;\r\n const activeOrganizationRole =\r\n (session?.session as { activeOrganizationRole?: string } | undefined)?.activeOrganizationRole ??\r\n \"\";\r\n const managerRoleSet = useMemo(() => new Set(managerRoles), [managerRoles]);\r\n const canManageOrganization = managerRoleSet.has(activeOrganizationRole);\r\n\r\n const {\r\n data: organizations = [],\r\n isError,\r\n error,\r\n refetch,\r\n } = useQuery({\r\n queryKey: [\"auth-organization-list\"],\r\n queryFn: async () => {\r\n const { data, error } = await authClient.organization.list();\r\n if (error) {\r\n throw new Error(\r\n error.message ?? t(\"web-ui:organization.switcher.failedToLoadOrganizations\")\r\n );\r\n }\r\n return (data ?? []) as OrganizationOption[];\r\n },\r\n });\r\n\r\n const handleSwitchOrganization = useCallback(\r\n async (organizationId: string) => {\r\n if (!organizationId || organizationId === activeOrganizationId || isSwitching) {\r\n return;\r\n }\r\n\r\n try {\r\n setIsSwitching(true);\r\n const { error } = await authClient.organization.setActive({ organizationId });\r\n if (error) {\r\n throw new Error(\r\n error.message ?? t(\"web-ui:organization.switcher.failedToSwitchOrganization\")\r\n );\r\n }\r\n\r\n registerSession(() => {\r\n void onInvalidateScopedQueries?.();\r\n });\r\n toast.success(t(\"web-ui:organization.switcher.organizationSwitched\"));\r\n } catch (error) {\r\n toast.error(\r\n error instanceof Error\r\n ? error.message\r\n : t(\"web-ui:organization.switcher.failedToSwitchOrganization\")\r\n );\r\n } finally {\r\n setIsSwitching(false);\r\n }\r\n },\r\n [activeOrganizationId, isSwitching, onInvalidateScopedQueries, registerSession, t]\r\n );\r\n\r\n if (!open) {\r\n return (\r\n <Button\r\n as={Link}\r\n to={canManageOrganization ? managerPath : fallbackPath}\r\n variant=\"light\"\r\n size=\"sm\"\r\n isIconOnly\r\n aria-label={t(\"web-ui:organization.switcher.label\")}\r\n >\r\n <Building2 className=\"h-4 w-4\" />\r\n </Button>\r\n );\r\n }\r\n\r\n if (isError) {\r\n return (\r\n <div className=\"mb-4 flex flex-col gap-2\">\r\n <p className=\"text-sm text-destructive\">\r\n {error instanceof Error\r\n ? error.message\r\n : t(\"web-ui:organization.switcher.failedToLoadOrganizations\")}\r\n </p>\r\n <Button size=\"sm\" variant=\"flat\" onPress={() => void refetch()}>\r\n {t(\"web-ui:organization.switcher.retry\")}\r\n </Button>\r\n </div>\r\n );\r\n }\r\n\r\n return (\r\n <div className=\"mb-4\">\r\n <Select\r\n size=\"sm\"\r\n label={t(\"web-ui:organization.switcher.label\")}\r\n selectedKeys={activeOrganizationId ? [activeOrganizationId] : []}\r\n disallowEmptySelection\r\n isDisabled={isSwitching || organizations.length === 0}\r\n onSelectionChange={(keys) => {\r\n const selectedOrganizationId = Array.from(keys as Set<string>)[0];\r\n if (selectedOrganizationId) {\r\n void handleSwitchOrganization(selectedOrganizationId);\r\n }\r\n }}\r\n classNames={{\r\n trigger: cn(\"min-h-10\"),\r\n value: cn(\"text-sm\"),\r\n }}\r\n >\r\n {organizations.map((organization) => (\r\n <SelectItem key={organization.id}>{organization.name}</SelectItem>\r\n ))}\r\n </Select>\r\n </div>\r\n );\r\n}\r\n"],"mappings":";;;;;;;;;;;;;AAyBA,SAAgB,qBAAqB,EACnC,2BACA,eAAe,CAAC,SAAS,QAAQ,EACjC,cAAc,yBACd,eAAe,OACa;CAC5B,MAAM,EAAE,MAAM,gBAAgB;CAC9B,MAAM,EAAE,MAAM,SAAS,oBAAoB,YAAY;CACvD,MAAM,EAAE,SAAS,YAAY;CAC7B,MAAM,CAAC,aAAa,kBAAkB,SAAS,MAAM;CACrD,MAAM,uBAAuB,SAAS,QAAQ,wBAAwB;CACtE,MAAM,0BACH,SAAS,UAA6D,0BACvE;CAEF,MAAM,wBADiB,cAAc,IAAI,IAAI,aAAa,EAAE,CAAC,aAAa,CAAC,CAC9B,IAAI,uBAAuB;CAExE,MAAM,EACJ,MAAM,gBAAgB,EAAE,EACxB,SACA,OACA,YACE,SAAS;EACX,UAAU,CAAC,yBAAyB;EACpC,SAAS,YAAY;GACnB,MAAM,EAAE,MAAM,UAAU,MAAM,WAAW,aAAa,MAAM;AAC5D,OAAI,MACF,OAAM,IAAI,MACR,MAAM,WAAW,EAAE,yDAAyD,CAC7E;AAEH,UAAQ,QAAQ,EAAE;;EAErB,CAAC;CAEF,MAAM,2BAA2B,YAC/B,OAAO,mBAA2B;AAChC,MAAI,CAAC,kBAAkB,mBAAmB,wBAAwB,YAChE;AAGF,MAAI;AACF,kBAAe,KAAK;GACpB,MAAM,EAAE,UAAU,MAAM,WAAW,aAAa,UAAU,EAAE,gBAAgB,CAAC;AAC7E,OAAI,MACF,OAAM,IAAI,MACR,MAAM,WAAW,EAAE,0DAA0D,CAC9E;AAGH,yBAAsB;AACf,iCAA6B;KAClC;AACF,SAAM,QAAQ,EAAE,oDAAoD,CAAC;WAC9D,OAAO;AACd,SAAM,MACJ,iBAAiB,QACb,MAAM,UACN,EAAE,0DAA0D,CACjE;YACO;AACR,kBAAe,MAAM;;IAGzB;EAAC;EAAsB;EAAa;EAA2B;EAAiB;EAAE,CACnF;AAED,KAAI,CAAC,KACH,QACE,oBAAC,QAAD;EACE,IAAI;EACJ,IAAI,wBAAwB,cAAc;EAC1C,SAAQ;EACR,MAAK;EACL,YAAA;EACA,cAAY,EAAE,qCAAqC;YAEnD,oBAAC,WAAD,EAAW,WAAU,WAAY,CAAA;EAC1B,CAAA;AAIb,KAAI,QACF,QACE,qBAAC,OAAD;EAAK,WAAU;YAAf,CACE,oBAAC,KAAD;GAAG,WAAU;aACV,iBAAiB,QACd,MAAM,UACN,EAAE,yDAAyD;GAC7D,CAAA,EACJ,oBAAC,QAAD;GAAQ,MAAK;GAAK,SAAQ;GAAO,eAAe,KAAK,SAAS;aAC3D,EAAE,qCAAqC;GACjC,CAAA,CACL;;AAIV,QACE,oBAAC,OAAD;EAAK,WAAU;YACb,oBAAC,QAAD;GACE,MAAK;GACL,OAAO,EAAE,qCAAqC;GAC9C,cAAc,uBAAuB,CAAC,qBAAqB,GAAG,EAAE;GAChE,wBAAA;GACA,YAAY,eAAe,cAAc,WAAW;GACpD,oBAAoB,SAAS;IAC3B,MAAM,yBAAyB,MAAM,KAAK,KAAoB,CAAC;AAC/D,QAAI,uBACG,0BAAyB,uBAAuB;;GAGzD,YAAY;IACV,SAAS,GAAG,WAAW;IACvB,OAAO,GAAG,UAAU;IACrB;aAEA,cAAc,KAAK,iBAClB,oBAAC,YAAD,EAAA,UAAmC,aAAa,MAAkB,EAAjD,aAAa,GAAoC,CAClE;GACK,CAAA;EACL,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Button, Form, Input, Select, SelectItem, Switch } from "@heroui/react";
|
|
2
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Button, Form, Input, Select, SelectItem, Switch } from "@heroui/react";
|
|
3
3
|
import { toast } from "sonner";
|
|
4
4
|
//#region src/modules/auth/components/PreferencesEditor.tsx
|
|
5
5
|
function PreferencesEditor({ schema, controls, values, isLoading, isPending, labels, updateValues }) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AvatarUpload } from "../../../components/AvatarUpload.mjs";
|
|
2
2
|
import { Form as Form$1, FormControl, FormField, FormItem, FormLabel, FormMessage } from "../../../components/ui/form.mjs";
|
|
3
|
-
import { Button, Card, CardBody, CardHeader, Input } from "@heroui/react";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
3
|
import { useTranslation } from "react-i18next";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { Button, Card, CardBody, CardHeader, Input } from "@heroui/react";
|
|
6
6
|
import { toast } from "sonner";
|
|
7
7
|
import { useForm } from "react-hook-form";
|
|
8
8
|
import { authClient } from "@m5kdev/frontend/modules/auth/auth.lib";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { startTransition, useEffect, useMemo, useState } from "react";
|
|
2
|
-
import { DateRangePicker, Select, SelectItem } from "@heroui/react";
|
|
3
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
2
|
import { useTranslation } from "react-i18next";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { DateRangePicker, Select, SelectItem } from "@heroui/react";
|
|
5
5
|
import { CalendarDate, getLocalTimeZone, today } from "@internationalized/date";
|
|
6
6
|
import { DateTime } from "luxon";
|
|
7
7
|
import { useNuqsQueryParams } from "@m5kdev/frontend/modules/table/hooks/useNuqsQueryParams";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Button, Card, CardBody, CardHeader, Input } from "@heroui/react";
|
|
2
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
1
|
import { useTranslation } from "react-i18next";
|
|
4
|
-
import {
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Link, useSearchParams } from "react-router";
|
|
4
|
+
import { Button, Card, CardBody, CardHeader, Input } from "@heroui/react";
|
|
5
5
|
import { toast } from "sonner";
|
|
6
6
|
import { useForm } from "react-hook-form";
|
|
7
7
|
import { authClient } from "@m5kdev/frontend/modules/auth/auth.lib";
|
|
@@ -86,7 +86,7 @@ function ResetPasswordForm() {
|
|
|
86
86
|
children: [
|
|
87
87
|
t("web-ui:auth.forgotPassword.rememberPassword"),
|
|
88
88
|
" ",
|
|
89
|
-
/* @__PURE__ */ jsx(Link
|
|
89
|
+
/* @__PURE__ */ jsx(Link, {
|
|
90
90
|
to: "/login",
|
|
91
91
|
className: "underline underline-offset-4 hover:text-primary",
|
|
92
92
|
children: t("web-ui:auth.login.button")
|