@vitnode/core 1.2.0-canary.54 → 1.2.0-canary.55
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/get-config.d.ts.map +1 -1
- package/dist/scripts/plugin.d.ts.map +1 -1
- package/dist/scripts/prepare-database.d.ts.map +1 -1
- package/dist/scripts/prepare-plugins-files.d.ts.map +1 -1
- package/dist/scripts/scripts.js +1 -1
- package/dist/scripts/shared/file-utils.d.ts.map +1 -1
- package/dist/src/api/adapters/cron/node-cron.adapter.d.ts.map +1 -1
- package/dist/src/api/adapters/sso/discord.d.ts.map +1 -1
- package/dist/src/api/adapters/sso/facebook.d.ts.map +1 -1
- package/dist/src/api/adapters/sso/google.d.ts.map +1 -1
- package/dist/src/api/config.d.ts.map +1 -1
- package/dist/src/api/config.js +2 -1
- package/dist/src/api/lib/cron.d.ts +4 -4
- package/dist/src/api/lib/cron.d.ts.map +1 -1
- package/dist/src/api/lib/logger-middleware.js +1 -1
- package/dist/src/api/lib/module.d.ts +2 -2
- package/dist/src/api/lib/module.d.ts.map +1 -1
- package/dist/src/api/lib/plugin.d.ts +1 -1
- package/dist/src/api/lib/plugin.d.ts.map +1 -1
- package/dist/src/api/lib/route.d.ts.map +1 -1
- package/dist/src/api/lib/with-pagination.d.ts +1 -1
- package/dist/src/api/lib/with-pagination.d.ts.map +1 -1
- package/dist/src/api/middlewares/cron-auth.middleware.d.ts.map +1 -1
- package/dist/src/api/middlewares/global.middleware.d.ts +6 -6
- package/dist/src/api/middlewares/global.middleware.d.ts.map +1 -1
- package/dist/src/api/middlewares/global.middleware.js +0 -1
- package/dist/src/api/models/device.d.ts.map +1 -1
- package/dist/src/api/models/device.js +1 -1
- package/dist/src/api/models/email.d.ts.map +1 -1
- package/dist/src/api/models/email.js +1 -2
- package/dist/src/api/models/session-admin.d.ts.map +1 -1
- package/dist/src/api/models/session.d.ts.map +1 -1
- package/dist/src/api/models/sso.d.ts.map +1 -1
- package/dist/src/api/models/sso.js +1 -1
- package/dist/src/api/models/user/get-user-by-id.d.ts.map +1 -1
- package/dist/src/api/models/user/sign-in-with-passwords.d.ts.map +1 -1
- package/dist/src/api/models/user/sign-up.d.ts.map +1 -1
- package/dist/src/api/models/user/sign-up.js +1 -0
- package/dist/src/api/models/user.d.ts.map +1 -1
- package/dist/src/api/modules/admin/admin.module.d.ts.map +1 -1
- package/dist/src/api/modules/admin/advanced/advanced.admin.module.d.ts.map +1 -1
- package/dist/src/api/modules/admin/advanced/cron/cron.admin.module.d.ts.map +1 -1
- package/dist/src/api/modules/admin/advanced/cron/routes/get.route.d.ts.map +1 -1
- package/dist/src/api/modules/admin/advanced/cron/routes/run.route.d.ts.map +1 -1
- package/dist/src/api/modules/cron/cron/clean.cron.d.ts.map +1 -1
- package/dist/src/api/modules/cron/cron.module.d.ts.map +1 -1
- package/dist/src/api/modules/cron/helpers/process-cron-jobs.d.ts +10 -10
- package/dist/src/api/modules/cron/helpers/process-cron-jobs.d.ts.map +1 -1
- package/dist/src/api/modules/cron/helpers/process-cron-jobs.js +3 -3
- package/dist/src/api/modules/cron/routes/cron.route.d.ts.map +1 -1
- package/dist/src/api/modules/cron/routes/cron.route.js +1 -1
- package/dist/src/app_admin/core/advanced/cron/page.d.ts.map +1 -1
- package/dist/src/app_admin/core/advanced/cron/page.js +3 -3
- package/dist/src/app_admin/core/debug/page.js +1 -1
- package/dist/src/app_admin/core/users/page.d.ts.map +1 -1
- package/dist/src/app_admin/core/users/page.js +1 -1
- package/dist/src/components/confirm-action/confirm-action-alert-dialog.js +1 -1
- package/dist/src/components/confirm-action/content.d.ts.map +1 -1
- package/dist/src/components/confirm-action/content.js +1 -0
- package/dist/src/components/form/auto-form.d.ts.map +1 -1
- package/dist/src/components/form/auto-form.js +0 -1
- package/dist/src/components/form/fields/checkbox.d.ts +1 -1
- package/dist/src/components/form/fields/checkbox.d.ts.map +1 -1
- package/dist/src/components/form/fields/combobox-async.d.ts.map +1 -1
- package/dist/src/components/form/fields/combobox.d.ts.map +1 -1
- package/dist/src/components/form/fields/input.d.ts +1 -1
- package/dist/src/components/form/fields/input.d.ts.map +1 -1
- package/dist/src/components/form/fields/select.d.ts.map +1 -1
- package/dist/src/components/form/fields/switch.js +1 -1
- package/dist/src/components/switchers/langs/language-switcher.d.ts.map +1 -1
- package/dist/src/components/table/content.d.ts.map +1 -1
- package/dist/src/components/table/data-table.d.ts +1 -1
- package/dist/src/components/table/data-table.d.ts.map +1 -1
- package/dist/src/components/table/order-table-head.d.ts.map +1 -1
- package/dist/src/components/table/pagination.js +1 -1
- package/dist/src/components/tiptap/extension.d.ts.map +1 -1
- package/dist/src/components/tiptap/extension.js +7 -0
- package/dist/src/components/tiptap/toolbar/actions/alignment-action.d.ts +2 -0
- package/dist/src/components/tiptap/toolbar/actions/alignment-action.d.ts.map +1 -0
- package/dist/src/components/tiptap/toolbar/actions/alignment-action.js +91 -0
- package/dist/src/components/tiptap/toolbar/actions/bold-action.d.ts.map +1 -1
- package/dist/src/components/tiptap/toolbar/actions/headings-action.d.ts.map +1 -1
- package/dist/src/components/tiptap/toolbar/actions/headings-action.js +45 -46
- package/dist/src/components/tiptap/toolbar/actions/italic-action.d.ts.map +1 -1
- package/dist/src/components/tiptap/toolbar/actions/list-action.d.ts.map +1 -1
- package/dist/src/components/tiptap/toolbar/actions/list-action.js +14 -13
- package/dist/src/components/tiptap/toolbar/actions/text-format-more/text-format-more.d.ts.map +1 -1
- package/dist/src/components/tiptap/toolbar/actions/text-format-more/text-format-more.js +5 -5
- package/dist/src/components/tiptap/toolbar/actions/underline-action.d.ts.map +1 -1
- package/dist/src/components/tiptap/toolbar/actions/undo-redo-actions.d.ts.map +1 -1
- package/dist/src/components/tiptap/toolbar/actions/undo-redo-actions.js +6 -6
- package/dist/src/components/tiptap/toolbar/tiptap-toolbar.d.ts.map +1 -1
- package/dist/src/components/tiptap/toolbar/tiptap-toolbar.js +38 -18
- package/dist/src/components/tiptap/toolbar/use-toolbar-editor.d.ts.map +1 -1
- package/dist/src/components/ui/accordion.d.ts +1 -1
- package/dist/src/components/ui/accordion.d.ts.map +1 -1
- package/dist/src/components/ui/alert.d.ts +1 -1
- package/dist/src/components/ui/alert.d.ts.map +1 -1
- package/dist/src/components/ui/badge.d.ts +1 -1
- package/dist/src/components/ui/badge.d.ts.map +1 -1
- package/dist/src/components/ui/button.d.ts +2 -2
- package/dist/src/components/ui/button.d.ts.map +1 -1
- package/dist/src/components/ui/checkbox.d.ts +1 -1
- package/dist/src/components/ui/checkbox.d.ts.map +1 -1
- package/dist/src/components/ui/command.d.ts +1 -1
- package/dist/src/components/ui/command.d.ts.map +1 -1
- package/dist/src/components/ui/context-menu.d.ts +1 -1
- package/dist/src/components/ui/context-menu.d.ts.map +1 -1
- package/dist/src/components/ui/drawer.d.ts.map +1 -1
- package/dist/src/components/ui/dropdown-menu.d.ts +1 -1
- package/dist/src/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/src/components/ui/editor-content.js +1 -1
- package/dist/src/components/ui/editor.d.ts.map +1 -1
- package/dist/src/components/ui/editor.js +1 -1
- package/dist/src/components/ui/form.d.ts.map +1 -1
- package/dist/src/components/ui/hover-card.d.ts +1 -1
- package/dist/src/components/ui/hover-card.d.ts.map +1 -1
- package/dist/src/components/ui/label.d.ts +1 -1
- package/dist/src/components/ui/label.d.ts.map +1 -1
- package/dist/src/components/ui/menubar.d.ts +1 -1
- package/dist/src/components/ui/menubar.d.ts.map +1 -1
- package/dist/src/components/ui/navigation-menu.d.ts +1 -1
- package/dist/src/components/ui/navigation-menu.d.ts.map +1 -1
- package/dist/src/components/ui/popover.d.ts +1 -1
- package/dist/src/components/ui/popover.d.ts.map +1 -1
- package/dist/src/components/ui/progress.d.ts +1 -1
- package/dist/src/components/ui/progress.d.ts.map +1 -1
- package/dist/src/components/ui/radio-group.d.ts +1 -1
- package/dist/src/components/ui/radio-group.d.ts.map +1 -1
- package/dist/src/components/ui/scroll-area.d.ts +6 -0
- package/dist/src/components/ui/scroll-area.d.ts.map +1 -0
- package/dist/src/components/ui/scroll-area.js +33 -0
- package/dist/src/components/ui/select.d.ts +1 -1
- package/dist/src/components/ui/select.d.ts.map +1 -1
- package/dist/src/components/ui/separator.d.ts +1 -1
- package/dist/src/components/ui/separator.d.ts.map +1 -1
- package/dist/src/components/ui/sheet.d.ts +1 -1
- package/dist/src/components/ui/sheet.d.ts.map +1 -1
- package/dist/src/components/ui/sidebar.d.ts.map +1 -1
- package/dist/src/components/ui/sidebar.js +0 -1
- package/dist/src/components/ui/sonner.d.ts.map +1 -1
- package/dist/src/components/ui/switch.d.ts +1 -1
- package/dist/src/components/ui/switch.d.ts.map +1 -1
- package/dist/src/components/ui/tabs.d.ts +1 -1
- package/dist/src/components/ui/tabs.d.ts.map +1 -1
- package/dist/src/components/ui/toggle-group.d.ts.map +1 -1
- package/dist/src/components/ui/toggle.d.ts +1 -1
- package/dist/src/components/ui/toggle.d.ts.map +1 -1
- package/dist/src/components/ui/toggle.js +1 -1
- package/dist/src/components/ui/tooltip.d.ts +1 -1
- package/dist/src/components/ui/tooltip.d.ts.map +1 -1
- package/dist/src/drizzle.config.d.ts.map +1 -1
- package/dist/src/drizzle.config.js +1 -1
- package/dist/src/emails/default-template.d.ts.map +1 -1
- package/dist/src/emails/default-template.js +20 -21
- package/dist/src/hooks/use-captcha.d.ts +20 -0
- package/dist/src/hooks/use-captcha.d.ts.map +1 -1
- package/dist/src/hooks/use-captcha.js +19 -18
- package/dist/src/hooks/use-mobile.d.ts.map +1 -1
- package/dist/src/hooks/use-mobile.js +1 -0
- package/dist/src/lib/api/get-next-cron-run-date.d.ts.map +1 -1
- package/dist/src/lib/api/get-next-cron-run-date.js +2 -2
- package/dist/src/lib/api/should-cron-job-run.d.ts.map +1 -1
- package/dist/src/lib/api/should-cron-job-run.js +2 -2
- package/dist/src/lib/config.js +1 -1
- package/dist/src/lib/ctrl-or-command-character.d.ts +1 -1
- package/dist/src/lib/ctrl-or-command-character.d.ts.map +1 -1
- package/dist/src/lib/ctrl-or-command-character.js +2 -6
- package/dist/src/lib/fetcher/cookie-from-string-to-object.d.ts.map +1 -1
- package/dist/src/lib/fetcher/core.d.ts.map +1 -1
- package/dist/src/lib/fetcher/core.js +1 -2
- package/dist/src/lib/fetcher-client.d.ts.map +1 -1
- package/dist/src/lib/fetcher.d.ts.map +1 -1
- package/dist/src/lib/helpers/auto-form.d.ts.map +1 -1
- package/dist/src/lib/helpers/auto-form.js +0 -1
- package/dist/src/lib/navigation.d.ts +1 -1
- package/dist/src/lib/navigation.d.ts.map +1 -1
- package/dist/src/lib/tiptap/toolbar/actions/bold-action.d.ts +1 -0
- package/dist/src/lib/tiptap/toolbar/actions/bold-action.d.ts.map +1 -0
- package/dist/src/lib/tiptap/toolbar/actions/bold-action.js +0 -0
- package/dist/src/views/admin/layouts/admin-layout.d.ts.map +1 -1
- package/dist/src/views/admin/layouts/admin-layout.js +4 -1
- package/dist/src/views/admin/layouts/user-bar/user-bar.d.ts.map +1 -1
- package/dist/src/views/admin/views/core/advanced/cron/cron-table-view.d.ts.map +1 -1
- package/dist/src/views/admin/views/core/advanced/cron/cron-table-view.js +4 -4
- package/dist/src/views/admin/views/core/advanced/cron/run-action/mutation-api.d.ts.map +1 -1
- package/dist/src/views/admin/views/core/advanced/cron/run-action/run-action.d.ts.map +1 -1
- package/dist/src/views/admin/views/core/advanced/cron/run-action/run-action.js +4 -3
- package/dist/src/views/admin/views/core/debug/system-logs/actions/more/content.d.ts.map +1 -1
- package/dist/src/views/admin/views/core/debug/system-logs/actions/more/more.js +1 -1
- package/dist/src/views/admin/views/core/test.js +1 -1
- package/dist/src/views/auth/password-reset/change-password-form/use-form.d.ts.map +1 -1
- package/dist/src/views/auth/password-reset/form/form.d.ts.map +1 -1
- package/dist/src/views/auth/sign-in/form/mutation-api.d.ts.map +1 -1
- package/dist/src/views/auth/sign-up/components/password-input.d.ts.map +1 -1
- package/dist/src/views/auth/sign-up/components/password-input.js +2 -1
- package/dist/src/views/auth/sign-up/form/form.d.ts.map +1 -1
- package/dist/src/views/auth/sign-up/form/mutation-api.d.ts.map +1 -1
- package/dist/src/views/auth/sign-up/wrapper.d.ts.map +1 -1
- package/dist/src/views/auth/sign-up/wrapper.js +6 -3
- package/dist/src/views/auth/sso/callback/client/client.d.ts.map +1 -1
- package/dist/src/views/error/global-error-view.d.ts.map +1 -1
- package/dist/src/views/error/global-error-view.js +2 -1
- package/dist/src/views/layouts/provider.d.ts.map +1 -1
- package/dist/src/views/layouts/root-layout.d.ts.map +1 -1
- package/dist/src/views/layouts/theme/header/header.d.ts.map +1 -1
- package/dist/src/views/layouts/theme/header/user/auth/client.d.ts.map +1 -1
- package/dist/src/vitnode.config.d.ts +1 -1
- package/dist/src/vitnode.config.d.ts.map +1 -1
- package/dist/src/vitnode.config.js +0 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/eslint.config.mjs +17 -0
- package/package.json +7 -3
- package/src/app_admin/core/advanced/cron/page.tsx +3 -2
- package/src/app_admin/core/debug/page.tsx +1 -1
- package/src/app_admin/core/users/page.tsx +2 -1
- package/src/locales/en.json +8 -0
- package/src/tiptap.css +9 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import crypto from "node:crypto";
|
|
2
1
|
import { and, eq } from "drizzle-orm";
|
|
3
2
|
import { deleteCookie, getCookie, setCookie } from "hono/cookie";
|
|
4
3
|
import { HTTPException } from "hono/http-exception";
|
|
4
|
+
import crypto from "node:crypto";
|
|
5
5
|
import { core_users, core_users_sso } from "../../database/users.js";
|
|
6
6
|
import { CONFIG } from "../../lib/config.js";
|
|
7
7
|
import { removeSpecialCharacters } from "../../lib/special-characters.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-user-by-id.d.ts","sourceRoot":"","sources":["../../../../../src/api/models/user/get-user-by-id.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-user-by-id.d.ts","sourceRoot":"","sources":["../../../../../src/api/models/user/get-user-by-id.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAMpC,eAAO,MAAM,WAAW,GAAU,WAAW;IAAE,CAAC,EAAE,OAAO,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE;;;;;;;;;;;;SAsBtE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sign-in-with-passwords.d.ts","sourceRoot":"","sources":["../../../../../src/api/models/user/sign-in-with-passwords.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sign-in-with-passwords.d.ts","sourceRoot":"","sources":["../../../../../src/api/models/user/sign-in-with-passwords.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AASpC,eAAO,MAAM,kBAAkB,GAAU,yBAItC;IACD,CAAC,EAAE,OAAO,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;;;EA0BA,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sign-up.d.ts","sourceRoot":"","sources":["../../../../../src/api/models/user/sign-up.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sign-up.d.ts","sourceRoot":"","sources":["../../../../../src/api/models/user/sign-up.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAiEpC,eAAO,MAAM,MAAM,GACjB,8CAKG;IACD,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,EACD,GAAG,OAAO;;;;;;;;;;;;;EAwDX,CAAC"}
|
|
@@ -67,6 +67,7 @@ export const signUp = async ({ email, name, newsletter, hashedPassword }, c)=>{
|
|
|
67
67
|
emailVerified,
|
|
68
68
|
ipAddress: c.get("ipAddress")
|
|
69
69
|
}).returning();
|
|
70
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
70
71
|
const { password: _, ...user } = data;
|
|
71
72
|
return user;
|
|
72
73
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../../src/api/models/user.ts"],"names":[],"mappings":"AAIA,qBAAa,SAAS;IACpB,WAAW;;;;;;;;;;;;;;;cAAe;IAC1B,kBAAkB;;;;;;;OAAsB;IACxC,MAAM;;;;
|
|
1
|
+
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../../src/api/models/user.ts"],"names":[],"mappings":"AAIA,qBAAa,SAAS;IACpB,WAAW;;;;;;;;;;;;;;;cAAe;IAC1B,kBAAkB;;;;;;;OAAsB;IACxC,MAAM;;;;kBAEs3C,CAAC;;;;;;;;;;;;;;OAF72C;CACjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin.module.d.ts","sourceRoot":"","sources":["../../../../../src/api/modules/admin/admin.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"admin.module.d.ts","sourceRoot":"","sources":["../../../../../src/api/modules/admin/admin.module.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oQAMtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"advanced.admin.module.d.ts","sourceRoot":"","sources":["../../../../../../src/api/modules/admin/advanced/advanced.admin.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"advanced.admin.module.d.ts","sourceRoot":"","sources":["../../../../../../src/api/modules/admin/advanced/advanced.admin.module.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sQAK9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cron.admin.module.d.ts","sourceRoot":"","sources":["../../../../../../../src/api/modules/admin/advanced/cron/cron.admin.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cron.admin.module.d.ts","sourceRoot":"","sources":["../../../../../../../src/api/modules/admin/advanced/cron/cron.admin.module.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sQAI1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get.route.d.ts","sourceRoot":"","sources":["../../../../../../../../src/api/modules/admin/advanced/cron/routes/get.route.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"get.route.d.ts","sourceRoot":"","sources":["../../../../../../../../src/api/modules/admin/advanced/cron/routes/get.route.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAWpB,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+DxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.route.d.ts","sourceRoot":"","sources":["../../../../../../../../src/api/modules/admin/advanced/cron/routes/run.route.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"run.route.d.ts","sourceRoot":"","sources":["../../../../../../../../src/api/modules/admin/advanced/cron/routes/run.route.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0GvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clean.cron.d.ts","sourceRoot":"","sources":["../../../../../../src/api/modules/cron/cron/clean.cron.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"clean.cron.d.ts","sourceRoot":"","sources":["../../../../../../src/api/modules/cron/cron/clean.cron.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,SAAS,0CA0BpB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cron.module.d.ts","sourceRoot":"","sources":["../../../../../src/api/modules/cron/cron.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cron.module.d.ts","sourceRoot":"","sources":["../../../../../src/api/modules/cron/cron.module.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;gQAKrB,CAAC"}
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
import type { PostgresJsDatabase } from "drizzle-orm/postgres-js";
|
|
2
2
|
import type { CronJobConfig } from "../../../../api/lib/cron";
|
|
3
3
|
interface CronJobFromDb {
|
|
4
|
+
createdAt: Date;
|
|
5
|
+
description: null | string;
|
|
4
6
|
id: number;
|
|
5
|
-
name: string;
|
|
6
|
-
description: string | null;
|
|
7
7
|
lastRun: Date | null;
|
|
8
|
+
module: string;
|
|
9
|
+
name: string;
|
|
8
10
|
nextRun: Date | null;
|
|
9
|
-
createdAt: Date;
|
|
10
11
|
pluginId: string;
|
|
11
|
-
module: string;
|
|
12
12
|
schedule: string;
|
|
13
13
|
}
|
|
14
|
-
export declare function cleanupOutdatedCronJobs(db: PostgresJsDatabase
|
|
14
|
+
export declare function cleanupOutdatedCronJobs(db: PostgresJsDatabase, cronFromDb: CronJobFromDb[], currentCronJobs: CronJobConfig[]): Promise<void>;
|
|
15
15
|
export declare function processCronJobs(cronJobs: CronJobConfig[], cronFromDb: CronJobFromDb[]): {
|
|
16
16
|
newJobs: CronJobConfig[];
|
|
17
17
|
jobsToExecute: CronJobConfig[];
|
|
18
18
|
jobsToUpdate: {
|
|
19
|
-
job: CronJobConfig;
|
|
20
|
-
existingJob: CronJobFromDb;
|
|
21
19
|
changes: {
|
|
22
20
|
description?: boolean;
|
|
23
21
|
schedule?: boolean;
|
|
24
22
|
};
|
|
23
|
+
existingJob: CronJobFromDb;
|
|
24
|
+
job: CronJobConfig;
|
|
25
25
|
}[];
|
|
26
26
|
};
|
|
27
|
-
export declare function updateCronJobs(db: PostgresJsDatabase
|
|
28
|
-
job: CronJobConfig;
|
|
29
|
-
existingJob: CronJobFromDb;
|
|
27
|
+
export declare function updateCronJobs(db: PostgresJsDatabase, jobsToUpdate: {
|
|
30
28
|
changes: {
|
|
31
29
|
description?: boolean;
|
|
32
30
|
schedule?: boolean;
|
|
33
31
|
};
|
|
32
|
+
existingJob: CronJobFromDb;
|
|
33
|
+
job: CronJobConfig;
|
|
34
34
|
}[]): Promise<void>;
|
|
35
35
|
export {};
|
|
36
36
|
//# sourceMappingURL=process-cron-jobs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process-cron-jobs.d.ts","sourceRoot":"","sources":["../../../../../../src/api/modules/cron/helpers/process-cron-jobs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"process-cron-jobs.d.ts","sourceRoot":"","sources":["../../../../../../src/api/modules/cron/helpers/process-cron-jobs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAKlE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAKpD,UAAU,aAAa;IACrB,SAAS,EAAE,IAAI,CAAC;IAChB,WAAW,EAAE,IAAI,GAAG,MAAM,CAAC;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,IAAI,GAAG,IAAI,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,IAAI,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB;AA6BD,wBAAsB,uBAAuB,CAC3C,EAAE,EAAE,kBAAkB,EACtB,UAAU,EAAE,aAAa,EAAE,EAC3B,eAAe,EAAE,aAAa,EAAE,iBAoBjC;AAED,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,aAAa,EAAE,EACzB,UAAU,EAAE,aAAa,EAAE;;;;iBAKhB;YAAE,WAAW,CAAC,EAAE,OAAO,CAAC;YAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;SAAE;qBACzC,aAAa;aACrB,aAAa;;EA6BrB;AAED,wBAAsB,cAAc,CAClC,EAAE,EAAE,kBAAkB,EACtB,YAAY,EAAE;IACZ,OAAO,EAAE;QAAE,WAAW,CAAC,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IACvD,WAAW,EAAE,aAAa,CAAC;IAC3B,GAAG,EAAE,aAAa,CAAC;CACpB,EAAE,iBAyBJ"}
|
|
@@ -29,7 +29,7 @@ export function processCronJobs(cronJobs, cronFromDb) {
|
|
|
29
29
|
const jobsToUpdate = [];
|
|
30
30
|
for (const job of cronJobs){
|
|
31
31
|
if (!validate(job.schedule)) {
|
|
32
|
-
//
|
|
32
|
+
// eslint-disable-next-line no-console
|
|
33
33
|
console.warn(`\x1b[34m[VitNode]\x1b[0m \x1b[33mInvalid cron schedule for job "${job.pluginId}:${job.module}:${job.name}"\x1b[0m: ${job.schedule}`);
|
|
34
34
|
continue;
|
|
35
35
|
}
|
|
@@ -46,7 +46,7 @@ export function processCronJobs(cronJobs, cronFromDb) {
|
|
|
46
46
|
} else {
|
|
47
47
|
newJobs.push(job);
|
|
48
48
|
}
|
|
49
|
-
if (shouldCronJobRun(job.schedule, existingJob?.lastRun
|
|
49
|
+
if (shouldCronJobRun(job.schedule, existingJob?.lastRun ?? null)) {
|
|
50
50
|
jobsToExecute.push(job);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
@@ -61,7 +61,7 @@ export async function updateCronJobs(db, jobsToUpdate) {
|
|
|
61
61
|
const updatePromises = jobsToUpdate.map(({ job, existingJob, changes })=>{
|
|
62
62
|
const updateData = {};
|
|
63
63
|
if (changes.description) {
|
|
64
|
-
updateData.description = job.description
|
|
64
|
+
updateData.description = job.description ?? null;
|
|
65
65
|
}
|
|
66
66
|
if (changes.schedule) {
|
|
67
67
|
updateData.schedule = job.schedule;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cron.route.d.ts","sourceRoot":"","sources":["../../../../../../src/api/modules/cron/routes/cron.route.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"cron.route.d.ts","sourceRoot":"","sources":["../../../../../../src/api/modules/cron/routes/cron.route.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAcxB,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;CA4GvB,CAAC"}
|
|
@@ -42,7 +42,7 @@ export const runCronRoute = buildRoute({
|
|
|
42
42
|
try {
|
|
43
43
|
const newJobsValues = newJobs.map((job)=>({
|
|
44
44
|
name: job.name,
|
|
45
|
-
description: job.description
|
|
45
|
+
description: job.description ?? null,
|
|
46
46
|
lastRun: null,
|
|
47
47
|
nextRun: null,
|
|
48
48
|
pluginId: job.pluginId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../../src/app_admin/core/advanced/cron/page.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../../src/app_admin/core/advanced/cron/page.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,QAAA,MAAM,aAAa;;EAMlB,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;EAO5B,CAAC;AAEF,wBAA8B,IAAI,CAChC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,aAAa,CAAC,oDAelD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import dynamic from "next/dynamic";
|
|
3
2
|
import { getTranslations } from "next-intl/server";
|
|
3
|
+
import dynamic from "next/dynamic";
|
|
4
4
|
import React from "react";
|
|
5
5
|
import { I18nProvider } from "../../../../components/i18n-provider.js";
|
|
6
6
|
import { DataTableSkeleton } from "../../../../components/table/data-table.js";
|
|
@@ -25,8 +25,8 @@ export default async function Page(props) {
|
|
|
25
25
|
className: "p-4",
|
|
26
26
|
children: [
|
|
27
27
|
/*#__PURE__*/ _jsx(HeaderContent, {
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
desc: t("desc"),
|
|
29
|
+
h1: t("title")
|
|
30
30
|
}),
|
|
31
31
|
/*#__PURE__*/ _jsx(React.Suspense, {
|
|
32
32
|
fallback: /*#__PURE__*/ _jsx(DataTableSkeleton, {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import dynamic from "next/dynamic";
|
|
3
2
|
import { getTranslations } from "next-intl/server";
|
|
3
|
+
import dynamic from "next/dynamic";
|
|
4
4
|
import React from "react";
|
|
5
5
|
import { I18nProvider } from "../../../components/i18n-provider.js";
|
|
6
6
|
import { DataTableSkeleton } from "../../../components/table/data-table.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../src/app_admin/core/users/page.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../src/app_admin/core/users/page.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAIhD,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,QAAA,MAAM,cAAc;;EAInB,CAAC;AAEF,eAAO,MAAM,gBAAgB,QAAa,OAAO,CAAC,QAAQ,CAMzD,CAAC;AAEF,wBAA8B,IAAI,CAChC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,oDAgBnD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import dynamic from "next/dynamic";
|
|
3
2
|
import { getTranslations } from "next-intl/server";
|
|
3
|
+
import dynamic from "next/dynamic";
|
|
4
4
|
import React from "react";
|
|
5
5
|
import { DataTableSkeleton } from "../../../components/table/data-table.js";
|
|
6
6
|
import { HeaderContent } from "../../../components/ui/header-content.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import dynamic from "next/dynamic";
|
|
4
3
|
import { useTranslations } from "next-intl";
|
|
4
|
+
import dynamic from "next/dynamic";
|
|
5
5
|
import React from "react";
|
|
6
6
|
import { AlertDialog, AlertDialogContent, AlertDialogDescription, AlertDialogFooterSkeleton, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from "../ui/alert-dialog.js";
|
|
7
7
|
const ContentConfirmAction = dynamic(async ()=>import("./content.js").then((module)=>({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../../src/components/confirm-action/content.tsx"],"names":[],"mappings":"AAUA,eAAO,MAAM,oBAAoB,GAAI,2BAGlC;IACD,QAAQ,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACnE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,
|
|
1
|
+
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../../src/components/confirm-action/content.tsx"],"names":[],"mappings":"AAUA,eAAO,MAAM,oBAAoB,GAAI,2BAGlC;IACD,QAAQ,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACnE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,4CAmBA,CAAC"}
|
|
@@ -6,6 +6,7 @@ import { Button } from "../ui/button.js";
|
|
|
6
6
|
export const ContentConfirmAction = ({ onSubmit, textSubmit })=>{
|
|
7
7
|
const t = useTranslations("core.global.confirm_action");
|
|
8
8
|
const { setOpen } = useAlertDialog();
|
|
9
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
9
10
|
const [_, formAction, isLoading] = React.useActionState(async ()=>{
|
|
10
11
|
await onSubmit({
|
|
11
12
|
onClose: ()=>setOpen?.(false)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auto-form.d.ts","sourceRoot":"","sources":["../../../../src/components/form/auto-form.tsx"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,IAAI,
|
|
1
|
+
{"version":3,"file":"auto-form.d.ts","sourceRoot":"","sources":["../../../../src/components/form/auto-form.tsx"],"names":[],"mappings":"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"}
|
|
@@ -64,7 +64,6 @@ export function AutoForm({ formSchema, mode, onSubmit: onSubmitProp, captcha, fi
|
|
|
64
64
|
if (!item.component) return null;
|
|
65
65
|
return /*#__PURE__*/ _jsx(FormField, {
|
|
66
66
|
name: item.id,
|
|
67
|
-
// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: <needed>
|
|
68
67
|
render: ({ field })=>{
|
|
69
68
|
return /*#__PURE__*/ _jsx(_Fragment, {
|
|
70
69
|
children: item.component({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Checkbox } from "../../ui/checkbox";
|
|
2
1
|
import type { ItemAutoFormComponentProps } from "../auto-form";
|
|
2
|
+
import { Checkbox } from "../../ui/checkbox";
|
|
3
3
|
export declare const AutoFormCheckbox: ({ label, labelRight, description, otherProps: { isOptional }, field, ...props }: ItemAutoFormComponentProps & Omit<React.ComponentProps<typeof Checkbox>, "checked">) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
//# sourceMappingURL=checkbox.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/fields/checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/fields/checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAE/D,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAK7C,eAAO,MAAM,gBAAgB,GAAI,iFAO9B,0BAA0B,GAC3B,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,EAAE,SAAS,CAAC,4CA4BvD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox-async.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/fields/combobox-async.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAiBhD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"combobox-async.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/fields/combobox-async.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAiBhD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAM/D,eAAO,MAAM,qBAAqB,GAAI,2IAYnC,0BAA0B,GAC3B,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC,GAAG;IAC9D,SAAS,EAAE,CAAC,MAAM,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,KAClC,OAAO,CACL;QACE,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;KACf,EAAE,CACJ,GACD;QACE,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;KACf,EAAE,CAAC;IACR,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,4CAsGF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/fields/combobox.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"combobox.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/fields/combobox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAiBhD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAK/D,eAAO,MAAM,gBAAgB,GAAI,sJAW9B,0BAA0B,GAC3B,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC,GAAG;IAC9D,MAAM,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,4CA6EF,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Input } from "../../ui/input";
|
|
2
1
|
import type { ItemAutoFormComponentProps } from "../auto-form";
|
|
2
|
+
import { Input } from "../../ui/input";
|
|
3
3
|
export declare const AutoFormInput: ({ label, labelRight, description, otherProps: { isOptional, maxLength, minLength, pattern, type }, field, ...props }: ItemAutoFormComponentProps & Omit<React.ComponentProps<typeof Input>, "value">) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
//# sourceMappingURL=input.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/fields/input.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/fields/input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAG/D,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAIvC,eAAO,MAAM,aAAa,GAAI,sHAO3B,0BAA0B,GAC3B,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,KAAK,CAAC,EAAE,OAAO,CAAC,4CAgClD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/fields/select.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/fields/select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EACL,MAAM,EAKP,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAK/D,eAAO,MAAM,cAAc,GAAI,wHAS5B,0BAA0B,GAC3B,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,EAAE,OAAO,CAAC,GAAG;IACnD,MAAM,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,4CAwDF,CAAC"}
|
|
@@ -7,7 +7,7 @@ export const AutoFormSwitch = ({ label, field, labelRight, otherProps: { isOptio
|
|
|
7
7
|
return /*#__PURE__*/ _jsxs(FormItem, {
|
|
8
8
|
className: "flex flex-row items-center justify-between rounded-lg border p-4",
|
|
9
9
|
children: [
|
|
10
|
-
(label
|
|
10
|
+
(label ?? description) && /*#__PURE__*/ _jsxs("div", {
|
|
11
11
|
className: "space-y-0.5",
|
|
12
12
|
children: [
|
|
13
13
|
label && /*#__PURE__*/ _jsx(AutoFormLabel, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"language-switcher.d.ts","sourceRoot":"","sources":["../../../../../src/components/switchers/langs/language-switcher.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"language-switcher.d.ts","sourceRoot":"","sources":["../../../../../src/components/switchers/langs/language-switcher.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAYrD,eAAO,MAAM,gBAAgB,GAAI,aAAa;IAAE,OAAO,EAAE,YAAY,EAAE,CAAA;CAAE,4CAwCxE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../../src/components/table/content.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../../src/components/table/content.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAc7D,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,aAAa,EAAE,EACxD,OAAO,EACP,KAAK,EACL,QAAQ,EACR,KAAK,EACL,uBAAuB,EACvB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC,2CAkF3C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-table.d.ts","sourceRoot":"","sources":["../../../../src/components/table/data-table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"data-table.d.ts","sourceRoot":"","sources":["../../../../src/components/table/data-table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAIxD,OAAO,EACL,KAAK,EAKN,MAAM,aAAa,CAAC;AAGrB,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,qBAAqB,CAAC,CAAC,GAAG,OAAO;IAChD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC;CACnB;AAED,eAAO,MAAM,iBAAiB,GAAI,aAAa;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,4CAqDjE,CAAC;AAEF,wBAAgB,SAAS,CAAC,CAAC,SAAS,aAAa,EAC/C,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,KAAK,CAAC,EAAE,SAAS,CAAC,GACxD,KAAK,CAAC,cAAc,CAAC,OAAO,mBAAmB,CAAC,GAAG;IACjD,OAAO,EAAE;QACP,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE;YAAE,OAAO,EAAE,CAAC,EAAE,CAAC;YAAC,GAAG,EAAE,CAAC,CAAA;SAAE,KAAK,KAAK,CAAC,SAAS,CAAC;QAC3D,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,EAAE,EAAE,SAAS,GAAG,MAAM,CAAC,CAAC;QACxB,KAAK,EAAE,MAAM,CAAC;KACf,EAAE,CAAC;IACJ,uBAAuB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1C,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,KAAK,EAAE;QACL,OAAO,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;QACtB,YAAY,EAAE;YACZ,MAAM,EAAE,MAAM,CAAC,CAAC;YAChB,KAAK,EAAE,KAAK,GAAG,MAAM,CAAC;SACvB,CAAC;KACH,CAAC;CACH,2CAOJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"order-table-head.d.ts","sourceRoot":"","sources":["../../../../src/components/table/order-table-head.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"order-table-head.d.ts","sourceRoot":"","sources":["../../../../src/components/table/order-table-head.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAK7D,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,aAAa,EAAE,EAC/D,EAAE,EACF,QAAQ,EACR,KAAK,EAAE,EAAE,YAAY,EAAE,GACxB,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,GAAG;IAC5D,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;CACnE,2CA8CA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
|
|
4
|
-
import { useSearchParams } from "next/navigation";
|
|
5
4
|
import { useTranslations } from "next-intl";
|
|
5
|
+
import { useSearchParams } from "next/navigation";
|
|
6
6
|
import React from "react";
|
|
7
7
|
import { usePathname, useRouter } from "../../lib/navigation.js";
|
|
8
8
|
import { Button } from "../ui/button.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extension.d.ts","sourceRoot":"","sources":["../../../../src/components/tiptap/extension.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"extension.d.ts","sourceRoot":"","sources":["../../../../src/components/tiptap/extension.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAKhD,eAAO,MAAM,yBAAyB,uBAAwB,CAAC;AAE/D,eAAO,MAAM,gBAAgB,EAAE,UAmB9B,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import TextAlign from "@tiptap/extension-text-align";
|
|
1
2
|
import StarterKit from "@tiptap/starter-kit";
|
|
2
3
|
export const SUPPORTED_HEADINGS_LEVELS = [
|
|
3
4
|
1,
|
|
@@ -22,5 +23,11 @@ export const tiptapExtensions = [
|
|
|
22
23
|
...SUPPORTED_HEADINGS_LEVELS
|
|
23
24
|
]
|
|
24
25
|
}
|
|
26
|
+
}),
|
|
27
|
+
TextAlign.configure({
|
|
28
|
+
types: [
|
|
29
|
+
"heading",
|
|
30
|
+
"paragraph"
|
|
31
|
+
]
|
|
25
32
|
})
|
|
26
33
|
];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alignment-action.d.ts","sourceRoot":"","sources":["../../../../../../src/components/tiptap/toolbar/actions/alignment-action.tsx"],"names":[],"mappings":"AAuBA,eAAO,MAAM,eAAe,+CA2E3B,CAAC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEditorState } from "@tiptap/react";
|
|
3
|
+
import { AlignCenterIcon, AlignJustifyIcon, AlignLeftIcon, AlignRightIcon, ChevronDown } from "lucide-react";
|
|
4
|
+
import { useTranslations } from "next-intl";
|
|
5
|
+
import { Button } from "../../../ui/button.js";
|
|
6
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuShortcut, DropdownMenuTrigger } from "../../../ui/dropdown-menu.js";
|
|
7
|
+
import { CtrlOrCommandCharacter } from "../../../../lib/ctrl-or-command-character.js";
|
|
8
|
+
import { useToolbarEditor } from "../use-toolbar-editor.js";
|
|
9
|
+
export const AlignmentAction = ()=>{
|
|
10
|
+
const t = useTranslations("core.global.editor");
|
|
11
|
+
const { editor } = useToolbarEditor();
|
|
12
|
+
const activeValue = useEditorState({
|
|
13
|
+
editor,
|
|
14
|
+
selector: (ctx)=>{
|
|
15
|
+
return [
|
|
16
|
+
"left",
|
|
17
|
+
"center",
|
|
18
|
+
"right",
|
|
19
|
+
"justify"
|
|
20
|
+
].find((align)=>ctx.editor.isActive({
|
|
21
|
+
textAlign: align
|
|
22
|
+
})) ?? "left";
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
const alignments = [
|
|
26
|
+
{
|
|
27
|
+
label: t("alignments.left"),
|
|
28
|
+
value: "left",
|
|
29
|
+
icon: /*#__PURE__*/ _jsx(AlignLeftIcon, {}),
|
|
30
|
+
shortcut: "L"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
label: t("alignments.center"),
|
|
34
|
+
value: "center",
|
|
35
|
+
icon: /*#__PURE__*/ _jsx(AlignCenterIcon, {}),
|
|
36
|
+
shortcut: "E"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
label: t("alignments.right"),
|
|
40
|
+
value: "right",
|
|
41
|
+
icon: /*#__PURE__*/ _jsx(AlignRightIcon, {}),
|
|
42
|
+
shortcut: "R"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
label: t("alignments.justify"),
|
|
46
|
+
value: "justify",
|
|
47
|
+
icon: /*#__PURE__*/ _jsx(AlignJustifyIcon, {}),
|
|
48
|
+
shortcut: "J"
|
|
49
|
+
}
|
|
50
|
+
];
|
|
51
|
+
const activeAlignment = alignments.find((a)=>a.value === activeValue) ?? alignments[0];
|
|
52
|
+
return /*#__PURE__*/ _jsxs(DropdownMenu, {
|
|
53
|
+
children: [
|
|
54
|
+
/*#__PURE__*/ _jsx(DropdownMenuTrigger, {
|
|
55
|
+
asChild: true,
|
|
56
|
+
children: /*#__PURE__*/ _jsxs(Button, {
|
|
57
|
+
className: "w-40 justify-between",
|
|
58
|
+
variant: "ghost",
|
|
59
|
+
children: [
|
|
60
|
+
activeAlignment.icon,
|
|
61
|
+
t(`alignments.${activeAlignment.value}`),
|
|
62
|
+
/*#__PURE__*/ _jsx(ChevronDown, {
|
|
63
|
+
className: "ml-auto"
|
|
64
|
+
})
|
|
65
|
+
]
|
|
66
|
+
})
|
|
67
|
+
}),
|
|
68
|
+
/*#__PURE__*/ _jsx(DropdownMenuContent, {
|
|
69
|
+
className: "min-w-[16rem]",
|
|
70
|
+
children: /*#__PURE__*/ _jsx(DropdownMenuRadioGroup, {
|
|
71
|
+
value: activeAlignment.value,
|
|
72
|
+
children: alignments.map((item)=>/*#__PURE__*/ _jsxs(DropdownMenuRadioItem, {
|
|
73
|
+
onClick: ()=>editor.chain().focus().setTextAlign(item.value).run(),
|
|
74
|
+
value: item.value,
|
|
75
|
+
children: [
|
|
76
|
+
item.icon,
|
|
77
|
+
t(`alignments.${item.value}`),
|
|
78
|
+
/*#__PURE__*/ _jsxs(DropdownMenuShortcut, {
|
|
79
|
+
children: [
|
|
80
|
+
/*#__PURE__*/ _jsx(CtrlOrCommandCharacter, {}),
|
|
81
|
+
"+Shift+",
|
|
82
|
+
item.shortcut
|
|
83
|
+
]
|
|
84
|
+
})
|
|
85
|
+
]
|
|
86
|
+
}, item.value))
|
|
87
|
+
})
|
|
88
|
+
})
|
|
89
|
+
]
|
|
90
|
+
});
|
|
91
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bold-action.d.ts","sourceRoot":"","sources":["../../../../../../src/components/tiptap/toolbar/actions/bold-action.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bold-action.d.ts","sourceRoot":"","sources":["../../../../../../src/components/tiptap/toolbar/actions/bold-action.tsx"],"names":[],"mappings":"AAUA,eAAO,MAAM,UAAU,+CA+BtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"headings-action.d.ts","sourceRoot":"","sources":["../../../../../../src/components/tiptap/toolbar/actions/headings-action.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"headings-action.d.ts","sourceRoot":"","sources":["../../../../../../src/components/tiptap/toolbar/actions/headings-action.tsx"],"names":[],"mappings":"AAiCA,eAAO,MAAM,cAAc,+CAuE1B,CAAC"}
|