@vitnode/core 1.2.0-canary.51 → 1.2.0-canary.53
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/config/next.config.ts +3 -3
- package/dist/scripts/get-config.d.ts +2 -2
- package/dist/scripts/get-config.d.ts.map +1 -1
- package/dist/scripts/plugin.d.ts.map +1 -1
- package/dist/scripts/prepare-database.d.ts.map +1 -1
- package/dist/scripts/prepare-plugins-files.d.ts.map +1 -1
- package/dist/scripts/scripts.js +4 -4
- package/dist/scripts/shared/file-utils.d.ts.map +1 -1
- package/dist/src/api/adapters/email/nodemailer.d.ts +1 -1
- package/dist/src/api/adapters/email/nodemailer.js +3 -3
- package/dist/src/api/adapters/email/resend.d.ts +1 -1
- package/dist/src/api/adapters/email/resend.js +2 -2
- package/dist/src/api/adapters/sso/discord.d.ts +1 -1
- package/dist/src/api/adapters/sso/discord.d.ts.map +1 -1
- package/dist/src/api/adapters/sso/discord.js +21 -21
- package/dist/src/api/adapters/sso/facebook.d.ts +1 -1
- package/dist/src/api/adapters/sso/facebook.d.ts.map +1 -1
- package/dist/src/api/adapters/sso/facebook.js +23 -23
- package/dist/src/api/adapters/sso/google.d.ts +1 -1
- package/dist/src/api/adapters/sso/google.d.ts.map +1 -1
- package/dist/src/api/adapters/sso/google.js +21 -21
- package/dist/src/api/config.d.ts +3 -3
- package/dist/src/api/config.d.ts.map +1 -1
- package/dist/src/api/config.js +11 -11
- package/dist/src/api/lib/check-plugin-id.js +8 -8
- package/dist/src/api/lib/logger-middleware.d.ts +1 -1
- package/dist/src/api/lib/logger-middleware.js +9 -9
- package/dist/src/api/lib/module.d.ts +2 -2
- package/dist/src/api/lib/plugin.d.ts +2 -2
- package/dist/src/api/lib/plugin.d.ts.map +1 -1
- package/dist/src/api/lib/route.d.ts +2 -2
- package/dist/src/api/lib/route.d.ts.map +1 -1
- package/dist/src/api/lib/route.js +1 -1
- package/dist/src/api/lib/with-pagination.d.ts +7 -7
- package/dist/src/api/lib/with-pagination.d.ts.map +1 -1
- package/dist/src/api/lib/with-pagination.js +37 -24
- package/dist/src/api/middlewares/captcha.middleware.d.ts +1 -1
- package/dist/src/api/middlewares/captcha.middleware.d.ts.map +1 -1
- package/dist/src/api/middlewares/captcha.middleware.js +14 -13
- package/dist/src/api/middlewares/global.middleware.d.ts +12 -20
- package/dist/src/api/middlewares/global.middleware.d.ts.map +1 -1
- package/dist/src/api/middlewares/global.middleware.js +29 -28
- package/dist/src/api/middlewares/rate-limiter.middleware.d.ts +3 -3
- package/dist/src/api/middlewares/rate-limiter.middleware.d.ts.map +1 -1
- package/dist/src/api/middlewares/rate-limiter.middleware.js +4 -4
- package/dist/src/api/models/device.d.ts +1 -1
- package/dist/src/api/models/device.d.ts.map +1 -1
- package/dist/src/api/models/device.js +13 -13
- package/dist/src/api/models/email.d.ts +27 -11
- package/dist/src/api/models/email.d.ts.map +1 -1
- package/dist/src/api/models/email.js +35 -22
- package/dist/src/api/models/password.d.ts +4 -0
- package/dist/src/api/models/password.d.ts.map +1 -1
- package/dist/src/api/models/password.js +15 -7
- package/dist/src/api/models/session-admin.d.ts +2 -1
- package/dist/src/api/models/session-admin.d.ts.map +1 -1
- package/dist/src/api/models/session-admin.js +19 -19
- package/dist/src/api/models/session.d.ts +2 -1
- package/dist/src/api/models/session.d.ts.map +1 -1
- package/dist/src/api/models/session.js +17 -17
- package/dist/src/api/models/sso.d.ts +1 -1
- package/dist/src/api/models/sso.d.ts.map +1 -1
- package/dist/src/api/models/sso.js +24 -24
- package/dist/src/api/models/user/get-user-by-id.d.ts +2 -1
- package/dist/src/api/models/user/get-user-by-id.d.ts.map +1 -1
- package/dist/src/api/models/user/get-user-by-id.js +3 -2
- package/dist/src/api/models/user/sign-in-with-passwords.d.ts +1 -1
- package/dist/src/api/models/user/sign-in-with-passwords.d.ts.map +1 -1
- package/dist/src/api/models/user/sign-in-with-passwords.js +1 -1
- package/dist/src/api/models/user/sign-up.d.ts +1 -1
- package/dist/src/api/models/user/sign-up.d.ts.map +1 -1
- package/dist/src/api/models/user/sign-up.js +13 -14
- package/dist/src/api/models/user.d.ts +1 -0
- package/dist/src/api/models/user.d.ts.map +1 -1
- package/dist/src/api/modules/admin/admin.module.d.ts +3 -3
- package/dist/src/api/modules/admin/admin.module.js +1 -1
- package/dist/src/api/modules/admin/debug/debug.admin.module.d.ts +1 -1
- package/dist/src/api/modules/admin/debug/debug.admin.module.js +1 -1
- package/dist/src/api/modules/admin/debug/routes/logs.route.d.ts +2 -2
- package/dist/src/api/modules/admin/debug/routes/logs.route.js +16 -16
- package/dist/src/api/modules/admin/routes/session.route.d.ts +2 -2
- package/dist/src/api/modules/admin/routes/session.route.js +7 -7
- package/dist/src/api/modules/admin/users/routes/list.route.d.ts +2 -2
- package/dist/src/api/modules/admin/users/routes/list.route.js +12 -12
- package/dist/src/api/modules/admin/users/routes/users.route.d.ts +2 -2
- package/dist/src/api/modules/admin/users/routes/users.route.js +15 -15
- package/dist/src/api/modules/admin/users/users.admin.module.d.ts +1 -1
- package/dist/src/api/modules/admin/users/users.admin.module.js +1 -1
- package/dist/src/api/modules/middleware/middleware.module.d.ts +1 -1
- package/dist/src/api/modules/middleware/middleware.module.js +1 -1
- package/dist/src/api/modules/middleware/route.d.ts +2 -2
- package/dist/src/api/modules/middleware/route.js +12 -12
- package/dist/src/api/modules/users/routes/change-password.route.d.ts +52 -0
- package/dist/src/api/modules/users/routes/change-password.route.d.ts.map +1 -0
- package/dist/src/api/modules/users/routes/change-password.route.js +58 -0
- package/dist/src/api/modules/users/routes/reset-passowrd.route.d.ts +42 -0
- package/dist/src/api/modules/users/routes/reset-passowrd.route.d.ts.map +1 -0
- package/dist/src/api/modules/users/routes/reset-passowrd.route.js +91 -0
- package/dist/src/api/modules/users/routes/session.route.d.ts +2 -2
- package/dist/src/api/modules/users/routes/session.route.js +6 -6
- package/dist/src/api/modules/users/routes/sign-in.route.d.ts +3 -3
- package/dist/src/api/modules/users/routes/sign-in.route.js +10 -10
- package/dist/src/api/modules/users/routes/sign-out.route.d.ts +2 -2
- package/dist/src/api/modules/users/routes/sign-out.route.js +7 -7
- package/dist/src/api/modules/users/routes/sign-up.route.d.ts +9 -3
- package/dist/src/api/modules/users/routes/sign-up.route.d.ts.map +1 -1
- package/dist/src/api/modules/users/routes/sign-up.route.js +18 -12
- package/dist/src/api/modules/users/routes/test.route.d.ts +3 -3
- package/dist/src/api/modules/users/routes/test.route.d.ts.map +1 -1
- package/dist/src/api/modules/users/routes/test.route.js +9 -15
- package/dist/src/api/modules/users/sso/routes/callback.route.d.ts +6 -3
- package/dist/src/api/modules/users/sso/routes/callback.route.d.ts.map +1 -1
- package/dist/src/api/modules/users/sso/routes/callback.route.js +10 -7
- package/dist/src/api/modules/users/sso/routes/create-url.route.d.ts +2 -2
- package/dist/src/api/modules/users/sso/routes/create-url.route.js +6 -6
- package/dist/src/api/modules/users/sso/sso.module.d.ts +6 -3
- package/dist/src/api/modules/users/sso/sso.module.d.ts.map +1 -1
- package/dist/src/api/modules/users/sso/sso.module.js +1 -1
- package/dist/src/api/modules/users/users.module.d.ts +103 -11
- package/dist/src/api/modules/users/users.module.d.ts.map +1 -1
- package/dist/src/api/modules/users/users.module.js +6 -2
- package/dist/src/app/login/page.d.ts +1 -1
- package/dist/src/app/login/page.js +2 -2
- package/dist/src/app/login/reset-password/page.d.ts +9 -0
- package/dist/src/app/login/reset-password/page.d.ts.map +1 -0
- package/dist/src/app/login/reset-password/page.js +18 -0
- package/dist/src/app/register/page.d.ts +1 -1
- package/dist/src/app/register/page.js +2 -2
- package/dist/src/app_admin/core/debug/page.d.ts +1 -1
- package/dist/src/app_admin/core/debug/page.js +8 -8
- package/dist/src/app_admin/core/users/page.d.ts +2 -2
- package/dist/src/app_admin/core/users/page.d.ts.map +1 -1
- package/dist/src/app_admin/core/users/page.js +7 -7
- package/dist/src/components/avatar.d.ts +1 -1
- package/dist/src/components/avatar.js +1 -1
- package/dist/src/components/confirm-action/confirm-action-alert-dialog.d.ts +2 -2
- package/dist/src/components/confirm-action/confirm-action-alert-dialog.js +5 -5
- package/dist/src/components/confirm-action/content.d.ts.map +1 -1
- package/dist/src/components/confirm-action/content.js +3 -4
- package/dist/src/components/date-format.js +8 -8
- package/dist/src/components/form/auto-form.d.ts +17 -16
- package/dist/src/components/form/auto-form.d.ts.map +1 -1
- package/dist/src/components/form/auto-form.js +15 -13
- package/dist/src/components/form/common/desc.js +1 -1
- package/dist/src/components/form/common/label.d.ts +4 -2
- package/dist/src/components/form/common/label.d.ts.map +1 -1
- package/dist/src/components/form/common/label.js +14 -4
- package/dist/src/components/form/fields/checkbox.d.ts +3 -3
- package/dist/src/components/form/fields/checkbox.d.ts.map +1 -1
- package/dist/src/components/form/fields/checkbox.js +2 -1
- package/dist/src/components/form/fields/combobox-async.d.ts +4 -4
- package/dist/src/components/form/fields/combobox-async.d.ts.map +1 -1
- package/dist/src/components/form/fields/combobox-async.js +31 -24
- package/dist/src/components/form/fields/combobox.d.ts +4 -4
- package/dist/src/components/form/fields/combobox.d.ts.map +1 -1
- package/dist/src/components/form/fields/combobox.js +8 -8
- package/dist/src/components/form/fields/input.d.ts +3 -3
- package/dist/src/components/form/fields/input.d.ts.map +1 -1
- package/dist/src/components/form/fields/input.js +4 -3
- package/dist/src/components/form/fields/radio-group.d.ts +4 -4
- package/dist/src/components/form/fields/radio-group.d.ts.map +1 -1
- package/dist/src/components/form/fields/radio-group.js +2 -2
- package/dist/src/components/form/fields/select.d.ts +4 -4
- package/dist/src/components/form/fields/select.d.ts.map +1 -1
- package/dist/src/components/form/fields/select.js +4 -4
- package/dist/src/components/form/fields/switch.d.ts +3 -3
- package/dist/src/components/form/fields/switch.d.ts.map +1 -1
- package/dist/src/components/form/fields/switch.js +2 -1
- package/dist/src/components/form/fields/textarea.d.ts +4 -4
- package/dist/src/components/form/fields/textarea.d.ts.map +1 -1
- package/dist/src/components/form/fields/textarea.js +3 -3
- package/dist/src/components/i18n-provider.d.ts +2 -2
- package/dist/src/components/i18n-provider.js +3 -3
- package/dist/src/components/logo-vitnode.d.ts.map +1 -1
- package/dist/src/components/logo-vitnode.js +8 -2
- package/dist/src/components/switchers/langs/language-swietcher.d.ts +1 -1
- package/dist/src/components/switchers/langs/language-swietcher.d.ts.map +1 -1
- package/dist/src/components/switchers/langs/language-swietcher.js +3 -3
- package/dist/src/components/switchers/themes/theme-switcher.js +4 -4
- package/dist/src/components/table/content.d.ts +1 -1
- package/dist/src/components/table/content.d.ts.map +1 -1
- package/dist/src/components/table/content.js +5 -5
- package/dist/src/components/table/data-table.d.ts +7 -7
- package/dist/src/components/table/data-table.d.ts.map +1 -1
- package/dist/src/components/table/data-table.js +22 -15
- package/dist/src/components/table/order-table-head.d.ts +4 -4
- package/dist/src/components/table/order-table-head.d.ts.map +1 -1
- package/dist/src/components/table/order-table-head.js +20 -9
- package/dist/src/components/table/pagination.js +19 -19
- package/dist/src/components/ui/accordion.d.ts +2 -2
- package/dist/src/components/ui/accordion.d.ts.map +1 -1
- package/dist/src/components/ui/accordion.js +4 -5
- package/dist/src/components/ui/alert-dialog.d.ts +7 -7
- package/dist/src/components/ui/alert-dialog.d.ts.map +1 -1
- package/dist/src/components/ui/alert-dialog.js +13 -14
- package/dist/src/components/ui/alert.d.ts +6 -6
- package/dist/src/components/ui/alert.d.ts.map +1 -1
- package/dist/src/components/ui/alert.js +6 -7
- package/dist/src/components/ui/badge.d.ts +4 -4
- package/dist/src/components/ui/badge.d.ts.map +1 -1
- package/dist/src/components/ui/badge.js +7 -8
- package/dist/src/components/ui/button-client.d.ts +1 -1
- package/dist/src/components/ui/button-client.js +9 -9
- package/dist/src/components/ui/button.d.ts +9 -9
- package/dist/src/components/ui/button.d.ts.map +1 -1
- package/dist/src/components/ui/button.js +14 -15
- package/dist/src/components/ui/card.d.ts +8 -8
- package/dist/src/components/ui/card.d.ts.map +1 -1
- package/dist/src/components/ui/card.js +7 -8
- package/dist/src/components/ui/checkbox.d.ts +2 -2
- package/dist/src/components/ui/checkbox.d.ts.map +1 -1
- package/dist/src/components/ui/checkbox.js +2 -3
- package/dist/src/components/ui/collapsible.d.ts +1 -1
- package/dist/src/components/ui/collapsible.js +1 -1
- package/dist/src/components/ui/command.d.ts +4 -4
- package/dist/src/components/ui/command.d.ts.map +1 -1
- package/dist/src/components/ui/command.js +9 -10
- package/dist/src/components/ui/context-menu.d.ts +4 -4
- package/dist/src/components/ui/context-menu.d.ts.map +1 -1
- package/dist/src/components/ui/context-menu.js +7 -8
- package/dist/src/components/ui/dialog.d.ts +6 -6
- package/dist/src/components/ui/dialog.d.ts.map +1 -1
- package/dist/src/components/ui/dialog.js +16 -16
- package/dist/src/components/ui/drawer.d.ts +4 -4
- package/dist/src/components/ui/drawer.d.ts.map +1 -1
- package/dist/src/components/ui/drawer.js +7 -8
- package/dist/src/components/ui/dropdown-menu.d.ts +4 -4
- package/dist/src/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/src/components/ui/dropdown-menu.js +8 -9
- package/dist/src/components/ui/form.d.ts +10 -10
- package/dist/src/components/ui/form.d.ts.map +1 -1
- package/dist/src/components/ui/form.js +15 -15
- package/dist/src/components/ui/header-content.js +1 -1
- package/dist/src/components/ui/hover-card.d.ts +2 -2
- package/dist/src/components/ui/hover-card.d.ts.map +1 -1
- package/dist/src/components/ui/hover-card.js +3 -4
- package/dist/src/components/ui/input-otp.d.ts +5 -5
- package/dist/src/components/ui/input-otp.d.ts.map +1 -1
- package/dist/src/components/ui/input-otp.js +6 -7
- package/dist/src/components/ui/input.d.ts +2 -2
- package/dist/src/components/ui/input.d.ts.map +1 -1
- package/dist/src/components/ui/input.js +1 -2
- package/dist/src/components/ui/label.d.ts +2 -2
- package/dist/src/components/ui/label.d.ts.map +1 -1
- package/dist/src/components/ui/label.js +2 -3
- package/dist/src/components/ui/loader.js +3 -3
- package/dist/src/components/ui/menubar.d.ts +4 -4
- package/dist/src/components/ui/menubar.d.ts.map +1 -1
- package/dist/src/components/ui/menubar.js +11 -12
- package/dist/src/components/ui/navigation-menu.d.ts +2 -2
- package/dist/src/components/ui/navigation-menu.d.ts.map +1 -1
- package/dist/src/components/ui/navigation-menu.js +10 -11
- package/dist/src/components/ui/popover.d.ts +3 -3
- package/dist/src/components/ui/popover.d.ts.map +1 -1
- package/dist/src/components/ui/popover.js +4 -4
- package/dist/src/components/ui/progress.d.ts +2 -2
- package/dist/src/components/ui/progress.d.ts.map +1 -1
- package/dist/src/components/ui/progress.js +2 -3
- package/dist/src/components/ui/radio-group.d.ts +2 -2
- package/dist/src/components/ui/radio-group.d.ts.map +1 -1
- package/dist/src/components/ui/radio-group.js +3 -4
- package/dist/src/components/ui/select.d.ts +3 -3
- package/dist/src/components/ui/select.d.ts.map +1 -1
- package/dist/src/components/ui/select.js +9 -10
- package/dist/src/components/ui/separator.d.ts +2 -2
- package/dist/src/components/ui/separator.d.ts.map +1 -1
- package/dist/src/components/ui/separator.js +3 -4
- package/dist/src/components/ui/sheet.d.ts +5 -5
- package/dist/src/components/ui/sheet.d.ts.map +1 -1
- package/dist/src/components/ui/sheet.js +8 -9
- package/dist/src/components/ui/sidebar.d.ts +31 -31
- package/dist/src/components/ui/sidebar.d.ts.map +1 -1
- package/dist/src/components/ui/sidebar.js +67 -69
- package/dist/src/components/ui/skeleton.d.ts +1 -1
- package/dist/src/components/ui/skeleton.js +1 -1
- package/dist/src/components/ui/slider.d.ts +2 -2
- package/dist/src/components/ui/slider.d.ts.map +1 -1
- package/dist/src/components/ui/slider.js +16 -8
- package/dist/src/components/ui/sonner.d.ts +1 -1
- package/dist/src/components/ui/sonner.d.ts.map +1 -1
- package/dist/src/components/ui/sonner.js +6 -6
- package/dist/src/components/ui/switch.d.ts +2 -2
- package/dist/src/components/ui/switch.d.ts.map +1 -1
- package/dist/src/components/ui/switch.js +3 -4
- package/dist/src/components/ui/table.d.ts +9 -9
- package/dist/src/components/ui/table.d.ts.map +1 -1
- package/dist/src/components/ui/table.js +8 -9
- package/dist/src/components/ui/tabs.d.ts +2 -2
- package/dist/src/components/ui/tabs.d.ts.map +1 -1
- package/dist/src/components/ui/tabs.js +4 -5
- package/dist/src/components/ui/textarea.d.ts +2 -2
- package/dist/src/components/ui/textarea.d.ts.map +1 -1
- package/dist/src/components/ui/textarea.js +1 -2
- package/dist/src/components/ui/toggle-group.d.ts +4 -4
- package/dist/src/components/ui/toggle-group.d.ts.map +1 -1
- package/dist/src/components/ui/toggle-group.js +6 -6
- package/dist/src/components/ui/toggle.d.ts +3 -3
- package/dist/src/components/ui/toggle.d.ts.map +1 -1
- package/dist/src/components/ui/toggle.js +8 -9
- package/dist/src/components/ui/tooltip.d.ts +3 -3
- package/dist/src/components/ui/tooltip.d.ts.map +1 -1
- package/dist/src/components/ui/tooltip.js +8 -10
- package/dist/src/config.js +2 -2
- package/dist/src/database/admins.js +10 -10
- package/dist/src/database/languages.js +7 -7
- package/dist/src/database/logs.js +9 -9
- package/dist/src/database/moderators.js +5 -5
- package/dist/src/database/roles.js +1 -1
- package/dist/src/database/sessions.js +6 -6
- package/dist/src/database/users.d.ts +21 -2
- package/dist/src/database/users.d.ts.map +1 -1
- package/dist/src/database/users.js +18 -15
- package/dist/src/drizzle.config.d.ts +2 -2
- package/dist/src/drizzle.config.d.ts.map +1 -1
- package/dist/src/drizzle.config.js +19 -12
- package/dist/src/emails/default-template.d.ts +34 -22
- package/dist/src/emails/default-template.d.ts.map +1 -1
- package/dist/src/emails/default-template.js +61 -66
- package/dist/src/emails/reset-password.d.ts +56 -0
- package/dist/src/emails/reset-password.d.ts.map +1 -0
- package/dist/src/emails/reset-password.js +132 -0
- package/dist/src/emails/ui/button.d.ts +9 -0
- package/dist/src/emails/ui/button.d.ts.map +1 -0
- package/dist/src/emails/ui/button.js +36 -0
- package/dist/src/emails/ui/card.d.ts +8 -0
- package/dist/src/emails/ui/card.d.ts.map +1 -0
- package/dist/src/emails/ui/card.js +39 -0
- package/dist/src/hooks/use-before-unload.js +3 -3
- package/dist/src/hooks/use-captcha.d.ts +2 -2
- package/dist/src/hooks/use-captcha.d.ts.map +1 -1
- package/dist/src/hooks/use-captcha.js +64 -40
- package/dist/src/hooks/use-mobile.d.ts.map +1 -1
- package/dist/src/hooks/use-mobile.js +3 -4
- package/dist/src/lib/api/get-middleware-api.js +4 -4
- package/dist/src/lib/api/get-session-admin-api.js +5 -5
- package/dist/src/lib/api/get-session-api.js +4 -4
- package/dist/src/lib/colors.js +28 -19
- package/dist/src/lib/colors.test.js +60 -60
- package/dist/src/lib/config.js +3 -3
- package/dist/src/lib/fetcher/cookie-from-string-to-object.d.ts.map +1 -1
- package/dist/src/lib/fetcher/cookie-from-string-to-object.js +1 -1
- package/dist/src/lib/fetcher/cookie-from-string-to-object.test.js +27 -27
- package/dist/src/lib/fetcher/core.d.ts +5 -5
- package/dist/src/lib/fetcher/core.d.ts.map +1 -1
- package/dist/src/lib/fetcher/core.js +16 -10
- package/dist/src/lib/fetcher/helpers-server.d.ts +1 -1
- package/dist/src/lib/fetcher/helpers-server.js +1 -1
- package/dist/src/lib/fetcher/helpers.test.js +17 -17
- package/dist/src/lib/fetcher/types.d.ts +26 -26
- package/dist/src/lib/fetcher/types.d.ts.map +1 -1
- package/dist/src/lib/fetcher-client.d.ts +4 -4
- package/dist/src/lib/fetcher-client.d.ts.map +1 -1
- package/dist/src/lib/fetcher-client.js +3 -3
- package/dist/src/lib/fetcher.d.ts +5 -5
- package/dist/src/lib/fetcher.d.ts.map +1 -1
- package/dist/src/lib/fetcher.js +4 -4
- package/dist/src/lib/helpers/auto-form.d.ts +3 -3
- package/dist/src/lib/helpers/auto-form.d.ts.map +1 -1
- package/dist/src/lib/helpers/auto-form.js +16 -15
- package/dist/src/lib/helpers/auto-form.test.js +129 -129
- package/dist/src/lib/navigation.d.ts +2 -2
- package/dist/src/lib/navigation.d.ts.map +1 -1
- package/dist/src/lib/plugin.d.ts +3 -3
- package/dist/src/lib/special-characters.js +1 -1
- package/dist/src/lib/special-characters.test.js +36 -36
- package/dist/src/lib/utils.d.ts +1 -1
- package/dist/src/tests/setup.d.ts +1 -1
- package/dist/src/views/admin/layouts/admin-layout.d.ts +1 -1
- package/dist/src/views/admin/layouts/admin-layout.d.ts.map +1 -1
- package/dist/src/views/admin/layouts/admin-layout.js +4 -8
- package/dist/src/views/admin/layouts/sidebar/nav/item.d.ts.map +1 -1
- package/dist/src/views/admin/layouts/sidebar/nav/item.js +11 -12
- package/dist/src/views/admin/layouts/sidebar/nav/nav.d.ts +1 -1
- package/dist/src/views/admin/layouts/sidebar/nav/nav.js +11 -11
- package/dist/src/views/admin/layouts/sidebar/sidebar.d.ts +1 -1
- package/dist/src/views/admin/layouts/sidebar/sidebar.d.ts.map +1 -1
- package/dist/src/views/admin/layouts/sidebar/sidebar.js +1 -2
- package/dist/src/views/admin/layouts/sidebar/sign-out.js +1 -1
- package/dist/src/views/admin/layouts/user-bar/client.js +5 -5
- package/dist/src/views/admin/layouts/user-bar/user-bar.d.ts +1 -1
- package/dist/src/views/admin/layouts/user-bar/user-bar.d.ts.map +1 -1
- package/dist/src/views/admin/layouts/user-bar/user-bar.js +1 -1
- package/dist/src/views/admin/sign-in/sign-in-admin-view.js +3 -2
- package/dist/src/views/admin/views/core/dashboard/dashboard-admin-view.js +3 -3
- package/dist/src/views/admin/views/core/debug/actions/clear-cache/clear-cache.js +10 -10
- package/dist/src/views/admin/views/core/debug/actions/clear-cache/mutation-api.js +2 -2
- package/dist/src/views/admin/views/core/debug/system-logs/actions/more/content.d.ts +1 -1
- package/dist/src/views/admin/views/core/debug/system-logs/actions/more/content.d.ts.map +1 -1
- package/dist/src/views/admin/views/core/debug/system-logs/actions/more/content.js +15 -15
- package/dist/src/views/admin/views/core/debug/system-logs/actions/more/more.d.ts +1 -1
- package/dist/src/views/admin/views/core/debug/system-logs/actions/more/more.js +7 -7
- package/dist/src/views/admin/views/core/debug/system-logs/badges/badge-status.d.ts.map +1 -1
- package/dist/src/views/admin/views/core/debug/system-logs/badges/badge-status.js +7 -1
- package/dist/src/views/admin/views/core/debug/system-logs/badges/badge-type-log.d.ts +1 -1
- package/dist/src/views/admin/views/core/debug/system-logs/badges/badge-type-log.js +3 -3
- package/dist/src/views/admin/views/core/debug/system-logs/system-logs-view.js +25 -25
- package/dist/src/views/admin/views/core/test.js +43 -43
- package/dist/src/views/admin/views/core/users/users-admin-view.d.ts.map +1 -1
- package/dist/src/views/admin/views/core/users/users-admin-view.js +13 -14
- package/dist/src/views/auth/password-reset/change-password-form/form.d.ts +5 -0
- package/dist/src/views/auth/password-reset/change-password-form/form.d.ts.map +1 -0
- package/dist/src/views/auth/password-reset/change-password-form/form.js +48 -0
- package/dist/src/views/auth/password-reset/change-password-form/mutation-api.d.ts +6 -0
- package/dist/src/views/auth/password-reset/change-password-form/mutation-api.d.ts.map +1 -0
- package/dist/src/views/auth/password-reset/change-password-form/mutation-api.js +22 -0
- package/dist/src/views/auth/password-reset/change-password-form/use-form.d.ts +11 -0
- package/dist/src/views/auth/password-reset/change-password-form/use-form.d.ts.map +1 -0
- package/dist/src/views/auth/password-reset/change-password-form/use-form.js +36 -0
- package/dist/src/views/auth/password-reset/form/form.d.ts +6 -0
- package/dist/src/views/auth/password-reset/form/form.d.ts.map +1 -0
- package/dist/src/views/auth/password-reset/form/form.js +104 -0
- package/dist/src/views/auth/password-reset/form/mutation-api.d.ts +7 -0
- package/dist/src/views/auth/password-reset/form/mutation-api.d.ts.map +1 -0
- package/dist/src/views/auth/password-reset/form/mutation-api.js +21 -0
- package/dist/src/views/auth/password-reset/form/use-form.d.ts +12 -0
- package/dist/src/views/auth/password-reset/form/use-form.d.ts.map +1 -0
- package/dist/src/views/auth/password-reset/form/use-form.js +33 -0
- package/dist/src/views/auth/password-reset/password-reset-view.d.ts +7 -0
- package/dist/src/views/auth/password-reset/password-reset-view.d.ts.map +1 -0
- package/dist/src/views/auth/password-reset/password-reset-view.js +37 -0
- package/dist/src/views/auth/sign-in/form/form.d.ts +2 -1
- package/dist/src/views/auth/sign-in/form/form.d.ts.map +1 -1
- package/dist/src/views/auth/sign-in/form/form.js +15 -10
- package/dist/src/views/auth/sign-in/form/mutation-api.d.ts +2 -2
- package/dist/src/views/auth/sign-in/form/mutation-api.d.ts.map +1 -1
- package/dist/src/views/auth/sign-in/form/mutation-api.js +10 -10
- package/dist/src/views/auth/sign-in/form/use-form.d.ts +2 -2
- package/dist/src/views/auth/sign-in/form/use-form.js +11 -11
- package/dist/src/views/auth/sign-in/sign-in-view.d.ts.map +1 -1
- package/dist/src/views/auth/sign-in/sign-in-view.js +13 -7
- package/dist/src/views/auth/{components → sign-up/components}/password-input.d.ts +3 -3
- package/dist/src/views/auth/sign-up/components/password-input.d.ts.map +1 -0
- package/dist/src/views/auth/{components → sign-up/components}/password-input.js +13 -14
- package/dist/src/views/auth/sign-up/email-confirmation-view.js +4 -4
- package/dist/src/views/auth/sign-up/form/form.d.ts +2 -2
- package/dist/src/views/auth/sign-up/form/form.d.ts.map +1 -1
- package/dist/src/views/auth/sign-up/form/form.js +20 -33
- package/dist/src/views/auth/sign-up/form/mutation-api.d.ts +3 -3
- package/dist/src/views/auth/sign-up/form/mutation-api.d.ts.map +1 -1
- package/dist/src/views/auth/sign-up/form/mutation-api.js +6 -6
- package/dist/src/views/auth/sign-up/form/use-form.d.ts +3 -8
- package/dist/src/views/auth/sign-up/form/use-form.d.ts.map +1 -1
- package/dist/src/views/auth/sign-up/form/use-form.js +27 -24
- package/dist/src/views/auth/sign-up/sign-up-view.js +6 -6
- package/dist/src/views/auth/sign-up/wrapper.d.ts +1 -1
- package/dist/src/views/auth/sign-up/wrapper.d.ts.map +1 -1
- package/dist/src/views/auth/sign-up/wrapper.js +5 -8
- package/dist/src/views/auth/sso/buttons/client.js +4 -4
- package/dist/src/views/auth/sso/buttons/mutation-api.js +5 -5
- package/dist/src/views/auth/sso/buttons/sso-buttons.js +2 -2
- package/dist/src/views/auth/sso/callback/callback-sso-view.d.ts.map +1 -1
- package/dist/src/views/auth/sso/callback/callback-sso-view.js +21 -7
- package/dist/src/views/auth/sso/callback/client/client.d.ts +3 -1
- package/dist/src/views/auth/sso/callback/client/client.d.ts.map +1 -1
- package/dist/src/views/auth/sso/callback/client/client.js +36 -7
- package/dist/src/views/auth/sso/callback/client/mutation-api.d.ts.map +1 -1
- package/dist/src/views/auth/sso/callback/client/mutation-api.js +11 -6
- package/dist/src/views/error/back-button.js +1 -1
- package/dist/src/views/error/error-view.d.ts +5 -3
- package/dist/src/views/error/error-view.d.ts.map +1 -1
- package/dist/src/views/error/error-view.js +25 -23
- package/dist/src/views/error/global-error-view.d.ts +3 -3
- package/dist/src/views/error/global-error-view.d.ts.map +1 -1
- package/dist/src/views/error/global-error-view.js +36 -44
- package/dist/src/views/layouts/provider.d.ts +4 -4
- package/dist/src/views/layouts/provider.d.ts.map +1 -1
- package/dist/src/views/layouts/provider.js +3 -3
- package/dist/src/views/layouts/root-layout.d.ts +3 -3
- package/dist/src/views/layouts/root-layout.d.ts.map +1 -1
- package/dist/src/views/layouts/root-layout.js +1 -2
- package/dist/src/views/layouts/theme/header/header.d.ts +2 -2
- package/dist/src/views/layouts/theme/header/header.d.ts.map +1 -1
- package/dist/src/views/layouts/theme/header/header.js +1 -1
- package/dist/src/views/layouts/theme/header/user/auth/client.d.ts +1 -1
- package/dist/src/views/layouts/theme/header/user/auth/client.d.ts.map +1 -1
- package/dist/src/views/layouts/theme/header/user/auth/client.js +4 -4
- package/dist/src/views/layouts/theme/header/user/auth/log-out-mutation-api.js +8 -8
- package/dist/src/views/layouts/theme/header/user/user.js +4 -4
- package/dist/src/views/layouts/theme/layout.d.ts +2 -2
- package/dist/src/views/layouts/theme/layout.js +1 -1
- package/dist/src/vitnode.config.d.ts +16 -13
- package/dist/src/vitnode.config.d.ts.map +1 -1
- package/dist/src/vitnode.config.js +3 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +44 -46
- package/src/app/login/page.tsx +5 -5
- package/src/app/login/reset-password/page.tsx +27 -0
- package/src/app/login/sso/[providerId]/page.tsx +1 -1
- package/src/app/register/page.tsx +5 -5
- package/src/app_admin/core/debug/page.tsx +14 -14
- package/src/app_admin/core/page.tsx +1 -1
- package/src/app_admin/core/test/page.tsx +1 -1
- package/src/app_admin/core/users/page.tsx +12 -13
- package/src/locales/en.json +42 -2
- package/dist/src/views/auth/components/password-input.d.ts.map +0 -1
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { buildModule } from "../../lib/module.js";
|
|
2
2
|
import { CONFIG_PLUGIN } from "../../../config.js";
|
|
3
|
+
import { changePasswordRoute } from "./routes/change-password.route.js";
|
|
4
|
+
import { resetPasswordRoute } from "./routes/reset-passowrd.route.js";
|
|
3
5
|
import { sessionRoute } from "./routes/session.route.js";
|
|
4
6
|
import { signInRoute } from "./routes/sign-in.route.js";
|
|
5
7
|
import { signOutRoute } from "./routes/sign-out.route.js";
|
|
@@ -8,13 +10,15 @@ import { testRoute } from "./routes/test.route.js";
|
|
|
8
10
|
import { ssoUserModule } from "./sso/sso.module.js";
|
|
9
11
|
export const usersModule = buildModule({
|
|
10
12
|
...CONFIG_PLUGIN,
|
|
11
|
-
name:
|
|
13
|
+
name: "users",
|
|
12
14
|
routes: [
|
|
13
15
|
sessionRoute,
|
|
14
16
|
signInRoute,
|
|
15
17
|
signOutRoute,
|
|
16
18
|
signUpRoute,
|
|
17
|
-
testRoute
|
|
19
|
+
testRoute,
|
|
20
|
+
resetPasswordRoute,
|
|
21
|
+
changePasswordRoute
|
|
18
22
|
],
|
|
19
23
|
modules: [
|
|
20
24
|
ssoUserModule
|
|
@@ -5,10 +5,10 @@ export const generateMetadata = async ({ params })=>{
|
|
|
5
5
|
const { locale } = await params;
|
|
6
6
|
const t = await getTranslations({
|
|
7
7
|
locale,
|
|
8
|
-
namespace:
|
|
8
|
+
namespace: "core.global"
|
|
9
9
|
});
|
|
10
10
|
return {
|
|
11
|
-
title: t(
|
|
11
|
+
title: t("login")
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
14
|
export default function Page() {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Metadata } from "next/dist/types";
|
|
2
|
+
import { PasswordResetView } from "../../../views/auth/password-reset/password-reset-view";
|
|
3
|
+
export declare const generateMetadata: ({ params, }: {
|
|
4
|
+
params: Promise<{
|
|
5
|
+
locale: string;
|
|
6
|
+
}>;
|
|
7
|
+
}) => Promise<Metadata>;
|
|
8
|
+
export default function Page(props: React.ComponentProps<typeof PasswordResetView>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=page.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../src/app/login/reset-password/page.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAIhD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iDAAiD,CAAC;AAEpF,eAAO,MAAM,gBAAgB,GAAU,aAEpC;IACD,MAAM,EAAE,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACrC,KAAG,OAAO,CAAC,QAAQ,CAUnB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,IAAI,CAC1B,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,iBAAiB,CAAC,2CAGtD"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getTranslations } from "next-intl/server";
|
|
3
|
+
import { PasswordResetView } from "../../../views/auth/password-reset/password-reset-view.js";
|
|
4
|
+
export const generateMetadata = async ({ params })=>{
|
|
5
|
+
const { locale } = await params;
|
|
6
|
+
const t = await getTranslations({
|
|
7
|
+
locale,
|
|
8
|
+
namespace: "core.auth.reset_password"
|
|
9
|
+
});
|
|
10
|
+
return {
|
|
11
|
+
title: t("title")
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export default function Page(props) {
|
|
15
|
+
return /*#__PURE__*/ _jsx(PasswordResetView, {
|
|
16
|
+
...props
|
|
17
|
+
});
|
|
18
|
+
}
|
|
@@ -5,10 +5,10 @@ export const generateMetadata = async ({ params })=>{
|
|
|
5
5
|
const { locale } = await params;
|
|
6
6
|
const t = await getTranslations({
|
|
7
7
|
locale,
|
|
8
|
-
namespace:
|
|
8
|
+
namespace: "core.global"
|
|
9
9
|
});
|
|
10
10
|
return {
|
|
11
|
-
title: t(
|
|
11
|
+
title: t("register")
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
14
|
export default function Page() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { getTranslations } from "next-intl/server";
|
|
3
2
|
import dynamic from "next/dynamic";
|
|
3
|
+
import { getTranslations } from "next-intl/server";
|
|
4
4
|
import React from "react";
|
|
5
5
|
import { I18nProvider } from "../../../components/i18n-provider.js";
|
|
6
6
|
import { DataTableSkeleton } from "../../../components/table/data-table.js";
|
|
@@ -10,26 +10,26 @@ const SystemLogsView = dynamic(async ()=>import("../../../views/admin/views/core
|
|
|
10
10
|
default: module.SystemLogsView
|
|
11
11
|
})));
|
|
12
12
|
export const generateMetadata = async ()=>{
|
|
13
|
-
const t = await getTranslations(
|
|
13
|
+
const t = await getTranslations("admin.debug");
|
|
14
14
|
return {
|
|
15
|
-
title: t(
|
|
16
|
-
description: t(
|
|
15
|
+
title: t("title"),
|
|
16
|
+
description: t("desc")
|
|
17
17
|
};
|
|
18
18
|
};
|
|
19
19
|
export default async function Page(props) {
|
|
20
|
-
const t = await getTranslations(
|
|
20
|
+
const t = await getTranslations("admin.debug");
|
|
21
21
|
return /*#__PURE__*/ _jsx(I18nProvider, {
|
|
22
22
|
namespaces: "admin.debug",
|
|
23
23
|
children: /*#__PURE__*/ _jsxs("div", {
|
|
24
24
|
className: "p-4",
|
|
25
25
|
children: [
|
|
26
26
|
/*#__PURE__*/ _jsx(HeaderContent, {
|
|
27
|
-
desc: t(
|
|
28
|
-
h1: t(
|
|
27
|
+
desc: t("desc"),
|
|
28
|
+
h1: t("title"),
|
|
29
29
|
children: /*#__PURE__*/ _jsx(ClearCacheAction, {})
|
|
30
30
|
}),
|
|
31
31
|
/*#__PURE__*/ _jsx(HeaderContent, {
|
|
32
|
-
h2: t(
|
|
32
|
+
h2: t("logs.title")
|
|
33
33
|
}),
|
|
34
34
|
/*#__PURE__*/ _jsx(React.Suspense, {
|
|
35
35
|
fallback: /*#__PURE__*/ _jsx(DataTableSkeleton, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Metadata } from
|
|
2
|
-
import React from
|
|
1
|
+
import type { Metadata } from "next/dist/types";
|
|
2
|
+
import React from "react";
|
|
3
3
|
declare const UsersAdminView: React.ComponentType<{
|
|
4
4
|
searchParams: Promise<Record<string, string | string[] | undefined>>;
|
|
5
5
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../src/app_admin/core/users/page.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../src/app_admin/core/users/page.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGhD,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,QAAA,MAAM,cAAc;;EAInB,CAAC;AAEF,eAAO,MAAM,gBAAgB,QAAa,OAAO,CAAC,QAAQ,CAMzD,CAAC;AAEF,wBAA8B,IAAI,CAChC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,oDAgBnD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { getTranslations } from "next-intl/server";
|
|
3
2
|
import dynamic from "next/dynamic";
|
|
3
|
+
import { getTranslations } from "next-intl/server";
|
|
4
4
|
import React from "react";
|
|
5
5
|
import { DataTableSkeleton } from "../../../components/table/data-table.js";
|
|
6
6
|
import { HeaderContent } from "../../../components/ui/header-content.js";
|
|
@@ -8,22 +8,22 @@ const UsersAdminView = dynamic(async ()=>import("../../../views/admin/views/core
|
|
|
8
8
|
default: module.UsersAdminView
|
|
9
9
|
})));
|
|
10
10
|
export const generateMetadata = async ()=>{
|
|
11
|
-
const t = await getTranslations(
|
|
11
|
+
const t = await getTranslations("admin.global.nav.users");
|
|
12
12
|
return {
|
|
13
|
-
title: t(
|
|
13
|
+
title: t("list")
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
16
|
export default async function Page(props) {
|
|
17
17
|
const [t, tNav] = await Promise.all([
|
|
18
|
-
getTranslations(
|
|
19
|
-
getTranslations(
|
|
18
|
+
getTranslations("admin.user.list"),
|
|
19
|
+
getTranslations("admin.global.nav.users")
|
|
20
20
|
]);
|
|
21
21
|
return /*#__PURE__*/ _jsxs("div", {
|
|
22
22
|
className: "p-4",
|
|
23
23
|
children: [
|
|
24
24
|
/*#__PURE__*/ _jsx(HeaderContent, {
|
|
25
|
-
desc: t(
|
|
26
|
-
h1: tNav(
|
|
25
|
+
desc: t("desc"),
|
|
26
|
+
h1: tNav("list")
|
|
27
27
|
}),
|
|
28
28
|
/*#__PURE__*/ _jsx(React.Suspense, {
|
|
29
29
|
fallback: /*#__PURE__*/ _jsx(DataTableSkeleton, {
|
|
@@ -5,7 +5,7 @@ const generateLetterPhoto = (letter, color)=>`data:image/svg+xml,${encodeURIComp
|
|
|
5
5
|
export const Avatar = ({ user: { avatarColor, name }, className, size, ...props })=>{
|
|
6
6
|
return /*#__PURE__*/ _jsx(Image, {
|
|
7
7
|
alt: name,
|
|
8
|
-
className: cn(
|
|
8
|
+
className: cn("rounded-full object-cover", className),
|
|
9
9
|
height: size,
|
|
10
10
|
src: generateLetterPhoto(name.slice(0, 1), avatarColor),
|
|
11
11
|
width: size,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useTranslations } from "next-intl";
|
|
4
3
|
import dynamic from "next/dynamic";
|
|
4
|
+
import { useTranslations } from "next-intl";
|
|
5
5
|
import React from "react";
|
|
6
6
|
import { AlertDialog, AlertDialogContent, AlertDialogDescription, AlertDialogFooterSkeleton, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from "../ui/alert-dialog.js";
|
|
7
7
|
const ContentConfirmAction = dynamic(async ()=>import("./content.js").then((module)=>({
|
|
8
8
|
default: module.ContentConfirmAction
|
|
9
9
|
})));
|
|
10
10
|
export const ConfirmActionAlertDialog = ({ children, title, description, textSubmit, onSubmit, ...props })=>{
|
|
11
|
-
const t = useTranslations(
|
|
11
|
+
const t = useTranslations("core.global.confirm_action");
|
|
12
12
|
return /*#__PURE__*/ _jsxs(AlertDialog, {
|
|
13
13
|
...props,
|
|
14
14
|
children: [
|
|
@@ -21,10 +21,10 @@ export const ConfirmActionAlertDialog = ({ children, title, description, textSub
|
|
|
21
21
|
/*#__PURE__*/ _jsxs(AlertDialogHeader, {
|
|
22
22
|
children: [
|
|
23
23
|
/*#__PURE__*/ _jsx(AlertDialogTitle, {
|
|
24
|
-
children: title ?? t(
|
|
24
|
+
children: title ?? t("title")
|
|
25
25
|
}),
|
|
26
26
|
/*#__PURE__*/ _jsx(AlertDialogDescription, {
|
|
27
|
-
children: description ?? t(
|
|
27
|
+
children: description ?? t("desc")
|
|
28
28
|
})
|
|
29
29
|
]
|
|
30
30
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../../src/components/confirm-action/content.tsx"],"names":[],"mappings":"AAUA,eAAO,MAAM,oBAAoB,GAAI,2BAGlC;IACD,QAAQ,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACnE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,
|
|
1
|
+
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../../src/components/confirm-action/content.tsx"],"names":[],"mappings":"AAUA,eAAO,MAAM,oBAAoB,GAAI,2BAGlC;IACD,QAAQ,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACnE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,4CAkBA,CAAC"}
|
|
@@ -4,9 +4,8 @@ import React from "react";
|
|
|
4
4
|
import { AlertDialogCancel, AlertDialogFooter, useAlertDialog } from "../ui/alert-dialog.js";
|
|
5
5
|
import { Button } from "../ui/button.js";
|
|
6
6
|
export const ContentConfirmAction = ({ onSubmit, textSubmit })=>{
|
|
7
|
-
const t = useTranslations(
|
|
7
|
+
const t = useTranslations("core.global.confirm_action");
|
|
8
8
|
const { setOpen } = useAlertDialog();
|
|
9
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
10
9
|
const [_, formAction, isLoading] = React.useActionState(async ()=>{
|
|
11
10
|
await onSubmit({
|
|
12
11
|
onClose: ()=>setOpen?.(false)
|
|
@@ -17,13 +16,13 @@ export const ContentConfirmAction = ({ onSubmit, textSubmit })=>{
|
|
|
17
16
|
children: /*#__PURE__*/ _jsxs(AlertDialogFooter, {
|
|
18
17
|
children: [
|
|
19
18
|
/*#__PURE__*/ _jsx(AlertDialogCancel, {
|
|
20
|
-
children: t(
|
|
19
|
+
children: t("cancel")
|
|
21
20
|
}),
|
|
22
21
|
/*#__PURE__*/ _jsx(Button, {
|
|
23
22
|
isLoading: isLoading,
|
|
24
23
|
type: "submit",
|
|
25
24
|
variant: "destructive",
|
|
26
|
-
children: textSubmit ?? t(
|
|
25
|
+
children: textSubmit ?? t("confirm")
|
|
27
26
|
})
|
|
28
27
|
]
|
|
29
28
|
})
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useFormatter, useNow } from "next-intl";
|
|
4
4
|
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./ui/tooltip.js";
|
|
5
5
|
export const DateFormat = ({ date, updateInterval, showFullDate })=>{
|
|
6
|
-
const dateToFormat = typeof date ===
|
|
6
|
+
const dateToFormat = typeof date === "string" ? new Date(date) : date;
|
|
7
7
|
const format = useFormatter();
|
|
8
8
|
const now = useNow({
|
|
9
9
|
updateInterval: updateInterval ?? // Update it every 1 minute if the date is from today, otherwise don't update
|
|
10
|
-
(
|
|
10
|
+
(Date.now() - dateToFormat.getTime() < 86400000 ? 60000 : 0)
|
|
11
11
|
});
|
|
12
12
|
const fullDate = format.dateTime(dateToFormat, {
|
|
13
|
-
year: dateToFormat.getFullYear() === now.getFullYear() ? undefined :
|
|
14
|
-
month:
|
|
15
|
-
day:
|
|
16
|
-
hour:
|
|
17
|
-
minute:
|
|
13
|
+
year: dateToFormat.getFullYear() === now.getFullYear() ? undefined : "numeric",
|
|
14
|
+
month: "short",
|
|
15
|
+
day: "numeric",
|
|
16
|
+
hour: "numeric",
|
|
17
|
+
minute: "numeric"
|
|
18
18
|
});
|
|
19
19
|
if (showFullDate) {
|
|
20
20
|
return fullDate;
|
|
@@ -1,11 +1,21 @@
|
|
|
1
|
-
import { type ControllerRenderProps, type FieldPath, type FieldValues, type Mode, type UseFormReturn } from
|
|
2
|
-
import
|
|
3
|
-
import type { routeMiddlewareSchema } from
|
|
4
|
-
import { Button } from
|
|
1
|
+
import { type ControllerRenderProps, type FieldPath, type FieldValues, type Mode, type UseFormReturn } from "react-hook-form";
|
|
2
|
+
import z from "zod";
|
|
3
|
+
import type { routeMiddlewareSchema } from "../../api/modules/middleware/route";
|
|
4
|
+
import { Button } from "../ui/button";
|
|
5
|
+
type ItemAutoFormProps<T extends z.ZodObject<z.ZodRawShape> = z.ZodObject<z.ZodRawShape>, TName extends FieldPath<z.infer<T>> = FieldPath<z.infer<T>>> = {
|
|
6
|
+
component: (props: ItemAutoFormComponentProps) => React.ReactNode;
|
|
7
|
+
id: TName;
|
|
8
|
+
} | {
|
|
9
|
+
component?: never;
|
|
10
|
+
description?: React.ReactNode;
|
|
11
|
+
id: TName;
|
|
12
|
+
label?: React.ReactNode;
|
|
13
|
+
};
|
|
5
14
|
export interface ItemAutoFormComponentProps {
|
|
6
15
|
description?: React.ReactNode;
|
|
7
16
|
field: ControllerRenderProps<FieldValues, string>;
|
|
8
17
|
label?: React.ReactNode;
|
|
18
|
+
labelRight?: React.ReactNode;
|
|
9
19
|
otherProps: {
|
|
10
20
|
enum?: string[];
|
|
11
21
|
isOptional?: boolean;
|
|
@@ -15,25 +25,16 @@ export interface ItemAutoFormComponentProps {
|
|
|
15
25
|
type?: string;
|
|
16
26
|
};
|
|
17
27
|
}
|
|
18
|
-
type ItemAutoFormProps<T extends z.ZodObject<z.ZodRawShape> = z.ZodObject<z.ZodRawShape>, TName extends FieldPath<z.infer<T>> = FieldPath<z.infer<T>>> = {
|
|
19
|
-
component: (props: ItemAutoFormComponentProps) => React.ReactNode;
|
|
20
|
-
id: TName;
|
|
21
|
-
} | {
|
|
22
|
-
component?: never;
|
|
23
|
-
description?: React.ReactNode;
|
|
24
|
-
id: TName;
|
|
25
|
-
label?: React.ReactNode;
|
|
26
|
-
};
|
|
27
28
|
export type AutoFormOnSubmit<T extends z.ZodObject<z.ZodRawShape>, TContext = unknown> = (values: z.infer<T>, form: UseFormReturn<z.input<T>, TContext, z.output<T>>, options: {
|
|
28
29
|
captchaToken: string;
|
|
29
30
|
}) => Promise<void> | void;
|
|
30
|
-
export declare function AutoForm<T extends z.ZodObject<z.ZodRawShape>, TContext = unknown>({ formSchema, mode, onSubmit: onSubmitProp, captcha, fields, submitButtonProps, ...props }: Omit<React.ComponentProps<
|
|
31
|
-
captcha?: z.infer<typeof routeMiddlewareSchema>[
|
|
31
|
+
export declare function AutoForm<T extends z.ZodObject<z.ZodRawShape>, TContext = unknown>({ formSchema, mode, onSubmit: onSubmitProp, captcha, fields, submitButtonProps, children, ...props }: Omit<React.ComponentProps<"form">, "onSubmit"> & {
|
|
32
|
+
captcha?: z.infer<typeof routeMiddlewareSchema>["captcha"];
|
|
32
33
|
fields: ItemAutoFormProps<T>[];
|
|
33
34
|
formSchema: T;
|
|
34
35
|
mode?: Mode;
|
|
35
36
|
onSubmit?: AutoFormOnSubmit<T, TContext>;
|
|
36
|
-
submitButtonProps?: Omit<React.ComponentProps<typeof Button>,
|
|
37
|
+
submitButtonProps?: Omit<React.ComponentProps<typeof Button>, "isLoading" | "type">;
|
|
37
38
|
}): import("react/jsx-runtime").JSX.Element;
|
|
38
39
|
export {};
|
|
39
40
|
//# sourceMappingURL=auto-form.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auto-form.d.ts","sourceRoot":"","sources":["../../../../src/components/form/auto-form.tsx"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,IAAI,
|
|
1
|
+
{"version":3,"file":"auto-form.d.ts","sourceRoot":"","sources":["../../../../src/components/form/auto-form.tsx"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,IAAI,EACT,KAAK,aAAa,EAEnB,MAAM,iBAAiB,CAAC;AACzB,OAAO,CAAC,MAAM,KAAK,CAAC;AACpB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAOhF,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAItC,KAAK,iBAAiB,CACpB,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,EACjE,KAAK,SAAS,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAEzD;IACE,SAAS,EAAE,CAAC,KAAK,EAAE,0BAA0B,KAAK,KAAK,CAAC,SAAS,CAAC;IAClE,EAAE,EAAE,KAAK,CAAC;CACX,GACD;IACE,SAAS,CAAC,EAAE,KAAK,CAAC;IAClB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,EAAE,EAAE,KAAK,CAAC;IACV,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACzB,CAAC;AAEN,MAAM,WAAW,0BAA0B;IACzC,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,KAAK,EAAE,qBAAqB,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IAClD,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,UAAU,EAAE;QACV,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;QAChB,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;CACH;AAED,MAAM,MAAM,gBAAgB,CAC1B,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,EACpC,QAAQ,GAAG,OAAO,IAChB,CACF,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAClB,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EACtD,OAAO,EAAE;IACP,YAAY,EAAE,MAAM,CAAC;CACtB,KACE,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AAE1B,wBAAgB,QAAQ,CACtB,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,EACpC,QAAQ,GAAG,OAAO,EAClB,EACA,UAAU,EACV,IAAI,EACJ,QAAQ,EAAE,YAAY,EACtB,OAAO,EACP,MAAM,EACN,iBAAiB,EACjB,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,GAAG;IAClD,OAAO,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC,SAAS,CAAC,CAAC;IAC3D,MAAM,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAAE,CAAC;IAC/B,UAAU,EAAE,CAAC,CAAC;IACd,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,QAAQ,CAAC,EAAE,gBAAgB,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;IACzC,iBAAiB,CAAC,EAAE,IAAI,CACtB,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,EACnC,WAAW,GAAG,MAAM,CACrB,CAAC;CACH,2CAiIA"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { zodResolver } from "@hookform/resolvers/zod";
|
|
4
4
|
import { useTranslations } from "next-intl";
|
|
5
5
|
import { useForm } from "react-hook-form";
|
|
6
|
-
import
|
|
6
|
+
import z from "zod";
|
|
7
7
|
import { useCaptcha } from "../../hooks/use-captcha.js";
|
|
8
8
|
import { getDefaults, getNestedParam, getZodInputParams } from "../../lib/helpers/auto-form.js";
|
|
9
9
|
import { Button } from "../ui/button.js";
|
|
10
10
|
import { DialogClose, DialogFooter, useDialog } from "../ui/dialog.js";
|
|
11
11
|
import { Form, FormField } from "../ui/form.js";
|
|
12
|
-
export function AutoForm({ formSchema, mode, onSubmit: onSubmitProp, captcha, fields, submitButtonProps, ...props }) {
|
|
12
|
+
export function AutoForm({ formSchema, mode, onSubmit: onSubmitProp, captcha, fields, submitButtonProps, children, ...props }) {
|
|
13
13
|
const { isReady, getToken: getTokenCaptcha, onReset: onResetCaptcha } = useCaptcha(captcha);
|
|
14
14
|
const { setIsDirty } = useDialog();
|
|
15
|
-
const t = useTranslations(
|
|
15
|
+
const t = useTranslations("core.global");
|
|
16
16
|
const jsonSchema = z.toJSONSchema(formSchema);
|
|
17
17
|
const inputParams = getZodInputParams(jsonSchema);
|
|
18
18
|
const form = useForm({
|
|
@@ -24,7 +24,7 @@ export function AutoForm({ formSchema, mode, onSubmit: onSubmitProp, captcha, fi
|
|
|
24
24
|
const parsedValues = formSchema.safeParse(values);
|
|
25
25
|
if (parsedValues.success) {
|
|
26
26
|
await onSubmitProp?.(parsedValues.data, form, {
|
|
27
|
-
captchaToken: captcha ? await getTokenCaptcha() :
|
|
27
|
+
captchaToken: captcha ? await getTokenCaptcha() : ""
|
|
28
28
|
});
|
|
29
29
|
if (captcha) {
|
|
30
30
|
onResetCaptcha();
|
|
@@ -35,9 +35,9 @@ export function AutoForm({ formSchema, mode, onSubmit: onSubmitProp, captcha, fi
|
|
|
35
35
|
disabled: !form.formState.isValid || form.formState.isSubmitting || captcha && !isReady,
|
|
36
36
|
isLoading: form.formState.isSubmitting,
|
|
37
37
|
...submitButtonProps,
|
|
38
|
-
"aria-label": submitButtonProps?.[
|
|
38
|
+
"aria-label": submitButtonProps?.["aria-label"] ?? t("submit"),
|
|
39
39
|
type: "submit",
|
|
40
|
-
children: submitButtonProps?.children ?? t(
|
|
40
|
+
children: submitButtonProps?.children ?? t("submit")
|
|
41
41
|
});
|
|
42
42
|
return /*#__PURE__*/ _jsxs(Form, {
|
|
43
43
|
form: form,
|
|
@@ -64,24 +64,26 @@ export function AutoForm({ formSchema, mode, onSubmit: onSubmitProp, captcha, fi
|
|
|
64
64
|
if (!item.component) return null;
|
|
65
65
|
return /*#__PURE__*/ _jsx(FormField, {
|
|
66
66
|
name: item.id,
|
|
67
|
+
// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: <needed>
|
|
67
68
|
render: ({ field })=>{
|
|
68
69
|
return /*#__PURE__*/ _jsx(_Fragment, {
|
|
69
70
|
children: item.component({
|
|
70
71
|
field,
|
|
71
|
-
description: typeof params.description ===
|
|
72
|
+
description: typeof params.description === "string" ? params.description : "",
|
|
72
73
|
otherProps: {
|
|
73
74
|
isOptional: !params.required,
|
|
74
75
|
enum: Array.isArray(params.enum) ? params.enum : undefined,
|
|
75
|
-
maxLength: typeof params.maxLength ===
|
|
76
|
-
minLength: typeof params.minLength ===
|
|
77
|
-
pattern: typeof params.pattern ===
|
|
78
|
-
type: params.type ===
|
|
76
|
+
maxLength: typeof params.maxLength === "number" ? params.maxLength : undefined,
|
|
77
|
+
minLength: typeof params.minLength === "number" ? params.minLength : undefined,
|
|
78
|
+
pattern: typeof params.pattern === "string" ? params.pattern : undefined,
|
|
79
|
+
type: typeof params.type === "string" ? params.type : undefined
|
|
79
80
|
}
|
|
80
81
|
})
|
|
81
82
|
});
|
|
82
83
|
}
|
|
83
84
|
}, item.id);
|
|
84
85
|
}),
|
|
86
|
+
children,
|
|
85
87
|
captcha && /*#__PURE__*/ _jsx("div", {
|
|
86
88
|
id: "vitnode_captcha"
|
|
87
89
|
}),
|
|
@@ -91,7 +93,7 @@ export function AutoForm({ formSchema, mode, onSubmit: onSubmitProp, captcha, fi
|
|
|
91
93
|
asChild: true,
|
|
92
94
|
children: /*#__PURE__*/ _jsx(Button, {
|
|
93
95
|
variant: "ghost",
|
|
94
|
-
children: t(
|
|
96
|
+
children: t("cancel")
|
|
95
97
|
})
|
|
96
98
|
}),
|
|
97
99
|
submitButton
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { cn } from "../../../lib/utils.js";
|
|
3
3
|
export const AutoFormDesc = ({ children, className, ...props })=>{
|
|
4
4
|
return /*#__PURE__*/ _jsx("p", {
|
|
5
|
-
className: cn(
|
|
5
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
6
6
|
...props,
|
|
7
7
|
children: children
|
|
8
8
|
});
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
import { FormLabel } from
|
|
2
|
-
export declare const AutoFormLabel: ({ children, ...props }: React.ComponentProps<typeof FormLabel>
|
|
1
|
+
import { FormLabel } from "../../../components/ui/form";
|
|
2
|
+
export declare const AutoFormLabel: ({ children, labelRight, className, ...props }: React.ComponentProps<typeof FormLabel> & {
|
|
3
|
+
labelRight?: React.ReactNode;
|
|
4
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
3
5
|
//# sourceMappingURL=label.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/common/label.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/common/label.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGjD,eAAO,MAAM,aAAa,GAAI,+CAK3B,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,GAAG;IAC1C,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC9B,4CAeA,CAAC"}
|
|
@@ -1,8 +1,18 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { FormLabel } from "../../ui/form.js";
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
import { cn } from "../../../lib/utils.js";
|
|
4
|
+
export const AutoFormLabel = ({ children, labelRight, className, ...props })=>{
|
|
5
|
+
return /*#__PURE__*/ _jsxs(FormLabel, {
|
|
6
|
+
className: cn({
|
|
7
|
+
"flex flex-wrap items-center": labelRight
|
|
8
|
+
}, className),
|
|
5
9
|
...props,
|
|
6
|
-
children:
|
|
10
|
+
children: [
|
|
11
|
+
children,
|
|
12
|
+
labelRight && /*#__PURE__*/ _jsx("span", {
|
|
13
|
+
className: "ml-auto",
|
|
14
|
+
children: labelRight
|
|
15
|
+
})
|
|
16
|
+
]
|
|
7
17
|
});
|
|
8
18
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
export declare const AutoFormCheckbox: ({ label, description, otherProps: { isOptional }, field, ...props }: ItemAutoFormComponentProps & Omit<React.ComponentProps<typeof Checkbox>, "checked">) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import { Checkbox } from "../../ui/checkbox";
|
|
2
|
+
import type { ItemAutoFormComponentProps } from "../auto-form";
|
|
3
|
+
export declare const AutoFormCheckbox: ({ label, labelRight, description, otherProps: { isOptional }, field, ...props }: ItemAutoFormComponentProps & Omit<React.ComponentProps<typeof Checkbox>, "checked">) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
//# sourceMappingURL=checkbox.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/fields/checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/fields/checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAI/D,eAAO,MAAM,gBAAgB,GAAI,iFAO9B,0BAA0B,GAC3B,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,EAAE,SAAS,CAAC,4CA4BvD,CAAC"}
|
|
@@ -3,7 +3,7 @@ import { Checkbox } from "../../ui/checkbox.js";
|
|
|
3
3
|
import { FormControl, FormItem, FormMessage } from "../../ui/form.js";
|
|
4
4
|
import { AutoFormDesc } from "../common/desc.js";
|
|
5
5
|
import { AutoFormLabel } from "../common/label.js";
|
|
6
|
-
export const AutoFormCheckbox = ({ label, description, otherProps: { isOptional }, field, ...props })=>{
|
|
6
|
+
export const AutoFormCheckbox = ({ label, labelRight, description, otherProps: { isOptional }, field, ...props })=>{
|
|
7
7
|
return /*#__PURE__*/ _jsxs(FormItem, {
|
|
8
8
|
className: "flex flex-row items-start space-x-3 space-y-0 rounded-md border p-4",
|
|
9
9
|
children: [
|
|
@@ -23,6 +23,7 @@ export const AutoFormCheckbox = ({ label, description, otherProps: { isOptional
|
|
|
23
23
|
children: [
|
|
24
24
|
label && /*#__PURE__*/ _jsx(AutoFormLabel, {
|
|
25
25
|
isOptional: isOptional,
|
|
26
|
+
labelRight: labelRight,
|
|
26
27
|
children: label
|
|
27
28
|
}),
|
|
28
29
|
description && /*#__PURE__*/ _jsx(AutoFormDesc, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { Button } from
|
|
3
|
-
import type { ItemAutoFormComponentProps } from
|
|
4
|
-
export declare const AutoFormComboboxAsync: ({ label, field, description, placeholder, className, id, otherProps: { isOptional }, searchPlaceholder, fetchData, ...props }: ItemAutoFormComponentProps & Omit<React.ComponentProps<typeof Button>, "role" | "variant"> & {
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Button } from "../../../components/ui/button";
|
|
3
|
+
import type { ItemAutoFormComponentProps } from "../auto-form";
|
|
4
|
+
export declare const AutoFormComboboxAsync: ({ label, field, description, placeholder, className, labelRight, id, otherProps: { isOptional }, searchPlaceholder, fetchData, ...props }: ItemAutoFormComponentProps & Omit<React.ComponentProps<typeof Button>, "role" | "variant"> & {
|
|
5
5
|
fetchData: (params: {
|
|
6
6
|
search: string;
|
|
7
7
|
}) => Promise<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox-async.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/fields/combobox-async.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAiBhD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"combobox-async.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/fields/combobox-async.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAiBhD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAI/D,eAAO,MAAM,qBAAqB,GAAI,2IAYnC,0BAA0B,GAC3B,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC,GAAG;IAC9D,SAAS,EAAE,CAAC,MAAM,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,KAClC,OAAO,CACL;QACE,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;KACf,EAAE,CACJ,GACD;QACE,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;KACf,EAAE,CAAC;IACR,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,4CAsGF,CAAC"}
|