@ikas/storefront 4.10.0-beta.25 → 4.10.0-beta.26
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/index.js +1 -1
- package/build/models/data/customer/index.d.ts +3 -0
- package/build/models/data/customer/index.js +1 -1
- package/build/models/data/customer/price-list-rule/filter/index.d.ts +7 -0
- package/build/models/data/customer/price-list-rule/filter/index.js +1 -0
- package/build/models/data/customer/price-list-rule/index.d.ts +7 -0
- package/build/models/data/customer/price-list-rule/index.js +1 -0
- package/build/models/data/index.d.ts +3 -0
- package/build/models/data/product/index.js +1 -1
- package/build/models/data/product/variant/index.d.ts +14 -1
- package/build/models/data/product/variant/index.js +1 -1
- package/build/models/data/product/variant/price/index.d.ts +24 -0
- package/build/models/data/storefront/b2b-settings/index.d.ts +8 -0
- package/build/models/data/storefront/b2b-settings/index.js +1 -0
- package/build/models/data/storefront/index.d.ts +4 -1
- package/build/models/data/storefront/index.js +1 -1
- package/package.json +11 -11
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";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{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{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{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{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,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 a from"./pages/pages/_slug_.js";export{a as CustomPage};import*as o from"./pages/checkout.js";export{o 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,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,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";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{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{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,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,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";
|
|
@@ -2,6 +2,7 @@ import { IkasCustomerAddress } from "./address";
|
|
|
2
2
|
import { IkasCustomerAttributeValue } from "./attribute/value";
|
|
3
3
|
import { IkasBaseModel } from "../base";
|
|
4
4
|
import { IkasCustomerAccountStatus, IkasCustomerEmailSubscriptionStatus, IkasCustomerRegistrationSource, IkasCustomer as ICustomer } from "@ikas/storefront-models";
|
|
5
|
+
import { IkasCustomerPriceListRule } from "./price-list-rule";
|
|
5
6
|
export declare class IkasCustomer extends IkasBaseModel implements ICustomer {
|
|
6
7
|
accountStatusUpdatedAt: number | null;
|
|
7
8
|
customerGroupIds: string[] | null;
|
|
@@ -20,6 +21,8 @@ export declare class IkasCustomer extends IkasBaseModel implements ICustomer {
|
|
|
20
21
|
phoneVerifiedDate: number | null;
|
|
21
22
|
subscriptionStatusUpdatedAt: number | null;
|
|
22
23
|
tagIds: string[] | null;
|
|
24
|
+
priceListId: string | null;
|
|
25
|
+
priceListRules: IkasCustomerPriceListRule[] | null;
|
|
23
26
|
registrationSource: IkasCustomerRegistrationSource | null;
|
|
24
27
|
accountStatus: IkasCustomerAccountStatus | null;
|
|
25
28
|
addresses: IkasCustomerAddress[] | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__extends as e}from'./../../../ext/tslib/tslib.es6.js';import{IkasCustomerAddress as t}from"./address/index.js";import{IkasCustomerAttributeValue as i}from"./attribute/value/index.js";import{IkasBaseModel as r}from"../base/index.js";export{IkasCustomerAccountStatus,IkasCustomerEmailSubscriptionStatus,IkasCustomerRegistrationSource}from"@ikas/storefront-models";import{makeObservable as s,observable as u,computed as o}from"mobx";import{IkasCustomerFunctions as n}from"@ikas/storefront-model-functions";var
|
|
1
|
+
import{__extends as e}from'./../../../ext/tslib/tslib.es6.js';import{IkasCustomerAddress as t}from"./address/index.js";import{IkasCustomerAttributeValue as i}from"./attribute/value/index.js";import{IkasBaseModel as r}from"../base/index.js";export{IkasCustomerAccountStatus,IkasCustomerEmailSubscriptionStatus,IkasCustomerRegistrationSource}from"@ikas/storefront-models";import{makeObservable as s,observable as u,computed as o}from"mobx";import{IkasCustomerFunctions as n}from"@ikas/storefront-model-functions";import{IkasCustomerPriceListRule as a}from"./price-list-rule/index.js";var l=function(r){function l(e){var n=r.call(this,e)||this;return n.accountStatus=e.accountStatus||null,n.accountStatusUpdatedAt=e.accountStatusUpdatedAt||null,n.addresses=e.addresses?e.addresses.map((function(e){return new t(e)})):null,n.attributes=e.attributes?e.attributes.map((function(e){return new i(e)})):null,n.customerGroupIds=e.customerGroupIds||null,n.customerSequence=void 0!==e.customerSequence&&null!==e.customerSequence?e.customerSequence:null,n.email=e.email||null,n.emailVerifiedDate=e.emailVerifiedDate||null,n.firstName=e.firstName||"",n.fullName=e.fullName||null,n.isEmailVerified=void 0!==e.isEmailVerified&&null!==e.isEmailVerified?e.isEmailVerified:null,n.isPhoneVerified=void 0!==e.isPhoneVerified&&null!==e.isPhoneVerified?e.isPhoneVerified:null,n.lastName=e.lastName||null,n.note=e.note||null,n.orderCount=void 0!==e.orderCount&&null!==e.orderCount?e.orderCount:null,n.passwordUpdateDate=e.passwordUpdateDate||null,n.phone=e.phone||null,n.phoneVerifiedDate=e.phoneVerifiedDate||null,n.registrationSource=e.registrationSource||null,n.subscriptionStatus=e.subscriptionStatus||null,n.subscriptionStatusUpdatedAt=e.subscriptionStatusUpdatedAt||null,n.tagIds=e.tagIds||null,n.priceListId=e.priceListId||null,n.priceListRules=e.priceListRules?e.priceListRules.map((function(e){return new a(e)})):null,s(n,{accountStatus:u,accountStatusUpdatedAt:u,addresses:u,attributes:u,customerGroupIds:u,customerSequence:u,email:u,emailVerifiedDate:u,firstName:u,fullName:u,isEmailVerified:u,isPhoneVerified:u,lastName:u,note:u,orderCount:u,passwordUpdateDate:u,phone:u,phoneVerifiedDate:u,registrationSource:u,subscriptionStatus:u,subscriptionStatusUpdatedAt:u,tagIds:u,isSubscribed:o,basicInfo:o}),n}return e(l,r),Object.defineProperty(l.prototype,"isSubscribed",{get:function(){return n.isSubscribed(this)},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"basicInfo",{get:function(){return n.getBasicInfo(this)},enumerable:!1,configurable:!0}),l}(r);export{l as IkasCustomer};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IkasCustomerPriceListRuleFilter as ICustomerPriceListRuleFilter, IkasCustomerPriceListRuleFilterType } from "@ikas/storefront-models";
|
|
2
|
+
export declare class IkasCustomerPriceListRuleFilter implements ICustomerPriceListRuleFilter {
|
|
3
|
+
type: IkasCustomerPriceListRuleFilterType;
|
|
4
|
+
valueList: string[];
|
|
5
|
+
constructor(data: ICustomerPriceListRuleFilter);
|
|
6
|
+
}
|
|
7
|
+
export { IkasCustomerPriceListRuleFilterType };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{IkasCustomerPriceListRuleFilterType}from"@ikas/storefront-models";var t=function(t){this.type=t.type,this.valueList=t.valueList};export{t as IkasCustomerPriceListRuleFilter};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IkasCustomerPriceListRuleFilter } from "./filter";
|
|
2
|
+
import { IkasCustomerPriceListRule as ICustomerPriceListRule } from "@ikas/storefront-models";
|
|
3
|
+
export declare class IkasCustomerPriceListRule implements ICustomerPriceListRule {
|
|
4
|
+
discountRate: number;
|
|
5
|
+
filters: IkasCustomerPriceListRuleFilter[] | null;
|
|
6
|
+
constructor(data: ICustomerPriceListRule);
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{IkasCustomerPriceListRuleFilter as t}from"./filter/index.js";var i=function(i){this.discountRate=i.discountRate,this.filters=i.filters?i.filters.map((function(i){return new t(i)})):null};export{i as IkasCustomerPriceListRule};
|
|
@@ -35,6 +35,8 @@ export * from "./customer/attribute/translation/option";
|
|
|
35
35
|
export * from "./customer/attribute/translation";
|
|
36
36
|
export * from "./customer/attribute/value";
|
|
37
37
|
export * from "./customer/attribute";
|
|
38
|
+
export * from "./customer/price-list-rule/filter";
|
|
39
|
+
export * from "./customer/price-list-rule";
|
|
38
40
|
export * from "./customer/review/settings";
|
|
39
41
|
export * from "./customer/review/summary/star";
|
|
40
42
|
export * from "./customer/review/summary";
|
|
@@ -124,6 +126,7 @@ export * from "./stock-location/address/state";
|
|
|
124
126
|
export * from "./stock-location/address";
|
|
125
127
|
export * from "./stock-location/available";
|
|
126
128
|
export * from "./stock-location";
|
|
129
|
+
export * from "./storefront/b2b-settings";
|
|
127
130
|
export * from "./storefront/domain";
|
|
128
131
|
export * from "./storefront/index-page-seo-setting";
|
|
129
132
|
export * from "./storefront/localization";
|
|
@@ -1 +1 @@
|
|
|
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 s}from"./variant/index.js";import{IkasProductAttributeValue as u}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 m,observable as v,computed as g}from"mobx";import{IkasProductFunctions as b}from"@ikas/storefront-model-functions";import{IkasProductCampaign as y}from"./campaign/index.js";import{IkasStorefrontConfig as V}from"@ikas/storefront-config";import{Analytics as P}from"../../../analytics/analytics.js";import"../../../analytics/head/index.js";import{IkasBaseStore as O}from"../../../store/base.js";import S from"lodash/groupBy";import{IkasProductBaseUnit as w}from"./base-unit/index.js";import{formatCurrency as j}from"../../../utils/currency.js";import"lodash/get";import I from"../../../store/product/index.js";import{IkasCustomerReviewList as T}from"../../ui/customer-review-list/index.js";import{IkasProductStar as x}from"./star/index.js";var C=function(){function C(b){void 0===b&&(b={});var S,k,A,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.selectVariantValue=function(i,n){var r,a=R.metaData,o=R.selectedVariantValues.map((function(t){return t.variantTypeId===i.variantTypeId?i:t})),s=R.variants.find((function(t){return t.isActive&&o.every((function(e){return t.variantValues.some((function(t){return t.id===e.id}))}))}));if(s)R.selectedVariantValues=o;else{var u=R.variantTypes.findIndex((function(t){return t.variantType.id===i.variantTypeId}));if(u>0){var c=R.variantTypes.slice(0,u),d=R.selectedVariantValues.filter((function(t){return c.some((function(e){return e.variantType.id===t.variantTypeId}))})),l=t(t([],d,!0),[i],!1);s=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);(s=R.variants.find((function(t){return t.isActive&&p.every((function(e){return t.variantValues.some((function(t){return t.id===e.id}))}))})))||(s=R.variants.find((function(t){return t.isActive&&t.variantValues.some((function(t){return t.id===i.id}))})))}if(!s)return;R.selectedVariantValues=s.variantValues}var f={};new URLSearchParams(window.location.search).forEach((function(t,i){var n;f=e(e({},f),((n={})[i]=t,n))})),R.variantTypes.map((function(t){delete f[t.variantType.slug]}));var h=t(t([],R.variantTypes.map((function(t){var e=t.variantType,i=e.values.find((function(t){return R.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 m="/".concat(a.slug);if(h&&(m="/".concat(a.slug,"?").concat(h)),m===window.location.pathname)return;null===(r=O.getInstance().router)||void 0===r||r.replace(m,void 0,{shallow:!1,scroll:!1})}P.productView(R)},this.getVariantUnitPriceText=function(t){var e,i,n=t.price;if(n.unitPrice&&R.baseUnit){var r=R.baseUnit.baseAmount,a=(null===(i=null===(e=R.baseUnit)||void 0===e?void 0:e.unit)||void 0===i?void 0:i.name)||"";return"".concat(j(n.unitPrice,n.currency||"",n.currencySymbol||"")," / ").concat(r&&1!==r?r:"").concat(a)}},this.getCampaigns=function(){return i(R,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=O.getInstance(),e=t.customerStore.customer,i=e?e.customerGroupIds:null,r=this.variants.map((function(t){return t.id})),[4,I.getProductCampaigns({input:{customerGroupIds:i,salesChannelId:V.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(R,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=V.getPickupStockLocationIds(),[4,I.getVariantStockLocations({stockLocationIdList:e,variantIds:t})];case 1:return[2,i.sent().data||[]]}}))}))},this.getCustomerReviews=function(t){return i(R,void 0,void 0,(function(){var e;return n(this,(function(i){switch(i.label){case 0:return[4,(e=new T({productId:this.id,limit:null==t?void 0:t.limit,page:null==t?void 0:t.page})).getInitial()];case 1:return i.sent(),[2,e]}}))}))},this.getProductOptionSet=function(){return i(R,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,I.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.getBundleProductsOfVariant=function(t){return i(R,void 0,void 0,(function(){var e,i,r,o,s,u,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,I.searchProducts({input:{productIdList:e}})]:[3,2];case 1:(i=n.sent()).isSuccess&&(null===(s=null===(o=i.data)||void 0===o?void 0:o.data)||void 0===s||s.forEach((function(t){c.bundleProductCache[t.id]=t}))),n.label=2;case 2:return null===(u=t.bundleSettings)||void 0===u||u.products.forEach((function(t){var e=c.bundleProductCache[t.productId];t.setProduct(new C(a(e)))})),[2]}}))}))},this.setOptionPrices=function(){var t,e=R.variants[0];if(e){var i=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===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=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 s(t)})):[],this.attributes=b.attributes?b.attributes.map((function(t){return new u(t)})):[],this.variantTypes=b.variantTypes?b.variantTypes.map((function(t){return new c(t)})):[],this.productOptionSetId=b.productOptionSetId||null,this.averageRating=null!==(S=b.averageRating)&&void 0!==S?S:null,this.reviewCount=null!==(k=b.reviewCount)&&void 0!==k?k:null,this.stars=b.stars?b.stars.map((function(t){return new x(t)})):null,this.baseUnit=b.baseUnit?new w(b.baseUnit):null,this.productOptionSet=b.productOptionSet?new h(b.productOptionSet):null,this.campaigns=(null===(A=b.campaigns)||void 0===A?void 0:A.map((function(t){return new y(t)})))||null,this.selectedVariantValues=b.selectedVariantValues||[],this.variantTypes=r(this.variantTypes,"order"),this.groupVariantsByVariantTypeId=b.groupVariantsByVariantTypeId||null,this.setOptionPrices(),m(this,{selectedVariantValues:v,isFiltered:v,isStatic:v,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})}return Object.defineProperty(C.prototype,"hasVariant",{get:function(){return b.hasVariant(this)},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"hasStock",{get:function(){return this.isStatic?this.selectedVariant.hasStock:b.hasStock(this)},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"hasValidProductOptionValues",{get:function(){return!this.productOptionSet||this.productOptionSet.hasValidValues},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"href",{get:function(){return b.getSelectedVariantHref(this,this.selectedVariantValues)},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"productHref",{get:function(){return this.groupVariantsByVariantTypeId||this.isFiltered?this.href:b.getProductHref(this)},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"mainVariantType",{get:function(){return b.getMainVariantType(this)},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"mainVariantValue",{get:function(){return b.getMainVariantValue(this.selectedVariantValues)},enumerable:!1,configurable:!0}),Object.defineProperty(C.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(C.prototype,"displayedVariantTypes",{get:function(){return b.getDisplayedVariantTypes(this,this.selectedVariantValues)},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"isCustomerReviewEnabled",{get:function(){return V.isCustomerReviewEnabled()},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"isCustomerReviewLoginRequired",{get:function(){return V.isCustomerReviewLoginRequired()},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"isAddToCartEnabled",{get:function(){return this.hasValidProductOptionValues&&(this.selectedVariant.hasStock||this.selectedVariant.sellIfOutOfStock)},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"groupedAttributeValues",{get:function(){var t,e=S(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(C.prototype,"selectedVariantUnitPriceText",{get:function(){return this.getVariantUnitPriceText(this.selectedVariant)},enumerable:!1,configurable:!0}),C}();export{C 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 s}from"./variant/index.js";import{IkasProductAttributeValue as u}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 m,observable as v,computed as g}from"mobx";import{IkasProductFunctions as b}from"@ikas/storefront-model-functions";import{IkasProductCampaign as y}from"./campaign/index.js";import{IkasStorefrontConfig as V}from"@ikas/storefront-config";import{Analytics as P}from"../../../analytics/analytics.js";import"../../../analytics/head/index.js";import{IkasBaseStore as O}from"../../../store/base.js";import S from"lodash/groupBy";import{IkasProductBaseUnit as w}from"./base-unit/index.js";import{formatCurrency as j}from"../../../utils/currency.js";import"lodash/get";import I from"../../../store/product/index.js";import{IkasCustomerReviewList as T}from"../../ui/customer-review-list/index.js";import{IkasProductStar as x}from"./star/index.js";var C=function(){function C(b){void 0===b&&(b={});var S,k,A,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.selectVariantValue=function(i,n){var r,a=R.metaData,o=R.selectedVariantValues.map((function(t){return t.variantTypeId===i.variantTypeId?i:t})),s=R.variants.find((function(t){return t.isActive&&o.every((function(e){return t.variantValues.some((function(t){return t.id===e.id}))}))}));if(s)R.selectedVariantValues=o;else{var u=R.variantTypes.findIndex((function(t){return t.variantType.id===i.variantTypeId}));if(u>0){var c=R.variantTypes.slice(0,u),d=R.selectedVariantValues.filter((function(t){return c.some((function(e){return e.variantType.id===t.variantTypeId}))})),l=t(t([],d,!0),[i],!1);s=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);(s=R.variants.find((function(t){return t.isActive&&p.every((function(e){return t.variantValues.some((function(t){return t.id===e.id}))}))})))||(s=R.variants.find((function(t){return t.isActive&&t.variantValues.some((function(t){return t.id===i.id}))})))}if(!s)return;R.selectedVariantValues=s.variantValues}var f={};new URLSearchParams(window.location.search).forEach((function(t,i){var n;f=e(e({},f),((n={})[i]=t,n))})),R.variantTypes.map((function(t){delete f[t.variantType.slug]}));var h=t(t([],R.variantTypes.map((function(t){var e=t.variantType,i=e.values.find((function(t){return R.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 m="/".concat(a.slug);if(h&&(m="/".concat(a.slug,"?").concat(h)),m===window.location.pathname)return;null===(r=O.getInstance().router)||void 0===r||r.replace(m,void 0,{shallow:!1,scroll:!1})}P.productView(R)},this.getVariantUnitPriceText=function(t){var e,i,n=t.price;if(n.unitPrice&&R.baseUnit){var r=R.baseUnit.baseAmount,a=(null===(i=null===(e=R.baseUnit)||void 0===e?void 0:e.unit)||void 0===i?void 0:i.name)||"";return"".concat(j(n.unitPrice,n.currency||"",n.currencySymbol||"")," / ").concat(r&&1!==r?r:"").concat(a)}},this.getCampaigns=function(){return i(R,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=O.getInstance(),e=t.customerStore.customer,i=e?e.customerGroupIds:null,r=this.variants.map((function(t){return t.id})),[4,I.getProductCampaigns({input:{customerGroupIds:i,salesChannelId:V.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(R,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=V.getPickupStockLocationIds(),[4,I.getVariantStockLocations({stockLocationIdList:e,variantIds:t})];case 1:return[2,i.sent().data||[]]}}))}))},this.getCustomerReviews=function(t){return i(R,void 0,void 0,(function(){var e;return n(this,(function(i){switch(i.label){case 0:return[4,(e=new T({productId:this.id,limit:null==t?void 0:t.limit,page:null==t?void 0:t.page})).getInitial()];case 1:return i.sent(),[2,e]}}))}))},this.getProductOptionSet=function(){return i(R,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,I.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.getBundleProductsOfVariant=function(t){return i(R,void 0,void 0,(function(){var e,i,r,o,s,u,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,I.searchProducts({input:{productIdList:e}})]:[3,2];case 1:(i=n.sent()).isSuccess&&(null===(s=null===(o=i.data)||void 0===o?void 0:o.data)||void 0===s||s.forEach((function(t){c.bundleProductCache[t.id]=t}))),n.label=2;case 2:return null===(u=t.bundleSettings)||void 0===u||u.products.forEach((function(t){var e=c.bundleProductCache[t.productId];t.setProduct(new C(a(e)))})),[2]}}))}))},this.setOptionPrices=function(){var t,e=R.variants[0];if(e){var i=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===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=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 s(t)})):[],this.attributes=b.attributes?b.attributes.map((function(t){return new u(t)})):[],this.variantTypes=b.variantTypes?b.variantTypes.map((function(t){return new c(t)})):[],this.productOptionSetId=b.productOptionSetId||null,this.averageRating=null!==(S=b.averageRating)&&void 0!==S?S:null,this.reviewCount=null!==(k=b.reviewCount)&&void 0!==k?k:null,this.stars=b.stars?b.stars.map((function(t){return new x(t)})):null,this.baseUnit=b.baseUnit?new w(b.baseUnit):null,this.productOptionSet=b.productOptionSet?new h(b.productOptionSet):null,this.campaigns=(null===(A=b.campaigns)||void 0===A?void 0:A.map((function(t){return new y(t)})))||null,this.selectedVariantValues=b.selectedVariantValues||[],this.variantTypes=r(this.variantTypes,"order"),this.groupVariantsByVariantTypeId=b.groupVariantsByVariantTypeId||null,this.setOptionPrices(),this.variants.forEach((function(t){return t.product=R})),m(this,{selectedVariantValues:v,isFiltered:v,isStatic:v,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})}return Object.defineProperty(C.prototype,"hasVariant",{get:function(){return b.hasVariant(this)},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"hasStock",{get:function(){return this.isStatic?this.selectedVariant.hasStock:b.hasStock(this)},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"hasValidProductOptionValues",{get:function(){return!this.productOptionSet||this.productOptionSet.hasValidValues},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"href",{get:function(){return b.getSelectedVariantHref(this,this.selectedVariantValues)},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"productHref",{get:function(){return this.groupVariantsByVariantTypeId||this.isFiltered?this.href:b.getProductHref(this)},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"mainVariantType",{get:function(){return b.getMainVariantType(this)},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"mainVariantValue",{get:function(){return b.getMainVariantValue(this.selectedVariantValues)},enumerable:!1,configurable:!0}),Object.defineProperty(C.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(C.prototype,"displayedVariantTypes",{get:function(){return b.getDisplayedVariantTypes(this,this.selectedVariantValues)},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"isCustomerReviewEnabled",{get:function(){return V.isCustomerReviewEnabled()},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"isCustomerReviewLoginRequired",{get:function(){return V.isCustomerReviewLoginRequired()},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"isAddToCartEnabled",{get:function(){return this.hasValidProductOptionValues&&(this.selectedVariant.hasStock||this.selectedVariant.sellIfOutOfStock)},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"groupedAttributeValues",{get:function(){var t,e=S(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(C.prototype,"selectedVariantUnitPriceText",{get:function(){return this.getVariantUnitPriceText(this.selectedVariant)},enumerable:!1,configurable:!0}),C}();export{C as IkasProduct};
|
|
@@ -6,6 +6,7 @@ import { IkasProductImage } from "../image";
|
|
|
6
6
|
import { IkasBundleSettings } from "./bundle-settings";
|
|
7
7
|
import { IkasProductVariant as IProductVariant } from "@ikas/storefront-models";
|
|
8
8
|
import { IkasProductVariantUnit } from "./unit";
|
|
9
|
+
import { IkasProduct } from "..";
|
|
9
10
|
export declare class IkasProductVariant implements IProductVariant {
|
|
10
11
|
id: string;
|
|
11
12
|
sku: string | null;
|
|
@@ -13,7 +14,7 @@ export declare class IkasProductVariant implements IProductVariant {
|
|
|
13
14
|
bundleSettings: IkasBundleSettings | null;
|
|
14
15
|
variantValues: IkasVariantValue[];
|
|
15
16
|
attributes: IkasProductAttributeValue[];
|
|
16
|
-
|
|
17
|
+
prices: IkasProductPrice[];
|
|
17
18
|
stock: number;
|
|
18
19
|
isActive: boolean;
|
|
19
20
|
productId: string;
|
|
@@ -22,6 +23,7 @@ export declare class IkasProductVariant implements IProductVariant {
|
|
|
22
23
|
campaigns?: IkasProductCampaign[];
|
|
23
24
|
unit: IkasProductVariantUnit | null;
|
|
24
25
|
private _backInStockReminderSaved;
|
|
26
|
+
product?: IkasProduct | null;
|
|
25
27
|
constructor(data?: Partial<IkasProductVariant>);
|
|
26
28
|
get mainImage(): IkasProductImage | undefined;
|
|
27
29
|
get hasStock(): boolean;
|
|
@@ -29,7 +31,18 @@ export declare class IkasProductVariant implements IProductVariant {
|
|
|
29
31
|
get isBackInStockCustomerLoginRequired(): boolean | null | undefined;
|
|
30
32
|
get isBackInStockReminderSaved(): boolean;
|
|
31
33
|
get groupedAttributeValues(): IkasProductAttributeMap[];
|
|
34
|
+
get b2bDiscountRatio(): number;
|
|
35
|
+
get price(): IkasProductPrice;
|
|
36
|
+
get finalPrice(): number;
|
|
32
37
|
get formattedFinalPrice(): string;
|
|
38
|
+
get sellPrice(): number;
|
|
33
39
|
get formattedSellPrice(): string;
|
|
40
|
+
get formattedBuyPrice(): string;
|
|
41
|
+
get discountPrice(): number | null;
|
|
42
|
+
get formattedDiscountPrice(): string;
|
|
43
|
+
get hasDiscount(): boolean;
|
|
44
|
+
get discountAmount(): number;
|
|
45
|
+
get discountPercentage(): string | 0;
|
|
34
46
|
saveBackInStockReminder(email: string): Promise<boolean>;
|
|
47
|
+
toJSON(): this;
|
|
35
48
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as e}from'./../../../../ext/tslib/tslib.es6.js';import{IkasProductPrice as
|
|
1
|
+
import{__awaiter as t,__generator as e,__assign as i}from'./../../../../ext/tslib/tslib.es6.js';import{IkasProductPrice as r}from"./price/index.js";import{IkasVariantValue as n}from"../../variant-type/variant-value/index.js";import{IkasProductAttributeValue as o}from"../attribute-value/index.js";import{IkasProductImage as u}from"../image/index.js";import{IkasBundleSettings as c}from"./bundle-settings/index.js";import{IkasCustomerPriceListRuleFilterType as s}from"@ikas/storefront-models";import{IkasProductVariantFunctions as a,IkasProductPriceFunctions as d}from"@ikas/storefront-model-functions";import{IkasStorefrontConfig as l}from"@ikas/storefront-config";import{saveProductBackInStockRemind as p,listProductBackInStockRemind as f}from"@ikas/storefront-api";import b from"lodash/groupBy";import m from"lodash/sortBy";import{IkasProductVariantUnit as h}from"./unit/index.js";import{formatCurrency as v}from"../../../../utils/currency.js";import{makeAutoObservable as g}from"mobx";import{IkasBaseStore as y}from"../../../../store/base.js";import"../../../../store/customer/index.js";import"../../../../store/cart/index.js";var P=function(){function P(t){void 0===t&&(t={}),this._backInStockReminderSaved=!1,this.product=null,this.id=t.id||Date.now()+"",this.productId=t.productId||"",this.sku=t.sku||null,this.barcodeList=t.barcodeList||[],this.bundleSettings=t.bundleSettings?new c(t.bundleSettings):null,this.variantValues=t.variantValues?t.variantValues.map((function(t){return new n(t)})):[],this.images=t.images?t.images.map((function(t){return new u(t)})):[],this.attributes=t.attributes?t.attributes.map((function(t){return new o(t)})):[],this.prices=t.prices?t.prices.map((function(t){return new r(t)})):[],this.stock=t.stock||0,this.isActive=void 0===t.isActive||t.isActive,this.campaigns=t.campaigns||[],this.unit=t.unit?new h(t.unit):null,this.sellIfOutOfStock=t.sellIfOutOfStock||!1,this.images=m(this.images,"order"),g(this)}return Object.defineProperty(P.prototype,"mainImage",{get:function(){var t=a.getMainImage(this);return t?new u(t):void 0},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"hasStock",{get:function(){return a.hasStock(this)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"isBackInStockEnabled",{get:function(){return l.isBackInStockEnabled()},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"isBackInStockCustomerLoginRequired",{get:function(){return l.isCustomerLoginRequiredForBackInStock()},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"isBackInStockReminderSaved",{get:function(){return this._backInStockReminderSaved},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"groupedAttributeValues",{get:function(){var t,e=b(this.attributes,"productAttributeId");return(null===(t=this.attributes)||void 0===t?void 0:t.map((function(t){var i=t.productAttributeId;if(i){var r=e[i];return(null==r?void 0:r.length)&&r[0].productAttribute?{attribute:r[0].productAttribute,values:r}:void 0}})).filter((function(t){return!!t})))||[]},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"b2bDiscountRatio",{get:function(){var t,e=this,i=y.getInstance().customerStore.customer,r=null==i?void 0:i.priceListRules;if(r){for(var n=0,o=r;n<o.length;n++){var u=o[n];if(null===(t=u.filters)||void 0===t?void 0:t.find((function(t){var i,r,n,o;if(t.type===s.CATEGORY)return u=null===(i=t.valueList)||void 0===i?void 0:i.some((function(t){var i;return null===(i=e.product)||void 0===i?void 0:i.categories.find((function(e){return e.id===t}))}));if(t.type===s.PRODUCT)return u=null===(r=t.valueList)||void 0===r?void 0:r.some((function(t){return e.id===t}));if(t.type===s.PRODUCT_BRAND){var u=null===(n=t.valueList)||void 0===n?void 0:n.some((function(t){var i,r;return(null===(r=null===(i=e.product)||void 0===i?void 0:i.brand)||void 0===r?void 0:r.id)===t}));return u}if(t.type===s.PRODUCT_TAG){u=null===(o=t.valueList)||void 0===o?void 0:o.some((function(t){var i,r;return null===(r=null===(i=e.product)||void 0===i?void 0:i.tags)||void 0===r?void 0:r.find((function(e){return e.id===t}))}));return u}})))return u.discountRate}return 0}return 0},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"price",{get:function(){var t,e;if(l.isB2BStorefront()){var i=y.getInstance().customerStore.customer;if(null==i?void 0:i.priceListId)return null===(t=this.prices)||void 0===t?void 0:t.find((function(t){return t.priceListId===i.priceListId}))}return null===(e=this.prices)||void 0===e?void 0:e.find((function(t){return l.getPriceListId()?t.priceListId===l.getPriceListId():null===t.priceListId}))},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"finalPrice",{get:function(){var t=d.getFinalPrice(this.price),e=0;this.bundleSettings?e=t+this.bundleSettings.products.reduce((function(t,e){return t+(e.addToBundleBasePrice?e.finalPriceWithQuantity:0)}),0):e=t;return this.b2bDiscountRatio?e*((100-this.b2bDiscountRatio)/100):e},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"formattedFinalPrice",{get:function(){return v(this.finalPrice,this.price.currency||"",this.price.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"sellPrice",{get:function(){return this.bundleSettings?this.price.sellPrice+this.bundleSettings.products.reduce((function(t,e){return t+(e.addToBundleBasePrice?e.sellPriceWithQuantity:0)}),0):this.price.sellPrice},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"formattedSellPrice",{get:function(){return v(this.sellPrice,this.price.currency||"",this.price.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"formattedBuyPrice",{get:function(){return v(this.price.buyPrice||0,this.price.currency||"",this.price.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"discountPrice",{get:function(){var t;return this.b2bDiscountRatio?(null!==(t=this.price.discountPrice)&&void 0!==t?t:this.price.sellPrice)*((100-this.b2bDiscountRatio)/100):this.price.discountPrice},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"formattedDiscountPrice",{get:function(){return v(this.discountPrice||0,this.price.currency||"",this.price.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"hasDiscount",{get:function(){return d.hasDiscount(this.price)||!!this.b2bDiscountRatio},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"discountAmount",{get:function(){return this.hasDiscount?this.sellPrice-this.finalPrice:0},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"discountPercentage",{get:function(){return this.hasDiscount?(100-100*this.finalPrice/this.sellPrice).toFixed(0):0},enumerable:!1,configurable:!0}),P.prototype.saveBackInStockReminder=function(i){var r;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,f({email:{eq:i},productId:{eq:this.productId},variantId:{eq:this.id}})];case 1:return(t=e.sent())&&(null===(r=t.data)||void 0===r?void 0:r.length)?(this._backInStockReminderSaved=!0,[2,!1]):[3,2];case 2:return[4,p({input:{email:i,productId:this.productId,variantId:this.id}})];case 3:return e.sent().isSuccess?(this._backInStockReminderSaved=!0,[2,!0]):(this._backInStockReminderSaved=!1,[2,!1]);case 4:return[2]}}))}))},P.prototype.toJSON=function(){var t=i({},this);return delete t.product,t},P}();export{P as IkasProductVariant};
|
|
@@ -8,12 +8,36 @@ export declare class IkasProductPrice implements IProductPrice {
|
|
|
8
8
|
sellPrice: number;
|
|
9
9
|
unitPrice: number | null;
|
|
10
10
|
constructor(data?: IProductPrice);
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated Use variant.finalPrice instead.
|
|
13
|
+
*/
|
|
11
14
|
get finalPrice(): number;
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated Use variant.formattedFinalPrice instead.
|
|
17
|
+
*/
|
|
12
18
|
get formattedFinalPrice(): string;
|
|
19
|
+
/**
|
|
20
|
+
* @deprecated Use variant.formattedBuyPrice instead.
|
|
21
|
+
*/
|
|
13
22
|
get formattedBuyPrice(): string;
|
|
23
|
+
/**
|
|
24
|
+
* @deprecated Use variant.formattedDiscountPrice instead.
|
|
25
|
+
*/
|
|
14
26
|
get formattedDiscountPrice(): string;
|
|
27
|
+
/**
|
|
28
|
+
* @deprecated Use variant.formattedSellPrice instead.
|
|
29
|
+
*/
|
|
15
30
|
get formattedSellPrice(): string;
|
|
31
|
+
/**
|
|
32
|
+
* @deprecated Use variant.hasDiscount instead.
|
|
33
|
+
*/
|
|
16
34
|
get hasDiscount(): boolean;
|
|
35
|
+
/**
|
|
36
|
+
* @deprecated Use variant.discountAmount instead.
|
|
37
|
+
*/
|
|
17
38
|
get discountAmount(): number;
|
|
39
|
+
/**
|
|
40
|
+
* @deprecated Use variant.discountPercentage instead.
|
|
41
|
+
*/
|
|
18
42
|
get discountPercentage(): string | 0;
|
|
19
43
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IkasStorefrontB2BShowPricesEnum, IkasStorefrontB2BShowProductsEnum } from "@ikas/storefront-models";
|
|
2
|
+
export declare class IkasStorefrontB2BSettings implements IkasStorefrontB2BSettings {
|
|
3
|
+
allowOnlyApprovedCustomersToLogin: boolean;
|
|
4
|
+
showPrices: IkasStorefrontB2BShowPricesEnum;
|
|
5
|
+
showProducts: IkasStorefrontB2BShowProductsEnum;
|
|
6
|
+
constructor(data?: Partial<IkasStorefrontB2BSettings>);
|
|
7
|
+
}
|
|
8
|
+
export { IkasStorefrontB2BShowPricesEnum, IkasStorefrontB2BShowProductsEnum };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{IkasStorefrontB2BShowPricesEnum as o,IkasStorefrontB2BShowProductsEnum as s}from"@ikas/storefront-models";export{IkasStorefrontB2BShowPricesEnum,IkasStorefrontB2BShowProductsEnum}from"@ikas/storefront-models";var r=function(r){void 0===r&&(r={}),this.allowOnlyApprovedCustomersToLogin=r.allowOnlyApprovedCustomersToLogin||!1,this.showPrices=r.showPrices||o.ALWAYS,this.showProducts=r.showProducts||s.ALWAYS};export{r as IkasStorefrontB2BSettings};
|
|
@@ -2,14 +2,16 @@ import { IkasStorefrontLocalization } from "./localization";
|
|
|
2
2
|
import { IkasStorefrontDomain } from "./domain";
|
|
3
3
|
import { IkasStorefrontRouting } from "./routing";
|
|
4
4
|
import { IkasStorefrontTheme } from "./theme";
|
|
5
|
-
import { IkasStorefrontStatus } from "@ikas/storefront-models";
|
|
5
|
+
import { IkasStorefrontStatus, IkasStorefrontType } from "@ikas/storefront-models";
|
|
6
6
|
import { IkasStorefront as IStorefront } from "@ikas/storefront-models";
|
|
7
7
|
import { IkasStorefontMetaTemplates } from "./meta-templates";
|
|
8
8
|
import { IkasIndexPageSeoSetting } from "./index-page-seo-setting";
|
|
9
|
+
import { IkasStorefrontB2BSettings } from "./b2b-settings";
|
|
9
10
|
export declare class IkasStorefront implements IStorefront {
|
|
10
11
|
id: string;
|
|
11
12
|
name: string;
|
|
12
13
|
status: IkasStorefrontStatus;
|
|
14
|
+
b2bSettings: IkasStorefrontB2BSettings | null;
|
|
13
15
|
mainStorefrontThemeId: string | null;
|
|
14
16
|
metaTemplates: IkasStorefontMetaTemplates[] | null;
|
|
15
17
|
pickUpStockLocationIds: string[] | null;
|
|
@@ -21,6 +23,7 @@ export declare class IkasStorefront implements IStorefront {
|
|
|
21
23
|
universalAnalyticsId: string | null;
|
|
22
24
|
tiktokPixelId: string | null;
|
|
23
25
|
token: string | null;
|
|
26
|
+
type: IkasStorefrontType;
|
|
24
27
|
robotsTxt: string | null;
|
|
25
28
|
localizations: IkasStorefrontLocalization[];
|
|
26
29
|
routings: IkasStorefrontRouting[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{IkasStorefrontLocalization as t}from"./localization/index.js";import{IkasStorefrontDomain as i}from"./domain/index.js";import{IkasStorefrontRouting as n}from"./routing/index.js";import{IkasStorefrontTheme as e}from"./theme/index.js";import{IkasStorefrontStatus as s}from"@ikas/storefront-models";export{IkasStorefrontStatus}from"@ikas/storefront-models";import{makeAutoObservable as
|
|
1
|
+
import{IkasStorefrontLocalization as t}from"./localization/index.js";import{IkasStorefrontDomain as i}from"./domain/index.js";import{IkasStorefrontRouting as n}from"./routing/index.js";import{IkasStorefrontTheme as e}from"./theme/index.js";import{IkasStorefrontStatus as s,IkasStorefrontType as o}from"@ikas/storefront-models";export{IkasStorefrontStatus}from"@ikas/storefront-models";import{makeAutoObservable as a}from"mobx";import{IkasStorefontMetaTemplates as l}from"./meta-templates/index.js";import{IkasIndexPageSeoSetting as m}from"./index-page-seo-setting/index.js";import{IkasStorefrontB2BSettings as r}from"./b2b-settings/index.js";var d=function(d){void 0===d&&(d={}),this.id=d.id||"",this.name=d.name||"",this.status=d.status||s.WAITING,this.b2bSettings=d.b2bSettings?new r(d.b2bSettings):null,this.mainStorefrontThemeId=d.mainStorefrontThemeId||null,this.pickUpStockLocationIds=d.pickUpStockLocationIds||null,this.emailSettingsId=d.emailSettingsId||null,this.salesChannelId=d.salesChannelId||null,this.gtmId=d.gtmId||null,this.fbpId=d.fbpId||null,this.analytics4Id=d.analytics4Id||null,this.universalAnalyticsId=d.universalAnalyticsId||null,this.tiktokPixelId=d.tiktokPixelId||null,this.token=d.token||null,this.type=d.type||o.STOREFRONT,this.robotsTxt=d.robotsTxt||null,this.metaTemplates=d.metaTemplates?d.metaTemplates.map((function(t){return new l(t)})):null,this.localizations=d.localizations?d.localizations.map((function(i){return new t(i)})):[],this.routings=d.routings?d.routings.map((function(t){return new n(t)})):[],this.domains=d.domains?d.domains.map((function(t){return new i(t)})):[],this.themes=d.themes?d.themes.map((function(t){return new e(t)})):[],this.indexPageSeoSettings=d.indexPageSeoSettings?d.indexPageSeoSettings.map((function(t){return new m(t)})):[],a(this)};export{d as IkasStorefront};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ikas/storefront",
|
|
3
|
-
"version": "4.10.0-beta.
|
|
3
|
+
"version": "4.10.0-beta.26",
|
|
4
4
|
"description": "Storefront functionality for ikas storefront themes.",
|
|
5
5
|
"author": "ikas",
|
|
6
6
|
"license": "ISC",
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
"build": "rm -rf build && rollup -c"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@ikas/storefront-api": "^4.10.0-beta.
|
|
21
|
-
"@ikas/storefront-config": "^4.10.0-beta.
|
|
22
|
-
"@ikas/storefront-model-functions": "^4.10.0-beta.
|
|
23
|
-
"@ikas/storefront-models": "^4.10.0-beta.
|
|
24
|
-
"@ikas/storefront-providers": "^4.10.0-beta.
|
|
20
|
+
"@ikas/storefront-api": "^4.10.0-beta.26",
|
|
21
|
+
"@ikas/storefront-config": "^4.10.0-beta.26",
|
|
22
|
+
"@ikas/storefront-model-functions": "^4.10.0-beta.26",
|
|
23
|
+
"@ikas/storefront-models": "^4.10.0-beta.26",
|
|
24
|
+
"@ikas/storefront-providers": "^4.10.0-beta.26",
|
|
25
25
|
"@ikas/localized-address": "^1.0.0-beta.3",
|
|
26
26
|
"@adyen/adyen-web": "^5.28.2",
|
|
27
27
|
"@rollup/plugin-commonjs": "^22.0.0",
|
|
@@ -55,11 +55,11 @@
|
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"@ikas/localized-address": "^1.0.0-beta.3",
|
|
58
|
-
"@ikas/storefront-api": "^4.10.0-beta.
|
|
59
|
-
"@ikas/storefront-config": "^4.10.0-beta.
|
|
60
|
-
"@ikas/storefront-model-functions": "^4.10.0-beta.
|
|
61
|
-
"@ikas/storefront-models": "^4.10.0-beta.
|
|
62
|
-
"@ikas/storefront-providers": "^4.10.0-beta.
|
|
58
|
+
"@ikas/storefront-api": "^4.10.0-beta.26",
|
|
59
|
+
"@ikas/storefront-config": "^4.10.0-beta.26",
|
|
60
|
+
"@ikas/storefront-model-functions": "^4.10.0-beta.26",
|
|
61
|
+
"@ikas/storefront-models": "^4.10.0-beta.26",
|
|
62
|
+
"@ikas/storefront-providers": "^4.10.0-beta.26",
|
|
63
63
|
"mobx": "^6.1.3",
|
|
64
64
|
"mobx-react-lite": "^3.1.5",
|
|
65
65
|
"next": "12.2.0",
|