ng-easycommerce 0.0.463 → 0.0.464
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 +62 -40
- 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 +63 -40
- package/esm2015/lib/ec-component/build-your-ec/build-your-ec.component.js +1 -2
- package/esm5/lib/core.consts.js +63 -40
- package/esm5/lib/ec-component/build-your-ec/build-your-ec.component.js +1 -2
- package/fesm2015/ng-easycommerce.js +62 -40
- package/fesm2015/ng-easycommerce.js.map +1 -1
- package/fesm5/ng-easycommerce.js +62 -40
- package/fesm5/ng-easycommerce.js.map +1 -1
- package/lib/core.consts.d.ts +11 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
# version 0.0.464
|
|
2
|
+
- Se agregar la funcion "replaceCurrencyTypeConfig" en core.consts para reemplazar los valores de una moneda. Se extrae de setCurrency el arreglo que contiene los valores de los distintos tipos de monedas.
|
|
3
|
+
|
|
1
4
|
# version 0.0.463
|
|
2
5
|
- Se actualiza product-detail.service para que se le cargue a las opciones del producto las imagenes destock y mobile.
|
|
3
6
|
|
|
@@ -375,6 +375,67 @@
|
|
|
375
375
|
position: 'L',
|
|
376
376
|
withoutDecimals: false
|
|
377
377
|
};
|
|
378
|
+
/**
|
|
379
|
+
* Arreglo de valores usados para el pipe currencyPrice
|
|
380
|
+
*/
|
|
381
|
+
this.currencyTypeConfig = [
|
|
382
|
+
{
|
|
383
|
+
code: 'EUR',
|
|
384
|
+
symbol: '€',
|
|
385
|
+
position: 'R',
|
|
386
|
+
withoutDecimals: false
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
code: 'ARG',
|
|
390
|
+
symbol: '$',
|
|
391
|
+
position: 'L',
|
|
392
|
+
withoutDecimals: false
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
code: 'USD',
|
|
396
|
+
symbol: '$',
|
|
397
|
+
position: 'L',
|
|
398
|
+
withoutDecimals: false
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
code: 'PYG',
|
|
402
|
+
symbol: 'Gs.',
|
|
403
|
+
position: 'L',
|
|
404
|
+
withoutDecimals: false
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
code: 'PEN',
|
|
408
|
+
symbol: 'S/',
|
|
409
|
+
position: 'L',
|
|
410
|
+
withoutDecimals: false
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
code: 'SEK',
|
|
414
|
+
symbol: 'SEK',
|
|
415
|
+
position: 'R',
|
|
416
|
+
withoutDecimals: true
|
|
417
|
+
},
|
|
418
|
+
];
|
|
419
|
+
/**
|
|
420
|
+
* @description Reemplaza los valores de una moneda.
|
|
421
|
+
* @param currencyTypeFind Tipo de currency que se desea modificar
|
|
422
|
+
* @param customType Los nuevos valores. Todas las key son opcionales
|
|
423
|
+
* @example customType = { code: 'ARG', symbol: '$', position: 'L' , withoutDecimals: false }
|
|
424
|
+
*/
|
|
425
|
+
this.replaceCurrencyTypeConfig = function (currencyTypeFind, customType) {
|
|
426
|
+
var _a, _b, _c, _d;
|
|
427
|
+
var currencyType = _this.currencyTypeConfig.find(function (type) { return type.code == currencyTypeFind; });
|
|
428
|
+
if (currencyType) {
|
|
429
|
+
currencyType.symbol = ((_a = customType) === null || _a === void 0 ? void 0 : _a.symbol) || currencyType.symbol;
|
|
430
|
+
currencyType.code = ((_b = customType) === null || _b === void 0 ? void 0 : _b.code) || currencyType.code;
|
|
431
|
+
currencyType.position = ((_c = customType) === null || _c === void 0 ? void 0 : _c.position) || currencyType.position;
|
|
432
|
+
currencyType.withoutDecimals = ((_d = customType) === null || _d === void 0 ? void 0 : _d.withoutDecimals) || currencyType.withoutDecimals;
|
|
433
|
+
}
|
|
434
|
+
//Reveer en el futuro si se empiezan a agregar otro tipos de monedas
|
|
435
|
+
/* else{
|
|
436
|
+
this.currencyTypeConfig.push({...customType })
|
|
437
|
+
} */
|
|
438
|
+
};
|
|
378
439
|
/**
|
|
379
440
|
*
|
|
380
441
|
* @param currencyTypeFind Definir el code del tipo de moneda que se quiera utilizar.
|
|
@@ -384,45 +445,7 @@
|
|
|
384
445
|
* @returns se retorna la configuración que se seteo a la propiedad currency del servicio.
|
|
385
446
|
*/
|
|
386
447
|
this.setCurrency = function (currencyTypeFind, customType) {
|
|
387
|
-
|
|
388
|
-
{
|
|
389
|
-
code: 'EUR',
|
|
390
|
-
symbol: '€',
|
|
391
|
-
position: 'R',
|
|
392
|
-
withoutDecimals: false
|
|
393
|
-
},
|
|
394
|
-
{
|
|
395
|
-
code: 'ARG',
|
|
396
|
-
symbol: '$',
|
|
397
|
-
position: 'L',
|
|
398
|
-
withoutDecimals: false
|
|
399
|
-
},
|
|
400
|
-
{
|
|
401
|
-
code: 'USD',
|
|
402
|
-
symbol: '$',
|
|
403
|
-
position: 'L',
|
|
404
|
-
withoutDecimals: false
|
|
405
|
-
},
|
|
406
|
-
{
|
|
407
|
-
code: 'PYG',
|
|
408
|
-
symbol: 'Gs.',
|
|
409
|
-
position: 'L',
|
|
410
|
-
withoutDecimals: false
|
|
411
|
-
},
|
|
412
|
-
{
|
|
413
|
-
code: 'PEN',
|
|
414
|
-
symbol: 'S/',
|
|
415
|
-
position: 'L',
|
|
416
|
-
withoutDecimals: false
|
|
417
|
-
},
|
|
418
|
-
{
|
|
419
|
-
code: 'SEK',
|
|
420
|
-
symbol: 'SEK',
|
|
421
|
-
position: 'R',
|
|
422
|
-
withoutDecimals: true
|
|
423
|
-
}
|
|
424
|
-
];
|
|
425
|
-
_this.currency = currencyTypeCofig.find(function (ct) { return ct.code == currencyTypeFind.toUpperCase(); }) || _this.currency;
|
|
448
|
+
_this.currency = _this.currencyTypeConfig.find(function (ct) { return ct.code == currencyTypeFind.toUpperCase(); }) || _this.currency;
|
|
426
449
|
customType && (_this.currency = __assign(__assign({}, _this.currency), customType));
|
|
427
450
|
return _this.currency;
|
|
428
451
|
};
|
|
@@ -14591,7 +14614,6 @@
|
|
|
14591
14614
|
_this.itemValuesFactory(_this.stepList[0]);
|
|
14592
14615
|
_this.code = _this.stepList[0].code;
|
|
14593
14616
|
if (!_this.stepList[0].skippeable && (_this.stepList[0].values.length == 1)) {
|
|
14594
|
-
console.log('uno solo vieja...');
|
|
14595
14617
|
_this.setItemCurrentSelected(_this.stepList[0].values[0].code);
|
|
14596
14618
|
}
|
|
14597
14619
|
}
|