@appbaseio/reactivesearch-vue 1.16.0-alpha.3 → 1.16.0-alpha.30
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 +7438 -6512
- 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-ab813390.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-0359da33.js} +76 -96
- package/dist/cjs/DynamicRangeSlider.js +47 -24
- 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 +69 -45
- package/dist/cjs/MultiList.js +36 -21
- package/dist/cjs/MultiRange.js +20 -14
- package/dist/cjs/{Pagination-91df3b77.js → Pagination-1b2320a7.js} +4 -3
- package/dist/cjs/RangeInput.js +25 -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 +320 -234
- 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 +69 -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-2a8358cd.js} +77 -9
- 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-459505fd.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-168b60f6.js} +75 -95
- package/dist/es/DynamicRangeSlider.js +47 -24
- 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 +69 -45
- package/dist/es/MultiList.js +36 -21
- package/dist/es/MultiRange.js +20 -14
- package/dist/es/{Pagination-800af44f.js → Pagination-b3e4054a.js} +4 -3
- package/dist/es/RangeInput.js +25 -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 +320 -234
- 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 +69 -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-4755c9a0.js} +74 -10
- 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
|
@@ -4,94 +4,39 @@ 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 _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-
|
|
7
|
+
var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-4abdbfff.js');
|
|
8
8
|
var VueTypes = _interopDefault(require('vue-types'));
|
|
9
9
|
var emotion = require('emotion');
|
|
10
10
|
var styled = require('@appbaseio/vue-emotion');
|
|
11
11
|
var styled__default = _interopDefault(styled);
|
|
12
|
-
var vueTypes = require('./vueTypes-
|
|
13
|
-
var index = require('./index-
|
|
14
|
-
var
|
|
15
|
-
var
|
|
12
|
+
var vueTypes = require('./vueTypes-6de9d2a9.js');
|
|
13
|
+
var index = require('./index-2a8358cd.js');
|
|
14
|
+
var CancelSvg = require('./CancelSvg-82021d23.js');
|
|
15
|
+
var Input = require('./Input-c6f181d5.js');
|
|
16
|
+
var suggestions = require('@appbaseio/reactivecore/lib/utils/suggestions');
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
_templateObject4 = function _templateObject4() {
|
|
21
|
-
return data;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
return data;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
function _templateObject3() {
|
|
28
|
-
var data = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\twidth: 100%;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: space-between;\n\tmin-height: 42px;\n\tborder-radius: 0;\n\toutline: none;\n\tpadding: 5px 12px;\n\tfont-size: 0.9rem;\n\tline-height: 1.2rem;\n\tbackground-color: #fff;\n\tborder: 1px solid #ccc;\n\tcolor: #424242;\n\tcursor: pointer;\n\tuser-select: none;\n\ttransition: all 0.3s ease;\n\n\t", ";\n\n\t& > div {\n\t\twidth: calc(100% - 24px);\n\t\twhite-space: nowrap;\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t\ttext-align: left;\n\t}\n\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: #fcfcfc;\n\t}\n\n\t", ";\n"]);
|
|
29
|
-
|
|
30
|
-
_templateObject3 = function _templateObject3() {
|
|
31
|
-
return data;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
return data;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
function _templateObject2() {
|
|
38
|
-
var data = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\tbackground-color: ", ";\n\tborder-color: ", ";\n\tcolor: ", ";\n\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: ", ";\n\t}\n"]);
|
|
39
|
-
|
|
40
|
-
_templateObject2 = function _templateObject2() {
|
|
41
|
-
return data;
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
return data;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
function _templateObject() {
|
|
48
|
-
var data = _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"]);
|
|
49
|
-
|
|
50
|
-
_templateObject = function _templateObject() {
|
|
51
|
-
return data;
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
return data;
|
|
55
|
-
}
|
|
56
|
-
var small = emotion.css(_templateObject());
|
|
18
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
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"])));
|
|
57
20
|
|
|
58
21
|
var dark = function dark(_ref) {
|
|
59
22
|
var theme = _ref.theme;
|
|
60
|
-
return emotion.css(_templateObject2(), theme.colors.backgroundColor, theme.colors.borderColor, theme.colors.textColor, theme.colors.backgroundColor);
|
|
23
|
+
return emotion.css(_templateObject2 || (_templateObject2 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\tbackground-color: ", ";\n\tborder-color: ", ";\n\tcolor: ", ";\n\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: ", ";\n\t}\n"])), theme.colors.backgroundColor, theme.colors.borderColor, theme.colors.textColor, theme.colors.backgroundColor);
|
|
61
24
|
};
|
|
62
25
|
|
|
63
|
-
var Select = styled__default('button')(_templateObject3(), function (props) {
|
|
26
|
+
var Select = styled__default('button')(_templateObject3 || (_templateObject3 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\twidth: 100%;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: space-between;\n\tmin-height: 42px;\n\tborder-radius: 0;\n\toutline: none;\n\tpadding: 5px 12px;\n\tfont-size: 0.9rem;\n\tline-height: 1.2rem;\n\tbackground-color: #fff;\n\tborder: 1px solid #ccc;\n\tcolor: #424242;\n\tcursor: pointer;\n\tuser-select: none;\n\ttransition: all 0.3s ease;\n\n\t", ";\n\n\t& > div {\n\t\twidth: calc(100% - 24px);\n\t\twhite-space: nowrap;\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t\ttext-align: left;\n\t}\n\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: #fcfcfc;\n\t}\n\n\t", ";\n"])), function (props) {
|
|
64
27
|
return props.small ? small : null;
|
|
65
28
|
}, function (_ref2) {
|
|
66
29
|
var themePreset = _ref2.themePreset;
|
|
67
30
|
return themePreset === 'dark' && dark;
|
|
68
31
|
});
|
|
69
|
-
var Tick = styled__default('span')(_templateObject4(), function (_ref3) {
|
|
32
|
+
var Tick = styled__default('span')(_templateObject4 || (_templateObject4 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\twidth: 16px;\n\theight: 16px;\n\tdisplay: inline-block;\n\tposition: relative;\n\tuser-select: none;\n\talign-items: center;\n\n\t&::after {\n\t\tbox-sizing: content-box;\n\t\tcontent: '';\n\t\tposition: absolute;\n\t\tbackground-color: transparent;\n\t\ttop: 50%;\n\t\tleft: 0;\n\t\twidth: 8px;\n\t\theight: 4px;\n\t\tmargin-top: -4px;\n\t\tborder-style: solid;\n\t\tborder-color: ", ";\n\t\tborder-width: 0 0 2px 2px;\n\t\tborder-radius: 0;\n\t\tborder-image: none;\n\t\ttransform: rotate(-45deg) scale(1);\n\t\ttransition: all 200ms ease-out;\n\t}\n"])), function (_ref3) {
|
|
70
33
|
var theme = _ref3.theme;
|
|
71
34
|
return theme.colors.primaryColor;
|
|
72
35
|
});
|
|
73
36
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
_templateObject2$1 = function _templateObject2() {
|
|
78
|
-
return data;
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
return data;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
function _templateObject$1() {
|
|
85
|
-
var data = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\ttop: 0.55em;\n\ttransform: rotate(-45deg);\n"]);
|
|
86
|
-
|
|
87
|
-
_templateObject$1 = function _templateObject() {
|
|
88
|
-
return data;
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
return data;
|
|
92
|
-
}
|
|
93
|
-
var open = emotion.css(_templateObject$1());
|
|
94
|
-
var Chevron = styled__default('span')(_templateObject2$1(), function (props) {
|
|
37
|
+
var _templateObject$1, _templateObject2$1;
|
|
38
|
+
var open = emotion.css(_templateObject$1 || (_templateObject$1 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\ttop: 0.55em;\n\ttransform: rotate(-45deg);\n"])));
|
|
39
|
+
var Chevron = styled__default('span')(_templateObject2$1 || (_templateObject2$1 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\t&::before {\n\t\tcontent: '';\n\t\tborder-style: solid;\n\t\tborder-width: 0.15em 0.15em 0 0;\n\t\tdisplay: inline-block;\n\t\theight: 0.45em;\n\t\tposition: relative;\n\t\ttop: 0.35em;\n\t\tleft: 0;\n\t\ttransform: rotate(135deg);\n\t\tvertical-align: top;\n\t\twidth: 0.45em;\n\n\t\t", ";\n\t}\n"])), function (props) {
|
|
95
40
|
return props.open ? open : null;
|
|
96
41
|
});
|
|
97
42
|
|
|
@@ -114,23 +59,25 @@ var Dropdown = {
|
|
|
114
59
|
items: vueTypes.types.data,
|
|
115
60
|
keyField: VueTypes.string.def('key'),
|
|
116
61
|
labelField: VueTypes.string.def('label'),
|
|
117
|
-
multi:
|
|
62
|
+
multi: VueTypes.bool,
|
|
118
63
|
// change event
|
|
119
64
|
placeholder: vueTypes.types.string,
|
|
120
|
-
returnsObject:
|
|
65
|
+
returnsObject: VueTypes.bool,
|
|
121
66
|
customLabelRenderer: vueTypes.types.func,
|
|
122
|
-
hasCustomRenderer:
|
|
67
|
+
hasCustomRenderer: VueTypes.bool,
|
|
123
68
|
customRenderer: vueTypes.types.func,
|
|
124
69
|
renderItem: vueTypes.types.func,
|
|
125
70
|
renderNoResults: VueTypes.any,
|
|
126
71
|
handleChange: vueTypes.types.func,
|
|
127
72
|
transformData: vueTypes.types.func,
|
|
128
73
|
selectedItem: vueTypes.types.selectedValue,
|
|
129
|
-
showCount:
|
|
130
|
-
single:
|
|
74
|
+
showCount: VueTypes.bool,
|
|
75
|
+
single: VueTypes.bool,
|
|
131
76
|
small: VueTypes.bool.def(false),
|
|
132
77
|
themePreset: vueTypes.types.themePreset,
|
|
133
|
-
showSearch:
|
|
78
|
+
showSearch: VueTypes.bool,
|
|
79
|
+
showClear: VueTypes.bool,
|
|
80
|
+
searchPlaceholder: VueTypes.string.def('Type here to search...')
|
|
134
81
|
},
|
|
135
82
|
render: function render() {
|
|
136
83
|
var _this = this;
|
|
@@ -158,7 +105,7 @@ var Dropdown = {
|
|
|
158
105
|
var filteredItemsToRender = itemsToRender.filter(function (item) {
|
|
159
106
|
if (String(item[labelField]).length) {
|
|
160
107
|
if (_this.$props.showSearch && _this.$data.searchTerm) {
|
|
161
|
-
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()));
|
|
162
109
|
}
|
|
163
110
|
|
|
164
111
|
return true;
|
|
@@ -166,7 +113,7 @@ var Dropdown = {
|
|
|
166
113
|
|
|
167
114
|
return false;
|
|
168
115
|
});
|
|
169
|
-
return h(
|
|
116
|
+
return h(CancelSvg.Downshift, {
|
|
170
117
|
"attrs": {
|
|
171
118
|
"isOpen": this.$data.isOpen,
|
|
172
119
|
"selectedItem": selectedItem,
|
|
@@ -204,26 +151,10 @@ var Dropdown = {
|
|
|
204
151
|
getItemEvents: getItemEvents
|
|
205
152
|
}) : isOpen && itemsToRender.length ? h("ul", {
|
|
206
153
|
"class": Input.suggestions(themePreset, _this.theme) + " " + (_this.$props.small ? 'small' : '') + " " + getClassName(_this.$props.innerClass, 'list')
|
|
207
|
-
}, [_this.$props.showSearch ?
|
|
208
|
-
"attrs": {
|
|
209
|
-
"id": _this.$props.componentId + "-input",
|
|
210
|
-
"showIcon": false,
|
|
211
|
-
"placeholder": "Type here to search...",
|
|
212
|
-
"value": _this.$data.searchTerm,
|
|
213
|
-
"themePreset": themePreset
|
|
214
|
-
},
|
|
215
|
-
"style": {
|
|
216
|
-
border: 0,
|
|
217
|
-
borderBottom: '1px solid #ddd'
|
|
218
|
-
},
|
|
219
|
-
"class": getClassName(_this.$props.innerClass, 'input'),
|
|
220
|
-
"on": {
|
|
221
|
-
"change": _this.handleInputChange
|
|
222
|
-
}
|
|
223
|
-
}) : 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) {
|
|
224
155
|
var selected = _this.$props.multi // MultiDropdownList
|
|
225
|
-
&& (selectedItem && !!selectedItem[item[keyField]]
|
|
226
|
-
Array.isArray(selectedItem) && selectedItem.find(function (value) {
|
|
156
|
+
&& (selectedItem && !!selectedItem[item[keyField]] // MultiDropdownRange
|
|
157
|
+
|| Array.isArray(selectedItem) && selectedItem.find(function (value) {
|
|
227
158
|
return value[labelField] === item[labelField];
|
|
228
159
|
}));
|
|
229
160
|
if (!_this.$props.multi) selected = item.key === selectedItem;
|
|
@@ -273,6 +204,7 @@ var Dropdown = {
|
|
|
273
204
|
|
|
274
205
|
if (!this.$props.multi) {
|
|
275
206
|
this.isOpen = false;
|
|
207
|
+
this.searchTerm = '';
|
|
276
208
|
}
|
|
277
209
|
},
|
|
278
210
|
handleStateChange: function handleStateChange(_ref2) {
|
|
@@ -296,6 +228,9 @@ var Dropdown = {
|
|
|
296
228
|
var value = e.target.value;
|
|
297
229
|
this.searchTerm = value;
|
|
298
230
|
},
|
|
231
|
+
clearSearchTerm: function clearSearchTerm() {
|
|
232
|
+
this.searchTerm = '';
|
|
233
|
+
},
|
|
299
234
|
renderToString: function renderToString(value) {
|
|
300
235
|
var _this2 = this;
|
|
301
236
|
|
|
@@ -336,6 +271,51 @@ var Dropdown = {
|
|
|
336
271
|
return h("p", {
|
|
337
272
|
"class": getClassName(this.$props.innerClass, 'noResults') || null
|
|
338
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;
|
|
339
319
|
}
|
|
340
320
|
}
|
|
341
321
|
};
|
|
@@ -6,17 +6,17 @@ 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('@appbaseio/vue-emotion');
|
|
13
|
-
var vueTypes = require('./vueTypes-
|
|
13
|
+
var vueTypes = require('./vueTypes-6de9d2a9.js');
|
|
14
14
|
require('redux');
|
|
15
|
-
var index = require('./index-
|
|
16
|
-
var Title = require('./Title-
|
|
17
|
-
var Container = require('./Container-
|
|
15
|
+
var index = require('./index-2a8358cd.js');
|
|
16
|
+
var Title = require('./Title-39765ee6.js');
|
|
17
|
+
var Container = require('./Container-8a08d663.js');
|
|
18
18
|
var NoSSR = _interopDefault(require('vue-no-ssr'));
|
|
19
|
-
var ssr = require('./ssr-
|
|
19
|
+
var ssr = require('./ssr-c333c82c.js');
|
|
20
20
|
|
|
21
21
|
var addComponent = configureStore.Actions.addComponent,
|
|
22
22
|
removeComponent = configureStore.Actions.removeComponent,
|
|
@@ -48,11 +48,13 @@ var DynamicRangeSlider = {
|
|
|
48
48
|
innerClass: vueTypes.types.style,
|
|
49
49
|
react: vueTypes.types.react,
|
|
50
50
|
showFilter: VueTypes.bool.def(true),
|
|
51
|
+
destroyOnUnmount: VueTypes.bool,
|
|
51
52
|
showCheckbox: VueTypes.bool.def(true),
|
|
52
53
|
title: vueTypes.types.title,
|
|
53
54
|
URLParams: VueTypes.bool.def(false),
|
|
54
55
|
sliderOptions: VueTypes.object.def({}),
|
|
55
|
-
nestedField: vueTypes.types.string
|
|
56
|
+
nestedField: vueTypes.types.string,
|
|
57
|
+
index: VueTypes.string
|
|
56
58
|
},
|
|
57
59
|
data: function data() {
|
|
58
60
|
this.internalRangeComponent = this.$props.componentId + "__range__internal";
|
|
@@ -77,7 +79,12 @@ var DynamicRangeSlider = {
|
|
|
77
79
|
this.setQueryListener(this.$props.componentId, onQueryChange, null); // Update props in store
|
|
78
80
|
|
|
79
81
|
this.setComponentProps(this.componentId, this.$props, constants.componentTypes.dynamicRangeSlider);
|
|
80
|
-
this.setComponentProps(this.internalRangeComponent, this.$props, constants.componentTypes.dynamicRangeSlider);
|
|
82
|
+
this.setComponentProps(this.internalRangeComponent, this.$props, constants.componentTypes.dynamicRangeSlider);
|
|
83
|
+
|
|
84
|
+
if (!this.enableAppbase && this.$props.index) {
|
|
85
|
+
console.warn('Warning(ReactiveSearch): In order to use the `index` prop, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
|
|
86
|
+
} // Set custom query in store
|
|
87
|
+
|
|
81
88
|
|
|
82
89
|
index.updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
|
|
83
90
|
},
|
|
@@ -85,17 +92,27 @@ var DynamicRangeSlider = {
|
|
|
85
92
|
this.setReact();
|
|
86
93
|
},
|
|
87
94
|
beforeMount: function beforeMount() {
|
|
88
|
-
|
|
89
|
-
|
|
95
|
+
var components = [];
|
|
96
|
+
|
|
97
|
+
if (this.$$store) {
|
|
98
|
+
var _this$$$store$getStat = this.$$store.getState();
|
|
99
|
+
|
|
100
|
+
components = _this$$$store$getStat.components;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
if (this.destroyOnUnmount || components.indexOf(this.componentId) === -1) {
|
|
104
|
+
this.addComponent(this.componentId);
|
|
105
|
+
this.addComponent(this.internalRangeComponent);
|
|
90
106
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
107
|
+
if (Array.isArray(this.selectedValue)) {
|
|
108
|
+
this.handleChange(this.selectedValue);
|
|
109
|
+
} else if (this.selectedValue) {
|
|
110
|
+
this.handleChange(DynamicRangeSlider.parseValue(this.selectedValue, this.$props));
|
|
111
|
+
} // get range before executing other queries
|
|
96
112
|
|
|
97
113
|
|
|
98
|
-
|
|
114
|
+
this.updateRangeQueryOptions();
|
|
115
|
+
}
|
|
99
116
|
},
|
|
100
117
|
beforeUpdate: function beforeUpdate() {
|
|
101
118
|
if (!this.currentValue) {
|
|
@@ -103,8 +120,10 @@ var DynamicRangeSlider = {
|
|
|
103
120
|
}
|
|
104
121
|
},
|
|
105
122
|
beforeDestroy: function beforeDestroy() {
|
|
106
|
-
|
|
107
|
-
|
|
123
|
+
if (this.destroyOnUnmount) {
|
|
124
|
+
this.removeComponent(this.$props.componentId);
|
|
125
|
+
this.removeComponent(this.internalRangeComponent);
|
|
126
|
+
}
|
|
108
127
|
},
|
|
109
128
|
methods: {
|
|
110
129
|
setDefaultValue: function setDefaultValue(_ref) {
|
|
@@ -164,8 +183,9 @@ var DynamicRangeSlider = {
|
|
|
164
183
|
aggs: aggs
|
|
165
184
|
});
|
|
166
185
|
},
|
|
167
|
-
handleSlider: function handleSlider(
|
|
168
|
-
this.
|
|
186
|
+
handleSlider: function handleSlider() {
|
|
187
|
+
var sliderValues = this.$refs.slider.getValue();
|
|
188
|
+
this.handleChange(sliderValues);
|
|
169
189
|
},
|
|
170
190
|
handleChange: function handleChange(currentValue) {
|
|
171
191
|
var _this2 = this;
|
|
@@ -217,7 +237,7 @@ var DynamicRangeSlider = {
|
|
|
217
237
|
currentEnd = value[1]; // check if the slider is at its initial position
|
|
218
238
|
|
|
219
239
|
var isInitialValue = currentStart === start && currentEnd === end;
|
|
220
|
-
this.setQueryOptions(this.$props.componentId, customQueryOptions);
|
|
240
|
+
this.setQueryOptions(this.$props.componentId, customQueryOptions, false);
|
|
221
241
|
this.updateQuery({
|
|
222
242
|
componentId: this.$props.componentId,
|
|
223
243
|
query: query,
|
|
@@ -284,7 +304,7 @@ var DynamicRangeSlider = {
|
|
|
284
304
|
render: function render() {
|
|
285
305
|
var h = arguments[0];
|
|
286
306
|
|
|
287
|
-
if (!this.range) {
|
|
307
|
+
if (!this.range || !this.currentValue) {
|
|
288
308
|
return null;
|
|
289
309
|
}
|
|
290
310
|
|
|
@@ -298,13 +318,15 @@ var DynamicRangeSlider = {
|
|
|
298
318
|
}, [this.$props.title]), h(NoSSR, [h(ssr.Slider, {
|
|
299
319
|
"class": getClassName(this.$props.innerClass, 'slider')
|
|
300
320
|
}, [h("vue-slider-component", {
|
|
321
|
+
"ref": "slider",
|
|
301
322
|
"attrs": {
|
|
302
323
|
"value": [Math.max(start, this.currentValue[0]), Math.min(end, this.currentValue[1])],
|
|
303
324
|
"min": Math.min(start, this.currentValue[0]),
|
|
304
325
|
"max": Math.max(end, this.currentValue[1]),
|
|
305
326
|
"dotSize": 20,
|
|
306
327
|
"height": 4,
|
|
307
|
-
"enable-cross": false
|
|
328
|
+
"enable-cross": false,
|
|
329
|
+
"tooltip": "always"
|
|
308
330
|
},
|
|
309
331
|
"on": {
|
|
310
332
|
"drag-end": this.handleSlider
|
|
@@ -377,7 +399,8 @@ var mapStateToProps = function mapStateToProps(state, props) {
|
|
|
377
399
|
options: options,
|
|
378
400
|
range: range,
|
|
379
401
|
selectedValue: state.selectedValues[props.componentId] ? state.selectedValues[props.componentId].value : null,
|
|
380
|
-
componentProps: state.props[props.componentId]
|
|
402
|
+
componentProps: state.props[props.componentId],
|
|
403
|
+
enableAppbase: state.config.enableAppbase
|
|
381
404
|
};
|
|
382
405
|
};
|
|
383
406
|
|
|
@@ -0,0 +1,52 @@
|
|
|
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
|
+
|
|
11
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11;
|
|
12
|
+
var leftLabel = emotion.css(_templateObject || (_templateObject = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\tflex-direction: row;\n\talign-items: center;\n"])));
|
|
13
|
+
var rightLabel = emotion.css(_templateObject2 || (_templateObject2 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\tflex-direction: row-reverse;\n\talign-items: center;\n"])));
|
|
14
|
+
var topLabel = emotion.css(_templateObject3 || (_templateObject3 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\tflex-direction: column;\n"])));
|
|
15
|
+
var bottomLabel = emotion.css(_templateObject4 || (_templateObject4 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\tflex-direction: column-reverse;\n"])));
|
|
16
|
+
|
|
17
|
+
var border = function border(_ref) {
|
|
18
|
+
var colors = _ref.theme.colors;
|
|
19
|
+
return emotion.css(_templateObject5 || (_templateObject5 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\tborder: 1px solid ", ";\n"])), colors.borderColor || '#ccc');
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
var Flex = styled__default('div')(_templateObject6 || (_templateObject6 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\tdisplay: ", ";\n\t", ";\n\t", ";\n\t", ";\n\t", ";\n\t", ";\n\n\t", ";\n\t", ";\n\n\t", ";\n\t", ";\n\t", ";\n\n\tsvg.cancel-icon {\n\t\tcursor: pointer;\n\t\tfill: ", ";\n\t\tflex-basis: 30px;\n\n\t\t&:hover {\n\t\t\tfill: ", ";\n\t\t}\n\t}\n"])), function (props) {
|
|
23
|
+
return props.inline ? 'inline-flex' : 'flex';
|
|
24
|
+
}, function (props) {
|
|
25
|
+
return (props.labelPosition === 'left' || props.iconPosition === 'right') && leftLabel;
|
|
26
|
+
}, function (props) {
|
|
27
|
+
return (props.labelPosition === 'right' || props.iconPosition === 'left') && rightLabel;
|
|
28
|
+
}, function (props) {
|
|
29
|
+
return props.labelPosition === 'top' && topLabel;
|
|
30
|
+
}, function (props) {
|
|
31
|
+
return props.labelPosition === 'bottom' && bottomLabel;
|
|
32
|
+
}, function (props) {
|
|
33
|
+
return props.showBorder && border;
|
|
34
|
+
}, function (props) {
|
|
35
|
+
return props.justifyContent && emotion.css(_templateObject7 || (_templateObject7 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\t\t\tjustify-content: ", ";\n\t\t"])), props.justifyContent);
|
|
36
|
+
}, function (props) {
|
|
37
|
+
return props.alignItems && emotion.css(_templateObject8 || (_templateObject8 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\t\t\talign-items: ", ";\n\t\t"])), props.alignItems);
|
|
38
|
+
}, function (props) {
|
|
39
|
+
return props.flex && emotion.css(_templateObject9 || (_templateObject9 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\t\t\tflex: ", ";\n\t\t"])), props.flex);
|
|
40
|
+
}, function (props) {
|
|
41
|
+
return props.direction && emotion.css(_templateObject10 || (_templateObject10 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\t\t\tflex-direction: ", ";\n\t\t"])), props.direction);
|
|
42
|
+
}, function (props) {
|
|
43
|
+
return props.basis && emotion.css(_templateObject11 || (_templateObject11 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\t\t\tflex-basis: ", ";\n\t\t"])), props.basis);
|
|
44
|
+
}, function (_ref2) {
|
|
45
|
+
var colors = _ref2.theme.colors;
|
|
46
|
+
return colors.borderColor || polished.lighten(0.3, colors.textColor);
|
|
47
|
+
}, function (_ref3) {
|
|
48
|
+
var theme = _ref3.theme;
|
|
49
|
+
return theme.colors.textColor;
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
exports.Flex = Flex;
|
|
@@ -0,0 +1,47 @@
|
|
|
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
|
+
|
|
11
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
12
|
+
var item = {
|
|
13
|
+
width: '15px',
|
|
14
|
+
height: '15px',
|
|
15
|
+
scale: '4px'
|
|
16
|
+
};
|
|
17
|
+
var vh = emotion.css(_templateObject || (_templateObject = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\tborder: 0;\n\tclip: rect(1px, 1px, 1px, 1px);\n\tclip-path: inset(50%);\n\theight: 1px;\n\toverflow: hidden;\n\tpadding: 0;\n\tposition: absolute;\n\twidth: 1px;\n\twhite-space: nowrap;\n"])));
|
|
18
|
+
var hideInputControl = emotion.css(_templateObject2 || (_templateObject2 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\t+ label {\n\t\tpadding-left: 0;\n\n\t\t&::before,\n\t\t&::after {\n\t\t\twidth: 0;\n\t\t\theight: 0;\n\t\t\tborder: 0;\n\t\t\tmargin: 0;\n\t\t\tvisibility: hidden;\n\t\t}\n\t}\n\n\t&:checked {\n\t\t+ label {\n\t\t\tfont-weight: bold;\n\t\t}\n\t}\n"])));
|
|
19
|
+
|
|
20
|
+
var formItem = function formItem(_ref) {
|
|
21
|
+
var theme = _ref.theme;
|
|
22
|
+
return emotion.css(_templateObject3 || (_templateObject3 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\t", ";\n\n\t&:focus {\n\t\t+ label {\n\t\t\t&::before {\n\t\t\t\tbox-shadow: 0 0 0 2px ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t&:hover {\n\t\t+ label {\n\t\t\t&::before {\n\t\t\t\tborder-color: ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t&:active {\n\t\t+ label {\n\t\t\t&::before {\n\t\t\t\ttransition-duration: 0;\n\t\t\t}\n\t\t}\n\t}\n\n\t+ label {\n\t\tposition: relative;\n\t\tuser-select: none;\n\t\tdisplay: flex;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\talign-items: center;\n\t\tcursor: pointer;\n\n\t\t&::before {\n\t\t\tbackground-color: #fff;\n\t\t\tborder: 1px solid ", ";\n\t\t\tbox-sizing: content-box;\n\t\t\tcontent: '';\n\t\t\tcolor: ", ";\n\t\t\tmargin-right: calc(", " * 0.5);\n\t\t\ttop: 50%;\n\t\t\tleft: 0;\n\t\t\twidth: ", ";\n\t\t\theight: ", ";\n\t\t\tdisplay: inline-block;\n\t\t\tvertical-align: middle;\n\t\t}\n\n\t\t&::after {\n\t\t\tbox-sizing: content-box;\n\t\t\tcontent: '';\n\t\t\tbackground-color: ", ";\n\t\t\tposition: absolute;\n\t\t\ttop: 50%;\n\t\t\tleft: calc(1px + ", " / 2);\n\t\t\twidth: calc(", " - ", ");\n\t\t\theight: calc(", " - ", ");\n\t\t\tmargin-top: calc(", " / -2 - ", " / -2);\n\t\t\ttransform: scale(0);\n\t\t\ttransform-origin: 50%;\n\t\t\ttransition: transform 200ms ease-out;\n\t\t}\n\t}\n"])), vh, polished.lighten(0.4, theme.colors.primaryColor), theme.colors.primaryColor, theme.colors.borderColor || polished.lighten(0.1, theme.colors.textColor), theme.colors.primaryColor, item.width, item.width, item.height, theme.colors.primaryColor, item.scale, item.width, item.scale, item.height, item.scale, item.height, item.scale);
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
var Radio = styled__default('input')(_templateObject4 || (_templateObject4 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\t", ";\n\t", ";\n\n\t+ label {\n\t\t&::before,\n\t\t&::after {\n\t\t\tborder-radius: 50%;\n\t\t}\n\t}\n\n\t&:checked {\n\t\t&:active,\n\t\t&:focus {\n\t\t\t+ label {\n\t\t\t\tcolor: ", ";\n\n\t\t\t\t&::before {\n\t\t\t\t\tanimation: none;\n\t\t\t\t\tfilter: none;\n\t\t\t\t\ttransition: none;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t+ label {\n\t\t\t&::before {\n\t\t\t\tanimation: none;\n\t\t\t\tbackground-color: #fff;\n\t\t\t\tborder-color: ", ";\n\t\t}\n\n\t\t&::after {\n\t\t\ttransform: scale(1);\n\t\t}\n\t}\n"])), formItem, function (props) {
|
|
26
|
+
return props.show ? null : hideInputControl;
|
|
27
|
+
}, function (_ref2) {
|
|
28
|
+
var theme = _ref2.theme;
|
|
29
|
+
return theme.colors.primaryColor;
|
|
30
|
+
}, function (_ref3) {
|
|
31
|
+
var theme = _ref3.theme;
|
|
32
|
+
return theme.colors.primaryColor;
|
|
33
|
+
});
|
|
34
|
+
var Checkbox = styled__default('input')(_templateObject5 || (_templateObject5 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\t", ";\n\t", ";\n\n\t+ label {\n\t\t&::before,\n\t\t&::after {\n\t\t\tborder-radius: 0;\n\t\t}\n\n\t\t&::after {\n\t\t\tbackground-color: transparent;\n\t\t\ttop: 50%;\n\t\t\tleft: calc(1px + ", " / 5);\n\t\t\twidth: calc(", " / 2);\n\t\t\theight: calc(", " / 5);\n\t\t\tmargin-top: calc(", " / -2 / 2 * 0.8);\n\t\t\tborder-style: solid;\n\t\t\tborder-color: ", ";\n\t\t\tborder-width: 0 0 2px 2px;\n\t\t\tborder-radius: 0;\n\t\t\tborder-image: none;\n\t\t\ttransform: rotate(-45deg) scale(0);\n\t\t\ttransition: none;\n\t\t}\n\t}\n\n\t&:checked {\n\t\t+ label {\n\t\t\t&::before {\n\t\t\t\tborder-color: ", ";\n\t\t\t}\n\n\t\t\t&::after {\n\t\t\t\tcontent: '';\n\t\t\t\ttransform: rotate(-45deg) scale(1);\n\t\t\t\ttransition: transform 200ms ease-out;\n\t\t\t}\n\t\t}\n\t}\n"])), formItem, function (props) {
|
|
35
|
+
return props.show ? null : hideInputControl;
|
|
36
|
+
}, item.width, item.width, item.width, item.height, function (_ref4) {
|
|
37
|
+
var theme = _ref4.theme;
|
|
38
|
+
return theme.colors.primaryColor;
|
|
39
|
+
}, function (_ref5) {
|
|
40
|
+
var theme = _ref5.theme;
|
|
41
|
+
return theme.colors.primaryColor;
|
|
42
|
+
});
|
|
43
|
+
var UL = styled__default('ul')(_templateObject6 || (_templateObject6 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\tlist-style: none;\n\tpadding: 0;\n\tmargin: 0;\n\tmax-height: 240px;\n\tposition: relative;\n\toverflow-y: auto;\n\tpadding-bottom: 12px;\n\n\tli {\n\t\theight 30px;\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\talign-items: center;\n\t\tpadding-left: 2px;\n\t}\n"])));
|
|
44
|
+
|
|
45
|
+
exports.Checkbox = Checkbox;
|
|
46
|
+
exports.Radio = Radio;
|
|
47
|
+
exports.UL = UL;
|
|
@@ -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;
|