@clement_lores/adminjs 7.8.17 → 7.8.18

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 (415) hide show
  1. package/lib/frontend/assets/scripts/app-bundle.development.js +38842 -0
  2. package/package.json +2 -2
  3. package/types/spec/backend/helpers/helper-stub.d.ts +0 -21
  4. package/types/spec/backend/helpers/resource-stub.d.ts +0 -15
  5. package/types/src/adminjs-options.interface.d.ts +0 -453
  6. package/types/src/adminjs.d.ts +0 -125
  7. package/types/src/adminjs.spec.d.ts +0 -1
  8. package/types/src/backend/actions/action.interface.d.ts +0 -619
  9. package/types/src/backend/actions/bulk-delete/bulk-delete-action.d.ts +0 -11
  10. package/types/src/backend/actions/bulk-delete/bulk-delete-action.spec.d.ts +0 -1
  11. package/types/src/backend/actions/delete/delete-action.d.ts +0 -12
  12. package/types/src/backend/actions/delete/delete-action.spec.d.ts +0 -1
  13. package/types/src/backend/actions/edit/edit-action.d.ts +0 -14
  14. package/types/src/backend/actions/index.d.ts +0 -12
  15. package/types/src/backend/actions/list/list-action.d.ts +0 -33
  16. package/types/src/backend/actions/new/new-action.d.ts +0 -12
  17. package/types/src/backend/actions/search/search-action.d.ts +0 -25
  18. package/types/src/backend/actions/show/show-action.d.ts +0 -12
  19. package/types/src/backend/adapters/database/base-database.d.ts +0 -28
  20. package/types/src/backend/adapters/database/index.d.ts +0 -1
  21. package/types/src/backend/adapters/index.d.ts +0 -4
  22. package/types/src/backend/adapters/property/base-property.d.ts +0 -112
  23. package/types/src/backend/adapters/property/index.d.ts +0 -2
  24. package/types/src/backend/adapters/record/base-record.d.ts +0 -183
  25. package/types/src/backend/adapters/record/base-record.spec.d.ts +0 -1
  26. package/types/src/backend/adapters/record/index.d.ts +0 -2
  27. package/types/src/backend/adapters/record/params.type.d.ts +0 -10
  28. package/types/src/backend/adapters/resource/base-resource.d.ts +0 -204
  29. package/types/src/backend/adapters/resource/base-resource.spec.d.ts +0 -1
  30. package/types/src/backend/adapters/resource/index.d.ts +0 -2
  31. package/types/src/backend/adapters/resource/supported-databases.type.d.ts +0 -1
  32. package/types/src/backend/bundler/app.bundler.d.ts +0 -3
  33. package/types/src/backend/bundler/components.bundler.d.ts +0 -3
  34. package/types/src/backend/bundler/generate-user-component-entry.d.ts +0 -16
  35. package/types/src/backend/bundler/globals.bundler.d.ts +0 -3
  36. package/types/src/backend/bundler/index.d.ts +0 -6
  37. package/types/src/backend/bundler/utils/asset-bundler.d.ts +0 -32
  38. package/types/src/backend/bundler/utils/constants.d.ts +0 -4
  39. package/types/src/backend/controllers/api-controller.d.ts +0 -131
  40. package/types/src/backend/controllers/app-controller.d.ts +0 -16
  41. package/types/src/backend/controllers/index.d.ts +0 -2
  42. package/types/src/backend/decorators/action/action-decorator.d.ts +0 -130
  43. package/types/src/backend/decorators/action/action-decorator.spec.d.ts +0 -1
  44. package/types/src/backend/decorators/action/index.d.ts +0 -1
  45. package/types/src/backend/decorators/index.d.ts +0 -3
  46. package/types/src/backend/decorators/property/index.d.ts +0 -3
  47. package/types/src/backend/decorators/property/property-decorator.d.ts +0 -164
  48. package/types/src/backend/decorators/property/property-decorator.spec.d.ts +0 -1
  49. package/types/src/backend/decorators/property/property-options.interface.d.ts +0 -137
  50. package/types/src/backend/decorators/property/utils/index.d.ts +0 -1
  51. package/types/src/backend/decorators/property/utils/override-from-options.d.ts +0 -4
  52. package/types/src/backend/decorators/property/utils/override-from-options.spec.d.ts +0 -1
  53. package/types/src/backend/decorators/resource/index.d.ts +0 -2
  54. package/types/src/backend/decorators/resource/resource-decorator.d.ts +0 -149
  55. package/types/src/backend/decorators/resource/resource-decorator.spec.d.ts +0 -1
  56. package/types/src/backend/decorators/resource/resource-options.interface.d.ts +0 -134
  57. package/types/src/backend/decorators/resource/utils/decorate-actions.d.ts +0 -16
  58. package/types/src/backend/decorators/resource/utils/decorate-properties.d.ts +0 -15
  59. package/types/src/backend/decorators/resource/utils/decorate-properties.spec.d.ts +0 -1
  60. package/types/src/backend/decorators/resource/utils/find-sub-property.d.ts +0 -12
  61. package/types/src/backend/decorators/resource/utils/flat-sub-properties.d.ts +0 -14
  62. package/types/src/backend/decorators/resource/utils/get-navigation.d.ts +0 -10
  63. package/types/src/backend/decorators/resource/utils/get-navigation.spec.d.ts +0 -1
  64. package/types/src/backend/decorators/resource/utils/get-property-by-key.d.ts +0 -3
  65. package/types/src/backend/decorators/resource/utils/index.d.ts +0 -6
  66. package/types/src/backend/index.d.ts +0 -6
  67. package/types/src/backend/services/action-error-handler/action-error-handler.d.ts +0 -8
  68. package/types/src/backend/services/action-error-handler/action-error-handler.spec.d.ts +0 -1
  69. package/types/src/backend/services/action-error-handler/index.d.ts +0 -1
  70. package/types/src/backend/services/index.d.ts +0 -2
  71. package/types/src/backend/services/sort-setter/index.d.ts +0 -1
  72. package/types/src/backend/services/sort-setter/sort-setter.d.ts +0 -27
  73. package/types/src/backend/utils/auth/base-auth-provider.d.ts +0 -63
  74. package/types/src/backend/utils/auth/default-auth-provider.d.ts +0 -12
  75. package/types/src/backend/utils/auth/index.d.ts +0 -2
  76. package/types/src/backend/utils/build-feature/build-feature.d.ts +0 -40
  77. package/types/src/backend/utils/build-feature/build-feature.spec.d.ts +0 -1
  78. package/types/src/backend/utils/build-feature/index.d.ts +0 -1
  79. package/types/src/backend/utils/component-loader.d.ts +0 -15
  80. package/types/src/backend/utils/errors/app-error.d.ts +0 -35
  81. package/types/src/backend/utils/errors/configuration-error.d.ts +0 -14
  82. package/types/src/backend/utils/errors/forbidden-error.d.ts +0 -26
  83. package/types/src/backend/utils/errors/index.d.ts +0 -7
  84. package/types/src/backend/utils/errors/not-found-error.d.ts +0 -27
  85. package/types/src/backend/utils/errors/not-implemented-error.d.ts +0 -13
  86. package/types/src/backend/utils/errors/record-error.d.ts +0 -17
  87. package/types/src/backend/utils/errors/validation-error.d.ts +0 -34
  88. package/types/src/backend/utils/filter/filter.d.ts +0 -66
  89. package/types/src/backend/utils/filter/index.d.ts +0 -1
  90. package/types/src/backend/utils/index.d.ts +0 -13
  91. package/types/src/backend/utils/layout-element-parser/index.d.ts +0 -1
  92. package/types/src/backend/utils/layout-element-parser/layout-element-parser.d.ts +0 -82
  93. package/types/src/backend/utils/layout-element-parser/layout-element-parser.spec.d.ts +0 -1
  94. package/types/src/backend/utils/options-parser/index.d.ts +0 -1
  95. package/types/src/backend/utils/options-parser/options-parser.d.ts +0 -10
  96. package/types/src/backend/utils/populator/index.d.ts +0 -2
  97. package/types/src/backend/utils/populator/populate-property.d.ts +0 -13
  98. package/types/src/backend/utils/populator/populate-property.spec.d.ts +0 -1
  99. package/types/src/backend/utils/populator/populator.d.ts +0 -10
  100. package/types/src/backend/utils/populator/populator.spec.d.ts +0 -1
  101. package/types/src/backend/utils/request-parser/index.d.ts +0 -1
  102. package/types/src/backend/utils/request-parser/request-parser.d.ts +0 -14
  103. package/types/src/backend/utils/request-parser/request-parser.spec.d.ts +0 -1
  104. package/types/src/backend/utils/resources-factory/index.d.ts +0 -1
  105. package/types/src/backend/utils/resources-factory/resources-factory.d.ts +0 -57
  106. package/types/src/backend/utils/router/index.d.ts +0 -1
  107. package/types/src/backend/utils/router/router.d.ts +0 -24
  108. package/types/src/backend/utils/router/router.spec.d.ts +0 -1
  109. package/types/src/backend/utils/uploaded-file.type.d.ts +0 -25
  110. package/types/src/backend/utils/view-helpers/index.d.ts +0 -1
  111. package/types/src/backend/utils/view-helpers/view-helpers.d.ts +0 -184
  112. package/types/src/backend/utils/view-helpers/view-helpers.spec.d.ts +0 -1
  113. package/types/src/constants.d.ts +0 -7
  114. package/types/src/core-scripts.interface.d.ts +0 -41
  115. package/types/src/current-admin.interface.d.ts +0 -42
  116. package/types/src/frontend/components/actions/action.props.d.ts +0 -29
  117. package/types/src/frontend/components/actions/bulk-delete.d.ts +0 -15
  118. package/types/src/frontend/components/actions/edit.d.ts +0 -7
  119. package/types/src/frontend/components/actions/index.d.ts +0 -31
  120. package/types/src/frontend/components/actions/list.d.ts +0 -7
  121. package/types/src/frontend/components/actions/new.d.ts +0 -7
  122. package/types/src/frontend/components/actions/show.d.ts +0 -14
  123. package/types/src/frontend/components/actions/utils/append-force-refresh.d.ts +0 -13
  124. package/types/src/frontend/components/actions/utils/append-force-refresh.spec.d.ts +0 -1
  125. package/types/src/frontend/components/actions/utils/index.d.ts +0 -1
  126. package/types/src/frontend/components/actions/utils/layout-element-renderer.d.ts +0 -12
  127. package/types/src/frontend/components/app/action-button/action-button.d.ts +0 -40
  128. package/types/src/frontend/components/app/action-button/index.d.ts +0 -1
  129. package/types/src/frontend/components/app/action-header/action-header-props.d.ts +0 -24
  130. package/types/src/frontend/components/app/action-header/action-header.d.ts +0 -19
  131. package/types/src/frontend/components/app/action-header/actions-to-button-group.d.ts +0 -12
  132. package/types/src/frontend/components/app/action-header/actions-to-button-group.spec.d.ts +0 -1
  133. package/types/src/frontend/components/app/action-header/index.d.ts +0 -2
  134. package/types/src/frontend/components/app/action-header/styled-back-button.d.ts +0 -9
  135. package/types/src/frontend/components/app/admin-modal.d.ts +0 -3
  136. package/types/src/frontend/components/app/app-loader.d.ts +0 -2
  137. package/types/src/frontend/components/app/auth-background-component.d.ts +0 -6
  138. package/types/src/frontend/components/app/base-action-component.d.ts +0 -52
  139. package/types/src/frontend/components/app/breadcrumbs.d.ts +0 -30
  140. package/types/src/frontend/components/app/default-dashboard.d.ts +0 -4
  141. package/types/src/frontend/components/app/drawer-portal.d.ts +0 -35
  142. package/types/src/frontend/components/app/error-boundary.d.ts +0 -10
  143. package/types/src/frontend/components/app/error-message.d.ts +0 -36
  144. package/types/src/frontend/components/app/filter-drawer.d.ts +0 -10
  145. package/types/src/frontend/components/app/footer.d.ts +0 -6
  146. package/types/src/frontend/components/app/index.d.ts +0 -21
  147. package/types/src/frontend/components/app/language-select/index.d.ts +0 -1
  148. package/types/src/frontend/components/app/language-select/language-select.d.ts +0 -3
  149. package/types/src/frontend/components/app/logged-in.d.ts +0 -13
  150. package/types/src/frontend/components/app/notice.d.ts +0 -33
  151. package/types/src/frontend/components/app/records-table/index.d.ts +0 -6
  152. package/types/src/frontend/components/app/records-table/no-records.d.ts +0 -11
  153. package/types/src/frontend/components/app/records-table/property-header.d.ts +0 -23
  154. package/types/src/frontend/components/app/records-table/property-header.spec.d.ts +0 -2
  155. package/types/src/frontend/components/app/records-table/record-in-list.d.ts +0 -16
  156. package/types/src/frontend/components/app/records-table/records-table-header.d.ts +0 -81
  157. package/types/src/frontend/components/app/records-table/records-table-header.spec.d.ts +0 -2
  158. package/types/src/frontend/components/app/records-table/records-table.d.ts +0 -53
  159. package/types/src/frontend/components/app/records-table/records-table.spec.d.ts +0 -3
  160. package/types/src/frontend/components/app/records-table/selected-records.d.ts +0 -11
  161. package/types/src/frontend/components/app/records-table/utils/display.d.ts +0 -1
  162. package/types/src/frontend/components/app/records-table/utils/get-bulk-actions-from-records.d.ts +0 -3
  163. package/types/src/frontend/components/app/records-table/utils/get-bulk-actions-from-records.spec.d.ts +0 -2
  164. package/types/src/frontend/components/app/sidebar/index.d.ts +0 -3
  165. package/types/src/frontend/components/app/sidebar/sidebar-branding.d.ts +0 -12
  166. package/types/src/frontend/components/app/sidebar/sidebar-footer.d.ts +0 -7
  167. package/types/src/frontend/components/app/sidebar/sidebar-pages.d.ts +0 -11
  168. package/types/src/frontend/components/app/sidebar/sidebar-resource-section.d.ts +0 -29
  169. package/types/src/frontend/components/app/sidebar/sidebar.d.ts +0 -11
  170. package/types/src/frontend/components/app/sort-link.d.ts +0 -9
  171. package/types/src/frontend/components/app/top-bar.d.ts +0 -9
  172. package/types/src/frontend/components/app/utils/discord-logo-svg.d.ts +0 -4
  173. package/types/src/frontend/components/app/utils/rocket-svg.d.ts +0 -4
  174. package/types/src/frontend/components/app/version.d.ts +0 -10
  175. package/types/src/frontend/components/application.d.ts +0 -6
  176. package/types/src/frontend/components/index.d.ts +0 -6
  177. package/types/src/frontend/components/login/index.d.ts +0 -10
  178. package/types/src/frontend/components/property-type/array/add-new-item-translation.d.ts +0 -9
  179. package/types/src/frontend/components/property-type/array/convert-to-sub-property.d.ts +0 -14
  180. package/types/src/frontend/components/property-type/array/edit.d.ts +0 -6
  181. package/types/src/frontend/components/property-type/array/edit.spec.d.ts +0 -4
  182. package/types/src/frontend/components/property-type/array/index.d.ts +0 -4
  183. package/types/src/frontend/components/property-type/array/list.d.ts +0 -6
  184. package/types/src/frontend/components/property-type/array/remove-sub-property.d.ts +0 -15
  185. package/types/src/frontend/components/property-type/array/remove-sub-property.spec.d.ts +0 -1
  186. package/types/src/frontend/components/property-type/array/show.d.ts +0 -11
  187. package/types/src/frontend/components/property-type/base-property-component.d.ts +0 -12
  188. package/types/src/frontend/components/property-type/base-property-props.d.ts +0 -160
  189. package/types/src/frontend/components/property-type/boolean/boolean-property-value.d.ts +0 -6
  190. package/types/src/frontend/components/property-type/boolean/edit.d.ts +0 -9
  191. package/types/src/frontend/components/property-type/boolean/filter.d.ts +0 -10
  192. package/types/src/frontend/components/property-type/boolean/index.d.ts +0 -5
  193. package/types/src/frontend/components/property-type/boolean/list.d.ts +0 -6
  194. package/types/src/frontend/components/property-type/boolean/map-value.d.ts +0 -2
  195. package/types/src/frontend/components/property-type/boolean/show.d.ts +0 -6
  196. package/types/src/frontend/components/property-type/clean-property-component.d.ts +0 -12
  197. package/types/src/frontend/components/property-type/currency/currency-input-wrapper.d.ts +0 -12
  198. package/types/src/frontend/components/property-type/currency/edit.d.ts +0 -9
  199. package/types/src/frontend/components/property-type/currency/filter.d.ts +0 -9
  200. package/types/src/frontend/components/property-type/currency/format-value.d.ts +0 -2
  201. package/types/src/frontend/components/property-type/currency/index.d.ts +0 -5
  202. package/types/src/frontend/components/property-type/currency/list.d.ts +0 -6
  203. package/types/src/frontend/components/property-type/currency/show.d.ts +0 -9
  204. package/types/src/frontend/components/property-type/datetime/edit.d.ts +0 -9
  205. package/types/src/frontend/components/property-type/datetime/filter.d.ts +0 -10
  206. package/types/src/frontend/components/property-type/datetime/index.d.ts +0 -5
  207. package/types/src/frontend/components/property-type/datetime/list.d.ts +0 -6
  208. package/types/src/frontend/components/property-type/datetime/map-value.d.ts +0 -3
  209. package/types/src/frontend/components/property-type/datetime/show.d.ts +0 -6
  210. package/types/src/frontend/components/property-type/datetime/strip-time-from-iso.d.ts +0 -1
  211. package/types/src/frontend/components/property-type/default-type/default-property-value.d.ts +0 -6
  212. package/types/src/frontend/components/property-type/default-type/edit.d.ts +0 -9
  213. package/types/src/frontend/components/property-type/default-type/filter.d.ts +0 -10
  214. package/types/src/frontend/components/property-type/default-type/index.d.ts +0 -5
  215. package/types/src/frontend/components/property-type/default-type/list.d.ts +0 -6
  216. package/types/src/frontend/components/property-type/default-type/show.d.ts +0 -6
  217. package/types/src/frontend/components/property-type/default-type/show.spec.d.ts +0 -3
  218. package/types/src/frontend/components/property-type/index.d.ts +0 -16
  219. package/types/src/frontend/components/property-type/key-value/edit.d.ts +0 -15
  220. package/types/src/frontend/components/property-type/key-value/index.d.ts +0 -3
  221. package/types/src/frontend/components/property-type/key-value/show.d.ts +0 -8
  222. package/types/src/frontend/components/property-type/mixed/convert-to-sub-property.d.ts +0 -2
  223. package/types/src/frontend/components/property-type/mixed/edit.d.ts +0 -14
  224. package/types/src/frontend/components/property-type/mixed/index.d.ts +0 -4
  225. package/types/src/frontend/components/property-type/mixed/list.d.ts +0 -16
  226. package/types/src/frontend/components/property-type/mixed/show.d.ts +0 -9
  227. package/types/src/frontend/components/property-type/password/edit.d.ts +0 -9
  228. package/types/src/frontend/components/property-type/password/index.d.ts +0 -2
  229. package/types/src/frontend/components/property-type/phone/edit.d.ts +0 -9
  230. package/types/src/frontend/components/property-type/phone/filter.d.ts +0 -10
  231. package/types/src/frontend/components/property-type/phone/index.d.ts +0 -5
  232. package/types/src/frontend/components/property-type/phone/list.d.ts +0 -6
  233. package/types/src/frontend/components/property-type/phone/show.d.ts +0 -6
  234. package/types/src/frontend/components/property-type/record-property-is-equal.d.ts +0 -8
  235. package/types/src/frontend/components/property-type/reference/edit.d.ts +0 -10
  236. package/types/src/frontend/components/property-type/reference/filter.d.ts +0 -10
  237. package/types/src/frontend/components/property-type/reference/index.d.ts +0 -5
  238. package/types/src/frontend/components/property-type/reference/list.d.ts +0 -6
  239. package/types/src/frontend/components/property-type/reference/reference-value.d.ts +0 -7
  240. package/types/src/frontend/components/property-type/reference/show.d.ts +0 -6
  241. package/types/src/frontend/components/property-type/richtext/edit.d.ts +0 -9
  242. package/types/src/frontend/components/property-type/richtext/index.d.ts +0 -4
  243. package/types/src/frontend/components/property-type/richtext/list.d.ts +0 -6
  244. package/types/src/frontend/components/property-type/richtext/show.d.ts +0 -9
  245. package/types/src/frontend/components/property-type/textarea/edit.d.ts +0 -9
  246. package/types/src/frontend/components/property-type/textarea/index.d.ts +0 -3
  247. package/types/src/frontend/components/property-type/textarea/show.d.ts +0 -6
  248. package/types/src/frontend/components/property-type/utils/index.d.ts +0 -2
  249. package/types/src/frontend/components/property-type/utils/property-description/index.d.ts +0 -1
  250. package/types/src/frontend/components/property-type/utils/property-description/property-description.d.ts +0 -9
  251. package/types/src/frontend/components/property-type/utils/property-label/index.d.ts +0 -1
  252. package/types/src/frontend/components/property-type/utils/property-label/property-label.d.ts +0 -12
  253. package/types/src/frontend/components/routes/bulk-action.d.ts +0 -5
  254. package/types/src/frontend/components/routes/dashboard.d.ts +0 -28
  255. package/types/src/frontend/components/routes/index.d.ts +0 -6
  256. package/types/src/frontend/components/routes/page.d.ts +0 -5
  257. package/types/src/frontend/components/routes/record-action.d.ts +0 -5
  258. package/types/src/frontend/components/routes/record-action.spec.d.ts +0 -1
  259. package/types/src/frontend/components/routes/resource-action.d.ts +0 -11
  260. package/types/src/frontend/components/routes/resource.d.ts +0 -11
  261. package/types/src/frontend/components/routes/utils/should-action-re-fetch-data.d.ts +0 -13
  262. package/types/src/frontend/components/routes/utils/wrapper.d.ts +0 -3
  263. package/types/src/frontend/components/spec/action-json.factory.d.ts +0 -1
  264. package/types/src/frontend/components/spec/factory.d.ts +0 -7
  265. package/types/src/frontend/components/spec/initialize-translations.d.ts +0 -1
  266. package/types/src/frontend/components/spec/page-json.factory.d.ts +0 -1
  267. package/types/src/frontend/components/spec/property-json.factory.d.ts +0 -1
  268. package/types/src/frontend/components/spec/record-json.factory.d.ts +0 -1
  269. package/types/src/frontend/components/spec/resource-json.factory.d.ts +0 -1
  270. package/types/src/frontend/components/spec/test-context-provider.d.ts +0 -7
  271. package/types/src/frontend/hoc/allow-override.d.ts +0 -17
  272. package/types/src/frontend/hoc/index.d.ts +0 -3
  273. package/types/src/frontend/hoc/with-no-ssr.d.ts +0 -10
  274. package/types/src/frontend/hoc/with-notice.d.ts +0 -38
  275. package/types/src/frontend/hooks/index.d.ts +0 -14
  276. package/types/src/frontend/hooks/use-action/index.d.ts +0 -3
  277. package/types/src/frontend/hooks/use-action/use-action-response-handler.d.ts +0 -3
  278. package/types/src/frontend/hooks/use-action/use-action.d.ts +0 -15
  279. package/types/src/frontend/hooks/use-action/use-action.types.d.ts +0 -30
  280. package/types/src/frontend/hooks/use-current-admin.d.ts +0 -39
  281. package/types/src/frontend/hooks/use-filter-drawer.d.ts +0 -7
  282. package/types/src/frontend/hooks/use-history-listen.d.ts +0 -2
  283. package/types/src/frontend/hooks/use-local-storage/index.d.ts +0 -2
  284. package/types/src/frontend/hooks/use-local-storage/use-local-storage-result.type.d.ts +0 -16
  285. package/types/src/frontend/hooks/use-local-storage/use-local-storage.d.ts +0 -15
  286. package/types/src/frontend/hooks/use-modal.d.ts +0 -2
  287. package/types/src/frontend/hooks/use-navigation-resources.d.ts +0 -4
  288. package/types/src/frontend/hooks/use-notice.d.ts +0 -29
  289. package/types/src/frontend/hooks/use-query-params.d.ts +0 -35
  290. package/types/src/frontend/hooks/use-record/filter-record.d.ts +0 -4
  291. package/types/src/frontend/hooks/use-record/filter-record.spec.d.ts +0 -1
  292. package/types/src/frontend/hooks/use-record/index.d.ts +0 -6
  293. package/types/src/frontend/hooks/use-record/is-entire-record-given.d.ts +0 -3
  294. package/types/src/frontend/hooks/use-record/merge-record-response.d.ts +0 -14
  295. package/types/src/frontend/hooks/use-record/params-to-form-data.d.ts +0 -17
  296. package/types/src/frontend/hooks/use-record/params-to-form-data.spec.d.ts +0 -1
  297. package/types/src/frontend/hooks/use-record/update-record.d.ts +0 -29
  298. package/types/src/frontend/hooks/use-record/update-record.spec.d.ts +0 -1
  299. package/types/src/frontend/hooks/use-record/use-record.d.ts +0 -15
  300. package/types/src/frontend/hooks/use-record/use-record.type.d.ts +0 -92
  301. package/types/src/frontend/hooks/use-records/index.d.ts +0 -2
  302. package/types/src/frontend/hooks/use-records/use-records-result.type.d.ts +0 -29
  303. package/types/src/frontend/hooks/use-records/use-records.d.ts +0 -14
  304. package/types/src/frontend/hooks/use-resource/index.d.ts +0 -1
  305. package/types/src/frontend/hooks/use-resource/use-resource.d.ts +0 -11
  306. package/types/src/frontend/hooks/use-selected-records/index.d.ts +0 -2
  307. package/types/src/frontend/hooks/use-selected-records/use-selected-records-result.type.d.ts +0 -17
  308. package/types/src/frontend/hooks/use-selected-records/use-selected-records.d.ts +0 -14
  309. package/types/src/frontend/hooks/use-translation.d.ts +0 -51
  310. package/types/src/frontend/index.d.ts +0 -6
  311. package/types/src/frontend/interfaces/action/action-has-component.d.ts +0 -3
  312. package/types/src/frontend/interfaces/action/action-href.d.ts +0 -3
  313. package/types/src/frontend/interfaces/action/action-json.interface.d.ts +0 -84
  314. package/types/src/frontend/interfaces/action/build-action-api-call-trigger.d.ts +0 -12
  315. package/types/src/frontend/interfaces/action/build-action-click-handler.d.ts +0 -16
  316. package/types/src/frontend/interfaces/action/build-action-test-id.d.ts +0 -2
  317. package/types/src/frontend/interfaces/action/call-action-api.d.ts +0 -5
  318. package/types/src/frontend/interfaces/action/index.d.ts +0 -10
  319. package/types/src/frontend/interfaces/action/is-bulk-action.d.ts +0 -4
  320. package/types/src/frontend/interfaces/action/is-record-action.d.ts +0 -4
  321. package/types/src/frontend/interfaces/action/is-resource-action.d.ts +0 -3
  322. package/types/src/frontend/interfaces/index.d.ts +0 -7
  323. package/types/src/frontend/interfaces/modal.interface.d.ts +0 -19
  324. package/types/src/frontend/interfaces/noticeMessage.interface.d.ts +0 -14
  325. package/types/src/frontend/interfaces/page-json.interface.d.ts +0 -19
  326. package/types/src/frontend/interfaces/property-json/index.d.ts +0 -1
  327. package/types/src/frontend/interfaces/property-json/property-json.interface.d.ts +0 -157
  328. package/types/src/frontend/interfaces/record-json.interface.d.ts +0 -51
  329. package/types/src/frontend/interfaces/resource-json.interface.d.ts +0 -71
  330. package/types/src/frontend/layout-template.d.ts +0 -14
  331. package/types/src/frontend/layout-template.spec.d.ts +0 -1
  332. package/types/src/frontend/login-template.d.ts +0 -8
  333. package/types/src/frontend/login-template.spec.d.ts +0 -1
  334. package/types/src/frontend/store/actions/add-notice.d.ts +0 -8
  335. package/types/src/frontend/store/actions/drop-notice.d.ts +0 -8
  336. package/types/src/frontend/store/actions/filter-drawer.d.ts +0 -11
  337. package/types/src/frontend/store/actions/index.d.ts +0 -16
  338. package/types/src/frontend/store/actions/initialize-assets.d.ts +0 -7
  339. package/types/src/frontend/store/actions/initialize-branding.d.ts +0 -7
  340. package/types/src/frontend/store/actions/initialize-dashboard.d.ts +0 -7
  341. package/types/src/frontend/store/actions/initialize-locale.d.ts +0 -7
  342. package/types/src/frontend/store/actions/initialize-pages.d.ts +0 -7
  343. package/types/src/frontend/store/actions/initialize-paths.d.ts +0 -7
  344. package/types/src/frontend/store/actions/initialize-resources.d.ts +0 -7
  345. package/types/src/frontend/store/actions/initialize-theme.d.ts +0 -7
  346. package/types/src/frontend/store/actions/initialize-versions.d.ts +0 -7
  347. package/types/src/frontend/store/actions/modal.d.ts +0 -5
  348. package/types/src/frontend/store/actions/route-changed.d.ts +0 -9
  349. package/types/src/frontend/store/actions/set-current-admin.d.ts +0 -7
  350. package/types/src/frontend/store/actions/set-drawer-preroute.d.ts +0 -11
  351. package/types/src/frontend/store/actions/set-notice-progress.d.ts +0 -10
  352. package/types/src/frontend/store/index.d.ts +0 -5
  353. package/types/src/frontend/store/initialize-store.d.ts +0 -6
  354. package/types/src/frontend/store/reducers/assetsReducer.d.ts +0 -5
  355. package/types/src/frontend/store/reducers/brandingReducer.d.ts +0 -5
  356. package/types/src/frontend/store/reducers/dashboardReducer.d.ts +0 -7
  357. package/types/src/frontend/store/reducers/drawerReducer.d.ts +0 -10
  358. package/types/src/frontend/store/reducers/filterDrawerReducer.d.ts +0 -7
  359. package/types/src/frontend/store/reducers/index.d.ts +0 -15
  360. package/types/src/frontend/store/reducers/localesReducer.d.ts +0 -6
  361. package/types/src/frontend/store/reducers/modalReducer.d.ts +0 -10
  362. package/types/src/frontend/store/reducers/noticesReducer.d.ts +0 -12
  363. package/types/src/frontend/store/reducers/pagesReducer.d.ts +0 -6
  364. package/types/src/frontend/store/reducers/pathsReducer.d.ts +0 -10
  365. package/types/src/frontend/store/reducers/resourcesReducer.d.ts +0 -6
  366. package/types/src/frontend/store/reducers/routerReducer.d.ts +0 -22
  367. package/types/src/frontend/store/reducers/sessionReducer.d.ts +0 -6
  368. package/types/src/frontend/store/reducers/themeReducer.d.ts +0 -8
  369. package/types/src/frontend/store/reducers/versionsReducer.d.ts +0 -5
  370. package/types/src/frontend/store/store.d.ts +0 -21
  371. package/types/src/frontend/store/utils/pages-to-store.d.ts +0 -3
  372. package/types/src/frontend/utils/adminjs.i18n.d.ts +0 -11
  373. package/types/src/frontend/utils/api-client.d.ts +0 -130
  374. package/types/src/frontend/utils/data-css-name.d.ts +0 -3
  375. package/types/src/frontend/utils/index.d.ts +0 -3
  376. package/types/src/frontend/utils/overridable-component.d.ts +0 -11
  377. package/types/src/index.d.ts +0 -9
  378. package/types/src/locale/config.d.ts +0 -87
  379. package/types/src/locale/default-config.d.ts +0 -5
  380. package/types/src/locale/index.d.ts +0 -4
  381. package/types/src/utils/error-type.enum.d.ts +0 -10
  382. package/types/src/utils/file-resolver.d.ts +0 -6
  383. package/types/src/utils/flat/constants.d.ts +0 -2
  384. package/types/src/utils/flat/filter-out-params.d.ts +0 -10
  385. package/types/src/utils/flat/filter-out-params.spec.d.ts +0 -1
  386. package/types/src/utils/flat/flat-module.d.ts +0 -28
  387. package/types/src/utils/flat/flat.types.d.ts +0 -36
  388. package/types/src/utils/flat/get.d.ts +0 -13
  389. package/types/src/utils/flat/get.spec.d.ts +0 -1
  390. package/types/src/utils/flat/index.d.ts +0 -2
  391. package/types/src/utils/flat/merge.d.ts +0 -11
  392. package/types/src/utils/flat/merge.spec.d.ts +0 -1
  393. package/types/src/utils/flat/path-parts.type.d.ts +0 -1
  394. package/types/src/utils/flat/path-to-parts.d.ts +0 -22
  395. package/types/src/utils/flat/property-key-regex.d.ts +0 -2
  396. package/types/src/utils/flat/remove-path.d.ts +0 -10
  397. package/types/src/utils/flat/remove-path.spec.d.ts +0 -1
  398. package/types/src/utils/flat/select-params.d.ts +0 -11
  399. package/types/src/utils/flat/select-params.spec.d.ts +0 -1
  400. package/types/src/utils/flat/set.d.ts +0 -11
  401. package/types/src/utils/flat/set.spec.d.ts +0 -1
  402. package/types/src/utils/index.d.ts +0 -4
  403. package/types/src/utils/param-converter/constants.d.ts +0 -2
  404. package/types/src/utils/param-converter/convert-nested-param.d.ts +0 -3
  405. package/types/src/utils/param-converter/convert-nested-param.spec.d.ts +0 -1
  406. package/types/src/utils/param-converter/convert-param.d.ts +0 -2
  407. package/types/src/utils/param-converter/convert-param.spec.d.ts +0 -1
  408. package/types/src/utils/param-converter/index.d.ts +0 -1
  409. package/types/src/utils/param-converter/param-converter-module.d.ts +0 -11
  410. package/types/src/utils/param-converter/prepare-params.d.ts +0 -3
  411. package/types/src/utils/param-converter/validate-param.d.ts +0 -8
  412. package/types/src/utils/slash/index.d.ts +0 -1
  413. package/types/src/utils/theme-bundler.d.ts +0 -2
  414. package/types/src/utils/translate-functions.factory.d.ts +0 -142
  415. package/types/vendor-types/global.d.ts +0 -15
@@ -1,2 +0,0 @@
1
- export { default as ResourceDecorator } from './resource-decorator.js';
2
- export * from './resource-options.interface.js';
@@ -1,149 +0,0 @@
1
- import { DecoratedActions } from './utils/decorate-actions.js';
2
- import { BaseResource, BaseRecord } from '../../adapters/index.js';
3
- import { PropertyDecorator, ActionDecorator } from '../index.js';
4
- import AdminJS from '../../../adminjs.js';
5
- import { ResourceOptions } from './resource-options.interface.js';
6
- import { CurrentAdmin } from '../../../current-admin.interface.js';
7
- import { ResourceJSON, PropertyPlace } from '../../../frontend/interfaces/index.js';
8
- import { DecoratedProperties } from './utils/index.js';
9
- /**
10
- * Default maximum number of items which should be present in a list.
11
- *
12
- * @type {Number}
13
- * @private
14
- */
15
- export declare const DEFAULT_MAX_COLUMNS_IN_LIST = 8;
16
- /**
17
- * Base decorator class which decorates the Resource.
18
- *
19
- * @category Decorators
20
- */
21
- declare class ResourceDecorator {
22
- /**
23
- * Map of all root level properties. By root properties we mean property which is not nested
24
- * under other mixed property.
25
- *
26
- * Examples from PropertyOptions:
27
- * {
28
- * rootProperty: { type: mixed }, // root property
29
- *
30
- * // nested property - this should go be the subProperty of rootProperty
31
- * 'rootProperty.nested': { type: 'string' }
32
- *
33
- * // also root property because there is no another property of type mixed
34
- * 'another.property': { type: 'string' },
35
- * }
36
- *
37
- * for a the reference {@see decorateProperties}
38
- */
39
- properties: DecoratedProperties;
40
- options: ResourceOptions;
41
- actions: DecoratedActions;
42
- private _resource;
43
- private _admin;
44
- private h;
45
- /**
46
- * @param {object} options
47
- * @param {BaseResource} options.resource resource which is decorated
48
- * @param {AdminJS} options.admin current instance of AdminJS
49
- * @param {ResourceOptions} [options.options]
50
- */
51
- constructor({ resource, admin, options }: {
52
- resource: BaseResource;
53
- admin: AdminJS;
54
- options: ResourceOptions;
55
- });
56
- /**
57
- * Returns the name for the resource.
58
- * @return {string} resource name
59
- */
60
- getResourceName(): string;
61
- /**
62
- * Returns the id for the resource.
63
- * @return {string} resource id
64
- */
65
- id(): string;
66
- /**
67
- * Returns resource parent along with the icon. By default it is a
68
- * database type with its icon
69
- * @return {Parent} ResourceJSON['parent']}
70
- */
71
- getNavigation(): ResourceJSON['navigation'];
72
- /**
73
- * Returns propertyDecorator by giving property path
74
- *
75
- * @param {String} propertyPath property path
76
- *
77
- * @return {PropertyDecorator}
78
- */
79
- getPropertyByKey(propertyPath: string): PropertyDecorator | null;
80
- /**
81
- * Returns list of all properties which will be visible in given place (where)
82
- *
83
- * @param {Object} options
84
- * @param {String} options.where one of: 'list', 'show', 'edit', 'filter'
85
- * @param {String} [options.max] maximum number of properties returned where there are
86
- * no overrides in the options
87
- *
88
- * @return {Array<PropertyDecorator>}
89
- */
90
- getProperties({ where, max }: {
91
- where?: PropertyPlace;
92
- max?: number;
93
- }): Array<PropertyDecorator>;
94
- /**
95
- * Returns all the properties with corresponding subProperties in one object.
96
- */
97
- getFlattenProperties(): Record<string, PropertyDecorator>;
98
- getListProperties(): Array<PropertyDecorator>;
99
- /**
100
- * List of all actions which should be invoked for entire resource and not
101
- * for a particular record
102
- *
103
- * @param {CurrentAdmin} currentAdmin currently logged in admin user
104
- * @return {Array<ActionDecorator>} Actions assigned to resources
105
- */
106
- resourceActions(currentAdmin?: CurrentAdmin): Array<ActionDecorator>;
107
- /**
108
- * List of all actions which should be invoked for entire resource and not
109
- * for a particular record
110
- *
111
- * @param {CurrentAdmin} currentAdmin currently logged in admin user
112
- * @return {Array<ActionDecorator>} Actions assigned to resources
113
- */
114
- bulkActions(record: BaseRecord, currentAdmin?: CurrentAdmin): Array<ActionDecorator>;
115
- /**
116
- * List of all actions which should be invoked for given record and not
117
- * for an entire resource
118
- *
119
- * @param {CurrentAdmin} [currentAdmin] currently logged in admin user
120
- * @return {Array<ActionDecorator>} Actions assigned to each record
121
- */
122
- recordActions(record: BaseRecord, currentAdmin?: CurrentAdmin): Array<ActionDecorator>;
123
- /**
124
- * Returns PropertyDecorator of a property which should be treated as a title property.
125
- *
126
- * @return {PropertyDecorator} PropertyDecorator of title property
127
- */
128
- titleProperty(): PropertyDecorator;
129
- /**
130
- * Returns title for given record.
131
- *
132
- * For example: If given record has `name` property and this property has `isTitle` flag set in
133
- * options or by the Adapter - value for this property will be shown
134
- *
135
- * @param {BaseRecord} record
136
- *
137
- * @return {String} title of given record
138
- */
139
- titleOf(record: BaseRecord): string;
140
- getHref(currentAdmin?: CurrentAdmin): string | null;
141
- /**
142
- * Returns JSON representation of a resource
143
- *
144
- * @param {CurrentAdmin} currentAdmin
145
- * @return {ResourceJSON}
146
- */
147
- toJSON(currentAdmin?: CurrentAdmin): ResourceJSON;
148
- }
149
- export default ResourceDecorator;
@@ -1,134 +0,0 @@
1
- import type { IconProps } from '@clement_lores/admin-design-system';
2
- import { Action, ActionResponse, RecordActionResponse, BulkActionResponse } from '../../actions/action.interface.js';
3
- import PropertyOptions from '../property/property-options.interface.js';
4
- import { ListActionResponse } from '../../actions/list/list-action.js';
5
- import { CurrentAdmin } from '../../../current-admin.interface.js';
6
- import BaseResource from '../../adapters/resource/base-resource.js';
7
- import ViewHelpers from '../../utils/view-helpers/view-helpers.js';
8
- import { SearchActionResponse } from '../../actions/search/search-action.js';
9
- import { LocaleTranslationsBlock } from '../../../index.js';
10
- /**
11
- * @alias HrefContext
12
- * @memberof ResourceOptions
13
- */
14
- export type HrefContext = {
15
- /**
16
- * view helpers
17
- */
18
- h: ViewHelpers;
19
- /**
20
- * Resource on which href has been invoked.
21
- */
22
- resource: BaseResource;
23
- /**
24
- * Currently logged in admin
25
- */
26
- currentAdmin?: CurrentAdmin;
27
- };
28
- /**
29
- * Function returning string or string
30
- *
31
- * @alias HrefFunction
32
- * @memberof ResourceOptions
33
- */
34
- export type HrefFunction = (context: HrefContext) => string;
35
- /**
36
- * Options for given resource
37
- *
38
- * ### Usage with TypeScript
39
- *
40
- * ```typescript
41
- * import { ResourceOptions } from 'adminjs'
42
- * ```
43
- */
44
- export interface ResourceOptions {
45
- /**
46
- * Unique id of a resource.
47
- *
48
- * So let's suppose that you connected 2 databases to AdminJS. Both of them have
49
- * the same collection: 'users'. In this case AdminJS wont be able to distinguish them.
50
- * In this case changing Id of one of the resources helps to solve this issue.
51
- */
52
- id?: string;
53
- /**
54
- * List of properties which should be visible on a list
55
- */
56
- listProperties?: Array<string>;
57
- /**
58
- * List of properties which should be visible on show view
59
- */
60
- showProperties?: Array<string>;
61
- /**
62
- * List of properties which should be visible on edit view
63
- */
64
- editProperties?: Array<string>;
65
- /**
66
- * List of properties which should be visible on the filter
67
- */
68
- filterProperties?: Array<string>;
69
- /**
70
- * Name of title property
71
- */
72
- titleProperty?: string;
73
- /**
74
- * Where resource link in sidebar should redirect. Default to the list action.
75
- */
76
- href?: HrefFunction | string;
77
- /**
78
- * Navigation option saying under which menu this resource should be nested in sidebar.
79
- * Default to the database name.
80
- *
81
- * You have couple of options:
82
- * - when you set both navigation.name and navigation.icon this resource will be nested under
83
- * this menu.
84
- * - when you set navigation.name or navigation to a string this resource will be nested under
85
- * this menu and the icon will come from the database type
86
- * - when you set navigation.icon but leave navigation.name as `null` this resource will be top
87
- * level and it will have an icon.
88
- * - when you set navigation to null this resource will be top level, but without the icon
89
- * - when you set navigation to false this resource will be hidden in the navigation
90
- * @new In version 3.3
91
- */
92
- navigation?: {
93
- name?: string | null;
94
- icon?: IconProps['icon'];
95
- } | string | boolean | null;
96
- /**
97
- * @deprecated in favour of {@link ResourceOptions.navigation}
98
- */
99
- parent?: {
100
- name?: string | null;
101
- icon?: IconProps['icon'];
102
- } | string | null;
103
- /**
104
- * Default sort property and direction.
105
- */
106
- sort?: {
107
- direction: 'asc' | 'desc';
108
- sortBy: string;
109
- };
110
- /**
111
- * List of properties along with their options
112
- */
113
- properties?: Record<string, PropertyOptions>;
114
- /**
115
- * List of all actions along with their options
116
- */
117
- actions?: {
118
- show?: Partial<Action<RecordActionResponse>>;
119
- edit?: Partial<Action<RecordActionResponse>>;
120
- delete?: Partial<Action<RecordActionResponse>>;
121
- bulkDelete?: Partial<Action<BulkActionResponse>>;
122
- new?: Partial<Action<RecordActionResponse>>;
123
- list?: Partial<Action<ListActionResponse>>;
124
- search?: Partial<Action<SearchActionResponse>>;
125
- } | {
126
- [key: string]: Partial<Action<ActionResponse>>;
127
- };
128
- /**
129
- * Resource-specific translations
130
- */
131
- translations?: {
132
- [language: string]: LocaleTranslationsBlock;
133
- };
134
- }
@@ -1,16 +0,0 @@
1
- import ResourceDecorator from '../resource-decorator.js';
2
- import AdminJS from '../../../../adminjs.js';
3
- import { BaseResource } from '../../../adapters/index.js';
4
- import { ActionDecorator } from '../../action/index.js';
5
- export type DecoratedActions = {
6
- [key: string]: ActionDecorator;
7
- };
8
- /**
9
- * Used to create an {@link ActionDecorator} based on both
10
- * {@link AdminJS.ACTIONS default actions} and actions specified by the user
11
- * via {@link AdminJSOptions}
12
- *
13
- * @returns {Record<string, ActionDecorator>}
14
- * @private
15
- */
16
- export declare function decorateActions(resource: BaseResource, admin: AdminJS, decorator: ResourceDecorator): DecoratedActions;
@@ -1,15 +0,0 @@
1
- import ResourceDecorator from '../resource-decorator.js';
2
- import AdminJS from '../../../../adminjs.js';
3
- import { BaseResource } from '../../../adapters/index.js';
4
- import { PropertyDecorator } from '../../property/index.js';
5
- export type DecoratedProperties = {
6
- [key: string]: PropertyDecorator;
7
- };
8
- /**
9
- * Initializes PropertyDecorator for all properties within a resource. When
10
- * user passes new property in the options - it will be created as well.
11
- *
12
- * @returns {Object<string,PropertyDecorator>}
13
- * @private
14
- */
15
- export declare function decorateProperties(resource: BaseResource, admin: AdminJS, decorator: ResourceDecorator): DecoratedProperties;
@@ -1,12 +0,0 @@
1
- import PropertyDecorator from '../../property/property-decorator.js';
2
- import { PathParts } from '../../../../utils/flat/path-parts.type.js';
3
- /**
4
- * @private
5
- *
6
- * @param {PathParts} pathParts parts returned by `pathToParts` method
7
- * @param {PropertyDecorator} rootProperty where function should recursively search for
8
- * a subProperty matching one of the pathParts
9
- *
10
- * @return {PropertyDecorator | null} found subProperty
11
- */
12
- export declare const findSubProperty: (pathParts: PathParts, rootProperty: PropertyDecorator) => PropertyDecorator | null;
@@ -1,14 +0,0 @@
1
- import PropertyDecorator from '../../property/property-decorator.js';
2
- /**
3
- * Bu default all subProperties are nested as an array in root Property. This is easy for
4
- * adapter to maintain. But in AdminJS core we need a fast way to access them by path.
5
- *
6
- * This function changes an array to object recursively (for nested subProperties) so they
7
- * could be accessed via properties['path.to.sub.property']
8
- *
9
- * @param {PropertyDecorator} rootProperty
10
- *
11
- * @return {Record<PropertyDecorator>}
12
- * @private
13
- */
14
- export declare const flatSubProperties: (rootProperty: PropertyDecorator) => Record<string, PropertyDecorator>;
@@ -1,10 +0,0 @@
1
- import { ResourceJSON } from '../../../../frontend/interfaces/index.js';
2
- import { ResourceOptions } from '../resource-options.interface.js';
3
- import { BaseResource, SupportedDatabasesType } from '../../../adapters/index.js';
4
- export type DatabaseData = {
5
- databaseName: BaseResource['databaseName'];
6
- databaseType: BaseResource['databaseType'];
7
- };
8
- export declare const DEFAULT_ICON = "Archive";
9
- export declare const getIcon: (icon?: SupportedDatabasesType | string) => string;
10
- export declare const getNavigation: (options: ResourceOptions, database: DatabaseData) => ResourceJSON['navigation'];
@@ -1,3 +0,0 @@
1
- import { PropertyDecorator } from '../../property/index.js';
2
- import { DecoratedProperties } from './decorate-properties.js';
3
- export declare const getPropertyByKey: (propertyPath: string, properties: DecoratedProperties) => PropertyDecorator | null;
@@ -1,6 +0,0 @@
1
- export * from './find-sub-property.js';
2
- export * from './flat-sub-properties.js';
3
- export * from './get-navigation.js';
4
- export * from './decorate-properties.js';
5
- export * from './decorate-actions.js';
6
- export * from './get-property-by-key.js';
@@ -1,6 +0,0 @@
1
- export * from './actions/index.js';
2
- export * from './adapters/index.js';
3
- export * from './controllers/index.js';
4
- export * from './decorators/index.js';
5
- export * from './services/index.js';
6
- export * from './utils/index.js';
@@ -1,8 +0,0 @@
1
- import { ActionContext, BulkActionResponse, RecordActionResponse } from '../../actions/action.interface.js';
2
- /**
3
- * @private
4
- * @classdesc
5
- * Function which catches all the errors thrown by the action hooks or handler
6
- */
7
- declare const actionErrorHandler: (error: Error, context: ActionContext) => RecordActionResponse | BulkActionResponse;
8
- export default actionErrorHandler;
@@ -1 +0,0 @@
1
- export { default as actionErrorHandler } from './action-error-handler.js';
@@ -1,2 +0,0 @@
1
- export * from './action-error-handler/index.js';
2
- export * from './sort-setter/index.js';
@@ -1 +0,0 @@
1
- export { default as SortSetter } from './sort-setter.js';
@@ -1,27 +0,0 @@
1
- import { ResourceOptions } from '../../decorators/resource/resource-options.interface.js';
2
- declare const DEFAULT_DIRECTION = "asc";
3
- type Sort = {
4
- direction: 'asc' | 'desc';
5
- sortBy: string;
6
- };
7
- /**
8
- * Sets sort parameters for a list.
9
- *
10
- * @private
11
- *
12
- * @param {object} query
13
- * @param {string} [query.direction] either `asc` or `desc`
14
- * @param {string} [query.sortBy] sort by field passed in query
15
- * @param {string} firstPropertyName property name which will be taken as a default
16
- * @param {ResourceOptions} resourceOptions={} options passed along with given resource
17
- * @return {Sort}
18
- */
19
- declare const sortSetter: {
20
- ({ direction, sortBy }: {
21
- direction?: "asc" | "desc" | undefined;
22
- sortBy?: string | undefined;
23
- } | undefined, firstPropertyName: string, resourceOptions?: ResourceOptions): Sort;
24
- DEFAULT_DIRECTION: string;
25
- };
26
- export { DEFAULT_DIRECTION };
27
- export default sortSetter;
@@ -1,63 +0,0 @@
1
- import { CurrentAdmin } from '../../../current-admin.interface.js';
2
- import { ComponentLoader } from '../component-loader.js';
3
- export interface AuthenticatePayload {
4
- [key: string]: any;
5
- }
6
- export interface AuthProviderConfig<T extends AuthenticatePayload> {
7
- componentLoader: ComponentLoader;
8
- authenticate: (payload: T, context?: any) => Promise<CurrentAdmin | null>;
9
- }
10
- export interface LoginHandlerOptions {
11
- data: Record<string, any>;
12
- query?: Record<string, any>;
13
- params?: Record<string, any>;
14
- headers: Record<string, any>;
15
- }
16
- export interface RefreshTokenHandlerOptions extends LoginHandlerOptions {
17
- }
18
- /**
19
- * Extendable class which includes methods allowing you to build custom auth providers or modify existing ones.
20
- *
21
- * Documentation: https://docs.adminjs.co/basics/authentication
22
- */
23
- export declare class BaseAuthProvider<TContext = any> {
24
- /**
25
- * "getUiProps" method should be used to decide which configuration variables are needed
26
- * in the frontend. By default it returns an empty object.
27
- *
28
- * @returns an object sent to the frontend app, available in `window.__APP_STATE__`
29
- */
30
- getUiProps(): Record<string, any>;
31
- /**
32
- * Handle login action of user. The method should return a user object or null.
33
- *
34
- * @param opts Basic REST request data: data (body), query, params, headers
35
- * @param context Full request context specific to your framework, i. e. "request" and "response" in Express
36
- */
37
- handleLogin(opts: LoginHandlerOptions, context?: TContext): Promise<CurrentAdmin | null>;
38
- /**
39
- * "handleLogout" allows you to perform extra actions to log out the user, you have access to request's context.
40
- * For example, you could want to log out the user from external services besides destroying AdminJS session.
41
- * By default, this method is always called by your framework plugin but does nothing.
42
- *
43
- * @param context Full request context specific to your framework, i. e. "request" and "response" in Express
44
- * @returns Returns anything, but the default plugin implementations don't do anything with the result.
45
- */
46
- handleLogout(context?: TContext): Promise<any>;
47
- /**
48
- * This method is assigned to an endpoint at your server's AdminJS "refreshTokenPath". It is not used by default.
49
- * In order to use this API Endpoint, override "AuthenticationBackgroundComponent" by using your ComponentLoader instance.
50
- * You can use that component to call API to refresh your user's session when specific conditions are met. The default
51
- * email/password authentication doesn't require you to refresh your session, but you may want to use "handleRefreshToken"
52
- * in case your authentication is integrated with an external IdP which issues short-lived access tokens.
53
- *
54
- * Any authentication metadata should ideally be stored under "_auth" property of CurrentAdmin.
55
- *
56
- * See more in the documentation: https://docs.adminjs.co/basics/authentication
57
- *
58
- * @param opts Basic REST request data: data (body), query, params, headers
59
- * @param context Full request context specific to your framework, i. e. "request" and "response" in Express
60
- * @returns Updated session object to be merged with existing one.
61
- */
62
- handleRefreshToken(opts: RefreshTokenHandlerOptions, context?: TContext): Promise<any>;
63
- }
@@ -1,12 +0,0 @@
1
- import { AuthProviderConfig, AuthenticatePayload, BaseAuthProvider, LoginHandlerOptions } from './base-auth-provider.js';
2
- export interface DefaultAuthenticatePayload extends AuthenticatePayload {
3
- email: string;
4
- password: string;
5
- }
6
- export interface DefaultAuthProviderConfig extends AuthProviderConfig<DefaultAuthenticatePayload> {
7
- }
8
- export declare class DefaultAuthProvider extends BaseAuthProvider {
9
- protected readonly authenticate: any;
10
- constructor({ authenticate }: DefaultAuthProviderConfig);
11
- handleLogin(opts: LoginHandlerOptions, context: any): Promise<any>;
12
- }
@@ -1,2 +0,0 @@
1
- export * from './base-auth-provider.js';
2
- export * from './default-auth-provider.js';
@@ -1,40 +0,0 @@
1
- import AdminJS from '../../../adminjs.js';
2
- import { FeatureType } from '../../../adminjs-options.interface.js';
3
- import { ResourceOptions } from '../../decorators/resource/resource-options.interface.js';
4
- /**
5
- * @name mergeResourceOptions
6
- * @function
7
- * @description
8
- * Merges 2 ResourceOptions together. Used by features
9
- *
10
- * - 'id', 'href', 'parent', 'sort' from `newOptions` override `oldOptions`
11
- * - 'listProperties', 'showProperties', 'editProperties', 'filterProperties'
12
- * are joined and made unique
13
- * - all 'properties' from `newOptions` override properties from `oldOptions`
14
- * - all 'actions' with their parameters from `newOptions` override `oldOptions`
15
- * except hooks and handler - which are chained.
16
- *
17
- * @param {ResourceOptions} oldOptions
18
- * @param {ResourceOptions} newOptions
19
- *
20
- * @return {ResourceOptions}
21
- */
22
- declare const mergeResourceOptions: (oldOptions?: ResourceOptions, newOptions?: ResourceOptions) => ResourceOptions;
23
- /**
24
- * @name buildFeature
25
- * @function
26
- * @description
27
- * Higher Order Function which creates a feature
28
- *
29
- * @param {ResourceOptions} options
30
- *
31
- * @return {FeatureType}
32
- * @example
33
- * const { buildFeature } = require('adminjs')
34
- *
35
- * const feature = buildFeature({
36
- * // resource options goes here.
37
- * })
38
- */
39
- declare const buildFeature: (options?: ResourceOptions | ((admin: AdminJS) => ResourceOptions)) => FeatureType;
40
- export { mergeResourceOptions, buildFeature };
@@ -1 +0,0 @@
1
- export * from './build-feature.js';
@@ -1,15 +0,0 @@
1
- export interface ComponentDetails {
2
- overrides: boolean;
3
- filePath: string;
4
- }
5
- export declare class ComponentLoader {
6
- protected components: Record<string, ComponentDetails>;
7
- add(name: string, filePath: string, caller?: string): string;
8
- override(name: string, filePath: string, caller?: string): string;
9
- __unsafe_addWithoutChecks(name: string, filePath: string, caller?: string): string;
10
- clear(): void;
11
- getComponents(): Record<string, string>;
12
- __unsafe_merge(componentLoader: ComponentLoader): void;
13
- static resolveFilePath(filePath: string, caller: string): string;
14
- protected static defaultComponents: string[];
15
- }
@@ -1,35 +0,0 @@
1
- import { NoticeMessage } from '../../../index.js';
2
- import RecordError from './record-error.js';
3
- /**
4
- * Error which can be thrown by developer in custom actions/hooks/components
5
- *
6
- * @category Errors
7
- */
8
- export declare class AppError extends Error {
9
- /**
10
- * HTTP Status code, defaults to 400
11
- */
12
- statusCode: number;
13
- /**
14
- * Base error message and type which is stored in the record
15
- */
16
- baseError: RecordError;
17
- /**
18
- * Any custom message which should be seen in the UI
19
- */
20
- baseMessage?: string;
21
- /**
22
- * Any additional error information
23
- */
24
- data?: Record<string, unknown>;
25
- /**
26
- * Any additional notice configuration to show in UI
27
- */
28
- notice?: Partial<NoticeMessage>;
29
- /**
30
- * @param {string} message a message to be shared with the client
31
- * @param {string} data additional data to be shared with the client
32
- */
33
- constructor(message: string, data?: Record<string, unknown>, notice?: Partial<NoticeMessage>);
34
- }
35
- export default AppError;
@@ -1,14 +0,0 @@
1
- /**
2
- * Error which is thrown when user messed up something in the configuration
3
- *
4
- * @category Errors
5
- */
6
- export declare class ConfigurationError extends Error {
7
- /**
8
- * @param {string} fnName name of the function, base on which error will
9
- * print on the output link to the method documentation.
10
- * @param {string} message
11
- */
12
- constructor(message: any, fnName: any);
13
- }
14
- export default ConfigurationError;