@appbaseio/reactivesearch-vue 1.16.0-alpha.30 → 1.16.0-alpha.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@appbaseio/reactivesearch-vue.umd.js +78 -26
- package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js +2 -2
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
- package/dist/cjs/{ComponentWrapper-ab813390.js → ComponentWrapper-7302fe1a.js} +1 -1
- package/dist/cjs/DataSearch.js +2 -2
- package/dist/cjs/{DropDown-0359da33.js → DropDown-c46d8b0c.js} +15 -10
- package/dist/cjs/DynamicRangeSlider.js +37 -4
- package/dist/cjs/MultiDropdownList.js +5 -4
- package/dist/cjs/MultiList.js +15 -10
- package/dist/cjs/MultiRange.js +2 -2
- package/dist/cjs/RangeInput.js +6 -2
- package/dist/cjs/RangeSlider.js +2 -2
- package/dist/cjs/ReactiveBase.js +1 -1
- package/dist/cjs/ReactiveComponent.js +2 -2
- package/dist/cjs/ReactiveGoogleMap.js +2 -2
- package/dist/cjs/ReactiveList.js +2 -2
- package/dist/cjs/SelectedFilters.js +1 -1
- package/dist/cjs/SingleDropdownList.js +4 -3
- package/dist/cjs/SingleList.js +2 -2
- package/dist/cjs/SingleRange.js +2 -2
- package/dist/cjs/StateProvider.js +1 -1
- package/dist/cjs/ToggleButton.js +2 -2
- package/dist/cjs/{index-2a8358cd.js → index-d44a0a21.js} +10 -4
- package/dist/cjs/index.js +3 -3
- package/dist/cjs/install.js +3 -3
- package/dist/cjs/version.js +1 -1
- package/dist/es/{ComponentWrapper-459505fd.js → ComponentWrapper-bbb717bc.js} +1 -1
- package/dist/es/DataSearch.js +2 -2
- package/dist/es/{DropDown-168b60f6.js → DropDown-4edaa621.js} +15 -10
- package/dist/es/DynamicRangeSlider.js +37 -4
- package/dist/es/MultiDropdownList.js +5 -4
- package/dist/es/MultiList.js +15 -10
- package/dist/es/MultiRange.js +2 -2
- package/dist/es/RangeInput.js +6 -2
- package/dist/es/RangeSlider.js +2 -2
- package/dist/es/ReactiveBase.js +1 -1
- package/dist/es/ReactiveComponent.js +2 -2
- package/dist/es/ReactiveGoogleMap.js +2 -2
- package/dist/es/ReactiveList.js +2 -2
- package/dist/es/SelectedFilters.js +1 -1
- package/dist/es/SingleDropdownList.js +4 -3
- package/dist/es/SingleList.js +2 -2
- package/dist/es/SingleRange.js +2 -2
- package/dist/es/StateProvider.js +1 -1
- package/dist/es/ToggleButton.js +2 -2
- package/dist/es/{index-4755c9a0.js → index-5daa8276.js} +10 -4
- package/dist/es/index.js +3 -3
- package/dist/es/install.js +3 -3
- package/dist/es/version.js +1 -1
- package/package.json +1 -1
|
@@ -13295,10 +13295,16 @@
|
|
|
13295
13295
|
}; // parses current array (i.e. this.$props.value) for `onChange` callback for multi-* components
|
|
13296
13296
|
|
|
13297
13297
|
function parseValueArray(objectValues, currentValue) {
|
|
13298
|
-
var
|
|
13299
|
-
|
|
13300
|
-
|
|
13301
|
-
|
|
13298
|
+
var selectedValues;
|
|
13299
|
+
|
|
13300
|
+
if (Array.isArray(objectValues)) {
|
|
13301
|
+
selectedValues = [].concat(objectValues);
|
|
13302
|
+
} else {
|
|
13303
|
+
var keys = Object.keys(objectValues);
|
|
13304
|
+
selectedValues = keys.map(function (key) {
|
|
13305
|
+
return objectValues[key] ? key : null;
|
|
13306
|
+
});
|
|
13307
|
+
}
|
|
13302
13308
|
|
|
13303
13309
|
if (selectedValues.includes(currentValue)) {
|
|
13304
13310
|
return selectedValues.filter(function (item) {
|
|
@@ -21689,13 +21695,14 @@
|
|
|
21689
21695
|
},
|
|
21690
21696
|
beforeMount: function beforeMount() {
|
|
21691
21697
|
this.updateQueryHandlerOptions(this.$props);
|
|
21698
|
+
var value = this.selectedValue || this.$props.value || this.$props.defaultValue;
|
|
21699
|
+
this.setValue(value, !this.selectedValue);
|
|
21700
|
+
},
|
|
21701
|
+
mounted: function mounted() {
|
|
21702
|
+
var currentValue = Object.keys(this.$data.currentValue);
|
|
21692
21703
|
|
|
21693
|
-
if (this.
|
|
21694
|
-
this
|
|
21695
|
-
} else if (this.$props.value) {
|
|
21696
|
-
this.setValue(this.$props.value, true);
|
|
21697
|
-
} else if (this.$props.defaultValue) {
|
|
21698
|
-
this.setValue(this.$props.defaultValue, true);
|
|
21704
|
+
if (this.$props.value !== undefined && !isEqual$6(this.$props.value, currentValue)) {
|
|
21705
|
+
this.$emit('change', currentValue);
|
|
21699
21706
|
}
|
|
21700
21707
|
},
|
|
21701
21708
|
watch: {
|
|
@@ -21740,7 +21747,11 @@
|
|
|
21740
21747
|
}
|
|
21741
21748
|
|
|
21742
21749
|
if (!isEqual$6(selectedValue, newVal)) {
|
|
21743
|
-
this.
|
|
21750
|
+
if (this.value === undefined) {
|
|
21751
|
+
this.setValue(newVal, true);
|
|
21752
|
+
} else {
|
|
21753
|
+
this.$emit('change', newVal);
|
|
21754
|
+
}
|
|
21744
21755
|
}
|
|
21745
21756
|
},
|
|
21746
21757
|
defaultQuery: function defaultQuery(newVal, oldVal) {
|
|
@@ -22039,7 +22050,7 @@
|
|
|
22039
22050
|
if (value === undefined) {
|
|
22040
22051
|
this.setValue(currentValue);
|
|
22041
22052
|
} else {
|
|
22042
|
-
var values = parseValueArray(value, currentValue);
|
|
22053
|
+
var values = parseValueArray(value || [], currentValue);
|
|
22043
22054
|
this.$emit('change', values);
|
|
22044
22055
|
}
|
|
22045
22056
|
},
|
|
@@ -22311,7 +22322,8 @@
|
|
|
22311
22322
|
isOpen = _ref.isOpen,
|
|
22312
22323
|
highlightedIndex = _ref.highlightedIndex,
|
|
22313
22324
|
getButtonProps = _ref.getButtonProps,
|
|
22314
|
-
getItemEvents = _ref.getItemEvents
|
|
22325
|
+
getItemEvents = _ref.getItemEvents,
|
|
22326
|
+
getInputEvents = _ref.getInputEvents;
|
|
22315
22327
|
return h("div", {
|
|
22316
22328
|
"class": suggestionsContainer
|
|
22317
22329
|
}, [h(Select, {
|
|
@@ -22336,7 +22348,13 @@
|
|
|
22336
22348
|
getItemEvents: getItemEvents
|
|
22337
22349
|
}) : isOpen && itemsToRender.length ? h("ul", {
|
|
22338
22350
|
"class": suggestions$1(themePreset, _this.theme) + " " + (_this.$props.small ? 'small' : '') + " " + getClassName$6(_this.$props.innerClass, 'list')
|
|
22339
|
-
}, [_this.$props.showSearch ? _this.renderSearchbox(
|
|
22351
|
+
}, [_this.$props.showSearch ? _this.renderSearchbox({
|
|
22352
|
+
on: {
|
|
22353
|
+
input: getInputEvents({
|
|
22354
|
+
onInput: _this.handleInputChange
|
|
22355
|
+
}).input
|
|
22356
|
+
}
|
|
22357
|
+
}) : null, !hasCustomRenderer && filteredItemsToRender.length === 0 ? _this.renderNoResult() : filteredItemsToRender.map(function (item, index) {
|
|
22340
22358
|
var selected = _this.$props.multi // MultiDropdownList
|
|
22341
22359
|
&& (selectedItem && !!selectedItem[item[keyField]] // MultiDropdownRange
|
|
22342
22360
|
|| Array.isArray(selectedItem) && selectedItem.find(function (value) {
|
|
@@ -22457,7 +22475,7 @@
|
|
|
22457
22475
|
"class": getClassName$6(this.$props.innerClass, 'noResults') || null
|
|
22458
22476
|
}, [isFunction$1(renderNoResults) ? renderNoResults() : renderNoResults]);
|
|
22459
22477
|
},
|
|
22460
|
-
renderSearchbox: function renderSearchbox() {
|
|
22478
|
+
renderSearchbox: function renderSearchbox(eventObject) {
|
|
22461
22479
|
var h = this.$createElement;
|
|
22462
22480
|
var _this$$props2 = this.$props,
|
|
22463
22481
|
componentId = _this$$props2.componentId,
|
|
@@ -22465,7 +22483,7 @@
|
|
|
22465
22483
|
showClear = _this$$props2.showClear,
|
|
22466
22484
|
themePreset = _this$$props2.themePreset,
|
|
22467
22485
|
innerClass = _this$$props2.innerClass;
|
|
22468
|
-
var InputComponent = h(Input, {
|
|
22486
|
+
var InputComponent = h(Input, helper$1([{
|
|
22469
22487
|
"attrs": {
|
|
22470
22488
|
"id": componentId + "-input",
|
|
22471
22489
|
"showIcon": false,
|
|
@@ -22478,11 +22496,8 @@
|
|
|
22478
22496
|
border: 0,
|
|
22479
22497
|
borderBottom: '1px solid #ddd'
|
|
22480
22498
|
},
|
|
22481
|
-
"class": getClassName$6(innerClass, 'input')
|
|
22482
|
-
|
|
22483
|
-
"change": this.handleInputChange
|
|
22484
|
-
}
|
|
22485
|
-
});
|
|
22499
|
+
"class": getClassName$6(innerClass, 'input')
|
|
22500
|
+
}, eventObject]));
|
|
22486
22501
|
|
|
22487
22502
|
if (showClear) {
|
|
22488
22503
|
return h(InputWrapper, [InputComponent, this.searchTerm && h(IconGroup, {
|
|
@@ -23279,7 +23294,7 @@
|
|
|
23279
23294
|
}
|
|
23280
23295
|
|
|
23281
23296
|
var performUpdate = function performUpdate() {
|
|
23282
|
-
_this3.currentValue = currentValue;
|
|
23297
|
+
_this3.currentValue = _extends({}, currentValue);
|
|
23283
23298
|
|
|
23284
23299
|
_this3.updateQueryHandler(finalValues, props);
|
|
23285
23300
|
|
|
@@ -25526,7 +25541,8 @@
|
|
|
25526
25541
|
URLParams: VueTypes.bool.def(false),
|
|
25527
25542
|
sliderOptions: VueTypes.object.def({}),
|
|
25528
25543
|
nestedField: types.string,
|
|
25529
|
-
index: VueTypes.string
|
|
25544
|
+
index: VueTypes.string,
|
|
25545
|
+
value: types.range
|
|
25530
25546
|
},
|
|
25531
25547
|
data: function data() {
|
|
25532
25548
|
this.internalRangeComponent = this.$props.componentId + "__range__internal";
|
|
@@ -25572,6 +25588,8 @@
|
|
|
25572
25588
|
components = _this$$$store$getStat.components;
|
|
25573
25589
|
}
|
|
25574
25590
|
|
|
25591
|
+
var value = this.$props.value;
|
|
25592
|
+
|
|
25575
25593
|
if (this.destroyOnUnmount || components.indexOf(this.componentId) === -1) {
|
|
25576
25594
|
this.addComponent(this.componentId);
|
|
25577
25595
|
this.addComponent(this.internalRangeComponent);
|
|
@@ -25580,6 +25598,8 @@
|
|
|
25580
25598
|
this.handleChange(this.selectedValue);
|
|
25581
25599
|
} else if (this.selectedValue) {
|
|
25582
25600
|
this.handleChange(DynamicRangeSlider.parseValue(this.selectedValue, this.$props));
|
|
25601
|
+
} else if (value) {
|
|
25602
|
+
this.handleChange(DynamicRangeSlider.parseValue(value, this.$props));
|
|
25583
25603
|
} // get range before executing other queries
|
|
25584
25604
|
|
|
25585
25605
|
|
|
@@ -25598,6 +25618,13 @@
|
|
|
25598
25618
|
}
|
|
25599
25619
|
},
|
|
25600
25620
|
methods: {
|
|
25621
|
+
isControlled: function isControlled() {
|
|
25622
|
+
if (this.$props.value && this.$listeners) {
|
|
25623
|
+
return true;
|
|
25624
|
+
}
|
|
25625
|
+
|
|
25626
|
+
return false;
|
|
25627
|
+
},
|
|
25601
25628
|
setDefaultValue: function setDefaultValue(_ref) {
|
|
25602
25629
|
var start = _ref.start,
|
|
25603
25630
|
end = _ref.end;
|
|
@@ -25608,6 +25635,8 @@
|
|
|
25608
25635
|
defaultEnd = _this$$props$defaultV.end;
|
|
25609
25636
|
|
|
25610
25637
|
this.handleChange([defaultStart, defaultEnd]);
|
|
25638
|
+
} else if (this.isControlled()) {
|
|
25639
|
+
this.handleChange(DynamicRangeSlider.parseValue(this.$props.value), 'change');
|
|
25611
25640
|
} else {
|
|
25612
25641
|
this.currentValue = [start, end];
|
|
25613
25642
|
}
|
|
@@ -25657,7 +25686,16 @@
|
|
|
25657
25686
|
},
|
|
25658
25687
|
handleSlider: function handleSlider() {
|
|
25659
25688
|
var sliderValues = this.$refs.slider.getValue();
|
|
25660
|
-
this.
|
|
25689
|
+
var value = this.$props.value;
|
|
25690
|
+
|
|
25691
|
+
if (value === undefined) {
|
|
25692
|
+
this.handleChange(sliderValues);
|
|
25693
|
+
} else {
|
|
25694
|
+
this.$emit('change', {
|
|
25695
|
+
start: sliderValues[0],
|
|
25696
|
+
end: sliderValues[1]
|
|
25697
|
+
});
|
|
25698
|
+
}
|
|
25661
25699
|
},
|
|
25662
25700
|
handleChange: function handleChange(currentValue) {
|
|
25663
25701
|
var _this2 = this;
|
|
@@ -25750,6 +25788,7 @@
|
|
|
25750
25788
|
start: this.range.start,
|
|
25751
25789
|
end: this.range.end
|
|
25752
25790
|
};
|
|
25791
|
+
this.$emit('change', value);
|
|
25753
25792
|
this.handleChange(DynamicRangeSlider.parseValue(value, this.$props));
|
|
25754
25793
|
},
|
|
25755
25794
|
range: function range(newValue, oldValue) {
|
|
@@ -25771,6 +25810,11 @@
|
|
|
25771
25810
|
if (!isQueryIdentical(newVal, oldVal, this.$data.currentValue, this.$props)) {
|
|
25772
25811
|
this.updateQueryHandler(this.$data.currentValue);
|
|
25773
25812
|
}
|
|
25813
|
+
},
|
|
25814
|
+
value: function value(newVal, oldVal) {
|
|
25815
|
+
if (!isEqual$e(newVal, oldVal)) {
|
|
25816
|
+
this.handleChange(DynamicRangeSlider.parseValue(newVal, this.$props));
|
|
25817
|
+
}
|
|
25774
25818
|
}
|
|
25775
25819
|
},
|
|
25776
25820
|
render: function render() {
|
|
@@ -25844,7 +25888,11 @@
|
|
|
25844
25888
|
};
|
|
25845
25889
|
|
|
25846
25890
|
DynamicRangeSlider.parseValue = function (value) {
|
|
25847
|
-
|
|
25891
|
+
if (value) {
|
|
25892
|
+
return Array.isArray(value) ? value : [value.start, value.end];
|
|
25893
|
+
}
|
|
25894
|
+
|
|
25895
|
+
return [];
|
|
25848
25896
|
};
|
|
25849
25897
|
|
|
25850
25898
|
var mapStateToProps$e = function mapStateToProps(state, props) {
|
|
@@ -33328,7 +33376,7 @@
|
|
|
33328
33376
|
});
|
|
33329
33377
|
}
|
|
33330
33378
|
|
|
33331
|
-
var version = "1.16.0-alpha.
|
|
33379
|
+
var version = "1.16.0-alpha.31";
|
|
33332
33380
|
|
|
33333
33381
|
var _templateObject$o, _templateObject2$b;
|
|
33334
33382
|
|
|
@@ -33505,6 +33553,10 @@
|
|
|
33505
33553
|
if (this.$props.defaultValue && this.$props.defaultValue.start && this.$props.defaultValue.end) {
|
|
33506
33554
|
this.handleChange(this.$props.defaultValue);
|
|
33507
33555
|
}
|
|
33556
|
+
|
|
33557
|
+
if (this.isControlled()) {
|
|
33558
|
+
this.handleChange(this.$props.value, 'change');
|
|
33559
|
+
}
|
|
33508
33560
|
},
|
|
33509
33561
|
render: function render() {
|
|
33510
33562
|
var h = arguments[0];
|