@appbaseio/reactivesearch-vue 1.31.0 → 2.0.0-alpha

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 (89) hide show
  1. package/dist/@appbaseio/reactivesearch-vue.umd.js +9424 -75
  2. package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
  3. package/dist/@appbaseio/reactivesearch-vue.umd.min.js +21 -5
  4. package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
  5. package/dist/cjs/{Button-0e2e2c02.js → Button-446f819e.js} +1 -1
  6. package/dist/cjs/{CancelSvg-c48c1085.js → CancelSvg-9f258f4f.js} +1 -1
  7. package/dist/cjs/{Card-4fa0f769.js → Card-642547a8.js} +2 -2
  8. package/dist/cjs/{ComponentWrapper-6909bc2a.js → ComponentWrapper-ad3dad02.js} +2 -2
  9. package/dist/cjs/{Container-cfd69a34.js → Container-daf30918.js} +1 -1
  10. package/dist/cjs/{DataSearch-a8fabd77.js → DataSearch-6cf29cf0.js} +9 -9
  11. package/dist/cjs/DataSearch.js +10 -10
  12. package/dist/cjs/{DropDown-aa358fff.js → DropDown-c479bbb0.js} +5 -5
  13. package/dist/cjs/DynamicRangeSlider.js +6 -6
  14. package/dist/cjs/{Flex-63774e4d.js → Flex-aa517a13.js} +1 -1
  15. package/dist/cjs/{FormControlList-a9c64bb8.js → FormControlList-c195a592.js} +1 -1
  16. package/dist/cjs/{Input-43868594.js → Input-e6603a7e.js} +1 -1
  17. package/dist/cjs/{ListItem-38962297.js → ListItem-8c9e0d68.js} +2 -2
  18. package/dist/cjs/MultiDropdownList.js +11 -11
  19. package/dist/cjs/MultiList.js +9 -9
  20. package/dist/cjs/MultiRange.js +7 -7
  21. package/dist/cjs/Pagination-71e85fa9.js +182 -0
  22. package/dist/cjs/RangeInput.js +9 -9
  23. package/dist/cjs/RangeSlider.js +7 -7
  24. package/dist/cjs/ReactiveBase.js +3 -3
  25. package/dist/cjs/ReactiveComponent.js +4 -4
  26. package/dist/cjs/ReactiveGoogleMap.js +2336 -0
  27. package/dist/cjs/ReactiveList.js +19 -189
  28. package/dist/cjs/ResultCard.js +4 -4
  29. package/dist/cjs/ResultList.js +4 -4
  30. package/dist/cjs/SelectedFilters.js +6 -6
  31. package/dist/cjs/SingleDropdownList.js +11 -11
  32. package/dist/cjs/SingleList.js +9 -9
  33. package/dist/cjs/SingleRange.js +7 -7
  34. package/dist/cjs/StateProvider.js +2 -2
  35. package/dist/cjs/{Title-26661936.js → Title-1de7d0f4.js} +1 -1
  36. package/dist/cjs/ToggleButton.js +7 -7
  37. package/dist/cjs/{_rollupPluginBabelHelpers-91d4b5a6.js → _rollupPluginBabelHelpers-c705cbe6.js} +16 -0
  38. package/dist/cjs/{index-2e0ea8d8.js → index-6a167fe0.js} +1 -1
  39. package/dist/cjs/index.js +23 -18
  40. package/dist/cjs/initReactivesearch.js +1 -1
  41. package/dist/cjs/{install-27314778.js → install-99716d95.js} +10 -10
  42. package/dist/cjs/install.js +19 -18
  43. package/dist/cjs/{ssr-949cafb5.js → ssr-3027b848.js} +1 -1
  44. package/dist/cjs/{utils-0df3cb93.js → utils-d6a52588.js} +1 -1
  45. package/dist/cjs/version.js +1 -1
  46. package/dist/cjs/{vueTypes-3970ff42.js → vueTypes-727b7c63.js} +24 -13
  47. package/dist/es/{Button-e18ad90f.js → Button-d8bc15ea.js} +1 -1
  48. package/dist/es/{CancelSvg-e3b33cdd.js → CancelSvg-4cfae5fd.js} +1 -1
  49. package/dist/es/{Card-ad6ba09f.js → Card-450683f1.js} +2 -2
  50. package/dist/es/{ComponentWrapper-ca0354ea.js → ComponentWrapper-424e86fd.js} +2 -2
  51. package/dist/es/{Container-421450dc.js → Container-ba826e96.js} +1 -1
  52. package/dist/es/{DataSearch-da9347f7.js → DataSearch-4888aa43.js} +9 -9
  53. package/dist/es/DataSearch.js +10 -10
  54. package/dist/es/{DropDown-604374d2.js → DropDown-05a644a5.js} +5 -5
  55. package/dist/es/DynamicRangeSlider.js +6 -6
  56. package/dist/es/{Flex-09d40927.js → Flex-1f0795c3.js} +1 -1
  57. package/dist/es/{FormControlList-38ffe3d3.js → FormControlList-c22d64f6.js} +1 -1
  58. package/dist/es/{Input-c9d757bc.js → Input-7a2a9fac.js} +1 -1
  59. package/dist/es/{ListItem-41d6ddd7.js → ListItem-cad14c5e.js} +2 -2
  60. package/dist/es/MultiDropdownList.js +11 -11
  61. package/dist/es/MultiList.js +9 -9
  62. package/dist/es/MultiRange.js +7 -7
  63. package/dist/es/Pagination-784bf143.js +177 -0
  64. package/dist/es/RangeInput.js +9 -9
  65. package/dist/es/RangeSlider.js +7 -7
  66. package/dist/es/ReactiveBase.js +3 -3
  67. package/dist/es/ReactiveComponent.js +4 -4
  68. package/dist/es/ReactiveGoogleMap.js +2327 -0
  69. package/dist/es/ReactiveList.js +18 -188
  70. package/dist/es/ResultCard.js +4 -4
  71. package/dist/es/ResultList.js +4 -4
  72. package/dist/es/SelectedFilters.js +6 -6
  73. package/dist/es/SingleDropdownList.js +11 -11
  74. package/dist/es/SingleList.js +9 -9
  75. package/dist/es/SingleRange.js +7 -7
  76. package/dist/es/StateProvider.js +2 -2
  77. package/dist/es/{Title-35edd732.js → Title-3342664a.js} +1 -1
  78. package/dist/es/ToggleButton.js +7 -7
  79. package/dist/es/{_rollupPluginBabelHelpers-51ce1182.js → _rollupPluginBabelHelpers-76660dab.js} +16 -1
  80. package/dist/es/{index-4715798c.js → index-7788a843.js} +1 -1
  81. package/dist/es/index.js +23 -19
  82. package/dist/es/initReactivesearch.js +1 -1
  83. package/dist/es/{install-5d9cb7ed.js → install-87984085.js} +10 -10
  84. package/dist/es/install.js +19 -18
  85. package/dist/es/{ssr-ad57b0ad.js → ssr-b2c0b401.js} +1 -1
  86. package/dist/es/{utils-9b45e0ab.js → utils-9e68acee.js} +1 -1
  87. package/dist/es/version.js +1 -1
  88. package/dist/es/{vueTypes-c0d8b875.js → vueTypes-b8146772.js} +24 -13
  89. package/package.json +8 -2
@@ -0,0 +1,177 @@
1
+ import { helper } from '@appbaseio/reactivecore';
2
+ import VueTypes from 'vue-types';
3
+ import { p as pagination, B as Button } from './Button-d8bc15ea.js';
4
+ import { t as types } from './vueTypes-b8146772.js';
5
+
6
+ var getClassName = helper.getClassName,
7
+ handleA11yAction = helper.handleA11yAction;
8
+
9
+ function getStartPage(totalPages, currentPage, showEndPage) {
10
+ var midValue = parseInt(totalPages / 2, 10);
11
+ var start = currentPage - (showEndPage ? Math.ceil(midValue / 2) - 1 : midValue);
12
+ return start > 1 ? start : 2;
13
+ }
14
+
15
+ var Pagination = {
16
+ name: 'Pagination',
17
+ functional: true,
18
+ props: {
19
+ currentPage: types.number,
20
+ innerClass: types.style,
21
+ pages: types.number,
22
+ setPage: types.func,
23
+ totalPages: types.number,
24
+ showEndPage: VueTypes.bool,
25
+ prevLabel: types.string,
26
+ nextLabel: types.string
27
+ },
28
+ render: function render(createElement, context) {
29
+ var h = arguments[0];
30
+ var props = context.props;
31
+
32
+ var onPrevPage = function onPrevPage() {
33
+ if (props.currentPage) {
34
+ props.setPage(props.currentPage - 1);
35
+ }
36
+ };
37
+
38
+ var onNextPage = function onNextPage() {
39
+ if (props.currentPage < props.totalPages - 1) {
40
+ props.setPage(props.currentPage + 1);
41
+ }
42
+ };
43
+
44
+ if (!props.totalPages) {
45
+ return null;
46
+ }
47
+
48
+ var innerClassName = getClassName(props.innerClass, 'button');
49
+ var primary = props.currentPage === 0;
50
+ var className = innerClassName || primary ? innerClassName + " " + (primary ? 'active' : '') : '';
51
+
52
+ var buildPaginationDOM = function buildPaginationDOM(position) {
53
+ var pages = props.pages,
54
+ currentPage = props.currentPage,
55
+ totalPages = props.totalPages,
56
+ setPage = props.setPage,
57
+ showEndPage = props.showEndPage;
58
+ var start = position === 'start' ? getStartPage(pages, currentPage, showEndPage) : Math.max(2, Math.ceil(totalPages - (pages - 1) / 2 + 1));
59
+ var paginationButtons = [];
60
+ var endPage = start;
61
+
62
+ if (start <= totalPages) {
63
+ var totalPagesToShow = pages < totalPages ? start + (pages - 1) : totalPages + 1;
64
+
65
+ if (showEndPage) {
66
+ totalPagesToShow = position === 'start' ? start + (Math.ceil(pages / 2) - pages % 2) : totalPages + 1;
67
+ }
68
+
69
+ if (currentPage > totalPages - pages + 2) {
70
+ start = Math.max(2, totalPages - pages + 2);
71
+ totalPagesToShow = start + pages;
72
+ }
73
+
74
+ var _loop = function _loop(i) {
75
+ var activeButton = currentPage === i - 1;
76
+ var classNameBtn = innerClassName || activeButton ? innerClassName + " " + (activeButton ? 'active' : '') : '';
77
+ var pageBtn = h(Button, {
78
+ "class": classNameBtn,
79
+ "attrs": {
80
+ "primary": activeButton,
81
+ "tabIndex": "0",
82
+ "alt": "page-" + i
83
+ },
84
+ "on": {
85
+ "keyPress": function keyPress(event) {
86
+ return handleA11yAction(event, function () {
87
+ return setPage(i - 1);
88
+ });
89
+ },
90
+ "click": function click() {
91
+ return setPage(i - 1);
92
+ }
93
+ }
94
+ }, [i]);
95
+
96
+ if (i <= totalPages + 1) {
97
+ paginationButtons.push(pageBtn);
98
+
99
+ if (i === Math.min(totalPages + 1, totalPagesToShow) - 1) {
100
+ endPage = i;
101
+ }
102
+ }
103
+ };
104
+
105
+ for (var i = start; i < Math.min(totalPages + 1, totalPagesToShow); i += 1) {
106
+ _loop(i);
107
+ }
108
+ }
109
+
110
+ return [paginationButtons, start, endPage];
111
+ };
112
+
113
+ var buildIntermediatePaginationDom = function buildIntermediatePaginationDom() {
114
+ var showEndPage = props.showEndPage,
115
+ currentPage = props.currentPage,
116
+ totalPages = props.totalPages,
117
+ pages = props.pages;
118
+ if (!showEndPage) return buildPaginationDOM('start')[0];
119
+
120
+ if (currentPage <= totalPages - pages + 2 || totalPages < pages) {
121
+ return buildPaginationDOM('start')[0];
122
+ }
123
+
124
+ return null;
125
+ };
126
+
127
+ return h("div", {
128
+ "class": pagination + " " + getClassName(props.innerClass, 'pagination')
129
+ }, [h(Button, {
130
+ "class": getClassName(props.innerClass, 'button') || '',
131
+ "attrs": {
132
+ "disabled": props.currentPage === 0,
133
+ "tabIndex": "0"
134
+ },
135
+ "on": {
136
+ "keyPress": function keyPress(event) {
137
+ return handleA11yAction(event, onPrevPage);
138
+ },
139
+ "click": onPrevPage
140
+ }
141
+ }, [props.prevLabel || 'Prev']), h(Button, {
142
+ "class": className,
143
+ "attrs": {
144
+ "primary": primary,
145
+ "tabIndex": "0"
146
+ },
147
+ "on": {
148
+ "keyPress": function keyPress(event) {
149
+ return handleA11yAction(event, function () {
150
+ return props.setPage(0);
151
+ });
152
+ },
153
+ "click": function click() {
154
+ return props.setPage(0);
155
+ }
156
+ }
157
+ }, ["1"]), props.showEndPage && props.currentPage >= Math.floor(props.pages / 2) + !!(props.pages % 2) && buildPaginationDOM('start')[1] !== 2 ? h("span", ["..."]) : null, buildIntermediatePaginationDom(), props.showEndPage && props.pages > 2 && props.currentPage <= props.totalPages - Math.ceil(props.pages * 0.75) && buildPaginationDOM('start')[2] !== buildPaginationDOM('end')[1] - 1 ? h("span", ["..."]) : null, props.showEndPage && props.totalPages >= props.pages && buildPaginationDOM('end')[0], h(Button, {
158
+ "class": getClassName(props.innerClass, 'button') || '',
159
+ "attrs": {
160
+ "disabled": props.currentPage >= props.totalPages - 1,
161
+ "tabIndex": "0"
162
+ },
163
+ "on": {
164
+ "keyPress": function keyPress(event) {
165
+ return handleA11yAction(event, onNextPage);
166
+ },
167
+ "click": onNextPage
168
+ }
169
+ }, [props.nextLabel || 'Next'])]);
170
+ }
171
+ };
172
+
173
+ Pagination.install = function (Vue) {
174
+ Vue.component(Pagination.name, Pagination);
175
+ };
176
+
177
+ export { Pagination as P };
@@ -1,21 +1,21 @@
1
1
  import { helper } from '@appbaseio/reactivecore';
2
- import { _ as _taggedTemplateLiteralLoose, a as _extends } from './_rollupPluginBabelHelpers-51ce1182.js';
2
+ import { _ as _taggedTemplateLiteralLoose, a as _extends } from './_rollupPluginBabelHelpers-76660dab.js';
3
3
  import VueTypes from 'vue-types';
4
4
  import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
5
5
  import { css } from 'emotion';
6
6
  import styled from '@appbaseio/vue-emotion';
7
7
  import 'polished';
8
- import { t as types } from './vueTypes-c0d8b875.js';
8
+ import { t as types } from './vueTypes-b8146772.js';
9
9
  import '@appbaseio/reactivecore/lib/utils/transform';
10
10
  import 'redux';
11
- import { c as connect } from './index-4715798c.js';
12
- import { C as ComponentWrapper } from './ComponentWrapper-ca0354ea.js';
13
- import './Title-35edd732.js';
14
- import { F as Flex } from './Flex-09d40927.js';
15
- import { I as Input } from './Input-c9d757bc.js';
16
- import { C as Container } from './Container-421450dc.js';
11
+ import { c as connect } from './index-7788a843.js';
12
+ import { C as ComponentWrapper } from './ComponentWrapper-424e86fd.js';
13
+ import './Title-3342664a.js';
14
+ import { F as Flex } from './Flex-1f0795c3.js';
15
+ import { I as Input } from './Input-7a2a9fac.js';
16
+ import { C as Container } from './Container-ba826e96.js';
17
17
  import 'vue-no-ssr';
18
- import './ssr-ad57b0ad.js';
18
+ import './ssr-b2c0b401.js';
19
19
  import { RangeConnected as RangeConnected$1 } from './RangeSlider.js';
20
20
 
21
21
  var _templateObject, _templateObject2;
@@ -1,17 +1,17 @@
1
1
  import { Actions, helper } from '@appbaseio/reactivecore';
2
- import { a as _extends } from './_rollupPluginBabelHelpers-51ce1182.js';
2
+ import { a as _extends } from './_rollupPluginBabelHelpers-76660dab.js';
3
3
  import VueTypes from 'vue-types';
4
4
  import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
5
5
  import '@appbaseio/vue-emotion';
6
- import { t as types } from './vueTypes-c0d8b875.js';
6
+ import { t as types } from './vueTypes-b8146772.js';
7
7
  import '@appbaseio/reactivecore/lib/utils/transform';
8
8
  import 'redux';
9
- import { f as updateCustomQuery, i as isQueryIdentical, c as connect } from './index-4715798c.js';
10
- import { C as ComponentWrapper } from './ComponentWrapper-ca0354ea.js';
11
- import { T as Title } from './Title-35edd732.js';
12
- import { C as Container } from './Container-421450dc.js';
9
+ import { f as updateCustomQuery, i as isQueryIdentical, c as connect } from './index-7788a843.js';
10
+ import { C as ComponentWrapper } from './ComponentWrapper-424e86fd.js';
11
+ import { T as Title } from './Title-3342664a.js';
12
+ import { C as Container } from './Container-ba826e96.js';
13
13
  import NoSSR from 'vue-no-ssr';
14
- import { g as getComponents, S as Slider } from './ssr-ad57b0ad.js';
14
+ import { g as getComponents, S as Slider } from './ssr-b2c0b401.js';
15
15
 
16
16
  var updateQuery = Actions.updateQuery,
17
17
  setQueryOptions = Actions.setQueryOptions,
@@ -1,12 +1,12 @@
1
1
  import configureStore, { Actions, helper } from '@appbaseio/reactivecore';
2
- import { _ as _taggedTemplateLiteralLoose, a as _extends } from './_rollupPluginBabelHelpers-51ce1182.js';
2
+ import { _ as _taggedTemplateLiteralLoose, a as _extends } from './_rollupPluginBabelHelpers-76660dab.js';
3
3
  import VueTypes from 'vue-types';
4
4
  import '@appbaseio/reactivecore/lib/utils/constants';
5
5
  import { isEqual as isEqual$1, transformRequestUsingEndpoint } from '@appbaseio/reactivecore/lib/utils/helper';
6
6
  import styled from '@appbaseio/vue-emotion';
7
- import { t as types } from './vueTypes-c0d8b875.js';
7
+ import { t as types } from './vueTypes-b8146772.js';
8
8
  import 'redux';
9
- import { c as connect, e as composeThemeObject, X as X_SEARCH_CLIENT } from './index-4715798c.js';
9
+ import { c as connect, e as composeThemeObject, X as X_SEARCH_CLIENT } from './index-7788a843.js';
10
10
  import _mergeJSXProps from '@vue/babel-helper-vue-jsx-merge-props';
11
11
  import { updateAnalyticsConfig } from '@appbaseio/reactivecore/lib/actions/analytics';
12
12
  import Appbase from 'appbase-js';
@@ -1,12 +1,12 @@
1
1
  import { Actions, helper } from '@appbaseio/reactivecore';
2
- import { a as _extends, b as _objectWithoutPropertiesLoose } from './_rollupPluginBabelHelpers-51ce1182.js';
2
+ import { a as _extends, b as _objectWithoutPropertiesLoose } from './_rollupPluginBabelHelpers-76660dab.js';
3
3
  import VueTypes from 'vue-types';
4
4
  import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
5
- import { t as types } from './vueTypes-c0d8b875.js';
5
+ import { t as types } from './vueTypes-b8146772.js';
6
6
  import '@appbaseio/reactivecore/lib/utils/transform';
7
7
  import 'redux';
8
- import { f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, c as connect } from './index-4715798c.js';
9
- import { C as ComponentWrapper } from './ComponentWrapper-ca0354ea.js';
8
+ import { f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, c as connect } from './index-7788a843.js';
9
+ import { C as ComponentWrapper } from './ComponentWrapper-424e86fd.js';
10
10
 
11
11
  var _excluded = ["options"];
12
12
  var updateQuery = Actions.updateQuery,