blob: b480fc7c71376f24c20a98e71b47c1d79b6d7acd (
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
|
import Vue from 'vue';
import VueApollo from 'vue-apollo';
import DeprecatedKeywordNotification from './components/notification/deprecated_type_keyword_notification.vue';
Vue.use(VueApollo);
export const createPipelineNotificationApp = (elSelector, apolloProvider) => {
const el = document.querySelector(elSelector);
if (!el) {
return;
}
const { deprecatedKeywordsDocPath, fullPath, pipelineIid } = el.dataset;
// eslint-disable-next-line no-new
new Vue({
el,
components: {
DeprecatedKeywordNotification,
},
provide: {
deprecatedKeywordsDocPath,
fullPath,
pipelineIid,
},
apolloProvider,
render(createElement) {
return createElement('deprecated-keyword-notification');
},
});
};
|