@rxap/forms 19.2.0 → 21.0.1-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/compodoc/changelog.html +22 -0
- package/compodoc/classes/FormArrayControlManager.html +13 -10
- package/compodoc/classes/RxapFormArray.html +3 -1
- package/compodoc/classes/RxapFormBuilder.html +13 -10
- package/compodoc/classes/RxapFormControl.html +3 -1
- package/compodoc/classes/RxapFormGroup.html +3 -1
- package/compodoc/dependencies.html +13 -13
- package/compodoc/js/search/search_index.js +2 -2
- package/compodoc/properties.html +1 -1
- package/docs/documentation.json +12279 -9865
- package/docs/html/assets/hierarchy.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 +5 -5
- 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 +33 -33
- package/docs/html/classes/FormDirective.html +47 -47
- package/docs/html/classes/FormGroupNameDirective.html +28 -28
- package/docs/html/classes/FormLoadedDirective.html +4 -4
- package/docs/html/classes/FormLoadingDirective.html +4 -4
- package/docs/html/classes/FormLoadingErrorDirective.html +4 -4
- package/docs/html/classes/FormResetDirective.html +2 -2
- package/docs/html/classes/FormSubmitDirective.html +3 -3
- package/docs/html/classes/FormSubmitFailedDirective.html +4 -4
- package/docs/html/classes/FormSubmitInvalidDirective.html +4 -4
- package/docs/html/classes/FormSubmitSuccessfulDirective.html +4 -4
- package/docs/html/classes/FormSubmittingDirective.html +4 -4
- package/docs/html/classes/ParentControlContainerDirective.html +2 -2
- package/docs/html/classes/RxapFormArray.html +96 -79
- package/docs/html/classes/RxapFormBuilder.html +2 -2
- package/docs/html/classes/RxapFormControl.html +92 -75
- package/docs/html/classes/RxapFormGroup.html +93 -77
- package/docs/html/classes/RxapFormsModule.html +2 -2
- package/docs/html/enums/MetadataKeys.html +2 -2
- package/docs/html/functions/ControlAsyncValidator.html +1 -1
- package/docs/html/functions/ControlChange.html +1 -1
- package/docs/html/functions/ControlSetValue.html +1 -1
- package/docs/html/functions/ControlValidator.html +1 -1
- package/docs/html/functions/IsArray.html +1 -1
- package/docs/html/functions/IsBoolean.html +1 -1
- package/docs/html/functions/IsComplex.html +1 -1
- package/docs/html/functions/IsDate.html +1 -1
- package/docs/html/functions/IsEmail.html +1 -1
- package/docs/html/functions/IsEnum.html +1 -1
- package/docs/html/functions/IsIP.html +1 -1
- package/docs/html/functions/IsInt.html +1 -1
- package/docs/html/functions/IsNumber-1.html +2 -2
- package/docs/html/functions/IsObject.html +1 -1
- package/docs/html/functions/IsPhoneNumber.html +1 -1
- package/docs/html/functions/IsPort.html +1 -1
- package/docs/html/functions/IsString.html +1 -1
- package/docs/html/functions/IsUUID.html +1 -1
- package/docs/html/functions/IsUrl.html +1 -1
- package/docs/html/functions/RxapForm.html +1 -1
- package/docs/html/functions/ToFormMethod.html +1 -1
- package/docs/html/functions/ToFormSubmitMethod.html +2 -2
- package/docs/html/functions/UseFormArrayControl.html +1 -1
- package/docs/html/functions/UseFormArrayGroup.html +1 -1
- package/docs/html/functions/UseFormControl.html +1 -1
- package/docs/html/functions/UseFormGroup.html +1 -1
- package/docs/html/functions/_IsNumber.html +1 -1
- package/docs/html/functions/controlDisabledWhile.html +1 -1
- package/docs/html/functions/controlDisabled_.html +1 -1
- package/docs/html/functions/controlEnabledWhile.html +1 -1
- package/docs/html/functions/controlEnabled_.html +1 -1
- package/docs/html/functions/controlErrorChanges_.html +1 -1
- package/docs/html/functions/controlReadonly_.html +1 -1
- package/docs/html/functions/controlStatusChanges_.html +1 -1
- package/docs/html/functions/controlValueChanges_.html +1 -1
- package/docs/html/functions/disableControl.html +1 -1
- package/docs/html/functions/enableControl.html +1 -1
- package/docs/html/functions/hasErrorAndDirty.html +1 -1
- package/docs/html/functions/hasErrorAndTouched.html +1 -1
- package/docs/html/functions/isNumber.html +2 -2
- package/docs/html/functions/markAllDirty.html +1 -1
- package/docs/html/functions/markAllPristine.html +1 -1
- package/docs/html/functions/markAllUntouched.html +1 -1
- package/docs/html/functions/mergeControlValidators.html +1 -1
- package/docs/html/functions/selectControlValue_.html +1 -1
- package/docs/html/functions/validateControlOn.html +1 -1
- package/docs/html/hierarchy.html +1 -1
- package/docs/html/index.html +2 -2
- package/docs/html/interfaces/AbstractControl.html +95 -71
- package/docs/html/interfaces/AbstractControlOptions.html +4 -4
- package/docs/html/interfaces/BoxedValue.html +2 -2
- package/docs/html/interfaces/ComplexityOptions.html +2 -2
- package/docs/html/interfaces/ControlOptions.html +3 -3
- package/docs/html/interfaces/ControlSetValueOptions.html +2 -2
- package/docs/html/interfaces/FormArrayOptions.html +4 -4
- package/docs/html/interfaces/FormDefinition.html +6 -6
- package/docs/html/interfaces/FormDefinitionArray.html +43 -36
- package/docs/html/interfaces/FormDefinitionMetadata.html +5 -5
- package/docs/html/interfaces/FormGroupOptions.html +4 -4
- package/docs/html/interfaces/FormLoadFailedMethod.html +2 -2
- package/docs/html/interfaces/FormLoadMethod.html +2 -2
- package/docs/html/interfaces/FormLoadSuccessfulMethod.html +2 -2
- package/docs/html/interfaces/FormOptions.html +4 -4
- package/docs/html/interfaces/FormSubmitFailedMethod.html +2 -2
- package/docs/html/interfaces/FormSubmitMethod.html +2 -2
- package/docs/html/interfaces/FormSubmitSuccessfulMethod.html +2 -2
- package/docs/html/interfaces/InjectableValidator.html +2 -2
- package/docs/html/interfaces/IsNumberOptions.html +3 -3
- package/docs/html/interfaces/NgValidatorsErrors.html +2 -2
- package/docs/html/interfaces/RxapAbstractControlOptionsWithDefinition.html +4 -4
- package/docs/html/interfaces/_RxapAbstractControlOptions.html +4 -4
- package/docs/html/modules.html +1 -1
- package/docs/html/types/AsyncValidator.html +1 -1
- package/docs/html/types/AsyncValidatorFn.html +1 -1
- package/docs/html/types/ChangeFn.html +1 -1
- package/docs/html/types/ControlEventOptions.html +1 -1
- package/docs/html/types/ControlInsertedFn.html +1 -1
- package/docs/html/types/ControlPath.html +1 -1
- package/docs/html/types/ControlRemovedFn.html +1 -1
- package/docs/html/types/ControlState.html +1 -1
- package/docs/html/types/EmitEvent.html +1 -1
- package/docs/html/types/ExtractAbstractControl.html +1 -1
- package/docs/html/types/ExtractStrings.html +1 -1
- package/docs/html/types/FormBuilderFn.html +1 -1
- package/docs/html/types/FormType.html +1 -1
- package/docs/html/types/KeyValueControls.html +1 -1
- package/docs/html/types/OnlySelf.html +1 -1
- package/docs/html/types/OrBoxedValue.html +1 -1
- package/docs/html/types/RxapAbstractControlOptions.html +1 -1
- package/docs/html/types/SetValueFn.html +1 -1
- package/docs/html/types/ValidationErrors.html +1 -1
- package/docs/html/types/Validator.html +1 -1
- package/docs/html/types/ValidatorFn.html +1 -1
- package/docs/html/types/ValidatorOrOpts.html +1 -1
- package/docs/html/variables/RXAP_FORM_CONTEXT.html +1 -1
- package/docs/html/variables/RXAP_FORM_DEFINITION.html +1 -1
- package/docs/html/variables/RXAP_FORM_DEFINITION_BUILDER.html +1 -1
- package/docs/html/variables/RXAP_FORM_INITIAL_STATE.html +1 -1
- package/docs/html/variables/RXAP_FORM_LOAD_FAILED_METHOD.html +1 -1
- package/docs/html/variables/RXAP_FORM_LOAD_METHOD.html +1 -1
- package/docs/html/variables/RXAP_FORM_LOAD_SUCCESSFUL_METHOD.html +1 -1
- package/docs/html/variables/RXAP_FORM_SUBMIT_FAILED_METHOD.html +1 -1
- package/docs/html/variables/RXAP_FORM_SUBMIT_METHOD.html +1 -1
- package/docs/html/variables/RXAP_FORM_SUBMIT_SUCCESSFUL_METHOD.html +1 -1
- package/docs/html/variables/RxapValidators.html +1 -1
- package/docs/markdown/README.md +1 -1
- package/docs/markdown/classes/ControlValueAccessor.md +8 -8
- package/docs/markdown/classes/FormArrayControlManager.md +6 -6
- package/docs/markdown/classes/FormControlErrorDirective.md +7 -7
- package/docs/markdown/classes/FormControlMarkDirtyDirective.md +4 -4
- package/docs/markdown/classes/FormControlMarkPristineDirective.md +4 -4
- package/docs/markdown/classes/FormControlMarkTouchedDirective.md +4 -4
- package/docs/markdown/classes/FormControlMarkUntouchedDirective.md +4 -4
- package/docs/markdown/classes/FormControlNameDirective.md +36 -38
- package/docs/markdown/classes/FormDirective.md +139 -91
- package/docs/markdown/classes/FormGroupNameDirective.md +31 -31
- package/docs/markdown/classes/FormLoadedDirective.md +5 -5
- package/docs/markdown/classes/FormLoadingDirective.md +5 -5
- package/docs/markdown/classes/FormLoadingErrorDirective.md +5 -5
- package/docs/markdown/classes/FormResetDirective.md +8 -8
- package/docs/markdown/classes/FormSubmitDirective.md +15 -15
- package/docs/markdown/classes/FormSubmitFailedDirective.md +5 -5
- package/docs/markdown/classes/FormSubmitInvalidDirective.md +5 -5
- package/docs/markdown/classes/FormSubmitSuccessfulDirective.md +5 -5
- package/docs/markdown/classes/FormSubmittingDirective.md +5 -5
- package/docs/markdown/classes/ParentControlContainerDirective.md +2 -2
- package/docs/markdown/classes/RxapFormArray.md +132 -103
- package/docs/markdown/classes/RxapFormBuilder.md +4 -4
- package/docs/markdown/classes/RxapFormControl.md +127 -103
- package/docs/markdown/classes/RxapFormGroup.md +140 -117
- package/docs/markdown/classes/RxapFormsModule.md +2 -2
- 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 +122 -73
- 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 +15 -15
- package/docs/markdown/interfaces/FormDefinition.md +7 -7
- package/docs/markdown/interfaces/FormDefinitionArray.md +70 -36
- package/docs/markdown/interfaces/FormDefinitionMetadata.md +14 -14
- package/docs/markdown/interfaces/FormGroupOptions.md +12 -12
- 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 +12 -12
- 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 +11 -11
- package/docs/markdown/interfaces/RxapAbstractControlOptionsWithDefinition.md +12 -12
- package/docs/markdown/type-aliases/AsyncValidator.md +2 -2
- package/docs/markdown/type-aliases/AsyncValidatorFn.md +2 -2
- package/docs/markdown/type-aliases/ChangeFn.md +2 -2
- package/docs/markdown/type-aliases/ControlEventOptions.md +2 -2
- package/docs/markdown/type-aliases/ControlInsertedFn.md +2 -2
- package/docs/markdown/type-aliases/ControlPath.md +2 -2
- package/docs/markdown/type-aliases/ControlRemovedFn.md +2 -2
- package/docs/markdown/type-aliases/ControlState.md +2 -2
- package/docs/markdown/type-aliases/EmitEvent.md +2 -2
- package/docs/markdown/type-aliases/ExtractAbstractControl.md +2 -2
- package/docs/markdown/type-aliases/ExtractStrings.md +2 -2
- package/docs/markdown/type-aliases/FormBuilderFn.md +2 -2
- package/docs/markdown/type-aliases/FormType.md +2 -2
- package/docs/markdown/type-aliases/KeyValueControls.md +2 -2
- package/docs/markdown/type-aliases/OnlySelf.md +2 -2
- package/docs/markdown/type-aliases/OrBoxedValue.md +2 -2
- package/docs/markdown/type-aliases/RxapAbstractControlOptions.md +2 -2
- package/docs/markdown/type-aliases/SetValueFn.md +2 -2
- package/docs/markdown/type-aliases/ValidationErrors.md +2 -2
- package/docs/markdown/type-aliases/Validator.md +2 -2
- package/docs/markdown/type-aliases/ValidatorFn.md +2 -2
- package/docs/markdown/type-aliases/ValidatorOrOpts.md +2 -2
- package/docs/markdown/variables/RXAP_FORM_CONTEXT.md +2 -2
- package/docs/markdown/variables/RXAP_FORM_DEFINITION.md +2 -2
- package/docs/markdown/variables/RXAP_FORM_DEFINITION_BUILDER.md +2 -2
- package/docs/markdown/variables/RXAP_FORM_INITIAL_STATE.md +2 -2
- package/docs/markdown/variables/RXAP_FORM_LOAD_FAILED_METHOD.md +2 -2
- package/docs/markdown/variables/RXAP_FORM_LOAD_METHOD.md +2 -2
- package/docs/markdown/variables/RXAP_FORM_LOAD_SUCCESSFUL_METHOD.md +2 -2
- package/docs/markdown/variables/RXAP_FORM_SUBMIT_FAILED_METHOD.md +2 -2
- package/docs/markdown/variables/RXAP_FORM_SUBMIT_METHOD.md +2 -2
- package/docs/markdown/variables/RXAP_FORM_SUBMIT_SUCCESSFUL_METHOD.md +2 -2
- package/docs/markdown/variables/RxapValidators.md +2 -2
- package/docs/wiki/Class.ControlValueAccessor.md +7 -7
- package/docs/wiki/Class.FormArrayControlManager.md +5 -5
- package/docs/wiki/Class.FormControlErrorDirective.md +6 -6
- package/docs/wiki/Class.FormControlMarkDirtyDirective.md +3 -3
- package/docs/wiki/Class.FormControlMarkPristineDirective.md +3 -3
- package/docs/wiki/Class.FormControlMarkTouchedDirective.md +3 -3
- package/docs/wiki/Class.FormControlMarkUntouchedDirective.md +3 -3
- package/docs/wiki/Class.FormControlNameDirective.md +35 -37
- package/docs/wiki/Class.FormDirective.md +138 -90
- package/docs/wiki/Class.FormGroupNameDirective.md +30 -30
- package/docs/wiki/Class.FormLoadedDirective.md +4 -4
- package/docs/wiki/Class.FormLoadingDirective.md +4 -4
- package/docs/wiki/Class.FormLoadingErrorDirective.md +4 -4
- package/docs/wiki/Class.FormResetDirective.md +7 -7
- package/docs/wiki/Class.FormSubmitDirective.md +14 -14
- package/docs/wiki/Class.FormSubmitFailedDirective.md +4 -4
- package/docs/wiki/Class.FormSubmitInvalidDirective.md +4 -4
- package/docs/wiki/Class.FormSubmitSuccessfulDirective.md +4 -4
- package/docs/wiki/Class.FormSubmittingDirective.md +4 -4
- package/docs/wiki/Class.ParentControlContainerDirective.md +1 -1
- package/docs/wiki/Class.RxapFormArray.md +131 -102
- package/docs/wiki/Class.RxapFormBuilder.md +3 -3
- package/docs/wiki/Class.RxapFormControl.md +126 -102
- package/docs/wiki/Class.RxapFormGroup.md +139 -116
- package/docs/wiki/Class.RxapFormsModule.md +1 -1
- package/docs/wiki/Enumeration.MetadataKeys.md +9 -9
- package/docs/wiki/Function.ControlAsyncValidator.md +1 -1
- package/docs/wiki/Function.ControlChange.md +1 -1
- package/docs/wiki/Function.ControlSetValue.md +1 -1
- package/docs/wiki/Function.ControlValidator.md +1 -1
- package/docs/wiki/Function.IsArray.md +1 -1
- package/docs/wiki/Function.IsBoolean.md +1 -1
- package/docs/wiki/Function.IsComplex.md +1 -1
- package/docs/wiki/Function.IsDate.md +1 -1
- package/docs/wiki/Function.IsEmail.md +1 -1
- package/docs/wiki/Function.IsEnum.md +1 -1
- package/docs/wiki/Function.IsIP.md +1 -1
- package/docs/wiki/Function.IsInt.md +1 -1
- package/docs/wiki/Function.IsNumber.md +1 -1
- package/docs/wiki/Function.IsObject.md +1 -1
- package/docs/wiki/Function.IsPhoneNumber.md +1 -1
- package/docs/wiki/Function.IsPort.md +1 -1
- package/docs/wiki/Function.IsString.md +1 -1
- package/docs/wiki/Function.IsUUID.md +1 -1
- package/docs/wiki/Function.IsUrl.md +1 -1
- package/docs/wiki/Function.RxapForm.md +1 -1
- package/docs/wiki/Function.ToFormMethod.md +1 -1
- package/docs/wiki/Function.ToFormSubmitMethod.md +1 -1
- package/docs/wiki/Function.UseFormArrayControl.md +1 -1
- package/docs/wiki/Function.UseFormArrayGroup.md +1 -1
- package/docs/wiki/Function.UseFormControl.md +1 -1
- package/docs/wiki/Function.UseFormGroup.md +1 -1
- package/docs/wiki/Function._IsNumber.md +1 -1
- package/docs/wiki/Function.controlDisabled$.md +1 -1
- package/docs/wiki/Function.controlDisabledWhile.md +1 -1
- package/docs/wiki/Function.controlEnabled$.md +1 -1
- package/docs/wiki/Function.controlEnabledWhile.md +1 -1
- package/docs/wiki/Function.controlErrorChanges$.md +1 -1
- package/docs/wiki/Function.controlReadonly$.md +1 -1
- package/docs/wiki/Function.controlStatusChanges$.md +1 -1
- package/docs/wiki/Function.controlValueChanges$.md +1 -1
- package/docs/wiki/Function.disableControl.md +1 -1
- package/docs/wiki/Function.enableControl.md +1 -1
- package/docs/wiki/Function.hasErrorAndDirty.md +1 -1
- package/docs/wiki/Function.hasErrorAndTouched.md +1 -1
- package/docs/wiki/Function.isNumber.md +1 -1
- package/docs/wiki/Function.markAllDirty.md +1 -1
- package/docs/wiki/Function.markAllPristine.md +1 -1
- package/docs/wiki/Function.markAllUntouched.md +1 -1
- package/docs/wiki/Function.mergeControlValidators.md +1 -1
- package/docs/wiki/Function.selectControlValue$.md +1 -1
- package/docs/wiki/Function.validateControlOn.md +1 -1
- package/docs/wiki/Interface.AbstractControl.md +121 -72
- package/docs/wiki/Interface.AbstractControlOptions.md +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 +14 -14
- package/docs/wiki/Interface.FormDefinition.md +6 -6
- package/docs/wiki/Interface.FormDefinitionArray.md +69 -35
- package/docs/wiki/Interface.FormDefinitionMetadata.md +13 -13
- package/docs/wiki/Interface.FormGroupOptions.md +11 -11
- 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 +11 -11
- 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 +11 -11
- package/docs/wiki/Interface._RxapAbstractControlOptions.md +10 -10
- 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 +79 -78
- package/fesm2022/rxap-forms.mjs.map +1 -1
- package/package.json +35 -30
- package/types/rxap-forms.d.ts +979 -0
- package/index.d.ts +0 -55
- package/lib/control-actions.d.ts +0 -23
- package/lib/control-value-accessor.d.ts +0 -9
- package/lib/decorators/control-async-validator.d.ts +0 -1
- package/lib/decorators/control-change.d.ts +0 -1
- package/lib/decorators/control-set-value.d.ts +0 -5
- package/lib/decorators/control-validator.d.ts +0 -1
- package/lib/decorators/form.d.ts +0 -2
- package/lib/decorators/metadata-keys.d.ts +0 -10
- package/lib/decorators/use-form-array.d.ts +0 -4
- package/lib/decorators/use-form-control.d.ts +0 -2
- package/lib/decorators/use-form-group.d.ts +0 -3
- package/lib/directives/form-control-error.directive.d.ts +0 -22
- package/lib/directives/form-control-mark-dirty.directive.d.ts +0 -9
- package/lib/directives/form-control-mark-pristine.directive.d.ts +0 -9
- package/lib/directives/form-control-mark-touched.directive.d.ts +0 -9
- package/lib/directives/form-control-mark-untouched.directive.d.ts +0 -9
- package/lib/directives/form-control-name.directive.d.ts +0 -16
- package/lib/directives/form-group-name.directive.d.ts +0 -16
- package/lib/directives/form-loaded.directive.d.ts +0 -14
- package/lib/directives/form-loading-error.directive.d.ts +0 -16
- package/lib/directives/form-loading.directive.d.ts +0 -14
- package/lib/directives/form-reset.directive.d.ts +0 -11
- package/lib/directives/form-submit-failed.directive.d.ts +0 -16
- package/lib/directives/form-submit-invalid.directive.d.ts +0 -16
- package/lib/directives/form-submit-successful.directive.d.ts +0 -16
- package/lib/directives/form-submit.directive.d.ts +0 -22
- package/lib/directives/form-submitting.directive.d.ts +0 -14
- package/lib/directives/form.directive.d.ts +0 -62
- package/lib/directives/forms.module.d.ts +0 -23
- package/lib/directives/models.d.ts +0 -29
- package/lib/directives/parent-control-container.directive.d.ts +0 -5
- package/lib/directives/tokens.d.ts +0 -12
- package/lib/form-array.d.ts +0 -76
- package/lib/form-builder.d.ts +0 -96
- package/lib/form-control.d.ts +0 -64
- package/lib/form-group.d.ts +0 -89
- package/lib/model.d.ts +0 -81
- package/lib/tokens.d.ts +0 -3
- package/lib/types.d.ts +0 -100
- package/lib/validators/index.d.ts +0 -32
- package/lib/validators/is-array.d.ts +0 -4
- package/lib/validators/is-boolean.d.ts +0 -4
- package/lib/validators/is-complex.d.ts +0 -17
- package/lib/validators/is-date.d.ts +0 -4
- package/lib/validators/is-email.d.ts +0 -6
- package/lib/validators/is-enum.d.ts +0 -5
- package/lib/validators/is-int.d.ts +0 -6
- package/lib/validators/is-ip.d.ts +0 -5
- package/lib/validators/is-number.d.ts +0 -24
- package/lib/validators/is-object.d.ts +0 -4
- package/lib/validators/is-phone-number.d.ts +0 -7
- package/lib/validators/is-port.d.ts +0 -4
- package/lib/validators/is-string.d.ts +0 -4
- package/lib/validators/is-url.d.ts +0 -6
- package/lib/validators/is-uuid.d.ts +0 -5
package/lib/form-builder.d.ts
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { Injector, StaticProvider } from '@angular/core';
|
|
2
|
-
import { Constructor } from '@rxap/utilities';
|
|
3
|
-
import { AbstractControl } from '@angular/forms';
|
|
4
|
-
import { FormDefinition, FormDefinitionMetadata, FormType } from './model';
|
|
5
|
-
export declare class FormArrayControlManager<T extends FormDefinition> {
|
|
6
|
-
private readonly form;
|
|
7
|
-
private readonly controlId;
|
|
8
|
-
constructor(form: T, controlId: keyof T);
|
|
9
|
-
inserted(index: number, controlOrDefinition: AbstractControl | FormDefinition): void;
|
|
10
|
-
removed(index: number): void;
|
|
11
|
-
}
|
|
12
|
-
export declare class RxapFormBuilder<Data extends Record<string, any> = any, Form extends FormType<Data> = FormType<Data>> {
|
|
13
|
-
private readonly definition;
|
|
14
|
-
private readonly injector;
|
|
15
|
-
private readonly formArrayGroups;
|
|
16
|
-
private readonly formArrayControls;
|
|
17
|
-
private readonly formControls;
|
|
18
|
-
private readonly formGroups;
|
|
19
|
-
private readonly formOptions;
|
|
20
|
-
private readonly validators;
|
|
21
|
-
private readonly asyncValidators;
|
|
22
|
-
private readonly controlChanges;
|
|
23
|
-
private readonly controlSetValue;
|
|
24
|
-
private readonly providers;
|
|
25
|
-
constructor(definition: Constructor<Form>, injector?: Injector, providers?: StaticProvider[]);
|
|
26
|
-
build<T extends (FormDefinition<Data> | FormType<Data>)>(state?: Readonly<any>, options?: Partial<FormDefinitionMetadata & {
|
|
27
|
-
controlId?: string;
|
|
28
|
-
}>): T;
|
|
29
|
-
private buildArrayControls;
|
|
30
|
-
private buildArrayGroups;
|
|
31
|
-
private buildGroups;
|
|
32
|
-
private buildControls;
|
|
33
|
-
/**
|
|
34
|
-
* Coerce to a function array.
|
|
35
|
-
*
|
|
36
|
-
* @param form the current form definition instance
|
|
37
|
-
* @param methodKeys A set of propertyKeys that points to form
|
|
38
|
-
* definition instance methods
|
|
39
|
-
*/
|
|
40
|
-
private coerceToFnArray;
|
|
41
|
-
/**
|
|
42
|
-
* Coerce to a validator function array.
|
|
43
|
-
*
|
|
44
|
-
* @param form the current form definition instance
|
|
45
|
-
* @param optionsValidators The options validator functions
|
|
46
|
-
* @param validatorMethodKeys A set of propertyKeys that points to form
|
|
47
|
-
* definition instance methods
|
|
48
|
-
* @param injectValidators Injected validator functions
|
|
49
|
-
*/
|
|
50
|
-
private coerceToValidatorArray;
|
|
51
|
-
/**
|
|
52
|
-
* Coerce to the form state for the specified controlId. If none form state is
|
|
53
|
-
* found the default form state will be returned.
|
|
54
|
-
*
|
|
55
|
-
* @param controlId A control id
|
|
56
|
-
* @param defaultFormState The default form state
|
|
57
|
-
* @param builderFormState The form state provides as build state parameter
|
|
58
|
-
* @param optionsFormState The form state set by the decorator in the form definition
|
|
59
|
-
*/
|
|
60
|
-
private coerceToControlFormState;
|
|
61
|
-
/**
|
|
62
|
-
* Coerce to the form state for the specified controlId. If none form state is
|
|
63
|
-
* found the default form state will be returned.
|
|
64
|
-
*
|
|
65
|
-
* The difference to the method coerceToControlFormState is that null will be
|
|
66
|
-
* handled as undefined and the defaultFormState is used
|
|
67
|
-
*
|
|
68
|
-
* @param controlId A control id
|
|
69
|
-
* @param defaultFormState The default form state
|
|
70
|
-
* @param builderFormState The form state provides as build state parameter
|
|
71
|
-
* @param optionsFormState The form state set by the decorator in the form definition
|
|
72
|
-
*/
|
|
73
|
-
private coerceToGroupFormState;
|
|
74
|
-
/**
|
|
75
|
-
* Coerce to the form state for the specified controlId. If none form state is
|
|
76
|
-
* found the default form state will be returned.
|
|
77
|
-
*
|
|
78
|
-
* The difference to the method coerceToControlFormState is that null will be
|
|
79
|
-
* handled as undefined and the defaultFormState is used
|
|
80
|
-
*
|
|
81
|
-
* @param controlId A control id
|
|
82
|
-
* @param defaultFormState The default form state
|
|
83
|
-
* @param builderFormState The form state provides as build state parameter
|
|
84
|
-
* @param optionsFormState The form state set by the decorator in the form definition
|
|
85
|
-
*/
|
|
86
|
-
private coerceToArrayFormState;
|
|
87
|
-
private extractControlChanges;
|
|
88
|
-
private extractControlSetValue;
|
|
89
|
-
private extractValidators;
|
|
90
|
-
private extractAsyncValidators;
|
|
91
|
-
private extractArrayGroups;
|
|
92
|
-
private extractArrayControls;
|
|
93
|
-
private extractGroups;
|
|
94
|
-
private extractControls;
|
|
95
|
-
private extractFormOptions;
|
|
96
|
-
}
|
package/lib/form-control.d.ts
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { UntypedFormControl } from '@angular/forms';
|
|
2
|
-
import { Observable, Subject, Subscription } from 'rxjs';
|
|
3
|
-
import { FormDefinition, FormType, RxapAbstractControlOptions, SetValueFn } from './model';
|
|
4
|
-
import { AsyncValidator, ControlEventOptions, ControlOptions, ControlState, EmitEvent, ExtractStrings, OnlySelf, OrBoxedValue, Validator } from './types';
|
|
5
|
-
export declare class RxapFormControl<T = any, E extends object = any, Parent extends object = any> extends UntypedFormControl {
|
|
6
|
-
/**
|
|
7
|
-
* @internal
|
|
8
|
-
*/
|
|
9
|
-
get rxapFormDefinition(): (FormType<Parent> & FormDefinition<Parent>) | undefined;
|
|
10
|
-
readonly value: T;
|
|
11
|
-
readonly errors: E | null;
|
|
12
|
-
readonly valueChanges: Observable<T>;
|
|
13
|
-
readonly status: ControlState;
|
|
14
|
-
readonly statusChanges: Observable<ControlState>;
|
|
15
|
-
get initialState(): OrBoxedValue<T>;
|
|
16
|
-
protected _initialState: OrBoxedValue<T>;
|
|
17
|
-
private _readonly;
|
|
18
|
-
private touchChanges;
|
|
19
|
-
private dirtyChanges;
|
|
20
|
-
readonly touch$: Observable<boolean>;
|
|
21
|
-
readonly dirty$: Observable<boolean>;
|
|
22
|
-
readonly value$: Observable<T>;
|
|
23
|
-
readonly disabled$: Observable<boolean>;
|
|
24
|
-
readonly enabled$: Observable<boolean>;
|
|
25
|
-
get readonly(): boolean;
|
|
26
|
-
set readonly(value: boolean);
|
|
27
|
-
readonly status$: Observable<ControlState>;
|
|
28
|
-
readonly errors$: Observable<E | null>;
|
|
29
|
-
readonly controlId: string;
|
|
30
|
-
private readonly _onSetValue;
|
|
31
|
-
readonly stateChanges: Subject<void>;
|
|
32
|
-
readonly readonly$: Observable<boolean>;
|
|
33
|
-
get controlPath(): string;
|
|
34
|
-
get fullControlPath(): string;
|
|
35
|
-
constructor(formState: OrBoxedValue<T>, options: RxapAbstractControlOptions & {
|
|
36
|
-
controlId: string;
|
|
37
|
-
});
|
|
38
|
-
setValue(valueOrObservable: Observable<T>, options?: ControlOptions): Subscription;
|
|
39
|
-
setValue(valueOrObservable: T, options?: ControlOptions): void;
|
|
40
|
-
patchValue(valueOrObservable: Observable<T>, options?: ControlOptions): Subscription;
|
|
41
|
-
patchValue(valueOrObservable: T, options?: ControlOptions): void;
|
|
42
|
-
disabledWhile(observable: Observable<boolean>, options?: ControlOptions): Subscription;
|
|
43
|
-
enabledWhile(observable: Observable<boolean>, options?: ControlOptions): Subscription;
|
|
44
|
-
mergeValidators(validators: Validator): void;
|
|
45
|
-
mergeAsyncValidators(validators: AsyncValidator): void;
|
|
46
|
-
markAsTouched(opts?: OnlySelf): void;
|
|
47
|
-
markAsUntouched(opts?: OnlySelf): void;
|
|
48
|
-
markAsPristine(opts?: OnlySelf): void;
|
|
49
|
-
markAsDirty(opts?: OnlySelf): void;
|
|
50
|
-
markAllAsDirty(): void;
|
|
51
|
-
reset(formState?: OrBoxedValue<T>, options?: ControlEventOptions): void;
|
|
52
|
-
setValidators(newValidator: Validator, updateValueAndValidity?: boolean): void;
|
|
53
|
-
setAsyncValidators(newValidator: AsyncValidator, updateValueAndValidity?: boolean): void;
|
|
54
|
-
validateOn(observableValidation: Observable<null | object>): Subscription;
|
|
55
|
-
getError<K extends ExtractStrings<E>>(errorCode: K): E[K] | null;
|
|
56
|
-
hasError<K extends ExtractStrings<E>>(errorCode: K): boolean;
|
|
57
|
-
setErrors(errors: Partial<E> | null, opts?: EmitEvent): void;
|
|
58
|
-
setError(key: string, value: any, opts?: EmitEvent): void;
|
|
59
|
-
hasErrorAndTouched(error: ExtractStrings<E>): boolean;
|
|
60
|
-
hasErrorAndDirty(error: ExtractStrings<E>): boolean;
|
|
61
|
-
setEnable(enable?: boolean, opts?: ControlEventOptions): void;
|
|
62
|
-
setDisable(disable?: boolean, opts?: ControlEventOptions): void;
|
|
63
|
-
registerOnSetValue(setValueFn: SetValueFn<T>): void;
|
|
64
|
-
}
|
package/lib/form-group.d.ts
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { Observable, Subscription } from 'rxjs';
|
|
2
|
-
import { UntypedFormGroup } from '@angular/forms';
|
|
3
|
-
import { AbstractControl, AsyncValidator, ControlEventOptions, ControlOptions, ControlState, EmitEvent, ExtractAbstractControl, ExtractStrings, KeyValueControls, OnlySelf, ValidationErrors, Validator } from './types';
|
|
4
|
-
import { FormDefinition, FormGroupOptions, FormType } from './model';
|
|
5
|
-
export declare class RxapFormGroup<T = any, E extends ValidationErrors = any> extends UntypedFormGroup {
|
|
6
|
-
controls: ExtractAbstractControl<KeyValueControls<T>, T>;
|
|
7
|
-
/**
|
|
8
|
-
* @internal
|
|
9
|
-
*/
|
|
10
|
-
get rxapFormDefinition(): (FormType<T> & FormDefinition<T>) | undefined;
|
|
11
|
-
private _readonly;
|
|
12
|
-
get readonly(): boolean;
|
|
13
|
-
set readonly(value: boolean);
|
|
14
|
-
/**
|
|
15
|
-
* @internal
|
|
16
|
-
*/
|
|
17
|
-
private _rxapFormDefinition?;
|
|
18
|
-
readonly value: T;
|
|
19
|
-
readonly errors: E | null;
|
|
20
|
-
readonly valueChanges: Observable<T>;
|
|
21
|
-
readonly status: ControlState;
|
|
22
|
-
readonly statusChanges: Observable<ControlState>;
|
|
23
|
-
private touchChanges;
|
|
24
|
-
private dirtyChanges;
|
|
25
|
-
touch$: Observable<boolean>;
|
|
26
|
-
dirty$: Observable<boolean>;
|
|
27
|
-
readonly value$: Observable<T>;
|
|
28
|
-
readonly disabled$: Observable<boolean>;
|
|
29
|
-
readonly enabled$: Observable<boolean>;
|
|
30
|
-
readonly status$: Observable<ControlState>;
|
|
31
|
-
readonly errors$: Observable<E | null>;
|
|
32
|
-
readonly controlId: string;
|
|
33
|
-
get controlPath(): string;
|
|
34
|
-
get fullControlPath(): string;
|
|
35
|
-
constructor(controls: ExtractAbstractControl<KeyValueControls<T>, T>, options: FormGroupOptions);
|
|
36
|
-
select<R>(mapFn: (state: T) => R): Observable<R>;
|
|
37
|
-
getRawValue(): T;
|
|
38
|
-
get<K1 extends keyof T>(path: [K1]): AbstractControl<T[K1]>;
|
|
39
|
-
get<K1 extends keyof T, K2 extends keyof T[K1]>(path: [K1, K2]): AbstractControl<T[K1][K2]>;
|
|
40
|
-
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]>;
|
|
41
|
-
get(path: string): AbstractControl;
|
|
42
|
-
getControl<P1 extends keyof T>(prop1: P1): AbstractControl<T[P1]>;
|
|
43
|
-
getControl<P1 extends keyof T, P2 extends keyof T[P1]>(prop1: P1, prop2: P2): AbstractControl<T[P1][P2]>;
|
|
44
|
-
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]>;
|
|
45
|
-
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]>;
|
|
46
|
-
addControl<K extends ExtractStrings<T>>(name: K, control: AbstractControl<T[K]>): void;
|
|
47
|
-
removeControl(name: ExtractStrings<T>): void;
|
|
48
|
-
contains(controlName: ExtractStrings<T>): boolean;
|
|
49
|
-
setControl<K extends ExtractStrings<T>>(name: K, control: AbstractControl<T[K]>): void;
|
|
50
|
-
setValue(valueOrObservable: Observable<T>, options?: ControlEventOptions): Subscription;
|
|
51
|
-
setValue(valueOrObservable: T, options?: ControlEventOptions): void;
|
|
52
|
-
private _patchValue;
|
|
53
|
-
patchValue(valueOrObservable: Observable<Partial<T>>, options?: ControlEventOptions): Subscription;
|
|
54
|
-
patchValue(valueOrObservable: Partial<T>, options?: ControlEventOptions): void;
|
|
55
|
-
disabledWhile(observable: Observable<boolean>, options?: ControlOptions): Subscription;
|
|
56
|
-
enabledWhile(observable: Observable<boolean>, options?: ControlOptions): Subscription;
|
|
57
|
-
mergeValidators(validators: Validator): void;
|
|
58
|
-
mergeAsyncValidators(validators: AsyncValidator): void;
|
|
59
|
-
markAsTouched(opts?: OnlySelf): void;
|
|
60
|
-
markAsUntouched(opts?: OnlySelf): void;
|
|
61
|
-
markAsPristine(opts?: OnlySelf): void;
|
|
62
|
-
markAsDirty(opts?: OnlySelf): void;
|
|
63
|
-
markAllAsDirty(): void;
|
|
64
|
-
markAllAsPristine(): void;
|
|
65
|
-
markAllAsUntouched(): void;
|
|
66
|
-
reset(formState?: Partial<T>, options?: ControlEventOptions): void;
|
|
67
|
-
setValidators(newValidator: Validator, updateValueAndValidity?: boolean): void;
|
|
68
|
-
setAsyncValidators(newValidator: AsyncValidator, updateValueAndValidity?: boolean): void;
|
|
69
|
-
validateOn(observableValidation: Observable<null | object>): Subscription;
|
|
70
|
-
hasError<K1 extends keyof T>(errorCode: ExtractStrings<E>, path?: [K1]): boolean;
|
|
71
|
-
hasError<K1 extends keyof T, K2 extends keyof T[K1]>(errorCode: ExtractStrings<E>, path?: [K1, K2]): boolean;
|
|
72
|
-
hasError<K1 extends keyof T, K2 extends keyof T[K1], K3 extends keyof T[K1][K2]>(errorCode: ExtractStrings<E>, path?: [K1, K2, K3]): boolean;
|
|
73
|
-
hasError(errorCode: ExtractStrings<E>, path?: string): boolean;
|
|
74
|
-
setErrors(errors: Partial<E> | null, opts?: EmitEvent): void;
|
|
75
|
-
getError<K extends keyof E, K1 extends keyof T>(errorCode: K, path?: [K1]): E[K] | null;
|
|
76
|
-
getError<K extends keyof E, K1 extends keyof T, K2 extends keyof T[K1]>(errorCode: K, path?: [K1, K2]): E[K] | null;
|
|
77
|
-
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;
|
|
78
|
-
getError<K extends keyof E>(errorCode: K, path?: string): E[K] | null;
|
|
79
|
-
hasErrorAndTouched<P1 extends keyof T>(error: ExtractStrings<E>, prop1?: P1): boolean;
|
|
80
|
-
hasErrorAndTouched<P1 extends keyof T, P2 extends keyof T[P1]>(error: ExtractStrings<E>, prop1?: P1, prop2?: P2): boolean;
|
|
81
|
-
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;
|
|
82
|
-
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;
|
|
83
|
-
hasErrorAndDirty<P1 extends keyof T>(error: ExtractStrings<E>, prop1?: P1): boolean;
|
|
84
|
-
hasErrorAndDirty<P1 extends keyof T, P2 extends keyof T[P1]>(error: ExtractStrings<E>, prop1?: P1, prop2?: P2): boolean;
|
|
85
|
-
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;
|
|
86
|
-
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;
|
|
87
|
-
setEnable(enable?: boolean, opts?: ControlEventOptions): void;
|
|
88
|
-
setDisable(disable?: boolean, opts?: ControlEventOptions): void;
|
|
89
|
-
}
|
package/lib/model.d.ts
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { AbstractType, InjectionToken, StaticProvider, Type } from '@angular/core';
|
|
2
|
-
import { AbstractControlOptions, AsyncValidatorFn, ValidatorFn } from '@angular/forms';
|
|
3
|
-
import { BaseDefinitionMetadata } from '@rxap/definition';
|
|
4
|
-
import { Constructor, NonEmpty } from '@rxap/utilities';
|
|
5
|
-
import { RxapFormArray } from './form-array';
|
|
6
|
-
import { RxapFormControl } from './form-control';
|
|
7
|
-
import type { RxapFormGroup } from './form-group';
|
|
8
|
-
import { AbstractControl, ControlOptions } from './types';
|
|
9
|
-
export interface InjectableValidator {
|
|
10
|
-
validate?: ValidatorFn;
|
|
11
|
-
asyncValidate?: AsyncValidatorFn;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* @internal
|
|
15
|
-
*/
|
|
16
|
-
export interface _RxapAbstractControlOptions extends AbstractControlOptions {
|
|
17
|
-
state?: any | (() => any);
|
|
18
|
-
injectValidators?: Array<Type<InjectableValidator> | InjectionToken<InjectableValidator> | AbstractType<InjectableValidator>>;
|
|
19
|
-
controlType?: Constructor<RxapFormControl>;
|
|
20
|
-
disabled?: boolean;
|
|
21
|
-
readonly?: boolean;
|
|
22
|
-
}
|
|
23
|
-
export type RxapAbstractControlOptions<T extends Record<string, any> = Record<string, any>> = _RxapAbstractControlOptions & T;
|
|
24
|
-
export interface RxapAbstractControlOptionsWithDefinition extends RxapAbstractControlOptions {
|
|
25
|
-
definition: Constructor;
|
|
26
|
-
}
|
|
27
|
-
export interface FormDefinition<T = any, E extends object = any, JSON extends Record<string, any> = any> {
|
|
28
|
-
rxapFormGroup: RxapFormGroup<T, E>;
|
|
29
|
-
/**
|
|
30
|
-
* used to access the form definition metadata type save
|
|
31
|
-
*/
|
|
32
|
-
rxapMetadata: FormDefinitionMetadata;
|
|
33
|
-
/**
|
|
34
|
-
* The Reuse hook is called when the instance is reused.
|
|
35
|
-
* And can be used to reset or alter the local state of the instance.
|
|
36
|
-
*/
|
|
37
|
-
rxapReuse?(): void;
|
|
38
|
-
/**
|
|
39
|
-
* Called to get the value that should be submitted. If not defined
|
|
40
|
-
* the value property of the root RxapFormGroup instance will be used
|
|
41
|
-
*/
|
|
42
|
-
getSubmitValue?(): JSON;
|
|
43
|
-
/**
|
|
44
|
-
* Called to get the value that should be submitted. If not defined
|
|
45
|
-
* the value property of the root RxapFormGroup instance will be used
|
|
46
|
-
*/
|
|
47
|
-
toJSON?(): JSON;
|
|
48
|
-
}
|
|
49
|
-
export interface FormDefinitionArray<T> extends Array<T> {
|
|
50
|
-
rxapFormArray: RxapFormArray;
|
|
51
|
-
}
|
|
52
|
-
export type FormType<T> = Partial<FormDefinition<T>> & {
|
|
53
|
-
[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]>>;
|
|
54
|
-
};
|
|
55
|
-
export interface FormOptions extends RxapAbstractControlOptions {
|
|
56
|
-
id: string;
|
|
57
|
-
}
|
|
58
|
-
export interface FormDefinitionMetadata extends BaseDefinitionMetadata, FormOptions {
|
|
59
|
-
providers?: StaticProvider[];
|
|
60
|
-
/**
|
|
61
|
-
* true - after 5000ms the form is automatically submitted if valid
|
|
62
|
-
* number - after the set ms the is automatically submitted if valid
|
|
63
|
-
*/
|
|
64
|
-
autoSubmit?: boolean | number;
|
|
65
|
-
}
|
|
66
|
-
export type ChangeFn<T = any> = (value: T, emitViewToModelChange: boolean) => void;
|
|
67
|
-
export type SetValueFn<T = any> = (value: T, options?: ControlOptions) => void;
|
|
68
|
-
export type FormBuilderFn<T extends (FormDefinition<Data> | FormType<Data>) = FormDefinition, Data = Record<string, any>> = (state: any, options: {
|
|
69
|
-
controlId: string;
|
|
70
|
-
}) => T | RxapFormControl;
|
|
71
|
-
export type ControlInsertedFn = (index: number, controlOrDefinition: AbstractControl | FormDefinition) => void;
|
|
72
|
-
export type ControlRemovedFn = (index: number) => void;
|
|
73
|
-
export interface FormArrayOptions extends RxapAbstractControlOptions {
|
|
74
|
-
builder: FormBuilderFn;
|
|
75
|
-
controlId: string;
|
|
76
|
-
controlInsertedFn: ControlInsertedFn;
|
|
77
|
-
controlRemovedFn: ControlRemovedFn;
|
|
78
|
-
}
|
|
79
|
-
export interface FormGroupOptions extends RxapAbstractControlOptions {
|
|
80
|
-
controlId: string;
|
|
81
|
-
}
|
package/lib/tokens.d.ts
DELETED
package/lib/types.d.ts
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import { AbstractControl as NgAbstractControl, AbstractControlOptions as NgAbstractControlOptions, ValidationErrors as NgValidationErrors } from '@angular/forms';
|
|
2
|
-
import { Observable, Subject } from 'rxjs';
|
|
3
|
-
import { RxapFormArray } from './form-array';
|
|
4
|
-
import { RxapFormControl } from './form-control';
|
|
5
|
-
import { RxapFormGroup } from './form-group';
|
|
6
|
-
import { FormDefinition } from './model';
|
|
7
|
-
export type ValidationErrors<T = NgValidationErrors> = T;
|
|
8
|
-
export type ValidatorFn<T = any, E = any> = (control: AbstractControl<T>) => ValidationErrors<E> | null;
|
|
9
|
-
export type AsyncValidatorFn<T = any, E = any> = (control: AbstractControl<T>) => Promise<ValidationErrors<E> | null> | Observable<ValidationErrors<E> | null>;
|
|
10
|
-
export interface AbstractControlOptions<T = any, E extends NgValidationErrors = any> extends NgAbstractControlOptions {
|
|
11
|
-
validators?: ValidatorFn<T, E> | ValidatorFn<T, E>[] | null;
|
|
12
|
-
asyncValidators?: AsyncValidatorFn<T, E> | AsyncValidatorFn<T, E>[] | null;
|
|
13
|
-
}
|
|
14
|
-
export type ValidatorOrOpts = ValidatorFn | ValidatorFn[] | AbstractControlOptions | null;
|
|
15
|
-
export type AsyncValidator = AsyncValidatorFn | AsyncValidatorFn[] | null;
|
|
16
|
-
export type Validator = ValidatorFn | ValidatorFn[];
|
|
17
|
-
export interface ControlOptions {
|
|
18
|
-
onlySelf?: boolean;
|
|
19
|
-
emitEvent?: boolean;
|
|
20
|
-
emitModelToViewChange?: boolean;
|
|
21
|
-
emitViewToModelChange?: boolean;
|
|
22
|
-
initial?: boolean;
|
|
23
|
-
/**
|
|
24
|
-
* used in the RxapFormArray patchValue method.
|
|
25
|
-
*
|
|
26
|
-
* true - if the value has not a control with any index. The control is created
|
|
27
|
-
* false - default behavior
|
|
28
|
-
*/
|
|
29
|
-
coerce?: boolean;
|
|
30
|
-
/**
|
|
31
|
-
* used in the RxapFormArray patchValue method.
|
|
32
|
-
*
|
|
33
|
-
* true - the length of the control array is limited by the length of the value.
|
|
34
|
-
* false - default behavior
|
|
35
|
-
*
|
|
36
|
-
* example with strict = true
|
|
37
|
-
*
|
|
38
|
-
* current from array controls: [ 0: {}, 1: {}, 2: {} ]
|
|
39
|
-
*
|
|
40
|
-
* patch value A: [ 0: {}, 1: {}, 2: {} ]
|
|
41
|
-
* result: [ 0: {}, 1: {}, 2: {} ]
|
|
42
|
-
*
|
|
43
|
-
* path value B: [ 0: {}, 1: {} ]
|
|
44
|
-
* result: [ 0: {}, 1: {} ]
|
|
45
|
-
*
|
|
46
|
-
*/
|
|
47
|
-
strict?: boolean;
|
|
48
|
-
setInitialValue?: boolean;
|
|
49
|
-
}
|
|
50
|
-
export type ControlEventOptions = Pick<ControlOptions, 'emitEvent' | 'onlySelf' | 'coerce' | 'strict' | 'setInitialValue'>;
|
|
51
|
-
export type OnlySelf = Pick<ControlOptions, 'onlySelf'>;
|
|
52
|
-
export type EmitEvent = Pick<ControlOptions, 'emitEvent'>;
|
|
53
|
-
export type ControlPath = Array<string | number> | string;
|
|
54
|
-
export type ControlState = 'VALID' | 'INVALID' | 'PENDING' | 'DISABLED';
|
|
55
|
-
export interface AbstractControl<T = any> extends NgAbstractControl {
|
|
56
|
-
value: T;
|
|
57
|
-
controlId?: string;
|
|
58
|
-
fullControlPath?: string;
|
|
59
|
-
rxapFormDefinition?: FormDefinition;
|
|
60
|
-
readonly?: boolean;
|
|
61
|
-
stateChanges?: Subject<any>;
|
|
62
|
-
}
|
|
63
|
-
export type ExtractStrings<T> = Extract<keyof T, string>;
|
|
64
|
-
export interface NgValidatorsErrors {
|
|
65
|
-
required: true;
|
|
66
|
-
email: true;
|
|
67
|
-
pattern: {
|
|
68
|
-
requiredPattern: string;
|
|
69
|
-
actualValue: string;
|
|
70
|
-
};
|
|
71
|
-
minlength: {
|
|
72
|
-
requiredLength: number;
|
|
73
|
-
actualLength: number;
|
|
74
|
-
};
|
|
75
|
-
maxlength: {
|
|
76
|
-
requiredLength: number;
|
|
77
|
-
actualLength: number;
|
|
78
|
-
};
|
|
79
|
-
min: {
|
|
80
|
-
min: number;
|
|
81
|
-
actual: number;
|
|
82
|
-
};
|
|
83
|
-
max: {
|
|
84
|
-
max: number;
|
|
85
|
-
actual: number;
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
export interface BoxedValue<T> {
|
|
89
|
-
value: T;
|
|
90
|
-
disabled?: boolean;
|
|
91
|
-
}
|
|
92
|
-
export type OrBoxedValue<T> = T | BoxedValue<T> | (() => T);
|
|
93
|
-
type ArrayType<T> = T extends Array<infer R> ? R : any;
|
|
94
|
-
export type KeyValueControls<T> = {
|
|
95
|
-
[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]>;
|
|
96
|
-
};
|
|
97
|
-
export type ExtractAbstractControl<T, U> = T extends KeyValueControls<any> ? {
|
|
98
|
-
[K in keyof U]: AbstractControl<U[K]>;
|
|
99
|
-
} : T;
|
|
100
|
-
export {};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { IsArray } from './is-array';
|
|
2
|
-
import { IsBoolean } from './is-boolean';
|
|
3
|
-
import { IsComplex } from './is-complex';
|
|
4
|
-
import { IsDate } from './is-date';
|
|
5
|
-
import { IsEmail } from './is-email';
|
|
6
|
-
import { IsEnum } from './is-enum';
|
|
7
|
-
import { IsInt } from './is-int';
|
|
8
|
-
import { IsIP } from './is-ip';
|
|
9
|
-
import { _IsNumber as IsNumber } from './is-number';
|
|
10
|
-
import { IsObject } from './is-object';
|
|
11
|
-
import { IsPhoneNumber } from './is-phone-number';
|
|
12
|
-
import { IsPort } from './is-port';
|
|
13
|
-
import { IsString } from './is-string';
|
|
14
|
-
import { IsUrl } from './is-url';
|
|
15
|
-
import { IsUUID } from './is-uuid';
|
|
16
|
-
export declare const RxapValidators: {
|
|
17
|
-
IsNumber: typeof IsNumber;
|
|
18
|
-
IsBoolean: typeof IsBoolean;
|
|
19
|
-
IsArray: typeof IsArray;
|
|
20
|
-
IsDate: typeof IsDate;
|
|
21
|
-
IsEnum: typeof IsEnum;
|
|
22
|
-
IsInt: typeof IsInt;
|
|
23
|
-
IsObject: typeof IsObject;
|
|
24
|
-
IsString: typeof IsString;
|
|
25
|
-
IsComplex: typeof IsComplex;
|
|
26
|
-
IsPhoneNumber: typeof IsPhoneNumber;
|
|
27
|
-
IsEmail: typeof IsEmail;
|
|
28
|
-
IsUrl: typeof IsUrl;
|
|
29
|
-
IsIP: typeof IsIP;
|
|
30
|
-
IsPort: typeof IsPort;
|
|
31
|
-
IsUUID: typeof IsUUID;
|
|
32
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { AbstractControl, ValidationErrors } from '@angular/forms';
|
|
2
|
-
export interface ComplexityOptions {
|
|
3
|
-
uppercase?: number;
|
|
4
|
-
special?: number;
|
|
5
|
-
digit?: number;
|
|
6
|
-
lowercase?: number;
|
|
7
|
-
upperLower?: number;
|
|
8
|
-
alphaNumeric?: number;
|
|
9
|
-
min?: number;
|
|
10
|
-
max?: number;
|
|
11
|
-
range?: number;
|
|
12
|
-
exact?: number;
|
|
13
|
-
}
|
|
14
|
-
export declare function IsComplex({ message, options, }: {
|
|
15
|
-
message?: string;
|
|
16
|
-
options: ComplexityOptions;
|
|
17
|
-
}): (control: AbstractControl) => ValidationErrors | null;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { AbstractControl, ValidationErrors } from '@angular/forms';
|
|
2
|
-
import { IsEmailOptions } from '@rxap/validator';
|
|
3
|
-
export declare function IsEmail({ message, options, }?: {
|
|
4
|
-
message?: string;
|
|
5
|
-
options?: IsEmailOptions;
|
|
6
|
-
}): (control: AbstractControl) => ValidationErrors | null;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { AbstractControl, ValidationErrors } from '@angular/forms';
|
|
2
|
-
import { IsNumberOptions } from './is-number';
|
|
3
|
-
export declare function IsInt({ message, options, }?: {
|
|
4
|
-
message?: string;
|
|
5
|
-
options?: IsNumberOptions;
|
|
6
|
-
}): (control: AbstractControl) => ValidationErrors | null;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { AbstractControl, ValidationErrors } from '@angular/forms';
|
|
2
|
-
/**
|
|
3
|
-
* Options to be passed to IsNumber decorator.
|
|
4
|
-
*/
|
|
5
|
-
export interface IsNumberOptions {
|
|
6
|
-
allowNaN?: boolean;
|
|
7
|
-
allowInfinity?: boolean;
|
|
8
|
-
maxDecimalPlaces?: number;
|
|
9
|
-
strict?: boolean;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Checks if a given value is a number.
|
|
13
|
-
*/
|
|
14
|
-
export declare function isNumber(value: unknown, options?: IsNumberOptions): value is number;
|
|
15
|
-
/**
|
|
16
|
-
* @deprecated use RxapValidators.isNumber() instead
|
|
17
|
-
* @param control
|
|
18
|
-
* @constructor
|
|
19
|
-
*/
|
|
20
|
-
export declare function IsNumber(control: AbstractControl): ValidationErrors | null;
|
|
21
|
-
export declare function _IsNumber({ message, options, }?: {
|
|
22
|
-
message?: string;
|
|
23
|
-
options?: IsNumberOptions;
|
|
24
|
-
}): (control: AbstractControl) => ValidationErrors | null;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { AbstractControl, ValidationErrors } from '@angular/forms';
|
|
2
|
-
import { IsMobilePhoneOptions, MobilePhoneLocale } from '@rxap/validator';
|
|
3
|
-
export declare function IsPhoneNumber({ message, locale, options, }?: {
|
|
4
|
-
message?: string;
|
|
5
|
-
locale?: 'any' | MobilePhoneLocale | MobilePhoneLocale[];
|
|
6
|
-
options?: IsMobilePhoneOptions;
|
|
7
|
-
}): (control: AbstractControl) => ValidationErrors | null;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { AbstractControl, ValidationErrors } from '@angular/forms';
|
|
2
|
-
import { IsURLOptions } from '@rxap/validator';
|
|
3
|
-
export declare function IsUrl({ message, options, }?: {
|
|
4
|
-
message?: string;
|
|
5
|
-
options?: IsURLOptions;
|
|
6
|
-
}): (control: AbstractControl) => ValidationErrors | null;
|