adminizer 5.0.0-build.2 → 5.0.0-build.21

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 (300) hide show
  1. package/assets/abnfDiagram-VCTEODGH-CkmsvdDi.js +1 -0
  2. package/assets/add-CESPH_aI.js +1 -0
  3. package/assets/add-group-CQ4Xm8Ru.js +1 -0
  4. package/assets/add-user-B-QNjR4B.js +1 -0
  5. package/assets/ai-assistant/agent.es.js +28362 -0
  6. package/assets/app-C5Ju5Zra.css +1 -0
  7. package/assets/app-Ca5yUSBv.js +138 -0
  8. package/assets/arc-B-Dt8YNl.js +1 -0
  9. package/assets/architectureDiagram-5GKGNRK7-Ca58kq-l.js +36 -0
  10. package/assets/asmcrypto-DZeQH0LC.js +1 -0
  11. package/assets/blockDiagram-NRAW4CY4-CuqE52IG.js +129 -0
  12. package/assets/c4Diagram-UCG6FXSJ-Cx8z-0Bw.js +38 -0
  13. package/assets/catalog-CkSbxvx0.js +6 -0
  14. package/assets/channel-C9z6Pi_j.js +1 -0
  15. package/assets/chunk-2Q5K7J3B-CXISVKTC.js +1 -0
  16. package/assets/chunk-5VM5RSS4-DYGeeVYe.js +15 -0
  17. package/assets/chunk-F27PBJKO-BeY-dbKj.js +1 -0
  18. package/assets/chunk-G27WJ6UU-DeX_eH7C.js +231 -0
  19. package/assets/chunk-JWPE2WC7-DaxI9q0u.js +1 -0
  20. package/assets/chunk-LCL6LL3I-B7PkaEz_.js +206 -0
  21. package/assets/chunk-POPQ4Y6H-lwu6ZpsN.js +1 -0
  22. package/assets/chunk-SVP7TREG-CVFllgl1.js +88 -0
  23. package/assets/chunk-XXDRQBXY-DDLN0rcg.js +1 -0
  24. package/assets/classDiagram-DTDB5LWJ-BKtCIC3B.js +1 -0
  25. package/assets/classDiagram-v2-JRS7N3AN-BKtCIC3B.js +1 -0
  26. package/assets/controls/ckeditor.es.js +9370 -9306
  27. package/assets/controls/handsontable.es.js +11971 -11938
  28. package/assets/controls/jsoneditor.es.js +13104 -13008
  29. package/assets/controls/leaflet.es.js +1023 -1004
  30. package/assets/controls/toast-ui.es.js +1843 -1834
  31. package/assets/cose-bilkent-JH36ORCC-CWRyUkhQ.js +1 -0
  32. package/assets/cynefin-OW5HDTMX-B1iLDXCC.js +166 -0
  33. package/assets/cynefinDiagram-5FMLGOSQ-DaXQHr3l.js +62 -0
  34. package/assets/cytoscape.esm-yzknjiTM.js +321 -0
  35. package/assets/dagre-3AP2YEHR-DFORa4Hz.js +4 -0
  36. package/assets/dashboard-Ssa1_Of3.js +3 -0
  37. package/assets/debounce-B3mXI_sx.js +1 -0
  38. package/assets/defaultLocale-DX6XiGOO.js +1 -0
  39. package/assets/diagram-S7CK7UJ4-CgP6KBo0.js +30 -0
  40. package/assets/diagram-UQ7AKVKN-oYfQe6w0.js +41 -0
  41. package/assets/diagram-VSXAHHWV-DfCU5wgt.js +3 -0
  42. package/assets/diagram-VX7I27RA-BITJVrNY.js +24 -0
  43. package/assets/diagram-Z3DM3KII-D8J9Ssjy.js +24 -0
  44. package/assets/docs-DHMt_Rq1.js +1 -0
  45. package/assets/ebnfDiagram-PWID7BFC-qpNmoYgx.js +1 -0
  46. package/assets/erDiagram-SSCWMZ5O-DDF-Y0zs.js +99 -0
  47. package/assets/flowDiagram-A5DVABFB-CjKVkR9T.js +168 -0
  48. package/assets/ganttDiagram-EL5Y4UJY-BXGQ53w6.js +292 -0
  49. package/assets/gitGraphDiagram-WWUBYQGX-BLMevdLh.js +106 -0
  50. package/assets/history-tBOo2gd5.js +1 -0
  51. package/assets/infoDiagram-RXCK75RN-BAnPdnyw.js +2 -0
  52. package/assets/init-Gi6I4Gst.js +1 -0
  53. package/assets/init-user-DrNUHa6r.js +1 -0
  54. package/assets/isObject-DL-BuaBl.js +1 -0
  55. package/assets/ishikawaDiagram-5VMMS53U-PnL0Z4Li.js +70 -0
  56. package/assets/journeyDiagram-EYS64GPL-CLcsCSwF.js +139 -0
  57. package/assets/kanban-definition-3QL26DDD-C2eU3uBE.js +89 -0
  58. package/assets/katex-HP8lGamR.js +257 -0
  59. package/assets/layout-BXoYdHdx.js +1 -0
  60. package/assets/linear-BSzrP0oP.js +1 -0
  61. package/assets/list-CLg6xeIK.js +4 -0
  62. package/assets/login-Ce7o3-o_.js +1 -0
  63. package/assets/manifest.json +834 -58
  64. package/assets/{media-manager-BDbpSSjH.js → media-manager-D7G1P3fz.js} +3 -3
  65. package/assets/mermaid.core-aKMJHeEk.js +310 -0
  66. package/assets/mindmap-definition-FBJOCRG2-Dzbz5ghA.js +96 -0
  67. package/assets/module-BsXph_pA.js +1 -0
  68. package/assets/notification-D-Zz1gF_.js +20 -0
  69. package/assets/ordinal-Cboi1Yqb.js +1 -0
  70. package/assets/pegDiagram-XKGWAZYB-BTdWkU0Y.js +1 -0
  71. package/assets/pieDiagram-E7YTZNPT-Dnw8-TB-.js +39 -0
  72. package/assets/quadrantDiagram-AXDQQJYC-CALzLlg9.js +7 -0
  73. package/assets/railroadDiagram-O6MQD6OU-CTA1vzcv.js +1 -0
  74. package/assets/register-CNnBkzej.js +1 -0
  75. package/assets/requirementDiagram-EFPCY7ZU-UX2CF5HA.js +84 -0
  76. package/assets/ru-CoNgAwFK.js +1 -0
  77. package/assets/sankeyDiagram-P5KCCOFB-4aPp3ATV.js +40 -0
  78. package/assets/sequenceDiagram-WJ2MYXX4--kltkwJw.js +162 -0
  79. package/assets/sizeCapture-X5ZJPWSS-Ca9-g5QY.js +1 -0
  80. package/assets/stateDiagram-HBIQ2CUA-Diaf5Q7I.js +1 -0
  81. package/assets/stateDiagram-v2-4QOOHH4V-C6FlRp7u.js +1 -0
  82. package/assets/swimlanes-XN3QIQJK-DhqX_myE.js +1 -0
  83. package/assets/swimlanesDiagram-VK2B7HYN-i_3LTEBk.js +8 -0
  84. package/assets/timeline-definition-24CTP7MA-CwkJQbhq.js +120 -0
  85. package/assets/toNumber-DZb-r9sy.js +1 -0
  86. package/assets/use-appearance-DC-DESKB.js +1 -0
  87. package/assets/user-filters-list-W47DTBp2.js +1 -0
  88. package/assets/vennDiagram-4TSXK5OY-BNM3_cVS.js +34 -0
  89. package/assets/wardleyDiagram-VM6X3IG4-BODb1NP8.js +78 -0
  90. package/assets/welcome-BeBm6NIi.js +1 -0
  91. package/assets/with-app-layout-B90DtzYC.js +31 -0
  92. package/assets/xychartDiagram-S5SC5T6Z-DthqEh3g.js +7 -0
  93. package/controllers/access-rights/permissionOptions.d.ts +2 -0
  94. package/controllers/access-rights/permissionOptions.js +23 -0
  95. package/controllers/add.js +1 -1
  96. package/controllers/addGroup.js +15 -6
  97. package/controllers/ai/AiAgentController.d.ts +66 -0
  98. package/controllers/ai/AiAgentController.js +435 -0
  99. package/controllers/ai/AiAssistantController.d.ts +0 -4
  100. package/controllers/ai/AiAssistantController.js +4 -78
  101. package/controllers/catalog/FrontendCatalogAdapter.d.ts +1 -1
  102. package/controllers/catalog/FrontentCatalogAdapter.d.ts +1 -1
  103. package/controllers/docs/index.d.ts +22 -0
  104. package/controllers/docs/index.js +126 -0
  105. package/controllers/edit.js +1 -1
  106. package/controllers/editGroup.js +15 -6
  107. package/controllers/feedback/feedbackController.d.ts +1 -1
  108. package/controllers/filter-fields/savedFilters.js +1 -1
  109. package/controllers/history-actions/HistoryController.d.ts +1 -1
  110. package/controllers/history-actions/HistoryController.js +6 -6
  111. package/controllers/list.js +1 -1
  112. package/controllers/login.js +1 -1
  113. package/controllers/media-manager/mediaManagerAdapter.d.ts +1 -1
  114. package/controllers/notifications/NotificationController.js +14 -8
  115. package/controllers/view.js +2 -2
  116. package/controllers/widgets/filterInfo.js +1 -1
  117. package/helpers/accessRightsHelper.d.ts +11 -4
  118. package/helpers/accessRightsHelper.js +82 -12
  119. package/helpers/assetVersionHelper.d.ts +14 -0
  120. package/helpers/assetVersionHelper.js +42 -0
  121. package/helpers/configHelper.d.ts +3 -3
  122. package/helpers/configHelper.js +20 -18
  123. package/helpers/controllerHelper.d.ts +3 -2
  124. package/helpers/controllerHelper.js +25 -15
  125. package/helpers/fieldsHelper.d.ts +2 -2
  126. package/helpers/fieldsHelper.js +3 -3
  127. package/helpers/filterDatetimeHelper.d.ts +1 -1
  128. package/helpers/inertiaActionsHelper.d.ts +3 -3
  129. package/helpers/inertiaActionsHelper.js +4 -5
  130. package/helpers/inertiaAddHelper.d.ts +5 -5
  131. package/helpers/inertiaAddHelper.js +7 -6
  132. package/helpers/inertiaGroupHelper.d.ts +3 -3
  133. package/helpers/inertiaGroupHelper.js +10 -2
  134. package/helpers/inertiaListHelper.d.ts +4 -4
  135. package/helpers/inertiaListHelper.js +7 -8
  136. package/helpers/inertiaMenuHelper.d.ts +2 -3
  137. package/helpers/inertiaMenuHelper.js +3 -26
  138. package/helpers/inertiaUserHelper.d.ts +3 -3
  139. package/helpers/menuHelper.d.ts +2 -2
  140. package/helpers/modelResourceHelper.d.ts +9 -0
  141. package/helpers/modelResourceHelper.js +43 -0
  142. package/helpers/navigationAccessHelper.d.ts +13 -0
  143. package/helpers/navigationAccessHelper.js +40 -0
  144. package/helpers/translationHelper.d.ts +2 -2
  145. package/index.d.ts +69 -58
  146. package/index.js +11 -0
  147. package/interfaces/adminpanelConfig.d.ts +18 -5
  148. package/interfaces/global.d.ts +6 -6
  149. package/interfaces/internalModelAccess.d.ts +1 -1
  150. package/interfaces/listQueryBuilder.d.ts +1 -1
  151. package/interfaces/types.d.ts +171 -2
  152. package/lib/Adminizer.d.ts +46 -26
  153. package/lib/Adminizer.js +37 -1
  154. package/lib/DataAccessor.d.ts +7 -6
  155. package/lib/DataAccessor.js +50 -48
  156. package/lib/MiddlewareManager.d.ts +1 -1
  157. package/lib/access-rights/AccessRightsHandler.d.ts +2 -2
  158. package/lib/admin-links/AdminLinkHandler.d.ts +72 -0
  159. package/lib/admin-links/AdminLinkHandler.js +175 -0
  160. package/lib/ai-assistant/AbstractAiConversationHistoryService.d.ts +39 -0
  161. package/lib/ai-assistant/AbstractAiConversationHistoryService.js +98 -0
  162. package/lib/ai-assistant/AbstractAiModelService.d.ts +140 -3
  163. package/lib/ai-assistant/AbstractAiModelService.js +154 -1
  164. package/lib/ai-assistant/AiAgentRunManager.d.ts +35 -0
  165. package/lib/ai-assistant/AiAgentRunManager.js +109 -0
  166. package/lib/ai-assistant/AiAssistantAgentSkillHandler.d.ts +58 -0
  167. package/lib/ai-assistant/AiAssistantAgentSkillHandler.js +87 -0
  168. package/lib/ai-assistant/AiAssistantHandler.d.ts +16 -5
  169. package/lib/ai-assistant/AiAssistantHandler.js +35 -1
  170. package/lib/ai-assistant/AiAssistantUiMethodHandler.d.ts +60 -0
  171. package/lib/ai-assistant/AiAssistantUiMethodHandler.js +138 -0
  172. package/lib/ai-assistant/builtinAgentSkills.d.ts +9 -0
  173. package/lib/ai-assistant/builtinAgentSkills.js +256 -0
  174. package/lib/ai-assistant/jsonSafe.d.ts +13 -0
  175. package/lib/ai-assistant/jsonSafe.js +81 -0
  176. package/lib/app-manager/AdminizerApp.d.ts +40 -11
  177. package/lib/app-manager/AppManager.d.ts +2 -2
  178. package/lib/app-manager/AppManager.js +54 -50
  179. package/lib/app-manager/AssetHandler.d.ts +2 -2
  180. package/lib/app-manager/ConfigLayerHandler.d.ts +2 -2
  181. package/lib/app-manager/ControllerHandler.d.ts +2 -2
  182. package/lib/catalog/AbstractCatalog.d.ts +1 -1
  183. package/lib/catalog/CatalogHandler.d.ts +1 -1
  184. package/lib/controls/ControlsHandler.d.ts +1 -1
  185. package/lib/controls/codeEditor/MonacoEditor.d.ts +1 -1
  186. package/lib/controls/geojsoneditor/GeoEditor.d.ts +1 -1
  187. package/lib/controls/jsoneditor/JsonEditor.d.ts +1 -1
  188. package/lib/controls/markdown/ToastUiEditor.d.ts +1 -1
  189. package/lib/controls/table/Handsontable.d.ts +1 -1
  190. package/lib/controls/wysiwyg/CKeditor.d.ts +1 -1
  191. package/lib/docs/AbstractDocumentation.d.ts +100 -0
  192. package/lib/docs/AbstractDocumentation.js +108 -0
  193. package/lib/docs/DocumentationHandler.d.ts +100 -0
  194. package/lib/docs/DocumentationHandler.js +198 -0
  195. package/lib/docs/FileDocumentation.d.ts +47 -0
  196. package/lib/docs/FileDocumentation.js +189 -0
  197. package/lib/docs/docsAgentSkills.d.ts +10 -0
  198. package/lib/docs/docsAgentSkills.js +93 -0
  199. package/lib/feedback/FeedbackHandler.d.ts +2 -2
  200. package/lib/filters/ConditionValidator.d.ts +1 -1
  201. package/lib/filters/FilterCustomFieldHandler.d.ts +2 -2
  202. package/lib/filters/FilterService.d.ts +4 -4
  203. package/lib/filters/FilterService.js +4 -3
  204. package/lib/filters/index.d.ts +6 -6
  205. package/lib/history-actions/AbstractHistoryAdapter.d.ts +6 -6
  206. package/lib/history-actions/AbstractHistoryAdapter.js +11 -9
  207. package/lib/history-actions/DefaultHistoryAdapter.d.ts +4 -4
  208. package/lib/history-actions/HistoryHandler.d.ts +1 -1
  209. package/lib/list-query-builder/ListQueryBuilder.d.ts +7 -7
  210. package/lib/media-manager/AbstractMediaManager.d.ts +2 -2
  211. package/lib/media-manager/MediaManagerHandler.d.ts +1 -1
  212. package/lib/media-manager/Thumb.d.ts +1 -1
  213. package/lib/media-manager/helpers/MediaManagerHelper.d.ts +5 -5
  214. package/lib/model/AbstractModel.d.ts +11 -4
  215. package/lib/model/InternalModelAccessFactory.d.ts +2 -2
  216. package/lib/model/ModelHandler.d.ts +50 -5
  217. package/lib/model/ModelHandler.js +107 -8
  218. package/lib/model/adapter/sequelize.d.ts +7 -5
  219. package/lib/model/adapter/sequelize.js +79 -46
  220. package/lib/model/adapter/typeorm.d.ts +2 -2
  221. package/lib/model/adapter/typeorm.js +1 -1
  222. package/lib/model/internalModelRepository.d.ts +2 -2
  223. package/lib/notifications/AbstractNotificationService.d.ts +4 -4
  224. package/lib/notifications/GeneralNotificationService.d.ts +2 -2
  225. package/lib/notifications/GeneralNotificationService.js +6 -5
  226. package/lib/notifications/NotificationHandler.d.ts +2 -2
  227. package/lib/notifications/SystemNotificationService.d.ts +2 -2
  228. package/lib/notifications/SystemNotificationService.js +1 -1
  229. package/lib/requestProcessor.d.ts +1 -1
  230. package/lib/ui-i18n/uiTranslationKeys.d.ts +2 -1
  231. package/lib/ui-i18n/uiTranslationKeys.js +42 -1
  232. package/lib/widgets/abstractAction.d.ts +1 -1
  233. package/lib/widgets/abstractCustom.d.ts +2 -2
  234. package/lib/widgets/abstractInfo.d.ts +1 -1
  235. package/lib/widgets/abstractLink.d.ts +2 -2
  236. package/lib/widgets/abstractSwitch.d.ts +1 -1
  237. package/lib/widgets/abstractWidgetBase.d.ts +1 -1
  238. package/lib/widgets/widgetHandler.d.ts +9 -9
  239. package/lib/widgets/widgetHandler.js +5 -1
  240. package/models/Filter.d.ts +1 -1
  241. package/models/FilterColumn.d.ts +1 -1
  242. package/models/Group.d.ts +3 -2
  243. package/models/HistoryActions.d.ts +1 -1
  244. package/models/MediaManagerAP.d.ts +2 -2
  245. package/models/MediaManagerAssociationsAP.d.ts +1 -1
  246. package/models/MediaManagerMetaAP.d.ts +1 -1
  247. package/models/User.d.ts +2 -2
  248. package/models/UserNotification.d.ts +1 -1
  249. package/package.json +29 -20
  250. package/policies/authPolicies.js +6 -6
  251. package/policies/permissionResolvers.d.ts +1 -0
  252. package/policies/permissionResolvers.js +3 -0
  253. package/services/FeedService.d.ts +3 -3
  254. package/system/Router.d.ts +1 -1
  255. package/system/Router.js +27 -1
  256. package/system/bindAccessRights.d.ts +1 -1
  257. package/system/bindAccessRights.js +2 -3
  258. package/system/bindAuthorization.d.ts +1 -1
  259. package/system/bindControls.d.ts +1 -1
  260. package/system/bindCors.d.ts +1 -1
  261. package/system/bindCustomFilterHandlers.d.ts +1 -1
  262. package/system/bindDashboardWidgets.d.ts +1 -1
  263. package/system/bindDev.d.ts +1 -1
  264. package/system/bindDocs.d.ts +13 -0
  265. package/system/bindDocs.js +77 -0
  266. package/system/bindHistory.d.ts +1 -1
  267. package/system/bindInertia.d.ts +1 -1
  268. package/system/bindInertia.js +23 -1
  269. package/system/bindMediaManager.d.ts +1 -1
  270. package/system/bindNotifications.d.ts +1 -1
  271. package/system/bindReqFunctions.d.ts +1 -1
  272. package/system/bindTranslations.d.ts +1 -1
  273. package/system/buildInternalModelAccess.d.ts +3 -3
  274. package/system/buildInternalModelAccess.js +5 -2
  275. package/system/defaults.d.ts +1 -1
  276. package/system/routePolicies.d.ts +1 -1
  277. package/system/systemModelContracts.d.ts +1 -1
  278. package/system/systemModelContracts.js +11 -7
  279. package/system/validateSystemModels.d.ts +1 -1
  280. package/system/validateSystemModels.js +29 -9
  281. package/assets/add-group-BdHFzKng.js +0 -1
  282. package/assets/add-p6yGCoZ7.js +0 -1
  283. package/assets/add-user-CDspCLu4.js +0 -1
  284. package/assets/app-DNXiApCk.css +0 -1
  285. package/assets/app-layout-DCr_-JY3.js +0 -1
  286. package/assets/app.js +0 -138
  287. package/assets/catalog-XN-_p9TB.js +0 -6
  288. package/assets/dashboard-CHZO2QFY.js +0 -3
  289. package/assets/debounce-BMmXVQ06.js +0 -1
  290. package/assets/history-CQd0FojQ.js +0 -1
  291. package/assets/init-user-8aUohVDq.js +0 -1
  292. package/assets/list-PHWgTHsg.js +0 -4
  293. package/assets/login-CO4laf6m.js +0 -1
  294. package/assets/module-DVyQtIxm.js +0 -1
  295. package/assets/notification-B87XG8nQ.js +0 -20
  296. package/assets/register-DBYIMXGQ.js +0 -1
  297. package/assets/ru-rYKdQbWF.js +0 -1
  298. package/assets/use-appearance-_EbbjHTh.js +0 -1
  299. package/assets/user-filters-list-BRzDbPkx.js +0 -1
  300. package/assets/welcome-DiXmrTgc.js +0 -1
@@ -1,5 +1,16 @@
1
- import { Sequelize, Op, HasMany } from "sequelize";
2
1
  import { AbstractAdapter, AbstractModel } from "../AbstractModel.js";
2
+ let _Sequelize = null;
3
+ let _Op = null;
4
+ let _HasMany = null;
5
+ async function ensureSequelize() {
6
+ if (_Sequelize)
7
+ return _Sequelize;
8
+ const sequelize = await import('sequelize');
9
+ _Sequelize = sequelize.Sequelize;
10
+ _Op = sequelize.Op;
11
+ _HasMany = sequelize.HasMany;
12
+ return _Sequelize;
13
+ }
3
14
  function resolveType(type) {
4
15
  const sqlType = typeof type.toString === "function"
5
16
  ? type.toString().toLowerCase()
@@ -17,8 +28,10 @@ function resolveType(type) {
17
28
  return "number";
18
29
  if (sqlType.includes("json"))
19
30
  return "json";
20
- if (sqlType.includes("date"))
21
- return "string";
31
+ // Sequelize renders temporal types per dialect: sqlite gives DATETIME/DATE,
32
+ // postgres TIMESTAMP WITH TIME ZONE, mysql DATETIME/TIMESTAMP. Match all of them.
33
+ if (sqlType.includes("date") || sqlType.includes("time"))
34
+ return "date";
22
35
  return "ref";
23
36
  }
24
37
  export function mapSequelizeToAdminizerAttributes(model) {
@@ -92,6 +105,13 @@ function capitalize(str) {
92
105
  }
93
106
  export class SequelizeModel extends AbstractModel {
94
107
  model;
108
+ _init = false;
109
+ async _ensure() {
110
+ if (!this._init) {
111
+ await ensureSequelize();
112
+ this._init = true;
113
+ }
114
+ }
95
115
  constructor(modelName, model) {
96
116
  super(modelName, mapSequelizeToAdminizerAttributes(model), model.primaryKeyAttribute, model.name);
97
117
  this.model = model;
@@ -100,7 +120,7 @@ export class SequelizeModel extends AbstractModel {
100
120
  const pattern = `%${JSON.stringify(item).replace(/[%_]/g, "\\$&")}%`;
101
121
  const attribute = this.model.rawAttributes?.[targetKey];
102
122
  const columnName = typeof attribute?.field === "string" ? attribute.field : targetKey;
103
- return Sequelize.where(Sequelize.cast(Sequelize.col(`${this.model.name}.${columnName}`), "TEXT"), { [Op.like]: pattern });
123
+ return _Sequelize.where(_Sequelize.cast(_Sequelize.col(`${this.model.name}.${columnName}`), "TEXT"), { [_Op.like]: pattern });
104
124
  }
105
125
  _convertCriteriaToSequelize(criteria) {
106
126
  // Special handling for Sequelize.literal() at the top level
@@ -135,24 +155,24 @@ export class SequelizeModel extends AbstractModel {
135
155
  }
136
156
  // Special handling for null values (IS NULL condition)
137
157
  if (value === null) {
138
- result[targetKey] = { [Op.is]: null };
158
+ result[targetKey] = { [_Op.is]: null };
139
159
  continue;
140
160
  }
141
161
  // 🔹 Handle Sequelize Op operators (already in Sequelize format)
142
- if (key === Op.and || key === 'and') {
143
- result[Op.and] = Array.isArray(value)
162
+ if (key === _Op.and || key === 'and') {
163
+ result[_Op.and] = Array.isArray(value)
144
164
  ? value.map((item) => this._convertCriteriaToSequelize(item))
145
165
  : [];
146
166
  continue;
147
167
  }
148
- if (key === Op.or || key === 'or') {
149
- result[Op.or] = Array.isArray(value)
168
+ if (key === _Op.or || key === 'or') {
169
+ result[_Op.or] = Array.isArray(value)
150
170
  ? value.map((item) => this._convertCriteriaToSequelize(item))
151
171
  : [];
152
172
  continue;
153
173
  }
154
- if (key === Op.not || key === 'not' || key === '$not') {
155
- result[Op.not] = this._convertCriteriaToSequelize(value);
174
+ if (key === _Op.not || key === 'not' || key === '$not') {
175
+ result[_Op.not] = this._convertCriteriaToSequelize(value);
156
176
  continue;
157
177
  }
158
178
  // Skip Symbol keys that are not handled above (should not happen, but safety check)
@@ -161,7 +181,7 @@ export class SequelizeModel extends AbstractModel {
161
181
  }
162
182
  if (Array.isArray(value)) {
163
183
  // ✅ Array processing - use the IN operator
164
- result[targetKey] = { [Op.in]: value };
184
+ result[targetKey] = { [_Op.in]: value };
165
185
  }
166
186
  else if (typeof value === "object" && !Array.isArray(value)) {
167
187
  // Check if value already contains Sequelize Op operators
@@ -171,10 +191,10 @@ export class SequelizeModel extends AbstractModel {
171
191
  // Helper function to check if a symbol/op is a Sequelize operator
172
192
  const isSequelizeOp = (op) => {
173
193
  // Check direct Symbol equality first
174
- if (op === Op.gt || op === Op.gte || op === Op.lt || op === Op.lte ||
175
- op === Op.eq || op === Op.ne || op === Op.in || op === Op.notIn ||
176
- op === Op.like || op === Op.iLike || op === Op.between ||
177
- op === Op.startsWith || op === Op.endsWith || op === Op.is || op === Op.not) {
194
+ if (op === _Op.gt || op === _Op.gte || op === _Op.lt || op === _Op.lte ||
195
+ op === _Op.eq || op === _Op.ne || op === _Op.in || op === _Op.notIn ||
196
+ op === _Op.like || op === _Op.iLike || op === _Op.between ||
197
+ op === _Op.startsWith || op === _Op.endsWith || op === _Op.is || op === _Op.not) {
178
198
  return true;
179
199
  }
180
200
  // Fallback: check by Symbol description (handles different Symbol instances)
@@ -204,22 +224,22 @@ export class SequelizeModel extends AbstractModel {
204
224
  continue;
205
225
  switch (op) {
206
226
  case "eq":
207
- result[targetKey] = { [Op.eq]: val };
227
+ result[targetKey] = { [_Op.eq]: val };
208
228
  break;
209
229
  case "ne":
210
- result[targetKey] = { [Op.ne]: val };
230
+ result[targetKey] = { [_Op.ne]: val };
211
231
  break;
212
232
  case "gt":
213
- result[targetKey] = { [Op.gt]: val };
233
+ result[targetKey] = { [_Op.gt]: val };
214
234
  break;
215
235
  case "gte":
216
- result[targetKey] = { [Op.gte]: val };
236
+ result[targetKey] = { [_Op.gte]: val };
217
237
  break;
218
238
  case "lt":
219
- result[targetKey] = { [Op.lt]: val };
239
+ result[targetKey] = { [_Op.lt]: val };
220
240
  break;
221
241
  case "lte":
222
- result[targetKey] = { [Op.lte]: val };
242
+ result[targetKey] = { [_Op.lte]: val };
223
243
  break;
224
244
  case "contains":
225
245
  // Check if field is a date/datetime type
@@ -242,83 +262,83 @@ export class SequelizeModel extends AbstractModel {
242
262
  }
243
263
  else {
244
264
  // Valid date - use exact match
245
- result[targetKey] = { [Op.eq]: dateValue };
265
+ result[targetKey] = { [_Op.eq]: dateValue };
246
266
  }
247
267
  }
248
268
  else {
249
269
  // For time fields and non-date fields - use Op.like with wildcards
250
- result[targetKey] = { [Op.like]: `%${val}%` };
270
+ result[targetKey] = { [_Op.like]: `%${val}%` };
251
271
  }
252
272
  break;
253
273
  case "startsWith":
254
- result[targetKey] = { [Op.startsWith]: val };
274
+ result[targetKey] = { [_Op.startsWith]: val };
255
275
  break;
256
276
  case "endsWith":
257
- result[targetKey] = { [Op.endsWith]: val };
277
+ result[targetKey] = { [_Op.endsWith]: val };
258
278
  break;
259
279
  case ">":
260
- result[targetKey] = { [Op.gt]: val };
280
+ result[targetKey] = { [_Op.gt]: val };
261
281
  break;
262
282
  case ">=":
263
- result[targetKey] = { [Op.gte]: val };
283
+ result[targetKey] = { [_Op.gte]: val };
264
284
  break;
265
285
  case "<":
266
- result[targetKey] = { [Op.lt]: val };
286
+ result[targetKey] = { [_Op.lt]: val };
267
287
  break;
268
288
  case "<=":
269
- result[targetKey] = { [Op.lte]: val };
289
+ result[targetKey] = { [_Op.lte]: val };
270
290
  break;
271
291
  case "!=":
272
- result[targetKey] = { [Op.ne]: val };
292
+ result[targetKey] = { [_Op.ne]: val };
273
293
  break;
274
294
  case "in":
275
- result[targetKey] = { [Op.in]: val };
295
+ result[targetKey] = { [_Op.in]: val };
276
296
  break;
277
297
  case "notIn":
278
- result[targetKey] = { [Op.notIn]: val };
298
+ result[targetKey] = { [_Op.notIn]: val };
279
299
  break;
280
300
  case "nin":
281
- result[targetKey] = { [Op.notIn]: val };
301
+ result[targetKey] = { [_Op.notIn]: val };
282
302
  break;
283
303
  case "between":
284
- result[targetKey] = { [Op.between]: val };
304
+ result[targetKey] = { [_Op.between]: val };
285
305
  break;
286
306
  case "isNull":
287
307
  if (val) {
288
- result[targetKey] = { [Op.is]: null };
308
+ result[targetKey] = { [_Op.is]: null };
289
309
  }
290
310
  break;
291
311
  case "isNotNull":
292
312
  if (val) {
293
- result[targetKey] = { [Op.not]: null };
313
+ result[targetKey] = { [_Op.not]: null };
294
314
  }
295
315
  break;
296
316
  case "regex":
297
- result[targetKey] = { [Op.regexp]: val };
317
+ result[targetKey] = { [_Op.regexp]: val };
298
318
  break;
299
319
  case "jsonContains": {
300
320
  const values = Array.isArray(val) ? val : [val];
301
321
  const clauses = values.map((item) => this._buildJsonContainsCondition(targetKey, item));
302
- result[Op.and] = [
303
- ...(result[Op.and] ?? []),
322
+ result[_Op.and] = [
323
+ ...(result[_Op.and] ?? []),
304
324
  ...clauses
305
325
  ];
306
326
  break;
307
327
  }
308
328
  case "$is":
309
- result[targetKey] = { [Op.is]: val };
329
+ result[targetKey] = { [_Op.is]: val };
310
330
  break;
311
331
  case "$not":
312
- result[targetKey] = { [Op.not]: val };
332
+ result[targetKey] = { [_Op.not]: val };
313
333
  break;
314
334
  case "$ne":
315
- result[targetKey] = { [Op.ne]: val };
335
+ result[targetKey] = { [_Op.ne]: val };
316
336
  break;
317
337
  case "not":
318
- result[targetKey] = { [Op.not]: val };
338
+ result[targetKey] = { [_Op.not]: val };
319
339
  break;
320
340
  default:
321
- result[targetKey] = { [Op.eq]: val };
341
+ result[targetKey] = { [_Op.eq]: val };
322
342
  }
323
343
  }
324
344
  }
@@ -401,6 +421,7 @@ export class SequelizeModel extends AbstractModel {
401
421
  }
402
422
  // --- CREATE ---
403
423
  async _create(data) {
424
+ await this._ensure();
404
425
  // console.clear()
405
426
  const assocNames = Object.keys(this.model.associations);
406
427
  const plainData = {};
@@ -472,6 +493,7 @@ export class SequelizeModel extends AbstractModel {
472
493
  }
473
494
  // --- FIND ONE ---
474
495
  async _findOne(criteria) {
496
+ await this._ensure();
475
497
  // console.debug(">> _findOne: input criteria:", criteria);
476
498
  const { where, attributes } = this._convertAdminizerCriteriaToSequelizeOptions(criteria);
477
499
  const includes = criteria.populate
@@ -498,6 +520,7 @@ export class SequelizeModel extends AbstractModel {
498
520
  }
499
521
  // --- FIND MANY ---
500
522
  async _find(criteria = {}) {
523
+ await this._ensure();
501
524
  const assocNames = Object.keys(this.model.associations);
502
525
  // console.debug(">> _find: input criteria:", criteria, "options:", options);
503
526
  const { where, limit, offset, order, attributes } = this._convertAdminizerCriteriaToSequelizeOptions(criteria);
@@ -553,6 +576,7 @@ export class SequelizeModel extends AbstractModel {
553
576
  * Bypasses Adminizer criteria conversion for direct Sequelize usage
554
577
  */
555
578
  async findWithRawWhere(where, options = {}) {
579
+ await this._ensure();
556
580
  const assocNames = Object.keys(this.model.associations);
557
581
  const includes = options.populate !== false
558
582
  ? assocNames.map(a => ({ association: a }))
@@ -570,6 +594,7 @@ export class SequelizeModel extends AbstractModel {
570
594
  * Public method for count with raw SQL where clauses
571
595
  */
572
596
  async countWithRawWhere(where) {
597
+ await this._ensure();
573
598
  const assocNames = Object.keys(this.model.associations);
574
599
  const include = assocNames.map((association) => ({ association }));
575
600
  return await this.model.count({
@@ -581,6 +606,7 @@ export class SequelizeModel extends AbstractModel {
581
606
  }
582
607
  // --- UPDATE ONE ---
583
608
  async _updateOne(criteria, data) {
609
+ await this._ensure();
584
610
  const { where } = this._convertAdminizerCriteriaToSequelizeOptions(criteria);
585
611
  const record = await this.model.findOne({ where });
586
612
  if (!record)
@@ -612,6 +638,7 @@ export class SequelizeModel extends AbstractModel {
612
638
  }
613
639
  // --- UPDATE MANY ---
614
640
  async _update(criteria, data) {
641
+ await this._ensure();
615
642
  const { where } = this._convertAdminizerCriteriaToSequelizeOptions(criteria);
616
643
  const assocNames = Object.keys(this.model.associations);
617
644
  const plainData = {};
@@ -646,6 +673,7 @@ export class SequelizeModel extends AbstractModel {
646
673
  }
647
674
  // --- DESTROY ONE ---
648
675
  async _destroyOne(criteria) {
676
+ await this._ensure();
649
677
  const { where } = this._convertAdminizerCriteriaToSequelizeOptions(criteria);
650
678
  const record = await this.model.findOne({ where });
651
679
  if (!record)
@@ -681,6 +709,7 @@ export class SequelizeModel extends AbstractModel {
681
709
  }
682
710
  // --- DESTROY MANY ---
683
711
  async _destroy(criteria) {
712
+ await this._ensure();
684
713
  const { where } = this._convertAdminizerCriteriaToSequelizeOptions(criteria);
685
714
  const records = await this.model.findAll({ where });
686
715
  const assocNames = Object.keys(this.model.associations);
@@ -785,7 +814,7 @@ export class SequelizeModel extends AbstractModel {
785
814
  }
786
815
  const association = this.model.associations[alias];
787
816
  const isUsedInWhere = usedRelationAliases.has(alias);
788
- const isHasMany = association instanceof HasMany || association?.associationType === 'HasMany';
817
+ const isHasMany = association instanceof _HasMany || association?.associationType === 'HasMany';
789
818
  // When filtering by relation path ($alias.field$), extra joined hasMany associations
790
819
  // can duplicate base rows and break page size. Load such associations separately.
791
820
  if (isHasMany && !isUsedInWhere) {
@@ -841,10 +870,14 @@ export class SequelizeAdapter extends AbstractAdapter {
841
870
  sequelize;
842
871
  Model = SequelizeModel;
843
872
  constructor(sequelize, options = {}) {
873
+ ensureSequelize();
844
874
  super("sequelize", sequelize, options);
875
+ // Note: ensureSequelize is fire-and-forget during construction
876
+ // Methods also call this._ensure() to guarantee initialization
845
877
  this.sequelize = sequelize;
846
878
  }
847
879
  get models() {
880
+ ``;
848
881
  return this.sequelize.models;
849
882
  }
850
883
  getModel(modelName) {
@@ -1,6 +1,6 @@
1
1
  import { DataSource, EntityMetadata, EntitySchema, ObjectLiteral } from "typeorm";
2
- import { AbstractAdapter, AbstractAdapterOptions, AbstractModel, ModelAttributes } from "../AbstractModel";
3
- import { QueryCriteria } from "../../../interfaces/queryCriteria";
2
+ import { AbstractAdapter, AbstractAdapterOptions, AbstractModel, ModelAttributes } from "../AbstractModel.js";
3
+ import { QueryCriteria } from "../../../interfaces/queryCriteria.js";
4
4
  /**
5
5
  * Experimental TypeORM adapter.
6
6
  *
@@ -24,7 +24,7 @@ function resolveAdminizerTypeFromColumn(column) {
24
24
  if (type.includes("json"))
25
25
  return "json";
26
26
  if (type.includes("date") || type.includes("time"))
27
- return "string";
27
+ return "date";
28
28
  if (type.includes("char") || type.includes("text") || type.includes("uuid") || type.includes("string")) {
29
29
  return "string";
30
30
  }
@@ -1,3 +1,3 @@
1
- import { InternalModelRepository } from "../../interfaces/internalModelAccess";
2
- import { AbstractModel } from "./AbstractModel";
1
+ import { InternalModelRepository } from "../../interfaces/internalModelAccess.js";
2
+ import { AbstractModel } from "./AbstractModel.js";
3
3
  export declare function createInternalModelRepository<T>(modelName: string, model: AbstractModel<T>): InternalModelRepository<T>;
@@ -1,8 +1,8 @@
1
1
  import { EventEmitter } from 'events';
2
- import { Adminizer } from '../Adminizer';
3
- import { INotification, INotificationEvent } from '../../interfaces/types';
4
- import { NotificationModel } from "../../models/Notification";
5
- import { User } from "../../models/User";
2
+ import { Adminizer } from '../Adminizer.js';
3
+ import { INotification, INotificationEvent } from '../../interfaces/types.js';
4
+ import { NotificationModel } from "../../models/Notification.js";
5
+ import { User } from "../../models/User.js";
6
6
  /**
7
7
  * ░█████╗░██████╗░░██████╗████████╗██████╗░░█████╗░░█████╗░████████╗
8
8
  * ██╔══██╗██╔══██╗██╔════╝╚══██╔══╝██╔══██╗██╔══██╗██╔══██╗╚══██╔══╝
@@ -1,5 +1,5 @@
1
- import { AbstractNotificationService } from './AbstractNotificationService';
2
- import { INotification } from '../../interfaces/types';
1
+ import { AbstractNotificationService } from './AbstractNotificationService.js';
2
+ import { INotification } from '../../interfaces/types.js';
3
3
  export declare class GeneralNotificationService extends AbstractNotificationService {
4
4
  readonly notificationClass = "general";
5
5
  readonly displayName: string;
@@ -6,23 +6,24 @@ export class GeneralNotificationService extends AbstractNotificationService {
6
6
  icon = 'info';
7
7
  iconColor = '#5987de';
8
8
  async dispatchNotification(notification) {
9
+ const { userId, ...notificationData } = notification;
9
10
  const fullNotification = {
10
- ...notification,
11
+ ...notificationData,
11
12
  notificationClass: this.notificationClass
12
13
  };
13
14
  let notificationDB;
14
15
  try {
15
16
  notificationDB = await this.notificationModel().create(fullNotification);
16
- if (notification.userId) {
17
+ if (userId) {
17
18
  // For specific user
18
- await this.createUserNotification(notificationDB.id, notification.userId);
19
+ await this.createUserNotification(notificationDB.id, userId);
19
20
  }
20
21
  else {
21
22
  // For all users
22
23
  const users = await this.userModel().find({});
23
24
  for (const user of users) {
24
25
  try {
25
- if (this.adminizer.accessRightsHelper.hasPermission(`notification-${this.notificationClass}`, user)) {
26
+ if (await this.adminizer.accessRightsHelper.hasPermission(`notification-${this.notificationClass}`, user)) {
26
27
  await this.createUserNotification(notificationDB.id, user.id);
27
28
  }
28
29
  else {
@@ -45,7 +46,7 @@ export class GeneralNotificationService extends AbstractNotificationService {
45
46
  },
46
47
  },
47
48
  notificationClass: this.notificationClass,
48
- userId: notification.userId ?? null
49
+ userId: userId ?? null
49
50
  };
50
51
  this.broadcast(event);
51
52
  Adminizer.log.info(`[General] Notification dispatched: ${fullNotification.title}`);
@@ -1,6 +1,6 @@
1
1
  import { EventEmitter } from 'events';
2
- import { AbstractNotificationService } from "./AbstractNotificationService";
3
- import { INotification } from '../../interfaces/types';
2
+ import { AbstractNotificationService } from "./AbstractNotificationService.js";
3
+ import { INotification } from '../../interfaces/types.js';
4
4
  export declare class NotificationHandler extends EventEmitter {
5
5
  private services;
6
6
  constructor();
@@ -1,5 +1,5 @@
1
- import { AbstractNotificationService } from './AbstractNotificationService';
2
- import { INotification } from '../../interfaces/types';
1
+ import { AbstractNotificationService } from './AbstractNotificationService.js';
2
+ import { INotification } from '../../interfaces/types.js';
3
3
  export declare class SystemNotificationService extends AbstractNotificationService {
4
4
  readonly notificationClass = "system";
5
5
  readonly displayName: string;
@@ -19,7 +19,7 @@ export class SystemNotificationService extends AbstractNotificationService {
19
19
  const users = await this.userModel().find({});
20
20
  for (const user of users) {
21
21
  try {
22
- if (this.adminizer.accessRightsHelper.hasPermission(`notification-${this.notificationClass}`, user)) {
22
+ if (await this.adminizer.accessRightsHelper.hasPermission(`notification-${this.notificationClass}`, user)) {
23
23
  await this.createUserNotification(notificationDB.id, user.id);
24
24
  }
25
25
  }
@@ -1,4 +1,4 @@
1
- import { Fields } from "../helpers/fieldsHelper";
1
+ import { Fields } from "../helpers/fieldsHelper.js";
2
2
  type PostParams = Record<string, string | number | boolean | object | string[] | number[] | null>;
3
3
  /**
4
4
  * Default helper that will contain all methods
@@ -1,6 +1,7 @@
1
- export declare const COMMON_UI_TRANSLATION_KEYS: readonly ["Delete", "Diff", "Preview", "Add", "Search", "Yes", "No", "On", "Off", "Hide", "Show", "No notifications found", "No notifications", "No widgets found", "Changes not found", "Old", "New", "Added", "Removed", "Updated", "changed type", "Error: Invalid field data", "Error: Fields data is invalid", "No fields to display", "Error: Some fields are missing required properties (name, type, label)", "Edit", "create", "Clean", "Are you sure?", "Select Item type", "Select Ids", "Open in a new window", "Visible", "Performing an action...", "Action completed", "Action failed", "Save", "First", "Last", "Previous", "Next", "Send feedback", "Feedback", "Title", "Description", "Attach files", "Send", "Sending...", "Feedback sent successfully", "Title is required", "File size exceeds the 5 MB limit", "Remove file", "Max 5 MB per file", "View All", "Make read", "Make all read", "Message", "Date", "Watch", "Current", "There is no history"];
1
+ export declare const COMMON_UI_TRANSLATION_KEYS: readonly ["Delete", "Diff", "Preview", "Add", "Search", "Yes", "No", "On", "Off", "Hide", "Show", "No notifications found", "No notifications", "No widgets found", "Changes not found", "Old", "New", "Added", "Removed", "Updated", "changed type", "Error: Invalid field data", "Error: Fields data is invalid", "No fields to display", "Error: Some fields are missing required properties (name, type, label)", "Edit", "create", "Clean", "Are you sure?", "Select Item type", "Select Ids", "Open in a new window", "Visible", "Performing an action...", "Action completed", "Action failed", "Save", "First", "Last", "Previous", "Next", "Send feedback", "Feedback", "Title", "Description", "Attach files", "Send", "Sending...", "Feedback sent successfully", "Title is required", "File size exceeds the 5 MB limit", "Remove file", "Max 5 MB per file", "View All", "Make read", "Make all read", "Message", "Date", "Watch", "Current", "There is no history", "Documentation", "Page documentation", "Knowledge base", "Schema", "Back to contents", "Open in knowledge base", "Send to assistant", "Failed to load documentation", "Loading...", "Nothing found", "Field", "Type", "Required", "Language"];
2
2
  export declare const FILTER_UI_TRANSLATION_KEYS: readonly ["Filters", "Saved filters", "Active filter", "Add filter", "Reset filter", "Reset", "Equal", "Not equal", "Contains", "Not contains", "Starts with", "Ends with", "Is empty", "Is not empty", "Greater than", "Greater or equal", "Less than", "Less or equal", "Between", "After", "After or equal", "Before", "Before or equal", "In list", "Not in list", "Is null", "Is not null", "Yes", "No", "From", "To", "From...", "To...", "Date...", "Today", "Month", "Month range", "Year", "Year range", "Value...", "Select...", "selected", "Search...", "No results", "Error", "Model not found", "Error applying filter", "Enter filter name", "Temporary filter", "Error: model not found", "Error loading columns", "Network error", "Columns settings", "Available columns", "Visible columns", "Add all", "Hide all", "No available columns", "Move columns here", "Save changes", "Apply", "Save", "Back", "Cancel", "conditions", "modified", "Private filter", "For groups", "Public filter", "Only for you", "For selected groups", "For all users", "Visible only to you", "Visible only to your group", "API access (feed)", "Hide", "Show", "Regenerate", "copied to clipboard", "Failed to copy", "Loading filters...", "No saved filters", "Save current filter for quick access", "Someone else's private filter (owner:", "unknown)", "Owner", "Apply filter", "Delete filter", "No permission to delete filter", "Edit filter", "New filter", "Filter conditions", "Add condition", "Select field", "No conditions. Add a condition above.", "Name", "Description", "Icon", "Color", "Filter parameters", "Change filter conditions and parameters", "Configure filter conditions", "Specify name and parameters for saving", "Someone else's private filter", "You cannot change someone else's filter visibility", "Private", "Public", "Visibility", "Export", "Exporting...", "Export is only available with an active filter", "Export to", "completed", "Export error", "Data in JSON format", "Text format CSV", "Excel file", "Conditions", "Access for groups", "Selected groups", "Groups list", "Columns", "Saving...", "Error saving filter", "Column configuration", "Select and arrange columns to display in the table", "Loading columns...", "Use buttons", "to move and", "to change order", "Add", "Edit", "Save filter", "and", "Custom filtering", "Select a saved filter or create a new one", "Select a filter or create a new one", "Filter visibility", "Unknown", "JSON URL", "XML URL", "API key is not created", "The key is not created. Create it or contact an administrator.", "OK"];
3
3
  export declare const HISTORY_UI_TRANSLATION_KEYS: readonly ["Models", "All", "Users", "Date", "Pick a date", "Search", "Reset", "Model", "Name", "Event", "User", "Diff", "The end of the list has been reached", "There are no records to display"];
4
4
  export declare const HISTORY_TABLE_UI_TRANSLATION_KEYS: readonly ["Event", "Date", "User", "Watch", "Current", "There is no history", "Diff"];
5
5
  export declare const NOTIFICATION_UI_TRANSLATION_KEYS: readonly ["Make read", "View All", "Search", "Make all read", "Title", "Message", "Date", "Diff", "No notifications", "No notifications found", "The end of the list has been reached"];
6
6
  export declare const USER_FILTERS_UI_TRANSLATION_KEYS: readonly ["Loading...", "Search filters...", "All models", "No filters found", "Loading more...", "Filter Name", "Model", "Visibility", "API access (feed)", "Owner", "Private", "Public", "Groups", "Yes", "No", "You", "Unknown", "Reset", "found", "User Filters"];
7
+ export declare const DOCS_UI_TRANSLATION_KEYS: readonly ["Documentation", "Knowledge base", "Contents", "Search documentation", "Search", "Keywords", "Clear", "Nothing found", "There is no documentation yet", "Select a document to read", "Loading...", "Language", "Send to assistant", "Schema", "Related models", "Failed to load documentation", "Field", "Type", "Required", "No fields to display", "Previous", "Next", "Found", "In this document", "Document not found"];
@@ -59,7 +59,21 @@ export const COMMON_UI_TRANSLATION_KEYS = [
59
59
  "Date",
60
60
  "Watch",
61
61
  "Current",
62
- "There is no history"
62
+ "There is no history",
63
+ "Documentation",
64
+ "Page documentation",
65
+ "Knowledge base",
66
+ "Schema",
67
+ "Back to contents",
68
+ "Open in knowledge base",
69
+ "Send to assistant",
70
+ "Failed to load documentation",
71
+ "Loading...",
72
+ "Nothing found",
73
+ "Field",
74
+ "Type",
75
+ "Required",
76
+ "Language"
63
77
  ];
64
78
  export const FILTER_UI_TRANSLATION_KEYS = [
65
79
  "Filters",
@@ -267,3 +281,30 @@ export const USER_FILTERS_UI_TRANSLATION_KEYS = [
267
281
  "found",
268
282
  "User Filters"
269
283
  ];
284
+ export const DOCS_UI_TRANSLATION_KEYS = [
285
+ "Documentation",
286
+ "Knowledge base",
287
+ "Contents",
288
+ "Search documentation",
289
+ "Search",
290
+ "Keywords",
291
+ "Clear",
292
+ "Nothing found",
293
+ "There is no documentation yet",
294
+ "Select a document to read",
295
+ "Loading...",
296
+ "Language",
297
+ "Send to assistant",
298
+ "Schema",
299
+ "Related models",
300
+ "Failed to load documentation",
301
+ "Field",
302
+ "Type",
303
+ "Required",
304
+ "No fields to display",
305
+ "Previous",
306
+ "Next",
307
+ "Found",
308
+ "In this document",
309
+ "Document not found"
310
+ ];
@@ -1,4 +1,4 @@
1
- import { BaseWidget } from "./abstractWidgetBase";
1
+ import { BaseWidget } from "./abstractWidgetBase.js";
2
2
  export declare abstract class ActionBase extends BaseWidget {
3
3
  readonly widgetType = "action";
4
4
  /** Widget background css color */
@@ -1,5 +1,5 @@
1
- import { MaterialIcon } from "../../interfaces/MaaterialIcons";
2
- import type { AppAsset } from "../app-manager/AdminizerApp";
1
+ import { MaterialIcon } from "../../interfaces/MaaterialIcons.js";
2
+ import type { AppAsset } from "../app-manager/AdminizerApp.js";
3
3
  export declare abstract class CustomBase {
4
4
  /** Widget unique id */
5
5
  abstract readonly id: string;
@@ -1,4 +1,4 @@
1
- import { BaseWidget } from "./abstractWidgetBase";
1
+ import { BaseWidget } from "./abstractWidgetBase.js";
2
2
  export interface WidgetInfoContext {
3
3
  user?: ReqType["user"];
4
4
  }
@@ -1,5 +1,5 @@
1
- import { BaseWidget } from "./abstractWidgetBase";
2
- import { MaterialIcon } from "../../interfaces/MaaterialIcons";
1
+ import { BaseWidget } from "./abstractWidgetBase.js";
2
+ import { MaterialIcon } from "../../interfaces/MaaterialIcons.js";
3
3
  export interface Links {
4
4
  name: string;
5
5
  description: string;
@@ -1,4 +1,4 @@
1
- import { BaseWidget } from "./abstractWidgetBase";
1
+ import { BaseWidget } from "./abstractWidgetBase.js";
2
2
  export declare abstract class SwitchBase extends BaseWidget {
3
3
  readonly widgetType = "switcher";
4
4
  /** Widget background css color */
@@ -1,4 +1,4 @@
1
- import { MaterialIcon } from "../../interfaces/MaaterialIcons";
1
+ import { MaterialIcon } from "../../interfaces/MaaterialIcons.js";
2
2
  export declare abstract class BaseWidget {
3
3
  /** Widget unique id */
4
4
  abstract readonly id: string;
@@ -1,12 +1,12 @@
1
- import { SwitchBase } from "./abstractSwitch";
2
- import { InfoBase } from "./abstractInfo";
3
- import { ActionBase } from "./abstractAction";
4
- import { LinkBase } from "./abstractLink";
5
- import { CustomBase } from "./abstractCustom";
6
- import { AdminpanelIcon } from "../../interfaces/adminpanelConfig";
7
- import { Adminizer } from "../Adminizer";
8
- import { User } from "../../models/User";
9
- import { I18n } from "../I18n";
1
+ import { SwitchBase } from "./abstractSwitch.js";
2
+ import { InfoBase } from "./abstractInfo.js";
3
+ import { ActionBase } from "./abstractAction.js";
4
+ import { LinkBase } from "./abstractLink.js";
5
+ import { CustomBase } from "./abstractCustom.js";
6
+ import { AdminpanelIcon } from "../../interfaces/adminpanelConfig.js";
7
+ import { Adminizer } from "../Adminizer.js";
8
+ import { User } from "../../models/User.js";
9
+ import { I18n } from "../I18n.js";
10
10
  export type WidgetType = (SwitchBase | InfoBase | ActionBase | LinkBase | CustomBase);
11
11
  export interface WidgetConfig {
12
12
  id: string;
@@ -116,7 +116,11 @@ export class WidgetHandler {
116
116
  const filterService = new FilterService(this.adminizer);
117
117
  const result = [];
118
118
  for (const modelName of modelNames) {
119
- if (!this.adminizer.accessRightsHelper.hasPermission(`read-${modelName}-model`, user)) {
119
+ const readToken = `read-${modelName}-model`;
120
+ if (!this.adminizer.accessRightsHelper.hasToken(readToken)) {
121
+ continue;
122
+ }
123
+ if (!this.adminizer.accessRightsHelper.hasPermission(readToken, user)) {
120
124
  continue;
121
125
  }
122
126
  let filters = [];
@@ -1,4 +1,4 @@
1
- import type { FilterColumn } from "./FilterColumn";
1
+ import type { FilterColumn } from "./FilterColumn.js";
2
2
  /**
3
3
  * Filter operators for query conditions
4
4
  */