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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
import Vue from 'vue';
import VueApollo from 'vue-apollo';
import { gqlClient } from '~/issues/list/graphql';
import { parseBoolean } from '~/lib/utils/common_utils';
import IssuesDashboardApp from './components/issues_dashboard_app.vue';
export async function mountIssuesDashboardApp() {
const el = document.querySelector('.js-issues-dashboard');
if (!el) {
return null;
}
Vue.use(VueApollo);
const {
autocompleteAwardEmojisPath,
autocompleteUsersPath,
calendarPath,
dashboardLabelsPath,
dashboardMilestonesPath,
emptyStateWithFilterSvgPath,
emptyStateWithoutFilterSvgPath,
hasBlockedIssuesFeature,
hasIssuableHealthStatusFeature,
hasIssueDateFilterFeature,
hasIssueWeightsFeature,
hasScopedLabelsFeature,
initialSort,
isPublicVisibilityRestricted,
isSignedIn,
rssPath,
} = el.dataset;
return new Vue({
el,
name: 'IssuesDashboardRoot',
apolloProvider: new VueApollo({
defaultClient: await gqlClient(),
}),
provide: {
autocompleteAwardEmojisPath,
autocompleteUsersPath,
calendarPath,
dashboardLabelsPath,
dashboardMilestonesPath,
emptyStateWithFilterSvgPath,
emptyStateWithoutFilterSvgPath,
hasBlockedIssuesFeature: parseBoolean(hasBlockedIssuesFeature),
hasIssuableHealthStatusFeature: parseBoolean(hasIssuableHealthStatusFeature),
hasIssueDateFilterFeature: parseBoolean(hasIssueDateFilterFeature),
hasIssueWeightsFeature: parseBoolean(hasIssueWeightsFeature),
hasScopedLabelsFeature: parseBoolean(hasScopedLabelsFeature),
initialSort,
isPublicVisibilityRestricted: parseBoolean(isPublicVisibilityRestricted),
isSignedIn: parseBoolean(isSignedIn),
rssPath,
},
render: (createComponent) => createComponent(IssuesDashboardApp),
});
}
|