Commit c76daed5 authored by Luke "Jared" Bennett's avatar Luke "Jared" Bennett

Prep for moving droplab to npm

parent bf7dc5af
......@@ -8,7 +8,6 @@
"plugins": [
["istanbul", {
"exclude": [
"app/assets/javascripts/droplab/**/*",
"spec/javascripts/**/*"
]
}],
......
......@@ -5,6 +5,5 @@
/public/
/tmp/
/vendor/
/app/assets/javascripts/droplab
karma.config.js
webpack.config.js
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
import droplabFilter from '../droplab/plugins/filter';
import Filter from '@gitlab-org/droplab/dist/plugins/Filter';
require('./filtered_search_dropdown');
......@@ -7,7 +7,7 @@ require('./filtered_search_dropdown');
constructor(droplab, dropdown, input, filter) {
super(droplab, dropdown, input, filter);
this.config = {
droplabFilter: {
Filter: {
template: 'hint',
filterFunction: gl.DropdownUtils.filterHint.bind(null, input),
},
......@@ -69,12 +69,12 @@ require('./filtered_search_dropdown');
}
});
this.droplab.changeHookList(this.hookId, this.dropdown, [droplabFilter], this.config);
this.droplab.changeHookList(this.hookId, this.dropdown, [Filter], this.config);
this.droplab.setData(this.hookId, dropdownData);
}
init() {
this.droplab.addHook(this.input, this.dropdown, [droplabFilter], this.config).init();
this.droplab.addHook(this.input, this.dropdown, [Filter], this.config).init();
}
}
......
import droplabAjax from '../droplab/plugins/ajax';
import droplabFilter from '../droplab/plugins/filter';
import Ajax from '@gitlab-org/droplab/dist/plugins/Ajax';
import Filter from '@gitlab-org/droplab/dist/plugins/Filter';
require('./filtered_search_dropdown');
......@@ -9,12 +9,12 @@ require('./filtered_search_dropdown');
super(droplab, dropdown, input, filter);
this.symbol = symbol;
this.config = {
droplabAjax: {
Ajax: {
endpoint,
method: 'setData',
loadingTemplate: this.loadingTemplate,
},
droplabFilter: {
Filter: {
filterFunction: gl.DropdownUtils.filterWithSymbol.bind(null, this.symbol, input),
template: 'title',
},
......@@ -30,13 +30,13 @@ require('./filtered_search_dropdown');
renderContent(forceShowList = false) {
this.droplab
.changeHookList(this.hookId, this.dropdown, [droplabAjax, droplabFilter], this.config);
.changeHookList(this.hookId, this.dropdown, [Ajax, Filter], this.config);
super.renderContent(forceShowList);
}
init() {
this.droplab
.addHook(this.input, this.dropdown, [droplabAjax, droplabFilter], this.config).init();
.addHook(this.input, this.dropdown, [Ajax, Filter], this.config).init();
}
}
......
import droplabAjaxFilter from '../droplab/plugins/ajax_filter';
import AjaxFilter from '@gitlab-org/droplab/dist/plugins/AjaxFilter';
require('./filtered_search_dropdown');
......@@ -7,7 +7,7 @@ require('./filtered_search_dropdown');
constructor(droplab, dropdown, input, filter) {
super(droplab, dropdown, input, filter);
this.config = {
droplabAjaxFilter: {
AjaxFilter: {
endpoint: `${gon.relative_url_root || ''}/autocomplete/users.json`,
searchKey: 'search',
params: {
......@@ -28,7 +28,7 @@ require('./filtered_search_dropdown');
}
renderContent(forceShowList = false) {
this.droplab.changeHookList(this.hookId, this.dropdown, [droplabAjaxFilter], this.config);
this.droplab.changeHookList(this.hookId, this.dropdown, [AjaxFilter], this.config);
super.renderContent(forceShowList);
}
......@@ -56,7 +56,7 @@ require('./filtered_search_dropdown');
}
init() {
this.droplab.addHook(this.input, this.dropdown, [droplabAjaxFilter], this.config).init();
this.droplab.addHook(this.input, this.dropdown, [AjaxFilter], this.config).init();
}
}
......
import DropLab from '../droplab/droplab';
import DropLab from '@gitlab-org/droplab';
import FilteredSearchContainer from './container';
(() => {
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment