@ikas/storefront 4.0.0-alpha.69 → 4.0.0-alpha.7
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/package.json +19 -21
- package/src/analytics/analytics.ts +536 -0
- package/src/analytics/events.ts +116 -0
- package/src/analytics/facebookPixel.ts +226 -0
- package/src/analytics/googleAnalytics.ts +227 -0
- package/src/analytics/googleTagManager.ts +341 -0
- package/src/analytics/googleUniversal.ts +136 -0
- package/src/analytics/head/index.tsx +135 -0
- package/src/analytics/ikas.ts +558 -0
- package/src/analytics/index.ts +2 -0
- package/src/analytics/tiktokPixel.ts +223 -0
- package/src/components/checkout/components/address-form/index.tsx +406 -0
- package/src/components/checkout/components/address-form/model.ts +397 -0
- package/src/components/checkout/components/button/index.tsx +44 -0
- package/src/components/checkout/components/button/style.module.scss +103 -0
- package/src/components/checkout/components/cart-summary/cart-item/index.tsx +180 -0
- package/src/components/checkout/components/cart-summary/cart-item/style.module.scss +107 -0
- package/src/components/checkout/components/cart-summary/index.tsx +481 -0
- package/src/components/checkout/components/cart-summary/style.module.scss +251 -0
- package/src/components/checkout/components/checkbox/check.tsx +23 -0
- package/src/components/checkout/components/checkbox/index.tsx +50 -0
- package/src/components/checkout/components/checkbox/style.module.scss +72 -0
- package/src/components/checkout/components/credit-card-form/index.tsx +122 -0
- package/src/components/checkout/components/credit-card-form/model.ts +56 -0
- package/src/components/checkout/components/credit-card-form/style.module.scss +6 -0
- package/src/components/checkout/components/credit-card-form/svg/amex.tsx +30 -0
- package/src/components/checkout/components/credit-card-form/svg/master-card.tsx +38 -0
- package/src/components/checkout/components/credit-card-form/svg/troy.tsx +54 -0
- package/src/components/checkout/components/credit-card-form/svg/visa.tsx +46 -0
- package/src/components/checkout/components/customer-addresses/index.tsx +333 -0
- package/src/components/checkout/components/customer-addresses/model.ts +126 -0
- package/src/components/checkout/components/customer-addresses/style.module.scss +38 -0
- package/src/components/checkout/components/delivery-methods/icon-button/index.tsx +29 -0
- package/src/components/checkout/components/delivery-methods/icon-button/style.module.scss +41 -0
- package/src/components/checkout/components/delivery-methods/icons/box.tsx +22 -0
- package/src/components/checkout/components/delivery-methods/icons/store.tsx +22 -0
- package/src/components/checkout/components/delivery-methods/index.tsx +39 -0
- package/src/components/checkout/components/delivery-methods/style.module.scss +4 -0
- package/src/components/checkout/components/error/customer-login-required-error/index.tsx +23 -0
- package/src/components/checkout/components/error/index.tsx +54 -0
- package/src/components/checkout/components/error/no-shipping-error/index.tsx +14 -0
- package/src/components/checkout/components/error/payment-error/index.tsx +21 -0
- package/src/components/checkout/components/error/stock-error/index.tsx +72 -0
- package/src/components/checkout/components/error/stock-error/style.module.scss +11 -0
- package/src/components/checkout/components/error/unknown-error/index.tsx +19 -0
- package/src/components/checkout/components/expandable-section/index.tsx +37 -0
- package/src/components/checkout/components/expandable-section/style.module.scss +29 -0
- package/src/components/checkout/components/form-item/caret-down.tsx +20 -0
- package/src/components/checkout/components/form-item/index.tsx +207 -0
- package/src/components/checkout/components/form-item/model.ts +145 -0
- package/src/components/checkout/components/form-item/style.module.scss +216 -0
- package/src/components/checkout/components/fullscreen-loading/index.tsx +10 -0
- package/src/components/checkout/components/fullscreen-loading/style.module.scss +56 -0
- package/src/components/checkout/components/input-with-button/index.tsx +53 -0
- package/src/components/checkout/components/input-with-button/style.module.scss +104 -0
- package/src/components/checkout/components/master-pass/credit-card-form/index.tsx +160 -0
- package/src/components/checkout/components/master-pass/credit-card-form/style.module.scss +15 -0
- package/src/components/checkout/components/master-pass/modal/index.tsx +32 -0
- package/src/components/checkout/components/master-pass/modal/style.module.scss +42 -0
- package/src/components/checkout/components/master-pass/modal/svg/modal-close.tsx +20 -0
- package/src/components/checkout/components/master-pass/modal-link-card-to-client/index.tsx +62 -0
- package/src/components/checkout/components/master-pass/modal-link-card-to-client/style.module.scss +27 -0
- package/src/components/checkout/components/master-pass/modal-link-card-to-client/svg/info-mark.tsx +19 -0
- package/src/components/checkout/components/master-pass/modal-link-card-to-client/svg/master-pass-by-master-card-big.tsx +41 -0
- package/src/components/checkout/components/master-pass/modal-otp/index.tsx +202 -0
- package/src/components/checkout/components/master-pass/modal-otp/style.module.scss +47 -0
- package/src/components/checkout/components/master-pass/modal-otp/svg/master-pass.tsx +28 -0
- package/src/components/checkout/components/master-pass/modal-response/index.tsx +24 -0
- package/src/components/checkout/components/master-pass/modal-response/style.module.scss +7 -0
- package/src/components/checkout/components/master-pass/modal-success/index.tsx +54 -0
- package/src/components/checkout/components/master-pass/modal-success/style.module.scss +25 -0
- package/src/components/checkout/components/master-pass/modal-success/svg/master-pass-by-master-card-small.tsx +41 -0
- package/src/components/checkout/components/master-pass/modal-success/svg/success.tsx +21 -0
- package/src/components/checkout/components/master-pass/payment-gateway/svg/master-card.tsx +14 -0
- package/src/components/checkout/components/master-pass/svg/master-pass-by-master-card.tsx +34 -0
- package/src/components/checkout/components/modal/index.tsx +41 -0
- package/src/components/checkout/components/modal/style.module.scss +68 -0
- package/src/components/checkout/components/modal/useEscape.tsx +20 -0
- package/src/components/checkout/components/notification-box/index.tsx +70 -0
- package/src/components/checkout/components/notification-box/style.module.scss +69 -0
- package/src/components/checkout/components/offer-product/index.tsx +180 -0
- package/src/components/checkout/components/offer-product/select/arrows.tsx +22 -0
- package/src/components/checkout/components/offer-product/select/index.tsx +40 -0
- package/src/components/checkout/components/offer-product/select/style.module.scss +28 -0
- package/src/components/checkout/components/offer-product/style.module.scss +117 -0
- package/src/components/checkout/components/phone-number-input/compare-strings.ts +5 -0
- package/src/components/checkout/components/phone-number-input/get-countries.ts +52 -0
- package/src/components/checkout/components/phone-number-input/index.tsx +125 -0
- package/src/components/checkout/components/phone-number-input/style.module.scss +83 -0
- package/src/components/checkout/components/select-box/index.tsx +60 -0
- package/src/components/checkout/components/select-box/style.module.scss +55 -0
- package/src/components/checkout/components/step-container/index.tsx +107 -0
- package/src/components/checkout/components/step-container/style.module.scss +86 -0
- package/src/components/checkout/components/stripe/checkout-form.tsx +55 -0
- package/src/components/checkout/components/stripe/index.tsx +91 -0
- package/src/components/checkout/components/stripe/style.module.scss +75 -0
- package/src/components/checkout/components/svg/arrow-down.tsx +23 -0
- package/src/components/checkout/components/svg/arrow-left.tsx +23 -0
- package/src/components/checkout/components/svg/arrow-right.tsx +23 -0
- package/src/components/checkout/components/svg/cross.tsx +23 -0
- package/src/components/checkout/components/svg/discount.tsx +34 -0
- package/src/components/checkout/components/svg/external.tsx +101 -0
- package/src/components/checkout/components/svg/gift.tsx +40 -0
- package/src/components/checkout/components/svg/ikas.tsx +39 -0
- package/src/components/checkout/components/svg/lock.tsx +23 -0
- package/src/components/checkout/components/svg/shopping-cart.tsx +23 -0
- package/src/components/checkout/components/svg/success-circle.tsx +26 -0
- package/src/components/checkout/components/svg/tag.tsx +23 -0
- package/src/components/checkout/components/svg/warning.tsx +30 -0
- package/src/components/checkout/components/toggle/index.tsx +51 -0
- package/src/components/checkout/components/toggle/style.module.scss +75 -0
- package/src/components/checkout/components/tooltip/index.tsx +27 -0
- package/src/components/checkout/components/tooltip/style.module.scss +86 -0
- package/src/components/checkout/index.tsx +641 -0
- package/src/components/checkout/model.ts +1466 -0
- package/src/components/checkout/modelMasterPass.ts +1001 -0
- package/src/components/checkout/steps/step-info/index.tsx +85 -0
- package/src/components/checkout/steps/step-payment/billing-address/index.tsx +48 -0
- package/src/components/checkout/steps/step-payment/index.tsx +104 -0
- package/src/components/checkout/steps/step-payment/payment-gateways/index.tsx +218 -0
- package/src/components/checkout/steps/step-payment/payment-gateways/installments/index.tsx +54 -0
- package/src/components/checkout/steps/step-payment/payment-gateways/installments/style.module.scss +50 -0
- package/src/components/checkout/steps/step-payment/payment-gateways/style.module.scss +32 -0
- package/src/components/checkout/steps/step-payment/style.module.scss +32 -0
- package/src/components/checkout/steps/step-shipping/index.tsx +126 -0
- package/src/components/checkout/steps/step-shipping/style.module.scss +44 -0
- package/src/components/checkout/steps/step-success/index.tsx +366 -0
- package/src/components/checkout/steps/step-success/style.module.scss +161 -0
- package/src/components/checkout/style.module.scss +366 -0
- package/src/components/checkout/styles/common.module.scss +59 -0
- package/src/components/checkout/styles/variables.scss +40 -0
- package/src/components/image/index.tsx +43 -0
- package/src/components/index.ts +5 -0
- package/src/components/link/index.tsx +26 -0
- package/src/components/page/ThemeComponent.tsx +108 -0
- package/src/components/page/head.tsx +358 -0
- package/src/components/page/index.tsx +219 -0
- package/src/components/page-editor/ThemeComponentEditor.tsx +270 -0
- package/src/components/page-editor/error/index.tsx +18 -0
- package/src/components/page-editor/index.tsx +194 -0
- package/src/components/page-editor/loader/index.tsx +18 -0
- package/src/components/page-editor/loader/style.module.scss +59 -0
- package/src/components/page-editor/model.ts +847 -0
- package/src/index.ts +6 -0
- package/src/models/data/base/index.ts +15 -0
- package/src/models/data/blog/category/index.ts +36 -0
- package/src/models/data/blog/content/index.ts +16 -0
- package/src/models/data/blog/index.ts +75 -0
- package/src/models/data/blog/meta-data/index.ts +39 -0
- package/src/models/data/blog/tag/index.ts +16 -0
- package/src/models/data/blog/writer/index.ts +17 -0
- package/src/models/data/brand/index.ts +58 -0
- package/src/models/data/brand/translation/index.ts +16 -0
- package/src/models/data/campaign-offer/index.ts +79 -0
- package/src/models/data/campaign-offer/product/index.ts +69 -0
- package/src/models/data/cart/available-shipping-method/index.ts +25 -0
- package/src/models/data/cart/campaign-offer/index.ts +43 -0
- package/src/models/data/cart/index.ts +38 -0
- package/src/models/data/category/index.ts +69 -0
- package/src/models/data/category/init.ts +33 -0
- package/src/models/data/category/path-item/index.ts +42 -0
- package/src/models/data/category/translations/index.ts +16 -0
- package/src/models/data/checkout/index.ts +55 -0
- package/src/models/data/checkout-settings/index.ts +63 -0
- package/src/models/data/checkout-settings/option/index.ts +14 -0
- package/src/models/data/checkout-settings/price/index.ts +14 -0
- package/src/models/data/city/index.ts +34 -0
- package/src/models/data/contact-form/index.ts +20 -0
- package/src/models/data/country/index.ts +46 -0
- package/src/models/data/customer/address/city/index.ts +16 -0
- package/src/models/data/customer/address/country/index.ts +20 -0
- package/src/models/data/customer/address/district/index.ts +16 -0
- package/src/models/data/customer/address/index.tsx +136 -0
- package/src/models/data/customer/address/state/index.ts +16 -0
- package/src/models/data/customer/attribute/index.ts +61 -0
- package/src/models/data/customer/attribute/option/index.ts +20 -0
- package/src/models/data/customer/attribute/sales-channel/index.ts +24 -0
- package/src/models/data/customer/attribute/translation/index.ts +23 -0
- package/src/models/data/customer/attribute/translation/option/index.ts +16 -0
- package/src/models/data/customer/attribute/value/index.ts +29 -0
- package/src/models/data/customer/index.ts +122 -0
- package/src/models/data/customer/review/index.ts +70 -0
- package/src/models/data/customer/review/settings/index.ts +14 -0
- package/src/models/data/customer/review/summary/index.ts +29 -0
- package/src/models/data/customer/review/summary/star/index.ts +16 -0
- package/src/models/data/district/index.ts +36 -0
- package/src/models/data/favorite-product/index.ts +23 -0
- package/src/models/data/filter-category/index.ts +30 -0
- package/src/models/data/html-meta-data/index.ts +69 -0
- package/src/models/data/html-meta-data/translations/index.ts +16 -0
- package/src/models/data/image/index.ts +33 -0
- package/src/models/data/index.ts +192 -0
- package/src/models/data/last-viewed-product/index.ts +14 -0
- package/src/models/data/merchant-settings/index.ts +26 -0
- package/src/models/data/order/address/city/index.ts +16 -0
- package/src/models/data/order/address/country/index.ts +20 -0
- package/src/models/data/order/address/district/index.ts +16 -0
- package/src/models/data/order/address/index.ts +96 -0
- package/src/models/data/order/address/state/index.ts +16 -0
- package/src/models/data/order/adjustment/applied-order-line/index.ts +20 -0
- package/src/models/data/order/adjustment/index.ts +39 -0
- package/src/models/data/order/customer/index.ts +24 -0
- package/src/models/data/order/gift-line/index.ts +14 -0
- package/src/models/data/order/index.ts +241 -0
- package/src/models/data/order/invoice/index.ts +29 -0
- package/src/models/data/order/line-item/discount/index.ts +23 -0
- package/src/models/data/order/line-item/index.ts +153 -0
- package/src/models/data/order/line-item/option/index.ts +24 -0
- package/src/models/data/order/line-item/option/value/index.ts +16 -0
- package/src/models/data/order/line-item/variant/brand/index.ts +14 -0
- package/src/models/data/order/line-item/variant/category/index.ts +36 -0
- package/src/models/data/order/line-item/variant/index.ts +62 -0
- package/src/models/data/order/line-item/variant/price/index.ts +20 -0
- package/src/models/data/order/line-item/variant/value/index.ts +31 -0
- package/src/models/data/order/package/index.ts +41 -0
- package/src/models/data/order/package/tracking-info/index.ts +20 -0
- package/src/models/data/order/payment-method/index.ts +23 -0
- package/src/models/data/order/refund/index.ts +17 -0
- package/src/models/data/order/refund/line-item/index.ts +16 -0
- package/src/models/data/order/refund/settings/index.ts +16 -0
- package/src/models/data/order/shipping-line/index.ts +29 -0
- package/src/models/data/order/tax-line/index.ts +14 -0
- package/src/models/data/order/transaction/error/index.ts +16 -0
- package/src/models/data/order/transaction/index.ts +58 -0
- package/src/models/data/order/transaction/payment-method-detail/index.ts +33 -0
- package/src/models/data/order/transaction/payment-method-detail/installment-price/index.ts +22 -0
- package/src/models/data/payment-gateway/additional-price/index.ts +29 -0
- package/src/models/data/payment-gateway/index.ts +90 -0
- package/src/models/data/payment-gateway/settings/index.ts +21 -0
- package/src/models/data/payment-gateway/translation/index.ts +18 -0
- package/src/models/data/product/attribute/index.ts +37 -0
- package/src/models/data/product/attribute/option/index.ts +14 -0
- package/src/models/data/product/attribute/table-cell/index.ts +16 -0
- package/src/models/data/product/attribute/table-template/index.ts +19 -0
- package/src/models/data/product/attribute/translation/index.ts +39 -0
- package/src/models/data/product/attribute-value/index.ts +69 -0
- package/src/models/data/product/back-in-stock-settings/index.ts +14 -0
- package/src/models/data/product/campaign/data/index.ts +70 -0
- package/src/models/data/product/campaign/filter/index.ts +19 -0
- package/src/models/data/product/campaign/index.ts +15 -0
- package/src/models/data/product/campaign/product-buyx-then-gety/index.ts +57 -0
- package/src/models/data/product/campaign/product-campaign-date-range-field/index.ts +16 -0
- package/src/models/data/product/campaign/product-fixed-discount/index.ts +40 -0
- package/src/models/data/product/filter/index.ts +285 -0
- package/src/models/data/product/image/index.ts +22 -0
- package/src/models/data/product/index.ts +298 -0
- package/src/models/data/product/option-set/index.ts +94 -0
- package/src/models/data/product/option-set/option/index.ts +245 -0
- package/src/models/data/product/tag/index.ts +14 -0
- package/src/models/data/product/variant/index.ts +104 -0
- package/src/models/data/product/variant/price/index.ts +58 -0
- package/src/models/data/product/variant-type/index.ts +17 -0
- package/src/models/data/product/variant-type/init.ts +15 -0
- package/src/models/data/raffle/index.ts +155 -0
- package/src/models/data/sales-channel/index.ts +56 -0
- package/src/models/data/state/index.ts +18 -0
- package/src/models/data/stock-location/address/city/index.ts +16 -0
- package/src/models/data/stock-location/address/country/index.ts +18 -0
- package/src/models/data/stock-location/address/district/index.ts +18 -0
- package/src/models/data/stock-location/address/index.ts +34 -0
- package/src/models/data/stock-location/address/state/index.ts +18 -0
- package/src/models/data/stock-location/available/index.ts +22 -0
- package/src/models/data/stock-location/index.ts +35 -0
- package/src/models/data/storefront/domain/index.ts +20 -0
- package/src/models/data/storefront/index.ts +65 -0
- package/src/models/data/storefront/localization/index.tsx +18 -0
- package/src/models/data/storefront/routing/dynamic-currency/index.ts +16 -0
- package/src/models/data/storefront/routing/index.tsx +25 -0
- package/src/models/data/storefront/theme/index.tsx +25 -0
- package/src/models/data/storefront/theme-localization/index.tsx +31 -0
- package/src/models/data/theme-json/component/index.ts +41 -0
- package/src/models/data/theme-json/component/prop/index.ts +55 -0
- package/src/models/data/theme-json/custom-data/index.ts +132 -0
- package/src/models/data/theme-json/index.ts +210 -0
- package/src/models/data/theme-json/page/component/index.ts +22 -0
- package/src/models/data/theme-json/page/index.ts +54 -0
- package/src/models/data/theme-json/settings/color/index.ts +35 -0
- package/src/models/data/theme-json/settings/favicon/index.ts +12 -0
- package/src/models/data/theme-json/settings/font-family/index.ts +14 -0
- package/src/models/data/theme-json/settings/index.ts +30 -0
- package/src/models/data/variant-type/index.ts +44 -0
- package/src/models/data/variant-type/variant-value/index.ts +32 -0
- package/src/models/index.ts +2 -0
- package/src/models/ui/blog-category-list/index.ts +169 -0
- package/src/models/ui/blog-list/index.ts +175 -0
- package/src/models/ui/brand-list/index.ts +237 -0
- package/src/models/ui/category-list/index.ts +237 -0
- package/src/models/ui/component-renderer/index.ts +9 -0
- package/src/models/ui/customer-review-list/index.ts +173 -0
- package/src/models/ui/customer-review-summary-list/index.ts +175 -0
- package/src/models/ui/index.ts +40 -0
- package/src/models/ui/navigation-link/index.ts +23 -0
- package/src/models/ui/product-attribute-detail/index.ts +29 -0
- package/src/models/ui/product-attribute-list/index.ts +52 -0
- package/src/models/ui/product-list/index.ts +998 -0
- package/src/models/ui/raffle-list/index.ts +178 -0
- package/src/models/ui/validator/form/account-info.ts +167 -0
- package/src/models/ui/validator/form/address.ts +490 -0
- package/src/models/ui/validator/form/contact-form.ts +177 -0
- package/src/models/ui/validator/form/customer-review.ts +132 -0
- package/src/models/ui/validator/form/forgot-password.ts +96 -0
- package/src/models/ui/validator/form/login.ts +128 -0
- package/src/models/ui/validator/form/raffle-form.ts +276 -0
- package/src/models/ui/validator/form/recover-password.ts +148 -0
- package/src/models/ui/validator/form/register.ts +206 -0
- package/src/models/ui/validator/index.ts +121 -0
- package/src/models/ui/validator/rules/index.ts +310 -0
- package/src/page-data-init/index.ts +904 -0
- package/src/pages/404.tsx +10 -0
- package/src/pages/[slug]/index.tsx +9 -0
- package/src/pages/account/addresses.tsx +10 -0
- package/src/pages/account/favorite-products.tsx +9 -0
- package/src/pages/account/forgot-password.tsx +9 -0
- package/src/pages/account/index.tsx +9 -0
- package/src/pages/account/login.tsx +9 -0
- package/src/pages/account/orders/[id].tsx +9 -0
- package/src/pages/account/orders/index.tsx +9 -0
- package/src/pages/account/raffles.tsx +9 -0
- package/src/pages/account/recover-password.tsx +9 -0
- package/src/pages/account/register.tsx +9 -0
- package/src/pages/blog/[slug].tsx +9 -0
- package/src/pages/blog/index.tsx +9 -0
- package/src/pages/cart.tsx +9 -0
- package/src/pages/checkout.tsx +163 -0
- package/src/pages/editor.tsx +30 -0
- package/src/pages/home.tsx +10 -0
- package/src/pages/index.ts +22 -0
- package/src/pages/pages/[slug].tsx +9 -0
- package/src/pages/raffle/[slug].tsx +9 -0
- package/src/pages/raffle/index.tsx +9 -0
- package/src/pages/search.tsx +9 -0
- package/src/store/base.ts +238 -0
- package/src/store/blog/index.ts +49 -0
- package/src/store/brand/index.ts +16 -0
- package/src/store/cart/api.ts +58 -0
- package/src/store/cart/index.ts +311 -0
- package/src/store/category/index.ts +16 -0
- package/src/store/checkout/index.ts +92 -0
- package/src/store/customer/api.ts +273 -0
- package/src/store/customer/index.ts +658 -0
- package/src/store/html-meta-data/index.ts +16 -0
- package/src/store/index.ts +1 -0
- package/src/store/location/index.ts +56 -0
- package/src/store/merchant/index.ts +16 -0
- package/src/store/product/index.ts +113 -0
- package/src/store/raffle/index.ts +58 -0
- package/src/store/storefront/index.ts +18 -0
- package/src/typings/global.d.ts +7 -0
- package/src/utils/constants.ts +2 -0
- package/src/utils/currency.ts +250 -0
- package/src/utils/google-fonts.ts +52 -0
- package/src/utils/helper.ts +77 -0
- package/src/utils/i18n.ts +126 -0
- package/src/utils/index.ts +3 -0
- package/build/_virtual/_commonjsHelpers.js +0 -1
- package/build/_virtual/axios.js +0 -1
- package/build/_virtual/index.js +0 -1
- package/build/_virtual/index2.js +0 -1
- package/build/_virtual/index3.js +0 -1
- package/build/_virtual/react-is.development.js +0 -1
- package/build/_virtual/react-is.production.min.js +0 -1
- package/build/_virtual/react-stripe.umd.js +0 -1
- package/build/analytics/analytics.d.ts +0 -37
- package/build/analytics/analytics.js +0 -1
- package/build/analytics/events.d.ts +0 -37
- package/build/analytics/events.js +0 -1
- package/build/analytics/facebookPixel.d.ts +0 -15
- package/build/analytics/facebookPixel.js +0 -1
- package/build/analytics/googleAnalytics.d.ts +0 -13
- package/build/analytics/googleAnalytics.js +0 -1
- package/build/analytics/googleTagManager.d.ts +0 -203
- package/build/analytics/googleTagManager.js +0 -1
- package/build/analytics/googleUniversal.d.ts +0 -9
- package/build/analytics/googleUniversal.js +0 -1
- package/build/analytics/head/index.d.ts +0 -7
- package/build/analytics/head/index.js +0 -1
- package/build/analytics/ikas.d.ts +0 -134
- package/build/analytics/ikas.js +0 -1
- package/build/analytics/index.d.ts +0 -2
- package/build/analytics/tiktokPixel.d.ts +0 -13
- package/build/analytics/tiktokPixel.js +0 -1
- package/build/components/checkout/components/address-form/index.d.ts +0 -3
- package/build/components/checkout/components/address-form/index.js +0 -1
- package/build/components/checkout/components/address-form/model.d.ts +0 -87
- package/build/components/checkout/components/address-form/model.js +0 -1
- package/build/components/checkout/components/button/index.d.ts +0 -13
- package/build/components/checkout/components/button/index.js +0 -1
- package/build/components/checkout/components/button/style.module.scss.js +0 -1
- package/build/components/checkout/components/cart-summary/cart-item/index.d.ts +0 -10
- package/build/components/checkout/components/cart-summary/cart-item/index.js +0 -1
- package/build/components/checkout/components/cart-summary/cart-item/style.module.scss.js +0 -1
- package/build/components/checkout/components/cart-summary/index.d.ts +0 -8
- package/build/components/checkout/components/cart-summary/index.js +0 -1
- package/build/components/checkout/components/cart-summary/style.module.scss.js +0 -1
- package/build/components/checkout/components/checkbox/check.d.ts +0 -6
- package/build/components/checkout/components/checkbox/check.js +0 -1
- package/build/components/checkout/components/checkbox/index.d.ts +0 -10
- package/build/components/checkout/components/checkbox/index.js +0 -1
- package/build/components/checkout/components/checkbox/style.module.scss.js +0 -1
- package/build/components/checkout/components/credit-card-form/index.d.ts +0 -7
- package/build/components/checkout/components/credit-card-form/index.js +0 -1
- package/build/components/checkout/components/credit-card-form/model.d.ts +0 -26
- package/build/components/checkout/components/credit-card-form/model.js +0 -1
- package/build/components/checkout/components/credit-card-form/style.module.scss.js +0 -1
- package/build/components/checkout/components/credit-card-form/svg/amex.d.ts +0 -6
- package/build/components/checkout/components/credit-card-form/svg/amex.js +0 -1
- package/build/components/checkout/components/credit-card-form/svg/master-card.d.ts +0 -6
- package/build/components/checkout/components/credit-card-form/svg/master-card.js +0 -1
- package/build/components/checkout/components/credit-card-form/svg/troy.d.ts +0 -6
- package/build/components/checkout/components/credit-card-form/svg/troy.js +0 -1
- package/build/components/checkout/components/credit-card-form/svg/visa.d.ts +0 -6
- package/build/components/checkout/components/credit-card-form/svg/visa.js +0 -1
- package/build/components/checkout/components/customer-addresses/index.d.ts +0 -19
- package/build/components/checkout/components/customer-addresses/index.js +0 -1
- package/build/components/checkout/components/customer-addresses/model.d.ts +0 -21
- package/build/components/checkout/components/customer-addresses/model.js +0 -1
- package/build/components/checkout/components/customer-addresses/style.module.scss.js +0 -1
- package/build/components/checkout/components/delivery-methods/icon-button/index.d.ts +0 -10
- package/build/components/checkout/components/delivery-methods/icon-button/index.js +0 -1
- package/build/components/checkout/components/delivery-methods/icon-button/style.module.scss.js +0 -1
- package/build/components/checkout/components/delivery-methods/icons/box.d.ts +0 -6
- package/build/components/checkout/components/delivery-methods/icons/box.js +0 -1
- package/build/components/checkout/components/delivery-methods/icons/store.d.ts +0 -6
- package/build/components/checkout/components/delivery-methods/icons/store.js +0 -1
- package/build/components/checkout/components/delivery-methods/index.d.ts +0 -7
- package/build/components/checkout/components/delivery-methods/index.js +0 -1
- package/build/components/checkout/components/delivery-methods/style.module.scss.js +0 -1
- package/build/components/checkout/components/error/customer-login-required-error/index.d.ts +0 -8
- package/build/components/checkout/components/error/customer-login-required-error/index.js +0 -1
- package/build/components/checkout/components/error/index.d.ts +0 -7
- package/build/components/checkout/components/error/index.js +0 -1
- package/build/components/checkout/components/error/no-shipping-error/index.d.ts +0 -3
- package/build/components/checkout/components/error/no-shipping-error/index.js +0 -1
- package/build/components/checkout/components/error/payment-error/index.d.ts +0 -8
- package/build/components/checkout/components/error/payment-error/index.js +0 -1
- package/build/components/checkout/components/error/stock-error/index.d.ts +0 -8
- package/build/components/checkout/components/error/stock-error/index.js +0 -1
- package/build/components/checkout/components/error/stock-error/style.module.scss.js +0 -1
- package/build/components/checkout/components/error/unknown-error/index.d.ts +0 -8
- package/build/components/checkout/components/error/unknown-error/index.js +0 -1
- package/build/components/checkout/components/expandable-section/index.d.ts +0 -6
- package/build/components/checkout/components/expandable-section/index.js +0 -1
- package/build/components/checkout/components/expandable-section/style.module.scss.js +0 -1
- package/build/components/checkout/components/form-item/caret-down.d.ts +0 -6
- package/build/components/checkout/components/form-item/caret-down.js +0 -1
- package/build/components/checkout/components/form-item/index.d.ts +0 -3
- package/build/components/checkout/components/form-item/index.js +0 -1
- package/build/components/checkout/components/form-item/model.d.ts +0 -61
- package/build/components/checkout/components/form-item/model.js +0 -1
- package/build/components/checkout/components/form-item/style.module.scss.js +0 -1
- package/build/components/checkout/components/fullscreen-loading/index.d.ts +0 -2
- package/build/components/checkout/components/fullscreen-loading/index.js +0 -1
- package/build/components/checkout/components/fullscreen-loading/style.module.scss.js +0 -1
- package/build/components/checkout/components/input-with-button/index.d.ts +0 -11
- package/build/components/checkout/components/input-with-button/index.js +0 -1
- package/build/components/checkout/components/input-with-button/style.module.scss.js +0 -1
- package/build/components/checkout/components/klarna/index.d.ts +0 -9
- package/build/components/checkout/components/klarna/index.js +0 -1
- package/build/components/checkout/components/master-pass/credit-card-form/index.d.ts +0 -8
- package/build/components/checkout/components/master-pass/credit-card-form/index.js +0 -1
- package/build/components/checkout/components/master-pass/credit-card-form/style.module.scss.js +0 -1
- package/build/components/checkout/components/master-pass/modal/index.d.ts +0 -11
- package/build/components/checkout/components/master-pass/modal/index.js +0 -1
- package/build/components/checkout/components/master-pass/modal/style.module.scss.js +0 -1
- package/build/components/checkout/components/master-pass/modal/svg/modal-close.d.ts +0 -2
- package/build/components/checkout/components/master-pass/modal/svg/modal-close.js +0 -1
- package/build/components/checkout/components/master-pass/modal-link-card-to-client/index.d.ts +0 -10
- package/build/components/checkout/components/master-pass/modal-link-card-to-client/index.js +0 -1
- package/build/components/checkout/components/master-pass/modal-link-card-to-client/style.module.scss.js +0 -1
- package/build/components/checkout/components/master-pass/modal-link-card-to-client/svg/info-mark.d.ts +0 -2
- package/build/components/checkout/components/master-pass/modal-link-card-to-client/svg/info-mark.js +0 -1
- package/build/components/checkout/components/master-pass/modal-link-card-to-client/svg/master-pass-by-master-card-big.d.ts +0 -2
- package/build/components/checkout/components/master-pass/modal-link-card-to-client/svg/master-pass-by-master-card-big.js +0 -1
- package/build/components/checkout/components/master-pass/modal-otp/index.d.ts +0 -10
- package/build/components/checkout/components/master-pass/modal-otp/index.js +0 -1
- package/build/components/checkout/components/master-pass/modal-otp/style.module.scss.js +0 -1
- package/build/components/checkout/components/master-pass/modal-otp/svg/master-pass.d.ts +0 -2
- package/build/components/checkout/components/master-pass/modal-otp/svg/master-pass.js +0 -1
- package/build/components/checkout/components/master-pass/modal-response/index.d.ts +0 -9
- package/build/components/checkout/components/master-pass/modal-response/index.js +0 -1
- package/build/components/checkout/components/master-pass/modal-response/style.module.scss.js +0 -1
- package/build/components/checkout/components/master-pass/modal-success/index.d.ts +0 -10
- package/build/components/checkout/components/master-pass/modal-success/index.js +0 -1
- package/build/components/checkout/components/master-pass/modal-success/style.module.scss.js +0 -1
- package/build/components/checkout/components/master-pass/modal-success/svg/master-pass-by-master-card-small.d.ts +0 -2
- package/build/components/checkout/components/master-pass/modal-success/svg/master-pass-by-master-card-small.js +0 -1
- package/build/components/checkout/components/master-pass/modal-success/svg/success.d.ts +0 -2
- package/build/components/checkout/components/master-pass/modal-success/svg/success.js +0 -1
- package/build/components/checkout/components/master-pass/payment-gateway/svg/master-card.d.ts +0 -2
- package/build/components/checkout/components/master-pass/payment-gateway/svg/master-card.js +0 -1
- package/build/components/checkout/components/master-pass/svg/master-pass-by-master-card.d.ts +0 -3
- package/build/components/checkout/components/master-pass/svg/master-pass-by-master-card.js +0 -1
- package/build/components/checkout/components/modal/index.d.ts +0 -8
- package/build/components/checkout/components/modal/index.js +0 -1
- package/build/components/checkout/components/modal/style.module.scss.js +0 -1
- package/build/components/checkout/components/modal/useEscape.d.ts +0 -5
- package/build/components/checkout/components/modal/useEscape.js +0 -1
- package/build/components/checkout/components/notification-box/index.d.ts +0 -9
- package/build/components/checkout/components/notification-box/index.js +0 -1
- package/build/components/checkout/components/notification-box/style.module.scss.js +0 -1
- package/build/components/checkout/components/offer-product/index.d.ts +0 -8
- package/build/components/checkout/components/offer-product/index.js +0 -1
- package/build/components/checkout/components/offer-product/select/arrows.d.ts +0 -6
- package/build/components/checkout/components/offer-product/select/arrows.js +0 -1
- package/build/components/checkout/components/offer-product/select/index.d.ts +0 -11
- package/build/components/checkout/components/offer-product/select/index.js +0 -1
- package/build/components/checkout/components/offer-product/select/style.module.scss.js +0 -1
- package/build/components/checkout/components/offer-product/style.module.scss.js +0 -1
- package/build/components/checkout/components/phone-number-input/compare-strings.d.ts +0 -2
- package/build/components/checkout/components/phone-number-input/compare-strings.js +0 -1
- package/build/components/checkout/components/phone-number-input/get-countries.d.ts +0 -7
- package/build/components/checkout/components/phone-number-input/get-countries.js +0 -1
- package/build/components/checkout/components/phone-number-input/index.d.ts +0 -10
- package/build/components/checkout/components/phone-number-input/index.js +0 -1
- package/build/components/checkout/components/phone-number-input/style.module.scss.js +0 -1
- package/build/components/checkout/components/select-box/index.d.ts +0 -13
- package/build/components/checkout/components/select-box/index.js +0 -1
- package/build/components/checkout/components/select-box/style.module.scss.js +0 -1
- package/build/components/checkout/components/step-container/index.d.ts +0 -15
- package/build/components/checkout/components/step-container/index.js +0 -1
- package/build/components/checkout/components/step-container/style.module.scss.js +0 -1
- package/build/components/checkout/components/stripe/checkout-form.d.ts +0 -8
- package/build/components/checkout/components/stripe/checkout-form.js +0 -1
- package/build/components/checkout/components/stripe/index.d.ts +0 -9
- package/build/components/checkout/components/stripe/index.js +0 -1
- package/build/components/checkout/components/stripe/style.module.scss.js +0 -1
- package/build/components/checkout/components/svg/arrow-down.d.ts +0 -6
- package/build/components/checkout/components/svg/arrow-down.js +0 -1
- package/build/components/checkout/components/svg/arrow-left.d.ts +0 -6
- package/build/components/checkout/components/svg/arrow-right.d.ts +0 -6
- package/build/components/checkout/components/svg/cross.d.ts +0 -6
- package/build/components/checkout/components/svg/cross.js +0 -1
- package/build/components/checkout/components/svg/discount.d.ts +0 -6
- package/build/components/checkout/components/svg/external.d.ts +0 -6
- package/build/components/checkout/components/svg/external.js +0 -1
- package/build/components/checkout/components/svg/gift.d.ts +0 -7
- package/build/components/checkout/components/svg/gift.js +0 -1
- package/build/components/checkout/components/svg/ikas.d.ts +0 -6
- package/build/components/checkout/components/svg/ikas.js +0 -1
- package/build/components/checkout/components/svg/lock.d.ts +0 -6
- package/build/components/checkout/components/svg/lock.js +0 -1
- package/build/components/checkout/components/svg/shopping-cart.d.ts +0 -6
- package/build/components/checkout/components/svg/success-circle.d.ts +0 -6
- package/build/components/checkout/components/svg/success-circle.js +0 -1
- package/build/components/checkout/components/svg/tag.d.ts +0 -6
- package/build/components/checkout/components/svg/warning.d.ts +0 -6
- package/build/components/checkout/components/svg/warning.js +0 -1
- package/build/components/checkout/components/toggle/index.d.ts +0 -10
- package/build/components/checkout/components/toggle/index.js +0 -1
- package/build/components/checkout/components/toggle/style.module.scss.js +0 -1
- package/build/components/checkout/components/tooltip/index.d.ts +0 -8
- package/build/components/checkout/components/tooltip/index.js +0 -1
- package/build/components/checkout/components/tooltip/style.module.scss.js +0 -1
- package/build/components/checkout/index.d.ts +0 -32
- package/build/components/checkout/index.js +0 -1
- package/build/components/checkout/model.d.ts +0 -165
- package/build/components/checkout/model.js +0 -1
- package/build/components/checkout/modelMasterPass.d.ts +0 -201
- package/build/components/checkout/modelMasterPass.js +0 -1
- package/build/components/checkout/steps/step-info/index.d.ts +0 -7
- package/build/components/checkout/steps/step-info/index.js +0 -1
- package/build/components/checkout/steps/step-payment/billing-address/index.d.ts +0 -7
- package/build/components/checkout/steps/step-payment/billing-address/index.js +0 -1
- package/build/components/checkout/steps/step-payment/index.d.ts +0 -7
- package/build/components/checkout/steps/step-payment/index.js +0 -1
- package/build/components/checkout/steps/step-payment/payment-gateways/index.d.ts +0 -7
- package/build/components/checkout/steps/step-payment/payment-gateways/index.js +0 -1
- package/build/components/checkout/steps/step-payment/payment-gateways/installments/index.d.ts +0 -7
- package/build/components/checkout/steps/step-payment/payment-gateways/installments/index.js +0 -1
- package/build/components/checkout/steps/step-payment/payment-gateways/installments/style.module.scss.js +0 -1
- package/build/components/checkout/steps/step-payment/payment-gateways/style.module.scss.js +0 -1
- package/build/components/checkout/steps/step-payment/style.module.scss.js +0 -1
- package/build/components/checkout/steps/step-shipping/index.d.ts +0 -7
- package/build/components/checkout/steps/step-shipping/index.js +0 -1
- package/build/components/checkout/steps/step-shipping/style.module.scss.js +0 -1
- package/build/components/checkout/steps/step-success/index.d.ts +0 -7
- package/build/components/checkout/steps/step-success/index.js +0 -1
- package/build/components/checkout/steps/step-success/style.module.scss.js +0 -1
- package/build/components/checkout/style.module.scss.js +0 -1
- package/build/components/checkout/styles/common.module.scss.js +0 -1
- package/build/components/google-captcha/index.d.ts +0 -9
- package/build/components/google-captcha/index.js +0 -1
- package/build/components/image/index.d.ts +0 -10
- package/build/components/image/index.js +0 -1
- package/build/components/index.d.ts +0 -6
- package/build/components/link/index.d.ts +0 -16
- package/build/components/link/index.js +0 -1
- package/build/components/page/ThemeComponent.d.ts +0 -21
- package/build/components/page/ThemeComponent.js +0 -1
- package/build/components/page/head.d.ts +0 -15
- package/build/components/page/head.js +0 -1
- package/build/components/page/index.d.ts +0 -21
- package/build/components/page/index.js +0 -1
- package/build/components/page-editor/ThemeComponentEditor.d.ts +0 -32
- package/build/components/page-editor/ThemeComponentEditor.js +0 -1
- package/build/components/page-editor/error/index.d.ts +0 -4
- package/build/components/page-editor/error/index.js +0 -1
- package/build/components/page-editor/index.d.ts +0 -4
- package/build/components/page-editor/index.js +0 -1
- package/build/components/page-editor/loader/index.d.ts +0 -6
- package/build/components/page-editor/loader/index.js +0 -1
- package/build/components/page-editor/loader/style.module.scss.js +0 -1
- package/build/components/page-editor/model.d.ts +0 -75
- package/build/components/page-editor/model.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/_virtual/_commonjsHelpers.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/_virtual/axios-error-format.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/_virtual/core.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/_virtual/index.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/@redtea/format-axios-error/axios-error-format.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/@redtea/format-axios-error/core.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/@redtea/format-axios-error/index.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/@redtea/format-axios-error/index.mjs.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_Hash.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_ListCache.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_Map.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_MapCache.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_Symbol.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_assocIndexOf.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_baseGetTag.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_baseIsNative.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_baseToString.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_coreJsData.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_defineProperty.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_freeGlobal.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_getMapData.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_getNative.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_getRawTag.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_getValue.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_hashClear.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_hashDelete.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_hashGet.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_hashHas.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_hashSet.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_isKeyable.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_isMasked.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_listCacheClear.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_listCacheDelete.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_listCacheGet.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_listCacheHas.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_listCacheSet.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_mapCacheClear.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_mapCacheDelete.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_mapCacheGet.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_mapCacheHas.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_mapCacheSet.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_memoizeCapped.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_nativeCreate.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_objectToString.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_root.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_stringToPath.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_toSource.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/eq.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/isFunction.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/isObject.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/memoize.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/utils/api.js +0 -1
- package/build/ext/@stripe/react-stripe-js/dist/react-stripe.umd.js +0 -1
- package/build/ext/@stripe/stripe-js/dist/stripe.esm.js +0 -1
- package/build/ext/axios/index.js +0 -1
- package/build/ext/axios/lib/adapters/xhr.js +0 -1
- package/build/ext/axios/lib/axios.js +0 -1
- package/build/ext/axios/lib/cancel/Cancel.js +0 -1
- package/build/ext/axios/lib/cancel/CancelToken.js +0 -1
- package/build/ext/axios/lib/cancel/isCancel.js +0 -1
- package/build/ext/axios/lib/core/Axios.js +0 -1
- package/build/ext/axios/lib/core/InterceptorManager.js +0 -1
- package/build/ext/axios/lib/core/buildFullPath.js +0 -1
- package/build/ext/axios/lib/core/createError.js +0 -1
- package/build/ext/axios/lib/core/dispatchRequest.js +0 -1
- package/build/ext/axios/lib/core/enhanceError.js +0 -1
- package/build/ext/axios/lib/core/mergeConfig.js +0 -1
- package/build/ext/axios/lib/core/settle.js +0 -1
- package/build/ext/axios/lib/core/transformData.js +0 -1
- package/build/ext/axios/lib/defaults/index.js +0 -1
- package/build/ext/axios/lib/defaults/transitional.js +0 -1
- package/build/ext/axios/lib/env/data.js +0 -1
- package/build/ext/axios/lib/helpers/bind.js +0 -1
- package/build/ext/axios/lib/helpers/buildURL.js +0 -1
- package/build/ext/axios/lib/helpers/combineURLs.js +0 -1
- package/build/ext/axios/lib/helpers/cookies.js +0 -1
- package/build/ext/axios/lib/helpers/isAbsoluteURL.js +0 -1
- package/build/ext/axios/lib/helpers/isAxiosError.js +0 -1
- package/build/ext/axios/lib/helpers/isURLSameOrigin.js +0 -1
- package/build/ext/axios/lib/helpers/normalizeHeaderName.js +0 -1
- package/build/ext/axios/lib/helpers/parseHeaders.js +0 -1
- package/build/ext/axios/lib/helpers/spread.js +0 -1
- package/build/ext/axios/lib/helpers/validator.js +0 -1
- package/build/ext/axios/lib/utils.js +0 -1
- package/build/ext/libphonenumber-js/es6/AsYouType.js +0 -1
- package/build/ext/libphonenumber-js/es6/AsYouTypeFormatter.PatternMatcher.js +0 -1
- package/build/ext/libphonenumber-js/es6/AsYouTypeFormatter.complete.js +0 -1
- package/build/ext/libphonenumber-js/es6/AsYouTypeFormatter.js +0 -1
- package/build/ext/libphonenumber-js/es6/AsYouTypeFormatter.util.js +0 -1
- package/build/ext/libphonenumber-js/es6/AsYouTypeParser.js +0 -1
- package/build/ext/libphonenumber-js/es6/AsYouTypeState.js +0 -1
- package/build/ext/libphonenumber-js/es6/ParseError.js +0 -1
- package/build/ext/libphonenumber-js/es6/PhoneNumber.js +0 -1
- package/build/ext/libphonenumber-js/es6/PhoneNumberMatcher.js +0 -1
- package/build/ext/libphonenumber-js/es6/constants.js +0 -1
- package/build/ext/libphonenumber-js/es6/findNumbers/LRUCache.js +0 -1
- package/build/ext/libphonenumber-js/es6/findNumbers/Leniency.js +0 -1
- package/build/ext/libphonenumber-js/es6/findNumbers/RegExpCache.js +0 -1
- package/build/ext/libphonenumber-js/es6/findNumbers/isValidCandidate.js +0 -1
- package/build/ext/libphonenumber-js/es6/findNumbers/isValidPreCandidate.js +0 -1
- package/build/ext/libphonenumber-js/es6/findNumbers/parsePreCandidate.js +0 -1
- package/build/ext/libphonenumber-js/es6/findNumbers/utf-8.js +0 -1
- package/build/ext/libphonenumber-js/es6/findNumbers/util.js +0 -1
- package/build/ext/libphonenumber-js/es6/findPhoneNumbers_.js +0 -1
- package/build/ext/libphonenumber-js/es6/formatIncompletePhoneNumber.js +0 -1
- package/build/ext/libphonenumber-js/es6/format_.js +0 -1
- package/build/ext/libphonenumber-js/es6/getCountries.js +0 -1
- package/build/ext/libphonenumber-js/es6/helpers/RFC3966.js +0 -1
- package/build/ext/libphonenumber-js/es6/helpers/applyInternationalSeparatorStyle.js +0 -1
- package/build/ext/libphonenumber-js/es6/helpers/checkNumberLength.js +0 -1
- package/build/ext/libphonenumber-js/es6/helpers/extension/createExtensionPattern.js +0 -1
- package/build/ext/libphonenumber-js/es6/helpers/extension/extractExtension.js +0 -1
- package/build/ext/libphonenumber-js/es6/helpers/extractCountryCallingCode.js +0 -1
- package/build/ext/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js +0 -1
- package/build/ext/libphonenumber-js/es6/helpers/extractNationalNumber.js +0 -1
- package/build/ext/libphonenumber-js/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js +0 -1
- package/build/ext/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.js +0 -1
- package/build/ext/libphonenumber-js/es6/helpers/getCountryByCallingCode.js +0 -1
- package/build/ext/libphonenumber-js/es6/helpers/getIddPrefix.js +0 -1
- package/build/ext/libphonenumber-js/es6/helpers/getNumberType.js +0 -1
- package/build/ext/libphonenumber-js/es6/helpers/isViablePhoneNumber.js +0 -1
- package/build/ext/libphonenumber-js/es6/helpers/matchesEntirely.js +0 -1
- package/build/ext/libphonenumber-js/es6/helpers/mergeArrays.js +0 -1
- package/build/ext/libphonenumber-js/es6/helpers/parseDigits.js +0 -1
- package/build/ext/libphonenumber-js/es6/helpers/stripIddPrefix.js +0 -1
- package/build/ext/libphonenumber-js/es6/isPossibleNumber_.js +0 -1
- package/build/ext/libphonenumber-js/es6/metadata.js +0 -1
- package/build/ext/libphonenumber-js/es6/parseIncompletePhoneNumber.js +0 -1
- package/build/ext/libphonenumber-js/es6/parsePhoneNumber.js +0 -1
- package/build/ext/libphonenumber-js/es6/parsePhoneNumberFromString.js +0 -1
- package/build/ext/libphonenumber-js/es6/parsePhoneNumberFromString_.js +0 -1
- package/build/ext/libphonenumber-js/es6/parsePhoneNumber_.js +0 -1
- package/build/ext/libphonenumber-js/es6/parse_.js +0 -1
- package/build/ext/libphonenumber-js/es6/tools/semver-compare.js +0 -1
- package/build/ext/libphonenumber-js/es6/validate_.js +0 -1
- package/build/ext/libphonenumber-js/index.es6.exports/PhoneNumberSearch.js +0 -1
- package/build/ext/libphonenumber-js/metadata.min.json.js +0 -1
- package/build/ext/libphonenumber-js/min/exports/AsYouType.js +0 -1
- package/build/ext/libphonenumber-js/min/exports/Metadata.js +0 -1
- package/build/ext/libphonenumber-js/min/exports/PhoneNumberMatcher.js +0 -1
- package/build/ext/libphonenumber-js/min/exports/formatIncompletePhoneNumber.js +0 -1
- package/build/ext/libphonenumber-js/min/exports/getCountries.js +0 -1
- package/build/ext/libphonenumber-js/min/exports/getCountryCallingCode.js +0 -1
- package/build/ext/libphonenumber-js/min/exports/parsePhoneNumberFromString.js +0 -1
- package/build/ext/libphonenumber-js/min/exports/withMetadataArgument.js +0 -1
- package/build/ext/object-assign/index.js +0 -6
- package/build/ext/prop-types/checkPropTypes.js +0 -1
- package/build/ext/prop-types/factoryWithThrowingShims.js +0 -1
- package/build/ext/prop-types/factoryWithTypeCheckers.js +0 -1
- package/build/ext/prop-types/index.js +0 -1
- package/build/ext/prop-types/lib/ReactPropTypesSecret.js +0 -1
- package/build/ext/prop-types/lib/has.js +0 -1
- package/build/ext/react-is/cjs/react-is.development.js +0 -9
- package/build/ext/react-is/cjs/react-is.production.min.js +0 -9
- package/build/ext/react-is/index.js +0 -1
- package/build/ext/react-tooltip/dist/index.es.js +0 -1
- package/build/ext/style-inject/dist/style-inject.es.js +0 -1
- package/build/ext/tslib/tslib.es6.js +0 -1
- package/build/ext/uuid/dist/esm-browser/bytesToUuid.js +0 -1
- package/build/ext/uuid/dist/esm-browser/md5.js +0 -1
- package/build/ext/uuid/dist/esm-browser/rng.js +0 -1
- package/build/ext/uuid/dist/esm-browser/sha1.js +0 -1
- package/build/ext/uuid/dist/esm-browser/v3.js +0 -1
- package/build/ext/uuid/dist/esm-browser/v35.js +0 -1
- package/build/ext/uuid/dist/esm-browser/v4.js +0 -1
- package/build/ext/uuid/dist/esm-browser/v5.js +0 -1
- package/build/index.d.ts +0 -6
- package/build/index.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 -24
- 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 -13
- 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/index.d.ts +0 -22
- package/build/models/data/checkout/index.js +0 -1
- package/build/models/data/checkout-settings/index.d.ts +0 -20
- 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/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 -17
- 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 -22
- 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 -9
- package/build/models/data/image/index.js +0 -1
- package/build/models/data/index.d.ts +0 -136
- 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/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 -67
- 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 -45
- 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 -7
- 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 -30
- 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/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 -14
- 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 -25
- 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 -84
- 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 -62
- 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 -72
- package/build/models/data/product/option-set/option/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/product/variant-type/init.d.ts +0 -2
- 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 -8
- package/build/models/data/state/index.js +0 -1
- 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 -27
- 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/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 -13
- package/build/models/data/storefront/theme-localization/index.js +0 -1
- package/build/models/data/theme-json/component/index.d.ts +0 -20
- package/build/models/data/theme-json/component/index.js +0 -1
- package/build/models/data/theme-json/component/prop/index.d.ts +0 -26
- package/build/models/data/theme-json/component/prop/index.js +0 -1
- package/build/models/data/theme-json/custom-data/index.d.ts +0 -43
- package/build/models/data/theme-json/custom-data/index.js +0 -1
- package/build/models/data/theme-json/index.d.ts +0 -16
- package/build/models/data/theme-json/index.js +0 -1
- package/build/models/data/theme-json/page/component/index.d.ts +0 -7
- package/build/models/data/theme-json/page/component/index.js +0 -1
- package/build/models/data/theme-json/page/index.d.ts +0 -21
- package/build/models/data/theme-json/page/index.js +0 -1
- package/build/models/data/theme-json/settings/color/index.d.ts +0 -15
- package/build/models/data/theme-json/settings/color/index.js +0 -1
- package/build/models/data/theme-json/settings/favicon/index.d.ts +0 -5
- package/build/models/data/theme-json/settings/favicon/index.js +0 -1
- package/build/models/data/theme-json/settings/font-family/index.d.ts +0 -6
- package/build/models/data/theme-json/settings/font-family/index.js +0 -1
- package/build/models/data/theme-json/settings/index.d.ts +0 -13
- package/build/models/data/theme-json/settings/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/index.d.ts +0 -2
- package/build/models/ui/blog-category-list/index.d.ts +0 -51
- package/build/models/ui/blog-category-list/index.js +0 -1
- package/build/models/ui/blog-list/index.d.ts +0 -55
- package/build/models/ui/blog-list/index.js +0 -1
- package/build/models/ui/brand-list/index.d.ts +0 -61
- package/build/models/ui/brand-list/index.js +0 -1
- package/build/models/ui/category-list/index.d.ts +0 -61
- package/build/models/ui/category-list/index.js +0 -1
- package/build/models/ui/component-renderer/index.d.ts +0 -7
- package/build/models/ui/component-renderer/index.js +0 -1
- package/build/models/ui/customer-review-list/index.d.ts +0 -43
- package/build/models/ui/customer-review-list/index.js +0 -1
- package/build/models/ui/customer-review-summary-list/index.d.ts +0 -43
- package/build/models/ui/customer-review-summary-list/index.js +0 -1
- package/build/models/ui/index.d.ts +0 -25
- package/build/models/ui/navigation-link/index.d.ts +0 -8
- package/build/models/ui/navigation-link/index.js +0 -1
- package/build/models/ui/product-attribute-detail/index.d.ts +0 -8
- package/build/models/ui/product-attribute-detail/index.js +0 -1
- package/build/models/ui/product-attribute-list/index.d.ts +0 -8
- package/build/models/ui/product-attribute-list/index.js +0 -1
- package/build/models/ui/product-list/index.d.ts +0 -138
- package/build/models/ui/product-list/index.js +0 -1
- package/build/models/ui/raffle-list/index.d.ts +0 -53
- package/build/models/ui/raffle-list/index.js +0 -1
- package/build/models/ui/validator/form/account-info.d.ts +0 -39
- package/build/models/ui/validator/form/account-info.js +0 -1
- package/build/models/ui/validator/form/address.d.ts +0 -75
- package/build/models/ui/validator/form/address.js +0 -1
- package/build/models/ui/validator/form/contact-form.d.ts +0 -42
- package/build/models/ui/validator/form/contact-form.js +0 -1
- package/build/models/ui/validator/form/customer-review.d.ts +0 -34
- package/build/models/ui/validator/form/customer-review.js +0 -1
- package/build/models/ui/validator/form/forgot-password.d.ts +0 -26
- package/build/models/ui/validator/form/forgot-password.js +0 -1
- package/build/models/ui/validator/form/login.d.ts +0 -32
- package/build/models/ui/validator/form/login.js +0 -1
- package/build/models/ui/validator/form/raffle-form.d.ts +0 -62
- package/build/models/ui/validator/form/raffle-form.js +0 -1
- package/build/models/ui/validator/form/recover-password.d.ts +0 -33
- package/build/models/ui/validator/form/recover-password.js +0 -1
- package/build/models/ui/validator/form/register.d.ts +0 -49
- package/build/models/ui/validator/form/register.js +0 -1
- package/build/models/ui/validator/index.d.ts +0 -27
- package/build/models/ui/validator/index.js +0 -1
- package/build/models/ui/validator/rules/index.d.ts +0 -101
- package/build/models/ui/validator/rules/index.js +0 -1
- package/build/page-data-init/index.d.ts +0 -39
- package/build/page-data-init/index.js +0 -1
- package/build/pages/404.d.ts +0 -4
- package/build/pages/404.js +0 -1
- package/build/pages/[slug]/index.d.ts +0 -4
- package/build/pages/_slug_/index.js +0 -1
- package/build/pages/account/addresses.d.ts +0 -4
- package/build/pages/account/addresses.js +0 -1
- package/build/pages/account/favorite-products.d.ts +0 -4
- package/build/pages/account/favorite-products.js +0 -1
- package/build/pages/account/forgot-password.d.ts +0 -4
- package/build/pages/account/forgot-password.js +0 -1
- package/build/pages/account/index.d.ts +0 -4
- package/build/pages/account/index.js +0 -1
- package/build/pages/account/login.d.ts +0 -4
- package/build/pages/account/login.js +0 -1
- package/build/pages/account/orders/[id].d.ts +0 -4
- package/build/pages/account/orders/_id_.js +0 -1
- package/build/pages/account/orders/index.d.ts +0 -4
- package/build/pages/account/orders/index.js +0 -1
- package/build/pages/account/raffles.d.ts +0 -4
- package/build/pages/account/raffles.js +0 -1
- package/build/pages/account/recover-password.d.ts +0 -4
- package/build/pages/account/recover-password.js +0 -1
- package/build/pages/account/register.d.ts +0 -4
- package/build/pages/account/register.js +0 -1
- package/build/pages/blog/[slug].d.ts +0 -4
- package/build/pages/blog/_slug_.js +0 -1
- package/build/pages/blog/index.d.ts +0 -4
- package/build/pages/blog/index.js +0 -1
- package/build/pages/cart.d.ts +0 -4
- package/build/pages/cart.js +0 -1
- package/build/pages/checkout.d.ts +0 -16
- package/build/pages/checkout.js +0 -1
- package/build/pages/editor.d.ts +0 -10
- package/build/pages/editor.js +0 -1
- package/build/pages/home.d.ts +0 -4
- package/build/pages/home.js +0 -1
- package/build/pages/index.d.ts +0 -22
- package/build/pages/pages/[slug].d.ts +0 -4
- package/build/pages/pages/_slug_.js +0 -1
- package/build/pages/raffle/[slug].d.ts +0 -4
- package/build/pages/raffle/_slug_.js +0 -1
- package/build/pages/raffle/index.d.ts +0 -4
- package/build/pages/raffle/index.js +0 -1
- package/build/pages/search.d.ts +0 -4
- package/build/pages/search.js +0 -1
- package/build/store/base.d.ts +0 -44
- 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/cart/index.d.ts +0 -27
- package/build/store/cart/index.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 -15
- 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/customer/index.d.ts +0 -80
- package/build/store/customer/index.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/index.d.ts +0 -3
- 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 -37
- 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/constants.d.ts +0 -2
- package/build/utils/constants.js +0 -1
- package/build/utils/currency.d.ts +0 -7
- package/build/utils/currency.js +0 -1
- package/build/utils/google-fonts.d.ts +0 -2
- package/build/utils/google-fonts.js +0 -1
- package/build/utils/helper.d.ts +0 -4
- package/build/utils/helper.js +0 -1
- package/build/utils/i18n.d.ts +0 -11
- package/build/utils/i18n.js +0 -1
- package/build/utils/index.d.ts +0 -3
|
@@ -0,0 +1,998 @@
|
|
|
1
|
+
import { makeAutoObservable } from "mobx";
|
|
2
|
+
import { NextRouter } from "next/router.js";
|
|
3
|
+
import _debounce from "lodash/debounce";
|
|
4
|
+
import {
|
|
5
|
+
IkasBrand,
|
|
6
|
+
IkasProduct,
|
|
7
|
+
IkasProductFilter,
|
|
8
|
+
IkasFilterCategory,
|
|
9
|
+
IkasThemeJsonPageType,
|
|
10
|
+
IkasCategory,
|
|
11
|
+
IkasProductFilterValue,
|
|
12
|
+
IkasProductFacetInput,
|
|
13
|
+
} from "../../../models/data";
|
|
14
|
+
import ProductStore from "../../../store/product";
|
|
15
|
+
import {
|
|
16
|
+
IkasProductListPropValue,
|
|
17
|
+
IkasRelatedProductProps,
|
|
18
|
+
} from "@ikas/storefront-providers";
|
|
19
|
+
import querystring from "query-string";
|
|
20
|
+
import {
|
|
21
|
+
IkasCategoryProductsOrderType,
|
|
22
|
+
IkasThemeJsonStockPreference,
|
|
23
|
+
} from "@ikas/storefront-models";
|
|
24
|
+
import {
|
|
25
|
+
SearchInputOrderByInput,
|
|
26
|
+
SortByDirectionEnum,
|
|
27
|
+
SortByTypeEnum,
|
|
28
|
+
} from "@ikas/storefront-api";
|
|
29
|
+
import { IkasStorefrontConfig } from "@ikas/storefront-config";
|
|
30
|
+
import { IkasBaseStore } from "../../..";
|
|
31
|
+
import { Analytics } from "../../../analytics";
|
|
32
|
+
|
|
33
|
+
export class IkasProductList {
|
|
34
|
+
data: IkasProduct[];
|
|
35
|
+
filters?: IkasProductFilter[] | null = null;
|
|
36
|
+
private _filterCategories?: IkasFilterCategory[] | null = null;
|
|
37
|
+
private _type: IkasProductListType;
|
|
38
|
+
private _pageType: IkasThemeJsonPageType;
|
|
39
|
+
private _sort: IkasProductListSortType;
|
|
40
|
+
private _limit: number;
|
|
41
|
+
private _page: number;
|
|
42
|
+
private _infiniteScrollPage: number | null = null;
|
|
43
|
+
private _count: number;
|
|
44
|
+
private _searchKeyword: string;
|
|
45
|
+
private _initialized = false;
|
|
46
|
+
private _minPage?: number | null = null;
|
|
47
|
+
private _productListPropValue: IkasProductListPropValue;
|
|
48
|
+
|
|
49
|
+
private _filterBrandId?: string | null = null;
|
|
50
|
+
private _filterCategoryId?: string | null = null;
|
|
51
|
+
private _relatedProductData?: IkasRelatedProductProps | null = null;
|
|
52
|
+
private pageSpecificData?: IkasCategory | IkasBrand | null = null;
|
|
53
|
+
|
|
54
|
+
private _recommendFor?: string | null = null; // productId
|
|
55
|
+
private _isLoading = false;
|
|
56
|
+
private _fetchRequestTime = 0;
|
|
57
|
+
private router?: NextRouter | null = null;
|
|
58
|
+
|
|
59
|
+
constructor(data: IkasProductListParams, router?: NextRouter) {
|
|
60
|
+
this.data = data.data ? data.data.map((d) => new IkasProduct(d)) : [];
|
|
61
|
+
this._type =
|
|
62
|
+
data.type ||
|
|
63
|
+
data.productListPropValue.productListType ||
|
|
64
|
+
IkasProductListType.ALL;
|
|
65
|
+
this._pageType = data.pageType;
|
|
66
|
+
this._sort =
|
|
67
|
+
data.sort ||
|
|
68
|
+
data.productListPropValue.initialSort ||
|
|
69
|
+
IkasProductListSortType.LAST_ADDED;
|
|
70
|
+
|
|
71
|
+
this._limit = data.limit || data.productListPropValue.initialLimit || 20;
|
|
72
|
+
this._page = data.page || 1;
|
|
73
|
+
this._minPage = data.minPage || null;
|
|
74
|
+
this._count = data.count || 0;
|
|
75
|
+
this._searchKeyword = data.searchKeyword || "";
|
|
76
|
+
this._productListPropValue = data.productListPropValue;
|
|
77
|
+
|
|
78
|
+
this._filterBrandId = data.filterBrandId || null;
|
|
79
|
+
this._filterCategoryId = data.filterCategoryId || null;
|
|
80
|
+
|
|
81
|
+
this._relatedProductData = data.relatedProductData || null;
|
|
82
|
+
|
|
83
|
+
this._recommendFor = data.recommendFor;
|
|
84
|
+
|
|
85
|
+
this.filters = data.filters
|
|
86
|
+
? data.filters.map((f) => new IkasProductFilter(f, this))
|
|
87
|
+
: null;
|
|
88
|
+
this._filterCategories = data.filterCategories
|
|
89
|
+
? data.filterCategories.map((c) => new IkasFilterCategory(c))
|
|
90
|
+
: null;
|
|
91
|
+
this.pageSpecificData = data.pageSpecificData || null;
|
|
92
|
+
|
|
93
|
+
this.router = router;
|
|
94
|
+
|
|
95
|
+
makeAutoObservable(this);
|
|
96
|
+
|
|
97
|
+
this.setPageSpecificSort();
|
|
98
|
+
|
|
99
|
+
if (this.isBrowser()) {
|
|
100
|
+
this.restoreInfiniteScrollPage();
|
|
101
|
+
|
|
102
|
+
if (
|
|
103
|
+
location.search &&
|
|
104
|
+
(this.isFilterable || this._type === IkasProductListType.SEARCH)
|
|
105
|
+
) {
|
|
106
|
+
const queryParams = this.getQueryParams();
|
|
107
|
+
this.getInitial(queryParams, this._page > 1);
|
|
108
|
+
} else if (this._page > 1) {
|
|
109
|
+
this.getInitial(undefined, true);
|
|
110
|
+
} else if (this.isLastViewed) {
|
|
111
|
+
this.getInitial();
|
|
112
|
+
} else {
|
|
113
|
+
this.handleListingEvent();
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
get sort() {
|
|
119
|
+
return this._sort;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
get limit() {
|
|
123
|
+
return this._limit;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
get pageType() {
|
|
127
|
+
return this._pageType;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
get page() {
|
|
131
|
+
return this._page;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
get minPage() {
|
|
135
|
+
return this._minPage || 1;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
get count() {
|
|
139
|
+
return this._count;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
get pageCount() {
|
|
143
|
+
return Math.ceil(this._count / this._limit);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
get searchKeyword() {
|
|
147
|
+
return this._searchKeyword;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
set searchKeyword(value: string) {
|
|
151
|
+
if (value === this._searchKeyword) return;
|
|
152
|
+
this._searchKeyword = value;
|
|
153
|
+
this.searchDebouncer();
|
|
154
|
+
this.searchAnalyticsDebouncer();
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
get isInitialized() {
|
|
158
|
+
return this._initialized;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
get isFilterable() {
|
|
162
|
+
return (
|
|
163
|
+
this._type === IkasProductListType.ALL ||
|
|
164
|
+
this._type === IkasProductListType.CATEGORY
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
get isFiltered() {
|
|
169
|
+
return (
|
|
170
|
+
this.filters?.some((f) => !!f.valueList.length) ||
|
|
171
|
+
!!this._searchKeyword ||
|
|
172
|
+
(this._pageType !== IkasThemeJsonPageType.CATEGORY &&
|
|
173
|
+
(!!this._filterCategoryId ||
|
|
174
|
+
this._filterCategories?.some((fc) => fc.isSelected)))
|
|
175
|
+
);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
get isStatic() {
|
|
179
|
+
return this._type === IkasProductListType.STATIC;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
get isDiscounted() {
|
|
183
|
+
return this._type === IkasProductListType.DISCOUNTED;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
get isRecommended() {
|
|
187
|
+
return this._type === IkasProductListType.RECOMMENDED;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
get isLastViewed() {
|
|
191
|
+
return this._type === IkasProductListType.LAST_VIEWED;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
get isRelatedProducts() {
|
|
195
|
+
return this._type === IkasProductListType.RELATED_PRODUCTS;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
get isSearch() {
|
|
199
|
+
return this._type === IkasProductListType.SEARCH;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
get hasPrev() {
|
|
203
|
+
if (
|
|
204
|
+
this.isStatic ||
|
|
205
|
+
this.isDiscounted ||
|
|
206
|
+
this.isRecommended ||
|
|
207
|
+
!this._minPage
|
|
208
|
+
)
|
|
209
|
+
return false;
|
|
210
|
+
return this._minPage > 1;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
get hasNext() {
|
|
214
|
+
if (this.isStatic || this.isDiscounted || this.isRecommended) return false;
|
|
215
|
+
return this.page * this.limit < this.count;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
get isLoading() {
|
|
219
|
+
return this._isLoading;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
get filterQueryParams() {
|
|
223
|
+
const queryParams: Record<string, any> = {};
|
|
224
|
+
const _getQueryParams = this.getQueryParams();
|
|
225
|
+
if (_getQueryParams) {
|
|
226
|
+
_getQueryParams.forEach((value, key) => {
|
|
227
|
+
queryParams[key] = value;
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
this.filters?.forEach((f) => {
|
|
232
|
+
if (f.keyList.length) queryParams[f.key] = f.keyList;
|
|
233
|
+
});
|
|
234
|
+
|
|
235
|
+
if (this._searchKeyword) queryParams.s = this._searchKeyword;
|
|
236
|
+
if (this._infiniteScrollPage) queryParams.page = this._infiniteScrollPage;
|
|
237
|
+
if (this._pageType !== IkasThemeJsonPageType.CATEGORY) {
|
|
238
|
+
const selectedCategories = this.filterCategories?.filter(
|
|
239
|
+
(fc) => fc.isSelected
|
|
240
|
+
);
|
|
241
|
+
const hasSelectedCategory = !!selectedCategories?.length;
|
|
242
|
+
|
|
243
|
+
if (hasSelectedCategory) {
|
|
244
|
+
queryParams.c = selectedCategories?.map((sc) => sc.slug);
|
|
245
|
+
} else if (this._filterCategoryId) {
|
|
246
|
+
const slug = this.filterCategories?.find(
|
|
247
|
+
(fc) => fc.id === this._filterCategoryId
|
|
248
|
+
)?.slug;
|
|
249
|
+
|
|
250
|
+
if (slug) queryParams.c = slug;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
return querystring.stringify(queryParams, { arrayFormat: "comma" });
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
get filterCategories() {
|
|
258
|
+
return this._filterCategories?.filter((fc) => fc.resultCount !== 0);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
get hasAppliedfilter() {
|
|
262
|
+
return (
|
|
263
|
+
!!this._searchKeyword || this.filters?.some((f) => !!f.valueList.length)
|
|
264
|
+
);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
get isFeaturedSortEnabled() {
|
|
268
|
+
return (
|
|
269
|
+
this.pageSpecificData?.orderType ===
|
|
270
|
+
IkasCategoryProductsOrderType.MANUALLY &&
|
|
271
|
+
[IkasProductListType.ALL, IkasProductListType.CATEGORY].includes(
|
|
272
|
+
this._type
|
|
273
|
+
)
|
|
274
|
+
);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
private setPageSpecificSort() {
|
|
278
|
+
if (
|
|
279
|
+
this.pageSpecificData?.orderType &&
|
|
280
|
+
[IkasProductListType.ALL, IkasProductListType.CATEGORY].includes(
|
|
281
|
+
this._type
|
|
282
|
+
)
|
|
283
|
+
) {
|
|
284
|
+
switch (this.pageSpecificData.orderType) {
|
|
285
|
+
case IkasCategoryProductsOrderType.HIGHEST_DISCOUNT_RATIO:
|
|
286
|
+
this._sort = IkasProductListSortType.DECRASING_DISCOUNT;
|
|
287
|
+
break;
|
|
288
|
+
|
|
289
|
+
case IkasCategoryProductsOrderType.LOWEST_DISCOUNT_RATIO:
|
|
290
|
+
this._sort = IkasProductListSortType.INCREASING_DISCOUNT;
|
|
291
|
+
break;
|
|
292
|
+
|
|
293
|
+
case IkasCategoryProductsOrderType.HIGHEST_PRICE:
|
|
294
|
+
this._sort = IkasProductListSortType.DECREASING_PRICE;
|
|
295
|
+
break;
|
|
296
|
+
|
|
297
|
+
case IkasCategoryProductsOrderType.LOWEST_PRICE:
|
|
298
|
+
this._sort = IkasProductListSortType.INCREASING_PRICE;
|
|
299
|
+
break;
|
|
300
|
+
|
|
301
|
+
case IkasCategoryProductsOrderType.NEWEST:
|
|
302
|
+
this._sort = IkasProductListSortType.LAST_ADDED;
|
|
303
|
+
break;
|
|
304
|
+
|
|
305
|
+
case IkasCategoryProductsOrderType.OLDEST:
|
|
306
|
+
this._sort = IkasProductListSortType.FIRST_ADDED;
|
|
307
|
+
break;
|
|
308
|
+
|
|
309
|
+
case IkasCategoryProductsOrderType.MANUALLY:
|
|
310
|
+
this._sort = IkasProductListSortType.FEATURED;
|
|
311
|
+
break;
|
|
312
|
+
|
|
313
|
+
default:
|
|
314
|
+
break;
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
private getSortParams(): SearchInputOrderByInput | undefined {
|
|
320
|
+
let direction: SortByDirectionEnum | undefined = SortByDirectionEnum.DESC;
|
|
321
|
+
let type: SortByTypeEnum = SortByTypeEnum.CREATED_AT;
|
|
322
|
+
|
|
323
|
+
switch (this._sort) {
|
|
324
|
+
// case IkasProductListSortType.A_Z:
|
|
325
|
+
// direction = SortByDirectionEnum.ASC;
|
|
326
|
+
// type = SortByTypeEnum.NAME;
|
|
327
|
+
// break;
|
|
328
|
+
|
|
329
|
+
// case IkasProductListSortType.Z_A:
|
|
330
|
+
// direction = SortByDirectionEnum.DESC;
|
|
331
|
+
// type = SortByTypeEnum.NAME;
|
|
332
|
+
// break;
|
|
333
|
+
|
|
334
|
+
case IkasProductListSortType.INCREASING_PRICE:
|
|
335
|
+
direction = SortByDirectionEnum.ASC;
|
|
336
|
+
type = SortByTypeEnum.PRICE;
|
|
337
|
+
break;
|
|
338
|
+
|
|
339
|
+
case IkasProductListSortType.DECREASING_PRICE:
|
|
340
|
+
direction = SortByDirectionEnum.DESC;
|
|
341
|
+
type = SortByTypeEnum.PRICE;
|
|
342
|
+
break;
|
|
343
|
+
|
|
344
|
+
case IkasProductListSortType.FIRST_ADDED:
|
|
345
|
+
direction = SortByDirectionEnum.ASC;
|
|
346
|
+
type = SortByTypeEnum.CREATED_AT;
|
|
347
|
+
break;
|
|
348
|
+
|
|
349
|
+
case IkasProductListSortType.LAST_ADDED:
|
|
350
|
+
direction = SortByDirectionEnum.DESC;
|
|
351
|
+
type = SortByTypeEnum.CREATED_AT;
|
|
352
|
+
break;
|
|
353
|
+
|
|
354
|
+
case IkasProductListSortType.INCREASING_DISCOUNT:
|
|
355
|
+
direction = SortByDirectionEnum.ASC;
|
|
356
|
+
type = SortByTypeEnum.DISCOUNT_RATIO;
|
|
357
|
+
break;
|
|
358
|
+
|
|
359
|
+
case IkasProductListSortType.DECRASING_DISCOUNT:
|
|
360
|
+
direction = SortByDirectionEnum.DESC;
|
|
361
|
+
type = SortByTypeEnum.DISCOUNT_RATIO;
|
|
362
|
+
break;
|
|
363
|
+
|
|
364
|
+
case IkasProductListSortType.FEATURED:
|
|
365
|
+
if (!this.isSearch) {
|
|
366
|
+
direction = SortByDirectionEnum.ASC;
|
|
367
|
+
type = SortByTypeEnum.MANUAL_SORT;
|
|
368
|
+
} else {
|
|
369
|
+
return;
|
|
370
|
+
}
|
|
371
|
+
break;
|
|
372
|
+
|
|
373
|
+
default:
|
|
374
|
+
break;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
return {
|
|
378
|
+
direction,
|
|
379
|
+
type,
|
|
380
|
+
};
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
private async searchProducts(
|
|
384
|
+
page: number,
|
|
385
|
+
limit: number,
|
|
386
|
+
productIdList?: string[]
|
|
387
|
+
) {
|
|
388
|
+
const filterList: IkasProductFilterValue[] = [];
|
|
389
|
+
const facetList: IkasProductFacetInput[] = [];
|
|
390
|
+
|
|
391
|
+
this.filters?.forEach((filter) => {
|
|
392
|
+
if (filter.valueList.length) {
|
|
393
|
+
filterList.push(
|
|
394
|
+
new IkasProductFilterValue({
|
|
395
|
+
id: filter.id,
|
|
396
|
+
type: filter.type,
|
|
397
|
+
displayType: filter.displayType,
|
|
398
|
+
valueList: filter.valueList,
|
|
399
|
+
})
|
|
400
|
+
);
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
if (filter.isFacetFilter) {
|
|
404
|
+
facetList.push({
|
|
405
|
+
id: filter.id,
|
|
406
|
+
type: filter.type,
|
|
407
|
+
displayType: filter.displayType,
|
|
408
|
+
});
|
|
409
|
+
}
|
|
410
|
+
});
|
|
411
|
+
|
|
412
|
+
const selectedCategoryIds = this._filterCategories
|
|
413
|
+
?.filter((fc) => fc.isSelected)
|
|
414
|
+
.map((fc) => fc.id);
|
|
415
|
+
|
|
416
|
+
const sortParams = this.getSortParams();
|
|
417
|
+
|
|
418
|
+
if (this.isRelatedProducts) {
|
|
419
|
+
if (this._relatedProductData) {
|
|
420
|
+
return await ProductStore.getRelatedProducts({
|
|
421
|
+
priceListId: IkasStorefrontConfig.getPriceListId(),
|
|
422
|
+
salesChannelId: IkasStorefrontConfig.getSalesChannelId(),
|
|
423
|
+
productId: this._relatedProductData.productId,
|
|
424
|
+
brandIds: this._relatedProductData.brandIds,
|
|
425
|
+
categoryIds: this._relatedProductData.categoryIds,
|
|
426
|
+
});
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
return await ProductStore.searchProducts({
|
|
431
|
+
input: {
|
|
432
|
+
page,
|
|
433
|
+
perPage: limit,
|
|
434
|
+
productIdList: this.isStatic
|
|
435
|
+
? this._productListPropValue.productIds?.map((p) => p.productId)
|
|
436
|
+
: productIdList,
|
|
437
|
+
filterList: filterList as any,
|
|
438
|
+
facetList: facetList as any,
|
|
439
|
+
brandId:
|
|
440
|
+
this._pageType === IkasThemeJsonPageType.BRAND &&
|
|
441
|
+
this._type !== IkasProductListType.SEARCH
|
|
442
|
+
? this._filterBrandId
|
|
443
|
+
: undefined,
|
|
444
|
+
categoryIdList:
|
|
445
|
+
selectedCategoryIds && selectedCategoryIds.length
|
|
446
|
+
? selectedCategoryIds
|
|
447
|
+
: this._filterCategoryId
|
|
448
|
+
? [this._filterCategoryId]
|
|
449
|
+
: undefined,
|
|
450
|
+
priceListId: IkasStorefrontConfig.getPriceListId(),
|
|
451
|
+
salesChannelId: IkasStorefrontConfig.getSalesChannelId(),
|
|
452
|
+
query: this._searchKeyword,
|
|
453
|
+
order:
|
|
454
|
+
this._type === IkasProductListType.SEARCH
|
|
455
|
+
? null
|
|
456
|
+
: sortParams
|
|
457
|
+
? [sortParams]
|
|
458
|
+
: null,
|
|
459
|
+
showStockOption:
|
|
460
|
+
(IkasStorefrontConfig.getStockPreference() as any) ||
|
|
461
|
+
IkasThemeJsonStockPreference.SHOW_ALL,
|
|
462
|
+
},
|
|
463
|
+
});
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
private async getFilters() {
|
|
467
|
+
const getFiltersResponse = await ProductStore.getProductFilterData({
|
|
468
|
+
categoryId: this._filterCategoryId ? this._filterCategoryId : undefined,
|
|
469
|
+
});
|
|
470
|
+
|
|
471
|
+
this.filters = getFiltersResponse?.data?.filters.map(
|
|
472
|
+
(f) => new IkasProductFilter(f, this)
|
|
473
|
+
);
|
|
474
|
+
this._filterCategories = getFiltersResponse?.data?.categories;
|
|
475
|
+
|
|
476
|
+
if (
|
|
477
|
+
this.pageType !== IkasThemeJsonPageType.CATEGORY &&
|
|
478
|
+
this._filterCategoryId
|
|
479
|
+
) {
|
|
480
|
+
const filterCategory = this._filterCategories?.find(
|
|
481
|
+
(fc) => fc.id === this._filterCategoryId
|
|
482
|
+
);
|
|
483
|
+
if (filterCategory) filterCategory.isSelected = true;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
if (this.filters)
|
|
487
|
+
this.filters.sort((f1, f2) => (f1.order > f2.order ? 1 : -1));
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
private applyQueryParamFilters(queryParams?: URLSearchParams) {
|
|
491
|
+
try {
|
|
492
|
+
queryParams?.forEach((value, key) => {
|
|
493
|
+
const filter = this.filters?.find((f) => f.key === key);
|
|
494
|
+
if (filter) {
|
|
495
|
+
filter.applyQueryParam(value);
|
|
496
|
+
}
|
|
497
|
+
});
|
|
498
|
+
const querySearch = queryParams?.get("s");
|
|
499
|
+
if (querySearch) this._searchKeyword = querySearch;
|
|
500
|
+
|
|
501
|
+
if (this._pageType !== IkasThemeJsonPageType.CATEGORY) {
|
|
502
|
+
const queryCategory = queryParams?.get("c");
|
|
503
|
+
const categorySlugs = queryCategory?.split(",");
|
|
504
|
+
|
|
505
|
+
if (categorySlugs && categorySlugs.length) {
|
|
506
|
+
this.filterCategories?.forEach((fc) => {
|
|
507
|
+
fc.isSelected = categorySlugs.some((slug) => slug === fc.slug);
|
|
508
|
+
});
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
} catch (err) {
|
|
512
|
+
console.log(err);
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
private applyFacets(facets: Facet[] | undefined | null) {
|
|
517
|
+
this.filters?.forEach((filter) => {
|
|
518
|
+
const facet = facets?.find((f) => f.id === filter.id);
|
|
519
|
+
|
|
520
|
+
if (facet) {
|
|
521
|
+
filter.values?.forEach((filterValue) => {
|
|
522
|
+
const facetValue = facet.values.find(
|
|
523
|
+
(facetValue) => facetValue.id === filterValue.id
|
|
524
|
+
);
|
|
525
|
+
if (facetValue) filterValue.resultCount = facetValue.count;
|
|
526
|
+
else if (filter.isCustomValueFilter) filterValue.resultCount = null;
|
|
527
|
+
else filterValue.resultCount = 0;
|
|
528
|
+
});
|
|
529
|
+
} else if (filter.isCustomValueFilter) {
|
|
530
|
+
filter.values?.forEach((v) => (v.resultCount = null));
|
|
531
|
+
} else {
|
|
532
|
+
filter.values?.forEach((v) => (v.resultCount = 0));
|
|
533
|
+
}
|
|
534
|
+
});
|
|
535
|
+
|
|
536
|
+
// Category facets
|
|
537
|
+
const categoryFacet = facets?.find((f) => f.id === "category");
|
|
538
|
+
if (categoryFacet) {
|
|
539
|
+
this._filterCategories?.forEach((filterCategory) => {
|
|
540
|
+
const facetValue = categoryFacet.values.find(
|
|
541
|
+
(fv) => fv.id === filterCategory.id
|
|
542
|
+
);
|
|
543
|
+
if (facetValue) {
|
|
544
|
+
filterCategory.resultCount = facetValue.count;
|
|
545
|
+
} else {
|
|
546
|
+
filterCategory.resultCount = 0;
|
|
547
|
+
}
|
|
548
|
+
});
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
private applyFilters = async () => {
|
|
553
|
+
const resultsSet = await this.getInitial();
|
|
554
|
+
|
|
555
|
+
if (
|
|
556
|
+
![
|
|
557
|
+
IkasThemeJsonPageType.CATEGORY,
|
|
558
|
+
IkasThemeJsonPageType.BRAND,
|
|
559
|
+
IkasThemeJsonPageType.SEARCH,
|
|
560
|
+
].includes(this._pageType)
|
|
561
|
+
)
|
|
562
|
+
return;
|
|
563
|
+
|
|
564
|
+
// Change url params
|
|
565
|
+
if (
|
|
566
|
+
resultsSet &&
|
|
567
|
+
this.isBrowser() &&
|
|
568
|
+
!this.isSearch &&
|
|
569
|
+
!IkasStorefrontConfig.getIsEditor()
|
|
570
|
+
) {
|
|
571
|
+
this.router?.replace(
|
|
572
|
+
`${location.pathname}${
|
|
573
|
+
this.filterQueryParams ? "?" + this.filterQueryParams : ""
|
|
574
|
+
}`,
|
|
575
|
+
undefined,
|
|
576
|
+
{ shallow: true }
|
|
577
|
+
);
|
|
578
|
+
}
|
|
579
|
+
};
|
|
580
|
+
|
|
581
|
+
clearFilters() {
|
|
582
|
+
this.filters?.forEach((filter) => filter.clear());
|
|
583
|
+
this._searchKeyword = "";
|
|
584
|
+
|
|
585
|
+
if (this._pageType !== IkasThemeJsonPageType.CATEGORY) {
|
|
586
|
+
this._filterCategoryId = undefined;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
this._filterCategories?.forEach((fc) => (fc.isSelected = false));
|
|
590
|
+
|
|
591
|
+
this.applyFilters();
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
private getInitial = async (
|
|
595
|
+
queryParams?: URLSearchParams,
|
|
596
|
+
isInfiteScrollReturn?: boolean
|
|
597
|
+
) => {
|
|
598
|
+
this._isLoading = true;
|
|
599
|
+
|
|
600
|
+
const fetchRequestTime = Date.now();
|
|
601
|
+
this._fetchRequestTime = fetchRequestTime;
|
|
602
|
+
|
|
603
|
+
try {
|
|
604
|
+
let page: number | undefined = isInfiteScrollReturn ? this._page : 1;
|
|
605
|
+
let limit: number | undefined = this._limit;
|
|
606
|
+
|
|
607
|
+
if (this.isFilterable && !this.filters) {
|
|
608
|
+
await this.getFilters();
|
|
609
|
+
}
|
|
610
|
+
this.applyQueryParamFilters(queryParams);
|
|
611
|
+
|
|
612
|
+
if (this.isSearch && !this.hasAppliedfilter) {
|
|
613
|
+
this.data = [];
|
|
614
|
+
this._page = 1;
|
|
615
|
+
this._minPage = 1;
|
|
616
|
+
this._count = 0;
|
|
617
|
+
this._initialized = true;
|
|
618
|
+
return true;
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
let productIdList: string[] | undefined;
|
|
622
|
+
|
|
623
|
+
if (this.isStatic) {
|
|
624
|
+
page = undefined;
|
|
625
|
+
limit = 200;
|
|
626
|
+
} else if (this.isDiscounted) {
|
|
627
|
+
page = 1;
|
|
628
|
+
limit = 10;
|
|
629
|
+
} else if (this.isRecommended) {
|
|
630
|
+
page = 1;
|
|
631
|
+
limit = 10;
|
|
632
|
+
} else if (this.isLastViewed) {
|
|
633
|
+
if (this.isBrowser()) {
|
|
634
|
+
await this.waitForCustomerStoreInit();
|
|
635
|
+
//@ts-ignore
|
|
636
|
+
//prettier-ignore
|
|
637
|
+
const lastViewedProducts = await IkasBaseStore.getInstance().customerStore.getLastViewedProducts();
|
|
638
|
+
|
|
639
|
+
if (lastViewedProducts && lastViewedProducts.length) {
|
|
640
|
+
productIdList = lastViewedProducts.map((p) => p.productId);
|
|
641
|
+
}
|
|
642
|
+
} else {
|
|
643
|
+
return;
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
const response = await this.searchProducts(
|
|
648
|
+
page || 1,
|
|
649
|
+
limit || 10,
|
|
650
|
+
productIdList
|
|
651
|
+
);
|
|
652
|
+
if (!response || this._fetchRequestTime !== fetchRequestTime) return;
|
|
653
|
+
|
|
654
|
+
let data: IkasProduct[] = [];
|
|
655
|
+
|
|
656
|
+
if (this.isStatic || this.isLastViewed) {
|
|
657
|
+
const idList = this.isStatic
|
|
658
|
+
? this._productListPropValue.productIds
|
|
659
|
+
: //@ts-ignore
|
|
660
|
+
IkasBaseStore.getInstance().customerStore._lastViewedProducts;
|
|
661
|
+
|
|
662
|
+
data =
|
|
663
|
+
(idList
|
|
664
|
+
?.map((pID) => {
|
|
665
|
+
const product = response.data?.data?.find(
|
|
666
|
+
(p) => p.id === pID.productId
|
|
667
|
+
);
|
|
668
|
+
let variant = product?.variants.find(
|
|
669
|
+
(v) => v.id === pID.variantId
|
|
670
|
+
);
|
|
671
|
+
|
|
672
|
+
if (!variant?.isActive) {
|
|
673
|
+
variant = product?.variants.find((v) => v.isActive);
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
if (product && variant)
|
|
677
|
+
return new IkasProduct({
|
|
678
|
+
...product,
|
|
679
|
+
selectedVariantValues: variant!.variantValues,
|
|
680
|
+
});
|
|
681
|
+
})
|
|
682
|
+
.filter((p) => !!p) as IkasProduct[]) || [];
|
|
683
|
+
} else {
|
|
684
|
+
data =
|
|
685
|
+
response.data?.data?.map((product) => {
|
|
686
|
+
const selectedVariant = product.variants.find((v) => v.isActive);
|
|
687
|
+
const productDetail = new IkasProduct({
|
|
688
|
+
...product,
|
|
689
|
+
selectedVariantValues: (selectedVariant || product.variants[0])
|
|
690
|
+
.variantValues,
|
|
691
|
+
});
|
|
692
|
+
|
|
693
|
+
return productDetail;
|
|
694
|
+
}) || [];
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
this.applyFacets(response.data?.facets);
|
|
698
|
+
|
|
699
|
+
this.data = data;
|
|
700
|
+
this._count = response.data?.count || 0;
|
|
701
|
+
this._initialized = true;
|
|
702
|
+
this._page = page || 1;
|
|
703
|
+
this._minPage = this.page;
|
|
704
|
+
|
|
705
|
+
if (!isInfiteScrollReturn) this._infiniteScrollPage = null;
|
|
706
|
+
this.handleListingEvent();
|
|
707
|
+
|
|
708
|
+
return true;
|
|
709
|
+
} catch (err) {
|
|
710
|
+
console.log(err);
|
|
711
|
+
} finally {
|
|
712
|
+
if (fetchRequestTime === this._fetchRequestTime) this._isLoading = false;
|
|
713
|
+
}
|
|
714
|
+
};
|
|
715
|
+
|
|
716
|
+
getPrev = async () => {
|
|
717
|
+
if (
|
|
718
|
+
this.isStatic ||
|
|
719
|
+
this.isDiscounted ||
|
|
720
|
+
this.isRecommended ||
|
|
721
|
+
this.isLastViewed ||
|
|
722
|
+
this._isLoading ||
|
|
723
|
+
!this.hasPrev
|
|
724
|
+
)
|
|
725
|
+
return;
|
|
726
|
+
|
|
727
|
+
this._isLoading = true;
|
|
728
|
+
|
|
729
|
+
try {
|
|
730
|
+
const minPage = this._minPage! - 1;
|
|
731
|
+
|
|
732
|
+
const response = await this.searchProducts(minPage, this.limit);
|
|
733
|
+
if (!response) return;
|
|
734
|
+
|
|
735
|
+
const data = response.data?.data?.map((product) => {
|
|
736
|
+
const selectedVariant = product.variants.find((v) => v.isActive);
|
|
737
|
+
const productDetail = new IkasProduct({
|
|
738
|
+
...product,
|
|
739
|
+
selectedVariantValues: (selectedVariant || product.variants[0])
|
|
740
|
+
.variantValues,
|
|
741
|
+
});
|
|
742
|
+
|
|
743
|
+
return productDetail;
|
|
744
|
+
});
|
|
745
|
+
|
|
746
|
+
this.data = data?.concat(this.data) || this.data;
|
|
747
|
+
this._count = response.data?.count || this._count;
|
|
748
|
+
this._minPage = minPage;
|
|
749
|
+
} catch (err) {
|
|
750
|
+
console.log(err);
|
|
751
|
+
} finally {
|
|
752
|
+
this._isLoading = false;
|
|
753
|
+
}
|
|
754
|
+
};
|
|
755
|
+
|
|
756
|
+
getNext = async () => {
|
|
757
|
+
if (
|
|
758
|
+
this.isStatic ||
|
|
759
|
+
this.isDiscounted ||
|
|
760
|
+
this.isRecommended ||
|
|
761
|
+
this.isLastViewed ||
|
|
762
|
+
this._isLoading ||
|
|
763
|
+
!this.hasNext
|
|
764
|
+
)
|
|
765
|
+
return;
|
|
766
|
+
|
|
767
|
+
this._isLoading = true;
|
|
768
|
+
|
|
769
|
+
try {
|
|
770
|
+
const response = await this.searchProducts(this.page + 1, this.limit);
|
|
771
|
+
if (!response) return;
|
|
772
|
+
|
|
773
|
+
const data = response.data?.data?.map((product) => {
|
|
774
|
+
const selectedVariant = product.variants.find((v) => v.isActive);
|
|
775
|
+
const productDetail = new IkasProduct({
|
|
776
|
+
...product,
|
|
777
|
+
selectedVariantValues: (selectedVariant || product.variants[0])
|
|
778
|
+
.variantValues,
|
|
779
|
+
});
|
|
780
|
+
|
|
781
|
+
return productDetail;
|
|
782
|
+
});
|
|
783
|
+
|
|
784
|
+
this.data = this.data.concat(data || []);
|
|
785
|
+
this._count = response.data?.count || this._count;
|
|
786
|
+
this._page = this.page + 1;
|
|
787
|
+
} catch (err) {
|
|
788
|
+
console.log(err);
|
|
789
|
+
} finally {
|
|
790
|
+
this._isLoading = false;
|
|
791
|
+
}
|
|
792
|
+
};
|
|
793
|
+
|
|
794
|
+
getPage = async (page: number) => {
|
|
795
|
+
if (
|
|
796
|
+
this._isLoading ||
|
|
797
|
+
this.isStatic ||
|
|
798
|
+
this.isDiscounted ||
|
|
799
|
+
this.isRecommended ||
|
|
800
|
+
this.isLastViewed
|
|
801
|
+
)
|
|
802
|
+
return;
|
|
803
|
+
this._isLoading = true;
|
|
804
|
+
|
|
805
|
+
try {
|
|
806
|
+
const response = await this.searchProducts(page, this.limit);
|
|
807
|
+
if (!response) return;
|
|
808
|
+
|
|
809
|
+
const data = response.data?.data?.map((product) => {
|
|
810
|
+
const selectedVariant = product.variants.find((v) => v.isActive);
|
|
811
|
+
const productDetail = new IkasProduct({
|
|
812
|
+
...product,
|
|
813
|
+
selectedVariantValues: (selectedVariant || product.variants[0])
|
|
814
|
+
.variantValues,
|
|
815
|
+
});
|
|
816
|
+
|
|
817
|
+
return productDetail;
|
|
818
|
+
});
|
|
819
|
+
|
|
820
|
+
this.data = data || [];
|
|
821
|
+
this._count = response.data?.count || 0;
|
|
822
|
+
this._page = page;
|
|
823
|
+
this._minPage = page;
|
|
824
|
+
} catch (err) {
|
|
825
|
+
console.log(err);
|
|
826
|
+
} finally {
|
|
827
|
+
this._isLoading = false;
|
|
828
|
+
}
|
|
829
|
+
};
|
|
830
|
+
|
|
831
|
+
async setSortType(sortType: IkasProductListSortType) {
|
|
832
|
+
this._sort = sortType;
|
|
833
|
+
await this.getInitial();
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
async onFilterCategoryClick(
|
|
837
|
+
filterCategory: IkasFilterCategory,
|
|
838
|
+
disableRoute = false
|
|
839
|
+
) {
|
|
840
|
+
if (disableRoute) {
|
|
841
|
+
this._filterCategories?.forEach((fc) => {
|
|
842
|
+
if (fc.id === filterCategory.id) {
|
|
843
|
+
fc.isSelected = !fc.isSelected;
|
|
844
|
+
}
|
|
845
|
+
});
|
|
846
|
+
await this.applyFilters();
|
|
847
|
+
} else if (!IkasStorefrontConfig.getIsEditor()) {
|
|
848
|
+
IkasBaseStore.getInstance().router?.push(
|
|
849
|
+
filterCategory.href +
|
|
850
|
+
(this.filterQueryParams ? "?" + this.filterQueryParams : "")
|
|
851
|
+
);
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
toJSON() {
|
|
856
|
+
return {
|
|
857
|
+
data: this.data,
|
|
858
|
+
type: this._type,
|
|
859
|
+
pageType: this._pageType,
|
|
860
|
+
sort: this._sort,
|
|
861
|
+
limit: this._limit,
|
|
862
|
+
page: this._page,
|
|
863
|
+
count: this._count,
|
|
864
|
+
searchKeyword: this._searchKeyword,
|
|
865
|
+
initialized: this._initialized,
|
|
866
|
+
minPage: this._minPage,
|
|
867
|
+
filterBrandId: this._filterBrandId,
|
|
868
|
+
filterCategoryId: this._filterCategoryId,
|
|
869
|
+
filterCategories: this._filterCategories,
|
|
870
|
+
filters: this.filters,
|
|
871
|
+
recommendFor: this._recommendFor,
|
|
872
|
+
productListPropValue: this._productListPropValue,
|
|
873
|
+
pageSpecificData: this.pageSpecificData,
|
|
874
|
+
};
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
setVisibleInfiniteScrollPage = (page: number) => {
|
|
878
|
+
if (this._infiniteScrollPage === page) return;
|
|
879
|
+
|
|
880
|
+
this._infiniteScrollPage = page;
|
|
881
|
+
|
|
882
|
+
if (!IkasStorefrontConfig.getIsEditor()) {
|
|
883
|
+
this.router?.replace(
|
|
884
|
+
`${location.pathname}${
|
|
885
|
+
this.filterQueryParams ? "?" + this.filterQueryParams : ""
|
|
886
|
+
}`,
|
|
887
|
+
undefined,
|
|
888
|
+
{ shallow: true }
|
|
889
|
+
);
|
|
890
|
+
}
|
|
891
|
+
};
|
|
892
|
+
|
|
893
|
+
private restoreInfiniteScrollPage() {
|
|
894
|
+
const queryParams = this.getQueryParams();
|
|
895
|
+
const pageStr = queryParams?.get("page");
|
|
896
|
+
|
|
897
|
+
if (pageStr) {
|
|
898
|
+
const page = parseInt(pageStr);
|
|
899
|
+
if (!isNaN(page)) {
|
|
900
|
+
this._page = page;
|
|
901
|
+
this._infiniteScrollPage = page;
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
private getQueryParams() {
|
|
907
|
+
if (!this.isBrowser()) return;
|
|
908
|
+
return new URLSearchParams(location.search);
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
private isBrowser() {
|
|
912
|
+
return typeof window !== "undefined";
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
private waitForCustomerStoreInit() {
|
|
916
|
+
return new Promise((resolve) => {
|
|
917
|
+
const interval = setInterval(() => {
|
|
918
|
+
if (IkasBaseStore.getInstance().customerStore.initialized) {
|
|
919
|
+
clearInterval(interval);
|
|
920
|
+
resolve(null);
|
|
921
|
+
}
|
|
922
|
+
}, 1000);
|
|
923
|
+
});
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
private handleListingEvent() {
|
|
927
|
+
if (this.searchKeyword && this.data.length) {
|
|
928
|
+
Analytics.viewSearchResults(this._searchKeyword, this.data);
|
|
929
|
+
} else if (this.data.length && this._type === IkasProductListType.ALL) {
|
|
930
|
+
Analytics.viewListing(this.data);
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
private searchDebouncer = _debounce(() => {
|
|
935
|
+
this.applyFilters();
|
|
936
|
+
}, 500);
|
|
937
|
+
|
|
938
|
+
private searchAnalyticsDebouncer = _debounce(() => {
|
|
939
|
+
Analytics.search(this._searchKeyword);
|
|
940
|
+
}, 1000);
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
export type IkasProductListParams = {
|
|
944
|
+
data?: IkasProduct[];
|
|
945
|
+
type?: IkasProductListType;
|
|
946
|
+
pageType: IkasThemeJsonPageType;
|
|
947
|
+
sort?: IkasProductListSortType;
|
|
948
|
+
limit?: number;
|
|
949
|
+
page?: number;
|
|
950
|
+
count?: number;
|
|
951
|
+
searchKeyword?: string;
|
|
952
|
+
initialized?: boolean;
|
|
953
|
+
minPage?: number;
|
|
954
|
+
filterBrandId?: string;
|
|
955
|
+
filterCategoryId?: string;
|
|
956
|
+
filters?: IkasProductFilter[];
|
|
957
|
+
filterCategories?: IkasFilterCategory[];
|
|
958
|
+
recommendFor?: string;
|
|
959
|
+
productListPropValue: IkasProductListPropValue;
|
|
960
|
+
pageSpecificData?: IkasCategory | IkasBrand | null;
|
|
961
|
+
relatedProductData?: IkasRelatedProductProps | null;
|
|
962
|
+
};
|
|
963
|
+
|
|
964
|
+
export enum IkasProductListType {
|
|
965
|
+
ALL = "ALL",
|
|
966
|
+
STATIC = "STATIC",
|
|
967
|
+
DISCOUNTED = "DISCOUNTED",
|
|
968
|
+
RECOMMENDED = "RECOMMENDED",
|
|
969
|
+
CATEGORY = "CATEGORY",
|
|
970
|
+
SEARCH = "SEARCH",
|
|
971
|
+
LAST_VIEWED = "LAST_VIEWED",
|
|
972
|
+
RELATED_PRODUCTS = "RELATED_PRODUCTS",
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
export enum IkasProductListSortType {
|
|
976
|
+
INCREASING_PRICE = "INCREASING_PRICE",
|
|
977
|
+
DECREASING_PRICE = "DECREASING_PRICE",
|
|
978
|
+
LAST_ADDED = "LAST_ADDED",
|
|
979
|
+
FIRST_ADDED = "FIRST_ADDED",
|
|
980
|
+
INCREASING_DISCOUNT = "INCREASING_DISCOUNT",
|
|
981
|
+
DECRASING_DISCOUNT = "DECRASING_DISCOUNT",
|
|
982
|
+
FEATURED = "FEATURED",
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
export enum IkasRelatedProductsType {
|
|
986
|
+
CATEGORY = "CATEGORY",
|
|
987
|
+
BRAND = "BRAND",
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
type Facet = {
|
|
991
|
+
id: string;
|
|
992
|
+
values: FacetValue[];
|
|
993
|
+
};
|
|
994
|
+
|
|
995
|
+
type FacetValue = {
|
|
996
|
+
id: string;
|
|
997
|
+
count: number;
|
|
998
|
+
};
|