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

index.js « group_filter « search « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9b009bc03056066ad91978a3c81cca9809e10831 (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
import Vue from 'vue';
import Translate from '~/vue_shared/translate';
import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils';
import GroupFilter from './components/group_filter.vue';

Vue.use(Translate);

export default store => {
  let initialGroup;
  const el = document.getElementById('js-search-group-dropdown');

  const { initialGroupData } = el.dataset;

  initialGroup = JSON.parse(initialGroupData);
  initialGroup = convertObjectPropsToCamelCase(initialGroup, { deep: true });

  return new Vue({
    el,
    store,
    render(createElement) {
      return createElement(GroupFilter, {
        props: {
          initialGroup,
        },
      });
    },
  });
};