ng-easycommerce 0.0.604 → 0.0.606
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 +947 -942
- 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 +292 -290
- package/assets/ec-i18n/en.json +2 -0
- package/assets/ec-i18n/es.json +402 -400
- package/assets/ec-i18n/fr.json +2 -0
- package/assets/ec-i18n/gl.json +292 -290
- package/assets/ec-i18n/pr.json +292 -290
- 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 +19548 -19544
- 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 +14 -14
- 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 +119 -119
- package/esm2015/lib/ec-component/account-ec/orders-list-ec/orders-list-ec.component.js +196 -196
- 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 -166
- 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 +138 -138
- 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 +398 -398
- 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 +88 -88
- package/esm2015/lib/ec-component/checkout-ec/payment-ec/payment-ec.component.js +129 -128
- 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 -65
- 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 +80 -80
- package/esm2015/lib/ec-component/header-ec/header-ec.component.js +191 -191
- 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 +168 -168
- package/esm2015/lib/ec-component/product-ec/product-ec.component.js +133 -133
- 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 +127 -127
- 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 +125 -125
- package/esm2015/lib/ec-component/widgets-ec/price-ec/price-ec.component.js +44 -44
- 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 +571 -571
- 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 +429 -429
- 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 +18 -18
- 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 +173 -173
- package/esm5/lib/ec-component/account-ec/orders-list-ec/orders-list-ec.component.js +213 -213
- 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 -183
- 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 +166 -166
- 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 +482 -482
- 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 +105 -105
- package/esm5/lib/ec-component/checkout-ec/payment-ec/payment-ec.component.js +219 -218
- 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 -82
- 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 +109 -109
- package/esm5/lib/ec-component/header-ec/header-ec.component.js +250 -250
- 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 +195 -195
- package/esm5/lib/ec-component/product-ec/product-ec.component.js +151 -151
- 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 +130 -130
- 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 +143 -143
- package/esm5/lib/ec-component/widgets-ec/price-ec/price-ec.component.js +60 -60
- 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 +700 -700
- 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 +494 -494
- 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 +16539 -16535
- package/fesm2015/ng-easycommerce.js.map +1 -1
- package/fesm5/ng-easycommerce.js +19552 -19548
- 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 +34 -34
- package/lib/ec-component/account-ec/orders-list-ec/orders-list-ec.component.d.ts +85 -85
- 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 +57 -57
- 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 +24 -24
- package/lib/ec-component/checkout-ec/payment-ec/payment-ec.component.d.ts +53 -52
- 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 -32
- 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 +59 -59
- package/lib/ec-component/product-ec/product-ec.component.d.ts +49 -49
- 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 +27 -27
- 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 +12 -12
- 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 +139 -139
- 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,116 +1,116 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
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;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { Injectable } from '@angular/core';
|
|
8
|
-
import { BehaviorSubject } from 'rxjs';
|
|
9
|
-
import { ConnectionService } from '../api/connection.service';
|
|
10
|
-
import { Constants } from '../core.consts';
|
|
11
|
-
import { PaginationService } from './pagination.service';
|
|
12
|
-
import * as i0 from "@angular/core";
|
|
13
|
-
import * as i1 from "../../public-api";
|
|
14
|
-
import * as i2 from "../interfaces/paginate";
|
|
15
|
-
var ReviewsService = /** @class */ (function () {
|
|
16
|
-
function ReviewsService(connection, constants, pagination) {
|
|
17
|
-
var _this = this;
|
|
18
|
-
this.connection = connection;
|
|
19
|
-
this.constants = constants;
|
|
20
|
-
this.pagination = pagination;
|
|
21
|
-
this.reviewsSubject = new BehaviorSubject({});
|
|
22
|
-
this.reviews$ = this.reviewsSubject.asObservable();
|
|
23
|
-
//--Api--
|
|
24
|
-
this.reviewsByCodeApi = function (code) { return 'shop-api/' + _this.constants.getChannel() + '/products/by-code/' + code + '/reviews'; };
|
|
25
|
-
this.reviewsBySlugApi = function (slug) { return 'shop-api/' + _this.constants.getChannel() + '/products/by-slug/' + slug + '/reviews'; };
|
|
26
|
-
/**
|
|
27
|
-
* @description obtiene las reviews por el codigo del producto.
|
|
28
|
-
* @param code codigo del producto
|
|
29
|
-
* @returns
|
|
30
|
-
*/
|
|
31
|
-
this.getReviewsByCode = function (code) {
|
|
32
|
-
return _this.connection.get(_this.reviewsByCodeApi(code)).toPromise().then(function (res) { return _this.updateReviews(res); });
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* @description actualiza las reviews por codigo
|
|
36
|
-
* @param code codigo del producto
|
|
37
|
-
* @returns
|
|
38
|
-
*/
|
|
39
|
-
this.updateReviewsByCode = function (code) { return _this.getReviewsByCode(code); };
|
|
40
|
-
/**
|
|
41
|
-
* @description actualiza las reviews
|
|
42
|
-
* @param res
|
|
43
|
-
* @returns
|
|
44
|
-
*/
|
|
45
|
-
this.updateReviews = function (res) { return _this.reviewsSubject.next(res); };
|
|
46
|
-
/**
|
|
47
|
-
* @description obtiene las reviews utilizando las url del atributo links de las reviews.
|
|
48
|
-
* @param action self(defecto) | next | first | last
|
|
49
|
-
* @returns
|
|
50
|
-
*/
|
|
51
|
-
this.getReviews = function (action) {
|
|
52
|
-
if (action === void 0) { action = 'self'; }
|
|
53
|
-
return _this.connection.get(_this.generateFinalApi(action)).toPromise().then(function (res) { return _this.updateReviews(res); });
|
|
54
|
-
};
|
|
55
|
-
/**
|
|
56
|
-
* @description obtiene las reviews de una pagina en especial.
|
|
57
|
-
* @param code codigo del producto
|
|
58
|
-
* @param page número de pagina
|
|
59
|
-
* @param limit cantidad limite de paginas
|
|
60
|
-
* @returns
|
|
61
|
-
*/
|
|
62
|
-
this.getReviewsByPage = function (code, page, limit) {
|
|
63
|
-
return _this.connection.get(_this.generateFinalApiWithPage(code, page, limit)).toPromise().then(function (res) { return _this.updateReviews(res); });
|
|
64
|
-
};
|
|
65
|
-
/**
|
|
66
|
-
* @description genera una url que sera utiliza como endpoint para pedir las reviews utilizando los datos
|
|
67
|
-
* que viene en el atributo links.
|
|
68
|
-
* 'next' => utiliza el atributo next de links
|
|
69
|
-
* 'first' => utiliza el atributo first de links
|
|
70
|
-
* 'last' => utiliza el atributo last de links
|
|
71
|
-
* default => cualquier otro caso, utiliza el atributo self de links.
|
|
72
|
-
* @param action next | first | last
|
|
73
|
-
* @returns
|
|
74
|
-
*/
|
|
75
|
-
this.generateFinalApi = function (action) {
|
|
76
|
-
switch (action) {
|
|
77
|
-
case 'next':
|
|
78
|
-
return _this.formatUrl(_this.reviewsSubject.getValue().links.next);
|
|
79
|
-
case 'first':
|
|
80
|
-
return _this.formatUrl(_this.reviewsSubject.getValue().links.first);
|
|
81
|
-
case 'last':
|
|
82
|
-
return _this.formatUrl(_this.reviewsSubject.getValue().links.last);
|
|
83
|
-
default:
|
|
84
|
-
return _this.formatUrl(_this.reviewsSubject.getValue().links.self);
|
|
85
|
-
}
|
|
86
|
-
};
|
|
87
|
-
/**
|
|
88
|
-
* @description obtiene las reviews de una pagina en especifico
|
|
89
|
-
* @param code codigo del producto
|
|
90
|
-
* @param page numero de pagina
|
|
91
|
-
* @param limit cantidad limite de paginas
|
|
92
|
-
* @returns
|
|
93
|
-
*/
|
|
94
|
-
this.generateFinalApiWithPage = function (code, page, limit) { return _this.reviewsByCodeApi(code) + '?page=' + page + '&limit=' + limit; };
|
|
95
|
-
/**
|
|
96
|
-
* @description formatea la url que sera utilizada de endpoint para obtener las reviews
|
|
97
|
-
* @param url
|
|
98
|
-
* @returns
|
|
99
|
-
*/
|
|
100
|
-
this.formatUrl = function (url) { return url.slice(1); };
|
|
101
|
-
}
|
|
102
|
-
ReviewsService.ctorParameters = function () { return [
|
|
103
|
-
{ type: ConnectionService },
|
|
104
|
-
{ type: Constants },
|
|
105
|
-
{ type: PaginationService }
|
|
106
|
-
]; };
|
|
107
|
-
ReviewsService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ReviewsService_Factory() { return new i1.ReviewsService(i0.ɵɵinject(i1.ConnectionService), i0.ɵɵinject(i1.Constants), i0.ɵɵinject(i2.PaginationService)); }, token: i1.ReviewsService, providedIn: "root" });
|
|
108
|
-
ReviewsService = __decorate([
|
|
109
|
-
Injectable({
|
|
110
|
-
providedIn: 'root'
|
|
111
|
-
})
|
|
112
|
-
], ReviewsService);
|
|
113
|
-
return ReviewsService;
|
|
114
|
-
}());
|
|
115
|
-
export { ReviewsService };
|
|
116
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { Injectable } from '@angular/core';
|
|
8
|
+
import { BehaviorSubject } from 'rxjs';
|
|
9
|
+
import { ConnectionService } from '../api/connection.service';
|
|
10
|
+
import { Constants } from '../core.consts';
|
|
11
|
+
import { PaginationService } from './pagination.service';
|
|
12
|
+
import * as i0 from "@angular/core";
|
|
13
|
+
import * as i1 from "../../public-api";
|
|
14
|
+
import * as i2 from "../interfaces/paginate";
|
|
15
|
+
var ReviewsService = /** @class */ (function () {
|
|
16
|
+
function ReviewsService(connection, constants, pagination) {
|
|
17
|
+
var _this = this;
|
|
18
|
+
this.connection = connection;
|
|
19
|
+
this.constants = constants;
|
|
20
|
+
this.pagination = pagination;
|
|
21
|
+
this.reviewsSubject = new BehaviorSubject({});
|
|
22
|
+
this.reviews$ = this.reviewsSubject.asObservable();
|
|
23
|
+
//--Api--
|
|
24
|
+
this.reviewsByCodeApi = function (code) { return 'shop-api/' + _this.constants.getChannel() + '/products/by-code/' + code + '/reviews'; };
|
|
25
|
+
this.reviewsBySlugApi = function (slug) { return 'shop-api/' + _this.constants.getChannel() + '/products/by-slug/' + slug + '/reviews'; };
|
|
26
|
+
/**
|
|
27
|
+
* @description obtiene las reviews por el codigo del producto.
|
|
28
|
+
* @param code codigo del producto
|
|
29
|
+
* @returns
|
|
30
|
+
*/
|
|
31
|
+
this.getReviewsByCode = function (code) {
|
|
32
|
+
return _this.connection.get(_this.reviewsByCodeApi(code)).toPromise().then(function (res) { return _this.updateReviews(res); });
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* @description actualiza las reviews por codigo
|
|
36
|
+
* @param code codigo del producto
|
|
37
|
+
* @returns
|
|
38
|
+
*/
|
|
39
|
+
this.updateReviewsByCode = function (code) { return _this.getReviewsByCode(code); };
|
|
40
|
+
/**
|
|
41
|
+
* @description actualiza las reviews
|
|
42
|
+
* @param res
|
|
43
|
+
* @returns
|
|
44
|
+
*/
|
|
45
|
+
this.updateReviews = function (res) { return _this.reviewsSubject.next(res); };
|
|
46
|
+
/**
|
|
47
|
+
* @description obtiene las reviews utilizando las url del atributo links de las reviews.
|
|
48
|
+
* @param action self(defecto) | next | first | last
|
|
49
|
+
* @returns
|
|
50
|
+
*/
|
|
51
|
+
this.getReviews = function (action) {
|
|
52
|
+
if (action === void 0) { action = 'self'; }
|
|
53
|
+
return _this.connection.get(_this.generateFinalApi(action)).toPromise().then(function (res) { return _this.updateReviews(res); });
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* @description obtiene las reviews de una pagina en especial.
|
|
57
|
+
* @param code codigo del producto
|
|
58
|
+
* @param page número de pagina
|
|
59
|
+
* @param limit cantidad limite de paginas
|
|
60
|
+
* @returns
|
|
61
|
+
*/
|
|
62
|
+
this.getReviewsByPage = function (code, page, limit) {
|
|
63
|
+
return _this.connection.get(_this.generateFinalApiWithPage(code, page, limit)).toPromise().then(function (res) { return _this.updateReviews(res); });
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* @description genera una url que sera utiliza como endpoint para pedir las reviews utilizando los datos
|
|
67
|
+
* que viene en el atributo links.
|
|
68
|
+
* 'next' => utiliza el atributo next de links
|
|
69
|
+
* 'first' => utiliza el atributo first de links
|
|
70
|
+
* 'last' => utiliza el atributo last de links
|
|
71
|
+
* default => cualquier otro caso, utiliza el atributo self de links.
|
|
72
|
+
* @param action next | first | last
|
|
73
|
+
* @returns
|
|
74
|
+
*/
|
|
75
|
+
this.generateFinalApi = function (action) {
|
|
76
|
+
switch (action) {
|
|
77
|
+
case 'next':
|
|
78
|
+
return _this.formatUrl(_this.reviewsSubject.getValue().links.next);
|
|
79
|
+
case 'first':
|
|
80
|
+
return _this.formatUrl(_this.reviewsSubject.getValue().links.first);
|
|
81
|
+
case 'last':
|
|
82
|
+
return _this.formatUrl(_this.reviewsSubject.getValue().links.last);
|
|
83
|
+
default:
|
|
84
|
+
return _this.formatUrl(_this.reviewsSubject.getValue().links.self);
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* @description obtiene las reviews de una pagina en especifico
|
|
89
|
+
* @param code codigo del producto
|
|
90
|
+
* @param page numero de pagina
|
|
91
|
+
* @param limit cantidad limite de paginas
|
|
92
|
+
* @returns
|
|
93
|
+
*/
|
|
94
|
+
this.generateFinalApiWithPage = function (code, page, limit) { return _this.reviewsByCodeApi(code) + '?page=' + page + '&limit=' + limit; };
|
|
95
|
+
/**
|
|
96
|
+
* @description formatea la url que sera utilizada de endpoint para obtener las reviews
|
|
97
|
+
* @param url
|
|
98
|
+
* @returns
|
|
99
|
+
*/
|
|
100
|
+
this.formatUrl = function (url) { return url.slice(1); };
|
|
101
|
+
}
|
|
102
|
+
ReviewsService.ctorParameters = function () { return [
|
|
103
|
+
{ type: ConnectionService },
|
|
104
|
+
{ type: Constants },
|
|
105
|
+
{ type: PaginationService }
|
|
106
|
+
]; };
|
|
107
|
+
ReviewsService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ReviewsService_Factory() { return new i1.ReviewsService(i0.ɵɵinject(i1.ConnectionService), i0.ɵɵinject(i1.Constants), i0.ɵɵinject(i2.PaginationService)); }, token: i1.ReviewsService, providedIn: "root" });
|
|
108
|
+
ReviewsService = __decorate([
|
|
109
|
+
Injectable({
|
|
110
|
+
providedIn: 'root'
|
|
111
|
+
})
|
|
112
|
+
], ReviewsService);
|
|
113
|
+
return ReviewsService;
|
|
114
|
+
}());
|
|
115
|
+
export { ReviewsService };
|
|
116
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmV2aWV3cy5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmctZWFzeWNvbW1lcmNlLyIsInNvdXJjZXMiOlsibGliL3NlcnZpY2VzL3Jldmlld3Muc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7QUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzNDLE9BQU8sRUFBRSxlQUFlLEVBQWMsTUFBTSxNQUFNLENBQUM7QUFDbkQsT0FBTyxFQUFFLGlCQUFpQixFQUFFLE1BQU0sMkJBQTJCLENBQUM7QUFDOUQsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBQzNDLE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLHNCQUFzQixDQUFDOzs7O0FBS3pEO0lBVUksd0JBQXFCLFVBQTZCLEVBQVUsU0FBb0IsRUFBVSxVQUE2QjtRQUF2SCxpQkFBNEg7UUFBdkcsZUFBVSxHQUFWLFVBQVUsQ0FBbUI7UUFBVSxjQUFTLEdBQVQsU0FBUyxDQUFXO1FBQVUsZUFBVSxHQUFWLFVBQVUsQ0FBbUI7UUFSL0csbUJBQWMsR0FBeUIsSUFBSSxlQUFlLENBQUMsRUFBRSxDQUFDLENBQUE7UUFFL0QsYUFBUSxHQUFHLElBQUksQ0F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bHVlKCkubGlua3Muc2VsZikgXHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIC8qKlxyXG4gICAgICogQGRlc2NyaXB0aW9uIG9idGllbmUgbGFzIHJldmlld3MgZGUgdW5hIHBhZ2luYSBlbiBlc3BlY2lmaWNvXHJcbiAgICAgKiBAcGFyYW0gY29kZSBjb2RpZ28gZGVsIHByb2R1Y3RvXHJcbiAgICAgKiBAcGFyYW0gcGFnZSBudW1lcm8gZGUgcGFnaW5hXHJcbiAgICAgKiBAcGFyYW0gbGltaXQgY2FudGlkYWQgbGltaXRlIGRlIHBhZ2luYXNcclxuICAgICAqIEByZXR1cm5zIFxyXG4gICAgICovXHJcbiAgICBwcml2YXRlIGdlbmVyYXRlRmluYWxBcGlXaXRoUGFnZSA9IChjb2RlOnN0cmluZywgcGFnZTpudW1iZXIsIGxpbWl0Om51bWJlcikgPT4gdGhpcy5yZXZpZXdzQnlDb2RlQXBpKGNvZGUpKyc/cGFnZT0nK3BhZ2UrJyZsaW1pdD0nK2xpbWl0O1xyXG5cclxuICAgIC8qKlxyXG4gICAgICogQGRlc2NyaXB0aW9uIGZvcm1hdGVhIGxhIHVybCBxdWUgc2VyYSB1dGlsaXphZGEgZGUgZW5kcG9pbnQgcGFyYSBvYnRlbmVyIGxhcyByZXZpZXdzXHJcbiAgICAgKiBAcGFyYW0gdXJsIFxyXG4gICAgICogQHJldHVybnMgXHJcbiAgICAgKi9cclxuICAgIHByaXZhdGUgZm9ybWF0VXJsID0gKHVybDpzdHJpbmcpID0+IHVybC5zbGljZSgxKVxyXG59XHJcbiJdfQ==
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
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;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { Injectable } from '@angular/core';
|
|
8
|
-
import { BehaviorSubject } from 'rxjs';
|
|
9
|
-
import { ConnectionService } from '../api/connection.service';
|
|
10
|
-
import { Constants } from '../core.consts';
|
|
11
|
-
import * as i0 from "@angular/core";
|
|
12
|
-
import * as i1 from "../../public-api";
|
|
13
|
-
var StoresService = /** @class */ (function () {
|
|
14
|
-
function StoresService(connection, consts) {
|
|
15
|
-
var _this = this;
|
|
16
|
-
this.connection = connection;
|
|
17
|
-
this.consts = consts;
|
|
18
|
-
this.storesSubject = new BehaviorSubject([]);
|
|
19
|
-
this.stores = this.storesSubject.asObservable();
|
|
20
|
-
this.getAllStoresApi = function () { return 'shop-api/' + _this.consts.getChannel() + '/stores'; };
|
|
21
|
-
this.connection.get(this.getAllStoresApi()).toPromise().then(function (res) {
|
|
22
|
-
res.length && _this.storesSubject.next(res);
|
|
23
|
-
!res.length && _this.storesSubject.next(null);
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
StoresService.ctorParameters = function () { return [
|
|
27
|
-
{ type: ConnectionService },
|
|
28
|
-
{ type: Constants }
|
|
29
|
-
]; };
|
|
30
|
-
StoresService.ɵprov = i0.ɵɵdefineInjectable({ factory: function StoresService_Factory() { return new i1.StoresService(i0.ɵɵinject(i1.ConnectionService), i0.ɵɵinject(i1.Constants)); }, token: i1.StoresService, providedIn: "root" });
|
|
31
|
-
StoresService = __decorate([
|
|
32
|
-
Injectable({
|
|
33
|
-
providedIn: 'root'
|
|
34
|
-
})
|
|
35
|
-
], StoresService);
|
|
36
|
-
return StoresService;
|
|
37
|
-
}());
|
|
38
|
-
export { StoresService };
|
|
39
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { Injectable } from '@angular/core';
|
|
8
|
+
import { BehaviorSubject } from 'rxjs';
|
|
9
|
+
import { ConnectionService } from '../api/connection.service';
|
|
10
|
+
import { Constants } from '../core.consts';
|
|
11
|
+
import * as i0 from "@angular/core";
|
|
12
|
+
import * as i1 from "../../public-api";
|
|
13
|
+
var StoresService = /** @class */ (function () {
|
|
14
|
+
function StoresService(connection, consts) {
|
|
15
|
+
var _this = this;
|
|
16
|
+
this.connection = connection;
|
|
17
|
+
this.consts = consts;
|
|
18
|
+
this.storesSubject = new BehaviorSubject([]);
|
|
19
|
+
this.stores = this.storesSubject.asObservable();
|
|
20
|
+
this.getAllStoresApi = function () { return 'shop-api/' + _this.consts.getChannel() + '/stores'; };
|
|
21
|
+
this.connection.get(this.getAllStoresApi()).toPromise().then(function (res) {
|
|
22
|
+
res.length && _this.storesSubject.next(res);
|
|
23
|
+
!res.length && _this.storesSubject.next(null);
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
StoresService.ctorParameters = function () { return [
|
|
27
|
+
{ type: ConnectionService },
|
|
28
|
+
{ type: Constants }
|
|
29
|
+
]; };
|
|
30
|
+
StoresService.ɵprov = i0.ɵɵdefineInjectable({ factory: function StoresService_Factory() { return new i1.StoresService(i0.ɵɵinject(i1.ConnectionService), i0.ɵɵinject(i1.Constants)); }, token: i1.StoresService, providedIn: "root" });
|
|
31
|
+
StoresService = __decorate([
|
|
32
|
+
Injectable({
|
|
33
|
+
providedIn: 'root'
|
|
34
|
+
})
|
|
35
|
+
], StoresService);
|
|
36
|
+
return StoresService;
|
|
37
|
+
}());
|
|
38
|
+
export { StoresService };
|
|
39
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RvcmVzLnNlcnZpY2UuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9uZy1lYXN5Y29tbWVyY2UvIiwic291cmNlcyI6WyJsaWIvc2VydmljZXMvc3RvcmVzLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUMzQyxPQUFPLEVBQUUsZUFBZSxFQUFFLE1BQU0sTUFBTSxDQUFDO0FBRXZDLE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLDJCQUEyQixDQUFDO0FBQzlELE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQzs7O0FBTTNDO0lBT0ksdUJBQW9CLFVBQTZCLEVBQVUsTUFBaUI7UUFBNUUsaUJBT0M7UUFQbUIsZUFBVSxHQUFWLFVBQVUsQ0FBbUI7UUFBVSxXQUFNLEdBQU4sTUFBTSxDQUFXO1FBTHBFLGtCQUFhLEdBQUcsSUFBSSxlQUFlLENBQVUsRUFBRSxDQUFDLENBQUM7UUFDbEQsV0FBTSxHQUFHLElBQUksQ0FBQyxhQUFhLENBQUMsWUFBWSxFQUFFLENBQUM7UUFFbEQsb0JBQWUsR0FBRyxjQUFNLE9BQUEsV0FBVyxHQUFHLEtBQUksQ0FBQyxNQUFNLENBQUMsVUFBVSxFQUFFLEdBQUcsU0FBUyxFQUFsRCxDQUFrRCxDQUFDO1FBR3ZFLElBQUksQ0FBQyxVQUFVLENBQUMsR0FBRyxDQUFDLElBQUksQ0FBQyxlQUFlLEVBQUUsQ0FB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U3ViamVjdDxTdG9yZVtdPihbXSk7XHJcbiAgICBwdWJsaWMgc3RvcmVzID0gdGhpcy5zdG9yZXNTdWJqZWN0LmFzT2JzZXJ2YWJsZSgpO1xyXG5cclxuICAgIGdldEFsbFN0b3Jlc0FwaSA9ICgpID0+ICdzaG9wLWFwaS8nICsgdGhpcy5jb25zdHMuZ2V0Q2hhbm5lbCgpICsgJy9zdG9yZXMnO1xyXG5cclxuICAgIGNvbnN0cnVjdG9yKHByaXZhdGUgY29ubmVjdGlvbjogQ29ubmVjdGlvblNlcnZpY2UsIHByaXZhdGUgY29uc3RzOiBDb25zdGFudHMpIHtcclxuICAgICAgICB0aGlzLmNvbm5lY3Rpb24uZ2V0KHRoaXMuZ2V0QWxsU3RvcmVzQXBpKCkpLnRvUHJvbWlzZSgpLnRoZW4oXHJcbiAgICAgICAgICAgIHJlcyA9PiB7XHJcbiAgICAgICAgICAgICAgICByZXMubGVuZ3RoICYmIHRoaXMuc3RvcmVzU3ViamVjdC5uZXh0KHJlcyk7XHJcbiAgICAgICAgICAgICAgICAhcmVzLmxlbmd0aCAmJiB0aGlzLnN0b3Jlc1N1YmplY3QubmV4dChudWxsKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIClcclxuICAgIH1cclxufSJdfQ==
|
|
@@ -1,80 +1,80 @@
|
|
|
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 { isPlatformBrowser } from "@angular/common";
|
|
21
|
-
import { InjectionToken, PLATFORM_ID, Injectable } from '@angular/core';
|
|
22
|
-
/* Create a new injection token for injecting the window into a component. */
|
|
23
|
-
export var WINDOW = new InjectionToken('WindowToken');
|
|
24
|
-
/* Define abstract class for obtaining reference to the global window object. */
|
|
25
|
-
var WindowRef = /** @class */ (function () {
|
|
26
|
-
function WindowRef() {
|
|
27
|
-
}
|
|
28
|
-
Object.defineProperty(WindowRef.prototype, "nativeWindow", {
|
|
29
|
-
get: function () {
|
|
30
|
-
throw new Error('Not implemented.');
|
|
31
|
-
},
|
|
32
|
-
enumerable: true,
|
|
33
|
-
configurable: true
|
|
34
|
-
});
|
|
35
|
-
return WindowRef;
|
|
36
|
-
}());
|
|
37
|
-
export { WindowRef };
|
|
38
|
-
/* Define class that implements the abstract class and returns the native window object. */
|
|
39
|
-
var BrowserWindowRef = /** @class */ (function (_super) {
|
|
40
|
-
__extends(BrowserWindowRef, _super);
|
|
41
|
-
function BrowserWindowRef() {
|
|
42
|
-
return _super.call(this) || this;
|
|
43
|
-
}
|
|
44
|
-
Object.defineProperty(BrowserWindowRef.prototype, "nativeWindow", {
|
|
45
|
-
get: function () {
|
|
46
|
-
return window;
|
|
47
|
-
},
|
|
48
|
-
enumerable: true,
|
|
49
|
-
configurable: true
|
|
50
|
-
});
|
|
51
|
-
BrowserWindowRef = __decorate([
|
|
52
|
-
Injectable()
|
|
53
|
-
], BrowserWindowRef);
|
|
54
|
-
return BrowserWindowRef;
|
|
55
|
-
}(WindowRef));
|
|
56
|
-
export { BrowserWindowRef };
|
|
57
|
-
/* Create an factory function that returns the native window object. */
|
|
58
|
-
export function windowFactory(browserWindowRef, platformId) {
|
|
59
|
-
if (isPlatformBrowser(platformId)) {
|
|
60
|
-
return browserWindowRef.nativeWindow;
|
|
61
|
-
}
|
|
62
|
-
return new Object();
|
|
63
|
-
}
|
|
64
|
-
/* Create a injectable provider for the WindowRef token that uses the BrowserWindowRef class. */
|
|
65
|
-
export var browserWindowProvider = {
|
|
66
|
-
provide: WindowRef,
|
|
67
|
-
useClass: BrowserWindowRef
|
|
68
|
-
};
|
|
69
|
-
/* Create an injectable provider that uses the windowFactory function for returning the native window object. */
|
|
70
|
-
export var windowProvider = {
|
|
71
|
-
provide: WINDOW,
|
|
72
|
-
useFactory: windowFactory,
|
|
73
|
-
deps: [WindowRef, PLATFORM_ID]
|
|
74
|
-
};
|
|
75
|
-
/* Create an array of providers. */
|
|
76
|
-
export var WINDOW_PROVIDERS = [
|
|
77
|
-
browserWindowProvider,
|
|
78
|
-
windowProvider
|
|
79
|
-
];
|
|
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 { isPlatformBrowser } from "@angular/common";
|
|
21
|
+
import { InjectionToken, PLATFORM_ID, Injectable } from '@angular/core';
|
|
22
|
+
/* Create a new injection token for injecting the window into a component. */
|
|
23
|
+
export var WINDOW = new InjectionToken('WindowToken');
|
|
24
|
+
/* Define abstract class for obtaining reference to the global window object. */
|
|
25
|
+
var WindowRef = /** @class */ (function () {
|
|
26
|
+
function WindowRef() {
|
|
27
|
+
}
|
|
28
|
+
Object.defineProperty(WindowRef.prototype, "nativeWindow", {
|
|
29
|
+
get: function () {
|
|
30
|
+
throw new Error('Not implemented.');
|
|
31
|
+
},
|
|
32
|
+
enumerable: true,
|
|
33
|
+
configurable: true
|
|
34
|
+
});
|
|
35
|
+
return WindowRef;
|
|
36
|
+
}());
|
|
37
|
+
export { WindowRef };
|
|
38
|
+
/* Define class that implements the abstract class and returns the native window object. */
|
|
39
|
+
var BrowserWindowRef = /** @class */ (function (_super) {
|
|
40
|
+
__extends(BrowserWindowRef, _super);
|
|
41
|
+
function BrowserWindowRef() {
|
|
42
|
+
return _super.call(this) || this;
|
|
43
|
+
}
|
|
44
|
+
Object.defineProperty(BrowserWindowRef.prototype, "nativeWindow", {
|
|
45
|
+
get: function () {
|
|
46
|
+
return window;
|
|
47
|
+
},
|
|
48
|
+
enumerable: true,
|
|
49
|
+
configurable: true
|
|
50
|
+
});
|
|
51
|
+
BrowserWindowRef = __decorate([
|
|
52
|
+
Injectable()
|
|
53
|
+
], BrowserWindowRef);
|
|
54
|
+
return BrowserWindowRef;
|
|
55
|
+
}(WindowRef));
|
|
56
|
+
export { BrowserWindowRef };
|
|
57
|
+
/* Create an factory function that returns the native window object. */
|
|
58
|
+
export function windowFactory(browserWindowRef, platformId) {
|
|
59
|
+
if (isPlatformBrowser(platformId)) {
|
|
60
|
+
return browserWindowRef.nativeWindow;
|
|
61
|
+
}
|
|
62
|
+
return new Object();
|
|
63
|
+
}
|
|
64
|
+
/* Create a injectable provider for the WindowRef token that uses the BrowserWindowRef class. */
|
|
65
|
+
export var browserWindowProvider = {
|
|
66
|
+
provide: WindowRef,
|
|
67
|
+
useClass: BrowserWindowRef
|
|
68
|
+
};
|
|
69
|
+
/* Create an injectable provider that uses the windowFactory function for returning the native window object. */
|
|
70
|
+
export var windowProvider = {
|
|
71
|
+
provide: WINDOW,
|
|
72
|
+
useFactory: windowFactory,
|
|
73
|
+
deps: [WindowRef, PLATFORM_ID]
|
|
74
|
+
};
|
|
75
|
+
/* Create an array of providers. */
|
|
76
|
+
export var WINDOW_PROVIDERS = [
|
|
77
|
+
browserWindowProvider,
|
|
78
|
+
windowProvider
|
|
79
|
+
];
|
|
80
80
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2luZG93cy5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmctZWFzeWNvbW1lcmNlLyIsInNvdXJjZXMiOlsibGliL3NlcnZpY2VzL3dpbmRvd3Muc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUEsT0FBTyxFQUFFLGlCQUFpQixFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDcEQsT0FBTyxFQUFrQyxjQUFjLEVBQUUsV0FBVyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUV4Ryw2RUFBNkU7QUFDN0UsTU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