@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,10 +1,10 @@
1
1
  import * as i2 from '@angular/common';
2
2
  import { AsyncPipe, NgTemplateOutlet, JsonPipe, NgStyle, DatePipe } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
- import { InjectionToken, Injectable, inject, Injector, EventEmitter, Component, ChangeDetectionStrategy, Optional, HostBinding, Input, Output, ViewChild, ContentChildren, DestroyRef, signal, effect, HostListener, ViewChildren, LOCALE_ID, Inject } from '@angular/core';
4
+ import { InjectionToken, Injectable, inject, Injector, EventEmitter, Component, ChangeDetectionStrategy, Optional, HostBinding, Input, Output, ViewChild, DestroyRef, input, output, viewChild, signal, effect, HostListener, contentChildren, computed, ViewChildren, LOCALE_ID } from '@angular/core';
5
5
  import * as i1 from '@angular/router';
6
6
  import { NavigationEnd, Router, ActivatedRoute, NavigationStart, NavigationCancel, NavigationError, NavigationSkipped, RouterOutlet } from '@angular/router';
7
- import * as i2$1 from '@ngx-translate/core';
7
+ import * as i1$1 from '@ngx-translate/core';
8
8
  import { TranslateService, TranslateModule } from '@ngx-translate/core';
9
9
  import * as i4 from 'primeng/button';
10
10
  import { ButtonModule } from 'primeng/button';
@@ -16,27 +16,27 @@ import * as i9 from 'primeng/splitbutton';
16
16
  import { SplitButtonModule } from 'primeng/splitbutton';
17
17
  import * as i8 from 'primeng/tooltip';
18
18
  import { TooltipModule } from 'primeng/tooltip';
19
- import { ReplaySubject, BehaviorSubject, distinctUntilChanged, Subject, take, of, switchMap, mergeMap as mergeMap$1, from, timeout, combineLatest, Observable, debounceTime, isObservable, throwError } from 'rxjs';
20
- import * as i1$1 from '@mediusinc/mng-commons/core';
21
- import { I18nUtils as I18nUtils$1, ErrorUtil, toastMessage, LoggerService, CommonsService, ParametrizePipe, StringUtil, toObservable, CommonsInternalError, StyleSizeEnum, CommonsHttpError, Permissions, boolean$Attribute, ComponentDirective, ObjectUtil, TemplateDirective, DialogKeydownHandlerDirective, Styles, StyleLevelEnum, FilterMatchMode, RouteBuilder, CommonsFeatureTypeEnum } from '@mediusinc/mng-commons/core';
22
- import { ActionActivationTriggerEnum, ActionTypeEnum, DataProviderExecutor, ActionDeleteDescriptorInst, ActionEditorEditDescriptorInst, ActionEditorAddDescriptorInst, ActionEditorDescriptorInst, CommonsActionError, ActionLinkDescriptorInst, TableviewEditorTypeEnum, TableviewDescriptor, FieldInputDescriptor, FieldInputTypeEnum, FieldActionDescriptor, FieldLookupEnumDescriptor, FieldLookupTypeEnum, FieldLookupDescriptor, FieldManyToManyEditorDescriptor, FieldManyEditorDescriptor, FormEventTypeEnum, FormFieldEventComponentSubtype, ActionEditorSubmitTypeEnum, ActionEditorSubmitDescriptorInst, ActionPositionEnum, runFnFromDataProviderOrFallback, runGetAllFromDataProvider, runFetchFromDataProvider, runCreateFromDataProvider, runUpdateFromDataProvider, runDeleteFromDataProvider, FormFieldEventTypeEnum, FieldGroupTypeEnum, FormFieldEventDialogSubtype, FieldManyEditorActionEnum, ActionEditorDescriptor, ActionEditorSubmitDescriptor, ActionDescriptor, FieldManyToManyEditorActionEnum, TableviewActionDefaultCategories, ActionEditorDetailsDescriptorInst, DATA_LANGUAGE_DROPDOWN_COMPONENT_IT } from '@mediusinc/mng-commons/tableview/api';
19
+ import { ReplaySubject, BehaviorSubject, distinctUntilChanged, Subject, take, of, switchMap, mergeMap as mergeMap$1, from, timeout, combineLatest, debounceTime, isObservable, throwError, filter as filter$1 } from 'rxjs';
20
+ import * as i1$2 from '@mediusinc/mng-commons/core';
21
+ import { getI18n, getI18nAsync, toastMessage, getI18nForError, LoggerService, CommonsService, ParametrizePipe, escapeHtmlAny, toObservable, CommonsInternalError, StyleSizeEnum, CommonsHttpError, Permissions, boolean$Attribute, ComponentDirective, objectDeepCopy, DialogKeydownHandlerDirective, Styles, TemplateDirective, findTemplateByName, fromSubscribeError, getErrorLogLevel, StyleLevelEnum, getObjectPropertyByPath, FilterMatchMode, COMMONS_MODULE_CONFIG_IT, dateToIsoString, RouteBuilder, createLazyRoute, CommonsFeatureTypeEnum } from '@mediusinc/mng-commons/core';
22
+ import { ActionActivationTriggerEnum, ActionTypeEnum, DataProviderExecutor, ActionDeleteDescriptorInst, ActionEditorEditDescriptorInst, ActionEditorAddDescriptorInst, ActionEditorDescriptorInst, CommonsActionError, ActionLinkDescriptorInst, TableviewEditorTypeEnum, TableviewDescriptor, FieldInputDescriptor, FieldInputTypeEnum, FieldActionDescriptor, FieldLookupEnumDescriptor, FieldLookupTypeEnum, FieldLookupDescriptor, FieldManyToManyEditorDescriptor, FieldManyEditorDescriptor, FormEventTypeEnum, FormFieldEventComponentSubtype, ActionEditorSubmitTypeEnum, ActionEditorSubmitDescriptorInst, ActionPositionEnum, runFnFromDataProviderOrFallback, runGetAllFromDataProvider, runFetchFromDataProvider, runCreateFromDataProvider, runUpdateFromDataProvider, runDeleteFromDataProvider, FormFieldEventTypeEnum, FieldGroupTypeEnum, FormFieldEventDialogSubtype, FieldManyEditorActionEnum, ActionEditorDescriptor, ActionEditorSubmitDescriptor, ActionDescriptor, FieldManyToManyEditorActionEnum, TableviewActionDefaultCategories, DATA_LANGUAGE_DROPDOWN_COMPONENT_IT } from '@mediusinc/mng-commons/tableview/api';
23
+ import { mergeMap, map, filter, startWith, catchError, first, take as take$1 } from 'rxjs/operators';
24
+ import { getI18nModelParams, getI18nModelParamsAsync, type } from '@mediusinc/mng-commons/model';
23
25
  import { HttpErrorResponse } from '@angular/common/http';
24
- import * as i2$4 from 'primeng/api';
26
+ import * as i2$3 from 'primeng/api';
25
27
  import { MessageService, ConfirmationService, SharedModule } from 'primeng/api';
26
28
  import { DialogService, DynamicDialogConfig } from 'primeng/dynamicdialog';
27
- import { mergeMap, map, filter, startWith, catchError, first, take as take$1 } from 'rxjs/operators';
28
- import { I18nUtils as I18nUtils$2, type } from '@mediusinc/mng-commons/model';
29
29
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
30
30
  import * as i1$3 from 'primeng/progressspinner';
31
31
  import { ProgressSpinnerModule } from 'primeng/progressspinner';
32
- import * as i2$3 from 'primeng/toolbar';
32
+ import * as i2$2 from 'primeng/toolbar';
33
33
  import { ToolbarModule } from 'primeng/toolbar';
34
34
  import { ZIndexUtils } from 'primeng/utils';
35
- import * as i1$2 from '@angular/forms';
36
- import { FormGroup, FormArray, ReactiveFormsModule, FormsModule, Validators, FormControl } from '@angular/forms';
37
- import * as i2$2 from '@ngx-formly/core';
38
- import { FormlyModule, FieldType, FieldWrapper, FORMLY_CONFIG } from '@ngx-formly/core';
39
- import * as i3 from 'primeng/messages';
35
+ import * as i3 from '@angular/forms';
36
+ import { UntypedFormGroup, FormGroup, FormArray, ReactiveFormsModule, FormsModule, FormBuilder, Validators, FormControl } from '@angular/forms';
37
+ import * as i2$1 from '@ngx-formly/core';
38
+ import { FormlyConfig, FormlyModule, FieldType, FieldWrapper, FORMLY_CONFIG } from '@ngx-formly/core';
39
+ import * as i3$1 from 'primeng/messages';
40
40
  import { MessagesModule } from 'primeng/messages';
41
41
  import { DropdownComponent, AutocompleteComponent, InputTrimDirective } from '@mediusinc/mng-commons/form';
42
42
  import { LookupDataProvider, ActionButtonDescriptor, ButtonStyleBuilder } from '@mediusinc/mng-commons/form/api';
@@ -46,29 +46,108 @@ import * as i5 from 'primeng/message';
46
46
  import { MessageModule } from 'primeng/message';
47
47
  import * as i1$4 from 'primeng/fieldset';
48
48
  import { FieldsetModule } from 'primeng/fieldset';
49
- import * as i8$1 from 'primeng/calendar';
50
- import { CalendarModule } from 'primeng/calendar';
51
- import * as i11 from 'primeng/fileupload';
49
+ import * as i9$1 from 'primeng/fileupload';
52
50
  import { FileUploadModule } from 'primeng/fileupload';
53
51
  import { TimesIcon } from 'primeng/icons/times';
54
- import * as i12 from 'primeng/image';
52
+ import * as i11 from 'primeng/image';
55
53
  import { ImageModule } from 'primeng/image';
56
- import * as i10$1 from 'primeng/inputmask';
54
+ import * as i8$1 from 'primeng/inputmask';
57
55
  import { InputMaskModule } from 'primeng/inputmask';
58
- import * as i3$1 from 'primeng/inputnumber';
56
+ import * as i1$5 from 'primeng/inputnumber';
59
57
  import { InputNumberModule } from 'primeng/inputnumber';
60
58
  import * as i6 from 'primeng/inputswitch';
61
59
  import { InputSwitchModule } from 'primeng/inputswitch';
62
- import * as i14 from 'primeng/inputtext';
60
+ import * as i13 from 'primeng/inputtext';
63
61
  import { InputTextModule } from 'primeng/inputtext';
64
- import * as i13 from 'primeng/inputtextarea';
62
+ import * as i12 from 'primeng/inputtextarea';
65
63
  import { InputTextareaModule } from 'primeng/inputtextarea';
66
64
  import * as i7$1 from 'primeng/radiobutton';
67
65
  import { RadioButtonModule } from 'primeng/radiobutton';
68
66
  import * as i7$2 from 'primeng/dialog';
69
67
  import { DialogModule } from 'primeng/dialog';
70
- import * as i1$5 from 'primeng/tabview';
68
+ import * as i1$6 from 'primeng/tabview';
71
69
  import { TabViewModule } from 'primeng/tabview';
70
+ import * as i3$2 from 'primeng/calendar';
71
+ import { CalendarModule } from 'primeng/calendar';
72
+
73
+ function getI18nForAction(translate, action, actionPathKeys, customKey, item, fallbackKey, params, missingTranslationStrategy = 'returnFirstKey') {
74
+ const keys = getKeysByPriority(action, actionPathKeys, customKey, fallbackKey);
75
+ const i18nParams = getI18nActionParams(translate, action, item, params);
76
+ const i18nValue = getI18n(translate, i18nParams, ...keys);
77
+ return getTranslationDependingOnStrategy(missingTranslationStrategy, { i18nValue, firstKey: keys[0], fallbackKey });
78
+ }
79
+ /**
80
+ * Returns async translation for given keys with given params.
81
+ * @param translate TranslateService
82
+ * @param action action descriptor
83
+ * @param actionPathKeys action path keys
84
+ * @param customKey custom key
85
+ * @param item item
86
+ * @param fallbackKey fallback key, used as fallback key
87
+ * @param params additional params for translation
88
+ * @param missingTranslationStrategy strategy when no translation is found
89
+ */
90
+ function getI18nForActionAsync(translate, action, actionPathKeys, customKey, item, fallbackKey, params, missingTranslationStrategy = 'returnFirstKey') {
91
+ return getI18nActionParamsAsync(translate, action, item, params).pipe(mergeMap(i18nParams => {
92
+ const keys = getKeysByPriority(action, actionPathKeys, customKey, fallbackKey);
93
+ return getI18nAsync(translate, i18nParams, ...keys).pipe(map(i18nValue => getTranslationDependingOnStrategy(missingTranslationStrategy, { i18nValue, firstKey: keys[0], fallbackKey })));
94
+ }));
95
+ }
96
+ /**
97
+ * Returns translation depending on missingTranslationStrategy
98
+ * @param missingTranslationStrategy strategy when no translation is found
99
+ * @param values object with values, i18nValue is translation, firstKey is first key in array of keys, fallbackKey is fallback key
100
+ */
101
+ function getTranslationDependingOnStrategy(missingTranslationStrategy, { i18nValue, firstKey, fallbackKey }) {
102
+ if (i18nValue !== null) {
103
+ return i18nValue;
104
+ }
105
+ else {
106
+ switch (missingTranslationStrategy) {
107
+ case 'returnNull':
108
+ return null;
109
+ case 'returnFallbackKey':
110
+ return fallbackKey ?? null;
111
+ case 'returnFirstKey':
112
+ return firstKey ?? null;
113
+ }
114
+ }
115
+ }
116
+ function getI18nActionTitleAsync(translate, action, item) {
117
+ return getI18nForActionAsync(translate, action, 'title', undefined, item);
118
+ }
119
+ function getI18nActionEditorTitleAsync(translate, action, item) {
120
+ return getI18nForActionAsync(translate, action, ['editor.title', 'title'], action.editorTitle ?? undefined, item, undefined, action.editorTitleParams ?? undefined);
121
+ }
122
+ function getI18nActionParams(translate, action, item, params = {}) {
123
+ const i18nParams = getI18nModelParams(translate, action.model ?? undefined, item, params);
124
+ return populateI18nActionParams(i18nParams);
125
+ }
126
+ function getI18nActionParamsAsync(translate, action, item, params = {}) {
127
+ return getI18nModelParamsAsync(translate, action.model ?? undefined, item, params).pipe(map(i18nParams => populateI18nActionParams(i18nParams)));
128
+ }
129
+ function populateI18nActionParams(params = {}) {
130
+ params = { ...params };
131
+ return params;
132
+ }
133
+ function getKeysByPriority(action, actionPathKeys, customKey, fallbackKey) {
134
+ const keys = [];
135
+ if (customKey) {
136
+ keys.push(customKey);
137
+ }
138
+ if (!Array.isArray(actionPathKeys)) {
139
+ actionPathKeys = [actionPathKeys];
140
+ }
141
+ actionPathKeys.forEach(k => {
142
+ const modelActionKey = `${action.i18nModelActionBaseKey}.${k}`;
143
+ const actionKey = `${action.actionName}.${k}`;
144
+ keys.push(modelActionKey, actionKey);
145
+ });
146
+ if (fallbackKey) {
147
+ keys.push(fallbackKey);
148
+ }
149
+ return keys;
150
+ }
72
151
 
73
152
  /**
74
153
  * States of action. Enums ending with `*Final` are supposed to be final.
@@ -104,140 +183,17 @@ var ActionInstanceStateEnum;
104
183
 
105
184
  const COMMONS_TABLEVIEW_FEATURE_CONFIG_IT = new InjectionToken('COMMONS_TABLEVIEW_FEATURE_CONFIG');
106
185
 
107
- var I18nUtils;
108
- (function (I18nUtils) {
109
- class Action {
110
- /**
111
- * Returns translation for action with given keys and params
112
- * @param translate TranslateService
113
- * @param action action descriptor
114
- * @param actionPathKeys action path keys
115
- * @param customKey custom key
116
- * @param item
117
- * @param fallbackKey fallback key
118
- * @param params additional params for translation
119
- * @param missingTranslationStrategy strategy when no translation is found
120
- */
121
- static get(translate, action, actionPathKeys, customKey, item, fallbackKey, params, missingTranslationStrategy = 'returnFirstKey') {
122
- const keys = I18nUtils.Action.getKeysByPriority(action, actionPathKeys, customKey, fallbackKey);
123
- const i18nParams = I18nUtils.Action.getParams(translate, action, item, params);
124
- const i18nValue = I18nUtils$1.Common.get(translate, i18nParams, ...keys);
125
- return this.getTranslationDependingOnStrategy(missingTranslationStrategy, { i18nValue, firstKey: keys[0], fallbackKey });
126
- }
127
- /**
128
- * Returns async translation for given keys with given params.
129
- * @param translate TranslateService
130
- * @param action action descriptor
131
- * @param actionPathKeys action path keys
132
- * @param customKey custom key
133
- * @param item item
134
- * @param fallbackKey fallback key, used as fallback key
135
- * @param params additional params for translation
136
- * @param missingTranslationStrategy strategy when no translation is found
137
- */
138
- static getAsync(translate, action, actionPathKeys, customKey, item, fallbackKey, params, missingTranslationStrategy = 'returnFirstKey') {
139
- return I18nUtils.Action.getParamsAsync(translate, action, item, params).pipe(mergeMap(i18nParams => {
140
- const keys = I18nUtils.Action.getKeysByPriority(action, actionPathKeys, customKey, fallbackKey);
141
- return I18nUtils$1.Common.getAsync(translate, i18nParams, ...keys).pipe(map(i18nValue => this.getTranslationDependingOnStrategy(missingTranslationStrategy, { i18nValue, firstKey: keys[0], fallbackKey })));
142
- }));
143
- }
144
- /**
145
- * Returns translation depending on missingTranslationStrategy
146
- * @param missingTranslationStrategy strategy when no translation is found
147
- * @param values object with values, i18nValue is translation, firstKey is first key in array of keys, fallbackKey is fallback key
148
- */
149
- static getTranslationDependingOnStrategy(missingTranslationStrategy, { i18nValue, firstKey, fallbackKey }) {
150
- if (i18nValue !== null) {
151
- return i18nValue;
152
- }
153
- else {
154
- switch (missingTranslationStrategy) {
155
- case 'returnNull':
156
- return null;
157
- case 'returnFallbackKey':
158
- return fallbackKey ?? null;
159
- case 'returnFirstKey':
160
- return firstKey ?? null;
161
- }
162
- }
163
- }
164
- static getTitleAsync(translate, action, item) {
165
- return I18nUtils.Action.getAsync(translate, action, 'title', undefined, item);
166
- }
167
- static getEditorTitleAsync(translate, action, item) {
168
- return I18nUtils.Action.getAsync(translate, action, ['editor.title', 'title'], action.editorTitle ?? undefined, item, undefined, action.editorTitleParams ?? undefined);
169
- }
170
- static getParams(translate, action, item, params = {}) {
171
- const i18nParams = I18nUtils$2.Model.getParams(translate, action.model ?? undefined, item, params);
172
- return I18nUtils.Action.populateParams(i18nParams);
173
- }
174
- static getParamsAsync(translate, action, item, params = {}) {
175
- return I18nUtils$2.Model.getParamsAsync(translate, action.model ?? undefined, item, params).pipe(map(i18nParams => I18nUtils.Action.populateParams(i18nParams)));
176
- }
177
- static populateParams(params = {}) {
178
- params = { ...params };
179
- return params;
180
- }
181
- static getKeysByPriority(action, actionPathKeys, customKey, fallbackKey) {
182
- const keys = [];
183
- if (customKey) {
184
- keys.push(customKey);
185
- }
186
- if (!Array.isArray(actionPathKeys)) {
187
- actionPathKeys = [actionPathKeys];
188
- }
189
- actionPathKeys.forEach(k => {
190
- const modelActionKey = `${action.i18nModelActionBaseKey}.${k}`;
191
- const actionKey = `${action.actionName}.${k}`;
192
- keys.push(modelActionKey, actionKey);
193
- });
194
- if (fallbackKey) {
195
- keys.push(fallbackKey);
196
- }
197
- return keys;
198
- }
199
- }
200
- I18nUtils.Action = Action;
201
- class Error {
202
- static get(translate, error, params = {}) {
203
- const i18nParams = I18nUtils.Error.getParams(error, params);
204
- if (error.messageCode) {
205
- const keys = [`errors.${error.messageCode}`, `messages.${error.messageCode}`];
206
- const i18n = I18nUtils$1.Common.get(translate, i18nParams, ...keys);
207
- if (i18n) {
208
- return i18n;
209
- }
210
- }
211
- return I18nUtils$1.Common.get(translate, i18nParams, error.message);
212
- }
213
- static getParams(error, params = {}) {
214
- const paramsRes = { ...params };
215
- paramsRes.errorStatus = '';
216
- paramsRes.errorMessage = '';
217
- if (ErrorUtil.isHttpErrorResponse(error)) {
218
- const httpError = ErrorUtil.getHttpErrorResponse(error);
219
- paramsRes.errorStatus = httpError?.status;
220
- paramsRes.errorMessage = httpError?.message;
221
- paramsRes.errorStatusDescription = httpError?.statusText;
222
- }
223
- paramsRes.error = error;
224
- return paramsRes;
225
- }
226
- }
227
- I18nUtils.Error = Error;
228
- })(I18nUtils || (I18nUtils = {}));
229
-
230
186
  function actionNotificationSuccess(translate, action, functionName, messageService, customTitleKey, customMessageKey, item) {
231
- const actionSuccessTitle = I18nUtils.Action.get(translate, action, 'success.title', customTitleKey, item, 'general.success', functionName) ?? undefined;
232
- const actionSuccessMessage = I18nUtils.Action.get(translate, action, 'success.message', customMessageKey, item, 'general.successMessage', functionName) ?? undefined;
187
+ const actionSuccessTitle = getI18nForAction(translate, action, 'success.title', customTitleKey, item, 'general.success', functionName) ?? undefined;
188
+ const actionSuccessMessage = getI18nForAction(translate, action, 'success.message', customMessageKey, item, 'general.successMessage', functionName) ?? undefined;
233
189
  return toastMessage(messageService, actionSuccessTitle, actionSuccessMessage);
234
190
  }
235
191
  function actionNotificationError(translate, action, error, functionName, messageService, item, severity = 'error') {
236
192
  const params = {
237
- errorMessage: I18nUtils.Error.get(translate, error) ?? error.message
193
+ errorMessage: getI18nForError(translate, error) ?? error.message
238
194
  };
239
- const actionErrorTitle = I18nUtils.Action.get(translate, action, [`error.${functionName}.title`, 'error.title'], action.runNotificationErrorTitle, item, 'general.error', params) ?? undefined;
240
- const actionErrorMessage = I18nUtils.Action.get(translate, action, [`error.${functionName}.message`, 'error.message'], action.runNotificationErrorMessage, item, 'general.errorMessage', params) ??
195
+ const actionErrorTitle = getI18nForAction(translate, action, [`error.${functionName}.title`, 'error.title'], action.runNotificationErrorTitle, item, 'general.error', params) ?? undefined;
196
+ const actionErrorMessage = getI18nForAction(translate, action, [`error.${functionName}.message`, 'error.message'], action.runNotificationErrorMessage, item, 'general.errorMessage', params) ??
241
197
  undefined;
242
198
  return toastMessage(messageService, actionErrorTitle, actionErrorMessage, severity, 'pi-exclamation-triangle');
243
199
  }
@@ -520,10 +476,10 @@ class NavigationService {
520
476
  this.router.navigateByUrl('/');
521
477
  }
522
478
  }
523
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: NavigationService, deps: [{ token: i1.Router }, { token: i2.Location }], target: i0.ɵɵFactoryTarget.Injectable }); }
524
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: NavigationService }); }
479
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: NavigationService, deps: [{ token: i1.Router }, { token: i2.Location }], target: i0.ɵɵFactoryTarget.Injectable }); }
480
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: NavigationService }); }
525
481
  }
526
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: NavigationService, decorators: [{
482
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: NavigationService, decorators: [{
527
483
  type: Injectable
528
484
  }], ctorParameters: () => [{ type: i1.Router }, { type: i2.Location }] });
529
485
 
@@ -575,10 +531,10 @@ class ViewContainer {
575
531
  set routeTriggeredActionInstance(instance) {
576
532
  this._routeTriggeredActionInstance = instance;
577
533
  }
578
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ViewContainer, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
579
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ViewContainer }); }
534
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ViewContainer, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
535
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ViewContainer }); }
580
536
  }
581
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ViewContainer, decorators: [{
537
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ViewContainer, decorators: [{
582
538
  type: Injectable
583
539
  }] });
584
540
 
@@ -592,12 +548,12 @@ class ActionExecutorService {
592
548
  this.dataProviderExecutor = inject(DataProviderExecutor);
593
549
  this.navigationService = inject(NavigationService);
594
550
  this.errorMapper = inject(ActionErrorMapperService);
595
- this.parametrize = inject(ParametrizePipe);
596
551
  this.config = inject(COMMONS_TABLEVIEW_FEATURE_CONFIG_IT, { optional: true });
597
552
  this.defaultEditorDialogComponent = inject(ACTION_EDITOR_COMPONENT_IT);
598
553
  this.messageService = inject(MessageService);
599
554
  this.confirmationService = inject(ConfirmationService);
600
555
  this.viewContainer = inject(ViewContainer, { optional: true });
556
+ this.parametrize = new ParametrizePipe();
601
557
  this.instancesBufferMax = 100;
602
558
  this.logger = inject(LoggerService).create('ActionExecutorService');
603
559
  }
@@ -642,15 +598,16 @@ class ActionExecutorService {
642
598
  };
643
599
  if (confirmationDescriptor.title !== null) {
644
600
  confirmParams.header =
645
- I18nUtils.Action.get(this.translate, ctx.instance.action, 'confirm.title', confirmationDescriptor.title, item, 'general.confirmation') ?? undefined;
601
+ getI18nForAction(this.translate, ctx.instance.action, 'confirm.title', confirmationDescriptor.title, item, 'general.confirmation') ?? undefined;
646
602
  }
647
603
  if (confirmationDescriptor.message !== null) {
648
604
  confirmParams.message =
649
- I18nUtils.Action.get(this.translate, ctx.instance.action, 'confirm.message', confirmationDescriptor.message, StringUtil.escapeHtmlAny(item), 'general.confirmation') ?? undefined;
605
+ getI18nForAction(this.translate, ctx.instance.action, 'confirm.message', confirmationDescriptor.message, escapeHtmlAny(item), 'general.confirmation') ??
606
+ undefined;
650
607
  }
651
608
  if (confirmationDescriptor.acceptButton.label !== null) {
652
609
  confirmParams.acceptLabel =
653
- I18nUtils.Action.get(this.translate, ctx.instance.action, 'confirm.accept', confirmationDescriptor.acceptButton.label, item, 'general.yes') ?? undefined;
610
+ getI18nForAction(this.translate, ctx.instance.action, 'confirm.accept', confirmationDescriptor.acceptButton.label, item, 'general.yes') ?? undefined;
654
611
  }
655
612
  if (confirmationDescriptor.acceptButton.icon !== null) {
656
613
  confirmParams.acceptIcon = confirmationDescriptor.acceptButton.icon;
@@ -660,7 +617,7 @@ class ActionExecutorService {
660
617
  }
661
618
  if (confirmationDescriptor.rejectButton?.label !== null) {
662
619
  confirmParams.rejectLabel =
663
- I18nUtils.Action.get(this.translate, ctx.instance.action, 'confirm.reject', confirmationDescriptor.rejectButton?.label, item, 'general.no') ?? undefined;
620
+ getI18nForAction(this.translate, ctx.instance.action, 'confirm.reject', confirmationDescriptor.rejectButton?.label, item, 'general.no') ?? undefined;
664
621
  }
665
622
  if (confirmationDescriptor.rejectButton == null || (confirmationDescriptor.rejectButton.label === null && confirmationDescriptor.rejectButton.icon === null)) {
666
623
  confirmParams.rejectVisible = false;
@@ -1156,7 +1113,7 @@ class ActionExecutorService {
1156
1113
  // must skip initialization from view container, because it would only get old instance.
1157
1114
  // we need new instance before we can set new one on the view container.
1158
1115
  const newInstance = this.getOrCreateInstance(undefined, instance.action, undefined, newInstanceStatus, true);
1159
- newInstance.previousInstance = instance;
1116
+ newInstance.reactivationPreviousInstance = instance;
1160
1117
  // copy some additional settings
1161
1118
  newInstance.activationDialogRef = instance.activationDialogRef;
1162
1119
  newInstance.triggerParameters = instance.triggerParameters;
@@ -1336,10 +1293,10 @@ class RootActionExecutorService extends ActionExecutorService {
1336
1293
  get instances() {
1337
1294
  return this._instances;
1338
1295
  }
1339
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: RootActionExecutorService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
1340
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: RootActionExecutorService }); }
1296
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: RootActionExecutorService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
1297
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: RootActionExecutorService }); }
1341
1298
  }
1342
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: RootActionExecutorService, decorators: [{
1299
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: RootActionExecutorService, decorators: [{
1343
1300
  type: Injectable
1344
1301
  }] });
1345
1302
 
@@ -1351,10 +1308,10 @@ class ComponentActionExecutorService extends ActionExecutorService {
1351
1308
  get instances() {
1352
1309
  return this.rootActionExecutorService.instances;
1353
1310
  }
1354
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ComponentActionExecutorService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
1355
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ComponentActionExecutorService }); }
1311
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ComponentActionExecutorService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
1312
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ComponentActionExecutorService }); }
1356
1313
  }
1357
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ComponentActionExecutorService, decorators: [{
1314
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ComponentActionExecutorService, decorators: [{
1358
1315
  type: Injectable
1359
1316
  }] });
1360
1317
 
@@ -1526,10 +1483,10 @@ class ActionComponent {
1526
1483
  for (const subaction of this.action.subactions) {
1527
1484
  const menuItem = {};
1528
1485
  menuItem.icon = subaction.button.icon ?? undefined;
1529
- this.subactionSubscriptions.push(I18nUtils.Action.getAsync(this.translate, subaction, 'title', subaction.button.label ?? undefined, this.item).subscribe({
1486
+ this.subactionSubscriptions.push(getI18nForActionAsync(this.translate, subaction, 'title', subaction.button.label ?? undefined, this.item).subscribe({
1530
1487
  next: res => (menuItem.label = res)
1531
1488
  }));
1532
- this.subactionSubscriptions.push(I18nUtils.Action.getAsync(this.translate, subaction, 'tooltip', this.action.button.tooltip, this.item).subscribe({
1489
+ this.subactionSubscriptions.push(getI18nForActionAsync(this.translate, subaction, 'tooltip', this.action.button.tooltip, this.item).subscribe({
1533
1490
  next: res => (menuItem.tooltip = res)
1534
1491
  }));
1535
1492
  const parameters = {
@@ -1601,25 +1558,25 @@ class ActionComponent {
1601
1558
  }
1602
1559
  if (!this.hasNoTitle) {
1603
1560
  this.labelSubscription?.unsubscribe();
1604
- this.labelSubscription = I18nUtils.Action.getAsync(this.translate, this.action, 'title', this.action.button.label ?? undefined, this.item).subscribe({
1561
+ this.labelSubscription = getI18nForActionAsync(this.translate, this.action, 'title', this.action.button.label ?? undefined, this.item).subscribe({
1605
1562
  next: i18n => this.labelSubject.next(i18n)
1606
1563
  });
1607
1564
  }
1608
1565
  this.tooltipSubscription?.unsubscribe();
1609
1566
  if (this.action.button.tooltip) {
1610
- this.tooltipSubscription = I18nUtils.Action.getAsync(this.translate, this.action, 'tooltip', this.action.button.tooltip, this.item, undefined, undefined).subscribe({
1567
+ this.tooltipSubscription = getI18nForActionAsync(this.translate, this.action, 'tooltip', this.action.button.tooltip, this.item, undefined, undefined).subscribe({
1611
1568
  next: i18n => this.tooltipSubject.next(i18n)
1612
1569
  });
1613
1570
  }
1614
1571
  this.subactions = this.processSubactions();
1615
1572
  }
1616
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ActionComponent, deps: [{ token: i1.ActivatedRoute }, { token: i2$1.TranslateService }, { token: i1$1.PermissionService }, { token: ActionExecutorService }, { token: ViewContainer, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
1617
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.2.1", type: ActionComponent, isStandalone: true, selector: "mng-action", inputs: { action: "action", item: "item", itemId: "itemId", actionData: "actionData", dataListParams: "dataListParams", dataProvider: "dataProvider", hostComponent: "hostComponent", routeInit: ["route", "routeInit"], inputDisabled: ["disabled", "inputDisabled", boolean$Attribute], inputLoading: ["loading", "inputLoading", boolean$Attribute], selectedItems: "selectedItems" }, outputs: { finishEventEmitter: "finish" }, host: { properties: { "class": "this.hostClass", "class.m-0": "this.isHostHidden" } }, providers: [provideActionExecutor()], viewQueries: [{ propertyName: "subactionsMenu", first: true, predicate: ["subactionsMenu"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "@if (($isVisible | async) && ($isPermitted | async)) {\n @if (actionLink && actionLink.url !== '') {\n <a\n pButton\n pRipple\n [label]=\"($label | async) ?? ''\"\n [icon]=\"$any(action.button.icon)\"\n [iconPos]=\"action.button.iconPosition\"\n [href]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false) ? null : (actionLink.url | mngParametrize: itemId : item : actionData)\"\n [target]=\"actionLink.target\"\n [class.disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n [pTooltip]=\"($tooltip | async) ?? undefined\"\n [tooltipPosition]=\"action.button.tooltipPosition ?? undefined\"\n [class]=\"buttonClass\"></a>\n } @else if (actionLink) {\n <a\n pButton\n pRipple\n [icon]=\"$any(action.button.icon)\"\n [iconPos]=\"action.button.iconPosition\"\n [label]=\"($label | async) ?? ''\"\n [target]=\"actionLink.target\"\n [replaceUrl]=\"actionLink.replaceUrl\"\n [routerLink]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false) ? null : (actionLink.pathSegments | mngParametrize: itemId : item : actionData)\"\n [relativeTo]=\"route\"\n [queryParams]=\"actionLink.queryParams | mngParametrize: itemId : item : actionData\"\n [queryParamsHandling]=\"actionLink.queryParamsHandling\"\n [class.disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n [pTooltip]=\"($tooltip | async) ?? undefined\"\n [tooltipPosition]=\"action.button.tooltipPosition ?? undefined\"\n [class]=\"buttonClass\"></a>\n } @else if (action.component || action.componentFromDi) {\n <ng-container\n [mngComponent]=\"action.component\"\n [injectionToken]=\"action.componentFromDi\"\n [inputs]=\"{\n action: action,\n item: item,\n itemId: itemId,\n actionData: actionData,\n enabled: $isEnabled,\n loading: $loading\n }\"\n (instanceCreated)=\"onCustomActionCmpInst($event)\">\n </ng-container>\n } @else if (action.subactions.length > 0 && !action.subactionsAsMenu) {\n <p-splitButton\n [icon]=\"action.button.icon ?? undefined\"\n [iconPos]=\"action.button.iconPosition\"\n [label]=\"($label | async) ?? ''\"\n [pTooltip]=\"($tooltip | async) ?? undefined\"\n [tooltipPosition]=\"action.button.tooltipPosition ?? undefined\"\n [disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n (onClick)=\"triggerAction(action)\"\n [class]=\"buttonClass\"\n [model]=\"subactions\">\n </p-splitButton>\n } @else {\n <button\n pButton\n pRipple\n type=\"button\"\n [icon]=\"$any(action.button.icon)\"\n [iconPos]=\"action.button.iconPosition\"\n [label]=\"($label | async) ?? ''\"\n [pTooltip]=\"($tooltip | async) ?? undefined\"\n [tooltipPosition]=\"action.button.tooltipPosition ?? undefined\"\n [loading]=\"(($loading | async) ?? false) || ((inputLoading | async) ?? false)\"\n loadingIcon=\"pi pi-spin pi-spinner\"\n [disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n (click)=\"triggerAction(action, undefined, $event)\"\n [class]=\"buttonClass\"></button>\n <p-menu #subactionsMenu [model]=\"subactions\" [popup]=\"true\" appendTo=\"body\" styleClass=\"mng-action-menu\"></p-menu>\n }\n}\n", styles: [":host{display:inline-block}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i4.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i7.Ripple, selector: "[pRipple]" }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i8.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "pipe", type: ParametrizePipe, name: "mngParametrize" }, { kind: "directive", type: ComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "injectionToken", "inputs", "attachToHost", "nodeInjector"], outputs: ["instanceCreated"] }, { kind: "ngmodule", type: SplitButtonModule }, { kind: "component", type: i9.SplitButton, selector: "p-splitButton", inputs: ["model", "icon", "iconPos", "label", "style", "styleClass", "menuStyle", "menuStyleClass", "disabled", "tabindex", "appendTo", "dir", "expandAriaLabel", "showTransitionOptions", "hideTransitionOptions", "buttonProps", "menuButtonProps"], outputs: ["onClick", "onDropdownClick"] }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: MenuModule }, { kind: "component", type: i10.Menu, selector: "p-menu", inputs: ["model", "popup", "style", "styleClass", "appendTo", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaLabel", "ariaLabelledBy", "id", "tabindex"], outputs: ["onShow", "onHide", "onBlur", "onFocus"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1573
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ActionComponent, deps: [{ token: i1.ActivatedRoute }, { token: i1$1.TranslateService }, { token: i1$2.PermissionService }, { token: ActionExecutorService }, { token: ViewContainer, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
1574
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", type: ActionComponent, isStandalone: true, selector: "mng-action", inputs: { action: "action", item: "item", itemId: "itemId", actionData: "actionData", dataListParams: "dataListParams", dataProvider: "dataProvider", hostComponent: "hostComponent", routeInit: ["route", "routeInit"], inputDisabled: ["disabled", "inputDisabled", boolean$Attribute], inputLoading: ["loading", "inputLoading", boolean$Attribute], selectedItems: "selectedItems" }, outputs: { finishEventEmitter: "finish" }, host: { properties: { "class": "this.hostClass", "class.m-0": "this.isHostHidden" } }, providers: [provideActionExecutor()], viewQueries: [{ propertyName: "subactionsMenu", first: true, predicate: ["subactionsMenu"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "@if (($isVisible | async) && ($isPermitted | async)) {\n @if (actionLink && actionLink.url !== '') {\n <a\n pButton\n pRipple\n [label]=\"($label | async) ?? ''\"\n [icon]=\"$any(action.button.icon)\"\n [iconPos]=\"action.button.iconPosition\"\n [href]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false) ? null : (actionLink.url | mngParametrize: itemId : item : actionData)\"\n [target]=\"actionLink.target\"\n [class.disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n [pTooltip]=\"($tooltip | async) ?? undefined\"\n [tooltipPosition]=\"action.button.tooltipPosition ?? undefined\"\n [class]=\"buttonClass\"></a>\n } @else if (actionLink) {\n <a\n pButton\n pRipple\n [icon]=\"$any(action.button.icon)\"\n [iconPos]=\"action.button.iconPosition\"\n [label]=\"($label | async) ?? ''\"\n [target]=\"actionLink.target\"\n [replaceUrl]=\"actionLink.replaceUrl\"\n [routerLink]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false) ? null : (actionLink.pathSegments | mngParametrize: itemId : item : actionData)\"\n [relativeTo]=\"route\"\n [queryParams]=\"actionLink.queryParams | mngParametrize: itemId : item : actionData\"\n [queryParamsHandling]=\"actionLink.queryParamsHandling\"\n [class.disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n [pTooltip]=\"($tooltip | async) ?? undefined\"\n [tooltipPosition]=\"action.button.tooltipPosition ?? undefined\"\n [class]=\"buttonClass\"></a>\n } @else if (action.component || action.componentFromDi) {\n <ng-container\n [mngComponent]=\"action.component\"\n [injectionToken]=\"action.componentFromDi\"\n [inputs]=\"{\n action: action,\n item: item,\n itemId: itemId,\n actionData: actionData,\n enabled: $isEnabled,\n loading: $loading\n }\"\n (instanceCreated)=\"onCustomActionCmpInst($event)\">\n </ng-container>\n } @else if (action.subactions.length > 0 && !action.subactionsAsMenu) {\n <p-splitButton\n [icon]=\"action.button.icon ?? undefined\"\n [iconPos]=\"action.button.iconPosition\"\n [label]=\"($label | async) ?? ''\"\n [pTooltip]=\"($tooltip | async) ?? undefined\"\n [tooltipPosition]=\"action.button.tooltipPosition ?? undefined\"\n [disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n (onClick)=\"triggerAction(action)\"\n [class]=\"buttonClass\"\n [model]=\"subactions\">\n </p-splitButton>\n } @else {\n <button\n pButton\n pRipple\n type=\"button\"\n [icon]=\"$any(action.button.icon)\"\n [iconPos]=\"action.button.iconPosition\"\n [label]=\"($label | async) ?? ''\"\n [pTooltip]=\"($tooltip | async) ?? undefined\"\n [tooltipPosition]=\"action.button.tooltipPosition ?? undefined\"\n [loading]=\"(($loading | async) ?? false) || ((inputLoading | async) ?? false)\"\n loadingIcon=\"pi pi-spin pi-spinner\"\n [disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n (click)=\"triggerAction(action, undefined, $event)\"\n [class]=\"buttonClass\"></button>\n <p-menu #subactionsMenu [model]=\"subactions\" [popup]=\"true\" appendTo=\"body\" styleClass=\"mng-action-menu\"></p-menu>\n }\n}\n", styles: [":host{display:inline-block}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i4.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i7.Ripple, selector: "[pRipple]" }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i8.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "pipe", type: ParametrizePipe, name: "mngParametrize" }, { kind: "directive", type: ComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "injectionToken", "inputs", "attachToHost", "nodeInjector"], outputs: ["instanceCreated"] }, { kind: "ngmodule", type: SplitButtonModule }, { kind: "component", type: i9.SplitButton, selector: "p-splitButton", inputs: ["model", "icon", "iconPos", "label", "style", "styleClass", "menuStyle", "menuStyleClass", "disabled", "tabindex", "appendTo", "dir", "expandAriaLabel", "showTransitionOptions", "hideTransitionOptions", "buttonProps", "menuButtonProps"], outputs: ["onClick", "onDropdownClick"] }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: MenuModule }, { kind: "component", type: i10.Menu, selector: "p-menu", inputs: ["model", "popup", "style", "styleClass", "appendTo", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaLabel", "ariaLabelledBy", "id", "tabindex"], outputs: ["onShow", "onHide", "onBlur", "onFocus"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1618
1575
  }
1619
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ActionComponent, decorators: [{
1576
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ActionComponent, decorators: [{
1620
1577
  type: Component,
1621
1578
  args: [{ standalone: true, selector: 'mng-action', changeDetection: ChangeDetectionStrategy.OnPush, imports: [AsyncPipe, ButtonModule, RippleModule, TooltipModule, ParametrizePipe, ComponentDirective, SplitButtonModule, MenuModule], providers: [provideActionExecutor()], template: "@if (($isVisible | async) && ($isPermitted | async)) {\n @if (actionLink && actionLink.url !== '') {\n <a\n pButton\n pRipple\n [label]=\"($label | async) ?? ''\"\n [icon]=\"$any(action.button.icon)\"\n [iconPos]=\"action.button.iconPosition\"\n [href]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false) ? null : (actionLink.url | mngParametrize: itemId : item : actionData)\"\n [target]=\"actionLink.target\"\n [class.disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n [pTooltip]=\"($tooltip | async) ?? undefined\"\n [tooltipPosition]=\"action.button.tooltipPosition ?? undefined\"\n [class]=\"buttonClass\"></a>\n } @else if (actionLink) {\n <a\n pButton\n pRipple\n [icon]=\"$any(action.button.icon)\"\n [iconPos]=\"action.button.iconPosition\"\n [label]=\"($label | async) ?? ''\"\n [target]=\"actionLink.target\"\n [replaceUrl]=\"actionLink.replaceUrl\"\n [routerLink]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false) ? null : (actionLink.pathSegments | mngParametrize: itemId : item : actionData)\"\n [relativeTo]=\"route\"\n [queryParams]=\"actionLink.queryParams | mngParametrize: itemId : item : actionData\"\n [queryParamsHandling]=\"actionLink.queryParamsHandling\"\n [class.disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n [pTooltip]=\"($tooltip | async) ?? undefined\"\n [tooltipPosition]=\"action.button.tooltipPosition ?? undefined\"\n [class]=\"buttonClass\"></a>\n } @else if (action.component || action.componentFromDi) {\n <ng-container\n [mngComponent]=\"action.component\"\n [injectionToken]=\"action.componentFromDi\"\n [inputs]=\"{\n action: action,\n item: item,\n itemId: itemId,\n actionData: actionData,\n enabled: $isEnabled,\n loading: $loading\n }\"\n (instanceCreated)=\"onCustomActionCmpInst($event)\">\n </ng-container>\n } @else if (action.subactions.length > 0 && !action.subactionsAsMenu) {\n <p-splitButton\n [icon]=\"action.button.icon ?? undefined\"\n [iconPos]=\"action.button.iconPosition\"\n [label]=\"($label | async) ?? ''\"\n [pTooltip]=\"($tooltip | async) ?? undefined\"\n [tooltipPosition]=\"action.button.tooltipPosition ?? undefined\"\n [disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n (onClick)=\"triggerAction(action)\"\n [class]=\"buttonClass\"\n [model]=\"subactions\">\n </p-splitButton>\n } @else {\n <button\n pButton\n pRipple\n type=\"button\"\n [icon]=\"$any(action.button.icon)\"\n [iconPos]=\"action.button.iconPosition\"\n [label]=\"($label | async) ?? ''\"\n [pTooltip]=\"($tooltip | async) ?? undefined\"\n [tooltipPosition]=\"action.button.tooltipPosition ?? undefined\"\n [loading]=\"(($loading | async) ?? false) || ((inputLoading | async) ?? false)\"\n loadingIcon=\"pi pi-spin pi-spinner\"\n [disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n (click)=\"triggerAction(action, undefined, $event)\"\n [class]=\"buttonClass\"></button>\n <p-menu #subactionsMenu [model]=\"subactions\" [popup]=\"true\" appendTo=\"body\" styleClass=\"mng-action-menu\"></p-menu>\n }\n}\n", styles: [":host{display:inline-block}\n"] }]
1622
- }], ctorParameters: () => [{ type: i1.ActivatedRoute }, { type: i2$1.TranslateService }, { type: i1$1.PermissionService }, { type: ActionExecutorService }, { type: ViewContainer, decorators: [{
1579
+ }], ctorParameters: () => [{ type: i1.ActivatedRoute }, { type: i1$1.TranslateService }, { type: i1$2.PermissionService }, { type: ActionExecutorService }, { type: ViewContainer, decorators: [{
1623
1580
  type: Optional
1624
1581
  }] }], propDecorators: { hostClass: [{
1625
1582
  type: HostBinding,
@@ -1661,454 +1618,503 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImpor
1661
1618
  args: ['subactionsMenu']
1662
1619
  }] } });
1663
1620
 
1664
- function getFormEditorInfoMessage(translate, title, message, params) {
1665
- const actionErrorTitle = translate.instant(title) ?? undefined;
1666
- const actionErrorMessage = translate.instant(message, params) ?? undefined;
1667
- return { severity: 'info', summary: actionErrorTitle, detail: actionErrorMessage };
1668
- }
1669
- function getFormEditorWarningMessage(translate, title, message) {
1670
- const actionErrorTitle = translate.instant(title) ?? undefined;
1671
- const actionErrorMessage = translate.instant(message) ?? undefined;
1672
- return { severity: 'warn', summary: actionErrorTitle, detail: actionErrorMessage };
1621
+ function createFormlyConfigFromDescriptor(descriptor, formlyConfig, formEditorComponent) {
1622
+ const fields = [];
1623
+ if (descriptor.isLocalized) {
1624
+ descriptor = createFormlyLocalizationsTab(descriptor);
1625
+ }
1626
+ if (!descriptor.isLocalized && descriptor.tabs.length === 1 && descriptor.tabs[0].default) {
1627
+ // dont use tabs
1628
+ fields.push(...createFormlyGroupType(descriptor.tabs[0].fields, formlyConfig, formEditorComponent));
1629
+ }
1630
+ else {
1631
+ fields.push(...createFormlyTabType(descriptor.tabs, formlyConfig, formEditorComponent));
1632
+ }
1633
+ return fields;
1673
1634
  }
1674
-
1675
- class EditorFormlyUtil {
1676
- static createFormlyConfigFromDescriptor(descriptor, formEditorComponent) {
1677
- const fields = [];
1678
- if (descriptor.isLocalized) {
1679
- descriptor = EditorFormlyUtil.createLocalizationsTab(descriptor);
1680
- }
1681
- if (!descriptor.isLocalized && descriptor.tabs.length === 1 && descriptor.tabs[0].default) {
1682
- // dont use tabs
1683
- fields.push(...EditorFormlyUtil.createFormlyGroupType(descriptor.tabs[0].fields, formEditorComponent));
1684
- }
1685
- else {
1686
- fields.push(...EditorFormlyUtil.createFormlyTabType(descriptor.tabs, formEditorComponent));
1635
+ function createFormlyLocalizationsTab(descriptor) {
1636
+ if (descriptor.isLocalized && descriptor.tableviewEditorType !== TableviewEditorTypeEnum.Details) {
1637
+ if (!descriptor.localizationModel) {
1638
+ throw new CommonsInternalError('Localization model must be defined.');
1639
+ }
1640
+ const localizationsTableViewDescriptor = TableviewDescriptor.fromModel(descriptor.localizationModel);
1641
+ if (!descriptor.localizationLocaleProperty) {
1642
+ throw new CommonsInternalError('Localization locale property must be defined.');
1643
+ }
1644
+ localizationsTableViewDescriptor.addColumn(descriptor.localizationLocaleProperty);
1645
+ localizationsTableViewDescriptor.editEditor.addField(descriptor.localizationLocaleProperty).withDisabled(true);
1646
+ localizationsTableViewDescriptor.detailsEditor.addField(descriptor.localizationLocaleProperty).withDisabled(true);
1647
+ localizationsTableViewDescriptor.addEditor
1648
+ .addFieldLookupWithProvider(descriptor.localizationLocaleProperty, CommonsService, type())
1649
+ .withLookup((qp, service) => service.appDataLanguages)
1650
+ .withDisabled(false)
1651
+ .withRequired();
1652
+ descriptor.fields.forEach(field => {
1653
+ if (field.isLocalized) {
1654
+ localizationsTableViewDescriptor.addColumn(field.property);
1655
+ localizationsTableViewDescriptor.addField(field.property);
1656
+ }
1657
+ });
1658
+ const descriptorWithLocalizations = descriptor.copy();
1659
+ descriptorWithLocalizations.createTabGroup('localizations');
1660
+ if (!descriptor.localizationLocalizationProperty) {
1661
+ throw new CommonsInternalError('Localization localization property must be defined');
1687
1662
  }
1688
- return fields;
1663
+ descriptorWithLocalizations.addFieldManyEditorUnsafe(descriptor.localizationLocalizationProperty, localizationsTableViewDescriptor);
1664
+ return descriptorWithLocalizations;
1689
1665
  }
1690
- static createLocalizationsTab(descriptor) {
1691
- if (descriptor.isLocalized && descriptor.tableviewEditorType !== TableviewEditorTypeEnum.Details) {
1692
- if (!descriptor.localizationModel) {
1693
- throw new CommonsInternalError('Localization model must be defined.');
1694
- }
1695
- const localizationsTableViewDescriptor = TableviewDescriptor.fromModel(descriptor.localizationModel);
1696
- if (!descriptor.localizationLocaleProperty) {
1697
- throw new CommonsInternalError('Localization locale property must be defined.');
1698
- }
1699
- localizationsTableViewDescriptor.addColumn(descriptor.localizationLocaleProperty);
1700
- localizationsTableViewDescriptor.editEditor.addField(descriptor.localizationLocaleProperty).withDisabled(true);
1701
- localizationsTableViewDescriptor.detailsEditor.addField(descriptor.localizationLocaleProperty).withDisabled(true);
1702
- localizationsTableViewDescriptor.addEditor
1703
- .addFieldLookupWithProvider(descriptor.localizationLocaleProperty, CommonsService, type())
1704
- .withLookup((qp, service) => service.appDataLanguages)
1705
- .withDisabled(false)
1706
- .withRequired();
1707
- descriptor.fields.forEach(field => {
1708
- if (field.isLocalized) {
1709
- localizationsTableViewDescriptor.addColumn(field.property);
1710
- localizationsTableViewDescriptor.addField(field.property);
1711
- }
1712
- });
1713
- const descriptorWithLocalizations = descriptor.copy();
1714
- descriptorWithLocalizations.createTabGroup('localizations');
1715
- if (!descriptor.localizationLocalizationProperty) {
1716
- throw new CommonsInternalError('Localization localization property must be defined');
1717
- }
1718
- descriptorWithLocalizations.addFieldManyEditor(descriptor.localizationLocalizationProperty, localizationsTableViewDescriptor);
1719
- return descriptorWithLocalizations;
1666
+ return descriptor;
1667
+ }
1668
+ function createFormlyTabType(tabGroups, formlyConfig, formEditorComponent) {
1669
+ const tabsField = {
1670
+ type: 'tabs',
1671
+ fieldGroup: [],
1672
+ props: {
1673
+ formEditorComponent
1720
1674
  }
1721
- return descriptor;
1675
+ };
1676
+ for (const tab of tabGroups) {
1677
+ const tabField = {
1678
+ id: tab.name,
1679
+ props: {
1680
+ formEditorComponent
1681
+ },
1682
+ expressions: {},
1683
+ fieldGroup: []
1684
+ };
1685
+ if (tab.title) {
1686
+ tabField.props.label = tab.title;
1687
+ }
1688
+ tabField.fieldGroup.push(...createFormlyGroupType(tab.fields, formlyConfig, formEditorComponent));
1689
+ tabsField.fieldGroup.push(tabField);
1722
1690
  }
1723
- static createFormlyTabType(tabGroups, formEditorComponent) {
1724
- const tabsField = {
1725
- type: 'tabs',
1691
+ return [tabsField];
1692
+ }
1693
+ function createFormlyGroupType(groups, formlyConfig, formEditorComponent) {
1694
+ if (groups.length === 1 && groups[0].default) {
1695
+ // dont use fieldset, just create fields
1696
+ return createFormlyFields(groups[0], formlyConfig, formEditorComponent);
1697
+ }
1698
+ else {
1699
+ const groupsField = {
1700
+ type: 'fieldset',
1726
1701
  fieldGroup: [],
1727
1702
  props: {
1728
1703
  formEditorComponent
1729
- }
1704
+ },
1705
+ expressions: {}
1730
1706
  };
1731
- for (const tab of tabGroups) {
1732
- const tabField = {
1733
- id: tab.name,
1707
+ for (const group of groups) {
1708
+ const groupField = {
1709
+ id: group.name,
1734
1710
  props: {
1735
- formEditorComponent
1711
+ descriptor: group
1736
1712
  },
1737
1713
  expressions: {},
1738
1714
  fieldGroup: []
1739
1715
  };
1740
- if (tab.title) {
1741
- tabField.props.label = tab.title;
1716
+ if (group.title) {
1717
+ groupField.props.label = group.title;
1742
1718
  }
1743
- tabField.fieldGroup.push(...EditorFormlyUtil.createFormlyGroupType(tab.fields, formEditorComponent));
1744
- tabsField.fieldGroup.push(tabField);
1719
+ groupField.fieldGroup.push(...createFormlyFields(group, formlyConfig, formEditorComponent));
1720
+ groupsField.fieldGroup.push(groupField);
1745
1721
  }
1746
- return [tabsField];
1722
+ return [groupsField];
1747
1723
  }
1748
- static createFormlyGroupType(groups, formEditorComponent) {
1749
- if (groups.length === 1 && groups[0].default) {
1750
- // dont use fieldset, just create fields
1751
- return EditorFormlyUtil.createFormlyFields(groups[0], formEditorComponent);
1752
- }
1753
- else {
1754
- const groupsField = {
1755
- type: 'fieldset',
1756
- fieldGroup: [],
1757
- props: {
1758
- formEditorComponent
1759
- },
1760
- expressions: {}
1761
- };
1762
- for (const group of groups) {
1763
- const groupField = {
1764
- id: group.name,
1765
- props: {
1766
- descriptor: group
1767
- },
1768
- expressions: {},
1769
- fieldGroup: []
1770
- };
1771
- if (group.title) {
1772
- groupField.props.label = group.title;
1724
+ }
1725
+ function createFormlyFields(descriptor, formlyConfig, formEditorComponent) {
1726
+ const fields = [];
1727
+ for (const descriptorField of descriptor.fields) {
1728
+ fields.push(createFormlyField(descriptorField, formlyConfig, formEditorComponent));
1729
+ }
1730
+ // wrap in group to be able to use flex grid
1731
+ const wrapperGroup = {
1732
+ fieldGroupClassName: 'p-fluid formgrid grid',
1733
+ fieldGroup: fields,
1734
+ props: {}
1735
+ };
1736
+ addValidationsToFormlyField(wrapperGroup, descriptor.validations, formlyConfig);
1737
+ return [wrapperGroup];
1738
+ }
1739
+ function createFormlyField(descriptor, formlyConfig, formEditorComponent) {
1740
+ const field = {
1741
+ key: descriptor.property,
1742
+ modelOptions: {
1743
+ updateOn: descriptor.updateOn
1744
+ },
1745
+ hooks: {
1746
+ onInit: () => (descriptor.onInit ? descriptor.onInit(field) : undefined),
1747
+ onChanges: () => (descriptor.onChanges ? descriptor.onChanges(field) : undefined),
1748
+ afterContentInit: () => (descriptor.afterContentInit ? descriptor.afterContentInit(field) : undefined),
1749
+ afterViewInit: () => (descriptor.afterViewInit ? descriptor.afterViewInit(field) : undefined),
1750
+ onDestroy: () => (descriptor.onDestroy ? descriptor.onDestroy(field) : undefined)
1751
+ },
1752
+ props: {
1753
+ descriptor,
1754
+ formEditorComponent,
1755
+ onValueChange: descriptor.onValueChange
1756
+ },
1757
+ expressions: {}
1758
+ };
1759
+ let className = descriptor.className;
1760
+ if (!className) {
1761
+ // assign default field width through entire row
1762
+ className = 'col-12';
1763
+ }
1764
+ field.className = className;
1765
+ if (descriptor instanceof FieldInputDescriptor) {
1766
+ switch (descriptor.fieldType) {
1767
+ case FieldInputTypeEnum.Hidden:
1768
+ break;
1769
+ case FieldInputTypeEnum.Label:
1770
+ field.type = 'label';
1771
+ delete field.key;
1772
+ break;
1773
+ case FieldInputTypeEnum.Textarea:
1774
+ field.type = 'textarea';
1775
+ field.props.maxLength = descriptor.maxLength;
1776
+ field.props.minLength = descriptor.minLength;
1777
+ field.props.pattern = descriptor.pattern;
1778
+ break;
1779
+ case FieldInputTypeEnum.Number:
1780
+ field.type = 'number';
1781
+ field.props.min = descriptor.numberMin;
1782
+ field.props.max = descriptor.numberMax;
1783
+ break;
1784
+ case FieldInputTypeEnum.Currency:
1785
+ field.type = 'currency';
1786
+ field.props.min = descriptor.numberMin;
1787
+ field.props.max = descriptor.numberMax;
1788
+ break;
1789
+ case FieldInputTypeEnum.Switch:
1790
+ field.type = 'switch';
1791
+ field.defaultValue = false;
1792
+ break;
1793
+ case FieldInputTypeEnum.Radio:
1794
+ field.type = 'radio';
1795
+ break;
1796
+ case FieldInputTypeEnum.Datepicker:
1797
+ field.type = 'datepicker';
1798
+ break;
1799
+ case FieldInputTypeEnum.Mask:
1800
+ field.type = 'mask';
1801
+ break;
1802
+ case FieldInputTypeEnum.File:
1803
+ case FieldInputTypeEnum.ImageFile:
1804
+ field.type = 'file';
1805
+ break;
1806
+ case FieldInputTypeEnum.ImageUrl:
1807
+ field.type = 'imageUrl';
1808
+ break;
1809
+ case FieldInputTypeEnum.Custom:
1810
+ if (descriptor.customComponentType) {
1811
+ field.type = 'custom';
1812
+ field.props['customComponentType'] = descriptor.customComponentType;
1813
+ if (Array.isArray(descriptor.customComponentWrappers)) {
1814
+ field.wrappers = descriptor.customComponentWrappers;
1815
+ }
1816
+ else {
1817
+ // default wrapper
1818
+ field.wrappers = ['field'];
1819
+ }
1773
1820
  }
1774
- groupField.fieldGroup.push(...EditorFormlyUtil.createFormlyFields(group, formEditorComponent));
1775
- groupsField.fieldGroup.push(groupField);
1776
- }
1777
- return [groupsField];
1821
+ break;
1822
+ default:
1823
+ field.type = 'input';
1824
+ field.props.minLength = descriptor.minLength;
1825
+ field.props.maxLength = descriptor.maxLength;
1826
+ field.props.pattern = descriptor.pattern;
1827
+ break;
1778
1828
  }
1779
1829
  }
1780
- static createFormlyFields(descriptor, formEditorComponent) {
1781
- const fields = [];
1782
- for (const descriptorField of descriptor.fields) {
1783
- fields.push(EditorFormlyUtil.createFormlyField(descriptorField, formEditorComponent));
1784
- }
1785
- // wrap in group to be able to use flex grid
1786
- const wrapperGroup = {
1787
- fieldGroupClassName: 'p-fluid formgrid grid',
1788
- fieldGroup: fields
1789
- };
1790
- EditorFormlyUtil.addValidationsToFormlyField(wrapperGroup, descriptor.validations);
1791
- return [wrapperGroup];
1792
- }
1793
- static createFormlyField(descriptor, formEditorComponent) {
1794
- const field = {
1795
- key: descriptor.property,
1796
- modelOptions: {
1797
- updateOn: descriptor.updateOn
1798
- },
1799
- hooks: {
1800
- onInit: () => (descriptor.onInit ? descriptor.onInit(field) : undefined),
1801
- onChanges: () => (descriptor.onChanges ? descriptor.onChanges(field) : undefined),
1802
- afterContentInit: () => (descriptor.afterContentInit ? descriptor.afterContentInit(field) : undefined),
1803
- afterViewInit: () => (descriptor.afterViewInit ? descriptor.afterViewInit(field) : undefined),
1804
- onDestroy: () => (descriptor.onDestroy ? descriptor.onDestroy(field) : undefined)
1805
- },
1806
- props: {
1807
- descriptor,
1808
- formEditorComponent,
1809
- onValueChange: descriptor.onValueChange
1810
- },
1811
- expressions: {}
1812
- };
1813
- let className = descriptor.className;
1814
- if (!className) {
1815
- // assign default field width through entire row
1816
- className = 'col-12';
1817
- }
1818
- field.className = className;
1819
- if (descriptor instanceof FieldInputDescriptor) {
1820
- switch (descriptor.fieldType) {
1821
- case FieldInputTypeEnum.Hidden:
1822
- break;
1823
- case FieldInputTypeEnum.Label:
1824
- field.type = 'label';
1825
- delete field.key;
1826
- break;
1827
- case FieldInputTypeEnum.Textarea:
1828
- field.type = 'textarea';
1829
- field.props.maxLength = descriptor.maxLength;
1830
- field.props.minLength = descriptor.minLength;
1831
- field.props.pattern = descriptor.pattern;
1832
- break;
1833
- case FieldInputTypeEnum.Number:
1834
- field.type = 'number';
1835
- field.props.min = descriptor.numberMin;
1836
- field.props.max = descriptor.numberMax;
1837
- break;
1838
- case FieldInputTypeEnum.Currency:
1839
- field.type = 'currency';
1840
- field.props.min = descriptor.numberMin;
1841
- field.props.max = descriptor.numberMax;
1842
- break;
1843
- case FieldInputTypeEnum.Switch:
1844
- field.type = 'switch';
1845
- field.defaultValue = false;
1846
- break;
1847
- case FieldInputTypeEnum.Radio:
1848
- field.type = 'radio';
1849
- break;
1850
- case FieldInputTypeEnum.Datepicker:
1851
- field.type = 'datepicker';
1852
- break;
1853
- case FieldInputTypeEnum.Mask:
1854
- field.type = 'mask';
1855
- break;
1856
- case FieldInputTypeEnum.File:
1857
- case FieldInputTypeEnum.ImageFile:
1858
- field.type = 'file';
1859
- break;
1860
- case FieldInputTypeEnum.ImageUrl:
1861
- field.type = 'imageUrl';
1862
- break;
1863
- case FieldInputTypeEnum.Custom:
1864
- if (descriptor.customComponentType) {
1865
- field.type = 'custom';
1866
- field.props['customComponentType'] = descriptor.customComponentType;
1867
- if (Array.isArray(descriptor.customComponentWrappers)) {
1868
- field.wrappers = descriptor.customComponentWrappers;
1869
- }
1870
- else {
1871
- // default wrapper
1872
- field.wrappers = ['field'];
1873
- }
1874
- }
1875
- break;
1876
- default:
1877
- field.type = 'input';
1878
- field.props.minLength = descriptor.minLength;
1879
- field.props.maxLength = descriptor.maxLength;
1880
- field.props.pattern = descriptor.pattern;
1881
- break;
1882
- }
1830
+ else if (descriptor instanceof FieldActionDescriptor) {
1831
+ field.type = 'action';
1832
+ field.wrappers = descriptor.wrappers;
1833
+ delete field.key;
1834
+ }
1835
+ else if (descriptor instanceof FieldLookupEnumDescriptor) {
1836
+ switch (descriptor.lookupType) {
1837
+ case FieldLookupTypeEnum.Custom:
1838
+ field.type = descriptor.customComponentName;
1839
+ break;
1840
+ default:
1841
+ field.type = 'enum';
1842
+ break;
1883
1843
  }
1884
- else if (descriptor instanceof FieldActionDescriptor) {
1885
- field.type = 'action';
1886
- field.wrappers = descriptor.wrappers;
1887
- delete field.key;
1844
+ }
1845
+ else if (descriptor instanceof FieldLookupDescriptor) {
1846
+ switch (descriptor.lookupType) {
1847
+ case FieldLookupTypeEnum.Autocomplete:
1848
+ field.type = 'autocomplete';
1849
+ break;
1850
+ case FieldLookupTypeEnum.Dialog:
1851
+ field.type = 'dialog';
1852
+ break;
1853
+ case FieldLookupTypeEnum.Custom:
1854
+ field.type = descriptor.customComponentName;
1855
+ break;
1856
+ case FieldLookupTypeEnum.Dropdown:
1857
+ default:
1858
+ field.type = 'dropdown';
1859
+ break;
1888
1860
  }
1889
- else if (descriptor instanceof FieldLookupEnumDescriptor) {
1890
- switch (descriptor.lookupType) {
1891
- case FieldLookupTypeEnum.Custom:
1892
- field.type = descriptor.customComponentName;
1893
- break;
1894
- default:
1895
- field.type = 'enum';
1896
- break;
1897
- }
1861
+ }
1862
+ else if (descriptor instanceof FieldManyToManyEditorDescriptor) {
1863
+ field.type = 'table-dialog-multiselect';
1864
+ }
1865
+ else if (descriptor instanceof FieldManyEditorDescriptor) {
1866
+ field.type = 'table-dialog-form';
1867
+ }
1868
+ if (descriptor.label) {
1869
+ field.props.label = descriptor.label;
1870
+ }
1871
+ if (descriptor.requiredExpression) {
1872
+ field.expressions['props.required'] = descriptor.requiredExpression;
1873
+ }
1874
+ if (descriptor.required) {
1875
+ field.props.required = true;
1876
+ if (descriptor.requiredHideLabelMarker) {
1877
+ field.props['hideRequiredMarker'] = true;
1898
1878
  }
1899
- else if (descriptor instanceof FieldLookupDescriptor) {
1900
- switch (descriptor.lookupType) {
1901
- case FieldLookupTypeEnum.Autocomplete:
1902
- field.type = 'autocomplete';
1903
- break;
1904
- case FieldLookupTypeEnum.Dialog:
1905
- field.type = 'dialog';
1906
- break;
1907
- case FieldLookupTypeEnum.Custom:
1908
- field.type = descriptor.customComponentName;
1909
- break;
1910
- case FieldLookupTypeEnum.Dropdown:
1911
- default:
1912
- field.type = 'dropdown';
1913
- break;
1879
+ }
1880
+ if (descriptor.hiddenExpression) {
1881
+ field.expressions['hide'] = descriptor.hiddenExpression;
1882
+ }
1883
+ if (descriptor.disabledExpression) {
1884
+ field.expressions['props.disabled'] = descriptor.disabledExpression;
1885
+ }
1886
+ else if (descriptor.disabled) {
1887
+ field.props.disabled = true;
1888
+ }
1889
+ else {
1890
+ field.expressions['props.disabled'] = 'formState.disabled';
1891
+ }
1892
+ if (typeof descriptor.defaultValue !== 'undefined') {
1893
+ field.defaultValue = descriptor.defaultValue;
1894
+ }
1895
+ addValidationsToFormlyField(field, descriptor.validations, formlyConfig);
1896
+ addAsyncValidationsToFormlyField(field, descriptor.asyncValidations, formlyConfig);
1897
+ return field;
1898
+ }
1899
+ function addValidationsToFormlyField(config, validations, formlyConfig) {
1900
+ if (!config.validators) {
1901
+ config.validators = {};
1902
+ }
1903
+ for (const validation of validations) {
1904
+ createFormlyValidation(config.validators, validation, formlyConfig);
1905
+ }
1906
+ }
1907
+ function addAsyncValidationsToFormlyField(config, asyncValidations, formlyConfig) {
1908
+ if (!config.asyncValidators) {
1909
+ config.asyncValidators = {};
1910
+ }
1911
+ for (const validation of asyncValidations) {
1912
+ createFormlyValidation(config.asyncValidators, validation, formlyConfig);
1913
+ }
1914
+ }
1915
+ function createFormlyValidation(config, validation, formlyConfig) {
1916
+ if (typeof validation.validator === 'function') {
1917
+ if (validation.options?.errorPath && validation.message != null) {
1918
+ // if this is used, the validator and message must be registered globally
1919
+ if (!formlyConfig.getValidatorMessage(validation.name)) {
1920
+ formlyConfig.addValidatorMessage(validation.name, validation.message);
1921
+ }
1922
+ if (!formlyConfig.validators[validation.name]) {
1923
+ formlyConfig.setValidator({
1924
+ name: validation.name,
1925
+ validation: (control, field, options) => validation.validator(control, field, options) ? null : { [validation.name]: true }
1926
+ });
1914
1927
  }
1915
- }
1916
- else if (descriptor instanceof FieldManyToManyEditorDescriptor) {
1917
- field.type = 'table-dialog-multiselect';
1918
- }
1919
- else if (descriptor instanceof FieldManyEditorDescriptor) {
1920
- field.type = 'table-dialog-form';
1921
- }
1922
- if (descriptor.label) {
1923
- field.props.label = descriptor.label;
1924
- }
1925
- if (descriptor.requiredExpression) {
1926
- field.expressions['props.required'] = descriptor.requiredExpression;
1927
- }
1928
- if (descriptor.required) {
1929
- field.props.required = true;
1930
- if (descriptor.requiredHideLabelMarker) {
1931
- field.props['hideRequiredMarker'] = true;
1928
+ if (!Array.isArray(config.validation)) {
1929
+ config.validation = [];
1932
1930
  }
1933
- }
1934
- if (descriptor.hiddenExpression) {
1935
- field.expressions['hide'] = descriptor.hiddenExpression;
1936
- }
1937
- if (descriptor.disabledExpression) {
1938
- field.expressions['props.disabled'] = descriptor.disabledExpression;
1939
- }
1940
- else if (descriptor.disabled) {
1941
- field.props.disabled = true;
1931
+ config.validation.push({
1932
+ name: validation.name,
1933
+ options: { errorPath: validation.options.errorPath }
1934
+ });
1942
1935
  }
1943
1936
  else {
1944
- field.expressions['props.disabled'] = 'formState.disabled';
1945
- }
1946
- if (typeof descriptor.defaultValue !== 'undefined') {
1947
- field.defaultValue = descriptor.defaultValue;
1948
- }
1949
- EditorFormlyUtil.addValidationsToFormlyField(field, descriptor.validations);
1950
- EditorFormlyUtil.addAsyncValidationsToFormlyField(field, descriptor.asyncValidations);
1951
- return field;
1952
- }
1953
- static addValidationsToFormlyField(config, validations) {
1954
- if (!config.validators) {
1955
- config.validators = {};
1956
- }
1957
- for (const validation of validations) {
1958
- if (typeof validation.validator === 'function') {
1959
- config.validators[validation.name] = {
1960
- expression: (control, field, options) => {
1961
- const validatorRes = validation.validator(control, field, options);
1962
- // formly validator only excepts true/false for validation
1963
- // map possible angular validator result to true/false
1964
- return typeof validatorRes === 'boolean' ? validatorRes : validatorRes === null;
1965
- }
1966
- };
1967
- if (typeof validation.message === 'function') {
1968
- config.validators[validation.name].message = validation.message;
1969
- }
1970
- }
1971
- else {
1972
- if (!Array.isArray(config.validators.validation)) {
1973
- config.validators.validation = [];
1974
- }
1975
- config.validators.validation.push(validation.name);
1937
+ config[validation.name] = {
1938
+ expression: validation.validator
1939
+ };
1940
+ if (validation.message != null) {
1941
+ config[validation.name].message = validation.message;
1976
1942
  }
1977
1943
  }
1978
1944
  }
1979
- static addAsyncValidationsToFormlyField(config, asyncValidations) {
1980
- if (!config.asyncValidators) {
1981
- config.asyncValidators = {};
1945
+ else {
1946
+ if (!Array.isArray(config.validation)) {
1947
+ config.validation = [];
1982
1948
  }
1983
- for (const validation of asyncValidations) {
1984
- if (typeof validation.validator === 'function') {
1985
- config.asyncValidators[validation.name] = {
1986
- expression: (control, field, options) => {
1987
- const validator = validation.validator;
1988
- const validatorObs = validator(control, field, options);
1989
- // formly validator only excepts true/false for validation
1990
- // map possible angular validator result to true/false
1991
- return validatorObs.pipe(map(value => (typeof value === 'boolean' ? value : value === null)));
1992
- }
1993
- };
1994
- if (typeof validation.message === 'function') {
1995
- config.asyncValidators[validation.name].message = validation.message;
1996
- }
1997
- }
1998
- else {
1999
- if (!Array.isArray(config.asyncValidators.validation)) {
2000
- config.asyncValidators.validation = [];
2001
- }
2002
- config.asyncValidators.validation.push(validation.name);
2003
- }
1949
+ if (validation.options?.errorPath) {
1950
+ config.validation.push({
1951
+ name: validation.name,
1952
+ options: { errorPath: validation.options.errorPath }
1953
+ });
1954
+ }
1955
+ else {
1956
+ config.validation.push(validation.name);
2004
1957
  }
2005
1958
  }
2006
1959
  }
2007
1960
 
1961
+ function getFormEditorInfoMessage(translate, title, message, params) {
1962
+ const actionErrorTitle = translate.instant(title) ?? undefined;
1963
+ const actionErrorMessage = translate.instant(message, params) ?? undefined;
1964
+ return { severity: 'info', summary: actionErrorTitle, detail: actionErrorMessage };
1965
+ }
1966
+ function getFormEditorWarningMessage(translate, title, message) {
1967
+ const actionErrorTitle = translate.instant(title) ?? undefined;
1968
+ const actionErrorMessage = translate.instant(message) ?? undefined;
1969
+ return { severity: 'warn', summary: actionErrorTitle, detail: actionErrorMessage };
1970
+ }
1971
+
2008
1972
  class FormEditorComponent {
1973
+ get form() {
1974
+ return this._form;
1975
+ }
1976
+ get formUnsafe() {
1977
+ return this._form;
1978
+ }
1979
+ get formlyOptions() {
1980
+ return this._formlyOptions;
1981
+ }
1982
+ get formlyFields() {
1983
+ return this._formlyFields;
1984
+ }
1985
+ /**
1986
+ * Only used for form initialization. Further changes should be done using {resetFormModel}.
1987
+ */
1988
+ get formlyInitialItem() {
1989
+ return this._formlyInitialItem;
1990
+ }
2009
1991
  constructor() {
1992
+ this.formlyConfig = inject(FormlyConfig);
2010
1993
  this.translateService = inject(TranslateService);
2011
1994
  this.commons = inject(CommonsService);
2012
1995
  this.logger = inject(LoggerService).create('FormEditorComponent');
2013
- this.viewContainer = inject(ViewContainer, { optional: true });
2014
- this.submitLoading = false;
2015
- // extra features input
2016
- this.isFormDisabled = false;
1996
+ this.destroyRef = inject(DestroyRef);
1997
+ this.descriptor = input.required();
1998
+ this.submitLoading = input(false);
1999
+ this.item = input(undefined);
2000
+ this.isFormDisabled = input(false);
2017
2001
  // event outputs
2018
- this.formSubmitEventEmitter = new EventEmitter();
2019
- this.form = new FormGroup({});
2020
- this.formOptions = {
2002
+ this.formSubmit = output();
2003
+ // content and view queries
2004
+ this.submitButtonElementRef = viewChild('submitButton');
2005
+ // formly specifics
2006
+ this._form = new UntypedFormGroup({});
2007
+ this._formlyOptions = {
2021
2008
  formState: {
2022
2009
  add: false,
2023
2010
  edit: false,
2024
2011
  disabled: false
2025
2012
  }
2026
2013
  };
2027
- this.formModel = {};
2028
- this.formMessages = [];
2029
- this.subscriptions = [];
2014
+ this._formlyFields = []; // initialized in ngOnInit, should not be changed after
2015
+ this._formlyInitialItem = {}; // initialized in ngOnInit, should not be changed after
2016
+ this.formMessages = signal([]);
2017
+ effect(() => {
2018
+ const item = this.item();
2019
+ if (item !== this.initialItemInput) {
2020
+ // new item is different from the one the form was initialized with. Must trigger reset of form model.
2021
+ this.resetFormModel(item);
2022
+ }
2023
+ },
2024
+ // resetModel uses signal like concept
2025
+ { allowSignalWrites: true });
2026
+ effect(() => {
2027
+ this._formlyOptions.formState.disabled = this.isFormDisabled() || this._formlyOptions.formState.descriptor?.disabled === true || this._formlyOptions.formState.details;
2028
+ });
2030
2029
  }
2031
2030
  ngOnInit() {
2032
- this.setInitialFormState();
2033
- this.resetFormModel(this.item);
2034
- this.submitLoading$ = this.submitLoading instanceof Observable ? this.submitLoading : of(this.submitLoading);
2035
- if (this.descriptor) {
2036
- // init fields for formly
2037
- this.formFields = EditorFormlyUtil.createFormlyConfigFromDescriptor(this.descriptor, this);
2038
- this.updateFormState();
2039
- // let the user know, that adding new value in table view with localizations is only supported in the default language
2040
- if (this.descriptor.isLocalized &&
2041
- (this.descriptor.tableviewEditorType === TableviewEditorTypeEnum.Add || this.descriptor.tableviewEditorType === TableviewEditorTypeEnum.Edit)) {
2042
- this.formMessages.push(getFormEditorInfoMessage(this.translateService, 'mngEditor.localizations.addInDefaultLanguageTitle', 'mngEditor.localizations.addInDefaultLanguageDescription', { defaultLanguage: this.commons.defaultDataLanguage }));
2043
- }
2031
+ // init form state
2032
+ if (this.descriptor().tableviewEditorType === TableviewEditorTypeEnum.Add) {
2033
+ this._formlyOptions.formState.add = true;
2034
+ }
2035
+ else if (this.descriptor().tableviewEditorType === TableviewEditorTypeEnum.Edit) {
2036
+ this._formlyOptions.formState.edit = true;
2037
+ }
2038
+ else if (this.descriptor().tableviewEditorType === TableviewEditorTypeEnum.Details) {
2039
+ this._formlyOptions.formState.details = true;
2040
+ }
2041
+ this._formlyOptions.formState.descriptor = this.descriptor();
2042
+ // init fields for formly
2043
+ this._formlyFields = createFormlyConfigFromDescriptor(this.descriptor(), this.formlyConfig, this);
2044
+ // int form model (only initial, no further changes to formModel should be allowed!)
2045
+ this.initialItemInput = this.item();
2046
+ this._formlyInitialItem = this.getFormModelFromItem(this.item());
2047
+ // handle localizations edit/add message
2048
+ if (this.descriptor().isLocalized &&
2049
+ (this.descriptor().tableviewEditorType === TableviewEditorTypeEnum.Add || this.descriptor().tableviewEditorType === TableviewEditorTypeEnum.Edit)) {
2050
+ this.formMessages.set([
2051
+ ...this.formMessages(),
2052
+ getFormEditorInfoMessage(this.translateService, 'mngEditor.localizations.addInDefaultLanguageTitle', 'mngEditor.localizations.addInDefaultLanguageDescription', {
2053
+ defaultLanguage: this.commons.defaultDataLanguage
2054
+ })
2055
+ ]);
2044
2056
  }
2045
2057
  // emit lifecycle event
2046
- this.descriptor?.nextEvent(FormEventTypeEnum.ComponentLifecycle, FormEditorComponent, this, {
2058
+ this.descriptor().nextEvent(FormEventTypeEnum.ComponentLifecycle, FormEditorComponent, this, {
2047
2059
  eventSubtype: FormFieldEventComponentSubtype.ON_INIT
2048
2060
  });
2049
- this.subscriptions.push(this.form.valueChanges.pipe(debounceTime(250), distinctUntilChanged()).subscribe(v => {
2050
- this.descriptor?.nextEvent(FormEventTypeEnum.ValueChange, FormEditorComponent, this, {
2061
+ this._form.valueChanges.pipe(takeUntilDestroyed(this.destroyRef), debounceTime(250), distinctUntilChanged()).subscribe(v => {
2062
+ this.descriptor().nextEvent(FormEventTypeEnum.ValueChange, FormEditorComponent, this, {
2051
2063
  value: v,
2052
2064
  formValue: () => this.getFormValue()
2053
2065
  });
2054
- }));
2055
- }
2056
- ngOnChanges(changes) {
2057
- if (changes['isFormDisabled'] && !changes['isFormDisabled'].firstChange) {
2058
- this.updateFormState();
2059
- }
2060
- if (changes['item'] && !changes['item'].firstChange) {
2061
- this.resetFormModel(this.item);
2062
- }
2066
+ });
2067
+ // mark form as pristine, should be done in next event hook to allow formly to initialize first
2068
+ setTimeout(() => {
2069
+ this._form.markAsPristine();
2070
+ });
2063
2071
  }
2064
2072
  ngOnDestroy() {
2065
- this.subscriptions.forEach(s => s.unsubscribe());
2066
2073
  // emit lifecycle event
2067
- this.descriptor?.nextEvent(FormEventTypeEnum.ComponentLifecycle, FormEditorComponent, this, {
2074
+ this.descriptor().nextEvent(FormEventTypeEnum.ComponentLifecycle, FormEditorComponent, this, {
2068
2075
  eventSubtype: FormFieldEventComponentSubtype.ON_DESTROY
2069
2076
  });
2070
- // complete emitting events
2071
- this.descriptor?.completeEvents();
2072
2077
  }
2073
2078
  submit() {
2074
- this.submitButtonElementRef?.nativeElement.click();
2079
+ this.submitButtonElementRef()?.nativeElement.click();
2075
2080
  }
2076
2081
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
2077
2082
  onSubmit(event) {
2078
- this.formOptions.formState.submittedOn = Date.now();
2079
- this.formMessages = [];
2083
+ this._formlyOptions.formState.submittedOn = Date.now();
2084
+ this.formMessages.set([]);
2080
2085
  const formSubmitItem = this.getFormValue();
2081
- if (this.form.valid) {
2082
- this.formSubmitEventEmitter.next({
2086
+ if (this._form.valid) {
2087
+ this.formSubmit.emit({
2083
2088
  success: true,
2084
2089
  formItem: formSubmitItem
2085
2090
  });
2086
- this.descriptor?.nextEvent(FormEventTypeEnum.Submit, FormEditorComponent, this, {
2091
+ this.descriptor().nextEvent(FormEventTypeEnum.Submit, FormEditorComponent, this, {
2087
2092
  submitValid: true,
2088
2093
  submitValue: formSubmitItem
2089
2094
  });
2090
2095
  }
2091
2096
  else {
2092
2097
  // find and mark invalid tabs
2093
- if (this.formFields[0].type === 'tabs' && this.formFields[0].fieldGroup) {
2094
- for (const tab of this.formFields[0].fieldGroup) {
2098
+ const formFields = this._formlyFields;
2099
+ if (formFields[0].type === 'tabs' && formFields[0].fieldGroup) {
2100
+ for (const tab of formFields[0].fieldGroup) {
2095
2101
  const isInvalid = this.isAnyFieldInvalid(tab.fieldGroup);
2096
- this.formOptions.formState['tab_' + (tab.id ? tab.id : tab.props.props.label) + '_invalid'] = isInvalid;
2102
+ this._formlyOptions.formState['tab_' + (tab.id ? tab.id : tab.props.props.label) + '_invalid'] = isInvalid;
2097
2103
  }
2098
2104
  }
2099
2105
  const event = { success: false, formItem: formSubmitItem };
2100
2106
  event.success = false;
2101
- this.formMessages.push(getFormEditorWarningMessage(this.translateService, 'mngEditor.invalidFormToastTitle', 'mngEditor.invalidFormToastMessage'));
2102
- this.formSubmitEventEmitter.next(event);
2103
- this.descriptor?.nextEvent(FormEventTypeEnum.Submit, FormEditorComponent, this, {
2107
+ this.formMessages().push(getFormEditorWarningMessage(this.translateService, 'mngEditor.invalidFormToastTitle', 'mngEditor.invalidFormToastMessage'));
2108
+ this.formSubmit.emit(event);
2109
+ this.descriptor().nextEvent(FormEventTypeEnum.Submit, FormEditorComponent, this, {
2104
2110
  submitValid: false,
2105
2111
  submitValue: formSubmitItem
2106
2112
  });
2107
2113
  }
2108
2114
  }
2109
2115
  getFormValue() {
2110
- const formValue = ObjectUtil.deepCopy(this.form.getRawValue(), { mapGettersToProperties: true });
2111
- this.descriptor?.fields.forEach(field => {
2116
+ const formValue = objectDeepCopy(this._form.getRawValue(), { mapGettersToProperties: true });
2117
+ this.descriptor().fields.forEach(field => {
2112
2118
  if (field && field.setter) {
2113
2119
  const splitPath = field.property.split('.');
2114
2120
  let fieldValue = formValue;
@@ -2125,43 +2131,26 @@ class FormEditorComponent {
2125
2131
  });
2126
2132
  return formValue;
2127
2133
  }
2128
- resetFormModel(item, markAsPristine = true) {
2129
- if (typeof item !== 'undefined') {
2130
- this.originalItemPrototype = Object.getPrototypeOf(item);
2131
- }
2132
- const formModel = ObjectUtil.deepCopy(item, { mapGettersToProperties: true }) ?? {};
2133
- this.descriptor?.fields.forEach(field => {
2134
- if (field.getter && item) {
2135
- const splitPath = field.property.split('.');
2136
- let currentObject = formModel;
2137
- for (let i = 0; i < splitPath.length; i++) {
2138
- const currentSubPath = splitPath[i];
2139
- if (i === splitPath.length - 1) {
2140
- currentObject[currentSubPath] = field.getter(item?.[field.property], item);
2141
- }
2142
- else {
2143
- if (typeof currentObject[currentSubPath] !== 'object') {
2144
- currentObject[currentSubPath] = {};
2145
- }
2146
- currentObject = currentObject[currentSubPath];
2147
- }
2148
- }
2149
- }
2150
- });
2151
- if (typeof this.formOptions.resetModel === 'function') {
2152
- // could not be initiated yet
2153
- this.formOptions.resetModel(this.formModel);
2154
- }
2155
- this.formModel = formModel;
2156
- if (markAsPristine) {
2157
- this.form.markAsPristine();
2134
+ resetFormModel(item, opts) {
2135
+ this._formlyOptions.resetModel?.(this.getFormModelFromItem(item));
2136
+ if (opts?.markAsPristine !== false) {
2137
+ // mark form as pristine, should be done in next event hook to allow formly to initialize first
2138
+ setTimeout(() => {
2139
+ this._form.markAsPristine();
2140
+ });
2158
2141
  }
2159
2142
  }
2160
- getFormField(key) {
2161
- return this.findFormField(this.form, key.split('.'));
2143
+ getField(key) {
2144
+ return this.getFieldUnsafe(key);
2145
+ }
2146
+ getFieldUnsafe(key) {
2147
+ return this.findFormField(this._form, key.split('.'));
2148
+ }
2149
+ setFieldValue(key, value) {
2150
+ return this.setFieldValueUnsafe(key, value);
2162
2151
  }
2163
- setFormFieldValue(key, value) {
2164
- const control = this.getFormField(key);
2152
+ setFieldValueUnsafe(key, value) {
2153
+ const control = this.getFieldUnsafe(key);
2165
2154
  if (control) {
2166
2155
  control.setValue(value);
2167
2156
  return true;
@@ -2171,8 +2160,11 @@ class FormEditorComponent {
2171
2160
  return false;
2172
2161
  }
2173
2162
  }
2174
- patchFormFieldValue(key, value) {
2175
- const control = this.getFormField(key);
2163
+ patchFieldValue(key, value) {
2164
+ return this.patchFieldValueUnsafe(key, value);
2165
+ }
2166
+ patchFieldValueUnsafe(key, value) {
2167
+ const control = this.getFieldUnsafe(key);
2176
2168
  if (control) {
2177
2169
  control.patchValue(value);
2178
2170
  return true;
@@ -2182,8 +2174,11 @@ class FormEditorComponent {
2182
2174
  return false;
2183
2175
  }
2184
2176
  }
2185
- resetFormFieldValue(key, value) {
2186
- const control = this.getFormField(key);
2177
+ resetFieldValue(key, value) {
2178
+ return this.resetFieldValueUnsafe(key, value);
2179
+ }
2180
+ resetFieldValueUnsafe(key, value) {
2181
+ const control = this.getFieldUnsafe(key);
2187
2182
  if (control) {
2188
2183
  control.reset(value);
2189
2184
  return true;
@@ -2193,6 +2188,29 @@ class FormEditorComponent {
2193
2188
  return false;
2194
2189
  }
2195
2190
  }
2191
+ getFormModelFromItem(item) {
2192
+ const formModel = objectDeepCopy(item, { mapGettersToProperties: true }) ?? {};
2193
+ const descriptor = this.descriptor();
2194
+ descriptor.fields.forEach(field => {
2195
+ if (field.getter && item) {
2196
+ const splitPath = field.property.split('.');
2197
+ let currentObject = formModel;
2198
+ for (let i = 0; i < splitPath.length; i++) {
2199
+ const currentSubPath = splitPath[i];
2200
+ if (i === splitPath.length - 1) {
2201
+ currentObject[currentSubPath] = field.getter(item?.[field.property], item);
2202
+ }
2203
+ else {
2204
+ if (typeof currentObject[currentSubPath] !== 'object') {
2205
+ currentObject[currentSubPath] = {};
2206
+ }
2207
+ currentObject = currentObject[currentSubPath];
2208
+ }
2209
+ }
2210
+ }
2211
+ });
2212
+ return formModel;
2213
+ }
2196
2214
  findFormField(control, keyPath) {
2197
2215
  if (keyPath.length === 0) {
2198
2216
  return control;
@@ -2230,47 +2248,13 @@ class FormEditorComponent {
2230
2248
  }
2231
2249
  return false;
2232
2250
  }
2233
- updateFormState() {
2234
- const isDisabled = this.isFormDisabled || this.descriptor?.disabled === true || this.descriptor?.tableviewEditorType === TableviewEditorTypeEnum.Details;
2235
- this.formOptions.formState.disabled = isDisabled;
2236
- }
2237
- /**
2238
- * @private Sets form state based on editor descriptor type.
2239
- * Possible options are: disabled, add or edit.
2240
- */
2241
- setInitialFormState() {
2242
- if (this.descriptor?.tableviewEditorType === TableviewEditorTypeEnum.Add) {
2243
- this.formOptions.formState.add = true;
2244
- }
2245
- else if (this.descriptor?.tableviewEditorType === TableviewEditorTypeEnum.Edit) {
2246
- this.formOptions.formState.edit = true;
2247
- }
2248
- this.updateFormState();
2249
- }
2250
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FormEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2251
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.1", type: FormEditorComponent, isStandalone: true, selector: "mng-form-editor", inputs: { descriptor: "descriptor", submitLoading: "submitLoading", item: "item", isFormDisabled: "isFormDisabled" }, outputs: { formSubmitEventEmitter: "formSubmit" }, queries: [{ propertyName: "templates", predicate: TemplateDirective }], viewQueries: [{ propertyName: "submitButtonElementRef", first: true, predicate: ["submitButton"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit($event)\">\n <formly-form [form]=\"form\" [fields]=\"formFields\" [options]=\"formOptions\" [model]=\"formModel\"></formly-form>\n <button\n #submitButton\n pButton\n type=\"submit\"\n class=\"hidden\"\n [disabled]=\"form.disabled\"\n [loading]=\"(submitLoading$ | async) ?? false\"\n loadingIcon=\"pi pi-spin pi-spinner\"></button>\n</form>\n<p-messages [value]=\"formMessages\" [enableService]=\"false\"></p-messages>\n", dependencies: [{ kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i2$2.FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MessagesModule }, { kind: "component", type: i3.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i4.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2251
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2252
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "17.3.4", type: FormEditorComponent, isStandalone: true, selector: "mng-form-editor", inputs: { descriptor: { classPropertyName: "descriptor", publicName: "descriptor", isSignal: true, isRequired: true, transformFunction: null }, submitLoading: { classPropertyName: "submitLoading", publicName: "submitLoading", isSignal: true, isRequired: false, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null }, isFormDisabled: { classPropertyName: "isFormDisabled", publicName: "isFormDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { formSubmit: "formSubmit" }, viewQueries: [{ propertyName: "submitButtonElementRef", first: true, predicate: ["submitButton"], descendants: true, isSignal: true }], ngImport: i0, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit($event)\">\n <formly-form [form]=\"form\" [fields]=\"formlyFields\" [options]=\"formlyOptions\" [model]=\"formlyInitialItem\"></formly-form>\n <button #submitButton pButton type=\"submit\" class=\"hidden\" [disabled]=\"form.disabled\" [loading]=\"submitLoading()\" loadingIcon=\"pi pi-spin pi-spinner\"></button>\n</form>\n<p-messages [value]=\"formMessages()\" [enableService]=\"false\"></p-messages>\n", dependencies: [{ kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i2$1.FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MessagesModule }, { kind: "component", type: i3$1.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i4.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2252
2253
  }
2253
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FormEditorComponent, decorators: [{
2254
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormEditorComponent, decorators: [{
2254
2255
  type: Component,
2255
- args: [{ standalone: true, selector: 'mng-form-editor', imports: [FormlyModule, ReactiveFormsModule, MessagesModule, AsyncPipe, ButtonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit($event)\">\n <formly-form [form]=\"form\" [fields]=\"formFields\" [options]=\"formOptions\" [model]=\"formModel\"></formly-form>\n <button\n #submitButton\n pButton\n type=\"submit\"\n class=\"hidden\"\n [disabled]=\"form.disabled\"\n [loading]=\"(submitLoading$ | async) ?? false\"\n loadingIcon=\"pi pi-spin pi-spinner\"></button>\n</form>\n<p-messages [value]=\"formMessages\" [enableService]=\"false\"></p-messages>\n" }]
2256
- }], propDecorators: { descriptor: [{
2257
- type: Input
2258
- }], submitLoading: [{
2259
- type: Input
2260
- }], item: [{
2261
- type: Input
2262
- }], isFormDisabled: [{
2263
- type: Input
2264
- }], formSubmitEventEmitter: [{
2265
- type: Output,
2266
- args: ['formSubmit']
2267
- }], templates: [{
2268
- type: ContentChildren,
2269
- args: [TemplateDirective]
2270
- }], submitButtonElementRef: [{
2271
- type: ViewChild,
2272
- args: ['submitButton']
2273
- }] } });
2256
+ args: [{ standalone: true, selector: 'mng-form-editor', imports: [FormlyModule, ReactiveFormsModule, MessagesModule, AsyncPipe, ButtonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit($event)\">\n <formly-form [form]=\"form\" [fields]=\"formlyFields\" [options]=\"formlyOptions\" [model]=\"formlyInitialItem\"></formly-form>\n <button #submitButton pButton type=\"submit\" class=\"hidden\" [disabled]=\"form.disabled\" [loading]=\"submitLoading()\" loadingIcon=\"pi pi-spin pi-spinner\"></button>\n</form>\n<p-messages [value]=\"formMessages()\" [enableService]=\"false\"></p-messages>\n" }]
2257
+ }], ctorParameters: () => [] });
2274
2258
 
2275
2259
  class ActionEditorInjectorContextComponent {
2276
2260
  constructor() {
@@ -2339,7 +2323,7 @@ class ActionEditorInjectorContextComponent {
2339
2323
  }
2340
2324
  else if (e.fields) {
2341
2325
  for (const key in e.fields) {
2342
- this.formEditorCmp?.resetFormFieldValue(key, e.fields[key]);
2326
+ this.formEditorCmp?.resetFieldValue(key, e.fields[key]);
2343
2327
  }
2344
2328
  }
2345
2329
  }
@@ -2362,7 +2346,6 @@ class ActionEditorInjectorContextComponent {
2362
2346
  throw new CommonsInternalError(`Action is not instantiated in action editor for action ${this.data.descriptor.actionName}.`);
2363
2347
  }
2364
2348
  if (event.success) {
2365
- this.instanceSubmitFormItem = event.formItem;
2366
2349
  // prepare parameters
2367
2350
  const actionParameters = {
2368
2351
  itemId: this.itemId(),
@@ -2381,7 +2364,6 @@ class ActionEditorInjectorContextComponent {
2381
2364
  this.updateItemId(res[this.data.descriptor.model.idProperty]);
2382
2365
  }
2383
2366
  this.actionRunEventEmitter.next(res);
2384
- this.instanceSubmitResult = res;
2385
2367
  }
2386
2368
  });
2387
2369
  this.actionExecutor.run(context);
@@ -2472,7 +2454,7 @@ class ActionEditorInjectorContextComponent {
2472
2454
  this.title.set(undefined);
2473
2455
  return;
2474
2456
  }
2475
- I18nUtils.Action.getEditorTitleAsync(this.translate, this.data.descriptor, this.item()).subscribe(t => {
2457
+ getI18nActionEditorTitleAsync(this.translate, this.data.descriptor, this.item()).subscribe(t => {
2476
2458
  this.title.set(t ?? undefined);
2477
2459
  });
2478
2460
  }
@@ -2557,6 +2539,9 @@ class ActionEditorInjectorContextComponent {
2557
2539
  break;
2558
2540
  case ActionInstanceStateEnum.FinishSuccessReactivateFinal:
2559
2541
  this.setEditorEnabled(false);
2542
+ // make copy of item and update title to be on the latest
2543
+ this.item.set(objectDeepCopy(this.item()));
2544
+ this.updateTitle();
2560
2545
  // should also unsetInstance, but let this for reactivationInstance$ listener to not interfere
2561
2546
  break;
2562
2547
  }
@@ -2584,6 +2569,17 @@ class ActionEditorInjectorContextComponent {
2584
2569
  parseInt(this.dialogService.dialogComponentRefMap.get(this.instance?.activationDialogRef)?.instance.container?.style.zIndex ?? '') === ZIndexUtils.getCurrent())
2585
2570
  this.closeWithUnsavedChangesConfirmation();
2586
2571
  }
2572
+ closeWithUnsavedChangesConfirmation(callFromGuard = false) {
2573
+ if (this.formEditorCmp?.form.pristine === false && this.data.descriptor.unsavedChangesConfirmation) {
2574
+ return this.showUnsavedChangesConfirmationDialog(callFromGuard);
2575
+ }
2576
+ else {
2577
+ if (!callFromGuard) {
2578
+ this.cancel();
2579
+ }
2580
+ }
2581
+ return of(true);
2582
+ }
2587
2583
  showUnsavedChangesConfirmationDialog(callFromGuard) {
2588
2584
  const subject = new Subject();
2589
2585
  this.confirmationService.confirm({
@@ -2606,21 +2602,10 @@ class ActionEditorInjectorContextComponent {
2606
2602
  });
2607
2603
  return subject.asObservable();
2608
2604
  }
2609
- closeWithUnsavedChangesConfirmation(callFromGuard = false) {
2610
- if (this.formEditorCmp?.form.pristine === false && this.data.descriptor.unsavedChangesConfirmation) {
2611
- return this.showUnsavedChangesConfirmationDialog(callFromGuard);
2612
- }
2613
- else {
2614
- if (!callFromGuard) {
2615
- this.cancel();
2616
- }
2617
- }
2618
- return of(true);
2619
- }
2620
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ActionEditorInjectorContextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2621
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.2.1", type: ActionEditorInjectorContextComponent, isStandalone: true, selector: "mng-action-editor-injector-context", inputs: { data: "data" }, outputs: { actionRunEventEmitter: "actionSubmit", actionCancelEventEmitter: "actionCancel" }, host: { listeners: { "window:beforeunload": "beforeWindowUnload()", "window:keydown.Escape": "onEscapePressed()" } }, providers: [provideActionExecutor()], viewQueries: [{ propertyName: "submitButtonElementRef", first: true, predicate: ["submitButton"], descendants: true }, { propertyName: "formEditorCmp", first: true, predicate: FormEditorComponent, descendants: true }], ngImport: i0, template: "@if (!data.isDialog && title()) {\n <h5>{{ title() }}</h5>\n}\n@if (data.isDialog && data.descriptor.activationTrigger === ActionActivationTriggerEnum.OnRoute) {\n <span class=\"p-dialog-header dialog-close-button-wrapper\">\n <button\n class=\"p-dialog-header-icon p-dialog-header-maximize p-link\"\n type=\"button\"\n (click)=\"closeWithUnsavedChangesConfirmation()\"\n (keydown.enter)=\"closeWithUnsavedChangesConfirmation()\">\n <span class=\"p-dialog-header-close-icon pi pi-times\"></span>\n </button>\n </span>\n}\n<div class=\"h-full flex flex-column\">\n @if (toolbarLeftActions().length > 0 || toolbarRightActions().length > 0) {\n <div class=\"flex-grow-1 mng-action-editor-toolbar-container\">\n <p-toolbar styleClass=\"mng-action-editor-toolbar\">\n <ng-template pTemplate=\"left\">\n @for (action of toolbarLeftActions(); track action) {\n <mng-action\n [action]=\"action\"\n [disabled]=\"submitLoading()\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading() : false\"\n [hostComponent]=\"this\"\n [item]=\"item()\"\n [itemId]=\"itemId()\"></mng-action>\n }\n </ng-template>\n <ng-template pTemplate=\"right\">\n @for (action of toolbarRightActions(); track action) {\n <mng-action\n [action]=\"action\"\n [disabled]=\"submitLoading()\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading() : false\"\n [hostComponent]=\"this\"\n [item]=\"item()\"\n [itemId]=\"itemId()\"></mng-action>\n }\n </ng-template>\n </p-toolbar>\n </div>\n }\n\n <div class=\"flex-grow-1 mng-action-editor-form-container\">\n @if (loading()) {\n <div class=\"text-center\">\n <p-progressSpinner [style]=\"{width: '3rem', height: '3rem'}\" strokeWidth=\"3\"></p-progressSpinner>\n </div>\n }\n @if (data.descriptor.editorDescriptor && !loading()) {\n <mng-form-editor [descriptor]=\"data.descriptor.editorDescriptor\" [item]=\"item()\" [isFormDisabled]=\"isFormDisabled()\" (formSubmit)=\"onSubmit($event)\"> </mng-form-editor>\n }\n </div>\n\n <div class=\"flex flex-row justify-content-between mng-action-editor-footer-container\">\n <div>\n @for (action of footerLeftActions(); track action) {\n <mng-action\n [action]=\"action\"\n [disabled]=\"submitLoading()\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading() : false\"\n [hostComponent]=\"this\"\n [item]=\"item()\"\n [itemId]=\"itemId()\"></mng-action>\n }\n </div>\n <div>\n @for (action of footerRightActions(); track action) {\n <mng-action\n [action]=\"action\"\n [disabled]=\"submitLoading()\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading() : false\"\n [hostComponent]=\"this\"\n [item]=\"item()\"\n [itemId]=\"itemId()\"></mng-action>\n }\n </div>\n </div>\n</div>\n", styles: [".dialog-close-button-wrapper{position:absolute;top:1.286rem;right:1.714rem;background:transparent;padding:0}\n"], dependencies: [{ kind: "component", type: ActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "dataListParams", "dataProvider", "hostComponent", "route", "disabled", "loading", "selectedItems"], outputs: ["finish"] }, { kind: "ngmodule", type: ProgressSpinnerModule }, { kind: "component", type: i1$3.ProgressSpinner, selector: "p-progressSpinner", inputs: ["styleClass", "style", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: FormEditorComponent, selector: "mng-form-editor", inputs: ["descriptor", "submitLoading", "item", "isFormDisabled"], outputs: ["formSubmit"] }, { kind: "ngmodule", type: ToolbarModule }, { kind: "component", type: i2$3.Toolbar, selector: "p-toolbar", inputs: ["style", "styleClass", "ariaLabelledBy"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2605
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ActionEditorInjectorContextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2606
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", type: ActionEditorInjectorContextComponent, isStandalone: true, selector: "mng-action-editor-injector-context", inputs: { data: "data" }, outputs: { actionRunEventEmitter: "actionSubmit", actionCancelEventEmitter: "actionCancel" }, host: { listeners: { "window:beforeunload": "beforeWindowUnload()", "window:keydown.Escape": "onEscapePressed()" } }, providers: [provideActionExecutor()], viewQueries: [{ propertyName: "submitButtonElementRef", first: true, predicate: ["submitButton"], descendants: true }, { propertyName: "formEditorCmp", first: true, predicate: FormEditorComponent, descendants: true }], ngImport: i0, template: "@if (!data.isDialog && title()) {\n <h5>{{ title() }}</h5>\n}\n@if (data.isDialog && data.descriptor.activationTrigger === ActionActivationTriggerEnum.OnRoute) {\n <span class=\"p-dialog-header dialog-close-button-wrapper\">\n <button\n class=\"p-dialog-header-icon p-dialog-header-maximize p-link\"\n type=\"button\"\n (click)=\"closeWithUnsavedChangesConfirmation()\"\n (keydown.enter)=\"closeWithUnsavedChangesConfirmation()\">\n <span class=\"p-dialog-header-close-icon pi pi-times\"></span>\n </button>\n </span>\n}\n<div class=\"h-full flex flex-column\">\n @if (toolbarLeftActions().length > 0 || toolbarRightActions().length > 0) {\n <div class=\"flex-grow-1 mng-action-editor-toolbar-container\">\n <p-toolbar styleClass=\"mng-action-editor-toolbar\">\n <ng-template pTemplate=\"left\">\n @for (action of toolbarLeftActions(); track action) {\n <mng-action\n [action]=\"action\"\n [disabled]=\"submitLoading()\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading() : false\"\n [hostComponent]=\"this\"\n [item]=\"item()\"\n [itemId]=\"itemId()\"></mng-action>\n }\n </ng-template>\n <ng-template pTemplate=\"right\">\n @for (action of toolbarRightActions(); track action) {\n <mng-action\n [action]=\"action\"\n [disabled]=\"submitLoading()\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading() : false\"\n [hostComponent]=\"this\"\n [item]=\"item()\"\n [itemId]=\"itemId()\"></mng-action>\n }\n </ng-template>\n </p-toolbar>\n </div>\n }\n\n <div class=\"flex-grow-1 mng-action-editor-form-container\">\n @if (loading()) {\n <div class=\"text-center\">\n <p-progressSpinner [style]=\"{width: '3rem', height: '3rem'}\" strokeWidth=\"3\"></p-progressSpinner>\n </div>\n }\n @if (data.descriptor.editorDescriptor && !loading()) {\n <mng-form-editor [descriptor]=\"data.descriptor.editorDescriptor\" [item]=\"item()\" [isFormDisabled]=\"isFormDisabled()\" (formSubmit)=\"onSubmit($event)\"> </mng-form-editor>\n }\n </div>\n\n <div class=\"flex flex-row justify-content-between mng-action-editor-footer-container\">\n <div>\n @for (action of footerLeftActions(); track action) {\n <mng-action\n [action]=\"action\"\n [disabled]=\"submitLoading()\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading() : false\"\n [hostComponent]=\"this\"\n [item]=\"item()\"\n [itemId]=\"itemId()\"></mng-action>\n }\n </div>\n <div>\n @for (action of footerRightActions(); track action) {\n <mng-action\n [action]=\"action\"\n [disabled]=\"submitLoading()\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading() : false\"\n [hostComponent]=\"this\"\n [item]=\"item()\"\n [itemId]=\"itemId()\"></mng-action>\n }\n </div>\n </div>\n</div>\n", styles: [".dialog-close-button-wrapper{position:absolute;top:1.286rem;right:1.714rem;background:transparent;padding:0}\n"], dependencies: [{ kind: "component", type: ActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "dataListParams", "dataProvider", "hostComponent", "route", "disabled", "loading", "selectedItems"], outputs: ["finish"] }, { kind: "ngmodule", type: ProgressSpinnerModule }, { kind: "component", type: i1$3.ProgressSpinner, selector: "p-progressSpinner", inputs: ["styleClass", "style", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: FormEditorComponent, selector: "mng-form-editor", inputs: ["descriptor", "submitLoading", "item", "isFormDisabled"], outputs: ["formSubmit"] }, { kind: "ngmodule", type: ToolbarModule }, { kind: "component", type: i2$2.Toolbar, selector: "p-toolbar", inputs: ["style", "styleClass", "ariaLabelledBy"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2622
2607
  }
2623
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ActionEditorInjectorContextComponent, decorators: [{
2608
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ActionEditorInjectorContextComponent, decorators: [{
2624
2609
  type: Component,
2625
2610
  args: [{ standalone: true, selector: 'mng-action-editor-injector-context', imports: [ActionComponent, ProgressSpinnerModule, FormEditorComponent, ComponentDirective, ToolbarModule], changeDetection: ChangeDetectionStrategy.OnPush, providers: [provideActionExecutor()], template: "@if (!data.isDialog && title()) {\n <h5>{{ title() }}</h5>\n}\n@if (data.isDialog && data.descriptor.activationTrigger === ActionActivationTriggerEnum.OnRoute) {\n <span class=\"p-dialog-header dialog-close-button-wrapper\">\n <button\n class=\"p-dialog-header-icon p-dialog-header-maximize p-link\"\n type=\"button\"\n (click)=\"closeWithUnsavedChangesConfirmation()\"\n (keydown.enter)=\"closeWithUnsavedChangesConfirmation()\">\n <span class=\"p-dialog-header-close-icon pi pi-times\"></span>\n </button>\n </span>\n}\n<div class=\"h-full flex flex-column\">\n @if (toolbarLeftActions().length > 0 || toolbarRightActions().length > 0) {\n <div class=\"flex-grow-1 mng-action-editor-toolbar-container\">\n <p-toolbar styleClass=\"mng-action-editor-toolbar\">\n <ng-template pTemplate=\"left\">\n @for (action of toolbarLeftActions(); track action) {\n <mng-action\n [action]=\"action\"\n [disabled]=\"submitLoading()\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading() : false\"\n [hostComponent]=\"this\"\n [item]=\"item()\"\n [itemId]=\"itemId()\"></mng-action>\n }\n </ng-template>\n <ng-template pTemplate=\"right\">\n @for (action of toolbarRightActions(); track action) {\n <mng-action\n [action]=\"action\"\n [disabled]=\"submitLoading()\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading() : false\"\n [hostComponent]=\"this\"\n [item]=\"item()\"\n [itemId]=\"itemId()\"></mng-action>\n }\n </ng-template>\n </p-toolbar>\n </div>\n }\n\n <div class=\"flex-grow-1 mng-action-editor-form-container\">\n @if (loading()) {\n <div class=\"text-center\">\n <p-progressSpinner [style]=\"{width: '3rem', height: '3rem'}\" strokeWidth=\"3\"></p-progressSpinner>\n </div>\n }\n @if (data.descriptor.editorDescriptor && !loading()) {\n <mng-form-editor [descriptor]=\"data.descriptor.editorDescriptor\" [item]=\"item()\" [isFormDisabled]=\"isFormDisabled()\" (formSubmit)=\"onSubmit($event)\"> </mng-form-editor>\n }\n </div>\n\n <div class=\"flex flex-row justify-content-between mng-action-editor-footer-container\">\n <div>\n @for (action of footerLeftActions(); track action) {\n <mng-action\n [action]=\"action\"\n [disabled]=\"submitLoading()\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading() : false\"\n [hostComponent]=\"this\"\n [item]=\"item()\"\n [itemId]=\"itemId()\"></mng-action>\n }\n </div>\n <div>\n @for (action of footerRightActions(); track action) {\n <mng-action\n [action]=\"action\"\n [disabled]=\"submitLoading()\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading() : false\"\n [hostComponent]=\"this\"\n [item]=\"item()\"\n [itemId]=\"itemId()\"></mng-action>\n }\n </div>\n </div>\n</div>\n", styles: [".dialog-close-button-wrapper{position:absolute;top:1.286rem;right:1.714rem;background:transparent;padding:0}\n"] }]
2626
2611
  }], ctorParameters: () => [], propDecorators: { data: [{
@@ -2708,10 +2693,10 @@ class ActionEditorComponent {
2708
2693
  triggerSubmit() {
2709
2694
  this.actionEditorWInjContextCmp?.triggerSubmit();
2710
2695
  }
2711
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ActionEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2712
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.1", type: ActionEditorComponent, isStandalone: true, selector: "mng-action-editor", inputs: { action: "action", itemIdInput: ["itemId", "itemIdInput"], itemInput: ["item", "itemInput"], actionData: "actionData", dataProvider: "dataProvider" }, outputs: { actionRunEventEmitter: "actionSubmit", actionCancelEventEmitter: "actionCancel" }, usesOnChanges: true, hostDirectives: [{ directive: i1$1.DialogKeydownHandlerDirective }], ngImport: i0, template: "<div\n [mngComponent]=\"injContextCmpType\"\n [inputs]=\"{\n data: actionEditorWInjContextInputData\n }\"\n [nodeInjector]=\"injector\"\n (instanceCreated)=\"onActionEditorWInjContextCmp($event)\"></div>\n", dependencies: [{ kind: "directive", type: ComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "injectionToken", "inputs", "attachToHost", "nodeInjector"], outputs: ["instanceCreated"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2696
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ActionEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2697
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: ActionEditorComponent, isStandalone: true, selector: "mng-action-editor", inputs: { action: "action", itemIdInput: ["itemId", "itemIdInput"], itemInput: ["item", "itemInput"], actionData: "actionData", dataProvider: "dataProvider" }, outputs: { actionRunEventEmitter: "actionSubmit", actionCancelEventEmitter: "actionCancel" }, usesOnChanges: true, hostDirectives: [{ directive: i1$2.DialogKeydownHandlerDirective }], ngImport: i0, template: "<div\n [mngComponent]=\"injContextCmpType\"\n [inputs]=\"{\n data: actionEditorWInjContextInputData\n }\"\n [nodeInjector]=\"injector\"\n (instanceCreated)=\"onActionEditorWInjContextCmp($event)\"></div>\n", dependencies: [{ kind: "directive", type: ComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "injectionToken", "inputs", "attachToHost", "nodeInjector"], outputs: ["instanceCreated"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2713
2698
  }
2714
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ActionEditorComponent, decorators: [{
2699
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ActionEditorComponent, decorators: [{
2715
2700
  type: Component,
2716
2701
  args: [{ standalone: true, selector: 'mng-action-editor', imports: [ComponentDirective], hostDirectives: [DialogKeydownHandlerDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n [mngComponent]=\"injContextCmpType\"\n [inputs]=\"{\n data: actionEditorWInjContextInputData\n }\"\n [nodeInjector]=\"injector\"\n (instanceCreated)=\"onActionEditorWInjContextCmp($event)\"></div>\n" }]
2717
2702
  }], propDecorators: { action: [{
@@ -2746,13 +2731,13 @@ class DataLanguageDropdownComponent {
2746
2731
  this.commons.appDataLanguage = dataLang;
2747
2732
  this.viewContainer?.reloadTable({});
2748
2733
  }
2749
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: DataLanguageDropdownComponent, deps: [{ token: i1$1.CommonsService }], target: i0.ɵɵFactoryTarget.Component }); }
2750
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.1", type: DataLanguageDropdownComponent, isStandalone: true, selector: "mng-data-language-dropdown", inputs: { action: "action", actionData: "actionData", item: "item", itemId: "itemId", enabled: "enabled", loading: "loading" }, outputs: { triggerActionEventEmitter: "triggerActionEventEmitter" }, viewQueries: [{ propertyName: "dropdown", first: true, predicate: DropdownComponent, descendants: true }], ngImport: i0, template: "<mng-dropdown [dataProvider]=\"selectionItemsDataProvider\" [ngModel]=\"commons.appDataLanguage\" [showClear]=\"false\" (valueChange)=\"updateDataLanguage($event)\"></mng-dropdown>\n", dependencies: [{ kind: "component", type: DropdownComponent, selector: "mng-dropdown", inputs: ["dataProvider", "options", "optionsTrackProperty", "optionsLabelProperty", "optionsLabelTranslate", "optionsValueProperty", "optionsDisabledProperty", "multiselect", "placeholder", "showClear", "selectFirstItem", "className", "dropdownClassName", "changeValueOnBlur"], outputs: ["valueChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
2734
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: DataLanguageDropdownComponent, deps: [{ token: i1$2.CommonsService }], target: i0.ɵɵFactoryTarget.Component }); }
2735
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: DataLanguageDropdownComponent, isStandalone: true, selector: "mng-data-language-dropdown", inputs: { action: "action", actionData: "actionData", item: "item", itemId: "itemId", enabled: "enabled", loading: "loading" }, outputs: { triggerActionEventEmitter: "triggerActionEventEmitter" }, viewQueries: [{ propertyName: "dropdown", first: true, predicate: DropdownComponent, descendants: true }], ngImport: i0, template: "<mng-dropdown [dataProvider]=\"selectionItemsDataProvider\" [ngModel]=\"commons.appDataLanguage\" [showClear]=\"false\" (valueChange)=\"updateDataLanguage($event)\"></mng-dropdown>\n", dependencies: [{ kind: "component", type: DropdownComponent, selector: "mng-dropdown", inputs: ["dataProvider", "options", "optionsTrackProperty", "optionsLabelProperty", "optionsLabelTranslate", "optionsValueProperty", "optionsDisabledProperty", "multiselect", "placeholder", "showClear", "selectFirstItem", "className", "dropdownClassName", "changeValueOnBlur"], outputs: ["valueChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
2751
2736
  }
2752
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: DataLanguageDropdownComponent, decorators: [{
2737
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: DataLanguageDropdownComponent, decorators: [{
2753
2738
  type: Component,
2754
2739
  args: [{ standalone: true, selector: 'mng-data-language-dropdown', imports: [DropdownComponent, FormsModule], template: "<mng-dropdown [dataProvider]=\"selectionItemsDataProvider\" [ngModel]=\"commons.appDataLanguage\" [showClear]=\"false\" (valueChange)=\"updateDataLanguage($event)\"></mng-dropdown>\n" }]
2755
- }], ctorParameters: () => [{ type: i1$1.CommonsService }], propDecorators: { action: [{
2740
+ }], ctorParameters: () => [{ type: i1$2.CommonsService }], propDecorators: { action: [{
2756
2741
  type: Input,
2757
2742
  args: [{ required: true }]
2758
2743
  }], actionData: [{
@@ -2885,6 +2870,7 @@ class ActionRouteComponent {
2885
2870
  this.viewContainer?.reloadTable(); // reload only if no error in action and
2886
2871
  this.untriggerAction();
2887
2872
  break;
2873
+ case ActionInstanceStateEnum.FinishErrorFinal:
2888
2874
  case ActionInstanceStateEnum.FinishDismissedFinal:
2889
2875
  this.untriggerAction();
2890
2876
  break;
@@ -2906,16 +2892,21 @@ class ActionRouteComponent {
2906
2892
  this.instanceStateSubscription?.unsubscribe();
2907
2893
  this.instanceReactivationSubscription?.unsubscribe();
2908
2894
  }
2909
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ActionRouteComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: ActionExecutorService }, { token: ViewContainer, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
2910
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.1", type: ActionRouteComponent, isStandalone: true, selector: "mng-action-route", providers: [provideActionExecutor()], ngImport: i0, template: "", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2895
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ActionRouteComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: ActionExecutorService }, { token: ViewContainer, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
2896
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: ActionRouteComponent, isStandalone: true, selector: "mng-action-route", providers: [provideActionExecutor()], ngImport: i0, template: "", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2911
2897
  }
2912
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ActionRouteComponent, decorators: [{
2898
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ActionRouteComponent, decorators: [{
2913
2899
  type: Component,
2914
2900
  args: [{ standalone: true, selector: 'mng-action-route', changeDetection: ChangeDetectionStrategy.OnPush, providers: [provideActionExecutor()], template: "" }]
2915
2901
  }], ctorParameters: () => [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: ActionExecutorService }, { type: ViewContainer, decorators: [{
2916
2902
  type: Optional
2917
2903
  }] }] });
2918
2904
 
2905
+ var actionRoute_component = /*#__PURE__*/Object.freeze({
2906
+ __proto__: null,
2907
+ default: ActionRouteComponent
2908
+ });
2909
+
2919
2910
  function calculateTableColumnActionWidth(table, actions) {
2920
2911
  const buttonsWidth = actions.reduce((acc, action) => acc + getActionButtonRoundedWidth(action) + 2 * Styles.ACTION_BUTTON_MARGIN_X, 0);
2921
2912
  const tablePadding = getTableCellPaddingX(table);
@@ -2962,9 +2953,12 @@ class ActionTableComponent {
2962
2953
  this.selectionChangeEventEmitter = new EventEmitter();
2963
2954
  this.captionCmpInstEventEmitter = new EventEmitter();
2964
2955
  this.columnActionCmpInstEventEmitter = new EventEmitter();
2956
+ // content and view queries
2957
+ this.templates = contentChildren(TemplateDirective);
2965
2958
  // templates
2966
- this.captionTemplate = signal(undefined);
2967
- this.footerTemplate = signal(undefined);
2959
+ this.captionTemplate = computed(() => findTemplateByName([...this.templates()], 'caption'));
2960
+ this.footerTemplate = computed(() => findTemplateByName([...this.templates()], 'footer'));
2961
+ this.rowExpandTemplate = computed(() => findTemplateByName([...this.templates()], 'rowExpandContent'));
2968
2962
  // actions
2969
2963
  this.rowClickActions = signal([]);
2970
2964
  this.rowInlineActions = signal([]);
@@ -2991,18 +2985,6 @@ class ActionTableComponent {
2991
2985
  this.columnActionMinWidth = calculateTableColumnActionWidth(this.descriptor, this.rowInlineActions());
2992
2986
  }
2993
2987
  }
2994
- ngAfterContentInit() {
2995
- this.templates.forEach(template => {
2996
- switch (template.getType()) {
2997
- case 'caption':
2998
- this.captionTemplate.set(template.template);
2999
- break;
3000
- case 'footer':
3001
- this.footerTemplate.set(template.template);
3002
- break;
3003
- }
3004
- });
3005
- }
3006
2988
  reload(emitEvent = false, resetParams = false) {
3007
2989
  this.table.reload(emitEvent, resetParams);
3008
2990
  }
@@ -3031,12 +3013,12 @@ class ActionTableComponent {
3031
3013
  this.reload();
3032
3014
  }
3033
3015
  }
3034
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ActionTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3035
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.2.1", type: ActionTableComponent, isStandalone: true, selector: "mng-action-table", inputs: { descriptor: "descriptor", items: "items", result: ["result", "result", (value) => (isObservable(value) ? value : of(value))], loading: ["loading", "loading", boolean$Attribute], dataProvider: "dataProvider", useQueryParams: "useQueryParams", selectionMode: "selectionMode", selectionEnabled: "selectionEnabled", globalFilterFields: "globalFilterFields", actions: "actions", captionComponent: "captionComponent", columnActionComponent: "columnActionComponent", columnActionMinWidth: "columnActionMinWidth" }, outputs: { loadEventEmitter: "tableLoad", selectionChangeEventEmitter: "selectionChange", captionCmpInstEventEmitter: "captionComponentInstance", columnActionCmpInstEventEmitter: "columnActionComponentInstance" }, providers: [provideActionExecutor()], queries: [{ propertyName: "templates", predicate: TemplateDirective }], viewQueries: [{ propertyName: "table", first: true, predicate: TableComponent, descendants: true }, { propertyName: "components", predicate: ComponentDirective, descendants: true }], ngImport: i0, template: "<mng-table\n [descriptor]=\"descriptor\"\n [items]=\"items\"\n [result]=\"result\"\n [loading]=\"loading\"\n [dataProvider]=\"dataProvider\"\n [useQueryParams]=\"useQueryParams\"\n [selectionMode]=\"selectionMode\"\n [selectionEnabled]=\"selectionEnabled\"\n [globalFilterFields]=\"globalFilterFields\"\n [captionComponent]=\"captionComponent\"\n [columnCustomLastComponent]=\"columnActionComponent\"\n [columnLastMinWidth]=\"columnActionMinWidth\"\n (tableLoad)=\"loadEventEmitter.next($event)\"\n (cellClick)=\"onCellClick($event)\"\n (selectionChange)=\"onSelectionChange($event)\"\n (captionComponentInstance)=\"captionCmpInstEventEmitter.next($event)\"\n (columnCustomLastComponentInstance)=\"columnActionCmpInstEventEmitter.next($event)\">\n @if (!columnActionComponent && rowInlineActions().length > 0) {\n <ng-template mngTemplate=\"columnCustomLast\" let-item=\"rowItem\" let-idx=\"rowIndex\">\n @for (action of rowInlineActions(); track action.actionNameLong) {\n <mng-action\n [action]=\"action\"\n [item]=\"item\"\n [hostComponent]=\"this\"\n [itemId]=\"descriptor.model.idProperty ? item[descriptor.model.idProperty!] : null\"\n [actionData]=\"{itemIndex: idx}\"\n (finish)=\"onActionFinish($event)\">\n </mng-action>\n }\n </ng-template>\n }\n @if (captionTemplate() && !captionComponent) {\n <ng-template mngTemplate=\"caption\">\n <ng-container *ngTemplateOutlet=\"captionTemplate()!\"></ng-container>\n </ng-template>\n }\n @if (footerTemplate()) {\n <ng-template mngTemplate=\"footer\" let-data=\"data\" let-totalCount=\"totalCount\">\n <ng-container *ngTemplateOutlet=\"footerTemplate()!; context: {data, totalCount}\"></ng-container>\n </ng-template>\n }\n</mng-table>\n", dependencies: [{ kind: "component", type: TableComponent, selector: "mng-table", inputs: ["descriptor", "items", "result", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "columnLastMinWidth", "captionComponent", "columnCustomLastComponent", "globalFilterFields"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnCustomLastComponentInstance"] }, { kind: "component", type: ActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "dataListParams", "dataProvider", "hostComponent", "route", "disabled", "loading", "selectedItems"], outputs: ["finish"] }, { kind: "directive", type: TemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3016
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ActionTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3017
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", type: ActionTableComponent, isStandalone: true, selector: "mng-action-table", inputs: { descriptor: "descriptor", items: "items", result: ["result", "result", (value) => (isObservable(value) ? value : of(value))], loading: ["loading", "loading", boolean$Attribute], dataProvider: "dataProvider", useQueryParams: "useQueryParams", selectionMode: "selectionMode", selectionEnabled: "selectionEnabled", globalFilterFields: "globalFilterFields", actions: "actions", captionComponent: "captionComponent", columnActionComponent: "columnActionComponent", columnActionMinWidth: "columnActionMinWidth" }, outputs: { loadEventEmitter: "tableLoad", selectionChangeEventEmitter: "selectionChange", captionCmpInstEventEmitter: "captionComponentInstance", columnActionCmpInstEventEmitter: "columnActionComponentInstance" }, providers: [provideActionExecutor()], queries: [{ propertyName: "templates", predicate: TemplateDirective, isSignal: true }], viewQueries: [{ propertyName: "table", first: true, predicate: TableComponent, descendants: true }, { propertyName: "components", predicate: ComponentDirective, descendants: true }], ngImport: i0, template: "<mng-table\n [descriptor]=\"descriptor\"\n [items]=\"items\"\n [result]=\"result\"\n [loading]=\"loading\"\n [dataProvider]=\"dataProvider\"\n [useQueryParams]=\"useQueryParams\"\n [selectionMode]=\"selectionMode\"\n [selectionEnabled]=\"selectionEnabled\"\n [globalFilterFields]=\"globalFilterFields\"\n [captionComponent]=\"captionComponent\"\n [columnCustomLastComponent]=\"columnActionComponent\"\n [columnLastMinWidth]=\"columnActionMinWidth\"\n (tableLoad)=\"loadEventEmitter.next($event)\"\n (cellClick)=\"onCellClick($event)\"\n (selectionChange)=\"onSelectionChange($event)\"\n (captionComponentInstance)=\"captionCmpInstEventEmitter.next($event)\"\n (columnCustomLastComponentInstance)=\"columnActionCmpInstEventEmitter.next($event)\">\n @if (!columnActionComponent && rowInlineActions().length > 0) {\n <ng-template mngTemplate=\"columnCustomLast\" let-item=\"rowItem\" let-idx=\"rowIndex\">\n @for (action of rowInlineActions(); track action.actionNameLong) {\n <mng-action\n [action]=\"action\"\n [item]=\"item\"\n [hostComponent]=\"this\"\n [itemId]=\"descriptor.model.idProperty ? item[descriptor.model.idProperty!] : null\"\n [actionData]=\"{itemIndex: idx}\"\n (finish)=\"onActionFinish($event)\">\n </mng-action>\n }\n </ng-template>\n }\n @if (captionTemplate() && !captionComponent) {\n <ng-template mngTemplate=\"caption\">\n <ng-container *ngTemplateOutlet=\"captionTemplate()\"></ng-container>\n </ng-template>\n }\n @if (rowExpandTemplate()) {\n <ng-template mngTemplate=\"rowExpandContent\" let-item=\"rowItem\">\n <ng-container *ngTemplateOutlet=\"rowExpandTemplate(); context: {rowItem: item}\"></ng-container>\n </ng-template>\n }\n @if (footerTemplate()) {\n <ng-template mngTemplate=\"footer\" let-data=\"data\" let-totalCount=\"totalCount\">\n <ng-container *ngTemplateOutlet=\"footerTemplate(); context: {data, totalCount}\"></ng-container>\n </ng-template>\n }\n</mng-table>\n", dependencies: [{ kind: "component", type: TableComponent, selector: "mng-table", inputs: ["descriptor", "items", "result", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "columnLastMinWidth", "captionComponent", "columnCustomLastComponent", "globalFilterFields"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnCustomLastComponentInstance"] }, { kind: "component", type: ActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "dataListParams", "dataProvider", "hostComponent", "route", "disabled", "loading", "selectedItems"], outputs: ["finish"] }, { kind: "directive", type: TemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3036
3018
  }
3037
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ActionTableComponent, decorators: [{
3019
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ActionTableComponent, decorators: [{
3038
3020
  type: Component,
3039
- args: [{ standalone: true, selector: 'mng-action-table', imports: [TableComponent, ActionComponent, TemplateDirective, NgTemplateOutlet], providers: [provideActionExecutor()], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-table\n [descriptor]=\"descriptor\"\n [items]=\"items\"\n [result]=\"result\"\n [loading]=\"loading\"\n [dataProvider]=\"dataProvider\"\n [useQueryParams]=\"useQueryParams\"\n [selectionMode]=\"selectionMode\"\n [selectionEnabled]=\"selectionEnabled\"\n [globalFilterFields]=\"globalFilterFields\"\n [captionComponent]=\"captionComponent\"\n [columnCustomLastComponent]=\"columnActionComponent\"\n [columnLastMinWidth]=\"columnActionMinWidth\"\n (tableLoad)=\"loadEventEmitter.next($event)\"\n (cellClick)=\"onCellClick($event)\"\n (selectionChange)=\"onSelectionChange($event)\"\n (captionComponentInstance)=\"captionCmpInstEventEmitter.next($event)\"\n (columnCustomLastComponentInstance)=\"columnActionCmpInstEventEmitter.next($event)\">\n @if (!columnActionComponent && rowInlineActions().length > 0) {\n <ng-template mngTemplate=\"columnCustomLast\" let-item=\"rowItem\" let-idx=\"rowIndex\">\n @for (action of rowInlineActions(); track action.actionNameLong) {\n <mng-action\n [action]=\"action\"\n [item]=\"item\"\n [hostComponent]=\"this\"\n [itemId]=\"descriptor.model.idProperty ? item[descriptor.model.idProperty!] : null\"\n [actionData]=\"{itemIndex: idx}\"\n (finish)=\"onActionFinish($event)\">\n </mng-action>\n }\n </ng-template>\n }\n @if (captionTemplate() && !captionComponent) {\n <ng-template mngTemplate=\"caption\">\n <ng-container *ngTemplateOutlet=\"captionTemplate()!\"></ng-container>\n </ng-template>\n }\n @if (footerTemplate()) {\n <ng-template mngTemplate=\"footer\" let-data=\"data\" let-totalCount=\"totalCount\">\n <ng-container *ngTemplateOutlet=\"footerTemplate()!; context: {data, totalCount}\"></ng-container>\n </ng-template>\n }\n</mng-table>\n" }]
3021
+ args: [{ standalone: true, selector: 'mng-action-table', imports: [TableComponent, ActionComponent, TemplateDirective, NgTemplateOutlet], providers: [provideActionExecutor()], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-table\n [descriptor]=\"descriptor\"\n [items]=\"items\"\n [result]=\"result\"\n [loading]=\"loading\"\n [dataProvider]=\"dataProvider\"\n [useQueryParams]=\"useQueryParams\"\n [selectionMode]=\"selectionMode\"\n [selectionEnabled]=\"selectionEnabled\"\n [globalFilterFields]=\"globalFilterFields\"\n [captionComponent]=\"captionComponent\"\n [columnCustomLastComponent]=\"columnActionComponent\"\n [columnLastMinWidth]=\"columnActionMinWidth\"\n (tableLoad)=\"loadEventEmitter.next($event)\"\n (cellClick)=\"onCellClick($event)\"\n (selectionChange)=\"onSelectionChange($event)\"\n (captionComponentInstance)=\"captionCmpInstEventEmitter.next($event)\"\n (columnCustomLastComponentInstance)=\"columnActionCmpInstEventEmitter.next($event)\">\n @if (!columnActionComponent && rowInlineActions().length > 0) {\n <ng-template mngTemplate=\"columnCustomLast\" let-item=\"rowItem\" let-idx=\"rowIndex\">\n @for (action of rowInlineActions(); track action.actionNameLong) {\n <mng-action\n [action]=\"action\"\n [item]=\"item\"\n [hostComponent]=\"this\"\n [itemId]=\"descriptor.model.idProperty ? item[descriptor.model.idProperty!] : null\"\n [actionData]=\"{itemIndex: idx}\"\n (finish)=\"onActionFinish($event)\">\n </mng-action>\n }\n </ng-template>\n }\n @if (captionTemplate() && !captionComponent) {\n <ng-template mngTemplate=\"caption\">\n <ng-container *ngTemplateOutlet=\"captionTemplate()\"></ng-container>\n </ng-template>\n }\n @if (rowExpandTemplate()) {\n <ng-template mngTemplate=\"rowExpandContent\" let-item=\"rowItem\">\n <ng-container *ngTemplateOutlet=\"rowExpandTemplate(); context: {rowItem: item}\"></ng-container>\n </ng-template>\n }\n @if (footerTemplate()) {\n <ng-template mngTemplate=\"footer\" let-data=\"data\" let-totalCount=\"totalCount\">\n <ng-container *ngTemplateOutlet=\"footerTemplate(); context: {data, totalCount}\"></ng-container>\n </ng-template>\n }\n</mng-table>\n" }]
3040
3022
  }], ctorParameters: () => [], propDecorators: { descriptor: [{
3041
3023
  type: Input,
3042
3024
  args: [{ required: true }]
@@ -3078,9 +3060,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImpor
3078
3060
  }], columnActionCmpInstEventEmitter: [{
3079
3061
  type: Output,
3080
3062
  args: ['columnActionComponentInstance']
3081
- }], templates: [{
3082
- type: ContentChildren,
3083
- args: [TemplateDirective]
3084
3063
  }], components: [{
3085
3064
  type: ViewChildren,
3086
3065
  args: [ComponentDirective]
@@ -3124,10 +3103,10 @@ class DefaultDataProviderExecutor extends DataProviderExecutor {
3124
3103
  runDelete(ctx, fallback) {
3125
3104
  return fallback ? runFnFromDataProviderOrFallback(ctx, runDeleteFromDataProvider, fallback) : runDeleteFromDataProvider(ctx);
3126
3105
  }
3127
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: DefaultDataProviderExecutor, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
3128
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: DefaultDataProviderExecutor }); }
3106
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: DefaultDataProviderExecutor, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
3107
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: DefaultDataProviderExecutor }); }
3129
3108
  }
3130
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: DefaultDataProviderExecutor, decorators: [{
3109
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: DefaultDataProviderExecutor, decorators: [{
3131
3110
  type: Injectable
3132
3111
  }] });
3133
3112
 
@@ -3169,10 +3148,10 @@ class FormlyFieldActionComponent extends FieldType {
3169
3148
  this.actionMessage = res.message;
3170
3149
  }
3171
3150
  }
3172
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FormlyFieldActionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3173
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.2.1", type: FormlyFieldActionComponent, isStandalone: true, selector: "mng-formly-field-action", usesInheritance: true, ngImport: i0, template: "<div class=\"flex\">\n <button\n type=\"button\"\n pButton\n pRipple\n [icon]=\"$any(descriptor.button.icon)\"\n [label]=\"$any(descriptor.button.label === null ? null : descriptor.button.label ?? props!.label) | translate\"\n [pTooltip]=\"$any(descriptor.button.tooltip) | translate\"\n [disabled]=\"formControl.disabled\"\n (click)=\"onClick()\"\n [class]=\"buttonClass + (actionMessage ? ' mr-2' : '')\"></button>\n @if (actionMessage) {\n <p-message [text]=\"actionMessage.content\" [severity]=\"actionMessage.severity ?? 'success'\"></p-message>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i4.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i7.Ripple, selector: "[pRipple]" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i8.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "ngmodule", type: MessageModule }, { kind: "component", type: i5.UIMessage, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3151
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldActionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3152
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", type: FormlyFieldActionComponent, isStandalone: true, selector: "mng-formly-field-action", usesInheritance: true, ngImport: i0, template: "<div class=\"flex\">\n <button\n type=\"button\"\n pButton\n pRipple\n [icon]=\"$any(descriptor.button.icon)\"\n [label]=\"$any(descriptor.button.label === null ? null : descriptor.button.label ?? props!.label) | translate\"\n [pTooltip]=\"$any(descriptor.button.tooltip) | translate\"\n [disabled]=\"formControl.disabled\"\n (click)=\"onClick()\"\n [class]=\"buttonClass + (actionMessage ? ' mr-2' : '')\"></button>\n @if (actionMessage) {\n <p-message [text]=\"actionMessage.content\" [severity]=\"actionMessage.severity ?? 'success'\"></p-message>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i4.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i7.Ripple, selector: "[pRipple]" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i8.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "ngmodule", type: MessageModule }, { kind: "component", type: i5.UIMessage, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3174
3153
  }
3175
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FormlyFieldActionComponent, decorators: [{
3154
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldActionComponent, decorators: [{
3176
3155
  type: Component,
3177
3156
  args: [{ standalone: true, selector: 'mng-formly-field-action', imports: [ButtonModule, RippleModule, TranslateModule, TooltipModule, JsonPipe, MessageModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex\">\n <button\n type=\"button\"\n pButton\n pRipple\n [icon]=\"$any(descriptor.button.icon)\"\n [label]=\"$any(descriptor.button.label === null ? null : descriptor.button.label ?? props!.label) | translate\"\n [pTooltip]=\"$any(descriptor.button.tooltip) | translate\"\n [disabled]=\"formControl.disabled\"\n (click)=\"onClick()\"\n [class]=\"buttonClass + (actionMessage ? ' mr-2' : '')\"></button>\n @if (actionMessage) {\n <p-message [text]=\"actionMessage.content\" [severity]=\"actionMessage.severity ?? 'success'\"></p-message>\n }\n</div>\n" }]
3178
3157
  }] });
@@ -3194,9 +3173,7 @@ class FormlyFieldAutocompleteComponent extends FieldType {
3194
3173
  this.descriptor.nextEvent(FormFieldEventTypeEnum.ValueChange, FormlyFieldAutocompleteComponent, this, {
3195
3174
  value: v
3196
3175
  });
3197
- if (this.props['onValueChange']) {
3198
- this.props['onValueChange'](this.field, v);
3199
- }
3176
+ this.props.onValueChange?.(this.field, v);
3200
3177
  });
3201
3178
  this.subscriptions.push(subscription);
3202
3179
  }
@@ -3213,10 +3190,10 @@ class FormlyFieldAutocompleteComponent extends FieldType {
3213
3190
  eventSubtype: FormFieldEventComponentSubtype.ON_DESTROY
3214
3191
  });
3215
3192
  }
3216
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FormlyFieldAutocompleteComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3217
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.1", type: FormlyFieldAutocompleteComponent, isStandalone: true, selector: "mng-formly-field-autocomplete", usesInheritance: true, ngImport: i0, template: "<mng-autocomplete\n [id]=\"$any(key)\"\n [formControl]=\"aFormControl\"\n [formlyAttributes]=\"field\"\n [dataProvider]=\"descriptor.dataProvider\"\n [optionsTrackProperty]=\"descriptor.optionsTrackProperty\"\n [optionsLabelProperty]=\"descriptor.optionsLabelProperty\"\n [optionsValueProperty]=\"descriptor.optionsValueProperty\"\n [className]=\"descriptor.inputClassName\"\n [showClear]=\"!props.required\"\n [selectFirst]=\"descriptor.autocompleteSelectFirst ?? false\"\n [autoClear]=\"descriptor.autocompleteAutoClear ?? false\"\n [openOnFocus]=\"descriptor.autocompleteAutoClear ?? true\"\n [inlineSearch]=\"descriptor.autocompleteInlineSearch ?? false\">\n</mng-autocomplete>\n", dependencies: [{ kind: "component", type: AutocompleteComponent, selector: "mng-autocomplete", inputs: ["dataProvider", "optionsTrackProperty", "optionsValueProperty", "optionsLabelProperty", "optionsLabelTranslate", "inlineSearch", "openOnFocus", "multiselect", "placeholder", "className", "dropdownClassName", "showClear", "autoClear", "selectFirst", "searchTrim"], outputs: ["valueChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i2$2.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3193
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldAutocompleteComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3194
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: FormlyFieldAutocompleteComponent, isStandalone: true, selector: "mng-formly-field-autocomplete", usesInheritance: true, ngImport: i0, template: "<mng-autocomplete\n [id]=\"$any(key)\"\n [formControl]=\"aFormControl\"\n [formlyAttributes]=\"field\"\n [dataProvider]=\"descriptor.dataProvider\"\n [optionsTrackProperty]=\"descriptor.optionsTrackProperty\"\n [optionsLabelProperty]=\"descriptor.optionsLabelProperty\"\n [optionsValueProperty]=\"descriptor.optionsValueProperty\"\n [className]=\"descriptor.inputClassName\"\n [showClear]=\"!props.required\"\n [selectFirst]=\"descriptor.autocompleteSelectFirst ?? false\"\n [autoClear]=\"descriptor.autocompleteAutoClear ?? false\"\n [openOnFocus]=\"descriptor.autocompleteAutoClear ?? true\"\n [inlineSearch]=\"descriptor.autocompleteInlineSearch ?? false\">\n</mng-autocomplete>\n", dependencies: [{ kind: "component", type: AutocompleteComponent, selector: "mng-autocomplete", inputs: ["dataProvider", "optionsTrackProperty", "optionsValueProperty", "optionsLabelProperty", "optionsLabelTranslate", "inlineSearch", "openOnFocus", "multiselect", "placeholder", "className", "dropdownClassName", "showClear", "autoClear", "selectFirst", "searchTrim"], outputs: ["valueChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i2$1.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3218
3195
  }
3219
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FormlyFieldAutocompleteComponent, decorators: [{
3196
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldAutocompleteComponent, decorators: [{
3220
3197
  type: Component,
3221
3198
  args: [{ standalone: true, selector: 'mng-formly-field-autocomplete', imports: [AutocompleteComponent, ReactiveFormsModule, FormlyModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-autocomplete\n [id]=\"$any(key)\"\n [formControl]=\"aFormControl\"\n [formlyAttributes]=\"field\"\n [dataProvider]=\"descriptor.dataProvider\"\n [optionsTrackProperty]=\"descriptor.optionsTrackProperty\"\n [optionsLabelProperty]=\"descriptor.optionsLabelProperty\"\n [optionsValueProperty]=\"descriptor.optionsValueProperty\"\n [className]=\"descriptor.inputClassName\"\n [showClear]=\"!props.required\"\n [selectFirst]=\"descriptor.autocompleteSelectFirst ?? false\"\n [autoClear]=\"descriptor.autocompleteAutoClear ?? false\"\n [openOnFocus]=\"descriptor.autocompleteAutoClear ?? true\"\n [inlineSearch]=\"descriptor.autocompleteInlineSearch ?? false\">\n</mng-autocomplete>\n" }]
3222
3199
  }] });
@@ -3242,10 +3219,10 @@ class FormlyFieldCustomComponent extends FieldType {
3242
3219
  ...this.descriptor.customComponentInputs
3243
3220
  };
3244
3221
  }
3245
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FormlyFieldCustomComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3246
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.1", type: FormlyFieldCustomComponent, isStandalone: true, selector: "mng-formly-field-custom", usesInheritance: true, ngImport: i0, template: ` <ng-container [mngComponent]="descriptor.customComponentType!" [inputs]="inputs"></ng-container> `, isInline: true, dependencies: [{ kind: "directive", type: ComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "injectionToken", "inputs", "attachToHost", "nodeInjector"], outputs: ["instanceCreated"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3222
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldCustomComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3223
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: FormlyFieldCustomComponent, isStandalone: true, selector: "mng-formly-field-custom", usesInheritance: true, ngImport: i0, template: ` <ng-container [mngComponent]="descriptor.customComponentType!" [inputs]="inputs"></ng-container> `, isInline: true, dependencies: [{ kind: "directive", type: ComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "injectionToken", "inputs", "attachToHost", "nodeInjector"], outputs: ["instanceCreated"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3247
3224
  }
3248
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FormlyFieldCustomComponent, decorators: [{
3225
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldCustomComponent, decorators: [{
3249
3226
  type: Component,
3250
3227
  args: [{
3251
3228
  standalone: true,
@@ -3273,9 +3250,7 @@ class FormlyFieldDropdownComponent extends FieldType {
3273
3250
  this.descriptor.nextEvent(FormFieldEventTypeEnum.ValueChange, FormlyFieldDropdownComponent, this, {
3274
3251
  value: v
3275
3252
  });
3276
- if (this.props['onValueChange']) {
3277
- this.props['onValueChange'](this.field, v);
3278
- }
3253
+ this.props.onValueChange?.(this.field, v);
3279
3254
  });
3280
3255
  this.subscriptions.push(subscription);
3281
3256
  }
@@ -3287,10 +3262,10 @@ class FormlyFieldDropdownComponent extends FieldType {
3287
3262
  eventSubtype: FormFieldEventComponentSubtype.ON_DESTROY
3288
3263
  });
3289
3264
  }
3290
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FormlyFieldDropdownComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3291
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.1", type: FormlyFieldDropdownComponent, isStandalone: true, selector: "mng-formly-field-dropdown", usesInheritance: true, ngImport: i0, template: "<mng-dropdown\n [id]=\"$any(key)\"\n [formControl]=\"dFormControl\"\n [formlyAttributes]=\"field\"\n [placeholder]=\"descriptor.placeholder\"\n [dataProvider]=\"descriptor.dataProvider\"\n [optionsLabelProperty]=\"descriptor.optionsLabelProperty\"\n [optionsLabelTranslate]=\"descriptor.optionsLabelTranslate\"\n [optionsValueProperty]=\"descriptor.optionsValueProperty\"\n [optionsDisabledProperty]=\"descriptor.optionsDisabledProperty\"\n [optionsTrackProperty]=\"descriptor.optionsTrackProperty\"\n [showClear]=\"!props.required\"\n [className]=\"descriptor.inputClassName\">\n</mng-dropdown>\n", dependencies: [{ kind: "component", type: DropdownComponent, selector: "mng-dropdown", inputs: ["dataProvider", "options", "optionsTrackProperty", "optionsLabelProperty", "optionsLabelTranslate", "optionsValueProperty", "optionsDisabledProperty", "multiselect", "placeholder", "showClear", "selectFirstItem", "className", "dropdownClassName", "changeValueOnBlur"], outputs: ["valueChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i2$2.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3265
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldDropdownComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3266
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: FormlyFieldDropdownComponent, isStandalone: true, selector: "mng-formly-field-dropdown", usesInheritance: true, ngImport: i0, template: "<mng-dropdown\n [id]=\"$any(key)\"\n [formControl]=\"dFormControl\"\n [formlyAttributes]=\"field\"\n [placeholder]=\"descriptor.placeholder\"\n [dataProvider]=\"descriptor.dataProvider\"\n [optionsLabelProperty]=\"descriptor.optionsLabelProperty\"\n [optionsLabelTranslate]=\"descriptor.optionsLabelTranslate\"\n [optionsValueProperty]=\"descriptor.optionsValueProperty\"\n [optionsDisabledProperty]=\"descriptor.optionsDisabledProperty\"\n [optionsTrackProperty]=\"descriptor.optionsTrackProperty\"\n [showClear]=\"!props.required\"\n [className]=\"descriptor.inputClassName\">\n</mng-dropdown>\n", dependencies: [{ kind: "component", type: DropdownComponent, selector: "mng-dropdown", inputs: ["dataProvider", "options", "optionsTrackProperty", "optionsLabelProperty", "optionsLabelTranslate", "optionsValueProperty", "optionsDisabledProperty", "multiselect", "placeholder", "showClear", "selectFirstItem", "className", "dropdownClassName", "changeValueOnBlur"], outputs: ["valueChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i2$1.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3292
3267
  }
3293
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FormlyFieldDropdownComponent, decorators: [{
3268
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldDropdownComponent, decorators: [{
3294
3269
  type: Component,
3295
3270
  args: [{ standalone: true, selector: 'mng-formly-field-dropdown', imports: [DropdownComponent, ReactiveFormsModule, FormlyModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-dropdown\n [id]=\"$any(key)\"\n [formControl]=\"dFormControl\"\n [formlyAttributes]=\"field\"\n [placeholder]=\"descriptor.placeholder\"\n [dataProvider]=\"descriptor.dataProvider\"\n [optionsLabelProperty]=\"descriptor.optionsLabelProperty\"\n [optionsLabelTranslate]=\"descriptor.optionsLabelTranslate\"\n [optionsValueProperty]=\"descriptor.optionsValueProperty\"\n [optionsDisabledProperty]=\"descriptor.optionsDisabledProperty\"\n [optionsTrackProperty]=\"descriptor.optionsTrackProperty\"\n [showClear]=\"!props.required\"\n [className]=\"descriptor.inputClassName\">\n</mng-dropdown>\n" }]
3296
3271
  }] });
@@ -3305,43 +3280,42 @@ class FormlyFieldFieldsetComponent extends FieldType {
3305
3280
  this.descriptor = this.props.descriptor;
3306
3281
  this.props.fieldComponent = this;
3307
3282
  }
3308
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FormlyFieldFieldsetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3309
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.2.1", type: FormlyFieldFieldsetComponent, isStandalone: true, selector: "mng-formly-field-fieldset", usesInheritance: true, ngImport: i0, template: "@for (group of field.fieldGroup; track group) {\n @switch (group?.props?.['descriptor']?.type) {\n @case (typeFieldset) {\n <p-fieldset [legend]=\"group.props?.label! | translate\">\n <formly-field [field]=\"group\"></formly-field>\n </p-fieldset>\n }\n @default {\n <formly-field [field]=\"group\"></formly-field>\n }\n }\n}\n", dependencies: [{ kind: "ngmodule", type: FieldsetModule }, { kind: "component", type: i1$4.Fieldset, selector: "p-fieldset", inputs: ["legend", "toggleable", "collapsed", "style", "styleClass", "transitionOptions"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i2$2.FormlyField, selector: "formly-field", inputs: ["field"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3283
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldFieldsetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3284
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", type: FormlyFieldFieldsetComponent, isStandalone: true, selector: "mng-formly-field-fieldset", usesInheritance: true, ngImport: i0, template: "@for (group of field.fieldGroup; track group) {\n @switch (group?.props?.['descriptor']?.type) {\n @case (typeFieldset) {\n <p-fieldset [legend]=\"group.props?.label! | translate\">\n <formly-field [field]=\"group\"></formly-field>\n </p-fieldset>\n }\n @default {\n <formly-field [field]=\"group\"></formly-field>\n }\n }\n}\n", dependencies: [{ kind: "ngmodule", type: FieldsetModule }, { kind: "component", type: i1$4.Fieldset, selector: "p-fieldset", inputs: ["legend", "toggleable", "collapsed", "style", "styleClass", "transitionOptions"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i2$1.FormlyField, selector: "formly-field", inputs: ["field"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3310
3285
  }
3311
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FormlyFieldFieldsetComponent, decorators: [{
3286
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldFieldsetComponent, decorators: [{
3312
3287
  type: Component,
3313
3288
  args: [{ standalone: true, selector: 'mng-formly-field-fieldset', imports: [FieldsetModule, FormlyModule, TranslateModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "@for (group of field.fieldGroup; track group) {\n @switch (group?.props?.['descriptor']?.type) {\n @case (typeFieldset) {\n <p-fieldset [legend]=\"group.props?.label! | translate\">\n <formly-field [field]=\"group\"></formly-field>\n </p-fieldset>\n }\n @default {\n <formly-field [field]=\"group\"></formly-field>\n }\n }\n}\n" }]
3314
3289
  }] });
3315
3290
 
3316
3291
  class FormlyFieldInputComponent extends FieldType {
3317
- constructor(applicationLocale, formBuilder, translateService) {
3318
- super();
3319
- this.applicationLocale = applicationLocale;
3320
- this.formBuilder = formBuilder;
3321
- this.translateService = translateService;
3292
+ constructor() {
3293
+ super(...arguments);
3322
3294
  this.NUMBER_MIN_SAFE = Number.MIN_SAFE_INTEGER;
3323
3295
  this.NUMBER_MAX_SAFE = Number.MAX_SAFE_INTEGER;
3324
3296
  this.DESC_INPUT_TYPE_IMAGE_FILE = FieldInputTypeEnum.ImageFile;
3297
+ this.applicationLocale = inject(LOCALE_ID);
3298
+ this.destroyRef = inject(DestroyRef);
3299
+ this.formBuilder = inject(FormBuilder);
3300
+ this.translateService = inject(TranslateService);
3325
3301
  this.numberFieldMode = 'decimal';
3326
3302
  this.files = [];
3327
- this.subscriptions = [];
3303
+ this.imageFormArray = this.formBuilder.array([]);
3328
3304
  }
3329
3305
  ngOnInit() {
3330
3306
  this.iFormControl = this.formControl;
3331
3307
  this.descriptor = this.props.descriptor;
3332
3308
  this.props.fieldComponent = this;
3333
3309
  this.formEditorComponent = this.props.formEditorComponent;
3334
- this.imageFormArray = this.formBuilder.array([]);
3335
3310
  if (this.descriptor.fieldType === FieldInputTypeEnum.Currency) {
3336
3311
  this.numberFieldMode = 'currency';
3337
3312
  if (this.descriptor.currencyFromProperty) {
3338
- const currencyFromPropSubscription = this.iFormControl
3313
+ this.iFormControl
3339
3314
  .get(this.descriptor.currencyFromProperty)
3340
- .valueChanges.pipe(startWith(this.model[this.descriptor.currencyFromProperty]), distinctUntilChanged())
3315
+ .valueChanges.pipe(takeUntilDestroyed(this.destroyRef), startWith(this.model[this.descriptor.currencyFromProperty]), distinctUntilChanged())
3341
3316
  .subscribe(c => {
3342
3317
  this.currency = c;
3343
3318
  });
3344
- this.subscriptions.push(currencyFromPropSubscription);
3345
3319
  }
3346
3320
  else {
3347
3321
  this.currency = this.descriptor.currency ?? 'EUR';
@@ -3351,21 +3325,12 @@ class FormlyFieldInputComponent extends FieldType {
3351
3325
  this.descriptor.nextEvent(FormFieldEventTypeEnum.ComponentLifecycle, FormlyFieldInputComponent, this, {
3352
3326
  eventSubtype: FormFieldEventComponentSubtype.ON_INIT
3353
3327
  });
3354
- // init values
3355
- if (this.props.type === 'datepicker' && typeof this.iFormControl.value === 'string') {
3356
- const dateObject = new Date(this.iFormControl.value);
3357
- this.iFormControl.setValue(dateObject);
3358
- this.iFormControl.markAsPristine();
3359
- }
3360
- const subscription = this.formControl.valueChanges.pipe(startWith(this.formControl.value), distinctUntilChanged()).subscribe(v => {
3328
+ this.formControl.valueChanges.pipe(takeUntilDestroyed(this.destroyRef), startWith(this.formControl.value), distinctUntilChanged()).subscribe(v => {
3361
3329
  this.descriptor.nextEvent(FormFieldEventTypeEnum.ValueChange, FormlyFieldInputComponent, this, {
3362
3330
  value: v
3363
3331
  });
3364
- if (this.props['onValueChange']) {
3365
- this.props['onValueChange'](this.field, v);
3366
- }
3332
+ this.props.onValueChange?.(this.field, v);
3367
3333
  });
3368
- this.subscriptions.push(subscription);
3369
3334
  if (this.props.type === 'imageUrl') {
3370
3335
  const startValue = this.iFormControl.value;
3371
3336
  if (this.descriptor.fileMultiple) {
@@ -3387,17 +3352,15 @@ class FormlyFieldInputComponent extends FieldType {
3387
3352
  this.addImageUrl();
3388
3353
  }
3389
3354
  }
3390
- const subscription = this.imageFormArray.valueChanges.pipe(distinctUntilChanged()).subscribe(v => {
3355
+ this.imageFormArray.valueChanges.pipe(takeUntilDestroyed(this.destroyRef), distinctUntilChanged()).subscribe(v => {
3391
3356
  const fcv = v.filter((i) => !!i && typeof i === 'string' && i.length > 0);
3392
3357
  this.iFormControl.setValue(fcv.length > 0 ? (this.descriptor.fileMultiple ? fcv : fcv[0]) : undefined);
3393
3358
  this.iFormControl.updateValueAndValidity();
3394
3359
  });
3395
- this.subscriptions.push(subscription);
3396
3360
  }
3397
3361
  }
3398
3362
  ngOnDestroy() {
3399
3363
  // warning: formly calls on destroy before on init
3400
- this.subscriptions.forEach(s => s.unsubscribe());
3401
3364
  // emit lifecycle event
3402
3365
  this.descriptor?.nextEvent(FormFieldEventTypeEnum.ComponentLifecycle, FormlyFieldInputComponent, this, {
3403
3366
  eventSubtype: FormFieldEventComponentSubtype.ON_DESTROY
@@ -3435,7 +3398,7 @@ class FormlyFieldInputComponent extends FieldType {
3435
3398
  onImageUrlLoadError() {
3436
3399
  if (this.formEditorComponent) {
3437
3400
  const message = getFormEditorWarningMessage(this.translateService, 'general.error', 'mngEditor.imageLoadError');
3438
- this.formEditorComponent.formMessages = [...this.formEditorComponent.formMessages, message];
3401
+ this.formEditorComponent.formMessages.set([...this.formEditorComponent.formMessages(), message]);
3439
3402
  }
3440
3403
  }
3441
3404
  updateFileFormControl() {
@@ -3470,10 +3433,10 @@ class FormlyFieldInputComponent extends FieldType {
3470
3433
  return 'pi-file';
3471
3434
  }
3472
3435
  }
3473
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FormlyFieldInputComponent, deps: [{ token: LOCALE_ID }, { token: i1$2.FormBuilder }, { token: i2$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
3474
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.2.1", type: FormlyFieldInputComponent, isStandalone: true, selector: "mng-formly-field-input", usesInheritance: true, ngImport: i0, template: "@switch (props.type) {\n @case ('number') {\n <p-inputNumber\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [min]=\"descriptor.numberAutoCorrect ? descriptor.numberMin ?? NUMBER_MIN_SAFE : undefined\"\n [max]=\"descriptor.numberAutoCorrect ? descriptor.numberMax ?? NUMBER_MAX_SAFE : undefined\"\n [step]=\"$any(descriptor.numberStep)\"\n [useGrouping]=\"descriptor.numberUseGrouping\"\n [minFractionDigits]=\"descriptor.numberMinFractionDigits || 0\"\n [maxFractionDigits]=\"descriptor.numberMaxFractionDigits || 0\"\n [inputStyleClass]=\"descriptor.inputClassName\"\n [locale]=\"descriptor.locale ?? applicationLocale\"\n [mode]=\"numberFieldMode\"\n [currency]=\"currency\"\n [currencyDisplay]=\"descriptor.currencyDisplay\">\n </p-inputNumber>\n }\n\n @case ('switch') {\n <div class=\"field flex flex-column\">\n <label [for]=\"key\" [class]=\"descriptor.labelClassName\"\n >{{ props.label! | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n <p-inputSwitch [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [styleClass]=\"descriptor.inputClassName\"></p-inputSwitch>\n @if (showError) {\n <small class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n }\n </div>\n }\n @case ('radio') {\n @for (option of descriptor.radioOptions; track option) {\n <div [id]=\"$any(key)\" class=\"field-radiobutton\">\n <p-radioButton\n [name]=\"$any(key)\"\n [value]=\"option.value\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [styleClass]=\"descriptor.inputClassName\"></p-radioButton>\n <label [for]=\"option.value\" [class]=\"'mng-radio-button-label ' + descriptor.labelClassName\">{{ option.title | translate }}</label>\n </div>\n }\n }\n @case ('textarea') {\n <textarea [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [rows]=\"descriptor.rows ?? 3\" pInputTextarea [class]=\"descriptor.inputClassName\">\n </textarea>\n }\n @case ('datepicker') {\n <p-calendar\n appendTo=\"body\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [dateFormat]=\"descriptor.datePickerFormat ?? 'dd.mm.yy'\"\n [minDate]=\"$any(descriptor.datePickerMin)\"\n [maxDate]=\"$any(descriptor.datePickerMax)\"\n [showTime]=\"descriptor.datePickerShowTime ?? false\"\n [showSeconds]=\"descriptor.datePickerShowSeconds ?? false\"\n [showIcon]=\"true\"\n [inputStyleClass]=\"descriptor.inputClassName\"\n [firstDayOfWeek]=\"1\">\n </p-calendar>\n }\n @case ('mask') {\n <p-inputMask\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [mask]=\"descriptor.mask\"\n [placeholder]=\"descriptor.placeholder\"\n [slotChar]=\"$any(descriptor.slotChar)\"\n [styleClass]=\"descriptor.inputClassName\">\n </p-inputMask>\n }\n @case ('file') {\n <p-fileUpload\n #fileUploadInput\n [disabled]=\"iFormControl.disabled\"\n [multiple]=\"descriptor.fileMultiple ?? false\"\n [accept]=\"descriptor.fileAccept ?? (descriptor.fieldType === DESC_INPUT_TYPE_IMAGE_FILE ? 'image/*' : undefined)\"\n [maxFileSize]=\"descriptor.fileMaxFileSize ?? 500000\"\n [showUploadButton]=\"false\"\n (onSelect)=\"onFileSelect($event)\"\n (onRemove)=\"onFileRemove($event)\"\n (onClear)=\"onFileClear($event)\">\n <ng-template let-file let-idx=\"index\" pTemplate=\"file\">\n <div class=\"p-fileupload-row\">\n <div>\n @if (fileUploadInput.isImage(file)) {\n @if (isFileImageSvg(file)) {\n <span class=\"flex align-items-center justify-content-center\">\n <i class=\"pi pi-image text-2xl\"></i>\n </span>\n } @else {\n <img [src]=\"file.objectURL\" [width]=\"fileUploadInput.previewWidth\" (error)=\"fileUploadInput.imageError($event)\" />\n }\n } @else {\n <span class=\"flex align-items-center justify-content-center\">\n <i [class]=\"'pi ' + getFileDocumentTypeIcon(file) + ' text-2xl'\"></i>\n </span>\n }\n </div>\n <div class=\"p-fileupload-filename\">{{ file.name }}</div>\n <div>{{ fileUploadInput.formatSize(file.size) }}</div>\n <div>\n <button\n type=\"button\"\n pButton\n (click)=\"fileUploadInput.remove($event, idx)\"\n [disabled]=\"fileUploadInput.uploading\"\n class=\"p-button-icon-only\"\n [class]=\"fileUploadInput.removeStyleClass\">\n @if (!fileUploadInput.cancelIconTemplate) {\n <TimesIcon />\n }\n </button>\n </div>\n </div>\n </ng-template>\n <ng-template pTemplate=\"content\" let-files>\n @if (files.length === 0) {\n <div class=\"text-gray-300 dropdown-area\">\n <span><i class=\"pi pi-file-import mr-2\"></i>{{ 'fileUpload.dragAndDrop' | translate }}</span>\n </div>\n }\n </ng-template>\n </p-fileUpload>\n }\n @case ('imageUrl') {\n <div>\n @if (descriptor.imagePreview) {\n <div class=\"flex flex-wrap justify-content-start\">\n @for (image of imageFormArray.controls; track image; let idx = $index) {\n @if (imageFormArray.at(idx).valid && imageFormArray.at(idx).value) {\n <p-image [src]=\"imageFormArray.at(idx).value\" [preview]=\"true\" (onImageError)=\"onImageUrlLoadError()\" styleClass=\"mng-image m-2\"></p-image>\n } @else {\n <span class=\"mng-image m-2 p-image-preview-container no-image\">\n <div class=\"p-image-preview-indicator\">\n <i class=\"p-image-preview-icon pi pi-ban\"></i>\n </div>\n </span>\n }\n }\n </div>\n }\n @if (!descriptor.imagePreview || descriptor.imageUrlInputVisibleOnDisabled || !iFormControl.disabled) {\n @for (imageCtrlName of imageFormArray.controls; track imageCtrlName; let idx = $index) {\n <div class=\"p-inputgroup mt-1\">\n <input\n pInputText\n [placeholder]=\"'mngEditor.imageUrlPlaceholder' | translate\"\n [id]=\"$any(key)\"\n type=\"text\"\n [formControl]=\"$any(imageFormArray.at(idx))\"\n [formlyAttributes]=\"field\" />\n @if (descriptor.fileMultiple && !iFormControl.disabled) {\n <button type=\"button\" pButton pRipple icon=\"pi pi-minus\" (click)=\"removeImageUrlAt(idx)\"></button>\n }\n </div>\n }\n @if (descriptor.fileMultiple && !iFormControl.disabled) {\n <button\n type=\"button\"\n pButton\n pRipple\n icon=\"pi pi-plus\"\n class=\"p-button-primary w-auto mt-1\"\n [label]=\"'mngEditor.imageUrlAdd' | translate\"\n (click)=\"addImageUrl()\"></button>\n }\n }\n </div>\n }\n @default {\n <input pInputText [id]=\"$any(key)\" [type]=\"props.type || 'text'\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [mngInputTrim]=\"descriptor.trimOption\" />\n }\n}\n", dependencies: [{ kind: "ngmodule", type: InputNumberModule }, { kind: "component", type: i3$1.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabelledBy", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "directive", type: i2$4.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i2$2.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "component", type: i2$2.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: InputSwitchModule }, { kind: "component", type: i6.InputSwitch, selector: "p-inputSwitch", inputs: ["style", "styleClass", "tabindex", "inputId", "name", "disabled", "readonly", "trueValue", "falseValue", "ariaLabel", "ariaLabelledBy"], outputs: ["onChange"] }, { kind: "ngmodule", type: RadioButtonModule }, { kind: "component", type: i7$1.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: CalendarModule }, { kind: "component", type: i8$1.Calendar, selector: "p-calendar", inputs: ["iconDisplay", "style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale", "view", "defaultDate"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "directive", type: i4.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "ngmodule", type: InputMaskModule }, { kind: "component", type: i10$1.InputMask, selector: "p-inputMask", inputs: ["type", "slotChar", "autoClear", "showClear", "style", "inputId", "styleClass", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaLabelledBy", "ariaRequired", "disabled", "readonly", "unmask", "name", "required", "characterPattern", "autoFocus", "autocomplete", "keepBuffer", "mask"], outputs: ["onComplete", "onFocus", "onBlur", "onInput", "onKeydown", "onClear"] }, { kind: "ngmodule", type: FileUploadModule }, { kind: "component", type: i11.FileUpload, selector: "p-fileUpload", inputs: ["name", "url", "method", "multiple", "accept", "disabled", "auto", "withCredentials", "maxFileSize", "invalidFileSizeMessageSummary", "invalidFileSizeMessageDetail", "invalidFileTypeMessageSummary", "invalidFileTypeMessageDetail", "invalidFileLimitMessageDetail", "invalidFileLimitMessageSummary", "style", "styleClass", "previewWidth", "chooseLabel", "uploadLabel", "cancelLabel", "chooseIcon", "uploadIcon", "cancelIcon", "showUploadButton", "showCancelButton", "mode", "headers", "customUpload", "fileLimit", "uploadStyleClass", "cancelStyleClass", "removeStyleClass", "chooseStyleClass", "files"], outputs: ["onBeforeUpload", "onSend", "onUpload", "onError", "onClear", "onRemove", "onSelect", "onProgress", "uploadHandler", "onImageError"] }, { kind: "ngmodule", type: ImageModule }, { kind: "component", type: i12.Image, selector: "p-image", inputs: ["imageClass", "imageStyle", "styleClass", "style", "src", "srcSet", "sizes", "previewImageSrc", "previewImageSrcSet", "previewImageSizes", "alt", "width", "height", "loading", "appendTo", "preview", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide", "onImageError"] }, { kind: "ngmodule", type: InputTextareaModule }, { kind: "directive", type: i13.InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize"], outputs: ["onResize"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i14.InputText, selector: "[pInputText]" }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i7.Ripple, selector: "[pRipple]" }, { kind: "component", type: TimesIcon, selector: "TimesIcon" }, { kind: "directive", type: InputTrimDirective, selector: "[mngInputTrim]", inputs: ["mngInputTrim"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3436
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3437
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", type: FormlyFieldInputComponent, isStandalone: true, selector: "mng-formly-field-input", usesInheritance: true, ngImport: i0, template: "@switch (props.type) {\n @case ('number') {\n <p-inputNumber\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [min]=\"descriptor.numberAutoCorrect ? descriptor.numberMin ?? NUMBER_MIN_SAFE : undefined\"\n [max]=\"descriptor.numberAutoCorrect ? descriptor.numberMax ?? NUMBER_MAX_SAFE : undefined\"\n [step]=\"$any(descriptor.numberStep)\"\n [useGrouping]=\"descriptor.numberUseGrouping\"\n [minFractionDigits]=\"descriptor.numberMinFractionDigits || 0\"\n [maxFractionDigits]=\"descriptor.numberMaxFractionDigits || 0\"\n [inputStyleClass]=\"descriptor.inputClassName\"\n [locale]=\"descriptor.locale ?? applicationLocale\"\n [mode]=\"numberFieldMode\"\n [currency]=\"currency\"\n [currencyDisplay]=\"descriptor.currencyDisplay\">\n </p-inputNumber>\n }\n\n @case ('switch') {\n <div class=\"field flex flex-column\">\n <label [for]=\"key\" [class]=\"descriptor.labelClassName\"\n >{{ props.label! | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n <p-inputSwitch [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [styleClass]=\"descriptor.inputClassName\"></p-inputSwitch>\n @if (showError) {\n <small class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n }\n </div>\n }\n @case ('radio') {\n @for (option of descriptor.radioOptions; track option) {\n <div [id]=\"key\" class=\"field-radiobutton\">\n <p-radioButton\n [name]=\"$any(key)\"\n [value]=\"option.value\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [styleClass]=\"descriptor.inputClassName\"></p-radioButton>\n <label [for]=\"option.value\" [class]=\"'mng-radio-button-label ' + descriptor.labelClassName\">{{ option.title | translate }}</label>\n </div>\n }\n }\n @case ('textarea') {\n <textarea [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [rows]=\"descriptor.rows ?? 3\" pInputTextarea [class]=\"descriptor.inputClassName\">\n </textarea>\n }\n @case ('mask') {\n <p-inputMask\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [mask]=\"descriptor.mask\"\n [placeholder]=\"descriptor.placeholder\"\n [slotChar]=\"$any(descriptor.slotChar)\"\n [styleClass]=\"descriptor.inputClassName\">\n </p-inputMask>\n }\n @case ('file') {\n <p-fileUpload\n #fileUploadInput\n [id]=\"$any(key)\"\n [disabled]=\"iFormControl.disabled\"\n [multiple]=\"descriptor.fileMultiple ?? false\"\n [accept]=\"descriptor.fileAccept ?? (descriptor.fieldType === DESC_INPUT_TYPE_IMAGE_FILE ? 'image/*' : undefined)\"\n [maxFileSize]=\"descriptor.fileMaxFileSize ?? 500000\"\n [showUploadButton]=\"false\"\n (onSelect)=\"onFileSelect($event)\"\n (onRemove)=\"onFileRemove($event)\"\n (onClear)=\"onFileClear($event)\">\n <ng-template let-file let-idx=\"index\" pTemplate=\"file\">\n <div class=\"p-fileupload-row\">\n <div>\n @if (fileUploadInput.isImage(file)) {\n @if (isFileImageSvg(file)) {\n <span class=\"flex align-items-center justify-content-center\">\n <i class=\"pi pi-image text-2xl\"></i>\n </span>\n } @else {\n <img [src]=\"file.objectURL\" [width]=\"fileUploadInput.previewWidth\" (error)=\"fileUploadInput.imageError($event)\" />\n }\n } @else {\n <span class=\"flex align-items-center justify-content-center\">\n <i [class]=\"'pi ' + getFileDocumentTypeIcon(file) + ' text-2xl'\"></i>\n </span>\n }\n </div>\n <div class=\"p-fileupload-filename\">{{ file.name }}</div>\n <div>{{ fileUploadInput.formatSize(file.size) }}</div>\n <div>\n <button\n type=\"button\"\n pButton\n (click)=\"fileUploadInput.remove($event, idx)\"\n [disabled]=\"fileUploadInput.uploading\"\n class=\"p-button-icon-only\"\n [class]=\"fileUploadInput.removeStyleClass\">\n @if (!fileUploadInput.cancelIconTemplate) {\n <TimesIcon />\n }\n </button>\n </div>\n </div>\n </ng-template>\n <ng-template pTemplate=\"content\" let-files>\n @if (files.length === 0) {\n <div class=\"text-gray-300 dropdown-area\">\n <span><i class=\"pi pi-file-import mr-2\"></i>{{ 'fileUpload.dragAndDrop' | translate }}</span>\n </div>\n }\n </ng-template>\n </p-fileUpload>\n }\n @case ('imageUrl') {\n <div>\n @if (descriptor.imagePreview) {\n <div class=\"flex flex-wrap justify-content-start\">\n @for (image of imageFormArray.controls; track image; let idx = $index) {\n @if (imageFormArray.at(idx).valid && imageFormArray.at(idx).value) {\n <p-image [src]=\"imageFormArray.at(idx).value\" [preview]=\"true\" (onImageError)=\"onImageUrlLoadError()\" styleClass=\"mng-image m-2\"></p-image>\n } @else {\n <span class=\"mng-image m-2 p-image-preview-container no-image\">\n <div class=\"p-image-preview-indicator\">\n <i class=\"p-image-preview-icon pi pi-ban\"></i>\n </div>\n </span>\n }\n }\n </div>\n }\n @if (!descriptor.imagePreview || descriptor.imageUrlInputVisibleOnDisabled || !iFormControl.disabled) {\n @for (imageCtrlName of imageFormArray.controls; track imageCtrlName; let idx = $index) {\n <div class=\"p-inputgroup mt-1\">\n <input\n pInputText\n [placeholder]=\"'mngEditor.imageUrlPlaceholder' | translate\"\n [id]=\"$any(key)\"\n type=\"text\"\n [formControl]=\"$any(imageFormArray.at(idx))\"\n [formlyAttributes]=\"field\" />\n @if (descriptor.fileMultiple && !iFormControl.disabled) {\n <button type=\"button\" pButton pRipple icon=\"pi pi-minus\" (click)=\"removeImageUrlAt(idx)\"></button>\n }\n </div>\n }\n @if (descriptor.fileMultiple && !iFormControl.disabled) {\n <button\n type=\"button\"\n pButton\n pRipple\n icon=\"pi pi-plus\"\n class=\"p-button-primary w-auto mt-1\"\n [label]=\"'mngEditor.imageUrlAdd' | translate\"\n (click)=\"addImageUrl()\"></button>\n }\n }\n </div>\n }\n @default {\n <input pInputText [id]=\"$any(key)\" [type]=\"props.type || 'text'\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [mngInputTrim]=\"descriptor.trimOption\" />\n }\n}\n", dependencies: [{ kind: "ngmodule", type: InputNumberModule }, { kind: "component", type: i1$5.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabelledBy", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "directive", type: i2$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i2$1.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "component", type: i2$1.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: InputSwitchModule }, { kind: "component", type: i6.InputSwitch, selector: "p-inputSwitch", inputs: ["style", "styleClass", "tabindex", "inputId", "name", "disabled", "readonly", "trueValue", "falseValue", "ariaLabel", "ariaLabelledBy"], outputs: ["onChange"] }, { kind: "ngmodule", type: RadioButtonModule }, { kind: "component", type: i7$1.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: InputMaskModule }, { kind: "component", type: i8$1.InputMask, selector: "p-inputMask", inputs: ["type", "slotChar", "autoClear", "showClear", "style", "inputId", "styleClass", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaLabelledBy", "ariaRequired", "disabled", "readonly", "unmask", "name", "required", "characterPattern", "autoFocus", "autocomplete", "keepBuffer", "mask"], outputs: ["onComplete", "onFocus", "onBlur", "onInput", "onKeydown", "onClear"] }, { kind: "ngmodule", type: FileUploadModule }, { kind: "component", type: i9$1.FileUpload, selector: "p-fileUpload", inputs: ["name", "url", "method", "multiple", "accept", "disabled", "auto", "withCredentials", "maxFileSize", "invalidFileSizeMessageSummary", "invalidFileSizeMessageDetail", "invalidFileTypeMessageSummary", "invalidFileTypeMessageDetail", "invalidFileLimitMessageDetail", "invalidFileLimitMessageSummary", "style", "styleClass", "previewWidth", "chooseLabel", "uploadLabel", "cancelLabel", "chooseIcon", "uploadIcon", "cancelIcon", "showUploadButton", "showCancelButton", "mode", "headers", "customUpload", "fileLimit", "uploadStyleClass", "cancelStyleClass", "removeStyleClass", "chooseStyleClass", "files"], outputs: ["onBeforeUpload", "onSend", "onUpload", "onError", "onClear", "onRemove", "onSelect", "onProgress", "uploadHandler", "onImageError"] }, { kind: "directive", type: i4.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "ngmodule", type: ImageModule }, { kind: "component", type: i11.Image, selector: "p-image", inputs: ["imageClass", "imageStyle", "styleClass", "style", "src", "srcSet", "sizes", "previewImageSrc", "previewImageSrcSet", "previewImageSizes", "alt", "width", "height", "loading", "appendTo", "preview", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide", "onImageError"] }, { kind: "ngmodule", type: InputTextareaModule }, { kind: "directive", type: i12.InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize"], outputs: ["onResize"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i13.InputText, selector: "[pInputText]" }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i7.Ripple, selector: "[pRipple]" }, { kind: "component", type: TimesIcon, selector: "TimesIcon" }, { kind: "directive", type: InputTrimDirective, selector: "[mngInputTrim]", inputs: ["mngInputTrim"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3475
3438
  }
3476
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FormlyFieldInputComponent, decorators: [{
3439
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldInputComponent, decorators: [{
3477
3440
  type: Component,
3478
3441
  args: [{ standalone: true, selector: 'mng-formly-field-input', imports: [
3479
3442
  InputNumberModule,
@@ -3482,7 +3445,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImpor
3482
3445
  TranslateModule,
3483
3446
  InputSwitchModule,
3484
3447
  RadioButtonModule,
3485
- CalendarModule,
3486
3448
  InputMaskModule,
3487
3449
  FileUploadModule,
3488
3450
  ImageModule,
@@ -3491,11 +3453,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImpor
3491
3453
  RippleModule,
3492
3454
  TimesIcon,
3493
3455
  InputTrimDirective
3494
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "@switch (props.type) {\n @case ('number') {\n <p-inputNumber\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [min]=\"descriptor.numberAutoCorrect ? descriptor.numberMin ?? NUMBER_MIN_SAFE : undefined\"\n [max]=\"descriptor.numberAutoCorrect ? descriptor.numberMax ?? NUMBER_MAX_SAFE : undefined\"\n [step]=\"$any(descriptor.numberStep)\"\n [useGrouping]=\"descriptor.numberUseGrouping\"\n [minFractionDigits]=\"descriptor.numberMinFractionDigits || 0\"\n [maxFractionDigits]=\"descriptor.numberMaxFractionDigits || 0\"\n [inputStyleClass]=\"descriptor.inputClassName\"\n [locale]=\"descriptor.locale ?? applicationLocale\"\n [mode]=\"numberFieldMode\"\n [currency]=\"currency\"\n [currencyDisplay]=\"descriptor.currencyDisplay\">\n </p-inputNumber>\n }\n\n @case ('switch') {\n <div class=\"field flex flex-column\">\n <label [for]=\"key\" [class]=\"descriptor.labelClassName\"\n >{{ props.label! | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n <p-inputSwitch [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [styleClass]=\"descriptor.inputClassName\"></p-inputSwitch>\n @if (showError) {\n <small class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n }\n </div>\n }\n @case ('radio') {\n @for (option of descriptor.radioOptions; track option) {\n <div [id]=\"$any(key)\" class=\"field-radiobutton\">\n <p-radioButton\n [name]=\"$any(key)\"\n [value]=\"option.value\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [styleClass]=\"descriptor.inputClassName\"></p-radioButton>\n <label [for]=\"option.value\" [class]=\"'mng-radio-button-label ' + descriptor.labelClassName\">{{ option.title | translate }}</label>\n </div>\n }\n }\n @case ('textarea') {\n <textarea [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [rows]=\"descriptor.rows ?? 3\" pInputTextarea [class]=\"descriptor.inputClassName\">\n </textarea>\n }\n @case ('datepicker') {\n <p-calendar\n appendTo=\"body\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [dateFormat]=\"descriptor.datePickerFormat ?? 'dd.mm.yy'\"\n [minDate]=\"$any(descriptor.datePickerMin)\"\n [maxDate]=\"$any(descriptor.datePickerMax)\"\n [showTime]=\"descriptor.datePickerShowTime ?? false\"\n [showSeconds]=\"descriptor.datePickerShowSeconds ?? false\"\n [showIcon]=\"true\"\n [inputStyleClass]=\"descriptor.inputClassName\"\n [firstDayOfWeek]=\"1\">\n </p-calendar>\n }\n @case ('mask') {\n <p-inputMask\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [mask]=\"descriptor.mask\"\n [placeholder]=\"descriptor.placeholder\"\n [slotChar]=\"$any(descriptor.slotChar)\"\n [styleClass]=\"descriptor.inputClassName\">\n </p-inputMask>\n }\n @case ('file') {\n <p-fileUpload\n #fileUploadInput\n [disabled]=\"iFormControl.disabled\"\n [multiple]=\"descriptor.fileMultiple ?? false\"\n [accept]=\"descriptor.fileAccept ?? (descriptor.fieldType === DESC_INPUT_TYPE_IMAGE_FILE ? 'image/*' : undefined)\"\n [maxFileSize]=\"descriptor.fileMaxFileSize ?? 500000\"\n [showUploadButton]=\"false\"\n (onSelect)=\"onFileSelect($event)\"\n (onRemove)=\"onFileRemove($event)\"\n (onClear)=\"onFileClear($event)\">\n <ng-template let-file let-idx=\"index\" pTemplate=\"file\">\n <div class=\"p-fileupload-row\">\n <div>\n @if (fileUploadInput.isImage(file)) {\n @if (isFileImageSvg(file)) {\n <span class=\"flex align-items-center justify-content-center\">\n <i class=\"pi pi-image text-2xl\"></i>\n </span>\n } @else {\n <img [src]=\"file.objectURL\" [width]=\"fileUploadInput.previewWidth\" (error)=\"fileUploadInput.imageError($event)\" />\n }\n } @else {\n <span class=\"flex align-items-center justify-content-center\">\n <i [class]=\"'pi ' + getFileDocumentTypeIcon(file) + ' text-2xl'\"></i>\n </span>\n }\n </div>\n <div class=\"p-fileupload-filename\">{{ file.name }}</div>\n <div>{{ fileUploadInput.formatSize(file.size) }}</div>\n <div>\n <button\n type=\"button\"\n pButton\n (click)=\"fileUploadInput.remove($event, idx)\"\n [disabled]=\"fileUploadInput.uploading\"\n class=\"p-button-icon-only\"\n [class]=\"fileUploadInput.removeStyleClass\">\n @if (!fileUploadInput.cancelIconTemplate) {\n <TimesIcon />\n }\n </button>\n </div>\n </div>\n </ng-template>\n <ng-template pTemplate=\"content\" let-files>\n @if (files.length === 0) {\n <div class=\"text-gray-300 dropdown-area\">\n <span><i class=\"pi pi-file-import mr-2\"></i>{{ 'fileUpload.dragAndDrop' | translate }}</span>\n </div>\n }\n </ng-template>\n </p-fileUpload>\n }\n @case ('imageUrl') {\n <div>\n @if (descriptor.imagePreview) {\n <div class=\"flex flex-wrap justify-content-start\">\n @for (image of imageFormArray.controls; track image; let idx = $index) {\n @if (imageFormArray.at(idx).valid && imageFormArray.at(idx).value) {\n <p-image [src]=\"imageFormArray.at(idx).value\" [preview]=\"true\" (onImageError)=\"onImageUrlLoadError()\" styleClass=\"mng-image m-2\"></p-image>\n } @else {\n <span class=\"mng-image m-2 p-image-preview-container no-image\">\n <div class=\"p-image-preview-indicator\">\n <i class=\"p-image-preview-icon pi pi-ban\"></i>\n </div>\n </span>\n }\n }\n </div>\n }\n @if (!descriptor.imagePreview || descriptor.imageUrlInputVisibleOnDisabled || !iFormControl.disabled) {\n @for (imageCtrlName of imageFormArray.controls; track imageCtrlName; let idx = $index) {\n <div class=\"p-inputgroup mt-1\">\n <input\n pInputText\n [placeholder]=\"'mngEditor.imageUrlPlaceholder' | translate\"\n [id]=\"$any(key)\"\n type=\"text\"\n [formControl]=\"$any(imageFormArray.at(idx))\"\n [formlyAttributes]=\"field\" />\n @if (descriptor.fileMultiple && !iFormControl.disabled) {\n <button type=\"button\" pButton pRipple icon=\"pi pi-minus\" (click)=\"removeImageUrlAt(idx)\"></button>\n }\n </div>\n }\n @if (descriptor.fileMultiple && !iFormControl.disabled) {\n <button\n type=\"button\"\n pButton\n pRipple\n icon=\"pi pi-plus\"\n class=\"p-button-primary w-auto mt-1\"\n [label]=\"'mngEditor.imageUrlAdd' | translate\"\n (click)=\"addImageUrl()\"></button>\n }\n }\n </div>\n }\n @default {\n <input pInputText [id]=\"$any(key)\" [type]=\"props.type || 'text'\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [mngInputTrim]=\"descriptor.trimOption\" />\n }\n}\n" }]
3495
- }], ctorParameters: () => [{ type: undefined, decorators: [{
3496
- type: Inject,
3497
- args: [LOCALE_ID]
3498
- }] }, { type: i1$2.FormBuilder }, { type: i2$1.TranslateService }] });
3456
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "@switch (props.type) {\n @case ('number') {\n <p-inputNumber\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [min]=\"descriptor.numberAutoCorrect ? descriptor.numberMin ?? NUMBER_MIN_SAFE : undefined\"\n [max]=\"descriptor.numberAutoCorrect ? descriptor.numberMax ?? NUMBER_MAX_SAFE : undefined\"\n [step]=\"$any(descriptor.numberStep)\"\n [useGrouping]=\"descriptor.numberUseGrouping\"\n [minFractionDigits]=\"descriptor.numberMinFractionDigits || 0\"\n [maxFractionDigits]=\"descriptor.numberMaxFractionDigits || 0\"\n [inputStyleClass]=\"descriptor.inputClassName\"\n [locale]=\"descriptor.locale ?? applicationLocale\"\n [mode]=\"numberFieldMode\"\n [currency]=\"currency\"\n [currencyDisplay]=\"descriptor.currencyDisplay\">\n </p-inputNumber>\n }\n\n @case ('switch') {\n <div class=\"field flex flex-column\">\n <label [for]=\"key\" [class]=\"descriptor.labelClassName\"\n >{{ props.label! | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n <p-inputSwitch [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [styleClass]=\"descriptor.inputClassName\"></p-inputSwitch>\n @if (showError) {\n <small class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n }\n </div>\n }\n @case ('radio') {\n @for (option of descriptor.radioOptions; track option) {\n <div [id]=\"key\" class=\"field-radiobutton\">\n <p-radioButton\n [name]=\"$any(key)\"\n [value]=\"option.value\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [styleClass]=\"descriptor.inputClassName\"></p-radioButton>\n <label [for]=\"option.value\" [class]=\"'mng-radio-button-label ' + descriptor.labelClassName\">{{ option.title | translate }}</label>\n </div>\n }\n }\n @case ('textarea') {\n <textarea [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [rows]=\"descriptor.rows ?? 3\" pInputTextarea [class]=\"descriptor.inputClassName\">\n </textarea>\n }\n @case ('mask') {\n <p-inputMask\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [mask]=\"descriptor.mask\"\n [placeholder]=\"descriptor.placeholder\"\n [slotChar]=\"$any(descriptor.slotChar)\"\n [styleClass]=\"descriptor.inputClassName\">\n </p-inputMask>\n }\n @case ('file') {\n <p-fileUpload\n #fileUploadInput\n [id]=\"$any(key)\"\n [disabled]=\"iFormControl.disabled\"\n [multiple]=\"descriptor.fileMultiple ?? false\"\n [accept]=\"descriptor.fileAccept ?? (descriptor.fieldType === DESC_INPUT_TYPE_IMAGE_FILE ? 'image/*' : undefined)\"\n [maxFileSize]=\"descriptor.fileMaxFileSize ?? 500000\"\n [showUploadButton]=\"false\"\n (onSelect)=\"onFileSelect($event)\"\n (onRemove)=\"onFileRemove($event)\"\n (onClear)=\"onFileClear($event)\">\n <ng-template let-file let-idx=\"index\" pTemplate=\"file\">\n <div class=\"p-fileupload-row\">\n <div>\n @if (fileUploadInput.isImage(file)) {\n @if (isFileImageSvg(file)) {\n <span class=\"flex align-items-center justify-content-center\">\n <i class=\"pi pi-image text-2xl\"></i>\n </span>\n } @else {\n <img [src]=\"file.objectURL\" [width]=\"fileUploadInput.previewWidth\" (error)=\"fileUploadInput.imageError($event)\" />\n }\n } @else {\n <span class=\"flex align-items-center justify-content-center\">\n <i [class]=\"'pi ' + getFileDocumentTypeIcon(file) + ' text-2xl'\"></i>\n </span>\n }\n </div>\n <div class=\"p-fileupload-filename\">{{ file.name }}</div>\n <div>{{ fileUploadInput.formatSize(file.size) }}</div>\n <div>\n <button\n type=\"button\"\n pButton\n (click)=\"fileUploadInput.remove($event, idx)\"\n [disabled]=\"fileUploadInput.uploading\"\n class=\"p-button-icon-only\"\n [class]=\"fileUploadInput.removeStyleClass\">\n @if (!fileUploadInput.cancelIconTemplate) {\n <TimesIcon />\n }\n </button>\n </div>\n </div>\n </ng-template>\n <ng-template pTemplate=\"content\" let-files>\n @if (files.length === 0) {\n <div class=\"text-gray-300 dropdown-area\">\n <span><i class=\"pi pi-file-import mr-2\"></i>{{ 'fileUpload.dragAndDrop' | translate }}</span>\n </div>\n }\n </ng-template>\n </p-fileUpload>\n }\n @case ('imageUrl') {\n <div>\n @if (descriptor.imagePreview) {\n <div class=\"flex flex-wrap justify-content-start\">\n @for (image of imageFormArray.controls; track image; let idx = $index) {\n @if (imageFormArray.at(idx).valid && imageFormArray.at(idx).value) {\n <p-image [src]=\"imageFormArray.at(idx).value\" [preview]=\"true\" (onImageError)=\"onImageUrlLoadError()\" styleClass=\"mng-image m-2\"></p-image>\n } @else {\n <span class=\"mng-image m-2 p-image-preview-container no-image\">\n <div class=\"p-image-preview-indicator\">\n <i class=\"p-image-preview-icon pi pi-ban\"></i>\n </div>\n </span>\n }\n }\n </div>\n }\n @if (!descriptor.imagePreview || descriptor.imageUrlInputVisibleOnDisabled || !iFormControl.disabled) {\n @for (imageCtrlName of imageFormArray.controls; track imageCtrlName; let idx = $index) {\n <div class=\"p-inputgroup mt-1\">\n <input\n pInputText\n [placeholder]=\"'mngEditor.imageUrlPlaceholder' | translate\"\n [id]=\"$any(key)\"\n type=\"text\"\n [formControl]=\"$any(imageFormArray.at(idx))\"\n [formlyAttributes]=\"field\" />\n @if (descriptor.fileMultiple && !iFormControl.disabled) {\n <button type=\"button\" pButton pRipple icon=\"pi pi-minus\" (click)=\"removeImageUrlAt(idx)\"></button>\n }\n </div>\n }\n @if (descriptor.fileMultiple && !iFormControl.disabled) {\n <button\n type=\"button\"\n pButton\n pRipple\n icon=\"pi pi-plus\"\n class=\"p-button-primary w-auto mt-1\"\n [label]=\"'mngEditor.imageUrlAdd' | translate\"\n (click)=\"addImageUrl()\"></button>\n }\n }\n </div>\n }\n @default {\n <input pInputText [id]=\"$any(key)\" [type]=\"props.type || 'text'\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [mngInputTrim]=\"descriptor.trimOption\" />\n }\n}\n" }]
3457
+ }] });
3499
3458
 
3500
3459
  class FormlyFieldLabelComponent extends FieldType {
3501
3460
  constructor() {
@@ -3507,10 +3466,10 @@ class FormlyFieldLabelComponent extends FieldType {
3507
3466
  this.props.fieldComponent = this;
3508
3467
  this.formControl?.patchValue(this.descriptor.label);
3509
3468
  }
3510
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FormlyFieldLabelComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3511
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.1", type: FormlyFieldLabelComponent, isStandalone: true, selector: "mng-formly-field-label", host: { properties: { "class": "this.className" } }, usesInheritance: true, ngImport: i0, template: "", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3469
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldLabelComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3470
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: FormlyFieldLabelComponent, isStandalone: true, selector: "mng-formly-field-label", host: { properties: { "class": "this.className" } }, usesInheritance: true, ngImport: i0, template: "", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3512
3471
  }
3513
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FormlyFieldLabelComponent, decorators: [{
3472
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldLabelComponent, decorators: [{
3514
3473
  type: Component,
3515
3474
  args: [{ standalone: true, selector: 'mng-formly-field-label', changeDetection: ChangeDetectionStrategy.OnPush, template: "" }]
3516
3475
  }], propDecorators: { className: [{
@@ -3563,9 +3522,7 @@ class FormlyFieldLookupDialogComponent extends FieldType {
3563
3522
  this.descriptor.nextEvent(FormFieldEventTypeEnum.ValueChange, FormlyFieldLookupDialogComponent, this, {
3564
3523
  value: v
3565
3524
  });
3566
- if (this.props['onValueChange']) {
3567
- this.props['onValueChange'](this.field, v);
3568
- }
3525
+ this.props.onValueChange?.(this.field, v);
3569
3526
  });
3570
3527
  this.subscriptions.push(subscription);
3571
3528
  }
@@ -3615,10 +3572,10 @@ class FormlyFieldLookupDialogComponent extends FieldType {
3615
3572
  eventSubtype: 'LookupError',
3616
3573
  queryResult: err
3617
3574
  });
3618
- const error = ErrorUtil.fromSubscribeError(err, 'FormlyFieldLookupDialogComponentError', {
3575
+ const error = fromSubscribeError(err, 'FormlyFieldLookupDialogComponentError', {
3619
3576
  params: params
3620
3577
  });
3621
- this.logger.log(error, ErrorUtil.getErrorLogLevel(error));
3578
+ this.logger.log(error, getErrorLogLevel(error));
3622
3579
  }
3623
3580
  });
3624
3581
  }
@@ -3684,10 +3641,10 @@ class FormlyFieldLookupDialogComponent extends FieldType {
3684
3641
  this.fieldLabelFormControl.setValue(value);
3685
3642
  }
3686
3643
  }
3687
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FormlyFieldLookupDialogComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
3688
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.2.1", type: FormlyFieldLookupDialogComponent, isStandalone: true, selector: "mng-formly-field-lookup-dialog", providers: [provideViewContainer(false)], viewQueries: [{ propertyName: "table", first: true, predicate: TableComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div [class]=\"'p-inputgroup mng-dropdown-dialog' + descriptor.inputClassName\" [class.p-inputtext-sm]=\"descriptor.isSizeSmall\" [class.p-inputtext-lg]=\"descriptor.isSizeLarge\">\n <input pInputText type=\"text\" [id]=\"$any(key)\" [readonly]=\"true\" [formlyAttributes]=\"field\" [formControl]=\"fieldLabelFormControl\" />\n @if (!props.required && formControl.value && !formControl.disabled) {\n <i class=\"mng-dropdown-clear-icon pi pi-times\" (click)=\"clear()\"></i>\n }\n <button\n pButton\n pRipple\n class=\"mng-dropdown-dialog-search-button\"\n type=\"button\"\n [label]=\"'general.search' | translate: {item: ''}\"\n [disabled]=\"formControl.disabled\"\n (click)=\"openSelectDialog()\"></button>\n</div>\n\n<p-dialog\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.search' | translate: {item: props.label!}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-dialog mng-formly-field-lookup-dialog\">\n <ng-template pTemplate=\"content\" mngDialogKeydownHandler>\n <mng-table\n [descriptor]=\"descriptor.dialogTableDescriptor!\"\n [dataProvider]=\"descriptor.dialogTableDataProvider\"\n [result]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [selectionMode]=\"'single'\"\n [loading]=\"dialogIsLoading$\"\n [captionComponent]=\"config.table?.captionComponent\"\n [columnCustomLastComponent]=\"config.table?.columnActionComponent\"\n (selectionChange)=\"onSelectionChange($event)\"\n (captionComponentInstance)=\"onCaptionCmpInst($event)\"\n (columnCustomLastComponentInstance)=\"onColumnActionCmpInst($event)\">\n </mng-table>\n <p-messages [value]=\"dialogMessages\"></p-messages>\n </ng-template>\n\n <ng-template pTemplate=\"footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.select' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-text\"\n (click)=\"addItem()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n loadingIcon=\"pi pi-spin pi-spinner\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n</p-dialog>\n", dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i2$2.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i4.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "directive", type: i2$4.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i7.Ripple, selector: "[pRipple]" }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i7$2.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: TableComponent, selector: "mng-table", inputs: ["descriptor", "items", "result", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "columnLastMinWidth", "captionComponent", "columnCustomLastComponent", "globalFilterFields"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnCustomLastComponentInstance"] }, { kind: "ngmodule", type: MessagesModule }, { kind: "component", type: i3.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i14.InputText, selector: "[pInputText]" }, { kind: "directive", type: DialogKeydownHandlerDirective, selector: "[mngDialogKeydownHandler]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3644
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldLookupDialogComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
3645
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", type: FormlyFieldLookupDialogComponent, isStandalone: true, selector: "mng-formly-field-lookup-dialog", providers: [provideViewContainer(false)], viewQueries: [{ propertyName: "table", first: true, predicate: TableComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div [class]=\"'p-inputgroup mng-dropdown-dialog' + descriptor.inputClassName\" [class.p-inputtext-sm]=\"descriptor.isSizeSmall\" [class.p-inputtext-lg]=\"descriptor.isSizeLarge\">\n <input pInputText type=\"text\" [id]=\"$any(key)\" [readonly]=\"true\" [formlyAttributes]=\"field\" [formControl]=\"fieldLabelFormControl\" />\n @if (!props.required && formControl.value && !formControl.disabled) {\n <i class=\"mng-dropdown-clear-icon pi pi-times\" (click)=\"clear()\"></i>\n }\n <button\n pButton\n pRipple\n class=\"mng-dropdown-dialog-search-button\"\n type=\"button\"\n [label]=\"'general.search' | translate: {item: ''}\"\n [disabled]=\"formControl.disabled\"\n (click)=\"openSelectDialog()\"></button>\n</div>\n\n<p-dialog\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.search' | translate: {item: props.label!}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-dialog mng-formly-field-lookup-dialog\">\n <ng-template pTemplate=\"content\" mngDialogKeydownHandler>\n <mng-table\n [descriptor]=\"descriptor.dialogTableDescriptor!\"\n [dataProvider]=\"descriptor.dialogTableDataProvider\"\n [result]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [selectionMode]=\"'single'\"\n [loading]=\"dialogIsLoading$\"\n [captionComponent]=\"config.table?.captionComponent\"\n [columnCustomLastComponent]=\"config.table?.columnActionComponent\"\n (selectionChange)=\"onSelectionChange($event)\"\n (captionComponentInstance)=\"onCaptionCmpInst($event)\"\n (columnCustomLastComponentInstance)=\"onColumnActionCmpInst($event)\">\n </mng-table>\n <p-messages [value]=\"dialogMessages\"></p-messages>\n </ng-template>\n\n <ng-template pTemplate=\"footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.select' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-text\"\n (click)=\"addItem()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n loadingIcon=\"pi pi-spin pi-spinner\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n</p-dialog>\n", dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i2$1.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i4.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "directive", type: i2$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i7.Ripple, selector: "[pRipple]" }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i7$2.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: TableComponent, selector: "mng-table", inputs: ["descriptor", "items", "result", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "columnLastMinWidth", "captionComponent", "columnCustomLastComponent", "globalFilterFields"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnCustomLastComponentInstance"] }, { kind: "ngmodule", type: MessagesModule }, { kind: "component", type: i3$1.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i13.InputText, selector: "[pInputText]" }, { kind: "directive", type: DialogKeydownHandlerDirective, selector: "[mngDialogKeydownHandler]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3689
3646
  }
3690
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FormlyFieldLookupDialogComponent, decorators: [{
3647
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldLookupDialogComponent, decorators: [{
3691
3648
  type: Component,
3692
3649
  args: [{ standalone: true, selector: 'mng-formly-field-lookup-dialog', imports: [
3693
3650
  TranslateModule,
@@ -3861,14 +3818,12 @@ class FormlyFieldTableDialogFormComponent extends FieldType {
3861
3818
  eventSubtype: FormFieldEventComponentSubtype.ON_INIT
3862
3819
  });
3863
3820
  let subscription = this.formControl.valueChanges.pipe(startWith(this.formControl.value)).subscribe(v => {
3864
- this.itemsSubject.next(v);
3821
+ this.itemsSubject.next(v ?? []);
3865
3822
  // emit lifecycle event
3866
3823
  this.descriptor.nextEvent(FormFieldEventTypeEnum.ValueChange, FormlyFieldTableDialogFormComponent, this, {
3867
3824
  value: v
3868
3825
  });
3869
- if (this.props['onValueChange']) {
3870
- this.props['onValueChange'](this.field, v);
3871
- }
3826
+ this.props.onValueChange?.(this.field, v);
3872
3827
  });
3873
3828
  this.subscriptions.push(subscription);
3874
3829
  this.isDisabledSubject.next(this.formControl.disabled);
@@ -3903,10 +3858,10 @@ class FormlyFieldTableDialogFormComponent extends FieldType {
3903
3858
  }
3904
3859
  return false;
3905
3860
  }
3906
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FormlyFieldTableDialogFormComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
3907
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.2.1", type: FormlyFieldTableDialogFormComponent, isStandalone: true, selector: "mng-formly-table-dialog-form-field", providers: [provideViewContainer(false)], usesInheritance: true, ngImport: i0, template: "<mng-action-table [descriptor]=\"descriptor.tableDescriptor\" [items]=\"items$\" [actions]=\"actions\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-row justify-content-end align-items-center table-header\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\"\n >{{ props.label! | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n @for (action of toolbarRightActions; track action) {\n <mng-action [action]=\"action\"></mng-action>\n }\n </div>\n </ng-template>\n</mng-action-table>\n", styles: [".submit-button{display:none!important;visibility:hidden}\n"], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }, { kind: "component", type: ActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "dataListParams", "dataProvider", "hostComponent", "route", "disabled", "loading", "selectedItems"], outputs: ["finish"] }, { kind: "component", type: ActionTableComponent, selector: "mng-action-table", inputs: ["descriptor", "items", "result", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "globalFilterFields", "actions", "captionComponent", "columnActionComponent", "columnActionMinWidth"], outputs: ["tableLoad", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }, { kind: "directive", type: TemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3861
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldTableDialogFormComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
3862
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", type: FormlyFieldTableDialogFormComponent, isStandalone: true, selector: "mng-formly-table-dialog-form-field", providers: [provideViewContainer(false)], usesInheritance: true, ngImport: i0, template: "<mng-action-table [descriptor]=\"descriptor.tableDescriptor\" [items]=\"items$\" [actions]=\"actions\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-row justify-content-end align-items-center table-header\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\"\n >{{ props.label! | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n @for (action of toolbarRightActions; track action) {\n <mng-action [action]=\"action\"></mng-action>\n }\n </div>\n </ng-template>\n</mng-action-table>\n", styles: [".submit-button{display:none!important;visibility:hidden}\n"], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "component", type: ActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "dataListParams", "dataProvider", "hostComponent", "route", "disabled", "loading", "selectedItems"], outputs: ["finish"] }, { kind: "component", type: ActionTableComponent, selector: "mng-action-table", inputs: ["descriptor", "items", "result", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "globalFilterFields", "actions", "captionComponent", "columnActionComponent", "columnActionMinWidth"], outputs: ["tableLoad", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }, { kind: "directive", type: TemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3908
3863
  }
3909
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FormlyFieldTableDialogFormComponent, decorators: [{
3864
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldTableDialogFormComponent, decorators: [{
3910
3865
  type: Component,
3911
3866
  args: [{ standalone: true, selector: 'mng-formly-table-dialog-form-field', imports: [TranslateModule, ActionComponent, ActionTableComponent, TemplateDirective], providers: [provideViewContainer(false)], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-action-table [descriptor]=\"descriptor.tableDescriptor\" [items]=\"items$\" [actions]=\"actions\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-row justify-content-end align-items-center table-header\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\"\n >{{ props.label! | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n @for (action of toolbarRightActions; track action) {\n <mng-action [action]=\"action\"></mng-action>\n }\n </div>\n </ng-template>\n</mng-action-table>\n", styles: [".submit-button{display:none!important;visibility:hidden}\n"] }]
3912
3867
  }], ctorParameters: () => [{ type: i0.Injector }] });
@@ -3920,7 +3875,6 @@ class FormlyFieldTableDialogMultiselectComponent extends FieldType {
3920
3875
  this.itemsAsync = this.itemsSubject.asObservable();
3921
3876
  this.addItemsSubject = new ReplaySubject(1);
3922
3877
  this.addItemsAsync = this.addItemsSubject.asObservable();
3923
- this.dialogUseDataProvider = false;
3924
3878
  this.dialogDataProviderService = null;
3925
3879
  this.dialogIsLoadingSubject = new ReplaySubject(1);
3926
3880
  this.isDialogVisible = false;
@@ -3936,8 +3890,7 @@ class FormlyFieldTableDialogMultiselectComponent extends FieldType {
3936
3890
  this.descriptor = this.props.descriptor;
3937
3891
  this.props.fieldComponent = this;
3938
3892
  this.dialogIsLoadingSubject.next(false);
3939
- if (this.descriptor.lookupTableDataProvider?.serviceType) {
3940
- this.dialogUseDataProvider = true;
3893
+ if (this.descriptor.lookupTableDataProvider.serviceType) {
3941
3894
  this.dialogDataProviderService = this.injector.get(this.descriptor.lookupTableDataProvider.serviceType);
3942
3895
  }
3943
3896
  this.hasAddAction = this.descriptor.actions.some(a => a === FieldManyToManyEditorActionEnum.Add);
@@ -3956,9 +3909,7 @@ class FormlyFieldTableDialogMultiselectComponent extends FieldType {
3956
3909
  this.descriptor.nextEvent(FormFieldEventTypeEnum.ValueChange, FormlyFieldTableDialogMultiselectComponent, this, {
3957
3910
  value: v ?? []
3958
3911
  });
3959
- if (this.props['onValueChange']) {
3960
- this.props['onValueChange'](this.field, v ?? []);
3961
- }
3912
+ this.props.onValueChange?.(this.field, v);
3962
3913
  });
3963
3914
  this.subscriptions.push(this.searchDebounceSubject.pipe(debounceTime(200), distinctUntilChanged()).subscribe(query => {
3964
3915
  this.addTableComponent?.primeTable.filterGlobal(query, 'contains');
@@ -3983,7 +3934,7 @@ class FormlyFieldTableDialogMultiselectComponent extends FieldType {
3983
3934
  openAddDialog() {
3984
3935
  this.dialogSelectedAddItems = [];
3985
3936
  this.isDialogVisible = true;
3986
- if (!this.dialogAreItemsLoaded && this.dialogUseDataProvider) {
3937
+ if (!this.dialogAreItemsLoaded) {
3987
3938
  // wrapped in request animation frame due to primeng bug: https://github.com/primefaces/primeng/issues/12980
3988
3939
  requestAnimationFrame(() => {
3989
3940
  this.dialogIsLoadingSubject.next(true);
@@ -3998,8 +3949,8 @@ class FormlyFieldTableDialogMultiselectComponent extends FieldType {
3998
3949
  }
3999
3950
  });
4000
3951
  }
4001
- if (this.descriptor.hasLookupExcludeValues) {
4002
- const filterValues = this.formControl.value.map((i) => ObjectUtil.getPropertyByPath(i, this.descriptor.excludeValueProperty));
3952
+ if (this.descriptor.hasLookupExcludeValues && this.descriptor.lookupTableDataProvider.isLazy) {
3953
+ const filterValues = this.formControl.value.map((i) => getObjectPropertyByPath(i, this.descriptor.excludeValueProperty));
4003
3954
  params.filters = {
4004
3955
  [this.descriptor.excludeFilterProperty]: {
4005
3956
  matchMode: FilterMatchMode.NotIn,
@@ -4009,16 +3960,21 @@ class FormlyFieldTableDialogMultiselectComponent extends FieldType {
4009
3960
  }
4010
3961
  this.lookupDataProviderSubscription = toObservable(this.descriptor.lookupTableDataProvider?.getAll(params, this.dialogDataProviderService)).subscribe({
4011
3962
  next: res => {
3963
+ if (this.descriptor.hasLookupExcludeValues && !this.descriptor.lookupTableDataProvider.isLazy && res && Array.isArray(res.data) && res.data.length > 0) {
3964
+ const filterValues = this.formControl.value.map((i) => getObjectPropertyByPath(i, this.descriptor.excludeValueProperty));
3965
+ res.data = res.data.filter(i => filterValues.indexOf(i[this.descriptor.excludeFilterProperty]) < 0);
3966
+ res.totalCount = res.data.length;
3967
+ }
4012
3968
  this.addItemsSubject.next(res);
4013
3969
  this.dialogAreItemsLoaded = true;
4014
3970
  this.dialogIsLoadingSubject.next(false);
4015
3971
  },
4016
3972
  error: err => {
4017
3973
  this.dialogIsLoadingSubject.next(false);
4018
- const error = ErrorUtil.fromSubscribeError(err, 'FormlyFieldTableDialogMultiselectComponent', {
3974
+ const error = fromSubscribeError(err, 'FormlyFieldTableDialogMultiselectComponent', {
4019
3975
  params: params
4020
3976
  });
4021
- this.logger.log(error, ErrorUtil.getErrorLogLevel(error));
3977
+ this.logger.log(error, getErrorLogLevel(error));
4022
3978
  }
4023
3979
  });
4024
3980
  });
@@ -4065,7 +4021,7 @@ class FormlyFieldTableDialogMultiselectComponent extends FieldType {
4065
4021
  name: 'FormlyFieldTableDialogMultiselectComponentError'
4066
4022
  });
4067
4023
  }
4068
- value = value.filter((i) => ObjectUtil.getPropertyByPath(i, compareProperty) !== ObjectUtil.getPropertyByPath(item, compareProperty));
4024
+ value = value.filter((i) => getObjectPropertyByPath(i, compareProperty) !== getObjectPropertyByPath(item, compareProperty));
4069
4025
  this.formControl.patchValue(value);
4070
4026
  this.formControl.markAsTouched();
4071
4027
  this.formControl.markAsDirty();
@@ -4075,22 +4031,22 @@ class FormlyFieldTableDialogMultiselectComponent extends FieldType {
4075
4031
  const query = event.target.value;
4076
4032
  this.searchDebounceSubject.next(query);
4077
4033
  }
4078
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FormlyFieldTableDialogMultiselectComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
4079
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.2.1", type: FormlyFieldTableDialogMultiselectComponent, isStandalone: true, selector: "mng-formly-table-multiselect-add-field", providers: [provideViewContainer(false)], viewQueries: [{ propertyName: "addTableComponent", first: true, predicate: ["addTableComponent"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<mng-table [descriptor]=\"descriptor.mainTableDescriptor\" [items]=\"itemsAsync\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-row justify-content-end align-items-center table-header pt-0\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\"\n >{{ props.label! | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n @if (hasAddAction && !options.formState?.disabled) {\n <button\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-plus\"\n class=\"p-button-rounded mng-button-xs\"\n (click)=\"openAddDialog()\"\n [disabled]=\"formControl!.disabled\"></button>\n }\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\">\n @if (hasDeleteAction && !options.formState?.disabled) {\n <button\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-trash\"\n class=\"p-button-rounded p-button-danger mng-button-xs\"\n (click)=\"removeItem(item)\"\n [disabled]=\"formControl!.disabled\"></button>\n }\n </ng-template>\n</mng-table>\n\n@if (hasAddAction) {\n <p-dialog\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.addItem' | translate: {item: props.label! | translate}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-dialog mng-dialog-sm mng-formly-field-table-multiselect-dialog\">\n <ng-template pTemplate=\"content\" class=\"table-container\" mngDialogKeydownHandler>\n <div class=\"h-full flex flex-column\">\n <div class=\"flex-grow-1 formly-field-table-multiselect-dialog-form-container\">\n <div class=\"mng-formly-field-table-multiselect-dialog-table\">\n <mng-table\n #addTableComponent\n [descriptor]=\"descriptor.lookupTableDescriptor\"\n [globalFilterFields]=\"descriptor.searchFields\"\n [result]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [loading]=\"dialogIsLoading$\"\n (selectionChange)=\"onSelectionChange($event)\">\n @if (descriptor.searchEnabled) {\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex\">\n <span class=\"p-input-icon-left ml-auto\" [ngStyle]=\"{width: 'unset'}\">\n <i class=\"pi pi-search\"></i>\n <input pInputText type=\"text\" (input)=\"onSearch($event)\" [placeholder]=\"'general.search' | translate\" />\n </span>\n </div>\n </ng-template>\n }\n </mng-table>\n </div>\n </div>\n <div class=\"flex flex-row justify-content-end mng-formly-field-table-multiselect-dialog-footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.add' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-primary\"\n (click)=\"addItems()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n loadingIcon=\"pi pi-spin pi-spinner\"\n [disabled]=\"form.disabled\"></button>\n </div>\n </div>\n </ng-template>\n </p-dialog>\n}\n", styles: [".table-footer{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:flex-end;align-items:center;align-content:center;margin-top:2rem}.table-container{overflow:hidden}.table-footer button{width:8rem}.table-footer button:not(:first-child){margin-left:1.5rem}.table-scroll{max-height:75vh;overflow-y:auto}\n"], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: TableComponent, selector: "mng-table", inputs: ["descriptor", "items", "result", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "columnLastMinWidth", "captionComponent", "columnCustomLastComponent", "globalFilterFields"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnCustomLastComponentInstance"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i7$2.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "directive", type: i2$4.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i4.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i7.Ripple, selector: "[pRipple]" }, { kind: "directive", type: TemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i14.InputText, selector: "[pInputText]" }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: DialogKeydownHandlerDirective, selector: "[mngDialogKeydownHandler]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4034
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldTableDialogMultiselectComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
4035
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", type: FormlyFieldTableDialogMultiselectComponent, isStandalone: true, selector: "mng-formly-table-multiselect-add-field", providers: [provideViewContainer(false)], viewQueries: [{ propertyName: "addTableComponent", first: true, predicate: ["addTableComponent"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<mng-table [descriptor]=\"descriptor.mainTableDescriptor\" [items]=\"itemsAsync\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-row justify-content-end align-items-center table-header pt-0\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\"\n >{{ props.label! | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n @if (hasAddAction && !options.formState?.disabled) {\n <button\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-plus\"\n class=\"p-button-rounded mng-button-xs\"\n (click)=\"openAddDialog()\"\n [disabled]=\"formControl!.disabled\"></button>\n }\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnCustomLast\" let-item=\"rowItem\">\n @if (hasDeleteAction && !options.formState?.disabled) {\n <button\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-trash\"\n class=\"p-button-rounded p-button-danger mng-button-xs\"\n (click)=\"removeItem(item)\"\n [disabled]=\"formControl!.disabled\"></button>\n }\n </ng-template>\n</mng-table>\n\n@if (hasAddAction) {\n <p-dialog\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.addItem' | translate: {item: props.label! | translate}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-dialog mng-dialog-sm mng-formly-field-table-multiselect-dialog\">\n <ng-template pTemplate=\"content\" class=\"table-container\" mngDialogKeydownHandler>\n <div class=\"h-full flex flex-column\">\n <div class=\"flex-grow-1 formly-field-table-multiselect-dialog-form-container\">\n <div class=\"mng-formly-field-table-multiselect-dialog-table\">\n <mng-table\n #addTableComponent\n [descriptor]=\"descriptor.lookupTableDescriptor\"\n [globalFilterFields]=\"descriptor.searchFields\"\n [result]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [loading]=\"dialogIsLoading$\"\n (selectionChange)=\"onSelectionChange($event)\">\n @if (descriptor.searchEnabled) {\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex\">\n <span class=\"p-input-icon-left ml-auto\" [ngStyle]=\"{width: 'unset'}\">\n <i class=\"pi pi-search\"></i>\n <input pInputText type=\"text\" (input)=\"onSearch($event)\" [placeholder]=\"'general.search' | translate\" />\n </span>\n </div>\n </ng-template>\n }\n </mng-table>\n </div>\n </div>\n <div class=\"flex flex-row justify-content-end mng-formly-field-table-multiselect-dialog-footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.add' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-primary\"\n (click)=\"addItems()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n loadingIcon=\"pi pi-spin pi-spinner\"\n [disabled]=\"form.disabled\"></button>\n </div>\n </div>\n </ng-template>\n </p-dialog>\n}\n", styles: [".table-footer{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:flex-end;align-items:center;align-content:center;margin-top:2rem}.table-container{overflow:hidden}.table-footer button{width:8rem}.table-footer button:not(:first-child){margin-left:1.5rem}.table-scroll{max-height:75vh;overflow-y:auto}\n"], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: TableComponent, selector: "mng-table", inputs: ["descriptor", "items", "result", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "columnLastMinWidth", "captionComponent", "columnCustomLastComponent", "globalFilterFields"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnCustomLastComponentInstance"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i7$2.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "directive", type: i2$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i4.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i7.Ripple, selector: "[pRipple]" }, { kind: "directive", type: TemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i13.InputText, selector: "[pInputText]" }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: DialogKeydownHandlerDirective, selector: "[mngDialogKeydownHandler]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4080
4036
  }
4081
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FormlyFieldTableDialogMultiselectComponent, decorators: [{
4037
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldTableDialogMultiselectComponent, decorators: [{
4082
4038
  type: Component,
4083
- args: [{ standalone: true, selector: 'mng-formly-table-multiselect-add-field', imports: [TranslateModule, AsyncPipe, TableComponent, DialogModule, ButtonModule, RippleModule, TemplateDirective, InputTextModule, NgStyle, DialogKeydownHandlerDirective], providers: [provideViewContainer(false)], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-table [descriptor]=\"descriptor.mainTableDescriptor\" [items]=\"itemsAsync\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-row justify-content-end align-items-center table-header pt-0\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\"\n >{{ props.label! | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n @if (hasAddAction && !options.formState?.disabled) {\n <button\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-plus\"\n class=\"p-button-rounded mng-button-xs\"\n (click)=\"openAddDialog()\"\n [disabled]=\"formControl!.disabled\"></button>\n }\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\">\n @if (hasDeleteAction && !options.formState?.disabled) {\n <button\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-trash\"\n class=\"p-button-rounded p-button-danger mng-button-xs\"\n (click)=\"removeItem(item)\"\n [disabled]=\"formControl!.disabled\"></button>\n }\n </ng-template>\n</mng-table>\n\n@if (hasAddAction) {\n <p-dialog\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.addItem' | translate: {item: props.label! | translate}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-dialog mng-dialog-sm mng-formly-field-table-multiselect-dialog\">\n <ng-template pTemplate=\"content\" class=\"table-container\" mngDialogKeydownHandler>\n <div class=\"h-full flex flex-column\">\n <div class=\"flex-grow-1 formly-field-table-multiselect-dialog-form-container\">\n <div class=\"mng-formly-field-table-multiselect-dialog-table\">\n <mng-table\n #addTableComponent\n [descriptor]=\"descriptor.lookupTableDescriptor\"\n [globalFilterFields]=\"descriptor.searchFields\"\n [result]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [loading]=\"dialogIsLoading$\"\n (selectionChange)=\"onSelectionChange($event)\">\n @if (descriptor.searchEnabled) {\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex\">\n <span class=\"p-input-icon-left ml-auto\" [ngStyle]=\"{width: 'unset'}\">\n <i class=\"pi pi-search\"></i>\n <input pInputText type=\"text\" (input)=\"onSearch($event)\" [placeholder]=\"'general.search' | translate\" />\n </span>\n </div>\n </ng-template>\n }\n </mng-table>\n </div>\n </div>\n <div class=\"flex flex-row justify-content-end mng-formly-field-table-multiselect-dialog-footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.add' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-primary\"\n (click)=\"addItems()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n loadingIcon=\"pi pi-spin pi-spinner\"\n [disabled]=\"form.disabled\"></button>\n </div>\n </div>\n </ng-template>\n </p-dialog>\n}\n", styles: [".table-footer{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:flex-end;align-items:center;align-content:center;margin-top:2rem}.table-container{overflow:hidden}.table-footer button{width:8rem}.table-footer button:not(:first-child){margin-left:1.5rem}.table-scroll{max-height:75vh;overflow-y:auto}\n"] }]
4039
+ args: [{ standalone: true, selector: 'mng-formly-table-multiselect-add-field', imports: [TranslateModule, AsyncPipe, TableComponent, DialogModule, ButtonModule, RippleModule, TemplateDirective, InputTextModule, NgStyle, DialogKeydownHandlerDirective], providers: [provideViewContainer(false)], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-table [descriptor]=\"descriptor.mainTableDescriptor\" [items]=\"itemsAsync\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-row justify-content-end align-items-center table-header pt-0\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\"\n >{{ props.label! | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n @if (hasAddAction && !options.formState?.disabled) {\n <button\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-plus\"\n class=\"p-button-rounded mng-button-xs\"\n (click)=\"openAddDialog()\"\n [disabled]=\"formControl!.disabled\"></button>\n }\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnCustomLast\" let-item=\"rowItem\">\n @if (hasDeleteAction && !options.formState?.disabled) {\n <button\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-trash\"\n class=\"p-button-rounded p-button-danger mng-button-xs\"\n (click)=\"removeItem(item)\"\n [disabled]=\"formControl!.disabled\"></button>\n }\n </ng-template>\n</mng-table>\n\n@if (hasAddAction) {\n <p-dialog\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.addItem' | translate: {item: props.label! | translate}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-dialog mng-dialog-sm mng-formly-field-table-multiselect-dialog\">\n <ng-template pTemplate=\"content\" class=\"table-container\" mngDialogKeydownHandler>\n <div class=\"h-full flex flex-column\">\n <div class=\"flex-grow-1 formly-field-table-multiselect-dialog-form-container\">\n <div class=\"mng-formly-field-table-multiselect-dialog-table\">\n <mng-table\n #addTableComponent\n [descriptor]=\"descriptor.lookupTableDescriptor\"\n [globalFilterFields]=\"descriptor.searchFields\"\n [result]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [loading]=\"dialogIsLoading$\"\n (selectionChange)=\"onSelectionChange($event)\">\n @if (descriptor.searchEnabled) {\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex\">\n <span class=\"p-input-icon-left ml-auto\" [ngStyle]=\"{width: 'unset'}\">\n <i class=\"pi pi-search\"></i>\n <input pInputText type=\"text\" (input)=\"onSearch($event)\" [placeholder]=\"'general.search' | translate\" />\n </span>\n </div>\n </ng-template>\n }\n </mng-table>\n </div>\n </div>\n <div class=\"flex flex-row justify-content-end mng-formly-field-table-multiselect-dialog-footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.add' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-primary\"\n (click)=\"addItems()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n loadingIcon=\"pi pi-spin pi-spinner\"\n [disabled]=\"form.disabled\"></button>\n </div>\n </div>\n </ng-template>\n </p-dialog>\n}\n", styles: [".table-footer{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:flex-end;align-items:center;align-content:center;margin-top:2rem}.table-container{overflow:hidden}.table-footer button{width:8rem}.table-footer button:not(:first-child){margin-left:1.5rem}.table-scroll{max-height:75vh;overflow-y:auto}\n"] }]
4084
4040
  }], ctorParameters: () => [{ type: i0.Injector }], propDecorators: { addTableComponent: [{
4085
4041
  type: ViewChild,
4086
4042
  args: ['addTableComponent']
4087
4043
  }] } });
4088
4044
 
4089
4045
  class FormlyFieldTabsComponent extends FieldType {
4090
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FormlyFieldTabsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
4091
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.2.1", type: FormlyFieldTabsComponent, isStandalone: true, selector: "mng-formly-field-tabs", usesInheritance: true, ngImport: i0, template: "<p-tabView [scrollable]=\"true\">\n @for (tab of field.fieldGroup; track tab) {\n <p-tabPanel [header]=\"tab.props?.label! | translate\" [headerStyleClass]=\"formControl!.valid ? 'p-tabview-title' : undefined\">\n <ng-template pTemplate=\"header\">\n <span class=\"p-tabview-title\" [class.p-tabview-title-error]=\"formState.submittedOn && formState['tab_' + (tab.id ? tab.id : tab.props?.label!) + '_invalid']\">{{\n tab.props?.label! | translate\n }}</span>\n </ng-template>\n <formly-field [field]=\"tab\"></formly-field>\n </p-tabPanel>\n }\n</p-tabView>\n", dependencies: [{ kind: "ngmodule", type: TabViewModule }, { kind: "component", type: i1$5.TabView, selector: "p-tabView", inputs: ["style", "styleClass", "controlClose", "scrollable", "activeIndex", "selectOnFocus", "nextButtonAriaLabel", "prevButtonAriaLabel", "autoHideButtons", "tabindex"], outputs: ["onChange", "onClose", "activeIndexChange"] }, { kind: "component", type: i1$5.TabPanel, selector: "p-tabPanel", inputs: ["closable", "headerStyle", "headerStyleClass", "cache", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "selected", "disabled", "header", "leftIcon", "rightIcon"] }, { kind: "directive", type: i2$4.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i2$2.FormlyField, selector: "formly-field", inputs: ["field"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4046
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldTabsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
4047
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", type: FormlyFieldTabsComponent, isStandalone: true, selector: "mng-formly-field-tabs", usesInheritance: true, ngImport: i0, template: "<p-tabView [scrollable]=\"true\">\n @for (tab of field.fieldGroup; track tab) {\n <p-tabPanel [header]=\"tab.props?.label! | translate\" [headerStyleClass]=\"formControl!.valid ? 'p-tabview-title' : undefined\">\n <ng-template pTemplate=\"header\">\n <span class=\"p-tabview-title\" [class.p-tabview-title-error]=\"formState.submittedOn && formState['tab_' + (tab.id ? tab.id : tab.props?.label!) + '_invalid']\">{{\n tab.props?.label! | translate\n }}</span>\n </ng-template>\n <formly-field [field]=\"tab\"></formly-field>\n </p-tabPanel>\n }\n</p-tabView>\n", dependencies: [{ kind: "ngmodule", type: TabViewModule }, { kind: "component", type: i1$6.TabView, selector: "p-tabView", inputs: ["style", "styleClass", "controlClose", "scrollable", "activeIndex", "selectOnFocus", "nextButtonAriaLabel", "prevButtonAriaLabel", "autoHideButtons", "tabindex"], outputs: ["onChange", "onClose", "activeIndexChange"] }, { kind: "component", type: i1$6.TabPanel, selector: "p-tabPanel", inputs: ["closable", "headerStyle", "headerStyleClass", "cache", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "selected", "disabled", "header", "leftIcon", "rightIcon"] }, { kind: "directive", type: i2$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i2$1.FormlyField, selector: "formly-field", inputs: ["field"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4092
4048
  }
4093
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FormlyFieldTabsComponent, decorators: [{
4049
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldTabsComponent, decorators: [{
4094
4050
  type: Component,
4095
4051
  args: [{ standalone: true, selector: 'mng-formly-field-tabs', imports: [TabViewModule, TranslateModule, FormlyModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<p-tabView [scrollable]=\"true\">\n @for (tab of field.fieldGroup; track tab) {\n <p-tabPanel [header]=\"tab.props?.label! | translate\" [headerStyleClass]=\"formControl!.valid ? 'p-tabview-title' : undefined\">\n <ng-template pTemplate=\"header\">\n <span class=\"p-tabview-title\" [class.p-tabview-title-error]=\"formState.submittedOn && formState['tab_' + (tab.id ? tab.id : tab.props?.label!) + '_invalid']\">{{\n tab.props?.label! | translate\n }}</span>\n </ng-template>\n <formly-field [field]=\"tab\"></formly-field>\n </p-tabPanel>\n }\n</p-tabView>\n" }]
4096
4052
  }] });
@@ -4114,10 +4070,10 @@ class FormlyFieldNoLabelWrapperComponent extends FieldWrapper {
4114
4070
  }
4115
4071
  return field;
4116
4072
  }
4117
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FormlyFieldNoLabelWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
4118
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.2.1", type: FormlyFieldNoLabelWrapperComponent, isStandalone: true, selector: "mng-formly-field-no-label-wrapper", usesInheritance: true, ngImport: i0, template: "<div [class]=\"props['descriptor']?.['fieldClassName'] ?? 'field table'\">\n <ng-container #fieldComponent></ng-container>\n @if (props['descriptor']?.['helpText']) {\n <small class=\"block\">{{ props['descriptor']?.['helpText'] | translate }}</small>\n }\n @if (showError && shouldShowError()) {\n <small class=\"block p-error\">\n <formly-validation-message [field]=\"sanitizeErrorsForGroups(field)\"></formly-validation-message>\n </small>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i2$2.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4073
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldNoLabelWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
4074
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", type: FormlyFieldNoLabelWrapperComponent, isStandalone: true, selector: "mng-formly-field-no-label-wrapper", usesInheritance: true, ngImport: i0, template: "<div [class]=\"props['descriptor']?.['fieldClassName'] ?? 'field table'\">\n <ng-container #fieldComponent></ng-container>\n @if (props['descriptor']?.['helpText']) {\n <small class=\"block\">{{ props['descriptor']?.['helpText'] | translate }}</small>\n }\n @if (showError && shouldShowError()) {\n <small class=\"block p-error\">\n <formly-validation-message [field]=\"sanitizeErrorsForGroups(field)\"></formly-validation-message>\n </small>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i2$1.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4119
4075
  }
4120
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FormlyFieldNoLabelWrapperComponent, decorators: [{
4076
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldNoLabelWrapperComponent, decorators: [{
4121
4077
  type: Component,
4122
4078
  args: [{ standalone: true, selector: 'mng-formly-field-no-label-wrapper', imports: [FormlyModule, TranslateModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"props['descriptor']?.['fieldClassName'] ?? 'field table'\">\n <ng-container #fieldComponent></ng-container>\n @if (props['descriptor']?.['helpText']) {\n <small class=\"block\">{{ props['descriptor']?.['helpText'] | translate }}</small>\n }\n @if (showError && shouldShowError()) {\n <small class=\"block p-error\">\n <formly-validation-message [field]=\"sanitizeErrorsForGroups(field)\"></formly-validation-message>\n </small>\n }\n</div>\n" }]
4123
4079
  }] });
@@ -4138,14 +4094,104 @@ class FormlyFieldWrapperComponent extends FieldWrapper {
4138
4094
  this.props?.['descriptor']?.withHelpText('');
4139
4095
  }
4140
4096
  }
4141
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FormlyFieldWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
4142
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.2.1", type: FormlyFieldWrapperComponent, isStandalone: true, selector: "mng-formly-field-wrapper", usesInheritance: true, ngImport: i0, template: "<div [class]=\"props['descriptor']?.['fieldClassName'] ?? 'field'\">\n <div class=\"grid mt-0\">\n @if (props.label) {\n <label [for]=\"key\" class=\"col\" [class]=\"props['descriptor']?.['labelClassName'] ?? ''\"\n >{{ props!.label! | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n }\n </div>\n <ng-container #fieldComponent></ng-container>\n @if (props['descriptor']?.['helpText']) {\n <small class=\"block\">{{ props['descriptor']?.['helpText'] | translate }}</small>\n }\n @if (showError) {\n <small class=\"p-error block\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i2$2.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4097
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
4098
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", type: FormlyFieldWrapperComponent, isStandalone: true, selector: "mng-formly-field-wrapper", usesInheritance: true, ngImport: i0, template: "<div [class]=\"props['descriptor']?.['fieldClassName'] ?? 'field'\">\n <div class=\"grid mt-0\">\n @if (props.label) {\n <label [for]=\"key\" class=\"col\" [class]=\"props['descriptor']?.['labelClassName'] ?? ''\"\n >{{ props!.label! | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n }\n </div>\n <ng-container #fieldComponent></ng-container>\n @if (props['descriptor']?.['helpText']) {\n <small class=\"block\">{{ props['descriptor']?.['helpText'] | translate }}</small>\n }\n @if (showError) {\n <small class=\"p-error block\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i2$1.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4143
4099
  }
4144
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FormlyFieldWrapperComponent, decorators: [{
4100
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldWrapperComponent, decorators: [{
4145
4101
  type: Component,
4146
4102
  args: [{ standalone: true, selector: 'mng-formly-field-wrapper', imports: [TranslateModule, FormlyModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"props['descriptor']?.['fieldClassName'] ?? 'field'\">\n <div class=\"grid mt-0\">\n @if (props.label) {\n <label [for]=\"key\" class=\"col\" [class]=\"props['descriptor']?.['labelClassName'] ?? ''\"\n >{{ props!.label! | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n }\n </div>\n <ng-container #fieldComponent></ng-container>\n @if (props['descriptor']?.['helpText']) {\n <small class=\"block\">{{ props['descriptor']?.['helpText'] | translate }}</small>\n }\n @if (showError) {\n <small class=\"p-error block\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n }\n</div>\n" }]
4147
4103
  }] });
4148
4104
 
4105
+ class FormlyFieldDatepickerComponent extends FieldType {
4106
+ constructor() {
4107
+ super(...arguments);
4108
+ this.dpFormControl = new FormControl();
4109
+ this.styleClass = signal('');
4110
+ this.moduleConfig = inject(COMMONS_MODULE_CONFIG_IT, { optional: true });
4111
+ this.destroyRef = inject(DestroyRef);
4112
+ this.dateTimeInUtc = this.moduleConfig?.serialization?.dateTimeInUtc ?? false;
4113
+ this.dateTimeWithTimezone = this.moduleConfig?.serialization?.dateTimeWithTimezone ?? true;
4114
+ this.dateTimeWithMillis = this.moduleConfig?.serialization?.dateTimeWithMillis ?? true;
4115
+ }
4116
+ ngOnInit() {
4117
+ this.descriptor = this.props.descriptor;
4118
+ this.props.fieldComponent = this;
4119
+ // emit lifecycle event
4120
+ this.descriptor.nextEvent(FormFieldEventTypeEnum.ComponentLifecycle, FormlyFieldDatepickerComponent, this, {
4121
+ eventSubtype: FormFieldEventComponentSubtype.ON_INIT
4122
+ });
4123
+ // init status changes
4124
+ this.formControl.statusChanges.pipe(takeUntilDestroyed(this.destroyRef), startWith(this.formControl.status)).subscribe(status => {
4125
+ if (status === 'INVALID') {
4126
+ this.styleClass.set('ng-invalid');
4127
+ }
4128
+ else {
4129
+ this.styleClass.set('ng-valid');
4130
+ }
4131
+ if (status === 'DISABLED' && this.dpFormControl.enabled) {
4132
+ this.dpFormControl.disable({ emitEvent: false });
4133
+ }
4134
+ else if (status !== 'DISABLED' && this.dpFormControl.disabled) {
4135
+ this.dpFormControl.enable({ emitEvent: false });
4136
+ }
4137
+ });
4138
+ // init values from form to datepicker
4139
+ if (typeof this.formControl?.value === 'string' || typeof this.formControl?.value === 'number') {
4140
+ this.dpFormControl.setValue(new Date(this.formControl.value));
4141
+ this.dpFormControl.markAsPristine(); // mark as pristine only on component initialization
4142
+ }
4143
+ this.formControl.valueChanges
4144
+ .pipe(takeUntilDestroyed(this.destroyRef), filter$1(formValue => !this.areDateValuesEqual(formValue, this.dpFormControl.value)))
4145
+ .subscribe(v => {
4146
+ this.dpFormControl.setValue(new Date(v), { emitEvent: false }); // do not emit event, because it can trigger infinite loop
4147
+ });
4148
+ // listen for changes from datepicker to form
4149
+ this.dpFormControl.valueChanges
4150
+ .pipe(takeUntilDestroyed(this.destroyRef), filter$1(value => !this.areDateValuesEqual(value, this.formControl.value)))
4151
+ .subscribe(v => {
4152
+ v = this.convertDateValue(v);
4153
+ this.formControl.setValue(v);
4154
+ this.descriptor.nextEvent(FormFieldEventTypeEnum.ValueChange, FormlyFieldDatepickerComponent, this, {
4155
+ value: v
4156
+ });
4157
+ this.props.onValueChange?.(this.field, v);
4158
+ });
4159
+ }
4160
+ onBlur() {
4161
+ this.formControl.markAsTouched();
4162
+ }
4163
+ convertDateValue(value) {
4164
+ const convertDateType = this.descriptor.datePickerValueNoTime || !this.descriptor.datePickerShowTime ? 'date' : 'date-time';
4165
+ const convertDateTimeOpts = {
4166
+ utc: this.descriptor.datePickerValueUtc ?? this.dateTimeInUtc,
4167
+ noMillis: !this.dateTimeWithMillis,
4168
+ noTimezone: this.descriptor.datePickerValueNoTimezone ?? !this.dateTimeWithTimezone
4169
+ };
4170
+ if (!this.descriptor.datePickerValueAsDateObj) {
4171
+ return dateToIsoString(value, convertDateType, convertDateTimeOpts);
4172
+ }
4173
+ return value;
4174
+ }
4175
+ areDateValuesEqual(val1, val2) {
4176
+ const date1 = this.convertDateValue(val1);
4177
+ const date2 = this.convertDateValue(val2);
4178
+ return (date1 instanceof Date && date2 instanceof Date && date1.toISOString() === date2.toISOString()) || date1 === date2;
4179
+ }
4180
+ ngOnDestroy() {
4181
+ // warning: formly calls on destroy before on init
4182
+ // emit lifecycle event
4183
+ this.descriptor?.nextEvent(FormFieldEventTypeEnum.ComponentLifecycle, FormlyFieldDatepickerComponent, this, {
4184
+ eventSubtype: FormFieldEventComponentSubtype.ON_DESTROY
4185
+ });
4186
+ }
4187
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldDatepickerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
4188
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: FormlyFieldDatepickerComponent, isStandalone: true, selector: "mng-formly-field-datepicker", usesInheritance: true, ngImport: i0, template: "<p-calendar\n appendTo=\"body\"\n [class]=\"styleClass()\"\n [formControl]=\"dpFormControl\"\n [formlyAttributes]=\"field\"\n [dateFormat]=\"descriptor.datePickerFormat ?? 'dd.mm.yy'\"\n [minDate]=\"$any(descriptor.datePickerMin)\"\n [maxDate]=\"$any(descriptor.datePickerMax)\"\n [showTime]=\"descriptor.datePickerShowTime ?? false\"\n [showSeconds]=\"descriptor.datePickerShowSeconds ?? false\"\n [showIcon]=\"true\"\n [inputStyleClass]=\"descriptor.inputClassName\"\n [firstDayOfWeek]=\"1\"\n (onBlur)=\"onBlur()\">\n</p-calendar>\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i2$1.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "ngmodule", type: CalendarModule }, { kind: "component", type: i3$2.Calendar, selector: "p-calendar", inputs: ["iconDisplay", "style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale", "view", "defaultDate"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4189
+ }
4190
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FormlyFieldDatepickerComponent, decorators: [{
4191
+ type: Component,
4192
+ args: [{ standalone: true, selector: 'mng-formly-field-datepicker', imports: [ReactiveFormsModule, FormlyModule, CalendarModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<p-calendar\n appendTo=\"body\"\n [class]=\"styleClass()\"\n [formControl]=\"dpFormControl\"\n [formlyAttributes]=\"field\"\n [dateFormat]=\"descriptor.datePickerFormat ?? 'dd.mm.yy'\"\n [minDate]=\"$any(descriptor.datePickerMin)\"\n [maxDate]=\"$any(descriptor.datePickerMax)\"\n [showTime]=\"descriptor.datePickerShowTime ?? false\"\n [showSeconds]=\"descriptor.datePickerShowSeconds ?? false\"\n [showIcon]=\"true\"\n [inputStyleClass]=\"descriptor.inputClassName\"\n [firstDayOfWeek]=\"1\"\n (onBlur)=\"onBlur()\">\n</p-calendar>\n" }]
4193
+ }] });
4194
+
4149
4195
  const formlyWrappersConfig = [
4150
4196
  { name: 'field', component: FormlyFieldWrapperComponent },
4151
4197
  { name: 'field-no-label', component: FormlyFieldNoLabelWrapperComponent }
@@ -4218,12 +4264,13 @@ const formlyTypesConfig = [
4218
4264
  },
4219
4265
  {
4220
4266
  name: 'datepicker',
4221
- extends: 'input',
4267
+ component: FormlyFieldDatepickerComponent,
4222
4268
  defaultOptions: {
4223
4269
  props: {
4224
4270
  type: 'datepicker'
4225
4271
  }
4226
- }
4272
+ },
4273
+ wrappers: ['field']
4227
4274
  },
4228
4275
  {
4229
4276
  name: 'mask',
@@ -4426,86 +4473,60 @@ function commonsFormlyConfigProvider(translate, datePipe, config = {}) {
4426
4473
  class TableviewComponent {
4427
4474
  constructor() {
4428
4475
  this.viewContainer = inject(ViewContainer, { optional: true });
4429
- this.actions = [];
4430
- this.tableActions = [];
4431
- this.toolbarLeftActions = [];
4432
- this.toolbarRightActions = [];
4433
- this.hasItemSelectionAction = false;
4434
- this.selectedItems = [];
4476
+ this.descriptor = input.required();
4477
+ this.dataProvider = input();
4478
+ this.actions = input([]);
4479
+ this.toolbarLeftActions = computed(() => this.filterActionsByPositions(this.actions(), [ActionPositionEnum.ToolbarLeft]));
4480
+ this.toolbarRightActions = computed(() => this.filterActionsByPositions(this.actions(), [ActionPositionEnum.ToolbarRight]).reverse());
4481
+ this.tableActions = computed(() => this.filterActionsByPositions(this.actions(), [ActionPositionEnum.TableHeader, ActionPositionEnum.RowInline, ActionPositionEnum.RowClick]));
4482
+ this.tableParams = signal(undefined);
4483
+ this.hasItemSelectionAction = computed(() => [...this.toolbarLeftActions(), ...this.toolbarRightActions()].some(e => e.hasItemsSelection));
4484
+ this.selectedItems = signal([]);
4485
+ this.templates = contentChildren(TemplateDirective);
4486
+ this.footerTemplate = computed(() => findTemplateByName([...this.templates()], 'footer'));
4487
+ this.rowExpandTemplate = computed(() => findTemplateByName([...this.templates()], 'rowExpandContent'));
4435
4488
  }
4436
4489
  ngOnInit() {
4437
4490
  if (this.viewContainer) {
4438
- this.viewContainer.actions = this.actions;
4491
+ this.viewContainer.actions = this.actions();
4439
4492
  }
4440
- if (this.viewContainer && this.dataProvider) {
4441
- this.viewContainer.dataProvider = this.dataProvider;
4493
+ const dataProvider = this.dataProvider();
4494
+ if (this.viewContainer && dataProvider) {
4495
+ this.viewContainer.dataProvider = dataProvider;
4442
4496
  }
4443
- for (const action of this.actions.filter(value => value.positionTableviewCategories?.includes(TableviewActionDefaultCategories.READ) ?? true)) {
4444
- switch (action.position) {
4445
- case ActionPositionEnum.ToolbarLeft:
4446
- this.toolbarLeftActions.push(action);
4447
- break;
4448
- case ActionPositionEnum.ToolbarRight:
4449
- this.toolbarRightActions.push(action);
4450
- break;
4451
- case ActionPositionEnum.TableHeader:
4452
- case ActionPositionEnum.RowInline:
4453
- case ActionPositionEnum.RowClick:
4454
- this.tableActions.push(action);
4455
- break;
4456
- }
4457
- }
4458
- this.toolbarRightActions = this.toolbarRightActions.reverse();
4459
- this.hasItemSelectionAction = [...this.toolbarLeftActions, ...this.toolbarRightActions].some(e => e.hasItemsSelection);
4460
- }
4461
- ngAfterContentInit() {
4462
- this.templates.forEach(template => {
4463
- switch (template.getType()) {
4464
- case 'footer':
4465
- this.footerTemplate = template.template;
4466
- break;
4467
- }
4468
- });
4469
4497
  }
4470
4498
  onTableLoad(event) {
4471
- this.tableParams = event.params;
4499
+ this.tableParams.set(event.params);
4472
4500
  }
4473
4501
  selectionChange(selectedItems) {
4474
- this.selectedItems = selectedItems;
4502
+ this.selectedItems.set(selectedItems);
4503
+ }
4504
+ filterActionsByPositions(actions, actionPositions) {
4505
+ return actions.filter(action => (action.positionTableviewCategories?.includes(TableviewActionDefaultCategories.READ) ?? true) && actionPositions.includes(action.position));
4475
4506
  }
4476
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: TableviewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4477
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.2.1", type: TableviewComponent, isStandalone: true, selector: "mng-tableview", inputs: { descriptor: "descriptor", dataProvider: "dataProvider", actions: "actions" }, providers: [provideViewContainer()], queries: [{ propertyName: "templates", predicate: TemplateDirective }], ngImport: i0, template: "<div class=\"mng-tableview\">\n <div class=\"card\">\n @if (toolbarLeftActions.length > 0 || toolbarRightActions.length > 0) {\n <p-toolbar styleClass=\"mb-4\">\n <ng-template pTemplate=\"left\">\n @for (action of toolbarLeftActions; track action) {\n <mng-action [action]=\"action\" [dataListParams]=\"tableParams\" [hostComponent]=\"this\" [selectedItems]=\"selectedItems\"></mng-action>\n }\n </ng-template>\n <ng-template pTemplate=\"right\">\n @for (action of toolbarRightActions; track action) {\n <mng-action [action]=\"action\" [dataListParams]=\"tableParams\" [hostComponent]=\"this\" [selectedItems]=\"selectedItems\"></mng-action>\n }\n </ng-template>\n </p-toolbar>\n }\n\n <mng-action-table\n [descriptor]=\"descriptor.table\"\n [dataProvider]=\"dataProvider\"\n [useQueryParams]=\"true\"\n [actions]=\"tableActions\"\n [selectionEnabled]=\"hasItemSelectionAction\"\n [selectionMode]=\"'multiple'\"\n (tableLoad)=\"onTableLoad($event)\"\n (selectionChange)=\"selectionChange($event)\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-between table-header\">\n <h5 class=\"p-0 m-0\">{{ descriptor.tableTitle ?? '' | translate }}</h5>\n </div>\n </ng-template>\n\n @if (footerTemplate) {\n <ng-template mngTemplate=\"footer\" let-data=\"data\" let-totalCount=\"totalCount\">\n <ng-container *ngTemplateOutlet=\"footerTemplate; context: {data, totalCount}\"></ng-container>\n </ng-template>\n }\n </mng-action-table>\n </div>\n\n <router-outlet></router-outlet>\n</div>\n", dependencies: [{ kind: "ngmodule", type: ToolbarModule }, { kind: "component", type: i2$3.Toolbar, selector: "p-toolbar", inputs: ["style", "styleClass", "ariaLabelledBy"] }, { kind: "ngmodule", type: SharedModule }, { kind: "directive", type: i2$4.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "dataListParams", "dataProvider", "hostComponent", "route", "disabled", "loading", "selectedItems"], outputs: ["finish"] }, { kind: "component", type: ActionTableComponent, selector: "mng-action-table", inputs: ["descriptor", "items", "result", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "globalFilterFields", "actions", "captionComponent", "columnActionComponent", "columnActionMinWidth"], outputs: ["tableLoad", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }, { kind: "directive", type: TemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }, { kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] }); }
4507
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: TableviewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4508
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", type: TableviewComponent, isStandalone: true, selector: "mng-tableview", inputs: { descriptor: { classPropertyName: "descriptor", publicName: "descriptor", isSignal: true, isRequired: true, transformFunction: null }, dataProvider: { classPropertyName: "dataProvider", publicName: "dataProvider", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideViewContainer()], queries: [{ propertyName: "templates", predicate: TemplateDirective, isSignal: true }], ngImport: i0, template: "<div class=\"mng-tableview\">\n <div class=\"card\">\n @if (toolbarLeftActions().length > 0 || toolbarRightActions().length > 0) {\n <p-toolbar styleClass=\"mb-4\">\n <ng-template pTemplate=\"left\">\n @for (action of toolbarLeftActions(); track action) {\n <mng-action [action]=\"action\" [dataListParams]=\"tableParams()\" [hostComponent]=\"this\" [selectedItems]=\"selectedItems()\"></mng-action>\n }\n </ng-template>\n <ng-template pTemplate=\"right\">\n @for (action of toolbarRightActions(); track action) {\n <mng-action [action]=\"action\" [dataListParams]=\"tableParams()\" [hostComponent]=\"this\" [selectedItems]=\"selectedItems()\"></mng-action>\n }\n </ng-template>\n </p-toolbar>\n }\n\n <mng-action-table\n [descriptor]=\"descriptor().table\"\n [dataProvider]=\"dataProvider()\"\n [useQueryParams]=\"true\"\n [actions]=\"tableActions()\"\n [selectionEnabled]=\"hasItemSelectionAction()\"\n [selectionMode]=\"'multiple'\"\n (tableLoad)=\"onTableLoad($event)\"\n (selectionChange)=\"selectionChange($event)\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-between table-header\">\n <h5 class=\"p-0 m-0\">{{ descriptor().tableTitle ?? '' | translate }}</h5>\n </div>\n </ng-template>\n @if (rowExpandTemplate()) {\n <ng-template mngTemplate=\"rowExpandContent\" let-item=\"rowItem\">\n <ng-container *ngTemplateOutlet=\"rowExpandTemplate(); context: {rowItem: item}\"></ng-container>\n </ng-template>\n }\n\n @if (footerTemplate()) {\n <ng-template mngTemplate=\"footer\" let-data=\"data\" let-totalCount=\"totalCount\">\n <ng-container *ngTemplateOutlet=\"footerTemplate(); context: {data, totalCount}\"></ng-container>\n </ng-template>\n }\n </mng-action-table>\n </div>\n\n <router-outlet></router-outlet>\n</div>\n", dependencies: [{ kind: "ngmodule", type: ToolbarModule }, { kind: "component", type: i2$2.Toolbar, selector: "p-toolbar", inputs: ["style", "styleClass", "ariaLabelledBy"] }, { kind: "ngmodule", type: SharedModule }, { kind: "directive", type: i2$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "dataListParams", "dataProvider", "hostComponent", "route", "disabled", "loading", "selectedItems"], outputs: ["finish"] }, { kind: "component", type: ActionTableComponent, selector: "mng-action-table", inputs: ["descriptor", "items", "result", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "globalFilterFields", "actions", "captionComponent", "columnActionComponent", "columnActionMinWidth"], outputs: ["tableLoad", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }, { kind: "directive", type: TemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }, { kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4478
4509
  }
4479
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: TableviewComponent, decorators: [{
4510
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: TableviewComponent, decorators: [{
4480
4511
  type: Component,
4481
- args: [{ standalone: true, selector: 'mng-tableview', imports: [ToolbarModule, SharedModule, TranslateModule, NgTemplateOutlet, ActionComponent, ActionTableComponent, TemplateDirective, RouterOutlet], providers: [provideViewContainer()], template: "<div class=\"mng-tableview\">\n <div class=\"card\">\n @if (toolbarLeftActions.length > 0 || toolbarRightActions.length > 0) {\n <p-toolbar styleClass=\"mb-4\">\n <ng-template pTemplate=\"left\">\n @for (action of toolbarLeftActions; track action) {\n <mng-action [action]=\"action\" [dataListParams]=\"tableParams\" [hostComponent]=\"this\" [selectedItems]=\"selectedItems\"></mng-action>\n }\n </ng-template>\n <ng-template pTemplate=\"right\">\n @for (action of toolbarRightActions; track action) {\n <mng-action [action]=\"action\" [dataListParams]=\"tableParams\" [hostComponent]=\"this\" [selectedItems]=\"selectedItems\"></mng-action>\n }\n </ng-template>\n </p-toolbar>\n }\n\n <mng-action-table\n [descriptor]=\"descriptor.table\"\n [dataProvider]=\"dataProvider\"\n [useQueryParams]=\"true\"\n [actions]=\"tableActions\"\n [selectionEnabled]=\"hasItemSelectionAction\"\n [selectionMode]=\"'multiple'\"\n (tableLoad)=\"onTableLoad($event)\"\n (selectionChange)=\"selectionChange($event)\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-between table-header\">\n <h5 class=\"p-0 m-0\">{{ descriptor.tableTitle ?? '' | translate }}</h5>\n </div>\n </ng-template>\n\n @if (footerTemplate) {\n <ng-template mngTemplate=\"footer\" let-data=\"data\" let-totalCount=\"totalCount\">\n <ng-container *ngTemplateOutlet=\"footerTemplate; context: {data, totalCount}\"></ng-container>\n </ng-template>\n }\n </mng-action-table>\n </div>\n\n <router-outlet></router-outlet>\n</div>\n" }]
4482
- }], propDecorators: { descriptor: [{
4483
- type: Input,
4484
- args: [{ required: true }]
4485
- }], dataProvider: [{
4486
- type: Input
4487
- }], actions: [{
4488
- type: Input
4489
- }], templates: [{
4490
- type: ContentChildren,
4491
- args: [TemplateDirective]
4492
- }] } });
4512
+ args: [{ standalone: true, selector: 'mng-tableview', imports: [ToolbarModule, SharedModule, TranslateModule, NgTemplateOutlet, ActionComponent, ActionTableComponent, TemplateDirective, RouterOutlet], providers: [provideViewContainer()], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"mng-tableview\">\n <div class=\"card\">\n @if (toolbarLeftActions().length > 0 || toolbarRightActions().length > 0) {\n <p-toolbar styleClass=\"mb-4\">\n <ng-template pTemplate=\"left\">\n @for (action of toolbarLeftActions(); track action) {\n <mng-action [action]=\"action\" [dataListParams]=\"tableParams()\" [hostComponent]=\"this\" [selectedItems]=\"selectedItems()\"></mng-action>\n }\n </ng-template>\n <ng-template pTemplate=\"right\">\n @for (action of toolbarRightActions(); track action) {\n <mng-action [action]=\"action\" [dataListParams]=\"tableParams()\" [hostComponent]=\"this\" [selectedItems]=\"selectedItems()\"></mng-action>\n }\n </ng-template>\n </p-toolbar>\n }\n\n <mng-action-table\n [descriptor]=\"descriptor().table\"\n [dataProvider]=\"dataProvider()\"\n [useQueryParams]=\"true\"\n [actions]=\"tableActions()\"\n [selectionEnabled]=\"hasItemSelectionAction()\"\n [selectionMode]=\"'multiple'\"\n (tableLoad)=\"onTableLoad($event)\"\n (selectionChange)=\"selectionChange($event)\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-between table-header\">\n <h5 class=\"p-0 m-0\">{{ descriptor().tableTitle ?? '' | translate }}</h5>\n </div>\n </ng-template>\n @if (rowExpandTemplate()) {\n <ng-template mngTemplate=\"rowExpandContent\" let-item=\"rowItem\">\n <ng-container *ngTemplateOutlet=\"rowExpandTemplate(); context: {rowItem: item}\"></ng-container>\n </ng-template>\n }\n\n @if (footerTemplate()) {\n <ng-template mngTemplate=\"footer\" let-data=\"data\" let-totalCount=\"totalCount\">\n <ng-container *ngTemplateOutlet=\"footerTemplate(); context: {data, totalCount}\"></ng-container>\n </ng-template>\n }\n </mng-action-table>\n </div>\n\n <router-outlet></router-outlet>\n</div>\n" }]
4513
+ }] });
4493
4514
 
4494
4515
  class TableviewRouteComponent {
4495
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: TableviewRouteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4496
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.1", type: TableviewRouteComponent, isStandalone: true, selector: "mng-tableview-route", inputs: { tableview: "tableview" }, ngImport: i0, template: "<mng-tableview [descriptor]=\"tableview.descriptor\" [dataProvider]=\"tableview.dataProvider\" [actions]=\"tableview.actions\"> </mng-tableview>\n", dependencies: [{ kind: "component", type: TableviewComponent, selector: "mng-tableview", inputs: ["descriptor", "dataProvider", "actions"] }] }); }
4516
+ constructor() {
4517
+ this.tableview = input.required();
4518
+ }
4519
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: TableviewRouteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4520
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.3.4", type: TableviewRouteComponent, isStandalone: true, selector: "mng-tableview-route", inputs: { tableview: { classPropertyName: "tableview", publicName: "tableview", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<mng-tableview [descriptor]=\"tableview().descriptor\" [dataProvider]=\"tableview().dataProvider\" [actions]=\"tableview().actions\"> </mng-tableview>\n", dependencies: [{ kind: "component", type: TableviewComponent, selector: "mng-tableview", inputs: ["descriptor", "dataProvider", "actions"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4497
4521
  }
4498
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: TableviewRouteComponent, decorators: [{
4522
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: TableviewRouteComponent, decorators: [{
4499
4523
  type: Component,
4500
- args: [{ standalone: true, selector: 'mng-tableview-route', imports: [TableviewComponent], template: "<mng-tableview [descriptor]=\"tableview.descriptor\" [dataProvider]=\"tableview.dataProvider\" [actions]=\"tableview.actions\"> </mng-tableview>\n" }]
4501
- }], propDecorators: { tableview: [{
4502
- type: Input,
4503
- args: [{ required: true }]
4504
- }] } });
4524
+ args: [{ standalone: true, selector: 'mng-tableview-route', imports: [TableviewComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-tableview [descriptor]=\"tableview().descriptor\" [dataProvider]=\"tableview().dataProvider\" [actions]=\"tableview().actions\"> </mng-tableview>\n" }]
4525
+ }] });
4505
4526
 
4506
- class TableviewRouteBuilderInternal extends RouteBuilder {
4507
- constructor(path, options) {
4508
- super({ path: path, component: options.component ?? TableviewRouteBuilder });
4527
+ class TableviewRouteBuilder extends RouteBuilder {
4528
+ constructor(path, component, loadComponent) {
4529
+ super({ path: path, component, loadComponent });
4509
4530
  this.path = path;
4510
4531
  this.isFromComponent = true;
4511
4532
  this.routeData = { breadcrumb: null };
@@ -4516,28 +4537,6 @@ class TableviewRouteBuilderInternal extends RouteBuilder {
4516
4537
  this.hasAdd = true;
4517
4538
  this.addPath = 'add';
4518
4539
  this.hasDelete = true;
4519
- if (!options.component) {
4520
- this.isFromComponent = false;
4521
- this.descriptor = options.descriptor;
4522
- this.dataProvider = options.dataProvider;
4523
- this.actions = options.actions;
4524
- this.hasDetails = false;
4525
- this.hasAdd = false;
4526
- this.hasEdit = false;
4527
- if (this.actions) {
4528
- for (const action of this.actions) {
4529
- if (action instanceof ActionEditorDetailsDescriptorInst) {
4530
- this.hasDetails = true;
4531
- }
4532
- else if (action instanceof ActionEditorAddDescriptorInst) {
4533
- this.hasAdd = true;
4534
- }
4535
- else if (action instanceof ActionEditorEditDescriptorInst) {
4536
- this.hasEdit = true;
4537
- }
4538
- }
4539
- }
4540
- }
4541
4540
  }
4542
4541
  withReadOnly(permissions) {
4543
4542
  if (permissions) {
@@ -4643,12 +4642,11 @@ class TableviewRouteBuilderInternal extends RouteBuilder {
4643
4642
  // copy route data for children, reset breadcrumbs menu items and permission
4644
4643
  const childrenRouteData = {
4645
4644
  ...this.routeData,
4646
- breadcrumb: null,
4647
- menuItems: undefined,
4648
- permissions: undefined
4645
+ breadcrumb: null
4649
4646
  };
4647
+ const loadActionRoute = () => Promise.resolve().then(function () { return actionRoute_component; });
4650
4648
  // list route
4651
- const rootChildRouteBuilder = RouteBuilder.create('', ActionRouteComponent);
4649
+ const rootChildRouteBuilder = createLazyRoute('', loadActionRoute);
4652
4650
  rootChildRouteBuilder.withData({ ...childrenRouteData });
4653
4651
  if (this.tableviewPermissions?.[TableviewActionDefaultCategories.READ]) {
4654
4652
  rootChildRouteBuilder.withPermissions(this.tableviewPermissions[TableviewActionDefaultCategories.READ]);
@@ -4656,7 +4654,7 @@ class TableviewRouteBuilderInternal extends RouteBuilder {
4656
4654
  this.addChildBuilder(rootChildRouteBuilder);
4657
4655
  // add route
4658
4656
  if (this.hasAdd) {
4659
- const routeBuilder = RouteBuilder.create(this.addPath, ActionRouteComponent);
4657
+ const routeBuilder = createLazyRoute(this.addPath, loadActionRoute);
4660
4658
  routeBuilder.withData({ ...childrenRouteData });
4661
4659
  if (this.tableviewPermissions?.[TableviewActionDefaultCategories.ADD]) {
4662
4660
  routeBuilder.withPermissions(this.tableviewPermissions[TableviewActionDefaultCategories.ADD]);
@@ -4665,7 +4663,7 @@ class TableviewRouteBuilderInternal extends RouteBuilder {
4665
4663
  routeBuilder.withCanDeactivate(unsavedChangesGuard);
4666
4664
  }
4667
4665
  if (this.hasDetails) {
4668
- const routeBuilder = RouteBuilder.create(this.detailsPath, ActionRouteComponent);
4666
+ const routeBuilder = createLazyRoute(this.detailsPath, loadActionRoute);
4669
4667
  routeBuilder.withData({ ...childrenRouteData });
4670
4668
  if (this.tableviewPermissions?.[TableviewActionDefaultCategories.DETAILS]) {
4671
4669
  routeBuilder.withPermissions(this.tableviewPermissions[TableviewActionDefaultCategories.DETAILS]);
@@ -4673,7 +4671,7 @@ class TableviewRouteBuilderInternal extends RouteBuilder {
4673
4671
  this.addChildBuilder(routeBuilder);
4674
4672
  }
4675
4673
  if (this.hasEdit) {
4676
- const routeBuilder = RouteBuilder.create(this.editPath, ActionRouteComponent);
4674
+ const routeBuilder = createLazyRoute(this.editPath, loadActionRoute);
4677
4675
  routeBuilder.withData({ ...childrenRouteData });
4678
4676
  if (this.tableviewPermissions?.[TableviewActionDefaultCategories.EDIT]) {
4679
4677
  routeBuilder.withPermissions(this.tableviewPermissions[TableviewActionDefaultCategories.EDIT]);
@@ -4691,13 +4689,11 @@ class TableviewRouteBuilderInternal extends RouteBuilder {
4691
4689
  return menuItemPermission;
4692
4690
  }
4693
4691
  }
4694
- class TableviewRouteBuilder {
4695
- static fromComponent(path, component) {
4696
- return new TableviewRouteBuilderInternal(path, { component });
4697
- }
4698
- static from(path, descriptor, dataProvider, actions) {
4699
- return new TableviewRouteBuilderInternal(path, { descriptor, dataProvider, actions });
4700
- }
4692
+ function createTableviewRoute(path, component) {
4693
+ return new TableviewRouteBuilder(path, component);
4694
+ }
4695
+ function createTableviewLazyRoute(path, loadComponent) {
4696
+ return new TableviewRouteBuilder(path, undefined, loadComponent);
4701
4697
  }
4702
4698
 
4703
4699
  /**
@@ -4709,6 +4705,7 @@ function withTableview(config) {
4709
4705
  return {
4710
4706
  type: CommonsFeatureTypeEnum.Tableview,
4711
4707
  providers: [
4708
+ DatePipe,
4712
4709
  NavigationService,
4713
4710
  {
4714
4711
  provide: COMMONS_TABLEVIEW_FEATURE_CONFIG_IT,
@@ -4752,5 +4749,5 @@ function withTableview(config) {
4752
4749
  * Generated bundle index. Do not edit.
4753
4750
  */
4754
4751
 
4755
- export { ACTION_EDITOR_COMPONENT_IT, ActionComponent, ActionContext, ActionEditorComponent, ActionErrorMapperService, ActionExecutorService, ActionInstance, ActionInstanceStateEnum, ActionRouteComponent, ActionTableComponent, COMMONS_TABLEVIEW_FEATURE_CONFIG_IT, ComponentActionExecutorService, DataLanguageDropdownComponent, DefaultActionErrorMapperService, DefaultDataProviderExecutor, EditorFormlyUtil, FormEditorComponent, FormlyFieldActionComponent, FormlyFieldAutocompleteComponent, FormlyFieldCustomComponent, FormlyFieldDropdownComponent, FormlyFieldFieldsetComponent, FormlyFieldInputComponent, FormlyFieldLabelComponent, FormlyFieldLookupDialogComponent, FormlyFieldNoLabelWrapperComponent, FormlyFieldTableDialogFormComponent, FormlyFieldTableDialogMultiselectComponent, FormlyFieldTabsComponent, FormlyFieldWrapperComponent, I18nUtils, NavigationService, RootActionExecutorService, TableviewComponent, TableviewRouteBuilder, TableviewRouteBuilderInternal, TableviewRouteComponent, ViewContainer, actionNotificationError, actionNotificationSuccess, calculateTableColumnActionWidth, commonsFormlyConfigProvider, formlyTypesConfig, formlyWrappersConfig, getActionButtonRoundedWidth, getEmailValidationMessage, getFormEditorInfoMessage, getFormEditorWarningMessage, getFormlyValidationMessages, getMaxDateValidationMessage, getMaxLengthValidationMessage, getMaxValidationMessage, getMinDateValidationMessage, getMinLengthValidationMessage, getMinValidationMessage, getRequiredValidationMessage, getTableCellPaddingX, getTextPatternValidationMessage, provideActionExecutor, provideViewContainer, unsavedChangesGuard, withTableview };
4752
+ export { ACTION_EDITOR_COMPONENT_IT, ActionComponent, ActionContext, ActionEditorComponent, ActionErrorMapperService, ActionExecutorService, ActionInstance, ActionInstanceStateEnum, ActionTableComponent, COMMONS_TABLEVIEW_FEATURE_CONFIG_IT, ComponentActionExecutorService, DataLanguageDropdownComponent, DefaultActionErrorMapperService, DefaultDataProviderExecutor, FormEditorComponent, FormlyFieldActionComponent, FormlyFieldAutocompleteComponent, FormlyFieldCustomComponent, FormlyFieldDropdownComponent, FormlyFieldFieldsetComponent, FormlyFieldInputComponent, FormlyFieldLabelComponent, FormlyFieldLookupDialogComponent, FormlyFieldNoLabelWrapperComponent, FormlyFieldTableDialogFormComponent, FormlyFieldTableDialogMultiselectComponent, FormlyFieldTabsComponent, FormlyFieldWrapperComponent, NavigationService, RootActionExecutorService, TableviewComponent, TableviewRouteBuilder, TableviewRouteComponent, ViewContainer, actionNotificationError, actionNotificationSuccess, addAsyncValidationsToFormlyField, addValidationsToFormlyField, calculateTableColumnActionWidth, commonsFormlyConfigProvider, createFormlyConfigFromDescriptor, createFormlyField, createFormlyFields, createFormlyGroupType, createFormlyLocalizationsTab, createFormlyTabType, createFormlyValidation, createTableviewLazyRoute, createTableviewRoute, formlyTypesConfig, formlyWrappersConfig, getActionButtonRoundedWidth, getEmailValidationMessage, getFormEditorInfoMessage, getFormEditorWarningMessage, getFormlyValidationMessages, getI18nActionEditorTitleAsync, getI18nActionParams, getI18nActionParamsAsync, getI18nActionTitleAsync, getI18nForAction, getI18nForActionAsync, getMaxDateValidationMessage, getMaxLengthValidationMessage, getMaxValidationMessage, getMinDateValidationMessage, getMinLengthValidationMessage, getMinValidationMessage, getRequiredValidationMessage, getTableCellPaddingX, getTextPatternValidationMessage, populateI18nActionParams, provideActionExecutor, provideViewContainer, unsavedChangesGuard, withTableview };
4756
4753
  //# sourceMappingURL=mediusinc-mng-commons-tableview.mjs.map