@appbaseio/reactivesearch-vue 1.16.0-alpha.38 → 1.16.0-alpha.39

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.
@@ -77,7 +77,7 @@ var MultiDropdownList = {
77
77
  selectAllLabel: vueTypes.types.string,
78
78
  showCount: VueTypes.bool.def(true),
79
79
  showFilter: VueTypes.bool.def(true),
80
- size: VueTypes.number.def(100),
80
+ size: VueTypes.number,
81
81
  sortBy: VueTypes.oneOf(['asc', 'desc', 'count']).def('count'),
82
82
  title: vueTypes.types.title,
83
83
  URLParams: VueTypes.bool.def(false),
@@ -60,7 +60,7 @@ var MultiList = {
60
60
  showCount: VueTypes.bool.def(true),
61
61
  showFilter: VueTypes.bool.def(true),
62
62
  showSearch: VueTypes.bool.def(true),
63
- size: VueTypes.number.def(100),
63
+ size: VueTypes.number,
64
64
  sortBy: VueTypes.oneOf(['asc', 'desc', 'count']).def('count'),
65
65
  title: vueTypes.types.title,
66
66
  URLParams: VueTypes.bool.def(false),
@@ -32,7 +32,7 @@ var ReactiveComponent = {
32
32
  componentId: vueTypes.types.stringRequired,
33
33
  aggregationField: vueTypes.types.string,
34
34
  aggregationSize: VueTypes.number,
35
- size: VueTypes.number.def(20),
35
+ size: VueTypes.number,
36
36
  defaultQuery: vueTypes.types.func,
37
37
  customQuery: vueTypes.types.func,
38
38
  filterLabel: vueTypes.types.string,
@@ -76,7 +76,7 @@ var SingleDropdownList = {
76
76
  selectAllLabel: vueTypes.types.string,
77
77
  showCount: VueTypes.bool.def(true),
78
78
  showFilter: VueTypes.bool.def(true),
79
- size: VueTypes.number.def(100),
79
+ size: VueTypes.number,
80
80
  sortBy: VueTypes.oneOf(['asc', 'desc', 'count']).def('count'),
81
81
  title: vueTypes.types.title,
82
82
  URLParams: VueTypes.bool.def(false),
@@ -19,7 +19,8 @@ var fetchGraphQL = _interopDefault(require('@appbaseio/reactivecore/lib/utils/gr
19
19
  var utils = require('@appbaseio/reactivecore/lib/actions/utils');
20
20
 
21
21
  var _excluded = ["aggs", "size"],
22
- _excluded2 = ["query"];
22
+ _excluded2 = ["query"],
23
+ _excluded3 = ["aggs", "size"];
23
24
  var X_SEARCH_CLIENT = 'ReactiveSearch Vue';
24
25
  var componentsWithoutFilters = [constants.componentTypes.numberBox, constants.componentTypes.ratingsFilter];
25
26
  var resultComponents = [constants.componentTypes.reactiveList, constants.componentTypes.reactiveMap];
@@ -181,6 +182,7 @@ function initReactivesearch(componentCollection, searchState, settings) {
181
182
  componentQueryOptions = _rollupPluginBabelHelpers._extends({}, componentQueryOptions, component.source.generateQueryOptions(component));
182
183
  }
183
184
 
185
+ console.log('QUERY LOG componentQueryOptions', component.componentId, componentQueryOptions);
184
186
  var highlightQuery = {};
185
187
 
186
188
  if (component.source.highlightQuery) {
@@ -304,9 +306,23 @@ function initReactivesearch(componentCollection, searchState, settings) {
304
306
  queryObj = _buildQuery.queryObj,
305
307
  options = _buildQuery.options;
306
308
 
307
- var validOptions = ['aggs', 'from', 'sort']; // check if query or options are valid - non-empty
309
+ var componentQueryOptions = options;
310
+ var componentType = component.source.componentType;
311
+ console.log('COMPONENT TYPE', componentType);
312
+
313
+ if (componentType !== constants.componentTypes.reactiveComponent) {
314
+ // don't merge aggs, size
315
+ var _ref3 = options || {},
316
+ aggs = _ref3.aggs,
317
+ size = _ref3.size,
318
+ rest = _rollupPluginBabelHelpers._objectWithoutPropertiesLoose(_ref3, _excluded3);
319
+
320
+ componentQueryOptions = rest;
321
+ }
322
+
323
+ var validOptions = ['aggs', 'from', 'sort']; // check if query or componentQueryOptions are valid - non-empty
308
324
 
309
- if (queryObj && !!Object.keys(queryObj).length || options && Object.keys(options).some(function (item) {
325
+ if (queryObj && !!Object.keys(queryObj).length || componentQueryOptions && Object.keys(componentQueryOptions).some(function (item) {
310
326
  return validOptions.includes(item);
311
327
  })) {
312
328
  var _extends2;
@@ -321,8 +337,12 @@ function initReactivesearch(componentCollection, searchState, settings) {
321
337
 
322
338
  var currentQuery = _rollupPluginBabelHelpers._extends({
323
339
  query: _rollupPluginBabelHelpers._extends({}, queryObj)
324
- }, options, queryOptions[component.componentId]);
340
+ }, componentQueryOptions, queryOptions[component.componentId]);
325
341
 
342
+ console.log('QUERY LOG build QUERY', component.componentId, queryObj);
343
+ console.log('QUERY LOG build OPTIONS', component.componentId, componentQueryOptions);
344
+ console.log('QUERY LOG OPTIONS (component)', component.componentId, queryOptions[component.componentId]);
345
+ console.log('QUERY LOG', component.componentId, currentQuery);
326
346
  queryLog = _rollupPluginBabelHelpers._extends({}, queryLog, (_extends2 = {}, _extends2[component.componentId] = currentQuery, _extends2));
327
347
 
328
348
  if (settings.enableAppbase) {
@@ -2,6 +2,6 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var version = "1.16.0-alpha.38";
5
+ var version = "1.16.0-alpha.39";
6
6
 
7
7
  exports.default = version;
@@ -70,7 +70,7 @@ var MultiDropdownList = {
70
70
  selectAllLabel: types.string,
71
71
  showCount: VueTypes.bool.def(true),
72
72
  showFilter: VueTypes.bool.def(true),
73
- size: VueTypes.number.def(100),
73
+ size: VueTypes.number,
74
74
  sortBy: VueTypes.oneOf(['asc', 'desc', 'count']).def('count'),
75
75
  title: types.title,
76
76
  URLParams: VueTypes.bool.def(false),
@@ -53,7 +53,7 @@ var MultiList = {
53
53
  showCount: VueTypes.bool.def(true),
54
54
  showFilter: VueTypes.bool.def(true),
55
55
  showSearch: VueTypes.bool.def(true),
56
- size: VueTypes.number.def(100),
56
+ size: VueTypes.number,
57
57
  sortBy: VueTypes.oneOf(['asc', 'desc', 'count']).def('count'),
58
58
  title: types.title,
59
59
  URLParams: VueTypes.bool.def(false),
@@ -25,7 +25,7 @@ var ReactiveComponent = {
25
25
  componentId: types.stringRequired,
26
26
  aggregationField: types.string,
27
27
  aggregationSize: VueTypes.number,
28
- size: VueTypes.number.def(20),
28
+ size: VueTypes.number,
29
29
  defaultQuery: types.func,
30
30
  customQuery: types.func,
31
31
  filterLabel: types.string,
@@ -69,7 +69,7 @@ var SingleDropdownList = {
69
69
  selectAllLabel: types.string,
70
70
  showCount: VueTypes.bool.def(true),
71
71
  showFilter: VueTypes.bool.def(true),
72
- size: VueTypes.number.def(100),
72
+ size: VueTypes.number,
73
73
  sortBy: VueTypes.oneOf(['asc', 'desc', 'count']).def('count'),
74
74
  title: types.title,
75
75
  URLParams: VueTypes.bool.def(false),
@@ -13,7 +13,8 @@ import fetchGraphQL from '@appbaseio/reactivecore/lib/utils/graphQL';
13
13
  import { isPropertyDefined } from '@appbaseio/reactivecore/lib/actions/utils';
14
14
 
15
15
  var _excluded = ["aggs", "size"],
16
- _excluded2 = ["query"];
16
+ _excluded2 = ["query"],
17
+ _excluded3 = ["aggs", "size"];
17
18
  var X_SEARCH_CLIENT = 'ReactiveSearch Vue';
18
19
  var componentsWithoutFilters = [componentTypes.numberBox, componentTypes.ratingsFilter];
19
20
  var resultComponents = [componentTypes.reactiveList, componentTypes.reactiveMap];
@@ -175,6 +176,7 @@ function initReactivesearch(componentCollection, searchState, settings) {
175
176
  componentQueryOptions = _extends({}, componentQueryOptions, component.source.generateQueryOptions(component));
176
177
  }
177
178
 
179
+ console.log('QUERY LOG componentQueryOptions', component.componentId, componentQueryOptions);
178
180
  var highlightQuery = {};
179
181
 
180
182
  if (component.source.highlightQuery) {
@@ -298,9 +300,23 @@ function initReactivesearch(componentCollection, searchState, settings) {
298
300
  queryObj = _buildQuery.queryObj,
299
301
  options = _buildQuery.options;
300
302
 
301
- var validOptions = ['aggs', 'from', 'sort']; // check if query or options are valid - non-empty
303
+ var componentQueryOptions = options;
304
+ var componentType = component.source.componentType;
305
+ console.log('COMPONENT TYPE', componentType);
306
+
307
+ if (componentType !== componentTypes.reactiveComponent) {
308
+ // don't merge aggs, size
309
+ var _ref3 = options || {},
310
+ aggs = _ref3.aggs,
311
+ size = _ref3.size,
312
+ rest = _objectWithoutPropertiesLoose(_ref3, _excluded3);
313
+
314
+ componentQueryOptions = rest;
315
+ }
316
+
317
+ var validOptions = ['aggs', 'from', 'sort']; // check if query or componentQueryOptions are valid - non-empty
302
318
 
303
- if (queryObj && !!Object.keys(queryObj).length || options && Object.keys(options).some(function (item) {
319
+ if (queryObj && !!Object.keys(queryObj).length || componentQueryOptions && Object.keys(componentQueryOptions).some(function (item) {
304
320
  return validOptions.includes(item);
305
321
  })) {
306
322
  var _extends2;
@@ -315,8 +331,12 @@ function initReactivesearch(componentCollection, searchState, settings) {
315
331
 
316
332
  var currentQuery = _extends({
317
333
  query: _extends({}, queryObj)
318
- }, options, queryOptions[component.componentId]);
334
+ }, componentQueryOptions, queryOptions[component.componentId]);
319
335
 
336
+ console.log('QUERY LOG build QUERY', component.componentId, queryObj);
337
+ console.log('QUERY LOG build OPTIONS', component.componentId, componentQueryOptions);
338
+ console.log('QUERY LOG OPTIONS (component)', component.componentId, queryOptions[component.componentId]);
339
+ console.log('QUERY LOG', component.componentId, currentQuery);
320
340
  queryLog = _extends({}, queryLog, (_extends2 = {}, _extends2[component.componentId] = currentQuery, _extends2));
321
341
 
322
342
  if (settings.enableAppbase) {
@@ -1,3 +1,3 @@
1
- var version = "1.16.0-alpha.38";
1
+ var version = "1.16.0-alpha.39";
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.16.0-alpha.38",
3
+ "version": "1.16.0-alpha.39",
4
4
  "private": false,
5
5
  "main": "dist/cjs/index.js",
6
6
  "jsnext:main": "dist/es/index.js",