@rxap/forms 19.2.0 → 21.0.1-dev.0

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 (462) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/compodoc/changelog.html +22 -0
  3. package/compodoc/classes/FormArrayControlManager.html +13 -10
  4. package/compodoc/classes/RxapFormArray.html +3 -1
  5. package/compodoc/classes/RxapFormBuilder.html +13 -10
  6. package/compodoc/classes/RxapFormControl.html +3 -1
  7. package/compodoc/classes/RxapFormGroup.html +3 -1
  8. package/compodoc/dependencies.html +13 -13
  9. package/compodoc/js/search/search_index.js +2 -2
  10. package/compodoc/properties.html +1 -1
  11. package/docs/documentation.json +12279 -9865
  12. package/docs/html/assets/hierarchy.js +1 -1
  13. package/docs/html/classes/ControlValueAccessor.html +5 -5
  14. package/docs/html/classes/FormArrayControlManager.html +2 -2
  15. package/docs/html/classes/FormControlErrorDirective.html +5 -5
  16. package/docs/html/classes/FormControlMarkDirtyDirective.html +2 -2
  17. package/docs/html/classes/FormControlMarkPristineDirective.html +2 -2
  18. package/docs/html/classes/FormControlMarkTouchedDirective.html +2 -2
  19. package/docs/html/classes/FormControlMarkUntouchedDirective.html +2 -2
  20. package/docs/html/classes/FormControlNameDirective.html +33 -33
  21. package/docs/html/classes/FormDirective.html +47 -47
  22. package/docs/html/classes/FormGroupNameDirective.html +28 -28
  23. package/docs/html/classes/FormLoadedDirective.html +4 -4
  24. package/docs/html/classes/FormLoadingDirective.html +4 -4
  25. package/docs/html/classes/FormLoadingErrorDirective.html +4 -4
  26. package/docs/html/classes/FormResetDirective.html +2 -2
  27. package/docs/html/classes/FormSubmitDirective.html +3 -3
  28. package/docs/html/classes/FormSubmitFailedDirective.html +4 -4
  29. package/docs/html/classes/FormSubmitInvalidDirective.html +4 -4
  30. package/docs/html/classes/FormSubmitSuccessfulDirective.html +4 -4
  31. package/docs/html/classes/FormSubmittingDirective.html +4 -4
  32. package/docs/html/classes/ParentControlContainerDirective.html +2 -2
  33. package/docs/html/classes/RxapFormArray.html +96 -79
  34. package/docs/html/classes/RxapFormBuilder.html +2 -2
  35. package/docs/html/classes/RxapFormControl.html +92 -75
  36. package/docs/html/classes/RxapFormGroup.html +93 -77
  37. package/docs/html/classes/RxapFormsModule.html +2 -2
  38. package/docs/html/enums/MetadataKeys.html +2 -2
  39. package/docs/html/functions/ControlAsyncValidator.html +1 -1
  40. package/docs/html/functions/ControlChange.html +1 -1
  41. package/docs/html/functions/ControlSetValue.html +1 -1
  42. package/docs/html/functions/ControlValidator.html +1 -1
  43. package/docs/html/functions/IsArray.html +1 -1
  44. package/docs/html/functions/IsBoolean.html +1 -1
  45. package/docs/html/functions/IsComplex.html +1 -1
  46. package/docs/html/functions/IsDate.html +1 -1
  47. package/docs/html/functions/IsEmail.html +1 -1
  48. package/docs/html/functions/IsEnum.html +1 -1
  49. package/docs/html/functions/IsIP.html +1 -1
  50. package/docs/html/functions/IsInt.html +1 -1
  51. package/docs/html/functions/IsNumber-1.html +2 -2
  52. package/docs/html/functions/IsObject.html +1 -1
  53. package/docs/html/functions/IsPhoneNumber.html +1 -1
  54. package/docs/html/functions/IsPort.html +1 -1
  55. package/docs/html/functions/IsString.html +1 -1
  56. package/docs/html/functions/IsUUID.html +1 -1
  57. package/docs/html/functions/IsUrl.html +1 -1
  58. package/docs/html/functions/RxapForm.html +1 -1
  59. package/docs/html/functions/ToFormMethod.html +1 -1
  60. package/docs/html/functions/ToFormSubmitMethod.html +2 -2
  61. package/docs/html/functions/UseFormArrayControl.html +1 -1
  62. package/docs/html/functions/UseFormArrayGroup.html +1 -1
  63. package/docs/html/functions/UseFormControl.html +1 -1
  64. package/docs/html/functions/UseFormGroup.html +1 -1
  65. package/docs/html/functions/_IsNumber.html +1 -1
  66. package/docs/html/functions/controlDisabledWhile.html +1 -1
  67. package/docs/html/functions/controlDisabled_.html +1 -1
  68. package/docs/html/functions/controlEnabledWhile.html +1 -1
  69. package/docs/html/functions/controlEnabled_.html +1 -1
  70. package/docs/html/functions/controlErrorChanges_.html +1 -1
  71. package/docs/html/functions/controlReadonly_.html +1 -1
  72. package/docs/html/functions/controlStatusChanges_.html +1 -1
  73. package/docs/html/functions/controlValueChanges_.html +1 -1
  74. package/docs/html/functions/disableControl.html +1 -1
  75. package/docs/html/functions/enableControl.html +1 -1
  76. package/docs/html/functions/hasErrorAndDirty.html +1 -1
  77. package/docs/html/functions/hasErrorAndTouched.html +1 -1
  78. package/docs/html/functions/isNumber.html +2 -2
  79. package/docs/html/functions/markAllDirty.html +1 -1
  80. package/docs/html/functions/markAllPristine.html +1 -1
  81. package/docs/html/functions/markAllUntouched.html +1 -1
  82. package/docs/html/functions/mergeControlValidators.html +1 -1
  83. package/docs/html/functions/selectControlValue_.html +1 -1
  84. package/docs/html/functions/validateControlOn.html +1 -1
  85. package/docs/html/hierarchy.html +1 -1
  86. package/docs/html/index.html +2 -2
  87. package/docs/html/interfaces/AbstractControl.html +95 -71
  88. package/docs/html/interfaces/AbstractControlOptions.html +4 -4
  89. package/docs/html/interfaces/BoxedValue.html +2 -2
  90. package/docs/html/interfaces/ComplexityOptions.html +2 -2
  91. package/docs/html/interfaces/ControlOptions.html +3 -3
  92. package/docs/html/interfaces/ControlSetValueOptions.html +2 -2
  93. package/docs/html/interfaces/FormArrayOptions.html +4 -4
  94. package/docs/html/interfaces/FormDefinition.html +6 -6
  95. package/docs/html/interfaces/FormDefinitionArray.html +43 -36
  96. package/docs/html/interfaces/FormDefinitionMetadata.html +5 -5
  97. package/docs/html/interfaces/FormGroupOptions.html +4 -4
  98. package/docs/html/interfaces/FormLoadFailedMethod.html +2 -2
  99. package/docs/html/interfaces/FormLoadMethod.html +2 -2
  100. package/docs/html/interfaces/FormLoadSuccessfulMethod.html +2 -2
  101. package/docs/html/interfaces/FormOptions.html +4 -4
  102. package/docs/html/interfaces/FormSubmitFailedMethod.html +2 -2
  103. package/docs/html/interfaces/FormSubmitMethod.html +2 -2
  104. package/docs/html/interfaces/FormSubmitSuccessfulMethod.html +2 -2
  105. package/docs/html/interfaces/InjectableValidator.html +2 -2
  106. package/docs/html/interfaces/IsNumberOptions.html +3 -3
  107. package/docs/html/interfaces/NgValidatorsErrors.html +2 -2
  108. package/docs/html/interfaces/RxapAbstractControlOptionsWithDefinition.html +4 -4
  109. package/docs/html/interfaces/_RxapAbstractControlOptions.html +4 -4
  110. package/docs/html/modules.html +1 -1
  111. package/docs/html/types/AsyncValidator.html +1 -1
  112. package/docs/html/types/AsyncValidatorFn.html +1 -1
  113. package/docs/html/types/ChangeFn.html +1 -1
  114. package/docs/html/types/ControlEventOptions.html +1 -1
  115. package/docs/html/types/ControlInsertedFn.html +1 -1
  116. package/docs/html/types/ControlPath.html +1 -1
  117. package/docs/html/types/ControlRemovedFn.html +1 -1
  118. package/docs/html/types/ControlState.html +1 -1
  119. package/docs/html/types/EmitEvent.html +1 -1
  120. package/docs/html/types/ExtractAbstractControl.html +1 -1
  121. package/docs/html/types/ExtractStrings.html +1 -1
  122. package/docs/html/types/FormBuilderFn.html +1 -1
  123. package/docs/html/types/FormType.html +1 -1
  124. package/docs/html/types/KeyValueControls.html +1 -1
  125. package/docs/html/types/OnlySelf.html +1 -1
  126. package/docs/html/types/OrBoxedValue.html +1 -1
  127. package/docs/html/types/RxapAbstractControlOptions.html +1 -1
  128. package/docs/html/types/SetValueFn.html +1 -1
  129. package/docs/html/types/ValidationErrors.html +1 -1
  130. package/docs/html/types/Validator.html +1 -1
  131. package/docs/html/types/ValidatorFn.html +1 -1
  132. package/docs/html/types/ValidatorOrOpts.html +1 -1
  133. package/docs/html/variables/RXAP_FORM_CONTEXT.html +1 -1
  134. package/docs/html/variables/RXAP_FORM_DEFINITION.html +1 -1
  135. package/docs/html/variables/RXAP_FORM_DEFINITION_BUILDER.html +1 -1
  136. package/docs/html/variables/RXAP_FORM_INITIAL_STATE.html +1 -1
  137. package/docs/html/variables/RXAP_FORM_LOAD_FAILED_METHOD.html +1 -1
  138. package/docs/html/variables/RXAP_FORM_LOAD_METHOD.html +1 -1
  139. package/docs/html/variables/RXAP_FORM_LOAD_SUCCESSFUL_METHOD.html +1 -1
  140. package/docs/html/variables/RXAP_FORM_SUBMIT_FAILED_METHOD.html +1 -1
  141. package/docs/html/variables/RXAP_FORM_SUBMIT_METHOD.html +1 -1
  142. package/docs/html/variables/RXAP_FORM_SUBMIT_SUCCESSFUL_METHOD.html +1 -1
  143. package/docs/html/variables/RxapValidators.html +1 -1
  144. package/docs/markdown/README.md +1 -1
  145. package/docs/markdown/classes/ControlValueAccessor.md +8 -8
  146. package/docs/markdown/classes/FormArrayControlManager.md +6 -6
  147. package/docs/markdown/classes/FormControlErrorDirective.md +7 -7
  148. package/docs/markdown/classes/FormControlMarkDirtyDirective.md +4 -4
  149. package/docs/markdown/classes/FormControlMarkPristineDirective.md +4 -4
  150. package/docs/markdown/classes/FormControlMarkTouchedDirective.md +4 -4
  151. package/docs/markdown/classes/FormControlMarkUntouchedDirective.md +4 -4
  152. package/docs/markdown/classes/FormControlNameDirective.md +36 -38
  153. package/docs/markdown/classes/FormDirective.md +139 -91
  154. package/docs/markdown/classes/FormGroupNameDirective.md +31 -31
  155. package/docs/markdown/classes/FormLoadedDirective.md +5 -5
  156. package/docs/markdown/classes/FormLoadingDirective.md +5 -5
  157. package/docs/markdown/classes/FormLoadingErrorDirective.md +5 -5
  158. package/docs/markdown/classes/FormResetDirective.md +8 -8
  159. package/docs/markdown/classes/FormSubmitDirective.md +15 -15
  160. package/docs/markdown/classes/FormSubmitFailedDirective.md +5 -5
  161. package/docs/markdown/classes/FormSubmitInvalidDirective.md +5 -5
  162. package/docs/markdown/classes/FormSubmitSuccessfulDirective.md +5 -5
  163. package/docs/markdown/classes/FormSubmittingDirective.md +5 -5
  164. package/docs/markdown/classes/ParentControlContainerDirective.md +2 -2
  165. package/docs/markdown/classes/RxapFormArray.md +132 -103
  166. package/docs/markdown/classes/RxapFormBuilder.md +4 -4
  167. package/docs/markdown/classes/RxapFormControl.md +127 -103
  168. package/docs/markdown/classes/RxapFormGroup.md +140 -117
  169. package/docs/markdown/classes/RxapFormsModule.md +2 -2
  170. package/docs/markdown/enumerations/MetadataKeys.md +10 -10
  171. package/docs/markdown/functions/ControlAsyncValidator.md +2 -2
  172. package/docs/markdown/functions/ControlChange.md +2 -2
  173. package/docs/markdown/functions/ControlSetValue.md +2 -2
  174. package/docs/markdown/functions/ControlValidator.md +2 -2
  175. package/docs/markdown/functions/IsArray.md +2 -2
  176. package/docs/markdown/functions/IsBoolean.md +2 -2
  177. package/docs/markdown/functions/IsComplex.md +2 -2
  178. package/docs/markdown/functions/IsDate.md +2 -2
  179. package/docs/markdown/functions/IsEmail.md +2 -2
  180. package/docs/markdown/functions/IsEnum.md +2 -2
  181. package/docs/markdown/functions/IsIP.md +2 -2
  182. package/docs/markdown/functions/IsInt.md +2 -2
  183. package/docs/markdown/functions/IsNumber-2.md +2 -2
  184. package/docs/markdown/functions/IsNumber.md +2 -2
  185. package/docs/markdown/functions/IsObject.md +2 -2
  186. package/docs/markdown/functions/IsPhoneNumber.md +2 -2
  187. package/docs/markdown/functions/IsPort.md +2 -2
  188. package/docs/markdown/functions/IsString.md +2 -2
  189. package/docs/markdown/functions/IsUUID.md +2 -2
  190. package/docs/markdown/functions/IsUrl.md +2 -2
  191. package/docs/markdown/functions/RxapForm.md +2 -2
  192. package/docs/markdown/functions/ToFormMethod.md +2 -2
  193. package/docs/markdown/functions/ToFormSubmitMethod.md +2 -2
  194. package/docs/markdown/functions/UseFormArrayControl.md +2 -2
  195. package/docs/markdown/functions/UseFormArrayGroup.md +2 -2
  196. package/docs/markdown/functions/UseFormControl.md +2 -2
  197. package/docs/markdown/functions/UseFormGroup.md +2 -2
  198. package/docs/markdown/functions/controlDisabled$.md +2 -2
  199. package/docs/markdown/functions/controlDisabledWhile.md +2 -2
  200. package/docs/markdown/functions/controlEnabled$.md +2 -2
  201. package/docs/markdown/functions/controlEnabledWhile.md +2 -2
  202. package/docs/markdown/functions/controlErrorChanges$.md +2 -2
  203. package/docs/markdown/functions/controlReadonly$.md +2 -2
  204. package/docs/markdown/functions/controlStatusChanges$.md +2 -2
  205. package/docs/markdown/functions/controlValueChanges$.md +2 -2
  206. package/docs/markdown/functions/disableControl.md +2 -2
  207. package/docs/markdown/functions/enableControl.md +2 -2
  208. package/docs/markdown/functions/hasErrorAndDirty.md +2 -2
  209. package/docs/markdown/functions/hasErrorAndTouched.md +2 -2
  210. package/docs/markdown/functions/isNumber-1.md +2 -2
  211. package/docs/markdown/functions/markAllDirty.md +2 -2
  212. package/docs/markdown/functions/markAllPristine.md +2 -2
  213. package/docs/markdown/functions/markAllUntouched.md +2 -2
  214. package/docs/markdown/functions/mergeControlValidators.md +2 -2
  215. package/docs/markdown/functions/selectControlValue$.md +2 -2
  216. package/docs/markdown/functions/validateControlOn.md +2 -2
  217. package/docs/markdown/globals.md +2 -2
  218. package/docs/markdown/interfaces/AbstractControl.md +122 -73
  219. package/docs/markdown/interfaces/AbstractControlOptions.md +5 -5
  220. package/docs/markdown/interfaces/BoxedValue.md +4 -4
  221. package/docs/markdown/interfaces/ComplexityOptions.md +12 -12
  222. package/docs/markdown/interfaces/ControlOptions.md +10 -10
  223. package/docs/markdown/interfaces/ControlSetValueOptions.md +4 -4
  224. package/docs/markdown/interfaces/FormArrayOptions.md +15 -15
  225. package/docs/markdown/interfaces/FormDefinition.md +7 -7
  226. package/docs/markdown/interfaces/FormDefinitionArray.md +70 -36
  227. package/docs/markdown/interfaces/FormDefinitionMetadata.md +14 -14
  228. package/docs/markdown/interfaces/FormGroupOptions.md +12 -12
  229. package/docs/markdown/interfaces/FormLoadFailedMethod.md +4 -4
  230. package/docs/markdown/interfaces/FormLoadMethod.md +4 -4
  231. package/docs/markdown/interfaces/FormLoadSuccessfulMethod.md +4 -4
  232. package/docs/markdown/interfaces/FormOptions.md +12 -12
  233. package/docs/markdown/interfaces/FormSubmitFailedMethod.md +4 -4
  234. package/docs/markdown/interfaces/FormSubmitMethod.md +4 -4
  235. package/docs/markdown/interfaces/FormSubmitSuccessfulMethod.md +4 -4
  236. package/docs/markdown/interfaces/InjectableValidator.md +4 -4
  237. package/docs/markdown/interfaces/IsNumberOptions.md +6 -6
  238. package/docs/markdown/interfaces/NgValidatorsErrors.md +9 -9
  239. package/docs/markdown/interfaces/RxapAbstractControlOptions.md +11 -11
  240. package/docs/markdown/interfaces/RxapAbstractControlOptionsWithDefinition.md +12 -12
  241. package/docs/markdown/type-aliases/AsyncValidator.md +2 -2
  242. package/docs/markdown/type-aliases/AsyncValidatorFn.md +2 -2
  243. package/docs/markdown/type-aliases/ChangeFn.md +2 -2
  244. package/docs/markdown/type-aliases/ControlEventOptions.md +2 -2
  245. package/docs/markdown/type-aliases/ControlInsertedFn.md +2 -2
  246. package/docs/markdown/type-aliases/ControlPath.md +2 -2
  247. package/docs/markdown/type-aliases/ControlRemovedFn.md +2 -2
  248. package/docs/markdown/type-aliases/ControlState.md +2 -2
  249. package/docs/markdown/type-aliases/EmitEvent.md +2 -2
  250. package/docs/markdown/type-aliases/ExtractAbstractControl.md +2 -2
  251. package/docs/markdown/type-aliases/ExtractStrings.md +2 -2
  252. package/docs/markdown/type-aliases/FormBuilderFn.md +2 -2
  253. package/docs/markdown/type-aliases/FormType.md +2 -2
  254. package/docs/markdown/type-aliases/KeyValueControls.md +2 -2
  255. package/docs/markdown/type-aliases/OnlySelf.md +2 -2
  256. package/docs/markdown/type-aliases/OrBoxedValue.md +2 -2
  257. package/docs/markdown/type-aliases/RxapAbstractControlOptions.md +2 -2
  258. package/docs/markdown/type-aliases/SetValueFn.md +2 -2
  259. package/docs/markdown/type-aliases/ValidationErrors.md +2 -2
  260. package/docs/markdown/type-aliases/Validator.md +2 -2
  261. package/docs/markdown/type-aliases/ValidatorFn.md +2 -2
  262. package/docs/markdown/type-aliases/ValidatorOrOpts.md +2 -2
  263. package/docs/markdown/variables/RXAP_FORM_CONTEXT.md +2 -2
  264. package/docs/markdown/variables/RXAP_FORM_DEFINITION.md +2 -2
  265. package/docs/markdown/variables/RXAP_FORM_DEFINITION_BUILDER.md +2 -2
  266. package/docs/markdown/variables/RXAP_FORM_INITIAL_STATE.md +2 -2
  267. package/docs/markdown/variables/RXAP_FORM_LOAD_FAILED_METHOD.md +2 -2
  268. package/docs/markdown/variables/RXAP_FORM_LOAD_METHOD.md +2 -2
  269. package/docs/markdown/variables/RXAP_FORM_LOAD_SUCCESSFUL_METHOD.md +2 -2
  270. package/docs/markdown/variables/RXAP_FORM_SUBMIT_FAILED_METHOD.md +2 -2
  271. package/docs/markdown/variables/RXAP_FORM_SUBMIT_METHOD.md +2 -2
  272. package/docs/markdown/variables/RXAP_FORM_SUBMIT_SUCCESSFUL_METHOD.md +2 -2
  273. package/docs/markdown/variables/RxapValidators.md +2 -2
  274. package/docs/wiki/Class.ControlValueAccessor.md +7 -7
  275. package/docs/wiki/Class.FormArrayControlManager.md +5 -5
  276. package/docs/wiki/Class.FormControlErrorDirective.md +6 -6
  277. package/docs/wiki/Class.FormControlMarkDirtyDirective.md +3 -3
  278. package/docs/wiki/Class.FormControlMarkPristineDirective.md +3 -3
  279. package/docs/wiki/Class.FormControlMarkTouchedDirective.md +3 -3
  280. package/docs/wiki/Class.FormControlMarkUntouchedDirective.md +3 -3
  281. package/docs/wiki/Class.FormControlNameDirective.md +35 -37
  282. package/docs/wiki/Class.FormDirective.md +138 -90
  283. package/docs/wiki/Class.FormGroupNameDirective.md +30 -30
  284. package/docs/wiki/Class.FormLoadedDirective.md +4 -4
  285. package/docs/wiki/Class.FormLoadingDirective.md +4 -4
  286. package/docs/wiki/Class.FormLoadingErrorDirective.md +4 -4
  287. package/docs/wiki/Class.FormResetDirective.md +7 -7
  288. package/docs/wiki/Class.FormSubmitDirective.md +14 -14
  289. package/docs/wiki/Class.FormSubmitFailedDirective.md +4 -4
  290. package/docs/wiki/Class.FormSubmitInvalidDirective.md +4 -4
  291. package/docs/wiki/Class.FormSubmitSuccessfulDirective.md +4 -4
  292. package/docs/wiki/Class.FormSubmittingDirective.md +4 -4
  293. package/docs/wiki/Class.ParentControlContainerDirective.md +1 -1
  294. package/docs/wiki/Class.RxapFormArray.md +131 -102
  295. package/docs/wiki/Class.RxapFormBuilder.md +3 -3
  296. package/docs/wiki/Class.RxapFormControl.md +126 -102
  297. package/docs/wiki/Class.RxapFormGroup.md +139 -116
  298. package/docs/wiki/Class.RxapFormsModule.md +1 -1
  299. package/docs/wiki/Enumeration.MetadataKeys.md +9 -9
  300. package/docs/wiki/Function.ControlAsyncValidator.md +1 -1
  301. package/docs/wiki/Function.ControlChange.md +1 -1
  302. package/docs/wiki/Function.ControlSetValue.md +1 -1
  303. package/docs/wiki/Function.ControlValidator.md +1 -1
  304. package/docs/wiki/Function.IsArray.md +1 -1
  305. package/docs/wiki/Function.IsBoolean.md +1 -1
  306. package/docs/wiki/Function.IsComplex.md +1 -1
  307. package/docs/wiki/Function.IsDate.md +1 -1
  308. package/docs/wiki/Function.IsEmail.md +1 -1
  309. package/docs/wiki/Function.IsEnum.md +1 -1
  310. package/docs/wiki/Function.IsIP.md +1 -1
  311. package/docs/wiki/Function.IsInt.md +1 -1
  312. package/docs/wiki/Function.IsNumber.md +1 -1
  313. package/docs/wiki/Function.IsObject.md +1 -1
  314. package/docs/wiki/Function.IsPhoneNumber.md +1 -1
  315. package/docs/wiki/Function.IsPort.md +1 -1
  316. package/docs/wiki/Function.IsString.md +1 -1
  317. package/docs/wiki/Function.IsUUID.md +1 -1
  318. package/docs/wiki/Function.IsUrl.md +1 -1
  319. package/docs/wiki/Function.RxapForm.md +1 -1
  320. package/docs/wiki/Function.ToFormMethod.md +1 -1
  321. package/docs/wiki/Function.ToFormSubmitMethod.md +1 -1
  322. package/docs/wiki/Function.UseFormArrayControl.md +1 -1
  323. package/docs/wiki/Function.UseFormArrayGroup.md +1 -1
  324. package/docs/wiki/Function.UseFormControl.md +1 -1
  325. package/docs/wiki/Function.UseFormGroup.md +1 -1
  326. package/docs/wiki/Function._IsNumber.md +1 -1
  327. package/docs/wiki/Function.controlDisabled$.md +1 -1
  328. package/docs/wiki/Function.controlDisabledWhile.md +1 -1
  329. package/docs/wiki/Function.controlEnabled$.md +1 -1
  330. package/docs/wiki/Function.controlEnabledWhile.md +1 -1
  331. package/docs/wiki/Function.controlErrorChanges$.md +1 -1
  332. package/docs/wiki/Function.controlReadonly$.md +1 -1
  333. package/docs/wiki/Function.controlStatusChanges$.md +1 -1
  334. package/docs/wiki/Function.controlValueChanges$.md +1 -1
  335. package/docs/wiki/Function.disableControl.md +1 -1
  336. package/docs/wiki/Function.enableControl.md +1 -1
  337. package/docs/wiki/Function.hasErrorAndDirty.md +1 -1
  338. package/docs/wiki/Function.hasErrorAndTouched.md +1 -1
  339. package/docs/wiki/Function.isNumber.md +1 -1
  340. package/docs/wiki/Function.markAllDirty.md +1 -1
  341. package/docs/wiki/Function.markAllPristine.md +1 -1
  342. package/docs/wiki/Function.markAllUntouched.md +1 -1
  343. package/docs/wiki/Function.mergeControlValidators.md +1 -1
  344. package/docs/wiki/Function.selectControlValue$.md +1 -1
  345. package/docs/wiki/Function.validateControlOn.md +1 -1
  346. package/docs/wiki/Interface.AbstractControl.md +121 -72
  347. package/docs/wiki/Interface.AbstractControlOptions.md +4 -4
  348. package/docs/wiki/Interface.BoxedValue.md +3 -3
  349. package/docs/wiki/Interface.ComplexityOptions.md +11 -11
  350. package/docs/wiki/Interface.ControlOptions.md +9 -9
  351. package/docs/wiki/Interface.ControlSetValueOptions.md +3 -3
  352. package/docs/wiki/Interface.FormArrayOptions.md +14 -14
  353. package/docs/wiki/Interface.FormDefinition.md +6 -6
  354. package/docs/wiki/Interface.FormDefinitionArray.md +69 -35
  355. package/docs/wiki/Interface.FormDefinitionMetadata.md +13 -13
  356. package/docs/wiki/Interface.FormGroupOptions.md +11 -11
  357. package/docs/wiki/Interface.FormLoadFailedMethod.md +3 -3
  358. package/docs/wiki/Interface.FormLoadMethod.md +3 -3
  359. package/docs/wiki/Interface.FormLoadSuccessfulMethod.md +3 -3
  360. package/docs/wiki/Interface.FormOptions.md +11 -11
  361. package/docs/wiki/Interface.FormSubmitFailedMethod.md +3 -3
  362. package/docs/wiki/Interface.FormSubmitMethod.md +3 -3
  363. package/docs/wiki/Interface.FormSubmitSuccessfulMethod.md +3 -3
  364. package/docs/wiki/Interface.InjectableValidator.md +3 -3
  365. package/docs/wiki/Interface.IsNumberOptions.md +5 -5
  366. package/docs/wiki/Interface.NgValidatorsErrors.md +8 -8
  367. package/docs/wiki/Interface.RxapAbstractControlOptionsWithDefinition.md +11 -11
  368. package/docs/wiki/Interface._RxapAbstractControlOptions.md +10 -10
  369. package/docs/wiki/TypeAlias.AsyncValidator.md +1 -1
  370. package/docs/wiki/TypeAlias.AsyncValidatorFn.md +1 -1
  371. package/docs/wiki/TypeAlias.ChangeFn.md +1 -1
  372. package/docs/wiki/TypeAlias.ControlEventOptions.md +1 -1
  373. package/docs/wiki/TypeAlias.ControlInsertedFn.md +1 -1
  374. package/docs/wiki/TypeAlias.ControlPath.md +1 -1
  375. package/docs/wiki/TypeAlias.ControlRemovedFn.md +1 -1
  376. package/docs/wiki/TypeAlias.ControlState.md +1 -1
  377. package/docs/wiki/TypeAlias.EmitEvent.md +1 -1
  378. package/docs/wiki/TypeAlias.ExtractAbstractControl.md +1 -1
  379. package/docs/wiki/TypeAlias.ExtractStrings.md +1 -1
  380. package/docs/wiki/TypeAlias.FormBuilderFn.md +1 -1
  381. package/docs/wiki/TypeAlias.FormType.md +1 -1
  382. package/docs/wiki/TypeAlias.KeyValueControls.md +1 -1
  383. package/docs/wiki/TypeAlias.OnlySelf.md +1 -1
  384. package/docs/wiki/TypeAlias.OrBoxedValue.md +1 -1
  385. package/docs/wiki/TypeAlias.RxapAbstractControlOptions.md +1 -1
  386. package/docs/wiki/TypeAlias.SetValueFn.md +1 -1
  387. package/docs/wiki/TypeAlias.ValidationErrors.md +1 -1
  388. package/docs/wiki/TypeAlias.Validator.md +1 -1
  389. package/docs/wiki/TypeAlias.ValidatorFn.md +1 -1
  390. package/docs/wiki/TypeAlias.ValidatorOrOpts.md +1 -1
  391. package/docs/wiki/Variable.RXAP_FORM_CONTEXT.md +1 -1
  392. package/docs/wiki/Variable.RXAP_FORM_DEFINITION.md +1 -1
  393. package/docs/wiki/Variable.RXAP_FORM_DEFINITION_BUILDER.md +1 -1
  394. package/docs/wiki/Variable.RXAP_FORM_INITIAL_STATE.md +1 -1
  395. package/docs/wiki/Variable.RXAP_FORM_LOAD_FAILED_METHOD.md +1 -1
  396. package/docs/wiki/Variable.RXAP_FORM_LOAD_METHOD.md +1 -1
  397. package/docs/wiki/Variable.RXAP_FORM_LOAD_SUCCESSFUL_METHOD.md +1 -1
  398. package/docs/wiki/Variable.RXAP_FORM_SUBMIT_FAILED_METHOD.md +1 -1
  399. package/docs/wiki/Variable.RXAP_FORM_SUBMIT_METHOD.md +1 -1
  400. package/docs/wiki/Variable.RXAP_FORM_SUBMIT_SUCCESSFUL_METHOD.md +1 -1
  401. package/docs/wiki/Variable.RxapValidators.md +1 -1
  402. package/docs/wiki/globals.md +1 -1
  403. package/fesm2022/rxap-forms.mjs +79 -78
  404. package/fesm2022/rxap-forms.mjs.map +1 -1
  405. package/package.json +35 -30
  406. package/types/rxap-forms.d.ts +979 -0
  407. package/index.d.ts +0 -55
  408. package/lib/control-actions.d.ts +0 -23
  409. package/lib/control-value-accessor.d.ts +0 -9
  410. package/lib/decorators/control-async-validator.d.ts +0 -1
  411. package/lib/decorators/control-change.d.ts +0 -1
  412. package/lib/decorators/control-set-value.d.ts +0 -5
  413. package/lib/decorators/control-validator.d.ts +0 -1
  414. package/lib/decorators/form.d.ts +0 -2
  415. package/lib/decorators/metadata-keys.d.ts +0 -10
  416. package/lib/decorators/use-form-array.d.ts +0 -4
  417. package/lib/decorators/use-form-control.d.ts +0 -2
  418. package/lib/decorators/use-form-group.d.ts +0 -3
  419. package/lib/directives/form-control-error.directive.d.ts +0 -22
  420. package/lib/directives/form-control-mark-dirty.directive.d.ts +0 -9
  421. package/lib/directives/form-control-mark-pristine.directive.d.ts +0 -9
  422. package/lib/directives/form-control-mark-touched.directive.d.ts +0 -9
  423. package/lib/directives/form-control-mark-untouched.directive.d.ts +0 -9
  424. package/lib/directives/form-control-name.directive.d.ts +0 -16
  425. package/lib/directives/form-group-name.directive.d.ts +0 -16
  426. package/lib/directives/form-loaded.directive.d.ts +0 -14
  427. package/lib/directives/form-loading-error.directive.d.ts +0 -16
  428. package/lib/directives/form-loading.directive.d.ts +0 -14
  429. package/lib/directives/form-reset.directive.d.ts +0 -11
  430. package/lib/directives/form-submit-failed.directive.d.ts +0 -16
  431. package/lib/directives/form-submit-invalid.directive.d.ts +0 -16
  432. package/lib/directives/form-submit-successful.directive.d.ts +0 -16
  433. package/lib/directives/form-submit.directive.d.ts +0 -22
  434. package/lib/directives/form-submitting.directive.d.ts +0 -14
  435. package/lib/directives/form.directive.d.ts +0 -62
  436. package/lib/directives/forms.module.d.ts +0 -23
  437. package/lib/directives/models.d.ts +0 -29
  438. package/lib/directives/parent-control-container.directive.d.ts +0 -5
  439. package/lib/directives/tokens.d.ts +0 -12
  440. package/lib/form-array.d.ts +0 -76
  441. package/lib/form-builder.d.ts +0 -96
  442. package/lib/form-control.d.ts +0 -64
  443. package/lib/form-group.d.ts +0 -89
  444. package/lib/model.d.ts +0 -81
  445. package/lib/tokens.d.ts +0 -3
  446. package/lib/types.d.ts +0 -100
  447. package/lib/validators/index.d.ts +0 -32
  448. package/lib/validators/is-array.d.ts +0 -4
  449. package/lib/validators/is-boolean.d.ts +0 -4
  450. package/lib/validators/is-complex.d.ts +0 -17
  451. package/lib/validators/is-date.d.ts +0 -4
  452. package/lib/validators/is-email.d.ts +0 -6
  453. package/lib/validators/is-enum.d.ts +0 -5
  454. package/lib/validators/is-int.d.ts +0 -6
  455. package/lib/validators/is-ip.d.ts +0 -5
  456. package/lib/validators/is-number.d.ts +0 -24
  457. package/lib/validators/is-object.d.ts +0 -4
  458. package/lib/validators/is-phone-number.d.ts +0 -7
  459. package/lib/validators/is-port.d.ts +0 -4
  460. package/lib/validators/is-string.d.ts +0 -4
  461. package/lib/validators/is-url.d.ts +0 -6
  462. package/lib/validators/is-uuid.d.ts +0 -5
@@ -0,0 +1,979 @@
1
+ import { AbstractControl as AbstractControl$1, ValidationErrors as ValidationErrors$1, UntypedFormControl, UntypedFormGroup, AbstractControlOptions as AbstractControlOptions$1, ValidatorFn as ValidatorFn$1, AsyncValidatorFn as AsyncValidatorFn$1, UntypedFormArray, ControlContainer, FormControlName, Validator as Validator$1, AsyncValidator as AsyncValidator$1, ControlValueAccessor as ControlValueAccessor$1, FormGroupName, FormGroupDirective } from '@angular/forms';
2
+ import { IsEmailOptions, MobilePhoneLocale, IsMobilePhoneOptions, IsURLOptions } from '@rxap/validator';
3
+ import * as i0 from '@angular/core';
4
+ import { Type, InjectionToken, AbstractType, StaticProvider, OnInit, OnDestroy, TemplateRef, ViewContainerRef, Injector, OnChanges, ChangeDetectorRef, EventEmitter, SimpleChanges, AfterViewInit } from '@angular/core';
5
+ import { Observable, Subject, Subscription, BehaviorSubject } from 'rxjs';
6
+ import { BaseDefinitionMetadata } from '@rxap/definition';
7
+ import { Constructor, NonEmpty } from '@rxap/utilities';
8
+ import { ToggleSubject } from '@rxap/rxjs';
9
+ import { LoadingIndicatorService } from '@rxap/services';
10
+ import { MethodWithParameters, Method } from '@rxap/pattern';
11
+ import { ConfirmClick } from '@rxap/directives';
12
+ import { Router } from '@angular/router';
13
+ import * as _rxap_forms from '@rxap/forms';
14
+
15
+ declare function IsArray({ message }?: {
16
+ message?: string;
17
+ }): (control: AbstractControl$1) => ValidationErrors$1 | null;
18
+
19
+ declare function IsBoolean({ message }?: {
20
+ message?: string;
21
+ }): (control: AbstractControl$1) => ValidationErrors$1 | null;
22
+
23
+ interface ComplexityOptions {
24
+ uppercase?: number;
25
+ special?: number;
26
+ digit?: number;
27
+ lowercase?: number;
28
+ upperLower?: number;
29
+ alphaNumeric?: number;
30
+ min?: number;
31
+ max?: number;
32
+ range?: number;
33
+ exact?: number;
34
+ }
35
+ declare function IsComplex({ message, options, }: {
36
+ message?: string;
37
+ options: ComplexityOptions;
38
+ }): (control: AbstractControl$1) => ValidationErrors$1 | null;
39
+
40
+ declare function IsDate({ message }?: {
41
+ message?: string;
42
+ }): (control: AbstractControl$1) => ValidationErrors$1 | null;
43
+
44
+ declare function IsEmail({ message, options, }?: {
45
+ message?: string;
46
+ options?: IsEmailOptions;
47
+ }): (control: AbstractControl$1) => ValidationErrors$1 | null;
48
+
49
+ declare function IsEnum({ message, entity, }: {
50
+ message?: string;
51
+ entity: any;
52
+ }): (control: AbstractControl$1) => ValidationErrors$1 | null;
53
+
54
+ /**
55
+ * Options to be passed to IsNumber decorator.
56
+ */
57
+ interface IsNumberOptions {
58
+ allowNaN?: boolean;
59
+ allowInfinity?: boolean;
60
+ maxDecimalPlaces?: number;
61
+ strict?: boolean;
62
+ }
63
+ /**
64
+ * Checks if a given value is a number.
65
+ */
66
+ declare function isNumber(value: unknown, options?: IsNumberOptions): value is number;
67
+ /**
68
+ * @deprecated use RxapValidators.isNumber() instead
69
+ * @param control
70
+ * @constructor
71
+ */
72
+ declare function IsNumber(control: AbstractControl$1): ValidationErrors$1 | null;
73
+ declare function _IsNumber({ message, options, }?: {
74
+ message?: string;
75
+ options?: IsNumberOptions;
76
+ }): (control: AbstractControl$1) => ValidationErrors$1 | null;
77
+
78
+ declare function IsInt({ message, options, }?: {
79
+ message?: string;
80
+ options?: IsNumberOptions;
81
+ }): (control: AbstractControl$1) => ValidationErrors$1 | null;
82
+
83
+ declare function IsIP({ message, version, }?: {
84
+ message?: string;
85
+ version?: string | number;
86
+ }): (control: AbstractControl$1) => ValidationErrors$1 | null;
87
+
88
+ declare function IsObject({ message }?: {
89
+ message?: string;
90
+ }): (control: AbstractControl$1) => ValidationErrors$1 | null;
91
+
92
+ declare function IsPhoneNumber({ message, locale, options, }?: {
93
+ message?: string;
94
+ locale?: 'any' | MobilePhoneLocale | MobilePhoneLocale[];
95
+ options?: IsMobilePhoneOptions;
96
+ }): (control: AbstractControl$1) => ValidationErrors$1 | null;
97
+
98
+ declare function IsPort({ message }?: {
99
+ message?: string;
100
+ }): (control: AbstractControl$1) => ValidationErrors$1 | null;
101
+
102
+ declare function IsString({ message }?: {
103
+ message?: string;
104
+ }): (control: AbstractControl$1) => ValidationErrors$1 | null;
105
+
106
+ declare function IsUrl({ message, options, }?: {
107
+ message?: string;
108
+ options?: IsURLOptions;
109
+ }): (control: AbstractControl$1) => ValidationErrors$1 | null;
110
+
111
+ declare function IsUUID({ message, version, }?: {
112
+ message?: string;
113
+ version?: string;
114
+ }): (control: AbstractControl$1) => ValidationErrors$1 | null;
115
+
116
+ declare const RxapValidators: {
117
+ IsNumber: typeof _IsNumber;
118
+ IsBoolean: typeof IsBoolean;
119
+ IsArray: typeof IsArray;
120
+ IsDate: typeof IsDate;
121
+ IsEnum: typeof IsEnum;
122
+ IsInt: typeof IsInt;
123
+ IsObject: typeof IsObject;
124
+ IsString: typeof IsString;
125
+ IsComplex: typeof IsComplex;
126
+ IsPhoneNumber: typeof IsPhoneNumber;
127
+ IsEmail: typeof IsEmail;
128
+ IsUrl: typeof IsUrl;
129
+ IsIP: typeof IsIP;
130
+ IsPort: typeof IsPort;
131
+ IsUUID: typeof IsUUID;
132
+ };
133
+
134
+ declare class RxapFormControl<T = any, E extends object = any, Parent extends object = any> extends UntypedFormControl {
135
+ /**
136
+ * @internal
137
+ */
138
+ get rxapFormDefinition(): (FormType<Parent> & FormDefinition<Parent>) | undefined;
139
+ readonly value: T;
140
+ readonly errors: E | null;
141
+ readonly valueChanges: Observable<T>;
142
+ readonly status: ControlState;
143
+ readonly statusChanges: Observable<ControlState>;
144
+ get initialState(): OrBoxedValue<T>;
145
+ protected _initialState: OrBoxedValue<T>;
146
+ private _readonly;
147
+ private touchChanges;
148
+ private dirtyChanges;
149
+ readonly touch$: Observable<boolean>;
150
+ readonly dirty$: Observable<boolean>;
151
+ readonly value$: Observable<T>;
152
+ readonly disabled$: Observable<boolean>;
153
+ readonly enabled$: Observable<boolean>;
154
+ get readonly(): boolean;
155
+ set readonly(value: boolean);
156
+ readonly status$: Observable<ControlState>;
157
+ readonly errors$: Observable<E | null>;
158
+ readonly controlId: string;
159
+ private readonly _onSetValue;
160
+ readonly stateChanges: Subject<void>;
161
+ readonly readonly$: Observable<boolean>;
162
+ get controlPath(): string;
163
+ get fullControlPath(): string;
164
+ constructor(formState: OrBoxedValue<T>, options: RxapAbstractControlOptions & {
165
+ controlId: string;
166
+ });
167
+ setValue(valueOrObservable: Observable<T>, options?: ControlOptions): Subscription;
168
+ setValue(valueOrObservable: T, options?: ControlOptions): void;
169
+ patchValue(valueOrObservable: Observable<T>, options?: ControlOptions): Subscription;
170
+ patchValue(valueOrObservable: T, options?: ControlOptions): void;
171
+ disabledWhile(observable: Observable<boolean>, options?: ControlOptions): Subscription;
172
+ enabledWhile(observable: Observable<boolean>, options?: ControlOptions): Subscription;
173
+ mergeValidators(validators: Validator): void;
174
+ mergeAsyncValidators(validators: AsyncValidator): void;
175
+ markAsTouched(opts?: OnlySelf): void;
176
+ markAsUntouched(opts?: OnlySelf): void;
177
+ markAsPristine(opts?: OnlySelf): void;
178
+ markAsDirty(opts?: OnlySelf): void;
179
+ markAllAsDirty(): void;
180
+ reset(formState?: OrBoxedValue<T>, options?: ControlEventOptions): void;
181
+ setValidators(newValidator: Validator, updateValueAndValidity?: boolean): void;
182
+ setAsyncValidators(newValidator: AsyncValidator, updateValueAndValidity?: boolean): void;
183
+ validateOn(observableValidation: Observable<null | object>): Subscription;
184
+ getError<K extends ExtractStrings<E>>(errorCode: K): E[K] | null;
185
+ hasError<K extends ExtractStrings<E>>(errorCode: K): boolean;
186
+ setErrors(errors: Partial<E> | null, opts?: EmitEvent): void;
187
+ setError(key: string, value: any, opts?: EmitEvent): void;
188
+ hasErrorAndTouched(error: ExtractStrings<E>): boolean;
189
+ hasErrorAndDirty(error: ExtractStrings<E>): boolean;
190
+ setEnable(enable?: boolean, opts?: ControlEventOptions): void;
191
+ setDisable(disable?: boolean, opts?: ControlEventOptions): void;
192
+ registerOnSetValue(setValueFn: SetValueFn<T>): void;
193
+ }
194
+
195
+ declare class RxapFormGroup<T = any, E extends ValidationErrors = any> extends UntypedFormGroup {
196
+ controls: ExtractAbstractControl<KeyValueControls<T>, T>;
197
+ /**
198
+ * @internal
199
+ */
200
+ get rxapFormDefinition(): (FormType<T> & FormDefinition<T>) | undefined;
201
+ private _readonly;
202
+ get readonly(): boolean;
203
+ set readonly(value: boolean);
204
+ /**
205
+ * @internal
206
+ */
207
+ private _rxapFormDefinition?;
208
+ readonly value: T;
209
+ readonly errors: E | null;
210
+ readonly valueChanges: Observable<T>;
211
+ readonly status: ControlState;
212
+ readonly statusChanges: Observable<ControlState>;
213
+ private touchChanges;
214
+ private dirtyChanges;
215
+ touch$: Observable<boolean>;
216
+ dirty$: Observable<boolean>;
217
+ readonly value$: Observable<T>;
218
+ readonly disabled$: Observable<boolean>;
219
+ readonly enabled$: Observable<boolean>;
220
+ readonly status$: Observable<ControlState>;
221
+ readonly errors$: Observable<E | null>;
222
+ readonly controlId: string;
223
+ get controlPath(): string;
224
+ get fullControlPath(): string;
225
+ constructor(controls: ExtractAbstractControl<KeyValueControls<T>, T>, options: FormGroupOptions);
226
+ select<R>(mapFn: (state: T) => R): Observable<R>;
227
+ getRawValue(): T;
228
+ get<K1 extends keyof T>(path: [K1]): AbstractControl<T[K1]>;
229
+ get<K1 extends keyof T, K2 extends keyof T[K1]>(path: [K1, K2]): AbstractControl<T[K1][K2]>;
230
+ get<K1 extends keyof T, K2 extends keyof T[K1], K3 extends keyof T[K1][K2]>(path: [K1, K2, K3]): AbstractControl<T[K1][K2][K3]>;
231
+ get(path: string): AbstractControl;
232
+ getControl<P1 extends keyof T>(prop1: P1): AbstractControl<T[P1]>;
233
+ getControl<P1 extends keyof T, P2 extends keyof T[P1]>(prop1: P1, prop2: P2): AbstractControl<T[P1][P2]>;
234
+ getControl<P1 extends keyof T, P2 extends keyof T[P1], P3 extends keyof T[P1][P2]>(prop1: P1, prop2: P2, prop3: P3): AbstractControl<T[P1][P2][P3]>;
235
+ getControl<P1 extends keyof T, P2 extends keyof T[P1], P3 extends keyof T[P1][P2], P4 extends keyof T[P1][P2][P3]>(prop1: P1, prop2: P2, prop3: P3, prop4: P4): AbstractControl<T[P1][P2][P3][P4]>;
236
+ addControl<K extends ExtractStrings<T>>(name: K, control: AbstractControl<T[K]>): void;
237
+ removeControl(name: ExtractStrings<T>): void;
238
+ contains(controlName: ExtractStrings<T>): boolean;
239
+ setControl<K extends ExtractStrings<T>>(name: K, control: AbstractControl<T[K]>): void;
240
+ setValue(valueOrObservable: Observable<T>, options?: ControlEventOptions): Subscription;
241
+ setValue(valueOrObservable: T, options?: ControlEventOptions): void;
242
+ private _patchValue;
243
+ patchValue(valueOrObservable: Observable<Partial<T>>, options?: ControlEventOptions): Subscription;
244
+ patchValue(valueOrObservable: Partial<T>, options?: ControlEventOptions): void;
245
+ disabledWhile(observable: Observable<boolean>, options?: ControlOptions): Subscription;
246
+ enabledWhile(observable: Observable<boolean>, options?: ControlOptions): Subscription;
247
+ mergeValidators(validators: Validator): void;
248
+ mergeAsyncValidators(validators: AsyncValidator): void;
249
+ markAsTouched(opts?: OnlySelf): void;
250
+ markAsUntouched(opts?: OnlySelf): void;
251
+ markAsPristine(opts?: OnlySelf): void;
252
+ markAsDirty(opts?: OnlySelf): void;
253
+ markAllAsDirty(): void;
254
+ markAllAsPristine(): void;
255
+ markAllAsUntouched(): void;
256
+ reset(formState?: Partial<T>, options?: ControlEventOptions): void;
257
+ setValidators(newValidator: Validator, updateValueAndValidity?: boolean): void;
258
+ setAsyncValidators(newValidator: AsyncValidator, updateValueAndValidity?: boolean): void;
259
+ validateOn(observableValidation: Observable<null | object>): Subscription;
260
+ hasError<K1 extends keyof T>(errorCode: ExtractStrings<E>, path?: [K1]): boolean;
261
+ hasError<K1 extends keyof T, K2 extends keyof T[K1]>(errorCode: ExtractStrings<E>, path?: [K1, K2]): boolean;
262
+ hasError<K1 extends keyof T, K2 extends keyof T[K1], K3 extends keyof T[K1][K2]>(errorCode: ExtractStrings<E>, path?: [K1, K2, K3]): boolean;
263
+ hasError(errorCode: ExtractStrings<E>, path?: string): boolean;
264
+ setErrors(errors: Partial<E> | null, opts?: EmitEvent): void;
265
+ getError<K extends keyof E, K1 extends keyof T>(errorCode: K, path?: [K1]): E[K] | null;
266
+ getError<K extends keyof E, K1 extends keyof T, K2 extends keyof T[K1]>(errorCode: K, path?: [K1, K2]): E[K] | null;
267
+ getError<K extends keyof E, K1 extends keyof T, K2 extends keyof T[K1], K3 extends keyof T[K1][K2]>(errorCode: K, path?: [K1, K2, K3]): E[K] | null;
268
+ getError<K extends keyof E>(errorCode: K, path?: string): E[K] | null;
269
+ hasErrorAndTouched<P1 extends keyof T>(error: ExtractStrings<E>, prop1?: P1): boolean;
270
+ hasErrorAndTouched<P1 extends keyof T, P2 extends keyof T[P1]>(error: ExtractStrings<E>, prop1?: P1, prop2?: P2): boolean;
271
+ hasErrorAndTouched<P1 extends keyof T, P2 extends keyof T[P1], P3 extends keyof T[P1][P2]>(error: ExtractStrings<E>, prop1?: P1, prop2?: P2, prop3?: P3): boolean;
272
+ hasErrorAndTouched<P1 extends keyof T, P2 extends keyof T[P1], P3 extends keyof T[P1][P2], P4 extends keyof T[P1][P2][P3]>(error: ExtractStrings<E>, prop1?: P1, prop2?: P2, prop3?: P3, prop4?: P4): boolean;
273
+ hasErrorAndDirty<P1 extends keyof T>(error: ExtractStrings<E>, prop1?: P1): boolean;
274
+ hasErrorAndDirty<P1 extends keyof T, P2 extends keyof T[P1]>(error: ExtractStrings<E>, prop1?: P1, prop2?: P2): boolean;
275
+ hasErrorAndDirty<P1 extends keyof T, P2 extends keyof T[P1], P3 extends keyof T[P1][P2]>(error: ExtractStrings<E>, prop1?: P1, prop2?: P2, prop3?: P3): boolean;
276
+ hasErrorAndDirty<P1 extends keyof T, P2 extends keyof T[P1], P3 extends keyof T[P1][P2], P4 extends keyof T[P1][P2][P3]>(error: ExtractStrings<E>, prop1?: P1, prop2?: P2, prop3?: P3, prop4?: P4): boolean;
277
+ setEnable(enable?: boolean, opts?: ControlEventOptions): void;
278
+ setDisable(disable?: boolean, opts?: ControlEventOptions): void;
279
+ }
280
+
281
+ interface InjectableValidator {
282
+ validate?: ValidatorFn$1;
283
+ asyncValidate?: AsyncValidatorFn$1;
284
+ }
285
+ /**
286
+ * @internal
287
+ */
288
+ interface _RxapAbstractControlOptions extends AbstractControlOptions$1 {
289
+ state?: any | (() => any);
290
+ injectValidators?: Array<Type<InjectableValidator> | InjectionToken<InjectableValidator> | AbstractType<InjectableValidator>>;
291
+ controlType?: Constructor<RxapFormControl>;
292
+ disabled?: boolean;
293
+ readonly?: boolean;
294
+ }
295
+ type RxapAbstractControlOptions<T extends Record<string, any> = Record<string, any>> = _RxapAbstractControlOptions & T;
296
+ interface RxapAbstractControlOptionsWithDefinition extends RxapAbstractControlOptions {
297
+ definition: Constructor;
298
+ }
299
+ interface FormDefinition<T = any, E extends object = any, JSON extends Record<string, any> = any> {
300
+ rxapFormGroup: RxapFormGroup<T, E>;
301
+ /**
302
+ * used to access the form definition metadata type save
303
+ */
304
+ rxapMetadata: FormDefinitionMetadata;
305
+ /**
306
+ * The Reuse hook is called when the instance is reused.
307
+ * And can be used to reset or alter the local state of the instance.
308
+ */
309
+ rxapReuse?(): void;
310
+ /**
311
+ * Called to get the value that should be submitted. If not defined
312
+ * the value property of the root RxapFormGroup instance will be used
313
+ */
314
+ getSubmitValue?(): JSON;
315
+ /**
316
+ * Called to get the value that should be submitted. If not defined
317
+ * the value property of the root RxapFormGroup instance will be used
318
+ */
319
+ toJSON?(): JSON;
320
+ }
321
+ interface FormDefinitionArray<T> extends Array<T> {
322
+ rxapFormArray: RxapFormArray;
323
+ }
324
+ type FormType<T> = Partial<FormDefinition<T>> & {
325
+ [K in keyof T]: T[K] extends (infer U)[] ? FormDefinitionArray<FormType<U>> | FormDefinitionArray<RxapFormControl<U>> | RxapFormControl<T[K]> | RxapFormArray<U> : T[K] extends Record<string, any> ? (FormType<T[K]> & Partial<FormDefinition<T[K]>>) | RxapFormControl<T[K]> : RxapFormControl<NonEmpty<T[K]>>;
326
+ };
327
+ interface FormOptions extends RxapAbstractControlOptions {
328
+ id: string;
329
+ }
330
+ interface FormDefinitionMetadata extends BaseDefinitionMetadata, FormOptions {
331
+ providers?: StaticProvider[];
332
+ /**
333
+ * true - after 5000ms the form is automatically submitted if valid
334
+ * number - after the set ms the is automatically submitted if valid
335
+ */
336
+ autoSubmit?: boolean | number;
337
+ }
338
+ type ChangeFn<T = any> = (value: T, emitViewToModelChange: boolean) => void;
339
+ type SetValueFn<T = any> = (value: T, options?: ControlOptions) => void;
340
+ type FormBuilderFn<T extends (FormDefinition<Data> | FormType<Data>) = FormDefinition, Data = Record<string, any>> = (state: any, options: {
341
+ controlId: string;
342
+ }) => T | RxapFormControl;
343
+ type ControlInsertedFn = (index: number, controlOrDefinition: AbstractControl | FormDefinition) => void;
344
+ type ControlRemovedFn = (index: number) => void;
345
+ interface FormArrayOptions extends RxapAbstractControlOptions {
346
+ builder: FormBuilderFn;
347
+ controlId: string;
348
+ controlInsertedFn: ControlInsertedFn;
349
+ controlRemovedFn: ControlRemovedFn;
350
+ }
351
+ interface FormGroupOptions extends RxapAbstractControlOptions {
352
+ controlId: string;
353
+ }
354
+
355
+ declare class RxapFormArray<T = any, E extends object = any, Parent extends object = any> extends UntypedFormArray implements AbstractControl<T[]> {
356
+ controls: Array<AbstractControl<T>>;
357
+ private _readonly;
358
+ get readonly(): boolean;
359
+ set readonly(value: boolean);
360
+ /**
361
+ * @internal
362
+ */
363
+ get rxapFormDefinition(): (FormType<Parent> & FormDefinition<Parent>) | undefined;
364
+ get controlPath(): string;
365
+ readonly value: T[];
366
+ get fullControlPath(): string;
367
+ readonly valueChanges: Observable<T[]>;
368
+ readonly value$: Observable<T[]>;
369
+ readonly status: ControlState;
370
+ readonly disabled$: Observable<boolean>;
371
+ readonly statusChanges: Observable<ControlState>;
372
+ readonly enabled$: Observable<boolean>;
373
+ readonly errors: E | null;
374
+ readonly status$: Observable<ControlState>;
375
+ readonly errors$: Observable<E | null>;
376
+ readonly controlId: string;
377
+ private readonly touchChanges;
378
+ readonly touch$: Observable<boolean>;
379
+ private readonly dirtyChanges;
380
+ readonly dirty$: Observable<boolean>;
381
+ private readonly _builder;
382
+ private readonly _controlInsertedFn;
383
+ private readonly _controlRemovedFn;
384
+ constructor(controls: Array<AbstractControl<T>>, options: FormArrayOptions);
385
+ select<R>(mapFn: (state: T[]) => R): Observable<R>;
386
+ at(index: number): AbstractControl<T>;
387
+ getRawValue(): T[];
388
+ insert(index: number, control: AbstractControl<T>): void;
389
+ /**
390
+ * inserts a new control at the specified index. If the index is undefined
391
+ * the new control will be added to the end.
392
+ *
393
+ * @param index (optional) the index where the control should be created
394
+ * @param state (optional) the initial state of the new control
395
+ * @param options (optional) ControlEventOptions
396
+ */
397
+ insertAt(index?: number, state?: T, options?: ControlEventOptions): void;
398
+ disabledWhile(observable: Observable<boolean>, options?: ControlOptions): Subscription;
399
+ enabledWhile(observable: Observable<boolean>, options?: ControlOptions): Subscription;
400
+ mergeValidators(validators: Validator): void;
401
+ mergeAsyncValidators(validators: AsyncValidator): void;
402
+ markAllAsDirty(): void;
403
+ markAllAsPristine(): void;
404
+ setValue(valueOrObservable: T[] | Observable<T[]>, options?: ControlEventOptions): Subscription | void;
405
+ markAllAsUntouched(): void;
406
+ validateOn(observableValidation: Observable<null | object>): Subscription;
407
+ hasErrorAndTouched(errorCode: ExtractStrings<E>, path?: ControlPath): boolean;
408
+ private _patchValue;
409
+ patchValue(valueOrObservable: any, options?: ControlEventOptions): Subscription | void;
410
+ hasErrorAndDirty(errorCode: ExtractStrings<E>, path?: ControlPath): boolean;
411
+ removeAt(index: number, opts?: ControlEventOptions): void;
412
+ setEnable(enable?: boolean, opts?: ControlEventOptions): void;
413
+ push(control: AbstractControl<T>, options?: ControlEventOptions): void;
414
+ setDisable(disable?: boolean, opts?: ControlEventOptions): void;
415
+ setControl(index: number, control: AbstractControl<T>, options?: ControlEventOptions): void;
416
+ markAsTouched(opts?: OnlySelf): void;
417
+ markAsUntouched(opts?: OnlySelf): void;
418
+ markAsPristine(opts?: OnlySelf): void;
419
+ markAsDirty(opts?: OnlySelf): void;
420
+ reset(value?: T[], options?: ControlEventOptions): void;
421
+ setValidators(newValidator: Validator, updateValueAndValidity?: boolean): void;
422
+ setAsyncValidators(newValidator: AsyncValidator, updateValueAndValidity?: boolean): void;
423
+ hasError(errorCode: ExtractStrings<E>, path?: ControlPath): boolean;
424
+ setErrors(errors: Partial<E> | null, opts?: EmitEvent): void;
425
+ getError<K extends ExtractStrings<E>>(errorCode: K, path?: ControlPath): E[K] | null;
426
+ }
427
+
428
+ type ValidationErrors<T = ValidationErrors$1> = T;
429
+ type ValidatorFn<T = any, E = any> = (control: AbstractControl<T>) => ValidationErrors<E> | null;
430
+ type AsyncValidatorFn<T = any, E = any> = (control: AbstractControl<T>) => Promise<ValidationErrors<E> | null> | Observable<ValidationErrors<E> | null>;
431
+ interface AbstractControlOptions<T = any, E extends ValidationErrors$1 = any> extends AbstractControlOptions$1 {
432
+ validators?: ValidatorFn<T, E> | ValidatorFn<T, E>[] | null;
433
+ asyncValidators?: AsyncValidatorFn<T, E> | AsyncValidatorFn<T, E>[] | null;
434
+ }
435
+ type ValidatorOrOpts = ValidatorFn | ValidatorFn[] | AbstractControlOptions | null;
436
+ type AsyncValidator = AsyncValidatorFn | AsyncValidatorFn[] | null;
437
+ type Validator = ValidatorFn | ValidatorFn[];
438
+ interface ControlOptions {
439
+ onlySelf?: boolean;
440
+ emitEvent?: boolean;
441
+ emitModelToViewChange?: boolean;
442
+ emitViewToModelChange?: boolean;
443
+ initial?: boolean;
444
+ /**
445
+ * used in the RxapFormArray patchValue method.
446
+ *
447
+ * true - if the value has not a control with any index. The control is created
448
+ * false - default behavior
449
+ */
450
+ coerce?: boolean;
451
+ /**
452
+ * used in the RxapFormArray patchValue method.
453
+ *
454
+ * true - the length of the control array is limited by the length of the value.
455
+ * false - default behavior
456
+ *
457
+ * example with strict = true
458
+ *
459
+ * current from array controls: [ 0: {}, 1: {}, 2: {} ]
460
+ *
461
+ * patch value A: [ 0: {}, 1: {}, 2: {} ]
462
+ * result: [ 0: {}, 1: {}, 2: {} ]
463
+ *
464
+ * path value B: [ 0: {}, 1: {} ]
465
+ * result: [ 0: {}, 1: {} ]
466
+ *
467
+ */
468
+ strict?: boolean;
469
+ setInitialValue?: boolean;
470
+ }
471
+ type ControlEventOptions = Pick<ControlOptions, 'emitEvent' | 'onlySelf' | 'coerce' | 'strict' | 'setInitialValue'>;
472
+ type OnlySelf = Pick<ControlOptions, 'onlySelf'>;
473
+ type EmitEvent = Pick<ControlOptions, 'emitEvent'>;
474
+ type ControlPath = Array<string | number> | string;
475
+ type ControlState = 'VALID' | 'INVALID' | 'PENDING' | 'DISABLED';
476
+ interface AbstractControl<T = any> extends AbstractControl$1 {
477
+ value: T;
478
+ controlId?: string;
479
+ fullControlPath?: string;
480
+ rxapFormDefinition?: FormDefinition;
481
+ readonly?: boolean;
482
+ stateChanges?: Subject<any>;
483
+ }
484
+ type ExtractStrings<T> = Extract<keyof T, string>;
485
+ interface NgValidatorsErrors {
486
+ required: true;
487
+ email: true;
488
+ pattern: {
489
+ requiredPattern: string;
490
+ actualValue: string;
491
+ };
492
+ minlength: {
493
+ requiredLength: number;
494
+ actualLength: number;
495
+ };
496
+ maxlength: {
497
+ requiredLength: number;
498
+ actualLength: number;
499
+ };
500
+ min: {
501
+ min: number;
502
+ actual: number;
503
+ };
504
+ max: {
505
+ max: number;
506
+ actual: number;
507
+ };
508
+ }
509
+ interface BoxedValue<T> {
510
+ value: T;
511
+ disabled?: boolean;
512
+ }
513
+ type OrBoxedValue<T> = T | BoxedValue<T> | (() => T);
514
+ type ArrayType<T> = T extends Array<infer R> ? R : any;
515
+ type KeyValueControls<T> = {
516
+ [K in keyof T]: T[K] extends RxapFormControl<T[K]> ? RxapFormControl<T[K]> : T[K] extends RxapFormGroup<T[K]> ? RxapFormGroup<T[K]> : T[K] extends RxapFormArray<ArrayType<T[K]>> ? RxapFormArray<ArrayType<T[K]>> : AbstractControl<T[K]>;
517
+ };
518
+ type ExtractAbstractControl<T, U> = T extends KeyValueControls<any> ? {
519
+ [K in keyof U]: AbstractControl<U[K]>;
520
+ } : T;
521
+
522
+ /**
523
+ * @deprecated removed use the rxapControlError or rxapControlErrors directive
524
+ */
525
+ declare class FormControlErrorDirective implements OnInit, OnDestroy {
526
+ private readonly template;
527
+ private readonly parent;
528
+ private readonly viewContainerRef;
529
+ name: string;
530
+ errorKey: string;
531
+ private subscription?;
532
+ constructor(template: TemplateRef<{
533
+ $implicit: ValidationErrors;
534
+ }>, parent: ControlContainer, viewContainerRef: ViewContainerRef);
535
+ ngOnInit(): void;
536
+ ngOnDestroy(): void;
537
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormControlErrorDirective, [null, { host: true; skipSelf: true; }, null]>;
538
+ static ɵdir: i0.ɵɵDirectiveDeclaration<FormControlErrorDirective, "[rxapFormControlError]", never, { "name": { "alias": "rxapFormControlErrorFrom"; "required": true; }; "errorKey": { "alias": "rxapFormControlErrorIf"; "required": true; }; }, {}, never, never, true, never>;
539
+ }
540
+
541
+ declare class FormControlMarkDirtyDirective {
542
+ private readonly parent;
543
+ constructor(parent: ControlContainer);
544
+ onClick(): void;
545
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormControlMarkDirtyDirective, never>;
546
+ static ɵdir: i0.ɵɵDirectiveDeclaration<FormControlMarkDirtyDirective, "[rxapFormControlMarkDirty]", never, {}, {}, never, never, true, never>;
547
+ }
548
+
549
+ declare class FormControlMarkPristineDirective {
550
+ private readonly parent;
551
+ constructor(parent: ControlContainer);
552
+ onClick(): void;
553
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormControlMarkPristineDirective, never>;
554
+ static ɵdir: i0.ɵɵDirectiveDeclaration<FormControlMarkPristineDirective, "[rxapFormControlMarkPristine]", never, {}, {}, never, never, true, never>;
555
+ }
556
+
557
+ declare class FormControlMarkTouchedDirective {
558
+ private readonly parent;
559
+ constructor(parent: ControlContainer);
560
+ onClick(): void;
561
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormControlMarkTouchedDirective, never>;
562
+ static ɵdir: i0.ɵɵDirectiveDeclaration<FormControlMarkTouchedDirective, "[rxapFormControlMarkTouched]", never, {}, {}, never, never, true, never>;
563
+ }
564
+
565
+ declare class FormControlMarkUntouchedDirective {
566
+ private readonly parent;
567
+ constructor(parent: ControlContainer);
568
+ onClick(): void;
569
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormControlMarkUntouchedDirective, never>;
570
+ static ɵdir: i0.ɵɵDirectiveDeclaration<FormControlMarkUntouchedDirective, "[rxapFormControlMarkUntouched]", never, {}, {}, never, never, true, never>;
571
+ }
572
+
573
+ /**
574
+ * A full exertion of FormControlName from @angular/forms. The only change is the
575
+ * ability to access the control container outside of the current component
576
+ *
577
+ * @deprecated use the ParentControlContainerDirective
578
+ */
579
+ declare class FormControlNameDirective extends FormControlName {
580
+ readonly control: RxapFormControl;
581
+ name: string | number | null;
582
+ constructor(parent: ControlContainer, validators: Array<Validator$1 | ValidatorFn$1>, asyncValidators: Array<AsyncValidator$1 | AsyncValidatorFn$1>, valueAccessors: ControlValueAccessor$1[]);
583
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormControlNameDirective, [{ optional: true; skipSelf: true; }, { optional: true; self: true; }, { optional: true; self: true; }, { optional: true; self: true; }]>;
584
+ static ɵdir: i0.ɵɵDirectiveDeclaration<FormControlNameDirective, "[rxapFormControlName]", ["rxapFormControl"], { "name": { "alias": "rxapFormControlName"; "required": false; }; }, {}, never, never, true, never>;
585
+ }
586
+
587
+ /**
588
+ * A full exertion of FormGroupName from @angular/forms. The only change is the
589
+ * ability to access the control container outside of the current component
590
+ *
591
+ * @deprecated use the ParentControlContainerDirective
592
+ */
593
+ declare class FormGroupNameDirective extends FormGroupName {
594
+ name: string | number | null;
595
+ get control(): RxapFormGroup;
596
+ constructor(parent: ControlContainer, validators: any[], asyncValidators: any[]);
597
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormGroupNameDirective, [{ optional: true; skipSelf: true; }, { optional: true; self: true; }, { optional: true; self: true; }]>;
598
+ static ɵdir: i0.ɵɵDirectiveDeclaration<FormGroupNameDirective, "[rxapFormGroupName]", ["rxapFormGroup"], { "name": { "alias": "rxapFormGroupName"; "required": false; }; }, {}, never, never, true, never>;
599
+ }
600
+
601
+ declare class FormArrayControlManager<T extends FormDefinition> {
602
+ private readonly form;
603
+ private readonly controlId;
604
+ constructor(form: T, controlId: keyof T);
605
+ inserted(index: number, controlOrDefinition: AbstractControl$1 | FormDefinition): void;
606
+ removed(index: number): void;
607
+ }
608
+ declare class RxapFormBuilder<Data extends Record<string, any> = any, Form extends FormType<Data> = FormType<Data>> {
609
+ private readonly definition;
610
+ private readonly injector;
611
+ private readonly formArrayGroups;
612
+ private readonly formArrayControls;
613
+ private readonly formControls;
614
+ private readonly formGroups;
615
+ private readonly formOptions;
616
+ private readonly validators;
617
+ private readonly asyncValidators;
618
+ private readonly controlChanges;
619
+ private readonly controlSetValue;
620
+ private readonly providers;
621
+ constructor(definition: Constructor<Form>, injector?: Injector, providers?: StaticProvider[]);
622
+ build<T extends (FormDefinition<Data> | FormType<Data>)>(state?: Readonly<any>, options?: Partial<FormDefinitionMetadata & {
623
+ controlId?: string;
624
+ }>): T;
625
+ private buildArrayControls;
626
+ private buildArrayGroups;
627
+ private buildGroups;
628
+ private buildControls;
629
+ /**
630
+ * Coerce to a function array.
631
+ *
632
+ * @param form the current form definition instance
633
+ * @param methodKeys A set of propertyKeys that points to form
634
+ * definition instance methods
635
+ */
636
+ private coerceToFnArray;
637
+ /**
638
+ * Coerce to a validator function array.
639
+ *
640
+ * @param form the current form definition instance
641
+ * @param optionsValidators The options validator functions
642
+ * @param validatorMethodKeys A set of propertyKeys that points to form
643
+ * definition instance methods
644
+ * @param injectValidators Injected validator functions
645
+ */
646
+ private coerceToValidatorArray;
647
+ /**
648
+ * Coerce to the form state for the specified controlId. If none form state is
649
+ * found the default form state will be returned.
650
+ *
651
+ * @param controlId A control id
652
+ * @param defaultFormState The default form state
653
+ * @param builderFormState The form state provides as build state parameter
654
+ * @param optionsFormState The form state set by the decorator in the form definition
655
+ */
656
+ private coerceToControlFormState;
657
+ /**
658
+ * Coerce to the form state for the specified controlId. If none form state is
659
+ * found the default form state will be returned.
660
+ *
661
+ * The difference to the method coerceToControlFormState is that null will be
662
+ * handled as undefined and the defaultFormState is used
663
+ *
664
+ * @param controlId A control id
665
+ * @param defaultFormState The default form state
666
+ * @param builderFormState The form state provides as build state parameter
667
+ * @param optionsFormState The form state set by the decorator in the form definition
668
+ */
669
+ private coerceToGroupFormState;
670
+ /**
671
+ * Coerce to the form state for the specified controlId. If none form state is
672
+ * found the default form state will be returned.
673
+ *
674
+ * The difference to the method coerceToControlFormState is that null will be
675
+ * handled as undefined and the defaultFormState is used
676
+ *
677
+ * @param controlId A control id
678
+ * @param defaultFormState The default form state
679
+ * @param builderFormState The form state provides as build state parameter
680
+ * @param optionsFormState The form state set by the decorator in the form definition
681
+ */
682
+ private coerceToArrayFormState;
683
+ private extractControlChanges;
684
+ private extractControlSetValue;
685
+ private extractValidators;
686
+ private extractAsyncValidators;
687
+ private extractArrayGroups;
688
+ private extractArrayControls;
689
+ private extractGroups;
690
+ private extractControls;
691
+ private extractFormOptions;
692
+ }
693
+
694
+ interface FormSubmitMethod<FormSate = any, Context = any, Initial = any> extends MethodWithParameters<any, FormSate> {
695
+ call(parameters: FormSate, context?: Context | null, initial?: Initial | null): any | Promise<any>;
696
+ }
697
+ interface FormLoadMethod<FormState = any, Context = any, Initial = any> extends Method<FormState> {
698
+ call(data: {
699
+ context: Context | null;
700
+ initial: Initial | null;
701
+ }): FormState | Promise<FormState>;
702
+ }
703
+ interface FormLoadFailedMethod extends MethodWithParameters {
704
+ call(error: Error): Promise<any> | any;
705
+ }
706
+ interface FormLoadSuccessfulMethod<T = any> extends Method {
707
+ call(value: T): Promise<any> | any;
708
+ }
709
+ interface FormSubmitFailedMethod extends MethodWithParameters {
710
+ call(error: Error): Promise<any> | any;
711
+ }
712
+ interface FormSubmitSuccessfulMethod<T = any> extends Method {
713
+ call(result: T): Promise<any> | any;
714
+ }
715
+ declare function ToFormMethod<T, FormMethod extends Method<R, P>, R, P>(call: (value: P) => R | Promise<R>): Method<R, P>;
716
+ /**
717
+ * @deprecated use ToFormMethod instead
718
+ *
719
+ * @param call the call method implementation
720
+ */
721
+ declare function ToFormSubmitMethod<T>(call: (value: T) => boolean): FormSubmitMethod<T>;
722
+
723
+ declare class FormDirective<T = any> extends FormGroupDirective implements OnInit, OnChanges, OnDestroy {
724
+ readonly cdr: ChangeDetectorRef;
725
+ protected readonly formDefinitionBuilder: RxapFormBuilder | null;
726
+ protected readonly loadingIndicatorService: LoadingIndicatorService | null;
727
+ form: RxapFormGroup<T>;
728
+ readonly initial: i0.ModelSignal<T | null>;
729
+ readonly context: i0.ModelSignal<unknown>;
730
+ /**
731
+ * Emits when the submit method is executed without errors. The result of the
732
+ * submit method is passed as event object.
733
+ *
734
+ * If no submit method is defined then emit after the submit button
735
+ * is clicked.
736
+ */
737
+ rxapSubmit: EventEmitter<any>;
738
+ invalidSubmit: EventEmitter<Record<string, any>>;
739
+ submitSuccessful$: EventEmitter<any>;
740
+ get submitting(): boolean;
741
+ get submitError(): Error | null;
742
+ get loading(): boolean;
743
+ get loaded(): boolean;
744
+ get loadingError(): Error | null;
745
+ set useFormDefinition(value: FormDefinition<T> | '');
746
+ get formDefinition(): FormDefinition<T>;
747
+ readonly submitting$: ToggleSubject;
748
+ readonly submitError$: BehaviorSubject<Error | null>;
749
+ readonly loading$: ToggleSubject;
750
+ readonly loaded$: ToggleSubject;
751
+ readonly loadingError$: BehaviorSubject<Error | null>;
752
+ protected _formDefinition: FormDefinition<T>;
753
+ submitMethod: FormSubmitMethod<any> | null;
754
+ loadMethod: FormLoadMethod | null;
755
+ loadFailedMethod: FormLoadFailedMethod | null;
756
+ loadSuccessfulMethod: FormLoadSuccessfulMethod | null;
757
+ submitFailedMethod: FormSubmitFailedMethod | null;
758
+ submitSuccessfulMethod: FormSubmitSuccessfulMethod | null;
759
+ private _autoSubmitSubscription;
760
+ constructor(cdr: ChangeDetectorRef, formDefinition?: FormDefinition | null, submitMethod?: FormSubmitMethod<any> | null, loadMethod?: FormLoadMethod | null, loadFailedMethod?: FormLoadFailedMethod | null, loadSuccessfulMethod?: FormLoadSuccessfulMethod | null, submitFailedMethod?: FormSubmitFailedMethod | null, submitSuccessfulMethod?: FormSubmitSuccessfulMethod | null, formDefinitionBuilder?: RxapFormBuilder | null, loadingIndicatorService?: LoadingIndicatorService | null, context?: unknown, initial?: T | null);
761
+ ngOnChanges(changes: SimpleChanges): void;
762
+ ngOnInit(): void;
763
+ onSubmit($event: Event): boolean;
764
+ protected loadInitialState(form: RxapFormGroup): void;
765
+ protected loadSuccessful(value: any): void;
766
+ protected loadFailed(error: Error): void;
767
+ protected getSubmitValue(): T;
768
+ protected submit(): void;
769
+ protected submitFailed(error: Error): void;
770
+ protected submitSuccessful(value: any): void;
771
+ ngOnDestroy(): void;
772
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormDirective<any>, [null, { optional: true; }, { optional: true; skipSelf: true; }, { optional: true; skipSelf: true; }, { optional: true; skipSelf: true; }, { optional: true; skipSelf: true; }, { optional: true; skipSelf: true; }, { optional: true; skipSelf: true; }, { optional: true; skipSelf: true; }, { optional: true; }, { optional: true; }, { optional: true; }]>;
773
+ static ɵdir: i0.ɵɵDirectiveDeclaration<FormDirective<any>, "form[rxapForm]:not([formGroup]):not([ngForm]),rxap-form,form[rxapForm]", ["rxapForm"], { "initial": { "alias": "initial"; "required": false; "isSignal": true; }; "context": { "alias": "context"; "required": false; "isSignal": true; }; "useFormDefinition": { "alias": "rxapForm"; "required": false; }; "submitMethod": { "alias": "submitMethod"; "required": false; }; "loadMethod": { "alias": "loadMethod"; "required": false; }; "loadFailedMethod": { "alias": "loadFailedMethod"; "required": false; }; "loadSuccessfulMethod": { "alias": "loadSuccessfulMethod"; "required": false; }; "submitFailedMethod": { "alias": "submitFailedMethod"; "required": false; }; "submitSuccessfulMethod": { "alias": "submitSuccessfulMethod"; "required": false; }; }, { "ngSubmit": "ngSubmit"; "initial": "initialChange"; "context": "contextChange"; "rxapSubmit": "rxapSubmit"; "invalidSubmit": "invalidSubmit"; "submitSuccessful$": "submitSuccessful"; }, never, never, true, never>;
774
+ }
775
+
776
+ declare class FormLoadedDirective implements AfterViewInit, OnDestroy {
777
+ private readonly formDirective;
778
+ private readonly template;
779
+ private readonly viewContainerRef;
780
+ private subscription?;
781
+ constructor(formDirective: FormDirective, template: TemplateRef<void>, viewContainerRef: ViewContainerRef);
782
+ ngAfterViewInit(): void;
783
+ ngOnDestroy(): void;
784
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormLoadedDirective, never>;
785
+ static ɵdir: i0.ɵɵDirectiveDeclaration<FormLoadedDirective, "[rxapFormLoaded]", never, {}, {}, never, never, true, never>;
786
+ }
787
+
788
+ declare class FormLoadingErrorDirective implements AfterViewInit, OnDestroy {
789
+ private readonly formDirective;
790
+ private readonly template;
791
+ private readonly viewContainerRef;
792
+ private subscription?;
793
+ constructor(formDirective: FormDirective, template: TemplateRef<{
794
+ $implicit: Error;
795
+ }>, viewContainerRef: ViewContainerRef);
796
+ ngAfterViewInit(): void;
797
+ ngOnDestroy(): void;
798
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormLoadingErrorDirective, never>;
799
+ static ɵdir: i0.ɵɵDirectiveDeclaration<FormLoadingErrorDirective, "[rxapFormLoadingError]", never, {}, {}, never, never, true, never>;
800
+ }
801
+
802
+ declare class FormLoadingDirective implements AfterViewInit, OnDestroy {
803
+ private readonly formDirective;
804
+ private readonly template;
805
+ private readonly viewContainerRef;
806
+ private subscription?;
807
+ constructor(formDirective: FormDirective, template: TemplateRef<void>, viewContainerRef: ViewContainerRef);
808
+ ngAfterViewInit(): void;
809
+ ngOnDestroy(): void;
810
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormLoadingDirective, never>;
811
+ static ɵdir: i0.ɵɵDirectiveDeclaration<FormLoadingDirective, "[rxapFormLoading]", never, {}, {}, never, never, true, never>;
812
+ }
813
+
814
+ declare class FormResetDirective extends ConfirmClick {
815
+ private readonly formDirective;
816
+ type: string;
817
+ constructor(formDirective: FormDirective);
818
+ protected execute(): void;
819
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormResetDirective, never>;
820
+ static ɵdir: i0.ɵɵDirectiveDeclaration<FormResetDirective, "[rxapFormReset]", never, { "type": { "alias": "type"; "required": false; }; }, {}, never, never, true, never>;
821
+ }
822
+
823
+ declare class FormSubmitFailedDirective implements AfterViewInit, OnDestroy {
824
+ private readonly formDirective;
825
+ private readonly template;
826
+ private readonly viewContainerRef;
827
+ private subscription?;
828
+ constructor(formDirective: FormDirective, template: TemplateRef<{
829
+ $implicit: Error;
830
+ }>, viewContainerRef: ViewContainerRef);
831
+ ngAfterViewInit(): void;
832
+ ngOnDestroy(): void;
833
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormSubmitFailedDirective, never>;
834
+ static ɵdir: i0.ɵɵDirectiveDeclaration<FormSubmitFailedDirective, "[rxapFormSubmitFailed]", never, {}, {}, never, never, true, never>;
835
+ }
836
+
837
+ declare class FormSubmitInvalidDirective implements AfterViewInit, OnDestroy {
838
+ private readonly formDirective;
839
+ private readonly template;
840
+ private readonly viewContainerRef;
841
+ private subscription?;
842
+ constructor(formDirective: FormDirective, template: TemplateRef<{
843
+ $implicit: any;
844
+ }>, viewContainerRef: ViewContainerRef);
845
+ ngAfterViewInit(): void;
846
+ ngOnDestroy(): void;
847
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormSubmitInvalidDirective, never>;
848
+ static ɵdir: i0.ɵɵDirectiveDeclaration<FormSubmitInvalidDirective, "[rxapFormSubmitInvalid]", never, {}, {}, never, never, true, never>;
849
+ }
850
+
851
+ declare class FormSubmitSuccessfulDirective implements AfterViewInit, OnDestroy {
852
+ private readonly formDirective;
853
+ private readonly template;
854
+ private readonly viewContainerRef;
855
+ private subscription?;
856
+ constructor(formDirective: FormDirective, template: TemplateRef<{
857
+ $implicit: any;
858
+ }>, viewContainerRef: ViewContainerRef);
859
+ ngAfterViewInit(): void;
860
+ ngOnDestroy(): void;
861
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormSubmitSuccessfulDirective, never>;
862
+ static ɵdir: i0.ɵɵDirectiveDeclaration<FormSubmitSuccessfulDirective, "[rxapFormSubmitSuccessful]", never, {}, {}, never, never, true, never>;
863
+ }
864
+
865
+ declare class FormSubmitDirective extends ConfirmClick implements OnDestroy {
866
+ private readonly formDirective;
867
+ private readonly router;
868
+ type: i0.InputSignal<"submit" | "reset" | "button">;
869
+ resetAfterSubmit: i0.InputSignalWithTransform<boolean | "", boolean>;
870
+ navigateAfterSubmit: i0.InputSignal<string[] | undefined>;
871
+ afterSubmit: i0.OutputEmitterRef<any>;
872
+ disableWhileSubmitting: i0.InputSignal<boolean>;
873
+ submitting: i0.Signal<boolean>;
874
+ disabled: i0.Signal<boolean>;
875
+ private subscription?;
876
+ constructor(formDirective: FormDirective, router?: Router | null);
877
+ protected execute(): void;
878
+ ngOnDestroy(): void;
879
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormSubmitDirective, [null, { optional: true; }]>;
880
+ static ɵdir: i0.ɵɵDirectiveDeclaration<FormSubmitDirective, "[rxapFormSubmit]", ["rxapFormSubmit"], { "type": { "alias": "type"; "required": false; "isSignal": true; }; "resetAfterSubmit": { "alias": "resetAfterSubmit"; "required": false; "isSignal": true; }; "navigateAfterSubmit": { "alias": "navigateAfterSubmit"; "required": false; "isSignal": true; }; "disableWhileSubmitting": { "alias": "disableWhileSubmitting"; "required": false; "isSignal": true; }; }, { "afterSubmit": "afterSubmit"; }, never, never, true, never>;
881
+ }
882
+
883
+ declare class FormSubmittingDirective implements AfterViewInit, OnDestroy {
884
+ private readonly formDirective;
885
+ private readonly template;
886
+ private readonly viewContainerRef;
887
+ private subscription?;
888
+ constructor(formDirective: FormDirective, template: TemplateRef<void>, viewContainerRef: ViewContainerRef);
889
+ ngAfterViewInit(): void;
890
+ ngOnDestroy(): void;
891
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormSubmittingDirective, never>;
892
+ static ɵdir: i0.ɵɵDirectiveDeclaration<FormSubmittingDirective, "[rxapFormSubmitting]", never, {}, {}, never, never, true, never>;
893
+ }
894
+
895
+ declare class ParentControlContainerDirective {
896
+ static ɵfac: i0.ɵɵFactoryDeclaration<ParentControlContainerDirective, never>;
897
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ParentControlContainerDirective, "[formControlName][parentControlContainer],[formControlGroup][parentControlContainer]", never, {}, {}, never, never, true, never>;
898
+ }
899
+
900
+ declare class RxapFormsModule {
901
+ static ɵfac: i0.ɵɵFactoryDeclaration<RxapFormsModule, never>;
902
+ static ɵmod: i0.ɵɵNgModuleDeclaration<RxapFormsModule, never, [typeof FormDirective, typeof FormSubmitFailedDirective, typeof FormLoadingDirective, typeof FormSubmittingDirective, typeof FormLoadingErrorDirective, typeof FormLoadedDirective, typeof FormControlErrorDirective, typeof FormControlMarkDirtyDirective, typeof FormControlMarkTouchedDirective, typeof FormControlMarkUntouchedDirective, typeof FormControlMarkPristineDirective, typeof FormSubmitDirective, typeof FormGroupNameDirective, typeof FormControlNameDirective, typeof ParentControlContainerDirective, typeof FormSubmitSuccessfulDirective, typeof FormSubmitInvalidDirective], [typeof FormDirective, typeof FormSubmitFailedDirective, typeof FormLoadingDirective, typeof FormSubmittingDirective, typeof FormLoadingErrorDirective, typeof FormLoadedDirective, typeof FormControlErrorDirective, typeof FormControlMarkDirtyDirective, typeof FormControlMarkTouchedDirective, typeof FormControlMarkUntouchedDirective, typeof FormControlMarkPristineDirective, typeof FormSubmitDirective, typeof FormGroupNameDirective, typeof FormControlNameDirective, typeof ParentControlContainerDirective, typeof FormSubmitSuccessfulDirective, typeof FormSubmitInvalidDirective]>;
903
+ static ɵinj: i0.ɵɵInjectorDeclaration<RxapFormsModule>;
904
+ }
905
+
906
+ declare const RXAP_FORM_DEFINITION: InjectionToken<FormDefinition<any, any, any>>;
907
+ declare const RXAP_FORM_DEFINITION_BUILDER: InjectionToken<RxapFormBuilder<any, _rxap_forms.FormType<any>>>;
908
+ declare const RXAP_FORM_SUBMIT_METHOD: InjectionToken<FormSubmitMethod<any, any, any>>;
909
+ declare const RXAP_FORM_SUBMIT_FAILED_METHOD: InjectionToken<FormSubmitMethod<any, any, any>>;
910
+ declare const RXAP_FORM_SUBMIT_SUCCESSFUL_METHOD: InjectionToken<FormSubmitMethod<any, any, any>>;
911
+ declare const RXAP_FORM_LOAD_METHOD: InjectionToken<FormLoadMethod<any, any, any>>;
912
+ declare const RXAP_FORM_LOAD_FAILED_METHOD: InjectionToken<FormLoadMethod<any, any, any>>;
913
+ declare const RXAP_FORM_LOAD_SUCCESSFUL_METHOD: InjectionToken<FormLoadMethod<any, any, any>>;
914
+
915
+ declare function ControlAsyncValidator(...controlIds: string[]): (target: any, propertyKey: string) => void;
916
+
917
+ declare function ControlChange(...controlIds: string[]): (target: any, propertyKey: string) => void;
918
+
919
+ interface ControlSetValueOptions {
920
+ propertyKey: string;
921
+ initial?: boolean;
922
+ }
923
+ declare function ControlSetValue(controlId: string, options?: Omit<ControlSetValueOptions, 'propertyKey'>): (target: any, propertyKey: string) => void;
924
+
925
+ declare function ControlValidator(...controlIds: string[]): (target: any, propertyKey: string) => void;
926
+
927
+ declare function RxapForm(optionsOrId: FormDefinitionMetadata | string, className?: string, packageName?: string): (target: any) => void;
928
+
929
+ declare enum MetadataKeys {
930
+ CONTROL_VALIDATORS = "rxap/forms/control-validators",
931
+ CONTROL_ASYNC_VALIDATORS = "rxap/forms/control-async-validators",
932
+ CONTROL_CHANGES = "rxap/forms/control-changes",
933
+ CONTROL_SET_VALUE = "rxap/forms/control-set-value",
934
+ FORM_ARRAY_GROUPS = "rxap/forms/form-array-groups",
935
+ FORM_ARRAY_CONTROLS = "rxap/forms/form-array-controls",
936
+ FORM_GROUPS = "rxap/forms/form-groups",
937
+ FORM_CONTROLS = "rxap/forms/form-controls"
938
+ }
939
+
940
+ declare function UseFormArrayGroup(definition: Constructor, options?: RxapAbstractControlOptions): (target: any, propertyKey: string) => void;
941
+ declare function UseFormArrayControl(options?: RxapAbstractControlOptions): (target: any, propertyKey: string) => void;
942
+
943
+ declare function UseFormControl(options?: RxapAbstractControlOptions): (target: any, propertyKey: string) => void;
944
+
945
+ declare function UseFormGroup(definition: Constructor, options?: RxapAbstractControlOptions): (target: any, propertyKey: string) => void;
946
+
947
+ declare function controlValueChanges$<T>(control: AbstractControl<T>): Observable<T>;
948
+ declare function controlDisabled$<T>(control: AbstractControl<T>): Observable<boolean>;
949
+ declare function controlEnabled$<T>(control: AbstractControl<T>): Observable<boolean>;
950
+ declare function controlReadonly$<T>(control: AbstractControl<T>): Observable<boolean>;
951
+ declare function controlStatusChanges$<T>(control: AbstractControl<T>): Observable<ControlState>;
952
+ declare function controlErrorChanges$<E>(control: AbstractControl): Observable<E | null>;
953
+ declare function enableControl<T>(control: AbstractControl<T>, enabled: boolean, opts?: ControlOptions): void;
954
+ declare function disableControl<T>(control: AbstractControl<T>, disabled: boolean, opts?: ControlOptions): void;
955
+ declare function controlDisabledWhile<T>(control: AbstractControl<T>, observable: Observable<boolean>, opts?: ControlOptions): Subscription;
956
+ declare function controlEnabledWhile<T>(control: AbstractControl<T>, observable: Observable<boolean>, opts?: ControlOptions): Subscription;
957
+ declare function mergeControlValidators<T, Control extends AbstractControl<T>>(control: Control, validators: ValidatorFn<T> | ValidatorFn<T>[]): void;
958
+ declare function validateControlOn<T>(control: AbstractControl<T>, validation: Observable<null | object>): Subscription;
959
+ declare function hasErrorAndTouched<T>(control: AbstractControl<T>, error: string, path?: ControlPath): boolean;
960
+ declare function hasErrorAndDirty<T>(control: AbstractControl<T>, error: string, path?: ControlPath): boolean;
961
+ declare function markAllDirty<T>(control: RxapFormArray<T> | RxapFormGroup<T>): void;
962
+ declare function markAllPristine<T>(control: RxapFormArray<T> | RxapFormGroup<T>): void;
963
+ declare function markAllUntouched<T>(control: RxapFormArray<T> | RxapFormGroup<T>): void;
964
+ declare function selectControlValue$<T, R>(control: RxapFormGroup<T> | RxapFormArray<T> | RxapFormControl<T>, mapFn: (state: T) => R): Observable<R>;
965
+
966
+ declare abstract class ControlValueAccessor<T = any> implements ControlValueAccessor$1 {
967
+ abstract writeValue(value: T): void;
968
+ onChange?: (value: T | null) => void;
969
+ onTouched?: () => void;
970
+ registerOnChange(fn: (value: T | null) => void): void;
971
+ registerOnTouched(fn: () => void): void;
972
+ setDisabledState?: (isDisabled: boolean) => void;
973
+ }
974
+
975
+ declare const RXAP_FORM_INITIAL_STATE: InjectionToken<unknown>;
976
+ declare const RXAP_FORM_CONTEXT: InjectionToken<unknown>;
977
+
978
+ export { ControlAsyncValidator, ControlChange, ControlSetValue, ControlValidator, ControlValueAccessor, FormArrayControlManager, FormControlErrorDirective, FormControlMarkDirtyDirective, FormControlMarkPristineDirective, FormControlMarkTouchedDirective, FormControlMarkUntouchedDirective, FormControlNameDirective, FormDirective, FormGroupNameDirective, FormLoadedDirective, FormLoadingDirective, FormLoadingErrorDirective, FormResetDirective, FormSubmitDirective, FormSubmitFailedDirective, FormSubmitInvalidDirective, FormSubmitSuccessfulDirective, FormSubmittingDirective, IsArray, IsBoolean, IsComplex, IsDate, IsEmail, IsEnum, IsIP, IsInt, IsNumber, IsObject, IsPhoneNumber, IsPort, IsString, IsUUID, IsUrl, MetadataKeys, ParentControlContainerDirective, RXAP_FORM_CONTEXT, RXAP_FORM_DEFINITION, RXAP_FORM_DEFINITION_BUILDER, RXAP_FORM_INITIAL_STATE, RXAP_FORM_LOAD_FAILED_METHOD, RXAP_FORM_LOAD_METHOD, RXAP_FORM_LOAD_SUCCESSFUL_METHOD, RXAP_FORM_SUBMIT_FAILED_METHOD, RXAP_FORM_SUBMIT_METHOD, RXAP_FORM_SUBMIT_SUCCESSFUL_METHOD, RxapForm, RxapFormArray, RxapFormBuilder, RxapFormControl, RxapFormGroup, RxapFormsModule, RxapValidators, ToFormMethod, ToFormSubmitMethod, UseFormArrayControl, UseFormArrayGroup, UseFormControl, UseFormGroup, _IsNumber, controlDisabled$, controlDisabledWhile, controlEnabled$, controlEnabledWhile, controlErrorChanges$, controlReadonly$, controlStatusChanges$, controlValueChanges$, disableControl, enableControl, hasErrorAndDirty, hasErrorAndTouched, isNumber, markAllDirty, markAllPristine, markAllUntouched, mergeControlValidators, selectControlValue$, validateControlOn };
979
+ export type { AbstractControl, AbstractControlOptions, AsyncValidator, AsyncValidatorFn, BoxedValue, ChangeFn, ComplexityOptions, ControlEventOptions, ControlInsertedFn, ControlOptions, ControlPath, ControlRemovedFn, ControlSetValueOptions, ControlState, EmitEvent, ExtractAbstractControl, ExtractStrings, FormArrayOptions, FormBuilderFn, FormDefinition, FormDefinitionArray, FormDefinitionMetadata, FormGroupOptions, FormLoadFailedMethod, FormLoadMethod, FormLoadSuccessfulMethod, FormOptions, FormSubmitFailedMethod, FormSubmitMethod, FormSubmitSuccessfulMethod, FormType, InjectableValidator, IsNumberOptions, KeyValueControls, NgValidatorsErrors, OnlySelf, OrBoxedValue, RxapAbstractControlOptions, RxapAbstractControlOptionsWithDefinition, SetValueFn, ValidationErrors, Validator, ValidatorFn, ValidatorOrOpts, _RxapAbstractControlOptions };