ng-easycommerce 0.0.410 → 0.0.413

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 (51) hide show
  1. package/README.md +27 -3
  2. package/assets/decidirFormEc.html +56 -45
  3. package/assets/ec-i18n/en.json +4 -2
  4. package/assets/ec-i18n/es.json +4 -2
  5. package/assets/images/cards-occasional.png +0 -0
  6. package/assets/recaptcha/recaptcha-site-keys.json +4 -0
  7. package/assets/recaptcha/recaptcha-sites.json +85 -0
  8. package/bundles/ng-easycommerce.umd.js +277 -70
  9. package/bundles/ng-easycommerce.umd.js.map +1 -1
  10. package/bundles/ng-easycommerce.umd.min.js +1 -1
  11. package/bundles/ng-easycommerce.umd.min.js.map +1 -1
  12. package/esm2015/lib/ec-component/index.js +5 -2
  13. package/esm2015/lib/ec-component/related-products-ec/related-products-ec.component.js +17 -3
  14. package/esm2015/lib/ec-component/seller-dashboard-container-ec/seller-dashboard-container-ec.component.js +3 -3
  15. package/esm2015/lib/ec-component/stores-ec/stores-ec.component.js +39 -1
  16. package/esm2015/lib/ec-component/widgets-ec/decidir-ec/decidir-ec.component.js +1 -1
  17. package/esm2015/lib/ec-component/widgets-ec/re-captcha-ec/re-captcha-ec.component.js +50 -0
  18. package/esm2015/lib/guards/able-buyer-guard.service.js +2 -2
  19. package/esm2015/lib/interfaces/store.js +1 -1
  20. package/esm2015/lib/ng-easycommerce.module.js +3 -1
  21. package/esm2015/lib/services/captcha.service.js +104 -0
  22. package/esm2015/lib/services/cart.service.js +3 -3
  23. package/esm2015/ng-easycommerce.js +19 -18
  24. package/esm2015/public-api.js +2 -1
  25. package/esm5/lib/ec-component/index.js +5 -2
  26. package/esm5/lib/ec-component/related-products-ec/related-products-ec.component.js +17 -3
  27. package/esm5/lib/ec-component/seller-dashboard-container-ec/seller-dashboard-container-ec.component.js +3 -3
  28. package/esm5/lib/ec-component/stores-ec/stores-ec.component.js +44 -1
  29. package/esm5/lib/ec-component/widgets-ec/decidir-ec/decidir-ec.component.js +1 -1
  30. package/esm5/lib/ec-component/widgets-ec/re-captcha-ec/re-captcha-ec.component.js +53 -0
  31. package/esm5/lib/guards/able-buyer-guard.service.js +2 -2
  32. package/esm5/lib/interfaces/store.js +1 -1
  33. package/esm5/lib/ng-easycommerce.module.js +3 -1
  34. package/esm5/lib/services/captcha.service.js +106 -0
  35. package/esm5/lib/services/cart.service.js +3 -3
  36. package/esm5/ng-easycommerce.js +19 -18
  37. package/esm5/public-api.js +2 -1
  38. package/fesm2015/ng-easycommerce.js +249 -54
  39. package/fesm2015/ng-easycommerce.js.map +1 -1
  40. package/fesm5/ng-easycommerce.js +260 -55
  41. package/fesm5/ng-easycommerce.js.map +1 -1
  42. package/lib/ec-component/index.d.ts +1 -0
  43. package/lib/ec-component/related-products-ec/related-products-ec.component.d.ts +3 -1
  44. package/lib/ec-component/stores-ec/stores-ec.component.d.ts +26 -0
  45. package/lib/ec-component/widgets-ec/re-captcha-ec/re-captcha-ec.component.d.ts +24 -0
  46. package/lib/interfaces/store.d.ts +2 -0
  47. package/lib/services/captcha.service.d.ts +62 -0
  48. package/ng-easycommerce.d.ts +18 -17
  49. package/ng-easycommerce.metadata.json +1 -1
  50. package/package.json +1 -1
  51. package/public-api.d.ts +1 -0
package/README.md CHANGED
@@ -1,4 +1,28 @@
1
- # Ultimas Modificaciones
1
+ # version: 0.0.413
2
+
3
+ - Actualización de la interfaz de Store y StoreEcComponent para manejar tiendas exclusivas y con retiro local.
4
+
5
+ - Actualización de la vista de Seller, se agrega la columna para pedidos nuevos y se acomodan los estilos.
6
+
7
+ - Atualización de redirección AbleBuyerGuardService.
8
+
9
+ - Actualización de los diccionarios ec-i18n.
10
+
11
+ ### version: 0.0.412
12
+
13
+ - Se creo el componente 're-captcha-ec' para poder ampliar el uso del re-captcha
14
+ --Ejemplo de uso:
15
+ <re-captcha-ec [form]="contact_form"></re-captcha-ec>
16
+ form: recibe el formulario que contiene el recaptcha
17
+ (opcional)siteKey: recibe la clave (string) que usa el recaptcha.
18
+
19
+ - Ajustes componentes medio de pago Decidir.
20
+
21
+ ### version: 0.0.411
22
+
23
+ - Ajustes componentes medio de pago Decidir.
24
+
25
+ - Productos relacionados y variantes color por product related reactivo.
2
26
 
3
27
  ### version: 0.0.410
4
28
 
@@ -16,7 +40,7 @@
16
40
 
17
41
  ### version: 0.0.408
18
42
 
19
- - Ajuste en componente SellerDashboardContainer (UI y backend redirect)
43
+ - Ajuste en componente SellerDashboardContainer (UI y backend redirect).
20
44
 
21
45
  ### version: 0.0.407
22
46
 
@@ -116,7 +140,7 @@
116
140
  --Ejemplo de uso:
117
141
  <div app-magnizoom-ec
118
142
  zoomMode="COVER"
119
- [imageSrc]="consts.mediaUrl() + picture"
143
+ [ImageSrc]="consts.mediaUrl() + picture"
120
144
  [imageStyle]="{'width': '470px', 'height': '470px'}"
121
145
  [imageClass]="'prueba'">
122
146
  </div>
@@ -8,14 +8,11 @@
8
8
  integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
9
9
  <title>Decidir</title>
10
10
 
11
- <!-- <script src="https://live.decidir.com/static/v2.5/decidir.js"></script> -->
12
-
13
11
  <script defer>
14
12
 
15
13
  const dataDecidirHead = localStorage.getItem('dataDecidir')
16
14
  && JSON.parse(localStorage.getItem('dataDecidir'))
17
15
 
18
-
19
16
  console.log("dataDecidirHead", dataDecidirHead);
20
17
  console.log("dataDecidirHead.config", dataDecidirHead.config);
21
18
  console.log("dataDecidirHead.config.public_environment", dataDecidirHead.config.public_environment);
@@ -48,6 +45,11 @@
48
45
  <body>
49
46
 
50
47
  <style>
48
+ .logo-pago-seguro-img {
49
+ /* width: 150px;
50
+ height: 48px; */
51
+ }
52
+
51
53
  .loader {
52
54
  border: 16px solid #f3f3f3;
53
55
  border-top: 16px solid #dc3545;
@@ -84,12 +86,18 @@
84
86
  <div class="row mt-3">
85
87
  <div class="col-12">
86
88
  <div class="card">
87
- <div class="w-100 text-center">
88
- <img src="../assets/images/decidir-logo.png" class="card-img-top w-50" alt="...">
89
+
90
+ <div class="container-fluid mt-3">
91
+ <div class="row">
92
+ <div class="col-md-6 col-12">
93
+ <!-- <h5><b>Decidir</b></h5> -->
94
+ </div>
95
+ <div class="col-md-6 col-12">
96
+ <img src="../assets/images/cards-occasional.png" class="card-img-top" alt="...">
97
+ </div>
98
+ </div>
89
99
  </div>
90
100
  <div class="card-body">
91
- <!-- <h5 class="card-title">Decidir</h5> -->
92
- <!-- <p class="card-text">Ingrese sus datos para continuar con el pago.</p> -->
93
101
  <form action="" method="post" id="formulario">
94
102
  <fieldset>
95
103
 
@@ -98,7 +106,7 @@
98
106
 
99
107
  <div class="form-floating mb-3">
100
108
  <input class="form-control" type="text" data-decidir="card_number"
101
- placeholder="XXXXXXXXXXXXXXXX" maxlength="16" value=""
109
+ placeholder="XXXXXXXXXXXXXXXX" maxlength="18" value=""
102
110
  oninput="this.value = this.value.replace(/[^0-9.]/g, ''); this.value = this.value.replace(/(\..*)\./g, '$1');">
103
111
  <label for="card_number">Numero de tarjeta:</label>
104
112
  </div>
@@ -108,7 +116,7 @@
108
116
 
109
117
  <div class="form-floating mb-3">
110
118
  <input class="form-control" type="text" data-decidir="security_code"
111
- placeholder="XXX" maxlength="3" value=""
119
+ placeholder="XXX" maxlength="4" value=""
112
120
  oninput="this.value = this.value.replace(/[^0-9.]/g, ''); this.value = this.value.replace(/(\..*)\./g, '$1');" />
113
121
  <label for="security_code">Codigo de seguridad:</label>
114
122
  </div>
@@ -161,8 +169,9 @@
161
169
 
162
170
  <div class="w-100 text-center">
163
171
  <div id="loadTokenBtn">
164
- <input type="submit" value="Generar Token"
165
- class="btn btn-outline-success mt-3" />
172
+ <div class="d-grid gap-2">
173
+ <input type="submit" value="Pagar" class="btn btn-outline-success mt-3" />
174
+ </div>
166
175
  </div>
167
176
  <div id="loadToken" class="text-center mt-4">
168
177
  <div class="spinner-border" role="status">
@@ -173,6 +182,12 @@
173
182
  </fieldset>
174
183
  </form>
175
184
  </div>
185
+ <div class="w-100 d-flex justify-content-end">
186
+ <div class="w-50 d-flex justify-content-end">
187
+ <img src="../assets/images/decidir-logo.png"
188
+ class="card-img-top w-50 logo-pago-seguro-img " alt="...">
189
+ </div>
190
+ </div>
176
191
  </div>
177
192
 
178
193
  </div>
@@ -209,62 +224,58 @@
209
224
  && JSON.parse(localStorage.getItem('dataDecidir'))
210
225
 
211
226
  const publicApiKey = dataDecidir?.config?.public_key
212
- const cybersource = dataDecidir?.config?.public_cybersource || true
227
+ let cybersource = dataDecidir?.config?.public_cybersource && dataDecidir?.config?.public_cybersource == 'deshabilitado'
213
228
  let modo = dataDecidir?.config?.public_environment || null
214
229
 
215
230
  modo && (modo == 'prod' && (modo = false) || modo == 'test' && (modo = true))
216
231
  !modo && (modo = window.location.host.includes('easycommerce'))
217
232
 
218
- console.log(modo);
233
+ !cybersource && (cybersource = true)
219
234
 
220
235
  const decidir = new Decidir(modo && urlSandbox || urlProduccion, cybersource);
221
236
  decidir.setPublishableKey(publicApiKey);
222
237
  decidir.setTimeout(5000);
223
238
 
224
- console.log("decidir", decidir);
225
-
226
239
  let form = document.querySelector('#formulario');
227
240
 
228
241
  const sendToken = (data) => {
229
-
230
- fetch(dataRedirect, {
231
- method: 'POST',
232
- body: JSON.stringify(data),
233
- headers: {
234
- 'Content-Type': 'application/json'
235
- }
236
- }).then(res => res.json())
237
- .catch(error => {
238
- console.error('Error:', error)
239
- processError(response)
240
- })
241
- .then(response => {
242
- console.log('Success:', response)
243
- if (response.hasOwnProperty('status')) {
244
- if (response.status == 'success') {
245
- processResponse(response)
242
+ try {
243
+ fetch(dataRedirect, {
244
+ method: 'POST',
245
+ body: JSON.stringify(data),
246
+ headers: {
247
+ 'Content-Type': 'application/json'
248
+ }
249
+ }).then(res => res.json())
250
+ .catch(error => {
251
+ console.error('Error:', error)
252
+ processError(response)
253
+ })
254
+ .then(response => {
255
+ console.log('Success:', response)
256
+ if (response.hasOwnProperty('status')) {
257
+ if (response.status == 'approved') {
258
+ processResponse(response)
259
+ } else {
260
+ processError(response)
261
+ }
246
262
  } else {
247
- processError(response)
263
+ processResponse(response)
248
264
  }
249
- } else {
250
- processResponse(response)
251
- }
252
- });
265
+ });
266
+ } catch (error) {
267
+ processError(response)
268
+ }
253
269
  localStorage.removeItem('dataRedirect')
254
270
  localStorage.removeItem('dataDecidir')
255
271
  }
256
272
 
257
273
  const getAsBin = (data) => {
258
- // console.log('validateCreditCardNumber',decidir.validateCreditCardNumber(decidir.collectFormData(form).card_number));
259
- // console.log('cardType',decidir.cardType(decidir.collectFormData(form).card_number));
260
- // console.log('collectFormData', decidir.collectFormData(form));
261
- // console.log('getBin',JSON.stringify(decidir.getBin(decidir.collectFormData(form))));
262
- // console.log('getHttp',decidir.getHttp(form));
263
274
  mp.getPaymentMethods({ bin: data.bin }).then(
264
- t => {
275
+ t => {
265
276
  let resultmp = t.results[0]
266
- 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 }
267
- sendToken({ ...data , ...asBin})
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 })
268
279
  }
269
280
  )
270
281
  }
@@ -225,7 +225,7 @@
225
225
  "product-details": "Product details",
226
226
  "product-name": "Article name",
227
227
  "product-removed": "Cart product removed",
228
- "product-updated": "The product quantity was updated",
228
+ "product-updated": "The product quantity was updated to {{quantity}}",
229
229
  "products": "Products",
230
230
  "profile": "Profile",
231
231
  "purchase-code": "Your purchase code is: ",
@@ -355,5 +355,7 @@
355
355
  "exit": "Exit",
356
356
  "start-impersonating": "Operating as: {{ customer }}",
357
357
  "stop-impersonating": "You are not operating as none of your customers",
358
- "must-select-customer": "You must select a customer to perform this action."
358
+ "must-select-customer": "You must select a customer to perform this action.",
359
+ "new-orders": "New orders",
360
+ "operate-as": "Operate as"
359
361
  }
@@ -226,7 +226,7 @@
226
226
  "product-details": "Detalles del producto",
227
227
  "product-name": "Nombre de artículo",
228
228
  "product-removed": "Se eliminó el producto en tu carrito",
229
- "product-updated": "Se actualizó la cantidad del producto",
229
+ "product-updated": "Se actualizó la cantidad del producto quedando en {{quantity}}",
230
230
  "products": "Productos",
231
231
  "profile": "Perfil",
232
232
  "purchase-code": "Su código de compra es: ",
@@ -356,5 +356,7 @@
356
356
  "exit": "Salir",
357
357
  "start-impersonating": "Operando como: {{ customer }}",
358
358
  "stop-impersonating": "No se encuentra operando por ninguno de sus clientes",
359
- "must-select-customer": "Debe seleccionar un cliente para ejecutar esta acción."
359
+ "must-select-customer": "Debe seleccionar un cliente para ejecutar esta acción.",
360
+ "new-orders": "Pedidos nuevos",
361
+ "operate-as": "Operar como"
360
362
  }
@@ -0,0 +1,4 @@
1
+ {
2
+ "tanda_1": "6LcPPbUZAAAAAB8tKJ-UozPs1PztvGTEXnC26aY3",
3
+ "tanda_2": "6Lc158seAAAAAEMe3SmWstPaZ4GudBjxCc1BIgGX"
4
+ }
@@ -0,0 +1,85 @@
1
+ {
2
+ "eq.easycommercetech.com": "tanda_1",
3
+ "myc.easycommercetech.tienda": "tanda_1",
4
+ "chispa.easycommercetech.com": "tanda_1",
5
+ "tekcenter.easycommercetech.com": "tanda_1",
6
+ "doshermanos.easycommercetech.com": "tanda_1",
7
+ "adctecnologia.easycommercetech.com": "tanda_1",
8
+ "pbg.easycommercetech.com": "tanda_1",
9
+ "elden.easycommercetech.com": "tanda_1",
10
+ "elden.com": "tanda_1",
11
+ "ags.easycommercetech.tienda": "tanda_1",
12
+ "smeg.easycommercetech.com": "tanda_1",
13
+ "smeg.com.ar": "tanda_1",
14
+ "promesse.easycommercetech.com": "tanda_1",
15
+ "andresgourmetseleccion.es": "tanda_1",
16
+ "d2dcor.easycommercetech.tienda": "tanda_1",
17
+ "vinals.easycommercetech.tienda": "tanda_1",
18
+ "d2dcor.com": "tanda_1",
19
+ "promesse.com.ar": "tanda_1",
20
+ "scorpiostore.easycommercetech.com": "tanda_1",
21
+ "almacendelmolino.easycommercetech.com": "tanda_1",
22
+ "maxifarma.easycommercetech.com": "tanda_1",
23
+ "guolis.easycommercetech.com": "tanda_1",
24
+ "lapequeteria.easycommercetech.com": "tanda_1",
25
+ "farmasun.easycommercetech.com": "tanda_1",
26
+ "almacendelmolino.com.ar": "tanda_1",
27
+ "womanbypromesse.com.ar": "tanda_1",
28
+ "womanbypromesse.easycommercetech.com": "tanda_1",
29
+ "promessemayorista.com.ar": "tanda_1",
30
+ "promessemayorista.easycommercetech.com": "tanda_1",
31
+ "outmall.easycommercetech.com": "tanda_1",
32
+ "opositoresinvencibles.easycommercetech.tienda": "tanda_1",
33
+ "outmall.com.ar": "tanda_1",
34
+ "profesionales.myc-homelinens.com": "tanda_1",
35
+ "opositoresinvencibles.com": "tanda_1",
36
+ "seler.easycommercetech.tienda": "tanda_1",
37
+ "myc-homelinens.com": "tanda_1",
38
+ "converse.easycommercetech.com": "tanda_1",
39
+ "vinals.es": "tanda_1",
40
+ "id.easycommercetech.com": "tanda_1",
41
+ "guolis.com.ar": "tanda_1",
42
+ "b2b.vidal-vidal.com": "tanda_1",
43
+ "lasoreiro.easycommercetech.com": "tanda_1",
44
+ "lapequeteria.com": "tanda_1",
45
+ "eldenv2.easycommercetech.com": "tanda_1",
46
+ "vidalvidal.easycommercetech.tienda": "tanda_1",
47
+ "estacioncentral.easycommercetech.com": "tanda_1",
48
+ "www.estacioncentral.com.ar": "tanda_1",
49
+ "cuidex.easycommercetech.com": "tanda_1",
50
+ "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
+ "bonjourlulu.easycommercetech.com": "tanda_1",
55
+ "chispa.com.py": "tanda_1",
56
+ "deporcenter.easycommercetech.com": "tanda_1",
57
+ "backend.tienda.dos-hermanos.com": "tanda_1",
58
+ "easycommercetech.com": "tanda_1",
59
+ "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
+ "subzero.easycommercetech.com": "tanda_1",
67
+ "smegv2.easycommercetech.com": "tanda_1",
68
+ "equipajes.easycommercetech.com": "tanda_1",
69
+ "delseychile.easycommercetech.com": "tanda_1",
70
+ "delseyargentina.easycommercetech.com": "tanda_1",
71
+ "equipajeurbano.easycommercetech.com": "tanda_1",
72
+ "gezatek.easycommercetech.com": "tanda_1",
73
+ "www.guolis.com.ar": "tanda_1",
74
+ "ibashop.com.ar": "tanda_1",
75
+ "iba.easycommercetech.com": "tanda_1",
76
+ "b2b.idargentina.com": "tanda_1",
77
+ "backend.lapequeteria.com": "tanda_1",
78
+ "maxifarma.com.py": "tanda_1",
79
+ "rheem.easycommercetech.com": "tanda_1",
80
+ "saiar.easycommercetech.com": "tanda_1",
81
+ "servicompras.easycommercetech.com": "tanda_1",
82
+ "thecouples.com.ar": "tanda_1",
83
+ "thecouples.easycommercetech.com": "tanda_1",
84
+ "iberspa.easycommercetech.tienda": "tanda_1"
85
+ }