adminizer 4.6.0 → 4.7.0-build.222

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 (335) hide show
  1. package/Readme.md +12 -0
  2. package/assets/RelationDialogStack-CnHFOYyR.css +1 -0
  3. package/assets/RelationDialogStack-DI2bZxQX.js +20 -0
  4. package/assets/add-DCQ7ZW4B.js +1 -0
  5. package/assets/add-group-DCVPryBo.js +1 -0
  6. package/assets/add-group-form-DKRXC2n-.js +1 -0
  7. package/assets/add-user-B7OOiYxv.js +1 -0
  8. package/assets/add-user-form-UXAToWQd.js +1 -0
  9. package/assets/app-AKbNCggP.css +1 -0
  10. package/assets/app-layout-6EwNBvnR.js +1 -0
  11. package/assets/app-shell-D8wtkECO.js +1 -0
  12. package/assets/app-sidebar-DfGjL-2K.js +1 -0
  13. package/assets/app-sidebar-header-BZbIBQjq.js +1 -0
  14. package/assets/app.js +59 -7990
  15. package/assets/breadcrumbs-CODaqVkB.js +1 -0
  16. package/assets/catalog-DVvFGa2X.js +6 -0
  17. package/assets/dashboard-BadoiH_a.js +3 -0
  18. package/assets/date-picker-DSOkNiNo.js +1 -0
  19. package/assets/del-modal-Cd4M7af8.js +1 -0
  20. package/assets/dynamic-controls-BsrJhPDY.js +1 -0
  21. package/assets/geo-json-CzR5JBXL.js +1 -0
  22. package/assets/handsontable-BI98OF5R.js +336 -0
  23. package/assets/history-D1iLA6rs.js +1 -0
  24. package/assets/home-DbWj-W_k.js +2 -0
  25. package/assets/icon-C2JNaLxH.js +1 -0
  26. package/assets/init-user-D2HSyXup.js +1 -0
  27. package/assets/input-error-CH2caTtO.js +1 -0
  28. package/assets/jsoneditor-DVNQmA6G.js +3869 -0
  29. package/assets/list-CVoljVUw.js +4 -0
  30. package/assets/login-DFSLEO17.js +1 -0
  31. package/assets/manifest.json +246 -273
  32. package/assets/material-icon-Bx9pGQiQ.js +1 -0
  33. package/assets/media-manager-WcKe1EvD.js +6 -0
  34. package/assets/module-DJsC37CM.js +1 -0
  35. package/assets/monaco-Bl4zdWCn.js +11 -0
  36. package/assets/nav-footer-BiSQkPt4.js +1 -0
  37. package/assets/nav-main-rTH0PfDw.js +1 -0
  38. package/assets/nav-user-Bj6cWs0a.js +1 -0
  39. package/assets/notification-DKrNfaAB.js +20 -0
  40. package/assets/pagination-render-AKJvTIRA.js +1 -0
  41. package/assets/register-BTP4uxsK.js +1 -0
  42. package/assets/ru-eW0WKkga.js +1 -0
  43. package/assets/theme-switcher-Dm8EOGzx.js +1 -0
  44. package/assets/toast-editor-DOg_gvSp.js +668 -0
  45. package/assets/user-filters-list-C9R9J6Om.js +1 -0
  46. package/assets/user-info-BgSbT02v.js +1 -0
  47. package/assets/user-menu-content-TQTXHIv6.js +1 -0
  48. package/assets/{vanilla-picker-l5rcX3cq.js → vanilla-picker-B3LgXoKV.js} +1 -7
  49. package/assets/welcome-BwDlAOGh.js +1 -0
  50. package/controllers/add.d.ts +1 -1
  51. package/controllers/add.js +20 -26
  52. package/controllers/addGroup.d.ts +1 -1
  53. package/controllers/addGroup.js +7 -15
  54. package/controllers/addUser.d.ts +1 -1
  55. package/controllers/addUser.js +10 -16
  56. package/controllers/catalog/Catalog.d.ts +1 -1
  57. package/controllers/catalog/Catalog.js +1 -10
  58. package/controllers/catalog/FrontendCatalogAdapter.d.ts +3 -3
  59. package/controllers/catalog/FrontendCatalogAdapter.js +0 -6
  60. package/controllers/catalog/FrontentCatalogAdapter.d.ts +3 -3
  61. package/controllers/catalog/FrontentCatalogAdapter.js +0 -4
  62. package/controllers/ckeditorUpload.js +2 -18
  63. package/controllers/dashboard.d.ts +1 -1
  64. package/controllers/dashboard.js +2 -5
  65. package/controllers/edit.js +24 -37
  66. package/controllers/editGroup.d.ts +1 -1
  67. package/controllers/editGroup.js +10 -21
  68. package/controllers/editUser.d.ts +1 -1
  69. package/controllers/editUser.js +11 -23
  70. package/controllers/exportData.d.ts +6 -0
  71. package/controllers/exportData.js +315 -0
  72. package/controllers/feed.d.ts +6 -0
  73. package/controllers/feed.js +73 -0
  74. package/controllers/feedback/feedbackController.d.ts +1 -1
  75. package/controllers/feedback/feedbackController.js +5 -7
  76. package/controllers/filter-fields/columns.d.ts +11 -0
  77. package/controllers/filter-fields/columns.js +106 -0
  78. package/controllers/filter-fields/filterFields.d.ts +10 -0
  79. package/controllers/filter-fields/filterFields.js +141 -0
  80. package/controllers/filter-fields/getAllUserFilters.d.ts +6 -0
  81. package/controllers/filter-fields/getAllUserFilters.js +115 -0
  82. package/controllers/filter-fields/groups.d.ts +5 -0
  83. package/controllers/filter-fields/groups.js +26 -0
  84. package/controllers/filter-fields/savedFilters.d.ts +25 -0
  85. package/controllers/filter-fields/savedFilters.js +317 -0
  86. package/controllers/getAllWidgets.d.ts +1 -1
  87. package/controllers/getAllWidgets.js +1 -9
  88. package/controllers/history-actions/HistoryController.js +6 -31
  89. package/controllers/initUser.js +6 -5
  90. package/controllers/inlineUpdate.d.ts +7 -0
  91. package/controllers/inlineUpdate.js +148 -0
  92. package/controllers/list.d.ts +1 -1
  93. package/controllers/list.js +383 -70
  94. package/controllers/listUserFilters.d.ts +5 -0
  95. package/controllers/listUserFilters.js +26 -0
  96. package/controllers/login.js +2 -2
  97. package/controllers/media-manager/mediaManagerApi.js +0 -9
  98. package/controllers/navigation/edit.js +3 -9
  99. package/controllers/notifications/NotificationController.d.ts +1 -1
  100. package/controllers/notifications/NotificationController.js +12 -36
  101. package/controllers/register.js +10 -9
  102. package/controllers/remove.js +10 -19
  103. package/controllers/timezones.d.ts +1 -1
  104. package/controllers/timezones.js +0 -6
  105. package/controllers/userApiKey.d.ts +7 -0
  106. package/controllers/userApiKey.js +36 -0
  107. package/controllers/view.js +14 -26
  108. package/controllers/welcome.d.ts +1 -1
  109. package/controllers/welcome.js +0 -4
  110. package/controllers/widgets/Action.d.ts +1 -1
  111. package/controllers/widgets/Action.js +1 -9
  112. package/controllers/widgets/Custom.d.ts +1 -1
  113. package/controllers/widgets/Custom.js +1 -9
  114. package/controllers/widgets/Info.d.ts +1 -1
  115. package/controllers/widgets/Info.js +1 -9
  116. package/controllers/widgets/filterInfo.d.ts +1 -0
  117. package/controllers/widgets/filterInfo.js +44 -0
  118. package/controllers/widgets/switch.d.ts +1 -1
  119. package/controllers/widgets/switch.js +1 -9
  120. package/controllers/widgetsDB.d.ts +1 -1
  121. package/controllers/widgetsDB.js +2 -8
  122. package/helpers/accessRightsHelper.d.ts +1 -1
  123. package/helpers/accessRightsHelper.js +5 -4
  124. package/helpers/apiKeyHelper.d.ts +5 -0
  125. package/helpers/apiKeyHelper.js +8 -0
  126. package/helpers/configHelper.js +12 -15
  127. package/helpers/controllerHelper.d.ts +14 -21
  128. package/helpers/controllerHelper.js +50 -83
  129. package/helpers/fieldsHelper.js +3 -3
  130. package/helpers/filterDatetimeHelper.d.ts +5 -0
  131. package/helpers/filterDatetimeHelper.js +84 -0
  132. package/helpers/inertiaActionsHelper.d.ts +2 -2
  133. package/helpers/inertiaActionsHelper.js +5 -4
  134. package/helpers/inertiaAddHelper.d.ts +3 -414
  135. package/helpers/inertiaAddHelper.js +39 -15
  136. package/helpers/inertiaGroupHelper.d.ts +2 -2
  137. package/helpers/inertiaGroupHelper.js +3 -3
  138. package/helpers/inertiaListHelper.d.ts +7 -3
  139. package/helpers/inertiaListHelper.js +26 -12
  140. package/helpers/inertiaMenuHelper.d.ts +1 -0
  141. package/helpers/inertiaMenuHelper.js +15 -3
  142. package/helpers/inertiaUserHelper.d.ts +3 -2
  143. package/helpers/inertiaUserHelper.js +7 -3
  144. package/helpers/menuHelper.d.ts +5 -2
  145. package/helpers/menuHelper.js +64 -12
  146. package/helpers/viteHelper.js +1 -2
  147. package/index.d.ts +6 -2
  148. package/index.js +6 -2
  149. package/interfaces/adminpanelConfig.d.ts +126 -39
  150. package/interfaces/internalModelAccess.d.ts +37 -0
  151. package/interfaces/internalModelAccess.js +1 -0
  152. package/interfaces/listQueryBuilder.d.ts +22 -0
  153. package/interfaces/listQueryBuilder.js +1 -0
  154. package/interfaces/queryCriteria.d.ts +54 -0
  155. package/interfaces/queryCriteria.js +1 -0
  156. package/interfaces/types.d.ts +1 -13
  157. package/lib/Adminizer.d.ts +4 -2
  158. package/lib/Adminizer.js +29 -10
  159. package/lib/DataAccessor.d.ts +8 -5
  160. package/lib/DataAccessor.js +89 -42
  161. package/lib/I18n.d.ts +5 -1
  162. package/lib/I18n.js +45 -19
  163. package/lib/MiddlewareManager.d.ts +8 -0
  164. package/lib/MiddlewareManager.js +53 -0
  165. package/lib/ai-assistant/OpenAiModelService.d.ts +3 -3
  166. package/lib/ai-assistant/OpenAiModelService.js +23 -24
  167. package/lib/catalog/Navigation.d.ts +1 -0
  168. package/lib/catalog/Navigation.js +12 -11
  169. package/lib/controls/jsoneditor/JsonEditor.d.ts +1 -2
  170. package/lib/controls/markdown/ToastUiEditor.d.ts +1 -2
  171. package/lib/feedback/FeedbackHandler.js +2 -2
  172. package/lib/filters/ConditionValidator.d.ts +107 -0
  173. package/lib/filters/ConditionValidator.js +483 -0
  174. package/lib/filters/CustomFilterHandler.d.ts +122 -0
  175. package/lib/filters/CustomFilterHandler.js +131 -0
  176. package/lib/filters/FilterCustomFieldHandler.d.ts +2 -0
  177. package/lib/filters/FilterCustomFieldHandler.js +2 -0
  178. package/lib/filters/FilterService.d.ts +82 -0
  179. package/lib/filters/FilterService.js +323 -0
  180. package/lib/filters/index.d.ts +6 -0
  181. package/lib/filters/index.js +4 -0
  182. package/lib/history-actions/AbstractHistoryAdapter.d.ts +5 -4
  183. package/lib/history-actions/AbstractHistoryAdapter.js +45 -30
  184. package/lib/history-actions/DefaultHistoryAdapter.d.ts +2 -0
  185. package/lib/history-actions/DefaultHistoryAdapter.js +12 -6
  186. package/lib/history-actions/HistoryHandler.js +1 -1
  187. package/lib/list-query-builder/ListQueryBuilder.d.ts +117 -0
  188. package/lib/list-query-builder/ListQueryBuilder.js +707 -0
  189. package/lib/media-manager/AbstractMediaManager.d.ts +9 -8
  190. package/lib/media-manager/DefaultMediaManager.d.ts +2 -0
  191. package/lib/media-manager/DefaultMediaManager.js +27 -15
  192. package/lib/media-manager/Items.d.ts +4 -1
  193. package/lib/media-manager/Items.js +62 -59
  194. package/lib/media-manager/MediaManagerHandler.js +1 -1
  195. package/lib/media-manager/helpers/MediaManagerHelper.d.ts +5 -1
  196. package/lib/media-manager/helpers/MediaManagerHelper.js +38 -4
  197. package/lib/model/AbstractModel.d.ts +33 -25
  198. package/lib/model/AbstractModel.js +54 -2
  199. package/lib/model/InternalModelAccessFactory.d.ts +18 -0
  200. package/lib/model/InternalModelAccessFactory.js +82 -0
  201. package/lib/model/ModelHandler.d.ts +6 -0
  202. package/lib/model/ModelHandler.js +14 -0
  203. package/lib/model/adapter/sequelize.d.ts +32 -10
  204. package/lib/model/adapter/sequelize.js +409 -62
  205. package/lib/model/adapter/typeorm.d.ts +62 -0
  206. package/lib/model/adapter/typeorm.js +777 -0
  207. package/lib/model/internalModelAccessToken.d.ts +1 -0
  208. package/lib/model/internalModelAccessToken.js +1 -0
  209. package/lib/model/internalModelRepository.d.ts +3 -0
  210. package/lib/model/internalModelRepository.js +4 -0
  211. package/lib/notifications/AbstractNotificationService.d.ts +3 -0
  212. package/lib/notifications/AbstractNotificationService.js +42 -36
  213. package/lib/notifications/GeneralNotificationService.js +37 -40
  214. package/lib/notifications/SystemNotificationService.js +33 -36
  215. package/lib/requestProcessor.js +0 -3
  216. package/lib/ui-i18n/getUiTranslations.d.ts +1 -0
  217. package/lib/ui-i18n/getUiTranslations.js +3 -0
  218. package/lib/ui-i18n/uiTranslationKeys.d.ts +6 -0
  219. package/lib/ui-i18n/uiTranslationKeys.js +268 -0
  220. package/lib/widgets/widgetHandler.d.ts +7 -2
  221. package/lib/widgets/widgetHandler.js +98 -18
  222. package/models/FilterAP.d.ts +116 -0
  223. package/models/FilterAP.js +68 -0
  224. package/models/FilterColumnAP.d.ts +32 -0
  225. package/models/FilterColumnAP.js +21 -0
  226. package/models/GroupAP.d.ts +1 -1
  227. package/models/HistoryActionsAP.d.ts +3 -3
  228. package/models/MediaManagerMetaAP.d.ts +1 -1
  229. package/models/NavigationAP.d.ts +1 -1
  230. package/models/UserAP.d.ts +6 -1
  231. package/models/UserAP.js +4 -0
  232. package/package.json +39 -32
  233. package/policies/authPolicies.d.ts +12 -0
  234. package/policies/authPolicies.js +104 -0
  235. package/policies/permissionResolvers.d.ts +12 -0
  236. package/policies/permissionResolvers.js +52 -0
  237. package/services/FeedService.d.ts +70 -0
  238. package/services/FeedService.js +334 -0
  239. package/system/Router.d.ts +1 -0
  240. package/system/Router.js +136 -59
  241. package/system/bindAccessRights.js +11 -30
  242. package/system/bindAuthorization.js +18 -18
  243. package/system/bindCors.js +16 -1
  244. package/system/bindCustomFilterHandlers.d.ts +2 -0
  245. package/system/bindCustomFilterHandlers.js +4 -0
  246. package/system/bindInertia.js +18 -61
  247. package/system/bindReqFunctions.js +10 -2
  248. package/system/bindTranslations.js +7 -3
  249. package/system/buildInternalModelAccess.d.ts +4 -0
  250. package/system/buildInternalModelAccess.js +59 -0
  251. package/system/defaults.js +18 -14
  252. package/system/routePolicies.d.ts +2 -0
  253. package/system/routePolicies.js +29 -0
  254. package/translations/en.json +151 -39
  255. package/translations/ru.json +211 -64
  256. package/ui/components/handsontable.js +13 -27
  257. package/ui/components/ui/dialog-stack.js +1 -3
  258. package/ui/components/ui/popover.js +1 -1
  259. package/ui/components/ui/sidebar.js +1 -1
  260. package/assets/RelationDialogStack-D9UVEF9s.js +0 -407
  261. package/assets/RelationDialogStack-DV8OITPR.css +0 -4
  262. package/assets/add-BlvzWQKF.js +0 -1
  263. package/assets/add-group-1Uoq9NWe.js +0 -1
  264. package/assets/add-group-form-B01gwDGu.js +0 -1
  265. package/assets/add-user-BQCAsaRy.js +0 -1
  266. package/assets/add-user-form-Cgwc9JkI.js +0 -1
  267. package/assets/app-DaOMy1nl.css +0 -72
  268. package/assets/app-layout-CAm60qoE.js +0 -1
  269. package/assets/app-shell-QWCtn9ye.js +0 -1
  270. package/assets/app-sidebar-CfaYbnSy.js +0 -1
  271. package/assets/app-sidebar-header-BsPFDhZ8.js +0 -1
  272. package/assets/breadcrumbs-CZZirDj8.js +0 -1
  273. package/assets/catalog-k5myk7fk.js +0 -6
  274. package/assets/dashboard-BkL9ybBw.js +0 -3
  275. package/assets/date-picker-B5AZ_7Q9.js +0 -1
  276. package/assets/del-modal-BoyXZloG.js +0 -1
  277. package/assets/dynamic-controls-k61T9W2P.js +0 -1
  278. package/assets/form-1WGY0YgG.js +0 -1
  279. package/assets/form-DJapG3qF.js +0 -1
  280. package/assets/geo-json-DsMUHo0l.js +0 -4
  281. package/assets/handsontable-PxYdjN8c.js +0 -298
  282. package/assets/history-CluyR-yJ.js +0 -1
  283. package/assets/home-Dug9zBzM.js +0 -2
  284. package/assets/icon-DfDLMG5f.js +0 -1
  285. package/assets/init-user-CF80MEnT.js +0 -1
  286. package/assets/input-error-DuuqFgZa.js +0 -1
  287. package/assets/jsoneditor-De1FvcYu.js +0 -3882
  288. package/assets/list-CuexshNt.js +0 -1
  289. package/assets/list-table-BsEWjTKY.js +0 -22
  290. package/assets/login-eDemYzN-.js +0 -1
  291. package/assets/material-icon-DMT8KdmE.js +0 -1
  292. package/assets/media-manager-DfYa_mT_.js +0 -14
  293. package/assets/module-Cd4Tm6uq.js +0 -1
  294. package/assets/monaco-BhBYtg3d.js +0 -11
  295. package/assets/nav-footer-D3olYxtz.js +0 -1
  296. package/assets/nav-main-BctqyzeV.js +0 -1
  297. package/assets/nav-user-Bn1Lt-BZ.js +0 -1
  298. package/assets/notification-D64qvni-.js +0 -27
  299. package/assets/pagination-render-DxD78ahJ.js +0 -1
  300. package/assets/register-349PwYbe.js +0 -1
  301. package/assets/theme-switcher-DfExsHW2.js +0 -1
  302. package/assets/toast-editor-ESK5iWPx.js +0 -845
  303. package/assets/user-info-DtBK5Kh8.js +0 -1
  304. package/assets/user-menu-content-0XYOCMaA.js +0 -1
  305. package/assets/welcome-PDp-gUei.js +0 -1
  306. package/controllers/form.d.ts +0 -1
  307. package/controllers/form.js +0 -86
  308. package/helpers/formHelper.d.ts +0 -6
  309. package/helpers/formHelper.js +0 -38
  310. package/helpers/inertiaFromHelper.d.ts +0 -11
  311. package/helpers/inertiaFromHelper.js +0 -98
  312. package/helpers/runtimeMode.d.ts +0 -1
  313. package/helpers/runtimeMode.js +0 -3
  314. package/lib/PolicyManager.d.ts +0 -8
  315. package/lib/PolicyManager.js +0 -53
  316. package/lib/datatable/NodeTable.d.ts +0 -49
  317. package/lib/datatable/NodeTable.js +0 -207
  318. package/lib/model/adapter/waterline.d.ts +0 -32
  319. package/lib/model/adapter/waterline.js +0 -180
  320. package/migrations/index.d.ts +0 -3
  321. package/migrations/index.js +0 -4
  322. package/migrations/knex/20250106000001_adminizer_init.d.ts +0 -8
  323. package/migrations/knex/20250106000001_adminizer_init.js +0 -164
  324. package/migrations/umzug/0001.d.ts +0 -7
  325. package/migrations/umzug/0001.js +0 -121
  326. package/migrations/umzugExports.d.ts +0 -2
  327. package/migrations/umzugExports.js +0 -9
  328. package/system/bindForms.d.ts +0 -2
  329. package/system/bindForms.js +0 -20
  330. /package/{policies → middlewares}/addMessages.d.ts +0 -0
  331. /package/{policies → middlewares}/addMessages.js +0 -0
  332. /package/{policies → middlewares}/checkAuth.d.ts +0 -0
  333. /package/{policies → middlewares}/checkAuth.js +0 -0
  334. /package/{policies → middlewares}/setLocale.d.ts +0 -0
  335. /package/{policies → middlewares}/setLocale.js +0 -0
@@ -0,0 +1,21 @@
1
+ /**
2
+ * FilterColumnAP model schema
3
+ * Represents column configuration for a filter
4
+ */
5
+ export default {
6
+ id: {
7
+ type: "number",
8
+ autoIncrement: true,
9
+ primaryKey: true
10
+ },
11
+ filter: {
12
+ model: 'FilterAP'
13
+ },
14
+ fieldName: {
15
+ type: "string",
16
+ required: true
17
+ },
18
+ order: {
19
+ type: "number"
20
+ }
21
+ };
@@ -23,7 +23,7 @@ declare const _default: {
23
23
  };
24
24
  export default _default;
25
25
  export interface GroupAP {
26
- id: number;
26
+ id?: number;
27
27
  name: string;
28
28
  description?: string;
29
29
  tokens?: string[];
@@ -42,7 +42,7 @@ declare const _default: {
42
42
  };
43
43
  export default _default;
44
44
  export interface HistoryActionsAP {
45
- id: number;
45
+ id?: number;
46
46
  modelId: number | string;
47
47
  modelName: string;
48
48
  action: string;
@@ -50,7 +50,7 @@ export interface HistoryActionsAP {
50
50
  diff: any;
51
51
  user: UserAP;
52
52
  isCurrent: boolean;
53
- createdAt: number;
54
- updatedAt: number;
53
+ createdAt?: number;
54
+ updatedAt?: number;
55
55
  preview: boolean;
56
56
  }
@@ -28,7 +28,7 @@ declare const _default: {
28
28
  };
29
29
  export default _default;
30
30
  export interface MediaManagerMetaAP {
31
- id: string;
31
+ id?: string;
32
32
  key?: string;
33
33
  value?: Record<string, unknown>;
34
34
  isPublic?: boolean;
@@ -16,7 +16,7 @@ declare const _default: {
16
16
  };
17
17
  export default _default;
18
18
  export interface NavigationAP {
19
- id: string;
19
+ id?: string;
20
20
  label: string;
21
21
  tree: Record<string, unknown>;
22
22
  }
@@ -52,10 +52,14 @@ declare const _default: {
52
52
  isConfirmed: {
53
53
  type: string;
54
54
  };
55
+ apiKey: {
56
+ type: string;
57
+ field: string;
58
+ };
55
59
  };
56
60
  export default _default;
57
61
  export interface UserAP {
58
- id: number;
62
+ id?: number;
59
63
  login: string;
60
64
  fullName?: string;
61
65
  email?: string;
@@ -73,4 +77,5 @@ export interface UserAP {
73
77
  layout: WidgetsLayouts;
74
78
  };
75
79
  isConfirmed?: boolean;
80
+ apiKey?: string;
76
81
  }
package/models/UserAP.js CHANGED
@@ -49,5 +49,9 @@ export default {
49
49
  },
50
50
  isConfirmed: {
51
51
  type: "boolean"
52
+ },
53
+ apiKey: {
54
+ type: "string",
55
+ field: "userApiKey"
52
56
  }
53
57
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "adminizer",
3
3
  "type": "module",
4
- "version": "4.6.0",
4
+ "version": "4.7.0-build.222",
5
5
  "main": "index.js",
6
6
  "exports": {
7
7
  ".": "./index.js",
@@ -13,13 +13,13 @@
13
13
  "test": "vitest --watch=false",
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
- "start:waterline": "cross-env NO_SEED_DATA=true ORM=waterline tsx --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",
16
+ "dev": "cross-env ADMINIZER_ENV=dev ORM=sequelize tsx watch --tsconfig ./fixture/tsconfig.json ./fixture/index.ts",
17
+ "dev:no-seed": "cross-env ADMINIZER_ENV=dev NO_SEED_DATA=true ORM=sequelize tsx watch --tsconfig ./fixture/tsconfig.json ./fixture/index.ts",
18
+ "start:typeorm": "cross-env NO_SEED_DATA=true ORM=typeorm tsx --tsconfig ./fixture/tsconfig.json ./fixture/index.ts",
19
+ "dev:typeorm": "cross-env ADMINIZER_ENV=dev ORM=typeorm tsx watch --tsconfig ./fixture/tsconfig.json ./fixture/index.ts",
20
+ "dev:typeorm:no-seed": "cross-env ADMINIZER_ENV=dev NO_SEED_DATA=true ORM=typeorm tsx watch --tsconfig ./fixture/tsconfig.json ./fixture/index.ts",
21
+ "dev:no-seed-clean": "cross-env ADMINIZER_ENV=dev NO_SEED_DATA=true CLEAN_TMP=true ORM=sequelize tsx watch --tsconfig ./fixture/tsconfig.json ./fixture/index.ts",
22
+ "dev:cors": "cross-env ADMINIZER_ENV=dev NO_SEED_DATA=true ORM=sequelize 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",
@@ -33,8 +33,10 @@
33
33
  "copy:modules": "node copy-modules.js",
34
34
  "build:assets:modules": "npm run build:assets && npm run copy:modules",
35
35
  "start:seed": "cross-env ORM=sequelize tsx --tsconfig ./fixture/tsconfig.json ./fixture/index.ts",
36
+ "start:typeorm:seed": "cross-env ORM=typeorm tsx --tsconfig ./fixture/tsconfig.json ./fixture/index.ts",
36
37
  "demo:build": "npm run copy:backend && npm run compile:backend && npm run build:assets && npm run copy:modules",
37
- "demo": "cross-env ORM=sequelize tsx --tsconfig ./fixture/tsconfig.json ./fixture/index.ts"
38
+ "demo": "cross-env ORM=sequelize tsx --tsconfig ./fixture/tsconfig.json ./fixture/index.ts",
39
+ "demo:typeorm": "cross-env ORM=typeorm tsx --tsconfig ./fixture/tsconfig.json ./fixture/index.ts"
38
40
  },
39
41
  "keywords": [],
40
42
  "author": "Siziy Ivan <xziy88@gmail.com>",
@@ -48,25 +50,26 @@
48
50
  "url": "https://github.com/adminization/adminizer"
49
51
  },
50
52
  "dependencies": {
53
+ "@handsontable/react-wrapper": "^17.0.1",
51
54
  "@minoru/react-dnd-treeview": "^3.5.2",
52
55
  "@radix-ui/react-context-menu": "^2.2.15",
53
56
  "@radix-ui/react-tabs": "^1.1.12",
54
- "body-parser": "^1.20.3",
57
+ "body-parser": "^2.2.2",
55
58
  "chalk": "^5.4.1",
56
59
  "cmdk": "^1.1.1",
57
60
  "cookie": "^1.0.2",
58
61
  "cookie-parser": "^1.4.7",
59
- "cors": "^2.8.5",
62
+ "cors": "^2.8.6",
60
63
  "crypto-puzzle": "^5.0.2",
61
64
  "date-fns": "^3.6.0",
62
65
  "deep-object-diff": "^1.1.9",
63
- "dotenv": "^17.2.2",
64
- "express": "^4.21.2",
65
- "express-session": "^1.18.1",
66
+ "dotenv": "^17.4.2",
67
+ "express": "^5.2.1",
68
+ "express-session": "^1.19.0",
66
69
  "image-size": "^2.0.2",
67
- "jsonwebtoken": "^9.0.2",
70
+ "jsonwebtoken": "^9.0.3",
68
71
  "material-icons": "^1.13.14",
69
- "multer": "^1.4.5-lts.1",
72
+ "multer": "^2.1.1",
70
73
  "next-themes": "^0.4.6",
71
74
  "password-hash": "^1.2.2",
72
75
  "react-cropper": "^2.3.3",
@@ -77,8 +80,8 @@
77
80
  "sprintf-js": "^1.1.3",
78
81
  "typeorm": "^0.3.20",
79
82
  "uuid": "^11.0.5",
80
- "waterline": "^0.15.2",
81
83
  "winston": "^3.17.0",
84
+ "xlsx": "^0.18.5",
82
85
  "zod": "^4.1.11"
83
86
  },
84
87
  "devDependencies": {
@@ -88,8 +91,7 @@
88
91
  "@dnd-kit/sortable": "^10.0.0",
89
92
  "@eslint/compat": "^1.2.9",
90
93
  "@faker-js/faker": "^9.7.0",
91
- "@handsontable/react": "^15.2.0",
92
- "@inertiajs/react": "^2.2.0",
94
+ "@inertiajs/react": "^3.0.3",
93
95
  "@monaco-editor/react": "^4.7.0",
94
96
  "@openai/agents": "^0.3.2",
95
97
  "@radix-ui/react-avatar": "^1.1.3",
@@ -112,15 +114,15 @@
112
114
  "@toast-ui/react-editor": "^3.2.3",
113
115
  "@types/cookie-parser": "^1.4.8",
114
116
  "@types/cors": "^2.8.17",
115
- "@types/express": "^5.0.0",
116
- "@types/express-session": "^1.18.1",
117
+ "@types/express": "^5.0.6",
118
+ "@types/express-session": "^1.19.0",
117
119
  "@types/he": "^1.2.3",
118
120
  "@types/json-schema": "^7.0.15",
119
121
  "@types/jsonwebtoken": "^9.0.9",
120
122
  "@types/leaflet": "^1.9.17",
121
123
  "@types/lodash": "^4.17.17",
122
124
  "@types/lodash-es": "^4.17.12",
123
- "@types/multer": "^1.4.12",
125
+ "@types/multer": "^2.1.0",
124
126
  "@types/node": "^22.10.5",
125
127
  "@types/password-hash": "^1.2.24",
126
128
  "@types/react": "^19.0.3",
@@ -128,16 +130,14 @@
128
130
  "@types/react-grid-layout": "^1.3.5",
129
131
  "@types/sprintf-js": "^1.1.4",
130
132
  "@types/uuid": "^10.0.0",
131
- "@types/waterline": "^0.13.9",
132
133
  "@typescript-eslint/eslint-plugin": "^8.32.1",
133
- "@vitejs/plugin-react": "^4.3.4",
134
- "babel-plugin-react-compiler": "^19.0.0-beta-e993439-20250405",
134
+ "@vitejs/plugin-react": "^5.2.0",
135
135
  "ckeditor5": "^45.0.0",
136
136
  "class-variance-authority": "^0.7.1",
137
137
  "clsx": "^2.1.1",
138
138
  "cross-env": "^7.0.3",
139
139
  "eslint": "^9.26.0",
140
- "handsontable": "^15.2.0",
140
+ "handsontable": "^17.0.1",
141
141
  "isomorphic-webcrypto": "^2.3.8",
142
142
  "json-schema": "^0.4.0",
143
143
  "leaflet": "^1.9.4",
@@ -152,8 +152,6 @@
152
152
  "react-leaflet": "^5.0.0",
153
153
  "react-quill-new": "^3.4.6",
154
154
  "react-simple-wysiwyg": "^3.2.2",
155
- "sails-disk": "^2.1.2",
156
- "sails-postgresql": "^5.0.1",
157
155
  "sequelize": "^6.37.7",
158
156
  "sequelize-typescript": "^2.1.6",
159
157
  "shelljs": "^0.9.2",
@@ -161,13 +159,22 @@
161
159
  "sqlite3": "^5.1.7",
162
160
  "tailwind-merge": "^3.0.2",
163
161
  "tailwindcss": "^4.0.15",
164
- "tsx": "^4.19.3",
162
+ "tsx": "^4.21.0",
165
163
  "tw-animate-css": "^1.2.5",
166
- "typescript": "^5.7.2",
164
+ "typescript": "^6.0.3",
167
165
  "vanilla-jsoneditor": "^3.1.1",
168
- "vite": "^6.1.0",
166
+ "vite": "^7.3.2",
169
167
  "vite-plugin-externals": "^0.6.2",
170
- "vite-plugin-full-reload": "^1.2.0",
171
168
  "vitest": "^3.0.7"
169
+ },
170
+ "overrides": {
171
+ "@toast-ui/react-editor": {
172
+ "react": "$react",
173
+ "react-dom": "$react-dom"
174
+ },
175
+ "react-day-picker": {
176
+ "react": "$react",
177
+ "react-dom": "$react-dom"
178
+ }
172
179
  }
173
180
  }
@@ -0,0 +1,12 @@
1
+ export type PermissionResolver = string | ((req: ReqType) => string | undefined);
2
+ export type GuardMode = "ui" | "api";
3
+ type GuardOptions = {
4
+ mode?: GuardMode;
5
+ };
6
+ export declare function requireAuthEnabled(): MiddlewareType;
7
+ export declare function requireAuthUI(): MiddlewareType;
8
+ export declare function requireAuthAPI(): MiddlewareType;
9
+ export declare function requireAdmin(options?: GuardOptions): MiddlewareType;
10
+ export declare function requirePermission(token: PermissionResolver, options?: GuardOptions): MiddlewareType;
11
+ export declare function requireAnyPermission(tokens: PermissionResolver[], options?: GuardOptions): MiddlewareType;
12
+ export {};
@@ -0,0 +1,104 @@
1
+ import { redirectToLogin } from "../helpers/inertiaAutHelper.js";
2
+ function unauthorized(req, res, mode) {
3
+ if (mode === "ui") {
4
+ redirectToLogin(req, res);
5
+ return;
6
+ }
7
+ res.status(401).json({ error: req.i18n?.__("Unauthorized") || "Unauthorized" });
8
+ }
9
+ function forbidden(req, res, mode) {
10
+ if (mode === "ui") {
11
+ res.sendStatus(403);
12
+ return;
13
+ }
14
+ res.status(403).json({ error: req.i18n?.__("Forbidden") || "Forbidden" });
15
+ }
16
+ function resolveToken(token, req) {
17
+ if (typeof token === "function") {
18
+ return token(req);
19
+ }
20
+ return token;
21
+ }
22
+ export function requireAuthEnabled() {
23
+ return (req, res, next) => {
24
+ if (!req.adminizer.config.auth.enable) {
25
+ return res.status(403).json({ error: "Auth is disabled" });
26
+ }
27
+ return next();
28
+ };
29
+ }
30
+ export function requireAuthUI() {
31
+ return (req, res, next) => {
32
+ if (req.adminizer.config.auth.enable && !req.user) {
33
+ unauthorized(req, res, "ui");
34
+ return;
35
+ }
36
+ return next();
37
+ };
38
+ }
39
+ export function requireAuthAPI() {
40
+ return (req, res, next) => {
41
+ if (req.adminizer.config.auth.enable && !req.user) {
42
+ unauthorized(req, res, "api");
43
+ return;
44
+ }
45
+ return next();
46
+ };
47
+ }
48
+ export function requireAdmin(options = {}) {
49
+ const mode = options.mode || "api";
50
+ return (req, res, next) => {
51
+ if (!req.adminizer.config.auth.enable) {
52
+ return next();
53
+ }
54
+ if (!req.user) {
55
+ unauthorized(req, res, mode);
56
+ return;
57
+ }
58
+ if (!req.user.isAdministrator) {
59
+ forbidden(req, res, mode);
60
+ return;
61
+ }
62
+ return next();
63
+ };
64
+ }
65
+ export function requirePermission(token, options = {}) {
66
+ const mode = options.mode || "api";
67
+ return (req, res, next) => {
68
+ if (!req.adminizer.config.auth.enable) {
69
+ return next();
70
+ }
71
+ if (!req.user) {
72
+ unauthorized(req, res, mode);
73
+ return;
74
+ }
75
+ const tokenId = resolveToken(token, req);
76
+ const hasPermission = req.adminizer.accessRightsHelper.hasPermission(tokenId, req.user);
77
+ if (!hasPermission) {
78
+ forbidden(req, res, mode);
79
+ return;
80
+ }
81
+ return next();
82
+ };
83
+ }
84
+ export function requireAnyPermission(tokens, options = {}) {
85
+ const mode = options.mode || "api";
86
+ return (req, res, next) => {
87
+ if (!req.adminizer.config.auth.enable) {
88
+ return next();
89
+ }
90
+ if (!req.user) {
91
+ unauthorized(req, res, mode);
92
+ return;
93
+ }
94
+ const tokenIds = tokens
95
+ .map((token) => resolveToken(token, req))
96
+ .filter((token) => Boolean(token));
97
+ const hasPermission = req.adminizer.accessRightsHelper.enoughPermissions(tokenIds, req.user);
98
+ if (!hasPermission) {
99
+ forbidden(req, res, mode);
100
+ return;
101
+ }
102
+ return next();
103
+ };
104
+ }
@@ -0,0 +1,12 @@
1
+ export declare const GROUP_FILTER_VISIBILITY_TOKEN = "manage-group-filter-visibility";
2
+ export declare function modelReadToken(req: ReqType): string | undefined;
3
+ export declare function modelCreateToken(req: ReqType): string | undefined;
4
+ export declare function modelUpdateToken(req: ReqType): string | undefined;
5
+ export declare function modelDeleteToken(req: ReqType): string | undefined;
6
+ export declare function widgetToken(req: ReqType): string | undefined;
7
+ export declare function widgetsToken(): string;
8
+ export declare function catalogToken(req: ReqType): string | undefined;
9
+ export declare function mediaManagerToken(req: ReqType): string | undefined;
10
+ export declare function aiModelToken(req: ReqType): string | undefined;
11
+ export declare function historyToken(req: ReqType): string;
12
+ export declare function groupFilterVisibilityToken(): string;
@@ -0,0 +1,52 @@
1
+ function extractModelResourceName(req) {
2
+ if (req.params?.modelResourceName) {
3
+ return req.params.modelResourceName;
4
+ }
5
+ const path = req.path || req.originalUrl || "";
6
+ const match = path.match(/\/model\/([^/]+)/i);
7
+ return match?.[1];
8
+ }
9
+ export const GROUP_FILTER_VISIBILITY_TOKEN = "manage-group-filter-visibility";
10
+ export function modelReadToken(req) {
11
+ const modelResourceName = extractModelResourceName(req);
12
+ return modelResourceName ? `read-${modelResourceName}-model` : undefined;
13
+ }
14
+ export function modelCreateToken(req) {
15
+ const modelResourceName = extractModelResourceName(req);
16
+ return modelResourceName ? `create-${modelResourceName}-model` : undefined;
17
+ }
18
+ export function modelUpdateToken(req) {
19
+ const modelResourceName = extractModelResourceName(req);
20
+ return modelResourceName ? `update-${modelResourceName}-model` : undefined;
21
+ }
22
+ export function modelDeleteToken(req) {
23
+ const modelResourceName = extractModelResourceName(req);
24
+ return modelResourceName ? `delete-${modelResourceName}-model` : undefined;
25
+ }
26
+ export function widgetToken(req) {
27
+ const widgetId = req.params?.widgetId;
28
+ return widgetId ? `widget-${widgetId}` : undefined;
29
+ }
30
+ export function widgetsToken() {
31
+ return "widgets";
32
+ }
33
+ export function catalogToken(req) {
34
+ const slug = req.params?.slug;
35
+ if (!slug)
36
+ return undefined;
37
+ return `catalog-${slug}`;
38
+ }
39
+ export function mediaManagerToken(req) {
40
+ const id = req.params?.id;
41
+ return id ? `mediaManager-${id}` : undefined;
42
+ }
43
+ export function aiModelToken(req) {
44
+ const modelId = req.params?.modelId || (typeof req.body?.modelId === "string" ? req.body.modelId : undefined);
45
+ return modelId ? `ai-assistant-${modelId}` : undefined;
46
+ }
47
+ export function historyToken(req) {
48
+ return `history-${req.adminizer.config.history?.adapter ?? "default"}`;
49
+ }
50
+ export function groupFilterVisibilityToken() {
51
+ return GROUP_FILTER_VISIBILITY_TOKEN;
52
+ }
@@ -0,0 +1,70 @@
1
+ import { Adminizer } from "../lib/Adminizer";
2
+ import { FilterAP } from "../models/FilterAP";
3
+ import { UserAP } from "../models/UserAP";
4
+ /**
5
+ * Feed export format types
6
+ */
7
+ export type FeedFormat = 'json' | 'xml';
8
+ /**
9
+ * FeedService — generates public feed exports (Atom XML, JSON) by apiKey
10
+ * No authentication required — access is granted via apiKey alone
11
+ */
12
+ export declare class FeedService {
13
+ private adminizer;
14
+ constructor(adminizer: Adminizer);
15
+ /**
16
+ * Find filter by apiKey and verify it's enabled
17
+ */
18
+ findFilterByApiKey(apiKey: string): Promise<FilterAP | null>;
19
+ /**
20
+ * Fetch data for a filter (no auth required — public API)
21
+ * Bypasses permission checks by building fields directly from model config
22
+ * Also bypasses DataAccessor to avoid user-based filtering
23
+ */
24
+ private fetchFilterData;
25
+ /**
26
+ * Build fields object directly from model attributes (bypasses permission checks)
27
+ */
28
+ private buildFieldsFromAttributes;
29
+ /**
30
+ * Generate JSON feed
31
+ */
32
+ generateJsonFeed(filter: FilterAP, adminizer?: Adminizer, user?: UserAP): Promise<any>;
33
+ /**
34
+ * Generate Atom XML feed
35
+ */
36
+ generateAtomFeed(filter: FilterAP, adminizer?: Adminizer, user?: UserAP): Promise<string>;
37
+ /**
38
+ * Build Atom XML string
39
+ */
40
+ private buildAtomXml;
41
+ /**
42
+ * Escape XML special characters
43
+ */
44
+ private escapeXml;
45
+ /**
46
+ * Prepare data for export — convert values to human-readable format
47
+ */
48
+ private prepareExportData;
49
+ /**
50
+ * Format value for export based on type
51
+ */
52
+ private formatExportValue;
53
+ /**
54
+ * Apply custom column configuration
55
+ */
56
+ private applyCustomColumns;
57
+ /**
58
+ * Resolve the best field for "newest first" sorting.
59
+ * Priority: createdAt -> created_at -> id
60
+ */
61
+ private resolveCreatedAtSortField;
62
+ /**
63
+ * Find title field in fields config
64
+ */
65
+ private findTitleField;
66
+ /**
67
+ * Find date field in fields config
68
+ */
69
+ private findDateField;
70
+ }