ng-easycommerce 0.0.592 → 0.0.594
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 +4 -0
- package/bundles/ng-easycommerce.umd.js +8 -8
- 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/blocks-ec/block-newsletter-ec/contact-form-news-ec.component.js +3 -1
- package/esm2015/lib/services/checkout/checkout.service.js +8 -10
- package/esm2015/lib/services/ip-address.service.js +2 -2
- package/esm5/lib/ec-component/blocks-ec/block-newsletter-ec/contact-form-news-ec.component.js +3 -1
- package/esm5/lib/services/checkout/checkout.service.js +8 -10
- package/esm5/lib/services/ip-address.service.js +2 -2
- package/fesm2015/ng-easycommerce.js +8 -8
- package/fesm2015/ng-easycommerce.js.map +1 -1
- package/fesm5/ng-easycommerce.js +8 -8
- package/fesm5/ng-easycommerce.js.map +1 -1
- package/lib/ec-component/blocks-ec/block-newsletter-ec/contact-form-news-ec.component.d.ts +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
# version 0.0.594
|
|
2
|
+
- Se modifica el servicio para obtener la ip.
|
|
3
|
+
# version 0.0.593
|
|
4
|
+
- Se obtienen los parametros en el bloque de newsletter.
|
|
1
5
|
# version 0.0.592
|
|
2
6
|
- Se crea nueva funcion toast service para que el mensaje se quede en pantalla hasta que se clicke.
|
|
3
7
|
# version 0.0.590 - 591
|
|
@@ -3346,7 +3346,7 @@
|
|
|
3346
3346
|
function IpService(http) {
|
|
3347
3347
|
this.http = http;
|
|
3348
3348
|
this.apiGetIp = 'https://api64.ipify.org?format=json'; // También puedes usar 'https://api.myip.com'
|
|
3349
|
-
this.apiGetLocation = '
|
|
3349
|
+
this.apiGetLocation = 'https://ipinfo.io/json';
|
|
3350
3350
|
}
|
|
3351
3351
|
IpService.prototype.getIp = function () {
|
|
3352
3352
|
return this.http.get(this.apiGetIp);
|
|
@@ -3481,18 +3481,16 @@
|
|
|
3481
3481
|
_this.stateSubject.next(final_steps);
|
|
3482
3482
|
// Obtener IP y ubicación
|
|
3483
3483
|
rxjs.forkJoin({
|
|
3484
|
-
ip: _this.ipService.getIp(),
|
|
3485
|
-
location: _this.ipService.getLocation()
|
|
3484
|
+
ip: _this.ipService.getIp().pipe(operators.catchError(function () { return rxjs.of(null); })),
|
|
3485
|
+
location: _this.ipService.getLocation().pipe(operators.catchError(function () { return rxjs.of(null); }))
|
|
3486
3486
|
}).subscribe(function (results) {
|
|
3487
3487
|
var _a, _b, _c;
|
|
3488
3488
|
var params = {
|
|
3489
|
-
ip: (_a = results.ip) === null || _a === void 0 ? void 0 : _a.ip,
|
|
3490
|
-
country: (_b = results.location) === null || _b === void 0 ? void 0 : _b.country,
|
|
3491
|
-
city: (_c = results.location) === null || _c === void 0 ? void 0 : _c.city
|
|
3489
|
+
ip: ((_a = results.ip) === null || _a === void 0 ? void 0 : _a.ip) || 'unknown',
|
|
3490
|
+
country: ((_b = results.location) === null || _b === void 0 ? void 0 : _b.country) || 'unknown',
|
|
3491
|
+
city: ((_c = results.location) === null || _c === void 0 ? void 0 : _c.city) || 'unknown'
|
|
3492
3492
|
};
|
|
3493
|
-
// Convertir los datos a una cadena de consulta
|
|
3494
3493
|
var queryString = new URLSearchParams(params).toString();
|
|
3495
|
-
// Agregar la cadena de consulta a la URL del endpoint
|
|
3496
3494
|
var urlWithParams = _this.getHasPurchaseConditions() + "?" + queryString;
|
|
3497
3495
|
_this.connection.getErrorNotHandler(urlWithParams).toPromise().then(function (res) {
|
|
3498
3496
|
var _a, _b;
|
|
@@ -6937,6 +6935,7 @@
|
|
|
6937
6935
|
_this.codeBlock = 'newsletter_block';
|
|
6938
6936
|
_this.blocks = [];
|
|
6939
6937
|
_this.blockContact = null;
|
|
6938
|
+
_this.params = {};
|
|
6940
6939
|
_this.form_data = {};
|
|
6941
6940
|
_this.sendForm = function (form, success_message) {
|
|
6942
6941
|
console.log('enviando...');
|
|
@@ -6998,6 +6997,7 @@
|
|
|
6998
6997
|
};
|
|
6999
6998
|
ContactFormNewsEcComponent.prototype.ngOnInit = function () {
|
|
7000
6999
|
var _this = this;
|
|
7000
|
+
this.paramsService.parameters.subscribe(function (res) { return _this.params = res; });
|
|
7001
7001
|
if (!this.block) {
|
|
7002
7002
|
this.blocksService.getBlocks('home');
|
|
7003
7003
|
this.blocksService.blocks.pipe(operators.filter(function (blocks) { return (blocks && blocks.length > 0); })).subscribe(function (blocks) {
|