Protected
servicesThe InstanceState for the ValueHostsManager itself. Its up to you to retain stateful information so that the service works statelessly. It will supply you with the changes to states through the OnInstanceStateChanged property. Whatever it gives you, you supply here to rehydrate the ValueHostsManager with the correct state. If you don't have any state, leave this null or undefined and ValueHostsManager will initialize its state.
The InstanceState for the ValueHostsManager itself. Its up to you to retain stateful information so that the service works statelessly. It will supply you with the changes to states through the OnInstanceStateChanged property. Whatever it gives you, you supply here to rehydrate the ValueHostsManager with the correct state. If you don't have any state, leave this null or undefined and ValueHostsManager will initialize its state.
Called when the state of validation has changed on a ValidatableValueHost. That includes validate(), clearValidation(), setBusinessLogicErrors(), clearBusinessLogicErrors() and a few edge cases. Supplies the current ValidationState to the callback. Examples: Use to notify the validation related aspects of the component to refresh, such as showing error messages and changing style sheets. Use to change the disabled state of the submit button based on validity. See also onValidationStateChanged for a similar callback from the ValidationManager.
Called when the state of validation has changed on a ValidatableValueHost. That includes validate(), clearValidation(), setBusinessLogicErrors(), clearBusinessLogicErrors() and a few edge cases. Supplies the current ValidationState to the callback. Examples: Use to notify the validation related aspects of the component to refresh, such as showing error messages and changing style sheets. Use to change the disabled state of the submit button based on validity. See also onValidationStateChanged for a similar callback from the ValidationManager.
Called when the state of validation has changed on a ValidatableValueHost. That includes validate(), clearValidation(), setBusinessLogicErrors(), clearBusinessLogicErrors() and a few edge cases. Supplies the current ValidationState to the callback. Examples: Use to notify the Validation Summary widget(s) to refresh. Use to change the disabled state of the submit button based on validity. See also onValueHostValidationStateChanged for a similar callback from individual ValueHosts.
Called when the state of validation has changed on a ValidatableValueHost. That includes validate(), clearValidation(), setBusinessLogicErrors(), clearBusinessLogicErrors() and a few edge cases. Supplies the current ValidationState to the callback. Examples: Use to notify the Validation Summary widget(s) to refresh. Use to change the disabled state of the submit button based on validity. See also onValueHostValidationStateChanged for a similar callback from individual ValueHosts.
Provides a debounce delay for onValidationStateChanged notifications. The delay is in milliseconds.
onValidationStateChanged runs after each valueHost.validate() call, even though onValueHostValidationStateChanged also runs. Some features need to know about the general change to the validation state, not just on the individual field. So they expect onValidationStateChanged to run after valueHost.validate() runs. A call by ValidationManager.validate() will validate a list of valueHosts, and all of them will try to invoke onValidationStateChanged. That's too many in a short period. This debounces them so ValidationManager.validated() generally has one call.
Leave undefined to use the default of defaultNotifyValidationStateChangedDelay. Set to 0 to disable the debounce.
Provides a debounce delay for onValidationStateChanged notifications. The delay is in milliseconds.
onValidationStateChanged runs after each valueHost.validate() call, even though onValueHostValidationStateChanged also runs. Some features need to know about the general change to the validation state, not just on the individual field. So they expect onValidationStateChanged to run after valueHost.validate() runs. A call by ValidationManager.validate() will validate a list of valueHosts, and all of them will try to invoke onValidationStateChanged. That's too many in a short period. This debounces them so ValidationManager.validated() generally has one call.
Leave undefined to use the default of defaultNotifyValidationStateChangedDelay. Set to 0 to disable the debounce.
Protected
loggerProvides an API for logging, sending entries to the loggerService.
Protected
baseProtected
overriddenA ValueHostManagerConfig that is getting overridden ValueHost configurations. Each are created by the addOverride() function. They retain a reference to services.
The state for each ValueHost. The array may not have the same states for all the ValueHostConfigs you are supplying. It will create defaults for those missing and discard those no longer in use.
Its up to you to retain stateful information so that the service works statelessly. It will supply you with the changes to states through the OnValueHostInstanceStateChanged property. Whatever it gives you, you supply here to rehydrate the ValueHostsManager with the correct state. You can also supply the state of an individual ValueHost when using the addValueHost or addOrUpdateValueHost methods. If you don't have any state, leave this null or undefined and ValueHostsManager will initialize its state.
The state for each ValueHost. The array may not have the same states for all the ValueHostConfigs you are supplying. It will create defaults for those missing and discard those no longer in use.
Its up to you to retain stateful information so that the service works statelessly. It will supply you with the changes to states through the OnValueHostInstanceStateChanged property. Whatever it gives you, you supply here to rehydrate the ValueHostsManager with the correct state. You can also supply the state of an individual ValueHost when using the addValueHost or addOrUpdateValueHost methods. If you don't have any state, leave this null or undefined and ValueHostsManager will initialize its state.
Called when any ValueHost had its ValueHostInstanceState changed. React example: React component useState feature retains this value and needs to know when to call the setValueHostInstanceState() with the stateToRetain. You can setup the same callback on individual ValueHosts. Here, it aggregates all ValueHost notifications.
Called when any ValueHost had its ValueHostInstanceState changed. React example: React component useState feature retains this value and needs to know when to call the setValueHostInstanceState() with the stateToRetain. You can setup the same callback on individual ValueHosts. Here, it aggregates all ValueHost notifications.
Called when the ValueHost's Value property has changed. If setup, you can prevent it from being fired with the options parameter of setValue() to avoid round trips where you already know the details. You can setup the same callback on individual ValueHosts. Here, it aggregates all ValueHost notifications.
Called when the ValueHost's Value property has changed. If setup, you can prevent it from being fired with the options parameter of setValue() to avoid round trips where you already know the details. You can setup the same callback on individual ValueHosts. Here, it aggregates all ValueHost notifications.
Called when the InputValueHost's InputValue property has changed. If setup, you can prevent it from being fired with the options parameter of setValue() to avoid round trips where you already know the details. You can setup the same callback on individual InputValueHosts. Here, it aggregates all InputValueHost notifications.
Called when the InputValueHost's InputValue property has changed. If setup, you can prevent it from being fired with the options parameter of setValue() to avoid round trips where you already know the details. You can setup the same callback on individual InputValueHosts. Here, it aggregates all InputValueHost notifications.
Called when the ValueHostsManager's InstanceState has changed. React example: React component useState feature retains this value and needs to know when to call the setState function with the stateToRetain
Called when the ValueHostsManager's InstanceState has changed. React example: React component useState feature retains this value and needs to know when to call the setState function with the stateToRetain
Use this when caching the configuration for a later creation of ValueHostsManager.
Called when the configuration of ValueHosts has been changed, usually through the ValueHostsManagerConfigModifier.apply, or these members of ValueHostsManager: addValueHost, addOrUpdateValueHost, addOrMergeValueHost, discardValueHost. The supplied object is a clone so modifications will not impact the ValueHostsManager.
Note that where a ValueHostConfig has a property that references a function, you will have to retain that reference in some way to reuse it. In particular, ValidatorConfig.conditionCreator.
Use this when caching the configuration for a later creation of ValueHostsManager.
Called when the configuration of ValueHosts has been changed, usually through the ValueHostsManagerConfigModifier.apply, or these members of ValueHostsManager: addValueHost, addOrUpdateValueHost, addOrMergeValueHost, discardValueHost. The supplied object is a clone so modifications will not impact the ValueHostsManager.
Note that where a ValueHostConfig has a property that references a function, you will have to retain that reference in some way to reuse it. In particular, ValidatorConfig.conditionCreator.
Protected
createSupplies the ValidationManagerStartFluent object, already setup
Fluent format to create a InputValueHostConfig. This is the start of a fluent series. Extend series with validation rules like "required()".
the ValueHost name
Optional
dataType: null | stringoptional and can be null. The value for ValueHost.dataType.
Optional
parameters: FluentInputParametersoptional. Any additional properties of a InputValueHostConfig.
FluentValidatorBuilder for chaining validators to initial InputValueHost
Fluent format to create a InputValueHostConfig. This is the start of a fluent series. Extend series with validation rules like "required()".
the ValueHost name
optional. Any additional properties of a InputValueHostConfig.
FluentValidatorBuilder for chaining validators to initial InputValueHost
Fluent format to create a InputValueHostConfig. This is the start of a fluent series. Extend series with validation rules like "required()".
Supply the entire InputValueHostConfig. This is a special use case. You can omit the valueHostType property.
FluentValidatorBuilder for chaining validators to initial InputValueHost
Fluent format to create a PropertyValueHostConfig. This is the start of a fluent series. Extend series with validation rules like "required()".
the ValueHost name
Optional
dataType: null | stringoptional and can be null. The value for ValueHost.dataType.
Optional
parameters: FluentPropertyParametersoptional. Any additional properties of a PropertyValueHostConfig.
FluentValidatorBuilder for chaining validators to initial PropertyValueHost
Fluent format to create a PropertyValueHostConfig. This is the start of a fluent series. Extend series with validation rules like "required()".
the ValueHost name
optional. Any additional properties of a PropertyValueHostConfig.
FluentValidatorBuilder for chaining validators to initial PropertyValueHost
Fluent format to create a PropertyValueHostConfig. This is the start of a fluent series. Extend series with validation rules like "required()".
Supply the entire PropertyValueHostConfig. This is a special use case. You can omit the valueHostType property.
FluentValidatorBuilder for chaining validators to initial PropertyValueHost
When working with both business layer and UI layer configurations, call before starting the UI layer configuration. It will prepare for merging overlapping configurations and optionally change some of the configuration already prepared by the business layer.
Optional
options: BuilderOverrideOptionsWhen the business logic provides the initial validators, they include error messages designed from the business logic perspective.
The UI layer can override them in several ways:
This function should be called prior to creating ValidationManager to remove all error messages supplied by business logic, so long as they are covered in TextLocalizationServices. Be sure that TextLocalizationServices is setup as desired before calling this.
Replaces the valueHostType property value, from 'Property' to 'Input' (no changes to any other case). This allows business logic to output in its preferred ValueHostType and UI to upscale it to InputValueHost. Only impacts the initial ValueHostConfig, not any overrides.
when true, changes were made
If it finds the validator with the errorcode specified, it will combine the condition with the existing condition using a rule supplied or callback to let you create a conditionConfig. If it the validator is not found, it will throw an error and log. If the ValueHost is on an earlier override or baseConfig, a new entry is made in the current override, reflecting the same data as earlier, but now with a modified validator. If the ValueHost is on the current override, the existing entry is modified.
The resulting ValidatorConfig's errorCode will not have changed from the original to ensure it aligns with everything depending on the original error code.
A function to create a conditionConfig that will replace the existing. You are passed a Builder object, where you can build your new conditions, and the existing conditionConfig, which can be added to a Builder object with the conditionConfig() function.
builder.combineWithRule('Field1', 'NotNull',
(combiningBuilder, existingConditionConfig)=> {
combiningBuilder.when(
(enablerBuilder)=> enablerBuilder.equalToValue('YES', 'Field2'),
(childBuilder)=> childBuilder.conditionConfig(existingConditionConfig));
});
itself for chaining
Uses the combineUsing parameter to determine how to combine the conditions.
A function to create the condition that you want to combine with the existing condition.
builder.combineWithRule('Field1', 'NotNull', CombineUsingCondition.When,
(combiningBuilder)=> combiningBuilder.equalToValue('YES', 'Field2'));
Replace the condition supplying the replacement conditionConfig directly. If it finds the validator with the errorcode specified, it will replace the condition with the existing condition. If not, it logs and throws an error. If the ValueHost is on an earlier override or baseConfig, a new entry is made in the current override, reflecting the same data as earlier, but now with a modified validator. If the ValueHost is on the current override, the existing entry is modified.
The resulting ValidatorConfig's errorCode will not have changed from the original to ensure it aligns with everything depending on the original error code.
provide a complete ConditionConfig as the replacement
Replace supplying the replacement condition through a Builder object.
Use a function to create a conditionConfig that will replace the existing. You are passed the builder, where you can build your new conditions.
itself for chaining
If the user needs to abandon this instance, they should use this to clean up active resources (like timers) and to release memory that would stall the garbage collector from disposing this object. It should assign any object reference to undefined as a strong indicator that the object has been disposed.
Protected
assertProtected
addProtected
destinationExposes the ValueHostsConfig currently capturing content.
Delivers a complete ValueHostConfig and shuts down this instance. You cannot use the instance after this point.
Creates the same output as complete() but does not modify the baseConfig allowing it to be called multiple times.
Protected
applyTrack a new ValueHostConfig in the destinationConfig.
Protected
getGets a ValueHostConfig with matching name by looking in previous overrides and the baseConfig. Goal is to find a ValueHostConfig that existed prior to creating the Modifier or using addOverride().
Protected
addUtility to use the Fluent system to add a ValueHostConfig to the ValueHostsManagerConfig.
Optional
arg2: null | string | Partial<TVHConfig>Optional
arg3: Partial<TVHConfig>Fluent format to create a StaticValueHostConfig. This is the start of a fluent series. However, at this time, there are no further items in the series.
the ValueHost name
Optional
dataType: null | stringoptional and can be null. The value for ValueHost.dataType.
Optional
parameters: FluentStaticParametersoptional. Any additional properties of a StaticValueHostConfig.
Same instance for chaining.
Fluent format to create a StaticValueHostConfig. This is the start of a fluent series. However, at this time, there are no further items in the series.
the ValueHost name
optional. Any additional properties of a StaticValueHostConfig.
Same instance for chaining.
Fluent format to create a StaticValueHostConfig. This is the start of a fluent series. However, at this time, there are no further items in the series.
Supply the entire StaticValueHostConfig. This is a special use case. You can omit the valueHostType property.
Same instance for chaining.
Fluent format to create a CalcValueHostConfig. This is the start of a fluent series. However, at this time, there are no further items in the series.
the ValueHost name
can be null. The value for ValueHost.dataType.
required. Function callback.
Same instance for chaining.
Fluent format to create a CalcValueHostConfig. This is the start of a fluent series. However, at this time, there are no further items in the series.
Supply the entire CalcValueHostConfig. This is a special use case. You can omit the valueHostType property.
Same instance for chaining.
Protected
assertAttaches an enabler Condition to a ValueHost. The Enabler Condition is actually a ConditionConfig object used to create the Condition. This is used to enable or disable the ValueHost based on the condition. If called on a ValueHost already with an enabler, it will replace the existing enabler.
An actual conditionConfig
Using the Builder API
A function that will build the conditionConfig with the Builder API
Protected
addFluent format to create any ValueHostConfig based upon ValidatorsValueHostBaseConfig. This is the start of a fluent series. Extend series with validation rules like "required()". Protected because ValueHostManager does not support InputValueHost. ValidationManager offers a public interface.
the ValueHostType to configure
either the ValueHost name for a multiparameter use or InputValueConfig for a single parameter use.
Optional
arg2: null | string | Partial<TVHConfig>optional and can be null. The value for ValueHost.dataType or InputValueHostConfig.
Optional
arg3: Partial<TVHConfig>optional. Any additional properties of a InputValueHostConfig.
FluentValidatorBuilder for chaining validators to initial InputValueHost
Protected
combineCombines a condition with a ValidatorConfig's condition using a rule supplied or callback to let you create a conditionConfig.
The resulting ValidatorConfig's errorCode will not have changed from the original to ensure it aligns with everything depending on the original error code.
the conditionConfig that you want to combine with the new condition.
Either of these:
Optional
arg3: ((combiningBuilder) => void)create the condition that you want to combine with the existing condition.
Protected
confirmProtected
replaceUpdates the conditionConfig property of destinationOfCondition where the replacement is either a conditionConfig or using a Builder object.
If it finds the validator with the errorcode specified, it will replace the condition with the existing condition. If not, it logs and throws an error. If the ValueHost is on an earlier override or baseConfig, a new entry is made in the current override, reflecting the same data as earlier, but now with a modified validator. If the ValueHost is on the current override, the existing entry is modified.
The resulting ValidatorConfig's errorCode will not have changed from the original to ensure it aligns with everything depending on the original error code.
Either of these:
Protected
setupReturns a ValueHostConfig that is already in the destinationValueHostConfigs with the desired validatorConfig. If it cannot match both valueHostName and errorCode, it will throw an error.
Generated using TypeDoc v0.25.12
Builder specific to ValidationManager. It provides the ability to attach callbacks to the baseConfig.