@mediusinc/mng-commons 5.5.0-rc.4 → 6.0.0-rc.2

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 (267) hide show
  1. package/core/action/action-parameters.model.d.ts +4 -4
  2. package/core/data-providers/base.data-provider.d.ts +4 -7
  3. package/core/data-providers/lookup.data-provider.d.ts +2 -2
  4. package/core/descriptors/model.descriptor.d.ts +1 -7
  5. package/core/descriptors/tableview.descriptor.d.ts +5 -5
  6. package/core/helpers/route.d.ts +0 -1
  7. package/core/helpers/type-helpers.d.ts +8 -0
  8. package/core/index.d.ts +0 -3
  9. package/core/models/menu.model.d.ts +0 -4
  10. package/core/services/commons.service.d.ts +0 -32
  11. package/core/services/tokens/module-config.token.d.ts +0 -28
  12. package/esm2022/core/action/action-parameters.model.mjs +1 -1
  13. package/esm2022/core/data-providers/base.data-provider.mjs +2 -4
  14. package/esm2022/core/data-providers/lookup.data-provider.mjs +1 -1
  15. package/esm2022/core/descriptors/model.descriptor.mjs +1 -1
  16. package/esm2022/core/descriptors/tableview.descriptor.mjs +1 -1
  17. package/esm2022/core/helpers/type-helpers.mjs +1 -1
  18. package/esm2022/core/index.mjs +1 -4
  19. package/esm2022/core/models/menu.model.mjs +1 -1
  20. package/esm2022/core/services/commons.service.mjs +1 -34
  21. package/esm2022/core/services/tokens/module-config.token.mjs +1 -1
  22. package/esm2022/filter/descriptors/filter-lookup.descriptor.mjs +5 -86
  23. package/esm2022/filter/descriptors/filter.descriptor.mjs +7 -29
  24. package/esm2022/form/api/data-providers/lookup-data-provider.factory.mjs +14 -41
  25. package/esm2022/form/api/data-providers/lookup.data-provider.mjs +3 -3
  26. package/esm2022/model/class/data-providers/base-from-class-data-provider.factory.mjs +5 -0
  27. package/esm2022/model/class/descriptors/model-class.descriptor.mjs +28 -0
  28. package/esm2022/model/class/descriptors/type-class.descriptor.mjs +6 -0
  29. package/esm2022/model/class/helpers/model.mjs +53 -0
  30. package/esm2022/model/class/index.mjs +8 -0
  31. package/esm2022/model/class/mediusinc-mng-commons-model-class.mjs +5 -0
  32. package/esm2022/model/data-providers/base-from-type-data-provider.factory.mjs +11 -6
  33. package/esm2022/model/descriptors/model.descriptor.mjs +11 -54
  34. package/esm2022/model/descriptors/type.descriptor.mjs +2 -10
  35. package/esm2022/model/index.mjs +1 -2
  36. package/esm2022/table/api/class/class-table-attribute-converter.mjs +80 -0
  37. package/esm2022/table/api/class/class-table-attribute.model.mjs +2 -0
  38. package/esm2022/table/api/class/class-table-data-provider.factory.mjs +5 -0
  39. package/esm2022/table/api/class/class-table-descriptor-helpers.mjs +99 -0
  40. package/esm2022/table/api/class/class-table-descriptor.factory.mjs +21 -0
  41. package/esm2022/table/api/class/index.mjs +6 -0
  42. package/esm2022/table/api/class/mediusinc-mng-commons-table-api-class.mjs +5 -0
  43. package/esm2022/table/api/data-providers/table-data-provider.factory.mjs +14 -41
  44. package/esm2022/table/api/data-providers/table.data-provider.mjs +3 -9
  45. package/esm2022/table/api/descriptors/column.descriptor.mjs +8 -3
  46. package/esm2022/table/api/descriptors/table-descriptor.factory.mjs +10 -77
  47. package/esm2022/table/api/descriptors/table.descriptor.mjs +3 -3
  48. package/esm2022/table/api/helpers/column-converter.mjs +25 -0
  49. package/esm2022/table/api/helpers/table-data-provider-descriptor-convert.mjs +4 -4
  50. package/esm2022/table/api/index.mjs +2 -4
  51. package/esm2022/table/api/models/table-columns.model.mjs +1 -1
  52. package/esm2022/table/components/column-value/column-value.component.mjs +4 -3
  53. package/esm2022/table/components/filter/filter-active-tag/filter-active-tag.component.mjs +3 -3
  54. package/esm2022/table/components/filter/filter-form/filter-form.component.mjs +5 -5
  55. package/esm2022/table/components/table/table.component.mjs +6 -8
  56. package/esm2022/tableview/action/components/action/action.component.mjs +1 -1
  57. package/esm2022/tableview/action/components/editor/injector-context/action-editor-injector-context.component.mjs +10 -6
  58. package/esm2022/tableview/action/helpers/action-execution.mjs +1 -1
  59. package/esm2022/tableview/action/models/execution/action-context.model.mjs +1 -1
  60. package/esm2022/tableview/action/models/execution/action-instance.model.mjs +1 -1
  61. package/esm2022/tableview/action/services/action-executor.service.mjs +11 -11
  62. package/esm2022/tableview/action/services/data-provider-executor.service.mjs +18 -3
  63. package/esm2022/tableview/api/action/descriptors/action-confirmation.descriptor.mjs +1 -1
  64. package/esm2022/tableview/api/action/descriptors/action-descriptor.factory.mjs +13 -104
  65. package/esm2022/tableview/api/action/descriptors/action-editor-descriptor.factory.mjs +15 -62
  66. package/esm2022/tableview/api/action/descriptors/action-editor.descriptor.mjs +3 -63
  67. package/esm2022/tableview/api/action/descriptors/action-link-descriptor.factory.mjs +17 -30
  68. package/esm2022/tableview/api/action/descriptors/action-link.descriptor.mjs +1 -1
  69. package/esm2022/tableview/api/action/descriptors/action.descriptor.mjs +6 -29
  70. package/esm2022/tableview/api/action/descriptors/editor-action-descriptor.factory.mjs +21 -0
  71. package/esm2022/tableview/api/action/descriptors/editor-action-editor-descriptor.factory.mjs +21 -0
  72. package/esm2022/tableview/api/action/descriptors/table-action-descriptor.factory.mjs +37 -0
  73. package/esm2022/tableview/api/action/descriptors/table-action-editor-descriptor.factory.mjs +40 -0
  74. package/esm2022/tableview/api/action/helpers/data-provider-executors.mjs +25 -5
  75. package/esm2022/tableview/api/action/models/action-descriptor.types.mjs +1 -1
  76. package/esm2022/tableview/api/action/models/action-error.model.mjs +1 -1
  77. package/esm2022/tableview/api/action/models/execution/action-context-validation.model.mjs +1 -1
  78. package/esm2022/tableview/api/action/models/execution/action-context.model.mjs +1 -1
  79. package/esm2022/tableview/api/action/models/execution/action-instance.model.mjs +1 -1
  80. package/esm2022/tableview/api/action/models/tableview-action-default-categories.model.mjs +6 -6
  81. package/esm2022/tableview/api/action/services/data-provider-executor.service.mjs +3 -3
  82. package/esm2022/tableview/api/class/editor/class-editor-attribute-converter.mjs +85 -0
  83. package/esm2022/tableview/api/class/editor/class-editor-attribute.model.mjs +2 -0
  84. package/esm2022/tableview/api/class/editor/class-editor-data-provider.factory.mjs +5 -0
  85. package/esm2022/tableview/api/class/editor/class-editor-descriptor-helpers.mjs +95 -0
  86. package/esm2022/tableview/api/class/editor/class-editor-descriptor.factory.mjs +21 -0
  87. package/esm2022/tableview/api/class/index.mjs +13 -0
  88. package/esm2022/tableview/api/class/mediusinc-mng-commons-tableview-api-class.mjs +5 -0
  89. package/esm2022/tableview/api/class/tableview/class-tableview-attribute-converter.mjs +35 -0
  90. package/esm2022/tableview/api/class/tableview/class-tableview-attribute.model.mjs +2 -0
  91. package/esm2022/tableview/api/class/tableview/class-tableview-data-provider.factory.mjs +5 -0
  92. package/esm2022/tableview/api/class/tableview/class-tableview-descriptor-helpers.mjs +111 -0
  93. package/esm2022/tableview/api/class/tableview/class-tableview-descriptor.factory.mjs +26 -0
  94. package/esm2022/tableview/api/editor/data-providers/editor-data-provider.factory.mjs +14 -32
  95. package/esm2022/tableview/api/editor/data-providers/editor.data-provider.mjs +40 -7
  96. package/esm2022/tableview/api/editor/descriptors/editor-descriptor.factory.mjs +7 -73
  97. package/esm2022/tableview/api/editor/descriptors/editor.descriptor.mjs +49 -134
  98. package/esm2022/tableview/api/editor/descriptors/field-base.descriptor.mjs +11 -2
  99. package/esm2022/tableview/api/editor/descriptors/field-lookup.descriptor.mjs +3 -5
  100. package/esm2022/tableview/api/editor/descriptors/field-many.descriptor.mjs +2 -18
  101. package/esm2022/tableview/api/editor/descriptors/wrappers/editor-descriptor-nested-object-wrapper.mjs +51 -0
  102. package/esm2022/tableview/api/editor/models/editor-fields.model.mjs +1 -1
  103. package/esm2022/tableview/api/editor/models/form-editor.event.mjs +1 -1
  104. package/esm2022/tableview/api/index.mjs +8 -8
  105. package/esm2022/tableview/api/tableview/data-providers/tableview-data-provider.factory.mjs +13 -51
  106. package/esm2022/tableview/api/tableview/data-providers/tableview.data-provider.mjs +19 -11
  107. package/esm2022/tableview/api/tableview/descriptors/tableview-descriptor.factory.mjs +19 -96
  108. package/esm2022/tableview/api/tableview/descriptors/tableview.descriptor.mjs +29 -182
  109. package/esm2022/tableview/api/tableview/helpers/tableview-create.mjs +8 -6
  110. package/esm2022/tableview/api/tableview/helpers/tableview-data-provider-descriptor-convert.mjs +4 -4
  111. package/esm2022/tableview/api/tableview/helpers/tableview-default-actions.mjs +117 -99
  112. package/esm2022/tableview/api/tableview/helpers/tableview-input-builder.mjs +164 -7
  113. package/esm2022/tableview/api/tableview/models/tableview-descriptor-fields-manage-helper.type.mjs +2 -0
  114. package/esm2022/tableview/api/tableview/models/tableview-descriptor-helper.type.mjs +2 -0
  115. package/esm2022/tableview/api/tableview/models/tableview-input.model.mjs +1 -1
  116. package/esm2022/tableview/api/tableview/models/tableview-route.model.mjs +1 -1
  117. package/esm2022/tableview/editor/components/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +6 -6
  118. package/esm2022/tableview/editor/helpers/editor-field.mjs +3 -3
  119. package/esm2022/tableview/editor/helpers/editor-formly.mjs +4 -4
  120. package/esm2022/tableview/editor/helpers/field-create.mjs +21 -0
  121. package/esm2022/tableview/index.mjs +3 -2
  122. package/esm2022/tableview/tableview/components/route/tableview-route.component.mjs +1 -1
  123. package/esm2022/tableview/tableview/components/tableview/tableview.component.mjs +3 -1
  124. package/fesm2022/mediusinc-mng-commons-core.mjs +687 -781
  125. package/fesm2022/mediusinc-mng-commons-core.mjs.map +1 -1
  126. package/fesm2022/mediusinc-mng-commons-filter.mjs +10 -113
  127. package/fesm2022/mediusinc-mng-commons-filter.mjs.map +1 -1
  128. package/fesm2022/mediusinc-mng-commons-form-api.mjs +15 -42
  129. package/fesm2022/mediusinc-mng-commons-form-api.mjs.map +1 -1
  130. package/fesm2022/mediusinc-mng-commons-model-class.mjs +97 -0
  131. package/fesm2022/mediusinc-mng-commons-model-class.mjs.map +1 -0
  132. package/fesm2022/mediusinc-mng-commons-model.mjs +23 -137
  133. package/fesm2022/mediusinc-mng-commons-model.mjs.map +1 -1
  134. package/fesm2022/mediusinc-mng-commons-table-api-class.mjs +204 -0
  135. package/fesm2022/mediusinc-mng-commons-table-api-class.mjs.map +1 -0
  136. package/fesm2022/mediusinc-mng-commons-table-api.mjs +55 -319
  137. package/fesm2022/mediusinc-mng-commons-table-api.mjs.map +1 -1
  138. package/fesm2022/mediusinc-mng-commons-table.mjs +14 -15
  139. package/fesm2022/mediusinc-mng-commons-table.mjs.map +1 -1
  140. package/fesm2022/mediusinc-mng-commons-tableview-api-class.mjs +367 -0
  141. package/fesm2022/mediusinc-mng-commons-tableview-api-class.mjs.map +1 -0
  142. package/fesm2022/mediusinc-mng-commons-tableview-api.mjs +715 -1298
  143. package/fesm2022/mediusinc-mng-commons-tableview-api.mjs.map +1 -1
  144. package/fesm2022/mediusinc-mng-commons-tableview.mjs +67 -27
  145. package/fesm2022/mediusinc-mng-commons-tableview.mjs.map +1 -1
  146. package/filter/descriptors/filter-lookup.descriptor.d.ts +1 -26
  147. package/filter/descriptors/filter.descriptor.d.ts +5 -12
  148. package/form/api/data-providers/lookup-data-provider.factory.d.ts +17 -20
  149. package/form/api/data-providers/lookup.data-provider.d.ts +3 -3
  150. package/model/class/README.md +8 -0
  151. package/model/class/data-providers/base-from-class-data-provider.factory.d.ts +3 -0
  152. package/model/class/descriptors/model-class.descriptor.d.ts +12 -0
  153. package/model/class/descriptors/type-class.descriptor.d.ts +3 -0
  154. package/model/{helpers → class/helpers}/model.d.ts +1 -2
  155. package/model/class/index.d.ts +4 -0
  156. package/model/data-providers/base-from-type-data-provider.factory.d.ts +13 -6
  157. package/model/descriptors/model.descriptor.d.ts +12 -27
  158. package/model/descriptors/type.descriptor.d.ts +0 -5
  159. package/model/index.d.ts +0 -1
  160. package/package.json +25 -7
  161. package/table/api/class/README.md +10 -0
  162. package/table/api/{helpers/class-attribute-converter.d.ts → class/class-table-attribute-converter.d.ts} +2 -9
  163. package/table/api/{models → class}/class-table-attribute.model.d.ts +1 -1
  164. package/table/api/class/class-table-data-provider.factory.d.ts +4 -0
  165. package/table/api/{helpers/table-descriptor-helpers.d.ts → class/class-table-descriptor-helpers.d.ts} +2 -4
  166. package/table/api/class/class-table-descriptor.factory.d.ts +11 -0
  167. package/table/api/class/index.d.ts +5 -0
  168. package/table/api/data-providers/table-data-provider.factory.d.ts +17 -20
  169. package/table/api/data-providers/table.data-provider.d.ts +4 -12
  170. package/table/api/descriptors/column.descriptor.d.ts +5 -2
  171. package/table/api/descriptors/table-descriptor.factory.d.ts +3 -39
  172. package/table/api/descriptors/table.descriptor.d.ts +3 -3
  173. package/table/api/helpers/column-converter.d.ts +7 -0
  174. package/table/api/helpers/table-data-provider-descriptor-convert.d.ts +3 -3
  175. package/table/api/index.d.ts +1 -3
  176. package/table/api/models/table-columns.model.d.ts +2 -2
  177. package/table/components/column-value/column-value.component.d.ts +1 -0
  178. package/table/components/filter/filter-active-tag/filter-active-tag.component.d.ts +1 -1
  179. package/table/components/filter/filter-form/filter-form.component.d.ts +1 -1
  180. package/table/components/filter/filter-overlay-with-tag/filter-overlay-with-tag.component.d.ts +1 -1
  181. package/table/components/table/table.component.d.ts +0 -9
  182. package/tableview/action/components/action/action.component.d.ts +2 -2
  183. package/tableview/action/components/editor/action-editor.component.d.ts +1 -1
  184. package/tableview/action/components/editor/injector-context/action-editor-injector-context.component.d.ts +6 -5
  185. package/tableview/action/components/localization/data-language-dropdown.component.d.ts +3 -3
  186. package/tableview/action/components/table/action-table.component.d.ts +3 -3
  187. package/tableview/action/helpers/action-execution.d.ts +1 -1
  188. package/tableview/action/models/execution/action-context.model.d.ts +3 -3
  189. package/tableview/action/models/execution/action-instance.model.d.ts +5 -5
  190. package/tableview/action/services/action-executor.service.d.ts +7 -7
  191. package/tableview/action/services/data-provider-executor.service.d.ts +16 -16
  192. package/tableview/action/services/view-container.service.d.ts +1 -1
  193. package/tableview/api/action/descriptors/action-confirmation.descriptor.d.ts +1 -1
  194. package/tableview/api/action/descriptors/action-descriptor.factory.d.ts +20 -31
  195. package/tableview/api/action/descriptors/action-editor-descriptor.factory.d.ts +18 -25
  196. package/tableview/api/action/descriptors/action-editor.descriptor.d.ts +22 -40
  197. package/tableview/api/action/descriptors/action-link-descriptor.factory.d.ts +21 -13
  198. package/tableview/api/action/descriptors/action-link.descriptor.d.ts +3 -3
  199. package/tableview/api/action/descriptors/action.descriptor.d.ts +31 -33
  200. package/tableview/api/action/descriptors/editor-action-descriptor.factory.d.ts +21 -0
  201. package/tableview/api/action/descriptors/editor-action-editor-descriptor.factory.d.ts +21 -0
  202. package/tableview/api/action/descriptors/table-action-descriptor.factory.d.ts +36 -0
  203. package/tableview/api/action/descriptors/table-action-editor-descriptor.factory.d.ts +40 -0
  204. package/tableview/api/action/helpers/data-provider-executors.d.ts +13 -8
  205. package/tableview/api/action/models/action-descriptor.types.d.ts +2 -2
  206. package/tableview/api/action/models/action-error.model.d.ts +1 -1
  207. package/tableview/api/action/models/execution/action-context-validation.model.d.ts +2 -2
  208. package/tableview/api/action/models/execution/action-context.model.d.ts +2 -2
  209. package/tableview/api/action/models/execution/action-instance.model.d.ts +1 -1
  210. package/tableview/api/action/models/tableview-action-default-categories.model.d.ts +5 -5
  211. package/tableview/api/action/services/data-provider-executor.service.d.ts +26 -25
  212. package/tableview/api/class/README.md +13 -0
  213. package/tableview/api/{editor/helpers/class-attribute-converter.d.ts → class/editor/class-editor-attribute-converter.d.ts} +2 -2
  214. package/tableview/api/{editor/models/class-tableview-attribute.model.d.ts → class/editor/class-editor-attribute.model.d.ts} +1 -1
  215. package/tableview/api/class/editor/class-editor-data-provider.factory.d.ts +4 -0
  216. package/tableview/api/{editor/helpers/editor-descriptor-helpers.d.ts → class/editor/class-editor-descriptor-helpers.d.ts} +2 -5
  217. package/tableview/api/class/editor/class-editor-descriptor.factory.d.ts +11 -0
  218. package/tableview/api/class/index.d.ts +10 -0
  219. package/tableview/api/{tableview/helpers/class-attribute-converter.d.ts → class/tableview/class-tableview-attribute-converter.d.ts} +1 -1
  220. package/tableview/api/{tableview/models → class/tableview}/class-tableview-attribute.model.d.ts +2 -2
  221. package/tableview/api/class/tableview/class-tableview-data-provider.factory.d.ts +4 -0
  222. package/tableview/api/{tableview/helpers/tableview-descriptor-helpers.d.ts → class/tableview/class-tableview-descriptor-helpers.d.ts} +1 -2
  223. package/tableview/api/class/tableview/class-tableview-descriptor.factory.d.ts +12 -0
  224. package/tableview/api/editor/data-providers/editor-data-provider.factory.d.ts +17 -16
  225. package/tableview/api/editor/data-providers/editor.data-provider.d.ts +64 -29
  226. package/tableview/api/editor/descriptors/editor-descriptor.factory.d.ts +5 -38
  227. package/tableview/api/editor/descriptors/editor.descriptor.d.ts +48 -112
  228. package/tableview/api/editor/descriptors/field-base.descriptor.d.ts +8 -1
  229. package/tableview/api/editor/descriptors/field-lookup.descriptor.d.ts +2 -3
  230. package/tableview/api/editor/descriptors/field-many.descriptor.d.ts +3 -11
  231. package/tableview/api/editor/descriptors/wrappers/editor-descriptor-nested-object-wrapper.d.ts +25 -0
  232. package/tableview/api/editor/models/editor-fields.model.d.ts +25 -21
  233. package/tableview/api/editor/models/form-editor.event.d.ts +0 -4
  234. package/tableview/api/index.d.ts +7 -6
  235. package/tableview/api/tableview/data-providers/tableview-data-provider.factory.d.ts +20 -25
  236. package/tableview/api/tableview/data-providers/tableview.data-provider.d.ts +22 -22
  237. package/tableview/api/tableview/descriptors/tableview-descriptor.factory.d.ts +20 -50
  238. package/tableview/api/tableview/descriptors/tableview.descriptor.d.ts +69 -163
  239. package/tableview/api/tableview/helpers/tableview-create.d.ts +18 -5
  240. package/tableview/api/tableview/helpers/tableview-data-provider-descriptor-convert.d.ts +2 -2
  241. package/tableview/api/tableview/helpers/tableview-default-actions.d.ts +73 -20
  242. package/tableview/api/tableview/helpers/tableview-input-builder.d.ts +87 -9
  243. package/tableview/api/tableview/models/tableview-descriptor-fields-manage-helper.type.d.ts +9 -0
  244. package/tableview/api/tableview/models/tableview-descriptor-helper.type.d.ts +2 -0
  245. package/tableview/api/tableview/models/tableview-input.model.d.ts +1 -1
  246. package/tableview/api/tableview/models/tableview-route.model.d.ts +1 -1
  247. package/tableview/editor/helpers/field-create.d.ts +9 -0
  248. package/tableview/index.d.ts +2 -1
  249. package/tableview/tableview/components/route/tableview-route.component.d.ts +1 -1
  250. package/tableview/tableview/components/tableview/tableview.component.d.ts +6 -6
  251. package/version-info.json +5 -5
  252. package/core/components/pages/error/error.page.component.d.ts +0 -11
  253. package/core/components/pages/not-found/not-found.page.component.d.ts +0 -11
  254. package/core/data-providers/base-data-provider.factory.d.ts +0 -13
  255. package/esm2022/core/components/pages/error/error.page.component.mjs +0 -24
  256. package/esm2022/core/components/pages/not-found/not-found.page.component.mjs +0 -24
  257. package/esm2022/core/data-providers/base-data-provider.factory.mjs +0 -28
  258. package/esm2022/model/helpers/model.mjs +0 -71
  259. package/esm2022/table/api/helpers/class-attribute-converter.mjs +0 -104
  260. package/esm2022/table/api/helpers/table-descriptor-helpers.mjs +0 -98
  261. package/esm2022/table/api/models/class-table-attribute.model.mjs +0 -2
  262. package/esm2022/tableview/api/editor/helpers/class-attribute-converter.mjs +0 -85
  263. package/esm2022/tableview/api/editor/helpers/editor-descriptor-helpers.mjs +0 -95
  264. package/esm2022/tableview/api/editor/models/class-tableview-attribute.model.mjs +0 -2
  265. package/esm2022/tableview/api/tableview/helpers/class-attribute-converter.mjs +0 -34
  266. package/esm2022/tableview/api/tableview/helpers/tableview-descriptor-helpers.mjs +0 -110
  267. package/esm2022/tableview/api/tableview/models/class-tableview-attribute.model.mjs +0 -2
@@ -1,31 +1,24 @@
1
1
  import { ServiceClassType } from '@mediusinc/mng-commons/core';
2
+ import { ModelDescriptor, TypeDescriptor } from '@mediusinc/mng-commons/model';
2
3
  import { IEditorDataProvider } from '../../editor/data-providers/editor.data-provider';
3
4
  import { EditorDescriptorInst } from '../../editor/descriptors/editor.descriptor';
4
- import { ActionEditorAddDescriptorInst, ActionEditorDescriptorCreateOptsProviderType, ActionEditorDescriptorInst, ActionEditorDetailsDescriptorInst, ActionEditorEditDescriptorInst } from './action-editor.descriptor';
5
+ import { ActionEditorDescriptorCreateOptsProviderType, ActionEditorDescriptorInst } from './action-editor.descriptor';
5
6
  import { ActionDescriptorCreateOptsParentType } from './action.descriptor';
6
7
  export type ActionEditorProviderType<Model, Service> = ServiceClassType<Service> | IEditorDataProvider<Model, Service>;
8
+ export type ActionEditorDescriptorOptsType<Model, Service, FetchInput, SubmitReturn, ValidationInput> = ActionDescriptorCreateOptsParentType & {
9
+ model?: ModelDescriptor<Model>;
10
+ serviceProvider?: ActionEditorProviderType<Model, Service>;
11
+ fetchInputType?: TypeDescriptor<FetchInput>;
12
+ submitReturnType?: TypeDescriptor<SubmitReturn>;
13
+ validationType?: TypeDescriptor<ValidationInput>;
14
+ };
7
15
  export declare const actionEditorGetProviderCfgObj: <Model, Service>(serviceOrDataProvider?: ActionEditorProviderType<Model, Service>) => ActionEditorDescriptorCreateOptsProviderType<Model, Service>;
8
- export declare class ActionEditorDescriptor {
9
- static create<Model>(editor: EditorDescriptorInst<Model, any>, actionName: string, cfg?: ActionDescriptorCreateOptsParentType): ActionEditorDescriptorInst<Model, undefined>;
10
- static createWithProvider<Model, Service>(editor: EditorDescriptorInst<Model, any>, serviceProvider: ActionEditorProviderType<Model, Service>, actionName: string, cfg?: ActionDescriptorCreateOptsParentType): ActionEditorDescriptorInst<Model, Service>;
11
- }
12
- export declare function actionEditor<Model>(editor: EditorDescriptorInst<Model, any>, actionName: string, cfg?: ActionDescriptorCreateOptsParentType): ActionEditorDescriptorInst<Model, undefined>;
13
- export declare function actionEditor<Model, Service>(editor: EditorDescriptorInst<Model, any>, serviceProvider: ActionEditorProviderType<Model, Service>, actionName: string, cfg?: ActionDescriptorCreateOptsParentType): ActionEditorDescriptorInst<Model, Service>;
14
- export declare class ActionEditorDetailsDescriptor {
15
- static create<Model>(editor: EditorDescriptorInst<Model, any>): ActionEditorDescriptorInst<Model, undefined>;
16
- static createWithProvider<Model, Service>(editor: EditorDescriptorInst<Model, any>, serviceProvider: ActionEditorProviderType<Model, Service>): ActionEditorDescriptorInst<Model, Service>;
17
- }
18
- export declare function actionEditorDetails<Model>(editor: EditorDescriptorInst<Model, any>): ActionEditorDetailsDescriptorInst<Model, undefined>;
19
- export declare function actionEditorDetails<Model, Service>(editor: EditorDescriptorInst<Model, any>, serviceProvider: ActionEditorProviderType<Model, Service>): ActionEditorDetailsDescriptorInst<Model, Service>;
20
- export declare class ActionEditorAddDescriptor {
21
- static create<Model>(editor: EditorDescriptorInst<Model, any>): ActionEditorAddDescriptorInst<Model, undefined>;
22
- static createWithProvider<Model, Service>(editor: EditorDescriptorInst<Model, any>, serviceProvider: ActionEditorProviderType<Model, Service>): ActionEditorAddDescriptorInst<Model, Service>;
23
- }
24
- export declare function actionEditorAdd<Model>(editor: EditorDescriptorInst<Model, any>): ActionEditorDetailsDescriptorInst<Model, undefined>;
25
- export declare function actionEditorAdd<Model, Service>(editor: EditorDescriptorInst<Model, any>, serviceProvider: ActionEditorProviderType<Model, Service>): ActionEditorAddDescriptorInst<Model, Service>;
26
- export declare class ActionEditorEditDescriptor {
27
- static create<Model>(editor: EditorDescriptorInst<Model, any>): ActionEditorEditDescriptorInst<Model, undefined>;
28
- static createWithProvider<Model, Service>(editor: EditorDescriptorInst<Model, any>, serviceProvider: ActionEditorProviderType<Model, Service>): ActionEditorEditDescriptorInst<Model, Service>;
29
- }
30
- export declare function actionEditorEdit<Model>(editor: EditorDescriptorInst<Model, any>): ActionEditorDetailsDescriptorInst<Model, undefined>;
31
- export declare function actionEditorEdit<Model, Service>(editor: EditorDescriptorInst<Model, any>, serviceProvider: ActionEditorProviderType<Model, Service>): ActionEditorEditDescriptorInst<Model, Service>;
16
+ /**
17
+ * Creates an ActionEditorDescriptorInst instance with the provided editor descriptor and options.
18
+ *
19
+ * @param {string} actionName - The name of the action to associate with the editor.
20
+ * @param {EditorDescriptorInst<EditorModel, any>} editor - The editor descriptor instance to be used.
21
+ * @param {ActionEditorDescriptorOptsType<Model, Service, FetchInput, SubmitReturn, ValidationInput>} [opts] - Optional configuration options for the ActionEditor.
22
+ * @return {ActionEditorDescriptorInst<Model, Service, EditorModel, FetchInput, SubmitReturn, ValidationInput>} An instance of ActionEditorDescriptor with the configured parameters.
23
+ */
24
+ export declare function actionEditor<EditorModel, Model = EditorModel, Service = undefined, FetchInput = Model, SubmitReturn = Model, ValidationInput = Model>(actionName: string, editor: EditorDescriptorInst<EditorModel, any>, opts?: ActionEditorDescriptorOptsType<Model, Service, FetchInput, SubmitReturn, ValidationInput>): ActionEditorDescriptorInst<Model, Service, EditorModel, FetchInput, SubmitReturn, ValidationInput>;
@@ -1,11 +1,10 @@
1
1
  import { Type } from '@angular/core';
2
- import { Observable } from 'rxjs';
3
2
  import { ServiceClassType, StyleSizeEnum } from '@mediusinc/mng-commons/core';
4
3
  import { ModelDescriptor } from '@mediusinc/mng-commons/model';
5
4
  import { IEditorDataProvider } from '../../editor/data-providers/editor.data-provider';
6
5
  import { EditorDescriptorInst } from '../../editor/descriptors/editor.descriptor';
6
+ import { ActionRunFnType } from '../models/action-descriptor.types';
7
7
  import { ActionEditorSubmitTypeEnum } from '../models/action.type';
8
- import { IActionContext } from '../models/execution/action-context.model';
9
8
  import { ActionDescriptorCreateOptsParentType, ActionDescriptorInst } from './action.descriptor';
10
9
  export type ActionEditorDescriptorConstructorOptsType<Model, Service> = ActionDescriptorCreateOptsParentType & ActionEditorDescriptorCreateOptsProviderType<Model, Service> & {
11
10
  model?: ModelDescriptor<Model>;
@@ -15,11 +14,10 @@ export type ActionEditorDescriptorCreateOptsProviderType<Model, Service> = {
15
14
  serviceType?: ServiceClassType<Service>;
16
15
  dataProvider?: IEditorDataProvider<Model, Service>;
17
16
  };
18
- export declare class ActionEditorDescriptorInst<Item, Service = any, FetchInputItem = Item, SubmitReturnItem = Item> extends ActionDescriptorInst<Item, Service> {
17
+ export declare class ActionEditorDescriptorInst<Item, Service = any, EditorItem = Item, FetchInputItem = Item, SubmitReturnItem = Item, ValidationInputItem = Item> extends ActionDescriptorInst<Item, Service, EditorItem, SubmitReturnItem, ValidationInputItem> {
19
18
  private readonly _editorDescriptor;
20
19
  protected readonly _dataProvider?: IEditorDataProvider<Item, any>;
21
- protected readonly _isTableviewMainEditor: boolean;
22
- protected _editorActions: ActionDescriptorInst<Item>[];
20
+ protected _editorActions: ActionDescriptorInst<any, any, EditorItem, any, EditorItem>[];
23
21
  protected _editorTitle?: string | null;
24
22
  protected _editorTitleParams?: any;
25
23
  protected _hasFetchNotificationSuccess: boolean;
@@ -27,17 +25,16 @@ export declare class ActionEditorDescriptorInst<Item, Service = any, FetchInputI
27
25
  protected _fetchNotificationSuccessMessage?: string;
28
26
  protected _dialogSize: StyleSizeEnum;
29
27
  protected _dialogClassName?: string;
30
- protected _fetchFunction?: (ctx: IActionContext<Item, Service>) => Observable<Item>;
31
- protected _submitFunction?: (ctx: IActionContext<Item, Service>) => Observable<Item>;
28
+ protected _fetchFunction?: ActionRunFnType<Item, Service, FetchInputItem, EditorItem>;
29
+ protected _submitFunction?: ActionRunFnType<Item, Service, EditorItem, SubmitReturnItem>;
32
30
  protected _editorComponent?: Type<any>;
33
31
  protected _resubmitEnabled?: boolean;
34
32
  protected _resubmitRefetch: boolean;
35
33
  protected _unsavedChangesConfirmation: boolean;
36
- constructor(editorDescriptor: EditorDescriptorInst<Item, any>, actionName: string, cfg?: ActionEditorDescriptorConstructorOptsType<Item, Service>);
37
- get isTableviewMainEditor(): boolean;
34
+ constructor(editorDescriptor: EditorDescriptorInst<EditorItem, any>, actionName: string, cfg?: ActionEditorDescriptorConstructorOptsType<Item, Service>);
38
35
  get editorTitle(): string | null | undefined;
39
36
  get editorTitleParams(): any;
40
- get editorDescriptor(): EditorDescriptorInst<Item, any>;
37
+ get editorDescriptor(): EditorDescriptorInst<EditorItem, any>;
41
38
  get dialogSize(): StyleSizeEnum;
42
39
  get dialogClassName(): string | undefined;
43
40
  get hasFetchNotificationSuccess(): boolean;
@@ -45,12 +42,12 @@ export declare class ActionEditorDescriptorInst<Item, Service = any, FetchInputI
45
42
  get fetchNotificationSuccessMessage(): string | undefined;
46
43
  get dataProvider(): IEditorDataProvider<Item, any> | undefined;
47
44
  get hasRunFunction(): boolean;
48
- get runFunction(): (ctx: IActionContext<Item, unknown>) => Observable<Item>;
45
+ get runFunction(): ActionRunFnType<Item, Service, EditorItem, SubmitReturnItem>;
49
46
  get hasFetchFunction(): boolean;
50
- get fetchFunction(): ((ctx: IActionContext<Item, Service>) => Observable<Item>) | undefined;
47
+ get fetchFunction(): ActionRunFnType<Item, Service, FetchInputItem, EditorItem> | undefined;
51
48
  get hasSubmitFunction(): boolean;
52
- get submitFunction(): ((ctx: IActionContext<Item, Service>) => Observable<Item>) | undefined;
53
- get editorActions(): ActionDescriptorInst<Item, any, Item>[];
49
+ get submitFunction(): ActionRunFnType<Item, Service, EditorItem, SubmitReturnItem> | undefined;
50
+ get editorActions(): ActionDescriptorInst<any, any, EditorItem, any, EditorItem>[];
54
51
  get editorComponent(): Type<any> | undefined;
55
52
  get resubmitEnabled(): boolean | undefined;
56
53
  get resubmitRefetch(): boolean;
@@ -58,12 +55,12 @@ export declare class ActionEditorDescriptorInst<Item, Service = any, FetchInputI
58
55
  withEditorTitle(title: string | null, params?: any): this;
59
56
  withDialogSize(size?: StyleSizeEnum): this;
60
57
  withDialogClassName(className: string): this;
61
- withRunFunction(fn: (ctx: IActionContext<Item, Service>) => Observable<Item>): this;
62
- withFetchFunction(fn: (ctx: IActionContext<Item, Service>) => Observable<Item>): this;
63
- withSubmitFunction(fn: (ctx: IActionContext<Item, Service>) => Observable<Item>): this;
58
+ withRunFunction(fn: ActionRunFnType<Item, Service, EditorItem, SubmitReturnItem>): this;
59
+ withFetchFunction(fn: ActionRunFnType<Item, Service, FetchInputItem, EditorItem>): this;
60
+ withSubmitFunction(fn: ActionRunFnType<Item, Service, EditorItem, SubmitReturnItem>): this;
64
61
  withFetchNotificationError(title?: string, message?: string, hasNotification?: boolean): this;
65
- withEditorAction(action: ActionDescriptorInst<Item>): this;
66
- withEditorActions(actions: ActionDescriptorInst<Item>[]): this;
62
+ withEditorAction(action: ActionDescriptorInst<any, any, EditorItem, any, EditorItem>): this;
63
+ withEditorActions(actions: ActionDescriptorInst<any, any, EditorItem, any, EditorItem>[]): this;
67
64
  withEditorComponent(editorComponent: Type<any>): this;
68
65
  /**
69
66
  * Enables or disables resubmit resubmit - this means the form will not exit after successful submission, but will instead remain open.
@@ -75,39 +72,24 @@ export declare class ActionEditorDescriptorInst<Item, Service = any, FetchInputI
75
72
  */
76
73
  withResubmit(enabled?: boolean, refetch?: boolean): this;
77
74
  withUnsavedChangesConfirmation(unsavedChangesConfirmation?: boolean): this;
78
- copyFieldsTo(descriptor: ActionEditorDescriptorInst<Item, Service, FetchInputItem, SubmitReturnItem>): ActionEditorDescriptorInst<Item, Service, FetchInputItem, SubmitReturnItem>;
79
- copy(): ActionEditorDescriptorInst<Item, Service, FetchInputItem, SubmitReturnItem>;
75
+ copyFieldsTo(descriptor: ActionEditorDescriptorInst<Item, Service, EditorItem, FetchInputItem, SubmitReturnItem, ValidationInputItem>): ActionEditorDescriptorInst<Item, Service, EditorItem, FetchInputItem, SubmitReturnItem, ValidationInputItem>;
76
+ copy(): ActionEditorDescriptorInst<Item, Service, EditorItem, FetchInputItem, SubmitReturnItem, ValidationInputItem>;
80
77
  }
81
- export declare class ActionEditorSubmitDescriptorInst<Model> extends ActionDescriptorInst<Model> {
78
+ export declare class ActionEditorSubmitDescriptorInst<Model, EditorModel> extends ActionDescriptorInst<Model, undefined, EditorModel, EditorModel, EditorModel> {
82
79
  private readonly _submitType;
83
80
  constructor(editorActionName: string, editorActionModel: ModelDescriptor<Model> | undefined, submitType?: ActionEditorSubmitTypeEnum);
84
81
  get submitType(): ActionEditorSubmitTypeEnum;
85
- copy(): ActionEditorSubmitDescriptorInst<Model>;
82
+ copy(): ActionEditorSubmitDescriptorInst<Model, EditorModel>;
86
83
  }
87
84
  /**
88
85
  * creates primary action with primary button style
89
86
  * @param editorAction
90
87
  * @param submitType
91
88
  */
92
- export declare function actionEditorSubmit<Model>(editorAction: ActionEditorDescriptorInst<Model>, submitType?: ActionEditorSubmitTypeEnum): ActionEditorSubmitDescriptorInst<Model>;
89
+ export declare function actionEditorSubmit<Model, EditorModel>(editorAction: ActionEditorDescriptorInst<Model, any, EditorModel, any, any, any>, submitType?: ActionEditorSubmitTypeEnum): ActionEditorSubmitDescriptorInst<Model, EditorModel>;
93
90
  /**
94
91
  * creates secondary button with text button style
95
92
  * @param editorAction
96
93
  * @param submitType
97
94
  */
98
- export declare function actionEditorCancel<Model>(editorAction: ActionEditorDescriptorInst<Model>, submitType?: ActionEditorSubmitTypeEnum): ActionEditorSubmitDescriptorInst<Model>;
99
- export declare class ActionEditorDetailsDescriptorInst<Model, Service = any> extends ActionEditorDescriptorInst<Model, Service> {
100
- static readonly ACTION_NAME = "details";
101
- constructor(editorDescriptor: EditorDescriptorInst<Model, any>, cfg?: ActionEditorDescriptorCreateOptsProviderType<Model, Service>);
102
- copy(): ActionEditorDetailsDescriptorInst<Model, Service>;
103
- }
104
- export declare class ActionEditorAddDescriptorInst<Model, Service = any> extends ActionEditorDescriptorInst<Model, Service> {
105
- static readonly ACTION_NAME = "add";
106
- constructor(editorDescriptor: EditorDescriptorInst<Model, any>, cfg?: ActionEditorDescriptorCreateOptsProviderType<Model, Service>);
107
- copy(): ActionEditorAddDescriptorInst<Model, Service>;
108
- }
109
- export declare class ActionEditorEditDescriptorInst<Model, Service = any> extends ActionEditorDescriptorInst<Model, Service> {
110
- static readonly ACTION_NAME = "edit";
111
- constructor(editorDescriptor: EditorDescriptorInst<Model, any>, cfg?: ActionEditorDescriptorCreateOptsProviderType<Model, Service>);
112
- copy(): ActionEditorEditDescriptorInst<Model, Service>;
113
- }
95
+ export declare function actionEditorCancel<Model, EditorModel>(editorAction: ActionEditorDescriptorInst<Model, any, EditorModel, any, any, any>, submitType?: ActionEditorSubmitTypeEnum): ActionEditorSubmitDescriptorInst<Model, EditorModel>;
@@ -1,15 +1,23 @@
1
- import { ClassType } from '@mediusinc/mng-commons/core';
2
- import { ModelDescriptor } from '@mediusinc/mng-commons/model';
3
- import { ActionDescriptorCreateFromClassOpts } from './action-descriptor.factory';
1
+ import { ModelDescriptor, TypeDescriptor } from '@mediusinc/mng-commons/model';
4
2
  import { ActionLinkDescriptorInst } from './action-link.descriptor';
5
3
  import { ActionDescriptorCreateOptsParentType, ActionDescriptorInst } from './action.descriptor';
6
- export declare class ActionLinkDescriptor {
7
- static create<Model = any>(actionName: string, cfg?: ActionDescriptorCreateOptsParentType): ActionLinkDescriptorInst<Model>;
8
- static fromModel<Model>(model: ModelDescriptor<Model>, actionName: string, cfg?: ActionDescriptorCreateOptsParentType): ActionLinkDescriptorInst<Model>;
9
- static fromClass<Model>(type: ClassType<Model>, actionName: string, cfg?: ActionDescriptorCreateFromClassOpts<Model>): ActionLinkDescriptorInst<Model>;
10
- static fromAction<Model>(action: ActionDescriptorInst<Model>): ActionLinkDescriptorInst<Model>;
11
- }
12
- export declare function actionLink<Model = any>(actionName: string, cfg?: ActionDescriptorCreateOptsParentType): ActionLinkDescriptorInst<Model>;
13
- export declare function actionLinkFromModel<Model>(model: ModelDescriptor<Model>, actionName: string, cfg?: ActionDescriptorCreateOptsParentType): ActionLinkDescriptorInst<Model>;
14
- export declare function actionLinkFromClass<Model>(type: ClassType<Model>, actionName: string, cfg?: ActionDescriptorCreateFromClassOpts<Model>): ActionLinkDescriptorInst<Model>;
15
- export declare function actionLinkFromAction<Model>(action: ActionDescriptorInst<Model>): ActionLinkDescriptorInst<Model>;
4
+ type ActionLinkCreateOptsType<Model, ValidationInput> = ActionDescriptorCreateOptsParentType & {
5
+ model?: ModelDescriptor<Model>;
6
+ validationType?: TypeDescriptor<ValidationInput>;
7
+ };
8
+ /**
9
+ * Creates an instance of ActionLinkDescriptorInst with the provided action name and options.
10
+ *
11
+ * @param {string} actionName - The unique name of the action.
12
+ * @param {ActionLinkCreateOptsType<Model, ValidationInput>} [opts] - Optional parameters for configuring the action link, including the model and validation type.
13
+ * @return {ActionLinkDescriptorInst<Model, ValidationInput>} An instance of ActionLinkDescriptorInst initialized with the action name and options.
14
+ */
15
+ export declare function actionLink<Model = any, ValidationInput = Model>(actionName: string, opts?: ActionLinkCreateOptsType<Model, ValidationInput>): ActionLinkDescriptorInst<Model, ValidationInput>;
16
+ /**
17
+ * Generates an ActionLinkDescriptorInst from the provided ActionDescriptorInst.
18
+ *
19
+ * @param {ActionDescriptorInst<Model, any, any, any, ValidationInput>} action - The action descriptor instance that serves as the basis for the action link.
20
+ * @return {ActionLinkDescriptorInst<Model, ValidationInput>} A newly created ActionLinkDescriptorInst configured with the provided action parameters.
21
+ */
22
+ export declare function actionLinkFromAction<Model, ValidationInput = Model>(action: ActionDescriptorInst<Model, any, any, any, ValidationInput>): ActionLinkDescriptorInst<Model, ValidationInput>;
23
+ export {};
@@ -1,7 +1,7 @@
1
1
  import { Params, QueryParamsHandling } from '@angular/router';
2
2
  import { ActionDescriptorConstructorOptsType, ActionDescriptorInst } from './action.descriptor';
3
3
  export type ActionLinkDescriptorConstructorOpts<Model> = Omit<ActionDescriptorConstructorOptsType<Model, undefined>, 'serviceType' | 'dataProvider'>;
4
- export declare class ActionLinkDescriptorInst<Model> extends ActionDescriptorInst<Model, undefined> {
4
+ export declare class ActionLinkDescriptorInst<Item, ValidationInputItem = Item> extends ActionDescriptorInst<Item, undefined, undefined, undefined, ValidationInputItem> {
5
5
  private _url;
6
6
  private _pathSegments;
7
7
  private _queryParams?;
@@ -9,7 +9,7 @@ export declare class ActionLinkDescriptorInst<Model> extends ActionDescriptorIns
9
9
  private _replaceUrl;
10
10
  private _target;
11
11
  private _isStyleLink;
12
- constructor(actionName?: string, cfg?: ActionLinkDescriptorConstructorOpts<Model>);
12
+ constructor(actionName?: string, cfg?: ActionLinkDescriptorConstructorOpts<Item>);
13
13
  get url(): string;
14
14
  get pathSegments(): string[];
15
15
  get queryParams(): Params | undefined;
@@ -23,5 +23,5 @@ export declare class ActionLinkDescriptorInst<Model> extends ActionDescriptorIns
23
23
  withReplaceUrl(replaceUrl?: boolean): this;
24
24
  withTarget(target?: '_self' | '_blank'): this;
25
25
  withStyleLink(isStyleLink: boolean): this;
26
- copy(): ActionLinkDescriptorInst<Model>;
26
+ copy(): ActionLinkDescriptorInst<Item, ValidationInputItem>;
27
27
  }
@@ -18,7 +18,9 @@ export type ActionDescriptorCreateOptsParentType = {
18
18
  export type ActionDescriptorConstructorOptsType<Item, Service> = ActionDescriptorCreateOptsParentType & ActionDescriptorCreateOptsProviderType<Item, Service> & {
19
19
  model?: ModelDescriptor<Item>;
20
20
  };
21
- export declare class ActionDescriptorInst<Item, Service = any, ReturnItem = Item> implements IActionDescriptor<Item, Service> {
21
+ type AfterRunActionType<RunReturnItem> = ActionDescriptorInst<any, any, RunReturnItem, any, undefined>;
22
+ type OnErrorActionType<RunInputItem> = ActionDescriptorInst<any, any, RunInputItem, any, undefined>;
23
+ export declare class ActionDescriptorInst<Item, Service = any, RunInputItem = Item, RunReturnItem = Item, ValidationInputItem = RunInputItem> implements IActionDescriptor<Item, Service> {
22
24
  protected readonly _model?: ModelDescriptor<Item>;
23
25
  protected readonly _actionName: string;
24
26
  protected readonly _actionNameLong: string;
@@ -33,28 +35,28 @@ export declare class ActionDescriptorInst<Item, Service = any, ReturnItem = Item
33
35
  private _positionTableviewCategories?;
34
36
  protected _tableviewCategory?: string;
35
37
  protected _routeUrl: string | null;
36
- protected _runFunction?: ActionRunFnType<Item, Service, ReturnItem>;
37
- protected _isVisibleFunction?: ActionValidationFnType<Item, Service>;
38
- protected _isEnabledFunction?: ActionValidationFnType<Item, Service>;
39
- protected _runConfirmationDialogDescriptor?: ActionConfirmationDescriptor<Item>;
38
+ protected _runFunction?: ActionRunFnType<Item, Service, RunInputItem, RunReturnItem>;
39
+ protected _isVisibleFunction?: ActionValidationFnType<ValidationInputItem, Service>;
40
+ protected _isEnabledFunction?: ActionValidationFnType<ValidationInputItem, Service>;
41
+ protected _runConfirmationDialogDescriptor?: ActionConfirmationDescriptor<RunInputItem>;
40
42
  protected _hasRunNotificationSuccess: boolean;
41
43
  protected _runNotificationSuccessTitle?: string;
42
44
  protected _runNotificationSuccessMessage?: string;
43
45
  protected _hasRunNotificationError: boolean;
44
46
  protected _runNotificationErrorTitle?: string;
45
47
  protected _runNotificationErrorMessage?: string;
46
- protected _afterRunAction?: ActionDescriptorInst<any> | ((ctx: IActionContext<Item, any>) => ActionDescriptorInst<any>);
47
- protected _onRunErrorAction?: ActionDescriptorInst<Item> | ((ctx: IActionContext<Item, any>) => ActionDescriptorInst<Item>);
48
+ protected _afterRunAction?: AfterRunActionType<RunReturnItem> | ((ctx: IActionContext<Item, RunInputItem, any>) => AfterRunActionType<RunReturnItem>);
49
+ protected _onRunErrorAction?: OnErrorActionType<RunInputItem> | ((ctx: IActionContext<Item, RunInputItem, any>) => OnErrorActionType<RunInputItem>);
48
50
  protected _permissions?: APermissions;
49
51
  protected _button: ActionButtonDescriptor;
50
52
  protected _hasItemsSelection: boolean;
51
53
  protected _component?: Type<IActionComponent<Item>>;
52
54
  protected _componentFromDi?: InjectionToken<Type<any>>;
53
55
  protected _subactionsAsMenu: boolean;
54
- protected _subactions: Array<ActionDescriptorInst<Item>>;
56
+ protected _subactions: Array<ActionDescriptorInst<Item, any, RunInputItem, any>>;
55
57
  constructor(actionName: string, cfg?: ActionDescriptorConstructorOptsType<Item, Service>);
56
- get model(): ModelDescriptor<Item, import("@mediusinc/mng-commons/core").ClassOptType<Item>> | undefined;
57
- get parentModel(): ModelDescriptor<any, import("@mediusinc/mng-commons/core").ClassOptType<any>> | undefined;
58
+ get model(): ModelDescriptor<Item> | undefined;
59
+ get parentModel(): ModelDescriptor<any> | undefined;
58
60
  get parentProperty(): string | undefined;
59
61
  get i18nModelActionBaseKey(): string | undefined;
60
62
  get type(): ActionTypeEnum;
@@ -64,13 +66,13 @@ export declare class ActionDescriptorInst<Item, Service = any, ReturnItem = Item
64
66
  get routeUrl(): string | null;
65
67
  get dataProvider(): IDataProvider<Item, Service> | undefined;
66
68
  get hasRunFunction(): boolean;
67
- get runFunction(): ActionRunFnType<Item, Service, ReturnItem>;
68
- get isVisibleFunction(): ActionValidationFnType<Item, Service> | undefined;
69
- get isEnabledFunction(): ActionValidationFnType<Item, Service> | undefined;
69
+ get runFunction(): ActionRunFnType<Item, Service, RunInputItem, RunReturnItem>;
70
+ get isVisibleFunction(): ActionValidationFnType<ValidationInputItem, Service> | undefined;
71
+ get isEnabledFunction(): ActionValidationFnType<ValidationInputItem, Service> | undefined;
70
72
  get actionName(): string;
71
73
  get actionNameLong(): string;
72
74
  get className(): string | undefined;
73
- get runConfirmationDialogDescriptor(): ActionConfirmationDescriptor<Item> | undefined;
75
+ get runConfirmationDialogDescriptor(): ActionConfirmationDescriptor<RunInputItem> | undefined;
74
76
  get hasRunConfirmation(): boolean;
75
77
  get hasRunNotificationSuccess(): boolean;
76
78
  get runNotificationSuccessTitle(): string | undefined;
@@ -78,8 +80,8 @@ export declare class ActionDescriptorInst<Item, Service = any, ReturnItem = Item
78
80
  get hasRunNotificationError(): boolean;
79
81
  get runNotificationErrorTitle(): string | undefined;
80
82
  get runNotificationErrorMessage(): string | undefined;
81
- get afterRunAction(): ActionDescriptorInst<any, any, any> | ((ctx: IActionContext<Item, any>) => ActionDescriptorInst<any>) | undefined;
82
- get onRunErrorAction(): ActionDescriptorInst<Item, any, Item> | ((ctx: IActionContext<Item, any>) => ActionDescriptorInst<Item>) | undefined;
83
+ get afterRunAction(): AfterRunActionType<RunReturnItem> | ((ctx: IActionContext<Item, RunInputItem, any>) => AfterRunActionType<RunReturnItem>) | undefined;
84
+ get onRunErrorAction(): OnErrorActionType<RunInputItem> | ((ctx: IActionContext<Item, RunInputItem, any>) => OnErrorActionType<RunInputItem>) | undefined;
83
85
  get permissions(): APermissions | undefined;
84
86
  get tableviewCategory(): string | undefined;
85
87
  get hasItemsSelection(): boolean;
@@ -88,28 +90,28 @@ export declare class ActionDescriptorInst<Item, Service = any, ReturnItem = Item
88
90
  get componentFromDi(): InjectionToken<Type<any>> | undefined;
89
91
  get positionTableviewCategories(): string[] | undefined;
90
92
  get subactionsAsMenu(): boolean;
91
- get subactions(): ActionDescriptorInst<Item, any, Item>[];
93
+ get subactions(): ActionDescriptorInst<Item, any, RunInputItem, any, RunInputItem>[];
92
94
  protected setI18nModelActionBaseKey(base?: string): void;
93
- withRunFunction(fn: ActionRunFnType<Item, Service, ReturnItem>): this;
94
- withIsVisibleFunction(fn?: ActionValidationFnType<Item, Service>): this;
95
- withIsEnabledFunction(fn?: ActionValidationFnType<Item, Service>): this;
95
+ withRunFunction(fn: ActionRunFnType<Item, Service, RunInputItem, RunReturnItem>): this;
96
+ withIsVisibleFunction(fn?: ActionValidationFnType<ValidationInputItem, Service>): this;
97
+ withIsEnabledFunction(fn?: ActionValidationFnType<ValidationInputItem, Service>): this;
96
98
  withRouteTrigger(routeUrl: string): this;
97
99
  withPosition(position: ActionPositionEnum): this;
98
100
  /**
99
101
  * creates confirmation action with default style based on action descriptor
100
102
  */
101
- withRunConfirmation(): ActionConfirmationDescriptor<Item>;
103
+ withRunConfirmation(): ActionConfirmationDescriptor<RunInputItem>;
102
104
  /**
103
105
  * Add a configuration dialogue to action using ActionConfigurationDescriptor
104
106
  * @param runConfirmationDialogDescriptor descriptor with customizable information for dialog
105
107
  */
106
- withRunConfirmationDescriptor(runConfirmationDialogDescriptor?: ActionConfirmationDescriptor<Item>): this;
108
+ withRunConfirmationDescriptor(runConfirmationDialogDescriptor?: ActionConfirmationDescriptor<RunInputItem>): this;
107
109
  withRunNotificationSuccess(title?: string, message?: string, hasNotification?: boolean): this;
108
110
  withRunNotificationError(title?: string, message?: string, hasNotification?: boolean): this;
109
- withAfterRunAction<Return, Service = any>(action?: ActionDescriptorInst<Return> | ((ctx: IActionContext<Item, Service>) => ActionDescriptorInst<Return>)): this;
110
- withOnRunErrorAction<S = any>(action?: ActionDescriptorInst<Item> | ((ctx: IActionContext<Item, S>) => ActionDescriptorInst<Item>)): this;
111
+ withAfterRunAction(action?: AfterRunActionType<RunReturnItem> | ((ctx: IActionContext<Item, RunInputItem, any>) => AfterRunActionType<RunReturnItem>)): this;
112
+ withOnRunErrorAction(action?: OnErrorActionType<RunInputItem> | ((ctx: IActionContext<Item, RunInputItem, any>) => OnErrorActionType<RunInputItem>)): this;
111
113
  withPermissions(permissions: APermissions): this;
112
- withTableviewCategory(permissionsRouteType: string): this;
114
+ withTableviewCategory(category: string): this;
113
115
  withButtonDescriptor(button: ActionButtonDescriptor): this;
114
116
  withButton(label?: string | null, icon?: string | null, styleLevel?: StyleLevelEnum, styleText?: boolean): this;
115
117
  withItemsSelection(hasSelection?: boolean): this;
@@ -118,12 +120,8 @@ export declare class ActionDescriptorInst<Item, Service = any, ReturnItem = Item
118
120
  withPositionTableviewCategories(positionTableviewCategories: string[]): this;
119
121
  withI18nBase(base: ClassType<unknown> | string): this;
120
122
  withSubactionsAsMenu(subactionsAsMenu?: boolean): this;
121
- withSubactions(...subactions: Array<ActionDescriptorInst<Item>>): this;
122
- copyFieldsTo(descriptor: ActionDescriptorInst<Item, Service, ReturnItem>): ActionDescriptorInst<Item, Service, ReturnItem>;
123
- copy(): ActionDescriptorInst<Item, Service, ReturnItem>;
124
- }
125
- export declare class ActionDeleteDescriptorInst<Item, Service = any> extends ActionDescriptorInst<Item, Service> {
126
- static readonly ACTION_NAME = "delete";
127
- constructor(model: ModelDescriptor<Item>, cfg?: ActionDescriptorCreateOptsProviderType<Item, Service>);
128
- copy(): ActionDeleteDescriptorInst<Item, Service>;
123
+ withSubactions(...subactions: Array<ActionDescriptorInst<Item, any, RunInputItem, any>>): this;
124
+ copyFieldsTo(descriptor: ActionDescriptorInst<Item, Service, RunInputItem, RunReturnItem, ValidationInputItem>): ActionDescriptorInst<Item, Service, RunInputItem, RunReturnItem, ValidationInputItem>;
125
+ copy(): ActionDescriptorInst<Item, Service, RunInputItem, RunReturnItem, ValidationInputItem>;
129
126
  }
127
+ export {};
@@ -0,0 +1,21 @@
1
+ import { ModelDescriptor } from '@mediusinc/mng-commons/model';
2
+ import { EditorDescriptorInst } from '../../editor/descriptors/editor.descriptor';
3
+ import { ActionPositionEnum } from '../models/action.type';
4
+ import { ActionProviderType } from './action-descriptor.factory';
5
+ import { ActionDescriptorInst } from './action.descriptor';
6
+ /**
7
+ * Defines an action to be positioned on a specified editor with editor-specific execution context.
8
+ *
9
+ * @param {string} actionName - The name identifying the action to be performed.
10
+ * @param {EditorDescriptorInst<EditorModel>} editor - The descriptor of the editor on which the action will be placed and executed.
11
+ * @param {Object} [opts] - Options for configuring the action behavior.
12
+ * @param {ModelDescriptor<Model>} [opts.model] - The model descriptor associated with the action.
13
+ * @param {ActionProviderType<Model, Service>} [opts.serviceProvider] - The service provider type for execution context.
14
+ * @param {ActionPositionEnum.FooterLeft | ActionPositionEnum.FooterRight | ActionPositionEnum.ToolbarLeft | ActionPositionEnum.ToolbarRight} [opts.position] - The position of action on editor.
15
+ * @return {ActionDescriptorInst<Model, Service, EditorModel, Model, EditorModel>} - An instance representing the configured action descriptor for the specified editor and model.
16
+ */
17
+ export declare function actionOnEditor<Model, EditorModel, Service = undefined>(actionName: string, editor: EditorDescriptorInst<EditorModel>, opts?: {
18
+ model?: ModelDescriptor<Model>;
19
+ serviceProvider?: ActionProviderType<Model, Service>;
20
+ position?: ActionPositionEnum.FooterLeft | ActionPositionEnum.FooterRight | ActionPositionEnum.ToolbarLeft | ActionPositionEnum.ToolbarRight;
21
+ }): ActionDescriptorInst<Model, Service, EditorModel, Model, EditorModel>;
@@ -0,0 +1,21 @@
1
+ import { ModelDescriptor } from '@mediusinc/mng-commons/model';
2
+ import { EditorDescriptorInst } from '../../editor/descriptors/editor.descriptor';
3
+ import { ActionPositionEnum } from '../models/action.type';
4
+ import { ActionEditorProviderType } from './action-editor-descriptor.factory';
5
+ import { ActionEditorDescriptorInst } from './action-editor.descriptor';
6
+ /**
7
+ * Creates and returns an instance of `ActionEditorDescriptorInst` when positioned on another (parent) editor.
8
+ *
9
+ * @param {string} actionName - The name of the action associated with the editor.
10
+ * @param {EditorDescriptorInst<EditorModel, ParentEditor>} editor - The editor descriptor defining editor on action.
11
+ * @param {Object} [opts] - Optional parameters for configuring the action editor.
12
+ * @param {ModelDescriptor<Model>} [opts.model] - The descriptor for the model associated with the action.
13
+ * @param {ActionEditorProviderType<Model, Service>} [opts.serviceProvider] - The service provider type for the action editor.
14
+ * @param {ActionPositionEnum.FooterLeft | ActionPositionEnum.FooterRight | ActionPositionEnum.ToolbarLeft | ActionPositionEnum.ToolbarRight} [opts.position] - The desired position of action on the editor.
15
+ * @return {ActionEditorDescriptorInst<Model, Service, EditorModel, ParentEditor, EditorModel, ParentEditor>} A configured instance of `ActionEditorDescriptorInst` representing the action editor.
16
+ */
17
+ export declare function actionEditorOnEditor<EditorModel, ParentEditor, Model = EditorModel, Service = undefined>(actionName: string, editor: EditorDescriptorInst<EditorModel, ParentEditor>, opts?: {
18
+ model?: ModelDescriptor<Model>;
19
+ serviceProvider?: ActionEditorProviderType<Model, Service>;
20
+ position?: ActionPositionEnum.FooterLeft | ActionPositionEnum.FooterRight | ActionPositionEnum.ToolbarLeft | ActionPositionEnum.ToolbarRight;
21
+ }): ActionEditorDescriptorInst<Model, Service, EditorModel, ParentEditor, EditorModel, ParentEditor>;
@@ -0,0 +1,36 @@
1
+ import { ModelDescriptor } from '@mediusinc/mng-commons/model';
2
+ import { TableDescriptorInst } from '@mediusinc/mng-commons/table/api';
3
+ import { ActionPositionEnum } from '../models/action.type';
4
+ import { ActionProviderType } from './action-descriptor.factory';
5
+ import { ActionDescriptorInst } from './action.descriptor';
6
+ /**
7
+ * Defines an action to be positioned on a specified table with table row execution context.
8
+ *
9
+ * @param {string} actionName - The name identifying the action to be performed.
10
+ * @param {TableDescriptorInst<TableModel, any, any>} table - The descriptor of the table on which the action will be placed and executed.
11
+ * @param {Object} [opts] - Options for configuring the action behavior.
12
+ * @param {ModelDescriptor<Model>} [opts.model] - The model descriptor associated with the action.
13
+ * @param {ActionProviderType<Model, Service>} [opts.serviceProvider] - The service provider type for execution context.
14
+ * @param {ActionPositionEnum.RowInline | ActionPositionEnum.RowClick} [opts.position] - The position of action on table.
15
+ * @return {ActionDescriptorInst<Model, Service, TableModel, Model, TableModel>} - An instance representing the configured action descriptor for the specified table row and model.
16
+ */
17
+ export declare function actionOnTableRow<Model, TableModel, Service = undefined>(actionName: string, table: TableDescriptorInst<TableModel, any, any>, opts?: {
18
+ model?: ModelDescriptor<Model>;
19
+ serviceProvider?: ActionProviderType<Model, Service>;
20
+ position?: ActionPositionEnum.RowInline | ActionPositionEnum.RowClick;
21
+ }): ActionDescriptorInst<Model, Service, TableModel, Model, TableModel>;
22
+ /**
23
+ * Defines an action to be positioned on a specified table with table header or footer execution context.
24
+ *
25
+ * @param {string} actionName - The name identifying the action to be performed.
26
+ * @param {Object} [opts] - Options for configuring the action behavior.
27
+ * @param {ModelDescriptor<Model>} [opts.model] - The model descriptor associated with the action.
28
+ * @param {ActionProviderType<Model, Service>} [opts.serviceProvider] - The service provider type for execution context.
29
+ * @param {ActionPositionEnum.ToolbarLeft | ActionPositionEnum.ToolbarRight | ActionPositionEnum.TableHeader} [opts.position] - The position of action on table.
30
+ * @return {ActionDescriptorInst<Model, Service, TableModel, Model, TableModel>} - An instance representing the configured action descriptor for the specified table top and model.
31
+ */
32
+ export declare function actionOnTableTop<Model, Service = undefined>(actionName: string, opts?: {
33
+ model?: ModelDescriptor<Model>;
34
+ serviceProvider?: ActionProviderType<Model, Service>;
35
+ position?: ActionPositionEnum.ToolbarLeft | ActionPositionEnum.ToolbarRight | ActionPositionEnum.TableHeader;
36
+ }): ActionDescriptorInst<Model, Service, undefined, Model, undefined>;
@@ -0,0 +1,40 @@
1
+ import { ModelDescriptor } from '@mediusinc/mng-commons/model';
2
+ import { TableDescriptorInst } from '@mediusinc/mng-commons/table/api';
3
+ import { EditorDescriptorInst } from '../../editor/descriptors/editor.descriptor';
4
+ import { ActionPositionEnum } from '../models/action.type';
5
+ import { ActionEditorProviderType } from './action-editor-descriptor.factory';
6
+ import { ActionEditorDescriptorInst } from './action-editor.descriptor';
7
+ /**
8
+ * Creates and returns an ActionEditorDescriptorInst for displaying editor action on table row.
9
+ *
10
+ * @param {string} actionName - The name of the action.
11
+ * @param {EditorDescriptorInst<EditorModel, any>} editor - The editor descriptor instance responsible for configuring the editor behavior.
12
+ * @param {TableDescriptorInst<TableModel, any, any>} table - The table descriptor instance representing the table on which the action is positioned.
13
+ * @param {Object} [opts] - Optional configurations for the action editor.
14
+ * @param {ModelDescriptor<Model>} [opts.model] - The model descriptor associated with the action editor.
15
+ * @param {ActionEditorProviderType<Model, Service>} [opts.serviceProvider] - The service provider for additional configurations or services for the action editor.
16
+ * @param {ActionPositionEnum.RowInline | ActionPositionEnum.RowClick} [opts.position] - The position where the action should be displayed on the table row.
17
+ * @return {ActionEditorDescriptorInst<Model, Service, EditorModel, TableModel, EditorModel, TableModel>} The configured action editor descriptor instance.
18
+ */
19
+ export declare function actionEditorOnTableRow<EditorModel, TableModel, Model = EditorModel, Service = undefined>(actionName: string, editor: EditorDescriptorInst<EditorModel, any>, table: TableDescriptorInst<TableModel, any, any>, opts?: {
20
+ model?: ModelDescriptor<Model>;
21
+ serviceProvider?: ActionEditorProviderType<Model, Service>;
22
+ position?: ActionPositionEnum.RowInline | ActionPositionEnum.RowClick;
23
+ }): ActionEditorDescriptorInst<Model, Service, EditorModel, TableModel, EditorModel, TableModel>;
24
+ /**
25
+ * Creates and returns an action editor descriptor configured with the given parameters.
26
+ * This is used to define an action editor positioned relative to a table.
27
+ *
28
+ * @param {string} actionName - The name of the action.
29
+ * @param {EditorDescriptorInst<EditorModel, any>} editor - The editor descriptor instance responsible for configuring the editor behavior.
30
+ * @param {Object} [opts] - Optional configurations for the action editor.
31
+ * @param {ModelDescriptor<Model>} [opts.model] - The model descriptor associated with the action editor.
32
+ * @param {ActionEditorProviderType<Model, Service>} [opts.serviceProvider] - The service provider for additional configurations or services for the action editor.
33
+ * @param {ActionPositionEnum.ToolbarLeft | ActionPositionEnum.ToolbarRight | ActionPositionEnum.TableHeader} [opts.position] - The position of the action on the table.
34
+ * @return {ActionEditorDescriptorInst<Model, Service, EditorModel, undefined, EditorModel, undefined>} The configured action editor descriptor instance.
35
+ */
36
+ export declare function actionEditorOnTableTop<EditorModel, Model = EditorModel, Service = undefined>(actionName: string, editor: EditorDescriptorInst<EditorModel, any>, opts?: {
37
+ model?: ModelDescriptor<Model>;
38
+ serviceProvider?: ActionEditorProviderType<Model, Service>;
39
+ position?: ActionPositionEnum.ToolbarLeft | ActionPositionEnum.ToolbarRight | ActionPositionEnum.TableHeader;
40
+ }): ActionEditorDescriptorInst<Model, Service, EditorModel, undefined, EditorModel, undefined>;
@@ -1,14 +1,19 @@
1
1
  import { Injector } from '@angular/core';
2
2
  import { Observable } from 'rxjs';
3
- import { DataListResult, IDataProvider } from '@mediusinc/mng-commons/core';
3
+ import { DataListResult, IDataProvider, Nullable } from '@mediusinc/mng-commons/core';
4
4
  import { IActionContext } from '../models/execution/action-context.model';
5
- export declare function runFnFromDataProviderOrFallback<Item, Service, Return, FallbackReturn = Return>(ctx: IActionContext<Item, Service>, fn: (ctx: IActionContext<Item, Service>) => Observable<Return> | null, fallback: Observable<FallbackReturn>): Observable<Return | FallbackReturn>;
6
- export declare function runFnFromDataProviderOrFail<Item, Service, Return>(ctx: IActionContext<Item, Service>, fn: (ctx: IActionContext<Item, Service>) => Observable<Return> | null): Observable<Return>;
7
- export declare function runGetAllFromDataProvider<Item, Service>(ctx: IActionContext<Item, Service>): Observable<DataListResult<Item>> | null;
8
- export declare function runFetchFromDataProvider<Item, Service>(ctx: IActionContext<Item, Service>): Observable<Item> | null;
9
- export declare function runCreateFromDataProvider<Item, Service>(ctx: IActionContext<Item, Service>): Observable<Item> | null;
10
- export declare function runUpdateFromDataProvider<Item, service>(ctx: IActionContext<Item, service>): Observable<Item> | null;
11
- export declare function runDeleteFromDataProvider<Item, Service>(ctx: IActionContext<Item, Service>): Observable<Item | null> | null;
5
+ export declare function runFnFromDataProviderOrFallback<Item, ParameterItem, Service, Return, FallbackReturn = Return>(ctx: IActionContext<Item, ParameterItem, Service>, fn: (ctx: IActionContext<Item, ParameterItem, Service>) => Observable<Return> | null, fallback: Observable<FallbackReturn>): Observable<Return | FallbackReturn>;
6
+ export declare function runFnFromDataProviderOrFail<Item, ParameterItem, Service, Return>(ctx: IActionContext<Item, ParameterItem, Service>, fn: (ctx: IActionContext<Item, ParameterItem, Service>) => Observable<Return> | null): Observable<Return>;
7
+ export declare function runGetAllFromDataProvider<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>): Observable<DataListResult<Item>> | null;
8
+ export type RunFetchFromDataProviderOptsType = {
9
+ strict?: boolean;
10
+ reason?: RunFetchFromDataProviderReasonType;
11
+ };
12
+ export type RunFetchFromDataProviderReasonType = 'create' | 'update' | 'fetch';
13
+ export declare function runFetchFromDataProvider<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>, opts?: RunFetchFromDataProviderOptsType): Observable<Item> | null;
14
+ export declare function runCreateFromDataProvider<Item, ParameterItem, Service>(ctx: IActionContext<Item, ParameterItem, Service>): Observable<Nullable<Item>> | null;
15
+ export declare function runUpdateFromDataProvider<Item, ParameterItem, service>(ctx: IActionContext<Item, ParameterItem, service>): Observable<Nullable<Item>> | null;
16
+ export declare function runDeleteFromDataProvider<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>): Observable<Nullable<Item>> | null;
12
17
  /**
13
18
  * Gets service instance of data provider.
14
19
  *
@@ -1,5 +1,5 @@
1
1
  import { ItemOrObservable, Nullable } from '@mediusinc/mng-commons/core';
2
2
  import { ActionContextValidation } from './execution/action-context-validation.model';
3
3
  import { IActionContext } from './execution/action-context.model';
4
- export type ActionRunFnType<Item, Service = undefined, ReturnItem = Item, Return = ItemOrObservable<Nullable<ReturnItem>>> = (ctx: IActionContext<Item, Service>) => Return;
5
- export type ActionValidationFnType<Item, Service = undefined, Return = ItemOrObservable<boolean>> = (ctx: ActionContextValidation<Item, Service>) => Return;
4
+ export type ActionRunFnType<Item, Service = undefined, InputItem = Item, ReturnItem = Item, Return = ItemOrObservable<Nullable<ReturnItem>>> = (ctx: IActionContext<Item, InputItem, Service>) => Return;
5
+ export type ActionValidationFnType<Item, Service = undefined, InputItem = Item, Return = ItemOrObservable<boolean>> = (ctx: ActionContextValidation<Item, InputItem, Service>) => Return;
@@ -2,7 +2,7 @@ import { HttpErrorResponse } from '@angular/common/http';
2
2
  import { ACommonsErrorBase, CommonsErrorBaseOptions, ICommonsActionError } from '@mediusinc/mng-commons/core';
3
3
  import { IActionContext } from './execution/action-context.model';
4
4
  export interface CommonsActionErrorOptions extends CommonsErrorBaseOptions {
5
- actionContext?: IActionContext<any, any>;
5
+ actionContext?: IActionContext<any, any, any>;
6
6
  httpError?: HttpErrorResponse;
7
7
  }
8
8
  export declare class CommonsActionError extends ACommonsErrorBase implements ICommonsActionError {
@@ -3,9 +3,9 @@ import { ActionDescriptorInst } from '../../descriptors/action.descriptor';
3
3
  /**
4
4
  * Class containing all main data for action validations (enabled/visible) to be executed in validation states.
5
5
  */
6
- export interface ActionContextValidation<Item, Service = undefined> {
6
+ export interface ActionContextValidation<Item, ParametersItem, Service = undefined> {
7
7
  descriptor: ActionDescriptorInst<Item, Service>;
8
- parameters: ActionParameters<Item>;
8
+ parameters: ActionParameters<ParametersItem>;
9
9
  serviceInstance: Service;
10
10
  dataProvider?: IDataProvider<Item, Service>;
11
11
  }
@@ -7,10 +7,10 @@ import { IViewContainer } from './view-container.model';
7
7
  /**
8
8
  * Class containing all main data for action to be executed in run/fetch/submit states.
9
9
  */
10
- export interface IActionContext<Item, Service = undefined, Instance extends IActionInstance<Item, Service> = IActionInstance<Item, Service>, ViewContainer extends IViewContainer<Item, Service, Instance> = IViewContainer<Item, Service, Instance>> {
10
+ export interface IActionContext<Item, ParametersItem, Service = undefined, Instance extends IActionInstance<Item, Service> = IActionInstance<Item, Service>, ViewContainer extends IViewContainer<Item, Service, Instance> = IViewContainer<Item, Service, Instance>> {
11
11
  contextLongName: string;
12
12
  instance: Instance;
13
- parameters: ActionParameters<Item>;
13
+ parameters: ActionParameters<ParametersItem>;
14
14
  functionName: 'run' | 'fetch' | 'submit';
15
15
  serviceInstance: Service;
16
16
  dataProvider?: IDataProvider<Item, Service>;
@@ -8,7 +8,7 @@ import { ActionInstanceStateEnum } from './action-instance-state.model';
8
8
  export interface IActionInstance<Item, Service> {
9
9
  instanceId: string;
10
10
  instanceLongName: string;
11
- action: ActionDescriptorInst<Item>;
11
+ action: ActionDescriptorInst<Item, any, any, any, any>;
12
12
  createdDate: Date;
13
13
  triggerParameters?: ActionParameters<Item>;
14
14
  activationParameters?: ActionParameters<Item>;