@appbaseio/reactivesearch-vue 2.0.0-alpha.4 → 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 +17538 -25422
- 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 +35 -38
- 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 +63 -150
- 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 +36 -39
- 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 +63 -150
- 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-aa04dc6e.js +0 -2352
- 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-b97dbac4.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-b86a6675.js +0 -2337
- 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-ac8a1edb.js +0 -1402
package/dist/cjs/ResultCard.js
CHANGED
|
@@ -4,25 +4,31 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
6
6
|
|
|
7
|
-
var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-
|
|
7
|
+
var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-f8b843f8.js');
|
|
8
|
+
var vue = require('vue');
|
|
8
9
|
var VueTypes = _interopDefault(require('vue-types'));
|
|
9
|
-
require('emotion');
|
|
10
10
|
require('@appbaseio/vue-emotion');
|
|
11
|
+
require('emotion');
|
|
11
12
|
require('polished');
|
|
12
|
-
var vueTypes = require('./vueTypes-
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var Card = require('./Card-642547a8.js');
|
|
13
|
+
var vueTypes = require('./vueTypes-1bf00978.js');
|
|
14
|
+
var Title = require('./Title-8802a218.js');
|
|
15
|
+
var Card = require('./Card-f5ab024a.js');
|
|
16
16
|
|
|
17
|
+
function _isSlot(s) {
|
|
18
|
+
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
19
|
+
}
|
|
17
20
|
var ResultCardTitle = {
|
|
18
21
|
name: 'ResultCardTitle',
|
|
19
22
|
render: function render() {
|
|
20
|
-
var
|
|
23
|
+
var _slot;
|
|
21
24
|
var children = this.$slots["default"];
|
|
22
|
-
return
|
|
25
|
+
return vue.createVNode(Title.Title, this.$props, _isSlot(_slot = children()) ? _slot : {
|
|
26
|
+
"default": function _default() {
|
|
27
|
+
return [_slot];
|
|
28
|
+
}
|
|
29
|
+
});
|
|
23
30
|
}
|
|
24
31
|
};
|
|
25
|
-
|
|
26
32
|
ResultCardTitle.install = function (Vue) {
|
|
27
33
|
Vue.component(ResultCardTitle.name, ResultCardTitle);
|
|
28
34
|
};
|
|
@@ -34,20 +40,16 @@ var ResultCardImage = {
|
|
|
34
40
|
src: VueTypes.string.isRequired
|
|
35
41
|
},
|
|
36
42
|
render: function render() {
|
|
37
|
-
var h = arguments[0];
|
|
38
|
-
|
|
39
43
|
var _this$$props = this.$props,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
return h(Card.Image, _mergeJSXProps([{
|
|
44
|
+
src = _this$$props.src,
|
|
45
|
+
props = _rollupPluginBabelHelpers._objectWithoutPropertiesLoose(_this$$props, _excluded);
|
|
46
|
+
return vue.createVNode(Card.Image, vue.mergeProps({
|
|
44
47
|
"style": {
|
|
45
48
|
backgroundImage: "url(" + src + ")"
|
|
46
49
|
}
|
|
47
|
-
}, props
|
|
50
|
+
}, props), null);
|
|
48
51
|
}
|
|
49
52
|
};
|
|
50
|
-
|
|
51
53
|
ResultCardImage.install = function (Vue) {
|
|
52
54
|
Vue.component(ResultCardImage.name, ResultCardImage);
|
|
53
55
|
};
|
|
@@ -55,19 +57,18 @@ ResultCardImage.install = function (Vue) {
|
|
|
55
57
|
var ResultCardDescription = {
|
|
56
58
|
name: 'ResultCardDescription',
|
|
57
59
|
functional: true,
|
|
58
|
-
render: function render(
|
|
59
|
-
|
|
60
|
-
children = _ref.children;
|
|
61
|
-
var h = arguments[0];
|
|
62
|
-
return h("article", _mergeJSXProps([{}, props]), [children]);
|
|
60
|
+
render: function render(context) {
|
|
61
|
+
return vue.createVNode("article", context.$props, [context.$slots["default"]()]);
|
|
63
62
|
}
|
|
64
63
|
};
|
|
65
|
-
|
|
66
64
|
ResultCardDescription.install = function (Vue) {
|
|
67
65
|
Vue.component(ResultCardDescription.name, ResultCardDescription);
|
|
68
66
|
};
|
|
69
67
|
|
|
70
68
|
var _excluded$1 = ["href", "target"];
|
|
69
|
+
function _isSlot$1(s) {
|
|
70
|
+
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
71
|
+
}
|
|
71
72
|
var ResultCard = {
|
|
72
73
|
name: 'ResultCard',
|
|
73
74
|
components: {
|
|
@@ -80,24 +81,23 @@ var ResultCard = {
|
|
|
80
81
|
href: vueTypes.types.string
|
|
81
82
|
},
|
|
82
83
|
render: function render() {
|
|
83
|
-
var
|
|
84
|
+
var _slot;
|
|
84
85
|
var children = this.$slots["default"];
|
|
85
|
-
|
|
86
86
|
var _this$$props = this.$props,
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
"
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
87
|
+
href = _this$$props.href,
|
|
88
|
+
target = _this$$props.target,
|
|
89
|
+
rest = _rollupPluginBabelHelpers._objectWithoutPropertiesLoose(_this$$props, _excluded$1);
|
|
90
|
+
return vue.createVNode(Card.Card, vue.mergeProps({
|
|
91
|
+
"href": href,
|
|
92
|
+
"target": target,
|
|
93
|
+
"rel": target === '_blank' ? 'noopener noreferrer' : null
|
|
94
|
+
}, rest), _isSlot$1(_slot = children()) ? _slot : {
|
|
95
|
+
"default": function _default() {
|
|
96
|
+
return [_slot];
|
|
96
97
|
}
|
|
97
|
-
}
|
|
98
|
+
});
|
|
98
99
|
}
|
|
99
100
|
};
|
|
100
|
-
|
|
101
101
|
ResultCard.install = function (Vue) {
|
|
102
102
|
Vue.component(ResultCard.name, ResultCard);
|
|
103
103
|
Vue.component(ResultCardTitle.name, ResultCardTitle);
|
package/dist/cjs/ResultList.js
CHANGED
|
@@ -4,27 +4,23 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
6
6
|
|
|
7
|
-
var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-
|
|
7
|
+
var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-f8b843f8.js');
|
|
8
|
+
var vue = require('vue');
|
|
8
9
|
var VueTypes = _interopDefault(require('vue-types'));
|
|
9
|
-
require('emotion');
|
|
10
10
|
require('@appbaseio/vue-emotion');
|
|
11
|
+
require('emotion');
|
|
11
12
|
require('polished');
|
|
12
|
-
var vueTypes = require('./vueTypes-
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var ListItem = require('./ListItem-8c9e0d68.js');
|
|
13
|
+
var vueTypes = require('./vueTypes-1bf00978.js');
|
|
14
|
+
var Title = require('./Title-8802a218.js');
|
|
15
|
+
var ListItem = require('./ListItem-d57d648d.js');
|
|
16
16
|
|
|
17
17
|
var ResultListContent = {
|
|
18
18
|
name: 'ResultListContent',
|
|
19
19
|
functional: true,
|
|
20
|
-
render: function render(
|
|
21
|
-
|
|
22
|
-
children = _ref.children;
|
|
23
|
-
var h = arguments[0];
|
|
24
|
-
return h("article", _mergeJSXProps([{}, props]), [children]);
|
|
20
|
+
render: function render(context) {
|
|
21
|
+
return vue.createVNode("article", context.$props, [context.$slots["default"]()]);
|
|
25
22
|
}
|
|
26
23
|
};
|
|
27
|
-
|
|
28
24
|
ResultListContent.install = function (Vue) {
|
|
29
25
|
Vue.component(ResultListContent.name, ResultListContent);
|
|
30
26
|
};
|
|
@@ -32,14 +28,10 @@ ResultListContent.install = function (Vue) {
|
|
|
32
28
|
var ResultListDescription = {
|
|
33
29
|
name: 'ResultListDescription',
|
|
34
30
|
functional: true,
|
|
35
|
-
render: function render(
|
|
36
|
-
|
|
37
|
-
children = _ref.children;
|
|
38
|
-
var h = arguments[0];
|
|
39
|
-
return h("div", _mergeJSXProps([{}, props]), [children]);
|
|
31
|
+
render: function render(context) {
|
|
32
|
+
return vue.createVNode("div", context.$props, [context.$slots["default"]()]);
|
|
40
33
|
}
|
|
41
34
|
};
|
|
42
|
-
|
|
43
35
|
ResultListDescription.install = function (Vue) {
|
|
44
36
|
Vue.component(ResultListDescription.name, ResultListDescription);
|
|
45
37
|
};
|
|
@@ -52,40 +44,43 @@ var ResultListImage = {
|
|
|
52
44
|
small: VueTypes.bool.def(false)
|
|
53
45
|
},
|
|
54
46
|
render: function render() {
|
|
55
|
-
var h = arguments[0];
|
|
56
|
-
|
|
57
47
|
var _this$$props = this.$props,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
"
|
|
64
|
-
|
|
65
|
-
"small": small
|
|
66
|
-
}
|
|
67
|
-
}, props]));
|
|
48
|
+
src = _this$$props.src,
|
|
49
|
+
small = _this$$props.small,
|
|
50
|
+
props = _rollupPluginBabelHelpers._objectWithoutPropertiesLoose(_this$$props, _excluded);
|
|
51
|
+
return vue.createVNode(ListItem.Image, vue.mergeProps({
|
|
52
|
+
"src": src,
|
|
53
|
+
"small": small
|
|
54
|
+
}, props), null);
|
|
68
55
|
}
|
|
69
56
|
};
|
|
70
|
-
|
|
71
57
|
ResultListImage.install = function (Vue) {
|
|
72
58
|
Vue.component(ResultListImage.name, ResultListImage);
|
|
73
59
|
};
|
|
74
60
|
|
|
61
|
+
function _isSlot(s) {
|
|
62
|
+
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
63
|
+
}
|
|
75
64
|
var ResultListTitle = {
|
|
76
65
|
name: 'ResultListTitle',
|
|
77
66
|
render: function render() {
|
|
78
|
-
var
|
|
67
|
+
var _slot;
|
|
79
68
|
var children = this.$slots["default"];
|
|
80
|
-
return
|
|
69
|
+
return vue.createVNode(Title.Title, this.$props, _isSlot(_slot = children()) ? _slot : {
|
|
70
|
+
"default": function _default() {
|
|
71
|
+
return [_slot];
|
|
72
|
+
}
|
|
73
|
+
});
|
|
81
74
|
}
|
|
82
75
|
};
|
|
83
|
-
|
|
84
76
|
ResultListTitle.install = function (Vue) {
|
|
85
77
|
Vue.component(ResultListTitle.name, ResultListTitle);
|
|
86
78
|
};
|
|
87
79
|
|
|
88
80
|
var _excluded$1 = ["href", "target"];
|
|
81
|
+
function _isSlot$1(s) {
|
|
82
|
+
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
83
|
+
}
|
|
89
84
|
var ResultList = {
|
|
90
85
|
name: 'ResultList',
|
|
91
86
|
props: {
|
|
@@ -106,42 +101,39 @@ var ResultList = {
|
|
|
106
101
|
return this.__state;
|
|
107
102
|
},
|
|
108
103
|
mounted: function mounted() {
|
|
109
|
-
var children = this.$slots["default"];
|
|
104
|
+
var children = this.$slots["default"]();
|
|
110
105
|
var ImageChild = children.find(function (o) {
|
|
111
|
-
return o.
|
|
106
|
+
return o.type && o.type.name === ResultListImage.name;
|
|
112
107
|
});
|
|
113
|
-
|
|
114
|
-
if (ImageChild && ImageChild.componentOptions && ImageChild.componentOptions.propsData) {
|
|
108
|
+
if (ImageChild && ImageChild.props) {
|
|
115
109
|
this.hasImage = true;
|
|
116
|
-
|
|
117
|
-
if (ImageChild.componentOptions.propsData.small) {
|
|
110
|
+
if (ImageChild.props.small) {
|
|
118
111
|
this.isSmall = true;
|
|
119
112
|
}
|
|
120
113
|
}
|
|
121
114
|
},
|
|
122
115
|
render: function render() {
|
|
123
|
-
var
|
|
124
|
-
|
|
116
|
+
var _slot;
|
|
125
117
|
var _this$$props = this.$props,
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
118
|
+
href = _this$$props.href,
|
|
119
|
+
target = _this$$props.target,
|
|
120
|
+
props = _rollupPluginBabelHelpers._objectWithoutPropertiesLoose(_this$$props, _excluded$1);
|
|
130
121
|
var hasImage = this.hasImage,
|
|
131
|
-
|
|
122
|
+
isSmall = this.isSmall;
|
|
132
123
|
var children = this.$slots["default"];
|
|
133
|
-
return
|
|
134
|
-
"
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
124
|
+
return vue.createVNode(ListItem.ListItem, vue.mergeProps({
|
|
125
|
+
"href": href,
|
|
126
|
+
"image": hasImage,
|
|
127
|
+
"small": isSmall,
|
|
128
|
+
"target": target,
|
|
129
|
+
"rel": target === '_blank' ? 'noopener noreferrer' : null
|
|
130
|
+
}, props), _isSlot$1(_slot = children()) ? _slot : {
|
|
131
|
+
"default": function _default() {
|
|
132
|
+
return [_slot];
|
|
140
133
|
}
|
|
141
|
-
}
|
|
134
|
+
});
|
|
142
135
|
}
|
|
143
136
|
};
|
|
144
|
-
|
|
145
137
|
ResultList.install = function (Vue) {
|
|
146
138
|
Vue.component(ResultList.name, ResultList);
|
|
147
139
|
Vue.component(ResultListContent.name, ResultListContent);
|
|
@@ -6,24 +6,26 @@ 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
|
require('@appbaseio/reactivecore/lib/utils/constants');
|
|
12
|
-
require('
|
|
10
|
+
var _transformOn = _interopDefault(require('@vue/babel-helper-vue-transform-on'));
|
|
11
|
+
require('./_rollupPluginBabelHelpers-f8b843f8.js');
|
|
12
|
+
var vue = require('vue');
|
|
13
|
+
var VueTypes = _interopDefault(require('vue-types'));
|
|
13
14
|
require('@appbaseio/vue-emotion');
|
|
15
|
+
require('emotion');
|
|
14
16
|
require('polished');
|
|
15
|
-
var Button = require('./Button-
|
|
16
|
-
var vueTypes = require('./vueTypes-
|
|
17
|
+
var Button = require('./Button-ad042719.js');
|
|
18
|
+
var vueTypes = require('./vueTypes-1bf00978.js');
|
|
17
19
|
require('redux');
|
|
18
|
-
var index = require('./index-
|
|
19
|
-
var Title = require('./Title-
|
|
20
|
-
var Container = require('./Container-
|
|
20
|
+
var index = require('./index-d8d8f291.js');
|
|
21
|
+
var Title = require('./Title-8802a218.js');
|
|
22
|
+
var Container = require('./Container-29f049b2.js');
|
|
21
23
|
|
|
22
24
|
var setValue = configureStore.Actions.setValue,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
+
clearValues = configureStore.Actions.clearValues,
|
|
26
|
+
resetValuesToDefault = configureStore.Actions.resetValuesToDefault;
|
|
25
27
|
var getClassName = configureStore.helper.getClassName,
|
|
26
|
-
|
|
28
|
+
handleA11yAction = configureStore.helper.handleA11yAction;
|
|
27
29
|
var SelectedFilters = {
|
|
28
30
|
name: 'SelectedFilters',
|
|
29
31
|
props: {
|
|
@@ -43,11 +45,8 @@ var SelectedFilters = {
|
|
|
43
45
|
},
|
|
44
46
|
render: function render() {
|
|
45
47
|
var _this = this;
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
if (this.$scopedSlots["default"]) {
|
|
50
|
-
return this.$scopedSlots["default"]({
|
|
48
|
+
if (this.$slots["default"]) {
|
|
49
|
+
return this.$slots["default"]({
|
|
51
50
|
components: this.components,
|
|
52
51
|
selectedValues: this.selectedValues,
|
|
53
52
|
clearValues: this.clearValues,
|
|
@@ -56,54 +55,58 @@ var SelectedFilters = {
|
|
|
56
55
|
resetValuesToDefault: this.resetValuesToDefault
|
|
57
56
|
});
|
|
58
57
|
}
|
|
59
|
-
|
|
60
58
|
var filtersToRender = this.renderFilters();
|
|
61
59
|
var hasValues = !!filtersToRender.length;
|
|
62
|
-
return
|
|
60
|
+
return vue.createVNode(Container.Container, {
|
|
63
61
|
"class": Button.filters(this.theme) + " " + (this.$props.className || '')
|
|
64
|
-
},
|
|
65
|
-
"
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
62
|
+
}, {
|
|
63
|
+
"default": function _default() {
|
|
64
|
+
return [_this.$props.title && hasValues && vue.createVNode(Title.Title, {
|
|
65
|
+
"class": getClassName(_this.$props.innerClass, 'title') || ''
|
|
66
|
+
}, {
|
|
67
|
+
"default": function _default() {
|
|
68
|
+
return [_this.$props.title];
|
|
69
|
+
}
|
|
70
|
+
}), filtersToRender, _this.$props.showClearAll && hasValues && filtersToRender.length > 1 ? vue.createVNode(Button.Button, vue.mergeProps(_transformOn({
|
|
71
|
+
click: _this.clearValues,
|
|
72
|
+
keypress: function keypress(event) {
|
|
73
|
+
return handleA11yAction(event, function () {
|
|
74
|
+
return _this.clearValues();
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
}), {
|
|
78
|
+
"class": getClassName(_this.$props.innerClass, 'button') || '',
|
|
79
|
+
"tabIndex": "0"
|
|
80
|
+
}), {
|
|
81
|
+
"default": function _default() {
|
|
82
|
+
return [_this.$props.clearAllLabel];
|
|
83
|
+
}
|
|
84
|
+
}) : null];
|
|
78
85
|
}
|
|
79
|
-
}
|
|
86
|
+
});
|
|
80
87
|
},
|
|
81
88
|
methods: {
|
|
82
89
|
remove: function remove(component, value) {
|
|
83
90
|
if (value === void 0) {
|
|
84
91
|
value = null;
|
|
85
92
|
}
|
|
86
|
-
|
|
87
93
|
this.setValue(component, null);
|
|
88
94
|
this.$emit('clear', component, value);
|
|
89
95
|
},
|
|
90
96
|
clearValues: function clearValues() {
|
|
91
97
|
var resetToDefault = this.resetToDefault,
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
98
|
+
resetToValues = this.resetToValues,
|
|
99
|
+
clearAllBlacklistComponents = this.clearAllBlacklistComponents;
|
|
95
100
|
if (resetToDefault) {
|
|
96
101
|
this.resetValuesToDefault(clearAllBlacklistComponents);
|
|
97
102
|
} else {
|
|
98
103
|
this.clearValuesAction(resetToValues, clearAllBlacklistComponents);
|
|
99
104
|
}
|
|
100
|
-
|
|
101
105
|
this.$emit('clear', resetToValues);
|
|
102
106
|
},
|
|
103
107
|
clearValue: function clearValue(componentId) {
|
|
104
108
|
var resetToDefault = this.resetToDefault,
|
|
105
|
-
|
|
106
|
-
|
|
109
|
+
resetToValues = this.resetToValues;
|
|
107
110
|
if (resetToDefault) {
|
|
108
111
|
this.resetValuesToDefault(this.components.filter(function (component) {
|
|
109
112
|
return component !== componentId;
|
|
@@ -111,69 +114,61 @@ var SelectedFilters = {
|
|
|
111
114
|
} else {
|
|
112
115
|
this.setValue(componentId, (resetToValues == null ? void 0 : resetToValues[componentId]) || null);
|
|
113
116
|
}
|
|
114
|
-
|
|
115
117
|
this.$emit('clear', resetToValues == null ? void 0 : resetToValues[componentId]);
|
|
116
118
|
},
|
|
117
119
|
renderValue: function renderValue(value, isArray) {
|
|
118
120
|
var _this2 = this;
|
|
119
|
-
|
|
120
121
|
if (isArray && value.length) {
|
|
121
122
|
var arrayToRender = value.map(function (item) {
|
|
122
123
|
return _this2.renderValue(item);
|
|
123
124
|
});
|
|
124
125
|
return arrayToRender.join(', ');
|
|
125
126
|
}
|
|
126
|
-
|
|
127
127
|
if (value && typeof value === 'object') {
|
|
128
128
|
// TODO: support for NestedList
|
|
129
129
|
var label = (typeof value.label === 'string' ? value.label : value.value) || value.key || value.distance || null;
|
|
130
|
-
|
|
131
130
|
if (value.location) {
|
|
132
131
|
label = value.location + " - " + label;
|
|
133
132
|
}
|
|
134
|
-
|
|
135
133
|
return label;
|
|
136
134
|
}
|
|
137
|
-
|
|
138
135
|
return value;
|
|
139
136
|
},
|
|
140
137
|
renderFilterButton: function renderFilterButton(component, keyProp, handleRemove, label) {
|
|
141
|
-
|
|
142
|
-
|
|
138
|
+
return vue.createVNode(Button.Button, vue.mergeProps(_transformOn({
|
|
139
|
+
click: handleRemove,
|
|
140
|
+
keypress: function keypress(event) {
|
|
141
|
+
return handleA11yAction(event, handleRemove);
|
|
142
|
+
}
|
|
143
|
+
}), {
|
|
143
144
|
"class": getClassName(this.$props.innerClass, 'button') || '',
|
|
144
145
|
"key": keyProp,
|
|
145
|
-
"
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
}
|
|
150
|
-
}),
|
|
151
|
-
"attrs": {
|
|
152
|
-
"tabIndex": "0"
|
|
146
|
+
"tabIndex": "0"
|
|
147
|
+
}), {
|
|
148
|
+
"default": function _default() {
|
|
149
|
+
return [vue.createVNode("span", null, [label]), vue.createVNode("span", null, [vue.createTextVNode("\u2715")])];
|
|
153
150
|
}
|
|
154
|
-
}
|
|
151
|
+
});
|
|
155
152
|
},
|
|
156
153
|
renderFilters: function renderFilters() {
|
|
157
154
|
var _this3 = this;
|
|
158
|
-
|
|
159
155
|
var selectedValues = this.selectedValues;
|
|
160
156
|
var filterComponents = Object.keys(selectedValues).filter(function (id) {
|
|
161
157
|
return _this3.components.includes(id) && selectedValues[id].showFilter;
|
|
162
158
|
});
|
|
163
159
|
return filterComponents.map(function (component, index$1) {
|
|
164
160
|
var _selectedValues$compo = selectedValues[component],
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
var isArray = Array.isArray(value);
|
|
161
|
+
label = _selectedValues$compo.label,
|
|
162
|
+
value = _selectedValues$compo.value;
|
|
163
|
+
var isArray = Array.isArray(value);
|
|
168
164
|
|
|
165
|
+
// default behaviour
|
|
169
166
|
if (label && (isArray && value.length || !isArray && value)) {
|
|
170
167
|
var valueToRender = _this3.renderValue(value, isArray);
|
|
171
|
-
|
|
172
168
|
return _this3.renderFilterButton(component, component + "-" + (index$1 + 1), function () {
|
|
173
169
|
return _this3.remove(component, value);
|
|
174
170
|
}, selectedValues[component].label + ": " + index.decodeHtml(valueToRender));
|
|
175
171
|
}
|
|
176
|
-
|
|
177
172
|
return null;
|
|
178
173
|
}).filter(Boolean);
|
|
179
174
|
}
|
|
@@ -184,23 +179,21 @@ var SelectedFilters = {
|
|
|
184
179
|
}
|
|
185
180
|
}
|
|
186
181
|
};
|
|
187
|
-
|
|
188
182
|
var mapStateToProps = function mapStateToProps(state) {
|
|
189
183
|
return {
|
|
190
184
|
components: state.components,
|
|
191
185
|
selectedValues: state.selectedValues
|
|
192
186
|
};
|
|
193
187
|
};
|
|
194
|
-
|
|
195
188
|
var mapDispatchtoProps = {
|
|
196
189
|
clearValuesAction: clearValues,
|
|
197
190
|
setValue: setValue,
|
|
198
191
|
resetValuesToDefault: resetValuesToDefault
|
|
199
192
|
};
|
|
200
193
|
var RcConnected = index.connect(mapStateToProps, mapDispatchtoProps)(SelectedFilters);
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
Vue.component(
|
|
194
|
+
RcConnected.name = SelectedFilters.name;
|
|
195
|
+
RcConnected.install = function (Vue) {
|
|
196
|
+
Vue.component(RcConnected.name, RcConnected);
|
|
204
197
|
};
|
|
205
198
|
|
|
206
|
-
exports.default =
|
|
199
|
+
exports.default = RcConnected;
|