@appbaseio/reactivesearch-vue 1.34.0-alpha.2 → 1.34.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 +10874 -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 +1312 -20
- package/dist/cjs/{DropDown-3b899b20.js → DropDown-7a52c661.js} +79 -78
- package/dist/cjs/DynamicRangeSlider.js +46 -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 +68 -74
- package/dist/cjs/MultiList.js +94 -89
- package/dist/cjs/MultiRange.js +44 -54
- package/dist/cjs/{Pagination-a468f960.js → Pagination-e56a5b79.js} +53 -56
- package/dist/cjs/{PreferencesConsumer-034c55e3.js → PreferencesConsumer-5e6e84a2.js} +5 -6
- package/dist/cjs/RangeInput.js +107 -115
- package/dist/cjs/RangeSlider.js +39 -50
- package/dist/cjs/ReactiveBase.js +55 -69
- package/dist/cjs/ReactiveComponent.js +316 -46
- package/dist/cjs/{ReactiveComponent-f0f486ca.js → ReactiveComponentPrivate-244c6055.js} +321 -618
- package/dist/cjs/ReactiveComponentPrivate.js +55 -0
- package/dist/cjs/ReactiveGoogleMap.js +439 -384
- package/dist/cjs/ReactiveList.js +128 -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 +66 -73
- package/dist/cjs/SingleList.js +96 -90
- package/dist/cjs/SingleRange.js +42 -48
- package/dist/cjs/StateProvider.js +2 -2
- package/dist/cjs/Tags-4ec43831.js +883 -0
- package/dist/cjs/Title-16042ea0.js +15 -0
- package/dist/cjs/ToggleButton.js +34 -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-b7007f5f.js} +3 -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 +1312 -18
- package/dist/es/{DropDown-35e232b7.js → DropDown-2c0dd714.js} +78 -78
- package/dist/es/DynamicRangeSlider.js +43 -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 +66 -72
- package/dist/es/MultiList.js +93 -88
- package/dist/es/MultiRange.js +42 -52
- package/dist/es/{Pagination-145b4ff2.js → Pagination-edeb7dbe.js} +53 -56
- package/dist/es/{PreferencesConsumer-7ea7313a.js → PreferencesConsumer-86a676c8.js} +4 -5
- package/dist/es/RangeInput.js +103 -112
- package/dist/es/RangeSlider.js +36 -47
- package/dist/es/ReactiveBase.js +53 -68
- package/dist/es/ReactiveComponent.js +316 -45
- package/dist/es/{ReactiveComponent-e2fb9eb4.js → ReactiveComponentPrivate-6f16e1b7.js} +316 -614
- package/dist/es/ReactiveComponentPrivate.js +47 -0
- package/dist/es/ReactiveGoogleMap.js +434 -380
- package/dist/es/ReactiveList.js +125 -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 +64 -71
- package/dist/es/SingleList.js +94 -88
- package/dist/es/SingleRange.js +40 -46
- package/dist/es/StateProvider.js +2 -2
- package/dist/es/Tags-1c2d6c4d.js +869 -0
- package/dist/es/Title-863dfa42.js +1 -1
- package/dist/es/ToggleButton.js +32 -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-66ebc93e.js} +3 -2
- package/package.json +10 -10
- 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/es/ReactiveList.js
CHANGED
|
@@ -1,36 +1,43 @@
|
|
|
1
1
|
import { Actions, helper } from '@appbaseio/reactivecore';
|
|
2
2
|
import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
|
|
3
3
|
import { _ as _taggedTemplateLiteralLoose, a as _extends } from './_rollupPluginBabelHelpers-ded08042.js';
|
|
4
|
-
import { createVNode, mergeProps, createTextVNode, isVNode } from 'vue';
|
|
5
4
|
import VueTypes from 'vue-types';
|
|
6
5
|
import { withClickIds } from '@appbaseio/reactivecore/lib/utils/helper';
|
|
7
|
-
import {
|
|
8
|
-
import 'emotion';
|
|
6
|
+
import { css } from 'emotion';
|
|
7
|
+
import styled from '@appbaseio/vue-emotion';
|
|
9
8
|
import 'polished';
|
|
10
|
-
import './Button-
|
|
11
|
-
import { t as types } from './vueTypes-
|
|
12
|
-
import { P as Pagination } from './Pagination-
|
|
9
|
+
import './Button-153cd885.js';
|
|
10
|
+
import { t as types } from './vueTypes-66ebc93e.js';
|
|
11
|
+
import { P as Pagination } from './Pagination-edeb7dbe.js';
|
|
13
12
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
14
13
|
import 'redux';
|
|
15
|
-
import { c as connect, h as hasCustomRenderer, i as isQueryIdentical, u as updateDefaultQuery, a as isFunction, g as getComponent } from './index-
|
|
16
|
-
import { C as ComponentWrapper } from './ComponentWrapper-
|
|
17
|
-
import { P as PreferencesConsumer } from './PreferencesConsumer-
|
|
14
|
+
import { c as connect, h as hasCustomRenderer, i as isQueryIdentical, u as updateDefaultQuery, a as isFunction, g as getComponent } from './index-5509c0bc.js';
|
|
15
|
+
import { C as ComponentWrapper } from './ComponentWrapper-edaeaceb.js';
|
|
16
|
+
import { P as PreferencesConsumer } from './PreferencesConsumer-86a676c8.js';
|
|
17
|
+
import _mergeJSXProps from '@vue/babel-helper-vue-jsx-merge-props';
|
|
18
18
|
import './Title-863dfa42.js';
|
|
19
|
-
import { c as container } from './ListItem-
|
|
20
|
-
import { c as container$1 } from './Card-
|
|
21
|
-
import { F as Flex } from './Flex-
|
|
19
|
+
import { c as container } from './ListItem-07888a65.js';
|
|
20
|
+
import { c as container$1 } from './Card-19ad6d90.js';
|
|
21
|
+
import { F as Flex } from './Flex-7c177a10.js';
|
|
22
22
|
|
|
23
23
|
var _templateObject;
|
|
24
24
|
var PoweredByImage = styled('img')(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n\twidth: 110px;\n"])));
|
|
25
25
|
|
|
26
|
-
var PoweredBy =
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
26
|
+
var PoweredBy = {
|
|
27
|
+
functional: true,
|
|
28
|
+
render: function render(h) {
|
|
29
|
+
return h("a", {
|
|
30
|
+
"attrs": {
|
|
31
|
+
"href": "https://appbase.io/",
|
|
32
|
+
"target": "_blank",
|
|
33
|
+
"rel": "noopener noreferrer"
|
|
34
|
+
}
|
|
35
|
+
}, [h(PoweredByImage, {
|
|
36
|
+
"attrs": {
|
|
37
|
+
"src": "https://cdn.jsdelivr.net/gh/appbaseio/cdn@d2ec210045e59104ee5485841fa17b23fc83f097/appbase/logos/rbc-logo.svg"
|
|
38
|
+
}
|
|
39
|
+
})]);
|
|
40
|
+
}
|
|
34
41
|
};
|
|
35
42
|
|
|
36
43
|
var ResultListWrapper = {
|
|
@@ -39,9 +46,12 @@ var ResultListWrapper = {
|
|
|
39
46
|
render: function render(_, _ref) {
|
|
40
47
|
var props = _ref.props,
|
|
41
48
|
children = _ref.children;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
49
|
+
var h = arguments[0];
|
|
50
|
+
return h("div", _mergeJSXProps([{
|
|
51
|
+
"attrs": {
|
|
52
|
+
"className": container
|
|
53
|
+
}
|
|
54
|
+
}, props]), [children]);
|
|
45
55
|
}
|
|
46
56
|
};
|
|
47
57
|
ResultListWrapper.install = function (Vue) {
|
|
@@ -54,17 +64,21 @@ var ResultCardsWrapper = {
|
|
|
54
64
|
render: function render(_, _ref) {
|
|
55
65
|
var props = _ref.props,
|
|
56
66
|
children = _ref.children;
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
67
|
+
var h = arguments[0];
|
|
68
|
+
return h("div", _mergeJSXProps([{
|
|
69
|
+
"attrs": {
|
|
70
|
+
"className": container$1
|
|
71
|
+
}
|
|
72
|
+
}, props]), [children]);
|
|
60
73
|
}
|
|
61
74
|
};
|
|
62
75
|
ResultCardsWrapper.install = function (Vue) {
|
|
63
76
|
Vue.component(ResultCardsWrapper.name, ResultCardsWrapper);
|
|
64
77
|
};
|
|
65
78
|
|
|
66
|
-
var
|
|
67
|
-
var
|
|
79
|
+
var _templateObject$1, _templateObject2;
|
|
80
|
+
var resultStats = css(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteralLoose(["\n\tflex-grow: 1;\n\tfont-size: 0.82rem;\n"])));
|
|
81
|
+
var sortOptions = css(_templateObject2 || (_templateObject2 = _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"])));
|
|
68
82
|
|
|
69
83
|
var recordImpressions = Actions.recordImpressions;
|
|
70
84
|
var isEqual = helper.isEqual;
|
|
@@ -223,9 +237,6 @@ var ImpressionTracker$1 = connect(function () {
|
|
|
223
237
|
return null;
|
|
224
238
|
}, mapDispatchToProps)(ImpressionTracker);
|
|
225
239
|
|
|
226
|
-
function _isSlot(s) {
|
|
227
|
-
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
|
|
228
|
-
}
|
|
229
240
|
var setQueryOptions = Actions.setQueryOptions,
|
|
230
241
|
updateQuery = Actions.updateQuery,
|
|
231
242
|
loadMore = Actions.loadMore,
|
|
@@ -243,11 +254,6 @@ var isEqual$1 = helper.isEqual,
|
|
|
243
254
|
getOptionsForCustomQuery = helper.getOptionsForCustomQuery;
|
|
244
255
|
var ReactiveList = {
|
|
245
256
|
name: 'ReactiveList',
|
|
246
|
-
inject: {
|
|
247
|
-
$emotionCache: {
|
|
248
|
-
"default": undefined
|
|
249
|
-
}
|
|
250
|
-
},
|
|
251
257
|
components: {
|
|
252
258
|
ResultListWrapper: ResultListWrapper,
|
|
253
259
|
ResultCardsWrapper: ResultCardsWrapper
|
|
@@ -356,10 +362,10 @@ var ReactiveList = {
|
|
|
356
362
|
return Math.ceil(this.total / this.$props.size) || 0;
|
|
357
363
|
},
|
|
358
364
|
hasPageChangeListener: function hasPageChangeListener() {
|
|
359
|
-
return this.$
|
|
365
|
+
return this.$listeners && this.$listeners.pageChange;
|
|
360
366
|
},
|
|
361
367
|
hasResultStatsListener: function hasResultStatsListener() {
|
|
362
|
-
return this.$
|
|
368
|
+
return this.$listeners && this.$listeners.resultStats;
|
|
363
369
|
},
|
|
364
370
|
stats: function stats() {
|
|
365
371
|
return _extends({}, getResultStats(this), {
|
|
@@ -495,7 +501,16 @@ var ReactiveList = {
|
|
|
495
501
|
},
|
|
496
502
|
infiniteScroll: function infiniteScroll(newVal, oldVal) {
|
|
497
503
|
if (newVal !== oldVal) {
|
|
498
|
-
if (!
|
|
504
|
+
if (newVal && !this.pagination) {
|
|
505
|
+
window.addEventListener('scroll', this.scrollHandler);
|
|
506
|
+
} else {
|
|
507
|
+
window.removeEventListener('scroll', this.scrollHandler);
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
},
|
|
511
|
+
pagination: function pagination(newVal, oldVal) {
|
|
512
|
+
if (newVal !== oldVal) {
|
|
513
|
+
if (!newVal && this.infiniteScroll) {
|
|
499
514
|
window.addEventListener('scroll', this.scrollHandler);
|
|
500
515
|
} else {
|
|
501
516
|
window.removeEventListener('scroll', this.scrollHandler);
|
|
@@ -561,88 +576,87 @@ var ReactiveList = {
|
|
|
561
576
|
window.addEventListener('scroll', this.scrollHandler);
|
|
562
577
|
}
|
|
563
578
|
},
|
|
564
|
-
|
|
579
|
+
beforeDestroy: function beforeDestroy() {
|
|
565
580
|
if (this.showInfiniteScroll) {
|
|
566
581
|
window.removeEventListener('scroll', this.scrollHandler);
|
|
567
582
|
}
|
|
568
583
|
},
|
|
569
584
|
render: function render() {
|
|
570
|
-
var
|
|
585
|
+
var h = arguments[0];
|
|
571
586
|
var hits = this.$data.hits;
|
|
572
587
|
var results = parseHits(hits) || [];
|
|
573
|
-
return
|
|
588
|
+
return h("div", {
|
|
574
589
|
"style": this.$props.style,
|
|
575
590
|
"class": this.$props.className
|
|
576
|
-
}, [this.isLoading && this.shouldRenderPagination && this.showInfiniteScroll && (this.$
|
|
577
|
-
"
|
|
591
|
+
}, [this.isLoading && this.shouldRenderPagination && this.showInfiniteScroll && (this.$scopedSlots.loader || this.$props.loader), this.renderErrorComponent(), h(Flex, {
|
|
592
|
+
"attrs": {
|
|
593
|
+
"labelPosition": this.sortOptions ? 'right' : 'left'
|
|
594
|
+
},
|
|
578
595
|
"class": getClassName(this.$props.innerClass, 'resultsInfo')
|
|
579
|
-
}, {
|
|
580
|
-
"
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
"nextLabel": this.$props.nextLabel
|
|
591
|
-
}, null) : null, this.renderResults(), this.isLoading && !this.shouldRenderPagination ? this.$slots.loader || this.$props.loader || createVNode("div", {
|
|
596
|
+
}, [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, {
|
|
597
|
+
"attrs": {
|
|
598
|
+
"pages": this.$props.pages,
|
|
599
|
+
"totalPages": this.totalPages,
|
|
600
|
+
"currentPage": this.currentPageState,
|
|
601
|
+
"setPage": this.setPage,
|
|
602
|
+
"innerClass": this.$props.innerClass,
|
|
603
|
+
"prevLabel": this.$props.prevLabel,
|
|
604
|
+
"nextLabel": this.$props.nextLabel
|
|
605
|
+
}
|
|
606
|
+
}) : null, this.renderResults(), this.isLoading && !this.shouldRenderPagination ? this.$scopedSlots.loader || this.$props.loader || h("div", {
|
|
592
607
|
"style": {
|
|
593
608
|
textAlign: 'center',
|
|
594
609
|
margin: '20px 0',
|
|
595
610
|
color: '#666'
|
|
596
611
|
}
|
|
597
|
-
}, [
|
|
598
|
-
"
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
612
|
+
}, ["Loading..."]) : null, this.shouldRenderPagination && (this.$props.paginationAt === 'bottom' || this.$props.paginationAt === 'both') ? h(Pagination, {
|
|
613
|
+
"attrs": {
|
|
614
|
+
"pages": this.$props.pages,
|
|
615
|
+
"totalPages": Math.ceil(this.$data.total / this.$props.size),
|
|
616
|
+
"currentPage": this.currentPageState,
|
|
617
|
+
"setPage": this.setPage,
|
|
618
|
+
"showEndPage": this.$props.showEndPage,
|
|
619
|
+
"innerClass": this.$props.innerClass,
|
|
620
|
+
"prevLabel": this.$props.prevLabel,
|
|
621
|
+
"nextLabel": this.$props.nextLabel
|
|
622
|
+
}
|
|
623
|
+
}) : null, this.url.endsWith('appbase.io') && results.length ? h(Flex, {
|
|
624
|
+
"attrs": {
|
|
625
|
+
"direction": "row-reverse"
|
|
626
|
+
},
|
|
608
627
|
"class": getClassName(this.$props.innerClass, 'poweredBy')
|
|
609
|
-
},
|
|
610
|
-
"default": function _default() {
|
|
611
|
-
return [createVNode(PoweredBy, null, null)];
|
|
612
|
-
}
|
|
613
|
-
}) : null]);
|
|
628
|
+
}, [h(PoweredBy)]) : null]);
|
|
614
629
|
},
|
|
615
630
|
methods: {
|
|
616
631
|
renderErrorComponent: function renderErrorComponent() {
|
|
617
|
-
var renderError = this.$
|
|
632
|
+
var renderError = this.$scopedSlots.renderError || this.$props.renderError;
|
|
618
633
|
if (renderError && this.error && !this.isLoading) {
|
|
619
634
|
return isFunction(renderError) ? renderError(this.error) : renderError;
|
|
620
635
|
}
|
|
621
636
|
return null;
|
|
622
637
|
},
|
|
623
638
|
renderResults: function renderResults() {
|
|
624
|
-
var
|
|
639
|
+
var _this2 = this;
|
|
640
|
+
var h = this.$createElement;
|
|
625
641
|
var size = this.$props.size;
|
|
626
|
-
var renderItem = this.$
|
|
627
|
-
var element = this.hasCustomRender ? this.getComponent() :
|
|
642
|
+
var renderItem = this.$scopedSlots.renderItem || this.$props.renderItem;
|
|
643
|
+
var element = this.hasCustomRender ? this.getComponent() : h("div", {
|
|
628
644
|
"class": this.$props.listClass + " " + getClassName(this.$props.innerClass, 'list')
|
|
629
645
|
}, [this.data.map(function (item, index) {
|
|
630
646
|
return renderItem({
|
|
631
647
|
item: item,
|
|
632
|
-
count:
|
|
648
|
+
count: _this2.currentPageState * size + index + 1,
|
|
633
649
|
triggerClickAnalytics: function triggerClickAnalytics() {
|
|
634
|
-
return
|
|
650
|
+
return _this2.triggerClickAnalytics(_this2.currentPageState * size + index);
|
|
635
651
|
}
|
|
636
652
|
});
|
|
637
653
|
})]);
|
|
638
654
|
// If analytics is set to true then render with impression tracker
|
|
639
|
-
return this.analytics ?
|
|
640
|
-
"
|
|
641
|
-
|
|
642
|
-
"default": function _default() {
|
|
643
|
-
return [element];
|
|
655
|
+
return this.analytics ? h(ImpressionTracker$1, {
|
|
656
|
+
"attrs": {
|
|
657
|
+
"hits": this.data
|
|
644
658
|
}
|
|
645
|
-
}) : element;
|
|
659
|
+
}, [element]) : element;
|
|
646
660
|
},
|
|
647
661
|
updateQueryOptions: function updateQueryOptions(props) {
|
|
648
662
|
var options = getQueryOptions(props);
|
|
@@ -728,23 +742,25 @@ var ReactiveList = {
|
|
|
728
742
|
}
|
|
729
743
|
},
|
|
730
744
|
renderStats: function renderStats() {
|
|
731
|
-
var
|
|
745
|
+
var h = this.$createElement;
|
|
746
|
+
var renderResultStats = this.$scopedSlots.renderResultStats || this.$props.renderResultStats;
|
|
732
747
|
if (renderResultStats && this.$data.total) {
|
|
733
748
|
return renderResultStats(this.stats);
|
|
734
749
|
}
|
|
735
750
|
if (this.stats.numberOfResults) {
|
|
736
|
-
return
|
|
751
|
+
return h("p", {
|
|
737
752
|
"class": resultStats + " " + getClassName(this.$props.innerClass, 'resultStats')
|
|
738
|
-
}, [this.stats.numberOfResults,
|
|
753
|
+
}, [this.stats.numberOfResults, " results found in ", this.stats.time || 0, "ms"]);
|
|
739
754
|
}
|
|
740
755
|
return null;
|
|
741
756
|
},
|
|
742
757
|
renderNoResult: function renderNoResult() {
|
|
743
|
-
var
|
|
744
|
-
|
|
758
|
+
var h = this.$createElement;
|
|
759
|
+
var renderNoResults = this.$scopedSlots.renderNoResults || this.$props.renderNoResults;
|
|
760
|
+
if (this.$scopedSlots.renderNoResults) {
|
|
745
761
|
return isFunction(renderNoResults) ? renderNoResults() : renderNoResults;
|
|
746
762
|
}
|
|
747
|
-
return
|
|
763
|
+
return h("p", {
|
|
748
764
|
"class": getClassName(this.$props.innerClass, 'noResults') || null
|
|
749
765
|
}, [isFunction(renderNoResults) ? renderNoResults() : renderNoResults]);
|
|
750
766
|
},
|
|
@@ -789,16 +805,25 @@ var ReactiveList = {
|
|
|
789
805
|
this.recordResultClick(searchPosition, docId);
|
|
790
806
|
},
|
|
791
807
|
renderSortOptions: function renderSortOptions() {
|
|
792
|
-
|
|
808
|
+
var h = this.$createElement;
|
|
809
|
+
return h("select", {
|
|
793
810
|
"class": sortOptions + " " + getClassName(this.$props.innerClass, 'sortOptions'),
|
|
794
|
-
"
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
811
|
+
"attrs": {
|
|
812
|
+
"name": "sort-options",
|
|
813
|
+
"aria-label": "Sort options"
|
|
814
|
+
},
|
|
815
|
+
"on": {
|
|
816
|
+
"change": this.handleSortChange
|
|
817
|
+
},
|
|
818
|
+
"domProps": {
|
|
819
|
+
"value": this.sortOptionIndex
|
|
820
|
+
}
|
|
798
821
|
}, [this.sortOptions.map(function (sort, index) {
|
|
799
|
-
return
|
|
822
|
+
return h("option", {
|
|
800
823
|
"key": sort.label,
|
|
801
|
-
"
|
|
824
|
+
"domProps": {
|
|
825
|
+
"value": index
|
|
826
|
+
}
|
|
802
827
|
}, [sort.label]);
|
|
803
828
|
})]);
|
|
804
829
|
},
|
|
@@ -936,6 +961,8 @@ var RLConnected = PreferencesConsumer(ComponentWrapper(connect(mapStateToProps,
|
|
|
936
961
|
internalComponent: ReactiveList.hasInternalComponent()
|
|
937
962
|
}));
|
|
938
963
|
RLConnected.name = ReactiveList.name;
|
|
964
|
+
RLConnected.generateQueryOptions = ReactiveList.generateQueryOptions;
|
|
965
|
+
RLConnected.hasInternalComponent = ReactiveList.hasInternalComponent;
|
|
939
966
|
RLConnected.install = function (Vue) {
|
|
940
967
|
Vue.component(RLConnected.name, RLConnected);
|
|
941
968
|
Vue.component(ResultListWrapper.name, ResultListWrapper);
|
package/dist/es/ResultCard.js
CHANGED
|
@@ -1,24 +1,19 @@
|
|
|
1
1
|
import { b as _objectWithoutPropertiesLoose } from './_rollupPluginBabelHelpers-ded08042.js';
|
|
2
|
-
import { createVNode, isVNode, mergeProps } from 'vue';
|
|
3
2
|
import VueTypes from 'vue-types';
|
|
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-66ebc93e.js';
|
|
7
|
+
import _mergeJSXProps from '@vue/babel-helper-vue-jsx-merge-props';
|
|
7
8
|
import { T as Title } from './Title-863dfa42.js';
|
|
8
|
-
import { I as Image, C as Card } from './Card-
|
|
9
|
+
import { I as Image, C as Card } from './Card-19ad6d90.js';
|
|
9
10
|
|
|
10
|
-
function _isSlot(s) {
|
|
11
|
-
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
|
|
12
|
-
}
|
|
13
11
|
var ResultCardTitle = {
|
|
14
12
|
name: 'ResultCardTitle',
|
|
15
13
|
render: function render() {
|
|
14
|
+
var h = arguments[0];
|
|
16
15
|
var children = this.$slots["default"];
|
|
17
|
-
return
|
|
18
|
-
"default": function _default() {
|
|
19
|
-
return [children];
|
|
20
|
-
}
|
|
21
|
-
});
|
|
16
|
+
return h(Title, _mergeJSXProps([{}, this.$props]), [children]);
|
|
22
17
|
}
|
|
23
18
|
};
|
|
24
19
|
ResultCardTitle.install = function (Vue) {
|
|
@@ -32,14 +27,15 @@ var ResultCardImage = {
|
|
|
32
27
|
src: VueTypes.string.isRequired
|
|
33
28
|
},
|
|
34
29
|
render: function render() {
|
|
30
|
+
var h = arguments[0];
|
|
35
31
|
var _this$$props = this.$props,
|
|
36
32
|
src = _this$$props.src,
|
|
37
33
|
props = _objectWithoutPropertiesLoose(_this$$props, _excluded);
|
|
38
|
-
return
|
|
34
|
+
return h(Image, _mergeJSXProps([{
|
|
39
35
|
"style": {
|
|
40
36
|
backgroundImage: "url(" + src + ")"
|
|
41
37
|
}
|
|
42
|
-
}, props)
|
|
38
|
+
}, props]));
|
|
43
39
|
}
|
|
44
40
|
};
|
|
45
41
|
ResultCardImage.install = function (Vue) {
|
|
@@ -52,7 +48,8 @@ var ResultCardDescription = {
|
|
|
52
48
|
render: function render(_, _ref) {
|
|
53
49
|
var props = _ref.props,
|
|
54
50
|
children = _ref.children;
|
|
55
|
-
|
|
51
|
+
var h = arguments[0];
|
|
52
|
+
return h("article", _mergeJSXProps([{}, props]), [children]);
|
|
56
53
|
}
|
|
57
54
|
};
|
|
58
55
|
ResultCardDescription.install = function (Vue) {
|
|
@@ -60,9 +57,6 @@ ResultCardDescription.install = function (Vue) {
|
|
|
60
57
|
};
|
|
61
58
|
|
|
62
59
|
var _excluded$1 = ["href", "target"];
|
|
63
|
-
function _isSlot$1(s) {
|
|
64
|
-
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
|
|
65
|
-
}
|
|
66
60
|
var ResultCard = {
|
|
67
61
|
name: 'ResultCard',
|
|
68
62
|
components: {
|
|
@@ -75,20 +69,19 @@ var ResultCard = {
|
|
|
75
69
|
href: types.string
|
|
76
70
|
},
|
|
77
71
|
render: function render() {
|
|
72
|
+
var h = arguments[0];
|
|
78
73
|
var children = this.$slots["default"];
|
|
79
74
|
var _this$$props = this.$props,
|
|
80
75
|
href = _this$$props.href,
|
|
81
76
|
target = _this$$props.target,
|
|
82
77
|
rest = _objectWithoutPropertiesLoose(_this$$props, _excluded$1);
|
|
83
|
-
return
|
|
84
|
-
"
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
"default": function _default() {
|
|
89
|
-
return [children];
|
|
78
|
+
return h(Card, _mergeJSXProps([{
|
|
79
|
+
"attrs": {
|
|
80
|
+
"href": href,
|
|
81
|
+
"target": target,
|
|
82
|
+
"rel": target === '_blank' ? 'noopener noreferrer' : null
|
|
90
83
|
}
|
|
91
|
-
});
|
|
84
|
+
}, rest]), [children]);
|
|
92
85
|
}
|
|
93
86
|
};
|
|
94
87
|
ResultCard.install = function (Vue) {
|
package/dist/es/ResultList.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { b as _objectWithoutPropertiesLoose } from './_rollupPluginBabelHelpers-ded08042.js';
|
|
2
|
-
import { createVNode, mergeProps, isVNode } from 'vue';
|
|
3
2
|
import VueTypes from 'vue-types';
|
|
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-66ebc93e.js';
|
|
7
|
+
import _mergeJSXProps from '@vue/babel-helper-vue-jsx-merge-props';
|
|
7
8
|
import { T as Title } from './Title-863dfa42.js';
|
|
8
|
-
import { I as Image, L as ListItem } from './ListItem-
|
|
9
|
+
import { I as Image, L as ListItem } from './ListItem-07888a65.js';
|
|
9
10
|
|
|
10
11
|
var ResultListContent = {
|
|
11
12
|
name: 'ResultListContent',
|
|
@@ -13,7 +14,8 @@ var ResultListContent = {
|
|
|
13
14
|
render: function render(_, _ref) {
|
|
14
15
|
var props = _ref.props,
|
|
15
16
|
children = _ref.children;
|
|
16
|
-
|
|
17
|
+
var h = arguments[0];
|
|
18
|
+
return h("article", _mergeJSXProps([{}, props]), [children]);
|
|
17
19
|
}
|
|
18
20
|
};
|
|
19
21
|
ResultListContent.install = function (Vue) {
|
|
@@ -26,7 +28,8 @@ var ResultListDescription = {
|
|
|
26
28
|
render: function render(_, _ref) {
|
|
27
29
|
var props = _ref.props,
|
|
28
30
|
children = _ref.children;
|
|
29
|
-
|
|
31
|
+
var h = arguments[0];
|
|
32
|
+
return h("div", _mergeJSXProps([{}, props]), [children]);
|
|
30
33
|
}
|
|
31
34
|
};
|
|
32
35
|
ResultListDescription.install = function (Vue) {
|
|
@@ -41,32 +44,29 @@ var ResultListImage = {
|
|
|
41
44
|
small: VueTypes.bool.def(false)
|
|
42
45
|
},
|
|
43
46
|
render: function render() {
|
|
47
|
+
var h = arguments[0];
|
|
44
48
|
var _this$$props = this.$props,
|
|
45
49
|
src = _this$$props.src,
|
|
46
50
|
small = _this$$props.small,
|
|
47
51
|
props = _objectWithoutPropertiesLoose(_this$$props, _excluded);
|
|
48
|
-
return
|
|
49
|
-
"
|
|
50
|
-
|
|
51
|
-
|
|
52
|
+
return h(Image, _mergeJSXProps([{
|
|
53
|
+
"attrs": {
|
|
54
|
+
"src": src,
|
|
55
|
+
"small": small
|
|
56
|
+
}
|
|
57
|
+
}, props]));
|
|
52
58
|
}
|
|
53
59
|
};
|
|
54
60
|
ResultListImage.install = function (Vue) {
|
|
55
61
|
Vue.component(ResultListImage.name, ResultListImage);
|
|
56
62
|
};
|
|
57
63
|
|
|
58
|
-
function _isSlot(s) {
|
|
59
|
-
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
|
|
60
|
-
}
|
|
61
64
|
var ResultListTitle = {
|
|
62
65
|
name: 'ResultListTitle',
|
|
63
66
|
render: function render() {
|
|
67
|
+
var h = arguments[0];
|
|
64
68
|
var children = this.$slots["default"];
|
|
65
|
-
return
|
|
66
|
-
"default": function _default() {
|
|
67
|
-
return [children];
|
|
68
|
-
}
|
|
69
|
-
});
|
|
69
|
+
return h(Title, _mergeJSXProps([{}, this.$props]), [children]);
|
|
70
70
|
}
|
|
71
71
|
};
|
|
72
72
|
ResultListTitle.install = function (Vue) {
|
|
@@ -74,9 +74,6 @@ ResultListTitle.install = function (Vue) {
|
|
|
74
74
|
};
|
|
75
75
|
|
|
76
76
|
var _excluded$1 = ["href", "target"];
|
|
77
|
-
function _isSlot$1(s) {
|
|
78
|
-
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
|
|
79
|
-
}
|
|
80
77
|
var ResultList = {
|
|
81
78
|
name: 'ResultList',
|
|
82
79
|
props: {
|
|
@@ -109,6 +106,7 @@ var ResultList = {
|
|
|
109
106
|
}
|
|
110
107
|
},
|
|
111
108
|
render: function render() {
|
|
109
|
+
var h = arguments[0];
|
|
112
110
|
var _this$$props = this.$props,
|
|
113
111
|
href = _this$$props.href,
|
|
114
112
|
target = _this$$props.target,
|
|
@@ -116,17 +114,15 @@ var ResultList = {
|
|
|
116
114
|
var hasImage = this.hasImage,
|
|
117
115
|
isSmall = this.isSmall;
|
|
118
116
|
var children = this.$slots["default"];
|
|
119
|
-
return
|
|
120
|
-
"
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
"default": function _default() {
|
|
127
|
-
return [children];
|
|
117
|
+
return h(ListItem, _mergeJSXProps([{
|
|
118
|
+
"attrs": {
|
|
119
|
+
"href": href,
|
|
120
|
+
"image": hasImage,
|
|
121
|
+
"small": isSmall,
|
|
122
|
+
"target": target,
|
|
123
|
+
"rel": target === '_blank' ? 'noopener noreferrer' : null
|
|
128
124
|
}
|
|
129
|
-
});
|
|
125
|
+
}, props]), [children]);
|
|
130
126
|
}
|
|
131
127
|
};
|
|
132
128
|
ResultList.install = function (Vue) {
|