@vitnode/core 1.2.0-canary.16 → 1.2.0-canary.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/scripts/shared/file-utils.d.ts.map +1 -1
- package/dist/src/api/config.js +3 -3
- package/dist/src/api/lib/check-plugin-id.js +1 -1
- package/dist/src/api/lib/plugin.js +1 -1
- package/dist/src/api/lib/route.js +1 -1
- package/dist/src/api/middlewares/global/global.js +3 -3
- package/dist/src/api/models/device.js +3 -3
- package/dist/src/api/models/session-admin.js +3 -3
- package/dist/src/api/models/session.js +3 -3
- package/dist/src/api/models/sso.js +4 -4
- package/dist/src/api/models/user/get-user-by-id.js +1 -1
- package/dist/src/api/models/user/sign-in-with-passwords.js +2 -2
- package/dist/src/api/models/user/sign-up.js +5 -5
- package/dist/src/api/models/user.js +3 -3
- package/dist/src/api/modules/admin/admin.module.js +4 -4
- package/dist/src/api/modules/admin/routes/session.route.js +2 -2
- package/dist/src/api/modules/admin/users/routes/list.route.js +4 -4
- package/dist/src/api/modules/admin/users/routes/users.route.js +4 -4
- package/dist/src/api/modules/admin/users/users.admin.module.js +3 -3
- package/dist/src/api/modules/middleware/middleware.module.js +3 -3
- package/dist/src/api/modules/middleware/route.js +3 -3
- package/dist/src/api/modules/users/avatar-color.js +1 -1
- package/dist/src/api/modules/users/routes/session.route.js +3 -3
- package/dist/src/api/modules/users/routes/sign-in.route.js +5 -5
- package/dist/src/api/modules/users/routes/sign-out.route.js +4 -4
- package/dist/src/api/modules/users/routes/sign-up.route.js +4 -4
- package/dist/src/api/modules/users/routes/test.route.js +2 -2
- package/dist/src/api/modules/users/sso/routes/callback.route.js +4 -4
- package/dist/src/api/modules/users/sso/routes/create-url.route.js +3 -3
- package/dist/src/api/modules/users/sso/sso.module.js +4 -4
- package/dist/src/api/modules/users/users.module.js +8 -8
- package/dist/src/api/plugin.js +5 -5
- package/dist/src/api/plugins/sso/discord.js +1 -1
- package/dist/src/api/plugins/sso/facebook.js +1 -1
- package/dist/src/api/plugins/sso/google.js +1 -1
- package/dist/src/app/login/page.js +1 -1
- package/dist/src/app/login/sso/[providerId]/page.js +1 -1
- package/dist/src/app/register/page.js +1 -1
- package/dist/src/app_admin/core/page.js +1 -1
- package/dist/src/app_admin/core/test/page.js +1 -1
- package/dist/src/app_admin/core/users/page.js +3 -3
- package/dist/src/components/avatar.js +1 -1
- package/dist/src/components/date-format.js +1 -1
- package/dist/src/components/form/auto-form.js +5 -5
- package/dist/src/components/form/common/desc.js +1 -1
- package/dist/src/components/form/common/label.js +1 -1
- package/dist/src/components/form/fields/checkbox.js +4 -4
- package/dist/src/components/form/fields/combobox.js +8 -8
- package/dist/src/components/form/fields/input.js +4 -4
- package/dist/src/components/form/fields/item.js +2 -2
- package/dist/src/components/form/fields/radio-group.js +5 -5
- package/dist/src/components/form/fields/select.js +5 -5
- package/dist/src/components/form/fields/switch.js +4 -4
- package/dist/src/components/form/fields/textarea.js +4 -4
- package/dist/src/components/logo-vitnode.js +1 -1
- package/dist/src/components/switchers/theme-switcher.js +1 -1
- package/dist/src/components/table/content.js +4 -4
- package/dist/src/components/table/data-table.js +4 -4
- package/dist/src/components/table/order-table-head.js +3 -3
- package/dist/src/components/table/pagination.js +4 -4
- package/dist/src/components/ui/accordion.js +1 -1
- package/dist/src/components/ui/alert-dialog.js +2 -2
- package/dist/src/components/ui/alert.js +1 -1
- package/dist/src/components/ui/badge.js +1 -1
- package/dist/src/components/ui/button.js +2 -2
- package/dist/src/components/ui/card.js +1 -1
- package/dist/src/components/ui/checkbox.js +1 -1
- package/dist/src/components/ui/command.js +2 -2
- package/dist/src/components/ui/context-menu.js +1 -1
- package/dist/src/components/ui/dialog.js +2 -2
- package/dist/src/components/ui/drawer.js +1 -1
- package/dist/src/components/ui/dropdown-menu.js +1 -1
- package/dist/src/components/ui/form.js +5 -5
- package/dist/src/components/ui/header-content.js +1 -1
- package/dist/src/components/ui/hover-card.js +1 -1
- package/dist/src/components/ui/input-otp.js +1 -1
- package/dist/src/components/ui/input.js +1 -1
- package/dist/src/components/ui/label.js +1 -1
- package/dist/src/components/ui/loader.js +1 -1
- package/dist/src/components/ui/menubar.js +1 -1
- package/dist/src/components/ui/navigation-menu.js +1 -1
- package/dist/src/components/ui/popover.js +1 -1
- package/dist/src/components/ui/progress.js +1 -1
- package/dist/src/components/ui/radio-group.js +1 -1
- package/dist/src/components/ui/select.js +1 -1
- package/dist/src/components/ui/separator.js +1 -1
- package/dist/src/components/ui/sheet.js +1 -1
- package/dist/src/components/ui/sidebar.js +8 -8
- package/dist/src/components/ui/skeleton.js +1 -1
- package/dist/src/components/ui/slider.js +1 -1
- package/dist/src/components/ui/sonner.js +1 -1
- package/dist/src/components/ui/switch.js +1 -1
- package/dist/src/components/ui/table.js +1 -1
- package/dist/src/components/ui/tabs.js +1 -1
- package/dist/src/components/ui/textarea.js +1 -1
- package/dist/src/components/ui/toggle-group.js +2 -2
- package/dist/src/components/ui/toggle.js +1 -1
- package/dist/src/components/ui/tooltip.js +1 -1
- package/dist/src/database/admins.js +3 -3
- package/dist/src/database/moderators.js +2 -2
- package/dist/src/database/sessions.js +1 -1
- package/dist/src/database/users.js +2 -2
- package/dist/src/drizzle.config.d.ts.map +1 -1
- package/dist/src/drizzle.config.js +4 -6
- package/dist/src/lib/api/get-middleware-api.js +2 -2
- package/dist/src/lib/api/get-session-admin-api.js +3 -3
- package/dist/src/lib/api/get-session-api.js +2 -2
- package/dist/src/lib/colors.test.js +1 -1
- package/dist/src/lib/fetcher/cookie-from-string-to-object.test.js +1 -1
- package/dist/src/lib/fetcher/helpers.js +1 -1
- package/dist/src/lib/fetcher/helpers.test.js +1 -1
- package/dist/src/lib/fetcher.js +2 -2
- package/dist/src/lib/helpers/auto-form.test.js +1 -1
- package/dist/src/lib/special-characters.test.js +1 -1
- package/dist/src/views/admin/layouts/admin-layout.js +7 -7
- package/dist/src/views/admin/layouts/sidebar/nav/item.js +5 -5
- package/dist/src/views/admin/layouts/sidebar/nav/nav.js +2 -2
- package/dist/src/views/admin/layouts/sidebar/sidebar.js +5 -5
- package/dist/src/views/admin/layouts/sidebar/sign-out.js +2 -2
- package/dist/src/views/admin/layouts/user-bar/client.js +3 -3
- package/dist/src/views/admin/layouts/user-bar/user-bar.js +4 -4
- package/dist/src/views/admin/sign-in/sign-in-admin-view.js +4 -4
- package/dist/src/views/admin/views/core/dashboard/dashboard-admin-view.js +4 -4
- package/dist/src/views/admin/views/core/test.js +8 -8
- package/dist/src/views/admin/views/core/users/users-admin-view.js +6 -6
- package/dist/src/views/auth/components/password-input.js +4 -4
- package/dist/src/views/auth/sign-in/form/form.js +4 -4
- package/dist/src/views/auth/sign-in/form/hooks/mutation-api.js +3 -3
- package/dist/src/views/auth/sign-in/form/hooks/use-form.js +1 -1
- package/dist/src/views/auth/sign-in/sign-in-view.js +5 -5
- package/dist/src/views/auth/sign-up/form/form.js +7 -7
- package/dist/src/views/auth/sign-up/form/hooks/mutation-api.js +2 -2
- package/dist/src/views/auth/sign-up/form/hooks/use-form.js +1 -1
- package/dist/src/views/auth/sign-up/sign-up-view.js +6 -6
- package/dist/src/views/auth/sso/buttons/client.js +2 -2
- package/dist/src/views/auth/sso/buttons/mutation-api.js +3 -3
- package/dist/src/views/auth/sso/buttons/sso-buttons.js +3 -3
- package/dist/src/views/auth/sso/callback/callback-sso-view.js +2 -2
- package/dist/src/views/auth/sso/callback/client/client.js +4 -4
- package/dist/src/views/auth/sso/callback/client/mutation-api.js +2 -2
- package/dist/src/views/error/back-button.js +2 -2
- package/dist/src/views/error/error-view.js +4 -4
- package/dist/src/views/error/global-error-view.js +2 -2
- package/dist/src/views/layouts/provider.js +2 -2
- package/dist/src/views/layouts/root-layout.js +2 -2
- package/dist/src/views/layouts/theme/header/header.js +5 -5
- package/dist/src/views/layouts/theme/header/user/auth/auth.js +5 -5
- package/dist/src/views/layouts/theme/header/user/auth/client.js +3 -3
- package/dist/src/views/layouts/theme/header/user/auth/log-out-mutation-api.js +3 -3
- package/dist/src/views/layouts/theme/header/user/user.js +5 -5
- package/dist/src/views/layouts/theme/layout.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/drizzle.config.ts +4 -8
- package/src/database/admins.ts +0 -87
- package/src/database/languages.ts +0 -54
- package/src/database/moderators.ts +0 -42
- package/src/database/roles.ts +0 -15
- package/src/database/sessions.ts +0 -59
- package/src/database/users.ts +0 -142
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-utils.d.ts","sourceRoot":"","sources":["../../../scripts/shared/file-utils.ts"],"names":[],"mappings":"AA2BA,eAAO,MAAM,QAAQ,GAAI,UAAU,MAAM,EAAE,YAAY,MAAM,KAAG,MAY/D,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,YAAY,MAAM,KACjB,GAAG,CAAC,MAAM,EAAE,MAAM,CAwBpB,CAAC;AAGF,eAAO,MAAM,oBAAoB,GAC/B,SAAS,MAAM,EACf,YAAY,MAAM,KACjB,MAmCF,CAAC;AAEF,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"file-utils.d.ts","sourceRoot":"","sources":["../../../scripts/shared/file-utils.ts"],"names":[],"mappings":"AA2BA,eAAO,MAAM,QAAQ,GAAI,UAAU,MAAM,EAAE,YAAY,MAAM,KAAG,MAY/D,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,YAAY,MAAM,KACjB,GAAG,CAAC,MAAM,EAAE,MAAM,CAwBpB,CAAC;AAGF,eAAO,MAAM,oBAAoB,GAC/B,SAAS,MAAM,EACf,YAAY,MAAM,KACjB,MAmCF,CAAC;AAEF,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAkBlD;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAevD;AAED,eAAO,MAAM,WAAW,GAAI,KAAK,MAAM,KAAG,MAAM,EAgB/C,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,KAAK,MAAM,KAAG,OAM9C,CAAC;AAEF,MAAM,WAAW,YAAY;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,QAAQ,GACnB,SAAS,MAAM,EACf,UAAU,MAAM,EAChB,YAAY,MAAM,EAClB,UAAU,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAC7B,YAAY,MAAM,EAClB,UAAU,MAAM,EAChB,iBAAc,SAkEf,CAAC;AAEF,eAAO,MAAM,sBAAsB,GACjC,WAAW,MAAM,EACjB,gBAAgB,MAAM,EACtB,YAAY,MAAM,EAClB,UAAU,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAC7B,YAAY,MAAM,EAClB,UAAU,MAAM,EAChB,iBAAc,SAoBf,CAAC"}
|
package/dist/src/api/config.js
CHANGED
|
@@ -2,9 +2,9 @@ import { swaggerUI } from "@hono/swagger-ui";
|
|
|
2
2
|
import { cors } from "hono/cors";
|
|
3
3
|
import { csrf } from "hono/csrf";
|
|
4
4
|
import { HTTPException } from "hono/http-exception";
|
|
5
|
-
import { newBuildPluginApiCore } from "./plugin";
|
|
6
|
-
import { CONFIG_PLUGIN } from "../config";
|
|
7
|
-
import { globalAdminMiddleware, globalMiddleware } from "./middlewares/global/global";
|
|
5
|
+
import { newBuildPluginApiCore } from "./plugin.js";
|
|
6
|
+
import { CONFIG_PLUGIN } from "../config.js";
|
|
7
|
+
import { globalAdminMiddleware, globalMiddleware } from "./middlewares/global/global.js";
|
|
8
8
|
export function VitNodeAPI({ app, cors: corsOptions, csrf: csrfOptions, vitNodeApiConfig, vitNodeConfig }) {
|
|
9
9
|
app.doc('/swagger/doc', {
|
|
10
10
|
openapi: '3.0.0',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { existsSync, readFileSync } from "fs";
|
|
2
2
|
import { join } from "path";
|
|
3
|
-
import { CONFIG } from "../../lib/config";
|
|
3
|
+
import { CONFIG } from "../../lib/config.js";
|
|
4
4
|
export const checkPluginId = (pluginName)=>{
|
|
5
5
|
if (!CONFIG.node_development) return null;
|
|
6
6
|
const path = join(process.cwd(), 'node_modules', pluginName, 'package.json');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OpenAPIHono } from "@hono/zod-openapi";
|
|
2
|
-
import { checkPluginId } from "./check-plugin-id";
|
|
2
|
+
import { checkPluginId } from "./check-plugin-id.js";
|
|
3
3
|
export function buildApiPlugin({ pluginId, modules = [] }) {
|
|
4
4
|
// Run for checking if the plugin is valid
|
|
5
5
|
checkPluginId(pluginId);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRoute as createRouteHono } from "@hono/zod-openapi";
|
|
2
|
-
import { pluginMiddleware } from "../middlewares/global/global";
|
|
2
|
+
import { pluginMiddleware } from "../middlewares/global/global.js";
|
|
3
3
|
export const buildRoute = ({ route, handler, pluginId })=>{
|
|
4
4
|
const pluginTag = pluginId.split(/[-_]/).map((word)=>word.charAt(0).toUpperCase() + word.slice(1)).join(' ');
|
|
5
5
|
const tags = [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HTTPException } from "hono/http-exception";
|
|
2
|
-
import { DeviceModel } from "../../models/device";
|
|
3
|
-
import { SessionModel } from "../../models/session";
|
|
4
|
-
import { SessionAdminModel } from "../../models/session-admin";
|
|
2
|
+
import { DeviceModel } from "../../models/device.js";
|
|
3
|
+
import { SessionModel } from "../../models/session.js";
|
|
4
|
+
import { SessionAdminModel } from "../../models/session-admin.js";
|
|
5
5
|
export const globalMiddleware = ({ authorization, metadata, emailProvider, dbProvider })=>{
|
|
6
6
|
return async (c, next)=>{
|
|
7
7
|
c.set('db', dbProvider);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { eq } from "drizzle-orm";
|
|
2
2
|
import { getCookie, setCookie } from "hono/cookie";
|
|
3
|
-
import { core_sessions_known_devices } from "../../database/sessions";
|
|
4
|
-
import { CONFIG } from "../../lib/config";
|
|
5
|
-
import { getUserIp } from "../lib/get-user-ip";
|
|
3
|
+
import { core_sessions_known_devices } from "../../database/sessions.js";
|
|
4
|
+
import { CONFIG } from "../../lib/config.js";
|
|
5
|
+
import { getUserIp } from "../lib/get-user-ip.js";
|
|
6
6
|
export class DeviceModel {
|
|
7
7
|
constructor(c){
|
|
8
8
|
this.c = c;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { and, eq, gt, or } from "drizzle-orm";
|
|
2
2
|
import { deleteCookie, getCookie, setCookie } from "hono/cookie";
|
|
3
3
|
import { HTTPException } from "hono/http-exception";
|
|
4
|
-
import { core_admin_permissions, core_admin_sessions } from "../../database/admins";
|
|
5
|
-
import { CONFIG } from "../../lib/config";
|
|
6
|
-
import { UserModel } from "./user";
|
|
4
|
+
import { core_admin_permissions, core_admin_sessions } from "../../database/admins.js";
|
|
5
|
+
import { CONFIG } from "../../lib/config.js";
|
|
6
|
+
import { UserModel } from "./user.js";
|
|
7
7
|
export class SessionAdminModel {
|
|
8
8
|
constructor(c){
|
|
9
9
|
this.c = c;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { and, eq, gt } from "drizzle-orm";
|
|
2
2
|
import { deleteCookie, getCookie, setCookie } from "hono/cookie";
|
|
3
|
-
import { core_sessions } from "../../database/sessions";
|
|
4
|
-
import { CONFIG } from "../../lib/config";
|
|
5
|
-
import { UserModel } from "./user";
|
|
3
|
+
import { core_sessions } from "../../database/sessions.js";
|
|
4
|
+
import { CONFIG } from "../../lib/config.js";
|
|
5
|
+
import { UserModel } from "./user.js";
|
|
6
6
|
export class SessionModel {
|
|
7
7
|
constructor(c){
|
|
8
8
|
this.c = c;
|
|
@@ -2,10 +2,10 @@ import crypto from "crypto";
|
|
|
2
2
|
import { and, eq } from "drizzle-orm";
|
|
3
3
|
import { deleteCookie, getCookie, setCookie } from "hono/cookie";
|
|
4
4
|
import { HTTPException } from "hono/http-exception";
|
|
5
|
-
import { core_users, core_users_sso } from "../../database/users";
|
|
6
|
-
import { CONFIG } from "../../lib/config";
|
|
7
|
-
import { removeSpecialCharacters } from "../../lib/special-characters";
|
|
8
|
-
import { UserModel } from "./user";
|
|
5
|
+
import { core_users, core_users_sso } from "../../database/users.js";
|
|
6
|
+
import { CONFIG } from "../../lib/config.js";
|
|
7
|
+
import { removeSpecialCharacters } from "../../lib/special-characters.js";
|
|
8
|
+
import { UserModel } from "./user.js";
|
|
9
9
|
export const getRedirectUri = (code)=>new URL(`${CONFIG.frontend.href}login/sso/${code}`).toString();
|
|
10
10
|
export class SSOModel {
|
|
11
11
|
constructor(c){
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { eq } from "drizzle-orm";
|
|
2
2
|
import { HTTPException } from "hono/http-exception";
|
|
3
|
-
import { core_users } from "../../../database/users";
|
|
4
|
-
import { PasswordModel } from "../password";
|
|
3
|
+
import { core_users } from "../../../database/users.js";
|
|
4
|
+
import { PasswordModel } from "../password.js";
|
|
5
5
|
export const signInWithPassword = async ({ email, password, c })=>{
|
|
6
6
|
const [user] = await c.get('db').select({
|
|
7
7
|
id: core_users.id,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { and, count, eq, or } from "drizzle-orm";
|
|
2
2
|
import { HTTPException } from "hono/http-exception";
|
|
3
|
-
import { getUserIp } from "../../lib/get-user-ip";
|
|
4
|
-
import { generateAvatarColor } from "../../modules/users/avatar-color";
|
|
5
|
-
import { core_roles } from "../../../database/roles";
|
|
6
|
-
import { core_users } from "../../../database/users";
|
|
7
|
-
import { removeSpecialCharacters } from "../../../lib/special-characters";
|
|
3
|
+
import { getUserIp } from "../../lib/get-user-ip.js";
|
|
4
|
+
import { generateAvatarColor } from "../../modules/users/avatar-color.js";
|
|
5
|
+
import { core_roles } from "../../../database/roles.js";
|
|
6
|
+
import { core_users } from "../../../database/users.js";
|
|
7
|
+
import { removeSpecialCharacters } from "../../../lib/special-characters.js";
|
|
8
8
|
const getDefaultData = async (c)=>{
|
|
9
9
|
const [countUsers] = await c.get('db').select({
|
|
10
10
|
count: count()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { getUserById } from "./user/get-user-by-id";
|
|
2
|
-
import { signInWithPassword } from "./user/sign-in-with-passwords";
|
|
3
|
-
import { signUp } from "./user/sign-up";
|
|
1
|
+
import { getUserById } from "./user/get-user-by-id.js";
|
|
2
|
+
import { signInWithPassword } from "./user/sign-in-with-passwords.js";
|
|
3
|
+
import { signUp } from "./user/sign-up.js";
|
|
4
4
|
export class UserModel {
|
|
5
5
|
getUserById = getUserById;
|
|
6
6
|
signInWithPassword = signInWithPassword;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { buildModule } from "../../lib/module";
|
|
2
|
-
import { CONFIG_PLUGIN } from "../../../config";
|
|
3
|
-
import { sessionAdminRoute } from "./routes/session.route";
|
|
4
|
-
import { usersAdminModule } from "./users/users.admin.module";
|
|
1
|
+
import { buildModule } from "../../lib/module.js";
|
|
2
|
+
import { CONFIG_PLUGIN } from "../../../config.js";
|
|
3
|
+
import { sessionAdminRoute } from "./routes/session.route.js";
|
|
4
|
+
import { usersAdminModule } from "./users/users.admin.module.js";
|
|
5
5
|
export const adminModule = buildModule({
|
|
6
6
|
...CONFIG_PLUGIN,
|
|
7
7
|
name: 'admin',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HTTPException } from "hono/http-exception";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
import { buildRoute } from "../../../lib/route";
|
|
4
|
-
import { CONFIG_PLUGIN } from "../../../../config";
|
|
3
|
+
import { buildRoute } from "../../../lib/route.js";
|
|
4
|
+
import { CONFIG_PLUGIN } from "../../../../config.js";
|
|
5
5
|
export const sessionAdminRoute = buildRoute({
|
|
6
6
|
...CONFIG_PLUGIN,
|
|
7
7
|
route: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from "@hono/zod-openapi";
|
|
2
|
-
import { buildRoute } from "../../../../lib/route";
|
|
3
|
-
import { withPagination, zodPaginationPageInfo, zodPaginationQuery } from "../../../../lib/with-pagination";
|
|
4
|
-
import { CONFIG_PLUGIN } from "../../../../../config";
|
|
5
|
-
import { core_users } from "../../../../../database/users";
|
|
2
|
+
import { buildRoute } from "../../../../lib/route.js";
|
|
3
|
+
import { withPagination, zodPaginationPageInfo, zodPaginationQuery } from "../../../../lib/with-pagination.js";
|
|
4
|
+
import { CONFIG_PLUGIN } from "../../../../../config.js";
|
|
5
|
+
import { core_users } from "../../../../../database/users.js";
|
|
6
6
|
export const listUsersAdminRoute = buildRoute({
|
|
7
7
|
...CONFIG_PLUGIN,
|
|
8
8
|
route: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from "@hono/zod-openapi";
|
|
2
|
-
import { buildRoute } from "../../../../lib/route";
|
|
3
|
-
import { withPagination, zodPaginationPageInfo, zodPaginationQuery } from "../../../../lib/with-pagination";
|
|
4
|
-
import { CONFIG_PLUGIN } from "../../../../../config";
|
|
5
|
-
import { core_users } from "../../../../../database/users";
|
|
2
|
+
import { buildRoute } from "../../../../lib/route.js";
|
|
3
|
+
import { withPagination, zodPaginationPageInfo, zodPaginationQuery } from "../../../../lib/with-pagination.js";
|
|
4
|
+
import { CONFIG_PLUGIN } from "../../../../../config.js";
|
|
5
|
+
import { core_users } from "../../../../../database/users.js";
|
|
6
6
|
export const usersAdminRoute = buildRoute({
|
|
7
7
|
...CONFIG_PLUGIN,
|
|
8
8
|
route: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { buildModule } from "../../../lib/module";
|
|
2
|
-
import { CONFIG_PLUGIN } from "../../../../config";
|
|
3
|
-
import { listUsersAdminRoute } from "./routes/list.route";
|
|
1
|
+
import { buildModule } from "../../../lib/module.js";
|
|
2
|
+
import { CONFIG_PLUGIN } from "../../../../config.js";
|
|
3
|
+
import { listUsersAdminRoute } from "./routes/list.route.js";
|
|
4
4
|
export const usersAdminModule = buildModule({
|
|
5
5
|
...CONFIG_PLUGIN,
|
|
6
6
|
name: 'users',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { buildModule } from "../../lib/module";
|
|
2
|
-
import { CONFIG_PLUGIN } from "../../../config";
|
|
3
|
-
import { routeMiddleware } from "./route";
|
|
1
|
+
import { buildModule } from "../../lib/module.js";
|
|
2
|
+
import { CONFIG_PLUGIN } from "../../../config.js";
|
|
3
|
+
import { routeMiddleware } from "./route.js";
|
|
4
4
|
export const middlewareModule = buildModule({
|
|
5
5
|
...CONFIG_PLUGIN,
|
|
6
6
|
name: 'middleware',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { buildRoute } from "../../lib/route";
|
|
3
|
-
import { EmailModel } from "../../models/email";
|
|
4
|
-
import { CONFIG_PLUGIN } from "../../../config";
|
|
2
|
+
import { buildRoute } from "../../lib/route.js";
|
|
3
|
+
import { EmailModel } from "../../models/email.js";
|
|
4
|
+
import { CONFIG_PLUGIN } from "../../../config.js";
|
|
5
5
|
export const routeMiddleware = buildRoute({
|
|
6
6
|
...CONFIG_PLUGIN,
|
|
7
7
|
route: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { buildRoute } from "../../../lib/route";
|
|
3
|
-
import { SessionAdminModel } from "../../../models/session-admin";
|
|
4
|
-
import { CONFIG_PLUGIN } from "../../../../config";
|
|
2
|
+
import { buildRoute } from "../../../lib/route.js";
|
|
3
|
+
import { SessionAdminModel } from "../../../models/session-admin.js";
|
|
4
|
+
import { CONFIG_PLUGIN } from "../../../../config.js";
|
|
5
5
|
export const sessionRoute = buildRoute({
|
|
6
6
|
...CONFIG_PLUGIN,
|
|
7
7
|
route: {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { buildRoute } from "../../../lib/route";
|
|
3
|
-
import { SessionModel } from "../../../models/session";
|
|
4
|
-
import { SessionAdminModel } from "../../../models/session-admin";
|
|
5
|
-
import { UserModel } from "../../../models/user";
|
|
6
|
-
import { CONFIG_PLUGIN } from "../../../../config";
|
|
2
|
+
import { buildRoute } from "../../../lib/route.js";
|
|
3
|
+
import { SessionModel } from "../../../models/session.js";
|
|
4
|
+
import { SessionAdminModel } from "../../../models/session-admin.js";
|
|
5
|
+
import { UserModel } from "../../../models/user.js";
|
|
6
|
+
import { CONFIG_PLUGIN } from "../../../../config.js";
|
|
7
7
|
export const zodSignInSchema = z.object({
|
|
8
8
|
email: z.string().email().toLowerCase().openapi({
|
|
9
9
|
example: 'test@test.com'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from "@hono/zod-openapi";
|
|
2
|
-
import { buildRoute } from "../../../lib/route";
|
|
3
|
-
import { SessionModel } from "../../../models/session";
|
|
4
|
-
import { SessionAdminModel } from "../../../models/session-admin";
|
|
5
|
-
import { CONFIG_PLUGIN } from "../../../../config";
|
|
2
|
+
import { buildRoute } from "../../../lib/route.js";
|
|
3
|
+
import { SessionModel } from "../../../models/session.js";
|
|
4
|
+
import { SessionAdminModel } from "../../../models/session-admin.js";
|
|
5
|
+
import { CONFIG_PLUGIN } from "../../../../config.js";
|
|
6
6
|
export const signOutRoute = buildRoute({
|
|
7
7
|
...CONFIG_PLUGIN,
|
|
8
8
|
route: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { buildRoute } from "../../../lib/route";
|
|
3
|
-
import { PasswordModel } from "../../../models/password";
|
|
4
|
-
import { UserModel } from "../../../models/user";
|
|
5
|
-
import { CONFIG_PLUGIN } from "../../../../config";
|
|
2
|
+
import { buildRoute } from "../../../lib/route.js";
|
|
3
|
+
import { PasswordModel } from "../../../models/password.js";
|
|
4
|
+
import { UserModel } from "../../../models/user.js";
|
|
5
|
+
import { CONFIG_PLUGIN } from "../../../../config.js";
|
|
6
6
|
const nameRegex = /^(?!.* {2})[\p{L}\p{N}._@ -]*$/u;
|
|
7
7
|
export const zodSignUpSchema = z.object({
|
|
8
8
|
email: z.string().email().toLowerCase().openapi({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { buildRoute } from "../../../lib/route";
|
|
3
|
-
import { CONFIG_PLUGIN } from "../../../../config";
|
|
2
|
+
import { buildRoute } from "../../../lib/route.js";
|
|
3
|
+
import { CONFIG_PLUGIN } from "../../../../config.js";
|
|
4
4
|
export const testRoute = buildRoute({
|
|
5
5
|
...CONFIG_PLUGIN,
|
|
6
6
|
route: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { buildRoute } from "../../../../lib/route";
|
|
3
|
-
import { SessionModel } from "../../../../models/session";
|
|
4
|
-
import { SSOModel } from "../../../../models/sso";
|
|
5
|
-
import { CONFIG_PLUGIN } from "../../../../../config";
|
|
2
|
+
import { buildRoute } from "../../../../lib/route.js";
|
|
3
|
+
import { SessionModel } from "../../../../models/session.js";
|
|
4
|
+
import { SSOModel } from "../../../../models/sso.js";
|
|
5
|
+
import { CONFIG_PLUGIN } from "../../../../../config.js";
|
|
6
6
|
export const callbackRoute = buildRoute({
|
|
7
7
|
...CONFIG_PLUGIN,
|
|
8
8
|
route: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { buildRoute } from "../../../../lib/route";
|
|
3
|
-
import { SSOModel } from "../../../../models/sso";
|
|
4
|
-
import { CONFIG_PLUGIN } from "../../../../../config";
|
|
2
|
+
import { buildRoute } from "../../../../lib/route.js";
|
|
3
|
+
import { SSOModel } from "../../../../models/sso.js";
|
|
4
|
+
import { CONFIG_PLUGIN } from "../../../../../config.js";
|
|
5
5
|
export const createUrlRoute = buildRoute({
|
|
6
6
|
...CONFIG_PLUGIN,
|
|
7
7
|
route: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { buildModule } from "../../../lib/module";
|
|
2
|
-
import { CONFIG_PLUGIN } from "../../../../config";
|
|
3
|
-
import { callbackRoute } from "./routes/callback.route";
|
|
4
|
-
import { createUrlRoute } from "./routes/create-url.route";
|
|
1
|
+
import { buildModule } from "../../../lib/module.js";
|
|
2
|
+
import { CONFIG_PLUGIN } from "../../../../config.js";
|
|
3
|
+
import { callbackRoute } from "./routes/callback.route.js";
|
|
4
|
+
import { createUrlRoute } from "./routes/create-url.route.js";
|
|
5
5
|
export const ssoUserModule = buildModule({
|
|
6
6
|
...CONFIG_PLUGIN,
|
|
7
7
|
name: 'sso',
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { buildModule } from "../../lib/module";
|
|
2
|
-
import { CONFIG_PLUGIN } from "../../../config";
|
|
3
|
-
import { sessionRoute } from "./routes/session.route";
|
|
4
|
-
import { signInRoute } from "./routes/sign-in.route";
|
|
5
|
-
import { signOutRoute } from "./routes/sign-out.route";
|
|
6
|
-
import { signUpRoute } from "./routes/sign-up.route";
|
|
7
|
-
import { testRoute } from "./routes/test.route";
|
|
8
|
-
import { ssoUserModule } from "./sso/sso.module";
|
|
1
|
+
import { buildModule } from "../../lib/module.js";
|
|
2
|
+
import { CONFIG_PLUGIN } from "../../../config.js";
|
|
3
|
+
import { sessionRoute } from "./routes/session.route.js";
|
|
4
|
+
import { signInRoute } from "./routes/sign-in.route.js";
|
|
5
|
+
import { signOutRoute } from "./routes/sign-out.route.js";
|
|
6
|
+
import { signUpRoute } from "./routes/sign-up.route.js";
|
|
7
|
+
import { testRoute } from "./routes/test.route.js";
|
|
8
|
+
import { ssoUserModule } from "./sso/sso.module.js";
|
|
9
9
|
export const usersModule = buildModule({
|
|
10
10
|
...CONFIG_PLUGIN,
|
|
11
11
|
name: 'users',
|
package/dist/src/api/plugin.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { CONFIG_PLUGIN } from "../config";
|
|
2
|
-
import { buildApiPlugin } from "./lib/plugin";
|
|
3
|
-
import { adminModule } from "./modules/admin/admin.module";
|
|
4
|
-
import { middlewareModule } from "./modules/middleware/middleware.module";
|
|
5
|
-
import { usersModule } from "./modules/users/users.module";
|
|
1
|
+
import { CONFIG_PLUGIN } from "../config.js";
|
|
2
|
+
import { buildApiPlugin } from "./lib/plugin.js";
|
|
3
|
+
import { adminModule } from "./modules/admin/admin.module.js";
|
|
4
|
+
import { middlewareModule } from "./modules/middleware/middleware.module.js";
|
|
5
|
+
import { usersModule } from "./modules/users/users.module.js";
|
|
6
6
|
export const newBuildPluginApiCore = buildApiPlugin({
|
|
7
7
|
...CONFIG_PLUGIN,
|
|
8
8
|
modules: [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTTPException } from "hono/http-exception";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
import { getRedirectUri } from "../../models/sso";
|
|
3
|
+
import { getRedirectUri } from "../../models/sso.js";
|
|
4
4
|
export const DiscordSSOApiPlugin = ({ clientId = '', clientSecret = '' })=>{
|
|
5
5
|
const id = 'discord';
|
|
6
6
|
const redirectUri = getRedirectUri(id);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTTPException } from "hono/http-exception";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
import { getRedirectUri } from "../../models/sso";
|
|
3
|
+
import { getRedirectUri } from "../../models/sso.js";
|
|
4
4
|
export const FacebookSSOApiPlugin = ({ clientId, clientSecret })=>{
|
|
5
5
|
const id = 'facebook';
|
|
6
6
|
const redirectUri = getRedirectUri(id);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTTPException } from "hono/http-exception";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
import { getRedirectUri } from "../../models/sso";
|
|
3
|
+
import { getRedirectUri } from "../../models/sso.js";
|
|
4
4
|
export const GoogleSSOApiPlugin = ({ clientId, clientSecret })=>{
|
|
5
5
|
const id = 'google';
|
|
6
6
|
const redirectUri = getRedirectUri(id);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { getTranslations } from "next-intl/server";
|
|
3
|
-
import { SignInView } from "../../views/auth/sign-in/sign-in-view";
|
|
3
|
+
import { SignInView } from "../../views/auth/sign-in/sign-in-view.js";
|
|
4
4
|
export const generateMetadata = async ({ locale })=>{
|
|
5
5
|
const t = await getTranslations({
|
|
6
6
|
locale,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { CallbackSSOView } from "../../../../views/auth/sso/callback/callback-sso-view";
|
|
2
|
+
import { CallbackSSOView } from "../../../../views/auth/sso/callback/callback-sso-view.js";
|
|
3
3
|
export default async function Page({ params, searchParams }) {
|
|
4
4
|
const { providerId } = await params;
|
|
5
5
|
const currentSearchParams = await searchParams;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { getTranslations } from "next-intl/server";
|
|
3
|
-
import { SignUpView } from "../../views/auth/sign-up/sign-up-view";
|
|
3
|
+
import { SignUpView } from "../../views/auth/sign-up/sign-up-view.js";
|
|
4
4
|
export const generateMetadata = async ({ locale })=>{
|
|
5
5
|
const t = await getTranslations({
|
|
6
6
|
locale,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { DashboardAdminView } from "../../views/admin/views/core/dashboard/dashboard-admin-view";
|
|
2
|
+
import { DashboardAdminView } from "../../views/admin/views/core/dashboard/dashboard-admin-view.js";
|
|
3
3
|
export default function Page() {
|
|
4
4
|
return /*#__PURE__*/ _jsx(DashboardAdminView, {});
|
|
5
5
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { getTranslations } from "next-intl/server";
|
|
3
3
|
import React from "react";
|
|
4
|
-
import { DataTableSkeleton } from "../../../components/table/data-table";
|
|
5
|
-
import { HeaderContent } from "../../../components/ui/header-content";
|
|
6
|
-
import { UsersAdminView } from "../../../views/admin/views/core/users/users-admin-view";
|
|
4
|
+
import { DataTableSkeleton } from "../../../components/table/data-table.js";
|
|
5
|
+
import { HeaderContent } from "../../../components/ui/header-content.js";
|
|
6
|
+
import { UsersAdminView } from "../../../views/admin/views/core/users/users-admin-view.js";
|
|
7
7
|
export const generateMetadata = async ()=>{
|
|
8
8
|
const t = await getTranslations('admin.global.nav.users');
|
|
9
9
|
return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import Image from "next/image";
|
|
3
|
-
import { cn } from "../lib/utils";
|
|
3
|
+
import { cn } from "../lib/utils.js";
|
|
4
4
|
const generateLetterPhoto = (letter, color)=>`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" style="background:#${color}"><g><text text-anchor="middle" dy=".35em" x="512" y="512" fill="#ffffff" font-size="700" font-family="-apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif">${letter.toLocaleUpperCase()}</text></g></svg>`)}`;
|
|
5
5
|
export const Avatar = ({ user: { avatarColor, name }, className, size, ...props })=>{
|
|
6
6
|
return /*#__PURE__*/ _jsx(Image, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useFormatter, useNow } from "next-intl";
|
|
4
|
-
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./ui/tooltip";
|
|
4
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./ui/tooltip.js";
|
|
5
5
|
export const DateFormat = ({ date, updateInterval })=>{
|
|
6
6
|
const dateToFormat = typeof date === 'string' ? new Date(date) : date;
|
|
7
7
|
const format = useFormatter();
|
|
@@ -3,11 +3,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { zodResolver } from "@hookform/resolvers/zod";
|
|
4
4
|
import { useTranslations } from "next-intl";
|
|
5
5
|
import { useForm } from "react-hook-form";
|
|
6
|
-
import { getDefaultValues, getObjectFormSchema } from "../../lib/helpers/auto-form";
|
|
7
|
-
import { Button } from "../ui/button";
|
|
8
|
-
import { DialogClose, DialogFooter, useDialog } from "../ui/dialog";
|
|
9
|
-
import { Form } from "../ui/form";
|
|
10
|
-
import { ItemAutoForm } from "./fields/item";
|
|
6
|
+
import { getDefaultValues, getObjectFormSchema } from "../../lib/helpers/auto-form.js";
|
|
7
|
+
import { Button } from "../ui/button.js";
|
|
8
|
+
import { DialogClose, DialogFooter, useDialog } from "../ui/dialog.js";
|
|
9
|
+
import { Form } from "../ui/form.js";
|
|
10
|
+
import { ItemAutoForm } from "./fields/item.js";
|
|
11
11
|
export function AutoForm({ formSchema, onSubmit: onSubmitProp, fields, submitButtonProps, mode, ...props }) {
|
|
12
12
|
const { setIsDirty } = useDialog();
|
|
13
13
|
const objectFormSchema = getObjectFormSchema(formSchema);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from "../../../lib/utils";
|
|
2
|
+
import { cn } from "../../../lib/utils.js";
|
|
3
3
|
export const AutoFormDesc = ({ children, className, ...props })=>{
|
|
4
4
|
return /*#__PURE__*/ _jsx("p", {
|
|
5
5
|
className: cn('text-muted-foreground text-sm', className),
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Checkbox } from "../../ui/checkbox";
|
|
3
|
-
import { FormControl, FormItem, FormMessage } from "../../ui/form";
|
|
4
|
-
import { AutoFormDesc } from "../common/desc";
|
|
5
|
-
import { AutoFormLabel } from "../common/label";
|
|
2
|
+
import { Checkbox } from "../../ui/checkbox.js";
|
|
3
|
+
import { FormControl, FormItem, FormMessage } from "../../ui/form.js";
|
|
4
|
+
import { AutoFormDesc } from "../common/desc.js";
|
|
5
|
+
import { AutoFormLabel } from "../common/label.js";
|
|
6
6
|
export function AutoFormCheckbox({ label, field, // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
7
7
|
shape: _, description, ...props }) {
|
|
8
8
|
return /*#__PURE__*/ _jsxs(FormItem, {
|
|
@@ -2,14 +2,14 @@ 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
4
|
import React from "react";
|
|
5
|
-
import { Button } from "../../ui/button";
|
|
6
|
-
import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from "../../ui/command";
|
|
7
|
-
import { FormControl, FormItem, FormMessage } from "../../ui/form";
|
|
8
|
-
import { Popover, PopoverContent, PopoverTrigger } from "../../ui/popover";
|
|
9
|
-
import { getBaseSchema } from "../../../lib/helpers/auto-form";
|
|
10
|
-
import { cn } from "../../../lib/utils";
|
|
11
|
-
import { AutoFormDesc } from "../common/desc";
|
|
12
|
-
import { AutoFormLabel } from "../common/label";
|
|
5
|
+
import { Button } from "../../ui/button.js";
|
|
6
|
+
import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from "../../ui/command.js";
|
|
7
|
+
import { FormControl, FormItem, FormMessage } from "../../ui/form.js";
|
|
8
|
+
import { Popover, PopoverContent, PopoverTrigger } from "../../ui/popover.js";
|
|
9
|
+
import { getBaseSchema } from "../../../lib/helpers/auto-form.js";
|
|
10
|
+
import { cn } from "../../../lib/utils.js";
|
|
11
|
+
import { AutoFormDesc } from "../common/desc.js";
|
|
12
|
+
import { AutoFormLabel } from "../common/label.js";
|
|
13
13
|
export function AutoFormCombobox({ label, field, description, shape, // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
14
14
|
placeholder: _, className, labels = [], ...props }) {
|
|
15
15
|
const t = useTranslations('core.global');
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { FormControl, FormItem, FormMessage } from "../../ui/form";
|
|
4
|
-
import { Input } from "../../ui/input";
|
|
5
|
-
import { AutoFormDesc } from "../common/desc";
|
|
6
|
-
import { AutoFormLabel } from "../common/label";
|
|
3
|
+
import { FormControl, FormItem, FormMessage } from "../../ui/form.js";
|
|
4
|
+
import { Input } from "../../ui/input.js";
|
|
5
|
+
import { AutoFormDesc } from "../common/desc.js";
|
|
6
|
+
import { AutoFormLabel } from "../common/label.js";
|
|
7
7
|
export function AutoFormInput({ label, field, // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
8
8
|
shape: _, description, ...props }) {
|
|
9
9
|
return /*#__PURE__*/ _jsxs(FormItem, {
|