@ikas/storefront 2.0.40 → 2.0.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/_virtual/index.js_commonjs-proxy2.js +1 -1
- package/build/_virtual/index.js_commonjs-proxy4.js +1 -1
- package/build/components/checkout/model.js +1 -1
- package/build/components/checkout/steps/step-info/index.js +1 -1
- package/build/components/page/head.d.ts +1 -1
- package/build/components/page/head.js +1 -1
- package/build/ikas.js +1 -1
- package/build/index.js +1 -1
- package/build/models/data/checkout/index.d.ts +1 -1
- package/build/models/data/checkout/index.js +1 -1
- package/build/utils/helper.d.ts +1 -0
- package/build/utils/helper.js +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{Image}from"./components/image/index.js";export{IkasEditorComponentLoader}from"./components/page-editor/loader/index.js";export{IkasBlog,IkasBlogCategory,IkasBlogContent,IkasBlogMetaData,IkasBlogMetadataTargetType,IkasBlogTag,IkasBlogWriter}from"./models/data/blog/index.js";export{IkasBrand}from"./models/data/brand/index.js";export{IkasCategory,IkasCategoryPath,IkasFilterCategory}from"./models/data/category/index.js";export{IkasCheckout,IkasCheckoutCustomer,IkasCheckoutRecoveryEmailStatus,IkasCheckoutRecoveryStatus,IkasCheckoutStatus,IkasPaymentMethod,IkasShippingMethod,IkasShippingMethodEnum}from"./models/data/checkout/index.js";export{IkasCustomerAddress}from"./models/data/customer/address/index.js";export{IkasCustomer}from"./models/data/customer/index.js";export{IkasCustomerReview}from"./models/data/customer-review/index.js";export{IkasCustomerReviewSummary}from"./models/data/customer-review-summary/index.js";export{IkasHTMLMetaData,IkasHTMLMetaDataTargetType}from"./models/data/html-meta-data/index.js";export{IkasImage}from"./models/data/image/index.js";export{IkasCardAssociation,IkasCardType}from"./models/data/installment-info/index.js";export{IkasMerchantSettings}from"./models/data/merchant-settings/index.js";export{IkasAmountTypeEnum,IkasOrder,IkasOrderCancelledReason,IkasOrderPackageFulfillStatus,IkasOrderPackageStatus,IkasOrderPaymentStatus,IkasOrderShippingMethod,IkasOrderStatus,OrderLineItemStatusEnum}from"./models/data/order/index.js";export{IkasOrderLineItem}from"./models/data/order/line-item/index.js";export{IkasOrderRefundSettings}from"./models/data/order/refund/settings.js";export{IkasOrderLineOptions}from"./models/data/order/line-item/options/index.js";export{IkasOrderLineOptionsValue}from"./models/data/order/line-item/options/options-value/index.js";export{IkasProduct,IkasProductType}from"./models/data/product/index.js";export{IkasProductVariantType}from"./models/data/product/variant-type/index.js";export{IkasProductVariant}from"./models/data/product/variant/index.js";export{IkasProductPrice}from"./models/data/product/variant/price/index.js";export{IkasProductAttribute,IkasProductAttributeType}from"./models/data/product-attribute/index.js";export{IkasProductAttributeValue}from"./models/data/product/attribute-value/index.js";export{IkasApplicableProductFilterValue,IkasProductFilter,IkasProductFilterDisplayType,IkasProductFilterSettings,IkasProductFilterSortType,IkasProductFilterType,IkasProductFilterValue,IkasProductStockFilterValue,RangeValue,parseRangeStr}from"./models/data/product-filter/index.js";export{IkasFavoriteProduct}from"./models/data/favorite-product/index.js";export{IkasContactForm}from"./models/data/contact-form/index.js";export{IkasVariantSelectionType,IkasVariantType}from"./models/data/variant-type/index.js";export{IkasVariantValue}from"./models/data/variant-type/variant-value/index.js";export{IkasOrderTransaction,IkasTransactionStatusEnum,IkasTransactionTypeEnum}from"./models/data/order-transaction/index.js";export{IkasProductOption,IkasProductOptionDateSettings,IkasProductOptionFileSettings,IkasProductOptionSelectSettings,IkasProductOptionSelectType,IkasProductOptionSelectValue,IkasProductOptionSelectValueTranslations,IkasProductOptionSet,IkasProductOptionSetTranslations,IkasProductOptionTextSettings,IkasProductOptionTranslations,IkasProductOptionType}from"./models/data/product-option-set/index.js";export{IkasRaffle,IkasRaffleMetaData,IkasRaffleParticipant}from"./models/data/raffle/index.js";export{IkasSlider}from"./models/data/slider/index.js";export{IkasProductCampaign}from"./models/data/product-campaing/index.js";export{IkasCustomerAttribute}from"./models/data/customer-attribute/index.js";export{IkasCustomerAttributeValue}from"./models/data/customer/attribute-value/index.js";export{IkasCustomerAttributePermissionEnum,IkasCustomerAttributeRegisterPageRequirementEnum,IkasCustomerAttributeSalesChannel}from"./models/data/customer-attribute/customer-attribute-sales-channel/index.js";export{IkasCustomerAttributeOption}from"./models/data/customer-attribute/customer-attribute-option/index.js";export{IkasTheme}from"./models/theme/theme.js";export{IkasThemePage,IkasThemePageType}from"./models/theme/page/index.js";export{IkasThemePageComponent}from"./models/theme/page/component/index.js";export{IkasThemeComponent}from"./models/theme/component/index.js";export{IkasThemeComponentProp,IkasThemeComponentPropType}from"./models/theme/component/prop/index.js";export{IkasLinkPropValue,IkasLinkType}from"./models/theme/page/component/prop-value/link.js";export{IkasBrandPropValue}from"./models/theme/page/component/prop-value/brand.js";export{IkasBrandListPropValue}from"./models/theme/page/component/prop-value/brand-list.js";export{IkasProductListPropValue}from"./models/theme/page/component/prop-value/product-list.js";export{IkasProductDetailPropValue}from"./models/theme/page/component/prop-value/product-detail.js";export{IkasCategoryPropValue}from"./models/theme/page/component/prop-value/category.js";export{IkasCategoryListPropValue}from"./models/theme/page/component/prop-value/category-list.js";export{IkasThemeSettings}from"./models/theme/settings/index.js";export{IkasThemeCustomData}from"./models/theme/custom-data/index.js";export{IkasBlogPropValue}from"./models/theme/page/component/prop-value/blog.js";export{IkasBlogListPropValue}from"./models/theme/page/component/prop-value/blog-list.js";export{IkasBlogCategoryPropValue}from"./models/theme/page/component/prop-value/blog-category.js";export{IkasBlogCategoryListPropValue}from"./models/theme/page/component/prop-value/blog-category-list.js";export{IkasRafflePropValue}from"./models/theme/page/component/prop-value/raffle.js";export{IkasRaffleListPropValue}from"./models/theme/page/component/prop-value/raffle-list.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{IkasProductDetail}from"./models/ui/product-detail/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 o from"./pages/_slug_/index.js";export{o as SlugPage};import*as t from"./pages/pages/_slug_.js";export{t as CustomPage};import*as r from"./pages/checkout.js";export{r as CheckoutPage};import*as a from"./pages/account/index.js";export{a as AccountPage};import*as s from"./pages/account/addresses.js";export{s as AddressesPage};import*as m from"./pages/account/orders/index.js";export{m as OrdersPage};import*as i from"./pages/account/orders/_id_.js";export{i as OrderDetailPage};import*as d from"./pages/account/login.js";export{d as LoginPage};import*as p from"./pages/account/register.js";export{p as RegisterPage};import*as n from"./pages/account/forgot-password.js";export{n as ForgotPasswordPage};import*as l from"./pages/account/recover-password.js";export{l as RecoverPasswordPage};import*as u from"./pages/cart.js";export{u as CartPage};import*as x from"./pages/editor.js";export{x as EditorPage};import*as c from"./pages/account/favorite-products.js";export{c as FavoriteProductsPage};import*as f from"./pages/search.js";export{f as SearchPage};import*as g from"./pages/404.js";export{g as NotFoundPage};import*as k from"./pages/blog/index.js";export{k as BlogPage};import*as I from"./pages/blog/_slug_.js";export{I as BlogSlugPage};import*as j from"./pages/raffle/_slug_.js";export{j as RafflePage};import*as P from"./pages/raffle/index.js";export{P as RafflesPage};import*as y from"./pages/account/raffles.js";export{y as AccountRafflesPage};export{APIGenerator}from"./scripts/generators/api/index.js";export{ComponentImportsGenerator}from"./scripts/generators/components/index.js";export{ConfigGenerator}from"./scripts/generators/config/index.js";export{PageGenerator}from"./scripts/generators/pages/index.js";export{StoreGenerator}from"./scripts/generators/store/index.js";export{ThemeJsonGenerator}from"./scripts/generators/theme/index.js";export{CustomDataTypesGenerator,PropTypeGenarator}from"./scripts/generators/types/index.js";export{IkasBaseStore}from"./store/base.js";export{IkasStorefrontConfig}from"./storefront/index.js";export{decodeBase64,findAllByKey,findAllIndexes,formatDate,pascalCase,sortObject,stringSorter,stringToSlug,tryForEach,validatePhoneNumber}from"./utils/helper.js";export{formatMoney,getCurrencySymbol}from"./utils/currency.js";export{createTranslationInputData,useTranslation}from"./utils/i18n.js";export{Analytics}from"./analytics/analytics.js";export{AnalyticsBody,AnalyticsHead}from"./analytics/head/index.js";
|
|
1
|
+
export{Image}from"./components/image/index.js";export{IkasEditorComponentLoader}from"./components/page-editor/loader/index.js";export{IkasBlog,IkasBlogCategory,IkasBlogContent,IkasBlogMetaData,IkasBlogMetadataTargetType,IkasBlogTag,IkasBlogWriter}from"./models/data/blog/index.js";export{IkasBrand}from"./models/data/brand/index.js";export{IkasCategory,IkasCategoryPath,IkasFilterCategory}from"./models/data/category/index.js";export{IkasCheckout,IkasCheckoutCustomer,IkasCheckoutRecoveryEmailStatus,IkasCheckoutRecoveryStatus,IkasCheckoutStatus,IkasPaymentMethod,IkasShippingMethod,IkasShippingMethodEnum}from"./models/data/checkout/index.js";export{IkasCustomerAddress}from"./models/data/customer/address/index.js";export{IkasCustomer}from"./models/data/customer/index.js";export{IkasCustomerReview}from"./models/data/customer-review/index.js";export{IkasCustomerReviewSummary}from"./models/data/customer-review-summary/index.js";export{IkasHTMLMetaData,IkasHTMLMetaDataTargetType}from"./models/data/html-meta-data/index.js";export{IkasImage}from"./models/data/image/index.js";export{IkasCardAssociation,IkasCardType}from"./models/data/installment-info/index.js";export{IkasMerchantSettings}from"./models/data/merchant-settings/index.js";export{IkasAmountTypeEnum,IkasOrder,IkasOrderCancelledReason,IkasOrderPackageFulfillStatus,IkasOrderPackageStatus,IkasOrderPaymentStatus,IkasOrderShippingMethod,IkasOrderStatus,OrderLineItemStatusEnum}from"./models/data/order/index.js";export{IkasOrderLineItem}from"./models/data/order/line-item/index.js";export{IkasOrderRefundSettings}from"./models/data/order/refund/settings.js";export{IkasOrderLineOptions}from"./models/data/order/line-item/options/index.js";export{IkasOrderLineOptionsValue}from"./models/data/order/line-item/options/options-value/index.js";export{IkasProduct,IkasProductType}from"./models/data/product/index.js";export{IkasProductVariantType}from"./models/data/product/variant-type/index.js";export{IkasProductVariant}from"./models/data/product/variant/index.js";export{IkasProductPrice}from"./models/data/product/variant/price/index.js";export{IkasProductAttribute,IkasProductAttributeType}from"./models/data/product-attribute/index.js";export{IkasProductAttributeValue}from"./models/data/product/attribute-value/index.js";export{IkasApplicableProductFilterValue,IkasProductFilter,IkasProductFilterDisplayType,IkasProductFilterSettings,IkasProductFilterSortType,IkasProductFilterType,IkasProductFilterValue,IkasProductStockFilterValue,RangeValue,parseRangeStr}from"./models/data/product-filter/index.js";export{IkasFavoriteProduct}from"./models/data/favorite-product/index.js";export{IkasContactForm}from"./models/data/contact-form/index.js";export{IkasVariantSelectionType,IkasVariantType}from"./models/data/variant-type/index.js";export{IkasVariantValue}from"./models/data/variant-type/variant-value/index.js";export{IkasOrderTransaction,IkasTransactionStatusEnum,IkasTransactionTypeEnum}from"./models/data/order-transaction/index.js";export{IkasProductOption,IkasProductOptionDateSettings,IkasProductOptionFileSettings,IkasProductOptionSelectSettings,IkasProductOptionSelectType,IkasProductOptionSelectValue,IkasProductOptionSelectValueTranslations,IkasProductOptionSet,IkasProductOptionSetTranslations,IkasProductOptionTextSettings,IkasProductOptionTranslations,IkasProductOptionType}from"./models/data/product-option-set/index.js";export{IkasRaffle,IkasRaffleMetaData,IkasRaffleParticipant}from"./models/data/raffle/index.js";export{IkasSlider}from"./models/data/slider/index.js";export{IkasProductCampaign}from"./models/data/product-campaing/index.js";export{IkasCustomerAttribute}from"./models/data/customer-attribute/index.js";export{IkasCustomerAttributeValue}from"./models/data/customer/attribute-value/index.js";export{IkasCustomerAttributePermissionEnum,IkasCustomerAttributeRegisterPageRequirementEnum,IkasCustomerAttributeSalesChannel}from"./models/data/customer-attribute/customer-attribute-sales-channel/index.js";export{IkasCustomerAttributeOption}from"./models/data/customer-attribute/customer-attribute-option/index.js";export{IkasTheme}from"./models/theme/theme.js";export{IkasThemePage,IkasThemePageType}from"./models/theme/page/index.js";export{IkasThemePageComponent}from"./models/theme/page/component/index.js";export{IkasThemeComponent}from"./models/theme/component/index.js";export{IkasThemeComponentProp,IkasThemeComponentPropType}from"./models/theme/component/prop/index.js";export{IkasLinkPropValue,IkasLinkType}from"./models/theme/page/component/prop-value/link.js";export{IkasBrandPropValue}from"./models/theme/page/component/prop-value/brand.js";export{IkasBrandListPropValue}from"./models/theme/page/component/prop-value/brand-list.js";export{IkasProductListPropValue}from"./models/theme/page/component/prop-value/product-list.js";export{IkasProductDetailPropValue}from"./models/theme/page/component/prop-value/product-detail.js";export{IkasCategoryPropValue}from"./models/theme/page/component/prop-value/category.js";export{IkasCategoryListPropValue}from"./models/theme/page/component/prop-value/category-list.js";export{IkasThemeSettings}from"./models/theme/settings/index.js";export{IkasThemeCustomData}from"./models/theme/custom-data/index.js";export{IkasBlogPropValue}from"./models/theme/page/component/prop-value/blog.js";export{IkasBlogListPropValue}from"./models/theme/page/component/prop-value/blog-list.js";export{IkasBlogCategoryPropValue}from"./models/theme/page/component/prop-value/blog-category.js";export{IkasBlogCategoryListPropValue}from"./models/theme/page/component/prop-value/blog-category-list.js";export{IkasRafflePropValue}from"./models/theme/page/component/prop-value/raffle.js";export{IkasRaffleListPropValue}from"./models/theme/page/component/prop-value/raffle-list.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{IkasProductDetail}from"./models/ui/product-detail/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 o from"./pages/_slug_/index.js";export{o as SlugPage};import*as t from"./pages/pages/_slug_.js";export{t as CustomPage};import*as r from"./pages/checkout.js";export{r as CheckoutPage};import*as a from"./pages/account/index.js";export{a as AccountPage};import*as s from"./pages/account/addresses.js";export{s as AddressesPage};import*as m from"./pages/account/orders/index.js";export{m as OrdersPage};import*as i from"./pages/account/orders/_id_.js";export{i as OrderDetailPage};import*as d from"./pages/account/login.js";export{d as LoginPage};import*as p from"./pages/account/register.js";export{p as RegisterPage};import*as n from"./pages/account/forgot-password.js";export{n as ForgotPasswordPage};import*as l from"./pages/account/recover-password.js";export{l as RecoverPasswordPage};import*as u from"./pages/cart.js";export{u as CartPage};import*as x from"./pages/editor.js";export{x as EditorPage};import*as c from"./pages/account/favorite-products.js";export{c as FavoriteProductsPage};import*as f from"./pages/search.js";export{f as SearchPage};import*as g from"./pages/404.js";export{g as NotFoundPage};import*as k from"./pages/blog/index.js";export{k as BlogPage};import*as I from"./pages/blog/_slug_.js";export{I as BlogSlugPage};import*as j from"./pages/raffle/_slug_.js";export{j as RafflePage};import*as P from"./pages/raffle/index.js";export{P as RafflesPage};import*as y from"./pages/account/raffles.js";export{y as AccountRafflesPage};export{APIGenerator}from"./scripts/generators/api/index.js";export{ComponentImportsGenerator}from"./scripts/generators/components/index.js";export{ConfigGenerator}from"./scripts/generators/config/index.js";export{PageGenerator}from"./scripts/generators/pages/index.js";export{StoreGenerator}from"./scripts/generators/store/index.js";export{ThemeJsonGenerator}from"./scripts/generators/theme/index.js";export{CustomDataTypesGenerator,PropTypeGenarator}from"./scripts/generators/types/index.js";export{IkasBaseStore}from"./store/base.js";export{IkasStorefrontConfig}from"./storefront/index.js";export{decodeBase64,findAllByKey,findAllIndexes,formatDate,pascalCase,sortObject,stringSorter,stringToSlug,tryForEach,validateEmail,validatePhoneNumber}from"./utils/helper.js";export{formatMoney,getCurrencySymbol}from"./utils/currency.js";export{createTranslationInputData,useTranslation}from"./utils/i18n.js";export{Analytics}from"./analytics/analytics.js";export{AnalyticsBody,AnalyticsHead}from"./analytics/head/index.js";
|
|
@@ -38,7 +38,7 @@ export declare class IkasCheckout {
|
|
|
38
38
|
get totalTax(): number;
|
|
39
39
|
get shippingTotal(): number;
|
|
40
40
|
get hasCustomer(): boolean;
|
|
41
|
-
get
|
|
41
|
+
get hasValidCustomerEmail(): boolean;
|
|
42
42
|
get customerFullName(): string;
|
|
43
43
|
get customerEmail(): string;
|
|
44
44
|
get dateStr(): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeAutoObservable as t}from"mobx";import{IkasOrderAddress as e}from"../order/address/index.js";import{IkasCart as i}from"../cart/index.js";import{IkasPaymentMethodAdditionalPriceType as n}from"../payment-gateway/index.js";import{formatDate as
|
|
1
|
+
import{makeAutoObservable as t}from"mobx";import{IkasOrderAddress as e}from"../order/address/index.js";import{IkasCart as i}from"../cart/index.js";import{IkasPaymentMethodAdditionalPriceType as n}from"../payment-gateway/index.js";import{validateEmail as o,formatDate as r}from"../../../utils/helper.js";var s,l,a,u,d,c,h=function(){function a(n){void 0===n&&(n={}),this.id=null,this.createdAt=null,this.updatedAt=null,this.cartId=null,this.cart=null,this.orderId=null,this.orderNumber=null,this.merchantId=null,this.shippingSettingsId=null,this.shippingZoneRateId=null,this.customer=null,this.billingAddress=null,this.shippingAddress=null,this.shippingLines=null,this.shippingMethod=null,this.status=null,this.couponCode=null,this.recoverEmailStatus=null,this.recoveryStatus=null,this.totalFinalPrice=null,this.adjustments=null,this.note=null,this.giftPackageLines=null,this.giftPackageNote=null,this.appliedCouponCode=null,this.selectedPaymentGateway=null,this.id=n.id,this.createdAt=n.createdAt,this.updatedAt=n.updatedAt,this.cartId=n.cartId,this.cart=n.cart?new i(n.cart):void 0,this.orderId=n.orderId,this.orderNumber=n.orderNumber,this.merchantId=n.merchantId,this.shippingSettingsId=n.shippingSettingsId,this.shippingZoneRateId=n.shippingZoneRateId,this.availableShippingMethods=n.availableShippingMethods||[],this.customer=n.customer?new p(n.customer):null,this.billingAddress=n.billingAddress?new e(n.billingAddress):null,this.shippingAddress=n.shippingAddress?new e(n.shippingAddress):null,this.shippingLines=n.shippingLines||[],this.shippingMethod=n.shippingMethod||s.NO_SHIPMENT,this.status=n.status||l.OPEN,this.couponCode=n.couponCode,this.appliedCouponCode=n.couponCode,this.recoverEmailStatus=n.recoverEmailStatus,this.recoveryStatus=n.recoveryStatus,this.totalFinalPrice=n.totalFinalPrice,this.adjustments=n.adjustments,this.note=n.note||null,this.isGiftPackage=n.isGiftPackage||!1,this.giftPackageLines=n.giftPackageLines||null,this.giftPackageNote=n.giftPackageNote||null,this.selectedPaymentGateway=n.selectedPaymentGateway,t(this)}return Object.defineProperty(a.prototype,"isComplete",{get:function(){return!!this.orderId},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"totalTax",{get:function(){var t;return(null===(t=this.cart)||void 0===t?void 0:t.totalTax)||0},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"shippingTotal",{get:function(){var t;return(null===(t=this.shippingLines)||void 0===t?void 0:t.reduce((function(t,e){return t+e.price}),0))||0},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"hasCustomer",{get:function(){var t;return!!(null===(t=this.customer)||void 0===t?void 0:t.id)},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"hasValidCustomerEmail",{get:function(){var t;return!!(null===(t=this.customer)||void 0===t?void 0:t.email)&&o(this.customer.email)},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"customerFullName",{get:function(){var t,e;return"".concat((null===(t=this.customer)||void 0===t?void 0:t.firstName)||""," ").concat((null===(e=this.customer)||void 0===e?void 0:e.lastName)||"")},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"customerEmail",{get:function(){var t;return"".concat((null===(t=this.customer)||void 0===t?void 0:t.email)||"")},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"dateStr",{get:function(){var t=new Date;return t.setTime(parseFloat(this.updatedAt)),r(t)},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"$totalFinalPrice",{get:function(){var t,e=null===(t=this.selectedPaymentGateway)||void 0===t?void 0:t.getCalculatedAdditionalPrices(this.totalFinalPrice||0,this.shippingLines||null),i=this.totalFinalPrice||0;return null==e||e.forEach((function(t){t.type===n.DECREMENT?i-=t.amount:i+=t.amount})),i},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"couponAdjustment",{get:function(){var t;return null===(t=this.adjustments)||void 0===t?void 0:t.find((function(t){return!!t.couponId}))},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"nonCouponAdjustments",{get:function(){var t;return null===(t=this.adjustments)||void 0===t?void 0:t.filter((function(t){return!t.couponId}))},enumerable:!1,configurable:!0}),a}(),p=function(e){var i;this.id=e.id||"",this.email=e.email||"",this.firstName=e.firstName||"",this.lastName=e.lastName||"",this.notificationsAccepted=null===(i=e.notificationsAccepted)||void 0===i||i,t(this)};!function(t){t.CLICK_AND_COLLECT="CLICK_AND_COLLECT",t.NO_SHIPMENT="NO_SHIPMENT",t.SHIPMENT="SHIPMENT"}(s||(s={})),function(t){t.COMPLETED="COMPLETED",t.OPEN="OPEN"}(l||(l={})),function(t){t.NOT_SENT="NOT_SENT",t.SENT="SENT"}(a||(a={})),function(t){t.NOT_RECOVERED="NOT_RECOVERED",t.RECOVERED="RECOVERED"}(u||(u={})),function(t){t.BUY_ONLINE_PAY_AT_STORE="BUY_ONLINE_PAY_AT_STORE",t.CASH="CASH",t.CASH_ON_DELIVERY="CASH_ON_DELIVERY",t.CREDIT_CARD="CREDIT_CARD",t.GIFT_CARD="GIFT_CARD",t.MONEY_ORDER="MONEY_ORDER",t.OTHER="OTHER"}(d||(d={})),function(t){t.CLICK_AND_COLLECT="CLICK_AND_COLLECT",t.NO_SHIPMENT="NO_SHIPMENT",t.SHIPMENT="SHIPMENT"}(c||(c={}));export{h as IkasCheckout,p as IkasCheckoutCustomer,a as IkasCheckoutRecoveryEmailStatus,u as IkasCheckoutRecoveryStatus,l as IkasCheckoutStatus,d as IkasPaymentMethod,s as IkasShippingMethod,c as IkasShippingMethodEnum};
|
package/build/utils/helper.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare const stringToSlug: (str: string) => string;
|
|
2
2
|
export declare const validatePhoneNumber: (str: string) => boolean;
|
|
3
|
+
export declare const validateEmail: (str: string) => boolean;
|
|
3
4
|
export declare const pascalCase: (str: string) => string;
|
|
4
5
|
export declare const decodeBase64: (base64: string) => string;
|
|
5
6
|
export declare function stringSorter(atitle: string, btitle: string): number;
|
package/build/utils/helper.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{IkasStorefrontConfig as
|
|
1
|
+
import{IkasStorefrontConfig as e}from"../storefront/index.js";import r from'../ext/lodash/forEach.js';var t=function(e){e=(e=e.replace(/^\s+|\s+$/g,"")).toLocaleLowerCase("tr-TR");for(var r="àáäâèéëêìíïîıòóöôùúüûñçşğ·/_,:;",t=0,n=r.length;t<n;t++)e=e.replace(new RegExp(r.charAt(t),"g"),"aaaaeeeeiiiiioooouuuuncsg------".charAt(t));return e=e.replace(/[^a-z0-9 -]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-")},n=function(e){return/^\+?\d+$/.test(e)},o=function(e){return!(e.length>320)&&/^[a-z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/.test(e)},a=function(e){var r=e.toLocaleLowerCase("tr-TR");return r.charAt(0).toLocaleUpperCase("tr-TR")+r.slice(1)},u=function(e){return Buffer.from(e,"base64").toString("ascii")};function c(e,r){var t="0123456789AaBbCcÇçDdEeFfGgĞğHhIıİiJjKkLlMmNnOoÖöPpQqRrSsŞşTtUuÜüVvWwXxYyZz",n=e||"",o=r||"";if(0===n.length||0===o.length)return n.length-o.length;for(var a=0;a<n.length&&a<o.length;a++){var u=t.indexOf(n[a].toUpperCase()),c=t.indexOf(o[a].toUpperCase());if(u!==c)return u-c}return 0}function i(e,r){var t=[];if(!e||!r)return[];for(var n=0;n<e.length;){var o=e.indexOf(r,n);if(-1===o)break;n=o+1,t.push(o)}return t}function f(e){return!!new Intl.DateTimeFormat(e,{hour:"numeric"}).format(0).match(/\s/)}function l(r){var t={year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",hour12:!1},n=e.getCurrentLocale();return"undefined"!=typeof navigator?t.hour12=f(navigator.language):t.hour12=f(n),new Intl.DateTimeFormat(n,t).format(r)}function s(e,t,n){void 0===n&&(n=!1),r(e,(function(e,r){try{t(e,r)}catch(e){n&&console.error(e)}}))}function g(e,r){return Object.entries(e||{}).reduce((function(e,t){var n=t[0],o=t[1];return n===r?e.concat(o):"object"==typeof o?e.concat(g(o,r)):e}),[])}function h(e){return Object.keys(e).sort().reduce((function(r,t){return r[t]=e[t],r}),{})}export{u as decodeBase64,g as findAllByKey,i as findAllIndexes,l as formatDate,a as pascalCase,h as sortObject,c as stringSorter,t as stringToSlug,s as tryForEach,o as validateEmail,n as validatePhoneNumber};
|