@mediusinc/mng-commons 5.0.0-rc.0 → 5.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 (273) hide show
  1. package/core/data-list/data-list-params-helpers.d.ts +82 -0
  2. package/core/descriptors/action.descriptor.d.ts +3 -3
  3. package/core/descriptors/column.descriptor.d.ts +1 -1
  4. package/core/descriptors/editor.descriptor.d.ts +6 -6
  5. package/core/descriptors/enum.descriptor.d.ts +6 -0
  6. package/core/descriptors/filter.descriptor.d.ts +1 -1
  7. package/core/descriptors/model.descriptor.d.ts +1 -1
  8. package/core/descriptors/table.descriptor.d.ts +6 -6
  9. package/core/descriptors/tableview.descriptor.d.ts +10 -10
  10. package/core/enum/enum-helpers.d.ts +49 -0
  11. package/core/error/error-helpers.d.ts +114 -0
  12. package/core/helpers/date.d.ts +14 -0
  13. package/core/helpers/object.d.ts +27 -0
  14. package/core/helpers/route.d.ts +35 -0
  15. package/core/helpers/string.d.ts +7 -0
  16. package/core/helpers/templates.d.ts +3 -0
  17. package/core/i18n/i18n-common.d.ts +6 -0
  18. package/core/i18n/i18n-error.d.ts +4 -0
  19. package/core/i18n/i18n-type.d.ts +20 -0
  20. package/core/index.d.ts +15 -9
  21. package/{model → core}/pipes/enum.pipe.d.ts +2 -2
  22. package/core/pipes/enumerate.pipe.d.ts +3 -3
  23. package/{model → core}/pipes/i18n-property.pipe.d.ts +2 -2
  24. package/core/pipes/template.pipe.d.ts +0 -2
  25. package/core/router/route-builder.d.ts +151 -30
  26. package/core/router/routes-builder.d.ts +29 -15
  27. package/core/security/permission-helpers.d.ts +3 -0
  28. package/core/security/permissions.model.d.ts +2 -2
  29. package/esm2022/core/components/notification/notification-wrapper.component.mjs +4 -4
  30. package/esm2022/core/components/pages/error/error.page.component.mjs +3 -3
  31. package/esm2022/core/components/pages/not-found/not-found.page.component.mjs +3 -3
  32. package/esm2022/core/data-list/data-list-params-helpers.mjs +415 -0
  33. package/esm2022/core/data-list/filter-match.model.mjs +1 -1
  34. package/esm2022/core/data-providers/base.data-provider.mjs +1 -1
  35. package/esm2022/core/descriptors/action.descriptor.mjs +1 -1
  36. package/esm2022/core/descriptors/column.descriptor.mjs +1 -1
  37. package/esm2022/core/descriptors/editor.descriptor.mjs +1 -1
  38. package/esm2022/core/descriptors/enum.descriptor.mjs +2 -0
  39. package/esm2022/core/descriptors/filter.descriptor.mjs +1 -1
  40. package/esm2022/core/descriptors/model.descriptor.mjs +1 -1
  41. package/esm2022/core/descriptors/table.descriptor.mjs +1 -1
  42. package/esm2022/core/descriptors/tableview.descriptor.mjs +1 -1
  43. package/esm2022/core/directives/component.directive.mjs +4 -4
  44. package/esm2022/core/directives/dialog-keydown-handler.directive.mjs +4 -4
  45. package/esm2022/core/directives/template.directive.mjs +3 -3
  46. package/esm2022/core/enum/enum-helpers.mjs +81 -0
  47. package/esm2022/core/error/error-handler.mjs +3 -3
  48. package/esm2022/core/error/error-helpers.mjs +247 -0
  49. package/esm2022/core/helpers/coercion.mjs +1 -1
  50. package/esm2022/core/helpers/date.mjs +119 -0
  51. package/esm2022/core/helpers/object.mjs +145 -0
  52. package/esm2022/core/helpers/route.mjs +58 -0
  53. package/esm2022/core/helpers/string.mjs +57 -0
  54. package/esm2022/core/helpers/templates.mjs +4 -0
  55. package/esm2022/core/i18n/i18n-common.mjs +24 -0
  56. package/esm2022/core/i18n/i18n-error.mjs +27 -0
  57. package/esm2022/core/i18n/i18n-type.mjs +79 -0
  58. package/esm2022/core/index.mjs +17 -11
  59. package/esm2022/core/log/log-publisher-console.service.mjs +3 -3
  60. package/esm2022/core/log/logger.service.mjs +3 -3
  61. package/esm2022/core/pipes/boolean.pipe.mjs +4 -4
  62. package/esm2022/core/pipes/class-map.pipe.mjs +4 -4
  63. package/esm2022/core/pipes/enum.pipe.mjs +27 -0
  64. package/esm2022/core/pipes/enumerate-async.pipe.mjs +8 -8
  65. package/esm2022/core/pipes/enumerate.pipe.mjs +10 -10
  66. package/esm2022/core/pipes/getter.pipe.mjs +4 -4
  67. package/esm2022/core/pipes/i18n-property.pipe.mjs +19 -0
  68. package/esm2022/core/pipes/json-path.pipe.mjs +6 -6
  69. package/esm2022/core/pipes/parametrize.pipe.mjs +6 -6
  70. package/esm2022/core/pipes/template.pipe.mjs +7 -8
  71. package/esm2022/core/provide.mjs +1 -21
  72. package/esm2022/core/reflect/type-enum-metadata.mjs +1 -1
  73. package/esm2022/core/registry/type-registry.mjs +1 -1
  74. package/esm2022/core/router/route-builder.mjs +218 -107
  75. package/esm2022/core/router/routes-builder.mjs +42 -43
  76. package/esm2022/core/security/permission-helpers.mjs +14 -0
  77. package/esm2022/core/security/permission.guard.mjs +1 -1
  78. package/esm2022/core/security/permission.service.mjs +6 -6
  79. package/esm2022/core/security/permissions.model.mjs +1 -1
  80. package/esm2022/core/services/commons-configuration.service.mjs +6 -6
  81. package/esm2022/core/services/commons-init.service.mjs +4 -4
  82. package/esm2022/core/services/commons-router.service.mjs +4 -4
  83. package/esm2022/core/services/commons.service.mjs +4 -4
  84. package/esm2022/core/services/local-storage-config.service.mjs +4 -4
  85. package/esm2022/filter/descriptors/filter-lookup.descriptor.mjs +9 -10
  86. package/esm2022/filter/descriptors/filter.descriptor.mjs +1 -1
  87. package/esm2022/form/api/data-providers/lookup.data-provider.mjs +1 -1
  88. package/esm2022/form/api/descriptors/button-style.builder.mjs +1 -1
  89. package/esm2022/form/components/autocomplete/autocomplete.component.mjs +39 -45
  90. package/esm2022/form/components/date-range/date-range.component.mjs +4 -4
  91. package/esm2022/form/components/dropdown/dropdown.component.mjs +7 -7
  92. package/esm2022/form/directives/input-trim.directive.mjs +4 -4
  93. package/esm2022/model/descriptors/enum.descriptor.mjs +1 -1
  94. package/esm2022/model/descriptors/model.descriptor.mjs +4 -4
  95. package/esm2022/model/helpers/i18n.mjs +45 -0
  96. package/esm2022/model/helpers/model.mjs +71 -0
  97. package/esm2022/model/index.mjs +4 -7
  98. package/esm2022/table/api/data-providers/table.data-provider.mjs +1 -1
  99. package/esm2022/table/api/descriptors/column.descriptor.mjs +1 -1
  100. package/esm2022/table/api/descriptors/table.descriptor.mjs +36 -8
  101. package/esm2022/table/api/helpers/class-attribute-converter.mjs +1 -1
  102. package/esm2022/table/components/column-filter-full/column-filter-full.component.mjs +9 -9
  103. package/esm2022/table/components/column-value/column-value.component.mjs +12 -14
  104. package/esm2022/table/components/table/table.component.mjs +20 -37
  105. package/esm2022/table/helpers/notification.mjs +4 -4
  106. package/esm2022/table/pipes/locale-default-row-class.pipe.mjs +4 -4
  107. package/esm2022/table/pipes/table-column-filter-class.pipe.mjs +4 -4
  108. package/esm2022/table/services/data-list.service.mjs +3 -3
  109. package/esm2022/tableview/action/components/action/action.component.mjs +9 -9
  110. package/esm2022/tableview/action/components/editor/action-editor.component.mjs +4 -4
  111. package/esm2022/tableview/action/components/editor/injector-context/action-editor-injector-context.component.mjs +22 -21
  112. package/esm2022/tableview/action/components/localization/data-language-dropdown.component.mjs +3 -3
  113. package/esm2022/tableview/action/components/route/action-route.component.mjs +6 -5
  114. package/esm2022/tableview/action/components/table/action-table.component.mjs +12 -24
  115. package/esm2022/tableview/action/helpers/i18n.mjs +82 -0
  116. package/esm2022/tableview/action/helpers/notification.mjs +8 -8
  117. package/esm2022/tableview/action/helpers/styles.mjs +1 -1
  118. package/esm2022/tableview/action/models/execution/action-context.model.mjs +1 -1
  119. package/esm2022/tableview/action/models/execution/action-instance.model.mjs +1 -1
  120. package/esm2022/tableview/action/services/action-error-mapper.service.mjs +1 -1
  121. package/esm2022/tableview/action/services/action-executor.service.mjs +10 -9
  122. package/esm2022/tableview/action/services/component-action-executor.service.mjs +3 -3
  123. package/esm2022/tableview/action/services/data-provider-executor.service.mjs +3 -3
  124. package/esm2022/tableview/action/services/navigation.service.mjs +4 -4
  125. package/esm2022/tableview/action/services/providers/provide-view-container.mjs +1 -1
  126. package/esm2022/tableview/action/services/root-action-executor.service.mjs +3 -3
  127. package/esm2022/tableview/action/services/view-container.service.mjs +3 -3
  128. package/esm2022/tableview/api/action/descriptors/action-confirmation.descriptor.mjs +1 -1
  129. package/esm2022/tableview/api/action/descriptors/action-editor.descriptor.mjs +9 -1
  130. package/esm2022/tableview/api/action/descriptors/action.descriptor.mjs +1 -1
  131. package/esm2022/tableview/api/action/helpers/data-provider-executors.mjs +1 -1
  132. package/esm2022/tableview/api/action/models/execution/action-instance.model.mjs +1 -1
  133. package/esm2022/tableview/api/editor/data-providers/editor.data-provider.mjs +1 -1
  134. package/esm2022/tableview/api/editor/descriptors/editor.descriptor.mjs +21 -32
  135. package/esm2022/tableview/api/editor/descriptors/field-action.descriptor.mjs +1 -1
  136. package/esm2022/tableview/api/editor/descriptors/field-base.descriptor.mjs +3 -3
  137. package/esm2022/tableview/api/editor/descriptors/field-group.descriptor.mjs +3 -3
  138. package/esm2022/tableview/api/editor/descriptors/field-lookup.descriptor.mjs +8 -8
  139. package/esm2022/tableview/api/editor/descriptors/field-many.descriptor.mjs +1 -1
  140. package/esm2022/tableview/api/editor/descriptors/field-validation.descriptor.mjs +1 -1
  141. package/esm2022/tableview/api/editor/descriptors/field.descriptor.mjs +39 -10
  142. package/esm2022/tableview/api/editor/helpers/class-attribute-converter.mjs +1 -1
  143. package/esm2022/tableview/api/editor/helpers/field-validators.mjs +15 -25
  144. package/esm2022/tableview/api/editor/models/editor-fields.model.mjs +1 -1
  145. package/esm2022/tableview/api/editor/models/field.model.mjs +1 -1
  146. package/esm2022/tableview/api/editor/models/form-editor.event.mjs +1 -1
  147. package/esm2022/tableview/api/editor/models/form-editor.interface.mjs +1 -1
  148. package/esm2022/tableview/api/editor/models/formly-custom-field.model.mjs +3 -3
  149. package/esm2022/tableview/api/editor/models/formly-field.model.mjs +1 -1
  150. package/esm2022/tableview/api/tableview/data-providers/tableview.data-provider.mjs +1 -1
  151. package/esm2022/tableview/api/tableview/descriptors/tableview.descriptor.mjs +15 -22
  152. package/esm2022/tableview/api/tableview/helpers/class-attribute-converter.mjs +1 -1
  153. package/esm2022/tableview/api/tableview/helpers/files-export.mjs +1 -1
  154. package/esm2022/tableview/api/tableview/helpers/tableview-default-actions.mjs +4 -4
  155. package/esm2022/tableview/api/tableview/helpers/tableview-input-builder.mjs +1 -1
  156. package/esm2022/tableview/editor/components/editor/form-editor.component.mjs +158 -138
  157. package/esm2022/tableview/editor/components/formly/fields/formly-field-action/formly-field-action.component.mjs +4 -4
  158. package/esm2022/tableview/editor/components/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.mjs +5 -7
  159. package/esm2022/tableview/editor/components/formly/fields/formly-field-custom/formly-field-custom.component.mjs +3 -3
  160. package/esm2022/tableview/editor/components/formly/fields/formly-field-datepicker/formly-field-datepicker.component.mjs +103 -0
  161. package/esm2022/tableview/editor/components/formly/fields/formly-field-dropdown/formly-field-dropdown.component.mjs +5 -7
  162. package/esm2022/tableview/editor/components/formly/fields/formly-field-fieldset/formly-field-fieldset.component.mjs +3 -3
  163. package/esm2022/tableview/editor/components/formly/fields/formly-field-input/formly-field-input.component.mjs +33 -50
  164. package/esm2022/tableview/editor/components/formly/fields/formly-field-label/formly-field-label.component.mjs +3 -3
  165. package/esm2022/tableview/editor/components/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.mjs +8 -10
  166. package/esm2022/tableview/editor/components/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +6 -8
  167. package/esm2022/tableview/editor/components/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.mjs +19 -18
  168. package/esm2022/tableview/editor/components/formly/fields/formly-field-tabs/formly-field-tabs.component.mjs +3 -3
  169. package/esm2022/tableview/editor/components/formly/wrappers/formly-field-no-label-wrapper/formly-field-no-label-wrapper.component.mjs +4 -4
  170. package/esm2022/tableview/editor/components/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component.mjs +4 -4
  171. package/esm2022/tableview/editor/helpers/editor-formly.mjs +343 -0
  172. package/esm2022/tableview/editor/helpers/formly-config.mjs +5 -3
  173. package/esm2022/tableview/editor/models/formly-config.model.mjs +1 -1
  174. package/esm2022/tableview/editor/services/formly-config.provider.mjs +1 -1
  175. package/esm2022/tableview/index.mjs +3 -5
  176. package/esm2022/tableview/provide.mjs +2 -1
  177. package/esm2022/tableview/tableview/components/route/tableview-route.component.mjs +10 -10
  178. package/esm2022/tableview/tableview/components/tableview/tableview.component.mjs +30 -56
  179. package/esm2022/tableview/tableview/router/tableview-route-builder.mjs +17 -43
  180. package/fesm2022/mediusinc-mng-commons-core.mjs +1599 -1496
  181. package/fesm2022/mediusinc-mng-commons-core.mjs.map +1 -1
  182. package/fesm2022/mediusinc-mng-commons-filter.mjs +8 -9
  183. package/fesm2022/mediusinc-mng-commons-filter.mjs.map +1 -1
  184. package/fesm2022/mediusinc-mng-commons-form-api.mjs.map +1 -1
  185. package/fesm2022/mediusinc-mng-commons-form.mjs +51 -56
  186. package/fesm2022/mediusinc-mng-commons-form.mjs.map +1 -1
  187. package/fesm2022/mediusinc-mng-commons-model.mjs +99 -148
  188. package/fesm2022/mediusinc-mng-commons-model.mjs.map +1 -1
  189. package/fesm2022/mediusinc-mng-commons-table-api.mjs +35 -7
  190. package/fesm2022/mediusinc-mng-commons-table-api.mjs.map +1 -1
  191. package/fesm2022/mediusinc-mng-commons-table.mjs +48 -65
  192. package/fesm2022/mediusinc-mng-commons-table.mjs.map +1 -1
  193. package/fesm2022/mediusinc-mng-commons-tableview-api.mjs +105 -96
  194. package/fesm2022/mediusinc-mng-commons-tableview-api.mjs.map +1 -1
  195. package/fesm2022/mediusinc-mng-commons-tableview.mjs +865 -868
  196. package/fesm2022/mediusinc-mng-commons-tableview.mjs.map +1 -1
  197. package/filter/descriptors/filter.descriptor.d.ts +2 -2
  198. package/form/components/autocomplete/autocomplete.component.d.ts +8 -7
  199. package/model/descriptors/model.descriptor.d.ts +2 -2
  200. package/model/helpers/i18n.d.ts +10 -0
  201. package/model/helpers/model.d.ts +5 -0
  202. package/model/index.d.ts +2 -4
  203. package/package.json +7 -7
  204. package/table/api/descriptors/table.descriptor.d.ts +10 -0
  205. package/table/components/column-value/column-value.component.d.ts +3 -4
  206. package/table/components/table/table.component.d.ts +13 -13
  207. package/tableview/action/components/editor/injector-context/action-editor-injector-context.component.d.ts +1 -3
  208. package/tableview/action/components/route/action-route.component.d.ts +1 -1
  209. package/tableview/action/components/table/action-table.component.d.ts +6 -6
  210. package/tableview/action/helpers/i18n.d.ts +22 -0
  211. package/tableview/action/models/execution/action-instance-state.model.d.ts +21 -21
  212. package/tableview/action/models/execution/action-instance.model.d.ts +2 -1
  213. package/tableview/action/services/action-executor.service.d.ts +1 -1
  214. package/tableview/api/action/descriptors/action-editor.descriptor.d.ts +9 -1
  215. package/tableview/api/action/descriptors/action.descriptor.d.ts +3 -3
  216. package/tableview/api/action/models/action.type.d.ts +2 -2
  217. package/tableview/api/action/models/execution/action-instance-state.model.d.ts +21 -21
  218. package/tableview/api/action/models/execution/action-instance.model.d.ts +2 -1
  219. package/tableview/api/editor/descriptors/editor.descriptor.d.ts +16 -21
  220. package/tableview/api/editor/descriptors/field-action.descriptor.d.ts +2 -2
  221. package/tableview/api/editor/descriptors/field-base.descriptor.d.ts +29 -29
  222. package/tableview/api/editor/descriptors/field-group.descriptor.d.ts +9 -9
  223. package/tableview/api/editor/descriptors/field-lookup.descriptor.d.ts +4 -4
  224. package/tableview/api/editor/descriptors/field-many.descriptor.d.ts +4 -4
  225. package/tableview/api/editor/descriptors/field-validation.descriptor.d.ts +10 -13
  226. package/tableview/api/editor/descriptors/field.descriptor.d.ts +17 -2
  227. package/tableview/api/editor/helpers/field-validators.d.ts +6 -2
  228. package/tableview/api/editor/models/editor-fields.model.d.ts +9 -7
  229. package/tableview/api/editor/models/field.model.d.ts +16 -7
  230. package/tableview/api/editor/models/form-editor.event.d.ts +6 -4
  231. package/tableview/api/editor/models/form-editor.interface.d.ts +37 -8
  232. package/tableview/api/editor/models/formly-custom-field.model.d.ts +1 -1
  233. package/tableview/api/editor/models/formly-field.model.d.ts +9 -7
  234. package/tableview/api/tableview/descriptors/tableview.descriptor.d.ts +8 -9
  235. package/tableview/editor/components/editor/form-editor.component.d.ts +51 -35
  236. package/tableview/editor/components/formly/fields/formly-field-datepicker/formly-field-datepicker.component.d.ts +22 -0
  237. package/tableview/editor/components/formly/fields/formly-field-input/formly-field-input.component.d.ts +5 -7
  238. package/tableview/editor/components/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.d.ts +0 -1
  239. package/tableview/editor/helpers/editor-formly.d.ts +11 -0
  240. package/tableview/editor/models/formly-config.model.d.ts +1 -1
  241. package/tableview/index.d.ts +2 -2
  242. package/tableview/tableview/components/route/tableview-route.component.d.ts +2 -2
  243. package/tableview/tableview/components/tableview/tableview.component.d.ts +16 -15
  244. package/tableview/tableview/router/tableview-route-builder.d.ts +7 -13
  245. package/version-info.json +11 -0
  246. package/core/data-list/data-list-params.util.d.ts +0 -84
  247. package/core/enum/enum.util.d.ts +0 -51
  248. package/core/error/error.util.d.ts +0 -116
  249. package/core/security/permission.util.d.ts +0 -5
  250. package/core/utils/date.util.d.ts +0 -20
  251. package/core/utils/i18n.util.d.ts +0 -36
  252. package/core/utils/object.util.d.ts +0 -31
  253. package/core/utils/route.util.d.ts +0 -37
  254. package/core/utils/string.util.d.ts +0 -9
  255. package/esm2022/core/data-list/data-list-params.util.mjs +0 -417
  256. package/esm2022/core/enum/enum.util.mjs +0 -83
  257. package/esm2022/core/error/error.util.mjs +0 -249
  258. package/esm2022/core/security/permission.util.mjs +0 -16
  259. package/esm2022/core/utils/date.util.mjs +0 -136
  260. package/esm2022/core/utils/i18n.util.mjs +0 -137
  261. package/esm2022/core/utils/object.util.mjs +0 -147
  262. package/esm2022/core/utils/route.util.mjs +0 -60
  263. package/esm2022/core/utils/string.util.mjs +0 -59
  264. package/esm2022/model/pipes/enum.pipe.mjs +0 -26
  265. package/esm2022/model/pipes/i18n-property.pipe.mjs +0 -19
  266. package/esm2022/model/utils/i18n.util.mjs +0 -51
  267. package/esm2022/model/utils/model.util.mjs +0 -73
  268. package/esm2022/tableview/action/utils/i18n.util.mjs +0 -126
  269. package/esm2022/tableview/editor/utils/editor-formly.util.mjs +0 -337
  270. package/model/utils/i18n.util.d.ts +0 -15
  271. package/model/utils/model.util.d.ts +0 -8
  272. package/tableview/action/utils/i18n.util.d.ts +0 -48
  273. package/tableview/editor/utils/editor-formly.util.d.ts +0 -12
@@ -1,7 +1,7 @@
1
- import { FilterMatchModeExtendedType, IFilterDescriptorInternal } from '@mediusinc/mng-commons/core';
1
+ import { FilterMatchModeExtendedType, IFilterDescriptor } from '@mediusinc/mng-commons/core';
2
2
  import { InputTrimType } from '@mediusinc/mng-commons/form/api';
3
3
  import { FilterTypeEnum } from '../models/filter.model';
4
- export declare class FilterDescriptor<FilterModel, TableModel> implements IFilterDescriptorInternal<FilterModel, TableModel> {
4
+ export declare class FilterDescriptor<FilterModel, TableModel> implements IFilterDescriptor<FilterModel, TableModel> {
5
5
  protected readonly _property: string;
6
6
  protected _showOnColumn: string;
7
7
  protected _filterType: FilterTypeEnum;
@@ -1,5 +1,5 @@
1
- import { EventEmitter, ExistingProvider, OnDestroy, OnInit } from '@angular/core';
2
- import { ControlValueAccessor, FormControl } from '@angular/forms';
1
+ import { ExistingProvider, OnDestroy, OnInit } from '@angular/core';
2
+ import { ControlValueAccessor } from '@angular/forms';
3
3
  import { AutoComplete, AutoCompleteSelectEvent } from 'primeng/autocomplete';
4
4
  import { AutoCompleteCompleteEvent } from 'primeng/autocomplete/autocomplete.interface';
5
5
  import { ReplaySubject } from 'rxjs';
@@ -27,14 +27,15 @@ export declare class AutocompleteComponent implements OnInit, OnDestroy, Control
27
27
  autoClear: import("@angular/core").InputSignal<boolean>;
28
28
  selectFirst: import("@angular/core").InputSignal<boolean>;
29
29
  searchTrim: import("@angular/core").InputSignal<InputTrimType | undefined>;
30
- valueChangeEventEmitter: EventEmitter<any>;
30
+ valueChange: import("@angular/core").OutputEmitterRef<any>;
31
31
  primeAutocomplete: import("@angular/core").Signal<AutoComplete | undefined>;
32
32
  private isInited;
33
33
  private searchSubscription;
34
34
  private dataProviderService;
35
35
  private onChangeFn;
36
36
  private onTouchedFn;
37
- autocompleteFormControl: FormControl;
37
+ value: import("@angular/core").WritableSignal<any>;
38
+ isDisabled: import("@angular/core").WritableSignal<boolean>;
38
39
  suggestions: import("@angular/core").WritableSignal<any[]>;
39
40
  private isPanelShown;
40
41
  private isFocused;
@@ -59,7 +60,7 @@ export declare class AutocompleteComponent implements OnInit, OnDestroy, Control
59
60
  /**
60
61
  * calls the selectFirst item anytime the input field goes out of focus and if the suggestions panel is not displayed.
61
62
  */
62
- onBlur(event: Event): void;
63
+ onBlur(): void;
63
64
  onShow(): void;
64
65
  /**
65
66
  * calls the selectFirst item anytime the suggestions panel is closed and input field isn't focused.
@@ -72,11 +73,11 @@ export declare class AutocompleteComponent implements OnInit, OnDestroy, Control
72
73
  setDisabledState(isDisabled: boolean): void;
73
74
  writeValue(value: any): void;
74
75
  private setItemsAndDataProvider;
75
- private setAutocompleteValueFromWrite;
76
+ private setValueFromWrite;
76
77
  private getLookup;
77
78
  private i18nGetItemsKeys;
78
79
  private i18nPopulateItems;
79
80
  private setSuggestionsFromItems;
80
81
  static ɵfac: i0.ɵɵFactoryDeclaration<AutocompleteComponent, never>;
81
- static ɵcmp: i0.ɵɵComponentDeclaration<AutocompleteComponent, "mng-autocomplete", never, { "dataProvider": { "alias": "dataProvider"; "required": true; "isSignal": true; }; "optionsTrackProperty": { "alias": "optionsTrackProperty"; "required": false; "isSignal": true; }; "optionsValuePropertyInit": { "alias": "optionsValueProperty"; "required": false; "isSignal": true; }; "optionsLabelPropertyInit": { "alias": "optionsLabelProperty"; "required": false; "isSignal": true; }; "optionsLabelTranslate": { "alias": "optionsLabelTranslate"; "required": false; "isSignal": true; }; "inlineSearch": { "alias": "inlineSearch"; "required": false; "isSignal": true; }; "openOnFocus": { "alias": "openOnFocus"; "required": false; "isSignal": true; }; "multiselect": { "alias": "multiselect"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "className": { "alias": "className"; "required": false; "isSignal": true; }; "dropdownClassName": { "alias": "dropdownClassName"; "required": false; "isSignal": true; }; "showClear": { "alias": "showClear"; "required": false; "isSignal": true; }; "autoClear": { "alias": "autoClear"; "required": false; "isSignal": true; }; "selectFirst": { "alias": "selectFirst"; "required": false; "isSignal": true; }; "searchTrim": { "alias": "searchTrim"; "required": false; "isSignal": true; }; }, { "valueChangeEventEmitter": "valueChange"; }, never, never, true, never>;
82
+ static ɵcmp: i0.ɵɵComponentDeclaration<AutocompleteComponent, "mng-autocomplete", never, { "dataProvider": { "alias": "dataProvider"; "required": true; "isSignal": true; }; "optionsTrackProperty": { "alias": "optionsTrackProperty"; "required": false; "isSignal": true; }; "optionsValuePropertyInit": { "alias": "optionsValueProperty"; "required": false; "isSignal": true; }; "optionsLabelPropertyInit": { "alias": "optionsLabelProperty"; "required": false; "isSignal": true; }; "optionsLabelTranslate": { "alias": "optionsLabelTranslate"; "required": false; "isSignal": true; }; "inlineSearch": { "alias": "inlineSearch"; "required": false; "isSignal": true; }; "openOnFocus": { "alias": "openOnFocus"; "required": false; "isSignal": true; }; "multiselect": { "alias": "multiselect"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "className": { "alias": "className"; "required": false; "isSignal": true; }; "dropdownClassName": { "alias": "dropdownClassName"; "required": false; "isSignal": true; }; "showClear": { "alias": "showClear"; "required": false; "isSignal": true; }; "autoClear": { "alias": "autoClear"; "required": false; "isSignal": true; }; "selectFirst": { "alias": "selectFirst"; "required": false; "isSignal": true; }; "searchTrim": { "alias": "searchTrim"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
82
83
  }
@@ -1,6 +1,6 @@
1
- import { ClassOptType, ClassType, IModelDescriptorInternal } from '@mediusinc/mng-commons/core';
1
+ import { ClassOptType, ClassType, IModelDescriptor } from '@mediusinc/mng-commons/core';
2
2
  import { TypeDescriptor } from './type.descriptor';
3
- export declare class ModelDescriptor<Model, ModelClass = ClassOptType<Model>> implements IModelDescriptorInternal<Model, ModelClass> {
3
+ export declare class ModelDescriptor<Model, ModelClass = ClassOptType<Model>> implements IModelDescriptor<Model, ModelClass> {
4
4
  private readonly _type;
5
5
  private readonly _typeName?;
6
6
  private _i18nBaseKey;
@@ -0,0 +1,10 @@
1
+ import { TranslateService } from '@ngx-translate/core';
2
+ import { Observable } from 'rxjs';
3
+ import { KeyOfType } from '@mediusinc/mng-commons/core';
4
+ import { ModelDescriptor } from '../descriptors/model.descriptor';
5
+ export declare function getI18nForModel(translate: TranslateService, model: ModelDescriptor<any>, keyPath: string, customKey?: string, item?: any, fallbackKey?: string, params?: any): string | null;
6
+ export declare function getI18nModelName(translate: TranslateService, model: ModelDescriptor<any>, singular?: boolean): string | null;
7
+ export declare function getI18nModelNameAsync(translate: TranslateService, model: ModelDescriptor<any>, singular?: boolean): Observable<string | null>;
8
+ export declare function getI18nModelParams(translate: TranslateService, model?: ModelDescriptor<any>, item?: any, params?: any): any;
9
+ export declare function getI18nModelParamsAsync(translate: TranslateService, model?: ModelDescriptor<any>, item?: any, params?: any): Observable<any>;
10
+ export declare function populateI18nModelParams(idProperty?: KeyOfType, titleProperty?: KeyOfType, item?: any, params?: any): any;
@@ -0,0 +1,5 @@
1
+ import { ClassAttributeDef, ClassType, ILookupDescriptor } from '@mediusinc/mng-commons/core';
2
+ export declare function findClassIdAttribute<T>(classType?: ClassType<T>): string | null;
3
+ export declare function findClassTitleAttribute<T>(classType?: ClassType<T>): string | null;
4
+ export declare function getClassAttributeDef<T>(classType?: ClassType<T>): ClassAttributeDef[] | null;
5
+ export declare function trySetLookupItemsProperties<T>(lookup: ILookupDescriptor<T>, idAsTrack?: boolean): void;
package/model/index.d.ts CHANGED
@@ -1,7 +1,5 @@
1
1
  export * from './descriptors/enum.descriptor';
2
2
  export * from './descriptors/model.descriptor';
3
3
  export * from './descriptors/type.descriptor';
4
- export * from './pipes/enum.pipe';
5
- export * from './pipes/i18n-property.pipe';
6
- export * from './utils/i18n.util';
7
- export * from './utils/model.util';
4
+ export * from './helpers/i18n';
5
+ export * from './helpers/model';
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@mediusinc/mng-commons",
3
- "version": "5.0.0-rc.0",
3
+ "version": "5.0.0-rc.2",
4
4
  "peerDependencies": {
5
- "@angular/animations": "^17.2.0",
6
- "@angular/common": "^17.2.0",
7
- "@angular/core": "^17.2.0",
8
- "@angular/forms": "^17.2.0",
9
- "@angular/platform-browser": "^17.2.0",
10
- "@angular/router": "^17.2.0",
5
+ "@angular/animations": "^17.3.0",
6
+ "@angular/common": "^17.3.0",
7
+ "@angular/core": "^17.3.0",
8
+ "@angular/forms": "^17.3.0",
9
+ "@angular/platform-browser": "^17.3.0",
10
+ "@angular/router": "^17.3.0",
11
11
  "@ngx-formly/core": "^6.3.0",
12
12
  "@ngx-translate/core": "^15.0.0",
13
13
  "primeng": "^17.12.0"
@@ -37,6 +37,9 @@ export declare class TableDescriptorInst<TableModel, Sorts = keyof TableModel, F
37
37
  private _sorts;
38
38
  private _isLocalized;
39
39
  private _localizationLocaleProperty?;
40
+ private _rowExpandable;
41
+ private _rowExpandableColSpan;
42
+ private _rowExpandableProperty?;
40
43
  protected constructor(model: ModelDescriptor<TableModel>, autoGenerated?: boolean);
41
44
  get identifier(): string | undefined;
42
45
  get trackProperty(): string | undefined;
@@ -66,6 +69,12 @@ export declare class TableDescriptorInst<TableModel, Sorts = keyof TableModel, F
66
69
  get headerClassName(): string | undefined;
67
70
  get isLocalized(): boolean;
68
71
  get localizationLocaleProperty(): string | undefined;
72
+ get rowExpandable(): boolean;
73
+ get rowExpandableColSpan(): number;
74
+ /**
75
+ * This table model property tells us if the specific row should be expandable or not based on row item value
76
+ */
77
+ get rowExpandableProperty(): string | undefined;
69
78
  /**
70
79
  * Track property is used for the purpose of combined saving user preferences in localstorage if 2 tables have the same track properties they will share the same localstorage entry.
71
80
  * Similarly, this property can also be used to differentiate two tables of the same model on the same url (so that they have separate entries in localstorage).
@@ -149,6 +158,7 @@ export declare class TableDescriptorInst<TableModel, Sorts = keyof TableModel, F
149
158
  withHeaderClassName(headerClassName: string): this;
150
159
  withLocalized(): this;
151
160
  withLocalizationLocaleProperty(localizationLocaleProperty: string): this;
161
+ withRowExpandable(property?: keyof TableModel, colSpan?: number): this;
152
162
  protected copyFieldsTo(obj: TableDescriptorInst<any, any, any>): void;
153
163
  copy(): TableDescriptorInst<TableModel, Sorts, Filters>;
154
164
  /**
@@ -1,15 +1,12 @@
1
1
  import { ElementRef, OnInit } from '@angular/core';
2
2
  import { TranslateService } from '@ngx-translate/core';
3
3
  import { MessageService } from 'primeng/api';
4
- import { GetterPipe, TemplatePipe } from '@mediusinc/mng-commons/core';
5
4
  import { ColumnDescriptor, ColumnDisplayTypeEnum } from '@mediusinc/mng-commons/table/api';
6
5
  import * as i0 from "@angular/core";
7
6
  export declare class TableColumnValueComponent<T, TT> implements OnInit {
8
7
  private elementRef;
9
8
  private messageService;
10
9
  private translate;
11
- private getterPipe;
12
- private templatePipe;
13
10
  readonly columnDisplayTypeString: ColumnDisplayTypeEnum;
14
11
  readonly columnDisplayTypeNumber: ColumnDisplayTypeEnum;
15
12
  readonly columnDisplayTypeCurrency: ColumnDisplayTypeEnum;
@@ -18,6 +15,8 @@ export declare class TableColumnValueComponent<T, TT> implements OnInit {
18
15
  readonly columnDisplayTypeEnum: ColumnDisplayTypeEnum;
19
16
  readonly columnDisplayTypeComponent: ColumnDisplayTypeEnum;
20
17
  readonly columnDisplayTypeHtml: ColumnDisplayTypeEnum;
18
+ private readonly getterPipe;
19
+ private readonly templatePipe;
21
20
  descriptor: ColumnDescriptor<T, TT>;
22
21
  item: any;
23
22
  styleMaxWidth: number | null;
@@ -25,7 +24,7 @@ export declare class TableColumnValueComponent<T, TT> implements OnInit {
25
24
  currency?: string;
26
25
  jsonPath: string;
27
26
  value: any;
28
- constructor(elementRef: ElementRef, messageService: MessageService, translate: TranslateService, getterPipe: GetterPipe, templatePipe: TemplatePipe);
27
+ constructor(elementRef: ElementRef, messageService: MessageService, translate: TranslateService);
29
28
  ngOnInit(): void;
30
29
  copyToClipboard(event: Event): void;
31
30
  static ɵfac: i0.ɵɵFactoryDeclaration<TableColumnValueComponent<any, any>, never>;
@@ -1,4 +1,4 @@
1
- import { AfterContentInit, EventEmitter, OnChanges, OnDestroy, OnInit, QueryList, SimpleChanges, TemplateRef, Type, WritableSignal } from '@angular/core';
1
+ import { EventEmitter, OnChanges, OnDestroy, OnInit, QueryList, Signal, SimpleChanges, TemplateRef, Type, WritableSignal } from '@angular/core';
2
2
  import { MultiSelectChangeEvent } from 'primeng/multiselect';
3
3
  import { Table, TableColumnReorderEvent, TableLazyLoadEvent } from 'primeng/table';
4
4
  import { Observable } from 'rxjs';
@@ -7,7 +7,7 @@ import { ColumnDescriptor, ITableDataProvider, TableCellClickEvent, TableDescrip
7
7
  import { ColumnWithPreferences } from '../../models/column-preferences.model';
8
8
  import { DataListService } from '../../services/data-list.service';
9
9
  import * as i0 from "@angular/core";
10
- export declare class TableComponent<Item = any, Service = undefined, Sorts = any, Filters extends keyof any = any> implements OnInit, OnChanges, AfterContentInit, OnDestroy {
10
+ export declare class TableComponent<Item = any, Service = undefined, Sorts = any, Filters extends keyof any = any> implements OnInit, OnChanges, OnDestroy {
11
11
  readonly cmpTypeName = "TableComponent";
12
12
  private readonly logger;
13
13
  private readonly injector;
@@ -36,12 +36,13 @@ export declare class TableComponent<Item = any, Service = undefined, Sorts = any
36
36
  selectionChangeEventEmitter: EventEmitter<Item[]>;
37
37
  captionCmpInstEventEmitter: EventEmitter<any>;
38
38
  columnCustomLastCmpInstEventEmitter: EventEmitter<any>;
39
- templates: QueryList<TemplateDirective>;
39
+ templates: Signal<readonly TemplateDirective[]>;
40
40
  components: QueryList<ComponentDirective<any>>;
41
41
  primeTable: Table;
42
- captionTemplate: WritableSignal<TemplateRef<any> | undefined>;
43
- columnCustomLastTemplate: WritableSignal<TemplateRef<any> | undefined>;
44
- footerTemplate: WritableSignal<TemplateRef<any> | undefined>;
42
+ captionTemplate: Signal<TemplateRef<any> | null>;
43
+ columnCustomLastTemplate: Signal<TemplateRef<any> | null>;
44
+ footerTemplate: Signal<TemplateRef<any> | null>;
45
+ rowExpandTemplate: Signal<TemplateRef<any> | null>;
45
46
  private useDataProvider;
46
47
  isLazy: WritableSignal<boolean>;
47
48
  isPagination: WritableSignal<boolean>;
@@ -60,22 +61,21 @@ export declare class TableComponent<Item = any, Service = undefined, Sorts = any
60
61
  private itemsSubscription?;
61
62
  descriptor: WritableSignal<TableDescriptorInst<any, any, any>>;
62
63
  columns: WritableSignal<ColumnWithPreferences[]>;
63
- visibleColumns: import("@angular/core").Signal<ColumnWithPreferences[]>;
64
- hasColumnFilters: import("@angular/core").Signal<boolean>;
64
+ visibleColumns: Signal<ColumnWithPreferences[]>;
65
+ hasColumnFilters: Signal<boolean>;
65
66
  private filterDescriptors;
66
67
  private defaultParams;
67
68
  private isFilterChanged;
68
69
  private isSortChanged;
69
- anyColumnVisible: import("@angular/core").Signal<boolean>;
70
+ anyColumnVisible: Signal<boolean>;
70
71
  hasCustomLastColumn: WritableSignal<boolean>;
71
- hasLastColumn: import("@angular/core").Signal<boolean>;
72
- areColumnsReorderable: import("@angular/core").Signal<boolean>;
73
- areColumnsToggleable: import("@angular/core").Signal<boolean>;
72
+ hasLastColumn: Signal<boolean>;
73
+ areColumnsReorderable: Signal<boolean>;
74
+ areColumnsToggleable: Signal<boolean>;
74
75
  private layoutPreferences;
75
76
  private localstorageKey;
76
77
  private routerIsNavigationOutsideInProgress;
77
78
  ngOnInit(): void;
78
- ngAfterContentInit(): void;
79
79
  ngOnChanges(changes: SimpleChanges): void;
80
80
  ngOnDestroy(): void;
81
81
  reload(emitEvent?: boolean, resetParams?: boolean): void;
@@ -35,8 +35,6 @@ export declare class ActionEditorInjectorContextComponent<Item = any, Service =
35
35
  private instance?;
36
36
  private instanceStateSubscription?;
37
37
  private instanceReactivationSubscription?;
38
- private instanceSubmitFormItem?;
39
- private instanceSubmitResult?;
40
38
  loading: WritableSignal<boolean>;
41
39
  private fetchExecutionSubscription?;
42
40
  submitLoading: WritableSignal<boolean>;
@@ -58,8 +56,8 @@ export declare class ActionEditorInjectorContextComponent<Item = any, Service =
58
56
  private unsetInstance;
59
57
  private beforeWindowUnload;
60
58
  private onEscapePressed;
61
- private showUnsavedChangesConfirmationDialog;
62
59
  closeWithUnsavedChangesConfirmation(callFromGuard?: boolean): Observable<boolean>;
60
+ private showUnsavedChangesConfirmationDialog;
63
61
  static ɵfac: i0.ɵɵFactoryDeclaration<ActionEditorInjectorContextComponent<any, any>, never>;
64
62
  static ɵcmp: i0.ɵɵComponentDeclaration<ActionEditorInjectorContextComponent<any, any>, "mng-action-editor-injector-context", never, { "data": { "alias": "data"; "required": true; }; }, { "actionRunEventEmitter": "actionSubmit"; "actionCancelEventEmitter": "actionCancel"; }, never, never, true, never>;
65
63
  }
@@ -5,7 +5,7 @@ import { CanComponentDeactivate } from '../../models/can-component-deactivate.mo
5
5
  import { ActionExecutorService } from '../../services/action-executor.service';
6
6
  import { ViewContainer } from '../../services/view-container.service';
7
7
  import * as i0 from "@angular/core";
8
- export declare class ActionRouteComponent<Item, Service> implements OnInit, OnDestroy, CanComponentDeactivate {
8
+ export default class ActionRouteComponent<Item, Service> implements OnInit, OnDestroy, CanComponentDeactivate {
9
9
  private router;
10
10
  private route;
11
11
  private actionExecutor;
@@ -1,4 +1,4 @@
1
- import { AfterContentInit, EventEmitter, OnInit, QueryList, TemplateRef, Type, WritableSignal } from '@angular/core';
1
+ import { EventEmitter, OnInit, QueryList, Signal, TemplateRef, Type, WritableSignal } from '@angular/core';
2
2
  import { Observable } from 'rxjs';
3
3
  import { ComponentDirective, DataListResult, TemplateDirective } from '@mediusinc/mng-commons/core';
4
4
  import { TableComponent } from '@mediusinc/mng-commons/table';
@@ -6,7 +6,7 @@ import { ITableDataProvider, TableCellClickEvent, TableDescriptorInst, TableLoad
6
6
  import { ActionDescriptorInst } from '@mediusinc/mng-commons/tableview/api';
7
7
  import { ActionInstance } from '../../models/execution/action-instance.model';
8
8
  import * as i0 from "@angular/core";
9
- export declare class ActionTableComponent<Item = any, Service = undefined, Sorts = keyof Item, Filters extends keyof any = keyof Item> implements OnInit, AfterContentInit {
9
+ export declare class ActionTableComponent<Item = any, Service = undefined, Sorts = keyof Item, Filters extends keyof any = keyof Item> implements OnInit {
10
10
  private readonly route;
11
11
  private readonly actionExecutor;
12
12
  private readonly viewContainer;
@@ -27,16 +27,16 @@ export declare class ActionTableComponent<Item = any, Service = undefined, Sorts
27
27
  selectionChangeEventEmitter: EventEmitter<Item[]>;
28
28
  captionCmpInstEventEmitter: EventEmitter<any>;
29
29
  columnActionCmpInstEventEmitter: EventEmitter<any>;
30
- templates: QueryList<TemplateDirective>;
30
+ templates: Signal<readonly TemplateDirective[]>;
31
31
  components: QueryList<ComponentDirective<any>>;
32
32
  table: TableComponent;
33
- captionTemplate: WritableSignal<TemplateRef<any> | undefined>;
34
- footerTemplate: WritableSignal<TemplateRef<any> | undefined>;
33
+ captionTemplate: Signal<TemplateRef<any> | null>;
34
+ footerTemplate: Signal<TemplateRef<any> | null>;
35
+ rowExpandTemplate: Signal<TemplateRef<any> | null>;
35
36
  rowClickActions: WritableSignal<ActionDescriptorInst<Item>[]>;
36
37
  rowInlineActions: WritableSignal<ActionDescriptorInst<Item>[]>;
37
38
  constructor();
38
39
  ngOnInit(): void;
39
- ngAfterContentInit(): void;
40
40
  reload(emitEvent?: boolean, resetParams?: boolean): void;
41
41
  onCellClick(event: TableCellClickEvent<Item>): void;
42
42
  onSelectionChange(items: Array<Item>): void;
@@ -0,0 +1,22 @@
1
+ import { TranslateService } from '@ngx-translate/core';
2
+ import { Observable } from 'rxjs';
3
+ import { I18nMissingTranslationStrategy } from '@mediusinc/mng-commons/core';
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;
6
+ /**
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
16
+ */
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>;
18
+ export declare function getI18nActionTitleAsync(translate: TranslateService, action: ActionDescriptorInst<any>, item?: any): Observable<string | null>;
19
+ export declare function getI18nActionEditorTitleAsync(translate: TranslateService, action: ActionEditorDescriptorInst<any>, item?: any): Observable<string | null>;
20
+ export declare function getI18nActionParams(translate: TranslateService, action: ActionDescriptorInst<any>, item?: any, params?: any): any;
21
+ export declare function getI18nActionParamsAsync(translate: TranslateService, action: ActionDescriptorInst<any>, item?: any, params?: any): Observable<any>;
22
+ export declare function populateI18nActionParams(params?: any): any;
@@ -2,28 +2,28 @@
2
2
  * States of action. Enums ending with `*Final` are supposed to be final.
3
3
  */
4
4
  export declare enum ActionInstanceStateEnum {
5
- TriggerStart = 0,
5
+ TriggerStart = 0,// action was triggered (click or direct)
6
6
  TriggerEnd = 1,
7
- ActivationStart = 2,
8
- ActivationEnd = 3,
9
- FetchStart = 4,
10
- FetchEnd = 5,
11
- FetchError = 6,
12
- RunConfirmationStart = 7,
13
- RunConfirmationEndAccept = 8,
14
- RunConfirmationEndReject = 9,
15
- RunStart = 10,
16
- RunEnd = 11,
17
- RunError = 12,
18
- NextActionStart = 13,
19
- NextActionEnd = 14,
20
- ErrorActionStart = 15,
21
- ErrorActionEnd = 16,
22
- FinishSuccessFinal = 17,
23
- FinishErrorFinal = 18,
24
- FinishDismissedFinal = 19,
25
- FinishSuccessReactivateFinal = 20,
26
- FinishComponentDestroyFinal = 21,
7
+ ActivationStart = 2,// action activation started (direct, event or editor)
8
+ ActivationEnd = 3,// action activation ended
9
+ FetchStart = 4,// fetch started
10
+ FetchEnd = 5,// fetch ended
11
+ FetchError = 6,// fetch error
12
+ RunConfirmationStart = 7,// confirmation for run is started
13
+ RunConfirmationEndAccept = 8,// confirmation accepted
14
+ RunConfirmationEndReject = 9,// confirmation rejected
15
+ RunStart = 10,// action was run by calling main function
16
+ RunEnd = 11,// action run function executed
17
+ RunError = 12,// action run function executed with error
18
+ NextActionStart = 13,// next action started
19
+ NextActionEnd = 14,// next action finished
20
+ ErrorActionStart = 15,// error action started
21
+ ErrorActionEnd = 16,// error action finished
22
+ FinishSuccessFinal = 17,// action executed successfully
23
+ FinishErrorFinal = 18,// action executed with error
24
+ FinishDismissedFinal = 19,// action was dismissed by user
25
+ FinishSuccessReactivateFinal = 20,// action executed successfully, another instance will directly start from previous
26
+ FinishComponentDestroyFinal = 21,// action was dismissed by destroying component that was executing it
27
27
  FinishRouteUntriggerStart = 22,
28
28
  FinishRouteUntriggerEndFinal = 23,
29
29
  FinishRouteUntriggerTimeoutFinal = 24
@@ -28,7 +28,8 @@ export declare class ActionInstance<Item, Service = undefined> implements IActio
28
28
  activationDialogRef?: DynamicDialogRef;
29
29
  activationEditorComponentRef?: IActionEditorComponent;
30
30
  private _reactivationInstanceSubject;
31
- previousInstance?: IActionInstance<Item, Service>;
31
+ reactivationPreviousInstance?: IActionInstance<Item, Service>;
32
+ previousInstance?: IActionInstance<any, any>;
32
33
  nextActionInstance?: IActionInstance<any, any>;
33
34
  errorActionInstance?: IActionInstance<Item, Service>;
34
35
  constructor(action: ActionDescriptorInst<Item>, state?: ActionInstanceStateEnum);
@@ -20,12 +20,12 @@ export declare abstract class ActionExecutorService {
20
20
  protected readonly dataProviderExecutor: DataProviderExecutor;
21
21
  protected readonly navigationService: NavigationService;
22
22
  protected readonly errorMapper: ActionErrorMapperService;
23
- protected readonly parametrize: ParametrizePipe;
24
23
  protected readonly config: import("../../tableview/services/tableview-feature-config.token").TableviewFeatureConfig | null;
25
24
  protected readonly defaultEditorDialogComponent: import("@angular/core").Type<any>;
26
25
  protected readonly messageService: MessageService;
27
26
  protected readonly confirmationService: ConfirmationService;
28
27
  protected readonly viewContainer: ViewContainer<any, any> | null;
28
+ protected readonly parametrize: ParametrizePipe;
29
29
  protected readonly instancesBufferMax = 100;
30
30
  protected logger: LoggerService;
31
31
  abstract get instances(): ActionInstance<any, any>[];
@@ -15,7 +15,7 @@ export type ActionEditorDescriptorCreateOptsProviderType<Model, Service> = {
15
15
  dataProvider?: IEditorDataProvider<Model, Service>;
16
16
  };
17
17
  export type ActionEditorProviderType<Model, Service> = ServiceClassType<Service> | IEditorDataProvider<Model, Service>;
18
- export declare const actionEditorGetProviderCfgObj: <Model, Service>(serviceOrDataProvider?: ActionEditorProviderType<Model, Service> | undefined) => ActionEditorDescriptorCreateOptsProviderType<Model, Service>;
18
+ export declare const actionEditorGetProviderCfgObj: <Model, Service>(serviceOrDataProvider?: ActionEditorProviderType<Model, Service>) => ActionEditorDescriptorCreateOptsProviderType<Model, Service>;
19
19
  export declare class ActionEditorDescriptorInst<Item, Service = any> extends ActionDescriptorInst<Item, Service> {
20
20
  private readonly _editorDescriptor;
21
21
  protected readonly _dataProvider?: IEditorDataProvider<Item, any>;
@@ -64,6 +64,14 @@ export declare class ActionEditorDescriptorInst<Item, Service = any> extends Act
64
64
  withEditorAction(action: ActionDescriptorInst<Item>): this;
65
65
  withEditorActions(actions: ActionDescriptorInst<Item>[]): this;
66
66
  withEditorComponent(editorComponent: Type<any>): this;
67
+ /**
68
+ * Enables or disables resubmit resubmit - this means the form will not exit after successful submission, but will instead remain open.
69
+ *
70
+ * @param {boolean} [enabled=true] - Specifies whether resubmit is enabled or disabled. Defaults to true if not provided.
71
+ * @param {boolean} [refetch=true] - Specifies whether the data should be refetched after resubmit. If not, the data in the form stays as is. Defaults to true if not provided.
72
+ *
73
+ * @returns {this} - Returns the current instance with the resubmit configuration updated.
74
+ */
67
75
  withResubmit(enabled?: boolean, refetch?: boolean): this;
68
76
  withUnsavedChangesConfirmation(unsavedChangesConfirmation?: boolean): this;
69
77
  }
@@ -1,5 +1,5 @@
1
1
  import { InjectionToken, Type } from '@angular/core';
2
- import { APermissions, ClassType, IActionDescriptorInternal, IDataProvider, ServiceClassType, StyleLevelEnum } from '@mediusinc/mng-commons/core';
2
+ import { APermissions, ClassType, IActionDescriptor, IDataProvider, ServiceClassType, StyleLevelEnum } from '@mediusinc/mng-commons/core';
3
3
  import { ActionButtonDescriptor } from '@mediusinc/mng-commons/form/api';
4
4
  import { ModelDescriptor } from '@mediusinc/mng-commons/model';
5
5
  import { IActionComponent } from '../models/action-component.model';
@@ -27,8 +27,8 @@ export type ActionDescriptorCreateOptsParentType = {
27
27
  parentProperty?: string;
28
28
  };
29
29
  export type ActionProviderType<Model, Service> = ServiceClassType<Service> | IDataProvider<Model, Service>;
30
- export declare const actionGetProviderCfgObj: <Model, Service>(serviceOrDataProvider?: ActionProviderType<Model, Service> | undefined) => ActionDescriptorCreateOptsProviderType<Model, Service>;
31
- export declare class ActionDescriptorInst<Model, Service = any> implements IActionDescriptorInternal<Model, Service> {
30
+ export declare const actionGetProviderCfgObj: <Model, Service>(serviceOrDataProvider?: ActionProviderType<Model, Service>) => ActionDescriptorCreateOptsProviderType<Model, Service>;
31
+ export declare class ActionDescriptorInst<Model, Service = any> implements IActionDescriptor<Model, Service> {
32
32
  protected readonly _model?: ModelDescriptor<Model>;
33
33
  protected readonly _actionName: string;
34
34
  protected readonly _actionNameLong: string;
@@ -8,11 +8,11 @@ export declare enum ActionPositionEnum {
8
8
  FooterRight = 6
9
9
  }
10
10
  export declare enum ActionActivationTriggerEnum {
11
- OnClick = 0,
11
+ OnClick = 0,// action is triggered for activation on click
12
12
  OnRoute = 1
13
13
  }
14
14
  export declare enum ActionTypeEnum {
15
- Direct = 0,
15
+ Direct = 0,// action is directly activated and executed
16
16
  Editor = 1
17
17
  }
18
18
  export declare enum ActionEditorSubmitTypeEnum {
@@ -2,28 +2,28 @@
2
2
  * States of action. Enums ending with `*Final` are supposed to be final.
3
3
  */
4
4
  export declare enum ActionInstanceStateEnum {
5
- TriggerStart = 0,
5
+ TriggerStart = 0,// action was triggered (click or direct)
6
6
  TriggerEnd = 1,
7
- ActivationStart = 2,
8
- ActivationEnd = 3,
9
- FetchStart = 4,
10
- FetchEnd = 5,
11
- FetchError = 6,
12
- RunConfirmationStart = 7,
13
- RunConfirmationEndAccept = 8,
14
- RunConfirmationEndReject = 9,
15
- RunStart = 10,
16
- RunEnd = 11,
17
- RunError = 12,
18
- NextActionStart = 13,
19
- NextActionEnd = 14,
20
- ErrorActionStart = 15,
21
- ErrorActionEnd = 16,
22
- FinishSuccessFinal = 17,
23
- FinishErrorFinal = 18,
24
- FinishDismissedFinal = 19,
25
- FinishSuccessReactivateFinal = 20,
26
- FinishComponentDestroyFinal = 21,
7
+ ActivationStart = 2,// action activation started (direct, event or editor)
8
+ ActivationEnd = 3,// action activation ended
9
+ FetchStart = 4,// fetch started
10
+ FetchEnd = 5,// fetch ended
11
+ FetchError = 6,// fetch error
12
+ RunConfirmationStart = 7,// confirmation for run is started
13
+ RunConfirmationEndAccept = 8,// confirmation accepted
14
+ RunConfirmationEndReject = 9,// confirmation rejected
15
+ RunStart = 10,// action was run by calling main function
16
+ RunEnd = 11,// action run function executed
17
+ RunError = 12,// action run function executed with error
18
+ NextActionStart = 13,// next action started
19
+ NextActionEnd = 14,// next action finished
20
+ ErrorActionStart = 15,// error action started
21
+ ErrorActionEnd = 16,// error action finished
22
+ FinishSuccessFinal = 17,// action executed successfully
23
+ FinishErrorFinal = 18,// action executed with error
24
+ FinishDismissedFinal = 19,// action was dismissed by user
25
+ FinishSuccessReactivateFinal = 20,// action executed successfully, another instance will directly start from previous
26
+ FinishComponentDestroyFinal = 21,// action was dismissed by destroying component that was executing it
27
27
  FinishRouteUntriggerStart = 22,
28
28
  FinishRouteUntriggerEndFinal = 23,
29
29
  FinishRouteUntriggerTimeoutFinal = 24
@@ -23,7 +23,8 @@ export interface IActionInstance<Item, Service> {
23
23
  error$: Observable<ActionExecutionError>;
24
24
  activationDialogRef?: DynamicDialogRef;
25
25
  activationEditorComponentRef?: IActionEditorComponent;
26
- previousInstance?: IActionInstance<Item, Service>;
26
+ reactivationPreviousInstance?: IActionInstance<Item, Service>;
27
+ previousInstance?: IActionInstance<any, any>;
27
28
  nextActionInstance?: IActionInstance<any, any>;
28
29
  errorActionInstance?: IActionInstance<Item, Service>;
29
30
  reactivationInstance?: IActionInstance<Item, Service>;