ng-easycommerce 0.0.454 → 0.0.455

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,3 +1,8 @@
1
+ # version 0.0.455
2
+ - Se actualiza el componente de bloques para sea mas personalizable , permitiendo la inclusion de bloques cuyo codigo debe coincidir con el método de pago del cual se efectuo la compra.
3
+ - Se arregla un fix con el metodo bank_transfer, ahora se asegura que el metodo incluya el string 'bank_transfer' y que no sea de forma estricta.
4
+ - Se agrega un filtro para los bloques html dando la posibilidad de que bloques mostrar para un seccion determinada.
5
+
1
6
  # version 0.0.454
2
7
  - Se modifico el diseño y las clases css de la pagina de forgot password
3
8
  - Se genera un servicio de filtros para que el componente de filtros pueda ser usado fuera de collection.
@@ -6453,6 +6453,7 @@
6453
6453
  _this.strsection = null;
6454
6454
  _this.show_loading = true;
6455
6455
  _this.getHTMLContent = function (block) { return block.translations[_this.consts.getLocale()].content; };
6456
+ _this.showBlock = function (block) { return _this.blockFilters ? _this.blockFilters.includes(block.code) : true; };
6456
6457
  _this.isNewsletter = function (block) { return block.contactForm.code.includes('news'); };
6457
6458
  _this.ecOnConstruct();
6458
6459
  return _this;
@@ -6482,6 +6483,9 @@
6482
6483
  __decorate$L([
6483
6484
  core.Input()
6484
6485
  ], BlocksEcComponent.prototype, "templates", void 0);
6486
+ __decorate$L([
6487
+ core.Input()
6488
+ ], BlocksEcComponent.prototype, "blockFilters", void 0);
6485
6489
  __decorate$L([
6486
6490
  core.Input()
6487
6491
  ], BlocksEcComponent.prototype, "section", null);
@@ -6491,7 +6495,7 @@
6491
6495
  BlocksEcComponent = __decorate$L([
6492
6496
  core.Component({
6493
6497
  selector: 'app-blocks-ec',
6494
- template: "<div *ngIf=\"blocksService.blocks | async as blocks\">\n <div *ngIf=\"blocks\">\n <div class=\"container-fluid px-0\" *ngIf=\"blocks.length >= 1; else loading\">\n <div class=\"row\">\n\n <ng-container *ngFor=\"let block of blocks\">\n <ng-container [ngSwitch]=\"block.contentType\">\n <!-- Block Banner-->\n <ng-container *ngSwitchCase=\"'banner'\">\n <!--Banner Full-->\n <ng-template #appBlockBannerFullEc let-block=\"block\">\n <app-block-banner-full-ec\n [class]=\"block.styles && block.styles?.items ? ('col-sm-' + block.styles?.items.sm + ' col-md-' + block.styles?.items.md + ' col-lg-' + block.styles?.items.lg) : ' col-12'\"\n [banners]=\"block.banners\" [margin]=\"0\" [meta]=\"block\">\n </app-block-banner-full-ec>\n </ng-template>\n <ng-container *ngIf=\"block.design == 'full'\"\n [ngTemplateOutlet]=\"templates && templates.appBlockBannerFull ? templates.appBlockBannerFull : appBlockBannerFullEc\"\n [ngTemplateOutletContext]=\"{block:block}\">\n </ng-container>\n <!---->\n <!--Banner Box-->\n <ng-template #appBlockBannerBoxesEc let-block=\"block\">\n <app-block-banner-boxes-ec\n [class]=\"block.styles && block.styles?.items ? ('col-sm-' + block.styles?.items.sm + ' col-md-' + block.styles?.items.md + ' col-lg-' + block.styles?.items.lg) : ' col-12'\"\n [banners]=\"block.banners\" [meta]=\"block\">\n </app-block-banner-boxes-ec>\n </ng-template>\n <ng-container *ngIf=\"block.design == 'boxes'\"\n [ngTemplateOutlet]=\"templates && templates.appBlockBannerBoxes? templates.appBlockBannerBoxes : appBlockBannerBoxesEc\"\n [ngTemplateOutletContext]=\"{block:block}\">\n </ng-container>\n <!---->\n </ng-container>\n <!-- End Block Banner -->\n\n <!--Block Html -->\n <ng-template #appBlockHtmlEc let-block=\"block\">\n <app-block-html-ec class=\"col-12\" [html_content]=\"getHTMLContent(block)\">\n </app-block-html-ec>\n </ng-template>\n <ng-container *ngSwitchCase=\"'html'\"\n [ngTemplateOutlet]=\"templates && templates.appBlockHtml ? templates.appBlockHtml : appBlockHtmlEc\"\n [ngTemplateOutletContext]=\"{block:block}\">\n </ng-container>\n <!--End Block Html-->\n\n <!--Block Products-->\n <ng-template #appBlockProductsEc let-block=\"block\">\n <app-block-products-ec\n [class]=\"block.styles && block.styles?.items ? ('col-sm-' + block.styles?.items.sm + ' col-md-' + block.styles?.items.md + ' col-lg-' + block.styles?.items.lg) : ' col-12'\"\n [products]=\"block.products.items\" [meta]=\"block\" [appProduct]=\"appProduct\">\n </app-block-products-ec>\n </ng-template>\n\n <ng-container *ngSwitchCase=\"'products'\"\n [ngTemplateOutlet]=\"templates && templates.appBlockProducts ? templates.appBlockProducts : appBlockProductsEc\"\n [ngTemplateOutletContext]=\"{block:block}\"></ng-container>\n <!--End Blocks Products-->\n\n <!-- Contact Form/Newsletter -->\n <ng-container *ngSwitchCase=\"'contact_form'\">\n <!--Newsletter-->\n <ng-container *ngIf=\"isNewsletter(block); else completeForm\">\n <ng-template #appContactFormNewsEc let-block=\"block\">\n <app-contact-form-news-ec [block]=\"block.contactForm\">\n </app-contact-form-news-ec>\n </ng-template>\n <ng-container\n [ngTemplateOutlet]=\"templates && templates.appContactFormNews ? templates.appContactFormNews : appContactFormNewsEc\"\n [ngTemplateOutletContext]=\"{block:block}\"></ng-container>\n </ng-container>\n <!---->\n <!--Contact Form-->\n <ng-template #completeForm>\n <ng-template #appBlockFormContactEc let-block=\"block\">\n <app-block-form-contact-ec [block]=\"block.contactForm\"></app-block-form-contact-ec>\n </ng-template>\n <ng-container\n [ngTemplateOutlet]=\"templates && templates.appBlockFormContact ? templates.appBlockFormContact : appBlockFormContactEc\"\n [ngTemplateOutletContext]=\"{block:block}\"></ng-container>\n </ng-template>\n <!---->\n </ng-container>\n <!-- End Contact Form/Newsletter-->\n </ng-container>\n </ng-container>\n </div>\n </div>\n <ng-template #loading>\n <div *ngIf=\"show_loading\">\n <div class=\"loading-container\">\n <app-loading-full-ec [hole_height]=\"true\"></app-loading-full-ec>\n </div>\n </div>\n </ng-template>\n </div>\n</div>",
6498
+ template: "<div *ngIf=\"blocksService.blocks | async as blocks\">\n <div *ngIf=\"blocks\">\n <div class=\"container-fluid px-0\" *ngIf=\"blocks.length >= 1; else loading\">\n <div class=\"row\">\n\n <ng-container *ngFor=\"let block of blocks\">\n <ng-container [ngSwitch]=\"block.contentType\">\n <!-- Block Banner-->\n <ng-container *ngSwitchCase=\"'banner'\">\n <!--Banner Full-->\n <ng-template #appBlockBannerFullEc let-block=\"block\">\n <app-block-banner-full-ec\n [class]=\"block.styles && block.styles?.items ? ('col-sm-' + block.styles?.items.sm + ' col-md-' + block.styles?.items.md + ' col-lg-' + block.styles?.items.lg) : ' col-12'\"\n [banners]=\"block.banners\" [margin]=\"0\" [meta]=\"block\">\n </app-block-banner-full-ec>\n </ng-template>\n <ng-container *ngIf=\"block.design == 'full'\"\n [ngTemplateOutlet]=\"templates && templates.appBlockBannerFull ? templates.appBlockBannerFull : appBlockBannerFullEc\"\n [ngTemplateOutletContext]=\"{block:block}\">\n </ng-container>\n <!---->\n <!--Banner Box-->\n <ng-template #appBlockBannerBoxesEc let-block=\"block\">\n <app-block-banner-boxes-ec\n [class]=\"block.styles && block.styles?.items ? ('col-sm-' + block.styles?.items.sm + ' col-md-' + block.styles?.items.md + ' col-lg-' + block.styles?.items.lg) : ' col-12'\"\n [banners]=\"block.banners\" [meta]=\"block\">\n </app-block-banner-boxes-ec>\n </ng-template>\n <ng-container *ngIf=\"block.design == 'boxes'\"\n [ngTemplateOutlet]=\"templates && templates.appBlockBannerBoxes? templates.appBlockBannerBoxes : appBlockBannerBoxesEc\"\n [ngTemplateOutletContext]=\"{block:block}\">\n </ng-container>\n <!---->\n </ng-container>\n <!-- End Block Banner -->\n\n <!--Block Html -->\n <ng-template #appBlockHtmlEc let-block=\"block\">\n <app-block-html-ec class=\"col-12\" [html_content]=\"getHTMLContent(block)\">\n </app-block-html-ec>\n </ng-template>\n <ng-container *ngSwitchCase=\"'html'\">\n <ng-container *ngIf=\"showBlock(block)\"\n [ngTemplateOutlet]=\"templates && templates.appBlockHtml ? templates.appBlockHtml : appBlockHtmlEc\"\n [ngTemplateOutletContext]=\"{block:block}\">\n </ng-container>\n </ng-container>\n <!--End Block Html-->\n\n <!--Block Products-->\n <ng-template #appBlockProductsEc let-block=\"block\">\n <app-block-products-ec\n [class]=\"block.styles && block.styles?.items ? ('col-sm-' + block.styles?.items.sm + ' col-md-' + block.styles?.items.md + ' col-lg-' + block.styles?.items.lg) : ' col-12'\"\n [products]=\"block.products.items\" [meta]=\"block\" [appProduct]=\"appProduct\">\n </app-block-products-ec>\n </ng-template>\n\n <ng-container *ngSwitchCase=\"'products'\"\n [ngTemplateOutlet]=\"templates && templates.appBlockProducts ? templates.appBlockProducts : appBlockProductsEc\"\n [ngTemplateOutletContext]=\"{block:block}\"></ng-container>\n <!--End Blocks Products-->\n\n <!-- Contact Form/Newsletter -->\n <ng-container *ngSwitchCase=\"'contact_form'\">\n <!--Newsletter-->\n <ng-container *ngIf=\"isNewsletter(block); else completeForm\">\n <ng-template #appContactFormNewsEc let-block=\"block\">\n <app-contact-form-news-ec [block]=\"block.contactForm\">\n </app-contact-form-news-ec>\n </ng-template>\n <ng-container\n [ngTemplateOutlet]=\"templates && templates.appContactFormNews ? templates.appContactFormNews : appContactFormNewsEc\"\n [ngTemplateOutletContext]=\"{block:block}\"></ng-container>\n </ng-container>\n <!---->\n <!--Contact Form-->\n <ng-template #completeForm>\n <ng-template #appBlockFormContactEc let-block=\"block\">\n <app-block-form-contact-ec [block]=\"block.contactForm\"></app-block-form-contact-ec>\n </ng-template>\n <ng-container\n [ngTemplateOutlet]=\"templates && templates.appBlockFormContact ? templates.appBlockFormContact : appBlockFormContactEc\"\n [ngTemplateOutletContext]=\"{block:block}\"></ng-container>\n </ng-template>\n <!---->\n </ng-container>\n <!-- End Contact Form/Newsletter-->\n </ng-container>\n </ng-container>\n </div>\n </div>\n <ng-template #loading>\n <div *ngIf=\"show_loading\">\n <div class=\"loading-container\">\n <app-loading-full-ec [hole_height]=\"true\"></app-loading-full-ec>\n </div>\n </div>\n </ng-template>\n </div>\n</div>",
6495
6499
  providers: [BlocksService],
6496
6500
  styles: [".item{position:relative}.item-title{top:30%}.item-title-full{top:50%}.item-subtitle-full{top:60%}.item-subtitle{top:40%}.item-button{top:60%}.item-button.item-position-vertical-center{left:50%;transform:translate(-50%)}.item-button.item-position-vertical-left{left:10%}.item-button.item-position-vertical-right{right:5%;transform:translate(-50%)}.item-button-full{top:70%}.item-button-full.item-position-vertical-center{left:50%;transform:translate(-50%)}.item-button-full.item-position-vertical-left{left:10%}.item-button-full.item-position-vertical-right{right:5%;transform:translate(-50%)}.item-position-vertical-left{text-align:left}.item-position-vertical-center{text-align:center}.item-position-vertical-right{text-align:right}h2.item-title-full::after{content:none}"]
6497
6501
  })
@@ -7310,6 +7314,7 @@
7310
7314
  _this.isBancard = function (code) { return code && code.toLocaleLowerCase().includes('bancard'); };
7311
7315
  _this.isDecidir = function (code) { return code && code.toLocaleLowerCase().includes('decidir'); };
7312
7316
  _this.isCulqi = function (code) { return code && code.toLocaleLowerCase().includes('culqi'); };
7317
+ _this.isBankTransfer = function (code) { return code && code.toLocaleLowerCase().includes('bank_transfer'); };
7313
7318
  _this.getPKCulqi = function (method) {
7314
7319
  return window.location.href.includes('easycommercetech')
7315
7320
  ? method.config.public_testing_key
@@ -7360,7 +7365,7 @@
7360
7365
  PaymentEcComponent = __decorate$Q([
7361
7366
  core.Component({
7362
7367
  selector: 'app-payment-ec',
7363
- template: "<div class=\"container-fluid\" *ngIf=\"(paymentService.methods$ | async) as methods\">\n\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"card \">\n <div class=\"card-header text-dark text-center\">\n <h4>{{ 'select-method' | translate }}</h4>\n <div class=\"btn-toolbar justify-content-center\" role=\"toolbar\" aria-label=\"Envios toolbar\">\n <div class=\"\" role=\"group\" aria-label=\"Grupo botones envio\">\n <div class=\"d-flex align-content-start justify-content-center flex-wrap\">\n <button type=\"button\" class=\"btn btn-outline-secondary mx-1 mb-1\"\n *ngFor=\"let method of methods; let x = index\"\n (click)=\"setMethod(method) ; setActive($event)\">\n {{ method.name | translate }}\n </button>\n </div>\n </div>\n </div>\n </div>\n <div class=\"card-body text-center\">\n <div class=\"row justify-content-center\" *ngIf=\"(method_data$ | async) as method\">\n <ng-container *ngIf=\"!loading_internal ; else loading\">\n <div class=\"method-container text-dark\" *ngIf=\"isMP(method.code)\">\n <p id=\"faqs\" class=\"qt px-5 \">{{ method.description }}</p>\n <p class=\"px-5\">{{ method.instructions }}</p>\n <app-mp-redirect-ec (ready)=\"verifyValidate($event)\" [method]=\"method\" [paymentServiceInst]=\"paymentService\" [allData]=\"allData()\"></app-mp-redirect-ec>\n </div>\n <div class=\"method-container text-dark text-left\" *ngIf=\"isMPTarjetaDeCredito(method.code)\">\n <div class=\"row\">\n <div class=\"col-12\">\n <p id=\"faqs\" class=\"qt px-5 \">{{ method.description }}</p>\n <p class=\"px-5\">{{ method.instructions }}</p>\n <div app-mp-credit-ec (ready)=\"verifyValidate()\" [public_key]=\"getPK(method)\"\n [user_data]=\"allData()\" [total_amount]=\"total_amount\">\n </div>\n </div>\n </div>\n </div>\n <div class=\"method-container text-dark text-start\"\n *ngIf=\"isRedirectRedsys(method.code)\">\n <div class=\"row\">\n <div class=\"col-12\">\n <ng-container *ngIf=\"!method.code.includes('bizum') && !method.code.includes('_out_')\">\n <app-redsys-redirect-ec (ready)=\"verifyValidate($event)\" [method]=\"method\" [user_data]=\"allData()\">\n </app-redsys-redirect-ec>\n </ng-container>\n <ng-container *ngIf=\"method.code.includes('bizum') || method.code.includes('_out_')\">\n <app-redsys-redirect-out-ec (ready)=\"verifyValidate($event)\" [method]=\"method\" [user_data]=\"allData()\">\n </app-redsys-redirect-out-ec>\n </ng-container>\n </div>\n </div>\n </div>\n <div class=\"method-container text-dark text-start\" *ngIf=\"isRedirectCecaBank(method.code)\">\n <div class=\"row\">\n <div class=\"col-12\">\n <app-ceca-redirect-ec (ready)=\"verifyValidate($event)\" [method]=\"method\" [user_data]=\"allData()\">\n </app-ceca-redirect-ec>\n </div>\n </div>\n </div>\n <div class=\"method-container text-dark text-start\" *ngIf=\"isPeyPalExpress(method.code)\">\n <div class=\"container\">\n <div class=\"row justify-content-center\">\n <div class=\"col-12\">\n <app-paypal-express-ec (ready)=\"verifyValidate($event)\" [method]=\"method\" [user_data]=\"allData()\"\n [total_amount]=\"total_amount\">\n </app-paypal-express-ec>\n </div>\n </div>\n </div>\n </div>\n <div class=\"method-container text-dark text-start\" *ngIf=\"isMobbex(method.code)\">\n <div class=\"container\">\n <div class=\"row justify-content-center\">\n <div class=\"col-12\">\n <app-mobbex-ec (ready)=\"verifyValidate($event)\" [method]=\"method\" [user_data]=\"allData()\" [paymentServiceInst]=\"paymentService\"\n [total_amount]=\"total_amount\">\n </app-mobbex-ec>\n </div>\n </div>\n </div>\n </div>\n <div class=\"method-container text-dark text-start\" *ngIf=\"isBancard(method.code)\">\n <div class=\"container\">\n <div class=\"row justify-content-center\">\n <div class=\"col-12\">\n <app-bancard-ec (ready)=\"verifyValidate($event)\" [method]=\"method\" [user_data]=\"allData()\"\n [paymentServiceInst]=\"paymentService\" [total_amount]=\"total_amount\">\n </app-bancard-ec>\n </div>\n </div>\n </div>\n </div>\n <div class=\"method-container text-dark text-start\" *ngIf=\"isDecidir(method.code)\">\n <div class=\"container\">\n <div class=\"row justify-content-center\">\n <div class=\"col-12\">\n <app-decidir-ec (ready)=\"verifyValidate($event)\" [method]=\"method\" [user_data]=\"allData()\" [paymentServiceInst]=\"paymentService\"\n [total_amount]=\"total_amount\">\n </app-decidir-ec>\n </div>\n </div>\n </div>\n </div>\n <div class=\"method-container text-dark\" *ngIf=\"isMethodOffline(method.code)\">\n <p id=\"faqs\" class=\"qt px-5\">{{ method.description }}</p>\n <p class=\"px-5\">{{ method.instructions }}</p>\n <div class=\"end-button\">\n <button class=\"btn comprar\" (click)=\"setLoading() && verifyValidate()\">{{ ('pay-with-offline'| translate) }}</button>\n </div>\n <ng-container *ngIf=\"(loading$ | async) as load\">\n <div class=\"mt-2\" *ngIf=\"load\">\n <app-loading-inline-ec></app-loading-inline-ec>\n </div>\n </ng-container>\n </div>\n <div class=\"method-container text-dark text-start\" *ngIf=\"isCulqi(method.code)\">\n <div class=\"container\">\n <div class=\"row justify-content-center\">\n <div class=\"col-12\">\n <!-- <app-mobbex-ec (ready)=\"verifyValidate($event)\" [method]=\"method\" [user_data]=\"allData()\" [paymentServiceInst]=\"paymentService\"\n [total_amount]=\"total_amount\">\n </app-mobbex-ec> -->\n <app-culqi-ec [apiKey]=\"getPKCulqi(method)\" [method]=\"method\" [amount]=\"total_amount\" [customStyle]=\"true\" (ready)=\"verifyValidate()\"></app-culqi-ec>\n </div>\n </div>\n </div>\n </div>\n <div class=\"method-container text-dark\" *ngIf=\"method.code == 'bank_transfer'\">\n <div class=\"row px-0 description-cont\">\n <ng-container *ngFor=\"let line of method.description.split('\\r\\n'); let i=index\">\n <p [id]=\"'faqs-'+i\" [class]=\"'qt px-5 m-0 line-'+i\">{{ line }}</p>\n </ng-container>\n </div>\n <hr *ngIf=\"method.instructions\">\n <div *ngIf=\"method.instructions\" class=\"row px-0 instructions-cont mb-1\">\n <h5 class=\"instructions-title\">{{ ('instructions' | translate) }}</h5>\n <ng-container *ngFor=\"let line of method.instructions.split('\\r\\n'); let i=index\">\n <p [class]=\"'px-5 m-0 instructions-text line-'+i \">{{ line }}</p>\n </ng-container>\n </div>\n \n <div class=\"end-button\">\n <button class=\"btn comprar\" (click)=\"setLoading() && verifyValidate()\">{{\n ('pay-with-transfer'\n | translate) }}</button>\n </div>\n <ng-container *ngIf=\"(loading$ | async) as load\">\n <div class=\"mt-2\" *ngIf=\"load\">\n <app-loading-inline-ec></app-loading-inline-ec>\n </div>\n </ng-container>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n\n<ng-template #mercadoPago>\n <div class=\"row \">\n <div class=\"col-12 text-center\">\n <app-loading-inline-ec *ngIf=\"loading_internal_mp\"></app-loading-inline-ec>\n <form action=\"javascript:void(0)\" #formContainer></form>\n </div>\n </div>\n</ng-template>\n\n<ng-template #loading>\n <app-loading-inline-ec></app-loading-inline-ec>\n</ng-template>",
7368
+ template: "<div class=\"container-fluid\" *ngIf=\"(paymentService.methods$ | async) as methods\">\n\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"card \">\n <div class=\"card-header text-dark text-center\">\n <h4>{{ 'select-method' | translate }}</h4>\n <div class=\"btn-toolbar justify-content-center\" role=\"toolbar\" aria-label=\"Envios toolbar\">\n <div class=\"\" role=\"group\" aria-label=\"Grupo botones envio\">\n <div class=\"d-flex align-content-start justify-content-center flex-wrap\">\n <button type=\"button\" class=\"btn btn-outline-secondary mx-1 mb-1\"\n *ngFor=\"let method of methods; let x = index\"\n (click)=\"setMethod(method) ; setActive($event)\">\n {{ method.name | translate }}\n </button>\n </div>\n </div>\n </div>\n </div>\n <div class=\"card-body text-center\">\n <div class=\"row justify-content-center\" *ngIf=\"(method_data$ | async) as method\">\n <ng-container *ngIf=\"!loading_internal ; else loading\">\n <div class=\"method-container text-dark\" *ngIf=\"isMP(method.code)\">\n <p id=\"faqs\" class=\"qt px-5 \">{{ method.description }}</p>\n <p class=\"px-5\">{{ method.instructions }}</p>\n <app-mp-redirect-ec (ready)=\"verifyValidate($event)\" [method]=\"method\" [paymentServiceInst]=\"paymentService\" [allData]=\"allData()\"></app-mp-redirect-ec>\n </div>\n <div class=\"method-container text-dark text-left\" *ngIf=\"isMPTarjetaDeCredito(method.code)\">\n <div class=\"row\">\n <div class=\"col-12\">\n <p id=\"faqs\" class=\"qt px-5 \">{{ method.description }}</p>\n <p class=\"px-5\">{{ method.instructions }}</p>\n <div app-mp-credit-ec (ready)=\"verifyValidate()\" [public_key]=\"getPK(method)\"\n [user_data]=\"allData()\" [total_amount]=\"total_amount\">\n </div>\n </div>\n </div>\n </div>\n <div class=\"method-container text-dark text-start\"\n *ngIf=\"isRedirectRedsys(method.code)\">\n <div class=\"row\">\n <div class=\"col-12\">\n <ng-container *ngIf=\"!method.code.includes('bizum') && !method.code.includes('_out_')\">\n <app-redsys-redirect-ec (ready)=\"verifyValidate($event)\" [method]=\"method\" [user_data]=\"allData()\">\n </app-redsys-redirect-ec>\n </ng-container>\n <ng-container *ngIf=\"method.code.includes('bizum') || method.code.includes('_out_')\">\n <app-redsys-redirect-out-ec (ready)=\"verifyValidate($event)\" [method]=\"method\" [user_data]=\"allData()\">\n </app-redsys-redirect-out-ec>\n </ng-container>\n </div>\n </div>\n </div>\n <div class=\"method-container text-dark text-start\" *ngIf=\"isRedirectCecaBank(method.code)\">\n <div class=\"row\">\n <div class=\"col-12\">\n <app-ceca-redirect-ec (ready)=\"verifyValidate($event)\" [method]=\"method\" [user_data]=\"allData()\">\n </app-ceca-redirect-ec>\n </div>\n </div>\n </div>\n <div class=\"method-container text-dark text-start\" *ngIf=\"isPeyPalExpress(method.code)\">\n <div class=\"container\">\n <div class=\"row justify-content-center\">\n <div class=\"col-12\">\n <app-paypal-express-ec (ready)=\"verifyValidate($event)\" [method]=\"method\" [user_data]=\"allData()\"\n [total_amount]=\"total_amount\">\n </app-paypal-express-ec>\n </div>\n </div>\n </div>\n </div>\n <div class=\"method-container text-dark text-start\" *ngIf=\"isMobbex(method.code)\">\n <div class=\"container\">\n <div class=\"row justify-content-center\">\n <div class=\"col-12\">\n <app-mobbex-ec (ready)=\"verifyValidate($event)\" [method]=\"method\" [user_data]=\"allData()\" [paymentServiceInst]=\"paymentService\"\n [total_amount]=\"total_amount\">\n </app-mobbex-ec>\n </div>\n </div>\n </div>\n </div>\n <div class=\"method-container text-dark text-start\" *ngIf=\"isBancard(method.code)\">\n <div class=\"container\">\n <div class=\"row justify-content-center\">\n <div class=\"col-12\">\n <app-bancard-ec (ready)=\"verifyValidate($event)\" [method]=\"method\" [user_data]=\"allData()\"\n [paymentServiceInst]=\"paymentService\" [total_amount]=\"total_amount\">\n </app-bancard-ec>\n </div>\n </div>\n </div>\n </div>\n <div class=\"method-container text-dark text-start\" *ngIf=\"isDecidir(method.code)\">\n <div class=\"container\">\n <div class=\"row justify-content-center\">\n <div class=\"col-12\">\n <app-decidir-ec (ready)=\"verifyValidate($event)\" [method]=\"method\" [user_data]=\"allData()\" [paymentServiceInst]=\"paymentService\"\n [total_amount]=\"total_amount\">\n </app-decidir-ec>\n </div>\n </div>\n </div>\n </div>\n <div class=\"method-container text-dark\" *ngIf=\"isMethodOffline(method.code)\">\n <p id=\"faqs\" class=\"qt px-5\">{{ method.description }}</p>\n <p class=\"px-5\">{{ method.instructions }}</p>\n <div class=\"end-button\">\n <button class=\"btn comprar\" (click)=\"setLoading() && verifyValidate()\">{{ ('pay-with-offline'| translate) }}</button>\n </div>\n <ng-container *ngIf=\"(loading$ | async) as load\">\n <div class=\"mt-2\" *ngIf=\"load\">\n <app-loading-inline-ec></app-loading-inline-ec>\n </div>\n </ng-container>\n </div>\n <div class=\"method-container text-dark text-start\" *ngIf=\"isCulqi(method.code)\">\n <div class=\"container\">\n <div class=\"row justify-content-center\">\n <div class=\"col-12\">\n <!-- <app-mobbex-ec (ready)=\"verifyValidate($event)\" [method]=\"method\" [user_data]=\"allData()\" [paymentServiceInst]=\"paymentService\"\n [total_amount]=\"total_amount\">\n </app-mobbex-ec> -->\n <app-culqi-ec [apiKey]=\"getPKCulqi(method)\" [method]=\"method\" [amount]=\"total_amount\" [customStyle]=\"true\" (ready)=\"verifyValidate()\"></app-culqi-ec>\n </div>\n </div>\n </div>\n </div>\n <div class=\"method-container text-dark\" *ngIf=\"isBankTransfer(method.code)\">\n <div class=\"row px-0 description-cont\">\n <ng-container *ngFor=\"let line of method.description.split('\\r\\n'); let i=index\">\n <p [id]=\"'faqs-'+i\" [class]=\"'qt px-5 m-0 line-'+i\">{{ line }}</p>\n </ng-container>\n </div>\n <hr *ngIf=\"method.instructions\">\n <div *ngIf=\"method.instructions\" class=\"row px-0 instructions-cont mb-1\">\n <h5 class=\"instructions-title\">{{ ('instructions' | translate) }}</h5>\n <ng-container *ngFor=\"let line of method.instructions.split('\\r\\n'); let i=index\">\n <p [class]=\"'px-5 m-0 instructions-text line-'+i \">{{ line }}</p>\n </ng-container>\n </div>\n \n <div class=\"end-button\">\n <button class=\"btn comprar\" (click)=\"setLoading() && verifyValidate()\">{{\n ('pay-with-transfer'\n | translate) }}</button>\n </div>\n <ng-container *ngIf=\"(loading$ | async) as load\">\n <div class=\"mt-2\" *ngIf=\"load\">\n <app-loading-inline-ec></app-loading-inline-ec>\n </div>\n </ng-container>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n\n<ng-template #mercadoPago>\n <div class=\"row \">\n <div class=\"col-12 text-center\">\n <app-loading-inline-ec *ngIf=\"loading_internal_mp\"></app-loading-inline-ec>\n <form action=\"javascript:void(0)\" #formContainer></form>\n </div>\n </div>\n</ng-template>\n\n<ng-template #loading>\n <app-loading-inline-ec></app-loading-inline-ec>\n</ng-template>",
7364
7369
  providers: [PaymentService],
7365
7370
  styles: ["div.col-12 form{text-align:center}.option-container>div{margin-bottom:15px}@media only screen and (min-width:600px){.option-container{display:flex;justify-content:space-between;margin-top:20px}}.method-container{width:100%}.active{background-color:#000!important;color:#fff!important}.comprar{background:#000;color:#fff;display:inline-block;font-size:18px;font-weight:600;padding:10px 25px;text-decoration:none;text-transform:uppercase}"]
7366
7371
  })
@@ -7532,40 +7537,54 @@
7532
7537
  };
7533
7538
  var SuccessEcComponent = /** @class */ (function (_super) {
7534
7539
  __extends$l(SuccessEcComponent, _super);
7535
- function SuccessEcComponent(activedRoute, cartService, router, checkoutService) {
7540
+ function SuccessEcComponent(activedRoute, cartService, router, checkoutService, blocksService, consts) {
7536
7541
  var _this = _super.call(this) || this;
7537
7542
  _this.activedRoute = activedRoute;
7538
7543
  _this.cartService = cartService;
7539
7544
  _this.router = router;
7540
7545
  _this.checkoutService = checkoutService;
7546
+ _this.blocksService = blocksService;
7547
+ _this.consts = consts;
7541
7548
  _this.orderDetails = {};
7542
7549
  _this.params = {};
7543
7550
  _this.from_mp = true;
7551
+ /**
7552
+ * @description Chequea si existe un bloque recibido por parametro.
7553
+ * @param codeBlock codigo del bloque.
7554
+ * @returns el bloque si lo encontro.
7555
+ */
7556
+ _this.containsBlock = function (codeBlock) { return _this.blocks.find(function (block) { return block.code == codeBlock; }); };
7544
7557
  _this.ecOnConstruct();
7545
7558
  return _this;
7546
7559
  }
7547
7560
  SuccessEcComponent.prototype.ngOnInit = function () {
7548
7561
  var _this = this;
7549
7562
  this.checkoutService.order$.subscribe(function (res) {
7563
+ var _a, _b;
7550
7564
  //console.log('LO QUE LLEGA EN ORDEN', res);
7551
- _this.params = {
7565
+ ((_a = res) === null || _a === void 0 ? void 0 : _a.number) ? _this.params = {
7552
7566
  external_reference: res.number,
7553
- };
7554
- _this.payments = res.payments;
7567
+ } : null;
7568
+ //this.payments = [{method:{code:'bank_transsfer'}}]
7569
+ _this.payments = ((_b = res) === null || _b === void 0 ? void 0 : _b.payments) ? res.payments : null;
7555
7570
  });
7571
+ this.blocksService.getBlocks('info_metodo_pago');
7572
+ this.blocksService.blocks.subscribe(function (res) { return _this.blocks = res; });
7556
7573
  this.ecOnInit();
7557
7574
  };
7558
7575
  SuccessEcComponent.ctorParameters = function () { return [
7559
7576
  { type: router.ActivatedRoute },
7560
7577
  { type: CartService },
7561
7578
  { type: router.Router },
7562
- { type: CheckoutService }
7579
+ { type: CheckoutService },
7580
+ { type: BlocksService },
7581
+ { type: Constants }
7563
7582
  ]; };
7564
7583
  SuccessEcComponent = __decorate$S([
7565
7584
  core.Component({
7566
7585
  selector: 'app-order-success-ec',
7567
- template: "<div id=\"container\" class=\"flex-center generalContainer container\">\n <div class=\"Main\">\n <div class=\"wrap\">\n <div class=\"row\">\n <div class=\"col-12\">\n <br>\n </div>\n <div class=\"col-md-12 col-12\">\n <h4 class=\"titpage center-block text-center\">{{ ('thanks-for-buying' | translate) | uppercase }}</h4>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-md-12 col-12 text-center\">\n <h4>{{ 'thanks-details' | translate }}</h4>\n <h5>{{ ('number' | translate) + ': ' + params.external_reference }}</h5>\n <h5>{{ ((params.payment_status || 'pending') | translate) }}</h5>\n <!-- <h5 *ngIf=\"!from_mp\">{{ ('will_contact' | translate) }}</h5> -->\n <br>\n <!-- <a routerLink=\"/collection\"><button class=\"comprar\">{{ 'continue-shopping' | translate }}</button></a> -->\n <br>\n <br>\n </div>\n </div>\n </div>\n </div>\n</div>",
7568
- styles: [".capitalize{text-transform:capitalize!important}.flex-center{padding-top:2em;height:60vh;align-items:center!important;justify-content:center;display:flex}"]
7586
+ template: "<div id=\"container\" class=\"flex-center generalContainer container-xl\">\n <div class=\"Main card my-2\" *ngIf=\"this.payments && this.payments[0].method.code; else loading\">\n <ng-container *ngIf=\"this.blocks && this.blocks.length > 0; else loading\">\n <ng-container *ngIf=\"containsBlock(this.payments[0].method.code) as bloque; else notInfoToMethod\">\n <div class=\"wrap my-4 card-body\" [id]=\"bloque.code\">\n <div class=\"row\">\n <div class=\"col-md-12 col-12\">\n <h5 [class]=\"bloque.code+'-title'\">{{ (bloque?.translations[consts.getLocale()]?.name ?\n bloque.translations[consts.getLocale()].name :\n 'thanks-for-buying') | translate\n | uppercase }}</h5>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-md-12 col-12 text-start\">\n <app-blocks-ec [section]=\"'info_metodo_pago'\" [blockFilters]=\"this.payments[0].method.code\">\n </app-blocks-ec>\n <div class=\"d-flex flex-column details\">\n <p class=\"card-text\">{{ ('number' | translate) + ': ' + params.external_reference }}</p>\n <p class=\"card-text\">{{((params.payment_status || 'pending') | translate)}}</p>\n </div>\n </div>\n </div>\n </div>\n </ng-container>\n </ng-container>\n <ng-template #notInfoToMethod>\n <ng-template #defaultMessage>\n <div class=\"wrap my-4 card-body\">\n <div class=\"row\">\n <div class=\"col-md-12 col-12\">\n <h5 class=\"card-title titpage center-block text-center\">\n {{ 'thanks-for-buying' | translate | uppercase }}\n </h5>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-md-12 col-12 text-center py-3\">\n <h4 class=\"thanks-details\">{{ 'thanks-details' | translate }}</h4>\n <h5 class=\"number\">{{ ('number' | translate) + ': ' + params.external_reference }}</h5>\n <h5 class=\"pending\">{{ ((params.payment_status || 'pending') | translate) }}</h5>\n <!-- <h5 *ngIf=\"!from_mp\">{{ ('will_contact' | translate) }}</h5> -->\n\n <!-- <a routerLink=\"/collection\"><button class=\"comprar\">{{ 'continue-shopping' | translate }}</button></a> -->\n </div>\n </div>\n </div>\n </ng-template>\n <ng-container [ngTemplateOutlet]=\"notInfoToMethodTemplate ? notInfoToMethodTemplate : defaultMessage\"\n [ngTemplateOutletContext]=\"{params:params}\">\n </ng-container>\n </ng-template>\n </div>\n</div>\n\n<ng-template #loading>\n <app-loading-full-ec></app-loading-full-ec>\n</ng-template>",
7587
+ styles: [""]
7569
7588
  })
7570
7589
  ], SuccessEcComponent);
7571
7590
  return SuccessEcComponent;