@mediusinc/mng-commons 5.5.0 → 6.0.0-rc.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (300) hide show
  1. package/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/notification.d.ts +17 -1
  7. package/core/helpers/route.d.ts +0 -1
  8. package/core/helpers/type-helpers.d.ts +8 -0
  9. package/core/i18n/i18n-error.d.ts +2 -3
  10. package/core/index.d.ts +0 -3
  11. package/core/models/menu.model.d.ts +0 -4
  12. package/core/router/route-builder.d.ts +1 -1
  13. package/core/services/commons.service.d.ts +0 -32
  14. package/core/services/tokens/module-config.token.d.ts +0 -28
  15. package/esm2022/core/action/action-parameters.model.mjs +1 -1
  16. package/esm2022/core/data-providers/base.data-provider.mjs +2 -4
  17. package/esm2022/core/data-providers/lookup.data-provider.mjs +1 -1
  18. package/esm2022/core/descriptors/model.descriptor.mjs +1 -1
  19. package/esm2022/core/descriptors/tableview.descriptor.mjs +1 -1
  20. package/esm2022/core/helpers/notification.mjs +19 -4
  21. package/esm2022/core/helpers/type-helpers.mjs +1 -1
  22. package/esm2022/core/i18n/i18n-error.mjs +10 -8
  23. package/esm2022/core/index.mjs +1 -4
  24. package/esm2022/core/models/menu.model.mjs +1 -1
  25. package/esm2022/core/router/route-builder.mjs +2 -2
  26. package/esm2022/core/services/commons.service.mjs +1 -34
  27. package/esm2022/core/services/tokens/module-config.token.mjs +1 -1
  28. package/esm2022/filter/descriptors/filter-lookup.descriptor.mjs +5 -86
  29. package/esm2022/filter/descriptors/filter.descriptor.mjs +7 -29
  30. package/esm2022/form/api/data-providers/lookup-data-provider.factory.mjs +14 -41
  31. package/esm2022/form/api/data-providers/lookup.data-provider.mjs +3 -3
  32. package/esm2022/form/api/descriptors/action-button.descriptor.mjs +5 -17
  33. package/esm2022/form/api/descriptors/button-style.builder.mjs +80 -101
  34. package/esm2022/form/api/index.mjs +2 -1
  35. package/esm2022/form/api/models/button.model.mjs +2 -0
  36. package/esm2022/model/class/data-providers/base-from-class-data-provider.factory.mjs +5 -0
  37. package/esm2022/model/class/descriptors/model-class.descriptor.mjs +28 -0
  38. package/esm2022/model/class/descriptors/type-class.descriptor.mjs +6 -0
  39. package/esm2022/model/class/helpers/model.mjs +53 -0
  40. package/esm2022/model/class/index.mjs +8 -0
  41. package/esm2022/model/class/mediusinc-mng-commons-model-class.mjs +5 -0
  42. package/esm2022/model/data-providers/base-from-type-data-provider.factory.mjs +11 -6
  43. package/esm2022/model/descriptors/model.descriptor.mjs +11 -54
  44. package/esm2022/model/descriptors/type.descriptor.mjs +2 -10
  45. package/esm2022/model/helpers/i18n.mjs +14 -9
  46. package/esm2022/model/index.mjs +1 -2
  47. package/esm2022/table/api/class/class-table-attribute-converter.mjs +80 -0
  48. package/esm2022/table/api/class/class-table-attribute.model.mjs +2 -0
  49. package/esm2022/table/api/class/class-table-data-provider.factory.mjs +5 -0
  50. package/esm2022/table/api/class/class-table-descriptor-helpers.mjs +99 -0
  51. package/esm2022/table/api/class/class-table-descriptor.factory.mjs +21 -0
  52. package/esm2022/table/api/class/index.mjs +6 -0
  53. package/esm2022/table/api/class/mediusinc-mng-commons-table-api-class.mjs +5 -0
  54. package/esm2022/table/api/data-providers/table-data-provider.factory.mjs +14 -41
  55. package/esm2022/table/api/data-providers/table.data-provider.mjs +3 -9
  56. package/esm2022/table/api/descriptors/column.descriptor.mjs +8 -3
  57. package/esm2022/table/api/descriptors/table-descriptor.factory.mjs +10 -77
  58. package/esm2022/table/api/descriptors/table.descriptor.mjs +3 -3
  59. package/esm2022/table/api/helpers/column-converter.mjs +25 -0
  60. package/esm2022/table/api/helpers/table-data-provider-descriptor-convert.mjs +4 -4
  61. package/esm2022/table/api/index.mjs +2 -4
  62. package/esm2022/table/api/models/table-columns.model.mjs +1 -1
  63. package/esm2022/table/components/column-value/column-value.component.mjs +7 -5
  64. package/esm2022/table/components/filter/filter-active-tag/filter-active-tag.component.mjs +3 -3
  65. package/esm2022/table/components/filter/filter-form/filter-form.component.mjs +5 -5
  66. package/esm2022/table/components/table/table.component.mjs +17 -18
  67. package/esm2022/table/helpers/notification.mjs +19 -13
  68. package/esm2022/tableview/action/components/action/action.component.mjs +41 -37
  69. package/esm2022/tableview/action/components/editor/injector-context/action-editor-injector-context.component.mjs +22 -13
  70. package/esm2022/tableview/action/helpers/action-execution.mjs +1 -1
  71. package/esm2022/tableview/action/helpers/i18n.mjs +50 -30
  72. package/esm2022/tableview/action/helpers/notification.mjs +73 -12
  73. package/esm2022/tableview/action/helpers/styles.mjs +2 -2
  74. package/esm2022/tableview/action/models/execution/action-context.model.mjs +1 -1
  75. package/esm2022/tableview/action/models/execution/action-instance.model.mjs +1 -1
  76. package/esm2022/tableview/action/services/action-executor.service.mjs +92 -75
  77. package/esm2022/tableview/action/services/data-provider-executor.service.mjs +18 -3
  78. package/esm2022/tableview/api/action/descriptors/action-descriptor.factory.mjs +13 -104
  79. package/esm2022/tableview/api/action/descriptors/action-editor-descriptor.factory.mjs +15 -62
  80. package/esm2022/tableview/api/action/descriptors/action-editor.descriptor.mjs +35 -82
  81. package/esm2022/tableview/api/action/descriptors/action-link-descriptor.factory.mjs +20 -33
  82. package/esm2022/tableview/api/action/descriptors/action-link.descriptor.mjs +1 -1
  83. package/esm2022/tableview/api/action/descriptors/action.descriptor.mjs +54 -95
  84. package/esm2022/tableview/api/action/descriptors/editor-action-descriptor.factory.mjs +21 -0
  85. package/esm2022/tableview/api/action/descriptors/editor-action-editor-descriptor.factory.mjs +21 -0
  86. package/esm2022/tableview/api/action/descriptors/table-action-descriptor.factory.mjs +37 -0
  87. package/esm2022/tableview/api/action/descriptors/table-action-editor-descriptor.factory.mjs +40 -0
  88. package/esm2022/tableview/api/action/helpers/data-provider-executors.mjs +25 -5
  89. package/esm2022/tableview/api/action/models/action-confirmation.model.mjs +2 -0
  90. package/esm2022/tableview/api/action/models/action-descriptor.types.mjs +1 -1
  91. package/esm2022/tableview/api/action/models/action-error.model.mjs +1 -1
  92. package/esm2022/tableview/api/action/models/execution/action-context-validation.model.mjs +1 -1
  93. package/esm2022/tableview/api/action/models/execution/action-context.model.mjs +1 -1
  94. package/esm2022/tableview/api/action/models/execution/action-instance.model.mjs +1 -1
  95. package/esm2022/tableview/api/action/models/tableview-action-default-categories.model.mjs +6 -6
  96. package/esm2022/tableview/api/action/services/data-provider-executor.service.mjs +3 -3
  97. package/esm2022/tableview/api/class/editor/class-editor-attribute-converter.mjs +85 -0
  98. package/esm2022/tableview/api/class/editor/class-editor-attribute.model.mjs +2 -0
  99. package/esm2022/tableview/api/class/editor/class-editor-data-provider.factory.mjs +5 -0
  100. package/esm2022/tableview/api/class/editor/class-editor-descriptor-helpers.mjs +95 -0
  101. package/esm2022/tableview/api/class/editor/class-editor-descriptor.factory.mjs +21 -0
  102. package/esm2022/tableview/api/class/index.mjs +13 -0
  103. package/esm2022/tableview/api/class/mediusinc-mng-commons-tableview-api-class.mjs +5 -0
  104. package/esm2022/tableview/api/class/tableview/class-tableview-attribute-converter.mjs +35 -0
  105. package/esm2022/tableview/api/class/tableview/class-tableview-attribute.model.mjs +2 -0
  106. package/esm2022/tableview/api/class/tableview/class-tableview-data-provider.factory.mjs +5 -0
  107. package/esm2022/tableview/api/class/tableview/class-tableview-descriptor-helpers.mjs +111 -0
  108. package/esm2022/tableview/api/class/tableview/class-tableview-descriptor.factory.mjs +26 -0
  109. package/esm2022/tableview/api/editor/data-providers/editor-data-provider.factory.mjs +14 -32
  110. package/esm2022/tableview/api/editor/data-providers/editor.data-provider.mjs +40 -7
  111. package/esm2022/tableview/api/editor/descriptors/editor-descriptor.factory.mjs +7 -73
  112. package/esm2022/tableview/api/editor/descriptors/editor.descriptor.mjs +49 -134
  113. package/esm2022/tableview/api/editor/descriptors/field-action.descriptor.mjs +14 -8
  114. package/esm2022/tableview/api/editor/descriptors/field-base.descriptor.mjs +11 -2
  115. package/esm2022/tableview/api/editor/descriptors/field-lookup.descriptor.mjs +3 -5
  116. package/esm2022/tableview/api/editor/descriptors/field-many.descriptor.mjs +2 -18
  117. package/esm2022/tableview/api/editor/descriptors/wrappers/editor-descriptor-nested-object-wrapper.mjs +51 -0
  118. package/esm2022/tableview/api/editor/models/editor-fields.model.mjs +1 -1
  119. package/esm2022/tableview/api/editor/models/form-editor.event.mjs +1 -1
  120. package/esm2022/tableview/api/editor/models/formly-custom-field.model.mjs +1 -1
  121. package/esm2022/tableview/api/index.mjs +9 -9
  122. package/esm2022/tableview/api/tableview/data-providers/tableview-data-provider.factory.mjs +13 -51
  123. package/esm2022/tableview/api/tableview/data-providers/tableview.data-provider.mjs +19 -11
  124. package/esm2022/tableview/api/tableview/descriptors/tableview-descriptor.factory.mjs +19 -96
  125. package/esm2022/tableview/api/tableview/descriptors/tableview.descriptor.mjs +29 -182
  126. package/esm2022/tableview/api/tableview/helpers/tableview-create.mjs +8 -6
  127. package/esm2022/tableview/api/tableview/helpers/tableview-data-provider-descriptor-convert.mjs +4 -4
  128. package/esm2022/tableview/api/tableview/helpers/tableview-default-actions.mjs +154 -106
  129. package/esm2022/tableview/api/tableview/helpers/tableview-input-builder.mjs +164 -7
  130. package/esm2022/tableview/api/tableview/models/tableview-descriptor-fields-manage-helper.type.mjs +2 -0
  131. package/esm2022/tableview/api/tableview/models/tableview-descriptor-helper.type.mjs +2 -0
  132. package/esm2022/tableview/api/tableview/models/tableview-input.model.mjs +1 -1
  133. package/esm2022/tableview/api/tableview/models/tableview-route.model.mjs +1 -1
  134. package/esm2022/tableview/editor/components/editor/form-editor.component.mjs +5 -8
  135. package/esm2022/tableview/editor/components/formly/fields/formly-field-action/formly-field-action.component.mjs +7 -5
  136. package/esm2022/tableview/editor/components/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +34 -23
  137. package/esm2022/tableview/editor/helpers/editor-field.mjs +3 -3
  138. package/esm2022/tableview/editor/helpers/editor-formly.mjs +4 -4
  139. package/esm2022/tableview/editor/helpers/field-create.mjs +21 -0
  140. package/esm2022/tableview/index.mjs +3 -2
  141. package/esm2022/tableview/provide.mjs +44 -1
  142. package/esm2022/tableview/tableview/components/route/tableview-route.component.mjs +1 -1
  143. package/esm2022/tableview/tableview/components/tableview/tableview.component.mjs +3 -1
  144. package/fesm2022/mediusinc-mng-commons-core.mjs +715 -792
  145. package/fesm2022/mediusinc-mng-commons-core.mjs.map +1 -1
  146. package/fesm2022/mediusinc-mng-commons-filter.mjs +10 -113
  147. package/fesm2022/mediusinc-mng-commons-filter.mjs.map +1 -1
  148. package/fesm2022/mediusinc-mng-commons-form-api.mjs +144 -203
  149. package/fesm2022/mediusinc-mng-commons-form-api.mjs.map +1 -1
  150. package/fesm2022/mediusinc-mng-commons-model-class.mjs +97 -0
  151. package/fesm2022/mediusinc-mng-commons-model-class.mjs.map +1 -0
  152. package/fesm2022/mediusinc-mng-commons-model.mjs +35 -144
  153. package/fesm2022/mediusinc-mng-commons-model.mjs.map +1 -1
  154. package/fesm2022/mediusinc-mng-commons-table-api-class.mjs +204 -0
  155. package/fesm2022/mediusinc-mng-commons-table-api-class.mjs.map +1 -0
  156. package/fesm2022/mediusinc-mng-commons-table-api.mjs +55 -319
  157. package/fesm2022/mediusinc-mng-commons-table-api.mjs.map +1 -1
  158. package/fesm2022/mediusinc-mng-commons-table.mjs +45 -38
  159. package/fesm2022/mediusinc-mng-commons-table.mjs.map +1 -1
  160. package/fesm2022/mediusinc-mng-commons-tableview-api-class.mjs +367 -0
  161. package/fesm2022/mediusinc-mng-commons-tableview-api-class.mjs.map +1 -0
  162. package/fesm2022/mediusinc-mng-commons-tableview-api.mjs +850 -1483
  163. package/fesm2022/mediusinc-mng-commons-tableview-api.mjs.map +1 -1
  164. package/fesm2022/mediusinc-mng-commons-tableview.mjs +421 -220
  165. package/fesm2022/mediusinc-mng-commons-tableview.mjs.map +1 -1
  166. package/filter/descriptors/filter-lookup.descriptor.d.ts +1 -26
  167. package/filter/descriptors/filter.descriptor.d.ts +5 -12
  168. package/form/api/data-providers/lookup-data-provider.factory.d.ts +17 -20
  169. package/form/api/data-providers/lookup.data-provider.d.ts +3 -3
  170. package/form/api/descriptors/action-button.descriptor.d.ts +11 -13
  171. package/form/api/descriptors/button-style.builder.d.ts +30 -44
  172. package/form/api/index.d.ts +1 -0
  173. package/form/api/models/button.model.d.ts +19 -0
  174. package/i18n/sl.json +56 -6
  175. package/model/class/README.md +8 -0
  176. package/model/class/data-providers/base-from-class-data-provider.factory.d.ts +3 -0
  177. package/model/class/descriptors/model-class.descriptor.d.ts +12 -0
  178. package/model/class/descriptors/type-class.descriptor.d.ts +3 -0
  179. package/model/{helpers → class/helpers}/model.d.ts +1 -2
  180. package/model/class/index.d.ts +4 -0
  181. package/model/data-providers/base-from-type-data-provider.factory.d.ts +13 -6
  182. package/model/descriptors/model.descriptor.d.ts +12 -27
  183. package/model/descriptors/type.descriptor.d.ts +0 -5
  184. package/model/helpers/i18n.d.ts +8 -3
  185. package/model/index.d.ts +0 -1
  186. package/package.json +25 -7
  187. package/table/api/class/README.md +10 -0
  188. package/table/api/{helpers/class-attribute-converter.d.ts → class/class-table-attribute-converter.d.ts} +2 -9
  189. package/table/api/{models → class}/class-table-attribute.model.d.ts +1 -1
  190. package/table/api/class/class-table-data-provider.factory.d.ts +4 -0
  191. package/table/api/{helpers/table-descriptor-helpers.d.ts → class/class-table-descriptor-helpers.d.ts} +2 -4
  192. package/table/api/class/class-table-descriptor.factory.d.ts +11 -0
  193. package/table/api/class/index.d.ts +5 -0
  194. package/table/api/data-providers/table-data-provider.factory.d.ts +17 -20
  195. package/table/api/data-providers/table.data-provider.d.ts +4 -12
  196. package/table/api/descriptors/column.descriptor.d.ts +5 -2
  197. package/table/api/descriptors/table-descriptor.factory.d.ts +3 -39
  198. package/table/api/descriptors/table.descriptor.d.ts +3 -3
  199. package/table/api/helpers/column-converter.d.ts +7 -0
  200. package/table/api/helpers/table-data-provider-descriptor-convert.d.ts +3 -3
  201. package/table/api/index.d.ts +1 -3
  202. package/table/api/models/table-columns.model.d.ts +2 -2
  203. package/table/components/column-value/column-value.component.d.ts +2 -0
  204. package/table/components/filter/filter-active-tag/filter-active-tag.component.d.ts +1 -1
  205. package/table/components/filter/filter-form/filter-form.component.d.ts +1 -1
  206. package/table/components/filter/filter-overlay-with-tag/filter-overlay-with-tag.component.d.ts +1 -1
  207. package/table/components/table/table.component.d.ts +0 -10
  208. package/table/helpers/notification.d.ts +10 -1
  209. package/tableview/action/components/action/action.component.d.ts +10 -13
  210. package/tableview/action/components/editor/action-editor.component.d.ts +1 -1
  211. package/tableview/action/components/editor/injector-context/action-editor-injector-context.component.d.ts +6 -5
  212. package/tableview/action/components/localization/data-language-dropdown.component.d.ts +3 -3
  213. package/tableview/action/components/table/action-table.component.d.ts +3 -3
  214. package/tableview/action/helpers/action-execution.d.ts +1 -1
  215. package/tableview/action/helpers/i18n.d.ts +36 -11
  216. package/tableview/action/helpers/notification.d.ts +37 -3
  217. package/tableview/action/models/execution/action-context.model.d.ts +3 -3
  218. package/tableview/action/models/execution/action-instance.model.d.ts +5 -5
  219. package/tableview/action/services/action-executor.service.d.ts +7 -7
  220. package/tableview/action/services/data-provider-executor.service.d.ts +16 -16
  221. package/tableview/action/services/view-container.service.d.ts +1 -1
  222. package/tableview/api/action/descriptors/action-descriptor.factory.d.ts +20 -31
  223. package/tableview/api/action/descriptors/action-editor-descriptor.factory.d.ts +18 -25
  224. package/tableview/api/action/descriptors/action-editor.descriptor.d.ts +39 -47
  225. package/tableview/api/action/descriptors/action-link-descriptor.factory.d.ts +21 -13
  226. package/tableview/api/action/descriptors/action-link.descriptor.d.ts +3 -3
  227. package/tableview/api/action/descriptors/action.descriptor.d.ts +49 -60
  228. package/tableview/api/action/descriptors/editor-action-descriptor.factory.d.ts +21 -0
  229. package/tableview/api/action/descriptors/editor-action-editor-descriptor.factory.d.ts +21 -0
  230. package/tableview/api/action/descriptors/table-action-descriptor.factory.d.ts +36 -0
  231. package/tableview/api/action/descriptors/table-action-editor-descriptor.factory.d.ts +40 -0
  232. package/tableview/api/action/helpers/data-provider-executors.d.ts +13 -8
  233. package/tableview/api/action/models/action-confirmation.model.d.ts +14 -0
  234. package/tableview/api/action/models/action-descriptor.types.d.ts +6 -2
  235. package/tableview/api/action/models/action-error.model.d.ts +1 -1
  236. package/tableview/api/action/models/execution/action-context-validation.model.d.ts +2 -2
  237. package/tableview/api/action/models/execution/action-context.model.d.ts +2 -2
  238. package/tableview/api/action/models/execution/action-instance.model.d.ts +1 -1
  239. package/tableview/api/action/models/tableview-action-default-categories.model.d.ts +5 -5
  240. package/tableview/api/action/services/data-provider-executor.service.d.ts +26 -25
  241. package/tableview/api/class/README.md +13 -0
  242. package/tableview/api/{editor/helpers/class-attribute-converter.d.ts → class/editor/class-editor-attribute-converter.d.ts} +2 -2
  243. package/tableview/api/{editor/models/class-tableview-attribute.model.d.ts → class/editor/class-editor-attribute.model.d.ts} +1 -1
  244. package/tableview/api/class/editor/class-editor-data-provider.factory.d.ts +4 -0
  245. package/tableview/api/{editor/helpers/editor-descriptor-helpers.d.ts → class/editor/class-editor-descriptor-helpers.d.ts} +2 -5
  246. package/tableview/api/class/editor/class-editor-descriptor.factory.d.ts +11 -0
  247. package/tableview/api/class/index.d.ts +10 -0
  248. package/tableview/api/{tableview/helpers/class-attribute-converter.d.ts → class/tableview/class-tableview-attribute-converter.d.ts} +1 -1
  249. package/tableview/api/{tableview/models → class/tableview}/class-tableview-attribute.model.d.ts +2 -2
  250. package/tableview/api/class/tableview/class-tableview-data-provider.factory.d.ts +4 -0
  251. package/tableview/api/{tableview/helpers/tableview-descriptor-helpers.d.ts → class/tableview/class-tableview-descriptor-helpers.d.ts} +1 -2
  252. package/tableview/api/class/tableview/class-tableview-descriptor.factory.d.ts +12 -0
  253. package/tableview/api/editor/data-providers/editor-data-provider.factory.d.ts +17 -16
  254. package/tableview/api/editor/data-providers/editor.data-provider.d.ts +64 -29
  255. package/tableview/api/editor/descriptors/editor-descriptor.factory.d.ts +5 -38
  256. package/tableview/api/editor/descriptors/editor.descriptor.d.ts +48 -112
  257. package/tableview/api/editor/descriptors/field-action.descriptor.d.ts +5 -5
  258. package/tableview/api/editor/descriptors/field-base.descriptor.d.ts +8 -1
  259. package/tableview/api/editor/descriptors/field-lookup.descriptor.d.ts +2 -3
  260. package/tableview/api/editor/descriptors/field-many.descriptor.d.ts +3 -11
  261. package/tableview/api/editor/descriptors/wrappers/editor-descriptor-nested-object-wrapper.d.ts +25 -0
  262. package/tableview/api/editor/models/editor-fields.model.d.ts +25 -21
  263. package/tableview/api/editor/models/form-editor.event.d.ts +0 -4
  264. package/tableview/api/index.d.ts +8 -7
  265. package/tableview/api/tableview/data-providers/tableview-data-provider.factory.d.ts +20 -25
  266. package/tableview/api/tableview/data-providers/tableview.data-provider.d.ts +22 -22
  267. package/tableview/api/tableview/descriptors/tableview-descriptor.factory.d.ts +20 -50
  268. package/tableview/api/tableview/descriptors/tableview.descriptor.d.ts +69 -163
  269. package/tableview/api/tableview/helpers/tableview-create.d.ts +18 -5
  270. package/tableview/api/tableview/helpers/tableview-data-provider-descriptor-convert.d.ts +2 -2
  271. package/tableview/api/tableview/helpers/tableview-default-actions.d.ts +73 -20
  272. package/tableview/api/tableview/helpers/tableview-input-builder.d.ts +87 -9
  273. package/tableview/api/tableview/models/tableview-descriptor-fields-manage-helper.type.d.ts +9 -0
  274. package/tableview/api/tableview/models/tableview-descriptor-helper.type.d.ts +2 -0
  275. package/tableview/api/tableview/models/tableview-input.model.d.ts +1 -1
  276. package/tableview/api/tableview/models/tableview-route.model.d.ts +1 -1
  277. package/tableview/editor/helpers/field-create.d.ts +9 -0
  278. package/tableview/index.d.ts +2 -1
  279. package/tableview/provide.d.ts +7 -0
  280. package/tableview/tableview/components/route/tableview-route.component.d.ts +1 -1
  281. package/tableview/tableview/components/tableview/tableview.component.d.ts +6 -6
  282. package/version-info.json +6 -6
  283. package/core/components/pages/error/error.page.component.d.ts +0 -11
  284. package/core/components/pages/not-found/not-found.page.component.d.ts +0 -11
  285. package/core/data-providers/base-data-provider.factory.d.ts +0 -13
  286. package/esm2022/core/components/pages/error/error.page.component.mjs +0 -24
  287. package/esm2022/core/components/pages/not-found/not-found.page.component.mjs +0 -24
  288. package/esm2022/core/data-providers/base-data-provider.factory.mjs +0 -28
  289. package/esm2022/model/helpers/model.mjs +0 -71
  290. package/esm2022/table/api/helpers/class-attribute-converter.mjs +0 -104
  291. package/esm2022/table/api/helpers/table-descriptor-helpers.mjs +0 -98
  292. package/esm2022/table/api/models/class-table-attribute.model.mjs +0 -2
  293. package/esm2022/tableview/api/action/descriptors/action-confirmation.descriptor.mjs +0 -88
  294. package/esm2022/tableview/api/editor/helpers/class-attribute-converter.mjs +0 -85
  295. package/esm2022/tableview/api/editor/helpers/editor-descriptor-helpers.mjs +0 -95
  296. package/esm2022/tableview/api/editor/models/class-tableview-attribute.model.mjs +0 -2
  297. package/esm2022/tableview/api/tableview/helpers/class-attribute-converter.mjs +0 -34
  298. package/esm2022/tableview/api/tableview/helpers/tableview-descriptor-helpers.mjs +0 -110
  299. package/esm2022/tableview/api/tableview/models/class-tableview-attribute.model.mjs +0 -2
  300. package/tableview/api/action/descriptors/action-confirmation.descriptor.d.ts +0 -37
@@ -2,21 +2,46 @@ import { TranslateService } from '@ngx-translate/core';
2
2
  import { Observable } from 'rxjs';
3
3
  import { I18nMissingTranslationStrategy } from '@mediusinc/mng-commons/core';
4
4
  import { ActionDescriptorInst, ActionEditorDescriptorInst } from '@mediusinc/mng-commons/tableview/api';
5
- export declare function getI18nForAction(translate: TranslateService, action: ActionDescriptorInst<any>, actionPathKeys: string | Array<string>, customKey?: string, item?: any, fallbackKey?: string, params?: any, missingTranslationStrategy?: I18nMissingTranslationStrategy): string | null;
5
+ type ActionI18nOptsType = {
6
+ customKey?: string;
7
+ fallbackKey?: string;
8
+ item?: any;
9
+ params?: any;
10
+ missingTranslationStrategy?: I18nMissingTranslationStrategy;
11
+ };
6
12
  /**
7
- * Returns async translation for given keys with given params.
8
- * @param translate TranslateService
9
- * @param action action descriptor
10
- * @param actionPathKeys action path keys
11
- * @param customKey custom key
12
- * @param item item
13
- * @param fallbackKey fallback key, used as fallback key
14
- * @param params additional params for translation
15
- * @param missingTranslationStrategy strategy when no translation is found
13
+ * Asynchronously retrieves internationalized text for a specified action.
14
+ *
15
+ * If no translation is found for actionPathKeys, the fallback is used (if provided).
16
+ * If custom key is provided, no other key will be used.
17
+ * Item can be interpolated under itemTitle, itemId (if specified in action model) or under item.* (JSON-like path to property).
18
+ * Params are interpolated in translation.
19
+ *
20
+ * @param {TranslateService} translate - The translation service used for retrieving localized strings.
21
+ * @param {ActionDescriptorInst<any>} action - The action descriptor that provides context for localization keys and parameters.
22
+ * @param {string | Array<string>} pathKeys - A string or array of strings representing the priority order of localization keys to look up for the action.
23
+ * @param {ActionI18nOptsType} [opts] - Optional settings to customize the localization behavior, including custom keys, fallback keys, parameters, and missing translation strategies.
24
+ * @return {Observable<string | null>} An observable that emits the localized string for the action or null if no appropriate translation is found.
16
25
  */
17
- export declare function getI18nForActionAsync(translate: TranslateService, action: ActionDescriptorInst<any>, actionPathKeys: string | Array<string>, customKey?: string, item?: any, fallbackKey?: string, params?: any, missingTranslationStrategy?: I18nMissingTranslationStrategy): Observable<string | null>;
26
+ export declare function getI18nForAction(translate: TranslateService, action: ActionDescriptorInst<any>, pathKeys: string | Array<string>, opts?: ActionI18nOptsType): string | null;
27
+ /**
28
+ * Asynchronously retrieves internationalized text for a specified action.
29
+ *
30
+ * If no translation is found for actionPathKeys, the fallback is used (if provided).
31
+ * If custom key is provided, no other key will be used.
32
+ * Item can be interpolated under itemTitle, itemId (if specified in action model) or under item.* (JSON-like path to property).
33
+ * Params are interpolated in translation.
34
+ *
35
+ * @param {TranslateService} translate - The translation service used for retrieving localized strings.
36
+ * @param {ActionDescriptorInst<any>} action - The action descriptor that provides context for localization keys and parameters.
37
+ * @param {string | Array<string>} pathKeys - A string or array of strings representing the priority order of localization keys to look up for the action.
38
+ * @param {ActionI18nOptsType} [opts] - Optional settings to customize the localization behavior, including custom keys, fallback keys, parameters, and missing translation strategies.
39
+ * @return {Observable<string | null>} An observable that emits the localized string for the action or null if no appropriate translation is found.
40
+ */
41
+ export declare function getI18nForActionAsync(translate: TranslateService, action: ActionDescriptorInst<any>, pathKeys: string | Array<string>, opts?: ActionI18nOptsType): Observable<string | null>;
18
42
  export declare function getI18nActionTitleAsync(translate: TranslateService, action: ActionDescriptorInst<any>, item?: any): Observable<string | null>;
19
43
  export declare function getI18nActionEditorTitleAsync(translate: TranslateService, action: ActionEditorDescriptorInst<any>, item?: any): Observable<string | null>;
20
44
  export declare function getI18nActionParams(translate: TranslateService, action: ActionDescriptorInst<any>, item?: any, params?: any): any;
21
45
  export declare function getI18nActionParamsAsync(translate: TranslateService, action: ActionDescriptorInst<any>, item?: any, params?: any): Observable<any>;
22
46
  export declare function populateI18nActionParams(params?: any): any;
47
+ export {};
@@ -1,6 +1,40 @@
1
1
  import { TranslateService } from '@ngx-translate/core';
2
2
  import { Message, MessageService } from 'primeng/api';
3
3
  import { ICommonsError } from '@mediusinc/mng-commons/core';
4
- import { ActionDescriptorInst } from '@mediusinc/mng-commons/tableview/api';
5
- export declare function actionNotificationSuccess(translate: TranslateService, action: ActionDescriptorInst<any>, functionName: string, messageService: MessageService, customTitleKey?: string, customMessageKey?: string, item?: any): Message;
6
- export declare function actionNotificationError(translate: TranslateService, action: ActionDescriptorInst<any>, error: ICommonsError, functionName: string, messageService: MessageService, item?: any, severity?: 'warn' | 'error'): Message;
4
+ import { ActionDescriptorInst, ActionNotificationType } from '@mediusinc/mng-commons/tableview/api';
5
+ type ActionNotificationOptsType = ActionNotificationType & {
6
+ item?: any;
7
+ functionName?: string;
8
+ };
9
+ /**
10
+ * Executes a notification success action for a given operation, translating
11
+ * and displaying a success message using the specified translation and message services.
12
+ *
13
+ * Provide title or message for custom titles (unrelated to model/action base paths for i18n).
14
+ * Item is interpolated as itemId, itemTitle or item.* for accessing desired properties.
15
+ * Set functionName in order to get specific translations for executing function (run, fetch, submit).
16
+ *
17
+ * @param {TranslateService} translate - The translation service used to retrieve localized messages.
18
+ * @param {MessageService} messageService - The message service responsible for displaying notifications.
19
+ * @param {ActionDescriptorInst<any>} action - The action descriptor instance that defines the operation.
20
+ * @param {ActionNotificationOptsType} [opts] - Optional configuration for customizing the success notification.
21
+ * @return {Message | undefined} The generated message object if a success message is found, otherwise undefined.
22
+ */
23
+ export declare function actionNotificationSuccess(translate: TranslateService, messageService: MessageService, action: ActionDescriptorInst<any>, opts?: ActionNotificationOptsType): Message | undefined;
24
+ /**
25
+ * Displays a notification for an error that occurred during an action execution.
26
+ *
27
+ * Provide title or message for custom titles (unrelated to model/action base paths for i18n).
28
+ * Item is interpolated as itemId, itemTitle or item.* for accessing desired properties.
29
+ * Set functionName in order to get specific translations for executing function (run, fetch, submit).
30
+ *
31
+ * @param {TranslateService} translate - The service used for translations.
32
+ * @param {MessageService} messageService - The service used for displaying messages.
33
+ * @param {ActionDescriptorInst<any>} action - The action descriptor instance related to the error.
34
+ * @param {ICommonsError} error - The error object containing details about the error.
35
+ * @param {'warn' | 'error'} [severity='error'] - The severity level of the notification (either 'warn' or 'error').
36
+ * @param {ActionNotificationOptsType} [opts] - Optional parameters for customizing the notification, such as title, message, or function name.
37
+ * @return {Message} - The message object created and displayed as a notification.
38
+ */
39
+ export declare function actionNotificationError(translate: TranslateService, messageService: MessageService, action: ActionDescriptorInst<any>, error: ICommonsError, severity?: 'warn' | 'error', opts?: ActionNotificationOptsType): Message;
40
+ export {};
@@ -8,10 +8,10 @@ import { ActionInstance } from './action-instance.model';
8
8
  /**
9
9
  * Class containing all main data for action to be executed in run/fetch/submit states.
10
10
  */
11
- export declare class ActionContext<Item, Service = undefined> implements IActionContext<Item, Service, ActionInstance<Item, Service>, ViewContainer<Item, Service>> {
11
+ export declare class ActionContext<Item, ParametersItem, Service = undefined> implements IActionContext<Item, ParametersItem, Service, ActionInstance<Item, Service>, ViewContainer<Item, Service>> {
12
12
  readonly injector: Injector;
13
13
  readonly instance: ActionInstance<Item, Service>;
14
- readonly parameters: ActionParameters<Item>;
14
+ readonly parameters: ActionParameters<ParametersItem>;
15
15
  readonly functionName: 'run' | 'fetch' | 'submit';
16
16
  readonly serviceInstance: Service;
17
17
  readonly dataProvider?: IDataProvider<Item, Service> | undefined;
@@ -25,7 +25,7 @@ export declare class ActionContext<Item, Service = undefined> implements IAction
25
25
  notification?: Message;
26
26
  runSubscription?: Subscription;
27
27
  dataProviderSource: ActionDataProviderSource;
28
- constructor(injector: Injector, instance: ActionInstance<Item, Service>, parameters: ActionParameters<Item>, functionName: 'run' | 'fetch' | 'submit', serviceInstance: Service, dataProvider?: IDataProvider<Item, Service> | undefined, viewContainer?: ViewContainer<Item, Service> | undefined, executionSubject?: ReplaySubject<Item | null | undefined>, executionIsRunningSubject?: BehaviorSubject<boolean>);
28
+ constructor(injector: Injector, instance: ActionInstance<Item, Service>, parameters: ActionParameters<ParametersItem>, functionName: 'run' | 'fetch' | 'submit', serviceInstance: Service, dataProvider?: IDataProvider<Item, Service> | undefined, viewContainer?: ViewContainer<Item, Service> | undefined, executionSubject?: ReplaySubject<Item | null | undefined>, executionIsRunningSubject?: BehaviorSubject<boolean>);
29
29
  get execution$(): import("rxjs").Observable<Item | null | undefined>;
30
30
  get executionIsRunning$(): import("rxjs").Observable<boolean>;
31
31
  executionStart(): void;
@@ -9,12 +9,12 @@ import { ActionContext } from './action-context.model';
9
9
  export declare class ActionInstance<Item, Service = undefined> implements IActionInstance<Item, Service> {
10
10
  readonly instanceId: string;
11
11
  readonly instanceLongName: string;
12
- readonly action: ActionDescriptorInst<Item>;
12
+ readonly action: ActionDescriptorInst<Item, Service, any, any, any>;
13
13
  readonly createdDate: Date;
14
14
  private readonly logger;
15
15
  readonly isRunLoadingSubject: BehaviorSubject<boolean>;
16
16
  triggerParameters?: ActionParameters<Item>;
17
- activationParameters?: ActionParameters<Item>;
17
+ activationParameters?: ActionParameters<any>;
18
18
  private readonly contexts;
19
19
  private readonly executionSubject;
20
20
  private readonly executionIsRunningSubject;
@@ -33,7 +33,7 @@ export declare class ActionInstance<Item, Service = undefined> implements IActio
33
33
  errorActionInstance?: IActionInstance<Item, Service>;
34
34
  constructor(action: ActionDescriptorInst<Item>, state?: ActionInstanceStateEnum);
35
35
  get isRunLoading$(): Observable<boolean>;
36
- get context(): ActionContext<Item, Service> | undefined;
36
+ get context(): ActionContext<Item, any, Service> | undefined;
37
37
  get execution$(): Observable<Item | null | undefined>;
38
38
  get executionIsRunning$(): Observable<boolean>;
39
39
  get state(): ActionInstanceStateEnum;
@@ -48,8 +48,8 @@ export declare class ActionInstance<Item, Service = undefined> implements IActio
48
48
  set reactivationInstance(instance: IActionInstance<Item, Service> | undefined);
49
49
  get reactivationInstance(): IActionInstance<Item, Service> | undefined;
50
50
  get reactivationInstance$(): Observable<IActionInstance<Item, Service>>;
51
- contextAt(idx: number): ActionContext<Item, Service> | undefined;
52
- newContext(context: ActionContext<Item, Service>, finishPrevious?: boolean): void;
51
+ contextAt(idx: number): ActionContext<Item, any, Service> | undefined;
52
+ newContext(context: ActionContext<Item, any, Service>, finishPrevious?: boolean): void;
53
53
  forceFinish(): void;
54
54
  private finish;
55
55
  isClosed(): boolean;
@@ -35,14 +35,14 @@ export declare abstract class ActionExecutorService {
35
35
  * @param parameters Action parameters.
36
36
  * @param dataProvider Data provider.
37
37
  */
38
- prepareActionContextValidation<Item, Service>(action: ActionDescriptorInst<Item>, parameters: ActionParameters<Item>, dataProvider?: IDataProvider<Item, Service>): ActionContextValidation<Item, Service>;
38
+ prepareActionContextValidation<Item, ParametersItem, Service>(action: ActionDescriptorInst<Item>, parameters: ActionParameters<ParametersItem>, dataProvider?: IDataProvider<Item, Service>): ActionContextValidation<Item, ParametersItem, Service>;
39
39
  /**
40
40
  * Runs action context by submitting execution results/errors to context, watching over instance results/errors, displaying notifications,
41
41
  * running next/error action and triggering dismiss of action. Confirmation is also processed here.
42
42
  *
43
43
  * @param ctx Action context to run.
44
44
  */
45
- run<Item, Service = undefined>(ctx: ActionContext<Item, Service>): void;
45
+ run<Item, ParametersItem, Service = undefined>(ctx: ActionContext<Item, ParametersItem, Service>): void;
46
46
  /**
47
47
  * Runs action context by submitting execution results/errors to context, watching over instance results/errors, displaying notifications,
48
48
  * running next/error action and triggering dismiss of action. Confirmation
@@ -63,7 +63,7 @@ export declare abstract class ActionExecutorService {
63
63
  *
64
64
  * @returns Action context for fetch function.
65
65
  */
66
- prepareContextForEditorFetch<Item, Service>(action: ActionEditorDescriptorInst<Item>, parameters: ActionParameters<Item>, dataProvider?: IDataProvider<Item, Service>, instance?: ActionInstance<Item, Service>, previousActionInstance?: IActionInstance<any, any>): ActionContext<Item, Service>;
66
+ prepareContextForEditorFetch<Item, ParametersItem, Service>(action: ActionEditorDescriptorInst<Item, any, any, ParametersItem, any, any>, parameters: ActionParameters<ParametersItem>, dataProvider?: IDataProvider<Item, Service>, instance?: ActionInstance<Item, Service>, previousActionInstance?: IActionInstance<any, any>): ActionContext<Item, ParametersItem, Service>;
67
67
  /**
68
68
  * Runs editor action's submit (=main run) function by creating new action context for action instance.
69
69
  *
@@ -75,7 +75,7 @@ export declare abstract class ActionExecutorService {
75
75
  *
76
76
  * @returns Action context for submit (=run) function.
77
77
  */
78
- prepareContextForEditorSubmit<Item, Service>(action: ActionEditorDescriptorInst<Item>, parameters: ActionParameters<Item>, dataProvider?: IDataProvider<Item, Service>, instance?: ActionInstance<Item, Service>, previousActionInstance?: IActionInstance<any, any>): ActionContext<Item, Service>;
78
+ prepareContextForEditorSubmit<Item, ParametersItem, Service>(action: ActionEditorDescriptorInst<Item, any, ParametersItem, any, any, any>, parameters: ActionParameters<ParametersItem>, dataProvider?: IDataProvider<Item, Service>, instance?: ActionInstance<Item, Service>, previousActionInstance?: IActionInstance<any, any>): ActionContext<Item, ParametersItem, Service>;
79
79
  /**
80
80
  * Prepares action exec context for action of type editor.
81
81
  *
@@ -108,7 +108,7 @@ export declare abstract class ActionExecutorService {
108
108
  *
109
109
  * @returns Action instance - if non provided in parameters, the newly created will be returned.
110
110
  */
111
- activateAction<Item, Service = undefined>(action: ActionDescriptorInst<Item>, parameters: ActionParameters<Item>, instance?: ActionInstance<Item, Service>, previousActionInstance?: ActionInstance<any, any>, runContext?: boolean): ActionInstance<Item, Service>;
111
+ activateAction<Item, ParametersItem, Service = undefined>(action: ActionDescriptorInst<Item, any, ParametersItem, any, any>, parameters: ActionParameters<ParametersItem>, instance?: ActionInstance<Item, Service>, previousActionInstance?: ActionInstance<any, any>, runContext?: boolean): ActionInstance<Item, Service>;
112
112
  /**
113
113
  * To be called when action editor is initialized to correctly activate action.
114
114
  * @param action Action descriptor.
@@ -160,7 +160,7 @@ export declare abstract class ActionExecutorService {
160
160
  *
161
161
  * @returns mapped ICommonsError.
162
162
  */
163
- toActionError(error?: any, context?: ActionContext<any, any>): ICommonsError;
163
+ toActionError(error?: any, context?: ActionContext<any, any, any>): ICommonsError;
164
164
  /**
165
165
  * Creates or gets existing action instance.
166
166
  * @param instance Action instance.
@@ -170,5 +170,5 @@ export declare abstract class ActionExecutorService {
170
170
  * @param skipInitializationFromViewContainer If initialization of instance from view container should be skipped.
171
171
  * @private
172
172
  */
173
- protected getOrCreateInstance<Item, Service = undefined>(instance: ActionInstance<Item, Service> | undefined, action?: ActionDescriptorInst<Item, Service>, parameters?: ActionParameters<Item>, instanceInitialStatus?: ActionInstanceStateEnum, skipInitializationFromViewContainer?: boolean): ActionInstance<Item, Service>;
173
+ protected getOrCreateInstance<Item, Service = undefined>(instance: ActionInstance<Item, Service> | undefined, action?: ActionDescriptorInst<Item, Service, any, any, any>, parameters?: ActionParameters<any>, instanceInitialStatus?: ActionInstanceStateEnum, skipInitializationFromViewContainer?: boolean): ActionInstance<Item, Service>;
174
174
  }
@@ -1,23 +1,23 @@
1
1
  import { Observable } from 'rxjs';
2
2
  import { DataListResult, Nullable } from '@mediusinc/mng-commons/core';
3
- import { DataProviderExecutor, IActionContext } from '@mediusinc/mng-commons/tableview/api';
3
+ import { DataProviderExecutor, IActionContext, RunFetchFromDataProviderReasonType } from '@mediusinc/mng-commons/tableview/api';
4
4
  import * as i0 from "@angular/core";
5
5
  export declare class DefaultDataProviderExecutor extends DataProviderExecutor {
6
- runGetAll<Item, Service>(ctx: IActionContext<Item, Service>): Observable<DataListResult<Item>> | null;
7
- runGetAll<Item, Service>(ctx: IActionContext<Item, Service>, fallback: Observable<DataListResult<Item>>): Observable<DataListResult<Item>>;
8
- runGetAll<Item, Service>(ctx: IActionContext<Item, Service>, fallback: undefined): Observable<DataListResult<Item>> | null;
9
- runFetch<Item, Service>(ctx: IActionContext<Item, Service>): Observable<Item> | null;
10
- runFetch<Item, Service>(ctx: IActionContext<Item, Service>, fallback: Observable<Nullable<Item>>): Observable<Nullable<Item>>;
11
- runFetch<Item, Service>(ctx: IActionContext<Item, Service>, fallback: undefined): Observable<Nullable<Item>> | null;
12
- runCreate<Item, Service>(ctx: IActionContext<Item, Service>): Observable<Item> | null;
13
- runCreate<Item, Service>(ctx: IActionContext<Item, Service>, fallback: Observable<Nullable<Item>>): Observable<Nullable<Item>>;
14
- runCreate<Item, Service>(ctx: IActionContext<Item, Service>, fallback: undefined): Observable<Nullable<Item>> | null;
15
- runUpdate<Item, Service>(ctx: IActionContext<Item, Service>): Observable<Item> | null;
16
- runUpdate<Item, Service>(ctx: IActionContext<Item, Service>, fallback: Observable<Nullable<Item>>): Observable<Nullable<Item>>;
17
- runUpdate<Item, Service>(ctx: IActionContext<Item, Service>, fallback: undefined): Observable<Nullable<Item>> | null;
18
- runDelete<Item, Service>(ctx: IActionContext<Item, Service>): Observable<Nullable<Item>> | null;
19
- runDelete<Item, Service>(ctx: IActionContext<Item, Service>, fallback: Observable<Nullable<Item>>): Observable<Nullable<Item>>;
20
- runDelete<Item, Service>(ctx: IActionContext<Item, Service>, fallback: undefined): Observable<Nullable<Item>> | null;
6
+ runGetAll<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>): Observable<DataListResult<Item>> | null;
7
+ runGetAll<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>, fallback: Observable<DataListResult<Item>>): Observable<DataListResult<Item>>;
8
+ runGetAll<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>, fallback: undefined): Observable<DataListResult<Item>> | null;
9
+ runFetch<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>, fetchReason?: RunFetchFromDataProviderReasonType): Observable<Item> | null;
10
+ runFetch<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>, fetchReason: RunFetchFromDataProviderReasonType | undefined, fallback: Observable<Nullable<Item>>): Observable<Nullable<Item>>;
11
+ runFetch<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>, fetchReason: RunFetchFromDataProviderReasonType | undefined, fallback: undefined): Observable<Nullable<Item>> | null;
12
+ runCreate<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>): Observable<Item> | null;
13
+ runCreate<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>, fallback: Observable<Nullable<Item>>): Observable<Nullable<Item>>;
14
+ runCreate<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>, fallback: undefined): Observable<Nullable<Item>> | null;
15
+ runUpdate<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>): Observable<Item> | null;
16
+ runUpdate<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>, fallback: Observable<Nullable<Item>>): Observable<Nullable<Item>>;
17
+ runUpdate<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>, fallback: undefined): Observable<Nullable<Item>> | null;
18
+ runDelete<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>): Observable<Nullable<Item>> | null;
19
+ runDelete<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>, fallback: Observable<Nullable<Item>>): Observable<Nullable<Item>>;
20
+ runDelete<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>, fallback: undefined): Observable<Nullable<Item>> | null;
21
21
  static ɵfac: i0.ɵɵFactoryDeclaration<DefaultDataProviderExecutor, never>;
22
22
  static ɵprov: i0.ɵɵInjectableDeclaration<DefaultDataProviderExecutor>;
23
23
  }
@@ -10,7 +10,7 @@ import * as i0 from "@angular/core";
10
10
  export declare class ViewContainer<Item, Service = undefined> implements IViewContainer<Item, Service, ActionInstance<Item, Service>> {
11
11
  dataProvider: import("@angular/core").WritableSignal<IDataProvider<Item, Service> | undefined>;
12
12
  routeTriggeredActionInstance: import("@angular/core").WritableSignal<ActionInstance<Item, Service> | undefined>;
13
- actions: import("@angular/core").WritableSignal<ActionDescriptorInst<Item, any, Item>[]>;
13
+ actions: import("@angular/core").WritableSignal<ActionDescriptorInst<Item, any, Item, Item, Item>[]>;
14
14
  private _tableReloadSubject;
15
15
  private _editorResetSubject;
16
16
  private _editorCloseSubject;
@@ -1,36 +1,25 @@
1
- import { ClassType, IDataProvider, ServiceClassType } from '@mediusinc/mng-commons/core';
1
+ import { IDataProvider, ServiceClassType } from '@mediusinc/mng-commons/core';
2
2
  import { ModelDescriptor, TypeDescriptor } from '@mediusinc/mng-commons/model';
3
- import { ActionDeleteDescriptorInst, ActionDescriptorCreateOptsParentType, ActionDescriptorCreateOptsProviderType, ActionDescriptorInst } from './action.descriptor';
4
- export type ActionDescriptorCreateFromClassOpts<Model> = ActionDescriptorCreateOptsModel<Model> & ActionDescriptorCreateOptsI18nType & ActionDescriptorCreateOptsParentType;
5
- export type ActionDescriptorCreateOptsI18nType = {
6
- i18nBaseKey?: string | ClassType<any>;
3
+ import { ActionDescriptorCreateOptsParentType, ActionDescriptorCreateOptsProviderType, ActionDescriptorInst } from './action.descriptor';
4
+ export type ActionDescriptorCreateFromModelOptsType<RunInputType, RunReturnType, ValidationInput> = ActionDescriptorCreateOptsParentType & {
5
+ runInputType?: TypeDescriptor<RunInputType>;
6
+ runReturnType?: TypeDescriptor<RunReturnType>;
7
+ validationType?: TypeDescriptor<ValidationInput>;
7
8
  };
8
- export type ActionDescriptorCreateOptsModel<Model> = {
9
- idProperty?: keyof Model;
10
- titleProperty?: keyof Model;
9
+ export type ActionDescriptorCreateOptsType<Model, Service, RunInputType, RunReturnType, ValidationInput> = ActionDescriptorCreateOptsParentType & {
10
+ model?: ModelDescriptor<Model>;
11
+ serviceProvider?: ActionProviderType<Model, Service>;
12
+ runInputType?: TypeDescriptor<RunInputType>;
13
+ runReturnType?: TypeDescriptor<RunReturnType>;
14
+ validationType?: TypeDescriptor<ValidationInput>;
11
15
  };
12
16
  export type ActionProviderType<Model, Service> = ServiceClassType<Service> | IDataProvider<Model, Service>;
13
17
  export declare const actionGetProviderCfgObj: <Model, Service>(serviceOrDataProvider?: ActionProviderType<Model, Service>) => ActionDescriptorCreateOptsProviderType<Model, Service>;
14
- export declare class ActionDescriptor extends ActionDescriptorInst<any> {
15
- protected constructor();
16
- static create<Model>(actionName: string, cfg?: ActionDescriptorCreateOptsParentType): ActionDescriptorInst<Model, undefined>;
17
- static createWithProvider<Model, Service>(serviceProvider: ActionProviderType<Model, Service>, actionName: string, cfg?: ActionDescriptorCreateOptsParentType): ActionDescriptorInst<Model, Service>;
18
- static fromModel<Model>(model: ModelDescriptor<Model>, actionName: string, cfg?: ActionDescriptorCreateOptsParentType): ActionDescriptorInst<Model, undefined>;
19
- static fromModelWithProvider<Model, Service>(model: ModelDescriptor<Model>, serviceProvider: ActionProviderType<Model, Service>, actionName: string, cfg?: ActionDescriptorCreateOptsParentType): ActionDescriptorInst<Model, Service>;
20
- static fromClass<Model>(type: ClassType<Model>, actionName: string, cfg?: ActionDescriptorCreateFromClassOpts<Model>): ActionDescriptorInst<Model, undefined>;
21
- static fromClassWithProvider<Model, Service>(type: ClassType<Model>, serviceProvider: ActionProviderType<Model, Service>, actionName: string, cfg?: ActionDescriptorCreateFromClassOpts<Model>): ActionDescriptorInst<Model, Service>;
22
- }
23
- export declare function action<Model>(actionName: string, cfg?: ActionDescriptorCreateOptsParentType): ActionDescriptorInst<Model, undefined>;
24
- export declare function action<Model>(type: TypeDescriptor<Model>, actionName: string, cfg?: ActionDescriptorCreateOptsParentType): ActionDescriptorInst<Model, undefined>;
25
- export declare function actionWithProvider<Model, Service>(serviceProvider: ActionProviderType<Model, Service>, actionName: string, cfg?: ActionDescriptorCreateOptsParentType): ActionDescriptorInst<Model, Service>;
26
- export declare function actionWithProvider<Model, Service>(type: TypeDescriptor<Model>, serviceProvider: ActionProviderType<Model, Service>, actionName: string, cfg?: ActionDescriptorCreateOptsParentType): ActionDescriptorInst<Model, Service>;
27
- export declare function actionFromModel<Model>(model: ModelDescriptor<Model>, actionName: string, cfg?: ActionDescriptorCreateOptsParentType): ActionDescriptorInst<Model, undefined>;
28
- export declare function actionFromModel<Model, Service>(model: ModelDescriptor<Model>, serviceProvider: ActionProviderType<Model, Service>, actionName: string, cfg?: ActionDescriptorCreateOptsParentType): ActionDescriptorInst<Model, Service>;
29
- export declare function actionFromClass<Model>(type: ClassType<Model>, actionName: string, cfg?: ActionDescriptorCreateFromClassOpts<Model>): ActionDescriptorInst<Model, undefined>;
30
- export declare function actionFromClass<Model, Service>(type: ClassType<Model>, serviceProvider: ActionProviderType<Model, Service>, actionName: string, cfg?: ActionDescriptorCreateFromClassOpts<Model>): ActionDescriptorInst<Model, Service>;
31
- export declare class ActionDeleteDescriptor {
32
- static create<Model>(model: ModelDescriptor<Model>): ActionDeleteDescriptorInst<Model, undefined>;
33
- static createWithProvider<Model, Service>(model: ModelDescriptor<Model>, serviceProvider: ActionProviderType<Model, Service>): ActionDeleteDescriptorInst<Model, Service>;
34
- }
35
- export declare function actionDelete<Model>(model: ModelDescriptor<Model>): ActionDeleteDescriptorInst<Model, undefined>;
36
- export declare function actionDelete<Model, Service>(model: ModelDescriptor<Model>, serviceProvider: ActionProviderType<Model, Service>): ActionDeleteDescriptorInst<Model, Service>;
18
+ /**
19
+ * Creates and returns an instance of ActionDescriptorInst, allowing customization of the action's behavior through configuration options.
20
+ *
21
+ * @param {string} actionName - The unique name of the action.
22
+ * @param {ActionDescriptorCreateFromModelOptsType<Model, Service, RunInput, RunResult, ValidationInput>} [opts] - Optional configuration object to define the action's behavior, including model, service provider and other.
23
+ * @return {ActionDescriptorInst<Model, Service, RunInput, RunResult, ValidationInput>} An instance of ActionDescriptorInst configured with the provided parameters.
24
+ */
25
+ export declare function action<Model, Service = undefined, RunInput = Model, RunResult = Model, ValidationInput = Model>(actionName: string, opts?: ActionDescriptorCreateOptsType<Model, Service, RunInput, RunResult, ValidationInput>): ActionDescriptorInst<Model, Service, RunInput, RunResult, ValidationInput>;
@@ -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 { ActionNotificationType, 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,42 +14,38 @@ 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
- protected _hasFetchNotificationSuccess: boolean;
26
- protected _fetchNotificationSuccessTitle?: string;
27
- protected _fetchNotificationSuccessMessage?: string;
23
+ protected _fetchNotificationOnSuccess?: ActionNotificationType | boolean;
24
+ protected _fetchNotificationOnError?: ActionNotificationType | boolean;
28
25
  protected _dialogSize: StyleSizeEnum;
29
26
  protected _dialogClassName?: string;
30
- protected _fetchFunction?: (ctx: IActionContext<Item, Service>) => Observable<Item>;
31
- protected _submitFunction?: (ctx: IActionContext<Item, Service>) => Observable<Item>;
27
+ protected _fetchFunction?: ActionRunFnType<Item, Service, FetchInputItem, EditorItem>;
28
+ protected _submitFunction?: ActionRunFnType<Item, Service, EditorItem, SubmitReturnItem>;
32
29
  protected _editorComponent?: Type<any>;
33
30
  protected _resubmitEnabled?: boolean;
34
31
  protected _resubmitRefetch: boolean;
35
32
  protected _unsavedChangesConfirmation: boolean;
36
- constructor(editorDescriptor: EditorDescriptorInst<Item, any>, actionName: string, cfg?: ActionEditorDescriptorConstructorOptsType<Item, Service>);
37
- get isTableviewMainEditor(): boolean;
33
+ constructor(editorDescriptor: EditorDescriptorInst<EditorItem, any>, actionName: string, cfg?: ActionEditorDescriptorConstructorOptsType<Item, Service>);
38
34
  get editorTitle(): string | null | undefined;
39
35
  get editorTitleParams(): any;
40
- get editorDescriptor(): EditorDescriptorInst<Item, any>;
36
+ get editorDescriptor(): EditorDescriptorInst<EditorItem, any>;
41
37
  get dialogSize(): StyleSizeEnum;
42
38
  get dialogClassName(): string | undefined;
43
- get hasFetchNotificationSuccess(): boolean;
44
- get fetchNotificationSuccessTitle(): string | undefined;
45
- get fetchNotificationSuccessMessage(): string | undefined;
39
+ get fetchNotificationOnSuccess(): boolean | ActionNotificationType | undefined;
40
+ get fetchNotificationOnError(): boolean | ActionNotificationType | undefined;
46
41
  get dataProvider(): IEditorDataProvider<Item, any> | undefined;
47
42
  get hasRunFunction(): boolean;
48
- get runFunction(): (ctx: IActionContext<Item, unknown>) => Observable<Item>;
43
+ get runFunction(): ActionRunFnType<Item, Service, EditorItem, SubmitReturnItem>;
49
44
  get hasFetchFunction(): boolean;
50
- get fetchFunction(): ((ctx: IActionContext<Item, Service>) => Observable<Item>) | undefined;
45
+ get fetchFunction(): ActionRunFnType<Item, Service, FetchInputItem, EditorItem> | undefined;
51
46
  get hasSubmitFunction(): boolean;
52
- get submitFunction(): ((ctx: IActionContext<Item, Service>) => Observable<Item>) | undefined;
53
- get editorActions(): ActionDescriptorInst<Item, any, Item>[];
47
+ get submitFunction(): ActionRunFnType<Item, Service, EditorItem, SubmitReturnItem> | undefined;
48
+ get editorActions(): ActionDescriptorInst<any, any, EditorItem, any, EditorItem>[];
54
49
  get editorComponent(): Type<any> | undefined;
55
50
  get resubmitEnabled(): boolean | undefined;
56
51
  get resubmitRefetch(): boolean;
@@ -58,12 +53,24 @@ export declare class ActionEditorDescriptorInst<Item, Service = any, FetchInputI
58
53
  withEditorTitle(title: string | null, params?: any): this;
59
54
  withDialogSize(size?: StyleSizeEnum): this;
60
55
  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;
64
- withFetchNotificationError(title?: string, message?: string, hasNotification?: boolean): this;
65
- withEditorAction(action: ActionDescriptorInst<Item>): this;
66
- withEditorActions(actions: ActionDescriptorInst<Item>[]): this;
56
+ withRunFunction(fn: ActionRunFnType<Item, Service, EditorItem, SubmitReturnItem>): this;
57
+ withFetchFunction(fn: ActionRunFnType<Item, Service, FetchInputItem, EditorItem>): this;
58
+ withSubmitFunction(fn: ActionRunFnType<Item, Service, EditorItem, SubmitReturnItem>): this;
59
+ /**
60
+ * Override default notifications setup. Notifications can either be overridden with custom text or turned on/off.
61
+ *
62
+ * @param opts Provide config for texts or on/off flag for submit (is same as run) or fetch success/error notifications.
63
+ */
64
+ withNotifications(opts?: {
65
+ submitOnSuccess?: ActionNotificationType | boolean;
66
+ submitOnError?: ActionNotificationType | boolean;
67
+ runOnSuccess?: ActionNotificationType | boolean;
68
+ runOnError?: ActionNotificationType | boolean;
69
+ fetchOnSuccess?: ActionNotificationType | boolean;
70
+ fetchOnError?: ActionNotificationType | boolean;
71
+ } | boolean): this;
72
+ withEditorAction(action: ActionDescriptorInst<any, any, EditorItem, any, EditorItem>): this;
73
+ withEditorActions(actions: ActionDescriptorInst<any, any, EditorItem, any, EditorItem>[]): this;
67
74
  withEditorComponent(editorComponent: Type<any>): this;
68
75
  /**
69
76
  * Enables or disables resubmit resubmit - this means the form will not exit after successful submission, but will instead remain open.
@@ -75,39 +82,24 @@ export declare class ActionEditorDescriptorInst<Item, Service = any, FetchInputI
75
82
  */
76
83
  withResubmit(enabled?: boolean, refetch?: boolean): this;
77
84
  withUnsavedChangesConfirmation(unsavedChangesConfirmation?: boolean): this;
78
- copyFieldsTo(descriptor: ActionEditorDescriptorInst<Item, Service, FetchInputItem, SubmitReturnItem>): ActionEditorDescriptorInst<Item, Service, FetchInputItem, SubmitReturnItem>;
79
- copy(): ActionEditorDescriptorInst<Item, Service, FetchInputItem, SubmitReturnItem>;
85
+ copyFieldsTo(descriptor: ActionEditorDescriptorInst<Item, Service, EditorItem, FetchInputItem, SubmitReturnItem, ValidationInputItem>): ActionEditorDescriptorInst<Item, Service, EditorItem, FetchInputItem, SubmitReturnItem, ValidationInputItem>;
86
+ copy(): ActionEditorDescriptorInst<Item, Service, EditorItem, FetchInputItem, SubmitReturnItem, ValidationInputItem>;
80
87
  }
81
- export declare class ActionEditorSubmitDescriptorInst<Model> extends ActionDescriptorInst<Model> {
88
+ export declare class ActionEditorSubmitDescriptorInst<Model, EditorModel> extends ActionDescriptorInst<Model, undefined, EditorModel, EditorModel, EditorModel> {
82
89
  private readonly _submitType;
83
90
  constructor(editorActionName: string, editorActionModel: ModelDescriptor<Model> | undefined, submitType?: ActionEditorSubmitTypeEnum);
84
91
  get submitType(): ActionEditorSubmitTypeEnum;
85
- copy(): ActionEditorSubmitDescriptorInst<Model>;
92
+ copy(): ActionEditorSubmitDescriptorInst<Model, EditorModel>;
86
93
  }
87
94
  /**
88
95
  * creates primary action with primary button style
89
96
  * @param editorAction
90
97
  * @param submitType
91
98
  */
92
- export declare function actionEditorSubmit<Model>(editorAction: ActionEditorDescriptorInst<Model>, submitType?: ActionEditorSubmitTypeEnum): ActionEditorSubmitDescriptorInst<Model>;
99
+ export declare function actionEditorSubmit<Model, EditorModel>(editorAction: ActionEditorDescriptorInst<Model, any, EditorModel, any, any, any>, submitType?: ActionEditorSubmitTypeEnum): ActionEditorSubmitDescriptorInst<Model, EditorModel>;
93
100
  /**
94
101
  * creates secondary button with text button style
95
102
  * @param editorAction
96
103
  * @param submitType
97
104
  */
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
- }
105
+ 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 {};