@appbaseio/reactivesearch-vue 1.33.10 → 1.33.11

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.
@@ -23718,664 +23718,728 @@
23718
23718
  // Add componentType for SSR
23719
23719
  TBConnected.componentType = constants_1$1.toggleButton;
23720
23720
 
23721
- /*!
23722
- * vue-no-ssr v1.1.1
23723
- * (c) 2018-present egoist <0x142857@gmail.com>
23724
- * Released under the MIT License.
23725
- */
23726
-
23727
- var index$3 = {
23728
- name: 'NoSsr',
23729
- functional: true,
23730
- props: {
23731
- placeholder: String,
23732
- placeholderTag: {
23733
- type: String,
23734
- "default": 'div'
23735
- }
23736
- },
23737
- render: function render(h, ref) {
23738
- var parent = ref.parent;
23739
- var slots = ref.slots;
23740
- var props = ref.props;
23741
- var ref$1 = slots();
23742
- var defaultSlot = ref$1["default"];
23743
- if (defaultSlot === void 0) defaultSlot = [];
23744
- var placeholderSlot = ref$1.placeholder;
23745
- if (parent._isMounted) {
23746
- return defaultSlot;
23747
- }
23748
- parent.$once('hook:mounted', function () {
23749
- parent.$forceUpdate();
23750
- });
23751
- if (props.placeholderTag && (props.placeholder || placeholderSlot)) {
23752
- return h(props.placeholderTag, {
23753
- "class": ['no-ssr-placeholder']
23754
- }, props.placeholder || placeholderSlot);
23755
- }
23756
-
23757
- // Return a placeholder element for each child in the default slot
23758
- // Or if no children return a single placeholder
23759
- return defaultSlot.length > 0 ? defaultSlot.map(function () {
23760
- return h(false);
23761
- }) : h(false);
23762
- }
23763
- };
23764
- var vueNoSsr_common = index$3;
23765
-
23766
- var _templateObject$o;
23767
- var Slider = index$1('div')(_templateObject$o || (_templateObject$o = _taggedTemplateLiteralLoose(["\n\tmargin-top: 30px;\n\tpadding: 10px;\n\n\t/* component style */\n\t.vue-slider-disabled {\n\t\topacity: 0.5;\n\t\tcursor: not-allowed;\n\t}\n\n\t/* rail style */\n\t.vue-slider-rail {\n\t\tbackground-color: #ccc;\n\t\tborder-radius: 15px;\n\t\theight: 4px;\n\t}\n\n\t/* process style */\n\t.vue-slider-process {\n\t\tbackground-color: #0b6aff;\n\t\tborder-radius: 15px;\n\t}\n\n\t/* mark style */\n\t.vue-slider-mark {\n\t\tz-index: 4;\n\t}\n\n\t.vue-slider-mark:first-child .vue-slider-mark-step,\n\t.vue-slider-mark:last-child .vue-slider-mark-step {\n\t\tdisplay: none;\n\t}\n\n\t.vue-slider-mark-step {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tborder-radius: 50%;\n\t\tbackground-color: rgba(0, 0, 0, 0.16);\n\t}\n\n\t.vue-slider-mark-label {\n\t\tfont-size: 14px;\n\t\twhite-space: nowrap;\n\t}\n\n\t/* dot style */\n\t.vue-slider-dot {\n\t\tz-index: 2;\n\t}\n\n\t.vue-slider-dot-handle {\n\t\tcursor: pointer;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tborder-radius: 50%;\n\t\tbackground-color: #fff;\n\t\tbox-sizing: border-box;\n\t\tborder: 1px solid #9a9a9a;\n\t\tz-index: 2;\n\t\tbox-shadow: 0.5px 0.5px 2px 1px rgb(0 0 0 / 32%);\n\t}\n\n\t.vue-slider-dot-handle-disabled {\n\t\tcursor: not-allowed;\n\t\tbackground-color: #ccc;\n\t}\n\n\t.vue-slider-dot-tooltip-inner {\n\t\tfont-size: 14px;\n\t\twhite-space: nowrap;\n\t\tpadding: 2px 5px;\n\t\tmin-width: 20px;\n\t\ttext-align: center;\n\t\tcolor: #fff;\n\t\tborder-radius: 5px;\n\t\tborder: 1px solid #3498db;\n\t\tbackground-color: #3498db;\n\t\tbox-sizing: content-box;\n\t}\n\n\t.vue-slider-dot-tooltip-inner::after {\n\t\tcontent: '';\n\t\tposition: absolute;\n\t}\n\n\t.vue-slider-dot-tooltip-inner-top::after {\n\t\ttop: 100%;\n\t\tleft: 50%;\n\t\ttransform: translate(-50%, 0);\n\t\theight: 0;\n\t\twidth: 0;\n\t\tborder-color: transparent;\n\t\tborder-style: solid;\n\t\tborder-width: 5px;\n\t\tborder-top-color: inherit;\n\t}\n\n\t.vue-slider-dot-tooltip-inner-bottom::after {\n\t\tbottom: 100%;\n\t\tleft: 50%;\n\t\ttransform: translate(-50%, 0);\n\t\theight: 0;\n\t\twidth: 0;\n\t\tborder-color: transparent;\n\t\tborder-style: solid;\n\t\tborder-width: 5px;\n\t\tborder-bottom-color: inherit;\n\t}\n\n\t.vue-slider-dot-tooltip-inner-left::after {\n\t\tleft: 100%;\n\t\ttop: 50%;\n\t\ttransform: translate(0, -50%);\n\t\theight: 0;\n\t\twidth: 0;\n\t\tborder-color: transparent;\n\t\tborder-style: solid;\n\t\tborder-width: 5px;\n\t\tborder-left-color: inherit;\n\t}\n\n\t.vue-slider-dot-tooltip-inner-right::after {\n\t\tright: 100%;\n\t\ttop: 50%;\n\t\ttransform: translate(0, -50%);\n\t\theight: 0;\n\t\twidth: 0;\n\t\tborder-color: transparent;\n\t\tborder-style: solid;\n\t\tborder-width: 5px;\n\t\tborder-right-color: inherit;\n\t}\n\n\t.vue-slider-dot-tooltip-wrapper {\n\t\topacity: 0;\n\t\ttransition: all 0.3s;\n\t}\n\t.vue-slider-dot-tooltip-wrapper-show {\n\t\topacity: 1;\n\t}\n\n\t.label-container {\n\t\tmargin: 10px 0;\n\t\twidth: 100%;\n\t}\n\n\t.range-label-right {\n\t\tfloat: right;\n\t}\n"])));
23768
-
23769
- /**
23770
- * Caution: Please do not change this file without having a discussion with the Team.
23771
- * Any change may break the umd build, we're directly replacing the line no: 14
23772
- * `
23773
- var s = document.createElement("script");
23774
- s.setAttribute("src","https://cdn.jsdelivr.net/npm/vue-slider-component@3.2.15/dist/vue-slider-component.umd.min.js");
23775
- s.onload = function(){
23776
- var VueSlider = global['vue-slider-component'];
23777
- components['vue-slider-component'] = VueSlider;
23778
- }
23779
- document.head.appendChild(s);
23780
- ` in rollup umd build process with some script.
23781
- */
23782
- // eslint-disable-next-line
23783
- var getComponents = function getComponents() {
23784
- var components = {
23785
- NoSSR: vueNoSsr_common
23786
- };
23787
- {
23788
- try {
23789
- // in older versions of nuxt, it's process.BROWSER_BUILD
23790
- // eslint-disable-next-line
23791
-
23792
- var s = document.createElement("script");
23793
- s.setAttribute("src","https://cdn.jsdelivr.net/npm/vue-slider-component@3.2.15/dist/vue-slider-component.umd.min.js");
23794
- s.onload = function(){
23795
- var VueSlider = global$1['vue-slider-component'];
23796
- components['vue-slider-component'] = VueSlider;
23797
- };
23798
- document.head.appendChild(s);
23799
-
23800
- } catch (e) {
23801
- console.error('Unable to load vue-slider', e);
23802
- }
23803
- }
23804
- return components;
23805
- };
23806
-
23807
- var addComponent$1 = lib_5.addComponent,
23808
- removeComponent$1 = lib_5.removeComponent,
23809
- watchComponent$1 = lib_5.watchComponent,
23810
- updateQuery$8 = lib_5.updateQuery,
23811
- setQueryListener$1 = lib_5.setQueryListener,
23721
+ var _excluded = ["options"];
23722
+ var updateQuery$8 = lib_5.updateQuery,
23812
23723
  setQueryOptions$7 = lib_5.setQueryOptions,
23813
- setComponentProps$1 = lib_5.setComponentProps,
23814
23724
  setCustomQuery$7 = lib_5.setCustomQuery,
23815
- updateComponentProps$2 = lib_5.updateComponentProps;
23816
- var checkValueChange$7 = lib_8.checkValueChange,
23817
- getClassName$b = lib_8.getClassName,
23725
+ setDefaultQuery$7 = lib_5.setDefaultQuery;
23726
+ var parseHits$1 = lib_8.parseHits,
23818
23727
  isEqual$b = lib_8.isEqual,
23819
- checkSomePropChange$1 = lib_8.checkSomePropChange,
23728
+ getCompositeAggsQuery$5 = lib_8.getCompositeAggsQuery,
23729
+ getResultStats$3 = lib_8.getResultStats,
23820
23730
  extractQueryFromCustomQuery$6 = lib_8.extractQueryFromCustomQuery,
23821
23731
  getOptionsForCustomQuery$6 = lib_8.getOptionsForCustomQuery;
23822
- var DynamicRangeSlider = {
23823
- name: 'DynamicRangeSlider',
23824
- components: getComponents(),
23732
+ var ReactiveComponent = {
23733
+ name: 'ReactiveComponent',
23825
23734
  props: {
23826
- beforeValueChange: types.func,
23827
- className: VueTypes.string.def(''),
23828
- rangeLabels: types.func,
23829
23735
  componentId: types.stringRequired,
23736
+ aggregationField: types.string,
23737
+ aggregationSize: VueTypes.number,
23738
+ size: VueTypes.number,
23739
+ defaultQuery: types.func,
23830
23740
  customQuery: types.func,
23831
- data: types.data,
23832
- dataField: types.stringRequired,
23833
- defaultValue: types.func,
23834
23741
  filterLabel: types.string,
23835
- innerClass: types.style,
23836
23742
  react: types.react,
23837
23743
  showFilter: VueTypes.bool.def(true),
23838
- destroyOnUnmount: VueTypes.bool,
23839
- showCheckbox: VueTypes.bool.def(true),
23840
- title: types.title,
23841
23744
  URLParams: VueTypes.bool.def(false),
23842
- sliderOptions: VueTypes.object.def({}),
23843
- nestedField: types.string,
23745
+ distinctField: types.string,
23746
+ distinctFieldConfig: types.props,
23844
23747
  index: VueTypes.string,
23845
- value: types.range,
23846
23748
  endpoint: types.endpointConfig
23847
23749
  },
23848
- data: function data() {
23849
- this.internalRangeComponent = this.$props.componentId + "__range__internal";
23850
- return {
23851
- currentValue: null,
23852
- stats: []
23853
- };
23854
- },
23855
23750
  created: function created() {
23856
23751
  var _this = this;
23857
- this.$timestamp = new Date().getTime();
23858
- var onQueryChange = function onQueryChange() {
23859
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
23860
- args[_key] = arguments[_key];
23861
- }
23862
- _this.$emit.apply(_this, ['queryChange'].concat(args));
23863
- _this.$emit.apply(_this, ['query-change'].concat(args));
23864
- };
23865
- this.setQueryListener(this.$props.componentId, onQueryChange, null);
23866
- // Update props in store
23867
- this.setComponentProps(this.componentId, this.$props, constants_1$1.dynamicRangeSlider);
23868
- this.setComponentProps(this.internalRangeComponent, this.$props, constants_1$1.dynamicRangeSlider);
23869
- if (!this.enableAppbase && this.$props.index) {
23870
- console.warn('Warning(ReactiveSearch): In order to use the `index` prop, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
23871
- }
23752
+ var props = this.$props;
23753
+ this.internalComponent = null;
23754
+ this.$defaultQuery = null;
23872
23755
  // Set custom query in store
23873
- updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
23874
- },
23875
- mounted: function mounted() {
23876
- this.setReact();
23877
- },
23878
- beforeMount: function beforeMount() {
23879
- var components = [];
23880
- if (this.$$store) {
23881
- var _this$$$store$getStat = this.$$store.getState();
23882
- components = _this$$$store$getStat.components;
23756
+ updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.selectedValue);
23757
+ var customQuery = props.customQuery,
23758
+ componentId = props.componentId,
23759
+ filterLabel = props.filterLabel,
23760
+ showFilter = props.showFilter,
23761
+ URLParams = props.URLParams,
23762
+ distinctField = props.distinctField,
23763
+ distinctFieldConfig = props.distinctFieldConfig,
23764
+ index = props.index;
23765
+ if (this.enableAppbase && this.aggregationField && this.aggregationField !== '') {
23766
+ console.warn('Warning(ReactiveSearch): The `aggregationField` prop has been marked as deprecated, please use the `distinctField` prop instead.');
23883
23767
  }
23884
- var value = this.$props.value;
23885
- if (this.destroyOnUnmount || components.indexOf(this.componentId) === -1) {
23886
- this.addComponent(this.componentId, this.$timestamp);
23887
- this.addComponent(this.internalRangeComponent, this.$timestamp);
23888
- if (Array.isArray(this.selectedValue)) {
23889
- this.handleChange(this.selectedValue);
23890
- } else if (this.selectedValue) {
23891
- this.handleChange(DynamicRangeSlider.parseValue(this.selectedValue, this.$props));
23892
- } else if (value) {
23893
- this.handleChange(DynamicRangeSlider.parseValue(value, this.$props));
23894
- }
23895
-
23896
- // get range before executing other queries
23897
- this.updateRangeQueryOptions();
23768
+ if (!this.enableAppbase && (distinctField || distinctFieldConfig)) {
23769
+ console.warn('Warning(ReactiveSearch): In order to use the `distinctField` and `distinctFieldConfig` props, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
23898
23770
  }
23899
- },
23900
- beforeUpdate: function beforeUpdate() {
23901
- if (!this.currentValue) {
23902
- this.setDefaultValue(this.range);
23771
+ if (!this.enableAppbase && index) {
23772
+ console.warn('Warning(ReactiveSearch): In order to use the `index` prop, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
23903
23773
  }
23904
- },
23905
- beforeDestroy: function beforeDestroy() {
23906
- if (this.destroyOnUnmount) {
23907
- this.removeComponent(this.$props.componentId);
23908
- this.removeComponent(this.internalRangeComponent);
23774
+ if (customQuery) {
23775
+ var calcCustomQuery = customQuery(this.selectedValue, props);
23776
+ var query = extractQueryFromCustomQuery$6(calcCustomQuery);
23777
+ var customQueryOptions = calcCustomQuery ? getOptionsForCustomQuery$6(calcCustomQuery) : null;
23778
+ if (customQueryOptions) {
23779
+ this.setQueryOptions(componentId, _extends({}, customQueryOptions, this.getAggsQuery()), false);
23780
+ } else this.setQueryOptions(componentId, this.getAggsQuery(), false);
23781
+ this.updateQuery({
23782
+ componentId: componentId,
23783
+ query: query,
23784
+ value: this.selectedValue || null,
23785
+ label: filterLabel,
23786
+ showFilter: showFilter,
23787
+ URLParams: URLParams
23788
+ });
23909
23789
  }
23910
- },
23911
- methods: {
23912
- isControlled: function isControlled() {
23913
- if (this.$props.value && this.$listeners) {
23914
- return true;
23790
+ this.setQuery = function (_ref) {
23791
+ var options = _ref.options,
23792
+ obj = _objectWithoutPropertiesLoose(_ref, _excluded);
23793
+ var queryToBeSet = obj.query;
23794
+
23795
+ // when enableAppbase is true, Backend throws error because of repeated query in request body
23796
+ if (queryToBeSet && queryToBeSet.query) {
23797
+ queryToBeSet = queryToBeSet.query;
23915
23798
  }
23916
- return false;
23917
- },
23918
- setDefaultValue: function setDefaultValue(_ref) {
23919
- var start = _ref.start,
23920
- end = _ref.end;
23921
- if (this.$props.defaultValue) {
23922
- var _this$$props$defaultV = this.$props.defaultValue(start, end),
23923
- defaultStart = _this$$props$defaultV.start,
23924
- defaultEnd = _this$$props$defaultV.end;
23925
- this.handleChange([defaultStart, defaultEnd]);
23926
- } else if (this.isControlled()) {
23927
- this.handleChange(DynamicRangeSlider.parseValue(this.$props.value), 'change');
23928
- } else {
23929
- this.currentValue = [start, end];
23799
+ var customQueryCalc = _extends({}, options, {
23800
+ query: queryToBeSet
23801
+ });
23802
+ var rsAPIQuery = customQueryCalc;
23803
+ // handle stored queries
23804
+ if (queryToBeSet && queryToBeSet.id) {
23805
+ rsAPIQuery = queryToBeSet;
23930
23806
  }
23931
- },
23932
- setReact: function setReact() {
23933
- if (this.$props.react) {
23934
- this.watchComponent(this.internalRangeComponent, this.$props.react);
23935
- this.watchComponent(this.$props.componentId, this.$props.react);
23936
- } else {
23937
- this.watchComponent(this.internalRangeComponent, {});
23938
- this.watchComponent(this.$props.componentId, {});
23807
+ // Update customQuery field for RS API
23808
+ _this.setCustomQuery(props.componentId, rsAPIQuery);
23809
+ if (options) {
23810
+ _this.setQueryOptions(props.componentId, _extends({}, _this.getAggsQuery(), options), false);
23939
23811
  }
23940
- },
23941
- rangeQuery: function rangeQuery() {
23942
- return {
23943
- min: {
23944
- min: {
23945
- field: this.$props.dataField
23946
- }
23947
- },
23948
- max: {
23949
- max: {
23950
- field: this.$props.dataField
23951
- }
23952
- }
23953
- };
23954
- },
23955
- updateRangeQueryOptions: function updateRangeQueryOptions() {
23956
- var aggs = {};
23957
- if (this.$props.nestedField) {
23958
- var _aggs;
23959
- aggs = (_aggs = {}, _aggs[this.$props.nestedField] = {
23960
- nested: {
23961
- path: this.$props.nestedField
23962
- },
23963
- aggs: this.rangeQuery()
23964
- }, _aggs);
23965
- } else {
23966
- aggs = this.rangeQuery();
23967
- }
23968
- this.setQueryOptions(this.internalRangeComponent, {
23969
- aggs: aggs
23970
- });
23971
- },
23972
- handleSlider: function handleSlider() {
23973
- var sliderValues = this.$refs.slider.getValue();
23974
- var value = this.$props.value;
23975
- if (value === undefined) {
23976
- this.handleChange(sliderValues);
23977
- } else {
23978
- this.$emit('change', {
23979
- start: sliderValues[0],
23980
- end: sliderValues[1]
23981
- });
23982
- }
23983
- },
23984
- handleChange: function handleChange(currentValue) {
23985
- var _this2 = this;
23986
- // Always keep the values within range
23987
- var normalizedValue = [this.range ? Math.max(this.range.start, currentValue[0]) : currentValue[0], this.range ? Math.min(this.range.end, currentValue[1]) : currentValue[1]];
23988
- var performUpdate = function performUpdate() {
23989
- _this2.currentValue = normalizedValue;
23990
- _this2.updateQueryHandler(normalizedValue, _this2.$props);
23991
- _this2.$emit('valueChange', {
23992
- start: normalizedValue[0],
23993
- end: normalizedValue[1]
23994
- });
23995
- _this2.$emit('value-change', {
23996
- start: normalizedValue[0],
23997
- end: normalizedValue[1]
23998
- });
23999
- };
24000
- checkValueChange$7(this.$props.componentId, {
24001
- start: normalizedValue[0],
24002
- end: normalizedValue[1]
24003
- }, this.$props.beforeValueChange, performUpdate);
24004
- },
24005
- updateQueryHandler: function updateQueryHandler(value) {
24006
- var query = DynamicRangeSlider.defaultQuery(value, this.$props);
24007
- if (this.$props.customQuery) {
24008
- var customQueryTobeSet = this.$props.customQuery(value, this.$props);
24009
- var queryTobeSet = extractQueryFromCustomQuery$6(customQueryTobeSet);
24010
- if (queryTobeSet) {
24011
- query = queryTobeSet;
24012
- }
24013
- var customQueryOptions = getOptionsForCustomQuery$6(customQueryTobeSet);
24014
- updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, value);
24015
- this.setQueryOptions(this.$props.componentId, customQueryOptions, false);
24016
- }
24017
- var _ref2 = this.range || {
24018
- start: value[0],
24019
- end: value[1]
24020
- },
24021
- start = _ref2.start,
24022
- end = _ref2.end;
24023
- var currentStart = value[0],
24024
- currentEnd = value[1];
24025
- // check if the slider is at its initial position
24026
- var isInitialValue = currentStart === start && currentEnd === end;
23812
+ _this.updateQuery(_extends({}, obj, {
23813
+ query: customQueryCalc.query,
23814
+ componentId: props.componentId,
23815
+ label: props.filterLabel,
23816
+ showFilter: props.showFilter,
23817
+ URLParams: props.URLParams
23818
+ }));
23819
+ };
23820
+ if (props.defaultQuery) {
23821
+ this.internalComponent = props.componentId + "__internal";
23822
+ }
23823
+ if (this.internalComponent && this.$props.defaultQuery) {
23824
+ updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props, this.selectedValue);
23825
+ this.$defaultQuery = this.$props.defaultQuery(this.selectedValue, this.$props);
23826
+ var _query = extractQueryFromCustomQuery$6(this.$defaultQuery);
23827
+ var queryOptions = getOptionsForCustomQuery$6(this.$defaultQuery);
23828
+ if (queryOptions) {
23829
+ this.setQueryOptions(this.internalComponent, _extends({}, queryOptions, this.getAggsQuery()), false);
23830
+ } else this.setQueryOptions(this.internalComponent, this.getAggsQuery(), false);
24027
23831
  this.updateQuery({
24028
- componentId: this.$props.componentId,
24029
- query: query,
24030
- value: value,
24031
- label: this.$props.filterLabel,
24032
- showFilter: this.$props.showFilter && !isInitialValue,
24033
- URLParams: this.$props.URLParams,
24034
- componentType: constants_1$1.dynamicRangeSlider
23832
+ componentId: this.internalComponent,
23833
+ query: _query
24035
23834
  });
24036
23835
  }
24037
23836
  },
24038
- computed: {
24039
- labels: function labels() {
24040
- if (!this.rangeLabels) return null;
24041
- return this.rangeLabels(this.range.start, this.range.end);
24042
- }
24043
- },
24044
23837
  watch: {
24045
- $props: {
24046
- deep: true,
24047
- handler: function handler(newVal) {
24048
- var _this3 = this;
24049
- var propsKeys = getValidPropsKeys(newVal);
24050
- checkSomePropChange$1(newVal, this.componentProps, propsKeys, function () {
24051
- _this3.updateComponentProps(_this3.componentId, newVal, constants_1$1.dynamicRangeSlider);
24052
- _this3.updateComponentProps(_this3.internalRangeComponent, newVal, constants_1$1.dynamicRangeSlider);
24053
- });
23838
+ hits: function hits(newVal, oldVal) {
23839
+ if (!isEqual$b(newVal, oldVal)) {
23840
+ this.$emit('data', this.getData());
24054
23841
  }
24055
23842
  },
24056
- react: function react() {
24057
- this.setReact();
23843
+ rawData: function rawData(newVal, oldVal) {
23844
+ if (!isEqual$b(newVal, oldVal)) {
23845
+ this.$emit('data', this.getData());
23846
+ }
24058
23847
  },
24059
- selectedValue: function selectedValue(newValue) {
24060
- if (isEqual$b(newValue, this.currentValue)) return;
24061
- var value = newValue || {
24062
- start: this.range.start,
24063
- end: this.range.end
24064
- };
24065
- this.$emit('change', value);
24066
- this.handleChange(DynamicRangeSlider.parseValue(value, this.$props));
23848
+ aggregations: function aggregations(newVal, oldVal) {
23849
+ if (!isEqual$b(newVal, oldVal)) {
23850
+ this.$emit('data', this.getData());
23851
+ }
24067
23852
  },
24068
- range: function range(newValue, oldValue) {
24069
- if (isEqual$b(newValue, oldValue) || !this.currentValue) return;
24070
- var _ref3 = this.currentValue || [],
24071
- currentStart = _ref3[0],
24072
- currentEnd = _ref3[1];
24073
- var _ref4 = oldValue || {},
24074
- oldStart = _ref4.start,
24075
- oldEnd = _ref4.end;
24076
- var newStart = currentStart === oldStart ? newValue.start : currentStart;
24077
- var newEnd = currentEnd === oldEnd ? newValue.end : currentEnd;
24078
- this.handleChange([newStart, newEnd]);
23853
+ aggregationData: function aggregationData(newVal, oldVal) {
23854
+ if (!isEqual$b(newVal, oldVal)) {
23855
+ this.$emit('data', this.getData());
23856
+ }
24079
23857
  },
24080
- customQuery: function customQuery(newVal, oldVal) {
24081
- if (!isQueryIdentical(newVal, oldVal, this.$data.currentValue, this.$props)) {
24082
- this.updateQueryHandler(this.$data.currentValue);
23858
+ promotedResults: function promotedResults(newVal, oldVal) {
23859
+ if (!isEqual$b(newVal, oldVal)) {
23860
+ this.$emit('data', this.getData());
24083
23861
  }
24084
23862
  },
24085
- value: function value(newVal, oldVal) {
23863
+ hidden: function hidden(newVal, oldVal) {
24086
23864
  if (!isEqual$b(newVal, oldVal)) {
24087
- this.handleChange(DynamicRangeSlider.parseValue(newVal, this.$props));
23865
+ this.$emit('data', this.getData());
23866
+ }
23867
+ },
23868
+ total: function total(newVal, oldVal) {
23869
+ if (!isEqual$b(newVal, oldVal)) {
23870
+ this.$emit('data', this.getData());
23871
+ }
23872
+ },
23873
+ time: function time(newVal, oldVal) {
23874
+ if (!isEqual$b(newVal, oldVal)) {
23875
+ this.$emit('data', this.getData());
23876
+ }
23877
+ },
23878
+ defaultQuery: function defaultQuery(newVal, oldVal) {
23879
+ if (newVal && !isQueryIdentical(newVal, oldVal, this.selectedValue, this.$props)) {
23880
+ this.$defaultQuery = newVal(this.selectedValue, this.$props);
23881
+ var query = extractQueryFromCustomQuery$6(this.$defaultQuery);
23882
+ var queryOptions = getOptionsForCustomQuery$6(this.$defaultQuery);
23883
+ if (queryOptions) {
23884
+ this.setQueryOptions(this.internalComponent, _extends({}, queryOptions, this.getAggsQuery()), false);
23885
+ } else this.setQueryOptions(this.internalComponent, this.getAggsQuery(), false);
23886
+ // Update default query for RS API
23887
+ updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props, this.selectedValue);
23888
+ this.updateQuery({
23889
+ componentId: this.internalComponent,
23890
+ query: query
23891
+ });
23892
+ }
23893
+ },
23894
+ customQuery: function customQuery(newVal, oldVal) {
23895
+ if (newVal && !isQueryIdentical(newVal, oldVal, this.selectedValue, this.$props)) {
23896
+ var componentId = this.$props.componentId;
23897
+ this.$customQuery = newVal(this.selectedValue, this.$props);
23898
+ var query = extractQueryFromCustomQuery$6(this.$customQuery);
23899
+ var queryOptions = getOptionsForCustomQuery$6(this.$customQuery);
23900
+ if (queryOptions) {
23901
+ this.setQueryOptions(componentId, _extends({}, queryOptions, this.getAggsQuery()), false);
23902
+ } else this.setQueryOptions(componentId, this.getAggsQuery(), false);
23903
+
23904
+ // Update custom query for RS API
23905
+ updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.selectedValue);
23906
+ this.updateQuery({
23907
+ componentId: componentId,
23908
+ query: query
23909
+ });
24088
23910
  }
24089
23911
  }
24090
23912
  },
24091
23913
  render: function render() {
24092
23914
  var h = arguments[0];
24093
- if (!this.range || !this.currentValue) {
23915
+ try {
23916
+ var dom = this.$scopedSlots["default"];
23917
+ var error = this.error,
23918
+ isLoading = this.isLoading,
23919
+ selectedValue = this.selectedValue;
23920
+ var propsToBePassed = _extends({
23921
+ error: error,
23922
+ loading: isLoading
23923
+ }, this.getData(), {
23924
+ value: selectedValue,
23925
+ setQuery: this.setQuery
23926
+ });
23927
+ return h("div", [dom(propsToBePassed)]);
23928
+ } catch (e) {
24094
23929
  return null;
24095
23930
  }
24096
- var _this$range = this.range,
24097
- start = _this$range.start,
24098
- end = _this$range.end;
24099
- return h(Container, {
24100
- "class": this.$props.className
24101
- }, [this.$props.title && h(Title, {
24102
- "class": getClassName$b(this.$props.innerClass, 'title')
24103
- }, [this.$props.title]), h(vueNoSsr_common, [h(Slider, {
24104
- "class": getClassName$b(this.$props.innerClass, 'slider')
24105
- }, [h("vue-slider-component", {
24106
- "ref": "slider",
24107
- "attrs": {
24108
- "value": [Math.floor(Math.max(start, this.currentValue[0])), Math.ceil(Math.min(end, this.currentValue[1]))],
24109
- "min": Math.floor(Math.min(start, this.currentValue[0])),
24110
- "max": Math.ceil(Math.max(end, this.currentValue[1])),
24111
- "dotSize": 20,
24112
- "height": 4,
24113
- "enable-cross": false,
24114
- "tooltip": "always"
24115
- },
24116
- "on": {
24117
- "drag-end": this.handleSlider
24118
- },
24119
- "props": _extends({}, this.$props.sliderOptions)
24120
- }), this.labels ? h("div", {
24121
- "class": "label-container"
24122
- }, [h("label", {
24123
- "class": getClassName$b(this.$props.innerClass, 'label') || 'range-label-left'
24124
- }, [this.labels.start]), h("label", {
24125
- "class": getClassName$b(this.$props.innerClass, 'label') || 'range-label-right'
24126
- }, [this.labels.end])]) : null])])]);
24127
- }
24128
- };
24129
- DynamicRangeSlider.defaultQuery = function (values, props) {
24130
- var query = null;
24131
- if (Array.isArray(values) && values.length) {
24132
- var _range;
24133
- query = {
24134
- range: (_range = {}, _range[props.dataField] = {
24135
- gte: values[0],
24136
- lte: values[1],
24137
- boost: 2.0
24138
- }, _range)
24139
- };
24140
- }
24141
- if (query && props.nestedField) {
24142
- return {
24143
- query: {
24144
- nested: {
24145
- path: props.nestedField,
24146
- query: query
23931
+ },
23932
+ methods: {
23933
+ getAggsQuery: function getAggsQuery() {
23934
+ if (this.aggregationField) {
23935
+ return {
23936
+ aggs: getCompositeAggsQuery$5({
23937
+ props: this.$props,
23938
+ showTopHits: true,
23939
+ value: this.selectedValue
23940
+ }).aggs
23941
+ };
23942
+ }
23943
+ return {};
23944
+ },
23945
+ getData: function getData() {
23946
+ var hits = this.hits,
23947
+ aggregations = this.aggregations,
23948
+ aggregationData = this.aggregationData,
23949
+ promotedResults = this.promotedResults,
23950
+ rawData = this.rawData;
23951
+ var filteredResults = parseHits$1(hits);
23952
+ if (promotedResults.length) {
23953
+ var ids = promotedResults.map(function (item) {
23954
+ return item._id;
23955
+ }).filter(Boolean);
23956
+ if (ids) {
23957
+ filteredResults = filteredResults.filter(function (item) {
23958
+ return !ids.includes(item._id);
23959
+ });
24147
23960
  }
23961
+ filteredResults = [].concat(promotedResults, filteredResults);
24148
23962
  }
24149
- };
24150
- }
24151
- return query;
24152
- };
24153
- DynamicRangeSlider.parseValue = function (value) {
24154
- if (value) {
24155
- return Array.isArray(value) ? value : [value.start, value.end];
23963
+ return {
23964
+ data: filteredResults,
23965
+ aggregationData: aggregationData,
23966
+ rawData: rawData,
23967
+ aggregations: aggregations,
23968
+ promotedData: promotedResults,
23969
+ resultStats: this.stats
23970
+ };
23971
+ }
23972
+ },
23973
+ computed: {
23974
+ stats: function stats() {
23975
+ return getResultStats$3(this);
23976
+ }
24156
23977
  }
24157
- return [];
24158
23978
  };
24159
- DynamicRangeSlider.hasInternalComponent = function () {
24160
- return true;
23979
+ ReactiveComponent.hasInternalComponent = function (props) {
23980
+ return !!props.defaultQuery;
24161
23981
  };
24162
23982
  var mapStateToProps$a = function mapStateToProps(state, props) {
24163
- var componentId = state.aggregations[props.componentId];
24164
- var internalRange = state.aggregations[props.componentId + "__range__internal"];
24165
- var options = componentId && componentId[props.dataField];
24166
- var range = state.aggregations[props.componentId + "__range__internal"];
24167
- if (props.nestedField) {
24168
- options = options && componentId[props.dataField][props.nestedField] && componentId[props.dataField][props.nestedField].buckets ? componentId[props.dataField][props.nestedField].buckets : [];
24169
- range = range && internalRange[props.nestedField].min ? {
24170
- start: internalRange[props.nestedField].min.value,
24171
- end: internalRange[props.nestedField].max.value
24172
- } : null;
24173
- } else {
24174
- options = options && componentId[props.dataField].buckets ? componentId[props.dataField].buckets : [];
24175
- range = range && internalRange.min ? {
24176
- start: internalRange.min.value,
24177
- end: internalRange.max.value
24178
- } : null;
24179
- }
24180
23983
  return {
24181
- options: options,
24182
- range: range,
24183
- selectedValue: state.selectedValues[props.componentId] ? state.selectedValues[props.componentId].value : null,
23984
+ aggregations: state.aggregations[props.componentId] && state.aggregations[props.componentId] || null,
23985
+ aggregationData: state.compositeAggregations[props.componentId] || [],
23986
+ hits: state.hits[props.componentId] && state.hits[props.componentId].hits || [],
23987
+ rawData: state.rawData[props.componentId],
23988
+ error: state.error[props.componentId],
23989
+ isLoading: state.isLoading[props.componentId],
23990
+ selectedValue: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value || null,
23991
+ promotedResults: state.promotedResults[props.componentId] || [],
23992
+ time: state.hits[props.componentId] && state.hits[props.componentId].time || 0,
23993
+ total: state.hits[props.componentId] && state.hits[props.componentId].total,
23994
+ hidden: state.hits[props.componentId] && state.hits[props.componentId].hidden,
24184
23995
  componentProps: state.props[props.componentId],
24185
23996
  enableAppbase: state.config.enableAppbase
24186
23997
  };
24187
23998
  };
24188
23999
  var mapDispatchtoProps$7 = {
24189
- addComponent: addComponent$1,
24190
- removeComponent: removeComponent$1,
24191
- updateQuery: updateQuery$8,
24192
- watchComponent: watchComponent$1,
24193
- setQueryListener: setQueryListener$1,
24194
24000
  setQueryOptions: setQueryOptions$7,
24195
- setComponentProps: setComponentProps$1,
24001
+ updateQuery: updateQuery$8,
24196
24002
  setCustomQuery: setCustomQuery$7,
24197
- updateComponentProps: updateComponentProps$2
24003
+ setDefaultQuery: setDefaultQuery$7
24198
24004
  };
24199
- var RangeConnected = PreferencesConsumer(connect(mapStateToProps$a, mapDispatchtoProps$7)(DynamicRangeSlider));
24200
- RangeConnected.defaultQuery = DynamicRangeSlider.defaultQuery;
24201
- RangeConnected.parseValue = DynamicRangeSlider.parseValue;
24202
- RangeConnected.hasInternalComponent = DynamicRangeSlider.hasInternalComponent;
24203
- RangeConnected.name = DynamicRangeSlider.name;
24204
-
24005
+ var ConnectedComponent = ComponentWrapper$1(connect(mapStateToProps$a, mapDispatchtoProps$7)(ReactiveComponent), {
24006
+ componentType: constants_1$1.reactiveComponent
24007
+ });
24008
+ var RcConnected = PreferencesConsumer({
24009
+ name: 'RcConnected',
24010
+ render: function render(h) {
24011
+ return h(ConnectedComponent, {
24012
+ attrs: this.$attrs,
24013
+ on: this.$listeners,
24014
+ scopedSlots: this.$scopedSlots,
24015
+ slots: this.$slots
24016
+ });
24017
+ }
24018
+ });
24019
+ RcConnected.name = ReactiveComponent.name;
24020
+ RcConnected.hasInternalComponent = ReactiveComponent.hasInternalComponent;
24205
24021
  // Add componentType for SSR
24206
- RangeConnected.componentType = constants_1$1.dynamicRangeSlider;
24207
- RangeConnected.install = function (Vue) {
24208
- Vue.component(RangeConnected.name, RangeConnected);
24022
+ RcConnected.componentType = constants_1$1.reactiveComponent;
24023
+ RcConnected.install = function (Vue) {
24024
+ Vue.component(RcConnected.name, RcConnected);
24209
24025
  };
24210
24026
 
24211
- var updateQuery$9 = lib_5.updateQuery,
24212
- setQueryOptions$8 = lib_5.setQueryOptions,
24213
- setCustomQuery$8 = lib_5.setCustomQuery;
24214
- var isEqual$c = lib_8.isEqual,
24215
- checkValueChange$8 = lib_8.checkValueChange,
24216
- getClassName$c = lib_8.getClassName,
24217
- getOptionsFromQuery$1 = lib_8.getOptionsFromQuery;
24218
- var SingleRange = {
24219
- name: 'SingleRange',
24220
- data: function data() {
24221
- this.__state = {
24222
- currentValue: null
24223
- };
24224
- this.type = 'range';
24225
- return this.__state;
24027
+ /*!
24028
+ * vue-no-ssr v1.1.1
24029
+ * (c) 2018-present egoist <0x142857@gmail.com>
24030
+ * Released under the MIT License.
24031
+ */
24032
+
24033
+ var index$3 = {
24034
+ name: 'NoSsr',
24035
+ functional: true,
24036
+ props: {
24037
+ placeholder: String,
24038
+ placeholderTag: {
24039
+ type: String,
24040
+ "default": 'div'
24041
+ }
24226
24042
  },
24043
+ render: function render(h, ref) {
24044
+ var parent = ref.parent;
24045
+ var slots = ref.slots;
24046
+ var props = ref.props;
24047
+ var ref$1 = slots();
24048
+ var defaultSlot = ref$1["default"];
24049
+ if (defaultSlot === void 0) defaultSlot = [];
24050
+ var placeholderSlot = ref$1.placeholder;
24051
+ if (parent._isMounted) {
24052
+ return defaultSlot;
24053
+ }
24054
+ parent.$once('hook:mounted', function () {
24055
+ parent.$forceUpdate();
24056
+ });
24057
+ if (props.placeholderTag && (props.placeholder || placeholderSlot)) {
24058
+ return h(props.placeholderTag, {
24059
+ "class": ['no-ssr-placeholder']
24060
+ }, props.placeholder || placeholderSlot);
24061
+ }
24062
+
24063
+ // Return a placeholder element for each child in the default slot
24064
+ // Or if no children return a single placeholder
24065
+ return defaultSlot.length > 0 ? defaultSlot.map(function () {
24066
+ return h(false);
24067
+ }) : h(false);
24068
+ }
24069
+ };
24070
+ var vueNoSsr_common = index$3;
24071
+
24072
+ var _templateObject$o;
24073
+ var Slider = index$1('div')(_templateObject$o || (_templateObject$o = _taggedTemplateLiteralLoose(["\n\tmargin-top: 30px;\n\tpadding: 10px;\n\n\t/* component style */\n\t.vue-slider-disabled {\n\t\topacity: 0.5;\n\t\tcursor: not-allowed;\n\t}\n\n\t/* rail style */\n\t.vue-slider-rail {\n\t\tbackground-color: #ccc;\n\t\tborder-radius: 15px;\n\t\theight: 4px;\n\t}\n\n\t/* process style */\n\t.vue-slider-process {\n\t\tbackground-color: #0b6aff;\n\t\tborder-radius: 15px;\n\t}\n\n\t/* mark style */\n\t.vue-slider-mark {\n\t\tz-index: 4;\n\t}\n\n\t.vue-slider-mark:first-child .vue-slider-mark-step,\n\t.vue-slider-mark:last-child .vue-slider-mark-step {\n\t\tdisplay: none;\n\t}\n\n\t.vue-slider-mark-step {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tborder-radius: 50%;\n\t\tbackground-color: rgba(0, 0, 0, 0.16);\n\t}\n\n\t.vue-slider-mark-label {\n\t\tfont-size: 14px;\n\t\twhite-space: nowrap;\n\t}\n\n\t/* dot style */\n\t.vue-slider-dot {\n\t\tz-index: 2;\n\t}\n\n\t.vue-slider-dot-handle {\n\t\tcursor: pointer;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tborder-radius: 50%;\n\t\tbackground-color: #fff;\n\t\tbox-sizing: border-box;\n\t\tborder: 1px solid #9a9a9a;\n\t\tz-index: 2;\n\t\tbox-shadow: 0.5px 0.5px 2px 1px rgb(0 0 0 / 32%);\n\t}\n\n\t.vue-slider-dot-handle-disabled {\n\t\tcursor: not-allowed;\n\t\tbackground-color: #ccc;\n\t}\n\n\t.vue-slider-dot-tooltip-inner {\n\t\tfont-size: 14px;\n\t\twhite-space: nowrap;\n\t\tpadding: 2px 5px;\n\t\tmin-width: 20px;\n\t\ttext-align: center;\n\t\tcolor: #fff;\n\t\tborder-radius: 5px;\n\t\tborder: 1px solid #3498db;\n\t\tbackground-color: #3498db;\n\t\tbox-sizing: content-box;\n\t}\n\n\t.vue-slider-dot-tooltip-inner::after {\n\t\tcontent: '';\n\t\tposition: absolute;\n\t}\n\n\t.vue-slider-dot-tooltip-inner-top::after {\n\t\ttop: 100%;\n\t\tleft: 50%;\n\t\ttransform: translate(-50%, 0);\n\t\theight: 0;\n\t\twidth: 0;\n\t\tborder-color: transparent;\n\t\tborder-style: solid;\n\t\tborder-width: 5px;\n\t\tborder-top-color: inherit;\n\t}\n\n\t.vue-slider-dot-tooltip-inner-bottom::after {\n\t\tbottom: 100%;\n\t\tleft: 50%;\n\t\ttransform: translate(-50%, 0);\n\t\theight: 0;\n\t\twidth: 0;\n\t\tborder-color: transparent;\n\t\tborder-style: solid;\n\t\tborder-width: 5px;\n\t\tborder-bottom-color: inherit;\n\t}\n\n\t.vue-slider-dot-tooltip-inner-left::after {\n\t\tleft: 100%;\n\t\ttop: 50%;\n\t\ttransform: translate(0, -50%);\n\t\theight: 0;\n\t\twidth: 0;\n\t\tborder-color: transparent;\n\t\tborder-style: solid;\n\t\tborder-width: 5px;\n\t\tborder-left-color: inherit;\n\t}\n\n\t.vue-slider-dot-tooltip-inner-right::after {\n\t\tright: 100%;\n\t\ttop: 50%;\n\t\ttransform: translate(0, -50%);\n\t\theight: 0;\n\t\twidth: 0;\n\t\tborder-color: transparent;\n\t\tborder-style: solid;\n\t\tborder-width: 5px;\n\t\tborder-right-color: inherit;\n\t}\n\n\t.vue-slider-dot-tooltip-wrapper {\n\t\topacity: 0;\n\t\ttransition: all 0.3s;\n\t}\n\t.vue-slider-dot-tooltip-wrapper-show {\n\t\topacity: 1;\n\t}\n\n\t.label-container {\n\t\tmargin: 10px 0;\n\t\twidth: 100%;\n\t}\n\n\t.range-label-right {\n\t\tfloat: right;\n\t}\n"])));
24074
+
24075
+ /**
24076
+ * Caution: Please do not change this file without having a discussion with the Team.
24077
+ * Any change may break the umd build, we're directly replacing the line no: 14
24078
+ * `
24079
+ var s = document.createElement("script");
24080
+ s.setAttribute("src","https://cdn.jsdelivr.net/npm/vue-slider-component@3.2.15/dist/vue-slider-component.umd.min.js");
24081
+ s.onload = function(){
24082
+ var VueSlider = global['vue-slider-component'];
24083
+ components['vue-slider-component'] = VueSlider;
24084
+ }
24085
+ document.head.appendChild(s);
24086
+ ` in rollup umd build process with some script.
24087
+ */
24088
+ // eslint-disable-next-line
24089
+ var getComponents = function getComponents() {
24090
+ var components = {
24091
+ NoSSR: vueNoSsr_common
24092
+ };
24093
+ {
24094
+ try {
24095
+ // in older versions of nuxt, it's process.BROWSER_BUILD
24096
+ // eslint-disable-next-line
24097
+
24098
+ var s = document.createElement("script");
24099
+ s.setAttribute("src","https://cdn.jsdelivr.net/npm/vue-slider-component@3.2.15/dist/vue-slider-component.umd.min.js");
24100
+ s.onload = function(){
24101
+ var VueSlider = global$1['vue-slider-component'];
24102
+ components['vue-slider-component'] = VueSlider;
24103
+ };
24104
+ document.head.appendChild(s);
24105
+
24106
+ } catch (e) {
24107
+ console.error('Unable to load vue-slider', e);
24108
+ }
24109
+ }
24110
+ return components;
24111
+ };
24112
+
24113
+ var addComponent$1 = lib_5.addComponent,
24114
+ removeComponent$1 = lib_5.removeComponent,
24115
+ watchComponent$1 = lib_5.watchComponent,
24116
+ updateQuery$9 = lib_5.updateQuery,
24117
+ setQueryListener$1 = lib_5.setQueryListener,
24118
+ setQueryOptions$8 = lib_5.setQueryOptions,
24119
+ setComponentProps$1 = lib_5.setComponentProps,
24120
+ setCustomQuery$8 = lib_5.setCustomQuery,
24121
+ updateComponentProps$2 = lib_5.updateComponentProps;
24122
+ var checkValueChange$7 = lib_8.checkValueChange,
24123
+ getClassName$b = lib_8.getClassName,
24124
+ isEqual$c = lib_8.isEqual,
24125
+ checkSomePropChange$1 = lib_8.checkSomePropChange,
24126
+ extractQueryFromCustomQuery$7 = lib_8.extractQueryFromCustomQuery,
24127
+ getOptionsForCustomQuery$7 = lib_8.getOptionsForCustomQuery;
24128
+ var DynamicRangeSlider = {
24129
+ name: 'DynamicRangeSlider',
24130
+ components: getComponents(),
24227
24131
  props: {
24228
24132
  beforeValueChange: types.func,
24229
24133
  className: VueTypes.string.def(''),
24134
+ rangeLabels: types.func,
24230
24135
  componentId: types.stringRequired,
24231
24136
  customQuery: types.func,
24232
24137
  data: types.data,
24233
24138
  dataField: types.stringRequired,
24234
- defaultValue: types.string,
24235
- value: types.value,
24139
+ defaultValue: types.func,
24236
24140
  filterLabel: types.string,
24237
24141
  innerClass: types.style,
24238
24142
  react: types.react,
24239
24143
  showFilter: VueTypes.bool.def(true),
24240
- showRadio: VueTypes.bool.def(true),
24144
+ destroyOnUnmount: VueTypes.bool,
24145
+ showCheckbox: VueTypes.bool.def(true),
24241
24146
  title: types.title,
24242
24147
  URLParams: VueTypes.bool.def(false),
24148
+ sliderOptions: VueTypes.object.def({}),
24243
24149
  nestedField: types.string,
24244
24150
  index: VueTypes.string,
24151
+ value: types.range,
24245
24152
  endpoint: types.endpointConfig
24246
24153
  },
24154
+ data: function data() {
24155
+ this.internalRangeComponent = this.$props.componentId + "__range__internal";
24156
+ return {
24157
+ currentValue: null,
24158
+ stats: []
24159
+ };
24160
+ },
24247
24161
  created: function created() {
24162
+ var _this = this;
24163
+ this.$timestamp = new Date().getTime();
24164
+ var onQueryChange = function onQueryChange() {
24165
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
24166
+ args[_key] = arguments[_key];
24167
+ }
24168
+ _this.$emit.apply(_this, ['queryChange'].concat(args));
24169
+ _this.$emit.apply(_this, ['query-change'].concat(args));
24170
+ };
24171
+ this.setQueryListener(this.$props.componentId, onQueryChange, null);
24172
+ // Update props in store
24173
+ this.setComponentProps(this.componentId, this.$props, constants_1$1.dynamicRangeSlider);
24174
+ this.setComponentProps(this.internalRangeComponent, this.$props, constants_1$1.dynamicRangeSlider);
24248
24175
  if (!this.enableAppbase && this.$props.index) {
24249
24176
  console.warn('Warning(ReactiveSearch): In order to use the `index` prop, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
24250
24177
  }
24251
24178
  // Set custom query in store
24252
24179
  updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
24253
24180
  },
24181
+ mounted: function mounted() {
24182
+ this.setReact();
24183
+ },
24254
24184
  beforeMount: function beforeMount() {
24255
- if (this.selectedValue) {
24256
- this.setValue(this.selectedValue);
24257
- } else if (this.$props.value) {
24258
- this.setValue(this.$props.value);
24259
- } else if (this.$props.defaultValue) {
24260
- this.setValue(this.$props.defaultValue);
24185
+ var components = [];
24186
+ if (this.$$store) {
24187
+ var _this$$$store$getStat = this.$$store.getState();
24188
+ components = _this$$$store$getStat.components;
24189
+ }
24190
+ var value = this.$props.value;
24191
+ if (this.destroyOnUnmount || components.indexOf(this.componentId) === -1) {
24192
+ this.addComponent(this.componentId, this.$timestamp);
24193
+ this.addComponent(this.internalRangeComponent, this.$timestamp);
24194
+ if (Array.isArray(this.selectedValue)) {
24195
+ this.handleChange(this.selectedValue);
24196
+ } else if (this.selectedValue) {
24197
+ this.handleChange(DynamicRangeSlider.parseValue(this.selectedValue, this.$props));
24198
+ } else if (value) {
24199
+ this.handleChange(DynamicRangeSlider.parseValue(value, this.$props));
24200
+ }
24201
+
24202
+ // get range before executing other queries
24203
+ this.updateRangeQueryOptions();
24261
24204
  }
24262
24205
  },
24263
- watch: {
24264
- dataField: function dataField() {
24265
- this.updateQueryHandler(this.$data.currentValue, this.$props);
24266
- },
24267
- defaultValue: function defaultValue(newVal) {
24268
- this.setValue(newVal);
24269
- },
24270
- value: function value(newVal, oldVal) {
24271
- if (!isEqual$c(newVal, oldVal)) {
24272
- this.setValue(newVal);
24206
+ beforeUpdate: function beforeUpdate() {
24207
+ if (!this.currentValue) {
24208
+ this.setDefaultValue(this.range);
24209
+ }
24210
+ },
24211
+ beforeDestroy: function beforeDestroy() {
24212
+ if (this.destroyOnUnmount) {
24213
+ this.removeComponent(this.$props.componentId);
24214
+ this.removeComponent(this.internalRangeComponent);
24215
+ }
24216
+ },
24217
+ methods: {
24218
+ isControlled: function isControlled() {
24219
+ if (this.$props.value && this.$listeners) {
24220
+ return true;
24273
24221
  }
24222
+ return false;
24274
24223
  },
24275
- selectedValue: function selectedValue(newVal) {
24276
- if (!isEqual$c(this.$data.currentValue, newVal)) {
24277
- this.setValue(newVal);
24224
+ setDefaultValue: function setDefaultValue(_ref) {
24225
+ var start = _ref.start,
24226
+ end = _ref.end;
24227
+ if (this.$props.defaultValue) {
24228
+ var _this$$props$defaultV = this.$props.defaultValue(start, end),
24229
+ defaultStart = _this$$props$defaultV.start,
24230
+ defaultEnd = _this$$props$defaultV.end;
24231
+ this.handleChange([defaultStart, defaultEnd]);
24232
+ } else if (this.isControlled()) {
24233
+ this.handleChange(DynamicRangeSlider.parseValue(this.$props.value), 'change');
24234
+ } else {
24235
+ this.currentValue = [start, end];
24278
24236
  }
24279
24237
  },
24280
- customQuery: function customQuery(newVal, oldVal) {
24281
- if (!isQueryIdentical(newVal, oldVal, this.$data.currentValue, this.$props)) {
24282
- this.updateQueryHandler(this.$data.currentValue, this.$props);
24238
+ setReact: function setReact() {
24239
+ if (this.$props.react) {
24240
+ this.watchComponent(this.internalRangeComponent, this.$props.react);
24241
+ this.watchComponent(this.$props.componentId, this.$props.react);
24242
+ } else {
24243
+ this.watchComponent(this.internalRangeComponent, {});
24244
+ this.watchComponent(this.$props.componentId, {});
24283
24245
  }
24284
- }
24285
- },
24286
- render: function render() {
24287
- var _this = this;
24288
- var h = arguments[0];
24289
- return h(Container, {
24290
- "class": this.$props.className
24291
- }, [this.$props.title && h(Title, {
24292
- "class": getClassName$c(this.$props.innerClass, 'title')
24293
- }, [this.$props.title]), h(UL, {
24294
- "class": getClassName$c(this.$props.innerClass, 'list')
24295
- }, [this.$props.data.map(function (item) {
24296
- var selected = !!_this.$data.currentValue && _this.$data.currentValue.label === item.label;
24297
- return h("li", {
24298
- "key": item.label,
24299
- "class": "" + (selected ? 'active' : '')
24300
- }, [h(Radio, {
24301
- "class": getClassName$c(_this.$props.innerClass, 'radio'),
24302
- "attrs": {
24303
- "id": _this.$props.componentId + "-" + item.label,
24304
- "name": _this.$props.componentId,
24305
- "value": item.label,
24306
- "type": "radio",
24307
- "checked": selected,
24308
- "show": _this.$props.showRadio
24246
+ },
24247
+ rangeQuery: function rangeQuery() {
24248
+ return {
24249
+ min: {
24250
+ min: {
24251
+ field: this.$props.dataField
24252
+ }
24309
24253
  },
24310
- "on": {
24311
- "change": _this.handleChange
24312
- }
24313
- }), h("label", {
24314
- "class": getClassName$c(_this.$props.innerClass, 'label'),
24315
- "attrs": {
24316
- "for": _this.$props.componentId + "-" + item.label
24254
+ max: {
24255
+ max: {
24256
+ field: this.$props.dataField
24257
+ }
24317
24258
  }
24318
- }, [item.label])]);
24319
- })])]);
24320
- },
24321
- methods: {
24322
- setValue: function setValue(value, props) {
24323
- var _this2 = this;
24324
- if (props === void 0) {
24325
- props = this.$props;
24326
- }
24327
- var currentValue = typeof value === 'string' ? SingleRange.parseValue(value, props) : value;
24328
- var performUpdate = function performUpdate() {
24329
- _this2.currentValue = currentValue;
24330
- _this2.updateQueryHandler(currentValue, props);
24331
- _this2.$emit('valueChange', currentValue);
24332
- _this2.$emit('value-change', currentValue);
24333
24259
  };
24334
- checkValueChange$8(props.componentId, currentValue, props.beforeValueChange, performUpdate);
24335
24260
  },
24336
- updateQueryHandler: function updateQueryHandler(value, props) {
24337
- var customQuery = props.customQuery;
24338
- var query = SingleRange.defaultQuery(value, props);
24339
- if (customQuery) {
24340
- var _ref = customQuery(value, props) || {};
24341
- query = _ref.query;
24342
- var customQueryOptions = getOptionsFromQuery$1(customQuery(value, props));
24343
- updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
24344
- this.setQueryOptions(props.componentId, customQueryOptions, false);
24261
+ updateRangeQueryOptions: function updateRangeQueryOptions() {
24262
+ var aggs = {};
24263
+ if (this.$props.nestedField) {
24264
+ var _aggs;
24265
+ aggs = (_aggs = {}, _aggs[this.$props.nestedField] = {
24266
+ nested: {
24267
+ path: this.$props.nestedField
24268
+ },
24269
+ aggs: this.rangeQuery()
24270
+ }, _aggs);
24271
+ } else {
24272
+ aggs = this.rangeQuery();
24345
24273
  }
24346
- this.updateQuery({
24347
- componentId: props.componentId,
24348
- query: query,
24349
- value: value,
24350
- label: props.filterLabel,
24351
- showFilter: props.showFilter,
24352
- URLParams: props.URLParams,
24353
- componentType: constants_1$1.singleRange
24274
+ this.setQueryOptions(this.internalRangeComponent, {
24275
+ aggs: aggs
24354
24276
  });
24355
24277
  },
24356
- handleChange: function handleChange(e) {
24278
+ handleSlider: function handleSlider() {
24279
+ var sliderValues = this.$refs.slider.getValue();
24357
24280
  var value = this.$props.value;
24358
24281
  if (value === undefined) {
24359
- this.setValue(e.target.value);
24282
+ this.handleChange(sliderValues);
24360
24283
  } else {
24361
- this.$emit('change', e.target.value);
24284
+ this.$emit('change', {
24285
+ start: sliderValues[0],
24286
+ end: sliderValues[1]
24287
+ });
24288
+ }
24289
+ },
24290
+ handleChange: function handleChange(currentValue) {
24291
+ var _this2 = this;
24292
+ // Always keep the values within range
24293
+ var normalizedValue = [this.range ? Math.max(this.range.start, currentValue[0]) : currentValue[0], this.range ? Math.min(this.range.end, currentValue[1]) : currentValue[1]];
24294
+ var performUpdate = function performUpdate() {
24295
+ _this2.currentValue = normalizedValue;
24296
+ _this2.updateQueryHandler(normalizedValue, _this2.$props);
24297
+ _this2.$emit('valueChange', {
24298
+ start: normalizedValue[0],
24299
+ end: normalizedValue[1]
24300
+ });
24301
+ _this2.$emit('value-change', {
24302
+ start: normalizedValue[0],
24303
+ end: normalizedValue[1]
24304
+ });
24305
+ };
24306
+ checkValueChange$7(this.$props.componentId, {
24307
+ start: normalizedValue[0],
24308
+ end: normalizedValue[1]
24309
+ }, this.$props.beforeValueChange, performUpdate);
24310
+ },
24311
+ updateQueryHandler: function updateQueryHandler(value) {
24312
+ var query = DynamicRangeSlider.defaultQuery(value, this.$props);
24313
+ if (this.$props.customQuery) {
24314
+ var customQueryTobeSet = this.$props.customQuery(value, this.$props);
24315
+ var queryTobeSet = extractQueryFromCustomQuery$7(customQueryTobeSet);
24316
+ if (queryTobeSet) {
24317
+ query = queryTobeSet;
24318
+ }
24319
+ var customQueryOptions = getOptionsForCustomQuery$7(customQueryTobeSet);
24320
+ updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, value);
24321
+ this.setQueryOptions(this.$props.componentId, customQueryOptions, false);
24362
24322
  }
24323
+ var _ref2 = this.range || {
24324
+ start: value[0],
24325
+ end: value[1]
24326
+ },
24327
+ start = _ref2.start,
24328
+ end = _ref2.end;
24329
+ var currentStart = value[0],
24330
+ currentEnd = value[1];
24331
+ // check if the slider is at its initial position
24332
+ var isInitialValue = currentStart === start && currentEnd === end;
24333
+ this.updateQuery({
24334
+ componentId: this.$props.componentId,
24335
+ query: query,
24336
+ value: value,
24337
+ label: this.$props.filterLabel,
24338
+ showFilter: this.$props.showFilter && !isInitialValue,
24339
+ URLParams: this.$props.URLParams,
24340
+ componentType: constants_1$1.dynamicRangeSlider
24341
+ });
24363
24342
  }
24364
- }
24365
- };
24366
- SingleRange.parseValue = function (value, props) {
24367
- return props.data.find(function (item) {
24368
- return item.label === value;
24369
- }) || null;
24343
+ },
24344
+ computed: {
24345
+ labels: function labels() {
24346
+ if (!this.rangeLabels) return null;
24347
+ return this.rangeLabels(this.range.start, this.range.end);
24348
+ }
24349
+ },
24350
+ watch: {
24351
+ $props: {
24352
+ deep: true,
24353
+ handler: function handler(newVal) {
24354
+ var _this3 = this;
24355
+ var propsKeys = getValidPropsKeys(newVal);
24356
+ checkSomePropChange$1(newVal, this.componentProps, propsKeys, function () {
24357
+ _this3.updateComponentProps(_this3.componentId, newVal, constants_1$1.dynamicRangeSlider);
24358
+ _this3.updateComponentProps(_this3.internalRangeComponent, newVal, constants_1$1.dynamicRangeSlider);
24359
+ });
24360
+ }
24361
+ },
24362
+ react: function react() {
24363
+ this.setReact();
24364
+ },
24365
+ selectedValue: function selectedValue(newValue) {
24366
+ if (isEqual$c(newValue, this.currentValue)) return;
24367
+ var value = newValue || {
24368
+ start: this.range.start,
24369
+ end: this.range.end
24370
+ };
24371
+ this.$emit('change', value);
24372
+ this.handleChange(DynamicRangeSlider.parseValue(value, this.$props));
24373
+ },
24374
+ range: function range(newValue, oldValue) {
24375
+ if (isEqual$c(newValue, oldValue) || !this.currentValue) return;
24376
+ var _ref3 = this.currentValue || [],
24377
+ currentStart = _ref3[0],
24378
+ currentEnd = _ref3[1];
24379
+ var _ref4 = oldValue || {},
24380
+ oldStart = _ref4.start,
24381
+ oldEnd = _ref4.end;
24382
+ var newStart = currentStart === oldStart ? newValue.start : currentStart;
24383
+ var newEnd = currentEnd === oldEnd ? newValue.end : currentEnd;
24384
+ this.handleChange([newStart, newEnd]);
24385
+ },
24386
+ customQuery: function customQuery(newVal, oldVal) {
24387
+ if (!isQueryIdentical(newVal, oldVal, this.$data.currentValue, this.$props)) {
24388
+ this.updateQueryHandler(this.$data.currentValue);
24389
+ }
24390
+ },
24391
+ value: function value(newVal, oldVal) {
24392
+ if (!isEqual$c(newVal, oldVal)) {
24393
+ this.handleChange(DynamicRangeSlider.parseValue(newVal, this.$props));
24394
+ }
24395
+ }
24396
+ },
24397
+ render: function render() {
24398
+ var h = arguments[0];
24399
+ if (!this.range || !this.currentValue) {
24400
+ return null;
24401
+ }
24402
+ var _this$range = this.range,
24403
+ start = _this$range.start,
24404
+ end = _this$range.end;
24405
+ return h(Container, {
24406
+ "class": this.$props.className
24407
+ }, [this.$props.title && h(Title, {
24408
+ "class": getClassName$b(this.$props.innerClass, 'title')
24409
+ }, [this.$props.title]), h(vueNoSsr_common, [h(Slider, {
24410
+ "class": getClassName$b(this.$props.innerClass, 'slider')
24411
+ }, [h("vue-slider-component", {
24412
+ "ref": "slider",
24413
+ "attrs": {
24414
+ "value": [Math.floor(Math.max(start, this.currentValue[0])), Math.ceil(Math.min(end, this.currentValue[1]))],
24415
+ "min": Math.floor(Math.min(start, this.currentValue[0])),
24416
+ "max": Math.ceil(Math.max(end, this.currentValue[1])),
24417
+ "dotSize": 20,
24418
+ "height": 4,
24419
+ "enable-cross": false,
24420
+ "tooltip": "always"
24421
+ },
24422
+ "on": {
24423
+ "drag-end": this.handleSlider
24424
+ },
24425
+ "props": _extends({}, this.$props.sliderOptions)
24426
+ }), this.labels ? h("div", {
24427
+ "class": "label-container"
24428
+ }, [h("label", {
24429
+ "class": getClassName$b(this.$props.innerClass, 'label') || 'range-label-left'
24430
+ }, [this.labels.start]), h("label", {
24431
+ "class": getClassName$b(this.$props.innerClass, 'label') || 'range-label-right'
24432
+ }, [this.labels.end])]) : null])])]);
24433
+ }
24370
24434
  };
24371
- SingleRange.defaultQuery = function (value, props) {
24435
+ DynamicRangeSlider.defaultQuery = function (values, props) {
24372
24436
  var query = null;
24373
- if (value) {
24437
+ if (Array.isArray(values) && values.length) {
24374
24438
  var _range;
24375
24439
  query = {
24376
24440
  range: (_range = {}, _range[props.dataField] = {
24377
- gte: value.start,
24378
- lte: value.end,
24441
+ gte: values[0],
24442
+ lte: values[1],
24379
24443
  boost: 2.0
24380
24444
  }, _range)
24381
24445
  };
@@ -24392,48 +24456,79 @@
24392
24456
  }
24393
24457
  return query;
24394
24458
  };
24459
+ DynamicRangeSlider.parseValue = function (value) {
24460
+ if (value) {
24461
+ return Array.isArray(value) ? value : [value.start, value.end];
24462
+ }
24463
+ return [];
24464
+ };
24465
+ DynamicRangeSlider.hasInternalComponent = function () {
24466
+ return true;
24467
+ };
24395
24468
  var mapStateToProps$b = function mapStateToProps(state, props) {
24469
+ var componentId = state.aggregations[props.componentId];
24470
+ var internalRange = state.aggregations[props.componentId + "__range__internal"];
24471
+ var options = componentId && componentId[props.dataField];
24472
+ var range = state.aggregations[props.componentId + "__range__internal"];
24473
+ if (props.nestedField) {
24474
+ options = options && componentId[props.dataField][props.nestedField] && componentId[props.dataField][props.nestedField].buckets ? componentId[props.dataField][props.nestedField].buckets : [];
24475
+ range = range && internalRange[props.nestedField].min ? {
24476
+ start: internalRange[props.nestedField].min.value,
24477
+ end: internalRange[props.nestedField].max.value
24478
+ } : null;
24479
+ } else {
24480
+ options = options && componentId[props.dataField].buckets ? componentId[props.dataField].buckets : [];
24481
+ range = range && internalRange.min ? {
24482
+ start: internalRange.min.value,
24483
+ end: internalRange.max.value
24484
+ } : null;
24485
+ }
24396
24486
  return {
24397
- selectedValue: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value || null,
24487
+ options: options,
24488
+ range: range,
24489
+ selectedValue: state.selectedValues[props.componentId] ? state.selectedValues[props.componentId].value : null,
24398
24490
  componentProps: state.props[props.componentId],
24399
24491
  enableAppbase: state.config.enableAppbase
24400
24492
  };
24401
24493
  };
24402
24494
  var mapDispatchtoProps$8 = {
24495
+ addComponent: addComponent$1,
24496
+ removeComponent: removeComponent$1,
24403
24497
  updateQuery: updateQuery$9,
24498
+ watchComponent: watchComponent$1,
24499
+ setQueryListener: setQueryListener$1,
24404
24500
  setQueryOptions: setQueryOptions$8,
24405
- setCustomQuery: setCustomQuery$8
24406
- };
24407
- var RangeConnected$1 = PreferencesConsumer(ComponentWrapper$1(connect(mapStateToProps$b, mapDispatchtoProps$8)(SingleRange), {
24408
- componentType: constants_1$1.singleRange
24409
- }));
24410
- RangeConnected$1.name = SingleRange.name;
24411
- RangeConnected$1.defaultQuery = SingleRange.defaultQuery;
24412
- RangeConnected$1.parseValue = SingleRange.parseValue;
24413
- RangeConnected$1.hasInternalComponent = SingleRange.hasInternalComponent;
24414
- RangeConnected$1.install = function (Vue) {
24415
- Vue.component(RangeConnected$1.name, RangeConnected$1);
24501
+ setComponentProps: setComponentProps$1,
24502
+ setCustomQuery: setCustomQuery$8,
24503
+ updateComponentProps: updateComponentProps$2
24416
24504
  };
24505
+ var RangeConnected = PreferencesConsumer(connect(mapStateToProps$b, mapDispatchtoProps$8)(DynamicRangeSlider));
24506
+ RangeConnected.defaultQuery = DynamicRangeSlider.defaultQuery;
24507
+ RangeConnected.parseValue = DynamicRangeSlider.parseValue;
24508
+ RangeConnected.hasInternalComponent = DynamicRangeSlider.hasInternalComponent;
24509
+ RangeConnected.name = DynamicRangeSlider.name;
24510
+
24417
24511
  // Add componentType for SSR
24418
- RangeConnected$1.componentType = constants_1$1.singleRange;
24512
+ RangeConnected.componentType = constants_1$1.dynamicRangeSlider;
24513
+ RangeConnected.install = function (Vue) {
24514
+ Vue.component(RangeConnected.name, RangeConnected);
24515
+ };
24419
24516
 
24420
24517
  var updateQuery$a = lib_5.updateQuery,
24421
24518
  setQueryOptions$9 = lib_5.setQueryOptions,
24422
24519
  setCustomQuery$9 = lib_5.setCustomQuery;
24423
24520
  var isEqual$d = lib_8.isEqual,
24424
- checkValueChange$9 = lib_8.checkValueChange,
24425
- getClassName$d = lib_8.getClassName,
24426
- getOptionsFromQuery$2 = lib_8.getOptionsFromQuery;
24427
- var MultiRange = {
24428
- name: 'MultiRange',
24521
+ checkValueChange$8 = lib_8.checkValueChange,
24522
+ getClassName$c = lib_8.getClassName,
24523
+ getOptionsFromQuery$1 = lib_8.getOptionsFromQuery;
24524
+ var SingleRange = {
24525
+ name: 'SingleRange',
24429
24526
  data: function data() {
24430
- this.state = {
24431
- currentValue: [],
24432
- showModal: false,
24433
- selectedValues: {}
24527
+ this.__state = {
24528
+ currentValue: null
24434
24529
  };
24435
24530
  this.type = 'range';
24436
- return this.state;
24531
+ return this.__state;
24437
24532
  },
24438
24533
  props: {
24439
24534
  beforeValueChange: types.func,
@@ -24442,65 +24537,276 @@
24442
24537
  customQuery: types.func,
24443
24538
  data: types.data,
24444
24539
  dataField: types.stringRequired,
24445
- defaultValue: types.stringArray,
24446
- value: types.stringArray,
24540
+ defaultValue: types.string,
24541
+ value: types.value,
24447
24542
  filterLabel: types.string,
24448
24543
  innerClass: types.style,
24449
24544
  react: types.react,
24450
24545
  showFilter: VueTypes.bool.def(true),
24451
- showCheckbox: VueTypes.bool.def(true),
24546
+ showRadio: VueTypes.bool.def(true),
24452
24547
  title: types.title,
24453
24548
  URLParams: VueTypes.bool.def(false),
24454
24549
  nestedField: types.string,
24455
24550
  index: VueTypes.string,
24456
24551
  endpoint: types.endpointConfig
24457
24552
  },
24458
- methods: {
24459
- handleClick: function handleClick(e) {
24460
- var value = this.$props.value;
24461
- if (value === undefined) {
24462
- this.selectItem(e.target.value);
24463
- } else {
24464
- var values = parseValueArray(this.selectedValues, e.target.value);
24465
- this.$emit('change', values);
24466
- }
24553
+ created: function created() {
24554
+ if (!this.enableAppbase && this.$props.index) {
24555
+ console.warn('Warning(ReactiveSearch): In order to use the `index` prop, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
24556
+ }
24557
+ // Set custom query in store
24558
+ updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
24559
+ },
24560
+ beforeMount: function beforeMount() {
24561
+ if (this.selectedValue) {
24562
+ this.setValue(this.selectedValue);
24563
+ } else if (this.$props.value) {
24564
+ this.setValue(this.$props.value);
24565
+ } else if (this.$props.defaultValue) {
24566
+ this.setValue(this.$props.defaultValue);
24567
+ }
24568
+ },
24569
+ watch: {
24570
+ dataField: function dataField() {
24571
+ this.updateQueryHandler(this.$data.currentValue, this.$props);
24467
24572
  },
24468
- selectItem: function selectItem(item, isDefaultValue, props, reset) {
24469
- var _this = this;
24470
- if (isDefaultValue === void 0) {
24471
- isDefaultValue = false;
24573
+ defaultValue: function defaultValue(newVal) {
24574
+ this.setValue(newVal);
24575
+ },
24576
+ value: function value(newVal, oldVal) {
24577
+ if (!isEqual$d(newVal, oldVal)) {
24578
+ this.setValue(newVal);
24472
24579
  }
24473
- if (props === void 0) {
24474
- props = this.$props;
24580
+ },
24581
+ selectedValue: function selectedValue(newVal) {
24582
+ if (!isEqual$d(this.$data.currentValue, newVal)) {
24583
+ this.setValue(newVal);
24475
24584
  }
24476
- if (reset === void 0) {
24477
- reset = false;
24585
+ },
24586
+ customQuery: function customQuery(newVal, oldVal) {
24587
+ if (!isQueryIdentical(newVal, oldVal, this.$data.currentValue, this.$props)) {
24588
+ this.updateQueryHandler(this.$data.currentValue, this.$props);
24478
24589
  }
24479
- var currentValue = this.currentValue,
24480
- selectedValues = this.selectedValues;
24481
- if (!item) {
24482
- currentValue = [];
24483
- selectedValues = {};
24484
- } else if (isDefaultValue) {
24485
- currentValue = MultiRange.parseValue(item, props);
24486
- var values = {};
24487
- currentValue.forEach(function (value) {
24488
- values[[value.label]] = true;
24489
- });
24490
- if (reset) {
24491
- selectedValues = values;
24492
- } else {
24493
- selectedValues = _extends({}, selectedValues, values);
24494
- }
24495
- } else if (selectedValues[item]) {
24496
- currentValue = currentValue.filter(function (value) {
24497
- return value.label !== item;
24498
- });
24499
- var _selectedValues = selectedValues,
24500
- del = _selectedValues[item],
24501
- selected = _objectWithoutPropertiesLoose(_selectedValues, [item].map(_toPropertyKey));
24502
- selectedValues = selected;
24503
- } else {
24590
+ }
24591
+ },
24592
+ render: function render() {
24593
+ var _this = this;
24594
+ var h = arguments[0];
24595
+ return h(Container, {
24596
+ "class": this.$props.className
24597
+ }, [this.$props.title && h(Title, {
24598
+ "class": getClassName$c(this.$props.innerClass, 'title')
24599
+ }, [this.$props.title]), h(UL, {
24600
+ "class": getClassName$c(this.$props.innerClass, 'list')
24601
+ }, [this.$props.data.map(function (item) {
24602
+ var selected = !!_this.$data.currentValue && _this.$data.currentValue.label === item.label;
24603
+ return h("li", {
24604
+ "key": item.label,
24605
+ "class": "" + (selected ? 'active' : '')
24606
+ }, [h(Radio, {
24607
+ "class": getClassName$c(_this.$props.innerClass, 'radio'),
24608
+ "attrs": {
24609
+ "id": _this.$props.componentId + "-" + item.label,
24610
+ "name": _this.$props.componentId,
24611
+ "value": item.label,
24612
+ "type": "radio",
24613
+ "checked": selected,
24614
+ "show": _this.$props.showRadio
24615
+ },
24616
+ "on": {
24617
+ "change": _this.handleChange
24618
+ }
24619
+ }), h("label", {
24620
+ "class": getClassName$c(_this.$props.innerClass, 'label'),
24621
+ "attrs": {
24622
+ "for": _this.$props.componentId + "-" + item.label
24623
+ }
24624
+ }, [item.label])]);
24625
+ })])]);
24626
+ },
24627
+ methods: {
24628
+ setValue: function setValue(value, props) {
24629
+ var _this2 = this;
24630
+ if (props === void 0) {
24631
+ props = this.$props;
24632
+ }
24633
+ var currentValue = typeof value === 'string' ? SingleRange.parseValue(value, props) : value;
24634
+ var performUpdate = function performUpdate() {
24635
+ _this2.currentValue = currentValue;
24636
+ _this2.updateQueryHandler(currentValue, props);
24637
+ _this2.$emit('valueChange', currentValue);
24638
+ _this2.$emit('value-change', currentValue);
24639
+ };
24640
+ checkValueChange$8(props.componentId, currentValue, props.beforeValueChange, performUpdate);
24641
+ },
24642
+ updateQueryHandler: function updateQueryHandler(value, props) {
24643
+ var customQuery = props.customQuery;
24644
+ var query = SingleRange.defaultQuery(value, props);
24645
+ if (customQuery) {
24646
+ var _ref = customQuery(value, props) || {};
24647
+ query = _ref.query;
24648
+ var customQueryOptions = getOptionsFromQuery$1(customQuery(value, props));
24649
+ updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
24650
+ this.setQueryOptions(props.componentId, customQueryOptions, false);
24651
+ }
24652
+ this.updateQuery({
24653
+ componentId: props.componentId,
24654
+ query: query,
24655
+ value: value,
24656
+ label: props.filterLabel,
24657
+ showFilter: props.showFilter,
24658
+ URLParams: props.URLParams,
24659
+ componentType: constants_1$1.singleRange
24660
+ });
24661
+ },
24662
+ handleChange: function handleChange(e) {
24663
+ var value = this.$props.value;
24664
+ if (value === undefined) {
24665
+ this.setValue(e.target.value);
24666
+ } else {
24667
+ this.$emit('change', e.target.value);
24668
+ }
24669
+ }
24670
+ }
24671
+ };
24672
+ SingleRange.parseValue = function (value, props) {
24673
+ return props.data.find(function (item) {
24674
+ return item.label === value;
24675
+ }) || null;
24676
+ };
24677
+ SingleRange.defaultQuery = function (value, props) {
24678
+ var query = null;
24679
+ if (value) {
24680
+ var _range;
24681
+ query = {
24682
+ range: (_range = {}, _range[props.dataField] = {
24683
+ gte: value.start,
24684
+ lte: value.end,
24685
+ boost: 2.0
24686
+ }, _range)
24687
+ };
24688
+ }
24689
+ if (query && props.nestedField) {
24690
+ return {
24691
+ query: {
24692
+ nested: {
24693
+ path: props.nestedField,
24694
+ query: query
24695
+ }
24696
+ }
24697
+ };
24698
+ }
24699
+ return query;
24700
+ };
24701
+ var mapStateToProps$c = function mapStateToProps(state, props) {
24702
+ return {
24703
+ selectedValue: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value || null,
24704
+ componentProps: state.props[props.componentId],
24705
+ enableAppbase: state.config.enableAppbase
24706
+ };
24707
+ };
24708
+ var mapDispatchtoProps$9 = {
24709
+ updateQuery: updateQuery$a,
24710
+ setQueryOptions: setQueryOptions$9,
24711
+ setCustomQuery: setCustomQuery$9
24712
+ };
24713
+ var RangeConnected$1 = PreferencesConsumer(ComponentWrapper$1(connect(mapStateToProps$c, mapDispatchtoProps$9)(SingleRange), {
24714
+ componentType: constants_1$1.singleRange
24715
+ }));
24716
+ RangeConnected$1.name = SingleRange.name;
24717
+ RangeConnected$1.defaultQuery = SingleRange.defaultQuery;
24718
+ RangeConnected$1.parseValue = SingleRange.parseValue;
24719
+ RangeConnected$1.hasInternalComponent = SingleRange.hasInternalComponent;
24720
+ RangeConnected$1.install = function (Vue) {
24721
+ Vue.component(RangeConnected$1.name, RangeConnected$1);
24722
+ };
24723
+ // Add componentType for SSR
24724
+ RangeConnected$1.componentType = constants_1$1.singleRange;
24725
+
24726
+ var updateQuery$b = lib_5.updateQuery,
24727
+ setQueryOptions$a = lib_5.setQueryOptions,
24728
+ setCustomQuery$a = lib_5.setCustomQuery;
24729
+ var isEqual$e = lib_8.isEqual,
24730
+ checkValueChange$9 = lib_8.checkValueChange,
24731
+ getClassName$d = lib_8.getClassName,
24732
+ getOptionsFromQuery$2 = lib_8.getOptionsFromQuery;
24733
+ var MultiRange = {
24734
+ name: 'MultiRange',
24735
+ data: function data() {
24736
+ this.state = {
24737
+ currentValue: [],
24738
+ showModal: false,
24739
+ selectedValues: {}
24740
+ };
24741
+ this.type = 'range';
24742
+ return this.state;
24743
+ },
24744
+ props: {
24745
+ beforeValueChange: types.func,
24746
+ className: VueTypes.string.def(''),
24747
+ componentId: types.stringRequired,
24748
+ customQuery: types.func,
24749
+ data: types.data,
24750
+ dataField: types.stringRequired,
24751
+ defaultValue: types.stringArray,
24752
+ value: types.stringArray,
24753
+ filterLabel: types.string,
24754
+ innerClass: types.style,
24755
+ react: types.react,
24756
+ showFilter: VueTypes.bool.def(true),
24757
+ showCheckbox: VueTypes.bool.def(true),
24758
+ title: types.title,
24759
+ URLParams: VueTypes.bool.def(false),
24760
+ nestedField: types.string,
24761
+ index: VueTypes.string,
24762
+ endpoint: types.endpointConfig
24763
+ },
24764
+ methods: {
24765
+ handleClick: function handleClick(e) {
24766
+ var value = this.$props.value;
24767
+ if (value === undefined) {
24768
+ this.selectItem(e.target.value);
24769
+ } else {
24770
+ var values = parseValueArray(this.selectedValues, e.target.value);
24771
+ this.$emit('change', values);
24772
+ }
24773
+ },
24774
+ selectItem: function selectItem(item, isDefaultValue, props, reset) {
24775
+ var _this = this;
24776
+ if (isDefaultValue === void 0) {
24777
+ isDefaultValue = false;
24778
+ }
24779
+ if (props === void 0) {
24780
+ props = this.$props;
24781
+ }
24782
+ if (reset === void 0) {
24783
+ reset = false;
24784
+ }
24785
+ var currentValue = this.currentValue,
24786
+ selectedValues = this.selectedValues;
24787
+ if (!item) {
24788
+ currentValue = [];
24789
+ selectedValues = {};
24790
+ } else if (isDefaultValue) {
24791
+ currentValue = MultiRange.parseValue(item, props);
24792
+ var values = {};
24793
+ currentValue.forEach(function (value) {
24794
+ values[[value.label]] = true;
24795
+ });
24796
+ if (reset) {
24797
+ selectedValues = values;
24798
+ } else {
24799
+ selectedValues = _extends({}, selectedValues, values);
24800
+ }
24801
+ } else if (selectedValues[item]) {
24802
+ currentValue = currentValue.filter(function (value) {
24803
+ return value.label !== item;
24804
+ });
24805
+ var _selectedValues = selectedValues,
24806
+ del = _selectedValues[item],
24807
+ selected = _objectWithoutPropertiesLoose(_selectedValues, [item].map(_toPropertyKey));
24808
+ selectedValues = selected;
24809
+ } else {
24504
24810
  var _extends2;
24505
24811
  var currentItems = props.data.filter(function (value) {
24506
24812
  return item.indexOf(value.label) !== -1;
@@ -24546,12 +24852,12 @@
24546
24852
  this.selectItem(newVal, true, undefined, true);
24547
24853
  },
24548
24854
  value: function value(newVal, oldVal) {
24549
- if (!isEqual$d(newVal, oldVal)) {
24855
+ if (!isEqual$e(newVal, oldVal)) {
24550
24856
  this.selectItem(newVal, true, undefined, true);
24551
24857
  }
24552
24858
  },
24553
24859
  selectedValue: function selectedValue(newVal) {
24554
- if (!isEqual$d(this.$data.currentValue, newVal)) {
24860
+ if (!isEqual$e(this.$data.currentValue, newVal)) {
24555
24861
  var processSelectedValues = newVal ? newVal.map(function (item) {
24556
24862
  if (typeof item === 'object' && 'label' in item) {
24557
24863
  return item.label;
@@ -24664,19 +24970,19 @@
24664
24970
  }
24665
24971
  return query;
24666
24972
  };
24667
- var mapStateToProps$c = function mapStateToProps(state, props) {
24973
+ var mapStateToProps$d = function mapStateToProps(state, props) {
24668
24974
  return {
24669
24975
  selectedValue: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value || null,
24670
24976
  componentProps: state.props[props.componentId],
24671
24977
  enableAppbase: state.config.enableAppbase
24672
24978
  };
24673
24979
  };
24674
- var mapDispatchtoProps$9 = {
24675
- updateQuery: updateQuery$a,
24676
- setQueryOptions: setQueryOptions$9,
24677
- setCustomQuery: setCustomQuery$9
24980
+ var mapDispatchtoProps$a = {
24981
+ updateQuery: updateQuery$b,
24982
+ setQueryOptions: setQueryOptions$a,
24983
+ setCustomQuery: setCustomQuery$a
24678
24984
  };
24679
- var RangeConnected$2 = PreferencesConsumer(ComponentWrapper$1(connect(mapStateToProps$c, mapDispatchtoProps$9)(MultiRange), {
24985
+ var RangeConnected$2 = PreferencesConsumer(ComponentWrapper$1(connect(mapStateToProps$d, mapDispatchtoProps$a)(MultiRange), {
24680
24986
  componentType: constants_1$1.multiRange
24681
24987
  }));
24682
24988
  RangeConnected$2.name = MultiRange.name;
@@ -24689,13 +24995,13 @@
24689
24995
  // Add componentType for SSR
24690
24996
  RangeConnected$2.componentType = constants_1$1.multiRange;
24691
24997
 
24692
- var updateQuery$b = lib_5.updateQuery,
24693
- setQueryOptions$a = lib_5.setQueryOptions,
24694
- setCustomQuery$a = lib_5.setCustomQuery;
24998
+ var updateQuery$c = lib_5.updateQuery,
24999
+ setQueryOptions$b = lib_5.setQueryOptions,
25000
+ setCustomQuery$b = lib_5.setCustomQuery;
24695
25001
  var checkValueChange$a = lib_8.checkValueChange,
24696
25002
  getClassName$e = lib_8.getClassName,
24697
25003
  getOptionsFromQuery$3 = lib_8.getOptionsFromQuery,
24698
- isEqual$e = lib_8.isEqual;
25004
+ isEqual$f = lib_8.isEqual;
24699
25005
  var RangeSlider = {
24700
25006
  name: 'RangeSlider',
24701
25007
  components: getComponents(),
@@ -24809,12 +25115,12 @@
24809
25115
  this.handleChange(RangeSlider.parseValue(newVal, this.$props));
24810
25116
  },
24811
25117
  value: function value(newVal, oldVal) {
24812
- if (!isEqual$e(newVal, oldVal)) {
25118
+ if (!isEqual$f(newVal, oldVal)) {
24813
25119
  this.handleChange(RangeSlider.parseValue(newVal, this.$props));
24814
25120
  }
24815
25121
  },
24816
25122
  selectedValue: function selectedValue(newVal) {
24817
- if (!isEqual$e(this.$data.currentValue, newVal)) {
25123
+ if (!isEqual$f(this.$data.currentValue, newVal)) {
24818
25124
  this.handleChange(RangeSlider.parseValue(newVal, this.$props));
24819
25125
  this.$emit('change', newVal);
24820
25126
  }
@@ -24917,7 +25223,7 @@
24917
25223
  }
24918
25224
  return [];
24919
25225
  };
24920
- var mapStateToProps$d = function mapStateToProps(state, props) {
25226
+ var mapStateToProps$e = function mapStateToProps(state, props) {
24921
25227
  return {
24922
25228
  options: state.aggregations[props.componentId] ? state.aggregations[props.componentId][props.dataField] && state.aggregations[props.componentId][props.dataField].buckets // eslint-disable-line
24923
25229
  : [],
@@ -24926,12 +25232,12 @@
24926
25232
  enableAppbase: state.config.enableAppbase
24927
25233
  };
24928
25234
  };
24929
- var mapDispatchtoProps$a = {
24930
- updateQuery: updateQuery$b,
24931
- setQueryOptions: setQueryOptions$a,
24932
- setCustomQuery: setCustomQuery$a
25235
+ var mapDispatchtoProps$b = {
25236
+ updateQuery: updateQuery$c,
25237
+ setQueryOptions: setQueryOptions$b,
25238
+ setCustomQuery: setCustomQuery$b
24933
25239
  };
24934
- var RangeConnected$3 = PreferencesConsumer(ComponentWrapper$1(connect(mapStateToProps$d, mapDispatchtoProps$a)(RangeSlider), {
25240
+ var RangeConnected$3 = PreferencesConsumer(ComponentWrapper$1(connect(mapStateToProps$e, mapDispatchtoProps$b)(RangeSlider), {
24935
25241
  componentType: constants_1$1.rangeSlider
24936
25242
  }));
24937
25243
  RangeConnected$3.name = RangeSlider.name;
@@ -24955,7 +25261,7 @@
24955
25261
  });
24956
25262
 
24957
25263
  var getClassName$f = lib_8.getClassName,
24958
- isEqual$f = lib_8.isEqual;
25264
+ isEqual$g = lib_8.isEqual;
24959
25265
  var RangeInput = {
24960
25266
  name: 'RangeInput',
24961
25267
  components: {
@@ -25033,7 +25339,7 @@
25033
25339
  },
25034
25340
  handleChange: function handleChange(value, event) {
25035
25341
  var currentValue = value;
25036
- if (this.shouldUpdate(value) && !isEqual$f(value, this.currentValue)) {
25342
+ if (this.shouldUpdate(value) && !isEqual$g(value, this.currentValue)) {
25037
25343
  switch (event) {
25038
25344
  case 'change':
25039
25345
  if (!value) {
@@ -25064,488 +25370,198 @@
25064
25370
  handleInputChange: function handleInputChange(e) {
25065
25371
  var _e$target = e.target,
25066
25372
  name = _e$target.name,
25067
- value = _e$target.value;
25068
- if (Number.isNaN(value)) {
25069
- if (name === 'start') {
25070
- this.$data.isStartValid = false;
25071
- } else {
25072
- this.$data.isEndValid = false;
25073
- }
25074
- } else if (name === 'start' && !this.$data.isStartValid) {
25075
- this.$data.isStartValid = true;
25076
- } else if (name === 'end' && !this.$data.isEndValid) {
25077
- this.$data.isEndValid = true;
25078
- }
25079
- if (this.$data.isStartValid && this.$data.isEndValid) {
25080
- if (name === 'start') {
25081
- this.handleChange({
25082
- start: Number(value),
25083
- end: this.$data.currentValue.end
25084
- }, 'change');
25085
- } else {
25086
- this.handleChange({
25087
- start: this.$data.currentValue.start,
25088
- end: Number(value)
25089
- }, 'change');
25090
- }
25091
- }
25092
- }
25093
- },
25094
- watch: {
25095
- defaultValue: function defaultValue(newVal, oldVal) {
25096
- if (oldVal.start !== newVal.start || oldVal.end !== newVal.end) {
25097
- this.handleChange(newVal);
25098
- }
25099
- },
25100
- value: function value(newVal, oldVal) {
25101
- if (!isEqual$f(newVal, oldVal)) {
25102
- if (this.isControlled()) {
25103
- this.handleChange(newVal, 'change');
25104
- }
25105
- }
25106
- }
25107
- },
25108
- created: function created() {
25109
- if (this.$props.defaultValue && this.$props.defaultValue.start && this.$props.defaultValue.end) {
25110
- this.handleChange(this.$props.defaultValue);
25111
- }
25112
- if (this.isControlled()) {
25113
- this.handleChange(this.$props.value, 'change');
25114
- }
25115
- },
25116
- render: function render() {
25117
- var h = arguments[0];
25118
- var _this$$props = this.$props,
25119
- className = _this$$props.className,
25120
- dataField = _this$$props.dataField,
25121
- range = _this$$props.range,
25122
- rangeLabels = _this$$props.rangeLabels,
25123
- componentId = _this$$props.componentId,
25124
- innerClass = _this$$props.innerClass,
25125
- stepValue = _this$$props.stepValue,
25126
- componentStyle = _this$$props.componentStyle,
25127
- themePreset = _this$$props.themePreset,
25128
- includeNullValues = _this$$props.includeNullValues,
25129
- beforeValueChange = _this$$props.beforeValueChange,
25130
- customQuery = _this$$props.customQuery,
25131
- data = _this$$props.data,
25132
- filterLabel = _this$$props.filterLabel,
25133
- react = _this$$props.react,
25134
- showFilter = _this$$props.showFilter,
25135
- showCheckbox = _this$$props.showCheckbox,
25136
- title = _this$$props.title,
25137
- URLParams = _this$$props.URLParams,
25138
- sliderOptions = _this$$props.sliderOptions,
25139
- nestedField = _this$$props.nestedField;
25140
- return h(Container, {
25141
- "style": componentStyle,
25142
- "class": className
25143
- }, [h(RangeConnected$3, {
25144
- "attrs": {
25145
- "componentId": componentId,
25146
- "value": {
25147
- start: this.currentValue.start,
25148
- end: this.currentValue.end
25149
- },
25150
- "range": range,
25151
- "dataField": dataField,
25152
- "rangeLabels": rangeLabels,
25153
- "includeNullValues": includeNullValues,
25154
- "beforeValueChange": beforeValueChange,
25155
- "customQuery": customQuery,
25156
- "data": data,
25157
- "filterLabel": filterLabel,
25158
- "react": react,
25159
- "showFilter": showFilter,
25160
- "showCheckbox": showCheckbox,
25161
- "title": title,
25162
- "uRLParams": URLParams,
25163
- "sliderOptions": sliderOptions,
25164
- "nestedField": nestedField
25165
- },
25166
- "on": {
25167
- "change": this.handleOnChange,
25168
- "value-change": this.handleValueChange
25169
- }
25170
- }), h(Flex, {
25171
- "class": getClassName$f(innerClass, 'input-container') || ''
25172
- }, [h(Flex, {
25173
- "attrs": {
25174
- "direction": "column",
25175
- "flex": 2
25176
- }
25177
- }, [h(Input, {
25178
- "key": componentId + "-start-value",
25179
- "attrs": {
25180
- "name": "start",
25181
- "type": "number",
25182
- "step": stepValue,
25183
- "themePreset": themePreset,
25184
- "aria-label": componentId + "-start-input",
25185
- "min": this.$props.range ? this.$props.range.start : 0,
25186
- "alert": !this.isStartValid
25187
- },
25188
- "on": {
25189
- "change": this.handleInputChange
25190
- },
25191
- "class": getClassName$f(innerClass, 'input') || '',
25192
- "domProps": _extends({}, {
25193
- value: this.currentValue.start
25194
- })
25195
- }), !this.isStartValid && h(Content, {
25196
- "attrs": {
25197
- "alert": true
25198
- }
25199
- }, ["Input range is invalid"])]), h(Flex, {
25200
- "attrs": {
25201
- "justifyContent": "center",
25202
- "alignItems": "center",
25203
- "flex": 1
25204
- }
25205
- }, ["-"]), h(Flex, {
25206
- "attrs": {
25207
- "direction": "column",
25208
- "flex": 2
25209
- }
25210
- }, [h(Input, {
25211
- "key": componentId + "-end-value",
25212
- "attrs": {
25213
- "name": "end",
25214
- "type": "number",
25215
- "step": stepValue,
25216
- "themePreset": themePreset,
25217
- "aria-label": componentId + "-end-input",
25218
- "max": this.$props.range ? this.$props.range.end : 10,
25219
- "alert": !this.isEndValid
25220
- },
25221
- "on": {
25222
- "change": this.handleInputChange
25223
- },
25224
- "class": getClassName$f(innerClass, 'input') || '',
25225
- "domProps": _extends({}, {
25226
- value: this.currentValue.end
25227
- })
25228
- }), !this.isEndValid && h(Content, {
25229
- "attrs": {
25230
- "alert": true
25231
- }
25232
- }, ["Input range is invalid"])])])]);
25233
- }
25234
- };
25235
- var mapStateToProps$e = function mapStateToProps(state) {
25236
- return {
25237
- themePreset: state.config.themePreset
25238
- };
25239
- };
25240
- var RangeConnected$4 = PreferencesConsumer(ComponentWrapper$1(connect(mapStateToProps$e, {})(RangeInput), {
25241
- componentType: constants_1$1.rangeInput
25242
- }));
25243
- RangeConnected$4.name = RangeInput.name;
25244
- RangeConnected$4.install = function (Vue) {
25245
- Vue.component(RangeConnected$4.name, RangeConnected$4);
25246
- };
25247
-
25248
- // Add componentType for SSR
25249
- RangeConnected$4.componentType = constants_1$1.rangeInput;
25250
-
25251
- var _excluded = ["options"];
25252
- var updateQuery$c = lib_5.updateQuery,
25253
- setQueryOptions$b = lib_5.setQueryOptions,
25254
- setCustomQuery$b = lib_5.setCustomQuery,
25255
- setDefaultQuery$7 = lib_5.setDefaultQuery;
25256
- var parseHits$1 = lib_8.parseHits,
25257
- isEqual$g = lib_8.isEqual,
25258
- getCompositeAggsQuery$5 = lib_8.getCompositeAggsQuery,
25259
- getResultStats$3 = lib_8.getResultStats,
25260
- extractQueryFromCustomQuery$7 = lib_8.extractQueryFromCustomQuery,
25261
- getOptionsForCustomQuery$7 = lib_8.getOptionsForCustomQuery;
25262
- var ReactiveComponent = {
25263
- name: 'ReactiveComponent',
25264
- props: {
25265
- componentId: types.stringRequired,
25266
- aggregationField: types.string,
25267
- aggregationSize: VueTypes.number,
25268
- size: VueTypes.number,
25269
- defaultQuery: types.func,
25270
- customQuery: types.func,
25271
- filterLabel: types.string,
25272
- react: types.react,
25273
- showFilter: VueTypes.bool.def(true),
25274
- URLParams: VueTypes.bool.def(false),
25275
- distinctField: types.string,
25276
- distinctFieldConfig: types.props,
25277
- index: VueTypes.string,
25278
- endpoint: types.endpointConfig
25279
- },
25280
- created: function created() {
25281
- var _this = this;
25282
- var props = this.$props;
25283
- this.internalComponent = null;
25284
- this.$defaultQuery = null;
25285
- // Set custom query in store
25286
- updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.selectedValue);
25287
- var customQuery = props.customQuery,
25288
- componentId = props.componentId,
25289
- filterLabel = props.filterLabel,
25290
- showFilter = props.showFilter,
25291
- URLParams = props.URLParams,
25292
- distinctField = props.distinctField,
25293
- distinctFieldConfig = props.distinctFieldConfig,
25294
- index = props.index;
25295
- if (this.enableAppbase && this.aggregationField && this.aggregationField !== '') {
25296
- console.warn('Warning(ReactiveSearch): The `aggregationField` prop has been marked as deprecated, please use the `distinctField` prop instead.');
25297
- }
25298
- if (!this.enableAppbase && (distinctField || distinctFieldConfig)) {
25299
- console.warn('Warning(ReactiveSearch): In order to use the `distinctField` and `distinctFieldConfig` props, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
25300
- }
25301
- if (!this.enableAppbase && index) {
25302
- console.warn('Warning(ReactiveSearch): In order to use the `index` prop, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
25303
- }
25304
- if (customQuery) {
25305
- var calcCustomQuery = customQuery(this.selectedValue, props);
25306
- var query = extractQueryFromCustomQuery$7(calcCustomQuery);
25307
- var customQueryOptions = calcCustomQuery ? getOptionsForCustomQuery$7(calcCustomQuery) : null;
25308
- if (customQueryOptions) {
25309
- this.setQueryOptions(componentId, _extends({}, customQueryOptions, this.getAggsQuery()), false);
25310
- } else this.setQueryOptions(componentId, this.getAggsQuery(), false);
25311
- this.updateQuery({
25312
- componentId: componentId,
25313
- query: query,
25314
- value: this.selectedValue || null,
25315
- label: filterLabel,
25316
- showFilter: showFilter,
25317
- URLParams: URLParams
25318
- });
25319
- }
25320
- this.setQuery = function (_ref) {
25321
- var options = _ref.options,
25322
- obj = _objectWithoutPropertiesLoose(_ref, _excluded);
25323
- var queryToBeSet = obj.query;
25324
-
25325
- // when enableAppbase is true, Backend throws error because of repeated query in request body
25326
- if (queryToBeSet && queryToBeSet.query) {
25327
- queryToBeSet = queryToBeSet.query;
25328
- }
25329
- var customQueryCalc = _extends({}, options, {
25330
- query: queryToBeSet
25331
- });
25332
- var rsAPIQuery = customQueryCalc;
25333
- // handle stored queries
25334
- if (queryToBeSet && queryToBeSet.id) {
25335
- rsAPIQuery = queryToBeSet;
25336
- }
25337
- // Update customQuery field for RS API
25338
- _this.setCustomQuery(props.componentId, rsAPIQuery);
25339
- if (options) {
25340
- _this.setQueryOptions(props.componentId, _extends({}, _this.getAggsQuery(), options), false);
25341
- }
25342
- _this.updateQuery(_extends({}, obj, {
25343
- query: customQueryCalc.query,
25344
- componentId: props.componentId,
25345
- label: props.filterLabel,
25346
- showFilter: props.showFilter,
25347
- URLParams: props.URLParams
25348
- }));
25349
- };
25350
- if (props.defaultQuery) {
25351
- this.internalComponent = props.componentId + "__internal";
25352
- }
25353
- if (this.internalComponent && this.$props.defaultQuery) {
25354
- updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props, this.selectedValue);
25355
- this.$defaultQuery = this.$props.defaultQuery(this.selectedValue, this.$props);
25356
- var _query = extractQueryFromCustomQuery$7(this.$defaultQuery);
25357
- var queryOptions = getOptionsForCustomQuery$7(this.$defaultQuery);
25358
- if (queryOptions) {
25359
- this.setQueryOptions(this.internalComponent, _extends({}, queryOptions, this.getAggsQuery()), false);
25360
- } else this.setQueryOptions(this.internalComponent, this.getAggsQuery(), false);
25361
- this.updateQuery({
25362
- componentId: this.internalComponent,
25363
- query: _query
25364
- });
25365
- }
25366
- },
25367
- watch: {
25368
- hits: function hits(newVal, oldVal) {
25369
- if (!isEqual$g(newVal, oldVal)) {
25370
- this.$emit('data', this.getData());
25371
- }
25372
- },
25373
- rawData: function rawData(newVal, oldVal) {
25374
- if (!isEqual$g(newVal, oldVal)) {
25375
- this.$emit('data', this.getData());
25376
- }
25377
- },
25378
- aggregations: function aggregations(newVal, oldVal) {
25379
- if (!isEqual$g(newVal, oldVal)) {
25380
- this.$emit('data', this.getData());
25381
- }
25382
- },
25383
- aggregationData: function aggregationData(newVal, oldVal) {
25384
- if (!isEqual$g(newVal, oldVal)) {
25385
- this.$emit('data', this.getData());
25386
- }
25387
- },
25388
- promotedResults: function promotedResults(newVal, oldVal) {
25389
- if (!isEqual$g(newVal, oldVal)) {
25390
- this.$emit('data', this.getData());
25391
- }
25392
- },
25393
- hidden: function hidden(newVal, oldVal) {
25394
- if (!isEqual$g(newVal, oldVal)) {
25395
- this.$emit('data', this.getData());
25396
- }
25397
- },
25398
- total: function total(newVal, oldVal) {
25399
- if (!isEqual$g(newVal, oldVal)) {
25400
- this.$emit('data', this.getData());
25401
- }
25402
- },
25403
- time: function time(newVal, oldVal) {
25404
- if (!isEqual$g(newVal, oldVal)) {
25405
- this.$emit('data', this.getData());
25406
- }
25407
- },
25408
- defaultQuery: function defaultQuery(newVal, oldVal) {
25409
- if (newVal && !isQueryIdentical(newVal, oldVal, this.selectedValue, this.$props)) {
25410
- this.$defaultQuery = newVal(this.selectedValue, this.$props);
25411
- var query = extractQueryFromCustomQuery$7(this.$defaultQuery);
25412
- var queryOptions = getOptionsForCustomQuery$7(this.$defaultQuery);
25413
- if (queryOptions) {
25414
- this.setQueryOptions(this.internalComponent, _extends({}, queryOptions, this.getAggsQuery()), false);
25415
- } else this.setQueryOptions(this.internalComponent, this.getAggsQuery(), false);
25416
- // Update default query for RS API
25417
- updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props, this.selectedValue);
25418
- this.updateQuery({
25419
- componentId: this.internalComponent,
25420
- query: query
25421
- });
25422
- }
25423
- },
25424
- customQuery: function customQuery(newVal, oldVal) {
25425
- if (newVal && !isQueryIdentical(newVal, oldVal, this.selectedValue, this.$props)) {
25426
- var componentId = this.$props.componentId;
25427
- this.$customQuery = newVal(this.selectedValue, this.$props);
25428
- var query = extractQueryFromCustomQuery$7(this.$customQuery);
25429
- var queryOptions = getOptionsForCustomQuery$7(this.$customQuery);
25430
- if (queryOptions) {
25431
- this.setQueryOptions(componentId, _extends({}, queryOptions, this.getAggsQuery()), false);
25432
- } else this.setQueryOptions(componentId, this.getAggsQuery(), false);
25433
-
25434
- // Update custom query for RS API
25435
- updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.selectedValue);
25436
- this.updateQuery({
25437
- componentId: componentId,
25438
- query: query
25439
- });
25373
+ value = _e$target.value;
25374
+ if (Number.isNaN(value)) {
25375
+ if (name === 'start') {
25376
+ this.$data.isStartValid = false;
25377
+ } else {
25378
+ this.$data.isEndValid = false;
25379
+ }
25380
+ } else if (name === 'start' && !this.$data.isStartValid) {
25381
+ this.$data.isStartValid = true;
25382
+ } else if (name === 'end' && !this.$data.isEndValid) {
25383
+ this.$data.isEndValid = true;
25384
+ }
25385
+ if (this.$data.isStartValid && this.$data.isEndValid) {
25386
+ if (name === 'start') {
25387
+ this.handleChange({
25388
+ start: Number(value),
25389
+ end: this.$data.currentValue.end
25390
+ }, 'change');
25391
+ } else {
25392
+ this.handleChange({
25393
+ start: this.$data.currentValue.start,
25394
+ end: Number(value)
25395
+ }, 'change');
25396
+ }
25440
25397
  }
25441
25398
  }
25442
25399
  },
25443
- render: function render() {
25444
- var h = arguments[0];
25445
- try {
25446
- var dom = this.$scopedSlots["default"];
25447
- var error = this.error,
25448
- isLoading = this.isLoading,
25449
- selectedValue = this.selectedValue;
25450
- var propsToBePassed = _extends({
25451
- error: error,
25452
- loading: isLoading
25453
- }, this.getData(), {
25454
- value: selectedValue,
25455
- setQuery: this.setQuery
25456
- });
25457
- return h("div", [dom(propsToBePassed)]);
25458
- } catch (e) {
25459
- return null;
25460
- }
25461
- },
25462
- methods: {
25463
- getAggsQuery: function getAggsQuery() {
25464
- if (this.aggregationField) {
25465
- return {
25466
- aggs: getCompositeAggsQuery$5({
25467
- props: this.$props,
25468
- showTopHits: true,
25469
- value: this.selectedValue
25470
- }).aggs
25471
- };
25400
+ watch: {
25401
+ defaultValue: function defaultValue(newVal, oldVal) {
25402
+ if (oldVal.start !== newVal.start || oldVal.end !== newVal.end) {
25403
+ this.handleChange(newVal);
25472
25404
  }
25473
- return {};
25474
25405
  },
25475
- getData: function getData() {
25476
- var hits = this.hits,
25477
- aggregations = this.aggregations,
25478
- aggregationData = this.aggregationData,
25479
- promotedResults = this.promotedResults,
25480
- rawData = this.rawData;
25481
- var filteredResults = parseHits$1(hits);
25482
- if (promotedResults.length) {
25483
- var ids = promotedResults.map(function (item) {
25484
- return item._id;
25485
- }).filter(Boolean);
25486
- if (ids) {
25487
- filteredResults = filteredResults.filter(function (item) {
25488
- return !ids.includes(item._id);
25489
- });
25406
+ value: function value(newVal, oldVal) {
25407
+ if (!isEqual$g(newVal, oldVal)) {
25408
+ if (this.isControlled()) {
25409
+ this.handleChange(newVal, 'change');
25490
25410
  }
25491
- filteredResults = [].concat(promotedResults, filteredResults);
25492
25411
  }
25493
- return {
25494
- data: filteredResults,
25495
- aggregationData: aggregationData,
25496
- rawData: rawData,
25497
- aggregations: aggregations,
25498
- promotedData: promotedResults,
25499
- resultStats: this.stats
25500
- };
25501
25412
  }
25502
25413
  },
25503
- computed: {
25504
- stats: function stats() {
25505
- return getResultStats$3(this);
25414
+ created: function created() {
25415
+ if (this.$props.defaultValue && this.$props.defaultValue.start && this.$props.defaultValue.end) {
25416
+ this.handleChange(this.$props.defaultValue);
25506
25417
  }
25418
+ if (this.isControlled()) {
25419
+ this.handleChange(this.$props.value, 'change');
25420
+ }
25421
+ },
25422
+ render: function render() {
25423
+ var h = arguments[0];
25424
+ var _this$$props = this.$props,
25425
+ className = _this$$props.className,
25426
+ dataField = _this$$props.dataField,
25427
+ range = _this$$props.range,
25428
+ rangeLabels = _this$$props.rangeLabels,
25429
+ componentId = _this$$props.componentId,
25430
+ innerClass = _this$$props.innerClass,
25431
+ stepValue = _this$$props.stepValue,
25432
+ componentStyle = _this$$props.componentStyle,
25433
+ themePreset = _this$$props.themePreset,
25434
+ includeNullValues = _this$$props.includeNullValues,
25435
+ beforeValueChange = _this$$props.beforeValueChange,
25436
+ customQuery = _this$$props.customQuery,
25437
+ data = _this$$props.data,
25438
+ filterLabel = _this$$props.filterLabel,
25439
+ react = _this$$props.react,
25440
+ showFilter = _this$$props.showFilter,
25441
+ showCheckbox = _this$$props.showCheckbox,
25442
+ title = _this$$props.title,
25443
+ URLParams = _this$$props.URLParams,
25444
+ sliderOptions = _this$$props.sliderOptions,
25445
+ nestedField = _this$$props.nestedField;
25446
+ return h(Container, {
25447
+ "style": componentStyle,
25448
+ "class": className
25449
+ }, [h(RangeConnected$3, {
25450
+ "attrs": {
25451
+ "componentId": componentId,
25452
+ "value": {
25453
+ start: this.currentValue.start,
25454
+ end: this.currentValue.end
25455
+ },
25456
+ "range": range,
25457
+ "dataField": dataField,
25458
+ "rangeLabels": rangeLabels,
25459
+ "includeNullValues": includeNullValues,
25460
+ "beforeValueChange": beforeValueChange,
25461
+ "customQuery": customQuery,
25462
+ "data": data,
25463
+ "filterLabel": filterLabel,
25464
+ "react": react,
25465
+ "showFilter": showFilter,
25466
+ "showCheckbox": showCheckbox,
25467
+ "title": title,
25468
+ "uRLParams": URLParams,
25469
+ "sliderOptions": sliderOptions,
25470
+ "nestedField": nestedField
25471
+ },
25472
+ "on": {
25473
+ "change": this.handleOnChange,
25474
+ "value-change": this.handleValueChange
25475
+ }
25476
+ }), h(Flex, {
25477
+ "class": getClassName$f(innerClass, 'input-container') || ''
25478
+ }, [h(Flex, {
25479
+ "attrs": {
25480
+ "direction": "column",
25481
+ "flex": 2
25482
+ }
25483
+ }, [h(Input, {
25484
+ "key": componentId + "-start-value",
25485
+ "attrs": {
25486
+ "name": "start",
25487
+ "type": "number",
25488
+ "step": stepValue,
25489
+ "themePreset": themePreset,
25490
+ "aria-label": componentId + "-start-input",
25491
+ "min": this.$props.range ? this.$props.range.start : 0,
25492
+ "alert": !this.isStartValid
25493
+ },
25494
+ "on": {
25495
+ "change": this.handleInputChange
25496
+ },
25497
+ "class": getClassName$f(innerClass, 'input') || '',
25498
+ "domProps": _extends({}, {
25499
+ value: this.currentValue.start
25500
+ })
25501
+ }), !this.isStartValid && h(Content, {
25502
+ "attrs": {
25503
+ "alert": true
25504
+ }
25505
+ }, ["Input range is invalid"])]), h(Flex, {
25506
+ "attrs": {
25507
+ "justifyContent": "center",
25508
+ "alignItems": "center",
25509
+ "flex": 1
25510
+ }
25511
+ }, ["-"]), h(Flex, {
25512
+ "attrs": {
25513
+ "direction": "column",
25514
+ "flex": 2
25515
+ }
25516
+ }, [h(Input, {
25517
+ "key": componentId + "-end-value",
25518
+ "attrs": {
25519
+ "name": "end",
25520
+ "type": "number",
25521
+ "step": stepValue,
25522
+ "themePreset": themePreset,
25523
+ "aria-label": componentId + "-end-input",
25524
+ "max": this.$props.range ? this.$props.range.end : 10,
25525
+ "alert": !this.isEndValid
25526
+ },
25527
+ "on": {
25528
+ "change": this.handleInputChange
25529
+ },
25530
+ "class": getClassName$f(innerClass, 'input') || '',
25531
+ "domProps": _extends({}, {
25532
+ value: this.currentValue.end
25533
+ })
25534
+ }), !this.isEndValid && h(Content, {
25535
+ "attrs": {
25536
+ "alert": true
25537
+ }
25538
+ }, ["Input range is invalid"])])])]);
25507
25539
  }
25508
25540
  };
25509
- ReactiveComponent.hasInternalComponent = function (props) {
25510
- return !!props.defaultQuery;
25511
- };
25512
- var mapStateToProps$f = function mapStateToProps(state, props) {
25541
+ var mapStateToProps$f = function mapStateToProps(state) {
25513
25542
  return {
25514
- aggregations: state.aggregations[props.componentId] && state.aggregations[props.componentId] || null,
25515
- aggregationData: state.compositeAggregations[props.componentId] || [],
25516
- hits: state.hits[props.componentId] && state.hits[props.componentId].hits || [],
25517
- rawData: state.rawData[props.componentId],
25518
- error: state.error[props.componentId],
25519
- isLoading: state.isLoading[props.componentId],
25520
- selectedValue: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value || null,
25521
- promotedResults: state.promotedResults[props.componentId] || [],
25522
- time: state.hits[props.componentId] && state.hits[props.componentId].time || 0,
25523
- total: state.hits[props.componentId] && state.hits[props.componentId].total,
25524
- hidden: state.hits[props.componentId] && state.hits[props.componentId].hidden,
25525
- componentProps: state.props[props.componentId],
25526
- enableAppbase: state.config.enableAppbase
25543
+ themePreset: state.config.themePreset
25527
25544
  };
25528
25545
  };
25529
- var mapDispatchtoProps$b = {
25530
- setQueryOptions: setQueryOptions$b,
25531
- updateQuery: updateQuery$c,
25532
- setCustomQuery: setCustomQuery$b,
25533
- setDefaultQuery: setDefaultQuery$7
25546
+ var RangeConnected$4 = PreferencesConsumer(ComponentWrapper$1(connect(mapStateToProps$f, {})(RangeInput), {
25547
+ componentType: constants_1$1.rangeInput
25548
+ }));
25549
+ RangeConnected$4.name = RangeInput.name;
25550
+ RangeConnected$4.install = function (Vue) {
25551
+ Vue.component(RangeConnected$4.name, RangeConnected$4);
25534
25552
  };
25535
- var ConnectedComponent = ComponentWrapper$1(connect(mapStateToProps$f, mapDispatchtoProps$b)(ReactiveComponent), {
25536
- componentType: constants_1$1.reactiveComponent
25537
- });
25538
- var RcConnected = PreferencesConsumer({
25553
+
25554
+ // Add componentType for SSR
25555
+ RangeConnected$4.componentType = constants_1$1.rangeInput;
25556
+
25557
+ var RcConnected$1 = PreferencesConsumer({
25539
25558
  name: 'RcConnected',
25540
25559
  render: function render(h) {
25541
- var component = ConnectedComponent;
25560
+ var component = RcConnected;
25542
25561
  switch (this.$attrs.componentType) {
25543
25562
  case constants_1$1.reactiveList:
25544
25563
  component = RLConnected;
25545
25564
  break;
25546
- case constants_1$1.dataSearch:
25547
- component = DSConnected;
25548
- break;
25549
25565
  case constants_1$1.searchBox:
25550
25566
  component = SBConnected;
25551
25567
  break;
@@ -25591,12 +25607,12 @@
25591
25607
  });
25592
25608
  }
25593
25609
  });
25594
- RcConnected.name = ReactiveComponent.name;
25595
- RcConnected.hasInternalComponent = ReactiveComponent.hasInternalComponent;
25610
+ RcConnected$1.name = 'ReactiveComponentPrivate';
25611
+ RcConnected$1.hasInternalComponent = RcConnected.hasInternalComponent;
25596
25612
  // Add componentType for SSR
25597
- RcConnected.componentType = constants_1$1.reactiveComponent;
25598
- RcConnected.install = function (Vue) {
25599
- Vue.component(RcConnected.name, RcConnected);
25613
+ RcConnected$1.componentType = constants_1$1.reactiveComponent;
25614
+ RcConnected$1.install = function (Vue) {
25615
+ Vue.component(RcConnected$1.name, RcConnected$1);
25600
25616
  };
25601
25617
 
25602
25618
  var setValue$2 = lib_5.setValue,
@@ -25760,10 +25776,10 @@
25760
25776
  setValue: setValue$2,
25761
25777
  resetValuesToDefault: resetValuesToDefault
25762
25778
  };
25763
- var RcConnected$1 = connect(mapStateToProps$g, mapDispatchtoProps$c)(SelectedFilters);
25764
- RcConnected$1.name = SelectedFilters.name;
25765
- RcConnected$1.install = function (Vue) {
25766
- Vue.component(RcConnected$1.name, RcConnected$1);
25779
+ var RcConnected$2 = connect(mapStateToProps$g, mapDispatchtoProps$c)(SelectedFilters);
25780
+ RcConnected$2.name = SelectedFilters.name;
25781
+ RcConnected$2.install = function (Vue) {
25782
+ Vue.component(RcConnected$2.name, RcConnected$2);
25767
25783
  };
25768
25784
 
25769
25785
  var ResultCardTitle = {
@@ -34821,9 +34837,9 @@
34821
34837
  });
34822
34838
  }
34823
34839
 
34824
- var version = "1.33.10";
34840
+ var version = "1.33.11";
34825
34841
 
34826
- var components$1 = [RLConnected, ResultCard, ResultList, ReactiveBase, DSConnected, SBConnected, ListConnected, ListConnected$1, RangeConnected$1, RangeConnected$2, RangeConnected$3, RangeConnected, RcConnected, RcConnected$1, TBConnected, ListConnected$2, ListConnected$3, StateProviderConnected, RangeConnected$4];
34842
+ var components$1 = [RLConnected, ResultCard, ResultList, ReactiveBase, DSConnected, SBConnected, ListConnected, ListConnected$1, RangeConnected$1, RangeConnected$2, RangeConnected$3, RangeConnected, RcConnected, RcConnected$1, RcConnected$2, TBConnected, ListConnected$2, ListConnected$3, StateProviderConnected, RangeConnected$4];
34827
34843
  function install (Vue) {
34828
34844
  components$1.map(function (component) {
34829
34845
  Vue.use(component);
@@ -34849,12 +34865,13 @@
34849
34865
  exports.RangeSlider = RangeConnected$3;
34850
34866
  exports.ReactiveBase = ReactiveBase;
34851
34867
  exports.ReactiveComponent = RcConnected;
34868
+ exports.ReactiveComponentPrivate = RcConnected$1;
34852
34869
  exports.ReactiveGoogleMap = ReactiveGoogleMap;
34853
34870
  exports.ReactiveList = RLConnected;
34854
34871
  exports.ResultCard = ResultCard;
34855
34872
  exports.ResultList = ResultList;
34856
34873
  exports.SearchBox = SBConnected;
34857
- exports.SelectedFilters = RcConnected$1;
34874
+ exports.SelectedFilters = RcConnected$2;
34858
34875
  exports.SingleDropdownList = ListConnected$2;
34859
34876
  exports.SingleList = ListConnected;
34860
34877
  exports.SingleRange = RangeConnected$1;