Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "defaults"

Index

References

VERSION

Renames and exports _VERSION

Variables

Const API_ENDPOINT

API_ENDPOINT: "/v1/prepared_search" = "/v1/prepared_search"

The default API endpoint to which auto-complete and search queries are sent.

Const AUTOCOMPLETE_DEFAULT_THRESHOLD

AUTOCOMPLETE_DEFAULT_THRESHOLD: 0 = 0

Default threshold of characters to type before the first autocomplete request is sent

Const CSS_AUTOCOMPLETE_ACTIVE

CSS_AUTOCOMPLETE_ACTIVE: "smart-search-autocomplete-active" = "smart-search-autocomplete-active"

Default CSS class for the active autocomplete item

Const CSS_AUTOCOMPLETE_ITEM

CSS_AUTOCOMPLETE_ITEM: "smart-search-autocomplete-item" = "smart-search-autocomplete-item"

Default CSS class for an autocomplete item

Const CSS_AUTOCOMPLETE_WIDGET

CSS_AUTOCOMPLETE_WIDGET: "smart-search-autocomplete-widget" = "smart-search-autocomplete-widget"

Default CSS class for the autocomplete box

Const CSS_CURRENT_PAGE

CSS_CURRENT_PAGE: "smart-search-pagination-current" = "smart-search-pagination-current"

Default CSS class for the pagination current page button.

Const CSS_DID_YOU_MEAN_ELEMENT

CSS_DID_YOU_MEAN_ELEMENT: "smart-search-did-you-mean-element" = "smart-search-did-you-mean-element"

Default CSS class for a single 'Did you mean' suggestion.

Const CSS_DID_YOU_MEAN_WRAPPER

CSS_DID_YOU_MEAN_WRAPPER: "smart-search-did-you-mean-wrapper" = "smart-search-did-you-mean-wrapper"

Default CSS class for the single 'Did you mean' wrapper.

Const CSS_NEXT_BUTTON

CSS_NEXT_BUTTON: "smart-search-pagination-next" = "smart-search-pagination-next"

Default CSS class for the pagination next button.

Const CSS_PAGE_BUTTON

CSS_PAGE_BUTTON: "smart-search-pagination-page" = "smart-search-pagination-page"

Default CSS class for the pagination page buttons.

Const CSS_PAGINATION

CSS_PAGINATION: "smart-search-pagination" = "smart-search-pagination"

Default CSS class for the pagination wrapper HTML element.

Const CSS_PREV_BUTTON

CSS_PREV_BUTTON: "smart-search-pagination-prev" = "smart-search-pagination-prev"

Default CSS class for the pagination prev button.

Const CSS_SEARCH_RESULT_ELEMENT

CSS_SEARCH_RESULT_ELEMENT: "smart-search-search-result" = "smart-search-search-result"

Default CSS class for a single search result inside the wrapper.

Const CSS_SEARCH_RESULT_WRAPPER

CSS_SEARCH_RESULT_WRAPPER: "smart-search-search-results" = "smart-search-search-results"

Default CSS class for the search result wrapper HTML element.

Const VERSION

VERSION: string

Const _VERSION

_VERSION: string = VERSION

Functions

Const DID_YOU_MEAN_FUNCTION

  • DID_YOU_MEAN_FUNCTION(value: string): string
  • The default function to render a single 'Did you mean' suggestion. The default algorithm is:

    (value: string): string => {
        return value
    }

    Parameters

    • value: string

      the suggestion.

    Returns string

Const PAGINATION_FUNCTION

  • PAGINATION_FUNCTION(value: string): string
  • The default function to render a single pagination element. The default algorithm is:

    (value: string): string => {
        return value
    }

    Parameters

    • value: string

      The page value. The first page corresponds to the value 0.

    Returns string

    The given value without modification.

Const SEARCH_RESULT_FUNCTION

  • The default function to render a single search result. The default algorithm is:

    (data: Result, highlights: Highlighting): string => {
        return `<a href="${data.link}">
                  <h1>${data.title}</h1>
                  <p>${highlights.content}</p>
                </a>`
    }

    Parameters

    • data: Result

      The search result information like link or title.

    • highlights: Highlighting

      The content to be displayed on the search result page.

    Returns string

Generated using TypeDoc