@appbaseio/reactivesearch-vue 2.0.0-alpha.3 → 3.0.0-alpha.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.
Files changed (108) hide show
  1. package/dist/@appbaseio/reactivesearch-vue.umd.js +17405 -25231
  2. package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
  3. package/dist/@appbaseio/reactivesearch-vue.umd.min.js +6 -15
  4. package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
  5. package/dist/cjs/Button-ad042719.js +59 -0
  6. package/dist/cjs/Card-f5ab024a.js +27 -0
  7. package/dist/cjs/{ComponentWrapper-ad3dad02.js → ComponentWrapper-75f88599.js} +42 -56
  8. package/dist/cjs/Container-29f049b2.js +12 -0
  9. package/dist/cjs/DropDown-6cf84c47.js +698 -0
  10. package/dist/cjs/DynamicRangeSlider.js +103 -155
  11. package/dist/cjs/Flex-d5675ea6.js +48 -0
  12. package/dist/cjs/FormControlList-fadd792f.js +42 -0
  13. package/dist/cjs/Input-4b434436.js +74 -0
  14. package/dist/cjs/ListItem-d57d648d.js +42 -0
  15. package/dist/cjs/MultiDropdownList.js +124 -240
  16. package/dist/cjs/MultiList.js +123 -261
  17. package/dist/cjs/MultiRange.js +87 -133
  18. package/dist/cjs/{Pagination-71e85fa9.js → Pagination-b5ddc906.js} +70 -83
  19. package/dist/cjs/PreferencesConsumer-eb265924.js +75 -0
  20. package/dist/cjs/RangeInput.js +163 -171
  21. package/dist/cjs/RangeSlider.js +81 -109
  22. package/dist/cjs/ReactiveBase.js +139 -157
  23. package/dist/cjs/ReactiveComponent-eb8db4c1.js +2189 -0
  24. package/dist/cjs/ReactiveComponent.js +46 -340
  25. package/dist/cjs/ReactiveGoogleMap.js +445 -655
  26. package/dist/cjs/ReactiveList.js +179 -304
  27. package/dist/cjs/ResultCard.js +36 -36
  28. package/dist/cjs/ResultList.js +48 -56
  29. package/dist/cjs/SelectedFilters.js +62 -69
  30. package/dist/cjs/SingleDropdownList.js +117 -177
  31. package/dist/cjs/SingleList.js +121 -205
  32. package/dist/cjs/SingleRange.js +78 -105
  33. package/dist/cjs/StateProvider.js +74 -47
  34. package/dist/cjs/Title-8802a218.js +12 -0
  35. package/dist/cjs/ToggleButton.js +72 -119
  36. package/dist/cjs/{_rollupPluginBabelHelpers-c705cbe6.js → _rollupPluginBabelHelpers-f8b843f8.js} +0 -15
  37. package/dist/cjs/{index-6a167fe0.js → index-d8d8f291.js} +38 -108
  38. package/dist/cjs/index.js +44 -41
  39. package/dist/cjs/initReactivesearch.js +69 -152
  40. package/dist/cjs/install.js +47 -43
  41. package/dist/cjs/ssr-6907ada3.js +66 -0
  42. package/dist/cjs/{utils-d6a52588.js → utils-83fd01e9.js} +7 -16
  43. package/dist/cjs/version.js +1 -1
  44. package/dist/cjs/{vueTypes-727b7c63.js → vueTypes-1bf00978.js} +8 -19
  45. package/dist/es/Button-474510e3.js +53 -0
  46. package/dist/es/{Card-450683f1.js → Card-38cbe652.js} +3 -3
  47. package/dist/es/{ComponentWrapper-424e86fd.js → ComponentWrapper-5166c76a.js} +42 -56
  48. package/dist/es/{Container-ba826e96.js → Container-d00219f7.js} +2 -2
  49. package/dist/es/DropDown-8764360c.js +688 -0
  50. package/dist/es/DynamicRangeSlider.js +103 -155
  51. package/dist/es/Flex-a08e22d7.js +46 -0
  52. package/dist/es/FormControlList-fe6eaee4.js +38 -0
  53. package/dist/es/Input-4a8ef1f3.js +69 -0
  54. package/dist/es/{ListItem-cad14c5e.js → ListItem-16756c02.js} +7 -8
  55. package/dist/es/MultiDropdownList.js +124 -240
  56. package/dist/es/MultiList.js +123 -261
  57. package/dist/es/MultiRange.js +87 -133
  58. package/dist/es/{Pagination-784bf143.js → Pagination-72bd1d9e.js} +70 -83
  59. package/dist/es/PreferencesConsumer-c276709c.js +73 -0
  60. package/dist/es/RangeInput.js +163 -170
  61. package/dist/es/RangeSlider.js +81 -109
  62. package/dist/es/ReactiveBase.js +138 -155
  63. package/dist/es/ReactiveComponent-f9fa5780.js +2183 -0
  64. package/dist/es/ReactiveComponent.js +42 -337
  65. package/dist/es/ReactiveGoogleMap.js +440 -649
  66. package/dist/es/ReactiveList.js +177 -301
  67. package/dist/es/ResultCard.js +36 -36
  68. package/dist/es/ResultList.js +48 -56
  69. package/dist/es/SelectedFilters.js +62 -69
  70. package/dist/es/SingleDropdownList.js +117 -177
  71. package/dist/es/SingleList.js +121 -205
  72. package/dist/es/SingleRange.js +78 -105
  73. package/dist/es/StateProvider.js +75 -48
  74. package/dist/es/{Title-3342664a.js → Title-863dfa42.js} +2 -2
  75. package/dist/es/ToggleButton.js +72 -119
  76. package/dist/es/{_rollupPluginBabelHelpers-76660dab.js → _rollupPluginBabelHelpers-ded08042.js} +0 -15
  77. package/dist/es/{index-7788a843.js → index-4520a598.js} +39 -107
  78. package/dist/es/index.js +30 -32
  79. package/dist/es/initReactivesearch.js +69 -152
  80. package/dist/es/install.js +49 -41
  81. package/dist/es/{ssr-b2c0b401.js → ssr-af398f0c.js} +36 -7
  82. package/dist/es/{utils-9e68acee.js → utils-9e5a16a1.js} +7 -16
  83. package/dist/es/version.js +1 -1
  84. package/dist/es/{vueTypes-b8146772.js → vueTypes-f1923c72.js} +8 -19
  85. package/package.json +10 -9
  86. package/dist/cjs/Button-446f819e.js +0 -68
  87. package/dist/cjs/CancelSvg-9f258f4f.js +0 -449
  88. package/dist/cjs/Card-642547a8.js +0 -30
  89. package/dist/cjs/Container-daf30918.js +0 -15
  90. package/dist/cjs/DataSearch-6cf29cf0.js +0 -2323
  91. package/dist/cjs/DataSearch.js +0 -30
  92. package/dist/cjs/DropDown-c479bbb0.js +0 -328
  93. package/dist/cjs/Flex-aa517a13.js +0 -52
  94. package/dist/cjs/FormControlList-c195a592.js +0 -47
  95. package/dist/cjs/Input-e6603a7e.js +0 -79
  96. package/dist/cjs/ListItem-8c9e0d68.js +0 -46
  97. package/dist/cjs/Title-1de7d0f4.js +0 -15
  98. package/dist/cjs/install-42ba1d44.js +0 -1409
  99. package/dist/cjs/ssr-3027b848.js +0 -39
  100. package/dist/es/Button-d8bc15ea.js +0 -59
  101. package/dist/es/CancelSvg-4cfae5fd.js +0 -440
  102. package/dist/es/DataSearch-4888aa43.js +0 -2308
  103. package/dist/es/DataSearch.js +0 -22
  104. package/dist/es/DropDown-05a644a5.js +0 -322
  105. package/dist/es/Flex-1f0795c3.js +0 -47
  106. package/dist/es/FormControlList-c22d64f6.js +0 -40
  107. package/dist/es/Input-7a2a9fac.js +0 -71
  108. package/dist/es/install-80bc2764.js +0 -1402
@@ -0,0 +1,66 @@
1
+ 'use strict';
2
+
3
+ var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-f8b843f8.js');
4
+ var vue = require('vue');
5
+ var vueEmotion = require('@appbaseio/vue-emotion');
6
+
7
+ // client only component
8
+ // render the placeholder slot on SSR
9
+ // you can manually control exactly when to show the component by the isShow prop
10
+ var NoSSR = vue.defineComponent({
11
+ props: {
12
+ isShow: {
13
+ type: Boolean,
14
+ "default": undefined
15
+ }
16
+ },
17
+ setup: function setup(props, _ref) {
18
+ var slots = _ref.slots;
19
+ var isMounted = vue.ref(false);
20
+ var isShowDefaultSlot = vue.computed(function () {
21
+ if (props.isShow === undefined) return isMounted.value;
22
+ return !!props.isShow && isMounted.value;
23
+ });
24
+ vue.onMounted(function () {
25
+ isMounted.value = true;
26
+ });
27
+ var defaultVnode = slots["default"] ? vue.h(function () {
28
+ return slots["default"] && slots["default"]();
29
+ }) : vue.createCommentVNode('Client only rendering with empty default slot');
30
+ var placeholderVNode = slots.placeholder ? vue.h(function () {
31
+ return slots.placeholder && slots.placeholder();
32
+ }) : vue.createCommentVNode('Client only rendering component placeholder');
33
+ return function () {
34
+ return isShowDefaultSlot.value ? defaultVnode : placeholderVNode;
35
+ };
36
+ }
37
+ });
38
+
39
+ var _templateObject;
40
+ var Slider = vueEmotion.styled('div')(_templateObject || (_templateObject = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\tmargin-top: 30px;\n\tpadding: 10px;\n\n\t/* component style */\n\t.vue-slider-disabled {\n\t\topacity: 0.5;\n\t\tcursor: not-allowed;\n\t}\n\n\t/* rail style */\n\t.vue-slider-rail {\n\t\tbackground-color: #ccc;\n\t\tborder-radius: 15px;\n\t\theight: 4px;\n\t}\n\n\t/* process style */\n\t.vue-slider-process {\n\t\tbackground-color: #0b6aff;\n\t\tborder-radius: 15px;\n\t}\n\n\t/* mark style */\n\t.vue-slider-mark {\n\t\tz-index: 4;\n\t}\n\n\t.vue-slider-mark:first-child .vue-slider-mark-step,\n\t.vue-slider-mark:last-child .vue-slider-mark-step {\n\t\tdisplay: none;\n\t}\n\n\t.vue-slider-mark-step {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tborder-radius: 50%;\n\t\tbackground-color: rgba(0, 0, 0, 0.16);\n\t}\n\n\t.vue-slider-mark-label {\n\t\tfont-size: 14px;\n\t\twhite-space: nowrap;\n\t}\n\n\t/* dot style */\n\t.vue-slider-dot {\n\t\tz-index: 2;\n\t}\n\n\t.vue-slider-dot-handle {\n\t\tcursor: pointer;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tborder-radius: 50%;\n\t\tbackground-color: #fff;\n\t\tbox-sizing: border-box;\n\t\tborder: 1px solid #9a9a9a;\n\t\tz-index: 2;\n\t\tbox-shadow: 0.5px 0.5px 2px 1px rgb(0 0 0 / 32%);\n\t}\n\n\t.vue-slider-dot-handle-disabled {\n\t\tcursor: not-allowed;\n\t\tbackground-color: #ccc;\n\t}\n\n\t.vue-slider-dot-tooltip-inner {\n\t\tfont-size: 14px;\n\t\twhite-space: nowrap;\n\t\tpadding: 2px 5px;\n\t\tmin-width: 20px;\n\t\ttext-align: center;\n\t\tcolor: #fff;\n\t\tborder-radius: 5px;\n\t\tborder: 1px solid #3498db;\n\t\tbackground-color: #3498db;\n\t\tbox-sizing: content-box;\n\t}\n\n\t.vue-slider-dot-tooltip-inner::after {\n\t\tcontent: '';\n\t\tposition: absolute;\n\t}\n\n\t.vue-slider-dot-tooltip-inner-top::after {\n\t\ttop: 100%;\n\t\tleft: 50%;\n\t\ttransform: translate(-50%, 0);\n\t\theight: 0;\n\t\twidth: 0;\n\t\tborder-color: transparent;\n\t\tborder-style: solid;\n\t\tborder-width: 5px;\n\t\tborder-top-color: inherit;\n\t}\n\n\t.vue-slider-dot-tooltip-inner-bottom::after {\n\t\tbottom: 100%;\n\t\tleft: 50%;\n\t\ttransform: translate(-50%, 0);\n\t\theight: 0;\n\t\twidth: 0;\n\t\tborder-color: transparent;\n\t\tborder-style: solid;\n\t\tborder-width: 5px;\n\t\tborder-bottom-color: inherit;\n\t}\n\n\t.vue-slider-dot-tooltip-inner-left::after {\n\t\tleft: 100%;\n\t\ttop: 50%;\n\t\ttransform: translate(0, -50%);\n\t\theight: 0;\n\t\twidth: 0;\n\t\tborder-color: transparent;\n\t\tborder-style: solid;\n\t\tborder-width: 5px;\n\t\tborder-left-color: inherit;\n\t}\n\n\t.vue-slider-dot-tooltip-inner-right::after {\n\t\tright: 100%;\n\t\ttop: 50%;\n\t\ttransform: translate(0, -50%);\n\t\theight: 0;\n\t\twidth: 0;\n\t\tborder-color: transparent;\n\t\tborder-style: solid;\n\t\tborder-width: 5px;\n\t\tborder-right-color: inherit;\n\t}\n\n\t.vue-slider-dot-tooltip-wrapper {\n\t\topacity: 0;\n\t\ttransition: all 0.3s;\n\t}\n\t.vue-slider-dot-tooltip-wrapper-show {\n\t\topacity: 1;\n\t}\n\n\t.label-container {\n\t\tmargin: 10px 0;\n\t\twidth: 100%;\n\t}\n\n\t.range-label-right {\n\t\tfloat: right;\n\t}\n"])));
41
+
42
+ /**
43
+ * Caution: Please do not change this file without having a discussion with the Team.
44
+ * Any change may break the umd build, we're directly replacing the line no: 14
45
+ * `components['vue-slider-component'] = require('vue-slider-component');` in rollup umd build process with some script.
46
+ */
47
+ // eslint-disable-next-line
48
+ var getComponents = function getComponents() {
49
+ var components = {
50
+ NoSSR: NoSSR
51
+ };
52
+ if (process.browser) {
53
+ try {
54
+ // in older versions of nuxt, it's process.BROWSER_BUILD
55
+ // eslint-disable-next-line
56
+ components['vue-slider-component'] = require('vue-slider-component');
57
+ } catch (e) {
58
+ console.error('Unable to load vue-slider', e);
59
+ }
60
+ }
61
+ return components;
62
+ };
63
+
64
+ exports.NoSSR = NoSSR;
65
+ exports.Slider = Slider;
66
+ exports.getComponents = getComponents;
@@ -4,40 +4,33 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
4
4
 
5
5
  var configureStore = require('@appbaseio/reactivecore');
6
6
  var configureStore__default = _interopDefault(configureStore);
7
- var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-c705cbe6.js');
7
+ var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-f8b843f8.js');
8
8
 
9
9
  var getAggsOrder = configureStore.helper.getAggsOrder;
10
-
11
10
  var extractQuery = function extractQuery(props) {
12
11
  var queryToBeReturned = {};
13
-
14
12
  if (props.defaultQuery) {
15
13
  var evaluateQuery = props.defaultQuery([], props);
16
-
17
14
  if (evaluateQuery) {
18
15
  if (evaluateQuery.query) {
19
16
  queryToBeReturned.query = evaluateQuery.query;
20
17
  }
21
-
22
18
  if (evaluateQuery.aggs) {
23
19
  queryToBeReturned.aggs = evaluateQuery.aggs;
24
20
  }
25
21
  }
26
22
  }
27
-
28
23
  return queryToBeReturned;
29
- }; // eslint-disable-next-line import/prefer-default-export
30
-
31
-
24
+ };
25
+ // eslint-disable-next-line import/prefer-default-export
32
26
  var getAggsQuery = function getAggsQuery(query, props) {
33
27
  var _clonedQuery$aggs;
34
-
35
28
  var clonedQuery = query;
36
29
  var dataField = props.dataField,
37
- size = props.size,
38
- sortBy = props.sortBy,
39
- showMissing = props.showMissing,
40
- missingLabel = props.missingLabel;
30
+ size = props.size,
31
+ sortBy = props.sortBy,
32
+ showMissing = props.showMissing,
33
+ missingLabel = props.missingLabel;
41
34
  clonedQuery.size = 0;
42
35
  clonedQuery.aggs = (_clonedQuery$aggs = {}, _clonedQuery$aggs[dataField] = {
43
36
  terms: _rollupPluginBabelHelpers._extends({
@@ -48,7 +41,6 @@ var getAggsQuery = function getAggsQuery(query, props) {
48
41
  missing: missingLabel
49
42
  } : {})
50
43
  }, _clonedQuery$aggs);
51
-
52
44
  if (props.nestedField) {
53
45
  clonedQuery.aggs = {
54
46
  reactivesearch_nested: {
@@ -59,7 +51,6 @@ var getAggsQuery = function getAggsQuery(query, props) {
59
51
  }
60
52
  };
61
53
  }
62
-
63
54
  return _rollupPluginBabelHelpers._extends({}, clonedQuery, extractQuery(props));
64
55
  };
65
56
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var version = "2.0.0-alpha.3";
5
+ var version = "3.0.0-alpha.0";
6
6
 
7
7
  exports.default = version;
@@ -4,40 +4,35 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
4
4
 
5
5
  var VueTypes = _interopDefault(require('vue-types'));
6
6
 
7
+ // import dateFormats from './dateFormats';
8
+
7
9
  VueTypes.sensibleDefaults = false;
8
10
  var reactKeyType = VueTypes.oneOfType([VueTypes.string, VueTypes.arrayOf(VueTypes.string), VueTypes.object, VueTypes.arrayOf(VueTypes.object)]);
9
-
10
11
  function validateLocation(value) {
11
12
  if (!value || !value.lat || !value.lng) {
12
13
  console.error(new Error('location must be an object with lat and lng keys defined'));
13
14
  return false;
14
- } // eslint-disable-next-line
15
-
16
-
15
+ }
16
+ // eslint-disable-next-line
17
17
  if (isNaN(value.lat)) {
18
18
  console.error(new Error('lat value must be a number'));
19
19
  return false;
20
- } // eslint-disable-next-line
21
-
22
-
20
+ }
21
+ // eslint-disable-next-line
23
22
  if (isNaN(value.lat)) {
24
23
  console.error(new Error('lng value must be a number'));
25
24
  return false;
26
25
  }
27
-
28
26
  if (value.lat < -90 || value.lat > 90) {
29
27
  console.error(new Error('lat value should be between -90 and 90.'));
30
28
  return false;
31
29
  }
32
-
33
30
  if (value.lat < -180 || value.lat > 180) {
34
31
  console.error(new Error('lng value should be between -180 and 180.'));
35
32
  return false;
36
33
  }
37
-
38
34
  return true;
39
35
  }
40
-
41
36
  var types = {
42
37
  any: VueTypes.any,
43
38
  bool: VueTypes.bool,
@@ -104,18 +99,12 @@ var types = {
104
99
  params: VueTypes.object.isRequired,
105
100
  props: VueTypes.object,
106
101
  rangeLabelsAlign: VueTypes.oneOf(['left', 'right']),
107
- title: VueTypes.oneOfType([VueTypes.string, VueTypes.any]),
102
+ title: VueTypes.oneOfType([VueTypes.string, VueTypes.nullable]),
108
103
  tooltipTrigger: VueTypes.oneOf(['always', 'none', 'hover']),
109
104
  location: VueTypes.custom(validateLocation),
110
105
  unit: VueTypes.oneOf(['mi', 'miles', 'yd', 'yards', 'ft', 'feet', 'in', 'inch', 'km', 'kilometers', 'm', 'meters', 'cm', 'centimeters', 'mm', 'millimeters', 'NM', 'nmi', 'nauticalmiles']),
111
106
  value: VueTypes.string.def(undefined),
112
- analyticsConfig: VueTypes.shape({
113
- emptyQuery: VueTypes.bool,
114
- suggestionAnalytics: VueTypes.bool,
115
- userId: VueTypes.string,
116
- customEvents: VueTypes.object
117
- }),
118
- appbaseConfig: VueTypes.shape({
107
+ reactivesearchAPIConfig: VueTypes.shape({
119
108
  recordAnalytics: VueTypes.bool,
120
109
  emptyQuery: VueTypes.bool,
121
110
  suggestionAnalytics: VueTypes.bool,
@@ -0,0 +1,53 @@
1
+ import { _ as _taggedTemplateLiteralLoose } from './_rollupPluginBabelHelpers-ded08042.js';
2
+ import { styled } from '@appbaseio/vue-emotion';
3
+ import { css } from 'emotion';
4
+ import { darken, rgba, lighten } from 'polished';
5
+
6
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
7
+ var filters = function filters(_ref) {
8
+ var borderColor = _ref.colors.borderColor;
9
+ return css(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n\tmargin: 0 -3px;\n\tmax-width: 100%;\n\n\tbutton {\n\t\tmargin: 2px 3px;\n\t\tpadding: 5px 8px;\n\t\tfont-size: 0.85rem;\n\t\tposition: relative;\n\n\t\tspan:first-child {\n\t\t\tmax-width: 260px;\n\t\t\twhite-space: nowrap;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\tmargin-right: 26px;\n\t\t}\n\n\t\tspan:last-child {\n\t\t\tdisplay: flex;\n\t\t\theight: 100%;\n\t\t\ttop: 0;\n\t\t\tright: 8px;\n\t\t\tposition: absolute;\n\t\t\talign-items: center;\n\t\t\tborder-left: 1px solid ", ";\n\t\t\tpadding-left: 8px;\n\t\t\tmargin-left: 8px;\n\t\t}\n\n\t\t&:hover,\n\t\t&:focus {\n\t\t\tspan:first-child {\n\t\t\t\ttext-decoration: line-through;\n\t\t\t}\n\t\t}\n\t}\n"])), borderColor || '#fff');
10
+ };
11
+ var pagination = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n\tmargin: 10px -3px;\n\tmax-width: 100%;\n\ttext-align: center;\n\n\tbutton {\n\t\tmargin: 0 3px;\n\t}\n"])));
12
+ var toggleButtons = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n\tmargin: 0 -3px;\n\tmax-width: 100%;\n\n\tbutton {\n\t\tmargin: 3px 3px;\n\t}\n"])));
13
+ var numberBoxContainer = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n\tmargin: 0 -5px;\n\tbutton {\n\t\tmargin: 5px;\n\t}\n\tspan {\n\t\tmargin: 0 5px;\n\t}\n"])));
14
+ var primary = function primary(_ref2) {
15
+ var theme = _ref2.theme;
16
+ return "\n\tbackground-color: " + theme.colors.primaryColor + ";\n\tcolor: " + theme.colors.primaryTextColor + ";\n\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: " + darken(0.1, theme.colors.primaryColor) + ";\n\t}\n";
17
+ };
18
+ var large = function large() {
19
+ return "\n\tmin-height: 40px;\n\tpadding: 10px 20px;\n";
20
+ };
21
+ var disabled = function disabled(_ref3) {
22
+ var theme = _ref3.theme;
23
+ return "\n\tbackground-color: " + (theme.colors.backgroundColor ? lighten(0.1, theme.colors.backgroundColor) : '#fafafa') + ";\n\tcolor: #ccc;\n\tcursor: not-allowed;\n\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: " + (theme.colors.backgroundColor ? lighten(0.2, theme.colors.backgroundColor) : '#fafafa') + ";\n\t}\n";
24
+ };
25
+ var Button = styled('button')(_templateObject5 || (_templateObject5 = _taggedTemplateLiteralLoose(["\n\tdisplay: inline-flex;\n\tjustify-content: center;\n\talign-items: center;\n\tborder-radius: 3px;\n\tborder: 1px solid transparent;\n\tmin-height: 30px;\n\tword-wrap: break-word;\n\tpadding: 5px 12px;\n\tline-height: 1.2rem;\n\tbackground-color: ", ";\n\tcolor: ", ";\n\tcursor: pointer;\n\tuser-select: none;\n\ttransition: all 0.3s ease;\n\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: ", ";\n\t}\n\n\t&:focus {\n\t\toutline: 0;\n\t\tborder-color: ", ";\n\t\tbox-shadow: ", ";\n\t}\n\n\t", ";\n\t", ";\n\t", ";\n\n\t&.enter-btn {\n\t\tborder-top-left-radius: 0px;\n\t\tborder-bottom-left-radius: 0px;\n\t\theight: 100%;\n\t}\n"])), function (_ref4) {
26
+ var theme = _ref4.theme;
27
+ return theme.colors ? theme.colors.backgroundColor : '#eee';
28
+ }, function (_ref5) {
29
+ var theme = _ref5.theme;
30
+ return theme.colors ? theme.colors.textColor : '';
31
+ }, function (_ref6) {
32
+ var theme = _ref6.theme;
33
+ return theme.colors && theme.colors.backgroundColor ? darken(0.1, theme.colors.backgroundColor) : '#ccc';
34
+ }, function (_ref7) {
35
+ var theme = _ref7.theme;
36
+ return theme.colors && theme.colors.primaryColor ? rgba(theme.colors.primaryColor, 0.6) : 'unset';
37
+ }, function (_ref8) {
38
+ var theme = _ref8.theme;
39
+ return theme.colors && theme.colors.primaryColor ? "0 0 0 2px " + rgba(theme.colors.primaryColor, 0.3) : '';
40
+ }, function (props) {
41
+ return props.primary ? primary : null;
42
+ }, function (props) {
43
+ return props.disabled ? disabled : null;
44
+ }, function (props) {
45
+ return props.large && large;
46
+ });
47
+ var loadMoreContainer = css({
48
+ margin: '5px 0',
49
+ display: 'flex',
50
+ justifyContent: 'center'
51
+ });
52
+
53
+ export { Button as B, filters as f, loadMoreContainer as l, pagination as p, toggleButtons as t };
@@ -1,8 +1,8 @@
1
- import { _ as _taggedTemplateLiteralLoose } from './_rollupPluginBabelHelpers-76660dab.js';
1
+ import { _ as _taggedTemplateLiteralLoose } from './_rollupPluginBabelHelpers-ded08042.js';
2
+ import { styled } from '@appbaseio/vue-emotion';
2
3
  import { css } from 'emotion';
3
- import styled from '@appbaseio/vue-emotion';
4
4
  import { lighten } from 'polished';
5
- import './Title-3342664a.js';
5
+ import './Title-863dfa42.js';
6
6
 
7
7
  var _templateObject, _templateObject2, _templateObject3;
8
8
  var container = css(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n\tdisplay: flex;\n\tflex-direction: row;\n\tjustify-content: center;\n\tflex-wrap: wrap;\n\tmargin: 0 -8px;\n\n\t@media (max-width: 420px) {\n\t\tmargin: 0;\n\t}\n"])));
@@ -1,19 +1,21 @@
1
1
  import { Actions, helper } from '@appbaseio/reactivecore';
2
- import { a as _extends } from './_rollupPluginBabelHelpers-76660dab.js';
3
- import VueTypes from 'vue-types';
4
2
  import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
3
+ import { a as _extends } from './_rollupPluginBabelHelpers-ded08042.js';
4
+ import { h } from 'vue';
5
+ import VueTypes from 'vue-types';
5
6
  import { getInternalComponentID } from '@appbaseio/reactivecore/lib/utils/transform';
6
- import { c as connect, b as getCamelCase, d as getValidPropsKeys } from './index-7788a843.js';
7
+ import { c as connect, b as getCamelCase, d as getValidPropsKeys } from './index-4520a598.js';
7
8
 
8
9
  var addComponent = Actions.addComponent,
9
- removeComponent = Actions.removeComponent,
10
- watchComponent = Actions.watchComponent,
11
- setQueryListener = Actions.setQueryListener,
12
- setComponentProps = Actions.setComponentProps,
13
- updateComponentProps = Actions.updateComponentProps;
10
+ removeComponent = Actions.removeComponent,
11
+ watchComponent = Actions.watchComponent,
12
+ setQueryListener = Actions.setQueryListener,
13
+ setComponentProps = Actions.setComponentProps,
14
+ updateComponentProps = Actions.updateComponentProps;
14
15
  var pushToAndClause = helper.pushToAndClause,
15
- checkPropChange = helper.checkPropChange,
16
- checkSomePropChange = helper.checkSomePropChange;
16
+ checkPropChange = helper.checkPropChange,
17
+ checkSomePropChange = helper.checkSomePropChange;
18
+
17
19
  /**
18
20
  * ComponentWrapper component is a wrapper component for each ReactiveSearch component
19
21
  * which is responsible for following tasks:
@@ -25,7 +27,6 @@ var pushToAndClause = helper.pushToAndClause,
25
27
  * 6. Unregister the component on un-mount
26
28
  * Note: All components are using that except the DynamicRangeSlider
27
29
  */
28
-
29
30
  var ComponentWrapper = function ComponentWrapper(component, options) {
30
31
  if (options === void 0) {
31
32
  options = {
@@ -33,17 +34,16 @@ var ComponentWrapper = function ComponentWrapper(component, options) {
33
34
  internalComponent: false
34
35
  };
35
36
  }
36
-
37
37
  return {
38
38
  name: 'ComponentWrapper',
39
+ $timestamp: null,
39
40
  props: {
40
- destroyOnUnmount: VueTypes.bool.def(false)
41
+ destroyOnUnmount: VueTypes.bool.def(true)
41
42
  },
42
43
  created: function created() {
43
44
  // clone the props for component it is needed because attrs gets changed on time
44
- var componentProps = _extends({}, this.$attrs); // handle kebab case for props
45
-
46
-
45
+ var componentProps = _extends({}, this.$attrs);
46
+ // handle kebab case for props
47
47
  var parsedProps = {};
48
48
  Object.keys(componentProps).forEach(function (key) {
49
49
  parsedProps[getCamelCase(key)] = componentProps[key];
@@ -51,49 +51,40 @@ var ComponentWrapper = function ComponentWrapper(component, options) {
51
51
  this.componentProps = parsedProps;
52
52
  this.componentId = this.componentProps.componentId;
53
53
  this.react = this.componentProps.react;
54
+ this.$timestamp = new Date().getTime();
54
55
  },
55
56
  beforeMount: function beforeMount() {
56
57
  var _this = this;
57
-
58
58
  var components = [];
59
-
60
59
  if (this.$$store) {
61
60
  var _this$$$store$getStat = this.$$store.getState();
62
-
63
61
  components = _this$$$store$getStat.components;
64
- } // Register a component only when `destroyOnUnmount` is `true`
62
+ }
63
+ // Register a component only when `destroyOnUnmount` is `true`
65
64
  // or component is not present in store
66
-
67
-
68
65
  if (this.destroyOnUnmount || components.indexOf(this.componentProps.componentId) === -1) {
69
66
  // Register component
70
67
  this.addComponent(this.componentId);
71
-
72
68
  var onQueryChange = function onQueryChange() {
73
69
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
74
70
  args[_key] = arguments[_key];
75
71
  }
76
-
77
72
  _this.$emit.apply(_this, ['queryChange'].concat(args));
78
-
79
73
  _this.$emit.apply(_this, ['query-change'].concat(args));
80
74
  };
81
-
82
75
  var onError = function onError(e) {
83
76
  _this.$emit('error', e);
84
77
  };
85
-
86
- this.setQueryListener(this.componentId, onQueryChange, onError); // Update props in store
87
-
78
+ this.setQueryListener(this.componentId, onQueryChange, onError);
79
+ // Update props in store
88
80
  this.setComponentProps(this.componentId, this.componentProps, options.componentType);
89
- } // if default query prop is defined and component is reactive component then register the internal component
90
-
81
+ }
91
82
 
83
+ // if default query prop is defined and component is reactive component then register the internal component
92
84
  if (options.internalComponent || this.componentProps.defaultQuery && options.componentType === componentTypes.reactiveComponent) {
93
85
  this.internalComponent = getInternalComponentID(this.componentId);
94
- } // Register internal component
95
-
96
-
86
+ }
87
+ // Register internal component
97
88
  if (this.internalComponent && (this.destroyOnUnmount || components.indexOf(this.internalComponent) === -1)) {
98
89
  this.addComponent(this.internalComponent);
99
90
  this.setComponentProps(this.internalComponent, this.componentProps, options.componentType);
@@ -107,11 +98,17 @@ var ComponentWrapper = function ComponentWrapper(component, options) {
107
98
  },
108
99
  beforeDestroy: function beforeDestroy() {
109
100
  if (this.destroyOnUnmount) {
101
+ var registeredComponentsTimestamps = {};
102
+ if (this.$$store) {
103
+ var _this$$$store$getStat2 = this.$$store.getState();
104
+ registeredComponentsTimestamps = _this$$$store$getStat2.registeredComponentsTimestamps;
105
+ }
110
106
  // Unregister components
111
- this.removeComponent(this.componentId);
112
-
113
- if (this.internalComponent) {
114
- this.removeComponent(this.internalComponent);
107
+ if (registeredComponentsTimestamps[this.componentId] === this.$timestamp) {
108
+ this.removeComponent(this.componentId);
109
+ if (this.internalComponent) {
110
+ this.removeComponent(this.internalComponent);
111
+ }
115
112
  }
116
113
  }
117
114
  },
@@ -120,18 +117,15 @@ var ComponentWrapper = function ComponentWrapper(component, options) {
120
117
  deep: true,
121
118
  handler: function handler(newVal) {
122
119
  var _this2 = this;
123
-
124
120
  var propsKeys = getValidPropsKeys(newVal);
125
121
  checkSomePropChange(newVal, this.savedComponentProps, propsKeys, function () {
126
122
  _this2.updateComponentProps(_this2.componentId, newVal, options.componentType);
127
-
128
123
  _this2.updateComponentProps(_this2.internalComponent, newVal, options.componentType);
129
124
  });
130
125
  }
131
126
  },
132
127
  react: function react(newVal, oldVal) {
133
128
  var _this3 = this;
134
-
135
129
  checkPropChange(newVal, oldVal, function () {
136
130
  return _this3.setReact(_this3.componentProps);
137
131
  });
@@ -139,39 +133,32 @@ var ComponentWrapper = function ComponentWrapper(component, options) {
139
133
  },
140
134
  methods: {
141
135
  setReact: function setReact(props) {
142
- var react = props.react;
143
-
136
+ var react = props.react,
137
+ executeInitialQuery = props.executeInitialQuery;
144
138
  if (this.internalComponent) {
145
139
  if (react) {
146
140
  var newReact = pushToAndClause(react, this.internalComponent);
147
- this.watchComponent(props.componentId, newReact);
141
+ this.watchComponent(props.componentId, newReact, executeInitialQuery);
148
142
  } else {
149
143
  this.watchComponent(props.componentId, {
150
144
  and: this.internalComponent
151
- });
145
+ }, executeInitialQuery);
152
146
  }
153
147
  } else {
154
- this.watchComponent(props.componentId, react);
148
+ this.watchComponent(props.componentId, react, executeInitialQuery);
155
149
  }
156
150
  }
157
151
  },
158
- render: function render(h) {
159
- return h(component, {
160
- attrs: this.$attrs,
161
- on: this.$listeners,
162
- scopedSlots: this.$scopedSlots,
163
- slots: this.$slots
164
- });
152
+ render: function render() {
153
+ return h(component, null, this.$slots);
165
154
  }
166
155
  };
167
156
  };
168
-
169
157
  var mapStateToProps = function mapStateToProps(state, props) {
170
158
  return {
171
159
  savedComponentProps: state.props[props.componentId]
172
160
  };
173
161
  };
174
-
175
162
  var mapDispatchToProps = {
176
163
  addComponent: addComponent,
177
164
  removeComponent: removeComponent,
@@ -184,7 +171,6 @@ var ComponentWrapper$1 = (function (component, options) {
184
171
  if (options === void 0) {
185
172
  options = {};
186
173
  }
187
-
188
174
  return connect(mapStateToProps, mapDispatchToProps)(ComponentWrapper(component, options));
189
175
  });
190
176
 
@@ -1,5 +1,5 @@
1
- import { _ as _taggedTemplateLiteralLoose } from './_rollupPluginBabelHelpers-76660dab.js';
2
- import styled from '@appbaseio/vue-emotion';
1
+ import { _ as _taggedTemplateLiteralLoose } from './_rollupPluginBabelHelpers-ded08042.js';
2
+ import { styled } from '@appbaseio/vue-emotion';
3
3
 
4
4
  var _templateObject;
5
5
  var Container = styled('div')(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n\t", ";\n"])), function (_ref) {