@appbaseio/reactivesearch-vue 1.16.0-alpha.3 → 1.16.0-alpha.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@appbaseio/reactivesearch-vue.umd.js +6388 -5403
- package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js +5 -5
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
- package/dist/cjs/Button-d2f1aeda.js +68 -0
- package/dist/cjs/{DownShift-b09da079.js → CancelSvg-82021d23.js} +60 -16
- package/dist/cjs/Card-4b915733.js +30 -0
- package/dist/cjs/{ComponentWrapper-5a0a8849.js → ComponentWrapper-7302fe1a.js} +40 -21
- package/dist/cjs/{Container-f84e72fc.js → Container-8a08d663.js} +3 -11
- package/dist/cjs/DataSearch.js +341 -391
- package/dist/cjs/{DropDown-c66be1a8.js → DropDown-c46d8b0c.js} +80 -95
- package/dist/cjs/DynamicRangeSlider.js +81 -25
- package/dist/cjs/Flex-699639d2.js +52 -0
- package/dist/cjs/FormControlList-73497794.js +47 -0
- package/dist/cjs/Input-c6f181d5.js +79 -0
- package/dist/cjs/ListItem-933c27e4.js +46 -0
- package/dist/cjs/MultiDropdownList.js +71 -46
- package/dist/cjs/MultiList.js +49 -29
- package/dist/cjs/MultiRange.js +20 -14
- package/dist/cjs/{Pagination-91df3b77.js → Pagination-1b2320a7.js} +4 -3
- package/dist/cjs/RangeInput.js +29 -45
- package/dist/cjs/RangeSlider.js +31 -28
- package/dist/cjs/ReactiveBase.js +55 -34
- package/dist/cjs/ReactiveComponent.js +80 -36
- package/dist/cjs/ReactiveGoogleMap.js +326 -235
- package/dist/cjs/ReactiveList.js +149 -202
- package/dist/cjs/ResultCard.js +8 -6
- package/dist/cjs/ResultList.js +8 -6
- package/dist/cjs/SelectedFilters.js +25 -12
- package/dist/cjs/SingleDropdownList.js +70 -45
- package/dist/cjs/SingleList.js +44 -26
- package/dist/cjs/SingleRange.js +17 -11
- package/dist/cjs/StateProvider.js +11 -7
- package/dist/cjs/{Title-e9beb554.js → Title-39765ee6.js} +3 -11
- package/dist/cjs/ToggleButton.js +35 -16
- package/dist/cjs/{_rollupPluginBabelHelpers-280a574c.js → _rollupPluginBabelHelpers-4abdbfff.js} +11 -1
- package/dist/cjs/{index-e0583d76.js → index-d44a0a21.js} +87 -13
- package/dist/cjs/index.js +23 -19
- package/dist/cjs/initReactivesearch.js +80 -38
- package/dist/cjs/install.js +20 -18
- package/dist/cjs/ssr-c333c82c.js +39 -0
- package/dist/cjs/{utils-d1ea9f95.js → utils-23afb20b.js} +2 -2
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/{vueTypes-c21f265b.js → vueTypes-6de9d2a9.js} +9 -4
- package/dist/es/Button-799185e2.js +59 -0
- package/dist/es/{DownShift-d8f2500f.js → CancelSvg-4d9e0857.js} +56 -17
- package/dist/es/Card-04b3c33e.js +23 -0
- package/dist/es/{ComponentWrapper-d0b21b95.js → ComponentWrapper-bbb717bc.js} +40 -21
- package/dist/es/Container-4383c6f0.js +10 -0
- package/dist/es/DataSearch.js +339 -389
- package/dist/es/{DropDown-5dbd69c2.js → DropDown-4edaa621.js} +79 -94
- package/dist/es/DynamicRangeSlider.js +81 -25
- package/dist/es/Flex-aac91505.js +47 -0
- package/dist/es/FormControlList-fe389a2e.js +40 -0
- package/dist/es/Input-d8519224.js +71 -0
- package/dist/es/ListItem-bdb6d53d.js +39 -0
- package/dist/es/MultiDropdownList.js +71 -46
- package/dist/es/MultiList.js +49 -29
- package/dist/es/MultiRange.js +20 -14
- package/dist/es/{Pagination-800af44f.js → Pagination-b3e4054a.js} +4 -3
- package/dist/es/RangeInput.js +29 -45
- package/dist/es/RangeSlider.js +31 -28
- package/dist/es/ReactiveBase.js +55 -34
- package/dist/es/ReactiveComponent.js +80 -36
- package/dist/es/ReactiveGoogleMap.js +326 -235
- package/dist/es/ReactiveList.js +149 -202
- package/dist/es/ResultCard.js +8 -6
- package/dist/es/ResultList.js +8 -6
- package/dist/es/SelectedFilters.js +25 -12
- package/dist/es/SingleDropdownList.js +70 -45
- package/dist/es/SingleList.js +44 -26
- package/dist/es/SingleRange.js +17 -11
- package/dist/es/StateProvider.js +11 -7
- package/dist/es/Title-579f8d6c.js +10 -0
- package/dist/es/ToggleButton.js +35 -16
- package/dist/es/{_rollupPluginBabelHelpers-c9fbe19f.js → _rollupPluginBabelHelpers-ecf6c03c.js} +11 -1
- package/dist/es/{index-1fe91a0a.js → index-5daa8276.js} +84 -14
- package/dist/es/index.js +23 -19
- package/dist/es/initReactivesearch.js +80 -38
- package/dist/es/install.js +20 -18
- package/dist/es/ssr-e3196de1.js +33 -0
- package/dist/es/{utils-ce3d86fd.js → utils-3a32e13f.js} +2 -2
- package/dist/es/version.js +1 -1
- package/dist/es/{vueTypes-98d938a9.js → vueTypes-9326e0be.js} +9 -4
- package/package.json +86 -78
- package/dist/cjs/Button-78d8bc26.js +0 -146
- package/dist/cjs/Card-b4af314f.js +0 -58
- package/dist/cjs/Flex-737c55be.js +0 -160
- package/dist/cjs/FormControlList-08dfb28e.js +0 -105
- package/dist/cjs/Input-643d02a7.js +0 -178
- package/dist/cjs/ListItem-0c58c5d2.js +0 -84
- package/dist/cjs/ssr-b7a729f9.js +0 -47
- package/dist/es/Button-6c71c66e.js +0 -137
- package/dist/es/Card-ecf70ba1.js +0 -51
- package/dist/es/Container-f5efec9e.js +0 -18
- package/dist/es/Flex-40a74d8a.js +0 -155
- package/dist/es/FormControlList-b96aebef.js +0 -98
- package/dist/es/Input-dfd9dd40.js +0 -170
- package/dist/es/ListItem-da73bc7d.js +0 -77
- package/dist/es/Title-22c2f3bf.js +0 -18
- package/dist/es/ssr-2f57791d.js +0 -41
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { _ as _taggedTemplateLiteralLoose } from './_rollupPluginBabelHelpers-ecf6c03c.js';
|
|
2
|
+
import { css } from 'emotion';
|
|
3
|
+
import styled from '@appbaseio/vue-emotion';
|
|
4
|
+
import { lighten } from 'polished';
|
|
5
|
+
import './Title-579f8d6c.js';
|
|
6
|
+
|
|
7
|
+
var _templateObject, _templateObject2, _templateObject3;
|
|
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"])));
|
|
9
|
+
var Image = styled('div')(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n\twidth: calc(100% + 20px);\n\theight: 220px;\n\tmargin: -10px -10px 0;\n\tbackground-color: ", ";\n\tbackground-size: contain;\n\tbackground-position: center center;\n\tbackground-repeat: no-repeat;\n"])), function (_ref) {
|
|
10
|
+
var colors = _ref.theme.colors;
|
|
11
|
+
return colors.backgroundColor || '#fcfcfc';
|
|
12
|
+
});
|
|
13
|
+
var Card = styled('a')(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n\twidth: auto;\n\tflex-grow: 1;\n\toutline: none;\n\ttext-decoration: none;\n\tmin-width: 240px;\n\tmax-width: 250px;\n\tborder-radius: 0.25rem;\n\tbackground-color: ", ";\n\theight: 300px;\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\tmargin: 8px;\n\tpadding: 10px;\n\toverflow: hidden;\n\tbox-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.2);\n\tcolor: ", ";\n\t", ";\n\ttransition: all 0.3s ease;\n\n\th2 {\n\t\twidth: 100%;\n\t\tfont-size: 0.9rem;\n\t\tline-height: 1.2rem;\n\t\twhite-space: nowrap;\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t\tmargin: 0;\n\t\tpadding: 10px 0 8px;\n\t}\n\n\tp {\n\t\tmargin: 0;\n\t}\n\n\tarticle {\n\t\tflex-grow: 1;\n\t\tfont-size: 0.9rem;\n\t}\n\n\t&:hover,\n\t&:focus {\n\t\tbox-shadow: 0 0 8px 1px rgba(0, 0, 0, 0.3);\n\t}\n\n\t@media (max-width: 420px) {\n\t\twidth: 50%;\n\t\tmin-width: 0;\n\t\theight: 210px;\n\t\tmargin: 0;\n\t\tborder-radius: 0;\n\t\tbox-shadow: none;\n\t\tborder: 1px solid #eee;\n\n\t\t&:hover,\n\t\t&:focus {\n\t\t\tbox-shadow: 0;\n\t\t}\n\t}\n"])), function (_ref2) {
|
|
14
|
+
var theme = _ref2.theme;
|
|
15
|
+
return theme.colors.backgroundColor ? lighten(0.1, theme.colors.backgroundColor) : '#fff';
|
|
16
|
+
}, function (_ref3) {
|
|
17
|
+
var theme = _ref3.theme;
|
|
18
|
+
return theme.colors.textColor;
|
|
19
|
+
}, function (props) {
|
|
20
|
+
return props.href ? 'cursor: pointer' : null;
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
export { Card as C, Image as I, container as c };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Actions, helper } from '@appbaseio/reactivecore';
|
|
2
|
-
import { a as _extends } from './_rollupPluginBabelHelpers-
|
|
2
|
+
import { a as _extends } from './_rollupPluginBabelHelpers-ecf6c03c.js';
|
|
3
|
+
import VueTypes from 'vue-types';
|
|
3
4
|
import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
|
|
4
5
|
import { getInternalComponentID } from '@appbaseio/reactivecore/lib/utils/transform';
|
|
5
|
-
import { c as connect, b as getCamelCase, d as getValidPropsKeys } from './index-
|
|
6
|
+
import { c as connect, b as getCamelCase, d as getValidPropsKeys } from './index-5daa8276.js';
|
|
6
7
|
|
|
7
8
|
var addComponent = Actions.addComponent,
|
|
8
9
|
removeComponent = Actions.removeComponent,
|
|
@@ -35,6 +36,9 @@ var ComponentWrapper = function ComponentWrapper(component, options) {
|
|
|
35
36
|
|
|
36
37
|
return {
|
|
37
38
|
name: 'ComponentWrapper',
|
|
39
|
+
props: {
|
|
40
|
+
destroyOnUnmount: VueTypes.bool.def(false)
|
|
41
|
+
},
|
|
38
42
|
created: function created() {
|
|
39
43
|
// clone the props for component it is needed because attrs gets changed on time
|
|
40
44
|
var componentProps = _extends({}, this.$attrs); // handle kebab case for props
|
|
@@ -51,33 +55,46 @@ var ComponentWrapper = function ComponentWrapper(component, options) {
|
|
|
51
55
|
beforeMount: function beforeMount() {
|
|
52
56
|
var _this = this;
|
|
53
57
|
|
|
54
|
-
|
|
55
|
-
this.addComponent(this.componentId);
|
|
58
|
+
var components = [];
|
|
56
59
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
60
|
+
if (this.$$store) {
|
|
61
|
+
var _this$$$store$getStat = this.$$store.getState();
|
|
62
|
+
|
|
63
|
+
components = _this$$$store$getStat.components;
|
|
64
|
+
} // Register a component only when `destroyOnUnmount` is `true`
|
|
65
|
+
// or component is not present in store
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
if (this.destroyOnUnmount || components.indexOf(this.componentProps.componentId) === -1) {
|
|
69
|
+
// Register component
|
|
70
|
+
this.addComponent(this.componentId);
|
|
71
|
+
|
|
72
|
+
var onQueryChange = function onQueryChange() {
|
|
73
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
74
|
+
args[_key] = arguments[_key];
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
_this.$emit.apply(_this, ['queryChange'].concat(args));
|
|
61
78
|
|
|
62
|
-
|
|
79
|
+
_this.$emit.apply(_this, ['query-change'].concat(args));
|
|
80
|
+
};
|
|
63
81
|
|
|
64
|
-
|
|
65
|
-
|
|
82
|
+
var onError = function onError(e) {
|
|
83
|
+
_this.$emit('error', e);
|
|
84
|
+
};
|
|
66
85
|
|
|
67
|
-
|
|
68
|
-
_this.$emit('error', e);
|
|
69
|
-
};
|
|
86
|
+
this.setQueryListener(this.componentId, onQueryChange, onError); // Update props in store
|
|
70
87
|
|
|
71
|
-
|
|
88
|
+
this.setComponentProps(this.componentId, this.componentProps, options.componentType);
|
|
89
|
+
} // if default query prop is defined and component is reactive component then register the internal component
|
|
72
90
|
|
|
73
|
-
this.setComponentProps(this.componentId, this.componentProps, options.componentType); // if default query prop is defined and component is reactive component then register the internal component
|
|
74
91
|
|
|
75
92
|
if (options.internalComponent || this.componentProps.defaultQuery && options.componentType === componentTypes.reactiveComponent) {
|
|
76
93
|
this.internalComponent = getInternalComponentID(this.componentId);
|
|
77
94
|
} // Register internal component
|
|
78
95
|
|
|
79
96
|
|
|
80
|
-
if (this.internalComponent) {
|
|
97
|
+
if (this.internalComponent && (this.destroyOnUnmount || components.indexOf(this.internalComponent) === -1)) {
|
|
81
98
|
this.addComponent(this.internalComponent);
|
|
82
99
|
this.setComponentProps(this.internalComponent, this.componentProps, options.componentType);
|
|
83
100
|
}
|
|
@@ -89,11 +106,13 @@ var ComponentWrapper = function ComponentWrapper(component, options) {
|
|
|
89
106
|
}
|
|
90
107
|
},
|
|
91
108
|
beforeDestroy: function beforeDestroy() {
|
|
92
|
-
|
|
93
|
-
|
|
109
|
+
if (this.destroyOnUnmount) {
|
|
110
|
+
// Unregister components
|
|
111
|
+
this.removeComponent(this.componentId);
|
|
94
112
|
|
|
95
|
-
|
|
96
|
-
|
|
113
|
+
if (this.internalComponent) {
|
|
114
|
+
this.removeComponent(this.internalComponent);
|
|
115
|
+
}
|
|
97
116
|
}
|
|
98
117
|
},
|
|
99
118
|
watch: {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { _ as _taggedTemplateLiteralLoose } from './_rollupPluginBabelHelpers-ecf6c03c.js';
|
|
2
|
+
import styled from '@appbaseio/vue-emotion';
|
|
3
|
+
|
|
4
|
+
var _templateObject;
|
|
5
|
+
var Container = styled('div')(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n\t", ";\n"])), function (_ref) {
|
|
6
|
+
var theme = _ref.theme;
|
|
7
|
+
return theme.component;
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
export { Container as C };
|