@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
package/dist/es/DataSearch.js
CHANGED
|
@@ -14,9 +14,9 @@ import { C as ComponentWrapper } from './ComponentWrapper-4f85a67e.js';
|
|
|
14
14
|
import { T as Title } from './Title-3522ff56.js';
|
|
15
15
|
import { F as Flex } from './Flex-8770345d.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-e0cace2d.js';
|
|
17
18
|
import { n as noSuggestions, s as suggestionsContainer, I as Input, a as suggestions } from './Input-08bb1bcf.js';
|
|
18
19
|
import 'compute-scroll-into-view';
|
|
19
|
-
import { D as Downshift } from './DownShift-3558d402.js';
|
|
20
20
|
import { C as Container } from './Container-18b03fde.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
|
|
@@ -5,8 +5,9 @@ import { css } from 'emotion';
|
|
|
5
5
|
import styled from '@appbaseio/vue-emotion';
|
|
6
6
|
import { t as types } from './vueTypes-fb61bb7b.js';
|
|
7
7
|
import { a as isFunction } from './index-cb1950b6.js';
|
|
8
|
+
import { D as Downshift, b as InputWrapper, a as IconGroup, I as IconWrapper, C as CancelSvg } from './CancelSvg-e0cace2d.js';
|
|
8
9
|
import { s as suggestionsContainer, a as suggestions, I as Input } from './Input-08bb1bcf.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
|
};
|
|
@@ -12,12 +12,13 @@ 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-cb1950b6.js';
|
|
13
13
|
import { C as ComponentWrapper } from './ComponentWrapper-4f85a67e.js';
|
|
14
14
|
import { T as Title } from './Title-3522ff56.js';
|
|
15
|
+
import './CancelSvg-e0cace2d.js';
|
|
15
16
|
import './Input-08bb1bcf.js';
|
|
16
17
|
import 'compute-scroll-into-view';
|
|
17
|
-
import './DownShift-3558d402.js';
|
|
18
18
|
import { C as Container } from './Container-18b03fde.js';
|
|
19
|
+
import '@appbaseio/reactivecore/lib/utils/suggestions';
|
|
19
20
|
import { g as getAggsQuery } from './utils-64a2e5f0.js';
|
|
20
|
-
import { D as Dropdown } from './DropDown-
|
|
21
|
+
import { D as Dropdown } from './DropDown-1ee01031.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": {
|
package/dist/es/MultiList.js
CHANGED
|
@@ -13,6 +13,7 @@ import { C as ComponentWrapper } from './ComponentWrapper-4f85a67e.js';
|
|
|
13
13
|
import { T as Title } from './Title-3522ff56.js';
|
|
14
14
|
import { I as Input } from './Input-08bb1bcf.js';
|
|
15
15
|
import { C as Container } from './Container-18b03fde.js';
|
|
16
|
+
import { replaceDiacritics } from '@appbaseio/reactivecore/lib/utils/suggestions';
|
|
16
17
|
import { U as UL, C as Checkbox } from './FormControlList-704f8dee.js';
|
|
17
18
|
import { g as getAggsQuery } from './utils-64a2e5f0.js';
|
|
18
19
|
|
|
@@ -33,7 +34,7 @@ var MultiList = {
|
|
|
33
34
|
queryFormat: VueTypes.oneOf(['and', 'or']).def('or'),
|
|
34
35
|
showCheckbox: VueTypes.bool.def(true),
|
|
35
36
|
beforeValueChange: types.func,
|
|
36
|
-
className:
|
|
37
|
+
className: VueTypes.string.def(''),
|
|
37
38
|
componentId: types.stringRequired,
|
|
38
39
|
customQuery: types.func,
|
|
39
40
|
dataField: types.stringRequired,
|
|
@@ -180,7 +181,7 @@ var MultiList = {
|
|
|
180
181
|
var filteredItemsToRender = itemsToRender.filter(function (item) {
|
|
181
182
|
if (String(item.key).length) {
|
|
182
183
|
if (_this2.$props.showSearch && _this2.$data.searchTerm) {
|
|
183
|
-
return String(item.key).toLowerCase().includes(_this2.$data.searchTerm.toLowerCase());
|
|
184
|
+
return replaceDiacritics(String(item.key)).toLowerCase().includes(replaceDiacritics(_this2.$data.searchTerm).toLowerCase());
|
|
184
185
|
}
|
|
185
186
|
|
|
186
187
|
return true;
|
package/dist/es/ReactiveBase.js
CHANGED
|
@@ -77,7 +77,7 @@ var URLParamsProvider = {
|
|
|
77
77
|
headers: types.headers,
|
|
78
78
|
getSearchParams: types.func,
|
|
79
79
|
setSearchParams: types.func,
|
|
80
|
-
as:
|
|
80
|
+
as: VueTypes.string.def('div')
|
|
81
81
|
},
|
|
82
82
|
mounted: function mounted() {
|
|
83
83
|
var _this = this;
|
|
@@ -225,7 +225,9 @@ var URLParamsProvider = {
|
|
|
225
225
|
return value.map(function (item) {
|
|
226
226
|
return _this3.getValue(item);
|
|
227
227
|
});
|
|
228
|
-
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
if (value && typeof value === 'object') {
|
|
229
231
|
// TODO: support for NestedList
|
|
230
232
|
if (value.location) return value;
|
|
231
233
|
if (value.category) return value;
|
package/dist/es/ReactiveList.js
CHANGED
|
@@ -486,9 +486,14 @@ var ReactiveList = {
|
|
|
486
486
|
}
|
|
487
487
|
|
|
488
488
|
this.internalComponent = this.$props.componentId + "__internal";
|
|
489
|
-
this.sortOptionIndex =
|
|
490
|
-
|
|
491
|
-
|
|
489
|
+
this.sortOptionIndex = 0;
|
|
490
|
+
|
|
491
|
+
if (this.defaultSortOption && this.sortOptions && Array.isArray(this.sortOptions)) {
|
|
492
|
+
this.sortOptionIndex = this.sortOptions.findIndex(function (s) {
|
|
493
|
+
return s.label === _this.defaultSortOption;
|
|
494
|
+
});
|
|
495
|
+
}
|
|
496
|
+
|
|
492
497
|
this.updateComponentProps(this.componentId, {
|
|
493
498
|
from: this.from
|
|
494
499
|
}, componentTypes.reactiveList);
|
|
@@ -498,7 +503,7 @@ var ReactiveList = {
|
|
|
498
503
|
},
|
|
499
504
|
props: {
|
|
500
505
|
currentPage: VueTypes.number.def(0),
|
|
501
|
-
includeFields: types.includeFields
|
|
506
|
+
includeFields: types.includeFields,
|
|
502
507
|
// component props
|
|
503
508
|
className: types.string,
|
|
504
509
|
componentId: types.stringRequired,
|
|
@@ -507,7 +512,7 @@ var ReactiveList = {
|
|
|
507
512
|
aggregationSize: VueTypes.number,
|
|
508
513
|
defaultQuery: types.func,
|
|
509
514
|
defaultSortOption: types.string,
|
|
510
|
-
excludeFields: types.excludeFields
|
|
515
|
+
excludeFields: types.excludeFields,
|
|
511
516
|
innerClass: types.style,
|
|
512
517
|
listClass: VueTypes.string.def(''),
|
|
513
518
|
loader: types.title,
|
|
@@ -519,7 +524,7 @@ var ReactiveList = {
|
|
|
519
524
|
pages: VueTypes.number.def(5),
|
|
520
525
|
pagination: VueTypes.bool.def(false),
|
|
521
526
|
infiniteScroll: VueTypes.bool.def(true),
|
|
522
|
-
paginationAt:
|
|
527
|
+
paginationAt: VueTypes.oneOf(['top', 'bottom', 'both']).def('bottom'),
|
|
523
528
|
react: types.react,
|
|
524
529
|
scrollOnChange: VueTypes.bool.def(true),
|
|
525
530
|
showResultStats: VueTypes.bool.def(true),
|
|
@@ -720,11 +725,11 @@ var ReactiveList = {
|
|
|
720
725
|
var options = getQueryOptions(this.$props);
|
|
721
726
|
options.from = this.$data.from;
|
|
722
727
|
|
|
723
|
-
if (this
|
|
728
|
+
if (this.sortOptions && this.sortOptions[this.sortOptionIndex]) {
|
|
724
729
|
var _ref2;
|
|
725
730
|
|
|
726
|
-
var sortField = this
|
|
727
|
-
var sortBy = this
|
|
731
|
+
var sortField = this.sortOptions[this.sortOptionIndex].dataField;
|
|
732
|
+
var sortBy = this.sortOptions[this.sortOptionIndex].sortBy;
|
|
728
733
|
options.sort = [(_ref2 = {}, _ref2[sortField] = {
|
|
729
734
|
order: sortBy
|
|
730
735
|
}, _ref2)]; // To handle sort options for RS API
|
|
@@ -794,10 +799,10 @@ var ReactiveList = {
|
|
|
794
799
|
"class": this.$props.className
|
|
795
800
|
}, [this.isLoading && this.shouldRenderPagination && this.showInfiniteScroll && (this.$scopedSlots.loader || this.$props.loader), this.renderErrorComponent(), h(Flex, {
|
|
796
801
|
"attrs": {
|
|
797
|
-
"labelPosition": this
|
|
802
|
+
"labelPosition": this.sortOptions ? 'right' : 'left'
|
|
798
803
|
},
|
|
799
804
|
"class": getClassName$1(this.$props.innerClass, 'resultsInfo')
|
|
800
|
-
}, [this
|
|
805
|
+
}, [this.sortOptions ? this.renderSortOptions() : null, this.$props.showResultStats && results.length ? this.renderStats() : null]), !this.isLoading && results.length === 0 ? this.renderNoResult() : null, this.shouldRenderPagination && (this.$props.paginationAt === 'top' || this.$props.paginationAt === 'both') ? h(Pagination, {
|
|
801
806
|
"attrs": {
|
|
802
807
|
"pages": this.$props.pages,
|
|
803
808
|
"totalPages": this.totalPages,
|
|
@@ -868,15 +873,18 @@ var ReactiveList = {
|
|
|
868
873
|
var options = getQueryOptions(props);
|
|
869
874
|
options.from = this.$data.from;
|
|
870
875
|
|
|
871
|
-
if (props.sortOptions) {
|
|
872
|
-
var _ref5;
|
|
873
|
-
|
|
876
|
+
if (props.sortOptions && Array.isArray(props.sortOptions)) {
|
|
874
877
|
var sortOptionIndex = props.defaultSortOption ? props.sortOptions.findIndex(function (s) {
|
|
875
878
|
return s.label === props.defaultSortOption;
|
|
876
879
|
}) : 0;
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
+
|
|
881
|
+
if (props.sortOptions[sortOptionIndex]) {
|
|
882
|
+
var _ref5;
|
|
883
|
+
|
|
884
|
+
options.sort = [(_ref5 = {}, _ref5[props.sortOptions[sortOptionIndex].dataField] = {
|
|
885
|
+
order: props.sortOptions[sortOptionIndex].sortBy
|
|
886
|
+
}, _ref5)];
|
|
887
|
+
}
|
|
880
888
|
} else if (props.sortBy) {
|
|
881
889
|
var _ref6;
|
|
882
890
|
|
|
@@ -982,26 +990,29 @@ var ReactiveList = {
|
|
|
982
990
|
}, [isFunction(renderNoResults) ? renderNoResults() : renderNoResults]);
|
|
983
991
|
},
|
|
984
992
|
handleSortChange: function handleSortChange(e) {
|
|
985
|
-
var
|
|
993
|
+
var index = e.target.value;
|
|
986
994
|
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
var options = getQueryOptions(this.$props);
|
|
990
|
-
options.from = 0;
|
|
991
|
-
var sortField = this.$props.sortOptions[index].dataField;
|
|
992
|
-
var sortBy = this.$props.sortOptions[index].sortBy;
|
|
993
|
-
options.sort = [(_ref7 = {}, _ref7[sortField] = {
|
|
994
|
-
order: sortBy
|
|
995
|
-
}, _ref7)];
|
|
996
|
-
this.sortOptionIndex = index; // To handle sort options for RS API
|
|
995
|
+
if (this.sortOptions && this.sortOptions[index]) {
|
|
996
|
+
var _ref7;
|
|
997
997
|
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
998
|
+
// This fixes issue #371 (where sorting a multi-result page with infinite loader breaks)
|
|
999
|
+
var options = getQueryOptions(this.$props);
|
|
1000
|
+
options.from = 0;
|
|
1001
|
+
var sortField = this.sortOptions[index].dataField;
|
|
1002
|
+
var sortBy = this.sortOptions[index].sortBy;
|
|
1003
|
+
options.sort = [(_ref7 = {}, _ref7[sortField] = {
|
|
1004
|
+
order: sortBy
|
|
1005
|
+
}, _ref7)];
|
|
1006
|
+
this.sortOptionIndex = index; // To handle sort options for RS API
|
|
1007
|
+
|
|
1008
|
+
this.updateComponentProps(this.componentId, {
|
|
1009
|
+
dataField: sortField,
|
|
1010
|
+
sortBy: sortBy
|
|
1011
|
+
}, componentTypes.reactiveList);
|
|
1012
|
+
this.setQueryOptions(this.$props.componentId, options, true);
|
|
1013
|
+
this.currentPageState = 0;
|
|
1014
|
+
this.from = 0;
|
|
1015
|
+
}
|
|
1005
1016
|
},
|
|
1006
1017
|
triggerClickAnalytics: function triggerClickAnalytics(searchPosition, documentId) {
|
|
1007
1018
|
var docId = documentId;
|
|
@@ -1035,7 +1046,7 @@ var ReactiveList = {
|
|
|
1035
1046
|
"domProps": {
|
|
1036
1047
|
"value": this.sortOptionIndex
|
|
1037
1048
|
}
|
|
1038
|
-
}, [this
|
|
1049
|
+
}, [this.sortOptions.map(function (sort, index) {
|
|
1039
1050
|
return h("option", {
|
|
1040
1051
|
"key": sort.label,
|
|
1041
1052
|
"domProps": {
|
|
@@ -1141,11 +1152,7 @@ var mapDispatchtoProps = {
|
|
|
1141
1152
|
}; // Only used for SSR
|
|
1142
1153
|
|
|
1143
1154
|
ReactiveList.generateQueryOptions = function (props) {
|
|
1144
|
-
|
|
1145
|
-
var options = getQueryOptions(_extends({
|
|
1146
|
-
includeFields: ['*'],
|
|
1147
|
-
excludeFields: []
|
|
1148
|
-
}, props));
|
|
1155
|
+
var options = getQueryOptions(props);
|
|
1149
1156
|
var size = props.size,
|
|
1150
1157
|
dataField = props.dataField,
|
|
1151
1158
|
defaultSortOption = props.defaultSortOption,
|
|
@@ -12,12 +12,13 @@ import 'redux';
|
|
|
12
12
|
import { f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, a as isFunction, g as getComponent, h as hasCustomRenderer, c as connect } from './index-cb1950b6.js';
|
|
13
13
|
import { C as ComponentWrapper } from './ComponentWrapper-4f85a67e.js';
|
|
14
14
|
import { T as Title } from './Title-3522ff56.js';
|
|
15
|
+
import './CancelSvg-e0cace2d.js';
|
|
15
16
|
import './Input-08bb1bcf.js';
|
|
16
17
|
import 'compute-scroll-into-view';
|
|
17
|
-
import './DownShift-3558d402.js';
|
|
18
18
|
import { C as Container } from './Container-18b03fde.js';
|
|
19
|
+
import '@appbaseio/reactivecore/lib/utils/suggestions';
|
|
19
20
|
import { g as getAggsQuery } from './utils-64a2e5f0.js';
|
|
20
|
-
import { D as Dropdown } from './DropDown-
|
|
21
|
+
import { D as Dropdown } from './DropDown-1ee01031.js';
|
|
21
22
|
|
|
22
23
|
var updateQuery = Actions.updateQuery,
|
|
23
24
|
setQueryOptions = Actions.setQueryOptions,
|
|
@@ -73,10 +74,12 @@ var SingleDropdownList = {
|
|
|
73
74
|
showMissing: VueTypes.bool.def(false),
|
|
74
75
|
missingLabel: VueTypes.string.def('N/A'),
|
|
75
76
|
showSearch: VueTypes.bool.def(false),
|
|
77
|
+
showClear: VueTypes.bool.def(false),
|
|
76
78
|
showLoadMore: VueTypes.bool.def(false),
|
|
77
79
|
loadMoreLabel: VueTypes.oneOfType([VueTypes.string, VueTypes.any]).def('Load More'),
|
|
78
80
|
nestedField: types.string,
|
|
79
|
-
index: VueTypes.string
|
|
81
|
+
index: VueTypes.string,
|
|
82
|
+
searchPlaceholder: VueTypes.string.def('Type here to search...')
|
|
80
83
|
},
|
|
81
84
|
created: function created() {
|
|
82
85
|
if (!this.enableAppbase && this.$props.index) {
|
|
@@ -190,7 +193,9 @@ var SingleDropdownList = {
|
|
|
190
193
|
if (!this.hasCustomRenderer && this.$data.modifiedOptions.length === 0 && !this.isLoading) {
|
|
191
194
|
if (renderNoResults && isFunction(renderNoResults)) {
|
|
192
195
|
return h("div", [renderNoResults()]);
|
|
193
|
-
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
if (renderNoResults && !isFunction(renderNoResults)) {
|
|
194
199
|
return renderNoResults;
|
|
195
200
|
}
|
|
196
201
|
|
|
@@ -228,6 +233,8 @@ var SingleDropdownList = {
|
|
|
228
233
|
"renderNoResults": this.$scopedSlots.renderNoResults || this.$props.renderNoResults,
|
|
229
234
|
"themePreset": this.themePreset,
|
|
230
235
|
"showSearch": this.$props.showSearch,
|
|
236
|
+
"showClear": this.$props.showClear,
|
|
237
|
+
"searchPlaceholder": this.$props.searchPlaceholder,
|
|
231
238
|
"transformData": this.$props.transformData,
|
|
232
239
|
"footer": showLoadMore && !isLastBucket && h("div", {
|
|
233
240
|
"attrs": {
|