@ikas/storefront 5.0.0-beta.16 → 5.0.0-beta.18
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/build/analytics/analytics.d.ts +32 -37
- package/build/analytics/analytics.js +1 -1
- package/build/analytics/events.js +1 -1
- package/build/analytics/facebookPixel.d.ts +11 -15
- package/build/analytics/facebookPixel.js +1 -1
- package/build/analytics/googleAnalytics.d.ts +10 -13
- package/build/analytics/googleAnalytics.js +1 -1
- package/build/analytics/googleTagManager.d.ts +188 -191
- package/build/analytics/googleTagManager.js +1 -1
- package/build/analytics/googleUniversal.d.ts +5 -8
- package/build/analytics/googleUniversal.js +1 -1
- package/build/analytics/head/index.js +1 -1
- package/build/analytics/ikas.d.ts +33 -40
- package/build/analytics/ikas.js +1 -1
- package/build/analytics/index.d.ts +1 -1
- package/build/analytics/tiktokPixel.d.ts +9 -12
- package/build/analytics/tiktokPixel.js +1 -1
- package/build/components/checkout/components/address-form/index.js +1 -1
- package/build/components/checkout/components/address-form/model.d.ts +6 -6
- package/build/components/checkout/components/address-form/model.js +1 -1
- package/build/components/checkout/components/cart-summary/cart-item/index.js +1 -1
- package/build/components/checkout/components/cart-summary/index.js +1 -1
- package/build/components/checkout/components/customer-addresses/index.js +1 -1
- package/build/components/checkout/components/customer-addresses/model.d.ts +4 -1
- package/build/components/checkout/components/customer-addresses/model.js +1 -1
- package/build/components/checkout/components/delivery-methods/index.js +1 -1
- package/build/components/checkout/components/epaykolay-button/index.d.ts +5 -0
- package/build/components/checkout/components/epaykolay-button/index.js +1 -0
- package/build/components/checkout/components/epaykolay-button/style.module.scss.js +1 -0
- package/build/components/checkout/components/error/customer-login-required-error/index.js +1 -1
- package/build/components/checkout/components/error/index.js +1 -1
- package/build/components/checkout/components/error/no-shipping-error/index.js +1 -1
- package/build/components/checkout/components/error/payment-error/index.d.ts +1 -1
- package/build/components/checkout/components/error/payment-error/index.js +1 -1
- package/build/components/checkout/components/error/stock-error/index.d.ts +2 -1
- package/build/components/checkout/components/error/stock-error/index.js +1 -1
- package/build/components/checkout/components/error/unknown-error/index.d.ts +1 -1
- package/build/components/checkout/components/error/unknown-error/index.js +1 -1
- package/build/components/checkout/components/expandable-section/index.js +1 -1
- package/build/components/checkout/components/form-item/index.js +1 -1
- package/build/components/checkout/components/klarna/index.js +1 -1
- package/build/components/checkout/components/master-pass/credit-card-form/index.js +1 -1
- package/build/components/checkout/components/master-pass/link-card-to-client/index.js +1 -1
- package/build/components/checkout/components/master-pass/modal-otp/index.js +1 -1
- package/build/components/checkout/components/offer-product/index.d.ts +2 -1
- package/build/components/checkout/components/offer-product/index.js +1 -1
- package/build/components/checkout/components/paypal/index.d.ts +7 -0
- package/build/components/checkout/components/paypal/index.js +1 -0
- package/build/components/checkout/components/paypal/style.module.scss.js +1 -0
- package/build/components/checkout/components/quick-registration/completed.js +1 -1
- package/build/components/checkout/components/quick-registration/index.js +1 -1
- package/build/components/checkout/components/quick-registration/model.js +1 -1
- package/build/components/checkout/components/svg/epaykolay.d.ts +6 -0
- package/build/components/checkout/components/svg/epaykolay.js +1 -0
- package/build/components/checkout/index.d.ts +1 -1
- package/build/components/checkout/index.js +1 -1
- package/build/components/checkout/model.d.ts +22 -44
- package/build/components/checkout/model.js +1 -1
- package/build/components/checkout/modelMasterPass.d.ts +13 -23
- package/build/components/checkout/modelMasterPass.js +1 -1
- package/build/components/checkout/steps/step-info/index.js +1 -1
- package/build/components/checkout/steps/step-payment/billing-address/index.js +1 -1
- package/build/components/checkout/steps/step-payment/index.js +1 -1
- package/build/components/checkout/steps/step-payment/payment-gateways/index.js +1 -1
- package/build/components/checkout/steps/step-payment/payment-gateways/installments/index.js +1 -1
- package/build/components/checkout/steps/step-payment/style.module.scss.js +1 -1
- package/build/components/checkout/steps/step-shipping/index.js +1 -1
- package/build/components/checkout/steps/step-success/index.js +1 -1
- package/build/components/checkout/style.module.scss.js +1 -1
- package/build/components/checkout/types.d.ts +29 -0
- package/build/components/checkout/types.js +1 -0
- package/build/components/google-captcha/index.js +1 -1
- package/build/components/image/index.d.ts +1 -1
- package/build/components/image/index.js +1 -1
- package/build/components/link/index.js +1 -1
- package/build/components/page/ThemeComponent.js +1 -1
- package/build/components/page/functions.d.ts +3 -0
- package/build/components/page/functions.js +1 -0
- package/build/components/page/head.d.ts +1 -1
- package/build/components/page/head.js +1 -1
- package/build/components/page/index.d.ts +4 -3
- package/build/components/page/index.js +1 -1
- package/build/components/page-editor/ThemeComponentEditor.js +1 -1
- package/build/components/page-editor/index.js +1 -1
- package/build/components/page-editor/model.d.ts +5 -1
- package/build/components/page-editor/model.js +1 -1
- package/build/ext/@ikas/fe-api-client/build/utils/api.js +1 -1
- package/build/hooks/index.d.ts +0 -1
- package/build/hooks/useCustomerReviews.d.ts +3 -4
- package/build/hooks/useCustomerReviews.js +1 -1
- package/build/index.d.ts +2 -0
- package/build/index.js +1 -1
- package/build/model-helpers/index.d.ts +5 -0
- package/build/model-helpers/order/line-item/option/value/functions.d.ts +3 -0
- package/build/model-helpers/order/line-item/option/value/functions.js +1 -0
- package/build/model-helpers/product/attribute-value/functions.d.ts +2 -0
- package/build/model-helpers/product/attribute-value/functions.js +1 -0
- package/build/model-helpers/product/functions.d.ts +10 -0
- package/build/model-helpers/product/functions.js +1 -0
- package/build/model-helpers/product/option-set/option/functions.d.ts +2 -0
- package/build/model-helpers/product/option-set/option/functions.js +1 -0
- package/build/model-helpers/product/variant/functions.d.ts +2 -0
- package/build/model-helpers/product/variant/functions.js +1 -0
- package/build/models/data/checkout/index.d.ts +4 -21
- package/build/models/data/index.d.ts +7 -138
- package/build/models/data/localized-customer-address/functions.d.ts +65 -0
- package/build/models/data/localized-customer-address/functions.js +1 -0
- package/build/models/data/localized-customer-address/index.d.ts +6 -0
- package/build/models/data/localized-order-address/functions.d.ts +63 -0
- package/build/models/data/localized-order-address/functions.js +1 -0
- package/build/models/data/localized-order-address/index.d.ts +6 -0
- package/build/models/data/review-form/index.d.ts +6 -0
- package/build/models/data/theme-json/component/index.d.ts +1 -0
- package/build/models/data/theme-json/component/index.js +1 -1
- package/build/models/data/theme-json/custom-data/index.d.ts +1 -2
- package/build/models/data/theme-json/custom-data/index.js +1 -1
- package/build/models/data/theme-json/settings/color/index.js +1 -1
- package/build/models/index.d.ts +1 -0
- package/build/models/ui/blog-category-list/functions.d.ts +6 -0
- package/build/models/ui/blog-category-list/functions.js +1 -0
- package/build/models/ui/blog-category-list/index.d.ts +8 -42
- package/build/models/ui/blog-category-list/index.js +1 -1
- package/build/models/ui/blog-list/functions.d.ts +6 -0
- package/build/models/ui/blog-list/functions.js +1 -0
- package/build/models/ui/blog-list/index.d.ts +9 -45
- package/build/models/ui/blog-list/index.js +1 -1
- package/build/models/ui/brand-list/functions.d.ts +8 -0
- package/build/models/ui/brand-list/functions.js +1 -0
- package/build/models/ui/brand-list/index.d.ts +9 -48
- package/build/models/ui/brand-list/index.js +1 -1
- package/build/models/ui/category-list/functions.d.ts +8 -0
- package/build/models/ui/category-list/functions.js +1 -0
- package/build/models/ui/category-list/index.d.ts +9 -48
- package/build/models/ui/category-list/index.js +1 -1
- package/build/models/ui/customer-review-list/functions.d.ts +7 -0
- package/build/models/ui/customer-review-list/functions.js +1 -0
- package/build/models/ui/customer-review-list/index.d.ts +8 -40
- package/build/models/ui/customer-review-summary-list/functions.d.ts +7 -0
- package/build/models/ui/customer-review-summary-list/functions.js +1 -0
- package/build/models/ui/customer-review-summary-list/index.d.ts +7 -39
- package/build/models/ui/index.d.ts +17 -10
- package/build/models/ui/list-commons/index.d.ts +13 -0
- package/build/models/ui/list-commons/index.js +1 -0
- package/build/models/ui/navigation-link/index.d.ts +3 -3
- package/build/models/ui/navigation-link/index.js +1 -1
- package/build/models/ui/product-attribute-detail/index.d.ts +1 -1
- package/build/models/ui/product-attribute-detail/index.js +1 -1
- package/build/models/ui/product-attribute-list/index.js +1 -1
- package/build/models/ui/product-list/functions.d.ts +32 -0
- package/build/models/ui/product-list/functions.js +1 -0
- package/build/models/ui/product-list/index.d.ts +18 -110
- package/build/models/ui/product-list/index.js +1 -1
- package/build/models/ui/raffle-list/functions.d.ts +6 -0
- package/build/models/ui/raffle-list/functions.js +1 -0
- package/build/models/ui/raffle-list/index.d.ts +14 -50
- package/build/models/ui/validator/form/account-info.js +1 -1
- package/build/models/ui/validator/form/address.js +1 -1
- package/build/models/ui/validator/form/contact-form.js +1 -1
- package/build/models/ui/validator/form/customer-review.js +1 -1
- package/build/models/ui/validator/form/forgot-password.js +1 -1
- package/build/models/ui/validator/form/ikas-address.d.ts +32 -20
- package/build/models/ui/validator/form/ikas-address.js +1 -1
- package/build/models/ui/validator/form/login.js +1 -1
- package/build/models/ui/validator/form/raffle-form.js +1 -1
- package/build/models/ui/validator/form/recover-password.js +1 -1
- package/build/models/ui/validator/form/register.d.ts +10 -1
- package/build/models/ui/validator/form/register.js +1 -1
- package/build/page-data-init/index.d.ts +7 -18
- package/build/page-data-init/index.js +1 -1
- package/build/pages/account/activate.d.ts +4 -0
- package/build/pages/account/activate.js +1 -0
- package/build/pages/checkout.js +1 -1
- package/build/pages/index.d.ts +1 -0
- package/build/store/analytics/index.d.ts +9 -0
- package/build/store/analytics/index.js +1 -0
- package/build/store/base/functions.d.ts +7 -0
- package/build/store/base/functions.js +1 -0
- package/build/store/{base.d.ts → base/index.d.ts} +7 -17
- package/build/store/base/index.js +1 -0
- package/build/store/base/public.d.ts +1 -0
- package/build/store/base/public.js +1 -0
- package/build/store/cart/functions.d.ts +21 -0
- package/build/store/cart/functions.js +1 -0
- package/build/store/cart/index.d.ts +7 -28
- package/build/store/cart/index.js +1 -1
- package/build/store/cart/public.d.ts +1 -0
- package/build/store/cart/public.js +1 -0
- package/build/store/customer/account-auth/data.d.ts +4 -0
- package/build/store/customer/account-auth/data.js +1 -0
- package/build/store/customer/account-auth/functions.d.ts +24 -0
- package/build/store/customer/account-auth/functions.js +1 -0
- package/build/store/customer/account-auth/public.d.ts +1 -0
- package/build/store/customer/captcha/data.d.ts +3 -0
- package/build/store/customer/captcha/data.js +1 -0
- package/build/store/customer/captcha/functions.d.ts +5 -0
- package/build/store/customer/captcha/functions.js +1 -0
- package/build/store/customer/captcha/public.d.ts +1 -0
- package/build/store/customer/consent/data.d.ts +3 -0
- package/build/store/customer/consent/data.js +1 -0
- package/build/store/customer/consent/functions.d.ts +6 -0
- package/build/store/customer/consent/functions.js +1 -0
- package/build/store/customer/consent/public.d.ts +1 -0
- package/build/store/customer/functions.d.ts +4 -0
- package/build/store/customer/functions.js +1 -0
- package/build/store/customer/index.d.ts +8 -82
- package/build/store/customer/index.js +1 -1
- package/build/store/customer/marketing/data.d.ts +3 -0
- package/build/store/customer/marketing/data.js +1 -0
- package/build/store/customer/marketing/functions.d.ts +5 -0
- package/build/store/customer/marketing/functions.js +1 -0
- package/build/store/customer/marketing/public.d.ts +1 -0
- package/build/store/customer/order/data.d.ts +4 -0
- package/build/store/customer/order/data.js +1 -0
- package/build/store/customer/order/functions.d.ts +11 -0
- package/build/store/customer/order/functions.js +1 -0
- package/build/store/customer/order/public.d.ts +1 -0
- package/build/store/customer/product/data.d.ts +17 -0
- package/build/store/customer/product/data.js +1 -0
- package/build/store/customer/product/functions.d.ts +20 -0
- package/build/store/customer/product/functions.js +1 -0
- package/build/store/customer/product/public.d.ts +1 -0
- package/build/store/customer/public.d.ts +8 -0
- package/build/store/customer/public.js +1 -0
- package/build/store/customer/raffle/functions.d.ts +1 -0
- package/build/store/customer/raffle/functions.js +1 -0
- package/build/store/customer/raffle/public.d.ts +1 -0
- package/build/store/index.d.ts +9 -4
- package/build/utils/constants.js +1 -1
- package/build/utils/helper.d.ts +1 -1
- package/build/utils/helper.js +1 -1
- package/build/utils/index.d.ts +1 -2
- package/package.json +17 -13
- package/build/ext/@builder.io/partytown/integration/index.mjs.js +0 -1
- package/build/ext/@builder.io/partytown/react/index.mjs.js +0 -1
- package/build/hooks/useStore.d.ts +0 -2
- package/build/hooks/useStore.js +0 -1
- package/build/models/data/base/index.d.ts +0 -8
- package/build/models/data/base/index.js +0 -1
- package/build/models/data/blog/category/index.d.ts +0 -12
- package/build/models/data/blog/category/index.js +0 -1
- package/build/models/data/blog/content/index.d.ts +0 -6
- package/build/models/data/blog/content/index.js +0 -1
- package/build/models/data/blog/index.d.ts +0 -27
- package/build/models/data/blog/index.js +0 -1
- package/build/models/data/blog/meta-data/index.d.ts +0 -16
- package/build/models/data/blog/meta-data/index.js +0 -1
- package/build/models/data/blog/tag/index.d.ts +0 -6
- package/build/models/data/blog/tag/index.js +0 -1
- package/build/models/data/blog/writer/index.d.ts +0 -6
- package/build/models/data/blog/writer/index.js +0 -1
- package/build/models/data/brand/index.d.ts +0 -26
- package/build/models/data/brand/index.js +0 -1
- package/build/models/data/brand/translation/index.d.ts +0 -7
- package/build/models/data/brand/translation/index.js +0 -1
- package/build/models/data/campaign-offer/index.d.ts +0 -21
- package/build/models/data/campaign-offer/index.js +0 -1
- package/build/models/data/campaign-offer/product/index.d.ts +0 -25
- package/build/models/data/campaign-offer/product/index.js +0 -1
- package/build/models/data/cart/available-shipping-method/index.d.ts +0 -10
- package/build/models/data/cart/available-shipping-method/index.js +0 -1
- package/build/models/data/cart/campaign-offer/index.d.ts +0 -16
- package/build/models/data/cart/campaign-offer/index.js +0 -1
- package/build/models/data/cart/index.d.ts +0 -14
- package/build/models/data/cart/index.js +0 -1
- package/build/models/data/category/index.d.ts +0 -22
- package/build/models/data/category/index.js +0 -1
- package/build/models/data/category/path-item/index.d.ts +0 -14
- package/build/models/data/category/path-item/index.js +0 -1
- package/build/models/data/category/translations/index.d.ts +0 -7
- package/build/models/data/category/translations/index.js +0 -1
- package/build/models/data/checkout/country-settings-model.d.ts +0 -141
- package/build/models/data/checkout/country-settings-model.js +0 -1
- package/build/models/data/checkout/index.js +0 -1
- package/build/models/data/checkout-settings/index.d.ts +0 -21
- package/build/models/data/checkout-settings/index.js +0 -1
- package/build/models/data/checkout-settings/option/index.d.ts +0 -6
- package/build/models/data/checkout-settings/option/index.js +0 -1
- package/build/models/data/checkout-settings/price/index.d.ts +0 -7
- package/build/models/data/checkout-settings/price/index.js +0 -1
- package/build/models/data/city/index.d.ts +0 -12
- package/build/models/data/city/index.js +0 -1
- package/build/models/data/contact-form/index.d.ts +0 -9
- package/build/models/data/contact-form/index.js +0 -1
- package/build/models/data/country/index.d.ts +0 -18
- package/build/models/data/country/index.js +0 -1
- package/build/models/data/country/location-translations/index.d.ts +0 -7
- package/build/models/data/customer/address/city/index.d.ts +0 -7
- package/build/models/data/customer/address/city/index.js +0 -1
- package/build/models/data/customer/address/country/index.d.ts +0 -9
- package/build/models/data/customer/address/country/index.js +0 -1
- package/build/models/data/customer/address/district/index.d.ts +0 -7
- package/build/models/data/customer/address/district/index.js +0 -1
- package/build/models/data/customer/address/ikas-localized-customer-address.d.ts +0 -50
- package/build/models/data/customer/address/ikas-localized-customer-address.js +0 -1
- package/build/models/data/customer/address/index.d.ts +0 -40
- package/build/models/data/customer/address/index.js +0 -1
- package/build/models/data/customer/address/state/index.d.ts +0 -7
- package/build/models/data/customer/address/state/index.js +0 -1
- package/build/models/data/customer/attribute/index.d.ts +0 -18
- package/build/models/data/customer/attribute/index.js +0 -1
- package/build/models/data/customer/attribute/option/index.d.ts +0 -9
- package/build/models/data/customer/attribute/option/index.js +0 -1
- package/build/models/data/customer/attribute/sales-channel/index.d.ts +0 -8
- package/build/models/data/customer/attribute/sales-channel/index.js +0 -1
- package/build/models/data/customer/attribute/translation/index.d.ts +0 -9
- package/build/models/data/customer/attribute/translation/index.js +0 -1
- package/build/models/data/customer/attribute/translation/option/index.d.ts +0 -6
- package/build/models/data/customer/attribute/translation/option/index.js +0 -1
- package/build/models/data/customer/attribute/value/index.d.ts +0 -11
- package/build/models/data/customer/attribute/value/index.js +0 -1
- package/build/models/data/customer/index.d.ts +0 -38
- package/build/models/data/customer/index.js +0 -1
- package/build/models/data/customer/review/index.d.ts +0 -24
- package/build/models/data/customer/review/index.js +0 -1
- package/build/models/data/customer/review/settings/index.d.ts +0 -6
- package/build/models/data/customer/review/settings/index.js +0 -1
- package/build/models/data/customer/review/summary/index.d.ts +0 -10
- package/build/models/data/customer/review/summary/index.js +0 -1
- package/build/models/data/customer/review/summary/star/index.d.ts +0 -6
- package/build/models/data/customer/review/summary/star/index.js +0 -1
- package/build/models/data/district/index.d.ts +0 -12
- package/build/models/data/district/index.js +0 -1
- package/build/models/data/favorite-product/index.d.ts +0 -7
- package/build/models/data/favorite-product/index.js +0 -1
- package/build/models/data/filter-category/index.d.ts +0 -12
- package/build/models/data/filter-category/index.js +0 -1
- package/build/models/data/html-meta-data/index.d.ts +0 -28
- package/build/models/data/html-meta-data/index.js +0 -1
- package/build/models/data/html-meta-data/translations/index.d.ts +0 -7
- package/build/models/data/html-meta-data/translations/index.js +0 -1
- package/build/models/data/image/index.d.ts +0 -10
- package/build/models/data/image/index.js +0 -1
- package/build/models/data/last-viewed-product/index.d.ts +0 -6
- package/build/models/data/last-viewed-product/index.js +0 -1
- package/build/models/data/merchant-settings/index.d.ts +0 -12
- package/build/models/data/merchant-settings/index.js +0 -1
- package/build/models/data/order/address/city/index.d.ts +0 -7
- package/build/models/data/order/address/city/index.js +0 -1
- package/build/models/data/order/address/country/index.d.ts +0 -9
- package/build/models/data/order/address/country/index.js +0 -1
- package/build/models/data/order/address/district/index.d.ts +0 -7
- package/build/models/data/order/address/district/index.js +0 -1
- package/build/models/data/order/address/ikas-localized-order-address.d.ts +0 -32
- package/build/models/data/order/address/ikas-localized-order-address.js +0 -1
- package/build/models/data/order/address/index.d.ts +0 -37
- package/build/models/data/order/address/index.js +0 -1
- package/build/models/data/order/address/state/index.d.ts +0 -7
- package/build/models/data/order/address/state/index.js +0 -1
- package/build/models/data/order/adjustment/applied-order-line/index.d.ts +0 -8
- package/build/models/data/order/adjustment/applied-order-line/index.js +0 -1
- package/build/models/data/order/adjustment/index.d.ts +0 -15
- package/build/models/data/order/adjustment/index.js +0 -1
- package/build/models/data/order/customer/index.d.ts +0 -11
- package/build/models/data/order/customer/index.js +0 -1
- package/build/models/data/order/gift-line/index.d.ts +0 -6
- package/build/models/data/order/gift-line/index.js +0 -1
- package/build/models/data/order/index.d.ts +0 -69
- package/build/models/data/order/index.js +0 -1
- package/build/models/data/order/invoice/index.d.ts +0 -12
- package/build/models/data/order/invoice/index.js +0 -1
- package/build/models/data/order/line-item/base-unit/index.d.ts +0 -9
- package/build/models/data/order/line-item/base-unit/index.js +0 -1
- package/build/models/data/order/line-item/base-unit/unit-type/index.d.ts +0 -6
- package/build/models/data/order/line-item/base-unit/unit-type/index.js +0 -1
- package/build/models/data/order/line-item/discount/index.d.ts +0 -11
- package/build/models/data/order/line-item/discount/index.js +0 -1
- package/build/models/data/order/line-item/index.d.ts +0 -46
- package/build/models/data/order/line-item/index.js +0 -1
- package/build/models/data/order/line-item/option/index.d.ts +0 -10
- package/build/models/data/order/line-item/option/index.js +0 -1
- package/build/models/data/order/line-item/option/value/index.d.ts +0 -9
- package/build/models/data/order/line-item/option/value/index.js +0 -1
- package/build/models/data/order/line-item/variant/brand/index.d.ts +0 -6
- package/build/models/data/order/line-item/variant/brand/index.js +0 -1
- package/build/models/data/order/line-item/variant/category/index.d.ts +0 -12
- package/build/models/data/order/line-item/variant/category/index.js +0 -1
- package/build/models/data/order/line-item/variant/index.d.ts +0 -32
- package/build/models/data/order/line-item/variant/index.js +0 -1
- package/build/models/data/order/line-item/variant/price/index.d.ts +0 -10
- package/build/models/data/order/line-item/variant/price/index.js +0 -1
- package/build/models/data/order/line-item/variant/tag/index.d.ts +0 -6
- package/build/models/data/order/line-item/variant/tag/index.js +0 -1
- package/build/models/data/order/line-item/variant/unit/index.d.ts +0 -6
- package/build/models/data/order/line-item/variant/unit/index.js +0 -1
- package/build/models/data/order/line-item/variant/value/index.d.ts +0 -11
- package/build/models/data/order/line-item/variant/value/index.js +0 -1
- package/build/models/data/order/package/index.d.ts +0 -16
- package/build/models/data/order/package/index.js +0 -1
- package/build/models/data/order/package/tracking-info/index.d.ts +0 -9
- package/build/models/data/order/package/tracking-info/index.js +0 -1
- package/build/models/data/order/payment-method/index.d.ts +0 -9
- package/build/models/data/order/payment-method/index.js +0 -1
- package/build/models/data/order/refund/index.d.ts +0 -7
- package/build/models/data/order/refund/index.js +0 -1
- package/build/models/data/order/refund/line-item/index.d.ts +0 -6
- package/build/models/data/order/refund/line-item/index.js +0 -1
- package/build/models/data/order/refund/settings/index.d.ts +0 -7
- package/build/models/data/order/refund/settings/index.js +0 -1
- package/build/models/data/order/shipping-line/index.d.ts +0 -12
- package/build/models/data/order/shipping-line/index.js +0 -1
- package/build/models/data/order/tax-line/index.d.ts +0 -6
- package/build/models/data/order/tax-line/index.js +0 -1
- package/build/models/data/order/transaction/error/index.d.ts +0 -7
- package/build/models/data/order/transaction/error/index.js +0 -1
- package/build/models/data/order/transaction/index.d.ts +0 -26
- package/build/models/data/order/transaction/index.js +0 -1
- package/build/models/data/order/transaction/payment-method-detail/index.d.ts +0 -13
- package/build/models/data/order/transaction/payment-method-detail/index.js +0 -1
- package/build/models/data/order/transaction/payment-method-detail/installment-price/index.d.ts +0 -9
- package/build/models/data/order/transaction/payment-method-detail/installment-price/index.js +0 -1
- package/build/models/data/payment-gateway/additional-price/index.d.ts +0 -9
- package/build/models/data/payment-gateway/additional-price/index.js +0 -1
- package/build/models/data/payment-gateway/index.d.ts +0 -31
- package/build/models/data/payment-gateway/index.js +0 -1
- package/build/models/data/payment-gateway/settings/index.d.ts +0 -10
- package/build/models/data/payment-gateway/settings/index.js +0 -1
- package/build/models/data/payment-gateway/translation/index.d.ts +0 -7
- package/build/models/data/payment-gateway/translation/index.js +0 -1
- package/build/models/data/product/attribute/index.d.ts +0 -15
- package/build/models/data/product/attribute/index.js +0 -1
- package/build/models/data/product/attribute/option/index.d.ts +0 -6
- package/build/models/data/product/attribute/option/index.js +0 -1
- package/build/models/data/product/attribute/table-cell/index.d.ts +0 -6
- package/build/models/data/product/attribute/table-cell/index.js +0 -1
- package/build/models/data/product/attribute/table-template/index.d.ts +0 -7
- package/build/models/data/product/attribute/table-template/index.js +0 -1
- package/build/models/data/product/attribute/translation/index.d.ts +0 -13
- package/build/models/data/product/attribute/translation/index.js +0 -1
- package/build/models/data/product/attribute-value/index.d.ts +0 -28
- package/build/models/data/product/attribute-value/index.js +0 -1
- package/build/models/data/product/back-in-stock-settings/index.d.ts +0 -5
- package/build/models/data/product/back-in-stock-settings/index.js +0 -1
- package/build/models/data/product/base-unit/index.d.ts +0 -12
- package/build/models/data/product/base-unit/index.js +0 -1
- package/build/models/data/product/campaign/data/index.d.ts +0 -27
- package/build/models/data/product/campaign/data/index.js +0 -1
- package/build/models/data/product/campaign/filter/index.d.ts +0 -7
- package/build/models/data/product/campaign/filter/index.js +0 -1
- package/build/models/data/product/campaign/index.d.ts +0 -7
- package/build/models/data/product/campaign/index.js +0 -1
- package/build/models/data/product/campaign/product-buyx-then-gety/index.d.ts +0 -20
- package/build/models/data/product/campaign/product-buyx-then-gety/index.js +0 -1
- package/build/models/data/product/campaign/product-campaign-date-range-field/index.d.ts +0 -6
- package/build/models/data/product/campaign/product-campaign-date-range-field/index.js +0 -1
- package/build/models/data/product/campaign/product-fixed-discount/index.d.ts +0 -14
- package/build/models/data/product/campaign/product-fixed-discount/index.js +0 -1
- package/build/models/data/product/filter/index.d.ts +0 -82
- package/build/models/data/product/filter/index.js +0 -1
- package/build/models/data/product/image/index.d.ts +0 -10
- package/build/models/data/product/image/index.js +0 -1
- package/build/models/data/product/index.d.ts +0 -77
- package/build/models/data/product/index.js +0 -1
- package/build/models/data/product/option-set/index.d.ts +0 -29
- package/build/models/data/product/option-set/index.js +0 -1
- package/build/models/data/product/option-set/option/index.d.ts +0 -70
- package/build/models/data/product/option-set/option/index.js +0 -1
- package/build/models/data/product/star/index.d.ts +0 -6
- package/build/models/data/product/star/index.js +0 -1
- package/build/models/data/product/stock-location/index.d.ts +0 -8
- package/build/models/data/product/stock-location/index.js +0 -1
- package/build/models/data/product/tag/index.d.ts +0 -6
- package/build/models/data/product/tag/index.js +0 -1
- package/build/models/data/product/variant/index.d.ts +0 -31
- package/build/models/data/product/variant/index.js +0 -1
- package/build/models/data/product/variant/price/index.d.ts +0 -19
- package/build/models/data/product/variant/price/index.js +0 -1
- package/build/models/data/product/variant/unit/index.d.ts +0 -6
- package/build/models/data/product/variant/unit/index.js +0 -1
- package/build/models/data/product/variant-type/index.d.ts +0 -8
- package/build/models/data/product/variant-type/index.js +0 -1
- package/build/models/data/raffle/index.d.ts +0 -63
- package/build/models/data/raffle/index.js +0 -1
- package/build/models/data/sales-channel/index.d.ts +0 -19
- package/build/models/data/sales-channel/index.js +0 -1
- package/build/models/data/state/index.d.ts +0 -11
- package/build/models/data/state/index.js +0 -1
- package/build/models/data/state/location-translations/index.d.ts +0 -7
- package/build/models/data/stock-location/address/city/index.d.ts +0 -7
- package/build/models/data/stock-location/address/city/index.js +0 -1
- package/build/models/data/stock-location/address/country/index.d.ts +0 -7
- package/build/models/data/stock-location/address/country/index.js +0 -1
- package/build/models/data/stock-location/address/district/index.d.ts +0 -7
- package/build/models/data/stock-location/address/district/index.js +0 -1
- package/build/models/data/stock-location/address/index.d.ts +0 -15
- package/build/models/data/stock-location/address/index.js +0 -1
- package/build/models/data/stock-location/address/state/index.d.ts +0 -7
- package/build/models/data/stock-location/address/state/index.js +0 -1
- package/build/models/data/stock-location/available/index.d.ts +0 -10
- package/build/models/data/stock-location/available/index.js +0 -1
- package/build/models/data/stock-location/index.d.ts +0 -14
- package/build/models/data/stock-location/index.js +0 -1
- package/build/models/data/storefront/domain/index.d.ts +0 -9
- package/build/models/data/storefront/domain/index.js +0 -1
- package/build/models/data/storefront/index.d.ts +0 -30
- package/build/models/data/storefront/index.js +0 -1
- package/build/models/data/storefront/localization/index.d.ts +0 -8
- package/build/models/data/storefront/localization/index.js +0 -1
- package/build/models/data/storefront/meta-templates/index.d.ts +0 -8
- package/build/models/data/storefront/meta-templates/index.js +0 -1
- package/build/models/data/storefront/routing/dynamic-currency/index.d.ts +0 -6
- package/build/models/data/storefront/routing/dynamic-currency/index.js +0 -1
- package/build/models/data/storefront/routing/index.d.ts +0 -14
- package/build/models/data/storefront/routing/index.js +0 -1
- package/build/models/data/storefront/theme/index.d.ts +0 -10
- package/build/models/data/storefront/theme/index.js +0 -1
- package/build/models/data/storefront/theme-localization/index.d.ts +0 -15
- package/build/models/data/storefront/theme-localization/index.js +0 -1
- package/build/models/data/variant-type/index.d.ts +0 -13
- package/build/models/data/variant-type/index.js +0 -1
- package/build/models/data/variant-type/variant-value/index.d.ts +0 -12
- package/build/models/data/variant-type/variant-value/index.js +0 -1
- package/build/models/ui/customer-review-list/index.js +0 -1
- package/build/models/ui/customer-review-summary-list/index.js +0 -1
- package/build/models/ui/raffle-list/index.js +0 -1
- package/build/store/base.js +0 -1
- package/build/store/blog/index.d.ts +0 -26
- package/build/store/blog/index.js +0 -1
- package/build/store/brand/index.d.ts +0 -12
- package/build/store/brand/index.js +0 -1
- package/build/store/cart/api.d.ts +0 -10
- package/build/store/cart/api.js +0 -1
- package/build/store/category/index.d.ts +0 -12
- package/build/store/category/index.js +0 -1
- package/build/store/checkout/index.d.ts +0 -16
- package/build/store/checkout/index.js +0 -1
- package/build/store/customer/api.d.ts +0 -54
- package/build/store/customer/api.js +0 -1
- package/build/store/html-meta-data/index.d.ts +0 -6
- package/build/store/html-meta-data/index.js +0 -1
- package/build/store/location/index.d.ts +0 -9
- package/build/store/location/index.js +0 -1
- package/build/store/merchant/index.d.ts +0 -6
- package/build/store/product/index.d.ts +0 -47
- package/build/store/product/index.js +0 -1
- package/build/store/raffle/index.d.ts +0 -15
- package/build/store/raffle/index.js +0 -1
- package/build/store/storefront/index.d.ts +0 -5
- package/build/utils/currency.d.ts +0 -7
- package/build/utils/currency.js +0 -1
|
@@ -1,55 +1,16 @@
|
|
|
1
1
|
import { IkasBrand } from "../../../models/data";
|
|
2
2
|
import { IkasBrandListPropValue } from "@ikas/storefront-providers";
|
|
3
|
-
export declare
|
|
3
|
+
export declare type IkasBrandList = {
|
|
4
4
|
data: IkasBrand[];
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
private _brandListPropValue;
|
|
13
|
-
private _isLoading;
|
|
14
|
-
constructor(data: IkasBrandListParams);
|
|
15
|
-
get sort(): IkasBrandListSortType;
|
|
16
|
-
get limit(): number;
|
|
17
|
-
get page(): number;
|
|
18
|
-
get count(): number;
|
|
19
|
-
get pageCount(): number;
|
|
20
|
-
get isInitialized(): boolean;
|
|
21
|
-
get isStatic(): boolean;
|
|
22
|
-
get hasPrev(): boolean;
|
|
23
|
-
get hasNext(): boolean;
|
|
24
|
-
get isLoading(): boolean;
|
|
25
|
-
private getSortParams;
|
|
26
|
-
private getInitial;
|
|
27
|
-
getPrev: () => Promise<void>;
|
|
28
|
-
getNext: () => Promise<void>;
|
|
29
|
-
getPage: (page: number) => Promise<void>;
|
|
30
|
-
setSortType(sortType: IkasBrandListSortType): Promise<void>;
|
|
31
|
-
toJSON(): {
|
|
32
|
-
data: IkasBrand[];
|
|
33
|
-
type: IkasBrandListType;
|
|
34
|
-
sort: IkasBrandListSortType;
|
|
35
|
-
limit: number;
|
|
36
|
-
page: number;
|
|
37
|
-
count: number;
|
|
38
|
-
initialized: boolean;
|
|
39
|
-
minPage: number | null | undefined;
|
|
40
|
-
brandListPropValue: IkasBrandListPropValue;
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
export declare type IkasBrandListParams = {
|
|
44
|
-
data?: IkasBrand[];
|
|
45
|
-
type?: IkasBrandListType;
|
|
46
|
-
sort?: IkasBrandListSortType;
|
|
47
|
-
limit?: number;
|
|
48
|
-
page?: number;
|
|
49
|
-
count?: number;
|
|
50
|
-
initialized?: boolean;
|
|
51
|
-
minPage?: number;
|
|
5
|
+
type: IkasBrandListType;
|
|
6
|
+
sort: IkasBrandListSortType;
|
|
7
|
+
limit: number;
|
|
8
|
+
page: number;
|
|
9
|
+
count: number;
|
|
10
|
+
initialized: boolean;
|
|
11
|
+
minPage: number;
|
|
52
12
|
brandListPropValue: IkasBrandListPropValue;
|
|
13
|
+
isLoading: boolean;
|
|
53
14
|
};
|
|
54
15
|
export declare enum IkasBrandListType {
|
|
55
16
|
ALL = "ALL",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
var A,n;!function(A){A.ALL="ALL",A.STATIC="STATIC"}(A||(A={})),function(A){A.A_Z="A_Z",A.Z_A="Z_A"}(n||(n={}));export{n as IkasBrandListSortType,A as IkasBrandListType};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IkasCategoryList, IkasCategoryListSortType } from ".";
|
|
2
|
+
export * from "../list-commons";
|
|
3
|
+
export declare function createIkasCategoryList(params: IkasCategoryList): IkasCategoryList;
|
|
4
|
+
export declare function getInitial(list: IkasCategoryList): Promise<void>;
|
|
5
|
+
export declare function getPrev(list: IkasCategoryList): Promise<void>;
|
|
6
|
+
export declare function getNext(list: IkasCategoryList): Promise<void>;
|
|
7
|
+
export declare function getPage(list: IkasCategoryList, page: number): Promise<void>;
|
|
8
|
+
export declare function setSortType(list: IkasCategoryList, sortType: IkasCategoryListSortType): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as t,__generator as i}from'./../../../ext/tslib/tslib.es6.js';import{listCategory as n}from"@ikas/storefront-api";import{observable as a}from"mobx";import{IkasCategoryListType as o,IkasCategoryListSortType as e}from"./index.js";import{isStatic as r,hasPrev as s,hasNext as u}from"../list-commons/index.js";export{getPageCount,hasNext,hasPrev,isStatic}from"../list-commons/index.js";function d(t){return a({data:t.data||[],type:t.type||o.ALL,sort:t.sort||e.A_Z,limit:t.limit||20,page:t.page||1,count:t.count||0,initialized:t.initialized||!1,minPage:t.minPage||t.page||1,categoryListPropValue:t.categoryListPropValue||{categoryIds:[]},isLoading:t.isLoading||!1})}function c(a){var o,e,s;return t(this,void 0,void 0,(function(){var t,u;return i(this,(function(i){switch(i.label){case 0:if(a.isLoading)return[2];a.isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,n({id:r(a)&&a.categoryListPropValue.categoryIds?{in:a.categoryListPropValue.categoryIds}:void 0,pagination:{page:r(a)?void 0:a.page,limit:r(a)?void 0:a.limit},sort:m(a)})];case 2:return t=i.sent(),r(a)?a.data=(null===(o=a.categoryListPropValue.categoryIds)||void 0===o?void 0:o.map((function(i){var n,a;return null===(a=null===(n=t.data)||void 0===n?void 0:n.data)||void 0===a?void 0:a.find((function(t){return t.id===i}))})).filter((function(t){return!!t})))||[]:a.data=(null===(e=t.data)||void 0===e?void 0:e.data)||[],a.count=(null===(s=t.data)||void 0===s?void 0:s.count)||0,a.initialized=!0,a.minPage=a.page,[3,5];case 3:return u=i.sent(),console.log(u),[3,5];case 4:return a.isLoading=!1,[7];case 5:return[2]}}))}))}function l(a){var o,e,u;return t(this,void 0,void 0,(function(){var t,d,c;return i(this,(function(i){switch(i.label){case 0:if(a.isLoading||r(a)||!s(a))return[2];a.isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),t=a.minPage-1,[4,n({pagination:{page:t,limit:a.limit},sort:m(a)})];case 2:return d=i.sent(),a.data=(null===(e=null===(o=d.data)||void 0===o?void 0:o.data)||void 0===e?void 0:e.concat(a.data))||a.data,a.count=(null===(u=d.data)||void 0===u?void 0:u.count)||0,a.minPage=t,[3,5];case 3:return c=i.sent(),console.log(c),[3,5];case 4:return a.isLoading=!1,[7];case 5:return[2]}}))}))}function g(a){var o,e;return t(this,void 0,void 0,(function(){var t,s;return i(this,(function(i){switch(i.label){case 0:if(a.isLoading||r(a)||!u(a))return[2];a.isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,n({pagination:{page:a.page+1,limit:a.limit},sort:m(a)})];case 2:return t=i.sent(),a.data=a.data.concat((null===(o=t.data)||void 0===o?void 0:o.data)||[]),a.count=(null===(e=t.data)||void 0===e?void 0:e.count)||a.count,a.page=a.page+1,[3,5];case 3:return s=i.sent(),console.log(s),[3,5];case 4:return a.isLoading=!1,[7];case 5:return[2]}}))}))}function v(a,o){var e,s;return t(this,void 0,void 0,(function(){var t,u;return i(this,(function(i){switch(i.label){case 0:if(a.isLoading||r(a))return[2];a.isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,n({pagination:{page:o,limit:a.limit},sort:m(a)})];case 2:return t=i.sent(),a.data=(null===(e=t.data)||void 0===e?void 0:e.data)||[],a.count=(null===(s=t.data)||void 0===s?void 0:s.count)||0,a.page=o,a.minPage=o,[3,5];case 3:return u=i.sent(),console.log(u),[3,5];case 4:return a.isLoading=!1,[7];case 5:return[2]}}))}))}function p(n,a){return t(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return n.sort=a,[4,c(n)];case 1:return t.sent(),[2]}}))}))}function m(t){return t.sort===e.A_Z?"name":"-name"}export{d as createIkasCategoryList,c as getInitial,g as getNext,v as getPage,l as getPrev,p as setSortType};
|
|
@@ -1,55 +1,16 @@
|
|
|
1
1
|
import { IkasCategory } from "../../../models/data";
|
|
2
2
|
import { IkasCategoryListPropValue } from "@ikas/storefront-providers";
|
|
3
|
-
export declare
|
|
3
|
+
export declare type IkasCategoryList = {
|
|
4
4
|
data: IkasCategory[];
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
private _categoryListPropValue;
|
|
13
|
-
private _isLoading;
|
|
14
|
-
constructor(data: IkasCategoryListParams);
|
|
15
|
-
get sort(): IkasCategoryListSortType;
|
|
16
|
-
get limit(): number;
|
|
17
|
-
get page(): number;
|
|
18
|
-
get count(): number;
|
|
19
|
-
get pageCount(): number;
|
|
20
|
-
get isInitialized(): boolean;
|
|
21
|
-
get isStatic(): boolean;
|
|
22
|
-
get hasPrev(): boolean;
|
|
23
|
-
get hasNext(): boolean;
|
|
24
|
-
get isLoading(): boolean;
|
|
25
|
-
private getSortParams;
|
|
26
|
-
private getInitial;
|
|
27
|
-
getPrev: () => Promise<void>;
|
|
28
|
-
getNext: () => Promise<void>;
|
|
29
|
-
getPage: (page: number) => Promise<void>;
|
|
30
|
-
setSortType(sortType: IkasCategoryListSortType): Promise<void>;
|
|
31
|
-
toJSON(): {
|
|
32
|
-
data: IkasCategory[];
|
|
33
|
-
type: IkasCategoryListType;
|
|
34
|
-
sort: IkasCategoryListSortType;
|
|
35
|
-
limit: number;
|
|
36
|
-
page: number;
|
|
37
|
-
count: number;
|
|
38
|
-
initialized: boolean;
|
|
39
|
-
minPage: number | null | undefined;
|
|
40
|
-
categoryListPropValue: IkasCategoryListPropValue;
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
export declare type IkasCategoryListParams = {
|
|
44
|
-
data?: IkasCategory[];
|
|
45
|
-
type?: IkasCategoryListType;
|
|
46
|
-
sort?: IkasCategoryListSortType;
|
|
47
|
-
limit?: number;
|
|
48
|
-
page?: number;
|
|
49
|
-
count?: number;
|
|
50
|
-
initialized?: boolean;
|
|
51
|
-
minPage?: number;
|
|
5
|
+
type: IkasCategoryListType;
|
|
6
|
+
sort: IkasCategoryListSortType;
|
|
7
|
+
limit: number;
|
|
8
|
+
page: number;
|
|
9
|
+
count: number;
|
|
10
|
+
initialized: boolean;
|
|
11
|
+
minPage: number;
|
|
52
12
|
categoryListPropValue: IkasCategoryListPropValue;
|
|
13
|
+
isLoading: boolean;
|
|
53
14
|
};
|
|
54
15
|
export declare enum IkasCategoryListType {
|
|
55
16
|
ALL = "ALL",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
var A,n;!function(A){A.ALL="ALL",A.STATIC="STATIC"}(A||(A={})),function(A){A.A_Z="A_Z",A.Z_A="Z_A"}(n||(n={}));export{n as IkasCategoryListSortType,A as IkasCategoryListType};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IkasCustomerReviewList } from ".";
|
|
2
|
+
export * from "../list-commons";
|
|
3
|
+
export declare function createCustomerReviewList(params: Partial<IkasCustomerReviewList>): IkasCustomerReviewList;
|
|
4
|
+
export declare function getInitial(list: IkasCustomerReviewList): Promise<void>;
|
|
5
|
+
export declare function getPrev(list: IkasCustomerReviewList): Promise<void>;
|
|
6
|
+
export declare function getNext(list: IkasCustomerReviewList): Promise<void>;
|
|
7
|
+
export declare function getPage(list: IkasCustomerReviewList, page: number): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as t,__generator as n,__assign as i}from'./../../../ext/tslib/tslib.es6.js';import{searchProducts as a,listCustomerReviews as o}from"@ikas/storefront-api";import{IkasStorefrontConfig as e}from"@ikas/storefront-config";import{observable as r}from"mobx";import{hasPrev as d,hasNext as u}from"../list-commons/index.js";export{getPageCount,hasNext,hasPrev,isStatic}from"../list-commons/index.js";function s(t){return r({data:t.data||[],limit:t.limit||20,page:t.page||1,count:t.count||0,productId:t.productId||"",initialized:t.initialized||!1,minPage:t.minPage||t.page||1,isLoading:t.isLoading||!1})}function c(r,d,u){var s,c,l;return t(this,void 0,void 0,(function(){var t,v,g;return n(this,(function(n){switch(n.label){case 0:return[4,o({productId:r.productId,input:{salesChannelId:e.getSalesChannelId()||""},pagination:{page:d,limit:u}})];case 1:return t=n.sent(),!(null===(s=t.data)||void 0===s?void 0:s.data)||r.productId?[3,3]:(v=null===(c=null==t?void 0:t.data)||void 0===c?void 0:c.data.map((function(t){return null==t?void 0:t.productId})),[4,a({input:{productIdList:v}})]);case 2:g=n.sent(),t.data.data=null===(l=null==t?void 0:t.data)||void 0===l?void 0:l.data.map((function(t){var n,a,o=null===(a=null===(n=null==g?void 0:g.data)||void 0===n?void 0:n.data)||void 0===a?void 0:a.find((function(n){return n.id===t.productId}));return i(i({},t),{product:o})})).filter((function(t){return t.product&&!t.product.deleted})),n.label=3;case 3:return[2,t]}}))}))}function l(i){var a,o;return t(this,void 0,void 0,(function(){var t,e;return n(this,(function(n){switch(n.label){case 0:if(i.isLoading)return[2];i.isLoading=!0,n.label=1;case 1:return n.trys.push([1,3,4,5]),[4,c(i,i.page,i.limit)];case 2:return t=n.sent(),i.data=(null===(a=t.data)||void 0===a?void 0:a.data)||[],i.count=(null===(o=t.data)||void 0===o?void 0:o.count)||0,i.initialized=!0,i.minPage=i.page,[3,5];case 3:return e=n.sent(),console.log(e),[3,5];case 4:return i.isLoading=!1,[7];case 5:return[2]}}))}))}function v(i){var a,o;return t(this,void 0,void 0,(function(){var t,e,r;return n(this,(function(n){switch(n.label){case 0:if(i.isLoading||!d(i))return[2];i.isLoading=!0,n.label=1;case 1:return n.trys.push([1,3,4,5]),t=i.minPage-1,[4,c(i,t,i.limit)];case 2:return e=n.sent(),i.data=(null===(a=e.data)||void 0===a?void 0:a.data.concat(i.data))||i.data,i.count=(null===(o=e.data)||void 0===o?void 0:o.count)||i.count,i.minPage=t,[3,5];case 3:return r=n.sent(),console.log(r),[3,5];case 4:return i.isLoading=!1,[7];case 5:return[2]}}))}))}function g(i){var a,o;return t(this,void 0,void 0,(function(){var t,e;return n(this,(function(n){switch(n.label){case 0:if(i.isLoading||!u(i))return[2];i.isLoading=!0,n.label=1;case 1:return n.trys.push([1,3,4,5]),[4,c(i,i.page+1,i.limit)];case 2:return t=n.sent(),i.data=i.data.concat((null===(a=t.data)||void 0===a?void 0:a.data)||[]),i.count=(null===(o=t.data)||void 0===o?void 0:o.count)||i.count,i.page=i.page+1,[3,5];case 3:return e=n.sent(),console.log(e),[3,5];case 4:return i.isLoading=!1,[7];case 5:return[2]}}))}))}function p(i,a){var o,e;return t(this,void 0,void 0,(function(){var t,r;return n(this,(function(n){switch(n.label){case 0:if(i.isLoading)return[2];i.isLoading=!0,n.label=1;case 1:return n.trys.push([1,3,4,5]),[4,c(i,a,i.limit)];case 2:return t=n.sent(),i.data=(null===(o=t.data)||void 0===o?void 0:o.data)||[],i.count=(null===(e=t.data)||void 0===e?void 0:e.count)||0,i.page=a,i.minPage=a,[3,5];case 3:return r=n.sent(),console.log(r),[3,5];case 4:return i.isLoading=!1,[7];case 5:return[2]}}))}))}export{s as createCustomerReviewList,l as getInitial,g as getNext,p as getPage,v as getPrev};
|
|
@@ -1,43 +1,11 @@
|
|
|
1
1
|
import { IkasCustomerReview } from "../../data";
|
|
2
|
-
export declare
|
|
2
|
+
export declare type IkasCustomerReviewList = {
|
|
3
3
|
data: IkasCustomerReview[];
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
constructor(data: IkasCustomerReviewListParams);
|
|
12
|
-
get limit(): number;
|
|
13
|
-
get page(): number;
|
|
14
|
-
get count(): number;
|
|
15
|
-
get pageCount(): number;
|
|
16
|
-
get isInitialized(): boolean;
|
|
17
|
-
get hasPrev(): boolean;
|
|
18
|
-
get hasNext(): boolean;
|
|
19
|
-
get isLoading(): boolean;
|
|
20
|
-
private listCustomerReviews;
|
|
21
|
-
getInitial: () => Promise<void>;
|
|
22
|
-
getPrev: () => Promise<void>;
|
|
23
|
-
getNext: () => Promise<void>;
|
|
24
|
-
getPage: (page: number) => Promise<void>;
|
|
25
|
-
toJSON(): {
|
|
26
|
-
data: IkasCustomerReview[];
|
|
27
|
-
limit: number;
|
|
28
|
-
page: number;
|
|
29
|
-
count: number;
|
|
30
|
-
initialized: boolean;
|
|
31
|
-
minPage: number | null | undefined;
|
|
32
|
-
productId: string | null | undefined;
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
export declare type IkasCustomerReviewListParams = {
|
|
36
|
-
data?: IkasCustomerReview[];
|
|
37
|
-
limit?: number;
|
|
38
|
-
page?: number;
|
|
39
|
-
count?: number;
|
|
40
|
-
initialized?: boolean;
|
|
41
|
-
minPage?: number;
|
|
42
|
-
productId?: string;
|
|
4
|
+
limit: number;
|
|
5
|
+
page: number;
|
|
6
|
+
count: number;
|
|
7
|
+
initialized: boolean;
|
|
8
|
+
minPage: number;
|
|
9
|
+
productId: string;
|
|
10
|
+
isLoading: boolean;
|
|
43
11
|
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IkasCustomerReviewSummaryList } from ".";
|
|
2
|
+
export * from "../list-commons";
|
|
3
|
+
export declare function createCustomerReviewSummaryList(params: IkasCustomerReviewSummaryList): IkasCustomerReviewSummaryList;
|
|
4
|
+
export declare function getInitial(list: IkasCustomerReviewSummaryList): Promise<void>;
|
|
5
|
+
export declare function getPrev(list: IkasCustomerReviewSummaryList): Promise<void>;
|
|
6
|
+
export declare function getNext(list: IkasCustomerReviewSummaryList): Promise<void>;
|
|
7
|
+
export declare function getPage(list: IkasCustomerReviewSummaryList, page: number): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as t,__generator as i}from'./../../../ext/tslib/tslib.es6.js';import{listCustomerReviewSummary as n}from"@ikas/storefront-api";import{observable as a}from"mobx";import{hasPrev as e,hasNext as o}from"../list-commons/index.js";export{getPageCount,hasNext,hasPrev,isStatic}from"../list-commons/index.js";function r(t){return a({data:t.data||[],limit:t.limit||20,page:t.page||1,count:t.count||0,productId:t.productId||"",initialized:t.initialized||!1,minPage:t.minPage||t.page||1,isLoading:t.isLoading||!1})}function s(a,e,o){return t(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,n({productId:{eq:a.productId},pagination:{page:e,limit:o}})];case 1:return[2,t.sent()]}}))}))}function u(n){var a,e;return t(this,void 0,void 0,(function(){var t,o;return i(this,(function(i){switch(i.label){case 0:if(n.isLoading)return[2];n.isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,s(n,n.page,n.limit)];case 2:return t=i.sent(),n.data=(null===(a=t.data)||void 0===a?void 0:a.data)||[],n.count=(null===(e=t.data)||void 0===e?void 0:e.count)||0,n.initialized=!0,n.minPage=n.page,[3,5];case 3:return o=i.sent(),console.log(o),[3,5];case 4:return n.isLoading=!1,[7];case 5:return[2]}}))}))}function d(n){var a,o,r;return t(this,void 0,void 0,(function(){var t,u,d;return i(this,(function(i){switch(i.label){case 0:if(n.isLoading||!e(n))return[2];n.isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),t=n.minPage-1,[4,s(n,t,n.limit)];case 2:return u=i.sent(),n.data=(null===(o=null===(a=u.data)||void 0===a?void 0:a.data)||void 0===o?void 0:o.concat(n.data))||n.data,n.count=(null===(r=u.data)||void 0===r?void 0:r.count)||n.count,n.minPage=t,[3,5];case 3:return d=i.sent(),console.log(d),[3,5];case 4:return n.isLoading=!1,[7];case 5:return[2]}}))}))}function c(n){var a,e;return t(this,void 0,void 0,(function(){var t,r;return i(this,(function(i){switch(i.label){case 0:if(n.isLoading||!o(n))return[2];n.isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,s(n,n.page+1,n.limit)];case 2:return t=i.sent(),n.data=n.data.concat((null===(a=t.data)||void 0===a?void 0:a.data)||[]),n.count=(null===(e=t.data)||void 0===e?void 0:e.count)||n.count,n.page=n.page+1,[3,5];case 3:return r=i.sent(),console.log(r),[3,5];case 4:return n.isLoading=!1,[7];case 5:return[2]}}))}))}function l(n,a){var e,o;return t(this,void 0,void 0,(function(){var t,r;return i(this,(function(i){switch(i.label){case 0:if(n.isLoading)return[2];n.isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,s(n,a,n.limit)];case 2:return t=i.sent(),n.data=(null===(e=t.data)||void 0===e?void 0:e.data)||[],n.count=(null===(o=t.data)||void 0===o?void 0:o.count)||0,n.page=a,n.minPage=a,[3,5];case 3:return r=i.sent(),console.log(r),[3,5];case 4:return n.isLoading=!1,[7];case 5:return[2]}}))}))}export{r as createCustomerReviewSummaryList,u as getInitial,c as getNext,l as getPage,d as getPrev};
|
|
@@ -1,43 +1,11 @@
|
|
|
1
1
|
import { IkasCustomerReviewSummary } from "../../data";
|
|
2
|
-
export declare
|
|
2
|
+
export declare type IkasCustomerReviewSummaryList = {
|
|
3
3
|
data: IkasCustomerReviewSummary[];
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
private _productId;
|
|
10
|
-
private _isLoading;
|
|
11
|
-
constructor(data: IkasCustomerReviewSummaryParams);
|
|
12
|
-
get limit(): number;
|
|
13
|
-
get page(): number;
|
|
14
|
-
get count(): number;
|
|
15
|
-
get pageCount(): number;
|
|
16
|
-
get isInitialized(): boolean;
|
|
17
|
-
get hasPrev(): boolean;
|
|
18
|
-
get hasNext(): boolean;
|
|
19
|
-
get isLoading(): boolean;
|
|
20
|
-
private listCustomerReviewSummary;
|
|
21
|
-
getInitial: () => Promise<void>;
|
|
22
|
-
getPrev: () => Promise<void>;
|
|
23
|
-
getNext: () => Promise<void>;
|
|
24
|
-
getPage: (page: number) => Promise<void>;
|
|
25
|
-
toJSON(): {
|
|
26
|
-
data: IkasCustomerReviewSummary[];
|
|
27
|
-
limit: number;
|
|
28
|
-
page: number;
|
|
29
|
-
count: number;
|
|
30
|
-
initialized: boolean;
|
|
31
|
-
minPage: number | null | undefined;
|
|
32
|
-
productId: string;
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
export declare type IkasCustomerReviewSummaryParams = {
|
|
36
|
-
data?: IkasCustomerReviewSummary[];
|
|
37
|
-
limit?: number;
|
|
38
|
-
page?: number;
|
|
39
|
-
count?: number;
|
|
40
|
-
initialized?: boolean;
|
|
41
|
-
minPage?: number;
|
|
4
|
+
limit: number;
|
|
5
|
+
page: number;
|
|
6
|
+
count: number;
|
|
7
|
+
initialized: boolean;
|
|
8
|
+
minPage: number;
|
|
42
9
|
productId: string;
|
|
10
|
+
isLoading: boolean;
|
|
43
11
|
};
|
|
@@ -1,14 +1,23 @@
|
|
|
1
|
-
export * from "./blog-list";
|
|
1
|
+
export * as IkasBlogCategoryListFunctions from "./blog-category-list/functions";
|
|
2
2
|
export * from "./blog-category-list";
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export * from "./
|
|
9
|
-
export * from "./
|
|
3
|
+
export * as IkasBlogListFunctions from "./blog-list/functions";
|
|
4
|
+
export * from "./blog-list";
|
|
5
|
+
export * as IkasBrandListFunctions from "./brand-list/functions";
|
|
6
|
+
export * from "./brand-list";
|
|
7
|
+
export * as IkasCategoryListFunctions from "./category-list/functions";
|
|
8
|
+
export * from "./category-list";
|
|
9
|
+
export * from "./component-renderer";
|
|
10
|
+
export * as IkasCustomerReviewListFunctions from "./customer-review-list/functions";
|
|
10
11
|
export * from "./customer-review-list";
|
|
12
|
+
export * as IkasCustomerReviewSummaryListFunctions from "./customer-review-summary-list/functions";
|
|
11
13
|
export * from "./customer-review-summary-list";
|
|
14
|
+
export * from "./navigation-link";
|
|
15
|
+
export * from "./product-attribute-detail";
|
|
16
|
+
export * from "./product-attribute-list";
|
|
17
|
+
export * as IkasProductListFunctions from "./product-list/functions";
|
|
18
|
+
export * from "./product-list";
|
|
19
|
+
export * as IkasRafflelistFunctions from "./raffle-list/functions";
|
|
20
|
+
export * from "./raffle-list";
|
|
12
21
|
export { Validator } from "./validator";
|
|
13
22
|
export type { ValidationStatus } from "./validator";
|
|
14
23
|
export * from "./validator/rules";
|
|
@@ -23,5 +32,3 @@ export { RecoverPasswordForm } from "./validator/form/recover-password";
|
|
|
23
32
|
export { AccountInfoForm } from "./validator/form/account-info";
|
|
24
33
|
export { RaffleForm } from "./validator/form/raffle-form";
|
|
25
34
|
export { CustomerReviewForm } from "./validator/form/customer-review";
|
|
26
|
-
export * from "./component-renderer";
|
|
27
|
-
export { IkasRaffleList } from "./raffle-list";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IkasBlogCategoryList } from "../blog-category-list";
|
|
2
|
+
import { IkasBlogList } from "../blog-list";
|
|
3
|
+
import { IkasBrandList } from "../brand-list";
|
|
4
|
+
import { IkasCategoryList } from "../category-list";
|
|
5
|
+
import { IkasCustomerReviewList } from "../customer-review-list";
|
|
6
|
+
import { IkasCustomerReviewSummaryList } from "../customer-review-summary-list";
|
|
7
|
+
import { IkasRaffleList } from "../raffle-list";
|
|
8
|
+
declare type ListType = IkasBlogCategoryList | IkasBlogList | IkasCategoryList | IkasBrandList | IkasCustomerReviewList | IkasCustomerReviewSummaryList | IkasRaffleList;
|
|
9
|
+
export declare function getPageCount(list: ListType): number;
|
|
10
|
+
export declare function isStatic(list: ListType): boolean;
|
|
11
|
+
export declare function hasPrev(list: ListType): boolean;
|
|
12
|
+
export declare function hasNext(list: ListType): boolean;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function n(n){return Math.ceil(n.count/n.limit)}function t(n){return"STATIC"===n.type}function i(n){return!(t(n)||!n.minPage)&&n.minPage>1}function e(n){return!t(n)&&n.page*n.limit<n.count}export{n as getPageCount,e as hasNext,i as hasPrev,t as isStatic};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export declare
|
|
1
|
+
export declare type IkasNavigationLink = {
|
|
2
2
|
href: string;
|
|
3
3
|
label: string;
|
|
4
4
|
subLinks: IkasNavigationLink[];
|
|
5
5
|
isExternal?: boolean | null;
|
|
6
6
|
itemId?: string;
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
};
|
|
8
|
+
export declare function createIkasNavigationLink(href: string, label: string, subLinks: IkasNavigationLink[], isExternal?: boolean): IkasNavigationLink;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{observable as r}from"mobx";function e(e,n,o,t){return r({href:e,label:n,subLinks:o,isExternal:t})}export{e as createIkasNavigationLink};
|
|
@@ -4,5 +4,5 @@ export declare class IkasAttributeDetail {
|
|
|
4
4
|
productDetail: IkasProduct | null;
|
|
5
5
|
attributePropValue: IkasAttributePropValue;
|
|
6
6
|
constructor(productDetail: IkasProduct | null, attributePropValue: IkasAttributePropValue);
|
|
7
|
-
get values(): import("
|
|
7
|
+
get values(): import("@ikas/storefront-models/build-cjs/models/product/attribute-value").IkasProductAttributeValue[];
|
|
8
8
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{IkasProductFunctions as t}from"@ikas/storefront-model-functions";import{makeAutoObservable as r}from"mobx";var e=function(){function e(t,e){this.productDetail=null,this.productDetail=t,this.attributePropValue=e,r(this)}return Object.defineProperty(e.prototype,"values",{get:function(){var r=this,e=t.hasVariant,i=t.getSelectedVariant;return this.productDetail?e(this.productDetail)?i(this.productDetail).attributes.filter((function(t){return t.productAttributeId===r.attributePropValue.attributeId})):this.productDetail.attributes.filter((function(t){return t.productAttributeId===r.attributePropValue.attributeId})):[]},enumerable:!1,configurable:!0}),e}();export{e as IkasAttributeDetail};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeAutoObservable as t}from"mobx";import r from"lodash/groupBy";var
|
|
1
|
+
import{makeAutoObservable as t}from"mobx";import r from"lodash/groupBy";import{IkasProductFunctions as u}from"@ikas/storefront-model-functions";var i=function(){function i(r,u){this.product=null,this.product=r,this.attributeListPropValue=u,t(this)}return Object.defineProperty(i.prototype,"values",{get:function(){var t,i=this;if(!this.product)return[];var e=u.hasVariant,o=u.getSelectedVariant,n=e(this.product)?o(this.product).attributes:[];this.product.attributes.forEach((function(t){n.some((function(r){return r.productAttributeId===t.productAttributeId}))||n.push(t)}));var d=e(this.product)?r(n.filter((function(t){var r;return null===(r=i.attributeListPropValue.attributeIds)||void 0===r?void 0:r.includes(t.productAttributeId||"")})),"productAttributeId"):r(this.product.attributes.filter((function(t){var r;return null===(r=i.attributeListPropValue.attributeIds)||void 0===r?void 0:r.includes(t.productAttributeId||"")})),"productAttributeId");return(null===(t=this.attributeListPropValue.attributeIds)||void 0===t?void 0:t.map((function(t){var r=d[t];if((null==r?void 0:r.length)&&r[0].productAttribute)return{attribute:r[0].productAttribute,values:r}})).filter((function(t){return!!t})))||[]},enumerable:!1,configurable:!0}),i}();export{i as IkasAttributeList};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { IkasProductList, IkasProductListSortType } from ".";
|
|
2
|
+
import { IkasApplicableProductFilterValue, IkasProductFilterNumberRangeListOption, IkasFilterRangeValue } from "@ikas/storefront-models";
|
|
3
|
+
import { IkasProductFilter, IkasFilterCategory } from "../../../models/data";
|
|
4
|
+
export declare function createIkasProductList(params: Partial<IkasProductList>): IkasProductList;
|
|
5
|
+
export declare function initOnBrowser(list: IkasProductList): void;
|
|
6
|
+
export declare function getPageCount(list: IkasProductList): number;
|
|
7
|
+
export declare function setSearchKeyword(list: IkasProductList, value: string): void;
|
|
8
|
+
export declare function isFilterable(list: IkasProductList): boolean;
|
|
9
|
+
export declare function isFiltered(list: IkasProductList): boolean;
|
|
10
|
+
export declare function isStatic(list: IkasProductList): boolean;
|
|
11
|
+
export declare function isDiscounted(list: IkasProductList): boolean;
|
|
12
|
+
export declare function isRecommended(list: IkasProductList): boolean;
|
|
13
|
+
export declare function isLastViewed(list: IkasProductList): boolean;
|
|
14
|
+
export declare function isRelatedProducts(list: IkasProductList): boolean;
|
|
15
|
+
export declare function isViewedTogetherProducts(list: IkasProductList): boolean;
|
|
16
|
+
export declare function isSearch(list: IkasProductList): boolean;
|
|
17
|
+
export declare function isFeaturedSortEnabled(list: IkasProductList): boolean;
|
|
18
|
+
export declare function hasPrev(list: IkasProductList): boolean;
|
|
19
|
+
export declare function hasNext(list: IkasProductList): boolean;
|
|
20
|
+
export declare function getDisplayedFilterCategories(list: IkasProductList): IkasFilterCategory[] | undefined;
|
|
21
|
+
export declare function hasAppliedFilter(list: IkasProductList): boolean | undefined;
|
|
22
|
+
export declare function clearFilters(list: IkasProductList): void;
|
|
23
|
+
export declare function handleFilterValueClick(list: IkasProductList, filter: IkasProductFilter, filterValue: IkasApplicableProductFilterValue): void;
|
|
24
|
+
export declare function handleNumberRangeFilterValueClick(list: IkasProductList, filter: IkasProductFilter, option: IkasProductFilterNumberRangeListOption): void;
|
|
25
|
+
export declare function handleNumberRangeFilterChange(list: IkasProductList, filter: IkasProductFilter, numberRange: IkasFilterRangeValue | null): void;
|
|
26
|
+
export declare function getInitial(list: IkasProductList, queryParams?: URLSearchParams, isInfiteScrollReturn?: boolean): Promise<true | undefined>;
|
|
27
|
+
export declare function getPrev(list: IkasProductList): Promise<void>;
|
|
28
|
+
export declare function getNext(list: IkasProductList): Promise<void>;
|
|
29
|
+
export declare function getPage(list: IkasProductList, page: number): Promise<void>;
|
|
30
|
+
export declare function setSortType(list: IkasProductList, sortType: IkasProductListSortType): Promise<void>;
|
|
31
|
+
export declare function handleFilterCategoryClick(list: IkasProductList, filterCategory: IkasFilterCategory, disableRoute?: boolean): Promise<void>;
|
|
32
|
+
export declare function setVisibleInfiniteScrollPage(list: IkasProductList, page: number): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as e,__generator as t}from'./../../../ext/tslib/tslib.es6.js';import{IkasProductListSortType as r,IkasProductListType as i}from"./index.js";import{observable as n}from"mobx";import a from"query-string";import{IkasThemeJsonPageType as o,IkasCategoryProductsOrderType as u,IkasThemeJsonStockPreference as l}from"@ikas/storefront-models";import{searchProducts as c,getSuggestedProducts as s,GetSuggestedProductsMethodEnum as d,getProductFilterData as f,SortByDirectionEnum as v,SortByTypeEnum as p}from"@ikas/storefront-api";import{IkasStorefrontConfig as g}from"@ikas/storefront-config";import{setSavedLastViewedProductsResponse as h,shouldUseLastViewedProductResponse as C,getLastViewedProducts as I}from"../../../store/customer/product/functions.js";import{IkasCustomerProductData as E}from"../../../store/customer/product/data.js";import{IkasProductFilterFunctions as y,IkasProductFilterCategoryFunctions as m}from"@ikas/storefront-model-functions";import{isServer as S}from"../../../utils/helper.js";import{waitForCustomerStoreInit as T}from"../../../store/customer/functions.js";import{IkasBaseStore as A}from"../../../store/base/index.js";import{search as D,viewSearchResults as L,viewListing as R}from"../../../analytics/analytics.js";import"../../../analytics/head/index.js";import"@ikas/localized-address";import P from"lodash/debounce";var N,b=((N={})[r.INCREASING_PRICE]=1,N[r.DECREASING_PRICE]=2,N[r.LAST_ADDED]=3,N[r.FIRST_ADDED]=4,N[r.INCREASING_DISCOUNT]=5,N[r.DECRASING_DISCOUNT]=6,N[r.FEATURED]=7,N[r.DEFAULT]=8,N);function w(e){var t,a,l,c,s=n({data:e.data||[],type:e.type||(null===(t=e.productListPropValue)||void 0===t?void 0:t.productListType)||i.ALL,pageType:e.pageType||o.INDEX,sort:e.sort||(null===(a=e.productListPropValue)||void 0===a?void 0:a.initialSort)||r.LAST_ADDED,limit:e.limit||(null===(l=e.productListPropValue)||void 0===l?void 0:l.initialLimit)||20,page:e.page||1,minPage:e.minPage||e.page||1,infiniteScrollPage:null!==(c=e.infiniteScrollPage)&&void 0!==c?c:null,count:e.count||0,searchKeyword:e.searchKeyword||"",productListPropValue:e.productListPropValue||{id:"",productListType:i.ALL},filters:e.filters||null,filterCategories:e.filterCategories||null,filterBrandId:e.filterBrandId||null,filterCategoryId:e.filterCategoryId||null,relatedProductData:e.relatedProductData||null,viewedTogetherProductData:e.viewedTogetherProductData||null,pageSpecificData:e.pageSpecificData||null,recommendFor:e.recommendFor||null,isLoading:!1,fetchRequestTime:0,initialized:!1});return function(e){var t;if((null===(t=e.pageSpecificData)||void 0===t?void 0:t.orderType)&&[i.ALL].includes(e.type))switch(e.pageSpecificData.orderType){case u.HIGHEST_DISCOUNT_RATIO:e.sort=r.DECRASING_DISCOUNT;break;case u.LOWEST_DISCOUNT_RATIO:e.sort=r.INCREASING_DISCOUNT;break;case u.HIGHEST_PRICE:e.sort=r.DECREASING_PRICE;break;case u.LOWEST_PRICE:e.sort=r.INCREASING_PRICE;break;case u.NEWEST:e.sort=r.LAST_ADDED;break;case u.OLDEST:e.sort=r.FIRST_ADDED;break;case u.MANUALLY:e.sort=r.FEATURED}}(s),_(s),O(s),s}function _(e){e.data.forEach((function(t){return t.isFiltered=B(e)}))}function O(e){e.data.forEach((function(t){return t.isStatic=z(e)}))}function V(e){var t,r,i,n={},u=m.getFilterCategorySlug;if(null===(t=e.filters)||void 0===t||t.forEach((function(e){var t=y.getKeyList(e);t.length&&(n[e.key]=t)})),e.searchKeyword&&(n.s=e.searchKeyword),e.sort&&(n.o=b[e.sort]),e.infiniteScrollPage&&(n.page=e.infiniteScrollPage),e.pageType!==o.CATEGORY){var l=null===(r=e.filterCategories)||void 0===r?void 0:r.filter((function(e){return e.isSelected}));if(!!(null==l?void 0:l.length))n.c=null==l?void 0:l.map(u);else if(e.filterCategoryId){var c=null===(i=e.filterCategories)||void 0===i?void 0:i.find((function(t){return t.id===e.filterCategoryId})),s=c?u(c):null;s&&(n.c=s)}}return a.stringify(n,{arrayFormat:"comma"})}function k(n,a,u,f){var h,C,I,E;return e(this,void 0,void 0,(function(){var e,m,S,T,A;return t(this,(function(t){switch(t.label){case 0:return e=[],m=[],S=y.getValueList,null===(h=n.filters)||void 0===h||h.forEach((function(t){var r=S(t);r.length&&e.push({id:t.id,type:t.type,displayType:t.displayType,valueList:r}),t.isFacetFilter&&m.push({id:t.id,type:t.type,displayType:t.displayType})})),T=null===(C=n.filterCategories)||void 0===C?void 0:C.filter((function(e){return e.isSelected})).map((function(e){return e.id})),A=function(e){var t,i;switch(e.sort){case r.INCREASING_PRICE:t=v.ASC,i=p.PRICE;break;case r.DECREASING_PRICE:t=v.DESC,i=p.PRICE;break;case r.FIRST_ADDED:t=v.ASC,i=p.CREATED_AT;break;case r.LAST_ADDED:t=v.DESC,i=p.CREATED_AT;break;case r.INCREASING_DISCOUNT:t=v.ASC,i=p.DISCOUNT_RATIO;break;case r.DECRASING_DISCOUNT:t=v.DESC,i=p.DISCOUNT_RATIO;break;case r.FEATURED:if(ee(e))return;t=v.ASC,i=p.MANUAL_SORT;break;case r.DEFAULT:t=void 0,i=void 0}if(t&&i)return{direction:t,type:i}}(n),n.relatedProductData&&Z(n)?[4,s({priceListId:g.getPriceListId(),salesChannelId:g.getSalesChannelId(),productId:n.relatedProductData.productId,brandIds:n.relatedProductData.brandIds,categoryIds:n.relatedProductData.categoryIds,locale:g.getCurrentLocale()})]:[3,2];case 1:case 3:case 5:return[2,t.sent()];case 2:return n.viewedTogetherProductData&&$(n)?[4,s({priceListId:g.getPriceListId(),salesChannelId:g.getSalesChannelId(),method:d.VIEWED_TOGETHER,productIds:n.viewedTogetherProductData.productIds,locale:g.getCurrentLocale()})]:[3,4];case 4:return[4,c({input:{page:a,perPage:u,productIdList:z(n)?null===(E=null===(I=n.productListPropValue)||void 0===I?void 0:I.productIds)||void 0===E?void 0:E.map((function(e){return e.productId})):f,filterList:e,facetList:m,brandId:n.pageType===o.BRAND&&n.type!==i.SEARCH?n.filterBrandId:void 0,categoryIdList:T&&T.length?T:n.filterCategoryId?[n.filterCategoryId]:void 0,priceListId:g.getPriceListId(),salesChannelId:g.getSalesChannelId(),query:n.searchKeyword,order:A?[A]:[],showStockOption:g.getStockPreference()||l.SHOW_ALL}})]}}))}))}function G(r){var i,n,a;return e(this,void 0,void 0,(function(){var e,u;return t(this,(function(t){switch(t.label){case 0:return[4,f({categoryId:r.filterCategoryId?r.filterCategoryId:void 0,locale:g.getCurrentLocale()})];case 1:return e=t.sent(),r.filters=null===(i=null==e?void 0:e.data)||void 0===i?void 0:i.filters,r.filterCategories=null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.categories,r.pageType!==o.CATEGORY&&r.filterCategoryId&&(u=null===(a=r.filterCategories)||void 0===a?void 0:a.find((function(e){return e.id===r.filterCategoryId})))&&(u.isSelected=!0),r.filters&&r.filters.sort((function(e,t){return e.order>t.order?1:-1})),[2]}}))}))}function U(r){return e(this,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return[4,se(r)];case 1:return e=t.sent(),[o.CATEGORY,o.BRAND,o.SEARCH].includes(r.pageType)?(e&&F(r),[2]):[2]}}))}))}function F(e){var t;if(!S()&&!ee(e)&&!g.getIsEditor()){var r=V(e);null===(t=A.router)||void 0===t||t.replace("".concat(location.pathname).concat(r?"?"+r:""),void 0,{shallow:!0})}}function K(){if(!S())return new URLSearchParams(location.search)}function H(e){e.searchKeyword&&e.data.length?L(e.searchKeyword,e.data):e.data.length&&e.type===i.ALL&&R(e.data)}var j=P((function(e){U(e)}),500),Y=P((function(e){e.searchKeyword&&D(e.searchKeyword)}),1e3);function W(e){S()||(function(e){var t=K(),r=null==t?void 0:t.get("page");if(r){var i=parseInt(r);isNaN(i)||(e.page=i,e.infiniteScrollPage=i)}}(e),location.search&&(x(e)||e.type===i.SEARCH)?se(e,K(),e.page>1):e.page>1?se(e,void 0,!0):J(e)?se(e):H(e))}function q(e){return Math.ceil(e.count/e.limit)}function M(e,t){t!==e.searchKeyword&&(e.searchKeyword=t,j(e),Y(e))}function x(e){return e.type===i.ALL||e.type===i.CATEGORY}function B(e){var t,r;return(null===(t=e.filters)||void 0===t?void 0:t.some((function(e){return!!y.getValueList(e).length})))||!!e.searchKeyword||e.pageType!==o.CATEGORY&&(!!e.filterCategoryId||(null===(r=e.filterCategories)||void 0===r?void 0:r.some((function(e){return e.isSelected}))))||!1}function z(e){return e.type===i.STATIC}function Q(e){return e.type===i.DISCOUNTED}function X(e){return e.type===i.RECOMMENDED}function J(e){return e.type===i.LAST_VIEWED}function Z(e){return e.type===i.RELATED_PRODUCTS}function $(e){return e.type===i.VIEWED_TOGETHER}function ee(e){return e.type===i.SEARCH}function te(e){var t;return(null===(t=e.pageSpecificData)||void 0===t?void 0:t.orderType)===u.MANUALLY&&[i.ALL,i.CATEGORY].includes(e.type)}function re(e){return!(z(e)||Q(e)||X(e)||!e.minPage)&&e.minPage>1}function ie(e){return!(z(e)||Q(e)||X(e))&&e.page*e.limit<e.count}function ne(e){var t;return null===(t=e.filterCategories)||void 0===t?void 0:t.filter((function(e){return 0!==e.resultCount}))}function ae(e){var t,r=y.getValueList;return!!e.searchKeyword||(null===(t=e.filters)||void 0===t?void 0:t.some((function(e){return!!r(e).length})))}function oe(e){var t,r;null===(t=e.filters)||void 0===t||t.forEach(y.clear),e.searchKeyword="",e.pageType!==o.CATEGORY&&(e.filterCategoryId=void 0),null===(r=e.filterCategories)||void 0===r||r.forEach((function(e){return e.isSelected=!1})),U(e)}function ue(e,t,r){y.handleFilterValueClick(t,r),U(e)}function le(e,t,r){y.handleNumberRangeClick(t,r),U(e)}function ce(e,t,r){y.handleNumberRangeChange(t,r),U(e)}function se(r,i,n){var a,u,l,c,s;return e(this,void 0,void 0,(function(){var e,d,f,v,p,g,A,D,L,R,P;return t(this,(function(t){switch(t.label){case 0:r.isLoading=!0,e=Date.now(),r.fetchRequestTime=e,t.label=1;case 1:return t.trys.push([1,14,15,16]),d=n?r.page:1,f=r.limit,!x(r)||r.filters?[3,3]:[4,G(r)];case 2:t.sent(),t.label=3;case 3:return function(e,t){var r;try{var i=y.applyQueryParam,n=m.getFilterCategorySlug;null==t||t.forEach((function(t,r){var n,a=null===(n=e.filters)||void 0===n?void 0:n.find((function(e){return e.key===r}));a&&i(a,t)}));var a=null==t?void 0:t.get("s");a&&(e.searchKeyword=a);var u=null==t?void 0:t.get("o");if(u){var l=parseInt(u),c=Object.entries(b).find((function(e){return e[1]===l}));c&&(e.sort=c[0])}if(e.pageType!==o.CATEGORY){var s=null==t?void 0:t.get("c"),d=null==s?void 0:s.split(",");d&&d.length&&(null===(r=e.filterCategories)||void 0===r||r.forEach((function(e){e.isSelected=d.some((function(t){return t===n(e)}))})))}}catch(e){console.log(e)}}(r,i),ee(r)&&!ae(r)?(r.data=[],r.page=1,r.minPage=1,r.count=0,r.initialized=!0,[2,!0]):(v=void 0,p=!1,z(r)?(d=void 0,f=200,[3,10]):[3,4]);case 4:return Q(r)?(d=1,f=10,[3,10]):[3,5];case 5:return X(r)?(d=1,f=10,[3,10]):[3,6];case 6:return J(r)?S()?[3,9]:[4,T()]:[3,10];case 7:return t.sent(),[4,I()];case 8:return(g=t.sent())&&g.length?(v=g.map((function(e){return e.productId})),p=C(),[3,10]):[2];case 9:return[2];case 10:return p?(D=E.savedLastViewedProductsResponse,[3,13]):[3,11];case 11:return[4,k(r,d||1,f||10,v)];case 12:D=t.sent(),t.label=13;case 13:return(A=D)&&r.fetchRequestTime===e?(L=[],!p&&J(r)&&h(A),z(r)||J(r)?(R=z(r)?null===(a=r.productListPropValue)||void 0===a?void 0:a.productIds:E.lastViewedProducts,L=(null==R?void 0:R.map((function(e){var t,r,i=null===(r=null===(t=A.data)||void 0===t?void 0:t.data)||void 0===r?void 0:r.find((function(t){return t.id===e.productId})),n=null==i?void 0:i.variants.find((function(t){return t.id===e.variantId}));if((null==n?void 0:n.isActive)||(n=null==i?void 0:i.variants.find((function(e){return e.isActive}))),i&&n)return i.selectedVariantValues=n.variantValues,i})).filter((function(e){return!!e})))||[]):L=(null===(l=null===(u=A.data)||void 0===u?void 0:u.data)||void 0===l?void 0:l.map((function(e){var t=e.variants.find((function(e){return e.isActive}));return e.selectedVariantValues=(t||e.variants[0]).variantValues,e})))||[],function(e,t){var r,i,n=y.isCustomValueFilter;null===(r=e.filters)||void 0===r||r.forEach((function(e){var r,i,a,o=null==t?void 0:t.find((function(t){return t.id===e.id}));o?null===(r=e.values)||void 0===r||r.forEach((function(t){var r=o.values.find((function(e){return e.id===t.id}));r?t.resultCount=r.count:n(e)?t.resultCount=null:t.resultCount=0})):n(e)?null===(i=e.values)||void 0===i||i.forEach((function(e){return e.resultCount=null})):null===(a=e.values)||void 0===a||a.forEach((function(e){return e.resultCount=0}))}));var a=null==t?void 0:t.find((function(e){return"category"===e.id}));a&&(null===(i=e.filterCategories)||void 0===i||i.forEach((function(e){var t=a.values.find((function(t){return t.id===e.id}));e.resultCount=t?t.count:0})))}(r,null===(c=A.data)||void 0===c?void 0:c.facets),r.data=L,r.count=(null===(s=A.data)||void 0===s?void 0:s.count)||0,r.initialized=!0,r.page=d||1,r.minPage=r.page,_(r),O(r),n||(r.infiniteScrollPage=null),H(r),[2,!0]):[2];case 14:return P=t.sent(),console.log(P),[3,16];case 15:return e===r.fetchRequestTime&&(r.isLoading=!1),[7];case 16:return[2]}}))}))}function de(r){var i,n,a;return e(this,void 0,void 0,(function(){var e,o,u,l;return t(this,(function(t){switch(t.label){case 0:if(r.isLoading||z(r)||Q(r)||X(r)||J(r)||!re(r))return[2];r.isLoading=!0,t.label=1;case 1:return t.trys.push([1,3,4,5]),e=r.minPage-1,[4,k(r,e,r.limit)];case 2:return(o=t.sent())?(u=null===(n=null===(i=o.data)||void 0===i?void 0:i.data)||void 0===n?void 0:n.map((function(e){var t=e.variants.find((function(e){return e.isActive}));return e.selectedVariantValues=(t||e.variants[0]).variantValues,e})),r.data=(null==u?void 0:u.concat(r.data))||r.data,r.count=(null===(a=o.data)||void 0===a?void 0:a.count)||r.count,r.minPage=e,_(r),O(r),[3,5]):[2];case 3:return l=t.sent(),console.log(l),[3,5];case 4:return r.isLoading=!1,[7];case 5:return[2]}}))}))}function fe(r){var i,n,a;return e(this,void 0,void 0,(function(){var e,o,u;return t(this,(function(t){switch(t.label){case 0:if(r.isLoading||z(r)||Q(r)||X(r)||J(r)||!ie(r))return[2];r.isLoading=!0,t.label=1;case 1:return t.trys.push([1,3,4,5]),[4,k(r,r.page+1,r.limit)];case 2:return(e=t.sent())?(o=null===(n=null===(i=e.data)||void 0===i?void 0:i.data)||void 0===n?void 0:n.map((function(e){var t=e.variants.find((function(e){return e.isActive}));return e.selectedVariantValues=(t||e.variants[0]).variantValues,e})),r.data=r.data.concat(o||[]),r.count=(null===(a=e.data)||void 0===a?void 0:a.count)||r.count,r.page=r.page+1,_(r),O(r),[3,5]):[2];case 3:return u=t.sent(),console.log(u),[3,5];case 4:return r.isLoading=!1,[7];case 5:return[2]}}))}))}function ve(r,i){var n,a,o;return e(this,void 0,void 0,(function(){var e,u,l;return t(this,(function(t){switch(t.label){case 0:if(r.isLoading||z(r)||Q(r)||X(r)||J(r))return[2];r.isLoading=!0,t.label=1;case 1:return t.trys.push([1,3,4,5]),[4,k(r,i,r.limit)];case 2:return(e=t.sent())?(u=null===(a=null===(n=e.data)||void 0===n?void 0:n.data)||void 0===a?void 0:a.map((function(e){var t=e.variants.find((function(e){return e.isActive}));return e.selectedVariantValues=(t||e.variants[0]).variantValues,e})),r.data=u||[],r.count=(null===(o=e.data)||void 0===o?void 0:o.count)||0,r.page=i,r.minPage=i,_(r),O(r),[3,5]):[2];case 3:return l=t.sent(),console.log(l),[3,5];case 4:return r.isLoading=!1,[7];case 5:return[2]}}))}))}function pe(r,i){return e(this,void 0,void 0,(function(){return t(this,(function(e){switch(e.label){case 0:return r.sort=i,[4,se(r)];case 1:return e.sent()&&F(r),[2]}}))}))}function ge(r,i,n){var a,o;return void 0===n&&(n=!1),e(this,void 0,void 0,(function(){var e,u;return t(this,(function(t){switch(t.label){case 0:return n?(null===(a=r.filterCategories)||void 0===a||a.forEach((function(e){e.id===i.id&&(e.isSelected=!e.isSelected)})),[4,U(r)]):[3,2];case 1:return t.sent(),[3,3];case 2:g.getIsEditor()||(e=m.getFilterCategoryHref,u=V(r),null===(o=A.router)||void 0===o||o.push(e(i)+(u?"?"+u:""))),t.label=3;case 3:return[2]}}))}))}function he(e,t){var r;if(e.infiniteScrollPage!==t&&(e.infiniteScrollPage=t,!g.getIsEditor())){var i=V(e);null===(r=A.router)||void 0===r||r.replace("".concat(location.pathname).concat(i?"?"+i:""),void 0,{shallow:!0})}}export{oe as clearFilters,w as createIkasProductList,ne as getDisplayedFilterCategories,se as getInitial,fe as getNext,ve as getPage,q as getPageCount,de as getPrev,ge as handleFilterCategoryClick,ue as handleFilterValueClick,ce as handleNumberRangeFilterChange,le as handleNumberRangeFilterValueClick,ae as hasAppliedFilter,ie as hasNext,re as hasPrev,W as initOnBrowser,Q as isDiscounted,te as isFeaturedSortEnabled,x as isFilterable,B as isFiltered,J as isLastViewed,X as isRecommended,Z as isRelatedProducts,ee as isSearch,z as isStatic,$ as isViewedTogetherProducts,M as setSearchKeyword,pe as setSortType,he as setVisibleInfiniteScrollPage};
|