@appbaseio/reactivesearch-vue 2.0.0-alpha.3 → 3.0.0-alpha.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 +17405 -25231
- package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js +6 -15
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
- package/dist/cjs/Button-ad042719.js +59 -0
- package/dist/cjs/Card-f5ab024a.js +27 -0
- package/dist/cjs/{ComponentWrapper-ad3dad02.js → ComponentWrapper-75f88599.js} +42 -56
- package/dist/cjs/Container-29f049b2.js +12 -0
- package/dist/cjs/DropDown-6cf84c47.js +698 -0
- package/dist/cjs/DynamicRangeSlider.js +103 -155
- package/dist/cjs/Flex-d5675ea6.js +48 -0
- package/dist/cjs/FormControlList-fadd792f.js +42 -0
- package/dist/cjs/Input-4b434436.js +74 -0
- package/dist/cjs/ListItem-d57d648d.js +42 -0
- package/dist/cjs/MultiDropdownList.js +124 -240
- package/dist/cjs/MultiList.js +123 -261
- package/dist/cjs/MultiRange.js +87 -133
- package/dist/cjs/{Pagination-71e85fa9.js → Pagination-b5ddc906.js} +70 -83
- package/dist/cjs/PreferencesConsumer-eb265924.js +75 -0
- package/dist/cjs/RangeInput.js +163 -171
- package/dist/cjs/RangeSlider.js +81 -109
- package/dist/cjs/ReactiveBase.js +139 -157
- package/dist/cjs/ReactiveComponent-eb8db4c1.js +2189 -0
- package/dist/cjs/ReactiveComponent.js +46 -340
- package/dist/cjs/ReactiveGoogleMap.js +445 -655
- package/dist/cjs/ReactiveList.js +179 -304
- package/dist/cjs/ResultCard.js +36 -36
- package/dist/cjs/ResultList.js +48 -56
- package/dist/cjs/SelectedFilters.js +62 -69
- package/dist/cjs/SingleDropdownList.js +117 -177
- package/dist/cjs/SingleList.js +121 -205
- package/dist/cjs/SingleRange.js +78 -105
- package/dist/cjs/StateProvider.js +74 -47
- package/dist/cjs/Title-8802a218.js +12 -0
- package/dist/cjs/ToggleButton.js +72 -119
- package/dist/cjs/{_rollupPluginBabelHelpers-c705cbe6.js → _rollupPluginBabelHelpers-f8b843f8.js} +0 -15
- package/dist/cjs/{index-6a167fe0.js → index-d8d8f291.js} +38 -108
- package/dist/cjs/index.js +44 -41
- package/dist/cjs/initReactivesearch.js +69 -152
- package/dist/cjs/install.js +47 -43
- package/dist/cjs/ssr-6907ada3.js +66 -0
- package/dist/cjs/{utils-d6a52588.js → utils-83fd01e9.js} +7 -16
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/{vueTypes-727b7c63.js → vueTypes-1bf00978.js} +8 -19
- package/dist/es/Button-474510e3.js +53 -0
- package/dist/es/{Card-450683f1.js → Card-38cbe652.js} +3 -3
- package/dist/es/{ComponentWrapper-424e86fd.js → ComponentWrapper-5166c76a.js} +42 -56
- package/dist/es/{Container-ba826e96.js → Container-d00219f7.js} +2 -2
- package/dist/es/DropDown-8764360c.js +688 -0
- package/dist/es/DynamicRangeSlider.js +103 -155
- package/dist/es/Flex-a08e22d7.js +46 -0
- package/dist/es/FormControlList-fe6eaee4.js +38 -0
- package/dist/es/Input-4a8ef1f3.js +69 -0
- package/dist/es/{ListItem-cad14c5e.js → ListItem-16756c02.js} +7 -8
- package/dist/es/MultiDropdownList.js +124 -240
- package/dist/es/MultiList.js +123 -261
- package/dist/es/MultiRange.js +87 -133
- package/dist/es/{Pagination-784bf143.js → Pagination-72bd1d9e.js} +70 -83
- package/dist/es/PreferencesConsumer-c276709c.js +73 -0
- package/dist/es/RangeInput.js +163 -170
- package/dist/es/RangeSlider.js +81 -109
- package/dist/es/ReactiveBase.js +138 -155
- package/dist/es/ReactiveComponent-f9fa5780.js +2183 -0
- package/dist/es/ReactiveComponent.js +42 -337
- package/dist/es/ReactiveGoogleMap.js +440 -649
- package/dist/es/ReactiveList.js +177 -301
- package/dist/es/ResultCard.js +36 -36
- package/dist/es/ResultList.js +48 -56
- package/dist/es/SelectedFilters.js +62 -69
- package/dist/es/SingleDropdownList.js +117 -177
- package/dist/es/SingleList.js +121 -205
- package/dist/es/SingleRange.js +78 -105
- package/dist/es/StateProvider.js +75 -48
- package/dist/es/{Title-3342664a.js → Title-863dfa42.js} +2 -2
- package/dist/es/ToggleButton.js +72 -119
- package/dist/es/{_rollupPluginBabelHelpers-76660dab.js → _rollupPluginBabelHelpers-ded08042.js} +0 -15
- package/dist/es/{index-7788a843.js → index-4520a598.js} +39 -107
- package/dist/es/index.js +30 -32
- package/dist/es/initReactivesearch.js +69 -152
- package/dist/es/install.js +49 -41
- package/dist/es/{ssr-b2c0b401.js → ssr-af398f0c.js} +36 -7
- package/dist/es/{utils-9e68acee.js → utils-9e5a16a1.js} +7 -16
- package/dist/es/version.js +1 -1
- package/dist/es/{vueTypes-b8146772.js → vueTypes-f1923c72.js} +8 -19
- package/package.json +10 -9
- package/dist/cjs/Button-446f819e.js +0 -68
- package/dist/cjs/CancelSvg-9f258f4f.js +0 -449
- package/dist/cjs/Card-642547a8.js +0 -30
- package/dist/cjs/Container-daf30918.js +0 -15
- package/dist/cjs/DataSearch-6cf29cf0.js +0 -2323
- package/dist/cjs/DataSearch.js +0 -30
- package/dist/cjs/DropDown-c479bbb0.js +0 -328
- package/dist/cjs/Flex-aa517a13.js +0 -52
- package/dist/cjs/FormControlList-c195a592.js +0 -47
- package/dist/cjs/Input-e6603a7e.js +0 -79
- package/dist/cjs/ListItem-8c9e0d68.js +0 -46
- package/dist/cjs/Title-1de7d0f4.js +0 -15
- package/dist/cjs/install-42ba1d44.js +0 -1409
- package/dist/cjs/ssr-3027b848.js +0 -39
- package/dist/es/Button-d8bc15ea.js +0 -59
- package/dist/es/CancelSvg-4cfae5fd.js +0 -440
- package/dist/es/DataSearch-4888aa43.js +0 -2308
- package/dist/es/DataSearch.js +0 -22
- package/dist/es/DropDown-05a644a5.js +0 -322
- package/dist/es/Flex-1f0795c3.js +0 -47
- package/dist/es/FormControlList-c22d64f6.js +0 -40
- package/dist/es/Input-7a2a9fac.js +0 -71
- package/dist/es/install-80bc2764.js +0 -1402
|
@@ -6,33 +6,34 @@ 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-c705cbe6.js');
|
|
10
|
-
var VueTypes = _interopDefault(require('vue-types'));
|
|
11
9
|
var constants = require('@appbaseio/reactivecore/lib/utils/constants');
|
|
10
|
+
require('./_rollupPluginBabelHelpers-f8b843f8.js');
|
|
11
|
+
var vue = require('vue');
|
|
12
|
+
var VueTypes = _interopDefault(require('vue-types'));
|
|
12
13
|
require('@appbaseio/vue-emotion');
|
|
13
|
-
var vueTypes = require('./vueTypes-
|
|
14
|
+
var vueTypes = require('./vueTypes-1bf00978.js');
|
|
14
15
|
require('redux');
|
|
15
|
-
var index = require('./index-
|
|
16
|
-
var
|
|
17
|
-
var
|
|
18
|
-
var
|
|
19
|
-
var ssr = require('./ssr-
|
|
16
|
+
var index = require('./index-d8d8f291.js');
|
|
17
|
+
var PreferencesConsumer = require('./PreferencesConsumer-eb265924.js');
|
|
18
|
+
var Title = require('./Title-8802a218.js');
|
|
19
|
+
var Container = require('./Container-29f049b2.js');
|
|
20
|
+
var ssr = require('./ssr-6907ada3.js');
|
|
20
21
|
|
|
21
22
|
var addComponent = configureStore.Actions.addComponent,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
removeComponent = configureStore.Actions.removeComponent,
|
|
24
|
+
watchComponent = configureStore.Actions.watchComponent,
|
|
25
|
+
updateQuery = configureStore.Actions.updateQuery,
|
|
26
|
+
setQueryListener = configureStore.Actions.setQueryListener,
|
|
27
|
+
setQueryOptions = configureStore.Actions.setQueryOptions,
|
|
28
|
+
setComponentProps = configureStore.Actions.setComponentProps,
|
|
29
|
+
setCustomQuery = configureStore.Actions.setCustomQuery,
|
|
30
|
+
updateComponentProps = configureStore.Actions.updateComponentProps;
|
|
30
31
|
var checkValueChange = configureStore.helper.checkValueChange,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
getClassName = configureStore.helper.getClassName,
|
|
33
|
+
isEqual = configureStore.helper.isEqual,
|
|
34
|
+
checkSomePropChange = configureStore.helper.checkSomePropChange,
|
|
35
|
+
extractQueryFromCustomQuery = configureStore.helper.extractQueryFromCustomQuery,
|
|
36
|
+
getOptionsForCustomQuery = configureStore.helper.getOptionsForCustomQuery;
|
|
36
37
|
var DynamicRangeSlider = {
|
|
37
38
|
name: 'DynamicRangeSlider',
|
|
38
39
|
components: ssr.getComponents(),
|
|
@@ -68,27 +69,19 @@ var DynamicRangeSlider = {
|
|
|
68
69
|
},
|
|
69
70
|
created: function created() {
|
|
70
71
|
var _this = this;
|
|
71
|
-
|
|
72
72
|
var onQueryChange = function onQueryChange() {
|
|
73
73
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
74
74
|
args[_key] = arguments[_key];
|
|
75
75
|
}
|
|
76
|
-
|
|
77
76
|
_this.$emit.apply(_this, ['queryChange'].concat(args));
|
|
78
|
-
|
|
79
77
|
_this.$emit.apply(_this, ['query-change'].concat(args));
|
|
80
78
|
};
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
79
|
+
this.setQueryListener(this.$props.componentId, onQueryChange, null);
|
|
80
|
+
// Update props in store
|
|
84
81
|
this.setComponentProps(this.componentId, this.$props, constants.componentTypes.dynamicRangeSlider);
|
|
85
82
|
this.setComponentProps(this.internalRangeComponent, this.$props, constants.componentTypes.dynamicRangeSlider);
|
|
86
83
|
|
|
87
|
-
|
|
88
|
-
console.warn('Warning(ReactiveSearch): In order to use the `index` prop, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
|
|
89
|
-
} // Set custom query in store
|
|
90
|
-
|
|
91
|
-
|
|
84
|
+
// Set custom query in store
|
|
92
85
|
index.updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
|
|
93
86
|
},
|
|
94
87
|
mounted: function mounted() {
|
|
@@ -96,28 +89,23 @@ var DynamicRangeSlider = {
|
|
|
96
89
|
},
|
|
97
90
|
beforeMount: function beforeMount() {
|
|
98
91
|
var components = [];
|
|
99
|
-
|
|
100
92
|
if (this.$$store) {
|
|
101
93
|
var _this$$$store$getStat = this.$$store.getState();
|
|
102
|
-
|
|
103
94
|
components = _this$$$store$getStat.components;
|
|
104
95
|
}
|
|
105
|
-
|
|
106
96
|
var value = this.$props.value;
|
|
107
|
-
|
|
108
97
|
if (this.destroyOnUnmount || components.indexOf(this.componentId) === -1) {
|
|
109
98
|
this.addComponent(this.componentId);
|
|
110
99
|
this.addComponent(this.internalRangeComponent);
|
|
111
|
-
|
|
112
100
|
if (Array.isArray(this.selectedValue)) {
|
|
113
101
|
this.handleChange(this.selectedValue);
|
|
114
102
|
} else if (this.selectedValue) {
|
|
115
103
|
this.handleChange(DynamicRangeSlider.parseValue(this.selectedValue, this.$props));
|
|
116
104
|
} else if (value) {
|
|
117
105
|
this.handleChange(DynamicRangeSlider.parseValue(value, this.$props));
|
|
118
|
-
}
|
|
119
|
-
|
|
106
|
+
}
|
|
120
107
|
|
|
108
|
+
// get range before executing other queries
|
|
121
109
|
this.updateRangeQueryOptions();
|
|
122
110
|
}
|
|
123
111
|
},
|
|
@@ -126,7 +114,7 @@ var DynamicRangeSlider = {
|
|
|
126
114
|
this.setDefaultValue(this.range);
|
|
127
115
|
}
|
|
128
116
|
},
|
|
129
|
-
|
|
117
|
+
beforeUnmount: function beforeUnmount() {
|
|
130
118
|
if (this.destroyOnUnmount) {
|
|
131
119
|
this.removeComponent(this.$props.componentId);
|
|
132
120
|
this.removeComponent(this.internalRangeComponent);
|
|
@@ -134,21 +122,18 @@ var DynamicRangeSlider = {
|
|
|
134
122
|
},
|
|
135
123
|
methods: {
|
|
136
124
|
isControlled: function isControlled() {
|
|
137
|
-
if (this.$props.value && this.$
|
|
125
|
+
if (this.$props.value && this.$attrs) {
|
|
138
126
|
return true;
|
|
139
127
|
}
|
|
140
|
-
|
|
141
128
|
return false;
|
|
142
129
|
},
|
|
143
130
|
setDefaultValue: function setDefaultValue(_ref) {
|
|
144
131
|
var start = _ref.start,
|
|
145
|
-
|
|
146
|
-
|
|
132
|
+
end = _ref.end;
|
|
147
133
|
if (this.$props.defaultValue) {
|
|
148
134
|
var _this$$props$defaultV = this.$props.defaultValue(start, end),
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
135
|
+
defaultStart = _this$$props$defaultV.start,
|
|
136
|
+
defaultEnd = _this$$props$defaultV.end;
|
|
152
137
|
this.handleChange([defaultStart, defaultEnd]);
|
|
153
138
|
} else if (this.isControlled()) {
|
|
154
139
|
this.handleChange(DynamicRangeSlider.parseValue(this.$props.value), 'change');
|
|
@@ -181,10 +166,8 @@ var DynamicRangeSlider = {
|
|
|
181
166
|
},
|
|
182
167
|
updateRangeQueryOptions: function updateRangeQueryOptions() {
|
|
183
168
|
var aggs = {};
|
|
184
|
-
|
|
185
169
|
if (this.$props.nestedField) {
|
|
186
170
|
var _aggs;
|
|
187
|
-
|
|
188
171
|
aggs = (_aggs = {}, _aggs[this.$props.nestedField] = {
|
|
189
172
|
nested: {
|
|
190
173
|
path: this.$props.nestedField
|
|
@@ -194,7 +177,6 @@ var DynamicRangeSlider = {
|
|
|
194
177
|
} else {
|
|
195
178
|
aggs = this.rangeQuery();
|
|
196
179
|
}
|
|
197
|
-
|
|
198
180
|
this.setQueryOptions(this.internalRangeComponent, {
|
|
199
181
|
aggs: aggs
|
|
200
182
|
});
|
|
@@ -202,7 +184,6 @@ var DynamicRangeSlider = {
|
|
|
202
184
|
handleSlider: function handleSlider() {
|
|
203
185
|
var sliderValues = this.$refs.slider.getValue();
|
|
204
186
|
var value = this.$props.value;
|
|
205
|
-
|
|
206
187
|
if (value === undefined) {
|
|
207
188
|
this.handleChange(sliderValues);
|
|
208
189
|
} else {
|
|
@@ -214,26 +195,20 @@ var DynamicRangeSlider = {
|
|
|
214
195
|
},
|
|
215
196
|
handleChange: function handleChange(currentValue) {
|
|
216
197
|
var _this2 = this;
|
|
217
|
-
|
|
218
198
|
// Always keep the values within range
|
|
219
199
|
var normalizedValue = [this.range ? Math.max(this.range.start, currentValue[0]) : currentValue[0], this.range ? Math.min(this.range.end, currentValue[1]) : currentValue[1]];
|
|
220
|
-
|
|
221
200
|
var performUpdate = function performUpdate() {
|
|
222
201
|
_this2.currentValue = normalizedValue;
|
|
223
|
-
|
|
224
202
|
_this2.updateQueryHandler(normalizedValue, _this2.$props);
|
|
225
|
-
|
|
226
203
|
_this2.$emit('valueChange', {
|
|
227
204
|
start: normalizedValue[0],
|
|
228
205
|
end: normalizedValue[1]
|
|
229
206
|
});
|
|
230
|
-
|
|
231
207
|
_this2.$emit('value-change', {
|
|
232
208
|
start: normalizedValue[0],
|
|
233
209
|
end: normalizedValue[1]
|
|
234
210
|
});
|
|
235
211
|
};
|
|
236
|
-
|
|
237
212
|
checkValueChange(this.$props.componentId, {
|
|
238
213
|
start: normalizedValue[0],
|
|
239
214
|
end: normalizedValue[1]
|
|
@@ -241,30 +216,25 @@ var DynamicRangeSlider = {
|
|
|
241
216
|
},
|
|
242
217
|
updateQueryHandler: function updateQueryHandler(value) {
|
|
243
218
|
var query = DynamicRangeSlider.defaultQuery(value, this.$props);
|
|
244
|
-
|
|
245
219
|
if (this.$props.customQuery) {
|
|
246
220
|
var customQueryTobeSet = this.$props.customQuery(value, this.$props);
|
|
247
221
|
var queryTobeSet = extractQueryFromCustomQuery(customQueryTobeSet);
|
|
248
|
-
|
|
249
222
|
if (queryTobeSet) {
|
|
250
223
|
query = queryTobeSet;
|
|
251
224
|
}
|
|
252
|
-
|
|
253
225
|
var customQueryOptions = getOptionsForCustomQuery(customQueryTobeSet);
|
|
254
226
|
index.updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, value);
|
|
255
227
|
this.setQueryOptions(this.$props.componentId, customQueryOptions, false);
|
|
256
228
|
}
|
|
257
|
-
|
|
258
229
|
var _ref2 = this.range || {
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
230
|
+
start: value[0],
|
|
231
|
+
end: value[1]
|
|
232
|
+
},
|
|
233
|
+
start = _ref2.start,
|
|
234
|
+
end = _ref2.end;
|
|
265
235
|
var currentStart = value[0],
|
|
266
|
-
|
|
267
|
-
|
|
236
|
+
currentEnd = value[1];
|
|
237
|
+
// check if the slider is at its initial position
|
|
268
238
|
var isInitialValue = currentStart === start && currentEnd === end;
|
|
269
239
|
this.updateQuery({
|
|
270
240
|
componentId: this.$props.componentId,
|
|
@@ -288,11 +258,9 @@ var DynamicRangeSlider = {
|
|
|
288
258
|
deep: true,
|
|
289
259
|
handler: function handler(newVal) {
|
|
290
260
|
var _this3 = this;
|
|
291
|
-
|
|
292
261
|
var propsKeys = index.getValidPropsKeys(newVal);
|
|
293
262
|
checkSomePropChange(newVal, this.componentProps, propsKeys, function () {
|
|
294
263
|
_this3.updateComponentProps(_this3.componentId, newVal, constants.componentTypes.dynamicRangeSlider);
|
|
295
|
-
|
|
296
264
|
_this3.updateComponentProps(_this3.internalRangeComponent, newVal, constants.componentTypes.dynamicRangeSlider);
|
|
297
265
|
});
|
|
298
266
|
}
|
|
@@ -311,15 +279,12 @@ var DynamicRangeSlider = {
|
|
|
311
279
|
},
|
|
312
280
|
range: function range(newValue, oldValue) {
|
|
313
281
|
if (isEqual(newValue, oldValue) || !this.currentValue) return;
|
|
314
|
-
|
|
315
282
|
var _ref3 = this.currentValue || [],
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
283
|
+
currentStart = _ref3[0],
|
|
284
|
+
currentEnd = _ref3[1];
|
|
319
285
|
var _ref4 = oldValue || {},
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
286
|
+
oldStart = _ref4.start,
|
|
287
|
+
oldEnd = _ref4.end;
|
|
323
288
|
var newStart = currentStart === oldStart ? newValue.start : currentStart;
|
|
324
289
|
var newEnd = currentEnd === oldEnd ? newValue.end : currentEnd;
|
|
325
290
|
this.handleChange([newStart, newEnd]);
|
|
@@ -336,93 +301,78 @@ var DynamicRangeSlider = {
|
|
|
336
301
|
}
|
|
337
302
|
},
|
|
338
303
|
render: function render() {
|
|
339
|
-
var
|
|
340
|
-
|
|
304
|
+
var _this4 = this;
|
|
341
305
|
if (!this.range || !this.currentValue) {
|
|
342
306
|
return null;
|
|
343
307
|
}
|
|
344
|
-
|
|
345
308
|
var _this$range = this.range,
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
return
|
|
309
|
+
start = _this$range.start,
|
|
310
|
+
end = _this$range.end;
|
|
311
|
+
return vue.createVNode(Container.Container, {
|
|
349
312
|
"class": this.$props.className
|
|
350
|
-
},
|
|
351
|
-
"
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
query = {
|
|
386
|
-
range: (_range = {}, _range[props.dataField] = {
|
|
387
|
-
gte: values[0],
|
|
388
|
-
lte: values[1],
|
|
389
|
-
boost: 2.0
|
|
390
|
-
}, _range)
|
|
391
|
-
};
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
if (query && props.nestedField) {
|
|
395
|
-
return {
|
|
396
|
-
query: {
|
|
397
|
-
nested: {
|
|
398
|
-
path: props.nestedField,
|
|
399
|
-
query: query
|
|
400
|
-
}
|
|
313
|
+
}, {
|
|
314
|
+
"default": function _default() {
|
|
315
|
+
return [_this4.$props.title && vue.createVNode(Title.Title, {
|
|
316
|
+
"class": getClassName(_this4.$props.innerClass, 'title')
|
|
317
|
+
}, {
|
|
318
|
+
"default": function _default() {
|
|
319
|
+
return [_this4.$props.title];
|
|
320
|
+
}
|
|
321
|
+
}), vue.createVNode(ssr.NoSSR, null, {
|
|
322
|
+
"default": function _default() {
|
|
323
|
+
return [vue.createVNode(ssr.Slider, {
|
|
324
|
+
"class": getClassName(_this4.$props.innerClass, 'slider')
|
|
325
|
+
}, {
|
|
326
|
+
"default": function _default() {
|
|
327
|
+
return [vue.createVNode(vue.resolveComponent("vue-slider-component"), vue.mergeProps({
|
|
328
|
+
"ref": "slider",
|
|
329
|
+
"modelValue": [Math.floor(Math.max(start, _this4.currentValue[0])), Math.ceil(Math.min(end, _this4.currentValue[1]))],
|
|
330
|
+
"min": Math.floor(Math.min(start, _this4.currentValue[0])),
|
|
331
|
+
"max": Math.ceil(Math.max(end, _this4.currentValue[1])),
|
|
332
|
+
"onDrag-end": _this4.handleSlider,
|
|
333
|
+
"dotSize": 20,
|
|
334
|
+
"height": 4,
|
|
335
|
+
"enable-cross": false,
|
|
336
|
+
"tooltip": "always"
|
|
337
|
+
}, _this4.$props.sliderOptions), null), _this4.labels ? vue.createVNode("div", {
|
|
338
|
+
"class": "label-container"
|
|
339
|
+
}, [vue.createVNode("label", {
|
|
340
|
+
"class": getClassName(_this4.$props.innerClass, 'label') || 'range-label-left'
|
|
341
|
+
}, [_this4.labels.start]), vue.createVNode("label", {
|
|
342
|
+
"class": getClassName(_this4.$props.innerClass, 'label') || 'range-label-right'
|
|
343
|
+
}, [_this4.labels.end])]) : null];
|
|
344
|
+
}
|
|
345
|
+
})];
|
|
346
|
+
}
|
|
347
|
+
})];
|
|
401
348
|
}
|
|
402
|
-
};
|
|
349
|
+
});
|
|
403
350
|
}
|
|
404
|
-
|
|
405
|
-
return query;
|
|
406
351
|
};
|
|
407
|
-
|
|
352
|
+
DynamicRangeSlider.defaultQuery = function (value, props) {
|
|
353
|
+
return {
|
|
354
|
+
query: {
|
|
355
|
+
queryFormat: props.queryFormat,
|
|
356
|
+
dataField: props.dataField,
|
|
357
|
+
value: value,
|
|
358
|
+
showMissing: props.showMissing
|
|
359
|
+
}
|
|
360
|
+
};
|
|
361
|
+
};
|
|
408
362
|
DynamicRangeSlider.parseValue = function (value) {
|
|
409
363
|
if (value) {
|
|
410
364
|
return Array.isArray(value) ? value : [value.start, value.end];
|
|
411
365
|
}
|
|
412
|
-
|
|
413
366
|
return [];
|
|
414
367
|
};
|
|
415
|
-
|
|
416
368
|
DynamicRangeSlider.hasInternalComponent = function () {
|
|
417
369
|
return true;
|
|
418
370
|
};
|
|
419
|
-
|
|
420
371
|
var mapStateToProps = function mapStateToProps(state, props) {
|
|
421
372
|
var componentId = state.aggregations[props.componentId];
|
|
422
373
|
var internalRange = state.aggregations[props.componentId + "__range__internal"];
|
|
423
374
|
var options = componentId && componentId[props.dataField];
|
|
424
375
|
var range = state.aggregations[props.componentId + "__range__internal"];
|
|
425
|
-
|
|
426
376
|
if (props.nestedField) {
|
|
427
377
|
options = options && componentId[props.dataField][props.nestedField] && componentId[props.dataField][props.nestedField].buckets ? componentId[props.dataField][props.nestedField].buckets : [];
|
|
428
378
|
range = range && internalRange[props.nestedField].min ? {
|
|
@@ -436,16 +386,13 @@ var mapStateToProps = function mapStateToProps(state, props) {
|
|
|
436
386
|
end: internalRange.max.value
|
|
437
387
|
} : null;
|
|
438
388
|
}
|
|
439
|
-
|
|
440
389
|
return {
|
|
441
390
|
options: options,
|
|
442
391
|
range: range,
|
|
443
392
|
selectedValue: state.selectedValues[props.componentId] ? state.selectedValues[props.componentId].value : null,
|
|
444
|
-
componentProps: state.props[props.componentId]
|
|
445
|
-
enableAppbase: state.config.enableAppbase
|
|
393
|
+
componentProps: state.props[props.componentId]
|
|
446
394
|
};
|
|
447
395
|
};
|
|
448
|
-
|
|
449
396
|
var mapDispatchtoProps = {
|
|
450
397
|
addComponent: addComponent,
|
|
451
398
|
removeComponent: removeComponent,
|
|
@@ -457,13 +404,14 @@ var mapDispatchtoProps = {
|
|
|
457
404
|
setCustomQuery: setCustomQuery,
|
|
458
405
|
updateComponentProps: updateComponentProps
|
|
459
406
|
};
|
|
460
|
-
var RangeConnected = index.connect(mapStateToProps, mapDispatchtoProps)(DynamicRangeSlider);
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
Vue.component(
|
|
464
|
-
};
|
|
465
|
-
|
|
407
|
+
var RangeConnected = PreferencesConsumer.PreferencesConsumer(index.connect(mapStateToProps, mapDispatchtoProps)(DynamicRangeSlider));
|
|
408
|
+
RangeConnected.name = DynamicRangeSlider.name;
|
|
409
|
+
RangeConnected.install = function (Vue) {
|
|
410
|
+
Vue.component(RangeConnected.name, RangeConnected);
|
|
411
|
+
};
|
|
466
412
|
|
|
467
|
-
|
|
413
|
+
// Add componentType for SSR
|
|
414
|
+
RangeConnected.componentType = constants.componentTypes.dynamicRangeSlider;
|
|
468
415
|
|
|
469
|
-
exports.
|
|
416
|
+
exports.RangeConnected = RangeConnected;
|
|
417
|
+
exports.default = RangeConnected;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-f8b843f8.js');
|
|
4
|
+
var vueEmotion = require('@appbaseio/vue-emotion');
|
|
5
|
+
var polished = require('polished');
|
|
6
|
+
|
|
7
|
+
var _templateObject;
|
|
8
|
+
var leftLabel = "\n\tflex-direction: row;\n\talign-items: center;\n";
|
|
9
|
+
var rightLabel = "\n\tflex-direction: row-reverse;\n\talign-items: center;\n";
|
|
10
|
+
var topLabel = "\n\tflex-direction: column;\n";
|
|
11
|
+
var bottomLabel = "\n\tflex-direction: column-reverse;\n";
|
|
12
|
+
var border = function border(_ref) {
|
|
13
|
+
var _ref$theme$colors = _ref.theme.colors,
|
|
14
|
+
colors = _ref$theme$colors === void 0 ? {} : _ref$theme$colors;
|
|
15
|
+
return "\n\tborder: 1px solid " + (colors.borderColor || '#ccc') + ";\n";
|
|
16
|
+
};
|
|
17
|
+
var Flex = vueEmotion.styled('div')(_templateObject || (_templateObject = _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) {
|
|
18
|
+
return props.inline ? 'inline-flex' : 'flex';
|
|
19
|
+
}, function (props) {
|
|
20
|
+
return (props.labelPosition === 'left' || props.iconPosition === 'right') && leftLabel;
|
|
21
|
+
}, function (props) {
|
|
22
|
+
return (props.labelPosition === 'right' || props.iconPosition === 'left') && rightLabel;
|
|
23
|
+
}, function (props) {
|
|
24
|
+
return props.labelPosition === 'top' && topLabel;
|
|
25
|
+
}, function (props) {
|
|
26
|
+
return props.labelPosition === 'bottom' && bottomLabel;
|
|
27
|
+
}, function (props) {
|
|
28
|
+
return props.showBorder && border;
|
|
29
|
+
}, function (props) {
|
|
30
|
+
return props.justifyContent && "\n\t\t\tjustify-content: " + props.justifyContent + ";\n\t\t";
|
|
31
|
+
}, function (props) {
|
|
32
|
+
return props.alignItems && "\n\t\t\talign-items: " + props.alignItems + ";\n\t\t";
|
|
33
|
+
}, function (props) {
|
|
34
|
+
return props.flex && "\n\t\t\tflex: " + props.flex + ";\n\t\t";
|
|
35
|
+
}, function (props) {
|
|
36
|
+
return props.direction && "\n\t\t\tflex-direction: " + props.direction + ";\n\t\t";
|
|
37
|
+
}, function (props) {
|
|
38
|
+
return props.basis && "\n\t\t\tflex-basis: " + props.basis + ";\n\t\t";
|
|
39
|
+
}, function (_ref2) {
|
|
40
|
+
var _ref2$theme$colors = _ref2.theme.colors,
|
|
41
|
+
colors = _ref2$theme$colors === void 0 ? {} : _ref2$theme$colors;
|
|
42
|
+
return colors.borderColor || polished.lighten(0.3, colors.textColor || '#fff');
|
|
43
|
+
}, function (_ref3) {
|
|
44
|
+
var theme = _ref3.theme;
|
|
45
|
+
return theme.colors ? theme.colors.textColor : '';
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
exports.Flex = Flex;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-f8b843f8.js');
|
|
4
|
+
var vueEmotion = require('@appbaseio/vue-emotion');
|
|
5
|
+
var polished = require('polished');
|
|
6
|
+
|
|
7
|
+
var _templateObject, _templateObject2, _templateObject3;
|
|
8
|
+
var item = {
|
|
9
|
+
width: '15px',
|
|
10
|
+
height: '15px',
|
|
11
|
+
scale: '4px'
|
|
12
|
+
};
|
|
13
|
+
var vh = "\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";
|
|
14
|
+
var hideInputControl = "\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";
|
|
15
|
+
var formItem = function formItem(_ref) {
|
|
16
|
+
var _ref$theme = _ref.theme,
|
|
17
|
+
theme = _ref$theme === void 0 ? {} : _ref$theme;
|
|
18
|
+
return "\n\t" + vh + ";\n\n\t&:focus {\n\t\t+ label {\n\t\t\t&::before {\n\t\t\t\tbox-shadow: 0 0 0 2px " + polished.lighten(0.4, theme.colors.primaryColor) + ";\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: " + theme.colors.primaryColor + ";\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 " + (theme.colors.borderColor || polished.lighten(0.1, theme.colors.textColor)) + ";\n\t\t\tbox-sizing: content-box;\n\t\t\tcontent: '';\n\t\t\tcolor: " + theme.colors.primaryColor + ";\n\t\t\tmargin-right: calc(" + item.width + " * 0.5);\n\t\t\ttop: 50%;\n\t\t\tleft: 0;\n\t\t\twidth: " + item.width + ";\n\t\t\theight: " + item.height + ";\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: " + theme.colors.primaryColor + ";\n\t\t\tposition: absolute;\n\t\t\ttop: 50%;\n\t\t\tleft: calc(1px + " + item.scale + " / 2);\n\t\t\twidth: calc(" + item.width + " - " + item.scale + ");\n\t\t\theight: calc(" + item.height + " - " + item.scale + ");\n\t\t\tmargin-top: calc(" + item.height + " / -2 - " + item.scale + " / -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";
|
|
19
|
+
};
|
|
20
|
+
var Radio = vueEmotion.styled('input')(_templateObject || (_templateObject = _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) {
|
|
21
|
+
return props.show ? null : hideInputControl;
|
|
22
|
+
}, function (_ref2) {
|
|
23
|
+
var theme = _ref2.theme;
|
|
24
|
+
return theme.colors.primaryColor;
|
|
25
|
+
}, function (_ref3) {
|
|
26
|
+
var theme = _ref3.theme;
|
|
27
|
+
return theme.colors.primaryColor;
|
|
28
|
+
});
|
|
29
|
+
var Checkbox = vueEmotion.styled('input')(_templateObject2 || (_templateObject2 = _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) {
|
|
30
|
+
return props.show ? null : hideInputControl;
|
|
31
|
+
}, item.width, item.width, item.width, item.height, function (_ref4) {
|
|
32
|
+
var theme = _ref4.theme;
|
|
33
|
+
return theme.colors.primaryColor;
|
|
34
|
+
}, function (_ref5) {
|
|
35
|
+
var theme = _ref5.theme;
|
|
36
|
+
return theme.colors.primaryColor;
|
|
37
|
+
});
|
|
38
|
+
var UL = vueEmotion.styled('ul')(_templateObject3 || (_templateObject3 = _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"])));
|
|
39
|
+
|
|
40
|
+
exports.Checkbox = Checkbox;
|
|
41
|
+
exports.Radio = Radio;
|
|
42
|
+
exports.UL = UL;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-f8b843f8.js');
|
|
4
|
+
var vueEmotion = require('@appbaseio/vue-emotion');
|
|
5
|
+
var emotion = require('emotion');
|
|
6
|
+
|
|
7
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
8
|
+
var alertBorder = function alertBorder(_ref) {
|
|
9
|
+
var theme = _ref.theme;
|
|
10
|
+
return "\n\tborder: 1px solid " + theme.colors.alertColor + ";\n";
|
|
11
|
+
};
|
|
12
|
+
var input = "\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";
|
|
13
|
+
var dark = function dark(theme) {
|
|
14
|
+
return "\n\tborder-color: " + theme.colors.borderColor + ";\n";
|
|
15
|
+
};
|
|
16
|
+
var darkInput = function darkInput(_ref2) {
|
|
17
|
+
var theme = _ref2.theme;
|
|
18
|
+
return "\n\tbackground-color: " + theme.colors.backgroundColor + ";\n\tcolor: " + theme.colors.textColor + ";\n\t" + dark(theme) + ";\n\n\t&:focus {\n\t\tbackground-color: " + theme.colors.backgroundColor + ";\n\t}\n";
|
|
19
|
+
};
|
|
20
|
+
var Input = vueEmotion.styled('input')(_templateObject || (_templateObject = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\t", ";\n\n\t&:focus {\n\t\tbackground-color: #fff;\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) {
|
|
21
|
+
var themePreset = _ref3.themePreset,
|
|
22
|
+
theme = _ref3.theme;
|
|
23
|
+
return themePreset === 'dark' && darkInput({
|
|
24
|
+
theme: theme
|
|
25
|
+
});
|
|
26
|
+
}, function (props) {
|
|
27
|
+
return props.showIcon && props.iconPosition === 'left' && "\n\t\t\tpadding-left: 36px;\n\t\t";
|
|
28
|
+
}, function (props) {
|
|
29
|
+
return props.showIcon && props.iconPosition === 'right' && "\n\t\t\tpadding-right: 36px;\n\t\t";
|
|
30
|
+
}, function (props) {
|
|
31
|
+
return (
|
|
32
|
+
// for clear icon
|
|
33
|
+
props.showClear && "\n\t\t\tpadding-right: 36px;\n\t\t"
|
|
34
|
+
);
|
|
35
|
+
}, function (props) {
|
|
36
|
+
return (
|
|
37
|
+
// for voice search icon
|
|
38
|
+
props.showVoiceSearch && "\n\t\t\tpadding-right: 36px;\n\t\t"
|
|
39
|
+
);
|
|
40
|
+
}, function (props) {
|
|
41
|
+
return (
|
|
42
|
+
// for clear icon with search icon
|
|
43
|
+
props.showClear && props.showIcon && props.iconPosition === 'right' && "\n\t\t\tpadding-right: 66px;\n\t\t"
|
|
44
|
+
);
|
|
45
|
+
}, function (props) {
|
|
46
|
+
return (
|
|
47
|
+
// for voice search icon with search icon
|
|
48
|
+
props.showVoiceSearch && props.showIcon && props.iconPosition === 'right' && "\n\t\t\tpadding-right: 66px;\n\t\t"
|
|
49
|
+
);
|
|
50
|
+
}, function (props) {
|
|
51
|
+
return (
|
|
52
|
+
// for voice search icon with clear icon
|
|
53
|
+
props.showVoiceSearch && props.showIcon && "\n\t\t\tpadding-right: 66px;\n\t\t"
|
|
54
|
+
);
|
|
55
|
+
}, function (props) {
|
|
56
|
+
return (
|
|
57
|
+
// for clear icon with search icon and voice search
|
|
58
|
+
props.showClear && props.showIcon && props.showVoiceSearch && props.iconPosition === 'right' && "\n\t\t\tpadding-right: 90px;\n\t\t"
|
|
59
|
+
);
|
|
60
|
+
}, function (props) {
|
|
61
|
+
return props.alert && alertBorder;
|
|
62
|
+
});
|
|
63
|
+
var suggestions = function suggestions(themePreset, theme) {
|
|
64
|
+
return emotion.css(_templateObject2 || (_templateObject2 = _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: min(100vh, 402px);\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));
|
|
65
|
+
};
|
|
66
|
+
var suggestionsContainer = emotion.css(_templateObject3 || (_templateObject3 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\tposition: relative;\n\t.cancel-icon {\n\t\tcursor: pointer;\n\t}\n"])));
|
|
67
|
+
var noSuggestions = function noSuggestions(themePreset, theme) {
|
|
68
|
+
return emotion.css(_templateObject4 || (_templateObject4 = _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));
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
exports.Input = Input;
|
|
72
|
+
exports.noSuggestions = noSuggestions;
|
|
73
|
+
exports.suggestions = suggestions;
|
|
74
|
+
exports.suggestionsContainer = suggestionsContainer;
|