@geogirafe/lib-geoportal
    Preparing search index...

    The TimeWidget class is a custom HTML element used to manage and display a time range or time value through one or two sliders or date pickers. It supports two modes (range or value) and returns date strings formatted according to the specified time resolution and mode. The initialize method needs to be called first to configure the widget with an object of type ITimeOptions.

    This class must be extended, since it doesn't have a template of its own.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    activeTooltips: any[] = []
    callbacks: Callback[] = []
    componentManager: ComponentManager
    configManager: ConfigManager
    displayStyle?: string
    lowerInputElem: HTMLInputElement
    maxDefaultValue: string = ''
    maxValue: Date
    minDefaultValue: string = ''
    minValue: Date
    mode: TimeMode
    name: string
    rendered: boolean = false
    resolution: TimeResolution
    shadow: ShadowRoot
    stateManager: StateManager
    styleUrl: null | string = null
    template: Hole | (() => Hole)
    templateUrl: null | string = null
    timeFormatter: LayerTimeFormatter
    timeoutId?: Timeout
    upperInputElem: HTMLInputElement
    userInteractionManager: UserInteractionManager

    Accessors

    Methods

    • Deserialize an element and set the current element state to the deserialized one

      Parameters

      • _serializedElement: unknown

        The element serialization as returned by the serialize method

      Returns void

    • Get the current time restriction as a formatted query string.

      Returns undefined | string

      The formatted time restriction as string or undefined if the time restriction is empty.

    • Convert the string in parameter with uHtml and return it. This allows to convert a string with html in a right html object. For example, htmlUnsafe('

      ') will return an html div object.

      Parameters

      • str: string

      Returns Hole

    • In the templates, sometimes for accessibility reasons, we have to support the KeyDown Event In those case, we often juste want to do the same as the click event when Enter or Space is pressed Then this method can be used : it just calls the click event on the same element

      Parameters

      • e: KeyboardEvent

      Returns void