@appbaseio/reactivesearch-vue 1.34.0-alpha.2 → 1.35.0
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 +10892 -8633
- package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js +12 -11
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
- package/dist/cjs/Button-841fd06d.js +62 -0
- package/dist/cjs/{CancelSvg-062a42f0.js → CancelSvg-220a7cc3.js} +40 -32
- package/dist/cjs/Card-240f283d.js +30 -0
- package/dist/cjs/{ComponentWrapper-db45cc6d.js → ComponentWrapper-94c50228.js} +7 -7
- package/dist/cjs/Container-e699ea95.js +15 -0
- package/dist/cjs/DataSearch.js +1313 -20
- package/dist/cjs/{DropDown-3b899b20.js → DropDown-c6b79b05.js} +79 -78
- package/dist/cjs/DynamicRangeSlider.js +47 -56
- package/dist/cjs/Flex-ddd7cb6b.js +50 -0
- package/dist/cjs/FormControlList-bbb5cd24.js +45 -0
- package/dist/cjs/Input-ead4cd84.js +77 -0
- package/dist/cjs/ListItem-5088bd6a.js +45 -0
- package/dist/cjs/MultiDropdownList.js +69 -74
- package/dist/cjs/MultiList.js +95 -89
- package/dist/cjs/MultiRange.js +45 -54
- package/dist/cjs/{Pagination-a468f960.js → Pagination-6d184d4a.js} +53 -56
- package/dist/cjs/{PreferencesConsumer-034c55e3.js → PreferencesConsumer-5e6e84a2.js} +5 -6
- package/dist/cjs/RangeInput.js +108 -115
- package/dist/cjs/RangeSlider.js +40 -50
- package/dist/cjs/ReactiveBase.js +55 -69
- package/dist/cjs/ReactiveComponent.js +317 -46
- package/dist/cjs/{ReactiveComponent-f0f486ca.js → ReactiveComponentPrivate-6f03f300.js} +322 -618
- package/dist/cjs/ReactiveComponentPrivate.js +55 -0
- package/dist/cjs/ReactiveGoogleMap.js +442 -384
- package/dist/cjs/ReactiveList.js +129 -100
- package/dist/cjs/ResultCard.js +19 -26
- package/dist/cjs/ResultList.js +27 -31
- package/dist/cjs/SelectedFilters.js +34 -49
- package/dist/cjs/SingleDropdownList.js +67 -73
- package/dist/cjs/SingleList.js +97 -90
- package/dist/cjs/SingleRange.js +43 -48
- package/dist/cjs/StateProvider.js +2 -2
- package/dist/cjs/Tags-d464c22e.js +883 -0
- package/dist/cjs/Title-16042ea0.js +15 -0
- package/dist/cjs/ToggleButton.js +35 -39
- package/dist/cjs/{index-dc25b706.js → index-de136c17.js} +8 -6
- package/dist/cjs/index.js +27 -25
- package/dist/cjs/initReactivesearch.js +0 -3
- package/dist/cjs/install.js +23 -22
- package/dist/cjs/ssr-f2fc1bf6.js +36 -0
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/{vueTypes-621a8143.js → vueTypes-568ce5e6.js} +4 -2
- package/dist/es/Button-153cd885.js +53 -0
- package/dist/es/{CancelSvg-14ebc9a1.js → CancelSvg-e40552a5.js} +37 -30
- package/dist/es/{Card-1951569e.js → Card-19ad6d90.js} +6 -5
- package/dist/es/{ComponentWrapper-bf443c0b.js → ComponentWrapper-edaeaceb.js} +6 -6
- package/dist/es/Container-d00219f7.js +1 -1
- package/dist/es/DataSearch.js +1313 -18
- package/dist/es/{DropDown-35e232b7.js → DropDown-c685912c.js} +78 -78
- package/dist/es/DynamicRangeSlider.js +44 -53
- package/dist/es/Flex-7c177a10.js +45 -0
- package/dist/es/FormControlList-99797d0a.js +38 -0
- package/dist/es/Input-c09c0b56.js +69 -0
- package/dist/es/{ListItem-47a6345a.js → ListItem-07888a65.js} +7 -6
- package/dist/es/MultiDropdownList.js +67 -72
- package/dist/es/MultiList.js +94 -88
- package/dist/es/MultiRange.js +43 -52
- package/dist/es/{Pagination-145b4ff2.js → Pagination-f477f92f.js} +53 -56
- package/dist/es/{PreferencesConsumer-7ea7313a.js → PreferencesConsumer-86a676c8.js} +4 -5
- package/dist/es/RangeInput.js +104 -112
- package/dist/es/RangeSlider.js +37 -47
- package/dist/es/ReactiveBase.js +53 -68
- package/dist/es/ReactiveComponent.js +317 -45
- package/dist/es/{ReactiveComponent-e2fb9eb4.js → ReactiveComponentPrivate-4467524a.js} +317 -614
- package/dist/es/ReactiveComponentPrivate.js +47 -0
- package/dist/es/ReactiveGoogleMap.js +437 -380
- package/dist/es/ReactiveList.js +126 -98
- package/dist/es/ResultCard.js +18 -25
- package/dist/es/ResultList.js +26 -30
- package/dist/es/SelectedFilters.js +32 -47
- package/dist/es/SingleDropdownList.js +65 -71
- package/dist/es/SingleList.js +95 -88
- package/dist/es/SingleRange.js +41 -46
- package/dist/es/StateProvider.js +2 -2
- package/dist/es/Tags-ebf363ec.js +869 -0
- package/dist/es/Title-863dfa42.js +1 -1
- package/dist/es/ToggleButton.js +33 -37
- package/dist/es/{index-285a43a6.js → index-5509c0bc.js} +8 -6
- package/dist/es/index.js +20 -19
- package/dist/es/initReactivesearch.js +0 -3
- package/dist/es/install.js +20 -19
- package/dist/es/ssr-03607d84.js +1 -1
- package/dist/es/version.js +1 -1
- package/dist/es/{vueTypes-e4af6fe2.js → vueTypes-7f572665.js} +4 -2
- package/package.json +87 -87
- package/dist/cjs/Button-626c5e8e.js +0 -58
- package/dist/cjs/Card-c381ded3.js +0 -26
- package/dist/cjs/Container-29f049b2.js +0 -12
- package/dist/cjs/DataSearch-7c71ec9f.js +0 -2043
- package/dist/cjs/Flex-d5675ea6.js +0 -48
- package/dist/cjs/FormControlList-cf1ff2ca.js +0 -42
- package/dist/cjs/Input-4d278ca0.js +0 -74
- package/dist/cjs/ListItem-c067bc07.js +0 -41
- package/dist/cjs/Title-8802a218.js +0 -12
- package/dist/cjs/ssr-eb901d09.js +0 -35
- package/dist/es/Button-ebafa3d6.js +0 -52
- package/dist/es/DataSearch-4f9a4e46.js +0 -2028
- package/dist/es/Flex-a08e22d7.js +0 -46
- package/dist/es/FormControlList-fa5cf78b.js +0 -38
- package/dist/es/Input-3b8408a6.js +0 -69
package/dist/cjs/ReactiveList.js
CHANGED
|
@@ -8,36 +8,44 @@ var configureStore = require('@appbaseio/reactivecore');
|
|
|
8
8
|
var configureStore__default = _interopDefault(configureStore);
|
|
9
9
|
var constants = require('@appbaseio/reactivecore/lib/utils/constants');
|
|
10
10
|
var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-f8b843f8.js');
|
|
11
|
-
var vue = require('vue');
|
|
12
11
|
var VueTypes = _interopDefault(require('vue-types'));
|
|
13
12
|
var helper = require('@appbaseio/reactivecore/lib/utils/helper');
|
|
14
|
-
var
|
|
15
|
-
require('emotion');
|
|
13
|
+
var emotion = require('emotion');
|
|
14
|
+
var styled = require('@appbaseio/vue-emotion');
|
|
15
|
+
var styled__default = _interopDefault(styled);
|
|
16
16
|
require('polished');
|
|
17
|
-
require('./Button-
|
|
18
|
-
var vueTypes = require('./vueTypes-
|
|
19
|
-
var Pagination = require('./Pagination-
|
|
17
|
+
require('./Button-841fd06d.js');
|
|
18
|
+
var vueTypes = require('./vueTypes-568ce5e6.js');
|
|
19
|
+
var Pagination = require('./Pagination-6d184d4a.js');
|
|
20
20
|
require('@appbaseio/reactivecore/lib/utils/transform');
|
|
21
21
|
require('redux');
|
|
22
|
-
var index = require('./index-
|
|
23
|
-
var ComponentWrapper = require('./ComponentWrapper-
|
|
24
|
-
var PreferencesConsumer = require('./PreferencesConsumer-
|
|
25
|
-
require('
|
|
26
|
-
|
|
27
|
-
var
|
|
28
|
-
var
|
|
22
|
+
var index = require('./index-de136c17.js');
|
|
23
|
+
var ComponentWrapper = require('./ComponentWrapper-94c50228.js');
|
|
24
|
+
var PreferencesConsumer = require('./PreferencesConsumer-5e6e84a2.js');
|
|
25
|
+
var _mergeJSXProps = _interopDefault(require('@vue/babel-helper-vue-jsx-merge-props'));
|
|
26
|
+
require('./Title-16042ea0.js');
|
|
27
|
+
var ListItem = require('./ListItem-5088bd6a.js');
|
|
28
|
+
var Card = require('./Card-240f283d.js');
|
|
29
|
+
var Flex = require('./Flex-ddd7cb6b.js');
|
|
29
30
|
|
|
30
31
|
var _templateObject;
|
|
31
|
-
var PoweredByImage =
|
|
32
|
+
var PoweredByImage = styled__default('img')(_templateObject || (_templateObject = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\twidth: 110px;\n"])));
|
|
32
33
|
|
|
33
|
-
var PoweredBy =
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
34
|
+
var PoweredBy = {
|
|
35
|
+
functional: true,
|
|
36
|
+
render: function render(h) {
|
|
37
|
+
return h("a", {
|
|
38
|
+
"attrs": {
|
|
39
|
+
"href": "https://appbase.io/",
|
|
40
|
+
"target": "_blank",
|
|
41
|
+
"rel": "noopener noreferrer"
|
|
42
|
+
}
|
|
43
|
+
}, [h(PoweredByImage, {
|
|
44
|
+
"attrs": {
|
|
45
|
+
"src": "https://cdn.jsdelivr.net/gh/appbaseio/cdn@d2ec210045e59104ee5485841fa17b23fc83f097/appbase/logos/rbc-logo.svg"
|
|
46
|
+
}
|
|
47
|
+
})]);
|
|
48
|
+
}
|
|
41
49
|
};
|
|
42
50
|
|
|
43
51
|
var ResultListWrapper = {
|
|
@@ -46,9 +54,12 @@ var ResultListWrapper = {
|
|
|
46
54
|
render: function render(_, _ref) {
|
|
47
55
|
var props = _ref.props,
|
|
48
56
|
children = _ref.children;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
57
|
+
var h = arguments[0];
|
|
58
|
+
return h("div", _mergeJSXProps([{
|
|
59
|
+
"attrs": {
|
|
60
|
+
"className": ListItem.container
|
|
61
|
+
}
|
|
62
|
+
}, props]), [children]);
|
|
52
63
|
}
|
|
53
64
|
};
|
|
54
65
|
ResultListWrapper.install = function (Vue) {
|
|
@@ -61,17 +72,21 @@ var ResultCardsWrapper = {
|
|
|
61
72
|
render: function render(_, _ref) {
|
|
62
73
|
var props = _ref.props,
|
|
63
74
|
children = _ref.children;
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
75
|
+
var h = arguments[0];
|
|
76
|
+
return h("div", _mergeJSXProps([{
|
|
77
|
+
"attrs": {
|
|
78
|
+
"className": Card.container
|
|
79
|
+
}
|
|
80
|
+
}, props]), [children]);
|
|
67
81
|
}
|
|
68
82
|
};
|
|
69
83
|
ResultCardsWrapper.install = function (Vue) {
|
|
70
84
|
Vue.component(ResultCardsWrapper.name, ResultCardsWrapper);
|
|
71
85
|
};
|
|
72
86
|
|
|
73
|
-
var
|
|
74
|
-
var
|
|
87
|
+
var _templateObject$1, _templateObject2;
|
|
88
|
+
var resultStats = emotion.css(_templateObject$1 || (_templateObject$1 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\tflex-grow: 1;\n\tfont-size: 0.82rem;\n"])));
|
|
89
|
+
var sortOptions = emotion.css(_templateObject2 || (_templateObject2 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\tcolor: #424242;\n\theight: 32px;\n\tfont-size: 0.82rem;\n\tpadding: 0 25px 0 10px;\n\tbackground: url(data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0Ljk1IDEwIj48ZGVmcz48c3R5bGU+LmNscy0xe2ZpbGw6I2ZmZjt9LmNscy0ye2ZpbGw6IzQ0NDt9PC9zdHlsZT48L2RlZnM+PHRpdGxlPmFycm93czwvdGl0bGU+PHJlY3QgY2xhc3M9ImNscy0xIiB3aWR0aD0iNC45NSIgaGVpZ2h0PSIxMCIvPjxwb2x5Z29uIGNsYXNzPSJjbHMtMiIgcG9pbnRzPSIxLjQxIDQuNjcgMi40OCAzLjE4IDMuNTQgNC42NyAxLjQxIDQuNjciLz48cG9seWdvbiBjbGFzcz0iY2xzLTIiIHBvaW50cz0iMy41NCA1LjMzIDIuNDggNi44MiAxLjQxIDUuMzMgMy41NCA1LjMzIi8+PC9zdmc+)\n\t\tno-repeat 95% 50%;\n\tbackground-color: #fff;\n\t-moz-appearance: none;\n\t-webkit-appearance: none;\n\tappearance: none;\n\t-webkit-border-radius: 0;\n\tborder-radius: 0;\n\tborder: 0;\n\toutline: 1px solid #ddd;\n\toutline-offset: -1px;\n"])));
|
|
75
90
|
|
|
76
91
|
var recordImpressions = configureStore.Actions.recordImpressions;
|
|
77
92
|
var isEqual = configureStore.helper.isEqual;
|
|
@@ -230,9 +245,6 @@ var ImpressionTracker$1 = index.connect(function () {
|
|
|
230
245
|
return null;
|
|
231
246
|
}, mapDispatchToProps)(ImpressionTracker);
|
|
232
247
|
|
|
233
|
-
function _isSlot(s) {
|
|
234
|
-
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
235
|
-
}
|
|
236
248
|
var setQueryOptions = configureStore.Actions.setQueryOptions,
|
|
237
249
|
updateQuery = configureStore.Actions.updateQuery,
|
|
238
250
|
loadMore = configureStore.Actions.loadMore,
|
|
@@ -250,11 +262,6 @@ var isEqual$1 = configureStore.helper.isEqual,
|
|
|
250
262
|
getOptionsForCustomQuery = configureStore.helper.getOptionsForCustomQuery;
|
|
251
263
|
var ReactiveList = {
|
|
252
264
|
name: 'ReactiveList',
|
|
253
|
-
inject: {
|
|
254
|
-
$emotionCache: {
|
|
255
|
-
"default": undefined
|
|
256
|
-
}
|
|
257
|
-
},
|
|
258
265
|
components: {
|
|
259
266
|
ResultListWrapper: ResultListWrapper,
|
|
260
267
|
ResultCardsWrapper: ResultCardsWrapper
|
|
@@ -322,6 +329,7 @@ var ReactiveList = {
|
|
|
322
329
|
// component props
|
|
323
330
|
className: vueTypes.types.string,
|
|
324
331
|
componentId: vueTypes.types.stringRequired,
|
|
332
|
+
compoundClause: vueTypes.types.compoundClause,
|
|
325
333
|
dataField: vueTypes.types.stringRequired,
|
|
326
334
|
aggregationField: vueTypes.types.string,
|
|
327
335
|
aggregationSize: VueTypes.number,
|
|
@@ -363,10 +371,10 @@ var ReactiveList = {
|
|
|
363
371
|
return Math.ceil(this.total / this.$props.size) || 0;
|
|
364
372
|
},
|
|
365
373
|
hasPageChangeListener: function hasPageChangeListener() {
|
|
366
|
-
return this.$
|
|
374
|
+
return this.$listeners && this.$listeners.pageChange;
|
|
367
375
|
},
|
|
368
376
|
hasResultStatsListener: function hasResultStatsListener() {
|
|
369
|
-
return this.$
|
|
377
|
+
return this.$listeners && this.$listeners.resultStats;
|
|
370
378
|
},
|
|
371
379
|
stats: function stats() {
|
|
372
380
|
return _rollupPluginBabelHelpers._extends({}, getResultStats(this), {
|
|
@@ -502,7 +510,16 @@ var ReactiveList = {
|
|
|
502
510
|
},
|
|
503
511
|
infiniteScroll: function infiniteScroll(newVal, oldVal) {
|
|
504
512
|
if (newVal !== oldVal) {
|
|
505
|
-
if (!
|
|
513
|
+
if (newVal && !this.pagination) {
|
|
514
|
+
window.addEventListener('scroll', this.scrollHandler);
|
|
515
|
+
} else {
|
|
516
|
+
window.removeEventListener('scroll', this.scrollHandler);
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
},
|
|
520
|
+
pagination: function pagination(newVal, oldVal) {
|
|
521
|
+
if (newVal !== oldVal) {
|
|
522
|
+
if (!newVal && this.infiniteScroll) {
|
|
506
523
|
window.addEventListener('scroll', this.scrollHandler);
|
|
507
524
|
} else {
|
|
508
525
|
window.removeEventListener('scroll', this.scrollHandler);
|
|
@@ -568,88 +585,87 @@ var ReactiveList = {
|
|
|
568
585
|
window.addEventListener('scroll', this.scrollHandler);
|
|
569
586
|
}
|
|
570
587
|
},
|
|
571
|
-
|
|
588
|
+
beforeDestroy: function beforeDestroy() {
|
|
572
589
|
if (this.showInfiniteScroll) {
|
|
573
590
|
window.removeEventListener('scroll', this.scrollHandler);
|
|
574
591
|
}
|
|
575
592
|
},
|
|
576
593
|
render: function render() {
|
|
577
|
-
var
|
|
594
|
+
var h = arguments[0];
|
|
578
595
|
var hits = this.$data.hits;
|
|
579
596
|
var results = parseHits(hits) || [];
|
|
580
|
-
return
|
|
597
|
+
return h("div", {
|
|
581
598
|
"style": this.$props.style,
|
|
582
599
|
"class": this.$props.className
|
|
583
|
-
}, [this.isLoading && this.shouldRenderPagination && this.showInfiniteScroll && (this.$
|
|
584
|
-
"
|
|
600
|
+
}, [this.isLoading && this.shouldRenderPagination && this.showInfiniteScroll && (this.$scopedSlots.loader || this.$props.loader), this.renderErrorComponent(), h(Flex.Flex, {
|
|
601
|
+
"attrs": {
|
|
602
|
+
"labelPosition": this.sortOptions ? 'right' : 'left'
|
|
603
|
+
},
|
|
585
604
|
"class": getClassName(this.$props.innerClass, 'resultsInfo')
|
|
586
|
-
}, {
|
|
587
|
-
"
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
"nextLabel": this.$props.nextLabel
|
|
598
|
-
}, null) : null, this.renderResults(), this.isLoading && !this.shouldRenderPagination ? this.$slots.loader || this.$props.loader || vue.createVNode("div", {
|
|
605
|
+
}, [this.sortOptions ? this.renderSortOptions() : null, this.$props.showResultStats && results.length ? this.renderStats() : null]), !this.isLoading && hits && hits.length === 0 ? this.renderNoResult() : null, this.shouldRenderPagination && (this.$props.paginationAt === 'top' || this.$props.paginationAt === 'both') ? h(Pagination.Pagination, {
|
|
606
|
+
"attrs": {
|
|
607
|
+
"pages": this.$props.pages,
|
|
608
|
+
"totalPages": this.totalPages,
|
|
609
|
+
"currentPage": this.currentPageState,
|
|
610
|
+
"setPage": this.setPage,
|
|
611
|
+
"innerClass": this.$props.innerClass,
|
|
612
|
+
"prevLabel": this.$props.prevLabel,
|
|
613
|
+
"nextLabel": this.$props.nextLabel
|
|
614
|
+
}
|
|
615
|
+
}) : null, this.renderResults(), this.isLoading && !this.shouldRenderPagination ? this.$scopedSlots.loader || this.$props.loader || h("div", {
|
|
599
616
|
"style": {
|
|
600
617
|
textAlign: 'center',
|
|
601
618
|
margin: '20px 0',
|
|
602
619
|
color: '#666'
|
|
603
620
|
}
|
|
604
|
-
}, [
|
|
605
|
-
"
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
621
|
+
}, ["Loading..."]) : null, this.shouldRenderPagination && (this.$props.paginationAt === 'bottom' || this.$props.paginationAt === 'both') ? h(Pagination.Pagination, {
|
|
622
|
+
"attrs": {
|
|
623
|
+
"pages": this.$props.pages,
|
|
624
|
+
"totalPages": Math.ceil(this.$data.total / this.$props.size),
|
|
625
|
+
"currentPage": this.currentPageState,
|
|
626
|
+
"setPage": this.setPage,
|
|
627
|
+
"showEndPage": this.$props.showEndPage,
|
|
628
|
+
"innerClass": this.$props.innerClass,
|
|
629
|
+
"prevLabel": this.$props.prevLabel,
|
|
630
|
+
"nextLabel": this.$props.nextLabel
|
|
631
|
+
}
|
|
632
|
+
}) : null, this.url.endsWith('appbase.io') && results.length ? h(Flex.Flex, {
|
|
633
|
+
"attrs": {
|
|
634
|
+
"direction": "row-reverse"
|
|
635
|
+
},
|
|
615
636
|
"class": getClassName(this.$props.innerClass, 'poweredBy')
|
|
616
|
-
},
|
|
617
|
-
"default": function _default() {
|
|
618
|
-
return [vue.createVNode(PoweredBy, null, null)];
|
|
619
|
-
}
|
|
620
|
-
}) : null]);
|
|
637
|
+
}, [h(PoweredBy)]) : null]);
|
|
621
638
|
},
|
|
622
639
|
methods: {
|
|
623
640
|
renderErrorComponent: function renderErrorComponent() {
|
|
624
|
-
var renderError = this.$
|
|
641
|
+
var renderError = this.$scopedSlots.renderError || this.$props.renderError;
|
|
625
642
|
if (renderError && this.error && !this.isLoading) {
|
|
626
643
|
return index.isFunction(renderError) ? renderError(this.error) : renderError;
|
|
627
644
|
}
|
|
628
645
|
return null;
|
|
629
646
|
},
|
|
630
647
|
renderResults: function renderResults() {
|
|
631
|
-
var
|
|
648
|
+
var _this2 = this;
|
|
649
|
+
var h = this.$createElement;
|
|
632
650
|
var size = this.$props.size;
|
|
633
|
-
var renderItem = this.$
|
|
634
|
-
var element = this.hasCustomRender ? this.getComponent() :
|
|
651
|
+
var renderItem = this.$scopedSlots.renderItem || this.$props.renderItem;
|
|
652
|
+
var element = this.hasCustomRender ? this.getComponent() : h("div", {
|
|
635
653
|
"class": this.$props.listClass + " " + getClassName(this.$props.innerClass, 'list')
|
|
636
654
|
}, [this.data.map(function (item, index) {
|
|
637
655
|
return renderItem({
|
|
638
656
|
item: item,
|
|
639
|
-
count:
|
|
657
|
+
count: _this2.currentPageState * size + index + 1,
|
|
640
658
|
triggerClickAnalytics: function triggerClickAnalytics() {
|
|
641
|
-
return
|
|
659
|
+
return _this2.triggerClickAnalytics(_this2.currentPageState * size + index);
|
|
642
660
|
}
|
|
643
661
|
});
|
|
644
662
|
})]);
|
|
645
663
|
// If analytics is set to true then render with impression tracker
|
|
646
|
-
return this.analytics ?
|
|
647
|
-
"
|
|
648
|
-
|
|
649
|
-
"default": function _default() {
|
|
650
|
-
return [element];
|
|
664
|
+
return this.analytics ? h(ImpressionTracker$1, {
|
|
665
|
+
"attrs": {
|
|
666
|
+
"hits": this.data
|
|
651
667
|
}
|
|
652
|
-
}) : element;
|
|
668
|
+
}, [element]) : element;
|
|
653
669
|
},
|
|
654
670
|
updateQueryOptions: function updateQueryOptions(props) {
|
|
655
671
|
var options = getQueryOptions(props);
|
|
@@ -735,23 +751,25 @@ var ReactiveList = {
|
|
|
735
751
|
}
|
|
736
752
|
},
|
|
737
753
|
renderStats: function renderStats() {
|
|
738
|
-
var
|
|
754
|
+
var h = this.$createElement;
|
|
755
|
+
var renderResultStats = this.$scopedSlots.renderResultStats || this.$props.renderResultStats;
|
|
739
756
|
if (renderResultStats && this.$data.total) {
|
|
740
757
|
return renderResultStats(this.stats);
|
|
741
758
|
}
|
|
742
759
|
if (this.stats.numberOfResults) {
|
|
743
|
-
return
|
|
760
|
+
return h("p", {
|
|
744
761
|
"class": resultStats + " " + getClassName(this.$props.innerClass, 'resultStats')
|
|
745
|
-
}, [this.stats.numberOfResults,
|
|
762
|
+
}, [this.stats.numberOfResults, " results found in ", this.stats.time || 0, "ms"]);
|
|
746
763
|
}
|
|
747
764
|
return null;
|
|
748
765
|
},
|
|
749
766
|
renderNoResult: function renderNoResult() {
|
|
750
|
-
var
|
|
751
|
-
|
|
767
|
+
var h = this.$createElement;
|
|
768
|
+
var renderNoResults = this.$scopedSlots.renderNoResults || this.$props.renderNoResults;
|
|
769
|
+
if (this.$scopedSlots.renderNoResults) {
|
|
752
770
|
return index.isFunction(renderNoResults) ? renderNoResults() : renderNoResults;
|
|
753
771
|
}
|
|
754
|
-
return
|
|
772
|
+
return h("p", {
|
|
755
773
|
"class": getClassName(this.$props.innerClass, 'noResults') || null
|
|
756
774
|
}, [index.isFunction(renderNoResults) ? renderNoResults() : renderNoResults]);
|
|
757
775
|
},
|
|
@@ -796,16 +814,25 @@ var ReactiveList = {
|
|
|
796
814
|
this.recordResultClick(searchPosition, docId);
|
|
797
815
|
},
|
|
798
816
|
renderSortOptions: function renderSortOptions() {
|
|
799
|
-
|
|
817
|
+
var h = this.$createElement;
|
|
818
|
+
return h("select", {
|
|
800
819
|
"class": sortOptions + " " + getClassName(this.$props.innerClass, 'sortOptions'),
|
|
801
|
-
"
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
820
|
+
"attrs": {
|
|
821
|
+
"name": "sort-options",
|
|
822
|
+
"aria-label": "Sort options"
|
|
823
|
+
},
|
|
824
|
+
"on": {
|
|
825
|
+
"change": this.handleSortChange
|
|
826
|
+
},
|
|
827
|
+
"domProps": {
|
|
828
|
+
"value": this.sortOptionIndex
|
|
829
|
+
}
|
|
805
830
|
}, [this.sortOptions.map(function (sort, index) {
|
|
806
|
-
return
|
|
831
|
+
return h("option", {
|
|
807
832
|
"key": sort.label,
|
|
808
|
-
"
|
|
833
|
+
"domProps": {
|
|
834
|
+
"value": index
|
|
835
|
+
}
|
|
809
836
|
}, [sort.label]);
|
|
810
837
|
})]);
|
|
811
838
|
},
|
|
@@ -943,6 +970,8 @@ var RLConnected = PreferencesConsumer.PreferencesConsumer(ComponentWrapper.Compo
|
|
|
943
970
|
internalComponent: ReactiveList.hasInternalComponent()
|
|
944
971
|
}));
|
|
945
972
|
RLConnected.name = ReactiveList.name;
|
|
973
|
+
RLConnected.generateQueryOptions = ReactiveList.generateQueryOptions;
|
|
974
|
+
RLConnected.hasInternalComponent = ReactiveList.hasInternalComponent;
|
|
946
975
|
RLConnected.install = function (Vue) {
|
|
947
976
|
Vue.component(RLConnected.name, RLConnected);
|
|
948
977
|
Vue.component(ResultListWrapper.name, ResultListWrapper);
|
package/dist/cjs/ResultCard.js
CHANGED
|
@@ -5,26 +5,21 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
6
6
|
|
|
7
7
|
var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-f8b843f8.js');
|
|
8
|
-
var vue = require('vue');
|
|
9
8
|
var VueTypes = _interopDefault(require('vue-types'));
|
|
9
|
+
require('emotion');
|
|
10
10
|
require('@appbaseio/vue-emotion');
|
|
11
11
|
require('polished');
|
|
12
|
-
var vueTypes = require('./vueTypes-
|
|
13
|
-
var
|
|
14
|
-
var
|
|
12
|
+
var vueTypes = require('./vueTypes-568ce5e6.js');
|
|
13
|
+
var _mergeJSXProps = _interopDefault(require('@vue/babel-helper-vue-jsx-merge-props'));
|
|
14
|
+
var Title = require('./Title-16042ea0.js');
|
|
15
|
+
var Card = require('./Card-240f283d.js');
|
|
15
16
|
|
|
16
|
-
function _isSlot(s) {
|
|
17
|
-
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
18
|
-
}
|
|
19
17
|
var ResultCardTitle = {
|
|
20
18
|
name: 'ResultCardTitle',
|
|
21
19
|
render: function render() {
|
|
20
|
+
var h = arguments[0];
|
|
22
21
|
var children = this.$slots["default"];
|
|
23
|
-
return
|
|
24
|
-
"default": function _default() {
|
|
25
|
-
return [children];
|
|
26
|
-
}
|
|
27
|
-
});
|
|
22
|
+
return h(Title.Title, _mergeJSXProps([{}, this.$props]), [children]);
|
|
28
23
|
}
|
|
29
24
|
};
|
|
30
25
|
ResultCardTitle.install = function (Vue) {
|
|
@@ -38,14 +33,15 @@ var ResultCardImage = {
|
|
|
38
33
|
src: VueTypes.string.isRequired
|
|
39
34
|
},
|
|
40
35
|
render: function render() {
|
|
36
|
+
var h = arguments[0];
|
|
41
37
|
var _this$$props = this.$props,
|
|
42
38
|
src = _this$$props.src,
|
|
43
39
|
props = _rollupPluginBabelHelpers._objectWithoutPropertiesLoose(_this$$props, _excluded);
|
|
44
|
-
return
|
|
40
|
+
return h(Card.Image, _mergeJSXProps([{
|
|
45
41
|
"style": {
|
|
46
42
|
backgroundImage: "url(" + src + ")"
|
|
47
43
|
}
|
|
48
|
-
}, props)
|
|
44
|
+
}, props]));
|
|
49
45
|
}
|
|
50
46
|
};
|
|
51
47
|
ResultCardImage.install = function (Vue) {
|
|
@@ -58,7 +54,8 @@ var ResultCardDescription = {
|
|
|
58
54
|
render: function render(_, _ref) {
|
|
59
55
|
var props = _ref.props,
|
|
60
56
|
children = _ref.children;
|
|
61
|
-
|
|
57
|
+
var h = arguments[0];
|
|
58
|
+
return h("article", _mergeJSXProps([{}, props]), [children]);
|
|
62
59
|
}
|
|
63
60
|
};
|
|
64
61
|
ResultCardDescription.install = function (Vue) {
|
|
@@ -66,9 +63,6 @@ ResultCardDescription.install = function (Vue) {
|
|
|
66
63
|
};
|
|
67
64
|
|
|
68
65
|
var _excluded$1 = ["href", "target"];
|
|
69
|
-
function _isSlot$1(s) {
|
|
70
|
-
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
71
|
-
}
|
|
72
66
|
var ResultCard = {
|
|
73
67
|
name: 'ResultCard',
|
|
74
68
|
components: {
|
|
@@ -81,20 +75,19 @@ var ResultCard = {
|
|
|
81
75
|
href: vueTypes.types.string
|
|
82
76
|
},
|
|
83
77
|
render: function render() {
|
|
78
|
+
var h = arguments[0];
|
|
84
79
|
var children = this.$slots["default"];
|
|
85
80
|
var _this$$props = this.$props,
|
|
86
81
|
href = _this$$props.href,
|
|
87
82
|
target = _this$$props.target,
|
|
88
83
|
rest = _rollupPluginBabelHelpers._objectWithoutPropertiesLoose(_this$$props, _excluded$1);
|
|
89
|
-
return
|
|
90
|
-
"
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
"default": function _default() {
|
|
95
|
-
return [children];
|
|
84
|
+
return h(Card.Card, _mergeJSXProps([{
|
|
85
|
+
"attrs": {
|
|
86
|
+
"href": href,
|
|
87
|
+
"target": target,
|
|
88
|
+
"rel": target === '_blank' ? 'noopener noreferrer' : null
|
|
96
89
|
}
|
|
97
|
-
});
|
|
90
|
+
}, rest]), [children]);
|
|
98
91
|
}
|
|
99
92
|
};
|
|
100
93
|
ResultCard.install = function (Vue) {
|
package/dist/cjs/ResultList.js
CHANGED
|
@@ -5,13 +5,14 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
6
6
|
|
|
7
7
|
var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-f8b843f8.js');
|
|
8
|
-
var vue = require('vue');
|
|
9
8
|
var VueTypes = _interopDefault(require('vue-types'));
|
|
9
|
+
require('emotion');
|
|
10
10
|
require('@appbaseio/vue-emotion');
|
|
11
11
|
require('polished');
|
|
12
|
-
var vueTypes = require('./vueTypes-
|
|
13
|
-
var
|
|
14
|
-
var
|
|
12
|
+
var vueTypes = require('./vueTypes-568ce5e6.js');
|
|
13
|
+
var _mergeJSXProps = _interopDefault(require('@vue/babel-helper-vue-jsx-merge-props'));
|
|
14
|
+
var Title = require('./Title-16042ea0.js');
|
|
15
|
+
var ListItem = require('./ListItem-5088bd6a.js');
|
|
15
16
|
|
|
16
17
|
var ResultListContent = {
|
|
17
18
|
name: 'ResultListContent',
|
|
@@ -19,7 +20,8 @@ var ResultListContent = {
|
|
|
19
20
|
render: function render(_, _ref) {
|
|
20
21
|
var props = _ref.props,
|
|
21
22
|
children = _ref.children;
|
|
22
|
-
|
|
23
|
+
var h = arguments[0];
|
|
24
|
+
return h("article", _mergeJSXProps([{}, props]), [children]);
|
|
23
25
|
}
|
|
24
26
|
};
|
|
25
27
|
ResultListContent.install = function (Vue) {
|
|
@@ -32,7 +34,8 @@ var ResultListDescription = {
|
|
|
32
34
|
render: function render(_, _ref) {
|
|
33
35
|
var props = _ref.props,
|
|
34
36
|
children = _ref.children;
|
|
35
|
-
|
|
37
|
+
var h = arguments[0];
|
|
38
|
+
return h("div", _mergeJSXProps([{}, props]), [children]);
|
|
36
39
|
}
|
|
37
40
|
};
|
|
38
41
|
ResultListDescription.install = function (Vue) {
|
|
@@ -47,32 +50,29 @@ var ResultListImage = {
|
|
|
47
50
|
small: VueTypes.bool.def(false)
|
|
48
51
|
},
|
|
49
52
|
render: function render() {
|
|
53
|
+
var h = arguments[0];
|
|
50
54
|
var _this$$props = this.$props,
|
|
51
55
|
src = _this$$props.src,
|
|
52
56
|
small = _this$$props.small,
|
|
53
57
|
props = _rollupPluginBabelHelpers._objectWithoutPropertiesLoose(_this$$props, _excluded);
|
|
54
|
-
return
|
|
55
|
-
"
|
|
56
|
-
|
|
57
|
-
|
|
58
|
+
return h(ListItem.Image, _mergeJSXProps([{
|
|
59
|
+
"attrs": {
|
|
60
|
+
"src": src,
|
|
61
|
+
"small": small
|
|
62
|
+
}
|
|
63
|
+
}, props]));
|
|
58
64
|
}
|
|
59
65
|
};
|
|
60
66
|
ResultListImage.install = function (Vue) {
|
|
61
67
|
Vue.component(ResultListImage.name, ResultListImage);
|
|
62
68
|
};
|
|
63
69
|
|
|
64
|
-
function _isSlot(s) {
|
|
65
|
-
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
66
|
-
}
|
|
67
70
|
var ResultListTitle = {
|
|
68
71
|
name: 'ResultListTitle',
|
|
69
72
|
render: function render() {
|
|
73
|
+
var h = arguments[0];
|
|
70
74
|
var children = this.$slots["default"];
|
|
71
|
-
return
|
|
72
|
-
"default": function _default() {
|
|
73
|
-
return [children];
|
|
74
|
-
}
|
|
75
|
-
});
|
|
75
|
+
return h(Title.Title, _mergeJSXProps([{}, this.$props]), [children]);
|
|
76
76
|
}
|
|
77
77
|
};
|
|
78
78
|
ResultListTitle.install = function (Vue) {
|
|
@@ -80,9 +80,6 @@ ResultListTitle.install = function (Vue) {
|
|
|
80
80
|
};
|
|
81
81
|
|
|
82
82
|
var _excluded$1 = ["href", "target"];
|
|
83
|
-
function _isSlot$1(s) {
|
|
84
|
-
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
85
|
-
}
|
|
86
83
|
var ResultList = {
|
|
87
84
|
name: 'ResultList',
|
|
88
85
|
props: {
|
|
@@ -115,6 +112,7 @@ var ResultList = {
|
|
|
115
112
|
}
|
|
116
113
|
},
|
|
117
114
|
render: function render() {
|
|
115
|
+
var h = arguments[0];
|
|
118
116
|
var _this$$props = this.$props,
|
|
119
117
|
href = _this$$props.href,
|
|
120
118
|
target = _this$$props.target,
|
|
@@ -122,17 +120,15 @@ var ResultList = {
|
|
|
122
120
|
var hasImage = this.hasImage,
|
|
123
121
|
isSmall = this.isSmall;
|
|
124
122
|
var children = this.$slots["default"];
|
|
125
|
-
return
|
|
126
|
-
"
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
"default": function _default() {
|
|
133
|
-
return [children];
|
|
123
|
+
return h(ListItem.ListItem, _mergeJSXProps([{
|
|
124
|
+
"attrs": {
|
|
125
|
+
"href": href,
|
|
126
|
+
"image": hasImage,
|
|
127
|
+
"small": isSmall,
|
|
128
|
+
"target": target,
|
|
129
|
+
"rel": target === '_blank' ? 'noopener noreferrer' : null
|
|
134
130
|
}
|
|
135
|
-
});
|
|
131
|
+
}, props]), [children]);
|
|
136
132
|
}
|
|
137
133
|
};
|
|
138
134
|
ResultList.install = function (Vue) {
|