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