@appbaseio/reactivesearch-vue 1.16.0-alpha.23 → 1.16.0-alpha.27

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 (55) hide show
  1. package/dist/@appbaseio/reactivesearch-vue.umd.js +560 -259
  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-d3c78c41.js → DropDown-3c343026.js} +5 -3
  7. package/dist/cjs/DynamicRangeSlider.js +1 -1
  8. package/dist/cjs/MultiDropdownList.js +3 -2
  9. package/dist/cjs/MultiList.js +3 -2
  10. package/dist/cjs/MultiRange.js +1 -1
  11. package/dist/cjs/{Pagination-d4dbfd5a.js → Pagination-0b9ec0fc.js} +1 -1
  12. package/dist/cjs/RangeInput.js +1 -1
  13. package/dist/cjs/RangeSlider.js +1 -1
  14. package/dist/cjs/ReactiveBase.js +14 -8
  15. package/dist/cjs/ReactiveComponent.js +12 -12
  16. package/dist/cjs/ReactiveGoogleMap.js +2 -2
  17. package/dist/cjs/ReactiveList.js +102 -87
  18. package/dist/cjs/ResultCard.js +1 -1
  19. package/dist/cjs/ResultList.js +1 -1
  20. package/dist/cjs/SelectedFilters.js +1 -1
  21. package/dist/cjs/SingleDropdownList.js +3 -2
  22. package/dist/cjs/SingleList.js +3 -2
  23. package/dist/cjs/SingleRange.js +1 -1
  24. package/dist/cjs/ToggleButton.js +2 -2
  25. package/dist/cjs/index.js +5 -4
  26. package/dist/cjs/initReactivesearch.js +15 -14
  27. package/dist/cjs/install.js +5 -4
  28. package/dist/cjs/version.js +1 -1
  29. package/dist/cjs/{vueTypes-409348b0.js → vueTypes-829a5f2c.js} +5 -1
  30. package/dist/es/DataSearch.js +2 -2
  31. package/dist/es/{DropDown-8894cc22.js → DropDown-c5ab660f.js} +5 -3
  32. package/dist/es/DynamicRangeSlider.js +1 -1
  33. package/dist/es/MultiDropdownList.js +3 -2
  34. package/dist/es/MultiList.js +3 -2
  35. package/dist/es/MultiRange.js +1 -1
  36. package/dist/es/{Pagination-a2ab7fcb.js → Pagination-e8216949.js} +1 -1
  37. package/dist/es/RangeInput.js +1 -1
  38. package/dist/es/RangeSlider.js +1 -1
  39. package/dist/es/ReactiveBase.js +14 -8
  40. package/dist/es/ReactiveComponent.js +12 -12
  41. package/dist/es/ReactiveGoogleMap.js +2 -2
  42. package/dist/es/ReactiveList.js +102 -87
  43. package/dist/es/ResultCard.js +1 -1
  44. package/dist/es/ResultList.js +1 -1
  45. package/dist/es/SelectedFilters.js +1 -1
  46. package/dist/es/SingleDropdownList.js +3 -2
  47. package/dist/es/SingleList.js +3 -2
  48. package/dist/es/SingleRange.js +1 -1
  49. package/dist/es/ToggleButton.js +2 -2
  50. package/dist/es/index.js +5 -4
  51. package/dist/es/initReactivesearch.js +15 -14
  52. package/dist/es/install.js +5 -4
  53. package/dist/es/version.js +1 -1
  54. package/dist/es/{vueTypes-a9b9d5c9.js → vueTypes-98819a12.js} +5 -1
  55. package/package.json +3 -3
@@ -3,10 +3,11 @@ import { _ as _taggedTemplateLiteralLoose, a as _extends } from './_rollupPlugin
3
3
  import VueTypes from 'vue-types';
4
4
  import { css } from 'emotion';
5
5
  import styled from '@appbaseio/vue-emotion';
6
- import { t as types } from './vueTypes-a9b9d5c9.js';
6
+ import { t as types } from './vueTypes-98819a12.js';
7
7
  import { a as isFunction } from './index-4755c9a0.js';
8
8
  import { s as suggestionsContainer, a as suggestions, I as Input } from './Input-d8519224.js';
9
9
  import { D as Downshift } from './DownShift-e7ccf2a7.js';
10
+ import { replaceDiacritics } from '@appbaseio/reactivecore/lib/utils/suggestions';
10
11
 
11
12
  var _templateObject, _templateObject2, _templateObject3, _templateObject4;
12
13
  var small = css(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n\tmin-height: 0;\n\theight: 30px;\n\tborder: 0;\n\tbox-shadow: rgba(0, 0, 0, 0.3) 0px 1px 4px -1px;\n\tborder-radius: 2px;\n"])));
@@ -96,7 +97,7 @@ var Dropdown = {
96
97
  var filteredItemsToRender = itemsToRender.filter(function (item) {
97
98
  if (String(item[labelField]).length) {
98
99
  if (_this.$props.showSearch && _this.$data.searchTerm) {
99
- return String(item[labelField]).toLowerCase().includes(_this.$data.searchTerm.toLowerCase());
100
+ return replaceDiacritics(String(item[labelField])).toLowerCase().includes(replaceDiacritics(_this.$data.searchTerm.toLowerCase()));
100
101
  }
101
102
 
102
103
  return true;
@@ -160,7 +161,8 @@ var Dropdown = {
160
161
  }
161
162
  }) : null, !hasCustomRenderer && filteredItemsToRender.length === 0 ? _this.renderNoResult() : filteredItemsToRender.map(function (item, index) {
162
163
  var selected = _this.$props.multi // MultiDropdownList
163
- && (selectedItem && !!selectedItem[item[keyField]] || Array.isArray(selectedItem) && selectedItem.find(function (value) {
164
+ && (selectedItem && !!selectedItem[item[keyField]] // MultiDropdownRange
165
+ || Array.isArray(selectedItem) && selectedItem.find(function (value) {
164
166
  return value[labelField] === item[labelField];
165
167
  }));
166
168
  if (!_this.$props.multi) selected = item.key === selectedItem;
@@ -3,7 +3,7 @@ import { a as _extends } from './_rollupPluginBabelHelpers-ecf6c03c.js';
3
3
  import VueTypes from 'vue-types';
4
4
  import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
5
5
  import '@appbaseio/vue-emotion';
6
- import { t as types } from './vueTypes-a9b9d5c9.js';
6
+ import { t as types } from './vueTypes-98819a12.js';
7
7
  import 'redux';
8
8
  import { f as updateCustomQuery, d as getValidPropsKeys, i as isQueryIdentical, c as connect } from './index-4755c9a0.js';
9
9
  import { T as Title } from './Title-579f8d6c.js';
@@ -6,7 +6,7 @@ import 'emotion';
6
6
  import '@appbaseio/vue-emotion';
7
7
  import 'polished';
8
8
  import { l as loadMoreContainer, B as Button } from './Button-799185e2.js';
9
- import { t as types } from './vueTypes-a9b9d5c9.js';
9
+ import { t as types } from './vueTypes-98819a12.js';
10
10
  import '@appbaseio/reactivecore/lib/utils/transform';
11
11
  import 'redux';
12
12
  import { f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, a as isFunction, o as parseValueArray, g as getComponent, h as hasCustomRenderer, c as connect } from './index-4755c9a0.js';
@@ -16,8 +16,9 @@ import './Input-d8519224.js';
16
16
  import 'compute-scroll-into-view';
17
17
  import './DownShift-e7ccf2a7.js';
18
18
  import { C as Container } from './Container-4383c6f0.js';
19
+ import '@appbaseio/reactivecore/lib/utils/suggestions';
19
20
  import { g as getAggsQuery } from './utils-3a32e13f.js';
20
- import { D as Dropdown } from './DropDown-8894cc22.js';
21
+ import { D as Dropdown } from './DropDown-c5ab660f.js';
21
22
 
22
23
  var updateQuery = Actions.updateQuery,
23
24
  setQueryOptions = Actions.setQueryOptions,
@@ -5,7 +5,7 @@ import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
5
5
  import 'emotion';
6
6
  import '@appbaseio/vue-emotion';
7
7
  import 'polished';
8
- import { t as types } from './vueTypes-a9b9d5c9.js';
8
+ import { t as types } from './vueTypes-98819a12.js';
9
9
  import '@appbaseio/reactivecore/lib/utils/transform';
10
10
  import 'redux';
11
11
  import { f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, a as isFunction, n as isEvent, o as parseValueArray, g as getComponent, h as hasCustomRenderer, c as connect } from './index-4755c9a0.js';
@@ -13,6 +13,7 @@ import { C as ComponentWrapper } from './ComponentWrapper-459505fd.js';
13
13
  import { T as Title } from './Title-579f8d6c.js';
14
14
  import { I as Input } from './Input-d8519224.js';
15
15
  import { C as Container } from './Container-4383c6f0.js';
16
+ import { replaceDiacritics } from '@appbaseio/reactivecore/lib/utils/suggestions';
16
17
  import { U as UL, C as Checkbox } from './FormControlList-fe389a2e.js';
17
18
  import { g as getAggsQuery } from './utils-3a32e13f.js';
18
19
 
@@ -180,7 +181,7 @@ var MultiList = {
180
181
  var filteredItemsToRender = itemsToRender.filter(function (item) {
181
182
  if (String(item.key).length) {
182
183
  if (_this2.$props.showSearch && _this2.$data.searchTerm) {
183
- return String(item.key).toLowerCase().includes(_this2.$data.searchTerm.toLowerCase());
184
+ return replaceDiacritics(String(item.key)).toLowerCase().includes(replaceDiacritics(_this2.$data.searchTerm).toLowerCase());
184
185
  }
185
186
 
186
187
  return true;
@@ -5,7 +5,7 @@ import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
5
5
  import 'emotion';
6
6
  import '@appbaseio/vue-emotion';
7
7
  import 'polished';
8
- import { t as types } from './vueTypes-a9b9d5c9.js';
8
+ import { t as types } from './vueTypes-98819a12.js';
9
9
  import '@appbaseio/reactivecore/lib/utils/transform';
10
10
  import 'redux';
11
11
  import { o as parseValueArray, f as updateCustomQuery, i as isQueryIdentical, c as connect } from './index-4755c9a0.js';
@@ -1,7 +1,7 @@
1
1
  import { helper } from '@appbaseio/reactivecore';
2
2
  import VueTypes from 'vue-types';
3
3
  import { p as pagination, B as Button } from './Button-799185e2.js';
4
- import { t as types } from './vueTypes-a9b9d5c9.js';
4
+ import { t as types } from './vueTypes-98819a12.js';
5
5
 
6
6
  var getClassName = helper.getClassName,
7
7
  handleA11yAction = helper.handleA11yAction;
@@ -5,7 +5,7 @@ import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
5
5
  import { css } from 'emotion';
6
6
  import styled from '@appbaseio/vue-emotion';
7
7
  import 'polished';
8
- import { t as types } from './vueTypes-a9b9d5c9.js';
8
+ import { t as types } from './vueTypes-98819a12.js';
9
9
  import '@appbaseio/reactivecore/lib/utils/transform';
10
10
  import 'redux';
11
11
  import { c as connect } from './index-4755c9a0.js';
@@ -3,7 +3,7 @@ import { a as _extends } from './_rollupPluginBabelHelpers-ecf6c03c.js';
3
3
  import VueTypes from 'vue-types';
4
4
  import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
5
5
  import '@appbaseio/vue-emotion';
6
- import { t as types } from './vueTypes-a9b9d5c9.js';
6
+ import { t as types } from './vueTypes-98819a12.js';
7
7
  import '@appbaseio/reactivecore/lib/utils/transform';
8
8
  import 'redux';
9
9
  import { f as updateCustomQuery, i as isQueryIdentical, c as connect } from './index-4755c9a0.js';
@@ -2,12 +2,12 @@ import configureStore, { Actions, helper } from '@appbaseio/reactivecore';
2
2
  import { _ as _taggedTemplateLiteralLoose, a as _extends } from './_rollupPluginBabelHelpers-ecf6c03c.js';
3
3
  import VueTypes from 'vue-types';
4
4
  import '@appbaseio/reactivecore/lib/utils/constants';
5
+ import { isEqual as isEqual$1 } from '@appbaseio/reactivecore/lib/utils/helper';
5
6
  import styled from '@appbaseio/vue-emotion';
6
- import { t as types } from './vueTypes-a9b9d5c9.js';
7
+ import { t as types } from './vueTypes-98819a12.js';
7
8
  import 'redux';
8
9
  import { c as connect, e as composeThemeObject, X as X_SEARCH_CLIENT } from './index-4755c9a0.js';
9
10
  import _mergeJSXProps from '@vue/babel-helper-vue-jsx-merge-props';
10
- import { isEqual as isEqual$1 } from '@appbaseio/reactivecore/lib/utils/helper';
11
11
  import { updateAnalyticsConfig } from '@appbaseio/reactivecore/lib/actions/analytics';
12
12
  import Appbase from 'appbase-js';
13
13
  import 'url-search-params-polyfill';
@@ -350,7 +350,7 @@ var ReactiveBase = {
350
350
  }
351
351
  },
352
352
  props: {
353
- app: types.stringRequired,
353
+ app: types.string,
354
354
  analytics: VueTypes.bool,
355
355
  analyticsConfig: types.analyticsConfig,
356
356
  appbaseConfig: types.appbaseConfig,
@@ -370,7 +370,8 @@ var ReactiveBase = {
370
370
  transformResponse: types.func,
371
371
  as: VueTypes.string.def('div'),
372
372
  getSearchParams: types.func,
373
- setSearchParams: types.func
373
+ setSearchParams: types.func,
374
+ mongodb: types.mongodb
374
375
  },
375
376
  provide: function provide() {
376
377
  return {
@@ -410,6 +411,9 @@ var ReactiveBase = {
410
411
  this.store.dispatch(updateAnalyticsConfig(newVal));
411
412
  }
412
413
  }
414
+ },
415
+ mongodb: function mongodb() {
416
+ this.updateState(this.$props);
413
417
  }
414
418
  },
415
419
  computed: {
@@ -417,12 +421,13 @@ var ReactiveBase = {
417
421
  var _this$$props = this.$props,
418
422
  enableAppbase = _this$$props.enableAppbase,
419
423
  headers = _this$$props.headers,
420
- appbaseConfig = _this$$props.appbaseConfig;
424
+ appbaseConfig = _this$$props.appbaseConfig,
425
+ mongodb = _this$$props.mongodb;
421
426
 
422
427
  var _ref = appbaseConfig || {},
423
428
  enableTelemetry = _ref.enableTelemetry;
424
429
 
425
- return _extends({}, enableAppbase && _extends({
430
+ return _extends({}, enableAppbase && !mongodb && _extends({
426
431
  'X-Search-Client': X_SEARCH_CLIENT
427
432
  }, enableTelemetry === false && {
428
433
  'X-Enable-Telemetry': false
@@ -440,7 +445,7 @@ var ReactiveBase = {
440
445
  var appbaseConfig = _extends({}, props.analyticsConfig, props.appbaseConfig);
441
446
 
442
447
  var config = {
443
- url: props.url && props.url.trim() !== '' ? props.url : 'https://scalr.api.appbase.io',
448
+ url: props.url && props.url.trim() !== '' ? props.url : '',
444
449
  app: props.app,
445
450
  credentials: credentials,
446
451
  type: props.type ? props.type : '*',
@@ -448,7 +453,8 @@ var ReactiveBase = {
448
453
  transformResponse: props.transformResponse,
449
454
  enableAppbase: props.enableAppbase,
450
455
  analytics: props.appbaseConfig ? props.appbaseConfig.recordAnalytics : props.analytics,
451
- analyticsConfig: appbaseConfig
456
+ analyticsConfig: appbaseConfig,
457
+ mongodb: props.mongodb
452
458
  };
453
459
  var queryParams = '';
454
460
 
@@ -2,7 +2,7 @@ import { Actions, helper } from '@appbaseio/reactivecore';
2
2
  import { a as _extends, b as _objectWithoutPropertiesLoose } from './_rollupPluginBabelHelpers-ecf6c03c.js';
3
3
  import VueTypes from 'vue-types';
4
4
  import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
5
- import { t as types } from './vueTypes-a9b9d5c9.js';
5
+ import { t as types } from './vueTypes-98819a12.js';
6
6
  import '@appbaseio/reactivecore/lib/utils/transform';
7
7
  import 'redux';
8
8
  import { f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, c as connect } from './index-4755c9a0.js';
@@ -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) {
@@ -6,8 +6,8 @@ import 'emotion';
6
6
  import styled, { css } from '@appbaseio/vue-emotion';
7
7
  import 'polished';
8
8
  import './Button-799185e2.js';
9
- import { t as types } from './vueTypes-a9b9d5c9.js';
10
- import { P as Pagination } from './Pagination-a2ab7fcb.js';
9
+ import { t as types } from './vueTypes-98819a12.js';
10
+ import { P as Pagination } from './Pagination-e8216949.js';
11
11
  import '@appbaseio/reactivecore/lib/utils/transform';
12
12
  import 'redux';
13
13
  import { h as hasCustomRenderer, i as isQueryIdentical, g as getComponent, a as isFunction, c as connect } from './index-4755c9a0.js';