@appbaseio/reactivesearch-vue 3.2.0 → 3.3.1
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 +811 -994
- 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-f96a0570.js → Button-7aee17e3.js} +1 -1
- package/dist/cjs/{DropDown-ebe20e81.js → CancelSvg-6094cd37.js} +1 -292
- package/dist/cjs/{Card-63968d94.js → Card-abff695e.js} +2 -2
- package/dist/cjs/{ComponentWrapper-0334c14b.js → ComponentWrapper-3bedbe57.js} +2 -2
- package/dist/cjs/{Container-29f049b2.js → Container-1c05785a.js} +1 -1
- package/dist/cjs/DropDown-815d458e.js +299 -0
- package/dist/cjs/DynamicRangeSlider.js +11 -9
- package/dist/cjs/{Flex-ddde6d26.js → Flex-f7af0673.js} +1 -1
- package/dist/cjs/{FormControlList-fadd792f.js → FormControlList-2c10e01a.js} +1 -1
- package/dist/cjs/{Input-cee51a53.js → Input-55fbd8e1.js} +1 -1
- package/dist/cjs/{ListItem-7a682970.js → ListItem-f272f502.js} +2 -2
- package/dist/cjs/MultiDropdownList.js +11 -10
- package/dist/cjs/MultiList.js +9 -9
- package/dist/cjs/MultiRange.js +7 -7
- package/dist/cjs/{Pagination-c53a18ab.js → Pagination-accd2fbf.js} +1 -1
- package/dist/cjs/{PreferencesConsumer-7bee3c57.js → PreferencesConsumer-37cab7a0.js} +2 -2
- package/dist/cjs/RangeInput.js +9 -9
- package/dist/cjs/RangeSlider.js +7 -7
- package/dist/cjs/ReactiveBase.js +2 -2
- package/dist/cjs/ReactiveComponent.js +4 -4
- package/dist/cjs/ReactiveGoogleMap.js +8 -8
- package/dist/cjs/ReactiveList.js +15 -10
- package/dist/cjs/ResultCard.js +3 -3
- package/dist/cjs/ResultList.js +3 -3
- package/dist/cjs/{install-a3c5b872.js → SearchBox-4dff47b4.js} +42 -1684
- package/dist/cjs/SearchBox.js +38 -0
- package/dist/cjs/SelectedFilters.js +5 -5
- package/dist/cjs/SingleDropdownList.js +11 -10
- package/dist/cjs/SingleList.js +9 -9
- package/dist/cjs/SingleRange.js +7 -7
- package/dist/cjs/StateProvider.js +2 -2
- package/dist/cjs/{Title-8802a218.js → Title-d513ac26.js} +1 -1
- package/dist/cjs/ToggleButton.js +7 -7
- package/dist/cjs/{_rollupPluginBabelHelpers-f8b843f8.js → _rollupPluginBabelHelpers-1a877b17.js} +14 -14
- package/dist/cjs/{index-1f41363f.js → index-7ca9570e.js} +1 -1
- package/dist/cjs/index.js +21 -19
- package/dist/cjs/install-246c0dab.js +1683 -0
- package/dist/cjs/install.js +19 -17
- package/dist/cjs/{ssr-8dd13d43.js → ssr-15d936a0.js} +1 -1
- package/dist/cjs/{utils-c9bd5628.js → utils-a3db8765.js} +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/es/{Button-5c2cf399.js → Button-8178e39a.js} +1 -1
- package/dist/es/{DropDown-36fa9ac5.js → CancelSvg-5b82ad4f.js} +3 -293
- package/dist/es/{Card-54b9e7a0.js → Card-3a81ac7b.js} +2 -2
- package/dist/es/{ComponentWrapper-46d04344.js → ComponentWrapper-90d42a29.js} +2 -2
- package/dist/es/{Container-d00219f7.js → Container-e2261542.js} +1 -1
- package/dist/es/DropDown-f8049812.js +295 -0
- package/dist/es/DynamicRangeSlider.js +11 -9
- package/dist/es/{Flex-25792bc3.js → Flex-5d11362e.js} +1 -1
- package/dist/es/{FormControlList-fe6eaee4.js → FormControlList-968ff972.js} +1 -1
- package/dist/es/{Input-437ae439.js → Input-cda7f4ad.js} +1 -1
- package/dist/es/{ListItem-e3c6acf4.js → ListItem-beea18db.js} +2 -2
- package/dist/es/MultiDropdownList.js +11 -10
- package/dist/es/MultiList.js +9 -9
- package/dist/es/MultiRange.js +7 -7
- package/dist/es/{Pagination-591fdb79.js → Pagination-b2160aac.js} +1 -1
- package/dist/es/{PreferencesConsumer-0856ed43.js → PreferencesConsumer-a2bd59db.js} +2 -2
- package/dist/es/RangeInput.js +9 -9
- package/dist/es/RangeSlider.js +7 -7
- package/dist/es/ReactiveBase.js +2 -2
- package/dist/es/ReactiveComponent.js +4 -4
- package/dist/es/ReactiveGoogleMap.js +8 -8
- package/dist/es/ReactiveList.js +15 -10
- package/dist/es/ResultCard.js +3 -3
- package/dist/es/ResultList.js +3 -3
- package/dist/es/{install-3c9a9694.js → SearchBox-57e3a0ff.js} +17 -1671
- package/dist/es/SearchBox.js +29 -0
- package/dist/es/SelectedFilters.js +5 -5
- package/dist/es/SingleDropdownList.js +11 -10
- package/dist/es/SingleList.js +9 -9
- package/dist/es/SingleRange.js +7 -7
- package/dist/es/StateProvider.js +2 -2
- package/dist/es/{Title-863dfa42.js → Title-100fe896.js} +1 -1
- package/dist/es/ToggleButton.js +7 -7
- package/dist/es/{_rollupPluginBabelHelpers-ded08042.js → _rollupPluginBabelHelpers-5e8399d7.js} +14 -14
- package/dist/es/{index-104f1dfb.js → index-3af85a74.js} +1 -1
- package/dist/es/index.js +21 -19
- package/dist/es/install-74125db1.js +1676 -0
- package/dist/es/install.js +19 -17
- package/dist/es/{ssr-c630ccb9.js → ssr-40133887.js} +1 -1
- package/dist/es/{utils-d7dd4f4e.js → utils-badbb2a8.js} +1 -1
- package/dist/es/version.js +1 -1
- package/package.json +91 -91
package/dist/cjs/install.js
CHANGED
|
@@ -5,26 +5,26 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
require('@appbaseio/reactivecore');
|
|
6
6
|
require('@appbaseio/reactivecore/lib/utils/constants');
|
|
7
7
|
require('@vue/babel-helper-vue-transform-on');
|
|
8
|
-
require('./_rollupPluginBabelHelpers-
|
|
8
|
+
require('./_rollupPluginBabelHelpers-1a877b17.js');
|
|
9
9
|
require('vue');
|
|
10
10
|
require('vue-types');
|
|
11
11
|
require('@appbaseio/reactivecore/lib/utils/helper');
|
|
12
12
|
require('@appbaseio/vue-emotion');
|
|
13
13
|
require('@emotion/css');
|
|
14
14
|
require('polished');
|
|
15
|
-
require('./Button-
|
|
15
|
+
require('./Button-7aee17e3.js');
|
|
16
16
|
require('./vueTypes-289a891a.js');
|
|
17
|
-
require('./Pagination-
|
|
17
|
+
require('./Pagination-accd2fbf.js');
|
|
18
18
|
require('./ReactiveList.js');
|
|
19
19
|
require('@appbaseio/reactivecore/lib/utils/transform');
|
|
20
20
|
require('redux');
|
|
21
|
-
require('./index-
|
|
22
|
-
require('./ComponentWrapper-
|
|
23
|
-
require('./PreferencesConsumer-
|
|
24
|
-
require('./Title-
|
|
25
|
-
require('./ListItem-
|
|
26
|
-
require('./Card-
|
|
27
|
-
require('./Flex-
|
|
21
|
+
require('./index-7ca9570e.js');
|
|
22
|
+
require('./ComponentWrapper-3bedbe57.js');
|
|
23
|
+
require('./PreferencesConsumer-37cab7a0.js');
|
|
24
|
+
require('./Title-d513ac26.js');
|
|
25
|
+
require('./ListItem-f272f502.js');
|
|
26
|
+
require('./Card-abff695e.js');
|
|
27
|
+
require('./Flex-f7af0673.js');
|
|
28
28
|
require('@appbaseio/reactivecore/lib');
|
|
29
29
|
require('@appbaseio/reactivecore/lib/actions/analytics');
|
|
30
30
|
require('appbase-js');
|
|
@@ -34,19 +34,21 @@ require('./ReactiveBase.js');
|
|
|
34
34
|
require('hotkeys-js');
|
|
35
35
|
require('xss');
|
|
36
36
|
require('remarkable');
|
|
37
|
-
|
|
38
|
-
require('./
|
|
39
|
-
require('./Input-
|
|
37
|
+
require('./SearchBox-4dff47b4.js');
|
|
38
|
+
require('./CancelSvg-6094cd37.js');
|
|
39
|
+
require('./Input-55fbd8e1.js');
|
|
40
40
|
require('compute-scroll-into-view');
|
|
41
|
-
require('./Container-
|
|
41
|
+
require('./Container-1c05785a.js');
|
|
42
42
|
require('vue-highlight-words');
|
|
43
43
|
require('@appbaseio/reactivecore/lib/actions/query');
|
|
44
|
+
var install = require('./install-246c0dab.js');
|
|
44
45
|
require('@appbaseio/reactivecore/lib/utils/suggestions');
|
|
45
|
-
require('./FormControlList-
|
|
46
|
-
require('./utils-
|
|
46
|
+
require('./FormControlList-2c10e01a.js');
|
|
47
|
+
require('./utils-a3db8765.js');
|
|
47
48
|
require('./SingleList.js');
|
|
48
49
|
require('./MultiList.js');
|
|
49
50
|
require('@appbaseio/reactivecore/lib/utils/types');
|
|
51
|
+
require('./DropDown-815d458e.js');
|
|
50
52
|
require('./SingleDropdownList.js');
|
|
51
53
|
require('./MultiDropdownList.js');
|
|
52
54
|
require('./ToggleButton.js');
|
|
@@ -54,7 +56,7 @@ require('./ReactiveComponent.js');
|
|
|
54
56
|
require('vue-slider-component/dist-css/vue-slider-component.umd.min.js');
|
|
55
57
|
require('vue-slider-component/dist-css/vue-slider-component.css');
|
|
56
58
|
require('vue-slider-component/theme/default.css');
|
|
57
|
-
require('./ssr-
|
|
59
|
+
require('./ssr-15d936a0.js');
|
|
58
60
|
require('./DynamicRangeSlider.js');
|
|
59
61
|
require('./SingleRange.js');
|
|
60
62
|
require('./MultiRange.js');
|
|
@@ -19,7 +19,7 @@ function _interopNamespace(e) {
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-
|
|
22
|
+
var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-1a877b17.js');
|
|
23
23
|
var vue = require('vue');
|
|
24
24
|
var vueEmotion = require('@appbaseio/vue-emotion');
|
|
25
25
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var reactivecore = require('@appbaseio/reactivecore');
|
|
4
|
-
var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-
|
|
4
|
+
var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-1a877b17.js');
|
|
5
5
|
|
|
6
6
|
var getAggsOrder = reactivecore.helper.getAggsOrder;
|
|
7
7
|
var extractQuery = function extractQuery(props) {
|
package/dist/cjs/version.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as _taggedTemplateLiteralLoose } from './_rollupPluginBabelHelpers-
|
|
1
|
+
import { _ as _taggedTemplateLiteralLoose } from './_rollupPluginBabelHelpers-5e8399d7.js';
|
|
2
2
|
import { hexToRGBA } from '@appbaseio/reactivecore/lib/utils/helper';
|
|
3
3
|
import { styled } from '@appbaseio/vue-emotion';
|
|
4
4
|
import { css } from '@emotion/css';
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import { _ as _taggedTemplateLiteralLoose, a as _extends } from './_rollupPluginBabelHelpers-ded08042.js';
|
|
4
|
-
import { createVNode, createTextVNode, mergeProps } from 'vue';
|
|
5
|
-
import VueTypes from 'vue-types';
|
|
1
|
+
import { _ as _taggedTemplateLiteralLoose, a as _extends } from './_rollupPluginBabelHelpers-5e8399d7.js';
|
|
2
|
+
import { createVNode, createTextVNode } from 'vue';
|
|
6
3
|
import { styled } from '@appbaseio/vue-emotion';
|
|
7
|
-
import { t as types } from './vueTypes-f503e267.js';
|
|
8
|
-
import { a as isFunction } from './index-104f1dfb.js';
|
|
9
|
-
import { s as suggestionsContainer, a as suggestions, I as Input } from './Input-437ae439.js';
|
|
10
4
|
import computeScrollIntoView from 'compute-scroll-into-view';
|
|
11
|
-
import { replaceDiacritics } from '@appbaseio/reactivecore/lib/utils/suggestions';
|
|
12
5
|
|
|
13
6
|
var _templateObject;
|
|
14
7
|
var InputWrapper = styled('span')(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n\tflex: 1;\n\tposition: relative;\n\theight: 42px;\n"])));
|
|
@@ -352,7 +345,6 @@ var Downshift = {
|
|
|
352
345
|
// TODO: implement isMouseDown
|
|
353
346
|
// this.reset()
|
|
354
347
|
},
|
|
355
|
-
|
|
356
348
|
click: onClick
|
|
357
349
|
};
|
|
358
350
|
},
|
|
@@ -415,286 +407,4 @@ var CancelSvg = (function () {
|
|
|
415
407
|
}, null)]);
|
|
416
408
|
});
|
|
417
409
|
|
|
418
|
-
|
|
419
|
-
var small = "\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";
|
|
420
|
-
var dark = function dark(_ref) {
|
|
421
|
-
var theme = _ref.theme;
|
|
422
|
-
return "\n\tbackground-color: " + (theme.colors ? theme.colors.backgroundColor : '') + ";\n\tborder-color: " + (theme.colors ? theme.colors.borderColor : '') + ";\n\tcolor: " + (theme.colors ? theme.colors.textColor : '') + ";\n\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: " + (theme.colors ? theme.colors.backgroundColor : '') + ";\n\t}\n";
|
|
423
|
-
};
|
|
424
|
-
var Select = styled('button')(_templateObject$3 || (_templateObject$3 = _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) {
|
|
425
|
-
return props.small ? small : null;
|
|
426
|
-
}, function (_ref2) {
|
|
427
|
-
var themePreset = _ref2.themePreset;
|
|
428
|
-
return themePreset === 'dark' && dark;
|
|
429
|
-
});
|
|
430
|
-
var Tick = styled('span')(_templateObject2$1 || (_templateObject2$1 = _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) {
|
|
431
|
-
var theme = _ref3.theme;
|
|
432
|
-
return theme.colors.primaryColor;
|
|
433
|
-
});
|
|
434
|
-
|
|
435
|
-
var _templateObject$4;
|
|
436
|
-
var open = "\n\ttop: 0.55em;\n\ttransform: rotate(-45deg);\n";
|
|
437
|
-
var Chevron = styled('span')(_templateObject$4 || (_templateObject$4 = _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) {
|
|
438
|
-
return props.open ? open : null;
|
|
439
|
-
});
|
|
440
|
-
|
|
441
|
-
var getClassName = helper.getClassName;
|
|
442
|
-
var Dropdown = {
|
|
443
|
-
data: function data() {
|
|
444
|
-
this.__state = {
|
|
445
|
-
isOpen: false,
|
|
446
|
-
searchTerm: ''
|
|
447
|
-
};
|
|
448
|
-
return this.__state;
|
|
449
|
-
},
|
|
450
|
-
inject: {
|
|
451
|
-
theme: {
|
|
452
|
-
from: 'theme_reactivesearch'
|
|
453
|
-
}
|
|
454
|
-
},
|
|
455
|
-
props: {
|
|
456
|
-
innerClass: types.style,
|
|
457
|
-
items: types.data,
|
|
458
|
-
keyField: VueTypes.string.def('key'),
|
|
459
|
-
labelField: VueTypes.string.def('label'),
|
|
460
|
-
multi: VueTypes.bool,
|
|
461
|
-
// change event
|
|
462
|
-
placeholder: types.string,
|
|
463
|
-
returnsObject: VueTypes.bool,
|
|
464
|
-
customLabelRenderer: types.func,
|
|
465
|
-
hasCustomRenderer: VueTypes.bool,
|
|
466
|
-
customRenderer: types.func,
|
|
467
|
-
renderItem: types.func,
|
|
468
|
-
renderNoResults: VueTypes.any,
|
|
469
|
-
handleChange: types.func,
|
|
470
|
-
transformData: types.func,
|
|
471
|
-
selectedItem: types.selectedValue,
|
|
472
|
-
showCount: VueTypes.bool,
|
|
473
|
-
single: VueTypes.bool,
|
|
474
|
-
small: VueTypes.bool.def(false),
|
|
475
|
-
themePreset: types.themePreset,
|
|
476
|
-
showSearch: VueTypes.bool,
|
|
477
|
-
showClear: VueTypes.bool,
|
|
478
|
-
searchPlaceholder: VueTypes.string.def('Type here to search...')
|
|
479
|
-
},
|
|
480
|
-
render: function render() {
|
|
481
|
-
var _this = this;
|
|
482
|
-
var _this$$props = this.$props,
|
|
483
|
-
items = _this$$props.items,
|
|
484
|
-
selectedItem = _this$$props.selectedItem,
|
|
485
|
-
placeholder = _this$$props.placeholder,
|
|
486
|
-
labelField = _this$$props.labelField,
|
|
487
|
-
keyField = _this$$props.keyField,
|
|
488
|
-
themePreset = _this$$props.themePreset,
|
|
489
|
-
renderItem = _this$$props.renderItem,
|
|
490
|
-
transformData = _this$$props.transformData,
|
|
491
|
-
footer = _this$$props.footer,
|
|
492
|
-
customLabelRenderer = _this$$props.customLabelRenderer,
|
|
493
|
-
hasCustomRenderer = _this$$props.hasCustomRenderer,
|
|
494
|
-
customRenderer = _this$$props.customRenderer;
|
|
495
|
-
var itemsToRender = items;
|
|
496
|
-
if (transformData) {
|
|
497
|
-
itemsToRender = transformData(itemsToRender);
|
|
498
|
-
}
|
|
499
|
-
var filteredItemsToRender = itemsToRender.filter(function (item) {
|
|
500
|
-
if (String(item[labelField]).length) {
|
|
501
|
-
if (_this.$props.showSearch && _this.$data.searchTerm) {
|
|
502
|
-
return replaceDiacritics(String(item[labelField])).toLowerCase().includes(replaceDiacritics(_this.$data.searchTerm.toLowerCase()));
|
|
503
|
-
}
|
|
504
|
-
return true;
|
|
505
|
-
}
|
|
506
|
-
return false;
|
|
507
|
-
});
|
|
508
|
-
return createVNode(Downshift, {
|
|
509
|
-
"isOpen": this.$data.isOpen,
|
|
510
|
-
"selectedItem": selectedItem,
|
|
511
|
-
"handleChange": this.onChange,
|
|
512
|
-
"handleMouseup": this.handleStateChange
|
|
513
|
-
}, {
|
|
514
|
-
"default": function _default(_ref) {
|
|
515
|
-
var getItemProps = _ref.getItemProps,
|
|
516
|
-
isOpen = _ref.isOpen,
|
|
517
|
-
highlightedIndex = _ref.highlightedIndex,
|
|
518
|
-
getButtonProps = _ref.getButtonProps,
|
|
519
|
-
getItemEvents = _ref.getItemEvents,
|
|
520
|
-
getInputEvents = _ref.getInputEvents;
|
|
521
|
-
return createVNode("div", {
|
|
522
|
-
"class": suggestionsContainer
|
|
523
|
-
}, [createVNode(Select, mergeProps(_transformOn(getButtonProps({
|
|
524
|
-
onClick: _this.toggle
|
|
525
|
-
})), {
|
|
526
|
-
"class": getClassName(_this.$props.innerClass, 'select') || '',
|
|
527
|
-
"title": selectedItem ? _this.renderToString(selectedItem) : placeholder,
|
|
528
|
-
"small": _this.$props.small,
|
|
529
|
-
"themePreset": _this.$props.themePreset
|
|
530
|
-
}), {
|
|
531
|
-
"default": function _default() {
|
|
532
|
-
return [customLabelRenderer ? customLabelRenderer(selectedItem) : createVNode("div", null, [selectedItem ? _this.renderToString(selectedItem) : placeholder]), createVNode(Chevron, {
|
|
533
|
-
"open": isOpen
|
|
534
|
-
}, null)];
|
|
535
|
-
}
|
|
536
|
-
}), hasCustomRenderer ? customRenderer(itemsToRender, {
|
|
537
|
-
getItemProps: getItemProps,
|
|
538
|
-
isOpen: isOpen,
|
|
539
|
-
highlightedIndex: highlightedIndex,
|
|
540
|
-
getButtonProps: getButtonProps,
|
|
541
|
-
getItemEvents: getItemEvents
|
|
542
|
-
}) : isOpen && itemsToRender.length ? createVNode("ul", {
|
|
543
|
-
"class": suggestions(themePreset, _this.theme) + " " + (_this.$props.small ? 'small' : '') + " " + getClassName(_this.$props.innerClass, 'list')
|
|
544
|
-
}, [_this.$props.showSearch ? _this.renderSearchbox({
|
|
545
|
-
on: {
|
|
546
|
-
input: getInputEvents({
|
|
547
|
-
onInput: _this.handleInputChange
|
|
548
|
-
}).input
|
|
549
|
-
}
|
|
550
|
-
}) : null, !hasCustomRenderer && filteredItemsToRender.length === 0 ? _this.renderNoResult() : filteredItemsToRender.map(function (item, index) {
|
|
551
|
-
var selected = _this.$props.multi // MultiDropdownList
|
|
552
|
-
&& (selectedItem && !!selectedItem[item[keyField]] // MultiDropdownRange
|
|
553
|
-
|| Array.isArray(selectedItem) && selectedItem.find(function (value) {
|
|
554
|
-
return value[labelField] === item[labelField];
|
|
555
|
-
}));
|
|
556
|
-
if (!_this.$props.multi) selected = item.key === selectedItem;
|
|
557
|
-
return createVNode("li", mergeProps(getItemProps({
|
|
558
|
-
item: item
|
|
559
|
-
}), _transformOn(getItemEvents({
|
|
560
|
-
item: item
|
|
561
|
-
})), {
|
|
562
|
-
"key": item[keyField],
|
|
563
|
-
"class": "" + (selected ? 'active' : ''),
|
|
564
|
-
"style": {
|
|
565
|
-
backgroundColor: _this.getBackgroundColor(highlightedIndex === index, selected)
|
|
566
|
-
}
|
|
567
|
-
}), [renderItem ? renderItem({
|
|
568
|
-
label: item[labelField],
|
|
569
|
-
count: item.doc_count,
|
|
570
|
-
isChecked: selected && _this.$props.multi
|
|
571
|
-
}) : createVNode("div", null, [typeof item[labelField] === 'string' ? createVNode("span", {
|
|
572
|
-
"innerHTML": item[labelField]
|
|
573
|
-
}, null) : item[labelField], _this.$props.showCount && item.doc_count && createVNode("span", {
|
|
574
|
-
"class": getClassName(_this.$props.innerClass, 'count') || ''
|
|
575
|
-
}, [createTextVNode("\xA0("), item.doc_count, createTextVNode(")")])]), selected && _this.$props.multi ? createVNode(Tick, {
|
|
576
|
-
"class": getClassName(_this.$props.innerClass, 'icon') || ''
|
|
577
|
-
}, null) : null]);
|
|
578
|
-
}), footer]) : null]);
|
|
579
|
-
}
|
|
580
|
-
});
|
|
581
|
-
},
|
|
582
|
-
methods: {
|
|
583
|
-
toggle: function toggle() {
|
|
584
|
-
this.isOpen = !this.$data.isOpen;
|
|
585
|
-
},
|
|
586
|
-
close: function close() {
|
|
587
|
-
this.isOpen = false;
|
|
588
|
-
},
|
|
589
|
-
onChange: function onChange(item) {
|
|
590
|
-
if (this.$props.returnsObject) {
|
|
591
|
-
this.$props.handleChange(item);
|
|
592
|
-
} else {
|
|
593
|
-
this.$props.handleChange(item[this.$props.keyField]);
|
|
594
|
-
}
|
|
595
|
-
if (!this.$props.multi) {
|
|
596
|
-
this.isOpen = false;
|
|
597
|
-
this.searchTerm = '';
|
|
598
|
-
}
|
|
599
|
-
},
|
|
600
|
-
handleStateChange: function handleStateChange(_ref2) {
|
|
601
|
-
var isOpen = _ref2.isOpen;
|
|
602
|
-
this.isOpen = isOpen;
|
|
603
|
-
},
|
|
604
|
-
getBackgroundColor: function getBackgroundColor(highlighted, selected) {
|
|
605
|
-
var isDark = this.$props.themePreset === 'dark';
|
|
606
|
-
if (highlighted) {
|
|
607
|
-
return isDark ? '#555' : '#eee';
|
|
608
|
-
}
|
|
609
|
-
if (selected) {
|
|
610
|
-
return isDark ? '#686868' : '#fafafa';
|
|
611
|
-
}
|
|
612
|
-
return isDark ? '#424242' : '#fff';
|
|
613
|
-
},
|
|
614
|
-
handleInputChange: function handleInputChange(e) {
|
|
615
|
-
var value = e.target.value;
|
|
616
|
-
this.searchTerm = value;
|
|
617
|
-
},
|
|
618
|
-
clearSearchTerm: function clearSearchTerm() {
|
|
619
|
-
this.searchTerm = '';
|
|
620
|
-
},
|
|
621
|
-
renderToString: function renderToString(value) {
|
|
622
|
-
var _this2 = this;
|
|
623
|
-
var customLabelRenderer = this.$props.customLabelRenderer;
|
|
624
|
-
if (customLabelRenderer) {
|
|
625
|
-
var customLabel = customLabelRenderer(value);
|
|
626
|
-
if (typeof customLabel === 'string') {
|
|
627
|
-
return customLabel;
|
|
628
|
-
}
|
|
629
|
-
}
|
|
630
|
-
if (Array.isArray(value) && value.length) {
|
|
631
|
-
var arrayToRender = value.map(function (item) {
|
|
632
|
-
return _this2.renderToString(item);
|
|
633
|
-
});
|
|
634
|
-
return arrayToRender.join(', ');
|
|
635
|
-
}
|
|
636
|
-
if (value && typeof value === 'object') {
|
|
637
|
-
if (value[this.$props.labelField]) {
|
|
638
|
-
return value[this.$props.labelField];
|
|
639
|
-
}
|
|
640
|
-
if (Object.keys(value).length) {
|
|
641
|
-
return this.renderToString(Object.keys(value));
|
|
642
|
-
}
|
|
643
|
-
return this.$props.placeholder;
|
|
644
|
-
}
|
|
645
|
-
return value;
|
|
646
|
-
},
|
|
647
|
-
renderNoResult: function renderNoResult() {
|
|
648
|
-
var renderNoResults = this.$slots.renderNoResults || this.$props.renderNoResults;
|
|
649
|
-
return createVNode("p", {
|
|
650
|
-
"class": getClassName(this.$props.innerClass, 'noResults') || null
|
|
651
|
-
}, [isFunction(renderNoResults) ? renderNoResults() : renderNoResults]);
|
|
652
|
-
},
|
|
653
|
-
renderSearchbox: function renderSearchbox(eventObject) {
|
|
654
|
-
var _this3 = this;
|
|
655
|
-
var _this$$props2 = this.$props,
|
|
656
|
-
componentId = _this$$props2.componentId,
|
|
657
|
-
searchPlaceholder = _this$$props2.searchPlaceholder,
|
|
658
|
-
showClear = _this$$props2.showClear,
|
|
659
|
-
themePreset = _this$$props2.themePreset,
|
|
660
|
-
innerClass = _this$$props2.innerClass;
|
|
661
|
-
var InputComponent = createVNode(Input, mergeProps({
|
|
662
|
-
"id": componentId + "-input",
|
|
663
|
-
"style": {
|
|
664
|
-
border: 0,
|
|
665
|
-
borderBottom: '1px solid #ddd'
|
|
666
|
-
},
|
|
667
|
-
"showIcon": false,
|
|
668
|
-
"showClear": showClear,
|
|
669
|
-
"class": getClassName(innerClass, 'input'),
|
|
670
|
-
"placeholder": searchPlaceholder,
|
|
671
|
-
"value": this.$data.searchTerm,
|
|
672
|
-
"themePreset": themePreset
|
|
673
|
-
}, eventObject), null);
|
|
674
|
-
if (showClear) {
|
|
675
|
-
return createVNode(InputWrapper, null, {
|
|
676
|
-
"default": function _default() {
|
|
677
|
-
return [InputComponent, _this3.searchTerm && createVNode(IconGroup, {
|
|
678
|
-
"groupPosition": "right",
|
|
679
|
-
"positionType": "absolute"
|
|
680
|
-
}, {
|
|
681
|
-
"default": function _default() {
|
|
682
|
-
return [createVNode(IconWrapper, {
|
|
683
|
-
"onClick": _this3.clearSearchTerm,
|
|
684
|
-
"isClearIcon": true
|
|
685
|
-
}, {
|
|
686
|
-
"default": function _default() {
|
|
687
|
-
return [createVNode(CancelSvg, null, null)];
|
|
688
|
-
}
|
|
689
|
-
})];
|
|
690
|
-
}
|
|
691
|
-
})];
|
|
692
|
-
}
|
|
693
|
-
});
|
|
694
|
-
}
|
|
695
|
-
return InputComponent;
|
|
696
|
-
}
|
|
697
|
-
}
|
|
698
|
-
};
|
|
699
|
-
|
|
700
|
-
export { ButtonIconWrapper as B, CancelSvg as C, Downshift as D, IconWrapper as I, IconGroup as a, InputWrapper as b, Dropdown as c };
|
|
410
|
+
export { ButtonIconWrapper as B, CancelSvg as C, Downshift as D, IconWrapper as I, IconGroup as a, InputWrapper as b };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { _ as _taggedTemplateLiteralLoose } from './_rollupPluginBabelHelpers-
|
|
1
|
+
import { _ as _taggedTemplateLiteralLoose } from './_rollupPluginBabelHelpers-5e8399d7.js';
|
|
2
2
|
import { styled } from '@appbaseio/vue-emotion';
|
|
3
3
|
import { css } from '@emotion/css';
|
|
4
4
|
import { lighten } from 'polished';
|
|
5
|
-
import './Title-
|
|
5
|
+
import './Title-100fe896.js';
|
|
6
6
|
|
|
7
7
|
var _templateObject, _templateObject2, _templateObject3;
|
|
8
8
|
var container = css(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n\tdisplay: flex;\n\tflex-direction: row;\n\tjustify-content: center;\n\tflex-wrap: wrap;\n\tmargin: 0 -8px;\n\n\t@media (max-width: 420px) {\n\t\tmargin: 0;\n\t}\n"])));
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Actions, helper } from '@appbaseio/reactivecore';
|
|
2
2
|
import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
|
|
3
|
-
import { a as _extends } from './_rollupPluginBabelHelpers-
|
|
3
|
+
import { a as _extends } from './_rollupPluginBabelHelpers-5e8399d7.js';
|
|
4
4
|
import { h } from 'vue';
|
|
5
5
|
import VueTypes from 'vue-types';
|
|
6
6
|
import { getInternalComponentID } from '@appbaseio/reactivecore/lib/utils/transform';
|
|
7
|
-
import { c as connect, b as getCamelCase, d as getValidPropsKeys } from './index-
|
|
7
|
+
import { c as connect, b as getCamelCase, d as getValidPropsKeys } from './index-3af85a74.js';
|
|
8
8
|
|
|
9
9
|
var addComponent = Actions.addComponent,
|
|
10
10
|
removeComponent = Actions.removeComponent,
|