Welcome to mirror list, hosted at ThFree Co, Russian Federation.

instantsearch.js « search « frontend « content - gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 64bd9f9a474955dcc6d7d8b88ec57ce09fa5c796 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import Vue from 'vue';
import {
  AisInstantSearch,
  AisStateResults,
  AisSearchBox,
  AisStats,
  AisPoweredBy,
  AisInfiniteHits,
  AisConfigure,
} from 'vue-instantsearch';
import SearchPage from './components/search_page.vue';
import { getDocsVersion } from './search';

Vue.component(AisInstantSearch.name, AisInstantSearch);
Vue.component(AisSearchBox.name, AisSearchBox);
Vue.component(AisStateResults.name, AisStateResults);
Vue.component(AisStats.name, AisStats);
Vue.component(AisPoweredBy.name, AisPoweredBy);
Vue.component(AisInfiniteHits.name, AisInfiniteHits);
Vue.component(AisConfigure.name, AisConfigure);

const docsVersion = getDocsVersion();

document.addEventListener('DOMContentLoaded', () => {
  return new Vue({
    el: '.js-instantsearch',
    render(createElement) {
      return createElement(SearchPage, {
        props: {
          docsVersion,
        },
      });
    },
  });
});