A builder for preparing ValueHostsManagerConfig.

interface IValueHostsManagerConfigBuilder<T> {
    onInputValueChanged?: null | InputValueChangedHandler;
    savedInstanceState?: null | ValueHostsManagerInstanceState;
    savedValueHostInstanceStates: null | ValueHostInstanceState[];
    onValueHostInstanceStateChanged?: null | ValueHostInstanceStateChangedHandler;
    onValueChanged?: null | ValueChangedHandler;
    onInstanceStateChanged?: null | ValueHostsManagerInstanceStateChangedHandler;
    onConfigChanged?: null | ValueHostsManagerConfigChangedHandler;
    dispose(): void;
    complete(): T;
    static(valueHostName, dataType?, parameters?): ManagerConfigBuilderBase<T>;
    static(valueHostName, parameters): ManagerConfigBuilderBase<T>;
    static(config): ManagerConfigBuilderBase<T>;
    static(arg1, arg2?, parameters?): ManagerConfigBuilderBase<T>;
    calc(valueHostName, dataType, calcFn): ManagerConfigBuilderBase<T>;
    calc(config): ManagerConfigBuilderBase<T>;
    calc(arg1, dataType?, calcFn?): ManagerConfigBuilderBase<T>;
}

Type Parameters

Hierarchy (view full)

Implemented by

Properties

onInputValueChanged?: null | InputValueChangedHandler

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.

savedInstanceState?: null | ValueHostsManagerInstanceState

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.

savedValueHostInstanceStates: null | ValueHostInstanceState[]

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.

onValueHostInstanceStateChanged?: null | ValueHostInstanceStateChangedHandler

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.

onValueChanged?: null | ValueChangedHandler

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.

onInstanceStateChanged?: null | ValueHostsManagerInstanceStateChangedHandler

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

onConfigChanged?: null | ValueHostsManagerConfigChangedHandler

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.

Methods

  • 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.

    Returns void

Generated using TypeDoc v0.25.12