Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert meteor-autocomplete package to main module structure #12491

Merged
merged 56 commits into from
Nov 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
ad2cd8c
First wave of removal of Meteor global
rodrigok Oct 19, 2018
51095cb
Second wave of removal of Meteor global
rodrigok Oct 19, 2018
3f0c9f7
Third wave of removal of Meteor global
rodrigok Oct 19, 2018
e6dfe65
Fix tests
rodrigok Oct 19, 2018
6c46cd2
Merge remote-tracking branch 'origin/develop' into imports/meteor-1
rodrigok Oct 19, 2018
2ac4a38
Remove global variable SHA256
rodrigok Oct 19, 2018
0ebaa95
Remove global variable WebApp
rodrigok Oct 19, 2018
7db5aa9
Remove global variable EJSON
rodrigok Oct 19, 2018
bff9b31
Remove global variable Email
rodrigok Oct 19, 2018
4aafc1b
Remove global variable HTTP
rodrigok Oct 19, 2018
4551e92
Remove global variable Random
rodrigok Oct 19, 2018
501fec5
Remove global variable ReactiveDict
rodrigok Oct 19, 2018
963b5af
Remove global variable ReactiveVar
rodrigok Oct 19, 2018
103d8c5
Remove global variable Accounts
rodrigok Oct 19, 2018
7c99760
Remove globals variables Match and check
MarcosSpessatto Oct 24, 2018
b4dc88d
Remove global variable Mongo
MarcosSpessatto Oct 24, 2018
c813f5e
Remove global variable moment
MarcosSpessatto Oct 24, 2018
c3b9886
Remove global variable Tracker
MarcosSpessatto Oct 24, 2018
a3e965f
Remove global variable Blaze
MarcosSpessatto Oct 25, 2018
577acf7
Remove global variables FlowRouter and BlazeLayout
MarcosSpessatto Oct 25, 2018
2b82e3c
Add FlowRouter to eslint global in tests file
MarcosSpessatto Oct 25, 2018
be79f54
Remove global variable DDPRateLimiter
MarcosSpessatto Oct 26, 2018
70adda6
Remove global variable Session
MarcosSpessatto Oct 26, 2018
a9c962e
Remove global variable UAParser
MarcosSpessatto Oct 26, 2018
dbb0f28
Remove global variable Promise
MarcosSpessatto Oct 26, 2018
e3b4dc8
Remove global variable Reload
MarcosSpessatto Oct 26, 2018
7346aa3
Remove global variable CryptoJS
MarcosSpessatto Oct 26, 2018
5f9a3d4
Remove global variable Template
MarcosSpessatto Oct 26, 2018
39e7721
Remove global variable TAPi18n
MarcosSpessatto Oct 26, 2018
f1fa949
Remove global variable TAPi18next
MarcosSpessatto Oct 26, 2018
2d8544a
Exposing t function from rocketchat:ui package
MarcosSpessatto Oct 30, 2018
011bd15
Convert chatpal search to main module structure
MarcosSpessatto Oct 30, 2018
8fbd297
Merge branch 'develop' into imports/meteor-1
rodrigok Oct 30, 2018
9f53fab
Merge remote-tracking branch 'origin/imports/meteor-1' into imports/w…
rodrigok Oct 30, 2018
b844ba1
Fix ESLint
rodrigok Oct 30, 2018
a6b81b2
Merge remote-tracking branch 'origin/imports/meteor-1' into imports/w…
rodrigok Oct 30, 2018
d7a0eeb
Merge remote-tracking branch 'origin/imports/wave-2' into imports/wave-3
rodrigok Oct 30, 2018
d119435
Merge remote-tracking branch 'origin/imports/wave-3' into imports/wave-4
rodrigok Oct 30, 2018
8f50571
Merge remote-tracking branch 'origin/imports/wave-4' into imports/wave-5
rodrigok Oct 30, 2018
37eb898
Merge branch 'imports/wave-5' into imports/wave-6-main-module-chatpal…
MarcosSpessatto Oct 30, 2018
ac5bfe1
Convert meteor-accounts-saml to main module structure
MarcosSpessatto Oct 30, 2018
d1b3921
Convert meteor-autocomplete to main module structure
MarcosSpessatto Oct 30, 2018
05b9956
Merge remote-tracking branch 'origin/develop' into imports/meteor-1
rodrigok Nov 1, 2018
827f366
Merge remote-tracking branch 'origin/imports/meteor-1' into imports/w…
rodrigok Nov 1, 2018
8933394
Merge remote-tracking branch 'origin/develop' into imports/wave-2
rodrigok Nov 1, 2018
5d83610
Merge remote-tracking branch 'origin/imports/wave-2' into imports/wave-3
rodrigok Nov 1, 2018
4d5c855
Merge remote-tracking branch 'origin/develop' into imports/wave-3
rodrigok Nov 1, 2018
e8dbdbc
Merge remote-tracking branch 'origin/imports/wave-3' into imports/wave-4
rodrigok Nov 1, 2018
805a431
Merge remote-tracking branch 'origin/develop' into imports/wave-4
rodrigok Nov 1, 2018
7564ab9
Merge remote-tracking branch 'origin/imports/wave-4' into imports/wave-5
rodrigok Nov 1, 2018
5d6ac07
Merge remote-tracking branch 'origin/develop' into imports/wave-5
rodrigok Nov 1, 2018
1afc93e
Merge remote-tracking branch 'origin/imports/wave-5' into imports/wav…
rodrigok Nov 1, 2018
e296b08
Merge remote-tracking branch 'origin/develop' into imports/wave-6-mai…
rodrigok Nov 1, 2018
fc77110
Merge remote-tracking branch 'origin/imports/wave-6-main-module-chatp…
rodrigok Nov 1, 2018
1489ec6
Merge branch 'imports/wave-7-main-module-accounts-saml' into imports/…
rodrigok Nov 1, 2018
7a62c0e
Merge remote-tracking branch 'origin/develop' into imports/wave-8-mai…
rodrigok Nov 1, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions packages/meteor-autocomplete/client/autocomplete-client.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
/* globals Deps, getCaretCoordinates*/
import { Meteor } from 'meteor/meteor';
import { Match } from 'meteor/check';
import { Blaze } from 'meteor/blaze';
import { Deps } from 'meteor/deps';
import _ from 'underscore';
import AutoCompleteRecords from './collection';
import { getCaretCoordinates } from 'meteor/dandv:caret-position';

const isServerSearch = function(rule) {
return _.isString(rule.collection);
Expand Down Expand Up @@ -72,7 +73,7 @@ const getField = function(obj, str) {
return obj;
};

this.AutoComplete = class {
export default class AutoComplete {
constructor(settings) {
this.KEYS = [40, 38, 13, 27, 9];
this.limit = settings.limit || 5;
Expand Down Expand Up @@ -454,4 +455,4 @@ this.AutoComplete = class {
return this.rules[this.matched].template;
}

};
}
8 changes: 8 additions & 0 deletions packages/meteor-autocomplete/client/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import './autocomplete.css';
import './inputs.html';
import './templates';
import AutoComplete from './autocomplete-client';

export {
AutoComplete,
};
2 changes: 1 addition & 1 deletion packages/meteor-autocomplete/client/templates.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* globals AutoComplete */
import { Blaze } from 'meteor/blaze';
import { Template } from 'meteor/templating';
import AutoComplete from './autocomplete-client';
import _ from 'underscore';

// Events on template instances, sent to the autocomplete class
Expand Down
28 changes: 12 additions & 16 deletions packages/meteor-autocomplete/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,19 @@ Package.describe({
});

Package.onUse(function(api) {
api.use(['blaze', 'templating', 'jquery'], 'client');
api.use(['ecmascript']); // both
api.use(['mongo', 'ddp']);
api.use([
'ecmascript',
'mongo',
'ddp',
]);

api.use('dandv:caret-position@2.1.0-3', 'client');

// Our files
api.addFiles([
'client/autocomplete.css',
'client/inputs.html',
'client/autocomplete-client.js',
'client/templates.js',
api.use([
'blaze',
'templating',
'jquery',
'dandv:caret-position@2.1.0-3',
], 'client');

api.addFiles([
'server/autocomplete-server.js',
], 'server');

api.export('Autocomplete', 'server');
api.mainModule('client/index.js', 'client');
api.mainModule('server/index.js', 'server');
});
1 change: 1 addition & 0 deletions packages/meteor-autocomplete/server/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import './autocomplete-server';
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
/* global AutoComplete Deps */
/* global Deps */
import { Meteor } from 'meteor/meteor';
import { ReactiveVar } from 'meteor/reactive-var';
import { Blaze } from 'meteor/blaze';
import { Session } from 'meteor/session';
import { Template } from 'meteor/templating';
import { AutoComplete } from 'meteor/mizzao:autocomplete';
import toastr from 'toastr';
import resetSelection from '../resetSelection';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Package.onUse(function(api) {
'less',
'rocketchat:lib',
'rocketchat:channel-settings',
'mizzao:autocomplete',
'mongo',
]);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* globals AutoComplete */
import { Tracker } from 'meteor/tracker';
import { Blaze } from 'meteor/blaze';
import { ReactiveVar } from 'meteor/reactive-var';
import { Session } from 'meteor/session';
import { Template } from 'meteor/templating';
import { AutoComplete } from 'meteor/mizzao:autocomplete';
import moment from 'moment';

import { call } from 'meteor/rocketchat:lib';
Expand Down
3 changes: 2 additions & 1 deletion packages/rocketchat-ui-flextab/client/tabs/inviteUsers.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { ReactiveVar } from 'meteor/reactive-var';
import { Blaze } from 'meteor/blaze';
import { Session } from 'meteor/session';
import { Template } from 'meteor/templating';
import { AutoComplete } from 'meteor/mizzao:autocomplete';
import toastr from 'toastr';

const acEvents = {
Expand Down Expand Up @@ -121,7 +122,7 @@ Template.inviteUsers.onRendered(function() {
users.set(usersArr);
});
});
/* global AutoComplete Deps */
/* global Deps */
Template.inviteUsers.onCreated(function() {
this.selectedUsers = new ReactiveVar([]);
const filter = { exceptions :[Meteor.user().username].concat(this.selectedUsers.get().map((u) => u.username)) };
Expand Down
1 change: 1 addition & 0 deletions packages/rocketchat-ui-flextab/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Package.onUse(function(api) {
'ecmascript',
'templating',
'rocketchat:lib',
'mizzao:autocomplete',
]);

api.addFiles('client/flexTabBar.html', 'client');
Expand Down
3 changes: 2 additions & 1 deletion packages/rocketchat-ui/client/views/app/createChannel.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Tracker } from 'meteor/tracker';
import { Blaze } from 'meteor/blaze';
import { FlowRouter } from 'meteor/kadira:flow-router';
import { Template } from 'meteor/templating';
import { AutoComplete } from 'meteor/mizzao:autocomplete';
import _ from 'underscore';

const acEvents = {
Expand Down Expand Up @@ -266,7 +267,7 @@ Template.createChannel.onRendered(function() {
users.set(usersArr);
});
});
/* global AutoComplete */

Template.createChannel.onCreated(function() {
this.selectedUsers = new ReactiveVar([]);

Expand Down
1 change: 1 addition & 0 deletions packages/rocketchat-ui/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Package.onUse(function(api) {
'raix:ui-dropped-event',
'rocketchat:lazy-load',
'rocketchat:e2e',
'mizzao:autocomplete',
]);

api.use('kadira:flow-router', 'client');
Expand Down