@rxap/forms 19.2.0 → 21.0.1-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +36 -0
- package/compodoc/changelog.html +34 -0
- package/compodoc/classes/FormArrayControlManager.html +13 -10
- package/compodoc/classes/RxapFormArray.html +3 -1
- package/compodoc/classes/RxapFormBuilder.html +13 -10
- package/compodoc/classes/RxapFormControl.html +3 -1
- package/compodoc/classes/RxapFormGroup.html +3 -1
- package/compodoc/dependencies.html +13 -13
- package/compodoc/directives/FormControlErrorDirective.html +97 -166
- package/compodoc/directives/FormControlMarkDirtyDirective.html +5 -107
- package/compodoc/directives/FormControlMarkPristineDirective.html +5 -107
- package/compodoc/directives/FormControlMarkTouchedDirective.html +5 -107
- package/compodoc/directives/FormControlMarkUntouchedDirective.html +5 -107
- package/compodoc/directives/FormControlNameDirective.html +12 -124
- package/compodoc/directives/FormDirective.html +1032 -1057
- package/compodoc/directives/FormGroupNameDirective.html +16 -111
- package/compodoc/directives/FormLoadedDirective.html +16 -96
- package/compodoc/directives/FormLoadingDirective.html +16 -96
- package/compodoc/directives/FormLoadingErrorDirective.html +15 -91
- package/compodoc/directives/FormResetDirective.html +47 -101
- package/compodoc/directives/FormSubmitDirective.html +45 -100
- package/compodoc/directives/FormSubmitFailedDirective.html +15 -91
- package/compodoc/directives/FormSubmitInvalidDirective.html +14 -95
- package/compodoc/directives/FormSubmitSuccessfulDirective.html +14 -95
- package/compodoc/directives/FormSubmittingDirective.html +16 -96
- package/compodoc/graph/dependencies.svg +15 -441
- package/compodoc/js/menu-wc.js +0 -77
- package/compodoc/js/menu-wc_es5.js +1 -1
- package/compodoc/js/search/search_index.js +2 -2
- package/compodoc/modules.html +0 -17
- package/compodoc/overview.html +1 -473
- package/compodoc/properties.html +1 -1
- package/docs/documentation.json +13661 -13712
- package/docs/html/assets/hierarchy.js +1 -1
- package/docs/html/assets/navigation.js +1 -1
- package/docs/html/assets/search.js +1 -1
- package/docs/html/classes/ControlValueAccessor.html +5 -5
- package/docs/html/classes/FormArrayControlManager.html +2 -2
- package/docs/html/classes/FormControlErrorDirective.html +3 -12
- package/docs/html/classes/FormControlMarkDirtyDirective.html +2 -2
- package/docs/html/classes/FormControlMarkPristineDirective.html +2 -2
- package/docs/html/classes/FormControlMarkTouchedDirective.html +2 -2
- package/docs/html/classes/FormControlMarkUntouchedDirective.html +2 -2
- package/docs/html/classes/FormControlNameDirective.html +34 -34
- package/docs/html/classes/FormDirective.html +72 -59
- package/docs/html/classes/FormGroupNameDirective.html +29 -29
- package/docs/html/classes/FormLoadedDirective.html +2 -9
- package/docs/html/classes/FormLoadingDirective.html +2 -9
- package/docs/html/classes/FormLoadingErrorDirective.html +2 -9
- package/docs/html/classes/FormResetDirective.html +4 -4
- package/docs/html/classes/FormSubmitDirective.html +4 -4
- package/docs/html/classes/FormSubmitFailedDirective.html +2 -9
- package/docs/html/classes/FormSubmitInvalidDirective.html +2 -9
- package/docs/html/classes/FormSubmitSuccessfulDirective.html +2 -9
- package/docs/html/classes/FormSubmittingDirective.html +2 -9
- package/docs/html/classes/ParentControlContainerDirective.html +2 -2
- package/docs/html/classes/RxapFormArray.html +96 -79
- package/docs/html/classes/RxapFormBuilder.html +2 -2
- package/docs/html/classes/RxapFormControl.html +92 -75
- package/docs/html/classes/RxapFormGroup.html +93 -77
- package/docs/html/enums/MetadataKeys.html +2 -2
- package/docs/html/functions/ControlAsyncValidator.html +1 -1
- package/docs/html/functions/ControlChange.html +1 -1
- package/docs/html/functions/ControlSetValue.html +1 -1
- package/docs/html/functions/ControlValidator.html +1 -1
- package/docs/html/functions/IsArray.html +1 -1
- package/docs/html/functions/IsBoolean.html +1 -1
- package/docs/html/functions/IsComplex.html +1 -1
- package/docs/html/functions/IsDate.html +1 -1
- package/docs/html/functions/IsEmail.html +1 -1
- package/docs/html/functions/IsEnum.html +1 -1
- package/docs/html/functions/IsIP.html +1 -1
- package/docs/html/functions/IsInt.html +1 -1
- package/docs/html/functions/IsNumber-1.html +2 -2
- package/docs/html/functions/IsObject.html +1 -1
- package/docs/html/functions/IsPhoneNumber.html +1 -1
- package/docs/html/functions/IsPort.html +1 -1
- package/docs/html/functions/IsString.html +1 -1
- package/docs/html/functions/IsUUID.html +1 -1
- package/docs/html/functions/IsUrl.html +1 -1
- package/docs/html/functions/RxapForm.html +1 -1
- package/docs/html/functions/ToFormMethod.html +1 -1
- package/docs/html/functions/ToFormSubmitMethod.html +2 -2
- package/docs/html/functions/UseFormArrayControl.html +1 -1
- package/docs/html/functions/UseFormArrayGroup.html +1 -1
- package/docs/html/functions/UseFormControl.html +1 -1
- package/docs/html/functions/UseFormGroup.html +1 -1
- package/docs/html/functions/_IsNumber.html +1 -1
- package/docs/html/functions/controlDisabledWhile.html +1 -1
- package/docs/html/functions/controlDisabled_.html +1 -1
- package/docs/html/functions/controlEnabledWhile.html +1 -1
- package/docs/html/functions/controlEnabled_.html +1 -1
- package/docs/html/functions/controlErrorChanges_.html +1 -1
- package/docs/html/functions/controlReadonly_.html +1 -1
- package/docs/html/functions/controlStatusChanges_.html +1 -1
- package/docs/html/functions/controlValueChanges_.html +1 -1
- package/docs/html/functions/disableControl.html +1 -1
- package/docs/html/functions/enableControl.html +1 -1
- package/docs/html/functions/hasErrorAndDirty.html +1 -1
- package/docs/html/functions/hasErrorAndTouched.html +1 -1
- package/docs/html/functions/isNumber.html +2 -2
- package/docs/html/functions/markAllDirty.html +1 -1
- package/docs/html/functions/markAllPristine.html +1 -1
- package/docs/html/functions/markAllUntouched.html +1 -1
- package/docs/html/functions/mergeControlValidators.html +1 -1
- package/docs/html/functions/selectControlValue_.html +1 -1
- package/docs/html/functions/validateControlOn.html +1 -1
- package/docs/html/hierarchy.html +1 -1
- package/docs/html/index.html +2 -2
- package/docs/html/interfaces/AbstractControl.html +95 -71
- package/docs/html/interfaces/AbstractControlOptions.html +4 -4
- package/docs/html/interfaces/BoxedValue.html +2 -2
- package/docs/html/interfaces/ComplexityOptions.html +2 -2
- package/docs/html/interfaces/ControlOptions.html +3 -3
- package/docs/html/interfaces/ControlSetValueOptions.html +2 -2
- package/docs/html/interfaces/FormArrayOptions.html +4 -4
- package/docs/html/interfaces/FormDefinition.html +6 -6
- package/docs/html/interfaces/FormDefinitionArray.html +43 -36
- package/docs/html/interfaces/FormDefinitionMetadata.html +5 -5
- package/docs/html/interfaces/FormGroupOptions.html +4 -4
- package/docs/html/interfaces/FormLoadFailedMethod.html +2 -2
- package/docs/html/interfaces/FormLoadMethod.html +2 -2
- package/docs/html/interfaces/FormLoadSuccessfulMethod.html +2 -2
- package/docs/html/interfaces/FormOptions.html +4 -4
- package/docs/html/interfaces/FormSubmitFailedMethod.html +2 -2
- package/docs/html/interfaces/FormSubmitMethod.html +2 -2
- package/docs/html/interfaces/FormSubmitSuccessfulMethod.html +2 -2
- package/docs/html/interfaces/InjectableValidator.html +2 -2
- package/docs/html/interfaces/IsNumberOptions.html +3 -3
- package/docs/html/interfaces/NgValidatorsErrors.html +2 -2
- package/docs/html/interfaces/RxapAbstractControlOptionsWithDefinition.html +4 -4
- package/docs/html/interfaces/_RxapAbstractControlOptions.html +4 -4
- package/docs/html/modules.html +1 -1
- package/docs/html/types/AsyncValidator.html +1 -1
- package/docs/html/types/AsyncValidatorFn.html +1 -1
- package/docs/html/types/ChangeFn.html +1 -1
- package/docs/html/types/ControlEventOptions.html +1 -1
- package/docs/html/types/ControlInsertedFn.html +1 -1
- package/docs/html/types/ControlPath.html +1 -1
- package/docs/html/types/ControlRemovedFn.html +1 -1
- package/docs/html/types/ControlState.html +1 -1
- package/docs/html/types/EmitEvent.html +1 -1
- package/docs/html/types/ExtractAbstractControl.html +1 -1
- package/docs/html/types/ExtractStrings.html +1 -1
- package/docs/html/types/FormBuilderFn.html +1 -1
- package/docs/html/types/FormType.html +1 -1
- package/docs/html/types/KeyValueControls.html +1 -1
- package/docs/html/types/OnlySelf.html +1 -1
- package/docs/html/types/OrBoxedValue.html +1 -1
- package/docs/html/types/RxapAbstractControlOptions.html +1 -1
- package/docs/html/types/SetValueFn.html +1 -1
- package/docs/html/types/ValidationErrors.html +1 -1
- package/docs/html/types/Validator.html +1 -1
- package/docs/html/types/ValidatorFn.html +1 -1
- package/docs/html/types/ValidatorOrOpts.html +1 -1
- package/docs/html/variables/RXAP_FORM_CONTEXT.html +1 -1
- package/docs/html/variables/RXAP_FORM_DEFINITION.html +1 -1
- package/docs/html/variables/RXAP_FORM_DEFINITION_BUILDER.html +1 -1
- package/docs/html/variables/RXAP_FORM_INITIAL_STATE.html +1 -1
- package/docs/html/variables/RXAP_FORM_LOAD_FAILED_METHOD.html +1 -1
- package/docs/html/variables/RXAP_FORM_LOAD_METHOD.html +1 -1
- package/docs/html/variables/RXAP_FORM_LOAD_SUCCESSFUL_METHOD.html +1 -1
- package/docs/html/variables/RXAP_FORM_SUBMIT_FAILED_METHOD.html +1 -1
- package/docs/html/variables/RXAP_FORM_SUBMIT_METHOD.html +1 -1
- package/docs/html/variables/RXAP_FORM_SUBMIT_SUCCESSFUL_METHOD.html +1 -1
- package/docs/html/variables/RxapValidators.html +1 -1
- package/docs/markdown/README.md +1 -1
- package/docs/markdown/classes/ControlValueAccessor.md +8 -8
- package/docs/markdown/classes/FormArrayControlManager.md +6 -6
- package/docs/markdown/classes/FormControlErrorDirective.md +8 -68
- package/docs/markdown/classes/FormControlMarkDirtyDirective.md +4 -12
- package/docs/markdown/classes/FormControlMarkPristineDirective.md +4 -12
- package/docs/markdown/classes/FormControlMarkTouchedDirective.md +4 -12
- package/docs/markdown/classes/FormControlMarkUntouchedDirective.md +4 -12
- package/docs/markdown/classes/FormControlNameDirective.md +38 -58
- package/docs/markdown/classes/FormDirective.md +255 -224
- package/docs/markdown/classes/FormGroupNameDirective.md +33 -47
- package/docs/markdown/classes/FormLoadedDirective.md +4 -62
- package/docs/markdown/classes/FormLoadingDirective.md +4 -62
- package/docs/markdown/classes/FormLoadingErrorDirective.md +4 -62
- package/docs/markdown/classes/FormResetDirective.md +15 -35
- package/docs/markdown/classes/FormSubmitDirective.md +33 -57
- package/docs/markdown/classes/FormSubmitFailedDirective.md +4 -62
- package/docs/markdown/classes/FormSubmitInvalidDirective.md +4 -62
- package/docs/markdown/classes/FormSubmitSuccessfulDirective.md +4 -62
- package/docs/markdown/classes/FormSubmittingDirective.md +4 -62
- package/docs/markdown/classes/ParentControlContainerDirective.md +2 -2
- package/docs/markdown/classes/RxapFormArray.md +132 -103
- package/docs/markdown/classes/RxapFormBuilder.md +4 -4
- package/docs/markdown/classes/RxapFormControl.md +127 -103
- package/docs/markdown/classes/RxapFormGroup.md +140 -117
- package/docs/markdown/enumerations/MetadataKeys.md +10 -10
- package/docs/markdown/functions/ControlAsyncValidator.md +2 -2
- package/docs/markdown/functions/ControlChange.md +2 -2
- package/docs/markdown/functions/ControlSetValue.md +2 -2
- package/docs/markdown/functions/ControlValidator.md +2 -2
- package/docs/markdown/functions/IsArray.md +2 -2
- package/docs/markdown/functions/IsBoolean.md +2 -2
- package/docs/markdown/functions/IsComplex.md +2 -2
- package/docs/markdown/functions/IsDate.md +2 -2
- package/docs/markdown/functions/IsEmail.md +2 -2
- package/docs/markdown/functions/IsEnum.md +2 -2
- package/docs/markdown/functions/IsIP.md +2 -2
- package/docs/markdown/functions/IsInt.md +2 -2
- package/docs/markdown/functions/IsNumber-2.md +2 -2
- package/docs/markdown/functions/IsNumber.md +2 -2
- package/docs/markdown/functions/IsObject.md +2 -2
- package/docs/markdown/functions/IsPhoneNumber.md +2 -2
- package/docs/markdown/functions/IsPort.md +2 -2
- package/docs/markdown/functions/IsString.md +2 -2
- package/docs/markdown/functions/IsUUID.md +2 -2
- package/docs/markdown/functions/IsUrl.md +2 -2
- package/docs/markdown/functions/RxapForm.md +2 -2
- package/docs/markdown/functions/ToFormMethod.md +2 -2
- package/docs/markdown/functions/ToFormSubmitMethod.md +2 -2
- package/docs/markdown/functions/UseFormArrayControl.md +2 -2
- package/docs/markdown/functions/UseFormArrayGroup.md +2 -2
- package/docs/markdown/functions/UseFormControl.md +2 -2
- package/docs/markdown/functions/UseFormGroup.md +2 -2
- package/docs/markdown/functions/controlDisabled$.md +2 -2
- package/docs/markdown/functions/controlDisabledWhile.md +2 -2
- package/docs/markdown/functions/controlEnabled$.md +2 -2
- package/docs/markdown/functions/controlEnabledWhile.md +2 -2
- package/docs/markdown/functions/controlErrorChanges$.md +2 -2
- package/docs/markdown/functions/controlReadonly$.md +2 -2
- package/docs/markdown/functions/controlStatusChanges$.md +2 -2
- package/docs/markdown/functions/controlValueChanges$.md +2 -2
- package/docs/markdown/functions/disableControl.md +2 -2
- package/docs/markdown/functions/enableControl.md +2 -2
- package/docs/markdown/functions/hasErrorAndDirty.md +2 -2
- package/docs/markdown/functions/hasErrorAndTouched.md +2 -2
- package/docs/markdown/functions/isNumber-1.md +2 -2
- package/docs/markdown/functions/markAllDirty.md +2 -2
- package/docs/markdown/functions/markAllPristine.md +2 -2
- package/docs/markdown/functions/markAllUntouched.md +2 -2
- package/docs/markdown/functions/mergeControlValidators.md +2 -2
- package/docs/markdown/functions/selectControlValue$.md +2 -2
- package/docs/markdown/functions/validateControlOn.md +2 -2
- package/docs/markdown/globals.md +2 -3
- package/docs/markdown/interfaces/AbstractControl.md +122 -73
- package/docs/markdown/interfaces/AbstractControlOptions.md +6 -6
- package/docs/markdown/interfaces/BoxedValue.md +4 -4
- package/docs/markdown/interfaces/ComplexityOptions.md +12 -12
- package/docs/markdown/interfaces/ControlOptions.md +10 -10
- package/docs/markdown/interfaces/ControlSetValueOptions.md +4 -4
- package/docs/markdown/interfaces/FormArrayOptions.md +16 -16
- package/docs/markdown/interfaces/FormDefinition.md +7 -7
- package/docs/markdown/interfaces/FormDefinitionArray.md +70 -36
- package/docs/markdown/interfaces/FormDefinitionMetadata.md +15 -15
- package/docs/markdown/interfaces/FormGroupOptions.md +13 -13
- package/docs/markdown/interfaces/FormLoadFailedMethod.md +4 -4
- package/docs/markdown/interfaces/FormLoadMethod.md +4 -4
- package/docs/markdown/interfaces/FormLoadSuccessfulMethod.md +4 -4
- package/docs/markdown/interfaces/FormOptions.md +13 -13
- package/docs/markdown/interfaces/FormSubmitFailedMethod.md +4 -4
- package/docs/markdown/interfaces/FormSubmitMethod.md +4 -4
- package/docs/markdown/interfaces/FormSubmitSuccessfulMethod.md +4 -4
- package/docs/markdown/interfaces/InjectableValidator.md +4 -4
- package/docs/markdown/interfaces/IsNumberOptions.md +6 -6
- package/docs/markdown/interfaces/NgValidatorsErrors.md +9 -9
- package/docs/markdown/interfaces/RxapAbstractControlOptions.md +12 -12
- package/docs/markdown/interfaces/RxapAbstractControlOptionsWithDefinition.md +13 -13
- package/docs/markdown/type-aliases/AsyncValidator.md +2 -2
- package/docs/markdown/type-aliases/AsyncValidatorFn.md +2 -2
- package/docs/markdown/type-aliases/ChangeFn.md +2 -2
- package/docs/markdown/type-aliases/ControlEventOptions.md +2 -2
- package/docs/markdown/type-aliases/ControlInsertedFn.md +2 -2
- package/docs/markdown/type-aliases/ControlPath.md +2 -2
- package/docs/markdown/type-aliases/ControlRemovedFn.md +2 -2
- package/docs/markdown/type-aliases/ControlState.md +2 -2
- package/docs/markdown/type-aliases/EmitEvent.md +2 -2
- package/docs/markdown/type-aliases/ExtractAbstractControl.md +2 -2
- package/docs/markdown/type-aliases/ExtractStrings.md +2 -2
- package/docs/markdown/type-aliases/FormBuilderFn.md +2 -2
- package/docs/markdown/type-aliases/FormType.md +2 -2
- package/docs/markdown/type-aliases/KeyValueControls.md +2 -2
- package/docs/markdown/type-aliases/OnlySelf.md +2 -2
- package/docs/markdown/type-aliases/OrBoxedValue.md +2 -2
- package/docs/markdown/type-aliases/RxapAbstractControlOptions.md +2 -2
- package/docs/markdown/type-aliases/SetValueFn.md +2 -2
- package/docs/markdown/type-aliases/ValidationErrors.md +2 -2
- package/docs/markdown/type-aliases/Validator.md +2 -2
- package/docs/markdown/type-aliases/ValidatorFn.md +2 -2
- package/docs/markdown/type-aliases/ValidatorOrOpts.md +2 -2
- package/docs/markdown/variables/RXAP_FORM_CONTEXT.md +2 -2
- package/docs/markdown/variables/RXAP_FORM_DEFINITION.md +2 -2
- package/docs/markdown/variables/RXAP_FORM_DEFINITION_BUILDER.md +2 -2
- package/docs/markdown/variables/RXAP_FORM_INITIAL_STATE.md +2 -2
- package/docs/markdown/variables/RXAP_FORM_LOAD_FAILED_METHOD.md +2 -2
- package/docs/markdown/variables/RXAP_FORM_LOAD_METHOD.md +2 -2
- package/docs/markdown/variables/RXAP_FORM_LOAD_SUCCESSFUL_METHOD.md +2 -2
- package/docs/markdown/variables/RXAP_FORM_SUBMIT_FAILED_METHOD.md +2 -2
- package/docs/markdown/variables/RXAP_FORM_SUBMIT_METHOD.md +2 -2
- package/docs/markdown/variables/RXAP_FORM_SUBMIT_SUCCESSFUL_METHOD.md +2 -2
- package/docs/markdown/variables/RxapValidators.md +2 -2
- package/docs/wiki/Class.ControlValueAccessor.md +7 -7
- package/docs/wiki/Class.FormArrayControlManager.md +5 -5
- package/docs/wiki/Class.FormControlErrorDirective.md +7 -67
- package/docs/wiki/Class.FormControlMarkDirtyDirective.md +3 -11
- package/docs/wiki/Class.FormControlMarkPristineDirective.md +3 -11
- package/docs/wiki/Class.FormControlMarkTouchedDirective.md +3 -11
- package/docs/wiki/Class.FormControlMarkUntouchedDirective.md +3 -11
- package/docs/wiki/Class.FormControlNameDirective.md +37 -57
- package/docs/wiki/Class.FormDirective.md +254 -223
- package/docs/wiki/Class.FormGroupNameDirective.md +32 -46
- package/docs/wiki/Class.FormLoadedDirective.md +3 -61
- package/docs/wiki/Class.FormLoadingDirective.md +3 -61
- package/docs/wiki/Class.FormLoadingErrorDirective.md +3 -61
- package/docs/wiki/Class.FormResetDirective.md +14 -34
- package/docs/wiki/Class.FormSubmitDirective.md +32 -56
- package/docs/wiki/Class.FormSubmitFailedDirective.md +3 -61
- package/docs/wiki/Class.FormSubmitInvalidDirective.md +3 -61
- package/docs/wiki/Class.FormSubmitSuccessfulDirective.md +3 -61
- package/docs/wiki/Class.FormSubmittingDirective.md +3 -61
- package/docs/wiki/Class.ParentControlContainerDirective.md +1 -1
- package/docs/wiki/Class.RxapFormArray.md +131 -102
- package/docs/wiki/Class.RxapFormBuilder.md +3 -3
- package/docs/wiki/Class.RxapFormControl.md +126 -102
- package/docs/wiki/Class.RxapFormGroup.md +139 -116
- package/docs/wiki/Enumeration.MetadataKeys.md +9 -9
- package/docs/wiki/Function.ControlAsyncValidator.md +1 -1
- package/docs/wiki/Function.ControlChange.md +1 -1
- package/docs/wiki/Function.ControlSetValue.md +1 -1
- package/docs/wiki/Function.ControlValidator.md +1 -1
- package/docs/wiki/Function.IsArray.md +1 -1
- package/docs/wiki/Function.IsBoolean.md +1 -1
- package/docs/wiki/Function.IsComplex.md +1 -1
- package/docs/wiki/Function.IsDate.md +1 -1
- package/docs/wiki/Function.IsEmail.md +1 -1
- package/docs/wiki/Function.IsEnum.md +1 -1
- package/docs/wiki/Function.IsIP.md +1 -1
- package/docs/wiki/Function.IsInt.md +1 -1
- package/docs/wiki/Function.IsNumber.md +1 -1
- package/docs/wiki/Function.IsObject.md +1 -1
- package/docs/wiki/Function.IsPhoneNumber.md +1 -1
- package/docs/wiki/Function.IsPort.md +1 -1
- package/docs/wiki/Function.IsString.md +1 -1
- package/docs/wiki/Function.IsUUID.md +1 -1
- package/docs/wiki/Function.IsUrl.md +1 -1
- package/docs/wiki/Function.RxapForm.md +1 -1
- package/docs/wiki/Function.ToFormMethod.md +1 -1
- package/docs/wiki/Function.ToFormSubmitMethod.md +1 -1
- package/docs/wiki/Function.UseFormArrayControl.md +1 -1
- package/docs/wiki/Function.UseFormArrayGroup.md +1 -1
- package/docs/wiki/Function.UseFormControl.md +1 -1
- package/docs/wiki/Function.UseFormGroup.md +1 -1
- package/docs/wiki/Function._IsNumber.md +1 -1
- package/docs/wiki/Function.controlDisabled$.md +1 -1
- package/docs/wiki/Function.controlDisabledWhile.md +1 -1
- package/docs/wiki/Function.controlEnabled$.md +1 -1
- package/docs/wiki/Function.controlEnabledWhile.md +1 -1
- package/docs/wiki/Function.controlErrorChanges$.md +1 -1
- package/docs/wiki/Function.controlReadonly$.md +1 -1
- package/docs/wiki/Function.controlStatusChanges$.md +1 -1
- package/docs/wiki/Function.controlValueChanges$.md +1 -1
- package/docs/wiki/Function.disableControl.md +1 -1
- package/docs/wiki/Function.enableControl.md +1 -1
- package/docs/wiki/Function.hasErrorAndDirty.md +1 -1
- package/docs/wiki/Function.hasErrorAndTouched.md +1 -1
- package/docs/wiki/Function.isNumber.md +1 -1
- package/docs/wiki/Function.markAllDirty.md +1 -1
- package/docs/wiki/Function.markAllPristine.md +1 -1
- package/docs/wiki/Function.markAllUntouched.md +1 -1
- package/docs/wiki/Function.mergeControlValidators.md +1 -1
- package/docs/wiki/Function.selectControlValue$.md +1 -1
- package/docs/wiki/Function.validateControlOn.md +1 -1
- package/docs/wiki/Interface.AbstractControl.md +121 -72
- package/docs/wiki/Interface.AbstractControlOptions.md +5 -5
- package/docs/wiki/Interface.BoxedValue.md +3 -3
- package/docs/wiki/Interface.ComplexityOptions.md +11 -11
- package/docs/wiki/Interface.ControlOptions.md +9 -9
- package/docs/wiki/Interface.ControlSetValueOptions.md +3 -3
- package/docs/wiki/Interface.FormArrayOptions.md +15 -15
- package/docs/wiki/Interface.FormDefinition.md +6 -6
- package/docs/wiki/Interface.FormDefinitionArray.md +69 -35
- package/docs/wiki/Interface.FormDefinitionMetadata.md +14 -14
- package/docs/wiki/Interface.FormGroupOptions.md +12 -12
- package/docs/wiki/Interface.FormLoadFailedMethod.md +3 -3
- package/docs/wiki/Interface.FormLoadMethod.md +3 -3
- package/docs/wiki/Interface.FormLoadSuccessfulMethod.md +3 -3
- package/docs/wiki/Interface.FormOptions.md +12 -12
- package/docs/wiki/Interface.FormSubmitFailedMethod.md +3 -3
- package/docs/wiki/Interface.FormSubmitMethod.md +3 -3
- package/docs/wiki/Interface.FormSubmitSuccessfulMethod.md +3 -3
- package/docs/wiki/Interface.InjectableValidator.md +3 -3
- package/docs/wiki/Interface.IsNumberOptions.md +5 -5
- package/docs/wiki/Interface.NgValidatorsErrors.md +8 -8
- package/docs/wiki/Interface.RxapAbstractControlOptionsWithDefinition.md +12 -12
- package/docs/wiki/Interface._RxapAbstractControlOptions.md +11 -11
- package/docs/wiki/TypeAlias.AsyncValidator.md +1 -1
- package/docs/wiki/TypeAlias.AsyncValidatorFn.md +1 -1
- package/docs/wiki/TypeAlias.ChangeFn.md +1 -1
- package/docs/wiki/TypeAlias.ControlEventOptions.md +1 -1
- package/docs/wiki/TypeAlias.ControlInsertedFn.md +1 -1
- package/docs/wiki/TypeAlias.ControlPath.md +1 -1
- package/docs/wiki/TypeAlias.ControlRemovedFn.md +1 -1
- package/docs/wiki/TypeAlias.ControlState.md +1 -1
- package/docs/wiki/TypeAlias.EmitEvent.md +1 -1
- package/docs/wiki/TypeAlias.ExtractAbstractControl.md +1 -1
- package/docs/wiki/TypeAlias.ExtractStrings.md +1 -1
- package/docs/wiki/TypeAlias.FormBuilderFn.md +1 -1
- package/docs/wiki/TypeAlias.FormType.md +1 -1
- package/docs/wiki/TypeAlias.KeyValueControls.md +1 -1
- package/docs/wiki/TypeAlias.OnlySelf.md +1 -1
- package/docs/wiki/TypeAlias.OrBoxedValue.md +1 -1
- package/docs/wiki/TypeAlias.RxapAbstractControlOptions.md +1 -1
- package/docs/wiki/TypeAlias.SetValueFn.md +1 -1
- package/docs/wiki/TypeAlias.ValidationErrors.md +1 -1
- package/docs/wiki/TypeAlias.Validator.md +1 -1
- package/docs/wiki/TypeAlias.ValidatorFn.md +1 -1
- package/docs/wiki/TypeAlias.ValidatorOrOpts.md +1 -1
- package/docs/wiki/Variable.RXAP_FORM_CONTEXT.md +1 -1
- package/docs/wiki/Variable.RXAP_FORM_DEFINITION.md +1 -1
- package/docs/wiki/Variable.RXAP_FORM_DEFINITION_BUILDER.md +1 -1
- package/docs/wiki/Variable.RXAP_FORM_INITIAL_STATE.md +1 -1
- package/docs/wiki/Variable.RXAP_FORM_LOAD_FAILED_METHOD.md +1 -1
- package/docs/wiki/Variable.RXAP_FORM_LOAD_METHOD.md +1 -1
- package/docs/wiki/Variable.RXAP_FORM_LOAD_SUCCESSFUL_METHOD.md +1 -1
- package/docs/wiki/Variable.RXAP_FORM_SUBMIT_FAILED_METHOD.md +1 -1
- package/docs/wiki/Variable.RXAP_FORM_SUBMIT_METHOD.md +1 -1
- package/docs/wiki/Variable.RXAP_FORM_SUBMIT_SUCCESSFUL_METHOD.md +1 -1
- package/docs/wiki/Variable.RxapValidators.md +1 -1
- package/docs/wiki/_Sidebar.md +0 -1
- package/docs/wiki/globals.md +1 -2
- package/fesm2022/rxap-forms.mjs +1878 -2197
- package/fesm2022/rxap-forms.mjs.map +1 -1
- package/package.json +35 -30
- package/types/rxap-forms.d.ts +969 -0
- package/docs/html/classes/RxapFormsModule.html +0 -2
- package/docs/markdown/classes/RxapFormsModule.md +0 -19
- package/docs/wiki/Class.RxapFormsModule.md +0 -15
- package/index.d.ts +0 -55
- package/lib/control-actions.d.ts +0 -23
- package/lib/control-value-accessor.d.ts +0 -9
- package/lib/decorators/control-async-validator.d.ts +0 -1
- package/lib/decorators/control-change.d.ts +0 -1
- package/lib/decorators/control-set-value.d.ts +0 -5
- package/lib/decorators/control-validator.d.ts +0 -1
- package/lib/decorators/form.d.ts +0 -2
- package/lib/decorators/metadata-keys.d.ts +0 -10
- package/lib/decorators/use-form-array.d.ts +0 -4
- package/lib/decorators/use-form-control.d.ts +0 -2
- package/lib/decorators/use-form-group.d.ts +0 -3
- package/lib/directives/form-control-error.directive.d.ts +0 -22
- package/lib/directives/form-control-mark-dirty.directive.d.ts +0 -9
- package/lib/directives/form-control-mark-pristine.directive.d.ts +0 -9
- package/lib/directives/form-control-mark-touched.directive.d.ts +0 -9
- package/lib/directives/form-control-mark-untouched.directive.d.ts +0 -9
- package/lib/directives/form-control-name.directive.d.ts +0 -16
- package/lib/directives/form-group-name.directive.d.ts +0 -16
- package/lib/directives/form-loaded.directive.d.ts +0 -14
- package/lib/directives/form-loading-error.directive.d.ts +0 -16
- package/lib/directives/form-loading.directive.d.ts +0 -14
- package/lib/directives/form-reset.directive.d.ts +0 -11
- package/lib/directives/form-submit-failed.directive.d.ts +0 -16
- package/lib/directives/form-submit-invalid.directive.d.ts +0 -16
- package/lib/directives/form-submit-successful.directive.d.ts +0 -16
- package/lib/directives/form-submit.directive.d.ts +0 -22
- package/lib/directives/form-submitting.directive.d.ts +0 -14
- package/lib/directives/form.directive.d.ts +0 -62
- package/lib/directives/forms.module.d.ts +0 -23
- package/lib/directives/models.d.ts +0 -29
- package/lib/directives/parent-control-container.directive.d.ts +0 -5
- package/lib/directives/tokens.d.ts +0 -12
- package/lib/form-array.d.ts +0 -76
- package/lib/form-builder.d.ts +0 -96
- package/lib/form-control.d.ts +0 -64
- package/lib/form-group.d.ts +0 -89
- package/lib/model.d.ts +0 -81
- package/lib/tokens.d.ts +0 -3
- package/lib/types.d.ts +0 -100
- package/lib/validators/index.d.ts +0 -32
- package/lib/validators/is-array.d.ts +0 -4
- package/lib/validators/is-boolean.d.ts +0 -4
- package/lib/validators/is-complex.d.ts +0 -17
- package/lib/validators/is-date.d.ts +0 -4
- package/lib/validators/is-email.d.ts +0 -6
- package/lib/validators/is-enum.d.ts +0 -5
- package/lib/validators/is-int.d.ts +0 -6
- package/lib/validators/is-ip.d.ts +0 -5
- package/lib/validators/is-number.d.ts +0 -24
- package/lib/validators/is-object.d.ts +0 -4
- package/lib/validators/is-phone-number.d.ts +0 -7
- package/lib/validators/is-port.d.ts +0 -4
- package/lib/validators/is-string.d.ts +0 -4
- package/lib/validators/is-url.d.ts +0 -6
- package/lib/validators/is-uuid.d.ts +0 -5
|
@@ -120,13 +120,6 @@
|
|
|
120
120
|
|
|
121
121
|
|
|
122
122
|
|
|
123
|
-
<p class="comment">
|
|
124
|
-
<h3>Implements</h3>
|
|
125
|
-
</p>
|
|
126
|
-
<p class="comment">
|
|
127
|
-
<code>AfterViewInit</code>
|
|
128
|
-
<code>OnDestroy</code>
|
|
129
|
-
</p>
|
|
130
123
|
|
|
131
124
|
|
|
132
125
|
<section data-compodoc="block-metadata">
|
|
@@ -157,69 +150,15 @@
|
|
|
157
150
|
<tbody>
|
|
158
151
|
<tr>
|
|
159
152
|
<td class="col-md-4">
|
|
160
|
-
<code>constructor(
|
|
153
|
+
<code>constructor()</code>
|
|
161
154
|
</td>
|
|
162
155
|
</tr>
|
|
163
156
|
<tr>
|
|
164
157
|
<td class="col-md-4">
|
|
165
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
158
|
+
<div class="io-line">Defined in <a href="" data-line="14" class="link-to-prism">src/lib/directives/form-submit-failed.directive.ts:14</a></div>
|
|
166
159
|
</td>
|
|
167
160
|
</tr>
|
|
168
161
|
|
|
169
|
-
<tr>
|
|
170
|
-
<td class="col-md-4">
|
|
171
|
-
<div>
|
|
172
|
-
<b>Parameters :</b>
|
|
173
|
-
<table class="params">
|
|
174
|
-
<thead>
|
|
175
|
-
<tr>
|
|
176
|
-
<td>Name</td>
|
|
177
|
-
<td>Type</td>
|
|
178
|
-
<td>Optional</td>
|
|
179
|
-
</tr>
|
|
180
|
-
</thead>
|
|
181
|
-
<tbody>
|
|
182
|
-
<tr>
|
|
183
|
-
<td>formDirective</td>
|
|
184
|
-
|
|
185
|
-
<td>
|
|
186
|
-
<code><a href="../directives/FormDirective.html" target="_self" >FormDirective</a></code>
|
|
187
|
-
</td>
|
|
188
|
-
|
|
189
|
-
<td>
|
|
190
|
-
No
|
|
191
|
-
</td>
|
|
192
|
-
|
|
193
|
-
</tr>
|
|
194
|
-
<tr>
|
|
195
|
-
<td>template</td>
|
|
196
|
-
|
|
197
|
-
<td>
|
|
198
|
-
<code>TemplateRef<literal type></code>
|
|
199
|
-
</td>
|
|
200
|
-
|
|
201
|
-
<td>
|
|
202
|
-
No
|
|
203
|
-
</td>
|
|
204
|
-
|
|
205
|
-
</tr>
|
|
206
|
-
<tr>
|
|
207
|
-
<td>viewContainerRef</td>
|
|
208
|
-
|
|
209
|
-
<td>
|
|
210
|
-
<code>ViewContainerRef</code>
|
|
211
|
-
</td>
|
|
212
|
-
|
|
213
|
-
<td>
|
|
214
|
-
No
|
|
215
|
-
</td>
|
|
216
|
-
|
|
217
|
-
</tr>
|
|
218
|
-
</tbody>
|
|
219
|
-
</table>
|
|
220
|
-
</div>
|
|
221
|
-
</td>
|
|
222
|
-
</tr>
|
|
223
162
|
</tbody>
|
|
224
163
|
</table>
|
|
225
164
|
</section>
|
|
@@ -235,46 +174,31 @@
|
|
|
235
174
|
|
|
236
175
|
|
|
237
176
|
<div class="tab-pane fade tab-source-code" id="source">
|
|
238
|
-
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import {
|
|
239
|
-
|
|
240
|
-
Directive,
|
|
241
|
-
Inject,
|
|
242
|
-
OnDestroy,
|
|
243
|
-
TemplateRef,
|
|
244
|
-
ViewContainerRef,
|
|
245
|
-
} from '@angular/core';
|
|
246
|
-
import { Subscription } from 'rxjs';
|
|
247
|
-
import { tap } from 'rxjs/operators';
|
|
177
|
+
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import { Directive, effect, inject, TemplateRef, untracked, ViewContainerRef } from '@angular/core';
|
|
178
|
+
import { toSignal } from '@angular/core/rxjs-interop';
|
|
248
179
|
import { FormDirective } from './form.directive';
|
|
249
180
|
|
|
250
181
|
@Directive({
|
|
251
182
|
selector: '[rxapFormSubmitFailed]',
|
|
252
183
|
standalone: true,
|
|
253
184
|
})
|
|
254
|
-
export class FormSubmitFailedDirective
|
|
185
|
+
export class FormSubmitFailedDirective {
|
|
186
|
+
private readonly formDirective = inject<FormDirective>(FormDirective);
|
|
187
|
+
private readonly template = inject<TemplateRef<{ $implicit: Error }>>(TemplateRef);
|
|
188
|
+
private readonly viewContainerRef = inject<ViewContainerRef>(ViewContainerRef);
|
|
255
189
|
|
|
256
|
-
private
|
|
190
|
+
private readonly error = toSignal(this.formDirective.submitError$, { initialValue: null });
|
|
257
191
|
|
|
258
|
-
constructor(
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
) {
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
public ngAfterViewInit() {
|
|
266
|
-
this.subscription = this.formDirective.submitError$.pipe(
|
|
267
|
-
tap(error => {
|
|
192
|
+
constructor() {
|
|
193
|
+
effect(() => {
|
|
194
|
+
const error = this.error();
|
|
195
|
+
untracked(() => {
|
|
268
196
|
this.viewContainerRef.clear();
|
|
269
197
|
if (error !== null) {
|
|
270
198
|
this.viewContainerRef.createEmbeddedView(this.template, { $implicit: error });
|
|
271
199
|
}
|
|
272
|
-
})
|
|
273
|
-
)
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
public ngOnDestroy() {
|
|
277
|
-
this.subscription?.unsubscribe();
|
|
200
|
+
});
|
|
201
|
+
});
|
|
278
202
|
}
|
|
279
203
|
|
|
280
204
|
}
|
|
@@ -120,13 +120,6 @@
|
|
|
120
120
|
|
|
121
121
|
|
|
122
122
|
|
|
123
|
-
<p class="comment">
|
|
124
|
-
<h3>Implements</h3>
|
|
125
|
-
</p>
|
|
126
|
-
<p class="comment">
|
|
127
|
-
<code>AfterViewInit</code>
|
|
128
|
-
<code>OnDestroy</code>
|
|
129
|
-
</p>
|
|
130
123
|
|
|
131
124
|
|
|
132
125
|
<section data-compodoc="block-metadata">
|
|
@@ -157,69 +150,15 @@
|
|
|
157
150
|
<tbody>
|
|
158
151
|
<tr>
|
|
159
152
|
<td class="col-md-4">
|
|
160
|
-
<code>constructor(
|
|
153
|
+
<code>constructor()</code>
|
|
161
154
|
</td>
|
|
162
155
|
</tr>
|
|
163
156
|
<tr>
|
|
164
157
|
<td class="col-md-4">
|
|
165
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
158
|
+
<div class="io-line">Defined in <a href="" data-line="12" class="link-to-prism">src/lib/directives/form-submit-invalid.directive.ts:12</a></div>
|
|
166
159
|
</td>
|
|
167
160
|
</tr>
|
|
168
161
|
|
|
169
|
-
<tr>
|
|
170
|
-
<td class="col-md-4">
|
|
171
|
-
<div>
|
|
172
|
-
<b>Parameters :</b>
|
|
173
|
-
<table class="params">
|
|
174
|
-
<thead>
|
|
175
|
-
<tr>
|
|
176
|
-
<td>Name</td>
|
|
177
|
-
<td>Type</td>
|
|
178
|
-
<td>Optional</td>
|
|
179
|
-
</tr>
|
|
180
|
-
</thead>
|
|
181
|
-
<tbody>
|
|
182
|
-
<tr>
|
|
183
|
-
<td>formDirective</td>
|
|
184
|
-
|
|
185
|
-
<td>
|
|
186
|
-
<code><a href="../directives/FormDirective.html" target="_self" >FormDirective</a></code>
|
|
187
|
-
</td>
|
|
188
|
-
|
|
189
|
-
<td>
|
|
190
|
-
No
|
|
191
|
-
</td>
|
|
192
|
-
|
|
193
|
-
</tr>
|
|
194
|
-
<tr>
|
|
195
|
-
<td>template</td>
|
|
196
|
-
|
|
197
|
-
<td>
|
|
198
|
-
<code>TemplateRef<literal type></code>
|
|
199
|
-
</td>
|
|
200
|
-
|
|
201
|
-
<td>
|
|
202
|
-
No
|
|
203
|
-
</td>
|
|
204
|
-
|
|
205
|
-
</tr>
|
|
206
|
-
<tr>
|
|
207
|
-
<td>viewContainerRef</td>
|
|
208
|
-
|
|
209
|
-
<td>
|
|
210
|
-
<code>ViewContainerRef</code>
|
|
211
|
-
</td>
|
|
212
|
-
|
|
213
|
-
<td>
|
|
214
|
-
No
|
|
215
|
-
</td>
|
|
216
|
-
|
|
217
|
-
</tr>
|
|
218
|
-
</tbody>
|
|
219
|
-
</table>
|
|
220
|
-
</div>
|
|
221
|
-
</td>
|
|
222
|
-
</tr>
|
|
223
162
|
</tbody>
|
|
224
163
|
</table>
|
|
225
164
|
</section>
|
|
@@ -235,44 +174,24 @@
|
|
|
235
174
|
|
|
236
175
|
|
|
237
176
|
<div class="tab-pane fade tab-source-code" id="source">
|
|
238
|
-
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import {
|
|
239
|
-
|
|
240
|
-
Directive,
|
|
241
|
-
Inject,
|
|
242
|
-
OnDestroy,
|
|
243
|
-
TemplateRef,
|
|
244
|
-
ViewContainerRef,
|
|
245
|
-
} from '@angular/core';
|
|
246
|
-
import { Subscription } from 'rxjs';
|
|
247
|
-
import { tap } from 'rxjs/operators';
|
|
177
|
+
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import { Directive, inject, TemplateRef, ViewContainerRef } from '@angular/core';
|
|
178
|
+
import { outputToObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
248
179
|
import { FormDirective } from './form.directive';
|
|
249
180
|
|
|
250
181
|
@Directive({
|
|
251
182
|
selector: '[rxapFormSubmitInvalid]',
|
|
252
183
|
standalone: true,
|
|
253
184
|
})
|
|
254
|
-
export class FormSubmitInvalidDirective
|
|
255
|
-
|
|
256
|
-
private
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
public ngAfterViewInit() {
|
|
266
|
-
this.subscription = this.formDirective.invalidSubmit.pipe(
|
|
267
|
-
tap(result => {
|
|
268
|
-
this.viewContainerRef.clear();
|
|
269
|
-
this.viewContainerRef.createEmbeddedView(this.template, { $implicit: result });
|
|
270
|
-
}),
|
|
271
|
-
).subscribe();
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
public ngOnDestroy() {
|
|
275
|
-
this.subscription?.unsubscribe();
|
|
185
|
+
export class FormSubmitInvalidDirective {
|
|
186
|
+
private readonly formDirective = inject<FormDirective>(FormDirective);
|
|
187
|
+
private readonly template = inject<TemplateRef<{ $implicit: any }>>(TemplateRef);
|
|
188
|
+
private readonly viewContainerRef = inject<ViewContainerRef>(ViewContainerRef);
|
|
189
|
+
|
|
190
|
+
constructor() {
|
|
191
|
+
outputToObservable(this.formDirective.invalidSubmit).pipe(takeUntilDestroyed()).subscribe(result => {
|
|
192
|
+
this.viewContainerRef.clear();
|
|
193
|
+
this.viewContainerRef.createEmbeddedView(this.template, { $implicit: result });
|
|
194
|
+
});
|
|
276
195
|
}
|
|
277
196
|
|
|
278
197
|
}
|
|
@@ -120,13 +120,6 @@
|
|
|
120
120
|
|
|
121
121
|
|
|
122
122
|
|
|
123
|
-
<p class="comment">
|
|
124
|
-
<h3>Implements</h3>
|
|
125
|
-
</p>
|
|
126
|
-
<p class="comment">
|
|
127
|
-
<code>AfterViewInit</code>
|
|
128
|
-
<code>OnDestroy</code>
|
|
129
|
-
</p>
|
|
130
123
|
|
|
131
124
|
|
|
132
125
|
<section data-compodoc="block-metadata">
|
|
@@ -157,69 +150,15 @@
|
|
|
157
150
|
<tbody>
|
|
158
151
|
<tr>
|
|
159
152
|
<td class="col-md-4">
|
|
160
|
-
<code>constructor(
|
|
153
|
+
<code>constructor()</code>
|
|
161
154
|
</td>
|
|
162
155
|
</tr>
|
|
163
156
|
<tr>
|
|
164
157
|
<td class="col-md-4">
|
|
165
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
158
|
+
<div class="io-line">Defined in <a href="" data-line="12" class="link-to-prism">src/lib/directives/form-submit-successful.directive.ts:12</a></div>
|
|
166
159
|
</td>
|
|
167
160
|
</tr>
|
|
168
161
|
|
|
169
|
-
<tr>
|
|
170
|
-
<td class="col-md-4">
|
|
171
|
-
<div>
|
|
172
|
-
<b>Parameters :</b>
|
|
173
|
-
<table class="params">
|
|
174
|
-
<thead>
|
|
175
|
-
<tr>
|
|
176
|
-
<td>Name</td>
|
|
177
|
-
<td>Type</td>
|
|
178
|
-
<td>Optional</td>
|
|
179
|
-
</tr>
|
|
180
|
-
</thead>
|
|
181
|
-
<tbody>
|
|
182
|
-
<tr>
|
|
183
|
-
<td>formDirective</td>
|
|
184
|
-
|
|
185
|
-
<td>
|
|
186
|
-
<code><a href="../directives/FormDirective.html" target="_self" >FormDirective</a></code>
|
|
187
|
-
</td>
|
|
188
|
-
|
|
189
|
-
<td>
|
|
190
|
-
No
|
|
191
|
-
</td>
|
|
192
|
-
|
|
193
|
-
</tr>
|
|
194
|
-
<tr>
|
|
195
|
-
<td>template</td>
|
|
196
|
-
|
|
197
|
-
<td>
|
|
198
|
-
<code>TemplateRef<literal type></code>
|
|
199
|
-
</td>
|
|
200
|
-
|
|
201
|
-
<td>
|
|
202
|
-
No
|
|
203
|
-
</td>
|
|
204
|
-
|
|
205
|
-
</tr>
|
|
206
|
-
<tr>
|
|
207
|
-
<td>viewContainerRef</td>
|
|
208
|
-
|
|
209
|
-
<td>
|
|
210
|
-
<code>ViewContainerRef</code>
|
|
211
|
-
</td>
|
|
212
|
-
|
|
213
|
-
<td>
|
|
214
|
-
No
|
|
215
|
-
</td>
|
|
216
|
-
|
|
217
|
-
</tr>
|
|
218
|
-
</tbody>
|
|
219
|
-
</table>
|
|
220
|
-
</div>
|
|
221
|
-
</td>
|
|
222
|
-
</tr>
|
|
223
162
|
</tbody>
|
|
224
163
|
</table>
|
|
225
164
|
</section>
|
|
@@ -235,44 +174,24 @@
|
|
|
235
174
|
|
|
236
175
|
|
|
237
176
|
<div class="tab-pane fade tab-source-code" id="source">
|
|
238
|
-
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import {
|
|
239
|
-
|
|
240
|
-
Directive,
|
|
241
|
-
Inject,
|
|
242
|
-
OnDestroy,
|
|
243
|
-
TemplateRef,
|
|
244
|
-
ViewContainerRef,
|
|
245
|
-
} from '@angular/core';
|
|
246
|
-
import { Subscription } from 'rxjs';
|
|
247
|
-
import { tap } from 'rxjs/operators';
|
|
177
|
+
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import { Directive, inject, TemplateRef, ViewContainerRef } from '@angular/core';
|
|
178
|
+
import { outputToObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
248
179
|
import { FormDirective } from './form.directive';
|
|
249
180
|
|
|
250
181
|
@Directive({
|
|
251
182
|
selector: '[rxapFormSubmitSuccessful]',
|
|
252
183
|
standalone: true,
|
|
253
184
|
})
|
|
254
|
-
export class FormSubmitSuccessfulDirective
|
|
255
|
-
|
|
256
|
-
private
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
public ngAfterViewInit() {
|
|
266
|
-
this.subscription = this.formDirective.submitSuccessful$.pipe(
|
|
267
|
-
tap(result => {
|
|
268
|
-
this.viewContainerRef.clear();
|
|
269
|
-
this.viewContainerRef.createEmbeddedView(this.template, { $implicit: result });
|
|
270
|
-
}),
|
|
271
|
-
).subscribe();
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
public ngOnDestroy() {
|
|
275
|
-
this.subscription?.unsubscribe();
|
|
185
|
+
export class FormSubmitSuccessfulDirective {
|
|
186
|
+
private readonly formDirective = inject<FormDirective>(FormDirective);
|
|
187
|
+
private readonly template = inject<TemplateRef<{ $implicit: any }>>(TemplateRef);
|
|
188
|
+
private readonly viewContainerRef = inject<ViewContainerRef>(ViewContainerRef);
|
|
189
|
+
|
|
190
|
+
constructor() {
|
|
191
|
+
outputToObservable(this.formDirective.submitSuccessful$).pipe(takeUntilDestroyed()).subscribe(result => {
|
|
192
|
+
this.viewContainerRef.clear();
|
|
193
|
+
this.viewContainerRef.createEmbeddedView(this.template, { $implicit: result });
|
|
194
|
+
});
|
|
276
195
|
}
|
|
277
196
|
|
|
278
197
|
}
|
|
@@ -120,13 +120,6 @@
|
|
|
120
120
|
|
|
121
121
|
|
|
122
122
|
|
|
123
|
-
<p class="comment">
|
|
124
|
-
<h3>Implements</h3>
|
|
125
|
-
</p>
|
|
126
|
-
<p class="comment">
|
|
127
|
-
<code>AfterViewInit</code>
|
|
128
|
-
<code>OnDestroy</code>
|
|
129
|
-
</p>
|
|
130
123
|
|
|
131
124
|
|
|
132
125
|
<section data-compodoc="block-metadata">
|
|
@@ -157,69 +150,15 @@
|
|
|
157
150
|
<tbody>
|
|
158
151
|
<tr>
|
|
159
152
|
<td class="col-md-4">
|
|
160
|
-
<code>constructor(
|
|
153
|
+
<code>constructor()</code>
|
|
161
154
|
</td>
|
|
162
155
|
</tr>
|
|
163
156
|
<tr>
|
|
164
157
|
<td class="col-md-4">
|
|
165
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
158
|
+
<div class="io-line">Defined in <a href="" data-line="14" class="link-to-prism">src/lib/directives/form-submitting.directive.ts:14</a></div>
|
|
166
159
|
</td>
|
|
167
160
|
</tr>
|
|
168
161
|
|
|
169
|
-
<tr>
|
|
170
|
-
<td class="col-md-4">
|
|
171
|
-
<div>
|
|
172
|
-
<b>Parameters :</b>
|
|
173
|
-
<table class="params">
|
|
174
|
-
<thead>
|
|
175
|
-
<tr>
|
|
176
|
-
<td>Name</td>
|
|
177
|
-
<td>Type</td>
|
|
178
|
-
<td>Optional</td>
|
|
179
|
-
</tr>
|
|
180
|
-
</thead>
|
|
181
|
-
<tbody>
|
|
182
|
-
<tr>
|
|
183
|
-
<td>formDirective</td>
|
|
184
|
-
|
|
185
|
-
<td>
|
|
186
|
-
<code><a href="../directives/FormDirective.html" target="_self" >FormDirective</a></code>
|
|
187
|
-
</td>
|
|
188
|
-
|
|
189
|
-
<td>
|
|
190
|
-
No
|
|
191
|
-
</td>
|
|
192
|
-
|
|
193
|
-
</tr>
|
|
194
|
-
<tr>
|
|
195
|
-
<td>template</td>
|
|
196
|
-
|
|
197
|
-
<td>
|
|
198
|
-
<code>TemplateRef<void></code>
|
|
199
|
-
</td>
|
|
200
|
-
|
|
201
|
-
<td>
|
|
202
|
-
No
|
|
203
|
-
</td>
|
|
204
|
-
|
|
205
|
-
</tr>
|
|
206
|
-
<tr>
|
|
207
|
-
<td>viewContainerRef</td>
|
|
208
|
-
|
|
209
|
-
<td>
|
|
210
|
-
<code>ViewContainerRef</code>
|
|
211
|
-
</td>
|
|
212
|
-
|
|
213
|
-
<td>
|
|
214
|
-
No
|
|
215
|
-
</td>
|
|
216
|
-
|
|
217
|
-
</tr>
|
|
218
|
-
</tbody>
|
|
219
|
-
</table>
|
|
220
|
-
</div>
|
|
221
|
-
</td>
|
|
222
|
-
</tr>
|
|
223
162
|
</tbody>
|
|
224
163
|
</table>
|
|
225
164
|
</section>
|
|
@@ -235,50 +174,31 @@
|
|
|
235
174
|
|
|
236
175
|
|
|
237
176
|
<div class="tab-pane fade tab-source-code" id="source">
|
|
238
|
-
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import {
|
|
239
|
-
|
|
240
|
-
Directive,
|
|
241
|
-
Inject,
|
|
242
|
-
OnDestroy,
|
|
243
|
-
TemplateRef,
|
|
244
|
-
ViewContainerRef,
|
|
245
|
-
} from '@angular/core';
|
|
246
|
-
import { Subscription } from 'rxjs';
|
|
247
|
-
import {
|
|
248
|
-
distinctUntilChanged,
|
|
249
|
-
tap,
|
|
250
|
-
} from 'rxjs/operators';
|
|
177
|
+
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import { Directive, effect, inject, TemplateRef, untracked, ViewContainerRef } from '@angular/core';
|
|
178
|
+
import { toSignal } from '@angular/core/rxjs-interop';
|
|
251
179
|
import { FormDirective } from './form.directive';
|
|
252
180
|
|
|
253
181
|
@Directive({
|
|
254
182
|
selector: '[rxapFormSubmitting]',
|
|
255
183
|
standalone: true,
|
|
256
184
|
})
|
|
257
|
-
export class FormSubmittingDirective
|
|
185
|
+
export class FormSubmittingDirective {
|
|
186
|
+
private readonly formDirective = inject<FormDirective>(FormDirective);
|
|
187
|
+
private readonly template = inject<TemplateRef<void>>(TemplateRef);
|
|
188
|
+
private readonly viewContainerRef = inject<ViewContainerRef>(ViewContainerRef);
|
|
258
189
|
|
|
259
|
-
private
|
|
190
|
+
private readonly state = toSignal(this.formDirective.submitting$, { initialValue: false });
|
|
260
191
|
|
|
261
|
-
constructor(
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
) {
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
public ngAfterViewInit() {
|
|
269
|
-
this.subscription = this.formDirective.submitting$.pipe(
|
|
270
|
-
distinctUntilChanged(),
|
|
271
|
-
tap(loading => {
|
|
192
|
+
constructor() {
|
|
193
|
+
effect(() => {
|
|
194
|
+
const active = this.state();
|
|
195
|
+
untracked(() => {
|
|
272
196
|
this.viewContainerRef.clear();
|
|
273
|
-
if (
|
|
197
|
+
if (active) {
|
|
274
198
|
this.viewContainerRef.createEmbeddedView(this.template);
|
|
275
199
|
}
|
|
276
|
-
})
|
|
277
|
-
)
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
public ngOnDestroy() {
|
|
281
|
-
this.subscription?.unsubscribe();
|
|
200
|
+
});
|
|
201
|
+
});
|
|
282
202
|
}
|
|
283
203
|
|
|
284
204
|
}
|