ng-easycommerce 0.0.626 → 0.0.627
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 +2 -0
- package/bundles/ng-easycommerce.umd.js +21 -2
- 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 +3 -3
- package/esm2015/lib/ec-component/filters-ec/filters-ec.component.js +20 -1
- package/esm5/lib/classes/filters/PriceRangeFilter.js +3 -3
- package/esm5/lib/ec-component/filters-ec/filters-ec.component.js +20 -1
- package/fesm2015/ng-easycommerce.js +21 -2
- package/fesm2015/ng-easycommerce.js.map +1 -1
- package/fesm5/ng-easycommerce.js +21 -2
- package/fesm5/ng-easycommerce.js.map +1 -1
- package/lib/ec-component/filters-ec/filters-ec.component.d.ts +1 -0
- package/ng-easycommerce.metadata.json +1 -1
- package/package.json +1 -1
package/fesm5/ng-easycommerce.js
CHANGED
|
@@ -1590,10 +1590,10 @@ var PriceRangeFilter = /** @class */ (function (_super) {
|
|
|
1590
1590
|
// Genera los parámetros de la URL en base al rango de precios seleccionado
|
|
1591
1591
|
_this.toUrlParams = function () {
|
|
1592
1592
|
var params = '';
|
|
1593
|
-
if (_this.currentMinPrice !== null) {
|
|
1593
|
+
if (_this.currentMinPrice !== null && _this.currentMinPrice !== _this.minPrice) {
|
|
1594
1594
|
params += "&price_min=" + _this.currentMinPrice;
|
|
1595
1595
|
}
|
|
1596
|
-
if (_this.currentMaxPrice !== null) {
|
|
1596
|
+
if (_this.currentMaxPrice !== null && _this.currentMaxPrice !== _this.maxPrice) {
|
|
1597
1597
|
params += "&price_max=" + _this.currentMaxPrice;
|
|
1598
1598
|
}
|
|
1599
1599
|
return params;
|
|
@@ -9616,6 +9616,25 @@ var FiltersEcComponent = /** @class */ (function (_super) {
|
|
|
9616
9616
|
filter.currentMinPrice = currentMin;
|
|
9617
9617
|
}
|
|
9618
9618
|
};
|
|
9619
|
+
FiltersEcComponent.prototype.hasAppliedFilters = function () {
|
|
9620
|
+
var _a, _b;
|
|
9621
|
+
return _b = (_a = this.filters) === null || _a === void 0 ? void 0 : _a.some(function (filter) {
|
|
9622
|
+
var _a, _b, _c;
|
|
9623
|
+
if (((_b = (_a = filter).type) === null || _b === void 0 ? void 0 : _b.call(_a)) === 'price_range') {
|
|
9624
|
+
var minSet = filter.currentMinPrice !== null && filter.currentMinPrice !== 0;
|
|
9625
|
+
var maxSet = filter.currentMaxPrice !== null && filter.currentMaxPrice !== filter.maxPrice;
|
|
9626
|
+
if (minSet || maxSet) {
|
|
9627
|
+
return true;
|
|
9628
|
+
}
|
|
9629
|
+
}
|
|
9630
|
+
return (_c = filter.data) === null || _c === void 0 ? void 0 : _c.some(function (filterElement) {
|
|
9631
|
+
if (Array.isArray(filterElement.children)) {
|
|
9632
|
+
return filterElement.children.some(function (child) { return child.selected; });
|
|
9633
|
+
}
|
|
9634
|
+
return filterElement.selected;
|
|
9635
|
+
});
|
|
9636
|
+
}), (_b !== null && _b !== void 0 ? _b : false);
|
|
9637
|
+
};
|
|
9619
9638
|
FiltersEcComponent.ctorParameters = function () { return [
|
|
9620
9639
|
{ type: Constants },
|
|
9621
9640
|
{ type: Document, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
|