TESSA Web API
    Preparing search index...

    Module UI.Common

    Basic example
    let validationContainer: ValidationContainer<Decimal | null, string> | null = null;

    try {
    const validationContainer = new ValidationContainer(
    () => (!!value ? new Decimal(value) : null),
    () => value
    );

    const validator: ValidationContainerValidator<Decimal | null, string> = context => {
    if (!context.value?.greaterThan(0)) {
    const error = 'The value must be greater than "0".';
    context.validationResult.add(ValidationResult.fromText(error, ValidationResultType.Error));
    context.handled = true; // To interrupt the chain of handlers, the value must be set to `true`.
    }
    };

    validationContainer.add(validator, { id: 'Greater than zero' });

    validationContainer.isEmpty: // false
    validationContainer.size; // 1
    validationContainer.has(validator) // true
    validationContainer.result.hasErrors; // true
    validationContainer.removeById('Greater than zero'); // true
    validationContainer.remove(validator); // false (already removed)

    } finally {
    validationContainer?.dispose();
    }
    Modes example
    validationContainer.isManual = false;
    validationContainer.result; // some result

    validationContainer.isManual = true;
    validationContainer.result; // empty result
    validationContainer.validate(value);
    validationContainer.result; // some result

    validationContainer.isManual = false;
    validationContainer.addAsync(
    async context => {
    if (!(await checkValue(context.value))) {
    const warning = 'Warnings occurred while checking a value.';
    context.validationResult.add(
    ValidationResult.fromText(warning, ValidationResultType.Warning)
    );
    }
    },
    { order: 0 }
    );

    validationContainer.hasAsync; // true
    const validationResult = await validationContainer.validateAsync(value);
    validationContainer.result === validationResult; // true;
    validationContainer.result.hasWarnings; // true
    validationContainer.validate(value); // exception

    Namespaces

    DefaultEventHandlers
    ShadowPropsHelper
    UIHost
    ValidationContainerConstants

    Enumerations

    ShadowPropsStage

    Classes

    AttributeList
    ClassNameList
    CommitChangesContext
    CustomStyleList
    DataAttributeList
    Dimensions
    FocusManager
    OverlayManager
    ScrollManager
    ShadowPropsContainer
    ThemeManager
    Tooltip
    ValidationContainer
    ZoomManager

    Interfaces

    CSSObject
    ICommitChangesContext
    IFocusManageable
    ITheme
    IThemesConfig
    IValidationContainerContext
    IValidationContainerObject
    IValidationContainerValidatorSettings
    ShadowPropsContainerItem
    ShadowPropsFinalFunc
    ShadowPropsFunc
    ShadowPropsOptions
    UIHandlersContainer
    ValidationContainerCreateOptions

    Type Aliases

    AttributeContainer
    BorderNode
    ControlBorderType
    ControlType
    ControlValue
    CustomStyle
    CustomStyleFunc
    DimensionType
    EventType
    FlattenSimpleInterpolation
    FontNode
    IconNode
    IconsetNode
    ImageNode
    ScrollPosition
    ThemeControlSection
    ThemeFragment
    ThemeIcon
    ThemeIconset
    ThemeIconsetSection
    ThemeIconSize
    ThemeIconThickness
    ThemeImage
    ThemeImagesSection
    ThemeMetaSection
    ThemeNode
    ThemeResources
    ThemeResourceSection
    ThemeValue
    UIHandlers
    ValidationContainerResult
    ValidationContainerResultDisplay
    ValidationContainerResultInfo
    ValidationContainerResultItem
    ValidationContainerResultMode
    ValidationContainerValidator

    Variables

    css
    MaxInt32
    ShadowPropsSymbol
    styled

    Functions - Other

    combineRef
    createUIHandlersContainer
    distance
    getUIId
    handleDefaultTouchZoom
    handleDefaultWheelZoom
    property
    scaleOffset
    useCombinedRefs
    useFocusManager
    useForkRef
    useLocalize
    useMobileDragEventsPolyfill
    useVisibility

    Functions - Type Guards

    isIFocusManageable