@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
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-f8b843f8.js');
|
|
4
|
+
var vueEmotion = require('@appbaseio/vue-emotion');
|
|
5
|
+
var emotion = require('emotion');
|
|
6
|
+
var polished = require('polished');
|
|
7
|
+
|
|
8
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
9
|
+
var filters = function filters(_ref) {
|
|
10
|
+
var borderColor = _ref.colors.borderColor;
|
|
11
|
+
return emotion.css(_templateObject || (_templateObject = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\tmargin: 0 -3px;\n\tmax-width: 100%;\n\n\tbutton {\n\t\tmargin: 2px 3px;\n\t\tpadding: 5px 8px;\n\t\tfont-size: 0.85rem;\n\t\tposition: relative;\n\n\t\tspan:first-child {\n\t\t\tmax-width: 260px;\n\t\t\twhite-space: nowrap;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\tmargin-right: 26px;\n\t\t}\n\n\t\tspan:last-child {\n\t\t\tdisplay: flex;\n\t\t\theight: 100%;\n\t\t\ttop: 0;\n\t\t\tright: 8px;\n\t\t\tposition: absolute;\n\t\t\talign-items: center;\n\t\t\tborder-left: 1px solid ", ";\n\t\t\tpadding-left: 8px;\n\t\t\tmargin-left: 8px;\n\t\t}\n\n\t\t&:hover,\n\t\t&:focus {\n\t\t\tspan:first-child {\n\t\t\t\ttext-decoration: line-through;\n\t\t\t}\n\t\t}\n\t}\n"])), borderColor || '#fff');
|
|
12
|
+
};
|
|
13
|
+
var pagination = emotion.css(_templateObject2 || (_templateObject2 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\tmargin: 10px -3px;\n\tmax-width: 100%;\n\ttext-align: center;\n\n\tbutton {\n\t\tmargin: 0 3px;\n\t}\n"])));
|
|
14
|
+
var toggleButtons = emotion.css(_templateObject3 || (_templateObject3 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\tmargin: 0 -3px;\n\tmax-width: 100%;\n\n\tbutton {\n\t\tmargin: 3px 3px;\n\t}\n"])));
|
|
15
|
+
var numberBoxContainer = emotion.css(_templateObject4 || (_templateObject4 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\tmargin: 0 -5px;\n\tbutton {\n\t\tmargin: 5px;\n\t}\n\tspan {\n\t\tmargin: 0 5px;\n\t}\n"])));
|
|
16
|
+
var primary = function primary(_ref2) {
|
|
17
|
+
var theme = _ref2.theme;
|
|
18
|
+
return "\n\tbackground-color: " + theme.colors.primaryColor + ";\n\tcolor: " + theme.colors.primaryTextColor + ";\n\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: " + polished.darken(0.1, theme.colors.primaryColor) + ";\n\t}\n";
|
|
19
|
+
};
|
|
20
|
+
var large = function large() {
|
|
21
|
+
return "\n\tmin-height: 40px;\n\tpadding: 10px 20px;\n";
|
|
22
|
+
};
|
|
23
|
+
var disabled = function disabled(_ref3) {
|
|
24
|
+
var theme = _ref3.theme;
|
|
25
|
+
return "\n\tbackground-color: " + (theme.colors.backgroundColor ? polished.lighten(0.1, theme.colors.backgroundColor) : '#fafafa') + ";\n\tcolor: #ccc;\n\tcursor: not-allowed;\n\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: " + (theme.colors.backgroundColor ? polished.lighten(0.2, theme.colors.backgroundColor) : '#fafafa') + ";\n\t}\n";
|
|
26
|
+
};
|
|
27
|
+
var Button = vueEmotion.styled('button')(_templateObject5 || (_templateObject5 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\tdisplay: inline-flex;\n\tjustify-content: center;\n\talign-items: center;\n\tborder-radius: 3px;\n\tborder: 1px solid transparent;\n\tmin-height: 30px;\n\tword-wrap: break-word;\n\tpadding: 5px 12px;\n\tline-height: 1.2rem;\n\tbackground-color: ", ";\n\tcolor: ", ";\n\tcursor: pointer;\n\tuser-select: none;\n\ttransition: all 0.3s ease;\n\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: ", ";\n\t}\n\n\t&:focus {\n\t\toutline: 0;\n\t\tborder-color: ", ";\n\t\tbox-shadow: ", ";\n\t}\n\n\t", ";\n\t", ";\n\t", ";\n\n\t&.enter-btn {\n\t\tborder-top-left-radius: 0px;\n\t\tborder-bottom-left-radius: 0px;\n\t\theight: 100%;\n\t}\n"])), function (_ref4) {
|
|
28
|
+
var theme = _ref4.theme;
|
|
29
|
+
return theme.colors ? theme.colors.backgroundColor : '#eee';
|
|
30
|
+
}, function (_ref5) {
|
|
31
|
+
var theme = _ref5.theme;
|
|
32
|
+
return theme.colors ? theme.colors.textColor : '';
|
|
33
|
+
}, function (_ref6) {
|
|
34
|
+
var theme = _ref6.theme;
|
|
35
|
+
return theme.colors && theme.colors.backgroundColor ? polished.darken(0.1, theme.colors.backgroundColor) : '#ccc';
|
|
36
|
+
}, function (_ref7) {
|
|
37
|
+
var theme = _ref7.theme;
|
|
38
|
+
return theme.colors && theme.colors.primaryColor ? polished.rgba(theme.colors.primaryColor, 0.6) : 'unset';
|
|
39
|
+
}, function (_ref8) {
|
|
40
|
+
var theme = _ref8.theme;
|
|
41
|
+
return theme.colors && theme.colors.primaryColor ? "0 0 0 2px " + polished.rgba(theme.colors.primaryColor, 0.3) : '';
|
|
42
|
+
}, function (props) {
|
|
43
|
+
return props.primary ? primary : null;
|
|
44
|
+
}, function (props) {
|
|
45
|
+
return props.disabled ? disabled : null;
|
|
46
|
+
}, function (props) {
|
|
47
|
+
return props.large && large;
|
|
48
|
+
});
|
|
49
|
+
var loadMoreContainer = emotion.css({
|
|
50
|
+
margin: '5px 0',
|
|
51
|
+
display: 'flex',
|
|
52
|
+
justifyContent: 'center'
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
exports.Button = Button;
|
|
56
|
+
exports.filters = filters;
|
|
57
|
+
exports.loadMoreContainer = loadMoreContainer;
|
|
58
|
+
exports.pagination = pagination;
|
|
59
|
+
exports.toggleButtons = toggleButtons;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-f8b843f8.js');
|
|
4
|
+
var vueEmotion = require('@appbaseio/vue-emotion');
|
|
5
|
+
var emotion = require('emotion');
|
|
6
|
+
var polished = require('polished');
|
|
7
|
+
require('./Title-8802a218.js');
|
|
8
|
+
|
|
9
|
+
var _templateObject, _templateObject2, _templateObject3;
|
|
10
|
+
var container = emotion.css(_templateObject || (_templateObject = _rollupPluginBabelHelpers._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"])));
|
|
11
|
+
var Image = vueEmotion.styled('div')(_templateObject2 || (_templateObject2 = _rollupPluginBabelHelpers._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) {
|
|
12
|
+
var colors = _ref.theme.colors;
|
|
13
|
+
return colors.backgroundColor || '#fcfcfc';
|
|
14
|
+
});
|
|
15
|
+
var Card = vueEmotion.styled('a')(_templateObject3 || (_templateObject3 = _rollupPluginBabelHelpers._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) {
|
|
16
|
+
var theme = _ref2.theme;
|
|
17
|
+
return theme.colors.backgroundColor ? polished.lighten(0.1, theme.colors.backgroundColor) : '#fff';
|
|
18
|
+
}, function (_ref3) {
|
|
19
|
+
var theme = _ref3.theme;
|
|
20
|
+
return theme.colors.textColor;
|
|
21
|
+
}, function (props) {
|
|
22
|
+
return props.href ? 'cursor: pointer' : null;
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
exports.Card = Card;
|
|
26
|
+
exports.Image = Image;
|
|
27
|
+
exports.container = container;
|
|
@@ -4,21 +4,23 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
|
|
|
4
4
|
|
|
5
5
|
var configureStore = require('@appbaseio/reactivecore');
|
|
6
6
|
var configureStore__default = _interopDefault(configureStore);
|
|
7
|
-
var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-c705cbe6.js');
|
|
8
|
-
var VueTypes = _interopDefault(require('vue-types'));
|
|
9
7
|
var constants = require('@appbaseio/reactivecore/lib/utils/constants');
|
|
8
|
+
var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-f8b843f8.js');
|
|
9
|
+
var vue = require('vue');
|
|
10
|
+
var VueTypes = _interopDefault(require('vue-types'));
|
|
10
11
|
var transform = require('@appbaseio/reactivecore/lib/utils/transform');
|
|
11
|
-
var index = require('./index-
|
|
12
|
+
var index = require('./index-d8d8f291.js');
|
|
12
13
|
|
|
13
14
|
var addComponent = configureStore.Actions.addComponent,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
removeComponent = configureStore.Actions.removeComponent,
|
|
16
|
+
watchComponent = configureStore.Actions.watchComponent,
|
|
17
|
+
setQueryListener = configureStore.Actions.setQueryListener,
|
|
18
|
+
setComponentProps = configureStore.Actions.setComponentProps,
|
|
19
|
+
updateComponentProps = configureStore.Actions.updateComponentProps;
|
|
19
20
|
var pushToAndClause = configureStore.helper.pushToAndClause,
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
checkPropChange = configureStore.helper.checkPropChange,
|
|
22
|
+
checkSomePropChange = configureStore.helper.checkSomePropChange;
|
|
23
|
+
|
|
22
24
|
/**
|
|
23
25
|
* ComponentWrapper component is a wrapper component for each ReactiveSearch component
|
|
24
26
|
* which is responsible for following tasks:
|
|
@@ -30,7 +32,6 @@ var pushToAndClause = configureStore.helper.pushToAndClause,
|
|
|
30
32
|
* 6. Unregister the component on un-mount
|
|
31
33
|
* Note: All components are using that except the DynamicRangeSlider
|
|
32
34
|
*/
|
|
33
|
-
|
|
34
35
|
var ComponentWrapper = function ComponentWrapper(component, options) {
|
|
35
36
|
if (options === void 0) {
|
|
36
37
|
options = {
|
|
@@ -38,17 +39,16 @@ var ComponentWrapper = function ComponentWrapper(component, options) {
|
|
|
38
39
|
internalComponent: false
|
|
39
40
|
};
|
|
40
41
|
}
|
|
41
|
-
|
|
42
42
|
return {
|
|
43
43
|
name: 'ComponentWrapper',
|
|
44
|
+
$timestamp: null,
|
|
44
45
|
props: {
|
|
45
|
-
destroyOnUnmount: VueTypes.bool.def(
|
|
46
|
+
destroyOnUnmount: VueTypes.bool.def(true)
|
|
46
47
|
},
|
|
47
48
|
created: function created() {
|
|
48
49
|
// clone the props for component it is needed because attrs gets changed on time
|
|
49
|
-
var componentProps = _rollupPluginBabelHelpers._extends({}, this.$attrs);
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
var componentProps = _rollupPluginBabelHelpers._extends({}, this.$attrs);
|
|
51
|
+
// handle kebab case for props
|
|
52
52
|
var parsedProps = {};
|
|
53
53
|
Object.keys(componentProps).forEach(function (key) {
|
|
54
54
|
parsedProps[index.getCamelCase(key)] = componentProps[key];
|
|
@@ -56,49 +56,40 @@ var ComponentWrapper = function ComponentWrapper(component, options) {
|
|
|
56
56
|
this.componentProps = parsedProps;
|
|
57
57
|
this.componentId = this.componentProps.componentId;
|
|
58
58
|
this.react = this.componentProps.react;
|
|
59
|
+
this.$timestamp = new Date().getTime();
|
|
59
60
|
},
|
|
60
61
|
beforeMount: function beforeMount() {
|
|
61
62
|
var _this = this;
|
|
62
|
-
|
|
63
63
|
var components = [];
|
|
64
|
-
|
|
65
64
|
if (this.$$store) {
|
|
66
65
|
var _this$$$store$getStat = this.$$store.getState();
|
|
67
|
-
|
|
68
66
|
components = _this$$$store$getStat.components;
|
|
69
|
-
}
|
|
67
|
+
}
|
|
68
|
+
// Register a component only when `destroyOnUnmount` is `true`
|
|
70
69
|
// or component is not present in store
|
|
71
|
-
|
|
72
|
-
|
|
73
70
|
if (this.destroyOnUnmount || components.indexOf(this.componentProps.componentId) === -1) {
|
|
74
71
|
// Register component
|
|
75
72
|
this.addComponent(this.componentId);
|
|
76
|
-
|
|
77
73
|
var onQueryChange = function onQueryChange() {
|
|
78
74
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
79
75
|
args[_key] = arguments[_key];
|
|
80
76
|
}
|
|
81
|
-
|
|
82
77
|
_this.$emit.apply(_this, ['queryChange'].concat(args));
|
|
83
|
-
|
|
84
78
|
_this.$emit.apply(_this, ['query-change'].concat(args));
|
|
85
79
|
};
|
|
86
|
-
|
|
87
80
|
var onError = function onError(e) {
|
|
88
81
|
_this.$emit('error', e);
|
|
89
82
|
};
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
83
|
+
this.setQueryListener(this.componentId, onQueryChange, onError);
|
|
84
|
+
// Update props in store
|
|
93
85
|
this.setComponentProps(this.componentId, this.componentProps, options.componentType);
|
|
94
|
-
}
|
|
95
|
-
|
|
86
|
+
}
|
|
96
87
|
|
|
88
|
+
// if default query prop is defined and component is reactive component then register the internal component
|
|
97
89
|
if (options.internalComponent || this.componentProps.defaultQuery && options.componentType === constants.componentTypes.reactiveComponent) {
|
|
98
90
|
this.internalComponent = transform.getInternalComponentID(this.componentId);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
|
|
91
|
+
}
|
|
92
|
+
// Register internal component
|
|
102
93
|
if (this.internalComponent && (this.destroyOnUnmount || components.indexOf(this.internalComponent) === -1)) {
|
|
103
94
|
this.addComponent(this.internalComponent);
|
|
104
95
|
this.setComponentProps(this.internalComponent, this.componentProps, options.componentType);
|
|
@@ -112,11 +103,17 @@ var ComponentWrapper = function ComponentWrapper(component, options) {
|
|
|
112
103
|
},
|
|
113
104
|
beforeDestroy: function beforeDestroy() {
|
|
114
105
|
if (this.destroyOnUnmount) {
|
|
106
|
+
var registeredComponentsTimestamps = {};
|
|
107
|
+
if (this.$$store) {
|
|
108
|
+
var _this$$$store$getStat2 = this.$$store.getState();
|
|
109
|
+
registeredComponentsTimestamps = _this$$$store$getStat2.registeredComponentsTimestamps;
|
|
110
|
+
}
|
|
115
111
|
// Unregister components
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
112
|
+
if (registeredComponentsTimestamps[this.componentId] === this.$timestamp) {
|
|
113
|
+
this.removeComponent(this.componentId);
|
|
114
|
+
if (this.internalComponent) {
|
|
115
|
+
this.removeComponent(this.internalComponent);
|
|
116
|
+
}
|
|
120
117
|
}
|
|
121
118
|
}
|
|
122
119
|
},
|
|
@@ -125,18 +122,15 @@ var ComponentWrapper = function ComponentWrapper(component, options) {
|
|
|
125
122
|
deep: true,
|
|
126
123
|
handler: function handler(newVal) {
|
|
127
124
|
var _this2 = this;
|
|
128
|
-
|
|
129
125
|
var propsKeys = index.getValidPropsKeys(newVal);
|
|
130
126
|
checkSomePropChange(newVal, this.savedComponentProps, propsKeys, function () {
|
|
131
127
|
_this2.updateComponentProps(_this2.componentId, newVal, options.componentType);
|
|
132
|
-
|
|
133
128
|
_this2.updateComponentProps(_this2.internalComponent, newVal, options.componentType);
|
|
134
129
|
});
|
|
135
130
|
}
|
|
136
131
|
},
|
|
137
132
|
react: function react(newVal, oldVal) {
|
|
138
133
|
var _this3 = this;
|
|
139
|
-
|
|
140
134
|
checkPropChange(newVal, oldVal, function () {
|
|
141
135
|
return _this3.setReact(_this3.componentProps);
|
|
142
136
|
});
|
|
@@ -144,39 +138,32 @@ var ComponentWrapper = function ComponentWrapper(component, options) {
|
|
|
144
138
|
},
|
|
145
139
|
methods: {
|
|
146
140
|
setReact: function setReact(props) {
|
|
147
|
-
var react = props.react
|
|
148
|
-
|
|
141
|
+
var react = props.react,
|
|
142
|
+
executeInitialQuery = props.executeInitialQuery;
|
|
149
143
|
if (this.internalComponent) {
|
|
150
144
|
if (react) {
|
|
151
145
|
var newReact = pushToAndClause(react, this.internalComponent);
|
|
152
|
-
this.watchComponent(props.componentId, newReact);
|
|
146
|
+
this.watchComponent(props.componentId, newReact, executeInitialQuery);
|
|
153
147
|
} else {
|
|
154
148
|
this.watchComponent(props.componentId, {
|
|
155
149
|
and: this.internalComponent
|
|
156
|
-
});
|
|
150
|
+
}, executeInitialQuery);
|
|
157
151
|
}
|
|
158
152
|
} else {
|
|
159
|
-
this.watchComponent(props.componentId, react);
|
|
153
|
+
this.watchComponent(props.componentId, react, executeInitialQuery);
|
|
160
154
|
}
|
|
161
155
|
}
|
|
162
156
|
},
|
|
163
|
-
render: function render(
|
|
164
|
-
return h(component,
|
|
165
|
-
attrs: this.$attrs,
|
|
166
|
-
on: this.$listeners,
|
|
167
|
-
scopedSlots: this.$scopedSlots,
|
|
168
|
-
slots: this.$slots
|
|
169
|
-
});
|
|
157
|
+
render: function render() {
|
|
158
|
+
return vue.h(component, null, this.$slots);
|
|
170
159
|
}
|
|
171
160
|
};
|
|
172
161
|
};
|
|
173
|
-
|
|
174
162
|
var mapStateToProps = function mapStateToProps(state, props) {
|
|
175
163
|
return {
|
|
176
164
|
savedComponentProps: state.props[props.componentId]
|
|
177
165
|
};
|
|
178
166
|
};
|
|
179
|
-
|
|
180
167
|
var mapDispatchToProps = {
|
|
181
168
|
addComponent: addComponent,
|
|
182
169
|
removeComponent: removeComponent,
|
|
@@ -189,7 +176,6 @@ var ComponentWrapper$1 = (function (component, options) {
|
|
|
189
176
|
if (options === void 0) {
|
|
190
177
|
options = {};
|
|
191
178
|
}
|
|
192
|
-
|
|
193
179
|
return index.connect(mapStateToProps, mapDispatchToProps)(ComponentWrapper(component, options));
|
|
194
180
|
});
|
|
195
181
|
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-f8b843f8.js');
|
|
4
|
+
var vueEmotion = require('@appbaseio/vue-emotion');
|
|
5
|
+
|
|
6
|
+
var _templateObject;
|
|
7
|
+
var Container = vueEmotion.styled('div')(_templateObject || (_templateObject = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\t", ";\n"])), function (_ref) {
|
|
8
|
+
var theme = _ref.theme;
|
|
9
|
+
return theme.component;
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
exports.Container = Container;
|