@appbaseio/reactivesearch-vue 1.16.0-alpha.21 → 1.16.0-alpha.25
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.
- package/dist/@appbaseio/reactivesearch-vue.umd.js +262 -1147
- package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js +5 -5
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
- package/dist/cjs/{ComponentWrapper-d7d87585.js → ComponentWrapper-ab813390.js} +1 -1
- package/dist/cjs/DataSearch.js +4 -4
- package/dist/cjs/{DropDown-35d1472d.js → DropDown-d3c78c41.js} +2 -2
- package/dist/cjs/DynamicRangeSlider.js +2 -2
- package/dist/cjs/MultiDropdownList.js +4 -4
- package/dist/cjs/MultiList.js +3 -3
- package/dist/cjs/MultiRange.js +3 -3
- package/dist/cjs/{Pagination-96c06392.js → Pagination-d4dbfd5a.js} +1 -1
- package/dist/cjs/RangeInput.js +3 -3
- package/dist/cjs/RangeSlider.js +3 -3
- package/dist/cjs/ReactiveBase.js +26 -12
- package/dist/cjs/ReactiveComponent.js +42 -8
- package/dist/cjs/ReactiveGoogleMap.js +4 -4
- package/dist/cjs/ReactiveList.js +55 -56
- package/dist/cjs/ResultCard.js +1 -1
- package/dist/cjs/ResultList.js +1 -1
- package/dist/cjs/SelectedFilters.js +2 -2
- package/dist/cjs/SingleDropdownList.js +4 -4
- package/dist/cjs/SingleList.js +3 -3
- package/dist/cjs/SingleRange.js +3 -3
- package/dist/cjs/StateProvider.js +2 -2
- package/dist/cjs/ToggleButton.js +3 -3
- package/dist/cjs/{index-9e4adbb3.js → index-2a8358cd.js} +2 -0
- package/dist/cjs/index.js +6 -6
- package/dist/cjs/initReactivesearch.js +13 -3
- package/dist/cjs/install.js +6 -6
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/{vueTypes-c21f265b.js → vueTypes-409348b0.js} +3 -2
- package/dist/es/{ComponentWrapper-66d3e6b8.js → ComponentWrapper-459505fd.js} +1 -1
- package/dist/es/DataSearch.js +4 -4
- package/dist/es/{DropDown-ece64867.js → DropDown-8894cc22.js} +2 -2
- package/dist/es/DynamicRangeSlider.js +2 -2
- package/dist/es/MultiDropdownList.js +4 -4
- package/dist/es/MultiList.js +3 -3
- package/dist/es/MultiRange.js +3 -3
- package/dist/es/{Pagination-f8d7a011.js → Pagination-a2ab7fcb.js} +1 -1
- package/dist/es/RangeInput.js +3 -3
- package/dist/es/RangeSlider.js +3 -3
- package/dist/es/ReactiveBase.js +26 -12
- package/dist/es/ReactiveComponent.js +42 -8
- package/dist/es/ReactiveGoogleMap.js +4 -4
- package/dist/es/ReactiveList.js +55 -56
- package/dist/es/ResultCard.js +1 -1
- package/dist/es/ResultList.js +1 -1
- package/dist/es/SelectedFilters.js +2 -2
- package/dist/es/SingleDropdownList.js +4 -4
- package/dist/es/SingleList.js +3 -3
- package/dist/es/SingleRange.js +3 -3
- package/dist/es/StateProvider.js +2 -2
- package/dist/es/ToggleButton.js +3 -3
- package/dist/es/{index-f5d9c5c6.js → index-4755c9a0.js} +2 -1
- package/dist/es/index.js +6 -6
- package/dist/es/initReactivesearch.js +14 -4
- package/dist/es/install.js +6 -6
- package/dist/es/version.js +1 -1
- package/dist/es/{vueTypes-98d938a9.js → vueTypes-a9b9d5c9.js} +3 -2
- package/package.json +3 -3
package/dist/es/ReactiveList.js
CHANGED
|
@@ -2,16 +2,17 @@ import { 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 { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
|
|
5
|
+
import { withClickIds } from '@appbaseio/reactivecore/lib/utils/helper';
|
|
5
6
|
import { css } from 'emotion';
|
|
6
7
|
import styled from '@appbaseio/vue-emotion';
|
|
7
8
|
import 'polished';
|
|
8
9
|
import './Button-799185e2.js';
|
|
9
|
-
import { t as types } from './vueTypes-
|
|
10
|
-
import { P as Pagination } from './Pagination-
|
|
10
|
+
import { t as types } from './vueTypes-a9b9d5c9.js';
|
|
11
|
+
import { P as Pagination } from './Pagination-a2ab7fcb.js';
|
|
11
12
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
12
13
|
import 'redux';
|
|
13
|
-
import { c as connect, h as hasCustomRenderer, i as isQueryIdentical, u as updateDefaultQuery, a as isFunction, g as getComponent } from './index-
|
|
14
|
-
import { C as ComponentWrapper } from './ComponentWrapper-
|
|
14
|
+
import { c as connect, h as hasCustomRenderer, i as isQueryIdentical, u as updateDefaultQuery, a as isFunction, g as getComponent } from './index-4755c9a0.js';
|
|
15
|
+
import { C as ComponentWrapper } from './ComponentWrapper-459505fd.js';
|
|
15
16
|
import _mergeJSXProps from '@vue/babel-helper-vue-jsx-merge-props';
|
|
16
17
|
import './Title-579f8d6c.js';
|
|
17
18
|
import { c as container } from './ListItem-bdb6d53d.js';
|
|
@@ -273,18 +274,17 @@ var ReactiveList = {
|
|
|
273
274
|
ResultCardsWrapper: ResultCardsWrapper
|
|
274
275
|
},
|
|
275
276
|
data: function data() {
|
|
276
|
-
var props = this.$props;
|
|
277
277
|
var currentPageState = 0;
|
|
278
|
+
var defaultPage = this.defaultPage || -1;
|
|
278
279
|
|
|
279
|
-
if (
|
|
280
|
-
currentPageState =
|
|
281
|
-
} else if (
|
|
282
|
-
currentPageState = Math.max(
|
|
280
|
+
if (defaultPage >= 0) {
|
|
281
|
+
currentPageState = defaultPage;
|
|
282
|
+
} else if (this.currentPage) {
|
|
283
|
+
currentPageState = Math.max(this.currentPage - 1, 0);
|
|
283
284
|
}
|
|
284
285
|
|
|
285
286
|
this.__state = {
|
|
286
|
-
from: currentPageState *
|
|
287
|
-
isLoading: true,
|
|
287
|
+
from: currentPageState * this.size,
|
|
288
288
|
currentPageState: currentPageState
|
|
289
289
|
};
|
|
290
290
|
return this.__state;
|
|
@@ -313,8 +313,10 @@ var ReactiveList = {
|
|
|
313
313
|
console.warn('Warning(ReactiveSearch): In order to use the `index` prop, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
|
|
314
314
|
}
|
|
315
315
|
|
|
316
|
-
|
|
317
|
-
|
|
316
|
+
var defaultPage = this.defaultPage || -1;
|
|
317
|
+
|
|
318
|
+
if (defaultPage >= 0) {
|
|
319
|
+
this.currentPageState = defaultPage;
|
|
318
320
|
this.from = this.currentPageState * this.$props.size;
|
|
319
321
|
}
|
|
320
322
|
|
|
@@ -381,12 +383,9 @@ var ReactiveList = {
|
|
|
381
383
|
return this.$listeners && this.$listeners.resultStats;
|
|
382
384
|
},
|
|
383
385
|
stats: function stats() {
|
|
384
|
-
var _this$getAllData = this.getAllData(),
|
|
385
|
-
filteredResults = _this$getAllData.filteredResults;
|
|
386
|
-
|
|
387
386
|
return _extends({}, getResultStats(this), {
|
|
388
387
|
currentPage: this.currentPageState,
|
|
389
|
-
displayedResults:
|
|
388
|
+
displayedResults: this.data.length
|
|
390
389
|
});
|
|
391
390
|
},
|
|
392
391
|
hasCustomRender: function hasCustomRender() {
|
|
@@ -395,6 +394,27 @@ var ReactiveList = {
|
|
|
395
394
|
showInfiniteScroll: function showInfiniteScroll() {
|
|
396
395
|
// Pagination has higher priority then infinite scroll
|
|
397
396
|
return this.infiniteScroll && !this.shouldRenderPagination;
|
|
397
|
+
},
|
|
398
|
+
data: function data() {
|
|
399
|
+
var results = parseHits(this.hits) || [];
|
|
400
|
+
var parsedPromotedResults = parseHits(this.promotedResults) || [];
|
|
401
|
+
var filteredResults = results;
|
|
402
|
+
|
|
403
|
+
if (parsedPromotedResults.length) {
|
|
404
|
+
var ids = parsedPromotedResults.map(function (item) {
|
|
405
|
+
return item._id;
|
|
406
|
+
}).filter(Boolean);
|
|
407
|
+
|
|
408
|
+
if (ids) {
|
|
409
|
+
filteredResults = filteredResults.filter(function (item) {
|
|
410
|
+
return !ids.includes(item._id);
|
|
411
|
+
});
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
filteredResults = [].concat(parsedPromotedResults, filteredResults);
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
return withClickIds(filteredResults);
|
|
398
418
|
}
|
|
399
419
|
},
|
|
400
420
|
watch: {
|
|
@@ -476,7 +496,7 @@ var ReactiveList = {
|
|
|
476
496
|
}
|
|
477
497
|
},
|
|
478
498
|
hits: function hits(newVal, oldVal) {
|
|
479
|
-
this.$emit('data', this.
|
|
499
|
+
this.$emit('data', this.getData());
|
|
480
500
|
|
|
481
501
|
if (this.shouldRenderPagination) {
|
|
482
502
|
// called when page is changed
|
|
@@ -661,13 +681,10 @@ var ReactiveList = {
|
|
|
661
681
|
|
|
662
682
|
var h = this.$createElement;
|
|
663
683
|
var size = this.$props.size;
|
|
664
|
-
var hits = this.$data.hits;
|
|
665
|
-
var results = parseHits(hits) || [];
|
|
666
|
-
var filteredResults = results;
|
|
667
684
|
var renderItem = this.$scopedSlots.renderItem || this.$props.renderItem;
|
|
668
685
|
var element = this.hasCustomRender ? this.getComponent() : h("div", {
|
|
669
686
|
"class": this.$props.listClass + " " + getClassName(this.$props.innerClass, 'list')
|
|
670
|
-
}, [
|
|
687
|
+
}, [this.data.map(function (item, index) {
|
|
671
688
|
return renderItem({
|
|
672
689
|
item: item,
|
|
673
690
|
triggerClickAnalytics: function triggerClickAnalytics() {
|
|
@@ -678,7 +695,7 @@ var ReactiveList = {
|
|
|
678
695
|
|
|
679
696
|
return this.analytics ? h(ImpressionTracker$1, {
|
|
680
697
|
"attrs": {
|
|
681
|
-
"hits":
|
|
698
|
+
"hits": this.data
|
|
682
699
|
}
|
|
683
700
|
}, [element]) : element;
|
|
684
701
|
},
|
|
@@ -782,7 +799,7 @@ var ReactiveList = {
|
|
|
782
799
|
if (this.stats.numberOfResults) {
|
|
783
800
|
return h("p", {
|
|
784
801
|
"class": resultStats + " " + getClassName(this.$props.innerClass, 'resultStats')
|
|
785
|
-
}, [this.stats.numberOfResults, " results found in ", this.stats.time, "ms"]);
|
|
802
|
+
}, [this.stats.numberOfResults, " results found in ", this.stats.time || 0, "ms"]);
|
|
786
803
|
}
|
|
787
804
|
|
|
788
805
|
return null;
|
|
@@ -858,8 +875,8 @@ var ReactiveList = {
|
|
|
858
875
|
})]);
|
|
859
876
|
},
|
|
860
877
|
withClickIds: function withClickIds(results) {
|
|
861
|
-
var _this$
|
|
862
|
-
base = _this$
|
|
878
|
+
var _this$getAllData = this.getAllData(),
|
|
879
|
+
base = _this$getAllData.base;
|
|
863
880
|
|
|
864
881
|
return results.map(function (result, index) {
|
|
865
882
|
return _extends({}, result, {
|
|
@@ -877,26 +894,9 @@ var ReactiveList = {
|
|
|
877
894
|
hits = this.hits;
|
|
878
895
|
var results = parseHits(hits) || [];
|
|
879
896
|
var parsedPromotedResults = parseHits(promotedResults) || [];
|
|
880
|
-
var filteredResults = results;
|
|
881
897
|
var base = currentPage * size;
|
|
882
|
-
|
|
883
|
-
if (parsedPromotedResults.length) {
|
|
884
|
-
var ids = parsedPromotedResults.map(function (item) {
|
|
885
|
-
return item._id;
|
|
886
|
-
}).filter(Boolean);
|
|
887
|
-
|
|
888
|
-
if (ids) {
|
|
889
|
-
filteredResults = filteredResults.filter(function (item) {
|
|
890
|
-
return !ids.includes(item._id);
|
|
891
|
-
});
|
|
892
|
-
}
|
|
893
|
-
|
|
894
|
-
filteredResults = [].concat(parsedPromotedResults, filteredResults);
|
|
895
|
-
}
|
|
896
|
-
|
|
897
898
|
return {
|
|
898
899
|
results: results,
|
|
899
|
-
filteredResults: filteredResults,
|
|
900
900
|
customData: customData || {},
|
|
901
901
|
promotedResults: parsedPromotedResults,
|
|
902
902
|
aggregationData: aggregationData,
|
|
@@ -906,16 +906,15 @@ var ReactiveList = {
|
|
|
906
906
|
};
|
|
907
907
|
},
|
|
908
908
|
getData: function getData() {
|
|
909
|
-
var _this$
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
customData = _this$getAllData3.customData;
|
|
909
|
+
var _this$getAllData2 = this.getAllData(),
|
|
910
|
+
promotedResults = _this$getAllData2.promotedResults,
|
|
911
|
+
aggregationData = _this$getAllData2.aggregationData,
|
|
912
|
+
customData = _this$getAllData2.customData;
|
|
914
913
|
|
|
915
914
|
return {
|
|
916
|
-
data: this.
|
|
915
|
+
data: this.data,
|
|
917
916
|
aggregationData: this.withClickIds(aggregationData || []),
|
|
918
|
-
promotedData: this.withClickIds(promotedResults),
|
|
917
|
+
promotedData: this.withClickIds(promotedResults || []),
|
|
919
918
|
rawData: this.rawData,
|
|
920
919
|
resultStats: this.stats,
|
|
921
920
|
customData: customData
|
|
@@ -927,7 +926,7 @@ var ReactiveList = {
|
|
|
927
926
|
|
|
928
927
|
var data = _extends({
|
|
929
928
|
error: error,
|
|
930
|
-
loading: isLoading,
|
|
929
|
+
loading: isLoading || false,
|
|
931
930
|
loadMore: this.loadMore,
|
|
932
931
|
// TODO: Remove in v2
|
|
933
932
|
triggerAnalytics: this.triggerClickAnalytics,
|
|
@@ -942,13 +941,13 @@ var ReactiveList = {
|
|
|
942
941
|
|
|
943
942
|
var mapStateToProps = function mapStateToProps(state, props) {
|
|
944
943
|
return {
|
|
945
|
-
defaultPage: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value - 1
|
|
944
|
+
defaultPage: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value - 1,
|
|
946
945
|
hits: state.hits[props.componentId] && state.hits[props.componentId].hits,
|
|
947
946
|
rawData: state.rawData[props.componentId],
|
|
948
|
-
aggregationData: state.compositeAggregations[props.componentId]
|
|
949
|
-
promotedResults: state.promotedResults[props.componentId]
|
|
947
|
+
aggregationData: state.compositeAggregations[props.componentId],
|
|
948
|
+
promotedResults: state.promotedResults[props.componentId],
|
|
950
949
|
customData: state.customData[props.componentId],
|
|
951
|
-
time: state.hits[props.componentId] && state.hits[props.componentId].time
|
|
950
|
+
time: state.hits[props.componentId] && state.hits[props.componentId].time,
|
|
952
951
|
total: state.hits[props.componentId] && state.hits[props.componentId].total,
|
|
953
952
|
hidden: state.hits[props.componentId] && state.hits[props.componentId].hidden,
|
|
954
953
|
analytics: state.config && state.config.analytics,
|
|
@@ -957,7 +956,7 @@ var mapStateToProps = function mapStateToProps(state, props) {
|
|
|
957
956
|
error: state.error[props.componentId],
|
|
958
957
|
afterKey: state.aggregations[props.componentId] && state.aggregations[props.componentId][props.aggregationField] && state.aggregations[props.componentId][props.aggregationField].after_key,
|
|
959
958
|
componentProps: state.props[props.componentId],
|
|
960
|
-
isLoading: state.isLoading[props.componentId]
|
|
959
|
+
isLoading: state.isLoading[props.componentId]
|
|
961
960
|
};
|
|
962
961
|
};
|
|
963
962
|
|
package/dist/es/ResultCard.js
CHANGED
|
@@ -3,7 +3,7 @@ import VueTypes from 'vue-types';
|
|
|
3
3
|
import 'emotion';
|
|
4
4
|
import '@appbaseio/vue-emotion';
|
|
5
5
|
import 'polished';
|
|
6
|
-
import { t as types } from './vueTypes-
|
|
6
|
+
import { t as types } from './vueTypes-a9b9d5c9.js';
|
|
7
7
|
import _mergeJSXProps from '@vue/babel-helper-vue-jsx-merge-props';
|
|
8
8
|
import { T as Title } from './Title-579f8d6c.js';
|
|
9
9
|
import { I as Image, C as Card } from './Card-04b3c33e.js';
|
package/dist/es/ResultList.js
CHANGED
|
@@ -3,7 +3,7 @@ import VueTypes from 'vue-types';
|
|
|
3
3
|
import 'emotion';
|
|
4
4
|
import '@appbaseio/vue-emotion';
|
|
5
5
|
import 'polished';
|
|
6
|
-
import { t as types } from './vueTypes-
|
|
6
|
+
import { t as types } from './vueTypes-a9b9d5c9.js';
|
|
7
7
|
import _mergeJSXProps from '@vue/babel-helper-vue-jsx-merge-props';
|
|
8
8
|
import { T as Title } from './Title-579f8d6c.js';
|
|
9
9
|
import { I as Image, L as ListItem } from './ListItem-bdb6d53d.js';
|
|
@@ -6,9 +6,9 @@ import 'emotion';
|
|
|
6
6
|
import '@appbaseio/vue-emotion';
|
|
7
7
|
import 'polished';
|
|
8
8
|
import { f as filters, B as Button } from './Button-799185e2.js';
|
|
9
|
-
import { t as types } from './vueTypes-
|
|
9
|
+
import { t as types } from './vueTypes-a9b9d5c9.js';
|
|
10
10
|
import 'redux';
|
|
11
|
-
import { c as connect } from './index-
|
|
11
|
+
import { c as connect } from './index-4755c9a0.js';
|
|
12
12
|
import { T as Title } from './Title-579f8d6c.js';
|
|
13
13
|
import { C as Container } from './Container-4383c6f0.js';
|
|
14
14
|
|
|
@@ -6,18 +6,18 @@ 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-
|
|
9
|
+
import { t as types } from './vueTypes-a9b9d5c9.js';
|
|
10
10
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
11
11
|
import 'redux';
|
|
12
|
-
import { f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, a as isFunction, g as getComponent, h as hasCustomRenderer, c as connect } from './index-
|
|
13
|
-
import { C as ComponentWrapper } from './ComponentWrapper-
|
|
12
|
+
import { f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, a as isFunction, g as getComponent, h as hasCustomRenderer, c as connect } from './index-4755c9a0.js';
|
|
13
|
+
import { C as ComponentWrapper } from './ComponentWrapper-459505fd.js';
|
|
14
14
|
import { T as Title } from './Title-579f8d6c.js';
|
|
15
15
|
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
19
|
import { g as getAggsQuery } from './utils-3a32e13f.js';
|
|
20
|
-
import { D as Dropdown } from './DropDown-
|
|
20
|
+
import { D as Dropdown } from './DropDown-8894cc22.js';
|
|
21
21
|
|
|
22
22
|
var updateQuery = Actions.updateQuery,
|
|
23
23
|
setQueryOptions = Actions.setQueryOptions,
|
package/dist/es/SingleList.js
CHANGED
|
@@ -5,11 +5,11 @@ 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-
|
|
8
|
+
import { t as types } from './vueTypes-a9b9d5c9.js';
|
|
9
9
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
10
10
|
import 'redux';
|
|
11
|
-
import { f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, a as isFunction, g as getComponent, n as isEvent, h as hasCustomRenderer, c as connect } from './index-
|
|
12
|
-
import { C as ComponentWrapper } from './ComponentWrapper-
|
|
11
|
+
import { f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, a as isFunction, g as getComponent, n as isEvent, h as hasCustomRenderer, c as connect } from './index-4755c9a0.js';
|
|
12
|
+
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';
|
package/dist/es/SingleRange.js
CHANGED
|
@@ -5,11 +5,11 @@ 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-
|
|
8
|
+
import { t as types } from './vueTypes-a9b9d5c9.js';
|
|
9
9
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
10
10
|
import 'redux';
|
|
11
|
-
import { f as updateCustomQuery, i as isQueryIdentical, c as connect } from './index-
|
|
12
|
-
import { C as ComponentWrapper } from './ComponentWrapper-
|
|
11
|
+
import { f as updateCustomQuery, i as isQueryIdentical, c as connect } from './index-4755c9a0.js';
|
|
12
|
+
import { C as ComponentWrapper } from './ComponentWrapper-459505fd.js';
|
|
13
13
|
import { T as Title } from './Title-579f8d6c.js';
|
|
14
14
|
import { C as Container } from './Container-4383c6f0.js';
|
|
15
15
|
import { U as UL, R as Radio } from './FormControlList-fe389a2e.js';
|
package/dist/es/StateProvider.js
CHANGED
|
@@ -3,7 +3,7 @@ import { a as _extends } from './_rollupPluginBabelHelpers-ecf6c03c.js';
|
|
|
3
3
|
import VueTypes from 'vue-types';
|
|
4
4
|
import '@appbaseio/reactivecore/lib/utils/constants';
|
|
5
5
|
import 'redux';
|
|
6
|
-
import { c as connect } from './index-
|
|
6
|
+
import { c as connect } from './index-4755c9a0.js';
|
|
7
7
|
|
|
8
8
|
var getSearchState = helper.getSearchState;
|
|
9
9
|
var defaultKeys = ['hits', 'value', 'aggregations', 'error'];
|
|
@@ -89,7 +89,7 @@ var StateProvider = {
|
|
|
89
89
|
watch: {
|
|
90
90
|
searchState: function searchState(newVal, oldVal) {
|
|
91
91
|
if (this.isStateChanged(newVal, oldVal)) {
|
|
92
|
-
this.$emit('change',
|
|
92
|
+
this.$emit('change', oldVal, newVal);
|
|
93
93
|
}
|
|
94
94
|
},
|
|
95
95
|
selectedValues: function selectedValues(newVal, oldVal) {
|
package/dist/es/ToggleButton.js
CHANGED
|
@@ -6,11 +6,11 @@ import 'emotion';
|
|
|
6
6
|
import '@appbaseio/vue-emotion';
|
|
7
7
|
import 'polished';
|
|
8
8
|
import { B as Button, t as toggleButtons } from './Button-799185e2.js';
|
|
9
|
-
import { t as types } from './vueTypes-
|
|
9
|
+
import { t as types } from './vueTypes-a9b9d5c9.js';
|
|
10
10
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
11
11
|
import 'redux';
|
|
12
|
-
import { f as updateCustomQuery, i as isQueryIdentical, c as connect } from './index-
|
|
13
|
-
import { C as ComponentWrapper } from './ComponentWrapper-
|
|
12
|
+
import { f as updateCustomQuery, i as isQueryIdentical, c as connect } from './index-4755c9a0.js';
|
|
13
|
+
import { C as ComponentWrapper } from './ComponentWrapper-459505fd.js';
|
|
14
14
|
import { T as Title } from './Title-579f8d6c.js';
|
|
15
15
|
import { C as Container } from './Container-4383c6f0.js';
|
|
16
16
|
|
|
@@ -129,6 +129,7 @@ var connect = function connect() {
|
|
|
129
129
|
// storeKey,
|
|
130
130
|
// });
|
|
131
131
|
|
|
132
|
+
var X_SEARCH_CLIENT = 'ReactiveSearch Vue';
|
|
132
133
|
var composeThemeObject = function composeThemeObject(ownTheme, userTheme) {
|
|
133
134
|
if (ownTheme === void 0) {
|
|
134
135
|
ownTheme = {};
|
|
@@ -358,4 +359,4 @@ function extractModifierKeysFromFocusShortcuts(focusShortcutsArray) {
|
|
|
358
359
|
});
|
|
359
360
|
}
|
|
360
361
|
|
|
361
|
-
export { isFunction as a, getCamelCase as b, connect as c, getValidPropsKeys as d, composeThemeObject as e, updateCustomQuery as f, getComponent as g, hasCustomRenderer as h, isQueryIdentical as i, getQuerySuggestionsComponent as j, isEmpty as k, extractModifierKeysFromFocusShortcuts as l, hasQuerySuggestionsRenderer as m, isEvent as n, parseValueArray as o, parseFocusShortcuts as p, updateDefaultQuery as u };
|
|
362
|
+
export { X_SEARCH_CLIENT as X, isFunction as a, getCamelCase as b, connect as c, getValidPropsKeys as d, composeThemeObject as e, updateCustomQuery as f, getComponent as g, hasCustomRenderer as h, isQueryIdentical as i, getQuerySuggestionsComponent as j, isEmpty as k, extractModifierKeysFromFocusShortcuts as l, hasQuerySuggestionsRenderer as m, isEvent as n, parseValueArray as o, parseFocusShortcuts as p, updateDefaultQuery as u };
|
package/dist/es/index.js
CHANGED
|
@@ -2,23 +2,23 @@ import '@appbaseio/reactivecore';
|
|
|
2
2
|
import './_rollupPluginBabelHelpers-ecf6c03c.js';
|
|
3
3
|
import 'vue-types';
|
|
4
4
|
import '@appbaseio/reactivecore/lib/utils/constants';
|
|
5
|
+
import '@appbaseio/reactivecore/lib/utils/helper';
|
|
5
6
|
import 'emotion';
|
|
6
7
|
import '@appbaseio/vue-emotion';
|
|
7
8
|
import 'polished';
|
|
8
9
|
import './Button-799185e2.js';
|
|
9
|
-
import './vueTypes-
|
|
10
|
-
import './Pagination-
|
|
10
|
+
import './vueTypes-a9b9d5c9.js';
|
|
11
|
+
import './Pagination-a2ab7fcb.js';
|
|
11
12
|
export { default as ReactiveList } from './ReactiveList.js';
|
|
12
13
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
13
14
|
import 'redux';
|
|
14
|
-
import './index-
|
|
15
|
-
import './ComponentWrapper-
|
|
15
|
+
import './index-4755c9a0.js';
|
|
16
|
+
import './ComponentWrapper-459505fd.js';
|
|
16
17
|
import '@vue/babel-helper-vue-jsx-merge-props';
|
|
17
18
|
import './Title-579f8d6c.js';
|
|
18
19
|
import './ListItem-bdb6d53d.js';
|
|
19
20
|
import './Card-04b3c33e.js';
|
|
20
21
|
import './Flex-aac91505.js';
|
|
21
|
-
import '@appbaseio/reactivecore/lib/utils/helper';
|
|
22
22
|
import '@appbaseio/reactivecore/lib/actions/analytics';
|
|
23
23
|
import 'appbase-js';
|
|
24
24
|
import 'url-search-params-polyfill';
|
|
@@ -34,7 +34,7 @@ import './FormControlList-fe389a2e.js';
|
|
|
34
34
|
import './utils-3a32e13f.js';
|
|
35
35
|
export { default as SingleList } from './SingleList.js';
|
|
36
36
|
export { default as MultiList } from './MultiList.js';
|
|
37
|
-
import './DropDown-
|
|
37
|
+
import './DropDown-8894cc22.js';
|
|
38
38
|
export { default as SingleDropdownList } from './SingleDropdownList.js';
|
|
39
39
|
export { default as MultiDropdownList } from './MultiDropdownList.js';
|
|
40
40
|
export { default as ToggleButton } from './ToggleButton.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as _extends, b as _objectWithoutPropertiesLoose } from './_rollupPluginBabelHelpers-ecf6c03c.js';
|
|
2
2
|
import { validProps, componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
|
|
3
|
-
import { getRSQuery, extractPropsFromState, getDependentQueries } from '@appbaseio/reactivecore/lib/utils/transform';
|
|
4
3
|
import { pushToAndClause, buildQuery } from '@appbaseio/reactivecore/lib/utils/helper';
|
|
4
|
+
import { getRSQuery, extractPropsFromState, getDependentQueries } from '@appbaseio/reactivecore/lib/utils/transform';
|
|
5
5
|
import Appbase from 'appbase-js';
|
|
6
6
|
import valueReducer from '@appbaseio/reactivecore/lib/reducers/valueReducer';
|
|
7
7
|
import queryReducer from '@appbaseio/reactivecore/lib/reducers/queryReducer';
|
|
@@ -11,6 +11,7 @@ import fetchGraphQL from '@appbaseio/reactivecore/lib/utils/graphQL';
|
|
|
11
11
|
import { isPropertyDefined } from '@appbaseio/reactivecore/lib/actions/utils';
|
|
12
12
|
|
|
13
13
|
var _excluded = ["aggs", "size"];
|
|
14
|
+
var X_SEARCH_CLIENT = 'ReactiveSearch Vue';
|
|
14
15
|
var componentsWithHighlightQuery = [componentTypes.dataSearch, componentTypes.categorySearch];
|
|
15
16
|
var componentsWithOptions = [componentTypes.reactiveList, componentTypes.reactiveMap, componentTypes.singleList, componentTypes.multiList, componentTypes.tagCloud].concat(componentsWithHighlightQuery);
|
|
16
17
|
var componentsWithoutFilters = [componentTypes.numberBox, componentTypes.ratingsFilter];
|
|
@@ -68,6 +69,14 @@ function getQuery(component, value, componentType) {
|
|
|
68
69
|
function initReactivesearch(componentCollection, searchState, settings) {
|
|
69
70
|
return new Promise(function (resolve, reject) {
|
|
70
71
|
var credentials = settings.url && settings.url.trim() !== '' && !settings.credentials ? null : settings.credentials;
|
|
72
|
+
var enableTelemetry = settings.appbaseConfig && settings.appbaseConfig.enableTelemetry !== undefined ? settings.appbaseConfig.enableTelemetry : true;
|
|
73
|
+
|
|
74
|
+
var headers = _extends({}, settings.enableAppbase && _extends({
|
|
75
|
+
'X-Search-Client': X_SEARCH_CLIENT
|
|
76
|
+
}, enableTelemetry === false && {
|
|
77
|
+
'X-Enable-Telemetry': false
|
|
78
|
+
}), settings.headers);
|
|
79
|
+
|
|
71
80
|
var config = {
|
|
72
81
|
url: settings.url && settings.url.trim() !== '' ? settings.url : 'https://scalr.api.appbase.io',
|
|
73
82
|
app: settings.app,
|
|
@@ -76,7 +85,7 @@ function initReactivesearch(componentCollection, searchState, settings) {
|
|
|
76
85
|
type: settings.type ? settings.type : '*',
|
|
77
86
|
transformResponse: settings.transformResponse || null,
|
|
78
87
|
graphQLUrl: settings.graphQLUrl || '',
|
|
79
|
-
headers:
|
|
88
|
+
headers: headers,
|
|
80
89
|
analyticsConfig: settings.appbaseConfig || null
|
|
81
90
|
};
|
|
82
91
|
var appbaseRef = Appbase(config);
|
|
@@ -298,8 +307,9 @@ function initReactivesearch(componentCollection, searchState, settings) {
|
|
|
298
307
|
appbaseQuery = _extends({}, appbaseQuery, (_extends3 = {}, _extends3[component.componentId] = query, _extends3), getDependentQueries(state, component.componentId, orderOfQueries));
|
|
299
308
|
}
|
|
300
309
|
} else {
|
|
310
|
+
var preference = config && config.analyticsConfig && config.analyticsConfig.userId ? config.analyticsConfig.userId + "_" + component : component;
|
|
301
311
|
finalQuery = [].concat(finalQuery, [{
|
|
302
|
-
preference:
|
|
312
|
+
preference: preference
|
|
303
313
|
}, currentQuery]);
|
|
304
314
|
}
|
|
305
315
|
}
|
package/dist/es/install.js
CHANGED
|
@@ -2,23 +2,23 @@ import '@appbaseio/reactivecore';
|
|
|
2
2
|
import './_rollupPluginBabelHelpers-ecf6c03c.js';
|
|
3
3
|
import 'vue-types';
|
|
4
4
|
import '@appbaseio/reactivecore/lib/utils/constants';
|
|
5
|
+
import '@appbaseio/reactivecore/lib/utils/helper';
|
|
5
6
|
import 'emotion';
|
|
6
7
|
import '@appbaseio/vue-emotion';
|
|
7
8
|
import 'polished';
|
|
8
9
|
import './Button-799185e2.js';
|
|
9
|
-
import './vueTypes-
|
|
10
|
-
import './Pagination-
|
|
10
|
+
import './vueTypes-a9b9d5c9.js';
|
|
11
|
+
import './Pagination-a2ab7fcb.js';
|
|
11
12
|
import ReactiveList from './ReactiveList.js';
|
|
12
13
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
13
14
|
import 'redux';
|
|
14
|
-
import './index-
|
|
15
|
-
import './ComponentWrapper-
|
|
15
|
+
import './index-4755c9a0.js';
|
|
16
|
+
import './ComponentWrapper-459505fd.js';
|
|
16
17
|
import '@vue/babel-helper-vue-jsx-merge-props';
|
|
17
18
|
import './Title-579f8d6c.js';
|
|
18
19
|
import './ListItem-bdb6d53d.js';
|
|
19
20
|
import './Card-04b3c33e.js';
|
|
20
21
|
import './Flex-aac91505.js';
|
|
21
|
-
import '@appbaseio/reactivecore/lib/utils/helper';
|
|
22
22
|
import '@appbaseio/reactivecore/lib/actions/analytics';
|
|
23
23
|
import 'appbase-js';
|
|
24
24
|
import 'url-search-params-polyfill';
|
|
@@ -34,7 +34,7 @@ import './FormControlList-fe389a2e.js';
|
|
|
34
34
|
import './utils-3a32e13f.js';
|
|
35
35
|
import SingleList from './SingleList.js';
|
|
36
36
|
import MultiList from './MultiList.js';
|
|
37
|
-
import './DropDown-
|
|
37
|
+
import './DropDown-8894cc22.js';
|
|
38
38
|
import SingleDropdownList from './SingleDropdownList.js';
|
|
39
39
|
import MultiDropdownList from './MultiDropdownList.js';
|
|
40
40
|
import ToggleButton from './ToggleButton.js';
|
package/dist/es/version.js
CHANGED
|
@@ -119,8 +119,9 @@ var types = {
|
|
|
119
119
|
emptyQuery: VueTypes.bool,
|
|
120
120
|
suggestionAnalytics: VueTypes.bool,
|
|
121
121
|
userId: VueTypes.string,
|
|
122
|
-
customEvents: VueTypes.object
|
|
123
|
-
|
|
122
|
+
customEvents: VueTypes.object,
|
|
123
|
+
enableTelemetry: VueTypes.bool.def(true)
|
|
124
|
+
}).def({})
|
|
124
125
|
};
|
|
125
126
|
|
|
126
127
|
export { types as t };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appbaseio/reactivesearch-vue",
|
|
3
|
-
"version": "1.16.0-alpha.
|
|
3
|
+
"version": "1.16.0-alpha.25",
|
|
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.
|
|
37
|
+
"@appbaseio/reactivecore": "9.12.8",
|
|
38
38
|
"@appbaseio/vue-emotion": "0.4.4",
|
|
39
39
|
"@vue/babel-helper-vue-jsx-merge-props": "^1.0.0",
|
|
40
|
-
"appbase-js": "^4.1
|
|
40
|
+
"appbase-js": "^4.4.1",
|
|
41
41
|
"compute-scroll-into-view": "^1.0.11",
|
|
42
42
|
"emotion": "9.2.12",
|
|
43
43
|
"gmap-vue": "^1.5.0",
|