@appbaseio/reactivesearch-vue 2.0.0-alpha.4 → 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.
- package/dist/@appbaseio/reactivesearch-vue.umd.js +17538 -25422
- package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js +6 -15
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
- package/dist/cjs/Button-ad042719.js +59 -0
- package/dist/cjs/Card-f5ab024a.js +27 -0
- package/dist/cjs/{ComponentWrapper-ad3dad02.js → ComponentWrapper-75f88599.js} +42 -56
- package/dist/cjs/Container-29f049b2.js +12 -0
- package/dist/cjs/DropDown-6cf84c47.js +698 -0
- package/dist/cjs/DynamicRangeSlider.js +103 -155
- package/dist/cjs/Flex-d5675ea6.js +48 -0
- package/dist/cjs/FormControlList-fadd792f.js +42 -0
- package/dist/cjs/Input-4b434436.js +74 -0
- package/dist/cjs/ListItem-d57d648d.js +42 -0
- package/dist/cjs/MultiDropdownList.js +124 -240
- package/dist/cjs/MultiList.js +123 -261
- package/dist/cjs/MultiRange.js +87 -133
- package/dist/cjs/{Pagination-71e85fa9.js → Pagination-b5ddc906.js} +70 -83
- package/dist/cjs/PreferencesConsumer-eb265924.js +75 -0
- package/dist/cjs/RangeInput.js +163 -171
- package/dist/cjs/RangeSlider.js +81 -109
- package/dist/cjs/ReactiveBase.js +139 -157
- package/dist/cjs/ReactiveComponent-eb8db4c1.js +2189 -0
- package/dist/cjs/ReactiveComponent.js +46 -340
- package/dist/cjs/ReactiveGoogleMap.js +445 -655
- package/dist/cjs/ReactiveList.js +179 -304
- package/dist/cjs/ResultCard.js +36 -36
- package/dist/cjs/ResultList.js +48 -56
- package/dist/cjs/SelectedFilters.js +62 -69
- package/dist/cjs/SingleDropdownList.js +117 -177
- package/dist/cjs/SingleList.js +121 -205
- package/dist/cjs/SingleRange.js +78 -105
- package/dist/cjs/StateProvider.js +35 -38
- package/dist/cjs/Title-8802a218.js +12 -0
- package/dist/cjs/ToggleButton.js +72 -119
- package/dist/cjs/{_rollupPluginBabelHelpers-c705cbe6.js → _rollupPluginBabelHelpers-f8b843f8.js} +0 -15
- package/dist/cjs/{index-6a167fe0.js → index-d8d8f291.js} +38 -108
- package/dist/cjs/index.js +44 -41
- package/dist/cjs/initReactivesearch.js +63 -150
- package/dist/cjs/install.js +47 -43
- package/dist/cjs/ssr-6907ada3.js +66 -0
- package/dist/cjs/{utils-d6a52588.js → utils-83fd01e9.js} +7 -16
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/{vueTypes-727b7c63.js → vueTypes-1bf00978.js} +8 -19
- package/dist/es/Button-474510e3.js +53 -0
- package/dist/es/{Card-450683f1.js → Card-38cbe652.js} +3 -3
- package/dist/es/{ComponentWrapper-424e86fd.js → ComponentWrapper-5166c76a.js} +42 -56
- package/dist/es/{Container-ba826e96.js → Container-d00219f7.js} +2 -2
- package/dist/es/DropDown-8764360c.js +688 -0
- package/dist/es/DynamicRangeSlider.js +103 -155
- package/dist/es/Flex-a08e22d7.js +46 -0
- package/dist/es/FormControlList-fe6eaee4.js +38 -0
- package/dist/es/Input-4a8ef1f3.js +69 -0
- package/dist/es/{ListItem-cad14c5e.js → ListItem-16756c02.js} +7 -8
- package/dist/es/MultiDropdownList.js +124 -240
- package/dist/es/MultiList.js +123 -261
- package/dist/es/MultiRange.js +87 -133
- package/dist/es/{Pagination-784bf143.js → Pagination-72bd1d9e.js} +70 -83
- package/dist/es/PreferencesConsumer-c276709c.js +73 -0
- package/dist/es/RangeInput.js +163 -170
- package/dist/es/RangeSlider.js +81 -109
- package/dist/es/ReactiveBase.js +138 -155
- package/dist/es/ReactiveComponent-f9fa5780.js +2183 -0
- package/dist/es/ReactiveComponent.js +42 -337
- package/dist/es/ReactiveGoogleMap.js +440 -649
- package/dist/es/ReactiveList.js +177 -301
- package/dist/es/ResultCard.js +36 -36
- package/dist/es/ResultList.js +48 -56
- package/dist/es/SelectedFilters.js +62 -69
- package/dist/es/SingleDropdownList.js +117 -177
- package/dist/es/SingleList.js +121 -205
- package/dist/es/SingleRange.js +78 -105
- package/dist/es/StateProvider.js +36 -39
- package/dist/es/{Title-3342664a.js → Title-863dfa42.js} +2 -2
- package/dist/es/ToggleButton.js +72 -119
- package/dist/es/{_rollupPluginBabelHelpers-76660dab.js → _rollupPluginBabelHelpers-ded08042.js} +0 -15
- package/dist/es/{index-7788a843.js → index-4520a598.js} +39 -107
- package/dist/es/index.js +30 -32
- package/dist/es/initReactivesearch.js +63 -150
- package/dist/es/install.js +49 -41
- package/dist/es/{ssr-b2c0b401.js → ssr-af398f0c.js} +36 -7
- package/dist/es/{utils-9e68acee.js → utils-9e5a16a1.js} +7 -16
- package/dist/es/version.js +1 -1
- package/dist/es/{vueTypes-b8146772.js → vueTypes-f1923c72.js} +8 -19
- package/package.json +10 -9
- package/dist/cjs/Button-446f819e.js +0 -68
- package/dist/cjs/CancelSvg-9f258f4f.js +0 -449
- package/dist/cjs/Card-642547a8.js +0 -30
- package/dist/cjs/Container-daf30918.js +0 -15
- package/dist/cjs/DataSearch-aa04dc6e.js +0 -2352
- package/dist/cjs/DataSearch.js +0 -30
- package/dist/cjs/DropDown-c479bbb0.js +0 -328
- package/dist/cjs/Flex-aa517a13.js +0 -52
- package/dist/cjs/FormControlList-c195a592.js +0 -47
- package/dist/cjs/Input-e6603a7e.js +0 -79
- package/dist/cjs/ListItem-8c9e0d68.js +0 -46
- package/dist/cjs/Title-1de7d0f4.js +0 -15
- package/dist/cjs/install-b97dbac4.js +0 -1409
- package/dist/cjs/ssr-3027b848.js +0 -39
- package/dist/es/Button-d8bc15ea.js +0 -59
- package/dist/es/CancelSvg-4cfae5fd.js +0 -440
- package/dist/es/DataSearch-b86a6675.js +0 -2337
- package/dist/es/DataSearch.js +0 -22
- package/dist/es/DropDown-05a644a5.js +0 -322
- package/dist/es/Flex-1f0795c3.js +0 -47
- package/dist/es/FormControlList-c22d64f6.js +0 -40
- package/dist/es/Input-7a2a9fac.js +0 -71
- package/dist/es/install-ac8a1edb.js +0 -1402
|
@@ -1,75 +1,62 @@
|
|
|
1
1
|
import { helper } from '@appbaseio/reactivecore';
|
|
2
|
-
import { a as _extends } from './_rollupPluginBabelHelpers-76660dab.js';
|
|
3
2
|
import { validProps } from '@appbaseio/reactivecore/lib/utils/constants';
|
|
3
|
+
import { a as _extends } from './_rollupPluginBabelHelpers-ded08042.js';
|
|
4
4
|
import { bindActionCreators } from 'redux';
|
|
5
5
|
|
|
6
6
|
// Credit to React-Redux for this util function
|
|
7
7
|
// https://github.com/reactjs/react-redux/blob/573db0bfc8d1d50fdb6e2a98bd8a7d4675fecf11/src/utils/shallowEqual.js
|
|
8
|
-
var hasOwn = Object.prototype.hasOwnProperty;
|
|
9
8
|
|
|
9
|
+
var hasOwn = Object.prototype.hasOwnProperty;
|
|
10
10
|
function is(x, y) {
|
|
11
11
|
if (x === y) {
|
|
12
12
|
return x !== 0 || y !== 0 || 1 / x === 1 / y;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
}
|
|
14
|
+
// eslint-disable-next-line
|
|
16
15
|
return x !== x && y !== y;
|
|
17
16
|
}
|
|
18
|
-
|
|
19
17
|
function shallowEqual(objA, objB) {
|
|
20
18
|
if (is(objA, objB)) return true;
|
|
21
|
-
|
|
22
19
|
if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
|
|
23
20
|
return false;
|
|
24
21
|
}
|
|
25
|
-
|
|
26
22
|
var keysA = Object.keys(objA);
|
|
27
23
|
var keysB = Object.keys(objB);
|
|
28
24
|
if (keysA.length !== keysB.length) return false;
|
|
29
|
-
|
|
30
25
|
for (var i = 0; i < keysA.length; i += 1) {
|
|
31
26
|
if (!hasOwn.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {
|
|
32
27
|
return false;
|
|
33
28
|
}
|
|
34
29
|
}
|
|
35
|
-
|
|
36
30
|
return true;
|
|
37
31
|
}
|
|
38
32
|
|
|
39
33
|
var defaultMapState = function defaultMapState() {
|
|
40
34
|
return {};
|
|
41
35
|
};
|
|
42
|
-
|
|
43
36
|
var defaultMapDispatch = {};
|
|
44
|
-
|
|
45
37
|
var normalizeMapState = function normalizeMapState(mapState) {
|
|
46
38
|
if (typeof mapState === 'function') return mapState;
|
|
47
|
-
|
|
48
39
|
if (mapState === Object(mapState)) {
|
|
49
40
|
return function (state, ownProps) {
|
|
50
41
|
return Object.keys(mapState).filter(function (key) {
|
|
51
42
|
return typeof mapState[key] === 'function';
|
|
52
43
|
}).reduce(function (map, key) {
|
|
53
44
|
var _extends2;
|
|
54
|
-
|
|
55
45
|
return _extends({}, map, (_extends2 = {}, _extends2[key] = mapState[key](state, ownProps), _extends2));
|
|
56
46
|
}, {});
|
|
57
47
|
};
|
|
58
48
|
}
|
|
59
|
-
|
|
60
49
|
throw new Error('[revux] - mapState provided to connect is invalid');
|
|
61
|
-
};
|
|
62
|
-
|
|
50
|
+
};
|
|
63
51
|
|
|
52
|
+
// eslint-disable-next-line
|
|
64
53
|
var connector = function connector(_mapState, mapDispatch) {
|
|
65
54
|
if (_mapState === void 0) {
|
|
66
55
|
_mapState = defaultMapState;
|
|
67
56
|
}
|
|
68
|
-
|
|
69
57
|
if (mapDispatch === void 0) {
|
|
70
58
|
mapDispatch = defaultMapDispatch;
|
|
71
59
|
}
|
|
72
|
-
|
|
73
60
|
return function (component) {
|
|
74
61
|
var mapState = normalizeMapState(_mapState);
|
|
75
62
|
return {
|
|
@@ -78,25 +65,20 @@ var connector = function connector(_mapState, mapDispatch) {
|
|
|
78
65
|
inject: ['$$store'],
|
|
79
66
|
data: function data() {
|
|
80
67
|
var merged = _extends({}, mapState(this.$$store.getState(), this.$props || {}), bindActionCreators(mapDispatch, this.$$store.dispatch));
|
|
81
|
-
|
|
82
68
|
return Object.keys(merged).reduce(function (data, key) {
|
|
83
69
|
var _extends3;
|
|
84
|
-
|
|
85
70
|
return _extends({}, data, (_extends3 = {}, _extends3[key] = merged[key], _extends3));
|
|
86
71
|
}, {});
|
|
87
72
|
},
|
|
88
73
|
created: function created() {
|
|
89
74
|
var _this = this;
|
|
90
|
-
|
|
91
75
|
var getMappedState = function getMappedState(state) {
|
|
92
76
|
return mapState(state, _this.$props || {});
|
|
93
77
|
};
|
|
94
|
-
|
|
95
78
|
var observeStore = function observeStore(store, select, onChange) {
|
|
96
79
|
var currentState = select(store.getState());
|
|
97
80
|
return store.subscribe(function () {
|
|
98
81
|
var nextState = select(store.getState());
|
|
99
|
-
|
|
100
82
|
if (!shallowEqual(currentState, nextState)) {
|
|
101
83
|
var previousState = currentState;
|
|
102
84
|
currentState = nextState;
|
|
@@ -104,14 +86,13 @@ var connector = function connector(_mapState, mapDispatch) {
|
|
|
104
86
|
}
|
|
105
87
|
});
|
|
106
88
|
};
|
|
107
|
-
|
|
108
89
|
this._unsubscribe = observeStore(this.$$store, getMappedState, function (newState) {
|
|
109
90
|
Object.keys(newState).forEach(function (key) {
|
|
110
|
-
_this
|
|
91
|
+
_this[key] = newState[key];
|
|
111
92
|
});
|
|
112
93
|
});
|
|
113
94
|
},
|
|
114
|
-
|
|
95
|
+
beforeUnmount: function beforeUnmount() {
|
|
115
96
|
this._unsubscribe();
|
|
116
97
|
}
|
|
117
98
|
};
|
|
@@ -119,13 +100,16 @@ var connector = function connector(_mapState, mapDispatch) {
|
|
|
119
100
|
};
|
|
120
101
|
|
|
121
102
|
var defaultQueryUtil = helper.updateDefaultQuery,
|
|
122
|
-
|
|
123
|
-
|
|
103
|
+
customQueryUtil = helper.updateCustomQuery,
|
|
104
|
+
isEqual = helper.isEqual;
|
|
105
|
+
|
|
106
|
+
// TODO
|
|
124
107
|
// import { storeKey } from '@appbaseio/reactivecore';
|
|
125
108
|
|
|
126
109
|
var connect = function connect() {
|
|
127
110
|
return connector.apply(void 0, arguments);
|
|
128
|
-
};
|
|
111
|
+
};
|
|
112
|
+
// connectToStore(...args, null, {
|
|
129
113
|
// storeKey,
|
|
130
114
|
// });
|
|
131
115
|
|
|
@@ -134,11 +118,9 @@ var composeThemeObject = function composeThemeObject(ownTheme, userTheme) {
|
|
|
134
118
|
if (ownTheme === void 0) {
|
|
135
119
|
ownTheme = {};
|
|
136
120
|
}
|
|
137
|
-
|
|
138
121
|
if (userTheme === void 0) {
|
|
139
122
|
userTheme = {};
|
|
140
123
|
}
|
|
141
|
-
|
|
142
124
|
return {
|
|
143
125
|
typography: _extends({}, ownTheme.typography, userTheme.typography),
|
|
144
126
|
colors: _extends({}, ownTheme.colors, userTheme.colors),
|
|
@@ -149,14 +131,13 @@ var composeThemeObject = function composeThemeObject(ownTheme, userTheme) {
|
|
|
149
131
|
* To determine wether an element is a function
|
|
150
132
|
* @param {any} element
|
|
151
133
|
*/
|
|
152
|
-
|
|
153
134
|
var isFunction = function isFunction(element) {
|
|
154
135
|
return typeof element === 'function';
|
|
155
|
-
};
|
|
136
|
+
};
|
|
156
137
|
|
|
138
|
+
// parses current array (i.e. this.$props.value) for `onChange` callback for multi-* components
|
|
157
139
|
function parseValueArray(objectValues, currentValue) {
|
|
158
140
|
var selectedValues;
|
|
159
|
-
|
|
160
141
|
if (Array.isArray(objectValues)) {
|
|
161
142
|
selectedValues = [].concat(objectValues);
|
|
162
143
|
} else {
|
|
@@ -165,33 +146,28 @@ function parseValueArray(objectValues, currentValue) {
|
|
|
165
146
|
return objectValues[key] ? key : null;
|
|
166
147
|
});
|
|
167
148
|
}
|
|
168
|
-
|
|
169
149
|
if (selectedValues.includes(currentValue)) {
|
|
170
150
|
return selectedValues.filter(function (item) {
|
|
171
151
|
return item !== currentValue;
|
|
172
152
|
});
|
|
173
153
|
}
|
|
174
|
-
|
|
175
154
|
return [].concat(selectedValues, [currentValue]);
|
|
176
155
|
}
|
|
156
|
+
|
|
177
157
|
/**
|
|
178
158
|
* Extracts the render prop from props or slot and returns a valid JSX element
|
|
179
159
|
* @param {Object} data
|
|
180
160
|
* @param _ref
|
|
181
161
|
*/
|
|
182
|
-
|
|
183
162
|
var getComponent = function getComponent(data, _ref) {
|
|
184
163
|
if (data === void 0) {
|
|
185
164
|
data = {};
|
|
186
165
|
}
|
|
187
|
-
|
|
188
166
|
if (_ref === void 0) {
|
|
189
167
|
_ref = {};
|
|
190
168
|
}
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
render = _ref2.render;
|
|
194
|
-
|
|
169
|
+
var _ref2 = _ref.$slots || _ref.$props,
|
|
170
|
+
render = _ref2.render;
|
|
195
171
|
if (render) return render(data);
|
|
196
172
|
return null;
|
|
197
173
|
};
|
|
@@ -199,22 +175,18 @@ var getComponent = function getComponent(data, _ref) {
|
|
|
199
175
|
* To determine whether a component has render prop or slot defined or not
|
|
200
176
|
* @returns {Boolean}
|
|
201
177
|
*/
|
|
202
|
-
|
|
203
178
|
var hasCustomRenderer = function hasCustomRenderer(_ref) {
|
|
204
179
|
if (_ref === void 0) {
|
|
205
180
|
_ref = {};
|
|
206
181
|
}
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
render = _ref3.render;
|
|
210
|
-
|
|
182
|
+
var _ref3 = _ref.$slots || _ref.$props,
|
|
183
|
+
render = _ref3.render;
|
|
211
184
|
return Boolean(render);
|
|
212
185
|
};
|
|
213
186
|
var getValidPropsKeys = function getValidPropsKeys(props) {
|
|
214
187
|
if (props === void 0) {
|
|
215
188
|
props = {};
|
|
216
189
|
}
|
|
217
|
-
|
|
218
190
|
return Object.keys(props).filter(function (i) {
|
|
219
191
|
return validProps.includes(i);
|
|
220
192
|
});
|
|
@@ -232,72 +204,32 @@ var updateCustomQuery = function updateCustomQuery(componentId, setCustomQuery,
|
|
|
232
204
|
setCustomQuery: setCustomQuery
|
|
233
205
|
}), value);
|
|
234
206
|
};
|
|
207
|
+
|
|
235
208
|
/**
|
|
236
209
|
* @param {Function} newVal
|
|
237
210
|
* @param {Function} oldVal
|
|
238
211
|
* @param {any} value
|
|
239
212
|
* @param {Object} props
|
|
240
213
|
*/
|
|
241
|
-
|
|
242
214
|
var isQueryIdentical = function isQueryIdentical(newVal, oldVal, value, props) {
|
|
243
|
-
if (typeof newVal !== 'function' || typeof oldVal !== 'function') return true;
|
|
244
|
-
|
|
215
|
+
if (typeof newVal !== 'function' || typeof oldVal !== 'function') return true;
|
|
216
|
+
// to not call original defaultQuery and customQuery, as here we are only comparing
|
|
245
217
|
return isEqual(oldVal(value, props), newVal(value, props));
|
|
246
218
|
};
|
|
247
|
-
/**
|
|
248
|
-
* Extracts the renderPopularSuggestions prop from props or slot and returns a valid JSX element
|
|
249
|
-
* @param {Object} data
|
|
250
|
-
* @param _ref
|
|
251
|
-
*/
|
|
252
|
-
|
|
253
|
-
var getQuerySuggestionsComponent = function getQuerySuggestionsComponent(data, _ref) {
|
|
254
|
-
if (data === void 0) {
|
|
255
|
-
data = {};
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
if (_ref === void 0) {
|
|
259
|
-
_ref = {};
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
var _ref4 = _ref.$scopedSlots || _ref.$props,
|
|
263
|
-
renderQuerySuggestions = _ref4.renderQuerySuggestions,
|
|
264
|
-
renderPopularSuggestions = _ref4.renderPopularSuggestions;
|
|
265
|
-
|
|
266
|
-
var render = renderPopularSuggestions || renderQuerySuggestions;
|
|
267
|
-
if (render) return render(data);
|
|
268
|
-
return null;
|
|
269
|
-
};
|
|
270
|
-
/**
|
|
271
|
-
* To determine whether a component has renderQuerySuggestions prop or slot defined or not
|
|
272
|
-
* @returns {Boolean}
|
|
273
|
-
*/
|
|
274
219
|
|
|
275
|
-
var hasQuerySuggestionsRenderer = function hasQuerySuggestionsRenderer(_ref) {
|
|
276
|
-
if (_ref === void 0) {
|
|
277
|
-
_ref = {};
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
var _ref5 = _ref.$scopedSlots || _ref.$props,
|
|
281
|
-
renderQuerySuggestions = _ref5.renderQuerySuggestions,
|
|
282
|
-
renderPopularSuggestions = _ref5.renderPopularSuggestions;
|
|
283
|
-
|
|
284
|
-
return Boolean(renderPopularSuggestions) || Boolean(renderQuerySuggestions);
|
|
285
|
-
};
|
|
286
220
|
/**
|
|
287
221
|
* To get the camel case string from kebab case
|
|
288
222
|
* @returns {string}
|
|
289
223
|
*/
|
|
290
|
-
|
|
291
224
|
var getCamelCase = function getCamelCase(str) {
|
|
292
225
|
if (str === void 0) {
|
|
293
226
|
str = '';
|
|
294
227
|
}
|
|
295
|
-
|
|
296
228
|
var arr = str.split('-');
|
|
297
229
|
var capital = arr.map(function (item, index) {
|
|
298
230
|
return index ? item.charAt(0).toUpperCase() + item.slice(1).toLowerCase() : item;
|
|
299
|
-
});
|
|
300
|
-
|
|
231
|
+
});
|
|
232
|
+
// ^-- change here.
|
|
301
233
|
var capitalString = capital.join('');
|
|
302
234
|
return capitalString || '';
|
|
303
235
|
};
|
|
@@ -306,22 +238,25 @@ var isEmpty = function isEmpty(val) {
|
|
|
306
238
|
};
|
|
307
239
|
function isNumeric(value) {
|
|
308
240
|
return /^-?\d+$/.test(value);
|
|
309
|
-
}
|
|
241
|
+
}
|
|
310
242
|
|
|
243
|
+
// check if passed shortcut a key combination
|
|
311
244
|
function isHotkeyCombination(hotkey) {
|
|
312
245
|
return typeof hotkey === 'string' && hotkey.indexOf('+') !== -1;
|
|
313
|
-
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
// used for getting correct string char from keycode passed
|
|
314
249
|
// the below algebraic expression is used to get the correct ascii code out of the e.which || e.keycode returned value
|
|
315
250
|
// since the keyboards doesn't understand ascii but scan codes and they differ for certain keys such as '/'
|
|
316
251
|
// stackoverflow ref: https://stackoverflow.com/a/29811987/10822996
|
|
317
|
-
|
|
318
252
|
function getCharFromCharCode(passedCharCode) {
|
|
319
253
|
var which = passedCharCode;
|
|
320
254
|
var chrCode = which - 48 * Math.floor(which / 48);
|
|
321
255
|
return String.fromCharCode(which >= 96 ? chrCode : which);
|
|
322
|
-
}
|
|
323
|
-
// returns focusShortcuts containing appropriate key charsas depicted on keyboards
|
|
256
|
+
}
|
|
324
257
|
|
|
258
|
+
// used for parsing focusshortcuts for keycodes passed as string, eg: 'ctrl+/' is same as 'ctrl+47'
|
|
259
|
+
// returns focusShortcuts containing appropriate key charsas depicted on keyboards
|
|
325
260
|
function parseFocusShortcuts(focusShortcutsArray) {
|
|
326
261
|
if (isEmpty(focusShortcutsArray)) return [];
|
|
327
262
|
var parsedFocusShortcutsArray = [];
|
|
@@ -330,10 +265,9 @@ function parseFocusShortcuts(focusShortcutsArray) {
|
|
|
330
265
|
if (isHotkeyCombination(element)) {
|
|
331
266
|
// splitting the combination into pieces
|
|
332
267
|
var splitCombination = element.split('+');
|
|
333
|
-
var parsedSplitCombination = [];
|
|
334
|
-
|
|
268
|
+
var parsedSplitCombination = [];
|
|
269
|
+
// parsedCombination would have all the keycodes converted into chars
|
|
335
270
|
var parsedCombination = '';
|
|
336
|
-
|
|
337
271
|
for (var i = 0; i < splitCombination.length; i += 1) {
|
|
338
272
|
if (isNumeric(splitCombination[i])) {
|
|
339
273
|
parsedSplitCombination.push(getCharFromCharCode(+splitCombination[i]));
|
|
@@ -341,7 +275,6 @@ function parseFocusShortcuts(focusShortcutsArray) {
|
|
|
341
275
|
parsedSplitCombination.push(splitCombination[i]);
|
|
342
276
|
}
|
|
343
277
|
}
|
|
344
|
-
|
|
345
278
|
parsedCombination = parsedSplitCombination.join('+');
|
|
346
279
|
parsedFocusShortcutsArray.push(parsedCombination);
|
|
347
280
|
} else if (isNumeric(element)) {
|
|
@@ -357,8 +290,9 @@ function parseFocusShortcuts(focusShortcutsArray) {
|
|
|
357
290
|
});
|
|
358
291
|
return parsedFocusShortcutsArray;
|
|
359
292
|
}
|
|
360
|
-
var MODIFIER_KEYS = ['shift', 'ctrl', 'alt', 'control', 'option', 'cmd', 'command'];
|
|
293
|
+
var MODIFIER_KEYS = ['shift', 'ctrl', 'alt', 'control', 'option', 'cmd', 'command'];
|
|
361
294
|
|
|
295
|
+
// filter out modifierkeys such as ctrl, alt, command, shift from focusShortcuts prop
|
|
362
296
|
function extractModifierKeysFromFocusShortcuts(focusShortcutsArray) {
|
|
363
297
|
return focusShortcutsArray.filter(function (shortcutKey) {
|
|
364
298
|
return MODIFIER_KEYS.includes(shortcutKey);
|
|
@@ -368,12 +302,10 @@ function decodeHtml(str) {
|
|
|
368
302
|
if (typeof str !== 'string') {
|
|
369
303
|
return str;
|
|
370
304
|
}
|
|
371
|
-
|
|
372
305
|
return str.replace(/&#([0-9]{1,3});/gi, function (match, numStr) {
|
|
373
306
|
var num = parseInt(numStr, 10); // read num as normal number
|
|
374
|
-
|
|
375
307
|
return String.fromCharCode(num);
|
|
376
308
|
});
|
|
377
309
|
}
|
|
378
310
|
|
|
379
|
-
export { X_SEARCH_CLIENT as X, isFunction as a, getCamelCase as b, connect as c, getValidPropsKeys as d, composeThemeObject as e,
|
|
311
|
+
export { X_SEARCH_CLIENT as X, isFunction as a, getCamelCase as b, connect as c, getValidPropsKeys as d, composeThemeObject as e, decodeHtml as f, getComponent as g, hasCustomRenderer as h, isQueryIdentical as i, updateCustomQuery as j, isEmpty as k, extractModifierKeysFromFocusShortcuts as l, isEvent as m, parseValueArray as n, parseFocusShortcuts as p, updateDefaultQuery as u };
|
package/dist/es/index.js
CHANGED
|
@@ -1,59 +1,57 @@
|
|
|
1
1
|
import '@appbaseio/reactivecore';
|
|
2
|
-
|
|
2
|
+
export { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
|
|
3
|
+
import '@vue/babel-helper-vue-transform-on';
|
|
4
|
+
import './_rollupPluginBabelHelpers-ded08042.js';
|
|
5
|
+
import 'vue';
|
|
3
6
|
import 'vue-types';
|
|
4
|
-
import '@appbaseio/reactivecore/lib/utils/constants';
|
|
5
7
|
import '@appbaseio/reactivecore/lib/utils/helper';
|
|
6
|
-
import 'emotion';
|
|
7
8
|
import '@appbaseio/vue-emotion';
|
|
9
|
+
import 'emotion';
|
|
8
10
|
import 'polished';
|
|
9
|
-
import './Button-
|
|
10
|
-
import './vueTypes-
|
|
11
|
-
import './Pagination-
|
|
11
|
+
import './Button-474510e3.js';
|
|
12
|
+
import './vueTypes-f1923c72.js';
|
|
13
|
+
import './Pagination-72bd1d9e.js';
|
|
12
14
|
export { default as ReactiveList } from './ReactiveList.js';
|
|
13
15
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
14
16
|
import 'redux';
|
|
15
|
-
import './index-
|
|
16
|
-
import './ComponentWrapper-
|
|
17
|
-
import '
|
|
18
|
-
import './Title-
|
|
19
|
-
import './ListItem-
|
|
20
|
-
import './Card-
|
|
21
|
-
import './Flex-
|
|
17
|
+
import './index-4520a598.js';
|
|
18
|
+
import './ComponentWrapper-5166c76a.js';
|
|
19
|
+
import './PreferencesConsumer-c276709c.js';
|
|
20
|
+
import './Title-863dfa42.js';
|
|
21
|
+
import './ListItem-16756c02.js';
|
|
22
|
+
import './Card-38cbe652.js';
|
|
23
|
+
import './Flex-a08e22d7.js';
|
|
22
24
|
import '@appbaseio/reactivecore/lib/actions/analytics';
|
|
23
25
|
import 'appbase-js';
|
|
26
|
+
import '@appbaseio/analytics';
|
|
24
27
|
import 'url-search-params-polyfill';
|
|
25
28
|
export { default as ReactiveBase } from './ReactiveBase.js';
|
|
26
29
|
import 'hotkeys-js';
|
|
27
|
-
export {
|
|
28
|
-
import './
|
|
29
|
-
import './Input-
|
|
30
|
+
export { R as ReactiveComponent, S as SearchBox } from './ReactiveComponent-f9fa5780.js';
|
|
31
|
+
import './DropDown-8764360c.js';
|
|
32
|
+
import './Input-4a8ef1f3.js';
|
|
30
33
|
import 'compute-scroll-into-view';
|
|
31
|
-
import './Container-
|
|
34
|
+
import './Container-d00219f7.js';
|
|
32
35
|
import 'vue-highlight-words';
|
|
33
|
-
import { i as install } from './install-ac8a1edb.js';
|
|
34
|
-
export { S as SearchBox, i as install } from './install-ac8a1edb.js';
|
|
35
36
|
import '@appbaseio/reactivecore/lib/utils/suggestions';
|
|
36
|
-
import './FormControlList-
|
|
37
|
-
import './utils-
|
|
37
|
+
import './FormControlList-fe6eaee4.js';
|
|
38
|
+
import './utils-9e5a16a1.js';
|
|
38
39
|
export { default as SingleList } from './SingleList.js';
|
|
39
40
|
export { default as MultiList } from './MultiList.js';
|
|
40
|
-
import './DropDown-05a644a5.js';
|
|
41
41
|
export { default as SingleDropdownList } from './SingleDropdownList.js';
|
|
42
42
|
export { default as MultiDropdownList } from './MultiDropdownList.js';
|
|
43
43
|
export { default as ToggleButton } from './ToggleButton.js';
|
|
44
|
-
|
|
45
|
-
export { default as
|
|
44
|
+
import './ssr-af398f0c.js';
|
|
45
|
+
export { default as DynamicRangeSlider } from './DynamicRangeSlider.js';
|
|
46
46
|
export { default as SingleRange } from './SingleRange.js';
|
|
47
47
|
export { default as MultiRange } from './MultiRange.js';
|
|
48
|
+
export { default as RangeSlider } from './RangeSlider.js';
|
|
49
|
+
export { default as RangeInput } from './RangeInput.js';
|
|
50
|
+
export { default as SelectedFilters } from './SelectedFilters.js';
|
|
48
51
|
export { default as ResultCard } from './ResultCard.js';
|
|
49
52
|
export { default as ResultList } from './ResultList.js';
|
|
50
|
-
import 'vue-no-ssr';
|
|
51
|
-
import './ssr-b2c0b401.js';
|
|
52
|
-
export { default as RangeSlider } from './RangeSlider.js';
|
|
53
|
-
export { default as DynamicRangeSlider } from './DynamicRangeSlider.js';
|
|
54
|
-
import '@appbaseio/reactivecore/lib/actions/value';
|
|
55
53
|
export { default as StateProvider } from './StateProvider.js';
|
|
56
|
-
import '
|
|
54
|
+
import 'vue-google-maps-community-fork';
|
|
57
55
|
import 'ngeohash';
|
|
58
56
|
export { default as ReactiveGoogleMap } from './ReactiveGoogleMap.js';
|
|
59
57
|
import '@appbaseio/reactivecore/lib/reducers/valueReducer';
|
|
@@ -67,10 +65,10 @@ import '@appbaseio/reactivecore/lib/actions/utils';
|
|
|
67
65
|
export { default as initReactivesearch } from './initReactivesearch.js';
|
|
68
66
|
import version from './version.js';
|
|
69
67
|
export { default as version } from './version.js';
|
|
70
|
-
|
|
68
|
+
import install from './install.js';
|
|
69
|
+
export { default as install } from './install.js';
|
|
71
70
|
|
|
72
71
|
// Add polyfills to support in IE
|
|
73
|
-
|
|
74
72
|
if (typeof window !== 'undefined' && window.Vue) {
|
|
75
73
|
install(window.Vue);
|
|
76
74
|
}
|