ng-easycommerce 0.0.627 → 0.0.629
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/README.md +4 -0
- package/bundles/ng-easycommerce.umd.js +17 -5
- package/bundles/ng-easycommerce.umd.js.map +1 -1
- package/bundles/ng-easycommerce.umd.min.js +1 -1
- package/bundles/ng-easycommerce.umd.min.js.map +1 -1
- package/esm2015/lib/classes/filters/PriceRangeFilter.js +9 -3
- package/esm2015/lib/ec-component/product-detail-ec/product-detail-ec.component.js +6 -3
- package/esm2015/lib/services/products/products.service.js +4 -2
- package/esm5/lib/classes/filters/PriceRangeFilter.js +9 -3
- package/esm5/lib/ec-component/product-detail-ec/product-detail-ec.component.js +7 -3
- package/esm5/lib/services/products/products.service.js +4 -2
- package/fesm2015/ng-easycommerce.js +16 -5
- package/fesm2015/ng-easycommerce.js.map +1 -1
- package/fesm5/ng-easycommerce.js +17 -5
- package/fesm5/ng-easycommerce.js.map +1 -1
- package/lib/ec-component/product-detail-ec/product-detail-ec.component.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
# version 0.0.629
|
|
2
|
+
- ajustar límites de precios en el filtro y restablecer valores seleccionados
|
|
3
|
+
# version 0.0.628
|
|
4
|
+
- Se ajustó el método `less` en `product-detail.component` para que reciba y aplique correctamente la cantidad mínima (`minimumItemsQuantity`), evitando que la cantidad seleccionada del producto pueda ser inferior al mínimo establecido.
|
|
1
5
|
# version 0.0.627
|
|
2
6
|
- En el componente `filters-ec.component` se agrego un metodo `hasAppliedFilters` para verificar si hay filtros aplicados
|
|
3
7
|
# version 0.0.626
|
|
@@ -1563,8 +1563,8 @@
|
|
|
1563
1563
|
};
|
|
1564
1564
|
// Método para actualizar los valores seleccionados
|
|
1565
1565
|
_this.setSelected = function (min, max) {
|
|
1566
|
-
_this.currentMinPrice = min;
|
|
1567
|
-
_this.currentMaxPrice = max;
|
|
1566
|
+
_this.currentMinPrice = (min !== _this.minPrice) ? min : null;
|
|
1567
|
+
_this.currentMaxPrice = (max !== _this.maxPrice) ? max : null;
|
|
1568
1568
|
};
|
|
1569
1569
|
// Retorna los valores seleccionados (rango de precios)
|
|
1570
1570
|
_this.getSelectedRange = function () {
|
|
@@ -1594,6 +1594,12 @@
|
|
|
1594
1594
|
PriceRangeFilter.prototype.updatePrices = function (min, max) {
|
|
1595
1595
|
this.minPrice = min;
|
|
1596
1596
|
this.maxPrice = max;
|
|
1597
|
+
if (this.currentMinPrice !== null && (this.currentMinPrice < min || this.currentMinPrice > max)) {
|
|
1598
|
+
this.currentMinPrice = null;
|
|
1599
|
+
}
|
|
1600
|
+
if (this.currentMaxPrice !== null && (this.currentMaxPrice > max || this.currentMaxPrice < min)) {
|
|
1601
|
+
this.currentMaxPrice = null;
|
|
1602
|
+
}
|
|
1597
1603
|
};
|
|
1598
1604
|
return PriceRangeFilter;
|
|
1599
1605
|
}(Filter));
|
|
@@ -2017,7 +2023,9 @@
|
|
|
2017
2023
|
this.getTotal = function () { return _this.pagination.total; };
|
|
2018
2024
|
// Suscribirse a los cambios en el rango de precios
|
|
2019
2025
|
this.pagination.priceRange$.subscribe(function (range) {
|
|
2020
|
-
|
|
2026
|
+
var min = Math.floor(range.price_min);
|
|
2027
|
+
var max = Math.ceil(range.price_max);
|
|
2028
|
+
_this.updatePriceRangeFilter(min, max);
|
|
2021
2029
|
});
|
|
2022
2030
|
}
|
|
2023
2031
|
ProductsService.prototype.updatePriceRangeFilter = function (min, max) {
|
|
@@ -11054,8 +11062,9 @@
|
|
|
11054
11062
|
* @param changeAmount cantidad que se quiere restar.
|
|
11055
11063
|
* @param forceMultiple si es true, obliga a que el resultado sea múltiplo de changeAmount.
|
|
11056
11064
|
*/
|
|
11057
|
-
_this.less = function (changeAmount, forceMultiple) {
|
|
11065
|
+
_this.less = function (changeAmount, minimum, forceMultiple) {
|
|
11058
11066
|
if (changeAmount === void 0) { changeAmount = 1; }
|
|
11067
|
+
if (minimum === void 0) { minimum = 1; }
|
|
11059
11068
|
if (forceMultiple === void 0) { forceMultiple = false; }
|
|
11060
11069
|
var newQuantity = _this.quantity - changeAmount;
|
|
11061
11070
|
if (forceMultiple && changeAmount > 0) {
|
|
@@ -11069,9 +11078,12 @@
|
|
|
11069
11078
|
newQuantity = changeAmount;
|
|
11070
11079
|
}
|
|
11071
11080
|
}
|
|
11072
|
-
if (newQuantity >=
|
|
11081
|
+
if (newQuantity >= minimum) {
|
|
11073
11082
|
_this.quantity = newQuantity;
|
|
11074
11083
|
}
|
|
11084
|
+
else {
|
|
11085
|
+
_this.quantity = minimum;
|
|
11086
|
+
}
|
|
11075
11087
|
};
|
|
11076
11088
|
_this.showContact = function () { return _this.show = true; };
|
|
11077
11089
|
_this.hideContact = function () { return _this.show = false; };
|