@ikas/storefront 5.0.13 → 5.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/analytics/analytics.d.ts +2 -1
- package/build/analytics/analytics.js +1 -1
- package/build/analytics/events.d.ts +2 -1
- package/build/analytics/events.js +1 -1
- package/build/analytics/googleAnalytics.js +1 -1
- package/build/analytics/googleTagManager.js +1 -1
- package/build/analytics/ikas.d.ts +3 -1
- package/build/analytics/ikas.js +1 -1
- package/build/components/checkout/components/address-form/model.js +1 -1
- package/build/components/checkout/components/cart-summary/cart-item/index.js +1 -1
- package/build/components/checkout/components/customer-addresses/model.js +1 -1
- package/build/components/checkout/components/offer-product/index.js +1 -1
- package/build/components/checkout/components/quick-registration/model.js +1 -1
- package/build/components/checkout/index.js +1 -1
- package/build/components/checkout/model.d.ts +1 -0
- package/build/components/checkout/model.js +1 -1
- package/build/components/checkout/steps/step-payment/billing-address/index.js +1 -1
- package/build/components/checkout/steps/step-payment/payment-gateways/index.js +1 -1
- package/build/components/checkout/steps/step-success/index.js +1 -1
- package/build/components/page/head.js +1 -1
- package/build/components/page/index.js +1 -1
- package/build/components/page-editor/ThemeComponentEditor.js +1 -1
- package/build/components/page-editor/model.js +1 -1
- package/build/components/popup/index.js +1 -1
- package/build/components/popup/renderer/index.d.ts +0 -3
- package/build/components/popup/renderer/index.js +1 -1
- package/build/components/popup/renderer/model.js +1 -1
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/divider-element-renderer/index.js +1 -1
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/form-element-renderer/index.js +1 -1
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/form-element-renderer/input-item-view/index.js +1 -1
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/image-element-renderer/index.js +1 -1
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/product-list-renderer/index.js +1 -1
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/text-element-renderer/index.js +1 -1
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/helpers/index.js +1 -1
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/background-settings/index.js +1 -1
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/close-settings/index.js +1 -1
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/index.js +1 -1
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/button/index.js +1 -1
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/divider/index.js +1 -1
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/form/customer-email/index.js +1 -1
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/form/customer-phone/index.js +1 -1
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/form/index.js +1 -1
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/image/index.js +1 -1
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/image-column/index.js +1 -1
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/product/detail-settings/index.js +1 -1
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/product/index.js +1 -1
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/social/index.js +1 -1
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/text/index.js +1 -1
- package/build/hooks/useCustomerReviews.js +1 -1
- package/build/hooks/useStore.js +1 -1
- package/build/index.js +1 -1
- package/build/models/data/checkout-settings/index.d.ts +2 -1
- package/build/models/data/checkout-settings/index.js +1 -1
- package/build/models/data/index.d.ts +7 -0
- package/build/models/data/product/campaign/data/index.d.ts +2 -0
- package/build/models/data/product/campaign/data/index.js +1 -1
- package/build/models/data/product/campaign/product-tiered-discount/index.d.ts +20 -0
- package/build/models/data/product/campaign/product-tiered-discount/index.js +1 -0
- package/build/models/data/product/index.d.ts +36 -1
- package/build/models/data/product/index.js +1 -1
- package/build/models/data/storefront-popup/index.d.ts +1 -1
- package/build/models/data/storefront-popup/index.js +1 -1
- package/build/models/ui/blog-category-list/index.js +1 -1
- package/build/models/ui/brand-list/index.js +1 -1
- package/build/models/ui/category-list/index.js +1 -1
- package/build/models/ui/customer-review-list/index.d.ts +1 -1
- package/build/models/ui/customer-review-list/index.js +1 -1
- package/build/models/ui/customer-review-summary-list/index.js +1 -1
- package/build/models/ui/product-list/index.js +1 -1
- package/build/models/ui/raffle-list/index.js +1 -1
- package/build/models/ui/validator/form/account-info.js +1 -1
- package/build/models/ui/validator/form/address.js +1 -1
- package/build/models/ui/validator/form/ikas-address.js +1 -1
- package/build/models/ui/validator/form/register.js +1 -1
- package/build/page-data-init/index.js +1 -1
- package/build/pages/checkout.js +1 -1
- package/build/pages/pages/_slug_.js +1 -1
- package/build/store/blog/index.js +1 -1
- package/build/store/brand/index.js +1 -1
- package/build/store/cart/index.js +1 -1
- package/build/store/category/index.js +1 -1
- package/build/store/checkout/index.js +1 -1
- package/build/store/customer/api.js +1 -1
- package/build/store/customer/index.js +1 -1
- package/build/store/html-meta-data/index.js +1 -1
- package/build/store/location/index.js +1 -1
- package/build/store/product/index.js +1 -1
- package/package.json +12 -12
- package/build/ext/swiper/modules/navigation.css.js +0 -1
- package/build/ext/swiper/modules/pagination.css.js +0 -1
- package/build/ext/swiper/swiper.css.js +0 -1
- /package/build/models/data/storefront-popup/{storefront-popup-date-f/304/261lter/index.d.ts" → storefront-popup-date-filter/index.d.ts} +0 -0
- /package/build/models/data/storefront-popup/{storefront-popup-date-f/304/261lter/index.js" → storefront-popup-date-filter/index.js} +0 -0
package/build/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{Analytics}from"./analytics/analytics.js";export{AnalyticsBody,AnalyticsHead}from"./analytics/head/index.js";export{IkasPage}from"./components/page/index.js";export{IkasPageHead}from"./components/page/head.js";export{Image}from"./components/image/index.js";export{default as Link}from"./components/link/index.js";export{IkasEditorComponentLoader}from"./components/page-editor/loader/index.js";export{GoogleCaptcha}from"./components/google-captcha/index.js";export{useStore}from"./hooks/useStore.js";export{useCustomerReviews}from"./hooks/useCustomerReviews.js";import"react";export{IkasBaseModel}from"./models/data/base/index.js";export{IkasBlogCategory}from"./models/data/blog/category/index.js";export{IkasBlogContent}from"./models/data/blog/content/index.js";export{IkasBlogMetaData,IkasBlogMetaDataTargetType}from"./models/data/blog/meta-data/index.js";export{IkasBlogTag}from"./models/data/blog/tag/index.js";export{IkasBlogWriter}from"./models/data/blog/writer/index.js";export{IkasBlog}from"./models/data/blog/index.js";export{IkasProductBrandTranslation}from"./models/data/brand/translation/index.js";export{IkasBrand,IkasBrandOrderType}from"./models/data/brand/index.js";export{IkasCampaignOfferProduct,IkasCampaignOfferProductTranslation}from"./models/data/campaign-offer/product/index.js";export{IkasCampaignOffer,IkasCampaignOfferTriggerSettings}from"./models/data/campaign-offer/index.js";export{IkasAvailableShippingMethod}from"./models/data/cart/available-shipping-method/index.js";export{IkasCartCampaignOffer}from"./models/data/cart/campaign-offer/index.js";export{IkasCart}from"./models/data/cart/index.js";export{IkasCategoryPathItem}from"./models/data/category/path-item/index.js";export{IkasCategoryTranslation}from"./models/data/category/translations/index.js";export{IkasCategory}from"./models/data/category/index.js";export{IkasCheckout}from"./models/data/checkout/index.js";export{IkasCheckoutOption}from"./models/data/checkout-settings/option/index.js";export{IkasCheckoutSettingsPrice}from"./models/data/checkout-settings/price/index.js";export{IkasCheckoutSettings}from"./models/data/checkout-settings/index.js";export{IkasCity}from"./models/data/city/index.js";export{IkasContactForm}from"./models/data/contact-form/index.js";export{IkasCountry}from"./models/data/country/index.js";export{IkasCustomerAddressCity}from"./models/data/customer/address/city/index.js";export{IkasCustomerAddressCountry}from"./models/data/customer/address/country/index.js";export{IkasCustomerAddressDistrict}from"./models/data/customer/address/district/index.js";export{IkasCustomerAddressRegion}from"./models/data/customer/address/region/index.js";export{IkasCustomerAddressState}from"./models/data/customer/address/state/index.js";export{IkasCustomerAddress}from"./models/data/customer/address/index.js";export{IkasLocalizedCustomerAddress}from"./models/data/customer/address/ikas-localized-customer-address.js";export{IkasCustomerAttributeOption}from"./models/data/customer/attribute/option/index.js";export{IkasCustomerAttributeSalesChannel}from"./models/data/customer/attribute/sales-channel/index.js";export{IkasCustomerAttributeOptionTranslation}from"./models/data/customer/attribute/translation/option/index.js";export{IkasCustomerAttributeTranslation}from"./models/data/customer/attribute/translation/index.js";export{IkasCustomerAttributeValue}from"./models/data/customer/attribute/value/index.js";export{IkasCustomerAttribute}from"./models/data/customer/attribute/index.js";export{IkasCustomerPriceListRuleFilter}from"./models/data/customer/price-list-rule/filter/index.js";export{IkasCustomerPriceListRule}from"./models/data/customer/price-list-rule/index.js";export{IkasCustomerReviewSettings}from"./models/data/customer/review/settings/index.js";export{IkasCustomerReviewSummaryStar}from"./models/data/customer/review/summary/star/index.js";export{IkasCustomerReviewSummary}from"./models/data/customer/review/summary/index.js";export{IkasCustomerReview}from"./models/data/customer/review/index.js";export{IkasCustomer}from"./models/data/customer/index.js";export{IkasCustomerRegisterSubscriptionInput}from"./models/data/customer-form-data-input/customer-register-subscription-input/index.js";export{IkasCustomerGenderTypeEnum,IkasSaveCustomerFormDataInput}from"./models/data/customer-form-data-input/index.js";export{IkasDistrict}from"./models/data/district/index.js";export{IkasFavoriteProduct}from"./models/data/favorite-product/index.js";export{IkasFilterCategory}from"./models/data/filter-category/index.js";export{IkasHTMLMetaDataTranslations}from"./models/data/html-meta-data/translations/index.js";export{IkasHTMLMetaData,IkasHTMLMetaDataOverride,IkasHTMLMetaDataTargetType}from"./models/data/html-meta-data/index.js";export{IkasImage}from"./models/data/image/index.js";export{IkasLastViewedProduct}from"./models/data/last-viewed-product/index.js";export{IkasMerchantSettings}from"./models/data/merchant-settings/index.js";export{IkasOrderAddressCity}from"./models/data/order/address/city/index.js";export{IkasOrderAddressCountry}from"./models/data/order/address/country/index.js";export{IkasOrderAddressDistrict}from"./models/data/order/address/district/index.js";export{IkasOrderAddressRegion}from"./models/data/order/address/region/index.js";export{IkasOrderAddressState}from"./models/data/order/address/state/index.js";export{IkasOrderAddress}from"./models/data/order/address/index.js";export{IkasOrderAdjustmentAppliedOrderLine}from"./models/data/order/adjustment/applied-order-line/index.js";export{IkasOrderAdjustment}from"./models/data/order/adjustment/index.js";export{IkasOrderCustomer}from"./models/data/order/customer/index.js";export{IkasOrderGiftPackageLine}from"./models/data/order/gift-line/index.js";export{IkasInvoice}from"./models/data/order/invoice/index.js";export{IkasOrderLineDiscount}from"./models/data/order/line-item/discount/index.js";export{IkasOrderLineItemOptionValue}from"./models/data/order/line-item/option/value/index.js";export{IkasOrderLineItemOption}from"./models/data/order/line-item/option/index.js";export{IkasOrderLineVariantBrand}from"./models/data/order/line-item/variant/brand/index.js";export{IkasOrderLineVariantCategory,IkasOrderLineVariantCategoryPath}from"./models/data/order/line-item/variant/category/index.js";export{IkasOrderLineVariantPrice}from"./models/data/order/line-item/variant/price/index.js";export{IkasOrderLineVariantVariantValue}from"./models/data/order/line-item/variant/value/index.js";export{IkasOrderLineVariant}from"./models/data/order/line-item/variant/index.js";export{IkasOrderLineItem}from"./models/data/order/line-item/index.js";export{IkasTrackingInfo}from"./models/data/order/package/tracking-info/index.js";export{IkasOrderPackage}from"./models/data/order/package/index.js";export{IkasOrderPaymentMethod}from"./models/data/order/payment-method/index.js";export{IkasOrderRefundOrderLineInput}from"./models/data/order/refund/line-item/index.js";export{IkasOrderRefundSettings}from"./models/data/order/refund/settings/index.js";export{IkasRefund}from"./models/data/order/refund/index.js";export{IkasOrderShippingLine}from"./models/data/order/shipping-line/index.js";export{IkasOrderTaxLine}from"./models/data/order/tax-line/index.js";export{IkasTransactionError}from"./models/data/order/transaction/error/index.js";export{IkasTransactionInstallmentPrice}from"./models/data/order/transaction/payment-method-detail/installment-price/index.js";export{IkasTransactionPaymentMethodDetail}from"./models/data/order/transaction/payment-method-detail/index.js";export{IkasOrderTransaction}from"./models/data/order/transaction/index.js";export{IkasOrder}from"./models/data/order/index.js";export{IkasPaymentGatewayAdditionalPrice}from"./models/data/payment-gateway/additional-price/index.js";export{IkasPaymentGatewaySettings}from"./models/data/payment-gateway/settings/index.js";export{IkasPaymentGatewayTranslation}from"./models/data/payment-gateway/translation/index.js";export{IkasPaymentGateway}from"./models/data/payment-gateway/index.js";export{IkasProductAttributeOption}from"./models/data/product/attribute/option/index.js";export{IkasProductAttributeTableCell}from"./models/data/product/attribute/table-cell/index.js";export{IkasProductAttributeTableTemplate}from"./models/data/product/attribute/table-template/index.js";export{IkasProductAttributeOptionTranslation,IkasProductAttributeTranslation}from"./models/data/product/attribute/translation/index.js";export{IkasProductAttribute}from"./models/data/product/attribute/index.js";export{IkasAttributeTableCellValue,IkasProductAttributeMap,IkasProductAttributeValue}from"./models/data/product/attribute-value/index.js";export{IkasProductBackInStockSettings}from"./models/data/product/back-in-stock-settings/index.js";export{IkasApplicableProductFilterValue,IkasFilterRangeValue,IkasProductFilter,IkasProductFilterNumberRangeListOption,IkasProductFilterSettings,IkasProductFilterValue,parseRangeStr}from"./models/data/product/filter/index.js";export{IkasProductCampaignData}from"./models/data/product/campaign/data/index.js";export{IkasProductCampaignFilter}from"./models/data/product/campaign/filter/index.js";export{IkasProductBuyX,IkasProductBuyXThenGetY,IkasProductGetY}from"./models/data/product/campaign/product-buyx-then-gety/index.js";export{IkasProductCampaignDateRangeField}from"./models/data/product/campaign/product-campaign-date-range-field/index.js";export{IkasCampaignMinMaxRangeField,IkasProductFixedDiscount}from"./models/data/product/campaign/product-fixed-discount/index.js";export{IkasProductCampaign}from"./models/data/product/campaign/index.js";export{IkasProductCampaignOffer,IkasProductOffer}from"./models/data/product/campaign-offer/index.js";export{IkasProductImage}from"./models/data/product/image/index.js";export{IkasProductOption,IkasProductOptionDateSettings,IkasProductOptionFileSettings,IkasProductOptionOtherPrice,IkasProductOptionSelectSettings,IkasProductOptionSelectValue,IkasProductOptionTextSettings}from"./models/data/product/option-set/option/index.js";export{IkasProductOptionSelectValueTranslations,IkasProductOptionSet,IkasProductOptionSetTranslations,IkasProductOptionTranslations}from"./models/data/product/option-set/index.js";export{IkasProductStockLocations}from"./models/data/product/stock-location/index.js";export{IkasProductTag}from"./models/data/product/tag/index.js";export{IkasProductPrice}from"./models/data/product/variant/price/index.js";export{IkasProductVariant}from"./models/data/product/variant/index.js";export{IkasProductVariantType}from"./models/data/product/variant-type/index.js";export{IkasProduct}from"./models/data/product/index.js";export{IkasProductFile}from"./models/data/product-file/index.js";export{IkasRaffle,IkasRaffleAppliedProduct,IkasRaffleDateRangeField,IkasRaffleMetaData,IkasRaffleParticipant}from"./models/data/raffle/index.js";export{IkasSalesChannel,IkasSalesChannelPaymentGateway,IkasSalesChannelStockLocation}from"./models/data/sales-channel/index.js";export{IkasShippingZoneRegion}from"./models/data/shipping-zone/state/city/district/region/index.js";export{IkasShippingZoneDistrict}from"./models/data/shipping-zone/state/city/district/index.js";export{IkasShippingZoneCity}from"./models/data/shipping-zone/state/city/index.js";export{IkasShippingZoneState}from"./models/data/shipping-zone/state/index.js";export{IkasShippingZone}from"./models/data/shipping-zone/index.js";export{IkasState}from"./models/data/state/index.js";export{IkasStockLocationAddressCity}from"./models/data/stock-location/address/city/index.js";export{IkasStockLocationAddressCountry}from"./models/data/stock-location/address/country/index.js";export{IkasStockLocationAddressDistrict}from"./models/data/stock-location/address/district/index.js";export{IkasStockLocationAddressState}from"./models/data/stock-location/address/state/index.js";export{IkasStockLocationAddress}from"./models/data/stock-location/address/index.js";export{IkasAvailableStockLocation}from"./models/data/stock-location/available/index.js";export{IkasStockLocation}from"./models/data/stock-location/index.js";export{IkasStorefrontB2BSettings}from"./models/data/storefront/b2b-settings/index.js";export{IkasStorefrontDomain}from"./models/data/storefront/domain/index.js";export{IkasIndexPageSeoSetting}from"./models/data/storefront/index-page-seo-setting/index.js";export{IkasStorefrontLocalization}from"./models/data/storefront/localization/index.js";export{IkasStorefrontDynamicCurrencySettings}from"./models/data/storefront/routing/dynamic-currency/index.js";export{IkasStorefrontRouting}from"./models/data/storefront/routing/index.js";export{IkasStorefrontTheme}from"./models/data/storefront/theme/index.js";export{IkasStorefrontThemeLocalization}from"./models/data/storefront/theme-localization/index.js";export{IkasStorefront}from"./models/data/storefront/index.js";export{IkasThemeJsonComponentProp}from"./models/data/theme-json/component/prop/index.js";export{ComponentTranslation,IkasThemeJsonComponent}from"./models/data/theme-json/component/index.js";export{IkasThemeJsonCustomData,IkasThemeJsonCustomDataEnumOptionTranslation,IkasThemeJsonCustomDataTranslation,IkasThemeJsonEnumOption}from"./models/data/theme-json/custom-data/index.js";export{IkasThemeJsonPageComponent}from"./models/data/theme-json/page/component/index.js";export{IkasThemeJsonPage,IkasThemeJsonPageSpecification}from"./models/data/theme-json/page/index.js";export{IkasThemeJsonColor,IkasThemeJsonColorTranslation}from"./models/data/theme-json/settings/color/index.js";export{IkasThemeJsonFavicon}from"./models/data/theme-json/settings/favicon/index.js";export{IkasThemeJsonFontFamily}from"./models/data/theme-json/settings/font-family/index.js";export{IkasThemeJsonSettings}from"./models/data/theme-json/settings/index.js";export{CHECKOUT_ID,IkasThemeJson}from"./models/data/theme-json/index.js";export{IkasVariantValue}from"./models/data/variant-type/variant-value/index.js";export{IkasVariantType}from"./models/data/variant-type/index.js";export{IkasVideo}from"./models/data/video/index.js";export{AddressFormItem,BillingFormItem}from"@ikas/localized-address";export{IkasBlogList,IkasBlogListType}from"./models/ui/blog-list/index.js";export{IkasBlogCategoryList,IkasBlogCategoryListType}from"./models/ui/blog-category-list/index.js";export{IkasBrandList,IkasBrandListSortType,IkasBrandListType}from"./models/ui/brand-list/index.js";export{IkasCategoryList,IkasCategoryListSortType,IkasCategoryListType}from"./models/ui/category-list/index.js";export{IkasNavigationLink}from"./models/ui/navigation-link/index.js";export{IkasProductList,IkasProductListSortByTypeEnum,IkasProductListSortType,IkasProductListType,IkasRelatedProductsType}from"./models/ui/product-list/index.js";export{IkasAttributeDetail}from"./models/ui/product-attribute-detail/index.js";export{IkasAttributeList}from"./models/ui/product-attribute-list/index.js";export{IkasCustomerReviewList}from"./models/ui/customer-review-list/index.js";export{IkasCustomerReviewSummaryList}from"./models/ui/customer-review-summary-list/index.js";export{Validator}from"./models/ui/validator/index.js";export{EmailRule,EqualsRule,IdentityNumberRule,LessThanRule,MaxRule,MinRule,PhoneRule,RequiredRule,ValidationRule,ValidatorErrorType}from"./models/ui/validator/rules/index.js";export{LoginForm}from"./models/ui/validator/form/login.js";export{AddressForm}from"./models/ui/validator/form/address.js";export{IkasAddressForm}from"./models/ui/validator/form/ikas-address.js";export{RegisterForm}from"./models/ui/validator/form/register.js";export{ContactForm}from"./models/ui/validator/form/contact-form.js";export{ForgotPasswordForm}from"./models/ui/validator/form/forgot-password.js";export{RecoverPasswordForm}from"./models/ui/validator/form/recover-password.js";export{AccountInfoForm}from"./models/ui/validator/form/account-info.js";export{RaffleForm}from"./models/ui/validator/form/raffle-form.js";export{CustomerReviewForm}from"./models/ui/validator/form/customer-review.js";export{IkasComponentRenderer}from"./models/ui/component-renderer/index.js";export{IkasRaffleList}from"./models/ui/raffle-list/index.js";import*as e from"./pages/home.js";export{e as IndexPage};import*as t from"./pages/_slug_/index.js";export{t as SlugPage};import*as o from"./pages/pages/_slug_.js";export{o as CustomPage};import*as a from"./pages/checkout.js";export{a as CheckoutPage};import*as r from"./pages/account/index.js";export{r as AccountPage};import*as s from"./pages/account/addresses.js";export{s as AddressesPage};import*as d from"./pages/account/orders/index.js";export{d as OrdersPage};import*as i from"./pages/account/orders/_id_.js";export{i as OrderDetailPage};import*as n from"./pages/account/login.js";export{n as LoginPage};import*as m from"./pages/account/register.js";export{m as RegisterPage};import*as p from"./pages/account/forgot-password.js";export{p as ForgotPasswordPage};import*as l from"./pages/account/recover-password.js";export{l as RecoverPasswordPage};import*as x from"./pages/cart.js";export{x as CartPage};import*as c from"./pages/editor.js";export{c as EditorPage};import*as u from"./pages/account/favorite-products.js";export{u as FavoriteProductsPage};import*as f from"./pages/search.js";export{f as SearchPage};import*as k from"./pages/404.js";export{k as NotFoundPage};import*as I from"./pages/blog/index.js";export{I as BlogPage};import*as g from"./pages/blog/_slug_.js";export{g as BlogSlugPage};import*as j from"./pages/raffle/_slug_.js";export{j as RafflePage};import*as y from"./pages/raffle/index.js";export{y as RafflesPage};import*as P from"./pages/account/raffles.js";export{P as AccountRafflesPage};import*as C from"./pages/account/activate.js";export{C as ActivateCustomerPage};export{IkasBaseStore}from"./store/base.js";export{IkasCustomerStore}from"./store/customer/index.js";export{IkasCartStore}from"./store/cart/index.js";export{formatDate}from"./utils/helper.js";export{formatCurrency}from"./utils/currency.js";export{createTranslationInputData,useTranslation}from"./utils/i18n.js";export{IkasAdjustmentType,IkasAmountType,IkasCampaignApplicablePrice,IkasCampaignCreatedFor,IkasCampaignFilterType,IkasCampaignOfferProductShowCriteria,IkasCampaignOfferTargetPageType,IkasCampaignType,IkasCartCampaignOfferStatus,IkasCategoryProductsOrderType as IkasCategoryOrderType,IkasCheckoutRequirement,IkasCustomerAccountStatus,IkasCustomerAttributeType,IkasCustomerEmailSubscriptionStatus,IkasCustomerPriceListRuleFilterType,IkasCustomerPriceListRuleValueType,IkasCustomerRegistrationSource,IkasCustomerReviewStatus,IkasInvoiceType,IkasOrderCancelReason,IkasOrderLineItemStatus,IkasOrderPackageFullfillStatus,IkasOrderPackageStatus,IkasOrderPaymentStatus,IkasOrderShippingMethod,IkasOrderStatus,IkasPaymentGatewayAdditionalPriceType,IkasPaymentGatewaySettingsType,IkasPaymentGatewayTransactionFeeType,IkasPaymentGatewayType,IkasPaymentMethodType,IkasProductAttributeType,IkasProductFilterDisplayType,IkasProductFilterSortType,IkasProductFilterType,IkasProductOptionSelectType,IkasProductOptionType,IkasProductStockFilterValue,IkasProductType,IkasRaffleMetadataTargetType,IkasRaffleVerificationType,IkasShippingMethod,IkasStockLocationDeliveryTime,IkasStockLocationType,IkasStorefrontB2BShowPricesEnum,IkasStorefrontB2BShowProductsEnum,IkasStorefrontStatus,IkasThemeJsonComponentPropType,IkasThemeJsonPageType,IkasThemeJsonStockPreference,IkasTransactionStatus,IkasTransactionType,IkasVariantSelectionType}from"@ikas/storefront-models";
|
|
1
|
+
export{Analytics}from"./analytics/analytics.js";export{AnalyticsBody,AnalyticsHead}from"./analytics/head/index.js";export{IkasPage}from"./components/page/index.js";export{IkasPageHead}from"./components/page/head.js";export{Image}from"./components/image/index.js";export{default as Link}from"./components/link/index.js";export{IkasEditorComponentLoader}from"./components/page-editor/loader/index.js";export{GoogleCaptcha}from"./components/google-captcha/index.js";export{useStore}from"./hooks/useStore.js";export{useCustomerReviews}from"./hooks/useCustomerReviews.js";import"react";export{IkasBaseModel}from"./models/data/base/index.js";export{IkasBlogCategory}from"./models/data/blog/category/index.js";export{IkasBlogContent}from"./models/data/blog/content/index.js";export{IkasBlogMetaData,IkasBlogMetaDataTargetType}from"./models/data/blog/meta-data/index.js";export{IkasBlogTag}from"./models/data/blog/tag/index.js";export{IkasBlogWriter}from"./models/data/blog/writer/index.js";export{IkasBlog}from"./models/data/blog/index.js";export{IkasProductBrandTranslation}from"./models/data/brand/translation/index.js";export{IkasBrand,IkasBrandOrderType}from"./models/data/brand/index.js";export{IkasCampaignOfferProduct,IkasCampaignOfferProductTranslation}from"./models/data/campaign-offer/product/index.js";export{IkasCampaignOffer,IkasCampaignOfferTriggerSettings}from"./models/data/campaign-offer/index.js";export{IkasAvailableShippingMethod}from"./models/data/cart/available-shipping-method/index.js";export{IkasCartCampaignOffer}from"./models/data/cart/campaign-offer/index.js";export{IkasCart}from"./models/data/cart/index.js";export{IkasCategoryPathItem}from"./models/data/category/path-item/index.js";export{IkasCategoryTranslation}from"./models/data/category/translations/index.js";export{IkasCategory}from"./models/data/category/index.js";export{IkasCheckout}from"./models/data/checkout/index.js";export{IkasCheckoutOption}from"./models/data/checkout-settings/option/index.js";export{IkasCheckoutSettingsPrice}from"./models/data/checkout-settings/price/index.js";export{IkasCheckoutSettings}from"./models/data/checkout-settings/index.js";export{IkasCity}from"./models/data/city/index.js";export{IkasContactForm}from"./models/data/contact-form/index.js";export{IkasCountry}from"./models/data/country/index.js";export{IkasCustomerAddressCity}from"./models/data/customer/address/city/index.js";export{IkasCustomerAddressCountry}from"./models/data/customer/address/country/index.js";export{IkasCustomerAddressDistrict}from"./models/data/customer/address/district/index.js";export{IkasCustomerAddressRegion}from"./models/data/customer/address/region/index.js";export{IkasCustomerAddressState}from"./models/data/customer/address/state/index.js";export{IkasCustomerAddress}from"./models/data/customer/address/index.js";export{IkasLocalizedCustomerAddress}from"./models/data/customer/address/ikas-localized-customer-address.js";export{IkasCustomerAttributeOption}from"./models/data/customer/attribute/option/index.js";export{IkasCustomerAttributeSalesChannel}from"./models/data/customer/attribute/sales-channel/index.js";export{IkasCustomerAttributeOptionTranslation}from"./models/data/customer/attribute/translation/option/index.js";export{IkasCustomerAttributeTranslation}from"./models/data/customer/attribute/translation/index.js";export{IkasCustomerAttributeValue}from"./models/data/customer/attribute/value/index.js";export{IkasCustomerAttribute}from"./models/data/customer/attribute/index.js";export{IkasCustomerPriceListRuleFilter}from"./models/data/customer/price-list-rule/filter/index.js";export{IkasCustomerPriceListRule}from"./models/data/customer/price-list-rule/index.js";export{IkasCustomerReviewSettings}from"./models/data/customer/review/settings/index.js";export{IkasCustomerReviewSummaryStar}from"./models/data/customer/review/summary/star/index.js";export{IkasCustomerReviewSummary}from"./models/data/customer/review/summary/index.js";export{IkasCustomerReview}from"./models/data/customer/review/index.js";export{IkasCustomer}from"./models/data/customer/index.js";export{IkasCustomerRegisterSubscriptionInput}from"./models/data/customer-form-data-input/customer-register-subscription-input/index.js";export{IkasCustomerGenderTypeEnum,IkasSaveCustomerFormDataInput}from"./models/data/customer-form-data-input/index.js";export{IkasDistrict}from"./models/data/district/index.js";export{IkasFavoriteProduct}from"./models/data/favorite-product/index.js";export{IkasFilterCategory}from"./models/data/filter-category/index.js";export{IkasHTMLMetaDataTranslations}from"./models/data/html-meta-data/translations/index.js";export{IkasHTMLMetaData,IkasHTMLMetaDataOverride,IkasHTMLMetaDataTargetType}from"./models/data/html-meta-data/index.js";export{IkasImage}from"./models/data/image/index.js";export{IkasLastViewedProduct}from"./models/data/last-viewed-product/index.js";export{IkasMerchantSettings}from"./models/data/merchant-settings/index.js";export{IkasOrderAddressCity}from"./models/data/order/address/city/index.js";export{IkasOrderAddressCountry}from"./models/data/order/address/country/index.js";export{IkasOrderAddressDistrict}from"./models/data/order/address/district/index.js";export{IkasOrderAddressRegion}from"./models/data/order/address/region/index.js";export{IkasOrderAddressState}from"./models/data/order/address/state/index.js";export{IkasOrderAddress}from"./models/data/order/address/index.js";export{IkasOrderAdjustmentAppliedOrderLine}from"./models/data/order/adjustment/applied-order-line/index.js";export{IkasOrderAdjustment}from"./models/data/order/adjustment/index.js";export{IkasOrderCustomer}from"./models/data/order/customer/index.js";export{IkasOrderGiftPackageLine}from"./models/data/order/gift-line/index.js";export{IkasInvoice}from"./models/data/order/invoice/index.js";export{IkasOrderLineDiscount}from"./models/data/order/line-item/discount/index.js";export{IkasOrderLineItemOptionValue}from"./models/data/order/line-item/option/value/index.js";export{IkasOrderLineItemOption}from"./models/data/order/line-item/option/index.js";export{IkasOrderLineVariantBrand}from"./models/data/order/line-item/variant/brand/index.js";export{IkasOrderLineVariantCategory,IkasOrderLineVariantCategoryPath}from"./models/data/order/line-item/variant/category/index.js";export{IkasOrderLineVariantPrice}from"./models/data/order/line-item/variant/price/index.js";export{IkasOrderLineVariantVariantValue}from"./models/data/order/line-item/variant/value/index.js";export{IkasOrderLineVariant}from"./models/data/order/line-item/variant/index.js";export{IkasOrderLineItem}from"./models/data/order/line-item/index.js";export{IkasTrackingInfo}from"./models/data/order/package/tracking-info/index.js";export{IkasOrderPackage}from"./models/data/order/package/index.js";export{IkasOrderPaymentMethod}from"./models/data/order/payment-method/index.js";export{IkasOrderRefundOrderLineInput}from"./models/data/order/refund/line-item/index.js";export{IkasOrderRefundSettings}from"./models/data/order/refund/settings/index.js";export{IkasRefund}from"./models/data/order/refund/index.js";export{IkasOrderShippingLine}from"./models/data/order/shipping-line/index.js";export{IkasOrderTaxLine}from"./models/data/order/tax-line/index.js";export{IkasTransactionError}from"./models/data/order/transaction/error/index.js";export{IkasTransactionInstallmentPrice}from"./models/data/order/transaction/payment-method-detail/installment-price/index.js";export{IkasTransactionPaymentMethodDetail}from"./models/data/order/transaction/payment-method-detail/index.js";export{IkasOrderTransaction}from"./models/data/order/transaction/index.js";export{IkasOrder}from"./models/data/order/index.js";export{IkasPaymentGatewayAdditionalPrice}from"./models/data/payment-gateway/additional-price/index.js";export{IkasPaymentGatewaySettings}from"./models/data/payment-gateway/settings/index.js";export{IkasPaymentGatewayTranslation}from"./models/data/payment-gateway/translation/index.js";export{IkasPaymentGateway}from"./models/data/payment-gateway/index.js";export{IkasProductAttributeOption}from"./models/data/product/attribute/option/index.js";export{IkasProductAttributeTableCell}from"./models/data/product/attribute/table-cell/index.js";export{IkasProductAttributeTableTemplate}from"./models/data/product/attribute/table-template/index.js";export{IkasProductAttributeOptionTranslation,IkasProductAttributeTranslation}from"./models/data/product/attribute/translation/index.js";export{IkasProductAttribute}from"./models/data/product/attribute/index.js";export{IkasAttributeTableCellValue,IkasProductAttributeMap,IkasProductAttributeValue}from"./models/data/product/attribute-value/index.js";export{IkasProductBackInStockSettings}from"./models/data/product/back-in-stock-settings/index.js";export{IkasApplicableProductFilterValue,IkasFilterRangeValue,IkasProductFilter,IkasProductFilterNumberRangeListOption,IkasProductFilterSettings,IkasProductFilterValue,parseRangeStr}from"./models/data/product/filter/index.js";export{IkasProductCampaignData}from"./models/data/product/campaign/data/index.js";export{IkasProductCampaignFilter}from"./models/data/product/campaign/filter/index.js";export{IkasProductBuyX,IkasProductBuyXThenGetY,IkasProductGetY}from"./models/data/product/campaign/product-buyx-then-gety/index.js";export{IkasProductCampaignDateRangeField}from"./models/data/product/campaign/product-campaign-date-range-field/index.js";export{IkasCampaignMinMaxRangeField,IkasProductFixedDiscount}from"./models/data/product/campaign/product-fixed-discount/index.js";export{IkasProductCampaign}from"./models/data/product/campaign/index.js";export{IkasProductCampaignOffer,IkasProductOffer}from"./models/data/product/campaign-offer/index.js";export{IkasProductImage}from"./models/data/product/image/index.js";export{IkasProductOption,IkasProductOptionDateSettings,IkasProductOptionFileSettings,IkasProductOptionOtherPrice,IkasProductOptionSelectSettings,IkasProductOptionSelectValue,IkasProductOptionTextSettings}from"./models/data/product/option-set/option/index.js";export{IkasProductOptionSelectValueTranslations,IkasProductOptionSet,IkasProductOptionSetTranslations,IkasProductOptionTranslations}from"./models/data/product/option-set/index.js";export{IkasProductStockLocations}from"./models/data/product/stock-location/index.js";export{IkasProductTag}from"./models/data/product/tag/index.js";export{IkasProductPrice}from"./models/data/product/variant/price/index.js";export{IkasProductVariant}from"./models/data/product/variant/index.js";export{IkasProductVariantType}from"./models/data/product/variant-type/index.js";export{IkasProduct}from"./models/data/product/index.js";export{IkasProductFile}from"./models/data/product-file/index.js";export{IkasRaffle,IkasRaffleAppliedProduct,IkasRaffleDateRangeField,IkasRaffleMetaData,IkasRaffleParticipant}from"./models/data/raffle/index.js";export{IkasSalesChannel,IkasSalesChannelPaymentGateway,IkasSalesChannelStockLocation}from"./models/data/sales-channel/index.js";export{IkasShippingZoneRegion}from"./models/data/shipping-zone/state/city/district/region/index.js";export{IkasShippingZoneDistrict}from"./models/data/shipping-zone/state/city/district/index.js";export{IkasShippingZoneCity}from"./models/data/shipping-zone/state/city/index.js";export{IkasShippingZoneState}from"./models/data/shipping-zone/state/index.js";export{IkasShippingZone}from"./models/data/shipping-zone/index.js";export{IkasState}from"./models/data/state/index.js";export{IkasStockLocationAddressCity}from"./models/data/stock-location/address/city/index.js";export{IkasStockLocationAddressCountry}from"./models/data/stock-location/address/country/index.js";export{IkasStockLocationAddressDistrict}from"./models/data/stock-location/address/district/index.js";export{IkasStockLocationAddressState}from"./models/data/stock-location/address/state/index.js";export{IkasStockLocationAddress}from"./models/data/stock-location/address/index.js";export{IkasAvailableStockLocation}from"./models/data/stock-location/available/index.js";export{IkasStockLocation}from"./models/data/stock-location/index.js";export{IkasStorefrontPopupAnalytics}from"./models/data/storefront-popup/storefront-popup-analytics/index.js";export{IkasStorefrontPopupDateFilter}from"./models/data/storefront-popup/storefront-popup-date-filter/index.js";export{IkasStorefrontPopupDisplayFilter,IkasStorefrontPopupDisplayFilterTypeEnum}from"./models/data/storefront-popup/storefront-popup-display-filter/index.js";export{IkasStorefrontPopupDisplayFrequencyEnum,IkasStorefrontPopupDisplaySettings,IkasStorefrontPopupDisplayTriggerTypeEnum}from"./models/data/storefront-popup/storefront-popup-display-settings/index.js";export{IkasStorefrontPopupPageFilter,IkasStorefrontPopupPageFilterTypeEnum}from"./models/data/storefront-popup/storefront-popup-page-filter/index.js";export{IkasStorefrontPopupRouting}from"./models/data/storefront-popup/storefront-popup-routing/index.js";export{IkasStorefrontPopup,IkasStorefrontPopupDeviceTypeEnum,IkasStorefrontPopupStatusEnum,IkasStorefrontPopupTypeEnum}from"./models/data/storefront-popup/index.js";export{IkasStorefrontB2BSettings}from"./models/data/storefront/b2b-settings/index.js";export{IkasStorefrontDomain}from"./models/data/storefront/domain/index.js";export{IkasIndexPageSeoSetting}from"./models/data/storefront/index-page-seo-setting/index.js";export{IkasStorefrontLocalization}from"./models/data/storefront/localization/index.js";export{IkasStorefrontDynamicCurrencySettings}from"./models/data/storefront/routing/dynamic-currency/index.js";export{IkasStorefrontRouting}from"./models/data/storefront/routing/index.js";export{IkasStorefrontTheme}from"./models/data/storefront/theme/index.js";export{IkasStorefrontThemeLocalization}from"./models/data/storefront/theme-localization/index.js";export{IkasStorefront}from"./models/data/storefront/index.js";export{IkasThemeJsonComponentProp}from"./models/data/theme-json/component/prop/index.js";export{ComponentTranslation,IkasThemeJsonComponent}from"./models/data/theme-json/component/index.js";export{IkasThemeJsonCustomData,IkasThemeJsonCustomDataEnumOptionTranslation,IkasThemeJsonCustomDataTranslation,IkasThemeJsonEnumOption}from"./models/data/theme-json/custom-data/index.js";export{IkasThemeJsonPageComponent}from"./models/data/theme-json/page/component/index.js";export{IkasThemeJsonPage,IkasThemeJsonPageSpecification}from"./models/data/theme-json/page/index.js";export{IkasThemeJsonColor,IkasThemeJsonColorTranslation}from"./models/data/theme-json/settings/color/index.js";export{IkasThemeJsonFavicon}from"./models/data/theme-json/settings/favicon/index.js";export{IkasThemeJsonFontFamily}from"./models/data/theme-json/settings/font-family/index.js";export{IkasThemeJsonSettings}from"./models/data/theme-json/settings/index.js";export{CHECKOUT_ID,IkasThemeJson}from"./models/data/theme-json/index.js";export{IkasVariantValue}from"./models/data/variant-type/variant-value/index.js";export{IkasVariantType}from"./models/data/variant-type/index.js";export{IkasVideo}from"./models/data/video/index.js";export{AddressFormItem,BillingFormItem}from"@ikas/localized-address";export{IkasBlogList,IkasBlogListType}from"./models/ui/blog-list/index.js";export{IkasBlogCategoryList,IkasBlogCategoryListType}from"./models/ui/blog-category-list/index.js";export{IkasBrandList,IkasBrandListSortType,IkasBrandListType}from"./models/ui/brand-list/index.js";export{IkasCategoryList,IkasCategoryListSortType,IkasCategoryListType}from"./models/ui/category-list/index.js";export{IkasNavigationLink}from"./models/ui/navigation-link/index.js";export{IkasProductList,IkasProductListSortByTypeEnum,IkasProductListSortType,IkasProductListType,IkasRelatedProductsType}from"./models/ui/product-list/index.js";export{IkasAttributeDetail}from"./models/ui/product-attribute-detail/index.js";export{IkasAttributeList}from"./models/ui/product-attribute-list/index.js";export{IkasCustomerReviewList}from"./models/ui/customer-review-list/index.js";export{IkasCustomerReviewSummaryList}from"./models/ui/customer-review-summary-list/index.js";export{Validator}from"./models/ui/validator/index.js";export{EmailRule,EqualsRule,IdentityNumberRule,LessThanRule,MaxRule,MinRule,PhoneRule,RequiredRule,ValidationRule,ValidatorErrorType}from"./models/ui/validator/rules/index.js";export{LoginForm}from"./models/ui/validator/form/login.js";export{AddressForm}from"./models/ui/validator/form/address.js";export{IkasAddressForm}from"./models/ui/validator/form/ikas-address.js";export{RegisterForm}from"./models/ui/validator/form/register.js";export{ContactForm}from"./models/ui/validator/form/contact-form.js";export{ForgotPasswordForm}from"./models/ui/validator/form/forgot-password.js";export{RecoverPasswordForm}from"./models/ui/validator/form/recover-password.js";export{AccountInfoForm}from"./models/ui/validator/form/account-info.js";export{RaffleForm}from"./models/ui/validator/form/raffle-form.js";export{CustomerReviewForm}from"./models/ui/validator/form/customer-review.js";export{IkasComponentRenderer}from"./models/ui/component-renderer/index.js";export{IkasRaffleList}from"./models/ui/raffle-list/index.js";import*as e from"./pages/home.js";export{e as IndexPage};import*as t from"./pages/_slug_/index.js";export{t as SlugPage};import*as o from"./pages/pages/_slug_.js";export{o as CustomPage};import*as a from"./pages/checkout.js";export{a as CheckoutPage};import*as r from"./pages/account/index.js";export{r as AccountPage};import*as s from"./pages/account/addresses.js";export{s as AddressesPage};import*as d from"./pages/account/orders/index.js";export{d as OrdersPage};import*as i from"./pages/account/orders/_id_.js";export{i as OrderDetailPage};import*as n from"./pages/account/login.js";export{n as LoginPage};import*as m from"./pages/account/register.js";export{m as RegisterPage};import*as p from"./pages/account/forgot-password.js";export{p as ForgotPasswordPage};import*as l from"./pages/account/recover-password.js";export{l as RecoverPasswordPage};import*as x from"./pages/cart.js";export{x as CartPage};import*as u from"./pages/editor.js";export{u as EditorPage};import*as c from"./pages/account/favorite-products.js";export{c as FavoriteProductsPage};import*as f from"./pages/search.js";export{f as SearchPage};import*as k from"./pages/404.js";export{k as NotFoundPage};import*as I from"./pages/blog/index.js";export{I as BlogPage};import*as g from"./pages/blog/_slug_.js";export{g as BlogSlugPage};import*as j from"./pages/raffle/_slug_.js";export{j as RafflePage};import*as y from"./pages/raffle/index.js";export{y as RafflesPage};import*as P from"./pages/account/raffles.js";export{P as AccountRafflesPage};import*as S from"./pages/account/activate.js";export{S as ActivateCustomerPage};export{IkasBaseStore}from"./store/base.js";export{IkasCustomerStore}from"./store/customer/index.js";export{IkasCartStore}from"./store/cart/index.js";export{formatDate}from"./utils/helper.js";export{formatCurrency}from"./utils/currency.js";export{createTranslationInputData,useTranslation}from"./utils/i18n.js";export{IkasAdjustmentType,IkasAmountType,IkasCampaignApplicablePrice,IkasCampaignCreatedFor,IkasCampaignFilterType,IkasCampaignOfferProductShowCriteria,IkasCampaignOfferTargetPageType,IkasCampaignType,IkasCartCampaignOfferStatus,IkasCategoryProductsOrderType as IkasCategoryOrderType,IkasCheckoutRequirement,IkasCustomerAccountStatus,IkasCustomerAttributeType,IkasCustomerEmailSubscriptionStatus,IkasCustomerPriceListRuleFilterType,IkasCustomerPriceListRuleValueType,IkasCustomerRegistrationSource,IkasCustomerReviewStatus,IkasInvoiceType,IkasOrderCancelReason,IkasOrderLineItemStatus,IkasOrderPackageFullfillStatus,IkasOrderPackageStatus,IkasOrderPaymentStatus,IkasOrderShippingMethod,IkasOrderStatus,IkasPaymentGatewayAdditionalPriceType,IkasPaymentGatewaySettingsType,IkasPaymentGatewayTransactionFeeType,IkasPaymentGatewayType,IkasPaymentMethodType,IkasProductAttributeType,IkasProductFilterDisplayType,IkasProductFilterSortType,IkasProductFilterType,IkasProductOptionSelectType,IkasProductOptionType,IkasProductStockFilterValue,IkasProductType,IkasRaffleMetadataTargetType,IkasRaffleVerificationType,IkasShippingMethod,IkasStockLocationDeliveryTime,IkasStockLocationType,IkasStorefrontB2BShowPricesEnum,IkasStorefrontB2BShowProductsEnum,IkasStorefrontStatus,IkasThemeJsonComponentPropType,IkasThemeJsonPageType,IkasThemeJsonStockPreference,IkasTransactionStatus,IkasTransactionType,IkasVariantSelectionType}from"@ikas/storefront-models";
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { IkasCheckoutSettings as ICheckoutSettings, IkasCheckoutRequirement, IkasCouponCodeRequirement } from "@ikas/storefront-models";
|
|
1
|
+
import { IkasCheckoutSettings as ICheckoutSettings, IkasCheckoutRequirement, IkasCorporateInvoiceRequirement, IkasCouponCodeRequirement } from "@ikas/storefront-models";
|
|
2
2
|
import { IkasBaseModel } from "../base";
|
|
3
3
|
import { IkasCheckoutOption } from "./option";
|
|
4
4
|
import { IkasCheckoutSettingsPrice } from "./price";
|
|
5
5
|
export declare class IkasCheckoutSettings extends IkasBaseModel implements ICheckoutSettings {
|
|
6
|
+
corporateInvoiceRequirement: IkasCorporateInvoiceRequirement | null;
|
|
6
7
|
giftPackagePriceList: IkasCheckoutSettingsPrice[] | null;
|
|
7
8
|
identityNumberRequirement: IkasCheckoutRequirement | null;
|
|
8
9
|
isAccountRequired: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__extends as e}from'./../../../ext/tslib/tslib.es6.js';import{IkasCouponCodeRequirement as o}from"@ikas/storefront-models";export{IkasCheckoutRequirement}from"@ikas/storefront-models";import{IkasBaseModel as i}from"../base/index.js";import{IkasCheckoutOption as
|
|
1
|
+
import{__extends as e}from'./../../../ext/tslib/tslib.es6.js';import{IkasCouponCodeRequirement as o}from"@ikas/storefront-models";export{IkasCheckoutRequirement}from"@ikas/storefront-models";import{IkasBaseModel as i}from"../base/index.js";import{IkasCheckoutOption as n}from"./option/index.js";import{IkasCheckoutSettingsPrice as t}from"./price/index.js";var r=function(i){function r(e){var r,s,u=this;return(u=i.call(this,e)||this).corporateInvoiceRequirement=null,u.giftPackagePriceList=null,u.identityNumberRequirement=null,u.isGiftPackageEnabled=null,u.isShowPostalCode=null,u.isTermsAndConditionsDefaultChecked=null,u.options=null,u.postalCodeRequirement=null,u.couponCodeRequirement=null,u.showCheckoutNote=null,u.corporateInvoiceRequirement=e.corporateInvoiceRequirement||null,u.giftPackagePriceList=(null===(r=e.giftPackagePriceList)||void 0===r?void 0:r.map((function(e){return new t(e)})))||null,u.identityNumberRequirement=e.identityNumberRequirement,u.isAccountRequired=e.isAccountRequired,u.isGiftPackageEnabled=e.isGiftPackageEnabled,u.isQuickRegistrationEnabled=e.isQuickRegistrationEnabled,u.isShowPostalCode=e.isShowPostalCode,u.isTermsAndConditionsDefaultChecked=e.isTermsAndConditionsDefaultChecked,u.options=(null===(s=e.options)||void 0===s?void 0:s.map((function(e){return new n(e)})))||null,u.phoneRequirement=e.phoneRequirement,u.postalCodeRequirement=e.postalCodeRequirement||null,u.couponCodeRequirement=e.couponCodeRequirement||o.DEFAULT,u.showCheckoutNote=e.showCheckoutNote||null,u.showTermsAndConditionsCheckbox=e.showTermsAndConditionsCheckbox,u.storefrontId=e.storefrontId,u}return e(r,i),r}(i);export{r as IkasCheckoutSettings};
|
|
@@ -129,6 +129,13 @@ export * from "./stock-location/address/state";
|
|
|
129
129
|
export * from "./stock-location/address";
|
|
130
130
|
export * from "./stock-location/available";
|
|
131
131
|
export * from "./stock-location";
|
|
132
|
+
export * from "./storefront-popup/storefront-popup-analytics";
|
|
133
|
+
export * from "./storefront-popup/storefront-popup-date-filter";
|
|
134
|
+
export * from "./storefront-popup/storefront-popup-display-filter";
|
|
135
|
+
export * from "./storefront-popup/storefront-popup-display-settings";
|
|
136
|
+
export * from "./storefront-popup/storefront-popup-page-filter";
|
|
137
|
+
export * from "./storefront-popup/storefront-popup-routing";
|
|
138
|
+
export * from "./storefront-popup";
|
|
132
139
|
export * from "./storefront/b2b-settings";
|
|
133
140
|
export * from "./storefront/domain";
|
|
134
141
|
export * from "./storefront/index-page-seo-setting";
|
|
@@ -2,6 +2,7 @@ import { IkasCampaignApplicablePrice, IkasCampaignCreatedFor, IkasCampaignType,
|
|
|
2
2
|
import { IkasProductBuyXThenGetY } from "../product-buyx-then-gety";
|
|
3
3
|
import { IkasProductCampaignDateRangeField } from "../product-campaign-date-range-field";
|
|
4
4
|
import { IkasProductFixedDiscount } from "../product-fixed-discount";
|
|
5
|
+
import { IkasProductTieredDiscount } from "../product-tiered-discount";
|
|
5
6
|
export declare class IkasProductCampaignData implements IProductCampaignData {
|
|
6
7
|
applicableCustomerGroupIds: string[] | null;
|
|
7
8
|
applicableCustomerIds: string[] | null;
|
|
@@ -22,6 +23,7 @@ export declare class IkasProductCampaignData implements IProductCampaignData {
|
|
|
22
23
|
usageCount: number;
|
|
23
24
|
usageLimit: number | null;
|
|
24
25
|
usageLimitPerCustomer: number | null;
|
|
26
|
+
tieredDiscount: IkasProductTieredDiscount | null;
|
|
25
27
|
constructor(data: IProductCampaignData);
|
|
26
28
|
}
|
|
27
29
|
export { IkasCampaignApplicablePrice, IkasCampaignCreatedFor, IkasCampaignType, };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{IkasCampaignApplicablePrice as e,IkasCampaignType as t}from"@ikas/storefront-models";export{IkasCampaignApplicablePrice,IkasCampaignCreatedFor,IkasCampaignType}from"@ikas/storefront-models";import{IkasProductBuyXThenGetY as i}from"../product-buyx-then-gety/index.js";import{IkasProductCampaignDateRangeField as s}from"../product-campaign-date-range-field/index.js";import{IkasProductFixedDiscount as n}from"../product-fixed-discount/index.js";var a=function(a){this.applicableCustomerGroupIds=a.applicableCustomerGroupIds||null,this.applicableCustomerIds=a.applicableCustomerIds||null,this.applicablePrice=a.applicablePrice||e.DISCOUNT_PRICE,this.buyXThenGetY=a.buyXThenGetY?new i(a.buyXThenGetY):new i,this.canCombineWithOtherCampaigns=a.canCombineWithOtherCampaigns||!1,this.createdFor=a.createdFor||null,this.currencyCodes=a.currencyCodes||null,this.dateRange=a.dateRange?new s(a.dateRange):null,this.deleted=a.deleted||!1,this.fixedDiscount=a.fixedDiscount?new n(a.fixedDiscount):null,this.hasCoupon=a.hasCoupon||!1,this.id=a.id||"",this.includeDiscountedProducts=a.includeDiscountedProducts||null,this.salesChannelIds=a.salesChannelIds||null,this.title=a.title||"",this.type=a.type||t.BUY_X_THEN_GET_Y,this.usageCount=a.usageCount||0,this.usageLimit=a.usageLimit||null,this.usageLimitPerCustomer=a.usageLimitPerCustomer||null};export{a as IkasProductCampaignData};
|
|
1
|
+
import{IkasCampaignApplicablePrice as e,IkasCampaignType as t}from"@ikas/storefront-models";export{IkasCampaignApplicablePrice,IkasCampaignCreatedFor,IkasCampaignType}from"@ikas/storefront-models";import{IkasProductBuyXThenGetY as i}from"../product-buyx-then-gety/index.js";import{IkasProductCampaignDateRangeField as s}from"../product-campaign-date-range-field/index.js";import{IkasProductFixedDiscount as n}from"../product-fixed-discount/index.js";import{IkasProductTieredDiscount as o}from"../product-tiered-discount/index.js";var a=function(a){this.applicableCustomerGroupIds=a.applicableCustomerGroupIds||null,this.applicableCustomerIds=a.applicableCustomerIds||null,this.applicablePrice=a.applicablePrice||e.DISCOUNT_PRICE,this.buyXThenGetY=a.buyXThenGetY?new i(a.buyXThenGetY):new i,this.canCombineWithOtherCampaigns=a.canCombineWithOtherCampaigns||!1,this.createdFor=a.createdFor||null,this.currencyCodes=a.currencyCodes||null,this.dateRange=a.dateRange?new s(a.dateRange):null,this.deleted=a.deleted||!1,this.fixedDiscount=a.fixedDiscount?new n(a.fixedDiscount):null,this.hasCoupon=a.hasCoupon||!1,this.id=a.id||"",this.includeDiscountedProducts=a.includeDiscountedProducts||null,this.salesChannelIds=a.salesChannelIds||null,this.title=a.title||"",this.type=a.type||t.BUY_X_THEN_GET_Y,this.usageCount=a.usageCount||0,this.usageLimit=a.usageLimit||null,this.usageLimitPerCustomer=a.usageLimitPerCustomer||null,this.tieredDiscount=a.tieredDiscount?new o(a.tieredDiscount):null};export{a as IkasProductCampaignData};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { IkasProductCampaignFilter } from "../filter";
|
|
2
|
+
import { IkasProductTieredDiscountRule as IProductTieredDiscountRule, IkasProductTieredDiscount as IProductTieredDiscount, IkasCampaignMinMaxRangeField as ICampaignMinMaxRangeField } from "@ikas/storefront-models";
|
|
3
|
+
export declare class IkasCampaignMinMaxRangeField implements ICampaignMinMaxRangeField {
|
|
4
|
+
min: number | null;
|
|
5
|
+
max: number | null;
|
|
6
|
+
constructor(data: ICampaignMinMaxRangeField);
|
|
7
|
+
}
|
|
8
|
+
export declare class IkasProductTieredDiscountRule implements IProductTieredDiscountRule {
|
|
9
|
+
amount: number | null;
|
|
10
|
+
lineItemQuantityRange: IkasCampaignMinMaxRangeField | null;
|
|
11
|
+
priceRange: IkasCampaignMinMaxRangeField | null;
|
|
12
|
+
constructor(data: IProductTieredDiscountRule);
|
|
13
|
+
}
|
|
14
|
+
export declare class IkasProductTieredDiscount implements IProductTieredDiscount {
|
|
15
|
+
filters: IkasProductCampaignFilter | null;
|
|
16
|
+
isApplyByCartAmount: boolean | null;
|
|
17
|
+
rules: IkasProductTieredDiscountRule[];
|
|
18
|
+
shouldMatchAllConditions: boolean | null;
|
|
19
|
+
constructor(data: IProductTieredDiscount);
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{IkasProductCampaignFilter as n}from"../filter/index.js";var t=function(n){this.min=n.min||null,this.max=n.max||null},i=function(n){this.amount=n.amount||null,this.lineItemQuantityRange=n.lineItemQuantityRange?new t(n.lineItemQuantityRange):null,this.priceRange=n.priceRange?new t(n.priceRange):null},l=function(t){this.filters=t.filters?new n(t.filters):null,this.isApplyByCartAmount=t.isApplyByCartAmount||null,this.shouldMatchAllConditions=t.shouldMatchAllConditions||null,this.rules=t.rules?t.rules.map((function(n){return new i(n)})):[]};export{t as IkasCampaignMinMaxRangeField,l as IkasProductTieredDiscount,i as IkasProductTieredDiscountRule};
|
|
@@ -5,7 +5,7 @@ import { IkasProductVariantType } from "./variant-type";
|
|
|
5
5
|
import { IkasBrand } from "../brand";
|
|
6
6
|
import { IkasHTMLMetaData } from "../html-meta-data";
|
|
7
7
|
import { IkasProductTag } from "./tag";
|
|
8
|
-
import { IkasProduct as IProduct, IkasAppliedCampaignOffer, IkasProductType } from "@ikas/storefront-models";
|
|
8
|
+
import { IkasProduct as IProduct, IkasAppliedCampaignOffer, IkasProductType, IkasCampaignType } from "@ikas/storefront-models";
|
|
9
9
|
import { IkasProductOptionSet } from "./option-set";
|
|
10
10
|
import { IkasVariantValue } from "../variant-type/variant-value";
|
|
11
11
|
import { IkasProductCampaign } from "./campaign";
|
|
@@ -56,6 +56,8 @@ export declare class IkasProduct implements IProduct {
|
|
|
56
56
|
offers?: IkasProductOffer[];
|
|
57
57
|
private productGroupItems?;
|
|
58
58
|
showVariantsInGroup: boolean;
|
|
59
|
+
tieredDiscountProducts?: IkasProductTieredDiscountItem[];
|
|
60
|
+
customerReviews?: IkasCustomerReviewList | null;
|
|
59
61
|
constructor(data?: Partial<IkasProduct>);
|
|
60
62
|
get hasVariant(): boolean;
|
|
61
63
|
get hasStock(): boolean;
|
|
@@ -85,6 +87,22 @@ export declare class IkasProduct implements IProduct {
|
|
|
85
87
|
initBundleProducts: () => Promise<void>;
|
|
86
88
|
setShowVariantsInGroup: (value: boolean) => void;
|
|
87
89
|
getBundleProductsOfVariant: (variant: IkasProductVariant) => Promise<void>;
|
|
90
|
+
getTieredCampaignProducts: () => Promise<{
|
|
91
|
+
amount: number | null;
|
|
92
|
+
lineItemQuantityRange: {
|
|
93
|
+
min: number;
|
|
94
|
+
max: number;
|
|
95
|
+
};
|
|
96
|
+
type: IkasCampaignType;
|
|
97
|
+
sellPrice: number;
|
|
98
|
+
finalPrice: number;
|
|
99
|
+
sellPriceWithQuantity: number;
|
|
100
|
+
finalPriceWithQuantity: number;
|
|
101
|
+
formattedSellPrice: string;
|
|
102
|
+
formattedSellPriceWithQuantity: string;
|
|
103
|
+
formattedFinalPrice: string;
|
|
104
|
+
formattedFinalPriceWithQuantity: string;
|
|
105
|
+
}[]>;
|
|
88
106
|
private setOptionPrices;
|
|
89
107
|
}
|
|
90
108
|
export { IkasProductType };
|
|
@@ -115,3 +133,20 @@ export declare type IkasDisplayedProductGroupItem = {
|
|
|
115
133
|
value: string;
|
|
116
134
|
isSelected: boolean;
|
|
117
135
|
};
|
|
136
|
+
declare type IkasProductTieredDiscountItem = {
|
|
137
|
+
amount: number | null;
|
|
138
|
+
lineItemQuantityRange: {
|
|
139
|
+
min: number;
|
|
140
|
+
max: number;
|
|
141
|
+
};
|
|
142
|
+
type: IkasCampaignType;
|
|
143
|
+
sellPrice: number;
|
|
144
|
+
sellPriceWithQuantity: number;
|
|
145
|
+
finalPriceWithQuantity: number;
|
|
146
|
+
finalPrice: number;
|
|
147
|
+
formattedSellPrice: string;
|
|
148
|
+
formattedSellPriceWithQuantity: string;
|
|
149
|
+
formattedFinalPrice: string;
|
|
150
|
+
formattedFinalPriceWithQuantity: string;
|
|
151
|
+
};
|
|
152
|
+
export type { IkasProductTieredDiscountItem };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__spreadArray as t,__assign as e,__awaiter as n,__generator as i}from'./../../../ext/tslib/tslib.es6.js';import r from"lodash/sortBy";import a from"lodash/cloneDeep";import{IkasCategory as o}from"../category/index.js";import{IkasProductVariant as u}from"./variant/index.js";import{IkasProductAttributeValue as s}from"./attribute-value/index.js";import{IkasProductVariantType as c}from"./variant-type/index.js";import{IkasBrand as d}from"../brand/index.js";import{IkasHTMLMetaData as l}from"../html-meta-data/index.js";import{IkasProductTag as p}from"./tag/index.js";import{IkasProductType as f}from"@ikas/storefront-models";export{IkasProductType}from"@ikas/storefront-models";import{IkasProductOptionSet as h}from"./option-set/index.js";import{makeObservable as v,observable as m,computed as g}from"mobx";import{IkasProductFunctions as b}from"@ikas/storefront-model-functions";import{IkasProductCampaign as V}from"./campaign/index.js";import{IkasStorefrontConfig as y}from"@ikas/storefront-config";import{IkasBaseStore as I}from"../../../store/base.js";import P from"lodash/groupBy";import{IkasProductBaseUnit as w}from"./base-unit/index.js";import{formatCurrency as O}from"../../../utils/currency.js";import"lodash/get";import S from"../../../store/product/index.js";import{IkasCustomerReviewList as j}from"../../ui/customer-review-list/index.js";import{IkasProductStar as T}from"./star/index.js";import{IkasProductCampaignOffer as C,IkasProductOffer as x}from"./campaign-offer/index.js";import{IkasProductGroup as G}from"./group/index.js";import{IkasImage as E}from"../image/index.js";import{IkasProductSalesChannel as k}from"./sales-channel/index.js";var A=function(){function A(b){void 0===b&&(b={});var P,E,L,R=this;this.metaData=null,this.brand=null,this.tags=null,this.productOptionSetId=null,this.productOptionSet=null,this.campaigns=null,this.selectedVariantValues=[],this.isFiltered=!1,this.isStatic=!1,this.bundleProductCache={},this.productGroupItems=[],this.showVariantsInGroup=!1,this.selectVariantValue=function(n,i){var r,a=R.metaData,o=R.selectedVariantValues.map((function(t){return t.variantTypeId===n.variantTypeId?n:t})),u=R.variants.find((function(t){return t.isActive&&o.every((function(e){return t.variantValues.some((function(t){return t.id===e.id}))}))}));if(u)R.selectedVariantValues=o;else{var s=R.variantTypes.findIndex((function(t){return t.variantType.id===n.variantTypeId}));if(s>0){var c=R.variantTypes.slice(0,s),d=R.selectedVariantValues.filter((function(t){return c.some((function(e){return e.variantType.id===t.variantTypeId}))})),l=t(t([],d,!0),[n],!1);u=R.variants.find((function(t){return t.isActive&&l.every((function(e){return t.variantValues.some((function(t){return t.id===e.id}))}))}))}else{var p=o.slice(0,o.length-1);(u=R.variants.find((function(t){return t.isActive&&p.every((function(e){return t.variantValues.some((function(t){return t.id===e.id}))}))})))||(u=R.variants.find((function(t){return t.isActive&&t.variantValues.some((function(t){return t.id===n.id}))})))}if(!u)return;R.selectedVariantValues=u.variantValues}var f={};new URLSearchParams(window.location.search).forEach((function(t,n){var i;"vid"!==n&&(f=e(e({},f),((i={})[n]=t,i)))})),R.variantTypes.map((function(t){delete f[t.variantType.slug]}));var h=t(t([],R.variantTypes.map((function(t){var e=t.variantType,n=e.values.find((function(t){return R.selectedVariantValues.some((function(e){return e.id===t.id}))}));if(n)return"".concat(e.slug,"=").concat(n.slug)})),!0),Object.entries(f).map((function(t){var e=t[0],n=t[1];return"".concat(e,"=").concat(n)})),!0).filter((function(t){return!!t})).join("&");if(!i){var v="/".concat(a.slug);if(h&&(v="/".concat(a.slug,"?").concat(h)),v===window.location.pathname)return;null===(r=I.getInstance().router)||void 0===r||r.replace(v,void 0,{shallow:!1,scroll:!1})}},this.getVariantUnitPriceText=function(t){var e,n,i=t.price;if(i.unitPrice&&R.baseUnit){var r=R.baseUnit.baseAmount,a=(null===(n=null===(e=R.baseUnit)||void 0===e?void 0:e.unit)||void 0===n?void 0:n.name)||"";return"".concat(O(i.unitPrice,i.currency||"",i.currencySymbol||"")," / ").concat(r&&1!==r?r:"").concat(a)}},this.getCampaigns=function(){return n(R,void 0,void 0,(function(){var t,e,n,r,a,o=this;return i(this,(function(i){switch(i.label){case 0:return t=I.getInstance(),e=t.customerStore.customer,n=e?e.customerGroupIds:null,r=this.variants.map((function(t){return t.id})),[4,S.getProductCampaigns({input:{customerGroupIds:n,salesChannelId:y.getSalesChannelId()||"",variantIds:r}})];case 1:return a=i.sent(),this.campaigns=a.data,this.campaigns?(this.campaigns.map((function(t){o.variants.map((function(e){var n;t.variantIds.some((function(t){return t===e.id}))&&(null===(n=e.campaigns)||void 0===n||n.push(t))}))})),[2,this.campaigns]):[2]}}))}))},this.getAvailableStockLocations=function(){return n(R,void 0,void 0,(function(){var t,e;return i(this,(function(n){switch(n.label){case 0:return t=this.variants.map((function(t){return t.id})),e=y.getPickupStockLocationIds(),[4,S.getVariantStockLocations({stockLocationIdList:e,variantIds:t})];case 1:return[2,n.sent().data||[]]}}))}))},this.getCustomerReviews=function(t){return n(R,void 0,void 0,(function(){var n,r,a,o,u;return i(this,(function(i){switch(i.label){case 0:return n=!!(null===(o=this.selectedVariant.bundleSettings)||void 0===o?void 0:o.products.length),r=[this.id],n&&(null===(u=this.selectedVariant.bundleSettings)||void 0===u||u.products.forEach((function(t){r.push(t.productId)}))),[4,(a=new j(e(e(e({},n?{}:{productId:this.id}),{limit:null==t?void 0:t.limit,page:null==t?void 0:t.page,hasImage:null==t?void 0:t.hasImage}),n?{productIds:r}:{}))).getInitial()];case 1:return i.sent(),[2,a]}}))}))},this.getProductOptionSet=function(){return n(R,void 0,void 0,(function(){var t,e;return i(this,(function(n){switch(n.label){case 0:return this.productOptionSet?[2,!0]:this.productOptionSetId?[4,S.listProductOptionSet({id:{eq:this.productOptionSetId}})]:[2,!1];case 1:return(t=n.sent()).isSuccess&&(null===(e=t.data)||void 0===e?void 0:e.length)?(this.productOptionSet=t.data[0],this.setOptionPrices(),[2,!0]):[2,!1]}}))}))},this.initBundleProducts=function(){return n(R,void 0,void 0,(function(){var t,e,n,r,a,o;return i(this,(function(i){switch(i.label){case 0:return t="","undefined"!=typeof window&&(e=new URLSearchParams(window.location.search),t=e.get("editLineID")||""),t?(n=null===(a=I.getInstance().cartStore.cart)||void 0===a?void 0:a.items.find((function(e){return e.id===t})))&&(r=this.variants.find((function(t){return t.id===n.variant.id})))?(this.selectedVariantValues=r.variantValues,[4,this.getBundleProductsOfVariant(r)]):[3,2]:[3,3];case 1:i.sent(),null===(o=r.bundleSettings)||void 0===o||o.products.forEach((function(t){var e,i,r;try{var a=null===(e=n.variant.bundleProducts)||void 0===e?void 0:e.find((function(e){return e.id===t.id})),o=t.product.variants.find((function(t){return t.id===(null==a?void 0:a.variant.id)}));t.product.selectedVariantValues=o.variantValues,t.quantity=(null===(r=null===(i=n.variant.bundleProducts)||void 0===i?void 0:i.find((function(t){return t.variant.id===o.id})))||void 0===r?void 0:r.quantity)||0}catch(t){console.error(t)}})),i.label=2;case 2:return[3,5];case 3:return[4,this.getBundleProductsOfVariant(this.selectedVariant)];case 4:i.sent(),i.label=5;case 5:return[2]}}))}))},this.setShowVariantsInGroup=function(t){R.showVariantsInGroup=t},this.getBundleProductsOfVariant=function(t){return n(R,void 0,void 0,(function(){var e,n,r,o,u,s,c=this;return i(this,(function(i){switch(i.label){case 0:return(null==(e=null===(r=t.bundleSettings)||void 0===r?void 0:r.products.map((function(t){return t.productId})).filter((function(t){return-1===Object.keys(c.bundleProductCache).indexOf(t)})))?void 0:e.length)?[4,S.searchProducts({input:{productIdList:e,perPage:200}})]:[3,2];case 1:(n=i.sent()).isSuccess&&(null===(u=null===(o=n.data)||void 0===o?void 0:o.data)||void 0===u||u.forEach((function(t){c.bundleProductCache[t.id]=t}))),i.label=2;case 2:return null===(s=t.bundleSettings)||void 0===s||s.products.forEach((function(t){var e=c.bundleProductCache[t.productId];t.setProduct(new A(a(e)))})),[2]}}))}))},this.setOptionPrices=function(){var t,e=R.variants[0];if(e){var n=e.price.currency;null===(t=R.productOptionSet)||void 0===t||t.options.forEach((function(t){var e;t.selectSettings&&t.selectSettings.values.forEach((function(t){var e;t.otherPrices&&(t.price=(null===(e=t.otherPrices.find((function(t){return t.currencyCode===n})))||void 0===e?void 0:e.price)||t.price)})),t.otherPrices&&(t.price=(null===(e=t.otherPrices.find((function(t){return t.currencyCode===n})))||void 0===e?void 0:e.price)||t.price)}))}},this.id=b.id||Date.now()+"",this.name=b.name||"",this.type=b.type||f.PHYSICAL,this.description=b.description||"",this.shortDescription=b.shortDescription||"",this.metaData=b.metaData?new l(b.metaData):null,this.brand=b.brand?new d(b.brand):null,this.categories=b.categories?b.categories.map((function(t){return new o(t)})):[],this.deleted=b.deleted||null,this.tags=b.tags?b.tags.map((function(t){return new p(t)})):[],this.variants=b.variants?b.variants.map((function(t){return new u(t)})):[],this.attributes=b.attributes?b.attributes.map((function(t){return new s(t)})):[],this.variantTypes=b.variantTypes?b.variantTypes.map((function(t){return new c(t)})):[],this.productOptionSetId=b.productOptionSetId||null,this.averageRating=null!==(P=b.averageRating)&&void 0!==P?P:null,this.reviewCount=null!==(E=b.reviewCount)&&void 0!==E?E:null,this.stars=b.stars?b.stars.map((function(t){return new T(t)})):null,this.baseUnit=b.baseUnit?new w(b.baseUnit):null,this.productOptionSet=b.productOptionSet?new h(b.productOptionSet):null,this.campaigns=(null===(L=b.campaigns)||void 0===L?void 0:L.map((function(t){return new V(t)})))||null,this.selectedVariantValues=b.selectedVariantValues||[],this.variantTypes=r(this.variantTypes,"order"),this.groupVariantsByVariantTypeId=b.groupVariantsByVariantTypeId||null,this.dynamicPriceListIds=b.dynamicPriceListIds||null,this.productVolumeDiscountId=b.productVolumeDiscountId||null,this.campaignOffers=b.campaignOffers?b.campaignOffers.map((function(t){return new C(t)})):null,this.appliedCampaignOffer=b.appliedCampaignOffer,this.offers=b.offers?b.offers.map((function(t){return new x(t)})):void 0,this.productGroup=b.productGroup?new G(b.productGroup):null,this.salesChannels=b.salesChannels?b.salesChannels.map((function(t){return new k(t)})):null,this.productGroupItems=b.productGroupItems,this.setOptionPrices(),this.variants.forEach((function(t){return t.product=R})),v(this,{selectedVariantValues:m,isFiltered:m,isStatic:m,showVariantsInGroup:m,hasVariant:g,hasStock:g,hasValidProductOptionValues:g,href:g,productHref:g,mainVariantType:g,mainVariantValue:g,selectedVariant:g,displayedVariantTypes:g,isCustomerReviewEnabled:g,isCustomerReviewLoginRequired:g,isAddToCartEnabled:g,groupedAttributeValues:g,selectedVariantUnitPriceText:g,displayedProductGroups:g})}return Object.defineProperty(A.prototype,"hasVariant",{get:function(){return b.hasVariant(this,this.showVariantsInGroup)},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"hasStock",{get:function(){return this.isStatic?this.selectedVariant.hasStock:b.hasStock(this)},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"hasValidProductOptionValues",{get:function(){return!this.productOptionSet||this.productOptionSet.hasValidValues},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"href",{get:function(){return b.getSelectedVariantHref(this,this.selectedVariantValues)},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"productHref",{get:function(){return this.groupVariantsByVariantTypeId||this.isFiltered?this.href:b.getProductHref(this)},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"mainVariantType",{get:function(){return b.getMainVariantType(this)},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"mainVariantValue",{get:function(){return b.getMainVariantValue(this.selectedVariantValues)},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"selectedVariant",{get:function(){if(!this.hasVariant)return this.variants[0];var t=this.selectedVariantValues.map((function(t){return t.id}));return this.variants.find((function(e){return e.variantValues.every((function(e){return t.includes(e.id)}))}))},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"displayedVariantTypes",{get:function(){return this.hasVariant?b.getDisplayedVariantTypes(this,this.selectedVariantValues):[]},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"isCustomerReviewEnabled",{get:function(){return y.isCustomerReviewEnabled()},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"isCustomerReviewLoginRequired",{get:function(){return y.isCustomerReviewLoginRequired()},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"isAddToCartEnabled",{get:function(){var t,e=!0;return null===(t=this.selectedVariant.bundleSettings)||void 0===t||t.products.forEach((function(t){0===t.quantity&&null!==t.minQuantity&&0!==t.minQuantity&&(e=!1)})),e&&this.hasValidProductOptionValues&&(this.selectedVariant.hasStock||this.selectedVariant.sellIfOutOfStock)},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"groupedAttributeValues",{get:function(){var t,e=P(this.attributes,"productAttributeId");return(null===(t=this.attributes)||void 0===t?void 0:t.map((function(t){var n=t.productAttributeId;if(n){var i=e[n];return(null==i?void 0:i.length)&&i[0].productAttribute?{attribute:i[0].productAttribute,values:i}:void 0}})).filter((function(t){return!!t})))||[]},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"selectedVariantUnitPriceText",{get:function(){return this.getVariantUnitPriceText(this.selectedVariant)},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"displayedProductGroups",{get:function(){var e,n=this,i=[],a=[];return null===(e=this.productGroupItems)||void 0===e||e.forEach((function(t){t.groupValues.forEach((function(t){i.includes(t.name)||i.push(t.name)}))})),i.forEach((function(e){var i,o={name:e,items:[]};n.productGroupItems=r(n.productGroupItems,(function(t){var e;return parseInt((null===(e=t.order)||void 0===e?void 0:e.value)||"999",10)})),null===(i=n.productGroupItems)||void 0===i||i.forEach((function(i){var r,a,u,s=i.groupValues.find((function(t){return t.name===e}));if(s&&!o.items.some((function(t){return t.value===s.value}))){var c="";if(i.productId===n.id)c=n.href;else{var d=(null===(r=n.productGroup)||void 0===r?void 0:r.values.filter((function(t){return t.name!==e})))||[],l=t(t([],d,!0),[s],!1),p=null===(a=n.productGroupItems)||void 0===a?void 0:a.find((function(t){return l.every((function(e){return t.groupValues.some((function(t){return e.name===t.name&&e.value===t.value}))}))}));c=p?p.href:i.href}o.items.push({image:i.image?new E(i.image):null,href:c,value:s.value,isSelected:(null===(u=n.productGroupItems)||void 0===u?void 0:u.some((function(t){return t.groupValues.some((function(t){return t.value===s.value}))&&t.productId===n.id})))||!1})}})),a.push(o)})),a},enumerable:!1,configurable:!0}),A}();export{A as IkasProduct};
|
|
1
|
+
import{__spreadArray as t,__assign as e,__awaiter as i,__generator as n}from'./../../../ext/tslib/tslib.es6.js';import r from"lodash/sortBy";import a from"lodash/cloneDeep";import{IkasCategory as o}from"../category/index.js";import{IkasProductVariant as u}from"./variant/index.js";import{IkasProductAttributeValue as s}from"./attribute-value/index.js";import{IkasProductVariantType as c}from"./variant-type/index.js";import{IkasBrand as d}from"../brand/index.js";import{IkasHTMLMetaData as l}from"../html-meta-data/index.js";import{IkasProductTag as p}from"./tag/index.js";import{IkasCampaignType as f,IkasProductType as m}from"@ikas/storefront-models";export{IkasProductType}from"@ikas/storefront-models";import{IkasProductOptionSet as v}from"./option-set/index.js";import{makeObservable as h,observable as g,computed as y}from"mobx";import{IkasProductFunctions as V}from"@ikas/storefront-model-functions";import{IkasProductCampaign as b}from"./campaign/index.js";import{IkasStorefrontConfig as P}from"@ikas/storefront-config";import{IkasBaseStore as I}from"../../../store/base.js";import w from"lodash/groupBy";import{IkasProductBaseUnit as S}from"./base-unit/index.js";import{formatCurrency as O}from"../../../utils/currency.js";import"lodash/get";import j from"../../../store/product/index.js";import{IkasCustomerReviewList as T}from"../../ui/customer-review-list/index.js";import{IkasProductStar as x}from"./star/index.js";import{IkasProductCampaignOffer as C,IkasProductOffer as R}from"./campaign-offer/index.js";import{IkasProductGroup as G}from"./group/index.js";import{IkasImage as D}from"../image/index.js";import{IkasProductSalesChannel as E}from"./sales-channel/index.js";var k=function(){function k(V){void 0===V&&(V={});var w,D,A,L=this;this.metaData=null,this.brand=null,this.tags=null,this.productOptionSetId=null,this.productOptionSet=null,this.campaigns=null,this.selectedVariantValues=[],this.isFiltered=!1,this.isStatic=!1,this.bundleProductCache={},this.productGroupItems=[],this.showVariantsInGroup=!1,this.tieredDiscountProducts=[],this.selectVariantValue=function(i,n){var r,a=L.metaData,o=L.selectedVariantValues.map((function(t){return t.variantTypeId===i.variantTypeId?i:t})),u=L.variants.find((function(t){return t.isActive&&o.every((function(e){return t.variantValues.some((function(t){return t.id===e.id}))}))}));if(u)L.selectedVariantValues=o;else{var s=L.variantTypes.findIndex((function(t){return t.variantType.id===i.variantTypeId}));if(s>0){var c=L.variantTypes.slice(0,s),d=L.selectedVariantValues.filter((function(t){return c.some((function(e){return e.variantType.id===t.variantTypeId}))})),l=t(t([],d,!0),[i],!1);u=L.variants.find((function(t){return t.isActive&&l.every((function(e){return t.variantValues.some((function(t){return t.id===e.id}))}))}))}else{var p=o.slice(0,o.length-1);(u=L.variants.find((function(t){return t.isActive&&p.every((function(e){return t.variantValues.some((function(t){return t.id===e.id}))}))})))||(u=L.variants.find((function(t){return t.isActive&&t.variantValues.some((function(t){return t.id===i.id}))})))}if(!u)return;L.selectedVariantValues=u.variantValues}var f={};new URLSearchParams(window.location.search).forEach((function(t,i){var n;"vid"!==i&&(f=e(e({},f),((n={})[i]=t,n)))})),L.variantTypes.map((function(t){delete f[t.variantType.slug]}));var m=t(t([],L.variantTypes.map((function(t){var e=t.variantType,i=e.values.find((function(t){return L.selectedVariantValues.some((function(e){return e.id===t.id}))}));if(i)return"".concat(e.slug,"=").concat(i.slug)})),!0),Object.entries(f).map((function(t){var e=t[0],i=t[1];return"".concat(e,"=").concat(i)})),!0).filter((function(t){return!!t})).join("&");if(!n){var v="/".concat(a.slug);if(m&&(v="/".concat(a.slug,"?").concat(m)),v===window.location.pathname)return;null===(r=I.getInstance().router)||void 0===r||r.replace(v,void 0,{shallow:!1,scroll:!1})}},this.getVariantUnitPriceText=function(t){var e,i,n=t.price;if(n.unitPrice&&L.baseUnit){var r=L.baseUnit.baseAmount,a=(null===(i=null===(e=L.baseUnit)||void 0===e?void 0:e.unit)||void 0===i?void 0:i.name)||"";return"".concat(O(n.unitPrice,n.currency||"",n.currencySymbol||"")," / ").concat(r&&1!==r?r:"").concat(a)}},this.getCampaigns=function(){return i(L,void 0,void 0,(function(){var t,e,i,r,a,o=this;return n(this,(function(n){switch(n.label){case 0:return t=I.getInstance(),e=t.customerStore.customer,i=e?e.customerGroupIds:null,r=this.variants.map((function(t){return t.id})),[4,j.getProductCampaigns({input:{customerGroupIds:i,salesChannelId:P.getSalesChannelId()||"",variantIds:r}})];case 1:return a=n.sent(),this.campaigns=a.data,this.campaigns?(this.campaigns.map((function(t){o.variants.map((function(e){var i;t.variantIds.some((function(t){return t===e.id}))&&(null===(i=e.campaigns)||void 0===i||i.push(t))}))})),[2,this.campaigns]):[2]}}))}))},this.getAvailableStockLocations=function(){return i(L,void 0,void 0,(function(){var t,e;return n(this,(function(i){switch(i.label){case 0:return t=this.variants.map((function(t){return t.id})),e=P.getPickupStockLocationIds(),[4,j.getVariantStockLocations({stockLocationIdList:e,variantIds:t})];case 1:return[2,i.sent().data||[]]}}))}))},this.getCustomerReviews=function(t){return i(L,void 0,void 0,(function(){var i,r,a,o,u;return n(this,(function(n){switch(n.label){case 0:return i=!!(null===(o=this.selectedVariant.bundleSettings)||void 0===o?void 0:o.products.length),r=[this.id],i&&(null===(u=this.selectedVariant.bundleSettings)||void 0===u||u.products.forEach((function(t){r.push(t.productId)}))),[4,(a=new T(e(e(e({},i?{}:{productId:this.id}),{limit:null==t?void 0:t.limit,page:null==t?void 0:t.page,hasImage:null==t?void 0:t.hasImage}),i?{productIds:r}:{}))).getInitial()];case 1:return n.sent(),[2,a]}}))}))},this.getProductOptionSet=function(){return i(L,void 0,void 0,(function(){var t,e;return n(this,(function(i){switch(i.label){case 0:return this.productOptionSet?[2,!0]:this.productOptionSetId?[4,j.listProductOptionSet({id:{eq:this.productOptionSetId}})]:[2,!1];case 1:return(t=i.sent()).isSuccess&&(null===(e=t.data)||void 0===e?void 0:e.length)?(this.productOptionSet=t.data[0],this.setOptionPrices(),[2,!0]):[2,!1]}}))}))},this.initBundleProducts=function(){return i(L,void 0,void 0,(function(){var t,e,i,r,a,o;return n(this,(function(n){switch(n.label){case 0:return t="","undefined"!=typeof window&&(e=new URLSearchParams(window.location.search),t=e.get("editLineID")||""),t?(i=null===(a=I.getInstance().cartStore.cart)||void 0===a?void 0:a.items.find((function(e){return e.id===t})))&&(r=this.variants.find((function(t){return t.id===i.variant.id})))?(this.selectedVariantValues=r.variantValues,[4,this.getBundleProductsOfVariant(r)]):[3,2]:[3,3];case 1:n.sent(),null===(o=r.bundleSettings)||void 0===o||o.products.forEach((function(t){var e,n,r;try{var a=null===(e=i.variant.bundleProducts)||void 0===e?void 0:e.find((function(e){return e.id===t.id})),o=t.product.variants.find((function(t){return t.id===(null==a?void 0:a.variant.id)}));t.product.selectedVariantValues=o.variantValues,t.quantity=(null===(r=null===(n=i.variant.bundleProducts)||void 0===n?void 0:n.find((function(t){return t.variant.id===o.id})))||void 0===r?void 0:r.quantity)||0}catch(t){console.error(t)}})),n.label=2;case 2:return[3,5];case 3:return[4,this.getBundleProductsOfVariant(this.selectedVariant)];case 4:n.sent(),n.label=5;case 5:return[2]}}))}))},this.setShowVariantsInGroup=function(t){L.showVariantsInGroup=t},this.getBundleProductsOfVariant=function(t){return i(L,void 0,void 0,(function(){var e,i,r,o,u,s,c=this;return n(this,(function(n){switch(n.label){case 0:return(null==(e=null===(r=t.bundleSettings)||void 0===r?void 0:r.products.map((function(t){return t.productId})).filter((function(t){return-1===Object.keys(c.bundleProductCache).indexOf(t)})))?void 0:e.length)?[4,j.searchProducts({input:{productIdList:e,perPage:200}})]:[3,2];case 1:(i=n.sent()).isSuccess&&(null===(u=null===(o=i.data)||void 0===o?void 0:o.data)||void 0===u||u.forEach((function(t){c.bundleProductCache[t.id]=t}))),n.label=2;case 2:return null===(s=t.bundleSettings)||void 0===s||s.products.forEach((function(t){var e=c.bundleProductCache[t.productId];t.setProduct(new k(a(e)))})),[2]}}))}))},this.getTieredCampaignProducts=function(){return i(L,void 0,void 0,(function(){var t,e,i,r=this;return n(this,(function(n){return(t=null===(i=null===(e=this.campaigns)||void 0===e?void 0:e.find((function(t){return!!t.campaign.tieredDiscount})))||void 0===i?void 0:i.campaign)&&t.tieredDiscount?[2,this.tieredDiscountProducts=t.tieredDiscount.rules.map((function(e){var i,n,a,o,u=r.selectedVariant.finalPrice,s=u*((null===(i=e.lineItemQuantityRange)||void 0===i?void 0:i.min)||1),c=O(u,r.selectedVariant.price.currency||"",r.selectedVariant.price.currencySymbol||""),d=O(s,r.selectedVariant.price.currency||"",r.selectedVariant.price.currencySymbol||""),l=t.type===f.RATIO?r.selectedVariant.finalPrice-r.selectedVariant.finalPrice*(e.amount||1)/100:r.selectedVariant.finalPrice,p=l*((null===(n=e.lineItemQuantityRange)||void 0===n?void 0:n.min)||1)-(t.type===f.FIXED_AMOUNT&&e.amount||0),m=O(l,r.selectedVariant.price.currency||"",r.selectedVariant.price.currencySymbol||""),v=O(p,r.selectedVariant.price.currency||"",r.selectedVariant.price.currencySymbol||"");return{amount:e.amount,lineItemQuantityRange:{min:(null===(a=e.lineItemQuantityRange)||void 0===a?void 0:a.min)||0,max:(null===(o=e.lineItemQuantityRange)||void 0===o?void 0:o.max)||0},type:t.type,sellPrice:u,finalPrice:l,sellPriceWithQuantity:s,finalPriceWithQuantity:p,formattedSellPrice:c,formattedSellPriceWithQuantity:d,formattedFinalPrice:m,formattedFinalPriceWithQuantity:v}}))]:[2,[]]}))}))},this.setOptionPrices=function(){var t,e=L.variants[0];if(e){var i=e.price.currency;null===(t=L.productOptionSet)||void 0===t||t.options.forEach((function(t){var e;t.selectSettings&&t.selectSettings.values.forEach((function(t){var e;t.otherPrices&&(t.price=(null===(e=t.otherPrices.find((function(t){return t.currencyCode===i})))||void 0===e?void 0:e.price)||t.price)})),t.otherPrices&&(t.price=(null===(e=t.otherPrices.find((function(t){return t.currencyCode===i})))||void 0===e?void 0:e.price)||t.price)}))}},this.id=V.id||Date.now()+"",this.name=V.name||"",this.type=V.type||m.PHYSICAL,this.description=V.description||"",this.shortDescription=V.shortDescription||"",this.metaData=V.metaData?new l(V.metaData):null,this.brand=V.brand?new d(V.brand):null,this.categories=V.categories?V.categories.map((function(t){return new o(t)})):[],this.deleted=V.deleted||null,this.tags=V.tags?V.tags.map((function(t){return new p(t)})):[],this.variants=V.variants?V.variants.map((function(t){return new u(t)})):[],this.attributes=V.attributes?V.attributes.map((function(t){return new s(t)})):[],this.variantTypes=V.variantTypes?V.variantTypes.map((function(t){return new c(t)})):[],this.productOptionSetId=V.productOptionSetId||null,this.averageRating=null!==(w=V.averageRating)&&void 0!==w?w:null,this.reviewCount=null!==(D=V.reviewCount)&&void 0!==D?D:null,this.stars=V.stars?V.stars.map((function(t){return new x(t)})):null,this.baseUnit=V.baseUnit?new S(V.baseUnit):null,this.productOptionSet=V.productOptionSet?new v(V.productOptionSet):null,this.campaigns=(null===(A=V.campaigns)||void 0===A?void 0:A.map((function(t){return new b(t)})))||null,this.selectedVariantValues=V.selectedVariantValues||[],this.variantTypes=r(this.variantTypes,"order"),this.groupVariantsByVariantTypeId=V.groupVariantsByVariantTypeId||null,this.dynamicPriceListIds=V.dynamicPriceListIds||null,this.productVolumeDiscountId=V.productVolumeDiscountId||null,this.campaignOffers=V.campaignOffers?V.campaignOffers.map((function(t){return new C(t)})):null,this.appliedCampaignOffer=V.appliedCampaignOffer,this.offers=V.offers?V.offers.map((function(t){return new R(t)})):void 0,this.productGroup=V.productGroup?new G(V.productGroup):null,this.salesChannels=V.salesChannels?V.salesChannels.map((function(t){return new E(t)})):null,this.productGroupItems=V.productGroupItems,this.setOptionPrices(),this.variants.forEach((function(t){return t.product=L})),this.customerReviews=V.customerReviews?new T(V.customerReviews):null,h(this,{selectedVariantValues:g,isFiltered:g,isStatic:g,showVariantsInGroup:g,hasVariant:y,hasStock:y,hasValidProductOptionValues:y,href:y,productHref:y,mainVariantType:y,mainVariantValue:y,selectedVariant:y,displayedVariantTypes:y,isCustomerReviewEnabled:y,isCustomerReviewLoginRequired:y,isAddToCartEnabled:y,groupedAttributeValues:y,selectedVariantUnitPriceText:y,displayedProductGroups:y})}return Object.defineProperty(k.prototype,"hasVariant",{get:function(){return V.hasVariant(this,this.showVariantsInGroup)},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"hasStock",{get:function(){return this.isStatic?this.selectedVariant.hasStock:V.hasStock(this)},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"hasValidProductOptionValues",{get:function(){return!this.productOptionSet||this.productOptionSet.hasValidValues},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"href",{get:function(){return V.getSelectedVariantHref(this,this.selectedVariantValues)},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"productHref",{get:function(){return this.groupVariantsByVariantTypeId||this.isFiltered?this.href:V.getProductHref(this)},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"mainVariantType",{get:function(){return V.getMainVariantType(this)},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"mainVariantValue",{get:function(){return V.getMainVariantValue(this.selectedVariantValues)},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"selectedVariant",{get:function(){if(!this.hasVariant)return this.variants[0];var t=this.selectedVariantValues.map((function(t){return t.id}));return this.variants.find((function(e){return e.variantValues.every((function(e){return t.includes(e.id)}))}))},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"displayedVariantTypes",{get:function(){return this.hasVariant?V.getDisplayedVariantTypes(this,this.selectedVariantValues):[]},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"isCustomerReviewEnabled",{get:function(){return P.isCustomerReviewEnabled()},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"isCustomerReviewLoginRequired",{get:function(){return P.isCustomerReviewLoginRequired()},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"isAddToCartEnabled",{get:function(){var t,e=!0;return null===(t=this.selectedVariant.bundleSettings)||void 0===t||t.products.forEach((function(t){0===t.quantity&&null!==t.minQuantity&&0!==t.minQuantity&&(e=!1)})),e&&this.hasValidProductOptionValues&&(this.selectedVariant.hasStock||this.selectedVariant.sellIfOutOfStock)},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"groupedAttributeValues",{get:function(){var t,e=w(this.attributes,"productAttributeId");return(null===(t=this.attributes)||void 0===t?void 0:t.map((function(t){var i=t.productAttributeId;if(i){var n=e[i];return(null==n?void 0:n.length)&&n[0].productAttribute?{attribute:n[0].productAttribute,values:n}:void 0}})).filter((function(t){return!!t})))||[]},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"selectedVariantUnitPriceText",{get:function(){return this.getVariantUnitPriceText(this.selectedVariant)},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"displayedProductGroups",{get:function(){var e,i=this,n=[],a=[];return null===(e=this.productGroupItems)||void 0===e||e.forEach((function(t){t.groupValues.forEach((function(t){n.includes(t.name)||n.push(t.name)}))})),n.forEach((function(e){var n,o={name:e,items:[]};i.productGroupItems=r(i.productGroupItems,(function(t){var e;return parseInt((null===(e=t.order)||void 0===e?void 0:e.value)||"999",10)})),null===(n=i.productGroupItems)||void 0===n||n.forEach((function(n){var r,a,u,s=n.groupValues.find((function(t){return t.name===e}));if(s&&!o.items.some((function(t){return t.value===s.value}))){var c="";if(n.productId===i.id)c=i.href;else{var d=(null===(r=i.productGroup)||void 0===r?void 0:r.values.filter((function(t){return t.name!==e})))||[],l=t(t([],d,!0),[s],!1),p=null===(a=i.productGroupItems)||void 0===a?void 0:a.find((function(t){return l.every((function(e){return t.groupValues.some((function(t){return e.name===t.name&&e.value===t.value}))}))}));c=p?p.href:n.href}o.items.push({image:n.image?new D(n.image):null,href:c,value:s.value,isSelected:(null===(u=i.productGroupItems)||void 0===u?void 0:u.some((function(t){return t.groupValues.some((function(t){return t.value===s.value}))&&t.productId===i.id})))||!1})}})),a.push(o)})),a},enumerable:!1,configurable:!0}),k}();export{k as IkasProduct};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IkasBaseModel } from "../base";
|
|
2
2
|
import { IkasStorefrontPopup as IStorefrontPopup } from "@ikas/storefront-models";
|
|
3
3
|
import { IkasStorefrontPopupAnalytics } from "./storefront-popup-analytics";
|
|
4
|
-
import { IkasStorefrontPopupDateFilter } from "./storefront-popup-date-
|
|
4
|
+
import { IkasStorefrontPopupDateFilter } from "./storefront-popup-date-filter";
|
|
5
5
|
import { IkasStorefrontPopupDisplayFilter } from "./storefront-popup-display-filter";
|
|
6
6
|
import { IkasStorefrontPopupDisplaySettings } from "./storefront-popup-display-settings";
|
|
7
7
|
import { IkasStorefrontPopupPageFilter } from "./storefront-popup-page-filter";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__extends as e}from'./../../../ext/tslib/tslib.es6.js';import{IkasBaseModel as o}from"../base/index.js";import{IkasStorefrontPopupAnalytics as r}from"./storefront-popup-analytics/index.js";import{IkasStorefrontPopupDateFilter as p}from"./storefront-popup-date-
|
|
1
|
+
import{__extends as e}from'./../../../ext/tslib/tslib.es6.js';import{IkasBaseModel as o}from"../base/index.js";import{IkasStorefrontPopupAnalytics as r}from"./storefront-popup-analytics/index.js";import{IkasStorefrontPopupDateFilter as p}from"./storefront-popup-date-filter/index.js";import{IkasStorefrontPopupDisplayFilter as d}from"./storefront-popup-display-filter/index.js";import{IkasStorefrontPopupDisplaySettings as s}from"./storefront-popup-display-settings/index.js";import{IkasStorefrontPopupPageFilter as n}from"./storefront-popup-page-filter/index.js";import{IkasStorefrontPopupRouting as i}from"./storefront-popup-routing/index.js";import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/components/index.js';import'./../../../ext/@ikas/popup-renderer/build/ext/tslib/tslib.es6.mjs.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/base/index.js';import{Popup as t}from'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/settings/index.js';import"mobx";import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/settings/visibility-condition/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/teaser/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/button/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/divider/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/form/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/form/checkbox/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/form/customer-attribute/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/form/customer-gender/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/image/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/image-column/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/product/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/product/detail-settings/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/social/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/space/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/text/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/background-settings/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/close-settings/index.js';import{IkasStorefrontConfig as l}from"@ikas/storefront-config";var m,u,a,b=function(o){function b(e){var b,f=this;(f=o.call(this,e)||this).analytics=e.analytics?new r(e.analytics):null,f.dateFilter=e.dateFilter?new p(e.dateFilter):null,f.displayFilters=e.displayFilters?e.displayFilters.map((function(e){return new d(e)})):null,f.displaySettings=e.displaySettings?new s(e.displaySettings):new s,f.name=e.name||"",f.pageFilters=e.pageFilters?e.pageFilters.map((function(e){return new n(e)})):null,f.status=e.status||m.ACTIVE,f.storefrontRoutings=e.storefrontRoutings?e.storefrontRoutings.map((function(e){return new i(e)})):[],f.type=e.type||u.FORM,f.visibleDevice=e.visibleDevice||a.ALL;var x=(null===(b=l.getMerchantSettings())||void 0===b?void 0:b.merchantId)||"",c=l.getCdnUrl()||"";return f.contentJson=e.contentJson?new t(e.contentJson,c,x):null,f}return e(b,o),b}(o);!function(e){e.ACTIVE="ACTIVE",e.DRAFT="DRAFT",e.PASSIVE="PASSIVE"}(m||(m={})),function(e){e.FORM="FORM",e.NOTIFICATION="NOTIFICATION",e.NOTIFICATION_BAR="NOTIFICATION_BAR",e.PAGE_OVERLAY="PAGE_OVERLAY",e.POPUP="POPUP"}(u||(u={})),function(e){e.ALL="ALL",e.DESKTOP="DESKTOP",e.MOBILE="MOBILE"}(a||(a={}));export{b as IkasStorefrontPopup,a as IkasStorefrontPopupDeviceTypeEnum,m as IkasStorefrontPopupStatusEnum,u as IkasStorefrontPopupTypeEnum};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as i}from'./../../../ext/tslib/tslib.es6.js';import{makeAutoObservable as e}from"mobx";import a from"../../../store/blog/index.js";import{IkasBlogCategory as o}from"../../data/blog/category/index.js";import"../../data/blog/content/index.js";import"../../data/blog/meta-data/index.js";import"../../data/blog/tag/index.js";import"../../data/blog/index.js";import"../../data/brand/index.js";import"@ikas/storefront-models";import"../../data/campaign-offer/index.js";import"../../data/cart/campaign-offer/index.js";import"../../data/cart/index.js";import"../../data/category/path-item/index.js";import"../../data/category/index.js";import"../../data/checkout/index.js";import"../../data/checkout-settings/index.js";import"../../data/city/index.js";import"../../data/country/index.js";import"../../data/customer/address/region/index.js";import"../../data/customer/address/index.js";import"../../data/customer/address/ikas-localized-customer-address.js";import"../../data/customer/attribute/index.js";import"../../data/customer/review/summary/index.js";import"../../data/customer/review/index.js";import"../../data/customer/index.js";import"../../data/customer-form-data-input/index.js";import"../../data/district/index.js";import"../../data/favorite-product/index.js";import"../../data/filter-category/index.js";import"../../data/html-meta-data/index.js";import"../../data/image/index.js";import"../../data/order/address/region/index.js";import"../../data/order/address/index.js";import"../../data/order/line-item/option/value/index.js";import"../../data/order/line-item/variant/value/index.js";import"../../data/order/line-item/variant/index.js";import"../../data/order/line-item/index.js";import"../../data/order/package/index.js";import"../../data/order/transaction/index.js";import"../../data/order/index.js";import"../../data/payment-gateway/index.js";import"../../data/product/attribute-value/index.js";import"../../data/product/filter/index.js";import"../../data/product/campaign-offer/index.js";import"../../data/product/option-set/option/index.js";import"../../data/product/option-set/index.js";import"../../data/product/stock-location/index.js";import"../../data/product/variant/price/index.js";import"../../data/product/variant/index.js";import"../../data/variant-type/index.js";import"../../data/product/index.js";import"../../data/raffle/index.js";import"../../data/shipping-zone/state/city/district/region/index.js";import"../../data/state/index.js";import"../../data/theme-json/index.js";import"../../data/theme-json/component/index.js";import"../../data/theme-json/custom-data/index.js";import"../../data/variant-type/variant-value/index.js";import"@ikas/localized-address";var r,n=function(){function n(a){var n=this;this._initialized=!1,this._minPage=null,this._isLoading=!1,this.getPrev=function(){return t(n,void 0,void 0,(function(){var t,e,a,o,r,n;return i(this,(function(i){switch(i.label){case 0:if(this.isStatic||this._isLoading||!this.hasPrev)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),t=this._minPage-1,[4,this.listBlogCategories(t,this.limit)];case 2:return e=i.sent(),this.data=(null===(r=null===(o=e.data)||void 0===o?void 0:o.data)||void 0===r?void 0:r.concat(this.data))||this.data,this._count=(null===(n=e.data)||void 0===n?void 0:n.count)||this._count,this._minPage=t,[3,5];case 3:return a=i.sent(),console.log(a),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getNext=function(){return t(n,void 0,void 0,(function(){var t,e,a,o;return i(this,(function(i){switch(i.label){case 0:if(this.isStatic||this._isLoading||!this.hasNext)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,this.listBlogCategories(this.page+1,this.limit)];case 2:return t=i.sent(),this.data=this.data.concat((null===(a=t.data)||void 0===a?void 0:a.data)||[]),this._count=(null===(o=t.data)||void 0===o?void 0:o.count)||this._count,this._page=this.page+1,[3,5];case 3:return e=i.sent(),console.log(e),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getPage=function(e){return t(n,void 0,void 0,(function(){var t,a,o,r;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading||this.isStatic)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,this.listBlogCategories(e,this.limit)];case 2:return t=i.sent(),this.data=(null===(o=t.data)||void 0===o?void 0:o.data)||[],this._count=(null===(r=t.data)||void 0===r?void 0:r.count)||0,this._page=e,this._minPage=e,[3,5];case 3:return a=i.sent(),console.log(a),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.data=a.data?a.data.map((function(t){return new o(t)})):[],this._type=a.type||a.blogCategoryListPropValue.blogCategoryListType||r.ALL,this._limit=a.limit||a.blogCategoryListPropValue.initialLimit||20,this._page=a.page||1,this._count=a.count||0,this._initialized=a.initialized||!1,this._minPage=a.minPage,this._blogCategoryListPropValue=a.blogCategoryListPropValue,e(this)}return Object.defineProperty(n.prototype,"limit",{get:function(){return this._limit},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"page",{get:function(){return this._page},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"count",{get:function(){return this._count},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"pageCount",{get:function(){return Math.ceil(this._count/this._limit)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isInitialized",{get:function(){return this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isStatic",{get:function(){return this._type===r.STATIC},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"hasPrev",{get:function(){return!(this.isStatic||!this._minPage)&&this._minPage>1},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"hasNext",{get:function(){return!this.isStatic&&this.page*this.limit<this.count},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isLoading",{get:function(){return this._isLoading},enumerable:!1,configurable:!0}),n.prototype.listBlogCategories=function(e,o){return t(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,a.listBlogCategory({id:this.isStatic&&this._blogCategoryListPropValue.blogCategoryIds?{in:this._blogCategoryListPropValue.blogCategoryIds}:void 0,pagination:{page:e,limit:o}})];case 1:return[2,t.sent()]}}))}))},n.prototype.toJSON=function(){return{data:this.data,type:this._type,limit:this._limit,page:this._page,count:this._count,initialized:this._initialized,minPage:this._minPage,blogCategoryListPropValue:this._blogCategoryListPropValue}},n}();!function(t){t.ALL="ALL",t.STATIC="STATIC"}(r||(r={}));export{n as IkasBlogCategoryList,r as IkasBlogCategoryListType};
|
|
1
|
+
import{__awaiter as t,__generator as i}from'./../../../ext/tslib/tslib.es6.js';import{makeAutoObservable as e}from"mobx";import a from"../../../store/blog/index.js";import{IkasBlogCategory as o}from"../../data/blog/category/index.js";import"../../data/blog/content/index.js";import"../../data/blog/meta-data/index.js";import"../../data/blog/tag/index.js";import"../../data/blog/index.js";import"../../data/brand/index.js";import"@ikas/storefront-models";import"../../data/campaign-offer/index.js";import"../../data/cart/campaign-offer/index.js";import"../../data/cart/index.js";import"../../data/category/path-item/index.js";import"../../data/category/index.js";import"../../data/checkout/index.js";import"../../data/checkout-settings/index.js";import"../../data/city/index.js";import"../../data/country/index.js";import"../../data/customer/address/region/index.js";import"../../data/customer/address/index.js";import"../../data/customer/address/ikas-localized-customer-address.js";import"../../data/customer/attribute/index.js";import"../../data/customer/review/summary/index.js";import"../../data/customer/review/index.js";import"../../data/customer/index.js";import"../../data/customer-form-data-input/index.js";import"../../data/district/index.js";import"../../data/favorite-product/index.js";import"../../data/filter-category/index.js";import"../../data/html-meta-data/index.js";import"../../data/image/index.js";import"../../data/order/address/region/index.js";import"../../data/order/address/index.js";import"../../data/order/line-item/option/value/index.js";import"../../data/order/line-item/variant/value/index.js";import"../../data/order/line-item/variant/index.js";import"../../data/order/line-item/index.js";import"../../data/order/package/index.js";import"../../data/order/transaction/index.js";import"../../data/order/index.js";import"../../data/payment-gateway/index.js";import"../../data/product/attribute-value/index.js";import"../../data/product/filter/index.js";import"../../data/product/campaign-offer/index.js";import"../../data/product/option-set/option/index.js";import"../../data/product/option-set/index.js";import"../../data/product/stock-location/index.js";import"../../data/product/variant/price/index.js";import"../../data/product/variant/index.js";import"../../data/variant-type/index.js";import"../../data/product/index.js";import"../../data/raffle/index.js";import"../../data/shipping-zone/state/city/district/region/index.js";import"../../data/state/index.js";import"../../data/storefront-popup/storefront-popup-display-filter/index.js";import"../../data/storefront-popup/storefront-popup-display-settings/index.js";import"../../data/storefront-popup/storefront-popup-page-filter/index.js";import"../../data/storefront-popup/index.js";import"../../data/theme-json/index.js";import"../../data/theme-json/component/index.js";import"../../data/theme-json/custom-data/index.js";import"../../data/variant-type/variant-value/index.js";import"@ikas/localized-address";var r,n=function(){function n(a){var n=this;this._initialized=!1,this._minPage=null,this._isLoading=!1,this.getPrev=function(){return t(n,void 0,void 0,(function(){var t,e,a,o,r,n;return i(this,(function(i){switch(i.label){case 0:if(this.isStatic||this._isLoading||!this.hasPrev)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),t=this._minPage-1,[4,this.listBlogCategories(t,this.limit)];case 2:return e=i.sent(),this.data=(null===(r=null===(o=e.data)||void 0===o?void 0:o.data)||void 0===r?void 0:r.concat(this.data))||this.data,this._count=(null===(n=e.data)||void 0===n?void 0:n.count)||this._count,this._minPage=t,[3,5];case 3:return a=i.sent(),console.log(a),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getNext=function(){return t(n,void 0,void 0,(function(){var t,e,a,o;return i(this,(function(i){switch(i.label){case 0:if(this.isStatic||this._isLoading||!this.hasNext)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,this.listBlogCategories(this.page+1,this.limit)];case 2:return t=i.sent(),this.data=this.data.concat((null===(a=t.data)||void 0===a?void 0:a.data)||[]),this._count=(null===(o=t.data)||void 0===o?void 0:o.count)||this._count,this._page=this.page+1,[3,5];case 3:return e=i.sent(),console.log(e),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getPage=function(e){return t(n,void 0,void 0,(function(){var t,a,o,r;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading||this.isStatic)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,this.listBlogCategories(e,this.limit)];case 2:return t=i.sent(),this.data=(null===(o=t.data)||void 0===o?void 0:o.data)||[],this._count=(null===(r=t.data)||void 0===r?void 0:r.count)||0,this._page=e,this._minPage=e,[3,5];case 3:return a=i.sent(),console.log(a),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.data=a.data?a.data.map((function(t){return new o(t)})):[],this._type=a.type||a.blogCategoryListPropValue.blogCategoryListType||r.ALL,this._limit=a.limit||a.blogCategoryListPropValue.initialLimit||20,this._page=a.page||1,this._count=a.count||0,this._initialized=a.initialized||!1,this._minPage=a.minPage,this._blogCategoryListPropValue=a.blogCategoryListPropValue,e(this)}return Object.defineProperty(n.prototype,"limit",{get:function(){return this._limit},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"page",{get:function(){return this._page},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"count",{get:function(){return this._count},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"pageCount",{get:function(){return Math.ceil(this._count/this._limit)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isInitialized",{get:function(){return this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isStatic",{get:function(){return this._type===r.STATIC},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"hasPrev",{get:function(){return!(this.isStatic||!this._minPage)&&this._minPage>1},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"hasNext",{get:function(){return!this.isStatic&&this.page*this.limit<this.count},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isLoading",{get:function(){return this._isLoading},enumerable:!1,configurable:!0}),n.prototype.listBlogCategories=function(e,o){return t(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,a.listBlogCategory({id:this.isStatic&&this._blogCategoryListPropValue.blogCategoryIds?{in:this._blogCategoryListPropValue.blogCategoryIds}:void 0,pagination:{page:e,limit:o}})];case 1:return[2,t.sent()]}}))}))},n.prototype.toJSON=function(){return{data:this.data,type:this._type,limit:this._limit,page:this._page,count:this._count,initialized:this._initialized,minPage:this._minPage,blogCategoryListPropValue:this._blogCategoryListPropValue}},n}();!function(t){t.ALL="ALL",t.STATIC="STATIC"}(r||(r={}));export{n as IkasBlogCategoryList,r as IkasBlogCategoryListType};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as i}from'./../../../ext/tslib/tslib.es6.js';import"../../data/blog/category/index.js";import"../../data/blog/content/index.js";import"../../data/blog/meta-data/index.js";import"../../data/blog/tag/index.js";import"../../data/blog/index.js";import{IkasBrand as e}from"../../data/brand/index.js";import"@ikas/storefront-models";import{makeAutoObservable as a}from"mobx";import"../../data/campaign-offer/index.js";import"../../data/cart/campaign-offer/index.js";import"../../data/cart/index.js";import"../../data/category/path-item/index.js";import"../../data/category/index.js";import"../../data/checkout/index.js";import"../../data/checkout-settings/index.js";import"../../data/city/index.js";import"../../data/country/index.js";import"../../data/customer/address/region/index.js";import"../../data/customer/address/index.js";import"../../data/customer/address/ikas-localized-customer-address.js";import"../../data/customer/attribute/index.js";import"../../data/customer/review/summary/index.js";import"../../data/customer/review/index.js";import"../../data/customer/index.js";import"../../data/customer-form-data-input/index.js";import"../../data/district/index.js";import"../../data/favorite-product/index.js";import"../../data/filter-category/index.js";import"../../data/html-meta-data/index.js";import"../../data/image/index.js";import"../../data/order/address/region/index.js";import"../../data/order/address/index.js";import"../../data/order/line-item/option/value/index.js";import"../../data/order/line-item/variant/value/index.js";import"../../data/order/line-item/variant/index.js";import"../../data/order/line-item/index.js";import"../../data/order/package/index.js";import"../../data/order/transaction/index.js";import"../../data/order/index.js";import"../../data/payment-gateway/index.js";import"../../data/product/attribute-value/index.js";import"../../data/product/filter/index.js";import"../../data/product/campaign-offer/index.js";import"../../data/product/option-set/option/index.js";import"../../data/product/option-set/index.js";import"../../data/product/stock-location/index.js";import"../../data/product/variant/price/index.js";import"../../data/product/variant/index.js";import"../../data/variant-type/index.js";import"../../data/product/index.js";import"../../data/raffle/index.js";import"../../data/shipping-zone/state/city/district/region/index.js";import"../../data/state/index.js";import"../../data/theme-json/index.js";import"../../data/theme-json/component/index.js";import"../../data/theme-json/custom-data/index.js";import"../../data/variant-type/variant-value/index.js";import"@ikas/localized-address";import r from"../../../store/brand/index.js";var n,o,s=function(){function s(s){var d=this;this._initialized=!1,this._minPage=null,this._isLoading=!1,this.getInitial=function(){return t(d,void 0,void 0,(function(){var t,e,a,n,o;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,r.listProductBrand({id:this.isStatic&&this._brandListPropValue.brandIds?{in:this._brandListPropValue.brandIds}:void 0,pagination:{page:this.isStatic?void 0:this.page,limit:this.isStatic?void 0:this.limit},sort:this.getSortParams()})];case 2:return t=i.sent(),this.isStatic?this.data=(null===(a=this._brandListPropValue.brandIds)||void 0===a?void 0:a.map((function(i){var e,a;return null===(a=null===(e=t.data)||void 0===e?void 0:e.data)||void 0===a?void 0:a.find((function(t){return t.id===i}))})).filter((function(t){return!!t})))||[]:this.data=(null===(n=t.data)||void 0===n?void 0:n.data)||[],this._count=(null===(o=t.data)||void 0===o?void 0:o.count)||0,this._initialized=!0,this._minPage=this.page,[3,5];case 3:return e=i.sent(),console.log(e),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getPrev=function(){return t(d,void 0,void 0,(function(){var t,e,a,n,o,s;return i(this,(function(i){switch(i.label){case 0:if(this.isStatic||this._isLoading||!this.hasPrev)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),t=this._minPage-1,[4,r.listProductBrand({pagination:{page:t,limit:this.limit},sort:this.getSortParams()})];case 2:return e=i.sent(),this.data=(null===(o=null===(n=e.data)||void 0===n?void 0:n.data)||void 0===o?void 0:o.concat(this.data))||this.data,this._count=(null===(s=e.data)||void 0===s?void 0:s.count)||0,this._minPage=t,[3,5];case 3:return a=i.sent(),console.log(a),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getNext=function(){return t(d,void 0,void 0,(function(){var t,e,a,n;return i(this,(function(i){switch(i.label){case 0:if(this.isStatic||this._isLoading||!this.hasNext)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,r.listProductBrand({pagination:{page:this.page+1,limit:this.limit},sort:this.getSortParams()})];case 2:return t=i.sent(),this.data=this.data.concat((null===(a=t.data)||void 0===a?void 0:a.data)||[]),this._count=(null===(n=t.data)||void 0===n?void 0:n.count)||this.count,this._page=this.page+1,[3,5];case 3:return e=i.sent(),console.log(e),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getPage=function(e){return t(d,void 0,void 0,(function(){var t,a,n,o;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading||this.isStatic)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,r.listProductBrand({pagination:{page:e,limit:this.limit},sort:this.getSortParams()})];case 2:return t=i.sent(),this.data=(null===(n=t.data)||void 0===n?void 0:n.data)||[],this._count=(null===(o=t.data)||void 0===o?void 0:o.count)||0,this._page=e,this._minPage=e,[3,5];case 3:return a=i.sent(),console.log(a),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.data=s.data?s.data.map((function(t){return new e(t)})):[],this._type=s.type||s.brandListPropValue.brandListType||n.ALL,this._sort=s.sort||s.brandListPropValue.initialSort||o.A_Z,this._limit=s.limit||s.brandListPropValue.initialLimit||20,this._page=s.page||1,this._count=s.count||0,this._initialized=s.initialized||!1,this._minPage=s.minPage,this._brandListPropValue=s.brandListPropValue,a(this)}return Object.defineProperty(s.prototype,"sort",{get:function(){return this._sort},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"limit",{get:function(){return this._limit},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"page",{get:function(){return this._page},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"count",{get:function(){return this._count},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"pageCount",{get:function(){return Math.ceil(this._count/this._limit)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"isInitialized",{get:function(){return this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"isStatic",{get:function(){return this._type===n.STATIC},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"hasPrev",{get:function(){return!(this.isStatic||!this._minPage)&&this._minPage>1},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"hasNext",{get:function(){return!this.isStatic&&this.page*this.limit<this.count},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"isLoading",{get:function(){return this._isLoading},enumerable:!1,configurable:!0}),s.prototype.getSortParams=function(){return this._sort===o.A_Z?"name":"-name"},s.prototype.setSortType=function(e){return t(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return this._sort=e,[4,this.getInitial()];case 1:return t.sent(),[2]}}))}))},s.prototype.toJSON=function(){return{data:this.data,type:this._type,sort:this._sort,limit:this._limit,page:this._page,count:this._count,initialized:this._initialized,minPage:this._minPage,brandListPropValue:this._brandListPropValue}},s}();!function(t){t.ALL="ALL",t.STATIC="STATIC"}(n||(n={})),function(t){t.A_Z="A_Z",t.Z_A="Z_A"}(o||(o={}));export{s as IkasBrandList,o as IkasBrandListSortType,n as IkasBrandListType};
|
|
1
|
+
import{__awaiter as t,__generator as i}from'./../../../ext/tslib/tslib.es6.js';import"../../data/blog/category/index.js";import"../../data/blog/content/index.js";import"../../data/blog/meta-data/index.js";import"../../data/blog/tag/index.js";import"../../data/blog/index.js";import{IkasBrand as e}from"../../data/brand/index.js";import"@ikas/storefront-models";import{makeAutoObservable as a}from"mobx";import"../../data/campaign-offer/index.js";import"../../data/cart/campaign-offer/index.js";import"../../data/cart/index.js";import"../../data/category/path-item/index.js";import"../../data/category/index.js";import"../../data/checkout/index.js";import"../../data/checkout-settings/index.js";import"../../data/city/index.js";import"../../data/country/index.js";import"../../data/customer/address/region/index.js";import"../../data/customer/address/index.js";import"../../data/customer/address/ikas-localized-customer-address.js";import"../../data/customer/attribute/index.js";import"../../data/customer/review/summary/index.js";import"../../data/customer/review/index.js";import"../../data/customer/index.js";import"../../data/customer-form-data-input/index.js";import"../../data/district/index.js";import"../../data/favorite-product/index.js";import"../../data/filter-category/index.js";import"../../data/html-meta-data/index.js";import"../../data/image/index.js";import"../../data/order/address/region/index.js";import"../../data/order/address/index.js";import"../../data/order/line-item/option/value/index.js";import"../../data/order/line-item/variant/value/index.js";import"../../data/order/line-item/variant/index.js";import"../../data/order/line-item/index.js";import"../../data/order/package/index.js";import"../../data/order/transaction/index.js";import"../../data/order/index.js";import"../../data/payment-gateway/index.js";import"../../data/product/attribute-value/index.js";import"../../data/product/filter/index.js";import"../../data/product/campaign-offer/index.js";import"../../data/product/option-set/option/index.js";import"../../data/product/option-set/index.js";import"../../data/product/stock-location/index.js";import"../../data/product/variant/price/index.js";import"../../data/product/variant/index.js";import"../../data/variant-type/index.js";import"../../data/product/index.js";import"../../data/raffle/index.js";import"../../data/shipping-zone/state/city/district/region/index.js";import"../../data/state/index.js";import"../../data/storefront-popup/storefront-popup-display-filter/index.js";import"../../data/storefront-popup/storefront-popup-display-settings/index.js";import"../../data/storefront-popup/storefront-popup-page-filter/index.js";import"../../data/storefront-popup/index.js";import"../../data/theme-json/index.js";import"../../data/theme-json/component/index.js";import"../../data/theme-json/custom-data/index.js";import"../../data/variant-type/variant-value/index.js";import"@ikas/localized-address";import r from"../../../store/brand/index.js";var n,o,s=function(){function s(s){var d=this;this._initialized=!1,this._minPage=null,this._isLoading=!1,this.getInitial=function(){return t(d,void 0,void 0,(function(){var t,e,a,n,o;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,r.listProductBrand({id:this.isStatic&&this._brandListPropValue.brandIds?{in:this._brandListPropValue.brandIds}:void 0,pagination:{page:this.isStatic?void 0:this.page,limit:this.isStatic?void 0:this.limit},sort:this.getSortParams()})];case 2:return t=i.sent(),this.isStatic?this.data=(null===(a=this._brandListPropValue.brandIds)||void 0===a?void 0:a.map((function(i){var e,a;return null===(a=null===(e=t.data)||void 0===e?void 0:e.data)||void 0===a?void 0:a.find((function(t){return t.id===i}))})).filter((function(t){return!!t})))||[]:this.data=(null===(n=t.data)||void 0===n?void 0:n.data)||[],this._count=(null===(o=t.data)||void 0===o?void 0:o.count)||0,this._initialized=!0,this._minPage=this.page,[3,5];case 3:return e=i.sent(),console.log(e),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getPrev=function(){return t(d,void 0,void 0,(function(){var t,e,a,n,o,s;return i(this,(function(i){switch(i.label){case 0:if(this.isStatic||this._isLoading||!this.hasPrev)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),t=this._minPage-1,[4,r.listProductBrand({pagination:{page:t,limit:this.limit},sort:this.getSortParams()})];case 2:return e=i.sent(),this.data=(null===(o=null===(n=e.data)||void 0===n?void 0:n.data)||void 0===o?void 0:o.concat(this.data))||this.data,this._count=(null===(s=e.data)||void 0===s?void 0:s.count)||0,this._minPage=t,[3,5];case 3:return a=i.sent(),console.log(a),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getNext=function(){return t(d,void 0,void 0,(function(){var t,e,a,n;return i(this,(function(i){switch(i.label){case 0:if(this.isStatic||this._isLoading||!this.hasNext)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,r.listProductBrand({pagination:{page:this.page+1,limit:this.limit},sort:this.getSortParams()})];case 2:return t=i.sent(),this.data=this.data.concat((null===(a=t.data)||void 0===a?void 0:a.data)||[]),this._count=(null===(n=t.data)||void 0===n?void 0:n.count)||this.count,this._page=this.page+1,[3,5];case 3:return e=i.sent(),console.log(e),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getPage=function(e){return t(d,void 0,void 0,(function(){var t,a,n,o;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading||this.isStatic)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,r.listProductBrand({pagination:{page:e,limit:this.limit},sort:this.getSortParams()})];case 2:return t=i.sent(),this.data=(null===(n=t.data)||void 0===n?void 0:n.data)||[],this._count=(null===(o=t.data)||void 0===o?void 0:o.count)||0,this._page=e,this._minPage=e,[3,5];case 3:return a=i.sent(),console.log(a),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.data=s.data?s.data.map((function(t){return new e(t)})):[],this._type=s.type||s.brandListPropValue.brandListType||n.ALL,this._sort=s.sort||s.brandListPropValue.initialSort||o.A_Z,this._limit=s.limit||s.brandListPropValue.initialLimit||20,this._page=s.page||1,this._count=s.count||0,this._initialized=s.initialized||!1,this._minPage=s.minPage,this._brandListPropValue=s.brandListPropValue,a(this)}return Object.defineProperty(s.prototype,"sort",{get:function(){return this._sort},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"limit",{get:function(){return this._limit},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"page",{get:function(){return this._page},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"count",{get:function(){return this._count},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"pageCount",{get:function(){return Math.ceil(this._count/this._limit)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"isInitialized",{get:function(){return this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"isStatic",{get:function(){return this._type===n.STATIC},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"hasPrev",{get:function(){return!(this.isStatic||!this._minPage)&&this._minPage>1},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"hasNext",{get:function(){return!this.isStatic&&this.page*this.limit<this.count},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"isLoading",{get:function(){return this._isLoading},enumerable:!1,configurable:!0}),s.prototype.getSortParams=function(){return this._sort===o.A_Z?"name":"-name"},s.prototype.setSortType=function(e){return t(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return this._sort=e,[4,this.getInitial()];case 1:return t.sent(),[2]}}))}))},s.prototype.toJSON=function(){return{data:this.data,type:this._type,sort:this._sort,limit:this._limit,page:this._page,count:this._count,initialized:this._initialized,minPage:this._minPage,brandListPropValue:this._brandListPropValue}},s}();!function(t){t.ALL="ALL",t.STATIC="STATIC"}(n||(n={})),function(t){t.A_Z="A_Z",t.Z_A="Z_A"}(o||(o={}));export{s as IkasBrandList,o as IkasBrandListSortType,n as IkasBrandListType};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as i}from'./../../../ext/tslib/tslib.es6.js';import"../../data/blog/category/index.js";import"../../data/blog/content/index.js";import"../../data/blog/meta-data/index.js";import"../../data/blog/tag/index.js";import"../../data/blog/index.js";import"../../data/brand/index.js";import"@ikas/storefront-models";import{makeAutoObservable as e}from"mobx";import"../../data/campaign-offer/index.js";import"../../data/cart/campaign-offer/index.js";import"../../data/cart/index.js";import"../../data/category/path-item/index.js";import{IkasCategory as a}from"../../data/category/index.js";import"../../data/checkout/index.js";import"../../data/checkout-settings/index.js";import"../../data/city/index.js";import"../../data/country/index.js";import"../../data/customer/address/region/index.js";import"../../data/customer/address/index.js";import"../../data/customer/address/ikas-localized-customer-address.js";import"../../data/customer/attribute/index.js";import"../../data/customer/review/summary/index.js";import"../../data/customer/review/index.js";import"../../data/customer/index.js";import"../../data/customer-form-data-input/index.js";import"../../data/district/index.js";import"../../data/favorite-product/index.js";import"../../data/filter-category/index.js";import"../../data/html-meta-data/index.js";import"../../data/image/index.js";import"../../data/order/address/region/index.js";import"../../data/order/address/index.js";import"../../data/order/line-item/option/value/index.js";import"../../data/order/line-item/variant/value/index.js";import"../../data/order/line-item/variant/index.js";import"../../data/order/line-item/index.js";import"../../data/order/package/index.js";import"../../data/order/transaction/index.js";import"../../data/order/index.js";import"../../data/payment-gateway/index.js";import"../../data/product/attribute-value/index.js";import"../../data/product/filter/index.js";import"../../data/product/campaign-offer/index.js";import"../../data/product/option-set/option/index.js";import"../../data/product/option-set/index.js";import"../../data/product/stock-location/index.js";import"../../data/product/variant/price/index.js";import"../../data/product/variant/index.js";import"../../data/variant-type/index.js";import"../../data/product/index.js";import"../../data/raffle/index.js";import"../../data/shipping-zone/state/city/district/region/index.js";import"../../data/state/index.js";import"../../data/theme-json/index.js";import"../../data/theme-json/component/index.js";import"../../data/theme-json/custom-data/index.js";import"../../data/variant-type/variant-value/index.js";import"@ikas/localized-address";import r from"../../../store/category/index.js";var o,n,s=function(){function s(s){var d=this;this._initialized=!1,this._minPage=null,this._isLoading=!1,this.getInitial=function(){return t(d,void 0,void 0,(function(){var t,e,a,o,n;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,r.listCategory({id:this.isStatic&&this._categoryListPropValue.categoryIds?{in:this._categoryListPropValue.categoryIds}:void 0,pagination:{page:this.isStatic?void 0:this.page,limit:this.isStatic?void 0:this.limit},sort:this.getSortParams()})];case 2:return t=i.sent(),this.isStatic?this.data=(null===(a=this._categoryListPropValue.categoryIds)||void 0===a?void 0:a.map((function(i){var e,a;return null===(a=null===(e=t.data)||void 0===e?void 0:e.data)||void 0===a?void 0:a.find((function(t){return t.id===i}))})).filter((function(t){return!!t})))||[]:this.data=(null===(o=t.data)||void 0===o?void 0:o.data)||[],this._count=(null===(n=t.data)||void 0===n?void 0:n.count)||0,this._initialized=!0,this._minPage=this.page,[3,5];case 3:return e=i.sent(),console.log(e),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getPrev=function(){return t(d,void 0,void 0,(function(){var t,e,a,o,n,s;return i(this,(function(i){switch(i.label){case 0:if(this.isStatic||this._isLoading||!this.hasPrev)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),t=this._minPage-1,[4,r.listCategory({pagination:{page:t,limit:this.limit},sort:this.getSortParams()})];case 2:return e=i.sent(),this.data=(null===(n=null===(o=e.data)||void 0===o?void 0:o.data)||void 0===n?void 0:n.concat(this.data))||this.data,this._count=(null===(s=e.data)||void 0===s?void 0:s.count)||this._count,this._minPage=t,[3,5];case 3:return a=i.sent(),console.log(a),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getNext=function(){return t(d,void 0,void 0,(function(){var t,e,a,o;return i(this,(function(i){switch(i.label){case 0:if(this.isStatic||this._isLoading||!this.hasNext)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,r.listCategory({pagination:{page:this.page+1,limit:this.limit},sort:this.getSortParams()})];case 2:return t=i.sent(),this.data=this.data.concat((null===(a=t.data)||void 0===a?void 0:a.data)||[]),this._count=(null===(o=t.data)||void 0===o?void 0:o.count)||this._count,this._page=this.page+1,[3,5];case 3:return e=i.sent(),console.log(e),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getPage=function(e){return t(d,void 0,void 0,(function(){var t,a,o,n;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading||this.isStatic)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,r.listCategory({pagination:{page:e,limit:this.limit},sort:this.getSortParams()})];case 2:return t=i.sent(),this.data=(null===(o=t.data)||void 0===o?void 0:o.data)||[],this._count=(null===(n=t.data)||void 0===n?void 0:n.count)||0,this._page=e,this._minPage=e,[3,5];case 3:return a=i.sent(),console.log(a),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.data=s.data?s.data.map((function(t){return new a(t)})):[],this._type=s.type||s.categoryListPropValue.categoryListType||o.ALL,this._sort=s.sort||s.categoryListPropValue.initialSort||n.A_Z,this._limit=s.limit||s.categoryListPropValue.initialLimit||20,this._page=s.page||1,this._count=s.count||0,this._initialized=s.initialized||!1,this._minPage=s.minPage,this._categoryListPropValue=s.categoryListPropValue,e(this)}return Object.defineProperty(s.prototype,"sort",{get:function(){return this._sort},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"limit",{get:function(){return this._limit},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"page",{get:function(){return this._page},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"count",{get:function(){return this._count},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"pageCount",{get:function(){return Math.ceil(this._count/this._limit)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"isInitialized",{get:function(){return this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"isStatic",{get:function(){return this._type===o.STATIC},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"hasPrev",{get:function(){return!(this.isStatic||!this._minPage)&&this._minPage>1},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"hasNext",{get:function(){return!this.isStatic&&this.page*this.limit<this.count},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"isLoading",{get:function(){return this._isLoading},enumerable:!1,configurable:!0}),s.prototype.getSortParams=function(){return this._sort===n.A_Z?"name":"-name"},s.prototype.setSortType=function(e){return t(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return this._sort=e,[4,this.getInitial()];case 1:return t.sent(),[2]}}))}))},s.prototype.toJSON=function(){return{data:this.data,type:this._type,sort:this._sort,limit:this._limit,page:this._page,count:this._count,initialized:this._initialized,minPage:this._minPage,categoryListPropValue:this._categoryListPropValue}},s}();!function(t){t.ALL="ALL",t.STATIC="STATIC"}(o||(o={})),function(t){t.A_Z="A_Z",t.Z_A="Z_A"}(n||(n={}));export{s as IkasCategoryList,n as IkasCategoryListSortType,o as IkasCategoryListType};
|
|
1
|
+
import{__awaiter as t,__generator as i}from'./../../../ext/tslib/tslib.es6.js';import"../../data/blog/category/index.js";import"../../data/blog/content/index.js";import"../../data/blog/meta-data/index.js";import"../../data/blog/tag/index.js";import"../../data/blog/index.js";import"../../data/brand/index.js";import"@ikas/storefront-models";import{makeAutoObservable as e}from"mobx";import"../../data/campaign-offer/index.js";import"../../data/cart/campaign-offer/index.js";import"../../data/cart/index.js";import"../../data/category/path-item/index.js";import{IkasCategory as a}from"../../data/category/index.js";import"../../data/checkout/index.js";import"../../data/checkout-settings/index.js";import"../../data/city/index.js";import"../../data/country/index.js";import"../../data/customer/address/region/index.js";import"../../data/customer/address/index.js";import"../../data/customer/address/ikas-localized-customer-address.js";import"../../data/customer/attribute/index.js";import"../../data/customer/review/summary/index.js";import"../../data/customer/review/index.js";import"../../data/customer/index.js";import"../../data/customer-form-data-input/index.js";import"../../data/district/index.js";import"../../data/favorite-product/index.js";import"../../data/filter-category/index.js";import"../../data/html-meta-data/index.js";import"../../data/image/index.js";import"../../data/order/address/region/index.js";import"../../data/order/address/index.js";import"../../data/order/line-item/option/value/index.js";import"../../data/order/line-item/variant/value/index.js";import"../../data/order/line-item/variant/index.js";import"../../data/order/line-item/index.js";import"../../data/order/package/index.js";import"../../data/order/transaction/index.js";import"../../data/order/index.js";import"../../data/payment-gateway/index.js";import"../../data/product/attribute-value/index.js";import"../../data/product/filter/index.js";import"../../data/product/campaign-offer/index.js";import"../../data/product/option-set/option/index.js";import"../../data/product/option-set/index.js";import"../../data/product/stock-location/index.js";import"../../data/product/variant/price/index.js";import"../../data/product/variant/index.js";import"../../data/variant-type/index.js";import"../../data/product/index.js";import"../../data/raffle/index.js";import"../../data/shipping-zone/state/city/district/region/index.js";import"../../data/state/index.js";import"../../data/storefront-popup/storefront-popup-display-filter/index.js";import"../../data/storefront-popup/storefront-popup-display-settings/index.js";import"../../data/storefront-popup/storefront-popup-page-filter/index.js";import"../../data/storefront-popup/index.js";import"../../data/theme-json/index.js";import"../../data/theme-json/component/index.js";import"../../data/theme-json/custom-data/index.js";import"../../data/variant-type/variant-value/index.js";import"@ikas/localized-address";import r from"../../../store/category/index.js";var o,n,s=function(){function s(s){var d=this;this._initialized=!1,this._minPage=null,this._isLoading=!1,this.getInitial=function(){return t(d,void 0,void 0,(function(){var t,e,a,o,n;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,r.listCategory({id:this.isStatic&&this._categoryListPropValue.categoryIds?{in:this._categoryListPropValue.categoryIds}:void 0,pagination:{page:this.isStatic?void 0:this.page,limit:this.isStatic?void 0:this.limit},sort:this.getSortParams()})];case 2:return t=i.sent(),this.isStatic?this.data=(null===(a=this._categoryListPropValue.categoryIds)||void 0===a?void 0:a.map((function(i){var e,a;return null===(a=null===(e=t.data)||void 0===e?void 0:e.data)||void 0===a?void 0:a.find((function(t){return t.id===i}))})).filter((function(t){return!!t})))||[]:this.data=(null===(o=t.data)||void 0===o?void 0:o.data)||[],this._count=(null===(n=t.data)||void 0===n?void 0:n.count)||0,this._initialized=!0,this._minPage=this.page,[3,5];case 3:return e=i.sent(),console.log(e),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getPrev=function(){return t(d,void 0,void 0,(function(){var t,e,a,o,n,s;return i(this,(function(i){switch(i.label){case 0:if(this.isStatic||this._isLoading||!this.hasPrev)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),t=this._minPage-1,[4,r.listCategory({pagination:{page:t,limit:this.limit},sort:this.getSortParams()})];case 2:return e=i.sent(),this.data=(null===(n=null===(o=e.data)||void 0===o?void 0:o.data)||void 0===n?void 0:n.concat(this.data))||this.data,this._count=(null===(s=e.data)||void 0===s?void 0:s.count)||this._count,this._minPage=t,[3,5];case 3:return a=i.sent(),console.log(a),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getNext=function(){return t(d,void 0,void 0,(function(){var t,e,a,o;return i(this,(function(i){switch(i.label){case 0:if(this.isStatic||this._isLoading||!this.hasNext)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,r.listCategory({pagination:{page:this.page+1,limit:this.limit},sort:this.getSortParams()})];case 2:return t=i.sent(),this.data=this.data.concat((null===(a=t.data)||void 0===a?void 0:a.data)||[]),this._count=(null===(o=t.data)||void 0===o?void 0:o.count)||this._count,this._page=this.page+1,[3,5];case 3:return e=i.sent(),console.log(e),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getPage=function(e){return t(d,void 0,void 0,(function(){var t,a,o,n;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading||this.isStatic)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,r.listCategory({pagination:{page:e,limit:this.limit},sort:this.getSortParams()})];case 2:return t=i.sent(),this.data=(null===(o=t.data)||void 0===o?void 0:o.data)||[],this._count=(null===(n=t.data)||void 0===n?void 0:n.count)||0,this._page=e,this._minPage=e,[3,5];case 3:return a=i.sent(),console.log(a),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.data=s.data?s.data.map((function(t){return new a(t)})):[],this._type=s.type||s.categoryListPropValue.categoryListType||o.ALL,this._sort=s.sort||s.categoryListPropValue.initialSort||n.A_Z,this._limit=s.limit||s.categoryListPropValue.initialLimit||20,this._page=s.page||1,this._count=s.count||0,this._initialized=s.initialized||!1,this._minPage=s.minPage,this._categoryListPropValue=s.categoryListPropValue,e(this)}return Object.defineProperty(s.prototype,"sort",{get:function(){return this._sort},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"limit",{get:function(){return this._limit},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"page",{get:function(){return this._page},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"count",{get:function(){return this._count},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"pageCount",{get:function(){return Math.ceil(this._count/this._limit)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"isInitialized",{get:function(){return this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"isStatic",{get:function(){return this._type===o.STATIC},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"hasPrev",{get:function(){return!(this.isStatic||!this._minPage)&&this._minPage>1},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"hasNext",{get:function(){return!this.isStatic&&this.page*this.limit<this.count},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"isLoading",{get:function(){return this._isLoading},enumerable:!1,configurable:!0}),s.prototype.getSortParams=function(){return this._sort===n.A_Z?"name":"-name"},s.prototype.setSortType=function(e){return t(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return this._sort=e,[4,this.getInitial()];case 1:return t.sent(),[2]}}))}))},s.prototype.toJSON=function(){return{data:this.data,type:this._type,sort:this._sort,limit:this._limit,page:this._page,count:this._count,initialized:this._initialized,minPage:this._minPage,categoryListPropValue:this._categoryListPropValue}},s}();!function(t){t.ALL="ALL",t.STATIC="STATIC"}(o||(o={})),function(t){t.A_Z="A_Z",t.Z_A="Z_A"}(n||(n={}));export{s as IkasCategoryList,n as IkasCategoryListSortType,o as IkasCategoryListType};
|