@appbaseio/reactivesearch-vue 1.34.0-alpha.1 → 1.34.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 +1175 -1297
- package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js +6 -11
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
- package/dist/cjs/{ComponentWrapper-9318cece.js → ComponentWrapper-94c50228.js} +16 -7
- package/dist/cjs/DataSearch.js +1310 -17
- package/dist/cjs/{DropDown-8984b544.js → DropDown-7a52c661.js} +2 -2
- package/dist/cjs/DynamicRangeSlider.js +12 -8
- package/dist/cjs/MultiDropdownList.js +11 -8
- package/dist/cjs/MultiList.js +10 -8
- package/dist/cjs/MultiRange.js +7 -4
- package/dist/cjs/{Pagination-07f4dbad.js → Pagination-e56a5b79.js} +1 -1
- package/dist/cjs/{PreferencesConsumer-5d67b486.js → PreferencesConsumer-5e6e84a2.js} +1 -1
- package/dist/cjs/RangeInput.js +4 -4
- package/dist/cjs/RangeSlider.js +7 -4
- package/dist/cjs/ReactiveBase.js +10 -6
- package/dist/cjs/ReactiveComponent.js +316 -45
- package/dist/cjs/{ReactiveComponent-0a354ed7.js → ReactiveComponentPrivate-244c6055.js} +32 -318
- package/dist/cjs/ReactiveComponentPrivate.js +55 -0
- package/dist/cjs/ReactiveGoogleMap.js +139 -108
- package/dist/cjs/ReactiveList.js +17 -6
- package/dist/cjs/ResultCard.js +1 -1
- package/dist/cjs/ResultList.js +1 -1
- package/dist/cjs/SelectedFilters.js +2 -2
- package/dist/cjs/SingleDropdownList.js +10 -8
- package/dist/cjs/SingleList.js +10 -8
- package/dist/cjs/SingleRange.js +7 -4
- package/dist/cjs/StateProvider.js +1 -1
- package/dist/cjs/Tags-4ec43831.js +883 -0
- package/dist/cjs/ToggleButton.js +6 -4
- package/dist/cjs/{index-30126fd0.js → index-de136c17.js} +2 -0
- package/dist/cjs/index.js +14 -11
- package/dist/cjs/initReactivesearch.js +0 -3
- package/dist/cjs/install.js +11 -9
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/{vueTypes-7cfc2f98.js → vueTypes-b7007f5f.js} +2 -1
- package/dist/es/{ComponentWrapper-240450cc.js → ComponentWrapper-edaeaceb.js} +16 -7
- package/dist/es/DataSearch.js +1310 -15
- package/dist/es/{DropDown-28ddce07.js → DropDown-2c0dd714.js} +2 -2
- package/dist/es/DynamicRangeSlider.js +12 -8
- package/dist/es/MultiDropdownList.js +11 -8
- package/dist/es/MultiList.js +10 -8
- package/dist/es/MultiRange.js +7 -4
- package/dist/es/{Pagination-28e56c5c.js → Pagination-edeb7dbe.js} +1 -1
- package/dist/es/{PreferencesConsumer-bc097ebb.js → PreferencesConsumer-86a676c8.js} +1 -1
- package/dist/es/RangeInput.js +4 -4
- package/dist/es/RangeSlider.js +7 -4
- package/dist/es/ReactiveBase.js +10 -6
- package/dist/es/ReactiveComponent.js +316 -44
- package/dist/es/{ReactiveComponent-9352370c.js → ReactiveComponentPrivate-6f16e1b7.js} +19 -305
- package/dist/es/ReactiveComponentPrivate.js +47 -0
- package/dist/es/ReactiveGoogleMap.js +139 -108
- package/dist/es/ReactiveList.js +17 -6
- package/dist/es/ResultCard.js +1 -1
- package/dist/es/ResultList.js +1 -1
- package/dist/es/SelectedFilters.js +2 -2
- package/dist/es/SingleDropdownList.js +10 -8
- package/dist/es/SingleList.js +10 -8
- package/dist/es/SingleRange.js +7 -4
- package/dist/es/StateProvider.js +1 -1
- package/dist/es/Tags-1c2d6c4d.js +869 -0
- package/dist/es/ToggleButton.js +6 -4
- package/dist/es/{index-0444a498.js → index-5509c0bc.js} +2 -0
- package/dist/es/index.js +10 -8
- package/dist/es/initReactivesearch.js +0 -3
- package/dist/es/install.js +11 -9
- package/dist/es/version.js +1 -1
- package/dist/es/{vueTypes-8986b709.js → vueTypes-66ebc93e.js} +2 -1
- package/package.json +87 -87
- package/dist/cjs/DataSearch-8ea2651a.js +0 -2175
- package/dist/es/DataSearch-dcaa106b.js +0 -2159
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { Actions, helper, causes } from '@appbaseio/reactivecore';
|
|
2
2
|
import { SEARCH_COMPONENTS_MODES, componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
|
|
3
|
-
import { _ as _taggedTemplateLiteralLoose, a as _extends
|
|
3
|
+
import { _ as _taggedTemplateLiteralLoose, a as _extends } from './_rollupPluginBabelHelpers-ded08042.js';
|
|
4
4
|
import VueTypes from 'vue-types';
|
|
5
5
|
import { getQueryOptions, suggestionTypes } from '@appbaseio/reactivecore/lib/utils/helper';
|
|
6
6
|
import styled from '@appbaseio/vue-emotion';
|
|
7
7
|
import { B as Button } from './Button-153cd885.js';
|
|
8
|
-
import { t as types } from './vueTypes-
|
|
8
|
+
import { t as types } from './vueTypes-66ebc93e.js';
|
|
9
9
|
import { RLConnected } from './ReactiveList.js';
|
|
10
|
-
import { n as decodeHtml, h as hasCustomRenderer, i as isQueryIdentical, g as getComponent, u as updateDefaultQuery, f as updateCustomQuery, a as isFunction, k as isEmpty, p as parseFocusShortcuts, l as extractModifierKeysFromFocusShortcuts, c as connect } from './index-
|
|
11
|
-
import { C as ComponentWrapper } from './ComponentWrapper-
|
|
12
|
-
import { P as PreferencesConsumer } from './PreferencesConsumer-
|
|
10
|
+
import { n as decodeHtml, h as hasCustomRenderer, i as isQueryIdentical, g as getComponent, u as updateDefaultQuery, f as updateCustomQuery, a as isFunction, k as isEmpty, p as parseFocusShortcuts, l as extractModifierKeysFromFocusShortcuts, c as connect } from './index-5509c0bc.js';
|
|
11
|
+
import { C as ComponentWrapper } from './ComponentWrapper-edaeaceb.js';
|
|
12
|
+
import { P as PreferencesConsumer } from './PreferencesConsumer-86a676c8.js';
|
|
13
13
|
import { T as Title } from './Title-863dfa42.js';
|
|
14
14
|
import hotkeys from 'hotkeys-js';
|
|
15
|
-
import { S as SearchSvg,
|
|
15
|
+
import { S as SearchSvg, a as SuggestionWrapper, I as InputAddon, M as Mic, T as TagItem, b as TagsContainer, c as InputGroup, C as CustomSvg, d as SuggestionItem } from './Tags-1c2d6c4d.js';
|
|
16
16
|
import { C as CancelSvg, a as IconGroup, I as IconWrapper, D as Downshift, b as InputWrapper } from './CancelSvg-e40552a5.js';
|
|
17
17
|
import { s as suggestionsContainer, I as Input, a as suggestions } from './Input-c09c0b56.js';
|
|
18
18
|
import { C as Container } from './Container-d00219f7.js';
|
|
@@ -21,6 +21,7 @@ import { ListConnected as ListConnected$2 } from './MultiList.js';
|
|
|
21
21
|
import { ListConnected as ListConnected$1 } from './SingleDropdownList.js';
|
|
22
22
|
import { ListConnected } from './MultiDropdownList.js';
|
|
23
23
|
import { TBConnected } from './ToggleButton.js';
|
|
24
|
+
import ReactiveComponent from './ReactiveComponent.js';
|
|
24
25
|
import { RangeConnected as RangeConnected$4 } from './DynamicRangeSlider.js';
|
|
25
26
|
import { RangeConnected as RangeConnected$3 } from './SingleRange.js';
|
|
26
27
|
import { RangeConnected as RangeConnected$2 } from './MultiRange.js';
|
|
@@ -267,7 +268,6 @@ var SearchBox = {
|
|
|
267
268
|
// selected value is cleared, call onValueSelected
|
|
268
269
|
this.onValueSelectedHandler('', causes.CLEAR_VALUE);
|
|
269
270
|
}
|
|
270
|
-
// if (this.$props.value === undefined) {
|
|
271
271
|
if (this.$options.isTagsMode) {
|
|
272
272
|
// handling reset of tags through SelectedFilters or URL
|
|
273
273
|
this.selectedTags = [];
|
|
@@ -277,7 +277,6 @@ var SearchBox = {
|
|
|
277
277
|
cause = causes.SUGGESTION_SELECT;
|
|
278
278
|
}
|
|
279
279
|
this.setValue(newVal || '', true, this.$props, cause);
|
|
280
|
-
// }
|
|
281
280
|
}
|
|
282
281
|
},
|
|
283
282
|
focusShortcuts: function focusShortcuts() {
|
|
@@ -420,8 +419,7 @@ var SearchBox = {
|
|
|
420
419
|
if (typeof value === 'string' && !!value) {
|
|
421
420
|
_this.selectedTags.push(value);
|
|
422
421
|
} else if (Array.isArray(value) && !isEqual(_this.selectedTags, value)) {
|
|
423
|
-
|
|
424
|
-
_this.selectedTags = mergedArray;
|
|
422
|
+
_this.selectedTags = value;
|
|
425
423
|
}
|
|
426
424
|
} else if (value) {
|
|
427
425
|
_this.selectedTags = typeof value !== 'string' ? value : [].concat(value);
|
|
@@ -1123,6 +1121,9 @@ var SearchBox = {
|
|
|
1123
1121
|
document.removeEventListener('keydown', this.onKeyDown);
|
|
1124
1122
|
}
|
|
1125
1123
|
};
|
|
1124
|
+
SearchBox.hasInternalComponent = function () {
|
|
1125
|
+
return true;
|
|
1126
|
+
};
|
|
1126
1127
|
SearchBox.defaultQuery = function (value, props) {
|
|
1127
1128
|
var finalQuery = null;
|
|
1128
1129
|
var fields = normalizeDataField(props.dataField, props.fieldWeights);
|
|
@@ -1246,310 +1247,23 @@ var SBConnected = PreferencesConsumer(ComponentWrapper(connect(mapStateToProps,
|
|
|
1246
1247
|
internalComponent: true
|
|
1247
1248
|
}));
|
|
1248
1249
|
SBConnected.name = SearchBox.name;
|
|
1250
|
+
SBConnected.defaultQuery = SearchBox.defaultQuery;
|
|
1251
|
+
SBConnected.shouldQuery = SearchBox.shouldQuery;
|
|
1252
|
+
SBConnected.hasInternalComponent = SearchBox.hasInternalComponent;
|
|
1249
1253
|
SBConnected.install = function (Vue) {
|
|
1250
1254
|
Vue.component(SBConnected.name, SBConnected);
|
|
1251
1255
|
};
|
|
1252
1256
|
// Add componentType for SSR
|
|
1253
1257
|
SBConnected.componentType = componentTypes.searchBox;
|
|
1254
1258
|
|
|
1255
|
-
var _excluded = ["options"];
|
|
1256
|
-
var updateQuery$1 = Actions.updateQuery,
|
|
1257
|
-
setQueryOptions = Actions.setQueryOptions,
|
|
1258
|
-
setCustomQuery$1 = Actions.setCustomQuery,
|
|
1259
|
-
setDefaultQuery$1 = Actions.setDefaultQuery;
|
|
1260
|
-
var parseHits = helper.parseHits,
|
|
1261
|
-
isEqual$1 = helper.isEqual,
|
|
1262
|
-
getCompositeAggsQuery$1 = helper.getCompositeAggsQuery,
|
|
1263
|
-
getResultStats$1 = helper.getResultStats,
|
|
1264
|
-
extractQueryFromCustomQuery = helper.extractQueryFromCustomQuery,
|
|
1265
|
-
getOptionsForCustomQuery = helper.getOptionsForCustomQuery;
|
|
1266
|
-
var ReactiveComponent = {
|
|
1267
|
-
name: 'ReactiveComponent',
|
|
1268
|
-
props: {
|
|
1269
|
-
componentId: types.stringRequired,
|
|
1270
|
-
aggregationField: types.string,
|
|
1271
|
-
aggregationSize: VueTypes.number,
|
|
1272
|
-
size: VueTypes.number,
|
|
1273
|
-
defaultQuery: types.func,
|
|
1274
|
-
customQuery: types.func,
|
|
1275
|
-
filterLabel: types.string,
|
|
1276
|
-
react: types.react,
|
|
1277
|
-
showFilter: VueTypes.bool.def(true),
|
|
1278
|
-
URLParams: VueTypes.bool.def(false),
|
|
1279
|
-
distinctField: types.string,
|
|
1280
|
-
distinctFieldConfig: types.props,
|
|
1281
|
-
index: VueTypes.string,
|
|
1282
|
-
endpoint: types.endpointConfig
|
|
1283
|
-
},
|
|
1284
|
-
created: function created() {
|
|
1285
|
-
var _this = this;
|
|
1286
|
-
var props = this.$props;
|
|
1287
|
-
this.internalComponent = null;
|
|
1288
|
-
this.$defaultQuery = null;
|
|
1289
|
-
// Set custom query in store
|
|
1290
|
-
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.selectedValue);
|
|
1291
|
-
var customQuery = props.customQuery,
|
|
1292
|
-
componentId = props.componentId,
|
|
1293
|
-
filterLabel = props.filterLabel,
|
|
1294
|
-
showFilter = props.showFilter,
|
|
1295
|
-
URLParams = props.URLParams,
|
|
1296
|
-
distinctField = props.distinctField,
|
|
1297
|
-
distinctFieldConfig = props.distinctFieldConfig,
|
|
1298
|
-
index = props.index;
|
|
1299
|
-
if (this.enableAppbase && this.aggregationField && this.aggregationField !== '') {
|
|
1300
|
-
console.warn('Warning(ReactiveSearch): The `aggregationField` prop has been marked as deprecated, please use the `distinctField` prop instead.');
|
|
1301
|
-
}
|
|
1302
|
-
if (!this.enableAppbase && (distinctField || distinctFieldConfig)) {
|
|
1303
|
-
console.warn('Warning(ReactiveSearch): In order to use the `distinctField` and `distinctFieldConfig` props, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
|
|
1304
|
-
}
|
|
1305
|
-
if (!this.enableAppbase && index) {
|
|
1306
|
-
console.warn('Warning(ReactiveSearch): In order to use the `index` prop, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
|
|
1307
|
-
}
|
|
1308
|
-
if (customQuery) {
|
|
1309
|
-
var calcCustomQuery = customQuery(this.selectedValue, props);
|
|
1310
|
-
var query = extractQueryFromCustomQuery(calcCustomQuery);
|
|
1311
|
-
var customQueryOptions = calcCustomQuery ? getOptionsForCustomQuery(calcCustomQuery) : null;
|
|
1312
|
-
if (customQueryOptions) {
|
|
1313
|
-
this.setQueryOptions(componentId, _extends({}, customQueryOptions, this.getAggsQuery()), false);
|
|
1314
|
-
} else this.setQueryOptions(componentId, this.getAggsQuery(), false);
|
|
1315
|
-
this.updateQuery({
|
|
1316
|
-
componentId: componentId,
|
|
1317
|
-
query: query,
|
|
1318
|
-
value: this.selectedValue || null,
|
|
1319
|
-
label: filterLabel,
|
|
1320
|
-
showFilter: showFilter,
|
|
1321
|
-
URLParams: URLParams
|
|
1322
|
-
});
|
|
1323
|
-
}
|
|
1324
|
-
this.setQuery = function (_ref) {
|
|
1325
|
-
var options = _ref.options,
|
|
1326
|
-
obj = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
1327
|
-
var queryToBeSet = obj.query;
|
|
1328
|
-
|
|
1329
|
-
// when enableAppbase is true, Backend throws error because of repeated query in request body
|
|
1330
|
-
if (queryToBeSet && queryToBeSet.query) {
|
|
1331
|
-
queryToBeSet = queryToBeSet.query;
|
|
1332
|
-
}
|
|
1333
|
-
var customQueryCalc = _extends({}, options, {
|
|
1334
|
-
query: queryToBeSet
|
|
1335
|
-
});
|
|
1336
|
-
var rsAPIQuery = customQueryCalc;
|
|
1337
|
-
// handle stored queries
|
|
1338
|
-
if (queryToBeSet && queryToBeSet.id) {
|
|
1339
|
-
rsAPIQuery = queryToBeSet;
|
|
1340
|
-
}
|
|
1341
|
-
// Update customQuery field for RS API
|
|
1342
|
-
_this.setCustomQuery(props.componentId, rsAPIQuery);
|
|
1343
|
-
if (options) {
|
|
1344
|
-
_this.setQueryOptions(props.componentId, _extends({}, _this.getAggsQuery(), options), false);
|
|
1345
|
-
}
|
|
1346
|
-
_this.updateQuery(_extends({}, obj, {
|
|
1347
|
-
query: customQueryCalc.query,
|
|
1348
|
-
componentId: props.componentId,
|
|
1349
|
-
label: props.filterLabel,
|
|
1350
|
-
showFilter: props.showFilter,
|
|
1351
|
-
URLParams: props.URLParams
|
|
1352
|
-
}));
|
|
1353
|
-
};
|
|
1354
|
-
if (props.defaultQuery) {
|
|
1355
|
-
this.internalComponent = props.componentId + "__internal";
|
|
1356
|
-
}
|
|
1357
|
-
if (this.internalComponent && this.$props.defaultQuery) {
|
|
1358
|
-
updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props, this.selectedValue);
|
|
1359
|
-
this.$defaultQuery = this.$props.defaultQuery(this.selectedValue, this.$props);
|
|
1360
|
-
var _query = extractQueryFromCustomQuery(this.$defaultQuery);
|
|
1361
|
-
var queryOptions = getOptionsForCustomQuery(this.$defaultQuery);
|
|
1362
|
-
if (queryOptions) {
|
|
1363
|
-
this.setQueryOptions(this.internalComponent, _extends({}, queryOptions, this.getAggsQuery()), false);
|
|
1364
|
-
} else this.setQueryOptions(this.internalComponent, this.getAggsQuery(), false);
|
|
1365
|
-
this.updateQuery({
|
|
1366
|
-
componentId: this.internalComponent,
|
|
1367
|
-
query: _query
|
|
1368
|
-
});
|
|
1369
|
-
}
|
|
1370
|
-
},
|
|
1371
|
-
watch: {
|
|
1372
|
-
hits: function hits(newVal, oldVal) {
|
|
1373
|
-
if (!isEqual$1(newVal, oldVal)) {
|
|
1374
|
-
this.$emit('data', this.getData());
|
|
1375
|
-
}
|
|
1376
|
-
},
|
|
1377
|
-
rawData: function rawData(newVal, oldVal) {
|
|
1378
|
-
if (!isEqual$1(newVal, oldVal)) {
|
|
1379
|
-
this.$emit('data', this.getData());
|
|
1380
|
-
}
|
|
1381
|
-
},
|
|
1382
|
-
aggregations: function aggregations(newVal, oldVal) {
|
|
1383
|
-
if (!isEqual$1(newVal, oldVal)) {
|
|
1384
|
-
this.$emit('data', this.getData());
|
|
1385
|
-
}
|
|
1386
|
-
},
|
|
1387
|
-
aggregationData: function aggregationData(newVal, oldVal) {
|
|
1388
|
-
if (!isEqual$1(newVal, oldVal)) {
|
|
1389
|
-
this.$emit('data', this.getData());
|
|
1390
|
-
}
|
|
1391
|
-
},
|
|
1392
|
-
promotedResults: function promotedResults(newVal, oldVal) {
|
|
1393
|
-
if (!isEqual$1(newVal, oldVal)) {
|
|
1394
|
-
this.$emit('data', this.getData());
|
|
1395
|
-
}
|
|
1396
|
-
},
|
|
1397
|
-
hidden: function hidden(newVal, oldVal) {
|
|
1398
|
-
if (!isEqual$1(newVal, oldVal)) {
|
|
1399
|
-
this.$emit('data', this.getData());
|
|
1400
|
-
}
|
|
1401
|
-
},
|
|
1402
|
-
total: function total(newVal, oldVal) {
|
|
1403
|
-
if (!isEqual$1(newVal, oldVal)) {
|
|
1404
|
-
this.$emit('data', this.getData());
|
|
1405
|
-
}
|
|
1406
|
-
},
|
|
1407
|
-
time: function time(newVal, oldVal) {
|
|
1408
|
-
if (!isEqual$1(newVal, oldVal)) {
|
|
1409
|
-
this.$emit('data', this.getData());
|
|
1410
|
-
}
|
|
1411
|
-
},
|
|
1412
|
-
defaultQuery: function defaultQuery(newVal, oldVal) {
|
|
1413
|
-
if (newVal && !isQueryIdentical(newVal, oldVal, this.selectedValue, this.$props)) {
|
|
1414
|
-
this.$defaultQuery = newVal(this.selectedValue, this.$props);
|
|
1415
|
-
var query = extractQueryFromCustomQuery(this.$defaultQuery);
|
|
1416
|
-
var queryOptions = getOptionsForCustomQuery(this.$defaultQuery);
|
|
1417
|
-
if (queryOptions) {
|
|
1418
|
-
this.setQueryOptions(this.internalComponent, _extends({}, queryOptions, this.getAggsQuery()), false);
|
|
1419
|
-
} else this.setQueryOptions(this.internalComponent, this.getAggsQuery(), false);
|
|
1420
|
-
// Update default query for RS API
|
|
1421
|
-
updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props, this.selectedValue);
|
|
1422
|
-
this.updateQuery({
|
|
1423
|
-
componentId: this.internalComponent,
|
|
1424
|
-
query: query
|
|
1425
|
-
});
|
|
1426
|
-
}
|
|
1427
|
-
},
|
|
1428
|
-
customQuery: function customQuery(newVal, oldVal) {
|
|
1429
|
-
if (newVal && !isQueryIdentical(newVal, oldVal, this.selectedValue, this.$props)) {
|
|
1430
|
-
var componentId = this.$props.componentId;
|
|
1431
|
-
this.$customQuery = newVal(this.selectedValue, this.$props);
|
|
1432
|
-
var query = extractQueryFromCustomQuery(this.$customQuery);
|
|
1433
|
-
var queryOptions = getOptionsForCustomQuery(this.$customQuery);
|
|
1434
|
-
if (queryOptions) {
|
|
1435
|
-
this.setQueryOptions(componentId, _extends({}, queryOptions, this.getAggsQuery()), false);
|
|
1436
|
-
} else this.setQueryOptions(componentId, this.getAggsQuery(), false);
|
|
1437
|
-
|
|
1438
|
-
// Update custom query for RS API
|
|
1439
|
-
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.selectedValue);
|
|
1440
|
-
this.updateQuery({
|
|
1441
|
-
componentId: componentId,
|
|
1442
|
-
query: query
|
|
1443
|
-
});
|
|
1444
|
-
}
|
|
1445
|
-
}
|
|
1446
|
-
},
|
|
1447
|
-
render: function render() {
|
|
1448
|
-
var h = arguments[0];
|
|
1449
|
-
try {
|
|
1450
|
-
var dom = this.$scopedSlots["default"];
|
|
1451
|
-
var error = this.error,
|
|
1452
|
-
isLoading = this.isLoading,
|
|
1453
|
-
selectedValue = this.selectedValue;
|
|
1454
|
-
var propsToBePassed = _extends({
|
|
1455
|
-
error: error,
|
|
1456
|
-
loading: isLoading
|
|
1457
|
-
}, this.getData(), {
|
|
1458
|
-
value: selectedValue,
|
|
1459
|
-
setQuery: this.setQuery
|
|
1460
|
-
});
|
|
1461
|
-
return h("div", [dom(propsToBePassed)]);
|
|
1462
|
-
} catch (e) {
|
|
1463
|
-
return null;
|
|
1464
|
-
}
|
|
1465
|
-
},
|
|
1466
|
-
methods: {
|
|
1467
|
-
getAggsQuery: function getAggsQuery() {
|
|
1468
|
-
if (this.aggregationField) {
|
|
1469
|
-
return {
|
|
1470
|
-
aggs: getCompositeAggsQuery$1({
|
|
1471
|
-
props: this.$props,
|
|
1472
|
-
showTopHits: true,
|
|
1473
|
-
value: this.selectedValue
|
|
1474
|
-
}).aggs
|
|
1475
|
-
};
|
|
1476
|
-
}
|
|
1477
|
-
return {};
|
|
1478
|
-
},
|
|
1479
|
-
getData: function getData() {
|
|
1480
|
-
var hits = this.hits,
|
|
1481
|
-
aggregations = this.aggregations,
|
|
1482
|
-
aggregationData = this.aggregationData,
|
|
1483
|
-
promotedResults = this.promotedResults,
|
|
1484
|
-
rawData = this.rawData;
|
|
1485
|
-
var filteredResults = parseHits(hits);
|
|
1486
|
-
if (promotedResults.length) {
|
|
1487
|
-
var ids = promotedResults.map(function (item) {
|
|
1488
|
-
return item._id;
|
|
1489
|
-
}).filter(Boolean);
|
|
1490
|
-
if (ids) {
|
|
1491
|
-
filteredResults = filteredResults.filter(function (item) {
|
|
1492
|
-
return !ids.includes(item._id);
|
|
1493
|
-
});
|
|
1494
|
-
}
|
|
1495
|
-
filteredResults = [].concat(promotedResults, filteredResults);
|
|
1496
|
-
}
|
|
1497
|
-
return {
|
|
1498
|
-
data: filteredResults,
|
|
1499
|
-
aggregationData: aggregationData,
|
|
1500
|
-
rawData: rawData,
|
|
1501
|
-
aggregations: aggregations,
|
|
1502
|
-
promotedData: promotedResults,
|
|
1503
|
-
resultStats: this.stats
|
|
1504
|
-
};
|
|
1505
|
-
}
|
|
1506
|
-
},
|
|
1507
|
-
computed: {
|
|
1508
|
-
stats: function stats() {
|
|
1509
|
-
return getResultStats$1(this);
|
|
1510
|
-
}
|
|
1511
|
-
}
|
|
1512
|
-
};
|
|
1513
|
-
ReactiveComponent.hasInternalComponent = function (props) {
|
|
1514
|
-
return !!props.defaultQuery;
|
|
1515
|
-
};
|
|
1516
|
-
var mapStateToProps$1 = function mapStateToProps(state, props) {
|
|
1517
|
-
return {
|
|
1518
|
-
aggregations: state.aggregations[props.componentId] && state.aggregations[props.componentId] || null,
|
|
1519
|
-
aggregationData: state.compositeAggregations[props.componentId] || [],
|
|
1520
|
-
hits: state.hits[props.componentId] && state.hits[props.componentId].hits || [],
|
|
1521
|
-
rawData: state.rawData[props.componentId],
|
|
1522
|
-
error: state.error[props.componentId],
|
|
1523
|
-
isLoading: state.isLoading[props.componentId],
|
|
1524
|
-
selectedValue: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value || null,
|
|
1525
|
-
promotedResults: state.promotedResults[props.componentId] || [],
|
|
1526
|
-
time: state.hits[props.componentId] && state.hits[props.componentId].time || 0,
|
|
1527
|
-
total: state.hits[props.componentId] && state.hits[props.componentId].total,
|
|
1528
|
-
hidden: state.hits[props.componentId] && state.hits[props.componentId].hidden,
|
|
1529
|
-
componentProps: state.props[props.componentId],
|
|
1530
|
-
enableAppbase: state.config.enableAppbase
|
|
1531
|
-
};
|
|
1532
|
-
};
|
|
1533
|
-
var mapDispatchtoProps = {
|
|
1534
|
-
setQueryOptions: setQueryOptions,
|
|
1535
|
-
updateQuery: updateQuery$1,
|
|
1536
|
-
setCustomQuery: setCustomQuery$1,
|
|
1537
|
-
setDefaultQuery: setDefaultQuery$1
|
|
1538
|
-
};
|
|
1539
|
-
var ConnectedComponent = ComponentWrapper(connect(mapStateToProps$1, mapDispatchtoProps)(ReactiveComponent), {
|
|
1540
|
-
componentType: componentTypes.reactiveComponent
|
|
1541
|
-
});
|
|
1542
1259
|
var RcConnected = PreferencesConsumer({
|
|
1543
1260
|
name: 'RcConnected',
|
|
1544
1261
|
render: function render(h) {
|
|
1545
|
-
var component =
|
|
1262
|
+
var component = ReactiveComponent;
|
|
1546
1263
|
switch (this.$attrs.componentType) {
|
|
1547
1264
|
case componentTypes.reactiveList:
|
|
1548
1265
|
component = RLConnected;
|
|
1549
1266
|
break;
|
|
1550
|
-
case componentTypes.dataSearch:
|
|
1551
|
-
component = DSConnected;
|
|
1552
|
-
break;
|
|
1553
1267
|
case componentTypes.searchBox:
|
|
1554
1268
|
component = SBConnected;
|
|
1555
1269
|
break;
|
|
@@ -1595,12 +1309,12 @@ var RcConnected = PreferencesConsumer({
|
|
|
1595
1309
|
});
|
|
1596
1310
|
}
|
|
1597
1311
|
});
|
|
1598
|
-
RcConnected.name =
|
|
1312
|
+
RcConnected.name = 'ReactiveComponentPrivate';
|
|
1313
|
+
RcConnected.hasInternalComponent = ReactiveComponent.hasInternalComponent;
|
|
1314
|
+
// Add componentType for SSR
|
|
1315
|
+
RcConnected.componentType = componentTypes.reactiveComponent;
|
|
1599
1316
|
RcConnected.install = function (Vue) {
|
|
1600
1317
|
Vue.component(RcConnected.name, RcConnected);
|
|
1601
1318
|
};
|
|
1602
1319
|
|
|
1603
|
-
// Add componentType for SSR
|
|
1604
|
-
RcConnected.componentType = componentTypes.reactiveComponent;
|
|
1605
|
-
|
|
1606
1320
|
export { RcConnected as R, SBConnected as S };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import '@appbaseio/reactivecore';
|
|
2
|
+
import '@appbaseio/reactivecore/lib/utils/constants';
|
|
3
|
+
import './_rollupPluginBabelHelpers-ded08042.js';
|
|
4
|
+
import 'vue-types';
|
|
5
|
+
import '@appbaseio/reactivecore/lib/utils/helper';
|
|
6
|
+
import 'emotion';
|
|
7
|
+
import '@appbaseio/vue-emotion';
|
|
8
|
+
import 'polished';
|
|
9
|
+
import './Button-153cd885.js';
|
|
10
|
+
import './vueTypes-66ebc93e.js';
|
|
11
|
+
import './Pagination-edeb7dbe.js';
|
|
12
|
+
import './ReactiveList.js';
|
|
13
|
+
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
14
|
+
import 'redux';
|
|
15
|
+
import './index-5509c0bc.js';
|
|
16
|
+
import './ComponentWrapper-edaeaceb.js';
|
|
17
|
+
import './PreferencesConsumer-86a676c8.js';
|
|
18
|
+
import '@vue/babel-helper-vue-jsx-merge-props';
|
|
19
|
+
import './Title-863dfa42.js';
|
|
20
|
+
import './ListItem-07888a65.js';
|
|
21
|
+
import './Card-19ad6d90.js';
|
|
22
|
+
import './Flex-7c177a10.js';
|
|
23
|
+
import 'hotkeys-js';
|
|
24
|
+
import './Tags-1c2d6c4d.js';
|
|
25
|
+
import './CancelSvg-e40552a5.js';
|
|
26
|
+
import './Input-c09c0b56.js';
|
|
27
|
+
import 'compute-scroll-into-view';
|
|
28
|
+
import './Container-d00219f7.js';
|
|
29
|
+
import 'vue-highlight-words';
|
|
30
|
+
export { R as default } from './ReactiveComponentPrivate-6f16e1b7.js';
|
|
31
|
+
import '@appbaseio/reactivecore/lib/utils/suggestions';
|
|
32
|
+
import './FormControlList-99797d0a.js';
|
|
33
|
+
import './utils-9e5a16a1.js';
|
|
34
|
+
import './SingleList.js';
|
|
35
|
+
import './MultiList.js';
|
|
36
|
+
import './DropDown-2c0dd714.js';
|
|
37
|
+
import './SingleDropdownList.js';
|
|
38
|
+
import './MultiDropdownList.js';
|
|
39
|
+
import './ToggleButton.js';
|
|
40
|
+
import './ReactiveComponent.js';
|
|
41
|
+
import 'vue-no-ssr';
|
|
42
|
+
import './ssr-03607d84.js';
|
|
43
|
+
import './DynamicRangeSlider.js';
|
|
44
|
+
import './SingleRange.js';
|
|
45
|
+
import './MultiRange.js';
|
|
46
|
+
import './RangeSlider.js';
|
|
47
|
+
import './RangeInput.js';
|