mobile sharing: Extract shared/js/typeahead.js.

This extracts get_emoji_matcher and all the
functions it depended on, most of which were
in composebox_typeahead.js.

We also move remove_diacritics out of the people
module.

This is the first major step for #13728.
This commit is contained in:
Steve Howell
2020-01-26 13:21:13 +00:00
committed by Tim Abbott
parent c2ab63094d
commit 4125eb28fd
4 changed files with 94 additions and 91 deletions

View File

@@ -1,3 +1,4 @@
const typeahead = zrequire('typeahead', 'shared/js/typeahead');
set_global('i18n', global.stub_i18n);
zrequire('compose_state');
zrequire('ui_util');
@@ -662,7 +663,7 @@ run_test('initialize', () => {
assert.equal(actual_value, expected_value);
function matcher(query, person) {
query = ct.clean_query_lowercase(query);
query = typeahead.clean_query_lowercase(query);
return ct.query_matches_person(query, person);
}