@rxap/forms 19.2.0 → 21.0.1-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +36 -0
- package/compodoc/changelog.html +34 -0
- package/compodoc/classes/FormArrayControlManager.html +13 -10
- package/compodoc/classes/RxapFormArray.html +3 -1
- package/compodoc/classes/RxapFormBuilder.html +13 -10
- package/compodoc/classes/RxapFormControl.html +3 -1
- package/compodoc/classes/RxapFormGroup.html +3 -1
- package/compodoc/dependencies.html +13 -13
- package/compodoc/directives/FormControlErrorDirective.html +97 -166
- package/compodoc/directives/FormControlMarkDirtyDirective.html +5 -107
- package/compodoc/directives/FormControlMarkPristineDirective.html +5 -107
- package/compodoc/directives/FormControlMarkTouchedDirective.html +5 -107
- package/compodoc/directives/FormControlMarkUntouchedDirective.html +5 -107
- package/compodoc/directives/FormControlNameDirective.html +12 -124
- package/compodoc/directives/FormDirective.html +1032 -1057
- package/compodoc/directives/FormGroupNameDirective.html +16 -111
- package/compodoc/directives/FormLoadedDirective.html +16 -96
- package/compodoc/directives/FormLoadingDirective.html +16 -96
- package/compodoc/directives/FormLoadingErrorDirective.html +15 -91
- package/compodoc/directives/FormResetDirective.html +47 -101
- package/compodoc/directives/FormSubmitDirective.html +45 -100
- package/compodoc/directives/FormSubmitFailedDirective.html +15 -91
- package/compodoc/directives/FormSubmitInvalidDirective.html +14 -95
- package/compodoc/directives/FormSubmitSuccessfulDirective.html +14 -95
- package/compodoc/directives/FormSubmittingDirective.html +16 -96
- package/compodoc/graph/dependencies.svg +15 -441
- package/compodoc/js/menu-wc.js +0 -77
- package/compodoc/js/menu-wc_es5.js +1 -1
- package/compodoc/js/search/search_index.js +2 -2
- package/compodoc/modules.html +0 -17
- package/compodoc/overview.html +1 -473
- package/compodoc/properties.html +1 -1
- package/docs/documentation.json +13661 -13712
- package/docs/html/assets/hierarchy.js +1 -1
- package/docs/html/assets/navigation.js +1 -1
- package/docs/html/assets/search.js +1 -1
- package/docs/html/classes/ControlValueAccessor.html +5 -5
- package/docs/html/classes/FormArrayControlManager.html +2 -2
- package/docs/html/classes/FormControlErrorDirective.html +3 -12
- package/docs/html/classes/FormControlMarkDirtyDirective.html +2 -2
- package/docs/html/classes/FormControlMarkPristineDirective.html +2 -2
- package/docs/html/classes/FormControlMarkTouchedDirective.html +2 -2
- package/docs/html/classes/FormControlMarkUntouchedDirective.html +2 -2
- package/docs/html/classes/FormControlNameDirective.html +34 -34
- package/docs/html/classes/FormDirective.html +72 -59
- package/docs/html/classes/FormGroupNameDirective.html +29 -29
- package/docs/html/classes/FormLoadedDirective.html +2 -9
- package/docs/html/classes/FormLoadingDirective.html +2 -9
- package/docs/html/classes/FormLoadingErrorDirective.html +2 -9
- package/docs/html/classes/FormResetDirective.html +4 -4
- package/docs/html/classes/FormSubmitDirective.html +4 -4
- package/docs/html/classes/FormSubmitFailedDirective.html +2 -9
- package/docs/html/classes/FormSubmitInvalidDirective.html +2 -9
- package/docs/html/classes/FormSubmitSuccessfulDirective.html +2 -9
- package/docs/html/classes/FormSubmittingDirective.html +2 -9
- package/docs/html/classes/ParentControlContainerDirective.html +2 -2
- package/docs/html/classes/RxapFormArray.html +96 -79
- package/docs/html/classes/RxapFormBuilder.html +2 -2
- package/docs/html/classes/RxapFormControl.html +92 -75
- package/docs/html/classes/RxapFormGroup.html +93 -77
- package/docs/html/enums/MetadataKeys.html +2 -2
- package/docs/html/functions/ControlAsyncValidator.html +1 -1
- package/docs/html/functions/ControlChange.html +1 -1
- package/docs/html/functions/ControlSetValue.html +1 -1
- package/docs/html/functions/ControlValidator.html +1 -1
- package/docs/html/functions/IsArray.html +1 -1
- package/docs/html/functions/IsBoolean.html +1 -1
- package/docs/html/functions/IsComplex.html +1 -1
- package/docs/html/functions/IsDate.html +1 -1
- package/docs/html/functions/IsEmail.html +1 -1
- package/docs/html/functions/IsEnum.html +1 -1
- package/docs/html/functions/IsIP.html +1 -1
- package/docs/html/functions/IsInt.html +1 -1
- package/docs/html/functions/IsNumber-1.html +2 -2
- package/docs/html/functions/IsObject.html +1 -1
- package/docs/html/functions/IsPhoneNumber.html +1 -1
- package/docs/html/functions/IsPort.html +1 -1
- package/docs/html/functions/IsString.html +1 -1
- package/docs/html/functions/IsUUID.html +1 -1
- package/docs/html/functions/IsUrl.html +1 -1
- package/docs/html/functions/RxapForm.html +1 -1
- package/docs/html/functions/ToFormMethod.html +1 -1
- package/docs/html/functions/ToFormSubmitMethod.html +2 -2
- package/docs/html/functions/UseFormArrayControl.html +1 -1
- package/docs/html/functions/UseFormArrayGroup.html +1 -1
- package/docs/html/functions/UseFormControl.html +1 -1
- package/docs/html/functions/UseFormGroup.html +1 -1
- package/docs/html/functions/_IsNumber.html +1 -1
- package/docs/html/functions/controlDisabledWhile.html +1 -1
- package/docs/html/functions/controlDisabled_.html +1 -1
- package/docs/html/functions/controlEnabledWhile.html +1 -1
- package/docs/html/functions/controlEnabled_.html +1 -1
- package/docs/html/functions/controlErrorChanges_.html +1 -1
- package/docs/html/functions/controlReadonly_.html +1 -1
- package/docs/html/functions/controlStatusChanges_.html +1 -1
- package/docs/html/functions/controlValueChanges_.html +1 -1
- package/docs/html/functions/disableControl.html +1 -1
- package/docs/html/functions/enableControl.html +1 -1
- package/docs/html/functions/hasErrorAndDirty.html +1 -1
- package/docs/html/functions/hasErrorAndTouched.html +1 -1
- package/docs/html/functions/isNumber.html +2 -2
- package/docs/html/functions/markAllDirty.html +1 -1
- package/docs/html/functions/markAllPristine.html +1 -1
- package/docs/html/functions/markAllUntouched.html +1 -1
- package/docs/html/functions/mergeControlValidators.html +1 -1
- package/docs/html/functions/selectControlValue_.html +1 -1
- package/docs/html/functions/validateControlOn.html +1 -1
- package/docs/html/hierarchy.html +1 -1
- package/docs/html/index.html +2 -2
- package/docs/html/interfaces/AbstractControl.html +95 -71
- package/docs/html/interfaces/AbstractControlOptions.html +4 -4
- package/docs/html/interfaces/BoxedValue.html +2 -2
- package/docs/html/interfaces/ComplexityOptions.html +2 -2
- package/docs/html/interfaces/ControlOptions.html +3 -3
- package/docs/html/interfaces/ControlSetValueOptions.html +2 -2
- package/docs/html/interfaces/FormArrayOptions.html +4 -4
- package/docs/html/interfaces/FormDefinition.html +6 -6
- package/docs/html/interfaces/FormDefinitionArray.html +43 -36
- package/docs/html/interfaces/FormDefinitionMetadata.html +5 -5
- package/docs/html/interfaces/FormGroupOptions.html +4 -4
- package/docs/html/interfaces/FormLoadFailedMethod.html +2 -2
- package/docs/html/interfaces/FormLoadMethod.html +2 -2
- package/docs/html/interfaces/FormLoadSuccessfulMethod.html +2 -2
- package/docs/html/interfaces/FormOptions.html +4 -4
- package/docs/html/interfaces/FormSubmitFailedMethod.html +2 -2
- package/docs/html/interfaces/FormSubmitMethod.html +2 -2
- package/docs/html/interfaces/FormSubmitSuccessfulMethod.html +2 -2
- package/docs/html/interfaces/InjectableValidator.html +2 -2
- package/docs/html/interfaces/IsNumberOptions.html +3 -3
- package/docs/html/interfaces/NgValidatorsErrors.html +2 -2
- package/docs/html/interfaces/RxapAbstractControlOptionsWithDefinition.html +4 -4
- package/docs/html/interfaces/_RxapAbstractControlOptions.html +4 -4
- package/docs/html/modules.html +1 -1
- package/docs/html/types/AsyncValidator.html +1 -1
- package/docs/html/types/AsyncValidatorFn.html +1 -1
- package/docs/html/types/ChangeFn.html +1 -1
- package/docs/html/types/ControlEventOptions.html +1 -1
- package/docs/html/types/ControlInsertedFn.html +1 -1
- package/docs/html/types/ControlPath.html +1 -1
- package/docs/html/types/ControlRemovedFn.html +1 -1
- package/docs/html/types/ControlState.html +1 -1
- package/docs/html/types/EmitEvent.html +1 -1
- package/docs/html/types/ExtractAbstractControl.html +1 -1
- package/docs/html/types/ExtractStrings.html +1 -1
- package/docs/html/types/FormBuilderFn.html +1 -1
- package/docs/html/types/FormType.html +1 -1
- package/docs/html/types/KeyValueControls.html +1 -1
- package/docs/html/types/OnlySelf.html +1 -1
- package/docs/html/types/OrBoxedValue.html +1 -1
- package/docs/html/types/RxapAbstractControlOptions.html +1 -1
- package/docs/html/types/SetValueFn.html +1 -1
- package/docs/html/types/ValidationErrors.html +1 -1
- package/docs/html/types/Validator.html +1 -1
- package/docs/html/types/ValidatorFn.html +1 -1
- package/docs/html/types/ValidatorOrOpts.html +1 -1
- package/docs/html/variables/RXAP_FORM_CONTEXT.html +1 -1
- package/docs/html/variables/RXAP_FORM_DEFINITION.html +1 -1
- package/docs/html/variables/RXAP_FORM_DEFINITION_BUILDER.html +1 -1
- package/docs/html/variables/RXAP_FORM_INITIAL_STATE.html +1 -1
- package/docs/html/variables/RXAP_FORM_LOAD_FAILED_METHOD.html +1 -1
- package/docs/html/variables/RXAP_FORM_LOAD_METHOD.html +1 -1
- package/docs/html/variables/RXAP_FORM_LOAD_SUCCESSFUL_METHOD.html +1 -1
- package/docs/html/variables/RXAP_FORM_SUBMIT_FAILED_METHOD.html +1 -1
- package/docs/html/variables/RXAP_FORM_SUBMIT_METHOD.html +1 -1
- package/docs/html/variables/RXAP_FORM_SUBMIT_SUCCESSFUL_METHOD.html +1 -1
- package/docs/html/variables/RxapValidators.html +1 -1
- package/docs/markdown/README.md +1 -1
- package/docs/markdown/classes/ControlValueAccessor.md +8 -8
- package/docs/markdown/classes/FormArrayControlManager.md +6 -6
- package/docs/markdown/classes/FormControlErrorDirective.md +8 -68
- package/docs/markdown/classes/FormControlMarkDirtyDirective.md +4 -12
- package/docs/markdown/classes/FormControlMarkPristineDirective.md +4 -12
- package/docs/markdown/classes/FormControlMarkTouchedDirective.md +4 -12
- package/docs/markdown/classes/FormControlMarkUntouchedDirective.md +4 -12
- package/docs/markdown/classes/FormControlNameDirective.md +38 -58
- package/docs/markdown/classes/FormDirective.md +255 -224
- package/docs/markdown/classes/FormGroupNameDirective.md +33 -47
- package/docs/markdown/classes/FormLoadedDirective.md +4 -62
- package/docs/markdown/classes/FormLoadingDirective.md +4 -62
- package/docs/markdown/classes/FormLoadingErrorDirective.md +4 -62
- package/docs/markdown/classes/FormResetDirective.md +15 -35
- package/docs/markdown/classes/FormSubmitDirective.md +33 -57
- package/docs/markdown/classes/FormSubmitFailedDirective.md +4 -62
- package/docs/markdown/classes/FormSubmitInvalidDirective.md +4 -62
- package/docs/markdown/classes/FormSubmitSuccessfulDirective.md +4 -62
- package/docs/markdown/classes/FormSubmittingDirective.md +4 -62
- package/docs/markdown/classes/ParentControlContainerDirective.md +2 -2
- package/docs/markdown/classes/RxapFormArray.md +132 -103
- package/docs/markdown/classes/RxapFormBuilder.md +4 -4
- package/docs/markdown/classes/RxapFormControl.md +127 -103
- package/docs/markdown/classes/RxapFormGroup.md +140 -117
- package/docs/markdown/enumerations/MetadataKeys.md +10 -10
- package/docs/markdown/functions/ControlAsyncValidator.md +2 -2
- package/docs/markdown/functions/ControlChange.md +2 -2
- package/docs/markdown/functions/ControlSetValue.md +2 -2
- package/docs/markdown/functions/ControlValidator.md +2 -2
- package/docs/markdown/functions/IsArray.md +2 -2
- package/docs/markdown/functions/IsBoolean.md +2 -2
- package/docs/markdown/functions/IsComplex.md +2 -2
- package/docs/markdown/functions/IsDate.md +2 -2
- package/docs/markdown/functions/IsEmail.md +2 -2
- package/docs/markdown/functions/IsEnum.md +2 -2
- package/docs/markdown/functions/IsIP.md +2 -2
- package/docs/markdown/functions/IsInt.md +2 -2
- package/docs/markdown/functions/IsNumber-2.md +2 -2
- package/docs/markdown/functions/IsNumber.md +2 -2
- package/docs/markdown/functions/IsObject.md +2 -2
- package/docs/markdown/functions/IsPhoneNumber.md +2 -2
- package/docs/markdown/functions/IsPort.md +2 -2
- package/docs/markdown/functions/IsString.md +2 -2
- package/docs/markdown/functions/IsUUID.md +2 -2
- package/docs/markdown/functions/IsUrl.md +2 -2
- package/docs/markdown/functions/RxapForm.md +2 -2
- package/docs/markdown/functions/ToFormMethod.md +2 -2
- package/docs/markdown/functions/ToFormSubmitMethod.md +2 -2
- package/docs/markdown/functions/UseFormArrayControl.md +2 -2
- package/docs/markdown/functions/UseFormArrayGroup.md +2 -2
- package/docs/markdown/functions/UseFormControl.md +2 -2
- package/docs/markdown/functions/UseFormGroup.md +2 -2
- package/docs/markdown/functions/controlDisabled$.md +2 -2
- package/docs/markdown/functions/controlDisabledWhile.md +2 -2
- package/docs/markdown/functions/controlEnabled$.md +2 -2
- package/docs/markdown/functions/controlEnabledWhile.md +2 -2
- package/docs/markdown/functions/controlErrorChanges$.md +2 -2
- package/docs/markdown/functions/controlReadonly$.md +2 -2
- package/docs/markdown/functions/controlStatusChanges$.md +2 -2
- package/docs/markdown/functions/controlValueChanges$.md +2 -2
- package/docs/markdown/functions/disableControl.md +2 -2
- package/docs/markdown/functions/enableControl.md +2 -2
- package/docs/markdown/functions/hasErrorAndDirty.md +2 -2
- package/docs/markdown/functions/hasErrorAndTouched.md +2 -2
- package/docs/markdown/functions/isNumber-1.md +2 -2
- package/docs/markdown/functions/markAllDirty.md +2 -2
- package/docs/markdown/functions/markAllPristine.md +2 -2
- package/docs/markdown/functions/markAllUntouched.md +2 -2
- package/docs/markdown/functions/mergeControlValidators.md +2 -2
- package/docs/markdown/functions/selectControlValue$.md +2 -2
- package/docs/markdown/functions/validateControlOn.md +2 -2
- package/docs/markdown/globals.md +2 -3
- package/docs/markdown/interfaces/AbstractControl.md +122 -73
- package/docs/markdown/interfaces/AbstractControlOptions.md +6 -6
- package/docs/markdown/interfaces/BoxedValue.md +4 -4
- package/docs/markdown/interfaces/ComplexityOptions.md +12 -12
- package/docs/markdown/interfaces/ControlOptions.md +10 -10
- package/docs/markdown/interfaces/ControlSetValueOptions.md +4 -4
- package/docs/markdown/interfaces/FormArrayOptions.md +16 -16
- package/docs/markdown/interfaces/FormDefinition.md +7 -7
- package/docs/markdown/interfaces/FormDefinitionArray.md +70 -36
- package/docs/markdown/interfaces/FormDefinitionMetadata.md +15 -15
- package/docs/markdown/interfaces/FormGroupOptions.md +13 -13
- package/docs/markdown/interfaces/FormLoadFailedMethod.md +4 -4
- package/docs/markdown/interfaces/FormLoadMethod.md +4 -4
- package/docs/markdown/interfaces/FormLoadSuccessfulMethod.md +4 -4
- package/docs/markdown/interfaces/FormOptions.md +13 -13
- package/docs/markdown/interfaces/FormSubmitFailedMethod.md +4 -4
- package/docs/markdown/interfaces/FormSubmitMethod.md +4 -4
- package/docs/markdown/interfaces/FormSubmitSuccessfulMethod.md +4 -4
- package/docs/markdown/interfaces/InjectableValidator.md +4 -4
- package/docs/markdown/interfaces/IsNumberOptions.md +6 -6
- package/docs/markdown/interfaces/NgValidatorsErrors.md +9 -9
- package/docs/markdown/interfaces/RxapAbstractControlOptions.md +12 -12
- package/docs/markdown/interfaces/RxapAbstractControlOptionsWithDefinition.md +13 -13
- package/docs/markdown/type-aliases/AsyncValidator.md +2 -2
- package/docs/markdown/type-aliases/AsyncValidatorFn.md +2 -2
- package/docs/markdown/type-aliases/ChangeFn.md +2 -2
- package/docs/markdown/type-aliases/ControlEventOptions.md +2 -2
- package/docs/markdown/type-aliases/ControlInsertedFn.md +2 -2
- package/docs/markdown/type-aliases/ControlPath.md +2 -2
- package/docs/markdown/type-aliases/ControlRemovedFn.md +2 -2
- package/docs/markdown/type-aliases/ControlState.md +2 -2
- package/docs/markdown/type-aliases/EmitEvent.md +2 -2
- package/docs/markdown/type-aliases/ExtractAbstractControl.md +2 -2
- package/docs/markdown/type-aliases/ExtractStrings.md +2 -2
- package/docs/markdown/type-aliases/FormBuilderFn.md +2 -2
- package/docs/markdown/type-aliases/FormType.md +2 -2
- package/docs/markdown/type-aliases/KeyValueControls.md +2 -2
- package/docs/markdown/type-aliases/OnlySelf.md +2 -2
- package/docs/markdown/type-aliases/OrBoxedValue.md +2 -2
- package/docs/markdown/type-aliases/RxapAbstractControlOptions.md +2 -2
- package/docs/markdown/type-aliases/SetValueFn.md +2 -2
- package/docs/markdown/type-aliases/ValidationErrors.md +2 -2
- package/docs/markdown/type-aliases/Validator.md +2 -2
- package/docs/markdown/type-aliases/ValidatorFn.md +2 -2
- package/docs/markdown/type-aliases/ValidatorOrOpts.md +2 -2
- package/docs/markdown/variables/RXAP_FORM_CONTEXT.md +2 -2
- package/docs/markdown/variables/RXAP_FORM_DEFINITION.md +2 -2
- package/docs/markdown/variables/RXAP_FORM_DEFINITION_BUILDER.md +2 -2
- package/docs/markdown/variables/RXAP_FORM_INITIAL_STATE.md +2 -2
- package/docs/markdown/variables/RXAP_FORM_LOAD_FAILED_METHOD.md +2 -2
- package/docs/markdown/variables/RXAP_FORM_LOAD_METHOD.md +2 -2
- package/docs/markdown/variables/RXAP_FORM_LOAD_SUCCESSFUL_METHOD.md +2 -2
- package/docs/markdown/variables/RXAP_FORM_SUBMIT_FAILED_METHOD.md +2 -2
- package/docs/markdown/variables/RXAP_FORM_SUBMIT_METHOD.md +2 -2
- package/docs/markdown/variables/RXAP_FORM_SUBMIT_SUCCESSFUL_METHOD.md +2 -2
- package/docs/markdown/variables/RxapValidators.md +2 -2
- package/docs/wiki/Class.ControlValueAccessor.md +7 -7
- package/docs/wiki/Class.FormArrayControlManager.md +5 -5
- package/docs/wiki/Class.FormControlErrorDirective.md +7 -67
- package/docs/wiki/Class.FormControlMarkDirtyDirective.md +3 -11
- package/docs/wiki/Class.FormControlMarkPristineDirective.md +3 -11
- package/docs/wiki/Class.FormControlMarkTouchedDirective.md +3 -11
- package/docs/wiki/Class.FormControlMarkUntouchedDirective.md +3 -11
- package/docs/wiki/Class.FormControlNameDirective.md +37 -57
- package/docs/wiki/Class.FormDirective.md +254 -223
- package/docs/wiki/Class.FormGroupNameDirective.md +32 -46
- package/docs/wiki/Class.FormLoadedDirective.md +3 -61
- package/docs/wiki/Class.FormLoadingDirective.md +3 -61
- package/docs/wiki/Class.FormLoadingErrorDirective.md +3 -61
- package/docs/wiki/Class.FormResetDirective.md +14 -34
- package/docs/wiki/Class.FormSubmitDirective.md +32 -56
- package/docs/wiki/Class.FormSubmitFailedDirective.md +3 -61
- package/docs/wiki/Class.FormSubmitInvalidDirective.md +3 -61
- package/docs/wiki/Class.FormSubmitSuccessfulDirective.md +3 -61
- package/docs/wiki/Class.FormSubmittingDirective.md +3 -61
- package/docs/wiki/Class.ParentControlContainerDirective.md +1 -1
- package/docs/wiki/Class.RxapFormArray.md +131 -102
- package/docs/wiki/Class.RxapFormBuilder.md +3 -3
- package/docs/wiki/Class.RxapFormControl.md +126 -102
- package/docs/wiki/Class.RxapFormGroup.md +139 -116
- package/docs/wiki/Enumeration.MetadataKeys.md +9 -9
- package/docs/wiki/Function.ControlAsyncValidator.md +1 -1
- package/docs/wiki/Function.ControlChange.md +1 -1
- package/docs/wiki/Function.ControlSetValue.md +1 -1
- package/docs/wiki/Function.ControlValidator.md +1 -1
- package/docs/wiki/Function.IsArray.md +1 -1
- package/docs/wiki/Function.IsBoolean.md +1 -1
- package/docs/wiki/Function.IsComplex.md +1 -1
- package/docs/wiki/Function.IsDate.md +1 -1
- package/docs/wiki/Function.IsEmail.md +1 -1
- package/docs/wiki/Function.IsEnum.md +1 -1
- package/docs/wiki/Function.IsIP.md +1 -1
- package/docs/wiki/Function.IsInt.md +1 -1
- package/docs/wiki/Function.IsNumber.md +1 -1
- package/docs/wiki/Function.IsObject.md +1 -1
- package/docs/wiki/Function.IsPhoneNumber.md +1 -1
- package/docs/wiki/Function.IsPort.md +1 -1
- package/docs/wiki/Function.IsString.md +1 -1
- package/docs/wiki/Function.IsUUID.md +1 -1
- package/docs/wiki/Function.IsUrl.md +1 -1
- package/docs/wiki/Function.RxapForm.md +1 -1
- package/docs/wiki/Function.ToFormMethod.md +1 -1
- package/docs/wiki/Function.ToFormSubmitMethod.md +1 -1
- package/docs/wiki/Function.UseFormArrayControl.md +1 -1
- package/docs/wiki/Function.UseFormArrayGroup.md +1 -1
- package/docs/wiki/Function.UseFormControl.md +1 -1
- package/docs/wiki/Function.UseFormGroup.md +1 -1
- package/docs/wiki/Function._IsNumber.md +1 -1
- package/docs/wiki/Function.controlDisabled$.md +1 -1
- package/docs/wiki/Function.controlDisabledWhile.md +1 -1
- package/docs/wiki/Function.controlEnabled$.md +1 -1
- package/docs/wiki/Function.controlEnabledWhile.md +1 -1
- package/docs/wiki/Function.controlErrorChanges$.md +1 -1
- package/docs/wiki/Function.controlReadonly$.md +1 -1
- package/docs/wiki/Function.controlStatusChanges$.md +1 -1
- package/docs/wiki/Function.controlValueChanges$.md +1 -1
- package/docs/wiki/Function.disableControl.md +1 -1
- package/docs/wiki/Function.enableControl.md +1 -1
- package/docs/wiki/Function.hasErrorAndDirty.md +1 -1
- package/docs/wiki/Function.hasErrorAndTouched.md +1 -1
- package/docs/wiki/Function.isNumber.md +1 -1
- package/docs/wiki/Function.markAllDirty.md +1 -1
- package/docs/wiki/Function.markAllPristine.md +1 -1
- package/docs/wiki/Function.markAllUntouched.md +1 -1
- package/docs/wiki/Function.mergeControlValidators.md +1 -1
- package/docs/wiki/Function.selectControlValue$.md +1 -1
- package/docs/wiki/Function.validateControlOn.md +1 -1
- package/docs/wiki/Interface.AbstractControl.md +121 -72
- package/docs/wiki/Interface.AbstractControlOptions.md +5 -5
- package/docs/wiki/Interface.BoxedValue.md +3 -3
- package/docs/wiki/Interface.ComplexityOptions.md +11 -11
- package/docs/wiki/Interface.ControlOptions.md +9 -9
- package/docs/wiki/Interface.ControlSetValueOptions.md +3 -3
- package/docs/wiki/Interface.FormArrayOptions.md +15 -15
- package/docs/wiki/Interface.FormDefinition.md +6 -6
- package/docs/wiki/Interface.FormDefinitionArray.md +69 -35
- package/docs/wiki/Interface.FormDefinitionMetadata.md +14 -14
- package/docs/wiki/Interface.FormGroupOptions.md +12 -12
- package/docs/wiki/Interface.FormLoadFailedMethod.md +3 -3
- package/docs/wiki/Interface.FormLoadMethod.md +3 -3
- package/docs/wiki/Interface.FormLoadSuccessfulMethod.md +3 -3
- package/docs/wiki/Interface.FormOptions.md +12 -12
- package/docs/wiki/Interface.FormSubmitFailedMethod.md +3 -3
- package/docs/wiki/Interface.FormSubmitMethod.md +3 -3
- package/docs/wiki/Interface.FormSubmitSuccessfulMethod.md +3 -3
- package/docs/wiki/Interface.InjectableValidator.md +3 -3
- package/docs/wiki/Interface.IsNumberOptions.md +5 -5
- package/docs/wiki/Interface.NgValidatorsErrors.md +8 -8
- package/docs/wiki/Interface.RxapAbstractControlOptionsWithDefinition.md +12 -12
- package/docs/wiki/Interface._RxapAbstractControlOptions.md +11 -11
- package/docs/wiki/TypeAlias.AsyncValidator.md +1 -1
- package/docs/wiki/TypeAlias.AsyncValidatorFn.md +1 -1
- package/docs/wiki/TypeAlias.ChangeFn.md +1 -1
- package/docs/wiki/TypeAlias.ControlEventOptions.md +1 -1
- package/docs/wiki/TypeAlias.ControlInsertedFn.md +1 -1
- package/docs/wiki/TypeAlias.ControlPath.md +1 -1
- package/docs/wiki/TypeAlias.ControlRemovedFn.md +1 -1
- package/docs/wiki/TypeAlias.ControlState.md +1 -1
- package/docs/wiki/TypeAlias.EmitEvent.md +1 -1
- package/docs/wiki/TypeAlias.ExtractAbstractControl.md +1 -1
- package/docs/wiki/TypeAlias.ExtractStrings.md +1 -1
- package/docs/wiki/TypeAlias.FormBuilderFn.md +1 -1
- package/docs/wiki/TypeAlias.FormType.md +1 -1
- package/docs/wiki/TypeAlias.KeyValueControls.md +1 -1
- package/docs/wiki/TypeAlias.OnlySelf.md +1 -1
- package/docs/wiki/TypeAlias.OrBoxedValue.md +1 -1
- package/docs/wiki/TypeAlias.RxapAbstractControlOptions.md +1 -1
- package/docs/wiki/TypeAlias.SetValueFn.md +1 -1
- package/docs/wiki/TypeAlias.ValidationErrors.md +1 -1
- package/docs/wiki/TypeAlias.Validator.md +1 -1
- package/docs/wiki/TypeAlias.ValidatorFn.md +1 -1
- package/docs/wiki/TypeAlias.ValidatorOrOpts.md +1 -1
- package/docs/wiki/Variable.RXAP_FORM_CONTEXT.md +1 -1
- package/docs/wiki/Variable.RXAP_FORM_DEFINITION.md +1 -1
- package/docs/wiki/Variable.RXAP_FORM_DEFINITION_BUILDER.md +1 -1
- package/docs/wiki/Variable.RXAP_FORM_INITIAL_STATE.md +1 -1
- package/docs/wiki/Variable.RXAP_FORM_LOAD_FAILED_METHOD.md +1 -1
- package/docs/wiki/Variable.RXAP_FORM_LOAD_METHOD.md +1 -1
- package/docs/wiki/Variable.RXAP_FORM_LOAD_SUCCESSFUL_METHOD.md +1 -1
- package/docs/wiki/Variable.RXAP_FORM_SUBMIT_FAILED_METHOD.md +1 -1
- package/docs/wiki/Variable.RXAP_FORM_SUBMIT_METHOD.md +1 -1
- package/docs/wiki/Variable.RXAP_FORM_SUBMIT_SUCCESSFUL_METHOD.md +1 -1
- package/docs/wiki/Variable.RxapValidators.md +1 -1
- package/docs/wiki/_Sidebar.md +0 -1
- package/docs/wiki/globals.md +1 -2
- package/fesm2022/rxap-forms.mjs +1878 -2197
- package/fesm2022/rxap-forms.mjs.map +1 -1
- package/package.json +35 -30
- package/types/rxap-forms.d.ts +969 -0
- package/docs/html/classes/RxapFormsModule.html +0 -2
- package/docs/markdown/classes/RxapFormsModule.md +0 -19
- package/docs/wiki/Class.RxapFormsModule.md +0 -15
- package/index.d.ts +0 -55
- package/lib/control-actions.d.ts +0 -23
- package/lib/control-value-accessor.d.ts +0 -9
- package/lib/decorators/control-async-validator.d.ts +0 -1
- package/lib/decorators/control-change.d.ts +0 -1
- package/lib/decorators/control-set-value.d.ts +0 -5
- package/lib/decorators/control-validator.d.ts +0 -1
- package/lib/decorators/form.d.ts +0 -2
- package/lib/decorators/metadata-keys.d.ts +0 -10
- package/lib/decorators/use-form-array.d.ts +0 -4
- package/lib/decorators/use-form-control.d.ts +0 -2
- package/lib/decorators/use-form-group.d.ts +0 -3
- package/lib/directives/form-control-error.directive.d.ts +0 -22
- package/lib/directives/form-control-mark-dirty.directive.d.ts +0 -9
- package/lib/directives/form-control-mark-pristine.directive.d.ts +0 -9
- package/lib/directives/form-control-mark-touched.directive.d.ts +0 -9
- package/lib/directives/form-control-mark-untouched.directive.d.ts +0 -9
- package/lib/directives/form-control-name.directive.d.ts +0 -16
- package/lib/directives/form-group-name.directive.d.ts +0 -16
- package/lib/directives/form-loaded.directive.d.ts +0 -14
- package/lib/directives/form-loading-error.directive.d.ts +0 -16
- package/lib/directives/form-loading.directive.d.ts +0 -14
- package/lib/directives/form-reset.directive.d.ts +0 -11
- package/lib/directives/form-submit-failed.directive.d.ts +0 -16
- package/lib/directives/form-submit-invalid.directive.d.ts +0 -16
- package/lib/directives/form-submit-successful.directive.d.ts +0 -16
- package/lib/directives/form-submit.directive.d.ts +0 -22
- package/lib/directives/form-submitting.directive.d.ts +0 -14
- package/lib/directives/form.directive.d.ts +0 -62
- package/lib/directives/forms.module.d.ts +0 -23
- package/lib/directives/models.d.ts +0 -29
- package/lib/directives/parent-control-container.directive.d.ts +0 -5
- package/lib/directives/tokens.d.ts +0 -12
- package/lib/form-array.d.ts +0 -76
- package/lib/form-builder.d.ts +0 -96
- package/lib/form-control.d.ts +0 -64
- package/lib/form-group.d.ts +0 -89
- package/lib/model.d.ts +0 -81
- package/lib/tokens.d.ts +0 -3
- package/lib/types.d.ts +0 -100
- package/lib/validators/index.d.ts +0 -32
- package/lib/validators/is-array.d.ts +0 -4
- package/lib/validators/is-boolean.d.ts +0 -4
- package/lib/validators/is-complex.d.ts +0 -17
- package/lib/validators/is-date.d.ts +0 -4
- package/lib/validators/is-email.d.ts +0 -6
- package/lib/validators/is-enum.d.ts +0 -5
- package/lib/validators/is-int.d.ts +0 -6
- package/lib/validators/is-ip.d.ts +0 -5
- package/lib/validators/is-number.d.ts +0 -24
- package/lib/validators/is-object.d.ts +0 -4
- package/lib/validators/is-phone-number.d.ts +0 -7
- package/lib/validators/is-port.d.ts +0 -4
- package/lib/validators/is-string.d.ts +0 -4
- package/lib/validators/is-url.d.ts +0 -6
- package/lib/validators/is-uuid.d.ts +0 -5
|
@@ -0,0 +1,969 @@
|
|
|
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;
|
|
16
|
+
}): (control: AbstractControl$1) => ValidationErrors$1 | null;
|
|
17
|
+
|
|
18
|
+
declare function IsBoolean({ message }?: {
|
|
19
|
+
message?: string;
|
|
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;
|
|
37
|
+
}): (control: AbstractControl$1) => ValidationErrors$1 | null;
|
|
38
|
+
|
|
39
|
+
declare function IsDate({ message }?: {
|
|
40
|
+
message?: string;
|
|
41
|
+
}): (control: AbstractControl$1) => ValidationErrors$1 | null;
|
|
42
|
+
|
|
43
|
+
declare function IsEmail({ message, options, }?: {
|
|
44
|
+
message?: string;
|
|
45
|
+
options?: IsEmailOptions;
|
|
46
|
+
}): (control: AbstractControl$1) => ValidationErrors$1 | null;
|
|
47
|
+
|
|
48
|
+
declare function IsEnum({ message, entity, }: {
|
|
49
|
+
message?: string;
|
|
50
|
+
entity: any;
|
|
51
|
+
}): (control: AbstractControl$1) => ValidationErrors$1 | null;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Options to be passed to IsNumber decorator.
|
|
55
|
+
*/
|
|
56
|
+
interface IsNumberOptions {
|
|
57
|
+
allowNaN?: boolean;
|
|
58
|
+
allowInfinity?: boolean;
|
|
59
|
+
maxDecimalPlaces?: number;
|
|
60
|
+
strict?: boolean;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Checks if a given value is a number.
|
|
64
|
+
*/
|
|
65
|
+
declare function isNumber(value: unknown, options?: IsNumberOptions): value is number;
|
|
66
|
+
/**
|
|
67
|
+
* @deprecated use RxapValidators.isNumber() instead
|
|
68
|
+
* @param control
|
|
69
|
+
* @constructor
|
|
70
|
+
*/
|
|
71
|
+
declare function IsNumber(control: AbstractControl$1): ValidationErrors$1 | null;
|
|
72
|
+
declare function _IsNumber({ message, options, }?: {
|
|
73
|
+
message?: string;
|
|
74
|
+
options?: IsNumberOptions;
|
|
75
|
+
}): (control: AbstractControl$1) => ValidationErrors$1 | null;
|
|
76
|
+
|
|
77
|
+
declare function IsInt({ message, options, }?: {
|
|
78
|
+
message?: string;
|
|
79
|
+
options?: IsNumberOptions;
|
|
80
|
+
}): (control: AbstractControl$1) => ValidationErrors$1 | null;
|
|
81
|
+
|
|
82
|
+
declare function IsIP({ message, version, }?: {
|
|
83
|
+
message?: string;
|
|
84
|
+
version?: string | number;
|
|
85
|
+
}): (control: AbstractControl$1) => ValidationErrors$1 | null;
|
|
86
|
+
|
|
87
|
+
declare function IsObject({ message }?: {
|
|
88
|
+
message?: string;
|
|
89
|
+
}): (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;
|
|
95
|
+
}): (control: AbstractControl$1) => ValidationErrors$1 | null;
|
|
96
|
+
|
|
97
|
+
declare function IsPort({ message }?: {
|
|
98
|
+
message?: string;
|
|
99
|
+
}): (control: AbstractControl$1) => ValidationErrors$1 | null;
|
|
100
|
+
|
|
101
|
+
declare function IsString({ message }?: {
|
|
102
|
+
message?: string;
|
|
103
|
+
}): (control: AbstractControl$1) => ValidationErrors$1 | null;
|
|
104
|
+
|
|
105
|
+
declare function IsUrl({ message, options, }?: {
|
|
106
|
+
message?: string;
|
|
107
|
+
options?: IsURLOptions;
|
|
108
|
+
}): (control: AbstractControl$1) => ValidationErrors$1 | null;
|
|
109
|
+
|
|
110
|
+
declare function IsUUID({ message, version, }?: {
|
|
111
|
+
message?: string;
|
|
112
|
+
version?: string;
|
|
113
|
+
}): (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;
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* @deprecated removed use the rxapControlError or rxapControlErrors directive
|
|
135
|
+
*/
|
|
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;
|
|
328
|
+
};
|
|
329
|
+
maxlength: {
|
|
330
|
+
requiredLength: number;
|
|
331
|
+
actualLength: number;
|
|
332
|
+
};
|
|
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);
|
|
347
|
+
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;
|
|
431
|
+
}
|
|
432
|
+
/**
|
|
433
|
+
* @internal
|
|
434
|
+
*/
|
|
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;
|
|
489
|
+
}) => 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;
|
|
494
|
+
controlId: string;
|
|
495
|
+
controlInsertedFn: ControlInsertedFn;
|
|
496
|
+
controlRemovedFn: ControlRemovedFn;
|
|
497
|
+
}
|
|
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
|
+
/**
|
|
564
|
+
* A full exertion of FormControlName from @angular/forms. The only change is the
|
|
565
|
+
* ability to access the control container outside of the current component
|
|
566
|
+
*
|
|
567
|
+
* @deprecated use the ParentControlContainerDirective
|
|
568
|
+
*/
|
|
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>;
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
/**
|
|
577
|
+
* A full exertion of FormGroupName from @angular/forms. The only change is the
|
|
578
|
+
* ability to access the control container outside of the current component
|
|
579
|
+
*
|
|
580
|
+
* @deprecated use the ParentControlContainerDirective
|
|
581
|
+
*/
|
|
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>;
|
|
797
|
+
/**
|
|
798
|
+
* @deprecated use ToFormMethod instead
|
|
799
|
+
*
|
|
800
|
+
* @param call the call method implementation
|
|
801
|
+
*/
|
|
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 };
|