@appbaseio/reactivesearch-vue 1.23.3 → 1.24.2

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.
Files changed (51) hide show
  1. package/dist/@appbaseio/reactivesearch-vue.umd.js +281 -71
  2. package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
  3. package/dist/@appbaseio/reactivesearch-vue.umd.min.js +5 -5
  4. package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
  5. package/dist/cjs/DataSearch.js +2 -2
  6. package/dist/cjs/{DropDown-59a7971b.js → DropDown-6815b9b6.js} +1 -1
  7. package/dist/cjs/DynamicRangeSlider.js +1 -1
  8. package/dist/cjs/MultiDropdownList.js +2 -2
  9. package/dist/cjs/MultiList.js +1 -1
  10. package/dist/cjs/MultiRange.js +1 -1
  11. package/dist/cjs/RangeInput.js +1 -1
  12. package/dist/cjs/RangeSlider.js +1 -1
  13. package/dist/cjs/ReactiveBase.js +14 -8
  14. package/dist/cjs/ReactiveComponent.js +1 -1
  15. package/dist/cjs/ReactiveList.js +34 -36
  16. package/dist/cjs/ResultCard.js +1 -1
  17. package/dist/cjs/ResultList.js +1 -1
  18. package/dist/cjs/SelectedFilters.js +1 -1
  19. package/dist/cjs/SingleDropdownList.js +2 -2
  20. package/dist/cjs/SingleList.js +1 -1
  21. package/dist/cjs/SingleRange.js +1 -1
  22. package/dist/cjs/ToggleButton.js +1 -1
  23. package/dist/cjs/index.js +3 -3
  24. package/dist/cjs/initReactivesearch.js +1 -1
  25. package/dist/cjs/install.js +3 -3
  26. package/dist/cjs/version.js +1 -1
  27. package/dist/cjs/{vueTypes-22b4fd3a.js → vueTypes-4c19b4c8.js} +5 -1
  28. package/dist/es/DataSearch.js +2 -2
  29. package/dist/es/{DropDown-db7fe433.js → DropDown-035c804f.js} +1 -1
  30. package/dist/es/DynamicRangeSlider.js +1 -1
  31. package/dist/es/MultiDropdownList.js +2 -2
  32. package/dist/es/MultiList.js +1 -1
  33. package/dist/es/MultiRange.js +1 -1
  34. package/dist/es/RangeInput.js +1 -1
  35. package/dist/es/RangeSlider.js +1 -1
  36. package/dist/es/ReactiveBase.js +14 -8
  37. package/dist/es/ReactiveComponent.js +1 -1
  38. package/dist/es/ReactiveList.js +34 -36
  39. package/dist/es/ResultCard.js +1 -1
  40. package/dist/es/ResultList.js +1 -1
  41. package/dist/es/SelectedFilters.js +1 -1
  42. package/dist/es/SingleDropdownList.js +2 -2
  43. package/dist/es/SingleList.js +1 -1
  44. package/dist/es/SingleRange.js +1 -1
  45. package/dist/es/ToggleButton.js +1 -1
  46. package/dist/es/index.js +3 -3
  47. package/dist/es/initReactivesearch.js +1 -1
  48. package/dist/es/install.js +3 -3
  49. package/dist/es/version.js +1 -1
  50. package/dist/es/{vueTypes-e89c8a3c.js → vueTypes-fb61bb7b.js} +5 -1
  51. package/package.json +3 -3
@@ -8398,6 +8398,11 @@
8398
8398
  var value = internalValue && internalValue.value || '';
8399
8399
 
8400
8400
  if (isAppbaseEnabled && (componentProps.enablePopularSuggestions || componentProps.enableQuerySuggestions)) {
8401
+ if (config.mongodb) {
8402
+ dispatch((0, misc.setDefaultPopularSuggestions)([], componentId.split('__internal')[0]));
8403
+ return;
8404
+ }
8405
+
8401
8406
  var suggQuery = (0, utils.getSuggestionQuery)(getState, componentId);
8402
8407
  appbaseRef.getQuerySuggestions(suggQuery).then(function (suggestions) {
8403
8408
  var querySuggestion = suggestions[(0, utils.getQuerySuggestionsId)(componentId)];
@@ -9128,7 +9133,8 @@
9128
9133
  protocol = _getState$appbaseRef.protocol,
9129
9134
  credentials = _getState$appbaseRef.credentials;
9130
9135
 
9131
- var app = config.app;
9136
+ var app = config.app,
9137
+ mongodb = config.mongodb;
9132
9138
  var esURL = protocol + '://' + url;
9133
9139
  var parsedURL = (esURL || '').replace(/\/+$/, '');
9134
9140
  var requestOptions = {
@@ -9175,7 +9181,14 @@
9175
9181
  }
9176
9182
  }
9177
9183
 
9178
- fetch(parsedURL + '/_analytics/' + app + '/recent-searches?' + queryString, requestOptions).then(function (res) {
9184
+ if (mongodb) {
9185
+ return dispatch({
9186
+ type: constants.RECENT_SEARCHES_SUCCESS,
9187
+ data: []
9188
+ });
9189
+ }
9190
+
9191
+ return fetch(parsedURL + '/_analytics/' + app + '/recent-searches?' + queryString, requestOptions).then(function (res) {
9179
9192
  if (res.status >= 500 || res.status >= 400) {
9180
9193
  return dispatch({
9181
9194
  type: constants.RECENT_SEARCHES_ERROR,
@@ -12780,7 +12793,11 @@
12780
12793
  userId: VueTypes.string,
12781
12794
  customEvents: VueTypes.object,
12782
12795
  enableTelemetry: VueTypes.bool.def(true)
12783
- }).def({})
12796
+ }).def({}),
12797
+ mongodb: VueTypes.shape({
12798
+ db: VueTypes.string,
12799
+ collection: VueTypes.string
12800
+ })
12784
12801
  };
12785
12802
 
12786
12803
  var getClassName = lib_8.getClassName,
@@ -13993,12 +14010,9 @@
13993
14010
  return this.$listeners && this.$listeners.resultStats;
13994
14011
  },
13995
14012
  stats: function stats() {
13996
- var _this$getAllData = this.getAllData(),
13997
- filteredResults = _this$getAllData.filteredResults;
13998
-
13999
14013
  return _extends({}, getResultStats(this), {
14000
14014
  currentPage: this.currentPageState,
14001
- displayedResults: filteredResults.length
14015
+ displayedResults: this.data.length
14002
14016
  });
14003
14017
  },
14004
14018
  hasCustomRender: function hasCustomRender() {
@@ -14007,6 +14021,27 @@
14007
14021
  showInfiniteScroll: function showInfiniteScroll() {
14008
14022
  // Pagination has higher priority then infinite scroll
14009
14023
  return this.infiniteScroll && !this.shouldRenderPagination;
14024
+ },
14025
+ data: function data() {
14026
+ var results = parseHits(this.hits) || [];
14027
+ var parsedPromotedResults = parseHits(this.promotedResults) || [];
14028
+ var filteredResults = results;
14029
+
14030
+ if (parsedPromotedResults.length) {
14031
+ var ids = parsedPromotedResults.map(function (item) {
14032
+ return item._id;
14033
+ }).filter(Boolean);
14034
+
14035
+ if (ids) {
14036
+ filteredResults = filteredResults.filter(function (item) {
14037
+ return !ids.includes(item._id);
14038
+ });
14039
+ }
14040
+
14041
+ filteredResults = [].concat(parsedPromotedResults, filteredResults);
14042
+ }
14043
+
14044
+ return helper_2(filteredResults);
14010
14045
  }
14011
14046
  },
14012
14047
  watch: {
@@ -14088,7 +14123,7 @@
14088
14123
  }
14089
14124
  },
14090
14125
  hits: function hits(newVal, oldVal) {
14091
- this.$emit('data', this.getAllData());
14126
+ this.$emit('data', this.getData());
14092
14127
 
14093
14128
  if (this.shouldRenderPagination) {
14094
14129
  // called when page is changed
@@ -14273,13 +14308,10 @@
14273
14308
 
14274
14309
  var h = this.$createElement;
14275
14310
  var size = this.$props.size;
14276
- var hits = this.$data.hits;
14277
- var results = parseHits(hits) || [];
14278
- var filteredResults = results;
14279
14311
  var renderItem = this.$scopedSlots.renderItem || this.$props.renderItem;
14280
14312
  var element = this.hasCustomRender ? this.getComponent() : h("div", {
14281
14313
  "class": this.$props.listClass + " " + getClassName$1(this.$props.innerClass, 'list')
14282
- }, [[].concat(filteredResults).map(function (item, index) {
14314
+ }, [this.data.map(function (item, index) {
14283
14315
  return renderItem({
14284
14316
  item: item,
14285
14317
  triggerClickAnalytics: function triggerClickAnalytics() {
@@ -14290,7 +14322,7 @@
14290
14322
 
14291
14323
  return this.analytics ? h(ImpressionTracker$1, {
14292
14324
  "attrs": {
14293
- "hits": filteredResults
14325
+ "hits": this.data
14294
14326
  }
14295
14327
  }, [element]) : element;
14296
14328
  },
@@ -14470,8 +14502,8 @@
14470
14502
  })]);
14471
14503
  },
14472
14504
  withClickIds: function withClickIds(results) {
14473
- var _this$getAllData2 = this.getAllData(),
14474
- base = _this$getAllData2.base;
14505
+ var _this$getAllData = this.getAllData(),
14506
+ base = _this$getAllData.base;
14475
14507
 
14476
14508
  return results.map(function (result, index) {
14477
14509
  return _extends({}, result, {
@@ -14489,26 +14521,9 @@
14489
14521
  hits = this.hits;
14490
14522
  var results = parseHits(hits) || [];
14491
14523
  var parsedPromotedResults = parseHits(promotedResults) || [];
14492
- var filteredResults = results;
14493
14524
  var base = currentPage * size;
14494
-
14495
- if (parsedPromotedResults.length) {
14496
- var ids = parsedPromotedResults.map(function (item) {
14497
- return item._id;
14498
- }).filter(Boolean);
14499
-
14500
- if (ids) {
14501
- filteredResults = filteredResults.filter(function (item) {
14502
- return !ids.includes(item._id);
14503
- });
14504
- }
14505
-
14506
- filteredResults = [].concat(parsedPromotedResults, filteredResults);
14507
- }
14508
-
14509
14525
  return {
14510
14526
  results: results,
14511
- filteredResults: filteredResults,
14512
14527
  customData: customData || {},
14513
14528
  promotedResults: parsedPromotedResults,
14514
14529
  aggregationData: aggregationData,
@@ -14518,14 +14533,13 @@
14518
14533
  };
14519
14534
  },
14520
14535
  getData: function getData() {
14521
- var _this$getAllData3 = this.getAllData(),
14522
- filteredResults = _this$getAllData3.filteredResults,
14523
- promotedResults = _this$getAllData3.promotedResults,
14524
- aggregationData = _this$getAllData3.aggregationData,
14525
- customData = _this$getAllData3.customData;
14536
+ var _this$getAllData2 = this.getAllData(),
14537
+ promotedResults = _this$getAllData2.promotedResults,
14538
+ aggregationData = _this$getAllData2.aggregationData,
14539
+ customData = _this$getAllData2.customData;
14526
14540
 
14527
14541
  return {
14528
- data: this.withClickIds(filteredResults),
14542
+ data: this.data,
14529
14543
  aggregationData: this.withClickIds(aggregationData || []),
14530
14544
  promotedData: this.withClickIds(promotedResults || []),
14531
14545
  rawData: this.rawData,
@@ -15408,8 +15422,33 @@
15408
15422
  return encodedHeaders;
15409
15423
  }
15410
15424
 
15411
- function getTelemetryHeaders(enableTelemetry) {
15425
+ function getMongoRequest(app, mongo) {
15426
+ var mongodb = {};
15427
+
15428
+ if (app) {
15429
+ mongodb.index = app;
15430
+ }
15431
+
15432
+ if (mongo) {
15433
+ if (mongo.db) {
15434
+ mongodb.db = mongo.db;
15435
+ }
15436
+
15437
+ if (mongo.collection) {
15438
+ mongodb.collection = mongo.collection;
15439
+ }
15440
+ }
15441
+
15442
+ return mongodb;
15443
+ }
15444
+
15445
+ function getTelemetryHeaders(enableTelemetry, shouldSetHeaders) {
15412
15446
  var headers = {};
15447
+
15448
+ if (!shouldSetHeaders) {
15449
+ return headers;
15450
+ }
15451
+
15413
15452
  Object.assign(headers, {
15414
15453
  'X-Search-Client': 'Appbase JS'
15415
15454
  });
@@ -15422,6 +15461,133 @@
15422
15461
 
15423
15462
  return headers;
15424
15463
  }
15464
+
15465
+ var backendAlias = {
15466
+ MONGODB: 'mongodb',
15467
+ // mongodb
15468
+ ELASTICSEARCH: 'elasticsearch' // elasticsearch
15469
+
15470
+ };
15471
+ var dataTypes = {
15472
+ ARRAY: 'array',
15473
+ FUNCTION: 'function',
15474
+ OBJECT: 'object',
15475
+ NUMBER: 'number',
15476
+ BOOLEAN: 'boolean',
15477
+ STRING: 'string'
15478
+ };
15479
+
15480
+ var checkDataType = function checkDataType(temp) {
15481
+ // eslint-disable-next-line
15482
+ if ((typeof temp === 'undefined' ? 'undefined' : _typeof$1(temp)) === dataTypes.OBJECT) {
15483
+ if (Array.isArray(temp)) {
15484
+ return dataTypes.ARRAY;
15485
+ }
15486
+
15487
+ return dataTypes.OBJECT;
15488
+ }
15489
+
15490
+ return typeof temp === 'undefined' ? 'undefined' : _typeof$1(temp);
15491
+ };
15492
+
15493
+ function validateSchema() {
15494
+ var passedProperties = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
15495
+ var schema = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
15496
+ var backendName = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
15497
+ var passedPropertiesKeys = Object.keys(passedProperties).filter(function (propertyKey) {
15498
+ return !!passedProperties[propertyKey];
15499
+ });
15500
+ var acceptedProperties = Object.keys(schema);
15501
+ var requiredProperties = []; // fetch required properties
15502
+
15503
+ acceptedProperties.forEach(function (propName) {
15504
+ var currentProperty = schema[propName];
15505
+
15506
+ if (currentProperty.required) {
15507
+ requiredProperties.push(propName);
15508
+ }
15509
+ }); // check for required properties
15510
+
15511
+ requiredProperties.forEach(function (requiredProperty) {
15512
+ if (!passedPropertiesKeys.includes(requiredProperty)) {
15513
+ throw new Error(requiredProperty + ' is required when using the ' + backendName + ' Search backend.');
15514
+ }
15515
+ }); // check for accepted properties
15516
+
15517
+ passedPropertiesKeys.forEach(function (passedPropertyKey) {
15518
+ if (!acceptedProperties.includes(passedPropertyKey)) {
15519
+ throw new Error(passedPropertyKey + ' property isn\'t accepted property by ' + backendName + ' backend.');
15520
+ }
15521
+
15522
+ var acceptedTypes = Array.isArray(schema[passedPropertyKey].type) ? schema[passedPropertyKey].type : [].concat(schema[passedPropertyKey].type);
15523
+ var receivedPropertyType = checkDataType(passedProperties[passedPropertyKey]);
15524
+
15525
+ if (!acceptedTypes.includes(receivedPropertyType)) {
15526
+ throw new Error('The property ' + passedPropertyKey + ' is expected with type(s) [' + acceptedTypes.join(', ') + '], but type was set as ' + receivedPropertyType + '.');
15527
+ }
15528
+ });
15529
+ }
15530
+
15531
+ var mongodb = {
15532
+ url: {
15533
+ type: dataTypes.STRING,
15534
+ required: true
15535
+ },
15536
+ app: {
15537
+ type: dataTypes.STRING,
15538
+ required: false
15539
+ },
15540
+ credentials: {
15541
+ type: dataTypes.STRING,
15542
+ required: false
15543
+ },
15544
+ enableTelemetry: {
15545
+ type: dataTypes.BOOLEAN,
15546
+ required: false
15547
+ },
15548
+ mongodb: {
15549
+ type: dataTypes.OBJECT,
15550
+ required: true
15551
+ },
15552
+ username: {
15553
+ type: dataTypes.STRING,
15554
+ required: false
15555
+ },
15556
+ password: {
15557
+ type: dataTypes.STRING,
15558
+ required: false
15559
+ }
15560
+ };
15561
+ var elasticsearch = {
15562
+ url: {
15563
+ type: dataTypes.STRING,
15564
+ required: true
15565
+ },
15566
+ app: {
15567
+ type: dataTypes.STRING,
15568
+ required: true
15569
+ },
15570
+ credentials: {
15571
+ type: dataTypes.STRING,
15572
+ required: false
15573
+ },
15574
+ enableTelemetry: {
15575
+ type: dataTypes.BOOLEAN,
15576
+ required: false
15577
+ },
15578
+ username: {
15579
+ type: dataTypes.STRING,
15580
+ required: false
15581
+ },
15582
+ password: {
15583
+ type: dataTypes.STRING,
15584
+ required: false
15585
+ }
15586
+ };
15587
+ var SCHEMA = {
15588
+ mongodb: mongodb,
15589
+ elasticsearch: elasticsearch
15590
+ };
15425
15591
  /**
15426
15592
  * Returns an instance of Appbase client
15427
15593
  * @param {Object} config To configure properties
@@ -15431,10 +15597,10 @@
15431
15597
  * @param {String} config.username
15432
15598
  * @param {String} config.password
15433
15599
  * @param {Boolean} config.enableTelemetry
15600
+ * @param {Object} config.mongodb
15434
15601
  * A callback function which will be invoked before a fetch request made
15435
15602
  */
15436
15603
 
15437
-
15438
15604
  function AppBase(config) {
15439
15605
  var _URL = urlParserLite(config.url || ''),
15440
15606
  _URL$auth = _URL.auth,
@@ -15446,30 +15612,42 @@
15446
15612
  _URL$protocol = _URL.protocol,
15447
15613
  protocol = _URL$protocol === undefined ? '' : _URL$protocol;
15448
15614
 
15449
- var url = host + path; // Validate config and throw appropriate error
15615
+ var url = config.url;
15616
+ url = host + path; // Parse url
15450
15617
 
15451
- if (typeof url !== 'string' || url === '') {
15452
- throw new Error('URL not present in options.');
15618
+ if (url.slice(-1) === '/') {
15619
+ url = url.slice(0, -1);
15453
15620
  }
15454
15621
 
15455
- if (typeof config.app !== 'string' || config.app === '') {
15456
- throw new Error('App name is not present in options.');
15457
- }
15622
+ var backendName = backendAlias[config.mongodb ? 'MONGODB' : 'ELASTICSEARCH']; // eslint-disable-next-line
15623
+
15624
+ var schema = SCHEMA[backendName];
15625
+ validateSchema({
15626
+ url: config.url,
15627
+ app: config.app,
15628
+ credentials: config.credentials,
15629
+ username: config.username,
15630
+ password: config.password,
15631
+ enableTelemetry: config.enableTelemetry,
15632
+ mongodb: config.mongodb
15633
+ }, schema, backendName);
15458
15634
 
15459
15635
  if (typeof protocol !== 'string' || protocol === '') {
15460
15636
  throw new Error('Protocol is not present in url. URL should be of the form https://appbase-demo-ansible-abxiydt-arc.searchbase.io');
15461
- } // Parse url
15462
-
15463
-
15464
- if (url.slice(-1) === '/') {
15465
- url = url.slice(0, -1);
15466
15637
  }
15467
15638
 
15468
15639
  var credentials = auth || null;
15640
+
15641
+ if (!config.mongodb) {
15642
+ if (isAppbase(url) && credentials === null) {
15643
+ throw new Error('Authentication information is not present. Did you add credentials?');
15644
+ }
15645
+ }
15469
15646
  /**
15470
15647
  * Credentials can be provided as a part of the URL,
15471
15648
  * as username, password args or as a credentials argument directly */
15472
15649
 
15650
+
15473
15651
  if (typeof config.credentials === 'string' && config.credentials !== '') {
15474
15652
  // eslint-disable-next-line
15475
15653
  credentials = config.credentials;
@@ -15477,15 +15655,15 @@
15477
15655
  credentials = config.username + ':' + config.password;
15478
15656
  }
15479
15657
 
15480
- if (isAppbase(url) && credentials === null) {
15481
- throw new Error('Authentication information is not present. Did you add credentials?');
15482
- }
15483
-
15484
15658
  this.url = url;
15485
15659
  this.protocol = protocol;
15486
15660
  this.app = config.app;
15487
15661
  this.credentials = credentials;
15488
15662
 
15663
+ if (config.mongodb) {
15664
+ this.mongodb = config.mongodb;
15665
+ }
15666
+
15489
15667
  if (typeof config.enableTelemetry === 'boolean') {
15490
15668
  this.enableTelemetry = config.enableTelemetry;
15491
15669
  }
@@ -15514,7 +15692,9 @@
15514
15692
  params = parsedArgs.params,
15515
15693
  body = parsedArgs.body,
15516
15694
  isRSAPI = parsedArgs.isRSAPI,
15517
- isSuggestionsAPI = parsedArgs.isSuggestionsAPI;
15695
+ isSuggestionsAPI = parsedArgs.isSuggestionsAPI,
15696
+ _parsedArgs$isMongoRe = parsedArgs.isMongoRequest,
15697
+ isMongoRequest = _parsedArgs$isMongoRe === undefined ? false : _parsedArgs$isMongoRe;
15518
15698
  var app = isSuggestionsAPI ? '.suggestions' : _this.app;
15519
15699
  var bodyCopy = body;
15520
15700
  var contentType = path.endsWith('msearch') || path.endsWith('bulk') ? 'application/x-ndjson' : 'application/json';
@@ -15565,7 +15745,7 @@
15565
15745
  paramsString = '?' + querystring.stringify(params);
15566
15746
  }
15567
15747
 
15568
- var finalURL = _this.protocol + '://' + _this.url + '/' + app + '/' + path + paramsString;
15748
+ var finalURL = isMongoRequest ? _this.protocol + '://' + _this.url : _this.protocol + '://' + _this.url + '/' + app + '/' + path + paramsString;
15569
15749
  return handleTransformRequest(Object.assign({}, {
15570
15750
  url: finalURL
15571
15751
  }, requestOptions)).then(function (ts) {
@@ -15574,7 +15754,7 @@
15574
15754
  delete transformedRequest.url;
15575
15755
  return browserPonyfill$1(url || finalURL, Object.assign({}, transformedRequest, {
15576
15756
  // apply timestamp header for RS API
15577
- headers: isRSAPI ? Object.assign({}, transformedRequest.headers, {
15757
+ headers: isRSAPI && !isMongoRequest ? Object.assign({}, transformedRequest.headers, {
15578
15758
  'x-timestamp': new Date().getTime()
15579
15759
  }) : transformedRequest.headers
15580
15760
  })).then(function (res) {
@@ -15602,7 +15782,7 @@
15602
15782
 
15603
15783
  if (data) {
15604
15784
  Object.keys(data).forEach(function (key) {
15605
- if (data[key] && Object.prototype.hasOwnProperty.call(data[key], 'error')) {
15785
+ if (data[key] && Object.prototype.hasOwnProperty.call(data[key], 'error') && !!data[key].error) {
15606
15786
  errorResponses += 1;
15607
15787
  }
15608
15788
  });
@@ -15939,12 +16119,20 @@
15939
16119
  settings: parsedSettings,
15940
16120
  query: query
15941
16121
  };
16122
+
16123
+ if (this.mongodb) {
16124
+ Object.assign(body, {
16125
+ mongodb: getMongoRequest(this.app, this.mongodb)
16126
+ });
16127
+ }
16128
+
15942
16129
  return this.performFetchRequest({
15943
16130
  method: 'POST',
15944
16131
  path: '_reactivesearch',
15945
16132
  body: body,
15946
- headers: getTelemetryHeaders(this.enableTelemetry),
15947
- isRSAPI: true
16133
+ headers: getTelemetryHeaders(this.enableTelemetry, !this.mongodb),
16134
+ isRSAPI: true,
16135
+ isMongoRequest: !!this.mongodb
15948
16136
  });
15949
16137
  }
15950
16138
  /**
@@ -15971,12 +16159,20 @@
15971
16159
  settings: parsedSettings,
15972
16160
  query: query
15973
16161
  };
16162
+
16163
+ if (this.mongodb) {
16164
+ Object.assign(body, {
16165
+ mongodb: getMongoRequest(this.app, this.mongodb)
16166
+ });
16167
+ }
16168
+
15974
16169
  return this.performFetchRequest({
15975
16170
  method: 'POST',
15976
16171
  path: '_reactivesearch.v3',
15977
16172
  body: body,
15978
- headers: getTelemetryHeaders(this.enableTelemetry),
15979
- isRSAPI: true
16173
+ headers: getTelemetryHeaders(this.enableTelemetry, !this.mongodb),
16174
+ isRSAPI: true,
16175
+ isMongoRequest: !!this.mongodb
15980
16176
  });
15981
16177
  }
15982
16178
  /**
@@ -16014,13 +16210,21 @@
16014
16210
  settings: parsedSettings,
16015
16211
  query: query
16016
16212
  };
16213
+
16214
+ if (this.mongodb) {
16215
+ Object.assign(body, {
16216
+ mongodb: getMongoRequest(this.app, this.mongodb)
16217
+ });
16218
+ }
16219
+
16017
16220
  return this.performFetchRequest({
16018
16221
  method: 'POST',
16019
16222
  path: '_reactivesearch.v3',
16020
16223
  body: body,
16021
16224
  headers: getTelemetryHeaders(this.enableTelemetry),
16022
16225
  isRSAPI: true,
16023
- isSuggestionsAPI: true
16226
+ isSuggestionsAPI: true,
16227
+ isMongoRequest: !!this.mongodb
16024
16228
  });
16025
16229
  }
16026
16230
 
@@ -16752,7 +16956,7 @@
16752
16956
  }
16753
16957
  },
16754
16958
  props: {
16755
- app: types.stringRequired,
16959
+ app: types.string,
16756
16960
  analytics: VueTypes.bool,
16757
16961
  analyticsConfig: types.analyticsConfig,
16758
16962
  appbaseConfig: types.appbaseConfig,
@@ -16772,7 +16976,8 @@
16772
16976
  transformResponse: types.func,
16773
16977
  as: VueTypes.string.def('div'),
16774
16978
  getSearchParams: types.func,
16775
- setSearchParams: types.func
16979
+ setSearchParams: types.func,
16980
+ mongodb: types.mongodb
16776
16981
  },
16777
16982
  provide: function provide() {
16778
16983
  return {
@@ -16812,6 +17017,9 @@
16812
17017
  this.store.dispatch(analytics_3$1(newVal));
16813
17018
  }
16814
17019
  }
17020
+ },
17021
+ mongodb: function mongodb() {
17022
+ this.updateState(this.$props);
16815
17023
  }
16816
17024
  },
16817
17025
  computed: {
@@ -16819,12 +17027,13 @@
16819
17027
  var _this$$props = this.$props,
16820
17028
  enableAppbase = _this$$props.enableAppbase,
16821
17029
  headers = _this$$props.headers,
16822
- appbaseConfig = _this$$props.appbaseConfig;
17030
+ appbaseConfig = _this$$props.appbaseConfig,
17031
+ mongodb = _this$$props.mongodb;
16823
17032
 
16824
17033
  var _ref = appbaseConfig || {},
16825
17034
  enableTelemetry = _ref.enableTelemetry;
16826
17035
 
16827
- return _extends({}, enableAppbase && _extends({
17036
+ return _extends({}, enableAppbase && !mongodb && _extends({
16828
17037
  'X-Search-Client': X_SEARCH_CLIENT
16829
17038
  }, enableTelemetry === false && {
16830
17039
  'X-Enable-Telemetry': false
@@ -16842,7 +17051,7 @@
16842
17051
  var appbaseConfig = _extends({}, props.analyticsConfig, props.appbaseConfig);
16843
17052
 
16844
17053
  var config = {
16845
- url: props.url && props.url.trim() !== '' ? props.url : 'https://scalr.api.appbase.io',
17054
+ url: props.url && props.url.trim() !== '' ? props.url : '',
16846
17055
  app: props.app,
16847
17056
  credentials: credentials,
16848
17057
  type: props.type ? props.type : '*',
@@ -16850,7 +17059,8 @@
16850
17059
  transformResponse: props.transformResponse,
16851
17060
  enableAppbase: props.enableAppbase,
16852
17061
  analytics: props.appbaseConfig ? props.appbaseConfig.recordAnalytics : props.analytics,
16853
- analyticsConfig: appbaseConfig
17062
+ analyticsConfig: appbaseConfig,
17063
+ mongodb: props.mongodb
16854
17064
  };
16855
17065
  var queryParams = '';
16856
17066
 
@@ -26098,7 +26308,7 @@
26098
26308
  });
26099
26309
  }
26100
26310
 
26101
- var version = "1.23.3";
26311
+ var version = "1.24.2";
26102
26312
 
26103
26313
  var _templateObject$n, _templateObject2$a;
26104
26314