@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.
- package/CHANGELOG.md +31 -0
- package/compodoc/changelog.html +29 -0
- package/compodoc/classes/RxapFormArray.html +153 -107
- package/compodoc/classes/RxapFormControl.html +158 -110
- package/compodoc/classes/RxapFormGroup.html +217 -169
- package/compodoc/dependencies.html +12 -12
- package/compodoc/js/search/search_index.js +2 -2
- package/compodoc/properties.html +1 -1
- package/docs/documentation.json +9960 -8724
- package/docs/html/assets/hierarchy.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 -3
- 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 +42 -33
- package/docs/html/classes/FormDirective.html +48 -48
- package/docs/html/classes/FormGroupNameDirective.html +28 -28
- package/docs/html/classes/FormLoadedDirective.html +2 -2
- package/docs/html/classes/FormLoadingDirective.html +2 -2
- package/docs/html/classes/FormLoadingErrorDirective.html +2 -2
- package/docs/html/classes/FormResetDirective.html +2 -2
- package/docs/html/classes/FormSubmitDirective.html +3 -3
- package/docs/html/classes/FormSubmitFailedDirective.html +2 -2
- package/docs/html/classes/FormSubmitInvalidDirective.html +2 -2
- package/docs/html/classes/FormSubmitSuccessfulDirective.html +2 -2
- package/docs/html/classes/FormSubmittingDirective.html +2 -2
- package/docs/html/classes/ParentControlContainerDirective.html +2 -2
- package/docs/html/classes/RxapFormArray.html +65 -63
- package/docs/html/classes/RxapFormBuilder.html +2 -2
- package/docs/html/classes/RxapFormControl.html +60 -58
- package/docs/html/classes/RxapFormGroup.html +62 -60
- 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 +54 -54
- 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 +42 -42
- 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 +5 -5
- package/docs/markdown/classes/FormControlErrorDirective.md +5 -5
- package/docs/markdown/classes/FormControlMarkDirtyDirective.md +3 -3
- package/docs/markdown/classes/FormControlMarkPristineDirective.md +3 -3
- package/docs/markdown/classes/FormControlMarkTouchedDirective.md +3 -3
- package/docs/markdown/classes/FormControlMarkUntouchedDirective.md +3 -3
- package/docs/markdown/classes/FormControlNameDirective.md +154 -36
- package/docs/markdown/classes/FormDirective.md +93 -93
- package/docs/markdown/classes/FormGroupNameDirective.md +30 -30
- package/docs/markdown/classes/FormLoadedDirective.md +3 -3
- package/docs/markdown/classes/FormLoadingDirective.md +3 -3
- package/docs/markdown/classes/FormLoadingErrorDirective.md +3 -3
- package/docs/markdown/classes/FormResetDirective.md +7 -7
- package/docs/markdown/classes/FormSubmitDirective.md +14 -14
- package/docs/markdown/classes/FormSubmitFailedDirective.md +3 -3
- package/docs/markdown/classes/FormSubmitInvalidDirective.md +3 -3
- package/docs/markdown/classes/FormSubmitSuccessfulDirective.md +3 -3
- package/docs/markdown/classes/FormSubmittingDirective.md +3 -3
- package/docs/markdown/classes/ParentControlContainerDirective.md +2 -2
- package/docs/markdown/classes/RxapFormArray.md +134 -109
- package/docs/markdown/classes/RxapFormBuilder.md +4 -4
- package/docs/markdown/classes/RxapFormControl.md +129 -104
- package/docs/markdown/classes/RxapFormGroup.md +148 -123
- 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 -2
- package/docs/markdown/interfaces/AbstractControl.md +98 -76
- package/docs/markdown/interfaces/AbstractControlOptions.md +5 -5
- 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 +14 -14
- package/docs/markdown/interfaces/FormDefinition.md +7 -7
- package/docs/markdown/interfaces/FormDefinitionArray.md +48 -48
- package/docs/markdown/interfaces/FormDefinitionMetadata.md +13 -13
- package/docs/markdown/interfaces/FormGroupOptions.md +11 -11
- 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 +11 -11
- 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 +10 -10
- package/docs/markdown/interfaces/RxapAbstractControlOptionsWithDefinition.md +11 -11
- 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 +4 -4
- package/docs/wiki/Class.FormControlErrorDirective.md +4 -4
- package/docs/wiki/Class.FormControlMarkDirtyDirective.md +2 -2
- package/docs/wiki/Class.FormControlMarkPristineDirective.md +2 -2
- package/docs/wiki/Class.FormControlMarkTouchedDirective.md +2 -2
- package/docs/wiki/Class.FormControlMarkUntouchedDirective.md +2 -2
- package/docs/wiki/Class.FormControlNameDirective.md +153 -35
- package/docs/wiki/Class.FormDirective.md +92 -92
- package/docs/wiki/Class.FormGroupNameDirective.md +29 -29
- package/docs/wiki/Class.FormLoadedDirective.md +2 -2
- package/docs/wiki/Class.FormLoadingDirective.md +2 -2
- package/docs/wiki/Class.FormLoadingErrorDirective.md +2 -2
- package/docs/wiki/Class.FormResetDirective.md +6 -6
- package/docs/wiki/Class.FormSubmitDirective.md +13 -13
- package/docs/wiki/Class.FormSubmitFailedDirective.md +2 -2
- package/docs/wiki/Class.FormSubmitInvalidDirective.md +2 -2
- package/docs/wiki/Class.FormSubmitSuccessfulDirective.md +2 -2
- package/docs/wiki/Class.FormSubmittingDirective.md +2 -2
- package/docs/wiki/Class.ParentControlContainerDirective.md +1 -1
- package/docs/wiki/Class.RxapFormArray.md +133 -108
- package/docs/wiki/Class.RxapFormBuilder.md +3 -3
- package/docs/wiki/Class.RxapFormControl.md +128 -103
- package/docs/wiki/Class.RxapFormGroup.md +147 -122
- 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 +97 -75
- package/docs/wiki/Interface.AbstractControlOptions.md +4 -4
- 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 +13 -13
- package/docs/wiki/Interface.FormDefinition.md +6 -6
- package/docs/wiki/Interface.FormDefinitionArray.md +47 -47
- package/docs/wiki/Interface.FormDefinitionMetadata.md +12 -12
- package/docs/wiki/Interface.FormGroupOptions.md +10 -10
- 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 +10 -10
- 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 +10 -10
- package/docs/wiki/Interface._RxapAbstractControlOptions.md +9 -9
- 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/globals.md +1 -1
- package/fesm2022/rxap-forms.mjs +2655 -2537
- package/fesm2022/rxap-forms.mjs.map +1 -1
- package/package.json +27 -27
- package/types/rxap-forms.d.ts +954 -910
package/types/rxap-forms.d.ts
CHANGED
|
@@ -1,969 +1,1013 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
-
|
|
19
|
-
message?: string;
|
|
18
|
+
export declare function IsBoolean({ message }?: {
|
|
19
|
+
message?: string;
|
|
20
20
|
}): (control: AbstractControl$1) => ValidationErrors$1 | null;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
|
|
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
|
-
|
|
40
|
-
message?: string;
|
|
37
|
+
export declare function IsDate({ message }?: {
|
|
38
|
+
message?: string;
|
|
41
39
|
}): (control: AbstractControl$1) => ValidationErrors$1 | null;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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
|
-
|
|
49
|
-
|
|
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
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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
|
-
|
|
74
|
-
|
|
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
|
-
|
|
78
|
-
|
|
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
|
-
|
|
83
|
-
|
|
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
|
-
|
|
88
|
-
message?: string;
|
|
79
|
+
export declare function IsObject({ message }?: {
|
|
80
|
+
message?: string;
|
|
89
81
|
}): (control: AbstractControl$1) => ValidationErrors$1 | null;
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
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
|
-
|
|
98
|
-
message?: string;
|
|
87
|
+
export declare function IsPort({ message }?: {
|
|
88
|
+
message?: string;
|
|
99
89
|
}): (control: AbstractControl$1) => ValidationErrors$1 | null;
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
message?: string;
|
|
90
|
+
export declare function IsString({ message }?: {
|
|
91
|
+
message?: string;
|
|
103
92
|
}): (control: AbstractControl$1) => ValidationErrors$1 | null;
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
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
|
-
|
|
111
|
-
|
|
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
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
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
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
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
|
-
|
|
330
|
-
|
|
331
|
-
|
|
135
|
+
"errorKey": {
|
|
136
|
+
"alias": "rxapFormControlErrorIf";
|
|
137
|
+
"required": true;
|
|
138
|
+
"isSignal": true;
|
|
332
139
|
};
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
}
|
|
346
|
-
|
|
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
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
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
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
}
|
|
442
|
-
type RxapAbstractControlOptions<T extends Record<string, any> = Record<string, any>> = _RxapAbstractControlOptions & T;
|
|
443
|
-
interface RxapAbstractControlOptionsWithDefinition extends RxapAbstractControlOptions {
|
|
444
|
-
|
|
445
|
-
}
|
|
446
|
-
interface FormDefinition<T = any, E extends object = any, JSON extends Record<string, any> = any> {
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
}
|
|
468
|
-
interface FormDefinitionArray<T> extends Array<T> {
|
|
469
|
-
|
|
470
|
-
}
|
|
471
|
-
type FormType<T> = Partial<FormDefinition<T>> & {
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
type
|
|
486
|
-
|
|
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
|
-
|
|
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
|
-
|
|
496
|
-
|
|
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
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
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
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
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
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
}
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
declare
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
declare
|
|
945
|
-
declare
|
|
946
|
-
declare
|
|
947
|
-
declare
|
|
948
|
-
declare
|
|
949
|
-
declare
|
|
950
|
-
declare
|
|
951
|
-
declare
|
|
952
|
-
declare function
|
|
953
|
-
declare function
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
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 {};
|