@appbaseio/reactivesearch-vue 1.16.0-alpha.35 → 1.16.0-alpha.36

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 +10968 -5239
  2. package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
  3. package/dist/@appbaseio/reactivesearch-vue.umd.min.js +5 -5
  4. package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
  5. package/dist/cjs/{Button-11307285.js → Button-d2f1aeda.js} +1 -1
  6. package/dist/cjs/{CancelSvg-4aa35935.js → CancelSvg-82021d23.js} +1 -1
  7. package/dist/cjs/{Card-fd94ef07.js → Card-4b915733.js} +2 -2
  8. package/dist/cjs/{ComponentWrapper-32481890.js → ComponentWrapper-7302fe1a.js} +2 -2
  9. package/dist/cjs/{Container-526efa6a.js → Container-8a08d663.js} +1 -1
  10. package/dist/cjs/DataSearch.js +2101 -18
  11. package/dist/cjs/{DropDown-cf9bfffc.js → DropDown-c46d8b0c.js} +19 -14
  12. package/dist/cjs/DynamicRangeSlider.js +45 -12
  13. package/dist/cjs/{Flex-f146cdad.js → Flex-699639d2.js} +1 -1
  14. package/dist/cjs/{FormControlList-808dbcef.js → FormControlList-73497794.js} +1 -1
  15. package/dist/cjs/{Input-3cc3fa59.js → Input-c6f181d5.js} +1 -1
  16. package/dist/cjs/{ListItem-b40adb04.js → ListItem-933c27e4.js} +2 -2
  17. package/dist/cjs/MultiDropdownList.js +13 -12
  18. package/dist/cjs/MultiList.js +22 -17
  19. package/dist/cjs/MultiRange.js +7 -7
  20. package/dist/cjs/Pagination-1b2320a7.js +177 -0
  21. package/dist/cjs/RangeInput.js +13 -9
  22. package/dist/cjs/RangeSlider.js +7 -7
  23. package/dist/cjs/ReactiveBase.js +3 -3
  24. package/dist/cjs/ReactiveComponent.js +4 -4
  25. package/dist/cjs/ReactiveGoogleMap.js +1764 -0
  26. package/dist/cjs/ReactiveList.js +19 -184
  27. package/dist/cjs/ResultCard.js +4 -4
  28. package/dist/cjs/ResultList.js +4 -4
  29. package/dist/cjs/SelectedFilters.js +6 -6
  30. package/dist/cjs/SingleDropdownList.js +12 -11
  31. package/dist/cjs/SingleList.js +9 -9
  32. package/dist/cjs/SingleRange.js +7 -7
  33. package/dist/cjs/StateProvider.js +2 -2
  34. package/dist/cjs/{Title-584a8cc8.js → Title-39765ee6.js} +1 -1
  35. package/dist/cjs/ToggleButton.js +7 -7
  36. package/dist/cjs/{_rollupPluginBabelHelpers-f127c8b7.js → _rollupPluginBabelHelpers-4abdbfff.js} +17 -0
  37. package/dist/cjs/{index-89c39a9e.js → index-d44a0a21.js} +11 -5
  38. package/dist/cjs/index.js +32 -23
  39. package/dist/cjs/initReactivesearch.js +1 -1
  40. package/dist/cjs/install.js +43 -37
  41. package/dist/cjs/{ssr-0ee35a09.js → ssr-c333c82c.js} +1 -1
  42. package/dist/cjs/{utils-1219e1fe.js → utils-23afb20b.js} +1 -1
  43. package/dist/cjs/version.js +1 -1
  44. package/dist/cjs/{vueTypes-57d01f18.js → vueTypes-6de9d2a9.js} +24 -13
  45. package/dist/es/{Button-91561391.js → Button-799185e2.js} +1 -1
  46. package/dist/es/{CancelSvg-c2c03a35.js → CancelSvg-4d9e0857.js} +1 -1
  47. package/dist/es/{Card-6446f1b7.js → Card-04b3c33e.js} +2 -2
  48. package/dist/es/{ComponentWrapper-4f85a67e.js → ComponentWrapper-bbb717bc.js} +2 -2
  49. package/dist/es/{Container-18b03fde.js → Container-4383c6f0.js} +1 -1
  50. package/dist/es/DataSearch.js +2100 -17
  51. package/dist/es/{DropDown-c8da0a2c.js → DropDown-4edaa621.js} +19 -14
  52. package/dist/es/DynamicRangeSlider.js +45 -12
  53. package/dist/es/{Flex-8770345d.js → Flex-aac91505.js} +1 -1
  54. package/dist/es/{FormControlList-704f8dee.js → FormControlList-fe389a2e.js} +1 -1
  55. package/dist/es/{Input-08bb1bcf.js → Input-d8519224.js} +1 -1
  56. package/dist/es/{ListItem-8e8fb535.js → ListItem-bdb6d53d.js} +2 -2
  57. package/dist/es/MultiDropdownList.js +13 -12
  58. package/dist/es/MultiList.js +22 -17
  59. package/dist/es/MultiRange.js +7 -7
  60. package/dist/es/Pagination-b3e4054a.js +172 -0
  61. package/dist/es/RangeInput.js +13 -9
  62. package/dist/es/RangeSlider.js +7 -7
  63. package/dist/es/ReactiveBase.js +3 -3
  64. package/dist/es/ReactiveComponent.js +4 -4
  65. package/dist/es/ReactiveGoogleMap.js +1756 -0
  66. package/dist/es/ReactiveList.js +19 -184
  67. package/dist/es/ResultCard.js +4 -4
  68. package/dist/es/ResultList.js +4 -4
  69. package/dist/es/SelectedFilters.js +6 -6
  70. package/dist/es/SingleDropdownList.js +12 -11
  71. package/dist/es/SingleList.js +9 -9
  72. package/dist/es/SingleRange.js +7 -7
  73. package/dist/es/StateProvider.js +2 -2
  74. package/dist/es/{Title-3522ff56.js → Title-579f8d6c.js} +1 -1
  75. package/dist/es/ToggleButton.js +7 -7
  76. package/dist/es/{_rollupPluginBabelHelpers-0f24d612.js → _rollupPluginBabelHelpers-ecf6c03c.js} +17 -1
  77. package/dist/es/{index-cb1950b6.js → index-5daa8276.js} +11 -5
  78. package/dist/es/index.js +28 -19
  79. package/dist/es/initReactivesearch.js +1 -1
  80. package/dist/es/install.js +45 -35
  81. package/dist/es/{ssr-a41dfea9.js → ssr-e3196de1.js} +1 -1
  82. package/dist/es/{utils-64a2e5f0.js → utils-3a32e13f.js} +1 -1
  83. package/dist/es/version.js +1 -1
  84. package/dist/es/{vueTypes-687b2304.js → vueTypes-9326e0be.js} +24 -13
  85. package/package.json +11 -5
  86. package/dist/cjs/DataSearch-8658fd8e.js +0 -2154
  87. package/dist/cjs/install-35f74190.js +0 -1196
  88. package/dist/es/DataSearch-66e72d1d.js +0 -2141
  89. package/dist/es/install-ecef1861.js +0 -1189
@@ -1,12 +1,13 @@
1
1
  import { helper } from '@appbaseio/reactivecore';
2
- import { _ as _taggedTemplateLiteralLoose, a as _extends } from './_rollupPluginBabelHelpers-0f24d612.js';
2
+ import { _ as _taggedTemplateLiteralLoose, a as _extends } from './_rollupPluginBabelHelpers-ecf6c03c.js';
3
3
  import VueTypes from 'vue-types';
4
4
  import { css } from 'emotion';
5
5
  import styled from '@appbaseio/vue-emotion';
6
- import { t as types } from './vueTypes-687b2304.js';
7
- import { a as isFunction } from './index-cb1950b6.js';
8
- import { D as Downshift, b as InputWrapper, a as IconGroup, I as IconWrapper, C as CancelSvg } from './CancelSvg-c2c03a35.js';
9
- import { s as suggestionsContainer, a as suggestions, I as Input } from './Input-08bb1bcf.js';
6
+ import { t as types } from './vueTypes-9326e0be.js';
7
+ import { a as isFunction } from './index-5daa8276.js';
8
+ import _mergeJSXProps from '@vue/babel-helper-vue-jsx-merge-props';
9
+ import { D as Downshift, b as InputWrapper, a as IconGroup, I as IconWrapper, C as CancelSvg } from './CancelSvg-4d9e0857.js';
10
+ import { s as suggestionsContainer, a as suggestions, I as Input } from './Input-d8519224.js';
10
11
  import { replaceDiacritics } from '@appbaseio/reactivecore/lib/utils/suggestions';
11
12
 
12
13
  var _templateObject, _templateObject2, _templateObject3, _templateObject4;
@@ -120,7 +121,8 @@ var Dropdown = {
120
121
  isOpen = _ref.isOpen,
121
122
  highlightedIndex = _ref.highlightedIndex,
122
123
  getButtonProps = _ref.getButtonProps,
123
- getItemEvents = _ref.getItemEvents;
124
+ getItemEvents = _ref.getItemEvents,
125
+ getInputEvents = _ref.getInputEvents;
124
126
  return h("div", {
125
127
  "class": suggestionsContainer
126
128
  }, [h(Select, {
@@ -145,7 +147,13 @@ var Dropdown = {
145
147
  getItemEvents: getItemEvents
146
148
  }) : isOpen && itemsToRender.length ? h("ul", {
147
149
  "class": suggestions(themePreset, _this.theme) + " " + (_this.$props.small ? 'small' : '') + " " + getClassName(_this.$props.innerClass, 'list')
148
- }, [_this.$props.showSearch ? _this.renderSearchbox() : null, !hasCustomRenderer && filteredItemsToRender.length === 0 ? _this.renderNoResult() : filteredItemsToRender.map(function (item, index) {
150
+ }, [_this.$props.showSearch ? _this.renderSearchbox({
151
+ on: {
152
+ input: getInputEvents({
153
+ onInput: _this.handleInputChange
154
+ }).input
155
+ }
156
+ }) : null, !hasCustomRenderer && filteredItemsToRender.length === 0 ? _this.renderNoResult() : filteredItemsToRender.map(function (item, index) {
149
157
  var selected = _this.$props.multi // MultiDropdownList
150
158
  && (selectedItem && !!selectedItem[item[keyField]] // MultiDropdownRange
151
159
  || Array.isArray(selectedItem) && selectedItem.find(function (value) {
@@ -266,7 +274,7 @@ var Dropdown = {
266
274
  "class": getClassName(this.$props.innerClass, 'noResults') || null
267
275
  }, [isFunction(renderNoResults) ? renderNoResults() : renderNoResults]);
268
276
  },
269
- renderSearchbox: function renderSearchbox() {
277
+ renderSearchbox: function renderSearchbox(eventObject) {
270
278
  var h = this.$createElement;
271
279
  var _this$$props2 = this.$props,
272
280
  componentId = _this$$props2.componentId,
@@ -274,7 +282,7 @@ var Dropdown = {
274
282
  showClear = _this$$props2.showClear,
275
283
  themePreset = _this$$props2.themePreset,
276
284
  innerClass = _this$$props2.innerClass;
277
- var InputComponent = h(Input, {
285
+ var InputComponent = h(Input, _mergeJSXProps([{
278
286
  "attrs": {
279
287
  "id": componentId + "-input",
280
288
  "showIcon": false,
@@ -287,11 +295,8 @@ var Dropdown = {
287
295
  border: 0,
288
296
  borderBottom: '1px solid #ddd'
289
297
  },
290
- "class": getClassName(innerClass, 'input'),
291
- "on": {
292
- "change": this.handleInputChange
293
- }
294
- });
298
+ "class": getClassName(innerClass, 'input')
299
+ }, eventObject]));
295
300
 
296
301
  if (showClear) {
297
302
  return h(InputWrapper, [InputComponent, this.searchTerm && h(IconGroup, {
@@ -1,15 +1,15 @@
1
1
  import { Actions, helper } from '@appbaseio/reactivecore';
2
- import { a as _extends } from './_rollupPluginBabelHelpers-0f24d612.js';
2
+ import { a as _extends } from './_rollupPluginBabelHelpers-ecf6c03c.js';
3
3
  import VueTypes from 'vue-types';
4
4
  import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
5
5
  import '@appbaseio/vue-emotion';
6
- import { t as types } from './vueTypes-687b2304.js';
6
+ import { t as types } from './vueTypes-9326e0be.js';
7
7
  import 'redux';
8
- import { f as updateCustomQuery, d as getValidPropsKeys, i as isQueryIdentical, c as connect } from './index-cb1950b6.js';
9
- import { T as Title } from './Title-3522ff56.js';
10
- import { C as Container } from './Container-18b03fde.js';
8
+ import { f as updateCustomQuery, d as getValidPropsKeys, i as isQueryIdentical, c as connect } from './index-5daa8276.js';
9
+ import { T as Title } from './Title-579f8d6c.js';
10
+ import { C as Container } from './Container-4383c6f0.js';
11
11
  import NoSSR from 'vue-no-ssr';
12
- import { g as getComponents, S as Slider } from './ssr-a41dfea9.js';
12
+ import { g as getComponents, S as Slider } from './ssr-e3196de1.js';
13
13
 
14
14
  var addComponent = Actions.addComponent,
15
15
  removeComponent = Actions.removeComponent,
@@ -47,7 +47,8 @@ var DynamicRangeSlider = {
47
47
  URLParams: VueTypes.bool.def(false),
48
48
  sliderOptions: VueTypes.object.def({}),
49
49
  nestedField: types.string,
50
- index: VueTypes.string
50
+ index: VueTypes.string,
51
+ value: types.range
51
52
  },
52
53
  data: function data() {
53
54
  this.internalRangeComponent = this.$props.componentId + "__range__internal";
@@ -93,6 +94,8 @@ var DynamicRangeSlider = {
93
94
  components = _this$$$store$getStat.components;
94
95
  }
95
96
 
97
+ var value = this.$props.value;
98
+
96
99
  if (this.destroyOnUnmount || components.indexOf(this.componentId) === -1) {
97
100
  this.addComponent(this.componentId);
98
101
  this.addComponent(this.internalRangeComponent);
@@ -101,6 +104,8 @@ var DynamicRangeSlider = {
101
104
  this.handleChange(this.selectedValue);
102
105
  } else if (this.selectedValue) {
103
106
  this.handleChange(DynamicRangeSlider.parseValue(this.selectedValue, this.$props));
107
+ } else if (value) {
108
+ this.handleChange(DynamicRangeSlider.parseValue(value, this.$props));
104
109
  } // get range before executing other queries
105
110
 
106
111
 
@@ -119,6 +124,13 @@ var DynamicRangeSlider = {
119
124
  }
120
125
  },
121
126
  methods: {
127
+ isControlled: function isControlled() {
128
+ if (this.$props.value && this.$listeners) {
129
+ return true;
130
+ }
131
+
132
+ return false;
133
+ },
122
134
  setDefaultValue: function setDefaultValue(_ref) {
123
135
  var start = _ref.start,
124
136
  end = _ref.end;
@@ -129,6 +141,8 @@ var DynamicRangeSlider = {
129
141
  defaultEnd = _this$$props$defaultV.end;
130
142
 
131
143
  this.handleChange([defaultStart, defaultEnd]);
144
+ } else if (this.isControlled()) {
145
+ this.handleChange(DynamicRangeSlider.parseValue(this.$props.value), 'change');
132
146
  } else {
133
147
  this.currentValue = [start, end];
134
148
  }
@@ -178,7 +192,16 @@ var DynamicRangeSlider = {
178
192
  },
179
193
  handleSlider: function handleSlider() {
180
194
  var sliderValues = this.$refs.slider.getValue();
181
- this.handleChange(sliderValues);
195
+ var value = this.$props.value;
196
+
197
+ if (value === undefined) {
198
+ this.handleChange(sliderValues);
199
+ } else {
200
+ this.$emit('change', {
201
+ start: sliderValues[0],
202
+ end: sliderValues[1]
203
+ });
204
+ }
182
205
  },
183
206
  handleChange: function handleChange(currentValue) {
184
207
  var _this2 = this;
@@ -271,6 +294,7 @@ var DynamicRangeSlider = {
271
294
  start: this.range.start,
272
295
  end: this.range.end
273
296
  };
297
+ this.$emit('change', value);
274
298
  this.handleChange(DynamicRangeSlider.parseValue(value, this.$props));
275
299
  },
276
300
  range: function range(newValue, oldValue) {
@@ -292,6 +316,11 @@ var DynamicRangeSlider = {
292
316
  if (!isQueryIdentical(newVal, oldVal, this.$data.currentValue, this.$props)) {
293
317
  this.updateQueryHandler(this.$data.currentValue);
294
318
  }
319
+ },
320
+ value: function value(newVal, oldVal) {
321
+ if (!isEqual(newVal, oldVal)) {
322
+ this.handleChange(DynamicRangeSlider.parseValue(newVal, this.$props));
323
+ }
295
324
  }
296
325
  },
297
326
  render: function render() {
@@ -313,9 +342,9 @@ var DynamicRangeSlider = {
313
342
  }, [h("vue-slider-component", {
314
343
  "ref": "slider",
315
344
  "attrs": {
316
- "value": [Math.max(start, this.currentValue[0]), Math.min(end, this.currentValue[1])],
317
- "min": Math.min(start, this.currentValue[0]),
318
- "max": Math.max(end, this.currentValue[1]),
345
+ "value": [Math.floor(Math.max(start, this.currentValue[0])), Math.ceil(Math.min(end, this.currentValue[1]))],
346
+ "min": Math.floor(Math.min(start, this.currentValue[0])),
347
+ "max": Math.ceil(Math.max(end, this.currentValue[1])),
319
348
  "dotSize": 20,
320
349
  "height": 4,
321
350
  "enable-cross": false,
@@ -365,7 +394,11 @@ DynamicRangeSlider.defaultQuery = function (values, props) {
365
394
  };
366
395
 
367
396
  DynamicRangeSlider.parseValue = function (value) {
368
- return [value.start, value.end];
397
+ if (value) {
398
+ return Array.isArray(value) ? value : [value.start, value.end];
399
+ }
400
+
401
+ return [];
369
402
  };
370
403
 
371
404
  var mapStateToProps = function mapStateToProps(state, props) {
@@ -1,4 +1,4 @@
1
- import { _ as _taggedTemplateLiteralLoose } from './_rollupPluginBabelHelpers-0f24d612.js';
1
+ import { _ as _taggedTemplateLiteralLoose } from './_rollupPluginBabelHelpers-ecf6c03c.js';
2
2
  import { css } from 'emotion';
3
3
  import styled from '@appbaseio/vue-emotion';
4
4
  import { lighten } from 'polished';
@@ -1,4 +1,4 @@
1
- import { _ as _taggedTemplateLiteralLoose } from './_rollupPluginBabelHelpers-0f24d612.js';
1
+ import { _ as _taggedTemplateLiteralLoose } from './_rollupPluginBabelHelpers-ecf6c03c.js';
2
2
  import { css } from 'emotion';
3
3
  import styled from '@appbaseio/vue-emotion';
4
4
  import { lighten } from 'polished';
@@ -1,4 +1,4 @@
1
- import { _ as _taggedTemplateLiteralLoose } from './_rollupPluginBabelHelpers-0f24d612.js';
1
+ import { _ as _taggedTemplateLiteralLoose } from './_rollupPluginBabelHelpers-ecf6c03c.js';
2
2
  import { css } from 'emotion';
3
3
  import styled from '@appbaseio/vue-emotion';
4
4
 
@@ -1,8 +1,8 @@
1
- import { _ as _taggedTemplateLiteralLoose } from './_rollupPluginBabelHelpers-0f24d612.js';
1
+ import { _ as _taggedTemplateLiteralLoose } from './_rollupPluginBabelHelpers-ecf6c03c.js';
2
2
  import { css } from 'emotion';
3
3
  import styled from '@appbaseio/vue-emotion';
4
4
  import { lighten } from 'polished';
5
- import './Title-3522ff56.js';
5
+ import './Title-579f8d6c.js';
6
6
 
7
7
  var _templateObject, _templateObject2, _templateObject3, _templateObject4;
8
8
  var container = css(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n\tdisplay: flex;\n\tflex-direction: column;\n\tmargin: 0;\n\tborder-radius: 0.25rem;\n\toverflow: hidden;\n"])));
@@ -1,24 +1,25 @@
1
1
  import { Actions, helper } from '@appbaseio/reactivecore';
2
- import { a as _extends, b as _objectWithoutPropertiesLoose, c as _toPropertyKey } from './_rollupPluginBabelHelpers-0f24d612.js';
2
+ import { a as _extends, b as _objectWithoutPropertiesLoose, c as _toPropertyKey } from './_rollupPluginBabelHelpers-ecf6c03c.js';
3
3
  import VueTypes from 'vue-types';
4
4
  import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
5
5
  import 'emotion';
6
6
  import '@appbaseio/vue-emotion';
7
7
  import 'polished';
8
- import { l as loadMoreContainer, B as Button } from './Button-91561391.js';
9
- import { t as types } from './vueTypes-687b2304.js';
8
+ import { l as loadMoreContainer, B as Button } from './Button-799185e2.js';
9
+ import { t as types } from './vueTypes-9326e0be.js';
10
10
  import '@appbaseio/reactivecore/lib/utils/transform';
11
11
  import 'redux';
12
- import { f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, a as isFunction, o as parseValueArray, g as getComponent, h as hasCustomRenderer, c as connect } from './index-cb1950b6.js';
13
- import { C as ComponentWrapper } from './ComponentWrapper-4f85a67e.js';
14
- import { T as Title } from './Title-3522ff56.js';
15
- import './CancelSvg-c2c03a35.js';
16
- import './Input-08bb1bcf.js';
12
+ import { f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, a as isFunction, o as parseValueArray, g as getComponent, h as hasCustomRenderer, c as connect } from './index-5daa8276.js';
13
+ import { C as ComponentWrapper } from './ComponentWrapper-bbb717bc.js';
14
+ import '@vue/babel-helper-vue-jsx-merge-props';
15
+ import { T as Title } from './Title-579f8d6c.js';
16
+ import './CancelSvg-4d9e0857.js';
17
+ import './Input-d8519224.js';
17
18
  import 'compute-scroll-into-view';
18
- import { C as Container } from './Container-18b03fde.js';
19
+ import { C as Container } from './Container-4383c6f0.js';
19
20
  import '@appbaseio/reactivecore/lib/utils/suggestions';
20
- import { g as getAggsQuery } from './utils-64a2e5f0.js';
21
- import { D as Dropdown } from './DropDown-c8da0a2c.js';
21
+ import { g as getAggsQuery } from './utils-3a32e13f.js';
22
+ import { D as Dropdown } from './DropDown-4edaa621.js';
22
23
 
23
24
  var updateQuery = Actions.updateQuery,
24
25
  setQueryOptions = Actions.setQueryOptions,
@@ -342,7 +343,7 @@ var MultiDropdownList = {
342
343
  }
343
344
 
344
345
  var performUpdate = function performUpdate() {
345
- _this3.currentValue = currentValue;
346
+ _this3.currentValue = _extends({}, currentValue);
346
347
 
347
348
  _this3.updateQueryHandler(finalValues, props);
348
349
 
@@ -1,21 +1,21 @@
1
1
  import { Actions, helper } from '@appbaseio/reactivecore';
2
- import { a as _extends, b as _objectWithoutPropertiesLoose, c as _toPropertyKey } from './_rollupPluginBabelHelpers-0f24d612.js';
2
+ import { a as _extends, b as _objectWithoutPropertiesLoose, c as _toPropertyKey } from './_rollupPluginBabelHelpers-ecf6c03c.js';
3
3
  import VueTypes from 'vue-types';
4
4
  import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
5
5
  import 'emotion';
6
6
  import '@appbaseio/vue-emotion';
7
7
  import 'polished';
8
- import { t as types } from './vueTypes-687b2304.js';
8
+ import { t as types } from './vueTypes-9326e0be.js';
9
9
  import '@appbaseio/reactivecore/lib/utils/transform';
10
10
  import 'redux';
11
- import { f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, a as isFunction, n as isEvent, o as parseValueArray, g as getComponent, h as hasCustomRenderer, c as connect } from './index-cb1950b6.js';
12
- import { C as ComponentWrapper } from './ComponentWrapper-4f85a67e.js';
13
- import { T as Title } from './Title-3522ff56.js';
14
- import { I as Input } from './Input-08bb1bcf.js';
15
- import { C as Container } from './Container-18b03fde.js';
11
+ import { f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, a as isFunction, n as isEvent, o as parseValueArray, g as getComponent, h as hasCustomRenderer, c as connect } from './index-5daa8276.js';
12
+ import { C as ComponentWrapper } from './ComponentWrapper-bbb717bc.js';
13
+ import { T as Title } from './Title-579f8d6c.js';
14
+ import { I as Input } from './Input-d8519224.js';
15
+ import { C as Container } from './Container-4383c6f0.js';
16
16
  import { replaceDiacritics } from '@appbaseio/reactivecore/lib/utils/suggestions';
17
- import { U as UL, C as Checkbox } from './FormControlList-704f8dee.js';
18
- import { g as getAggsQuery } from './utils-64a2e5f0.js';
17
+ import { U as UL, C as Checkbox } from './FormControlList-fe389a2e.js';
18
+ import { g as getAggsQuery } from './utils-3a32e13f.js';
19
19
 
20
20
  var updateQuery = Actions.updateQuery,
21
21
  setQueryOptions = Actions.setQueryOptions,
@@ -84,13 +84,14 @@ var MultiList = {
84
84
  },
85
85
  beforeMount: function beforeMount() {
86
86
  this.updateQueryHandlerOptions(this.$props);
87
+ var value = this.selectedValue || this.$props.value || this.$props.defaultValue;
88
+ this.setValue(value, !this.selectedValue);
89
+ },
90
+ mounted: function mounted() {
91
+ var currentValue = Object.keys(this.$data.currentValue);
87
92
 
88
- if (this.selectedValue) {
89
- this.setValue(this.selectedValue);
90
- } else if (this.$props.value) {
91
- this.setValue(this.$props.value, true);
92
- } else if (this.$props.defaultValue) {
93
- this.setValue(this.$props.defaultValue, true);
93
+ if (this.$props.value !== undefined && !isEqual(this.$props.value, currentValue)) {
94
+ this.$emit('change', currentValue);
94
95
  }
95
96
  },
96
97
  watch: {
@@ -135,7 +136,11 @@ var MultiList = {
135
136
  }
136
137
 
137
138
  if (!isEqual(selectedValue, newVal)) {
138
- this.setValue(newVal || [], true);
139
+ if (this.value === undefined) {
140
+ this.setValue(newVal, true);
141
+ } else {
142
+ this.$emit('change', newVal);
143
+ }
139
144
  }
140
145
  },
141
146
  defaultQuery: function defaultQuery(newVal, oldVal) {
@@ -434,7 +439,7 @@ var MultiList = {
434
439
  if (value === undefined) {
435
440
  this.setValue(currentValue);
436
441
  } else {
437
- var values = parseValueArray(value, currentValue);
442
+ var values = parseValueArray(value || [], currentValue);
438
443
  this.$emit('change', values);
439
444
  }
440
445
  },
@@ -1,18 +1,18 @@
1
1
  import { Actions, helper } from '@appbaseio/reactivecore';
2
- import { a as _extends, b as _objectWithoutPropertiesLoose, c as _toPropertyKey } from './_rollupPluginBabelHelpers-0f24d612.js';
2
+ import { a as _extends, b as _objectWithoutPropertiesLoose, c as _toPropertyKey } from './_rollupPluginBabelHelpers-ecf6c03c.js';
3
3
  import VueTypes from 'vue-types';
4
4
  import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
5
5
  import 'emotion';
6
6
  import '@appbaseio/vue-emotion';
7
7
  import 'polished';
8
- import { t as types } from './vueTypes-687b2304.js';
8
+ import { t as types } from './vueTypes-9326e0be.js';
9
9
  import '@appbaseio/reactivecore/lib/utils/transform';
10
10
  import 'redux';
11
- import { o as parseValueArray, f as updateCustomQuery, i as isQueryIdentical, c as connect } from './index-cb1950b6.js';
12
- import { C as ComponentWrapper } from './ComponentWrapper-4f85a67e.js';
13
- import { T as Title } from './Title-3522ff56.js';
14
- import { C as Container } from './Container-18b03fde.js';
15
- import { U as UL, C as Checkbox } from './FormControlList-704f8dee.js';
11
+ import { o as parseValueArray, f as updateCustomQuery, i as isQueryIdentical, c as connect } from './index-5daa8276.js';
12
+ import { C as ComponentWrapper } from './ComponentWrapper-bbb717bc.js';
13
+ import { T as Title } from './Title-579f8d6c.js';
14
+ import { C as Container } from './Container-4383c6f0.js';
15
+ import { U as UL, C as Checkbox } from './FormControlList-fe389a2e.js';
16
16
 
17
17
  var updateQuery = Actions.updateQuery,
18
18
  setQueryOptions = Actions.setQueryOptions,
@@ -0,0 +1,172 @@
1
+ import { helper } from '@appbaseio/reactivecore';
2
+ import VueTypes from 'vue-types';
3
+ import { p as pagination, B as Button } from './Button-799185e2.js';
4
+ import { t as types } from './vueTypes-9326e0be.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
+
61
+ if (start <= totalPages) {
62
+ var totalPagesToShow = pages < totalPages ? start + (pages - 1) : totalPages + 1;
63
+
64
+ if (showEndPage) {
65
+ totalPagesToShow = position === 'start' ? start + (Math.ceil(pages / 2) - pages % 2) : totalPages + 1;
66
+ }
67
+
68
+ if (currentPage > totalPages - pages + 2) {
69
+ start = Math.max(2, totalPages - pages + 2);
70
+ totalPagesToShow = start + pages;
71
+ }
72
+
73
+ var _loop = function _loop(i) {
74
+ var activeButton = currentPage === i - 1;
75
+ var classNameBtn = innerClassName || activeButton ? innerClassName + " " + (activeButton ? 'active' : '') : '';
76
+ var pageBtn = h(Button, {
77
+ "class": classNameBtn,
78
+ "attrs": {
79
+ "primary": activeButton,
80
+ "tabIndex": "0",
81
+ "alt": "page-" + i
82
+ },
83
+ "on": {
84
+ "keyPress": function keyPress(event) {
85
+ return handleA11yAction(event, function () {
86
+ return setPage(i - 1);
87
+ });
88
+ },
89
+ "click": function click() {
90
+ return setPage(i - 1);
91
+ }
92
+ }
93
+ }, [i]);
94
+
95
+ if (i <= totalPages + 1) {
96
+ paginationButtons.push(pageBtn);
97
+ }
98
+ };
99
+
100
+ for (var i = start; i < Math.min(totalPages + 1, totalPagesToShow); i += 1) {
101
+ _loop(i);
102
+ }
103
+ }
104
+
105
+ return paginationButtons;
106
+ };
107
+
108
+ var buildIntermediatePaginationDom = function buildIntermediatePaginationDom() {
109
+ var showEndPage = props.showEndPage,
110
+ currentPage = props.currentPage,
111
+ totalPages = props.totalPages,
112
+ pages = props.pages;
113
+ if (!showEndPage) return buildPaginationDOM('start');
114
+
115
+ if (currentPage <= totalPages - pages + 2 || totalPages <= pages) {
116
+ return buildPaginationDOM('start');
117
+ }
118
+
119
+ return null;
120
+ };
121
+
122
+ return h("div", {
123
+ "class": pagination + " " + getClassName(props.innerClass, 'pagination')
124
+ }, [h(Button, {
125
+ "class": getClassName(props.innerClass, 'button') || '',
126
+ "attrs": {
127
+ "disabled": props.currentPage === 0,
128
+ "tabIndex": "0"
129
+ },
130
+ "on": {
131
+ "keyPress": function keyPress(event) {
132
+ return handleA11yAction(event, onPrevPage);
133
+ },
134
+ "click": onPrevPage
135
+ }
136
+ }, [props.prevLabel || 'Prev']), h(Button, {
137
+ "class": className,
138
+ "attrs": {
139
+ "primary": primary,
140
+ "tabIndex": "0"
141
+ },
142
+ "on": {
143
+ "keyPress": function keyPress(event) {
144
+ return handleA11yAction(event, function () {
145
+ return props.setPage(0);
146
+ });
147
+ },
148
+ "click": function click() {
149
+ return props.setPage(0);
150
+ }
151
+ }
152
+ }, ["1"]), props.showEndPage && props.currentPage >= Math.floor(props.pages / 2) + !!(props.pages % 2) ? h("span", ["..."]) : null, buildIntermediatePaginationDom(), props.showEndPage && props.pages > 2 && props.currentPage <= props.totalPages - Math.ceil(props.pages * 0.75) ? h("span", ["..."]) : null, props.showEndPage && props.totalPages >= props.pages && buildPaginationDOM('end'), h(Button, {
153
+ "class": getClassName(props.innerClass, 'button') || '',
154
+ "attrs": {
155
+ "disabled": props.currentPage >= props.totalPages - 1,
156
+ "tabIndex": "0"
157
+ },
158
+ "on": {
159
+ "keyPress": function keyPress(event) {
160
+ return handleA11yAction(event, onNextPage);
161
+ },
162
+ "click": onNextPage
163
+ }
164
+ }, [props.nextLabel || 'Next'])]);
165
+ }
166
+ };
167
+
168
+ Pagination.install = function (Vue) {
169
+ Vue.component(Pagination.name, Pagination);
170
+ };
171
+
172
+ export { Pagination as P };
@@ -1,21 +1,21 @@
1
1
  import { helper } from '@appbaseio/reactivecore';
2
- import { _ as _taggedTemplateLiteralLoose, a as _extends } from './_rollupPluginBabelHelpers-0f24d612.js';
2
+ import { _ as _taggedTemplateLiteralLoose, a as _extends } from './_rollupPluginBabelHelpers-ecf6c03c.js';
3
3
  import VueTypes from 'vue-types';
4
4
  import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
5
5
  import { css } from 'emotion';
6
6
  import styled from '@appbaseio/vue-emotion';
7
7
  import 'polished';
8
- import { t as types } from './vueTypes-687b2304.js';
8
+ import { t as types } from './vueTypes-9326e0be.js';
9
9
  import '@appbaseio/reactivecore/lib/utils/transform';
10
10
  import 'redux';
11
- import { c as connect } from './index-cb1950b6.js';
12
- import { C as ComponentWrapper } from './ComponentWrapper-4f85a67e.js';
13
- import './Title-3522ff56.js';
14
- import { F as Flex } from './Flex-8770345d.js';
15
- import { I as Input } from './Input-08bb1bcf.js';
16
- import { C as Container } from './Container-18b03fde.js';
11
+ import { c as connect } from './index-5daa8276.js';
12
+ import { C as ComponentWrapper } from './ComponentWrapper-bbb717bc.js';
13
+ import './Title-579f8d6c.js';
14
+ import { F as Flex } from './Flex-aac91505.js';
15
+ import { I as Input } from './Input-d8519224.js';
16
+ import { C as Container } from './Container-4383c6f0.js';
17
17
  import 'vue-no-ssr';
18
- import './ssr-a41dfea9.js';
18
+ import './ssr-e3196de1.js';
19
19
  import { RangeConnected as RangeConnected$1 } from './RangeSlider.js';
20
20
 
21
21
  var _templateObject, _templateObject2;
@@ -193,6 +193,10 @@ var RangeInput = {
193
193
  if (this.$props.defaultValue && this.$props.defaultValue.start && this.$props.defaultValue.end) {
194
194
  this.handleChange(this.$props.defaultValue);
195
195
  }
196
+
197
+ if (this.isControlled()) {
198
+ this.handleChange(this.$props.value, 'change');
199
+ }
196
200
  },
197
201
  render: function render() {
198
202
  var h = arguments[0];
@@ -1,17 +1,17 @@
1
1
  import { Actions, helper } from '@appbaseio/reactivecore';
2
- import { a as _extends } from './_rollupPluginBabelHelpers-0f24d612.js';
2
+ import { a as _extends } from './_rollupPluginBabelHelpers-ecf6c03c.js';
3
3
  import VueTypes from 'vue-types';
4
4
  import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
5
5
  import '@appbaseio/vue-emotion';
6
- import { t as types } from './vueTypes-687b2304.js';
6
+ import { t as types } from './vueTypes-9326e0be.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-cb1950b6.js';
10
- import { C as ComponentWrapper } from './ComponentWrapper-4f85a67e.js';
11
- import { T as Title } from './Title-3522ff56.js';
12
- import { C as Container } from './Container-18b03fde.js';
9
+ import { f as updateCustomQuery, i as isQueryIdentical, c as connect } from './index-5daa8276.js';
10
+ import { C as ComponentWrapper } from './ComponentWrapper-bbb717bc.js';
11
+ import { T as Title } from './Title-579f8d6c.js';
12
+ import { C as Container } from './Container-4383c6f0.js';
13
13
  import NoSSR from 'vue-no-ssr';
14
- import { g as getComponents, S as Slider } from './ssr-a41dfea9.js';
14
+ import { g as getComponents, S as Slider } from './ssr-e3196de1.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-0f24d612.js';
2
+ import { _ as _taggedTemplateLiteralLoose, a as _extends } from './_rollupPluginBabelHelpers-ecf6c03c.js';
3
3
  import VueTypes from 'vue-types';
4
4
  import '@appbaseio/reactivecore/lib/utils/constants';
5
5
  import { isEqual as isEqual$1 } from '@appbaseio/reactivecore/lib/utils/helper';
6
6
  import styled from '@appbaseio/vue-emotion';
7
- import { t as types } from './vueTypes-687b2304.js';
7
+ import { t as types } from './vueTypes-9326e0be.js';
8
8
  import 'redux';
9
- import { c as connect, e as composeThemeObject, X as X_SEARCH_CLIENT } from './index-cb1950b6.js';
9
+ import { c as connect, e as composeThemeObject, X as X_SEARCH_CLIENT } from './index-5daa8276.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';