@appbaseio/reactivesearch-vue 1.26.0 → 1.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@appbaseio/reactivesearch-vue.umd.js +277 -109
- 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/{ComponentWrapper-32481890.js → ComponentWrapper-10bad289.js} +1 -1
- package/dist/cjs/DataSearch.js +2 -2
- package/dist/cjs/{DropDown-cf9bfffc.js → DropDown-7aa3d0d2.js} +15 -10
- package/dist/cjs/DynamicRangeSlider.js +40 -7
- package/dist/cjs/MultiDropdownList.js +5 -4
- package/dist/cjs/MultiList.js +15 -10
- package/dist/cjs/MultiRange.js +2 -2
- package/dist/cjs/RangeInput.js +6 -2
- package/dist/cjs/RangeSlider.js +2 -2
- package/dist/cjs/ReactiveBase.js +1 -1
- package/dist/cjs/ReactiveComponent.js +2 -2
- package/dist/cjs/ReactiveList.js +13 -3
- package/dist/cjs/SelectedFilters.js +1 -1
- package/dist/cjs/SingleDropdownList.js +4 -3
- package/dist/cjs/SingleList.js +2 -2
- package/dist/cjs/SingleRange.js +2 -2
- package/dist/cjs/StateProvider.js +1 -1
- package/dist/cjs/ToggleButton.js +2 -2
- package/dist/cjs/{index-89c39a9e.js → index-4509aa45.js} +10 -4
- package/dist/cjs/index.js +3 -3
- package/dist/cjs/install.js +3 -3
- package/dist/cjs/version.js +1 -1
- package/dist/es/{ComponentWrapper-4f85a67e.js → ComponentWrapper-0f3431d1.js} +1 -1
- package/dist/es/DataSearch.js +2 -2
- package/dist/es/{DropDown-c8da0a2c.js → DropDown-60a426a2.js} +15 -10
- package/dist/es/DynamicRangeSlider.js +40 -7
- package/dist/es/MultiDropdownList.js +5 -4
- package/dist/es/MultiList.js +15 -10
- package/dist/es/MultiRange.js +2 -2
- package/dist/es/RangeInput.js +6 -2
- package/dist/es/RangeSlider.js +2 -2
- package/dist/es/ReactiveBase.js +1 -1
- package/dist/es/ReactiveComponent.js +2 -2
- package/dist/es/ReactiveList.js +13 -3
- package/dist/es/SelectedFilters.js +1 -1
- package/dist/es/SingleDropdownList.js +4 -3
- package/dist/es/SingleList.js +2 -2
- package/dist/es/SingleRange.js +2 -2
- package/dist/es/StateProvider.js +1 -1
- package/dist/es/ToggleButton.js +2 -2
- package/dist/es/{index-cb1950b6.js → index-78920565.js} +10 -4
- package/dist/es/index.js +3 -3
- package/dist/es/install.js +3 -3
- package/dist/es/version.js +1 -1
- package/package.json +3 -3
|
@@ -4861,7 +4861,7 @@
|
|
|
4861
4861
|
Object.defineProperty(exports, "__esModule", {
|
|
4862
4862
|
value: true
|
|
4863
4863
|
});
|
|
4864
|
-
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;
|
|
4864
|
+
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;
|
|
4865
4865
|
|
|
4866
4866
|
var _extends = Object.assign || function (target) {
|
|
4867
4867
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -5682,38 +5682,78 @@
|
|
|
5682
5682
|
Recent: 'recent',
|
|
5683
5683
|
Promoted: 'promoted'
|
|
5684
5684
|
};
|
|
5685
|
+
var queryFormatMillisecondsMap = exports.queryFormatMillisecondsMap = {
|
|
5686
|
+
minute: 60000,
|
|
5687
|
+
hour: 3600000,
|
|
5688
|
+
day: 86400000,
|
|
5689
|
+
week: 604800000,
|
|
5690
|
+
month: 2629746000,
|
|
5691
|
+
quarter: 7889238000,
|
|
5692
|
+
year: 31556952000
|
|
5693
|
+
};
|
|
5694
|
+
|
|
5695
|
+
var getCalendarIntervalErrorMessage = exports.getCalendarIntervalErrorMessage = function getCalendarIntervalErrorMessage(totalRange) {
|
|
5696
|
+
var calendarInterval = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'minute';
|
|
5697
|
+
var queryFormatMillisecondsMapKeys = Object.keys(queryFormatMillisecondsMap);
|
|
5698
|
+
var indexOfCurrentCalendarInterval = queryFormatMillisecondsMapKeys.indexOf(calendarInterval);
|
|
5699
|
+
|
|
5700
|
+
if (indexOfCurrentCalendarInterval === -1) {
|
|
5701
|
+
console.error('Invalid calendarInterval Passed');
|
|
5702
|
+
}
|
|
5703
|
+
|
|
5704
|
+
if (calendarInterval === 'year') {
|
|
5705
|
+
return 'Try using a shorter range of values.';
|
|
5706
|
+
}
|
|
5707
|
+
|
|
5708
|
+
for (var index = indexOfCurrentCalendarInterval + 1; index < queryFormatMillisecondsMapKeys.length; index += 1) {
|
|
5709
|
+
if (totalRange / Object.values(queryFormatMillisecondsMap)[index] <= 100) {
|
|
5710
|
+
var calendarIntervalKey = queryFormatMillisecondsMapKeys[index];
|
|
5711
|
+
return {
|
|
5712
|
+
errorMessage: 'Please pass calendarInterval prop with value greater than or equal to a `' + calendarIntervalKey + '` for a meaningful resolution of histogram.',
|
|
5713
|
+
calculatedCalendarInterval: calendarIntervalKey
|
|
5714
|
+
};
|
|
5715
|
+
}
|
|
5716
|
+
}
|
|
5717
|
+
|
|
5718
|
+
return {
|
|
5719
|
+
errorMessage: 'Try using a shorter range of values.',
|
|
5720
|
+
calculatedCalendarInterval: 'year'
|
|
5721
|
+
};
|
|
5722
|
+
};
|
|
5685
5723
|
});
|
|
5686
5724
|
unwrapExports(helper);
|
|
5687
|
-
var helper_1 = helper.
|
|
5688
|
-
var helper_2 = helper.
|
|
5689
|
-
var helper_3 = helper.
|
|
5690
|
-
var helper_4 = helper.
|
|
5691
|
-
var helper_5 = helper.
|
|
5692
|
-
var helper_6 = helper.
|
|
5693
|
-
var helper_7 = helper.
|
|
5694
|
-
var helper_8 = helper.
|
|
5695
|
-
var helper_9 = helper.
|
|
5696
|
-
var helper_10 = helper.
|
|
5697
|
-
var helper_11 = helper.
|
|
5698
|
-
var helper_12 = helper.
|
|
5699
|
-
var helper_13 = helper.
|
|
5700
|
-
var helper_14 = helper.
|
|
5701
|
-
var helper_15 = helper.
|
|
5702
|
-
var helper_16 = helper.
|
|
5703
|
-
var helper_17 = helper.
|
|
5704
|
-
var helper_18 = helper.
|
|
5705
|
-
var helper_19 = helper.
|
|
5706
|
-
var helper_20 = helper.
|
|
5707
|
-
var helper_21 = helper.
|
|
5708
|
-
var helper_22 = helper.
|
|
5709
|
-
var helper_23 = helper.
|
|
5710
|
-
var helper_24 = helper.
|
|
5711
|
-
var helper_25 = helper.
|
|
5712
|
-
var helper_26 = helper.
|
|
5713
|
-
var helper_27 = helper.
|
|
5714
|
-
var helper_28 = helper.
|
|
5715
|
-
var helper_29 = helper.
|
|
5716
|
-
var helper_30 = helper.
|
|
5725
|
+
var helper_1 = helper.getCalendarIntervalErrorMessage;
|
|
5726
|
+
var helper_2 = helper.queryFormatMillisecondsMap;
|
|
5727
|
+
var helper_3 = helper.suggestionTypes;
|
|
5728
|
+
var helper_4 = helper.getTopSuggestions;
|
|
5729
|
+
var helper_5 = helper.withClickIds;
|
|
5730
|
+
var helper_6 = helper.getCompositeAggsQuery;
|
|
5731
|
+
var helper_7 = helper.getAggsQuery;
|
|
5732
|
+
var helper_8 = helper.extractQueryFromDefaultQuery;
|
|
5733
|
+
var helper_9 = helper.updateInternalQuery;
|
|
5734
|
+
var helper_10 = helper.getSearchState;
|
|
5735
|
+
var helper_11 = helper.getOptionsFromQuery;
|
|
5736
|
+
var helper_12 = helper.parseHits;
|
|
5737
|
+
var helper_13 = helper.handleA11yAction;
|
|
5738
|
+
var helper_14 = helper.getInnerKey;
|
|
5739
|
+
var helper_15 = helper.getClassName;
|
|
5740
|
+
var helper_16 = helper.checkSomePropChange;
|
|
5741
|
+
var helper_17 = helper.checkPropChange;
|
|
5742
|
+
var helper_18 = helper.updateDefaultQuery;
|
|
5743
|
+
var helper_19 = helper.updateCustomQuery;
|
|
5744
|
+
var helper_20 = helper.isEqual;
|
|
5745
|
+
var helper_21 = helper.debounce;
|
|
5746
|
+
var helper_22 = helper.getQueryOptions;
|
|
5747
|
+
var helper_23 = helper.buildQuery;
|
|
5748
|
+
var helper_24 = helper.pushToAndClause;
|
|
5749
|
+
var helper_25 = helper.checkValueChange;
|
|
5750
|
+
var helper_26 = helper.getAggsOrder;
|
|
5751
|
+
var helper_27 = helper.formatDate;
|
|
5752
|
+
var helper_28 = helper.getResultStats;
|
|
5753
|
+
var helper_29 = helper.extractFieldsFromSource;
|
|
5754
|
+
var helper_30 = helper.normalizeDataField;
|
|
5755
|
+
var helper_31 = helper.handleOnSuggestions;
|
|
5756
|
+
var helper_32 = helper.isValidDateRangeQueryFormat;
|
|
5717
5757
|
|
|
5718
5758
|
var value = createCommonjsModule(function (module, exports) {
|
|
5719
5759
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -7205,7 +7245,7 @@
|
|
|
7205
7245
|
}
|
|
7206
7246
|
|
|
7207
7247
|
if (componentProps.componentType === constants$1.componentTypes.dynamicRangeSlider || componentProps.componentType === constants$1.componentTypes.rangeSlider) {
|
|
7208
|
-
calendarInterval = Object.keys(_dateFormats2["default"]).includes(queryFormat) ? componentProps.calendarInterval
|
|
7248
|
+
calendarInterval = Object.keys(_dateFormats2["default"]).includes(queryFormat) ? componentProps.calendarInterval : undefined;
|
|
7209
7249
|
|
|
7210
7250
|
if (value) {
|
|
7211
7251
|
if ((0, helper.isValidDateRangeQueryFormat)(componentProps.queryFormat)) {
|
|
@@ -13264,10 +13304,16 @@
|
|
|
13264
13304
|
}; // parses current array (i.e. this.$props.value) for `onChange` callback for multi-* components
|
|
13265
13305
|
|
|
13266
13306
|
function parseValueArray(objectValues, currentValue) {
|
|
13267
|
-
var
|
|
13268
|
-
|
|
13269
|
-
|
|
13270
|
-
|
|
13307
|
+
var selectedValues;
|
|
13308
|
+
|
|
13309
|
+
if (Array.isArray(objectValues)) {
|
|
13310
|
+
selectedValues = [].concat(objectValues);
|
|
13311
|
+
} else {
|
|
13312
|
+
var keys = Object.keys(objectValues);
|
|
13313
|
+
selectedValues = keys.map(function (key) {
|
|
13314
|
+
return objectValues[key] ? key : null;
|
|
13315
|
+
});
|
|
13316
|
+
}
|
|
13271
13317
|
|
|
13272
13318
|
if (selectedValues.includes(currentValue)) {
|
|
13273
13319
|
return selectedValues.filter(function (item) {
|
|
@@ -14082,6 +14128,12 @@
|
|
|
14082
14128
|
});
|
|
14083
14129
|
}
|
|
14084
14130
|
|
|
14131
|
+
if (this.urlSortOption) {
|
|
14132
|
+
this.sortOptionIndex = this.$props.sortOptions.findIndex(function (s) {
|
|
14133
|
+
return s.label === _this.urlSortOption;
|
|
14134
|
+
}) || 0;
|
|
14135
|
+
}
|
|
14136
|
+
|
|
14085
14137
|
this.updateComponentProps(this.componentId, {
|
|
14086
14138
|
from: this.from
|
|
14087
14139
|
}, constants_1$1.reactiveList);
|
|
@@ -14172,7 +14224,7 @@
|
|
|
14172
14224
|
filteredResults = [].concat(parsedPromotedResults, filteredResults);
|
|
14173
14225
|
}
|
|
14174
14226
|
|
|
14175
|
-
return
|
|
14227
|
+
return helper_5(filteredResults);
|
|
14176
14228
|
}
|
|
14177
14229
|
},
|
|
14178
14230
|
watch: {
|
|
@@ -14390,7 +14442,7 @@
|
|
|
14390
14442
|
"labelPosition": this.sortOptions ? 'right' : 'left'
|
|
14391
14443
|
},
|
|
14392
14444
|
"class": getClassName$1(this.$props.innerClass, 'resultsInfo')
|
|
14393
|
-
}, [this.sortOptions ? this.renderSortOptions() : null, this.$props.showResultStats && results.length ? this.renderStats() : null]), !this.isLoading &&
|
|
14445
|
+
}, [this.sortOptions ? this.renderSortOptions() : null, this.$props.showResultStats && results.length ? this.renderStats() : null]), !this.isLoading && hits && hits.length === 0 ? this.renderNoResult() : null, this.shouldRenderPagination && (this.$props.paginationAt === 'top' || this.$props.paginationAt === 'both') ? h(Pagination, {
|
|
14394
14446
|
"attrs": {
|
|
14395
14447
|
"pages": this.$props.pages,
|
|
14396
14448
|
"totalPages": this.totalPages,
|
|
@@ -14598,8 +14650,11 @@
|
|
|
14598
14650
|
sortBy: sortBy
|
|
14599
14651
|
}, constants_1$1.reactiveList);
|
|
14600
14652
|
this.setQueryOptions(this.$props.componentId, options, true);
|
|
14653
|
+
this.setPage(0);
|
|
14601
14654
|
this.currentPageState = 0;
|
|
14602
14655
|
this.from = 0;
|
|
14656
|
+
var sortOption = this.$props.sortOptions[this.sortOptionIndex] ? this.$props.sortOptions[this.sortOptionIndex].label : null;
|
|
14657
|
+
this.setPageURL(this.$props.componentId + "sortOption", sortOption, this.$props.componentId + "sortOption", false, this.$props.URLParams);
|
|
14603
14658
|
}
|
|
14604
14659
|
},
|
|
14605
14660
|
triggerClickAnalytics: function triggerClickAnalytics(searchPosition, documentId) {
|
|
@@ -14711,6 +14766,7 @@
|
|
|
14711
14766
|
var mapStateToProps$1 = function mapStateToProps(state, props) {
|
|
14712
14767
|
return {
|
|
14713
14768
|
defaultPage: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value - 1,
|
|
14769
|
+
urlSortOption: state.selectedValues[props.componentId + "sortOption"] && state.selectedValues[props.componentId + "sortOption"].value,
|
|
14714
14770
|
hits: state.hits[props.componentId] && state.hits[props.componentId].hits,
|
|
14715
14771
|
rawData: state.rawData[props.componentId],
|
|
14716
14772
|
aggregationData: state.compositeAggregations[props.componentId],
|
|
@@ -14930,22 +14986,21 @@
|
|
|
14930
14986
|
var querystring_3 = querystring.encode;
|
|
14931
14987
|
var querystring_4 = querystring.stringify;
|
|
14932
14988
|
|
|
14933
|
-
var browserPonyfill$1 = createCommonjsModule(function (module) {
|
|
14934
|
-
var
|
|
14989
|
+
var browserPonyfill$1 = createCommonjsModule(function (module, exports) {
|
|
14990
|
+
var global = typeof self !== 'undefined' ? self : commonjsGlobal;
|
|
14991
|
+
|
|
14992
|
+
var __self__ = function () {
|
|
14935
14993
|
function F() {
|
|
14936
14994
|
this.fetch = false;
|
|
14995
|
+
this.DOMException = global.DOMException;
|
|
14937
14996
|
}
|
|
14938
14997
|
|
|
14939
|
-
F.prototype =
|
|
14998
|
+
F.prototype = global;
|
|
14940
14999
|
return new F();
|
|
14941
|
-
}(
|
|
15000
|
+
}();
|
|
14942
15001
|
|
|
14943
15002
|
(function (self) {
|
|
14944
|
-
|
|
14945
|
-
if (self.fetch) {
|
|
14946
|
-
return;
|
|
14947
|
-
}
|
|
14948
|
-
|
|
15003
|
+
var irrelevant = function (exports) {
|
|
14949
15004
|
var support = {
|
|
14950
15005
|
searchParams: 'URLSearchParams' in self,
|
|
14951
15006
|
iterable: 'Symbol' in self && 'iterator' in Symbol,
|
|
@@ -14961,13 +15016,13 @@
|
|
|
14961
15016
|
arrayBuffer: 'ArrayBuffer' in self
|
|
14962
15017
|
};
|
|
14963
15018
|
|
|
15019
|
+
function isDataView(obj) {
|
|
15020
|
+
return obj && DataView.prototype.isPrototypeOf(obj);
|
|
15021
|
+
}
|
|
15022
|
+
|
|
14964
15023
|
if (support.arrayBuffer) {
|
|
14965
15024
|
var viewClasses = ['[object Int8Array]', '[object Uint8Array]', '[object Uint8ClampedArray]', '[object Int16Array]', '[object Uint16Array]', '[object Int32Array]', '[object Uint32Array]', '[object Float32Array]', '[object Float64Array]'];
|
|
14966
15025
|
|
|
14967
|
-
var isDataView = function isDataView(obj) {
|
|
14968
|
-
return obj && DataView.prototype.isPrototypeOf(obj);
|
|
14969
|
-
};
|
|
14970
|
-
|
|
14971
15026
|
var isArrayBufferView = ArrayBuffer.isView || function (obj) {
|
|
14972
15027
|
return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1;
|
|
14973
15028
|
};
|
|
@@ -14978,7 +15033,7 @@
|
|
|
14978
15033
|
name = String(name);
|
|
14979
15034
|
}
|
|
14980
15035
|
|
|
14981
|
-
if (/[^a-z0-9\-#$%&'
|
|
15036
|
+
if (/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(name)) {
|
|
14982
15037
|
throw new TypeError('Invalid character in header field name');
|
|
14983
15038
|
}
|
|
14984
15039
|
|
|
@@ -15036,7 +15091,7 @@
|
|
|
15036
15091
|
name = normalizeName(name);
|
|
15037
15092
|
value = normalizeValue(value);
|
|
15038
15093
|
var oldValue = this.map[name];
|
|
15039
|
-
this.map[name] = oldValue ? oldValue + ',' + value : value;
|
|
15094
|
+
this.map[name] = oldValue ? oldValue + ', ' + value : value;
|
|
15040
15095
|
};
|
|
15041
15096
|
|
|
15042
15097
|
Headers.prototype['delete'] = function (name) {
|
|
@@ -15170,7 +15225,7 @@
|
|
|
15170
15225
|
} else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {
|
|
15171
15226
|
this._bodyArrayBuffer = bufferClone(body);
|
|
15172
15227
|
} else {
|
|
15173
|
-
|
|
15228
|
+
this._bodyText = body = Object.prototype.toString.call(body);
|
|
15174
15229
|
}
|
|
15175
15230
|
|
|
15176
15231
|
if (!this.headers.get('content-type')) {
|
|
@@ -15269,6 +15324,7 @@
|
|
|
15269
15324
|
|
|
15270
15325
|
this.method = input.method;
|
|
15271
15326
|
this.mode = input.mode;
|
|
15327
|
+
this.signal = input.signal;
|
|
15272
15328
|
|
|
15273
15329
|
if (!body && input._bodyInit != null) {
|
|
15274
15330
|
body = input._bodyInit;
|
|
@@ -15278,7 +15334,7 @@
|
|
|
15278
15334
|
this.url = String(input);
|
|
15279
15335
|
}
|
|
15280
15336
|
|
|
15281
|
-
this.credentials = options.credentials || this.credentials || '
|
|
15337
|
+
this.credentials = options.credentials || this.credentials || 'same-origin';
|
|
15282
15338
|
|
|
15283
15339
|
if (options.headers || !this.headers) {
|
|
15284
15340
|
this.headers = new Headers(options.headers);
|
|
@@ -15286,6 +15342,7 @@
|
|
|
15286
15342
|
|
|
15287
15343
|
this.method = normalizeMethod(options.method || this.method || 'GET');
|
|
15288
15344
|
this.mode = options.mode || this.mode || null;
|
|
15345
|
+
this.signal = options.signal || this.signal;
|
|
15289
15346
|
this.referrer = null;
|
|
15290
15347
|
|
|
15291
15348
|
if ((this.method === 'GET' || this.method === 'HEAD') && body) {
|
|
@@ -15383,15 +15440,36 @@
|
|
|
15383
15440
|
});
|
|
15384
15441
|
};
|
|
15385
15442
|
|
|
15386
|
-
|
|
15387
|
-
|
|
15388
|
-
|
|
15443
|
+
exports.DOMException = self.DOMException;
|
|
15444
|
+
|
|
15445
|
+
try {
|
|
15446
|
+
new exports.DOMException();
|
|
15447
|
+
} catch (err) {
|
|
15448
|
+
exports.DOMException = function (message, name) {
|
|
15449
|
+
this.message = message;
|
|
15450
|
+
this.name = name;
|
|
15451
|
+
var error = Error(message);
|
|
15452
|
+
this.stack = error.stack;
|
|
15453
|
+
};
|
|
15389
15454
|
|
|
15390
|
-
|
|
15455
|
+
exports.DOMException.prototype = Object.create(Error.prototype);
|
|
15456
|
+
exports.DOMException.prototype.constructor = exports.DOMException;
|
|
15457
|
+
}
|
|
15458
|
+
|
|
15459
|
+
function fetch(input, init) {
|
|
15391
15460
|
return new Promise(function (resolve, reject) {
|
|
15392
15461
|
var request = new Request(input, init);
|
|
15462
|
+
|
|
15463
|
+
if (request.signal && request.signal.aborted) {
|
|
15464
|
+
return reject(new exports.DOMException('Aborted', 'AbortError'));
|
|
15465
|
+
}
|
|
15466
|
+
|
|
15393
15467
|
var xhr = new XMLHttpRequest();
|
|
15394
15468
|
|
|
15469
|
+
function abortXhr() {
|
|
15470
|
+
xhr.abort();
|
|
15471
|
+
}
|
|
15472
|
+
|
|
15395
15473
|
xhr.onload = function () {
|
|
15396
15474
|
var options = {
|
|
15397
15475
|
status: xhr.status,
|
|
@@ -15411,6 +15489,10 @@
|
|
|
15411
15489
|
reject(new TypeError('Network request failed'));
|
|
15412
15490
|
};
|
|
15413
15491
|
|
|
15492
|
+
xhr.onabort = function () {
|
|
15493
|
+
reject(new exports.DOMException('Aborted', 'AbortError'));
|
|
15494
|
+
};
|
|
15495
|
+
|
|
15414
15496
|
xhr.open(request.method, request.url, true);
|
|
15415
15497
|
|
|
15416
15498
|
if (request.credentials === 'include') {
|
|
@@ -15426,24 +15508,65 @@
|
|
|
15426
15508
|
request.headers.forEach(function (value, name) {
|
|
15427
15509
|
xhr.setRequestHeader(name, value);
|
|
15428
15510
|
});
|
|
15511
|
+
|
|
15512
|
+
if (request.signal) {
|
|
15513
|
+
request.signal.addEventListener('abort', abortXhr);
|
|
15514
|
+
|
|
15515
|
+
xhr.onreadystatechange = function () {
|
|
15516
|
+
// DONE (success or failure)
|
|
15517
|
+
if (xhr.readyState === 4) {
|
|
15518
|
+
request.signal.removeEventListener('abort', abortXhr);
|
|
15519
|
+
}
|
|
15520
|
+
};
|
|
15521
|
+
}
|
|
15522
|
+
|
|
15429
15523
|
xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit);
|
|
15430
15524
|
});
|
|
15431
|
-
}
|
|
15525
|
+
}
|
|
15432
15526
|
|
|
15433
|
-
|
|
15434
|
-
})(typeof self !== 'undefined' ? self : this);
|
|
15435
|
-
}).call(__root__, void 0);
|
|
15436
|
-
var fetch = __root__.fetch;
|
|
15437
|
-
var Response = fetch.Response = __root__.Response;
|
|
15438
|
-
var Request = fetch.Request = __root__.Request;
|
|
15439
|
-
var Headers = fetch.Headers = __root__.Headers;
|
|
15527
|
+
fetch.polyfill = true;
|
|
15440
15528
|
|
|
15441
|
-
|
|
15442
|
-
|
|
15529
|
+
if (!self.fetch) {
|
|
15530
|
+
self.fetch = fetch;
|
|
15531
|
+
self.Headers = Headers;
|
|
15532
|
+
self.Request = Request;
|
|
15533
|
+
self.Response = Response;
|
|
15534
|
+
}
|
|
15443
15535
|
|
|
15444
|
-
|
|
15445
|
-
|
|
15536
|
+
exports.Headers = Headers;
|
|
15537
|
+
exports.Request = Request;
|
|
15538
|
+
exports.Response = Response;
|
|
15539
|
+
exports.fetch = fetch;
|
|
15540
|
+
Object.defineProperty(exports, '__esModule', {
|
|
15541
|
+
value: true
|
|
15542
|
+
});
|
|
15543
|
+
return exports;
|
|
15544
|
+
}({});
|
|
15545
|
+
})(__self__);
|
|
15546
|
+
|
|
15547
|
+
__self__.fetch.ponyfill = true; // Remove "polyfill" property added by whatwg-fetch
|
|
15548
|
+
|
|
15549
|
+
delete __self__.fetch.polyfill; // Choose between native implementation (global) or custom implementation (__self__)
|
|
15550
|
+
// var ctx = global.fetch ? global : __self__;
|
|
15551
|
+
|
|
15552
|
+
var ctx = __self__; // this line disable service worker support temporarily
|
|
15553
|
+
|
|
15554
|
+
exports = ctx.fetch; // To enable: import fetch from 'cross-fetch'
|
|
15555
|
+
|
|
15556
|
+
exports["default"] = ctx.fetch; // For TypeScript consumers without esModuleInterop.
|
|
15557
|
+
|
|
15558
|
+
exports.fetch = ctx.fetch; // To enable: import {fetch} from 'cross-fetch'
|
|
15559
|
+
|
|
15560
|
+
exports.Headers = ctx.Headers;
|
|
15561
|
+
exports.Request = ctx.Request;
|
|
15562
|
+
exports.Response = ctx.Response;
|
|
15563
|
+
module.exports = exports;
|
|
15446
15564
|
});
|
|
15565
|
+
var fetch$1 = unwrapExports(browserPonyfill$1);
|
|
15566
|
+
var browserPonyfill_1$1 = browserPonyfill$1.fetch;
|
|
15567
|
+
var browserPonyfill_2$1 = browserPonyfill$1.Headers;
|
|
15568
|
+
var browserPonyfill_3$1 = browserPonyfill$1.Request;
|
|
15569
|
+
var browserPonyfill_4$1 = browserPonyfill$1.Response;
|
|
15447
15570
|
|
|
15448
15571
|
var _typeof$1 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
|
|
15449
15572
|
return typeof obj;
|
|
@@ -15775,17 +15898,10 @@
|
|
|
15775
15898
|
}
|
|
15776
15899
|
|
|
15777
15900
|
var credentials = auth || null;
|
|
15778
|
-
|
|
15779
|
-
if (!config.mongodb) {
|
|
15780
|
-
if (isAppbase(url) && credentials === null) {
|
|
15781
|
-
throw new Error('Authentication information is not present. Did you add credentials?');
|
|
15782
|
-
}
|
|
15783
|
-
}
|
|
15784
15901
|
/**
|
|
15785
15902
|
* Credentials can be provided as a part of the URL,
|
|
15786
15903
|
* as username, password args or as a credentials argument directly */
|
|
15787
15904
|
|
|
15788
|
-
|
|
15789
15905
|
if (typeof config.credentials === 'string' && config.credentials !== '') {
|
|
15790
15906
|
// eslint-disable-next-line
|
|
15791
15907
|
credentials = config.credentials;
|
|
@@ -15793,6 +15909,12 @@
|
|
|
15793
15909
|
credentials = config.username + ':' + config.password;
|
|
15794
15910
|
}
|
|
15795
15911
|
|
|
15912
|
+
if (!config.mongodb) {
|
|
15913
|
+
if (isAppbase(url) && credentials === null) {
|
|
15914
|
+
throw new Error('Authentication information is not present. Did you add credentials?');
|
|
15915
|
+
}
|
|
15916
|
+
}
|
|
15917
|
+
|
|
15796
15918
|
this.url = url;
|
|
15797
15919
|
this.protocol = protocol;
|
|
15798
15920
|
this.app = config.app;
|
|
@@ -15890,7 +16012,7 @@
|
|
|
15890
16012
|
var transformedRequest = Object.assign({}, ts);
|
|
15891
16013
|
var url = transformedRequest.url;
|
|
15892
16014
|
delete transformedRequest.url;
|
|
15893
|
-
return
|
|
16015
|
+
return fetch$1(url || finalURL, Object.assign({}, transformedRequest, {
|
|
15894
16016
|
// apply timestamp header for RS API
|
|
15895
16017
|
headers: isRSAPI && !isMongoRequest ? Object.assign({}, transformedRequest.headers, {
|
|
15896
16018
|
'x-timestamp': new Date().getTime()
|
|
@@ -17145,14 +17267,14 @@
|
|
|
17145
17267
|
this.updateState(this.$props);
|
|
17146
17268
|
},
|
|
17147
17269
|
analyticsConfig: function analyticsConfig(newVal, oldVal) {
|
|
17148
|
-
if (!
|
|
17270
|
+
if (!helper_20(newVal, oldVal)) {
|
|
17149
17271
|
if (this.store) {
|
|
17150
17272
|
this.store.dispatch(analytics_3$1(newVal));
|
|
17151
17273
|
}
|
|
17152
17274
|
}
|
|
17153
17275
|
},
|
|
17154
17276
|
appbaseConfig: function appbaseConfig(newVal, oldVal) {
|
|
17155
|
-
if (!
|
|
17277
|
+
if (!helper_20(newVal, oldVal)) {
|
|
17156
17278
|
if (this.store) {
|
|
17157
17279
|
this.store.dispatch(analytics_3$1(newVal));
|
|
17158
17280
|
}
|
|
@@ -20155,7 +20277,7 @@
|
|
|
20155
20277
|
// returns size and aggs property
|
|
20156
20278
|
getBasicQueryOptions: function getBasicQueryOptions() {
|
|
20157
20279
|
var aggregationField = this.$props.aggregationField;
|
|
20158
|
-
var queryOptions =
|
|
20280
|
+
var queryOptions = helper_22(this.$props);
|
|
20159
20281
|
|
|
20160
20282
|
if (aggregationField) {
|
|
20161
20283
|
queryOptions.aggs = getCompositeAggsQuery$1({
|
|
@@ -21657,13 +21779,14 @@
|
|
|
21657
21779
|
},
|
|
21658
21780
|
beforeMount: function beforeMount() {
|
|
21659
21781
|
this.updateQueryHandlerOptions(this.$props);
|
|
21782
|
+
var value = this.selectedValue || this.$props.value || this.$props.defaultValue;
|
|
21783
|
+
this.setValue(value, !this.selectedValue);
|
|
21784
|
+
},
|
|
21785
|
+
mounted: function mounted() {
|
|
21786
|
+
var currentValue = Object.keys(this.$data.currentValue);
|
|
21660
21787
|
|
|
21661
|
-
if (this.
|
|
21662
|
-
this
|
|
21663
|
-
} else if (this.$props.value) {
|
|
21664
|
-
this.setValue(this.$props.value, true);
|
|
21665
|
-
} else if (this.$props.defaultValue) {
|
|
21666
|
-
this.setValue(this.$props.defaultValue, true);
|
|
21788
|
+
if (this.$props.value !== undefined && !isEqual$6(this.$props.value, currentValue)) {
|
|
21789
|
+
this.$emit('change', currentValue);
|
|
21667
21790
|
}
|
|
21668
21791
|
},
|
|
21669
21792
|
watch: {
|
|
@@ -21708,7 +21831,11 @@
|
|
|
21708
21831
|
}
|
|
21709
21832
|
|
|
21710
21833
|
if (!isEqual$6(selectedValue, newVal)) {
|
|
21711
|
-
this.
|
|
21834
|
+
if (this.value === undefined) {
|
|
21835
|
+
this.setValue(newVal, true);
|
|
21836
|
+
} else {
|
|
21837
|
+
this.$emit('change', newVal);
|
|
21838
|
+
}
|
|
21712
21839
|
}
|
|
21713
21840
|
},
|
|
21714
21841
|
defaultQuery: function defaultQuery(newVal, oldVal) {
|
|
@@ -22007,7 +22134,7 @@
|
|
|
22007
22134
|
if (value === undefined) {
|
|
22008
22135
|
this.setValue(currentValue);
|
|
22009
22136
|
} else {
|
|
22010
|
-
var values = parseValueArray(value, currentValue);
|
|
22137
|
+
var values = parseValueArray(value || [], currentValue);
|
|
22011
22138
|
this.$emit('change', values);
|
|
22012
22139
|
}
|
|
22013
22140
|
},
|
|
@@ -22279,7 +22406,8 @@
|
|
|
22279
22406
|
isOpen = _ref.isOpen,
|
|
22280
22407
|
highlightedIndex = _ref.highlightedIndex,
|
|
22281
22408
|
getButtonProps = _ref.getButtonProps,
|
|
22282
|
-
getItemEvents = _ref.getItemEvents
|
|
22409
|
+
getItemEvents = _ref.getItemEvents,
|
|
22410
|
+
getInputEvents = _ref.getInputEvents;
|
|
22283
22411
|
return h("div", {
|
|
22284
22412
|
"class": suggestionsContainer
|
|
22285
22413
|
}, [h(Select, {
|
|
@@ -22304,7 +22432,13 @@
|
|
|
22304
22432
|
getItemEvents: getItemEvents
|
|
22305
22433
|
}) : isOpen && itemsToRender.length ? h("ul", {
|
|
22306
22434
|
"class": suggestions$1(themePreset, _this.theme) + " " + (_this.$props.small ? 'small' : '') + " " + getClassName$6(_this.$props.innerClass, 'list')
|
|
22307
|
-
}, [_this.$props.showSearch ? _this.renderSearchbox(
|
|
22435
|
+
}, [_this.$props.showSearch ? _this.renderSearchbox({
|
|
22436
|
+
on: {
|
|
22437
|
+
input: getInputEvents({
|
|
22438
|
+
onInput: _this.handleInputChange
|
|
22439
|
+
}).input
|
|
22440
|
+
}
|
|
22441
|
+
}) : null, !hasCustomRenderer && filteredItemsToRender.length === 0 ? _this.renderNoResult() : filteredItemsToRender.map(function (item, index) {
|
|
22308
22442
|
var selected = _this.$props.multi // MultiDropdownList
|
|
22309
22443
|
&& (selectedItem && !!selectedItem[item[keyField]] // MultiDropdownRange
|
|
22310
22444
|
|| Array.isArray(selectedItem) && selectedItem.find(function (value) {
|
|
@@ -22425,7 +22559,7 @@
|
|
|
22425
22559
|
"class": getClassName$6(this.$props.innerClass, 'noResults') || null
|
|
22426
22560
|
}, [isFunction$1(renderNoResults) ? renderNoResults() : renderNoResults]);
|
|
22427
22561
|
},
|
|
22428
|
-
renderSearchbox: function renderSearchbox() {
|
|
22562
|
+
renderSearchbox: function renderSearchbox(eventObject) {
|
|
22429
22563
|
var h = this.$createElement;
|
|
22430
22564
|
var _this$$props2 = this.$props,
|
|
22431
22565
|
componentId = _this$$props2.componentId,
|
|
@@ -22433,7 +22567,7 @@
|
|
|
22433
22567
|
showClear = _this$$props2.showClear,
|
|
22434
22568
|
themePreset = _this$$props2.themePreset,
|
|
22435
22569
|
innerClass = _this$$props2.innerClass;
|
|
22436
|
-
var InputComponent = h(Input, {
|
|
22570
|
+
var InputComponent = h(Input, helper$1([{
|
|
22437
22571
|
"attrs": {
|
|
22438
22572
|
"id": componentId + "-input",
|
|
22439
22573
|
"showIcon": false,
|
|
@@ -22446,11 +22580,8 @@
|
|
|
22446
22580
|
border: 0,
|
|
22447
22581
|
borderBottom: '1px solid #ddd'
|
|
22448
22582
|
},
|
|
22449
|
-
"class": getClassName$6(innerClass, 'input')
|
|
22450
|
-
|
|
22451
|
-
"change": this.handleInputChange
|
|
22452
|
-
}
|
|
22453
|
-
});
|
|
22583
|
+
"class": getClassName$6(innerClass, 'input')
|
|
22584
|
+
}, eventObject]));
|
|
22454
22585
|
|
|
22455
22586
|
if (showClear) {
|
|
22456
22587
|
return h(InputWrapper, [InputComponent, this.searchTerm && h(IconGroup, {
|
|
@@ -23247,7 +23378,7 @@
|
|
|
23247
23378
|
}
|
|
23248
23379
|
|
|
23249
23380
|
var performUpdate = function performUpdate() {
|
|
23250
|
-
_this3.currentValue = currentValue;
|
|
23381
|
+
_this3.currentValue = _extends({}, currentValue);
|
|
23251
23382
|
|
|
23252
23383
|
_this3.updateQueryHandler(finalValues, props);
|
|
23253
23384
|
|
|
@@ -25494,7 +25625,8 @@
|
|
|
25494
25625
|
URLParams: VueTypes.bool.def(false),
|
|
25495
25626
|
sliderOptions: VueTypes.object.def({}),
|
|
25496
25627
|
nestedField: types.string,
|
|
25497
|
-
index: VueTypes.string
|
|
25628
|
+
index: VueTypes.string,
|
|
25629
|
+
value: types.range
|
|
25498
25630
|
},
|
|
25499
25631
|
data: function data() {
|
|
25500
25632
|
this.internalRangeComponent = this.$props.componentId + "__range__internal";
|
|
@@ -25540,6 +25672,8 @@
|
|
|
25540
25672
|
components = _this$$$store$getStat.components;
|
|
25541
25673
|
}
|
|
25542
25674
|
|
|
25675
|
+
var value = this.$props.value;
|
|
25676
|
+
|
|
25543
25677
|
if (this.destroyOnUnmount || components.indexOf(this.componentId) === -1) {
|
|
25544
25678
|
this.addComponent(this.componentId);
|
|
25545
25679
|
this.addComponent(this.internalRangeComponent);
|
|
@@ -25548,6 +25682,8 @@
|
|
|
25548
25682
|
this.handleChange(this.selectedValue);
|
|
25549
25683
|
} else if (this.selectedValue) {
|
|
25550
25684
|
this.handleChange(DynamicRangeSlider.parseValue(this.selectedValue, this.$props));
|
|
25685
|
+
} else if (value) {
|
|
25686
|
+
this.handleChange(DynamicRangeSlider.parseValue(value, this.$props));
|
|
25551
25687
|
} // get range before executing other queries
|
|
25552
25688
|
|
|
25553
25689
|
|
|
@@ -25566,6 +25702,13 @@
|
|
|
25566
25702
|
}
|
|
25567
25703
|
},
|
|
25568
25704
|
methods: {
|
|
25705
|
+
isControlled: function isControlled() {
|
|
25706
|
+
if (this.$props.value && this.$listeners) {
|
|
25707
|
+
return true;
|
|
25708
|
+
}
|
|
25709
|
+
|
|
25710
|
+
return false;
|
|
25711
|
+
},
|
|
25569
25712
|
setDefaultValue: function setDefaultValue(_ref) {
|
|
25570
25713
|
var start = _ref.start,
|
|
25571
25714
|
end = _ref.end;
|
|
@@ -25576,6 +25719,8 @@
|
|
|
25576
25719
|
defaultEnd = _this$$props$defaultV.end;
|
|
25577
25720
|
|
|
25578
25721
|
this.handleChange([defaultStart, defaultEnd]);
|
|
25722
|
+
} else if (this.isControlled()) {
|
|
25723
|
+
this.handleChange(DynamicRangeSlider.parseValue(this.$props.value), 'change');
|
|
25579
25724
|
} else {
|
|
25580
25725
|
this.currentValue = [start, end];
|
|
25581
25726
|
}
|
|
@@ -25625,7 +25770,16 @@
|
|
|
25625
25770
|
},
|
|
25626
25771
|
handleSlider: function handleSlider() {
|
|
25627
25772
|
var sliderValues = this.$refs.slider.getValue();
|
|
25628
|
-
this.
|
|
25773
|
+
var value = this.$props.value;
|
|
25774
|
+
|
|
25775
|
+
if (value === undefined) {
|
|
25776
|
+
this.handleChange(sliderValues);
|
|
25777
|
+
} else {
|
|
25778
|
+
this.$emit('change', {
|
|
25779
|
+
start: sliderValues[0],
|
|
25780
|
+
end: sliderValues[1]
|
|
25781
|
+
});
|
|
25782
|
+
}
|
|
25629
25783
|
},
|
|
25630
25784
|
handleChange: function handleChange(currentValue) {
|
|
25631
25785
|
var _this2 = this;
|
|
@@ -25718,6 +25872,7 @@
|
|
|
25718
25872
|
start: this.range.start,
|
|
25719
25873
|
end: this.range.end
|
|
25720
25874
|
};
|
|
25875
|
+
this.$emit('change', value);
|
|
25721
25876
|
this.handleChange(DynamicRangeSlider.parseValue(value, this.$props));
|
|
25722
25877
|
},
|
|
25723
25878
|
range: function range(newValue, oldValue) {
|
|
@@ -25739,6 +25894,11 @@
|
|
|
25739
25894
|
if (!isQueryIdentical(newVal, oldVal, this.$data.currentValue, this.$props)) {
|
|
25740
25895
|
this.updateQueryHandler(this.$data.currentValue);
|
|
25741
25896
|
}
|
|
25897
|
+
},
|
|
25898
|
+
value: function value(newVal, oldVal) {
|
|
25899
|
+
if (!isEqual$e(newVal, oldVal)) {
|
|
25900
|
+
this.handleChange(DynamicRangeSlider.parseValue(newVal, this.$props));
|
|
25901
|
+
}
|
|
25742
25902
|
}
|
|
25743
25903
|
},
|
|
25744
25904
|
render: function render() {
|
|
@@ -25760,9 +25920,9 @@
|
|
|
25760
25920
|
}, [h("vue-slider-component", {
|
|
25761
25921
|
"ref": "slider",
|
|
25762
25922
|
"attrs": {
|
|
25763
|
-
"value": [Math.max(start, this.currentValue[0]), Math.min(end, this.currentValue[1])],
|
|
25764
|
-
"min": Math.min(start, this.currentValue[0]),
|
|
25765
|
-
"max": Math.max(end, this.currentValue[1]),
|
|
25923
|
+
"value": [Math.floor(Math.max(start, this.currentValue[0])), Math.ceil(Math.min(end, this.currentValue[1]))],
|
|
25924
|
+
"min": Math.floor(Math.min(start, this.currentValue[0])),
|
|
25925
|
+
"max": Math.ceil(Math.max(end, this.currentValue[1])),
|
|
25766
25926
|
"dotSize": 20,
|
|
25767
25927
|
"height": 4,
|
|
25768
25928
|
"enable-cross": false,
|
|
@@ -25812,7 +25972,11 @@
|
|
|
25812
25972
|
};
|
|
25813
25973
|
|
|
25814
25974
|
DynamicRangeSlider.parseValue = function (value) {
|
|
25815
|
-
|
|
25975
|
+
if (value) {
|
|
25976
|
+
return Array.isArray(value) ? value : [value.start, value.end];
|
|
25977
|
+
}
|
|
25978
|
+
|
|
25979
|
+
return [];
|
|
25816
25980
|
};
|
|
25817
25981
|
|
|
25818
25982
|
var mapStateToProps$e = function mapStateToProps(state, props) {
|
|
@@ -26255,7 +26419,7 @@
|
|
|
26255
26419
|
var react = component.react;
|
|
26256
26420
|
|
|
26257
26421
|
if (isInternalComponentPresent || isResultComponent) {
|
|
26258
|
-
react =
|
|
26422
|
+
react = helper_24(react, internalComponent);
|
|
26259
26423
|
}
|
|
26260
26424
|
|
|
26261
26425
|
dependencyTree = dependencyTreeReducer(dependencyTree, {
|
|
@@ -26301,7 +26465,7 @@
|
|
|
26301
26465
|
|
|
26302
26466
|
componentCollection.forEach(function (component) {
|
|
26303
26467
|
// eslint-disable-next-line
|
|
26304
|
-
var _buildQuery =
|
|
26468
|
+
var _buildQuery = helper_23(component.componentId, dependencyTree, queryList, queryOptions),
|
|
26305
26469
|
queryObj = _buildQuery.queryObj,
|
|
26306
26470
|
options = _buildQuery.options;
|
|
26307
26471
|
|
|
@@ -26510,7 +26674,7 @@
|
|
|
26510
26674
|
});
|
|
26511
26675
|
}
|
|
26512
26676
|
|
|
26513
|
-
var version = "1.
|
|
26677
|
+
var version = "1.27.0";
|
|
26514
26678
|
|
|
26515
26679
|
var _templateObject$n, _templateObject2$a;
|
|
26516
26680
|
|
|
@@ -26687,6 +26851,10 @@
|
|
|
26687
26851
|
if (this.$props.defaultValue && this.$props.defaultValue.start && this.$props.defaultValue.end) {
|
|
26688
26852
|
this.handleChange(this.$props.defaultValue);
|
|
26689
26853
|
}
|
|
26854
|
+
|
|
26855
|
+
if (this.isControlled()) {
|
|
26856
|
+
this.handleChange(this.$props.value, 'change');
|
|
26857
|
+
}
|
|
26690
26858
|
},
|
|
26691
26859
|
render: function render() {
|
|
26692
26860
|
var h = arguments[0];
|