2021-03-11 19:13:27 +05:30
|
|
|
import Vue from 'vue';
|
|
|
|
import SearchSettings from '~/search_settings/components/search_settings.vue';
|
|
|
|
import { expandSection, closeSection, isExpanded } from '~/settings_panels';
|
|
|
|
|
|
|
|
const mountSearch = ({ el }) =>
|
|
|
|
new Vue({
|
|
|
|
el,
|
|
|
|
render: (h) =>
|
|
|
|
h(SearchSettings, {
|
|
|
|
ref: 'searchSettings',
|
|
|
|
props: {
|
|
|
|
searchRoot: document.querySelector('#content-body'),
|
|
|
|
sectionSelector: '.js-search-settings-section, section.settings',
|
2022-11-25 23:54:43 +05:30
|
|
|
hideWhenEmptySelector: '.js-hide-when-nothing-matches-search',
|
2021-03-11 19:13:27 +05:30
|
|
|
isExpandedFn: isExpanded,
|
|
|
|
},
|
|
|
|
on: {
|
|
|
|
collapse: closeSection,
|
|
|
|
expand: expandSection,
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
});
|
|
|
|
|
|
|
|
export default mountSearch;
|