adminizer 4.6.0-build.219 → 4.6.0

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.
Files changed (32) hide show
  1. package/assets/{add-hHMUzxu4.js → add-BlvzWQKF.js} +1 -1
  2. package/assets/{add-group-C0Vu2voe.js → add-group-1Uoq9NWe.js} +1 -1
  3. package/assets/{add-user-BLcJ_RpR.js → add-user-BQCAsaRy.js} +1 -1
  4. package/assets/{app-layout-CT2IA-Qm.js → app-layout-CAm60qoE.js} +1 -1
  5. package/assets/{app-sidebar-fwA94nGO.js → app-sidebar-CfaYbnSy.js} +1 -1
  6. package/assets/app.js +2 -2
  7. package/assets/{catalog-CESwM1aJ.js → catalog-k5myk7fk.js} +1 -1
  8. package/assets/{dashboard-Dy2bgnIr.js → dashboard-BkL9ybBw.js} +1 -1
  9. package/assets/{form--rZJFrGO.js → form-DJapG3qF.js} +1 -1
  10. package/assets/{history-BIqkGcpy.js → history-CluyR-yJ.js} +1 -1
  11. package/assets/{home-DATbVs_r.js → home-Dug9zBzM.js} +2 -2
  12. package/assets/{list-BF_6CeDP.js → list-CuexshNt.js} +1 -1
  13. package/assets/manifest.json +26 -26
  14. package/assets/{module-Buk9uR0I.js → module-Cd4Tm6uq.js} +1 -1
  15. package/assets/{notification-CMGc2DD3.js → notification-D64qvni-.js} +1 -1
  16. package/assets/{welcome-CY_nFu0c.js → welcome-PDp-gUei.js} +1 -1
  17. package/helpers/configHelper.d.ts +5 -4
  18. package/helpers/configHelper.js +34 -40
  19. package/helpers/fieldsHelper.d.ts +1 -1
  20. package/helpers/fieldsHelper.js +0 -4
  21. package/helpers/runtimeMode.d.ts +1 -0
  22. package/helpers/runtimeMode.js +3 -0
  23. package/helpers/viteHelper.js +2 -1
  24. package/interfaces/adminpanelConfig.d.ts +1 -1
  25. package/lib/Adminizer.js +2 -1
  26. package/lib/DataAccessor.js +33 -44
  27. package/lib/requestProcessor.js +1 -2
  28. package/lib/widgets/widgetHandler.js +2 -2
  29. package/package.json +7 -7
  30. package/system/bindInertia.js +2 -1
  31. package/system/bindNavigation.js +4 -4
  32. package/system/defaults.js +13 -13
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "adminizer",
3
3
  "type": "module",
4
- "version": "4.6.0-build.219",
4
+ "version": "4.6.0",
5
5
  "main": "index.js",
6
6
  "exports": {
7
7
  ".": "./index.js",
@@ -14,12 +14,12 @@
14
14
  "test:watch": "vitest --reporter verbose",
15
15
  "start": "cross-env NO_SEED_DATA=true ORM=sequelize tsx --tsconfig ./fixture/tsconfig.json ./fixture/index.ts",
16
16
  "start:waterline": "cross-env NO_SEED_DATA=true ORM=waterline tsx --tsconfig ./fixture/tsconfig.json ./fixture/index.ts",
17
- "dev": "cross-env VITE_ENV=dev ORM=sequelize tsx watch --tsconfig ./fixture/tsconfig.json ./fixture/index.ts",
18
- "dev:no-seed": "cross-env VITE_ENV=dev NO_SEED_DATA=true ORM=sequelize tsx watch --tsconfig ./fixture/tsconfig.json ./fixture/index.ts",
19
- "dev:no-seed-clean": "cross-env VITE_ENV=dev NO_SEED_DATA=true CLEAN_TMP=true ORM=sequelize tsx watch --tsconfig ./fixture/tsconfig.json ./fixture/index.ts",
20
- "dev:waterline": "cross-env VITE_ENV=dev ORM=waterline tsx watch --tsconfig ./fixture/tsconfig.json ./fixture/index.ts",
21
- "dev:waterline:no-seed": "cross-env VITE_ENV=dev NO_SEED_DATA=true ORM=waterline tsx watch --tsconfig ./fixture/tsconfig.json ./fixture/index.ts",
22
- "dev:cors": "cross-env VITE_ENV=dev NO_SEED_DATA=true ORM=waterline FRONTEND_URL=http://localhost:8080 tsx watch --tsconfig ./fixture/tsconfig.json ./fixture/index.ts",
17
+ "dev": "cross-env ADMINIZER_VITE_ENV=dev VITE_ENV=dev ORM=sequelize tsx watch --tsconfig ./fixture/tsconfig.json ./fixture/index.ts",
18
+ "dev:no-seed": "cross-env ADMINIZER_VITE_ENV=dev VITE_ENV=dev NO_SEED_DATA=true ORM=sequelize tsx watch --tsconfig ./fixture/tsconfig.json ./fixture/index.ts",
19
+ "dev:no-seed-clean": "cross-env ADMINIZER_VITE_ENV=dev VITE_ENV=dev NO_SEED_DATA=true CLEAN_TMP=true ORM=sequelize tsx watch --tsconfig ./fixture/tsconfig.json ./fixture/index.ts",
20
+ "dev:waterline": "cross-env ADMINIZER_VITE_ENV=dev VITE_ENV=dev ORM=waterline tsx watch --tsconfig ./fixture/tsconfig.json ./fixture/index.ts",
21
+ "dev:waterline:no-seed": "cross-env ADMINIZER_VITE_ENV=dev VITE_ENV=dev NO_SEED_DATA=true ORM=waterline tsx watch --tsconfig ./fixture/tsconfig.json ./fixture/index.ts",
22
+ "dev:cors": "cross-env ADMINIZER_VITE_ENV=dev VITE_ENV=dev NO_SEED_DATA=true ORM=waterline FRONTEND_URL=http://localhost:8080 tsx watch --tsconfig ./fixture/tsconfig.json ./fixture/index.ts",
23
23
  "build:assets": "vite build",
24
24
  "compile:backend": "tsc -p src/tsconfig.json && node ./scripts/appendJsExtension.js",
25
25
  "compile:ui": "tsc -p tsconfig.ui.json",
@@ -3,6 +3,7 @@ import inertia from "../lib/inertia/inertiaAdapter.js";
3
3
  import fs from "fs";
4
4
  import path from "node:path";
5
5
  import { InertiaMenuHelper } from "../helpers/inertiaMenuHelper.js";
6
+ import { isAdminizerViteDevMode } from "../helpers/runtimeMode.js";
6
7
  export function bindInertia(adminizer) {
7
8
  const escapeHtmlAttribute = (value) => value
8
9
  .replace(/&/g, "&")
@@ -23,7 +24,7 @@ export function bindInertia(adminizer) {
23
24
  return `${adminizer.config.routePrefix}/${customFavicon.replace(/^\/+/, "")}`;
24
25
  };
25
26
  const viteRender = () => {
26
- if (process.env.VITE_ENV === 'dev') {
27
+ if (isAdminizerViteDevMode()) {
27
28
  return `
28
29
  <script type="module">
29
30
  import RefreshRuntime from "/@react-refresh"
@@ -11,8 +11,8 @@ export async function bindNavigation(adminizer) {
11
11
  controller: '../controllers/navigation/edit',
12
12
  },
13
13
  fields: {
14
- createdAt: false,
15
- updatedAt: false
14
+ createdAt: { visible: false },
15
+ updatedAt: { visible: false }
16
16
  },
17
17
  navbar: {
18
18
  visible: false
@@ -21,8 +21,8 @@ export async function bindNavigation(adminizer) {
21
21
  identifierField: "",
22
22
  list: {
23
23
  fields: {
24
- tree: false,
25
- id: false,
24
+ tree: { visible: false },
25
+ id: { visible: false },
26
26
  },
27
27
  },
28
28
  model: adminizer.config.navigation.model.toLowerCase(),
@@ -65,16 +65,16 @@ let adminpanelConfig = {
65
65
  },
66
66
  list: {
67
67
  fields: {
68
- createdAt: false,
69
- updatedAt: false,
70
- id: false,
71
- email: false,
72
- passwordHashed: false,
73
- timezone: false,
74
- locale: false,
75
- isDeleted: false,
76
- isActive: false,
77
- groups: false
68
+ createdAt: { visible: false },
69
+ updatedAt: { visible: false },
70
+ id: { visible: false },
71
+ email: { visible: false },
72
+ passwordHashed: { visible: false },
73
+ timezone: { visible: false },
74
+ locale: { visible: false },
75
+ isDeleted: { visible: false },
76
+ isActive: { visible: false },
77
+ groups: { visible: false }
78
78
  }
79
79
  }
80
80
  },
@@ -93,9 +93,9 @@ let adminpanelConfig = {
93
93
  },
94
94
  list: {
95
95
  fields: {
96
- createdAt: false,
97
- updatedAt: false,
98
- id: false,
96
+ createdAt: { visible: false },
97
+ updatedAt: { visible: false },
98
+ id: { visible: false },
99
99
  }
100
100
  }
101
101
  }