ng-xtend API documentation
    Preparing search index...

    Class AbstractTypeHandler<Type>Abstract

    An implementation of XtTypeHandler that provides the basic handling of special fields

    Type Parameters

    • Type

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Methods

    • Parses a date string into a Date object, handling optional timezone annotations

      Parameters

      • dateAsString: string | null | undefined

        The date string to parse

      Returns Date | null | undefined

      A Date object, null for null input, or undefined if parsing fails

    • Converts a Date to its JSON string representation

      Parameters

      • date: Date | null | undefined

        The date to convert

      Returns string | null | undefined

      The JSON string, or null/undefined if input was null/undefined

    • Converts a JSON object to the appropriate format, handling id mapping, date conversion, old field renaming, and recursive child conversion

      Parameters

      • json: any

        The JSON object to convert

      Returns void

    • Gets the id of a value, either from the configured id field or from _id

      Parameters

      • value: Type

        The value to get the id from

      Returns any

      The id value, or null if not found

    • Checks whether a display template has been configured

      Returns boolean

      True if a display template is set

    • Extracts a numeric value from the type for calculation purposes

      Parameters

      • value: Type

        The value to extract a number from

      Returns number | undefined

      The numeric value or undefined if no numeric field is configured

    • Converts a value to its display string using the configured template

      Parameters

      • value: Type

        The value to convert to a display string

      Returns string

      The display string