From ac31dd099020c7a918c87878ea754397e599bd10 Mon Sep 17 00:00:00 2001 From: Alec Hirsch Date: Fri, 29 Dec 2017 15:19:37 -0500 Subject: [PATCH 1/7] fixed deprecation around computed properties and having only one string --- addon/components/search-flow.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addon/components/search-flow.js b/addon/components/search-flow.js index 366d6e2..d6fc2b4 100644 --- a/addon/components/search-flow.js +++ b/addon/components/search-flow.js @@ -64,7 +64,7 @@ export default Ember.Component.extend({ }); }); }), - availableParameters: Ember.computed('parameters,filters.[],filters.@each.parameter,parameters.@each.suggested', function () { + availableParameters: Ember.computed('parameters', 'filters.[]', 'filters.@each.parameter', 'parameters.@each.suggested', function () { return this.get('parameters').reject(parameter => { return !parameter.name || !parameter.title || (parameter.allowMultiple === false && this.get('filters').find(filter => { return filter.get('parameter.name') === parameter.name; @@ -129,7 +129,7 @@ export default Ember.Component.extend({ this.get('onQueryUpdated')(query); } }, - canAddNewFilter: Ember.computed('isSelectingParameter,filters.[],filters.@each.isFocused,maxFilters', function () { + canAddNewFilter: Ember.computed('isSelectingParameter', 'filters.[]', 'filters.@each.isFocused', 'maxFilters', function () { if (this.get('isSelectingParameter')) { return false; } From 0c9b39216853151f39ebabcc7590616714ffca46 Mon Sep 17 00:00:00 2001 From: Alec Hirsch Date: Fri, 29 Dec 2017 15:20:01 -0500 Subject: [PATCH 2/7] 0.6.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0a3482c..c664c76 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-search-flow", - "version": "0.6.0", + "version": "0.6.1", "description": "Multi-faceted search for ember.", "directories": { "doc": "doc", From 959427b0f841f59e0c6a0bbc4b74fd19155b451f Mon Sep 17 00:00:00 2001 From: Patrick Hickey Date: Thu, 12 Apr 2018 14:15:39 -0400 Subject: [PATCH 3/7] changing babel version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b763e87..f433511 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ }, "dependencies": { "ember-cli-autoprefixer": "^0.6.0", - "ember-cli-babel": "^5.1.7", + "ember-cli-babel": "^6.6.0", "ember-cli-htmlbars": "^1.0.10", "ember-cli-sass": "^6.1.0" }, From 58f6b533708e7a1028ff7023cab17653943e70ca Mon Sep 17 00:00:00 2001 From: Alec Hirsch Date: Thu, 12 Apr 2018 14:37:37 -0400 Subject: [PATCH 4/7] 0.6.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 767a88d..42ca15b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-search-flow", - "version": "0.6.1", + "version": "0.6.2", "description": "Multi-faceted search for ember.", "directories": { "doc": "doc", From 408450839ea781faee0d329ea4f48769590fa354 Mon Sep 17 00:00:00 2001 From: Alec Hirsch Date: Thu, 12 Jul 2018 11:34:12 -0400 Subject: [PATCH 5/7] fixed computed and observer properties --- addon/components/search-flow.js | 2 +- addon/components/search-flow/input-dropdown.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addon/components/search-flow.js b/addon/components/search-flow.js index d6fc2b4..a455ec0 100644 --- a/addon/components/search-flow.js +++ b/addon/components/search-flow.js @@ -24,7 +24,7 @@ export default Ember.Component.extend({ return parameter.toLowerCase() === param.name.toLowerCase(); }); }, - processQueries: Ember.observer('query,parameters', function () { + processQueries: Ember.observer('query', 'parameters', function () { if (this.get('queryGeneratedByComponent')) { this.set('queryGeneratedByComponent', false); return; diff --git a/addon/components/search-flow/input-dropdown.js b/addon/components/search-flow/input-dropdown.js index 359221b..851b2a7 100644 --- a/addon/components/search-flow/input-dropdown.js +++ b/addon/components/search-flow/input-dropdown.js @@ -45,7 +45,7 @@ export default Ember.Component.extend({ this.$('.search-flow_input').css('width', tempDiv.width() + 3); tempDiv.remove(); }, - availableOptions: Ember.computed('options.[],value', function () { + availableOptions: Ember.computed('options.[]', 'value', function () { let options = this.get('options'); if (!options || !this.get('filter.isFocused')) { return Ember.A([]); From f7743a168d67c31571c05bc53eac0d09e33fe922 Mon Sep 17 00:00:00 2001 From: Alec Hirsch Date: Thu, 12 Jul 2018 11:34:26 -0400 Subject: [PATCH 6/7] 0.6.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 42ca15b..60fc521 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-search-flow", - "version": "0.6.2", + "version": "0.6.3", "description": "Multi-faceted search for ember.", "directories": { "doc": "doc", From 38a724e50db19145318f41fff49971cfbccc5b1e Mon Sep 17 00:00:00 2001 From: Artem Gurzhii Date: Mon, 1 Oct 2018 19:41:25 +0200 Subject: [PATCH 7/7] add firefox support --- addon/components/search-flow.js | 4 ++-- addon/components/search-flow/input-dropdown.js | 10 +++++----- addon/templates/components/search-flow.hbs | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/addon/components/search-flow.js b/addon/components/search-flow.js index a455ec0..bb9bf19 100644 --- a/addon/components/search-flow.js +++ b/addon/components/search-flow.js @@ -139,7 +139,7 @@ export default Ember.Component.extend({ return !this.get('filters').isAny('isFocused'); }), actions: { - newFilter() { + newFilter(event) { if (event.which === 13) { // Enter key // Must prevent the filter from auto selecting an option this.set('didHitEnter', true); @@ -182,4 +182,4 @@ export default Ember.Component.extend({ this.generateQuery(); }, } -}); \ No newline at end of file +}); diff --git a/addon/components/search-flow/input-dropdown.js b/addon/components/search-flow/input-dropdown.js index 851b2a7..2a233ab 100644 --- a/addon/components/search-flow/input-dropdown.js +++ b/addon/components/search-flow/input-dropdown.js @@ -72,7 +72,7 @@ export default Ember.Component.extend({ if (this.get('filter.parameter.sort')){ options = options.sortBy('title'); } - + // Insert contains option into list if (this.get('filter.parameter.contains') && this.get('value') && options.length) { options.unshift(Ember.Object.create({ title: `Contains: ${this.get('value')}`, value: this.get('value'), isContains: true })); @@ -114,7 +114,7 @@ export default Ember.Component.extend({ this.get('newFilter')(activeOption.get('value')); } else { - + this.set('filter.value', activeOption.get('value')); if (activeOption.get('isContains')) { this.set('filter.isContains', true); @@ -135,7 +135,7 @@ export default Ember.Component.extend({ this.send('selectOption', this.get('activeOption')); } }, - inputKeyDown() { + inputKeyDown(_, event) { if (event.which === 38) { // Up event.preventDefault(); let previousItem = this.get(`availableOptions.${this.get('activeOption.index') - 1}`); @@ -158,7 +158,7 @@ export default Ember.Component.extend({ this.blurInput(); } }, - inputKeyUp() { + inputKeyUp(_, event) { // Prevent the up or down key from moving the cursor when releasing the key if (event.which === 38 || event.which === 40) { // Up or Down event.preventDefault(); @@ -183,7 +183,7 @@ export default Ember.Component.extend({ // Set the value to what the original filter value was this.set('filter.isFocused', false); - if (this.get('filter.isContains')) { + if (this.get('filter.isContains')) { this.set('value', `Contains: ${this.get('filter.value')}`); } this.get('inputBlurred')(this.get('isParameterSelection'), this.get('filter'), this.get('shouldRemoveFilter')); diff --git a/addon/templates/components/search-flow.hbs b/addon/templates/components/search-flow.hbs index ca79579..6c1d748 100644 --- a/addon/templates/components/search-flow.hbs +++ b/addon/templates/components/search-flow.hbs @@ -2,7 +2,7 @@ {{#each filters as |filter|}}
- {{filter.parameter.title}} : + {{filter.parameter.title}} :
{{search-flow/input-dropdown @@ -30,7 +30,7 @@
{{/if}} {{#if availableParameters.length}} -
-{{yield}} \ No newline at end of file +{{yield}}