Abstract
Protected
servicesProtected
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.
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.
Protected
applyTrack a new ValueHostConfig in the destinationConfig.
Protected
Abstract
createSupplies the ValidationManagerStartFluent object, already setup
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
The ValueHostConfig object configures one ValueHost and its validators. That object isn't ideal for typing in configurations (although its great if you have to write conversion between your own business logic and Jivs).
The ManagerConfigBuilderBase provides a way to configure through meaningful code. There are actually 2 of these, the builder and the modifier. ValueHostsManagerConfigBuilder is used for the initial configuration passed into ValueHostManager/ValidationManager. ValueHostsManagerConfigModifier is used to modify the configuration in an existing ValueHostManager.
Here are two ways to use it. 1) Without business logic 2) with Business logic.
Without Business Logic
With Business Logic using the builder and UI overrides its settings
With Business Logic using its own conversion logic and UI overrides its settings
Combining a condition from the UI with the conditions from the business logic
This common use case is where the UI wants to add a condition to a Validator that was created by the business logic. Use the combineConditionWith() and replaceConditionWith() functions.
The goal is to preserve the condition from the business logic by using it together with the UI's condition in one of these ways:
Make the business logic's condition optional by wrapping it in a WhenCondition.
All conditions must evaluate as a match using the AllCondition
Either condition can evaluate as a match using the AnyCondition
The UI's condition is a complete replacement for the business logic's condition. // business logic builder.input('Field1', LookupKey.String).notNull(); // UI wants it to look like this: builder.input('Field1', LookupKey.String) .all((childrenBuilder)=> childrenBuilder.requireText()); // because requireText() includes notNull()
// using the replaceConditionWith() function builder.input('Field1').replaceConditionWith( ConditionType.NotNull, // error code (replacementBuilder)=> replacementBuilder.requireText());