@appbaseio/reactivesearch-vue 1.16.0-alpha.36 → 1.16.0-alpha.39
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 +471 -904
- 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/DataSearch.js +13 -7
- package/dist/cjs/DynamicRangeSlider.js +23 -14
- package/dist/cjs/MultiDropdownList.js +22 -17
- package/dist/cjs/MultiList.js +22 -16
- package/dist/cjs/ReactiveComponent.js +31 -61
- package/dist/cjs/ReactiveList.js +47 -47
- package/dist/cjs/SingleDropdownList.js +17 -12
- package/dist/cjs/SingleList.js +16 -11
- package/dist/cjs/initReactivesearch.js +119 -78
- package/dist/cjs/version.js +1 -1
- package/dist/es/DataSearch.js +13 -7
- package/dist/es/DynamicRangeSlider.js +23 -14
- package/dist/es/MultiDropdownList.js +22 -17
- package/dist/es/MultiList.js +22 -16
- package/dist/es/ReactiveComponent.js +31 -61
- package/dist/es/ReactiveList.js +47 -47
- package/dist/es/SingleDropdownList.js +17 -12
- package/dist/es/SingleList.js +16 -11
- package/dist/es/initReactivesearch.js +121 -80
- package/dist/es/version.js +1 -1
- package/package.json +3 -3
|
@@ -4865,7 +4865,7 @@
|
|
|
4865
4865
|
Object.defineProperty(exports, "__esModule", {
|
|
4866
4866
|
value: true
|
|
4867
4867
|
});
|
|
4868
|
-
exports.getCalendarIntervalErrorMessage = exports.queryFormatMillisecondsMap = exports.suggestionTypes = exports.getTopSuggestions = exports.withClickIds = exports.getCompositeAggsQuery = exports.getAggsQuery = exports.extractQueryFromDefaultQuery = exports.updateInternalQuery = exports.getSearchState = exports.getOptionsFromQuery = exports.parseHits = exports.handleA11yAction = exports.getInnerKey = exports.getClassName = exports.checkSomePropChange = exports.checkPropChange = exports.updateDefaultQuery = exports.updateCustomQuery = undefined;
|
|
4868
|
+
exports.getCalendarIntervalErrorMessage = exports.queryFormatMillisecondsMap = exports.suggestionTypes = exports.getTopSuggestions = exports.withClickIds = exports.getCompositeAggsQuery = exports.getAggsQuery = exports.extractQueryFromDefaultQuery = exports.updateInternalQuery = exports.getSearchState = exports.extractQueryFromCustomQuery = exports.getOptionsForCustomQuery = exports.getOptionsFromQuery = exports.parseHits = exports.handleA11yAction = exports.getInnerKey = exports.getClassName = exports.checkSomePropChange = exports.checkPropChange = exports.updateDefaultQuery = exports.updateCustomQuery = undefined;
|
|
4869
4869
|
|
|
4870
4870
|
var _extends = Object.assign || function (target) {
|
|
4871
4871
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -5311,6 +5311,38 @@
|
|
|
5311
5311
|
|
|
5312
5312
|
exports.getOptionsFromQuery = getOptionsFromQuery;
|
|
5313
5313
|
|
|
5314
|
+
var getOptionsForCustomQuery = function getOptionsForCustomQuery() {
|
|
5315
|
+
var customQuery = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
5316
|
+
|
|
5317
|
+
if (customQuery) {
|
|
5318
|
+
var query = customQuery.query,
|
|
5319
|
+
id = customQuery.id,
|
|
5320
|
+
params = customQuery.params,
|
|
5321
|
+
rest = _objectWithoutProperties(customQuery, ['query', 'id', 'params']);
|
|
5322
|
+
|
|
5323
|
+
return Object.keys(rest).length ? rest : null;
|
|
5324
|
+
}
|
|
5325
|
+
|
|
5326
|
+
return null;
|
|
5327
|
+
};
|
|
5328
|
+
|
|
5329
|
+
exports.getOptionsForCustomQuery = getOptionsForCustomQuery;
|
|
5330
|
+
|
|
5331
|
+
var extractQueryFromCustomQuery = exports.extractQueryFromCustomQuery = function extractQueryFromCustomQuery(customQuery) {
|
|
5332
|
+
if (customQuery) {
|
|
5333
|
+
if (customQuery.id) {
|
|
5334
|
+
return {
|
|
5335
|
+
id: customQuery.id,
|
|
5336
|
+
params: customQuery.params
|
|
5337
|
+
};
|
|
5338
|
+
}
|
|
5339
|
+
|
|
5340
|
+
return customQuery.query;
|
|
5341
|
+
}
|
|
5342
|
+
|
|
5343
|
+
return null;
|
|
5344
|
+
};
|
|
5345
|
+
|
|
5314
5346
|
function computeResultStats(hits, searchState, promotedResults) {
|
|
5315
5347
|
Object.keys(hits).forEach(function (componentId) {
|
|
5316
5348
|
var _ref = hits[componentId] || {},
|
|
@@ -5736,28 +5768,30 @@
|
|
|
5736
5768
|
var helper_8 = helper.extractQueryFromDefaultQuery;
|
|
5737
5769
|
var helper_9 = helper.updateInternalQuery;
|
|
5738
5770
|
var helper_10 = helper.getSearchState;
|
|
5739
|
-
var helper_11 = helper.
|
|
5740
|
-
var helper_12 = helper.
|
|
5741
|
-
var helper_13 = helper.
|
|
5742
|
-
var helper_14 = helper.
|
|
5743
|
-
var helper_15 = helper.
|
|
5744
|
-
var helper_16 = helper.
|
|
5745
|
-
var helper_17 = helper.
|
|
5746
|
-
var helper_18 = helper.
|
|
5747
|
-
var helper_19 = helper.
|
|
5748
|
-
var helper_20 = helper.
|
|
5749
|
-
var helper_21 = helper.
|
|
5750
|
-
var helper_22 = helper.
|
|
5751
|
-
var helper_23 = helper.
|
|
5752
|
-
var helper_24 = helper.
|
|
5753
|
-
var helper_25 = helper.
|
|
5754
|
-
var helper_26 = helper.
|
|
5755
|
-
var helper_27 = helper.
|
|
5756
|
-
var helper_28 = helper.
|
|
5757
|
-
var helper_29 = helper.
|
|
5758
|
-
var helper_30 = helper.
|
|
5759
|
-
var helper_31 = helper.
|
|
5760
|
-
var helper_32 = helper.
|
|
5771
|
+
var helper_11 = helper.extractQueryFromCustomQuery;
|
|
5772
|
+
var helper_12 = helper.getOptionsForCustomQuery;
|
|
5773
|
+
var helper_13 = helper.getOptionsFromQuery;
|
|
5774
|
+
var helper_14 = helper.parseHits;
|
|
5775
|
+
var helper_15 = helper.handleA11yAction;
|
|
5776
|
+
var helper_16 = helper.getInnerKey;
|
|
5777
|
+
var helper_17 = helper.getClassName;
|
|
5778
|
+
var helper_18 = helper.checkSomePropChange;
|
|
5779
|
+
var helper_19 = helper.checkPropChange;
|
|
5780
|
+
var helper_20 = helper.updateDefaultQuery;
|
|
5781
|
+
var helper_21 = helper.updateCustomQuery;
|
|
5782
|
+
var helper_22 = helper.isEqual;
|
|
5783
|
+
var helper_23 = helper.debounce;
|
|
5784
|
+
var helper_24 = helper.getQueryOptions;
|
|
5785
|
+
var helper_25 = helper.buildQuery;
|
|
5786
|
+
var helper_26 = helper.pushToAndClause;
|
|
5787
|
+
var helper_27 = helper.checkValueChange;
|
|
5788
|
+
var helper_28 = helper.getAggsOrder;
|
|
5789
|
+
var helper_29 = helper.formatDate;
|
|
5790
|
+
var helper_30 = helper.getResultStats;
|
|
5791
|
+
var helper_31 = helper.extractFieldsFromSource;
|
|
5792
|
+
var helper_32 = helper.normalizeDataField;
|
|
5793
|
+
var helper_33 = helper.handleOnSuggestions;
|
|
5794
|
+
var helper_34 = helper.isValidDateRangeQueryFormat;
|
|
5761
5795
|
|
|
5762
5796
|
var value = createCommonjsModule(function (module, exports) {
|
|
5763
5797
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -8414,7 +8448,7 @@
|
|
|
8414
8448
|
exports.Response = ctx.Response;
|
|
8415
8449
|
module.exports = exports;
|
|
8416
8450
|
});
|
|
8417
|
-
unwrapExports(browserPonyfill);
|
|
8451
|
+
var fetch$1 = unwrapExports(browserPonyfill);
|
|
8418
8452
|
var browserPonyfill_1 = browserPonyfill.fetch;
|
|
8419
8453
|
var browserPonyfill_2 = browserPonyfill.Headers;
|
|
8420
8454
|
var browserPonyfill_3 = browserPonyfill.Request;
|
|
@@ -8837,6 +8871,8 @@
|
|
|
8837
8871
|
}, options, queryOptions[component]);
|
|
8838
8872
|
|
|
8839
8873
|
var oldQuery = queryLog[component];
|
|
8874
|
+
console.log('OLD QUERY', component, JSON.stringify(oldQuery));
|
|
8875
|
+
console.log('NEW QUERY', component, JSON.stringify(currentQuery));
|
|
8840
8876
|
|
|
8841
8877
|
if (mustExecuteMapQuery || !(0, helper.isEqual)(currentQuery, oldQuery)) {
|
|
8842
8878
|
orderOfQueries = [].concat(_toConsumableArray(orderOfQueries), [component]);
|
|
@@ -14094,9 +14130,10 @@
|
|
|
14094
14130
|
getQueryOptions = lib_8.getQueryOptions,
|
|
14095
14131
|
getClassName$1 = lib_8.getClassName,
|
|
14096
14132
|
parseHits = lib_8.parseHits,
|
|
14097
|
-
getOptionsFromQuery = lib_8.getOptionsFromQuery,
|
|
14098
14133
|
getCompositeAggsQuery = lib_8.getCompositeAggsQuery,
|
|
14099
|
-
getResultStats = lib_8.getResultStats
|
|
14134
|
+
getResultStats = lib_8.getResultStats,
|
|
14135
|
+
extractQueryFromCustomQuery = lib_8.extractQueryFromCustomQuery,
|
|
14136
|
+
getOptionsForCustomQuery = lib_8.getOptionsForCustomQuery;
|
|
14100
14137
|
var ReactiveList = {
|
|
14101
14138
|
name: 'ReactiveList',
|
|
14102
14139
|
components: {
|
|
@@ -14159,6 +14196,12 @@
|
|
|
14159
14196
|
});
|
|
14160
14197
|
}
|
|
14161
14198
|
|
|
14199
|
+
if (this.urlSortOption) {
|
|
14200
|
+
this.sortOptionIndex = this.$props.sortOptions.findIndex(function (s) {
|
|
14201
|
+
return s.label === _this.urlSortOption;
|
|
14202
|
+
}) || 0;
|
|
14203
|
+
}
|
|
14204
|
+
|
|
14162
14205
|
this.updateComponentProps(this.componentId, {
|
|
14163
14206
|
from: this.from
|
|
14164
14207
|
}, constants_1$1.reactiveList);
|
|
@@ -14288,19 +14331,11 @@
|
|
|
14288
14331
|
var options = getQueryOptions(this.$props);
|
|
14289
14332
|
options.from = 0;
|
|
14290
14333
|
this.$defaultQuery = newVal(null, this.$props);
|
|
14291
|
-
|
|
14292
|
-
var
|
|
14293
|
-
sort = _ref.sort,
|
|
14294
|
-
query = _ref.query;
|
|
14295
|
-
|
|
14296
|
-
if (sort) {
|
|
14297
|
-
options.sort = this.$defaultQuery.sort;
|
|
14298
|
-
}
|
|
14299
|
-
|
|
14300
|
-
var queryOptions = getOptionsFromQuery(this.$defaultQuery);
|
|
14334
|
+
var query = extractQueryFromCustomQuery(this.$defaultQuery);
|
|
14335
|
+
var queryOptions = getOptionsForCustomQuery(this.$defaultQuery);
|
|
14301
14336
|
|
|
14302
14337
|
if (queryOptions) {
|
|
14303
|
-
options = _extends({}, options,
|
|
14338
|
+
options = _extends({}, options, queryOptions);
|
|
14304
14339
|
} // Update calculated default query in store
|
|
14305
14340
|
|
|
14306
14341
|
|
|
@@ -14391,24 +14426,24 @@
|
|
|
14391
14426
|
options.from = this.$data.from;
|
|
14392
14427
|
|
|
14393
14428
|
if (this.sortOptions && this.sortOptions[this.sortOptionIndex]) {
|
|
14394
|
-
var
|
|
14429
|
+
var _ref;
|
|
14395
14430
|
|
|
14396
14431
|
var sortField = this.sortOptions[this.sortOptionIndex].dataField;
|
|
14397
14432
|
var sortBy = this.sortOptions[this.sortOptionIndex].sortBy;
|
|
14398
|
-
options.sort = [(
|
|
14433
|
+
options.sort = [(_ref = {}, _ref[sortField] = {
|
|
14399
14434
|
order: sortBy
|
|
14400
|
-
},
|
|
14435
|
+
}, _ref)]; // To handle sort options for RS API
|
|
14401
14436
|
|
|
14402
14437
|
this.updateComponentProps(this.componentId, {
|
|
14403
14438
|
dataField: sortField,
|
|
14404
14439
|
sortBy: sortBy
|
|
14405
14440
|
}, constants_1$1.reactiveList);
|
|
14406
14441
|
} else if (this.$props.sortBy) {
|
|
14407
|
-
var
|
|
14442
|
+
var _ref2;
|
|
14408
14443
|
|
|
14409
|
-
options.sort = [(
|
|
14444
|
+
options.sort = [(_ref2 = {}, _ref2[this.$props.dataField] = {
|
|
14410
14445
|
order: this.$props.sortBy
|
|
14411
|
-
},
|
|
14446
|
+
}, _ref2)];
|
|
14412
14447
|
} // Override sort query with defaultQuery's sort if defined
|
|
14413
14448
|
|
|
14414
14449
|
|
|
@@ -14416,20 +14451,13 @@
|
|
|
14416
14451
|
|
|
14417
14452
|
if (this.$props.defaultQuery) {
|
|
14418
14453
|
this.$defaultQuery = this.$props.defaultQuery();
|
|
14419
|
-
options = _extends({}, options,
|
|
14420
|
-
|
|
14421
|
-
if (this.$defaultQuery.sort) {
|
|
14422
|
-
options.sort = this.$defaultQuery.sort;
|
|
14423
|
-
} // Update calculated default query in store
|
|
14424
|
-
|
|
14454
|
+
options = _extends({}, options, getOptionsForCustomQuery(this.$defaultQuery)); // Update calculated default query in store
|
|
14425
14455
|
|
|
14426
14456
|
updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props);
|
|
14427
14457
|
} // execute is set to false at the time of mount
|
|
14428
14458
|
|
|
14429
14459
|
|
|
14430
|
-
var
|
|
14431
|
-
query = _ref4.query;
|
|
14432
|
-
|
|
14460
|
+
var query = extractQueryFromCustomQuery(this.$defaultQuery);
|
|
14433
14461
|
var execute = false;
|
|
14434
14462
|
this.setQueryOptions(this.$props.componentId, _extends({}, options, this.getAggsQuery()), execute);
|
|
14435
14463
|
|
|
@@ -14544,18 +14572,18 @@
|
|
|
14544
14572
|
}) : 0;
|
|
14545
14573
|
|
|
14546
14574
|
if (props.sortOptions[sortOptionIndex]) {
|
|
14547
|
-
var
|
|
14575
|
+
var _ref3;
|
|
14548
14576
|
|
|
14549
|
-
options.sort = [(
|
|
14577
|
+
options.sort = [(_ref3 = {}, _ref3[props.sortOptions[sortOptionIndex].dataField] = {
|
|
14550
14578
|
order: props.sortOptions[sortOptionIndex].sortBy
|
|
14551
|
-
},
|
|
14579
|
+
}, _ref3)];
|
|
14552
14580
|
}
|
|
14553
14581
|
} else if (props.sortBy) {
|
|
14554
|
-
var
|
|
14582
|
+
var _ref4;
|
|
14555
14583
|
|
|
14556
|
-
options.sort = [(
|
|
14584
|
+
options.sort = [(_ref4 = {}, _ref4[props.dataField] = {
|
|
14557
14585
|
order: props.sortBy
|
|
14558
|
-
},
|
|
14586
|
+
}, _ref4)];
|
|
14559
14587
|
}
|
|
14560
14588
|
|
|
14561
14589
|
this.setQueryOptions(this.$props.componentId, _extends({}, options, this.getAggsQuery()), true);
|
|
@@ -14658,16 +14686,16 @@
|
|
|
14658
14686
|
var index = e.target.value;
|
|
14659
14687
|
|
|
14660
14688
|
if (this.sortOptions && this.sortOptions[index]) {
|
|
14661
|
-
var
|
|
14689
|
+
var _ref5;
|
|
14662
14690
|
|
|
14663
14691
|
// This fixes issue #371 (where sorting a multi-result page with infinite loader breaks)
|
|
14664
14692
|
var options = getQueryOptions(this.$props);
|
|
14665
14693
|
options.from = 0;
|
|
14666
14694
|
var sortField = this.sortOptions[index].dataField;
|
|
14667
14695
|
var sortBy = this.sortOptions[index].sortBy;
|
|
14668
|
-
options.sort = [(
|
|
14696
|
+
options.sort = [(_ref5 = {}, _ref5[sortField] = {
|
|
14669
14697
|
order: sortBy
|
|
14670
|
-
},
|
|
14698
|
+
}, _ref5)];
|
|
14671
14699
|
this.sortOptionIndex = index; // To handle sort options for RS API
|
|
14672
14700
|
|
|
14673
14701
|
this.updateComponentProps(this.componentId, {
|
|
@@ -14675,8 +14703,11 @@
|
|
|
14675
14703
|
sortBy: sortBy
|
|
14676
14704
|
}, constants_1$1.reactiveList);
|
|
14677
14705
|
this.setQueryOptions(this.$props.componentId, options, true);
|
|
14706
|
+
this.setPage(0);
|
|
14678
14707
|
this.currentPageState = 0;
|
|
14679
14708
|
this.from = 0;
|
|
14709
|
+
var sortOption = this.$props.sortOptions[this.sortOptionIndex] ? this.$props.sortOptions[this.sortOptionIndex].label : null;
|
|
14710
|
+
this.setPageURL(this.$props.componentId + "sortOption", sortOption, this.$props.componentId + "sortOption", false, this.$props.URLParams);
|
|
14680
14711
|
}
|
|
14681
14712
|
},
|
|
14682
14713
|
triggerClickAnalytics: function triggerClickAnalytics(searchPosition, documentId) {
|
|
@@ -14788,6 +14819,7 @@
|
|
|
14788
14819
|
var mapStateToProps$1 = function mapStateToProps(state, props) {
|
|
14789
14820
|
return {
|
|
14790
14821
|
defaultPage: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value - 1,
|
|
14822
|
+
urlSortOption: state.selectedValues[props.componentId + "sortOption"] && state.selectedValues[props.componentId + "sortOption"].value,
|
|
14791
14823
|
hits: state.hits[props.componentId] && state.hits[props.componentId].hits,
|
|
14792
14824
|
rawData: state.rawData[props.componentId],
|
|
14793
14825
|
aggregationData: state.compositeAggregations[props.componentId],
|
|
@@ -14828,7 +14860,7 @@
|
|
|
14828
14860
|
options.size = size || 10;
|
|
14829
14861
|
|
|
14830
14862
|
var getSortOption = function getSortOption() {
|
|
14831
|
-
var
|
|
14863
|
+
var _ref7;
|
|
14832
14864
|
|
|
14833
14865
|
if (defaultSortOption) {
|
|
14834
14866
|
var sortOption = sortOptionsNew.find(function (option) {
|
|
@@ -14836,35 +14868,39 @@
|
|
|
14836
14868
|
});
|
|
14837
14869
|
|
|
14838
14870
|
if (sortOption) {
|
|
14839
|
-
var
|
|
14871
|
+
var _ref6;
|
|
14840
14872
|
|
|
14841
|
-
return
|
|
14873
|
+
return _ref6 = {}, _ref6[sortOption.dataField] = {
|
|
14842
14874
|
order: sortOption.sortBy
|
|
14843
|
-
},
|
|
14875
|
+
}, _ref6;
|
|
14844
14876
|
}
|
|
14845
14877
|
}
|
|
14846
14878
|
|
|
14847
|
-
return
|
|
14879
|
+
return _ref7 = {}, _ref7[sortOptionsNew[0].dataField] = {
|
|
14848
14880
|
order: sortOptionsNew[0].sortBy
|
|
14849
|
-
},
|
|
14881
|
+
}, _ref7;
|
|
14850
14882
|
};
|
|
14851
14883
|
|
|
14852
14884
|
if (sortOptionsNew) {
|
|
14853
14885
|
options.sort = [getSortOption()];
|
|
14854
14886
|
} else if (sortBy) {
|
|
14855
|
-
var
|
|
14887
|
+
var _ref8;
|
|
14856
14888
|
|
|
14857
|
-
options.sort = [(
|
|
14889
|
+
options.sort = [(_ref8 = {}, _ref8[dataField] = {
|
|
14858
14890
|
order: sortBy
|
|
14859
|
-
},
|
|
14891
|
+
}, _ref8)];
|
|
14860
14892
|
}
|
|
14861
14893
|
|
|
14862
14894
|
return options;
|
|
14863
14895
|
};
|
|
14864
14896
|
|
|
14897
|
+
ReactiveList.hasInternalComponent = function () {
|
|
14898
|
+
return true;
|
|
14899
|
+
};
|
|
14900
|
+
|
|
14865
14901
|
var RLConnected = ComponentWrapper$1(connect(mapStateToProps$1, mapDispatchtoProps)(ReactiveList), {
|
|
14866
14902
|
componentType: constants_1$1.reactiveList,
|
|
14867
|
-
internalComponent:
|
|
14903
|
+
internalComponent: ReactiveList.hasInternalComponent()
|
|
14868
14904
|
});
|
|
14869
14905
|
|
|
14870
14906
|
ReactiveList.install = function (Vue) {
|
|
@@ -14913,614 +14949,99 @@
|
|
|
14913
14949
|
var maxKeys = 1000;
|
|
14914
14950
|
|
|
14915
14951
|
if (options && typeof options.maxKeys === 'number') {
|
|
14916
|
-
maxKeys = options.maxKeys;
|
|
14917
|
-
}
|
|
14918
|
-
|
|
14919
|
-
var len = qs.length; // maxKeys <= 0 means that we should not limit keys count
|
|
14920
|
-
|
|
14921
|
-
if (maxKeys > 0 && len > maxKeys) {
|
|
14922
|
-
len = maxKeys;
|
|
14923
|
-
}
|
|
14924
|
-
|
|
14925
|
-
for (var i = 0; i < len; ++i) {
|
|
14926
|
-
var x = qs[i].replace(regexp, '%20'),
|
|
14927
|
-
idx = x.indexOf(eq),
|
|
14928
|
-
kstr,
|
|
14929
|
-
vstr,
|
|
14930
|
-
k,
|
|
14931
|
-
v;
|
|
14932
|
-
|
|
14933
|
-
if (idx >= 0) {
|
|
14934
|
-
kstr = x.substr(0, idx);
|
|
14935
|
-
vstr = x.substr(idx + 1);
|
|
14936
|
-
} else {
|
|
14937
|
-
kstr = x;
|
|
14938
|
-
vstr = '';
|
|
14939
|
-
}
|
|
14940
|
-
|
|
14941
|
-
k = decodeURIComponent(kstr);
|
|
14942
|
-
v = decodeURIComponent(vstr);
|
|
14943
|
-
|
|
14944
|
-
if (!hasOwnProperty(obj, k)) {
|
|
14945
|
-
obj[k] = v;
|
|
14946
|
-
} else if (Array.isArray(obj[k])) {
|
|
14947
|
-
obj[k].push(v);
|
|
14948
|
-
} else {
|
|
14949
|
-
obj[k] = [obj[k], v];
|
|
14950
|
-
}
|
|
14951
|
-
}
|
|
14952
|
-
|
|
14953
|
-
return obj;
|
|
14954
|
-
};
|
|
14955
|
-
|
|
14956
|
-
// Copyright Joyent, Inc. and other Node contributors.
|
|
14957
|
-
|
|
14958
|
-
var stringifyPrimitive = function stringifyPrimitive(v) {
|
|
14959
|
-
switch (typeof v) {
|
|
14960
|
-
case 'string':
|
|
14961
|
-
return v;
|
|
14962
|
-
|
|
14963
|
-
case 'boolean':
|
|
14964
|
-
return v ? 'true' : 'false';
|
|
14965
|
-
|
|
14966
|
-
case 'number':
|
|
14967
|
-
return isFinite(v) ? v : '';
|
|
14968
|
-
|
|
14969
|
-
default:
|
|
14970
|
-
return '';
|
|
14971
|
-
}
|
|
14972
|
-
};
|
|
14973
|
-
|
|
14974
|
-
var encode = function encode(obj, sep, eq, name) {
|
|
14975
|
-
sep = sep || '&';
|
|
14976
|
-
eq = eq || '=';
|
|
14977
|
-
|
|
14978
|
-
if (obj === null) {
|
|
14979
|
-
obj = undefined;
|
|
14980
|
-
}
|
|
14981
|
-
|
|
14982
|
-
if (typeof obj === 'object') {
|
|
14983
|
-
return Object.keys(obj).map(function (k) {
|
|
14984
|
-
var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;
|
|
14985
|
-
|
|
14986
|
-
if (Array.isArray(obj[k])) {
|
|
14987
|
-
return obj[k].map(function (v) {
|
|
14988
|
-
return ks + encodeURIComponent(stringifyPrimitive(v));
|
|
14989
|
-
}).join(sep);
|
|
14990
|
-
} else {
|
|
14991
|
-
return ks + encodeURIComponent(stringifyPrimitive(obj[k]));
|
|
14992
|
-
}
|
|
14993
|
-
}).filter(Boolean).join(sep);
|
|
14994
|
-
}
|
|
14995
|
-
|
|
14996
|
-
if (!name) return '';
|
|
14997
|
-
return encodeURIComponent(stringifyPrimitive(name)) + eq + encodeURIComponent(stringifyPrimitive(obj));
|
|
14998
|
-
};
|
|
14999
|
-
|
|
15000
|
-
var querystring = createCommonjsModule(function (module, exports) {
|
|
15001
|
-
|
|
15002
|
-
exports.decode = exports.parse = decode;
|
|
15003
|
-
exports.encode = exports.stringify = encode;
|
|
15004
|
-
});
|
|
15005
|
-
var querystring_1 = querystring.decode;
|
|
15006
|
-
var querystring_2 = querystring.parse;
|
|
15007
|
-
var querystring_3 = querystring.encode;
|
|
15008
|
-
var querystring_4 = querystring.stringify;
|
|
15009
|
-
|
|
15010
|
-
var browserPonyfill$1 = createCommonjsModule(function (module) {
|
|
15011
|
-
var __root__ = function (root) {
|
|
15012
|
-
function F() {
|
|
15013
|
-
this.fetch = false;
|
|
15014
|
-
}
|
|
15015
|
-
|
|
15016
|
-
F.prototype = root;
|
|
15017
|
-
return new F();
|
|
15018
|
-
}(typeof self !== 'undefined' ? self : commonjsGlobal);
|
|
15019
|
-
|
|
15020
|
-
(function (self) {
|
|
15021
|
-
(function (self) {
|
|
15022
|
-
if (self.fetch) {
|
|
15023
|
-
return;
|
|
15024
|
-
}
|
|
15025
|
-
|
|
15026
|
-
var support = {
|
|
15027
|
-
searchParams: 'URLSearchParams' in self,
|
|
15028
|
-
iterable: 'Symbol' in self && 'iterator' in Symbol,
|
|
15029
|
-
blob: 'FileReader' in self && 'Blob' in self && function () {
|
|
15030
|
-
try {
|
|
15031
|
-
new Blob();
|
|
15032
|
-
return true;
|
|
15033
|
-
} catch (e) {
|
|
15034
|
-
return false;
|
|
15035
|
-
}
|
|
15036
|
-
}(),
|
|
15037
|
-
formData: 'FormData' in self,
|
|
15038
|
-
arrayBuffer: 'ArrayBuffer' in self
|
|
15039
|
-
};
|
|
15040
|
-
|
|
15041
|
-
if (support.arrayBuffer) {
|
|
15042
|
-
var viewClasses = ['[object Int8Array]', '[object Uint8Array]', '[object Uint8ClampedArray]', '[object Int16Array]', '[object Uint16Array]', '[object Int32Array]', '[object Uint32Array]', '[object Float32Array]', '[object Float64Array]'];
|
|
15043
|
-
|
|
15044
|
-
var isDataView = function isDataView(obj) {
|
|
15045
|
-
return obj && DataView.prototype.isPrototypeOf(obj);
|
|
15046
|
-
};
|
|
15047
|
-
|
|
15048
|
-
var isArrayBufferView = ArrayBuffer.isView || function (obj) {
|
|
15049
|
-
return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1;
|
|
15050
|
-
};
|
|
15051
|
-
}
|
|
15052
|
-
|
|
15053
|
-
function normalizeName(name) {
|
|
15054
|
-
if (typeof name !== 'string') {
|
|
15055
|
-
name = String(name);
|
|
15056
|
-
}
|
|
15057
|
-
|
|
15058
|
-
if (/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(name)) {
|
|
15059
|
-
throw new TypeError('Invalid character in header field name');
|
|
15060
|
-
}
|
|
15061
|
-
|
|
15062
|
-
return name.toLowerCase();
|
|
15063
|
-
}
|
|
15064
|
-
|
|
15065
|
-
function normalizeValue(value) {
|
|
15066
|
-
if (typeof value !== 'string') {
|
|
15067
|
-
value = String(value);
|
|
15068
|
-
}
|
|
15069
|
-
|
|
15070
|
-
return value;
|
|
15071
|
-
} // Build a destructive iterator for the value list
|
|
15072
|
-
|
|
15073
|
-
|
|
15074
|
-
function iteratorFor(items) {
|
|
15075
|
-
var iterator = {
|
|
15076
|
-
next: function next() {
|
|
15077
|
-
var value = items.shift();
|
|
15078
|
-
return {
|
|
15079
|
-
done: value === undefined,
|
|
15080
|
-
value: value
|
|
15081
|
-
};
|
|
15082
|
-
}
|
|
15083
|
-
};
|
|
15084
|
-
|
|
15085
|
-
if (support.iterable) {
|
|
15086
|
-
iterator[Symbol.iterator] = function () {
|
|
15087
|
-
return iterator;
|
|
15088
|
-
};
|
|
15089
|
-
}
|
|
15090
|
-
|
|
15091
|
-
return iterator;
|
|
15092
|
-
}
|
|
15093
|
-
|
|
15094
|
-
function Headers(headers) {
|
|
15095
|
-
this.map = {};
|
|
15096
|
-
|
|
15097
|
-
if (headers instanceof Headers) {
|
|
15098
|
-
headers.forEach(function (value, name) {
|
|
15099
|
-
this.append(name, value);
|
|
15100
|
-
}, this);
|
|
15101
|
-
} else if (Array.isArray(headers)) {
|
|
15102
|
-
headers.forEach(function (header) {
|
|
15103
|
-
this.append(header[0], header[1]);
|
|
15104
|
-
}, this);
|
|
15105
|
-
} else if (headers) {
|
|
15106
|
-
Object.getOwnPropertyNames(headers).forEach(function (name) {
|
|
15107
|
-
this.append(name, headers[name]);
|
|
15108
|
-
}, this);
|
|
15109
|
-
}
|
|
15110
|
-
}
|
|
15111
|
-
|
|
15112
|
-
Headers.prototype.append = function (name, value) {
|
|
15113
|
-
name = normalizeName(name);
|
|
15114
|
-
value = normalizeValue(value);
|
|
15115
|
-
var oldValue = this.map[name];
|
|
15116
|
-
this.map[name] = oldValue ? oldValue + ',' + value : value;
|
|
15117
|
-
};
|
|
15118
|
-
|
|
15119
|
-
Headers.prototype['delete'] = function (name) {
|
|
15120
|
-
delete this.map[normalizeName(name)];
|
|
15121
|
-
};
|
|
15122
|
-
|
|
15123
|
-
Headers.prototype.get = function (name) {
|
|
15124
|
-
name = normalizeName(name);
|
|
15125
|
-
return this.has(name) ? this.map[name] : null;
|
|
15126
|
-
};
|
|
15127
|
-
|
|
15128
|
-
Headers.prototype.has = function (name) {
|
|
15129
|
-
return this.map.hasOwnProperty(normalizeName(name));
|
|
15130
|
-
};
|
|
15131
|
-
|
|
15132
|
-
Headers.prototype.set = function (name, value) {
|
|
15133
|
-
this.map[normalizeName(name)] = normalizeValue(value);
|
|
15134
|
-
};
|
|
15135
|
-
|
|
15136
|
-
Headers.prototype.forEach = function (callback, thisArg) {
|
|
15137
|
-
for (var name in this.map) {
|
|
15138
|
-
if (this.map.hasOwnProperty(name)) {
|
|
15139
|
-
callback.call(thisArg, this.map[name], name, this);
|
|
15140
|
-
}
|
|
15141
|
-
}
|
|
15142
|
-
};
|
|
15143
|
-
|
|
15144
|
-
Headers.prototype.keys = function () {
|
|
15145
|
-
var items = [];
|
|
15146
|
-
this.forEach(function (value, name) {
|
|
15147
|
-
items.push(name);
|
|
15148
|
-
});
|
|
15149
|
-
return iteratorFor(items);
|
|
15150
|
-
};
|
|
15151
|
-
|
|
15152
|
-
Headers.prototype.values = function () {
|
|
15153
|
-
var items = [];
|
|
15154
|
-
this.forEach(function (value) {
|
|
15155
|
-
items.push(value);
|
|
15156
|
-
});
|
|
15157
|
-
return iteratorFor(items);
|
|
15158
|
-
};
|
|
15159
|
-
|
|
15160
|
-
Headers.prototype.entries = function () {
|
|
15161
|
-
var items = [];
|
|
15162
|
-
this.forEach(function (value, name) {
|
|
15163
|
-
items.push([name, value]);
|
|
15164
|
-
});
|
|
15165
|
-
return iteratorFor(items);
|
|
15166
|
-
};
|
|
15167
|
-
|
|
15168
|
-
if (support.iterable) {
|
|
15169
|
-
Headers.prototype[Symbol.iterator] = Headers.prototype.entries;
|
|
15170
|
-
}
|
|
15171
|
-
|
|
15172
|
-
function consumed(body) {
|
|
15173
|
-
if (body.bodyUsed) {
|
|
15174
|
-
return Promise.reject(new TypeError('Already read'));
|
|
15175
|
-
}
|
|
15176
|
-
|
|
15177
|
-
body.bodyUsed = true;
|
|
15178
|
-
}
|
|
15179
|
-
|
|
15180
|
-
function fileReaderReady(reader) {
|
|
15181
|
-
return new Promise(function (resolve, reject) {
|
|
15182
|
-
reader.onload = function () {
|
|
15183
|
-
resolve(reader.result);
|
|
15184
|
-
};
|
|
15185
|
-
|
|
15186
|
-
reader.onerror = function () {
|
|
15187
|
-
reject(reader.error);
|
|
15188
|
-
};
|
|
15189
|
-
});
|
|
15190
|
-
}
|
|
15191
|
-
|
|
15192
|
-
function readBlobAsArrayBuffer(blob) {
|
|
15193
|
-
var reader = new FileReader();
|
|
15194
|
-
var promise = fileReaderReady(reader);
|
|
15195
|
-
reader.readAsArrayBuffer(blob);
|
|
15196
|
-
return promise;
|
|
15197
|
-
}
|
|
15198
|
-
|
|
15199
|
-
function readBlobAsText(blob) {
|
|
15200
|
-
var reader = new FileReader();
|
|
15201
|
-
var promise = fileReaderReady(reader);
|
|
15202
|
-
reader.readAsText(blob);
|
|
15203
|
-
return promise;
|
|
15204
|
-
}
|
|
15205
|
-
|
|
15206
|
-
function readArrayBufferAsText(buf) {
|
|
15207
|
-
var view = new Uint8Array(buf);
|
|
15208
|
-
var chars = new Array(view.length);
|
|
15209
|
-
|
|
15210
|
-
for (var i = 0; i < view.length; i++) {
|
|
15211
|
-
chars[i] = String.fromCharCode(view[i]);
|
|
15212
|
-
}
|
|
15213
|
-
|
|
15214
|
-
return chars.join('');
|
|
15215
|
-
}
|
|
15216
|
-
|
|
15217
|
-
function bufferClone(buf) {
|
|
15218
|
-
if (buf.slice) {
|
|
15219
|
-
return buf.slice(0);
|
|
15220
|
-
} else {
|
|
15221
|
-
var view = new Uint8Array(buf.byteLength);
|
|
15222
|
-
view.set(new Uint8Array(buf));
|
|
15223
|
-
return view.buffer;
|
|
15224
|
-
}
|
|
15225
|
-
}
|
|
15226
|
-
|
|
15227
|
-
function Body() {
|
|
15228
|
-
this.bodyUsed = false;
|
|
15229
|
-
|
|
15230
|
-
this._initBody = function (body) {
|
|
15231
|
-
this._bodyInit = body;
|
|
15232
|
-
|
|
15233
|
-
if (!body) {
|
|
15234
|
-
this._bodyText = '';
|
|
15235
|
-
} else if (typeof body === 'string') {
|
|
15236
|
-
this._bodyText = body;
|
|
15237
|
-
} else if (support.blob && Blob.prototype.isPrototypeOf(body)) {
|
|
15238
|
-
this._bodyBlob = body;
|
|
15239
|
-
} else if (support.formData && FormData.prototype.isPrototypeOf(body)) {
|
|
15240
|
-
this._bodyFormData = body;
|
|
15241
|
-
} else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
|
|
15242
|
-
this._bodyText = body.toString();
|
|
15243
|
-
} else if (support.arrayBuffer && support.blob && isDataView(body)) {
|
|
15244
|
-
this._bodyArrayBuffer = bufferClone(body.buffer); // IE 10-11 can't handle a DataView body.
|
|
15245
|
-
|
|
15246
|
-
this._bodyInit = new Blob([this._bodyArrayBuffer]);
|
|
15247
|
-
} else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {
|
|
15248
|
-
this._bodyArrayBuffer = bufferClone(body);
|
|
15249
|
-
} else {
|
|
15250
|
-
throw new Error('unsupported BodyInit type');
|
|
15251
|
-
}
|
|
15252
|
-
|
|
15253
|
-
if (!this.headers.get('content-type')) {
|
|
15254
|
-
if (typeof body === 'string') {
|
|
15255
|
-
this.headers.set('content-type', 'text/plain;charset=UTF-8');
|
|
15256
|
-
} else if (this._bodyBlob && this._bodyBlob.type) {
|
|
15257
|
-
this.headers.set('content-type', this._bodyBlob.type);
|
|
15258
|
-
} else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
|
|
15259
|
-
this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');
|
|
15260
|
-
}
|
|
15261
|
-
}
|
|
15262
|
-
};
|
|
15263
|
-
|
|
15264
|
-
if (support.blob) {
|
|
15265
|
-
this.blob = function () {
|
|
15266
|
-
var rejected = consumed(this);
|
|
15267
|
-
|
|
15268
|
-
if (rejected) {
|
|
15269
|
-
return rejected;
|
|
15270
|
-
}
|
|
15271
|
-
|
|
15272
|
-
if (this._bodyBlob) {
|
|
15273
|
-
return Promise.resolve(this._bodyBlob);
|
|
15274
|
-
} else if (this._bodyArrayBuffer) {
|
|
15275
|
-
return Promise.resolve(new Blob([this._bodyArrayBuffer]));
|
|
15276
|
-
} else if (this._bodyFormData) {
|
|
15277
|
-
throw new Error('could not read FormData body as blob');
|
|
15278
|
-
} else {
|
|
15279
|
-
return Promise.resolve(new Blob([this._bodyText]));
|
|
15280
|
-
}
|
|
15281
|
-
};
|
|
15282
|
-
|
|
15283
|
-
this.arrayBuffer = function () {
|
|
15284
|
-
if (this._bodyArrayBuffer) {
|
|
15285
|
-
return consumed(this) || Promise.resolve(this._bodyArrayBuffer);
|
|
15286
|
-
} else {
|
|
15287
|
-
return this.blob().then(readBlobAsArrayBuffer);
|
|
15288
|
-
}
|
|
15289
|
-
};
|
|
15290
|
-
}
|
|
15291
|
-
|
|
15292
|
-
this.text = function () {
|
|
15293
|
-
var rejected = consumed(this);
|
|
15294
|
-
|
|
15295
|
-
if (rejected) {
|
|
15296
|
-
return rejected;
|
|
15297
|
-
}
|
|
15298
|
-
|
|
15299
|
-
if (this._bodyBlob) {
|
|
15300
|
-
return readBlobAsText(this._bodyBlob);
|
|
15301
|
-
} else if (this._bodyArrayBuffer) {
|
|
15302
|
-
return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer));
|
|
15303
|
-
} else if (this._bodyFormData) {
|
|
15304
|
-
throw new Error('could not read FormData body as text');
|
|
15305
|
-
} else {
|
|
15306
|
-
return Promise.resolve(this._bodyText);
|
|
15307
|
-
}
|
|
15308
|
-
};
|
|
15309
|
-
|
|
15310
|
-
if (support.formData) {
|
|
15311
|
-
this.formData = function () {
|
|
15312
|
-
return this.text().then(decode);
|
|
15313
|
-
};
|
|
15314
|
-
}
|
|
15315
|
-
|
|
15316
|
-
this.json = function () {
|
|
15317
|
-
return this.text().then(JSON.parse);
|
|
15318
|
-
};
|
|
15319
|
-
|
|
15320
|
-
return this;
|
|
15321
|
-
} // HTTP methods whose capitalization should be normalized
|
|
15322
|
-
|
|
15323
|
-
|
|
15324
|
-
var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'];
|
|
15325
|
-
|
|
15326
|
-
function normalizeMethod(method) {
|
|
15327
|
-
var upcased = method.toUpperCase();
|
|
15328
|
-
return methods.indexOf(upcased) > -1 ? upcased : method;
|
|
15329
|
-
}
|
|
15330
|
-
|
|
15331
|
-
function Request(input, options) {
|
|
15332
|
-
options = options || {};
|
|
15333
|
-
var body = options.body;
|
|
15334
|
-
|
|
15335
|
-
if (input instanceof Request) {
|
|
15336
|
-
if (input.bodyUsed) {
|
|
15337
|
-
throw new TypeError('Already read');
|
|
15338
|
-
}
|
|
15339
|
-
|
|
15340
|
-
this.url = input.url;
|
|
15341
|
-
this.credentials = input.credentials;
|
|
15342
|
-
|
|
15343
|
-
if (!options.headers) {
|
|
15344
|
-
this.headers = new Headers(input.headers);
|
|
15345
|
-
}
|
|
15346
|
-
|
|
15347
|
-
this.method = input.method;
|
|
15348
|
-
this.mode = input.mode;
|
|
15349
|
-
|
|
15350
|
-
if (!body && input._bodyInit != null) {
|
|
15351
|
-
body = input._bodyInit;
|
|
15352
|
-
input.bodyUsed = true;
|
|
15353
|
-
}
|
|
15354
|
-
} else {
|
|
15355
|
-
this.url = String(input);
|
|
15356
|
-
}
|
|
15357
|
-
|
|
15358
|
-
this.credentials = options.credentials || this.credentials || 'omit';
|
|
15359
|
-
|
|
15360
|
-
if (options.headers || !this.headers) {
|
|
15361
|
-
this.headers = new Headers(options.headers);
|
|
15362
|
-
}
|
|
15363
|
-
|
|
15364
|
-
this.method = normalizeMethod(options.method || this.method || 'GET');
|
|
15365
|
-
this.mode = options.mode || this.mode || null;
|
|
15366
|
-
this.referrer = null;
|
|
15367
|
-
|
|
15368
|
-
if ((this.method === 'GET' || this.method === 'HEAD') && body) {
|
|
15369
|
-
throw new TypeError('Body not allowed for GET or HEAD requests');
|
|
15370
|
-
}
|
|
15371
|
-
|
|
15372
|
-
this._initBody(body);
|
|
15373
|
-
}
|
|
15374
|
-
|
|
15375
|
-
Request.prototype.clone = function () {
|
|
15376
|
-
return new Request(this, {
|
|
15377
|
-
body: this._bodyInit
|
|
15378
|
-
});
|
|
15379
|
-
};
|
|
15380
|
-
|
|
15381
|
-
function decode(body) {
|
|
15382
|
-
var form = new FormData();
|
|
15383
|
-
body.trim().split('&').forEach(function (bytes) {
|
|
15384
|
-
if (bytes) {
|
|
15385
|
-
var split = bytes.split('=');
|
|
15386
|
-
var name = split.shift().replace(/\+/g, ' ');
|
|
15387
|
-
var value = split.join('=').replace(/\+/g, ' ');
|
|
15388
|
-
form.append(decodeURIComponent(name), decodeURIComponent(value));
|
|
15389
|
-
}
|
|
15390
|
-
});
|
|
15391
|
-
return form;
|
|
15392
|
-
}
|
|
15393
|
-
|
|
15394
|
-
function parseHeaders(rawHeaders) {
|
|
15395
|
-
var headers = new Headers(); // Replace instances of \r\n and \n followed by at least one space or horizontal tab with a space
|
|
15396
|
-
// https://tools.ietf.org/html/rfc7230#section-3.2
|
|
15397
|
-
|
|
15398
|
-
var preProcessedHeaders = rawHeaders.replace(/\r?\n[\t ]+/g, ' ');
|
|
15399
|
-
preProcessedHeaders.split(/\r?\n/).forEach(function (line) {
|
|
15400
|
-
var parts = line.split(':');
|
|
15401
|
-
var key = parts.shift().trim();
|
|
15402
|
-
|
|
15403
|
-
if (key) {
|
|
15404
|
-
var value = parts.join(':').trim();
|
|
15405
|
-
headers.append(key, value);
|
|
15406
|
-
}
|
|
15407
|
-
});
|
|
15408
|
-
return headers;
|
|
15409
|
-
}
|
|
15410
|
-
|
|
15411
|
-
Body.call(Request.prototype);
|
|
15412
|
-
|
|
15413
|
-
function Response(bodyInit, options) {
|
|
15414
|
-
if (!options) {
|
|
15415
|
-
options = {};
|
|
15416
|
-
}
|
|
15417
|
-
|
|
15418
|
-
this.type = 'default';
|
|
15419
|
-
this.status = options.status === undefined ? 200 : options.status;
|
|
15420
|
-
this.ok = this.status >= 200 && this.status < 300;
|
|
15421
|
-
this.statusText = 'statusText' in options ? options.statusText : 'OK';
|
|
15422
|
-
this.headers = new Headers(options.headers);
|
|
15423
|
-
this.url = options.url || '';
|
|
15424
|
-
|
|
15425
|
-
this._initBody(bodyInit);
|
|
15426
|
-
}
|
|
15427
|
-
|
|
15428
|
-
Body.call(Response.prototype);
|
|
15429
|
-
|
|
15430
|
-
Response.prototype.clone = function () {
|
|
15431
|
-
return new Response(this._bodyInit, {
|
|
15432
|
-
status: this.status,
|
|
15433
|
-
statusText: this.statusText,
|
|
15434
|
-
headers: new Headers(this.headers),
|
|
15435
|
-
url: this.url
|
|
15436
|
-
});
|
|
15437
|
-
};
|
|
15438
|
-
|
|
15439
|
-
Response.error = function () {
|
|
15440
|
-
var response = new Response(null, {
|
|
15441
|
-
status: 0,
|
|
15442
|
-
statusText: ''
|
|
15443
|
-
});
|
|
15444
|
-
response.type = 'error';
|
|
15445
|
-
return response;
|
|
15446
|
-
};
|
|
14952
|
+
maxKeys = options.maxKeys;
|
|
14953
|
+
}
|
|
15447
14954
|
|
|
15448
|
-
|
|
14955
|
+
var len = qs.length; // maxKeys <= 0 means that we should not limit keys count
|
|
15449
14956
|
|
|
15450
|
-
|
|
15451
|
-
|
|
15452
|
-
|
|
15453
|
-
}
|
|
14957
|
+
if (maxKeys > 0 && len > maxKeys) {
|
|
14958
|
+
len = maxKeys;
|
|
14959
|
+
}
|
|
15454
14960
|
|
|
15455
|
-
|
|
15456
|
-
|
|
15457
|
-
|
|
15458
|
-
|
|
15459
|
-
|
|
15460
|
-
|
|
15461
|
-
|
|
14961
|
+
for (var i = 0; i < len; ++i) {
|
|
14962
|
+
var x = qs[i].replace(regexp, '%20'),
|
|
14963
|
+
idx = x.indexOf(eq),
|
|
14964
|
+
kstr,
|
|
14965
|
+
vstr,
|
|
14966
|
+
k,
|
|
14967
|
+
v;
|
|
15462
14968
|
|
|
15463
|
-
|
|
15464
|
-
|
|
15465
|
-
|
|
14969
|
+
if (idx >= 0) {
|
|
14970
|
+
kstr = x.substr(0, idx);
|
|
14971
|
+
vstr = x.substr(idx + 1);
|
|
14972
|
+
} else {
|
|
14973
|
+
kstr = x;
|
|
14974
|
+
vstr = '';
|
|
14975
|
+
}
|
|
15466
14976
|
|
|
15467
|
-
|
|
15468
|
-
|
|
15469
|
-
var request = new Request(input, init);
|
|
15470
|
-
var xhr = new XMLHttpRequest();
|
|
14977
|
+
k = decodeURIComponent(kstr);
|
|
14978
|
+
v = decodeURIComponent(vstr);
|
|
15471
14979
|
|
|
15472
|
-
|
|
15473
|
-
|
|
15474
|
-
|
|
15475
|
-
|
|
15476
|
-
|
|
15477
|
-
|
|
15478
|
-
|
|
15479
|
-
|
|
15480
|
-
resolve(new Response(body, options));
|
|
15481
|
-
};
|
|
14980
|
+
if (!hasOwnProperty(obj, k)) {
|
|
14981
|
+
obj[k] = v;
|
|
14982
|
+
} else if (Array.isArray(obj[k])) {
|
|
14983
|
+
obj[k].push(v);
|
|
14984
|
+
} else {
|
|
14985
|
+
obj[k] = [obj[k], v];
|
|
14986
|
+
}
|
|
14987
|
+
}
|
|
15482
14988
|
|
|
15483
|
-
|
|
15484
|
-
|
|
15485
|
-
};
|
|
14989
|
+
return obj;
|
|
14990
|
+
};
|
|
15486
14991
|
|
|
15487
|
-
|
|
15488
|
-
reject(new TypeError('Network request failed'));
|
|
15489
|
-
};
|
|
14992
|
+
// Copyright Joyent, Inc. and other Node contributors.
|
|
15490
14993
|
|
|
15491
|
-
|
|
14994
|
+
var stringifyPrimitive = function stringifyPrimitive(v) {
|
|
14995
|
+
switch (typeof v) {
|
|
14996
|
+
case 'string':
|
|
14997
|
+
return v;
|
|
15492
14998
|
|
|
15493
|
-
|
|
15494
|
-
|
|
15495
|
-
} else if (request.credentials === 'omit') {
|
|
15496
|
-
xhr.withCredentials = false;
|
|
15497
|
-
}
|
|
14999
|
+
case 'boolean':
|
|
15000
|
+
return v ? 'true' : 'false';
|
|
15498
15001
|
|
|
15499
|
-
|
|
15500
|
-
|
|
15501
|
-
}
|
|
15002
|
+
case 'number':
|
|
15003
|
+
return isFinite(v) ? v : '';
|
|
15502
15004
|
|
|
15503
|
-
|
|
15504
|
-
|
|
15505
|
-
|
|
15506
|
-
|
|
15507
|
-
|
|
15508
|
-
|
|
15005
|
+
default:
|
|
15006
|
+
return '';
|
|
15007
|
+
}
|
|
15008
|
+
};
|
|
15009
|
+
|
|
15010
|
+
var encode = function encode(obj, sep, eq, name) {
|
|
15011
|
+
sep = sep || '&';
|
|
15012
|
+
eq = eq || '=';
|
|
15509
15013
|
|
|
15510
|
-
|
|
15511
|
-
|
|
15512
|
-
}
|
|
15513
|
-
var fetch = __root__.fetch;
|
|
15514
|
-
var Response = fetch.Response = __root__.Response;
|
|
15515
|
-
var Request = fetch.Request = __root__.Request;
|
|
15516
|
-
var Headers = fetch.Headers = __root__.Headers;
|
|
15014
|
+
if (obj === null) {
|
|
15015
|
+
obj = undefined;
|
|
15016
|
+
}
|
|
15517
15017
|
|
|
15518
|
-
if (
|
|
15519
|
-
|
|
15018
|
+
if (typeof obj === 'object') {
|
|
15019
|
+
return Object.keys(obj).map(function (k) {
|
|
15020
|
+
var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;
|
|
15520
15021
|
|
|
15521
|
-
|
|
15022
|
+
if (Array.isArray(obj[k])) {
|
|
15023
|
+
return obj[k].map(function (v) {
|
|
15024
|
+
return ks + encodeURIComponent(stringifyPrimitive(v));
|
|
15025
|
+
}).join(sep);
|
|
15026
|
+
} else {
|
|
15027
|
+
return ks + encodeURIComponent(stringifyPrimitive(obj[k]));
|
|
15028
|
+
}
|
|
15029
|
+
}).filter(Boolean).join(sep);
|
|
15522
15030
|
}
|
|
15031
|
+
|
|
15032
|
+
if (!name) return '';
|
|
15033
|
+
return encodeURIComponent(stringifyPrimitive(name)) + eq + encodeURIComponent(stringifyPrimitive(obj));
|
|
15034
|
+
};
|
|
15035
|
+
|
|
15036
|
+
var querystring = createCommonjsModule(function (module, exports) {
|
|
15037
|
+
|
|
15038
|
+
exports.decode = exports.parse = decode;
|
|
15039
|
+
exports.encode = exports.stringify = encode;
|
|
15523
15040
|
});
|
|
15041
|
+
var querystring_1 = querystring.decode;
|
|
15042
|
+
var querystring_2 = querystring.parse;
|
|
15043
|
+
var querystring_3 = querystring.encode;
|
|
15044
|
+
var querystring_4 = querystring.stringify;
|
|
15524
15045
|
|
|
15525
15046
|
var _typeof$1 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
|
|
15526
15047
|
return typeof obj;
|
|
@@ -15852,17 +15373,10 @@
|
|
|
15852
15373
|
}
|
|
15853
15374
|
|
|
15854
15375
|
var credentials = auth || null;
|
|
15855
|
-
|
|
15856
|
-
if (!config.mongodb) {
|
|
15857
|
-
if (isAppbase(url) && credentials === null) {
|
|
15858
|
-
throw new Error('Authentication information is not present. Did you add credentials?');
|
|
15859
|
-
}
|
|
15860
|
-
}
|
|
15861
15376
|
/**
|
|
15862
15377
|
* Credentials can be provided as a part of the URL,
|
|
15863
15378
|
* as username, password args or as a credentials argument directly */
|
|
15864
15379
|
|
|
15865
|
-
|
|
15866
15380
|
if (typeof config.credentials === 'string' && config.credentials !== '') {
|
|
15867
15381
|
// eslint-disable-next-line
|
|
15868
15382
|
credentials = config.credentials;
|
|
@@ -15870,6 +15384,12 @@
|
|
|
15870
15384
|
credentials = config.username + ':' + config.password;
|
|
15871
15385
|
}
|
|
15872
15386
|
|
|
15387
|
+
if (!config.mongodb) {
|
|
15388
|
+
if (isAppbase(url) && credentials === null) {
|
|
15389
|
+
throw new Error('Authentication information is not present. Did you add credentials?');
|
|
15390
|
+
}
|
|
15391
|
+
}
|
|
15392
|
+
|
|
15873
15393
|
this.url = url;
|
|
15874
15394
|
this.protocol = protocol;
|
|
15875
15395
|
this.app = config.app;
|
|
@@ -15967,7 +15487,7 @@
|
|
|
15967
15487
|
var transformedRequest = Object.assign({}, ts);
|
|
15968
15488
|
var url = transformedRequest.url;
|
|
15969
15489
|
delete transformedRequest.url;
|
|
15970
|
-
return
|
|
15490
|
+
return fetch$1(url || finalURL, Object.assign({}, transformedRequest, {
|
|
15971
15491
|
// apply timestamp header for RS API
|
|
15972
15492
|
headers: isRSAPI && !isMongoRequest ? Object.assign({}, transformedRequest.headers, {
|
|
15973
15493
|
'x-timestamp': new Date().getTime()
|
|
@@ -17223,14 +16743,14 @@
|
|
|
17223
16743
|
this.updateState(this.$props);
|
|
17224
16744
|
},
|
|
17225
16745
|
analyticsConfig: function analyticsConfig(newVal, oldVal) {
|
|
17226
|
-
if (!
|
|
16746
|
+
if (!helper_22(newVal, oldVal)) {
|
|
17227
16747
|
if (this.store) {
|
|
17228
16748
|
this.store.dispatch(analytics_3$1(newVal));
|
|
17229
16749
|
}
|
|
17230
16750
|
}
|
|
17231
16751
|
},
|
|
17232
16752
|
appbaseConfig: function appbaseConfig(newVal, oldVal) {
|
|
17233
|
-
if (!
|
|
16753
|
+
if (!helper_22(newVal, oldVal)) {
|
|
17234
16754
|
if (this.store) {
|
|
17235
16755
|
this.store.dispatch(analytics_3$1(newVal));
|
|
17236
16756
|
}
|
|
@@ -19871,7 +19391,8 @@
|
|
|
19871
19391
|
var debounce$1 = lib_8.debounce,
|
|
19872
19392
|
checkValueChange = lib_8.checkValueChange,
|
|
19873
19393
|
getClassName$3 = lib_8.getClassName,
|
|
19874
|
-
|
|
19394
|
+
extractQueryFromCustomQuery$1 = lib_8.extractQueryFromCustomQuery,
|
|
19395
|
+
getOptionsForCustomQuery$1 = lib_8.getOptionsForCustomQuery,
|
|
19875
19396
|
isEqual$4 = lib_8.isEqual,
|
|
19876
19397
|
getCompositeAggsQuery$1 = lib_8.getCompositeAggsQuery,
|
|
19877
19398
|
withClickIds = lib_8.withClickIds,
|
|
@@ -20233,7 +19754,7 @@
|
|
|
20233
19754
|
// returns size and aggs property
|
|
20234
19755
|
getBasicQueryOptions: function getBasicQueryOptions() {
|
|
20235
19756
|
var aggregationField = this.$props.aggregationField;
|
|
20236
|
-
var queryOptions =
|
|
19757
|
+
var queryOptions = helper_24(this.$props);
|
|
20237
19758
|
|
|
20238
19759
|
if (aggregationField) {
|
|
20239
19760
|
queryOptions.aggs = getCompositeAggsQuery$1({
|
|
@@ -20329,12 +19850,13 @@
|
|
|
20329
19850
|
|
|
20330
19851
|
if (this.defaultQuery) {
|
|
20331
19852
|
var defaultQueryToBeSet = this.defaultQuery(value, props) || {};
|
|
19853
|
+
var defaultQueryObj = extractQueryFromCustomQuery$1(defaultQueryToBeSet);
|
|
20332
19854
|
|
|
20333
|
-
if (
|
|
20334
|
-
query =
|
|
19855
|
+
if (defaultQueryObj) {
|
|
19856
|
+
query = defaultQueryObj;
|
|
20335
19857
|
}
|
|
20336
19858
|
|
|
20337
|
-
defaultQueryOptions =
|
|
19859
|
+
defaultQueryOptions = getOptionsForCustomQuery$1(defaultQueryToBeSet); // Update calculated default query in store
|
|
20338
19860
|
|
|
20339
19861
|
updateDefaultQuery(props.componentId, this.setDefaultQuery, props, value);
|
|
20340
19862
|
}
|
|
@@ -20358,13 +19880,13 @@
|
|
|
20358
19880
|
|
|
20359
19881
|
if (customQuery) {
|
|
20360
19882
|
var customQueryTobeSet = customQuery(value, props);
|
|
20361
|
-
var queryTobeSet = customQueryTobeSet
|
|
19883
|
+
var queryTobeSet = extractQueryFromCustomQuery$1(customQueryTobeSet);
|
|
20362
19884
|
|
|
20363
19885
|
if (queryTobeSet) {
|
|
20364
19886
|
query = queryTobeSet;
|
|
20365
19887
|
}
|
|
20366
19888
|
|
|
20367
|
-
customQueryOptions =
|
|
19889
|
+
customQueryOptions = getOptionsForCustomQuery$1(customQueryTobeSet);
|
|
20368
19890
|
updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
|
|
20369
19891
|
this.setQueryOptions(componentId, _extends({}, this.queryOptions, customQueryOptions), false);
|
|
20370
19892
|
}
|
|
@@ -21053,6 +20575,10 @@
|
|
|
21053
20575
|
};
|
|
21054
20576
|
};
|
|
21055
20577
|
|
|
20578
|
+
DataSearch.hasInternalComponent = function () {
|
|
20579
|
+
return true;
|
|
20580
|
+
};
|
|
20581
|
+
|
|
21056
20582
|
var mapStateToProps$3 = function mapStateToProps(state, props) {
|
|
21057
20583
|
return {
|
|
21058
20584
|
selectedValue: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value || null,
|
|
@@ -21090,7 +20616,7 @@
|
|
|
21090
20616
|
};
|
|
21091
20617
|
var DSConnected = ComponentWrapper$1(connect(mapStateToProps$3, mapDispatchToProps$2)(DataSearch), {
|
|
21092
20618
|
componentType: constants_1$1.dataSearch,
|
|
21093
|
-
internalComponent:
|
|
20619
|
+
internalComponent: DataSearch.hasInternalComponent()
|
|
21094
20620
|
});
|
|
21095
20621
|
|
|
21096
20622
|
DataSearch.install = function (Vue) {
|
|
@@ -21198,8 +20724,9 @@
|
|
|
21198
20724
|
var getQueryOptions$1 = lib_8.getQueryOptions,
|
|
21199
20725
|
checkValueChange$1 = lib_8.checkValueChange,
|
|
21200
20726
|
getClassName$4 = lib_8.getClassName,
|
|
21201
|
-
|
|
21202
|
-
|
|
20727
|
+
isEqual$5 = lib_8.isEqual,
|
|
20728
|
+
extractQueryFromCustomQuery$2 = lib_8.extractQueryFromCustomQuery,
|
|
20729
|
+
getOptionsForCustomQuery$2 = lib_8.getOptionsForCustomQuery;
|
|
21203
20730
|
var SingleList = {
|
|
21204
20731
|
name: 'SingleList',
|
|
21205
20732
|
props: {
|
|
@@ -21441,12 +20968,13 @@
|
|
|
21441
20968
|
|
|
21442
20969
|
if (this.defaultQuery) {
|
|
21443
20970
|
var defaultQueryToBeSet = this.defaultQuery(value, props) || {};
|
|
20971
|
+
var defaultQueryObj = extractQueryFromCustomQuery$2(defaultQueryToBeSet);
|
|
21444
20972
|
|
|
21445
|
-
if (
|
|
21446
|
-
query =
|
|
20973
|
+
if (defaultQueryObj) {
|
|
20974
|
+
query = defaultQueryObj;
|
|
21447
20975
|
}
|
|
21448
20976
|
|
|
21449
|
-
defaultQueryOptions =
|
|
20977
|
+
defaultQueryOptions = getOptionsForCustomQuery$2(defaultQueryToBeSet); // Update calculated default query in store
|
|
21450
20978
|
|
|
21451
20979
|
updateDefaultQuery(props.componentId, this.setDefaultQuery, props, value);
|
|
21452
20980
|
}
|
|
@@ -21465,10 +20993,9 @@
|
|
|
21465
20993
|
var customQueryOptions;
|
|
21466
20994
|
|
|
21467
20995
|
if (customQuery) {
|
|
21468
|
-
var
|
|
21469
|
-
|
|
21470
|
-
|
|
21471
|
-
customQueryOptions = getOptionsFromQuery$2(customQuery(value, props));
|
|
20996
|
+
var customQueryCalc = customQuery(value, props);
|
|
20997
|
+
query = extractQueryFromCustomQuery$2(customQueryCalc);
|
|
20998
|
+
customQueryOptions = getOptionsForCustomQuery$2(customQueryCalc);
|
|
21472
20999
|
updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
|
|
21473
21000
|
}
|
|
21474
21001
|
|
|
@@ -21492,7 +21019,7 @@
|
|
|
21492
21019
|
|
|
21493
21020
|
if (props.defaultQuery) {
|
|
21494
21021
|
var value = this.$data.currentValue;
|
|
21495
|
-
var defaultQueryOptions =
|
|
21022
|
+
var defaultQueryOptions = getOptionsForCustomQuery$2(props.defaultQuery(value, props));
|
|
21496
21023
|
this.setQueryOptions(this.internalComponent, _extends({}, queryOptions, defaultQueryOptions));
|
|
21497
21024
|
} else {
|
|
21498
21025
|
this.setQueryOptions(this.internalComponent, queryOptions);
|
|
@@ -21637,6 +21164,10 @@
|
|
|
21637
21164
|
return query;
|
|
21638
21165
|
};
|
|
21639
21166
|
|
|
21167
|
+
SingleList.hasInternalComponent = function () {
|
|
21168
|
+
return true;
|
|
21169
|
+
};
|
|
21170
|
+
|
|
21640
21171
|
var mapStateToProps$4 = function mapStateToProps(state, props) {
|
|
21641
21172
|
return {
|
|
21642
21173
|
options: props.nestedField && state.aggregations[props.componentId] ? state.aggregations[props.componentId].reactivesearch_nested : state.aggregations[props.componentId],
|
|
@@ -21658,7 +21189,7 @@
|
|
|
21658
21189
|
};
|
|
21659
21190
|
var ListConnected = ComponentWrapper$1(connect(mapStateToProps$4, mapDispatchtoProps$2)(SingleList), {
|
|
21660
21191
|
componentType: constants_1$1.singleList,
|
|
21661
|
-
internalComponent:
|
|
21192
|
+
internalComponent: SingleList.hasInternalComponent()
|
|
21662
21193
|
});
|
|
21663
21194
|
|
|
21664
21195
|
SingleList.install = function (Vue) {
|
|
@@ -21676,7 +21207,8 @@
|
|
|
21676
21207
|
getQueryOptions$2 = lib_8.getQueryOptions,
|
|
21677
21208
|
checkValueChange$2 = lib_8.checkValueChange,
|
|
21678
21209
|
getClassName$5 = lib_8.getClassName,
|
|
21679
|
-
|
|
21210
|
+
extractQueryFromCustomQuery$3 = lib_8.extractQueryFromCustomQuery,
|
|
21211
|
+
getOptionsForCustomQuery$3 = lib_8.getOptionsForCustomQuery;
|
|
21680
21212
|
var MultiList = {
|
|
21681
21213
|
name: 'MultiList',
|
|
21682
21214
|
props: {
|
|
@@ -21703,7 +21235,7 @@
|
|
|
21703
21235
|
showCount: VueTypes.bool.def(true),
|
|
21704
21236
|
showFilter: VueTypes.bool.def(true),
|
|
21705
21237
|
showSearch: VueTypes.bool.def(true),
|
|
21706
|
-
size: VueTypes.number
|
|
21238
|
+
size: VueTypes.number,
|
|
21707
21239
|
sortBy: VueTypes.oneOf(['asc', 'desc', 'count']).def('count'),
|
|
21708
21240
|
title: types.title,
|
|
21709
21241
|
URLParams: VueTypes.bool.def(false),
|
|
@@ -21995,12 +21527,13 @@
|
|
|
21995
21527
|
|
|
21996
21528
|
if (this.defaultQuery) {
|
|
21997
21529
|
var defaultQueryToBeSet = this.defaultQuery(value, props) || {};
|
|
21530
|
+
var defaultQueryObj = extractQueryFromCustomQuery$3(defaultQueryToBeSet);
|
|
21998
21531
|
|
|
21999
|
-
if (
|
|
22000
|
-
query =
|
|
21532
|
+
if (defaultQueryObj) {
|
|
21533
|
+
query = defaultQueryObj;
|
|
22001
21534
|
}
|
|
22002
21535
|
|
|
22003
|
-
defaultQueryOptions =
|
|
21536
|
+
defaultQueryOptions = getOptionsForCustomQuery$3(defaultQueryToBeSet); // Update calculated default query in store
|
|
22004
21537
|
|
|
22005
21538
|
updateDefaultQuery(props.componentId, this.setDefaultQuery, props, value);
|
|
22006
21539
|
}
|
|
@@ -22019,10 +21552,9 @@
|
|
|
22019
21552
|
var customQueryOptions;
|
|
22020
21553
|
|
|
22021
21554
|
if (customQuery) {
|
|
22022
|
-
var
|
|
22023
|
-
|
|
22024
|
-
|
|
22025
|
-
customQueryOptions = getOptionsFromQuery$3(customQuery(value, props));
|
|
21555
|
+
var customQueryCalc = customQuery(value, props);
|
|
21556
|
+
query = extractQueryFromCustomQuery$3(customQueryCalc);
|
|
21557
|
+
customQueryOptions = getOptionsForCustomQuery$3(customQueryCalc);
|
|
22026
21558
|
updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
|
|
22027
21559
|
}
|
|
22028
21560
|
|
|
@@ -22046,7 +21578,7 @@
|
|
|
22046
21578
|
|
|
22047
21579
|
if (props.defaultQuery) {
|
|
22048
21580
|
var value = Object.keys(this.$data.currentValue);
|
|
22049
|
-
var defaultQueryOptions =
|
|
21581
|
+
var defaultQueryOptions = getOptionsForCustomQuery$3(props.defaultQuery(value, props));
|
|
22050
21582
|
this.setQueryOptions(this.internalComponent, _extends({}, queryOptions, defaultQueryOptions));
|
|
22051
21583
|
} else {
|
|
22052
21584
|
this.setQueryOptions(this.internalComponent, queryOptions);
|
|
@@ -22155,12 +21687,12 @@
|
|
|
22155
21687
|
|
|
22156
21688
|
if (props.queryFormat === 'or') {
|
|
22157
21689
|
if (props.showMissing) {
|
|
22158
|
-
var _type,
|
|
21690
|
+
var _type, _ref;
|
|
22159
21691
|
|
|
22160
21692
|
var hasMissingTerm = value.includes(props.missingLabel);
|
|
22161
|
-
var should = [(
|
|
21693
|
+
var should = [(_ref = {}, _ref[type] = (_type = {}, _type[props.dataField] = value.filter(function (item) {
|
|
22162
21694
|
return item !== props.missingLabel;
|
|
22163
|
-
}), _type),
|
|
21695
|
+
}), _type), _ref)];
|
|
22164
21696
|
|
|
22165
21697
|
if (hasMissingTerm) {
|
|
22166
21698
|
should = should.concat({
|
|
@@ -22187,9 +21719,9 @@
|
|
|
22187
21719
|
} else {
|
|
22188
21720
|
// adds a sub-query with must as an array of objects for each term/value
|
|
22189
21721
|
var queryArray = value.map(function (item) {
|
|
22190
|
-
var _type3,
|
|
21722
|
+
var _type3, _ref2;
|
|
22191
21723
|
|
|
22192
|
-
return
|
|
21724
|
+
return _ref2 = {}, _ref2[type] = (_type3 = {}, _type3[props.dataField] = item, _type3), _ref2;
|
|
22193
21725
|
});
|
|
22194
21726
|
listQuery = {
|
|
22195
21727
|
bool: {
|
|
@@ -22239,9 +21771,14 @@
|
|
|
22239
21771
|
setCustomQuery: setCustomQuery$2,
|
|
22240
21772
|
setDefaultQuery: setDefaultQuery$3
|
|
22241
21773
|
};
|
|
21774
|
+
|
|
21775
|
+
MultiList.hasInternalComponent = function () {
|
|
21776
|
+
return true;
|
|
21777
|
+
};
|
|
21778
|
+
|
|
22242
21779
|
var ListConnected$1 = ComponentWrapper$1(connect(mapStateToProps$5, mapDispatchtoProps$3)(MultiList), {
|
|
22243
21780
|
componentType: constants_1$1.multiList,
|
|
22244
|
-
internalComponent:
|
|
21781
|
+
internalComponent: MultiList.hasInternalComponent()
|
|
22245
21782
|
});
|
|
22246
21783
|
|
|
22247
21784
|
MultiList.install = function (Vue) {
|
|
@@ -22568,9 +22105,10 @@
|
|
|
22568
22105
|
checkValueChange$3 = lib_8.checkValueChange,
|
|
22569
22106
|
checkPropChange$1 = lib_8.checkPropChange,
|
|
22570
22107
|
getClassName$7 = lib_8.getClassName,
|
|
22571
|
-
getOptionsFromQuery$4 = lib_8.getOptionsFromQuery,
|
|
22572
22108
|
isEqual$7 = lib_8.isEqual,
|
|
22573
|
-
getCompositeAggsQuery$2 = lib_8.getCompositeAggsQuery
|
|
22109
|
+
getCompositeAggsQuery$2 = lib_8.getCompositeAggsQuery,
|
|
22110
|
+
extractQueryFromCustomQuery$4 = lib_8.extractQueryFromCustomQuery,
|
|
22111
|
+
getOptionsForCustomQuery$4 = lib_8.getOptionsForCustomQuery;
|
|
22574
22112
|
var SingleDropdownList = {
|
|
22575
22113
|
name: 'SingleDropdownList',
|
|
22576
22114
|
data: function data() {
|
|
@@ -22607,7 +22145,7 @@
|
|
|
22607
22145
|
selectAllLabel: types.string,
|
|
22608
22146
|
showCount: VueTypes.bool.def(true),
|
|
22609
22147
|
showFilter: VueTypes.bool.def(true),
|
|
22610
|
-
size: VueTypes.number
|
|
22148
|
+
size: VueTypes.number,
|
|
22611
22149
|
sortBy: VueTypes.oneOf(['asc', 'desc', 'count']).def('count'),
|
|
22612
22150
|
title: types.title,
|
|
22613
22151
|
URLParams: VueTypes.bool.def(false),
|
|
@@ -22824,12 +22362,13 @@
|
|
|
22824
22362
|
|
|
22825
22363
|
if (this.defaultQuery) {
|
|
22826
22364
|
var defaultQueryToBeSet = this.defaultQuery(value, props) || {};
|
|
22365
|
+
var defaultQueryObj = extractQueryFromCustomQuery$4(defaultQueryToBeSet);
|
|
22827
22366
|
|
|
22828
|
-
if (
|
|
22829
|
-
query =
|
|
22367
|
+
if (defaultQueryObj) {
|
|
22368
|
+
query = defaultQueryObj;
|
|
22830
22369
|
}
|
|
22831
22370
|
|
|
22832
|
-
defaultQueryOptions =
|
|
22371
|
+
defaultQueryOptions = getOptionsForCustomQuery$4(defaultQueryToBeSet); // Update calculated default query in store
|
|
22833
22372
|
|
|
22834
22373
|
updateDefaultQuery(props.componentId, this.setDefaultQuery, props, value);
|
|
22835
22374
|
}
|
|
@@ -22848,10 +22387,9 @@
|
|
|
22848
22387
|
var customQueryOptions;
|
|
22849
22388
|
|
|
22850
22389
|
if (customQuery) {
|
|
22851
|
-
var
|
|
22852
|
-
|
|
22853
|
-
|
|
22854
|
-
customQueryOptions = getOptionsFromQuery$4(customQuery(value, props));
|
|
22390
|
+
var customQueryCalc = customQuery(value, props);
|
|
22391
|
+
query = extractQueryFromCustomQuery$4(customQueryCalc);
|
|
22392
|
+
customQueryOptions = getOptionsForCustomQuery$4(customQueryCalc);
|
|
22855
22393
|
updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
|
|
22856
22394
|
}
|
|
22857
22395
|
|
|
@@ -22889,7 +22427,7 @@
|
|
|
22889
22427
|
|
|
22890
22428
|
if (props.defaultQuery) {
|
|
22891
22429
|
var value = this.$data.currentValue;
|
|
22892
|
-
var defaultQueryOptions =
|
|
22430
|
+
var defaultQueryOptions = getOptionsForCustomQuery$4(props.defaultQuery(value, props));
|
|
22893
22431
|
this.setQueryOptions(this.internalComponent, _extends({}, queryOptions, defaultQueryOptions));
|
|
22894
22432
|
} else {
|
|
22895
22433
|
this.setQueryOptions(this.internalComponent, queryOptions);
|
|
@@ -22981,6 +22519,10 @@
|
|
|
22981
22519
|
}) : getAggsQuery(queryOptions, props);
|
|
22982
22520
|
};
|
|
22983
22521
|
|
|
22522
|
+
SingleDropdownList.hasInternalComponent = function () {
|
|
22523
|
+
return true;
|
|
22524
|
+
};
|
|
22525
|
+
|
|
22984
22526
|
var mapStateToProps$6 = function mapStateToProps(state, props) {
|
|
22985
22527
|
return {
|
|
22986
22528
|
options: props.nestedField && state.aggregations[props.componentId] ? state.aggregations[props.componentId].reactivesearch_nested : state.aggregations[props.componentId],
|
|
@@ -23002,7 +22544,7 @@
|
|
|
23002
22544
|
};
|
|
23003
22545
|
var ListConnected$2 = ComponentWrapper$1(connect(mapStateToProps$6, mapDispatchtoProps$4)(SingleDropdownList), {
|
|
23004
22546
|
componentType: constants_1$1.singleDropdownList,
|
|
23005
|
-
internalComponent:
|
|
22547
|
+
internalComponent: SingleDropdownList.hasInternalComponent()
|
|
23006
22548
|
});
|
|
23007
22549
|
|
|
23008
22550
|
SingleDropdownList.install = function (Vue) {
|
|
@@ -23021,8 +22563,9 @@
|
|
|
23021
22563
|
checkValueChange$4 = lib_8.checkValueChange,
|
|
23022
22564
|
checkPropChange$2 = lib_8.checkPropChange,
|
|
23023
22565
|
getClassName$8 = lib_8.getClassName,
|
|
23024
|
-
|
|
23025
|
-
|
|
22566
|
+
getCompositeAggsQuery$3 = lib_8.getCompositeAggsQuery,
|
|
22567
|
+
extractQueryFromCustomQuery$5 = lib_8.extractQueryFromCustomQuery,
|
|
22568
|
+
getOptionsForCustomQuery$5 = lib_8.getOptionsForCustomQuery;
|
|
23026
22569
|
var MultiDropdownList = {
|
|
23027
22570
|
name: 'MultiDropdownList',
|
|
23028
22571
|
data: function data() {
|
|
@@ -23060,7 +22603,7 @@
|
|
|
23060
22603
|
selectAllLabel: types.string,
|
|
23061
22604
|
showCount: VueTypes.bool.def(true),
|
|
23062
22605
|
showFilter: VueTypes.bool.def(true),
|
|
23063
|
-
size: VueTypes.number
|
|
22606
|
+
size: VueTypes.number,
|
|
23064
22607
|
sortBy: VueTypes.oneOf(['asc', 'desc', 'count']).def('count'),
|
|
23065
22608
|
title: types.title,
|
|
23066
22609
|
URLParams: VueTypes.bool.def(false),
|
|
@@ -23351,12 +22894,13 @@
|
|
|
23351
22894
|
|
|
23352
22895
|
if (this.defaultQuery) {
|
|
23353
22896
|
var defaultQueryToBeSet = this.defaultQuery(value, props) || {};
|
|
22897
|
+
var defaultQueryObj = extractQueryFromCustomQuery$5(defaultQueryToBeSet);
|
|
23354
22898
|
|
|
23355
|
-
if (
|
|
23356
|
-
query =
|
|
22899
|
+
if (defaultQueryObj) {
|
|
22900
|
+
query = defaultQueryObj;
|
|
23357
22901
|
}
|
|
23358
22902
|
|
|
23359
|
-
defaultQueryOptions =
|
|
22903
|
+
defaultQueryOptions = getOptionsForCustomQuery$5(defaultQueryToBeSet); // Update calculated default query in store
|
|
23360
22904
|
|
|
23361
22905
|
updateDefaultQuery(props.componentId, this.setDefaultQuery, props, value);
|
|
23362
22906
|
}
|
|
@@ -23375,10 +22919,9 @@
|
|
|
23375
22919
|
var customQueryOptions;
|
|
23376
22920
|
|
|
23377
22921
|
if (customQuery) {
|
|
23378
|
-
var
|
|
23379
|
-
|
|
23380
|
-
|
|
23381
|
-
customQueryOptions = getOptionsFromQuery$5(customQuery(value, props));
|
|
22922
|
+
var customQueryCalc = customQuery(value, props);
|
|
22923
|
+
query = extractQueryFromCustomQuery$5(customQueryCalc);
|
|
22924
|
+
customQueryOptions = getOptionsForCustomQuery$5(customQueryCalc);
|
|
23382
22925
|
updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
|
|
23383
22926
|
}
|
|
23384
22927
|
|
|
@@ -23416,7 +22959,7 @@
|
|
|
23416
22959
|
|
|
23417
22960
|
if (props.defaultQuery) {
|
|
23418
22961
|
var value = Object.keys(this.$data.currentValue);
|
|
23419
|
-
var defaultQueryOptions =
|
|
22962
|
+
var defaultQueryOptions = getOptionsForCustomQuery$5(props.defaultQuery(value, props));
|
|
23420
22963
|
this.setQueryOptions(this.internalComponent, _extends({}, queryOptions, defaultQueryOptions));
|
|
23421
22964
|
} else {
|
|
23422
22965
|
this.setQueryOptions(this.internalComponent, queryOptions);
|
|
@@ -23475,12 +23018,12 @@
|
|
|
23475
23018
|
|
|
23476
23019
|
if (props.queryFormat === 'or') {
|
|
23477
23020
|
if (props.showMissing) {
|
|
23478
|
-
var _type,
|
|
23021
|
+
var _type, _ref;
|
|
23479
23022
|
|
|
23480
23023
|
var hasMissingTerm = value.includes(props.missingLabel);
|
|
23481
|
-
var should = [(
|
|
23024
|
+
var should = [(_ref = {}, _ref[type] = (_type = {}, _type[props.dataField] = value.filter(function (item) {
|
|
23482
23025
|
return item !== props.missingLabel;
|
|
23483
|
-
}), _type),
|
|
23026
|
+
}), _type), _ref)];
|
|
23484
23027
|
|
|
23485
23028
|
if (hasMissingTerm) {
|
|
23486
23029
|
should = should.concat({
|
|
@@ -23507,9 +23050,9 @@
|
|
|
23507
23050
|
} else {
|
|
23508
23051
|
// adds a sub-query with must as an array of objects for each term/value
|
|
23509
23052
|
var queryArray = value.map(function (item) {
|
|
23510
|
-
var _type3,
|
|
23053
|
+
var _type3, _ref2;
|
|
23511
23054
|
|
|
23512
|
-
return
|
|
23055
|
+
return _ref2 = {}, _ref2[type] = (_type3 = {}, _type3[props.dataField] = item, _type3), _ref2;
|
|
23513
23056
|
});
|
|
23514
23057
|
listQuery = {
|
|
23515
23058
|
bool: {
|
|
@@ -23544,6 +23087,10 @@
|
|
|
23544
23087
|
}) : getAggsQuery(queryOptions, props);
|
|
23545
23088
|
};
|
|
23546
23089
|
|
|
23090
|
+
MultiDropdownList.hasInternalComponent = function () {
|
|
23091
|
+
return true;
|
|
23092
|
+
};
|
|
23093
|
+
|
|
23547
23094
|
var mapStateToProps$7 = function mapStateToProps(state, props) {
|
|
23548
23095
|
return {
|
|
23549
23096
|
options: props.nestedField && state.aggregations[props.componentId] ? state.aggregations[props.componentId].reactivesearch_nested : state.aggregations[props.componentId],
|
|
@@ -23565,7 +23112,7 @@
|
|
|
23565
23112
|
};
|
|
23566
23113
|
var ListConnected$3 = ComponentWrapper$1(connect(mapStateToProps$7, mapDispatchtoProps$5)(MultiDropdownList), {
|
|
23567
23114
|
componentType: constants_1$1.multiDropdownList,
|
|
23568
|
-
internalComponent:
|
|
23115
|
+
internalComponent: MultiDropdownList.hasInternalComponent()
|
|
23569
23116
|
});
|
|
23570
23117
|
|
|
23571
23118
|
MultiDropdownList.install = function (Vue) {
|
|
@@ -23581,7 +23128,7 @@
|
|
|
23581
23128
|
var isEqual$9 = lib_8.isEqual,
|
|
23582
23129
|
checkValueChange$5 = lib_8.checkValueChange,
|
|
23583
23130
|
getClassName$9 = lib_8.getClassName,
|
|
23584
|
-
getOptionsFromQuery
|
|
23131
|
+
getOptionsFromQuery = lib_8.getOptionsFromQuery,
|
|
23585
23132
|
handleA11yAction$1 = lib_8.handleA11yAction;
|
|
23586
23133
|
var ToggleButton = {
|
|
23587
23134
|
name: 'ToggleButton',
|
|
@@ -23747,7 +23294,7 @@
|
|
|
23747
23294
|
var _ref = customQuery(value, props) || {};
|
|
23748
23295
|
|
|
23749
23296
|
query = _ref.query;
|
|
23750
|
-
this.setQueryOptions(props.componentId, getOptionsFromQuery
|
|
23297
|
+
this.setQueryOptions(props.componentId, getOptionsFromQuery(customQuery(value, props)), false);
|
|
23751
23298
|
updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
|
|
23752
23299
|
}
|
|
23753
23300
|
|
|
@@ -23905,10 +23452,7 @@
|
|
|
23905
23452
|
|
|
23906
23453
|
ToggleButton.componentType = constants_1$1.toggleButton;
|
|
23907
23454
|
|
|
23908
|
-
var _excluded = ["options"]
|
|
23909
|
-
_excluded2 = ["query"],
|
|
23910
|
-
_excluded3 = ["query"],
|
|
23911
|
-
_excluded4 = ["query"];
|
|
23455
|
+
var _excluded = ["options"];
|
|
23912
23456
|
var updateQuery$7 = lib_5.updateQuery,
|
|
23913
23457
|
setQueryOptions$7 = lib_5.setQueryOptions,
|
|
23914
23458
|
setCustomQuery$6 = lib_5.setCustomQuery,
|
|
@@ -23916,15 +23460,16 @@
|
|
|
23916
23460
|
var parseHits$1 = lib_8.parseHits,
|
|
23917
23461
|
isEqual$a = lib_8.isEqual,
|
|
23918
23462
|
getCompositeAggsQuery$4 = lib_8.getCompositeAggsQuery,
|
|
23919
|
-
|
|
23920
|
-
|
|
23463
|
+
getResultStats$2 = lib_8.getResultStats,
|
|
23464
|
+
extractQueryFromCustomQuery$6 = lib_8.extractQueryFromCustomQuery,
|
|
23465
|
+
getOptionsForCustomQuery$6 = lib_8.getOptionsForCustomQuery;
|
|
23921
23466
|
var ReactiveComponent = {
|
|
23922
23467
|
name: 'ReactiveComponent',
|
|
23923
23468
|
props: {
|
|
23924
23469
|
componentId: types.stringRequired,
|
|
23925
23470
|
aggregationField: types.string,
|
|
23926
23471
|
aggregationSize: VueTypes.number,
|
|
23927
|
-
size: VueTypes.number
|
|
23472
|
+
size: VueTypes.number,
|
|
23928
23473
|
defaultQuery: types.func,
|
|
23929
23474
|
customQuery: types.func,
|
|
23930
23475
|
filterLabel: types.string,
|
|
@@ -23966,25 +23511,16 @@
|
|
|
23966
23511
|
|
|
23967
23512
|
if (customQuery) {
|
|
23968
23513
|
var calcCustomQuery = customQuery(this.selectedValue, props);
|
|
23969
|
-
|
|
23970
|
-
var
|
|
23971
|
-
query = _ref.query;
|
|
23972
|
-
|
|
23973
|
-
var customQueryOptions = calcCustomQuery ? getOptionsFromQuery$7(calcCustomQuery) : null;
|
|
23514
|
+
var query = extractQueryFromCustomQuery$6(calcCustomQuery);
|
|
23515
|
+
var customQueryOptions = calcCustomQuery ? getOptionsForCustomQuery$6(calcCustomQuery) : null;
|
|
23974
23516
|
|
|
23975
23517
|
if (customQueryOptions) {
|
|
23976
23518
|
this.setQueryOptions(componentId, _extends({}, customQueryOptions, this.getAggsQuery()), false);
|
|
23977
23519
|
} else this.setQueryOptions(componentId, this.getAggsQuery(), false);
|
|
23978
23520
|
|
|
23979
|
-
var queryToSet = query || null;
|
|
23980
|
-
|
|
23981
|
-
if (calcCustomQuery && calcCustomQuery.id) {
|
|
23982
|
-
queryToSet = calcCustomQuery;
|
|
23983
|
-
}
|
|
23984
|
-
|
|
23985
23521
|
this.updateQuery({
|
|
23986
23522
|
componentId: componentId,
|
|
23987
|
-
query:
|
|
23523
|
+
query: query,
|
|
23988
23524
|
value: this.selectedValue || null,
|
|
23989
23525
|
label: filterLabel,
|
|
23990
23526
|
showFilter: showFilter,
|
|
@@ -23992,9 +23528,9 @@
|
|
|
23992
23528
|
});
|
|
23993
23529
|
}
|
|
23994
23530
|
|
|
23995
|
-
this.setQuery = function (
|
|
23996
|
-
var options =
|
|
23997
|
-
obj = _objectWithoutPropertiesLoose(
|
|
23531
|
+
this.setQuery = function (_ref) {
|
|
23532
|
+
var options = _ref.options,
|
|
23533
|
+
obj = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
23998
23534
|
|
|
23999
23535
|
if (options) {
|
|
24000
23536
|
_this.setQueryOptions(props.componentId, _extends({}, options, _this.getAggsQuery()), false);
|
|
@@ -24004,17 +23540,17 @@
|
|
|
24004
23540
|
|
|
24005
23541
|
if (obj && obj.query && obj.query.query) {
|
|
24006
23542
|
queryToBeSet = obj.query.query;
|
|
24007
|
-
}
|
|
23543
|
+
}
|
|
24008
23544
|
|
|
23545
|
+
var customQueryCalc = _extends({}, options); // Update customQuery field for RS API
|
|
24009
23546
|
|
|
24010
|
-
if (obj && obj.query || options) {
|
|
24011
|
-
var customQueryCalc = _extends({}, options);
|
|
24012
23547
|
|
|
24013
|
-
|
|
24014
|
-
|
|
23548
|
+
if (queryToBeSet || options) {
|
|
23549
|
+
if (queryToBeSet.query) {
|
|
23550
|
+
if (queryToBeSet.id) {
|
|
24015
23551
|
customQueryCalc = queryToBeSet;
|
|
24016
23552
|
} else {
|
|
24017
|
-
customQueryCalc.query =
|
|
23553
|
+
customQueryCalc.query = queryToBeSet;
|
|
24018
23554
|
}
|
|
24019
23555
|
}
|
|
24020
23556
|
|
|
@@ -24022,6 +23558,7 @@
|
|
|
24022
23558
|
}
|
|
24023
23559
|
|
|
24024
23560
|
_this.updateQuery(_extends({}, obj, {
|
|
23561
|
+
query: customQueryCalc,
|
|
24025
23562
|
componentId: props.componentId,
|
|
24026
23563
|
label: props.filterLabel,
|
|
24027
23564
|
showFilter: props.showFilter,
|
|
@@ -24037,24 +23574,16 @@
|
|
|
24037
23574
|
if (this.internalComponent && this.$props.defaultQuery) {
|
|
24038
23575
|
updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props, this.selectedValue);
|
|
24039
23576
|
this.$defaultQuery = this.$props.defaultQuery(this.selectedValue, this.$props);
|
|
24040
|
-
|
|
24041
|
-
var
|
|
24042
|
-
query = _ref3.query,
|
|
24043
|
-
queryOptions = _objectWithoutPropertiesLoose(_ref3, _excluded2);
|
|
23577
|
+
var query = extractQueryFromCustomQuery$6(this.$defaultQuery);
|
|
23578
|
+
var queryOptions = getOptionsForCustomQuery$6(this.$defaultQuery);
|
|
24044
23579
|
|
|
24045
23580
|
if (queryOptions) {
|
|
24046
23581
|
this.setQueryOptions(this.internalComponent, _extends({}, queryOptions, this.getAggsQuery()), false);
|
|
24047
23582
|
} else this.setQueryOptions(this.internalComponent, this.getAggsQuery(), false);
|
|
24048
23583
|
|
|
24049
|
-
var queryToSet = query || null;
|
|
24050
|
-
|
|
24051
|
-
if (!queryToSet && this.$defaultQuery && this.$defaultQuery.id) {
|
|
24052
|
-
queryToSet = this.$defaultQuery;
|
|
24053
|
-
}
|
|
24054
|
-
|
|
24055
23584
|
this.updateQuery({
|
|
24056
23585
|
componentId: this.internalComponent,
|
|
24057
|
-
query:
|
|
23586
|
+
query: query
|
|
24058
23587
|
});
|
|
24059
23588
|
}
|
|
24060
23589
|
},
|
|
@@ -24102,10 +23631,8 @@
|
|
|
24102
23631
|
defaultQuery: function defaultQuery(newVal, oldVal) {
|
|
24103
23632
|
if (newVal && !isQueryIdentical(newVal, oldVal, this.selectedValue, this.$props)) {
|
|
24104
23633
|
this.$defaultQuery = newVal(this.selectedValue, this.$props);
|
|
24105
|
-
|
|
24106
|
-
var
|
|
24107
|
-
query = _ref4.query,
|
|
24108
|
-
queryOptions = _objectWithoutPropertiesLoose(_ref4, _excluded3);
|
|
23634
|
+
var query = extractQueryFromCustomQuery$6(this.$defaultQuery);
|
|
23635
|
+
var queryOptions = getOptionsForCustomQuery$6(this.$defaultQuery);
|
|
24109
23636
|
|
|
24110
23637
|
if (queryOptions) {
|
|
24111
23638
|
this.setQueryOptions(this.internalComponent, _extends({}, queryOptions, this.getAggsQuery()), false);
|
|
@@ -24113,15 +23640,9 @@
|
|
|
24113
23640
|
|
|
24114
23641
|
|
|
24115
23642
|
updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props, this.selectedValue);
|
|
24116
|
-
var queryToSet = query || null;
|
|
24117
|
-
|
|
24118
|
-
if (!queryToSet && this.$defaultQuery && this.$defaultQuery.id) {
|
|
24119
|
-
queryToSet = this.$defaultQuery;
|
|
24120
|
-
}
|
|
24121
|
-
|
|
24122
23643
|
this.updateQuery({
|
|
24123
23644
|
componentId: this.internalComponent,
|
|
24124
|
-
query:
|
|
23645
|
+
query: query
|
|
24125
23646
|
});
|
|
24126
23647
|
}
|
|
24127
23648
|
},
|
|
@@ -24129,10 +23650,8 @@
|
|
|
24129
23650
|
if (newVal && !isQueryIdentical(newVal, oldVal, this.selectedValue, this.$props)) {
|
|
24130
23651
|
var componentId = this.$props.componentId;
|
|
24131
23652
|
this.$customQuery = newVal(this.selectedValue, this.$props);
|
|
24132
|
-
|
|
24133
|
-
var
|
|
24134
|
-
query = _ref5.query,
|
|
24135
|
-
queryOptions = _objectWithoutPropertiesLoose(_ref5, _excluded4);
|
|
23653
|
+
var query = extractQueryFromCustomQuery$6(this.$customQuery);
|
|
23654
|
+
var queryOptions = getOptionsForCustomQuery$6(this.$customQuery);
|
|
24136
23655
|
|
|
24137
23656
|
if (queryOptions) {
|
|
24138
23657
|
this.setQueryOptions(componentId, _extends({}, queryOptions, this.getAggsQuery()), false);
|
|
@@ -24140,15 +23659,9 @@
|
|
|
24140
23659
|
|
|
24141
23660
|
|
|
24142
23661
|
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.selectedValue);
|
|
24143
|
-
var queryToSet = query || null;
|
|
24144
|
-
|
|
24145
|
-
if (this.$customQuery && this.$customQuery.id) {
|
|
24146
|
-
queryToSet = this.$customQuery;
|
|
24147
|
-
}
|
|
24148
|
-
|
|
24149
23662
|
this.updateQuery({
|
|
24150
23663
|
componentId: componentId,
|
|
24151
|
-
query:
|
|
23664
|
+
query: query
|
|
24152
23665
|
});
|
|
24153
23666
|
}
|
|
24154
23667
|
}
|
|
@@ -24228,6 +23741,10 @@
|
|
|
24228
23741
|
}
|
|
24229
23742
|
};
|
|
24230
23743
|
|
|
23744
|
+
ReactiveComponent.hasInternalComponent = function (props) {
|
|
23745
|
+
return !!props.defaultQuery;
|
|
23746
|
+
};
|
|
23747
|
+
|
|
24231
23748
|
var mapStateToProps$9 = function mapStateToProps(state, props) {
|
|
24232
23749
|
return {
|
|
24233
23750
|
aggregations: state.aggregations[props.componentId] && state.aggregations[props.componentId] || null,
|
|
@@ -24434,7 +23951,7 @@
|
|
|
24434
23951
|
var isEqual$b = lib_8.isEqual,
|
|
24435
23952
|
checkValueChange$6 = lib_8.checkValueChange,
|
|
24436
23953
|
getClassName$b = lib_8.getClassName,
|
|
24437
|
-
getOptionsFromQuery$
|
|
23954
|
+
getOptionsFromQuery$1 = lib_8.getOptionsFromQuery;
|
|
24438
23955
|
var SingleRange = {
|
|
24439
23956
|
name: 'SingleRange',
|
|
24440
23957
|
data: function data() {
|
|
@@ -24570,7 +24087,7 @@
|
|
|
24570
24087
|
var _ref = customQuery(value, props) || {};
|
|
24571
24088
|
|
|
24572
24089
|
query = _ref.query;
|
|
24573
|
-
customQueryOptions = getOptionsFromQuery$
|
|
24090
|
+
customQueryOptions = getOptionsFromQuery$1(customQuery(value, props));
|
|
24574
24091
|
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
|
|
24575
24092
|
}
|
|
24576
24093
|
|
|
@@ -24662,7 +24179,7 @@
|
|
|
24662
24179
|
var isEqual$c = lib_8.isEqual,
|
|
24663
24180
|
checkValueChange$7 = lib_8.checkValueChange,
|
|
24664
24181
|
getClassName$c = lib_8.getClassName,
|
|
24665
|
-
getOptionsFromQuery$
|
|
24182
|
+
getOptionsFromQuery$2 = lib_8.getOptionsFromQuery;
|
|
24666
24183
|
var MultiRange = {
|
|
24667
24184
|
name: 'MultiRange',
|
|
24668
24185
|
data: function data() {
|
|
@@ -24779,7 +24296,7 @@
|
|
|
24779
24296
|
var _ref = customQuery(value, props) || {};
|
|
24780
24297
|
|
|
24781
24298
|
query = _ref.query;
|
|
24782
|
-
customQueryOptions = getOptionsFromQuery$
|
|
24299
|
+
customQueryOptions = getOptionsFromQuery$2(customQuery(value, props));
|
|
24783
24300
|
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
|
|
24784
24301
|
}
|
|
24785
24302
|
|
|
@@ -25274,7 +24791,7 @@
|
|
|
25274
24791
|
setCustomQuery$9 = lib_5.setCustomQuery;
|
|
25275
24792
|
var checkValueChange$8 = lib_8.checkValueChange,
|
|
25276
24793
|
getClassName$d = lib_8.getClassName,
|
|
25277
|
-
getOptionsFromQuery$
|
|
24794
|
+
getOptionsFromQuery$3 = lib_8.getOptionsFromQuery,
|
|
25278
24795
|
isEqual$d = lib_8.isEqual;
|
|
25279
24796
|
var RangeSlider = {
|
|
25280
24797
|
name: 'RangeSlider',
|
|
@@ -25370,7 +24887,7 @@
|
|
|
25370
24887
|
var _ref = customQuery(value, props) || {};
|
|
25371
24888
|
|
|
25372
24889
|
query = _ref.query;
|
|
25373
|
-
customQueryOptions = getOptionsFromQuery$
|
|
24890
|
+
customQueryOptions = getOptionsFromQuery$3(customQuery(value, props));
|
|
25374
24891
|
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
|
|
25375
24892
|
}
|
|
25376
24893
|
|
|
@@ -25556,9 +25073,10 @@
|
|
|
25556
25073
|
updateComponentProps$2 = lib_5.updateComponentProps;
|
|
25557
25074
|
var checkValueChange$9 = lib_8.checkValueChange,
|
|
25558
25075
|
getClassName$e = lib_8.getClassName,
|
|
25559
|
-
getOptionsFromQuery$b = lib_8.getOptionsFromQuery,
|
|
25560
25076
|
isEqual$e = lib_8.isEqual,
|
|
25561
|
-
checkSomePropChange$1 = lib_8.checkSomePropChange
|
|
25077
|
+
checkSomePropChange$1 = lib_8.checkSomePropChange,
|
|
25078
|
+
extractQueryFromCustomQuery$7 = lib_8.extractQueryFromCustomQuery,
|
|
25079
|
+
getOptionsForCustomQuery$7 = lib_8.getOptionsForCustomQuery;
|
|
25562
25080
|
var DynamicRangeSlider = {
|
|
25563
25081
|
name: 'DynamicRangeSlider',
|
|
25564
25082
|
components: getComponents(),
|
|
@@ -25769,19 +25287,23 @@
|
|
|
25769
25287
|
var customQueryOptions;
|
|
25770
25288
|
|
|
25771
25289
|
if (this.$props.customQuery) {
|
|
25772
|
-
var
|
|
25290
|
+
var customQueryTobeSet = this.$props.customQuery(value, this.$props);
|
|
25291
|
+
var queryTobeSet = extractQueryFromCustomQuery$7(customQueryTobeSet);
|
|
25292
|
+
|
|
25293
|
+
if (queryTobeSet) {
|
|
25294
|
+
query = queryTobeSet;
|
|
25295
|
+
}
|
|
25773
25296
|
|
|
25774
|
-
|
|
25775
|
-
customQueryOptions = getOptionsFromQuery$b(this.$props.customQuery(value, this.$props));
|
|
25297
|
+
customQueryOptions = getOptionsForCustomQuery$7(customQueryTobeSet);
|
|
25776
25298
|
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, value);
|
|
25777
25299
|
}
|
|
25778
25300
|
|
|
25779
|
-
var
|
|
25301
|
+
var _ref2 = this.range || {
|
|
25780
25302
|
start: value[0],
|
|
25781
25303
|
end: value[1]
|
|
25782
25304
|
},
|
|
25783
|
-
start =
|
|
25784
|
-
end =
|
|
25305
|
+
start = _ref2.start,
|
|
25306
|
+
end = _ref2.end;
|
|
25785
25307
|
|
|
25786
25308
|
var currentStart = value[0],
|
|
25787
25309
|
currentEnd = value[1]; // check if the slider is at its initial position
|
|
@@ -25834,13 +25356,13 @@
|
|
|
25834
25356
|
range: function range(newValue, oldValue) {
|
|
25835
25357
|
if (isEqual$e(newValue, oldValue) || !this.currentValue) return;
|
|
25836
25358
|
|
|
25837
|
-
var
|
|
25838
|
-
currentStart =
|
|
25839
|
-
currentEnd =
|
|
25359
|
+
var _ref3 = this.currentValue || [],
|
|
25360
|
+
currentStart = _ref3[0],
|
|
25361
|
+
currentEnd = _ref3[1];
|
|
25840
25362
|
|
|
25841
|
-
var
|
|
25842
|
-
oldStart =
|
|
25843
|
-
oldEnd =
|
|
25363
|
+
var _ref4 = oldValue || {},
|
|
25364
|
+
oldStart = _ref4.start,
|
|
25365
|
+
oldEnd = _ref4.end;
|
|
25844
25366
|
|
|
25845
25367
|
var newStart = currentStart === oldStart ? newValue.start : currentStart;
|
|
25846
25368
|
var newEnd = currentEnd === oldEnd ? newValue.end : currentEnd;
|
|
@@ -25935,6 +25457,10 @@
|
|
|
25935
25457
|
return [];
|
|
25936
25458
|
};
|
|
25937
25459
|
|
|
25460
|
+
DynamicRangeSlider.hasInternalComponent = function () {
|
|
25461
|
+
return true;
|
|
25462
|
+
};
|
|
25463
|
+
|
|
25938
25464
|
var mapStateToProps$e = function mapStateToProps(state, props) {
|
|
25939
25465
|
var componentId = state.aggregations[props.componentId];
|
|
25940
25466
|
var internalRange = state.aggregations[props.componentId + "__range__internal"];
|
|
@@ -29279,7 +28805,7 @@
|
|
|
29279
28805
|
getQueryOptions$5 = lib_8.getQueryOptions,
|
|
29280
28806
|
getClassName$f = lib_8.getClassName,
|
|
29281
28807
|
parseHits$2 = lib_8.parseHits,
|
|
29282
|
-
getOptionsFromQuery$
|
|
28808
|
+
getOptionsFromQuery$4 = lib_8.getOptionsFromQuery,
|
|
29283
28809
|
getResultStats$3 = lib_8.getResultStats; // default map center
|
|
29284
28810
|
|
|
29285
28811
|
var MAP_CENTER = {
|
|
@@ -29450,10 +28976,10 @@
|
|
|
29450
28976
|
options.sort = this.$defaultQuery.sort;
|
|
29451
28977
|
}
|
|
29452
28978
|
|
|
29453
|
-
var queryOptions = getOptionsFromQuery$
|
|
28979
|
+
var queryOptions = getOptionsFromQuery$4(this.$defaultQuery);
|
|
29454
28980
|
|
|
29455
28981
|
if (queryOptions) {
|
|
29456
|
-
options = _extends({}, options, getOptionsFromQuery$
|
|
28982
|
+
options = _extends({}, options, getOptionsFromQuery$4(this.$defaultQuery));
|
|
29457
28983
|
} // Update calculated default query in store
|
|
29458
28984
|
|
|
29459
28985
|
|
|
@@ -30045,7 +29571,7 @@
|
|
|
30045
29571
|
|
|
30046
29572
|
if (this.$props.defaultQuery) {
|
|
30047
29573
|
this.$defaultQuery = this.$props.defaultQuery();
|
|
30048
|
-
options = _extends({}, options, getOptionsFromQuery$
|
|
29574
|
+
options = _extends({}, options, getOptionsFromQuery$4(this.$defaultQuery)); // Override sort query with defaultQuery's sort if defined
|
|
30049
29575
|
|
|
30050
29576
|
if (this.$defaultQuery.sort) {
|
|
30051
29577
|
options.sort = this.$defaultQuery.sort;
|
|
@@ -32953,10 +32479,10 @@
|
|
|
32953
32479
|
|
|
32954
32480
|
ReactiveGoogleMap.componentType = constants_1$1.reactiveMap;
|
|
32955
32481
|
|
|
32956
|
-
var _excluded$5 = ["aggs", "size"]
|
|
32482
|
+
var _excluded$5 = ["aggs", "size"],
|
|
32483
|
+
_excluded2 = ["query"],
|
|
32484
|
+
_excluded3 = ["aggs", "size"];
|
|
32957
32485
|
var X_SEARCH_CLIENT$1 = 'ReactiveSearch Vue';
|
|
32958
|
-
var componentsWithHighlightQuery = [constants_1$1.dataSearch, constants_1$1.categorySearch];
|
|
32959
|
-
var componentsWithOptions = [constants_1$1.reactiveList, constants_1$1.reactiveMap, constants_1$1.singleList, constants_1$1.multiList, constants_1$1.tagCloud].concat(componentsWithHighlightQuery);
|
|
32960
32486
|
var componentsWithoutFilters = [constants_1$1.numberBox, constants_1$1.ratingsFilter];
|
|
32961
32487
|
var resultComponents = [constants_1$1.reactiveList, constants_1$1.reactiveMap];
|
|
32962
32488
|
|
|
@@ -32990,23 +32516,35 @@
|
|
|
32990
32516
|
}
|
|
32991
32517
|
|
|
32992
32518
|
return value;
|
|
32993
|
-
}
|
|
32519
|
+
} // Returns query DSL with query property and other options
|
|
32520
|
+
|
|
32521
|
+
|
|
32522
|
+
function getDefaultQuery(component, value) {
|
|
32523
|
+
// get custom or default query of sensor components
|
|
32524
|
+
var currentValue = parseValue(value, component); // get default query of result components
|
|
32525
|
+
|
|
32526
|
+
if (component.defaultQuery) {
|
|
32527
|
+
var defaultQuery = component.defaultQuery(currentValue, component);
|
|
32528
|
+
return _extends({
|
|
32529
|
+
query: helper_11(defaultQuery)
|
|
32530
|
+
}, helper_12(defaultQuery));
|
|
32531
|
+
}
|
|
32994
32532
|
|
|
32995
|
-
|
|
32996
|
-
|
|
32997
|
-
|
|
32998
|
-
|
|
32999
|
-
} // get custom or default query of sensor components
|
|
32533
|
+
return component.source.defaultQuery ? {
|
|
32534
|
+
query: component.source.defaultQuery(currentValue, component)
|
|
32535
|
+
} : {};
|
|
32536
|
+
} // Only results the query part
|
|
33000
32537
|
|
|
33001
32538
|
|
|
32539
|
+
function getCustomQuery(component, value) {
|
|
32540
|
+
// get custom or default query of sensor components
|
|
33002
32541
|
var currentValue = parseValue(value, component);
|
|
33003
32542
|
|
|
33004
32543
|
if (component.customQuery) {
|
|
33005
|
-
|
|
33006
|
-
return customQuery && customQuery.query;
|
|
32544
|
+
return helper_11(component.customQuery(currentValue, component));
|
|
33007
32545
|
}
|
|
33008
32546
|
|
|
33009
|
-
return component.source.defaultQuery ? component.source.defaultQuery(currentValue, component) :
|
|
32547
|
+
return component.source.defaultQuery ? component.source.defaultQuery(currentValue, component) : null;
|
|
33010
32548
|
}
|
|
33011
32549
|
|
|
33012
32550
|
function initReactivesearch(componentCollection, searchState, settings) {
|
|
@@ -33061,6 +32599,11 @@
|
|
|
33061
32599
|
}
|
|
33062
32600
|
});
|
|
33063
32601
|
var isInternalComponentPresent = false;
|
|
32602
|
+
|
|
32603
|
+
if (component.source.hasInternalComponent) {
|
|
32604
|
+
isInternalComponentPresent = component.source.hasInternalComponent(component);
|
|
32605
|
+
}
|
|
32606
|
+
|
|
33064
32607
|
var isResultComponent = resultComponents.includes(componentType);
|
|
33065
32608
|
var internalComponent = component.componentId + "__internal";
|
|
33066
32609
|
var label = component.filterLabel || component.componentId;
|
|
@@ -33092,74 +32635,67 @@
|
|
|
33092
32635
|
|
|
33093
32636
|
if (component.defaultQuery && typeof component.defaultQuery === 'function') {
|
|
33094
32637
|
defaultQueries[component.componentId] = component.defaultQuery(value, compProps);
|
|
33095
|
-
}
|
|
33096
|
-
|
|
33097
|
-
|
|
33098
|
-
if (componentsWithOptions.includes(componentType)) {
|
|
33099
|
-
var options = component.source.generateQueryOptions ? component.source.generateQueryOptions(component) : null;
|
|
33100
|
-
var highlightQuery = {};
|
|
33101
|
-
|
|
33102
|
-
if (componentsWithHighlightQuery.includes(componentType) && component.highlight) {
|
|
33103
|
-
highlightQuery = component.source.highlightQuery(component);
|
|
33104
|
-
}
|
|
32638
|
+
}
|
|
33105
32639
|
|
|
33106
|
-
|
|
33107
|
-
// eslint-disable-next-line
|
|
33108
|
-
var _ref = options || {},
|
|
33109
|
-
aggs = _ref.aggs,
|
|
33110
|
-
size = _ref.size,
|
|
33111
|
-
otherQueryOptions = _objectWithoutPropertiesLoose(_ref, _excluded$5);
|
|
32640
|
+
var componentQueryOptions = {}; // [2] set query options - main component query (valid for result components)
|
|
33112
32641
|
|
|
33113
|
-
|
|
33114
|
-
|
|
33115
|
-
|
|
32642
|
+
if (component && component.source.generateQueryOptions) {
|
|
32643
|
+
componentQueryOptions = _extends({}, componentQueryOptions, component.source.generateQueryOptions(component));
|
|
32644
|
+
}
|
|
33116
32645
|
|
|
33117
|
-
|
|
33118
|
-
|
|
33119
|
-
component: internalComponent,
|
|
33120
|
-
options: {
|
|
33121
|
-
aggs: aggs,
|
|
33122
|
-
size: typeof size === 'undefined' ? 100 : size
|
|
33123
|
-
}
|
|
33124
|
-
});
|
|
33125
|
-
} // sort, highlight, size, from - query should be applied on the main component
|
|
32646
|
+
console.log('QUERY LOG componentQueryOptions', component.componentId, componentQueryOptions);
|
|
32647
|
+
var highlightQuery = {};
|
|
33126
32648
|
|
|
32649
|
+
if (component.source.highlightQuery) {
|
|
32650
|
+
highlightQuery = component.source.highlightQuery(component);
|
|
32651
|
+
}
|
|
33127
32652
|
|
|
33128
|
-
|
|
33129
|
-
|
|
33130
|
-
|
|
32653
|
+
if (componentQueryOptions && Object.keys(componentQueryOptions).length || highlightQuery && Object.keys(highlightQuery).length) {
|
|
32654
|
+
// eslint-disable-next-line
|
|
32655
|
+
var _ref = componentQueryOptions || {},
|
|
32656
|
+
aggs = _ref.aggs,
|
|
32657
|
+
size = _ref.size,
|
|
32658
|
+
otherQueryOptions = _objectWithoutPropertiesLoose(_ref, _excluded$5);
|
|
32659
|
+
|
|
32660
|
+
if (aggs && Object.keys(aggs).length) {
|
|
32661
|
+
isInternalComponentPresent = true;
|
|
32662
|
+
componentQueryOptions = _extends({}, componentQueryOptions, {
|
|
32663
|
+
aggs: aggs,
|
|
32664
|
+
size: typeof size === 'undefined' ? 100 : size
|
|
32665
|
+
});
|
|
32666
|
+
} // sort, highlight, size, from - query should be applied on the main component
|
|
33131
32667
|
|
|
33132
|
-
var mainQueryOptions = _extends({}, otherQueryOptions, highlightQuery, {
|
|
33133
|
-
size: size
|
|
33134
|
-
});
|
|
33135
32668
|
|
|
33136
|
-
|
|
33137
|
-
|
|
33138
|
-
|
|
32669
|
+
if (otherQueryOptions && Object.keys(otherQueryOptions).length || highlightQuery && Object.keys(highlightQuery).length) {
|
|
32670
|
+
if (!otherQueryOptions) otherQueryOptions = {};
|
|
32671
|
+
if (!highlightQuery) highlightQuery = {};
|
|
33139
32672
|
|
|
33140
|
-
|
|
33141
|
-
|
|
32673
|
+
var mainQueryOptions = _extends({}, otherQueryOptions, highlightQuery, {
|
|
32674
|
+
size: size
|
|
32675
|
+
});
|
|
33142
32676
|
|
|
33143
|
-
|
|
33144
|
-
|
|
33145
|
-
|
|
32677
|
+
if (isInternalComponentPresent) {
|
|
32678
|
+
mainQueryOptions = _extends({}, otherQueryOptions, highlightQuery);
|
|
32679
|
+
}
|
|
33146
32680
|
|
|
33147
|
-
|
|
33148
|
-
|
|
32681
|
+
if (isResultComponent) {
|
|
32682
|
+
var currentPage = component.currentPage ? component.currentPage - 1 : 0;
|
|
33149
32683
|
|
|
33150
|
-
|
|
33151
|
-
|
|
33152
|
-
size: resultSize,
|
|
33153
|
-
from: from
|
|
33154
|
-
});
|
|
32684
|
+
if (selectedValues[component.componentId] && selectedValues[component.componentId].value) {
|
|
32685
|
+
currentPage = selectedValues[component.componentId].value - 1 || 0;
|
|
33155
32686
|
}
|
|
33156
32687
|
|
|
33157
|
-
|
|
33158
|
-
|
|
33159
|
-
|
|
33160
|
-
|
|
32688
|
+
var resultSize = component.size || 10;
|
|
32689
|
+
var from = currentPage * resultSize; // Update props for RS API
|
|
32690
|
+
|
|
32691
|
+
compProps.from = from;
|
|
32692
|
+
mainQueryOptions = _extends({}, mainQueryOptions, highlightQuery, {
|
|
32693
|
+
size: resultSize,
|
|
32694
|
+
from: from
|
|
33161
32695
|
});
|
|
33162
32696
|
}
|
|
32697
|
+
|
|
32698
|
+
componentQueryOptions = _extends({}, componentQueryOptions, mainQueryOptions);
|
|
33163
32699
|
}
|
|
33164
32700
|
} // [3] set dependency tree
|
|
33165
32701
|
|
|
@@ -33168,7 +32704,7 @@
|
|
|
33168
32704
|
var react = component.react;
|
|
33169
32705
|
|
|
33170
32706
|
if (isInternalComponentPresent || isResultComponent) {
|
|
33171
|
-
react =
|
|
32707
|
+
react = helper_26(react, internalComponent);
|
|
33172
32708
|
}
|
|
33173
32709
|
|
|
33174
32710
|
dependencyTree = dependencyTreeReducer(dependencyTree, {
|
|
@@ -33177,25 +32713,38 @@
|
|
|
33177
32713
|
react: react
|
|
33178
32714
|
});
|
|
33179
32715
|
} // [4] set query list
|
|
32716
|
+
// Do not set default query for suggestions
|
|
33180
32717
|
|
|
33181
32718
|
|
|
33182
|
-
if (
|
|
33183
|
-
var
|
|
33184
|
-
|
|
32719
|
+
if (isInternalComponentPresent && !transform_7(component.componentType)) {
|
|
32720
|
+
var _ref2 = getDefaultQuery(component, value) || {},
|
|
32721
|
+
defaultQuery = _ref2.query,
|
|
32722
|
+
defaultQueryOptions = _objectWithoutPropertiesLoose(_ref2, _excluded2);
|
|
33185
32723
|
|
|
33186
32724
|
queryList = queryReducer(queryList, {
|
|
33187
32725
|
type: 'SET_QUERY',
|
|
33188
32726
|
component: internalComponent,
|
|
33189
|
-
query:
|
|
32727
|
+
query: defaultQuery
|
|
33190
32728
|
});
|
|
33191
|
-
|
|
33192
|
-
|
|
33193
|
-
|
|
33194
|
-
|
|
33195
|
-
query: getQuery(component, value, componentType)
|
|
32729
|
+
queryOptions = queryOptionsReducer(queryOptions, {
|
|
32730
|
+
type: 'SET_QUERY_OPTIONS',
|
|
32731
|
+
component: internalComponent,
|
|
32732
|
+
options: _extends({}, componentQueryOptions, defaultQueryOptions)
|
|
33196
32733
|
});
|
|
33197
|
-
}
|
|
32734
|
+
}
|
|
32735
|
+
|
|
32736
|
+
var customQuery = getCustomQuery(component, value); // set custom query for main component
|
|
33198
32737
|
|
|
32738
|
+
queryList = queryReducer(queryList, {
|
|
32739
|
+
type: 'SET_QUERY',
|
|
32740
|
+
component: component.componentId,
|
|
32741
|
+
query: customQuery
|
|
32742
|
+
});
|
|
32743
|
+
queryOptions = queryOptionsReducer(queryOptions, {
|
|
32744
|
+
type: 'SET_QUERY_OPTIONS',
|
|
32745
|
+
component: component.componentId,
|
|
32746
|
+
options: _extends({}, componentQueryOptions)
|
|
32747
|
+
}); // Set component type in component props
|
|
33199
32748
|
|
|
33200
32749
|
compProps.componentType = componentType;
|
|
33201
32750
|
componentProps[component.componentId] = compProps;
|
|
@@ -33214,13 +32763,27 @@
|
|
|
33214
32763
|
|
|
33215
32764
|
componentCollection.forEach(function (component) {
|
|
33216
32765
|
// eslint-disable-next-line
|
|
33217
|
-
var _buildQuery =
|
|
32766
|
+
var _buildQuery = helper_25(component.componentId, dependencyTree, queryList, queryOptions),
|
|
33218
32767
|
queryObj = _buildQuery.queryObj,
|
|
33219
32768
|
options = _buildQuery.options;
|
|
33220
32769
|
|
|
33221
|
-
var
|
|
32770
|
+
var componentQueryOptions = options;
|
|
32771
|
+
var componentType = component.source.componentType;
|
|
32772
|
+
console.log('COMPONENT TYPE', componentType);
|
|
32773
|
+
|
|
32774
|
+
if (componentType !== constants_1$1.reactiveComponent) {
|
|
32775
|
+
// don't merge aggs, size
|
|
32776
|
+
var _ref3 = options || {},
|
|
32777
|
+
aggs = _ref3.aggs,
|
|
32778
|
+
size = _ref3.size,
|
|
32779
|
+
rest = _objectWithoutPropertiesLoose(_ref3, _excluded3);
|
|
32780
|
+
|
|
32781
|
+
componentQueryOptions = rest;
|
|
32782
|
+
}
|
|
32783
|
+
|
|
32784
|
+
var validOptions = ['aggs', 'from', 'sort']; // check if query or componentQueryOptions are valid - non-empty
|
|
33222
32785
|
|
|
33223
|
-
if (queryObj && !!Object.keys(queryObj).length ||
|
|
32786
|
+
if (queryObj && !!Object.keys(queryObj).length || componentQueryOptions && Object.keys(componentQueryOptions).some(function (item) {
|
|
33224
32787
|
return validOptions.includes(item);
|
|
33225
32788
|
})) {
|
|
33226
32789
|
var _extends2;
|
|
@@ -33235,8 +32798,12 @@
|
|
|
33235
32798
|
|
|
33236
32799
|
var currentQuery = _extends({
|
|
33237
32800
|
query: _extends({}, queryObj)
|
|
33238
|
-
},
|
|
32801
|
+
}, componentQueryOptions, queryOptions[component.componentId]);
|
|
33239
32802
|
|
|
32803
|
+
console.log('QUERY LOG build QUERY', component.componentId, queryObj);
|
|
32804
|
+
console.log('QUERY LOG build OPTIONS', component.componentId, componentQueryOptions);
|
|
32805
|
+
console.log('QUERY LOG OPTIONS (component)', component.componentId, queryOptions[component.componentId]);
|
|
32806
|
+
console.log('QUERY LOG', component.componentId, currentQuery);
|
|
33240
32807
|
queryLog = _extends({}, queryLog, (_extends2 = {}, _extends2[component.componentId] = currentQuery, _extends2));
|
|
33241
32808
|
|
|
33242
32809
|
if (settings.enableAppbase) {
|
|
@@ -33423,7 +32990,7 @@
|
|
|
33423
32990
|
});
|
|
33424
32991
|
}
|
|
33425
32992
|
|
|
33426
|
-
var version = "1.16.0-alpha.
|
|
32993
|
+
var version = "1.16.0-alpha.39";
|
|
33427
32994
|
|
|
33428
32995
|
var _templateObject$o, _templateObject2$b;
|
|
33429
32996
|
|