@m5kdev/web-ui 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/animations/card.motion.d.ts +7 -2
- package/dist/src/animations/card.motion.js +25 -6
- package/dist/src/animations/card.motion.js.map +1 -0
- package/dist/src/components/AvatarUpload.d.ts +14 -5
- package/dist/src/components/AvatarUpload.js +105 -63
- package/dist/src/components/AvatarUpload.js.map +1 -0
- package/dist/src/components/Button.d.ts +14 -4
- package/dist/src/components/Button.js +13 -4
- package/dist/src/components/Button.js.map +1 -0
- package/dist/src/components/Calendar.d.ts +33 -31
- package/dist/src/components/Calendar.js +14 -6
- package/dist/src/components/Calendar.js.map +1 -0
- package/dist/src/components/{Calendar.css → Calendar2.css} +757 -684
- package/dist/src/components/CardsSelect.d.ts +25 -21
- package/dist/src/components/CardsSelect.js +75 -42
- package/dist/src/components/CardsSelect.js.map +1 -0
- package/dist/src/components/CollapsibleSidebarMenuItem.d.ts +22 -9
- package/dist/src/components/CollapsibleSidebarMenuItem.js +31 -8
- package/dist/src/components/CollapsibleSidebarMenuItem.js.map +1 -0
- package/dist/src/components/ColorPicker.d.ts +15 -4
- package/dist/src/components/ColorPicker.js +46 -16
- package/dist/src/components/ColorPicker.js.map +1 -0
- package/dist/src/components/CopyButton.d.ts +18 -6
- package/dist/src/components/CopyButton.js +28 -19
- package/dist/src/components/CopyButton.js.map +1 -0
- package/dist/src/components/CropDialog.d.ts +20 -8
- package/dist/src/components/CropDialog.js +108 -62
- package/dist/src/components/CropDialog.js.map +1 -0
- package/dist/src/components/DialogProvider.d.ts +22 -14
- package/dist/src/components/DialogProvider.js +67 -45
- package/dist/src/components/DialogProvider.js.map +1 -0
- package/dist/src/components/ErrorFallback.d.ts +13 -4
- package/dist/src/components/ErrorFallback.js +29 -4
- package/dist/src/components/ErrorFallback.js.map +1 -0
- package/dist/src/components/FileDropzone.d.ts +12 -4
- package/dist/src/components/FileDropzone.js +98 -60
- package/dist/src/components/FileDropzone.js.map +1 -0
- package/dist/src/components/MultiSelectDropdown.d.ts +25 -22
- package/dist/src/components/MultiSelectDropdown.js +99 -49
- package/dist/src/components/MultiSelectDropdown.js.map +1 -0
- package/dist/src/components/Orb.d.ts +17 -6
- package/dist/src/components/Orb.js +263 -255
- package/dist/src/components/Orb.js.map +1 -0
- package/dist/src/components/PageAlert.d.ts +20 -15
- package/dist/src/components/PageAlert.js +67 -39
- package/dist/src/components/PageAlert.js.map +1 -0
- package/dist/src/components/SelectChips.d.ts +21 -10
- package/dist/src/components/SelectChips.js +21 -9
- package/dist/src/components/SelectChips.js.map +1 -0
- package/dist/src/components/SidebarItem.d.ts +18 -7
- package/dist/src/components/SidebarItem.js +16 -4
- package/dist/src/components/SidebarItem.js.map +1 -0
- package/dist/src/components/Steps.d.ts +21 -16
- package/dist/src/components/Steps.js +193 -27
- package/dist/src/components/Steps.js.map +1 -0
- package/dist/src/components/TablerIconPicker.d.ts +13 -2
- package/dist/src/components/TablerIconPicker.js +4254 -4234
- package/dist/src/components/TablerIconPicker.js.map +1 -0
- package/dist/src/components/app-header.d.ts +14 -6
- package/dist/src/components/app-header.js +27 -6
- package/dist/src/components/app-header.js.map +1 -0
- package/dist/src/components/blur-card.d.ts +25 -11
- package/dist/src/components/blur-card.js +134 -31
- package/dist/src/components/blur-card.js.map +1 -0
- package/dist/src/components/features-section-demo-1.d.ts +22 -6
- package/dist/src/components/features-section-demo-1.js +119 -47
- package/dist/src/components/features-section-demo-1.js.map +1 -0
- package/dist/src/components/features-section-demo-2.d.ts +7 -1
- package/dist/src/components/features-section-demo-2.js +80 -49
- package/dist/src/components/features-section-demo-2.js.map +1 -0
- package/dist/src/components/features-section-demo-3.d.ts +16 -8
- package/dist/src/components/features-section-demo-3.js +239 -103
- package/dist/src/components/features-section-demo-3.js.map +1 -0
- package/dist/src/components/mode-toggle.d.ts +7 -1
- package/dist/src/components/mode-toggle.js +42 -7
- package/dist/src/components/mode-toggle.js.map +1 -0
- package/dist/src/components/nav-main.d.ts +20 -12
- package/dist/src/components/nav-main.js +31 -5
- package/dist/src/components/nav-main.js.map +1 -0
- package/dist/src/components/pricing-cards.d.ts +7 -1
- package/dist/src/components/pricing-cards.js +125 -24
- package/dist/src/components/pricing-cards.js.map +1 -0
- package/dist/src/components/shared/ButtonCopy.d.ts +17 -6
- package/dist/src/components/shared/ButtonCopy.js +31 -20
- package/dist/src/components/shared/ButtonCopy.js.map +1 -0
- package/dist/src/components/team-switcher.d.ts +16 -8
- package/dist/src/components/team-switcher.js +70 -8
- package/dist/src/components/team-switcher.js.map +1 -0
- package/dist/src/components/theme-provider.d.ts +18 -8
- package/dist/src/components/theme-provider.js +42 -38
- package/dist/src/components/theme-provider.js.map +1 -0
- package/dist/src/components/typewriter.d.ts +35 -14
- package/dist/src/components/typewriter.js +45 -36
- package/dist/src/components/typewriter.js.map +1 -0
- package/dist/src/components/ui/alert-dialog.d.ts +48 -13
- package/dist/src/components/ui/alert-dialog.js +58 -15
- package/dist/src/components/ui/alert-dialog.js.map +1 -0
- package/dist/src/components/ui/alert.d.ts +24 -8
- package/dist/src/components/ui/alert.js +28 -15
- package/dist/src/components/ui/alert.js.map +1 -0
- package/dist/src/components/ui/avatar.d.ts +9 -5
- package/dist/src/components/ui/avatar.js +23 -7
- package/dist/src/components/ui/avatar.js.map +1 -0
- package/dist/src/components/ui/badge.d.ts +17 -8
- package/dist/src/components/ui/badge.js +17 -14
- package/dist/src/components/ui/badge.js.map +1 -0
- package/dist/src/components/ui/bento-grid.d.ts +26 -11
- package/dist/src/components/ui/bento-grid.js +30 -6
- package/dist/src/components/ui/bento-grid.js.map +1 -0
- package/dist/src/components/ui/bento-grid2.d.ts +30 -14
- package/dist/src/components/ui/bento-grid2.js +45 -9
- package/dist/src/components/ui/bento-grid2.js.map +1 -0
- package/dist/src/components/ui/breadcrumb.d.ts +27 -15
- package/dist/src/components/ui/breadcrumb.js +54 -14
- package/dist/src/components/ui/breadcrumb.js.map +1 -0
- package/dist/src/components/ui/button.d.ts +14 -9
- package/dist/src/components/ui/button.js +37 -26
- package/dist/src/components/ui/button.js.map +1 -0
- package/dist/src/components/ui/card.d.ts +12 -8
- package/dist/src/components/ui/card.js +38 -10
- package/dist/src/components/ui/card.js.map +1 -0
- package/dist/src/components/ui/checkbox.d.ts +6 -2
- package/dist/src/components/ui/checkbox.js +17 -5
- package/dist/src/components/ui/checkbox.js.map +1 -0
- package/dist/src/components/ui/collapsible.d.ts +9 -4
- package/dist/src/components/ui/collapsible.js +5 -1
- package/dist/src/components/ui/collapsible.js.map +1 -0
- package/dist/src/components/ui/dialog.d.ts +44 -12
- package/dist/src/components/ui/dialog.js +64 -14
- package/dist/src/components/ui/dialog.js.map +1 -0
- package/dist/src/components/ui/dropdown-menu.d.ts +32 -24
- package/dist/src/components/ui/dropdown-menu.js +64 -14
- package/dist/src/components/ui/dropdown-menu.js.map +1 -0
- package/dist/src/components/ui/floating-navbar.d.ts +18 -9
- package/dist/src/components/ui/floating-navbar.js +49 -35
- package/dist/src/components/ui/floating-navbar.js.map +1 -0
- package/dist/src/components/ui/form.d.ts +30 -21
- package/dist/src/components/ui/form.js +76 -44
- package/dist/src/components/ui/form.js.map +1 -0
- package/dist/src/components/ui/image.d.ts +6 -2
- package/dist/src/components/ui/image.js +51 -11
- package/dist/src/components/ui/image.js.map +1 -0
- package/dist/src/components/ui/input.d.ts +6 -2
- package/dist/src/components/ui/input.js +14 -5
- package/dist/src/components/ui/input.js.map +1 -0
- package/dist/src/components/ui/label.d.ts +8 -3
- package/dist/src/components/ui/label.js +13 -5
- package/dist/src/components/ui/label.js.map +1 -0
- package/dist/src/components/ui/pagination.d.ts +39 -12
- package/dist/src/components/ui/pagination.js +64 -14
- package/dist/src/components/ui/pagination.js.map +1 -0
- package/dist/src/components/ui/progress.d.ts +6 -2
- package/dist/src/components/ui/progress.js +16 -4
- package/dist/src/components/ui/progress.js.map +1 -0
- package/dist/src/components/ui/resizable-navbar.d.ts +84 -43
- package/dist/src/components/ui/resizable-navbar.js +126 -74
- package/dist/src/components/ui/resizable-navbar.js.map +1 -0
- package/dist/src/components/ui/segment-control.d.ts +10 -7
- package/dist/src/components/ui/segment-control.js +83 -38
- package/dist/src/components/ui/segment-control.js.map +1 -0
- package/dist/src/components/ui/select.d.ts +16 -12
- package/dist/src/components/ui/select.js +63 -14
- package/dist/src/components/ui/select.js.map +1 -0
- package/dist/src/components/ui/separator.d.ts +6 -2
- package/dist/src/components/ui/separator.js +14 -4
- package/dist/src/components/ui/separator.js.map +1 -0
- package/dist/src/components/ui/sheet.d.ts +30 -19
- package/dist/src/components/ui/sheet.js +52 -23
- package/dist/src/components/ui/sheet.js.map +1 -0
- package/dist/src/components/ui/sidebar.d.ts +69 -62
- package/dist/src/components/ui/sidebar.js +326 -171
- package/dist/src/components/ui/sidebar.js.map +1 -0
- package/dist/src/components/ui/skeleton.d.ts +9 -1
- package/dist/src/components/ui/skeleton.js +10 -3
- package/dist/src/components/ui/skeleton.js.map +1 -0
- package/dist/src/components/ui/slider.d.ts +6 -2
- package/dist/src/components/ui/slider.js +16 -4
- package/dist/src/components/ui/slider.js.map +1 -0
- package/dist/src/components/ui/sonner.d.ts +10 -3
- package/dist/src/components/ui/sonner.js +18 -11
- package/dist/src/components/ui/sonner.js.map +1 -0
- package/dist/src/components/ui/spinner.d.ts +21 -10
- package/dist/src/components/ui/spinner.js +24 -24
- package/dist/src/components/ui/spinner.js.map +1 -0
- package/dist/src/components/ui/switch.d.ts +6 -2
- package/dist/src/components/ui/switch.js +13 -4
- package/dist/src/components/ui/switch.js.map +1 -0
- package/dist/src/components/ui/table.d.ts +39 -10
- package/dist/src/components/ui/table.js +51 -11
- package/dist/src/components/ui/table.js.map +1 -0
- package/dist/src/components/ui/tabs.d.ts +23 -6
- package/dist/src/components/ui/tabs.js +27 -7
- package/dist/src/components/ui/tabs.js.map +1 -0
- package/dist/src/components/ui/textarea.d.ts +10 -2
- package/dist/src/components/ui/textarea.js +11 -3
- package/dist/src/components/ui/textarea.js.map +1 -0
- package/dist/src/components/ui/timeline.d.ts +16 -9
- package/dist/src/components/ui/timeline.js +87 -24
- package/dist/src/components/ui/timeline.js.map +1 -0
- package/dist/src/components/ui/toast.d.ts +19 -14
- package/dist/src/components/ui/toast.js +48 -22
- package/dist/src/components/ui/toast.js.map +1 -0
- package/dist/src/components/ui/tooltip.d.ts +23 -6
- package/dist/src/components/ui/tooltip.js +27 -7
- package/dist/src/components/ui/tooltip.js.map +1 -0
- package/dist/src/components/ui/typewriter-effect.d.ts +28 -14
- package/dist/src/components/ui/typewriter-effect.js +102 -72
- package/dist/src/components/ui/typewriter-effect.js.map +1 -0
- package/dist/src/hooks/use-mobile.d.ts +5 -1
- package/dist/src/hooks/use-mobile.js +18 -13
- package/dist/src/hooks/use-mobile.js.map +1 -0
- package/dist/src/hooks/useDialog.d.ts +8 -4
- package/dist/src/hooks/useDialog.js +24 -20
- package/dist/src/hooks/useDialog.js.map +1 -0
- package/dist/src/icons/GoogleIcon.d.ts +9 -5
- package/dist/src/icons/GoogleIcon.js +32 -3
- package/dist/src/icons/GoogleIcon.js.map +1 -0
- package/dist/src/icons/LinkedInIcon.d.ts +9 -5
- package/dist/src/icons/LinkedInIcon.js +27 -3
- package/dist/src/icons/LinkedInIcon.js.map +1 -0
- package/dist/src/icons/MicrosoftIcon.d.ts +9 -5
- package/dist/src/icons/MicrosoftIcon.js +31 -3
- package/dist/src/icons/MicrosoftIcon.js.map +1 -0
- package/dist/src/lib/chatwoot.d.ts +19 -10
- package/dist/src/lib/chatwoot.js +25 -27
- package/dist/src/lib/chatwoot.js.map +1 -0
- package/dist/src/lib/utils.d.ts +7 -2
- package/dist/src/lib/utils.js +7 -2
- package/dist/src/lib/utils.js.map +1 -0
- package/dist/src/modules/app/components/AppLoader.d.ts +8 -2
- package/dist/src/modules/app/components/AppLoader.js +14 -3
- package/dist/src/modules/app/components/AppLoader.js.map +1 -0
- package/dist/src/modules/app/components/AppShell.d.ts +15 -6
- package/dist/src/modules/app/components/AppShell.js +14 -5
- package/dist/src/modules/app/components/AppShell.js.map +1 -0
- package/dist/src/modules/app/components/AppSidebar.d.ts +16 -6
- package/dist/src/modules/app/components/AppSidebar.js +17 -4
- package/dist/src/modules/app/components/AppSidebar.js.map +1 -0
- package/dist/src/modules/app/components/AppSidebarContent.d.ts +22 -13
- package/dist/src/modules/app/components/AppSidebarContent.js +34 -5
- package/dist/src/modules/app/components/AppSidebarContent.js.map +1 -0
- package/dist/src/modules/app/components/AppSidebarHeader.d.ts +18 -8
- package/dist/src/modules/app/components/AppSidebarHeader.js +37 -6
- package/dist/src/modules/app/components/AppSidebarHeader.js.map +1 -0
- package/dist/src/modules/app/components/AppSidebarInvites.d.ts +11 -3
- package/dist/src/modules/app/components/AppSidebarInvites.js +39 -8
- package/dist/src/modules/app/components/AppSidebarInvites.js.map +1 -0
- package/dist/src/modules/app/components/AppSidebarUser.d.ts +20 -10
- package/dist/src/modules/app/components/AppSidebarUser.js +121 -12
- package/dist/src/modules/app/components/AppSidebarUser.js.map +1 -0
- package/dist/src/modules/auth/components/AdminUserManagement.d.ts +11 -4
- package/dist/src/modules/auth/components/AdminUserManagement.js +970 -418
- package/dist/src/modules/auth/components/AdminUserManagement.js.map +1 -0
- package/dist/src/modules/auth/components/AdminWaitlist.d.ts +11 -4
- package/dist/src/modules/auth/components/AdminWaitlist.js +284 -115
- package/dist/src/modules/auth/components/AdminWaitlist.js.map +1 -0
- package/dist/src/modules/auth/components/AuthLayout.d.ts +12 -4
- package/dist/src/modules/auth/components/AuthLayout.js +17 -3
- package/dist/src/modules/auth/components/AuthLayout.js.map +1 -0
- package/dist/src/modules/auth/components/AuthProviders.d.ts +17 -6
- package/dist/src/modules/auth/components/AuthProviders.js +80 -41
- package/dist/src/modules/auth/components/AuthProviders.js.map +1 -0
- package/dist/src/modules/auth/components/AuthRouter.d.ts +16 -7
- package/dist/src/modules/auth/components/AuthRouter.js +46 -10
- package/dist/src/modules/auth/components/AuthRouter.js.map +1 -0
- package/dist/src/modules/auth/components/ClaimAccountRoute.d.ts +12 -4
- package/dist/src/modules/auth/components/ClaimAccountRoute.js +202 -139
- package/dist/src/modules/auth/components/ClaimAccountRoute.js.map +1 -0
- package/dist/src/modules/auth/components/ErrorAuthRoute.d.ts +7 -1
- package/dist/src/modules/auth/components/ErrorAuthRoute.js +125 -89
- package/dist/src/modules/auth/components/ErrorAuthRoute.js.map +1 -0
- package/dist/src/modules/auth/components/ForgotPasswordForm.d.ts +7 -1
- package/dist/src/modules/auth/components/ForgotPasswordForm.js +49 -23
- package/dist/src/modules/auth/components/ForgotPasswordForm.js.map +1 -0
- package/dist/src/modules/auth/components/ForgotPasswordRoute.d.ts +7 -1
- package/dist/src/modules/auth/components/ForgotPasswordRoute.js +34 -6
- package/dist/src/modules/auth/components/ForgotPasswordRoute.js.map +1 -0
- package/dist/src/modules/auth/components/InviteFriends.d.ts +12 -4
- package/dist/src/modules/auth/components/InviteFriends.js +275 -69
- package/dist/src/modules/auth/components/InviteFriends.js.map +1 -0
- package/dist/src/modules/auth/components/LastUsedBadge.d.ts +17 -5
- package/dist/src/modules/auth/components/LastUsedBadge.js +16 -6
- package/dist/src/modules/auth/components/LastUsedBadge.js.map +1 -0
- package/dist/src/modules/auth/components/LoginForm.d.ts +11 -3
- package/dist/src/modules/auth/components/LoginForm.js +107 -40
- package/dist/src/modules/auth/components/LoginForm.js.map +1 -0
- package/dist/src/modules/auth/components/LoginRoute.d.ts +11 -3
- package/dist/src/modules/auth/components/LoginRoute.js +41 -8
- package/dist/src/modules/auth/components/LoginRoute.js.map +1 -0
- package/dist/src/modules/auth/components/LogoutRoute.d.ts +7 -1
- package/dist/src/modules/auth/components/LogoutRoute.js +18 -12
- package/dist/src/modules/auth/components/LogoutRoute.js.map +1 -0
- package/dist/src/modules/auth/components/OrganizationAcceptInvitationRoute.d.ts +21 -8
- package/dist/src/modules/auth/components/OrganizationAcceptInvitationRoute.js +107 -97
- package/dist/src/modules/auth/components/OrganizationAcceptInvitationRoute.js.map +1 -0
- package/dist/src/modules/auth/components/OrganizationMembersRoute.d.ts +58 -48
- package/dist/src/modules/auth/components/OrganizationMembersRoute.js +448 -349
- package/dist/src/modules/auth/components/OrganizationMembersRoute.js.map +1 -0
- package/dist/src/modules/auth/components/OrganizationPreferences.d.ts +27 -16
- package/dist/src/modules/auth/components/OrganizationPreferences.js +129 -124
- package/dist/src/modules/auth/components/OrganizationPreferences.js.map +1 -0
- package/dist/src/modules/auth/components/OrganizationSettingsRoute.d.ts +27 -18
- package/dist/src/modules/auth/components/OrganizationSettingsRoute.js +184 -144
- package/dist/src/modules/auth/components/OrganizationSettingsRoute.js.map +1 -0
- package/dist/src/modules/auth/components/OrganizationSwitcher.d.ts +17 -6
- package/dist/src/modules/auth/components/OrganizationSwitcher.js +91 -69
- package/dist/src/modules/auth/components/OrganizationSwitcher.js.map +1 -0
- package/dist/src/modules/auth/components/PreferencesEditor.d.ts +44 -33
- package/dist/src/modules/auth/components/PreferencesEditor.js +82 -58
- package/dist/src/modules/auth/components/PreferencesEditor.js.map +1 -0
- package/dist/src/modules/auth/components/ProfileRoute.d.ts +7 -1
- package/dist/src/modules/auth/components/ProfileRoute.js +79 -36
- package/dist/src/modules/auth/components/ProfileRoute.js.map +1 -0
- package/dist/src/modules/auth/components/RangeNuqsDatePicker.d.ts +44 -30
- package/dist/src/modules/auth/components/RangeNuqsDatePicker.js +234 -242
- package/dist/src/modules/auth/components/RangeNuqsDatePicker.js.map +1 -0
- package/dist/src/modules/auth/components/ResetPasswordForm.d.ts +7 -1
- package/dist/src/modules/auth/components/ResetPasswordForm.js +97 -35
- package/dist/src/modules/auth/components/ResetPasswordForm.js.map +1 -0
- package/dist/src/modules/auth/components/ResetPasswordRoute.d.ts +7 -1
- package/dist/src/modules/auth/components/ResetPasswordRoute.js +34 -6
- package/dist/src/modules/auth/components/ResetPasswordRoute.js.map +1 -0
- package/dist/src/modules/auth/components/SignupFormRoute.d.ts +15 -5
- package/dist/src/modules/auth/components/SignupFormRoute.js +142 -99
- package/dist/src/modules/auth/components/SignupFormRoute.js.map +1 -0
- package/dist/src/modules/auth/components/SignupRoute.d.ts +13 -5
- package/dist/src/modules/auth/components/SignupRoute.js +59 -13
- package/dist/src/modules/auth/components/SignupRoute.js.map +1 -0
- package/dist/src/modules/auth/components/UserPreferences.d.ts +22 -11
- package/dist/src/modules/auth/components/UserPreferences.js +24 -12
- package/dist/src/modules/auth/components/UserPreferences.js.map +1 -0
- package/dist/src/modules/auth/components/WaitlistCard.d.ts +11 -4
- package/dist/src/modules/auth/components/WaitlistCard.js +63 -28
- package/dist/src/modules/auth/components/WaitlistCard.js.map +1 -0
- package/dist/src/modules/auth/components/WaitlistCodeValidation.d.ts +13 -5
- package/dist/src/modules/auth/components/WaitlistCodeValidation.js +42 -40
- package/dist/src/modules/auth/components/WaitlistCodeValidation.js.map +1 -0
- package/dist/src/modules/billing/components/BillingBetaPage.d.ts +15 -6
- package/dist/src/modules/billing/components/BillingBetaPage.js +155 -8
- package/dist/src/modules/billing/components/BillingBetaPage.js.map +1 -0
- package/dist/src/modules/billing/components/BillingInvoicePage.d.ts +13 -5
- package/dist/src/modules/billing/components/BillingInvoicePage.js +160 -30
- package/dist/src/modules/billing/components/BillingInvoicePage.js.map +1 -0
- package/dist/src/modules/billing/components/BillingPlanSelect.d.ts +11 -4
- package/dist/src/modules/billing/components/BillingPlanSelect.js +10 -7
- package/dist/src/modules/billing/components/BillingPlanSelect.js.map +1 -0
- package/dist/src/modules/billing/components/BillingRouter.d.ts +15 -7
- package/dist/src/modules/billing/components/BillingRouter.js +19 -6
- package/dist/src/modules/billing/components/BillingRouter.js.map +1 -0
- package/dist/src/modules/billing/components/BillingSinglePlanSelect.d.ts +17 -7
- package/dist/src/modules/billing/components/BillingSinglePlanSelect.js +163 -42
- package/dist/src/modules/billing/components/BillingSinglePlanSelect.js.map +1 -0
- package/dist/src/modules/table/components/ColumnOrderAndVisibility.d.ts +18 -8
- package/dist/src/modules/table/components/ColumnOrderAndVisibility.js +81 -38
- package/dist/src/modules/table/components/ColumnOrderAndVisibility.js.map +1 -0
- package/dist/src/modules/table/components/NuqsTable.d.ts +33 -21
- package/dist/src/modules/table/components/NuqsTable.js +295 -221
- package/dist/src/modules/table/components/NuqsTable.js.map +1 -0
- package/dist/src/modules/table/components/TableFiltering.d.ts +33 -21
- package/dist/src/modules/table/components/TableFiltering.js +408 -226
- package/dist/src/modules/table/components/TableFiltering.js.map +1 -0
- package/dist/src/modules/table/components/TableGroupBy.d.ts +18 -8
- package/dist/src/modules/table/components/TableGroupBy.js +56 -16
- package/dist/src/modules/table/components/TableGroupBy.js.map +1 -0
- package/dist/src/modules/table/components/TablePagination.d.ts +17 -7
- package/dist/src/modules/table/components/TablePagination.js +64 -32
- package/dist/src/modules/table/components/TablePagination.js.map +1 -0
- package/dist/src/modules/table/components/table.types.d.ts +15 -10
- package/dist/src/modules/table/components/table.types.js +0 -1
- package/dist/src/modules/table/filterTransformers.d.ts +35 -30
- package/dist/src/modules/table/filterTransformers.js +198 -261
- package/dist/src/modules/table/filterTransformers.js.map +1 -0
- package/dist/src/types.d.ts +8 -3
- package/dist/src/types.js +0 -1
- package/package.json +8 -6
- package/dist/translations/en/web-ui.json +0 -209
- package/dist/tsconfig.lib.tsbuildinfo +0 -1
|
@@ -1,143 +1,206 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
1
|
+
import { GoogleIcon } from "../../../icons/GoogleIcon.js";
|
|
2
|
+
import { LinkedInIcon } from "../../../icons/LinkedInIcon.js";
|
|
3
|
+
import { MicrosoftIcon } from "../../../icons/MicrosoftIcon.js";
|
|
5
4
|
import { useEffect, useMemo, useState } from "react";
|
|
5
|
+
import { Alert, Button, Card, CardBody, CardHeader, Input } from "@heroui/react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
7
|
import { useLocation, useNavigate } from "react-router";
|
|
7
8
|
import { toast } from "sonner";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
9
|
+
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
10
|
+
import { useSession } from "@m5kdev/frontend/modules/auth/hooks/useSession";
|
|
11
|
+
//#region src/modules/auth/components/ClaimAccountRoute.tsx
|
|
12
|
+
function ClaimAccountRoute({ useTRPC }) {
|
|
13
|
+
const { data: session, registerSession } = useSession();
|
|
14
|
+
const navigate = useNavigate();
|
|
15
|
+
const location = useLocation();
|
|
16
|
+
const queryClient = useQueryClient();
|
|
17
|
+
const [email, setEmail] = useState("");
|
|
18
|
+
const [newPassword, setNewPassword] = useState("");
|
|
19
|
+
const [busy, setBusy] = useState("none");
|
|
20
|
+
const trpc = useTRPC?.();
|
|
21
|
+
const linkedProvider = useMemo(() => {
|
|
22
|
+
return new URLSearchParams(location.search).get("linked");
|
|
23
|
+
}, [location.search]);
|
|
24
|
+
const claimStatusQuery = useQuery({
|
|
25
|
+
queryKey: [
|
|
26
|
+
"auth",
|
|
27
|
+
"claim-status",
|
|
28
|
+
session?.user?.id ?? null
|
|
29
|
+
],
|
|
30
|
+
enabled: !!trpc && !!session?.user,
|
|
31
|
+
queryFn: async () => {
|
|
32
|
+
if (!trpc) return null;
|
|
33
|
+
return queryClient.fetchQuery(trpc.auth.getMyAccountClaimStatus.queryOptions());
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
const setEmailMutation = useMutation(trpc ? trpc.auth.setMyAccountClaimEmail.mutationOptions() : { mutationFn: async () => ({ status: false }) });
|
|
37
|
+
const acceptClaimMutation = useMutation(trpc ? trpc.auth.acceptMyAccountClaim.mutationOptions() : { mutationFn: async () => ({ status: false }) });
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
if (session?.user?.email) setEmail(session.user.email);
|
|
40
|
+
}, [session?.user?.email]);
|
|
41
|
+
useEffect(() => {
|
|
42
|
+
if (!linkedProvider || !trpc) return;
|
|
43
|
+
acceptClaimMutation.mutateAsync(void 0).then(() => {
|
|
44
|
+
toast.success("Account provider linked");
|
|
45
|
+
queryClient.invalidateQueries({ queryKey: trpc.auth.getMyAccountClaimStatus.queryKey() });
|
|
46
|
+
}).catch((error) => {
|
|
47
|
+
toast.error(error.message);
|
|
48
|
+
}).finally(() => {
|
|
49
|
+
navigate("/claim-account", { replace: true });
|
|
50
|
+
});
|
|
51
|
+
}, [
|
|
52
|
+
acceptClaimMutation,
|
|
53
|
+
linkedProvider,
|
|
54
|
+
navigate,
|
|
55
|
+
queryClient,
|
|
56
|
+
trpc
|
|
57
|
+
]);
|
|
58
|
+
if (!trpc) return /* @__PURE__ */ jsx(Alert, {
|
|
59
|
+
color: "warning",
|
|
60
|
+
variant: "faded",
|
|
61
|
+
title: "Claim flow is unavailable because backend TRPC is not configured."
|
|
62
|
+
});
|
|
63
|
+
if (!session?.user) return /* @__PURE__ */ jsx(Alert, {
|
|
64
|
+
color: "warning",
|
|
65
|
+
variant: "faded",
|
|
66
|
+
title: "You need to sign in with your magic link before claiming this account."
|
|
67
|
+
});
|
|
68
|
+
const claim = claimStatusQuery.data;
|
|
69
|
+
const hasClaimEmail = Boolean(claim?.claimedEmail);
|
|
70
|
+
const onSetEmail = async () => {
|
|
71
|
+
setBusy("email");
|
|
72
|
+
try {
|
|
73
|
+
await setEmailMutation.mutateAsync({ email });
|
|
74
|
+
registerSession(() => void 0);
|
|
75
|
+
await queryClient.invalidateQueries({ queryKey: trpc.auth.getMyAccountClaimStatus.queryKey() });
|
|
76
|
+
toast.success("Email updated");
|
|
77
|
+
} catch (error) {
|
|
78
|
+
toast.error(error instanceof Error ? error.message : "Unable to set email");
|
|
79
|
+
} finally {
|
|
80
|
+
setBusy("none");
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
const onSetPassword = async () => {
|
|
84
|
+
setBusy("password");
|
|
85
|
+
try {
|
|
86
|
+
const response = await fetch(`${import.meta.env.VITE_SERVER_URL}/api/auth/set-password`, {
|
|
87
|
+
method: "POST",
|
|
88
|
+
credentials: "include",
|
|
89
|
+
headers: { "Content-Type": "application/json" },
|
|
90
|
+
body: JSON.stringify({ newPassword })
|
|
91
|
+
});
|
|
92
|
+
const payload = await response.json().catch(() => ({}));
|
|
93
|
+
if (!response.ok) throw new Error(payload?.message ?? "Unable to set password");
|
|
94
|
+
await acceptClaimMutation.mutateAsync(void 0);
|
|
95
|
+
await queryClient.invalidateQueries({ queryKey: trpc.auth.getMyAccountClaimStatus.queryKey() });
|
|
96
|
+
toast.success("Password set. Account claimed.");
|
|
97
|
+
} catch (error) {
|
|
98
|
+
toast.error(error instanceof Error ? error.message : "Unable to set password");
|
|
99
|
+
} finally {
|
|
100
|
+
setBusy("none");
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
const onLinkProvider = async (provider) => {
|
|
104
|
+
setBusy("link");
|
|
105
|
+
try {
|
|
106
|
+
const response = await fetch(`${import.meta.env.VITE_SERVER_URL}/api/auth/link-social`, {
|
|
107
|
+
method: "POST",
|
|
108
|
+
credentials: "include",
|
|
109
|
+
headers: { "Content-Type": "application/json" },
|
|
110
|
+
body: JSON.stringify({
|
|
111
|
+
provider,
|
|
112
|
+
callbackURL: `${window.location.origin}/claim-account?linked=${provider}`
|
|
113
|
+
})
|
|
114
|
+
});
|
|
115
|
+
const payload = await response.json().catch(() => ({}));
|
|
116
|
+
if (!response.ok || !payload?.url) throw new Error(payload?.message ?? "Unable to start provider linking");
|
|
117
|
+
window.location.href = payload.url;
|
|
118
|
+
} catch (error) {
|
|
119
|
+
toast.error(error instanceof Error ? error.message : "Unable to link provider");
|
|
120
|
+
setBusy("none");
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
return /* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsxs(CardHeader, {
|
|
124
|
+
className: "flex flex-col gap-1",
|
|
125
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
126
|
+
className: "text-xl font-semibold",
|
|
127
|
+
children: "Claim your account"
|
|
128
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
129
|
+
className: "text-sm text-default-600",
|
|
130
|
+
children: "You are signed in and can now set your permanent login methods."
|
|
131
|
+
})]
|
|
132
|
+
}), /* @__PURE__ */ jsxs(CardBody, {
|
|
133
|
+
className: "grid gap-6",
|
|
134
|
+
children: [
|
|
135
|
+
claimStatusQuery.isLoading ? /* @__PURE__ */ jsx(Alert, {
|
|
136
|
+
color: "default",
|
|
137
|
+
variant: "faded",
|
|
138
|
+
title: "Loading claim status..."
|
|
139
|
+
}) : !claim ? /* @__PURE__ */ jsx(Alert, {
|
|
140
|
+
color: "warning",
|
|
141
|
+
variant: "faded",
|
|
142
|
+
title: "No pending account claim was found for your user."
|
|
143
|
+
}) : null,
|
|
144
|
+
/* @__PURE__ */ jsxs("div", {
|
|
145
|
+
className: "grid gap-2",
|
|
146
|
+
children: [/* @__PURE__ */ jsx(Input, {
|
|
147
|
+
type: "email",
|
|
148
|
+
label: "Email",
|
|
149
|
+
value: email,
|
|
150
|
+
onValueChange: setEmail,
|
|
151
|
+
description: "Set your real email before linking providers and password."
|
|
152
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
153
|
+
onPress: onSetEmail,
|
|
154
|
+
isDisabled: !email || busy !== "none" || !claim,
|
|
155
|
+
children: busy === "email" ? "Saving..." : "Save Email"
|
|
156
|
+
})]
|
|
157
|
+
}),
|
|
158
|
+
/* @__PURE__ */ jsxs("div", {
|
|
159
|
+
className: "grid gap-2",
|
|
160
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
161
|
+
className: "text-sm font-medium",
|
|
162
|
+
children: "Link a provider"
|
|
163
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
164
|
+
className: "grid gap-3 sm:grid-cols-3",
|
|
165
|
+
children: [
|
|
166
|
+
/* @__PURE__ */ jsxs(Button, {
|
|
167
|
+
variant: "bordered",
|
|
168
|
+
onPress: () => onLinkProvider("google"),
|
|
169
|
+
isDisabled: busy !== "none" || !hasClaimEmail || !claim,
|
|
170
|
+
children: [/* @__PURE__ */ jsx(GoogleIcon, { className: "h-4 w-4" }), " Google"]
|
|
171
|
+
}),
|
|
172
|
+
/* @__PURE__ */ jsxs(Button, {
|
|
173
|
+
variant: "bordered",
|
|
174
|
+
onPress: () => onLinkProvider("linkedin"),
|
|
175
|
+
isDisabled: busy !== "none" || !hasClaimEmail || !claim,
|
|
176
|
+
children: [/* @__PURE__ */ jsx(LinkedInIcon, { className: "h-4 w-4" }), " LinkedIn"]
|
|
177
|
+
}),
|
|
178
|
+
/* @__PURE__ */ jsxs(Button, {
|
|
179
|
+
variant: "bordered",
|
|
180
|
+
onPress: () => onLinkProvider("microsoft"),
|
|
181
|
+
isDisabled: busy !== "none" || !hasClaimEmail || !claim,
|
|
182
|
+
children: [/* @__PURE__ */ jsx(MicrosoftIcon, { className: "h-4 w-4" }), " Microsoft"]
|
|
183
|
+
})
|
|
184
|
+
]
|
|
185
|
+
})]
|
|
186
|
+
}),
|
|
187
|
+
/* @__PURE__ */ jsxs("div", {
|
|
188
|
+
className: "grid gap-2",
|
|
189
|
+
children: [/* @__PURE__ */ jsx(Input, {
|
|
190
|
+
type: "password",
|
|
191
|
+
label: "Set password",
|
|
192
|
+
value: newPassword,
|
|
193
|
+
onValueChange: setNewPassword
|
|
194
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
195
|
+
onPress: onSetPassword,
|
|
196
|
+
isDisabled: !newPassword || busy !== "none" || !hasClaimEmail || !claim,
|
|
197
|
+
children: busy === "password" ? "Saving..." : "Set Password and Claim"
|
|
198
|
+
})]
|
|
199
|
+
})
|
|
200
|
+
]
|
|
201
|
+
})] });
|
|
143
202
|
}
|
|
203
|
+
//#endregion
|
|
204
|
+
export { ClaimAccountRoute };
|
|
205
|
+
|
|
206
|
+
//# sourceMappingURL=ClaimAccountRoute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClaimAccountRoute.js","names":[],"sources":["../../../../../src/modules/auth/components/ClaimAccountRoute.tsx"],"sourcesContent":["import { Alert, Button, Card, CardBody, CardHeader, Input } from \"@heroui/react\";\r\nimport { useSession } from \"@m5kdev/frontend/modules/auth/hooks/useSession\";\r\nimport { useMutation, useQuery, useQueryClient } from \"@tanstack/react-query\";\r\nimport { useEffect, useMemo, useState } from \"react\";\r\nimport { useLocation, useNavigate } from \"react-router\";\r\nimport { toast } from \"sonner\";\r\nimport { GoogleIcon } from \"../../../icons/GoogleIcon\";\r\nimport { LinkedInIcon } from \"../../../icons/LinkedInIcon\";\r\nimport { MicrosoftIcon } from \"../../../icons/MicrosoftIcon\";\r\nimport type { UseBackendTRPC } from \"../../../types\";\r\n\r\nexport function ClaimAccountRoute({ useTRPC }: { useTRPC?: UseBackendTRPC }) {\r\n const { data: session, registerSession } = useSession();\r\n const navigate = useNavigate();\r\n const location = useLocation();\r\n const queryClient = useQueryClient();\r\n const [email, setEmail] = useState(\"\");\r\n const [newPassword, setNewPassword] = useState(\"\");\r\n const [busy, setBusy] = useState<\"none\" | \"email\" | \"password\" | \"link\">(\"none\");\r\n\r\n const trpc = useTRPC?.();\r\n\r\n const linkedProvider = useMemo(() => {\r\n const params = new URLSearchParams(location.search);\r\n return params.get(\"linked\");\r\n }, [location.search]);\r\n\r\n const claimStatusQuery = useQuery({\r\n queryKey: [\"auth\", \"claim-status\", session?.user?.id ?? null],\r\n enabled: !!trpc && !!session?.user,\r\n queryFn: async () => {\r\n if (!trpc) return null;\r\n return queryClient.fetchQuery(trpc.auth.getMyAccountClaimStatus.queryOptions());\r\n },\r\n });\r\n\r\n const setEmailMutation = useMutation(\r\n trpc\r\n ? trpc.auth.setMyAccountClaimEmail.mutationOptions()\r\n : {\r\n mutationFn: async () => ({ status: false }),\r\n }\r\n );\r\n\r\n const acceptClaimMutation = useMutation(\r\n trpc\r\n ? trpc.auth.acceptMyAccountClaim.mutationOptions()\r\n : {\r\n mutationFn: async () => ({ status: false }),\r\n }\r\n );\r\n\r\n useEffect(() => {\r\n if (session?.user?.email) {\r\n setEmail(session.user.email);\r\n }\r\n }, [session?.user?.email]);\r\n\r\n useEffect(() => {\r\n if (!linkedProvider || !trpc) return;\r\n acceptClaimMutation\r\n .mutateAsync(undefined)\r\n .then(() => {\r\n toast.success(\"Account provider linked\");\r\n queryClient.invalidateQueries({ queryKey: trpc.auth.getMyAccountClaimStatus.queryKey() });\r\n })\r\n .catch((error) => {\r\n toast.error(error.message);\r\n })\r\n .finally(() => {\r\n navigate(\"/claim-account\", { replace: true });\r\n });\r\n }, [acceptClaimMutation, linkedProvider, navigate, queryClient, trpc]);\r\n\r\n if (!trpc) {\r\n return (\r\n <Alert\r\n color=\"warning\"\r\n variant=\"faded\"\r\n title=\"Claim flow is unavailable because backend TRPC is not configured.\"\r\n />\r\n );\r\n }\r\n\r\n if (!session?.user) {\r\n return (\r\n <Alert\r\n color=\"warning\"\r\n variant=\"faded\"\r\n title=\"You need to sign in with your magic link before claiming this account.\"\r\n />\r\n );\r\n }\r\n\r\n const claim = claimStatusQuery.data;\r\n const hasClaimEmail = Boolean(claim?.claimedEmail);\r\n\r\n const onSetEmail = async () => {\r\n setBusy(\"email\");\r\n try {\r\n await setEmailMutation.mutateAsync({ email });\r\n registerSession(() => undefined);\r\n await queryClient.invalidateQueries({\r\n queryKey: trpc.auth.getMyAccountClaimStatus.queryKey(),\r\n });\r\n toast.success(\"Email updated\");\r\n } catch (error) {\r\n toast.error(error instanceof Error ? error.message : \"Unable to set email\");\r\n } finally {\r\n setBusy(\"none\");\r\n }\r\n };\r\n\r\n const onSetPassword = async () => {\r\n setBusy(\"password\");\r\n try {\r\n const response = await fetch(`${import.meta.env.VITE_SERVER_URL}/api/auth/set-password`, {\r\n method: \"POST\",\r\n credentials: \"include\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n },\r\n body: JSON.stringify({\r\n newPassword,\r\n }),\r\n });\r\n const payload = await response.json().catch(() => ({}));\r\n if (!response.ok) {\r\n throw new Error(payload?.message ?? \"Unable to set password\");\r\n }\r\n await acceptClaimMutation.mutateAsync(undefined);\r\n await queryClient.invalidateQueries({\r\n queryKey: trpc.auth.getMyAccountClaimStatus.queryKey(),\r\n });\r\n toast.success(\"Password set. Account claimed.\");\r\n } catch (error) {\r\n toast.error(error instanceof Error ? error.message : \"Unable to set password\");\r\n } finally {\r\n setBusy(\"none\");\r\n }\r\n };\r\n\r\n const onLinkProvider = async (provider: \"google\" | \"linkedin\" | \"microsoft\") => {\r\n setBusy(\"link\");\r\n try {\r\n const response = await fetch(`${import.meta.env.VITE_SERVER_URL}/api/auth/link-social`, {\r\n method: \"POST\",\r\n credentials: \"include\",\r\n headers: { \"Content-Type\": \"application/json\" },\r\n body: JSON.stringify({\r\n provider,\r\n callbackURL: `${window.location.origin}/claim-account?linked=${provider}`,\r\n }),\r\n });\r\n const payload = await response.json().catch(() => ({}));\r\n if (!response.ok || !payload?.url) {\r\n throw new Error(payload?.message ?? \"Unable to start provider linking\");\r\n }\r\n window.location.href = payload.url;\r\n } catch (error) {\r\n toast.error(error instanceof Error ? error.message : \"Unable to link provider\");\r\n setBusy(\"none\");\r\n }\r\n };\r\n\r\n return (\r\n <Card>\r\n <CardHeader className=\"flex flex-col gap-1\">\r\n <p className=\"text-xl font-semibold\">Claim your account</p>\r\n <p className=\"text-sm text-default-600\">\r\n You are signed in and can now set your permanent login methods.\r\n </p>\r\n </CardHeader>\r\n <CardBody className=\"grid gap-6\">\r\n {claimStatusQuery.isLoading ? (\r\n <Alert color=\"default\" variant=\"faded\" title=\"Loading claim status...\" />\r\n ) : !claim ? (\r\n <Alert\r\n color=\"warning\"\r\n variant=\"faded\"\r\n title=\"No pending account claim was found for your user.\"\r\n />\r\n ) : null}\r\n\r\n <div className=\"grid gap-2\">\r\n <Input\r\n type=\"email\"\r\n label=\"Email\"\r\n value={email}\r\n onValueChange={setEmail}\r\n description=\"Set your real email before linking providers and password.\"\r\n />\r\n <Button onPress={onSetEmail} isDisabled={!email || busy !== \"none\" || !claim}>\r\n {busy === \"email\" ? \"Saving...\" : \"Save Email\"}\r\n </Button>\r\n </div>\r\n\r\n <div className=\"grid gap-2\">\r\n <p className=\"text-sm font-medium\">Link a provider</p>\r\n <div className=\"grid gap-3 sm:grid-cols-3\">\r\n <Button\r\n variant=\"bordered\"\r\n onPress={() => onLinkProvider(\"google\")}\r\n isDisabled={busy !== \"none\" || !hasClaimEmail || !claim}\r\n >\r\n <GoogleIcon className=\"h-4 w-4\" /> Google\r\n </Button>\r\n <Button\r\n variant=\"bordered\"\r\n onPress={() => onLinkProvider(\"linkedin\")}\r\n isDisabled={busy !== \"none\" || !hasClaimEmail || !claim}\r\n >\r\n <LinkedInIcon className=\"h-4 w-4\" /> LinkedIn\r\n </Button>\r\n <Button\r\n variant=\"bordered\"\r\n onPress={() => onLinkProvider(\"microsoft\")}\r\n isDisabled={busy !== \"none\" || !hasClaimEmail || !claim}\r\n >\r\n <MicrosoftIcon className=\"h-4 w-4\" /> Microsoft\r\n </Button>\r\n </div>\r\n </div>\r\n\r\n <div className=\"grid gap-2\">\r\n <Input\r\n type=\"password\"\r\n label=\"Set password\"\r\n value={newPassword}\r\n onValueChange={setNewPassword}\r\n />\r\n <Button\r\n onPress={onSetPassword}\r\n isDisabled={!newPassword || busy !== \"none\" || !hasClaimEmail || !claim}\r\n >\r\n {busy === \"password\" ? \"Saving...\" : \"Set Password and Claim\"}\r\n </Button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AAQ,SAAS;KAAY,YAAY,CAAC,SAAS,SAAS,UAAU,CAAC;eACpE,SAAS,UAAU,cAAc;KAC3B,CAAA,CACL;;GAEN,qBAAC,OAAD;IAAK,WAAU;cAAf,CACE,oBAAC,KAAD;KAAG,WAAU;eAAsB;KAAmB,CAAA,EACtD,qBAAC,OAAD;KAAK,WAAU;eAAf;MACE,qBAAC,QAAD;OACE,SAAQ;OACR,eAAe,eAAe,SAAS;OACvC,YAAY,SAAS,UAAU,CAAC,iBAAiB,CAAC;iBAHpD,CAKE,oBAAC,YAAD,EAAY,WAAU,WAAY,CAAA,EAAA,UAC3B;;MACT,qBAAC,QAAD;OACE,SAAQ;OACR,eAAe,eAAe,WAAW;OACzC,YAAY,SAAS,UAAU,CAAC,iBAAiB,CAAC;iBAHpD,CAKE,oBAAC,cAAD,EAAc,WAAU,WAAY,CAAA,EAAA,YAC7B;;MACT,qBAAC,QAAD;OACE,SAAQ;OACR,eAAe,eAAe,YAAY;OAC1C,YAAY,SAAS,UAAU,CAAC,iBAAiB,CAAC;iBAHpD,CAKE,oBAAC,eAAD,EAAe,WAAU,WAAY,CAAA,EAAA,aAC9B;;MACL;OACF;;GAEN,qBAAC,OAAD;IAAK,WAAU;cAAf,CACE,oBAAC,OAAD;KACE,MAAK;KACL,OAAM;KACN,OAAO;KACP,eAAe;KACf,CAAA,EACF,oBAAC,QAAD;KACE,SAAS;KACT,YAAY,CAAC,eAAe,SAAS,UAAU,CAAC,iBAAiB,CAAC;eAEjE,SAAS,aAAa,cAAc;KAC9B,CAAA,CACL;;GACG;IACN,EAAA,CAAA"}
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/modules/auth/components/ErrorAuthRoute.d.ts
|
|
4
|
+
declare function ErrorAuthRoute(): _$react_jsx_runtime0.JSX.Element;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { ErrorAuthRoute };
|
|
7
|
+
//# sourceMappingURL=ErrorAuthRoute.d.ts.map
|
|
@@ -1,93 +1,129 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
1
|
import { Button, Card, CardBody, CardHeader } from "@heroui/react";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { AlertCircle } from "lucide-react";
|
|
4
|
-
import { useQueryState } from "nuqs";
|
|
5
4
|
import { useTranslation } from "react-i18next";
|
|
6
|
-
import { Link } from "react-router";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
5
|
+
import { Link as Link$1 } from "react-router";
|
|
6
|
+
import { useQueryState } from "nuqs";
|
|
7
|
+
//#region src/modules/auth/components/ErrorAuthRoute.tsx
|
|
8
|
+
function ErrorAuthRoute() {
|
|
9
|
+
const { t } = useTranslation();
|
|
10
|
+
const [error] = useQueryState("error");
|
|
11
|
+
const ErrorEnum = {
|
|
12
|
+
invalid_callback_request: {
|
|
13
|
+
title: "Invalid callback request",
|
|
14
|
+
description: "The callback request is invalid. Please try again.",
|
|
15
|
+
buttons: ["login", "signup"],
|
|
16
|
+
signupLabel: null
|
|
17
|
+
},
|
|
18
|
+
state_not_found: {
|
|
19
|
+
title: "State not found",
|
|
20
|
+
description: "The state was not found. Please try again.",
|
|
21
|
+
buttons: ["login", "signup"],
|
|
22
|
+
signupLabel: null
|
|
23
|
+
},
|
|
24
|
+
account_already_linked_to_different_user: {
|
|
25
|
+
title: "Account already linked to different user",
|
|
26
|
+
description: "The account is already linked to a different user. Please try again.",
|
|
27
|
+
buttons: ["signup"],
|
|
28
|
+
signupLabel: null
|
|
29
|
+
},
|
|
30
|
+
"email_doesn't_match": {
|
|
31
|
+
title: "Email doesn't match",
|
|
32
|
+
description: "The email doesn't match. Please try again.",
|
|
33
|
+
buttons: ["login", "signup"],
|
|
34
|
+
signupLabel: null
|
|
35
|
+
},
|
|
36
|
+
email_not_found: {
|
|
37
|
+
title: "Email not found",
|
|
38
|
+
description: "The email was not found. Please try again.",
|
|
39
|
+
buttons: ["login", "signup"],
|
|
40
|
+
signupLabel: null
|
|
41
|
+
},
|
|
42
|
+
no_callback_url: {
|
|
43
|
+
title: "No callback URL",
|
|
44
|
+
description: "The callback URL is not set. Please try again.",
|
|
45
|
+
buttons: ["login", "signup"],
|
|
46
|
+
signupLabel: null
|
|
47
|
+
},
|
|
48
|
+
no_code: {
|
|
49
|
+
title: "No code",
|
|
50
|
+
description: "The code is not set. Please try again.",
|
|
51
|
+
buttons: ["login", "signup"],
|
|
52
|
+
signupLabel: null
|
|
53
|
+
},
|
|
54
|
+
oauth_provider_not_found: {
|
|
55
|
+
title: "OAuth provider not found",
|
|
56
|
+
description: "The OAuth provider was not found. Please try again.",
|
|
57
|
+
buttons: ["login", "signup"],
|
|
58
|
+
signupLabel: null
|
|
59
|
+
},
|
|
60
|
+
unable_to_link_account: {
|
|
61
|
+
title: "Unable to link account",
|
|
62
|
+
description: "The account could not be linked. Please try again.",
|
|
63
|
+
buttons: ["login", "signup"],
|
|
64
|
+
signupLabel: null
|
|
65
|
+
},
|
|
66
|
+
unable_to_get_user_info: {
|
|
67
|
+
title: "Unable to get user info",
|
|
68
|
+
description: "The user info could not be retrieved. Please try again.",
|
|
69
|
+
buttons: ["login", "signup"],
|
|
70
|
+
signupLabel: null
|
|
71
|
+
},
|
|
72
|
+
state_mismatch: {
|
|
73
|
+
title: "State mismatch",
|
|
74
|
+
description: "The state mismatch. Please try again.",
|
|
75
|
+
buttons: ["login", "signup"],
|
|
76
|
+
signupLabel: null
|
|
77
|
+
},
|
|
78
|
+
signup_disabled: {
|
|
79
|
+
title: "Signup disabled",
|
|
80
|
+
description: "The signup is disabled while we are in beta. Please join the waitlist to be notified when we launch.",
|
|
81
|
+
buttons: ["signup"],
|
|
82
|
+
signupLabel: "Join the waitlist"
|
|
83
|
+
},
|
|
84
|
+
default: {
|
|
85
|
+
title: "Authentication Failed",
|
|
86
|
+
description: "We encountered an issue with your authentication request",
|
|
87
|
+
buttons: ["login", "signup"],
|
|
88
|
+
signupLabel: null
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
const { title, description, buttons, signupLabel } = ErrorEnum[error] || ErrorEnum.default;
|
|
92
|
+
return /* @__PURE__ */ jsx("div", {
|
|
93
|
+
className: "flex flex-col gap-6",
|
|
94
|
+
children: /* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsxs(CardHeader, {
|
|
95
|
+
className: "text-center flex flex-col gap-2 items-center",
|
|
96
|
+
children: [
|
|
97
|
+
/* @__PURE__ */ jsx(AlertCircle, { className: "w-10 h-10 text-red-500" }),
|
|
98
|
+
/* @__PURE__ */ jsx("p", {
|
|
99
|
+
className: "text-xl font-semibold",
|
|
100
|
+
children: title
|
|
101
|
+
}),
|
|
102
|
+
/* @__PURE__ */ jsx("p", {
|
|
103
|
+
className: "text-sm text-default-600",
|
|
104
|
+
children: description
|
|
105
|
+
})
|
|
106
|
+
]
|
|
107
|
+
}), /* @__PURE__ */ jsx(CardBody, {
|
|
108
|
+
className: "flex flex-col gap-4",
|
|
109
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
110
|
+
className: "flex flex-col gap-2",
|
|
111
|
+
children: [buttons.includes("login") && /* @__PURE__ */ jsx(Button, {
|
|
112
|
+
as: Link$1,
|
|
113
|
+
to: "/login",
|
|
114
|
+
variant: "bordered",
|
|
115
|
+
children: t("web-ui:auth.error.backToLogin")
|
|
116
|
+
}), buttons.includes("signup") && /* @__PURE__ */ jsx(Button, {
|
|
117
|
+
as: Link$1,
|
|
118
|
+
to: "/signup",
|
|
119
|
+
variant: "bordered",
|
|
120
|
+
children: signupLabel || t("web-ui:auth.error.backToSignup")
|
|
121
|
+
})]
|
|
122
|
+
})
|
|
123
|
+
})] })
|
|
124
|
+
});
|
|
93
125
|
}
|
|
126
|
+
//#endregion
|
|
127
|
+
export { ErrorAuthRoute };
|
|
128
|
+
|
|
129
|
+
//# sourceMappingURL=ErrorAuthRoute.js.map
|