2021-04-17 20:07:23 +05:30
|
|
|
import Vue from 'vue';
|
|
|
|
import Translate from '../vue_shared/translate';
|
|
|
|
import CycleAnalytics from './components/base.vue';
|
2021-06-08 01:23:25 +05:30
|
|
|
import createStore from './store';
|
2021-04-17 20:07:23 +05:30
|
|
|
|
|
|
|
Vue.use(Translate);
|
|
|
|
|
|
|
|
export default () => {
|
2021-06-08 01:23:25 +05:30
|
|
|
const store = createStore();
|
2021-04-17 20:07:23 +05:30
|
|
|
const el = document.querySelector('#js-cycle-analytics');
|
2021-06-08 01:23:25 +05:30
|
|
|
const { noAccessSvgPath, noDataSvgPath, requestPath } = el.dataset;
|
|
|
|
|
|
|
|
store.dispatch('initializeVsa', {
|
|
|
|
requestPath,
|
|
|
|
});
|
2021-04-17 20:07:23 +05:30
|
|
|
|
|
|
|
// eslint-disable-next-line no-new
|
|
|
|
new Vue({
|
|
|
|
el,
|
|
|
|
name: 'CycleAnalytics',
|
2021-06-08 01:23:25 +05:30
|
|
|
store,
|
2021-04-17 20:07:23 +05:30
|
|
|
render: (createElement) =>
|
|
|
|
createElement(CycleAnalytics, {
|
|
|
|
props: {
|
|
|
|
noDataSvgPath,
|
|
|
|
noAccessSvgPath,
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
});
|
|
|
|
};
|