@appbaseio/reactivesearch-vue 1.16.0-alpha.58 → 1.16.0-alpha.59

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.
@@ -140,7 +140,7 @@ var SingleRange = {
140
140
  props = this.$props;
141
141
  }
142
142
 
143
- var currentValue = SingleRange.parseValue(value, props);
143
+ var currentValue = typeof value === 'string' ? SingleRange.parseValue(value, props) : value;
144
144
 
145
145
  var performUpdate = function performUpdate() {
146
146
  _this2.currentValue = currentValue;
@@ -9,8 +9,10 @@ var configureStore__default = _interopDefault(configureStore);
9
9
  var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-c705cbe6.js');
10
10
  var VueTypes = _interopDefault(require('vue-types'));
11
11
  require('@appbaseio/reactivecore/lib/utils/constants');
12
+ var transform = require('@appbaseio/reactivecore/lib/utils/transform');
12
13
  require('redux');
13
14
  var index = require('./index-c288153a.js');
15
+ var value = require('@appbaseio/reactivecore/lib/actions/value');
14
16
 
15
17
  var getSearchState = configureStore.helper.getSearchState;
16
18
  var defaultKeys = ['hits', 'value', 'aggregations', 'error'];
@@ -154,13 +156,32 @@ var StateProvider = {
154
156
  if (this.isStateChanged(newVal, oldVal)) {
155
157
  this.searchState = filterByKeys(getSearchState(filterProps(this.searchStateProps)), this.includeKeys);
156
158
  }
159
+ },
160
+ setSearchState: function setSearchState(valuesMap) {
161
+ if (valuesMap === void 0) {
162
+ valuesMap = {};
163
+ }
164
+
165
+ var components = this.components;
166
+ var computedValuesMap = {};
167
+ components.filter(function (component) {
168
+ return !transform.isInternalComponent(component);
169
+ }).forEach(function (component) {
170
+ if (component in valuesMap) {
171
+ computedValuesMap[component] = valuesMap[component];
172
+ } else {
173
+ computedValuesMap[component] = null;
174
+ }
175
+ });
176
+ this.setValues(computedValuesMap);
157
177
  }
158
178
  },
159
179
  render: function render() {
160
180
  var searchState = this.searchState;
161
181
  var dom = this.$scopedSlots["default"];
162
182
  return dom ? dom({
163
- searchState: searchState
183
+ searchState: searchState,
184
+ setSearchState: this.setSearchState
164
185
  }) : null;
165
186
  }
166
187
  };
@@ -178,11 +199,15 @@ var mapStateToProps = function mapStateToProps(state, props) {
178
199
  promotedResults: filterByComponentIds(state.promotedResults, props),
179
200
  customData: filterByComponentIds(state.customData, props),
180
201
  settings: filterByComponentIds(state.settings, props),
181
- rawData: filterByComponentIds(state.rawData, props)
202
+ rawData: filterByComponentIds(state.rawData, props),
203
+ components: filterByComponentIds(state.components, props)
182
204
  };
183
205
  };
184
206
 
185
- var StateProviderConnected = index.connect(mapStateToProps, {})(StateProvider);
207
+ var mapDispatchtoProps = {
208
+ setValues: value.setValues
209
+ };
210
+ var StateProviderConnected = index.connect(mapStateToProps, mapDispatchtoProps)(StateProvider);
186
211
 
187
212
  StateProvider.install = function (Vue) {
188
213
  Vue.component(StateProvider.name, StateProviderConnected);
@@ -33,6 +33,7 @@ var ToggleButton = {
33
33
  name: 'ToggleButton',
34
34
  props: {
35
35
  componentId: vueTypes.types.stringRequired,
36
+ customQuery: vueTypes.types.func,
36
37
  data: vueTypes.types.data,
37
38
  dataField: vueTypes.types.stringRequired,
38
39
  defaultValue: vueTypes.types.any,
package/dist/cjs/index.js CHANGED
@@ -34,7 +34,7 @@ require('./Input-e6603a7e.js');
34
34
  require('compute-scroll-into-view');
35
35
  require('./Container-daf30918.js');
36
36
  require('vue-highlight-words');
37
- var install = require('./install-b494733c.js');
37
+ var install = require('./install-a9aae115.js');
38
38
  require('@appbaseio/reactivecore/lib/utils/suggestions');
39
39
  require('./FormControlList-c195a592.js');
40
40
  require('./utils-d6a52588.js');
@@ -54,6 +54,7 @@ require('vue-no-ssr');
54
54
  require('./ssr-3027b848.js');
55
55
  var RangeSlider = require('./RangeSlider.js');
56
56
  var DynamicRangeSlider = require('./DynamicRangeSlider.js');
57
+ require('@appbaseio/reactivecore/lib/actions/value');
57
58
  var StateProvider = require('./StateProvider.js');
58
59
  require('gmap-vue');
59
60
  require('ngeohash');
@@ -34,7 +34,7 @@ require('./Input-e6603a7e.js');
34
34
  require('compute-scroll-into-view');
35
35
  require('./Container-daf30918.js');
36
36
  require('vue-highlight-words');
37
- var install = require('./install-b494733c.js');
37
+ var install = require('./install-a9aae115.js');
38
38
  require('@appbaseio/reactivecore/lib/utils/suggestions');
39
39
  require('./FormControlList-c195a592.js');
40
40
  require('./utils-d6a52588.js');
@@ -54,6 +54,7 @@ require('vue-no-ssr');
54
54
  require('./ssr-3027b848.js');
55
55
  require('./RangeSlider.js');
56
56
  require('./DynamicRangeSlider.js');
57
+ require('@appbaseio/reactivecore/lib/actions/value');
57
58
  require('./StateProvider.js');
58
59
  require('./RangeInput.js');
59
60
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var version = "1.16.0-alpha.58";
5
+ var version = "1.16.0-alpha.59";
6
6
 
7
7
  exports.default = version;
@@ -133,7 +133,7 @@ var SingleRange = {
133
133
  props = this.$props;
134
134
  }
135
135
 
136
- var currentValue = SingleRange.parseValue(value, props);
136
+ var currentValue = typeof value === 'string' ? SingleRange.parseValue(value, props) : value;
137
137
 
138
138
  var performUpdate = function performUpdate() {
139
139
  _this2.currentValue = currentValue;
@@ -2,8 +2,10 @@ import { helper } from '@appbaseio/reactivecore';
2
2
  import { a as _extends } from './_rollupPluginBabelHelpers-76660dab.js';
3
3
  import VueTypes from 'vue-types';
4
4
  import '@appbaseio/reactivecore/lib/utils/constants';
5
+ import { isInternalComponent } from '@appbaseio/reactivecore/lib/utils/transform';
5
6
  import 'redux';
6
7
  import { c as connect } from './index-3d98f51b.js';
8
+ import { setValues } from '@appbaseio/reactivecore/lib/actions/value';
7
9
 
8
10
  var getSearchState = helper.getSearchState;
9
11
  var defaultKeys = ['hits', 'value', 'aggregations', 'error'];
@@ -147,13 +149,32 @@ var StateProvider = {
147
149
  if (this.isStateChanged(newVal, oldVal)) {
148
150
  this.searchState = filterByKeys(getSearchState(filterProps(this.searchStateProps)), this.includeKeys);
149
151
  }
152
+ },
153
+ setSearchState: function setSearchState(valuesMap) {
154
+ if (valuesMap === void 0) {
155
+ valuesMap = {};
156
+ }
157
+
158
+ var components = this.components;
159
+ var computedValuesMap = {};
160
+ components.filter(function (component) {
161
+ return !isInternalComponent(component);
162
+ }).forEach(function (component) {
163
+ if (component in valuesMap) {
164
+ computedValuesMap[component] = valuesMap[component];
165
+ } else {
166
+ computedValuesMap[component] = null;
167
+ }
168
+ });
169
+ this.setValues(computedValuesMap);
150
170
  }
151
171
  },
152
172
  render: function render() {
153
173
  var searchState = this.searchState;
154
174
  var dom = this.$scopedSlots["default"];
155
175
  return dom ? dom({
156
- searchState: searchState
176
+ searchState: searchState,
177
+ setSearchState: this.setSearchState
157
178
  }) : null;
158
179
  }
159
180
  };
@@ -171,11 +192,15 @@ var mapStateToProps = function mapStateToProps(state, props) {
171
192
  promotedResults: filterByComponentIds(state.promotedResults, props),
172
193
  customData: filterByComponentIds(state.customData, props),
173
194
  settings: filterByComponentIds(state.settings, props),
174
- rawData: filterByComponentIds(state.rawData, props)
195
+ rawData: filterByComponentIds(state.rawData, props),
196
+ components: filterByComponentIds(state.components, props)
175
197
  };
176
198
  };
177
199
 
178
- var StateProviderConnected = connect(mapStateToProps, {})(StateProvider);
200
+ var mapDispatchtoProps = {
201
+ setValues: setValues
202
+ };
203
+ var StateProviderConnected = connect(mapStateToProps, mapDispatchtoProps)(StateProvider);
179
204
 
180
205
  StateProvider.install = function (Vue) {
181
206
  Vue.component(StateProvider.name, StateProviderConnected);
@@ -26,6 +26,7 @@ var ToggleButton = {
26
26
  name: 'ToggleButton',
27
27
  props: {
28
28
  componentId: types.stringRequired,
29
+ customQuery: types.func,
29
30
  data: types.data,
30
31
  dataField: types.stringRequired,
31
32
  defaultValue: types.any,
package/dist/es/index.js CHANGED
@@ -30,8 +30,8 @@ import './Input-7a2a9fac.js';
30
30
  import 'compute-scroll-into-view';
31
31
  import './Container-ba826e96.js';
32
32
  import 'vue-highlight-words';
33
- import { i as install } from './install-cde230d4.js';
34
- export { S as SearchBox, i as install } from './install-cde230d4.js';
33
+ import { i as install } from './install-686dd71d.js';
34
+ export { S as SearchBox, i as install } from './install-686dd71d.js';
35
35
  import '@appbaseio/reactivecore/lib/utils/suggestions';
36
36
  import './FormControlList-c22d64f6.js';
37
37
  import './utils-9e68acee.js';
@@ -51,6 +51,7 @@ import 'vue-no-ssr';
51
51
  import './ssr-b2c0b401.js';
52
52
  export { default as RangeSlider } from './RangeSlider.js';
53
53
  export { default as DynamicRangeSlider } from './DynamicRangeSlider.js';
54
+ import '@appbaseio/reactivecore/lib/actions/value';
54
55
  export { default as StateProvider } from './StateProvider.js';
55
56
  import 'gmap-vue';
56
57
  import 'ngeohash';
@@ -30,7 +30,7 @@ import './Input-7a2a9fac.js';
30
30
  import 'compute-scroll-into-view';
31
31
  import './Container-ba826e96.js';
32
32
  import 'vue-highlight-words';
33
- export { i as default } from './install-cde230d4.js';
33
+ export { i as default } from './install-686dd71d.js';
34
34
  import '@appbaseio/reactivecore/lib/utils/suggestions';
35
35
  import './FormControlList-c22d64f6.js';
36
36
  import './utils-9e68acee.js';
@@ -50,5 +50,6 @@ import 'vue-no-ssr';
50
50
  import './ssr-b2c0b401.js';
51
51
  import './RangeSlider.js';
52
52
  import './DynamicRangeSlider.js';
53
+ import '@appbaseio/reactivecore/lib/actions/value';
53
54
  import './StateProvider.js';
54
55
  import './RangeInput.js';
@@ -1,3 +1,3 @@
1
- var version = "1.16.0-alpha.58";
1
+ var version = "1.16.0-alpha.59";
2
2
 
3
3
  export default version;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appbaseio/reactivesearch-vue",
3
- "version": "1.16.0-alpha.58",
3
+ "version": "1.16.0-alpha.59",
4
4
  "private": false,
5
5
  "main": "dist/cjs/index.js",
6
6
  "jsnext:main": "dist/es/index.js",
@@ -34,7 +34,7 @@
34
34
  ],
35
35
  "sideEffects": false,
36
36
  "dependencies": {
37
- "@appbaseio/reactivecore": "9.14.15",
37
+ "@appbaseio/reactivecore": "9.14.17",
38
38
  "@appbaseio/vue-emotion": "0.4.4",
39
39
  "@vue/babel-helper-vue-jsx-merge-props": "^1.0.0",
40
40
  "appbase-js": "^5.0.0",