@appbaseio/reactivesearch-vue 1.16.0-alpha.25 → 1.16.0-alpha.29
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 +562 -194
- 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/{DownShift-d41f2442.js → CancelSvg-b14dd012.js} +57 -0
- package/dist/cjs/DataSearch.js +29 -80
- package/dist/cjs/{DropDown-d3c78c41.js → DropDown-dc042720.js} +60 -23
- package/dist/cjs/DynamicRangeSlider.js +1 -1
- package/dist/cjs/MultiDropdownList.js +12 -5
- package/dist/cjs/MultiList.js +4 -3
- package/dist/cjs/MultiRange.js +1 -1
- package/dist/cjs/{Pagination-d4dbfd5a.js → Pagination-0b9ec0fc.js} +1 -1
- package/dist/cjs/RangeInput.js +1 -1
- package/dist/cjs/RangeSlider.js +1 -1
- package/dist/cjs/ReactiveBase.js +17 -9
- package/dist/cjs/ReactiveComponent.js +12 -12
- package/dist/cjs/ReactiveGoogleMap.js +2 -2
- package/dist/cjs/ReactiveList.js +55 -43
- package/dist/cjs/ResultCard.js +1 -1
- package/dist/cjs/ResultList.js +1 -1
- package/dist/cjs/SelectedFilters.js +1 -1
- package/dist/cjs/SingleDropdownList.js +12 -5
- package/dist/cjs/SingleList.js +5 -4
- package/dist/cjs/SingleRange.js +1 -1
- package/dist/cjs/StateProvider.js +6 -2
- package/dist/cjs/ToggleButton.js +2 -2
- package/dist/cjs/index.js +7 -4
- package/dist/cjs/initReactivesearch.js +31 -12
- package/dist/cjs/install.js +5 -4
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/{vueTypes-409348b0.js → vueTypes-829a5f2c.js} +5 -1
- package/dist/es/{DownShift-e7ccf2a7.js → CancelSvg-282ae799.js} +54 -2
- package/dist/es/DataSearch.js +19 -70
- package/dist/es/{DropDown-8894cc22.js → DropDown-d9686568.js} +59 -22
- package/dist/es/DynamicRangeSlider.js +1 -1
- package/dist/es/MultiDropdownList.js +12 -5
- package/dist/es/MultiList.js +4 -3
- package/dist/es/MultiRange.js +1 -1
- package/dist/es/{Pagination-a2ab7fcb.js → Pagination-e8216949.js} +1 -1
- package/dist/es/RangeInput.js +1 -1
- package/dist/es/RangeSlider.js +1 -1
- package/dist/es/ReactiveBase.js +17 -9
- package/dist/es/ReactiveComponent.js +12 -12
- package/dist/es/ReactiveGoogleMap.js +2 -2
- package/dist/es/ReactiveList.js +55 -43
- package/dist/es/ResultCard.js +1 -1
- package/dist/es/ResultList.js +1 -1
- package/dist/es/SelectedFilters.js +1 -1
- package/dist/es/SingleDropdownList.js +12 -5
- package/dist/es/SingleList.js +5 -4
- package/dist/es/SingleRange.js +1 -1
- package/dist/es/StateProvider.js +6 -2
- package/dist/es/ToggleButton.js +2 -2
- package/dist/es/index.js +7 -4
- package/dist/es/initReactivesearch.js +31 -12
- package/dist/es/install.js +5 -4
- package/dist/es/version.js +1 -1
- package/dist/es/{vueTypes-a9b9d5c9.js → vueTypes-98819a12.js} +5 -1
- package/package.json +3 -3
|
@@ -12,6 +12,8 @@ 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');
|
|
@@ -108,6 +110,7 @@ function initReactivesearch(componentCollection, searchState, settings) {
|
|
|
108
110
|
var orderOfQueries = [];
|
|
109
111
|
var hits = {};
|
|
110
112
|
var aggregations = {};
|
|
113
|
+
var compositeAggregations = {};
|
|
111
114
|
var state = {};
|
|
112
115
|
var customQueries = {};
|
|
113
116
|
var defaultQueries = {};
|
|
@@ -122,16 +125,7 @@ function initReactivesearch(componentCollection, searchState, settings) {
|
|
|
122
125
|
compProps[key] = component[key];
|
|
123
126
|
}
|
|
124
127
|
});
|
|
125
|
-
var isInternalComponentPresent = false;
|
|
126
|
-
|
|
127
|
-
if (component.customQuery && typeof component.customQuery === 'function') {
|
|
128
|
-
customQueries[component.componentId] = component.customQuery(component.value, compProps);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
if (component.defaultQuery && typeof component.defaultQuery === 'function') {
|
|
132
|
-
defaultQueries[component.componentId] = component.defaultQuery(component.value, compProps);
|
|
133
|
-
}
|
|
134
|
-
|
|
128
|
+
var isInternalComponentPresent = false;
|
|
135
129
|
var isResultComponent = resultComponents.includes(componentType);
|
|
136
130
|
var internalComponent = component.componentId + "__internal";
|
|
137
131
|
var label = component.filterLabel || component.componentId;
|
|
@@ -155,7 +149,16 @@ function initReactivesearch(componentCollection, searchState, settings) {
|
|
|
155
149
|
reference: reference,
|
|
156
150
|
showFilter: showFilter,
|
|
157
151
|
URLParams: component.URLParams || false
|
|
158
|
-
}); //
|
|
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
|
+
|
|
159
162
|
|
|
160
163
|
if (componentsWithOptions.includes(componentType)) {
|
|
161
164
|
var options = component.source.generateQueryOptions ? component.source.generateQueryOptions(component) : null;
|
|
@@ -242,7 +245,7 @@ function initReactivesearch(componentCollection, searchState, settings) {
|
|
|
242
245
|
|
|
243
246
|
|
|
244
247
|
if (isResultComponent) {
|
|
245
|
-
var _getQuery = getQuery(component,
|
|
248
|
+
var _getQuery = getQuery(component, value, componentType),
|
|
246
249
|
query = _getQuery.query;
|
|
247
250
|
|
|
248
251
|
queryList = queryReducer(queryList, {
|
|
@@ -342,6 +345,11 @@ function initReactivesearch(componentCollection, searchState, settings) {
|
|
|
342
345
|
var _extends4;
|
|
343
346
|
|
|
344
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
|
+
});
|
|
345
353
|
}
|
|
346
354
|
|
|
347
355
|
hits = _rollupPluginBabelHelpers._extends({}, hits, (_extends5 = {}, _extends5[component] = {
|
|
@@ -368,6 +376,8 @@ function initReactivesearch(componentCollection, searchState, settings) {
|
|
|
368
376
|
var promotedResults = {};
|
|
369
377
|
var rawData = {};
|
|
370
378
|
var customData = {};
|
|
379
|
+
var settingsResponse = {};
|
|
380
|
+
var timestamp = {};
|
|
371
381
|
var allPromises = orderOfQueries.map(function (component) {
|
|
372
382
|
return new Promise(function (responseResolve, responseReject) {
|
|
373
383
|
handleTransformResponse(res[component], component).then(function (response) {
|
|
@@ -386,6 +396,11 @@ function initReactivesearch(componentCollection, searchState, settings) {
|
|
|
386
396
|
|
|
387
397
|
if (response.customData) {
|
|
388
398
|
customData[component] = response.customData;
|
|
399
|
+
} // Update settings
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
if (response.settings) {
|
|
403
|
+
settingsResponse[component] = response.settings;
|
|
389
404
|
}
|
|
390
405
|
|
|
391
406
|
if (response.aggregations) {
|
|
@@ -394,6 +409,7 @@ function initReactivesearch(componentCollection, searchState, settings) {
|
|
|
394
409
|
aggregations = _rollupPluginBabelHelpers._extends({}, aggregations, (_extends6 = {}, _extends6[component] = response.aggregations, _extends6));
|
|
395
410
|
}
|
|
396
411
|
|
|
412
|
+
timestamp[component] = res._timestamp;
|
|
397
413
|
hits = _rollupPluginBabelHelpers._extends({}, hits, (_extends7 = {}, _extends7[component] = {
|
|
398
414
|
hits: response.hits.hits,
|
|
399
415
|
total: typeof response.hits.total === 'object' ? response.hits.total.value : response.hits.total,
|
|
@@ -409,8 +425,11 @@ function initReactivesearch(componentCollection, searchState, settings) {
|
|
|
409
425
|
Promise.all(allPromises).then(function () {
|
|
410
426
|
state = _rollupPluginBabelHelpers._extends({}, state, {
|
|
411
427
|
hits: hits,
|
|
428
|
+
timestamp: timestamp,
|
|
412
429
|
aggregations: aggregations,
|
|
430
|
+
compositeAggregations: compositeAggregations,
|
|
413
431
|
promotedResults: promotedResults,
|
|
432
|
+
settings: settingsResponse,
|
|
414
433
|
customData: customData,
|
|
415
434
|
rawData: rawData
|
|
416
435
|
});
|
package/dist/cjs/install.js
CHANGED
|
@@ -11,8 +11,8 @@ require('emotion');
|
|
|
11
11
|
require('@appbaseio/vue-emotion');
|
|
12
12
|
require('polished');
|
|
13
13
|
require('./Button-d2f1aeda.js');
|
|
14
|
-
require('./vueTypes-
|
|
15
|
-
require('./Pagination-
|
|
14
|
+
require('./vueTypes-829a5f2c.js');
|
|
15
|
+
require('./Pagination-0b9ec0fc.js');
|
|
16
16
|
var ReactiveList = require('./ReactiveList.js');
|
|
17
17
|
require('@appbaseio/reactivecore/lib/utils/transform');
|
|
18
18
|
require('redux');
|
|
@@ -29,16 +29,17 @@ require('url-search-params-polyfill');
|
|
|
29
29
|
var ReactiveBase = require('./ReactiveBase.js');
|
|
30
30
|
require('hotkeys-js');
|
|
31
31
|
var DataSearch = require('./DataSearch.js');
|
|
32
|
+
require('./CancelSvg-b14dd012.js');
|
|
32
33
|
require('./Input-c6f181d5.js');
|
|
33
34
|
require('compute-scroll-into-view');
|
|
34
|
-
require('./DownShift-d41f2442.js');
|
|
35
35
|
require('./Container-8a08d663.js');
|
|
36
36
|
require('vue-highlight-words');
|
|
37
|
+
require('@appbaseio/reactivecore/lib/utils/suggestions');
|
|
37
38
|
require('./FormControlList-73497794.js');
|
|
38
39
|
require('./utils-23afb20b.js');
|
|
39
40
|
var SingleList = require('./SingleList.js');
|
|
40
41
|
var MultiList = require('./MultiList.js');
|
|
41
|
-
require('./DropDown-
|
|
42
|
+
require('./DropDown-dc042720.js');
|
|
42
43
|
var SingleDropdownList = require('./SingleDropdownList.js');
|
|
43
44
|
var MultiDropdownList = require('./MultiDropdownList.js');
|
|
44
45
|
var ToggleButton = require('./ToggleButton.js');
|
package/dist/cjs/version.js
CHANGED
|
@@ -125,7 +125,11 @@ var types = {
|
|
|
125
125
|
userId: VueTypes.string,
|
|
126
126
|
customEvents: VueTypes.object,
|
|
127
127
|
enableTelemetry: VueTypes.bool.def(true)
|
|
128
|
-
}).def({})
|
|
128
|
+
}).def({}),
|
|
129
|
+
mongodb: VueTypes.shape({
|
|
130
|
+
db: VueTypes.string,
|
|
131
|
+
collection: VueTypes.string
|
|
132
|
+
})
|
|
129
133
|
};
|
|
130
134
|
|
|
131
135
|
exports.types = types;
|
|
@@ -1,6 +1,33 @@
|
|
|
1
|
-
import { a as _extends } from './_rollupPluginBabelHelpers-ecf6c03c.js';
|
|
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
|
|
@@ -398,4 +425,29 @@ var Downshift = {
|
|
|
398
425
|
}
|
|
399
426
|
};
|
|
400
427
|
|
|
401
|
-
|
|
428
|
+
var CancelSvg = {
|
|
429
|
+
functional: true,
|
|
430
|
+
render: function render(h) {
|
|
431
|
+
return h("svg", {
|
|
432
|
+
"attrs": {
|
|
433
|
+
"alt": "Clear",
|
|
434
|
+
"xmlns": "http://www.w3.org/2000/svg",
|
|
435
|
+
"height": "20px",
|
|
436
|
+
"viewBox": "0 0 24 24",
|
|
437
|
+
"width": "20px"
|
|
438
|
+
},
|
|
439
|
+
"class": "cancel-icon"
|
|
440
|
+
}, [h("title", ["Clear"]), h("path", {
|
|
441
|
+
"attrs": {
|
|
442
|
+
"d": "M0 0h24v24H0V0z",
|
|
443
|
+
"fill": "none"
|
|
444
|
+
}
|
|
445
|
+
}), h("path", {
|
|
446
|
+
"attrs": {
|
|
447
|
+
"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"
|
|
448
|
+
}
|
|
449
|
+
})]);
|
|
450
|
+
}
|
|
451
|
+
};
|
|
452
|
+
|
|
453
|
+
export { CancelSvg as C, Downshift as D, IconWrapper as I, IconGroup as a, InputWrapper as b };
|
package/dist/es/DataSearch.js
CHANGED
|
@@ -6,7 +6,7 @@ import { getQueryOptions } from '@appbaseio/reactivecore/lib/utils/helper';
|
|
|
6
6
|
import 'emotion';
|
|
7
7
|
import styled, { css, cx, injectGlobal } from '@appbaseio/vue-emotion';
|
|
8
8
|
import 'polished';
|
|
9
|
-
import { t as types } from './vueTypes-
|
|
9
|
+
import { t as types } from './vueTypes-98819a12.js';
|
|
10
10
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
11
11
|
import 'redux';
|
|
12
12
|
import { g as getComponent, h as hasCustomRenderer, f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, j as getQuerySuggestionsComponent, a as isFunction, k as isEmpty, p as parseFocusShortcuts, l as extractModifierKeysFromFocusShortcuts, m as hasQuerySuggestionsRenderer, c as connect } from './index-4755c9a0.js';
|
|
@@ -14,9 +14,9 @@ import { C as ComponentWrapper } from './ComponentWrapper-459505fd.js';
|
|
|
14
14
|
import { T as Title } from './Title-579f8d6c.js';
|
|
15
15
|
import { F as Flex } from './Flex-aac91505.js';
|
|
16
16
|
import hotkeys from 'hotkeys-js';
|
|
17
|
+
import { I as IconWrapper, C as CancelSvg, a as IconGroup, D as Downshift, b as InputWrapper } from './CancelSvg-282ae799.js';
|
|
17
18
|
import { n as noSuggestions, s as suggestionsContainer, I as Input, a as suggestions } from './Input-d8519224.js';
|
|
18
19
|
import 'compute-scroll-into-view';
|
|
19
|
-
import { D as Downshift } from './DownShift-e7ccf2a7.js';
|
|
20
20
|
import { C as Container } from './Container-4383c6f0.js';
|
|
21
21
|
import Highlight from 'vue-highlight-words';
|
|
22
22
|
|
|
@@ -27,37 +27,11 @@ InputGroup.defaultProps = {
|
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
var _templateObject$1;
|
|
30
|
-
var
|
|
31
|
-
|
|
32
|
-
var _templateObject$2;
|
|
33
|
-
var InputAddon = styled('span')(_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: #fafafa;\n border: 1px solid #ccc;\n border-radius: 2px;\n color: rgba(0, 0, 0, 0.85);\n font-size: 14px;\n font-weight: 400;\n padding: 0 11px;\n position: relative;\n transition: all 0.3s;\n box-sizing: border-box;\n overflow: hidden;\n\n &:first-of-type {\n border-right: none;\n }\n &:last-of-type {\n border-left: none;\n }\n"])));
|
|
30
|
+
var InputAddon = styled('span')(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: #fafafa;\n border: 1px solid #ccc;\n border-radius: 2px;\n color: rgba(0, 0, 0, 0.85);\n font-size: 14px;\n font-weight: 400;\n padding: 0 11px;\n position: relative;\n transition: all 0.3s;\n box-sizing: border-box;\n overflow: hidden;\n\n &:first-of-type {\n border-right: none;\n }\n &:last-of-type {\n border-left: none;\n }\n"])));
|
|
34
31
|
InputAddon.defaultProps = {
|
|
35
32
|
className: 'input-addon'
|
|
36
33
|
};
|
|
37
34
|
|
|
38
|
-
var _templateObject$3, _templateObject2, _templateObject3, _templateObject4;
|
|
39
|
-
var IconGroup = styled('div')(_templateObject$3 || (_templateObject$3 = _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) {
|
|
40
|
-
var positionType = _ref.positionType;
|
|
41
|
-
|
|
42
|
-
if (positionType === 'absolute') {
|
|
43
|
-
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"])));
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
return null;
|
|
47
|
-
}, function (_ref2) {
|
|
48
|
-
var groupPosition = _ref2.groupPosition;
|
|
49
|
-
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 "])));
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
var _templateObject$4;
|
|
53
|
-
var IconWrapper = styled('div')(_templateObject$4 || (_templateObject$4 = _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) {
|
|
54
|
-
var theme = _ref.theme;
|
|
55
|
-
return theme.colors.primaryColor;
|
|
56
|
-
}, function (_ref2) {
|
|
57
|
-
var theme = _ref2.theme;
|
|
58
|
-
return theme.colors.borderColor || '#000';
|
|
59
|
-
});
|
|
60
|
-
|
|
61
35
|
var getClassName = helper.getClassName;
|
|
62
36
|
var SuggestionWrapper = {
|
|
63
37
|
name: 'SuggestionWrapper',
|
|
@@ -78,14 +52,14 @@ var SuggestionWrapper = {
|
|
|
78
52
|
}
|
|
79
53
|
};
|
|
80
54
|
|
|
81
|
-
var _templateObject$
|
|
55
|
+
var _templateObject$2;
|
|
82
56
|
var highlightStyle = {
|
|
83
57
|
fontWeight: 600,
|
|
84
58
|
padding: 0,
|
|
85
59
|
backgroundColor: 'transparent',
|
|
86
60
|
color: 'inherit'
|
|
87
61
|
};
|
|
88
|
-
var PredictiveSuggestion = styled('span')(_templateObject$
|
|
62
|
+
var PredictiveSuggestion = styled('span')(_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteralLoose(["\n\t.highlight {\n\t\tbackground: transparent;\n\t\tcolor: inherit;\n\t\tfont-weight: 600;\n\t\tpadding: 0;\n\t}\n"])));
|
|
89
63
|
var SuggestionItem = {
|
|
90
64
|
name: 'SuggestionItem',
|
|
91
65
|
props: {
|
|
@@ -200,34 +174,9 @@ var SearchSvg = {
|
|
|
200
174
|
}
|
|
201
175
|
};
|
|
202
176
|
|
|
203
|
-
var
|
|
204
|
-
functional: true,
|
|
205
|
-
render: function render(h) {
|
|
206
|
-
return h("svg", {
|
|
207
|
-
"attrs": {
|
|
208
|
-
"alt": "Clear",
|
|
209
|
-
"xmlns": "http://www.w3.org/2000/svg",
|
|
210
|
-
"height": "20px",
|
|
211
|
-
"viewBox": "0 0 24 24",
|
|
212
|
-
"width": "20px"
|
|
213
|
-
},
|
|
214
|
-
"class": "cancel-icon"
|
|
215
|
-
}, [h("title", ["Clear"]), h("path", {
|
|
216
|
-
"attrs": {
|
|
217
|
-
"d": "M0 0h24v24H0V0z",
|
|
218
|
-
"fill": "none"
|
|
219
|
-
}
|
|
220
|
-
}), h("path", {
|
|
221
|
-
"attrs": {
|
|
222
|
-
"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"
|
|
223
|
-
}
|
|
224
|
-
})]);
|
|
225
|
-
}
|
|
226
|
-
};
|
|
177
|
+
var _templateObject$3;
|
|
227
178
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
injectGlobal(_templateObject$6 || (_templateObject$6 = _taggedTemplateLiteralLoose(["\n\t#el_TvxDfTAtKp {\n\t\tstroke: none;\n\t\tstroke-width: 1;\n\t\tfill: none;\n\t}\n\t#el_D93PK3GbmJ {\n\t\t-webkit-transform: translate(163px, 131px);\n\t\ttransform: translate(163px, 131px);\n\t\tfill: #d8d8d8;\n\t}\n"])));
|
|
179
|
+
injectGlobal(_templateObject$3 || (_templateObject$3 = _taggedTemplateLiteralLoose(["\n\t#el_TvxDfTAtKp {\n\t\tstroke: none;\n\t\tstroke-width: 1;\n\t\tfill: none;\n\t}\n\t#el_D93PK3GbmJ {\n\t\t-webkit-transform: translate(163px, 131px);\n\t\ttransform: translate(163px, 131px);\n\t\tfill: #d8d8d8;\n\t}\n"])));
|
|
231
180
|
var MicSvg = {
|
|
232
181
|
name: 'MicSvg',
|
|
233
182
|
props: ['className'],
|
|
@@ -272,9 +221,9 @@ var MicSvg = {
|
|
|
272
221
|
}
|
|
273
222
|
};
|
|
274
223
|
|
|
275
|
-
var _templateObject$
|
|
224
|
+
var _templateObject$4;
|
|
276
225
|
|
|
277
|
-
injectGlobal(_templateObject$
|
|
226
|
+
injectGlobal(_templateObject$4 || (_templateObject$4 = _taggedTemplateLiteralLoose(["\n\t#el_X81iT9kZYo {\n\t\tstroke: none;\n\t\tstroke-width: 1;\n\t\tfill: none;\n\t}\n\t#el_gMpyalCphp {\n\t\t-webkit-transform: translate(163px, 131px);\n\t\ttransform: translate(163px, 131px);\n\t}\n\t#el_c7H-3u-D4l {\n\t\tfill: #d8d8d8;\n\t}\n\t#el_qhFcdAAFwo {\n\t\tfill: #d8d8d8;\n\t}\n\t#el_M8X8g37WOI {\n\t\tstroke: #e83137;\n\t\tstroke-width: 21;\n\t}\n"])));
|
|
278
227
|
var MuteSvg = {
|
|
279
228
|
name: 'MuteSvg',
|
|
280
229
|
props: ['className'],
|
|
@@ -330,9 +279,9 @@ var MuteSvg = {
|
|
|
330
279
|
}
|
|
331
280
|
};
|
|
332
281
|
|
|
333
|
-
var _templateObject$
|
|
282
|
+
var _templateObject$5;
|
|
334
283
|
|
|
335
|
-
injectGlobal(_templateObject$
|
|
284
|
+
injectGlobal(_templateObject$5 || (_templateObject$5 = _taggedTemplateLiteralLoose(["\n\t@-webkit-keyframes kf_el_6WKby7wXqV_an_qqO-rxbNc {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t}\n\t\t13.89% {\n\t\t\topacity: 1;\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\t@keyframes kf_el_6WKby7wXqV_an_qqO-rxbNc {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t}\n\t\t13.89% {\n\t\t\topacity: 1;\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\t@-webkit-keyframes kf_el_Wi-my975tM_an_XhXP1epXB {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t}\n\t\t27.78% {\n\t\t\topacity: 1;\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\t@keyframes kf_el_Wi-my975tM_an_XhXP1epXB {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t}\n\t\t27.78% {\n\t\t\topacity: 1;\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\t@-webkit-keyframes kf_el_DkfFFTaFxy8_an_T2XxzvIaA {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t}\n\t\t41.67% {\n\t\t\topacity: 1;\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\t@keyframes kf_el_DkfFFTaFxy8_an_T2XxzvIaA {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t}\n\t\t41.67% {\n\t\t\topacity: 1;\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\t@-webkit-keyframes kf_el_34IgwiMB5rf_an_TPom3H2LI {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t}\n\t\t55.56% {\n\t\t\topacity: 1;\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\t@keyframes kf_el_34IgwiMB5rf_an_TPom3H2LI {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t}\n\t\t55.56% {\n\t\t\topacity: 1;\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\t@-webkit-keyframes kf_el_DeebuCsPTGA_an_aYTRBE7Na {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t}\n\t\t69.44% {\n\t\t\topacity: 1;\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\t@keyframes kf_el_DeebuCsPTGA_an_aYTRBE7Na {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t}\n\t\t69.44% {\n\t\t\topacity: 1;\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\t@-webkit-keyframes kf_el_ZOjjrPTvyrv_an_l_BjBNzXw {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t}\n\t\t83.33% {\n\t\t\topacity: 1;\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\t@keyframes kf_el_ZOjjrPTvyrv_an_l_BjBNzXw {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t}\n\t\t83.33% {\n\t\t\topacity: 1;\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\t@-webkit-keyframes kf_el_2FATegVmf0K_an_wLg4ofuFx {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t}\n\t\t97.22% {\n\t\t\topacity: 1;\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\t@keyframes kf_el_2FATegVmf0K_an_wLg4ofuFx {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t}\n\t\t97.22% {\n\t\t\topacity: 1;\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\t#el_hiibMG0x- * {\n\t\t-webkit-animation-duration: 1.2s;\n\t\tanimation-duration: 1.2s;\n\t\t-webkit-animation-iteration-count: infinite;\n\t\tanimation-iteration-count: infinite;\n\t\t-webkit-animation-timing-function: cubic-bezier(0, 0, 1, 1);\n\t\tanimation-timing-function: cubic-bezier(0, 0, 1, 1);\n\t}\n\t#el_QJeJ_2CDw5 {\n\t\tstroke: none;\n\t\tstroke-width: 1;\n\t\tfill: none;\n\t}\n\t#el_UYYCfubTRf {\n\t\t-webkit-transform: translate(163px, 123px);\n\t\ttransform: translate(163px, 123px);\n\t}\n\t#el_uzZNtK32Zi {\n\t\tfill: #d8d8d8;\n\t}\n\t#el_EYKQ2N9Kgy {\n\t\tfill: #d8d8d8;\n\t}\n\t#el_6SDP2LAgKC {\n\t\t-webkit-transform: translate(37.846924px, 0px);\n\t\ttransform: translate(37.846924px, 0px);\n\t}\n\t#el_-Vm65Ltfy7 {\n\t\tfill: #0B6AFF;\n\t}\n\t#el_q04iZcSim4 {\n\t\tfill: #d8d8d8;\n\t}\n\t#el_6WKby7wXqV {\n\t\t-webkit-transform: translate(37.846924px, 0px);\n\t\ttransform: translate(37.846924px, 0px);\n\t\t-webkit-animation-fill-mode: backwards;\n\t\tanimation-fill-mode: backwards;\n\t\topacity: 0;\n\t\t-webkit-animation-name: kf_el_6WKby7wXqV_an_qqO-rxbNc;\n\t\tanimation-name: kf_el_6WKby7wXqV_an_qqO-rxbNc;\n\t\t-webkit-animation-timing-function: cubic-bezier(0.42, 0, 1, 1);\n\t\tanimation-timing-function: cubic-bezier(0.42, 0, 1, 1);\n\t}\n\t#el_9bggsfQOtU {\n\t\tfill: #0B6AFF;\n\t}\n\t#el_NKxqi9eIym {\n\t\tfill: #d8d8d8;\n\t}\n\t#el_Wi-my975tM {\n\t\t-webkit-transform: translate(37.846924px, 0px);\n\t\ttransform: translate(37.846924px, 0px);\n\t\t-webkit-animation-fill-mode: backwards;\n\t\tanimation-fill-mode: backwards;\n\t\topacity: 0;\n\t\t-webkit-animation-name: kf_el_Wi-my975tM_an_XhXP1epXB;\n\t\tanimation-name: kf_el_Wi-my975tM_an_XhXP1epXB;\n\t\t-webkit-animation-timing-function: cubic-bezier(0.42, 0, 1, 1);\n\t\tanimation-timing-function: cubic-bezier(0.42, 0, 1, 1);\n\t}\n\t#el_zclQ34fvf7 {\n\t\tfill: #0B6AFF;\n\t}\n\t#el_1OsvRT8HkeZ {\n\t\tfill: #d8d8d8;\n\t}\n\t#el_DkfFFTaFxy8 {\n\t\t-webkit-transform: translate(37.846924px, 0px);\n\t\ttransform: translate(37.846924px, 0px);\n\t\t-webkit-animation-fill-mode: backwards;\n\t\tanimation-fill-mode: backwards;\n\t\topacity: 0;\n\t\t-webkit-animation-name: kf_el_DkfFFTaFxy8_an_T2XxzvIaA;\n\t\tanimation-name: kf_el_DkfFFTaFxy8_an_T2XxzvIaA;\n\t\t-webkit-animation-timing-function: cubic-bezier(0.42, 0, 1, 1);\n\t\tanimation-timing-function: cubic-bezier(0.42, 0, 1, 1);\n\t}\n\t#el_aa9sjx4H0vA {\n\t\tfill: #0B6AFF;\n\t}\n\t#el_tea114vWg0J {\n\t\tfill: #d8d8d8;\n\t}\n\t#el_34IgwiMB5rf {\n\t\t-webkit-transform: translate(37.846924px, 0px);\n\t\ttransform: translate(37.846924px, 0px);\n\t\t-webkit-animation-fill-mode: backwards;\n\t\tanimation-fill-mode: backwards;\n\t\topacity: 0;\n\t\t-webkit-animation-name: kf_el_34IgwiMB5rf_an_TPom3H2LI;\n\t\tanimation-name: kf_el_34IgwiMB5rf_an_TPom3H2LI;\n\t\t-webkit-animation-timing-function: cubic-bezier(0.42, 0, 1, 1);\n\t\tanimation-timing-function: cubic-bezier(0.42, 0, 1, 1);\n\t}\n\t#el_z5u6RAFhx7d {\n\t\tfill: #0B6AFF;\n\t}\n\t#el_7nfuWmA5Uhy {\n\t\tfill: #d8d8d8;\n\t}\n\t#el_DeebuCsPTGA {\n\t\t-webkit-transform: translate(37.846924px, 0px);\n\t\ttransform: translate(37.846924px, 0px);\n\t\t-webkit-animation-fill-mode: backwards;\n\t\tanimation-fill-mode: backwards;\n\t\topacity: 0;\n\t\t-webkit-animation-name: kf_el_DeebuCsPTGA_an_aYTRBE7Na;\n\t\tanimation-name: kf_el_DeebuCsPTGA_an_aYTRBE7Na;\n\t\t-webkit-animation-timing-function: cubic-bezier(0.42, 0, 1, 1);\n\t\tanimation-timing-function: cubic-bezier(0.42, 0, 1, 1);\n\t}\n\t#el__ZcqlS20zcw {\n\t\tfill: #0B6AFF;\n\t}\n\t#el_8DnEQnD7VWV {\n\t\tfill: #d8d8d8;\n\t}\n\t#el_ZOjjrPTvyrv {\n\t\t-webkit-transform: translate(37.846924px, 0px);\n\t\ttransform: translate(37.846924px, 0px);\n\t\t-webkit-animation-fill-mode: backwards;\n\t\tanimation-fill-mode: backwards;\n\t\topacity: 0;\n\t\t-webkit-animation-name: kf_el_ZOjjrPTvyrv_an_l_BjBNzXw;\n\t\tanimation-name: kf_el_ZOjjrPTvyrv_an_l_BjBNzXw;\n\t\t-webkit-animation-timing-function: cubic-bezier(0.42, 0, 1, 1);\n\t\tanimation-timing-function: cubic-bezier(0.42, 0, 1, 1);\n\t}\n\t#el_FYYKCI_u24e {\n\t\tfill: #0B6AFF;\n\t}\n\t#el_XZty4MnTp5Y {\n\t\tfill: #d8d8d8;\n\t}\n\t#el_2FATegVmf0K {\n\t\t-webkit-transform: translate(37.846924px, 0px);\n\t\ttransform: translate(37.846924px, 0px);\n\t\t-webkit-animation-fill-mode: backwards;\n\t\tanimation-fill-mode: backwards;\n\t\topacity: 0;\n\t\t-webkit-animation-name: kf_el_2FATegVmf0K_an_wLg4ofuFx;\n\t\tanimation-name: kf_el_2FATegVmf0K_an_wLg4ofuFx;\n\t\t-webkit-animation-timing-function: cubic-bezier(0.42, 0, 1, 1);\n\t\tanimation-timing-function: cubic-bezier(0.42, 0, 1, 1);\n\t}\n\t#el_RMT1KUfbdF8 {\n\t\tfill: #0B6AFF;\n\t}\n\t#el_RgLcovvFiO1 {\n\t\tfill: #d8d8d8;\n\t}\n"])));
|
|
336
285
|
var ListenSvg = {
|
|
337
286
|
name: 'ListenSvg',
|
|
338
287
|
props: ['className'],
|
|
@@ -653,8 +602,8 @@ var Mic = {
|
|
|
653
602
|
name: 'Mic',
|
|
654
603
|
props: {
|
|
655
604
|
children: types.title,
|
|
656
|
-
lang:
|
|
657
|
-
iconPosition:
|
|
605
|
+
lang: VueTypes.string.def('en-US'),
|
|
606
|
+
iconPosition: VueTypes.string.def('left'),
|
|
658
607
|
handleResult: types.func,
|
|
659
608
|
onNoMatch: types.func,
|
|
660
609
|
onError: types.func,
|
|
@@ -1066,10 +1015,10 @@ var DataSearch = {
|
|
|
1066
1015
|
})]),
|
|
1067
1016
|
aggregationField: types.string,
|
|
1068
1017
|
aggregationSize: VueTypes.number,
|
|
1069
|
-
size: VueTypes.number
|
|
1018
|
+
size: VueTypes.number,
|
|
1070
1019
|
debounce: VueTypes.number.def(0),
|
|
1071
1020
|
defaultValue: types.string,
|
|
1072
|
-
excludeFields: types.excludeFields
|
|
1021
|
+
excludeFields: types.excludeFields,
|
|
1073
1022
|
value: types.value,
|
|
1074
1023
|
defaultSuggestions: types.suggestions,
|
|
1075
1024
|
enableSynonyms: VueTypes.bool.def(true),
|
|
@@ -1083,9 +1032,9 @@ var DataSearch = {
|
|
|
1083
1032
|
highlightField: types.stringOrArray,
|
|
1084
1033
|
icon: types.children,
|
|
1085
1034
|
iconPosition: VueTypes.oneOf(['left', 'right']).def('left'),
|
|
1086
|
-
includeFields: types.includeFields
|
|
1035
|
+
includeFields: types.includeFields,
|
|
1087
1036
|
innerClass: types.style,
|
|
1088
|
-
innerRef:
|
|
1037
|
+
innerRef: VueTypes.string.def('searchInputField'),
|
|
1089
1038
|
render: types.func,
|
|
1090
1039
|
renderQuerySuggestions: types.func,
|
|
1091
1040
|
renderPopularSuggestions: types.func,
|
|
@@ -1117,7 +1066,7 @@ var DataSearch = {
|
|
|
1117
1066
|
focusShortcuts: VueTypes.arrayOf(VueTypes.oneOfType([VueTypes.string, VueTypes.number])).def(['/']),
|
|
1118
1067
|
addonBefore: VueTypes.any,
|
|
1119
1068
|
addonAfter: VueTypes.any,
|
|
1120
|
-
expandSuggestionsContainer:
|
|
1069
|
+
expandSuggestionsContainer: VueTypes.bool.def(true),
|
|
1121
1070
|
index: VueTypes.string
|
|
1122
1071
|
},
|
|
1123
1072
|
beforeMount: function beforeMount() {
|
|
@@ -1778,7 +1727,7 @@ var DataSearch = {
|
|
|
1778
1727
|
highlightedIndex: highlightedIndex
|
|
1779
1728
|
}), _this3.renderErrorComponent(), !_this3.hasCustomRenderer && isOpen && hasSuggestions ? h("ul", {
|
|
1780
1729
|
"class": suggestions(_this3.themePreset, theme) + " " + getClassName$1(_this3.$props.innerClass, 'list')
|
|
1781
|
-
}, [_this3.suggestionsList.slice(0, size).map(function (item, index) {
|
|
1730
|
+
}, [_this3.suggestionsList.slice(0, size || 10).map(function (item, index) {
|
|
1782
1731
|
return h("li", {
|
|
1783
1732
|
"domProps": _extends({}, getItemProps({
|
|
1784
1733
|
item: item
|
|
@@ -3,10 +3,11 @@ import { _ as _taggedTemplateLiteralLoose, a as _extends } from './_rollupPlugin
|
|
|
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-
|
|
6
|
+
import { t as types } from './vueTypes-98819a12.js';
|
|
7
7
|
import { a as isFunction } from './index-4755c9a0.js';
|
|
8
|
+
import { D as Downshift, b as InputWrapper, a as IconGroup, I as IconWrapper, C as CancelSvg } from './CancelSvg-282ae799.js';
|
|
8
9
|
import { s as suggestionsContainer, a as suggestions, I as Input } from './Input-d8519224.js';
|
|
9
|
-
import {
|
|
10
|
+
import { replaceDiacritics } from '@appbaseio/reactivecore/lib/utils/suggestions';
|
|
10
11
|
|
|
11
12
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
12
13
|
var small = css(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n\tmin-height: 0;\n\theight: 30px;\n\tborder: 0;\n\tbox-shadow: rgba(0, 0, 0, 0.3) 0px 1px 4px -1px;\n\tborder-radius: 2px;\n"])));
|
|
@@ -68,7 +69,9 @@ var Dropdown = {
|
|
|
68
69
|
single: VueTypes.bool,
|
|
69
70
|
small: VueTypes.bool.def(false),
|
|
70
71
|
themePreset: types.themePreset,
|
|
71
|
-
showSearch: VueTypes.bool
|
|
72
|
+
showSearch: VueTypes.bool,
|
|
73
|
+
showClear: VueTypes.bool,
|
|
74
|
+
searchPlaceholder: VueTypes.string.def('Type here to search...')
|
|
72
75
|
},
|
|
73
76
|
render: function render() {
|
|
74
77
|
var _this = this;
|
|
@@ -96,7 +99,7 @@ var Dropdown = {
|
|
|
96
99
|
var filteredItemsToRender = itemsToRender.filter(function (item) {
|
|
97
100
|
if (String(item[labelField]).length) {
|
|
98
101
|
if (_this.$props.showSearch && _this.$data.searchTerm) {
|
|
99
|
-
return String(item[labelField]).toLowerCase().includes(_this.$data.searchTerm.toLowerCase());
|
|
102
|
+
return replaceDiacritics(String(item[labelField])).toLowerCase().includes(replaceDiacritics(_this.$data.searchTerm.toLowerCase()));
|
|
100
103
|
}
|
|
101
104
|
|
|
102
105
|
return true;
|
|
@@ -142,25 +145,10 @@ var Dropdown = {
|
|
|
142
145
|
getItemEvents: getItemEvents
|
|
143
146
|
}) : isOpen && itemsToRender.length ? h("ul", {
|
|
144
147
|
"class": suggestions(themePreset, _this.theme) + " " + (_this.$props.small ? 'small' : '') + " " + getClassName(_this.$props.innerClass, 'list')
|
|
145
|
-
}, [_this.$props.showSearch ?
|
|
146
|
-
"attrs": {
|
|
147
|
-
"id": _this.$props.componentId + "-input",
|
|
148
|
-
"showIcon": false,
|
|
149
|
-
"placeholder": "Type here to search...",
|
|
150
|
-
"value": _this.$data.searchTerm,
|
|
151
|
-
"themePreset": themePreset
|
|
152
|
-
},
|
|
153
|
-
"style": {
|
|
154
|
-
border: 0,
|
|
155
|
-
borderBottom: '1px solid #ddd'
|
|
156
|
-
},
|
|
157
|
-
"class": getClassName(_this.$props.innerClass, 'input'),
|
|
158
|
-
"on": {
|
|
159
|
-
"change": _this.handleInputChange
|
|
160
|
-
}
|
|
161
|
-
}) : null, !hasCustomRenderer && filteredItemsToRender.length === 0 ? _this.renderNoResult() : filteredItemsToRender.map(function (item, index) {
|
|
148
|
+
}, [_this.$props.showSearch ? _this.renderSearchbox() : null, !hasCustomRenderer && filteredItemsToRender.length === 0 ? _this.renderNoResult() : filteredItemsToRender.map(function (item, index) {
|
|
162
149
|
var selected = _this.$props.multi // MultiDropdownList
|
|
163
|
-
&& (selectedItem && !!selectedItem[item[keyField]]
|
|
150
|
+
&& (selectedItem && !!selectedItem[item[keyField]] // MultiDropdownRange
|
|
151
|
+
|| Array.isArray(selectedItem) && selectedItem.find(function (value) {
|
|
164
152
|
return value[labelField] === item[labelField];
|
|
165
153
|
}));
|
|
166
154
|
if (!_this.$props.multi) selected = item.key === selectedItem;
|
|
@@ -210,6 +198,7 @@ var Dropdown = {
|
|
|
210
198
|
|
|
211
199
|
if (!this.$props.multi) {
|
|
212
200
|
this.isOpen = false;
|
|
201
|
+
this.searchTerm = '';
|
|
213
202
|
}
|
|
214
203
|
},
|
|
215
204
|
handleStateChange: function handleStateChange(_ref2) {
|
|
@@ -233,6 +222,9 @@ var Dropdown = {
|
|
|
233
222
|
var value = e.target.value;
|
|
234
223
|
this.searchTerm = value;
|
|
235
224
|
},
|
|
225
|
+
clearSearchTerm: function clearSearchTerm() {
|
|
226
|
+
this.searchTerm = '';
|
|
227
|
+
},
|
|
236
228
|
renderToString: function renderToString(value) {
|
|
237
229
|
var _this2 = this;
|
|
238
230
|
|
|
@@ -273,6 +265,51 @@ var Dropdown = {
|
|
|
273
265
|
return h("p", {
|
|
274
266
|
"class": getClassName(this.$props.innerClass, 'noResults') || null
|
|
275
267
|
}, [isFunction(renderNoResults) ? renderNoResults() : renderNoResults]);
|
|
268
|
+
},
|
|
269
|
+
renderSearchbox: function renderSearchbox() {
|
|
270
|
+
var h = this.$createElement;
|
|
271
|
+
var _this$$props2 = this.$props,
|
|
272
|
+
componentId = _this$$props2.componentId,
|
|
273
|
+
searchPlaceholder = _this$$props2.searchPlaceholder,
|
|
274
|
+
showClear = _this$$props2.showClear,
|
|
275
|
+
themePreset = _this$$props2.themePreset,
|
|
276
|
+
innerClass = _this$$props2.innerClass;
|
|
277
|
+
var InputComponent = h(Input, {
|
|
278
|
+
"attrs": {
|
|
279
|
+
"id": componentId + "-input",
|
|
280
|
+
"showIcon": false,
|
|
281
|
+
"showClear": showClear,
|
|
282
|
+
"placeholder": searchPlaceholder,
|
|
283
|
+
"value": this.$data.searchTerm,
|
|
284
|
+
"themePreset": themePreset
|
|
285
|
+
},
|
|
286
|
+
"style": {
|
|
287
|
+
border: 0,
|
|
288
|
+
borderBottom: '1px solid #ddd'
|
|
289
|
+
},
|
|
290
|
+
"class": getClassName(innerClass, 'input'),
|
|
291
|
+
"on": {
|
|
292
|
+
"change": this.handleInputChange
|
|
293
|
+
}
|
|
294
|
+
});
|
|
295
|
+
|
|
296
|
+
if (showClear) {
|
|
297
|
+
return h(InputWrapper, [InputComponent, this.searchTerm && h(IconGroup, {
|
|
298
|
+
"attrs": {
|
|
299
|
+
"groupPosition": "right",
|
|
300
|
+
"positionType": "absolute"
|
|
301
|
+
}
|
|
302
|
+
}, [h(IconWrapper, {
|
|
303
|
+
"on": {
|
|
304
|
+
"click": this.clearSearchTerm
|
|
305
|
+
},
|
|
306
|
+
"attrs": {
|
|
307
|
+
"isClearIcon": true
|
|
308
|
+
}
|
|
309
|
+
}, [h(CancelSvg)])])]);
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
return InputComponent;
|
|
276
313
|
}
|
|
277
314
|
}
|
|
278
315
|
};
|
|
@@ -3,7 +3,7 @@ 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-
|
|
6
|
+
import { t as types } from './vueTypes-98819a12.js';
|
|
7
7
|
import 'redux';
|
|
8
8
|
import { f as updateCustomQuery, d as getValidPropsKeys, i as isQueryIdentical, c as connect } from './index-4755c9a0.js';
|
|
9
9
|
import { T as Title } from './Title-579f8d6c.js';
|
|
@@ -6,18 +6,19 @@ import 'emotion';
|
|
|
6
6
|
import '@appbaseio/vue-emotion';
|
|
7
7
|
import 'polished';
|
|
8
8
|
import { l as loadMoreContainer, B as Button } from './Button-799185e2.js';
|
|
9
|
-
import { t as types } from './vueTypes-
|
|
9
|
+
import { t as types } from './vueTypes-98819a12.js';
|
|
10
10
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
11
11
|
import 'redux';
|
|
12
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-4755c9a0.js';
|
|
13
13
|
import { C as ComponentWrapper } from './ComponentWrapper-459505fd.js';
|
|
14
14
|
import { T as Title } from './Title-579f8d6c.js';
|
|
15
|
+
import './CancelSvg-282ae799.js';
|
|
15
16
|
import './Input-d8519224.js';
|
|
16
17
|
import 'compute-scroll-into-view';
|
|
17
|
-
import './DownShift-e7ccf2a7.js';
|
|
18
18
|
import { C as Container } from './Container-4383c6f0.js';
|
|
19
|
+
import '@appbaseio/reactivecore/lib/utils/suggestions';
|
|
19
20
|
import { g as getAggsQuery } from './utils-3a32e13f.js';
|
|
20
|
-
import { D as Dropdown } from './DropDown-
|
|
21
|
+
import { D as Dropdown } from './DropDown-d9686568.js';
|
|
21
22
|
|
|
22
23
|
var updateQuery = Actions.updateQuery,
|
|
23
24
|
setQueryOptions = Actions.setQueryOptions,
|
|
@@ -74,10 +75,12 @@ var MultiDropdownList = {
|
|
|
74
75
|
showMissing: VueTypes.bool.def(false),
|
|
75
76
|
missingLabel: VueTypes.string.def('N/A'),
|
|
76
77
|
showSearch: VueTypes.bool.def(false),
|
|
78
|
+
showClear: VueTypes.bool.def(false),
|
|
77
79
|
showLoadMore: VueTypes.bool.def(false),
|
|
78
80
|
loadMoreLabel: VueTypes.oneOfType([VueTypes.string, VueTypes.any]).def('Load More'),
|
|
79
81
|
nestedField: types.string,
|
|
80
|
-
index: VueTypes.string
|
|
82
|
+
index: VueTypes.string,
|
|
83
|
+
searchPlaceholder: VueTypes.string.def('Type here to search...')
|
|
81
84
|
},
|
|
82
85
|
created: function created() {
|
|
83
86
|
if (!this.enableAppbase && this.$props.index) {
|
|
@@ -205,7 +208,9 @@ var MultiDropdownList = {
|
|
|
205
208
|
if (!this.hasCustomRenderer && this.$data.modifiedOptions.length === 0 && !this.isLoading) {
|
|
206
209
|
if (renderNoResults && isFunction(renderNoResults)) {
|
|
207
210
|
return h("div", [renderNoResults()]);
|
|
208
|
-
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
if (renderNoResults && !isFunction(renderNoResults)) {
|
|
209
214
|
return renderNoResults;
|
|
210
215
|
}
|
|
211
216
|
|
|
@@ -244,6 +249,8 @@ var MultiDropdownList = {
|
|
|
244
249
|
"renderItem": renderItemCalc,
|
|
245
250
|
"renderNoResults": this.$scopedSlots.renderNoResults || this.$props.renderNoResults,
|
|
246
251
|
"showSearch": this.$props.showSearch,
|
|
252
|
+
"showClear": this.$props.showClear,
|
|
253
|
+
"searchPlaceholder": this.$props.searchPlaceholder,
|
|
247
254
|
"transformData": this.$props.transformData,
|
|
248
255
|
"footer": showLoadMore && !isLastBucket && h("div", {
|
|
249
256
|
"attrs": {
|