@appbaseio/reactivesearch-vue 1.16.0-alpha.4 → 1.16.0-alpha.40
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 +8107 -7501
- 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 +354 -398
- package/dist/cjs/{DropDown-c66be1a8.js → DropDown-c46d8b0c.js} +80 -95
- package/dist/cjs/DynamicRangeSlider.js +107 -42
- 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 +101 -65
- package/dist/cjs/MultiList.js +79 -47
- 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 +72 -58
- package/dist/cjs/ReactiveGoogleMap.js +326 -235
- package/dist/cjs/ReactiveList.js +188 -241
- 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 +87 -57
- package/dist/cjs/SingleList.js +60 -37
- 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 +187 -104
- 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 +352 -396
- package/dist/es/{DropDown-5dbd69c2.js → DropDown-4edaa621.js} +79 -94
- package/dist/es/DynamicRangeSlider.js +107 -42
- 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 +101 -65
- package/dist/es/MultiList.js +79 -47
- 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 +72 -58
- package/dist/es/ReactiveGoogleMap.js +326 -235
- package/dist/es/ReactiveList.js +188 -241
- 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 +87 -57
- package/dist/es/SingleList.js +60 -37
- 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 +188 -105
- 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 +7 -5
- 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
|
@@ -110,20 +110,25 @@ var types = {
|
|
|
110
110
|
unit: VueTypes.oneOf(['mi', 'miles', 'yd', 'yards', 'ft', 'feet', 'in', 'inch', 'km', 'kilometers', 'm', 'meters', 'cm', 'centimeters', 'mm', 'millimeters', 'NM', 'nmi', 'nauticalmiles']),
|
|
111
111
|
value: VueTypes.string.def(undefined),
|
|
112
112
|
analyticsConfig: VueTypes.shape({
|
|
113
|
-
searchStateHeader: VueTypes.bool,
|
|
114
113
|
emptyQuery: VueTypes.bool,
|
|
115
114
|
suggestionAnalytics: VueTypes.bool,
|
|
116
115
|
userId: VueTypes.string,
|
|
117
116
|
customEvents: VueTypes.object
|
|
118
117
|
}),
|
|
119
118
|
appbaseConfig: VueTypes.shape({
|
|
120
|
-
enableQueryRules: VueTypes.bool,
|
|
121
119
|
recordAnalytics: VueTypes.bool,
|
|
122
|
-
searchStateHeader: VueTypes.bool,
|
|
123
120
|
emptyQuery: VueTypes.bool,
|
|
124
121
|
suggestionAnalytics: VueTypes.bool,
|
|
122
|
+
enableQueryRules: VueTypes.bool,
|
|
123
|
+
enableSearchRelevancy: VueTypes.bool,
|
|
125
124
|
userId: VueTypes.string,
|
|
126
|
-
|
|
125
|
+
useCache: VueTypes.bool,
|
|
126
|
+
customEvents: VueTypes.object,
|
|
127
|
+
enableTelemetry: VueTypes.bool.def(true)
|
|
128
|
+
}).def({}),
|
|
129
|
+
mongodb: VueTypes.shape({
|
|
130
|
+
db: VueTypes.string,
|
|
131
|
+
collection: VueTypes.string
|
|
127
132
|
})
|
|
128
133
|
};
|
|
129
134
|
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { _ as _taggedTemplateLiteralLoose } from './_rollupPluginBabelHelpers-ecf6c03c.js';
|
|
2
|
+
import { css } from 'emotion';
|
|
3
|
+
import styled from '@appbaseio/vue-emotion';
|
|
4
|
+
import { darken, rgba, lighten } from 'polished';
|
|
5
|
+
|
|
6
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
|
7
|
+
|
|
8
|
+
var filters = function filters(_ref) {
|
|
9
|
+
var borderColor = _ref.colors.borderColor;
|
|
10
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n\tmargin: 0 -3px;\n\tmax-width: 100%;\n\n\ta {\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');
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
var pagination = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n\tmargin: 10px -3px;\n\tmax-width: 100%;\n\ttext-align: center;\n\n\ta {\n\t\tmargin: 0 3px;\n\t}\n"])));
|
|
14
|
+
var toggleButtons = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n\tmargin: 0 -3px;\n\tmax-width: 100%;\n\n\ta {\n\t\tmargin: 3px 3px;\n\t}\n"])));
|
|
15
|
+
var numberBoxContainer = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n\tmargin: 0 -5px;\n\ta {\n\t\tmargin: 5px;\n\t}\n\tspan {\n\t\tmargin: 0 5px;\n\t}\n"])));
|
|
16
|
+
|
|
17
|
+
var primary = function primary(_ref2) {
|
|
18
|
+
var theme = _ref2.theme;
|
|
19
|
+
return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteralLoose(["\n\tbackground-color: ", ";\n\tcolor: ", ";\n\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: ", ";\n\t}\n"])), theme.colors.primaryColor, theme.colors.primaryTextColor, darken(0.1, theme.colors.primaryColor));
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
var large = function large() {
|
|
23
|
+
return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteralLoose(["\n\tmin-height: 40px;\n\tpadding: 10px 20px;\n"])));
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
var disabled = function disabled(_ref3) {
|
|
27
|
+
var theme = _ref3.theme;
|
|
28
|
+
return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteralLoose(["\n\tbackground-color: ", ";\n\tcolor: #ccc;\n\tcursor: not-allowed;\n\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: ", ";\n\t}\n"])), theme.colors.backgroundColor ? lighten(0.1, theme.colors.backgroundColor) : '#fafafa', theme.colors.backgroundColor ? lighten(0.2, theme.colors.backgroundColor) : '#fafafa');
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
var Button = styled('a')(_templateObject8 || (_templateObject8 = _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"])), function (_ref4) {
|
|
32
|
+
var theme = _ref4.theme;
|
|
33
|
+
return theme.colors.backgroundColor || '#eee';
|
|
34
|
+
}, function (_ref5) {
|
|
35
|
+
var theme = _ref5.theme;
|
|
36
|
+
return theme.colors.textColor;
|
|
37
|
+
}, function (_ref6) {
|
|
38
|
+
var theme = _ref6.theme;
|
|
39
|
+
return theme.colors.backgroundColor ? darken(0.1, theme.colors.backgroundColor) : '#ccc';
|
|
40
|
+
}, function (_ref7) {
|
|
41
|
+
var theme = _ref7.theme;
|
|
42
|
+
return rgba(theme.colors.primaryColor, 0.6);
|
|
43
|
+
}, function (_ref8) {
|
|
44
|
+
var theme = _ref8.theme;
|
|
45
|
+
return "0 0 0 2px " + rgba(theme.colors.primaryColor, 0.3);
|
|
46
|
+
}, function (props) {
|
|
47
|
+
return props.primary ? primary : null;
|
|
48
|
+
}, function (props) {
|
|
49
|
+
return props.disabled ? disabled : null;
|
|
50
|
+
}, function (props) {
|
|
51
|
+
return props.large && large;
|
|
52
|
+
});
|
|
53
|
+
var loadMoreContainer = css({
|
|
54
|
+
margin: '5px 0',
|
|
55
|
+
display: 'flex',
|
|
56
|
+
justifyContent: 'center'
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
export { Button as B, filters as f, loadMoreContainer as l, pagination as p, toggleButtons as t };
|
|
@@ -1,6 +1,33 @@
|
|
|
1
|
-
import { a as _extends } from './_rollupPluginBabelHelpers-
|
|
1
|
+
import { _ as _taggedTemplateLiteralLoose, a as _extends } from './_rollupPluginBabelHelpers-ecf6c03c.js';
|
|
2
|
+
import styled, { css } from '@appbaseio/vue-emotion';
|
|
2
3
|
import computeScrollIntoView from 'compute-scroll-into-view';
|
|
3
4
|
|
|
5
|
+
var _templateObject;
|
|
6
|
+
var InputWrapper = styled('span')(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n flex: 1;\n position: relative;\n"])));
|
|
7
|
+
|
|
8
|
+
var _templateObject$1, _templateObject2, _templateObject3, _templateObject4;
|
|
9
|
+
var IconGroup = styled('div')(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteralLoose(["\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tgrid-gap: 6px;\n\tmargin: 0 10px;\n\theight: 100%;\n\n\t", ";\n\n\t", ";\n"])), function (_ref) {
|
|
10
|
+
var positionType = _ref.positionType;
|
|
11
|
+
|
|
12
|
+
if (positionType === 'absolute') {
|
|
13
|
+
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: 50%;\n\t\t\t\ttransform: translateY(-50%);\n\t\t\t"])));
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return null;
|
|
17
|
+
}, function (_ref2) {
|
|
18
|
+
var groupPosition = _ref2.groupPosition;
|
|
19
|
+
return groupPosition === 'right' ? css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n\t\t\t\t\tright: 0;\n\t\t\t "]))) : css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n\t\t\t\t\tleft: 0;\n\t\t\t "])));
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
var _templateObject$2;
|
|
23
|
+
var IconWrapper = styled('div')(_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteralLoose(["\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tmax-width: 23px;\n\twidth: max-content;\n\tcursor: pointer;\n\theight: 100%;min-width:20px;\n\n\tsvg.search-icon {\n\t\tfill: ", ";\n\t\ttransform:scale(1.5);\n\t}\n\n\tsvg.cancel-icon {\n\t\tfill: ", ";\n\t}\n"])), function (_ref) {
|
|
24
|
+
var theme = _ref.theme;
|
|
25
|
+
return theme.colors.primaryColor;
|
|
26
|
+
}, function (_ref2) {
|
|
27
|
+
var theme = _ref2.theme;
|
|
28
|
+
return theme.colors.borderColor || '#000';
|
|
29
|
+
});
|
|
30
|
+
|
|
4
31
|
/**
|
|
5
32
|
* Scroll node into view if necessary
|
|
6
33
|
* @param {HTMLElement} node the element that should scroll into view
|
|
@@ -36,8 +63,7 @@ var Downshift = {
|
|
|
36
63
|
internal_isOpen: false,
|
|
37
64
|
internal_inputValue: '',
|
|
38
65
|
internal_selectedItem: null,
|
|
39
|
-
internal_highlightedIndex: null
|
|
40
|
-
internal_eventsCalled: {}
|
|
66
|
+
internal_highlightedIndex: null
|
|
41
67
|
};
|
|
42
68
|
},
|
|
43
69
|
computed: {
|
|
@@ -47,7 +73,7 @@ var Downshift = {
|
|
|
47
73
|
return Object.keys(this.$props).reduce(function (state, key) {
|
|
48
74
|
var _extends2;
|
|
49
75
|
|
|
50
|
-
return _extends(
|
|
76
|
+
return _extends({}, state, (_extends2 = {}, _extends2[key] = _this.isControlledProp(key) ? _this.$props[key] : _this["internal_" + key], _extends2));
|
|
51
77
|
}, {});
|
|
52
78
|
},
|
|
53
79
|
internalItemCount: function internalItemCount() {
|
|
@@ -222,23 +248,11 @@ var Downshift = {
|
|
|
222
248
|
}
|
|
223
249
|
|
|
224
250
|
var vm = this;
|
|
225
|
-
setTimeout(function () {
|
|
226
|
-
vm.internal_eventsCalled[index] = false;
|
|
227
|
-
}, 0);
|
|
228
251
|
return {
|
|
229
252
|
mouseenter: function mouseenter() {
|
|
230
253
|
vm.setHighlightedIndex(newIndex);
|
|
231
254
|
},
|
|
232
|
-
// for browsers not supporting click event (e.g. firefox android)
|
|
233
|
-
mousedown: function mousedown(event) {
|
|
234
|
-
if (vm.internal_eventsCalled[index]) return;
|
|
235
|
-
vm.internal_eventsCalled[index] = true;
|
|
236
|
-
event.stopPropagation();
|
|
237
|
-
vm.selectItemAtIndex(newIndex);
|
|
238
|
-
},
|
|
239
255
|
click: function click(event) {
|
|
240
|
-
if (vm.internal_eventsCalled[index]) return;
|
|
241
|
-
vm.internal_eventsCalled[index] = true;
|
|
242
256
|
event.stopPropagation();
|
|
243
257
|
vm.selectItemAtIndex(newIndex);
|
|
244
258
|
}
|
|
@@ -398,4 +412,29 @@ var Downshift = {
|
|
|
398
412
|
}
|
|
399
413
|
};
|
|
400
414
|
|
|
401
|
-
|
|
415
|
+
var CancelSvg = {
|
|
416
|
+
functional: true,
|
|
417
|
+
render: function render(h) {
|
|
418
|
+
return h("svg", {
|
|
419
|
+
"attrs": {
|
|
420
|
+
"alt": "Clear",
|
|
421
|
+
"xmlns": "http://www.w3.org/2000/svg",
|
|
422
|
+
"height": "20px",
|
|
423
|
+
"viewBox": "0 0 24 24",
|
|
424
|
+
"width": "20px"
|
|
425
|
+
},
|
|
426
|
+
"class": "cancel-icon"
|
|
427
|
+
}, [h("title", ["Clear"]), h("path", {
|
|
428
|
+
"attrs": {
|
|
429
|
+
"d": "M0 0h24v24H0V0z",
|
|
430
|
+
"fill": "none"
|
|
431
|
+
}
|
|
432
|
+
}), h("path", {
|
|
433
|
+
"attrs": {
|
|
434
|
+
"d": "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"
|
|
435
|
+
}
|
|
436
|
+
})]);
|
|
437
|
+
}
|
|
438
|
+
};
|
|
439
|
+
|
|
440
|
+
export { CancelSvg as C, Downshift as D, IconWrapper as I, IconGroup as a, InputWrapper as b };
|
|
@@ -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 };
|