@ikas/storefront 4.2.0-alpha.2 → 4.2.0-alpha.4

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.
Files changed (86) hide show
  1. package/build/analytics/analytics.js +1 -1
  2. package/build/analytics/googleAnalytics.js +1 -1
  3. package/build/analytics/googleTagManager.js +1 -1
  4. package/build/analytics/googleUniversal.js +1 -1
  5. package/build/analytics/ikas.js +1 -1
  6. package/build/components/checkout/components/address-form/index.js +1 -1
  7. package/build/components/checkout/components/address-form/model.d.ts +4 -4
  8. package/build/components/checkout/components/address-form/model.js +1 -1
  9. package/build/components/checkout/components/cart-summary/cart-item/index.js +1 -1
  10. package/build/components/checkout/components/cart-summary/index.d.ts +4 -0
  11. package/build/components/checkout/components/cart-summary/index.js +1 -1
  12. package/build/components/checkout/components/customer-addresses/index.js +1 -1
  13. package/build/components/checkout/components/customer-addresses/model.d.ts +5 -5
  14. package/build/components/checkout/components/customer-addresses/model.js +1 -1
  15. package/build/components/checkout/components/offer-product/index.js +1 -1
  16. package/build/components/checkout/components/phone-number-input/index.js +1 -1
  17. package/build/components/checkout/components/phone-number-input/style.module.scss.js +1 -1
  18. package/build/components/checkout/components/quick-registration/model.js +1 -1
  19. package/build/components/checkout/index.js +1 -1
  20. package/build/components/checkout/model.d.ts +5 -1
  21. package/build/components/checkout/model.js +1 -1
  22. package/build/components/checkout/steps/step-payment/payment-gateways/index.js +1 -1
  23. package/build/components/checkout/steps/step-success/index.js +1 -1
  24. package/build/components/page/head.js +1 -1
  25. package/build/components/page/index.js +1 -1
  26. package/build/components/page-editor/ThemeComponentEditor.js +1 -1
  27. package/build/components/page-editor/model.js +1 -1
  28. package/build/hooks/useStore.js +1 -1
  29. package/build/index.js +1 -1
  30. package/build/models/data/cart/index.d.ts +1 -1
  31. package/build/models/data/cart/index.js +1 -1
  32. package/build/models/data/checkout/country-settings-model.d.ts +139 -0
  33. package/build/models/data/checkout/country-settings-model.js +1 -0
  34. package/build/models/data/checkout/index.d.ts +5 -1
  35. package/build/models/data/checkout/index.js +1 -1
  36. package/build/models/data/checkout-settings/index.d.ts +1 -1
  37. package/build/models/data/checkout-settings/index.js +1 -1
  38. package/build/models/data/customer/address/ikas-localize-customer-address.d.ts +65 -0
  39. package/build/models/data/customer/address/ikas-localize-customer-address.js +1 -0
  40. package/build/models/data/image/index.d.ts +1 -0
  41. package/build/models/data/image/index.js +1 -1
  42. package/build/models/data/index.d.ts +3 -0
  43. package/build/models/data/order/address/ikas-localize-order-address.d.ts +47 -0
  44. package/build/models/data/order/address/ikas-localize-order-address.js +1 -0
  45. package/build/models/data/order/address/index.js +1 -1
  46. package/build/models/data/order/index.d.ts +1 -1
  47. package/build/models/data/order/index.js +1 -1
  48. package/build/models/data/order/line-item/index.d.ts +1 -0
  49. package/build/models/data/order/line-item/index.js +1 -1
  50. package/build/models/data/order/transaction/index.d.ts +1 -0
  51. package/build/models/data/order/transaction/index.js +1 -1
  52. package/build/models/data/product/index.d.ts +3 -0
  53. package/build/models/data/product/index.js +1 -1
  54. package/build/models/data/product/option-set/option/index.js +1 -1
  55. package/build/models/data/product/stock-location/index.d.ts +8 -0
  56. package/build/models/data/product/stock-location/index.js +1 -0
  57. package/build/models/data/theme-json/component/index.d.ts +3 -0
  58. package/build/models/data/theme-json/component/index.js +1 -1
  59. package/build/models/ui/blog-category-list/index.js +1 -1
  60. package/build/models/ui/brand-list/index.js +1 -1
  61. package/build/models/ui/category-list/index.js +1 -1
  62. package/build/models/ui/customer-review-list/index.js +1 -1
  63. package/build/models/ui/customer-review-summary-list/index.js +1 -1
  64. package/build/models/ui/index.d.ts +1 -0
  65. package/build/models/ui/product-list/index.d.ts +1 -0
  66. package/build/models/ui/product-list/index.js +1 -1
  67. package/build/models/ui/raffle-list/index.js +1 -1
  68. package/build/models/ui/validator/form/account-info.js +1 -1
  69. package/build/models/ui/validator/form/address.js +1 -1
  70. package/build/models/ui/validator/form/ikas-address.d.ts +144 -0
  71. package/build/models/ui/validator/form/ikas-address.js +1 -0
  72. package/build/page-data-init/index.js +1 -1
  73. package/build/pages/checkout.js +1 -1
  74. package/build/store/blog/index.js +1 -1
  75. package/build/store/brand/index.js +1 -1
  76. package/build/store/category/index.js +1 -1
  77. package/build/store/checkout/index.js +1 -1
  78. package/build/store/customer/api.js +1 -1
  79. package/build/store/customer/index.js +1 -1
  80. package/build/store/html-meta-data/index.js +1 -1
  81. package/build/store/location/index.js +1 -1
  82. package/build/store/product/index.d.ts +11 -1
  83. package/build/store/product/index.js +1 -1
  84. package/build/utils/constants.d.ts +1 -0
  85. package/build/utils/constants.js +1 -1
  86. 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{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{IkasCustomerAddressState}from"./models/data/customer/address/state/index.js";export{IkasCustomerAddress}from"./models/data/customer/address/index.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{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{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{IkasRaffle,IkasRaffleAppliedProduct,IkasRaffleDateRangeField,IkasRaffleMetaData,IkasRaffleParticipant}from"./models/data/raffle/index.js";export{IkasSalesChannel,IkasSalesChannelPaymentGateway,IkasSalesChannelStockLocation}from"./models/data/sales-channel/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{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{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{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};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{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{AddressFormItem,IkasAddressFormInputType}from"./models/data/checkout/country-settings-model.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{IkasCustomerAddressState}from"./models/data/customer/address/state/index.js";export{IkasCustomerAddress}from"./models/data/customer/address/index.js";export{IkasLocalizeCustomerAddress}from"./models/data/customer/address/ikas-localize-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{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{IkasRaffle,IkasRaffleAppliedProduct,IkasRaffleDateRangeField,IkasRaffleMetaData,IkasRaffleParticipant}from"./models/data/raffle/index.js";export{IkasSalesChannel,IkasSalesChannelPaymentGateway,IkasSalesChannelStockLocation}from"./models/data/sales-channel/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{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{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};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";
@@ -9,5 +9,5 @@ export declare class IkasCart extends IkasOrder implements ICart {
9
9
  shippingSettingsId: string | null;
10
10
  shippingZoneRateId: string | null;
11
11
  stockLocationId: string | null;
12
- constructor(data: Partial<ICart>);
12
+ constructor(data: Partial<ICart>, removeObservableAddresses?: boolean);
13
13
  }
@@ -1 +1 @@
1
- import{__extends as n}from'./../../../ext/tslib/tslib.es6.js';import{IkasCartCampaignOffer as i}from"./campaign-offer/index.js";import{IkasAvailableShippingMethod as o}from"./available-shipping-method/index.js";import{IkasOrder as e}from"../order/index.js";import{makeObservable as t,observable as l}from"mobx";var p=function(e){function p(n){var p,a,s=this;return(s=e.call(this,n)||this).availableShippingMethods=null,s.campaignOffers=null,s.couponCode=null,s.shippingSettingsId=null,s.shippingZoneRateId=null,s.stockLocationId=null,s.availableShippingMethods=(null===(p=n.availableShippingMethods)||void 0===p?void 0:p.map((function(n){return new o(n)})))||null,s.campaignOffers=(null===(a=n.campaignOffers)||void 0===a?void 0:a.map((function(n){return new i(n)})))||null,s.couponCode=n.couponCode||null,s.shippingSettingsId=n.shippingSettingsId||null,s.shippingZoneRateId=n.shippingZoneRateId||null,s.stockLocationId=n.stockLocationId||null,t(s,{availableShippingMethods:l,campaignOffers:l,couponCode:l,shippingSettingsId:l,shippingZoneRateId:l,stockLocationId:l}),s}return n(p,e),p}(e);export{p as IkasCart};
1
+ import{__extends as n}from'./../../../ext/tslib/tslib.es6.js';import{IkasCartCampaignOffer as i}from"./campaign-offer/index.js";import{IkasAvailableShippingMethod as o}from"./available-shipping-method/index.js";import{IkasOrder as e}from"../order/index.js";import{makeObservable as t,observable as l}from"mobx";var p=function(e){function p(n,p){var a,s,d=this;return(d=e.call(this,n,p)||this).availableShippingMethods=null,d.campaignOffers=null,d.couponCode=null,d.shippingSettingsId=null,d.shippingZoneRateId=null,d.stockLocationId=null,d.availableShippingMethods=(null===(a=n.availableShippingMethods)||void 0===a?void 0:a.map((function(n){return new o(n)})))||null,d.campaignOffers=(null===(s=n.campaignOffers)||void 0===s?void 0:s.map((function(n){return new i(n)})))||null,d.couponCode=n.couponCode||null,d.shippingSettingsId=n.shippingSettingsId||null,d.shippingZoneRateId=n.shippingZoneRateId||null,d.stockLocationId=n.stockLocationId||null,t(d,{availableShippingMethods:l,campaignOffers:l,couponCode:l,shippingSettingsId:l,shippingZoneRateId:l,stockLocationId:l}),d}return n(p,e),p}(e);export{p as IkasCart};
@@ -0,0 +1,139 @@
1
+ import { IkasCheckoutRequirement, IkasCheckoutSettings, IkasOrderAddress } from "@ikas/storefront-models";
2
+ export interface CountrySettingsModelConstructorData {
3
+ checkoutSettings?: IkasCheckoutSettings;
4
+ }
5
+ export default class CountrySettingsModel {
6
+ private _initialized;
7
+ private _addressFormCountrySettings;
8
+ private _addressFormCountryLabels;
9
+ private checkoutSettings?;
10
+ constructor(data?: CountrySettingsModelConstructorData);
11
+ init(): Promise<void>;
12
+ get initialized(): boolean;
13
+ waitUntilInitialized(): Promise<unknown>;
14
+ getCountrySettings(country: string): IkasAddressFormCountrySettings;
15
+ getCountryLabels(country: string): IkasAddressFormCountryLabels;
16
+ getFieldSettings(country: string): {
17
+ firstName: AddressFormField;
18
+ lastName: AddressFormField;
19
+ identityNumber: AddressFormField;
20
+ phone: AddressFormField;
21
+ addressLine1: AddressFormField;
22
+ addressLine2: AddressFormField;
23
+ postalCode: AddressFormField;
24
+ country: AddressFormField;
25
+ state: AddressFormField;
26
+ city: AddressFormField;
27
+ district: AddressFormField;
28
+ company?: AddressFormField | undefined;
29
+ taxOffice?: AddressFormField | undefined;
30
+ taxNumber?: AddressFormField | undefined;
31
+ };
32
+ getFieldLabels(country: string): IkasAddressFormLabels | undefined;
33
+ getAddressFormatView(addressFormat: string): AddressFormItem[][];
34
+ getBillingFormatView(billingFormat: string): AddressFormItem[][];
35
+ getAddressFormat(country: string): AddressFormItem[][];
36
+ getBillingFormat(country: string): AddressFormItem[][];
37
+ getAddressFormatIgnoreCountry(country: string): AddressFormItem[][];
38
+ getValidationResult(address: IkasOrderAddress): {
39
+ firstName: ErrorType;
40
+ lastName: ErrorType;
41
+ addressLine1: ErrorType;
42
+ addressLine2: ErrorType;
43
+ country: ErrorType;
44
+ state: ErrorType;
45
+ city: ErrorType;
46
+ district: ErrorType;
47
+ phone: ErrorType;
48
+ postalCode: ErrorType;
49
+ identityNumber: ErrorType;
50
+ } | undefined;
51
+ isValidAddress(address: IkasOrderAddress): boolean;
52
+ isValidField(field: string, fieldSettings: AddressFormField | undefined, checkoutRequirement?: IkasCheckoutRequirement | null): ErrorType;
53
+ isFreeTextCity(country: string): boolean;
54
+ isFreeTextDistrict(country: string): boolean;
55
+ getAddressFormCountrySettings(): Promise<void>;
56
+ getAddressFormCountryLabels(): Promise<void>;
57
+ validatePhoneNumber(str: string): boolean;
58
+ validateByRegexString(str: string, regexStr: string): boolean;
59
+ }
60
+ export declare type ErrorType = {
61
+ hasError: boolean;
62
+ isInvalid: boolean;
63
+ isEmpty: boolean;
64
+ };
65
+ export declare type IkasAddressFormCountrySettings = {
66
+ id: string;
67
+ addressFormat: string;
68
+ billingFormat: string;
69
+ code: string;
70
+ iso2: string;
71
+ iso3: string;
72
+ phoneCode: string;
73
+ fields: IkasAddressFormFields;
74
+ };
75
+ export declare type IkasAddressFormFields = {
76
+ firstName?: AddressFormField;
77
+ lastName?: AddressFormField;
78
+ identityNumber?: AddressFormField;
79
+ addressLine1?: AddressFormField;
80
+ addressLine2?: AddressFormField;
81
+ postalCode?: AddressFormField;
82
+ country?: AddressFormField;
83
+ state?: AddressFormField;
84
+ city?: AddressFormField;
85
+ district?: AddressFormField;
86
+ phone?: AddressFormField;
87
+ company?: AddressFormField;
88
+ taxOffice?: AddressFormField;
89
+ taxNumber?: AddressFormField;
90
+ };
91
+ export declare type AddressFormField = {
92
+ required?: boolean;
93
+ type?: IkasAddressFormInputType;
94
+ regex?: string;
95
+ };
96
+ export declare enum IkasAddressFormInputType {
97
+ TEXT = "text",
98
+ DROPDOWN = "dropdown"
99
+ }
100
+ export declare type IkasAddressFormCountryLabels = {
101
+ name: string;
102
+ fields: IkasAddressFormLabels;
103
+ };
104
+ export declare type IkasAddressFormLabels = {
105
+ firstName?: AddressFormLabel;
106
+ lastName?: AddressFormLabel;
107
+ identityNumber?: AddressFormLabel;
108
+ addressLine1?: AddressFormLabel;
109
+ addressLine2?: AddressFormLabel;
110
+ postalCode?: AddressFormLabel;
111
+ country?: AddressFormLabel;
112
+ state?: AddressFormLabel;
113
+ city?: AddressFormLabel;
114
+ district?: AddressFormLabel;
115
+ phone?: AddressFormLabel;
116
+ company?: AddressFormLabel;
117
+ taxOffice?: AddressFormLabel;
118
+ taxNumber?: AddressFormLabel;
119
+ };
120
+ export declare type AddressFormLabel = {
121
+ placeholder?: string;
122
+ label?: string;
123
+ };
124
+ export declare enum AddressFormItem {
125
+ FIRSTNAME = "firstName",
126
+ LASTNAME = "lastName",
127
+ IDENTITY_NUMBER = "identityNumber",
128
+ ADDRESS_LINE_1 = "addressLine1",
129
+ ADDRESS_LINE_2 = "addressLine2",
130
+ POSTAL_CODE = "postalCode",
131
+ COUNTRY = "country",
132
+ STATE = "state",
133
+ CITY = "city",
134
+ DISTRICT = "district",
135
+ PHONE = "phone",
136
+ COMPANY = "company",
137
+ TAX_OFFICE = "taxOffice",
138
+ TAX_NUMBER = "taxNumber"
139
+ }
@@ -0,0 +1 @@
1
+ import{__awaiter as t,__assign as e,__generator as i}from'./../../../ext/tslib/tslib.es6.js';import{makeAutoObservable as r}from"mobx";import{IkasStorefrontConfig as n}from"@ikas/storefront-config";import{IkasCheckoutRequirement as s}from"@ikas/storefront-models";import o from"lodash/difference";import{COUNTRY_FORMS_LOCALES as d}from"../../../utils/constants.js";var u,a,l=function(){function l(t){void 0===t&&(t={}),this._initialized=!1,this.checkoutSettings=t.checkoutSettings,this.init(),r(this)}return l.prototype.init=function(){return t(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.getAddressFormCountrySettings()];case 1:return t.sent(),[4,this.getAddressFormCountryLabels()];case 2:return t.sent(),this._initialized=!0,[2]}}))}))},Object.defineProperty(l.prototype,"initialized",{get:function(){return this._initialized},enumerable:!1,configurable:!0}),l.prototype.waitUntilInitialized=function(){var t=this;return new Promise((function(e){var i=setInterval((function(){t.initialized&&(clearInterval(i),e(null))}),100)}))},l.prototype.getCountrySettings=function(t){return this._addressFormCountrySettings.countrySettings[t]},l.prototype.getCountryLabels=function(t){return this._addressFormCountryLabels.countryLabels[t]},l.prototype.getFieldSettings=function(t){var i,r,n,o,d,u,a,l,c=this.getCountrySettings(t),h=e(e({},c.fields),{firstName:{required:!0},lastName:{required:!0},identityNumber:e(e({},c.fields.identityNumber),{required:(null===(i=c.fields.identityNumber)||void 0===i?void 0:i.required)||!1}),phone:e(e({},c.fields.phone),{required:(null===(r=c.fields.phone)||void 0===r?void 0:r.required)||!1}),addressLine1:{required:!0},addressLine2:e(e({},c.fields.addressLine2),{required:(null===(n=c.fields.addressLine2)||void 0===n?void 0:n.required)||!1}),postalCode:e(e({},c.fields.postalCode),{required:(null===(o=c.fields.postalCode)||void 0===o?void 0:o.required)||!1}),country:e(e({},c.fields.country),{required:(null===(d=c.fields.country)||void 0===d?void 0:d.required)||!1}),state:e(e({},c.fields.state),{required:(null===(u=c.fields.state)||void 0===u?void 0:u.required)||!1}),city:e(e({},c.fields.city),{required:(null===(a=c.fields.city)||void 0===a?void 0:a.required)||!1}),district:e(e({},c.fields.district),{required:(null===(l=c.fields.district)||void 0===l?void 0:l.required)||!1})});return this.checkoutSettings&&(this.checkoutSettings.phoneRequirement&&(h.phone.required=this.checkoutSettings.phoneRequirement===s.MANDATORY),this.checkoutSettings.postalCodeRequirement&&(h.postalCode.required=this.checkoutSettings.postalCodeRequirement===s.MANDATORY),this.checkoutSettings.identityNumberRequirement&&(h.identityNumber.required=this.checkoutSettings.identityNumberRequirement===s.MANDATORY)),h},l.prototype.getFieldLabels=function(t){var e=this.getCountryLabels(t);if(e)return e.fields},l.prototype.getAddressFormatView=function(t){return this._addressFormCountrySettings.addressFormats[t]},l.prototype.getBillingFormatView=function(t){return this._addressFormCountrySettings.billingFormats[t]},l.prototype.getAddressFormat=function(t){var e=this.getCountrySettings(t),i=this.getAddressFormatView(e.addressFormat);if(this.checkoutSettings&&i){var r=[];return this.checkoutSettings.identityNumberRequirement===s.INVISIBLE&&r.push(a.IDENTITY_NUMBER),this.checkoutSettings.postalCodeRequirement===s.INVISIBLE&&r.push(a.POSTAL_CODE),this.checkoutSettings.phoneRequirement===s.INVISIBLE&&r.push(a.PHONE),i.map((function(t){return o(t,r)}))||[]}return i},l.prototype.getBillingFormat=function(t){var e=this.getCountrySettings(t);return this.getBillingFormatView(e.billingFormat)},l.prototype.getAddressFormatIgnoreCountry=function(t){return this.getAddressFormat(t).map((function(t){return o(t,[a.COUNTRY])}))},l.prototype.getValidationResult=function(t){var e,i,r,n,o,d,u,a,l=this.getFieldSettings((null===(e=t.country)||void 0===e?void 0:e.iso2)||"TR");if(l){var c=!!t.phone&&t.phone.length>=10&&this.validatePhoneNumber(t.phone);return{firstName:this.isValidField(t.firstName,l.firstName),lastName:this.isValidField(t.lastName,l.lastName),addressLine1:this.isValidField(t.addressLine1,l.addressLine1),addressLine2:this.isValidField(t.addressLine2||"",l.addressLine2),country:this.isValidField((null===(i=t.country)||void 0===i?void 0:i.name)||"",l.country),state:this.isValidField((null===(r=t.state)||void 0===r?void 0:r.name)||"",l.state),city:this.isValidField((null===(n=t.city)||void 0===n?void 0:n.name)||"",l.city),district:this.isValidField((null===(o=t.district)||void 0===o?void 0:o.name)||"",l.district),phone:(null===(d=l.phone)||void 0===d?void 0:d.regex)?this.isValidField(t.phone||"",l.phone,this.checkoutSettings?this.checkoutSettings.phoneRequirement:void 0):(null===(u=this.checkoutSettings)||void 0===u?void 0:u.phoneRequirement)===s.MANDATORY||(null===(a=this.checkoutSettings)||void 0===a?void 0:a.phoneRequirement)===s.OPTIONAL&&t.phone?{hasError:!c,isInvalid:!c,isEmpty:!t.phone}:{hasError:!1,isInvalid:!1,isEmpty:!1},postalCode:this.isValidField(t.postalCode||"",l.postalCode,this.checkoutSettings?this.checkoutSettings.postalCodeRequirement:void 0),identityNumber:this.isValidField(t.identityNumber||"",l.identityNumber,this.checkoutSettings?this.checkoutSettings.identityNumberRequirement:void 0)}}},l.prototype.isValidAddress=function(t){var e=this.getValidationResult(t);return!!e&&Object.values(e).every((function(t){return!t.hasError}))},l.prototype.isValidField=function(t,e,i){var r=!1,n=!1,o=i?i===s.MANDATORY:(null==e?void 0:e.required)||!1,d=!!(null==e?void 0:e.regex)||!1;return o&&!d&&(n=!t),o&&d&&(n=!t,r=!this.validateByRegexString(t,e.regex)),!o&&d&&t&&(r=!this.validateByRegexString(t,e.regex)),{hasError:r||n,isInvalid:r,isEmpty:n}},l.prototype.isFreeTextCity=function(t){var e=this.getFieldSettings(t);return e&&e.city&&e.city.type===u.TEXT},l.prototype.isFreeTextDistrict=function(t){var e=this.getFieldSettings(t);return e&&e.district&&e.district.type===u.TEXT},l.prototype.getAddressFormCountrySettings=function(){return t(this,void 0,void 0,(function(){var t;return i(this,(function(e){switch(e.label){case 0:return"https://cdn.myikas.com/sf/static/location/settings.json",[4,fetch("https://cdn.myikas.com/sf/static/location/settings.json")];case 1:return[4,e.sent().json()];case 2:return t=e.sent(),this._addressFormCountrySettings=t,[2]}}))}))},l.prototype.getAddressFormCountryLabels=function(){return t(this,void 0,void 0,(function(){var t,e,r;return i(this,(function(i){switch(i.label){case 0:return t=n.getCurrentLocale(),d.find((function(e){return e===t}))||(t="en"),e="https://cdn.myikas.com/sf/static/location/".concat(t,".json"),[4,fetch(e)];case 1:return[4,i.sent().json()];case 2:return r=i.sent(),this._addressFormCountryLabels=r,[2]}}))}))},l.prototype.validatePhoneNumber=function(t){return/^\+?\d+$/.test(t)},l.prototype.validateByRegexString=function(t,e){return new RegExp(e).test(t)},l}();!function(t){t.TEXT="text",t.DROPDOWN="dropdown"}(u||(u={})),function(t){t.FIRSTNAME="firstName",t.LASTNAME="lastName",t.IDENTITY_NUMBER="identityNumber",t.ADDRESS_LINE_1="addressLine1",t.ADDRESS_LINE_2="addressLine2",t.POSTAL_CODE="postalCode",t.COUNTRY="country",t.STATE="state",t.CITY="city",t.DISTRICT="district",t.PHONE="phone",t.COMPANY="company",t.TAX_OFFICE="taxOffice",t.TAX_NUMBER="taxNumber"}(a||(a={}));export{a as AddressFormItem,u as IkasAddressFormInputType,l as default};
@@ -1,6 +1,8 @@
1
1
  import { IkasCart } from "../cart";
2
2
  import { IkasCheckout as ICheckout } from "@ikas/storefront-models";
3
3
  import { IkasPaymentGateway } from "../payment-gateway";
4
+ import IkasLocalizeOrderAddress from "../order/address/ikas-localize-order-address";
5
+ import CountrySettingsModel from "./country-settings-model";
4
6
  declare type IkasCheckoutConstructorData = {
5
7
  appliedCouponCode?: string | null;
6
8
  selectedPaymentGateway?: IkasPaymentGateway | null;
@@ -10,7 +12,9 @@ export declare class IkasCheckout extends IkasCart implements ICheckout {
10
12
  appliedCouponCode?: string | null;
11
13
  selectedPaymentGateway?: IkasPaymentGateway | null;
12
14
  masterPassPaymentGateway?: IkasPaymentGateway | null;
13
- constructor(data: Partial<IkasCheckoutConstructorData>);
15
+ billingAddress: IkasLocalizeOrderAddress | null;
16
+ shippingAddress: IkasLocalizeOrderAddress | null;
17
+ constructor(data: Partial<IkasCheckoutConstructorData>, countrySettings?: CountrySettingsModel);
14
18
  get isComplete(): boolean;
15
19
  get $totalFinalPrice(): number;
16
20
  get $totalFinalPriceTaxModifier(): number;
@@ -1 +1 @@
1
- import{__extends as e}from'./../../../ext/tslib/tslib.es6.js';import{IkasCart as t}from"../cart/index.js";import{IkasCheckoutFunctions as a,IkasOrderFunctions as r}from"@ikas/storefront-model-functions";import{formatCurrency as o}from"../../../utils/currency.js";import{makeObservable as i,observable as n,computed as l}from"mobx";import{formatDate as c}from"../../../utils/helper.js";var s=function(t){function s(e){var a=t.call(this,e)||this;return a.appliedCouponCode=null,a.selectedPaymentGateway=null,a.masterPassPaymentGateway=null,a.appliedCouponCode=e.couponCode,a.selectedPaymentGateway=e.selectedPaymentGateway,a.masterPassPaymentGateway=e.masterPassPaymentGateway,i(a,{appliedCouponCode:n,selectedPaymentGateway:n,masterPassPaymentGateway:n,isComplete:l,$totalFinalPrice:l,$totalFinalPriceTaxModifier:l,$totalTax:l,$formattedTotalTax:l,$formattedTotalFinalPrice:l}),a}return e(s,t),Object.defineProperty(s.prototype,"isComplete",{get:function(){return a.isComplete(this)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"$totalFinalPrice",{get:function(){return this.selectedPaymentGateway?a.getTotalFinalPrice(this,this.selectedPaymentGateway):this.totalFinalPrice},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"$totalFinalPriceTaxModifier",{get:function(){return this.$totalFinalPrice/this.totalFinalPrice},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"$totalTax",{get:function(){return r.getTotalTax(this)*this.$totalFinalPriceTaxModifier},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"$formattedTotalTax",{get:function(){return o(this.$totalTax,this.currencyCode,this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"$formattedTotalFinalPrice",{get:function(){return o(this.$totalFinalPrice,this.currencyCode,this.currencySymbol)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"dateStr",{get:function(){var e=new Date;return e.setTime(this.updatedAt),c(e)},enumerable:!1,configurable:!0}),s}(t);export{s as IkasCheckout};
1
+ import{__extends as e,__assign as t}from'./../../../ext/tslib/tslib.es6.js';import{IkasCart as r}from"../cart/index.js";import{IkasCheckoutFunctions as i,IkasOrderFunctions as a}from"@ikas/storefront-model-functions";import{formatCurrency as n}from"../../../utils/currency.js";import{makeObservable as o,observable as l,computed as s}from"mobx";import{formatDate as d}from"../../../utils/helper.js";import c from"../order/address/ikas-localize-order-address.js";var u=function(r){function u(e,i){var a=r.call(this,e,!0)||this;return a.appliedCouponCode=null,a.selectedPaymentGateway=null,a.masterPassPaymentGateway=null,a.billingAddress=null,a.shippingAddress=null,a.appliedCouponCode=e.couponCode,a.selectedPaymentGateway=e.selectedPaymentGateway,a.masterPassPaymentGateway=e.masterPassPaymentGateway,a.billingAddress=e.billingAddress?new c(t({countrySettings:i},e.billingAddress)):null,a.shippingAddress=e.shippingAddress?new c(t({countrySettings:i},e.shippingAddress)):null,o(a,{appliedCouponCode:l,selectedPaymentGateway:l,masterPassPaymentGateway:l,billingAddress:l,shippingAddress:l,isComplete:s,$totalFinalPrice:s,$totalFinalPriceTaxModifier:s,$totalTax:s,$formattedTotalTax:s,$formattedTotalFinalPrice:s}),a}return e(u,r),Object.defineProperty(u.prototype,"isComplete",{get:function(){return i.isComplete(this)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"$totalFinalPrice",{get:function(){return this.selectedPaymentGateway?i.getTotalFinalPrice(this,this.selectedPaymentGateway):this.totalFinalPrice},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"$totalFinalPriceTaxModifier",{get:function(){return this.$totalFinalPrice/this.totalFinalPrice},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"$totalTax",{get:function(){return a.getTotalTax(this)*this.$totalFinalPriceTaxModifier},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"$formattedTotalTax",{get:function(){return n(this.$totalTax,this.currencyCode,this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"$formattedTotalFinalPrice",{get:function(){return n(this.$totalFinalPrice,this.currencyCode,this.currencySymbol)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"dateStr",{get:function(){var e=new Date;return e.setTime(this.updatedAt),d(e)},enumerable:!1,configurable:!0}),u}(r);export{u as IkasCheckout};
@@ -4,7 +4,7 @@ import { IkasCheckoutOption } from "./option";
4
4
  import { IkasCheckoutSettingsPrice } from "./price";
5
5
  export declare class IkasCheckoutSettings extends IkasBaseModel implements ICheckoutSettings {
6
6
  giftPackagePriceList: IkasCheckoutSettingsPrice[] | null;
7
- identityNumberRequirement: IkasCheckoutRequirement;
7
+ identityNumberRequirement: IkasCheckoutRequirement | null;
8
8
  isAccountRequired: boolean;
9
9
  isGiftPackageEnabled: boolean | null;
10
10
  isQuickRegistrationEnabled: boolean | null;
@@ -1 +1 @@
1
- import{__extends as e}from'./../../../ext/tslib/tslib.es6.js';export{IkasCheckoutRequirement}from"@ikas/storefront-models";import{IkasBaseModel as i}from"../base/index.js";import{IkasCheckoutOption as o}from"./option/index.js";import{IkasCheckoutSettingsPrice as t}from"./price/index.js";var n=function(i){function n(e){var n,s,r=this;return(r=i.call(this,e)||this).giftPackagePriceList=null,r.isGiftPackageEnabled=null,r.isShowPostalCode=null,r.isTermsAndConditionsDefaultChecked=null,r.options=null,r.postalCodeRequirement=null,r.showCheckoutNote=null,r.giftPackagePriceList=(null===(n=e.giftPackagePriceList)||void 0===n?void 0:n.map((function(e){return new t(e)})))||null,r.identityNumberRequirement=e.identityNumberRequirement,r.isAccountRequired=e.isAccountRequired,r.isGiftPackageEnabled=e.isGiftPackageEnabled,r.isQuickRegistrationEnabled=e.isQuickRegistrationEnabled,r.isShowPostalCode=e.isShowPostalCode,r.isTermsAndConditionsDefaultChecked=e.isTermsAndConditionsDefaultChecked,r.options=(null===(s=e.options)||void 0===s?void 0:s.map((function(e){return new o(e)})))||null,r.phoneRequirement=e.phoneRequirement,r.postalCodeRequirement=e.postalCodeRequirement||null,r.showCheckoutNote=e.showCheckoutNote||null,r.showTermsAndConditionsCheckbox=e.showTermsAndConditionsCheckbox,r.storefrontId=e.storefrontId,r}return e(n,i),n}(i);export{n as IkasCheckoutSettings};
1
+ import{__extends as e}from'./../../../ext/tslib/tslib.es6.js';export{IkasCheckoutRequirement}from"@ikas/storefront-models";import{IkasBaseModel as i}from"../base/index.js";import{IkasCheckoutOption as o}from"./option/index.js";import{IkasCheckoutSettingsPrice as t}from"./price/index.js";var n=function(i){function n(e){var n,s,r=this;return(r=i.call(this,e)||this).giftPackagePriceList=null,r.identityNumberRequirement=null,r.isGiftPackageEnabled=null,r.isShowPostalCode=null,r.isTermsAndConditionsDefaultChecked=null,r.options=null,r.postalCodeRequirement=null,r.showCheckoutNote=null,r.giftPackagePriceList=(null===(n=e.giftPackagePriceList)||void 0===n?void 0:n.map((function(e){return new t(e)})))||null,r.identityNumberRequirement=e.identityNumberRequirement,r.isAccountRequired=e.isAccountRequired,r.isGiftPackageEnabled=e.isGiftPackageEnabled,r.isQuickRegistrationEnabled=e.isQuickRegistrationEnabled,r.isShowPostalCode=e.isShowPostalCode,r.isTermsAndConditionsDefaultChecked=e.isTermsAndConditionsDefaultChecked,r.options=(null===(s=e.options)||void 0===s?void 0:s.map((function(e){return new o(e)})))||null,r.phoneRequirement=e.phoneRequirement,r.postalCodeRequirement=e.postalCodeRequirement||null,r.showCheckoutNote=e.showCheckoutNote||null,r.showTermsAndConditionsCheckbox=e.showTermsAndConditionsCheckbox,r.storefrontId=e.storefrontId,r}return e(n,i),n}(i);export{n as IkasCheckoutSettings};
@@ -0,0 +1,65 @@
1
+ import { IkasCustomerAddress } from ".";
2
+ import { IkasCustomerAddress as ICustomerAddress } from "@ikas/storefront-models";
3
+ import CountrySettingsModel, { AddressFormField, ErrorType } from "../../checkout/country-settings-model";
4
+ declare type IkasLocalizeCustomerAddressConstructorData = {
5
+ countrySettings?: CountrySettingsModel | null;
6
+ } & ICustomerAddress;
7
+ export declare class IkasLocalizeCustomerAddress extends IkasCustomerAddress {
8
+ countrySettings: CountrySettingsModel | null;
9
+ constructor(data?: Partial<IkasLocalizeCustomerAddressConstructorData>);
10
+ get fieldSettings(): {
11
+ firstName: AddressFormField;
12
+ lastName: AddressFormField;
13
+ identityNumber: AddressFormField;
14
+ phone: AddressFormField;
15
+ addressLine1: AddressFormField;
16
+ addressLine2: AddressFormField;
17
+ postalCode: AddressFormField;
18
+ country: AddressFormField;
19
+ state: AddressFormField;
20
+ city: AddressFormField;
21
+ district: AddressFormField;
22
+ company?: AddressFormField | undefined;
23
+ taxOffice?: AddressFormField | undefined;
24
+ taxNumber?: AddressFormField | undefined;
25
+ title: AddressFormField;
26
+ } | undefined;
27
+ get addressFormat(): import("../../checkout/country-settings-model").AddressFormItem[][] | undefined;
28
+ get addressFormatIgnoreCountry(): import("../../checkout/country-settings-model").AddressFormItem[][] | undefined;
29
+ get billingFormat(): import("../../checkout/country-settings-model").AddressFormItem[][] | undefined;
30
+ get countryCode(): string;
31
+ get validationResults(): {
32
+ firstName: ErrorType;
33
+ lastName: ErrorType;
34
+ addressLine1: ErrorType;
35
+ addressLine2: ErrorType;
36
+ country: ErrorType;
37
+ state: ErrorType;
38
+ city: ErrorType;
39
+ district: ErrorType;
40
+ phone: ErrorType;
41
+ postalCode: ErrorType;
42
+ identityNumber: ErrorType;
43
+ title: ErrorType;
44
+ } | undefined;
45
+ get isValidAddress(): boolean | undefined;
46
+ get fieldLabels(): {
47
+ firstName?: string | undefined;
48
+ lastName?: string | undefined;
49
+ identityNumber?: string | undefined;
50
+ addressLine1?: string | undefined;
51
+ addressLine2?: string | undefined;
52
+ postalCode?: string | undefined;
53
+ country?: string | undefined;
54
+ state?: string | undefined;
55
+ city?: string | undefined;
56
+ district?: string | undefined;
57
+ phone?: string | undefined;
58
+ company?: string | undefined;
59
+ taxOffice?: string | undefined;
60
+ taxNumber?: string | undefined;
61
+ } | undefined;
62
+ get isFreeTextCity(): boolean | undefined;
63
+ get isFreeTextDistrict(): boolean | undefined;
64
+ }
65
+ export {};
@@ -0,0 +1 @@
1
+ import{__extends as t,__assign as e}from'./../../../../ext/tslib/tslib.es6.js';import{makeObservable as i,observable as r}from"mobx";import{IkasCustomerAddress as n}from"./index.js";var o=function(n){function o(t){void 0===t&&(t={});var e=n.call(this,t)||this;return e.countrySettings=t.countrySettings||null,i(e,{countrySettings:r}),e}return t(o,n),Object.defineProperty(o.prototype,"fieldSettings",{get:function(){if(this.countrySettings){var t=this.countrySettings.getFieldSettings(this.countryCode);if(t)return e({title:{required:!0}},t)}},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"addressFormat",{get:function(){if(this.countrySettings)return this.countrySettings.getAddressFormat(this.countryCode)},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"addressFormatIgnoreCountry",{get:function(){if(this.countrySettings)return this.countrySettings.getAddressFormatIgnoreCountry(this.countryCode)},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"billingFormat",{get:function(){if(this.countrySettings)return this.countrySettings.getBillingFormat(this.countryCode)},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"countryCode",{get:function(){var t;return(null===(t=this.country)||void 0===t?void 0:t.iso2)||"TR"},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"validationResults",{get:function(){if(this.countrySettings){var t=this.countrySettings.getValidationResult(this);if(t)return e({title:{hasError:!this.title,isInvalid:!1,isEmpty:!this.title}},t)}},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"isValidAddress",{get:function(){if(this.countrySettings)return!!this.title&&this.countrySettings.isValidAddress(this)},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"fieldLabels",{get:function(){if(this.countrySettings)return this.countrySettings.getFieldLabels(this.countryCode)},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"isFreeTextCity",{get:function(){if(this.countrySettings)return this.countrySettings.isFreeTextCity(this.countryCode)},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"isFreeTextDistrict",{get:function(){if(this.countrySettings)return this.countrySettings.isFreeTextDistrict(this.countryCode)},enumerable:!1,configurable:!0}),o}(n);export{o as IkasLocalizeCustomerAddress};
@@ -2,6 +2,7 @@ import { IkasImage as IImage } from "@ikas/storefront-models";
2
2
  export declare class IkasImage implements IImage {
3
3
  id: string;
4
4
  isVideo: boolean;
5
+ altText: string | null;
5
6
  constructor(data: IImage);
6
7
  get src(): string;
7
8
  get thumbnailSrc(): string;
@@ -1 +1 @@
1
- import{IkasImageFunctions as t}from"@ikas/storefront-model-functions";import{makeObservable as e,observable as r,computed as i}from"mobx";var n=function(){function n(n){var o=this;this.getSrc=function(e){return t.getSrc(o,e)},this.id=n.id,this.isVideo=n.isVideo,e(this,{id:r,isVideo:r,src:i,thumbnailSrc:i})}return Object.defineProperty(n.prototype,"src",{get:function(){return t.getDefaultSrc(this)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"thumbnailSrc",{get:function(){return t.getThumbnailSrc(this)},enumerable:!1,configurable:!0}),n}();export{n as IkasImage};
1
+ import{IkasImageFunctions as t}from"@ikas/storefront-model-functions";import{makeObservable as e,observable as r,computed as i}from"mobx";var n=function(){function n(n){var o=this;this.getSrc=function(e){return t.getSrc(o,e)},this.id=n.id,this.isVideo=n.isVideo,this.altText=n.altText,e(this,{id:r,isVideo:r,altText:r,src:i,thumbnailSrc:i})}return Object.defineProperty(n.prototype,"src",{get:function(){return t.getDefaultSrc(this)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"thumbnailSrc",{get:function(){return t.getThumbnailSrc(this)},enumerable:!1,configurable:!0}),n}();export{n as IkasImage};
@@ -16,6 +16,7 @@ export * from "./category/path-item";
16
16
  export * from "./category/translations";
17
17
  export * from "./category";
18
18
  export * from "./checkout";
19
+ export * from "./checkout/country-settings-model";
19
20
  export * from "./checkout-settings/option";
20
21
  export * from "./checkout-settings/price";
21
22
  export * from "./checkout-settings";
@@ -27,6 +28,7 @@ export * from "./customer/address/country";
27
28
  export * from "./customer/address/district";
28
29
  export * from "./customer/address/state";
29
30
  export * from "./customer/address";
31
+ export * from "./customer/address/ikas-localize-customer-address";
30
32
  export * from "./customer/attribute/option";
31
33
  export * from "./customer/attribute/sales-channel";
32
34
  export * from "./customer/attribute/translation/option";
@@ -99,6 +101,7 @@ export * from "./product/campaign";
99
101
  export * from "./product/image";
100
102
  export * from "./product/option-set/option";
101
103
  export * from "./product/option-set";
104
+ export * from "./product/stock-location";
102
105
  export * from "./product/tag";
103
106
  export * from "./product/variant/price";
104
107
  export * from "./product/variant";
@@ -0,0 +1,47 @@
1
+ import { IkasOrderAddress } from ".";
2
+ import { IkasOrderAddress as IOrderAddress } from "@ikas/storefront-models";
3
+ import CountrySettingsModel from "../../checkout/country-settings-model";
4
+ declare type IkasLocalizeOrderAddressConstructorData = {
5
+ countrySettings?: CountrySettingsModel | null;
6
+ } & IOrderAddress;
7
+ export default class IkasLocalizeOrderAddress extends IkasOrderAddress {
8
+ countrySettings: CountrySettingsModel | null;
9
+ constructor(data?: Partial<IkasLocalizeOrderAddressConstructorData>);
10
+ get addressFormat(): import("../../checkout/country-settings-model").AddressFormItem[][] | undefined;
11
+ get addressFormatIgnoreCountry(): import("../../checkout/country-settings-model").AddressFormItem[][] | undefined;
12
+ get billingFormat(): import("../../checkout/country-settings-model").AddressFormItem[][] | undefined;
13
+ get countryCode(): string;
14
+ get validationResults(): {
15
+ firstName: import("../../checkout/country-settings-model").ErrorType;
16
+ lastName: import("../../checkout/country-settings-model").ErrorType;
17
+ addressLine1: import("../../checkout/country-settings-model").ErrorType;
18
+ addressLine2: import("../../checkout/country-settings-model").ErrorType;
19
+ country: import("../../checkout/country-settings-model").ErrorType;
20
+ state: import("../../checkout/country-settings-model").ErrorType;
21
+ city: import("../../checkout/country-settings-model").ErrorType;
22
+ district: import("../../checkout/country-settings-model").ErrorType;
23
+ phone: import("../../checkout/country-settings-model").ErrorType;
24
+ postalCode: import("../../checkout/country-settings-model").ErrorType;
25
+ identityNumber: import("../../checkout/country-settings-model").ErrorType;
26
+ } | undefined;
27
+ get isValidAddress(): boolean | undefined;
28
+ get fieldLabels(): {
29
+ firstName?: string | undefined;
30
+ lastName?: string | undefined;
31
+ identityNumber?: string | undefined;
32
+ addressLine1?: string | undefined;
33
+ addressLine2?: string | undefined;
34
+ postalCode?: string | undefined;
35
+ country?: string | undefined;
36
+ state?: string | undefined;
37
+ city?: string | undefined;
38
+ district?: string | undefined;
39
+ phone?: string | undefined;
40
+ company?: string | undefined;
41
+ taxOffice?: string | undefined;
42
+ taxNumber?: string | undefined;
43
+ } | undefined;
44
+ get isFreeTextCity(): boolean | undefined;
45
+ get isFreeTextDistrict(): boolean | undefined;
46
+ }
47
+ export {};
@@ -0,0 +1 @@
1
+ import{__extends as t}from'./../../../../ext/tslib/tslib.es6.js';import{makeObservable as e,observable as r}from"mobx";import{IkasOrderAddress as n}from"./index.js";var i=function(n){function i(t){void 0===t&&(t={});var i=n.call(this,t)||this;return i.countrySettings=t.countrySettings||null,e(i,{countrySettings:r}),i}return t(i,n),Object.defineProperty(i.prototype,"addressFormat",{get:function(){if(this.countrySettings)return this.countrySettings.getAddressFormat(this.countryCode)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"addressFormatIgnoreCountry",{get:function(){if(this.countrySettings)return this.countrySettings.getAddressFormatIgnoreCountry(this.countryCode)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"billingFormat",{get:function(){if(this.countrySettings)return this.countrySettings.getBillingFormat(this.countryCode)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"countryCode",{get:function(){var t;return(null===(t=this.country)||void 0===t?void 0:t.iso2)||"TR"},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"validationResults",{get:function(){if(this.countrySettings)return this.countrySettings.getValidationResult(this)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"isValidAddress",{get:function(){if(this.countrySettings)return this.countrySettings.isValidAddress(this)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"fieldLabels",{get:function(){if(this.countrySettings)return this.countrySettings.getFieldLabels(this.countryCode)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"isFreeTextCity",{get:function(){if(this.countrySettings)return this.countrySettings.isFreeTextCity(this.countryCode)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"isFreeTextDistrict",{get:function(){if(this.countrySettings)return this.countrySettings.isFreeTextDistrict(this.countryCode)},enumerable:!1,configurable:!0}),i}(n);export{i as default};
@@ -1 +1 @@
1
- import{__assign as t}from'./../../../../ext/tslib/tslib.es6.js';import{IkasOrderAddressFunctions as i}from"@ikas/storefront-model-functions";import{makeAutoObservable as e}from"mobx";import{IkasCheckoutSettings as s}from"../../checkout-settings/index.js";var n=function(){function n(t){void 0===t&&(t={}),this.addressLine2=null,this.company=null,this.id=null,this.identityNumber=null,this.phone=null,this.postalCode=null,this.taxNumber=null,this.taxOffice=null,this.country=null,this.state=null,this.city=null,this.district=null,this.checkoutSettings=null,this.addressLine1=t.addressLine1||"",this.addressLine2=t.addressLine2||null,this.company=t.company||null,this.firstName=t.firstName||"",this.id=t.id||null,this.identityNumber=t.identityNumber||null,this.isDefault=t.isDefault||!1,this.lastName=t.lastName||"",this.phone=t.phone||null,this.postalCode=t.postalCode||null,this.taxNumber=t.taxNumber||null,this.taxOffice=t.taxOffice||null,this.country=t.country||null,this.state=t.state||null,this.city=t.city||null,this.district=t.district||null,this.checkoutSettings=t.checkoutSettings?new s(t.checkoutSettings):null,this.isDistrictRequired=t.isDistrictRequired||!1,e(this)}return Object.defineProperty(n.prototype,"addressText",{get:function(){return i.getAddressText(this)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"validationResult",{get:function(){if(this.checkoutSettings)return i.getValidationResult(this,this.checkoutSettings,this.isDistrictRequired||!1)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isValid",{get:function(){return!!this.checkoutSettings&&i.isValidAddress(this,this.checkoutSettings,this.isDistrictRequired||!1)},enumerable:!1,configurable:!0}),n.prototype.toJSON=function(){var i=t({},this);return delete i.checkoutSettings,delete i.isDistrictRequired,i},n}();export{n as IkasOrderAddress};
1
+ import{__assign as t}from'./../../../../ext/tslib/tslib.es6.js';import{IkasOrderAddressFunctions as i}from"@ikas/storefront-model-functions";import{makeObservable as e,observable as s,computed as n}from"mobx";import{IkasCheckoutSettings as l}from"../../checkout-settings/index.js";var r=function(){function r(t){void 0===t&&(t={}),this.addressLine2=null,this.company=null,this.id=null,this.identityNumber=null,this.phone=null,this.postalCode=null,this.taxNumber=null,this.taxOffice=null,this.country=null,this.state=null,this.city=null,this.district=null,this.checkoutSettings=null,this.addressLine1=t.addressLine1||"",this.addressLine2=t.addressLine2||null,this.company=t.company||null,this.firstName=t.firstName||"",this.id=t.id||null,this.identityNumber=t.identityNumber||null,this.isDefault=t.isDefault||!1,this.lastName=t.lastName||"",this.phone=t.phone||null,this.postalCode=t.postalCode||null,this.taxNumber=t.taxNumber||null,this.taxOffice=t.taxOffice||null,this.country=t.country||null,this.state=t.state||null,this.city=t.city||null,this.district=t.district||null,this.checkoutSettings=t.checkoutSettings?new l(t.checkoutSettings):null,this.isDistrictRequired=t.isDistrictRequired||!1,e(this,{addressLine1:s,addressLine2:s,company:s,firstName:s,id:s,identityNumber:s,isDefault:s,lastName:s,phone:s,postalCode:s,taxNumber:s,taxOffice:s,country:s,state:s,city:s,district:s,addressText:n,validationResult:n,isValid:n})}return Object.defineProperty(r.prototype,"addressText",{get:function(){return i.getAddressText(this)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"validationResult",{get:function(){if(this.checkoutSettings)return i.getValidationResult(this,this.checkoutSettings,this.isDistrictRequired||!1)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isValid",{get:function(){return!!this.checkoutSettings&&i.isValidAddress(this,this.checkoutSettings,this.isDistrictRequired||!1)},enumerable:!1,configurable:!0}),r.prototype.toJSON=function(){var i=t({},this);return delete i.checkoutSettings,delete i.isDistrictRequired,i},r}();export{r as IkasOrderAddress};
@@ -44,7 +44,7 @@ export declare class IkasOrder extends IkasBaseModel implements IOrder {
44
44
  totalFinalPrice: number;
45
45
  totalPrice: number;
46
46
  refundSettings?: IkasOrderRefundSettings | null;
47
- constructor(data: Partial<IOrderConstructorData>);
47
+ constructor(data: Partial<IOrderConstructorData>, removeObservableAddresses?: boolean);
48
48
  get items(): IkasOrderLineItem[];
49
49
  get itemCount(): number;
50
50
  get itemQuantity(): number;
@@ -1 +1 @@
1
- import{__extends as e}from'./../../../ext/tslib/tslib.es6.js';import{IkasOrderAddress as t}from"./address/index.js";import{IkasOrderShippingLine as n}from"./shipping-line/index.js";import{IkasOrderLineItem as r}from"./line-item/index.js";import{IkasOrderCustomer as o}from"./customer/index.js";import{IkasOrderGiftPackageLine as i}from"./gift-line/index.js";import{IkasInvoice as u}from"./invoice/index.js";import{IkasOrderPaymentMethod as l}from"./payment-method/index.js";import{IkasOrderAdjustment as a}from"./adjustment/index.js";import{IkasOrderPackage as s}from"./package/index.js";import{IkasOrderTaxLine as d}from"./tax-line/index.js";import{IkasBaseModel as c}from"../base/index.js";import{IkasOrderShippingMethod as m,IkasOrderStatus as f}from"@ikas/storefront-models";export{IkasOrderCancelReason,IkasOrderPackageStatus,IkasOrderPaymentStatus,IkasOrderShippingMethod,IkasOrderStatus}from"@ikas/storefront-models";import{makeObservable as p,observable as g,computed as b}from"mobx";import{IkasOrderFunctions as y}from"@ikas/storefront-model-functions";import{formatCurrency as h}from"../../../utils/currency.js";var P=function(c){function P(e){var y,h,P,j,k,A,S,v,x,I,O=this;return(O=c.call(this,e)||this).billingAddress=null,O.cancelReason=null,O.cancelledAt=null,O.currencySymbol=null,O.customer=null,O.customerId=null,O.giftPackageLines=null,O.giftPackageNote=null,O.invoices=null,O.isGiftPackage=null,O.note=null,O.orderAdjustments=null,O.orderNumber=null,O.orderPackageStatus=null,O.orderPackages=null,O.orderPaymentStatus=null,O.orderedAt=null,O.paymentMethods=null,O.shippingAddress=null,O.shippingLines=null,O.taxLines=null,O.billingAddress=e.billingAddress?new t(e.billingAddress):null,O.cancelReason=e.cancelReason||null,O.cancelledAt=e.cancelledAt||null,O.currencyCode=e.currencyCode||"",O.currencySymbol=e.currencySymbol||null,O.customer=e.customer?new o(e.customer):null,O.customerId=e.customerId||null,O.giftPackageLines=(null===(y=e.giftPackageLines)||void 0===y?void 0:y.map((function(e){return new i(e)})))||null,O.giftPackageNote=e.giftPackageNote||null,O.invoices=(null===(h=e.invoices)||void 0===h?void 0:h.map((function(e){return new u(e)})))||null,O.isGiftPackage=e.isGiftPackage||null,O.note=e.note||null,O.orderAdjustments=(null===(P=e.orderAdjustments)||void 0===P?void 0:P.map((function(e){return new a(e)})))||null,O.orderLineItems=(null===(j=e.orderLineItems)||void 0===j?void 0:j.map((function(e){return new r(e)})).filter((function(e){return!e.deleted})))||[],O.orderNumber=e.orderNumber||null,O.orderPackageStatus=e.orderPackageStatus||null,O.orderPackages=(null===(k=e.orderPackages)||void 0===k?void 0:k.map((function(e){return new s(e)})))||null,O.orderPaymentStatus=e.orderPaymentStatus||null,O.orderedAt=e.orderedAt||null,O.paymentMethods=(null===(A=e.paymentMethods)||void 0===A?void 0:A.map((function(e){return new l(e)})))||null,O.shippingAddress=e.shippingAddress?new t(e.shippingAddress):null,O.shippingLines=(null===(S=e.shippingLines)||void 0===S?void 0:S.map((function(e){return new n(e)})))||null,O.shippingMethod=e.shippingMethod||m.SHIPMENT,O.status=e.status||f.CREATED,O.taxLines=(null===(v=e.taxLines)||void 0===v?void 0:v.map((function(e){return new d(e)})))||null,O.totalFinalPrice=null!==(x=e.totalFinalPrice)&&void 0!==x?x:0,O.totalPrice=null!==(I=e.totalPrice)&&void 0!==I?I:0,O.refundSettings=e.refundSettings,p(O,{billingAddress:g,cancelReason:g,cancelledAt:g,currencyCode:g,currencySymbol:g,customer:g,customerId:g,giftPackageLines:g,giftPackageNote:g,invoices:g,isGiftPackage:g,note:g,orderAdjustments:g,orderLineItems:g,orderNumber:g,orderPackageStatus:g,orderPackages:g,orderPaymentStatus:g,orderedAt:g,paymentMethods:g,shippingAddress:g,shippingLines:g,shippingMethod:g,status:g,taxLines:g,totalFinalPrice:g,totalPrice:g,refundSettings:g,items:b,itemCount:b,refundableItems:b,unfullfilledItems:b,refundedItems:b,totalTax:b,formattedTotalTax:b,shippingTotal:b,formattedShippingTotal:b,formattedTotalFinalPrice:b,formattedTotalPrice:b,hasCustomer:b,hasValidCustomerEmail:b,customerFullName:b,formattedDate:b,couponAdjustment:b,nonCouponAdjustments:b}),O}return e(P,c),Object.defineProperty(P.prototype,"items",{get:function(){return this.orderLineItems},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"itemCount",{get:function(){var e;return(null===(e=this.items)||void 0===e?void 0:e.length)||0},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"itemQuantity",{get:function(){return this.items.reduce((function(e,t){return e+t.quantity}),0)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"refundableItems",{get:function(){return this.refundSettings?y.getRefundableItems(this,this.refundSettings):[]},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"unfullfilledItems",{get:function(){return y.getUnfullfilledItems(this)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"refundedItems",{get:function(){return y.getRefundedItems(this)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"totalTax",{get:function(){return y.getTotalTax(this)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"formattedTotalTax",{get:function(){return h(this.totalTax,this.currencyCode,this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"shippingTotal",{get:function(){return y.getShippingTotal(this)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"formattedShippingTotal",{get:function(){return h(this.shippingTotal,this.currencyCode,this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"formattedTotalFinalPrice",{get:function(){return h(this.totalFinalPrice,this.currencyCode,this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"formattedTotalPrice",{get:function(){return h(this.totalPrice,this.currencyCode,this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"hasCustomer",{get:function(){return y.hasCustomer(this)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"hasValidCustomerEmail",{get:function(){return y.hasValidCustomerEmail(this)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"customerFullName",{get:function(){return y.getCustomerFullName(this)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"formattedDate",{get:function(){return y.getFormattedDate(this)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"couponAdjustment",{get:function(){return y.getCouponAdjustment(this)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"nonCouponAdjustments",{get:function(){return y.getNonCouponAdjustments(this)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"isRefundEnabled",{get:function(){return!this.refundableItems.some((function(e){return null===e.refundQuantity}))},enumerable:!1,configurable:!0}),P}(c);export{P as IkasOrder};
1
+ import{__extends as e}from'./../../../ext/tslib/tslib.es6.js';import{IkasOrderAddress as t}from"./address/index.js";import{IkasOrderShippingLine as n}from"./shipping-line/index.js";import{IkasOrderLineItem as r}from"./line-item/index.js";import{IkasOrderCustomer as o}from"./customer/index.js";import{IkasOrderGiftPackageLine as i}from"./gift-line/index.js";import{IkasInvoice as u}from"./invoice/index.js";import{IkasOrderPaymentMethod as l}from"./payment-method/index.js";import{IkasOrderAdjustment as s}from"./adjustment/index.js";import{IkasOrderPackage as a}from"./package/index.js";import{IkasOrderTaxLine as d}from"./tax-line/index.js";import{IkasBaseModel as c}from"../base/index.js";import{IkasOrderShippingMethod as m,IkasOrderStatus as p}from"@ikas/storefront-models";export{IkasOrderCancelReason,IkasOrderPackageStatus,IkasOrderPaymentStatus,IkasOrderShippingMethod,IkasOrderStatus}from"@ikas/storefront-models";import{makeObservable as f,observable as g,computed as b}from"mobx";import{IkasOrderFunctions as y}from"@ikas/storefront-model-functions";import{formatCurrency as h}from"../../../utils/currency.js";var P=function(c){function P(e,y){var h,P,j,A,k,v,S,x,I,O,C=this;(C=c.call(this,e)||this).billingAddress=null,C.cancelReason=null,C.cancelledAt=null,C.currencySymbol=null,C.customer=null,C.customerId=null,C.giftPackageLines=null,C.giftPackageNote=null,C.invoices=null,C.isGiftPackage=null,C.note=null,C.orderAdjustments=null,C.orderNumber=null,C.orderPackageStatus=null,C.orderPackages=null,C.orderPaymentStatus=null,C.orderedAt=null,C.paymentMethods=null,C.shippingAddress=null,C.shippingLines=null,C.taxLines=null,C.billingAddress=e.billingAddress?new t(e.billingAddress):null,C.cancelReason=e.cancelReason||null,C.cancelledAt=e.cancelledAt||null,C.currencyCode=e.currencyCode||"",C.currencySymbol=e.currencySymbol||null,C.customer=e.customer?new o(e.customer):null,C.customerId=e.customerId||null,C.giftPackageLines=(null===(h=e.giftPackageLines)||void 0===h?void 0:h.map((function(e){return new i(e)})))||null,C.giftPackageNote=e.giftPackageNote||null,C.invoices=(null===(P=e.invoices)||void 0===P?void 0:P.map((function(e){return new u(e)})))||null,C.isGiftPackage=e.isGiftPackage||null,C.note=e.note||null,C.orderAdjustments=(null===(j=e.orderAdjustments)||void 0===j?void 0:j.map((function(e){return new s(e)})))||null,C.orderLineItems=(null===(A=e.orderLineItems)||void 0===A?void 0:A.map((function(e){return new r(e)})).filter((function(e){return!e.deleted})))||[],C.orderNumber=e.orderNumber||null,C.orderPackageStatus=e.orderPackageStatus||null,C.orderPackages=(null===(k=e.orderPackages)||void 0===k?void 0:k.map((function(e){return new a(e)})))||null,C.orderPaymentStatus=e.orderPaymentStatus||null,C.orderedAt=e.orderedAt||null,C.paymentMethods=(null===(v=e.paymentMethods)||void 0===v?void 0:v.map((function(e){return new l(e)})))||null,C.shippingAddress=e.shippingAddress?new t(e.shippingAddress):null,C.shippingLines=(null===(S=e.shippingLines)||void 0===S?void 0:S.map((function(e){return new n(e)})))||null,C.shippingMethod=e.shippingMethod||m.SHIPMENT,C.status=e.status||p.CREATED,C.taxLines=(null===(x=e.taxLines)||void 0===x?void 0:x.map((function(e){return new d(e)})))||null,C.totalFinalPrice=null!==(I=e.totalFinalPrice)&&void 0!==I?I:0,C.totalPrice=null!==(O=e.totalPrice)&&void 0!==O?O:0,C.refundSettings=e.refundSettings;var T={billingAddress:g,cancelReason:g,cancelledAt:g,currencyCode:g,currencySymbol:g,customer:g,customerId:g,giftPackageLines:g,giftPackageNote:g,invoices:g,isGiftPackage:g,note:g,orderAdjustments:g,orderLineItems:g,orderNumber:g,orderPackageStatus:g,orderPackages:g,orderPaymentStatus:g,orderedAt:g,paymentMethods:g,shippingAddress:g,shippingLines:g,shippingMethod:g,status:g,taxLines:g,totalFinalPrice:g,totalPrice:g,refundSettings:g,items:b,itemCount:b,refundableItems:b,unfullfilledItems:b,refundedItems:b,totalTax:b,formattedTotalTax:b,shippingTotal:b,formattedShippingTotal:b,formattedTotalFinalPrice:b,formattedTotalPrice:b,hasCustomer:b,hasValidCustomerEmail:b,customerFullName:b,formattedDate:b,couponAdjustment:b,nonCouponAdjustments:b};return y&&(delete T.billingAddress,delete T.shippingAddress),f(C,T),C}return e(P,c),Object.defineProperty(P.prototype,"items",{get:function(){return this.orderLineItems},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"itemCount",{get:function(){var e;return(null===(e=this.items)||void 0===e?void 0:e.length)||0},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"itemQuantity",{get:function(){return this.items.reduce((function(e,t){return e+t.quantity}),0)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"refundableItems",{get:function(){return this.refundSettings?y.getRefundableItems(this,this.refundSettings):[]},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"unfullfilledItems",{get:function(){return y.getUnfullfilledItems(this)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"refundedItems",{get:function(){return y.getRefundedItems(this)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"totalTax",{get:function(){return y.getTotalTax(this)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"formattedTotalTax",{get:function(){return h(this.totalTax,this.currencyCode,this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"shippingTotal",{get:function(){return y.getShippingTotal(this)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"formattedShippingTotal",{get:function(){return h(this.shippingTotal,this.currencyCode,this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"formattedTotalFinalPrice",{get:function(){return h(this.totalFinalPrice,this.currencyCode,this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"formattedTotalPrice",{get:function(){return h(this.totalPrice,this.currencyCode,this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"hasCustomer",{get:function(){return y.hasCustomer(this)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"hasValidCustomerEmail",{get:function(){return y.hasValidCustomerEmail(this)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"customerFullName",{get:function(){return y.getCustomerFullName(this)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"formattedDate",{get:function(){return y.getFormattedDate(this)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"couponAdjustment",{get:function(){return y.getCouponAdjustment(this)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"nonCouponAdjustments",{get:function(){return y.getNonCouponAdjustments(this)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"isRefundEnabled",{get:function(){return!this.refundableItems.some((function(e){return null===e.refundQuantity}))},enumerable:!1,configurable:!0}),P}(c);export{P as IkasOrder};
@@ -39,6 +39,7 @@ export declare class IkasOrderLineItem extends IkasBaseModel implements IOrderLi
39
39
  get formattedFinalPriceWithQuantity(): string;
40
40
  get tax(): number;
41
41
  get formattedTax(): string;
42
+ get hasDiscount(): boolean;
42
43
  get refundQuantity(): number | null | undefined;
43
44
  set refundQuantity(value: number | null | undefined);
44
45
  }