ng-easycommerce 0.0.627 → 0.0.628
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 +6 -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/ec-component/product-detail-ec/product-detail-ec.component.js +6 -3
- package/esm5/lib/ec-component/product-detail-ec/product-detail-ec.component.js +7 -3
- package/fesm2015/ng-easycommerce.js +5 -2
- package/fesm2015/ng-easycommerce.js.map +1 -1
- package/fesm5/ng-easycommerce.js +6 -2
- 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/fesm5/ng-easycommerce.js
CHANGED
|
@@ -11068,8 +11068,9 @@ var ProductDetailEcComponent = /** @class */ (function (_super) {
|
|
|
11068
11068
|
* @param changeAmount cantidad que se quiere restar.
|
|
11069
11069
|
* @param forceMultiple si es true, obliga a que el resultado sea múltiplo de changeAmount.
|
|
11070
11070
|
*/
|
|
11071
|
-
_this.less = function (changeAmount, forceMultiple) {
|
|
11071
|
+
_this.less = function (changeAmount, minimum, forceMultiple) {
|
|
11072
11072
|
if (changeAmount === void 0) { changeAmount = 1; }
|
|
11073
|
+
if (minimum === void 0) { minimum = 1; }
|
|
11073
11074
|
if (forceMultiple === void 0) { forceMultiple = false; }
|
|
11074
11075
|
var newQuantity = _this.quantity - changeAmount;
|
|
11075
11076
|
if (forceMultiple && changeAmount > 0) {
|
|
@@ -11083,9 +11084,12 @@ var ProductDetailEcComponent = /** @class */ (function (_super) {
|
|
|
11083
11084
|
newQuantity = changeAmount;
|
|
11084
11085
|
}
|
|
11085
11086
|
}
|
|
11086
|
-
if (newQuantity >=
|
|
11087
|
+
if (newQuantity >= minimum) {
|
|
11087
11088
|
_this.quantity = newQuantity;
|
|
11088
11089
|
}
|
|
11090
|
+
else {
|
|
11091
|
+
_this.quantity = minimum;
|
|
11092
|
+
}
|
|
11089
11093
|
};
|
|
11090
11094
|
_this.showContact = function () { return _this.show = true; };
|
|
11091
11095
|
_this.hideContact = function () { return _this.show = false; };
|