@appbaseio/reactivesearch-vue 1.16.0-alpha.3 → 1.16.0-alpha.32
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 +6388 -5403
- package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js +5 -5
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
- package/dist/cjs/Button-d2f1aeda.js +68 -0
- package/dist/cjs/{DownShift-b09da079.js → CancelSvg-82021d23.js} +60 -16
- package/dist/cjs/Card-4b915733.js +30 -0
- package/dist/cjs/{ComponentWrapper-5a0a8849.js → ComponentWrapper-7302fe1a.js} +40 -21
- package/dist/cjs/{Container-f84e72fc.js → Container-8a08d663.js} +3 -11
- package/dist/cjs/DataSearch.js +341 -391
- package/dist/cjs/{DropDown-c66be1a8.js → DropDown-c46d8b0c.js} +80 -95
- package/dist/cjs/DynamicRangeSlider.js +81 -25
- package/dist/cjs/Flex-699639d2.js +52 -0
- package/dist/cjs/FormControlList-73497794.js +47 -0
- package/dist/cjs/Input-c6f181d5.js +79 -0
- package/dist/cjs/ListItem-933c27e4.js +46 -0
- package/dist/cjs/MultiDropdownList.js +71 -46
- package/dist/cjs/MultiList.js +49 -29
- package/dist/cjs/MultiRange.js +20 -14
- package/dist/cjs/{Pagination-91df3b77.js → Pagination-1b2320a7.js} +4 -3
- package/dist/cjs/RangeInput.js +29 -45
- package/dist/cjs/RangeSlider.js +31 -28
- package/dist/cjs/ReactiveBase.js +55 -34
- package/dist/cjs/ReactiveComponent.js +80 -36
- package/dist/cjs/ReactiveGoogleMap.js +326 -235
- package/dist/cjs/ReactiveList.js +149 -202
- package/dist/cjs/ResultCard.js +8 -6
- package/dist/cjs/ResultList.js +8 -6
- package/dist/cjs/SelectedFilters.js +25 -12
- package/dist/cjs/SingleDropdownList.js +70 -45
- package/dist/cjs/SingleList.js +44 -26
- package/dist/cjs/SingleRange.js +17 -11
- package/dist/cjs/StateProvider.js +11 -7
- package/dist/cjs/{Title-e9beb554.js → Title-39765ee6.js} +3 -11
- package/dist/cjs/ToggleButton.js +35 -16
- package/dist/cjs/{_rollupPluginBabelHelpers-280a574c.js → _rollupPluginBabelHelpers-4abdbfff.js} +11 -1
- package/dist/cjs/{index-e0583d76.js → index-d44a0a21.js} +87 -13
- package/dist/cjs/index.js +23 -19
- package/dist/cjs/initReactivesearch.js +80 -38
- package/dist/cjs/install.js +20 -18
- package/dist/cjs/ssr-c333c82c.js +39 -0
- package/dist/cjs/{utils-d1ea9f95.js → utils-23afb20b.js} +2 -2
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/{vueTypes-c21f265b.js → vueTypes-6de9d2a9.js} +9 -4
- package/dist/es/Button-799185e2.js +59 -0
- package/dist/es/{DownShift-d8f2500f.js → CancelSvg-4d9e0857.js} +56 -17
- package/dist/es/Card-04b3c33e.js +23 -0
- package/dist/es/{ComponentWrapper-d0b21b95.js → ComponentWrapper-bbb717bc.js} +40 -21
- package/dist/es/Container-4383c6f0.js +10 -0
- package/dist/es/DataSearch.js +339 -389
- package/dist/es/{DropDown-5dbd69c2.js → DropDown-4edaa621.js} +79 -94
- package/dist/es/DynamicRangeSlider.js +81 -25
- package/dist/es/Flex-aac91505.js +47 -0
- package/dist/es/FormControlList-fe389a2e.js +40 -0
- package/dist/es/Input-d8519224.js +71 -0
- package/dist/es/ListItem-bdb6d53d.js +39 -0
- package/dist/es/MultiDropdownList.js +71 -46
- package/dist/es/MultiList.js +49 -29
- package/dist/es/MultiRange.js +20 -14
- package/dist/es/{Pagination-800af44f.js → Pagination-b3e4054a.js} +4 -3
- package/dist/es/RangeInput.js +29 -45
- package/dist/es/RangeSlider.js +31 -28
- package/dist/es/ReactiveBase.js +55 -34
- package/dist/es/ReactiveComponent.js +80 -36
- package/dist/es/ReactiveGoogleMap.js +326 -235
- package/dist/es/ReactiveList.js +149 -202
- package/dist/es/ResultCard.js +8 -6
- package/dist/es/ResultList.js +8 -6
- package/dist/es/SelectedFilters.js +25 -12
- package/dist/es/SingleDropdownList.js +70 -45
- package/dist/es/SingleList.js +44 -26
- package/dist/es/SingleRange.js +17 -11
- package/dist/es/StateProvider.js +11 -7
- package/dist/es/Title-579f8d6c.js +10 -0
- package/dist/es/ToggleButton.js +35 -16
- package/dist/es/{_rollupPluginBabelHelpers-c9fbe19f.js → _rollupPluginBabelHelpers-ecf6c03c.js} +11 -1
- package/dist/es/{index-1fe91a0a.js → index-5daa8276.js} +84 -14
- package/dist/es/index.js +23 -19
- package/dist/es/initReactivesearch.js +80 -38
- package/dist/es/install.js +20 -18
- package/dist/es/ssr-e3196de1.js +33 -0
- package/dist/es/{utils-ce3d86fd.js → utils-3a32e13f.js} +2 -2
- package/dist/es/version.js +1 -1
- package/dist/es/{vueTypes-98d938a9.js → vueTypes-9326e0be.js} +9 -4
- package/package.json +86 -78
- package/dist/cjs/Button-78d8bc26.js +0 -146
- package/dist/cjs/Card-b4af314f.js +0 -58
- package/dist/cjs/Flex-737c55be.js +0 -160
- package/dist/cjs/FormControlList-08dfb28e.js +0 -105
- package/dist/cjs/Input-643d02a7.js +0 -178
- package/dist/cjs/ListItem-0c58c5d2.js +0 -84
- package/dist/cjs/ssr-b7a729f9.js +0 -47
- package/dist/es/Button-6c71c66e.js +0 -137
- package/dist/es/Card-ecf70ba1.js +0 -51
- package/dist/es/Container-f5efec9e.js +0 -18
- package/dist/es/Flex-40a74d8a.js +0 -155
- package/dist/es/FormControlList-b96aebef.js +0 -98
- package/dist/es/Input-dfd9dd40.js +0 -170
- package/dist/es/ListItem-da73bc7d.js +0 -77
- package/dist/es/Title-22c2f3bf.js +0 -18
- package/dist/es/ssr-2f57791d.js +0 -41
|
@@ -4,38 +4,49 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
6
6
|
|
|
7
|
-
var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-
|
|
7
|
+
var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-4abdbfff.js');
|
|
8
8
|
var constants = require('@appbaseio/reactivecore/lib/utils/constants');
|
|
9
|
-
var transform = require('@appbaseio/reactivecore/lib/utils/transform');
|
|
10
9
|
var helper = require('@appbaseio/reactivecore/lib/utils/helper');
|
|
10
|
+
var transform = require('@appbaseio/reactivecore/lib/utils/transform');
|
|
11
11
|
var Appbase = _interopDefault(require('appbase-js'));
|
|
12
12
|
var valueReducer = _interopDefault(require('@appbaseio/reactivecore/lib/reducers/valueReducer'));
|
|
13
13
|
var queryReducer = _interopDefault(require('@appbaseio/reactivecore/lib/reducers/queryReducer'));
|
|
14
14
|
var queryOptionsReducer = _interopDefault(require('@appbaseio/reactivecore/lib/reducers/queryOptionsReducer'));
|
|
15
|
+
var compositeAggsReducer = _interopDefault(require('@appbaseio/reactivecore/lib/reducers/compositeAggsReducer'));
|
|
16
|
+
var constants$1 = require('@appbaseio/reactivecore/lib/constants');
|
|
15
17
|
var dependencyTreeReducer = _interopDefault(require('@appbaseio/reactivecore/lib/reducers/dependencyTreeReducer'));
|
|
16
18
|
var fetchGraphQL = _interopDefault(require('@appbaseio/reactivecore/lib/utils/graphQL'));
|
|
17
19
|
var utils = require('@appbaseio/reactivecore/lib/actions/utils');
|
|
18
20
|
|
|
21
|
+
var _excluded = ["aggs", "size"];
|
|
22
|
+
var X_SEARCH_CLIENT = 'ReactiveSearch Vue';
|
|
19
23
|
var componentsWithHighlightQuery = [constants.componentTypes.dataSearch, constants.componentTypes.categorySearch];
|
|
20
24
|
var componentsWithOptions = [constants.componentTypes.reactiveList, constants.componentTypes.reactiveMap, constants.componentTypes.singleList, constants.componentTypes.multiList, constants.componentTypes.tagCloud].concat(componentsWithHighlightQuery);
|
|
21
25
|
var componentsWithoutFilters = [constants.componentTypes.numberBox, constants.componentTypes.ratingsFilter];
|
|
22
26
|
var resultComponents = [constants.componentTypes.reactiveList, constants.componentTypes.reactiveMap];
|
|
23
27
|
|
|
24
28
|
function getValue(state, id, defaultValue) {
|
|
25
|
-
if (
|
|
26
|
-
|
|
27
|
-
if (state[id]) {
|
|
29
|
+
if (state && state[id]) {
|
|
28
30
|
try {
|
|
29
31
|
// parsing for next.js - since it uses extra set of quotes to wrap params
|
|
30
32
|
var parsedValue = JSON.parse(state[id]);
|
|
31
|
-
return
|
|
33
|
+
return {
|
|
34
|
+
value: parsedValue,
|
|
35
|
+
reference: 'URL'
|
|
36
|
+
};
|
|
32
37
|
} catch (error) {
|
|
33
38
|
// using react-dom-server for ssr
|
|
34
|
-
return
|
|
39
|
+
return {
|
|
40
|
+
value: state[id],
|
|
41
|
+
reference: 'URL'
|
|
42
|
+
};
|
|
35
43
|
}
|
|
36
44
|
}
|
|
37
45
|
|
|
38
|
-
return
|
|
46
|
+
return {
|
|
47
|
+
value: defaultValue,
|
|
48
|
+
reference: 'DEFAULT'
|
|
49
|
+
};
|
|
39
50
|
}
|
|
40
51
|
|
|
41
52
|
function parseValue(value, component) {
|
|
@@ -66,6 +77,14 @@ function getQuery(component, value, componentType) {
|
|
|
66
77
|
function initReactivesearch(componentCollection, searchState, settings) {
|
|
67
78
|
return new Promise(function (resolve, reject) {
|
|
68
79
|
var credentials = settings.url && settings.url.trim() !== '' && !settings.credentials ? null : settings.credentials;
|
|
80
|
+
var enableTelemetry = settings.appbaseConfig && settings.appbaseConfig.enableTelemetry !== undefined ? settings.appbaseConfig.enableTelemetry : true;
|
|
81
|
+
|
|
82
|
+
var headers = _rollupPluginBabelHelpers._extends({}, settings.enableAppbase && _rollupPluginBabelHelpers._extends({
|
|
83
|
+
'X-Search-Client': X_SEARCH_CLIENT
|
|
84
|
+
}, enableTelemetry === false && {
|
|
85
|
+
'X-Enable-Telemetry': false
|
|
86
|
+
}), settings.headers);
|
|
87
|
+
|
|
69
88
|
var config = {
|
|
70
89
|
url: settings.url && settings.url.trim() !== '' ? settings.url : 'https://scalr.api.appbase.io',
|
|
71
90
|
app: settings.app,
|
|
@@ -74,7 +93,7 @@ function initReactivesearch(componentCollection, searchState, settings) {
|
|
|
74
93
|
type: settings.type ? settings.type : '*',
|
|
75
94
|
transformResponse: settings.transformResponse || null,
|
|
76
95
|
graphQLUrl: settings.graphQLUrl || '',
|
|
77
|
-
headers:
|
|
96
|
+
headers: headers,
|
|
78
97
|
analyticsConfig: settings.appbaseConfig || null
|
|
79
98
|
};
|
|
80
99
|
var appbaseRef = Appbase(config);
|
|
@@ -91,6 +110,7 @@ function initReactivesearch(componentCollection, searchState, settings) {
|
|
|
91
110
|
var orderOfQueries = [];
|
|
92
111
|
var hits = {};
|
|
93
112
|
var aggregations = {};
|
|
113
|
+
var compositeAggregations = {};
|
|
94
114
|
var state = {};
|
|
95
115
|
var customQueries = {};
|
|
96
116
|
var defaultQueries = {};
|
|
@@ -105,20 +125,15 @@ function initReactivesearch(componentCollection, searchState, settings) {
|
|
|
105
125
|
compProps[key] = component[key];
|
|
106
126
|
}
|
|
107
127
|
});
|
|
108
|
-
var isInternalComponentPresent = false;
|
|
109
|
-
|
|
110
|
-
if (component.customQuery && typeof component.customQuery === 'function') {
|
|
111
|
-
customQueries[component.componentId] = component.customQuery(component.value, compProps);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
if (component.defaultQuery && typeof component.defaultQuery === 'function') {
|
|
115
|
-
defaultQueries[component.componentId] = component.defaultQuery(component.value, compProps);
|
|
116
|
-
}
|
|
117
|
-
|
|
128
|
+
var isInternalComponentPresent = false;
|
|
118
129
|
var isResultComponent = resultComponents.includes(componentType);
|
|
119
130
|
var internalComponent = component.componentId + "__internal";
|
|
120
131
|
var label = component.filterLabel || component.componentId;
|
|
121
|
-
|
|
132
|
+
|
|
133
|
+
var _getValue = getValue(searchState, component.componentId, component.value || component.defaultValue),
|
|
134
|
+
value = _getValue.value,
|
|
135
|
+
reference = _getValue.reference; // [1] set selected values
|
|
136
|
+
|
|
122
137
|
|
|
123
138
|
var showFilter = component.showFilter !== undefined ? component.showFilter : true;
|
|
124
139
|
|
|
@@ -131,9 +146,19 @@ function initReactivesearch(componentCollection, searchState, settings) {
|
|
|
131
146
|
component: component.componentId,
|
|
132
147
|
label: label,
|
|
133
148
|
value: value,
|
|
149
|
+
reference: reference,
|
|
134
150
|
showFilter: showFilter,
|
|
135
151
|
URLParams: component.URLParams || false
|
|
136
|
-
}); //
|
|
152
|
+
}); // Set custom and default queries
|
|
153
|
+
|
|
154
|
+
if (component.customQuery && typeof component.customQuery === 'function') {
|
|
155
|
+
customQueries[component.componentId] = component.customQuery(value, compProps);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
if (component.defaultQuery && typeof component.defaultQuery === 'function') {
|
|
159
|
+
defaultQueries[component.componentId] = component.defaultQuery(value, compProps);
|
|
160
|
+
} // [2] set query options - main component query (valid for result components)
|
|
161
|
+
|
|
137
162
|
|
|
138
163
|
if (componentsWithOptions.includes(componentType)) {
|
|
139
164
|
var options = component.source.generateQueryOptions ? component.source.generateQueryOptions(component) : null;
|
|
@@ -148,7 +173,7 @@ function initReactivesearch(componentCollection, searchState, settings) {
|
|
|
148
173
|
var _ref = options || {},
|
|
149
174
|
aggs = _ref.aggs,
|
|
150
175
|
size = _ref.size,
|
|
151
|
-
otherQueryOptions = _rollupPluginBabelHelpers._objectWithoutPropertiesLoose(_ref,
|
|
176
|
+
otherQueryOptions = _rollupPluginBabelHelpers._objectWithoutPropertiesLoose(_ref, _excluded);
|
|
152
177
|
|
|
153
178
|
if (aggs && Object.keys(aggs).length) {
|
|
154
179
|
isInternalComponentPresent = true; // query should be applied on the internal component
|
|
@@ -169,12 +194,12 @@ function initReactivesearch(componentCollection, searchState, settings) {
|
|
|
169
194
|
if (!otherQueryOptions) otherQueryOptions = {};
|
|
170
195
|
if (!highlightQuery) highlightQuery = {};
|
|
171
196
|
|
|
172
|
-
var mainQueryOptions = _rollupPluginBabelHelpers._extends(
|
|
197
|
+
var mainQueryOptions = _rollupPluginBabelHelpers._extends({}, otherQueryOptions, highlightQuery, {
|
|
173
198
|
size: size
|
|
174
199
|
});
|
|
175
200
|
|
|
176
201
|
if (isInternalComponentPresent) {
|
|
177
|
-
mainQueryOptions = _rollupPluginBabelHelpers._extends(
|
|
202
|
+
mainQueryOptions = _rollupPluginBabelHelpers._extends({}, otherQueryOptions, highlightQuery);
|
|
178
203
|
}
|
|
179
204
|
|
|
180
205
|
if (isResultComponent) {
|
|
@@ -188,7 +213,7 @@ function initReactivesearch(componentCollection, searchState, settings) {
|
|
|
188
213
|
var from = currentPage * resultSize; // Update props for RS API
|
|
189
214
|
|
|
190
215
|
compProps.from = from;
|
|
191
|
-
mainQueryOptions = _rollupPluginBabelHelpers._extends(
|
|
216
|
+
mainQueryOptions = _rollupPluginBabelHelpers._extends({}, mainQueryOptions, highlightQuery, {
|
|
192
217
|
size: resultSize,
|
|
193
218
|
from: from
|
|
194
219
|
});
|
|
@@ -220,7 +245,7 @@ function initReactivesearch(componentCollection, searchState, settings) {
|
|
|
220
245
|
|
|
221
246
|
|
|
222
247
|
if (isResultComponent) {
|
|
223
|
-
var _getQuery = getQuery(component,
|
|
248
|
+
var _getQuery = getQuery(component, value, componentType),
|
|
224
249
|
query = _getQuery.query;
|
|
225
250
|
|
|
226
251
|
queryList = queryReducer(queryList, {
|
|
@@ -273,11 +298,11 @@ function initReactivesearch(componentCollection, searchState, settings) {
|
|
|
273
298
|
|
|
274
299
|
orderOfQueries = [].concat(orderOfQueries, [component.componentId]);
|
|
275
300
|
|
|
276
|
-
var currentQuery = _rollupPluginBabelHelpers._extends(
|
|
301
|
+
var currentQuery = _rollupPluginBabelHelpers._extends({
|
|
277
302
|
query: _rollupPluginBabelHelpers._extends({}, queryObj)
|
|
278
|
-
}, options
|
|
303
|
+
}, options, queryOptions[component.componentId]);
|
|
279
304
|
|
|
280
|
-
queryLog = _rollupPluginBabelHelpers._extends(
|
|
305
|
+
queryLog = _rollupPluginBabelHelpers._extends({}, queryLog, (_extends2 = {}, _extends2[component.componentId] = currentQuery, _extends2));
|
|
281
306
|
|
|
282
307
|
if (settings.enableAppbase) {
|
|
283
308
|
var query = transform.getRSQuery(component.componentId, transform.extractPropsFromState(state, component.componentId, queryOptions && queryOptions[component.componentId] ? {
|
|
@@ -288,11 +313,12 @@ function initReactivesearch(componentCollection, searchState, settings) {
|
|
|
288
313
|
var _extends3;
|
|
289
314
|
|
|
290
315
|
// Apply dependent queries
|
|
291
|
-
appbaseQuery = _rollupPluginBabelHelpers._extends(
|
|
316
|
+
appbaseQuery = _rollupPluginBabelHelpers._extends({}, appbaseQuery, (_extends3 = {}, _extends3[component.componentId] = query, _extends3), transform.getDependentQueries(state, component.componentId, orderOfQueries));
|
|
292
317
|
}
|
|
293
318
|
} else {
|
|
319
|
+
var preference = config && config.analyticsConfig && config.analyticsConfig.userId ? config.analyticsConfig.userId + "_" + component : component;
|
|
294
320
|
finalQuery = [].concat(finalQuery, [{
|
|
295
|
-
preference:
|
|
321
|
+
preference: preference
|
|
296
322
|
}, currentQuery]);
|
|
297
323
|
}
|
|
298
324
|
}
|
|
@@ -318,10 +344,15 @@ function initReactivesearch(componentCollection, searchState, settings) {
|
|
|
318
344
|
if (response.aggregations) {
|
|
319
345
|
var _extends4;
|
|
320
346
|
|
|
321
|
-
aggregations = _rollupPluginBabelHelpers._extends(
|
|
347
|
+
aggregations = _rollupPluginBabelHelpers._extends({}, aggregations, (_extends4 = {}, _extends4[component] = response.aggregations, _extends4));
|
|
348
|
+
compositeAggregations = compositeAggsReducer(compositeAggregations, {
|
|
349
|
+
type: constants$1.UPDATE_COMPOSITE_AGGS,
|
|
350
|
+
aggregations: response.aggregations,
|
|
351
|
+
append: false
|
|
352
|
+
});
|
|
322
353
|
}
|
|
323
354
|
|
|
324
|
-
hits = _rollupPluginBabelHelpers._extends(
|
|
355
|
+
hits = _rollupPluginBabelHelpers._extends({}, hits, (_extends5 = {}, _extends5[component] = {
|
|
325
356
|
hits: response.hits.hits,
|
|
326
357
|
total: typeof response.hits.total === 'object' ? response.hits.total.value : response.hits.total,
|
|
327
358
|
time: response.took
|
|
@@ -333,7 +364,7 @@ function initReactivesearch(componentCollection, searchState, settings) {
|
|
|
333
364
|
});
|
|
334
365
|
});
|
|
335
366
|
Promise.all(allPromises).then(function () {
|
|
336
|
-
state = _rollupPluginBabelHelpers._extends(
|
|
367
|
+
state = _rollupPluginBabelHelpers._extends({}, state, {
|
|
337
368
|
hits: hits,
|
|
338
369
|
aggregations: aggregations
|
|
339
370
|
});
|
|
@@ -345,6 +376,8 @@ function initReactivesearch(componentCollection, searchState, settings) {
|
|
|
345
376
|
var promotedResults = {};
|
|
346
377
|
var rawData = {};
|
|
347
378
|
var customData = {};
|
|
379
|
+
var settingsResponse = {};
|
|
380
|
+
var timestamp = {};
|
|
348
381
|
var allPromises = orderOfQueries.map(function (component) {
|
|
349
382
|
return new Promise(function (responseResolve, responseReject) {
|
|
350
383
|
handleTransformResponse(res[component], component).then(function (response) {
|
|
@@ -353,7 +386,7 @@ function initReactivesearch(componentCollection, searchState, settings) {
|
|
|
353
386
|
|
|
354
387
|
if (response.promoted) {
|
|
355
388
|
promotedResults[component] = response.promoted.map(function (promoted) {
|
|
356
|
-
return _rollupPluginBabelHelpers._extends(
|
|
389
|
+
return _rollupPluginBabelHelpers._extends({}, promoted.doc, {
|
|
357
390
|
_position: promoted.position
|
|
358
391
|
});
|
|
359
392
|
});
|
|
@@ -363,15 +396,21 @@ function initReactivesearch(componentCollection, searchState, settings) {
|
|
|
363
396
|
|
|
364
397
|
if (response.customData) {
|
|
365
398
|
customData[component] = response.customData;
|
|
399
|
+
} // Update settings
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
if (response.settings) {
|
|
403
|
+
settingsResponse[component] = response.settings;
|
|
366
404
|
}
|
|
367
405
|
|
|
368
406
|
if (response.aggregations) {
|
|
369
407
|
var _extends6;
|
|
370
408
|
|
|
371
|
-
aggregations = _rollupPluginBabelHelpers._extends(
|
|
409
|
+
aggregations = _rollupPluginBabelHelpers._extends({}, aggregations, (_extends6 = {}, _extends6[component] = response.aggregations, _extends6));
|
|
372
410
|
}
|
|
373
411
|
|
|
374
|
-
|
|
412
|
+
timestamp[component] = res._timestamp;
|
|
413
|
+
hits = _rollupPluginBabelHelpers._extends({}, hits, (_extends7 = {}, _extends7[component] = {
|
|
375
414
|
hits: response.hits.hits,
|
|
376
415
|
total: typeof response.hits.total === 'object' ? response.hits.total.value : response.hits.total,
|
|
377
416
|
time: response.took
|
|
@@ -384,10 +423,13 @@ function initReactivesearch(componentCollection, searchState, settings) {
|
|
|
384
423
|
});
|
|
385
424
|
});
|
|
386
425
|
Promise.all(allPromises).then(function () {
|
|
387
|
-
state = _rollupPluginBabelHelpers._extends(
|
|
426
|
+
state = _rollupPluginBabelHelpers._extends({}, state, {
|
|
388
427
|
hits: hits,
|
|
428
|
+
timestamp: timestamp,
|
|
389
429
|
aggregations: aggregations,
|
|
430
|
+
compositeAggregations: compositeAggregations,
|
|
390
431
|
promotedResults: promotedResults,
|
|
432
|
+
settings: settingsResponse,
|
|
391
433
|
customData: customData,
|
|
392
434
|
rawData: rawData
|
|
393
435
|
});
|
package/dist/cjs/install.js
CHANGED
|
@@ -3,41 +3,43 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
require('@appbaseio/reactivecore');
|
|
6
|
-
require('./_rollupPluginBabelHelpers-
|
|
6
|
+
require('./_rollupPluginBabelHelpers-4abdbfff.js');
|
|
7
7
|
require('vue-types');
|
|
8
8
|
require('@appbaseio/reactivecore/lib/utils/constants');
|
|
9
|
+
require('@appbaseio/reactivecore/lib/utils/helper');
|
|
9
10
|
require('emotion');
|
|
10
11
|
require('@appbaseio/vue-emotion');
|
|
11
12
|
require('polished');
|
|
12
|
-
require('./Button-
|
|
13
|
-
require('./vueTypes-
|
|
14
|
-
require('./Pagination-
|
|
13
|
+
require('./Button-d2f1aeda.js');
|
|
14
|
+
require('./vueTypes-6de9d2a9.js');
|
|
15
|
+
require('./Pagination-1b2320a7.js');
|
|
15
16
|
var ReactiveList = require('./ReactiveList.js');
|
|
16
17
|
require('@appbaseio/reactivecore/lib/utils/transform');
|
|
17
18
|
require('redux');
|
|
18
|
-
require('./index-
|
|
19
|
-
require('./ComponentWrapper-
|
|
19
|
+
require('./index-d44a0a21.js');
|
|
20
|
+
require('./ComponentWrapper-7302fe1a.js');
|
|
20
21
|
require('@vue/babel-helper-vue-jsx-merge-props');
|
|
21
|
-
require('./Title-
|
|
22
|
-
require('./ListItem-
|
|
23
|
-
require('./Card-
|
|
24
|
-
require('./Flex-
|
|
25
|
-
require('@appbaseio/reactivecore/lib/utils/helper');
|
|
22
|
+
require('./Title-39765ee6.js');
|
|
23
|
+
require('./ListItem-933c27e4.js');
|
|
24
|
+
require('./Card-4b915733.js');
|
|
25
|
+
require('./Flex-699639d2.js');
|
|
26
26
|
require('@appbaseio/reactivecore/lib/actions/analytics');
|
|
27
27
|
require('appbase-js');
|
|
28
28
|
require('url-search-params-polyfill');
|
|
29
29
|
var ReactiveBase = require('./ReactiveBase.js');
|
|
30
|
-
require('
|
|
30
|
+
require('hotkeys-js');
|
|
31
31
|
var DataSearch = require('./DataSearch.js');
|
|
32
|
+
require('./CancelSvg-82021d23.js');
|
|
33
|
+
require('./Input-c6f181d5.js');
|
|
32
34
|
require('compute-scroll-into-view');
|
|
33
|
-
require('./
|
|
34
|
-
require('./Container-f84e72fc.js');
|
|
35
|
+
require('./Container-8a08d663.js');
|
|
35
36
|
require('vue-highlight-words');
|
|
36
|
-
require('
|
|
37
|
-
require('./
|
|
37
|
+
require('@appbaseio/reactivecore/lib/utils/suggestions');
|
|
38
|
+
require('./FormControlList-73497794.js');
|
|
39
|
+
require('./utils-23afb20b.js');
|
|
38
40
|
var SingleList = require('./SingleList.js');
|
|
39
41
|
var MultiList = require('./MultiList.js');
|
|
40
|
-
require('./DropDown-
|
|
42
|
+
require('./DropDown-c46d8b0c.js');
|
|
41
43
|
var SingleDropdownList = require('./SingleDropdownList.js');
|
|
42
44
|
var MultiDropdownList = require('./MultiDropdownList.js');
|
|
43
45
|
var ToggleButton = require('./ToggleButton.js');
|
|
@@ -48,7 +50,7 @@ var MultiRange = require('./MultiRange.js');
|
|
|
48
50
|
var ResultCard = require('./ResultCard.js');
|
|
49
51
|
var ResultList = require('./ResultList.js');
|
|
50
52
|
require('vue-no-ssr');
|
|
51
|
-
require('./ssr-
|
|
53
|
+
require('./ssr-c333c82c.js');
|
|
52
54
|
var RangeSlider = require('./RangeSlider.js');
|
|
53
55
|
var DynamicRangeSlider = require('./DynamicRangeSlider.js');
|
|
54
56
|
var StateProvider = require('./StateProvider.js');
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
4
|
+
|
|
5
|
+
var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-4abdbfff.js');
|
|
6
|
+
var styled = require('@appbaseio/vue-emotion');
|
|
7
|
+
var styled__default = _interopDefault(styled);
|
|
8
|
+
var NoSSR = _interopDefault(require('vue-no-ssr'));
|
|
9
|
+
|
|
10
|
+
var _templateObject;
|
|
11
|
+
var Slider = styled__default('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"])));
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Caution: Please do not change this file without having a discussion with the Team.
|
|
15
|
+
* Any change may break the umd build, we're directly replacing the line no: 14
|
|
16
|
+
* `components['vue-slider-component'] = require('vue-slider-component');` in rollup umd build process with some script.
|
|
17
|
+
*/
|
|
18
|
+
// eslint-disable-next-line
|
|
19
|
+
|
|
20
|
+
var getComponents = function getComponents() {
|
|
21
|
+
var components = {
|
|
22
|
+
NoSSR: NoSSR
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
if (process.browser) {
|
|
26
|
+
try {
|
|
27
|
+
// in older versions of nuxt, it's process.BROWSER_BUILD
|
|
28
|
+
// eslint-disable-next-line
|
|
29
|
+
components['vue-slider-component'] = require('vue-slider-component');
|
|
30
|
+
} catch (e) {
|
|
31
|
+
console.error('Unable to load vue-slider', e);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return components;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
exports.Slider = Slider;
|
|
39
|
+
exports.getComponents = getComponents;
|
|
@@ -4,7 +4,7 @@ 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-
|
|
7
|
+
var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-4abdbfff.js');
|
|
8
8
|
|
|
9
9
|
var getAggsOrder = configureStore.helper.getAggsOrder;
|
|
10
10
|
|
|
@@ -60,7 +60,7 @@ var getAggsQuery = function getAggsQuery(query, props) {
|
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
return _rollupPluginBabelHelpers._extends(
|
|
63
|
+
return _rollupPluginBabelHelpers._extends({}, clonedQuery, extractQuery(props));
|
|
64
64
|
};
|
|
65
65
|
|
|
66
66
|
exports.getAggsQuery = getAggsQuery;
|
package/dist/cjs/version.js
CHANGED
|
@@ -110,20 +110,25 @@ var types = {
|
|
|
110
110
|
unit: VueTypes.oneOf(['mi', 'miles', 'yd', 'yards', 'ft', 'feet', 'in', 'inch', 'km', 'kilometers', 'm', 'meters', 'cm', 'centimeters', 'mm', 'millimeters', 'NM', 'nmi', 'nauticalmiles']),
|
|
111
111
|
value: VueTypes.string.def(undefined),
|
|
112
112
|
analyticsConfig: VueTypes.shape({
|
|
113
|
-
searchStateHeader: VueTypes.bool,
|
|
114
113
|
emptyQuery: VueTypes.bool,
|
|
115
114
|
suggestionAnalytics: VueTypes.bool,
|
|
116
115
|
userId: VueTypes.string,
|
|
117
116
|
customEvents: VueTypes.object
|
|
118
117
|
}),
|
|
119
118
|
appbaseConfig: VueTypes.shape({
|
|
120
|
-
enableQueryRules: VueTypes.bool,
|
|
121
119
|
recordAnalytics: VueTypes.bool,
|
|
122
|
-
searchStateHeader: VueTypes.bool,
|
|
123
120
|
emptyQuery: VueTypes.bool,
|
|
124
121
|
suggestionAnalytics: VueTypes.bool,
|
|
122
|
+
enableQueryRules: VueTypes.bool,
|
|
123
|
+
enableSearchRelevancy: VueTypes.bool,
|
|
125
124
|
userId: VueTypes.string,
|
|
126
|
-
|
|
125
|
+
useCache: VueTypes.bool,
|
|
126
|
+
customEvents: VueTypes.object,
|
|
127
|
+
enableTelemetry: VueTypes.bool.def(true)
|
|
128
|
+
}).def({}),
|
|
129
|
+
mongodb: VueTypes.shape({
|
|
130
|
+
db: VueTypes.string,
|
|
131
|
+
collection: VueTypes.string
|
|
127
132
|
})
|
|
128
133
|
};
|
|
129
134
|
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { _ as _taggedTemplateLiteralLoose } from './_rollupPluginBabelHelpers-ecf6c03c.js';
|
|
2
|
+
import { css } from 'emotion';
|
|
3
|
+
import styled from '@appbaseio/vue-emotion';
|
|
4
|
+
import { darken, rgba, lighten } from 'polished';
|
|
5
|
+
|
|
6
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
|
7
|
+
|
|
8
|
+
var filters = function filters(_ref) {
|
|
9
|
+
var borderColor = _ref.colors.borderColor;
|
|
10
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n\tmargin: 0 -3px;\n\tmax-width: 100%;\n\n\ta {\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');
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
var pagination = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n\tmargin: 10px -3px;\n\tmax-width: 100%;\n\ttext-align: center;\n\n\ta {\n\t\tmargin: 0 3px;\n\t}\n"])));
|
|
14
|
+
var toggleButtons = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n\tmargin: 0 -3px;\n\tmax-width: 100%;\n\n\ta {\n\t\tmargin: 3px 3px;\n\t}\n"])));
|
|
15
|
+
var numberBoxContainer = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n\tmargin: 0 -5px;\n\ta {\n\t\tmargin: 5px;\n\t}\n\tspan {\n\t\tmargin: 0 5px;\n\t}\n"])));
|
|
16
|
+
|
|
17
|
+
var primary = function primary(_ref2) {
|
|
18
|
+
var theme = _ref2.theme;
|
|
19
|
+
return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteralLoose(["\n\tbackground-color: ", ";\n\tcolor: ", ";\n\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: ", ";\n\t}\n"])), theme.colors.primaryColor, theme.colors.primaryTextColor, darken(0.1, theme.colors.primaryColor));
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
var large = function large() {
|
|
23
|
+
return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteralLoose(["\n\tmin-height: 40px;\n\tpadding: 10px 20px;\n"])));
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
var disabled = function disabled(_ref3) {
|
|
27
|
+
var theme = _ref3.theme;
|
|
28
|
+
return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteralLoose(["\n\tbackground-color: ", ";\n\tcolor: #ccc;\n\tcursor: not-allowed;\n\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: ", ";\n\t}\n"])), theme.colors.backgroundColor ? lighten(0.1, theme.colors.backgroundColor) : '#fafafa', theme.colors.backgroundColor ? lighten(0.2, theme.colors.backgroundColor) : '#fafafa');
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
var Button = styled('a')(_templateObject8 || (_templateObject8 = _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"])), function (_ref4) {
|
|
32
|
+
var theme = _ref4.theme;
|
|
33
|
+
return theme.colors.backgroundColor || '#eee';
|
|
34
|
+
}, function (_ref5) {
|
|
35
|
+
var theme = _ref5.theme;
|
|
36
|
+
return theme.colors.textColor;
|
|
37
|
+
}, function (_ref6) {
|
|
38
|
+
var theme = _ref6.theme;
|
|
39
|
+
return theme.colors.backgroundColor ? darken(0.1, theme.colors.backgroundColor) : '#ccc';
|
|
40
|
+
}, function (_ref7) {
|
|
41
|
+
var theme = _ref7.theme;
|
|
42
|
+
return rgba(theme.colors.primaryColor, 0.6);
|
|
43
|
+
}, function (_ref8) {
|
|
44
|
+
var theme = _ref8.theme;
|
|
45
|
+
return "0 0 0 2px " + rgba(theme.colors.primaryColor, 0.3);
|
|
46
|
+
}, function (props) {
|
|
47
|
+
return props.primary ? primary : null;
|
|
48
|
+
}, function (props) {
|
|
49
|
+
return props.disabled ? disabled : null;
|
|
50
|
+
}, function (props) {
|
|
51
|
+
return props.large && large;
|
|
52
|
+
});
|
|
53
|
+
var loadMoreContainer = css({
|
|
54
|
+
margin: '5px 0',
|
|
55
|
+
display: 'flex',
|
|
56
|
+
justifyContent: 'center'
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
export { Button as B, filters as f, loadMoreContainer as l, pagination as p, toggleButtons as t };
|
|
@@ -1,6 +1,33 @@
|
|
|
1
|
-
import { a as _extends } from './_rollupPluginBabelHelpers-
|
|
1
|
+
import { _ as _taggedTemplateLiteralLoose, a as _extends } from './_rollupPluginBabelHelpers-ecf6c03c.js';
|
|
2
|
+
import styled, { css } from '@appbaseio/vue-emotion';
|
|
2
3
|
import computeScrollIntoView from 'compute-scroll-into-view';
|
|
3
4
|
|
|
5
|
+
var _templateObject;
|
|
6
|
+
var InputWrapper = styled('span')(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n flex: 1;\n position: relative;\n"])));
|
|
7
|
+
|
|
8
|
+
var _templateObject$1, _templateObject2, _templateObject3, _templateObject4;
|
|
9
|
+
var IconGroup = styled('div')(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteralLoose(["\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tgrid-gap: 6px;\n\tmargin: 0 10px;\n\theight: 100%;\n\n\t", ";\n\n\t", ";\n"])), function (_ref) {
|
|
10
|
+
var positionType = _ref.positionType;
|
|
11
|
+
|
|
12
|
+
if (positionType === 'absolute') {
|
|
13
|
+
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: 50%;\n\t\t\t\ttransform: translateY(-50%);\n\t\t\t"])));
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return null;
|
|
17
|
+
}, function (_ref2) {
|
|
18
|
+
var groupPosition = _ref2.groupPosition;
|
|
19
|
+
return groupPosition === 'right' ? css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n\t\t\t\t\tright: 0;\n\t\t\t "]))) : css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n\t\t\t\t\tleft: 0;\n\t\t\t "])));
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
var _templateObject$2;
|
|
23
|
+
var IconWrapper = styled('div')(_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteralLoose(["\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tmax-width: 23px;\n\twidth: max-content;\n\tcursor: pointer;\n\theight: 100%;min-width:20px;\n\n\tsvg.search-icon {\n\t\tfill: ", ";\n\t\ttransform:scale(1.5);\n\t}\n\n\tsvg.cancel-icon {\n\t\tfill: ", ";\n\t}\n"])), function (_ref) {
|
|
24
|
+
var theme = _ref.theme;
|
|
25
|
+
return theme.colors.primaryColor;
|
|
26
|
+
}, function (_ref2) {
|
|
27
|
+
var theme = _ref2.theme;
|
|
28
|
+
return theme.colors.borderColor || '#000';
|
|
29
|
+
});
|
|
30
|
+
|
|
4
31
|
/**
|
|
5
32
|
* Scroll node into view if necessary
|
|
6
33
|
* @param {HTMLElement} node the element that should scroll into view
|
|
@@ -36,8 +63,7 @@ var Downshift = {
|
|
|
36
63
|
internal_isOpen: false,
|
|
37
64
|
internal_inputValue: '',
|
|
38
65
|
internal_selectedItem: null,
|
|
39
|
-
internal_highlightedIndex: null
|
|
40
|
-
internal_eventsCalled: {}
|
|
66
|
+
internal_highlightedIndex: null
|
|
41
67
|
};
|
|
42
68
|
},
|
|
43
69
|
computed: {
|
|
@@ -47,7 +73,7 @@ var Downshift = {
|
|
|
47
73
|
return Object.keys(this.$props).reduce(function (state, key) {
|
|
48
74
|
var _extends2;
|
|
49
75
|
|
|
50
|
-
return _extends(
|
|
76
|
+
return _extends({}, state, (_extends2 = {}, _extends2[key] = _this.isControlledProp(key) ? _this.$props[key] : _this["internal_" + key], _extends2));
|
|
51
77
|
}, {});
|
|
52
78
|
},
|
|
53
79
|
internalItemCount: function internalItemCount() {
|
|
@@ -222,23 +248,11 @@ var Downshift = {
|
|
|
222
248
|
}
|
|
223
249
|
|
|
224
250
|
var vm = this;
|
|
225
|
-
setTimeout(function () {
|
|
226
|
-
vm.internal_eventsCalled[index] = false;
|
|
227
|
-
}, 0);
|
|
228
251
|
return {
|
|
229
252
|
mouseenter: function mouseenter() {
|
|
230
253
|
vm.setHighlightedIndex(newIndex);
|
|
231
254
|
},
|
|
232
|
-
// for browsers not supporting click event (e.g. firefox android)
|
|
233
|
-
mousedown: function mousedown(event) {
|
|
234
|
-
if (vm.internal_eventsCalled[index]) return;
|
|
235
|
-
vm.internal_eventsCalled[index] = true;
|
|
236
|
-
event.stopPropagation();
|
|
237
|
-
vm.selectItemAtIndex(newIndex);
|
|
238
|
-
},
|
|
239
255
|
click: function click(event) {
|
|
240
|
-
if (vm.internal_eventsCalled[index]) return;
|
|
241
|
-
vm.internal_eventsCalled[index] = true;
|
|
242
256
|
event.stopPropagation();
|
|
243
257
|
vm.selectItemAtIndex(newIndex);
|
|
244
258
|
}
|
|
@@ -398,4 +412,29 @@ var Downshift = {
|
|
|
398
412
|
}
|
|
399
413
|
};
|
|
400
414
|
|
|
401
|
-
|
|
415
|
+
var CancelSvg = {
|
|
416
|
+
functional: true,
|
|
417
|
+
render: function render(h) {
|
|
418
|
+
return h("svg", {
|
|
419
|
+
"attrs": {
|
|
420
|
+
"alt": "Clear",
|
|
421
|
+
"xmlns": "http://www.w3.org/2000/svg",
|
|
422
|
+
"height": "20px",
|
|
423
|
+
"viewBox": "0 0 24 24",
|
|
424
|
+
"width": "20px"
|
|
425
|
+
},
|
|
426
|
+
"class": "cancel-icon"
|
|
427
|
+
}, [h("title", ["Clear"]), h("path", {
|
|
428
|
+
"attrs": {
|
|
429
|
+
"d": "M0 0h24v24H0V0z",
|
|
430
|
+
"fill": "none"
|
|
431
|
+
}
|
|
432
|
+
}), h("path", {
|
|
433
|
+
"attrs": {
|
|
434
|
+
"d": "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"
|
|
435
|
+
}
|
|
436
|
+
})]);
|
|
437
|
+
}
|
|
438
|
+
};
|
|
439
|
+
|
|
440
|
+
export { CancelSvg as C, Downshift as D, IconWrapper as I, IconGroup as a, InputWrapper as b };
|