@appbaseio/reactivesearch-vue 1.16.0-alpha.3 → 1.16.0-alpha.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@appbaseio/reactivesearch-vue.umd.js +6388 -5403
- package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js +5 -5
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
- package/dist/cjs/Button-d2f1aeda.js +68 -0
- package/dist/cjs/{DownShift-b09da079.js → CancelSvg-82021d23.js} +60 -16
- package/dist/cjs/Card-4b915733.js +30 -0
- package/dist/cjs/{ComponentWrapper-5a0a8849.js → ComponentWrapper-7302fe1a.js} +40 -21
- package/dist/cjs/{Container-f84e72fc.js → Container-8a08d663.js} +3 -11
- package/dist/cjs/DataSearch.js +341 -391
- package/dist/cjs/{DropDown-c66be1a8.js → DropDown-c46d8b0c.js} +80 -95
- package/dist/cjs/DynamicRangeSlider.js +81 -25
- package/dist/cjs/Flex-699639d2.js +52 -0
- package/dist/cjs/FormControlList-73497794.js +47 -0
- package/dist/cjs/Input-c6f181d5.js +79 -0
- package/dist/cjs/ListItem-933c27e4.js +46 -0
- package/dist/cjs/MultiDropdownList.js +71 -46
- package/dist/cjs/MultiList.js +49 -29
- package/dist/cjs/MultiRange.js +20 -14
- package/dist/cjs/{Pagination-91df3b77.js → Pagination-1b2320a7.js} +4 -3
- package/dist/cjs/RangeInput.js +29 -45
- package/dist/cjs/RangeSlider.js +31 -28
- package/dist/cjs/ReactiveBase.js +55 -34
- package/dist/cjs/ReactiveComponent.js +80 -36
- package/dist/cjs/ReactiveGoogleMap.js +326 -235
- package/dist/cjs/ReactiveList.js +149 -202
- package/dist/cjs/ResultCard.js +8 -6
- package/dist/cjs/ResultList.js +8 -6
- package/dist/cjs/SelectedFilters.js +25 -12
- package/dist/cjs/SingleDropdownList.js +70 -45
- package/dist/cjs/SingleList.js +44 -26
- package/dist/cjs/SingleRange.js +17 -11
- package/dist/cjs/StateProvider.js +11 -7
- package/dist/cjs/{Title-e9beb554.js → Title-39765ee6.js} +3 -11
- package/dist/cjs/ToggleButton.js +35 -16
- package/dist/cjs/{_rollupPluginBabelHelpers-280a574c.js → _rollupPluginBabelHelpers-4abdbfff.js} +11 -1
- package/dist/cjs/{index-e0583d76.js → index-d44a0a21.js} +87 -13
- package/dist/cjs/index.js +23 -19
- package/dist/cjs/initReactivesearch.js +80 -38
- package/dist/cjs/install.js +20 -18
- package/dist/cjs/ssr-c333c82c.js +39 -0
- package/dist/cjs/{utils-d1ea9f95.js → utils-23afb20b.js} +2 -2
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/{vueTypes-c21f265b.js → vueTypes-6de9d2a9.js} +9 -4
- package/dist/es/Button-799185e2.js +59 -0
- package/dist/es/{DownShift-d8f2500f.js → CancelSvg-4d9e0857.js} +56 -17
- package/dist/es/Card-04b3c33e.js +23 -0
- package/dist/es/{ComponentWrapper-d0b21b95.js → ComponentWrapper-bbb717bc.js} +40 -21
- package/dist/es/Container-4383c6f0.js +10 -0
- package/dist/es/DataSearch.js +339 -389
- package/dist/es/{DropDown-5dbd69c2.js → DropDown-4edaa621.js} +79 -94
- package/dist/es/DynamicRangeSlider.js +81 -25
- package/dist/es/Flex-aac91505.js +47 -0
- package/dist/es/FormControlList-fe389a2e.js +40 -0
- package/dist/es/Input-d8519224.js +71 -0
- package/dist/es/ListItem-bdb6d53d.js +39 -0
- package/dist/es/MultiDropdownList.js +71 -46
- package/dist/es/MultiList.js +49 -29
- package/dist/es/MultiRange.js +20 -14
- package/dist/es/{Pagination-800af44f.js → Pagination-b3e4054a.js} +4 -3
- package/dist/es/RangeInput.js +29 -45
- package/dist/es/RangeSlider.js +31 -28
- package/dist/es/ReactiveBase.js +55 -34
- package/dist/es/ReactiveComponent.js +80 -36
- package/dist/es/ReactiveGoogleMap.js +326 -235
- package/dist/es/ReactiveList.js +149 -202
- package/dist/es/ResultCard.js +8 -6
- package/dist/es/ResultList.js +8 -6
- package/dist/es/SelectedFilters.js +25 -12
- package/dist/es/SingleDropdownList.js +70 -45
- package/dist/es/SingleList.js +44 -26
- package/dist/es/SingleRange.js +17 -11
- package/dist/es/StateProvider.js +11 -7
- package/dist/es/Title-579f8d6c.js +10 -0
- package/dist/es/ToggleButton.js +35 -16
- package/dist/es/{_rollupPluginBabelHelpers-c9fbe19f.js → _rollupPluginBabelHelpers-ecf6c03c.js} +11 -1
- package/dist/es/{index-1fe91a0a.js → index-5daa8276.js} +84 -14
- package/dist/es/index.js +23 -19
- package/dist/es/initReactivesearch.js +80 -38
- package/dist/es/install.js +20 -18
- package/dist/es/ssr-e3196de1.js +33 -0
- package/dist/es/{utils-ce3d86fd.js → utils-3a32e13f.js} +2 -2
- package/dist/es/version.js +1 -1
- package/dist/es/{vueTypes-98d938a9.js → vueTypes-9326e0be.js} +9 -4
- package/package.json +86 -78
- package/dist/cjs/Button-78d8bc26.js +0 -146
- package/dist/cjs/Card-b4af314f.js +0 -58
- package/dist/cjs/Flex-737c55be.js +0 -160
- package/dist/cjs/FormControlList-08dfb28e.js +0 -105
- package/dist/cjs/Input-643d02a7.js +0 -178
- package/dist/cjs/ListItem-0c58c5d2.js +0 -84
- package/dist/cjs/ssr-b7a729f9.js +0 -47
- package/dist/es/Button-6c71c66e.js +0 -137
- package/dist/es/Card-ecf70ba1.js +0 -51
- package/dist/es/Container-f5efec9e.js +0 -18
- package/dist/es/Flex-40a74d8a.js +0 -155
- package/dist/es/FormControlList-b96aebef.js +0 -98
- package/dist/es/Input-dfd9dd40.js +0 -170
- package/dist/es/ListItem-da73bc7d.js +0 -77
- package/dist/es/Title-22c2f3bf.js +0 -18
- package/dist/es/ssr-2f57791d.js +0 -41
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
4
|
+
|
|
5
|
+
var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-4abdbfff.js');
|
|
6
|
+
var emotion = require('emotion');
|
|
7
|
+
var styled = require('@appbaseio/vue-emotion');
|
|
8
|
+
var styled__default = _interopDefault(styled);
|
|
9
|
+
|
|
10
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16;
|
|
11
|
+
|
|
12
|
+
var alertBorder = function alertBorder(_ref) {
|
|
13
|
+
var theme = _ref.theme;
|
|
14
|
+
return emotion.css(_templateObject || (_templateObject = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\tborder: 1px solid ", ";\n"])), theme.colors.alertColor);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
var input = emotion.css(_templateObject2 || (_templateObject2 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\twidth: 100%;\n\tline-height: 1.5;\n\tmin-height: 42px;\n\tpadding: 8px 12px;\n\tborder: 1px solid #ccc;\n\tbackground-color: #fafafa;\n\tfont-size: 0.9rem;\n\toutline: none;\n\theight: 100%;\n\n\t&:focus {\n\t\tbackground-color: #fff;\n\t}\n"])));
|
|
18
|
+
|
|
19
|
+
var dark = function dark(theme) {
|
|
20
|
+
return emotion.css(_templateObject3 || (_templateObject3 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\tborder-color: ", ";\n"])), theme.colors.borderColor);
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
var darkInput = function darkInput(_ref2) {
|
|
24
|
+
var theme = _ref2.theme;
|
|
25
|
+
return emotion.css(_templateObject4 || (_templateObject4 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\tbackground-color: ", ";\n\tcolor: ", ";\n\t", ";\n\n\t&:focus {\n\t\tbackground-color: ", ";\n\t}\n"])), theme.colors.backgroundColor, theme.colors.textColor, dark(theme), theme.colors.backgroundColor);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
var Input = styled__default('input')(_templateObject5 || (_templateObject5 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\t", ";\n\t", ";\n\n\t", ";\n\n\t", ";\n\n\t", ";\n\t", ";\n\n\t", ";\n\n\t", ";\n\t", ";\n\t", ";\n\n\t", ";\n"])), input, function (_ref3) {
|
|
29
|
+
var themePreset = _ref3.themePreset,
|
|
30
|
+
theme = _ref3.theme;
|
|
31
|
+
return themePreset === 'dark' && darkInput({
|
|
32
|
+
theme: theme
|
|
33
|
+
});
|
|
34
|
+
}, function (props) {
|
|
35
|
+
return props.showIcon && props.iconPosition === 'left' && emotion.css(_templateObject6 || (_templateObject6 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\t\t\tpadding-left: 36px;\n\t\t"])));
|
|
36
|
+
}, function (props) {
|
|
37
|
+
return props.showIcon && props.iconPosition === 'right' && emotion.css(_templateObject7 || (_templateObject7 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\t\t\tpadding-right: 36px;\n\t\t"])));
|
|
38
|
+
}, function (props) {
|
|
39
|
+
return (// for clear icon
|
|
40
|
+
props.showClear && emotion.css(_templateObject8 || (_templateObject8 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\t\t\tpadding-right: 36px;\n\t\t"])))
|
|
41
|
+
);
|
|
42
|
+
}, function (props) {
|
|
43
|
+
return (// for voice search icon
|
|
44
|
+
props.showVoiceSearch && emotion.css(_templateObject9 || (_templateObject9 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\t\t\tpadding-right: 36px;\n\t\t"])))
|
|
45
|
+
);
|
|
46
|
+
}, function (props) {
|
|
47
|
+
return (// for clear icon with search icon
|
|
48
|
+
props.showClear && props.showIcon && props.iconPosition === 'right' && emotion.css(_templateObject10 || (_templateObject10 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\t\t\tpadding-right: 66px;\n\t\t"])))
|
|
49
|
+
);
|
|
50
|
+
}, function (props) {
|
|
51
|
+
return (// for voice search icon with search icon
|
|
52
|
+
props.showVoiceSearch && props.showIcon && props.iconPosition === 'right' && emotion.css(_templateObject11 || (_templateObject11 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\t\t\tpadding-right: 66px;\n\t\t"])))
|
|
53
|
+
);
|
|
54
|
+
}, function (props) {
|
|
55
|
+
return (// for voice search icon with clear icon
|
|
56
|
+
props.showVoiceSearch && props.showIcon && emotion.css(_templateObject12 || (_templateObject12 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\t\t\tpadding-right: 66px;\n\t\t"])))
|
|
57
|
+
);
|
|
58
|
+
}, function (props) {
|
|
59
|
+
return (// for clear icon with search icon and voice search
|
|
60
|
+
props.showClear && props.showIcon && props.showVoiceSearch && props.iconPosition === 'right' && emotion.css(_templateObject13 || (_templateObject13 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\t\t\tpadding-right: 90px;\n\t\t"])))
|
|
61
|
+
);
|
|
62
|
+
}, function (props) {
|
|
63
|
+
return props.alert && alertBorder;
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
var suggestions = function suggestions(themePreset, theme) {
|
|
67
|
+
return emotion.css(_templateObject14 || (_templateObject14 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\tdisplay: block;\n\twidth: 100%;\n\tborder: 1px solid #ccc;\n\tborder-top: none;\n\tbackground-color: #fff;\n\tfont-size: 0.9rem;\n\tz-index: 3;\n\tposition: absolute;\n\tmargin: 0;\n\tpadding: 0;\n\tlist-style: none;\n\tmax-height: 395px;\n\toverflow-y: auto;\n\n\t&.small {\n\t\ttop: 30px;\n\t}\n\n\tli {\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n\t\tcursor: pointer;\n\t\tpadding: 10px;\n\t\tuser-select: none;\n\n\t\t& > .trim {\n\t\t\tdisplay: -webkit-box;\n\t\t\tdisplay: block;\n\t\t\twidth: 100%;\n\t\t\tmax-height: 2.3rem;\n\t\t\tline-height: 1.2rem;\n\t\t\t-webkit-line-clamp: 2;\n\t\t\t-webkit-box-orient: vertical;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\twhite-space: nowrap;\n\t\t}\n\n\t\t&:hover,\n\t\t&:focus {\n\t\t\tbackground-color: #eee;\n\t\t}\n\t}\n\n\t", ";\n"])), themePreset === 'dark' && theme && dark(theme));
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
var suggestionsContainer = emotion.css(_templateObject15 || (_templateObject15 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\tposition: relative;\n\t.cancel-icon {\n\t\tcursor: pointer;\n\t}\n"])));
|
|
71
|
+
|
|
72
|
+
var noSuggestions = function noSuggestions(themePreset, theme) {
|
|
73
|
+
return emotion.css(_templateObject16 || (_templateObject16 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\tdisplay: block;\n\twidth: 100%;\n\tborder: 1px solid #ccc;\n\tborder-top: none;\n\tbackground-color: #fff;\n\tfont-size: 0.9rem;\n\tz-index: 3;\n\tposition: absolute;\n\tmargin: 0;\n\tpadding: 0;\n\tlist-style: none;\n\tmax-height: 260px;\n\toverflow-y: auto;\n\n\t&.small {\n\t\ttop: 30px;\n\t}\n\n\tli {\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n\t\tpadding: 10px;\n\t\tuser-select: none;\n\n\t\t& > .trim {\n\t\t\tdisplay: -webkit-box;\n\t\t\tdisplay: block;\n\t\t\twidth: 100%;\n\t\t\tmax-height: 2.3rem;\n\t\t\tline-height: 1.2rem;\n\t\t\t-webkit-line-clamp: 2;\n\t\t\t-webkit-box-orient: vertical;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\twhite-space: nowrap;\n\t\t}\n\t}\n\n\t", "\n"])), themePreset === 'dark' && theme && dark(theme));
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
exports.Input = Input;
|
|
77
|
+
exports.noSuggestions = noSuggestions;
|
|
78
|
+
exports.suggestions = suggestions;
|
|
79
|
+
exports.suggestionsContainer = suggestionsContainer;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
4
|
+
|
|
5
|
+
var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-4abdbfff.js');
|
|
6
|
+
var emotion = require('emotion');
|
|
7
|
+
var styled = require('@appbaseio/vue-emotion');
|
|
8
|
+
var styled__default = _interopDefault(styled);
|
|
9
|
+
var polished = require('polished');
|
|
10
|
+
require('./Title-39765ee6.js');
|
|
11
|
+
|
|
12
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
13
|
+
var container = emotion.css(_templateObject || (_templateObject = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\tdisplay: flex;\n\tflex-direction: column;\n\tmargin: 0;\n\tborder-radius: 0.25rem;\n\toverflow: hidden;\n"])));
|
|
14
|
+
var smallImage = emotion.css(_templateObject2 || (_templateObject2 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\twidth: 100px;\n\theight: 100px;\n"])));
|
|
15
|
+
var Image = styled__default('div')(_templateObject3 || (_templateObject3 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\twidth: 160px;\n\theight: 160px;\n\t", ";\n\tmargin: 0;\n\tbackground-size: contain;\n\tbackground-position: center center;\n\tbackground-repeat: no-repeat;\n\tbackground-image: ", ";\n"])), function (props) {
|
|
16
|
+
return props.small ? smallImage : null;
|
|
17
|
+
}, function (props) {
|
|
18
|
+
return "url(" + props.src + ")";
|
|
19
|
+
});
|
|
20
|
+
var ListItem = styled__default('a')(_templateObject4 || (_templateObject4 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\twidth: 100%;\n\theight: auto;\n\toutline: none;\n\ttext-decoration: none;\n\tborder-radius: 0;\n\tbackground-color: ", ";\n\tdisplay: flex;\n\tflex-direction: row;\n\tmargin: 0;\n\tpadding: 10px;\n\tborder-bottom: 1px solid ", ";\n\tcolor: ", ";\n\t", "; all 0.3s ease;\n\n\t&:hover, &:focus {\n\t\tbackground-color: ", ";\n\t}\n\n\t&:last-child {\n\t\tborder: 0;\n\t}\n\n\th2 {\n\t\twidth: 100%;\n\t\tline-height: 1.2rem;\n\t\twhite-space: nowrap;\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t\tmargin: 0;\n\t\tpadding: 0 0 8px;\n\t}\n\n\tp {\n\t\tmargin: 0;\n\t}\n\n\tarticle {\n\t\twidth: ", ";\n\t\tpadding-left: ", ";\n\t\tfont-size: 0.9rem;\n\t}\n\n\t&:hover, &:focus {\n\t\tbox-shadow: 0 0 0 0 rgba(0,0,0,0.10);\n\t}\n\n\t@media (max-width: 420px) {\n\t\tmin-width: 0;\n\t\tmargin: 0;\n\t\tborder-radius: 0;\n\t\tbox-shadow: none;\n\t\tborder: 1px solid #eee;\n\n\t\t&:hover, &:focus {\n\t\t\tbox-shadow: 0;\n\t\t}\n\t}\n"])), function (_ref) {
|
|
21
|
+
var theme = _ref.theme;
|
|
22
|
+
return theme.colors.backgroundColor ? polished.lighten(0.1, theme.colors.backgroundColor) : '#fff';
|
|
23
|
+
}, function (_ref2) {
|
|
24
|
+
var theme = _ref2.theme;
|
|
25
|
+
return theme.colors.backgroundColor ? polished.lighten(0.3, theme.colors.backgroundColor) : polished.lighten(0.68, theme.colors.textColor);
|
|
26
|
+
}, function (_ref3) {
|
|
27
|
+
var theme = _ref3.theme;
|
|
28
|
+
return theme.colors.textColor;
|
|
29
|
+
}, function (props) {
|
|
30
|
+
return props.href ? 'cursor: pointer' : null;
|
|
31
|
+
}, function (_ref4) {
|
|
32
|
+
var theme = _ref4.theme;
|
|
33
|
+
return theme.colors.backgroundColor ? polished.lighten(0.2, theme.colors.backgroundColor) : '#fdfefd';
|
|
34
|
+
}, function (props) {
|
|
35
|
+
if (props.image) {
|
|
36
|
+
return props.small ? 'calc(100% - 100px)' : 'calc(100% - 160px)';
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return '100%';
|
|
40
|
+
}, function (props) {
|
|
41
|
+
return props.image ? '10px' : 0;
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
exports.Image = Image;
|
|
45
|
+
exports.ListItem = ListItem;
|
|
46
|
+
exports.container = container;
|
|
@@ -6,25 +6,27 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
|
|
|
6
6
|
|
|
7
7
|
var configureStore = require('@appbaseio/reactivecore');
|
|
8
8
|
var configureStore__default = _interopDefault(configureStore);
|
|
9
|
-
var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-
|
|
9
|
+
var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-4abdbfff.js');
|
|
10
10
|
var VueTypes = _interopDefault(require('vue-types'));
|
|
11
11
|
var constants = require('@appbaseio/reactivecore/lib/utils/constants');
|
|
12
12
|
require('emotion');
|
|
13
13
|
require('@appbaseio/vue-emotion');
|
|
14
14
|
require('polished');
|
|
15
|
-
var Button = require('./Button-
|
|
16
|
-
var vueTypes = require('./vueTypes-
|
|
15
|
+
var Button = require('./Button-d2f1aeda.js');
|
|
16
|
+
var vueTypes = require('./vueTypes-6de9d2a9.js');
|
|
17
17
|
require('@appbaseio/reactivecore/lib/utils/transform');
|
|
18
18
|
require('redux');
|
|
19
|
-
var index = require('./index-
|
|
20
|
-
var ComponentWrapper = require('./ComponentWrapper-
|
|
21
|
-
|
|
22
|
-
require('./
|
|
19
|
+
var index = require('./index-d44a0a21.js');
|
|
20
|
+
var ComponentWrapper = require('./ComponentWrapper-7302fe1a.js');
|
|
21
|
+
require('@vue/babel-helper-vue-jsx-merge-props');
|
|
22
|
+
var Title = require('./Title-39765ee6.js');
|
|
23
|
+
require('./CancelSvg-82021d23.js');
|
|
24
|
+
require('./Input-c6f181d5.js');
|
|
23
25
|
require('compute-scroll-into-view');
|
|
24
|
-
require('./
|
|
25
|
-
|
|
26
|
-
var utils = require('./utils-
|
|
27
|
-
var DropDown = require('./DropDown-
|
|
26
|
+
var Container = require('./Container-8a08d663.js');
|
|
27
|
+
require('@appbaseio/reactivecore/lib/utils/suggestions');
|
|
28
|
+
var utils = require('./utils-23afb20b.js');
|
|
29
|
+
var DropDown = require('./DropDown-c46d8b0c.js');
|
|
28
30
|
|
|
29
31
|
var updateQuery = configureStore.Actions.updateQuery,
|
|
30
32
|
setQueryOptions = configureStore.Actions.setQueryOptions,
|
|
@@ -81,12 +83,21 @@ var MultiDropdownList = {
|
|
|
81
83
|
showMissing: VueTypes.bool.def(false),
|
|
82
84
|
missingLabel: VueTypes.string.def('N/A'),
|
|
83
85
|
showSearch: VueTypes.bool.def(false),
|
|
86
|
+
showClear: VueTypes.bool.def(false),
|
|
84
87
|
showLoadMore: VueTypes.bool.def(false),
|
|
85
88
|
loadMoreLabel: VueTypes.oneOfType([VueTypes.string, VueTypes.any]).def('Load More'),
|
|
86
|
-
nestedField: vueTypes.types.string
|
|
89
|
+
nestedField: vueTypes.types.string,
|
|
90
|
+
index: VueTypes.string,
|
|
91
|
+
searchPlaceholder: VueTypes.string.def('Type here to search...')
|
|
87
92
|
},
|
|
88
93
|
created: function created() {
|
|
89
|
-
|
|
94
|
+
if (!this.enableAppbase && this.$props.index) {
|
|
95
|
+
console.warn('Warning(ReactiveSearch): In order to use the `index` prop, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
var props = this.$props;
|
|
99
|
+
this.modifiedOptions = this.options && this.options[props.dataField] ? this.options[props.dataField].buckets : []; // Set custom and default queries in store
|
|
100
|
+
|
|
90
101
|
index.updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
|
|
91
102
|
index.updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props, this.currentValue);
|
|
92
103
|
},
|
|
@@ -124,33 +135,35 @@ var MultiDropdownList = {
|
|
|
124
135
|
options: function options(newVal, oldVal) {
|
|
125
136
|
var _this2 = this;
|
|
126
137
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
138
|
+
if (newVal) {
|
|
139
|
+
checkPropChange(oldVal, newVal, function () {
|
|
140
|
+
var _this2$$props = _this2.$props,
|
|
141
|
+
showLoadMore = _this2$$props.showLoadMore,
|
|
142
|
+
dataField = _this2$$props.dataField;
|
|
143
|
+
var modifiedOptions = _this2.$data.modifiedOptions;
|
|
144
|
+
|
|
145
|
+
if (showLoadMore) {
|
|
146
|
+
// append options with showLoadMore
|
|
147
|
+
var buckets = newVal[dataField].buckets;
|
|
148
|
+
var nextOptions = [].concat(modifiedOptions, buckets.map(function (bucket) {
|
|
149
|
+
return {
|
|
150
|
+
key: bucket.key[dataField],
|
|
151
|
+
doc_count: bucket.doc_count
|
|
152
|
+
};
|
|
153
|
+
}));
|
|
154
|
+
var after = newVal[dataField].after_key; // detect the last bucket by checking if the next set of buckets were empty
|
|
155
|
+
|
|
156
|
+
var isLastBucket = !buckets.length;
|
|
157
|
+
_this2.after = {
|
|
158
|
+
after: after
|
|
140
159
|
};
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
_this2.isLastBucket = isLastBucket;
|
|
149
|
-
_this2.modifiedOptions = nextOptions;
|
|
150
|
-
} else {
|
|
151
|
-
_this2.modifiedOptions = newVal[_this2.$props.dataField] ? newVal[_this2.$props.dataField].buckets : [];
|
|
152
|
-
}
|
|
153
|
-
});
|
|
160
|
+
_this2.isLastBucket = isLastBucket;
|
|
161
|
+
_this2.modifiedOptions = nextOptions;
|
|
162
|
+
} else {
|
|
163
|
+
_this2.modifiedOptions = newVal[_this2.$props.dataField] ? newVal[_this2.$props.dataField].buckets : [];
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
}
|
|
154
167
|
},
|
|
155
168
|
size: function size() {
|
|
156
169
|
this.updateQueryOptions(this.$props);
|
|
@@ -193,13 +206,22 @@ var MultiDropdownList = {
|
|
|
193
206
|
var renderErrorCalc = this.$scopedSlots.renderError || renderError;
|
|
194
207
|
var renderLabelCalc = this.$scopedSlots.renderLabel || renderLabel;
|
|
195
208
|
var isLastBucket = this.$data.isLastBucket;
|
|
209
|
+
var renderNoResults = this.$scopedSlots.renderNoResults || this.$props.renderNoResults;
|
|
196
210
|
var selectAll = [];
|
|
197
211
|
|
|
198
212
|
if (renderErrorCalc && this.error) {
|
|
199
213
|
return index.isFunction(renderErrorCalc) ? renderErrorCalc(this.error) : renderErrorCalc;
|
|
200
214
|
}
|
|
201
215
|
|
|
202
|
-
if (!this.hasCustomRenderer && this.$data.modifiedOptions.length === 0) {
|
|
216
|
+
if (!this.hasCustomRenderer && this.$data.modifiedOptions.length === 0 && !this.isLoading) {
|
|
217
|
+
if (renderNoResults && index.isFunction(renderNoResults)) {
|
|
218
|
+
return h("div", [renderNoResults()]);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
if (renderNoResults && !index.isFunction(renderNoResults)) {
|
|
222
|
+
return renderNoResults;
|
|
223
|
+
}
|
|
224
|
+
|
|
203
225
|
return null;
|
|
204
226
|
}
|
|
205
227
|
|
|
@@ -219,7 +241,7 @@ var MultiDropdownList = {
|
|
|
219
241
|
"items": [].concat(selectAll, this.$data.modifiedOptions.filter(function (item) {
|
|
220
242
|
return String(item.key).trim().length;
|
|
221
243
|
}).map(function (item) {
|
|
222
|
-
return _rollupPluginBabelHelpers._extends(
|
|
244
|
+
return _rollupPluginBabelHelpers._extends({}, item, {
|
|
223
245
|
key: String(item.key)
|
|
224
246
|
});
|
|
225
247
|
})),
|
|
@@ -235,6 +257,8 @@ var MultiDropdownList = {
|
|
|
235
257
|
"renderItem": renderItemCalc,
|
|
236
258
|
"renderNoResults": this.$scopedSlots.renderNoResults || this.$props.renderNoResults,
|
|
237
259
|
"showSearch": this.$props.showSearch,
|
|
260
|
+
"showClear": this.$props.showClear,
|
|
261
|
+
"searchPlaceholder": this.$props.searchPlaceholder,
|
|
238
262
|
"transformData": this.$props.transformData,
|
|
239
263
|
"footer": showLoadMore && !isLastBucket && h("div", {
|
|
240
264
|
"attrs": {
|
|
@@ -326,7 +350,7 @@ var MultiDropdownList = {
|
|
|
326
350
|
}
|
|
327
351
|
|
|
328
352
|
var performUpdate = function performUpdate() {
|
|
329
|
-
_this3.currentValue = currentValue;
|
|
353
|
+
_this3.currentValue = _rollupPluginBabelHelpers._extends({}, currentValue);
|
|
330
354
|
|
|
331
355
|
_this3.updateQueryHandler(finalValues, props);
|
|
332
356
|
|
|
@@ -353,7 +377,7 @@ var MultiDropdownList = {
|
|
|
353
377
|
index.updateDefaultQuery(props.componentId, this.setDefaultQuery, props, value);
|
|
354
378
|
}
|
|
355
379
|
|
|
356
|
-
this.setQueryOptions(this.internalComponent, defaultQueryOptions);
|
|
380
|
+
this.setQueryOptions(this.internalComponent, defaultQueryOptions, false);
|
|
357
381
|
this.updateQuery({
|
|
358
382
|
componentId: this.internalComponent,
|
|
359
383
|
query: query,
|
|
@@ -374,7 +398,7 @@ var MultiDropdownList = {
|
|
|
374
398
|
index.updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
|
|
375
399
|
}
|
|
376
400
|
|
|
377
|
-
this.setQueryOptions(props.componentId, customQueryOptions);
|
|
401
|
+
this.setQueryOptions(props.componentId, customQueryOptions, false);
|
|
378
402
|
this.updateQuery({
|
|
379
403
|
componentId: props.componentId,
|
|
380
404
|
query: query,
|
|
@@ -409,7 +433,7 @@ var MultiDropdownList = {
|
|
|
409
433
|
if (props.defaultQuery) {
|
|
410
434
|
var value = Object.keys(this.$data.currentValue);
|
|
411
435
|
var defaultQueryOptions = getOptionsFromQuery(props.defaultQuery(value, props));
|
|
412
|
-
this.setQueryOptions(this.internalComponent, _rollupPluginBabelHelpers._extends(
|
|
436
|
+
this.setQueryOptions(this.internalComponent, _rollupPluginBabelHelpers._extends({}, queryOptions, defaultQueryOptions));
|
|
413
437
|
} else {
|
|
414
438
|
this.setQueryOptions(this.internalComponent, queryOptions);
|
|
415
439
|
}
|
|
@@ -544,7 +568,8 @@ var mapStateToProps = function mapStateToProps(state, props) {
|
|
|
544
568
|
selectedValue: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value || null,
|
|
545
569
|
themePreset: state.config.themePreset,
|
|
546
570
|
error: state.error[props.componentId],
|
|
547
|
-
componentProps: state.props[props.componentId]
|
|
571
|
+
componentProps: state.props[props.componentId],
|
|
572
|
+
enableAppbase: state.config.enableAppbase
|
|
548
573
|
};
|
|
549
574
|
};
|
|
550
575
|
|
package/dist/cjs/MultiList.js
CHANGED
|
@@ -6,22 +6,23 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
|
|
|
6
6
|
|
|
7
7
|
var configureStore = require('@appbaseio/reactivecore');
|
|
8
8
|
var configureStore__default = _interopDefault(configureStore);
|
|
9
|
-
var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-
|
|
9
|
+
var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-4abdbfff.js');
|
|
10
10
|
var VueTypes = _interopDefault(require('vue-types'));
|
|
11
11
|
var constants = require('@appbaseio/reactivecore/lib/utils/constants');
|
|
12
12
|
require('emotion');
|
|
13
13
|
require('@appbaseio/vue-emotion');
|
|
14
14
|
require('polished');
|
|
15
|
-
var vueTypes = require('./vueTypes-
|
|
15
|
+
var vueTypes = require('./vueTypes-6de9d2a9.js');
|
|
16
16
|
require('@appbaseio/reactivecore/lib/utils/transform');
|
|
17
17
|
require('redux');
|
|
18
|
-
var index = require('./index-
|
|
19
|
-
var ComponentWrapper = require('./ComponentWrapper-
|
|
20
|
-
var Title = require('./Title-
|
|
21
|
-
var Input = require('./Input-
|
|
22
|
-
var Container = require('./Container-
|
|
23
|
-
var
|
|
24
|
-
var
|
|
18
|
+
var index = require('./index-d44a0a21.js');
|
|
19
|
+
var ComponentWrapper = require('./ComponentWrapper-7302fe1a.js');
|
|
20
|
+
var Title = require('./Title-39765ee6.js');
|
|
21
|
+
var Input = require('./Input-c6f181d5.js');
|
|
22
|
+
var Container = require('./Container-8a08d663.js');
|
|
23
|
+
var suggestions = require('@appbaseio/reactivecore/lib/utils/suggestions');
|
|
24
|
+
var FormControlList = require('./FormControlList-73497794.js');
|
|
25
|
+
var utils = require('./utils-23afb20b.js');
|
|
25
26
|
|
|
26
27
|
var updateQuery = configureStore.Actions.updateQuery,
|
|
27
28
|
setQueryOptions = configureStore.Actions.setQueryOptions,
|
|
@@ -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,
|
|
@@ -64,37 +65,47 @@ var MultiList = {
|
|
|
64
65
|
URLParams: VueTypes.bool.def(false),
|
|
65
66
|
showMissing: VueTypes.bool.def(false),
|
|
66
67
|
missingLabel: VueTypes.string.def('N/A'),
|
|
67
|
-
nestedField: vueTypes.types.string
|
|
68
|
+
nestedField: vueTypes.types.string,
|
|
69
|
+
index: VueTypes.string
|
|
68
70
|
},
|
|
69
71
|
data: function data() {
|
|
70
72
|
var props = this.$props;
|
|
71
73
|
this.__state = {
|
|
72
74
|
currentValue: {},
|
|
73
|
-
modifiedOptions:
|
|
75
|
+
modifiedOptions: [],
|
|
74
76
|
searchTerm: ''
|
|
75
77
|
};
|
|
76
78
|
this.internalComponent = props.componentId + "__internal";
|
|
77
79
|
return this.__state;
|
|
78
80
|
},
|
|
79
81
|
created: function created() {
|
|
80
|
-
|
|
82
|
+
if (!this.enableAppbase && this.$props.index) {
|
|
83
|
+
console.warn('Warning(ReactiveSearch): In order to use the `index` prop, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
var props = this.$props;
|
|
87
|
+
this.modifiedOptions = this.options && this.options[props.dataField] ? this.options[props.dataField].buckets : []; // Set custom and default queries in store
|
|
88
|
+
|
|
81
89
|
index.updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
|
|
82
90
|
index.updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props, this.currentValue);
|
|
83
91
|
},
|
|
84
92
|
beforeMount: function beforeMount() {
|
|
85
93
|
this.updateQueryHandlerOptions(this.$props);
|
|
94
|
+
var value = this.selectedValue || this.$props.value || this.$props.defaultValue;
|
|
95
|
+
this.setValue(value, !this.selectedValue);
|
|
96
|
+
},
|
|
97
|
+
mounted: function mounted() {
|
|
98
|
+
var currentValue = Object.keys(this.$data.currentValue);
|
|
86
99
|
|
|
87
|
-
if (this.
|
|
88
|
-
this
|
|
89
|
-
} else if (this.$props.value) {
|
|
90
|
-
this.setValue(this.$props.value, true);
|
|
91
|
-
} else if (this.$props.defaultValue) {
|
|
92
|
-
this.setValue(this.$props.defaultValue, true);
|
|
100
|
+
if (this.$props.value !== undefined && !isEqual(this.$props.value, currentValue)) {
|
|
101
|
+
this.$emit('change', currentValue);
|
|
93
102
|
}
|
|
94
103
|
},
|
|
95
104
|
watch: {
|
|
96
105
|
options: function options(newVal) {
|
|
97
|
-
|
|
106
|
+
if (newVal) {
|
|
107
|
+
this.modifiedOptions = newVal[this.$props.dataField] ? newVal[this.$props.dataField].buckets : [];
|
|
108
|
+
}
|
|
98
109
|
},
|
|
99
110
|
size: function size() {
|
|
100
111
|
this.updateQueryHandlerOptions(this.$props);
|
|
@@ -132,7 +143,11 @@ var MultiList = {
|
|
|
132
143
|
}
|
|
133
144
|
|
|
134
145
|
if (!isEqual(selectedValue, newVal)) {
|
|
135
|
-
this.
|
|
146
|
+
if (this.value === undefined) {
|
|
147
|
+
this.setValue(newVal, true);
|
|
148
|
+
} else {
|
|
149
|
+
this.$emit('change', newVal);
|
|
150
|
+
}
|
|
136
151
|
}
|
|
137
152
|
},
|
|
138
153
|
defaultQuery: function defaultQuery(newVal, oldVal) {
|
|
@@ -161,8 +176,12 @@ var MultiList = {
|
|
|
161
176
|
return index.isFunction(renderErrorCalc) ? renderErrorCalc(this.error) : renderErrorCalc;
|
|
162
177
|
}
|
|
163
178
|
|
|
164
|
-
if (!this.hasCustomRenderer && this.modifiedOptions.length === 0) {
|
|
165
|
-
|
|
179
|
+
if (!this.hasCustomRenderer && this.modifiedOptions.length === 0 && !this.isLoading) {
|
|
180
|
+
if (this.renderNoResult) {
|
|
181
|
+
this.renderNoResult();
|
|
182
|
+
} else {
|
|
183
|
+
return null;
|
|
184
|
+
}
|
|
166
185
|
}
|
|
167
186
|
|
|
168
187
|
var itemsToRender = this.$data.modifiedOptions;
|
|
@@ -174,7 +193,7 @@ var MultiList = {
|
|
|
174
193
|
var filteredItemsToRender = itemsToRender.filter(function (item) {
|
|
175
194
|
if (String(item.key).length) {
|
|
176
195
|
if (_this2.$props.showSearch && _this2.$data.searchTerm) {
|
|
177
|
-
return String(item.key).toLowerCase().includes(_this2.$data.searchTerm.toLowerCase());
|
|
196
|
+
return suggestions.replaceDiacritics(String(item.key)).toLowerCase().includes(suggestions.replaceDiacritics(_this2.$data.searchTerm).toLowerCase());
|
|
178
197
|
}
|
|
179
198
|
|
|
180
199
|
return true;
|
|
@@ -342,7 +361,7 @@ var MultiList = {
|
|
|
342
361
|
index.updateDefaultQuery(props.componentId, this.setDefaultQuery, props, value);
|
|
343
362
|
}
|
|
344
363
|
|
|
345
|
-
this.setQueryOptions(this.internalComponent, defaultQueryOptions);
|
|
364
|
+
this.setQueryOptions(this.internalComponent, defaultQueryOptions, false);
|
|
346
365
|
this.updateQuery({
|
|
347
366
|
componentId: this.internalComponent,
|
|
348
367
|
query: query,
|
|
@@ -363,7 +382,7 @@ var MultiList = {
|
|
|
363
382
|
index.updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
|
|
364
383
|
}
|
|
365
384
|
|
|
366
|
-
this.setQueryOptions(props.componentId, customQueryOptions);
|
|
385
|
+
this.setQueryOptions(props.componentId, customQueryOptions, false);
|
|
367
386
|
this.updateQuery({
|
|
368
387
|
componentId: props.componentId,
|
|
369
388
|
query: query,
|
|
@@ -384,7 +403,7 @@ var MultiList = {
|
|
|
384
403
|
if (props.defaultQuery) {
|
|
385
404
|
var value = Object.keys(this.$data.currentValue);
|
|
386
405
|
var defaultQueryOptions = getOptionsFromQuery(props.defaultQuery(value, props));
|
|
387
|
-
this.setQueryOptions(this.internalComponent, _rollupPluginBabelHelpers._extends(
|
|
406
|
+
this.setQueryOptions(this.internalComponent, _rollupPluginBabelHelpers._extends({}, queryOptions, defaultQueryOptions));
|
|
388
407
|
} else {
|
|
389
408
|
this.setQueryOptions(this.internalComponent, queryOptions);
|
|
390
409
|
}
|
|
@@ -427,7 +446,7 @@ var MultiList = {
|
|
|
427
446
|
if (value === undefined) {
|
|
428
447
|
this.setValue(currentValue);
|
|
429
448
|
} else {
|
|
430
|
-
var values = index.parseValueArray(value, currentValue);
|
|
449
|
+
var values = index.parseValueArray(value || [], currentValue);
|
|
431
450
|
this.$emit('change', values);
|
|
432
451
|
}
|
|
433
452
|
},
|
|
@@ -565,7 +584,8 @@ var mapStateToProps = function mapStateToProps(state, props) {
|
|
|
565
584
|
selectedValue: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value || null,
|
|
566
585
|
themePreset: state.config.themePreset,
|
|
567
586
|
error: state.error[props.componentId],
|
|
568
|
-
componentProps: state.props[props.componentId]
|
|
587
|
+
componentProps: state.props[props.componentId],
|
|
588
|
+
enableAppbase: state.config.enableAppbase
|
|
569
589
|
};
|
|
570
590
|
};
|
|
571
591
|
|
package/dist/cjs/MultiRange.js
CHANGED
|
@@ -6,20 +6,20 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
|
|
|
6
6
|
|
|
7
7
|
var configureStore = require('@appbaseio/reactivecore');
|
|
8
8
|
var configureStore__default = _interopDefault(configureStore);
|
|
9
|
-
var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-
|
|
9
|
+
var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-4abdbfff.js');
|
|
10
10
|
var VueTypes = _interopDefault(require('vue-types'));
|
|
11
11
|
var constants = require('@appbaseio/reactivecore/lib/utils/constants');
|
|
12
12
|
require('emotion');
|
|
13
13
|
require('@appbaseio/vue-emotion');
|
|
14
14
|
require('polished');
|
|
15
|
-
var vueTypes = require('./vueTypes-
|
|
15
|
+
var vueTypes = require('./vueTypes-6de9d2a9.js');
|
|
16
16
|
require('@appbaseio/reactivecore/lib/utils/transform');
|
|
17
17
|
require('redux');
|
|
18
|
-
var index = require('./index-
|
|
19
|
-
var ComponentWrapper = require('./ComponentWrapper-
|
|
20
|
-
var Title = require('./Title-
|
|
21
|
-
var Container = require('./Container-
|
|
22
|
-
var FormControlList = require('./FormControlList-
|
|
18
|
+
var index = require('./index-d44a0a21.js');
|
|
19
|
+
var ComponentWrapper = require('./ComponentWrapper-7302fe1a.js');
|
|
20
|
+
var Title = require('./Title-39765ee6.js');
|
|
21
|
+
var Container = require('./Container-8a08d663.js');
|
|
22
|
+
var FormControlList = require('./FormControlList-73497794.js');
|
|
23
23
|
|
|
24
24
|
var updateQuery = configureStore.Actions.updateQuery,
|
|
25
25
|
setQueryOptions = configureStore.Actions.setQueryOptions,
|
|
@@ -55,7 +55,8 @@ var MultiRange = {
|
|
|
55
55
|
showCheckbox: VueTypes.bool.def(true),
|
|
56
56
|
title: vueTypes.types.title,
|
|
57
57
|
URLParams: VueTypes.bool.def(false),
|
|
58
|
-
nestedField: vueTypes.types.string
|
|
58
|
+
nestedField: vueTypes.types.string,
|
|
59
|
+
index: VueTypes.string
|
|
59
60
|
},
|
|
60
61
|
methods: {
|
|
61
62
|
handleClick: function handleClick(e) {
|
|
@@ -99,7 +100,7 @@ var MultiRange = {
|
|
|
99
100
|
if (reset) {
|
|
100
101
|
selectedValues = values;
|
|
101
102
|
} else {
|
|
102
|
-
selectedValues = _rollupPluginBabelHelpers._extends(
|
|
103
|
+
selectedValues = _rollupPluginBabelHelpers._extends({}, selectedValues, values);
|
|
103
104
|
}
|
|
104
105
|
} else if (selectedValues[item]) {
|
|
105
106
|
currentValue = currentValue.filter(function (value) {
|
|
@@ -118,7 +119,7 @@ var MultiRange = {
|
|
|
118
119
|
return item.indexOf(value.label) !== -1;
|
|
119
120
|
});
|
|
120
121
|
currentValue = [].concat(currentValue, currentItems);
|
|
121
|
-
selectedValues = _rollupPluginBabelHelpers._extends(
|
|
122
|
+
selectedValues = _rollupPluginBabelHelpers._extends({}, selectedValues, (_extends2 = {}, _extends2[typeof item === 'object' ? item.label : item] = true, _extends2));
|
|
122
123
|
}
|
|
123
124
|
|
|
124
125
|
var performUpdate = function performUpdate() {
|
|
@@ -147,7 +148,7 @@ var MultiRange = {
|
|
|
147
148
|
index.updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
|
|
148
149
|
}
|
|
149
150
|
|
|
150
|
-
this.setQueryOptions(props.componentId, customQueryOptions);
|
|
151
|
+
this.setQueryOptions(props.componentId, customQueryOptions, false);
|
|
151
152
|
this.updateQuery({
|
|
152
153
|
componentId: props.componentId,
|
|
153
154
|
query: query,
|
|
@@ -173,7 +174,7 @@ var MultiRange = {
|
|
|
173
174
|
},
|
|
174
175
|
selectedValue: function selectedValue(newVal) {
|
|
175
176
|
if (!isEqual(this.$data.currentValue, newVal)) {
|
|
176
|
-
this.selectItem(newVal);
|
|
177
|
+
this.selectItem(newVal, true, undefined, true);
|
|
177
178
|
}
|
|
178
179
|
},
|
|
179
180
|
customQuery: function customQuery(newVal, oldVal) {
|
|
@@ -183,7 +184,11 @@ var MultiRange = {
|
|
|
183
184
|
}
|
|
184
185
|
},
|
|
185
186
|
created: function created() {
|
|
186
|
-
|
|
187
|
+
if (!this.enableAppbase && this.$props.index) {
|
|
188
|
+
console.warn('Warning(ReactiveSearch): In order to use the `index` prop, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
|
|
189
|
+
} // Set custom query in store
|
|
190
|
+
|
|
191
|
+
|
|
187
192
|
index.updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
|
|
188
193
|
},
|
|
189
194
|
beforeMount: function beforeMount() {
|
|
@@ -289,7 +294,8 @@ MultiRange.defaultQuery = function (values, props) {
|
|
|
289
294
|
var mapStateToProps = function mapStateToProps(state, props) {
|
|
290
295
|
return {
|
|
291
296
|
selectedValue: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value || null,
|
|
292
|
-
componentProps: state.props[props.componentId]
|
|
297
|
+
componentProps: state.props[props.componentId],
|
|
298
|
+
enableAppbase: state.config.enableAppbase
|
|
293
299
|
};
|
|
294
300
|
};
|
|
295
301
|
|
|
@@ -4,8 +4,9 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
|
|
|
4
4
|
|
|
5
5
|
var configureStore = require('@appbaseio/reactivecore');
|
|
6
6
|
var configureStore__default = _interopDefault(configureStore);
|
|
7
|
-
var
|
|
8
|
-
var
|
|
7
|
+
var VueTypes = _interopDefault(require('vue-types'));
|
|
8
|
+
var Button = require('./Button-d2f1aeda.js');
|
|
9
|
+
var vueTypes = require('./vueTypes-6de9d2a9.js');
|
|
9
10
|
|
|
10
11
|
var getClassName = configureStore.helper.getClassName,
|
|
11
12
|
handleA11yAction = configureStore.helper.handleA11yAction;
|
|
@@ -25,7 +26,7 @@ var Pagination = {
|
|
|
25
26
|
pages: vueTypes.types.number,
|
|
26
27
|
setPage: vueTypes.types.func,
|
|
27
28
|
totalPages: vueTypes.types.number,
|
|
28
|
-
showEndPage:
|
|
29
|
+
showEndPage: VueTypes.bool,
|
|
29
30
|
prevLabel: vueTypes.types.string,
|
|
30
31
|
nextLabel: vueTypes.types.string
|
|
31
32
|
},
|