@appbaseio/reactivesearch-vue 1.16.0-alpha.36 → 1.16.0-alpha.37
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 +437 -896
- 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 +21 -16
- package/dist/cjs/MultiList.js +21 -15
- package/dist/cjs/ReactiveComponent.js +30 -60
- package/dist/cjs/ReactiveList.js +47 -47
- package/dist/cjs/SingleDropdownList.js +16 -11
- package/dist/cjs/SingleList.js +16 -11
- package/dist/cjs/initReactivesearch.js +97 -80
- 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 +21 -16
- package/dist/es/MultiList.js +21 -15
- package/dist/es/ReactiveComponent.js +30 -60
- package/dist/es/ReactiveList.js +47 -47
- package/dist/es/SingleDropdownList.js +16 -11
- package/dist/es/SingleList.js +16 -11
- package/dist/es/initReactivesearch.js +98 -81
- 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;
|
|
@@ -14094,9 +14128,10 @@
|
|
|
14094
14128
|
getQueryOptions = lib_8.getQueryOptions,
|
|
14095
14129
|
getClassName$1 = lib_8.getClassName,
|
|
14096
14130
|
parseHits = lib_8.parseHits,
|
|
14097
|
-
getOptionsFromQuery = lib_8.getOptionsFromQuery,
|
|
14098
14131
|
getCompositeAggsQuery = lib_8.getCompositeAggsQuery,
|
|
14099
|
-
getResultStats = lib_8.getResultStats
|
|
14132
|
+
getResultStats = lib_8.getResultStats,
|
|
14133
|
+
extractQueryFromCustomQuery = lib_8.extractQueryFromCustomQuery,
|
|
14134
|
+
getOptionsForCustomQuery = lib_8.getOptionsForCustomQuery;
|
|
14100
14135
|
var ReactiveList = {
|
|
14101
14136
|
name: 'ReactiveList',
|
|
14102
14137
|
components: {
|
|
@@ -14159,6 +14194,12 @@
|
|
|
14159
14194
|
});
|
|
14160
14195
|
}
|
|
14161
14196
|
|
|
14197
|
+
if (this.urlSortOption) {
|
|
14198
|
+
this.sortOptionIndex = this.$props.sortOptions.findIndex(function (s) {
|
|
14199
|
+
return s.label === _this.urlSortOption;
|
|
14200
|
+
}) || 0;
|
|
14201
|
+
}
|
|
14202
|
+
|
|
14162
14203
|
this.updateComponentProps(this.componentId, {
|
|
14163
14204
|
from: this.from
|
|
14164
14205
|
}, constants_1$1.reactiveList);
|
|
@@ -14288,19 +14329,11 @@
|
|
|
14288
14329
|
var options = getQueryOptions(this.$props);
|
|
14289
14330
|
options.from = 0;
|
|
14290
14331
|
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);
|
|
14332
|
+
var query = extractQueryFromCustomQuery(this.$defaultQuery);
|
|
14333
|
+
var queryOptions = getOptionsForCustomQuery(this.$defaultQuery);
|
|
14301
14334
|
|
|
14302
14335
|
if (queryOptions) {
|
|
14303
|
-
options = _extends({}, options,
|
|
14336
|
+
options = _extends({}, options, queryOptions);
|
|
14304
14337
|
} // Update calculated default query in store
|
|
14305
14338
|
|
|
14306
14339
|
|
|
@@ -14391,24 +14424,24 @@
|
|
|
14391
14424
|
options.from = this.$data.from;
|
|
14392
14425
|
|
|
14393
14426
|
if (this.sortOptions && this.sortOptions[this.sortOptionIndex]) {
|
|
14394
|
-
var
|
|
14427
|
+
var _ref;
|
|
14395
14428
|
|
|
14396
14429
|
var sortField = this.sortOptions[this.sortOptionIndex].dataField;
|
|
14397
14430
|
var sortBy = this.sortOptions[this.sortOptionIndex].sortBy;
|
|
14398
|
-
options.sort = [(
|
|
14431
|
+
options.sort = [(_ref = {}, _ref[sortField] = {
|
|
14399
14432
|
order: sortBy
|
|
14400
|
-
},
|
|
14433
|
+
}, _ref)]; // To handle sort options for RS API
|
|
14401
14434
|
|
|
14402
14435
|
this.updateComponentProps(this.componentId, {
|
|
14403
14436
|
dataField: sortField,
|
|
14404
14437
|
sortBy: sortBy
|
|
14405
14438
|
}, constants_1$1.reactiveList);
|
|
14406
14439
|
} else if (this.$props.sortBy) {
|
|
14407
|
-
var
|
|
14440
|
+
var _ref2;
|
|
14408
14441
|
|
|
14409
|
-
options.sort = [(
|
|
14442
|
+
options.sort = [(_ref2 = {}, _ref2[this.$props.dataField] = {
|
|
14410
14443
|
order: this.$props.sortBy
|
|
14411
|
-
},
|
|
14444
|
+
}, _ref2)];
|
|
14412
14445
|
} // Override sort query with defaultQuery's sort if defined
|
|
14413
14446
|
|
|
14414
14447
|
|
|
@@ -14416,20 +14449,13 @@
|
|
|
14416
14449
|
|
|
14417
14450
|
if (this.$props.defaultQuery) {
|
|
14418
14451
|
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
|
-
|
|
14452
|
+
options = _extends({}, options, getOptionsForCustomQuery(this.$defaultQuery)); // Update calculated default query in store
|
|
14425
14453
|
|
|
14426
14454
|
updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props);
|
|
14427
14455
|
} // execute is set to false at the time of mount
|
|
14428
14456
|
|
|
14429
14457
|
|
|
14430
|
-
var
|
|
14431
|
-
query = _ref4.query;
|
|
14432
|
-
|
|
14458
|
+
var query = extractQueryFromCustomQuery(this.$defaultQuery);
|
|
14433
14459
|
var execute = false;
|
|
14434
14460
|
this.setQueryOptions(this.$props.componentId, _extends({}, options, this.getAggsQuery()), execute);
|
|
14435
14461
|
|
|
@@ -14544,18 +14570,18 @@
|
|
|
14544
14570
|
}) : 0;
|
|
14545
14571
|
|
|
14546
14572
|
if (props.sortOptions[sortOptionIndex]) {
|
|
14547
|
-
var
|
|
14573
|
+
var _ref3;
|
|
14548
14574
|
|
|
14549
|
-
options.sort = [(
|
|
14575
|
+
options.sort = [(_ref3 = {}, _ref3[props.sortOptions[sortOptionIndex].dataField] = {
|
|
14550
14576
|
order: props.sortOptions[sortOptionIndex].sortBy
|
|
14551
|
-
},
|
|
14577
|
+
}, _ref3)];
|
|
14552
14578
|
}
|
|
14553
14579
|
} else if (props.sortBy) {
|
|
14554
|
-
var
|
|
14580
|
+
var _ref4;
|
|
14555
14581
|
|
|
14556
|
-
options.sort = [(
|
|
14582
|
+
options.sort = [(_ref4 = {}, _ref4[props.dataField] = {
|
|
14557
14583
|
order: props.sortBy
|
|
14558
|
-
},
|
|
14584
|
+
}, _ref4)];
|
|
14559
14585
|
}
|
|
14560
14586
|
|
|
14561
14587
|
this.setQueryOptions(this.$props.componentId, _extends({}, options, this.getAggsQuery()), true);
|
|
@@ -14658,16 +14684,16 @@
|
|
|
14658
14684
|
var index = e.target.value;
|
|
14659
14685
|
|
|
14660
14686
|
if (this.sortOptions && this.sortOptions[index]) {
|
|
14661
|
-
var
|
|
14687
|
+
var _ref5;
|
|
14662
14688
|
|
|
14663
14689
|
// This fixes issue #371 (where sorting a multi-result page with infinite loader breaks)
|
|
14664
14690
|
var options = getQueryOptions(this.$props);
|
|
14665
14691
|
options.from = 0;
|
|
14666
14692
|
var sortField = this.sortOptions[index].dataField;
|
|
14667
14693
|
var sortBy = this.sortOptions[index].sortBy;
|
|
14668
|
-
options.sort = [(
|
|
14694
|
+
options.sort = [(_ref5 = {}, _ref5[sortField] = {
|
|
14669
14695
|
order: sortBy
|
|
14670
|
-
},
|
|
14696
|
+
}, _ref5)];
|
|
14671
14697
|
this.sortOptionIndex = index; // To handle sort options for RS API
|
|
14672
14698
|
|
|
14673
14699
|
this.updateComponentProps(this.componentId, {
|
|
@@ -14675,8 +14701,11 @@
|
|
|
14675
14701
|
sortBy: sortBy
|
|
14676
14702
|
}, constants_1$1.reactiveList);
|
|
14677
14703
|
this.setQueryOptions(this.$props.componentId, options, true);
|
|
14704
|
+
this.setPage(0);
|
|
14678
14705
|
this.currentPageState = 0;
|
|
14679
14706
|
this.from = 0;
|
|
14707
|
+
var sortOption = this.$props.sortOptions[this.sortOptionIndex] ? this.$props.sortOptions[this.sortOptionIndex].label : null;
|
|
14708
|
+
this.setPageURL(this.$props.componentId + "sortOption", sortOption, this.$props.componentId + "sortOption", false, this.$props.URLParams);
|
|
14680
14709
|
}
|
|
14681
14710
|
},
|
|
14682
14711
|
triggerClickAnalytics: function triggerClickAnalytics(searchPosition, documentId) {
|
|
@@ -14788,6 +14817,7 @@
|
|
|
14788
14817
|
var mapStateToProps$1 = function mapStateToProps(state, props) {
|
|
14789
14818
|
return {
|
|
14790
14819
|
defaultPage: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value - 1,
|
|
14820
|
+
urlSortOption: state.selectedValues[props.componentId + "sortOption"] && state.selectedValues[props.componentId + "sortOption"].value,
|
|
14791
14821
|
hits: state.hits[props.componentId] && state.hits[props.componentId].hits,
|
|
14792
14822
|
rawData: state.rawData[props.componentId],
|
|
14793
14823
|
aggregationData: state.compositeAggregations[props.componentId],
|
|
@@ -14828,7 +14858,7 @@
|
|
|
14828
14858
|
options.size = size || 10;
|
|
14829
14859
|
|
|
14830
14860
|
var getSortOption = function getSortOption() {
|
|
14831
|
-
var
|
|
14861
|
+
var _ref7;
|
|
14832
14862
|
|
|
14833
14863
|
if (defaultSortOption) {
|
|
14834
14864
|
var sortOption = sortOptionsNew.find(function (option) {
|
|
@@ -14836,35 +14866,39 @@
|
|
|
14836
14866
|
});
|
|
14837
14867
|
|
|
14838
14868
|
if (sortOption) {
|
|
14839
|
-
var
|
|
14869
|
+
var _ref6;
|
|
14840
14870
|
|
|
14841
|
-
return
|
|
14871
|
+
return _ref6 = {}, _ref6[sortOption.dataField] = {
|
|
14842
14872
|
order: sortOption.sortBy
|
|
14843
|
-
},
|
|
14873
|
+
}, _ref6;
|
|
14844
14874
|
}
|
|
14845
14875
|
}
|
|
14846
14876
|
|
|
14847
|
-
return
|
|
14877
|
+
return _ref7 = {}, _ref7[sortOptionsNew[0].dataField] = {
|
|
14848
14878
|
order: sortOptionsNew[0].sortBy
|
|
14849
|
-
},
|
|
14879
|
+
}, _ref7;
|
|
14850
14880
|
};
|
|
14851
14881
|
|
|
14852
14882
|
if (sortOptionsNew) {
|
|
14853
14883
|
options.sort = [getSortOption()];
|
|
14854
14884
|
} else if (sortBy) {
|
|
14855
|
-
var
|
|
14885
|
+
var _ref8;
|
|
14856
14886
|
|
|
14857
|
-
options.sort = [(
|
|
14887
|
+
options.sort = [(_ref8 = {}, _ref8[dataField] = {
|
|
14858
14888
|
order: sortBy
|
|
14859
|
-
},
|
|
14889
|
+
}, _ref8)];
|
|
14860
14890
|
}
|
|
14861
14891
|
|
|
14862
14892
|
return options;
|
|
14863
14893
|
};
|
|
14864
14894
|
|
|
14895
|
+
ReactiveList.hasInternalComponent = function () {
|
|
14896
|
+
return true;
|
|
14897
|
+
};
|
|
14898
|
+
|
|
14865
14899
|
var RLConnected = ComponentWrapper$1(connect(mapStateToProps$1, mapDispatchtoProps)(ReactiveList), {
|
|
14866
14900
|
componentType: constants_1$1.reactiveList,
|
|
14867
|
-
internalComponent:
|
|
14901
|
+
internalComponent: ReactiveList.hasInternalComponent()
|
|
14868
14902
|
});
|
|
14869
14903
|
|
|
14870
14904
|
ReactiveList.install = function (Vue) {
|
|
@@ -14918,609 +14952,94 @@
|
|
|
14918
14952
|
|
|
14919
14953
|
var len = qs.length; // maxKeys <= 0 means that we should not limit keys count
|
|
14920
14954
|
|
|
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);
|
|
14955
|
+
if (maxKeys > 0 && len > maxKeys) {
|
|
14956
|
+
len = maxKeys;
|
|
14957
|
+
}
|
|
15429
14958
|
|
|
15430
|
-
|
|
15431
|
-
|
|
15432
|
-
|
|
15433
|
-
|
|
15434
|
-
|
|
15435
|
-
|
|
15436
|
-
|
|
15437
|
-
};
|
|
14959
|
+
for (var i = 0; i < len; ++i) {
|
|
14960
|
+
var x = qs[i].replace(regexp, '%20'),
|
|
14961
|
+
idx = x.indexOf(eq),
|
|
14962
|
+
kstr,
|
|
14963
|
+
vstr,
|
|
14964
|
+
k,
|
|
14965
|
+
v;
|
|
15438
14966
|
|
|
15439
|
-
|
|
15440
|
-
|
|
15441
|
-
|
|
15442
|
-
|
|
15443
|
-
|
|
15444
|
-
|
|
15445
|
-
|
|
15446
|
-
};
|
|
14967
|
+
if (idx >= 0) {
|
|
14968
|
+
kstr = x.substr(0, idx);
|
|
14969
|
+
vstr = x.substr(idx + 1);
|
|
14970
|
+
} else {
|
|
14971
|
+
kstr = x;
|
|
14972
|
+
vstr = '';
|
|
14973
|
+
}
|
|
15447
14974
|
|
|
15448
|
-
|
|
14975
|
+
k = decodeURIComponent(kstr);
|
|
14976
|
+
v = decodeURIComponent(vstr);
|
|
15449
14977
|
|
|
15450
|
-
|
|
15451
|
-
|
|
15452
|
-
|
|
15453
|
-
|
|
14978
|
+
if (!hasOwnProperty(obj, k)) {
|
|
14979
|
+
obj[k] = v;
|
|
14980
|
+
} else if (Array.isArray(obj[k])) {
|
|
14981
|
+
obj[k].push(v);
|
|
14982
|
+
} else {
|
|
14983
|
+
obj[k] = [obj[k], v];
|
|
14984
|
+
}
|
|
14985
|
+
}
|
|
15454
14986
|
|
|
15455
|
-
|
|
15456
|
-
|
|
15457
|
-
headers: {
|
|
15458
|
-
location: url
|
|
15459
|
-
}
|
|
15460
|
-
});
|
|
15461
|
-
};
|
|
14987
|
+
return obj;
|
|
14988
|
+
};
|
|
15462
14989
|
|
|
15463
|
-
|
|
15464
|
-
self.Request = Request;
|
|
15465
|
-
self.Response = Response;
|
|
14990
|
+
// Copyright Joyent, Inc. and other Node contributors.
|
|
15466
14991
|
|
|
15467
|
-
|
|
15468
|
-
|
|
15469
|
-
|
|
15470
|
-
|
|
14992
|
+
var stringifyPrimitive = function stringifyPrimitive(v) {
|
|
14993
|
+
switch (typeof v) {
|
|
14994
|
+
case 'string':
|
|
14995
|
+
return v;
|
|
15471
14996
|
|
|
15472
|
-
|
|
15473
|
-
|
|
15474
|
-
status: xhr.status,
|
|
15475
|
-
statusText: xhr.statusText,
|
|
15476
|
-
headers: parseHeaders(xhr.getAllResponseHeaders() || '')
|
|
15477
|
-
};
|
|
15478
|
-
options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL');
|
|
15479
|
-
var body = 'response' in xhr ? xhr.response : xhr.responseText;
|
|
15480
|
-
resolve(new Response(body, options));
|
|
15481
|
-
};
|
|
14997
|
+
case 'boolean':
|
|
14998
|
+
return v ? 'true' : 'false';
|
|
15482
14999
|
|
|
15483
|
-
|
|
15484
|
-
|
|
15485
|
-
};
|
|
15000
|
+
case 'number':
|
|
15001
|
+
return isFinite(v) ? v : '';
|
|
15486
15002
|
|
|
15487
|
-
|
|
15488
|
-
|
|
15489
|
-
|
|
15003
|
+
default:
|
|
15004
|
+
return '';
|
|
15005
|
+
}
|
|
15006
|
+
};
|
|
15490
15007
|
|
|
15491
|
-
|
|
15008
|
+
var encode = function encode(obj, sep, eq, name) {
|
|
15009
|
+
sep = sep || '&';
|
|
15010
|
+
eq = eq || '=';
|
|
15492
15011
|
|
|
15493
|
-
|
|
15494
|
-
|
|
15495
|
-
|
|
15496
|
-
xhr.withCredentials = false;
|
|
15497
|
-
}
|
|
15012
|
+
if (obj === null) {
|
|
15013
|
+
obj = undefined;
|
|
15014
|
+
}
|
|
15498
15015
|
|
|
15499
|
-
|
|
15500
|
-
|
|
15501
|
-
|
|
15016
|
+
if (typeof obj === 'object') {
|
|
15017
|
+
return Object.keys(obj).map(function (k) {
|
|
15018
|
+
var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;
|
|
15502
15019
|
|
|
15503
|
-
|
|
15504
|
-
|
|
15505
|
-
|
|
15506
|
-
|
|
15507
|
-
|
|
15508
|
-
|
|
15020
|
+
if (Array.isArray(obj[k])) {
|
|
15021
|
+
return obj[k].map(function (v) {
|
|
15022
|
+
return ks + encodeURIComponent(stringifyPrimitive(v));
|
|
15023
|
+
}).join(sep);
|
|
15024
|
+
} else {
|
|
15025
|
+
return ks + encodeURIComponent(stringifyPrimitive(obj[k]));
|
|
15026
|
+
}
|
|
15027
|
+
}).filter(Boolean).join(sep);
|
|
15028
|
+
}
|
|
15509
15029
|
|
|
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;
|
|
15030
|
+
if (!name) return '';
|
|
15031
|
+
return encodeURIComponent(stringifyPrimitive(name)) + eq + encodeURIComponent(stringifyPrimitive(obj));
|
|
15032
|
+
};
|
|
15517
15033
|
|
|
15518
|
-
|
|
15519
|
-
module.exports = fetch; // Needed for TypeScript consumers without esModuleInterop.
|
|
15034
|
+
var querystring = createCommonjsModule(function (module, exports) {
|
|
15520
15035
|
|
|
15521
|
-
|
|
15522
|
-
|
|
15036
|
+
exports.decode = exports.parse = decode;
|
|
15037
|
+
exports.encode = exports.stringify = encode;
|
|
15523
15038
|
});
|
|
15039
|
+
var querystring_1 = querystring.decode;
|
|
15040
|
+
var querystring_2 = querystring.parse;
|
|
15041
|
+
var querystring_3 = querystring.encode;
|
|
15042
|
+
var querystring_4 = querystring.stringify;
|
|
15524
15043
|
|
|
15525
15044
|
var _typeof$1 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
|
|
15526
15045
|
return typeof obj;
|
|
@@ -15852,17 +15371,10 @@
|
|
|
15852
15371
|
}
|
|
15853
15372
|
|
|
15854
15373
|
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
15374
|
/**
|
|
15862
15375
|
* Credentials can be provided as a part of the URL,
|
|
15863
15376
|
* as username, password args or as a credentials argument directly */
|
|
15864
15377
|
|
|
15865
|
-
|
|
15866
15378
|
if (typeof config.credentials === 'string' && config.credentials !== '') {
|
|
15867
15379
|
// eslint-disable-next-line
|
|
15868
15380
|
credentials = config.credentials;
|
|
@@ -15870,6 +15382,12 @@
|
|
|
15870
15382
|
credentials = config.username + ':' + config.password;
|
|
15871
15383
|
}
|
|
15872
15384
|
|
|
15385
|
+
if (!config.mongodb) {
|
|
15386
|
+
if (isAppbase(url) && credentials === null) {
|
|
15387
|
+
throw new Error('Authentication information is not present. Did you add credentials?');
|
|
15388
|
+
}
|
|
15389
|
+
}
|
|
15390
|
+
|
|
15873
15391
|
this.url = url;
|
|
15874
15392
|
this.protocol = protocol;
|
|
15875
15393
|
this.app = config.app;
|
|
@@ -15967,7 +15485,7 @@
|
|
|
15967
15485
|
var transformedRequest = Object.assign({}, ts);
|
|
15968
15486
|
var url = transformedRequest.url;
|
|
15969
15487
|
delete transformedRequest.url;
|
|
15970
|
-
return
|
|
15488
|
+
return fetch$1(url || finalURL, Object.assign({}, transformedRequest, {
|
|
15971
15489
|
// apply timestamp header for RS API
|
|
15972
15490
|
headers: isRSAPI && !isMongoRequest ? Object.assign({}, transformedRequest.headers, {
|
|
15973
15491
|
'x-timestamp': new Date().getTime()
|
|
@@ -17223,14 +16741,14 @@
|
|
|
17223
16741
|
this.updateState(this.$props);
|
|
17224
16742
|
},
|
|
17225
16743
|
analyticsConfig: function analyticsConfig(newVal, oldVal) {
|
|
17226
|
-
if (!
|
|
16744
|
+
if (!helper_22(newVal, oldVal)) {
|
|
17227
16745
|
if (this.store) {
|
|
17228
16746
|
this.store.dispatch(analytics_3$1(newVal));
|
|
17229
16747
|
}
|
|
17230
16748
|
}
|
|
17231
16749
|
},
|
|
17232
16750
|
appbaseConfig: function appbaseConfig(newVal, oldVal) {
|
|
17233
|
-
if (!
|
|
16751
|
+
if (!helper_22(newVal, oldVal)) {
|
|
17234
16752
|
if (this.store) {
|
|
17235
16753
|
this.store.dispatch(analytics_3$1(newVal));
|
|
17236
16754
|
}
|
|
@@ -19871,7 +19389,8 @@
|
|
|
19871
19389
|
var debounce$1 = lib_8.debounce,
|
|
19872
19390
|
checkValueChange = lib_8.checkValueChange,
|
|
19873
19391
|
getClassName$3 = lib_8.getClassName,
|
|
19874
|
-
|
|
19392
|
+
extractQueryFromCustomQuery$1 = lib_8.extractQueryFromCustomQuery,
|
|
19393
|
+
getOptionsForCustomQuery$1 = lib_8.getOptionsForCustomQuery,
|
|
19875
19394
|
isEqual$4 = lib_8.isEqual,
|
|
19876
19395
|
getCompositeAggsQuery$1 = lib_8.getCompositeAggsQuery,
|
|
19877
19396
|
withClickIds = lib_8.withClickIds,
|
|
@@ -20233,7 +19752,7 @@
|
|
|
20233
19752
|
// returns size and aggs property
|
|
20234
19753
|
getBasicQueryOptions: function getBasicQueryOptions() {
|
|
20235
19754
|
var aggregationField = this.$props.aggregationField;
|
|
20236
|
-
var queryOptions =
|
|
19755
|
+
var queryOptions = helper_24(this.$props);
|
|
20237
19756
|
|
|
20238
19757
|
if (aggregationField) {
|
|
20239
19758
|
queryOptions.aggs = getCompositeAggsQuery$1({
|
|
@@ -20329,12 +19848,13 @@
|
|
|
20329
19848
|
|
|
20330
19849
|
if (this.defaultQuery) {
|
|
20331
19850
|
var defaultQueryToBeSet = this.defaultQuery(value, props) || {};
|
|
19851
|
+
var defaultQueryObj = extractQueryFromCustomQuery$1(defaultQueryToBeSet);
|
|
20332
19852
|
|
|
20333
|
-
if (
|
|
20334
|
-
query =
|
|
19853
|
+
if (defaultQueryObj) {
|
|
19854
|
+
query = defaultQueryObj;
|
|
20335
19855
|
}
|
|
20336
19856
|
|
|
20337
|
-
defaultQueryOptions =
|
|
19857
|
+
defaultQueryOptions = getOptionsForCustomQuery$1(defaultQueryToBeSet); // Update calculated default query in store
|
|
20338
19858
|
|
|
20339
19859
|
updateDefaultQuery(props.componentId, this.setDefaultQuery, props, value);
|
|
20340
19860
|
}
|
|
@@ -20358,13 +19878,13 @@
|
|
|
20358
19878
|
|
|
20359
19879
|
if (customQuery) {
|
|
20360
19880
|
var customQueryTobeSet = customQuery(value, props);
|
|
20361
|
-
var queryTobeSet = customQueryTobeSet
|
|
19881
|
+
var queryTobeSet = extractQueryFromCustomQuery$1(customQueryTobeSet);
|
|
20362
19882
|
|
|
20363
19883
|
if (queryTobeSet) {
|
|
20364
19884
|
query = queryTobeSet;
|
|
20365
19885
|
}
|
|
20366
19886
|
|
|
20367
|
-
customQueryOptions =
|
|
19887
|
+
customQueryOptions = getOptionsForCustomQuery$1(customQueryTobeSet);
|
|
20368
19888
|
updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
|
|
20369
19889
|
this.setQueryOptions(componentId, _extends({}, this.queryOptions, customQueryOptions), false);
|
|
20370
19890
|
}
|
|
@@ -21053,6 +20573,10 @@
|
|
|
21053
20573
|
};
|
|
21054
20574
|
};
|
|
21055
20575
|
|
|
20576
|
+
DataSearch.hasInternalComponent = function () {
|
|
20577
|
+
return true;
|
|
20578
|
+
};
|
|
20579
|
+
|
|
21056
20580
|
var mapStateToProps$3 = function mapStateToProps(state, props) {
|
|
21057
20581
|
return {
|
|
21058
20582
|
selectedValue: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value || null,
|
|
@@ -21090,7 +20614,7 @@
|
|
|
21090
20614
|
};
|
|
21091
20615
|
var DSConnected = ComponentWrapper$1(connect(mapStateToProps$3, mapDispatchToProps$2)(DataSearch), {
|
|
21092
20616
|
componentType: constants_1$1.dataSearch,
|
|
21093
|
-
internalComponent:
|
|
20617
|
+
internalComponent: DataSearch.hasInternalComponent()
|
|
21094
20618
|
});
|
|
21095
20619
|
|
|
21096
20620
|
DataSearch.install = function (Vue) {
|
|
@@ -21198,8 +20722,9 @@
|
|
|
21198
20722
|
var getQueryOptions$1 = lib_8.getQueryOptions,
|
|
21199
20723
|
checkValueChange$1 = lib_8.checkValueChange,
|
|
21200
20724
|
getClassName$4 = lib_8.getClassName,
|
|
21201
|
-
|
|
21202
|
-
|
|
20725
|
+
isEqual$5 = lib_8.isEqual,
|
|
20726
|
+
extractQueryFromCustomQuery$2 = lib_8.extractQueryFromCustomQuery,
|
|
20727
|
+
getOptionsForCustomQuery$2 = lib_8.getOptionsForCustomQuery;
|
|
21203
20728
|
var SingleList = {
|
|
21204
20729
|
name: 'SingleList',
|
|
21205
20730
|
props: {
|
|
@@ -21441,12 +20966,13 @@
|
|
|
21441
20966
|
|
|
21442
20967
|
if (this.defaultQuery) {
|
|
21443
20968
|
var defaultQueryToBeSet = this.defaultQuery(value, props) || {};
|
|
20969
|
+
var defaultQueryObj = extractQueryFromCustomQuery$2(defaultQueryToBeSet);
|
|
21444
20970
|
|
|
21445
|
-
if (
|
|
21446
|
-
query =
|
|
20971
|
+
if (defaultQueryObj) {
|
|
20972
|
+
query = defaultQueryObj;
|
|
21447
20973
|
}
|
|
21448
20974
|
|
|
21449
|
-
defaultQueryOptions =
|
|
20975
|
+
defaultQueryOptions = getOptionsForCustomQuery$2(defaultQueryToBeSet); // Update calculated default query in store
|
|
21450
20976
|
|
|
21451
20977
|
updateDefaultQuery(props.componentId, this.setDefaultQuery, props, value);
|
|
21452
20978
|
}
|
|
@@ -21465,10 +20991,9 @@
|
|
|
21465
20991
|
var customQueryOptions;
|
|
21466
20992
|
|
|
21467
20993
|
if (customQuery) {
|
|
21468
|
-
var
|
|
21469
|
-
|
|
21470
|
-
|
|
21471
|
-
customQueryOptions = getOptionsFromQuery$2(customQuery(value, props));
|
|
20994
|
+
var customQueryCalc = customQuery(value, props);
|
|
20995
|
+
query = extractQueryFromCustomQuery$2(customQueryCalc);
|
|
20996
|
+
customQueryOptions = getOptionsForCustomQuery$2(customQueryCalc);
|
|
21472
20997
|
updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
|
|
21473
20998
|
}
|
|
21474
20999
|
|
|
@@ -21492,7 +21017,7 @@
|
|
|
21492
21017
|
|
|
21493
21018
|
if (props.defaultQuery) {
|
|
21494
21019
|
var value = this.$data.currentValue;
|
|
21495
|
-
var defaultQueryOptions =
|
|
21020
|
+
var defaultQueryOptions = getOptionsForCustomQuery$2(props.defaultQuery(value, props));
|
|
21496
21021
|
this.setQueryOptions(this.internalComponent, _extends({}, queryOptions, defaultQueryOptions));
|
|
21497
21022
|
} else {
|
|
21498
21023
|
this.setQueryOptions(this.internalComponent, queryOptions);
|
|
@@ -21637,6 +21162,10 @@
|
|
|
21637
21162
|
return query;
|
|
21638
21163
|
};
|
|
21639
21164
|
|
|
21165
|
+
SingleList.hasInternalComponent = function () {
|
|
21166
|
+
return true;
|
|
21167
|
+
};
|
|
21168
|
+
|
|
21640
21169
|
var mapStateToProps$4 = function mapStateToProps(state, props) {
|
|
21641
21170
|
return {
|
|
21642
21171
|
options: props.nestedField && state.aggregations[props.componentId] ? state.aggregations[props.componentId].reactivesearch_nested : state.aggregations[props.componentId],
|
|
@@ -21658,7 +21187,7 @@
|
|
|
21658
21187
|
};
|
|
21659
21188
|
var ListConnected = ComponentWrapper$1(connect(mapStateToProps$4, mapDispatchtoProps$2)(SingleList), {
|
|
21660
21189
|
componentType: constants_1$1.singleList,
|
|
21661
|
-
internalComponent:
|
|
21190
|
+
internalComponent: SingleList.hasInternalComponent()
|
|
21662
21191
|
});
|
|
21663
21192
|
|
|
21664
21193
|
SingleList.install = function (Vue) {
|
|
@@ -21676,7 +21205,8 @@
|
|
|
21676
21205
|
getQueryOptions$2 = lib_8.getQueryOptions,
|
|
21677
21206
|
checkValueChange$2 = lib_8.checkValueChange,
|
|
21678
21207
|
getClassName$5 = lib_8.getClassName,
|
|
21679
|
-
|
|
21208
|
+
extractQueryFromCustomQuery$3 = lib_8.extractQueryFromCustomQuery,
|
|
21209
|
+
getOptionsForCustomQuery$3 = lib_8.getOptionsForCustomQuery;
|
|
21680
21210
|
var MultiList = {
|
|
21681
21211
|
name: 'MultiList',
|
|
21682
21212
|
props: {
|
|
@@ -21995,12 +21525,13 @@
|
|
|
21995
21525
|
|
|
21996
21526
|
if (this.defaultQuery) {
|
|
21997
21527
|
var defaultQueryToBeSet = this.defaultQuery(value, props) || {};
|
|
21528
|
+
var defaultQueryObj = extractQueryFromCustomQuery$3(defaultQueryToBeSet);
|
|
21998
21529
|
|
|
21999
|
-
if (
|
|
22000
|
-
query =
|
|
21530
|
+
if (defaultQueryObj) {
|
|
21531
|
+
query = defaultQueryObj;
|
|
22001
21532
|
}
|
|
22002
21533
|
|
|
22003
|
-
defaultQueryOptions =
|
|
21534
|
+
defaultQueryOptions = getOptionsForCustomQuery$3(defaultQueryToBeSet); // Update calculated default query in store
|
|
22004
21535
|
|
|
22005
21536
|
updateDefaultQuery(props.componentId, this.setDefaultQuery, props, value);
|
|
22006
21537
|
}
|
|
@@ -22019,10 +21550,9 @@
|
|
|
22019
21550
|
var customQueryOptions;
|
|
22020
21551
|
|
|
22021
21552
|
if (customQuery) {
|
|
22022
|
-
var
|
|
22023
|
-
|
|
22024
|
-
|
|
22025
|
-
customQueryOptions = getOptionsFromQuery$3(customQuery(value, props));
|
|
21553
|
+
var customQueryCalc = customQuery(value, props);
|
|
21554
|
+
query = extractQueryFromCustomQuery$3(customQueryCalc);
|
|
21555
|
+
customQueryOptions = getOptionsForCustomQuery$3(customQueryCalc);
|
|
22026
21556
|
updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
|
|
22027
21557
|
}
|
|
22028
21558
|
|
|
@@ -22046,7 +21576,7 @@
|
|
|
22046
21576
|
|
|
22047
21577
|
if (props.defaultQuery) {
|
|
22048
21578
|
var value = Object.keys(this.$data.currentValue);
|
|
22049
|
-
var defaultQueryOptions =
|
|
21579
|
+
var defaultQueryOptions = getOptionsForCustomQuery$3(props.defaultQuery(value, props));
|
|
22050
21580
|
this.setQueryOptions(this.internalComponent, _extends({}, queryOptions, defaultQueryOptions));
|
|
22051
21581
|
} else {
|
|
22052
21582
|
this.setQueryOptions(this.internalComponent, queryOptions);
|
|
@@ -22155,12 +21685,12 @@
|
|
|
22155
21685
|
|
|
22156
21686
|
if (props.queryFormat === 'or') {
|
|
22157
21687
|
if (props.showMissing) {
|
|
22158
|
-
var _type,
|
|
21688
|
+
var _type, _ref;
|
|
22159
21689
|
|
|
22160
21690
|
var hasMissingTerm = value.includes(props.missingLabel);
|
|
22161
|
-
var should = [(
|
|
21691
|
+
var should = [(_ref = {}, _ref[type] = (_type = {}, _type[props.dataField] = value.filter(function (item) {
|
|
22162
21692
|
return item !== props.missingLabel;
|
|
22163
|
-
}), _type),
|
|
21693
|
+
}), _type), _ref)];
|
|
22164
21694
|
|
|
22165
21695
|
if (hasMissingTerm) {
|
|
22166
21696
|
should = should.concat({
|
|
@@ -22187,9 +21717,9 @@
|
|
|
22187
21717
|
} else {
|
|
22188
21718
|
// adds a sub-query with must as an array of objects for each term/value
|
|
22189
21719
|
var queryArray = value.map(function (item) {
|
|
22190
|
-
var _type3,
|
|
21720
|
+
var _type3, _ref2;
|
|
22191
21721
|
|
|
22192
|
-
return
|
|
21722
|
+
return _ref2 = {}, _ref2[type] = (_type3 = {}, _type3[props.dataField] = item, _type3), _ref2;
|
|
22193
21723
|
});
|
|
22194
21724
|
listQuery = {
|
|
22195
21725
|
bool: {
|
|
@@ -22239,9 +21769,14 @@
|
|
|
22239
21769
|
setCustomQuery: setCustomQuery$2,
|
|
22240
21770
|
setDefaultQuery: setDefaultQuery$3
|
|
22241
21771
|
};
|
|
21772
|
+
|
|
21773
|
+
MultiList.hasInternalComponent = function () {
|
|
21774
|
+
return true;
|
|
21775
|
+
};
|
|
21776
|
+
|
|
22242
21777
|
var ListConnected$1 = ComponentWrapper$1(connect(mapStateToProps$5, mapDispatchtoProps$3)(MultiList), {
|
|
22243
21778
|
componentType: constants_1$1.multiList,
|
|
22244
|
-
internalComponent:
|
|
21779
|
+
internalComponent: MultiList.hasInternalComponent()
|
|
22245
21780
|
});
|
|
22246
21781
|
|
|
22247
21782
|
MultiList.install = function (Vue) {
|
|
@@ -22568,9 +22103,10 @@
|
|
|
22568
22103
|
checkValueChange$3 = lib_8.checkValueChange,
|
|
22569
22104
|
checkPropChange$1 = lib_8.checkPropChange,
|
|
22570
22105
|
getClassName$7 = lib_8.getClassName,
|
|
22571
|
-
getOptionsFromQuery$4 = lib_8.getOptionsFromQuery,
|
|
22572
22106
|
isEqual$7 = lib_8.isEqual,
|
|
22573
|
-
getCompositeAggsQuery$2 = lib_8.getCompositeAggsQuery
|
|
22107
|
+
getCompositeAggsQuery$2 = lib_8.getCompositeAggsQuery,
|
|
22108
|
+
extractQueryFromCustomQuery$4 = lib_8.extractQueryFromCustomQuery,
|
|
22109
|
+
getOptionsForCustomQuery$4 = lib_8.getOptionsForCustomQuery;
|
|
22574
22110
|
var SingleDropdownList = {
|
|
22575
22111
|
name: 'SingleDropdownList',
|
|
22576
22112
|
data: function data() {
|
|
@@ -22824,12 +22360,13 @@
|
|
|
22824
22360
|
|
|
22825
22361
|
if (this.defaultQuery) {
|
|
22826
22362
|
var defaultQueryToBeSet = this.defaultQuery(value, props) || {};
|
|
22363
|
+
var defaultQueryObj = extractQueryFromCustomQuery$4(defaultQueryToBeSet);
|
|
22827
22364
|
|
|
22828
|
-
if (
|
|
22829
|
-
query =
|
|
22365
|
+
if (defaultQueryObj) {
|
|
22366
|
+
query = defaultQueryObj;
|
|
22830
22367
|
}
|
|
22831
22368
|
|
|
22832
|
-
defaultQueryOptions =
|
|
22369
|
+
defaultQueryOptions = getOptionsForCustomQuery$4(defaultQueryToBeSet); // Update calculated default query in store
|
|
22833
22370
|
|
|
22834
22371
|
updateDefaultQuery(props.componentId, this.setDefaultQuery, props, value);
|
|
22835
22372
|
}
|
|
@@ -22848,10 +22385,9 @@
|
|
|
22848
22385
|
var customQueryOptions;
|
|
22849
22386
|
|
|
22850
22387
|
if (customQuery) {
|
|
22851
|
-
var
|
|
22852
|
-
|
|
22853
|
-
|
|
22854
|
-
customQueryOptions = getOptionsFromQuery$4(customQuery(value, props));
|
|
22388
|
+
var customQueryCalc = customQuery(value, props);
|
|
22389
|
+
query = extractQueryFromCustomQuery$4(customQueryCalc);
|
|
22390
|
+
customQueryOptions = getOptionsForCustomQuery$4(customQueryCalc);
|
|
22855
22391
|
updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
|
|
22856
22392
|
}
|
|
22857
22393
|
|
|
@@ -22889,7 +22425,7 @@
|
|
|
22889
22425
|
|
|
22890
22426
|
if (props.defaultQuery) {
|
|
22891
22427
|
var value = this.$data.currentValue;
|
|
22892
|
-
var defaultQueryOptions =
|
|
22428
|
+
var defaultQueryOptions = getOptionsForCustomQuery$4(props.defaultQuery(value, props));
|
|
22893
22429
|
this.setQueryOptions(this.internalComponent, _extends({}, queryOptions, defaultQueryOptions));
|
|
22894
22430
|
} else {
|
|
22895
22431
|
this.setQueryOptions(this.internalComponent, queryOptions);
|
|
@@ -22981,6 +22517,10 @@
|
|
|
22981
22517
|
}) : getAggsQuery(queryOptions, props);
|
|
22982
22518
|
};
|
|
22983
22519
|
|
|
22520
|
+
SingleDropdownList.hasInternalComponent = function () {
|
|
22521
|
+
return true;
|
|
22522
|
+
};
|
|
22523
|
+
|
|
22984
22524
|
var mapStateToProps$6 = function mapStateToProps(state, props) {
|
|
22985
22525
|
return {
|
|
22986
22526
|
options: props.nestedField && state.aggregations[props.componentId] ? state.aggregations[props.componentId].reactivesearch_nested : state.aggregations[props.componentId],
|
|
@@ -23002,7 +22542,7 @@
|
|
|
23002
22542
|
};
|
|
23003
22543
|
var ListConnected$2 = ComponentWrapper$1(connect(mapStateToProps$6, mapDispatchtoProps$4)(SingleDropdownList), {
|
|
23004
22544
|
componentType: constants_1$1.singleDropdownList,
|
|
23005
|
-
internalComponent:
|
|
22545
|
+
internalComponent: SingleDropdownList.hasInternalComponent()
|
|
23006
22546
|
});
|
|
23007
22547
|
|
|
23008
22548
|
SingleDropdownList.install = function (Vue) {
|
|
@@ -23021,8 +22561,9 @@
|
|
|
23021
22561
|
checkValueChange$4 = lib_8.checkValueChange,
|
|
23022
22562
|
checkPropChange$2 = lib_8.checkPropChange,
|
|
23023
22563
|
getClassName$8 = lib_8.getClassName,
|
|
23024
|
-
|
|
23025
|
-
|
|
22564
|
+
getCompositeAggsQuery$3 = lib_8.getCompositeAggsQuery,
|
|
22565
|
+
extractQueryFromCustomQuery$5 = lib_8.extractQueryFromCustomQuery,
|
|
22566
|
+
getOptionsForCustomQuery$5 = lib_8.getOptionsForCustomQuery;
|
|
23026
22567
|
var MultiDropdownList = {
|
|
23027
22568
|
name: 'MultiDropdownList',
|
|
23028
22569
|
data: function data() {
|
|
@@ -23351,12 +22892,13 @@
|
|
|
23351
22892
|
|
|
23352
22893
|
if (this.defaultQuery) {
|
|
23353
22894
|
var defaultQueryToBeSet = this.defaultQuery(value, props) || {};
|
|
22895
|
+
var defaultQueryObj = extractQueryFromCustomQuery$5(defaultQueryToBeSet);
|
|
23354
22896
|
|
|
23355
|
-
if (
|
|
23356
|
-
query =
|
|
22897
|
+
if (defaultQueryObj) {
|
|
22898
|
+
query = defaultQueryObj;
|
|
23357
22899
|
}
|
|
23358
22900
|
|
|
23359
|
-
defaultQueryOptions =
|
|
22901
|
+
defaultQueryOptions = getOptionsForCustomQuery$5(defaultQueryToBeSet); // Update calculated default query in store
|
|
23360
22902
|
|
|
23361
22903
|
updateDefaultQuery(props.componentId, this.setDefaultQuery, props, value);
|
|
23362
22904
|
}
|
|
@@ -23375,10 +22917,9 @@
|
|
|
23375
22917
|
var customQueryOptions;
|
|
23376
22918
|
|
|
23377
22919
|
if (customQuery) {
|
|
23378
|
-
var
|
|
23379
|
-
|
|
23380
|
-
|
|
23381
|
-
customQueryOptions = getOptionsFromQuery$5(customQuery(value, props));
|
|
22920
|
+
var customQueryCalc = customQuery(value, props);
|
|
22921
|
+
query = extractQueryFromCustomQuery$5(customQueryCalc);
|
|
22922
|
+
customQueryOptions = getOptionsForCustomQuery$5(customQueryCalc);
|
|
23382
22923
|
updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
|
|
23383
22924
|
}
|
|
23384
22925
|
|
|
@@ -23416,7 +22957,7 @@
|
|
|
23416
22957
|
|
|
23417
22958
|
if (props.defaultQuery) {
|
|
23418
22959
|
var value = Object.keys(this.$data.currentValue);
|
|
23419
|
-
var defaultQueryOptions =
|
|
22960
|
+
var defaultQueryOptions = getOptionsForCustomQuery$5(props.defaultQuery(value, props));
|
|
23420
22961
|
this.setQueryOptions(this.internalComponent, _extends({}, queryOptions, defaultQueryOptions));
|
|
23421
22962
|
} else {
|
|
23422
22963
|
this.setQueryOptions(this.internalComponent, queryOptions);
|
|
@@ -23475,12 +23016,12 @@
|
|
|
23475
23016
|
|
|
23476
23017
|
if (props.queryFormat === 'or') {
|
|
23477
23018
|
if (props.showMissing) {
|
|
23478
|
-
var _type,
|
|
23019
|
+
var _type, _ref;
|
|
23479
23020
|
|
|
23480
23021
|
var hasMissingTerm = value.includes(props.missingLabel);
|
|
23481
|
-
var should = [(
|
|
23022
|
+
var should = [(_ref = {}, _ref[type] = (_type = {}, _type[props.dataField] = value.filter(function (item) {
|
|
23482
23023
|
return item !== props.missingLabel;
|
|
23483
|
-
}), _type),
|
|
23024
|
+
}), _type), _ref)];
|
|
23484
23025
|
|
|
23485
23026
|
if (hasMissingTerm) {
|
|
23486
23027
|
should = should.concat({
|
|
@@ -23507,9 +23048,9 @@
|
|
|
23507
23048
|
} else {
|
|
23508
23049
|
// adds a sub-query with must as an array of objects for each term/value
|
|
23509
23050
|
var queryArray = value.map(function (item) {
|
|
23510
|
-
var _type3,
|
|
23051
|
+
var _type3, _ref2;
|
|
23511
23052
|
|
|
23512
|
-
return
|
|
23053
|
+
return _ref2 = {}, _ref2[type] = (_type3 = {}, _type3[props.dataField] = item, _type3), _ref2;
|
|
23513
23054
|
});
|
|
23514
23055
|
listQuery = {
|
|
23515
23056
|
bool: {
|
|
@@ -23544,6 +23085,10 @@
|
|
|
23544
23085
|
}) : getAggsQuery(queryOptions, props);
|
|
23545
23086
|
};
|
|
23546
23087
|
|
|
23088
|
+
MultiDropdownList.hasInternalComponent = function () {
|
|
23089
|
+
return true;
|
|
23090
|
+
};
|
|
23091
|
+
|
|
23547
23092
|
var mapStateToProps$7 = function mapStateToProps(state, props) {
|
|
23548
23093
|
return {
|
|
23549
23094
|
options: props.nestedField && state.aggregations[props.componentId] ? state.aggregations[props.componentId].reactivesearch_nested : state.aggregations[props.componentId],
|
|
@@ -23565,7 +23110,7 @@
|
|
|
23565
23110
|
};
|
|
23566
23111
|
var ListConnected$3 = ComponentWrapper$1(connect(mapStateToProps$7, mapDispatchtoProps$5)(MultiDropdownList), {
|
|
23567
23112
|
componentType: constants_1$1.multiDropdownList,
|
|
23568
|
-
internalComponent:
|
|
23113
|
+
internalComponent: MultiDropdownList.hasInternalComponent()
|
|
23569
23114
|
});
|
|
23570
23115
|
|
|
23571
23116
|
MultiDropdownList.install = function (Vue) {
|
|
@@ -23581,7 +23126,7 @@
|
|
|
23581
23126
|
var isEqual$9 = lib_8.isEqual,
|
|
23582
23127
|
checkValueChange$5 = lib_8.checkValueChange,
|
|
23583
23128
|
getClassName$9 = lib_8.getClassName,
|
|
23584
|
-
getOptionsFromQuery
|
|
23129
|
+
getOptionsFromQuery = lib_8.getOptionsFromQuery,
|
|
23585
23130
|
handleA11yAction$1 = lib_8.handleA11yAction;
|
|
23586
23131
|
var ToggleButton = {
|
|
23587
23132
|
name: 'ToggleButton',
|
|
@@ -23747,7 +23292,7 @@
|
|
|
23747
23292
|
var _ref = customQuery(value, props) || {};
|
|
23748
23293
|
|
|
23749
23294
|
query = _ref.query;
|
|
23750
|
-
this.setQueryOptions(props.componentId, getOptionsFromQuery
|
|
23295
|
+
this.setQueryOptions(props.componentId, getOptionsFromQuery(customQuery(value, props)), false);
|
|
23751
23296
|
updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
|
|
23752
23297
|
}
|
|
23753
23298
|
|
|
@@ -23905,10 +23450,7 @@
|
|
|
23905
23450
|
|
|
23906
23451
|
ToggleButton.componentType = constants_1$1.toggleButton;
|
|
23907
23452
|
|
|
23908
|
-
var _excluded = ["options"]
|
|
23909
|
-
_excluded2 = ["query"],
|
|
23910
|
-
_excluded3 = ["query"],
|
|
23911
|
-
_excluded4 = ["query"];
|
|
23453
|
+
var _excluded = ["options"];
|
|
23912
23454
|
var updateQuery$7 = lib_5.updateQuery,
|
|
23913
23455
|
setQueryOptions$7 = lib_5.setQueryOptions,
|
|
23914
23456
|
setCustomQuery$6 = lib_5.setCustomQuery,
|
|
@@ -23916,8 +23458,9 @@
|
|
|
23916
23458
|
var parseHits$1 = lib_8.parseHits,
|
|
23917
23459
|
isEqual$a = lib_8.isEqual,
|
|
23918
23460
|
getCompositeAggsQuery$4 = lib_8.getCompositeAggsQuery,
|
|
23919
|
-
|
|
23920
|
-
|
|
23461
|
+
getResultStats$2 = lib_8.getResultStats,
|
|
23462
|
+
extractQueryFromCustomQuery$6 = lib_8.extractQueryFromCustomQuery,
|
|
23463
|
+
getOptionsForCustomQuery$6 = lib_8.getOptionsForCustomQuery;
|
|
23921
23464
|
var ReactiveComponent = {
|
|
23922
23465
|
name: 'ReactiveComponent',
|
|
23923
23466
|
props: {
|
|
@@ -23966,25 +23509,16 @@
|
|
|
23966
23509
|
|
|
23967
23510
|
if (customQuery) {
|
|
23968
23511
|
var calcCustomQuery = customQuery(this.selectedValue, props);
|
|
23969
|
-
|
|
23970
|
-
var
|
|
23971
|
-
query = _ref.query;
|
|
23972
|
-
|
|
23973
|
-
var customQueryOptions = calcCustomQuery ? getOptionsFromQuery$7(calcCustomQuery) : null;
|
|
23512
|
+
var query = extractQueryFromCustomQuery$6(calcCustomQuery);
|
|
23513
|
+
var customQueryOptions = calcCustomQuery ? getOptionsForCustomQuery$6(calcCustomQuery) : null;
|
|
23974
23514
|
|
|
23975
23515
|
if (customQueryOptions) {
|
|
23976
23516
|
this.setQueryOptions(componentId, _extends({}, customQueryOptions, this.getAggsQuery()), false);
|
|
23977
23517
|
} else this.setQueryOptions(componentId, this.getAggsQuery(), false);
|
|
23978
23518
|
|
|
23979
|
-
var queryToSet = query || null;
|
|
23980
|
-
|
|
23981
|
-
if (calcCustomQuery && calcCustomQuery.id) {
|
|
23982
|
-
queryToSet = calcCustomQuery;
|
|
23983
|
-
}
|
|
23984
|
-
|
|
23985
23519
|
this.updateQuery({
|
|
23986
23520
|
componentId: componentId,
|
|
23987
|
-
query:
|
|
23521
|
+
query: query,
|
|
23988
23522
|
value: this.selectedValue || null,
|
|
23989
23523
|
label: filterLabel,
|
|
23990
23524
|
showFilter: showFilter,
|
|
@@ -23992,9 +23526,9 @@
|
|
|
23992
23526
|
});
|
|
23993
23527
|
}
|
|
23994
23528
|
|
|
23995
|
-
this.setQuery = function (
|
|
23996
|
-
var options =
|
|
23997
|
-
obj = _objectWithoutPropertiesLoose(
|
|
23529
|
+
this.setQuery = function (_ref) {
|
|
23530
|
+
var options = _ref.options,
|
|
23531
|
+
obj = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
23998
23532
|
|
|
23999
23533
|
if (options) {
|
|
24000
23534
|
_this.setQueryOptions(props.componentId, _extends({}, options, _this.getAggsQuery()), false);
|
|
@@ -24004,17 +23538,17 @@
|
|
|
24004
23538
|
|
|
24005
23539
|
if (obj && obj.query && obj.query.query) {
|
|
24006
23540
|
queryToBeSet = obj.query.query;
|
|
24007
|
-
}
|
|
23541
|
+
}
|
|
24008
23542
|
|
|
23543
|
+
var customQueryCalc = _extends({}, options); // Update customQuery field for RS API
|
|
24009
23544
|
|
|
24010
|
-
if (obj && obj.query || options) {
|
|
24011
|
-
var customQueryCalc = _extends({}, options);
|
|
24012
23545
|
|
|
24013
|
-
|
|
24014
|
-
|
|
23546
|
+
if (queryToBeSet || options) {
|
|
23547
|
+
if (queryToBeSet.query) {
|
|
23548
|
+
if (queryToBeSet.id) {
|
|
24015
23549
|
customQueryCalc = queryToBeSet;
|
|
24016
23550
|
} else {
|
|
24017
|
-
customQueryCalc.query =
|
|
23551
|
+
customQueryCalc.query = queryToBeSet;
|
|
24018
23552
|
}
|
|
24019
23553
|
}
|
|
24020
23554
|
|
|
@@ -24022,6 +23556,7 @@
|
|
|
24022
23556
|
}
|
|
24023
23557
|
|
|
24024
23558
|
_this.updateQuery(_extends({}, obj, {
|
|
23559
|
+
query: customQueryCalc,
|
|
24025
23560
|
componentId: props.componentId,
|
|
24026
23561
|
label: props.filterLabel,
|
|
24027
23562
|
showFilter: props.showFilter,
|
|
@@ -24037,24 +23572,16 @@
|
|
|
24037
23572
|
if (this.internalComponent && this.$props.defaultQuery) {
|
|
24038
23573
|
updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props, this.selectedValue);
|
|
24039
23574
|
this.$defaultQuery = this.$props.defaultQuery(this.selectedValue, this.$props);
|
|
24040
|
-
|
|
24041
|
-
var
|
|
24042
|
-
query = _ref3.query,
|
|
24043
|
-
queryOptions = _objectWithoutPropertiesLoose(_ref3, _excluded2);
|
|
23575
|
+
var query = extractQueryFromCustomQuery$6(this.$defaultQuery);
|
|
23576
|
+
var queryOptions = getOptionsForCustomQuery$6(this.$defaultQuery);
|
|
24044
23577
|
|
|
24045
23578
|
if (queryOptions) {
|
|
24046
23579
|
this.setQueryOptions(this.internalComponent, _extends({}, queryOptions, this.getAggsQuery()), false);
|
|
24047
23580
|
} else this.setQueryOptions(this.internalComponent, this.getAggsQuery(), false);
|
|
24048
23581
|
|
|
24049
|
-
var queryToSet = query || null;
|
|
24050
|
-
|
|
24051
|
-
if (!queryToSet && this.$defaultQuery && this.$defaultQuery.id) {
|
|
24052
|
-
queryToSet = this.$defaultQuery;
|
|
24053
|
-
}
|
|
24054
|
-
|
|
24055
23582
|
this.updateQuery({
|
|
24056
23583
|
componentId: this.internalComponent,
|
|
24057
|
-
query:
|
|
23584
|
+
query: query
|
|
24058
23585
|
});
|
|
24059
23586
|
}
|
|
24060
23587
|
},
|
|
@@ -24102,10 +23629,8 @@
|
|
|
24102
23629
|
defaultQuery: function defaultQuery(newVal, oldVal) {
|
|
24103
23630
|
if (newVal && !isQueryIdentical(newVal, oldVal, this.selectedValue, this.$props)) {
|
|
24104
23631
|
this.$defaultQuery = newVal(this.selectedValue, this.$props);
|
|
24105
|
-
|
|
24106
|
-
var
|
|
24107
|
-
query = _ref4.query,
|
|
24108
|
-
queryOptions = _objectWithoutPropertiesLoose(_ref4, _excluded3);
|
|
23632
|
+
var query = extractQueryFromCustomQuery$6(this.$defaultQuery);
|
|
23633
|
+
var queryOptions = getOptionsForCustomQuery$6(this.$defaultQuery);
|
|
24109
23634
|
|
|
24110
23635
|
if (queryOptions) {
|
|
24111
23636
|
this.setQueryOptions(this.internalComponent, _extends({}, queryOptions, this.getAggsQuery()), false);
|
|
@@ -24113,15 +23638,9 @@
|
|
|
24113
23638
|
|
|
24114
23639
|
|
|
24115
23640
|
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
23641
|
this.updateQuery({
|
|
24123
23642
|
componentId: this.internalComponent,
|
|
24124
|
-
query:
|
|
23643
|
+
query: query
|
|
24125
23644
|
});
|
|
24126
23645
|
}
|
|
24127
23646
|
},
|
|
@@ -24129,10 +23648,8 @@
|
|
|
24129
23648
|
if (newVal && !isQueryIdentical(newVal, oldVal, this.selectedValue, this.$props)) {
|
|
24130
23649
|
var componentId = this.$props.componentId;
|
|
24131
23650
|
this.$customQuery = newVal(this.selectedValue, this.$props);
|
|
24132
|
-
|
|
24133
|
-
var
|
|
24134
|
-
query = _ref5.query,
|
|
24135
|
-
queryOptions = _objectWithoutPropertiesLoose(_ref5, _excluded4);
|
|
23651
|
+
var query = extractQueryFromCustomQuery$6(this.$customQuery);
|
|
23652
|
+
var queryOptions = getOptionsForCustomQuery$6(this.$customQuery);
|
|
24136
23653
|
|
|
24137
23654
|
if (queryOptions) {
|
|
24138
23655
|
this.setQueryOptions(componentId, _extends({}, queryOptions, this.getAggsQuery()), false);
|
|
@@ -24140,15 +23657,9 @@
|
|
|
24140
23657
|
|
|
24141
23658
|
|
|
24142
23659
|
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
23660
|
this.updateQuery({
|
|
24150
23661
|
componentId: componentId,
|
|
24151
|
-
query:
|
|
23662
|
+
query: query
|
|
24152
23663
|
});
|
|
24153
23664
|
}
|
|
24154
23665
|
}
|
|
@@ -24228,6 +23739,10 @@
|
|
|
24228
23739
|
}
|
|
24229
23740
|
};
|
|
24230
23741
|
|
|
23742
|
+
ReactiveComponent.hasInternalComponent = function (props) {
|
|
23743
|
+
return !!props.defaultQuery;
|
|
23744
|
+
};
|
|
23745
|
+
|
|
24231
23746
|
var mapStateToProps$9 = function mapStateToProps(state, props) {
|
|
24232
23747
|
return {
|
|
24233
23748
|
aggregations: state.aggregations[props.componentId] && state.aggregations[props.componentId] || null,
|
|
@@ -24434,7 +23949,7 @@
|
|
|
24434
23949
|
var isEqual$b = lib_8.isEqual,
|
|
24435
23950
|
checkValueChange$6 = lib_8.checkValueChange,
|
|
24436
23951
|
getClassName$b = lib_8.getClassName,
|
|
24437
|
-
getOptionsFromQuery$
|
|
23952
|
+
getOptionsFromQuery$1 = lib_8.getOptionsFromQuery;
|
|
24438
23953
|
var SingleRange = {
|
|
24439
23954
|
name: 'SingleRange',
|
|
24440
23955
|
data: function data() {
|
|
@@ -24570,7 +24085,7 @@
|
|
|
24570
24085
|
var _ref = customQuery(value, props) || {};
|
|
24571
24086
|
|
|
24572
24087
|
query = _ref.query;
|
|
24573
|
-
customQueryOptions = getOptionsFromQuery$
|
|
24088
|
+
customQueryOptions = getOptionsFromQuery$1(customQuery(value, props));
|
|
24574
24089
|
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
|
|
24575
24090
|
}
|
|
24576
24091
|
|
|
@@ -24662,7 +24177,7 @@
|
|
|
24662
24177
|
var isEqual$c = lib_8.isEqual,
|
|
24663
24178
|
checkValueChange$7 = lib_8.checkValueChange,
|
|
24664
24179
|
getClassName$c = lib_8.getClassName,
|
|
24665
|
-
getOptionsFromQuery$
|
|
24180
|
+
getOptionsFromQuery$2 = lib_8.getOptionsFromQuery;
|
|
24666
24181
|
var MultiRange = {
|
|
24667
24182
|
name: 'MultiRange',
|
|
24668
24183
|
data: function data() {
|
|
@@ -24779,7 +24294,7 @@
|
|
|
24779
24294
|
var _ref = customQuery(value, props) || {};
|
|
24780
24295
|
|
|
24781
24296
|
query = _ref.query;
|
|
24782
|
-
customQueryOptions = getOptionsFromQuery$
|
|
24297
|
+
customQueryOptions = getOptionsFromQuery$2(customQuery(value, props));
|
|
24783
24298
|
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
|
|
24784
24299
|
}
|
|
24785
24300
|
|
|
@@ -25274,7 +24789,7 @@
|
|
|
25274
24789
|
setCustomQuery$9 = lib_5.setCustomQuery;
|
|
25275
24790
|
var checkValueChange$8 = lib_8.checkValueChange,
|
|
25276
24791
|
getClassName$d = lib_8.getClassName,
|
|
25277
|
-
getOptionsFromQuery$
|
|
24792
|
+
getOptionsFromQuery$3 = lib_8.getOptionsFromQuery,
|
|
25278
24793
|
isEqual$d = lib_8.isEqual;
|
|
25279
24794
|
var RangeSlider = {
|
|
25280
24795
|
name: 'RangeSlider',
|
|
@@ -25370,7 +24885,7 @@
|
|
|
25370
24885
|
var _ref = customQuery(value, props) || {};
|
|
25371
24886
|
|
|
25372
24887
|
query = _ref.query;
|
|
25373
|
-
customQueryOptions = getOptionsFromQuery$
|
|
24888
|
+
customQueryOptions = getOptionsFromQuery$3(customQuery(value, props));
|
|
25374
24889
|
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
|
|
25375
24890
|
}
|
|
25376
24891
|
|
|
@@ -25556,9 +25071,10 @@
|
|
|
25556
25071
|
updateComponentProps$2 = lib_5.updateComponentProps;
|
|
25557
25072
|
var checkValueChange$9 = lib_8.checkValueChange,
|
|
25558
25073
|
getClassName$e = lib_8.getClassName,
|
|
25559
|
-
getOptionsFromQuery$b = lib_8.getOptionsFromQuery,
|
|
25560
25074
|
isEqual$e = lib_8.isEqual,
|
|
25561
|
-
checkSomePropChange$1 = lib_8.checkSomePropChange
|
|
25075
|
+
checkSomePropChange$1 = lib_8.checkSomePropChange,
|
|
25076
|
+
extractQueryFromCustomQuery$7 = lib_8.extractQueryFromCustomQuery,
|
|
25077
|
+
getOptionsForCustomQuery$7 = lib_8.getOptionsForCustomQuery;
|
|
25562
25078
|
var DynamicRangeSlider = {
|
|
25563
25079
|
name: 'DynamicRangeSlider',
|
|
25564
25080
|
components: getComponents(),
|
|
@@ -25769,19 +25285,23 @@
|
|
|
25769
25285
|
var customQueryOptions;
|
|
25770
25286
|
|
|
25771
25287
|
if (this.$props.customQuery) {
|
|
25772
|
-
var
|
|
25288
|
+
var customQueryTobeSet = this.$props.customQuery(value, this.$props);
|
|
25289
|
+
var queryTobeSet = extractQueryFromCustomQuery$7(customQueryTobeSet);
|
|
25290
|
+
|
|
25291
|
+
if (queryTobeSet) {
|
|
25292
|
+
query = queryTobeSet;
|
|
25293
|
+
}
|
|
25773
25294
|
|
|
25774
|
-
|
|
25775
|
-
customQueryOptions = getOptionsFromQuery$b(this.$props.customQuery(value, this.$props));
|
|
25295
|
+
customQueryOptions = getOptionsForCustomQuery$7(customQueryTobeSet);
|
|
25776
25296
|
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, value);
|
|
25777
25297
|
}
|
|
25778
25298
|
|
|
25779
|
-
var
|
|
25299
|
+
var _ref2 = this.range || {
|
|
25780
25300
|
start: value[0],
|
|
25781
25301
|
end: value[1]
|
|
25782
25302
|
},
|
|
25783
|
-
start =
|
|
25784
|
-
end =
|
|
25303
|
+
start = _ref2.start,
|
|
25304
|
+
end = _ref2.end;
|
|
25785
25305
|
|
|
25786
25306
|
var currentStart = value[0],
|
|
25787
25307
|
currentEnd = value[1]; // check if the slider is at its initial position
|
|
@@ -25834,13 +25354,13 @@
|
|
|
25834
25354
|
range: function range(newValue, oldValue) {
|
|
25835
25355
|
if (isEqual$e(newValue, oldValue) || !this.currentValue) return;
|
|
25836
25356
|
|
|
25837
|
-
var
|
|
25838
|
-
currentStart =
|
|
25839
|
-
currentEnd =
|
|
25357
|
+
var _ref3 = this.currentValue || [],
|
|
25358
|
+
currentStart = _ref3[0],
|
|
25359
|
+
currentEnd = _ref3[1];
|
|
25840
25360
|
|
|
25841
|
-
var
|
|
25842
|
-
oldStart =
|
|
25843
|
-
oldEnd =
|
|
25361
|
+
var _ref4 = oldValue || {},
|
|
25362
|
+
oldStart = _ref4.start,
|
|
25363
|
+
oldEnd = _ref4.end;
|
|
25844
25364
|
|
|
25845
25365
|
var newStart = currentStart === oldStart ? newValue.start : currentStart;
|
|
25846
25366
|
var newEnd = currentEnd === oldEnd ? newValue.end : currentEnd;
|
|
@@ -25935,6 +25455,10 @@
|
|
|
25935
25455
|
return [];
|
|
25936
25456
|
};
|
|
25937
25457
|
|
|
25458
|
+
DynamicRangeSlider.hasInternalComponent = function () {
|
|
25459
|
+
return true;
|
|
25460
|
+
};
|
|
25461
|
+
|
|
25938
25462
|
var mapStateToProps$e = function mapStateToProps(state, props) {
|
|
25939
25463
|
var componentId = state.aggregations[props.componentId];
|
|
25940
25464
|
var internalRange = state.aggregations[props.componentId + "__range__internal"];
|
|
@@ -29279,7 +28803,7 @@
|
|
|
29279
28803
|
getQueryOptions$5 = lib_8.getQueryOptions,
|
|
29280
28804
|
getClassName$f = lib_8.getClassName,
|
|
29281
28805
|
parseHits$2 = lib_8.parseHits,
|
|
29282
|
-
getOptionsFromQuery$
|
|
28806
|
+
getOptionsFromQuery$4 = lib_8.getOptionsFromQuery,
|
|
29283
28807
|
getResultStats$3 = lib_8.getResultStats; // default map center
|
|
29284
28808
|
|
|
29285
28809
|
var MAP_CENTER = {
|
|
@@ -29450,10 +28974,10 @@
|
|
|
29450
28974
|
options.sort = this.$defaultQuery.sort;
|
|
29451
28975
|
}
|
|
29452
28976
|
|
|
29453
|
-
var queryOptions = getOptionsFromQuery$
|
|
28977
|
+
var queryOptions = getOptionsFromQuery$4(this.$defaultQuery);
|
|
29454
28978
|
|
|
29455
28979
|
if (queryOptions) {
|
|
29456
|
-
options = _extends({}, options, getOptionsFromQuery$
|
|
28980
|
+
options = _extends({}, options, getOptionsFromQuery$4(this.$defaultQuery));
|
|
29457
28981
|
} // Update calculated default query in store
|
|
29458
28982
|
|
|
29459
28983
|
|
|
@@ -30045,7 +29569,7 @@
|
|
|
30045
29569
|
|
|
30046
29570
|
if (this.$props.defaultQuery) {
|
|
30047
29571
|
this.$defaultQuery = this.$props.defaultQuery();
|
|
30048
|
-
options = _extends({}, options, getOptionsFromQuery$
|
|
29572
|
+
options = _extends({}, options, getOptionsFromQuery$4(this.$defaultQuery)); // Override sort query with defaultQuery's sort if defined
|
|
30049
29573
|
|
|
30050
29574
|
if (this.$defaultQuery.sort) {
|
|
30051
29575
|
options.sort = this.$defaultQuery.sort;
|
|
@@ -32953,10 +32477,9 @@
|
|
|
32953
32477
|
|
|
32954
32478
|
ReactiveGoogleMap.componentType = constants_1$1.reactiveMap;
|
|
32955
32479
|
|
|
32956
|
-
var _excluded$5 = ["aggs", "size"]
|
|
32480
|
+
var _excluded$5 = ["aggs", "size"],
|
|
32481
|
+
_excluded2 = ["query"];
|
|
32957
32482
|
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
32483
|
var componentsWithoutFilters = [constants_1$1.numberBox, constants_1$1.ratingsFilter];
|
|
32961
32484
|
var resultComponents = [constants_1$1.reactiveList, constants_1$1.reactiveMap];
|
|
32962
32485
|
|
|
@@ -32990,23 +32513,35 @@
|
|
|
32990
32513
|
}
|
|
32991
32514
|
|
|
32992
32515
|
return value;
|
|
32993
|
-
}
|
|
32516
|
+
} // Returns query DSL with query property and other options
|
|
32517
|
+
|
|
32518
|
+
|
|
32519
|
+
function getDefaultQuery(component, value) {
|
|
32520
|
+
// get custom or default query of sensor components
|
|
32521
|
+
var currentValue = parseValue(value, component); // get default query of result components
|
|
32522
|
+
|
|
32523
|
+
if (component.defaultQuery) {
|
|
32524
|
+
var defaultQuery = component.defaultQuery(currentValue, component);
|
|
32525
|
+
return _extends({
|
|
32526
|
+
query: helper_11(defaultQuery)
|
|
32527
|
+
}, helper_12(defaultQuery));
|
|
32528
|
+
}
|
|
32994
32529
|
|
|
32995
|
-
|
|
32996
|
-
|
|
32997
|
-
|
|
32998
|
-
|
|
32999
|
-
} // get custom or default query of sensor components
|
|
32530
|
+
return component.source.defaultQuery ? {
|
|
32531
|
+
query: component.source.defaultQuery(currentValue, component)
|
|
32532
|
+
} : {};
|
|
32533
|
+
} // Only results the query part
|
|
33000
32534
|
|
|
33001
32535
|
|
|
32536
|
+
function getCustomQuery(component, value) {
|
|
32537
|
+
// get custom or default query of sensor components
|
|
33002
32538
|
var currentValue = parseValue(value, component);
|
|
33003
32539
|
|
|
33004
32540
|
if (component.customQuery) {
|
|
33005
|
-
|
|
33006
|
-
return customQuery && customQuery.query;
|
|
32541
|
+
return helper_11(component.customQuery(currentValue, component));
|
|
33007
32542
|
}
|
|
33008
32543
|
|
|
33009
|
-
return component.source.defaultQuery ? component.source.defaultQuery(currentValue, component) :
|
|
32544
|
+
return component.source.defaultQuery ? component.source.defaultQuery(currentValue, component) : null;
|
|
33010
32545
|
}
|
|
33011
32546
|
|
|
33012
32547
|
function initReactivesearch(componentCollection, searchState, settings) {
|
|
@@ -33061,6 +32596,11 @@
|
|
|
33061
32596
|
}
|
|
33062
32597
|
});
|
|
33063
32598
|
var isInternalComponentPresent = false;
|
|
32599
|
+
|
|
32600
|
+
if (component.source.hasInternalComponent) {
|
|
32601
|
+
isInternalComponentPresent = component.source.hasInternalComponent(component);
|
|
32602
|
+
}
|
|
32603
|
+
|
|
33064
32604
|
var isResultComponent = resultComponents.includes(componentType);
|
|
33065
32605
|
var internalComponent = component.componentId + "__internal";
|
|
33066
32606
|
var label = component.filterLabel || component.componentId;
|
|
@@ -33092,74 +32632,66 @@
|
|
|
33092
32632
|
|
|
33093
32633
|
if (component.defaultQuery && typeof component.defaultQuery === 'function') {
|
|
33094
32634
|
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
|
-
}
|
|
32635
|
+
}
|
|
33105
32636
|
|
|
33106
|
-
|
|
33107
|
-
// eslint-disable-next-line
|
|
33108
|
-
var _ref = options || {},
|
|
33109
|
-
aggs = _ref.aggs,
|
|
33110
|
-
size = _ref.size,
|
|
33111
|
-
otherQueryOptions = _objectWithoutPropertiesLoose(_ref, _excluded$5);
|
|
32637
|
+
var componentQueryOptions = {}; // [2] set query options - main component query (valid for result components)
|
|
33112
32638
|
|
|
33113
|
-
|
|
33114
|
-
|
|
33115
|
-
|
|
32639
|
+
if (component && component.source.generateQueryOptions) {
|
|
32640
|
+
componentQueryOptions = _extends({}, componentQueryOptions, component.source.generateQueryOptions(component));
|
|
32641
|
+
}
|
|
33116
32642
|
|
|
33117
|
-
|
|
33118
|
-
type: 'SET_QUERY_OPTIONS',
|
|
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
|
|
32643
|
+
var highlightQuery = {};
|
|
33126
32644
|
|
|
32645
|
+
if (component.source.highlightQuery) {
|
|
32646
|
+
highlightQuery = component.source.highlightQuery(component);
|
|
32647
|
+
}
|
|
33127
32648
|
|
|
33128
|
-
|
|
33129
|
-
|
|
33130
|
-
|
|
32649
|
+
if (componentQueryOptions && Object.keys(componentQueryOptions).length || highlightQuery && Object.keys(highlightQuery).length) {
|
|
32650
|
+
// eslint-disable-next-line
|
|
32651
|
+
var _ref = componentQueryOptions || {},
|
|
32652
|
+
aggs = _ref.aggs,
|
|
32653
|
+
size = _ref.size,
|
|
32654
|
+
otherQueryOptions = _objectWithoutPropertiesLoose(_ref, _excluded$5);
|
|
32655
|
+
|
|
32656
|
+
if (aggs && Object.keys(aggs).length) {
|
|
32657
|
+
isInternalComponentPresent = true;
|
|
32658
|
+
componentQueryOptions = _extends({}, componentQueryOptions, {
|
|
32659
|
+
aggs: aggs,
|
|
32660
|
+
size: typeof size === 'undefined' ? 100 : size
|
|
32661
|
+
});
|
|
32662
|
+
} // sort, highlight, size, from - query should be applied on the main component
|
|
33131
32663
|
|
|
33132
|
-
var mainQueryOptions = _extends({}, otherQueryOptions, highlightQuery, {
|
|
33133
|
-
size: size
|
|
33134
|
-
});
|
|
33135
32664
|
|
|
33136
|
-
|
|
33137
|
-
|
|
33138
|
-
|
|
32665
|
+
if (otherQueryOptions && Object.keys(otherQueryOptions).length || highlightQuery && Object.keys(highlightQuery).length) {
|
|
32666
|
+
if (!otherQueryOptions) otherQueryOptions = {};
|
|
32667
|
+
if (!highlightQuery) highlightQuery = {};
|
|
33139
32668
|
|
|
33140
|
-
|
|
33141
|
-
|
|
32669
|
+
var mainQueryOptions = _extends({}, otherQueryOptions, highlightQuery, {
|
|
32670
|
+
size: size
|
|
32671
|
+
});
|
|
33142
32672
|
|
|
33143
|
-
|
|
33144
|
-
|
|
33145
|
-
|
|
32673
|
+
if (isInternalComponentPresent) {
|
|
32674
|
+
mainQueryOptions = _extends({}, otherQueryOptions, highlightQuery);
|
|
32675
|
+
}
|
|
33146
32676
|
|
|
33147
|
-
|
|
33148
|
-
|
|
32677
|
+
if (isResultComponent) {
|
|
32678
|
+
var currentPage = component.currentPage ? component.currentPage - 1 : 0;
|
|
33149
32679
|
|
|
33150
|
-
|
|
33151
|
-
|
|
33152
|
-
size: resultSize,
|
|
33153
|
-
from: from
|
|
33154
|
-
});
|
|
32680
|
+
if (selectedValues[component.componentId] && selectedValues[component.componentId].value) {
|
|
32681
|
+
currentPage = selectedValues[component.componentId].value - 1 || 0;
|
|
33155
32682
|
}
|
|
33156
32683
|
|
|
33157
|
-
|
|
33158
|
-
|
|
33159
|
-
|
|
33160
|
-
|
|
32684
|
+
var resultSize = component.size || 10;
|
|
32685
|
+
var from = currentPage * resultSize; // Update props for RS API
|
|
32686
|
+
|
|
32687
|
+
compProps.from = from;
|
|
32688
|
+
mainQueryOptions = _extends({}, mainQueryOptions, highlightQuery, {
|
|
32689
|
+
size: resultSize,
|
|
32690
|
+
from: from
|
|
33161
32691
|
});
|
|
33162
32692
|
}
|
|
32693
|
+
|
|
32694
|
+
componentQueryOptions = _extends({}, componentQueryOptions, mainQueryOptions);
|
|
33163
32695
|
}
|
|
33164
32696
|
} // [3] set dependency tree
|
|
33165
32697
|
|
|
@@ -33168,7 +32700,7 @@
|
|
|
33168
32700
|
var react = component.react;
|
|
33169
32701
|
|
|
33170
32702
|
if (isInternalComponentPresent || isResultComponent) {
|
|
33171
|
-
react =
|
|
32703
|
+
react = helper_26(react, internalComponent);
|
|
33172
32704
|
}
|
|
33173
32705
|
|
|
33174
32706
|
dependencyTree = dependencyTreeReducer(dependencyTree, {
|
|
@@ -33179,23 +32711,32 @@
|
|
|
33179
32711
|
} // [4] set query list
|
|
33180
32712
|
|
|
33181
32713
|
|
|
33182
|
-
|
|
33183
|
-
|
|
33184
|
-
|
|
32714
|
+
var _ref2 = getDefaultQuery(component, value) || {},
|
|
32715
|
+
defaultQuery = _ref2.query,
|
|
32716
|
+
defaultQueryOptions = _objectWithoutPropertiesLoose(_ref2, _excluded2);
|
|
33185
32717
|
|
|
33186
|
-
|
|
33187
|
-
|
|
33188
|
-
|
|
33189
|
-
|
|
33190
|
-
|
|
33191
|
-
|
|
33192
|
-
|
|
33193
|
-
|
|
33194
|
-
|
|
33195
|
-
|
|
33196
|
-
|
|
33197
|
-
} // Set component type in component props
|
|
32718
|
+
queryList = queryReducer(queryList, {
|
|
32719
|
+
type: 'SET_QUERY',
|
|
32720
|
+
component: internalComponent,
|
|
32721
|
+
query: defaultQuery
|
|
32722
|
+
});
|
|
32723
|
+
queryOptions = queryOptionsReducer(queryOptions, {
|
|
32724
|
+
type: 'SET_QUERY_OPTIONS',
|
|
32725
|
+
component: internalComponent,
|
|
32726
|
+
options: _extends({}, componentQueryOptions, defaultQueryOptions)
|
|
32727
|
+
});
|
|
32728
|
+
var customQuery = getCustomQuery(component, value); // set custom query for main component
|
|
33198
32729
|
|
|
32730
|
+
queryList = queryReducer(queryList, {
|
|
32731
|
+
type: 'SET_QUERY',
|
|
32732
|
+
component: component.componentId,
|
|
32733
|
+
query: customQuery
|
|
32734
|
+
});
|
|
32735
|
+
queryOptions = queryOptionsReducer(queryOptions, {
|
|
32736
|
+
type: 'SET_QUERY_OPTIONS',
|
|
32737
|
+
component: component.componentId,
|
|
32738
|
+
options: _extends({}, componentQueryOptions)
|
|
32739
|
+
}); // Set component type in component props
|
|
33199
32740
|
|
|
33200
32741
|
compProps.componentType = componentType;
|
|
33201
32742
|
componentProps[component.componentId] = compProps;
|
|
@@ -33214,7 +32755,7 @@
|
|
|
33214
32755
|
|
|
33215
32756
|
componentCollection.forEach(function (component) {
|
|
33216
32757
|
// eslint-disable-next-line
|
|
33217
|
-
var _buildQuery =
|
|
32758
|
+
var _buildQuery = helper_25(component.componentId, dependencyTree, queryList, queryOptions),
|
|
33218
32759
|
queryObj = _buildQuery.queryObj,
|
|
33219
32760
|
options = _buildQuery.options;
|
|
33220
32761
|
|
|
@@ -33423,7 +32964,7 @@
|
|
|
33423
32964
|
});
|
|
33424
32965
|
}
|
|
33425
32966
|
|
|
33426
|
-
var version = "1.16.0-alpha.
|
|
32967
|
+
var version = "1.16.0-alpha.37";
|
|
33427
32968
|
|
|
33428
32969
|
var _templateObject$o, _templateObject2$b;
|
|
33429
32970
|
|