ng-easycommerce 0.0.445 → 0.0.446
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 +3 -0
- package/bundles/ng-easycommerce.umd.js +16 -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/core.consts.js +14 -1
- package/esm2015/lib/ec-component/collection-ec/collection-ec.component.js +4 -3
- package/esm2015/lib/interfaces/filter.js +1 -1
- package/esm5/lib/core.consts.js +14 -1
- package/esm5/lib/ec-component/collection-ec/collection-ec.component.js +4 -3
- package/esm5/lib/interfaces/filter.js +1 -1
- package/fesm2015/ng-easycommerce.js +16 -2
- package/fesm2015/ng-easycommerce.js.map +1 -1
- package/fesm5/ng-easycommerce.js +16 -2
- package/fesm5/ng-easycommerce.js.map +1 -1
- package/lib/core.consts.d.ts +12 -0
- package/lib/ec-component/collection-ec/collection-ec.component.d.ts +1 -0
- package/lib/interfaces/filter.d.ts +11 -0
- package/ng-easycommerce.metadata.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
# version 0.0.446
|
|
2
|
+
- Se agrega la opcion de aplicar filtros por defectos al ingresar a la seccion de Collection.
|
|
3
|
+
|
|
1
4
|
# version 0.0.445
|
|
2
5
|
- Se crea el componente reviews-ec para el manejo de los datos de las reviews de un producto.
|
|
3
6
|
- Se crea el componente reviews-form-ec para todo lo que tenga que ver con guardar una opinion para un producto.
|
|
@@ -430,6 +430,19 @@
|
|
|
430
430
|
_this.setCurrency(channelConfig.currency || channelConfig.baseCurrency);
|
|
431
431
|
return channelConfig;
|
|
432
432
|
};
|
|
433
|
+
/**
|
|
434
|
+
* @description Se utiliza para configurar los filtros por defecto que se aplicaran en la seccion 'Collection'
|
|
435
|
+
* cuando se ingresa a la misma.
|
|
436
|
+
*/
|
|
437
|
+
this.defaultFilters = [];
|
|
438
|
+
/**
|
|
439
|
+
* @description Settea el valor de la variable defaulFilters.
|
|
440
|
+
* @param filters
|
|
441
|
+
*/
|
|
442
|
+
this.setDefaultFilters = function (filters) {
|
|
443
|
+
_this.defaultFilters = filters;
|
|
444
|
+
};
|
|
445
|
+
this.getDefaultFilters = function () { return _this.defaultFilters; };
|
|
433
446
|
}
|
|
434
447
|
/**
|
|
435
448
|
*
|
|
@@ -7603,6 +7616,7 @@
|
|
|
7603
7616
|
return { type: 'color', code: 'color', defaultFirstOption: false, checkIfStock: true };
|
|
7604
7617
|
};
|
|
7605
7618
|
_this.paramsSrv.parameters.subscribe(function (param) { return _this.params = param; });
|
|
7619
|
+
_this.defaultFilters = _this.consts.getDefaultFilters();
|
|
7606
7620
|
_this.ecOnConstruct();
|
|
7607
7621
|
return _this;
|
|
7608
7622
|
}
|
|
@@ -7620,10 +7634,10 @@
|
|
|
7620
7634
|
var cambio_1 = false;
|
|
7621
7635
|
_this.products = [];
|
|
7622
7636
|
if (!params['type'] || !params['value']) {
|
|
7623
|
-
_this.productsService.getProductsForFilter({ latest: true, limit: 10 }, _this.optionsFilters, queryParams.search);
|
|
7637
|
+
_this.productsService.getProductsForFilter({ latest: true, limit: 10 }, _this.optionsFilters, queryParams.search, _this.defaultFilters);
|
|
7624
7638
|
}
|
|
7625
7639
|
else {
|
|
7626
|
-
_this.productsService.getProductsForFilter({ type: params.type, value: params.value }, _this.optionsFilters, queryParams.search);
|
|
7640
|
+
_this.productsService.getProductsForFilter({ type: params.type, value: params.value }, _this.optionsFilters, queryParams.search, _this.defaultFilters);
|
|
7627
7641
|
cambio_1 = true;
|
|
7628
7642
|
_this.type = params['type'];
|
|
7629
7643
|
_this.value = params['value'];
|