@appbaseio/reactivesearch-vue 1.23.4-alpha → 1.24.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -52,7 +52,7 @@ var ReactiveComponent = {
52
52
  this.internalComponent = null;
53
53
  this.$defaultQuery = null; // Set custom query in store
54
54
 
55
- index.updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, undefined);
55
+ index.updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.selectedValue);
56
56
  var customQuery = props.customQuery,
57
57
  componentId = props.componentId,
58
58
  filterLabel = props.filterLabel,
@@ -75,7 +75,7 @@ var ReactiveComponent = {
75
75
  }
76
76
 
77
77
  if (customQuery) {
78
- var calcCustomQuery = customQuery(props);
78
+ var calcCustomQuery = customQuery(this.selectedValue, props);
79
79
 
80
80
  var _ref = calcCustomQuery || {},
81
81
  query = _ref.query;
@@ -94,7 +94,7 @@ var ReactiveComponent = {
94
94
 
95
95
  this.updateQuery({
96
96
  componentId: componentId,
97
- queryToSet: queryToSet,
97
+ query: queryToSet,
98
98
  value: this.selectedValue || null,
99
99
  label: filterLabel,
100
100
  showFilter: showFilter,
@@ -145,8 +145,8 @@ var ReactiveComponent = {
145
145
  },
146
146
  beforeMount: function beforeMount() {
147
147
  if (this.internalComponent && this.$props.defaultQuery) {
148
- index.updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props, undefined);
149
- this.$defaultQuery = this.$props.defaultQuery();
148
+ index.updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props, this.selectedValue);
149
+ this.$defaultQuery = this.$props.defaultQuery(this.selectedValue, this.$props);
150
150
 
151
151
  var _ref3 = this.$defaultQuery || {},
152
152
  query = _ref3.query,
@@ -210,8 +210,8 @@ var ReactiveComponent = {
210
210
  }
211
211
  },
212
212
  defaultQuery: function defaultQuery(newVal, oldVal) {
213
- if (newVal && !index.isQueryIdentical(newVal, oldVal, undefined, this.$props)) {
214
- this.$defaultQuery = newVal();
213
+ if (newVal && !index.isQueryIdentical(newVal, oldVal, this.selectedValue, this.$props)) {
214
+ this.$defaultQuery = newVal(this.selectedValue, this.$props);
215
215
 
216
216
  var _ref4 = this.$defaultQuery || {},
217
217
  query = _ref4.query,
@@ -222,7 +222,7 @@ var ReactiveComponent = {
222
222
  } else this.setQueryOptions(this.internalComponent, this.getAggsQuery(), false); // Update default query for RS API
223
223
 
224
224
 
225
- index.updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props, undefined);
225
+ index.updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props, this.selectedValue);
226
226
  var queryToSet = query || null;
227
227
 
228
228
  if (!queryToSet && this.$defaultQuery && this.$defaultQuery.id) {
@@ -236,9 +236,9 @@ var ReactiveComponent = {
236
236
  }
237
237
  },
238
238
  customQuery: function customQuery(newVal, oldVal) {
239
- if (newVal && !index.isQueryIdentical(newVal, oldVal, undefined, this.$props)) {
239
+ if (newVal && !index.isQueryIdentical(newVal, oldVal, this.selectedValue, this.$props)) {
240
240
  var componentId = this.$props.componentId;
241
- this.$customQuery = newVal(this.$props);
241
+ this.$customQuery = newVal(this.selectedValue, this.$props);
242
242
 
243
243
  var _ref5 = this.$customQuery || {},
244
244
  query = _ref5.query,
@@ -249,7 +249,7 @@ var ReactiveComponent = {
249
249
  } else this.setQueryOptions(componentId, this.getAggsQuery(), false); // Update custom query for RS API
250
250
 
251
251
 
252
- index.updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, undefined);
252
+ index.updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.selectedValue);
253
253
  var queryToSet = query || null;
254
254
 
255
255
  if (this.$customQuery && this.$customQuery.id) {
@@ -980,6 +980,11 @@ var ReactiveList = {
980
980
  renderNoResult: function renderNoResult() {
981
981
  var h = this.$createElement;
982
982
  var renderNoResults = this.$scopedSlots.renderNoResults || this.$props.renderNoResults;
983
+
984
+ if (this.$scopedSlots.renderNoResults) {
985
+ return index.isFunction(renderNoResults) ? renderNoResults() : renderNoResults;
986
+ }
987
+
983
988
  return h("p", {
984
989
  "class": getClassName$1(this.$props.innerClass, 'noResults') || null
985
990
  }, [index.isFunction(renderNoResults) ? renderNoResults() : renderNoResults]);
@@ -122,16 +122,7 @@ function initReactivesearch(componentCollection, searchState, settings) {
122
122
  compProps[key] = component[key];
123
123
  }
124
124
  });
125
- var isInternalComponentPresent = false; // Set custom and default queries
126
-
127
- if (component.customQuery && typeof component.customQuery === 'function') {
128
- customQueries[component.componentId] = component.customQuery(component.value, compProps);
129
- }
130
-
131
- if (component.defaultQuery && typeof component.defaultQuery === 'function') {
132
- defaultQueries[component.componentId] = component.defaultQuery(component.value, compProps);
133
- }
134
-
125
+ var isInternalComponentPresent = false;
135
126
  var isResultComponent = resultComponents.includes(componentType);
136
127
  var internalComponent = component.componentId + "__internal";
137
128
  var label = component.filterLabel || component.componentId;
@@ -155,7 +146,16 @@ function initReactivesearch(componentCollection, searchState, settings) {
155
146
  reference: reference,
156
147
  showFilter: showFilter,
157
148
  URLParams: component.URLParams || false
158
- }); // [2] set query options - main component query (valid for result components)
149
+ }); // Set custom and default queries
150
+
151
+ if (component.customQuery && typeof component.customQuery === 'function') {
152
+ customQueries[component.componentId] = component.customQuery(value, compProps);
153
+ }
154
+
155
+ if (component.defaultQuery && typeof component.defaultQuery === 'function') {
156
+ defaultQueries[component.componentId] = component.defaultQuery(value, compProps);
157
+ } // [2] set query options - main component query (valid for result components)
158
+
159
159
 
160
160
  if (componentsWithOptions.includes(componentType)) {
161
161
  var options = component.source.generateQueryOptions ? component.source.generateQueryOptions(component) : null;
@@ -242,7 +242,7 @@ function initReactivesearch(componentCollection, searchState, settings) {
242
242
 
243
243
 
244
244
  if (isResultComponent) {
245
- var _getQuery = getQuery(component, null, componentType),
245
+ var _getQuery = getQuery(component, value, componentType),
246
246
  query = _getQuery.query;
247
247
 
248
248
  queryList = queryReducer(queryList, {
@@ -2,6 +2,6 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var version = "1.23.4-alpha";
5
+ var version = "1.24.3";
6
6
 
7
7
  exports.default = version;
@@ -45,7 +45,7 @@ var ReactiveComponent = {
45
45
  this.internalComponent = null;
46
46
  this.$defaultQuery = null; // Set custom query in store
47
47
 
48
- updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, undefined);
48
+ updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.selectedValue);
49
49
  var customQuery = props.customQuery,
50
50
  componentId = props.componentId,
51
51
  filterLabel = props.filterLabel,
@@ -68,7 +68,7 @@ var ReactiveComponent = {
68
68
  }
69
69
 
70
70
  if (customQuery) {
71
- var calcCustomQuery = customQuery(props);
71
+ var calcCustomQuery = customQuery(this.selectedValue, props);
72
72
 
73
73
  var _ref = calcCustomQuery || {},
74
74
  query = _ref.query;
@@ -87,7 +87,7 @@ var ReactiveComponent = {
87
87
 
88
88
  this.updateQuery({
89
89
  componentId: componentId,
90
- queryToSet: queryToSet,
90
+ query: queryToSet,
91
91
  value: this.selectedValue || null,
92
92
  label: filterLabel,
93
93
  showFilter: showFilter,
@@ -138,8 +138,8 @@ var ReactiveComponent = {
138
138
  },
139
139
  beforeMount: function beforeMount() {
140
140
  if (this.internalComponent && this.$props.defaultQuery) {
141
- updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props, undefined);
142
- this.$defaultQuery = this.$props.defaultQuery();
141
+ updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props, this.selectedValue);
142
+ this.$defaultQuery = this.$props.defaultQuery(this.selectedValue, this.$props);
143
143
 
144
144
  var _ref3 = this.$defaultQuery || {},
145
145
  query = _ref3.query,
@@ -203,8 +203,8 @@ var ReactiveComponent = {
203
203
  }
204
204
  },
205
205
  defaultQuery: function defaultQuery(newVal, oldVal) {
206
- if (newVal && !isQueryIdentical(newVal, oldVal, undefined, this.$props)) {
207
- this.$defaultQuery = newVal();
206
+ if (newVal && !isQueryIdentical(newVal, oldVal, this.selectedValue, this.$props)) {
207
+ this.$defaultQuery = newVal(this.selectedValue, this.$props);
208
208
 
209
209
  var _ref4 = this.$defaultQuery || {},
210
210
  query = _ref4.query,
@@ -215,7 +215,7 @@ var ReactiveComponent = {
215
215
  } else this.setQueryOptions(this.internalComponent, this.getAggsQuery(), false); // Update default query for RS API
216
216
 
217
217
 
218
- updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props, undefined);
218
+ updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props, this.selectedValue);
219
219
  var queryToSet = query || null;
220
220
 
221
221
  if (!queryToSet && this.$defaultQuery && this.$defaultQuery.id) {
@@ -229,9 +229,9 @@ var ReactiveComponent = {
229
229
  }
230
230
  },
231
231
  customQuery: function customQuery(newVal, oldVal) {
232
- if (newVal && !isQueryIdentical(newVal, oldVal, undefined, this.$props)) {
232
+ if (newVal && !isQueryIdentical(newVal, oldVal, this.selectedValue, this.$props)) {
233
233
  var componentId = this.$props.componentId;
234
- this.$customQuery = newVal(this.$props);
234
+ this.$customQuery = newVal(this.selectedValue, this.$props);
235
235
 
236
236
  var _ref5 = this.$customQuery || {},
237
237
  query = _ref5.query,
@@ -242,7 +242,7 @@ var ReactiveComponent = {
242
242
  } else this.setQueryOptions(componentId, this.getAggsQuery(), false); // Update custom query for RS API
243
243
 
244
244
 
245
- updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, undefined);
245
+ updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.selectedValue);
246
246
  var queryToSet = query || null;
247
247
 
248
248
  if (this.$customQuery && this.$customQuery.id) {
@@ -972,6 +972,11 @@ var ReactiveList = {
972
972
  renderNoResult: function renderNoResult() {
973
973
  var h = this.$createElement;
974
974
  var renderNoResults = this.$scopedSlots.renderNoResults || this.$props.renderNoResults;
975
+
976
+ if (this.$scopedSlots.renderNoResults) {
977
+ return isFunction(renderNoResults) ? renderNoResults() : renderNoResults;
978
+ }
979
+
975
980
  return h("p", {
976
981
  "class": getClassName$1(this.$props.innerClass, 'noResults') || null
977
982
  }, [isFunction(renderNoResults) ? renderNoResults() : renderNoResults]);
@@ -116,16 +116,7 @@ function initReactivesearch(componentCollection, searchState, settings) {
116
116
  compProps[key] = component[key];
117
117
  }
118
118
  });
119
- var isInternalComponentPresent = false; // Set custom and default queries
120
-
121
- if (component.customQuery && typeof component.customQuery === 'function') {
122
- customQueries[component.componentId] = component.customQuery(component.value, compProps);
123
- }
124
-
125
- if (component.defaultQuery && typeof component.defaultQuery === 'function') {
126
- defaultQueries[component.componentId] = component.defaultQuery(component.value, compProps);
127
- }
128
-
119
+ var isInternalComponentPresent = false;
129
120
  var isResultComponent = resultComponents.includes(componentType);
130
121
  var internalComponent = component.componentId + "__internal";
131
122
  var label = component.filterLabel || component.componentId;
@@ -149,7 +140,16 @@ function initReactivesearch(componentCollection, searchState, settings) {
149
140
  reference: reference,
150
141
  showFilter: showFilter,
151
142
  URLParams: component.URLParams || false
152
- }); // [2] set query options - main component query (valid for result components)
143
+ }); // Set custom and default queries
144
+
145
+ if (component.customQuery && typeof component.customQuery === 'function') {
146
+ customQueries[component.componentId] = component.customQuery(value, compProps);
147
+ }
148
+
149
+ if (component.defaultQuery && typeof component.defaultQuery === 'function') {
150
+ defaultQueries[component.componentId] = component.defaultQuery(value, compProps);
151
+ } // [2] set query options - main component query (valid for result components)
152
+
153
153
 
154
154
  if (componentsWithOptions.includes(componentType)) {
155
155
  var options = component.source.generateQueryOptions ? component.source.generateQueryOptions(component) : null;
@@ -236,7 +236,7 @@ function initReactivesearch(componentCollection, searchState, settings) {
236
236
 
237
237
 
238
238
  if (isResultComponent) {
239
- var _getQuery = getQuery(component, null, componentType),
239
+ var _getQuery = getQuery(component, value, componentType),
240
240
  query = _getQuery.query;
241
241
 
242
242
  queryList = queryReducer(queryList, {
@@ -1,3 +1,3 @@
1
- var version = "1.23.4-alpha";
1
+ var version = "1.24.3";
2
2
 
3
3
  export default version;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appbaseio/reactivesearch-vue",
3
- "version": "1.23.4-alpha",
3
+ "version": "1.24.3",
4
4
  "private": false,
5
5
  "main": "dist/cjs/index.js",
6
6
  "jsnext:main": "dist/es/index.js",
@@ -34,10 +34,10 @@
34
34
  ],
35
35
  "sideEffects": false,
36
36
  "dependencies": {
37
- "@appbaseio/reactivecore": "9.12.8-alpha",
37
+ "@appbaseio/reactivecore": "9.13.0",
38
38
  "@appbaseio/vue-emotion": "0.4.4",
39
39
  "@vue/babel-helper-vue-jsx-merge-props": "^1.0.0",
40
- "appbase-js": "^4.4.22-alpha",
40
+ "appbase-js": "^4.5.1",
41
41
  "compute-scroll-into-view": "^1.0.11",
42
42
  "emotion": "9.2.12",
43
43
  "hotkeys-js": "^3.8.7",