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/README.md
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# version 0.0.627
|
|
2
|
+
- En el componente `filters-ec.component` se agrego un metodo `hasAppliedFilters` para verificar si hay filtros aplicados
|
|
1
3
|
# version 0.0.626
|
|
2
4
|
- Se amplió el formulario de registro `register-form-ec.component` para incluir nuevos campos adicionales, simulando un flujo de registro tipo B2B.
|
|
3
5
|
- Ahora se envían opcionalmente los siguientes datos:
|
|
@@ -1576,10 +1576,10 @@
|
|
|
1576
1576
|
// Genera los parámetros de la URL en base al rango de precios seleccionado
|
|
1577
1577
|
_this.toUrlParams = function () {
|
|
1578
1578
|
var params = '';
|
|
1579
|
-
if (_this.currentMinPrice !== null) {
|
|
1579
|
+
if (_this.currentMinPrice !== null && _this.currentMinPrice !== _this.minPrice) {
|
|
1580
1580
|
params += "&price_min=" + _this.currentMinPrice;
|
|
1581
1581
|
}
|
|
1582
|
-
if (_this.currentMaxPrice !== null) {
|
|
1582
|
+
if (_this.currentMaxPrice !== null && _this.currentMaxPrice !== _this.maxPrice) {
|
|
1583
1583
|
params += "&price_max=" + _this.currentMaxPrice;
|
|
1584
1584
|
}
|
|
1585
1585
|
return params;
|
|
@@ -9602,6 +9602,25 @@
|
|
|
9602
9602
|
filter.currentMinPrice = currentMin;
|
|
9603
9603
|
}
|
|
9604
9604
|
};
|
|
9605
|
+
FiltersEcComponent.prototype.hasAppliedFilters = function () {
|
|
9606
|
+
var _a, _b;
|
|
9607
|
+
return _b = (_a = this.filters) === null || _a === void 0 ? void 0 : _a.some(function (filter) {
|
|
9608
|
+
var _a, _b, _c;
|
|
9609
|
+
if (((_b = (_a = filter).type) === null || _b === void 0 ? void 0 : _b.call(_a)) === 'price_range') {
|
|
9610
|
+
var minSet = filter.currentMinPrice !== null && filter.currentMinPrice !== 0;
|
|
9611
|
+
var maxSet = filter.currentMaxPrice !== null && filter.currentMaxPrice !== filter.maxPrice;
|
|
9612
|
+
if (minSet || maxSet) {
|
|
9613
|
+
return true;
|
|
9614
|
+
}
|
|
9615
|
+
}
|
|
9616
|
+
return (_c = filter.data) === null || _c === void 0 ? void 0 : _c.some(function (filterElement) {
|
|
9617
|
+
if (Array.isArray(filterElement.children)) {
|
|
9618
|
+
return filterElement.children.some(function (child) { return child.selected; });
|
|
9619
|
+
}
|
|
9620
|
+
return filterElement.selected;
|
|
9621
|
+
});
|
|
9622
|
+
}), (_b !== null && _b !== void 0 ? _b : false);
|
|
9623
|
+
};
|
|
9605
9624
|
FiltersEcComponent.ctorParameters = function () { return [
|
|
9606
9625
|
{ type: Constants },
|
|
9607
9626
|
{ type: Document, decorators: [{ type: core.Inject, args: [common.DOCUMENT,] }] },
|