ng-easycommerce 0.0.413 → 0.0.416

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.
Files changed (40) hide show
  1. package/README.md +18 -0
  2. package/assets/decidirFormEc.html +4 -35
  3. package/assets/recaptcha/recaptcha-site-keys.json +2 -2
  4. package/assets/recaptcha/recaptcha-sites-prod.json +36 -0
  5. package/assets/recaptcha/recaptcha-sites.json +0 -34
  6. package/bundles/ng-easycommerce.umd.js +77 -32
  7. package/bundles/ng-easycommerce.umd.js.map +1 -1
  8. package/bundles/ng-easycommerce.umd.min.js +1 -1
  9. package/bundles/ng-easycommerce.umd.min.js.map +1 -1
  10. package/esm2015/lib/ec-component/auth-ec/login-form-ec/login-form-ec.component.js +1 -3
  11. package/esm2015/lib/ec-component/login-ec/login-ec.component.js +1 -3
  12. package/esm2015/lib/ec-component/seller-dashboard-container-ec/seller-dashboard-container-ec.component.js +24 -8
  13. package/esm2015/lib/ec-component/share-block-ec/share-block-ec.component.js +17 -3
  14. package/esm2015/lib/ec-component/widgets-ec/decidir-ec/decidir-ec.component.js +12 -4
  15. package/esm2015/lib/interceptors/auth.interceptor.js +3 -3
  16. package/esm2015/lib/interceptors/customer.interceptor.js +4 -4
  17. package/esm2015/lib/services/captcha.service.js +12 -5
  18. package/esm2015/lib/services/checkout/checkout.service.js +10 -8
  19. package/esm2015/lib/services/checkout/error-handler.service.js +4 -1
  20. package/esm5/lib/ec-component/auth-ec/login-form-ec/login-form-ec.component.js +1 -3
  21. package/esm5/lib/ec-component/login-ec/login-ec.component.js +1 -3
  22. package/esm5/lib/ec-component/seller-dashboard-container-ec/seller-dashboard-container-ec.component.js +24 -8
  23. package/esm5/lib/ec-component/share-block-ec/share-block-ec.component.js +18 -3
  24. package/esm5/lib/ec-component/widgets-ec/decidir-ec/decidir-ec.component.js +12 -4
  25. package/esm5/lib/interceptors/auth.interceptor.js +3 -3
  26. package/esm5/lib/interceptors/customer.interceptor.js +4 -4
  27. package/esm5/lib/services/captcha.service.js +12 -5
  28. package/esm5/lib/services/checkout/checkout.service.js +10 -8
  29. package/esm5/lib/services/checkout/error-handler.service.js +4 -1
  30. package/fesm2015/ng-easycommerce.js +76 -32
  31. package/fesm2015/ng-easycommerce.js.map +1 -1
  32. package/fesm5/ng-easycommerce.js +77 -32
  33. package/fesm5/ng-easycommerce.js.map +1 -1
  34. package/lib/ec-component/seller-dashboard-container-ec/seller-dashboard-container-ec.component.d.ts +7 -0
  35. package/lib/ec-component/share-block-ec/share-block-ec.component.d.ts +6 -1
  36. package/lib/ec-component/widgets-ec/decidir-ec/decidir-ec.component.d.ts +4 -1
  37. package/lib/services/captcha.service.d.ts +9 -1
  38. package/lib/services/checkout/checkout.service.d.ts +2 -2
  39. package/ng-easycommerce.metadata.json +1 -1
  40. package/package.json +1 -1
package/README.md CHANGED
@@ -1,3 +1,21 @@
1
+ # version: 0.0.415
2
+
3
+ - Se realizaron ajustes en componente de decidir, nuevos estados.
4
+
5
+ - Se agrego manejo de error cuando los usuarios no se encuentran activos.
6
+
7
+ # version: 0.0.415
8
+
9
+ - Actualización de share-block-ec. Se usa el servicio de parametros para poder elegir que elementos mostrar.
10
+ --El parametro debe ser cargado con la palabra "share" y tambien la red por la que se lo quiere compartir.
11
+ --Ejemplo: "share_whatsapp" o "facebook_share" ...
12
+
13
+ # version: 0.0.414
14
+
15
+ - Actualización de la interfaz de Seller Dashboard
16
+
17
+ - Actualización de metodo para ordernar tabla de clientes
18
+
1
19
  # version: 0.0.413
2
20
 
3
21
  - Actualización de la interfaz de Store y StoreEcComponent para manejar tiendas exclusivas y con retiro local.
@@ -13,30 +13,15 @@
13
13
  const dataDecidirHead = localStorage.getItem('dataDecidir')
14
14
  && JSON.parse(localStorage.getItem('dataDecidir'))
15
15
 
16
- console.log("dataDecidirHead", dataDecidirHead);
17
- console.log("dataDecidirHead.config", dataDecidirHead.config);
18
- console.log("dataDecidirHead.config.public_environment", dataDecidirHead.config.public_environment);
19
-
20
16
  let modoHead = dataDecidirHead?.config?.public_environment || null
21
- console.log("modoHead 1", modoHead);
22
-
23
17
  modoHead && (modoHead == 'prod' && (modoHead = false) || modoHead == 'test' && (modoHead = true))
24
-
25
- console.log("modoHead 2", modoHead);
26
-
27
18
  !modoHead && (modoHead = window.location.host.includes('easycommerce'))
28
-
29
- console.log('modoHead 3-> ', modoHead);
30
-
31
19
  let my_awesome_script = document.createElement('script');
32
-
33
20
  my_awesome_script.setAttribute('defer', 'defer')
34
-
35
21
  my_awesome_script.setAttribute('src',
36
22
  modoHead && 'https://developers.decidir.com/static/v2.5/decidir.js'
37
23
  || 'https://live.decidir.com/static/v2.5/decidir.js'
38
24
  );
39
-
40
25
  document.head.appendChild(my_awesome_script);
41
26
 
42
27
  </script>
@@ -197,14 +182,8 @@
197
182
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
198
183
  integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
199
184
 
200
- <script src="https://sdk.mercadopago.com/js/v2"></script>
201
-
202
185
  <script defer>
203
186
 
204
- const mp = new MercadoPago('APP_USR-d8364d3f-b9fb-4c11-9e47-aa437fc58a8d', {
205
- locale: 'en-US'
206
- });
207
-
208
187
  window.onload = function () {
209
188
 
210
189
  let loadToken = document.querySelector('#loadToken');
@@ -254,13 +233,13 @@
254
233
  .then(response => {
255
234
  console.log('Success:', response)
256
235
  if (response.hasOwnProperty('status')) {
257
- if (response.status == 'approved') {
236
+ if (response.status == 'approved' || response.status == 'partially_authorized') {
258
237
  processResponse(response)
259
238
  } else {
260
239
  processError(response)
261
240
  }
262
241
  } else {
263
- processResponse(response)
242
+ processError(response)
264
243
  }
265
244
  });
266
245
  } catch (error) {
@@ -270,23 +249,13 @@
270
249
  localStorage.removeItem('dataDecidir')
271
250
  }
272
251
 
273
- const getAsBin = (data) => {
274
- mp.getPaymentMethods({ bin: data.bin }).then(
275
- t => {
276
- let resultmp = t.results[0]
277
- let asBin = { tipo_tarjeta_decidir: decidir.cardType(decidir.collectFormData(form).card_number), as_bin: resultmp.id, issuer: resultmp.issuer.name, name: resultmp.name, payment_type: resultmp.payment_type_id, resultmp }
278
- sendToken({ ...data, ...asBin })
279
- }
280
- )
281
- }
282
-
283
252
  const sdkResponseHandler = (status, response) => {
284
253
  if (status != 200 && status != 201) {
285
254
  //Manejo de error: Ver Respuesta de Error
286
255
  processError(response)
287
256
  } else {
288
257
  //Manejo de respuesta donde response = {token: "99ab0740-4ef9-4b38-bdf9-c4c963459b22"}
289
- getAsBin(response)
258
+ sendToken(response)
290
259
  }
291
260
  }
292
261
 
@@ -306,7 +275,7 @@
306
275
  const processResponse = (response) => {
307
276
  console.log("ENVIO BACK ", response);
308
277
  isLoad(false)
309
- localStorage.setItem('state', 'success')
278
+ localStorage.setItem('state', response.status == 'approved' ? 'success' : 'partially_authorized')
310
279
  }
311
280
 
312
281
  form.addEventListener('submit', sendForm);
@@ -1,4 +1,4 @@
1
1
  {
2
- "tanda_1": "6LcPPbUZAAAAAB8tKJ-UozPs1PztvGTEXnC26aY3",
3
- "tanda_2": "6Lc158seAAAAAEMe3SmWstPaZ4GudBjxCc1BIgGX"
2
+ "tanda_1": "6Lc158seAAAAAEMe3SmWstPaZ4GudBjxCc1BIgGX",
3
+ "tanda_2": "6LcPPbUZAAAAAB8tKJ-UozPs1PztvGTEXnC26aY3"
4
4
  }
@@ -0,0 +1,36 @@
1
+ {
2
+ "elden.com": "tanda_2",
3
+ "smeg.com.ar": "tanda_2",
4
+ "d2dcor.com": "tanda_2",
5
+ "promesse.com.ar": "tanda_2",
6
+ "almacendelmolino.com.ar": "tanda_2",
7
+ "womanbypromesse.com.ar": "tanda_2",
8
+ "promessemayorista.com.ar": "tanda_2",
9
+ "outmall.com.ar": "tanda_2",
10
+ "profesionales.myc-homelinens.com": "tanda_2",
11
+ "opositoresinvencibles.com": "tanda_2",
12
+ "myc-homelinens.com": "tanda_2",
13
+ "vinals.es": "tanda_2",
14
+ "guolis.com.ar": "tanda_2",
15
+ "b2b.vidal-vidal.com": "tanda_2",
16
+ "lapequeteria.com": "tanda_2",
17
+ "backend.almacendelmolino.com.ar": "tanda_2",
18
+ "bonjourlulu.com.ar": "tanda_2",
19
+ "shop.bonjourlulu.com.ar": "tanda_2",
20
+ "chispa.com.py": "tanda_2",
21
+ "backend.tienda.dos-hermanos.com": "tanda_2",
22
+ "www.elden.com": "tanda_2",
23
+ "www.elden.com.ar": "tanda_2",
24
+ "www.subzero.com.ar": "tanda_2",
25
+ "www.subzero-wolf.com.ar": "tanda_2",
26
+ "www.solac.com.ar": "tanda_2",
27
+ "www.smeg.com.ar": "tanda_2",
28
+ "www.guolis.com.ar": "tanda_2",
29
+ "ibashop.com.ar": "tanda_2",
30
+ "b2b.idargentina.com": "tanda_2",
31
+ "backend.lapequeteria.com": "tanda_2",
32
+ "maxifarma.com.py": "tanda_2",
33
+ "andresgourmetseleccion.es": "tanda_2",
34
+ "www.estacioncentral.com.ar": "tanda_2",
35
+ "thecouples.com.ar": "tanda_2"
36
+ }
@@ -7,62 +7,34 @@
7
7
  "adctecnologia.easycommercetech.com": "tanda_1",
8
8
  "pbg.easycommercetech.com": "tanda_1",
9
9
  "elden.easycommercetech.com": "tanda_1",
10
- "elden.com": "tanda_1",
11
10
  "ags.easycommercetech.tienda": "tanda_1",
12
11
  "smeg.easycommercetech.com": "tanda_1",
13
- "smeg.com.ar": "tanda_1",
14
12
  "promesse.easycommercetech.com": "tanda_1",
15
- "andresgourmetseleccion.es": "tanda_1",
16
13
  "d2dcor.easycommercetech.tienda": "tanda_1",
17
14
  "vinals.easycommercetech.tienda": "tanda_1",
18
- "d2dcor.com": "tanda_1",
19
- "promesse.com.ar": "tanda_1",
20
15
  "scorpiostore.easycommercetech.com": "tanda_1",
21
16
  "almacendelmolino.easycommercetech.com": "tanda_1",
22
17
  "maxifarma.easycommercetech.com": "tanda_1",
23
18
  "guolis.easycommercetech.com": "tanda_1",
24
19
  "lapequeteria.easycommercetech.com": "tanda_1",
25
20
  "farmasun.easycommercetech.com": "tanda_1",
26
- "almacendelmolino.com.ar": "tanda_1",
27
- "womanbypromesse.com.ar": "tanda_1",
28
21
  "womanbypromesse.easycommercetech.com": "tanda_1",
29
- "promessemayorista.com.ar": "tanda_1",
30
22
  "promessemayorista.easycommercetech.com": "tanda_1",
31
23
  "outmall.easycommercetech.com": "tanda_1",
32
24
  "opositoresinvencibles.easycommercetech.tienda": "tanda_1",
33
- "outmall.com.ar": "tanda_1",
34
- "profesionales.myc-homelinens.com": "tanda_1",
35
- "opositoresinvencibles.com": "tanda_1",
36
25
  "seler.easycommercetech.tienda": "tanda_1",
37
- "myc-homelinens.com": "tanda_1",
38
26
  "converse.easycommercetech.com": "tanda_1",
39
- "vinals.es": "tanda_1",
40
27
  "id.easycommercetech.com": "tanda_1",
41
- "guolis.com.ar": "tanda_1",
42
- "b2b.vidal-vidal.com": "tanda_1",
43
28
  "lasoreiro.easycommercetech.com": "tanda_1",
44
- "lapequeteria.com": "tanda_1",
45
29
  "eldenv2.easycommercetech.com": "tanda_1",
46
30
  "vidalvidal.easycommercetech.tienda": "tanda_1",
47
31
  "estacioncentral.easycommercetech.com": "tanda_1",
48
- "www.estacioncentral.com.ar": "tanda_1",
49
32
  "cuidex.easycommercetech.com": "tanda_1",
50
33
  "sherman.easycommercetech.com": "tanda_1",
51
- "backend.almacendelmolino.com.ar": "tanda_1",
52
- "bonjourlulu.com.ar": "tanda_1",
53
- "shop.bonjourlulu.com.ar": "tanda_1",
54
34
  "bonjourlulu.easycommercetech.com": "tanda_1",
55
- "chispa.com.py": "tanda_1",
56
35
  "deporcenter.easycommercetech.com": "tanda_1",
57
- "backend.tienda.dos-hermanos.com": "tanda_1",
58
36
  "easycommercetech.com": "tanda_1",
59
37
  "test.easycommercetech.com": "tanda_1",
60
- "www.elden.com": "tanda_1",
61
- "www.elden.com.ar": "tanda_1",
62
- "www.subzero.com.ar": "tanda_1",
63
- "www.subzero-wolf.com.ar": "tanda_1",
64
- "www.solac.com.ar": "tanda_1",
65
- "www.smeg.com.ar": "tanda_1",
66
38
  "subzero.easycommercetech.com": "tanda_1",
67
39
  "smegv2.easycommercetech.com": "tanda_1",
68
40
  "equipajes.easycommercetech.com": "tanda_1",
@@ -70,16 +42,10 @@
70
42
  "delseyargentina.easycommercetech.com": "tanda_1",
71
43
  "equipajeurbano.easycommercetech.com": "tanda_1",
72
44
  "gezatek.easycommercetech.com": "tanda_1",
73
- "www.guolis.com.ar": "tanda_1",
74
- "ibashop.com.ar": "tanda_1",
75
45
  "iba.easycommercetech.com": "tanda_1",
76
- "b2b.idargentina.com": "tanda_1",
77
- "backend.lapequeteria.com": "tanda_1",
78
- "maxifarma.com.py": "tanda_1",
79
46
  "rheem.easycommercetech.com": "tanda_1",
80
47
  "saiar.easycommercetech.com": "tanda_1",
81
48
  "servicompras.easycommercetech.com": "tanda_1",
82
- "thecouples.com.ar": "tanda_1",
83
49
  "thecouples.easycommercetech.com": "tanda_1",
84
50
  "iberspa.easycommercetech.tienda": "tanda_1"
85
51
  }
@@ -2723,6 +2723,9 @@
2723
2723
  case 'channel_access_permission_denied':
2724
2724
  _this.channeAccessPermissionDenied(error);
2725
2725
  break;
2726
+ case 'user_disabled':
2727
+ _this.otherErrors(error);
2728
+ break;
2726
2729
  default:
2727
2730
  _this.otherErrors(error);
2728
2731
  break;
@@ -2840,7 +2843,7 @@
2840
2843
  return ar;
2841
2844
  };
2842
2845
  var CheckoutService = /** @class */ (function () {
2843
- function CheckoutService$1(connection, cartService, consts, toastrService, orderUtils, analyticsService, authService, router, checkoutError) {
2846
+ function CheckoutService$1(connection, cartService, consts, toastrService, orderUtils, analyticsService, authService, router, errorHandler) {
2844
2847
  var _this = this;
2845
2848
  this.connection = connection;
2846
2849
  this.cartService = cartService;
@@ -2850,7 +2853,7 @@
2850
2853
  this.analyticsService = analyticsService;
2851
2854
  this.authService = authService;
2852
2855
  this.router = router;
2853
- this.checkoutError = checkoutError;
2856
+ this.errorHandler = errorHandler;
2854
2857
  this.baseApi = function () { return 'shop-api/' + _this.consts.getChannel() + '/checkout/' + _this.cartService.getCartToken(); };
2855
2858
  this.getPaymentMethodsApi = function () { return _this.baseApi() + '/payment'; };
2856
2859
  this.putAddressApi = function () { return _this.baseApi() + '/address'; };
@@ -3013,11 +3016,13 @@
3013
3016
  this.cartService.cart.subscribe(function (cart) { return cart && (_this.cartLocal = cart) && _this.updateAsociatedData(cart); });
3014
3017
  this.order$.subscribe(function (order) { return order && _this.updateAsociatedData(order); });
3015
3018
  this.authService.getUserProfile().subscribe(function (user) { return _this.user = user; });
3016
- this.checkoutError.error$.pipe(operators.filter(function (res) { return res != null; })).subscribe(function (res) {
3017
- _this.toastrService.show('redirect-cart');
3018
- setTimeout(function () {
3019
- _this.router.navigateByUrl('/cart');
3020
- }, 3000);
3019
+ this.errorHandler.error$.pipe(operators.filter(function (res) { return res != null; })).subscribe(function (res) {
3020
+ if (res.code == 'out_of_stock' || res.code == 'items_with_product_or_product_variant_not_enabled') {
3021
+ _this.toastrService.show('redirect-cart');
3022
+ setTimeout(function () {
3023
+ _this.router.navigateByUrl('/cart');
3024
+ }, 3000);
3025
+ }
3021
3026
  });
3022
3027
  }
3023
3028
  CheckoutService$1.prototype.ngOnInit = function () {
@@ -5281,11 +5286,11 @@
5281
5286
  return next.handle(req).pipe(operators.catchError(function (catchErr) { return _this.handleErrors(catchErr); }));
5282
5287
  };
5283
5288
  AuthInterceptor.prototype.handleErrors = function (err) {
5284
- if (err.status === 401 || err.status === 403) {
5289
+ if (err.status === 403) {
5285
5290
  this.injector.get(AuthService).doLogoutUser();
5286
5291
  return rxjs.of(err);
5287
5292
  }
5288
- if (err.status === 450) {
5293
+ if (err.status === 450 || err.status === 401) {
5289
5294
  this.injector.get(ErrorHandlerService).handlerErrorResponse(err.error);
5290
5295
  return rxjs.of(err.error);
5291
5296
  }
@@ -5325,11 +5330,11 @@
5325
5330
  return next.handle(req).pipe(operators.catchError(function (catchErr) { return _this.handleErrors(catchErr); }));
5326
5331
  };
5327
5332
  CustomerInterceptor.prototype.handleErrors = function (err) {
5328
- if (err.status === 401 || err.status === 403) {
5329
- this.injector.get(AuthService).logout();
5333
+ if (err.status === 403) {
5334
+ this.injector.get(AuthService).doLogoutUser();
5330
5335
  return rxjs.of(err);
5331
5336
  }
5332
- if (err.status === 450) {
5337
+ if (err.status === 450 || err.status === 401) {
5333
5338
  this.injector.get(ErrorHandlerService).handlerErrorResponse(err.error);
5334
5339
  return rxjs.of(err.error);
5335
5340
  }
@@ -8021,12 +8026,10 @@
8021
8026
  }
8022
8027
  else {
8023
8028
  _this.loading = false;
8024
- _this.toastrService.show('invalid-credentials');
8025
8029
  }
8026
8030
  }, function (err) {
8027
8031
  $('#collapse_login5').collapse('hide');
8028
8032
  _this.loading = false;
8029
- _this.toastrService.show('invalid-credentials');
8030
8033
  });
8031
8034
  };
8032
8035
  _this.ecOnConstruct();
@@ -9118,20 +9121,35 @@
9118
9121
  _this.fuse.setCollection(_this.filteredCustomers);
9119
9122
  _this.sortCustomers(_this.sortValue);
9120
9123
  };
9124
+ /**
9125
+ * @description Ordena la lista de clientes
9126
+ * @param value recibe una cadena que de estar formada de la forma "tipoOrdenacion_atributoPorOrdenar"
9127
+ * Ejemplo: "asc_firstName" o "desc_id" ...
9128
+ */
9121
9129
  _this.sortCustomers = function (value) {
9122
9130
  _this.sortValue = value;
9123
- var comparator = (_this.sortValue == 'asc')
9131
+ var values = value.split('_');
9132
+ var sortType = values[0];
9133
+ var attribute = values[1];
9134
+ var comparator = (sortType == 'asc')
9124
9135
  ? [-1, 1]
9125
9136
  : [1, -1];
9137
+ var typeValue;
9138
+ if (_this.filteredCustomers.length > 0) {
9139
+ typeValue = typeof (_this.filteredCustomers[0][attribute]);
9140
+ }
9141
+ var sortFunction = typeValue == 'number' ? _this.sortNumber : _this.sortText;
9126
9142
  _this.filteredCustomers =
9127
9143
  _this.sortValue
9128
- ? _this.filteredCustomers.sort(function (aCustomer, otherCustomer) {
9129
- return (aCustomer.firstName == otherCustomer.firstName)
9130
- ? aCustomer.lastName.toLowerCase() < otherCustomer.lastName.toLowerCase() ? comparator[0] : comparator[1]
9131
- : aCustomer.firstName.toLowerCase() < otherCustomer.firstName.toLowerCase() ? comparator[0] : comparator[1];
9132
- })
9144
+ ? _this.filteredCustomers.sort(function (aCustomer, otherCustomer) { return sortFunction(aCustomer, otherCustomer, attribute, comparator); })
9133
9145
  : _this.filteredCustomers;
9134
9146
  };
9147
+ _this.sortNumber = function (aCustomer, otherCustomer, attribute, comparator) { return aCustomer[attribute] < otherCustomer[attribute] ? comparator[0] : comparator[1]; };
9148
+ _this.sortText = function (aCustomer, otherCustomer, attribute, comparator) {
9149
+ return (aCustomer[attribute] == otherCustomer[attribute])
9150
+ ? aCustomer.lastName.toLowerCase() < otherCustomer.lastName.toLowerCase() ? comparator[0] : comparator[1]
9151
+ : String(aCustomer[attribute]).toLowerCase() < String(otherCustomer[attribute]).toLowerCase() ? comparator[0] : comparator[1];
9152
+ };
9135
9153
  _this.changeCustomer = function (customer) {
9136
9154
  _this.authService.setCustomer(customer);
9137
9155
  customer
@@ -9159,6 +9177,7 @@
9159
9177
  _this.customers = user.customers;
9160
9178
  _this.filteredCustomers = _this.customers;
9161
9179
  _this.fuse.setCollection(_this.filteredCustomers);
9180
+ _this.sortCustomers('desc_ordersNotApproved');
9162
9181
  });
9163
9182
  };
9164
9183
  SellerDashboardContainerEcComponent.ctorParameters = function () { return [
@@ -9173,7 +9192,7 @@
9173
9192
  SellerDashboardContainerEcComponent = __decorate$17([
9174
9193
  core.Component({
9175
9194
  selector: 'app-seller-dashboard-container',
9176
- template: "<section *ngIf=\"user\" id=\"seller-dashboard\">\n <div class=\"section-content mt-5 mb-2 tablaVendedores\">\n <div class=\"container-xl\">\n <div class=\"row\">\n <main class=\"col-md-12\">\n\n <ul *ngIf=\"hasHeader()\" class=\"nav nav-tabs\">\n <li class=\"nav-item col-12 col-lg-2\">\n <a *ngIf=\"hasUIComponent('HEADER_TAB')\" class=\"nav-link active cursor-pointer px-4\"\n aria-current=\"page\">\n {{ 'my-clients' | translate }}\n </a>\n </li>\n <div\n class=\"d-flex justify-content-end justify-content-lg-start justify-content-xl-end col-12 col-md-12 col-lg-6\">\n <a *ngIf=\"hasUIComponent('GENERATE_BUDGET_BTN')\" [routerLink]=\"'/collection'\"\n class=\"btn btn-seller-primary text-white btnGestionar d-flex align-items-center\"><i\n class=\"bi bi-file-earmark me-2 mr-2\"></i>{{ 'generate-budget' | translate }}</a>\n <a *ngIf=\"hasUIComponent('MANAGE_ORDERS_BTN')\"\n (click)=\"navigateExternal(constants.getUrlBase())\"\n class=\"btn btn-seller-primary text-white btnGestionar d-flex align-items-center me- me-lg-4 mr- mr-lg-4\"><i\n class=\"bi bi-archive-fill me-2 mr-2\"></i>{{ 'manage-orders' | translate }}</a>\n </div>\n <div class=\"d-flex ms-auto camposVendedores col-12 col-md-12 col-lg-4 justify-content-end\">\n <select *ngIf=\"hasUIComponent('SORT_SELECT')\" id=\"customerSort\" name=\"customerSort\"\n (change)=\"sortCustomers($event.target.value)\" class=\"mb-1 ordenarVendedores\">\n <option selected hidden disabled>{{ 'order-by' | translate }}</option>\n <option value='asc'>{{ 'client' | translate }} (A-Z)</option>\n <option value='desc'>{{ 'client' | translate }} (Z-A)</option>\n </select>\n <form *ngIf=\"hasUIComponent('SEARCH_FORM')\"\n class=\"col-lg-auto mb-lg-0 d-flex ms-3 ml-3 d-flex buscadorVendedores\">\n <input type=\"text\" name=\"searchInput\" class=\"form-control\"\n placeholder=\"{{ 'search' | translate }}\" [(ngModel)]=\"searchInput\"\n (keyup.enter)=\"updateCustomers()\">\n <button class=\"btn btn-primary ms-1 ml-1 bg-white border-dark btnSearch\"><i\n class=\"bi bi-search text-dark\" (click)=\"updateCustomers()\"></i></button>\n </form>\n </div>\n </ul>\n\n <ng-container *ngIf=\"user.customers?.length; else noCustomers\">\n\n <article class=\"card card-body mb-1 carritoProductoHeader m-0 py-0 mt-4\">\n <div class=\"row align-items-center font-bold border-bottom\">\n <div class=\"col-5 col-md-3 mb-md-0\">\n <small>{{ 'client' | translate | uppercase }}</small>\n </div>\n\n <div class=\"col-4 col-md-3 text-left d-none d-md-block\">\n <small>{{ 'user' | translate | uppercase }}</small>\n </div>\n\n <div class=\"col-3 col-md-2 text-left\">\n <small>{{ 'code' | translate | uppercase }}</small>\n </div>\n <div class=\"col-4 col-md-2 text-left\">\n <small>{{ 'new-orders' | translate | uppercase }}</small>\n </div>\n <div class=\"col-2 col-md-2 text-left d-none d-md-block\">\n <small></small>\n </div>\n\n </div>\n </article>\n\n <article *ngFor=\"let customer of filteredCustomers\" class=\"card card-body mb-3 cadaVendedor\">\n <div class=\"row d-flex align-items-center\">\n <div class=\"col-5 col-md-3 text-left\">\n <div class=\"price h6 fw-normal ps-2 pl-2 pb-0 mb-0\">\n {{ customer.firstName }} {{ customer.lastName }}\n <p class=\"d-block d-md-none fs-6 mt-1 mb-0 p-0 userMobile\">\n {{ customer.email }}\n </p>\n </div>\n </div>\n <div class=\"col-4 col-md-3 text-left d-none d-md-block\">\n <div class=\"price h6 fw-normal pb-0 mb-0 ps-2 pl-2\">\n {{ customer.email }}\n </div>\n </div>\n <div class=\"col-3 col-md-2 text-left ps-2 pl-2\">\n <div class=\"price h6 pb-0 mb-0 ps-1 pl-1\">{{ customer.id }}</div>\n </div>\n <div class=\"col-4 col-md-2 text-left ps-2 pl-2\">\n <div *ngIf=\"true\" class=\"contNumero\">\n {{ customer.ordersNotApproved }}\n </div>\n </div>\n <div class=\"col-12 col-md-2 btnIngresar\">\n\n <ng-container\n *ngIf=\"authService.getCustomer()?.id == customer.id; else noActiveCustomer\">\n <a (click)=\"changeCustomer(null)\"\n class=\"btn btn-seller-primary justify-content-center\">\n <i class=\"bi bi-box-arrow-left me-2 mr-2\"></i>\n <small class=\"me-2 mr-2 d-none d-md-block\">\n {{ 'exit' | translate | uppercase }}\n </small>\n </a>\n </ng-container>\n <ng-template #noActiveCustomer>\n <a (click)=\"changeCustomer(customer)\"\n class=\"btn btn-seller-primary justify-content-center\">\n <i class=\"bi bi-box-arrow-in-right me-2 mr-2\"></i>\n <small class=\"me-2 mr-2 d-none d-md-block\">\n {{ 'operate-as' | translate | uppercase }}\n </small>\n </a>\n </ng-template>\n\n </div>\n </div>\n </article>\n\n </ng-container>\n\n </main>\n </div>\n </div>\n </div>\n</section>\n\n<ng-template #noCustomers>\n <h4 class=\"text-center p-5\">{{ 'no-customers' | translate }}</h4>\n</ng-template>",
9195
+ template: "<section *ngIf=\"user\" id=\"seller-dashboard\">\n <div class=\"section-content mt-5 mb-2 tablaVendedores\">\n <div class=\"container-xl\">\n <div class=\"row\">\n <main class=\"col-md-12\">\n\n <ul *ngIf=\"hasHeader()\" class=\"nav nav-tabs\">\n <li class=\"nav-item col-12 col-lg-2\">\n <a *ngIf=\"hasUIComponent('HEADER_TAB')\" class=\"nav-link active cursor-pointer px-4\"\n aria-current=\"page\">\n {{ 'my-clients' | translate }}\n </a>\n </li>\n <div\n class=\"d-flex justify-content-end justify-content-lg-start justify-content-xl-end col-12 col-md-12 col-lg-6\">\n <a *ngIf=\"hasUIComponent('GENERATE_BUDGET_BTN') && authService.getCustomer()?.id; else withoutCustomer\"\n [routerLink]=\"'/collection'\" class=\"btn btn-seller-primary text-white btnGestionar d-flex align-items-center\"><i\n class=\"bi bi-file-earmark me-2 mr-2\"></i>{{ 'generate-budget' | translate }}</a>\n <ng-template #withoutCustomer>\n <a class=\"btn btn-seller-primary text-white btnGestionar d-flex align-items-center\" (click)=\"toastrService.show('must-select-customer')\">\n <i class=\"bi bi-file-earmark me-2 mr-2\"></i>{{ 'generate-budget' | translate }}</a>\n </ng-template>\n <a *ngIf=\"hasUIComponent('MANAGE_ORDERS_BTN')\"\n (click)=\"navigateExternal(constants.getUrlBase())\"\n class=\"btn btn-seller-primary text-white btnGestionar d-flex align-items-center me- me-lg-4 mr- mr-lg-4\"><i\n class=\"bi bi-archive-fill me-2 mr-2\"></i>{{ 'manage-orders' | translate }}</a>\n </div>\n <div class=\"d-flex ms-auto camposVendedores col-12 col-md-12 col-lg-4 justify-content-end\">\n <select *ngIf=\"hasUIComponent('SORT_SELECT')\" id=\"customerSort\" name=\"customerSort\"\n (change)=\"sortCustomers($event.target.value)\" class=\"mb-1 ordenarVendedores\">\n <option selected hidden disabled>{{ 'order-by' | translate }}</option>\n <option value='asc_firstName'>{{ 'client' | translate }} (A-Z)</option>\n <option value='desc_firstName'>{{ 'client' | translate }} (Z-A)</option>\n <option value='asc_id'>Menor a Mayor c\u00F3digo</option>\n <option value='desc_id'>Mayor a Menor c\u00F3digo</option>\n </select>\n <form *ngIf=\"hasUIComponent('SEARCH_FORM')\"\n class=\"col-lg-auto mb-lg-0 d-flex ms-3 ml-3 d-flex buscadorVendedores\">\n <input type=\"text\" name=\"searchInput\" class=\"form-control\"\n placeholder=\"{{ 'search' | translate }}\" [(ngModel)]=\"searchInput\"\n (keyup.enter)=\"updateCustomers()\">\n <button class=\"btn btn-primary ms-1 ml-1 bg-white border-dark btnSearch\"><i\n class=\"bi bi-search text-dark\" (click)=\"updateCustomers()\"></i></button>\n </form>\n </div>\n </ul>\n\n <ng-container *ngIf=\"user.customers?.length; else noCustomers\">\n\n <article class=\"card card-body mb-1 carritoProductoHeader m-0 py-0 mt-4\">\n <div class=\"row align-items-center font-bold border-bottom\">\n <div class=\"col-3 col-md-2 text-left\">\n <small>{{ 'code' | translate | uppercase }}</small>\n </div>\n <div class=\"col-5 col-md-3 mb-md-0\">\n <small>{{ 'client' | translate | uppercase }}</small>\n </div>\n <div class=\"col-4 col-md-3 text-left d-none d-md-block\">\n <small>{{ 'user' | translate | uppercase }}</small>\n </div>\n <div class=\"col-4 col-md-2 text-left\">\n <small>{{ 'new-orders' | translate | uppercase }}</small>\n </div>\n <div class=\"col-2 col-md-2 text-left d-none d-md-block\">\n <small></small>\n </div>\n\n </div>\n </article>\n\n <article *ngFor=\"let customer of filteredCustomers\" class=\"card card-body mb-3 cadaVendedor\">\n <div class=\"row d-flex align-items-center\">\n <div class=\"col-3 col-md-2 text-left ps-2 pl-2\">\n <div class=\"price h6 pb-0 mb-0 ps-3 pl-1\">{{ customer.id }}</div>\n </div>\n <div class=\"col-5 col-md-3 text-left\">\n <div class=\"price h6 fw-normal ps-2 pl-2 pb-0 mb-0\">\n {{ customer.firstName }} {{ customer.lastName }}\n <p class=\"d-block d-md-none fs-6 mt-1 mb-0 p-0 userMobile\">\n {{ customer.email }}\n </p>\n </div>\n </div>\n <div class=\"col-4 col-md-3 text-left d-none d-md-block\">\n <div class=\"price h6 fw-normal pb-0 mb-0 ps-2 pl-2\">\n {{ customer.email }}\n </div>\n </div>\n <div class=\"col-4 col-md-2 text-left ps-2 pl-2\">\n <div *ngIf=\"true\" class=\"contNumero\">\n {{ customer.ordersNotApproved }}\n </div>\n </div>\n <div class=\"col-12 col-md-2 btnIngresar\">\n\n <ng-container\n *ngIf=\"authService.getCustomer()?.id == customer.id; else noActiveCustomer\">\n <a (click)=\"changeCustomer(null)\"\n class=\"btn btn-seller-primary justify-content-center\">\n <i class=\"bi bi-box-arrow-left me-2 mr-2\"></i>\n <small class=\"me-2 mr-2 d-none d-md-block\">\n {{ 'exit' | translate | uppercase }}\n </small>\n </a>\n </ng-container>\n <ng-template #noActiveCustomer>\n <a (click)=\"changeCustomer(customer)\"\n class=\"btn btn-seller-primary justify-content-center\">\n <i class=\"bi bi-box-arrow-in-right me-2 mr-2\"></i>\n <small class=\"me-2 mr-2 d-none d-md-block\">\n {{ 'operate-as' | translate | uppercase }}\n </small>\n </a>\n </ng-template>\n\n </div>\n </div>\n </article>\n\n </ng-container>\n\n </main>\n </div>\n </div>\n </div>\n</section>\n\n<ng-template #noCustomers>\n <h4 class=\"text-center p-5\">{{ 'no-customers' | translate }}</h4>\n</ng-template>",
9177
9196
  styles: ["#seller-dashboard{--seller-dashboard-primary-color:0,0,0}.btn-seller-primary{color:#fff!important;background-color:rgba(var(--seller-dashboard-primary-color),1)!important;border-color:rgba(var(--seller-dashboard-primary-color),1)!important}.btn-seller-primary:hover{background-color:rgba(var(--seller-dashboard-primary-color),.9)!important}.btn-seller-primary:active{background-color:rgba(var(--seller-dashboard-primary-color),.8)!important}.btnGestionar{padding:6px 12px!important;height:36px;display:flex;align-items:center;justify-content:center;margin-left:10px}.ordenarVendedores{width:150px!important;color:#8b8b8b!important;background-color:#fff;border:1px solid #b6b6b6!important;border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px}.buscadorVendedores{margin-bottom:4px!important}.buscadorVendedores input{border:1px solid #b6b6b6!important;width:200px}.buscadorVendedores .btnSearch{border:1px solid #b6b6b6!important;padding:.375rem .75rem;font-size:1rem}.buscadorVendedores .btnSearch:focus{background-color:#fff!important}.carritoProductoHeader{border:none!important}.carritoProductoHeader small{font-size:13px}.cadaVendedor{padding:5px 0;margin-bottom:0!important;border:none!important;border-bottom:1px solid #ccc!important;border-radius:0!important;-webkit-border-radius:0}.cadaVendedor .btnIngresar a{padding:10px!important;border-width:1px!important;border-style:solid!important;display:flex;align-items:center;width:100%!important;margin-left:auto;color:#fff}.cadaVendedor .btnIngresar .contNumero{background-color:#eee;width:20px;height:20px;color:#000;font-size:13px;display:flex;align-items:center;justify-content:center;font-weight:600;border-radius:20px;-webkit-border-radius:20px;-moz-border-radius:20px;-ms-border-radius:20px;-o-border-radius:20px}.userMobile{font-size:14px!important;font-style:italic!important}.cadaVendedor .btnIngresar a:hover{background-color:rgba(var(--seller-dashboard-primary-color),.85)}.cadaVendedor .btnIngresar a:active{background-color:rgba(var(--seller-dashboard-primary-color),.8)}.cursor-pointer{cursor:pointer}.font-bold{font-weight:700}.border-bottom{border-bottom:1px solid #000!important}@media screen and (max-width:1200px){.btnGestionar{font-size:12px}}@media screen and (max-width:992px){.camposVendedores{justify-content:flex-end;margin-top:8px;margin-bottom:4px}}@media all and (max-width:768px){.ordenarVendedores{width:140px!important}.buscadorVendedores input{width:140px}.cadaVendedor .btnIngresar a{width:70px!important}}@media all and (max-width:576px){.tablaVendedores .nav-tabs .nav-link{font-size:13px;padding:6px!important}.btnGestionar{padding:6px 8px!important;font-size:13px;height:36px;display:flex;align-items:center;justify-content:center;margin-top:3px;margin-left:10px}.buscadorVendedores input,.ordenarVendedores{font-size:13px}}.fs-6{font-size:1rem!important}"]
9178
9197
  }),
9179
9198
  __param$9(3, core.Inject('env'))
@@ -10781,11 +10800,9 @@
10781
10800
  return;
10782
10801
  }
10783
10802
  _this.loading = false;
10784
- _this.toastrService.show('invalid-credentials');
10785
10803
  }
10786
10804
  }, function (err) {
10787
10805
  _this.loading = false;
10788
- _this.toastrService.show('invalid-credentials');
10789
10806
  });
10790
10807
  };
10791
10808
  _this.redirectHome = function () {
@@ -11245,15 +11262,17 @@
11245
11262
  };
11246
11263
  var ShareBlockEcComponent = /** @class */ (function (_super) {
11247
11264
  __extends$T(ShareBlockEcComponent, _super);
11248
- function ShareBlockEcComponent(consts, renderer, meta, title) {
11265
+ function ShareBlockEcComponent(consts, paramsService, renderer, meta, title) {
11249
11266
  var _this = _super.call(this) || this;
11250
11267
  _this.consts = consts;
11268
+ _this.paramsService = paramsService;
11251
11269
  _this.renderer = renderer;
11252
11270
  _this.meta = meta;
11253
11271
  _this.title = title;
11254
11272
  _this.url = '';
11255
11273
  _this.mediaimg = '';
11256
11274
  _this.description = '';
11275
+ _this.params = {};
11257
11276
  _this.toShareFacebook = function () {
11258
11277
  //return `https://www.facebook.com/share.php?u=${encodeURIComponent(this.url)}`
11259
11278
  return "https://www.facebook.com/share.php?u=" + _this.url;
@@ -11266,6 +11285,12 @@
11266
11285
  //return `https://pinterest.com/pin/create/button/?url=${encodeURIComponent(this.url)}&media=${encodeURIComponent(this.mediaimg)}&description=${encodeURIComponent(this.description)}`
11267
11286
  return "https://pinterest.com/pin/create/button/?url=" + _this.url + "&media=" + (_this.consts.mediaUrl() + _this.mediaimg) + "&description=" + _this.description;
11268
11287
  };
11288
+ _this.toShareWhatsapp = function (wsp) {
11289
+ return "https://wa.me/" + wsp.value + "?text=Me%20interesa%20este%20producto.%20" + _this.url;
11290
+ };
11291
+ _this.toShareEmail = function (mail) {
11292
+ return "mailto:" + mail.value + "?subject=Consulta%20sobre%20el%20producto:%20" + _this.description + "&body=Art\u00EDculo:%20" + _this.url;
11293
+ };
11269
11294
  _this.createMetadata = function () {
11270
11295
  // <meta name="description" content="Cojín JOY, en algodón rústico súper soft, tonos frescos y naturales, y con detalles de borlas para darle un toque divertido.">
11271
11296
  // <meta property="og:site_name" content="MYC HOME LINENS">
@@ -11290,6 +11315,7 @@
11290
11315
  return _this;
11291
11316
  }
11292
11317
  ShareBlockEcComponent.prototype.ngOnInit = function () {
11318
+ var _this = this;
11293
11319
  this.url = window.location.href;
11294
11320
  this.mediaimg = this.product.picturesdefault && this.product.picturesdefault[0];
11295
11321
  this.description = this.product.name;
@@ -11349,10 +11375,15 @@
11349
11375
  }
11350
11376
  ], true);
11351
11377
  }
11378
+ this.paramsService.parameters.subscribe(function (res) {
11379
+ var _a;
11380
+ _this.params = res != null ? (_a = res) === null || _a === void 0 ? void 0 : _a.filter(function (elem) { return elem.code.includes('share'); }) : [];
11381
+ });
11352
11382
  this.ecOnInit();
11353
11383
  };
11354
11384
  ShareBlockEcComponent.ctorParameters = function () { return [
11355
11385
  { type: Constants },
11386
+ { type: ParametersService },
11356
11387
  { type: core.Renderer2 },
11357
11388
  { type: platformBrowser.Meta },
11358
11389
  { type: platformBrowser.Title }
@@ -11363,7 +11394,7 @@
11363
11394
  ShareBlockEcComponent = __decorate$1p([
11364
11395
  core.Component({
11365
11396
  selector: 'app-share-block-ec',
11366
- template: "<div class=\"w-100 d-flex justify-content-around\">\n <a target=\"_blank\" [href]=\"toShareFacebook()\"\n class=\"social-sharing__link\" title=\"Compartir en Facebook\">\n <svg aria-hidden=\"true\" focusable=\"false\" role=\"presentation\" class=\"icon icon-facebook\" viewBox=\"0 0 32 32\">\n <path fill=\"#444\"\n d=\"M18.56 31.36V17.28h4.48l.64-5.12h-5.12v-3.2c0-1.28.64-2.56 2.56-2.56h2.56V1.28H19.2c-3.84 0-7.04 2.56-7.04 7.04v3.84H7.68v5.12h4.48v14.08h6.4z\">\n </path>\n </svg>\n <span class=\"social-sharing__title\" aria-hidden=\"true\">Compartir</span>\n </a>\n <a target=\"_blank\"\n [href]=\"toShareTwitter()\"\n class=\"social-sharing__link\" title=\"Tuitear en Twitter\">\n <svg aria-hidden=\"true\" focusable=\"false\" role=\"presentation\" class=\"icon icon-twitter\" viewBox=\"0 0 32 32\">\n <path fill=\"#444\"\n d=\"M31.281 6.733q-1.304 1.924-3.13 3.26 0 .13.033.408t.033.408q0 2.543-.75 5.086t-2.282 4.858-3.635 4.108-5.053 2.869-6.341 1.076q-5.282 0-9.65-2.836.913.065 1.5.065 4.401 0 7.857-2.673-2.054-.033-3.668-1.255t-2.266-3.146q.554.13 1.206.13.88 0 1.663-.261-2.184-.456-3.619-2.184t-1.435-3.977v-.065q1.239.652 2.836.717-1.271-.848-2.021-2.233t-.75-2.983q0-1.63.815-3.195 2.38 2.967 5.754 4.678t7.319 1.907q-.228-.815-.228-1.434 0-2.608 1.858-4.45t4.532-1.842q1.304 0 2.51.522t2.054 1.467q2.152-.424 4.01-1.532-.685 2.217-2.771 3.488 1.989-.261 3.619-.978z\">\n </path>\n </svg>\n <span class=\"social-sharing__title\" aria-hidden=\"true\">Tuitear</span>\n </a>\n <a target=\"_blank\"\n [href]=\"toSharePinterest()\"\n class=\"social-sharing__link\" title=\"Pinear en Pinterest\">\n <svg aria-hidden=\"true\" focusable=\"false\" role=\"presentation\" class=\"icon icon-pinterest\" viewBox=\"0 0 32 32\">\n <path fill=\"#444\"\n d=\"M27.52 9.6c-.64-5.76-6.4-8.32-12.8-7.68-4.48.64-9.6 4.48-9.6 10.24 0 3.2.64 5.76 3.84 6.4 1.28-2.56-.64-3.2-.64-4.48-1.28-7.04 8.32-12.16 13.44-7.04 3.2 3.84 1.28 14.08-4.48 13.44-5.12-1.28 2.56-9.6-1.92-11.52-3.2-1.28-5.12 4.48-3.84 7.04-1.28 4.48-3.2 8.96-1.92 15.36 2.56-1.92 3.84-5.76 4.48-9.6 1.28.64 1.92 1.92 3.84 1.92 6.4-.64 10.24-7.68 9.6-14.08z\">\n </path>\n </svg>\n <span class=\"social-sharing__title\" aria-hidden=\"true\">Hacer pin</span>\n </a>\n</div>",
11397
+ template: "<div class=\"w-100 d-flex justify-content-around\">\n <ng-container *ngIf=\"params && params.length > 0; else default\">\n <a *ngIf=\"hasParams(params, 'facebook')\" target=\"_blank\" [href]=\"toShareFacebook()\"\n class=\"social-sharing__link\" title=\"Compartir en Facebook\">\n <svg aria-hidden=\"true\" focusable=\"false\" role=\"presentation\" class=\"icon icon-facebook\" viewBox=\"0 0 32 32\">\n <path fill=\"#444\"\n d=\"M18.56 31.36V17.28h4.48l.64-5.12h-5.12v-3.2c0-1.28.64-2.56 2.56-2.56h2.56V1.28H19.2c-3.84 0-7.04 2.56-7.04 7.04v3.84H7.68v5.12h4.48v14.08h6.4z\">\n </path>\n </svg>\n <span class=\"social-sharing__title\" aria-hidden=\"true\">Compartir</span>\n </a>\n <a *ngIf=\"hasParams(params, 'twitter')\" target=\"_blank\" \n [href]=\"toShareTwitter()\"\n class=\"social-sharing__link\" title=\"Tuitear en Twitter\">\n <svg aria-hidden=\"true\" focusable=\"false\" role=\"presentation\" class=\"icon icon-twitter\" viewBox=\"0 0 32 32\">\n <path fill=\"#444\"\n d=\"M31.281 6.733q-1.304 1.924-3.13 3.26 0 .13.033.408t.033.408q0 2.543-.75 5.086t-2.282 4.858-3.635 4.108-5.053 2.869-6.341 1.076q-5.282 0-9.65-2.836.913.065 1.5.065 4.401 0 7.857-2.673-2.054-.033-3.668-1.255t-2.266-3.146q.554.13 1.206.13.88 0 1.663-.261-2.184-.456-3.619-2.184t-1.435-3.977v-.065q1.239.652 2.836.717-1.271-.848-2.021-2.233t-.75-2.983q0-1.63.815-3.195 2.38 2.967 5.754 4.678t7.319 1.907q-.228-.815-.228-1.434 0-2.608 1.858-4.45t4.532-1.842q1.304 0 2.51.522t2.054 1.467q2.152-.424 4.01-1.532-.685 2.217-2.771 3.488 1.989-.261 3.619-.978z\">\n </path>\n </svg>\n <span class=\"social-sharing__title\" aria-hidden=\"true\">Tuitear</span>\n </a>\n <a *ngIf=\"hasParams(params, 'pinterest')\" target=\"_blank\"\n [href]=\"toSharePinterest()\"\n class=\"social-sharing__link\" title=\"Pinear en Pinterest\">\n <svg aria-hidden=\"true\" focusable=\"false\" role=\"presentation\" class=\"icon icon-pinterest\" viewBox=\"0 0 32 32\">\n <path fill=\"#444\"\n d=\"M27.52 9.6c-.64-5.76-6.4-8.32-12.8-7.68-4.48.64-9.6 4.48-9.6 10.24 0 3.2.64 5.76 3.84 6.4 1.28-2.56-.64-3.2-.64-4.48-1.28-7.04 8.32-12.16 13.44-7.04 3.2 3.84 1.28 14.08-4.48 13.44-5.12-1.28 2.56-9.6-1.92-11.52-3.2-1.28-5.12 4.48-3.84 7.04-1.28 4.48-3.2 8.96-1.92 15.36 2.56-1.92 3.84-5.76 4.48-9.6 1.28.64 1.92 1.92 3.84 1.92 6.4-.64 10.24-7.68 9.6-14.08z\">\n </path>\n </svg>\n <span class=\"social-sharing__title\" aria-hidden=\"true\">Hacer pin</span>\n </a>\n <a *ngIf=\"hasParams(params, 'whatsapp') as wsp\" target=\"_blank\" [href]=\"toShareWhatsapp(wsp)\" class=\"social-sharing__link\" title=\"Whatsapp\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\" focusable=\"false\" role=\"presentation\" fill=\"currentColor\" class=\"bi bi-whatsapp\"\n viewBox=\"0 0 16 16\">\n <path\n d=\"M13.601 2.326A7.854 7.854 0 0 0 7.994 0C3.627 0 .068 3.558.064 7.926c0 1.399.366 2.76 1.057 3.965L0 16l4.204-1.102a7.933 7.933 0 0 0 3.79.965h.004c4.368 0 7.926-3.558 7.93-7.93A7.898 7.898 0 0 0 13.6 2.326zM7.994 14.521a6.573 6.573 0 0 1-3.356-.92l-.24-.144-2.494.654.666-2.433-.156-.251a6.56 6.56 0 0 1-1.007-3.505c0-3.626 2.957-6.584 6.591-6.584a6.56 6.56 0 0 1 4.66 1.931 6.557 6.557 0 0 1 1.928 4.66c-.004 3.639-2.961 6.592-6.592 6.592zm3.615-4.934c-.197-.099-1.17-.578-1.353-.646-.182-.065-.315-.099-.445.099-.133.197-.513.646-.627.775-.114.133-.232.148-.43.05-.197-.1-.836-.308-1.592-.985-.59-.525-.985-1.175-1.103-1.372-.114-.198-.011-.304.088-.403.087-.088.197-.232.296-.346.1-.114.133-.198.198-.33.065-.134.034-.248-.015-.347-.05-.099-.445-1.076-.612-1.47-.16-.389-.323-.335-.445-.34-.114-.007-.247-.007-.38-.007a.729.729 0 0 0-.529.247c-.182.198-.691.677-.691 1.654 0 .977.71 1.916.81 2.049.098.133 1.394 2.132 3.383 2.992.47.205.84.326 1.129.418.475.152.904.129 1.246.08.38-.058 1.171-.48 1.338-.943.164-.464.164-.86.114-.943-.049-.084-.182-.133-.38-.232z\" />\n </svg>\n <span class=\"social-sharing__title\" aria-hidden=\"true\">Whatsapp</span>\n </a>\n <a *ngIf=\"hasParams(params, 'email') as email\" target=\"_blank\" [href]=\"toShareEmail(email)\" class=\"social-sharing__link\"\n title=\"Email\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\" focusable=\"false\" role=\"presentation\" fill=\"currentColor\" class=\"bi bi-envelope-fill\"\n viewBox=\"0 0 16 16\">\n <path\n d=\"M.05 3.555A2 2 0 0 1 2 2h12a2 2 0 0 1 1.95 1.555L8 8.414.05 3.555ZM0 4.697v7.104l5.803-3.558L0 4.697ZM6.761 8.83l-6.57 4.027A2 2 0 0 0 2 14h12a2 2 0 0 0 1.808-1.144l-6.57-4.027L8 9.586l-1.239-.757Zm3.436-.586L16 11.801V4.697l-5.803 3.546Z\" />\n </svg>\n <span class=\"social-sharing__title\" aria-hidden=\"true\">Email</span>\n </a>\n </ng-container>\n</div>\n\n<!-- VISTA DEFAULT CON LINKS QUE NO REQUIEREN PARAMETROS-->\n<ng-template #default>\n <a target=\"_blank\" [href]=\"toShareFacebook()\" class=\"social-sharing__link\" title=\"Compartir en Facebook\">\n <svg aria-hidden=\"true\" focusable=\"false\" role=\"presentation\" class=\"icon icon-facebook\" viewBox=\"0 0 32 32\">\n <path fill=\"#444\"\n d=\"M18.56 31.36V17.28h4.48l.64-5.12h-5.12v-3.2c0-1.28.64-2.56 2.56-2.56h2.56V1.28H19.2c-3.84 0-7.04 2.56-7.04 7.04v3.84H7.68v5.12h4.48v14.08h6.4z\">\n </path>\n </svg>\n <span class=\"social-sharing__title\" aria-hidden=\"true\">Compartir</span>\n </a>\n <a target=\"_blank\" [href]=\"toShareTwitter()\" class=\"social-sharing__link\" title=\"Tuitear en Twitter\">\n <svg aria-hidden=\"true\" focusable=\"false\" role=\"presentation\" class=\"icon icon-twitter\" viewBox=\"0 0 32 32\">\n <path fill=\"#444\"\n d=\"M31.281 6.733q-1.304 1.924-3.13 3.26 0 .13.033.408t.033.408q0 2.543-.75 5.086t-2.282 4.858-3.635 4.108-5.053 2.869-6.341 1.076q-5.282 0-9.65-2.836.913.065 1.5.065 4.401 0 7.857-2.673-2.054-.033-3.668-1.255t-2.266-3.146q.554.13 1.206.13.88 0 1.663-.261-2.184-.456-3.619-2.184t-1.435-3.977v-.065q1.239.652 2.836.717-1.271-.848-2.021-2.233t-.75-2.983q0-1.63.815-3.195 2.38 2.967 5.754 4.678t7.319 1.907q-.228-.815-.228-1.434 0-2.608 1.858-4.45t4.532-1.842q1.304 0 2.51.522t2.054 1.467q2.152-.424 4.01-1.532-.685 2.217-2.771 3.488 1.989-.261 3.619-.978z\">\n </path>\n </svg>\n <span class=\"social-sharing__title\" aria-hidden=\"true\">Tuitear</span>\n </a>\n <a target=\"_blank\" [href]=\"toSharePinterest()\" class=\"social-sharing__link\" title=\"Pinear en Pinterest\">\n <svg aria-hidden=\"true\" focusable=\"false\" role=\"presentation\" class=\"icon icon-pinterest\" viewBox=\"0 0 32 32\">\n <path fill=\"#444\"\n d=\"M27.52 9.6c-.64-5.76-6.4-8.32-12.8-7.68-4.48.64-9.6 4.48-9.6 10.24 0 3.2.64 5.76 3.84 6.4 1.28-2.56-.64-3.2-.64-4.48-1.28-7.04 8.32-12.16 13.44-7.04 3.2 3.84 1.28 14.08-4.48 13.44-5.12-1.28 2.56-9.6-1.92-11.52-3.2-1.28-5.12 4.48-3.84 7.04-1.28 4.48-3.2 8.96-1.92 15.36 2.56-1.92 3.84-5.76 4.48-9.6 1.28.64 1.92 1.92 3.84 1.92 6.4-.64 10.24-7.68 9.6-14.08z\">\n </path>\n </svg>\n <span class=\"social-sharing__title\" aria-hidden=\"true\">Hacer pin</span>\n </a>\n</ng-template>\n<!-- FIN -->",
11367
11398
  styles: ["a{color:#000}"]
11368
11399
  })
11369
11400
  ], ShareBlockEcComponent);
@@ -13000,13 +13031,21 @@
13000
13031
  this.http = http;
13001
13032
  this.captchaSubject = new rxjs.BehaviorSubject({ siteKey: '' });
13002
13033
  this.captcha = this.captchaSubject.asObservable();
13034
+ this.testing = "easycommercetech";
13035
+ this.productionEnvironment = false;
13003
13036
  this.recaptchaSiteKeysUrl = './assets/recaptcha/recaptcha-site-keys.json';
13004
13037
  this.recaptchaSitesUrl = './assets/recaptcha/recaptcha-sites.json';
13038
+ this.recaptchaSitesUrlProd = './assets/recaptcha/recaptcha-sites-prod.json';
13005
13039
  /**
13006
13040
  *
13007
13041
  * @returns {string} path que contiene la direccion del endpoint referido al captcha
13008
13042
  */
13009
13043
  this.captchaApi = function () { return 'shop-api/channels'; };
13044
+ /**
13045
+ * @description Devuelve true si la url es de produccion, false en caso contrario.
13046
+ * @returns {Boolean}
13047
+ */
13048
+ this.isProd = function () { return !_this.urlBaseFormat.includes(_this.testing); };
13010
13049
  /**
13011
13050
  * @description Carga las variables RECAPTCHA_SITES y RECAPTCHA_SITE_KEYS, con los valores
13012
13051
  * de los Json estaticos, para posteriormente obtener la "siteKey"(clave del captcha) en caso
@@ -13025,12 +13064,10 @@
13025
13064
  return _this.http.get(_this.recaptchaSiteKeysUrl);
13026
13065
  };
13027
13066
  /**
13028
- *
13067
+ * @description Se obtiene los datos segun el entorno en que se ejecute
13029
13068
  * @returns {Observable<>} Datos obtenidos del archivo con las url de los sitios
13030
13069
  */
13031
- this.getRecaptchaSites = function () {
13032
- return _this.http.get(_this.recaptchaSitesUrl);
13033
- };
13070
+ this.getRecaptchaSites = function () { return _this.productionEnvironment ? _this.http.get(_this.recaptchaSitesUrlProd) : _this.http.get(_this.recaptchaSitesUrl); };
13034
13071
  /**
13035
13072
  * @description Genera una peticion para recibir la clave del captcha. En caso de no tener exito,
13036
13073
  * utiliza los archivos estaticos para retornar una clave por defecto. Rellena el Observable con
@@ -13059,6 +13096,7 @@
13059
13096
  * la clave por defecto que pertenece a esta direccion, inicializa la configuracion inicial.
13060
13097
  */
13061
13098
  this.urlBaseFormat = this.formatUrl(location.href);
13099
+ this.productionEnvironment = this.isProd();
13062
13100
  this.initializer();
13063
13101
  }
13064
13102
  CaptchaService$1.ctorParameters = function () { return [
@@ -13146,7 +13184,7 @@
13146
13184
  };
13147
13185
  var DecidirEcComponent = /** @class */ (function (_super) {
13148
13186
  __extends$13(DecidirEcComponent, _super);
13149
- function DecidirEcComponent(renderer, connection, toastrService, consts, cartService, toastr, activedRoute, sanitizer, modalService) {
13187
+ function DecidirEcComponent(renderer, connection, toastrService, consts, cartService, toastr, activedRoute, sanitizer, modalService, params) {
13150
13188
  var _this = _super.call(this) || this;
13151
13189
  _this.renderer = renderer;
13152
13190
  _this.connection = connection;
@@ -13157,6 +13195,7 @@
13157
13195
  _this.activedRoute = activedRoute;
13158
13196
  _this.sanitizer = sanitizer;
13159
13197
  _this.modalService = modalService;
13198
+ _this.params = params;
13160
13199
  _this.method = null;
13161
13200
  _this.total_amount = 0;
13162
13201
  _this.user_data = null;
@@ -13165,6 +13204,7 @@
13165
13204
  _this.isDobleAuth = false;
13166
13205
  _this.urls = [];
13167
13206
  _this.closeModal = '';
13207
+ _this.paramsMensaje = '';
13168
13208
  _this.dataRedirect = function () { return _this.consts.getUrlBase() + 'shop-api/' + _this.consts.getChannel() + '/decidir/' + _this.cartService.cart_token + '/process-payment'; };
13169
13209
  _this.clearStorageState = function () {
13170
13210
  sessionStorage.removeItem('state');
@@ -13188,6 +13228,10 @@
13188
13228
  if (state == 'success') {
13189
13229
  _this.ready.emit(true);
13190
13230
  }
13231
+ if (state == 'partially_authorized') {
13232
+ _this.ready.emit(true);
13233
+ _this.processError(_this.paramsMensaje);
13234
+ }
13191
13235
  if (state == 'cancel') {
13192
13236
  return;
13193
13237
  }
@@ -13224,6 +13268,7 @@
13224
13268
  }
13225
13269
  DecidirEcComponent.prototype.ngOnInit = function () {
13226
13270
  this.getCheckoutDecidir();
13271
+ this.paramsMensaje = this.hasParams(this.params, 'partially_authorized_decidir') || 'Se está procesando el pago con tarjeta.';
13227
13272
  this.ecOnInit();
13228
13273
  };
13229
13274
  DecidirEcComponent.prototype.ngOnDestroy = function () {
@@ -13236,7 +13281,6 @@
13236
13281
  this.clearStorageState();
13237
13282
  localStorage.setItem('dataRedirect', this.dataRedirect());
13238
13283
  localStorage.setItem('dataDecidir', JSON.stringify(this.method));
13239
- console.log('dataaaaa', this.method);
13240
13284
  this.modalRef = this.modalService.show(template, { class: 'modal-xl modal-dialog-centered ', keyboard: false, backdrop: 'static', animated: true });
13241
13285
  this.closeModal = '';
13242
13286
  this.callState();
@@ -13250,7 +13294,8 @@
13250
13294
  { type: ToastService },
13251
13295
  { type: router.ActivatedRoute },
13252
13296
  { type: platformBrowser.DomSanitizer },
13253
- { type: modal.BsModalService }
13297
+ { type: modal.BsModalService },
13298
+ { type: ParametersService }
13254
13299
  ]; };
13255
13300
  __decorate$1E([
13256
13301
  core.Input()