@rxap/form-system 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 +40 -0
- package/compodoc/changelog.html +38 -0
- package/compodoc/classes/ExtractOptionsDataSourceMixin.html +24 -80
- package/compodoc/classes/ExtractRemoteMethodsMixin.html +36 -52
- package/compodoc/dependencies.html +17 -17
- package/compodoc/directives/AbstractOptionsFromMethodDirective.html +1354 -0
- package/compodoc/directives/AutocompleteOptionsFromMethodDirective.html +376 -229
- package/compodoc/directives/ControlHideShowDirective.html +43 -152
- package/compodoc/directives/ForFormArrayItemsDirective.html +6 -101
- package/compodoc/directives/FormArrayAddItemButtonDirective.html +84 -222
- package/compodoc/directives/FormArrayItemButton.html +182 -200
- package/compodoc/directives/FormArrayItemRemoveButtonDirective.html +230 -211
- package/compodoc/directives/FormArrayItemRestoreButtonDirective.html +188 -158
- package/compodoc/directives/FormArrayRemovableDirective.html +39 -61
- package/compodoc/directives/FormSystemControlDirective.html +64 -148
- package/compodoc/directives/InputSelectOptionsDirective.html +390 -268
- package/compodoc/directives/IsEqualToDirective.html +61 -117
- package/compodoc/directives/IsSelectableValueDirective.html +50 -204
- package/compodoc/directives/OptionsFromMethodDirective.html +380 -164
- package/compodoc/directives/OptionsFromRemoteMethodDirective.html +123 -212
- package/compodoc/graph/dependencies.svg +4 -70
- package/compodoc/injectables/ControlDataSource.html +4 -10
- package/compodoc/injectables/NoopResolveMethod.html +48 -40
- package/compodoc/injectables/SubmitContextFormAdapter.html +4 -9
- package/compodoc/interfaces/AutocompleteOptionsFromMethodDirectiveParameters.html +46 -38
- package/compodoc/interfaces/AutocompleteOptionsFromMethodDirectiveSettings.html +46 -38
- package/compodoc/interfaces/AutocompleteOptionsFromRemoteMethodTemplateContext.html +46 -38
- package/compodoc/interfaces/ControlHideShowOptions.html +10 -30
- package/compodoc/interfaces/ForFormArrayItemsDirectiveContext.html +6 -17
- package/compodoc/interfaces/InputSelectOptionsSettings.html +26 -49
- package/compodoc/interfaces/InputSelectOptionsTemplateContext.html +26 -49
- package/compodoc/interfaces/OptionsFromMethodDirectiveSettings.html +63 -45
- package/compodoc/interfaces/OptionsFromMethodTemplateContext.html +63 -45
- package/compodoc/interfaces/OptionsFromRemoteMethodTemplateContext.html +34 -50
- package/compodoc/js/menu-wc.js +3 -32
- 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 +2 -114
- package/compodoc/properties.html +1 -1
- package/docs/documentation.json +9603 -7779
- 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/AbstractOptionsFromMethodDirective.html +38 -0
- package/docs/html/classes/AutocompleteOptionsFromMethodDirective.html +19 -16
- package/docs/html/classes/ControlDataSource.html +13 -13
- package/docs/html/classes/ControlHideShowDirective.html +5 -5
- package/docs/html/classes/ExtractControlFromParentMixin.html +2 -2
- package/docs/html/classes/ExtractControlMixin.html +2 -2
- package/docs/html/classes/ExtractDataSourcesMixin.html +2 -2
- package/docs/html/classes/ExtractFormDefinitionMixin.html +2 -2
- package/docs/html/classes/ExtractFunctionMixin.html +2 -2
- package/docs/html/classes/ExtractFunctionsMixin.html +2 -2
- package/docs/html/classes/ExtractIsValueFunctionMixin.html +2 -2
- package/docs/html/classes/ExtractMethodMixin.html +2 -2
- package/docs/html/classes/ExtractMethodsMixin.html +2 -2
- package/docs/html/classes/ExtractOptionsDataSourceMixin.html +2 -4
- package/docs/html/classes/ExtractOptionsMethodMixin.html +2 -2
- package/docs/html/classes/ExtractRemoteMethodsMixin.html +2 -2
- package/docs/html/classes/ExtractResolveMethodMixin.html +2 -2
- package/docs/html/classes/ExtractToDisplayFunctionMixin.html +2 -2
- package/docs/html/classes/ForFormArrayItemsDirective.html +4 -4
- package/docs/html/classes/FormArrayAddItemButtonDirective.html +4 -4
- package/docs/html/classes/FormArrayItemButton.html +4 -4
- package/docs/html/classes/FormArrayItemRemoveButtonDirective.html +5 -5
- package/docs/html/classes/FormArrayItemRestoreButtonDirective.html +4 -4
- package/docs/html/classes/FormArrayRemovableDirective.html +4 -4
- package/docs/html/classes/FormSystemControlDirective.html +8 -8
- package/docs/html/classes/InputSelectOptionsDirective.html +10 -7
- package/docs/html/classes/IsEqualToDirective.html +5 -5
- package/docs/html/classes/IsSelectableValueDirective.html +4 -5
- package/docs/html/classes/NoopResolveMethod.html +2 -2
- package/docs/html/classes/OptionsFromMethodDirective.html +24 -24
- package/docs/html/classes/OptionsFromRemoteMethodDirective.html +5 -11
- package/docs/html/classes/RxapFormSystemError.html +6 -5
- package/docs/html/classes/SubmitContextFormAdapter.html +10 -10
- package/docs/html/classes/TestNgControl.html +26 -26
- package/docs/html/enums/FormSystemMetadataKeys.html +2 -2
- package/docs/html/functions/ApplyUseFunctionAdapters.html +1 -1
- package/docs/html/functions/ApplyUseMethodAdapters.html +1 -1
- package/docs/html/functions/ComposeOptionsTransformers.html +1 -1
- package/docs/html/functions/FormContextFromActivatedRouteFactory.html +1 -1
- package/docs/html/functions/ResolveByUuidParameter.html +1 -1
- package/docs/html/functions/ResolveByUuidResultFactory.html +1 -1
- package/docs/html/functions/SubmitContextFormAdapterFactory.html +1 -1
- package/docs/html/functions/UseAutocompleteIsValueFunction.html +1 -1
- package/docs/html/functions/UseAutocompleteOptionsMethod.html +1 -1
- package/docs/html/functions/UseAutocompleteResolveMethod.html +1 -1
- package/docs/html/functions/UseAutocompleteToDisplayFunction.html +1 -1
- package/docs/html/functions/UseComponent.html +1 -1
- package/docs/html/functions/UseDataSource.html +1 -1
- package/docs/html/functions/UseFormComponent.html +2 -2
- package/docs/html/functions/UseFunction.html +1 -1
- package/docs/html/functions/UseHideFunction.html +1 -1
- package/docs/html/functions/UseIsValueFunction.html +1 -1
- package/docs/html/functions/UseMethod.html +1 -1
- package/docs/html/functions/UseOptionsDataSource.html +1 -1
- package/docs/html/functions/UseOptionsMethod.html +1 -1
- package/docs/html/functions/UseOptionsRemoteMethod.html +1 -1
- package/docs/html/functions/UseRemoteMethod.html +1 -1
- package/docs/html/functions/UseResolveMethod.html +1 -1
- package/docs/html/functions/UseShowFunction.html +1 -1
- package/docs/html/functions/UseToDisplayFunction.html +1 -1
- package/docs/html/functions/controlDataSource-1.html +1 -1
- package/docs/html/hierarchy.html +1 -1
- package/docs/html/index.html +2 -2
- package/docs/html/interfaces/AutocompleteOptionsFromMethodDirectiveParameters.html +2 -2
- package/docs/html/interfaces/AutocompleteOptionsFromMethodDirectiveSettings.html +2 -2
- package/docs/html/interfaces/AutocompleteOptionsFromRemoteMethodTemplateContext.html +2 -2
- package/docs/html/interfaces/ControlHideShowOptions.html +2 -2
- package/docs/html/interfaces/ControlWithDataSource.html +2 -2
- package/docs/html/interfaces/ForFormArrayItemsDirectiveContext.html +2 -2
- package/docs/html/interfaces/InputSelectOptionsSettings.html +4 -4
- package/docs/html/interfaces/InputSelectOptionsTemplateContext.html +2 -2
- package/docs/html/interfaces/OptionsFromMethodDirectiveSettings.html +1 -1
- package/docs/html/interfaces/OptionsFromMethodTemplateContext.html +2 -2
- package/docs/html/interfaces/OptionsFromRemoteMethodTemplateContext.html +2 -2
- package/docs/html/interfaces/UseDataSourceSettings.html +2 -2
- package/docs/html/interfaces/UseDataSourceValue.html +3 -3
- package/docs/html/interfaces/UseFunctionConfig.html +2 -2
- package/docs/html/interfaces/UseFunctionDefinition.html +2 -2
- package/docs/html/interfaces/UseMethodConfig.html +2 -2
- package/docs/html/interfaces/UseMethodDefinition.html +2 -2
- package/docs/html/modules.html +1 -1
- package/docs/html/types/ControlHideShowFunction.html +1 -1
- package/docs/html/types/FunctionParameterAdapterFunction.html +1 -1
- package/docs/html/types/FunctionResultAdapterFunction.html +1 -1
- package/docs/html/types/MethodParameterAdapterFunction.html +1 -1
- package/docs/html/types/MethodResultAdapterFunction.html +1 -1
- package/docs/html/types/OptionsMethod.html +1 -1
- package/docs/html/types/UseFunctionType.html +1 -1
- package/docs/html/types/UseOptionsDataSourceSettings.html +1 -1
- package/docs/html/variables/DATA_SOURCE_NAME.html +1 -1
- package/docs/html/variables/IS_VALUE_FUNCTION_NAME.html +1 -1
- package/docs/html/variables/OPTIONS_METHOD_NAME.html +1 -1
- package/docs/html/variables/REMOTE_METHOD_NAME.html +1 -1
- package/docs/html/variables/RESOLVE_METHOD_NAME.html +1 -1
- package/docs/html/variables/RXAP_FORM_CONTROL_SOURCE.html +1 -1
- package/docs/html/variables/RXAP_FORM_SYSTEM_HIDE_METADATA.html +1 -1
- package/docs/html/variables/RXAP_FORM_SYSTEM_HIDE_SHOW_OPTIONS.html +1 -1
- package/docs/html/variables/RXAP_FORM_SYSTEM_SHOW_METADATA.html +1 -1
- package/docs/html/variables/RXAP_USE_FUNCTION.html +1 -1
- package/docs/html/variables/RXAP_USE_METHOD.html +1 -1
- package/docs/html/variables/RXAP_USE_REMOTE_METHOD.html +1 -1
- package/docs/html/variables/SUBMIT_CONTEXT_FORM_ADAPTER_METHOD.html +1 -1
- package/docs/html/variables/TO_DISPLAY_FUNCTION_NAME.html +1 -1
- package/docs/markdown/README.md +1 -1
- package/docs/markdown/classes/AbstractOptionsFromMethodDirective.md +436 -0
- package/docs/markdown/classes/AutocompleteOptionsFromMethodDirective.md +131 -124
- package/docs/markdown/classes/ControlDataSource.md +51 -51
- package/docs/markdown/classes/ControlHideShowDirective.md +11 -31
- package/docs/markdown/classes/ExtractControlFromParentMixin.md +3 -3
- package/docs/markdown/classes/ExtractControlMixin.md +6 -6
- package/docs/markdown/classes/ExtractDataSourcesMixin.md +3 -3
- package/docs/markdown/classes/ExtractFormDefinitionMixin.md +3 -3
- package/docs/markdown/classes/ExtractFunctionMixin.md +5 -5
- package/docs/markdown/classes/ExtractFunctionsMixin.md +3 -3
- package/docs/markdown/classes/ExtractIsValueFunctionMixin.md +11 -11
- package/docs/markdown/classes/ExtractMethodMixin.md +5 -5
- package/docs/markdown/classes/ExtractMethodsMixin.md +3 -3
- package/docs/markdown/classes/ExtractOptionsDataSourceMixin.md +20 -32
- package/docs/markdown/classes/ExtractOptionsMethodMixin.md +12 -12
- package/docs/markdown/classes/ExtractRemoteMethodsMixin.md +3 -3
- package/docs/markdown/classes/ExtractResolveMethodMixin.md +11 -11
- package/docs/markdown/classes/ExtractToDisplayFunctionMixin.md +11 -11
- package/docs/markdown/classes/ForFormArrayItemsDirective.md +5 -25
- package/docs/markdown/classes/FormArrayAddItemButtonDirective.md +14 -26
- package/docs/markdown/classes/FormArrayItemButton.md +21 -41
- package/docs/markdown/classes/FormArrayItemRemoveButtonDirective.md +28 -58
- package/docs/markdown/classes/FormArrayItemRestoreButtonDirective.md +25 -45
- package/docs/markdown/classes/FormArrayRemovableDirective.md +10 -18
- package/docs/markdown/classes/FormSystemControlDirective.md +14 -38
- package/docs/markdown/classes/InputSelectOptionsDirective.md +51 -76
- package/docs/markdown/classes/IsEqualToDirective.md +9 -19
- package/docs/markdown/classes/IsSelectableValueDirective.md +24 -48
- package/docs/markdown/classes/NoopResolveMethod.md +3 -3
- package/docs/markdown/classes/OptionsFromMethodDirective.md +140 -87
- package/docs/markdown/classes/OptionsFromRemoteMethodDirective.md +15 -70
- package/docs/markdown/classes/RxapFormSystemError.md +25 -13
- package/docs/markdown/classes/SubmitContextFormAdapter.md +32 -32
- package/docs/markdown/classes/TestNgControl.md +29 -29
- package/docs/markdown/enumerations/FormSystemMetadataKeys.md +6 -6
- package/docs/markdown/functions/ApplyUseFunctionAdapters.md +2 -2
- package/docs/markdown/functions/ApplyUseMethodAdapters.md +2 -2
- package/docs/markdown/functions/ComposeOptionsTransformers.md +2 -2
- package/docs/markdown/functions/FormContextFromActivatedRouteFactory.md +2 -2
- package/docs/markdown/functions/ResolveByUuidParameter.md +2 -2
- package/docs/markdown/functions/ResolveByUuidResultFactory.md +2 -2
- package/docs/markdown/functions/SubmitContextFormAdapterFactory.md +2 -2
- package/docs/markdown/functions/UseAutocompleteIsValueFunction.md +2 -2
- package/docs/markdown/functions/UseAutocompleteOptionsMethod.md +4 -4
- package/docs/markdown/functions/UseAutocompleteResolveMethod.md +2 -2
- package/docs/markdown/functions/UseAutocompleteToDisplayFunction.md +2 -2
- package/docs/markdown/functions/UseComponent.md +2 -2
- package/docs/markdown/functions/UseDataSource.md +2 -2
- package/docs/markdown/functions/UseFormComponent.md +2 -2
- package/docs/markdown/functions/UseFunction.md +2 -2
- package/docs/markdown/functions/UseHideFunction.md +2 -2
- package/docs/markdown/functions/UseIsValueFunction.md +3 -3
- package/docs/markdown/functions/UseMethod.md +2 -2
- package/docs/markdown/functions/UseOptionsDataSource.md +2 -2
- package/docs/markdown/functions/UseOptionsMethod.md +2 -2
- package/docs/markdown/functions/UseOptionsRemoteMethod.md +2 -2
- package/docs/markdown/functions/UseRemoteMethod.md +2 -2
- package/docs/markdown/functions/UseResolveMethod.md +3 -3
- package/docs/markdown/functions/UseShowFunction.md +2 -2
- package/docs/markdown/functions/UseToDisplayFunction.md +3 -3
- package/docs/markdown/functions/controlDataSource.md +2 -2
- package/docs/markdown/globals.md +3 -3
- package/docs/markdown/interfaces/AutocompleteOptionsFromMethodDirectiveParameters.md +3 -3
- package/docs/markdown/interfaces/AutocompleteOptionsFromMethodDirectiveSettings.md +3 -3
- package/docs/markdown/interfaces/AutocompleteOptionsFromRemoteMethodTemplateContext.md +3 -3
- package/docs/markdown/interfaces/ControlHideShowOptions.md +3 -3
- package/docs/markdown/interfaces/ControlWithDataSource.md +3 -3
- package/docs/markdown/interfaces/ForFormArrayItemsDirectiveContext.md +9 -9
- package/docs/markdown/interfaces/InputSelectOptionsSettings.md +6 -6
- package/docs/markdown/interfaces/InputSelectOptionsTemplateContext.md +3 -3
- package/docs/markdown/interfaces/OptionsFromMethodDirectiveSettings.md +2 -2
- package/docs/markdown/interfaces/OptionsFromMethodTemplateContext.md +3 -3
- package/docs/markdown/interfaces/OptionsFromRemoteMethodTemplateContext.md +3 -3
- package/docs/markdown/interfaces/UseDataSourceSettings.md +3 -3
- package/docs/markdown/interfaces/UseDataSourceValue.md +5 -5
- package/docs/markdown/interfaces/UseFunctionConfig.md +3 -3
- package/docs/markdown/interfaces/UseFunctionDefinition.md +4 -4
- package/docs/markdown/interfaces/UseMethodConfig.md +3 -3
- package/docs/markdown/interfaces/UseMethodDefinition.md +4 -4
- package/docs/markdown/type-aliases/ControlHideShowFunction.md +2 -2
- package/docs/markdown/type-aliases/FunctionParameterAdapterFunction.md +2 -2
- package/docs/markdown/type-aliases/FunctionResultAdapterFunction.md +2 -2
- package/docs/markdown/type-aliases/MethodParameterAdapterFunction.md +2 -2
- package/docs/markdown/type-aliases/MethodResultAdapterFunction.md +2 -2
- package/docs/markdown/type-aliases/OptionsMethod.md +2 -2
- package/docs/markdown/type-aliases/UseFunctionType.md +2 -2
- package/docs/markdown/type-aliases/UseOptionsDataSourceSettings.md +2 -2
- package/docs/markdown/variables/DATA_SOURCE_NAME.md +2 -2
- package/docs/markdown/variables/IS_VALUE_FUNCTION_NAME.md +2 -2
- package/docs/markdown/variables/OPTIONS_METHOD_NAME.md +2 -2
- package/docs/markdown/variables/REMOTE_METHOD_NAME.md +2 -2
- package/docs/markdown/variables/RESOLVE_METHOD_NAME.md +2 -2
- package/docs/markdown/variables/RXAP_FORM_CONTROL_SOURCE.md +2 -2
- package/docs/markdown/variables/RXAP_FORM_SYSTEM_HIDE_METADATA.md +2 -2
- package/docs/markdown/variables/RXAP_FORM_SYSTEM_HIDE_SHOW_OPTIONS.md +2 -2
- package/docs/markdown/variables/RXAP_FORM_SYSTEM_SHOW_METADATA.md +2 -2
- package/docs/markdown/variables/RXAP_USE_FUNCTION.md +2 -2
- package/docs/markdown/variables/RXAP_USE_METHOD.md +2 -2
- package/docs/markdown/variables/RXAP_USE_REMOTE_METHOD.md +2 -2
- package/docs/markdown/variables/SUBMIT_CONTEXT_FORM_ADAPTER_METHOD.md +2 -2
- package/docs/markdown/variables/TO_DISPLAY_FUNCTION_NAME.md +2 -2
- package/docs/wiki/Class.AbstractOptionsFromMethodDirective.md +432 -0
- package/docs/wiki/Class.AutocompleteOptionsFromMethodDirective.md +130 -123
- package/docs/wiki/Class.ControlDataSource.md +50 -50
- package/docs/wiki/Class.ControlHideShowDirective.md +10 -30
- package/docs/wiki/Class.ExtractControlFromParentMixin.md +2 -2
- package/docs/wiki/Class.ExtractControlMixin.md +5 -5
- package/docs/wiki/Class.ExtractDataSourcesMixin.md +2 -2
- package/docs/wiki/Class.ExtractFormDefinitionMixin.md +2 -2
- package/docs/wiki/Class.ExtractFunctionMixin.md +4 -4
- package/docs/wiki/Class.ExtractFunctionsMixin.md +2 -2
- package/docs/wiki/Class.ExtractIsValueFunctionMixin.md +10 -10
- package/docs/wiki/Class.ExtractMethodMixin.md +4 -4
- package/docs/wiki/Class.ExtractMethodsMixin.md +2 -2
- package/docs/wiki/Class.ExtractOptionsDataSourceMixin.md +19 -31
- package/docs/wiki/Class.ExtractOptionsMethodMixin.md +11 -11
- package/docs/wiki/Class.ExtractRemoteMethodsMixin.md +2 -2
- package/docs/wiki/Class.ExtractResolveMethodMixin.md +10 -10
- package/docs/wiki/Class.ExtractToDisplayFunctionMixin.md +10 -10
- package/docs/wiki/Class.ForFormArrayItemsDirective.md +4 -24
- package/docs/wiki/Class.FormArrayAddItemButtonDirective.md +13 -25
- package/docs/wiki/Class.FormArrayItemButton.md +20 -40
- package/docs/wiki/Class.FormArrayItemRemoveButtonDirective.md +27 -57
- package/docs/wiki/Class.FormArrayItemRestoreButtonDirective.md +24 -44
- package/docs/wiki/Class.FormArrayRemovableDirective.md +9 -17
- package/docs/wiki/Class.FormSystemControlDirective.md +13 -37
- package/docs/wiki/Class.InputSelectOptionsDirective.md +50 -75
- package/docs/wiki/Class.IsEqualToDirective.md +8 -18
- package/docs/wiki/Class.IsSelectableValueDirective.md +23 -47
- package/docs/wiki/Class.NoopResolveMethod.md +2 -2
- package/docs/wiki/Class.OptionsFromMethodDirective.md +139 -86
- package/docs/wiki/Class.OptionsFromRemoteMethodDirective.md +14 -69
- package/docs/wiki/Class.RxapFormSystemError.md +24 -12
- package/docs/wiki/Class.SubmitContextFormAdapter.md +31 -31
- package/docs/wiki/Class.TestNgControl.md +28 -28
- package/docs/wiki/Enumeration.FormSystemMetadataKeys.md +5 -5
- package/docs/wiki/Function.ApplyUseFunctionAdapters.md +1 -1
- package/docs/wiki/Function.ApplyUseMethodAdapters.md +1 -1
- package/docs/wiki/Function.ComposeOptionsTransformers.md +1 -1
- package/docs/wiki/Function.FormContextFromActivatedRouteFactory.md +1 -1
- package/docs/wiki/Function.ResolveByUuidParameter.md +1 -1
- package/docs/wiki/Function.ResolveByUuidResultFactory.md +1 -1
- package/docs/wiki/Function.SubmitContextFormAdapterFactory.md +1 -1
- package/docs/wiki/Function.UseAutocompleteIsValueFunction.md +1 -1
- package/docs/wiki/Function.UseAutocompleteOptionsMethod.md +3 -3
- package/docs/wiki/Function.UseAutocompleteResolveMethod.md +1 -1
- package/docs/wiki/Function.UseAutocompleteToDisplayFunction.md +1 -1
- package/docs/wiki/Function.UseComponent.md +1 -1
- package/docs/wiki/Function.UseDataSource.md +1 -1
- package/docs/wiki/Function.UseFormComponent.md +1 -1
- package/docs/wiki/Function.UseFunction.md +1 -1
- package/docs/wiki/Function.UseHideFunction.md +1 -1
- package/docs/wiki/Function.UseIsValueFunction.md +2 -2
- package/docs/wiki/Function.UseMethod.md +1 -1
- package/docs/wiki/Function.UseOptionsDataSource.md +1 -1
- package/docs/wiki/Function.UseOptionsMethod.md +1 -1
- package/docs/wiki/Function.UseOptionsRemoteMethod.md +1 -1
- package/docs/wiki/Function.UseRemoteMethod.md +1 -1
- package/docs/wiki/Function.UseResolveMethod.md +2 -2
- package/docs/wiki/Function.UseShowFunction.md +1 -1
- package/docs/wiki/Function.UseToDisplayFunction.md +2 -2
- package/docs/wiki/Function.controlDataSource.md +1 -1
- package/docs/wiki/Interface.AutocompleteOptionsFromMethodDirectiveParameters.md +2 -2
- package/docs/wiki/Interface.AutocompleteOptionsFromMethodDirectiveSettings.md +2 -2
- package/docs/wiki/Interface.AutocompleteOptionsFromRemoteMethodTemplateContext.md +2 -2
- package/docs/wiki/Interface.ControlHideShowOptions.md +2 -2
- package/docs/wiki/Interface.ControlWithDataSource.md +2 -2
- package/docs/wiki/Interface.ForFormArrayItemsDirectiveContext.md +8 -8
- package/docs/wiki/Interface.InputSelectOptionsSettings.md +5 -5
- package/docs/wiki/Interface.InputSelectOptionsTemplateContext.md +2 -2
- package/docs/wiki/Interface.OptionsFromMethodDirectiveSettings.md +1 -1
- package/docs/wiki/Interface.OptionsFromMethodTemplateContext.md +2 -2
- package/docs/wiki/Interface.OptionsFromRemoteMethodTemplateContext.md +2 -2
- package/docs/wiki/Interface.UseDataSourceSettings.md +2 -2
- package/docs/wiki/Interface.UseDataSourceValue.md +4 -4
- package/docs/wiki/Interface.UseFunctionConfig.md +2 -2
- package/docs/wiki/Interface.UseFunctionDefinition.md +3 -3
- package/docs/wiki/Interface.UseMethodConfig.md +2 -2
- package/docs/wiki/Interface.UseMethodDefinition.md +3 -3
- package/docs/wiki/TypeAlias.ControlHideShowFunction.md +1 -1
- package/docs/wiki/TypeAlias.FunctionParameterAdapterFunction.md +1 -1
- package/docs/wiki/TypeAlias.FunctionResultAdapterFunction.md +1 -1
- package/docs/wiki/TypeAlias.MethodParameterAdapterFunction.md +1 -1
- package/docs/wiki/TypeAlias.MethodResultAdapterFunction.md +1 -1
- package/docs/wiki/TypeAlias.OptionsMethod.md +1 -1
- package/docs/wiki/TypeAlias.UseFunctionType.md +1 -1
- package/docs/wiki/TypeAlias.UseOptionsDataSourceSettings.md +1 -1
- package/docs/wiki/Variable.DATA_SOURCE_NAME.md +1 -1
- package/docs/wiki/Variable.IS_VALUE_FUNCTION_NAME.md +1 -1
- package/docs/wiki/Variable.OPTIONS_METHOD_NAME.md +1 -1
- package/docs/wiki/Variable.REMOTE_METHOD_NAME.md +1 -1
- package/docs/wiki/Variable.RESOLVE_METHOD_NAME.md +1 -1
- package/docs/wiki/Variable.RXAP_FORM_CONTROL_SOURCE.md +1 -1
- package/docs/wiki/Variable.RXAP_FORM_SYSTEM_HIDE_METADATA.md +1 -1
- package/docs/wiki/Variable.RXAP_FORM_SYSTEM_HIDE_SHOW_OPTIONS.md +1 -1
- package/docs/wiki/Variable.RXAP_FORM_SYSTEM_SHOW_METADATA.md +1 -1
- package/docs/wiki/Variable.RXAP_USE_FUNCTION.md +1 -1
- package/docs/wiki/Variable.RXAP_USE_METHOD.md +1 -1
- package/docs/wiki/Variable.RXAP_USE_REMOTE_METHOD.md +1 -1
- package/docs/wiki/Variable.SUBMIT_CONTEXT_FORM_ADAPTER_METHOD.md +1 -1
- package/docs/wiki/Variable.TO_DISPLAY_FUNCTION_NAME.md +1 -1
- package/docs/wiki/_Sidebar.md +1 -1
- package/docs/wiki/globals.md +2 -2
- package/fesm2022/rxap-form-system.mjs +304 -450
- package/fesm2022/rxap-form-system.mjs.map +1 -1
- package/package.json +49 -44
- package/types/rxap-form-system.d.ts +628 -0
- package/docs/html/classes/FormSystemDirectivesModule.html +0 -2
- package/docs/markdown/classes/FormSystemDirectivesModule.md +0 -19
- package/docs/wiki/Class.FormSystemDirectivesModule.md +0 -15
- package/index.d.ts +0 -41
- package/lib/control-data-source.d.ts +0 -13
- package/lib/control-with-data-source.d.ts +0 -5
- package/lib/decorators/metadata-keys.d.ts +0 -6
- package/lib/decorators/use-component.d.ts +0 -3
- package/lib/decorators/use-data-source.d.ts +0 -14
- package/lib/decorators/use-form-component.d.ts +0 -7
- package/lib/directives/array/for-form-array-items.directive.d.ts +0 -26
- package/lib/directives/array/form-array-add-item-button.directive.d.ts +0 -20
- package/lib/directives/array/form-array-item-button.d.ts +0 -30
- package/lib/directives/array/form-array-item-remove-button.directive.d.ts +0 -16
- package/lib/directives/array/form-array-item-restore-button.directive.d.ts +0 -9
- package/lib/directives/array/form-array-removable.directive.d.ts +0 -19
- package/lib/directives/autocomplete-options-from-method.directive.d.ts +0 -76
- package/lib/directives/control-hide-show.directive.d.ts +0 -40
- package/lib/directives/form-directives.module.d.ts +0 -8
- package/lib/directives/input-select-options.directive.d.ts +0 -74
- package/lib/directives/options-from-method.directive.d.ts +0 -39
- package/lib/directives/options-from-remote-method.directive.d.ts +0 -38
- package/lib/directives/test-ng-control.d.ts +0 -7
- package/lib/error.d.ts +0 -4
- package/lib/form-context-from-activated-route.factory.d.ts +0 -2
- package/lib/form-system-control.directive.d.ts +0 -37
- package/lib/mixins/adapters.d.ts +0 -9
- package/lib/mixins/apply-use-function.adapters.d.ts +0 -3
- package/lib/mixins/apply-use-method.adapters.d.ts +0 -4
- package/lib/mixins/extract-control-from-parent.mixin.d.ts +0 -5
- package/lib/mixins/extract-control.mixin.d.ts +0 -9
- package/lib/mixins/extract-data-sources.mixin.d.ts +0 -5
- package/lib/mixins/extract-form-definition.mixin.d.ts +0 -4
- package/lib/mixins/extract-function.mixin.d.ts +0 -9
- package/lib/mixins/extract-functions.mixin.d.ts +0 -19
- package/lib/mixins/extract-is-value-function.mixin.d.ts +0 -13
- package/lib/mixins/extract-method.mixin.d.ts +0 -9
- package/lib/mixins/extract-methods.mixin.d.ts +0 -20
- package/lib/mixins/extract-options-data-source.mixin.d.ts +0 -26
- package/lib/mixins/extract-options-method.mixin.d.ts +0 -17
- package/lib/mixins/extract-resolve-method.mixin.d.ts +0 -16
- package/lib/mixins/extract-to-display-function.mixin.d.ts +0 -13
- package/lib/submit-context-form-adapter.factory.d.ts +0 -13
- package/lib/validators/is-equal-to.d.ts +0 -17
- package/lib/validators/is-selectable-value.directive.d.ts +0 -16
|
@@ -139,15 +139,17 @@
|
|
|
139
139
|
AfterViewInit,
|
|
140
140
|
ChangeDetectorRef,
|
|
141
141
|
Directive,
|
|
142
|
+
effect,
|
|
142
143
|
inject,
|
|
143
144
|
INJECTOR,
|
|
144
145
|
Injector,
|
|
145
|
-
|
|
146
|
-
|
|
146
|
+
input,
|
|
147
|
+
linkedSignal,
|
|
147
148
|
OnDestroy,
|
|
149
|
+
Signal,
|
|
148
150
|
signal,
|
|
149
|
-
SimpleChanges,
|
|
150
151
|
TemplateRef,
|
|
152
|
+
untracked,
|
|
151
153
|
ViewContainerRef,
|
|
152
154
|
} from '@angular/core';
|
|
153
155
|
import {
|
|
@@ -181,22 +183,21 @@ export interface OptionsFromMethodTemplateContext {
|
|
|
181
183
|
export interface OptionsFromMethodDirectiveSettings {
|
|
182
184
|
}
|
|
183
185
|
|
|
184
|
-
//
|
|
185
|
-
export interface
|
|
186
|
-
extends AfterViewInit,
|
|
186
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
187
|
+
export interface AbstractOptionsFromMethodDirective<Value = any, Parameters = any>
|
|
188
|
+
extends AfterViewInit, ExtractOptionsMethodMixin {
|
|
187
189
|
}
|
|
188
190
|
|
|
191
|
+
/**
|
|
192
|
+
* Shared implementation of the options from method directives. The concrete directives
|
|
193
|
+
* only declare the (aliased) signal inputs.
|
|
194
|
+
*/
|
|
189
195
|
@Mixin(ExtractOptionsMethodMixin)
|
|
190
|
-
@Directive(
|
|
191
|
-
|
|
192
|
-
selector: '[rxapOptionsFromMethod]',
|
|
193
|
-
standalone: true,
|
|
194
|
-
exportAs: 'rxapOptionsFromMethod',
|
|
195
|
-
})
|
|
196
|
-
export class OptionsFromMethodDirective<Value = any, Parameters = any> implements AfterViewInit, OnChanges, OnDestroy {
|
|
196
|
+
@Directive()
|
|
197
|
+
export abstract class AbstractOptionsFromMethodDirective<Value = any, Parameters = any> implements AfterViewInit, OnDestroy {
|
|
197
198
|
|
|
198
199
|
static ngTemplateContextGuard(
|
|
199
|
-
dir:
|
|
200
|
+
dir: AbstractOptionsFromMethodDirective,
|
|
200
201
|
ctx: any,
|
|
201
202
|
): ctx is OptionsFromMethodTemplateContext {
|
|
202
203
|
return true;
|
|
@@ -204,57 +205,58 @@ export class OptionsFromMethodDirective<Value = any, Parameters = a
|
|
|
204
205
|
|
|
205
206
|
readonly loading = signal<boolean>(true);
|
|
206
207
|
|
|
207
|
-
|
|
208
|
-
|
|
208
|
+
public abstract readonly parameters: Signal<Parameters | undefined>;
|
|
209
|
+
|
|
210
|
+
public abstract readonly resetOnChange: Signal<Value | undefined>;
|
|
209
211
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
+
public abstract readonly method: Signal<OptionsMethod<ControlOptions<Value>, Parameters> | undefined>;
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* The method used to load the options. Defaults to the method defined with the input. If the
|
|
216
|
+
* input is not set the method is extracted from the form definition.
|
|
217
|
+
*/
|
|
218
|
+
protected readonly optionsMethod = linkedSignal<OptionsMethod<ControlOptions<Value>, Parameters> | undefined>(() => this.method());
|
|
212
219
|
|
|
213
220
|
public options: ControlOptions | null = null;
|
|
214
|
-
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
215
|
-
@Input('rxapOptionsFromMethodCall')
|
|
216
|
-
public method!: OptionsMethod<ControlOptions<Value>, Parameters>;
|
|
217
221
|
protected ngControl: NgControl | AbstractControlDirective | null = null;
|
|
218
222
|
protected matFormField: MatFormField | null = null;
|
|
219
223
|
protected settings: OptionsFromMethodDirectiveSettings = {};
|
|
220
224
|
protected readonly viewContainerRef: ViewContainerRef = inject(ViewContainerRef);
|
|
221
|
-
protected
|
|
225
|
+
protected injector: Injector = inject(INJECTOR);
|
|
222
226
|
protected readonly cdr: ChangeDetectorRef = inject(ChangeDetectorRef);
|
|
223
227
|
private readonly template: TemplateRef<OptionsFromMethodTemplateContext> = inject(TemplateRef);
|
|
224
228
|
|
|
229
|
+
protected readonly initialized = signal(false);
|
|
230
|
+
|
|
225
231
|
protected _loadOptionsSubscription?: Subscription;
|
|
226
232
|
|
|
227
|
-
|
|
233
|
+
constructor() {
|
|
234
|
+
// load the options as soon as the directive is initialized and each time the parameters change
|
|
235
|
+
effect(() => {
|
|
236
|
+
const parameters = this.parameters();
|
|
237
|
+
if (!this.initialized()) {
|
|
238
|
+
return;
|
|
239
|
+
}
|
|
240
|
+
untracked(() => this.load(parameters));
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
public ngAfterViewInit() {
|
|
228
245
|
this.matFormField = this.injector.get(MatFormField, null);
|
|
229
246
|
this.ngControl = this.matFormField?._control.ngControl ?? this.injector.get(NgControl, null);
|
|
230
247
|
this.control = (this.ngControl?.control as RxapFormControl) ?? undefined;
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
// then the options are not loaded.
|
|
234
|
-
if (!this.options) {
|
|
235
|
-
await this.load(this.parameters);
|
|
248
|
+
if (!this.optionsMethod()) {
|
|
249
|
+
this.optionsMethod.set(this.extractOptionsMethod());
|
|
236
250
|
}
|
|
251
|
+
this.initialized.set(true);
|
|
237
252
|
}
|
|
238
253
|
|
|
239
254
|
ngOnDestroy() {
|
|
240
255
|
this._loadOptionsSubscription?.unsubscribe();
|
|
241
256
|
}
|
|
242
257
|
|
|
243
|
-
public async ngOnChanges(changes: SimpleChanges) {
|
|
244
|
-
// only try to load the options if the method is defined
|
|
245
|
-
// else the initial load will be triggered in the ngAfterViewInit
|
|
246
|
-
if (!this.method) {
|
|
247
|
-
console.debug('The method is not yet defined');
|
|
248
|
-
return;
|
|
249
|
-
}
|
|
250
|
-
const parametersChanges = changes['parameters'];
|
|
251
|
-
if (parametersChanges) {
|
|
252
|
-
await this.load(parametersChanges.currentValue);
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
|
|
256
258
|
protected async loadOptions(parameters?: Parameters): Promise<Observable<ControlOptions | null> | ControlOptions | null> {
|
|
257
|
-
return this.
|
|
259
|
+
return this.optionsMethod()!.call(parameters, this.control);
|
|
258
260
|
}
|
|
259
261
|
|
|
260
262
|
protected renderTemplate() {
|
|
@@ -269,8 +271,9 @@ export class OptionsFromMethodDirective<Value = any, Parameters = a
|
|
|
269
271
|
this.viewContainerRef.createEmbeddedView(this.template, {$implicit: option});
|
|
270
272
|
}
|
|
271
273
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
+
const resetOnChange = untracked(this.resetOnChange);
|
|
275
|
+
if (resetOnChange !== undefined) {
|
|
276
|
+
this.control?.reset(resetOnChange);
|
|
274
277
|
}
|
|
275
278
|
|
|
276
279
|
this.cdr.detectChanges();
|
|
@@ -287,7 +290,7 @@ export class OptionsFromMethodDirective<Value = any, Parameters = a
|
|
|
287
290
|
}
|
|
288
291
|
}
|
|
289
292
|
|
|
290
|
-
public async load(parameters: Parameters | undefined = this.parameters) {
|
|
293
|
+
public async load(parameters: Parameters | undefined = untracked(this.parameters)) {
|
|
291
294
|
this.loading.set(true);
|
|
292
295
|
try {
|
|
293
296
|
const result = await this.loadOptions(parameters);
|
|
@@ -306,7 +309,22 @@ export class OptionsFromMethodDirective<Value = any, Parameters = a
|
|
|
306
309
|
|
|
307
310
|
}
|
|
308
311
|
|
|
312
|
+
@Directive({
|
|
313
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
314
|
+
selector: '[rxapOptionsFromMethod]',
|
|
315
|
+
standalone: true,
|
|
316
|
+
exportAs: 'rxapOptionsFromMethod',
|
|
317
|
+
})
|
|
318
|
+
export class OptionsFromMethodDirective<Value = any, Parameters = any> extends AbstractOptionsFromMethodDirective<Value, Parameters> {
|
|
319
|
+
|
|
320
|
+
public readonly parameters = input<Parameters | undefined>(undefined, { alias: 'rxapOptionsFromMethodParameters' });
|
|
321
|
+
|
|
322
|
+
public readonly resetOnChange = input<Value | undefined>(undefined, { alias: 'rxapOptionsFromMethodResetOnChange' });
|
|
309
323
|
|
|
324
|
+
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
325
|
+
public readonly method = input<OptionsMethod<ControlOptions<Value>, Parameters> | undefined>(undefined, { alias: 'rxapOptionsFromMethodCall' });
|
|
326
|
+
|
|
327
|
+
}
|
|
310
328
|
</code></pre>
|
|
311
329
|
</div>
|
|
312
330
|
</div>
|
|
@@ -199,15 +199,17 @@
|
|
|
199
199
|
AfterViewInit,
|
|
200
200
|
ChangeDetectorRef,
|
|
201
201
|
Directive,
|
|
202
|
+
effect,
|
|
202
203
|
inject,
|
|
203
204
|
INJECTOR,
|
|
204
205
|
Injector,
|
|
205
|
-
|
|
206
|
-
|
|
206
|
+
input,
|
|
207
|
+
linkedSignal,
|
|
207
208
|
OnDestroy,
|
|
209
|
+
Signal,
|
|
208
210
|
signal,
|
|
209
|
-
SimpleChanges,
|
|
210
211
|
TemplateRef,
|
|
212
|
+
untracked,
|
|
211
213
|
ViewContainerRef,
|
|
212
214
|
} from '@angular/core';
|
|
213
215
|
import {
|
|
@@ -241,22 +243,21 @@ export interface OptionsFromMethodTemplateContext {
|
|
|
241
243
|
export interface OptionsFromMethodDirectiveSettings {
|
|
242
244
|
}
|
|
243
245
|
|
|
244
|
-
//
|
|
245
|
-
export interface
|
|
246
|
-
extends AfterViewInit,
|
|
246
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
247
|
+
export interface AbstractOptionsFromMethodDirective<Value = any, Parameters = any>
|
|
248
|
+
extends AfterViewInit, ExtractOptionsMethodMixin {
|
|
247
249
|
}
|
|
248
250
|
|
|
251
|
+
/**
|
|
252
|
+
* Shared implementation of the options from method directives. The concrete directives
|
|
253
|
+
* only declare the (aliased) signal inputs.
|
|
254
|
+
*/
|
|
249
255
|
@Mixin(ExtractOptionsMethodMixin)
|
|
250
|
-
@Directive(
|
|
251
|
-
|
|
252
|
-
selector: '[rxapOptionsFromMethod]',
|
|
253
|
-
standalone: true,
|
|
254
|
-
exportAs: 'rxapOptionsFromMethod',
|
|
255
|
-
})
|
|
256
|
-
export class OptionsFromMethodDirective<Value = any, Parameters = any> implements AfterViewInit, OnChanges, OnDestroy {
|
|
256
|
+
@Directive()
|
|
257
|
+
export abstract class AbstractOptionsFromMethodDirective<Value = any, Parameters = any> implements AfterViewInit, OnDestroy {
|
|
257
258
|
|
|
258
259
|
static ngTemplateContextGuard(
|
|
259
|
-
dir:
|
|
260
|
+
dir: AbstractOptionsFromMethodDirective,
|
|
260
261
|
ctx: any,
|
|
261
262
|
): ctx is OptionsFromMethodTemplateContext {
|
|
262
263
|
return true;
|
|
@@ -264,57 +265,58 @@ export class OptionsFromMethodDirective<Value = any, Parameters = a
|
|
|
264
265
|
|
|
265
266
|
readonly loading = signal<boolean>(true);
|
|
266
267
|
|
|
267
|
-
|
|
268
|
-
|
|
268
|
+
public abstract readonly parameters: Signal<Parameters | undefined>;
|
|
269
|
+
|
|
270
|
+
public abstract readonly resetOnChange: Signal<Value | undefined>;
|
|
269
271
|
|
|
270
|
-
|
|
271
|
-
|
|
272
|
+
public abstract readonly method: Signal<OptionsMethod<ControlOptions<Value>, Parameters> | undefined>;
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* The method used to load the options. Defaults to the method defined with the input. If the
|
|
276
|
+
* input is not set the method is extracted from the form definition.
|
|
277
|
+
*/
|
|
278
|
+
protected readonly optionsMethod = linkedSignal<OptionsMethod<ControlOptions<Value>, Parameters> | undefined>(() => this.method());
|
|
272
279
|
|
|
273
280
|
public options: ControlOptions | null = null;
|
|
274
|
-
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
275
|
-
@Input('rxapOptionsFromMethodCall')
|
|
276
|
-
public method!: OptionsMethod<ControlOptions<Value>, Parameters>;
|
|
277
281
|
protected ngControl: NgControl | AbstractControlDirective | null = null;
|
|
278
282
|
protected matFormField: MatFormField | null = null;
|
|
279
283
|
protected settings: OptionsFromMethodDirectiveSettings = {};
|
|
280
284
|
protected readonly viewContainerRef: ViewContainerRef = inject(ViewContainerRef);
|
|
281
|
-
protected
|
|
285
|
+
protected injector: Injector = inject(INJECTOR);
|
|
282
286
|
protected readonly cdr: ChangeDetectorRef = inject(ChangeDetectorRef);
|
|
283
287
|
private readonly template: TemplateRef<OptionsFromMethodTemplateContext> = inject(TemplateRef);
|
|
284
288
|
|
|
289
|
+
protected readonly initialized = signal(false);
|
|
290
|
+
|
|
285
291
|
protected _loadOptionsSubscription?: Subscription;
|
|
286
292
|
|
|
287
|
-
|
|
293
|
+
constructor() {
|
|
294
|
+
// load the options as soon as the directive is initialized and each time the parameters change
|
|
295
|
+
effect(() => {
|
|
296
|
+
const parameters = this.parameters();
|
|
297
|
+
if (!this.initialized()) {
|
|
298
|
+
return;
|
|
299
|
+
}
|
|
300
|
+
untracked(() => this.load(parameters));
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
public ngAfterViewInit() {
|
|
288
305
|
this.matFormField = this.injector.get(MatFormField, null);
|
|
289
306
|
this.ngControl = this.matFormField?._control.ngControl ?? this.injector.get(NgControl, null);
|
|
290
307
|
this.control = (this.ngControl?.control as RxapFormControl) ?? undefined;
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
// then the options are not loaded.
|
|
294
|
-
if (!this.options) {
|
|
295
|
-
await this.load(this.parameters);
|
|
308
|
+
if (!this.optionsMethod()) {
|
|
309
|
+
this.optionsMethod.set(this.extractOptionsMethod());
|
|
296
310
|
}
|
|
311
|
+
this.initialized.set(true);
|
|
297
312
|
}
|
|
298
313
|
|
|
299
314
|
ngOnDestroy() {
|
|
300
315
|
this._loadOptionsSubscription?.unsubscribe();
|
|
301
316
|
}
|
|
302
317
|
|
|
303
|
-
public async ngOnChanges(changes: SimpleChanges) {
|
|
304
|
-
// only try to load the options if the method is defined
|
|
305
|
-
// else the initial load will be triggered in the ngAfterViewInit
|
|
306
|
-
if (!this.method) {
|
|
307
|
-
console.debug('The method is not yet defined');
|
|
308
|
-
return;
|
|
309
|
-
}
|
|
310
|
-
const parametersChanges = changes['parameters'];
|
|
311
|
-
if (parametersChanges) {
|
|
312
|
-
await this.load(parametersChanges.currentValue);
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
|
|
316
318
|
protected async loadOptions(parameters?: Parameters): Promise<Observable<ControlOptions | null> | ControlOptions | null> {
|
|
317
|
-
return this.
|
|
319
|
+
return this.optionsMethod()!.call(parameters, this.control);
|
|
318
320
|
}
|
|
319
321
|
|
|
320
322
|
protected renderTemplate() {
|
|
@@ -329,8 +331,9 @@ export class OptionsFromMethodDirective<Value = any, Parameters = a
|
|
|
329
331
|
this.viewContainerRef.createEmbeddedView(this.template, {$implicit: option});
|
|
330
332
|
}
|
|
331
333
|
|
|
332
|
-
|
|
333
|
-
|
|
334
|
+
const resetOnChange = untracked(this.resetOnChange);
|
|
335
|
+
if (resetOnChange !== undefined) {
|
|
336
|
+
this.control?.reset(resetOnChange);
|
|
334
337
|
}
|
|
335
338
|
|
|
336
339
|
this.cdr.detectChanges();
|
|
@@ -347,7 +350,7 @@ export class OptionsFromMethodDirective<Value = any, Parameters = a
|
|
|
347
350
|
}
|
|
348
351
|
}
|
|
349
352
|
|
|
350
|
-
public async load(parameters: Parameters | undefined = this.parameters) {
|
|
353
|
+
public async load(parameters: Parameters | undefined = untracked(this.parameters)) {
|
|
351
354
|
this.loading.set(true);
|
|
352
355
|
try {
|
|
353
356
|
const result = await this.loadOptions(parameters);
|
|
@@ -366,7 +369,22 @@ export class OptionsFromMethodDirective<Value = any, Parameters = a
|
|
|
366
369
|
|
|
367
370
|
}
|
|
368
371
|
|
|
372
|
+
@Directive({
|
|
373
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
374
|
+
selector: '[rxapOptionsFromMethod]',
|
|
375
|
+
standalone: true,
|
|
376
|
+
exportAs: 'rxapOptionsFromMethod',
|
|
377
|
+
})
|
|
378
|
+
export class OptionsFromMethodDirective<Value = any, Parameters = any> extends AbstractOptionsFromMethodDirective<Value, Parameters> {
|
|
379
|
+
|
|
380
|
+
public readonly parameters = input<Parameters | undefined>(undefined, { alias: 'rxapOptionsFromMethodParameters' });
|
|
381
|
+
|
|
382
|
+
public readonly resetOnChange = input<Value | undefined>(undefined, { alias: 'rxapOptionsFromMethodResetOnChange' });
|
|
369
383
|
|
|
384
|
+
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
385
|
+
public readonly method = input<OptionsMethod<ControlOptions<Value>, Parameters> | undefined>(undefined, { alias: 'rxapOptionsFromMethodCall' });
|
|
386
|
+
|
|
387
|
+
}
|
|
370
388
|
</code></pre>
|
|
371
389
|
</div>
|
|
372
390
|
</div>
|
|
@@ -195,19 +195,7 @@
|
|
|
195
195
|
|
|
196
196
|
|
|
197
197
|
<div class="tab-pane fade tab-source-code" id="source">
|
|
198
|
-
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import {
|
|
199
|
-
ChangeDetectorRef,
|
|
200
|
-
Directive,
|
|
201
|
-
Inject,
|
|
202
|
-
INJECTOR,
|
|
203
|
-
Injector,
|
|
204
|
-
Input,
|
|
205
|
-
OnChanges,
|
|
206
|
-
OnInit,
|
|
207
|
-
SimpleChanges,
|
|
208
|
-
TemplateRef,
|
|
209
|
-
ViewContainerRef,
|
|
210
|
-
} from '@angular/core';
|
|
198
|
+
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import { ChangeDetectorRef, Directive, effect, inject, INJECTOR, Injector, input, OnInit, TemplateRef, untracked, ViewContainerRef } from '@angular/core';
|
|
211
199
|
import {
|
|
212
200
|
Constructor,
|
|
213
201
|
ControlOption,
|
|
@@ -291,49 +279,44 @@ export interface OptionsFromRemoteMethodDirective<Value, Parameters> exten
|
|
|
291
279
|
selector: '[rxapOptionsFromRemoteMethod]',
|
|
292
280
|
standalone: true,
|
|
293
281
|
})
|
|
294
|
-
export class OptionsFromRemoteMethodDirective<Value, Parameters>
|
|
282
|
+
export class OptionsFromRemoteMethodDirective<Value, Parameters> {
|
|
283
|
+
private readonly ngControl = inject<NgControl>(NgControl);
|
|
284
|
+
private readonly template = inject<TemplateRef<OptionsFromRemoteMethodTemplateContext>>(TemplateRef);
|
|
285
|
+
private readonly remoteMethodLoader = inject<RemoteMethodLoader>(RemoteMethodLoader);
|
|
286
|
+
private readonly viewContainerRef = inject<ViewContainerRef>(ViewContainerRef);
|
|
287
|
+
private readonly injector = inject<Injector>(INJECTOR);
|
|
288
|
+
private readonly cdr = inject<ChangeDetectorRef>(ChangeDetectorRef);
|
|
295
289
|
|
|
296
|
-
@Input('rxapOptionsFromRemoteMethodParameters')
|
|
297
|
-
public parameters?: Parameters;
|
|
298
290
|
|
|
299
|
-
|
|
300
|
-
public resetOnChange?: Value;
|
|
291
|
+
public readonly parameters = input<Parameters>(undefined, { alias: "rxapOptionsFromRemoteMethodParameters" });
|
|
301
292
|
|
|
302
|
-
|
|
303
|
-
public withoutParameters = false;
|
|
293
|
+
public readonly resetOnChange = input<Value>(undefined, { alias: "rxapOptionsFromRemoteMethodResetOnChange" });
|
|
304
294
|
|
|
305
|
-
|
|
295
|
+
public readonly withoutParameters = input(false, { alias: "rxapOptionsFromRemoteMethodWithoutParameters" });
|
|
306
296
|
|
|
307
|
-
|
|
308
|
-
@Inject(NgControl)
|
|
309
|
-
private readonly ngControl: NgControl,
|
|
310
|
-
@Inject(TemplateRef)
|
|
311
|
-
private readonly template: TemplateRef<OptionsFromRemoteMethodTemplateContext>,
|
|
312
|
-
@Inject(RemoteMethodLoader)
|
|
313
|
-
private readonly remoteMethodLoader: RemoteMethodLoader,
|
|
314
|
-
@Inject(ViewContainerRef)
|
|
315
|
-
private readonly viewContainerRef: ViewContainerRef,
|
|
316
|
-
@Inject(INJECTOR)
|
|
317
|
-
private readonly injector: Injector,
|
|
318
|
-
@Inject(ChangeDetectorRef)
|
|
319
|
-
private readonly cdr: ChangeDetectorRef,
|
|
320
|
-
) {
|
|
321
|
-
}
|
|
297
|
+
private remoteMethodToken!: IdOrInstanceOrToken<BaseRemoteMethod>;
|
|
322
298
|
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
if
|
|
327
|
-
|
|
299
|
+
constructor() {
|
|
300
|
+
effect(() => {
|
|
301
|
+
const parameters = this.parameters();
|
|
302
|
+
// the parameters are only relevant if the input is bound
|
|
303
|
+
if (parameters === undefined) {
|
|
304
|
+
return;
|
|
328
305
|
}
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
306
|
+
untracked(() => {
|
|
307
|
+
this.remoteMethodToken ??= this.extractRemoteMethodToken();
|
|
308
|
+
return this.renderTemplate(parameters);
|
|
309
|
+
});
|
|
310
|
+
});
|
|
311
|
+
effect(() => {
|
|
312
|
+
if (!this.withoutParameters()) {
|
|
313
|
+
return;
|
|
334
314
|
}
|
|
335
|
-
|
|
336
|
-
|
|
315
|
+
untracked(() => {
|
|
316
|
+
this.remoteMethodToken ??= this.extractRemoteMethodToken();
|
|
317
|
+
return this.renderTemplate();
|
|
318
|
+
});
|
|
319
|
+
});
|
|
337
320
|
}
|
|
338
321
|
|
|
339
322
|
private extractRemoteMethodToken() {
|
|
@@ -364,8 +347,9 @@ export class OptionsFromRemoteMethodDirective<Value, Parameters> implement
|
|
|
364
347
|
this.viewContainerRef.createEmbeddedView(this.template, { $implicit: option });
|
|
365
348
|
}
|
|
366
349
|
|
|
367
|
-
|
|
368
|
-
|
|
350
|
+
const resetOnChange = untracked(this.resetOnChange);
|
|
351
|
+
if (resetOnChange !== undefined) {
|
|
352
|
+
this.ngControl.reset(resetOnChange);
|
|
369
353
|
}
|
|
370
354
|
|
|
371
355
|
this.cdr.detectChanges();
|
package/compodoc/js/menu-wc.js
CHANGED
|
@@ -54,38 +54,6 @@ customElements.define('compodoc-menu', class extends HTMLElement {
|
|
|
54
54
|
</a>
|
|
55
55
|
</li>
|
|
56
56
|
</ul>
|
|
57
|
-
</li>
|
|
58
|
-
<li class="chapter modules">
|
|
59
|
-
<a data-type="chapter-link" href="modules.html">
|
|
60
|
-
<div class="menu-toggler linked" data-bs-toggle="collapse" ${ isNormalMode ?
|
|
61
|
-
'data-bs-target="#modules-links"' : 'data-bs-target="#xs-modules-links"' }>
|
|
62
|
-
<span class="icon ion-ios-archive"></span>
|
|
63
|
-
<span class="link-name">Modules</span>
|
|
64
|
-
<span class="icon ion-ios-arrow-down"></span>
|
|
65
|
-
</div>
|
|
66
|
-
</a>
|
|
67
|
-
<ul class="links collapse " ${ isNormalMode ? 'id="modules-links"' : 'id="xs-modules-links"' }>
|
|
68
|
-
<li class="link">
|
|
69
|
-
<a href="modules/FormSystemDirectivesModule.html" data-type="entity-link" >FormSystemDirectivesModule</a>
|
|
70
|
-
<li class="chapter inner">
|
|
71
|
-
<div class="simple menu-toggler" data-bs-toggle="collapse" ${ isNormalMode ?
|
|
72
|
-
'data-bs-target="#directives-links-module-FormSystemDirectivesModule-dfe4b4d7512f0ed4b4b8d032f9210d6e179abee53a24a961785fe0738b9e5eff63690e94bff12a1ebc9fdcbe03ee6681d3ba3919691a239f4ca0a6b017050de1"' : 'data-bs-target="#xs-directives-links-module-FormSystemDirectivesModule-dfe4b4d7512f0ed4b4b8d032f9210d6e179abee53a24a961785fe0738b9e5eff63690e94bff12a1ebc9fdcbe03ee6681d3ba3919691a239f4ca0a6b017050de1"' }>
|
|
73
|
-
<span class="icon ion-md-code-working"></span>
|
|
74
|
-
<span>Directives</span>
|
|
75
|
-
<span class="icon ion-ios-arrow-down"></span>
|
|
76
|
-
</div>
|
|
77
|
-
<ul class="links collapse" ${ isNormalMode ? 'id="directives-links-module-FormSystemDirectivesModule-dfe4b4d7512f0ed4b4b8d032f9210d6e179abee53a24a961785fe0738b9e5eff63690e94bff12a1ebc9fdcbe03ee6681d3ba3919691a239f4ca0a6b017050de1"' :
|
|
78
|
-
'id="xs-directives-links-module-FormSystemDirectivesModule-dfe4b4d7512f0ed4b4b8d032f9210d6e179abee53a24a961785fe0738b9e5eff63690e94bff12a1ebc9fdcbe03ee6681d3ba3919691a239f4ca0a6b017050de1"' }>
|
|
79
|
-
<li class="link">
|
|
80
|
-
<a href="directives/ControlHideShowDirective.html" data-type="entity-link" data-context="sub-entity" data-context-id="modules" >ControlHideShowDirective</a>
|
|
81
|
-
</li>
|
|
82
|
-
<li class="link">
|
|
83
|
-
<a href="directives/InputSelectOptionsDirective.html" data-type="entity-link" data-context="sub-entity" data-context-id="modules" >InputSelectOptionsDirective</a>
|
|
84
|
-
</li>
|
|
85
|
-
</ul>
|
|
86
|
-
</li>
|
|
87
|
-
</li>
|
|
88
|
-
</ul>
|
|
89
57
|
</li>
|
|
90
58
|
<li class="chapter">
|
|
91
59
|
<div class="simple menu-toggler" data-bs-toggle="collapse" ${ isNormalMode ? 'data-bs-target="#directives-links"' :
|
|
@@ -95,6 +63,9 @@ customElements.define('compodoc-menu', class extends HTMLElement {
|
|
|
95
63
|
<span class="icon ion-ios-arrow-down"></span>
|
|
96
64
|
</div>
|
|
97
65
|
<ul class="links collapse " ${ isNormalMode ? 'id="directives-links"' : 'id="xs-directives-links"' }>
|
|
66
|
+
<li class="link">
|
|
67
|
+
<a href="directives/AbstractOptionsFromMethodDirective.html" data-type="entity-link" >AbstractOptionsFromMethodDirective</a>
|
|
68
|
+
</li>
|
|
98
69
|
<li class="link">
|
|
99
70
|
<a href="directives/AutocompleteOptionsFromMethodDirective.html" data-type="entity-link" >AutocompleteOptionsFromMethodDirective</a>
|
|
100
71
|
</li>
|