@rxap/form-system 21.0.1-dev.0 → 21.0.1

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 (358) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/compodoc/changelog.html +38 -0
  3. package/compodoc/classes/ExtractOptionsDataSourceMixin.html +24 -80
  4. package/compodoc/classes/ExtractRemoteMethodsMixin.html +36 -52
  5. package/compodoc/dependencies.html +11 -11
  6. package/compodoc/directives/AbstractOptionsFromMethodDirective.html +1354 -0
  7. package/compodoc/directives/AutocompleteOptionsFromMethodDirective.html +376 -229
  8. package/compodoc/directives/ControlHideShowDirective.html +43 -152
  9. package/compodoc/directives/ForFormArrayItemsDirective.html +6 -101
  10. package/compodoc/directives/FormArrayAddItemButtonDirective.html +84 -222
  11. package/compodoc/directives/FormArrayItemButton.html +182 -200
  12. package/compodoc/directives/FormArrayItemRemoveButtonDirective.html +230 -211
  13. package/compodoc/directives/FormArrayItemRestoreButtonDirective.html +188 -158
  14. package/compodoc/directives/FormArrayRemovableDirective.html +39 -61
  15. package/compodoc/directives/FormSystemControlDirective.html +64 -148
  16. package/compodoc/directives/InputSelectOptionsDirective.html +390 -268
  17. package/compodoc/directives/IsEqualToDirective.html +61 -117
  18. package/compodoc/directives/IsSelectableValueDirective.html +50 -204
  19. package/compodoc/directives/OptionsFromMethodDirective.html +380 -164
  20. package/compodoc/directives/OptionsFromRemoteMethodDirective.html +123 -212
  21. package/compodoc/graph/dependencies.svg +4 -70
  22. package/compodoc/injectables/ControlDataSource.html +4 -10
  23. package/compodoc/injectables/NoopResolveMethod.html +48 -40
  24. package/compodoc/injectables/SubmitContextFormAdapter.html +4 -9
  25. package/compodoc/interfaces/AutocompleteOptionsFromMethodDirectiveParameters.html +46 -38
  26. package/compodoc/interfaces/AutocompleteOptionsFromMethodDirectiveSettings.html +46 -38
  27. package/compodoc/interfaces/AutocompleteOptionsFromRemoteMethodTemplateContext.html +46 -38
  28. package/compodoc/interfaces/ControlHideShowOptions.html +10 -30
  29. package/compodoc/interfaces/ForFormArrayItemsDirectiveContext.html +6 -17
  30. package/compodoc/interfaces/InputSelectOptionsSettings.html +26 -49
  31. package/compodoc/interfaces/InputSelectOptionsTemplateContext.html +26 -49
  32. package/compodoc/interfaces/OptionsFromMethodDirectiveSettings.html +63 -45
  33. package/compodoc/interfaces/OptionsFromMethodTemplateContext.html +63 -45
  34. package/compodoc/interfaces/OptionsFromRemoteMethodTemplateContext.html +34 -50
  35. package/compodoc/js/menu-wc.js +3 -32
  36. package/compodoc/js/menu-wc_es5.js +1 -1
  37. package/compodoc/js/search/search_index.js +2 -2
  38. package/compodoc/modules.html +0 -17
  39. package/compodoc/overview.html +2 -114
  40. package/compodoc/properties.html +1 -1
  41. package/docs/documentation.json +8836 -7240
  42. package/docs/html/assets/hierarchy.js +1 -1
  43. package/docs/html/assets/navigation.js +1 -1
  44. package/docs/html/assets/search.js +1 -1
  45. package/docs/html/classes/AbstractOptionsFromMethodDirective.html +38 -0
  46. package/docs/html/classes/AutocompleteOptionsFromMethodDirective.html +19 -16
  47. package/docs/html/classes/ControlDataSource.html +13 -13
  48. package/docs/html/classes/ControlHideShowDirective.html +5 -5
  49. package/docs/html/classes/ExtractControlFromParentMixin.html +2 -2
  50. package/docs/html/classes/ExtractControlMixin.html +2 -2
  51. package/docs/html/classes/ExtractDataSourcesMixin.html +2 -2
  52. package/docs/html/classes/ExtractFormDefinitionMixin.html +2 -2
  53. package/docs/html/classes/ExtractFunctionMixin.html +2 -2
  54. package/docs/html/classes/ExtractFunctionsMixin.html +2 -2
  55. package/docs/html/classes/ExtractIsValueFunctionMixin.html +2 -2
  56. package/docs/html/classes/ExtractMethodMixin.html +2 -2
  57. package/docs/html/classes/ExtractMethodsMixin.html +2 -2
  58. package/docs/html/classes/ExtractOptionsDataSourceMixin.html +2 -4
  59. package/docs/html/classes/ExtractOptionsMethodMixin.html +2 -2
  60. package/docs/html/classes/ExtractRemoteMethodsMixin.html +2 -2
  61. package/docs/html/classes/ExtractResolveMethodMixin.html +2 -2
  62. package/docs/html/classes/ExtractToDisplayFunctionMixin.html +2 -2
  63. package/docs/html/classes/ForFormArrayItemsDirective.html +4 -4
  64. package/docs/html/classes/FormArrayAddItemButtonDirective.html +4 -4
  65. package/docs/html/classes/FormArrayItemButton.html +4 -4
  66. package/docs/html/classes/FormArrayItemRemoveButtonDirective.html +5 -5
  67. package/docs/html/classes/FormArrayItemRestoreButtonDirective.html +4 -4
  68. package/docs/html/classes/FormArrayRemovableDirective.html +4 -4
  69. package/docs/html/classes/FormSystemControlDirective.html +8 -8
  70. package/docs/html/classes/InputSelectOptionsDirective.html +10 -7
  71. package/docs/html/classes/IsEqualToDirective.html +5 -5
  72. package/docs/html/classes/IsSelectableValueDirective.html +4 -5
  73. package/docs/html/classes/NoopResolveMethod.html +2 -2
  74. package/docs/html/classes/OptionsFromMethodDirective.html +24 -24
  75. package/docs/html/classes/OptionsFromRemoteMethodDirective.html +5 -11
  76. package/docs/html/classes/RxapFormSystemError.html +5 -5
  77. package/docs/html/classes/SubmitContextFormAdapter.html +10 -10
  78. package/docs/html/classes/TestNgControl.html +4 -4
  79. package/docs/html/enums/FormSystemMetadataKeys.html +2 -2
  80. package/docs/html/functions/ApplyUseFunctionAdapters.html +1 -1
  81. package/docs/html/functions/ApplyUseMethodAdapters.html +1 -1
  82. package/docs/html/functions/ComposeOptionsTransformers.html +1 -1
  83. package/docs/html/functions/FormContextFromActivatedRouteFactory.html +1 -1
  84. package/docs/html/functions/ResolveByUuidParameter.html +1 -1
  85. package/docs/html/functions/ResolveByUuidResultFactory.html +1 -1
  86. package/docs/html/functions/SubmitContextFormAdapterFactory.html +1 -1
  87. package/docs/html/functions/UseAutocompleteIsValueFunction.html +1 -1
  88. package/docs/html/functions/UseAutocompleteOptionsMethod.html +1 -1
  89. package/docs/html/functions/UseAutocompleteResolveMethod.html +1 -1
  90. package/docs/html/functions/UseAutocompleteToDisplayFunction.html +1 -1
  91. package/docs/html/functions/UseComponent.html +1 -1
  92. package/docs/html/functions/UseDataSource.html +1 -1
  93. package/docs/html/functions/UseFormComponent.html +2 -2
  94. package/docs/html/functions/UseFunction.html +1 -1
  95. package/docs/html/functions/UseHideFunction.html +1 -1
  96. package/docs/html/functions/UseIsValueFunction.html +1 -1
  97. package/docs/html/functions/UseMethod.html +1 -1
  98. package/docs/html/functions/UseOptionsDataSource.html +1 -1
  99. package/docs/html/functions/UseOptionsMethod.html +1 -1
  100. package/docs/html/functions/UseOptionsRemoteMethod.html +1 -1
  101. package/docs/html/functions/UseRemoteMethod.html +1 -1
  102. package/docs/html/functions/UseResolveMethod.html +1 -1
  103. package/docs/html/functions/UseShowFunction.html +1 -1
  104. package/docs/html/functions/UseToDisplayFunction.html +1 -1
  105. package/docs/html/functions/controlDataSource-1.html +1 -1
  106. package/docs/html/hierarchy.html +1 -1
  107. package/docs/html/index.html +2 -2
  108. package/docs/html/interfaces/AutocompleteOptionsFromMethodDirectiveParameters.html +2 -2
  109. package/docs/html/interfaces/AutocompleteOptionsFromMethodDirectiveSettings.html +2 -2
  110. package/docs/html/interfaces/AutocompleteOptionsFromRemoteMethodTemplateContext.html +2 -2
  111. package/docs/html/interfaces/ControlHideShowOptions.html +2 -2
  112. package/docs/html/interfaces/ControlWithDataSource.html +2 -2
  113. package/docs/html/interfaces/ForFormArrayItemsDirectiveContext.html +2 -2
  114. package/docs/html/interfaces/InputSelectOptionsSettings.html +4 -4
  115. package/docs/html/interfaces/InputSelectOptionsTemplateContext.html +2 -2
  116. package/docs/html/interfaces/OptionsFromMethodDirectiveSettings.html +1 -1
  117. package/docs/html/interfaces/OptionsFromMethodTemplateContext.html +2 -2
  118. package/docs/html/interfaces/OptionsFromRemoteMethodTemplateContext.html +2 -2
  119. package/docs/html/interfaces/UseDataSourceSettings.html +2 -2
  120. package/docs/html/interfaces/UseDataSourceValue.html +3 -3
  121. package/docs/html/interfaces/UseFunctionConfig.html +2 -2
  122. package/docs/html/interfaces/UseFunctionDefinition.html +2 -2
  123. package/docs/html/interfaces/UseMethodConfig.html +2 -2
  124. package/docs/html/interfaces/UseMethodDefinition.html +2 -2
  125. package/docs/html/modules.html +1 -1
  126. package/docs/html/types/ControlHideShowFunction.html +1 -1
  127. package/docs/html/types/FunctionParameterAdapterFunction.html +1 -1
  128. package/docs/html/types/FunctionResultAdapterFunction.html +1 -1
  129. package/docs/html/types/MethodParameterAdapterFunction.html +1 -1
  130. package/docs/html/types/MethodResultAdapterFunction.html +1 -1
  131. package/docs/html/types/OptionsMethod.html +1 -1
  132. package/docs/html/types/UseFunctionType.html +1 -1
  133. package/docs/html/types/UseOptionsDataSourceSettings.html +1 -1
  134. package/docs/html/variables/DATA_SOURCE_NAME.html +1 -1
  135. package/docs/html/variables/IS_VALUE_FUNCTION_NAME.html +1 -1
  136. package/docs/html/variables/OPTIONS_METHOD_NAME.html +1 -1
  137. package/docs/html/variables/REMOTE_METHOD_NAME.html +1 -1
  138. package/docs/html/variables/RESOLVE_METHOD_NAME.html +1 -1
  139. package/docs/html/variables/RXAP_FORM_CONTROL_SOURCE.html +1 -1
  140. package/docs/html/variables/RXAP_FORM_SYSTEM_HIDE_METADATA.html +1 -1
  141. package/docs/html/variables/RXAP_FORM_SYSTEM_HIDE_SHOW_OPTIONS.html +1 -1
  142. package/docs/html/variables/RXAP_FORM_SYSTEM_SHOW_METADATA.html +1 -1
  143. package/docs/html/variables/RXAP_USE_FUNCTION.html +1 -1
  144. package/docs/html/variables/RXAP_USE_METHOD.html +1 -1
  145. package/docs/html/variables/RXAP_USE_REMOTE_METHOD.html +1 -1
  146. package/docs/html/variables/SUBMIT_CONTEXT_FORM_ADAPTER_METHOD.html +1 -1
  147. package/docs/html/variables/TO_DISPLAY_FUNCTION_NAME.html +1 -1
  148. package/docs/markdown/README.md +1 -1
  149. package/docs/markdown/classes/AbstractOptionsFromMethodDirective.md +436 -0
  150. package/docs/markdown/classes/AutocompleteOptionsFromMethodDirective.md +131 -122
  151. package/docs/markdown/classes/ControlDataSource.md +51 -51
  152. package/docs/markdown/classes/ControlHideShowDirective.md +11 -31
  153. package/docs/markdown/classes/ExtractControlFromParentMixin.md +3 -3
  154. package/docs/markdown/classes/ExtractControlMixin.md +6 -6
  155. package/docs/markdown/classes/ExtractDataSourcesMixin.md +3 -3
  156. package/docs/markdown/classes/ExtractFormDefinitionMixin.md +3 -3
  157. package/docs/markdown/classes/ExtractFunctionMixin.md +5 -5
  158. package/docs/markdown/classes/ExtractFunctionsMixin.md +3 -3
  159. package/docs/markdown/classes/ExtractIsValueFunctionMixin.md +11 -11
  160. package/docs/markdown/classes/ExtractMethodMixin.md +5 -5
  161. package/docs/markdown/classes/ExtractMethodsMixin.md +3 -3
  162. package/docs/markdown/classes/ExtractOptionsDataSourceMixin.md +19 -31
  163. package/docs/markdown/classes/ExtractOptionsMethodMixin.md +12 -12
  164. package/docs/markdown/classes/ExtractRemoteMethodsMixin.md +3 -3
  165. package/docs/markdown/classes/ExtractResolveMethodMixin.md +11 -11
  166. package/docs/markdown/classes/ExtractToDisplayFunctionMixin.md +11 -11
  167. package/docs/markdown/classes/ForFormArrayItemsDirective.md +5 -25
  168. package/docs/markdown/classes/FormArrayAddItemButtonDirective.md +14 -26
  169. package/docs/markdown/classes/FormArrayItemButton.md +21 -41
  170. package/docs/markdown/classes/FormArrayItemRemoveButtonDirective.md +28 -58
  171. package/docs/markdown/classes/FormArrayItemRestoreButtonDirective.md +25 -45
  172. package/docs/markdown/classes/FormArrayRemovableDirective.md +10 -18
  173. package/docs/markdown/classes/FormSystemControlDirective.md +13 -37
  174. package/docs/markdown/classes/InputSelectOptionsDirective.md +50 -75
  175. package/docs/markdown/classes/IsEqualToDirective.md +9 -19
  176. package/docs/markdown/classes/IsSelectableValueDirective.md +23 -47
  177. package/docs/markdown/classes/NoopResolveMethod.md +3 -3
  178. package/docs/markdown/classes/OptionsFromMethodDirective.md +140 -85
  179. package/docs/markdown/classes/OptionsFromRemoteMethodDirective.md +14 -67
  180. package/docs/markdown/classes/RxapFormSystemError.md +13 -13
  181. package/docs/markdown/classes/SubmitContextFormAdapter.md +32 -32
  182. package/docs/markdown/classes/TestNgControl.md +5 -5
  183. package/docs/markdown/enumerations/FormSystemMetadataKeys.md +6 -6
  184. package/docs/markdown/functions/ApplyUseFunctionAdapters.md +2 -2
  185. package/docs/markdown/functions/ApplyUseMethodAdapters.md +2 -2
  186. package/docs/markdown/functions/ComposeOptionsTransformers.md +2 -2
  187. package/docs/markdown/functions/FormContextFromActivatedRouteFactory.md +2 -2
  188. package/docs/markdown/functions/ResolveByUuidParameter.md +2 -2
  189. package/docs/markdown/functions/ResolveByUuidResultFactory.md +2 -2
  190. package/docs/markdown/functions/SubmitContextFormAdapterFactory.md +2 -2
  191. package/docs/markdown/functions/UseAutocompleteIsValueFunction.md +2 -2
  192. package/docs/markdown/functions/UseAutocompleteOptionsMethod.md +4 -4
  193. package/docs/markdown/functions/UseAutocompleteResolveMethod.md +2 -2
  194. package/docs/markdown/functions/UseAutocompleteToDisplayFunction.md +2 -2
  195. package/docs/markdown/functions/UseComponent.md +2 -2
  196. package/docs/markdown/functions/UseDataSource.md +2 -2
  197. package/docs/markdown/functions/UseFormComponent.md +2 -2
  198. package/docs/markdown/functions/UseFunction.md +2 -2
  199. package/docs/markdown/functions/UseHideFunction.md +2 -2
  200. package/docs/markdown/functions/UseIsValueFunction.md +3 -3
  201. package/docs/markdown/functions/UseMethod.md +2 -2
  202. package/docs/markdown/functions/UseOptionsDataSource.md +2 -2
  203. package/docs/markdown/functions/UseOptionsMethod.md +2 -2
  204. package/docs/markdown/functions/UseOptionsRemoteMethod.md +2 -2
  205. package/docs/markdown/functions/UseRemoteMethod.md +2 -2
  206. package/docs/markdown/functions/UseResolveMethod.md +3 -3
  207. package/docs/markdown/functions/UseShowFunction.md +2 -2
  208. package/docs/markdown/functions/UseToDisplayFunction.md +3 -3
  209. package/docs/markdown/functions/controlDataSource.md +2 -2
  210. package/docs/markdown/globals.md +3 -3
  211. package/docs/markdown/interfaces/AutocompleteOptionsFromMethodDirectiveParameters.md +3 -3
  212. package/docs/markdown/interfaces/AutocompleteOptionsFromMethodDirectiveSettings.md +3 -3
  213. package/docs/markdown/interfaces/AutocompleteOptionsFromRemoteMethodTemplateContext.md +3 -3
  214. package/docs/markdown/interfaces/ControlHideShowOptions.md +3 -3
  215. package/docs/markdown/interfaces/ControlWithDataSource.md +3 -3
  216. package/docs/markdown/interfaces/ForFormArrayItemsDirectiveContext.md +9 -9
  217. package/docs/markdown/interfaces/InputSelectOptionsSettings.md +6 -6
  218. package/docs/markdown/interfaces/InputSelectOptionsTemplateContext.md +3 -3
  219. package/docs/markdown/interfaces/OptionsFromMethodDirectiveSettings.md +2 -2
  220. package/docs/markdown/interfaces/OptionsFromMethodTemplateContext.md +3 -3
  221. package/docs/markdown/interfaces/OptionsFromRemoteMethodTemplateContext.md +3 -3
  222. package/docs/markdown/interfaces/UseDataSourceSettings.md +3 -3
  223. package/docs/markdown/interfaces/UseDataSourceValue.md +5 -5
  224. package/docs/markdown/interfaces/UseFunctionConfig.md +3 -3
  225. package/docs/markdown/interfaces/UseFunctionDefinition.md +4 -4
  226. package/docs/markdown/interfaces/UseMethodConfig.md +3 -3
  227. package/docs/markdown/interfaces/UseMethodDefinition.md +4 -4
  228. package/docs/markdown/type-aliases/ControlHideShowFunction.md +2 -2
  229. package/docs/markdown/type-aliases/FunctionParameterAdapterFunction.md +2 -2
  230. package/docs/markdown/type-aliases/FunctionResultAdapterFunction.md +2 -2
  231. package/docs/markdown/type-aliases/MethodParameterAdapterFunction.md +2 -2
  232. package/docs/markdown/type-aliases/MethodResultAdapterFunction.md +2 -2
  233. package/docs/markdown/type-aliases/OptionsMethod.md +2 -2
  234. package/docs/markdown/type-aliases/UseFunctionType.md +2 -2
  235. package/docs/markdown/type-aliases/UseOptionsDataSourceSettings.md +2 -2
  236. package/docs/markdown/variables/DATA_SOURCE_NAME.md +2 -2
  237. package/docs/markdown/variables/IS_VALUE_FUNCTION_NAME.md +2 -2
  238. package/docs/markdown/variables/OPTIONS_METHOD_NAME.md +2 -2
  239. package/docs/markdown/variables/REMOTE_METHOD_NAME.md +2 -2
  240. package/docs/markdown/variables/RESOLVE_METHOD_NAME.md +2 -2
  241. package/docs/markdown/variables/RXAP_FORM_CONTROL_SOURCE.md +2 -2
  242. package/docs/markdown/variables/RXAP_FORM_SYSTEM_HIDE_METADATA.md +2 -2
  243. package/docs/markdown/variables/RXAP_FORM_SYSTEM_HIDE_SHOW_OPTIONS.md +2 -2
  244. package/docs/markdown/variables/RXAP_FORM_SYSTEM_SHOW_METADATA.md +2 -2
  245. package/docs/markdown/variables/RXAP_USE_FUNCTION.md +2 -2
  246. package/docs/markdown/variables/RXAP_USE_METHOD.md +2 -2
  247. package/docs/markdown/variables/RXAP_USE_REMOTE_METHOD.md +2 -2
  248. package/docs/markdown/variables/SUBMIT_CONTEXT_FORM_ADAPTER_METHOD.md +2 -2
  249. package/docs/markdown/variables/TO_DISPLAY_FUNCTION_NAME.md +2 -2
  250. package/docs/wiki/Class.AbstractOptionsFromMethodDirective.md +432 -0
  251. package/docs/wiki/Class.AutocompleteOptionsFromMethodDirective.md +130 -121
  252. package/docs/wiki/Class.ControlDataSource.md +50 -50
  253. package/docs/wiki/Class.ControlHideShowDirective.md +10 -30
  254. package/docs/wiki/Class.ExtractControlFromParentMixin.md +2 -2
  255. package/docs/wiki/Class.ExtractControlMixin.md +5 -5
  256. package/docs/wiki/Class.ExtractDataSourcesMixin.md +2 -2
  257. package/docs/wiki/Class.ExtractFormDefinitionMixin.md +2 -2
  258. package/docs/wiki/Class.ExtractFunctionMixin.md +4 -4
  259. package/docs/wiki/Class.ExtractFunctionsMixin.md +2 -2
  260. package/docs/wiki/Class.ExtractIsValueFunctionMixin.md +10 -10
  261. package/docs/wiki/Class.ExtractMethodMixin.md +4 -4
  262. package/docs/wiki/Class.ExtractMethodsMixin.md +2 -2
  263. package/docs/wiki/Class.ExtractOptionsDataSourceMixin.md +18 -30
  264. package/docs/wiki/Class.ExtractOptionsMethodMixin.md +11 -11
  265. package/docs/wiki/Class.ExtractRemoteMethodsMixin.md +2 -2
  266. package/docs/wiki/Class.ExtractResolveMethodMixin.md +10 -10
  267. package/docs/wiki/Class.ExtractToDisplayFunctionMixin.md +10 -10
  268. package/docs/wiki/Class.ForFormArrayItemsDirective.md +4 -24
  269. package/docs/wiki/Class.FormArrayAddItemButtonDirective.md +13 -25
  270. package/docs/wiki/Class.FormArrayItemButton.md +20 -40
  271. package/docs/wiki/Class.FormArrayItemRemoveButtonDirective.md +27 -57
  272. package/docs/wiki/Class.FormArrayItemRestoreButtonDirective.md +24 -44
  273. package/docs/wiki/Class.FormArrayRemovableDirective.md +9 -17
  274. package/docs/wiki/Class.FormSystemControlDirective.md +12 -36
  275. package/docs/wiki/Class.InputSelectOptionsDirective.md +49 -74
  276. package/docs/wiki/Class.IsEqualToDirective.md +8 -18
  277. package/docs/wiki/Class.IsSelectableValueDirective.md +22 -46
  278. package/docs/wiki/Class.NoopResolveMethod.md +2 -2
  279. package/docs/wiki/Class.OptionsFromMethodDirective.md +139 -84
  280. package/docs/wiki/Class.OptionsFromRemoteMethodDirective.md +13 -66
  281. package/docs/wiki/Class.RxapFormSystemError.md +12 -12
  282. package/docs/wiki/Class.SubmitContextFormAdapter.md +31 -31
  283. package/docs/wiki/Class.TestNgControl.md +4 -4
  284. package/docs/wiki/Enumeration.FormSystemMetadataKeys.md +5 -5
  285. package/docs/wiki/Function.ApplyUseFunctionAdapters.md +1 -1
  286. package/docs/wiki/Function.ApplyUseMethodAdapters.md +1 -1
  287. package/docs/wiki/Function.ComposeOptionsTransformers.md +1 -1
  288. package/docs/wiki/Function.FormContextFromActivatedRouteFactory.md +1 -1
  289. package/docs/wiki/Function.ResolveByUuidParameter.md +1 -1
  290. package/docs/wiki/Function.ResolveByUuidResultFactory.md +1 -1
  291. package/docs/wiki/Function.SubmitContextFormAdapterFactory.md +1 -1
  292. package/docs/wiki/Function.UseAutocompleteIsValueFunction.md +1 -1
  293. package/docs/wiki/Function.UseAutocompleteOptionsMethod.md +3 -3
  294. package/docs/wiki/Function.UseAutocompleteResolveMethod.md +1 -1
  295. package/docs/wiki/Function.UseAutocompleteToDisplayFunction.md +1 -1
  296. package/docs/wiki/Function.UseComponent.md +1 -1
  297. package/docs/wiki/Function.UseDataSource.md +1 -1
  298. package/docs/wiki/Function.UseFormComponent.md +1 -1
  299. package/docs/wiki/Function.UseFunction.md +1 -1
  300. package/docs/wiki/Function.UseHideFunction.md +1 -1
  301. package/docs/wiki/Function.UseIsValueFunction.md +2 -2
  302. package/docs/wiki/Function.UseMethod.md +1 -1
  303. package/docs/wiki/Function.UseOptionsDataSource.md +1 -1
  304. package/docs/wiki/Function.UseOptionsMethod.md +1 -1
  305. package/docs/wiki/Function.UseOptionsRemoteMethod.md +1 -1
  306. package/docs/wiki/Function.UseRemoteMethod.md +1 -1
  307. package/docs/wiki/Function.UseResolveMethod.md +2 -2
  308. package/docs/wiki/Function.UseShowFunction.md +1 -1
  309. package/docs/wiki/Function.UseToDisplayFunction.md +2 -2
  310. package/docs/wiki/Function.controlDataSource.md +1 -1
  311. package/docs/wiki/Interface.AutocompleteOptionsFromMethodDirectiveParameters.md +2 -2
  312. package/docs/wiki/Interface.AutocompleteOptionsFromMethodDirectiveSettings.md +2 -2
  313. package/docs/wiki/Interface.AutocompleteOptionsFromRemoteMethodTemplateContext.md +2 -2
  314. package/docs/wiki/Interface.ControlHideShowOptions.md +2 -2
  315. package/docs/wiki/Interface.ControlWithDataSource.md +2 -2
  316. package/docs/wiki/Interface.ForFormArrayItemsDirectiveContext.md +8 -8
  317. package/docs/wiki/Interface.InputSelectOptionsSettings.md +5 -5
  318. package/docs/wiki/Interface.InputSelectOptionsTemplateContext.md +2 -2
  319. package/docs/wiki/Interface.OptionsFromMethodDirectiveSettings.md +1 -1
  320. package/docs/wiki/Interface.OptionsFromMethodTemplateContext.md +2 -2
  321. package/docs/wiki/Interface.OptionsFromRemoteMethodTemplateContext.md +2 -2
  322. package/docs/wiki/Interface.UseDataSourceSettings.md +2 -2
  323. package/docs/wiki/Interface.UseDataSourceValue.md +4 -4
  324. package/docs/wiki/Interface.UseFunctionConfig.md +2 -2
  325. package/docs/wiki/Interface.UseFunctionDefinition.md +3 -3
  326. package/docs/wiki/Interface.UseMethodConfig.md +2 -2
  327. package/docs/wiki/Interface.UseMethodDefinition.md +3 -3
  328. package/docs/wiki/TypeAlias.ControlHideShowFunction.md +1 -1
  329. package/docs/wiki/TypeAlias.FunctionParameterAdapterFunction.md +1 -1
  330. package/docs/wiki/TypeAlias.FunctionResultAdapterFunction.md +1 -1
  331. package/docs/wiki/TypeAlias.MethodParameterAdapterFunction.md +1 -1
  332. package/docs/wiki/TypeAlias.MethodResultAdapterFunction.md +1 -1
  333. package/docs/wiki/TypeAlias.OptionsMethod.md +1 -1
  334. package/docs/wiki/TypeAlias.UseFunctionType.md +1 -1
  335. package/docs/wiki/TypeAlias.UseOptionsDataSourceSettings.md +1 -1
  336. package/docs/wiki/Variable.DATA_SOURCE_NAME.md +1 -1
  337. package/docs/wiki/Variable.IS_VALUE_FUNCTION_NAME.md +1 -1
  338. package/docs/wiki/Variable.OPTIONS_METHOD_NAME.md +1 -1
  339. package/docs/wiki/Variable.REMOTE_METHOD_NAME.md +1 -1
  340. package/docs/wiki/Variable.RESOLVE_METHOD_NAME.md +1 -1
  341. package/docs/wiki/Variable.RXAP_FORM_CONTROL_SOURCE.md +1 -1
  342. package/docs/wiki/Variable.RXAP_FORM_SYSTEM_HIDE_METADATA.md +1 -1
  343. package/docs/wiki/Variable.RXAP_FORM_SYSTEM_HIDE_SHOW_OPTIONS.md +1 -1
  344. package/docs/wiki/Variable.RXAP_FORM_SYSTEM_SHOW_METADATA.md +1 -1
  345. package/docs/wiki/Variable.RXAP_USE_FUNCTION.md +1 -1
  346. package/docs/wiki/Variable.RXAP_USE_METHOD.md +1 -1
  347. package/docs/wiki/Variable.RXAP_USE_REMOTE_METHOD.md +1 -1
  348. package/docs/wiki/Variable.SUBMIT_CONTEXT_FORM_ADAPTER_METHOD.md +1 -1
  349. package/docs/wiki/Variable.TO_DISPLAY_FUNCTION_NAME.md +1 -1
  350. package/docs/wiki/_Sidebar.md +1 -1
  351. package/docs/wiki/globals.md +2 -2
  352. package/fesm2022/rxap-form-system.mjs +274 -420
  353. package/fesm2022/rxap-form-system.mjs.map +1 -1
  354. package/package.json +28 -28
  355. package/types/rxap-form-system.d.ts +90 -80
  356. package/docs/html/classes/FormSystemDirectivesModule.html +0 -2
  357. package/docs/markdown/classes/FormSystemDirectivesModule.md +0 -19
  358. package/docs/wiki/Class.FormSystemDirectivesModule.md +0 -15
@@ -1,9 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
- import { forwardRef, Input, Directive, isDevMode, INJECTOR, Injector, Inject, runInInjectionContext, SkipSelf, HostListener, HostBinding, Optional, signal, inject, ViewContainerRef, ChangeDetectorRef, TemplateRef, Injectable, Renderer2, ElementRef, Self, NgModule, InjectionToken, ComponentFactoryResolver } from '@angular/core';
3
- import * as i1$1 from '@angular/forms';
4
- import { NG_VALIDATORS, UntypedFormGroup, UntypedFormArray, NgControl, ControlContainer } from '@angular/forms';
2
+ import { input, effect, untracked, forwardRef, Directive, isDevMode, inject, INJECTOR, runInInjectionContext, TemplateRef, ViewContainerRef, ChangeDetectorRef, Renderer2, ElementRef, signal, linkedSignal, Injectable, InjectionToken, Inject, Optional, EnvironmentInjector, createComponent } from '@angular/core';
3
+ import { NG_VALIDATORS, ControlContainer, UntypedFormGroup, UntypedFormArray, NgControl } from '@angular/forms';
5
4
  import { __decorate, __metadata } from 'tslib';
6
- import * as i1 from '@rxap/data-source';
7
5
  import { PipeDataSource, DataSourceLoader, BaseDataSource, RXAP_DATA_SOURCE_METADATA } from '@rxap/data-source';
8
6
  import { Mixin } from '@rxap/mixin';
9
7
  import { RxapFormControl, RxapFormGroup, RxapFormArray, controlValueChanges$, RXAP_FORM_CONTEXT } from '@rxap/forms';
@@ -12,29 +10,28 @@ import { setMetadataMapMap, getMetadata, setMetadataMap, setMetadata } from '@rx
12
10
  import { RxapError, isPromiseLike, isPromise, equals } from '@rxap/utilities';
13
11
  import { ToMethod } from '@rxap/pattern';
14
12
  import { debounceTime, map as map$1, distinctUntilChanged, startWith, pairwise, tap as tap$1, isObservable, Subscription, of, EMPTY } from 'rxjs';
15
- import * as i2 from '@angular/material/button';
16
- import '@angular/material/autocomplete';
13
+ import { MatButton } from '@angular/material/button';
17
14
  import { isDefined } from '@rxap/rxjs';
18
15
  import { isUUID } from '@rxap/validator';
19
- import * as i3 from '@angular/material/form-field';
20
16
  import { MatFormField, MAT_FORM_FIELD } from '@angular/material/form-field';
21
- import * as i2$1 from '@rxap/remote-method';
22
17
  import { RemoteMethodLoader, ProxyRemoteMethod } from '@rxap/remote-method';
23
18
 
24
19
  class IsEqualToDirective {
25
- set equalTo(value) {
26
- this._equalTo = value;
27
- if (this._onChange) {
28
- this._onChange();
29
- }
20
+ constructor() {
21
+ this.equalTo = input.required({ ...(ngDevMode ? { debugName: "equalTo" } : /* istanbul ignore next */ {}), alias: 'rxapIsEqualTo' });
22
+ effect(() => {
23
+ this.equalTo();
24
+ untracked(() => this._onChange?.());
25
+ });
30
26
  }
31
27
  validate(control) {
32
- if (this._equalTo === null || this._equalTo === control.value) {
28
+ const equalTo = this.equalTo();
29
+ if (equalTo === null || equalTo === control.value) {
33
30
  return null;
34
31
  }
35
32
  return {
36
33
  isEqualTo: {
37
- value: this._equalTo,
34
+ value: equalTo,
38
35
  actualValue: control.value,
39
36
  },
40
37
  };
@@ -49,7 +46,7 @@ class IsEqualToDirective {
49
46
  this._onChange = fn;
50
47
  }
51
48
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: IsEqualToDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
52
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: IsEqualToDirective, isStandalone: true, selector: "[rxapIsEqualTo]", inputs: { equalTo: ["rxapIsEqualTo", "equalTo"] }, providers: [
49
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: IsEqualToDirective, isStandalone: true, selector: "[rxapIsEqualTo]", inputs: { equalTo: { classPropertyName: "equalTo", publicName: "rxapIsEqualTo", isSignal: true, isRequired: true, transformFunction: null } }, providers: [
53
50
  {
54
51
  provide: NG_VALIDATORS,
55
52
  multi: true,
@@ -70,13 +67,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
70
67
  ],
71
68
  standalone: true,
72
69
  }]
73
- }], propDecorators: { equalTo: [{
74
- type: Input,
75
- args: [{
76
- required: true,
77
- alias: 'rxapIsEqualTo',
78
- }]
79
- }] } });
70
+ }], ctorParameters: () => [], propDecorators: { equalTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "rxapIsEqualTo", required: true }] }] } });
80
71
 
81
72
  var FormSystemMetadataKeys;
82
73
  (function (FormSystemMetadataKeys) {
@@ -152,7 +143,7 @@ function UseOptionsDataSource(dataSource, settings) {
152
143
  };
153
144
  }
154
145
  let ExtractOptionsDataSourceMixin = class ExtractOptionsDataSourceMixin {
155
- extractOptionsDatasource(control) {
146
+ extractOptionsDatasource(control, metadata) {
156
147
  control ??= this.extractControl();
157
148
  if (!(control instanceof RxapFormControl)) {
158
149
  throw new Error('Ensure to use a RxapFromControl');
@@ -166,10 +157,11 @@ let ExtractOptionsDataSourceMixin = class ExtractOptionsDataSourceMixin {
166
157
  this.settings = this.useDataSourceValue.settings ?? {};
167
158
  let dataSource;
168
159
  try {
169
- dataSource = this.dataSourceLoader.load(useDataSourceValue.dataSource, this.metadata, this.injector);
160
+ dataSource = this.dataSourceLoader.load(useDataSourceValue.dataSource, metadata, this.injector);
170
161
  }
171
162
  catch (e) {
172
- if (e.name && e.name === 'NullInjectorError') {
163
+ // Angular >= 19 throws a RuntimeError (NG0201) instead of a NullInjectorError
164
+ if (e?.name === 'NullInjectorError' || /NG0201/.test(e?.message ?? '')) {
173
165
  if (isDevMode()) {
174
166
  console.error('Cloud not inject the options data source', this.useDataSourceValue);
175
167
  }
@@ -191,10 +183,10 @@ ExtractOptionsDataSourceMixin = __decorate([
191
183
  ], ExtractOptionsDataSourceMixin);
192
184
 
193
185
  let IsSelectableValueDirective = class IsSelectableValueDirective {
194
- constructor(dataSourceLoader, injector) {
195
- this.dataSourceLoader = dataSourceLoader;
196
- this.injector = injector;
197
- this.viewer = { id: '[rxapIsSelectableValue]' };
186
+ constructor() {
187
+ this.dataSourceLoader = inject(DataSourceLoader);
188
+ this.injector = inject(INJECTOR);
189
+ this.viewer = input({ id: '[rxapIsSelectableValue]' }, ...(ngDevMode ? [{ debugName: "viewer" }] : /* istanbul ignore next */ []));
198
190
  }
199
191
  validate(control) {
200
192
  if (control.value) {
@@ -226,8 +218,8 @@ let IsSelectableValueDirective = class IsSelectableValueDirective {
226
218
  }
227
219
  return null;
228
220
  }
229
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: IsSelectableValueDirective, deps: [{ token: DataSourceLoader }, { token: INJECTOR }], target: i0.ɵɵFactoryTarget.Directive }); }
230
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: IsSelectableValueDirective, isStandalone: true, selector: "[rxapIsSelectableValue]", inputs: { viewer: "viewer" }, providers: [
221
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: IsSelectableValueDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
222
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: IsSelectableValueDirective, isStandalone: true, selector: "[rxapIsSelectableValue]", inputs: { viewer: { classPropertyName: "viewer", publicName: "viewer", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
231
223
  {
232
224
  provide: NG_VALIDATORS,
233
225
  multi: true,
@@ -236,9 +228,7 @@ let IsSelectableValueDirective = class IsSelectableValueDirective {
236
228
  ], ngImport: i0 }); }
237
229
  };
238
230
  IsSelectableValueDirective = __decorate([
239
- Mixin(ExtractOptionsDataSourceMixin),
240
- __metadata("design:paramtypes", [DataSourceLoader,
241
- Injector])
231
+ Mixin(ExtractOptionsDataSourceMixin)
242
232
  ], IsSelectableValueDirective);
243
233
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: IsSelectableValueDirective, decorators: [{
244
234
  type: Directive,
@@ -253,15 +243,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
253
243
  ],
254
244
  standalone: true,
255
245
  }]
256
- }], ctorParameters: () => [{ type: i1.DataSourceLoader, decorators: [{
257
- type: Inject,
258
- args: [DataSourceLoader]
259
- }] }, { type: i0.Injector, decorators: [{
260
- type: Inject,
261
- args: [INJECTOR]
262
- }] }], propDecorators: { viewer: [{
263
- type: Input
264
- }] } });
246
+ }], propDecorators: { viewer: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewer", required: false }] }] } });
265
247
 
266
248
  function ResolveByUuidParameter({ value }) {
267
249
  return {
@@ -496,11 +478,11 @@ ExtractToDisplayFunctionMixin = __decorate([
496
478
 
497
479
  // TODO : move to rxap packages
498
480
  class ForFormArrayItemsDirective {
499
- constructor(container, template, viewContainerRef, cdr) {
500
- this.container = container;
501
- this.template = template;
502
- this.viewContainerRef = viewContainerRef;
503
- this.cdr = cdr;
481
+ constructor() {
482
+ this.container = inject(ControlContainer, { skipSelf: true });
483
+ this.template = inject(TemplateRef);
484
+ this.viewContainerRef = inject(ViewContainerRef);
485
+ this.cdr = inject(ChangeDetectorRef);
504
486
  }
505
487
  ngAfterViewInit() {
506
488
  if (this.container.control instanceof RxapFormArray) {
@@ -539,7 +521,7 @@ class ForFormArrayItemsDirective {
539
521
  }
540
522
  this.cdr.detectChanges();
541
523
  }
542
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ForFormArrayItemsDirective, deps: [{ token: i1$1.ControlContainer, skipSelf: true }, { token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive }); }
524
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ForFormArrayItemsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
543
525
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: ForFormArrayItemsDirective, isStandalone: true, selector: "[rxapForFormArrayItem]", ngImport: i0 }); }
544
526
  }
545
527
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ForFormArrayItemsDirective, decorators: [{
@@ -548,15 +530,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
548
530
  selector: '[rxapForFormArrayItem]',
549
531
  standalone: true,
550
532
  }]
551
- }], ctorParameters: () => [{ type: i1$1.ControlContainer, decorators: [{
552
- type: SkipSelf
553
- }] }, { type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: i0.ChangeDetectorRef }] });
533
+ }] });
554
534
 
555
535
  // TODO : move to rxap packages
556
536
  class FormArrayAddItemButtonDirective {
557
- constructor(parent, matButton) {
558
- this.parent = parent;
559
- this.matButton = matButton;
537
+ constructor() {
538
+ this.parent = inject(ControlContainer, { skipSelf: true });
539
+ this.matButton = inject(MatButton, { optional: true });
560
540
  this.type = 'button';
561
541
  }
562
542
  get disabled() {
@@ -569,8 +549,9 @@ class FormArrayAddItemButtonDirective {
569
549
  if (this.parent.control instanceof RxapFormArray) {
570
550
  this.formArray = this.parent.control;
571
551
  }
572
- if (this.matButton) {
573
- this._controlDisabledSubscription = this.formArray.disabled$.pipe(tap$1(isDisabled => this.matButton.disabled = isDisabled)).subscribe();
552
+ const matButton = this.matButton;
553
+ if (matButton) {
554
+ this._controlDisabledSubscription = this.formArray.disabled$.pipe(tap$1(isDisabled => matButton.disabled = isDisabled)).subscribe();
574
555
  }
575
556
  }
576
557
  ngOnDestroy() {
@@ -579,40 +560,30 @@ class FormArrayAddItemButtonDirective {
579
560
  onClick() {
580
561
  this.formArray.insertAt();
581
562
  }
582
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FormArrayAddItemButtonDirective, deps: [{ token: i1$1.ControlContainer, optional: true, skipSelf: true }, { token: i2.MatButton, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
583
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: FormArrayAddItemButtonDirective, isStandalone: true, selector: "[rxapFormArrayItemAddButton]", host: { listeners: { "click": "onClick()" }, properties: { "type": "this.type", "disabled": "this.disabled" } }, ngImport: i0 }); }
563
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FormArrayAddItemButtonDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
564
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: FormArrayAddItemButtonDirective, isStandalone: true, selector: "[rxapFormArrayItemAddButton]", host: { attributes: { "type": "button" }, listeners: { "click": "onClick()" }, properties: { "disabled": "disabled" } }, ngImport: i0 }); }
584
565
  }
585
566
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FormArrayAddItemButtonDirective, decorators: [{
586
567
  type: Directive,
587
568
  args: [{
588
569
  selector: '[rxapFormArrayItemAddButton]',
589
570
  standalone: true,
571
+ host: {
572
+ 'type': 'button',
573
+ '[disabled]': 'disabled',
574
+ '(click)': 'onClick()',
575
+ },
590
576
  }]
591
- }], ctorParameters: () => [{ type: i1$1.ControlContainer, decorators: [{
592
- type: Optional
593
- }, {
594
- type: SkipSelf
595
- }] }, { type: i2.MatButton, decorators: [{
596
- type: Optional
597
- }] }], propDecorators: { type: [{
598
- type: HostBinding,
599
- args: ['type']
600
- }], disabled: [{
601
- type: HostBinding,
602
- args: ['disabled']
603
- }], onClick: [{
604
- type: HostListener,
605
- args: ['click']
606
- }] } });
577
+ }] });
607
578
 
608
579
  // TODO : move to rxap packages
609
580
  class FormArrayItemButton {
610
- constructor(parent, matButton, renderer, elementRef) {
611
- this.parent = parent;
612
- this.matButton = matButton;
613
- this.renderer = renderer;
614
- this.elementRef = elementRef;
581
+ constructor() {
615
582
  this.type = 'button';
583
+ this.parent = inject(ControlContainer, { skipSelf: true });
584
+ this.matButton = inject(MatButton, { optional: true });
585
+ this.renderer = inject(Renderer2);
586
+ this.elementRef = inject(ElementRef);
616
587
  }
617
588
  get disabled() {
618
589
  return this.isDisabled;
@@ -651,8 +622,9 @@ class FormArrayItemButton {
651
622
  else {
652
623
  throw new Error(`The parent is not a form group instance`);
653
624
  }
654
- if (this.matButton) {
655
- this._controlDisabledSubscription = this.formGroup.disabled$.pipe(tap$1(isDisabled => this.matButton.disabled = isDisabled)).subscribe();
625
+ const matButton = this.matButton;
626
+ if (matButton) {
627
+ this._controlDisabledSubscription = this.formGroup.disabled$.pipe(tap$1(isDisabled => matButton.disabled = isDisabled)).subscribe();
656
628
  }
657
629
  this.deletedControl.value$.pipe(tap$1(() => this.updateDisplayStyle())).subscribe();
658
630
  }
@@ -660,22 +632,19 @@ class FormArrayItemButton {
660
632
  this._controlDisabledSubscription?.unsubscribe();
661
633
  this._deletedControlValueSubscription?.unsubscribe();
662
634
  }
663
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FormArrayItemButton, deps: [{ token: i1$1.ControlContainer, skipSelf: true }, { token: i2.MatButton, optional: true }, { token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
664
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: FormArrayItemButton, isStandalone: true, host: { properties: { "type": "this.type", "disabled": "this.disabled" } }, ngImport: i0 }); }
635
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FormArrayItemButton, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
636
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: FormArrayItemButton, isStandalone: true, host: { attributes: { "type": "button" }, listeners: { "click": "onClick()" }, properties: { "disabled": "disabled" } }, ngImport: i0 }); }
665
637
  }
666
638
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FormArrayItemButton, decorators: [{
667
- type: Directive
668
- }], ctorParameters: () => [{ type: i1$1.ControlContainer, decorators: [{
669
- type: SkipSelf
670
- }] }, { type: i2.MatButton, decorators: [{
671
- type: Optional
672
- }] }, { type: i0.Renderer2 }, { type: i0.ElementRef }], propDecorators: { type: [{
673
- type: HostBinding,
674
- args: ['type']
675
- }], disabled: [{
676
- type: HostBinding,
677
- args: ['disabled']
678
- }] } });
639
+ type: Directive,
640
+ args: [{
641
+ host: {
642
+ 'type': 'button',
643
+ '[disabled]': 'disabled',
644
+ '(click)': 'onClick()',
645
+ },
646
+ }]
647
+ }] });
679
648
 
680
649
  // TODO : move to rxap packages
681
650
  class FormArrayItemRemoveButtonDirective extends FormArrayItemButton {
@@ -686,10 +655,10 @@ class FormArrayItemRemoveButtonDirective extends FormArrayItemButton {
686
655
  * true - in the given form group the deleted control is set to true
687
656
  * false - the form group is removed from the (parent) form array
688
657
  */
689
- this.shouldTemporarilyDeleted = () => false;
658
+ this.shouldTemporarilyDeleted = input(() => false, ...(ngDevMode ? [{ debugName: "shouldTemporarilyDeleted" }] : /* istanbul ignore next */ []));
690
659
  }
691
660
  onClick() {
692
- const templateDelete = this.shouldTemporarilyDeleted(this.formGroup);
661
+ const templateDelete = this.shouldTemporarilyDeleted()(this.formGroup);
693
662
  if (templateDelete) {
694
663
  this.deletedControl.setValue(true);
695
664
  }
@@ -706,7 +675,7 @@ class FormArrayItemRemoveButtonDirective extends FormArrayItemButton {
706
675
  }
707
676
  }
708
677
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FormArrayItemRemoveButtonDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
709
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: FormArrayItemRemoveButtonDirective, isStandalone: true, selector: "button[rxapFormArrayItemRemoveButton]", inputs: { shouldTemporarilyDeleted: "shouldTemporarilyDeleted" }, host: { listeners: { "click": "onClick()" } }, usesInheritance: true, ngImport: i0 }); }
678
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: FormArrayItemRemoveButtonDirective, isStandalone: true, selector: "button[rxapFormArrayItemRemoveButton]", inputs: { shouldTemporarilyDeleted: { classPropertyName: "shouldTemporarilyDeleted", publicName: "shouldTemporarilyDeleted", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0 }); }
710
679
  }
711
680
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FormArrayItemRemoveButtonDirective, decorators: [{
712
681
  type: Directive,
@@ -714,12 +683,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
714
683
  selector: 'button[rxapFormArrayItemRemoveButton]',
715
684
  standalone: true,
716
685
  }]
717
- }], propDecorators: { shouldTemporarilyDeleted: [{
718
- type: Input
719
- }], onClick: [{
720
- type: HostListener,
721
- args: ['click']
722
- }] } });
686
+ }], propDecorators: { shouldTemporarilyDeleted: [{ type: i0.Input, args: [{ isSignal: true, alias: "shouldTemporarilyDeleted", required: false }] }] } });
723
687
 
724
688
  // TODO : move to rxap packages
725
689
  class FormArrayItemRestoreButtonDirective extends FormArrayItemButton {
@@ -735,7 +699,7 @@ class FormArrayItemRestoreButtonDirective extends FormArrayItemButton {
735
699
  }
736
700
  }
737
701
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FormArrayItemRestoreButtonDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
738
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: FormArrayItemRestoreButtonDirective, isStandalone: true, selector: "button[rxapFormArrayItemRestoreButton]", host: { listeners: { "click": "onClick()" } }, usesInheritance: true, ngImport: i0 }); }
702
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: FormArrayItemRestoreButtonDirective, isStandalone: true, selector: "button[rxapFormArrayItemRestoreButton]", usesInheritance: true, ngImport: i0 }); }
739
703
  }
740
704
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FormArrayItemRestoreButtonDirective, decorators: [{
741
705
  type: Directive,
@@ -743,15 +707,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
743
707
  selector: 'button[rxapFormArrayItemRestoreButton]',
744
708
  standalone: true,
745
709
  }]
746
- }], propDecorators: { onClick: [{
747
- type: HostListener,
748
- args: ['click']
749
- }] } });
710
+ }] });
750
711
 
751
712
  // TODO : move to rxap packages
752
713
  class FormArrayRemovableDirective {
753
- constructor(parent) {
754
- this.parent = parent;
714
+ constructor() {
715
+ this.parent = inject(ControlContainer);
755
716
  }
756
717
  get isDeleted() {
757
718
  return this.deletedControl.value;
@@ -797,7 +758,7 @@ class FormArrayRemovableDirective {
797
758
  ngOnDestroy() {
798
759
  this._deletedControlValueSubscription?.unsubscribe();
799
760
  }
800
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FormArrayRemovableDirective, deps: [{ token: i1$1.ControlContainer, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
761
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FormArrayRemovableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
801
762
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: FormArrayRemovableDirective, isStandalone: true, selector: "[rxapFormArrayRemovable]", ngImport: i0 }); }
802
763
  }
803
764
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FormArrayRemovableDirective, decorators: [{
@@ -806,13 +767,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
806
767
  selector: '[rxapFormArrayRemovable]',
807
768
  standalone: true,
808
769
  }]
809
- }], ctorParameters: () => [{ type: i1$1.ControlContainer, decorators: [{
810
- type: Optional
811
- }] }] });
770
+ }] });
812
771
 
813
- let OptionsFromMethodDirective = class OptionsFromMethodDirective {
772
+ /**
773
+ * Shared implementation of the options from method directives. The concrete directives
774
+ * only declare the (aliased) signal inputs.
775
+ */
776
+ let AbstractOptionsFromMethodDirective = class AbstractOptionsFromMethodDirective {
777
+ static ngTemplateContextGuard(dir, ctx) {
778
+ return true;
779
+ }
814
780
  constructor() {
815
781
  this.loading = signal(true, ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
782
+ /**
783
+ * The method used to load the options. Defaults to the method defined with the input. If the
784
+ * input is not set the method is extracted from the form definition.
785
+ */
786
+ this.optionsMethod = linkedSignal(() => this.method(), ...(ngDevMode ? [{ debugName: "optionsMethod" }] : /* istanbul ignore next */ []));
816
787
  this.options = null;
817
788
  this.ngControl = null;
818
789
  this.matFormField = null;
@@ -821,38 +792,30 @@ let OptionsFromMethodDirective = class OptionsFromMethodDirective {
821
792
  this.injector = inject(INJECTOR);
822
793
  this.cdr = inject(ChangeDetectorRef);
823
794
  this.template = inject(TemplateRef);
795
+ this.initialized = signal(false, ...(ngDevMode ? [{ debugName: "initialized" }] : /* istanbul ignore next */ []));
796
+ // load the options as soon as the directive is initialized and each time the parameters change
797
+ effect(() => {
798
+ const parameters = this.parameters();
799
+ if (!this.initialized()) {
800
+ return;
801
+ }
802
+ untracked(() => this.load(parameters));
803
+ });
824
804
  }
825
- static ngTemplateContextGuard(dir, ctx) {
826
- return true;
827
- }
828
- async ngAfterViewInit() {
805
+ ngAfterViewInit() {
829
806
  this.matFormField = this.injector.get(MatFormField, null);
830
807
  this.ngControl = this.matFormField?._control.ngControl ?? this.injector.get(NgControl, null);
831
808
  this.control = this.ngControl?.control ?? undefined;
832
- this.method ??= this.extractOptionsMethod();
833
- // ensure that the options are loaded. It is possible that the ngOnChange is triggered before the ngAfterViewInit
834
- // then the options are not loaded.
835
- if (!this.options) {
836
- await this.load(this.parameters);
809
+ if (!this.optionsMethod()) {
810
+ this.optionsMethod.set(this.extractOptionsMethod());
837
811
  }
812
+ this.initialized.set(true);
838
813
  }
839
814
  ngOnDestroy() {
840
815
  this._loadOptionsSubscription?.unsubscribe();
841
816
  }
842
- async ngOnChanges(changes) {
843
- // only try to load the options if the method is defined
844
- // else the initial load will be triggered in the ngAfterViewInit
845
- if (!this.method) {
846
- console.debug('The method is not yet defined');
847
- return;
848
- }
849
- const parametersChanges = changes['parameters'];
850
- if (parametersChanges) {
851
- await this.load(parametersChanges.currentValue);
852
- }
853
- }
854
817
  async loadOptions(parameters) {
855
- return this.method.call(parameters, this.control);
818
+ return this.optionsMethod().call(parameters, this.control);
856
819
  }
857
820
  renderTemplate() {
858
821
  if (!this.options) {
@@ -862,8 +825,9 @@ let OptionsFromMethodDirective = class OptionsFromMethodDirective {
862
825
  for (const option of this.options) {
863
826
  this.viewContainerRef.createEmbeddedView(this.template, { $implicit: option });
864
827
  }
865
- if (this.resetOnChange !== undefined) {
866
- this.control?.reset(this.resetOnChange);
828
+ const resetOnChange = untracked(this.resetOnChange);
829
+ if (resetOnChange !== undefined) {
830
+ this.control?.reset(resetOnChange);
867
831
  }
868
832
  this.cdr.detectChanges();
869
833
  }
@@ -877,7 +841,7 @@ let OptionsFromMethodDirective = class OptionsFromMethodDirective {
877
841
  this.renderTemplate();
878
842
  }
879
843
  }
880
- async load(parameters = this.parameters) {
844
+ async load(parameters = untracked(this.parameters)) {
881
845
  this.loading.set(true);
882
846
  try {
883
847
  const result = await this.loadOptions(parameters);
@@ -893,12 +857,27 @@ let OptionsFromMethodDirective = class OptionsFromMethodDirective {
893
857
  this.loading.set(false);
894
858
  }
895
859
  }
896
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OptionsFromMethodDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
897
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: OptionsFromMethodDirective, isStandalone: true, selector: "[rxapOptionsFromMethod]", inputs: { parameters: ["rxapOptionsFromMethodParameters", "parameters"], resetOnChange: ["rxapOptionsFromMethodResetOnChange", "resetOnChange"], method: ["rxapOptionsFromMethodCall", "method"] }, exportAs: ["rxapOptionsFromMethod"], usesOnChanges: true, ngImport: i0 }); }
860
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AbstractOptionsFromMethodDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
861
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: AbstractOptionsFromMethodDirective, isStandalone: true, ngImport: i0 }); }
898
862
  };
899
- OptionsFromMethodDirective = __decorate([
900
- Mixin(ExtractOptionsMethodMixin)
901
- ], OptionsFromMethodDirective);
863
+ AbstractOptionsFromMethodDirective = __decorate([
864
+ Mixin(ExtractOptionsMethodMixin),
865
+ __metadata("design:paramtypes", [])
866
+ ], AbstractOptionsFromMethodDirective);
867
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AbstractOptionsFromMethodDirective, decorators: [{
868
+ type: Directive
869
+ }], ctorParameters: () => [] });
870
+ class OptionsFromMethodDirective extends AbstractOptionsFromMethodDirective {
871
+ constructor() {
872
+ super(...arguments);
873
+ this.parameters = input(undefined, { ...(ngDevMode ? { debugName: "parameters" } : /* istanbul ignore next */ {}), alias: 'rxapOptionsFromMethodParameters' });
874
+ this.resetOnChange = input(undefined, { ...(ngDevMode ? { debugName: "resetOnChange" } : /* istanbul ignore next */ {}), alias: 'rxapOptionsFromMethodResetOnChange' });
875
+ // eslint-disable-next-line @angular-eslint/no-input-rename
876
+ this.method = input(undefined, { ...(ngDevMode ? { debugName: "method" } : /* istanbul ignore next */ {}), alias: 'rxapOptionsFromMethodCall' });
877
+ }
878
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OptionsFromMethodDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
879
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: OptionsFromMethodDirective, isStandalone: true, selector: "[rxapOptionsFromMethod]", inputs: { parameters: { classPropertyName: "parameters", publicName: "rxapOptionsFromMethodParameters", isSignal: true, isRequired: false, transformFunction: null }, resetOnChange: { classPropertyName: "resetOnChange", publicName: "rxapOptionsFromMethodResetOnChange", isSignal: true, isRequired: false, transformFunction: null }, method: { classPropertyName: "method", publicName: "rxapOptionsFromMethodCall", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["rxapOptionsFromMethod"], usesInheritance: true, ngImport: i0 }); }
880
+ }
902
881
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OptionsFromMethodDirective, decorators: [{
903
882
  type: Directive,
904
883
  args: [{
@@ -907,16 +886,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
907
886
  standalone: true,
908
887
  exportAs: 'rxapOptionsFromMethod',
909
888
  }]
910
- }], propDecorators: { parameters: [{
911
- type: Input,
912
- args: ['rxapOptionsFromMethodParameters']
913
- }], resetOnChange: [{
914
- type: Input,
915
- args: ['rxapOptionsFromMethodResetOnChange']
916
- }], method: [{
917
- type: Input,
918
- args: ['rxapOptionsFromMethodCall']
919
- }] } });
889
+ }], propDecorators: { parameters: [{ type: i0.Input, args: [{ isSignal: true, alias: "rxapOptionsFromMethodParameters", required: false }] }], resetOnChange: [{ type: i0.Input, args: [{ isSignal: true, alias: "rxapOptionsFromMethodResetOnChange", required: false }] }], method: [{ type: i0.Input, args: [{ isSignal: true, alias: "rxapOptionsFromMethodCall", required: false }] }] } });
920
890
 
921
891
  function UseAutocompleteOptionsMethod(method, config = {}) {
922
892
  config.adapter ??= {};
@@ -945,9 +915,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
945
915
  type: Injectable,
946
916
  args: [{ providedIn: 'root' }]
947
917
  }] });
948
- let AutocompleteOptionsFromMethodDirective = class AutocompleteOptionsFromMethodDirective extends OptionsFromMethodDirective {
918
+ let AutocompleteOptionsFromMethodDirective = class AutocompleteOptionsFromMethodDirective extends AbstractOptionsFromMethodDirective {
949
919
  constructor() {
950
920
  super(...arguments);
921
+ this.parameters = input(undefined, { ...(ngDevMode ? { debugName: "parameters" } : /* istanbul ignore next */ {}), alias: 'rxapAutocompleteOptionsFromMethodParameters' });
922
+ this.resetOnChange = input(undefined, { ...(ngDevMode ? { debugName: "resetOnChange" } : /* istanbul ignore next */ {}), alias: 'rxapAutocompleteOptionsFromMethodResetOnChange' });
923
+ this.matAutocomplete = input(undefined, { ...(ngDevMode ? { debugName: "matAutocomplete" } : /* istanbul ignore next */ {}), alias: 'rxapAutocompleteOptionsFromMethodMatAutocomplete' });
924
+ // eslint-disable-next-line @angular-eslint/no-input-rename
925
+ this.method = input(undefined, { ...(ngDevMode ? { debugName: "method" } : /* istanbul ignore next */ {}), alias: 'rxapAutocompleteOptionsFromMethodCall' });
926
+ // eslint-disable-next-line @angular-eslint/no-input-rename
927
+ this.resolveMethod = input(undefined, { ...(ngDevMode ? { debugName: "resolveMethod" } : /* istanbul ignore next */ {}), alias: 'rxapAutocompleteOptionsFromMethodResolve' });
928
+ this.isValue = input(undefined, { ...(ngDevMode ? { debugName: "isValue" } : /* istanbul ignore next */ {}), alias: 'rxapAutocompleteOptionsFromMethodIsValue' });
929
+ this.toDisplay = input(undefined, { ...(ngDevMode ? { debugName: "toDisplay" } : /* istanbul ignore next */ {}), alias: 'rxapAutocompleteOptionsFromMethodToDisplay' });
930
+ this.resolvedResolveMethod = linkedSignal(() => this.resolveMethod(), ...(ngDevMode ? [{ debugName: "resolvedResolveMethod" }] : /* istanbul ignore next */ []));
931
+ this.resolvedIsValue = linkedSignal(() => this.isValue(), ...(ngDevMode ? [{ debugName: "resolvedIsValue" }] : /* istanbul ignore next */ []));
932
+ this.resolvedToDisplay = linkedSignal(() => this.toDisplay(), ...(ngDevMode ? [{ debugName: "resolvedToDisplay" }] : /* istanbul ignore next */ []));
951
933
  this.ngControl = null;
952
934
  this.matFormField = null;
953
935
  this.injector = inject(INJECTOR);
@@ -968,23 +950,30 @@ let AutocompleteOptionsFromMethodDirective = class AutocompleteOptionsFromMethod
968
950
  super.ngOnDestroy();
969
951
  this._subscription?.unsubscribe();
970
952
  }
971
- async ngAfterViewInit() {
972
- if (this.matAutocomplete) {
953
+ ngAfterViewInit() {
954
+ const matAutocomplete = this.matAutocomplete();
955
+ if (matAutocomplete) {
973
956
  this.settings ??= {};
974
957
  this.settings.filteredOptions ??= true;
975
958
  }
976
- await super.ngAfterViewInit();
977
- this.resolveMethod ??= this.extractResolveMethod();
978
- this.isValue ??= this.extractIsValueFunction((value) => typeof value === 'string' && isUUID(value));
979
- this.toDisplay ??= this.extractToDisplayFunction((value) => {
980
- if (!value) {
981
- return '';
982
- }
983
- const option = this.findOptionByValue(value);
984
- return option?.display ?? (isDevMode() ? 'to display error' : '...');
985
- });
986
- if (this.matAutocomplete) {
987
- this.matAutocomplete.displayWith = this.toDisplay.bind(this);
959
+ super.ngAfterViewInit();
960
+ if (!this.resolvedResolveMethod()) {
961
+ this.resolvedResolveMethod.set(this.extractResolveMethod());
962
+ }
963
+ if (!this.resolvedIsValue()) {
964
+ this.resolvedIsValue.set(this.extractIsValueFunction((value) => typeof value === 'string' && isUUID(value)));
965
+ }
966
+ if (!this.resolvedToDisplay()) {
967
+ this.resolvedToDisplay.set(this.extractToDisplayFunction((value) => {
968
+ if (!value) {
969
+ return '';
970
+ }
971
+ const option = this.findOptionByValue(value);
972
+ return option?.display ?? (isDevMode() ? 'to display error' : '...');
973
+ }));
974
+ }
975
+ if (matAutocomplete) {
976
+ matAutocomplete.displayWith = this.resolvedToDisplay().bind(this);
988
977
  }
989
978
  if (!this.control) {
990
979
  throw new Error('The control is not yet defined');
@@ -995,8 +984,8 @@ let AutocompleteOptionsFromMethodDirective = class AutocompleteOptionsFromMethod
995
984
  // this is required because in the resolveValue method the control value is set
996
985
  // to trigger the toDisplay function in the mat-autocomplete
997
986
  distinctUntilChanged(), tap$1(async (value) => {
998
- await this.load(this.parameters);
999
- if (this.isValue?.(value)) {
987
+ await this.load(untracked(this.parameters));
988
+ if (this.resolvedIsValue()?.(value)) {
1000
989
  this.triggerAutocompleteToDisplay();
1001
990
  }
1002
991
  })).subscribe();
@@ -1007,7 +996,7 @@ let AutocompleteOptionsFromMethodDirective = class AutocompleteOptionsFromMethod
1007
996
  }
1008
997
  const value = this.control?.value;
1009
998
  const c_parameters = { ...parameters };
1010
- if (this.isValue?.(value)) {
999
+ if (this.resolvedIsValue()?.(value)) {
1011
1000
  return this.resolveValue(value, c_parameters);
1012
1001
  }
1013
1002
  else {
@@ -1020,13 +1009,14 @@ let AutocompleteOptionsFromMethodDirective = class AutocompleteOptionsFromMethod
1020
1009
  }
1021
1010
  renderTemplate() {
1022
1011
  super.renderTemplate();
1023
- if (this.matAutocomplete && !this.isAutocompleteToDisplayTriggered) {
1012
+ if (this.matAutocomplete() && !this.isAutocompleteToDisplayTriggered) {
1024
1013
  this.isAutocompleteToDisplayTriggered = true;
1025
1014
  this.triggerAutocompleteToDisplay();
1026
1015
  }
1027
1016
  }
1028
1017
  async resolveValue(value, parameters = {}) {
1029
- if (!this.resolveMethod) {
1018
+ const resolveMethod = this.resolvedResolveMethod();
1019
+ if (!resolveMethod) {
1030
1020
  if (isDevMode()) {
1031
1021
  console.warn('The resolve method is not yet defined');
1032
1022
  }
@@ -1034,7 +1024,7 @@ let AutocompleteOptionsFromMethodDirective = class AutocompleteOptionsFromMethod
1034
1024
  }
1035
1025
  // only resolve the value if the option is not already loaded
1036
1026
  if (!this.findOptionByValue(value)) {
1037
- const option = await this.resolveMethod.call({ ...parameters, value });
1027
+ const option = await resolveMethod.call({ ...parameters, value });
1038
1028
  if (option.value !== value) {
1039
1029
  throw new Error('The resolved value is not the same as the input value');
1040
1030
  }
@@ -1051,7 +1041,7 @@ let AutocompleteOptionsFromMethodDirective = class AutocompleteOptionsFromMethod
1051
1041
  return this.options?.find((option) => option.value === value) ?? null;
1052
1042
  }
1053
1043
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AutocompleteOptionsFromMethodDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
1054
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: AutocompleteOptionsFromMethodDirective, isStandalone: true, selector: "[rxapAutocompleteOptionsFromMethod]", inputs: { parameters: ["rxapAutocompleteOptionsFromMethodParameters", "parameters"], resetOnChange: ["rxapAutocompleteOptionsFromMethodResetOnChange", "resetOnChange"], matAutocomplete: ["rxapAutocompleteOptionsFromMethodMatAutocomplete", "matAutocomplete"], method: ["rxapAutocompleteOptionsFromMethodCall", "method"], resolveMethod: ["rxapAutocompleteOptionsFromMethodResolve", "resolveMethod"], isValue: ["rxapAutocompleteOptionsFromMethodIsValue", "isValue"], toDisplay: ["rxapAutocompleteOptionsFromMethodToDisplay", "toDisplay"] }, usesInheritance: true, ngImport: i0 }); }
1044
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: AutocompleteOptionsFromMethodDirective, isStandalone: true, selector: "[rxapAutocompleteOptionsFromMethod]", inputs: { parameters: { classPropertyName: "parameters", publicName: "rxapAutocompleteOptionsFromMethodParameters", isSignal: true, isRequired: false, transformFunction: null }, resetOnChange: { classPropertyName: "resetOnChange", publicName: "rxapAutocompleteOptionsFromMethodResetOnChange", isSignal: true, isRequired: false, transformFunction: null }, matAutocomplete: { classPropertyName: "matAutocomplete", publicName: "rxapAutocompleteOptionsFromMethodMatAutocomplete", isSignal: true, isRequired: false, transformFunction: null }, method: { classPropertyName: "method", publicName: "rxapAutocompleteOptionsFromMethodCall", isSignal: true, isRequired: false, transformFunction: null }, resolveMethod: { classPropertyName: "resolveMethod", publicName: "rxapAutocompleteOptionsFromMethodResolve", isSignal: true, isRequired: false, transformFunction: null }, isValue: { classPropertyName: "isValue", publicName: "rxapAutocompleteOptionsFromMethodIsValue", isSignal: true, isRequired: false, transformFunction: null }, toDisplay: { classPropertyName: "toDisplay", publicName: "rxapAutocompleteOptionsFromMethodToDisplay", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0 }); }
1055
1045
  };
1056
1046
  AutocompleteOptionsFromMethodDirective = __decorate([
1057
1047
  Mixin(ExtractResolveMethodMixin, ExtractIsValueFunctionMixin, ExtractToDisplayFunctionMixin)
@@ -1063,28 +1053,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
1063
1053
  selector: '[rxapAutocompleteOptionsFromMethod]',
1064
1054
  standalone: true,
1065
1055
  }]
1066
- }], propDecorators: { parameters: [{
1067
- type: Input,
1068
- args: ['rxapAutocompleteOptionsFromMethodParameters']
1069
- }], resetOnChange: [{
1070
- type: Input,
1071
- args: ['rxapAutocompleteOptionsFromMethodResetOnChange']
1072
- }], matAutocomplete: [{
1073
- type: Input,
1074
- args: ['rxapAutocompleteOptionsFromMethodMatAutocomplete']
1075
- }], method: [{
1076
- type: Input,
1077
- args: ['rxapAutocompleteOptionsFromMethodCall']
1078
- }], resolveMethod: [{
1079
- type: Input,
1080
- args: ['rxapAutocompleteOptionsFromMethodResolve']
1081
- }], isValue: [{
1082
- type: Input,
1083
- args: ['rxapAutocompleteOptionsFromMethodIsValue']
1084
- }], toDisplay: [{
1085
- type: Input,
1086
- args: ['rxapAutocompleteOptionsFromMethodToDisplay']
1087
- }] } });
1056
+ }], propDecorators: { parameters: [{ type: i0.Input, args: [{ isSignal: true, alias: "rxapAutocompleteOptionsFromMethodParameters", required: false }] }], resetOnChange: [{ type: i0.Input, args: [{ isSignal: true, alias: "rxapAutocompleteOptionsFromMethodResetOnChange", required: false }] }], matAutocomplete: [{ type: i0.Input, args: [{ isSignal: true, alias: "rxapAutocompleteOptionsFromMethodMatAutocomplete", required: false }] }], method: [{ type: i0.Input, args: [{ isSignal: true, alias: "rxapAutocompleteOptionsFromMethodCall", required: false }] }], resolveMethod: [{ type: i0.Input, args: [{ isSignal: true, alias: "rxapAutocompleteOptionsFromMethodResolve", required: false }] }], isValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "rxapAutocompleteOptionsFromMethodIsValue", required: false }] }], toDisplay: [{ type: i0.Input, args: [{ isSignal: true, alias: "rxapAutocompleteOptionsFromMethodToDisplay", required: false }] }] } });
1088
1057
 
1089
1058
  const RXAP_FORM_SYSTEM_SHOW_METADATA = 'rxap/form-system/show-function';
1090
1059
  const RXAP_FORM_SYSTEM_HIDE_METADATA = 'rxap/form-system/hide-function';
@@ -1106,21 +1075,23 @@ function UseShowFunction(showFunction, options = {}) {
1106
1075
  };
1107
1076
  }
1108
1077
  let ControlHideShowDirective = class ControlHideShowDirective {
1109
- constructor(renderer, elementRef, parent, ngControl) {
1110
- this.renderer = renderer;
1111
- this.elementRef = elementRef;
1112
- this.parent = parent;
1113
- this.ngControl = ngControl;
1078
+ constructor() {
1079
+ this.renderer = inject(Renderer2);
1080
+ this.elementRef = inject(ElementRef);
1081
+ this.parent = inject(ControlContainer, { optional: true });
1082
+ this.ngControl = inject(NgControl, { self: true, optional: true });
1083
+ this.controlId = input(undefined, { ...(ngDevMode ? { debugName: "controlId" } : /* istanbul ignore next */ {}), alias: "rxapControlHideShow" });
1114
1084
  this.subscription = new Subscription();
1115
1085
  }
1116
1086
  ngOnInit() {
1117
1087
  if (!this.ngControl && !this.parent) {
1118
1088
  throw new Error('Easier the ControlContainer or NgControl must be injectable');
1119
1089
  }
1120
- if (!this.ngControl && !this.controlId) {
1090
+ const controlId = this.controlId();
1091
+ if (!this.ngControl && !controlId) {
1121
1092
  throw new Error('If the NgControl is not injectable then the control id must be defined!');
1122
1093
  }
1123
- const control = this.ngControl?.control ?? this.extractControlFromParent(this.parent, this.controlId);
1094
+ const control = this.ngControl?.control ?? this.extractControlFromParent(this.parent, controlId);
1124
1095
  if (!(control instanceof RxapFormControl)) {
1125
1096
  throw new Error('The control is not an instance of RxapFormControl');
1126
1097
  }
@@ -1208,13 +1179,11 @@ let ControlHideShowDirective = class ControlHideShowDirective {
1208
1179
  reset() {
1209
1180
  this.renderer.removeStyle(this.elementRef.nativeElement, 'display');
1210
1181
  }
1211
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ControlHideShowDirective, deps: [{ token: Renderer2 }, { token: ElementRef }, { token: ControlContainer, optional: true }, { token: NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive }); }
1212
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: ControlHideShowDirective, isStandalone: true, selector: "[rxapControlHideShow]", inputs: { controlId: ["rxapControlHideShow", "controlId"] }, ngImport: i0 }); }
1182
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ControlHideShowDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1183
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: ControlHideShowDirective, isStandalone: true, selector: "[rxapControlHideShow]", inputs: { controlId: { classPropertyName: "controlId", publicName: "rxapControlHideShow", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
1213
1184
  };
1214
1185
  ControlHideShowDirective = __decorate([
1215
- Mixin(ExtractControlFromParentMixin, ExtractFormDefinitionMixin),
1216
- __metadata("design:paramtypes", [Renderer2,
1217
- ElementRef, Object, Object])
1186
+ Mixin(ExtractControlFromParentMixin, ExtractFormDefinitionMixin)
1218
1187
  ], ControlHideShowDirective);
1219
1188
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ControlHideShowDirective, decorators: [{
1220
1189
  type: Directive,
@@ -1222,42 +1191,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
1222
1191
  selector: '[rxapControlHideShow]',
1223
1192
  standalone: true,
1224
1193
  }]
1225
- }], ctorParameters: () => [{ type: i0.Renderer2, decorators: [{
1226
- type: Inject,
1227
- args: [Renderer2]
1228
- }] }, { type: i0.ElementRef, decorators: [{
1229
- type: Inject,
1230
- args: [ElementRef]
1231
- }] }, { type: i1$1.ControlContainer, decorators: [{
1232
- type: Optional
1233
- }, {
1234
- type: Inject,
1235
- args: [ControlContainer]
1236
- }] }, { type: i1$1.NgControl, decorators: [{
1237
- type: Self
1238
- }, {
1239
- type: Optional
1240
- }, {
1241
- type: Inject,
1242
- args: [NgControl]
1243
- }] }], propDecorators: { controlId: [{
1244
- type: Input,
1245
- args: ['rxapControlHideShow']
1246
- }] } });
1194
+ }], propDecorators: { controlId: [{ type: i0.Input, args: [{ isSignal: true, alias: "rxapControlHideShow", required: false }] }] } });
1247
1195
 
1248
1196
  let InputSelectOptionsDirective = class InputSelectOptionsDirective {
1249
- constructor(template, dataSourceLoader, viewContainerRef, injector, cdr,
1250
- // The ngControl could be unknown on construction
1251
- // bc it is available after the content is init
1252
- ngControl = null, matFormField = null) {
1253
- this.template = template;
1254
- this.dataSourceLoader = dataSourceLoader;
1255
- this.viewContainerRef = viewContainerRef;
1256
- this.injector = injector;
1257
- this.cdr = cdr;
1258
- this.ngControl = ngControl;
1259
- this.matFormField = matFormField;
1260
- this.viewer = { id: '[rxapInputSelectOptions]' };
1197
+ constructor() {
1198
+ this.template = inject(TemplateRef);
1199
+ this.dataSourceLoader = inject(DataSourceLoader);
1200
+ this.viewContainerRef = inject(ViewContainerRef);
1201
+ this.injector = inject(INJECTOR);
1202
+ this.cdr = inject(ChangeDetectorRef);
1203
+ this.ngControl = inject(NgControl, { optional: true }) ?? null;
1204
+ this.matFormField = inject(MAT_FORM_FIELD, { optional: true }) ?? null;
1205
+ this.viewer = input({ id: '[rxapInputSelectOptions]' }, { ...(ngDevMode ? { debugName: "viewer" } : /* istanbul ignore next */ {}), alias: "rxapInputSelectOptionsViewer" });
1206
+ this.metadata = input(undefined, { ...(ngDevMode ? { debugName: "metadata" } : /* istanbul ignore next */ {}), alias: "rxapInputSelectOptionsMetadata" });
1207
+ this.matAutocomplete = input(undefined, { ...(ngDevMode ? { debugName: "matAutocomplete" } : /* istanbul ignore next */ {}), alias: "rxapInputSelectOptionsMatAutocomplete" });
1208
+ /**
1209
+ * The viewer used to connect to the data source. Defaults to the input value, but is
1210
+ * replaced with a viewer bound to the control after the view init.
1211
+ */
1212
+ this.currentViewer = linkedSignal(() => this.viewer(), ...(ngDevMode ? [{ debugName: "currentViewer" }] : /* istanbul ignore next */ []));
1261
1213
  this.subscription = new Subscription();
1262
1214
  this.options = null;
1263
1215
  /**
@@ -1270,8 +1222,8 @@ let InputSelectOptionsDirective = class InputSelectOptionsDirective {
1270
1222
  this.isAutocompleteToDisplayTriggered = false;
1271
1223
  }
1272
1224
  ngAfterViewInit() {
1273
- this.extractOptionsDatasource();
1274
- this.viewer = {
1225
+ this.extractOptionsDatasource(undefined, this.metadata());
1226
+ this.currentViewer.set({
1275
1227
  id: '[rxapInputSelectOptions]' + this.control.controlId,
1276
1228
  viewChange: this.settings?.loadOnce ? EMPTY : this.control.value$.pipe(throttleTime(1000), distinctUntilChanged$1((a, b) => equals(a, b)), map(value => {
1277
1229
  if (this.settings?.ignoreSelectedValue) {
@@ -1280,9 +1232,10 @@ let InputSelectOptionsDirective = class InputSelectOptionsDirective {
1280
1232
  return value;
1281
1233
  })),
1282
1234
  control: this.control,
1283
- };
1284
- if (this.matAutocomplete) {
1285
- this.matAutocomplete.displayWith = this.toDisplay.bind(this);
1235
+ });
1236
+ const matAutocomplete = this.matAutocomplete();
1237
+ if (matAutocomplete) {
1238
+ matAutocomplete.displayWith = this.toDisplay.bind(this);
1286
1239
  this.settings ??= {};
1287
1240
  this.settings.filteredOptions ??= true;
1288
1241
  }
@@ -1299,7 +1252,7 @@ let InputSelectOptionsDirective = class InputSelectOptionsDirective {
1299
1252
  this.subscription?.unsubscribe();
1300
1253
  }
1301
1254
  loadOptions(dataSource = this.dataSource) {
1302
- this.subscription.add(dataSource.connect(this.viewer).pipe(switchMap(options => {
1255
+ this.subscription.add(dataSource.connect(this.currentViewer()).pipe(switchMap(options => {
1303
1256
  if (this.settings?.filteredOptions) {
1304
1257
  return this.control.value$.pipe(map(controlValue => {
1305
1258
  if (typeof controlValue === 'string' && controlValue) {
@@ -1323,7 +1276,7 @@ let InputSelectOptionsDirective = class InputSelectOptionsDirective {
1323
1276
  }
1324
1277
  return of(options);
1325
1278
  }), tap(options => this.renderTemplate(this.options = options)), tap(() => {
1326
- if (this.matAutocomplete && !this.isAutocompleteToDisplayTriggered) {
1279
+ if (this.matAutocomplete() && !this.isAutocompleteToDisplayTriggered) {
1327
1280
  this.isAutocompleteToDisplayTriggered = true;
1328
1281
  // trigger a change detection after the options are rendered
1329
1282
  // this is needed to trigger the mat-autocomplete options to display function
@@ -1357,16 +1310,11 @@ let InputSelectOptionsDirective = class InputSelectOptionsDirective {
1357
1310
  }
1358
1311
  this.cdr.detectChanges();
1359
1312
  }
1360
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: InputSelectOptionsDirective, deps: [{ token: TemplateRef }, { token: DataSourceLoader }, { token: ViewContainerRef }, { token: INJECTOR }, { token: ChangeDetectorRef }, { token: NgControl, optional: true }, { token: MAT_FORM_FIELD, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
1361
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: InputSelectOptionsDirective, isStandalone: true, selector: "[rxapInputSelectOptions]", inputs: { viewer: ["rxapInputSelectOptionsViewer", "viewer"], metadata: ["rxapInputSelectOptionsMetadata", "metadata"], matAutocomplete: ["rxapInputSelectOptionsMatAutocomplete", "matAutocomplete"] }, ngImport: i0 }); }
1313
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: InputSelectOptionsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1314
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: InputSelectOptionsDirective, isStandalone: true, selector: "[rxapInputSelectOptions]", inputs: { viewer: { classPropertyName: "viewer", publicName: "rxapInputSelectOptionsViewer", isSignal: true, isRequired: false, transformFunction: null }, metadata: { classPropertyName: "metadata", publicName: "rxapInputSelectOptionsMetadata", isSignal: true, isRequired: false, transformFunction: null }, matAutocomplete: { classPropertyName: "matAutocomplete", publicName: "rxapInputSelectOptionsMatAutocomplete", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
1362
1315
  };
1363
1316
  InputSelectOptionsDirective = __decorate([
1364
- Mixin(ExtractOptionsDataSourceMixin),
1365
- __metadata("design:paramtypes", [TemplateRef,
1366
- DataSourceLoader,
1367
- ViewContainerRef,
1368
- Injector,
1369
- ChangeDetectorRef, Object, Object])
1317
+ Mixin(ExtractOptionsDataSourceMixin)
1370
1318
  ], InputSelectOptionsDirective);
1371
1319
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: InputSelectOptionsDirective, decorators: [{
1372
1320
  type: Directive,
@@ -1374,62 +1322,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
1374
1322
  selector: '[rxapInputSelectOptions]',
1375
1323
  standalone: true,
1376
1324
  }]
1377
- }], ctorParameters: () => [{ type: i0.TemplateRef, decorators: [{
1378
- type: Inject,
1379
- args: [TemplateRef]
1380
- }] }, { type: i1.DataSourceLoader, decorators: [{
1381
- type: Inject,
1382
- args: [DataSourceLoader]
1383
- }] }, { type: i0.ViewContainerRef, decorators: [{
1384
- type: Inject,
1385
- args: [ViewContainerRef]
1386
- }] }, { type: i0.Injector, decorators: [{
1387
- type: Inject,
1388
- args: [INJECTOR]
1389
- }] }, { type: i0.ChangeDetectorRef, decorators: [{
1390
- type: Inject,
1391
- args: [ChangeDetectorRef]
1392
- }] }, { type: i1$1.NgControl, decorators: [{
1393
- type: Optional
1394
- }, {
1395
- type: Inject,
1396
- args: [NgControl]
1397
- }] }, { type: i3.MatFormField, decorators: [{
1398
- type: Optional
1399
- }, {
1400
- type: Inject,
1401
- args: [MAT_FORM_FIELD]
1402
- }] }], propDecorators: { viewer: [{
1403
- type: Input,
1404
- args: ['rxapInputSelectOptionsViewer']
1405
- }], metadata: [{
1406
- type: Input,
1407
- args: ['rxapInputSelectOptionsMetadata']
1408
- }], matAutocomplete: [{
1409
- type: Input,
1410
- args: ['rxapInputSelectOptionsMatAutocomplete']
1411
- }] } });
1412
-
1413
- class FormSystemDirectivesModule {
1414
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FormSystemDirectivesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1415
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: FormSystemDirectivesModule, imports: [InputSelectOptionsDirective,
1416
- ControlHideShowDirective], exports: [InputSelectOptionsDirective,
1417
- ControlHideShowDirective] }); }
1418
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FormSystemDirectivesModule }); }
1419
- }
1420
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FormSystemDirectivesModule, decorators: [{
1421
- type: NgModule,
1422
- args: [{
1423
- exports: [
1424
- InputSelectOptionsDirective,
1425
- ControlHideShowDirective,
1426
- ],
1427
- imports: [
1428
- InputSelectOptionsDirective,
1429
- ControlHideShowDirective,
1430
- ],
1431
- }]
1432
- }] });
1325
+ }], propDecorators: { viewer: [{ type: i0.Input, args: [{ isSignal: true, alias: "rxapInputSelectOptionsViewer", required: false }] }], metadata: [{ type: i0.Input, args: [{ isSignal: true, alias: "rxapInputSelectOptionsMetadata", required: false }] }], matAutocomplete: [{ type: i0.Input, args: [{ isSignal: true, alias: "rxapInputSelectOptionsMatAutocomplete", required: false }] }] } });
1433
1326
 
1434
1327
  const REMOTE_METHOD_NAME = 'options';
1435
1328
  const RXAP_USE_REMOTE_METHOD = 'rxap/form-system/remote-method/use';
@@ -1456,29 +1349,36 @@ class ExtractRemoteMethodsMixin {
1456
1349
  }
1457
1350
  }
1458
1351
  let OptionsFromRemoteMethodDirective = class OptionsFromRemoteMethodDirective {
1459
- constructor(ngControl, template, remoteMethodLoader, viewContainerRef, injector, cdr) {
1460
- this.ngControl = ngControl;
1461
- this.template = template;
1462
- this.remoteMethodLoader = remoteMethodLoader;
1463
- this.viewContainerRef = viewContainerRef;
1464
- this.injector = injector;
1465
- this.cdr = cdr;
1466
- this.withoutParameters = false;
1467
- }
1468
- ngOnChanges(changes) {
1469
- const parametersChanges = changes['parameters'];
1470
- if (parametersChanges) {
1471
- if (!this.remoteMethodToken) {
1472
- this.remoteMethodToken = this.extractRemoteMethodToken();
1352
+ constructor() {
1353
+ this.ngControl = inject(NgControl);
1354
+ this.template = inject(TemplateRef);
1355
+ this.remoteMethodLoader = inject(RemoteMethodLoader);
1356
+ this.viewContainerRef = inject(ViewContainerRef);
1357
+ this.injector = inject(INJECTOR);
1358
+ this.cdr = inject(ChangeDetectorRef);
1359
+ this.parameters = input(undefined, { ...(ngDevMode ? { debugName: "parameters" } : /* istanbul ignore next */ {}), alias: "rxapOptionsFromRemoteMethodParameters" });
1360
+ this.resetOnChange = input(undefined, { ...(ngDevMode ? { debugName: "resetOnChange" } : /* istanbul ignore next */ {}), alias: "rxapOptionsFromRemoteMethodResetOnChange" });
1361
+ this.withoutParameters = input(false, { ...(ngDevMode ? { debugName: "withoutParameters" } : /* istanbul ignore next */ {}), alias: "rxapOptionsFromRemoteMethodWithoutParameters" });
1362
+ effect(() => {
1363
+ const parameters = this.parameters();
1364
+ // the parameters are only relevant if the input is bound
1365
+ if (parameters === undefined) {
1366
+ return;
1473
1367
  }
1474
- this.renderTemplate(parametersChanges.currentValue);
1475
- }
1476
- if (changes['withoutParameters']?.currentValue) {
1477
- if (!this.remoteMethodToken) {
1478
- this.remoteMethodToken = this.extractRemoteMethodToken();
1368
+ untracked(() => {
1369
+ this.remoteMethodToken ??= this.extractRemoteMethodToken();
1370
+ return this.renderTemplate(parameters);
1371
+ });
1372
+ });
1373
+ effect(() => {
1374
+ if (!this.withoutParameters()) {
1375
+ return;
1479
1376
  }
1480
- this.renderTemplate();
1481
- }
1377
+ untracked(() => {
1378
+ this.remoteMethodToken ??= this.extractRemoteMethodToken();
1379
+ return this.renderTemplate();
1380
+ });
1381
+ });
1482
1382
  }
1483
1383
  extractRemoteMethodToken() {
1484
1384
  const control = this.ngControl.control;
@@ -1498,22 +1398,18 @@ let OptionsFromRemoteMethodDirective = class OptionsFromRemoteMethodDirective {
1498
1398
  for (const option of options) {
1499
1399
  this.viewContainerRef.createEmbeddedView(this.template, { $implicit: option });
1500
1400
  }
1501
- if (this.resetOnChange !== undefined) {
1502
- this.ngControl.reset(this.resetOnChange);
1401
+ const resetOnChange = untracked(this.resetOnChange);
1402
+ if (resetOnChange !== undefined) {
1403
+ this.ngControl.reset(resetOnChange);
1503
1404
  }
1504
1405
  this.cdr.detectChanges();
1505
1406
  }
1506
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OptionsFromRemoteMethodDirective, deps: [{ token: NgControl }, { token: TemplateRef }, { token: RemoteMethodLoader }, { token: ViewContainerRef }, { token: INJECTOR }, { token: ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive }); }
1507
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: OptionsFromRemoteMethodDirective, isStandalone: true, selector: "[rxapOptionsFromRemoteMethod]", inputs: { parameters: ["rxapOptionsFromRemoteMethodParameters", "parameters"], resetOnChange: ["rxapOptionsFromRemoteMethodResetOnChange", "resetOnChange"], withoutParameters: ["rxapOptionsFromRemoteMethodWithoutParameters", "withoutParameters"] }, usesOnChanges: true, ngImport: i0 }); }
1407
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OptionsFromRemoteMethodDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1408
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: OptionsFromRemoteMethodDirective, isStandalone: true, selector: "[rxapOptionsFromRemoteMethod]", inputs: { parameters: { classPropertyName: "parameters", publicName: "rxapOptionsFromRemoteMethodParameters", isSignal: true, isRequired: false, transformFunction: null }, resetOnChange: { classPropertyName: "resetOnChange", publicName: "rxapOptionsFromRemoteMethodResetOnChange", isSignal: true, isRequired: false, transformFunction: null }, withoutParameters: { classPropertyName: "withoutParameters", publicName: "rxapOptionsFromRemoteMethodWithoutParameters", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
1508
1409
  };
1509
1410
  OptionsFromRemoteMethodDirective = __decorate([
1510
1411
  Mixin(ExtractFormDefinitionMixin, ExtractRemoteMethodsMixin),
1511
- __metadata("design:paramtypes", [NgControl,
1512
- TemplateRef,
1513
- RemoteMethodLoader,
1514
- ViewContainerRef,
1515
- Injector,
1516
- ChangeDetectorRef])
1412
+ __metadata("design:paramtypes", [])
1517
1413
  ], OptionsFromRemoteMethodDirective);
1518
1414
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OptionsFromRemoteMethodDirective, decorators: [{
1519
1415
  type: Directive,
@@ -1521,34 +1417,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
1521
1417
  selector: '[rxapOptionsFromRemoteMethod]',
1522
1418
  standalone: true,
1523
1419
  }]
1524
- }], ctorParameters: () => [{ type: i1$1.NgControl, decorators: [{
1525
- type: Inject,
1526
- args: [NgControl]
1527
- }] }, { type: i0.TemplateRef, decorators: [{
1528
- type: Inject,
1529
- args: [TemplateRef]
1530
- }] }, { type: i2$1.RemoteMethodLoader, decorators: [{
1531
- type: Inject,
1532
- args: [RemoteMethodLoader]
1533
- }] }, { type: i0.ViewContainerRef, decorators: [{
1534
- type: Inject,
1535
- args: [ViewContainerRef]
1536
- }] }, { type: i0.Injector, decorators: [{
1537
- type: Inject,
1538
- args: [INJECTOR]
1539
- }] }, { type: i0.ChangeDetectorRef, decorators: [{
1540
- type: Inject,
1541
- args: [ChangeDetectorRef]
1542
- }] }], propDecorators: { parameters: [{
1543
- type: Input,
1544
- args: ['rxapOptionsFromRemoteMethodParameters']
1545
- }], resetOnChange: [{
1546
- type: Input,
1547
- args: ['rxapOptionsFromRemoteMethodResetOnChange']
1548
- }], withoutParameters: [{
1549
- type: Input,
1550
- args: ['rxapOptionsFromRemoteMethodWithoutParameters']
1551
- }] } });
1420
+ }], ctorParameters: () => [], propDecorators: { parameters: [{ type: i0.Input, args: [{ isSignal: true, alias: "rxapOptionsFromRemoteMethodParameters", required: false }] }], resetOnChange: [{ type: i0.Input, args: [{ isSignal: true, alias: "rxapOptionsFromRemoteMethodResetOnChange", required: false }] }], withoutParameters: [{ type: i0.Input, args: [{ isSignal: true, alias: "rxapOptionsFromRemoteMethodWithoutParameters", required: false }] }] } });
1552
1421
 
1553
1422
  class TestNgControl extends NgControl {
1554
1423
  constructor(_control) {
@@ -1621,12 +1490,16 @@ function FormContextFromActivatedRouteFactory(route) {
1621
1490
  }
1622
1491
 
1623
1492
  let FormSystemControlDirective = class FormSystemControlDirective {
1624
- constructor(parent, cfr, viewContainerRef, dataSourceLoader, injector) {
1625
- this.parent = parent;
1626
- this.cfr = cfr;
1627
- this.viewContainerRef = viewContainerRef;
1628
- this.dataSourceLoader = dataSourceLoader;
1629
- this.injector = injector;
1493
+ constructor() {
1494
+ this.parent = inject(ControlContainer);
1495
+ this.environmentInjector = inject(EnvironmentInjector);
1496
+ this.viewContainerRef = inject(ViewContainerRef);
1497
+ this.dataSourceLoader = inject(DataSourceLoader);
1498
+ this.injector = inject(INJECTOR);
1499
+ /**
1500
+ * Defines the form control id
1501
+ */
1502
+ this.controlId = input.required(...(ngDevMode ? [{ debugName: "controlId" }] : /* istanbul ignore next */ []));
1630
1503
  }
1631
1504
  ngOnInit() {
1632
1505
  this.control = this.extractControl();
@@ -1654,7 +1527,7 @@ let FormSystemControlDirective = class FormSystemControlDirective {
1654
1527
  if (!component.setDataSource) {
1655
1528
  throw new RxapFormSystemError('The ControlWithDataSource interface is not implemented for the control component, but the control has defined data sources', '');
1656
1529
  }
1657
- const useDataSourceValueMap = this.extractDataSources(formDefinition, this.controlId);
1530
+ const useDataSourceValueMap = this.extractDataSources(formDefinition, this.controlId());
1658
1531
  for (const [name, useDataSourceValue] of useDataSourceValueMap.entries()) {
1659
1532
  let dataSource = this.dataSourceLoader.load(useDataSourceValue.dataSource);
1660
1533
  const settings = useDataSourceValue.settings;
@@ -1672,14 +1545,16 @@ let FormSystemControlDirective = class FormSystemControlDirective {
1672
1545
  }
1673
1546
  createComponent(formDefinition) {
1674
1547
  const component = this.extractComponent(formDefinition);
1675
- const componentFactory = this.cfr.resolveComponentFactory(component);
1676
- return componentFactory.create(this.injector);
1548
+ return createComponent(component, {
1549
+ environmentInjector: this.environmentInjector,
1550
+ elementInjector: this.injector,
1551
+ });
1677
1552
  }
1678
1553
  extractControl() {
1679
1554
  if (!this.parent.control) {
1680
1555
  throw new RxapFormSystemError('The control property of ControlContainer is not defined', '');
1681
1556
  }
1682
- const control = this.parent.control.get(this.controlId);
1557
+ const control = this.parent.control.get(this.controlId());
1683
1558
  if (!control) {
1684
1559
  throw new RxapFormSystemError('Could not find the control instance', '');
1685
1560
  }
@@ -1700,31 +1575,28 @@ let FormSystemControlDirective = class FormSystemControlDirective {
1700
1575
  if (!map) {
1701
1576
  throw new RxapFormSystemError('Could not extract the use component map from the form definition instance', '');
1702
1577
  }
1703
- if (!map.has(this.controlId)) {
1578
+ const controlId = this.controlId();
1579
+ if (!map.has(controlId)) {
1704
1580
  throw new RxapFormSystemError('A use component definition does not exists in the form definition metadata', '');
1705
1581
  }
1706
- return map.get(this.controlId);
1582
+ return map.get(controlId);
1707
1583
  }
1708
1584
  extractComponentProperties(formDefinition) {
1709
1585
  const map = getMetadata(FormSystemMetadataKeys.COMPONENTS_PROPERTIES, Object.getPrototypeOf(formDefinition));
1710
1586
  if (!map) {
1711
1587
  throw new RxapFormSystemError('Could not extract the use component properties map from the form definition instance', '');
1712
1588
  }
1713
- if (!map.has(this.controlId)) {
1589
+ const controlId = this.controlId();
1590
+ if (!map.has(controlId)) {
1714
1591
  throw new RxapFormSystemError('A use component definition does not exists in the form definition metadata', '');
1715
1592
  }
1716
- return map.get(this.controlId);
1593
+ return map.get(controlId);
1717
1594
  }
1718
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FormSystemControlDirective, deps: [{ token: ControlContainer }, { token: ComponentFactoryResolver }, { token: ViewContainerRef }, { token: DataSourceLoader }, { token: INJECTOR }], target: i0.ɵɵFactoryTarget.Directive }); }
1719
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: FormSystemControlDirective, isStandalone: true, selector: "[rxapFormSystemControl]", inputs: { controlId: "controlId" }, ngImport: i0 }); }
1595
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FormSystemControlDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1596
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: FormSystemControlDirective, isStandalone: true, selector: "[rxapFormSystemControl]", inputs: { controlId: { classPropertyName: "controlId", publicName: "controlId", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 }); }
1720
1597
  };
1721
1598
  FormSystemControlDirective = __decorate([
1722
- Mixin(ExtractDataSourcesMixin),
1723
- __metadata("design:paramtypes", [ControlContainer,
1724
- ComponentFactoryResolver,
1725
- ViewContainerRef,
1726
- DataSourceLoader,
1727
- Injector])
1599
+ Mixin(ExtractDataSourcesMixin)
1728
1600
  ], FormSystemControlDirective);
1729
1601
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FormSystemControlDirective, decorators: [{
1730
1602
  type: Directive,
@@ -1732,25 +1604,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
1732
1604
  selector: '[rxapFormSystemControl]',
1733
1605
  standalone: true,
1734
1606
  }]
1735
- }], ctorParameters: () => [{ type: i1$1.ControlContainer, decorators: [{
1736
- type: Inject,
1737
- args: [ControlContainer]
1738
- }] }, { type: i0.ComponentFactoryResolver, decorators: [{
1739
- type: Inject,
1740
- args: [ComponentFactoryResolver]
1741
- }] }, { type: i0.ViewContainerRef, decorators: [{
1742
- type: Inject,
1743
- args: [ViewContainerRef]
1744
- }] }, { type: i1.DataSourceLoader, decorators: [{
1745
- type: Inject,
1746
- args: [DataSourceLoader]
1747
- }] }, { type: i0.Injector, decorators: [{
1748
- type: Inject,
1749
- args: [INJECTOR]
1750
- }] }], propDecorators: { controlId: [{
1751
- type: Input,
1752
- args: [{ required: true }]
1753
- }] } });
1607
+ }], propDecorators: { controlId: [{ type: i0.Input, args: [{ isSignal: true, alias: "controlId", required: true }] }] } });
1754
1608
 
1755
1609
  const SUBMIT_CONTEXT_FORM_ADAPTER_METHOD = new InjectionToken('submit-context-form-adapter-method');
1756
1610
  class SubmitContextFormAdapter extends ProxyRemoteMethod {
@@ -1787,5 +1641,5 @@ function SubmitContextFormAdapterFactory(remoteMethod, context) {
1787
1641
  * Generated bundle index. Do not edit.
1788
1642
  */
1789
1643
 
1790
- export { ApplyUseFunctionAdapters, ApplyUseMethodAdapters, AutocompleteOptionsFromMethodDirective, ComposeOptionsTransformers, ControlDataSource, ControlHideShowDirective, DATA_SOURCE_NAME, ExtractControlFromParentMixin, ExtractControlMixin, ExtractDataSourcesMixin, ExtractFormDefinitionMixin, ExtractFunctionMixin, ExtractFunctionsMixin, ExtractIsValueFunctionMixin, ExtractMethodMixin, ExtractMethodsMixin, ExtractOptionsDataSourceMixin, ExtractOptionsMethodMixin, ExtractRemoteMethodsMixin, ExtractResolveMethodMixin, ExtractToDisplayFunctionMixin, ForFormArrayItemsDirective, FormArrayAddItemButtonDirective, FormArrayItemButton, FormArrayItemRemoveButtonDirective, FormArrayItemRestoreButtonDirective, FormArrayRemovableDirective, FormContextFromActivatedRouteFactory, FormSystemControlDirective, FormSystemDirectivesModule, FormSystemMetadataKeys, IS_VALUE_FUNCTION_NAME, InputSelectOptionsDirective, IsEqualToDirective, IsSelectableValueDirective, NoopResolveMethod, OPTIONS_METHOD_NAME, OptionsFromMethodDirective, OptionsFromRemoteMethodDirective, REMOTE_METHOD_NAME, RESOLVE_METHOD_NAME, RXAP_FORM_CONTROL_SOURCE, RXAP_FORM_SYSTEM_HIDE_METADATA, RXAP_FORM_SYSTEM_HIDE_SHOW_OPTIONS, RXAP_FORM_SYSTEM_SHOW_METADATA, RXAP_USE_FUNCTION, RXAP_USE_METHOD, RXAP_USE_REMOTE_METHOD, ResolveByUuidParameter, ResolveByUuidResultFactory, RxapFormSystemError, SUBMIT_CONTEXT_FORM_ADAPTER_METHOD, SubmitContextFormAdapter, SubmitContextFormAdapterFactory, TO_DISPLAY_FUNCTION_NAME, TestNgControl, UseAutocompleteIsValueFunction, UseAutocompleteOptionsMethod, UseAutocompleteResolveMethod, UseAutocompleteToDisplayFunction, UseComponent, UseDataSource, UseFormComponent, UseFunction, UseHideFunction, UseIsValueFunction, UseMethod, UseOptionsDataSource, UseOptionsMethod, UseOptionsRemoteMethod, UseRemoteMethod, UseResolveMethod, UseShowFunction, UseToDisplayFunction, controlDataSource };
1644
+ export { AbstractOptionsFromMethodDirective, ApplyUseFunctionAdapters, ApplyUseMethodAdapters, AutocompleteOptionsFromMethodDirective, ComposeOptionsTransformers, ControlDataSource, ControlHideShowDirective, DATA_SOURCE_NAME, ExtractControlFromParentMixin, ExtractControlMixin, ExtractDataSourcesMixin, ExtractFormDefinitionMixin, ExtractFunctionMixin, ExtractFunctionsMixin, ExtractIsValueFunctionMixin, ExtractMethodMixin, ExtractMethodsMixin, ExtractOptionsDataSourceMixin, ExtractOptionsMethodMixin, ExtractRemoteMethodsMixin, ExtractResolveMethodMixin, ExtractToDisplayFunctionMixin, ForFormArrayItemsDirective, FormArrayAddItemButtonDirective, FormArrayItemButton, FormArrayItemRemoveButtonDirective, FormArrayItemRestoreButtonDirective, FormArrayRemovableDirective, FormContextFromActivatedRouteFactory, FormSystemControlDirective, FormSystemMetadataKeys, IS_VALUE_FUNCTION_NAME, InputSelectOptionsDirective, IsEqualToDirective, IsSelectableValueDirective, NoopResolveMethod, OPTIONS_METHOD_NAME, OptionsFromMethodDirective, OptionsFromRemoteMethodDirective, REMOTE_METHOD_NAME, RESOLVE_METHOD_NAME, RXAP_FORM_CONTROL_SOURCE, RXAP_FORM_SYSTEM_HIDE_METADATA, RXAP_FORM_SYSTEM_HIDE_SHOW_OPTIONS, RXAP_FORM_SYSTEM_SHOW_METADATA, RXAP_USE_FUNCTION, RXAP_USE_METHOD, RXAP_USE_REMOTE_METHOD, ResolveByUuidParameter, ResolveByUuidResultFactory, RxapFormSystemError, SUBMIT_CONTEXT_FORM_ADAPTER_METHOD, SubmitContextFormAdapter, SubmitContextFormAdapterFactory, TO_DISPLAY_FUNCTION_NAME, TestNgControl, UseAutocompleteIsValueFunction, UseAutocompleteOptionsMethod, UseAutocompleteResolveMethod, UseAutocompleteToDisplayFunction, UseComponent, UseDataSource, UseFormComponent, UseFunction, UseHideFunction, UseIsValueFunction, UseMethod, UseOptionsDataSource, UseOptionsMethod, UseOptionsRemoteMethod, UseRemoteMethod, UseResolveMethod, UseShowFunction, UseToDisplayFunction, controlDataSource };
1791
1645
  //# sourceMappingURL=rxap-form-system.mjs.map