@vitnode/core 1.2.0-canary.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +21 -0
- package/dist/emails/my-email.d.ts +2 -0
- package/dist/emails/my-email.d.ts.map +1 -0
- package/dist/scripts/get-config.d.ts +3 -0
- package/dist/scripts/get-config.d.ts.map +1 -0
- package/dist/scripts/plugin.d.ts +4 -0
- package/dist/scripts/plugin.d.ts.map +1 -0
- package/dist/scripts/prepare-database.d.ts +7 -0
- package/dist/scripts/prepare-database.d.ts.map +1 -0
- package/dist/scripts/prepare-plugins-files.d.ts +2 -0
- package/dist/scripts/prepare-plugins-files.d.ts.map +1 -0
- package/dist/scripts/run-interactive-shell-command.d.ts +2 -0
- package/dist/scripts/run-interactive-shell-command.d.ts.map +1 -0
- package/dist/scripts/scripts.d.ts +3 -0
- package/dist/scripts/scripts.d.ts.map +1 -0
- package/dist/scripts/scripts.js +21 -0
- package/dist/scripts/shared/file-utils.d.ts +14 -0
- package/dist/scripts/shared/file-utils.d.ts.map +1 -0
- package/dist/src/api/config.d.ts +24 -0
- package/dist/src/api/config.d.ts.map +1 -0
- package/dist/src/api/config.js +50 -0
- package/dist/src/api/lib/check-plugin-id.d.ts +15 -0
- package/dist/src/api/lib/check-plugin-id.d.ts.map +1 -0
- package/dist/src/api/lib/check-plugin-id.js +15 -0
- package/dist/src/api/lib/get-user-ip.d.ts +3 -0
- package/dist/src/api/lib/get-user-ip.d.ts.map +1 -0
- package/dist/src/api/lib/get-user-ip.js +8 -0
- package/dist/src/api/lib/module.d.ts +23 -0
- package/dist/src/api/lib/module.d.ts.map +1 -0
- package/dist/src/api/lib/module.js +21 -0
- package/dist/src/api/lib/plugin.d.ts +11 -0
- package/dist/src/api/lib/plugin.d.ts.map +1 -0
- package/dist/src/api/lib/plugin.js +14 -0
- package/dist/src/api/lib/route.d.ts +26 -0
- package/dist/src/api/lib/route.d.ts.map +1 -0
- package/dist/src/api/lib/route.js +23 -0
- package/dist/src/api/lib/with-pagination.d.ts +72 -0
- package/dist/src/api/lib/with-pagination.d.ts.map +1 -0
- package/dist/src/api/lib/with-pagination.js +70 -0
- package/dist/src/api/middlewares/global/global.d.ts +66 -0
- package/dist/src/api/middlewares/global/global.d.ts.map +1 -0
- package/dist/src/api/middlewares/global/global.js +47 -0
- package/dist/src/api/models/device.d.ts +10 -0
- package/dist/src/api/models/device.d.ts.map +1 -0
- package/dist/src/api/models/device.js +54 -0
- package/dist/src/api/models/email.d.ts +22 -0
- package/dist/src/api/models/email.d.ts.map +1 -0
- package/dist/src/api/models/email.js +30 -0
- package/dist/src/api/models/password.d.ts +5 -0
- package/dist/src/api/models/password.d.ts.map +1 -0
- package/dist/src/api/models/password.js +21 -0
- package/dist/src/api/models/session-admin.d.ts +24 -0
- package/dist/src/api/models/session-admin.d.ts.map +1 -0
- package/dist/src/api/models/session-admin.js +73 -0
- package/dist/src/api/models/session.d.ts +23 -0
- package/dist/src/api/models/session.d.ts.map +1 -0
- package/dist/src/api/models/session.js +60 -0
- package/dist/src/api/models/sso.d.ts +38 -0
- package/dist/src/api/models/sso.d.ts.map +1 -0
- package/dist/src/api/models/sso.js +120 -0
- package/dist/src/api/models/user/get-user-by-id.d.ts +17 -0
- package/dist/src/api/models/user/get-user-by-id.d.ts.map +1 -0
- package/dist/src/api/models/user/get-user-by-id.js +18 -0
- package/dist/src/api/models/user/sign-in-with-passwords.d.ts +10 -0
- package/dist/src/api/models/user/sign-in-with-passwords.d.ts.map +1 -0
- package/dist/src/api/models/user/sign-in-with-passwords.js +22 -0
- package/dist/src/api/models/user/sign-up.d.ts +21 -0
- package/dist/src/api/models/user/sign-up.d.ts.map +1 -0
- package/dist/src/api/models/user/sign-up.js +75 -0
- package/dist/src/api/models/user.d.ts +45 -0
- package/dist/src/api/models/user.d.ts.map +1 -0
- package/dist/src/api/models/user.js +8 -0
- package/dist/src/api/modules/admin/admin.module.d.ts +294 -0
- package/dist/src/api/modules/admin/admin.module.d.ts.map +1 -0
- package/dist/src/api/modules/admin/admin.module.js +14 -0
- package/dist/src/api/modules/admin/routes/session.route.d.ts +108 -0
- package/dist/src/api/modules/admin/routes/session.route.d.ts.map +1 -0
- package/dist/src/api/modules/admin/routes/session.route.js +51 -0
- package/dist/src/api/modules/admin/users/routes/list.route.d.ts +190 -0
- package/dist/src/api/modules/admin/users/routes/list.route.d.ts.map +1 -0
- package/dist/src/api/modules/admin/users/routes/list.route.js +79 -0
- package/dist/src/api/modules/admin/users/routes/users.route.d.ts +193 -0
- package/dist/src/api/modules/admin/users/routes/users.route.d.ts.map +1 -0
- package/dist/src/api/modules/admin/users/routes/users.route.js +84 -0
- package/dist/src/api/modules/admin/users/users.admin.module.d.ts +189 -0
- package/dist/src/api/modules/admin/users/users.admin.module.d.ts.map +1 -0
- package/dist/src/api/modules/admin/users/users.admin.module.js +10 -0
- package/dist/src/api/modules/middleware/middleware.module.d.ts +52 -0
- package/dist/src/api/modules/middleware/middleware.module.d.ts.map +1 -0
- package/dist/src/api/modules/middleware/middleware.module.js +10 -0
- package/dist/src/api/modules/middleware/route.d.ts +53 -0
- package/dist/src/api/modules/middleware/route.d.ts.map +1 -0
- package/dist/src/api/modules/middleware/route.js +39 -0
- package/dist/src/api/modules/users/avatar-color.d.ts +2 -0
- package/dist/src/api/modules/users/avatar-color.d.ts.map +1 -0
- package/dist/src/api/modules/users/avatar-color.js +43 -0
- package/dist/src/api/modules/users/routes/session.route.d.ts +103 -0
- package/dist/src/api/modules/users/routes/session.route.d.ts.map +1 -0
- package/dist/src/api/modules/users/routes/session.route.js +46 -0
- package/dist/src/api/modules/users/routes/sign-in.route.d.ts +88 -0
- package/dist/src/api/modules/users/routes/sign-in.route.d.ts.map +1 -0
- package/dist/src/api/modules/users/routes/sign-in.route.js +71 -0
- package/dist/src/api/modules/users/routes/sign-out.route.d.ts +47 -0
- package/dist/src/api/modules/users/routes/sign-out.route.d.ts.map +1 -0
- package/dist/src/api/modules/users/routes/sign-out.route.js +43 -0
- package/dist/src/api/modules/users/routes/sign-up.route.d.ts +89 -0
- package/dist/src/api/modules/users/routes/sign-up.route.d.ts.map +1 -0
- package/dist/src/api/modules/users/routes/sign-up.route.js +60 -0
- package/dist/src/api/modules/users/routes/test.route.d.ts +31 -0
- package/dist/src/api/modules/users/routes/test.route.d.ts.map +1 -0
- package/dist/src/api/modules/users/routes/test.route.js +32 -0
- package/dist/src/api/modules/users/sso/routes/callback.route.d.ts +78 -0
- package/dist/src/api/modules/users/sso/routes/callback.route.d.ts.map +1 -0
- package/dist/src/api/modules/users/sso/routes/callback.route.js +49 -0
- package/dist/src/api/modules/users/sso/routes/create-url.route.d.ts +51 -0
- package/dist/src/api/modules/users/sso/routes/create-url.route.d.ts.map +1 -0
- package/dist/src/api/modules/users/sso/routes/create-url.route.js +36 -0
- package/dist/src/api/modules/users/sso/sso.module.d.ts +125 -0
- package/dist/src/api/modules/users/sso/sso.module.d.ts.map +1 -0
- package/dist/src/api/modules/users/sso/sso.module.js +12 -0
- package/dist/src/api/modules/users/users.module.d.ts +439 -0
- package/dist/src/api/modules/users/users.module.d.ts.map +1 -0
- package/dist/src/api/modules/users/users.module.js +22 -0
- package/dist/src/api/plugin.d.ts +2 -0
- package/dist/src/api/plugin.d.ts.map +1 -0
- package/dist/src/api/plugin.js +13 -0
- package/dist/src/api/plugins/email/nodemailer.d.ts +10 -0
- package/dist/src/api/plugins/email/nodemailer.d.ts.map +1 -0
- package/dist/src/api/plugins/email/nodemailer.js +30 -0
- package/dist/src/api/plugins/email/resend.d.ts +6 -0
- package/dist/src/api/plugins/email/resend.d.ts.map +1 -0
- package/dist/src/api/plugins/email/resend.js +21 -0
- package/dist/src/api/plugins/sso/discord.d.ts +6 -0
- package/dist/src/api/plugins/sso/discord.d.ts.map +1 -0
- package/dist/src/api/plugins/sso/discord.js +77 -0
- package/dist/src/api/plugins/sso/facebook.d.ts +6 -0
- package/dist/src/api/plugins/sso/facebook.d.ts.map +1 -0
- package/dist/src/api/plugins/sso/facebook.js +76 -0
- package/dist/src/api/plugins/sso/google.d.ts +6 -0
- package/dist/src/api/plugins/sso/google.d.ts.map +1 -0
- package/dist/src/api/plugins/sso/google.js +87 -0
- package/dist/src/app/login/page.d.ts +6 -0
- package/dist/src/app/login/page.d.ts.map +1 -0
- package/dist/src/app/login/page.js +15 -0
- package/dist/src/app/login/sso/[providerId]/page.d.ts +7 -0
- package/dist/src/app/login/sso/[providerId]/page.d.ts.map +1 -0
- package/dist/src/app/login/sso/[providerId]/page.js +10 -0
- package/dist/src/app/register/page.d.ts +6 -0
- package/dist/src/app/register/page.d.ts.map +1 -0
- package/dist/src/app/register/page.js +15 -0
- package/dist/src/app_admin/core/page.d.ts +2 -0
- package/dist/src/app_admin/core/page.d.ts.map +1 -0
- package/dist/src/app_admin/core/page.js +5 -0
- package/dist/src/app_admin/core/test/page.d.ts +2 -0
- package/dist/src/app_admin/core/test/page.d.ts.map +1 -0
- package/dist/src/app_admin/core/test/page.js +5 -0
- package/dist/src/app_admin/core/users/page.d.ts +6 -0
- package/dist/src/app_admin/core/users/page.d.ts.map +1 -0
- package/dist/src/app_admin/core/users/page.js +35 -0
- package/dist/src/components/avatar.d.ts +10 -0
- package/dist/src/components/avatar.d.ts.map +1 -0
- package/dist/src/components/avatar.js +14 -0
- package/dist/src/components/date-format.d.ts +5 -0
- package/dist/src/components/date-format.d.ts.map +1 -0
- package/dist/src/components/date-format.js +38 -0
- package/dist/src/components/form/auto-form.d.ts +12 -0
- package/dist/src/components/form/auto-form.d.ts.map +1 -0
- package/dist/src/components/form/auto-form.js +57 -0
- package/dist/src/components/form/common/desc.d.ts +2 -0
- package/dist/src/components/form/common/desc.d.ts.map +1 -0
- package/dist/src/components/form/common/desc.js +9 -0
- package/dist/src/components/form/common/label.d.ts +3 -0
- package/dist/src/components/form/common/label.d.ts.map +1 -0
- package/dist/src/components/form/common/label.js +8 -0
- package/dist/src/components/form/fields/checkbox.d.ts +8 -0
- package/dist/src/components/form/fields/checkbox.d.ts.map +1 -0
- package/dist/src/components/form/fields/checkbox.js +35 -0
- package/dist/src/components/form/fields/combobox.d.ts +14 -0
- package/dist/src/components/form/fields/combobox.d.ts.map +1 -0
- package/dist/src/components/form/fields/combobox.js +88 -0
- package/dist/src/components/form/fields/input.d.ts +9 -0
- package/dist/src/components/form/fields/input.d.ts.map +1 -0
- package/dist/src/components/form/fields/input.js +34 -0
- package/dist/src/components/form/fields/item.d.ts +14 -0
- package/dist/src/components/form/fields/item.d.ts.map +1 -0
- package/dist/src/components/form/fields/item.js +22 -0
- package/dist/src/components/form/fields/radio-group.d.ts +13 -0
- package/dist/src/components/form/fields/radio-group.d.ts.map +1 -0
- package/dist/src/components/form/fields/radio-group.js +51 -0
- package/dist/src/components/form/fields/select.d.ts +14 -0
- package/dist/src/components/form/fields/select.d.ts.map +1 -0
- package/dist/src/components/form/fields/select.js +59 -0
- package/dist/src/components/form/fields/switch.d.ts +8 -0
- package/dist/src/components/form/fields/switch.d.ts.map +1 -0
- package/dist/src/components/form/fields/switch.js +35 -0
- package/dist/src/components/form/fields/textarea.d.ts +9 -0
- package/dist/src/components/form/fields/textarea.d.ts.map +1 -0
- package/dist/src/components/form/fields/textarea.js +34 -0
- package/dist/src/components/i18n-provider.d.ts +7 -0
- package/dist/src/components/i18n-provider.d.ts.map +1 -0
- package/dist/src/components/i18n-provider.js +43 -0
- package/dist/src/components/logo-vitnode.d.ts +4 -0
- package/dist/src/components/logo-vitnode.d.ts.map +1 -0
- package/dist/src/components/logo-vitnode.js +113 -0
- package/dist/src/components/switchers/theme-switcher.d.ts +2 -0
- package/dist/src/components/switchers/theme-switcher.d.ts.map +1 -0
- package/dist/src/components/switchers/theme-switcher.js +25 -0
- package/dist/src/components/table/content.d.ts +3 -0
- package/dist/src/components/table/content.d.ts.map +1 -0
- package/dist/src/components/table/content.js +84 -0
- package/dist/src/components/table/data-table.d.ts +37 -0
- package/dist/src/components/table/data-table.d.ts.map +1 -0
- package/dist/src/components/table/data-table.js +69 -0
- package/dist/src/components/table/order-table-head.d.ts +7 -0
- package/dist/src/components/table/order-table-head.d.ts.map +1 -0
- package/dist/src/components/table/order-table-head.js +39 -0
- package/dist/src/components/table/pagination.d.ts +11 -0
- package/dist/src/components/table/pagination.d.ts.map +1 -0
- package/dist/src/components/table/pagination.js +122 -0
- package/dist/src/components/ui/accordion.d.ts +8 -0
- package/dist/src/components/ui/accordion.d.ts.map +1 -0
- package/dist/src/components/ui/accordion.js +47 -0
- package/dist/src/components/ui/alert-dialog.d.ts +15 -0
- package/dist/src/components/ui/alert-dialog.d.ts.map +1 -0
- package/dist/src/components/ui/alert-dialog.js +86 -0
- package/dist/src/components/ui/alert.d.ts +10 -0
- package/dist/src/components/ui/alert.d.ts.map +1 -0
- package/dist/src/components/ui/alert.js +40 -0
- package/dist/src/components/ui/badge.d.ts +10 -0
- package/dist/src/components/ui/badge.d.ts.map +1 -0
- package/dist/src/components/ui/badge.js +29 -0
- package/dist/src/components/ui/button.d.ts +13 -0
- package/dist/src/components/ui/button.d.ts.map +1 -0
- package/dist/src/components/ui/button.js +66 -0
- package/dist/src/components/ui/card.d.ts +10 -0
- package/dist/src/components/ui/card.d.ts.map +1 -0
- package/dist/src/components/ui/card.js +53 -0
- package/dist/src/components/ui/checkbox.d.ts +5 -0
- package/dist/src/components/ui/checkbox.d.ts.map +1 -0
- package/dist/src/components/ui/checkbox.js +21 -0
- package/dist/src/components/ui/collapsible.d.ts +6 -0
- package/dist/src/components/ui/collapsible.d.ts.map +1 -0
- package/dist/src/components/ui/collapsible.js +22 -0
- package/dist/src/components/ui/command.d.ts +19 -0
- package/dist/src/components/ui/command.d.ts.map +1 -0
- package/dist/src/components/ui/command.js +99 -0
- package/dist/src/components/ui/context-menu.d.ts +26 -0
- package/dist/src/components/ui/context-menu.d.ts.map +1 -0
- package/dist/src/components/ui/context-menu.js +141 -0
- package/dist/src/components/ui/dialog.d.ts +23 -0
- package/dist/src/components/ui/dialog.d.ts.map +1 -0
- package/dist/src/components/ui/dialog.js +181 -0
- package/dist/src/components/ui/drawer.d.ts +14 -0
- package/dist/src/components/ui/drawer.d.ts.map +1 -0
- package/dist/src/components/ui/drawer.js +84 -0
- package/dist/src/components/ui/dropdown-menu.d.ts +26 -0
- package/dist/src/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/src/components/ui/dropdown-menu.js +142 -0
- package/dist/src/components/ui/form.d.ts +33 -0
- package/dist/src/components/ui/form.d.ts.map +1 -0
- package/dist/src/components/ui/form.js +142 -0
- package/dist/src/components/ui/header-content.d.ts +17 -0
- package/dist/src/components/ui/header-content.d.ts.map +1 -0
- package/dist/src/components/ui/header-content.js +30 -0
- package/dist/src/components/ui/hover-card.d.ts +7 -0
- package/dist/src/components/ui/hover-card.d.ts.map +1 -0
- package/dist/src/components/ui/hover-card.js +30 -0
- package/dist/src/components/ui/input-otp.d.ts +12 -0
- package/dist/src/components/ui/input-otp.d.ts.map +1 -0
- package/dist/src/components/ui/input-otp.js +49 -0
- package/dist/src/components/ui/input.d.ts +4 -0
- package/dist/src/components/ui/input.d.ts.map +1 -0
- package/dist/src/components/ui/input.js +12 -0
- package/dist/src/components/ui/label.d.ts +5 -0
- package/dist/src/components/ui/label.d.ts.map +1 -0
- package/dist/src/components/ui/label.js +13 -0
- package/dist/src/components/ui/loader.d.ts +5 -0
- package/dist/src/components/ui/loader.d.ts.map +1 -0
- package/dist/src/components/ui/loader.js +16 -0
- package/dist/src/components/ui/menubar.d.ts +27 -0
- package/dist/src/components/ui/menubar.d.ts.map +1 -0
- package/dist/src/components/ui/menubar.js +152 -0
- package/dist/src/components/ui/navigation-menu.d.ts +15 -0
- package/dist/src/components/ui/navigation-menu.d.ts.map +1 -0
- package/dist/src/components/ui/navigation-menu.js +83 -0
- package/dist/src/components/ui/popover.d.ts +8 -0
- package/dist/src/components/ui/popover.d.ts.map +1 -0
- package/dist/src/components/ui/popover.js +35 -0
- package/dist/src/components/ui/progress.d.ts +5 -0
- package/dist/src/components/ui/progress.d.ts.map +1 -0
- package/dist/src/components/ui/progress.js +20 -0
- package/dist/src/components/ui/radio-group.d.ts +6 -0
- package/dist/src/components/ui/radio-group.d.ts.map +1 -0
- package/dist/src/components/ui/radio-group.js +28 -0
- package/dist/src/components/ui/select.d.ts +16 -0
- package/dist/src/components/ui/select.d.ts.map +1 -0
- package/dist/src/components/ui/select.js +114 -0
- package/dist/src/components/ui/separator.d.ts +5 -0
- package/dist/src/components/ui/separator.d.ts.map +1 -0
- package/dist/src/components/ui/separator.js +15 -0
- package/dist/src/components/ui/sheet.d.ts +14 -0
- package/dist/src/components/ui/sheet.d.ts.map +1 -0
- package/dist/src/components/ui/sheet.js +93 -0
- package/dist/src/components/ui/sidebar.d.ts +70 -0
- package/dist/src/components/ui/sidebar.d.ts.map +1 -0
- package/dist/src/components/ui/sidebar.js +437 -0
- package/dist/src/components/ui/skeleton.d.ts +3 -0
- package/dist/src/components/ui/skeleton.d.ts.map +1 -0
- package/dist/src/components/ui/skeleton.js +10 -0
- package/dist/src/components/ui/slider.d.ts +5 -0
- package/dist/src/components/ui/slider.d.ts.map +1 -0
- package/dist/src/components/ui/slider.js +42 -0
- package/dist/src/components/ui/sonner.d.ts +4 -0
- package/dist/src/components/ui/sonner.d.ts.map +1 -0
- package/dist/src/components/ui/sonner.js +26 -0
- package/dist/src/components/ui/switch.d.ts +5 -0
- package/dist/src/components/ui/switch.d.ts.map +1 -0
- package/dist/src/components/ui/switch.js +17 -0
- package/dist/src/components/ui/table.d.ts +11 -0
- package/dist/src/components/ui/table.d.ts.map +1 -0
- package/dist/src/components/ui/table.js +64 -0
- package/dist/src/components/ui/tabs.d.ts +8 -0
- package/dist/src/components/ui/tabs.d.ts.map +1 -0
- package/dist/src/components/ui/tabs.js +34 -0
- package/dist/src/components/ui/textarea.d.ts +4 -0
- package/dist/src/components/ui/textarea.d.ts.map +1 -0
- package/dist/src/components/ui/textarea.js +11 -0
- package/dist/src/components/ui/toggle-group.d.ts +8 -0
- package/dist/src/components/ui/toggle-group.d.ts.map +1 -0
- package/dist/src/components/ui/toggle-group.js +41 -0
- package/dist/src/components/ui/toggle.d.ts +10 -0
- package/dist/src/components/ui/toggle.d.ts.map +1 -0
- package/dist/src/components/ui/toggle.js +35 -0
- package/dist/src/components/ui/tooltip.d.ts +8 -0
- package/dist/src/components/ui/tooltip.d.ts.map +1 -0
- package/dist/src/components/ui/tooltip.js +43 -0
- package/dist/src/components/ui/unsaved-changes-dialog.d.ts +1 -0
- package/dist/src/components/ui/unsaved-changes-dialog.d.ts.map +1 -0
- package/dist/src/config.d.ts +5 -0
- package/dist/src/config.d.ts.map +1 -0
- package/dist/src/config.js +4 -0
- package/dist/src/database/admins.d.ts +246 -0
- package/dist/src/database/admins.d.ts.map +1 -0
- package/dist/src/database/admins.js +74 -0
- package/dist/src/database/languages.d.ts +321 -0
- package/dist/src/database/languages.d.ts.map +1 -0
- package/dist/src/database/languages.js +52 -0
- package/dist/src/database/moderators.d.ts +114 -0
- package/dist/src/database/moderators.d.ts.map +1 -0
- package/dist/src/database/moderators.js +37 -0
- package/dist/src/database/roles.d.ts +146 -0
- package/dist/src/database/roles.d.ts.map +1 -0
- package/dist/src/database/roles.js +13 -0
- package/dist/src/database/sessions.d.ts +196 -0
- package/dist/src/database/sessions.d.ts.map +1 -0
- package/dist/src/database/sessions.js +57 -0
- package/dist/src/database/users.d.ts +562 -0
- package/dist/src/database/users.d.ts.map +1 -0
- package/dist/src/database/users.js +142 -0
- package/dist/src/drizzle.config.d.ts +6 -0
- package/dist/src/drizzle.config.d.ts.map +1 -0
- package/dist/src/drizzle.config.js +37 -0
- package/dist/src/hooks/use-before-unload-with-dialog.d.ts +1 -0
- package/dist/src/hooks/use-before-unload-with-dialog.d.ts.map +1 -0
- package/dist/src/hooks/use-before-unload.d.ts +2 -0
- package/dist/src/hooks/use-before-unload.d.ts.map +1 -0
- package/dist/src/hooks/use-before-unload.js +30 -0
- package/dist/src/hooks/use-mobile.d.ts +2 -0
- package/dist/src/hooks/use-mobile.d.ts.map +1 -0
- package/dist/src/hooks/use-mobile.js +15 -0
- package/dist/src/hooks/use-unsaved-changes.d.ts +1 -0
- package/dist/src/hooks/use-unsaved-changes.d.ts.map +1 -0
- package/dist/src/lib/api/get-middleware-api.d.ts +8 -0
- package/dist/src/lib/api/get-middleware-api.d.ts.map +1 -0
- package/dist/src/lib/api/get-middleware-api.js +13 -0
- package/dist/src/lib/api/get-session-admin-api.d.ts +16 -0
- package/dist/src/lib/api/get-session-admin-api.d.ts.map +1 -0
- package/dist/src/lib/api/get-session-admin-api.js +19 -0
- package/dist/src/lib/api/get-session-api.d.ts +17 -0
- package/dist/src/lib/api/get-session-api.d.ts.map +1 -0
- package/dist/src/lib/api/get-session-api.js +14 -0
- package/dist/src/lib/colors.d.ts +23 -0
- package/dist/src/lib/colors.d.ts.map +1 -0
- package/dist/src/lib/colors.js +131 -0
- package/dist/src/lib/colors.test.d.ts +2 -0
- package/dist/src/lib/colors.test.d.ts.map +1 -0
- package/dist/src/lib/colors.test.js +173 -0
- package/dist/src/lib/config.d.ts +6 -0
- package/dist/src/lib/config.d.ts.map +1 -0
- package/dist/src/lib/config.js +15 -0
- package/dist/src/lib/fetcher/cookie-from-string-to-object.d.ts +10 -0
- package/dist/src/lib/fetcher/cookie-from-string-to-object.d.ts.map +1 -0
- package/dist/src/lib/fetcher/cookie-from-string-to-object.js +12 -0
- package/dist/src/lib/fetcher/cookie-from-string-to-object.test.d.ts +2 -0
- package/dist/src/lib/fetcher/cookie-from-string-to-object.test.d.ts.map +1 -0
- package/dist/src/lib/fetcher/cookie-from-string-to-object.test.js +78 -0
- package/dist/src/lib/fetcher/fetcher.d.ts +9 -0
- package/dist/src/lib/fetcher/fetcher.d.ts.map +1 -0
- package/dist/src/lib/fetcher/helpers.d.ts +3 -0
- package/dist/src/lib/fetcher/helpers.d.ts.map +1 -0
- package/dist/src/lib/fetcher/helpers.js +33 -0
- package/dist/src/lib/fetcher/helpers.test.d.ts +2 -0
- package/dist/src/lib/fetcher/helpers.test.d.ts.map +1 -0
- package/dist/src/lib/fetcher/helpers.test.js +37 -0
- package/dist/src/lib/fetcher/index.d.ts +34 -0
- package/dist/src/lib/fetcher/index.d.ts.map +1 -0
- package/dist/src/lib/fetcher/types.d.ts +120 -0
- package/dist/src/lib/fetcher/types.d.ts.map +1 -0
- package/dist/src/lib/fetcher/types.js +1 -0
- package/dist/src/lib/fetcher.d.ts +9 -0
- package/dist/src/lib/fetcher.d.ts.map +1 -0
- package/dist/src/lib/fetcher.js +47 -0
- package/dist/src/lib/helpers/auto-form.d.ts +10 -0
- package/dist/src/lib/helpers/auto-form.d.ts.map +1 -0
- package/dist/src/lib/helpers/auto-form.js +82 -0
- package/dist/src/lib/helpers/auto-form.test.d.ts +2 -0
- package/dist/src/lib/helpers/auto-form.test.d.ts.map +1 -0
- package/dist/src/lib/helpers/auto-form.test.js +126 -0
- package/dist/src/lib/navigation.d.ts +339 -0
- package/dist/src/lib/navigation.d.ts.map +1 -0
- package/dist/src/lib/navigation.js +11 -0
- package/dist/src/lib/plugin.d.ts +15 -0
- package/dist/src/lib/plugin.d.ts.map +1 -0
- package/dist/src/lib/plugin.js +3 -0
- package/dist/src/lib/special-characters.d.ts +3 -0
- package/dist/src/lib/special-characters.d.ts.map +1 -0
- package/dist/src/lib/special-characters.js +4 -0
- package/dist/src/lib/special-characters.test.d.ts +2 -0
- package/dist/src/lib/special-characters.test.d.ts.map +1 -0
- package/dist/src/lib/special-characters.test.js +56 -0
- package/dist/src/lib/utils.d.ts +3 -0
- package/dist/src/lib/utils.d.ts.map +1 -0
- package/dist/src/lib/utils.js +5 -0
- package/dist/src/tests/setup.d.ts +2 -0
- package/dist/src/tests/setup.d.ts.map +1 -0
- package/dist/src/tests/setup.js +6 -0
- package/dist/src/views/admin/layouts/admin-layout.d.ts +8 -0
- package/dist/src/views/admin/layouts/admin-layout.d.ts.map +1 -0
- package/dist/src/views/admin/layouts/admin-layout.js +70 -0
- package/dist/src/views/admin/layouts/sidebar/nav/item.d.ts +11 -0
- package/dist/src/views/admin/layouts/sidebar/nav/item.d.ts.map +1 -0
- package/dist/src/views/admin/layouts/sidebar/nav/item.js +70 -0
- package/dist/src/views/admin/layouts/sidebar/nav/nav.d.ts +10 -0
- package/dist/src/views/admin/layouts/sidebar/nav/nav.d.ts.map +1 -0
- package/dist/src/views/admin/layouts/sidebar/nav/nav.js +49 -0
- package/dist/src/views/admin/layouts/sidebar/sidebar.d.ts +3 -0
- package/dist/src/views/admin/layouts/sidebar/sidebar.d.ts.map +1 -0
- package/dist/src/views/admin/layouts/sidebar/sidebar.js +30 -0
- package/dist/src/views/admin/layouts/sidebar/sign-out.d.ts +4 -0
- package/dist/src/views/admin/layouts/sidebar/sign-out.d.ts.map +1 -0
- package/dist/src/views/admin/layouts/sidebar/sign-out.js +14 -0
- package/dist/src/views/admin/layouts/user-bar/client.d.ts +7 -0
- package/dist/src/views/admin/layouts/user-bar/client.d.ts.map +1 -0
- package/dist/src/views/admin/layouts/user-bar/client.js +61 -0
- package/dist/src/views/admin/layouts/user-bar/user-bar.d.ts +3 -0
- package/dist/src/views/admin/layouts/user-bar/user-bar.d.ts.map +1 -0
- package/dist/src/views/admin/layouts/user-bar/user-bar.js +31 -0
- package/dist/src/views/admin/sign-in/sign-in-admin-view.d.ts +2 -0
- package/dist/src/views/admin/sign-in/sign-in-admin-view.d.ts.map +1 -0
- package/dist/src/views/admin/sign-in/sign-in-admin-view.js +26 -0
- package/dist/src/views/admin/views/core/dashboard/dashboard-admin-view.d.ts +2 -0
- package/dist/src/views/admin/views/core/dashboard/dashboard-admin-view.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/dashboard/dashboard-admin-view.js +44 -0
- package/dist/src/views/admin/views/core/test.d.ts +2 -0
- package/dist/src/views/admin/views/core/test.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/test.js +146 -0
- package/dist/src/views/admin/views/core/users/users-admin-view.d.ts +4 -0
- package/dist/src/views/admin/views/core/users/users-admin-view.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/users/users-admin-view.js +90 -0
- package/dist/src/views/auth/components/password-input.d.ts +4 -0
- package/dist/src/views/auth/components/password-input.d.ts.map +1 -0
- package/dist/src/views/auth/components/password-input.js +89 -0
- package/dist/src/views/auth/sign-in/form/form.d.ts +4 -0
- package/dist/src/views/auth/sign-in/form/form.d.ts.map +1 -0
- package/dist/src/views/auth/sign-in/form/form.js +59 -0
- package/dist/src/views/auth/sign-in/form/hooks/mutation-api.d.ts +10 -0
- package/dist/src/views/auth/sign-in/form/hooks/mutation-api.d.ts.map +1 -0
- package/dist/src/views/auth/sign-in/form/hooks/mutation-api.js +33 -0
- package/dist/src/views/auth/sign-in/form/hooks/use-form.d.ts +27 -0
- package/dist/src/views/auth/sign-in/form/hooks/use-form.d.ts.map +1 -0
- package/dist/src/views/auth/sign-in/form/hooks/use-form.js +38 -0
- package/dist/src/views/auth/sign-in/sign-in-view.d.ts +2 -0
- package/dist/src/views/auth/sign-in/sign-in-view.d.ts.map +1 -0
- package/dist/src/views/auth/sign-in/sign-in-view.js +55 -0
- package/dist/src/views/auth/sign-up/form/form.d.ts +4 -0
- package/dist/src/views/auth/sign-up/form/form.d.ts.map +1 -0
- package/dist/src/views/auth/sign-up/form/form.js +88 -0
- package/dist/src/views/auth/sign-up/form/hooks/mutation-api.d.ts +6 -0
- package/dist/src/views/auth/sign-up/form/hooks/mutation-api.d.ts.map +1 -0
- package/dist/src/views/auth/sign-up/form/hooks/mutation-api.js +18 -0
- package/dist/src/views/auth/sign-up/form/hooks/use-form.d.ts +61 -0
- package/dist/src/views/auth/sign-up/form/hooks/use-form.d.ts.map +1 -0
- package/dist/src/views/auth/sign-up/form/hooks/use-form.js +57 -0
- package/dist/src/views/auth/sign-up/sign-up-view.d.ts +2 -0
- package/dist/src/views/auth/sign-up/sign-up-view.d.ts.map +1 -0
- package/dist/src/views/auth/sign-up/sign-up-view.js +61 -0
- package/dist/src/views/auth/sso/buttons/client.d.ts +5 -0
- package/dist/src/views/auth/sso/buttons/client.d.ts.map +1 -0
- package/dist/src/views/auth/sso/buttons/client.js +22 -0
- package/dist/src/views/auth/sso/buttons/mutation-api.d.ts +4 -0
- package/dist/src/views/auth/sso/buttons/mutation-api.d.ts.map +1 -0
- package/dist/src/views/auth/sso/buttons/mutation-api.js +24 -0
- package/dist/src/views/auth/sso/buttons/sso-buttons.d.ts +3 -0
- package/dist/src/views/auth/sso/buttons/sso-buttons.d.ts.map +1 -0
- package/dist/src/views/auth/sso/buttons/sso-buttons.js +51 -0
- package/dist/src/views/auth/sso/callback/callback-sso-view.d.ts +5 -0
- package/dist/src/views/auth/sso/callback/callback-sso-view.d.ts.map +1 -0
- package/dist/src/views/auth/sso/callback/callback-sso-view.js +18 -0
- package/dist/src/views/auth/sso/callback/client/client.d.ts +6 -0
- package/dist/src/views/auth/sso/callback/client/client.d.ts.map +1 -0
- package/dist/src/views/auth/sso/callback/client/client.js +39 -0
- package/dist/src/views/auth/sso/callback/client/mutation-api.d.ts +8 -0
- package/dist/src/views/auth/sso/callback/client/mutation-api.d.ts.map +1 -0
- package/dist/src/views/auth/sso/callback/client/mutation-api.js +27 -0
- package/dist/src/views/error/back-button.d.ts +5 -0
- package/dist/src/views/error/back-button.d.ts.map +1 -0
- package/dist/src/views/error/back-button.js +14 -0
- package/dist/src/views/error/error-view.d.ts +5 -0
- package/dist/src/views/error/error-view.d.ts.map +1 -0
- package/dist/src/views/error/error-view.js +56 -0
- package/dist/src/views/error/global-error-view.d.ts +6 -0
- package/dist/src/views/error/global-error-view.d.ts.map +1 -0
- package/dist/src/views/error/global-error-view.js +57 -0
- package/dist/src/views/layouts/provider.d.ts +11 -0
- package/dist/src/views/layouts/provider.d.ts.map +1 -0
- package/dist/src/views/layouts/provider.js +43 -0
- package/dist/src/views/layouts/root-layout.d.ts +16 -0
- package/dist/src/views/layouts/root-layout.d.ts.map +1 -0
- package/dist/src/views/layouts/root-layout.js +38 -0
- package/dist/src/views/layouts/theme/header/header.d.ts +4 -0
- package/dist/src/views/layouts/theme/header/header.d.ts.map +1 -0
- package/dist/src/views/layouts/theme/header/header.js +32 -0
- package/dist/src/views/layouts/theme/header/user/auth/auth.d.ts +2 -0
- package/dist/src/views/layouts/theme/header/user/auth/auth.d.ts.map +1 -0
- package/dist/src/views/layouts/theme/header/user/auth/auth.js +33 -0
- package/dist/src/views/layouts/theme/header/user/auth/client.d.ts +5 -0
- package/dist/src/views/layouts/theme/header/user/auth/client.d.ts.map +1 -0
- package/dist/src/views/layouts/theme/header/user/auth/client.js +47 -0
- package/dist/src/views/layouts/theme/header/user/auth/log-out-mutation-api.d.ts +4 -0
- package/dist/src/views/layouts/theme/header/user/auth/log-out-mutation-api.d.ts.map +1 -0
- package/dist/src/views/layouts/theme/header/user/auth/log-out-mutation-api.js +27 -0
- package/dist/src/views/layouts/theme/header/user/user.d.ts +2 -0
- package/dist/src/views/layouts/theme/header/user/user.d.ts.map +1 -0
- package/dist/src/views/layouts/theme/header/user/user.js +34 -0
- package/dist/src/views/layouts/theme/layout.d.ts +5 -0
- package/dist/src/views/layouts/theme/layout.d.ts.map +1 -0
- package/dist/src/views/layouts/theme/layout.js +15 -0
- package/dist/src/vitnode.config.d.ts +50 -0
- package/dist/src/vitnode.config.d.ts.map +1 -0
- package/dist/src/vitnode.config.js +39 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/tsup.config.d.ts +3 -0
- package/dist/tsup.config.d.ts.map +1 -0
- package/dist/vitest.config.d.ts +3 -0
- package/dist/vitest.config.d.ts.map +1 -0
- package/package.json +94 -0
- package/src/app/login/page.tsx +21 -0
- package/src/app/login/sso/[providerId]/page.tsx +19 -0
- package/src/app/register/page.tsx +21 -0
- package/src/app_admin/core/page.tsx +5 -0
- package/src/app_admin/core/test/page.tsx +5 -0
- package/src/app_admin/core/users/page.tsx +35 -0
- package/src/database/admins.ts +87 -0
- package/src/database/languages.ts +54 -0
- package/src/database/moderators.ts +42 -0
- package/src/database/roles.ts +15 -0
- package/src/database/sessions.ts +59 -0
- package/src/database/users.ts +142 -0
- package/src/locales/en.json +156 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { getTranslations } from "next-intl/server";
|
|
3
|
+
import { cookies } from "next/headers";
|
|
4
|
+
import { ThemeSwitcher } from "../../../components/switchers/theme-switcher";
|
|
5
|
+
import { SidebarProvider, SidebarTrigger } from "../../../components/ui/sidebar";
|
|
6
|
+
import { SidebarInset } from "../../../components/ui/sidebar";
|
|
7
|
+
import { getSessionAdminApi } from "../../../lib/api/get-session-admin-api";
|
|
8
|
+
import { I18nProvider } from "../../../components/i18n-provider";
|
|
9
|
+
import { SidebarAdmin } from "./sidebar/sidebar";
|
|
10
|
+
import { UserBarAdmin } from "./user-bar/user-bar";
|
|
11
|
+
export const AdminLayout = async ({ children, vitNodeConfig })=>{
|
|
12
|
+
const t = await getTranslations();
|
|
13
|
+
const session = await getSessionAdminApi();
|
|
14
|
+
const cookieStore = await cookies();
|
|
15
|
+
const defaultOpen = cookieStore.get(vitNodeConfig.admin?.sidebarCookieName ?? 'sidebar_state')?.value === 'true';
|
|
16
|
+
if (!session) return null;
|
|
17
|
+
const pluginNav = vitNodeConfig.plugins.filter((plugin)=>plugin.admin?.nav).map((plugin)=>({
|
|
18
|
+
id: plugin.pluginId,
|
|
19
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
20
|
+
// @ts-expect-error
|
|
21
|
+
title: t(`${plugin.pluginId}.title`),
|
|
22
|
+
items: (plugin.admin?.nav ?? []).map((item)=>({
|
|
23
|
+
...item,
|
|
24
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
25
|
+
// @ts-expect-error
|
|
26
|
+
title: t(`${plugin.pluginId}.admin.nav.${item.id}`),
|
|
27
|
+
items: item.items?.map((subItem)=>({
|
|
28
|
+
...subItem,
|
|
29
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
30
|
+
// @ts-expect-error
|
|
31
|
+
title: t(`${plugin.pluginId}.admin.nav.${item.id}.${subItem.id}`)
|
|
32
|
+
})) ?? []
|
|
33
|
+
}))
|
|
34
|
+
}));
|
|
35
|
+
return /*#__PURE__*/ _jsx(I18nProvider, {
|
|
36
|
+
namespaces: [
|
|
37
|
+
'admin.global'
|
|
38
|
+
],
|
|
39
|
+
children: /*#__PURE__*/ _jsxs(SidebarProvider, {
|
|
40
|
+
defaultOpen: defaultOpen,
|
|
41
|
+
children: [
|
|
42
|
+
/*#__PURE__*/ _jsx(SidebarAdmin, {
|
|
43
|
+
pluginNav: pluginNav
|
|
44
|
+
}),
|
|
45
|
+
/*#__PURE__*/ _jsxs(SidebarInset, {
|
|
46
|
+
children: [
|
|
47
|
+
/*#__PURE__*/ _jsxs("header", {
|
|
48
|
+
className: "flex h-16 shrink-0 items-center gap-2 border-b px-4",
|
|
49
|
+
children: [
|
|
50
|
+
/*#__PURE__*/ _jsx(SidebarTrigger, {
|
|
51
|
+
className: "-ml-1"
|
|
52
|
+
}),
|
|
53
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
54
|
+
className: "ml-auto flex items-center justify-center gap-2 px-2",
|
|
55
|
+
children: [
|
|
56
|
+
/*#__PURE__*/ _jsx(ThemeSwitcher, {}),
|
|
57
|
+
/*#__PURE__*/ _jsx(UserBarAdmin, {
|
|
58
|
+
user: session.user
|
|
59
|
+
})
|
|
60
|
+
]
|
|
61
|
+
})
|
|
62
|
+
]
|
|
63
|
+
}),
|
|
64
|
+
children
|
|
65
|
+
]
|
|
66
|
+
})
|
|
67
|
+
]
|
|
68
|
+
})
|
|
69
|
+
});
|
|
70
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface ItemNavAdminProps {
|
|
2
|
+
href: string;
|
|
3
|
+
icon?: React.ReactNode;
|
|
4
|
+
isOpenInNewTab?: boolean;
|
|
5
|
+
title: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const ItemNavAdmin: ({ href, title, icon, items, isOpenInNewTab, }: ItemNavAdminProps & {
|
|
8
|
+
items?: Omit<ItemNavAdminProps, "icon">[];
|
|
9
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=item.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"item.d.ts","sourceRoot":"","sources":["../../../../../../../src/views/admin/layouts/sidebar/nav/item.tsx"],"names":[],"mappings":"AAmBA,UAAU,iBAAiB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,YAAY,GAAI,+CAM1B,iBAAiB,GAAG;IACrB,KAAK,CAAC,EAAE,IAAI,CAAC,iBAAiB,EAAE,MAAM,CAAC,EAAE,CAAC;CAC3C,4CA8DA,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { ChevronRight, MenuIcon } from "lucide-react";
|
|
4
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../../../../../components/ui/collapsible";
|
|
5
|
+
import { SidebarMenuButton } from "../../../../../components/ui/sidebar";
|
|
6
|
+
import { SidebarMenuItem, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem } from "../../../../../components/ui/sidebar";
|
|
7
|
+
import { Link } from "../../../../../lib/navigation";
|
|
8
|
+
import { cn } from "../../../../../lib/utils";
|
|
9
|
+
export const ItemNavAdmin = ({ href, title, icon, items = [], isOpenInNewTab })=>{
|
|
10
|
+
const content = /*#__PURE__*/ _jsxs(_Fragment, {
|
|
11
|
+
children: [
|
|
12
|
+
icon ?? /*#__PURE__*/ _jsx(MenuIcon, {}),
|
|
13
|
+
/*#__PURE__*/ _jsx("span", {
|
|
14
|
+
children: title
|
|
15
|
+
})
|
|
16
|
+
]
|
|
17
|
+
});
|
|
18
|
+
if (!items.length) {
|
|
19
|
+
return /*#__PURE__*/ _jsx(SidebarMenuItem, {
|
|
20
|
+
children: /*#__PURE__*/ _jsx(SidebarMenuButton, {
|
|
21
|
+
asChild: true,
|
|
22
|
+
tooltip: title,
|
|
23
|
+
children: /*#__PURE__*/ _jsx(Link, {
|
|
24
|
+
href: href,
|
|
25
|
+
prefetch: true,
|
|
26
|
+
rel: isOpenInNewTab ? 'noopener noreferrer' : undefined,
|
|
27
|
+
target: isOpenInNewTab ? '_blank' : undefined,
|
|
28
|
+
children: content
|
|
29
|
+
})
|
|
30
|
+
})
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
return /*#__PURE__*/ _jsx(Collapsible, {
|
|
34
|
+
asChild: true,
|
|
35
|
+
className: "group/collapsible",
|
|
36
|
+
children: /*#__PURE__*/ _jsxs(SidebarMenuItem, {
|
|
37
|
+
children: [
|
|
38
|
+
/*#__PURE__*/ _jsx(CollapsibleTrigger, {
|
|
39
|
+
asChild: true,
|
|
40
|
+
children: /*#__PURE__*/ _jsxs(SidebarMenuButton, {
|
|
41
|
+
tooltip: title,
|
|
42
|
+
children: [
|
|
43
|
+
content,
|
|
44
|
+
/*#__PURE__*/ _jsx(ChevronRight, {
|
|
45
|
+
className: "ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90"
|
|
46
|
+
})
|
|
47
|
+
]
|
|
48
|
+
})
|
|
49
|
+
}),
|
|
50
|
+
/*#__PURE__*/ _jsx(CollapsibleContent, {
|
|
51
|
+
className: cn('text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 outline-none'),
|
|
52
|
+
children: /*#__PURE__*/ _jsx(SidebarMenuSub, {
|
|
53
|
+
children: items.map((item)=>/*#__PURE__*/ _jsx(SidebarMenuSubItem, {
|
|
54
|
+
children: /*#__PURE__*/ _jsx(SidebarMenuSubButton, {
|
|
55
|
+
asChild: true,
|
|
56
|
+
children: /*#__PURE__*/ _jsx(Link, {
|
|
57
|
+
href: item.href,
|
|
58
|
+
prefetch: true,
|
|
59
|
+
rel: item.isOpenInNewTab ? 'noopener noreferrer' : undefined,
|
|
60
|
+
target: item.isOpenInNewTab ? '_blank' : undefined,
|
|
61
|
+
children: item.title
|
|
62
|
+
})
|
|
63
|
+
})
|
|
64
|
+
}, item.href))
|
|
65
|
+
})
|
|
66
|
+
})
|
|
67
|
+
]
|
|
68
|
+
})
|
|
69
|
+
});
|
|
70
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ItemNavAdmin } from './item';
|
|
2
|
+
export interface NavAdminParent {
|
|
3
|
+
id: string;
|
|
4
|
+
items: React.ComponentProps<typeof ItemNavAdmin>[];
|
|
5
|
+
title: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const NavSidebarAdmin: ({ pluginNav, }: {
|
|
8
|
+
pluginNav: NavAdminParent[];
|
|
9
|
+
}) => Promise<import("react/jsx-runtime").JSX.Element[]>;
|
|
10
|
+
//# sourceMappingURL=nav.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nav.d.ts","sourceRoot":"","sources":["../../../../../../../src/views/admin/layouts/sidebar/nav/nav.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,YAAY,CAAC,EAAE,CAAC;IACnD,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,eAAe,GAAU,gBAEnC;IACD,SAAS,EAAE,cAAc,EAAE,CAAC;CAC7B,uDA0CA,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { LayoutDashboardIcon, UsersRoundIcon } from "lucide-react";
|
|
3
|
+
import { getTranslations } from "next-intl/server";
|
|
4
|
+
import { SidebarGroup, SidebarGroupLabel, SidebarMenu } from "../../../../../components/ui/sidebar";
|
|
5
|
+
import { ItemNavAdmin } from "./item";
|
|
6
|
+
export const NavSidebarAdmin = async ({ pluginNav })=>{
|
|
7
|
+
const t = await getTranslations('admin.global.nav');
|
|
8
|
+
const rootItems = [
|
|
9
|
+
{
|
|
10
|
+
id: 'core',
|
|
11
|
+
title: t('core'),
|
|
12
|
+
items: [
|
|
13
|
+
{
|
|
14
|
+
href: '/admin/core/',
|
|
15
|
+
icon: /*#__PURE__*/ _jsx(LayoutDashboardIcon, {}),
|
|
16
|
+
title: t('dashboard')
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
href: '/admin/core/users',
|
|
20
|
+
title: t('users.title'),
|
|
21
|
+
icon: /*#__PURE__*/ _jsx(UsersRoundIcon, {}),
|
|
22
|
+
items: [
|
|
23
|
+
{
|
|
24
|
+
title: t('users.list'),
|
|
25
|
+
href: '/admin/core/users'
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
title: 'test',
|
|
29
|
+
href: '/admin/core/test'
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
...pluginNav
|
|
36
|
+
];
|
|
37
|
+
return rootItems.map((parent)=>/*#__PURE__*/ _jsxs(SidebarGroup, {
|
|
38
|
+
children: [
|
|
39
|
+
/*#__PURE__*/ _jsx(SidebarGroupLabel, {
|
|
40
|
+
children: parent.title
|
|
41
|
+
}),
|
|
42
|
+
/*#__PURE__*/ _jsx(SidebarMenu, {
|
|
43
|
+
children: parent.items.map((item)=>/*#__PURE__*/ _jsx(ItemNavAdmin, {
|
|
44
|
+
...item
|
|
45
|
+
}, item.href))
|
|
46
|
+
})
|
|
47
|
+
]
|
|
48
|
+
}, parent.title));
|
|
49
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sidebar.d.ts","sourceRoot":"","sources":["../../../../../../src/views/admin/layouts/sidebar/sidebar.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAE5C,eAAO,MAAM,YAAY,GAAI,gBAE1B,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,4CAa9C,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { LogoVitNode } from "../../../../components/logo-vitnode";
|
|
3
|
+
import { Sidebar } from "../../../../components/ui/sidebar";
|
|
4
|
+
import { SidebarContent, SidebarHeader } from "../../../../components/ui/sidebar";
|
|
5
|
+
import { Link } from "../../../../lib/navigation";
|
|
6
|
+
import { NavSidebarAdmin } from "./nav/nav";
|
|
7
|
+
export const SidebarAdmin = ({ pluginNav })=>{
|
|
8
|
+
return /*#__PURE__*/ _jsxs(Sidebar, {
|
|
9
|
+
variant: "floating",
|
|
10
|
+
children: [
|
|
11
|
+
/*#__PURE__*/ _jsx(SidebarHeader, {
|
|
12
|
+
className: "flex h-16 flex-row items-center border-b",
|
|
13
|
+
children: /*#__PURE__*/ _jsx(Link, {
|
|
14
|
+
className: "px-2",
|
|
15
|
+
href: "/admin/core",
|
|
16
|
+
prefetch: true,
|
|
17
|
+
children: /*#__PURE__*/ _jsx(LogoVitNode, {
|
|
18
|
+
className: "size-8",
|
|
19
|
+
small: true
|
|
20
|
+
})
|
|
21
|
+
})
|
|
22
|
+
}),
|
|
23
|
+
/*#__PURE__*/ _jsx(SidebarContent, {
|
|
24
|
+
children: /*#__PURE__*/ _jsx(NavSidebarAdmin, {
|
|
25
|
+
pluginNav: pluginNav
|
|
26
|
+
})
|
|
27
|
+
})
|
|
28
|
+
]
|
|
29
|
+
});
|
|
30
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sign-out.d.ts","sourceRoot":"","sources":["../../../../../../src/views/admin/layouts/sidebar/sign-out.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,6BAA6B,GAAI,eAE3C;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,4CAUA,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { DropdownMenuItem } from "../../../../components/ui/dropdown-menu";
|
|
4
|
+
import { logOutMutationApi } from "../../../layouts/theme/header/user/auth/log-out-mutation-api";
|
|
5
|
+
export const SignOutUserFooterSidebarAdmin = ({ children })=>{
|
|
6
|
+
return /*#__PURE__*/ _jsx(DropdownMenuItem, {
|
|
7
|
+
onClick: async ()=>{
|
|
8
|
+
await logOutMutationApi({
|
|
9
|
+
isAdmin: true
|
|
10
|
+
});
|
|
11
|
+
},
|
|
12
|
+
children: children
|
|
13
|
+
});
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../../../src/views/admin/layouts/user-bar/client.tsx"],"names":[],"mappings":"AAcA,eAAO,MAAM,kBAAkB,GAAI,WAEhC;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACH,4CAgCA,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { HomeIcon, LogOut } from "lucide-react";
|
|
4
|
+
import { useTranslations } from "next-intl";
|
|
5
|
+
import { DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator } from "../../../../components/ui/dropdown-menu";
|
|
6
|
+
import { Link } from "../../../../lib/navigation";
|
|
7
|
+
import { logOutMutationApi } from "../../../layouts/theme/header/user/auth/log-out-mutation-api";
|
|
8
|
+
export const ClientUserBarAdmin = ({ user })=>{
|
|
9
|
+
const t = useTranslations('core.global.user_bar');
|
|
10
|
+
return /*#__PURE__*/ _jsxs(_Fragment, {
|
|
11
|
+
children: [
|
|
12
|
+
/*#__PURE__*/ _jsx(DropdownMenuLabel, {
|
|
13
|
+
className: "p-0 font-normal",
|
|
14
|
+
children: /*#__PURE__*/ _jsxs("div", {
|
|
15
|
+
className: "flex flex-col px-2 py-2 text-left",
|
|
16
|
+
children: [
|
|
17
|
+
/*#__PURE__*/ _jsx("span", {
|
|
18
|
+
className: "font-medium",
|
|
19
|
+
children: user.name
|
|
20
|
+
}),
|
|
21
|
+
/*#__PURE__*/ _jsx("span", {
|
|
22
|
+
className: "text-muted-foreground text-xs",
|
|
23
|
+
children: user.email
|
|
24
|
+
})
|
|
25
|
+
]
|
|
26
|
+
})
|
|
27
|
+
}),
|
|
28
|
+
/*#__PURE__*/ _jsx(DropdownMenuSeparator, {}),
|
|
29
|
+
/*#__PURE__*/ _jsx(DropdownMenuGroup, {
|
|
30
|
+
children: /*#__PURE__*/ _jsx(DropdownMenuItem, {
|
|
31
|
+
asChild: true,
|
|
32
|
+
children: /*#__PURE__*/ _jsxs(Link, {
|
|
33
|
+
href: "/",
|
|
34
|
+
target: "_blank",
|
|
35
|
+
children: [
|
|
36
|
+
/*#__PURE__*/ _jsx(HomeIcon, {
|
|
37
|
+
className: "size-4"
|
|
38
|
+
}),
|
|
39
|
+
"Home"
|
|
40
|
+
]
|
|
41
|
+
})
|
|
42
|
+
})
|
|
43
|
+
}),
|
|
44
|
+
/*#__PURE__*/ _jsx(DropdownMenuSeparator, {}),
|
|
45
|
+
/*#__PURE__*/ _jsxs(DropdownMenuItem, {
|
|
46
|
+
className: "text-destructive focus:text-destructive",
|
|
47
|
+
onClick: async ()=>{
|
|
48
|
+
await logOutMutationApi({
|
|
49
|
+
isAdmin: true
|
|
50
|
+
});
|
|
51
|
+
},
|
|
52
|
+
children: [
|
|
53
|
+
/*#__PURE__*/ _jsx(LogOut, {
|
|
54
|
+
className: "size-4"
|
|
55
|
+
}),
|
|
56
|
+
t('log_out')
|
|
57
|
+
]
|
|
58
|
+
})
|
|
59
|
+
]
|
|
60
|
+
});
|
|
61
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { getSessionAdminApi } from '../../../../lib/api/get-session-admin-api';
|
|
2
|
+
export declare const UserBarAdmin: ({ user, }: Pick<NonNullable<Awaited<ReturnType<typeof getSessionAdminApi>>>, "user">) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
//# sourceMappingURL=user-bar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-bar.d.ts","sourceRoot":"","sources":["../../../../../../src/views/admin/layouts/user-bar/user-bar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAY1E,eAAO,MAAM,YAAY,GAAI,WAE1B,IAAI,CACL,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,CAAC,EAC3D,MAAM,CACP,4CAkBA,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Avatar } from "../../../../components/avatar";
|
|
4
|
+
import { Button } from "../../../../components/ui/button";
|
|
5
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuTrigger } from "../../../../components/ui/dropdown-menu";
|
|
6
|
+
import { ClientUserBarAdmin } from "./client";
|
|
7
|
+
export const UserBarAdmin = ({ user })=>{
|
|
8
|
+
return /*#__PURE__*/ _jsxs(DropdownMenu, {
|
|
9
|
+
children: [
|
|
10
|
+
/*#__PURE__*/ _jsx(DropdownMenuTrigger, {
|
|
11
|
+
asChild: true,
|
|
12
|
+
children: /*#__PURE__*/ _jsx(Button, {
|
|
13
|
+
size: "icon",
|
|
14
|
+
variant: "ghost",
|
|
15
|
+
children: /*#__PURE__*/ _jsx(Avatar, {
|
|
16
|
+
size: 24,
|
|
17
|
+
user: user
|
|
18
|
+
})
|
|
19
|
+
})
|
|
20
|
+
}),
|
|
21
|
+
/*#__PURE__*/ _jsx(DropdownMenuContent, {
|
|
22
|
+
className: "w-(--radix-dropdown-menu-trigger-width) min-w-56 rounded-lg",
|
|
23
|
+
side: "bottom",
|
|
24
|
+
sideOffset: 4,
|
|
25
|
+
children: /*#__PURE__*/ _jsx(ClientUserBarAdmin, {
|
|
26
|
+
user: user
|
|
27
|
+
})
|
|
28
|
+
})
|
|
29
|
+
]
|
|
30
|
+
});
|
|
31
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sign-in-admin-view.d.ts","sourceRoot":"","sources":["../../../../../src/views/admin/sign-in/sign-in-admin-view.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,eAAe,+CAW3B,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { I18nProvider } from "../../../components/i18n-provider";
|
|
3
|
+
import { LogoVitNode } from "../../../components/logo-vitnode";
|
|
4
|
+
import { Card } from "../../../components/ui/card";
|
|
5
|
+
import { FormSignIn } from "../../auth/sign-in/form/form";
|
|
6
|
+
export const SignInAdminView = ()=>{
|
|
7
|
+
return /*#__PURE__*/ _jsx(I18nProvider, {
|
|
8
|
+
namespaces: [
|
|
9
|
+
'core.auth.sign_in'
|
|
10
|
+
],
|
|
11
|
+
children: /*#__PURE__*/ _jsxs("div", {
|
|
12
|
+
className: "mx-auto flex min-h-screen max-w-md flex-col items-center justify-center gap-10 px-4 py-16",
|
|
13
|
+
children: [
|
|
14
|
+
/*#__PURE__*/ _jsx(LogoVitNode, {
|
|
15
|
+
className: "w-64"
|
|
16
|
+
}),
|
|
17
|
+
/*#__PURE__*/ _jsx(Card, {
|
|
18
|
+
className: "w-full p-6",
|
|
19
|
+
children: /*#__PURE__*/ _jsx(FormSignIn, {
|
|
20
|
+
isAdmin: true
|
|
21
|
+
})
|
|
22
|
+
})
|
|
23
|
+
]
|
|
24
|
+
})
|
|
25
|
+
});
|
|
26
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard-admin-view.d.ts","sourceRoot":"","sources":["../../../../../../../src/views/admin/views/core/dashboard/dashboard-admin-view.tsx"],"names":[],"mappings":"AAQA,eAAO,MAAM,kBAAkB,+DA2B9B,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { AlertTriangleIcon } from "lucide-react";
|
|
3
|
+
import { getTranslations } from "next-intl/server";
|
|
4
|
+
import { Badge } from "../../../../../components/ui/badge";
|
|
5
|
+
import { HeaderContent } from "../../../../../components/ui/header-content";
|
|
6
|
+
import { getSessionAdminApi } from "../../../../../lib/api/get-session-admin-api";
|
|
7
|
+
import { CONFIG } from "../../../../../lib/config";
|
|
8
|
+
export const DashboardAdminView = async ()=>{
|
|
9
|
+
const session = await getSessionAdminApi();
|
|
10
|
+
const t = await getTranslations('admin.dashboard');
|
|
11
|
+
if (!session) return null;
|
|
12
|
+
const { vitnode_version } = session;
|
|
13
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
14
|
+
className: "container mx-auto p-4",
|
|
15
|
+
children: [
|
|
16
|
+
/*#__PURE__*/ _jsx(HeaderContent, {
|
|
17
|
+
desc: t('version', {
|
|
18
|
+
version: vitnode_version
|
|
19
|
+
}),
|
|
20
|
+
h1: /*#__PURE__*/ _jsxs(_Fragment, {
|
|
21
|
+
children: [
|
|
22
|
+
/*#__PURE__*/ _jsx("span", {
|
|
23
|
+
children: "VitNode"
|
|
24
|
+
}),
|
|
25
|
+
CONFIG.node_development && /*#__PURE__*/ _jsxs(Badge, {
|
|
26
|
+
className: "ml-2 bg-yellow-500 text-black hover:bg-yellow-500 dark:bg-yellow-500 dark:hover:bg-yellow-500",
|
|
27
|
+
variant: "destructive",
|
|
28
|
+
children: [
|
|
29
|
+
/*#__PURE__*/ _jsx(AlertTriangleIcon, {
|
|
30
|
+
className: "size-4"
|
|
31
|
+
}),
|
|
32
|
+
" ",
|
|
33
|
+
t('dev_mode')
|
|
34
|
+
]
|
|
35
|
+
})
|
|
36
|
+
]
|
|
37
|
+
})
|
|
38
|
+
}),
|
|
39
|
+
/*#__PURE__*/ _jsx("div", {
|
|
40
|
+
children: "Dashboard Admin"
|
|
41
|
+
})
|
|
42
|
+
]
|
|
43
|
+
});
|
|
44
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../../../../../../src/views/admin/views/core/test.tsx"],"names":[],"mappings":"AAaA,eAAO,MAAM,QAAQ,+CA0IpB,CAAC"}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
import { AutoForm } from "../../../../components/form/auto-form";
|
|
5
|
+
import { AutoFormCheckbox } from "../../../../components/form/fields/checkbox";
|
|
6
|
+
import { AutoFormCombobox } from "../../../../components/form/fields/combobox";
|
|
7
|
+
import { AutoFormInput } from "../../../../components/form/fields/input";
|
|
8
|
+
import { AutoFormRadioGroup } from "../../../../components/form/fields/radio-group";
|
|
9
|
+
import { AutoFormSelect } from "../../../../components/form/fields/select";
|
|
10
|
+
import { AutoFormSwitch } from "../../../../components/form/fields/switch";
|
|
11
|
+
import { AutoFormTextarea } from "../../../../components/form/fields/textarea";
|
|
12
|
+
export const TestView = ()=>{
|
|
13
|
+
const formSchema = z.object({
|
|
14
|
+
provider: z.string().min(1, {
|
|
15
|
+
message: 'Provider is required'
|
|
16
|
+
}),
|
|
17
|
+
client_secret: z.string().min(1, {
|
|
18
|
+
message: 'Client Secret is required'
|
|
19
|
+
}),
|
|
20
|
+
terms: z.boolean().refine((val)=>val, {
|
|
21
|
+
message: 'You must accept the terms and conditions'
|
|
22
|
+
}),
|
|
23
|
+
options: z.enum([
|
|
24
|
+
'option1',
|
|
25
|
+
'option2',
|
|
26
|
+
'option3'
|
|
27
|
+
]).default('option1'),
|
|
28
|
+
options_long: z.enum([
|
|
29
|
+
'option1',
|
|
30
|
+
'option2',
|
|
31
|
+
'option3'
|
|
32
|
+
]).default('option2'),
|
|
33
|
+
switch: z.boolean().default(false),
|
|
34
|
+
type: z.enum([
|
|
35
|
+
'option-one',
|
|
36
|
+
'option-two'
|
|
37
|
+
])
|
|
38
|
+
});
|
|
39
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
40
|
+
className: "container mx-auto p-4",
|
|
41
|
+
children: /*#__PURE__*/ _jsx(AutoForm, {
|
|
42
|
+
fields: [
|
|
43
|
+
{
|
|
44
|
+
id: 'provider',
|
|
45
|
+
component: (props)=>/*#__PURE__*/ _jsx(AutoFormInput, {
|
|
46
|
+
description: "This is the provider for your application. It should be a valid provider name.",
|
|
47
|
+
label: "Provider",
|
|
48
|
+
...props
|
|
49
|
+
})
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
id: 'client_secret',
|
|
53
|
+
component: (props)=>/*#__PURE__*/ _jsx(AutoFormTextarea, {
|
|
54
|
+
description: "This is the client secret for your application. It should be kept secret and not shared with anyone.",
|
|
55
|
+
label: "Client Secret",
|
|
56
|
+
...props
|
|
57
|
+
})
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
id: 'terms',
|
|
61
|
+
component: (props)=>/*#__PURE__*/ _jsx(AutoFormCheckbox, {
|
|
62
|
+
description: "By checking this box, you agree to the terms and conditions.",
|
|
63
|
+
label: "I agree to the terms and conditions",
|
|
64
|
+
...props
|
|
65
|
+
})
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
id: 'options',
|
|
69
|
+
component: (props)=>/*#__PURE__*/ _jsx(AutoFormRadioGroup, {
|
|
70
|
+
description: "By checking this box, you agree to the terms and conditions.",
|
|
71
|
+
label: "I agree to the terms and conditions",
|
|
72
|
+
labels: [
|
|
73
|
+
{
|
|
74
|
+
value: 'option1',
|
|
75
|
+
label: 'Option 1 with a very long label that should be truncated'
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
value: 'option2',
|
|
79
|
+
label: 'Option 2'
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
value: 'option3',
|
|
83
|
+
label: 'Option 3'
|
|
84
|
+
}
|
|
85
|
+
],
|
|
86
|
+
...props
|
|
87
|
+
})
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
id: 'options_long',
|
|
91
|
+
component: (props)=>/*#__PURE__*/ _jsx(AutoFormSelect, {
|
|
92
|
+
description: "By checking this box, you agree to the terms and conditions.",
|
|
93
|
+
label: "I agree to the terms and conditions",
|
|
94
|
+
labels: [
|
|
95
|
+
{
|
|
96
|
+
value: 'option1',
|
|
97
|
+
label: 'Option 1 with a very long label that should be truncated'
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
value: 'option2',
|
|
101
|
+
label: 'Option 2'
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
value: 'option3',
|
|
105
|
+
label: 'Option 3'
|
|
106
|
+
}
|
|
107
|
+
],
|
|
108
|
+
placeholder: "Select an option from the list",
|
|
109
|
+
...props
|
|
110
|
+
})
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
id: 'switch',
|
|
114
|
+
component: (props)=>/*#__PURE__*/ _jsx(AutoFormSwitch, {
|
|
115
|
+
description: "By checking this box, you agree to the terms and conditions.",
|
|
116
|
+
label: "I agree to the terms and conditions",
|
|
117
|
+
...props
|
|
118
|
+
})
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
id: 'type',
|
|
122
|
+
component: (props)=>/*#__PURE__*/ _jsx(AutoFormCombobox, {
|
|
123
|
+
description: "By checking this box, you agree to the terms and conditions.",
|
|
124
|
+
label: "Type",
|
|
125
|
+
labels: [
|
|
126
|
+
{
|
|
127
|
+
value: 'option-one',
|
|
128
|
+
label: 'Option One'
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
value: 'option-two',
|
|
132
|
+
label: 'Option Two'
|
|
133
|
+
}
|
|
134
|
+
],
|
|
135
|
+
...props
|
|
136
|
+
})
|
|
137
|
+
}
|
|
138
|
+
],
|
|
139
|
+
formSchema: formSchema,
|
|
140
|
+
onSubmit: (values)=>{
|
|
141
|
+
// eslint-disable-next-line no-console
|
|
142
|
+
console.log('Form submitted', values);
|
|
143
|
+
}
|
|
144
|
+
})
|
|
145
|
+
});
|
|
146
|
+
};
|