@appbaseio/reactivesearch-vue 1.24.3 → 1.27.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 +679 -314
- 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-62e82255.js → CancelSvg-4aa35935.js} +58 -14
- package/dist/cjs/{ComponentWrapper-32481890.js → ComponentWrapper-10bad289.js} +1 -1
- package/dist/cjs/DataSearch.js +33 -84
- package/dist/cjs/{DropDown-6815b9b6.js → DropDown-7aa3d0d2.js} +65 -23
- package/dist/cjs/DynamicRangeSlider.js +48 -12
- package/dist/cjs/MultiDropdownList.js +18 -10
- package/dist/cjs/MultiList.js +21 -15
- package/dist/cjs/MultiRange.js +4 -4
- package/dist/cjs/RangeInput.js +9 -5
- package/dist/cjs/RangeSlider.js +19 -22
- package/dist/cjs/ReactiveBase.js +6 -4
- package/dist/cjs/ReactiveComponent.js +3 -3
- package/dist/cjs/ReactiveList.js +61 -44
- package/dist/cjs/ResultCard.js +1 -1
- package/dist/cjs/ResultList.js +1 -1
- package/dist/cjs/SelectedFilters.js +8 -6
- package/dist/cjs/SingleDropdownList.js +17 -9
- package/dist/cjs/SingleList.js +9 -8
- package/dist/cjs/SingleRange.js +4 -4
- package/dist/cjs/StateProvider.js +7 -3
- package/dist/cjs/ToggleButton.js +5 -5
- package/dist/cjs/{index-89c39a9e.js → index-4509aa45.js} +10 -4
- package/dist/cjs/index.js +9 -6
- package/dist/cjs/initReactivesearch.js +19 -0
- package/dist/cjs/install.js +7 -6
- package/dist/cjs/ssr-0ee35a09.js +39 -0
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/{vueTypes-4c19b4c8.js → vueTypes-57d01f18.js} +3 -3
- package/dist/es/{DownShift-3558d402.js → CancelSvg-c2c03a35.js} +55 -16
- package/dist/es/{ComponentWrapper-4f85a67e.js → ComponentWrapper-0f3431d1.js} +1 -1
- package/dist/es/DataSearch.js +23 -74
- package/dist/es/{DropDown-035c804f.js → DropDown-60a426a2.js} +64 -22
- package/dist/es/DynamicRangeSlider.js +48 -12
- package/dist/es/MultiDropdownList.js +18 -10
- package/dist/es/MultiList.js +21 -15
- package/dist/es/MultiRange.js +4 -4
- package/dist/es/RangeInput.js +9 -5
- package/dist/es/RangeSlider.js +19 -22
- package/dist/es/ReactiveBase.js +6 -4
- package/dist/es/ReactiveComponent.js +3 -3
- package/dist/es/ReactiveList.js +61 -44
- package/dist/es/ResultCard.js +1 -1
- package/dist/es/ResultList.js +1 -1
- package/dist/es/SelectedFilters.js +8 -6
- package/dist/es/SingleDropdownList.js +17 -9
- package/dist/es/SingleList.js +9 -8
- package/dist/es/SingleRange.js +4 -4
- package/dist/es/StateProvider.js +7 -3
- package/dist/es/ToggleButton.js +5 -5
- package/dist/es/{index-cb1950b6.js → index-78920565.js} +10 -4
- package/dist/es/index.js +9 -6
- package/dist/es/initReactivesearch.js +19 -0
- package/dist/es/install.js +7 -6
- package/dist/es/ssr-a41dfea9.js +33 -0
- package/dist/es/version.js +1 -1
- package/dist/es/{vueTypes-fb61bb7b.js → vueTypes-687b2304.js} +3 -3
- package/package.json +4 -4
- package/dist/cjs/ssr-08e95ede.js +0 -39
- package/dist/es/ssr-5d255b08.js +0 -33
|
@@ -3,8 +3,36 @@
|
|
|
3
3
|
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
4
4
|
|
|
5
5
|
var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-f127c8b7.js');
|
|
6
|
+
var styled = require('@appbaseio/vue-emotion');
|
|
7
|
+
var styled__default = _interopDefault(styled);
|
|
6
8
|
var computeScrollIntoView = _interopDefault(require('compute-scroll-into-view'));
|
|
7
9
|
|
|
10
|
+
var _templateObject;
|
|
11
|
+
var InputWrapper = styled__default('span')(_templateObject || (_templateObject = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n flex: 1;\n position: relative;\n"])));
|
|
12
|
+
|
|
13
|
+
var _templateObject$1, _templateObject2, _templateObject3, _templateObject4;
|
|
14
|
+
var IconGroup = styled__default('div')(_templateObject$1 || (_templateObject$1 = _rollupPluginBabelHelpers._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) {
|
|
15
|
+
var positionType = _ref.positionType;
|
|
16
|
+
|
|
17
|
+
if (positionType === 'absolute') {
|
|
18
|
+
return styled.css(_templateObject2 || (_templateObject2 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: 50%;\n\t\t\t\ttransform: translateY(-50%);\n\t\t\t"])));
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return null;
|
|
22
|
+
}, function (_ref2) {
|
|
23
|
+
var groupPosition = _ref2.groupPosition;
|
|
24
|
+
return groupPosition === 'right' ? styled.css(_templateObject3 || (_templateObject3 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\t\t\t\t\tright: 0;\n\t\t\t "]))) : styled.css(_templateObject4 || (_templateObject4 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\t\t\t\t\tleft: 0;\n\t\t\t "])));
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
var _templateObject$2;
|
|
28
|
+
var IconWrapper = styled__default('div')(_templateObject$2 || (_templateObject$2 = _rollupPluginBabelHelpers._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) {
|
|
29
|
+
var theme = _ref.theme;
|
|
30
|
+
return theme.colors.primaryColor;
|
|
31
|
+
}, function (_ref2) {
|
|
32
|
+
var theme = _ref2.theme;
|
|
33
|
+
return theme.colors.borderColor || '#000';
|
|
34
|
+
});
|
|
35
|
+
|
|
8
36
|
/**
|
|
9
37
|
* Scroll node into view if necessary
|
|
10
38
|
* @param {HTMLElement} node the element that should scroll into view
|
|
@@ -40,8 +68,7 @@ var Downshift = {
|
|
|
40
68
|
internal_isOpen: false,
|
|
41
69
|
internal_inputValue: '',
|
|
42
70
|
internal_selectedItem: null,
|
|
43
|
-
internal_highlightedIndex: null
|
|
44
|
-
internal_eventsCalled: {}
|
|
71
|
+
internal_highlightedIndex: null
|
|
45
72
|
};
|
|
46
73
|
},
|
|
47
74
|
computed: {
|
|
@@ -226,23 +253,11 @@ var Downshift = {
|
|
|
226
253
|
}
|
|
227
254
|
|
|
228
255
|
var vm = this;
|
|
229
|
-
setTimeout(function () {
|
|
230
|
-
vm.internal_eventsCalled[index] = false;
|
|
231
|
-
}, 0);
|
|
232
256
|
return {
|
|
233
257
|
mouseenter: function mouseenter() {
|
|
234
258
|
vm.setHighlightedIndex(newIndex);
|
|
235
259
|
},
|
|
236
|
-
// for browsers not supporting click event (e.g. firefox android)
|
|
237
|
-
mousedown: function mousedown(event) {
|
|
238
|
-
if (vm.internal_eventsCalled[index]) return;
|
|
239
|
-
vm.internal_eventsCalled[index] = true;
|
|
240
|
-
event.stopPropagation();
|
|
241
|
-
vm.selectItemAtIndex(newIndex);
|
|
242
|
-
},
|
|
243
260
|
click: function click(event) {
|
|
244
|
-
if (vm.internal_eventsCalled[index]) return;
|
|
245
|
-
vm.internal_eventsCalled[index] = true;
|
|
246
261
|
event.stopPropagation();
|
|
247
262
|
vm.selectItemAtIndex(newIndex);
|
|
248
263
|
}
|
|
@@ -402,4 +417,33 @@ var Downshift = {
|
|
|
402
417
|
}
|
|
403
418
|
};
|
|
404
419
|
|
|
420
|
+
var CancelSvg = {
|
|
421
|
+
functional: true,
|
|
422
|
+
render: function render(h) {
|
|
423
|
+
return h("svg", {
|
|
424
|
+
"attrs": {
|
|
425
|
+
"alt": "Clear",
|
|
426
|
+
"xmlns": "http://www.w3.org/2000/svg",
|
|
427
|
+
"height": "20px",
|
|
428
|
+
"viewBox": "0 0 24 24",
|
|
429
|
+
"width": "20px"
|
|
430
|
+
},
|
|
431
|
+
"class": "cancel-icon"
|
|
432
|
+
}, [h("title", ["Clear"]), h("path", {
|
|
433
|
+
"attrs": {
|
|
434
|
+
"d": "M0 0h24v24H0V0z",
|
|
435
|
+
"fill": "none"
|
|
436
|
+
}
|
|
437
|
+
}), h("path", {
|
|
438
|
+
"attrs": {
|
|
439
|
+
"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"
|
|
440
|
+
}
|
|
441
|
+
})]);
|
|
442
|
+
}
|
|
443
|
+
};
|
|
444
|
+
|
|
445
|
+
exports.CancelSvg = CancelSvg;
|
|
405
446
|
exports.Downshift = Downshift;
|
|
447
|
+
exports.IconGroup = IconGroup;
|
|
448
|
+
exports.IconWrapper = IconWrapper;
|
|
449
|
+
exports.InputWrapper = InputWrapper;
|
|
@@ -8,7 +8,7 @@ var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-f127c8b7.js
|
|
|
8
8
|
var VueTypes = _interopDefault(require('vue-types'));
|
|
9
9
|
var constants = require('@appbaseio/reactivecore/lib/utils/constants');
|
|
10
10
|
var transform = require('@appbaseio/reactivecore/lib/utils/transform');
|
|
11
|
-
var index = require('./index-
|
|
11
|
+
var index = require('./index-4509aa45.js');
|
|
12
12
|
|
|
13
13
|
var addComponent = configureStore.Actions.addComponent,
|
|
14
14
|
removeComponent = configureStore.Actions.removeComponent,
|
package/dist/cjs/DataSearch.js
CHANGED
|
@@ -14,17 +14,17 @@ require('emotion');
|
|
|
14
14
|
var styled = require('@appbaseio/vue-emotion');
|
|
15
15
|
var styled__default = _interopDefault(styled);
|
|
16
16
|
require('polished');
|
|
17
|
-
var vueTypes = require('./vueTypes-
|
|
17
|
+
var vueTypes = require('./vueTypes-57d01f18.js');
|
|
18
18
|
require('@appbaseio/reactivecore/lib/utils/transform');
|
|
19
19
|
require('redux');
|
|
20
|
-
var index = require('./index-
|
|
21
|
-
var ComponentWrapper = require('./ComponentWrapper-
|
|
20
|
+
var index = require('./index-4509aa45.js');
|
|
21
|
+
var ComponentWrapper = require('./ComponentWrapper-10bad289.js');
|
|
22
22
|
var Title = require('./Title-584a8cc8.js');
|
|
23
23
|
var Flex = require('./Flex-f146cdad.js');
|
|
24
24
|
var hotkeys = _interopDefault(require('hotkeys-js'));
|
|
25
|
+
var CancelSvg = require('./CancelSvg-4aa35935.js');
|
|
25
26
|
var Input = require('./Input-3cc3fa59.js');
|
|
26
27
|
require('compute-scroll-into-view');
|
|
27
|
-
var DownShift = require('./DownShift-62e82255.js');
|
|
28
28
|
var Container = require('./Container-526efa6a.js');
|
|
29
29
|
var Highlight = _interopDefault(require('vue-highlight-words'));
|
|
30
30
|
|
|
@@ -35,37 +35,11 @@ InputGroup.defaultProps = {
|
|
|
35
35
|
};
|
|
36
36
|
|
|
37
37
|
var _templateObject$1;
|
|
38
|
-
var
|
|
39
|
-
|
|
40
|
-
var _templateObject$2;
|
|
41
|
-
var InputAddon = styled__default('span')(_templateObject$2 || (_templateObject$2 = _rollupPluginBabelHelpers._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"])));
|
|
38
|
+
var InputAddon = styled__default('span')(_templateObject$1 || (_templateObject$1 = _rollupPluginBabelHelpers._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"])));
|
|
42
39
|
InputAddon.defaultProps = {
|
|
43
40
|
className: 'input-addon'
|
|
44
41
|
};
|
|
45
42
|
|
|
46
|
-
var _templateObject$3, _templateObject2, _templateObject3, _templateObject4;
|
|
47
|
-
var IconGroup = styled__default('div')(_templateObject$3 || (_templateObject$3 = _rollupPluginBabelHelpers._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) {
|
|
48
|
-
var positionType = _ref.positionType;
|
|
49
|
-
|
|
50
|
-
if (positionType === 'absolute') {
|
|
51
|
-
return styled.css(_templateObject2 || (_templateObject2 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: 50%;\n\t\t\t\ttransform: translateY(-50%);\n\t\t\t"])));
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
return null;
|
|
55
|
-
}, function (_ref2) {
|
|
56
|
-
var groupPosition = _ref2.groupPosition;
|
|
57
|
-
return groupPosition === 'right' ? styled.css(_templateObject3 || (_templateObject3 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\t\t\t\t\tright: 0;\n\t\t\t "]))) : styled.css(_templateObject4 || (_templateObject4 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\t\t\t\t\tleft: 0;\n\t\t\t "])));
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
var _templateObject$4;
|
|
61
|
-
var IconWrapper = styled__default('div')(_templateObject$4 || (_templateObject$4 = _rollupPluginBabelHelpers._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) {
|
|
62
|
-
var theme = _ref.theme;
|
|
63
|
-
return theme.colors.primaryColor;
|
|
64
|
-
}, function (_ref2) {
|
|
65
|
-
var theme = _ref2.theme;
|
|
66
|
-
return theme.colors.borderColor || '#000';
|
|
67
|
-
});
|
|
68
|
-
|
|
69
43
|
var getClassName = configureStore.helper.getClassName;
|
|
70
44
|
var SuggestionWrapper = {
|
|
71
45
|
name: 'SuggestionWrapper',
|
|
@@ -86,14 +60,14 @@ var SuggestionWrapper = {
|
|
|
86
60
|
}
|
|
87
61
|
};
|
|
88
62
|
|
|
89
|
-
var _templateObject$
|
|
63
|
+
var _templateObject$2;
|
|
90
64
|
var highlightStyle = {
|
|
91
65
|
fontWeight: 600,
|
|
92
66
|
padding: 0,
|
|
93
67
|
backgroundColor: 'transparent',
|
|
94
68
|
color: 'inherit'
|
|
95
69
|
};
|
|
96
|
-
var PredictiveSuggestion = styled__default('span')(_templateObject$
|
|
70
|
+
var PredictiveSuggestion = styled__default('span')(_templateObject$2 || (_templateObject$2 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\t.highlight {\n\t\tbackground: transparent;\n\t\tcolor: inherit;\n\t\tfont-weight: 600;\n\t\tpadding: 0;\n\t}\n"])));
|
|
97
71
|
var SuggestionItem = {
|
|
98
72
|
name: 'SuggestionItem',
|
|
99
73
|
props: {
|
|
@@ -208,34 +182,9 @@ var SearchSvg = {
|
|
|
208
182
|
}
|
|
209
183
|
};
|
|
210
184
|
|
|
211
|
-
var
|
|
212
|
-
functional: true,
|
|
213
|
-
render: function render(h) {
|
|
214
|
-
return h("svg", {
|
|
215
|
-
"attrs": {
|
|
216
|
-
"alt": "Clear",
|
|
217
|
-
"xmlns": "http://www.w3.org/2000/svg",
|
|
218
|
-
"height": "20px",
|
|
219
|
-
"viewBox": "0 0 24 24",
|
|
220
|
-
"width": "20px"
|
|
221
|
-
},
|
|
222
|
-
"class": "cancel-icon"
|
|
223
|
-
}, [h("title", ["Clear"]), h("path", {
|
|
224
|
-
"attrs": {
|
|
225
|
-
"d": "M0 0h24v24H0V0z",
|
|
226
|
-
"fill": "none"
|
|
227
|
-
}
|
|
228
|
-
}), h("path", {
|
|
229
|
-
"attrs": {
|
|
230
|
-
"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"
|
|
231
|
-
}
|
|
232
|
-
})]);
|
|
233
|
-
}
|
|
234
|
-
};
|
|
185
|
+
var _templateObject$3;
|
|
235
186
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
styled.injectGlobal(_templateObject$6 || (_templateObject$6 = _rollupPluginBabelHelpers._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"])));
|
|
187
|
+
styled.injectGlobal(_templateObject$3 || (_templateObject$3 = _rollupPluginBabelHelpers._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"])));
|
|
239
188
|
var MicSvg = {
|
|
240
189
|
name: 'MicSvg',
|
|
241
190
|
props: ['className'],
|
|
@@ -280,9 +229,9 @@ var MicSvg = {
|
|
|
280
229
|
}
|
|
281
230
|
};
|
|
282
231
|
|
|
283
|
-
var _templateObject$
|
|
232
|
+
var _templateObject$4;
|
|
284
233
|
|
|
285
|
-
styled.injectGlobal(_templateObject$
|
|
234
|
+
styled.injectGlobal(_templateObject$4 || (_templateObject$4 = _rollupPluginBabelHelpers._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"])));
|
|
286
235
|
var MuteSvg = {
|
|
287
236
|
name: 'MuteSvg',
|
|
288
237
|
props: ['className'],
|
|
@@ -338,9 +287,9 @@ var MuteSvg = {
|
|
|
338
287
|
}
|
|
339
288
|
};
|
|
340
289
|
|
|
341
|
-
var _templateObject$
|
|
290
|
+
var _templateObject$5;
|
|
342
291
|
|
|
343
|
-
styled.injectGlobal(_templateObject$
|
|
292
|
+
styled.injectGlobal(_templateObject$5 || (_templateObject$5 = _rollupPluginBabelHelpers._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"])));
|
|
344
293
|
var ListenSvg = {
|
|
345
294
|
name: 'ListenSvg',
|
|
346
295
|
props: ['className'],
|
|
@@ -661,8 +610,8 @@ var Mic = {
|
|
|
661
610
|
name: 'Mic',
|
|
662
611
|
props: {
|
|
663
612
|
children: vueTypes.types.title,
|
|
664
|
-
lang:
|
|
665
|
-
iconPosition:
|
|
613
|
+
lang: VueTypes.string.def('en-US'),
|
|
614
|
+
iconPosition: VueTypes.string.def('left'),
|
|
666
615
|
handleResult: vueTypes.types.func,
|
|
667
616
|
onNoMatch: vueTypes.types.func,
|
|
668
617
|
onError: vueTypes.types.func,
|
|
@@ -846,7 +795,7 @@ var Mic = {
|
|
|
846
795
|
return this.getComponent();
|
|
847
796
|
}
|
|
848
797
|
|
|
849
|
-
return h(IconWrapper, [this.Icon]);
|
|
798
|
+
return h(CancelSvg.IconWrapper, [this.Icon]);
|
|
850
799
|
}
|
|
851
800
|
};
|
|
852
801
|
|
|
@@ -1074,10 +1023,10 @@ var DataSearch = {
|
|
|
1074
1023
|
})]),
|
|
1075
1024
|
aggregationField: vueTypes.types.string,
|
|
1076
1025
|
aggregationSize: VueTypes.number,
|
|
1077
|
-
size: VueTypes.number
|
|
1026
|
+
size: VueTypes.number,
|
|
1078
1027
|
debounce: VueTypes.number.def(0),
|
|
1079
1028
|
defaultValue: vueTypes.types.string,
|
|
1080
|
-
excludeFields: vueTypes.types.excludeFields
|
|
1029
|
+
excludeFields: vueTypes.types.excludeFields,
|
|
1081
1030
|
value: vueTypes.types.value,
|
|
1082
1031
|
defaultSuggestions: vueTypes.types.suggestions,
|
|
1083
1032
|
enableSynonyms: VueTypes.bool.def(true),
|
|
@@ -1091,9 +1040,9 @@ var DataSearch = {
|
|
|
1091
1040
|
highlightField: vueTypes.types.stringOrArray,
|
|
1092
1041
|
icon: vueTypes.types.children,
|
|
1093
1042
|
iconPosition: VueTypes.oneOf(['left', 'right']).def('left'),
|
|
1094
|
-
includeFields: vueTypes.types.includeFields
|
|
1043
|
+
includeFields: vueTypes.types.includeFields,
|
|
1095
1044
|
innerClass: vueTypes.types.style,
|
|
1096
|
-
innerRef:
|
|
1045
|
+
innerRef: VueTypes.string.def('searchInputField'),
|
|
1097
1046
|
render: vueTypes.types.func,
|
|
1098
1047
|
renderQuerySuggestions: vueTypes.types.func,
|
|
1099
1048
|
renderPopularSuggestions: vueTypes.types.func,
|
|
@@ -1125,7 +1074,7 @@ var DataSearch = {
|
|
|
1125
1074
|
focusShortcuts: VueTypes.arrayOf(VueTypes.oneOfType([VueTypes.string, VueTypes.number])).def(['/']),
|
|
1126
1075
|
addonBefore: VueTypes.any,
|
|
1127
1076
|
addonAfter: VueTypes.any,
|
|
1128
|
-
expandSuggestionsContainer:
|
|
1077
|
+
expandSuggestionsContainer: VueTypes.bool.def(true),
|
|
1129
1078
|
index: VueTypes.string
|
|
1130
1079
|
},
|
|
1131
1080
|
beforeMount: function beforeMount() {
|
|
@@ -1400,7 +1349,7 @@ var DataSearch = {
|
|
|
1400
1349
|
index.updateDefaultQuery(props.componentId, this.setDefaultQuery, props, value);
|
|
1401
1350
|
}
|
|
1402
1351
|
|
|
1403
|
-
this.setQueryOptions(this.internalComponent, _rollupPluginBabelHelpers._extends({}, this.queryOptions, defaultQueryOptions));
|
|
1352
|
+
this.setQueryOptions(this.internalComponent, _rollupPluginBabelHelpers._extends({}, this.queryOptions, defaultQueryOptions), false);
|
|
1404
1353
|
this.updateQuery({
|
|
1405
1354
|
componentId: this.internalComponent,
|
|
1406
1355
|
query: query,
|
|
@@ -1427,7 +1376,7 @@ var DataSearch = {
|
|
|
1427
1376
|
|
|
1428
1377
|
customQueryOptions = getOptionsFromQuery(customQueryTobeSet);
|
|
1429
1378
|
index.updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
|
|
1430
|
-
this.setQueryOptions(componentId, _rollupPluginBabelHelpers._extends({}, this.queryOptions, customQueryOptions));
|
|
1379
|
+
this.setQueryOptions(componentId, _rollupPluginBabelHelpers._extends({}, this.queryOptions, customQueryOptions), false);
|
|
1431
1380
|
}
|
|
1432
1381
|
|
|
1433
1382
|
if (!this.isPending) {
|
|
@@ -1590,7 +1539,7 @@ var DataSearch = {
|
|
|
1590
1539
|
var h = this.$createElement;
|
|
1591
1540
|
|
|
1592
1541
|
if (this.$props.showClear) {
|
|
1593
|
-
return this.$props.clearIcon || h(CancelSvg);
|
|
1542
|
+
return this.$props.clearIcon || h(CancelSvg.CancelSvg);
|
|
1594
1543
|
}
|
|
1595
1544
|
|
|
1596
1545
|
return null;
|
|
@@ -1659,12 +1608,12 @@ var DataSearch = {
|
|
|
1659
1608
|
showIcon = _this$$props3.showIcon;
|
|
1660
1609
|
var renderMic = this.$scopedSlots.renderMic || this.$props.renderMic;
|
|
1661
1610
|
var currentValue = this.$data.currentValue;
|
|
1662
|
-
return h("div", [h(IconGroup, {
|
|
1611
|
+
return h("div", [h(CancelSvg.IconGroup, {
|
|
1663
1612
|
"attrs": {
|
|
1664
1613
|
"groupPosition": "right",
|
|
1665
1614
|
"positionType": "absolute"
|
|
1666
1615
|
}
|
|
1667
|
-
}, [currentValue && showClear && h(IconWrapper, {
|
|
1616
|
+
}, [currentValue && showClear && h(CancelSvg.IconWrapper, {
|
|
1668
1617
|
"on": {
|
|
1669
1618
|
"click": this.clearValue
|
|
1670
1619
|
},
|
|
@@ -1679,16 +1628,16 @@ var DataSearch = {
|
|
|
1679
1628
|
"handleResult": this.handleVoiceResults,
|
|
1680
1629
|
"className": getClassName$1(innerClass, 'mic') || null
|
|
1681
1630
|
}
|
|
1682
|
-
}), iconPosition === 'right' && showIcon && h(IconWrapper, {
|
|
1631
|
+
}), iconPosition === 'right' && showIcon && h(CancelSvg.IconWrapper, {
|
|
1683
1632
|
"on": {
|
|
1684
1633
|
"click": this.handleSearchIconClick
|
|
1685
1634
|
}
|
|
1686
|
-
}, [this.renderIcon()])]), h(IconGroup, {
|
|
1635
|
+
}, [this.renderIcon()])]), h(CancelSvg.IconGroup, {
|
|
1687
1636
|
"attrs": {
|
|
1688
1637
|
"groupPosition": "left",
|
|
1689
1638
|
"positionType": "absolute"
|
|
1690
1639
|
}
|
|
1691
|
-
}, [iconPosition === 'left' && showIcon && h(IconWrapper, {
|
|
1640
|
+
}, [iconPosition === 'left' && showIcon && h(CancelSvg.IconWrapper, {
|
|
1692
1641
|
"on": {
|
|
1693
1642
|
"click": this.handleSearchIconClick
|
|
1694
1643
|
}
|
|
@@ -1761,7 +1710,7 @@ var DataSearch = {
|
|
|
1761
1710
|
"class": this.$props.className
|
|
1762
1711
|
}, [this.$props.title && h(Title.Title, {
|
|
1763
1712
|
"class": getClassName$1(this.$props.innerClass, 'title') || ''
|
|
1764
|
-
}, [this.$props.title]), this.$props.defaultSuggestions || this.$props.autosuggest ? h(
|
|
1713
|
+
}, [this.$props.title]), this.$props.defaultSuggestions || this.$props.autosuggest ? h(CancelSvg.Downshift, {
|
|
1765
1714
|
"attrs": {
|
|
1766
1715
|
"id": this.$props.componentId + "-downshift",
|
|
1767
1716
|
"handleChange": this.onSuggestionSelected,
|
|
@@ -1786,7 +1735,7 @@ var DataSearch = {
|
|
|
1786
1735
|
highlightedIndex: highlightedIndex
|
|
1787
1736
|
}), _this3.renderErrorComponent(), !_this3.hasCustomRenderer && isOpen && hasSuggestions ? h("ul", {
|
|
1788
1737
|
"class": Input.suggestions(_this3.themePreset, theme) + " " + getClassName$1(_this3.$props.innerClass, 'list')
|
|
1789
|
-
}, [_this3.suggestionsList.slice(0, size).map(function (item, index) {
|
|
1738
|
+
}, [_this3.suggestionsList.slice(0, size || 10).map(function (item, index) {
|
|
1790
1739
|
return h("li", {
|
|
1791
1740
|
"domProps": _rollupPluginBabelHelpers._extends({}, getItemProps({
|
|
1792
1741
|
item: item
|
|
@@ -1878,7 +1827,7 @@ var DataSearch = {
|
|
|
1878
1827
|
|
|
1879
1828
|
return h("div", {
|
|
1880
1829
|
"class": Input.suggestionsContainer
|
|
1881
|
-
}, [h(InputGroup, [_this3.renderInputAddonBefore(), h(InputWrapper, [h(Input.Input, {
|
|
1830
|
+
}, [h(InputGroup, [_this3.renderInputAddonBefore(), h(CancelSvg.InputWrapper, [h(Input.Input, {
|
|
1882
1831
|
"attrs": {
|
|
1883
1832
|
"id": _this3.$props.componentId + "-input",
|
|
1884
1833
|
"showIcon": _this3.$props.showIcon,
|
|
@@ -1922,7 +1871,7 @@ var DataSearch = {
|
|
|
1922
1871
|
}
|
|
1923
1872
|
}) : h("div", {
|
|
1924
1873
|
"class": Input.suggestionsContainer
|
|
1925
|
-
}, [h(InputGroup, [this.renderInputAddonBefore(), h(InputWrapper, [h(Input.Input, {
|
|
1874
|
+
}, [h(InputGroup, [this.renderInputAddonBefore(), h(CancelSvg.InputWrapper, [h(Input.Input, {
|
|
1926
1875
|
"class": getClassName$1(this.$props.innerClass, 'input') || '',
|
|
1927
1876
|
"attrs": {
|
|
1928
1877
|
"placeholder": this.$props.placeholder,
|
|
@@ -9,10 +9,12 @@ var VueTypes = _interopDefault(require('vue-types'));
|
|
|
9
9
|
var emotion = require('emotion');
|
|
10
10
|
var styled = require('@appbaseio/vue-emotion');
|
|
11
11
|
var styled__default = _interopDefault(styled);
|
|
12
|
-
var vueTypes = require('./vueTypes-
|
|
13
|
-
var index = require('./index-
|
|
12
|
+
var vueTypes = require('./vueTypes-57d01f18.js');
|
|
13
|
+
var index = require('./index-4509aa45.js');
|
|
14
|
+
var _mergeJSXProps = _interopDefault(require('@vue/babel-helper-vue-jsx-merge-props'));
|
|
15
|
+
var CancelSvg = require('./CancelSvg-4aa35935.js');
|
|
14
16
|
var Input = require('./Input-3cc3fa59.js');
|
|
15
|
-
var
|
|
17
|
+
var suggestions = require('@appbaseio/reactivecore/lib/utils/suggestions');
|
|
16
18
|
|
|
17
19
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
18
20
|
var small = emotion.css(_templateObject || (_templateObject = _rollupPluginBabelHelpers._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"])));
|
|
@@ -74,7 +76,9 @@ var Dropdown = {
|
|
|
74
76
|
single: VueTypes.bool,
|
|
75
77
|
small: VueTypes.bool.def(false),
|
|
76
78
|
themePreset: vueTypes.types.themePreset,
|
|
77
|
-
showSearch: VueTypes.bool
|
|
79
|
+
showSearch: VueTypes.bool,
|
|
80
|
+
showClear: VueTypes.bool,
|
|
81
|
+
searchPlaceholder: VueTypes.string.def('Type here to search...')
|
|
78
82
|
},
|
|
79
83
|
render: function render() {
|
|
80
84
|
var _this = this;
|
|
@@ -102,7 +106,7 @@ var Dropdown = {
|
|
|
102
106
|
var filteredItemsToRender = itemsToRender.filter(function (item) {
|
|
103
107
|
if (String(item[labelField]).length) {
|
|
104
108
|
if (_this.$props.showSearch && _this.$data.searchTerm) {
|
|
105
|
-
return String(item[labelField]).toLowerCase().includes(_this.$data.searchTerm.toLowerCase());
|
|
109
|
+
return suggestions.replaceDiacritics(String(item[labelField])).toLowerCase().includes(suggestions.replaceDiacritics(_this.$data.searchTerm.toLowerCase()));
|
|
106
110
|
}
|
|
107
111
|
|
|
108
112
|
return true;
|
|
@@ -110,7 +114,7 @@ var Dropdown = {
|
|
|
110
114
|
|
|
111
115
|
return false;
|
|
112
116
|
});
|
|
113
|
-
return h(
|
|
117
|
+
return h(CancelSvg.Downshift, {
|
|
114
118
|
"attrs": {
|
|
115
119
|
"isOpen": this.$data.isOpen,
|
|
116
120
|
"selectedItem": selectedItem,
|
|
@@ -123,7 +127,8 @@ var Dropdown = {
|
|
|
123
127
|
isOpen = _ref.isOpen,
|
|
124
128
|
highlightedIndex = _ref.highlightedIndex,
|
|
125
129
|
getButtonProps = _ref.getButtonProps,
|
|
126
|
-
getItemEvents = _ref.getItemEvents
|
|
130
|
+
getItemEvents = _ref.getItemEvents,
|
|
131
|
+
getInputEvents = _ref.getInputEvents;
|
|
127
132
|
return h("div", {
|
|
128
133
|
"class": Input.suggestionsContainer
|
|
129
134
|
}, [h(Select, {
|
|
@@ -148,25 +153,16 @@ var Dropdown = {
|
|
|
148
153
|
getItemEvents: getItemEvents
|
|
149
154
|
}) : isOpen && itemsToRender.length ? h("ul", {
|
|
150
155
|
"class": Input.suggestions(themePreset, _this.theme) + " " + (_this.$props.small ? 'small' : '') + " " + getClassName(_this.$props.innerClass, 'list')
|
|
151
|
-
}, [_this.$props.showSearch ?
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
"value": _this.$data.searchTerm,
|
|
157
|
-
"themePreset": themePreset
|
|
158
|
-
},
|
|
159
|
-
"style": {
|
|
160
|
-
border: 0,
|
|
161
|
-
borderBottom: '1px solid #ddd'
|
|
162
|
-
},
|
|
163
|
-
"class": getClassName(_this.$props.innerClass, 'input'),
|
|
164
|
-
"on": {
|
|
165
|
-
"change": _this.handleInputChange
|
|
156
|
+
}, [_this.$props.showSearch ? _this.renderSearchbox({
|
|
157
|
+
on: {
|
|
158
|
+
input: getInputEvents({
|
|
159
|
+
onInput: _this.handleInputChange
|
|
160
|
+
}).input
|
|
166
161
|
}
|
|
167
162
|
}) : null, !hasCustomRenderer && filteredItemsToRender.length === 0 ? _this.renderNoResult() : filteredItemsToRender.map(function (item, index) {
|
|
168
163
|
var selected = _this.$props.multi // MultiDropdownList
|
|
169
|
-
&& (selectedItem && !!selectedItem[item[keyField]]
|
|
164
|
+
&& (selectedItem && !!selectedItem[item[keyField]] // MultiDropdownRange
|
|
165
|
+
|| Array.isArray(selectedItem) && selectedItem.find(function (value) {
|
|
170
166
|
return value[labelField] === item[labelField];
|
|
171
167
|
}));
|
|
172
168
|
if (!_this.$props.multi) selected = item.key === selectedItem;
|
|
@@ -216,6 +212,7 @@ var Dropdown = {
|
|
|
216
212
|
|
|
217
213
|
if (!this.$props.multi) {
|
|
218
214
|
this.isOpen = false;
|
|
215
|
+
this.searchTerm = '';
|
|
219
216
|
}
|
|
220
217
|
},
|
|
221
218
|
handleStateChange: function handleStateChange(_ref2) {
|
|
@@ -239,6 +236,9 @@ var Dropdown = {
|
|
|
239
236
|
var value = e.target.value;
|
|
240
237
|
this.searchTerm = value;
|
|
241
238
|
},
|
|
239
|
+
clearSearchTerm: function clearSearchTerm() {
|
|
240
|
+
this.searchTerm = '';
|
|
241
|
+
},
|
|
242
242
|
renderToString: function renderToString(value) {
|
|
243
243
|
var _this2 = this;
|
|
244
244
|
|
|
@@ -279,6 +279,48 @@ var Dropdown = {
|
|
|
279
279
|
return h("p", {
|
|
280
280
|
"class": getClassName(this.$props.innerClass, 'noResults') || null
|
|
281
281
|
}, [index.isFunction(renderNoResults) ? renderNoResults() : renderNoResults]);
|
|
282
|
+
},
|
|
283
|
+
renderSearchbox: function renderSearchbox(eventObject) {
|
|
284
|
+
var h = this.$createElement;
|
|
285
|
+
var _this$$props2 = this.$props,
|
|
286
|
+
componentId = _this$$props2.componentId,
|
|
287
|
+
searchPlaceholder = _this$$props2.searchPlaceholder,
|
|
288
|
+
showClear = _this$$props2.showClear,
|
|
289
|
+
themePreset = _this$$props2.themePreset,
|
|
290
|
+
innerClass = _this$$props2.innerClass;
|
|
291
|
+
var InputComponent = h(Input.Input, _mergeJSXProps([{
|
|
292
|
+
"attrs": {
|
|
293
|
+
"id": componentId + "-input",
|
|
294
|
+
"showIcon": false,
|
|
295
|
+
"showClear": showClear,
|
|
296
|
+
"placeholder": searchPlaceholder,
|
|
297
|
+
"value": this.$data.searchTerm,
|
|
298
|
+
"themePreset": themePreset
|
|
299
|
+
},
|
|
300
|
+
"style": {
|
|
301
|
+
border: 0,
|
|
302
|
+
borderBottom: '1px solid #ddd'
|
|
303
|
+
},
|
|
304
|
+
"class": getClassName(innerClass, 'input')
|
|
305
|
+
}, eventObject]));
|
|
306
|
+
|
|
307
|
+
if (showClear) {
|
|
308
|
+
return h(CancelSvg.InputWrapper, [InputComponent, this.searchTerm && h(CancelSvg.IconGroup, {
|
|
309
|
+
"attrs": {
|
|
310
|
+
"groupPosition": "right",
|
|
311
|
+
"positionType": "absolute"
|
|
312
|
+
}
|
|
313
|
+
}, [h(CancelSvg.IconWrapper, {
|
|
314
|
+
"on": {
|
|
315
|
+
"click": this.clearSearchTerm
|
|
316
|
+
},
|
|
317
|
+
"attrs": {
|
|
318
|
+
"isClearIcon": true
|
|
319
|
+
}
|
|
320
|
+
}, [h(CancelSvg.CancelSvg)])])]);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
return InputComponent;
|
|
282
324
|
}
|
|
283
325
|
}
|
|
284
326
|
};
|