ng-easycommerce 0.0.615 → 0.0.617
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 +979 -973
- package/assets/bamboo.html +145 -145
- package/assets/bancardCatastro.html +49 -49
- package/assets/bancardFrameBase.html +104 -104
- package/assets/cecaFrameRedirectBase.html +172 -172
- package/assets/decidirFormEc.html +519 -519
- package/assets/docs/COOKIES.md +158 -158
- package/assets/docs/Parametros-Frontend.md +56 -56
- package/assets/ec-i18n/ct.json +295 -295
- package/assets/ec-i18n/en.json +0 -0
- package/assets/ec-i18n/es.json +412 -411
- package/assets/ec-i18n/fr.json +0 -0
- package/assets/ec-i18n/gl.json +295 -295
- package/assets/ec-i18n/pr.json +295 -295
- package/assets/images/whatsapp.png +0 -0
- package/assets/mpFrameRedirectBase.html +114 -114
- package/assets/recaptcha/recaptcha-site-keys.json +3 -3
- package/assets/recaptcha/recaptcha-sites-prod.json +38 -38
- package/assets/recaptcha/recaptcha-sites.json +52 -52
- package/assets/redirect.html +62 -62
- package/assets/redsysAuthVdosBase.html +78 -78
- package/assets/redsysAuthVunoBase.html +84 -84
- package/assets/redsysFrameRedirectBase.html +102 -102
- package/assets/redsysFrameRedirectOutBase.html +102 -102
- package/assets/redsysFrameSendBase.html +71 -71
- package/assets/redsysProBase.html +399 -399
- package/assets/redsysStateBase.html +63 -63
- package/assets/scss/_colors.scss +17 -17
- package/assets/scss/_styles.scss +22 -22
- package/assets/svg/chevron-left-black.svg +61 -61
- package/assets/svg/chevron-right-black.svg +61 -61
- package/bundles/ng-easycommerce.umd.js +19681 -19681
- package/bundles/ng-easycommerce.umd.js.map +1 -1
- package/bundles/ng-easycommerce.umd.min.js +1 -1
- package/bundles/ng-easycommerce.umd.min.js.map +1 -1
- package/esm2015/lib/api/connection.service.js +77 -77
- package/esm2015/lib/classes/checkout/step-service.js +39 -39
- package/esm2015/lib/classes/checkout/step.js +22 -22
- package/esm2015/lib/classes/checkout-process-state.js +2 -2
- package/esm2015/lib/classes/component-helper.js +16 -16
- package/esm2015/lib/classes/filters/AttributesFilter.js +61 -61
- package/esm2015/lib/classes/filters/CategoryFilter.js +54 -54
- package/esm2015/lib/classes/filters/DinamycsFilter.js +58 -58
- package/esm2015/lib/classes/filters/Filter.js +75 -75
- package/esm2015/lib/classes/filters/PriceRangeFilter.js +51 -51
- package/esm2015/lib/classes/filters/SortFilter.js +79 -79
- package/esm2015/lib/classes/user-role-type.js +1 -1
- package/esm2015/lib/classes/user.js +108 -108
- package/esm2015/lib/core.consts.js +414 -414
- package/esm2015/lib/ec-component/account-ec/account-ec.component.js +45 -45
- package/esm2015/lib/ec-component/account-ec/order-ec/order-ec.component.js +115 -115
- package/esm2015/lib/ec-component/account-ec/orders-list-ec/orders-list-ec.component.js +192 -192
- package/esm2015/lib/ec-component/auth-ec/auth-ec.component.js +115 -115
- package/esm2015/lib/ec-component/auth-ec/confirm-account-ec/confirm-account-ec.component.js +44 -44
- package/esm2015/lib/ec-component/auth-ec/forgot-password-ec/forgot-password-ec.component.js +58 -58
- package/esm2015/lib/ec-component/auth-ec/login-form-ec/login-form-ec.component.js +108 -108
- package/esm2015/lib/ec-component/auth-ec/register-form-ec/register-form-ec.component.js +168 -168
- package/esm2015/lib/ec-component/auth-ec/register-wholesaler-form-ec/register-wholesaler-form-ec.component.js +165 -165
- package/esm2015/lib/ec-component/auth-ec/select-channel-ec/select-channel-ec.component.js +78 -78
- package/esm2015/lib/ec-component/blocks-ec/block-banner-boxes-ec/block-banner-boxes-ec.component.js +140 -140
- package/esm2015/lib/ec-component/blocks-ec/block-banner-full-ec/block-banner-full-ec.component.js +110 -110
- package/esm2015/lib/ec-component/blocks-ec/block-form-contact-ec/block-form-contact-ec.component.js +138 -138
- package/esm2015/lib/ec-component/blocks-ec/block-html-ec/block-html-ec.component.js +38 -38
- package/esm2015/lib/ec-component/blocks-ec/block-newsletter-ec/contact-form-news-ec.component.js +152 -152
- package/esm2015/lib/ec-component/blocks-ec/block-products-ec/block-products-ec.component.js +119 -119
- package/esm2015/lib/ec-component/blocks-ec/blocks-ec.component.js +70 -70
- package/esm2015/lib/ec-component/build-your-ec/build-your-ec.component.js +305 -305
- package/esm2015/lib/ec-component/build-your-ec/product-found-ec/product-found-ec.component.js +85 -85
- package/esm2015/lib/ec-component/cart-ec/cart-ec.component.js +404 -404
- package/esm2015/lib/ec-component/checkout-ec/checkout-ec.component.js +152 -152
- package/esm2015/lib/ec-component/checkout-ec/dataform-ec/dataform-ec.component.js +424 -424
- package/esm2015/lib/ec-component/checkout-ec/detail-checkout-block-ec/detail-checkout-block-ec.component.js +103 -103
- package/esm2015/lib/ec-component/checkout-ec/payment-ec/payment-ec.component.js +146 -146
- package/esm2015/lib/ec-component/checkout-ec/shipment-ec/shipment-ec.component.js +112 -112
- package/esm2015/lib/ec-component/checkout-ec/step-ec/step-ec.component.js +53 -53
- package/esm2015/lib/ec-component/checkout-ec/success-ec/success-ec.component.js +66 -66
- package/esm2015/lib/ec-component/checkout-error-ec/checkout-error-ec.component.js +80 -80
- package/esm2015/lib/ec-component/collection-ec/collection-ec.component.js +220 -220
- package/esm2015/lib/ec-component/compared-products-ec/compared-products-ec.component.js +186 -186
- package/esm2015/lib/ec-component/cookies-ec/cookies-ec.component.js +109 -109
- package/esm2015/lib/ec-component/cookies-ec/modal-config-ec/modal-config-ec.component.js +32 -32
- package/esm2015/lib/ec-component/cookies-ec/modal-cookies-ec/modal-cookies-ec.component.js +34 -34
- package/esm2015/lib/ec-component/cookies-ec/sidebar-cookies-ec/sidebar-cookies-ec.component.js +34 -34
- package/esm2015/lib/ec-component/cookies-ec/toast-cookies-ec/toast-cookies-ec.component.js +35 -35
- package/esm2015/lib/ec-component/coupon-ec/coupon-ec.component.js +53 -53
- package/esm2015/lib/ec-component/faqs-content-ec/faqs-content-ec.component.js +49 -49
- package/esm2015/lib/ec-component/filters-ec/filters-ec.component.js +152 -152
- package/esm2015/lib/ec-component/filters-top-ec/filters-top-ec.component.js +102 -102
- package/esm2015/lib/ec-component/footer-ec/footer-ec.component.js +82 -82
- package/esm2015/lib/ec-component/header-ec/header-ec.component.js +199 -199
- package/esm2015/lib/ec-component/home-ec/home-ec.component.js +37 -37
- package/esm2015/lib/ec-component/index.js +244 -244
- package/esm2015/lib/ec-component/login-ec/login-ec.component.js +102 -102
- package/esm2015/lib/ec-component/multiple-items-to-cart-ec/multiple-items-to-cart-ec.component.js +90 -90
- package/esm2015/lib/ec-component/password-reset-ec/password-reset-ec.component.js +103 -103
- package/esm2015/lib/ec-component/product-detail-ec/product-detail-ec.component.js +172 -172
- package/esm2015/lib/ec-component/product-ec/product-ec.component.js +140 -140
- package/esm2015/lib/ec-component/related-products-ec/related-products-ec.component.js +94 -94
- package/esm2015/lib/ec-component/reviews-ec/reviews-ec.component.js +69 -69
- package/esm2015/lib/ec-component/reviews-form-ec/reviews-form-ec.component.js +138 -138
- package/esm2015/lib/ec-component/section-container-ec/section-container-ec.component.js +86 -86
- package/esm2015/lib/ec-component/seller-dashboard-container-ec/seller-dashboard-container-ec.component.js +130 -130
- package/esm2015/lib/ec-component/share-block-ec/share-block-ec.component.js +149 -149
- package/esm2015/lib/ec-component/sidebar-ec/sidebar-ec.component.js +133 -133
- package/esm2015/lib/ec-component/stores-ec/stores-ec.component.js +192 -192
- package/esm2015/lib/ec-component/variants-ec/variants-ec.component.js +56 -56
- package/esm2015/lib/ec-component/widgets-ec/bamboo-ec/bamboo-ec.component.js +205 -205
- package/esm2015/lib/ec-component/widgets-ec/bancard-catastro-ec/bancard-catastro-ec.component.js +296 -296
- package/esm2015/lib/ec-component/widgets-ec/bancard-ec/bancard-ec.component.js +154 -154
- package/esm2015/lib/ec-component/widgets-ec/bancard-redirect-ec/bancard-redirect-ec.component.js +144 -144
- package/esm2015/lib/ec-component/widgets-ec/cart-load-ec/cart-load-ec.component.js +49 -49
- package/esm2015/lib/ec-component/widgets-ec/ceca-redirect-ec/ceca-redirect-ec.component.js +133 -133
- package/esm2015/lib/ec-component/widgets-ec/culqi-ec/culqi-ec.component.js +152 -152
- package/esm2015/lib/ec-component/widgets-ec/decidir-ec/decidir-ec.component.js +175 -175
- package/esm2015/lib/ec-component/widgets-ec/loading-full-ec/loading-full-ec.component.js +30 -30
- package/esm2015/lib/ec-component/widgets-ec/loading-inline-ec/loading-inline-ec.component.js +26 -26
- package/esm2015/lib/ec-component/widgets-ec/loading-section-ec/loading-section-ec.component.js +21 -21
- package/esm2015/lib/ec-component/widgets-ec/mercadopago-ec/mp-redirect-ec/mp-redirect-ec.component.js +156 -156
- package/esm2015/lib/ec-component/widgets-ec/mercadopago-ec/mpcredit-ec/mpcredit-ec.component.js +368 -368
- package/esm2015/lib/ec-component/widgets-ec/mobbex-ec/mobbex-ec.component.js +151 -151
- package/esm2015/lib/ec-component/widgets-ec/paypal-express-ec/paypal-express-ec.component.js +178 -178
- package/esm2015/lib/ec-component/widgets-ec/place-to-pay-ec/place-to-pay-ec.component.js +126 -126
- package/esm2015/lib/ec-component/widgets-ec/price-ec/price-ec.component.js +98 -98
- package/esm2015/lib/ec-component/widgets-ec/rating-ec/rating-ec.component.js +83 -83
- package/esm2015/lib/ec-component/widgets-ec/re-captcha-ec/re-captcha-ec.component.js +50 -50
- package/esm2015/lib/ec-component/widgets-ec/redsys-catch-ec/redsys-catch-ec.component.js +90 -90
- package/esm2015/lib/ec-component/widgets-ec/redsys-pro-ec/redsys-pro-ec.component.js +143 -143
- package/esm2015/lib/ec-component/widgets-ec/redsys-redirect-ec/redsys-redirect-ec.component.js +128 -128
- package/esm2015/lib/ec-component/widgets-ec/redsys-redirect-out-ec/redsys-redirect-out-ec.component.js +145 -145
- package/esm2015/lib/ec-component/widgets-ec/zoom-ec/magnizoom.component.js +167 -167
- package/esm2015/lib/ec-directive/add-action-redirect.directive.js +85 -85
- package/esm2015/lib/ec-directive/auth-wholesaler.directive.js +54 -54
- package/esm2015/lib/ec-directive/index.js +36 -36
- package/esm2015/lib/ec-directive/product-mini-standard.directive.js +65 -65
- package/esm2015/lib/ec-directive/product-off.directive.js +144 -144
- package/esm2015/lib/ec-directive/product-stock.directive.js +75 -75
- package/esm2015/lib/ec-directive/reload-view.directive.js +34 -34
- package/esm2015/lib/ec-pipe/ec-currency-symbol.pipe.js +72 -72
- package/esm2015/lib/ec-pipe/ec-sanitizer-html.pipe.js +26 -26
- package/esm2015/lib/ec-pipe/ec-sanitizer-url.pipe.js +26 -26
- package/esm2015/lib/ec-pipe/index.js +13 -13
- package/esm2015/lib/guards/able-buyer-guard.service.js +36 -36
- package/esm2015/lib/guards/auth-guard.service.js +36 -36
- package/esm2015/lib/guards/checkout-ready.service.js +36 -36
- package/esm2015/lib/guards/loggedin-guard.service.js +36 -36
- package/esm2015/lib/guards/user-role-guard.service.js +38 -38
- package/esm2015/lib/interceptors/auth.interceptor.js +55 -55
- package/esm2015/lib/interceptors/customer.interceptor.js +48 -48
- package/esm2015/lib/interfaces/Script.js +1 -1
- package/esm2015/lib/interfaces/analytics/event-key.model.js +1 -1
- package/esm2015/lib/interfaces/analytics/facebook-pixel/facebook-pixel-model.js +1 -1
- package/esm2015/lib/interfaces/analytics/gtm-config.js +1 -1
- package/esm2015/lib/interfaces/analytics/metricool-pixel.js +1 -1
- package/esm2015/lib/interfaces/block.js +1 -1
- package/esm2015/lib/interfaces/cart/cart-affordable.js +1 -1
- package/esm2015/lib/interfaces/checkout/checkout-error.js +1 -1
- package/esm2015/lib/interfaces/checkout-data.js +1 -1
- package/esm2015/lib/interfaces/choose-options/filter-option.js +6 -6
- package/esm2015/lib/interfaces/choose-options/options-of-product-list.js +1 -1
- package/esm2015/lib/interfaces/cookies.js +1 -1
- package/esm2015/lib/interfaces/core.interfaces.js +1 -1
- package/esm2015/lib/interfaces/coupon.js +1 -1
- package/esm2015/lib/interfaces/deserializable.js +1 -1
- package/esm2015/lib/interfaces/faqs.js +1 -1
- package/esm2015/lib/interfaces/filter.js +1 -1
- package/esm2015/lib/interfaces/filterStep.js +1 -1
- package/esm2015/lib/interfaces/observable-error.interface.js +1 -1
- package/esm2015/lib/interfaces/paginate.js +1 -1
- package/esm2015/lib/interfaces/parameters.js +1 -1
- package/esm2015/lib/interfaces/selection.js +4 -4
- package/esm2015/lib/interfaces/step.js +1 -1
- package/esm2015/lib/interfaces/store.js +1 -1
- package/esm2015/lib/ng-easycommerce.module.js +181 -181
- package/esm2015/lib/pipes/order-by.pipe.js +101 -101
- package/esm2015/lib/services/account/orders.service.js +102 -102
- package/esm2015/lib/services/analytics.service.js +57 -57
- package/esm2015/lib/services/auth.service.js +352 -352
- package/esm2015/lib/services/banner.service.js +72 -72
- package/esm2015/lib/services/blocks/blocks-repository.service.js +62 -62
- package/esm2015/lib/services/blocks/blocks.service.js +71 -71
- package/esm2015/lib/services/captcha.service.js +130 -130
- package/esm2015/lib/services/cart.service.js +573 -573
- package/esm2015/lib/services/channel-config.service.js +105 -105
- package/esm2015/lib/services/checkout/addressing.service.js +222 -222
- package/esm2015/lib/services/checkout/checkout.service.js +233 -233
- package/esm2015/lib/services/checkout/error-handler.service.js +81 -81
- package/esm2015/lib/services/checkout/payment.service.js +79 -79
- package/esm2015/lib/services/checkout/shipment.service.js +183 -183
- package/esm2015/lib/services/concatenated-associations.service.js +120 -120
- package/esm2015/lib/services/cookies.service.js +208 -208
- package/esm2015/lib/services/currency.service.js +161 -161
- package/esm2015/lib/services/dataform.service.js +46 -46
- package/esm2015/lib/services/filters.service.js +122 -122
- package/esm2015/lib/services/gift-card.service.js +61 -61
- package/esm2015/lib/services/ip-address.service.js +34 -34
- package/esm2015/lib/services/options.service.js +275 -275
- package/esm2015/lib/services/pagination.service.js +73 -73
- package/esm2015/lib/services/parameters.service.js +72 -72
- package/esm2015/lib/services/products/product-detail.service.js +432 -432
- package/esm2015/lib/services/products/products.service.js +287 -287
- package/esm2015/lib/services/reviews.service.js +107 -107
- package/esm2015/lib/services/stores.service.js +37 -37
- package/esm2015/lib/services/windows.service.js +52 -52
- package/esm2015/lib/services/wishlist.service.js +70 -70
- package/esm2015/lib/strategies/standard.strategy.js +43 -43
- package/esm2015/lib/utils/analytics/doppler.service.js +37 -37
- package/esm2015/lib/utils/analytics/facebook-pixel.service.js +141 -141
- package/esm2015/lib/utils/analytics/google-analytics.service.js +265 -265
- package/esm2015/lib/utils/analytics/gtm.service.js +341 -341
- package/esm2015/lib/utils/analytics/metricool-pixel.service.js +48 -48
- package/esm2015/lib/utils/options-of-product-list-data.service.js +96 -96
- package/esm2015/lib/utils/order-util.service.js +72 -72
- package/esm2015/lib/utils/payment-utils.service.js +35 -35
- package/esm2015/lib/utils/shipment-transformer.service.js +66 -66
- package/esm2015/lib/utils/toast.service.js +42 -42
- package/esm2015/lib/utils/utils.service.js +20 -20
- package/esm2015/ng-easycommerce.js +34 -34
- package/esm2015/public-api.js +146 -146
- package/esm5/lib/api/connection.service.js +90 -90
- package/esm5/lib/classes/checkout/step-service.js +74 -74
- package/esm5/lib/classes/checkout/step.js +25 -25
- package/esm5/lib/classes/checkout-process-state.js +2 -2
- package/esm5/lib/classes/component-helper.js +22 -22
- package/esm5/lib/classes/filters/AttributesFilter.js +79 -79
- package/esm5/lib/classes/filters/CategoryFilter.js +72 -72
- package/esm5/lib/classes/filters/DinamycsFilter.js +76 -76
- package/esm5/lib/classes/filters/Filter.js +78 -78
- package/esm5/lib/classes/filters/PriceRangeFilter.js +68 -68
- package/esm5/lib/classes/filters/SortFilter.js +97 -97
- package/esm5/lib/classes/user-role-type.js +1 -1
- package/esm5/lib/classes/user.js +120 -120
- package/esm5/lib/core.consts.js +434 -434
- package/esm5/lib/ec-component/account-ec/account-ec.component.js +62 -62
- package/esm5/lib/ec-component/account-ec/order-ec/order-ec.component.js +169 -169
- package/esm5/lib/ec-component/account-ec/orders-list-ec/orders-list-ec.component.js +209 -209
- package/esm5/lib/ec-component/auth-ec/auth-ec.component.js +132 -132
- package/esm5/lib/ec-component/auth-ec/confirm-account-ec/confirm-account-ec.component.js +60 -60
- package/esm5/lib/ec-component/auth-ec/forgot-password-ec/forgot-password-ec.component.js +74 -74
- package/esm5/lib/ec-component/auth-ec/login-form-ec/login-form-ec.component.js +125 -125
- package/esm5/lib/ec-component/auth-ec/register-form-ec/register-form-ec.component.js +185 -185
- package/esm5/lib/ec-component/auth-ec/register-wholesaler-form-ec/register-wholesaler-form-ec.component.js +182 -182
- package/esm5/lib/ec-component/auth-ec/select-channel-ec/select-channel-ec.component.js +106 -106
- package/esm5/lib/ec-component/blocks-ec/block-banner-boxes-ec/block-banner-boxes-ec.component.js +170 -170
- package/esm5/lib/ec-component/blocks-ec/block-banner-full-ec/block-banner-full-ec.component.js +138 -138
- package/esm5/lib/ec-component/blocks-ec/block-form-contact-ec/block-form-contact-ec.component.js +165 -165
- package/esm5/lib/ec-component/blocks-ec/block-html-ec/block-html-ec.component.js +54 -54
- package/esm5/lib/ec-component/blocks-ec/block-newsletter-ec/contact-form-news-ec.component.js +180 -180
- package/esm5/lib/ec-component/blocks-ec/block-products-ec/block-products-ec.component.js +146 -146
- package/esm5/lib/ec-component/blocks-ec/blocks-ec.component.js +90 -90
- package/esm5/lib/ec-component/build-your-ec/build-your-ec.component.js +327 -327
- package/esm5/lib/ec-component/build-your-ec/product-found-ec/product-found-ec.component.js +112 -112
- package/esm5/lib/ec-component/cart-ec/cart-ec.component.js +488 -488
- package/esm5/lib/ec-component/checkout-ec/checkout-ec.component.js +169 -169
- package/esm5/lib/ec-component/checkout-ec/dataform-ec/dataform-ec.component.js +509 -509
- package/esm5/lib/ec-component/checkout-ec/detail-checkout-block-ec/detail-checkout-block-ec.component.js +120 -120
- package/esm5/lib/ec-component/checkout-ec/payment-ec/payment-ec.component.js +236 -236
- package/esm5/lib/ec-component/checkout-ec/shipment-ec/shipment-ec.component.js +162 -162
- package/esm5/lib/ec-component/checkout-ec/step-ec/step-ec.component.js +69 -69
- package/esm5/lib/ec-component/checkout-ec/success-ec/success-ec.component.js +83 -83
- package/esm5/lib/ec-component/checkout-error-ec/checkout-error-ec.component.js +97 -97
- package/esm5/lib/ec-component/collection-ec/collection-ec.component.js +261 -261
- package/esm5/lib/ec-component/compared-products-ec/compared-products-ec.component.js +209 -209
- package/esm5/lib/ec-component/cookies-ec/cookies-ec.component.js +126 -126
- package/esm5/lib/ec-component/cookies-ec/modal-config-ec/modal-config-ec.component.js +34 -34
- package/esm5/lib/ec-component/cookies-ec/modal-cookies-ec/modal-cookies-ec.component.js +36 -36
- package/esm5/lib/ec-component/cookies-ec/sidebar-cookies-ec/sidebar-cookies-ec.component.js +36 -36
- package/esm5/lib/ec-component/cookies-ec/toast-cookies-ec/toast-cookies-ec.component.js +37 -37
- package/esm5/lib/ec-component/coupon-ec/coupon-ec.component.js +71 -71
- package/esm5/lib/ec-component/faqs-content-ec/faqs-content-ec.component.js +66 -66
- package/esm5/lib/ec-component/filters-ec/filters-ec.component.js +168 -168
- package/esm5/lib/ec-component/filters-top-ec/filters-top-ec.component.js +118 -118
- package/esm5/lib/ec-component/footer-ec/footer-ec.component.js +113 -113
- package/esm5/lib/ec-component/header-ec/header-ec.component.js +260 -260
- package/esm5/lib/ec-component/home-ec/home-ec.component.js +53 -53
- package/esm5/lib/ec-component/index.js +244 -244
- package/esm5/lib/ec-component/login-ec/login-ec.component.js +118 -118
- package/esm5/lib/ec-component/multiple-items-to-cart-ec/multiple-items-to-cart-ec.component.js +106 -106
- package/esm5/lib/ec-component/password-reset-ec/password-reset-ec.component.js +119 -119
- package/esm5/lib/ec-component/product-detail-ec/product-detail-ec.component.js +199 -199
- package/esm5/lib/ec-component/product-ec/product-ec.component.js +158 -158
- package/esm5/lib/ec-component/related-products-ec/related-products-ec.component.js +111 -111
- package/esm5/lib/ec-component/reviews-ec/reviews-ec.component.js +85 -85
- package/esm5/lib/ec-component/reviews-form-ec/reviews-form-ec.component.js +155 -155
- package/esm5/lib/ec-component/section-container-ec/section-container-ec.component.js +103 -103
- package/esm5/lib/ec-component/seller-dashboard-container-ec/seller-dashboard-container-ec.component.js +149 -149
- package/esm5/lib/ec-component/share-block-ec/share-block-ec.component.js +166 -166
- package/esm5/lib/ec-component/sidebar-ec/sidebar-ec.component.js +136 -136
- package/esm5/lib/ec-component/stores-ec/stores-ec.component.js +214 -214
- package/esm5/lib/ec-component/variants-ec/variants-ec.component.js +72 -72
- package/esm5/lib/ec-component/widgets-ec/bamboo-ec/bamboo-ec.component.js +221 -221
- package/esm5/lib/ec-component/widgets-ec/bancard-catastro-ec/bancard-catastro-ec.component.js +313 -313
- package/esm5/lib/ec-component/widgets-ec/bancard-ec/bancard-ec.component.js +170 -170
- package/esm5/lib/ec-component/widgets-ec/bancard-redirect-ec/bancard-redirect-ec.component.js +160 -160
- package/esm5/lib/ec-component/widgets-ec/cart-load-ec/cart-load-ec.component.js +83 -83
- package/esm5/lib/ec-component/widgets-ec/ceca-redirect-ec/ceca-redirect-ec.component.js +149 -149
- package/esm5/lib/ec-component/widgets-ec/culqi-ec/culqi-ec.component.js +156 -156
- package/esm5/lib/ec-component/widgets-ec/decidir-ec/decidir-ec.component.js +192 -192
- package/esm5/lib/ec-component/widgets-ec/loading-full-ec/loading-full-ec.component.js +46 -46
- package/esm5/lib/ec-component/widgets-ec/loading-inline-ec/loading-inline-ec.component.js +42 -42
- package/esm5/lib/ec-component/widgets-ec/loading-section-ec/loading-section-ec.component.js +23 -23
- package/esm5/lib/ec-component/widgets-ec/mercadopago-ec/mp-redirect-ec/mp-redirect-ec.component.js +174 -174
- package/esm5/lib/ec-component/widgets-ec/mercadopago-ec/mpcredit-ec/mpcredit-ec.component.js +396 -396
- package/esm5/lib/ec-component/widgets-ec/mobbex-ec/mobbex-ec.component.js +167 -167
- package/esm5/lib/ec-component/widgets-ec/paypal-express-ec/paypal-express-ec.component.js +231 -231
- package/esm5/lib/ec-component/widgets-ec/place-to-pay-ec/place-to-pay-ec.component.js +144 -144
- package/esm5/lib/ec-component/widgets-ec/price-ec/price-ec.component.js +119 -119
- package/esm5/lib/ec-component/widgets-ec/rating-ec/rating-ec.component.js +100 -100
- package/esm5/lib/ec-component/widgets-ec/re-captcha-ec/re-captcha-ec.component.js +53 -53
- package/esm5/lib/ec-component/widgets-ec/redsys-catch-ec/redsys-catch-ec.component.js +124 -124
- package/esm5/lib/ec-component/widgets-ec/redsys-pro-ec/redsys-pro-ec.component.js +159 -159
- package/esm5/lib/ec-component/widgets-ec/redsys-redirect-ec/redsys-redirect-ec.component.js +144 -144
- package/esm5/lib/ec-component/widgets-ec/redsys-redirect-out-ec/redsys-redirect-out-ec.component.js +162 -162
- package/esm5/lib/ec-component/widgets-ec/zoom-ec/magnizoom.component.js +181 -181
- package/esm5/lib/ec-directive/add-action-redirect.directive.js +104 -104
- package/esm5/lib/ec-directive/auth-wholesaler.directive.js +60 -60
- package/esm5/lib/ec-directive/index.js +36 -36
- package/esm5/lib/ec-directive/product-mini-standard.directive.js +72 -72
- package/esm5/lib/ec-directive/product-off.directive.js +163 -163
- package/esm5/lib/ec-directive/product-stock.directive.js +81 -81
- package/esm5/lib/ec-directive/reload-view.directive.js +35 -35
- package/esm5/lib/ec-pipe/ec-currency-symbol.pipe.js +74 -74
- package/esm5/lib/ec-pipe/ec-sanitizer-html.pipe.js +27 -27
- package/esm5/lib/ec-pipe/ec-sanitizer-url.pipe.js +27 -27
- package/esm5/lib/ec-pipe/index.js +13 -13
- package/esm5/lib/guards/able-buyer-guard.service.js +37 -37
- package/esm5/lib/guards/auth-guard.service.js +37 -37
- package/esm5/lib/guards/checkout-ready.service.js +37 -37
- package/esm5/lib/guards/loggedin-guard.service.js +37 -37
- package/esm5/lib/guards/user-role-guard.service.js +39 -39
- package/esm5/lib/interceptors/auth.interceptor.js +57 -57
- package/esm5/lib/interceptors/customer.interceptor.js +50 -50
- package/esm5/lib/interfaces/Script.js +1 -1
- package/esm5/lib/interfaces/analytics/event-key.model.js +1 -1
- package/esm5/lib/interfaces/analytics/facebook-pixel/facebook-pixel-model.js +1 -1
- package/esm5/lib/interfaces/analytics/gtm-config.js +1 -1
- package/esm5/lib/interfaces/analytics/metricool-pixel.js +1 -1
- package/esm5/lib/interfaces/block.js +1 -1
- package/esm5/lib/interfaces/cart/cart-affordable.js +1 -1
- package/esm5/lib/interfaces/checkout/checkout-error.js +1 -1
- package/esm5/lib/interfaces/checkout-data.js +1 -1
- package/esm5/lib/interfaces/choose-options/filter-option.js +6 -6
- package/esm5/lib/interfaces/choose-options/options-of-product-list.js +1 -1
- package/esm5/lib/interfaces/cookies.js +1 -1
- package/esm5/lib/interfaces/core.interfaces.js +1 -1
- package/esm5/lib/interfaces/coupon.js +1 -1
- package/esm5/lib/interfaces/deserializable.js +1 -1
- package/esm5/lib/interfaces/faqs.js +1 -1
- package/esm5/lib/interfaces/filter.js +1 -1
- package/esm5/lib/interfaces/filterStep.js +1 -1
- package/esm5/lib/interfaces/observable-error.interface.js +1 -1
- package/esm5/lib/interfaces/paginate.js +1 -1
- package/esm5/lib/interfaces/parameters.js +1 -1
- package/esm5/lib/interfaces/selection.js +4 -4
- package/esm5/lib/interfaces/step.js +1 -1
- package/esm5/lib/interfaces/store.js +1 -1
- package/esm5/lib/ng-easycommerce.module.js +185 -185
- package/esm5/lib/pipes/order-by.pipe.js +106 -106
- package/esm5/lib/services/account/orders.service.js +120 -120
- package/esm5/lib/services/analytics.service.js +60 -60
- package/esm5/lib/services/auth.service.js +426 -426
- package/esm5/lib/services/banner.service.js +81 -81
- package/esm5/lib/services/blocks/blocks-repository.service.js +94 -94
- package/esm5/lib/services/blocks/blocks.service.js +79 -79
- package/esm5/lib/services/captcha.service.js +132 -132
- package/esm5/lib/services/cart.service.js +704 -704
- package/esm5/lib/services/channel-config.service.js +107 -107
- package/esm5/lib/services/checkout/addressing.service.js +280 -280
- package/esm5/lib/services/checkout/checkout.service.js +316 -316
- package/esm5/lib/services/checkout/error-handler.service.js +83 -83
- package/esm5/lib/services/checkout/payment.service.js +129 -129
- package/esm5/lib/services/checkout/shipment.service.js +265 -265
- package/esm5/lib/services/concatenated-associations.service.js +162 -162
- package/esm5/lib/services/cookies.service.js +222 -222
- package/esm5/lib/services/currency.service.js +205 -205
- package/esm5/lib/services/dataform.service.js +48 -48
- package/esm5/lib/services/filters.service.js +125 -125
- package/esm5/lib/services/gift-card.service.js +63 -63
- package/esm5/lib/services/ip-address.service.js +35 -35
- package/esm5/lib/services/options.service.js +376 -376
- package/esm5/lib/services/pagination.service.js +79 -79
- package/esm5/lib/services/parameters.service.js +74 -74
- package/esm5/lib/services/products/product-detail.service.js +497 -497
- package/esm5/lib/services/products/products.service.js +345 -345
- package/esm5/lib/services/reviews.service.js +116 -116
- package/esm5/lib/services/stores.service.js +39 -39
- package/esm5/lib/services/windows.service.js +79 -79
- package/esm5/lib/services/wishlist.service.js +71 -71
- package/esm5/lib/strategies/standard.strategy.js +44 -44
- package/esm5/lib/utils/analytics/doppler.service.js +39 -39
- package/esm5/lib/utils/analytics/facebook-pixel.service.js +145 -145
- package/esm5/lib/utils/analytics/google-analytics.service.js +280 -280
- package/esm5/lib/utils/analytics/gtm.service.js +358 -358
- package/esm5/lib/utils/analytics/metricool-pixel.service.js +40 -40
- package/esm5/lib/utils/options-of-product-list-data.service.js +98 -98
- package/esm5/lib/utils/order-util.service.js +75 -75
- package/esm5/lib/utils/payment-utils.service.js +37 -37
- package/esm5/lib/utils/shipment-transformer.service.js +78 -78
- package/esm5/lib/utils/toast.service.js +61 -61
- package/esm5/lib/utils/utils.service.js +22 -22
- package/esm5/ng-easycommerce.js +34 -34
- package/esm5/public-api.js +146 -146
- package/fesm2015/ng-easycommerce.js +16657 -16657
- package/fesm2015/ng-easycommerce.js.map +1 -1
- package/fesm5/ng-easycommerce.js +19685 -19685
- package/fesm5/ng-easycommerce.js.map +1 -1
- package/lib/api/connection.service.d.ts +28 -28
- package/lib/classes/checkout/step-service.d.ts +28 -28
- package/lib/classes/checkout/step.d.ts +14 -14
- package/lib/classes/checkout-process-state.d.ts +12 -12
- package/lib/classes/component-helper.d.ts +8 -8
- package/lib/classes/filters/AttributesFilter.d.ts +18 -18
- package/lib/classes/filters/CategoryFilter.d.ts +17 -17
- package/lib/classes/filters/DinamycsFilter.d.ts +15 -15
- package/lib/classes/filters/Filter.d.ts +19 -19
- package/lib/classes/filters/PriceRangeFilter.d.ts +18 -18
- package/lib/classes/filters/SortFilter.d.ts +15 -15
- package/lib/classes/user-role-type.d.ts +5 -5
- package/lib/classes/user.d.ts +68 -68
- package/lib/core.consts.d.ts +216 -216
- package/lib/ec-component/account-ec/account-ec.component.d.ts +13 -13
- package/lib/ec-component/account-ec/order-ec/order-ec.component.d.ts +33 -33
- package/lib/ec-component/account-ec/orders-list-ec/orders-list-ec.component.d.ts +84 -84
- package/lib/ec-component/auth-ec/auth-ec.component.d.ts +35 -35
- package/lib/ec-component/auth-ec/confirm-account-ec/confirm-account-ec.component.d.ts +13 -13
- package/lib/ec-component/auth-ec/forgot-password-ec/forgot-password-ec.component.d.ts +16 -16
- package/lib/ec-component/auth-ec/login-form-ec/login-form-ec.component.d.ts +26 -26
- package/lib/ec-component/auth-ec/register-form-ec/register-form-ec.component.d.ts +34 -34
- package/lib/ec-component/auth-ec/register-wholesaler-form-ec/register-wholesaler-form-ec.component.d.ts +42 -42
- package/lib/ec-component/auth-ec/select-channel-ec/select-channel-ec.component.d.ts +23 -23
- package/lib/ec-component/blocks-ec/block-banner-boxes-ec/block-banner-boxes-ec.component.d.ts +34 -34
- package/lib/ec-component/blocks-ec/block-banner-full-ec/block-banner-full-ec.component.d.ts +27 -27
- package/lib/ec-component/blocks-ec/block-form-contact-ec/block-form-contact-ec.component.d.ts +34 -34
- package/lib/ec-component/blocks-ec/block-html-ec/block-html-ec.component.d.ts +10 -10
- package/lib/ec-component/blocks-ec/block-newsletter-ec/contact-form-news-ec.component.d.ts +40 -40
- package/lib/ec-component/blocks-ec/block-products-ec/block-products-ec.component.d.ts +25 -25
- package/lib/ec-component/blocks-ec/blocks-ec.component.d.ts +24 -24
- package/lib/ec-component/build-your-ec/build-your-ec.component.d.ts +122 -122
- package/lib/ec-component/build-your-ec/product-found-ec/product-found-ec.component.d.ts +41 -41
- package/lib/ec-component/cart-ec/cart-ec.component.d.ts +59 -59
- package/lib/ec-component/checkout-ec/checkout-ec.component.d.ts +43 -43
- package/lib/ec-component/checkout-ec/dataform-ec/dataform-ec.component.d.ts +100 -100
- package/lib/ec-component/checkout-ec/detail-checkout-block-ec/detail-checkout-block-ec.component.d.ts +27 -27
- package/lib/ec-component/checkout-ec/payment-ec/payment-ec.component.d.ts +57 -57
- package/lib/ec-component/checkout-ec/shipment-ec/shipment-ec.component.d.ts +34 -34
- package/lib/ec-component/checkout-ec/step-ec/step-ec.component.d.ts +18 -18
- package/lib/ec-component/checkout-ec/success-ec/success-ec.component.d.ts +33 -33
- package/lib/ec-component/checkout-error-ec/checkout-error-ec.component.d.ts +25 -25
- package/lib/ec-component/collection-ec/collection-ec.component.d.ts +67 -67
- package/lib/ec-component/compared-products-ec/compared-products-ec.component.d.ts +70 -70
- package/lib/ec-component/cookies-ec/cookies-ec.component.d.ts +44 -44
- package/lib/ec-component/cookies-ec/modal-config-ec/modal-config-ec.component.d.ts +10 -10
- package/lib/ec-component/cookies-ec/modal-cookies-ec/modal-cookies-ec.component.d.ts +8 -8
- package/lib/ec-component/cookies-ec/sidebar-cookies-ec/sidebar-cookies-ec.component.d.ts +9 -9
- package/lib/ec-component/cookies-ec/toast-cookies-ec/toast-cookies-ec.component.d.ts +9 -9
- package/lib/ec-component/coupon-ec/coupon-ec.component.d.ts +17 -17
- package/lib/ec-component/faqs-content-ec/faqs-content-ec.component.d.ts +15 -15
- package/lib/ec-component/filters-ec/filters-ec.component.d.ts +33 -33
- package/lib/ec-component/filters-top-ec/filters-top-ec.component.d.ts +23 -23
- package/lib/ec-component/footer-ec/footer-ec.component.d.ts +30 -30
- package/lib/ec-component/header-ec/header-ec.component.d.ts +66 -66
- package/lib/ec-component/home-ec/home-ec.component.d.ts +13 -13
- package/lib/ec-component/index.d.ts +81 -81
- package/lib/ec-component/login-ec/login-ec.component.d.ts +26 -26
- package/lib/ec-component/multiple-items-to-cart-ec/multiple-items-to-cart-ec.component.d.ts +28 -28
- package/lib/ec-component/password-reset-ec/password-reset-ec.component.d.ts +27 -27
- package/lib/ec-component/product-detail-ec/product-detail-ec.component.d.ts +60 -60
- package/lib/ec-component/product-ec/product-ec.component.d.ts +52 -52
- package/lib/ec-component/related-products-ec/related-products-ec.component.d.ts +22 -22
- package/lib/ec-component/reviews-ec/reviews-ec.component.d.ts +29 -29
- package/lib/ec-component/reviews-form-ec/reviews-form-ec.component.d.ts +61 -61
- package/lib/ec-component/section-container-ec/section-container-ec.component.d.ts +22 -22
- package/lib/ec-component/seller-dashboard-container-ec/seller-dashboard-container-ec.component.d.ts +37 -37
- package/lib/ec-component/share-block-ec/share-block-ec.component.d.ts +26 -26
- package/lib/ec-component/sidebar-ec/sidebar-ec.component.d.ts +29 -29
- package/lib/ec-component/stores-ec/stores-ec.component.d.ts +54 -54
- package/lib/ec-component/variants-ec/variants-ec.component.d.ts +14 -14
- package/lib/ec-component/widgets-ec/bamboo-ec/bamboo-ec.component.d.ts +60 -60
- package/lib/ec-component/widgets-ec/bancard-catastro-ec/bancard-catastro-ec.component.d.ts +105 -105
- package/lib/ec-component/widgets-ec/bancard-ec/bancard-ec.component.d.ts +46 -46
- package/lib/ec-component/widgets-ec/bancard-redirect-ec/bancard-redirect-ec.component.d.ts +44 -44
- package/lib/ec-component/widgets-ec/cart-load-ec/cart-load-ec.component.d.ts +14 -14
- package/lib/ec-component/widgets-ec/ceca-redirect-ec/ceca-redirect-ec.component.d.ts +38 -38
- package/lib/ec-component/widgets-ec/culqi-ec/culqi-ec.component.d.ts +38 -38
- package/lib/ec-component/widgets-ec/decidir-ec/decidir-ec.component.d.ts +53 -53
- package/lib/ec-component/widgets-ec/loading-full-ec/loading-full-ec.component.d.ts +6 -6
- package/lib/ec-component/widgets-ec/loading-inline-ec/loading-inline-ec.component.d.ts +5 -5
- package/lib/ec-component/widgets-ec/loading-section-ec/loading-section-ec.component.d.ts +5 -5
- package/lib/ec-component/widgets-ec/mercadopago-ec/mp-redirect-ec/mp-redirect-ec.component.d.ts +43 -43
- package/lib/ec-component/widgets-ec/mercadopago-ec/mpcredit-ec/mpcredit-ec.component.d.ts +64 -64
- package/lib/ec-component/widgets-ec/mobbex-ec/mobbex-ec.component.d.ts +46 -46
- package/lib/ec-component/widgets-ec/paypal-express-ec/paypal-express-ec.component.d.ts +41 -41
- package/lib/ec-component/widgets-ec/place-to-pay-ec/place-to-pay-ec.component.d.ts +34 -34
- package/lib/ec-component/widgets-ec/price-ec/price-ec.component.d.ts +31 -31
- package/lib/ec-component/widgets-ec/rating-ec/rating-ec.component.d.ts +28 -28
- package/lib/ec-component/widgets-ec/re-captcha-ec/re-captcha-ec.component.d.ts +24 -24
- package/lib/ec-component/widgets-ec/redsys-catch-ec/redsys-catch-ec.component.d.ts +14 -14
- package/lib/ec-component/widgets-ec/redsys-pro-ec/redsys-pro-ec.component.d.ts +44 -44
- package/lib/ec-component/widgets-ec/redsys-redirect-ec/redsys-redirect-ec.component.d.ts +38 -38
- package/lib/ec-component/widgets-ec/redsys-redirect-out-ec/redsys-redirect-out-ec.component.d.ts +42 -42
- package/lib/ec-component/widgets-ec/zoom-ec/magnizoom.component.d.ts +66 -66
- package/lib/ec-directive/add-action-redirect.directive.d.ts +26 -26
- package/lib/ec-directive/auth-wholesaler.directive.d.ts +17 -17
- package/lib/ec-directive/index.d.ts +6 -6
- package/lib/ec-directive/product-mini-standard.directive.d.ts +19 -19
- package/lib/ec-directive/product-off.directive.d.ts +22 -22
- package/lib/ec-directive/product-stock.directive.d.ts +15 -15
- package/lib/ec-directive/reload-view.directive.d.ts +8 -8
- package/lib/ec-pipe/ec-currency-symbol.pipe.d.ts +19 -19
- package/lib/ec-pipe/ec-sanitizer-html.pipe.d.ts +7 -7
- package/lib/ec-pipe/ec-sanitizer-url.pipe.d.ts +7 -7
- package/lib/ec-pipe/index.d.ts +4 -4
- package/lib/guards/able-buyer-guard.service.d.ts +8 -8
- package/lib/guards/auth-guard.service.d.ts +8 -8
- package/lib/guards/checkout-ready.service.d.ts +8 -8
- package/lib/guards/loggedin-guard.service.d.ts +8 -8
- package/lib/guards/user-role-guard.service.d.ts +8 -8
- package/lib/interceptors/auth.interceptor.d.ts +9 -9
- package/lib/interceptors/customer.interceptor.d.ts +9 -9
- package/lib/interfaces/Script.d.ts +5 -5
- package/lib/interfaces/analytics/event-key.model.d.ts +1 -1
- package/lib/interfaces/analytics/facebook-pixel/facebook-pixel-model.d.ts +5 -5
- package/lib/interfaces/analytics/gtm-config.d.ts +6 -6
- package/lib/interfaces/analytics/metricool-pixel.d.ts +3 -3
- package/lib/interfaces/block.d.ts +33 -33
- package/lib/interfaces/cart/cart-affordable.d.ts +8 -8
- package/lib/interfaces/cart-item.d.ts +8 -8
- package/lib/interfaces/checkout/checkout-error.d.ts +7 -7
- package/lib/interfaces/checkout-data.d.ts +6 -6
- package/lib/interfaces/choose-options/filter-option.d.ts +16 -16
- package/lib/interfaces/choose-options/options-of-product-list.d.ts +5 -5
- package/lib/interfaces/cookies.d.ts +49 -49
- package/lib/interfaces/core.interfaces.d.ts +4 -4
- package/lib/interfaces/coupon.d.ts +5 -5
- package/lib/interfaces/currencyConfig.d.ts +10 -10
- package/lib/interfaces/deserializable.d.ts +3 -3
- package/lib/interfaces/faqs.d.ts +12 -12
- package/lib/interfaces/filter.d.ts +51 -51
- package/lib/interfaces/filterStep.d.ts +29 -29
- package/lib/interfaces/navbar-items.d.ts +9 -9
- package/lib/interfaces/observable-error.interface.d.ts +5 -5
- package/lib/interfaces/paginate.d.ts +1 -1
- package/lib/interfaces/parameters.d.ts +10 -10
- package/lib/interfaces/paramsInterfaces/paramsProductsWithUniqueVariant.d.ts +6 -6
- package/lib/interfaces/product.d.ts +46 -46
- package/lib/interfaces/selection.d.ts +10 -10
- package/lib/interfaces/step.d.ts +8 -8
- package/lib/interfaces/store.d.ts +17 -17
- package/lib/ng-easycommerce.module.d.ts +5 -5
- package/lib/pipes/order-by.pipe.d.ts +5 -5
- package/lib/services/account/orders.service.d.ts +29 -29
- package/lib/services/analytics.service.d.ts +21 -21
- package/lib/services/auth.service.d.ts +116 -116
- package/lib/services/banner.service.d.ts +26 -26
- package/lib/services/blocks/blocks-repository.service.d.ts +19 -19
- package/lib/services/blocks/blocks.service.d.ts +25 -25
- package/lib/services/captcha.service.d.ts +76 -76
- package/lib/services/cart.service.d.ts +140 -140
- package/lib/services/channel-config.service.d.ts +35 -35
- package/lib/services/checkout/addressing.service.d.ts +239 -239
- package/lib/services/checkout/checkout.service.d.ts +71 -71
- package/lib/services/checkout/error-handler.service.d.ts +19 -19
- package/lib/services/checkout/payment.service.d.ts +34 -34
- package/lib/services/checkout/shipment.service.d.ts +58 -58
- package/lib/services/concatenated-associations.service.d.ts +57 -57
- package/lib/services/cookies.service.d.ts +66 -66
- package/lib/services/currency.service.d.ts +65 -65
- package/lib/services/dataform.service.d.ts +13 -13
- package/lib/services/filters.service.d.ts +48 -48
- package/lib/services/gift-card.service.d.ts +19 -19
- package/lib/services/ip-address.service.d.ts +10 -10
- package/lib/services/options.service.d.ts +61 -61
- package/lib/services/pagination.service.d.ts +30 -30
- package/lib/services/parameters.service.d.ts +18 -18
- package/lib/services/products/product-detail.service.d.ts +115 -115
- package/lib/services/products/products.service.d.ts +101 -101
- package/lib/services/reviews.service.d.ts +71 -71
- package/lib/services/stores.service.d.ts +11 -11
- package/lib/services/windows.service.d.ts +13 -13
- package/lib/services/wishlist.service.d.ts +13 -13
- package/lib/strategies/standard.strategy.d.ts +12 -12
- package/lib/utils/analytics/doppler.service.d.ts +9 -9
- package/lib/utils/analytics/facebook-pixel.service.d.ts +23 -23
- package/lib/utils/analytics/google-analytics.service.d.ts +30 -30
- package/lib/utils/analytics/gtm.service.d.ts +34 -34
- package/lib/utils/analytics/metricool-pixel.service.d.ts +9 -9
- package/lib/utils/options-of-product-list-data.service.d.ts +5 -5
- package/lib/utils/order-util.service.d.ts +12 -12
- package/lib/utils/payment-utils.service.d.ts +5 -5
- package/lib/utils/shipment-transformer.service.d.ts +8 -8
- package/lib/utils/toast.service.d.ts +15 -15
- package/lib/utils/utils.service.d.ts +4 -4
- package/ng-easycommerce.d.ts +34 -34
- package/ng-easycommerce.metadata.json +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +144 -144
|
@@ -1,144 +1,144 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
extendStatics(d, b);
|
|
10
|
-
function __() { this.constructor = d; }
|
|
11
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
12
|
-
};
|
|
13
|
-
})();
|
|
14
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
15
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
16
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
17
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
18
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
19
|
-
};
|
|
20
|
-
import { Component, Output, OnInit, Input, EventEmitter, OnDestroy, Renderer2 } from '@angular/core';
|
|
21
|
-
import { ComponentHelper } from "../../../classes/component-helper";
|
|
22
|
-
import { ConnectionService } from '../../../api/connection.service';
|
|
23
|
-
import { ToastService } from '../../../utils/toast.service';
|
|
24
|
-
import { Constants } from '../../../core.consts';
|
|
25
|
-
import { CartService } from '../../../services/cart.service';
|
|
26
|
-
import { ActivatedRoute } from '@angular/router';
|
|
27
|
-
var PlaceToPayEcComponent = /** @class */ (function (_super) {
|
|
28
|
-
__extends(PlaceToPayEcComponent, _super);
|
|
29
|
-
function PlaceToPayEcComponent(renderer, connection, toastrService, consts, cartService, activedRoute) {
|
|
30
|
-
var _this = _super.call(this) || this;
|
|
31
|
-
_this.renderer = renderer;
|
|
32
|
-
_this.connection = connection;
|
|
33
|
-
_this.toastrService = toastrService;
|
|
34
|
-
_this.consts = consts;
|
|
35
|
-
_this.cartService = cartService;
|
|
36
|
-
_this.activedRoute = activedRoute;
|
|
37
|
-
_this.method = null;
|
|
38
|
-
_this.total_amount = 0;
|
|
39
|
-
_this.ready = new EventEmitter();
|
|
40
|
-
_this.loading = false;
|
|
41
|
-
_this.closeModal = '';
|
|
42
|
-
_this.dataRedirect = function () {
|
|
43
|
-
return _this.consts.getUrlBase() + 'shop-api/' + _this.consts.getChannel() + '/place-to-pay/' + _this.cartService.cart_token + '/process-payment';
|
|
44
|
-
};
|
|
45
|
-
_this.iniciar = function () {
|
|
46
|
-
_this.closeModal = '';
|
|
47
|
-
_this.clearStorageState();
|
|
48
|
-
_this.ventana = window.open(_this.url);
|
|
49
|
-
_this.callState();
|
|
50
|
-
};
|
|
51
|
-
_this.clearStorageState = function () {
|
|
52
|
-
sessionStorage.removeItem('state');
|
|
53
|
-
localStorage.removeItem('state');
|
|
54
|
-
};
|
|
55
|
-
_this.clickClose = function () {
|
|
56
|
-
var _a;
|
|
57
|
-
_this.closeModal = 'cancel';
|
|
58
|
-
(_a = _this.ventana) === null || _a === void 0 ? void 0 : _a.close();
|
|
59
|
-
};
|
|
60
|
-
_this.callState = function () {
|
|
61
|
-
var _a, _b, _c, _d;
|
|
62
|
-
var state = _this.closeModal !== '' ? _this.closeModal : localStorage.getItem('state');
|
|
63
|
-
!state && ((_a = _this.ventana) === null || _a === void 0 ? void 0 : _a.closed) && (state = 'cancel');
|
|
64
|
-
_this.loading = true;
|
|
65
|
-
if (state) {
|
|
66
|
-
_this.loading = false;
|
|
67
|
-
localStorage.removeItem('state');
|
|
68
|
-
if (state === 'success' || state === 'pending') {
|
|
69
|
-
(_b = _this.ventana) === null || _b === void 0 ? void 0 : _b.close();
|
|
70
|
-
_this.ready.emit(true);
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
if (state === 'failure' || state === 'cancel') {
|
|
74
|
-
(_c = _this.ventana) === null || _c === void 0 ? void 0 : _c.close();
|
|
75
|
-
_this.getPreference();
|
|
76
|
-
_this.processError(state === 'cancel' ? 'Se canceló el pago con Place to Pay' : '');
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
(_d = _this.ventana) === null || _d === void 0 ? void 0 : _d.close();
|
|
80
|
-
_this.processError('');
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
setTimeout(function () {
|
|
84
|
-
_this.callState();
|
|
85
|
-
}, 5000);
|
|
86
|
-
};
|
|
87
|
-
_this.processError = function (err) {
|
|
88
|
-
_this.toastrService.show(err !== '' ? err : 'payment-error');
|
|
89
|
-
};
|
|
90
|
-
_this.getPreference = function () {
|
|
91
|
-
_this.paymentServiceInst.getCheckoutPlaceToPay(_this.allData).then(function (res) {
|
|
92
|
-
var _a, _b;
|
|
93
|
-
if (((_a = res.status) === null || _a === void 0 ? void 0 : _a.status) === 'OK') {
|
|
94
|
-
_this.url = res.processUrl;
|
|
95
|
-
}
|
|
96
|
-
else {
|
|
97
|
-
_this.processError(((_b = res.status) === null || _b === void 0 ? void 0 : _b.message) || 'Ocurrió un error. Inténtelo más tarde.');
|
|
98
|
-
}
|
|
99
|
-
}, function (err) { return _this.processError('Ocurrió un error al procesar el pago. Inténtelo más tarde.'); });
|
|
100
|
-
};
|
|
101
|
-
_this.ecOnConstruct();
|
|
102
|
-
return _this;
|
|
103
|
-
}
|
|
104
|
-
PlaceToPayEcComponent.prototype.ngOnInit = function () {
|
|
105
|
-
this.getPreference();
|
|
106
|
-
this.ecOnInit();
|
|
107
|
-
};
|
|
108
|
-
PlaceToPayEcComponent.prototype.ngOnDestroy = function () {
|
|
109
|
-
// Código necesario al destruir el componente
|
|
110
|
-
};
|
|
111
|
-
PlaceToPayEcComponent.ctorParameters = function () { return [
|
|
112
|
-
{ type: Renderer2 },
|
|
113
|
-
{ type: ConnectionService },
|
|
114
|
-
{ type: ToastService },
|
|
115
|
-
{ type: Constants },
|
|
116
|
-
{ type: CartService },
|
|
117
|
-
{ type: ActivatedRoute }
|
|
118
|
-
]; };
|
|
119
|
-
__decorate([
|
|
120
|
-
Input()
|
|
121
|
-
], PlaceToPayEcComponent.prototype, "method", void 0);
|
|
122
|
-
__decorate([
|
|
123
|
-
Input()
|
|
124
|
-
], PlaceToPayEcComponent.prototype, "total_amount", void 0);
|
|
125
|
-
__decorate([
|
|
126
|
-
Input()
|
|
127
|
-
], PlaceToPayEcComponent.prototype, "paymentServiceInst", void 0);
|
|
128
|
-
__decorate([
|
|
129
|
-
Input()
|
|
130
|
-
], PlaceToPayEcComponent.prototype, "allData", void 0);
|
|
131
|
-
__decorate([
|
|
132
|
-
Output()
|
|
133
|
-
], PlaceToPayEcComponent.prototype, "ready", void 0);
|
|
134
|
-
PlaceToPayEcComponent = __decorate([
|
|
135
|
-
Component({
|
|
136
|
-
selector: 'app-place-to-pay-ec',
|
|
137
|
-
template: "<div class=\"text-center\">\n <ng-container *ngIf=\"url; else loadingUrl\">\n <ng-container *ngIf=\"!loading; else loadingTemp\">\n <button (click)=\"iniciar()\" class=\"btn btn-outline-secondary rounded-0 comprar mt-3\">Pagar</button>\n </ng-container>\n </ng-container>\n</div>\n\n<ng-template #loadingUrl>\n <div class=\"d-flex flex-column justify-content-center align-items-center mt-2\">\n <app-loading-full-ec></app-loading-full-ec>\n </div>\n</ng-template>\n\n<ng-template #loadingTemp>\n <div class=\"d-flex flex-column justify-content-center align-items-center mt-2\">\n <h3>Procesando el pago por Place to Pay</h3>\n <h5>Recuerde hacer click en \"Volver al sitio\" desde Place to Pay para finalizar la compra.</h5>\n <app-loading-full-ec></app-loading-full-ec>\n </div>\n <div class=\"container-fluid\">\n <div class=\"row\">\n <div class=\"col-5\">\n <hr>\n </div>\n <div class=\"col-2 text-center\">\n <label>o</label>\n </div>\n <div class=\"col-5\">\n <hr>\n </div>\n </div>\n </div>\n <div class=\"d-flex flex-column justify-content-center align-items-center mt-2\">\n <button (click)=\"clickClose()\" class=\"btn btn-outline-secondary rounded-0 comprar\">Cancelar pago</button>\n </div>\n</ng-template>",
|
|
138
|
-
styles: [""]
|
|
139
|
-
})
|
|
140
|
-
], PlaceToPayEcComponent);
|
|
141
|
-
return PlaceToPayEcComponent;
|
|
142
|
-
}(ComponentHelper));
|
|
143
|
-
export { PlaceToPayEcComponent };
|
|
144
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGxhY2UtdG8tcGF5LWVjLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25nLWVhc3ljb21tZXJjZS8iLCJzb3VyY2VzIjpbImxpYi9lYy1jb21wb25lbnQvd2lkZ2V0cy1lYy9wbGFjZS10by1wYXktZWMvcGxhY2UtdG8tcGF5LWVjLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLEVBQUUsTUFBTSxFQUFFLEtBQUssRUFBRSxZQUFZLEVBQUUsU0FBUyxFQUFFLFNBQVMsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUNyRyxPQUFPLEVBQUUsZUFBZSxFQUFFLE1BQU0sbUNBQW1DLENBQUM7QUFDcEUsT0FBTyxFQUFFLGlCQUFpQixFQUFFLE1BQU0saUNBQWlDLENBQUM7QUFDcEUsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLDhCQUE4QixDQUFDO0FBQzVELE9BQU8sRUFBRSxTQ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1vdmVJdGVtKCdzdGF0ZScpO1xuXG4gICAgICAgICAgICBpZiAoc3RhdGUgPT09ICdzdWNjZXNzJyB8fCBzdGF0ZSA9PT0gJ3BlbmRpbmcnKSB7XG4gICAgICAgICAgICAgICAgdGhpcy52ZW50YW5hPy5jbG9zZSgpO1xuICAgICAgICAgICAgICAgIHRoaXMucmVhZHkuZW1pdCh0cnVlKTtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoc3RhdGUgPT09ICdmYWlsdXJlJyB8fCBzdGF0ZSA9PT0gJ2NhbmNlbCcpIHtcbiAgICAgICAgICAgICAgICB0aGlzLnZlbnRhbmE/LmNsb3NlKCk7XG4gICAgICAgICAgICAgICAgdGhpcy5nZXRQcmVmZXJlbmNlKCk7XG4gICAgICAgICAgICAgICAgdGhpcy5wcm9jZXNzRXJyb3Ioc3RhdGUgPT09ICdjYW5jZWwnID8gJ1NlIGNhbmNlbMOzIGVsIHBhZ28gY29uIFBsYWNlIHRvIFBheScgOiAnJyk7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB0aGlzLnZlbnRhbmE/LmNsb3NlKCk7XG4gICAgICAgICAgICB0aGlzLnByb2Nlc3NFcnJvcignJyk7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBzZXRUaW1lb3V0KCgpID0+IHtcbiAgICAgICAgICAgIHRoaXMuY2FsbFN0YXRlKCk7XG4gICAgICAgIH0sIDUwMDApO1xuICAgIH1cblxuICAgIHByb2Nlc3NFcnJvciA9IChlcnIpID0+IHtcbiAgICAgICAgdGhpcy50b2FzdHJTZXJ2aWNlLnNob3coZXJyICE9PSAnJyA/IGVyciA6ICdwYXltZW50LWVycm9yJyk7XG4gICAgfVxuXG4gICAgZ2V0UHJlZmVyZW5jZSA9ICgpID0+IHtcbiAgICAgICAgdGhpcy5wYXltZW50U2VydmljZUluc3QuZ2V0Q2hlY2tvdXRQbGFjZVRvUGF5KHRoaXMuYWxsRGF0YSkudGhlbihcbiAgICAgICAgICAgIHJlcyA9PiB7XG4gICAgICAgICAgICAgICAgaWYgKHJlcy5zdGF0dXM/LnN0YXR1cyA9PT0gJ09LJykge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnVybCA9IHJlcy5wcm9jZXNzVXJsO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucHJvY2Vzc0Vycm9yKHJlcy5zdGF0dXM/Lm1lc3NhZ2UgfHwgJ09jdXJyacOzIHVuIGVycm9yLiBJbnTDqW50ZWxvIG3DoXMgdGFyZGUuJyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGVyciA9PiB0aGlzLnByb2Nlc3NFcnJvcignT2N1cnJpw7MgdW4gZXJyb3IgYWwgcHJvY2VzYXIgZWwgcGFnby4gSW50w6ludGVsbyBtw6FzIHRhcmRlLicpXG4gICAgICAgICk7XG4gICAgfVxuXG59XG4iXX0=
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
extendStatics(d, b);
|
|
10
|
+
function __() { this.constructor = d; }
|
|
11
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
12
|
+
};
|
|
13
|
+
})();
|
|
14
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
15
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
16
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
17
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
18
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
19
|
+
};
|
|
20
|
+
import { Component, Output, OnInit, Input, EventEmitter, OnDestroy, Renderer2 } from '@angular/core';
|
|
21
|
+
import { ComponentHelper } from "../../../classes/component-helper";
|
|
22
|
+
import { ConnectionService } from '../../../api/connection.service';
|
|
23
|
+
import { ToastService } from '../../../utils/toast.service';
|
|
24
|
+
import { Constants } from '../../../core.consts';
|
|
25
|
+
import { CartService } from '../../../services/cart.service';
|
|
26
|
+
import { ActivatedRoute } from '@angular/router';
|
|
27
|
+
var PlaceToPayEcComponent = /** @class */ (function (_super) {
|
|
28
|
+
__extends(PlaceToPayEcComponent, _super);
|
|
29
|
+
function PlaceToPayEcComponent(renderer, connection, toastrService, consts, cartService, activedRoute) {
|
|
30
|
+
var _this = _super.call(this) || this;
|
|
31
|
+
_this.renderer = renderer;
|
|
32
|
+
_this.connection = connection;
|
|
33
|
+
_this.toastrService = toastrService;
|
|
34
|
+
_this.consts = consts;
|
|
35
|
+
_this.cartService = cartService;
|
|
36
|
+
_this.activedRoute = activedRoute;
|
|
37
|
+
_this.method = null;
|
|
38
|
+
_this.total_amount = 0;
|
|
39
|
+
_this.ready = new EventEmitter();
|
|
40
|
+
_this.loading = false;
|
|
41
|
+
_this.closeModal = '';
|
|
42
|
+
_this.dataRedirect = function () {
|
|
43
|
+
return _this.consts.getUrlBase() + 'shop-api/' + _this.consts.getChannel() + '/place-to-pay/' + _this.cartService.cart_token + '/process-payment';
|
|
44
|
+
};
|
|
45
|
+
_this.iniciar = function () {
|
|
46
|
+
_this.closeModal = '';
|
|
47
|
+
_this.clearStorageState();
|
|
48
|
+
_this.ventana = window.open(_this.url);
|
|
49
|
+
_this.callState();
|
|
50
|
+
};
|
|
51
|
+
_this.clearStorageState = function () {
|
|
52
|
+
sessionStorage.removeItem('state');
|
|
53
|
+
localStorage.removeItem('state');
|
|
54
|
+
};
|
|
55
|
+
_this.clickClose = function () {
|
|
56
|
+
var _a;
|
|
57
|
+
_this.closeModal = 'cancel';
|
|
58
|
+
(_a = _this.ventana) === null || _a === void 0 ? void 0 : _a.close();
|
|
59
|
+
};
|
|
60
|
+
_this.callState = function () {
|
|
61
|
+
var _a, _b, _c, _d;
|
|
62
|
+
var state = _this.closeModal !== '' ? _this.closeModal : localStorage.getItem('state');
|
|
63
|
+
!state && ((_a = _this.ventana) === null || _a === void 0 ? void 0 : _a.closed) && (state = 'cancel');
|
|
64
|
+
_this.loading = true;
|
|
65
|
+
if (state) {
|
|
66
|
+
_this.loading = false;
|
|
67
|
+
localStorage.removeItem('state');
|
|
68
|
+
if (state === 'success' || state === 'pending') {
|
|
69
|
+
(_b = _this.ventana) === null || _b === void 0 ? void 0 : _b.close();
|
|
70
|
+
_this.ready.emit(true);
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
if (state === 'failure' || state === 'cancel') {
|
|
74
|
+
(_c = _this.ventana) === null || _c === void 0 ? void 0 : _c.close();
|
|
75
|
+
_this.getPreference();
|
|
76
|
+
_this.processError(state === 'cancel' ? 'Se canceló el pago con Place to Pay' : '');
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
(_d = _this.ventana) === null || _d === void 0 ? void 0 : _d.close();
|
|
80
|
+
_this.processError('');
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
setTimeout(function () {
|
|
84
|
+
_this.callState();
|
|
85
|
+
}, 5000);
|
|
86
|
+
};
|
|
87
|
+
_this.processError = function (err) {
|
|
88
|
+
_this.toastrService.show(err !== '' ? err : 'payment-error');
|
|
89
|
+
};
|
|
90
|
+
_this.getPreference = function () {
|
|
91
|
+
_this.paymentServiceInst.getCheckoutPlaceToPay(_this.allData).then(function (res) {
|
|
92
|
+
var _a, _b;
|
|
93
|
+
if (((_a = res.status) === null || _a === void 0 ? void 0 : _a.status) === 'OK') {
|
|
94
|
+
_this.url = res.processUrl;
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
_this.processError(((_b = res.status) === null || _b === void 0 ? void 0 : _b.message) || 'Ocurrió un error. Inténtelo más tarde.');
|
|
98
|
+
}
|
|
99
|
+
}, function (err) { return _this.processError('Ocurrió un error al procesar el pago. Inténtelo más tarde.'); });
|
|
100
|
+
};
|
|
101
|
+
_this.ecOnConstruct();
|
|
102
|
+
return _this;
|
|
103
|
+
}
|
|
104
|
+
PlaceToPayEcComponent.prototype.ngOnInit = function () {
|
|
105
|
+
this.getPreference();
|
|
106
|
+
this.ecOnInit();
|
|
107
|
+
};
|
|
108
|
+
PlaceToPayEcComponent.prototype.ngOnDestroy = function () {
|
|
109
|
+
// Código necesario al destruir el componente
|
|
110
|
+
};
|
|
111
|
+
PlaceToPayEcComponent.ctorParameters = function () { return [
|
|
112
|
+
{ type: Renderer2 },
|
|
113
|
+
{ type: ConnectionService },
|
|
114
|
+
{ type: ToastService },
|
|
115
|
+
{ type: Constants },
|
|
116
|
+
{ type: CartService },
|
|
117
|
+
{ type: ActivatedRoute }
|
|
118
|
+
]; };
|
|
119
|
+
__decorate([
|
|
120
|
+
Input()
|
|
121
|
+
], PlaceToPayEcComponent.prototype, "method", void 0);
|
|
122
|
+
__decorate([
|
|
123
|
+
Input()
|
|
124
|
+
], PlaceToPayEcComponent.prototype, "total_amount", void 0);
|
|
125
|
+
__decorate([
|
|
126
|
+
Input()
|
|
127
|
+
], PlaceToPayEcComponent.prototype, "paymentServiceInst", void 0);
|
|
128
|
+
__decorate([
|
|
129
|
+
Input()
|
|
130
|
+
], PlaceToPayEcComponent.prototype, "allData", void 0);
|
|
131
|
+
__decorate([
|
|
132
|
+
Output()
|
|
133
|
+
], PlaceToPayEcComponent.prototype, "ready", void 0);
|
|
134
|
+
PlaceToPayEcComponent = __decorate([
|
|
135
|
+
Component({
|
|
136
|
+
selector: 'app-place-to-pay-ec',
|
|
137
|
+
template: "<div class=\"text-center\">\r\n <ng-container *ngIf=\"url; else loadingUrl\">\r\n <ng-container *ngIf=\"!loading; else loadingTemp\">\r\n <button (click)=\"iniciar()\" class=\"btn btn-outline-secondary rounded-0 comprar mt-3\">Pagar</button>\r\n </ng-container>\r\n </ng-container>\r\n</div>\r\n\r\n<ng-template #loadingUrl>\r\n <div class=\"d-flex flex-column justify-content-center align-items-center mt-2\">\r\n <app-loading-full-ec></app-loading-full-ec>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #loadingTemp>\r\n <div class=\"d-flex flex-column justify-content-center align-items-center mt-2\">\r\n <h3>Procesando el pago por Place to Pay</h3>\r\n <h5>Recuerde hacer click en \"Volver al sitio\" desde Place to Pay para finalizar la compra.</h5>\r\n <app-loading-full-ec></app-loading-full-ec>\r\n </div>\r\n <div class=\"container-fluid\">\r\n <div class=\"row\">\r\n <div class=\"col-5\">\r\n <hr>\r\n </div>\r\n <div class=\"col-2 text-center\">\r\n <label>o</label>\r\n </div>\r\n <div class=\"col-5\">\r\n <hr>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"d-flex flex-column justify-content-center align-items-center mt-2\">\r\n <button (click)=\"clickClose()\" class=\"btn btn-outline-secondary rounded-0 comprar\">Cancelar pago</button>\r\n </div>\r\n</ng-template>",
|
|
138
|
+
styles: [""]
|
|
139
|
+
})
|
|
140
|
+
], PlaceToPayEcComponent);
|
|
141
|
+
return PlaceToPayEcComponent;
|
|
142
|
+
}(ComponentHelper));
|
|
143
|
+
export { PlaceToPayEcComponent };
|
|
144
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGxhY2UtdG8tcGF5LWVjLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25nLWVhc3ljb21tZXJjZS8iLCJzb3V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T8uY2xvc2UoKTtcclxuICAgICAgICAgICAgICAgIHRoaXMuZ2V0UHJlZmVyZW5jZSgpO1xyXG4gICAgICAgICAgICAgICAgdGhpcy5wcm9jZXNzRXJyb3Ioc3RhdGUgPT09ICdjYW5jZWwnID8gJ1NlIGNhbmNlbMOzIGVsIHBhZ28gY29uIFBsYWNlIHRvIFBheScgOiAnJyk7XHJcbiAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIHRoaXMudmVudGFuYT8uY2xvc2UoKTtcclxuICAgICAgICAgICAgdGhpcy5wcm9jZXNzRXJyb3IoJycpO1xyXG4gICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBzZXRUaW1lb3V0KCgpID0+IHtcclxuICAgICAgICAgICAgdGhpcy5jYWxsU3RhdGUoKTtcclxuICAgICAgICB9LCA1MDAwKTtcclxuICAgIH1cclxuXHJcbiAgICBwcm9jZXNzRXJyb3IgPSAoZXJyKSA9PiB7XHJcbiAgICAgICAgdGhpcy50b2FzdHJTZXJ2aWNlLnNob3coZXJyICE9PSAnJyA/IGVyciA6ICdwYXltZW50LWVycm9yJyk7XHJcbiAgICB9XHJcblxyXG4gICAgZ2V0UHJlZmVyZW5jZSA9ICgpID0+IHtcclxuICAgICAgICB0aGlzLnBheW1lbnRTZXJ2aWNlSW5zdC5nZXRDaGVja291dFBsYWNlVG9QYXkodGhpcy5hbGxEYXRhKS50aGVuKFxyXG4gICAgICAgICAgICByZXMgPT4ge1xyXG4gICAgICAgICAgICAgICAgaWYgKHJlcy5zdGF0dXM/LnN0YXR1cyA9PT0gJ09LJykge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMudXJsID0gcmVzLnByb2Nlc3NVcmw7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMucHJvY2Vzc0Vycm9yKHJlcy5zdGF0dXM/Lm1lc3NhZ2UgfHwgJ09jdXJyacOzIHVuIGVycm9yLiBJbnTDqW50ZWxvIG3DoXMgdGFyZGUuJyk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIGVyciA9PiB0aGlzLnByb2Nlc3NFcnJvcignT2N1cnJpw7MgdW4gZXJyb3IgYWwgcHJvY2VzYXIgZWwgcGFnby4gSW50w6ludGVsbyBtw6FzIHRhcmRlLicpXHJcbiAgICAgICAgKTtcclxuICAgIH1cclxuXHJcbn1cclxuIl19
|
|
@@ -1,119 +1,119 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
extendStatics(d, b);
|
|
10
|
-
function __() { this.constructor = d; }
|
|
11
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
12
|
-
};
|
|
13
|
-
})();
|
|
14
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
15
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
16
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
17
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
18
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
19
|
-
};
|
|
20
|
-
import { Component, Input } from '@angular/core';
|
|
21
|
-
import { ProductsService } from '../../../services/products/products.service';
|
|
22
|
-
import { ComponentHelper } from '../../../classes/component-helper';
|
|
23
|
-
import { ChannelConfigService } from '../../../services/channel-config.service';
|
|
24
|
-
var PriceEcComponent = /** @class */ (function (_super) {
|
|
25
|
-
__extends(PriceEcComponent, _super);
|
|
26
|
-
function PriceEcComponent(productsService, channelConfigService) {
|
|
27
|
-
var _this = _super.call(this) || this;
|
|
28
|
-
_this.productsService = productsService;
|
|
29
|
-
_this.channelConfigService = channelConfigService;
|
|
30
|
-
_this.priceSize = true;
|
|
31
|
-
_this.taxeAmount = 0;
|
|
32
|
-
_this.taxes = [];
|
|
33
|
-
_this.showTaxLegendOnly = false;
|
|
34
|
-
_this.disableTaxInfo = false;
|
|
35
|
-
_this.
|
|
36
|
-
_this.hideTaxes = false;
|
|
37
|
-
_this.ecOnConstruct();
|
|
38
|
-
return _this;
|
|
39
|
-
}
|
|
40
|
-
PriceEcComponent.prototype.ngOnInit = function () {
|
|
41
|
-
var _this = this;
|
|
42
|
-
this.channelConfigService.channelConfig$.subscribe(function (channel) {
|
|
43
|
-
var _a, _b, _c;
|
|
44
|
-
_this.
|
|
45
|
-
_this.hideTaxes = (_c = (_b = channel) === null || _b === void 0 ? void 0 : _b.hideTaxes, (_c !== null && _c !== void 0 ? _c : false));
|
|
46
|
-
});
|
|
47
|
-
this.ecOnInit();
|
|
48
|
-
};
|
|
49
|
-
Object.defineProperty(PriceEcComponent.prototype, "shouldShowTaxes", {
|
|
50
|
-
get: function () {
|
|
51
|
-
return !this.disableTaxInfo &&
|
|
52
|
-
|
|
53
|
-
!this.hideTaxes &&
|
|
54
|
-
!!this.basePrice &&
|
|
55
|
-
!!this.taxeAmount;
|
|
56
|
-
},
|
|
57
|
-
enumerable: true,
|
|
58
|
-
configurable: true
|
|
59
|
-
});
|
|
60
|
-
PriceEcComponent.ctorParameters = function () { return [
|
|
61
|
-
{ type: ProductsService },
|
|
62
|
-
{ type: ChannelConfigService }
|
|
63
|
-
]; };
|
|
64
|
-
__decorate([
|
|
65
|
-
Input()
|
|
66
|
-
], PriceEcComponent.prototype, "price", void 0);
|
|
67
|
-
__decorate([
|
|
68
|
-
Input()
|
|
69
|
-
], PriceEcComponent.prototype, "saleprice", void 0);
|
|
70
|
-
__decorate([
|
|
71
|
-
Input()
|
|
72
|
-
], PriceEcComponent.prototype, "priceSize", void 0);
|
|
73
|
-
__decorate([
|
|
74
|
-
Input()
|
|
75
|
-
], PriceEcComponent.prototype, "classStrSpacing", void 0);
|
|
76
|
-
__decorate([
|
|
77
|
-
Input()
|
|
78
|
-
], PriceEcComponent.prototype, "basePrice", void 0);
|
|
79
|
-
__decorate([
|
|
80
|
-
Input()
|
|
81
|
-
], PriceEcComponent.prototype, "taxeAmount", void 0);
|
|
82
|
-
__decorate([
|
|
83
|
-
Input()
|
|
84
|
-
], PriceEcComponent.prototype, "taxes", void 0);
|
|
85
|
-
__decorate([
|
|
86
|
-
Input()
|
|
87
|
-
], PriceEcComponent.prototype, "showTaxLegendOnly", void 0);
|
|
88
|
-
__decorate([
|
|
89
|
-
Input()
|
|
90
|
-
], PriceEcComponent.prototype, "disableTaxInfo", void 0);
|
|
91
|
-
__decorate([
|
|
92
|
-
Input()
|
|
93
|
-
], PriceEcComponent.prototype, "customPriceTemplate", void 0);
|
|
94
|
-
__decorate([
|
|
95
|
-
Input()
|
|
96
|
-
], PriceEcComponent.prototype, "customSalePriceTemplate", void 0);
|
|
97
|
-
__decorate([
|
|
98
|
-
Input()
|
|
99
|
-
], PriceEcComponent.prototype, "customSimplePriceTemplate", void 0);
|
|
100
|
-
__decorate([
|
|
101
|
-
Input()
|
|
102
|
-
], PriceEcComponent.prototype, "customSimpleSalePriceTemplate", void 0);
|
|
103
|
-
__decorate([
|
|
104
|
-
Input()
|
|
105
|
-
], PriceEcComponent.prototype, "customTaxTemplate", void 0);
|
|
106
|
-
__decorate([
|
|
107
|
-
Input()
|
|
108
|
-
], PriceEcComponent.prototype, "customOnlyTaxLabelTemplate", void 0);
|
|
109
|
-
PriceEcComponent = __decorate([
|
|
110
|
-
Component({
|
|
111
|
-
selector: 'app-price-ec',
|
|
112
|
-
template: "<!-- Si hay templates personalizados, se proyectan -->\n<ng-container *ngIf=\"customSalePriceTemplate || customPriceTemplate; else defaultPriceBlock\">\n <ng-container *ngTemplateOutlet=\"customPriceTemplate || defaultPriceBlock\"></ng-container>\n</ng-container>\n\n<ng-template #defaultPriceBlock>\n <div *ngIf=\"saleprice; else onlyprice\" class=\"line-height-custom\">\n <div [class]=\"(priceSize ? 'price-sm' : 'price')\"\n *ngIf=\"price && price.split(' - ').length > 1; else simplePriceDel\">\n <del class=\"tachado\">\n {{ price.split(' - ')[0] | ecCurrencySymbol }}\n {{ price.split(' - ')[1] | ecCurrencySymbol }}\n </del>\n </div>\n <div [class]=\"(priceSize ? 'price-sm' : 'price')\"\n *ngIf=\"saleprice && saleprice.split(' - ').length > 1; else simpleSalePrice\">\n {{ saleprice.split(' - ')[0] | ecCurrencySymbol }}\n {{ saleprice.split(' - ')[1] | ecCurrencySymbol }}\n </div>\n </div>\n\n <ng-template #onlyprice>\n <div [class]=\"(priceSize ? 'price-sm' : 'price')\"\n *ngIf=\"price && price.split(' - ').length > 1; else simplePrice\">\n {{ price.split(' - ')[0] | ecCurrencySymbol }} -\n {{ price.split(' - ')[1] | ecCurrencySymbol }}\n </div>\n </ng-template>\n\n <ng-template #simplePrice>\n <ng-container *ngIf=\"customSimplePriceTemplate; else fallbackSimplePrice\">\n <ng-container *ngTemplateOutlet=\"customSimplePriceTemplate\"></ng-container>\n </ng-container>\n </ng-template>\n\n <ng-template #fallbackSimplePrice>\n <div [class]=\"'uno line-height-custom ' + (priceSize ? 'price-sm' : 'price')\">\n {{ price | ecCurrencySymbol }}\n </div>\n </ng-template>\n\n <ng-template #simplePriceDel>\n <div [class]=\"'dos line-height-custom ' + (priceSize ? 'price-sm' : 'price')\">\n <span class=\"lnth\">{{ price | ecCurrencySymbol }}</span>\n </div>\n </ng-template>\n\n <ng-template #simpleSalePrice>\n <ng-container *ngIf=\"customSimpleSalePriceTemplate; else fallbackSimpleSalePrice\">\n <ng-container *ngTemplateOutlet=\"customSimpleSalePriceTemplate\"></ng-container>\n </ng-container>\n </ng-template>\n\n <ng-template #fallbackSimpleSalePrice>\n <div [class]=\"'tres line-height-custom ' + (priceSize ? 'price-sm' : 'price')\">\n {{ saleprice | ecCurrencySymbol }}\n </div>\n </ng-template>\n</ng-template>\n\n<!-- Secci\u00F3n de impuestos -->\n<ng-container *ngIf=\"shouldShowTaxes\">\n <ng-container *ngIf=\"showTaxLegendOnly; else detailedTaxBlock\">\n <ng-container *ngIf=\"customOnlyTaxLabelTemplate; else defaultOnlyTaxLabelBlock\">\n <ng-container *ngTemplateOutlet=\"customOnlyTaxLabelTemplate\"></ng-container>\n </ng-container>\n <ng-template #defaultOnlyTaxLabelBlock>\n <p class=\"taxes-title\">{{'price-without-national-taxes' | translate }}: {{ basePrice | ecCurrencySymbol }}\n </p>\n </ng-template>\n </ng-container>\n\n <ng-template #detailedTaxBlock>\n <ng-container *ngIf=\"customTaxTemplate; else defaultTaxBlock\">\n <ng-container *ngTemplateOutlet=\"customTaxTemplate\"></ng-container>\n </ng-container>\n </ng-template>\n</ng-container>\n\n<ng-template #defaultTaxBlock>\n <div class=\"taxes-section\">\n <p class=\"taxes-title\">{{'price-without-national-taxes' | translate }}: {{ basePrice | ecCurrencySymbol }}</p>\n <ul class=\"taxes-list\">\n <li>\n {{ taxes.Name }}: {{ taxeAmount | ecCurrencySymbol }}\n </li>\n </ul>\n </div>\n</ng-template>",
|
|
113
|
-
styles: [".price-sm{font-size:13px}.price{font-size:18px}.lnth{text-decoration:line-through;color:gray}.taxes-section{margin-top:.5rem;border-radius:.5rem;font-size:.95rem;color:#333;line-height:1.4;max-width:400px}.taxes-title{font-weight:500;margin-bottom:.2rem;font-size:.7rem;color:#222}.taxes-list{list-style-type:none;padding-left:0;margin:0}.taxes-list li{margin-bottom:.05rem;font-size:.65rem;display:flex;justify-content:space-between}"]
|
|
114
|
-
})
|
|
115
|
-
], PriceEcComponent);
|
|
116
|
-
return PriceEcComponent;
|
|
117
|
-
}(ComponentHelper));
|
|
118
|
-
export { PriceEcComponent };
|
|
119
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
extendStatics(d, b);
|
|
10
|
+
function __() { this.constructor = d; }
|
|
11
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
12
|
+
};
|
|
13
|
+
})();
|
|
14
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
15
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
16
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
17
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
18
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
19
|
+
};
|
|
20
|
+
import { Component, Input } from '@angular/core';
|
|
21
|
+
import { ProductsService } from '../../../services/products/products.service';
|
|
22
|
+
import { ComponentHelper } from '../../../classes/component-helper';
|
|
23
|
+
import { ChannelConfigService } from '../../../services/channel-config.service';
|
|
24
|
+
var PriceEcComponent = /** @class */ (function (_super) {
|
|
25
|
+
__extends(PriceEcComponent, _super);
|
|
26
|
+
function PriceEcComponent(productsService, channelConfigService) {
|
|
27
|
+
var _this = _super.call(this) || this;
|
|
28
|
+
_this.productsService = productsService;
|
|
29
|
+
_this.channelConfigService = channelConfigService;
|
|
30
|
+
_this.priceSize = true;
|
|
31
|
+
_this.taxeAmount = 0;
|
|
32
|
+
_this.taxes = [];
|
|
33
|
+
_this.showTaxLegendOnly = false;
|
|
34
|
+
_this.disableTaxInfo = false;
|
|
35
|
+
_this.showTaxLegend = false;
|
|
36
|
+
_this.hideTaxes = false;
|
|
37
|
+
_this.ecOnConstruct();
|
|
38
|
+
return _this;
|
|
39
|
+
}
|
|
40
|
+
PriceEcComponent.prototype.ngOnInit = function () {
|
|
41
|
+
var _this = this;
|
|
42
|
+
this.channelConfigService.channelConfig$.subscribe(function (channel) {
|
|
43
|
+
var _a, _b, _c;
|
|
44
|
+
_this.showTaxLegend = (_a = channel) === null || _a === void 0 ? void 0 : _a.showTaxLegend;
|
|
45
|
+
_this.hideTaxes = (_c = (_b = channel) === null || _b === void 0 ? void 0 : _b.hideTaxes, (_c !== null && _c !== void 0 ? _c : false));
|
|
46
|
+
});
|
|
47
|
+
this.ecOnInit();
|
|
48
|
+
};
|
|
49
|
+
Object.defineProperty(PriceEcComponent.prototype, "shouldShowTaxes", {
|
|
50
|
+
get: function () {
|
|
51
|
+
return !this.disableTaxInfo &&
|
|
52
|
+
this.showTaxLegend &&
|
|
53
|
+
!this.hideTaxes &&
|
|
54
|
+
!!this.basePrice &&
|
|
55
|
+
!!this.taxeAmount;
|
|
56
|
+
},
|
|
57
|
+
enumerable: true,
|
|
58
|
+
configurable: true
|
|
59
|
+
});
|
|
60
|
+
PriceEcComponent.ctorParameters = function () { return [
|
|
61
|
+
{ type: ProductsService },
|
|
62
|
+
{ type: ChannelConfigService }
|
|
63
|
+
]; };
|
|
64
|
+
__decorate([
|
|
65
|
+
Input()
|
|
66
|
+
], PriceEcComponent.prototype, "price", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
Input()
|
|
69
|
+
], PriceEcComponent.prototype, "saleprice", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
Input()
|
|
72
|
+
], PriceEcComponent.prototype, "priceSize", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
Input()
|
|
75
|
+
], PriceEcComponent.prototype, "classStrSpacing", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
Input()
|
|
78
|
+
], PriceEcComponent.prototype, "basePrice", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
Input()
|
|
81
|
+
], PriceEcComponent.prototype, "taxeAmount", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
Input()
|
|
84
|
+
], PriceEcComponent.prototype, "taxes", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
Input()
|
|
87
|
+
], PriceEcComponent.prototype, "showTaxLegendOnly", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
Input()
|
|
90
|
+
], PriceEcComponent.prototype, "disableTaxInfo", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
Input()
|
|
93
|
+
], PriceEcComponent.prototype, "customPriceTemplate", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
Input()
|
|
96
|
+
], PriceEcComponent.prototype, "customSalePriceTemplate", void 0);
|
|
97
|
+
__decorate([
|
|
98
|
+
Input()
|
|
99
|
+
], PriceEcComponent.prototype, "customSimplePriceTemplate", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
Input()
|
|
102
|
+
], PriceEcComponent.prototype, "customSimpleSalePriceTemplate", void 0);
|
|
103
|
+
__decorate([
|
|
104
|
+
Input()
|
|
105
|
+
], PriceEcComponent.prototype, "customTaxTemplate", void 0);
|
|
106
|
+
__decorate([
|
|
107
|
+
Input()
|
|
108
|
+
], PriceEcComponent.prototype, "customOnlyTaxLabelTemplate", void 0);
|
|
109
|
+
PriceEcComponent = __decorate([
|
|
110
|
+
Component({
|
|
111
|
+
selector: 'app-price-ec',
|
|
112
|
+
template: "<!-- Si hay templates personalizados, se proyectan -->\r\n<ng-container *ngIf=\"customSalePriceTemplate || customPriceTemplate; else defaultPriceBlock\">\r\n <ng-container *ngTemplateOutlet=\"customPriceTemplate || defaultPriceBlock\"></ng-container>\r\n</ng-container>\r\n\r\n<ng-template #defaultPriceBlock>\r\n <div *ngIf=\"saleprice; else onlyprice\" class=\"line-height-custom\">\r\n <div [class]=\"(priceSize ? 'price-sm' : 'price')\"\r\n *ngIf=\"price && price.split(' - ').length > 1; else simplePriceDel\">\r\n <del class=\"tachado\">\r\n {{ price.split(' - ')[0] | ecCurrencySymbol }}\r\n {{ price.split(' - ')[1] | ecCurrencySymbol }}\r\n </del>\r\n </div>\r\n <div [class]=\"(priceSize ? 'price-sm' : 'price')\"\r\n *ngIf=\"saleprice && saleprice.split(' - ').length > 1; else simpleSalePrice\">\r\n {{ saleprice.split(' - ')[0] | ecCurrencySymbol }}\r\n {{ saleprice.split(' - ')[1] | ecCurrencySymbol }}\r\n </div>\r\n </div>\r\n\r\n <ng-template #onlyprice>\r\n <div [class]=\"(priceSize ? 'price-sm' : 'price')\"\r\n *ngIf=\"price && price.split(' - ').length > 1; else simplePrice\">\r\n {{ price.split(' - ')[0] | ecCurrencySymbol }} -\r\n {{ price.split(' - ')[1] | ecCurrencySymbol }}\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template #simplePrice>\r\n <ng-container *ngIf=\"customSimplePriceTemplate; else fallbackSimplePrice\">\r\n <ng-container *ngTemplateOutlet=\"customSimplePriceTemplate\"></ng-container>\r\n </ng-container>\r\n </ng-template>\r\n\r\n <ng-template #fallbackSimplePrice>\r\n <div [class]=\"'uno line-height-custom ' + (priceSize ? 'price-sm' : 'price')\">\r\n {{ price | ecCurrencySymbol }}\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template #simplePriceDel>\r\n <div [class]=\"'dos line-height-custom ' + (priceSize ? 'price-sm' : 'price')\">\r\n <span class=\"lnth\">{{ price | ecCurrencySymbol }}</span>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template #simpleSalePrice>\r\n <ng-container *ngIf=\"customSimpleSalePriceTemplate; else fallbackSimpleSalePrice\">\r\n <ng-container *ngTemplateOutlet=\"customSimpleSalePriceTemplate\"></ng-container>\r\n </ng-container>\r\n </ng-template>\r\n\r\n <ng-template #fallbackSimpleSalePrice>\r\n <div [class]=\"'tres line-height-custom ' + (priceSize ? 'price-sm' : 'price')\">\r\n {{ saleprice | ecCurrencySymbol }}\r\n </div>\r\n </ng-template>\r\n</ng-template>\r\n\r\n<!-- Secci\u00F3n de impuestos -->\r\n<ng-container *ngIf=\"shouldShowTaxes\">\r\n <ng-container *ngIf=\"showTaxLegendOnly; else detailedTaxBlock\">\r\n <ng-container *ngIf=\"customOnlyTaxLabelTemplate; else defaultOnlyTaxLabelBlock\">\r\n <ng-container *ngTemplateOutlet=\"customOnlyTaxLabelTemplate\"></ng-container>\r\n </ng-container>\r\n <ng-template #defaultOnlyTaxLabelBlock>\r\n <p class=\"taxes-title\">{{'price-without-national-taxes' | translate }}: {{ basePrice | ecCurrencySymbol }}\r\n </p>\r\n </ng-template>\r\n </ng-container>\r\n\r\n <ng-template #detailedTaxBlock>\r\n <ng-container *ngIf=\"customTaxTemplate; else defaultTaxBlock\">\r\n <ng-container *ngTemplateOutlet=\"customTaxTemplate\"></ng-container>\r\n </ng-container>\r\n </ng-template>\r\n</ng-container>\r\n\r\n<ng-template #defaultTaxBlock>\r\n <div class=\"taxes-section\">\r\n <p class=\"taxes-title\">{{'price-without-national-taxes' | translate }}: {{ basePrice | ecCurrencySymbol }}</p>\r\n <ul class=\"taxes-list\">\r\n <li>\r\n {{ taxes.Name }}: {{ taxeAmount | ecCurrencySymbol }}\r\n </li>\r\n </ul>\r\n </div>\r\n</ng-template>",
|
|
113
|
+
styles: [".price-sm{font-size:13px}.price{font-size:18px}.lnth{text-decoration:line-through;color:gray}.taxes-section{margin-top:.5rem;border-radius:.5rem;font-size:.95rem;color:#333;line-height:1.4;max-width:400px}.taxes-title{font-weight:500;margin-bottom:.2rem;font-size:.7rem;color:#222}.taxes-list{list-style-type:none;padding-left:0;margin:0}.taxes-list li{margin-bottom:.05rem;font-size:.65rem;display:flex;justify-content:space-between}"]
|
|
114
|
+
})
|
|
115
|
+
], PriceEcComponent);
|
|
116
|
+
return PriceEcComponent;
|
|
117
|
+
}(ComponentHelper));
|
|
118
|
+
export { PriceEcComponent };
|
|
119
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJpY2UtZWMuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmctZWFzeWNvbW1lcmNlLyIsInNvdXJjZXMiOlsibGliL2VjLWNvbXBvbmVudC93aWRnZXRzLWVjL3ByaWNlLWVjL3ByaWNlLWVjLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxLQUFLLEVBQXVCLE1BQU0sZUFBZSxDQUFDO0FBQ3RFLE9BQU8sRUFBRSxlQUFlLEVBQUUsTUFBTSw2Q0FBNkMsQ0FBQztBQUM5RSxPQUFPLEVBQUUsZUFBZSxFQUFFLE1BQU0sbUNBQW1DLENBQUM7QUFDcEUsT0FBTyxFQUFFLG9CQUFvQixFQUFFLE1BQU0sMENBQTBDLENBQUM7QUFRaEY7SUFBc0Msb0NBQWU7SUF1QmpELDBCQUFtQixlQUFnQyxFQUFVLG9CQUEwQztRQUF2RyxZQUNJLGlCQUFPLFNBRVY7UUFIa0IscUJBQWUsR0FBZixlQUFlLENBQWlCO1FBQVUsMEJBQW9CLEdBQXBCLG9CQUFvQixDQUFzQjtRQW5COUYsZUFBUyxHQUFZLElBQUksQ0FBQztRQUcxQixnQkFBVSxHQUFXLENBQUMsQ0FBQztRQUN2QixXQUFLLEdBQXVDLEVBQUUsQ0FBQztRQUMvQyx1QkFBaUIsR0FBWSxLQUFLLENBQUM7UUFDbkMsb0JBQWMsR0FBWSxLQUFLLENBQU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