@appbaseio/reactivesearch-vue 1.24.3 → 1.25.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 +280 -134
- 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-62d42af4.js} +57 -0
- package/dist/cjs/DataSearch.js +28 -79
- package/dist/cjs/{DropDown-6815b9b6.js → DropDown-5847d6e4.js} +59 -22
- package/dist/cjs/MultiDropdownList.js +11 -4
- package/dist/cjs/MultiList.js +3 -2
- package/dist/cjs/ReactiveBase.js +4 -2
- package/dist/cjs/ReactiveList.js +48 -41
- package/dist/cjs/SingleDropdownList.js +11 -4
- package/dist/cjs/SingleList.js +4 -3
- package/dist/cjs/ToggleButton.js +1 -1
- package/dist/cjs/index.js +5 -2
- package/dist/cjs/initReactivesearch.js +19 -0
- package/dist/cjs/install.js +3 -2
- package/dist/cjs/version.js +1 -1
- package/dist/es/{DownShift-3558d402.js → CancelSvg-e0cace2d.js} +54 -2
- package/dist/es/DataSearch.js +18 -69
- package/dist/es/{DropDown-035c804f.js → DropDown-1ee01031.js} +58 -21
- package/dist/es/MultiDropdownList.js +11 -4
- package/dist/es/MultiList.js +3 -2
- package/dist/es/ReactiveBase.js +4 -2
- package/dist/es/ReactiveList.js +48 -41
- package/dist/es/SingleDropdownList.js +11 -4
- package/dist/es/SingleList.js +4 -3
- package/dist/es/ToggleButton.js +1 -1
- package/dist/es/index.js +5 -2
- package/dist/es/initReactivesearch.js +19 -0
- package/dist/es/install.js +3 -2
- package/dist/es/version.js +1 -1
- package/package.json +2 -2
|
@@ -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
|
|
@@ -402,4 +430,33 @@ var Downshift = {
|
|
|
402
430
|
}
|
|
403
431
|
};
|
|
404
432
|
|
|
433
|
+
var CancelSvg = {
|
|
434
|
+
functional: true,
|
|
435
|
+
render: function render(h) {
|
|
436
|
+
return h("svg", {
|
|
437
|
+
"attrs": {
|
|
438
|
+
"alt": "Clear",
|
|
439
|
+
"xmlns": "http://www.w3.org/2000/svg",
|
|
440
|
+
"height": "20px",
|
|
441
|
+
"viewBox": "0 0 24 24",
|
|
442
|
+
"width": "20px"
|
|
443
|
+
},
|
|
444
|
+
"class": "cancel-icon"
|
|
445
|
+
}, [h("title", ["Clear"]), h("path", {
|
|
446
|
+
"attrs": {
|
|
447
|
+
"d": "M0 0h24v24H0V0z",
|
|
448
|
+
"fill": "none"
|
|
449
|
+
}
|
|
450
|
+
}), h("path", {
|
|
451
|
+
"attrs": {
|
|
452
|
+
"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"
|
|
453
|
+
}
|
|
454
|
+
})]);
|
|
455
|
+
}
|
|
456
|
+
};
|
|
457
|
+
|
|
458
|
+
exports.CancelSvg = CancelSvg;
|
|
405
459
|
exports.Downshift = Downshift;
|
|
460
|
+
exports.IconGroup = IconGroup;
|
|
461
|
+
exports.IconWrapper = IconWrapper;
|
|
462
|
+
exports.InputWrapper = InputWrapper;
|
package/dist/cjs/DataSearch.js
CHANGED
|
@@ -22,9 +22,9 @@ var ComponentWrapper = require('./ComponentWrapper-32481890.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-62d42af4.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() {
|
|
@@ -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,
|
|
@@ -11,8 +11,9 @@ var styled = require('@appbaseio/vue-emotion');
|
|
|
11
11
|
var styled__default = _interopDefault(styled);
|
|
12
12
|
var vueTypes = require('./vueTypes-4c19b4c8.js');
|
|
13
13
|
var index = require('./index-89c39a9e.js');
|
|
14
|
+
var CancelSvg = require('./CancelSvg-62d42af4.js');
|
|
14
15
|
var Input = require('./Input-3cc3fa59.js');
|
|
15
|
-
var
|
|
16
|
+
var suggestions = require('@appbaseio/reactivecore/lib/utils/suggestions');
|
|
16
17
|
|
|
17
18
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
18
19
|
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 +75,9 @@ var Dropdown = {
|
|
|
74
75
|
single: VueTypes.bool,
|
|
75
76
|
small: VueTypes.bool.def(false),
|
|
76
77
|
themePreset: vueTypes.types.themePreset,
|
|
77
|
-
showSearch: VueTypes.bool
|
|
78
|
+
showSearch: VueTypes.bool,
|
|
79
|
+
showClear: VueTypes.bool,
|
|
80
|
+
searchPlaceholder: VueTypes.string.def('Type here to search...')
|
|
78
81
|
},
|
|
79
82
|
render: function render() {
|
|
80
83
|
var _this = this;
|
|
@@ -102,7 +105,7 @@ var Dropdown = {
|
|
|
102
105
|
var filteredItemsToRender = itemsToRender.filter(function (item) {
|
|
103
106
|
if (String(item[labelField]).length) {
|
|
104
107
|
if (_this.$props.showSearch && _this.$data.searchTerm) {
|
|
105
|
-
return String(item[labelField]).toLowerCase().includes(_this.$data.searchTerm.toLowerCase());
|
|
108
|
+
return suggestions.replaceDiacritics(String(item[labelField])).toLowerCase().includes(suggestions.replaceDiacritics(_this.$data.searchTerm.toLowerCase()));
|
|
106
109
|
}
|
|
107
110
|
|
|
108
111
|
return true;
|
|
@@ -110,7 +113,7 @@ var Dropdown = {
|
|
|
110
113
|
|
|
111
114
|
return false;
|
|
112
115
|
});
|
|
113
|
-
return h(
|
|
116
|
+
return h(CancelSvg.Downshift, {
|
|
114
117
|
"attrs": {
|
|
115
118
|
"isOpen": this.$data.isOpen,
|
|
116
119
|
"selectedItem": selectedItem,
|
|
@@ -148,25 +151,10 @@ var Dropdown = {
|
|
|
148
151
|
getItemEvents: getItemEvents
|
|
149
152
|
}) : isOpen && itemsToRender.length ? h("ul", {
|
|
150
153
|
"class": Input.suggestions(themePreset, _this.theme) + " " + (_this.$props.small ? 'small' : '') + " " + getClassName(_this.$props.innerClass, 'list')
|
|
151
|
-
}, [_this.$props.showSearch ?
|
|
152
|
-
"attrs": {
|
|
153
|
-
"id": _this.$props.componentId + "-input",
|
|
154
|
-
"showIcon": false,
|
|
155
|
-
"placeholder": "Type here to search...",
|
|
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
|
|
166
|
-
}
|
|
167
|
-
}) : null, !hasCustomRenderer && filteredItemsToRender.length === 0 ? _this.renderNoResult() : filteredItemsToRender.map(function (item, index) {
|
|
154
|
+
}, [_this.$props.showSearch ? _this.renderSearchbox() : null, !hasCustomRenderer && filteredItemsToRender.length === 0 ? _this.renderNoResult() : filteredItemsToRender.map(function (item, index) {
|
|
168
155
|
var selected = _this.$props.multi // MultiDropdownList
|
|
169
|
-
&& (selectedItem && !!selectedItem[item[keyField]]
|
|
156
|
+
&& (selectedItem && !!selectedItem[item[keyField]] // MultiDropdownRange
|
|
157
|
+
|| Array.isArray(selectedItem) && selectedItem.find(function (value) {
|
|
170
158
|
return value[labelField] === item[labelField];
|
|
171
159
|
}));
|
|
172
160
|
if (!_this.$props.multi) selected = item.key === selectedItem;
|
|
@@ -216,6 +204,7 @@ var Dropdown = {
|
|
|
216
204
|
|
|
217
205
|
if (!this.$props.multi) {
|
|
218
206
|
this.isOpen = false;
|
|
207
|
+
this.searchTerm = '';
|
|
219
208
|
}
|
|
220
209
|
},
|
|
221
210
|
handleStateChange: function handleStateChange(_ref2) {
|
|
@@ -239,6 +228,9 @@ var Dropdown = {
|
|
|
239
228
|
var value = e.target.value;
|
|
240
229
|
this.searchTerm = value;
|
|
241
230
|
},
|
|
231
|
+
clearSearchTerm: function clearSearchTerm() {
|
|
232
|
+
this.searchTerm = '';
|
|
233
|
+
},
|
|
242
234
|
renderToString: function renderToString(value) {
|
|
243
235
|
var _this2 = this;
|
|
244
236
|
|
|
@@ -279,6 +271,51 @@ var Dropdown = {
|
|
|
279
271
|
return h("p", {
|
|
280
272
|
"class": getClassName(this.$props.innerClass, 'noResults') || null
|
|
281
273
|
}, [index.isFunction(renderNoResults) ? renderNoResults() : renderNoResults]);
|
|
274
|
+
},
|
|
275
|
+
renderSearchbox: function renderSearchbox() {
|
|
276
|
+
var h = this.$createElement;
|
|
277
|
+
var _this$$props2 = this.$props,
|
|
278
|
+
componentId = _this$$props2.componentId,
|
|
279
|
+
searchPlaceholder = _this$$props2.searchPlaceholder,
|
|
280
|
+
showClear = _this$$props2.showClear,
|
|
281
|
+
themePreset = _this$$props2.themePreset,
|
|
282
|
+
innerClass = _this$$props2.innerClass;
|
|
283
|
+
var InputComponent = h(Input.Input, {
|
|
284
|
+
"attrs": {
|
|
285
|
+
"id": componentId + "-input",
|
|
286
|
+
"showIcon": false,
|
|
287
|
+
"showClear": showClear,
|
|
288
|
+
"placeholder": searchPlaceholder,
|
|
289
|
+
"value": this.$data.searchTerm,
|
|
290
|
+
"themePreset": themePreset
|
|
291
|
+
},
|
|
292
|
+
"style": {
|
|
293
|
+
border: 0,
|
|
294
|
+
borderBottom: '1px solid #ddd'
|
|
295
|
+
},
|
|
296
|
+
"class": getClassName(innerClass, 'input'),
|
|
297
|
+
"on": {
|
|
298
|
+
"change": this.handleInputChange
|
|
299
|
+
}
|
|
300
|
+
});
|
|
301
|
+
|
|
302
|
+
if (showClear) {
|
|
303
|
+
return h(CancelSvg.InputWrapper, [InputComponent, this.searchTerm && h(CancelSvg.IconGroup, {
|
|
304
|
+
"attrs": {
|
|
305
|
+
"groupPosition": "right",
|
|
306
|
+
"positionType": "absolute"
|
|
307
|
+
}
|
|
308
|
+
}, [h(CancelSvg.IconWrapper, {
|
|
309
|
+
"on": {
|
|
310
|
+
"click": this.clearSearchTerm
|
|
311
|
+
},
|
|
312
|
+
"attrs": {
|
|
313
|
+
"isClearIcon": true
|
|
314
|
+
}
|
|
315
|
+
}, [h(CancelSvg.CancelSvg)])])]);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
return InputComponent;
|
|
282
319
|
}
|
|
283
320
|
}
|
|
284
321
|
};
|
|
@@ -19,12 +19,13 @@ require('redux');
|
|
|
19
19
|
var index = require('./index-89c39a9e.js');
|
|
20
20
|
var ComponentWrapper = require('./ComponentWrapper-32481890.js');
|
|
21
21
|
var Title = require('./Title-584a8cc8.js');
|
|
22
|
+
require('./CancelSvg-62d42af4.js');
|
|
22
23
|
require('./Input-3cc3fa59.js');
|
|
23
24
|
require('compute-scroll-into-view');
|
|
24
|
-
require('./DownShift-62e82255.js');
|
|
25
25
|
var Container = require('./Container-526efa6a.js');
|
|
26
|
+
require('@appbaseio/reactivecore/lib/utils/suggestions');
|
|
26
27
|
var utils = require('./utils-1219e1fe.js');
|
|
27
|
-
var DropDown = require('./DropDown-
|
|
28
|
+
var DropDown = require('./DropDown-5847d6e4.js');
|
|
28
29
|
|
|
29
30
|
var updateQuery = configureStore.Actions.updateQuery,
|
|
30
31
|
setQueryOptions = configureStore.Actions.setQueryOptions,
|
|
@@ -81,10 +82,12 @@ var MultiDropdownList = {
|
|
|
81
82
|
showMissing: VueTypes.bool.def(false),
|
|
82
83
|
missingLabel: VueTypes.string.def('N/A'),
|
|
83
84
|
showSearch: VueTypes.bool.def(false),
|
|
85
|
+
showClear: VueTypes.bool.def(false),
|
|
84
86
|
showLoadMore: VueTypes.bool.def(false),
|
|
85
87
|
loadMoreLabel: VueTypes.oneOfType([VueTypes.string, VueTypes.any]).def('Load More'),
|
|
86
88
|
nestedField: vueTypes.types.string,
|
|
87
|
-
index: VueTypes.string
|
|
89
|
+
index: VueTypes.string,
|
|
90
|
+
searchPlaceholder: VueTypes.string.def('Type here to search...')
|
|
88
91
|
},
|
|
89
92
|
created: function created() {
|
|
90
93
|
if (!this.enableAppbase && this.$props.index) {
|
|
@@ -212,7 +215,9 @@ var MultiDropdownList = {
|
|
|
212
215
|
if (!this.hasCustomRenderer && this.$data.modifiedOptions.length === 0 && !this.isLoading) {
|
|
213
216
|
if (renderNoResults && index.isFunction(renderNoResults)) {
|
|
214
217
|
return h("div", [renderNoResults()]);
|
|
215
|
-
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
if (renderNoResults && !index.isFunction(renderNoResults)) {
|
|
216
221
|
return renderNoResults;
|
|
217
222
|
}
|
|
218
223
|
|
|
@@ -251,6 +256,8 @@ var MultiDropdownList = {
|
|
|
251
256
|
"renderItem": renderItemCalc,
|
|
252
257
|
"renderNoResults": this.$scopedSlots.renderNoResults || this.$props.renderNoResults,
|
|
253
258
|
"showSearch": this.$props.showSearch,
|
|
259
|
+
"showClear": this.$props.showClear,
|
|
260
|
+
"searchPlaceholder": this.$props.searchPlaceholder,
|
|
254
261
|
"transformData": this.$props.transformData,
|
|
255
262
|
"footer": showLoadMore && !isLastBucket && h("div", {
|
|
256
263
|
"attrs": {
|
package/dist/cjs/MultiList.js
CHANGED
|
@@ -20,6 +20,7 @@ var ComponentWrapper = require('./ComponentWrapper-32481890.js');
|
|
|
20
20
|
var Title = require('./Title-584a8cc8.js');
|
|
21
21
|
var Input = require('./Input-3cc3fa59.js');
|
|
22
22
|
var Container = require('./Container-526efa6a.js');
|
|
23
|
+
var suggestions = require('@appbaseio/reactivecore/lib/utils/suggestions');
|
|
23
24
|
var FormControlList = require('./FormControlList-808dbcef.js');
|
|
24
25
|
var utils = require('./utils-1219e1fe.js');
|
|
25
26
|
|
|
@@ -40,7 +41,7 @@ var MultiList = {
|
|
|
40
41
|
queryFormat: VueTypes.oneOf(['and', 'or']).def('or'),
|
|
41
42
|
showCheckbox: VueTypes.bool.def(true),
|
|
42
43
|
beforeValueChange: vueTypes.types.func,
|
|
43
|
-
className:
|
|
44
|
+
className: VueTypes.string.def(''),
|
|
44
45
|
componentId: vueTypes.types.stringRequired,
|
|
45
46
|
customQuery: vueTypes.types.func,
|
|
46
47
|
dataField: vueTypes.types.stringRequired,
|
|
@@ -187,7 +188,7 @@ var MultiList = {
|
|
|
187
188
|
var filteredItemsToRender = itemsToRender.filter(function (item) {
|
|
188
189
|
if (String(item.key).length) {
|
|
189
190
|
if (_this2.$props.showSearch && _this2.$data.searchTerm) {
|
|
190
|
-
return String(item.key).toLowerCase().includes(_this2.$data.searchTerm.toLowerCase());
|
|
191
|
+
return suggestions.replaceDiacritics(String(item.key)).toLowerCase().includes(suggestions.replaceDiacritics(_this2.$data.searchTerm).toLowerCase());
|
|
191
192
|
}
|
|
192
193
|
|
|
193
194
|
return true;
|
package/dist/cjs/ReactiveBase.js
CHANGED
|
@@ -85,7 +85,7 @@ var URLParamsProvider = {
|
|
|
85
85
|
headers: vueTypes.types.headers,
|
|
86
86
|
getSearchParams: vueTypes.types.func,
|
|
87
87
|
setSearchParams: vueTypes.types.func,
|
|
88
|
-
as:
|
|
88
|
+
as: VueTypes.string.def('div')
|
|
89
89
|
},
|
|
90
90
|
mounted: function mounted() {
|
|
91
91
|
var _this = this;
|
|
@@ -233,7 +233,9 @@ var URLParamsProvider = {
|
|
|
233
233
|
return value.map(function (item) {
|
|
234
234
|
return _this3.getValue(item);
|
|
235
235
|
});
|
|
236
|
-
}
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
if (value && typeof value === 'object') {
|
|
237
239
|
// TODO: support for NestedList
|
|
238
240
|
if (value.location) return value;
|
|
239
241
|
if (value.category) return value;
|