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

    A widget that represents a time slider with configurable time resolution. The slider supports a single value or a time range depending on the specified mode.

    It consists of two <input> elements of type range that are configured by receiving timeOptions in its initialize method. It validates input changes to ensure compliance with the defined timeOptions and dynamically updates output elements to display nicely formatted time values.

    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
    styleUrls: string[] = ...
    template: Hole | (() => Hole)
    templateUrl: string = './template.html'
    timeFormatter: LayerTimeFormatter
    timeoutId?: Timeout
    upperInputElem: HTMLInputElement
    userInteractionManager: UserInteractionManager

    Accessors

    Methods

    • Calculates the number of steps within the given time range based on the specified time resolution. The returned number is zero base, indicating the index of the slider position. The range starts at the minValue of the provided timeOptions.

      Parameters

      • OptionalmaxVal: Date

        The upper limit for the range. Defaults to the timeOptions > maxValue if not provided.

      Returns number

      The number of slider steps based on the resolution and time range.

    • 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

    • Parameters

      • parentNodeName: string
      • elem: null | Node
      • initialElem: null | Node = elem

      Returns null | Node

    • 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

    • Resets the input elements to their default states. This will be the min and max slider position or the optionally defined minDefaultValue and maxDefaultValue. Without minDefaultValue and maxDefaultValue, the slider state is set to disable. The method will trigger a TimeChangeEvent that bubbles up to the parent component.

      Returns void

    • Transforms the date string to a slider position and set it to the specified input element. Optionally, the timeChange event can be omitted. Updates the UI elements (output, slider track) to the new value and validates the positions of the sliders so the handles do not cross each other range mode.

      Parameters

      • dateStr: string

        The date string to be set as the value.

      • Optionallimit: TimeRangeLimit = 'lower'

        The time range limit for which the value is to be set ('lower' or 'upper').

      • OptionaltriggerEvent: boolean = true

        Weather the timeChange event should be dispatched.

      Returns void

    • 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