@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,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useQuery } from "@tanstack/react-query";
|
|
3
3
|
import { Check, ChevronsUpDown } from "lucide-react";
|
|
4
4
|
import { useTranslations } from "next-intl";
|
|
@@ -12,9 +12,9 @@ import { cn } from "../../../lib/utils.js";
|
|
|
12
12
|
import { Skeleton } from "../../ui/skeleton.js";
|
|
13
13
|
import { AutoFormDesc } from "../common/desc.js";
|
|
14
14
|
import { AutoFormLabel } from "../common/label.js";
|
|
15
|
-
export const AutoFormComboboxAsync = ({ label, field, description, placeholder, className, id, otherProps: { isOptional }, searchPlaceholder, fetchData, ...props })=>{
|
|
16
|
-
const t = useTranslations(
|
|
17
|
-
const [search, setSearch] = React.useState(
|
|
15
|
+
export const AutoFormComboboxAsync = ({ label, field, description, placeholder, className, labelRight, id, otherProps: { isOptional }, searchPlaceholder, fetchData, ...props })=>{
|
|
16
|
+
const t = useTranslations("core.global");
|
|
17
|
+
const [search, setSearch] = React.useState("");
|
|
18
18
|
const { data, isLoading } = useQuery({
|
|
19
19
|
queryKey: [
|
|
20
20
|
id,
|
|
@@ -36,6 +36,7 @@ export const AutoFormComboboxAsync = ({ label, field, description, placeholder,
|
|
|
36
36
|
children: [
|
|
37
37
|
label && /*#__PURE__*/ _jsx(AutoFormLabel, {
|
|
38
38
|
isOptional: isOptional,
|
|
39
|
+
labelRight: labelRight,
|
|
39
40
|
children: label
|
|
40
41
|
}),
|
|
41
42
|
/*#__PURE__*/ _jsxs(Popover, {
|
|
@@ -45,12 +46,12 @@ export const AutoFormComboboxAsync = ({ label, field, description, placeholder,
|
|
|
45
46
|
children: /*#__PURE__*/ _jsx(FormControl, {
|
|
46
47
|
children: /*#__PURE__*/ _jsxs(Button, {
|
|
47
48
|
"aria-label": "Combobox",
|
|
48
|
-
className: cn(
|
|
49
|
+
className: cn("w-[200px] justify-between bg-transparent", !field.value && "text-muted-foreground", className),
|
|
49
50
|
role: "combobox",
|
|
50
51
|
variant: "outline",
|
|
51
52
|
...props,
|
|
52
53
|
children: [
|
|
53
|
-
field.value?.label ?? placeholder ?? t(
|
|
54
|
+
field.value?.label ?? placeholder ?? t("select_option"),
|
|
54
55
|
/*#__PURE__*/ _jsx(ChevronsUpDown, {
|
|
55
56
|
className: "ml-2 size-4 shrink-0 opacity-50"
|
|
56
57
|
})
|
|
@@ -67,23 +68,29 @@ export const AutoFormComboboxAsync = ({ label, field, description, placeholder,
|
|
|
67
68
|
onChangeCapture: (e)=>{
|
|
68
69
|
handleChangeSearch(e.currentTarget.value);
|
|
69
70
|
},
|
|
70
|
-
placeholder: searchPlaceholder ?? t(
|
|
71
|
+
placeholder: searchPlaceholder ?? t("search_placeholder")
|
|
71
72
|
}),
|
|
72
73
|
/*#__PURE__*/ _jsx(CommandList, {
|
|
73
|
-
children:
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|
|
74
|
+
children: (()=>{
|
|
75
|
+
if (isLoading) {
|
|
76
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
77
|
+
className: "space-y-2 p-2",
|
|
78
|
+
children: [
|
|
79
|
+
/*#__PURE__*/ _jsx(Skeleton, {
|
|
80
|
+
className: "h-6 rounded-sm"
|
|
81
|
+
}),
|
|
82
|
+
/*#__PURE__*/ _jsx(Skeleton, {
|
|
83
|
+
className: "h-6 rounded-sm"
|
|
84
|
+
})
|
|
85
|
+
]
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
if ((data ?? []).length === 0) {
|
|
89
|
+
return /*#__PURE__*/ _jsx(CommandEmpty, {
|
|
90
|
+
children: t("results_not_found")
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
return /*#__PURE__*/ _jsx(CommandGroup, {
|
|
87
94
|
children: (data ?? []).map(({ label, value })=>/*#__PURE__*/ _jsxs(CommandItem, {
|
|
88
95
|
onSelect: ()=>{
|
|
89
96
|
field.onChange({
|
|
@@ -95,12 +102,12 @@ export const AutoFormComboboxAsync = ({ label, field, description, placeholder,
|
|
|
95
102
|
children: [
|
|
96
103
|
label,
|
|
97
104
|
/*#__PURE__*/ _jsx(Check, {
|
|
98
|
-
className: cn(
|
|
105
|
+
className: cn("ml-auto", value === field.value?.value ? "opacity-100" : "opacity-0")
|
|
99
106
|
})
|
|
100
107
|
]
|
|
101
108
|
}, value))
|
|
102
|
-
})
|
|
103
|
-
})
|
|
109
|
+
});
|
|
110
|
+
})()
|
|
104
111
|
})
|
|
105
112
|
]
|
|
106
113
|
})
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { Button } from
|
|
3
|
-
import type { ItemAutoFormComponentProps } from
|
|
4
|
-
export declare const AutoFormCombobox: ({ label, field, description, placeholder, className, otherProps: { enum: enumValues, isOptional }, labels, searchPlaceholder, ...props }: ItemAutoFormComponentProps & Omit<React.ComponentProps<typeof Button>, "role" | "variant"> & {
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import { Button } from "../../../components/ui/button";
|
|
3
|
+
import type { ItemAutoFormComponentProps } from "../auto-form";
|
|
4
|
+
export declare const AutoFormCombobox: ({ label, field, description, placeholder, className, otherProps: { enum: enumValues, isOptional }, labels, labelRight, searchPlaceholder, ...props }: ItemAutoFormComponentProps & Omit<React.ComponentProps<typeof Button>, "role" | "variant"> & {
|
|
5
5
|
labels?: {
|
|
6
6
|
label: string;
|
|
7
7
|
value: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/fields/combobox.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"combobox.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/fields/combobox.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAiBhD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAK/D,eAAO,MAAM,gBAAgB,GAAI,sJAW9B,0BAA0B,GAC3B,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC,GAAG;IAC9D,MAAM,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,4CA6EF,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Check, ChevronsUpDown } from "lucide-react";
|
|
3
3
|
import { useTranslations } from "next-intl";
|
|
4
|
-
import React from "react";
|
|
5
4
|
import { Button } from "../../ui/button.js";
|
|
6
5
|
import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from "../../ui/command.js";
|
|
7
6
|
import { FormControl, FormItem, FormMessage } from "../../ui/form.js";
|
|
@@ -9,8 +8,8 @@ import { Popover, PopoverContent, PopoverTrigger } from "../../ui/popover.js";
|
|
|
9
8
|
import { cn } from "../../../lib/utils.js";
|
|
10
9
|
import { AutoFormDesc } from "../common/desc.js";
|
|
11
10
|
import { AutoFormLabel } from "../common/label.js";
|
|
12
|
-
export const AutoFormCombobox = ({ label, field, description, placeholder, className, otherProps: { enum: enumValues = [], isOptional }, labels = [], searchPlaceholder, ...props })=>{
|
|
13
|
-
const t = useTranslations(
|
|
11
|
+
export const AutoFormCombobox = ({ label, field, description, placeholder, className, otherProps: { enum: enumValues = [], isOptional }, labels = [], labelRight, searchPlaceholder, ...props })=>{
|
|
12
|
+
const t = useTranslations("core.global");
|
|
14
13
|
const values = enumValues.map((value)=>{
|
|
15
14
|
const label = labels.find((l)=>l.value === value)?.label;
|
|
16
15
|
return {
|
|
@@ -23,6 +22,7 @@ export const AutoFormCombobox = ({ label, field, description, placeholder, class
|
|
|
23
22
|
children: [
|
|
24
23
|
label && /*#__PURE__*/ _jsx(AutoFormLabel, {
|
|
25
24
|
isOptional: isOptional,
|
|
25
|
+
labelRight: labelRight,
|
|
26
26
|
children: label
|
|
27
27
|
}),
|
|
28
28
|
/*#__PURE__*/ _jsxs(Popover, {
|
|
@@ -32,12 +32,12 @@ export const AutoFormCombobox = ({ label, field, description, placeholder, class
|
|
|
32
32
|
children: /*#__PURE__*/ _jsx(FormControl, {
|
|
33
33
|
children: /*#__PURE__*/ _jsxs(Button, {
|
|
34
34
|
"aria-label": "Combobox",
|
|
35
|
-
className: cn(
|
|
35
|
+
className: cn("w-[200px] justify-between", !field.value && "text-muted-foreground", className),
|
|
36
36
|
role: "combobox",
|
|
37
37
|
variant: "outline",
|
|
38
38
|
...props,
|
|
39
39
|
children: [
|
|
40
|
-
field.value ? values.find(({ value })=>value === field.value)?.label : placeholder ?? t(
|
|
40
|
+
field.value ? values.find(({ value })=>value === field.value)?.label : placeholder ?? t("select_option"),
|
|
41
41
|
/*#__PURE__*/ _jsx(ChevronsUpDown, {
|
|
42
42
|
className: "ml-2 size-4 shrink-0 opacity-50"
|
|
43
43
|
})
|
|
@@ -50,12 +50,12 @@ export const AutoFormCombobox = ({ label, field, description, placeholder, class
|
|
|
50
50
|
children: /*#__PURE__*/ _jsxs(Command, {
|
|
51
51
|
children: [
|
|
52
52
|
/*#__PURE__*/ _jsx(CommandInput, {
|
|
53
|
-
placeholder: searchPlaceholder ?? t(
|
|
53
|
+
placeholder: searchPlaceholder ?? t("search_placeholder")
|
|
54
54
|
}),
|
|
55
55
|
/*#__PURE__*/ _jsxs(CommandList, {
|
|
56
56
|
children: [
|
|
57
57
|
/*#__PURE__*/ _jsx(CommandEmpty, {
|
|
58
|
-
children: t(
|
|
58
|
+
children: t("results_not_found")
|
|
59
59
|
}),
|
|
60
60
|
/*#__PURE__*/ _jsx(CommandGroup, {
|
|
61
61
|
children: values.map(({ label, value })=>/*#__PURE__*/ _jsxs(CommandItem, {
|
|
@@ -66,7 +66,7 @@ export const AutoFormCombobox = ({ label, field, description, placeholder, class
|
|
|
66
66
|
children: [
|
|
67
67
|
label,
|
|
68
68
|
/*#__PURE__*/ _jsx(Check, {
|
|
69
|
-
className: cn(
|
|
69
|
+
className: cn("ml-auto", value === field.value ? "opacity-100" : "opacity-0")
|
|
70
70
|
})
|
|
71
71
|
]
|
|
72
72
|
}, value))
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
export declare const AutoFormInput: ({ label, description, otherProps: { isOptional, maxLength, minLength, pattern, type }, field, ...props }: ItemAutoFormComponentProps & Omit<React.ComponentProps<typeof Input>, "value">) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import { Input } from "../../ui/input";
|
|
2
|
+
import type { ItemAutoFormComponentProps } from "../auto-form";
|
|
3
|
+
export declare const AutoFormInput: ({ label, labelRight, description, otherProps: { isOptional, maxLength, minLength, pattern, type }, field, ...props }: ItemAutoFormComponentProps & Omit<React.ComponentProps<typeof Input>, "value">) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
//# sourceMappingURL=input.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/fields/input.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/fields/input.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAI/D,eAAO,MAAM,aAAa,GAAI,sHAO3B,0BAA0B,GAC3B,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,KAAK,CAAC,EAAE,OAAO,CAAC,4CAgClD,CAAC"}
|
|
@@ -3,11 +3,12 @@ import { FormControl, FormItem, FormMessage } from "../../ui/form.js";
|
|
|
3
3
|
import { Input } from "../../ui/input.js";
|
|
4
4
|
import { AutoFormDesc } from "../common/desc.js";
|
|
5
5
|
import { AutoFormLabel } from "../common/label.js";
|
|
6
|
-
export const AutoFormInput = ({ label, description, otherProps: { isOptional, maxLength, minLength, pattern, type }, field, ...props })=>{
|
|
6
|
+
export const AutoFormInput = ({ label, labelRight, description, otherProps: { isOptional, maxLength, minLength, pattern, type }, field, ...props })=>{
|
|
7
7
|
return /*#__PURE__*/ _jsxs(FormItem, {
|
|
8
8
|
children: [
|
|
9
9
|
label && /*#__PURE__*/ _jsx(AutoFormLabel, {
|
|
10
10
|
isOptional: isOptional,
|
|
11
|
+
labelRight: labelRight,
|
|
11
12
|
children: label
|
|
12
13
|
}),
|
|
13
14
|
/*#__PURE__*/ _jsx(FormControl, {
|
|
@@ -24,8 +25,8 @@ export const AutoFormInput = ({ label, description, otherProps: { isOptional, ma
|
|
|
24
25
|
props.onChange?.(e);
|
|
25
26
|
},
|
|
26
27
|
pattern: pattern,
|
|
27
|
-
type: type ??
|
|
28
|
-
value: field.value ??
|
|
28
|
+
type: type ?? "text",
|
|
29
|
+
value: field.value ?? "",
|
|
29
30
|
...props
|
|
30
31
|
})
|
|
31
32
|
}),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { RadioGroup } from
|
|
3
|
-
import type { ItemAutoFormComponentProps } from
|
|
4
|
-
export declare const AutoFormRadioGroup: ({ label, field, description, otherProps: { enum: enumValues, isOptional }, labels, ...props }: ItemAutoFormComponentProps & Omit<React.ComponentProps<typeof RadioGroup>, "value"> & {
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import { RadioGroup } from "../../../components/ui/radio-group";
|
|
3
|
+
import type { ItemAutoFormComponentProps } from "../auto-form";
|
|
4
|
+
export declare const AutoFormRadioGroup: ({ label, labelRight, field, description, otherProps: { enum: enumValues, isOptional }, labels, ...props }: ItemAutoFormComponentProps & Omit<React.ComponentProps<typeof RadioGroup>, "value"> & {
|
|
5
5
|
labels?: {
|
|
6
6
|
label: string;
|
|
7
7
|
value: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/fields/radio-group.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/fields/radio-group.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,OAAO,EAAE,UAAU,EAAkB,MAAM,6BAA6B,CAAC;AAEzE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAK/D,eAAO,MAAM,kBAAkB,GAAI,2GAQhC,0BAA0B,GAC3B,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,UAAU,CAAC,EAAE,OAAO,CAAC,GAAG;IACvD,MAAM,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAC7C,4CA2CF,CAAC"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import React from "react";
|
|
3
2
|
import { FormControl, FormItem, FormLabel, FormMessage } from "../../ui/form.js";
|
|
4
3
|
import { RadioGroup, RadioGroupItem } from "../../ui/radio-group.js";
|
|
5
4
|
import { AutoFormDesc } from "../common/desc.js";
|
|
6
5
|
import { AutoFormLabel } from "../common/label.js";
|
|
7
|
-
export const AutoFormRadioGroup = ({ label, field, description, otherProps: { enum: enumValues = [], isOptional }, labels = [], ...props })=>{
|
|
6
|
+
export const AutoFormRadioGroup = ({ label, labelRight, field, description, otherProps: { enum: enumValues = [], isOptional }, labels = [], ...props })=>{
|
|
8
7
|
const values = enumValues.map((value)=>{
|
|
9
8
|
const label = labels.find((l)=>l.value === value)?.label;
|
|
10
9
|
return {
|
|
@@ -17,6 +16,7 @@ export const AutoFormRadioGroup = ({ label, field, description, otherProps: { en
|
|
|
17
16
|
children: [
|
|
18
17
|
label && /*#__PURE__*/ _jsx(AutoFormLabel, {
|
|
19
18
|
isOptional: isOptional,
|
|
19
|
+
labelRight: labelRight,
|
|
20
20
|
children: label
|
|
21
21
|
}),
|
|
22
22
|
/*#__PURE__*/ _jsx(FormControl, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { Select } from
|
|
3
|
-
import type { ItemAutoFormComponentProps } from
|
|
4
|
-
export declare const AutoFormSelect: ({ label, field, description, otherProps: { enum: enumValues, isOptional }, placeholder, labels, ...props }: ItemAutoFormComponentProps & Omit<React.ComponentProps<typeof Select>, "value"> & {
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import { Select } from "../../../components/ui/select";
|
|
3
|
+
import type { ItemAutoFormComponentProps } from "../auto-form";
|
|
4
|
+
export declare const AutoFormSelect: ({ label, field, description, otherProps: { enum: enumValues, isOptional }, placeholder, labelRight, labels, ...props }: ItemAutoFormComponentProps & Omit<React.ComponentProps<typeof Select>, "value"> & {
|
|
5
5
|
labels?: {
|
|
6
6
|
label: string;
|
|
7
7
|
value: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/fields/select.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/fields/select.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EACL,MAAM,EAKP,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAK/D,eAAO,MAAM,cAAc,GAAI,wHAS5B,0BAA0B,GAC3B,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,EAAE,OAAO,CAAC,GAAG;IACnD,MAAM,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,4CAwDF,CAAC"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useTranslations } from "next-intl";
|
|
3
|
-
import React from "react";
|
|
4
3
|
import { FormControl, FormItem, FormMessage } from "../../ui/form.js";
|
|
5
4
|
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../../ui/select.js";
|
|
6
5
|
import { AutoFormDesc } from "../common/desc.js";
|
|
7
6
|
import { AutoFormLabel } from "../common/label.js";
|
|
8
|
-
export const AutoFormSelect = ({ label, field, description, otherProps: { enum: enumValues = [], isOptional }, placeholder, labels = [], ...props })=>{
|
|
9
|
-
const t = useTranslations(
|
|
7
|
+
export const AutoFormSelect = ({ label, field, description, otherProps: { enum: enumValues = [], isOptional }, placeholder, labelRight, labels = [], ...props })=>{
|
|
8
|
+
const t = useTranslations("core.global");
|
|
10
9
|
const values = enumValues.map((value)=>{
|
|
11
10
|
const label = labels.find((l)=>l.value === value)?.label;
|
|
12
11
|
return {
|
|
@@ -14,12 +13,13 @@ export const AutoFormSelect = ({ label, field, description, otherProps: { enum:
|
|
|
14
13
|
label: label ?? value
|
|
15
14
|
};
|
|
16
15
|
});
|
|
17
|
-
const currentPlaceholder = (values ?? labels).find((l)=>l.value === field.value)?.label ?? t(
|
|
16
|
+
const currentPlaceholder = (values ?? labels).find((l)=>l.value === field.value)?.label ?? t("select_option");
|
|
18
17
|
return /*#__PURE__*/ _jsxs(FormItem, {
|
|
19
18
|
className: "space-y-3",
|
|
20
19
|
children: [
|
|
21
20
|
label && /*#__PURE__*/ _jsx(AutoFormLabel, {
|
|
22
21
|
isOptional: isOptional,
|
|
22
|
+
labelRight: labelRight,
|
|
23
23
|
children: label
|
|
24
24
|
}),
|
|
25
25
|
/*#__PURE__*/ _jsx(FormControl, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Switch } from
|
|
2
|
-
import type { ItemAutoFormComponentProps } from
|
|
3
|
-
export declare const AutoFormSwitch: ({ label, field, otherProps: { isOptional }, description, ...props }: ItemAutoFormComponentProps & Omit<React.ComponentProps<typeof Switch>, "checked">) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import { Switch } from "../../../components/ui/switch";
|
|
2
|
+
import type { ItemAutoFormComponentProps } from "../auto-form";
|
|
3
|
+
export declare const AutoFormSwitch: ({ label, field, labelRight, otherProps: { isOptional }, description, ...props }: ItemAutoFormComponentProps & Omit<React.ComponentProps<typeof Switch>, "checked">) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
//# sourceMappingURL=switch.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/fields/switch.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAEhD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAK/D,eAAO,MAAM,cAAc,GAAI,
|
|
1
|
+
{"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/fields/switch.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAEhD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAK/D,eAAO,MAAM,cAAc,GAAI,iFAO5B,0BAA0B,GAC3B,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,EAAE,SAAS,CAAC,4CA8BrD,CAAC"}
|
|
@@ -3,7 +3,7 @@ import { FormControl, FormItem } from "../../ui/form.js";
|
|
|
3
3
|
import { Switch } from "../../ui/switch.js";
|
|
4
4
|
import { AutoFormDesc } from "../common/desc.js";
|
|
5
5
|
import { AutoFormLabel } from "../common/label.js";
|
|
6
|
-
export const AutoFormSwitch = ({ label, field, otherProps: { isOptional }, description, ...props })=>{
|
|
6
|
+
export const AutoFormSwitch = ({ label, field, labelRight, otherProps: { isOptional }, description, ...props })=>{
|
|
7
7
|
return /*#__PURE__*/ _jsxs(FormItem, {
|
|
8
8
|
className: "flex flex-row items-center justify-between rounded-lg border p-4",
|
|
9
9
|
children: [
|
|
@@ -13,6 +13,7 @@ export const AutoFormSwitch = ({ label, field, otherProps: { isOptional }, descr
|
|
|
13
13
|
label && /*#__PURE__*/ _jsx(AutoFormLabel, {
|
|
14
14
|
className: "text-base",
|
|
15
15
|
isOptional: isOptional,
|
|
16
|
+
labelRight: labelRight,
|
|
16
17
|
children: label
|
|
17
18
|
}),
|
|
18
19
|
description && /*#__PURE__*/ _jsx(AutoFormDesc, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { Textarea } from
|
|
3
|
-
import type { ItemAutoFormComponentProps } from
|
|
4
|
-
export declare const AutoFormTextarea: ({ label, description, otherProps: { isOptional, maxLength, minLength }, field, ...props }: ItemAutoFormComponentProps & Omit<React.ComponentProps<typeof Textarea>, "value"> & {
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import { Textarea } from "../../../components/ui/textarea";
|
|
3
|
+
import type { ItemAutoFormComponentProps } from "../auto-form";
|
|
4
|
+
export declare const AutoFormTextarea: ({ label, description, labelRight, otherProps: { isOptional, maxLength, minLength }, field, ...props }: ItemAutoFormComponentProps & Omit<React.ComponentProps<typeof Textarea>, "value"> & {
|
|
5
5
|
description?: React.ReactNode;
|
|
6
6
|
label?: React.ReactNode;
|
|
7
7
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/fields/textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/fields/textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEpD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAK/D,eAAO,MAAM,gBAAgB,GAAI,uGAO9B,0BAA0B,GAC3B,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,EAAE,OAAO,CAAC,GAAG;IACrD,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACzB,4CA8BF,CAAC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import React from "react";
|
|
3
2
|
import { FormControl, FormItem, FormMessage } from "../../ui/form.js";
|
|
4
3
|
import { Textarea } from "../../ui/textarea.js";
|
|
5
4
|
import { AutoFormDesc } from "../common/desc.js";
|
|
6
5
|
import { AutoFormLabel } from "../common/label.js";
|
|
7
|
-
export const AutoFormTextarea = ({ label, description, otherProps: { isOptional, maxLength, minLength }, field, ...props })=>{
|
|
6
|
+
export const AutoFormTextarea = ({ label, description, labelRight, otherProps: { isOptional, maxLength, minLength }, field, ...props })=>{
|
|
8
7
|
return /*#__PURE__*/ _jsxs(FormItem, {
|
|
9
8
|
children: [
|
|
10
9
|
label && /*#__PURE__*/ _jsx(AutoFormLabel, {
|
|
11
10
|
isOptional: isOptional,
|
|
11
|
+
labelRight: labelRight,
|
|
12
12
|
children: label
|
|
13
13
|
}),
|
|
14
14
|
/*#__PURE__*/ _jsx(FormControl, {
|
|
@@ -23,7 +23,7 @@ export const AutoFormTextarea = ({ label, description, otherProps: { isOptional,
|
|
|
23
23
|
field.onChange(e);
|
|
24
24
|
props.onChange?.(e);
|
|
25
25
|
},
|
|
26
|
-
value: field.value ??
|
|
26
|
+
value: field.value ?? "",
|
|
27
27
|
...props
|
|
28
28
|
})
|
|
29
29
|
}),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Messages, NamespaceKeys, NestedKeyOf } from
|
|
2
|
-
import
|
|
1
|
+
import type { Messages, NamespaceKeys, NestedKeyOf } from "next-intl";
|
|
2
|
+
import "server-only";
|
|
3
3
|
export declare function I18nProvider<NestedKey extends NamespaceKeys<Messages, NestedKeyOf<Messages>> = never>({ children, namespaces, }: {
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
namespaces: NestedKey | NestedKey[];
|
|
@@ -5,12 +5,12 @@ import "server-only";
|
|
|
5
5
|
const pick = (obj, paths)=>{
|
|
6
6
|
const result = {};
|
|
7
7
|
for (const path of paths){
|
|
8
|
-
const keys = path.split(
|
|
8
|
+
const keys = path.split(".");
|
|
9
9
|
let src = obj;
|
|
10
10
|
let dest = result;
|
|
11
11
|
for(let i = 0; i < keys.length; i++){
|
|
12
12
|
const key = keys[i];
|
|
13
|
-
if (src && Object.
|
|
13
|
+
if (src && Object.hasOwn(src, key)) {
|
|
14
14
|
if (i === keys.length - 1) {
|
|
15
15
|
dest[key] = src[key];
|
|
16
16
|
} else {
|
|
@@ -31,7 +31,7 @@ export async function I18nProvider({ children, namespaces }) {
|
|
|
31
31
|
locale
|
|
32
32
|
});
|
|
33
33
|
const messages = pick(messagesInit, [
|
|
34
|
-
|
|
34
|
+
"core.global",
|
|
35
35
|
...Array.isArray(namespaces) ? namespaces : [
|
|
36
36
|
namespaces
|
|
37
37
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logo-vitnode.d.ts","sourceRoot":"","sources":["../../../src/components/logo-vitnode.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,GAAI,gCAIzB,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAC/B,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,
|
|
1
|
+
{"version":3,"file":"logo-vitnode.d.ts","sourceRoot":"","sources":["../../../src/components/logo-vitnode.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,GAAI,gCAIzB,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAC/B,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,4CA8FA,CAAC"}
|
|
@@ -3,12 +3,15 @@ import { cn } from "../lib/utils.js";
|
|
|
3
3
|
export const LogoVitNode = ({ className, small, ...props })=>{
|
|
4
4
|
if (small) return /*#__PURE__*/ _jsxs("svg", {
|
|
5
5
|
"aria-label": "Logo VitNode",
|
|
6
|
-
className: cn(
|
|
6
|
+
className: cn("text-foreground", className),
|
|
7
7
|
fill: "none",
|
|
8
8
|
viewBox: "0 0 375 376",
|
|
9
9
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10
10
|
...props,
|
|
11
11
|
children: [
|
|
12
|
+
/*#__PURE__*/ _jsx("title", {
|
|
13
|
+
children: "Logo VitNode"
|
|
14
|
+
}),
|
|
12
15
|
/*#__PURE__*/ _jsx("path", {
|
|
13
16
|
d: "M169.385 16.196C180.827 9.60134 194.923 9.60134 206.365 16.196L329.51 87.1749C340.952 93.7695 348 105.957 348 119.146V261.104C348 274.293 340.952 286.481 329.51 293.075L206.365 364.054C194.923 370.649 180.827 370.649 169.385 364.054L46.2396 293.075C34.7982 286.481 27.75 274.293 27.75 261.104V119.146C27.75 105.957 34.7982 93.7695 46.2396 87.1749L169.385 16.196Z",
|
|
14
17
|
fill: "#FDFEFF"
|
|
@@ -42,12 +45,15 @@ export const LogoVitNode = ({ className, small, ...props })=>{
|
|
|
42
45
|
});
|
|
43
46
|
return /*#__PURE__*/ _jsxs("svg", {
|
|
44
47
|
"aria-label": "Logo VitNode",
|
|
45
|
-
className: cn(
|
|
48
|
+
className: cn("text-foreground", className),
|
|
46
49
|
fill: "none",
|
|
47
50
|
viewBox: "0 0 762 191",
|
|
48
51
|
xmlns: "http://www.w3.org/2000/svg",
|
|
49
52
|
...props,
|
|
50
53
|
children: [
|
|
54
|
+
/*#__PURE__*/ _jsx("title", {
|
|
55
|
+
children: "Logo VitNode"
|
|
56
|
+
}),
|
|
51
57
|
/*#__PURE__*/ _jsxs("g", {
|
|
52
58
|
children: [
|
|
53
59
|
/*#__PURE__*/ _jsx("path", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"language-swietcher.d.ts","sourceRoot":"","sources":["../../../../../src/components/switchers/langs/language-swietcher.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"language-swietcher.d.ts","sourceRoot":"","sources":["../../../../../src/components/switchers/langs/language-swietcher.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAUrD,eAAO,MAAM,gBAAgB,GAAI,aAAa;IAAE,OAAO,EAAE,YAAY,EAAE,CAAA;CAAE,4CAwCxE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { CheckIcon, LanguagesIcon } from "lucide-react";
|
|
4
4
|
import { useLocale, useTranslations } from "next-intl";
|
|
@@ -10,14 +10,14 @@ export const LanguageSwitcher = ({ locales })=>{
|
|
|
10
10
|
const currentLocale = useLocale();
|
|
11
11
|
const [isPending, startTransition] = React.useTransition();
|
|
12
12
|
const { replace } = useRouter();
|
|
13
|
-
const t = useTranslations(
|
|
13
|
+
const t = useTranslations("core.global");
|
|
14
14
|
const pathname = usePathname();
|
|
15
15
|
return /*#__PURE__*/ _jsxs(DropdownMenu, {
|
|
16
16
|
children: [
|
|
17
17
|
/*#__PURE__*/ _jsx(DropdownMenuTrigger, {
|
|
18
18
|
asChild: true,
|
|
19
19
|
children: /*#__PURE__*/ _jsx(Button, {
|
|
20
|
-
"aria-label": t(
|
|
20
|
+
"aria-label": t("language_switcher"),
|
|
21
21
|
className: "relative",
|
|
22
22
|
isLoading: isPending,
|
|
23
23
|
size: "icon",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Moon, Sun } from "lucide-react";
|
|
4
4
|
import { useTranslations } from "next-intl";
|
|
@@ -6,12 +6,12 @@ import { useTheme } from "next-themes";
|
|
|
6
6
|
import { Button } from "../../ui/button.js";
|
|
7
7
|
export const ThemeSwitcher = ()=>{
|
|
8
8
|
const { setTheme, resolvedTheme } = useTheme();
|
|
9
|
-
const t = useTranslations(
|
|
9
|
+
const t = useTranslations("core.global");
|
|
10
10
|
return /*#__PURE__*/ _jsxs(Button, {
|
|
11
|
-
"aria-label": t(
|
|
11
|
+
"aria-label": t("theme_switcher"),
|
|
12
12
|
className: "relative",
|
|
13
13
|
onClick: ()=>{
|
|
14
|
-
const nextTheme = resolvedTheme ===
|
|
14
|
+
const nextTheme = resolvedTheme === "dark" ? "light" : "dark";
|
|
15
15
|
setTheme(nextTheme);
|
|
16
16
|
},
|
|
17
17
|
size: "icon",
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { DataTable, DataTableTMin } from
|
|
1
|
+
import type { DataTable, DataTableTMin } from "./data-table";
|
|
2
2
|
export declare function ContentDataTable<T extends DataTableTMin>({ columns, edges, pageInfo, order, customNotFoundComponent, ...props }: React.ComponentProps<typeof DataTable<T>>): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=content.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../../src/components/table/content.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../../src/components/table/content.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAI7D,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,aAAa,EAAE,EACxD,OAAO,EACP,KAAK,EACL,QAAQ,EACR,KAAK,EACL,uBAAuB,EACvB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC,2CAkF3C"}
|
|
@@ -6,7 +6,7 @@ import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from ".
|
|
|
6
6
|
import { OrderTableHeadDataTable } from "./order-table-head.js";
|
|
7
7
|
import { PaginationDataTable } from "./pagination.js";
|
|
8
8
|
export function ContentDataTable({ columns, edges, pageInfo, order, customNotFoundComponent, ...props }) {
|
|
9
|
-
const t = useTranslations(
|
|
9
|
+
const t = useTranslations("core.global");
|
|
10
10
|
return /*#__PURE__*/ _jsxs("div", {
|
|
11
11
|
className: "space-y-4",
|
|
12
12
|
children: [
|
|
@@ -34,10 +34,10 @@ export function ContentDataTable({ columns, edges, pageInfo, order, customNotFou
|
|
|
34
34
|
const content = column.cell?.({
|
|
35
35
|
allData: edges,
|
|
36
36
|
row
|
|
37
|
-
}) ?? (column.id ===
|
|
37
|
+
}) ?? (column.id === "actions" ? "" : String(row[column.id]));
|
|
38
38
|
return /*#__PURE__*/ _jsx(TableCell, {
|
|
39
39
|
className: cn({
|
|
40
|
-
|
|
40
|
+
"flex items-center justify-end gap-2": column.id === "actions"
|
|
41
41
|
}),
|
|
42
42
|
children: content
|
|
43
43
|
}, `${row.id}_${column.id.toString()}`);
|
|
@@ -57,11 +57,11 @@ export function ContentDataTable({ columns, edges, pageInfo, order, customNotFou
|
|
|
57
57
|
children: [
|
|
58
58
|
/*#__PURE__*/ _jsx("h3", {
|
|
59
59
|
className: "text-xl font-semibold tracking-tight",
|
|
60
|
-
children: t(
|
|
60
|
+
children: t("no_results.title")
|
|
61
61
|
}),
|
|
62
62
|
/*#__PURE__*/ _jsx("p", {
|
|
63
63
|
className: "text-muted-foreground text-sm",
|
|
64
|
-
children: t(
|
|
64
|
+
children: t("no_results.desc")
|
|
65
65
|
})
|
|
66
66
|
]
|
|
67
67
|
})
|