2019-03-23 09:54:51 -04:00
|
|
|
import Vue from 'vue';
|
|
|
|
|
2020-05-13 08:07:54 -04:00
|
|
|
/**
|
|
|
|
* Deprecated. Please do not use.
|
|
|
|
* Please see https://gitlab.com/groups/gitlab-org/-/epics/2445
|
|
|
|
*/
|
2019-03-23 09:54:51 -04:00
|
|
|
const mountComponent = (Component, props = {}, el = null) =>
|
|
|
|
new Component({
|
|
|
|
propsData: props,
|
|
|
|
}).$mount(el);
|
|
|
|
|
2020-05-13 08:07:54 -04:00
|
|
|
/**
|
|
|
|
* Deprecated. Please do not use.
|
|
|
|
* Please see https://gitlab.com/groups/gitlab-org/-/epics/2445
|
|
|
|
*/
|
2019-03-23 09:54:51 -04:00
|
|
|
export const createComponentWithStore = (Component, store, propsData = {}) =>
|
|
|
|
new Component({
|
|
|
|
store,
|
|
|
|
propsData,
|
|
|
|
});
|
|
|
|
|
2020-05-13 08:07:54 -04:00
|
|
|
/**
|
|
|
|
* Deprecated. Please do not use.
|
|
|
|
* Please see https://gitlab.com/groups/gitlab-org/-/epics/2445
|
|
|
|
*/
|
2019-03-23 09:54:51 -04:00
|
|
|
export const mountComponentWithStore = (Component, { el, props, store }) =>
|
|
|
|
new Component({
|
|
|
|
store,
|
|
|
|
propsData: props || {},
|
|
|
|
}).$mount(el);
|
|
|
|
|
2020-05-13 08:07:54 -04:00
|
|
|
/**
|
|
|
|
* Deprecated. Please do not use.
|
|
|
|
* Please see https://gitlab.com/groups/gitlab-org/-/epics/2445
|
|
|
|
*/
|
2019-03-23 09:54:51 -04:00
|
|
|
export const mountComponentWithSlots = (Component, { props, slots }) => {
|
|
|
|
const component = new Component({
|
|
|
|
propsData: props || {},
|
|
|
|
});
|
|
|
|
|
|
|
|
component.$slots = slots;
|
|
|
|
|
|
|
|
return component.$mount();
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Mount a component with the given render method.
|
|
|
|
*
|
2020-05-13 08:07:54 -04:00
|
|
|
* -----------------------------
|
|
|
|
* Deprecated. Please do not use.
|
|
|
|
* Please see https://gitlab.com/groups/gitlab-org/-/epics/2445
|
|
|
|
* -----------------------------
|
|
|
|
*
|
2019-03-23 09:54:51 -04:00
|
|
|
* This helps with inserting slots that need to be compiled.
|
|
|
|
*/
|
|
|
|
export const mountComponentWithRender = (render, el = null) =>
|
|
|
|
mountComponent(Vue.extend({ render }), {}, el);
|
|
|
|
|
2020-05-13 08:07:54 -04:00
|
|
|
/**
|
|
|
|
* Deprecated. Please do not use.
|
|
|
|
* Please see https://gitlab.com/groups/gitlab-org/-/epics/2445
|
|
|
|
*/
|
2019-03-23 09:54:51 -04:00
|
|
|
export default mountComponent;
|