ng-easycommerce 0.0.446 → 0.0.449

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 (30) hide show
  1. package/README.md +11 -0
  2. package/bundles/ng-easycommerce.umd.js +152 -14
  3. package/bundles/ng-easycommerce.umd.js.map +1 -1
  4. package/bundles/ng-easycommerce.umd.min.js +1 -1
  5. package/bundles/ng-easycommerce.umd.min.js.map +1 -1
  6. package/esm2015/lib/core.consts.js +8 -3
  7. package/esm2015/lib/ec-component/account-ec/orders-list-ec/orders-list-ec.component.js +99 -3
  8. package/esm2015/lib/ec-component/build-your-ec/build-your-ec.component.js +36 -5
  9. package/esm2015/lib/ec-component/checkout-ec/step-ec/step-ec.component.js +3 -3
  10. package/esm2015/lib/ec-component/header-ec/header-ec.component.js +3 -3
  11. package/esm2015/lib/ec-component/section-container-ec/section-container-ec.component.js +3 -3
  12. package/esm2015/lib/interfaces/filterStep.js +1 -1
  13. package/esm5/lib/core.consts.js +8 -3
  14. package/esm5/lib/ec-component/account-ec/orders-list-ec/orders-list-ec.component.js +99 -3
  15. package/esm5/lib/ec-component/build-your-ec/build-your-ec.component.js +38 -5
  16. package/esm5/lib/ec-component/checkout-ec/step-ec/step-ec.component.js +3 -3
  17. package/esm5/lib/ec-component/header-ec/header-ec.component.js +7 -3
  18. package/esm5/lib/ec-component/section-container-ec/section-container-ec.component.js +3 -3
  19. package/esm5/lib/interfaces/filterStep.js +1 -1
  20. package/fesm2015/ng-easycommerce.js +146 -14
  21. package/fesm2015/ng-easycommerce.js.map +1 -1
  22. package/fesm5/ng-easycommerce.js +152 -14
  23. package/fesm5/ng-easycommerce.js.map +1 -1
  24. package/lib/core.consts.d.ts +6 -1
  25. package/lib/ec-component/account-ec/orders-list-ec/orders-list-ec.component.d.ts +38 -0
  26. package/lib/ec-component/build-your-ec/build-your-ec.component.d.ts +12 -0
  27. package/lib/ec-component/header-ec/header-ec.component.d.ts +1 -1
  28. package/lib/interfaces/filterStep.d.ts +7 -0
  29. package/ng-easycommerce.metadata.json +1 -1
  30. package/package.json +1 -1
package/README.md CHANGED
@@ -1,3 +1,14 @@
1
+ # version 0.0.449
2
+ - Se quitan los decimales para la moneda de Suecia (SEK)
3
+
4
+ # version 0.0.448
5
+ - Se agrega la funcionalidad para poder ordenar por columnas las ordenes de los clientes.
6
+ - Se modifica la funcion setSearchValue de header-ec para que acepte una funcion que se ejecuta al presionar enter.
7
+ - Se arregla el problema de estilos en los botones del checkout.
8
+
9
+ # version 0.0.447
10
+ - Se actualiza el componente de build-your-ec para que trabaje con la toma de los filtros de atributos.
11
+
1
12
  # version 0.0.446
2
13
  - Se agrega la opcion de aplicar filtros por defectos al ingresar a la seccion de Collection.
3
14
 
@@ -254,7 +254,12 @@
254
254
  * Execute the function passed as params, if the frontend is in production mode
255
255
  */
256
256
  this.onlyIfProduction = function (next, params) { return _this.isProduction() && next(params); };
257
- this.mediaUrl = function () { return _this.urlAssets + (_this.urlAssets == _this.urlBase ? 'media/' : '') + "image/"; };
257
+ /**
258
+ * @description Devuelve la url base donde se alojan los archivos multimedia
259
+ * @param postMedia carpeta donde se guardan los archivos
260
+ * @returns
261
+ */
262
+ this.mediaUrl = function (postMedia) { return _this.urlAssets + (_this.urlAssets == _this.urlBase ? 'media/' : '') + (postMedia ? postMedia : "image/"); };
258
263
  this.mediaBannerUrl = function () { return _this.urlAssets + (_this.urlAssets == _this.urlBase ? 'media/' : '') + "banner-image/"; };
259
264
  this.mediaStoreUrl = function () { return _this.urlAssets + (_this.urlAssets == _this.urlBase ? 'media/' : '') + "store-image/"; };
260
265
  this.getProductsListRoute = function () { return 'collection/'; };
@@ -414,7 +419,7 @@
414
419
  code: 'SEK',
415
420
  symbol: 'SEK',
416
421
  position: 'R',
417
- withoutDecimals: false
422
+ withoutDecimals: true
418
423
  }
419
424
  ];
420
425
  _this.currency = currencyTypeCofig.find(function (ct) { return ct.code == currencyTypeFind.toUpperCase(); }) || _this.currency;
@@ -8241,8 +8246,12 @@
8241
8246
  _this.authService.logout();
8242
8247
  _this.router.navigateByUrl('home');
8243
8248
  };
8244
- _this.setSearchValue = function (event) {
8245
- event.key == 'Enter' && _this.getCollectionSearch();
8249
+ _this.setSearchValue = function (event, afterSearch) {
8250
+ var args = [];
8251
+ for (var _i = 2; _i < arguments.length; _i++) {
8252
+ args[_i - 2] = arguments[_i];
8253
+ }
8254
+ event.key == 'Enter' && _this.getCollectionSearch() && (afterSearch ? afterSearch(args) : null);
8246
8255
  _this.searchValue = event.target.value;
8247
8256
  };
8248
8257
  _this.getCollectionSearch = function () { return _this.router.navigateByUrl('/collection?search=' + _this.searchValue); };
@@ -9283,14 +9292,14 @@
9283
9292
  if (this.name) {
9284
9293
  this.getSection(this.name);
9285
9294
  this.getDataSection(this.name);
9286
- console.log('con parametro');
9295
+ //console.log('con parametro')
9287
9296
  }
9288
9297
  else {
9289
9298
  this.activatedRoute.params.subscribe(function (params) {
9290
9299
  _this.name = params.name;
9291
9300
  _this.getSection(_this.name);
9292
9301
  _this.getDataSection(_this.name);
9293
- console.log('sin parametro', _this.name);
9302
+ //console.log('sin parametro', this.name)
9294
9303
  });
9295
9304
  }
9296
9305
  this.ecOnInit();
@@ -10739,6 +10748,21 @@
10739
10748
  _this.router = router;
10740
10749
  _this.consts = consts;
10741
10750
  _this.loading = true;
10751
+ /**
10752
+ * @description name -> nombre de clave de valuesToSort; asc -> true: ascendente, false: descendente
10753
+ */
10754
+ _this.currentSort = { name: '', asc: true };
10755
+ /**
10756
+ * @description true -> ordena de forma ascendente | false -> ordena de forma decreciente
10757
+ */
10758
+ _this.valuesToSort = {
10759
+ number: { asc: true, attribute: 'number' },
10760
+ paymentState: { asc: true, attribute: 'state' },
10761
+ method: { asc: true, attribute: 'method', subAttribute: 'name' },
10762
+ methodState: { asc: true, attribute: 'state' },
10763
+ date: { asc: true, attribute: 'checkoutCompletedAt' },
10764
+ total: { asc: true, attribute: 'total' }
10765
+ };
10742
10766
  _this.sortedByNewest = function (orders) { return orders && orders.length && orders.sort(function (anOrder, otherOrder) { return anOrder.number > otherOrder.number ? -1 : 1; }); };
10743
10767
  _this.goToOrder = function (order) {
10744
10768
  _this.ordersService.setSelectedOrder(order);
@@ -10765,6 +10789,87 @@
10765
10789
  }
10766
10790
  }
10767
10791
  };
10792
+ /**
10793
+ * @description Ordena la lista de ordenes
10794
+ * @param value recibe una valor que debe coincidir con las claves de la variable valuesToSort
10795
+ */
10796
+ _this.sortOrders = function (value) {
10797
+ _this.sortValue = value;
10798
+ _this.setCurrentSort(_this.sortValue, _this.valuesToSort[_this.sortValue].asc);
10799
+ var comparator = (_this.valuesToSort[_this.sortValue].asc)
10800
+ ? [-1, 1]
10801
+ : [1, -1];
10802
+ _this.valuesToSort[_this.sortValue].asc = !_this.valuesToSort[_this.sortValue].asc;
10803
+ var typeValue;
10804
+ if (_this.orders.length > 0) {
10805
+ typeValue = typeof (_this.orders[0]);
10806
+ }
10807
+ var sortFunction = _this.getSortFunction(_this.sortValue);
10808
+ _this.orders =
10809
+ _this.sortValue
10810
+ ? _this.orders.sort(function (aOrders, otherOrders) { return sortFunction(aOrders, otherOrders, _this.valuesToSort[_this.sortValue], comparator); })
10811
+ : _this.orders;
10812
+ };
10813
+ /**
10814
+ * @description retorna la funcion que se debe utilizar para el sort del arreglo
10815
+ * @param value parametro que indica el tipo de funcion que debe retornar
10816
+ * @returns funcion para utilizar en la busqueda
10817
+ */
10818
+ _this.getSortFunction = function (value) {
10819
+ switch (value) {
10820
+ case 'paymentState':
10821
+ return _this.sortPaymentState;
10822
+ case 'method':
10823
+ return _this.sortShipments;
10824
+ case 'methodState':
10825
+ return _this.sortShipments;
10826
+ case 'total':
10827
+ return _this.sortNumber;
10828
+ default:
10829
+ return _this.sortText;
10830
+ }
10831
+ };
10832
+ /* Funciones para ordernar */
10833
+ _this.sortPaymentState = function (aOrders, otherOrders, data, comparator) {
10834
+ return (aOrders.payments[0][data.attribute] == otherOrders.payments[0][data.attribute])
10835
+ ? _this.tieBreaker(aOrders, otherOrders, comparator)
10836
+ : String(aOrders.payments[0][data.attribute]).toLowerCase() < String(otherOrders.payments[0][data.attribute]).toLowerCase() ? comparator[0] : comparator[1];
10837
+ };
10838
+ _this.sortShipments = function (aOrders, otherOrders, data, comparator) {
10839
+ if (data.subAttribute) {
10840
+ return (aOrders.shipments[0][data.attribute][data.subAttribute] == otherOrders.shipments[0][data.attribute][data.subAttribute])
10841
+ ? _this.tieBreaker(aOrders, otherOrders, comparator)
10842
+ : String(aOrders.shipments[0][data.attribute][data.subAttribute]).toLowerCase() < String(otherOrders.shipments[0][data.attribute][data.subAttribute]).toLowerCase() ? comparator[0] : comparator[1];
10843
+ }
10844
+ else {
10845
+ return (aOrders.shipments[0][data.attribute] == otherOrders.shipments[0][data.attribute])
10846
+ ? _this.tieBreaker(aOrders, otherOrders, comparator)
10847
+ : String(aOrders.shipments[0][data.attribute]).toLowerCase() < String(otherOrders.shipments[0][data.attribute]).toLowerCase() ? comparator[0] : comparator[1];
10848
+ }
10849
+ };
10850
+ _this.sortNumber = function (aOrders, otherOrders, data, comparator) { return aOrders[data.attribute] < otherOrders[data.attribute] ? comparator[0] : comparator[1]; };
10851
+ _this.sortText = function (aOrders, otherOrders, data, comparator) {
10852
+ return (aOrders[data.attribute] == otherOrders[data.attribute])
10853
+ ? aOrders.number.toLowerCase() < otherOrders.number.toLowerCase() ? comparator[0] : comparator[1]
10854
+ : String(aOrders[data.attribute]).toLowerCase() < String(otherOrders[data.attribute]).toLowerCase() ? comparator[0] : comparator[1];
10855
+ };
10856
+ /**
10857
+ * @description funcion utilizada para desempate.
10858
+ * @param aOrders
10859
+ * @param otherOrders
10860
+ * @param comparator
10861
+ * @returns
10862
+ */
10863
+ _this.tieBreaker = function (aOrders, otherOrders, comparator) { return aOrders.number.toLowerCase() < otherOrders.number.toLowerCase() ? comparator[0] : comparator[1]; };
10864
+ /**
10865
+ * @description cambia los valores de la variable currentSort
10866
+ * @param name
10867
+ * @param asc
10868
+ */
10869
+ _this.setCurrentSort = function (name, asc) {
10870
+ _this.currentSort.name = name;
10871
+ _this.currentSort.asc = asc;
10872
+ };
10768
10873
  _this.mediaUrl = _this.consts.mediaUrl();
10769
10874
  _this.ecOnConstruct();
10770
10875
  return _this;
@@ -10790,8 +10895,8 @@
10790
10895
  OrdersEcComponent = __decorate$1g([
10791
10896
  core.Component({
10792
10897
  selector: 'app-orders-ec',
10793
- template: "<div class=\"container-fluid\" id=\"ordersEcComponent\">\n <section id=\"orders\" class=\"w-100\" *ngIf=\"!loading; else loadingView\">\n <div *ngIf=\"orders && orders.length; else noOrders\">\n <div class=\"row item border-bottom\" *ngFor=\"let order of orders\">\n <div class=\"col-lg-2 col-12\">\n <p class=\"st dropdown-toggle\">{{ 'order' | translate }}:</p>\n <h5 class=\"fw-bold\">\n {{ order.number }}\n </h5>\n <ng-container *ngIf=\"order.items[0].product.variants[0]?.images?.length ; else defaultpicture\">\n <img class=\"smc maxwidth\" [src]=\"mediaUrl + order.items[0].product.variants[0].images[0]\" alt=\"\">\n </ng-container>\n <ng-template #defaultpicture>\n <img *ngIf=\"order.items[0].product.picturesdefault\" class=\"smc maxwidth\"\n [src]=\"mediaUrl + order.items[0].product.picturesdefault[0]\" alt=\"\">\n </ng-template>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p class=\"st dropdown-toggle\">{{ 'payment-state' | translate }}:</p>\n <p class=\"price\">\n {{ order.payments[0].state | translate | titlecase }}\n </p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p class=\"st dropdown-toggle\">{{ 'shipment-method' | translate }}:</p>\n <p class=\"price\">\n {{ order.shipments[0].method.name }}\n </p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p class=\"st dropdown-toggle\">{{ 'shipment-state' | translate }}:</p>\n <p class=\"price\">\n {{ order.shipments[0].state | translate | titlecase }}\n </p>\n <!-- ACA DEBERIA IR EL LINK DE SEGUIMIENTO -->\n <!-- <button class=\"btn btn-outline-dark btnLogout px-3 py-1 font-size-10 w-auto btn-sm\">Ver seguimiento</button> -->\n </div>\n <div class=\"col-lg-2 col-12\">\n <p class=\"st dropdown-toggle\">{{ 'date' | translate }}:</p>\n <p class=\"price\">\n {{ toDate(order.checkoutCompletedAt, 'DD/MM/YYYY') | translate }}<br>\n {{ toDate(order.checkoutCompletedAt, 'h:mm:ss a') | translate }}\n </p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p class=\"st dropdown-toggle\">{{ 'total' | translate }}:</p>\n <h5 class=\"fw-bold text-nowrap\">\n {{ (order.totals.total) | ecCurrencySymbol }}\n </h5>\n <button class=\"btn px-0 w-100 btdetalle\" (click)=\"goToOrder(order)\">{{\n 'see-order' | translate }}</button>\n </div>\n </div>\n </div>\n </section>\n</div>\n\n<ng-template #noOrders>\n <div class=\"w-100 h-50\">\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\n <h5>{{ 'no-orders' | translate }}</h5>\n </div>\n </div>\n</ng-template>\n\n<ng-template #errorView>\n <div class=\"w-100 h-50\">\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\n <h4>{{ 'orders-error' | translate }}</h4>\n </div>\n </div>\n</ng-template>\n\n<ng-template #loadingView>\n <div class=\"w-100 h-50 py-5\">\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\n <app-loading-full-ec></app-loading-full-ec>\n </div>\n </div>\n</ng-template>",
10794
- styles: ["#ordersEcComponent .btn.btdetalle{background-color:#000;color:#fff;border-color:#000;border-width:1px;border-radius:10px;padding:10px 0}#ordersEcComponent .btn.btdetalle:hover{background-color:#fff;color:#000;border-color:#000}"]
10898
+ template: "<div class=\"container-fluid\" id=\"ordersEcComponent\">\n <section id=\"orders\" class=\"w-100\" *ngIf=\"!loading; else loadingView\">\n <div *ngIf=\"orders && orders.length; else noOrders\">\n <div class=\"row mb-1 border-bottom\">\n <div class=\"col-lg-2 col-12\">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'number' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('number')\">{{ 'order' | translate }}:</p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'paymentState' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('paymentState')\">{{ 'payment-state' | translate }}:</p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'method' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('method')\">{{ 'shipment-method' | translate }}:</p>\n </div>\n <div class=\"col-lg-2 col-12 \">\n <p\n [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'methodState' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('methodState')\">\n {{ 'shipment-state' | translate }}:</p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'date' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('date')\">{{ 'date' | translate }}:</p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'total' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('total')\">{{ 'total' | translate }}:</p>\n </div>\n </div>\n <div class=\"row item border-bottom\" *ngFor=\"let order of orders\">\n <div class=\"col-lg-2 col-12\">\n <h5 class=\"fw-bold\">\n {{ order.number }}\n </h5>\n <ng-container *ngIf=\"order.items[0].product.variants[0]?.images?.length ; else defaultpicture\">\n <img class=\"smc maxwidth\" [src]=\"mediaUrl + order.items[0].product.variants[0].images[0]\" alt=\"\">\n </ng-container>\n <ng-template #defaultpicture>\n <img *ngIf=\"order.items[0].product.picturesdefault\" class=\"smc maxwidth\"\n [src]=\"mediaUrl + order.items[0].product.picturesdefault[0]\" alt=\"\">\n </ng-template>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p class=\"price\">\n {{ order.payments[0].state | translate | titlecase }}\n </p>\n </div>\n <div class=\"col-lg-2 col-12\">\n \n <p class=\"price\">\n {{ order.shipments[0].method.name }}\n </p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p class=\"price\">\n {{ order.shipments[0].state | translate | titlecase }}\n </p>\n <!-- ACA DEBERIA IR EL LINK DE SEGUIMIENTO -->\n <!-- <button class=\"btn btn-outline-dark btnLogout px-3 py-1 font-size-10 w-auto btn-sm\">Ver seguimiento</button> -->\n <a *ngIf=\"order.tracking\" [href]=\"order.tracking\" class=\"btn btn-outline-dark btnLogout px-3 py-1 font-size-10 w-auto btn-sm\">Ver seguimiento</a>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p class=\"price\">\n {{ toDate(order.checkoutCompletedAt, 'DD/MM/YYYY') | translate }}<br>\n {{ toDate(order.checkoutCompletedAt, 'h:mm:ss a') | translate }}\n </p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <h5 class=\"fw-bold text-nowrap\">\n {{ (order.totals.total) | ecCurrencySymbol }}\n </h5>\n <button class=\"btn px-0 w-100 btdetalle\" (click)=\"goToOrder(order)\">{{\n 'see-order' | translate }}</button>\n </div>\n </div>\n </div>\n </section>\n</div>\n\n<ng-template #noOrders>\n <div class=\"w-100 h-50\">\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\n <h5>{{ 'no-orders' | translate }}</h5>\n </div>\n </div>\n</ng-template>\n\n<ng-template #errorView>\n <div class=\"w-100 h-50\">\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\n <h4>{{ 'orders-error' | translate }}</h4>\n </div>\n </div>\n</ng-template>\n\n<ng-template #loadingView>\n <div class=\"w-100 h-50 py-5\">\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\n <app-loading-full-ec></app-loading-full-ec>\n </div>\n </div>\n</ng-template>",
10899
+ styles: ["#ordersEcComponent .btn.btdetalle{background-color:#000;color:#fff;border-color:#000;border-width:1px;border-radius:10px;padding:10px 0}#ordersEcComponent .btn.btdetalle:hover{background-color:#fff;color:#000;border-color:#000}.asc.dropdown-toggle::after{transform:rotate(180deg)}.applied.dropdown-toggle::after{color:#198754}"]
10795
10900
  })
10796
10901
  ], OrdersEcComponent);
10797
10902
  return OrdersEcComponent;
@@ -14008,12 +14113,44 @@
14008
14113
  * @param item step para obtener los datos.
14009
14114
  */
14010
14115
  _this.itemValuesFactory = function (item) {
14116
+ item.values = _this.getValuesByFilter(item);
14117
+ };
14118
+ /**
14119
+ * @description retorna los valores del filtro segun el tipo.
14120
+ * @param item filtro
14121
+ * @returns retorna un arreglo con las opciones del filtro.
14122
+ */
14123
+ _this.getValuesByFilter = function (item) {
14124
+ switch (item.type) {
14125
+ case 'optionProduct':
14126
+ //parche temporal
14127
+ item.productOption.values.forEach(function (elem) {
14128
+ return elem.image.toLowerCase().includes('product_option_value_translation_image/') ?
14129
+ elem.image = elem.image.split('product_option_value_translation_image/')[1] : null;
14130
+ });
14131
+ return item.productOption.values;
14132
+ case 'attribute':
14133
+ return item.attribute.children;
14134
+ case 'taxon':
14135
+ //this.optionsService.categories.subscribe(res => item.values = res)
14136
+ //this.productsService.getProductsForFilter({ latest: true, limit: 10 }, ['category'], '999');
14137
+ break;
14138
+ default:
14139
+ break;
14140
+ }
14141
+ };
14142
+ /**
14143
+ * @description cambia el contenido de los valores de los filtros, segun el tipo de filtro.
14144
+ * @param item filtro
14145
+ * @param values arreglo con los valores de las opciones
14146
+ */
14147
+ _this.setValuesByFilter = function (item, values) {
14011
14148
  switch (item.type) {
14012
14149
  case 'optionProduct':
14013
- item.values = item.productOption.values;
14150
+ item.productOption.values = values;
14014
14151
  break;
14015
14152
  case 'attribute':
14016
- _this.optionsService.attributes.subscribe(function (res) { return item.values = res; });
14153
+ item.attribute.children = values;
14017
14154
  break;
14018
14155
  case 'taxon':
14019
14156
  //this.optionsService.categories.subscribe(res => item.values = res)
@@ -14100,7 +14237,7 @@
14100
14237
  }
14101
14238
  else {
14102
14239
  _this.stepList[_this.currentPosition].current = true;
14103
- _this.stepList[_this.currentPosition].productOption.values = _this.currentStep.productOption.values;
14240
+ _this.setValuesByFilter(_this.stepList[_this.currentPosition], _this.getValuesByFilter(_this.currentStep));
14104
14241
  _this.itemValuesFactory(_this.stepList[_this.currentPosition]);
14105
14242
  _this.itemCurrentSelected = '';
14106
14243
  }
@@ -14111,6 +14248,7 @@
14111
14248
  */
14112
14249
  _this.prev = function (index) {
14113
14250
  if (index === void 0) { index = -1; }
14251
+ _this.noMoreCoincidences = false;
14114
14252
  _this.stepList[_this.currentPosition].current = false;
14115
14253
  _this.stepList[_this.currentPosition].touched = false;
14116
14254
  if (index >= 0) {
@@ -14147,7 +14285,7 @@
14147
14285
  * @param item filtro/paso
14148
14286
  * @returns los valores asociados a la opcion elegida
14149
14287
  */
14150
- _this.getAssociatedData = function (code, item) { return item.productOption.values.find(function (elem) { return elem.code == code; }); };
14288
+ _this.getAssociatedData = function (code, item) { return _this.getValuesByFilter(item).find(function (elem) { return elem.code == code; }); };
14151
14289
  /**
14152
14290
  * @description actualiza la lista de pasos.
14153
14291
  * @param list
@@ -14544,8 +14682,8 @@
14544
14682
  StepEcComponent = __decorate$1J([
14545
14683
  core.Component({
14546
14684
  selector: 'app-step-ec',
14547
- template: "<ng-container [ngSwitch]=\"step_id\">\n\n <ng-container *ngSwitchCase=\"1\">\n <app-dataform-ec [step_id]=\"1\">\n </app-dataform-ec>\n <div class=\"checkout-btn-unique text-end\">\n <button *ngIf=\"isStepReady('address')\" class=\"btn valid-btn\"\n (click)=\"nextStep()\"> {{(lastStep ? 'finish-checkout' : 'ready-form')|translate}}</button>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"2\">\n <ng-container *ngIf=\"isStepReady('address')\">\n <app-shipment-ec [step_id]=\"2\">\n </app-shipment-ec>\n <div class=\"checkout-btn-container mt-2\">\n <button class=\"btn valid-btn\" (click)=\"goBack()\">{{'back'|translate}}</button>\n <ng-container *ngIf=\"(checkoutService.order$ | async) as order\">\n <button *ngIf=\"isStepReady('shipment')\" (click)=\"nextStep()\"\n class=\"btn valid-btn float-end\">{{ (lastStep ? 'finish-checkout' : 'ready-form') |translate}}\n </button>\n </ng-container>\n </div>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"3\">\n <ng-container *ngIf=\"isStepReady(previousStep)\">\n <app-payment-ec [step_id]=\"3\">\n </app-payment-ec>\n <div class=\"checkout-btn-container mt-2\">\n <button class=\"btn valid-btn\"\n (click)=\"goBack()\">{{'back'|translate}}</button>\n </div>\n </ng-container>\n </ng-container>\n\n</ng-container>\n",
14548
- styles: [""]
14685
+ template: "<ng-container [ngSwitch]=\"step_id\">\n\n <ng-container *ngSwitchCase=\"1\">\n <app-dataform-ec [step_id]=\"1\">\n </app-dataform-ec>\n <div class=\"checkout-btn-unique text-end\">\n <button *ngIf=\"isStepReady('address')\" class=\"btn valid-btn mt-2\"\n (click)=\"nextStep()\"> {{(lastStep ? 'finish-checkout' : 'ready-form')|translate}}</button>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"2\">\n <ng-container *ngIf=\"isStepReady('address')\">\n <app-shipment-ec [step_id]=\"2\">\n </app-shipment-ec>\n <div class=\"checkout-btn-container mt-2\">\n <button class=\"btn valid-btn\" (click)=\"goBack()\">{{'back'|translate}}</button>\n <ng-container *ngIf=\"(checkoutService.order$ | async) as order\">\n <button *ngIf=\"isStepReady('shipment')\" (click)=\"nextStep()\"\n class=\"btn valid-btn float-end\">{{ (lastStep ? 'finish-checkout' : 'ready-form') |translate}}\n </button>\n </ng-container>\n </div>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"3\">\n <ng-container *ngIf=\"isStepReady(previousStep)\">\n <app-payment-ec [step_id]=\"3\">\n </app-payment-ec>\n <div class=\"checkout-btn-container mt-2\">\n <button class=\"btn valid-btn\"\n (click)=\"goBack()\">{{'back'|translate}}</button>\n </div>\n </ng-container>\n </ng-container>\n\n</ng-container>\n",
14686
+ styles: [".btn:disabled{opacity:.65}.btn.valid-btn{background-color:#000;color:#fff;margin-right:12px}"]
14549
14687
  })
14550
14688
  ], StepEcComponent);
14551
14689
  return StepEcComponent;