@esolve/ng-esolve-connect 0.13.0 → 0.14.0
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 +2 -2
- package/esm2020/lib/account/address/esolve-address-record.interface.mjs +2 -0
- package/esm2020/lib/account/address/esolve-address-response.interface.mjs +2 -0
- package/esm2020/lib/account/address/esolve-address-result.model.mjs +11 -0
- package/esm2020/lib/account/address/esolve-address-set-data.interface.mjs +2 -0
- package/esm2020/lib/account/address/esolve-address-type.type.mjs +2 -0
- package/esm2020/lib/account/address/esolve-address.model.mjs +19 -0
- package/esm2020/lib/account/address/index.mjs +7 -0
- package/esm2020/lib/account/esolve-account.service.mjs +12 -16
- package/esm2020/lib/account/esolve-geocode-result.interface.mjs +2 -0
- package/esm2020/lib/account/esolve-location-update-result.model.mjs +8 -0
- package/esm2020/lib/account/index.mjs +7 -0
- package/esm2020/lib/account/password/esolve-change-password-result.model.mjs +8 -0
- package/esm2020/lib/account/password/esolve-forgot-password-get-result.interface.mjs +2 -0
- package/esm2020/lib/account/password/esolve-forgot-password-response.interface.mjs +2 -0
- package/esm2020/lib/account/password/esolve-reset-password-result.model.mjs +11 -0
- package/esm2020/lib/account/password/index.mjs +5 -0
- package/esm2020/lib/account/registration/esolve-registration-data.interface.mjs +2 -0
- package/esm2020/lib/account/registration/esolve-registration-post-response-item.interface.mjs +2 -0
- package/esm2020/lib/account/registration/esolve-registration-result.model.mjs +12 -0
- package/esm2020/lib/account/registration/index.mjs +4 -0
- package/esm2020/lib/account/transaction/esolve-transaction-address.model.mjs +16 -0
- package/esm2020/lib/account/transaction/esolve-transaction-client-record.interface.mjs +2 -0
- package/esm2020/lib/account/transaction/esolve-transaction-client.model.mjs +13 -0
- package/esm2020/lib/account/transaction/esolve-transaction-item-price.model.mjs +25 -0
- package/esm2020/lib/account/transaction/esolve-transaction-item-record.interface.mjs +2 -0
- package/esm2020/lib/account/transaction/esolve-transaction-item.model.mjs +12 -0
- package/esm2020/lib/account/transaction/esolve-transaction-list.model.mjs +4 -0
- package/esm2020/lib/account/transaction/esolve-transaction-location-record.interface.mjs +2 -0
- package/esm2020/lib/account/transaction/esolve-transaction-location.model.mjs +4 -0
- package/esm2020/lib/account/transaction/esolve-transaction-options.interface.mjs +2 -0
- package/esm2020/lib/account/transaction/esolve-transaction-payment-method-record.interface.mjs +2 -0
- package/esm2020/lib/account/transaction/esolve-transaction-payment-method.model.mjs +10 -0
- package/esm2020/lib/account/transaction/esolve-transaction-record.interface.mjs +2 -0
- package/esm2020/lib/account/transaction/esolve-transaction-shipping-method-record.interface.mjs +2 -0
- package/esm2020/lib/account/transaction/esolve-transaction-shipping-method.model.mjs +12 -0
- package/esm2020/lib/account/transaction/esolve-transaction-type.type.mjs +2 -0
- package/esm2020/lib/account/transaction/esolve-transaction-user-record.interface.mjs +2 -0
- package/esm2020/lib/account/transaction/esolve-transaction-user.model.mjs +11 -0
- package/esm2020/lib/account/transaction/esolve-transaction.model.mjs +58 -0
- package/esm2020/lib/account/transaction/index.mjs +23 -0
- package/esm2020/lib/account/user-account/esolve-user-account-business.model.mjs +9 -0
- package/esm2020/lib/account/user-account/esolve-user-account-contact.model.mjs +8 -0
- package/esm2020/lib/account/user-account/esolve-user-account-data.interface.mjs +2 -0
- package/esm2020/lib/account/user-account/esolve-user-account-record.interface.mjs +2 -0
- package/esm2020/lib/account/user-account/esolve-user-account-result.model.mjs +9 -0
- package/esm2020/lib/account/user-account/esolve-user-account.model.mjs +14 -0
- package/esm2020/lib/account/user-account/index.mjs +7 -0
- package/esm2020/lib/auth/esolve-auth-check-data.interface.mjs +2 -0
- package/esm2020/lib/auth/esolve-auth-check-response.interface.mjs +2 -0
- package/esm2020/lib/auth/esolve-auth-data.interface.mjs +2 -0
- package/esm2020/lib/auth/esolve-auth-get-data.interface.mjs +2 -0
- package/esm2020/lib/auth/esolve-auth-get-response.interface.mjs +2 -0
- package/esm2020/lib/auth/esolve-auth-interceptor.service.mjs +4 -4
- package/esm2020/lib/auth/esolve-auth-response-data.type.mjs +2 -0
- package/esm2020/lib/auth/esolve-auth-response.interface.mjs +2 -0
- package/esm2020/lib/auth/esolve-auth-result.type.mjs +2 -0
- package/esm2020/lib/auth/esolve-auth.service.mjs +3 -3
- package/esm2020/lib/auth/esolve-login-post-response-item.interface.mjs +2 -0
- package/esm2020/lib/auth/index.mjs +4 -0
- package/esm2020/lib/banners/esolve-banner-image-hotspot-coords.interface.mjs +2 -0
- package/esm2020/lib/banners/esolve-banner-image-hotspot-record.interface.mjs +2 -0
- package/esm2020/lib/banners/esolve-banner-image-hotspot.model.mjs +9 -0
- package/esm2020/lib/banners/esolve-banner-image-record.interface.mjs +2 -0
- package/esm2020/lib/banners/esolve-banner-image-set.interface.mjs +2 -0
- package/esm2020/lib/banners/esolve-banner-image-type.type.mjs +2 -0
- package/esm2020/lib/banners/esolve-banner-image.model.mjs +14 -0
- package/esm2020/lib/banners/esolve-banner-link.interface.mjs +2 -0
- package/esm2020/lib/banners/esolve-banner-record.interface.mjs +2 -0
- package/esm2020/lib/banners/esolve-banner-type.type.mjs +2 -0
- package/esm2020/lib/banners/esolve-banner.model.mjs +25 -0
- package/esm2020/lib/banners/esolve-banner.service.mjs +5 -5
- package/esm2020/lib/banners/index.mjs +14 -0
- package/esm2020/lib/cart/esolve-cart-item-record.interface.mjs +2 -0
- package/esm2020/lib/cart/esolve-cart-item-response.interface.mjs +2 -0
- package/esm2020/lib/cart/esolve-cart-item.model.mjs +24 -0
- package/esm2020/lib/cart/esolve-cart-set-action.type.mjs +2 -0
- package/esm2020/lib/cart/esolve-cart-set-item.interface.mjs +2 -0
- package/esm2020/lib/cart/esolve-cart-stock-item.model.mjs +49 -0
- package/esm2020/lib/cart/esolve-cart-totals-record.interface.mjs +2 -0
- package/esm2020/lib/cart/esolve-cart-totals.model.mjs +39 -0
- package/esm2020/lib/cart/esolve-cart.service.mjs +8 -8
- package/esm2020/lib/cart/esolve-cart.type.mjs +2 -0
- package/esm2020/lib/cart/esolve-checkout-response.interface.mjs +2 -0
- package/esm2020/lib/cart/esolve-checkout-result.model.mjs +9 -0
- package/esm2020/lib/cart/esolve-tracking-code.interface.mjs +2 -0
- package/esm2020/lib/cart/index.mjs +14 -0
- package/esm2020/lib/category-tree/esolve-category-identifier.interface.mjs +2 -0
- package/esm2020/lib/category-tree/esolve-category-record.interface.mjs +2 -0
- package/esm2020/lib/category-tree/esolve-category-tree-item-options.interface.mjs +2 -0
- package/esm2020/lib/category-tree/esolve-category-tree-item-record.interface.mjs +2 -0
- package/esm2020/lib/category-tree/esolve-category-tree-item.model.mjs +48 -0
- package/esm2020/lib/category-tree/esolve-category-tree.service.mjs +3 -3
- package/esm2020/lib/category-tree/esolve-subcategory-record.interface.mjs +2 -0
- package/esm2020/lib/category-tree/index.mjs +7 -0
- package/esm2020/lib/esolve-connect-config.constant.mjs +3 -0
- package/esm2020/lib/esolve-connect.config.mjs +2 -10
- package/esm2020/lib/locations/esolve-location-address.model.mjs +13 -0
- package/esm2020/lib/locations/esolve-location-contact-info.model.mjs +9 -0
- package/esm2020/lib/locations/esolve-location-pobox-address.model.mjs +8 -0
- package/esm2020/lib/locations/esolve-location-record.interface.mjs +2 -0
- package/esm2020/lib/locations/esolve-location-trading-day.model.mjs +7 -0
- package/esm2020/lib/locations/esolve-location-trading-times.model.mjs +14 -0
- package/esm2020/lib/locations/esolve-location.model.mjs +43 -0
- package/esm2020/lib/locations/esolve-locations.service.mjs +4 -4
- package/esm2020/lib/locations/index.mjs +9 -0
- package/esm2020/lib/manufacturers/esolve-manufacturer-options.interface.mjs +2 -0
- package/esm2020/lib/manufacturers/esolve-manufacturer-record.interface.mjs +2 -0
- package/esm2020/lib/manufacturers/esolve-manufacturer.model.mjs +38 -0
- package/esm2020/lib/manufacturers/esolve-manufacturers.service.mjs +3 -3
- package/esm2020/lib/manufacturers/index.mjs +5 -0
- package/esm2020/lib/media/esolve-heading-record.interface.mjs +2 -0
- package/esm2020/lib/media/esolve-heading.model.mjs +7 -0
- package/esm2020/lib/media/esolve-media-article.model.mjs +16 -0
- package/esm2020/lib/media/esolve-media-record.interface.mjs +2 -0
- package/esm2020/lib/media/esolve-media.service.mjs +6 -6
- package/esm2020/lib/media/index.mjs +6 -0
- package/esm2020/lib/menu/esolve-menu-item.model.mjs +9 -0
- package/esm2020/lib/menu/esolve-menu-tree-record.interface.mjs +2 -0
- package/esm2020/lib/menu/esolve-menu.service.mjs +3 -3
- package/esm2020/lib/menu/esolve-menu.type.mjs +2 -0
- package/esm2020/lib/menu/index.mjs +5 -0
- package/esm2020/lib/news/esolve-news-article-author-record.interface.mjs +2 -0
- package/esm2020/lib/news/esolve-news-article-author.model.mjs +9 -0
- package/esm2020/lib/news/esolve-news-article-list.model.mjs +8 -0
- package/esm2020/lib/news/esolve-news-article-options.interface.mjs +2 -0
- package/esm2020/lib/news/esolve-news-article-record.interface.mjs +2 -0
- package/esm2020/lib/news/esolve-news-article.model.mjs +20 -0
- package/esm2020/lib/news/esolve-news-group-record.interface.mjs +2 -0
- package/esm2020/lib/news/esolve-news-group.model.mjs +9 -0
- package/esm2020/lib/news/esolve-news-manufacturer-record.interface.mjs +2 -0
- package/esm2020/lib/news/esolve-news-range-record.interface.mjs +2 -0
- package/esm2020/lib/news/esolve-news.service.mjs +6 -6
- package/esm2020/lib/news/index.mjs +12 -0
- package/esm2020/lib/ng-esolve-connect.module.mjs +2 -2
- package/esm2020/lib/payment/esolve-banking-details.model.mjs +11 -0
- package/esm2020/lib/payment/esolve-card-data.interface.mjs +2 -0
- package/esm2020/lib/payment/esolve-integration-type.type.mjs +2 -0
- package/esm2020/lib/payment/esolve-paygate-form-input.interface.mjs +2 -0
- package/esm2020/lib/payment/esolve-payment-method-options.interface.mjs +2 -0
- package/esm2020/lib/payment/esolve-payment-method-record.interface.mjs +2 -0
- package/esm2020/lib/payment/esolve-payment-method.model.mjs +36 -0
- package/esm2020/lib/payment/esolve-payment-response.interface.mjs +2 -0
- package/esm2020/lib/payment/esolve-payment-result.model.mjs +22 -0
- package/esm2020/lib/payment/esolve-payment-set-body.interface.mjs +2 -0
- package/esm2020/lib/payment/esolve-payment.service.mjs +13 -13
- package/esm2020/lib/payment/esolve-vault-item-result.model.mjs +20 -0
- package/esm2020/lib/payment/esolve-vault-item.model.mjs +20 -0
- package/esm2020/lib/payment/esolve-vault-record.interface.mjs +2 -0
- package/esm2020/lib/payment/esolve-vault-response.interface.mjs +2 -0
- package/esm2020/lib/payment/index.mjs +15 -0
- package/esm2020/lib/ranges/esolve-range-options.interface.mjs +2 -0
- package/esm2020/lib/ranges/esolve-range-record.interface.mjs +2 -0
- package/esm2020/lib/ranges/esolve-range.model.mjs +33 -0
- package/esm2020/lib/ranges/esolve-ranges.service.mjs +4 -4
- package/esm2020/lib/ranges/index.mjs +5 -0
- package/esm2020/lib/session/esolve-session-data.interface.mjs +2 -0
- package/esm2020/lib/session/esolve-session.model.mjs +28 -0
- package/esm2020/lib/session/esolve-session.service.mjs +3 -3
- package/esm2020/lib/session/esolve-stored-session.interface.mjs +2 -0
- package/esm2020/lib/session/index.mjs +5 -0
- package/esm2020/lib/shared/assets/esolve-asset-type.type.mjs +2 -0
- package/esm2020/lib/shared/assets/esolve-linked-asset-record.interface.mjs +2 -0
- package/esm2020/lib/shared/assets/esolve-linked-asset.model.mjs +10 -0
- package/esm2020/lib/shared/assets/index.mjs +4 -4
- package/esm2020/lib/shared/custom-fields/esolve-custom-fields.type.mjs +2 -0
- package/esm2020/lib/shared/custom-fields/esolve-generic-custom-fields.interface.mjs +2 -0
- package/esm2020/lib/shared/custom-fields/index.mjs +3 -0
- package/esm2020/lib/shared/errors/esolve-error-handler.service.mjs +91 -0
- package/esm2020/lib/shared/errors/esolve-http-error.model.mjs +8 -0
- package/esm2020/lib/shared/esolve-list.model.mjs +9 -0
- package/esm2020/lib/shared/esolve-result.model.mjs +8 -0
- package/esm2020/lib/shared/esolve-url-target.type.mjs +2 -0
- package/esm2020/lib/shared/geocoder/esolve-geocode-address-record.interface.mjs +2 -0
- package/esm2020/lib/shared/geocoder/esolve-geocode-address-result.model.mjs +12 -0
- package/esm2020/lib/shared/geocoder/esolve-geocode-coords-result.model.mjs +7 -0
- package/esm2020/lib/shared/geocoder/esolve-geocode-result-record.interface.mjs +2 -0
- package/esm2020/lib/shared/geocoder/esolve-geocode-result.model.mjs +11 -0
- package/esm2020/lib/shared/geocoder/esolve-geocoder.service.mjs +5 -5
- package/esm2020/lib/shared/geocoder/index.mjs +7 -0
- package/esm2020/lib/shared/response/esolve-delete-response.interface.mjs +2 -0
- package/esm2020/lib/shared/response/esolve-delete-result.interface.mjs +2 -0
- package/esm2020/lib/shared/response/esolve-get-response.interface.mjs +2 -0
- package/esm2020/lib/shared/response/esolve-post-response-item.interface.mjs +2 -0
- package/esm2020/lib/shared/response/esolve-post-response-status.interface.mjs +2 -0
- package/esm2020/lib/shared/response/esolve-response-handler.service.mjs +34 -0
- package/esm2020/lib/shared/response/esolve-response-log-item.interface.mjs +2 -0
- package/esm2020/lib/shared/response/esolve-response-result.model.mjs +9 -0
- package/esm2020/lib/shared/response/esolve-response.interface.mjs +2 -0
- package/esm2020/lib/shared/response/esolve-set-response.interface.mjs +2 -0
- package/esm2020/lib/shared/response/index.mjs +11 -0
- package/esm2020/lib/shared/seo/esolve-seo-details.interface.mjs +2 -0
- package/esm2020/lib/shared/seo/esolve-seo-info.model.mjs +11 -0
- package/esm2020/lib/shared/seo/esolve-seo.service.mjs +15 -15
- package/esm2020/lib/shared/seo/index.mjs +4 -0
- package/esm2020/lib/shipping/esolve-insurance-calculation-method.type.mjs +2 -0
- package/esm2020/lib/shipping/esolve-shipping-calculation-method.type.mjs +2 -0
- package/esm2020/lib/shipping/esolve-shipping-cost-record.interface.mjs +2 -0
- package/esm2020/lib/shipping/esolve-shipping-cost.model.mjs +12 -0
- package/esm2020/lib/shipping/esolve-shipping-location.type.mjs +2 -0
- package/esm2020/lib/shipping/esolve-shipping-method-options.interface.mjs +2 -0
- package/esm2020/lib/shipping/esolve-shipping-method-record.interface.mjs +2 -0
- package/esm2020/lib/shipping/esolve-shipping-method.model.mjs +33 -0
- package/esm2020/lib/shipping/esolve-shipping-totals.model.mjs +8 -0
- package/esm2020/lib/shipping/esolve-shipping.service.mjs +17 -6
- package/esm2020/lib/shipping/index.mjs +11 -0
- package/esm2020/lib/specials/esolve-special-image-collection-record.interface.mjs +2 -0
- package/esm2020/lib/specials/esolve-special-image-collection.model.mjs +25 -0
- package/esm2020/lib/specials/esolve-special-image-record.interface.mjs +2 -0
- package/esm2020/lib/specials/esolve-special-image.model.mjs +9 -0
- package/esm2020/lib/specials/esolve-special-options.interface.mjs +2 -0
- package/esm2020/lib/specials/esolve-special-record.interface.mjs +2 -0
- package/esm2020/lib/specials/esolve-special.model.mjs +38 -0
- package/esm2020/lib/specials/esolve-specials.service.mjs +3 -3
- package/esm2020/lib/specials/index.mjs +8 -8
- package/esm2020/lib/stock/esolve-linked-stock-item.model.mjs +9 -0
- package/esm2020/lib/stock/esolve-linked-stock-record.interface.mjs +2 -0
- package/esm2020/lib/stock/esolve-recipe-item-record.interface.mjs +2 -0
- package/esm2020/lib/stock/esolve-recipe-stock-item.model.mjs +9 -0
- package/esm2020/lib/stock/esolve-stock-badge-record.interface.mjs +2 -0
- package/esm2020/lib/stock/esolve-stock-badge.model.mjs +11 -0
- package/esm2020/lib/stock/esolve-stock-base-record.interface.mjs +2 -0
- package/esm2020/lib/stock/esolve-stock-group-item-record.interface.mjs +2 -0
- package/esm2020/lib/stock/esolve-stock-group-item.model.mjs +7 -0
- package/esm2020/lib/stock/esolve-stock-group.model.mjs +13 -0
- package/esm2020/lib/stock/esolve-stock-item-base.model.mjs +154 -0
- package/esm2020/lib/stock/esolve-stock-item-list.model.mjs +11 -0
- package/esm2020/lib/stock/esolve-stock-item-options.interface.mjs +2 -0
- package/esm2020/lib/stock/esolve-stock-item.model.mjs +17 -0
- package/esm2020/lib/stock/esolve-stock-linked-category-record.interface.mjs +2 -0
- package/esm2020/lib/stock/esolve-stock-price.model.mjs +43 -0
- package/esm2020/lib/stock/esolve-stock-record.interface.mjs +2 -0
- package/esm2020/lib/stock/esolve-stock.service.mjs +66 -25
- package/esm2020/lib/stock/index.mjs +19 -0
- package/esm2020/lib/tags/esolve-tag-record.interface.mjs +2 -0
- package/esm2020/lib/tags/esolve-tag.model.mjs +9 -0
- package/esm2020/lib/tags/index.mjs +3 -0
- package/esm2020/lib/topics/esolve-topic-record.interface.mjs +2 -0
- package/esm2020/lib/topics/esolve-topic.model.mjs +9 -0
- package/esm2020/lib/topics/esolve-topic.service.mjs +4 -4
- package/esm2020/lib/topics/index.mjs +4 -0
- package/esm2020/public-api.mjs +28 -85
- package/fesm2015/esolve-ng-esolve-connect.mjs +1051 -902
- package/fesm2015/esolve-ng-esolve-connect.mjs.map +1 -1
- package/fesm2020/esolve-ng-esolve-connect.mjs +1043 -897
- package/fesm2020/esolve-ng-esolve-connect.mjs.map +1 -1
- package/lib/account/{esolve-address-record.d.ts → address/esolve-address-record.interface.d.ts} +1 -1
- package/lib/account/{esolve-address-response.d.ts → address/esolve-address-response.interface.d.ts} +2 -2
- package/lib/account/{esolve-address-result.d.ts → address/esolve-address-result.model.d.ts} +3 -3
- package/lib/account/{esolve-address-set-data.d.ts → address/esolve-address-set-data.interface.d.ts} +1 -1
- package/lib/account/address/esolve-address-type.type.d.ts +1 -0
- package/lib/account/{esolve-address.d.ts → address/esolve-address.model.d.ts} +1 -1
- package/lib/account/address/index.d.ts +6 -0
- package/lib/account/esolve-account.service.d.ts +9 -17
- package/lib/account/{esolve-geocode-result.d.ts → esolve-geocode-result.interface.d.ts} +0 -0
- package/lib/account/esolve-location-update-result.model.d.ts +5 -0
- package/lib/account/index.d.ts +6 -0
- package/lib/account/password/esolve-change-password-result.model.d.ts +5 -0
- package/lib/account/password/esolve-forgot-password-get-result.interface.d.ts +3 -0
- package/lib/account/{esolve-forgot-password-response.d.ts → password/esolve-forgot-password-response.interface.d.ts} +2 -2
- package/lib/account/{esolve-reset-password-result.d.ts → password/esolve-reset-password-result.model.d.ts} +2 -2
- package/lib/account/password/index.d.ts +4 -0
- package/lib/account/{esolve-registration-data.d.ts → registration/esolve-registration-data.interface.d.ts} +0 -0
- package/lib/account/{esolve-registration-post-response-item.d.ts → registration/esolve-registration-post-response-item.interface.d.ts} +2 -2
- package/lib/account/{esolve-registration-result.d.ts → registration/esolve-registration-result.model.d.ts} +2 -2
- package/lib/account/registration/index.d.ts +3 -0
- package/lib/account/transaction/esolve-transaction-address.model.d.ts +15 -0
- package/lib/account/transaction/esolve-transaction-client-record.interface.d.ts +10 -0
- package/lib/account/transaction/esolve-transaction-client.model.d.ts +11 -0
- package/lib/account/transaction/esolve-transaction-item-price.model.d.ts +35 -0
- package/lib/account/transaction/esolve-transaction-item-record.interface.d.ts +16 -0
- package/lib/account/transaction/esolve-transaction-item.model.d.ts +11 -0
- package/lib/account/transaction/esolve-transaction-list.model.d.ts +4 -0
- package/lib/account/transaction/esolve-transaction-location-record.interface.d.ts +3 -0
- package/lib/account/transaction/esolve-transaction-location.model.d.ts +3 -0
- package/lib/account/{esolve-transaction-options.d.ts → transaction/esolve-transaction-options.interface.d.ts} +1 -1
- package/lib/account/transaction/esolve-transaction-payment-method-record.interface.d.ts +7 -0
- package/lib/account/transaction/esolve-transaction-payment-method.model.d.ts +8 -0
- package/lib/account/transaction/esolve-transaction-record.interface.d.ts +51 -0
- package/lib/account/transaction/esolve-transaction-shipping-method-record.interface.d.ts +9 -0
- package/lib/account/transaction/esolve-transaction-shipping-method.model.d.ts +10 -0
- package/lib/account/transaction/esolve-transaction-type.type.d.ts +1 -0
- package/lib/account/transaction/esolve-transaction-user-record.interface.d.ts +8 -0
- package/lib/account/transaction/esolve-transaction-user.model.d.ts +9 -0
- package/lib/account/transaction/esolve-transaction.model.d.ts +38 -0
- package/lib/account/transaction/index.d.ts +19 -0
- package/lib/account/user-account/esolve-user-account-business.model.d.ts +7 -0
- package/lib/account/user-account/esolve-user-account-contact.model.d.ts +6 -0
- package/lib/account/{esolve-user-account-data.d.ts → user-account/esolve-user-account-data.interface.d.ts} +0 -0
- package/lib/account/{esolve-user-account-record.d.ts → user-account/esolve-user-account-record.interface.d.ts} +0 -0
- package/lib/account/user-account/esolve-user-account-result.model.d.ts +5 -0
- package/lib/account/{esolve-user-account.d.ts → user-account/esolve-user-account.model.d.ts} +2 -13
- package/lib/account/user-account/index.d.ts +6 -0
- package/lib/auth/esolve-auth-check-data.interface.d.ts +3 -0
- package/lib/auth/esolve-auth-check-response.interface.d.ts +4 -0
- package/lib/auth/esolve-auth-data.interface.d.ts +5 -0
- package/lib/auth/esolve-auth-get-data.interface.d.ts +3 -0
- package/lib/auth/esolve-auth-get-response.interface.d.ts +4 -0
- package/lib/auth/esolve-auth-response-data.type.d.ts +3 -0
- package/lib/auth/esolve-auth-response.interface.d.ts +7 -0
- package/lib/auth/esolve-auth-result.type.d.ts +3 -0
- package/lib/auth/esolve-auth.service.d.ts +3 -3
- package/lib/auth/{esolve-login-post-response-item.d.ts → esolve-login-post-response-item.interface.d.ts} +2 -2
- package/lib/auth/index.d.ts +3 -0
- package/lib/banners/esolve-banner-image-hotspot-coords.interface.d.ts +4 -0
- package/lib/banners/{esolve-banner-image-hotspot-record.d.ts → esolve-banner-image-hotspot-record.interface.d.ts} +2 -2
- package/lib/banners/{esolve-banner-image-hotspot.d.ts → esolve-banner-image-hotspot.model.d.ts} +2 -5
- package/lib/banners/{esolve-banner-image-record.d.ts → esolve-banner-image-record.interface.d.ts} +2 -2
- package/lib/banners/esolve-banner-image-set.interface.d.ts +6 -0
- package/lib/banners/esolve-banner-image-type.type.d.ts +1 -0
- package/lib/banners/{esolve-banner-image.d.ts → esolve-banner-image.model.d.ts} +2 -2
- package/lib/banners/esolve-banner-link.interface.d.ts +5 -0
- package/lib/banners/{esolve-banner-record.d.ts → esolve-banner-record.interface.d.ts} +3 -2
- package/lib/banners/esolve-banner-type.type.d.ts +1 -0
- package/lib/banners/{esolve-banner.d.ts → esolve-banner.model.d.ts} +4 -7
- package/lib/banners/esolve-banner.service.d.ts +1 -1
- package/lib/banners/index.d.ts +9 -0
- package/lib/cart/{esolve-cart-item-record.d.ts → esolve-cart-item-record.interface.d.ts} +0 -0
- package/lib/cart/{esolve-cart-item-response.d.ts → esolve-cart-item-response.interface.d.ts} +1 -1
- package/lib/cart/{esolve-cart-item.d.ts → esolve-cart-item.model.d.ts} +1 -9
- package/lib/cart/esolve-cart-set-action.type.d.ts +1 -0
- package/lib/cart/esolve-cart-set-item.interface.d.ts +7 -0
- package/lib/cart/{esolve-cart-stock-item.d.ts → esolve-cart-stock-item.model.d.ts} +2 -1
- package/lib/cart/{esolve-cart-totals-record.d.ts → esolve-cart-totals-record.interface.d.ts} +0 -0
- package/lib/cart/{esolve-cart-totals.d.ts → esolve-cart-totals.model.d.ts} +4 -4
- package/lib/cart/esolve-cart.service.d.ts +8 -6
- package/lib/cart/esolve-cart.type.d.ts +2 -0
- package/lib/cart/esolve-checkout-response.interface.d.ts +4 -0
- package/lib/cart/esolve-checkout-result.model.d.ts +6 -0
- package/lib/cart/esolve-tracking-code.interface.d.ts +3 -0
- package/lib/cart/index.d.ts +13 -0
- package/lib/category-tree/esolve-category-identifier.interface.d.ts +4 -0
- package/lib/category-tree/esolve-category-record.interface.d.ts +18 -0
- package/lib/category-tree/{esolve-category-tree-item-options.d.ts → esolve-category-tree-item-options.interface.d.ts} +0 -0
- package/lib/category-tree/esolve-category-tree-item-record.interface.d.ts +16 -0
- package/lib/category-tree/{esolve-category-tree-item.d.ts → esolve-category-tree-item.model.d.ts} +7 -6
- package/lib/category-tree/esolve-category-tree.service.d.ts +2 -2
- package/lib/category-tree/esolve-subcategory-record.interface.d.ts +18 -0
- package/lib/category-tree/index.d.ts +6 -0
- package/lib/esolve-connect-config.constant.d.ts +3 -0
- package/lib/esolve-connect.config.d.ts +0 -2
- package/lib/locations/esolve-location-address.model.d.ts +11 -0
- package/lib/locations/esolve-location-contact-info.model.d.ts +7 -0
- package/lib/locations/esolve-location-pobox-address.model.d.ts +6 -0
- package/lib/locations/{esolve-stock-location-record.d.ts → esolve-location-record.interface.d.ts} +1 -1
- package/lib/locations/esolve-location-trading-day.model.d.ts +5 -0
- package/lib/locations/esolve-location-trading-times.model.d.ts +13 -0
- package/lib/locations/esolve-location.model.d.ts +23 -0
- package/lib/locations/esolve-locations.service.d.ts +2 -2
- package/lib/locations/index.d.ts +8 -0
- package/lib/manufacturers/{esolve-manufacturer-options.d.ts → esolve-manufacturer-options.interface.d.ts} +0 -0
- package/lib/manufacturers/{esolve-manufacturer-record.d.ts → esolve-manufacturer-record.interface.d.ts} +0 -0
- package/lib/manufacturers/{esolve-manufacturer.d.ts → esolve-manufacturer.model.d.ts} +4 -3
- package/lib/manufacturers/esolve-manufacturers.service.d.ts +2 -2
- package/lib/manufacturers/index.d.ts +4 -0
- package/lib/media/{esolve-heading-record.d.ts → esolve-heading-record.interface.d.ts} +0 -0
- package/lib/media/{esolve-heading.d.ts → esolve-heading.model.d.ts} +0 -0
- package/lib/media/esolve-media-article.model.d.ts +14 -0
- package/lib/media/{esolve-media-record.d.ts → esolve-media-record.interface.d.ts} +2 -2
- package/lib/media/esolve-media.service.d.ts +2 -2
- package/lib/media/index.d.ts +5 -0
- package/lib/menu/{esolve-menu-item.d.ts → esolve-menu-item.model.d.ts} +0 -1
- package/lib/menu/{esolve-menu-tree-record.d.ts → esolve-menu-tree-record.interface.d.ts} +0 -0
- package/lib/menu/esolve-menu.service.d.ts +1 -1
- package/lib/menu/esolve-menu.type.d.ts +2 -0
- package/lib/menu/index.d.ts +4 -0
- package/lib/news/{esolve-news-article-author-record.d.ts → esolve-news-article-author-record.interface.d.ts} +0 -0
- package/lib/news/{esolve-news-article-author.d.ts → esolve-news-article-author.model.d.ts} +0 -0
- package/lib/news/{esolve-news-article-list.d.ts → esolve-news-article-list.model.d.ts} +1 -1
- package/lib/news/{esolve-news-article-options.d.ts → esolve-news-article-options.interface.d.ts} +0 -0
- package/lib/news/{esolve-news-article-record.d.ts → esolve-news-article-record.interface.d.ts} +4 -4
- package/lib/news/{esolve-news-article.d.ts → esolve-news-article.model.d.ts} +5 -4
- package/lib/news/{esolve-news-group-record.d.ts → esolve-news-group-record.interface.d.ts} +0 -0
- package/lib/news/{esolve-news-group.d.ts → esolve-news-group.model.d.ts} +0 -0
- package/lib/news/{esolve-news-manufacturer-record.d.ts → esolve-news-manufacturer-record.interface.d.ts} +0 -0
- package/lib/news/{esolve-news-range-record.d.ts → esolve-news-range-record.interface.d.ts} +0 -0
- package/lib/news/esolve-news.service.d.ts +4 -4
- package/lib/news/index.d.ts +11 -0
- package/lib/payment/esolve-banking-details.model.d.ts +9 -0
- package/lib/payment/{esolve-card-data.d.ts → esolve-card-data.interface.d.ts} +0 -0
- package/lib/payment/esolve-integration-type.type.d.ts +1 -0
- package/lib/payment/esolve-paygate-form-input.interface.d.ts +4 -0
- package/lib/payment/{esolve-payment-method-options.d.ts → esolve-payment-method-options.interface.d.ts} +0 -0
- package/lib/payment/{esolve-payment-method-record.d.ts → esolve-payment-method-record.interface.d.ts} +1 -1
- package/lib/payment/{esolve-payment-method.d.ts → esolve-payment-method.model.d.ts} +3 -10
- package/lib/payment/{esolve-payment-response.d.ts → esolve-payment-response.interface.d.ts} +2 -5
- package/lib/payment/{esolve-payment-result.d.ts → esolve-payment-result.model.d.ts} +3 -2
- package/lib/payment/esolve-payment-set-body.interface.d.ts +13 -0
- package/lib/payment/esolve-payment.service.d.ts +9 -9
- package/lib/payment/{esolve-vault-item-result.d.ts → esolve-vault-item-result.model.d.ts} +2 -2
- package/lib/payment/{esolve-vault-item.d.ts → esolve-vault-item.model.d.ts} +0 -0
- package/lib/payment/{esolve-vault-record.d.ts → esolve-vault-record.interface.d.ts} +0 -0
- package/lib/payment/{esolve-vault-response.d.ts → esolve-vault-response.interface.d.ts} +1 -1
- package/lib/payment/index.d.ts +14 -0
- package/lib/ranges/{esolve-range-options.d.ts → esolve-range-options.interface.d.ts} +0 -0
- package/lib/ranges/{esolve-range-record.d.ts → esolve-range-record.interface.d.ts} +0 -0
- package/lib/ranges/{esolve-range.d.ts → esolve-range.model.d.ts} +4 -3
- package/lib/ranges/esolve-ranges.service.d.ts +2 -2
- package/lib/ranges/index.d.ts +4 -0
- package/lib/session/{esolve-session-data.d.ts → esolve-session-data.interface.d.ts} +0 -0
- package/lib/session/{esolve-session.d.ts → esolve-session.model.d.ts} +1 -1
- package/lib/session/esolve-session.service.d.ts +1 -1
- package/lib/session/{esolve-stored-session.d.ts → esolve-stored-session.interface.d.ts} +1 -1
- package/lib/session/index.d.ts +4 -0
- package/lib/shared/assets/{esolve-asset-type.d.ts → esolve-asset-type.type.d.ts} +0 -0
- package/lib/shared/assets/{esolve-linked-asset-record.d.ts → esolve-linked-asset-record.interface.d.ts} +1 -1
- package/lib/shared/assets/{esolve-linked-asset.d.ts → esolve-linked-asset.model.d.ts} +2 -2
- package/lib/shared/assets/index.d.ts +3 -3
- package/lib/shared/custom-fields/esolve-custom-fields.type.d.ts +4 -0
- package/lib/shared/custom-fields/esolve-generic-custom-fields.interface.d.ts +3 -0
- package/lib/shared/custom-fields/index.d.ts +2 -0
- package/lib/shared/{error-handler → errors}/esolve-error-handler.service.d.ts +1 -1
- package/lib/shared/{error-handler/esolve-http-error.d.ts → errors/esolve-http-error.model.d.ts} +0 -0
- package/lib/shared/{esolve-list.d.ts → esolve-list.model.d.ts} +0 -0
- package/lib/shared/{esolve-result.d.ts → esolve-result.model.d.ts} +0 -0
- package/lib/shared/{esolve-url-target.d.ts → esolve-url-target.type.d.ts} +0 -0
- package/lib/shared/geocoder/{esolve-geocode-address-record.d.ts → esolve-geocode-address-record.interface.d.ts} +0 -0
- package/lib/shared/geocoder/{esolve-geocode-address-result.d.ts → esolve-geocode-address-result.model.d.ts} +0 -0
- package/lib/shared/geocoder/{esolve-geocode-coords-result.d.ts → esolve-geocode-coords-result.model.d.ts} +0 -0
- package/lib/shared/geocoder/{esolve-geocode-result-record.d.ts → esolve-geocode-result-record.interface.d.ts} +1 -1
- package/lib/shared/geocoder/{esolve-geocode-result.d.ts → esolve-geocode-result.model.d.ts} +2 -2
- package/lib/shared/geocoder/esolve-geocoder.service.d.ts +1 -1
- package/lib/shared/geocoder/index.d.ts +6 -0
- package/lib/shared/response/esolve-delete-response.interface.d.ts +5 -0
- package/lib/shared/response/esolve-delete-result.interface.d.ts +6 -0
- package/lib/shared/response/esolve-get-response.interface.d.ts +4 -0
- package/lib/shared/response/esolve-post-response-item.interface.d.ts +9 -0
- package/lib/shared/response/esolve-post-response-status.interface.d.ts +5 -0
- package/lib/shared/{response-handler → response}/esolve-response-handler.service.d.ts +5 -2
- package/lib/shared/response/esolve-response-log-item.interface.d.ts +5 -0
- package/lib/shared/{response-handler/esolve-response-result.d.ts → response/esolve-response-result.model.d.ts} +2 -1
- package/lib/shared/response/esolve-response.interface.d.ts +8 -0
- package/lib/shared/response/esolve-set-response.interface.d.ts +5 -0
- package/lib/shared/response/index.d.ts +10 -0
- package/lib/shared/seo/esolve-seo-details.interface.d.ts +4 -0
- package/lib/shared/seo/{esolve-seo-info.d.ts → esolve-seo-info.model.d.ts} +1 -4
- package/lib/shared/seo/esolve-seo.service.d.ts +6 -6
- package/lib/shared/seo/index.d.ts +3 -0
- package/lib/shipping/esolve-insurance-calculation-method.type.d.ts +1 -0
- package/lib/shipping/esolve-shipping-calculation-method.type.d.ts +1 -0
- package/lib/shipping/{esolve-shipping-cost-record.d.ts → esolve-shipping-cost-record.interface.d.ts} +0 -0
- package/lib/shipping/{esolve-shipping-cost.d.ts → esolve-shipping-cost.model.d.ts} +1 -7
- package/lib/shipping/esolve-shipping-location.type.d.ts +1 -0
- package/lib/shipping/{esolve-shipping-method-options.d.ts → esolve-shipping-method-options.interface.d.ts} +0 -0
- package/lib/shipping/{esolve-shipping-method-record.d.ts → esolve-shipping-method-record.interface.d.ts} +6 -6
- package/lib/shipping/esolve-shipping-method.model.d.ts +34 -0
- package/lib/shipping/esolve-shipping-totals.model.d.ts +6 -0
- package/lib/shipping/esolve-shipping.service.d.ts +16 -5
- package/lib/shipping/index.d.ts +10 -0
- package/lib/specials/{esolve-special-image-collection-record.d.ts → esolve-special-image-collection-record.interface.d.ts} +1 -1
- package/lib/specials/{esolve-special-image-collection.d.ts → esolve-special-image-collection.model.d.ts} +2 -2
- package/lib/specials/{esolve-special-image-record.d.ts → esolve-special-image-record.interface.d.ts} +0 -0
- package/lib/specials/{esolve-special-image.d.ts → esolve-special-image.model.d.ts} +1 -1
- package/lib/specials/{esolve-special-options.d.ts → esolve-special-options.interface.d.ts} +0 -0
- package/lib/specials/{esolve-special-record.d.ts → esolve-special-record.interface.d.ts} +1 -1
- package/lib/specials/{esolve-special.d.ts → esolve-special.model.d.ts} +6 -5
- package/lib/specials/esolve-specials.service.d.ts +2 -2
- package/lib/specials/index.d.ts +7 -7
- package/lib/stock/esolve-linked-stock-item.model.d.ts +7 -0
- package/lib/stock/esolve-linked-stock-record.interface.d.ts +7 -0
- package/lib/stock/esolve-recipe-item-record.interface.d.ts +7 -0
- package/lib/stock/esolve-recipe-stock-item.model.d.ts +7 -0
- package/lib/stock/{esolve-stock-badge-record.d.ts → esolve-stock-badge-record.interface.d.ts} +0 -0
- package/lib/stock/{esolve-stock-badge.d.ts → esolve-stock-badge.model.d.ts} +0 -0
- package/lib/stock/{esolve-stock-record.d.ts → esolve-stock-base-record.interface.d.ts} +8 -13
- package/lib/stock/esolve-stock-group-item-record.interface.d.ts +4 -0
- package/lib/stock/esolve-stock-group-item.model.d.ts +6 -0
- package/lib/stock/esolve-stock-group.model.d.ts +8 -0
- package/lib/stock/esolve-stock-item-base.model.d.ts +98 -0
- package/lib/stock/esolve-stock-item-list.model.d.ts +11 -0
- package/lib/stock/{esolve-stock-item-options.d.ts → esolve-stock-item-options.interface.d.ts} +0 -0
- package/lib/stock/esolve-stock-item.model.d.ts +14 -0
- package/lib/stock/esolve-stock-linked-category-record.interface.d.ts +5 -0
- package/lib/stock/{esolve-stock-price.d.ts → esolve-stock-price.model.d.ts} +10 -10
- package/lib/stock/esolve-stock-record.interface.d.ts +9 -0
- package/lib/stock/esolve-stock.service.d.ts +41 -10
- package/lib/stock/index.d.ts +18 -0
- package/lib/tags/{esolve-tag-record.d.ts → esolve-tag-record.interface.d.ts} +0 -0
- package/lib/tags/{esolve-tag.d.ts → esolve-tag.model.d.ts} +0 -0
- package/lib/tags/index.d.ts +2 -0
- package/lib/topics/{esolve-topic-record.d.ts → esolve-topic-record.interface.d.ts} +0 -0
- package/lib/topics/{esolve-topic.d.ts → esolve-topic.model.d.ts} +0 -0
- package/lib/topics/esolve-topic.service.d.ts +1 -1
- package/lib/topics/index.d.ts +3 -0
- package/package.json +1 -1
- package/public-api.d.ts +24 -81
- package/esm2020/lib/account/esolve-address-record.mjs +0 -2
- package/esm2020/lib/account/esolve-address-response.mjs +0 -2
- package/esm2020/lib/account/esolve-address-result.mjs +0 -11
- package/esm2020/lib/account/esolve-address-set-data.mjs +0 -2
- package/esm2020/lib/account/esolve-address.mjs +0 -19
- package/esm2020/lib/account/esolve-change-password-result.mjs +0 -8
- package/esm2020/lib/account/esolve-forgot-password-response.mjs +0 -2
- package/esm2020/lib/account/esolve-geocode-result.mjs +0 -2
- package/esm2020/lib/account/esolve-location-update-result.mjs +0 -8
- package/esm2020/lib/account/esolve-registration-data.mjs +0 -2
- package/esm2020/lib/account/esolve-registration-post-response-item.mjs +0 -2
- package/esm2020/lib/account/esolve-registration-result.mjs +0 -12
- package/esm2020/lib/account/esolve-reset-password-result.mjs +0 -11
- package/esm2020/lib/account/esolve-transaction-list.mjs +0 -4
- package/esm2020/lib/account/esolve-transaction-options.mjs +0 -2
- package/esm2020/lib/account/esolve-transaction-record.mjs +0 -2
- package/esm2020/lib/account/esolve-transaction.mjs +0 -145
- package/esm2020/lib/account/esolve-user-account-data.mjs +0 -2
- package/esm2020/lib/account/esolve-user-account-record.mjs +0 -2
- package/esm2020/lib/account/esolve-user-account-result.mjs +0 -9
- package/esm2020/lib/account/esolve-user-account.mjs +0 -29
- package/esm2020/lib/auth/esolve-auth-response.mjs +0 -4
- package/esm2020/lib/auth/esolve-login-post-response-item.mjs +0 -2
- package/esm2020/lib/banners/esolve-banner-image-hotspot-record.mjs +0 -2
- package/esm2020/lib/banners/esolve-banner-image-hotspot.mjs +0 -9
- package/esm2020/lib/banners/esolve-banner-image-record.mjs +0 -2
- package/esm2020/lib/banners/esolve-banner-image.mjs +0 -14
- package/esm2020/lib/banners/esolve-banner-record.mjs +0 -2
- package/esm2020/lib/banners/esolve-banner-type.mjs +0 -2
- package/esm2020/lib/banners/esolve-banner.mjs +0 -25
- package/esm2020/lib/cart/esolve-cart-item-record.mjs +0 -2
- package/esm2020/lib/cart/esolve-cart-item-response.mjs +0 -2
- package/esm2020/lib/cart/esolve-cart-item.mjs +0 -24
- package/esm2020/lib/cart/esolve-cart-stock-item.mjs +0 -43
- package/esm2020/lib/cart/esolve-cart-totals-record.mjs +0 -2
- package/esm2020/lib/cart/esolve-cart-totals.mjs +0 -39
- package/esm2020/lib/cart/esolve-checkout-result.mjs +0 -9
- package/esm2020/lib/cart/esolve-checkout.mjs +0 -2
- package/esm2020/lib/category-tree/esolve-category-tree-item-options.mjs +0 -2
- package/esm2020/lib/category-tree/esolve-category-tree-item-record.mjs +0 -2
- package/esm2020/lib/category-tree/esolve-category-tree-item.mjs +0 -48
- package/esm2020/lib/locations/esolve-stock-location-record.mjs +0 -2
- package/esm2020/lib/locations/esolve-stock-location.mjs +0 -76
- package/esm2020/lib/manufacturers/esolve-manufacturer-options.mjs +0 -2
- package/esm2020/lib/manufacturers/esolve-manufacturer-record.mjs +0 -2
- package/esm2020/lib/manufacturers/esolve-manufacturer.mjs +0 -38
- package/esm2020/lib/media/esolve-heading-record.mjs +0 -2
- package/esm2020/lib/media/esolve-heading.mjs +0 -7
- package/esm2020/lib/media/esolve-media-article.mjs +0 -16
- package/esm2020/lib/media/esolve-media-record.mjs +0 -2
- package/esm2020/lib/menu/esolve-menu-item.mjs +0 -9
- package/esm2020/lib/menu/esolve-menu-tree-record.mjs +0 -2
- package/esm2020/lib/news/esolve-news-article-author-record.mjs +0 -2
- package/esm2020/lib/news/esolve-news-article-author.mjs +0 -9
- package/esm2020/lib/news/esolve-news-article-list.mjs +0 -8
- package/esm2020/lib/news/esolve-news-article-options.mjs +0 -2
- package/esm2020/lib/news/esolve-news-article-record.mjs +0 -2
- package/esm2020/lib/news/esolve-news-article.mjs +0 -20
- package/esm2020/lib/news/esolve-news-group-record.mjs +0 -2
- package/esm2020/lib/news/esolve-news-group.mjs +0 -9
- package/esm2020/lib/news/esolve-news-manufacturer-record.mjs +0 -2
- package/esm2020/lib/news/esolve-news-range-record.mjs +0 -2
- package/esm2020/lib/payment/esolve-card-data.mjs +0 -2
- package/esm2020/lib/payment/esolve-payment-method-options.mjs +0 -2
- package/esm2020/lib/payment/esolve-payment-method-record.mjs +0 -2
- package/esm2020/lib/payment/esolve-payment-method.mjs +0 -45
- package/esm2020/lib/payment/esolve-payment-response.mjs +0 -2
- package/esm2020/lib/payment/esolve-payment-result.mjs +0 -22
- package/esm2020/lib/payment/esolve-vault-item-result.mjs +0 -20
- package/esm2020/lib/payment/esolve-vault-item.mjs +0 -20
- package/esm2020/lib/payment/esolve-vault-record.mjs +0 -2
- package/esm2020/lib/payment/esolve-vault-response.mjs +0 -2
- package/esm2020/lib/ranges/esolve-range-options.mjs +0 -2
- package/esm2020/lib/ranges/esolve-range-record.mjs +0 -2
- package/esm2020/lib/ranges/esolve-range.mjs +0 -33
- package/esm2020/lib/session/esolve-session-data.mjs +0 -2
- package/esm2020/lib/session/esolve-session.mjs +0 -28
- package/esm2020/lib/session/esolve-stored-session.mjs +0 -2
- package/esm2020/lib/shared/assets/esolve-asset-type.mjs +0 -2
- package/esm2020/lib/shared/assets/esolve-linked-asset-record.mjs +0 -2
- package/esm2020/lib/shared/assets/esolve-linked-asset.mjs +0 -10
- package/esm2020/lib/shared/error-handler/esolve-error-handler.service.mjs +0 -91
- package/esm2020/lib/shared/error-handler/esolve-http-error.mjs +0 -8
- package/esm2020/lib/shared/esolve-list.mjs +0 -9
- package/esm2020/lib/shared/esolve-response.mjs +0 -2
- package/esm2020/lib/shared/esolve-result.mjs +0 -8
- package/esm2020/lib/shared/esolve-url-target.mjs +0 -2
- package/esm2020/lib/shared/geocoder/esolve-geocode-address-record.mjs +0 -2
- package/esm2020/lib/shared/geocoder/esolve-geocode-address-result.mjs +0 -12
- package/esm2020/lib/shared/geocoder/esolve-geocode-coords-result.mjs +0 -7
- package/esm2020/lib/shared/geocoder/esolve-geocode-result-record.mjs +0 -2
- package/esm2020/lib/shared/geocoder/esolve-geocode-result.mjs +0 -11
- package/esm2020/lib/shared/response-handler/esolve-response-handler.service.mjs +0 -32
- package/esm2020/lib/shared/response-handler/esolve-response-result.mjs +0 -9
- package/esm2020/lib/shared/seo/esolve-seo-info.mjs +0 -11
- package/esm2020/lib/shipping/esolve-shipping-cost-record.mjs +0 -2
- package/esm2020/lib/shipping/esolve-shipping-cost.mjs +0 -18
- package/esm2020/lib/shipping/esolve-shipping-method-options.mjs +0 -2
- package/esm2020/lib/shipping/esolve-shipping-method-record.mjs +0 -2
- package/esm2020/lib/shipping/esolve-shipping-method.mjs +0 -33
- package/esm2020/lib/specials/esolve-special-image-collection-record.mjs +0 -2
- package/esm2020/lib/specials/esolve-special-image-collection.mjs +0 -25
- package/esm2020/lib/specials/esolve-special-image-record.mjs +0 -2
- package/esm2020/lib/specials/esolve-special-image.mjs +0 -9
- package/esm2020/lib/specials/esolve-special-options.mjs +0 -2
- package/esm2020/lib/specials/esolve-special-record.mjs +0 -2
- package/esm2020/lib/specials/esolve-special.mjs +0 -38
- package/esm2020/lib/stock/esolve-stock-badge-record.mjs +0 -2
- package/esm2020/lib/stock/esolve-stock-badge.mjs +0 -11
- package/esm2020/lib/stock/esolve-stock-item-list.mjs +0 -11
- package/esm2020/lib/stock/esolve-stock-item-options.mjs +0 -2
- package/esm2020/lib/stock/esolve-stock-item.mjs +0 -137
- package/esm2020/lib/stock/esolve-stock-price.mjs +0 -43
- package/esm2020/lib/stock/esolve-stock-record.mjs +0 -2
- package/esm2020/lib/tags/esolve-tag-record.mjs +0 -2
- package/esm2020/lib/tags/esolve-tag.mjs +0 -9
- package/esm2020/lib/topics/esolve-topic-record.mjs +0 -2
- package/esm2020/lib/topics/esolve-topic.mjs +0 -9
- package/lib/account/esolve-change-password-result.d.ts +0 -6
- package/lib/account/esolve-location-update-result.d.ts +0 -6
- package/lib/account/esolve-transaction-list.d.ts +0 -4
- package/lib/account/esolve-transaction-record.d.ts +0 -98
- package/lib/account/esolve-transaction.d.ts +0 -132
- package/lib/account/esolve-user-account-result.d.ts +0 -6
- package/lib/auth/esolve-auth-response.d.ts +0 -25
- package/lib/banners/esolve-banner-type.d.ts +0 -7
- package/lib/cart/esolve-checkout-result.d.ts +0 -6
- package/lib/cart/esolve-checkout.d.ts +0 -7
- package/lib/category-tree/esolve-category-tree-item-record.d.ts +0 -51
- package/lib/locations/esolve-stock-location.d.ts +0 -60
- package/lib/media/esolve-media-article.d.ts +0 -13
- package/lib/shared/esolve-response.d.ts +0 -40
- package/lib/shipping/esolve-shipping-method.d.ts +0 -32
- package/lib/stock/esolve-stock-item-list.d.ts +0 -10
- package/lib/stock/esolve-stock-item.d.ts +0 -174
|
@@ -9,14 +9,7 @@ import { BehaviorSubject, throwError, of, iif } from 'rxjs';
|
|
|
9
9
|
import * as i1$1 from '@angular/platform-browser';
|
|
10
10
|
import { map, tap, catchError, switchMap } from 'rxjs/operators';
|
|
11
11
|
|
|
12
|
-
const ESOLVE_CONNECT_CONFIG = new InjectionToken('esolve.connect.config');
|
|
13
|
-
// For future development
|
|
14
|
-
// export const GLOBAL_CONFIG = {
|
|
15
|
-
// images_url: '',
|
|
16
|
-
// media_path: '/media',
|
|
17
|
-
// stock_path: '/stock',
|
|
18
|
-
// banner_path: '/banners'
|
|
19
|
-
// };
|
|
12
|
+
const ESOLVE_CONNECT_CONFIG = new InjectionToken('esolve.connect.config');
|
|
20
13
|
|
|
21
14
|
class EsolveSession {
|
|
22
15
|
constructor(id = -1, location_id = 0, key = '', expiration_date) {
|
|
@@ -264,7 +257,7 @@ class EsolveAuthInterceptorService {
|
|
|
264
257
|
});
|
|
265
258
|
const modified_req = req.clone({
|
|
266
259
|
url: modified_url,
|
|
267
|
-
params
|
|
260
|
+
params,
|
|
268
261
|
});
|
|
269
262
|
return next.handle(modified_req);
|
|
270
263
|
}
|
|
@@ -337,6 +330,47 @@ class EsolveResult {
|
|
|
337
330
|
}
|
|
338
331
|
}
|
|
339
332
|
|
|
333
|
+
class EsolveResponseResult {
|
|
334
|
+
constructor(response) {
|
|
335
|
+
this.success_log = [];
|
|
336
|
+
this.error_log = [];
|
|
337
|
+
this.error_log.push(...response.log.filter(log_item => log_item.type === 'error'));
|
|
338
|
+
this.success_log.push(...response.log.filter(log_item => log_item.type === 'success'));
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
class EsolveResponseHandlerService {
|
|
343
|
+
constructor() { }
|
|
344
|
+
/**
|
|
345
|
+
* Parse single HTTP response
|
|
346
|
+
*
|
|
347
|
+
* @param http_response HTTP Response to eSolve service
|
|
348
|
+
* @param resultHandler Function to parse response to a result
|
|
349
|
+
*
|
|
350
|
+
* @returns Parsed result of response
|
|
351
|
+
*/
|
|
352
|
+
validateSingleHttpResponse(http_response, resultHandler) {
|
|
353
|
+
if ((http_response.responses === undefined) ||
|
|
354
|
+
(http_response.responses.length <= 0)) {
|
|
355
|
+
throw http_response;
|
|
356
|
+
}
|
|
357
|
+
const response = http_response.responses[0];
|
|
358
|
+
if ((response.status.state === 'error') ||
|
|
359
|
+
(response.status.state === 'none')) {
|
|
360
|
+
throw response;
|
|
361
|
+
}
|
|
362
|
+
return resultHandler(response);
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
EsolveResponseHandlerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EsolveResponseHandlerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
366
|
+
EsolveResponseHandlerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EsolveResponseHandlerService, providedIn: 'root' });
|
|
367
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EsolveResponseHandlerService, decorators: [{
|
|
368
|
+
type: Injectable,
|
|
369
|
+
args: [{
|
|
370
|
+
providedIn: 'root',
|
|
371
|
+
}]
|
|
372
|
+
}], ctorParameters: function () { return []; } });
|
|
373
|
+
|
|
340
374
|
class EsolveHttpError {
|
|
341
375
|
constructor(type, message, error_code) {
|
|
342
376
|
this.type = type;
|
|
@@ -431,49 +465,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
431
465
|
}]
|
|
432
466
|
}], ctorParameters: function () { return []; } });
|
|
433
467
|
|
|
434
|
-
class EsolveResponseResult {
|
|
435
|
-
constructor(response) {
|
|
436
|
-
this.success_log = [];
|
|
437
|
-
this.error_log = [];
|
|
438
|
-
this.error_log.push(...response.log.filter(log_item => log_item.type === 'error'));
|
|
439
|
-
this.success_log.push(...response.log.filter(log_item => log_item.type === 'success'));
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
class EsolveResponseHandlerService {
|
|
444
|
-
constructor() { }
|
|
445
|
-
/**
|
|
446
|
-
* Parse single HTTP response
|
|
447
|
-
* @param http_response HTTP Response to eSolve service
|
|
448
|
-
* @param resultHandler Function to parse response to a result
|
|
449
|
-
* @returns Parsed result of response
|
|
450
|
-
*/
|
|
451
|
-
validateSingleHttpResponse(http_response, resultHandler) {
|
|
452
|
-
if ((http_response.responses === undefined) ||
|
|
453
|
-
(http_response.responses.length <= 0)) {
|
|
454
|
-
throw http_response;
|
|
455
|
-
}
|
|
456
|
-
const response = http_response.responses[0];
|
|
457
|
-
if ((response.status.state === 'error') ||
|
|
458
|
-
(response.status.state === 'none')) {
|
|
459
|
-
throw response;
|
|
460
|
-
}
|
|
461
|
-
return resultHandler(response);
|
|
462
|
-
}
|
|
463
|
-
}
|
|
464
|
-
EsolveResponseHandlerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EsolveResponseHandlerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
465
|
-
EsolveResponseHandlerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EsolveResponseHandlerService, providedIn: 'root' });
|
|
466
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EsolveResponseHandlerService, decorators: [{
|
|
467
|
-
type: Injectable,
|
|
468
|
-
args: [{
|
|
469
|
-
providedIn: 'root'
|
|
470
|
-
}]
|
|
471
|
-
}], ctorParameters: function () { return []; } });
|
|
472
|
-
|
|
473
468
|
/**
|
|
474
469
|
* Search Engine Optimization information.
|
|
475
470
|
*/
|
|
476
|
-
class
|
|
471
|
+
class EsolveSeoInfo {
|
|
477
472
|
constructor(title = '', description = '', keywords = '') {
|
|
478
473
|
this.title = title;
|
|
479
474
|
this.description = description;
|
|
@@ -494,6 +489,16 @@ class EsolveSeoService {
|
|
|
494
489
|
this.default_seo_keywords = '';
|
|
495
490
|
this.init();
|
|
496
491
|
}
|
|
492
|
+
/**
|
|
493
|
+
* Sets SEO tags for page
|
|
494
|
+
* @param seoInfo SEO object
|
|
495
|
+
*/
|
|
496
|
+
setTags(seoInfo) {
|
|
497
|
+
seoInfo = this.validateAndSanitizeSeoInfo(seoInfo);
|
|
498
|
+
this.setPageTitleTags(seoInfo.title);
|
|
499
|
+
this.setPageDescriptionTags(seoInfo.description);
|
|
500
|
+
this.setPageKeywordsTags(seoInfo.keywords);
|
|
501
|
+
}
|
|
497
502
|
init() {
|
|
498
503
|
if (typeof this.config.title_prefix !== 'undefined') {
|
|
499
504
|
this.title_prefix = this.config.title_prefix;
|
|
@@ -526,7 +531,7 @@ class EsolveSeoService {
|
|
|
526
531
|
this.meta.updateTag({ name: 'keywords', content: keywords });
|
|
527
532
|
}
|
|
528
533
|
validateAndSanitizeSeoInfo(seoInfo) {
|
|
529
|
-
const pageSeo = new
|
|
534
|
+
const pageSeo = new EsolveSeoInfo(this.default_seo_title, this.default_seo_description, this.default_seo_keywords);
|
|
530
535
|
if (seoInfo.description.trim() !== '') {
|
|
531
536
|
pageSeo.description = seoInfo.description;
|
|
532
537
|
}
|
|
@@ -567,23 +572,13 @@ class EsolveSeoService {
|
|
|
567
572
|
}
|
|
568
573
|
return pageSeo;
|
|
569
574
|
}
|
|
570
|
-
/**
|
|
571
|
-
* Sets SEO tags for page
|
|
572
|
-
* @param seoInfo SEO object
|
|
573
|
-
*/
|
|
574
|
-
setTags(seoInfo) {
|
|
575
|
-
seoInfo = this.validateAndSanitizeSeoInfo(seoInfo);
|
|
576
|
-
this.setPageTitleTags(seoInfo.title);
|
|
577
|
-
this.setPageDescriptionTags(seoInfo.description);
|
|
578
|
-
this.setPageKeywordsTags(seoInfo.keywords);
|
|
579
|
-
}
|
|
580
575
|
}
|
|
581
576
|
EsolveSeoService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EsolveSeoService, deps: [{ token: ESOLVE_CONNECT_CONFIG }, { token: i1$1.Title }, { token: i1$1.Meta }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
582
577
|
EsolveSeoService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EsolveSeoService, providedIn: 'root' });
|
|
583
578
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EsolveSeoService, decorators: [{
|
|
584
579
|
type: Injectable,
|
|
585
580
|
args: [{
|
|
586
|
-
providedIn: 'root'
|
|
581
|
+
providedIn: 'root',
|
|
587
582
|
}]
|
|
588
583
|
}], ctorParameters: function () {
|
|
589
584
|
return [{ type: undefined, decorators: [{
|
|
@@ -904,7 +899,16 @@ class EsolveUserAccount {
|
|
|
904
899
|
this.gender = gender;
|
|
905
900
|
this.identification_number = identification_number;
|
|
906
901
|
}
|
|
907
|
-
}
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
class EsolveUserAccountResult extends EsolveResponseResult {
|
|
905
|
+
constructor(response) {
|
|
906
|
+
super(response);
|
|
907
|
+
this.id = 0;
|
|
908
|
+
this.id = +response.esolve_id;
|
|
909
|
+
}
|
|
910
|
+
}
|
|
911
|
+
|
|
908
912
|
class EsolveUserAccountBusiness {
|
|
909
913
|
constructor(name, vat_number, description, type) {
|
|
910
914
|
this.name = name;
|
|
@@ -912,7 +916,8 @@ class EsolveUserAccountBusiness {
|
|
|
912
916
|
this.description = description;
|
|
913
917
|
this.type = type;
|
|
914
918
|
}
|
|
915
|
-
}
|
|
919
|
+
}
|
|
920
|
+
|
|
916
921
|
class EsolveUserAccountContact {
|
|
917
922
|
constructor(tel_number, cell_number, fax_number) {
|
|
918
923
|
this.tel_number = tel_number;
|
|
@@ -921,44 +926,73 @@ class EsolveUserAccountContact {
|
|
|
921
926
|
}
|
|
922
927
|
}
|
|
923
928
|
|
|
924
|
-
class
|
|
925
|
-
constructor(
|
|
926
|
-
|
|
927
|
-
this.
|
|
928
|
-
this.
|
|
929
|
+
class EsolveTransactionAddress {
|
|
930
|
+
constructor(recipient, address_type, address_description, street_number, street, suburb, city, province, country, postal_code, pobox) {
|
|
931
|
+
this.recipient = recipient;
|
|
932
|
+
this.address_type = address_type;
|
|
933
|
+
this.address_description = address_description;
|
|
934
|
+
this.street_number = street_number;
|
|
935
|
+
this.street = street;
|
|
936
|
+
this.suburb = suburb;
|
|
937
|
+
this.city = city;
|
|
938
|
+
this.province = province;
|
|
939
|
+
this.country = country;
|
|
940
|
+
this.postal_code = postal_code;
|
|
941
|
+
this.pobox = pobox;
|
|
929
942
|
}
|
|
930
943
|
}
|
|
931
944
|
|
|
932
|
-
class
|
|
933
|
-
constructor(
|
|
934
|
-
this.id =
|
|
935
|
-
this.
|
|
936
|
-
this.
|
|
937
|
-
this.
|
|
938
|
-
this.
|
|
939
|
-
this.
|
|
940
|
-
this.
|
|
941
|
-
this.
|
|
942
|
-
this.importance = +record.importance;
|
|
943
|
-
this.active = record.is_active;
|
|
944
|
-
this.website_url = record.website_url;
|
|
945
|
-
this.address = new EsolveStockLocationAddress(record.street, record.suburb, record.city, record.province, record.country, record.postal_code, +record.latitude, +record.longitude);
|
|
946
|
-
this.pobox_address = new EsolveStockLocationPOBoxAddress(record.pobox, record.pobox_city, record.pobox_postal_code);
|
|
947
|
-
const telnumbers = [];
|
|
948
|
-
if (record.branch_telnumber.length > 0) {
|
|
949
|
-
telnumbers.push(record.branch_telnumber);
|
|
950
|
-
}
|
|
951
|
-
if (record.branch_telnumber_2.length > 0) {
|
|
952
|
-
telnumbers.push(record.branch_telnumber_2);
|
|
953
|
-
}
|
|
954
|
-
if (record.branch_telnumber_3.length > 0) {
|
|
955
|
-
telnumbers.push(record.branch_telnumber_3);
|
|
956
|
-
}
|
|
957
|
-
this.contact_info = new EsolveStockLocationContactInfo(telnumbers, record.branch_cellnumber, record.branch_email, record.branch_fax);
|
|
958
|
-
this.trading_times = new EsolveStockLocationTradingTimes(new EsolveStockLocationTradingTimesDay(record.monday_open_time, record.monday_close_time), new EsolveStockLocationTradingTimesDay(record.tuesday_open_time, record.tuesday_close_time), new EsolveStockLocationTradingTimesDay(record.wednesday_open_time, record.wednesday_close_time), new EsolveStockLocationTradingTimesDay(record.thursday_open_time, record.thursday_close_time), new EsolveStockLocationTradingTimesDay(record.friday_open_time, record.friday_close_time), new EsolveStockLocationTradingTimesDay(record.saturday_open_time, record.saturday_close_time), new EsolveStockLocationTradingTimesDay(record.sunday_open_time, record.sunday_close_time), new EsolveStockLocationTradingTimesDay(record.public_holiday_open_time, record.public_holiday_close_time), record.trading_hours_additional_info);
|
|
945
|
+
class EsolveTransactionClient {
|
|
946
|
+
constructor(id, account, company_name, branch_code, email, first_name, last_name, contact_number) {
|
|
947
|
+
this.id = id;
|
|
948
|
+
this.account = account;
|
|
949
|
+
this.company_name = company_name;
|
|
950
|
+
this.branch_code = branch_code;
|
|
951
|
+
this.email = email;
|
|
952
|
+
this.first_name = first_name;
|
|
953
|
+
this.last_name = last_name;
|
|
954
|
+
this.contact_number = contact_number;
|
|
959
955
|
}
|
|
960
|
-
}
|
|
961
|
-
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
class EsolveTransactionItem {
|
|
959
|
+
constructor(code, name, qty, discount, vat_rate, price, line_total) {
|
|
960
|
+
this.code = code;
|
|
961
|
+
this.name = name;
|
|
962
|
+
this.qty = qty;
|
|
963
|
+
this.discount = discount;
|
|
964
|
+
this.vat_rate = vat_rate;
|
|
965
|
+
this.price = price;
|
|
966
|
+
this.line_total = line_total;
|
|
967
|
+
}
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
class EsolveTransactionItemPrice {
|
|
971
|
+
constructor(
|
|
972
|
+
/**
|
|
973
|
+
* Price without tax
|
|
974
|
+
*/
|
|
975
|
+
price,
|
|
976
|
+
/**
|
|
977
|
+
* Price with tax
|
|
978
|
+
*/
|
|
979
|
+
price_with_tax,
|
|
980
|
+
/**
|
|
981
|
+
* Price without tax and with discounts applied if applicable
|
|
982
|
+
*/
|
|
983
|
+
price_discounted,
|
|
984
|
+
/**
|
|
985
|
+
* Price with tax and with discounts applied if applicable
|
|
986
|
+
*/
|
|
987
|
+
price_with_tax_discounted) {
|
|
988
|
+
this.price = price;
|
|
989
|
+
this.price_with_tax = price_with_tax;
|
|
990
|
+
this.price_discounted = price_discounted;
|
|
991
|
+
this.price_with_tax_discounted = price_with_tax_discounted;
|
|
992
|
+
}
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
class EsolveLocationAddress {
|
|
962
996
|
constructor(street, suburb, city, province, country, postal_code, latitude, longitude) {
|
|
963
997
|
this.street = street;
|
|
964
998
|
this.suburb = suburb;
|
|
@@ -969,23 +1003,26 @@ class EsolveStockLocationAddress {
|
|
|
969
1003
|
this.latitude = latitude;
|
|
970
1004
|
this.longitude = longitude;
|
|
971
1005
|
}
|
|
972
|
-
}
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
this.pobox = pobox;
|
|
976
|
-
this.city = city;
|
|
977
|
-
this.postal_code = postal_code;
|
|
978
|
-
}
|
|
979
|
-
}
|
|
980
|
-
class EsolveStockLocationContactInfo {
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
class EsolveLocationContactInfo {
|
|
981
1009
|
constructor(telnumber, cellnumber, email, fax) {
|
|
982
1010
|
this.telnumber = telnumber;
|
|
983
1011
|
this.cellnumber = cellnumber;
|
|
984
1012
|
this.email = email;
|
|
985
1013
|
this.fax = fax;
|
|
986
1014
|
}
|
|
987
|
-
}
|
|
988
|
-
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
class EsolveLocationPOBoxAddress {
|
|
1018
|
+
constructor(pobox, city, postal_code) {
|
|
1019
|
+
this.pobox = pobox;
|
|
1020
|
+
this.city = city;
|
|
1021
|
+
this.postal_code = postal_code;
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
class EsolveLocationTradingTimes {
|
|
989
1026
|
constructor(monday, tuesday, wednesday, thursday, friday, saturday, sunday, public_holiday, trading_hours_additional_info = '') {
|
|
990
1027
|
this.monday = monday;
|
|
991
1028
|
this.tuesday = tuesday;
|
|
@@ -997,87 +1034,106 @@ class EsolveStockLocationTradingTimes {
|
|
|
997
1034
|
this.public_holiday = public_holiday;
|
|
998
1035
|
this.trading_hours_additional_info = trading_hours_additional_info;
|
|
999
1036
|
}
|
|
1000
|
-
}
|
|
1001
|
-
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
class EsolveLocationTradingDay {
|
|
1002
1040
|
constructor(open, close) {
|
|
1003
1041
|
this.open = open;
|
|
1004
1042
|
this.close = close;
|
|
1005
1043
|
}
|
|
1006
1044
|
}
|
|
1007
1045
|
|
|
1008
|
-
class
|
|
1046
|
+
class EsolveLocation {
|
|
1009
1047
|
constructor(record) {
|
|
1010
|
-
// Transaction Items
|
|
1011
|
-
this.items = [];
|
|
1012
1048
|
this.id = +record.id;
|
|
1013
|
-
this.
|
|
1014
|
-
this.
|
|
1015
|
-
this.
|
|
1016
|
-
this.
|
|
1017
|
-
this.
|
|
1018
|
-
this.
|
|
1019
|
-
this.
|
|
1020
|
-
this.
|
|
1021
|
-
this.
|
|
1022
|
-
this.
|
|
1023
|
-
this.
|
|
1024
|
-
this.
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
this.payment_description = record.payment_description;
|
|
1029
|
-
this.gateway_transaction_id = record.gateway_transaction_id;
|
|
1030
|
-
this.address = new EsolveTransactionAddress(record.recipient, record.address_type, record.address_description, record.street_number, record.street, record.suburb, record.city, record.province, record.country, record.postal_code, record.pobox);
|
|
1031
|
-
if (record.user) {
|
|
1032
|
-
this.user = new EsolveTransactionUser(+record.user.id, record.user.email, record.user.firstname, record.user.surname, record.user.telnumber, record.user.cellnumber);
|
|
1033
|
-
}
|
|
1034
|
-
if (record.client) {
|
|
1035
|
-
this.client = new EsolveTransactionClient(+record.client.id, record.client.account, record.client.company_name, record.client.branch_code, record.client.email, record.client.firstname, record.client.surname, record.client.contact_number);
|
|
1036
|
-
}
|
|
1037
|
-
if (record.location_details) {
|
|
1038
|
-
this.location = new EsolveTransactionLocation(record.location_details);
|
|
1039
|
-
}
|
|
1040
|
-
if (record.payment_method_details) {
|
|
1041
|
-
this.payment_method = new EsolveTransactionPaymentMethod(record.payment_method_details.id, record.payment_method_details.paymethod_name, record.payment_method_details.description, record.payment_method_details.integration_type, record.payment_method_details.service_provider);
|
|
1049
|
+
this.identifier = record.identifier;
|
|
1050
|
+
this.description = record.description;
|
|
1051
|
+
this.head_office = record.head_office;
|
|
1052
|
+
this.erp_identifier = record.erp_identifier;
|
|
1053
|
+
this.external_system_code = record.external_system_code;
|
|
1054
|
+
this.default_location_for_payment_methods = record.default_location_for_payment_methods;
|
|
1055
|
+
this.userid = +record.userid;
|
|
1056
|
+
this.importance = +record.importance;
|
|
1057
|
+
this.active = record.is_active;
|
|
1058
|
+
this.website_url = record.website_url;
|
|
1059
|
+
this.address = new EsolveLocationAddress(record.street, record.suburb, record.city, record.province, record.country, record.postal_code, +record.latitude, +record.longitude);
|
|
1060
|
+
this.pobox_address = new EsolveLocationPOBoxAddress(record.pobox, record.pobox_city, record.pobox_postal_code);
|
|
1061
|
+
const telnumbers = [];
|
|
1062
|
+
if (record.branch_telnumber.length > 0) {
|
|
1063
|
+
telnumbers.push(record.branch_telnumber);
|
|
1042
1064
|
}
|
|
1043
|
-
if (record.
|
|
1044
|
-
|
|
1065
|
+
if (record.branch_telnumber_2.length > 0) {
|
|
1066
|
+
telnumbers.push(record.branch_telnumber_2);
|
|
1045
1067
|
}
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
parseTransactionItems(record_items) {
|
|
1049
|
-
for (const record_item of record_items) {
|
|
1050
|
-
const price = new EsolveTransactionItemPrice(+record_item.price_exclusive, +record_item.price_inclusive, +record_item.price_exclusive_after_discount, +record_item.price_inclusive_after_discount);
|
|
1051
|
-
const line_total = new EsolveTransactionItemPrice(+record_item.line_total_exclusive, +record_item.line_total_inclusive, +record_item.line_total_exclusive_after_discount, +record_item.line_total_inclusive_after_discount);
|
|
1052
|
-
const item = new EsolveTransactionItem(record_item.code, record_item.name, +record_item.qty, +record_item.discount, +record_item.vat_rate, price, line_total);
|
|
1053
|
-
this.items.push(item);
|
|
1068
|
+
if (record.branch_telnumber_3.length > 0) {
|
|
1069
|
+
telnumbers.push(record.branch_telnumber_3);
|
|
1054
1070
|
}
|
|
1071
|
+
this.contact_info = new EsolveLocationContactInfo(telnumbers, record.branch_cellnumber, record.branch_email, record.branch_fax);
|
|
1072
|
+
const monday = new EsolveLocationTradingDay(record.monday_open_time, record.monday_close_time);
|
|
1073
|
+
const tuesday = new EsolveLocationTradingDay(record.tuesday_open_time, record.tuesday_close_time);
|
|
1074
|
+
const wednesday = new EsolveLocationTradingDay(record.wednesday_open_time, record.wednesday_close_time);
|
|
1075
|
+
const thursday = new EsolveLocationTradingDay(record.thursday_open_time, record.thursday_close_time);
|
|
1076
|
+
const friday = new EsolveLocationTradingDay(record.friday_open_time, record.friday_close_time);
|
|
1077
|
+
const saturday = new EsolveLocationTradingDay(record.saturday_open_time, record.saturday_close_time);
|
|
1078
|
+
const sunday = new EsolveLocationTradingDay(record.sunday_open_time, record.sunday_close_time);
|
|
1079
|
+
const public_holiday = new EsolveLocationTradingDay(record.public_holiday_open_time, record.public_holiday_close_time);
|
|
1080
|
+
this.trading_times = new EsolveLocationTradingTimes(monday, tuesday, wednesday, thursday, friday, saturday, sunday, public_holiday, record.trading_hours_additional_info);
|
|
1055
1081
|
}
|
|
1056
|
-
}
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
this.
|
|
1061
|
-
this.
|
|
1062
|
-
this.branch_code = branch_code;
|
|
1063
|
-
this.email = email;
|
|
1064
|
-
this.first_name = first_name;
|
|
1065
|
-
this.last_name = last_name;
|
|
1066
|
-
this.contact_number = contact_number;
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
class EsolveLocationsService {
|
|
1085
|
+
constructor(config, http) {
|
|
1086
|
+
this.config = config;
|
|
1087
|
+
this.http = http;
|
|
1067
1088
|
}
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
this.
|
|
1075
|
-
|
|
1076
|
-
|
|
1089
|
+
/**
|
|
1090
|
+
* Retrieves a list of stock locations
|
|
1091
|
+
*
|
|
1092
|
+
* @returns An `Observable` with an array of stock locations
|
|
1093
|
+
*/
|
|
1094
|
+
getStockLocations() {
|
|
1095
|
+
return this.http
|
|
1096
|
+
.get(`${this.config.api_url}/get-locations.php`)
|
|
1097
|
+
.pipe(map((response) => {
|
|
1098
|
+
if (response.records === undefined) {
|
|
1099
|
+
throw response;
|
|
1100
|
+
}
|
|
1101
|
+
return this.processStockLocations(response.records);
|
|
1102
|
+
}));
|
|
1103
|
+
}
|
|
1104
|
+
/**
|
|
1105
|
+
* Processes the eSolve stock location records.
|
|
1106
|
+
*
|
|
1107
|
+
* @param records Records to process
|
|
1108
|
+
* @returns An array of processed stock location records
|
|
1109
|
+
*/
|
|
1110
|
+
processStockLocations(records) {
|
|
1111
|
+
const stock_locations = [];
|
|
1112
|
+
if (records) {
|
|
1113
|
+
for (const record of records) {
|
|
1114
|
+
stock_locations.push(new EsolveLocation(record));
|
|
1115
|
+
}
|
|
1116
|
+
}
|
|
1117
|
+
return stock_locations;
|
|
1077
1118
|
}
|
|
1078
1119
|
}
|
|
1079
|
-
|
|
1080
|
-
}
|
|
1120
|
+
EsolveLocationsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EsolveLocationsService, deps: [{ token: ESOLVE_CONNECT_CONFIG }, { token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1121
|
+
EsolveLocationsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EsolveLocationsService, providedIn: 'root' });
|
|
1122
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EsolveLocationsService, decorators: [{
|
|
1123
|
+
type: Injectable,
|
|
1124
|
+
args: [{
|
|
1125
|
+
providedIn: 'root',
|
|
1126
|
+
}]
|
|
1127
|
+
}], ctorParameters: function () {
|
|
1128
|
+
return [{ type: undefined, decorators: [{
|
|
1129
|
+
type: Inject,
|
|
1130
|
+
args: [ESOLVE_CONNECT_CONFIG]
|
|
1131
|
+
}] }, { type: i1$2.HttpClient }];
|
|
1132
|
+
} });
|
|
1133
|
+
|
|
1134
|
+
class EsolveTransactionLocation extends EsolveLocation {
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1081
1137
|
class EsolveTransactionPaymentMethod {
|
|
1082
1138
|
constructor(id, name, description, integration_type, service_provider) {
|
|
1083
1139
|
this.id = id;
|
|
@@ -1086,7 +1142,8 @@ class EsolveTransactionPaymentMethod {
|
|
|
1086
1142
|
this.integration_type = integration_type;
|
|
1087
1143
|
this.service_provider = service_provider;
|
|
1088
1144
|
}
|
|
1089
|
-
}
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1090
1147
|
class EsolveTransactionShippingMethod {
|
|
1091
1148
|
constructor(id, name, delivery_category, location, description, pricing, client_to_collect) {
|
|
1092
1149
|
this.id = id;
|
|
@@ -1097,71 +1154,73 @@ class EsolveTransactionShippingMethod {
|
|
|
1097
1154
|
this.pricing = pricing;
|
|
1098
1155
|
this.client_to_collect = client_to_collect;
|
|
1099
1156
|
}
|
|
1100
|
-
}
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
this.
|
|
1105
|
-
this.
|
|
1106
|
-
this.
|
|
1107
|
-
this.
|
|
1108
|
-
this.
|
|
1109
|
-
this.
|
|
1110
|
-
this.province = province;
|
|
1111
|
-
this.country = country;
|
|
1112
|
-
this.postal_code = postal_code;
|
|
1113
|
-
this.pobox = pobox;
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1159
|
+
class EsolveTransactionUser {
|
|
1160
|
+
constructor(id, email, first_name, last_name, tel_number, cell_number) {
|
|
1161
|
+
this.id = id;
|
|
1162
|
+
this.email = email;
|
|
1163
|
+
this.first_name = first_name;
|
|
1164
|
+
this.last_name = last_name;
|
|
1165
|
+
this.tel_number = tel_number;
|
|
1166
|
+
this.cell_number = cell_number;
|
|
1114
1167
|
}
|
|
1115
|
-
}
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
this.
|
|
1121
|
-
this.
|
|
1122
|
-
this.
|
|
1123
|
-
this.
|
|
1124
|
-
this.
|
|
1168
|
+
}
|
|
1169
|
+
|
|
1170
|
+
class EsolveTransaction {
|
|
1171
|
+
constructor(record) {
|
|
1172
|
+
// Transaction Items
|
|
1173
|
+
this.items = [];
|
|
1174
|
+
this.id = +record.id;
|
|
1175
|
+
this.type = record.transaction_type;
|
|
1176
|
+
this.status = record.status;
|
|
1177
|
+
this.loyalty_number = record.loyaltynumber;
|
|
1178
|
+
this.external_order_number = record.external_order_number;
|
|
1179
|
+
this.external_invoice_number = record.external_invoice_number;
|
|
1180
|
+
this.date = new Date(+record.txdate_timestamp * 1000);
|
|
1181
|
+
this.expected_date = new Date(+record.expected_date_timestamp * 1000);
|
|
1182
|
+
this.invoice_amount = +record.invoice_amount;
|
|
1183
|
+
this.vat = +record.vat;
|
|
1184
|
+
this.discount = +record.discount;
|
|
1185
|
+
this.total = +record.total;
|
|
1186
|
+
this.shipping_total = +record.shipping_total;
|
|
1187
|
+
this.insurance_total = +record.insurance_total;
|
|
1188
|
+
this.payment = +record.payment;
|
|
1189
|
+
this.payment_reference = record.payment_reference;
|
|
1190
|
+
this.payment_description = record.payment_description;
|
|
1191
|
+
this.gateway_transaction_id = record.gateway_transaction_id;
|
|
1192
|
+
this.address = new EsolveTransactionAddress(record.recipient, record.address_type, record.address_description, record.street_number, record.street, record.suburb, record.city, record.province, record.country, record.postal_code, record.pobox);
|
|
1193
|
+
if (record.user) {
|
|
1194
|
+
this.user = new EsolveTransactionUser(+record.user.id, record.user.email, record.user.firstname, record.user.surname, record.user.telnumber, record.user.cellnumber);
|
|
1195
|
+
}
|
|
1196
|
+
if (record.client) {
|
|
1197
|
+
this.client = new EsolveTransactionClient(+record.client.id, record.client.account, record.client.company_name, record.client.branch_code, record.client.email, record.client.firstname, record.client.surname, record.client.contact_number);
|
|
1198
|
+
}
|
|
1199
|
+
if (record.location_details) {
|
|
1200
|
+
this.location = new EsolveTransactionLocation(record.location_details);
|
|
1201
|
+
}
|
|
1202
|
+
if (record.payment_method_details) {
|
|
1203
|
+
this.payment_method = new EsolveTransactionPaymentMethod(record.payment_method_details.id, record.payment_method_details.paymethod_name, record.payment_method_details.description, record.payment_method_details.integration_type, record.payment_method_details.service_provider);
|
|
1204
|
+
}
|
|
1205
|
+
if (record.shipping_method_details) {
|
|
1206
|
+
this.shipping_method = new EsolveTransactionShippingMethod(+record.shipping_method_details.id, record.shipping_method_details.carrier_name, record.shipping_method_details.delivery_category, record.shipping_method_details.location, record.shipping_method_details.description, record.shipping_method_details.pricing, !!record.shipping_method_details.client_to_collect);
|
|
1207
|
+
}
|
|
1208
|
+
this.parseTransactionItems(record.transaction_items);
|
|
1125
1209
|
}
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
/**
|
|
1134
|
-
* Price with tax
|
|
1135
|
-
*/
|
|
1136
|
-
price_with_tax,
|
|
1137
|
-
/**
|
|
1138
|
-
* Price without tax and with discounts applied if appilcable
|
|
1139
|
-
*/
|
|
1140
|
-
price_discounted,
|
|
1141
|
-
/**
|
|
1142
|
-
* Price with tax and with discounts applied if appilcable
|
|
1143
|
-
*/
|
|
1144
|
-
price_with_tax_discounted) {
|
|
1145
|
-
this.price = price;
|
|
1146
|
-
this.price_with_tax = price_with_tax;
|
|
1147
|
-
this.price_discounted = price_discounted;
|
|
1148
|
-
this.price_with_tax_discounted = price_with_tax_discounted;
|
|
1210
|
+
parseTransactionItems(record_items) {
|
|
1211
|
+
for (const record_item of record_items) {
|
|
1212
|
+
const price = new EsolveTransactionItemPrice(+record_item.price_exclusive, +record_item.price_inclusive, +record_item.price_exclusive_after_discount, +record_item.price_inclusive_after_discount);
|
|
1213
|
+
const line_total = new EsolveTransactionItemPrice(+record_item.line_total_exclusive, +record_item.line_total_inclusive, +record_item.line_total_exclusive_after_discount, +record_item.line_total_inclusive_after_discount);
|
|
1214
|
+
const item = new EsolveTransactionItem(record_item.code, record_item.name, +record_item.qty, +record_item.discount, +record_item.vat_rate, price, line_total);
|
|
1215
|
+
this.items.push(item);
|
|
1216
|
+
}
|
|
1149
1217
|
}
|
|
1150
1218
|
}
|
|
1151
1219
|
|
|
1152
1220
|
class EsolveTransactionList extends EsolveList {
|
|
1153
1221
|
}
|
|
1154
1222
|
|
|
1155
|
-
|
|
1156
|
-
constructor(response) {
|
|
1157
|
-
super(response);
|
|
1158
|
-
this.user_id = response.esolve_id;
|
|
1159
|
-
this.guest = response.guest;
|
|
1160
|
-
this.auto_login = response.auto_login;
|
|
1161
|
-
this.authentication_required = response.authentication_required;
|
|
1162
|
-
this.location_id = response.session_data.location_id;
|
|
1163
|
-
}
|
|
1164
|
-
}
|
|
1223
|
+
// Classes
|
|
1165
1224
|
|
|
1166
1225
|
class EsolveChangePasswordResult extends EsolveResponseResult {
|
|
1167
1226
|
constructor(response) {
|
|
@@ -1180,6 +1239,17 @@ class EsolveResetPasswordResult extends EsolveResponseResult {
|
|
|
1180
1239
|
}
|
|
1181
1240
|
}
|
|
1182
1241
|
|
|
1242
|
+
class EsolveRegistrationResult extends EsolveResponseResult {
|
|
1243
|
+
constructor(response) {
|
|
1244
|
+
super(response);
|
|
1245
|
+
this.user_id = response.esolve_id;
|
|
1246
|
+
this.guest = response.guest;
|
|
1247
|
+
this.auto_login = response.auto_login;
|
|
1248
|
+
this.authentication_required = response.authentication_required;
|
|
1249
|
+
this.location_id = response.session_data.location_id;
|
|
1250
|
+
}
|
|
1251
|
+
}
|
|
1252
|
+
|
|
1183
1253
|
class EsolveLocationUpdateResult extends EsolveResponseResult {
|
|
1184
1254
|
constructor(response) {
|
|
1185
1255
|
super(response);
|
|
@@ -1477,7 +1547,7 @@ EsolveAccountService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0",
|
|
|
1477
1547
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EsolveAccountService, decorators: [{
|
|
1478
1548
|
type: Injectable,
|
|
1479
1549
|
args: [{
|
|
1480
|
-
providedIn: 'root'
|
|
1550
|
+
providedIn: 'root',
|
|
1481
1551
|
}]
|
|
1482
1552
|
}], ctorParameters: function () {
|
|
1483
1553
|
return [{ type: undefined, decorators: [{
|
|
@@ -1486,26 +1556,172 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
1486
1556
|
}] }, { type: i1$2.HttpClient }, { type: EsolveSessionService }, { type: EsolveErrorHandlerService }, { type: EsolveResponseHandlerService }];
|
|
1487
1557
|
} });
|
|
1488
1558
|
|
|
1489
|
-
class
|
|
1490
|
-
constructor(identifier,
|
|
1491
|
-
this.
|
|
1492
|
-
this.
|
|
1493
|
-
}
|
|
1494
|
-
}
|
|
1495
|
-
|
|
1496
|
-
class EsolveMediaArticle {
|
|
1497
|
-
constructor(identifier, title, article, image_url = '', tags = [], topics = [], seo_title = '', seo_keywords = '', seo_description = '') {
|
|
1559
|
+
class EsolveBanner {
|
|
1560
|
+
constructor(id, banner_display_container, identifier, type, title, article, sort_priority, link, images) {
|
|
1561
|
+
this.id = id;
|
|
1562
|
+
this.banner_display_container = banner_display_container;
|
|
1498
1563
|
this.identifier = identifier;
|
|
1564
|
+
this.type = type;
|
|
1499
1565
|
this.title = title;
|
|
1500
1566
|
this.article = article;
|
|
1501
|
-
this.
|
|
1502
|
-
this.
|
|
1503
|
-
this.
|
|
1504
|
-
|
|
1505
|
-
|
|
1567
|
+
this.sort_priority = sort_priority;
|
|
1568
|
+
this.link = link;
|
|
1569
|
+
this.desktop_images = [];
|
|
1570
|
+
this.mobile_images = [];
|
|
1571
|
+
this.sub_images = [];
|
|
1572
|
+
if (images.desktop) {
|
|
1573
|
+
this.desktop_images = images.desktop;
|
|
1506
1574
|
}
|
|
1507
|
-
|
|
1508
|
-
|
|
1575
|
+
if (images.mobile) {
|
|
1576
|
+
this.mobile_images = images.mobile;
|
|
1577
|
+
}
|
|
1578
|
+
if (images.sub) {
|
|
1579
|
+
this.sub_images = images.sub;
|
|
1580
|
+
}
|
|
1581
|
+
}
|
|
1582
|
+
}
|
|
1583
|
+
|
|
1584
|
+
class EsolveBannerImage {
|
|
1585
|
+
constructor(id, image_type, width, height, filename, hotspots) {
|
|
1586
|
+
this.id = id;
|
|
1587
|
+
this.image_type = image_type;
|
|
1588
|
+
this.width = width;
|
|
1589
|
+
this.height = height;
|
|
1590
|
+
this.filename = filename;
|
|
1591
|
+
this.hotspots = hotspots;
|
|
1592
|
+
}
|
|
1593
|
+
get src() {
|
|
1594
|
+
return '/images/banners/' + this.filename;
|
|
1595
|
+
}
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1598
|
+
class EsolveBannerImageHotspot {
|
|
1599
|
+
constructor(url, target, coords, coords_string) {
|
|
1600
|
+
this.url = url;
|
|
1601
|
+
this.target = target;
|
|
1602
|
+
this.coords = coords;
|
|
1603
|
+
this.coords_string = coords_string;
|
|
1604
|
+
}
|
|
1605
|
+
}
|
|
1606
|
+
|
|
1607
|
+
class EsolveBannerService {
|
|
1608
|
+
constructor(config, http) {
|
|
1609
|
+
this.config = config;
|
|
1610
|
+
this.http = http;
|
|
1611
|
+
}
|
|
1612
|
+
/**
|
|
1613
|
+
* Retrieves banners records from eSolve instance
|
|
1614
|
+
*
|
|
1615
|
+
* @returns An observable of eSolve banners.
|
|
1616
|
+
*/
|
|
1617
|
+
getBanners(identifier, banner_display_container, enable_date_filter = false) {
|
|
1618
|
+
let params = new HttpParams({
|
|
1619
|
+
fromObject: { enable_date_filter }
|
|
1620
|
+
});
|
|
1621
|
+
if (identifier) {
|
|
1622
|
+
params = params.set('identifier', identifier);
|
|
1623
|
+
}
|
|
1624
|
+
if (banner_display_container) {
|
|
1625
|
+
params = params.set('banner_display_container', banner_display_container);
|
|
1626
|
+
}
|
|
1627
|
+
return this.http
|
|
1628
|
+
.get(`${this.config.api_url}/get-banners.php`, { params })
|
|
1629
|
+
.pipe(map((response) => {
|
|
1630
|
+
if (response.records === undefined) {
|
|
1631
|
+
throw response;
|
|
1632
|
+
}
|
|
1633
|
+
return this.processBanners(response.records);
|
|
1634
|
+
}));
|
|
1635
|
+
}
|
|
1636
|
+
processBannerImageHotspots(hotspot_records) {
|
|
1637
|
+
const hotspots = [];
|
|
1638
|
+
if (hotspot_records.length > 0) {
|
|
1639
|
+
for (const hotspot_record of hotspot_records) {
|
|
1640
|
+
const hotspot = new EsolveBannerImageHotspot(hotspot_record.url, hotspot_record.target, hotspot_record.coords, hotspot_record.coords_string);
|
|
1641
|
+
hotspots.push(hotspot);
|
|
1642
|
+
}
|
|
1643
|
+
}
|
|
1644
|
+
return hotspots;
|
|
1645
|
+
}
|
|
1646
|
+
processBannerImages(image_records, banner_type) {
|
|
1647
|
+
const images = [];
|
|
1648
|
+
if (image_records.length > 0) {
|
|
1649
|
+
for (const image_record of image_records) {
|
|
1650
|
+
const image = new EsolveBannerImage(+image_record.id, image_record.image_type, +image_record.width, +image_record.height, image_record.filename);
|
|
1651
|
+
if ((banner_type === 'hotspot') && (image_record.hotspots)) {
|
|
1652
|
+
const hotspots = this.processBannerImageHotspots(image_record.hotspots);
|
|
1653
|
+
image.hotspots = hotspots;
|
|
1654
|
+
}
|
|
1655
|
+
images.push(image);
|
|
1656
|
+
}
|
|
1657
|
+
}
|
|
1658
|
+
return images;
|
|
1659
|
+
}
|
|
1660
|
+
/**
|
|
1661
|
+
* Process banner records into banner objects
|
|
1662
|
+
* @param records Array of records
|
|
1663
|
+
* @returns List of banners
|
|
1664
|
+
*/
|
|
1665
|
+
processBanners(records) {
|
|
1666
|
+
const banners = [];
|
|
1667
|
+
if ((records) && (records.length > 0)) {
|
|
1668
|
+
for (const record of records) {
|
|
1669
|
+
const image_sets = {};
|
|
1670
|
+
if (record.images.desktop) {
|
|
1671
|
+
image_sets.desktop = this.processBannerImages(record.images.desktop, record.type);
|
|
1672
|
+
}
|
|
1673
|
+
if (record.images.mobile) {
|
|
1674
|
+
image_sets.mobile = this.processBannerImages(record.images.mobile, record.type);
|
|
1675
|
+
}
|
|
1676
|
+
if (record.images.sub) {
|
|
1677
|
+
image_sets.sub = this.processBannerImages(record.images.sub, record.type);
|
|
1678
|
+
}
|
|
1679
|
+
const banner = new EsolveBanner(+record.id, record.banner_display_container, record.identifier, record.type, record.title, record.article, +record.sort_priority, {
|
|
1680
|
+
url: record.link.url,
|
|
1681
|
+
target: record.link.target
|
|
1682
|
+
}, image_sets);
|
|
1683
|
+
banners.push(banner);
|
|
1684
|
+
}
|
|
1685
|
+
}
|
|
1686
|
+
return banners;
|
|
1687
|
+
}
|
|
1688
|
+
}
|
|
1689
|
+
EsolveBannerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EsolveBannerService, deps: [{ token: ESOLVE_CONNECT_CONFIG }, { token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1690
|
+
EsolveBannerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EsolveBannerService, providedIn: 'root' });
|
|
1691
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EsolveBannerService, decorators: [{
|
|
1692
|
+
type: Injectable,
|
|
1693
|
+
args: [{
|
|
1694
|
+
providedIn: 'root',
|
|
1695
|
+
}]
|
|
1696
|
+
}], ctorParameters: function () {
|
|
1697
|
+
return [{ type: undefined, decorators: [{
|
|
1698
|
+
type: Inject,
|
|
1699
|
+
args: [ESOLVE_CONNECT_CONFIG]
|
|
1700
|
+
}] }, { type: i1$2.HttpClient }];
|
|
1701
|
+
} });
|
|
1702
|
+
|
|
1703
|
+
// Types
|
|
1704
|
+
|
|
1705
|
+
class EsolveHeading {
|
|
1706
|
+
constructor(identifier, value) {
|
|
1707
|
+
this.identifier = identifier;
|
|
1708
|
+
this.value = value;
|
|
1709
|
+
}
|
|
1710
|
+
}
|
|
1711
|
+
|
|
1712
|
+
class EsolveMediaArticle {
|
|
1713
|
+
constructor(identifier, title, article, image_url = '', tags = [], topics = [], seo_title = '', seo_keywords = '', seo_description = '') {
|
|
1714
|
+
this.identifier = identifier;
|
|
1715
|
+
this.title = title;
|
|
1716
|
+
this.article = article;
|
|
1717
|
+
this.image_url = image_url;
|
|
1718
|
+
this.tags = tags;
|
|
1719
|
+
this.topics = topics;
|
|
1720
|
+
if (seo_title.trim() === '') {
|
|
1721
|
+
seo_title = this.title;
|
|
1722
|
+
}
|
|
1723
|
+
this.seo_details = new EsolveSeoInfo(seo_title, seo_description, seo_keywords);
|
|
1724
|
+
}
|
|
1509
1725
|
}
|
|
1510
1726
|
|
|
1511
1727
|
class EsolveTag {
|
|
@@ -1526,6 +1742,54 @@ class EsolveTopic {
|
|
|
1526
1742
|
}
|
|
1527
1743
|
}
|
|
1528
1744
|
|
|
1745
|
+
class EsolveTopicService {
|
|
1746
|
+
constructor(config, http) {
|
|
1747
|
+
this.config = config;
|
|
1748
|
+
this.http = http;
|
|
1749
|
+
}
|
|
1750
|
+
/**
|
|
1751
|
+
* Retrieves active topics from the list of topic ID's. Note that inactive or expired
|
|
1752
|
+
* topics will not be retrieved.
|
|
1753
|
+
*
|
|
1754
|
+
* @param topic_id_list List of topic ID's that need to be retrieved
|
|
1755
|
+
*/
|
|
1756
|
+
getTopics(topic_id_list = []) {
|
|
1757
|
+
let params = new HttpParams();
|
|
1758
|
+
if (topic_id_list.length > 0) {
|
|
1759
|
+
params = params.append('topic_id', topic_id_list.join(','));
|
|
1760
|
+
}
|
|
1761
|
+
return this.http.get(`${this.config.api_url}/get-topics.php`, { params }).pipe(map(response => {
|
|
1762
|
+
if (response.records === undefined) {
|
|
1763
|
+
throw response;
|
|
1764
|
+
}
|
|
1765
|
+
return this.processTopics(response.records);
|
|
1766
|
+
}));
|
|
1767
|
+
}
|
|
1768
|
+
processTopics(records) {
|
|
1769
|
+
const topics = [];
|
|
1770
|
+
if (records) {
|
|
1771
|
+
for (const record of records) {
|
|
1772
|
+
const topic = new EsolveTopic(+record.id, record.name, record.short_description, +record.sort_priority);
|
|
1773
|
+
topics.push(topic);
|
|
1774
|
+
}
|
|
1775
|
+
}
|
|
1776
|
+
return topics;
|
|
1777
|
+
}
|
|
1778
|
+
}
|
|
1779
|
+
EsolveTopicService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EsolveTopicService, deps: [{ token: ESOLVE_CONNECT_CONFIG }, { token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1780
|
+
EsolveTopicService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EsolveTopicService, providedIn: 'root' });
|
|
1781
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EsolveTopicService, decorators: [{
|
|
1782
|
+
type: Injectable,
|
|
1783
|
+
args: [{
|
|
1784
|
+
providedIn: 'root',
|
|
1785
|
+
}]
|
|
1786
|
+
}], ctorParameters: function () {
|
|
1787
|
+
return [{ type: undefined, decorators: [{
|
|
1788
|
+
type: Inject,
|
|
1789
|
+
args: [ESOLVE_CONNECT_CONFIG]
|
|
1790
|
+
}] }, { type: i1$2.HttpClient }];
|
|
1791
|
+
} });
|
|
1792
|
+
|
|
1529
1793
|
class EsolveMediaService {
|
|
1530
1794
|
constructor(config, http) {
|
|
1531
1795
|
this.config = config;
|
|
@@ -1647,6 +1911,57 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
1647
1911
|
}] }, { type: i1$2.HttpClient }];
|
|
1648
1912
|
} });
|
|
1649
1913
|
|
|
1914
|
+
class EsolveMenuItem {
|
|
1915
|
+
constructor(url, name, target, children = []) {
|
|
1916
|
+
this.url = url;
|
|
1917
|
+
this.name = name;
|
|
1918
|
+
this.target = target;
|
|
1919
|
+
this.children = children;
|
|
1920
|
+
}
|
|
1921
|
+
}
|
|
1922
|
+
|
|
1923
|
+
class EsolveMenuService {
|
|
1924
|
+
constructor(config, http) {
|
|
1925
|
+
this.config = config;
|
|
1926
|
+
this.http = http;
|
|
1927
|
+
}
|
|
1928
|
+
getMenuTree(identifier) {
|
|
1929
|
+
return this.http
|
|
1930
|
+
.get(`${this.config.api_url}/get-menu-tree.php`, { params: { identifier } })
|
|
1931
|
+
.pipe(map((response) => {
|
|
1932
|
+
if ((!response) || (response.records === undefined)) {
|
|
1933
|
+
throw response;
|
|
1934
|
+
}
|
|
1935
|
+
else if (response.records.length === 0) {
|
|
1936
|
+
return [];
|
|
1937
|
+
}
|
|
1938
|
+
return this.handleMenu(response.records);
|
|
1939
|
+
}));
|
|
1940
|
+
}
|
|
1941
|
+
handleMenu(records) {
|
|
1942
|
+
const menu = [];
|
|
1943
|
+
if (typeof records !== 'undefined') {
|
|
1944
|
+
for (const menuTreeRecord of records) {
|
|
1945
|
+
menu.push(new EsolveMenuItem(menuTreeRecord.sef_url, menuTreeRecord.name, menuTreeRecord.target, this.handleMenu(menuTreeRecord.children)));
|
|
1946
|
+
}
|
|
1947
|
+
}
|
|
1948
|
+
return menu;
|
|
1949
|
+
}
|
|
1950
|
+
}
|
|
1951
|
+
EsolveMenuService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EsolveMenuService, deps: [{ token: ESOLVE_CONNECT_CONFIG }, { token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1952
|
+
EsolveMenuService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EsolveMenuService, providedIn: 'root' });
|
|
1953
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EsolveMenuService, decorators: [{
|
|
1954
|
+
type: Injectable,
|
|
1955
|
+
args: [{
|
|
1956
|
+
providedIn: 'root',
|
|
1957
|
+
}]
|
|
1958
|
+
}], ctorParameters: function () {
|
|
1959
|
+
return [{ type: undefined, decorators: [{
|
|
1960
|
+
type: Inject,
|
|
1961
|
+
args: [ESOLVE_CONNECT_CONFIG]
|
|
1962
|
+
}] }, { type: i1$2.HttpClient }];
|
|
1963
|
+
} });
|
|
1964
|
+
|
|
1650
1965
|
class EsolveNewsGroup {
|
|
1651
1966
|
constructor(id, name, description, sef_name) {
|
|
1652
1967
|
this.id = id;
|
|
@@ -1671,7 +1986,7 @@ class EsolveNewsArticle {
|
|
|
1671
1986
|
if (seo_title.trim() === '') {
|
|
1672
1987
|
seo_title = this.title;
|
|
1673
1988
|
}
|
|
1674
|
-
this.seo_details = new
|
|
1989
|
+
this.seo_details = new EsolveSeoInfo(seo_title, short_description, seo_keywords);
|
|
1675
1990
|
}
|
|
1676
1991
|
}
|
|
1677
1992
|
|
|
@@ -1787,253 +2102,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
1787
2102
|
}] }, { type: i1$2.HttpClient }];
|
|
1788
2103
|
} });
|
|
1789
2104
|
|
|
1790
|
-
class
|
|
1791
|
-
constructor(id,
|
|
2105
|
+
class EsolveStockBadge {
|
|
2106
|
+
constructor(id, text, identifier, font_colour, badge_colour, sort_priority) {
|
|
1792
2107
|
this.id = id;
|
|
1793
|
-
this.
|
|
1794
|
-
this.identifier = identifier;
|
|
1795
|
-
this.type = type;
|
|
1796
|
-
this.title = title;
|
|
1797
|
-
this.article = article;
|
|
1798
|
-
this.sort_priority = sort_priority;
|
|
1799
|
-
this.link = link;
|
|
1800
|
-
this.desktop_images = [];
|
|
1801
|
-
this.mobile_images = [];
|
|
1802
|
-
this.sub_images = [];
|
|
1803
|
-
if (images.desktop) {
|
|
1804
|
-
this.desktop_images = images.desktop;
|
|
1805
|
-
}
|
|
1806
|
-
if (images.mobile) {
|
|
1807
|
-
this.mobile_images = images.mobile;
|
|
1808
|
-
}
|
|
1809
|
-
if (images.sub) {
|
|
1810
|
-
this.sub_images = images.sub;
|
|
1811
|
-
}
|
|
1812
|
-
}
|
|
1813
|
-
}
|
|
1814
|
-
|
|
1815
|
-
class EsolveBannerImage {
|
|
1816
|
-
constructor(id, image_type, width, height, filename, hotspots) {
|
|
1817
|
-
this.id = id;
|
|
1818
|
-
this.image_type = image_type;
|
|
1819
|
-
this.width = width;
|
|
1820
|
-
this.height = height;
|
|
1821
|
-
this.filename = filename;
|
|
1822
|
-
this.hotspots = hotspots;
|
|
1823
|
-
}
|
|
1824
|
-
get src() {
|
|
1825
|
-
return '/images/banners/' + this.filename;
|
|
1826
|
-
}
|
|
1827
|
-
}
|
|
1828
|
-
|
|
1829
|
-
class EsolveBannerImageHotspot {
|
|
1830
|
-
constructor(url, target, coords, coords_string) {
|
|
1831
|
-
this.url = url;
|
|
1832
|
-
this.target = target;
|
|
1833
|
-
this.coords = coords;
|
|
1834
|
-
this.coords_string = coords_string;
|
|
1835
|
-
}
|
|
1836
|
-
}
|
|
1837
|
-
|
|
1838
|
-
class EsolveBannerService {
|
|
1839
|
-
constructor(config, http) {
|
|
1840
|
-
this.config = config;
|
|
1841
|
-
this.http = http;
|
|
1842
|
-
}
|
|
1843
|
-
/**
|
|
1844
|
-
* Retrieves banners records from eSolve instance
|
|
1845
|
-
*
|
|
1846
|
-
* @returns An observable of eSolve banners.
|
|
1847
|
-
*/
|
|
1848
|
-
getBanners(identifier, banner_display_container, enable_date_filter = false) {
|
|
1849
|
-
let params = new HttpParams({
|
|
1850
|
-
fromObject: { enable_date_filter }
|
|
1851
|
-
});
|
|
1852
|
-
if (identifier) {
|
|
1853
|
-
params = params.set('identifier', identifier);
|
|
1854
|
-
}
|
|
1855
|
-
if (banner_display_container) {
|
|
1856
|
-
params = params.set('banner_display_container', banner_display_container);
|
|
1857
|
-
}
|
|
1858
|
-
return this.http
|
|
1859
|
-
.get(`${this.config.api_url}/get-banners.php`, { params })
|
|
1860
|
-
.pipe(map((response) => {
|
|
1861
|
-
if (response.records === undefined) {
|
|
1862
|
-
throw response;
|
|
1863
|
-
}
|
|
1864
|
-
return this.processBanners(response.records);
|
|
1865
|
-
}));
|
|
1866
|
-
}
|
|
1867
|
-
processBannerImageHotspots(hotspot_records) {
|
|
1868
|
-
const hotspots = [];
|
|
1869
|
-
if (hotspot_records.length > 0) {
|
|
1870
|
-
for (const hotspot_record of hotspot_records) {
|
|
1871
|
-
const hotspot = new EsolveBannerImageHotspot(hotspot_record.url, hotspot_record.target, hotspot_record.coords, hotspot_record.coords_string);
|
|
1872
|
-
hotspots.push(hotspot);
|
|
1873
|
-
}
|
|
1874
|
-
}
|
|
1875
|
-
return hotspots;
|
|
1876
|
-
}
|
|
1877
|
-
processBannerImages(image_records, banner_type) {
|
|
1878
|
-
const images = [];
|
|
1879
|
-
if (image_records.length > 0) {
|
|
1880
|
-
for (const image_record of image_records) {
|
|
1881
|
-
const image = new EsolveBannerImage(+image_record.id, image_record.image_type, +image_record.width, +image_record.height, image_record.filename);
|
|
1882
|
-
if ((banner_type === 'hotspot') && (image_record.hotspots)) {
|
|
1883
|
-
const hotspots = this.processBannerImageHotspots(image_record.hotspots);
|
|
1884
|
-
image.hotspots = hotspots;
|
|
1885
|
-
}
|
|
1886
|
-
images.push(image);
|
|
1887
|
-
}
|
|
1888
|
-
}
|
|
1889
|
-
return images;
|
|
1890
|
-
}
|
|
1891
|
-
/**
|
|
1892
|
-
* Process banner records into banner objects
|
|
1893
|
-
* @param records Array of records
|
|
1894
|
-
* @returns List of banners
|
|
1895
|
-
*/
|
|
1896
|
-
processBanners(records) {
|
|
1897
|
-
const banners = [];
|
|
1898
|
-
if ((records) && (records.length > 0)) {
|
|
1899
|
-
for (const record of records) {
|
|
1900
|
-
const image_sets = {};
|
|
1901
|
-
if (record.images.desktop) {
|
|
1902
|
-
image_sets.desktop = this.processBannerImages(record.images.desktop, record.type);
|
|
1903
|
-
}
|
|
1904
|
-
if (record.images.mobile) {
|
|
1905
|
-
image_sets.mobile = this.processBannerImages(record.images.mobile, record.type);
|
|
1906
|
-
}
|
|
1907
|
-
if (record.images.sub) {
|
|
1908
|
-
image_sets.sub = this.processBannerImages(record.images.sub, record.type);
|
|
1909
|
-
}
|
|
1910
|
-
const banner = new EsolveBanner(+record.id, record.banner_display_container, record.identifier, record.type, record.title, record.article, +record.sort_priority, {
|
|
1911
|
-
url: record.link.url,
|
|
1912
|
-
target: record.link.target
|
|
1913
|
-
}, image_sets);
|
|
1914
|
-
banners.push(banner);
|
|
1915
|
-
}
|
|
1916
|
-
}
|
|
1917
|
-
return banners;
|
|
1918
|
-
}
|
|
1919
|
-
}
|
|
1920
|
-
EsolveBannerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EsolveBannerService, deps: [{ token: ESOLVE_CONNECT_CONFIG }, { token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1921
|
-
EsolveBannerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EsolveBannerService, providedIn: 'root' });
|
|
1922
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EsolveBannerService, decorators: [{
|
|
1923
|
-
type: Injectable,
|
|
1924
|
-
args: [{
|
|
1925
|
-
providedIn: 'root',
|
|
1926
|
-
}]
|
|
1927
|
-
}], ctorParameters: function () {
|
|
1928
|
-
return [{ type: undefined, decorators: [{
|
|
1929
|
-
type: Inject,
|
|
1930
|
-
args: [ESOLVE_CONNECT_CONFIG]
|
|
1931
|
-
}] }, { type: i1$2.HttpClient }];
|
|
1932
|
-
} });
|
|
1933
|
-
|
|
1934
|
-
class EsolveMenuItem {
|
|
1935
|
-
constructor(url, name, target, children = []) {
|
|
1936
|
-
this.url = url;
|
|
1937
|
-
this.name = name;
|
|
1938
|
-
this.target = target;
|
|
1939
|
-
this.children = children;
|
|
1940
|
-
}
|
|
1941
|
-
}
|
|
1942
|
-
|
|
1943
|
-
class EsolveMenuService {
|
|
1944
|
-
constructor(config, http) {
|
|
1945
|
-
this.config = config;
|
|
1946
|
-
this.http = http;
|
|
1947
|
-
}
|
|
1948
|
-
getMenuTree(identifier) {
|
|
1949
|
-
return this.http
|
|
1950
|
-
.get(`${this.config.api_url}/get-menu-tree.php`, { params: { identifier } })
|
|
1951
|
-
.pipe(map((response) => {
|
|
1952
|
-
if ((!response) || (response.records === undefined)) {
|
|
1953
|
-
throw response;
|
|
1954
|
-
}
|
|
1955
|
-
else if (response.records.length === 0) {
|
|
1956
|
-
return [];
|
|
1957
|
-
}
|
|
1958
|
-
return this.handleMenu(response.records);
|
|
1959
|
-
}));
|
|
1960
|
-
}
|
|
1961
|
-
handleMenu(records) {
|
|
1962
|
-
const menu = [];
|
|
1963
|
-
if (typeof records !== 'undefined') {
|
|
1964
|
-
for (const menuTreeRecord of records) {
|
|
1965
|
-
menu.push(new EsolveMenuItem(menuTreeRecord.sef_url, menuTreeRecord.name, menuTreeRecord.target, this.handleMenu(menuTreeRecord.children)));
|
|
1966
|
-
}
|
|
1967
|
-
}
|
|
1968
|
-
return menu;
|
|
1969
|
-
}
|
|
1970
|
-
}
|
|
1971
|
-
EsolveMenuService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EsolveMenuService, deps: [{ token: ESOLVE_CONNECT_CONFIG }, { token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1972
|
-
EsolveMenuService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EsolveMenuService, providedIn: 'root' });
|
|
1973
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EsolveMenuService, decorators: [{
|
|
1974
|
-
type: Injectable,
|
|
1975
|
-
args: [{
|
|
1976
|
-
providedIn: 'root',
|
|
1977
|
-
}]
|
|
1978
|
-
}], ctorParameters: function () {
|
|
1979
|
-
return [{ type: undefined, decorators: [{
|
|
1980
|
-
type: Inject,
|
|
1981
|
-
args: [ESOLVE_CONNECT_CONFIG]
|
|
1982
|
-
}] }, { type: i1$2.HttpClient }];
|
|
1983
|
-
} });
|
|
1984
|
-
|
|
1985
|
-
class EsolveTopicService {
|
|
1986
|
-
constructor(config, http) {
|
|
1987
|
-
this.config = config;
|
|
1988
|
-
this.http = http;
|
|
1989
|
-
}
|
|
1990
|
-
/**
|
|
1991
|
-
* Retrieves active topics from the list of topic ID's. Note that inactive or expired
|
|
1992
|
-
* topics will not be retrieved.
|
|
1993
|
-
*
|
|
1994
|
-
* @param topic_id_list List of topic ID's that need to be retrieved
|
|
1995
|
-
*/
|
|
1996
|
-
getTopics(topic_id_list = []) {
|
|
1997
|
-
let params = new HttpParams();
|
|
1998
|
-
if (topic_id_list.length > 0) {
|
|
1999
|
-
params = params.append('topic_id', topic_id_list.join(','));
|
|
2000
|
-
}
|
|
2001
|
-
return this.http.get(`${this.config.api_url}/get-topics.php`, { params }).pipe(map(response => {
|
|
2002
|
-
if (response.records === undefined) {
|
|
2003
|
-
throw response;
|
|
2004
|
-
}
|
|
2005
|
-
return this.processTopics(response.records);
|
|
2006
|
-
}));
|
|
2007
|
-
}
|
|
2008
|
-
processTopics(records) {
|
|
2009
|
-
const topics = [];
|
|
2010
|
-
if (records) {
|
|
2011
|
-
for (const record of records) {
|
|
2012
|
-
const topic = new EsolveTopic(+record.id, record.name, record.short_description, +record.sort_priority);
|
|
2013
|
-
topics.push(topic);
|
|
2014
|
-
}
|
|
2015
|
-
}
|
|
2016
|
-
return topics;
|
|
2017
|
-
}
|
|
2018
|
-
}
|
|
2019
|
-
EsolveTopicService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EsolveTopicService, deps: [{ token: ESOLVE_CONNECT_CONFIG }, { token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2020
|
-
EsolveTopicService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EsolveTopicService, providedIn: 'root' });
|
|
2021
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EsolveTopicService, decorators: [{
|
|
2022
|
-
type: Injectable,
|
|
2023
|
-
args: [{
|
|
2024
|
-
providedIn: 'root'
|
|
2025
|
-
}]
|
|
2026
|
-
}], ctorParameters: function () {
|
|
2027
|
-
return [{ type: undefined, decorators: [{
|
|
2028
|
-
type: Inject,
|
|
2029
|
-
args: [ESOLVE_CONNECT_CONFIG]
|
|
2030
|
-
}] }, { type: i1$2.HttpClient }];
|
|
2031
|
-
} });
|
|
2032
|
-
|
|
2033
|
-
class EsolveStockBadge {
|
|
2034
|
-
constructor(id, text, identifier, font_colour, badge_colour, sort_priority) {
|
|
2035
|
-
this.id = id;
|
|
2036
|
-
this.text = text;
|
|
2108
|
+
this.text = text;
|
|
2037
2109
|
this.identifier = identifier;
|
|
2038
2110
|
this.font_colour = font_colour;
|
|
2039
2111
|
this.badge_colour = badge_colour;
|
|
@@ -2049,26 +2121,26 @@ class EsolveStockPrice {
|
|
|
2049
2121
|
* Create stock price instance
|
|
2050
2122
|
* @param base_price Price without tax
|
|
2051
2123
|
* @param base_price_with_tax Price with tax
|
|
2052
|
-
* @param sell_price Price without tax and with discounts applied if
|
|
2053
|
-
* @param sell_price_with_tax Price with tax and with discounts applied if
|
|
2124
|
+
* @param sell_price Price without tax and with discounts applied if applicable
|
|
2125
|
+
* @param sell_price_with_tax Price with tax and with discounts applied if applicable
|
|
2054
2126
|
*/
|
|
2055
2127
|
constructor(
|
|
2056
2128
|
/**
|
|
2057
2129
|
* Price without tax
|
|
2058
2130
|
*/
|
|
2059
|
-
base_price,
|
|
2131
|
+
base_price = 0,
|
|
2060
2132
|
/**
|
|
2061
2133
|
* Price with tax
|
|
2062
2134
|
*/
|
|
2063
|
-
base_price_with_tax,
|
|
2135
|
+
base_price_with_tax = 0,
|
|
2064
2136
|
/**
|
|
2065
|
-
* Price without tax and with discounts applied if
|
|
2137
|
+
* Price without tax and with discounts applied if applicable
|
|
2066
2138
|
*/
|
|
2067
|
-
sell_price,
|
|
2139
|
+
sell_price = 0,
|
|
2068
2140
|
/**
|
|
2069
|
-
* Price with tax and with discounts applied if
|
|
2141
|
+
* Price with tax and with discounts applied if applicable
|
|
2070
2142
|
*/
|
|
2071
|
-
sell_price_with_tax) {
|
|
2143
|
+
sell_price_with_tax = 0) {
|
|
2072
2144
|
this.base_price = base_price;
|
|
2073
2145
|
this.base_price_with_tax = base_price_with_tax;
|
|
2074
2146
|
this.sell_price = sell_price;
|
|
@@ -2084,139 +2156,186 @@ class EsolveStockPrice {
|
|
|
2084
2156
|
}
|
|
2085
2157
|
}
|
|
2086
2158
|
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2159
|
+
class EsolveStockItemBase {
|
|
2160
|
+
constructor(record = {}) {
|
|
2161
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
2162
|
+
/**
|
|
2163
|
+
* eSolve Generated ID
|
|
2164
|
+
*/
|
|
2165
|
+
this.id = 0;
|
|
2166
|
+
/**
|
|
2167
|
+
* Code identifying the stock item
|
|
2168
|
+
*/
|
|
2169
|
+
this.code = '';
|
|
2170
|
+
/**
|
|
2171
|
+
* Name of the stock item
|
|
2172
|
+
*/
|
|
2173
|
+
this.name = '';
|
|
2174
|
+
/**
|
|
2175
|
+
* Search engine friendly name
|
|
2176
|
+
*/
|
|
2177
|
+
this.sef_name = '';
|
|
2178
|
+
/**
|
|
2179
|
+
* Short description of stock item
|
|
2180
|
+
*/
|
|
2181
|
+
this.description = '';
|
|
2182
|
+
/**
|
|
2183
|
+
* Full description of stock item
|
|
2184
|
+
*/
|
|
2185
|
+
this.extended_description = '';
|
|
2186
|
+
/**
|
|
2187
|
+
* Active state
|
|
2188
|
+
*/
|
|
2189
|
+
this.active = false;
|
|
2190
|
+
/**
|
|
2191
|
+
* Featured state
|
|
2192
|
+
*/
|
|
2193
|
+
this.featured = false;
|
|
2194
|
+
/**
|
|
2195
|
+
* ID of default category linked to the stock item
|
|
2196
|
+
*/
|
|
2197
|
+
this.category_id = '';
|
|
2198
|
+
/**
|
|
2199
|
+
* ID of default subcategory linked to the stock item
|
|
2200
|
+
*/
|
|
2201
|
+
this.subcategory_id = 0;
|
|
2202
|
+
this.manufacturers_id = 0;
|
|
2203
|
+
this.ranges_id = 0;
|
|
2204
|
+
/**
|
|
2205
|
+
* Linked tags
|
|
2206
|
+
*/
|
|
2207
|
+
this.tags = [];
|
|
2208
|
+
/**
|
|
2209
|
+
* Linked topics
|
|
2210
|
+
*/
|
|
2211
|
+
this.topics = [];
|
|
2212
|
+
/**
|
|
2213
|
+
* Stock badges
|
|
2214
|
+
*/
|
|
2215
|
+
this.badges = [];
|
|
2216
|
+
/**
|
|
2217
|
+
* Image filename
|
|
2218
|
+
*/
|
|
2219
|
+
this.image_name = '';
|
|
2220
|
+
let seo_title = '';
|
|
2221
|
+
let seo_keywords = '';
|
|
2222
|
+
let base_price = 0;
|
|
2223
|
+
let base_price_with_tax = 0;
|
|
2224
|
+
let sell_price = 0;
|
|
2225
|
+
let sell_price_with_tax = 0;
|
|
2226
|
+
if (record) {
|
|
2227
|
+
this.id = +((_a = record.id) !== null && _a !== void 0 ? _a : 0);
|
|
2228
|
+
this.code = (_b = record.code) !== null && _b !== void 0 ? _b : '';
|
|
2229
|
+
this.name = (_c = record.name) !== null && _c !== void 0 ? _c : '';
|
|
2230
|
+
this.sef_name = (_d = record.sef_name) !== null && _d !== void 0 ? _d : '';
|
|
2231
|
+
this.description = (_e = record.description) !== null && _e !== void 0 ? _e : '';
|
|
2232
|
+
this.extended_description = (_f = record.extended_description) !== null && _f !== void 0 ? _f : '';
|
|
2233
|
+
this.image_name = (_g = record.image_name) !== null && _g !== void 0 ? _g : '';
|
|
2234
|
+
this.category_id = (_h = record.category_id) !== null && _h !== void 0 ? _h : '';
|
|
2235
|
+
this.subcategory_id = +((_j = record.subcategory_id) !== null && _j !== void 0 ? _j : 0);
|
|
2236
|
+
this.manufacturers_id = +((_k = record.manufacturers_id) !== null && _k !== void 0 ? _k : 0);
|
|
2237
|
+
this.ranges_id = +((_l = record.ranges_id) !== null && _l !== void 0 ? _l : 0);
|
|
2238
|
+
this.active = !!+((_m = record.is_active) !== null && _m !== void 0 ? _m : false);
|
|
2239
|
+
this.featured = !!+((_o = record.is_featured) !== null && _o !== void 0 ? _o : false);
|
|
2240
|
+
base_price = +((_p = record.regular_sellprice) !== null && _p !== void 0 ? _p : 0);
|
|
2241
|
+
base_price_with_tax = +((_q = record.regular_sellprice_inclusive) !== null && _q !== void 0 ? _q : 0);
|
|
2242
|
+
sell_price = +((_r = record.sellprice) !== null && _r !== void 0 ? _r : 0);
|
|
2243
|
+
sell_price_with_tax = +((_s = record.sellprice_inclusive) !== null && _s !== void 0 ? _s : 0);
|
|
2244
|
+
if ((record.tags) && (record.tags.length > 0)) {
|
|
2245
|
+
for (const tag of record.tags) {
|
|
2246
|
+
this.tags.push(new EsolveTag(+tag.id, tag.tag_phrase, +tag.tag_weight, tag.description));
|
|
2247
|
+
}
|
|
2248
|
+
}
|
|
2249
|
+
if ((record.topics) && (record.topics.length > 0)) {
|
|
2250
|
+
for (const topic of record.topics) {
|
|
2251
|
+
this.topics.push(new EsolveTopic(+topic.id, topic.name, topic.short_description, +topic.sort_priority));
|
|
2252
|
+
}
|
|
2253
|
+
}
|
|
2254
|
+
if ((record.badges) && (record.badges.length > 0)) {
|
|
2255
|
+
for (const badge of record.badges) {
|
|
2256
|
+
this.badges.push(new EsolveStockBadge(+badge.id, badge.text, badge.identifier, badge.font_colour, badge.badge_colour, +badge.sort_priority));
|
|
2257
|
+
}
|
|
2258
|
+
}
|
|
2259
|
+
if (record.custom_fields) {
|
|
2260
|
+
this.custom_fields = record.custom_fields;
|
|
2261
|
+
}
|
|
2262
|
+
seo_title = (_t = record.seo_page_title) !== null && _t !== void 0 ? _t : '';
|
|
2263
|
+
seo_keywords = (_u = record.seo_keywords) !== null && _u !== void 0 ? _u : '';
|
|
2264
|
+
}
|
|
2265
|
+
this.price = new EsolveStockPrice(base_price, base_price_with_tax, sell_price, sell_price_with_tax);
|
|
2186
2266
|
if (seo_title.trim() === '') {
|
|
2187
2267
|
seo_title = this.name;
|
|
2188
2268
|
}
|
|
2189
|
-
this.seo_details = new
|
|
2269
|
+
this.seo_details = new EsolveSeoInfo(seo_title, this.description, seo_keywords);
|
|
2190
2270
|
}
|
|
2191
2271
|
/**
|
|
2192
2272
|
* Path to tiny stock image
|
|
2193
2273
|
*/
|
|
2194
2274
|
get tiny_image_src() {
|
|
2195
|
-
return
|
|
2275
|
+
return this.generateImagePath('tiny');
|
|
2196
2276
|
}
|
|
2197
2277
|
/**
|
|
2198
2278
|
* Path to thumbnail stock image
|
|
2199
2279
|
*/
|
|
2200
2280
|
get thumbnail_image_src() {
|
|
2201
|
-
return
|
|
2281
|
+
return this.generateImagePath('thumb');
|
|
2202
2282
|
}
|
|
2203
2283
|
/**
|
|
2204
2284
|
* Path to small stock image
|
|
2205
2285
|
*/
|
|
2206
2286
|
get small_image_src() {
|
|
2207
|
-
return
|
|
2287
|
+
return this.generateImagePath('small');
|
|
2208
2288
|
}
|
|
2209
2289
|
/**
|
|
2210
2290
|
* Path to big stock image
|
|
2211
2291
|
*/
|
|
2212
2292
|
get big_image_src() {
|
|
2213
|
-
return
|
|
2293
|
+
return this.generateImagePath('big');
|
|
2214
2294
|
}
|
|
2215
2295
|
/**
|
|
2216
2296
|
* Path to original stock image
|
|
2217
2297
|
*/
|
|
2218
2298
|
get original_image_src() {
|
|
2219
|
-
return
|
|
2299
|
+
return this.generateImagePath('original');
|
|
2300
|
+
}
|
|
2301
|
+
generateImagePath(image_size) {
|
|
2302
|
+
if (this.image_name !== '') {
|
|
2303
|
+
return `/images/stock/${image_size}/${this.image_name}`;
|
|
2304
|
+
}
|
|
2305
|
+
return '';
|
|
2306
|
+
}
|
|
2307
|
+
}
|
|
2308
|
+
|
|
2309
|
+
class EsolveStockGroupItem extends EsolveStockItemBase {
|
|
2310
|
+
constructor(record) {
|
|
2311
|
+
super(record);
|
|
2312
|
+
}
|
|
2313
|
+
}
|
|
2314
|
+
|
|
2315
|
+
class EsolveStockGroup {
|
|
2316
|
+
constructor(group, records = []) {
|
|
2317
|
+
this.group = group;
|
|
2318
|
+
this.items = [];
|
|
2319
|
+
if (records.length > 0) {
|
|
2320
|
+
for (const record of records) {
|
|
2321
|
+
this.items.push(new EsolveStockGroupItem(record));
|
|
2322
|
+
}
|
|
2323
|
+
}
|
|
2324
|
+
}
|
|
2325
|
+
}
|
|
2326
|
+
|
|
2327
|
+
/**
|
|
2328
|
+
* Stock Item object. It can be a service or a product (physical and/or digital).
|
|
2329
|
+
*/
|
|
2330
|
+
class EsolveStockItem extends EsolveStockItemBase {
|
|
2331
|
+
/**
|
|
2332
|
+
* Constructs an instance of EsolveStockItem
|
|
2333
|
+
*/
|
|
2334
|
+
constructor(record) {
|
|
2335
|
+
super(record);
|
|
2336
|
+
if ((record === null || record === void 0 ? void 0 : record.group) && record.grouped_items) {
|
|
2337
|
+
this.group = new EsolveStockGroup(record.group, record.grouped_items);
|
|
2338
|
+
}
|
|
2220
2339
|
}
|
|
2221
2340
|
}
|
|
2222
2341
|
|
|
@@ -2231,6 +2350,24 @@ class EsolveStockItemList {
|
|
|
2231
2350
|
}
|
|
2232
2351
|
}
|
|
2233
2352
|
|
|
2353
|
+
class EsolveRecipeStockItem extends EsolveStockItemBase {
|
|
2354
|
+
constructor(record) {
|
|
2355
|
+
var _a;
|
|
2356
|
+
super(record);
|
|
2357
|
+
this.qty = 0;
|
|
2358
|
+
this.qty = +((_a = record === null || record === void 0 ? void 0 : record.qty) !== null && _a !== void 0 ? _a : 0);
|
|
2359
|
+
}
|
|
2360
|
+
}
|
|
2361
|
+
|
|
2362
|
+
class EsolveLinkedStockItem extends EsolveStockItemBase {
|
|
2363
|
+
constructor(record) {
|
|
2364
|
+
var _a;
|
|
2365
|
+
super(record);
|
|
2366
|
+
this.qty = 0;
|
|
2367
|
+
this.qty = +((_a = record === null || record === void 0 ? void 0 : record.qty) !== null && _a !== void 0 ? _a : 0);
|
|
2368
|
+
}
|
|
2369
|
+
}
|
|
2370
|
+
|
|
2234
2371
|
class EsolveStockService {
|
|
2235
2372
|
constructor(config, http) {
|
|
2236
2373
|
this.config = config;
|
|
@@ -2238,6 +2375,7 @@ class EsolveStockService {
|
|
|
2238
2375
|
}
|
|
2239
2376
|
/**
|
|
2240
2377
|
* Retrieves the stock record from the eSolve instance using the code.
|
|
2378
|
+
*
|
|
2241
2379
|
* @param code eSolve stock code
|
|
2242
2380
|
*/
|
|
2243
2381
|
getStockItem(code) {
|
|
@@ -2256,6 +2394,7 @@ class EsolveStockService {
|
|
|
2256
2394
|
}
|
|
2257
2395
|
/**
|
|
2258
2396
|
* Retrieves the stock record from the eSolve instance using the SEF name.
|
|
2397
|
+
*
|
|
2259
2398
|
* @param sef_name SEF name of the stock item
|
|
2260
2399
|
*/
|
|
2261
2400
|
getStockItemFromSEF(sef_name) {
|
|
@@ -2274,6 +2413,7 @@ class EsolveStockService {
|
|
|
2274
2413
|
}
|
|
2275
2414
|
/**
|
|
2276
2415
|
* Retrieves list of stock from the eSolve instance using info provided
|
|
2416
|
+
*
|
|
2277
2417
|
* @param options Stock filter options
|
|
2278
2418
|
*/
|
|
2279
2419
|
getStockItems(options) {
|
|
@@ -2317,44 +2457,84 @@ class EsolveStockService {
|
|
|
2317
2457
|
if (options.topic_id_list.length > 0) {
|
|
2318
2458
|
params = params.set('topic_id', options.topic_id_list.join(','));
|
|
2319
2459
|
}
|
|
2320
|
-
}
|
|
2321
|
-
return this.getStockRecords(params).pipe(map(response => {
|
|
2322
|
-
var _a;
|
|
2460
|
+
}
|
|
2461
|
+
return this.getStockRecords(params).pipe(map(response => {
|
|
2462
|
+
var _a;
|
|
2463
|
+
if ((response.records === undefined) || (response.records.length <= 0)) {
|
|
2464
|
+
throw response;
|
|
2465
|
+
}
|
|
2466
|
+
const stockItems = [];
|
|
2467
|
+
response.records.forEach(stockRecord => {
|
|
2468
|
+
stockItems.push(this.processStockItem(stockRecord));
|
|
2469
|
+
});
|
|
2470
|
+
return new EsolveStockItemList(stockItems, +response.additional_data.total_records, (_a = options.page) !== null && _a !== void 0 ? _a : 0);
|
|
2471
|
+
}));
|
|
2472
|
+
}
|
|
2473
|
+
/**
|
|
2474
|
+
* Retrieve list of stock items linked to a stock item from the eSolve API
|
|
2475
|
+
*
|
|
2476
|
+
* @param code Stock item code
|
|
2477
|
+
*/
|
|
2478
|
+
getLinkedItems(code) {
|
|
2479
|
+
return this.http
|
|
2480
|
+
.get(`${this.config.api_url}/get-linked-items.php`, { params: { code } })
|
|
2481
|
+
.pipe(map((response) => {
|
|
2482
|
+
if ((response.records === undefined) || (response.records.length <= 0)) {
|
|
2483
|
+
throw response;
|
|
2484
|
+
}
|
|
2485
|
+
return this.processLinkedItems(response.records);
|
|
2486
|
+
}));
|
|
2487
|
+
}
|
|
2488
|
+
/**
|
|
2489
|
+
* Retrieve list of stock items on a recipe from the eSolve API
|
|
2490
|
+
*
|
|
2491
|
+
* @param code Stock item code
|
|
2492
|
+
*/
|
|
2493
|
+
getRecipeItems(code) {
|
|
2494
|
+
return this.http
|
|
2495
|
+
.get(`${this.config.api_url}/get-recipe-items.php`, { params: { code } })
|
|
2496
|
+
.pipe(map((response) => {
|
|
2323
2497
|
if ((response.records === undefined) || (response.records.length <= 0)) {
|
|
2324
2498
|
throw response;
|
|
2325
2499
|
}
|
|
2326
|
-
|
|
2327
|
-
response.records.forEach(stockRecord => {
|
|
2328
|
-
stockItems.push(this.processStockItem(stockRecord));
|
|
2329
|
-
});
|
|
2330
|
-
return new EsolveStockItemList(stockItems, +response.additional_data.total_records, (_a = options.page) !== null && _a !== void 0 ? _a : 0);
|
|
2500
|
+
return this.processRecipeItems(response.records);
|
|
2331
2501
|
}));
|
|
2332
2502
|
}
|
|
2333
2503
|
/**
|
|
2334
|
-
* Processes the eSolve stock item record and converts it to
|
|
2504
|
+
* Processes the eSolve stock item record and converts it to an object.
|
|
2505
|
+
*
|
|
2335
2506
|
* @param record eSolve stock item record
|
|
2336
2507
|
*/
|
|
2337
2508
|
processStockItem(record) {
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2509
|
+
return new EsolveStockItem(record);
|
|
2510
|
+
}
|
|
2511
|
+
/**
|
|
2512
|
+
* Processes the linked eSolve stock item records and converts them to objects.
|
|
2513
|
+
*
|
|
2514
|
+
* @param records Linked eSolve stock item records
|
|
2515
|
+
*/
|
|
2516
|
+
processLinkedItems(records) {
|
|
2517
|
+
const items = [];
|
|
2518
|
+
if (records.length > 0) {
|
|
2519
|
+
for (const record of records) {
|
|
2520
|
+
items.push(new EsolveLinkedStockItem(record));
|
|
2349
2521
|
}
|
|
2350
2522
|
}
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2523
|
+
return items;
|
|
2524
|
+
}
|
|
2525
|
+
/**
|
|
2526
|
+
* Processes the recipe eSolve stock item records and converts them to objects.
|
|
2527
|
+
*
|
|
2528
|
+
* @param records Recipe eSolve stock item records
|
|
2529
|
+
*/
|
|
2530
|
+
processRecipeItems(records) {
|
|
2531
|
+
const items = [];
|
|
2532
|
+
if (records.length > 0) {
|
|
2533
|
+
for (const record of records) {
|
|
2534
|
+
items.push(new EsolveRecipeStockItem(record));
|
|
2354
2535
|
}
|
|
2355
2536
|
}
|
|
2356
|
-
|
|
2357
|
-
return new EsolveStockItem(+record.id, record.code, record.name, record.sef_name, record.description, record.extended_description, !!+record.is_active, !!+record.is_featured, record.image_name, price, tags, topics, badges, record.category_id, +record.subcategory_id, +record.manufacturers_id, +record.ranges_id, record.seo_page_title, record.seo_keywords);
|
|
2537
|
+
return items;
|
|
2358
2538
|
}
|
|
2359
2539
|
/**
|
|
2360
2540
|
* Retrieves stock records from HTTP params.
|
|
@@ -2390,8 +2570,8 @@ class EsolveCategoryTreeItem {
|
|
|
2390
2570
|
this.active = active;
|
|
2391
2571
|
this.display_only = display_only;
|
|
2392
2572
|
this.image_name = image_name;
|
|
2393
|
-
this.image_path = '';
|
|
2394
2573
|
this.id = '';
|
|
2574
|
+
this.image_path = '';
|
|
2395
2575
|
if (this.type === 'category') {
|
|
2396
2576
|
this.id = `<<CAT>>${this.esolve_id}`;
|
|
2397
2577
|
if (children != null) {
|
|
@@ -2406,13 +2586,7 @@ class EsolveCategoryTreeItem {
|
|
|
2406
2586
|
if (seo_title.trim() === '') {
|
|
2407
2587
|
seo_title = this.description;
|
|
2408
2588
|
}
|
|
2409
|
-
this.seo_details = new
|
|
2410
|
-
}
|
|
2411
|
-
generateImagePath(image_size) {
|
|
2412
|
-
if (this.image_name !== '') {
|
|
2413
|
-
return `${this.image_path}${image_size}/${this.image_name}`;
|
|
2414
|
-
}
|
|
2415
|
-
return '';
|
|
2589
|
+
this.seo_details = new EsolveSeoInfo(seo_title, seo_description, seo_keywords);
|
|
2416
2590
|
}
|
|
2417
2591
|
get small_image_src() {
|
|
2418
2592
|
return this.generateImagePath('small');
|
|
@@ -2423,6 +2597,12 @@ class EsolveCategoryTreeItem {
|
|
|
2423
2597
|
get tiny_image_src() {
|
|
2424
2598
|
return this.generateImagePath('tiny');
|
|
2425
2599
|
}
|
|
2600
|
+
generateImagePath(image_size) {
|
|
2601
|
+
if (this.image_name !== '') {
|
|
2602
|
+
return `${this.image_path}${image_size}/${this.image_name}`;
|
|
2603
|
+
}
|
|
2604
|
+
return '';
|
|
2605
|
+
}
|
|
2426
2606
|
}
|
|
2427
2607
|
|
|
2428
2608
|
class EsolveCategoryTreeService {
|
|
@@ -2568,7 +2748,7 @@ class EsolveManufacturer {
|
|
|
2568
2748
|
if (seo_title.trim() === '') {
|
|
2569
2749
|
seo_title = this.title;
|
|
2570
2750
|
}
|
|
2571
|
-
this.seo_details = new
|
|
2751
|
+
this.seo_details = new EsolveSeoInfo(seo_title, seo_description, seo_keywords);
|
|
2572
2752
|
}
|
|
2573
2753
|
get small_image_src() {
|
|
2574
2754
|
return this.generateImagePath('small');
|
|
@@ -2654,124 +2834,82 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
2654
2834
|
}] }, { type: i1$2.HttpClient }];
|
|
2655
2835
|
} });
|
|
2656
2836
|
|
|
2657
|
-
class
|
|
2658
|
-
constructor(
|
|
2659
|
-
this.id =
|
|
2660
|
-
this.
|
|
2661
|
-
this.
|
|
2662
|
-
this.
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
this.
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
this.thumb.push(new EsolveSpecialImage(image_record));
|
|
2673
|
-
}
|
|
2674
|
-
}
|
|
2675
|
-
if (images.banner && images.banner.length > 0) {
|
|
2676
|
-
this.banner = [];
|
|
2677
|
-
for (const image_record of images.banner) {
|
|
2678
|
-
this.banner.push(new EsolveSpecialImage(image_record));
|
|
2679
|
-
}
|
|
2837
|
+
class EsolveRange {
|
|
2838
|
+
constructor(id, range, sef_range, manufacturers_id, title, article, is_active, featured, sort_priority, image_name, seo_title = '', seo_keywords = '', seo_description = '') {
|
|
2839
|
+
this.id = id;
|
|
2840
|
+
this.range = range;
|
|
2841
|
+
this.sef_range = sef_range;
|
|
2842
|
+
this.manufacturers_id = manufacturers_id;
|
|
2843
|
+
this.title = title;
|
|
2844
|
+
this.article = article;
|
|
2845
|
+
this.is_active = is_active;
|
|
2846
|
+
this.featured = featured;
|
|
2847
|
+
this.sort_priority = sort_priority;
|
|
2848
|
+
this.image_name = image_name;
|
|
2849
|
+
this.image_path = '/images/ranges/';
|
|
2850
|
+
if (this.title.trim() === '') {
|
|
2851
|
+
this.title = this.range;
|
|
2680
2852
|
}
|
|
2681
|
-
if (
|
|
2682
|
-
|
|
2683
|
-
for (const image_record of images.banner_mobile) {
|
|
2684
|
-
this.banner_mobile.push(new EsolveSpecialImage(image_record));
|
|
2685
|
-
}
|
|
2853
|
+
if (seo_title.trim() === '') {
|
|
2854
|
+
seo_title = this.title;
|
|
2686
2855
|
}
|
|
2856
|
+
this.seo_details = new EsolveSeoInfo(seo_title, seo_description, seo_keywords);
|
|
2687
2857
|
}
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
this.
|
|
2693
|
-
|
|
2694
|
-
this.sort_priority = +record.sort_priority;
|
|
2695
|
-
this.name = record.name;
|
|
2696
|
-
this.description = record.description;
|
|
2697
|
-
this.discount_type = +record.discount_type;
|
|
2698
|
-
this.special_type = record.special_type;
|
|
2699
|
-
this.location_id = +record.location_id;
|
|
2700
|
-
this.active = !!+record.active;
|
|
2701
|
-
this.featured = !!+record.featured;
|
|
2702
|
-
this.assets = [];
|
|
2703
|
-
if (record.assets.length > 0) {
|
|
2704
|
-
for (const asset_record of record.assets) {
|
|
2705
|
-
this.assets.push(new EsolveLinkedAsset(asset_record));
|
|
2706
|
-
}
|
|
2707
|
-
}
|
|
2708
|
-
if (record.images &&
|
|
2709
|
-
((record.images.thumb &&
|
|
2710
|
-
record.images.thumb.length > 0) ||
|
|
2711
|
-
(record.images.banner &&
|
|
2712
|
-
record.images.banner.length > 0) ||
|
|
2713
|
-
(record.images.banner_mobile &&
|
|
2714
|
-
record.images.banner_mobile.length > 0)) &&
|
|
2715
|
-
record.image_container.trim() !== '') {
|
|
2716
|
-
this.images = new EsolveSpecialImageCollection(record.image_container, record.images);
|
|
2717
|
-
}
|
|
2718
|
-
if (record.seo_page_title.trim() === '') {
|
|
2719
|
-
record.seo_page_title = this.name;
|
|
2858
|
+
get image_src() {
|
|
2859
|
+
return this.generateImagePath();
|
|
2860
|
+
}
|
|
2861
|
+
generateImagePath() {
|
|
2862
|
+
if (this.image_name !== '') {
|
|
2863
|
+
return `${this.image_path}${this.image_name}`;
|
|
2720
2864
|
}
|
|
2721
|
-
|
|
2865
|
+
return '';
|
|
2722
2866
|
}
|
|
2723
2867
|
}
|
|
2724
2868
|
|
|
2725
|
-
class
|
|
2869
|
+
class EsolveRangesService {
|
|
2726
2870
|
constructor(config, http) {
|
|
2727
2871
|
this.config = config;
|
|
2728
2872
|
this.http = http;
|
|
2729
2873
|
}
|
|
2730
|
-
|
|
2874
|
+
getRange(id) {
|
|
2731
2875
|
const params = new HttpParams({
|
|
2732
|
-
fromObject: {
|
|
2876
|
+
fromObject: { ranges_id: id }
|
|
2733
2877
|
});
|
|
2734
|
-
return this.
|
|
2878
|
+
return this.getRangeSingle(params);
|
|
2735
2879
|
}
|
|
2736
|
-
|
|
2880
|
+
getRangeFromSEF(sef_range) {
|
|
2737
2881
|
const params = new HttpParams({
|
|
2738
|
-
fromObject: {
|
|
2882
|
+
fromObject: { sef_range }
|
|
2739
2883
|
});
|
|
2740
|
-
return this.
|
|
2884
|
+
return this.getRangeSingle(params);
|
|
2741
2885
|
}
|
|
2742
|
-
|
|
2886
|
+
getRanges(options) {
|
|
2743
2887
|
let params = new HttpParams();
|
|
2744
2888
|
if (options === null || options === void 0 ? void 0 : options.featured_only) {
|
|
2745
2889
|
params = params.set('featured_only', options.featured_only);
|
|
2746
2890
|
}
|
|
2747
|
-
if (options === null || options === void 0 ? void 0 : options.
|
|
2748
|
-
params = params.set('
|
|
2749
|
-
}
|
|
2750
|
-
if (options === null || options === void 0 ? void 0 : options.location_id) {
|
|
2751
|
-
params = params.set('location_id', options.location_id);
|
|
2752
|
-
}
|
|
2753
|
-
if (options === null || options === void 0 ? void 0 : options.special_type) {
|
|
2754
|
-
params = params.set('special_type', options.special_type);
|
|
2891
|
+
if (options === null || options === void 0 ? void 0 : options.manufacturers_id) {
|
|
2892
|
+
params = params.set('manufacturers_id', options.manufacturers_id);
|
|
2755
2893
|
}
|
|
2756
|
-
return this.
|
|
2757
|
-
const
|
|
2894
|
+
return this.getRangeRecords(params).pipe(map((records) => {
|
|
2895
|
+
const ranges = [];
|
|
2758
2896
|
for (const record of records) {
|
|
2759
|
-
|
|
2897
|
+
ranges.push(this.processRange(record));
|
|
2760
2898
|
}
|
|
2761
|
-
return
|
|
2899
|
+
return ranges;
|
|
2762
2900
|
}), catchError(() => {
|
|
2763
2901
|
return of([]);
|
|
2764
2902
|
}));
|
|
2765
2903
|
}
|
|
2766
|
-
|
|
2767
|
-
return this.
|
|
2904
|
+
getRangeSingle(params) {
|
|
2905
|
+
return this.getRangeRecords(params).pipe(map((records) => {
|
|
2768
2906
|
const record = records[0];
|
|
2769
|
-
return this.
|
|
2907
|
+
return this.processRange(record);
|
|
2770
2908
|
}));
|
|
2771
2909
|
}
|
|
2772
|
-
|
|
2910
|
+
getRangeRecords(params) {
|
|
2773
2911
|
return this.http
|
|
2774
|
-
.get(`${this.config.api_url}/get-
|
|
2912
|
+
.get(`${this.config.api_url}/get-ranges.php`, { params })
|
|
2775
2913
|
.pipe(map((response) => {
|
|
2776
2914
|
if ((response.records === undefined) ||
|
|
2777
2915
|
(response.records.length <= 0)) {
|
|
@@ -2780,16 +2918,16 @@ class EsolveSpecialsService {
|
|
|
2780
2918
|
return response.records;
|
|
2781
2919
|
}));
|
|
2782
2920
|
}
|
|
2783
|
-
|
|
2784
|
-
return new
|
|
2921
|
+
processRange(record) {
|
|
2922
|
+
return new EsolveRange(+record.id, record.range, record.sef_range, record.manufacturers_id, record.title, record.article, !!+record.is_active, !!+record.featured, +record.sort_priority, record.image_name, record.seo_page_title, record.seo_keywords, record.seo_description);
|
|
2785
2923
|
}
|
|
2786
2924
|
}
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type:
|
|
2925
|
+
EsolveRangesService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EsolveRangesService, deps: [{ token: ESOLVE_CONNECT_CONFIG }, { token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2926
|
+
EsolveRangesService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EsolveRangesService, providedIn: 'root' });
|
|
2927
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EsolveRangesService, decorators: [{
|
|
2790
2928
|
type: Injectable,
|
|
2791
2929
|
args: [{
|
|
2792
|
-
providedIn: 'root'
|
|
2930
|
+
providedIn: 'root',
|
|
2793
2931
|
}]
|
|
2794
2932
|
}], ctorParameters: function () {
|
|
2795
2933
|
return [{ type: undefined, decorators: [{
|
|
@@ -2798,82 +2936,124 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
2798
2936
|
}] }, { type: i1$2.HttpClient }];
|
|
2799
2937
|
} });
|
|
2800
2938
|
|
|
2801
|
-
class
|
|
2802
|
-
constructor(
|
|
2803
|
-
this.id = id;
|
|
2804
|
-
this.
|
|
2805
|
-
this.
|
|
2806
|
-
this.
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
this.
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2939
|
+
class EsolveSpecialImage {
|
|
2940
|
+
constructor(record) {
|
|
2941
|
+
this.id = +record.id;
|
|
2942
|
+
this.width = +record.width;
|
|
2943
|
+
this.height = +record.height;
|
|
2944
|
+
this.src = record.src;
|
|
2945
|
+
}
|
|
2946
|
+
}
|
|
2947
|
+
|
|
2948
|
+
class EsolveSpecialImageCollection {
|
|
2949
|
+
constructor(image_container, images) {
|
|
2950
|
+
this.image_container = image_container;
|
|
2951
|
+
if (images.thumb && images.thumb.length > 0) {
|
|
2952
|
+
this.thumb = [];
|
|
2953
|
+
for (const image_record of images.thumb) {
|
|
2954
|
+
this.thumb.push(new EsolveSpecialImage(image_record));
|
|
2955
|
+
}
|
|
2816
2956
|
}
|
|
2817
|
-
if (
|
|
2818
|
-
|
|
2957
|
+
if (images.banner && images.banner.length > 0) {
|
|
2958
|
+
this.banner = [];
|
|
2959
|
+
for (const image_record of images.banner) {
|
|
2960
|
+
this.banner.push(new EsolveSpecialImage(image_record));
|
|
2961
|
+
}
|
|
2962
|
+
}
|
|
2963
|
+
if (images.banner_mobile && images.banner_mobile.length > 0) {
|
|
2964
|
+
this.banner_mobile = [];
|
|
2965
|
+
for (const image_record of images.banner_mobile) {
|
|
2966
|
+
this.banner_mobile.push(new EsolveSpecialImage(image_record));
|
|
2967
|
+
}
|
|
2968
|
+
}
|
|
2969
|
+
}
|
|
2970
|
+
}
|
|
2971
|
+
|
|
2972
|
+
class EsolveSpecial {
|
|
2973
|
+
constructor(record) {
|
|
2974
|
+
this.id = +record.id;
|
|
2975
|
+
this.identifier = record.identifier;
|
|
2976
|
+
this.sort_priority = +record.sort_priority;
|
|
2977
|
+
this.name = record.name;
|
|
2978
|
+
this.description = record.description;
|
|
2979
|
+
this.discount_type = +record.discount_type;
|
|
2980
|
+
this.special_type = record.special_type;
|
|
2981
|
+
this.location_id = +record.location_id;
|
|
2982
|
+
this.active = !!+record.active;
|
|
2983
|
+
this.featured = !!+record.featured;
|
|
2984
|
+
this.assets = [];
|
|
2985
|
+
if (record.assets.length > 0) {
|
|
2986
|
+
for (const asset_record of record.assets) {
|
|
2987
|
+
this.assets.push(new EsolveLinkedAsset(asset_record));
|
|
2988
|
+
}
|
|
2819
2989
|
}
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2990
|
+
if (record.images &&
|
|
2991
|
+
((record.images.thumb &&
|
|
2992
|
+
record.images.thumb.length > 0) ||
|
|
2993
|
+
(record.images.banner &&
|
|
2994
|
+
record.images.banner.length > 0) ||
|
|
2995
|
+
(record.images.banner_mobile &&
|
|
2996
|
+
record.images.banner_mobile.length > 0)) &&
|
|
2997
|
+
record.image_container.trim() !== '') {
|
|
2998
|
+
this.images = new EsolveSpecialImageCollection(record.image_container, record.images);
|
|
2828
2999
|
}
|
|
2829
|
-
|
|
3000
|
+
if (record.seo_page_title.trim() === '') {
|
|
3001
|
+
record.seo_page_title = this.name;
|
|
3002
|
+
}
|
|
3003
|
+
this.seo_details = new EsolveSeoInfo(record.seo_page_title, record.seo_description, record.seo_keywords);
|
|
2830
3004
|
}
|
|
2831
3005
|
}
|
|
2832
3006
|
|
|
2833
|
-
class
|
|
3007
|
+
class EsolveSpecialsService {
|
|
2834
3008
|
constructor(config, http) {
|
|
2835
3009
|
this.config = config;
|
|
2836
3010
|
this.http = http;
|
|
2837
3011
|
}
|
|
2838
|
-
|
|
3012
|
+
getSpecial(specials_id) {
|
|
2839
3013
|
const params = new HttpParams({
|
|
2840
|
-
fromObject: {
|
|
3014
|
+
fromObject: { specials_id }
|
|
2841
3015
|
});
|
|
2842
|
-
return this.
|
|
3016
|
+
return this.getSpecialSingle(params);
|
|
2843
3017
|
}
|
|
2844
|
-
|
|
3018
|
+
getSpecialFromIdentifier(identifier) {
|
|
2845
3019
|
const params = new HttpParams({
|
|
2846
|
-
fromObject: {
|
|
3020
|
+
fromObject: { identifier }
|
|
2847
3021
|
});
|
|
2848
|
-
return this.
|
|
3022
|
+
return this.getSpecialSingle(params);
|
|
2849
3023
|
}
|
|
2850
|
-
|
|
3024
|
+
getSpecials(options) {
|
|
2851
3025
|
let params = new HttpParams();
|
|
2852
3026
|
if (options === null || options === void 0 ? void 0 : options.featured_only) {
|
|
2853
3027
|
params = params.set('featured_only', options.featured_only);
|
|
2854
3028
|
}
|
|
2855
|
-
if (options === null || options === void 0 ? void 0 : options.
|
|
2856
|
-
params = params.set('
|
|
3029
|
+
if (options === null || options === void 0 ? void 0 : options.image_container) {
|
|
3030
|
+
params = params.set('image_container', options.image_container);
|
|
2857
3031
|
}
|
|
2858
|
-
|
|
2859
|
-
|
|
3032
|
+
if (options === null || options === void 0 ? void 0 : options.location_id) {
|
|
3033
|
+
params = params.set('location_id', options.location_id);
|
|
3034
|
+
}
|
|
3035
|
+
if (options === null || options === void 0 ? void 0 : options.special_type) {
|
|
3036
|
+
params = params.set('special_type', options.special_type);
|
|
3037
|
+
}
|
|
3038
|
+
return this.getSpecialRecords(params).pipe(map((records) => {
|
|
3039
|
+
const specials = [];
|
|
2860
3040
|
for (const record of records) {
|
|
2861
|
-
|
|
3041
|
+
specials.push(this.processSpecial(record));
|
|
2862
3042
|
}
|
|
2863
|
-
return
|
|
3043
|
+
return specials;
|
|
2864
3044
|
}), catchError(() => {
|
|
2865
3045
|
return of([]);
|
|
2866
3046
|
}));
|
|
2867
3047
|
}
|
|
2868
|
-
|
|
2869
|
-
return this.
|
|
3048
|
+
getSpecialSingle(params) {
|
|
3049
|
+
return this.getSpecialRecords(params).pipe(map((records) => {
|
|
2870
3050
|
const record = records[0];
|
|
2871
|
-
return this.
|
|
3051
|
+
return this.processSpecial(record);
|
|
2872
3052
|
}));
|
|
2873
3053
|
}
|
|
2874
|
-
|
|
3054
|
+
getSpecialRecords(params) {
|
|
2875
3055
|
return this.http
|
|
2876
|
-
.get(`${this.config.api_url}/get-
|
|
3056
|
+
.get(`${this.config.api_url}/get-specials.php`, { params })
|
|
2877
3057
|
.pipe(map((response) => {
|
|
2878
3058
|
if ((response.records === undefined) ||
|
|
2879
3059
|
(response.records.length <= 0)) {
|
|
@@ -2882,13 +3062,13 @@ class EsolveRangesService {
|
|
|
2882
3062
|
return response.records;
|
|
2883
3063
|
}));
|
|
2884
3064
|
}
|
|
2885
|
-
|
|
2886
|
-
return new
|
|
3065
|
+
processSpecial(record) {
|
|
3066
|
+
return new EsolveSpecial(record);
|
|
2887
3067
|
}
|
|
2888
3068
|
}
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type:
|
|
3069
|
+
EsolveSpecialsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EsolveSpecialsService, deps: [{ token: ESOLVE_CONNECT_CONFIG }, { token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3070
|
+
EsolveSpecialsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EsolveSpecialsService, providedIn: 'root' });
|
|
3071
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EsolveSpecialsService, decorators: [{
|
|
2892
3072
|
type: Injectable,
|
|
2893
3073
|
args: [{
|
|
2894
3074
|
providedIn: 'root'
|
|
@@ -2932,6 +3112,55 @@ class EsolveCartItem {
|
|
|
2932
3112
|
}
|
|
2933
3113
|
}
|
|
2934
3114
|
|
|
3115
|
+
class EsolveCartStockItem {
|
|
3116
|
+
constructor(code, name, sef_name, description, active, items_in_pack, delivery_category, image_name) {
|
|
3117
|
+
this.code = code;
|
|
3118
|
+
this.name = name;
|
|
3119
|
+
this.sef_name = sef_name;
|
|
3120
|
+
this.description = description;
|
|
3121
|
+
this.active = active;
|
|
3122
|
+
this.items_in_pack = items_in_pack;
|
|
3123
|
+
this.delivery_category = delivery_category;
|
|
3124
|
+
this.image_name = image_name;
|
|
3125
|
+
}
|
|
3126
|
+
/**
|
|
3127
|
+
* Path to tiny stock image
|
|
3128
|
+
*/
|
|
3129
|
+
get tiny_image_src() {
|
|
3130
|
+
return this.generateImagePath('tiny');
|
|
3131
|
+
}
|
|
3132
|
+
/**
|
|
3133
|
+
* Path to thumbnail stock image
|
|
3134
|
+
*/
|
|
3135
|
+
get thumbnail_image_src() {
|
|
3136
|
+
return this.generateImagePath('thumb');
|
|
3137
|
+
}
|
|
3138
|
+
/**
|
|
3139
|
+
* Path to small stock image
|
|
3140
|
+
*/
|
|
3141
|
+
get small_image_src() {
|
|
3142
|
+
return this.generateImagePath('small');
|
|
3143
|
+
}
|
|
3144
|
+
/**
|
|
3145
|
+
* Path to big stock image
|
|
3146
|
+
*/
|
|
3147
|
+
get big_image_src() {
|
|
3148
|
+
return this.generateImagePath('big');
|
|
3149
|
+
}
|
|
3150
|
+
/**
|
|
3151
|
+
* Path to original stock image
|
|
3152
|
+
*/
|
|
3153
|
+
get original_image_src() {
|
|
3154
|
+
return this.generateImagePath('original');
|
|
3155
|
+
}
|
|
3156
|
+
generateImagePath(image_size) {
|
|
3157
|
+
if (this.image_name !== '') {
|
|
3158
|
+
return `/images/stock/${image_size}/${this.image_name}`;
|
|
3159
|
+
}
|
|
3160
|
+
return '';
|
|
3161
|
+
}
|
|
3162
|
+
}
|
|
3163
|
+
|
|
2935
3164
|
/**
|
|
2936
3165
|
* Totals in cart
|
|
2937
3166
|
*/
|
|
@@ -2971,49 +3200,6 @@ class EsolveCartTotals {
|
|
|
2971
3200
|
}
|
|
2972
3201
|
}
|
|
2973
3202
|
|
|
2974
|
-
class EsolveCartStockItem {
|
|
2975
|
-
constructor(code, name, sef_name, description, active, items_in_pack, delivery_category, image_name) {
|
|
2976
|
-
this.code = code;
|
|
2977
|
-
this.name = name;
|
|
2978
|
-
this.sef_name = sef_name;
|
|
2979
|
-
this.description = description;
|
|
2980
|
-
this.active = active;
|
|
2981
|
-
this.items_in_pack = items_in_pack;
|
|
2982
|
-
this.delivery_category = delivery_category;
|
|
2983
|
-
this.image_name = image_name;
|
|
2984
|
-
}
|
|
2985
|
-
/**
|
|
2986
|
-
* Path to tiny stock image
|
|
2987
|
-
*/
|
|
2988
|
-
get tiny_image_src() {
|
|
2989
|
-
return '/images/' + (this.image_name ? 'stock/tiny/' + this.image_name : 'no_image.jpg');
|
|
2990
|
-
}
|
|
2991
|
-
/**
|
|
2992
|
-
* Path to thumbnail stock image
|
|
2993
|
-
*/
|
|
2994
|
-
get thumbnail_image_src() {
|
|
2995
|
-
return '/images/' + (this.image_name ? 'stock/thumb/' + this.image_name : 'no_image.jpg');
|
|
2996
|
-
}
|
|
2997
|
-
/**
|
|
2998
|
-
* Path to small stock image
|
|
2999
|
-
*/
|
|
3000
|
-
get small_image_src() {
|
|
3001
|
-
return '/images/' + (this.image_name ? 'stock/small/' + this.image_name : 'no_image.jpg');
|
|
3002
|
-
}
|
|
3003
|
-
/**
|
|
3004
|
-
* Path to big stock image
|
|
3005
|
-
*/
|
|
3006
|
-
get big_image_src() {
|
|
3007
|
-
return '/images/' + (this.image_name ? 'stock/big/' + this.image_name : 'no_image.jpg');
|
|
3008
|
-
}
|
|
3009
|
-
/**
|
|
3010
|
-
* Path to original stock image
|
|
3011
|
-
*/
|
|
3012
|
-
get original_image_src() {
|
|
3013
|
-
return 'images/' + (this.image_name ? 'stock/original/' + this.image_name : 'no_image.jpg');
|
|
3014
|
-
}
|
|
3015
|
-
}
|
|
3016
|
-
|
|
3017
3203
|
class EsolveCartService {
|
|
3018
3204
|
constructor(config, http, errorHandler, responseHandler) {
|
|
3019
3205
|
this.config = config;
|
|
@@ -3178,6 +3364,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
3178
3364
|
}] }, { type: i1$2.HttpClient }, { type: EsolveErrorHandlerService }, { type: EsolveResponseHandlerService }];
|
|
3179
3365
|
} });
|
|
3180
3366
|
|
|
3367
|
+
class EsolveBankingDetails {
|
|
3368
|
+
constructor(bank_name, account_holder, account, account_type, swift_number, branch_code) {
|
|
3369
|
+
this.bank_name = bank_name;
|
|
3370
|
+
this.account_holder = account_holder;
|
|
3371
|
+
this.account = account;
|
|
3372
|
+
this.account_type = account_type;
|
|
3373
|
+
this.swift_number = swift_number;
|
|
3374
|
+
this.branch_code = branch_code;
|
|
3375
|
+
}
|
|
3376
|
+
}
|
|
3377
|
+
|
|
3181
3378
|
class EsolveVaultItemResult extends EsolveResponseResult {
|
|
3182
3379
|
constructor(response) {
|
|
3183
3380
|
super(response);
|
|
@@ -3271,16 +3468,6 @@ class EsolvePaymentMethod {
|
|
|
3271
3468
|
this.image_url = record.image_url;
|
|
3272
3469
|
this.banking_details = new EsolveBankingDetails(record.bank_name, record.account_holder, record.account, record.account_type, record.swift_number, record.branch_code);
|
|
3273
3470
|
}
|
|
3274
|
-
}
|
|
3275
|
-
class EsolveBankingDetails {
|
|
3276
|
-
constructor(bank_name, account_holder, account, account_type, swift_number, branch_code) {
|
|
3277
|
-
this.bank_name = bank_name;
|
|
3278
|
-
this.account_holder = account_holder;
|
|
3279
|
-
this.account = account;
|
|
3280
|
-
this.account_type = account_type;
|
|
3281
|
-
this.swift_number = swift_number;
|
|
3282
|
-
this.branch_code = branch_code;
|
|
3283
|
-
}
|
|
3284
3471
|
}
|
|
3285
3472
|
|
|
3286
3473
|
class EsolvePaymentService {
|
|
@@ -3337,8 +3524,8 @@ class EsolvePaymentService {
|
|
|
3337
3524
|
card_number: card_data.card_number,
|
|
3338
3525
|
card_name: card_data.name,
|
|
3339
3526
|
card_cvv: card_data.cvv,
|
|
3340
|
-
card_expiry: this.generateExpiry(card_data)
|
|
3341
|
-
}
|
|
3527
|
+
card_expiry: this.generateExpiry(card_data),
|
|
3528
|
+
},
|
|
3342
3529
|
};
|
|
3343
3530
|
return this.http
|
|
3344
3531
|
.post(`${this.config.api_url}/set-vault.php`, body, {
|
|
@@ -3384,7 +3571,7 @@ class EsolvePaymentService {
|
|
|
3384
3571
|
payment: {
|
|
3385
3572
|
cart_id: transaction_id,
|
|
3386
3573
|
payment_methods_id
|
|
3387
|
-
}
|
|
3574
|
+
},
|
|
3388
3575
|
};
|
|
3389
3576
|
if (typeof card === 'number') {
|
|
3390
3577
|
body.payment.user_vault_id = card;
|
|
@@ -3394,7 +3581,7 @@ class EsolvePaymentService {
|
|
|
3394
3581
|
card_number: card.card_number,
|
|
3395
3582
|
card_name: card.name,
|
|
3396
3583
|
card_cvv: card.cvv,
|
|
3397
|
-
card_expiry: this.generateExpiry(card)
|
|
3584
|
+
card_expiry: this.generateExpiry(card),
|
|
3398
3585
|
};
|
|
3399
3586
|
}
|
|
3400
3587
|
return this.http
|
|
@@ -3492,6 +3679,14 @@ class EsolveShippingMethod {
|
|
|
3492
3679
|
}
|
|
3493
3680
|
}
|
|
3494
3681
|
|
|
3682
|
+
class EsolveShippingTotals {
|
|
3683
|
+
constructor(total, vat, savings) {
|
|
3684
|
+
this.total = total;
|
|
3685
|
+
this.vat = vat;
|
|
3686
|
+
this.savings = savings;
|
|
3687
|
+
}
|
|
3688
|
+
}
|
|
3689
|
+
|
|
3495
3690
|
class EsolveShippingCost {
|
|
3496
3691
|
constructor(
|
|
3497
3692
|
// Shipping
|
|
@@ -3501,13 +3696,6 @@ class EsolveShippingCost {
|
|
|
3501
3696
|
this.shipping = new EsolveShippingTotals(shipping_total, shipping_vat, shipping_total_savings);
|
|
3502
3697
|
this.insurance = new EsolveShippingTotals(insurance_total, insurance_vat, insurance_total_savings);
|
|
3503
3698
|
}
|
|
3504
|
-
}
|
|
3505
|
-
class EsolveShippingTotals {
|
|
3506
|
-
constructor(total, vat, savings) {
|
|
3507
|
-
this.total = total;
|
|
3508
|
-
this.vat = vat;
|
|
3509
|
-
this.savings = savings;
|
|
3510
|
-
}
|
|
3511
3699
|
}
|
|
3512
3700
|
|
|
3513
3701
|
class EsolveShippingService {
|
|
@@ -3517,6 +3705,9 @@ class EsolveShippingService {
|
|
|
3517
3705
|
}
|
|
3518
3706
|
/**
|
|
3519
3707
|
* Retrieves a list of shipping methods
|
|
3708
|
+
*
|
|
3709
|
+
* @param options Filter options
|
|
3710
|
+
*
|
|
3520
3711
|
* @returns An `Observable` with an array of shipping methods
|
|
3521
3712
|
*/
|
|
3522
3713
|
getShippingMethods(options) {
|
|
@@ -3538,7 +3729,11 @@ class EsolveShippingService {
|
|
|
3538
3729
|
}
|
|
3539
3730
|
/**
|
|
3540
3731
|
* Retrieves the shipping costs
|
|
3541
|
-
*
|
|
3732
|
+
*
|
|
3733
|
+
* @param shipping_id
|
|
3734
|
+
* @param addresses_id
|
|
3735
|
+
* @param location_id
|
|
3736
|
+
*
|
|
3542
3737
|
* @returns An `Observable` with the shipping costs
|
|
3543
3738
|
*/
|
|
3544
3739
|
getShippingCost(shipping_id, addresses_id, location_id) {
|
|
@@ -3574,7 +3769,9 @@ class EsolveShippingService {
|
|
|
3574
3769
|
}
|
|
3575
3770
|
/**
|
|
3576
3771
|
* Processes the eSolve shipping method records.
|
|
3772
|
+
*
|
|
3577
3773
|
* @param records Records to process
|
|
3774
|
+
*
|
|
3578
3775
|
* @returns An array of processed shipping methods
|
|
3579
3776
|
*/
|
|
3580
3777
|
processShippingMethods(records) {
|
|
@@ -3588,8 +3785,10 @@ class EsolveShippingService {
|
|
|
3588
3785
|
return shipping_methods;
|
|
3589
3786
|
}
|
|
3590
3787
|
/**
|
|
3591
|
-
* Processes the eSolve shipping costs record
|
|
3788
|
+
* Processes the eSolve shipping costs record.+
|
|
3789
|
+
*
|
|
3592
3790
|
* @param record Data to process
|
|
3791
|
+
*
|
|
3593
3792
|
* @returns Processed shipping costs
|
|
3594
3793
|
*/
|
|
3595
3794
|
processShippingCost(record) {
|
|
@@ -3611,56 +3810,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
3611
3810
|
}] }, { type: i1$2.HttpClient }];
|
|
3612
3811
|
} });
|
|
3613
3812
|
|
|
3614
|
-
class EsolveLocationsService {
|
|
3615
|
-
constructor(config, http) {
|
|
3616
|
-
this.config = config;
|
|
3617
|
-
this.http = http;
|
|
3618
|
-
}
|
|
3619
|
-
/**
|
|
3620
|
-
* Retrieves a list of stock locations
|
|
3621
|
-
*
|
|
3622
|
-
* @returns An `Observable` with an array of stock locations
|
|
3623
|
-
*/
|
|
3624
|
-
getStockLocations() {
|
|
3625
|
-
return this.http
|
|
3626
|
-
.get(`${this.config.api_url}/get-locations.php`)
|
|
3627
|
-
.pipe(map((response) => {
|
|
3628
|
-
if (response.records === undefined) {
|
|
3629
|
-
throw response;
|
|
3630
|
-
}
|
|
3631
|
-
return this.processStockLocations(response.records);
|
|
3632
|
-
}));
|
|
3633
|
-
}
|
|
3634
|
-
/**
|
|
3635
|
-
* Processes the eSolve stock location records.
|
|
3636
|
-
*
|
|
3637
|
-
* @param records Records to process
|
|
3638
|
-
* @returns An array of processed stock location records
|
|
3639
|
-
*/
|
|
3640
|
-
processStockLocations(records) {
|
|
3641
|
-
const stock_locations = [];
|
|
3642
|
-
if (records) {
|
|
3643
|
-
for (const record of records) {
|
|
3644
|
-
stock_locations.push(new EsolveStockLocation(record));
|
|
3645
|
-
}
|
|
3646
|
-
}
|
|
3647
|
-
return stock_locations;
|
|
3648
|
-
}
|
|
3649
|
-
}
|
|
3650
|
-
EsolveLocationsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EsolveLocationsService, deps: [{ token: ESOLVE_CONNECT_CONFIG }, { token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3651
|
-
EsolveLocationsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EsolveLocationsService, providedIn: 'root' });
|
|
3652
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: EsolveLocationsService, decorators: [{
|
|
3653
|
-
type: Injectable,
|
|
3654
|
-
args: [{
|
|
3655
|
-
providedIn: 'root',
|
|
3656
|
-
}]
|
|
3657
|
-
}], ctorParameters: function () {
|
|
3658
|
-
return [{ type: undefined, decorators: [{
|
|
3659
|
-
type: Inject,
|
|
3660
|
-
args: [ESOLVE_CONNECT_CONFIG]
|
|
3661
|
-
}] }, { type: i1$2.HttpClient }];
|
|
3662
|
-
} });
|
|
3663
|
-
|
|
3664
3813
|
/*
|
|
3665
3814
|
* Public API Surface of ng-esolve-connect
|
|
3666
3815
|
*/
|
|
@@ -3669,5 +3818,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
3669
3818
|
* Generated bundle index. Do not edit.
|
|
3670
3819
|
*/
|
|
3671
3820
|
|
|
3672
|
-
export { EsolveAccountService, EsolveAddress, EsolveAddressResult, EsolveAuthService, EsolveBankingDetails, EsolveBanner, EsolveBannerImage, EsolveBannerImageHotspot, EsolveBannerService, EsolveCartItem, EsolveCartService, EsolveCartTotals, EsolveCategoryTreeItem, EsolveCategoryTreeService, EsolveChangePasswordResult, EsolveCheckoutResult, EsolveCookieService, EsolveErrorHandlerService, EsolveGeocodeAddressResult, EsolveGeocodeCoordsResult, EsolveGeocodeResult, EsolveGeocoderService, EsolveHeading, EsolveHttpError, EsolveLinkedAsset, EsolveList, EsolveLocationsService, EsolveManufacturer, EsolveManufacturersService, EsolveMediaArticle, EsolveMediaService, EsolveMenuItem, EsolveMenuService, EsolveNewsArticle, EsolveNewsArticleAuthor, EsolveNewsArticleList, EsolveNewsGroup, EsolveNewsService, EsolvePaymentMethod, EsolvePaymentResult, EsolvePaymentService, EsolveRange, EsolveRangesService, EsolveRegistrationResult, EsolveResetPasswordResult, EsolveResponseHandlerService, EsolveResponseResult, EsolveResult,
|
|
3821
|
+
export { EsolveAccountService, EsolveAddress, EsolveAddressResult, EsolveAuthService, EsolveBankingDetails, EsolveBanner, EsolveBannerImage, EsolveBannerImageHotspot, EsolveBannerService, EsolveCartItem, EsolveCartService, EsolveCartStockItem, EsolveCartTotals, EsolveCategoryTreeItem, EsolveCategoryTreeService, EsolveChangePasswordResult, EsolveCheckoutResult, EsolveCookieService, EsolveErrorHandlerService, EsolveGeocodeAddressResult, EsolveGeocodeCoordsResult, EsolveGeocodeResult, EsolveGeocoderService, EsolveHeading, EsolveHttpError, EsolveLinkedAsset, EsolveLinkedStockItem, EsolveList, EsolveLocation, EsolveLocationAddress, EsolveLocationContactInfo, EsolveLocationPOBoxAddress, EsolveLocationTradingDay, EsolveLocationTradingTimes, EsolveLocationsService, EsolveManufacturer, EsolveManufacturersService, EsolveMediaArticle, EsolveMediaService, EsolveMenuItem, EsolveMenuService, EsolveNewsArticle, EsolveNewsArticleAuthor, EsolveNewsArticleList, EsolveNewsGroup, EsolveNewsService, EsolvePaymentMethod, EsolvePaymentResult, EsolvePaymentService, EsolveRange, EsolveRangesService, EsolveRecipeStockItem, EsolveRegistrationResult, EsolveResetPasswordResult, EsolveResponseHandlerService, EsolveResponseResult, EsolveResult, EsolveSeoInfo, EsolveSeoService, EsolveSession, EsolveSessionService, EsolveShippingCost, EsolveShippingMethod, EsolveShippingService, EsolveShippingTotals, EsolveSpecial, EsolveSpecialImage, EsolveSpecialImageCollection, EsolveSpecialsService, EsolveStockBadge, EsolveStockGroup, EsolveStockGroupItem, EsolveStockItem, EsolveStockItemBase, EsolveStockItemList, EsolveStockPrice, EsolveStockService, EsolveTag, EsolveTopic, EsolveTopicService, EsolveTransaction, EsolveTransactionAddress, EsolveTransactionClient, EsolveTransactionItem, EsolveTransactionItemPrice, EsolveTransactionList, EsolveTransactionLocation, EsolveTransactionPaymentMethod, EsolveTransactionShippingMethod, EsolveTransactionUser, EsolveUserAccount, EsolveUserAccountBusiness, EsolveUserAccountContact, EsolveUserAccountResult, EsolveVaultItem, EsolveVaultItemResult, NgEsolveConnectModule };
|
|
3673
3822
|
//# sourceMappingURL=esolve-ng-esolve-connect.mjs.map
|