@vitnode/core 1.2.0-canary.10
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/LICENSE.md +21 -0
- package/dist/emails/my-email.d.ts +2 -0
- package/dist/emails/my-email.d.ts.map +1 -0
- package/dist/scripts/get-config.d.ts +3 -0
- package/dist/scripts/get-config.d.ts.map +1 -0
- package/dist/scripts/plugin.d.ts +4 -0
- package/dist/scripts/plugin.d.ts.map +1 -0
- package/dist/scripts/prepare-database.d.ts +7 -0
- package/dist/scripts/prepare-database.d.ts.map +1 -0
- package/dist/scripts/prepare-plugins-files.d.ts +2 -0
- package/dist/scripts/prepare-plugins-files.d.ts.map +1 -0
- package/dist/scripts/run-interactive-shell-command.d.ts +2 -0
- package/dist/scripts/run-interactive-shell-command.d.ts.map +1 -0
- package/dist/scripts/scripts.d.ts +3 -0
- package/dist/scripts/scripts.d.ts.map +1 -0
- package/dist/scripts/scripts.js +21 -0
- package/dist/scripts/shared/file-utils.d.ts +14 -0
- package/dist/scripts/shared/file-utils.d.ts.map +1 -0
- package/dist/src/api/config.d.ts +24 -0
- package/dist/src/api/config.d.ts.map +1 -0
- package/dist/src/api/config.js +50 -0
- package/dist/src/api/lib/check-plugin-id.d.ts +15 -0
- package/dist/src/api/lib/check-plugin-id.d.ts.map +1 -0
- package/dist/src/api/lib/check-plugin-id.js +15 -0
- package/dist/src/api/lib/get-user-ip.d.ts +3 -0
- package/dist/src/api/lib/get-user-ip.d.ts.map +1 -0
- package/dist/src/api/lib/get-user-ip.js +8 -0
- package/dist/src/api/lib/module.d.ts +23 -0
- package/dist/src/api/lib/module.d.ts.map +1 -0
- package/dist/src/api/lib/module.js +21 -0
- package/dist/src/api/lib/plugin.d.ts +11 -0
- package/dist/src/api/lib/plugin.d.ts.map +1 -0
- package/dist/src/api/lib/plugin.js +14 -0
- package/dist/src/api/lib/route.d.ts +26 -0
- package/dist/src/api/lib/route.d.ts.map +1 -0
- package/dist/src/api/lib/route.js +23 -0
- package/dist/src/api/lib/with-pagination.d.ts +72 -0
- package/dist/src/api/lib/with-pagination.d.ts.map +1 -0
- package/dist/src/api/lib/with-pagination.js +70 -0
- package/dist/src/api/middlewares/global/global.d.ts +66 -0
- package/dist/src/api/middlewares/global/global.d.ts.map +1 -0
- package/dist/src/api/middlewares/global/global.js +47 -0
- package/dist/src/api/models/device.d.ts +10 -0
- package/dist/src/api/models/device.d.ts.map +1 -0
- package/dist/src/api/models/device.js +54 -0
- package/dist/src/api/models/email.d.ts +22 -0
- package/dist/src/api/models/email.d.ts.map +1 -0
- package/dist/src/api/models/email.js +30 -0
- package/dist/src/api/models/password.d.ts +5 -0
- package/dist/src/api/models/password.d.ts.map +1 -0
- package/dist/src/api/models/password.js +21 -0
- package/dist/src/api/models/session-admin.d.ts +24 -0
- package/dist/src/api/models/session-admin.d.ts.map +1 -0
- package/dist/src/api/models/session-admin.js +73 -0
- package/dist/src/api/models/session.d.ts +23 -0
- package/dist/src/api/models/session.d.ts.map +1 -0
- package/dist/src/api/models/session.js +60 -0
- package/dist/src/api/models/sso.d.ts +38 -0
- package/dist/src/api/models/sso.d.ts.map +1 -0
- package/dist/src/api/models/sso.js +120 -0
- package/dist/src/api/models/user/get-user-by-id.d.ts +17 -0
- package/dist/src/api/models/user/get-user-by-id.d.ts.map +1 -0
- package/dist/src/api/models/user/get-user-by-id.js +18 -0
- package/dist/src/api/models/user/sign-in-with-passwords.d.ts +10 -0
- package/dist/src/api/models/user/sign-in-with-passwords.d.ts.map +1 -0
- package/dist/src/api/models/user/sign-in-with-passwords.js +22 -0
- package/dist/src/api/models/user/sign-up.d.ts +21 -0
- package/dist/src/api/models/user/sign-up.d.ts.map +1 -0
- package/dist/src/api/models/user/sign-up.js +75 -0
- package/dist/src/api/models/user.d.ts +45 -0
- package/dist/src/api/models/user.d.ts.map +1 -0
- package/dist/src/api/models/user.js +8 -0
- package/dist/src/api/modules/admin/admin.module.d.ts +294 -0
- package/dist/src/api/modules/admin/admin.module.d.ts.map +1 -0
- package/dist/src/api/modules/admin/admin.module.js +14 -0
- package/dist/src/api/modules/admin/routes/session.route.d.ts +108 -0
- package/dist/src/api/modules/admin/routes/session.route.d.ts.map +1 -0
- package/dist/src/api/modules/admin/routes/session.route.js +51 -0
- package/dist/src/api/modules/admin/users/routes/list.route.d.ts +190 -0
- package/dist/src/api/modules/admin/users/routes/list.route.d.ts.map +1 -0
- package/dist/src/api/modules/admin/users/routes/list.route.js +79 -0
- package/dist/src/api/modules/admin/users/routes/users.route.d.ts +193 -0
- package/dist/src/api/modules/admin/users/routes/users.route.d.ts.map +1 -0
- package/dist/src/api/modules/admin/users/routes/users.route.js +84 -0
- package/dist/src/api/modules/admin/users/users.admin.module.d.ts +189 -0
- package/dist/src/api/modules/admin/users/users.admin.module.d.ts.map +1 -0
- package/dist/src/api/modules/admin/users/users.admin.module.js +10 -0
- package/dist/src/api/modules/middleware/middleware.module.d.ts +52 -0
- package/dist/src/api/modules/middleware/middleware.module.d.ts.map +1 -0
- package/dist/src/api/modules/middleware/middleware.module.js +10 -0
- package/dist/src/api/modules/middleware/route.d.ts +53 -0
- package/dist/src/api/modules/middleware/route.d.ts.map +1 -0
- package/dist/src/api/modules/middleware/route.js +39 -0
- package/dist/src/api/modules/users/avatar-color.d.ts +2 -0
- package/dist/src/api/modules/users/avatar-color.d.ts.map +1 -0
- package/dist/src/api/modules/users/avatar-color.js +43 -0
- package/dist/src/api/modules/users/routes/session.route.d.ts +103 -0
- package/dist/src/api/modules/users/routes/session.route.d.ts.map +1 -0
- package/dist/src/api/modules/users/routes/session.route.js +46 -0
- package/dist/src/api/modules/users/routes/sign-in.route.d.ts +88 -0
- package/dist/src/api/modules/users/routes/sign-in.route.d.ts.map +1 -0
- package/dist/src/api/modules/users/routes/sign-in.route.js +71 -0
- package/dist/src/api/modules/users/routes/sign-out.route.d.ts +47 -0
- package/dist/src/api/modules/users/routes/sign-out.route.d.ts.map +1 -0
- package/dist/src/api/modules/users/routes/sign-out.route.js +43 -0
- package/dist/src/api/modules/users/routes/sign-up.route.d.ts +89 -0
- package/dist/src/api/modules/users/routes/sign-up.route.d.ts.map +1 -0
- package/dist/src/api/modules/users/routes/sign-up.route.js +60 -0
- package/dist/src/api/modules/users/routes/test.route.d.ts +31 -0
- package/dist/src/api/modules/users/routes/test.route.d.ts.map +1 -0
- package/dist/src/api/modules/users/routes/test.route.js +32 -0
- package/dist/src/api/modules/users/sso/routes/callback.route.d.ts +78 -0
- package/dist/src/api/modules/users/sso/routes/callback.route.d.ts.map +1 -0
- package/dist/src/api/modules/users/sso/routes/callback.route.js +49 -0
- package/dist/src/api/modules/users/sso/routes/create-url.route.d.ts +51 -0
- package/dist/src/api/modules/users/sso/routes/create-url.route.d.ts.map +1 -0
- package/dist/src/api/modules/users/sso/routes/create-url.route.js +36 -0
- package/dist/src/api/modules/users/sso/sso.module.d.ts +125 -0
- package/dist/src/api/modules/users/sso/sso.module.d.ts.map +1 -0
- package/dist/src/api/modules/users/sso/sso.module.js +12 -0
- package/dist/src/api/modules/users/users.module.d.ts +439 -0
- package/dist/src/api/modules/users/users.module.d.ts.map +1 -0
- package/dist/src/api/modules/users/users.module.js +22 -0
- package/dist/src/api/plugin.d.ts +2 -0
- package/dist/src/api/plugin.d.ts.map +1 -0
- package/dist/src/api/plugin.js +13 -0
- package/dist/src/api/plugins/email/nodemailer.d.ts +10 -0
- package/dist/src/api/plugins/email/nodemailer.d.ts.map +1 -0
- package/dist/src/api/plugins/email/nodemailer.js +30 -0
- package/dist/src/api/plugins/email/resend.d.ts +6 -0
- package/dist/src/api/plugins/email/resend.d.ts.map +1 -0
- package/dist/src/api/plugins/email/resend.js +21 -0
- package/dist/src/api/plugins/sso/discord.d.ts +6 -0
- package/dist/src/api/plugins/sso/discord.d.ts.map +1 -0
- package/dist/src/api/plugins/sso/discord.js +77 -0
- package/dist/src/api/plugins/sso/facebook.d.ts +6 -0
- package/dist/src/api/plugins/sso/facebook.d.ts.map +1 -0
- package/dist/src/api/plugins/sso/facebook.js +76 -0
- package/dist/src/api/plugins/sso/google.d.ts +6 -0
- package/dist/src/api/plugins/sso/google.d.ts.map +1 -0
- package/dist/src/api/plugins/sso/google.js +87 -0
- package/dist/src/app/login/page.d.ts +6 -0
- package/dist/src/app/login/page.d.ts.map +1 -0
- package/dist/src/app/login/page.js +15 -0
- package/dist/src/app/login/sso/[providerId]/page.d.ts +7 -0
- package/dist/src/app/login/sso/[providerId]/page.d.ts.map +1 -0
- package/dist/src/app/login/sso/[providerId]/page.js +10 -0
- package/dist/src/app/register/page.d.ts +6 -0
- package/dist/src/app/register/page.d.ts.map +1 -0
- package/dist/src/app/register/page.js +15 -0
- package/dist/src/app_admin/core/page.d.ts +2 -0
- package/dist/src/app_admin/core/page.d.ts.map +1 -0
- package/dist/src/app_admin/core/page.js +5 -0
- package/dist/src/app_admin/core/test/page.d.ts +2 -0
- package/dist/src/app_admin/core/test/page.d.ts.map +1 -0
- package/dist/src/app_admin/core/test/page.js +5 -0
- package/dist/src/app_admin/core/users/page.d.ts +6 -0
- package/dist/src/app_admin/core/users/page.d.ts.map +1 -0
- package/dist/src/app_admin/core/users/page.js +35 -0
- package/dist/src/components/avatar.d.ts +10 -0
- package/dist/src/components/avatar.d.ts.map +1 -0
- package/dist/src/components/avatar.js +14 -0
- package/dist/src/components/date-format.d.ts +5 -0
- package/dist/src/components/date-format.d.ts.map +1 -0
- package/dist/src/components/date-format.js +38 -0
- package/dist/src/components/form/auto-form.d.ts +12 -0
- package/dist/src/components/form/auto-form.d.ts.map +1 -0
- package/dist/src/components/form/auto-form.js +57 -0
- package/dist/src/components/form/common/desc.d.ts +2 -0
- package/dist/src/components/form/common/desc.d.ts.map +1 -0
- package/dist/src/components/form/common/desc.js +9 -0
- package/dist/src/components/form/common/label.d.ts +3 -0
- package/dist/src/components/form/common/label.d.ts.map +1 -0
- package/dist/src/components/form/common/label.js +8 -0
- package/dist/src/components/form/fields/checkbox.d.ts +8 -0
- package/dist/src/components/form/fields/checkbox.d.ts.map +1 -0
- package/dist/src/components/form/fields/checkbox.js +35 -0
- package/dist/src/components/form/fields/combobox.d.ts +14 -0
- package/dist/src/components/form/fields/combobox.d.ts.map +1 -0
- package/dist/src/components/form/fields/combobox.js +88 -0
- package/dist/src/components/form/fields/input.d.ts +9 -0
- package/dist/src/components/form/fields/input.d.ts.map +1 -0
- package/dist/src/components/form/fields/input.js +34 -0
- package/dist/src/components/form/fields/item.d.ts +14 -0
- package/dist/src/components/form/fields/item.d.ts.map +1 -0
- package/dist/src/components/form/fields/item.js +22 -0
- package/dist/src/components/form/fields/radio-group.d.ts +13 -0
- package/dist/src/components/form/fields/radio-group.d.ts.map +1 -0
- package/dist/src/components/form/fields/radio-group.js +51 -0
- package/dist/src/components/form/fields/select.d.ts +14 -0
- package/dist/src/components/form/fields/select.d.ts.map +1 -0
- package/dist/src/components/form/fields/select.js +59 -0
- package/dist/src/components/form/fields/switch.d.ts +8 -0
- package/dist/src/components/form/fields/switch.d.ts.map +1 -0
- package/dist/src/components/form/fields/switch.js +35 -0
- package/dist/src/components/form/fields/textarea.d.ts +9 -0
- package/dist/src/components/form/fields/textarea.d.ts.map +1 -0
- package/dist/src/components/form/fields/textarea.js +34 -0
- package/dist/src/components/i18n-provider.d.ts +7 -0
- package/dist/src/components/i18n-provider.d.ts.map +1 -0
- package/dist/src/components/i18n-provider.js +43 -0
- package/dist/src/components/logo-vitnode.d.ts +4 -0
- package/dist/src/components/logo-vitnode.d.ts.map +1 -0
- package/dist/src/components/logo-vitnode.js +113 -0
- package/dist/src/components/switchers/theme-switcher.d.ts +2 -0
- package/dist/src/components/switchers/theme-switcher.d.ts.map +1 -0
- package/dist/src/components/switchers/theme-switcher.js +25 -0
- package/dist/src/components/table/content.d.ts +3 -0
- package/dist/src/components/table/content.d.ts.map +1 -0
- package/dist/src/components/table/content.js +84 -0
- package/dist/src/components/table/data-table.d.ts +37 -0
- package/dist/src/components/table/data-table.d.ts.map +1 -0
- package/dist/src/components/table/data-table.js +69 -0
- package/dist/src/components/table/order-table-head.d.ts +7 -0
- package/dist/src/components/table/order-table-head.d.ts.map +1 -0
- package/dist/src/components/table/order-table-head.js +39 -0
- package/dist/src/components/table/pagination.d.ts +11 -0
- package/dist/src/components/table/pagination.d.ts.map +1 -0
- package/dist/src/components/table/pagination.js +122 -0
- package/dist/src/components/ui/accordion.d.ts +8 -0
- package/dist/src/components/ui/accordion.d.ts.map +1 -0
- package/dist/src/components/ui/accordion.js +47 -0
- package/dist/src/components/ui/alert-dialog.d.ts +15 -0
- package/dist/src/components/ui/alert-dialog.d.ts.map +1 -0
- package/dist/src/components/ui/alert-dialog.js +86 -0
- package/dist/src/components/ui/alert.d.ts +10 -0
- package/dist/src/components/ui/alert.d.ts.map +1 -0
- package/dist/src/components/ui/alert.js +40 -0
- package/dist/src/components/ui/badge.d.ts +10 -0
- package/dist/src/components/ui/badge.d.ts.map +1 -0
- package/dist/src/components/ui/badge.js +29 -0
- package/dist/src/components/ui/button.d.ts +13 -0
- package/dist/src/components/ui/button.d.ts.map +1 -0
- package/dist/src/components/ui/button.js +66 -0
- package/dist/src/components/ui/card.d.ts +10 -0
- package/dist/src/components/ui/card.d.ts.map +1 -0
- package/dist/src/components/ui/card.js +53 -0
- package/dist/src/components/ui/checkbox.d.ts +5 -0
- package/dist/src/components/ui/checkbox.d.ts.map +1 -0
- package/dist/src/components/ui/checkbox.js +21 -0
- package/dist/src/components/ui/collapsible.d.ts +6 -0
- package/dist/src/components/ui/collapsible.d.ts.map +1 -0
- package/dist/src/components/ui/collapsible.js +22 -0
- package/dist/src/components/ui/command.d.ts +19 -0
- package/dist/src/components/ui/command.d.ts.map +1 -0
- package/dist/src/components/ui/command.js +99 -0
- package/dist/src/components/ui/context-menu.d.ts +26 -0
- package/dist/src/components/ui/context-menu.d.ts.map +1 -0
- package/dist/src/components/ui/context-menu.js +141 -0
- package/dist/src/components/ui/dialog.d.ts +23 -0
- package/dist/src/components/ui/dialog.d.ts.map +1 -0
- package/dist/src/components/ui/dialog.js +181 -0
- package/dist/src/components/ui/drawer.d.ts +14 -0
- package/dist/src/components/ui/drawer.d.ts.map +1 -0
- package/dist/src/components/ui/drawer.js +84 -0
- package/dist/src/components/ui/dropdown-menu.d.ts +26 -0
- package/dist/src/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/src/components/ui/dropdown-menu.js +142 -0
- package/dist/src/components/ui/form.d.ts +33 -0
- package/dist/src/components/ui/form.d.ts.map +1 -0
- package/dist/src/components/ui/form.js +142 -0
- package/dist/src/components/ui/header-content.d.ts +17 -0
- package/dist/src/components/ui/header-content.d.ts.map +1 -0
- package/dist/src/components/ui/header-content.js +30 -0
- package/dist/src/components/ui/hover-card.d.ts +7 -0
- package/dist/src/components/ui/hover-card.d.ts.map +1 -0
- package/dist/src/components/ui/hover-card.js +30 -0
- package/dist/src/components/ui/input-otp.d.ts +12 -0
- package/dist/src/components/ui/input-otp.d.ts.map +1 -0
- package/dist/src/components/ui/input-otp.js +49 -0
- package/dist/src/components/ui/input.d.ts +4 -0
- package/dist/src/components/ui/input.d.ts.map +1 -0
- package/dist/src/components/ui/input.js +12 -0
- package/dist/src/components/ui/label.d.ts +5 -0
- package/dist/src/components/ui/label.d.ts.map +1 -0
- package/dist/src/components/ui/label.js +13 -0
- package/dist/src/components/ui/loader.d.ts +5 -0
- package/dist/src/components/ui/loader.d.ts.map +1 -0
- package/dist/src/components/ui/loader.js +16 -0
- package/dist/src/components/ui/menubar.d.ts +27 -0
- package/dist/src/components/ui/menubar.d.ts.map +1 -0
- package/dist/src/components/ui/menubar.js +152 -0
- package/dist/src/components/ui/navigation-menu.d.ts +15 -0
- package/dist/src/components/ui/navigation-menu.d.ts.map +1 -0
- package/dist/src/components/ui/navigation-menu.js +83 -0
- package/dist/src/components/ui/popover.d.ts +8 -0
- package/dist/src/components/ui/popover.d.ts.map +1 -0
- package/dist/src/components/ui/popover.js +35 -0
- package/dist/src/components/ui/progress.d.ts +5 -0
- package/dist/src/components/ui/progress.d.ts.map +1 -0
- package/dist/src/components/ui/progress.js +20 -0
- package/dist/src/components/ui/radio-group.d.ts +6 -0
- package/dist/src/components/ui/radio-group.d.ts.map +1 -0
- package/dist/src/components/ui/radio-group.js +28 -0
- package/dist/src/components/ui/select.d.ts +16 -0
- package/dist/src/components/ui/select.d.ts.map +1 -0
- package/dist/src/components/ui/select.js +114 -0
- package/dist/src/components/ui/separator.d.ts +5 -0
- package/dist/src/components/ui/separator.d.ts.map +1 -0
- package/dist/src/components/ui/separator.js +15 -0
- package/dist/src/components/ui/sheet.d.ts +14 -0
- package/dist/src/components/ui/sheet.d.ts.map +1 -0
- package/dist/src/components/ui/sheet.js +93 -0
- package/dist/src/components/ui/sidebar.d.ts +70 -0
- package/dist/src/components/ui/sidebar.d.ts.map +1 -0
- package/dist/src/components/ui/sidebar.js +437 -0
- package/dist/src/components/ui/skeleton.d.ts +3 -0
- package/dist/src/components/ui/skeleton.d.ts.map +1 -0
- package/dist/src/components/ui/skeleton.js +10 -0
- package/dist/src/components/ui/slider.d.ts +5 -0
- package/dist/src/components/ui/slider.d.ts.map +1 -0
- package/dist/src/components/ui/slider.js +42 -0
- package/dist/src/components/ui/sonner.d.ts +4 -0
- package/dist/src/components/ui/sonner.d.ts.map +1 -0
- package/dist/src/components/ui/sonner.js +26 -0
- package/dist/src/components/ui/switch.d.ts +5 -0
- package/dist/src/components/ui/switch.d.ts.map +1 -0
- package/dist/src/components/ui/switch.js +17 -0
- package/dist/src/components/ui/table.d.ts +11 -0
- package/dist/src/components/ui/table.d.ts.map +1 -0
- package/dist/src/components/ui/table.js +64 -0
- package/dist/src/components/ui/tabs.d.ts +8 -0
- package/dist/src/components/ui/tabs.d.ts.map +1 -0
- package/dist/src/components/ui/tabs.js +34 -0
- package/dist/src/components/ui/textarea.d.ts +4 -0
- package/dist/src/components/ui/textarea.d.ts.map +1 -0
- package/dist/src/components/ui/textarea.js +11 -0
- package/dist/src/components/ui/toggle-group.d.ts +8 -0
- package/dist/src/components/ui/toggle-group.d.ts.map +1 -0
- package/dist/src/components/ui/toggle-group.js +41 -0
- package/dist/src/components/ui/toggle.d.ts +10 -0
- package/dist/src/components/ui/toggle.d.ts.map +1 -0
- package/dist/src/components/ui/toggle.js +35 -0
- package/dist/src/components/ui/tooltip.d.ts +8 -0
- package/dist/src/components/ui/tooltip.d.ts.map +1 -0
- package/dist/src/components/ui/tooltip.js +43 -0
- package/dist/src/components/ui/unsaved-changes-dialog.d.ts +1 -0
- package/dist/src/components/ui/unsaved-changes-dialog.d.ts.map +1 -0
- package/dist/src/config.d.ts +5 -0
- package/dist/src/config.d.ts.map +1 -0
- package/dist/src/config.js +4 -0
- package/dist/src/database/admins.d.ts +246 -0
- package/dist/src/database/admins.d.ts.map +1 -0
- package/dist/src/database/admins.js +74 -0
- package/dist/src/database/languages.d.ts +321 -0
- package/dist/src/database/languages.d.ts.map +1 -0
- package/dist/src/database/languages.js +52 -0
- package/dist/src/database/moderators.d.ts +114 -0
- package/dist/src/database/moderators.d.ts.map +1 -0
- package/dist/src/database/moderators.js +37 -0
- package/dist/src/database/roles.d.ts +146 -0
- package/dist/src/database/roles.d.ts.map +1 -0
- package/dist/src/database/roles.js +13 -0
- package/dist/src/database/sessions.d.ts +196 -0
- package/dist/src/database/sessions.d.ts.map +1 -0
- package/dist/src/database/sessions.js +57 -0
- package/dist/src/database/users.d.ts +562 -0
- package/dist/src/database/users.d.ts.map +1 -0
- package/dist/src/database/users.js +142 -0
- package/dist/src/drizzle.config.d.ts +6 -0
- package/dist/src/drizzle.config.d.ts.map +1 -0
- package/dist/src/drizzle.config.js +37 -0
- package/dist/src/hooks/use-before-unload-with-dialog.d.ts +1 -0
- package/dist/src/hooks/use-before-unload-with-dialog.d.ts.map +1 -0
- package/dist/src/hooks/use-before-unload.d.ts +2 -0
- package/dist/src/hooks/use-before-unload.d.ts.map +1 -0
- package/dist/src/hooks/use-before-unload.js +30 -0
- package/dist/src/hooks/use-mobile.d.ts +2 -0
- package/dist/src/hooks/use-mobile.d.ts.map +1 -0
- package/dist/src/hooks/use-mobile.js +15 -0
- package/dist/src/hooks/use-unsaved-changes.d.ts +1 -0
- package/dist/src/hooks/use-unsaved-changes.d.ts.map +1 -0
- package/dist/src/lib/api/get-middleware-api.d.ts +8 -0
- package/dist/src/lib/api/get-middleware-api.d.ts.map +1 -0
- package/dist/src/lib/api/get-middleware-api.js +13 -0
- package/dist/src/lib/api/get-session-admin-api.d.ts +16 -0
- package/dist/src/lib/api/get-session-admin-api.d.ts.map +1 -0
- package/dist/src/lib/api/get-session-admin-api.js +19 -0
- package/dist/src/lib/api/get-session-api.d.ts +17 -0
- package/dist/src/lib/api/get-session-api.d.ts.map +1 -0
- package/dist/src/lib/api/get-session-api.js +14 -0
- package/dist/src/lib/colors.d.ts +23 -0
- package/dist/src/lib/colors.d.ts.map +1 -0
- package/dist/src/lib/colors.js +131 -0
- package/dist/src/lib/colors.test.d.ts +2 -0
- package/dist/src/lib/colors.test.d.ts.map +1 -0
- package/dist/src/lib/colors.test.js +173 -0
- package/dist/src/lib/config.d.ts +6 -0
- package/dist/src/lib/config.d.ts.map +1 -0
- package/dist/src/lib/config.js +15 -0
- package/dist/src/lib/fetcher/cookie-from-string-to-object.d.ts +10 -0
- package/dist/src/lib/fetcher/cookie-from-string-to-object.d.ts.map +1 -0
- package/dist/src/lib/fetcher/cookie-from-string-to-object.js +12 -0
- package/dist/src/lib/fetcher/cookie-from-string-to-object.test.d.ts +2 -0
- package/dist/src/lib/fetcher/cookie-from-string-to-object.test.d.ts.map +1 -0
- package/dist/src/lib/fetcher/cookie-from-string-to-object.test.js +78 -0
- package/dist/src/lib/fetcher/fetcher.d.ts +9 -0
- package/dist/src/lib/fetcher/fetcher.d.ts.map +1 -0
- package/dist/src/lib/fetcher/helpers.d.ts +3 -0
- package/dist/src/lib/fetcher/helpers.d.ts.map +1 -0
- package/dist/src/lib/fetcher/helpers.js +33 -0
- package/dist/src/lib/fetcher/helpers.test.d.ts +2 -0
- package/dist/src/lib/fetcher/helpers.test.d.ts.map +1 -0
- package/dist/src/lib/fetcher/helpers.test.js +37 -0
- package/dist/src/lib/fetcher/index.d.ts +34 -0
- package/dist/src/lib/fetcher/index.d.ts.map +1 -0
- package/dist/src/lib/fetcher/types.d.ts +120 -0
- package/dist/src/lib/fetcher/types.d.ts.map +1 -0
- package/dist/src/lib/fetcher/types.js +1 -0
- package/dist/src/lib/fetcher.d.ts +9 -0
- package/dist/src/lib/fetcher.d.ts.map +1 -0
- package/dist/src/lib/fetcher.js +47 -0
- package/dist/src/lib/helpers/auto-form.d.ts +10 -0
- package/dist/src/lib/helpers/auto-form.d.ts.map +1 -0
- package/dist/src/lib/helpers/auto-form.js +82 -0
- package/dist/src/lib/helpers/auto-form.test.d.ts +2 -0
- package/dist/src/lib/helpers/auto-form.test.d.ts.map +1 -0
- package/dist/src/lib/helpers/auto-form.test.js +126 -0
- package/dist/src/lib/navigation.d.ts +339 -0
- package/dist/src/lib/navigation.d.ts.map +1 -0
- package/dist/src/lib/navigation.js +11 -0
- package/dist/src/lib/plugin.d.ts +15 -0
- package/dist/src/lib/plugin.d.ts.map +1 -0
- package/dist/src/lib/plugin.js +3 -0
- package/dist/src/lib/special-characters.d.ts +3 -0
- package/dist/src/lib/special-characters.d.ts.map +1 -0
- package/dist/src/lib/special-characters.js +4 -0
- package/dist/src/lib/special-characters.test.d.ts +2 -0
- package/dist/src/lib/special-characters.test.d.ts.map +1 -0
- package/dist/src/lib/special-characters.test.js +56 -0
- package/dist/src/lib/utils.d.ts +3 -0
- package/dist/src/lib/utils.d.ts.map +1 -0
- package/dist/src/lib/utils.js +5 -0
- package/dist/src/tests/setup.d.ts +2 -0
- package/dist/src/tests/setup.d.ts.map +1 -0
- package/dist/src/tests/setup.js +6 -0
- package/dist/src/views/admin/layouts/admin-layout.d.ts +8 -0
- package/dist/src/views/admin/layouts/admin-layout.d.ts.map +1 -0
- package/dist/src/views/admin/layouts/admin-layout.js +70 -0
- package/dist/src/views/admin/layouts/sidebar/nav/item.d.ts +11 -0
- package/dist/src/views/admin/layouts/sidebar/nav/item.d.ts.map +1 -0
- package/dist/src/views/admin/layouts/sidebar/nav/item.js +70 -0
- package/dist/src/views/admin/layouts/sidebar/nav/nav.d.ts +10 -0
- package/dist/src/views/admin/layouts/sidebar/nav/nav.d.ts.map +1 -0
- package/dist/src/views/admin/layouts/sidebar/nav/nav.js +49 -0
- package/dist/src/views/admin/layouts/sidebar/sidebar.d.ts +3 -0
- package/dist/src/views/admin/layouts/sidebar/sidebar.d.ts.map +1 -0
- package/dist/src/views/admin/layouts/sidebar/sidebar.js +30 -0
- package/dist/src/views/admin/layouts/sidebar/sign-out.d.ts +4 -0
- package/dist/src/views/admin/layouts/sidebar/sign-out.d.ts.map +1 -0
- package/dist/src/views/admin/layouts/sidebar/sign-out.js +14 -0
- package/dist/src/views/admin/layouts/user-bar/client.d.ts +7 -0
- package/dist/src/views/admin/layouts/user-bar/client.d.ts.map +1 -0
- package/dist/src/views/admin/layouts/user-bar/client.js +61 -0
- package/dist/src/views/admin/layouts/user-bar/user-bar.d.ts +3 -0
- package/dist/src/views/admin/layouts/user-bar/user-bar.d.ts.map +1 -0
- package/dist/src/views/admin/layouts/user-bar/user-bar.js +31 -0
- package/dist/src/views/admin/sign-in/sign-in-admin-view.d.ts +2 -0
- package/dist/src/views/admin/sign-in/sign-in-admin-view.d.ts.map +1 -0
- package/dist/src/views/admin/sign-in/sign-in-admin-view.js +26 -0
- package/dist/src/views/admin/views/core/dashboard/dashboard-admin-view.d.ts +2 -0
- package/dist/src/views/admin/views/core/dashboard/dashboard-admin-view.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/dashboard/dashboard-admin-view.js +44 -0
- package/dist/src/views/admin/views/core/test.d.ts +2 -0
- package/dist/src/views/admin/views/core/test.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/test.js +146 -0
- package/dist/src/views/admin/views/core/users/users-admin-view.d.ts +4 -0
- package/dist/src/views/admin/views/core/users/users-admin-view.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/users/users-admin-view.js +90 -0
- package/dist/src/views/auth/components/password-input.d.ts +4 -0
- package/dist/src/views/auth/components/password-input.d.ts.map +1 -0
- package/dist/src/views/auth/components/password-input.js +89 -0
- package/dist/src/views/auth/sign-in/form/form.d.ts +4 -0
- package/dist/src/views/auth/sign-in/form/form.d.ts.map +1 -0
- package/dist/src/views/auth/sign-in/form/form.js +59 -0
- package/dist/src/views/auth/sign-in/form/hooks/mutation-api.d.ts +10 -0
- package/dist/src/views/auth/sign-in/form/hooks/mutation-api.d.ts.map +1 -0
- package/dist/src/views/auth/sign-in/form/hooks/mutation-api.js +33 -0
- package/dist/src/views/auth/sign-in/form/hooks/use-form.d.ts +27 -0
- package/dist/src/views/auth/sign-in/form/hooks/use-form.d.ts.map +1 -0
- package/dist/src/views/auth/sign-in/form/hooks/use-form.js +38 -0
- package/dist/src/views/auth/sign-in/sign-in-view.d.ts +2 -0
- package/dist/src/views/auth/sign-in/sign-in-view.d.ts.map +1 -0
- package/dist/src/views/auth/sign-in/sign-in-view.js +55 -0
- package/dist/src/views/auth/sign-up/form/form.d.ts +4 -0
- package/dist/src/views/auth/sign-up/form/form.d.ts.map +1 -0
- package/dist/src/views/auth/sign-up/form/form.js +88 -0
- package/dist/src/views/auth/sign-up/form/hooks/mutation-api.d.ts +6 -0
- package/dist/src/views/auth/sign-up/form/hooks/mutation-api.d.ts.map +1 -0
- package/dist/src/views/auth/sign-up/form/hooks/mutation-api.js +18 -0
- package/dist/src/views/auth/sign-up/form/hooks/use-form.d.ts +61 -0
- package/dist/src/views/auth/sign-up/form/hooks/use-form.d.ts.map +1 -0
- package/dist/src/views/auth/sign-up/form/hooks/use-form.js +57 -0
- package/dist/src/views/auth/sign-up/sign-up-view.d.ts +2 -0
- package/dist/src/views/auth/sign-up/sign-up-view.d.ts.map +1 -0
- package/dist/src/views/auth/sign-up/sign-up-view.js +61 -0
- package/dist/src/views/auth/sso/buttons/client.d.ts +5 -0
- package/dist/src/views/auth/sso/buttons/client.d.ts.map +1 -0
- package/dist/src/views/auth/sso/buttons/client.js +22 -0
- package/dist/src/views/auth/sso/buttons/mutation-api.d.ts +4 -0
- package/dist/src/views/auth/sso/buttons/mutation-api.d.ts.map +1 -0
- package/dist/src/views/auth/sso/buttons/mutation-api.js +24 -0
- package/dist/src/views/auth/sso/buttons/sso-buttons.d.ts +3 -0
- package/dist/src/views/auth/sso/buttons/sso-buttons.d.ts.map +1 -0
- package/dist/src/views/auth/sso/buttons/sso-buttons.js +51 -0
- package/dist/src/views/auth/sso/callback/callback-sso-view.d.ts +5 -0
- package/dist/src/views/auth/sso/callback/callback-sso-view.d.ts.map +1 -0
- package/dist/src/views/auth/sso/callback/callback-sso-view.js +18 -0
- package/dist/src/views/auth/sso/callback/client/client.d.ts +6 -0
- package/dist/src/views/auth/sso/callback/client/client.d.ts.map +1 -0
- package/dist/src/views/auth/sso/callback/client/client.js +39 -0
- package/dist/src/views/auth/sso/callback/client/mutation-api.d.ts +8 -0
- package/dist/src/views/auth/sso/callback/client/mutation-api.d.ts.map +1 -0
- package/dist/src/views/auth/sso/callback/client/mutation-api.js +27 -0
- package/dist/src/views/error/back-button.d.ts +5 -0
- package/dist/src/views/error/back-button.d.ts.map +1 -0
- package/dist/src/views/error/back-button.js +14 -0
- package/dist/src/views/error/error-view.d.ts +5 -0
- package/dist/src/views/error/error-view.d.ts.map +1 -0
- package/dist/src/views/error/error-view.js +56 -0
- package/dist/src/views/error/global-error-view.d.ts +6 -0
- package/dist/src/views/error/global-error-view.d.ts.map +1 -0
- package/dist/src/views/error/global-error-view.js +57 -0
- package/dist/src/views/layouts/provider.d.ts +11 -0
- package/dist/src/views/layouts/provider.d.ts.map +1 -0
- package/dist/src/views/layouts/provider.js +43 -0
- package/dist/src/views/layouts/root-layout.d.ts +16 -0
- package/dist/src/views/layouts/root-layout.d.ts.map +1 -0
- package/dist/src/views/layouts/root-layout.js +38 -0
- package/dist/src/views/layouts/theme/header/header.d.ts +4 -0
- package/dist/src/views/layouts/theme/header/header.d.ts.map +1 -0
- package/dist/src/views/layouts/theme/header/header.js +32 -0
- package/dist/src/views/layouts/theme/header/user/auth/auth.d.ts +2 -0
- package/dist/src/views/layouts/theme/header/user/auth/auth.d.ts.map +1 -0
- package/dist/src/views/layouts/theme/header/user/auth/auth.js +33 -0
- package/dist/src/views/layouts/theme/header/user/auth/client.d.ts +5 -0
- package/dist/src/views/layouts/theme/header/user/auth/client.d.ts.map +1 -0
- package/dist/src/views/layouts/theme/header/user/auth/client.js +47 -0
- package/dist/src/views/layouts/theme/header/user/auth/log-out-mutation-api.d.ts +4 -0
- package/dist/src/views/layouts/theme/header/user/auth/log-out-mutation-api.d.ts.map +1 -0
- package/dist/src/views/layouts/theme/header/user/auth/log-out-mutation-api.js +27 -0
- package/dist/src/views/layouts/theme/header/user/user.d.ts +2 -0
- package/dist/src/views/layouts/theme/header/user/user.d.ts.map +1 -0
- package/dist/src/views/layouts/theme/header/user/user.js +34 -0
- package/dist/src/views/layouts/theme/layout.d.ts +5 -0
- package/dist/src/views/layouts/theme/layout.d.ts.map +1 -0
- package/dist/src/views/layouts/theme/layout.js +15 -0
- package/dist/src/vitnode.config.d.ts +50 -0
- package/dist/src/vitnode.config.d.ts.map +1 -0
- package/dist/src/vitnode.config.js +39 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/tsup.config.d.ts +3 -0
- package/dist/tsup.config.d.ts.map +1 -0
- package/dist/vitest.config.d.ts +3 -0
- package/dist/vitest.config.d.ts.map +1 -0
- package/package.json +94 -0
- package/src/app/login/page.tsx +21 -0
- package/src/app/login/sso/[providerId]/page.tsx +19 -0
- package/src/app/register/page.tsx +21 -0
- package/src/app_admin/core/page.tsx +5 -0
- package/src/app_admin/core/test/page.tsx +5 -0
- package/src/app_admin/core/users/page.tsx +35 -0
- package/src/database/admins.ts +87 -0
- package/src/database/languages.ts +54 -0
- package/src/database/moderators.ts +42 -0
- package/src/database/roles.ts +15 -0
- package/src/database/sessions.ts +59 -0
- package/src/database/users.ts +142 -0
- package/src/locales/en.json +156 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"users-admin-view.d.ts","sourceRoot":"","sources":["../../../../../../../src/views/admin/views/core/users/users-admin-view.tsx"],"names":[],"mappings":"AAeA,eAAO,MAAM,cAAc,GAAU,mBAElC;IACD,YAAY,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC,CAAC;CACtE,qDA4DA,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { MailIcon } from "lucide-react";
|
|
3
|
+
import { getTranslations } from "next-intl/server";
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { adminModule } from "../../../../../api/modules/admin/admin.module";
|
|
6
|
+
import { Avatar } from "../../../../../components/avatar";
|
|
7
|
+
import { DateFormat } from "../../../../../components/date-format";
|
|
8
|
+
import { DataTable } from "../../../../../components/table/data-table";
|
|
9
|
+
import { Tooltip, TooltipContent, TooltipTrigger } from "../../../../../components/ui/tooltip";
|
|
10
|
+
import { fetcher } from "../../../../../lib/fetcher";
|
|
11
|
+
export const UsersAdminView = async ({ searchParams })=>{
|
|
12
|
+
const t = await getTranslations('admin.user.list');
|
|
13
|
+
const query = await searchParams;
|
|
14
|
+
const res = await fetcher(adminModule, {
|
|
15
|
+
path: '/list',
|
|
16
|
+
method: 'get',
|
|
17
|
+
module: 'admin/users',
|
|
18
|
+
args: {
|
|
19
|
+
query
|
|
20
|
+
},
|
|
21
|
+
withPagination: true
|
|
22
|
+
});
|
|
23
|
+
const data = await res.json();
|
|
24
|
+
return /*#__PURE__*/ _jsx(DataTable, {
|
|
25
|
+
columns: [
|
|
26
|
+
{
|
|
27
|
+
id: 'name',
|
|
28
|
+
label: t('user'),
|
|
29
|
+
cell: ({ row })=>/*#__PURE__*/ _jsxs("div", {
|
|
30
|
+
className: "flex items-center gap-3",
|
|
31
|
+
children: [
|
|
32
|
+
/*#__PURE__*/ _jsx(Avatar, {
|
|
33
|
+
size: 32,
|
|
34
|
+
user: row
|
|
35
|
+
}),
|
|
36
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
37
|
+
className: "flex flex-col",
|
|
38
|
+
children: [
|
|
39
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
40
|
+
className: "flex items-center gap-2",
|
|
41
|
+
children: [
|
|
42
|
+
/*#__PURE__*/ _jsx("span", {
|
|
43
|
+
className: "font-medium",
|
|
44
|
+
children: row.name
|
|
45
|
+
}),
|
|
46
|
+
!row.emailVerified && /*#__PURE__*/ _jsxs(Tooltip, {
|
|
47
|
+
children: [
|
|
48
|
+
/*#__PURE__*/ _jsx(TooltipTrigger, {
|
|
49
|
+
children: /*#__PURE__*/ _jsx(MailIcon, {
|
|
50
|
+
className: "text-destructive size-4"
|
|
51
|
+
})
|
|
52
|
+
}),
|
|
53
|
+
/*#__PURE__*/ _jsx(TooltipContent, {
|
|
54
|
+
children: t('emailNotVerified')
|
|
55
|
+
})
|
|
56
|
+
]
|
|
57
|
+
})
|
|
58
|
+
]
|
|
59
|
+
}),
|
|
60
|
+
/*#__PURE__*/ _jsx("span", {
|
|
61
|
+
className: "text-muted-foreground text-sm",
|
|
62
|
+
children: row.email
|
|
63
|
+
})
|
|
64
|
+
]
|
|
65
|
+
})
|
|
66
|
+
]
|
|
67
|
+
})
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
id: 'createdAt',
|
|
71
|
+
label: t('createdAt'),
|
|
72
|
+
cell: ({ row })=>/*#__PURE__*/ _jsx(DateFormat, {
|
|
73
|
+
date: row.createdAt
|
|
74
|
+
})
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
edges: data.edges,
|
|
78
|
+
order: {
|
|
79
|
+
columns: [
|
|
80
|
+
'createdAt',
|
|
81
|
+
'name'
|
|
82
|
+
],
|
|
83
|
+
defaultOrder: {
|
|
84
|
+
column: 'createdAt',
|
|
85
|
+
order: 'desc'
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
pageInfo: data.pageInfo
|
|
89
|
+
});
|
|
90
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Input } from '../../../components/ui/input';
|
|
3
|
+
export declare const PasswordInput: ({ value: valueFromProps, ...props }: Omit<React.ComponentProps<typeof Input>, "type">) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=password-input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"password-input.d.ts","sourceRoot":"","sources":["../../../../../src/views/auth/components/password-input.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAQ9C,eAAO,MAAM,aAAa,GAAI,qCAG3B,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,KAAK,CAAC,EAAE,MAAM,CAAC,4CAyElD,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { CheckIcon, XIcon } from "lucide-react";
|
|
3
|
+
import { useTranslations } from "next-intl";
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { AutoFormLabel } from "../../../components/form/common/label";
|
|
6
|
+
import { FormControl, FormItem, FormMessage } from "../../../components/ui/form";
|
|
7
|
+
import { Input } from "../../../components/ui/input";
|
|
8
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../../../components/ui/tooltip";
|
|
9
|
+
export const PasswordInput = ({ value: valueFromProps, ...props })=>{
|
|
10
|
+
const t = useTranslations('core.auth.sign_up');
|
|
11
|
+
const [openTooltip, setOpenTooltip] = React.useState(false);
|
|
12
|
+
const value = valueFromProps?.toString() ?? '';
|
|
13
|
+
const regexArray = [
|
|
14
|
+
{
|
|
15
|
+
regex: /^.{8,}$/.test(value),
|
|
16
|
+
id: 'min_length'
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
regex: /[A-Z]/.test(value),
|
|
20
|
+
id: 'uppercase'
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
regex: /\d/.test(value),
|
|
24
|
+
id: 'number'
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
regex: /\W|_/.test(value),
|
|
28
|
+
id: 'special_char'
|
|
29
|
+
}
|
|
30
|
+
];
|
|
31
|
+
return /*#__PURE__*/ _jsxs(FormItem, {
|
|
32
|
+
children: [
|
|
33
|
+
/*#__PURE__*/ _jsx(AutoFormLabel, {
|
|
34
|
+
children: t('password.label')
|
|
35
|
+
}),
|
|
36
|
+
/*#__PURE__*/ _jsx(TooltipProvider, {
|
|
37
|
+
delayDuration: 0,
|
|
38
|
+
children: /*#__PURE__*/ _jsxs(Tooltip, {
|
|
39
|
+
open: openTooltip,
|
|
40
|
+
children: [
|
|
41
|
+
/*#__PURE__*/ _jsx(TooltipTrigger, {
|
|
42
|
+
asChild: true,
|
|
43
|
+
children: /*#__PURE__*/ _jsx(FormControl, {
|
|
44
|
+
children: /*#__PURE__*/ _jsx(Input, {
|
|
45
|
+
type: "password",
|
|
46
|
+
value: value,
|
|
47
|
+
...props,
|
|
48
|
+
onBlur: (e)=>{
|
|
49
|
+
setOpenTooltip(false);
|
|
50
|
+
props.onBlur?.(e);
|
|
51
|
+
},
|
|
52
|
+
onFocus: (e)=>{
|
|
53
|
+
setOpenTooltip(true);
|
|
54
|
+
props.onFocus?.(e);
|
|
55
|
+
}
|
|
56
|
+
})
|
|
57
|
+
})
|
|
58
|
+
}),
|
|
59
|
+
/*#__PURE__*/ _jsxs(TooltipContent, {
|
|
60
|
+
className: "flex flex-col gap-2 text-sm",
|
|
61
|
+
sideOffset: 8,
|
|
62
|
+
children: [
|
|
63
|
+
/*#__PURE__*/ _jsx("span", {
|
|
64
|
+
className: "text-based font-semibold",
|
|
65
|
+
children: t('password.requirements.label')
|
|
66
|
+
}),
|
|
67
|
+
/*#__PURE__*/ _jsx("ul", {
|
|
68
|
+
className: "space-y-1",
|
|
69
|
+
children: regexArray.map(({ regex, id })=>/*#__PURE__*/ _jsxs("li", {
|
|
70
|
+
className: "flex items-center gap-1",
|
|
71
|
+
children: [
|
|
72
|
+
regex ? /*#__PURE__*/ _jsx(CheckIcon, {
|
|
73
|
+
className: "size-4"
|
|
74
|
+
}) : /*#__PURE__*/ _jsx(XIcon, {
|
|
75
|
+
className: "size-4"
|
|
76
|
+
}),
|
|
77
|
+
t(`password.requirements.${id}`)
|
|
78
|
+
]
|
|
79
|
+
}, id))
|
|
80
|
+
})
|
|
81
|
+
]
|
|
82
|
+
})
|
|
83
|
+
]
|
|
84
|
+
})
|
|
85
|
+
}),
|
|
86
|
+
/*#__PURE__*/ _jsx(FormMessage, {})
|
|
87
|
+
]
|
|
88
|
+
});
|
|
89
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../../../../../src/views/auth/sign-in/form/form.tsx"],"names":[],"mappings":"AAWA,eAAO,MAAM,UAAU,GAAI,aAAa;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,4CA0C5D,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { AlertCircle } from "lucide-react";
|
|
4
|
+
import { useTranslations } from "next-intl";
|
|
5
|
+
import { AutoForm } from "../../../../components/form/auto-form";
|
|
6
|
+
import { AutoFormInput } from "../../../../components/form/fields/input";
|
|
7
|
+
import { Alert, AlertDescription, AlertTitle } from "../../../../components/ui/alert";
|
|
8
|
+
import { useFormSignIn } from "./hooks/use-form";
|
|
9
|
+
export const FormSignIn = ({ isAdmin })=>{
|
|
10
|
+
const t = useTranslations('core.auth.sign_in');
|
|
11
|
+
const { onSubmit, error, formSchema } = useFormSignIn({
|
|
12
|
+
isAdmin
|
|
13
|
+
});
|
|
14
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
15
|
+
className: "space-y-4",
|
|
16
|
+
children: [
|
|
17
|
+
error && /*#__PURE__*/ _jsxs(Alert, {
|
|
18
|
+
variant: "destructive",
|
|
19
|
+
children: [
|
|
20
|
+
/*#__PURE__*/ _jsx(AlertCircle, {
|
|
21
|
+
className: "size-4"
|
|
22
|
+
}),
|
|
23
|
+
/*#__PURE__*/ _jsx(AlertTitle, {
|
|
24
|
+
children: t(`errors.${error}.title`)
|
|
25
|
+
}),
|
|
26
|
+
/*#__PURE__*/ _jsx(AlertDescription, {
|
|
27
|
+
children: t(`errors.${error}.desc`)
|
|
28
|
+
})
|
|
29
|
+
]
|
|
30
|
+
}),
|
|
31
|
+
/*#__PURE__*/ _jsx(AutoForm, {
|
|
32
|
+
fields: [
|
|
33
|
+
{
|
|
34
|
+
id: 'email',
|
|
35
|
+
component: (props)=>/*#__PURE__*/ _jsx(AutoFormInput, {
|
|
36
|
+
label: t('email.label'),
|
|
37
|
+
type: "email",
|
|
38
|
+
...props
|
|
39
|
+
})
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
id: 'password',
|
|
43
|
+
component: (props)=>/*#__PURE__*/ _jsx(AutoFormInput, {
|
|
44
|
+
label: t('password.label'),
|
|
45
|
+
type: "password",
|
|
46
|
+
...props
|
|
47
|
+
})
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
formSchema: formSchema,
|
|
51
|
+
onSubmit: onSubmit,
|
|
52
|
+
submitButtonProps: {
|
|
53
|
+
className: 'w-full',
|
|
54
|
+
children: t('submit')
|
|
55
|
+
}
|
|
56
|
+
})
|
|
57
|
+
]
|
|
58
|
+
});
|
|
59
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { z } from 'zod';
|
|
2
|
+
import type { zodSignInSchema } from '../../../../../api/modules/users/routes/sign-in.route';
|
|
3
|
+
export declare const mutationApi: (input: z.infer<typeof zodSignInSchema> & {
|
|
4
|
+
isAdmin?: boolean;
|
|
5
|
+
}) => Promise<{
|
|
6
|
+
readonly message: "access_denied";
|
|
7
|
+
} | {
|
|
8
|
+
readonly message: "Internal Server Error";
|
|
9
|
+
} | undefined>;
|
|
10
|
+
//# sourceMappingURL=mutation-api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mutation-api.d.ts","sourceRoot":"","sources":["../../../../../../../src/views/auth/sign-in/form/hooks/mutation-api.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAI7B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAMhF,eAAO,MAAM,WAAW,GACtB,OAAO,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,GAAG;IACvC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;;;;cA4BF,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use server';
|
|
2
|
+
import { revalidatePath } from "next/cache";
|
|
3
|
+
import { usersModule } from "../../../../../api/modules/users/users.module";
|
|
4
|
+
import { fetcher } from "../../../../../lib/fetcher";
|
|
5
|
+
import { redirect } from "../../../../../lib/navigation";
|
|
6
|
+
export const mutationApi = async (input)=>{
|
|
7
|
+
const res = await fetcher(usersModule, {
|
|
8
|
+
path: '/sign_in',
|
|
9
|
+
method: 'post',
|
|
10
|
+
module: 'users',
|
|
11
|
+
allowSaveCookies: true,
|
|
12
|
+
args: {
|
|
13
|
+
body: input
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
if (res.status === 403) {
|
|
17
|
+
return {
|
|
18
|
+
message: 'access_denied'
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
if (res.status !== 201) {
|
|
22
|
+
return {
|
|
23
|
+
message: 'Internal Server Error'
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
if (input.isAdmin) {
|
|
27
|
+
revalidatePath('/[locale]/admin', 'layout');
|
|
28
|
+
await redirect('/admin/core');
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
revalidatePath('/[locale]/(main)', 'layout');
|
|
32
|
+
await redirect('/');
|
|
33
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const useFormSignIn: ({ isAdmin }: {
|
|
3
|
+
isAdmin?: boolean;
|
|
4
|
+
}) => {
|
|
5
|
+
onSubmit: (values: z.infer<z.ZodObject<{
|
|
6
|
+
email: z.ZodDefault<z.ZodString>;
|
|
7
|
+
password: z.ZodDefault<z.ZodString>;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
email: string;
|
|
10
|
+
password: string;
|
|
11
|
+
}, {
|
|
12
|
+
email?: string | undefined;
|
|
13
|
+
password?: string | undefined;
|
|
14
|
+
}>>) => Promise<void>;
|
|
15
|
+
error: "" | "access_denied";
|
|
16
|
+
formSchema: z.ZodObject<{
|
|
17
|
+
email: z.ZodDefault<z.ZodString>;
|
|
18
|
+
password: z.ZodDefault<z.ZodString>;
|
|
19
|
+
}, "strip", z.ZodTypeAny, {
|
|
20
|
+
email: string;
|
|
21
|
+
password: string;
|
|
22
|
+
}, {
|
|
23
|
+
email?: string | undefined;
|
|
24
|
+
password?: string | undefined;
|
|
25
|
+
}>;
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=use-form.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-form.d.ts","sourceRoot":"","sources":["../../../../../../../src/views/auth/sign-in/form/hooks/use-form.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,aAAa,GAAI,aAAa;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE;uBAe9B,CAAC,CAAC,KAAK;;;;;;;;;OAAmB;;;;;;;;;;;;CAiB3D,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { useTranslations } from "next-intl";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { toast } from "sonner";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import { mutationApi } from "./mutation-api";
|
|
6
|
+
export const useFormSignIn = ({ isAdmin })=>{
|
|
7
|
+
const [error, setError] = React.useState('');
|
|
8
|
+
const t = useTranslations('core.auth.sign_in');
|
|
9
|
+
const tErrors = useTranslations('core.global.errors');
|
|
10
|
+
const formSchema = z.object({
|
|
11
|
+
email: z.string().email({
|
|
12
|
+
message: t('email.invalid')
|
|
13
|
+
}).default(''),
|
|
14
|
+
password: z.string().min(1, {
|
|
15
|
+
message: t('password.required')
|
|
16
|
+
}).default('')
|
|
17
|
+
});
|
|
18
|
+
const onSubmit = async (values)=>{
|
|
19
|
+
setError('');
|
|
20
|
+
const mutation = await mutationApi({
|
|
21
|
+
...values,
|
|
22
|
+
isAdmin
|
|
23
|
+
});
|
|
24
|
+
if (!mutation?.message) return;
|
|
25
|
+
if (mutation?.message !== 'Internal Server Error') {
|
|
26
|
+
setError(mutation.message);
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
toast.error(tErrors('title'), {
|
|
30
|
+
description: tErrors('internal_server_error')
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
return {
|
|
34
|
+
onSubmit,
|
|
35
|
+
error,
|
|
36
|
+
formSchema
|
|
37
|
+
};
|
|
38
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sign-in-view.d.ts","sourceRoot":"","sources":["../../../../../src/views/auth/sign-in/sign-in-view.tsx"],"names":[],"mappings":"AAUA,eAAO,MAAM,UAAU,wDAmCtB,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { getTranslations } from "next-intl/server";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { Card, CardDescription } from "../../../components/ui/card";
|
|
5
|
+
import { Link } from "../../../lib/navigation";
|
|
6
|
+
import { I18nProvider } from "../../../components/i18n-provider";
|
|
7
|
+
import { SSOButtons, SSOButtonsSkeleton } from "../sso/buttons/sso-buttons";
|
|
8
|
+
import { FormSignIn } from "./form/form";
|
|
9
|
+
export const SignInView = async ()=>{
|
|
10
|
+
const t = await getTranslations('core.auth.sign_in');
|
|
11
|
+
const tGlobal = await getTranslations('core.global');
|
|
12
|
+
return /*#__PURE__*/ _jsx(I18nProvider, {
|
|
13
|
+
namespaces: "core.auth.sign_in",
|
|
14
|
+
children: /*#__PURE__*/ _jsx("div", {
|
|
15
|
+
className: "mx-auto flex min-h-[calc(100vh-4rem)] max-w-md flex-col justify-center px-4 py-16",
|
|
16
|
+
children: /*#__PURE__*/ _jsxs(Card, {
|
|
17
|
+
className: "bg-muted gap-0 p-0",
|
|
18
|
+
children: [
|
|
19
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
20
|
+
className: "bg-card rounded-xl p-6",
|
|
21
|
+
children: [
|
|
22
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
23
|
+
className: "mb-10 space-y-2 text-center",
|
|
24
|
+
children: [
|
|
25
|
+
/*#__PURE__*/ _jsx("h1", {
|
|
26
|
+
className: "text-2xl font-semibold leading-none tracking-tight",
|
|
27
|
+
children: tGlobal('login')
|
|
28
|
+
}),
|
|
29
|
+
/*#__PURE__*/ _jsx(CardDescription, {
|
|
30
|
+
children: t('desc')
|
|
31
|
+
})
|
|
32
|
+
]
|
|
33
|
+
}),
|
|
34
|
+
/*#__PURE__*/ _jsx(FormSignIn, {}),
|
|
35
|
+
/*#__PURE__*/ _jsx(React.Suspense, {
|
|
36
|
+
fallback: /*#__PURE__*/ _jsx(SSOButtonsSkeleton, {}),
|
|
37
|
+
children: /*#__PURE__*/ _jsx(SSOButtons, {})
|
|
38
|
+
})
|
|
39
|
+
]
|
|
40
|
+
}),
|
|
41
|
+
/*#__PURE__*/ _jsx("div", {
|
|
42
|
+
className: "text-accent-foreground p-6 text-center text-sm",
|
|
43
|
+
children: t.rich('do_not_have_account', {
|
|
44
|
+
link: (text)=>/*#__PURE__*/ _jsx(Link, {
|
|
45
|
+
className: "font-semibold",
|
|
46
|
+
href: "/register",
|
|
47
|
+
children: text
|
|
48
|
+
})
|
|
49
|
+
})
|
|
50
|
+
})
|
|
51
|
+
]
|
|
52
|
+
})
|
|
53
|
+
})
|
|
54
|
+
});
|
|
55
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../../../../../src/views/auth/sign-up/form/form.tsx"],"names":[],"mappings":"AAeA,eAAO,MAAM,UAAU,GAAI,aAAa;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,4CAsF3D,CAAC"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useTranslations } from "next-intl";
|
|
4
|
+
import { AutoForm } from "../../../../components/form/auto-form";
|
|
5
|
+
import { AutoFormCheckbox } from "../../../../components/form/fields/checkbox";
|
|
6
|
+
import { AutoFormInput } from "../../../../components/form/fields/input";
|
|
7
|
+
import { Link } from "../../../../lib/navigation";
|
|
8
|
+
import { removeSpecialCharacters } from "../../../../lib/special-characters";
|
|
9
|
+
import { PasswordInput } from "../../components/password-input";
|
|
10
|
+
import { useFormSignUp } from "./hooks/use-form";
|
|
11
|
+
export const FormSignUp = ({ isEmail })=>{
|
|
12
|
+
const t = useTranslations('core.auth.sign_up');
|
|
13
|
+
const { onSubmit, formSchema } = useFormSignUp();
|
|
14
|
+
return /*#__PURE__*/ _jsx(AutoForm, {
|
|
15
|
+
fields: [
|
|
16
|
+
{
|
|
17
|
+
id: 'name',
|
|
18
|
+
component: ({ field, shape })=>{
|
|
19
|
+
const value = field.value ?? '';
|
|
20
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
21
|
+
className: "space-y-2",
|
|
22
|
+
children: [
|
|
23
|
+
/*#__PURE__*/ _jsx(AutoFormInput, {
|
|
24
|
+
field: field,
|
|
25
|
+
label: t('username.label'),
|
|
26
|
+
shape: shape
|
|
27
|
+
}),
|
|
28
|
+
value.length >= 3 && /*#__PURE__*/ _jsx("div", {
|
|
29
|
+
className: "text-muted-foreground text-sm",
|
|
30
|
+
children: t.rich('username.your_user_code', {
|
|
31
|
+
code: ()=>/*#__PURE__*/ _jsx("span", {
|
|
32
|
+
className: "text-foreground",
|
|
33
|
+
children: removeSpecialCharacters(value)
|
|
34
|
+
})
|
|
35
|
+
})
|
|
36
|
+
})
|
|
37
|
+
]
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
id: 'email',
|
|
43
|
+
component: (props)=>/*#__PURE__*/ _jsx(AutoFormInput, {
|
|
44
|
+
label: t('email.label'),
|
|
45
|
+
type: "email",
|
|
46
|
+
...props
|
|
47
|
+
})
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
id: 'password',
|
|
51
|
+
component: ({ field })=>/*#__PURE__*/ _jsx(PasswordInput, {
|
|
52
|
+
...field
|
|
53
|
+
})
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
id: 'terms',
|
|
57
|
+
component: (props)=>/*#__PURE__*/ _jsx(AutoFormCheckbox, {
|
|
58
|
+
description: t.rich('terms.desc', {
|
|
59
|
+
link: (text)=>/*#__PURE__*/ _jsx(Link, {
|
|
60
|
+
className: "text-primary",
|
|
61
|
+
href: "/terms",
|
|
62
|
+
children: text
|
|
63
|
+
})
|
|
64
|
+
}),
|
|
65
|
+
label: t('terms.label'),
|
|
66
|
+
...props
|
|
67
|
+
})
|
|
68
|
+
},
|
|
69
|
+
...isEmail ? [
|
|
70
|
+
{
|
|
71
|
+
id: 'newsletter',
|
|
72
|
+
component: (props)=>/*#__PURE__*/ _jsx(AutoFormCheckbox, {
|
|
73
|
+
description: t('newsletter.desc'),
|
|
74
|
+
label: t('newsletter.label'),
|
|
75
|
+
...props
|
|
76
|
+
})
|
|
77
|
+
}
|
|
78
|
+
] : []
|
|
79
|
+
],
|
|
80
|
+
formSchema: formSchema,
|
|
81
|
+
mode: "all",
|
|
82
|
+
onSubmit: onSubmit,
|
|
83
|
+
submitButtonProps: {
|
|
84
|
+
className: 'w-full',
|
|
85
|
+
children: t('submit')
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { z } from 'zod';
|
|
2
|
+
import type { zodSignUpSchema } from '../../../../../api/modules/users/routes/sign-up.route';
|
|
3
|
+
export declare const mutationApi: (input: z.infer<typeof zodSignUpSchema>) => Promise<{
|
|
4
|
+
message: string;
|
|
5
|
+
} | undefined>;
|
|
6
|
+
//# sourceMappingURL=mutation-api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mutation-api.d.ts","sourceRoot":"","sources":["../../../../../../../src/views/auth/sign-up/form/hooks/mutation-api.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAKhF,eAAO,MAAM,WAAW,GAAU,OAAO,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC;;cAavE,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use server';
|
|
2
|
+
import { usersModule } from "../../../../../api/modules/users/users.module";
|
|
3
|
+
import { fetcher } from "../../../../../lib/fetcher";
|
|
4
|
+
export const mutationApi = async (input)=>{
|
|
5
|
+
const res = await fetcher(usersModule, {
|
|
6
|
+
path: '/sign_up',
|
|
7
|
+
method: 'post',
|
|
8
|
+
module: 'users',
|
|
9
|
+
args: {
|
|
10
|
+
body: input
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
if (res.status !== 200) {
|
|
14
|
+
return {
|
|
15
|
+
message: await res.text()
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { UseFormReturn } from 'react-hook-form';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export declare const useFormSignUp: () => {
|
|
4
|
+
onSubmit: (values: z.infer<z.ZodObject<{
|
|
5
|
+
name: z.ZodString;
|
|
6
|
+
email: z.ZodString;
|
|
7
|
+
password: z.ZodString;
|
|
8
|
+
terms: z.ZodEffects<z.ZodBoolean, boolean, boolean>;
|
|
9
|
+
newsletter: z.ZodOptional<z.ZodBoolean>;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
name: string;
|
|
12
|
+
email: string;
|
|
13
|
+
password: string;
|
|
14
|
+
terms: boolean;
|
|
15
|
+
newsletter?: boolean | undefined;
|
|
16
|
+
}, {
|
|
17
|
+
name: string;
|
|
18
|
+
email: string;
|
|
19
|
+
password: string;
|
|
20
|
+
terms: boolean;
|
|
21
|
+
newsletter?: boolean | undefined;
|
|
22
|
+
}>>, form: UseFormReturn<z.infer<z.ZodObject<{
|
|
23
|
+
name: z.ZodString;
|
|
24
|
+
email: z.ZodString;
|
|
25
|
+
password: z.ZodString;
|
|
26
|
+
terms: z.ZodEffects<z.ZodBoolean, boolean, boolean>;
|
|
27
|
+
newsletter: z.ZodOptional<z.ZodBoolean>;
|
|
28
|
+
}, "strip", z.ZodTypeAny, {
|
|
29
|
+
name: string;
|
|
30
|
+
email: string;
|
|
31
|
+
password: string;
|
|
32
|
+
terms: boolean;
|
|
33
|
+
newsletter?: boolean | undefined;
|
|
34
|
+
}, {
|
|
35
|
+
name: string;
|
|
36
|
+
email: string;
|
|
37
|
+
password: string;
|
|
38
|
+
terms: boolean;
|
|
39
|
+
newsletter?: boolean | undefined;
|
|
40
|
+
}>>>) => Promise<void>;
|
|
41
|
+
formSchema: z.ZodObject<{
|
|
42
|
+
name: z.ZodString;
|
|
43
|
+
email: z.ZodString;
|
|
44
|
+
password: z.ZodString;
|
|
45
|
+
terms: z.ZodEffects<z.ZodBoolean, boolean, boolean>;
|
|
46
|
+
newsletter: z.ZodOptional<z.ZodBoolean>;
|
|
47
|
+
}, "strip", z.ZodTypeAny, {
|
|
48
|
+
name: string;
|
|
49
|
+
email: string;
|
|
50
|
+
password: string;
|
|
51
|
+
terms: boolean;
|
|
52
|
+
newsletter?: boolean | undefined;
|
|
53
|
+
}, {
|
|
54
|
+
name: string;
|
|
55
|
+
email: string;
|
|
56
|
+
password: string;
|
|
57
|
+
terms: boolean;
|
|
58
|
+
newsletter?: boolean | undefined;
|
|
59
|
+
}>;
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=use-form.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-form.d.ts","sourceRoot":"","sources":["../../../../../../../src/views/auth/sign-up/form/hooks/use-form.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAIrD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,aAAa;uBA8Bd,CAAC,CAAC,KAAK;;;;;;;;;;;;;;;;;;OAAmB,QAC5B,aAAa,CAAC,CAAC,CAAC,KAAK;;;;;;;;;;;;;;;;;;OAAmB,CAAC;;;;;;;;;;;;;;;;;;;;CA4ClD,CAAC"}
|