@ikas/storefront 2.0.73 → 3.0.0-alpha.1
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/__generated__/global-types.d.ts +15 -72
- package/build/__generated__/global-types.js +1 -1
- package/build/_virtual/index.js_commonjs-proxy2.js +1 -1
- package/build/_virtual/index.js_commonjs-proxy3.js +1 -1
- package/build/analytics/analytics.d.ts +2 -3
- package/build/analytics/analytics.js +1 -1
- package/build/analytics/events.d.ts +1 -2
- package/build/analytics/events.js +1 -1
- package/build/analytics/googleTagManager.d.ts +0 -2
- package/build/analytics/googleTagManager.js +1 -1
- package/build/analytics/head/index.js +1 -1
- package/build/analytics/ikas.js +1 -1
- package/build/api/blog/__generated__/getBlog.d.ts +5 -1
- package/build/api/blog/__generated__/listBlog.d.ts +5 -1
- package/build/api/blog/__generated__/listBlogCategory.d.ts +5 -1
- package/build/api/blog/__generated__/listBlogMetaData.d.ts +5 -3
- package/build/api/blog/index.js +1 -1
- package/build/api/brand/index.js +1 -1
- package/build/api/cart/__generated__/getCart.d.ts +4 -2
- package/build/api/cart/__generated__/saveItemToCart.d.ts +4 -25
- package/build/api/cart/index.d.ts +1 -3
- package/build/api/cart/index.js +1 -1
- package/build/api/category/__generated__/listCategoryPaths.d.ts +0 -19
- package/build/api/category/index.js +1 -1
- package/build/api/checkout/__generated__/addCouponCodeToCheckout.d.ts +1 -1
- package/build/api/checkout/__generated__/getCheckoutById.d.ts +4 -2
- package/build/api/checkout/__generated__/getOrder.d.ts +12 -6
- package/build/api/checkout/index.d.ts +1 -7
- package/build/api/checkout/index.js +1 -1
- package/build/api/contact-form/__generated__/sendContactFormToMerchant.d.ts +0 -1
- package/build/api/contact-form/index.d.ts +1 -2
- package/build/api/contact-form/index.js +1 -1
- package/build/api/customer/__generated__/createOrderRefundRequest.d.ts +13 -7
- package/build/api/customer/__generated__/customerLogin.d.ts +2 -8
- package/build/api/customer/__generated__/customerSocialLogin.d.ts +2 -8
- package/build/api/customer/__generated__/getCustomerOrders.d.ts +12 -6
- package/build/api/customer/__generated__/getMyCustomer.d.ts +3 -13
- package/build/api/customer/__generated__/registerCustomer.d.ts +3 -14
- package/build/api/customer/__generated__/saveMyCustomer.d.ts +3 -13
- package/build/api/customer/index.d.ts +1 -3
- package/build/api/customer/index.js +1 -1
- package/build/api/customer-review/__generated__/listCustomerReviews.d.ts +5 -1
- package/build/api/customer-review/index.js +1 -1
- package/build/api/favorite-product/index.js +1 -1
- package/build/api/html-meta-data/__generated__/listHTMLMetaData.d.ts +0 -8
- package/build/api/html-meta-data/index.js +1 -1
- package/build/api/index.d.ts +0 -1
- package/build/api/merchant/__generated__/listMerchantSettings.d.ts +0 -11
- package/build/api/merchant/index.js +1 -1
- package/build/api/product-option-set/__generated__/ListProductOptionSet.d.ts +0 -6
- package/build/api/product-search/__generated__/getProductFilterData.d.ts +0 -1
- package/build/api/product-search/index.d.ts +1 -19
- package/build/api/product-search/index.js +1 -1
- package/build/api/raffle/__generated__/listRaffle.d.ts +5 -1
- package/build/api/raffle/__generated__/listRaffleMetaData.d.ts +0 -2
- package/build/api/raffle/__generated__/saveRaffleParticipant.d.ts +6 -46
- package/build/api/raffle/index.d.ts +3 -7
- package/build/api/raffle/index.js +1 -1
- package/build/api/storefront/__generated__/getStorefront.d.ts +0 -3
- package/build/api/storefront/index.js +1 -1
- package/build/api/variant-type/__generated__/listVariantType.d.ts +6 -2
- package/build/assets/translations/checkout/en.js +1 -1
- package/build/assets/translations/checkout/tr.js +1 -1
- package/build/components/checkout/components/address-form/index.js +1 -1
- package/build/components/checkout/components/address-form/model.d.ts +0 -3
- package/build/components/checkout/components/address-form/model.js +1 -1
- package/build/components/checkout/components/cart-summary/cart-item/index.js +1 -1
- package/build/components/checkout/components/cart-summary/index.js +1 -1
- package/build/components/checkout/components/cart-summary/style.module.scss.js +1 -1
- package/build/components/checkout/components/credit-card-form/index.js +1 -1
- package/build/components/checkout/components/customer-addresses/model.js +1 -1
- package/build/components/checkout/components/error/index.js +1 -1
- package/build/components/checkout/components/error/no-shipping-error/index.d.ts +5 -3
- package/build/components/checkout/components/error/no-shipping-error/index.js +1 -1
- package/build/components/checkout/components/form-item/index.js +1 -1
- package/build/components/checkout/components/form-item/model.js +1 -1
- package/build/components/checkout/components/form-item/style.module.scss.js +1 -1
- package/build/components/checkout/index.d.ts +0 -1
- package/build/components/checkout/index.js +1 -1
- package/build/components/checkout/model.d.ts +3 -5
- package/build/components/checkout/model.js +1 -1
- package/build/components/checkout/steps/step-info/index.js +1 -1
- package/build/components/checkout/steps/step-payment/index.js +1 -1
- package/build/components/checkout/steps/step-shipping/index.js +1 -1
- package/build/components/checkout/steps/step-success/index.js +1 -1
- package/build/components/image/index.d.ts +3 -29
- package/build/components/page/head.d.ts +0 -3
- package/build/components/page/head.js +1 -1
- package/build/components/page/index.d.ts +0 -3
- package/build/components/page/index.js +1 -1
- package/build/components/page-editor/ThemeComponentEditor.js +1 -1
- package/build/components/page-editor/model.js +1 -1
- package/build/ikas.js +7 -7
- package/build/index.js +1 -1
- package/build/models/data/blog/index.d.ts +0 -2
- package/build/models/data/blog/index.js +1 -1
- package/build/models/data/category/index.d.ts +0 -2
- package/build/models/data/category/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/models/data/customer/index.d.ts +0 -2
- package/build/models/data/customer/index.js +1 -1
- package/build/models/data/html-meta-data/index.d.ts +0 -2
- package/build/models/data/html-meta-data/index.js +1 -1
- package/build/models/data/image/index.d.ts +12 -3
- package/build/models/data/image/index.js +1 -1
- package/build/models/data/index.d.ts +1 -6
- package/build/models/data/merchant-settings/index.d.ts +0 -14
- package/build/models/data/merchant-settings/index.js +1 -1
- package/build/models/data/order/line-item/index.js +1 -1
- package/build/models/data/order/line-item/variant/index.d.ts +0 -7
- package/build/models/data/order/line-item/variant/index.js +1 -1
- package/build/models/data/product/index.d.ts +1 -1
- package/build/models/data/product/index.js +1 -1
- package/build/models/data/product/variant/index.d.ts +1 -0
- package/build/models/data/product/variant/index.js +1 -1
- package/build/models/data/product/variant-type/index.d.ts +0 -1
- package/build/models/data/product/variant-type/index.js +1 -1
- package/build/models/data/product-filter/index.d.ts +1 -3
- package/build/models/data/product-filter/index.js +1 -1
- package/build/models/data/product-option-set/index.js +1 -1
- package/build/models/data/raffle/index.d.ts +4 -12
- package/build/models/data/raffle/index.js +1 -1
- package/build/models/data/simple-product/index.d.ts +1 -1
- package/build/models/data/storefront/index.d.ts +0 -3
- package/build/models/data/storefront/index.js +1 -1
- package/build/models/data/storefront/theme-localization/index.js +1 -1
- package/build/models/theme/page/component/prop-value/product-list.d.ts +1 -2
- package/build/models/theme/page/component/prop-value/product-list.js +1 -1
- package/build/models/theme/page/index.d.ts +0 -2
- package/build/models/theme/page/index.js +1 -1
- package/build/models/theme/theme.js +1 -1
- package/build/models/ui/blog-category-list/index.js +1 -1
- package/build/models/ui/blog-list/index.js +1 -1
- package/build/models/ui/brand-list/index.js +1 -1
- package/build/models/ui/category-list/index.js +1 -1
- package/build/models/ui/customer-review-list/index.js +1 -1
- package/build/models/ui/index.d.ts +1 -2
- package/build/models/ui/product-detail/index.d.ts +3 -10
- package/build/models/ui/product-detail/index.js +1 -1
- package/build/models/ui/product-list/index.d.ts +1 -47
- package/build/models/ui/product-list/index.js +1 -1
- package/build/models/ui/raffle-list/index.js +1 -1
- package/build/models/ui/validator/form/account-info.d.ts +0 -2
- package/build/models/ui/validator/form/account-info.js +1 -1
- package/build/models/ui/validator/form/address.d.ts +0 -3
- package/build/models/ui/validator/form/address.js +1 -1
- package/build/models/ui/validator/form/contact-form.js +1 -1
- package/build/models/ui/validator/form/raffle-form.d.ts +0 -2
- package/build/models/ui/validator/form/raffle-form.js +1 -1
- package/build/models/ui/validator/form/register.d.ts +0 -4
- package/build/models/ui/validator/form/register.js +1 -1
- package/build/models/ui/validator/rules/index.d.ts +0 -5
- package/build/models/ui/validator/rules/index.js +1 -1
- package/build/pages/404.js +1 -1
- package/build/pages/_slug_/index.js +1 -1
- package/build/pages/account/addresses.js +1 -1
- package/build/pages/account/favorite-products.js +1 -1
- package/build/pages/account/forgot-password.js +1 -1
- package/build/pages/account/index.js +1 -1
- package/build/pages/account/login.js +1 -1
- package/build/pages/account/orders/_id_.js +1 -1
- package/build/pages/account/orders/index.js +1 -1
- package/build/pages/account/raffles.js +1 -1
- package/build/pages/account/recover-password.js +1 -1
- package/build/pages/account/register.js +1 -1
- package/build/pages/blog/_slug_.js +1 -1
- package/build/pages/blog/index.js +1 -1
- package/build/pages/cart.js +1 -1
- package/build/pages/checkout.js +1 -1
- package/build/pages/editor.js +1 -1
- package/build/pages/home.js +1 -1
- package/build/pages/pages/_slug_.js +1 -1
- package/build/pages/raffle/_slug_.js +1 -1
- package/build/pages/raffle/index.js +1 -1
- package/build/pages/search.js +1 -1
- package/build/providers/helpers/raffles.js +1 -1
- package/build/providers/page-data-get.d.ts +1 -9
- package/build/providers/page-data-get.js +1 -1
- package/build/providers/page-data-init.js +1 -1
- package/build/providers/page-data-next.d.ts +0 -36
- package/build/providers/page-data-next.js +1 -1
- package/build/providers/placeholders.js +1 -1
- package/build/providers/prop-value/attribute-list.js +1 -1
- package/build/providers/prop-value/attribute.js +1 -1
- package/build/providers/prop-value/blog-category-list.js +1 -1
- package/build/providers/prop-value/blog-category.js +1 -1
- package/build/providers/prop-value/blog-list.js +1 -1
- package/build/providers/prop-value/blog.js +1 -1
- package/build/providers/prop-value/brand-list.js +1 -1
- package/build/providers/prop-value/brand.js +1 -1
- package/build/providers/prop-value/category-list.js +1 -1
- package/build/providers/prop-value/category.js +1 -1
- package/build/providers/prop-value/custom.js +1 -1
- package/build/providers/prop-value/image-list.js +1 -1
- package/build/providers/prop-value/image.js +1 -1
- package/build/providers/prop-value/link.js +1 -1
- package/build/providers/prop-value/product-detail.js +1 -1
- package/build/providers/prop-value/product-list.d.ts +0 -6
- package/build/providers/prop-value/product-list.js +1 -1
- package/build/providers/prop-value/raffle-list.js +1 -1
- package/build/providers/prop-value/raffle.js +1 -1
- package/build/scripts/generators/types/index.js +1 -1
- package/build/store/base.d.ts +0 -2
- package/build/store/base.js +1 -1
- package/build/store/cart.d.ts +2 -24
- package/build/store/cart.js +1 -1
- package/build/store/customer.d.ts +3 -7
- package/build/store/customer.js +1 -1
- package/build/storefront/index.d.ts +2 -9
- package/build/storefront/index.js +1 -1
- package/build/utils/currency.d.ts +2 -2
- package/build/utils/currency.js +1 -1
- package/build/utils/helper.d.ts +0 -1
- package/build/utils/helper.js +1 -1
- package/build/utils/i18n.js +1 -1
- package/package.json +3 -1
- package/build/analytics/googleAnalytics.d.ts +0 -13
- package/build/analytics/googleAnalytics.js +0 -1
- package/build/analytics/googleUniversal.d.ts +0 -9
- package/build/analytics/googleUniversal.js +0 -1
- package/build/analytics/tiktokPixel.d.ts +0 -13
- package/build/analytics/tiktokPixel.js +0 -1
- package/build/api/customer/__generated__/getOrderByEmail.d.ts +0 -615
- package/build/api/customer-attribute/__generated__/listCustomerAttribute.d.ts +0 -44
- package/build/api/customer-attribute/index.d.ts +0 -4
- package/build/api/customer-attribute/index.js +0 -1
- package/build/api/customer-review-summary/__generated__/listCustomerReviewSummary.d.ts +0 -55
- package/build/api/customer-review-summary/index.d.ts +0 -21
- package/build/api/customer-review-summary/index.js +0 -1
- package/build/api/product-search/__generated__/getRelatedProducts.d.ts +0 -14
- package/build/api/raffle/__generated__/listRaffleParticipants.d.ts +0 -67
- package/build/api/raffle/__generated__/listStorefrontRaffle.d.ts +0 -82
- package/build/assets/translations/checkout/de.js +0 -1
- package/build/models/data/customer/attribute-value/index.d.ts +0 -9
- package/build/models/data/customer/attribute-value/index.js +0 -1
- package/build/models/data/customer-attribute/customer-attribute-option/index.d.ts +0 -5
- package/build/models/data/customer-attribute/customer-attribute-option/index.js +0 -1
- package/build/models/data/customer-attribute/customer-attribute-sales-channel/index.d.ts +0 -17
- package/build/models/data/customer-attribute/customer-attribute-sales-channel/index.js +0 -1
- package/build/models/data/customer-attribute/index.d.ts +0 -35
- package/build/models/data/customer-attribute/index.js +0 -1
- package/build/models/data/customer-review-summary/index.d.ts +0 -16
- package/build/models/data/customer-review-summary/index.js +0 -1
- package/build/models/ui/customer-review-summary-list/index.d.ts +0 -43
- package/build/models/ui/customer-review-summary-list/index.js +0 -1
- package/build/utils/constants.d.ts +0 -2
- package/build/utils/constants.js +0 -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,RaffleParticipantStatusEnum}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";
|
|
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{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{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}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{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 p from"./pages/account/orders/index.js";export{p as OrdersPage};import*as i from"./pages/account/orders/_id_.js";export{i as OrderDetailPage};import*as m from"./pages/account/login.js";export{m as LoginPage};import*as d from"./pages/account/register.js";export{d 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";
|
|
@@ -44,8 +44,6 @@ export declare class IkasBlogMetaData {
|
|
|
44
44
|
slug: string;
|
|
45
45
|
targetId: string;
|
|
46
46
|
targetType: IkasBlogMetadataTargetType;
|
|
47
|
-
canonicals?: string[] | null;
|
|
48
|
-
disableIndex?: boolean | null;
|
|
49
47
|
constructor(data?: Partial<IkasBlogMetaData>);
|
|
50
48
|
}
|
|
51
49
|
export declare class IkasBlogCategory {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeAutoObservable as t}from"mobx";import{IkasImage as e}from"../image/index.js";var i,a=function(){function i(i){var a;void 0===i&&(i={}),this.id=i.id||Date.now()+"",this.createdAt=i.createdAt||Date.now(),this.updatedAt=i.updatedAt||Date.now(),this.categoryId=i.categoryId||null,this.category=i.category?new o(i.category):null,this.imageId=i.imageId||null,this.title=i.title||null,this.shortDescription=i.shortDescription||null,this.isPublished=i.isPublished||!1,this.storefrontId=i.storefrontId||"",this.tagIds=i.tagIds||[],this.tags=(null===(a=i.tags)||void 0===a?void 0:a.map((function(t){return new
|
|
1
|
+
import{makeAutoObservable as t}from"mobx";import{IkasImage as e}from"../image/index.js";var i,a=function(){function i(i){var a;void 0===i&&(i={}),this.id=i.id||Date.now()+"",this.createdAt=i.createdAt||Date.now(),this.updatedAt=i.updatedAt||Date.now(),this.categoryId=i.categoryId||null,this.category=i.category?new o(i.category):null,this.imageId=i.imageId||null,this.title=i.title||null,this.shortDescription=i.shortDescription||null,this.isPublished=i.isPublished||!1,this.storefrontId=i.storefrontId||"",this.tagIds=i.tagIds||[],this.tags=(null===(a=i.tags)||void 0===a?void 0:a.map((function(t){return new r(t)})))||[],this.writer=i.writer?new d(i.writer):new d,this.blogContent=i.blogContent?new n(i.blogContent):new n,this.metadata=i.metadata?new s(i.metadata):null,this.image=i.imageId?new e(i.imageId):null,t(this)}return Object.defineProperty(i.prototype,"href",{get:function(){var t;return(null===(t=this.metadata)||void 0===t?void 0:t.slug)?"/blog/".concat(this.metadata.slug):""},enumerable:!1,configurable:!0}),i}(),n=function(e){void 0===e&&(e={}),this.id=e.id||Date.now()+"",this.createdAt=e.createdAt||Date.now(),this.updatedAt=e.updatedAt||Date.now(),this.content=e.content||"",t(this)},d=function(e){void 0===e&&(e={}),this.firstName=e.firstName||"",this.lastName=e.lastName||"",t(this)};!function(t){t.BLOG="BLOG",t.BLOG_CATEGORY="BLOG_CATEGORY"}(i||(i={}));var s=function(e){void 0===e&&(e={}),this.pageTitle=null,this.description=null,this.id=e.id||Date.now()+"",this.createdAt=e.createdAt||Date.now(),this.updatedAt=e.updatedAt||Date.now(),this.description=e.description||"",this.pageTitle=e.pageTitle||"",this.slug=e.slug||"",this.targetId=e.targetId||"",this.targetType=e.targetType||i.BLOG,t(this)},o=function(){function e(e){void 0===e&&(e={}),this.id=e.id||"",this.createdAt=e.createdAt||Date.now(),this.updatedAt=e.updatedAt||Date.now(),this.deleted=e.deleted||!1,this.name=e.name||"",this.imageId=e.imageId||"",this.metadata=e.metadata?new s(e.metadata):null,t(this)}return Object.defineProperty(e.prototype,"href",{get:function(){var t;return(null===(t=this.metadata)||void 0===t?void 0:t.slug)?"/blog/".concat(this.metadata.slug):""},enumerable:!1,configurable:!0}),e}(),r=function(e){void 0===e&&(e={}),this.id=e.id||Date.now()+"",this.createdAt=e.createdAt||Date.now(),this.updatedAt=e.updatedAt||Date.now(),this.deleted=e.deleted||!1,this.name=e.name||"",t(this)};export{a as IkasBlog,o as IkasBlogCategory,n as IkasBlogContent,s as IkasBlogMetaData,i as IkasBlogMetadataTargetType,r as IkasBlogTag,d as IkasBlogWriter};
|
|
@@ -18,10 +18,8 @@ export declare class IkasCategoryPath {
|
|
|
18
18
|
id: string;
|
|
19
19
|
name: string;
|
|
20
20
|
slug?: string | null;
|
|
21
|
-
translations: IkasCategoryTranslation[] | null;
|
|
22
21
|
constructor(data: Partial<IkasCategoryPath>);
|
|
23
22
|
get href(): string;
|
|
24
|
-
private setPathTranslations;
|
|
25
23
|
}
|
|
26
24
|
export declare class IkasFilterCategory {
|
|
27
25
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as t}from'../../../ext/tslib/tslib.es6.js';import{makeAutoObservable as e}from"mobx";import{IkasImage as
|
|
1
|
+
import{__assign as t}from'../../../ext/tslib/tslib.es6.js';import{makeAutoObservable as e}from"mobx";import{IkasImage as i}from"../image/index.js";import{IkasHTMLMetaData as n}from"../html-meta-data/index.js";import{IkasStorefrontConfig as s}from"../../../storefront/index.js";var r,o=function(){function t(t){void 0===t&&(t={}),this.description=null,this.metaData=null,this.image=null,this.orderType=null,this.translations=null,this.id=t.id||Date.now()+"",this.name=t.name||"",this.description=t.description||null,this.parentId=t.parentId||null,this.metaData=t.metaData?new n(t.metaData):void 0,this.image=t.image?new i(t.image.id):null,this.path=t.path?t.path.map((function(t){return new l(t)})):[],this.orderType=t.orderType||null,this.translations=t.translations||null,this.setTranslations(),e(this)}return Object.defineProperty(t.prototype,"href",{get:function(){var t;return(null===(t=this.metaData)||void 0===t?void 0:t.slug)?"/".concat(this.metaData.slug):""},enumerable:!1,configurable:!0}),t.prototype.setTranslations=function(){if(this.translations&&this.translations.some((function(t){return t.locale===s.getCurrentLocale()}))){var t=this.translations.find((function(t){return t.locale===s.getCurrentLocale()}));(null==t?void 0:t.name)&&(this.name=t.name),(null==t?void 0:t.description)&&(this.description=t.description)}},t}(),l=function(){function t(t){this.id=t.id||"",this.name=t.name||"",this.slug=t.slug||"",e(this)}return Object.defineProperty(t.prototype,"href",{get:function(){return this.slug?"/".concat(this.slug):""},enumerable:!1,configurable:!0}),t}(),a=function(){function i(t){this._isSelected=!1,this.id=t.id||"",this.name=t.name||"",this.slug=t.slug||"",this.resultCount=void 0!==t.resultCount&&null!==t.resultCount?t.resultCount:null,this._isSelected=t.isSelected||!1,e(this)}return Object.defineProperty(i.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"href",{get:function(){return this.slug?"/".concat(this.slug):""},enumerable:!1,configurable:!0}),i.prototype.toJSON=function(){return t(t({},this),{isSelected:this._isSelected})},i}();!function(t){t.BEST_SELLER="BEST_SELLER",t.HIGHEST_DISCOUNT_RATIO="HIGHEST_DISCOUNT_RATIO",t.HIGHEST_PRICE="HIGHEST_PRICE",t.LOWEST_DISCOUNT_RATIO="LOWEST_DISCOUNT_RATIO",t.LOWEST_PRICE="LOWEST_PRICE",t.MANUALLY="MANUALLY",t.NEWEST="NEWEST",t.OLDEST="OLDEST"}(r||(r={}));export{o as IkasCategory,l as IkasCategoryPath,a as IkasFilterCategory,r as ModelOrder};
|
|
@@ -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 hasValidCustomer(): 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{
|
|
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 o}from"../../../utils/helper.js";var r,s,l,u,a,d,c=function(){function l(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 h(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||r.NO_SHIPMENT,this.status=n.status||s.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,t(this)}return Object.defineProperty(l.prototype,"isComplete",{get:function(){return!!this.orderId},enumerable:!1,configurable:!0}),Object.defineProperty(l.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(l.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(l.prototype,"hasCustomer",{get:function(){var t;return!!(null===(t=this.customer)||void 0===t?void 0:t.id)},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"hasValidCustomer",{get:function(){var t;return!!(null===(t=this.customer)||void 0===t?void 0:t.email)},enumerable:!1,configurable:!0}),Object.defineProperty(l.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(l.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(l.prototype,"dateStr",{get:function(){var t=new Date;return t.setTime(parseFloat(this.updatedAt)),o(t)},enumerable:!1,configurable:!0}),Object.defineProperty(l.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(l.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(l.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}),l}(),h=function(e){this.id=e.id||"",this.email=e.email||"",this.firstName=e.firstName||"",this.lastName=e.lastName||"",this.notificationsAccepted=e.notificationsAccepted||!1,t(this)};!function(t){t.CLICK_AND_COLLECT="CLICK_AND_COLLECT",t.NO_SHIPMENT="NO_SHIPMENT",t.SHIPMENT="SHIPMENT"}(r||(r={})),function(t){t.COMPLETED="COMPLETED",t.OPEN="OPEN"}(s||(s={})),function(t){t.NOT_SENT="NOT_SENT",t.SENT="SENT"}(l||(l={})),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"}(a||(a={})),function(t){t.CLICK_AND_COLLECT="CLICK_AND_COLLECT",t.NO_SHIPMENT="NO_SHIPMENT",t.SHIPMENT="SHIPMENT"}(d||(d={}));export{c as IkasCheckout,h as IkasCheckoutCustomer,l as IkasCheckoutRecoveryEmailStatus,u as IkasCheckoutRecoveryStatus,s as IkasCheckoutStatus,a as IkasPaymentMethod,r as IkasShippingMethod,d as IkasShippingMethodEnum};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { IkasCustomerAddress } from "./address";
|
|
2
|
-
import { IkasCustomerAttributeValue } from "./attribute-value";
|
|
3
2
|
export declare class IkasCustomer {
|
|
4
3
|
id: string;
|
|
5
4
|
firstName: string;
|
|
@@ -12,7 +11,6 @@ export declare class IkasCustomer {
|
|
|
12
11
|
addresses: IkasCustomerAddress[];
|
|
13
12
|
subscriptionStatus: IkasCustomerEmailSubscriptionStatus | null;
|
|
14
13
|
customerGroupIds: string[] | null;
|
|
15
|
-
attributes: IkasCustomerAttributeValue[];
|
|
16
14
|
constructor(data: Partial<IkasCustomer>);
|
|
17
15
|
get isSubscribed(): boolean;
|
|
18
16
|
get basicInfo(): {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{IkasCustomerAddress as t}from"./address/index.js";import{makeAutoObservable as i}from"mobx";
|
|
1
|
+
import{IkasCustomerAddress as t}from"./address/index.js";import{makeAutoObservable as i}from"mobx";var s,e,r=function(){function r(e){this.phone=null,this.id=e.id||"",this.firstName=e.firstName||"",this.lastName=e.lastName||"",this.email=e.email||"",this.phone=e.phone,this.isEmailVerified=e.isEmailVerified||!1,this.isPhoneVerified=e.isPhoneVerified||!1,this.accountStatus=e.accountStatus||s.ACTIVE_ACCOUNT,this.addresses=e.addresses?e.addresses.map((function(i){return new t(i)})):[],this.subscriptionStatus=e.subscriptionStatus||null,this.customerGroupIds=e.customerGroupIds||null,i(this)}return Object.defineProperty(r.prototype,"isSubscribed",{get:function(){return this.subscriptionStatus===e.SUBSCRIBED||this.subscriptionStatus===e.PENDING_CONFIRMATION},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"basicInfo",{get:function(){return{id:this.id,firstName:this.firstName,lastName:this.lastName,email:this.email,phone:this.phone}},enumerable:!1,configurable:!0}),r}();!function(t){t.ACTIVE_ACCOUNT="ACTIVE_ACCOUNT",t.DECLINED_ACCOUNT_INVITATION="DECLINED_ACCOUNT_INVITATION",t.DISABLED_ACCOUNT="DISABLED_ACCOUNT",t.INVITED_TO_CREATE_ACCOUNT="INVITED_TO_CREATE_ACCOUNT"}(s||(s={})),function(t){t.NOT_SUBSCRIBED="NOT_SUBSCRIBED",t.PENDING_CONFIRMATION="PENDING_CONFIRMATION",t.SUBSCRIBED="SUBSCRIBED"}(e||(e={}));export{r as IkasCustomer,s as IkasCustomerAccountStatus,e as IkasCustomerEmailSubscriptionStatus};
|
|
@@ -6,8 +6,6 @@ export declare class IkasHTMLMetaData {
|
|
|
6
6
|
targetId: string | null;
|
|
7
7
|
redirectTo?: string | null;
|
|
8
8
|
translations?: IkasHTMLMetaDataTranslations[] | null;
|
|
9
|
-
canonicals?: string[] | null;
|
|
10
|
-
disableIndex?: boolean | null;
|
|
11
9
|
constructor(data?: Partial<IkasHTMLMetaData>);
|
|
12
10
|
private setTranslations;
|
|
13
11
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeAutoObservable as t}from"mobx";import{IkasStorefrontConfig as i}from"../../../storefront/index.js";var n,
|
|
1
|
+
import{makeAutoObservable as t}from"mobx";import{IkasStorefrontConfig as i}from"../../../storefront/index.js";var n,e=function(){function n(i){void 0===i&&(i={}),this.redirectTo=null,this.translations=null,this.slug=i.slug||"",this.pageTitle=i.pageTitle||null,this.description=i.description||null,this.targetType=i.targetType||null,this.targetId=i.targetId||null,this.redirectTo=i.redirectTo,this.translations=i.translations||null,this.setTranslations(),t(this)}return n.prototype.setTranslations=function(){if(this.translations&&this.translations.some((function(t){return t.locale===i.getCurrentLocale()}))){var t=this.translations.find((function(t){return t.locale===i.getCurrentLocale()}));(null==t?void 0:t.pageTitle)&&(this.pageTitle=t.pageTitle),(null==t?void 0:t.description)&&(this.description=t.description)}},n}();!function(t){t.PRODUCT="PRODUCT",t.CATEGORY="CATEGORY",t.BRAND="BRAND",t.PAGE="PAGE"}(n||(n={}));export{e as IkasHTMLMetaData,n as IkasHTMLMetaDataTargetType};
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
export declare class IkasImage {
|
|
2
2
|
id: string;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
constructor(id: string);
|
|
4
|
+
/**
|
|
5
|
+
* URL for the image with 1080px size.
|
|
6
|
+
*/
|
|
6
7
|
get src(): string;
|
|
8
|
+
/**
|
|
9
|
+
* URL for the image with 180px size.
|
|
10
|
+
*/
|
|
7
11
|
get thumbnailSrc(): string;
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @param size A number value for the desired image size.
|
|
15
|
+
* @returns URL for the image with closest size to the given size param.
|
|
16
|
+
*/
|
|
8
17
|
getSrc(size: number): string;
|
|
9
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeAutoObservable as e}from"mobx";import{decodeBase64 as t}from"../../../utils/helper.js";import{IkasStorefrontConfig as i}from"../../../storefront/index.js";import"../../../utils/i18n.js";var
|
|
1
|
+
import{makeAutoObservable as e}from"mobx";import{decodeBase64 as t}from"../../../utils/helper.js";import{IkasStorefrontConfig as i}from"../../../storefront/index.js";import"../../../utils/i18n.js";var r=function(){function r(t){this.id=t,e(this)}return Object.defineProperty(r.prototype,"src",{get:function(){return this.getSrc(1080)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"thumbnailSrc",{get:function(){return this.getSrc(180)},enumerable:!1,configurable:!0}),r.prototype.getSrc=function(e){if(this.id.includes("/"))return"".concat(process.env.NEXT_PUBLIC_IMG_BASE_URL,"images/").concat(this.id,"/image_").concat(e,".webp");var r="undefined"!=typeof window?window.editorApiKey:void 0,o=t(r||i.config.apiKey||"");return"".concat(process.env.NEXT_PUBLIC_IMG_BASE_URL,"images/").concat(o,"/").concat(this.id,"/image_").concat(e,".webp")},r}();export{r as IkasImage};
|
|
@@ -7,7 +7,6 @@ export * from "./customer/address";
|
|
|
7
7
|
export { IkasCustomer } from "./customer";
|
|
8
8
|
export { IkasCustomerReview } from "./customer-review";
|
|
9
9
|
export type { IkasCustomerReviewSettings } from "./customer-review-settings";
|
|
10
|
-
export { IkasCustomerReviewSummary } from "./customer-review-summary";
|
|
11
10
|
export type { IkasCountry } from "./country";
|
|
12
11
|
export type { IkasDistrict } from "./district";
|
|
13
12
|
export { IkasHTMLMetaData, IkasHTMLMetaDataTargetType } from "./html-meta-data";
|
|
@@ -35,10 +34,6 @@ export * from "./variant-type";
|
|
|
35
34
|
export { IkasVariantValue } from "./variant-type/variant-value";
|
|
36
35
|
export { IkasOrderTransaction, IkasTransactionStatusEnum, IkasTransactionTypeEnum, } from "./order-transaction";
|
|
37
36
|
export * from "./product-option-set";
|
|
38
|
-
export { IkasRaffle, IkasRaffleParticipant, IkasRaffleMetaData,
|
|
37
|
+
export { IkasRaffle, IkasRaffleParticipant, IkasRaffleMetaData, } from "./raffle";
|
|
39
38
|
export { IkasSlider } from "./slider";
|
|
40
39
|
export { IkasProductCampaign } from "./product-campaing";
|
|
41
|
-
export { IkasCustomerAttribute } from "./customer-attribute";
|
|
42
|
-
export { IkasCustomerAttributeValue } from "./customer/attribute-value";
|
|
43
|
-
export { IkasCustomerAttributeSalesChannel, IkasCustomerAttributeRegisterPageRequirementEnum, IkasCustomerAttributePermissionEnum, } from "./customer-attribute/customer-attribute-sales-channel";
|
|
44
|
-
export { IkasCustomerAttributeOption } from "./customer-attribute/customer-attribute-option";
|
|
@@ -4,19 +4,5 @@ export declare class IkasMerchantSettings {
|
|
|
4
4
|
logoId: string;
|
|
5
5
|
merchantName: string;
|
|
6
6
|
logo: IkasImage;
|
|
7
|
-
currencyFormats: IkasMerchantSettingsCurrencyFormat[];
|
|
8
7
|
constructor(data?: Partial<IkasMerchantSettings>);
|
|
9
8
|
}
|
|
10
|
-
declare type IkasMerchantSettingsCurrencyFormat = {
|
|
11
|
-
currencyCode: string;
|
|
12
|
-
decimalSeparator: string;
|
|
13
|
-
symbol: string;
|
|
14
|
-
symbolPosition: IkasMerchantSettingsCurrencyFormatSymbolPosition;
|
|
15
|
-
thousandSeparator: string;
|
|
16
|
-
omitZeroDecimal: boolean;
|
|
17
|
-
};
|
|
18
|
-
declare enum IkasMerchantSettingsCurrencyFormatSymbolPosition {
|
|
19
|
-
LEFT = "LEFT",
|
|
20
|
-
RIGHT = "RIGHT"
|
|
21
|
-
}
|
|
22
|
-
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{IkasImage as o}from"../image/index.js";var i
|
|
1
|
+
import{IkasImage as o}from"../image/index.js";var i=function(i){void 0===i&&(i={}),this.id=i.id||"",this.logoId=i.logoId||"",this.merchantName=i.merchantName||"",this.logo=new o(this.logoId)};export{i as IkasMerchantSettings};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{IkasOrderLineDiscount as t}from"./discount/index.js";import{IkasOrderLineVariant as i}from"./variant/index.js";import{makeAutoObservable as e}from"mobx";import"../../../../storefront/index.js";import'../../../../ext/lodash/isArguments.js';import'../../../../ext/lodash/isBuffer.js';import'../../../../ext/lodash/isTypedArray.js';import'../../../../ext/lodash/_baseGetTag.js';import{getCurrencySymbol as n}from"../../../../utils/currency.js";import"../../../../utils/i18n.js";import{IkasOrderLineOptions as r}from"./options/index.js";var o,u=function(){function u(u){this.discount=null,this.discountPrice=null,this.originalOrderLineItemId=null,this.taxValue=null,this._refundQuantity=null,this.id=u.id||"",this.createdAt=u.createdAt||"",this.updatedAt=u.updatedAt||"",this.orderedAt=u.orderedAt||0,this.deleted=u.deleted||!1,this.currencyCode=u.currencyCode||"",this.currencySymbol=n(this.currencyCode),this.discount=u.discount?new t(u.discount):void 0,this.discountPrice=u.discountPrice,this.finalPrice=u.finalPrice||0,this.originalOrderLineItemId=u.originalOrderLineItemId,this.price=u.price||0,this.quantity=u.quantity||0,this.taxValue=u.taxValue,this.variant=u.variant?new i(u.variant):new i,this.status=u.status||o.FULFILLED,this.options=u.options?u.options.map((function(t){return new r(t)})):null,e(this)}return Object.defineProperty(u.prototype,"priceWithQuantity",{get:function(){return this.price*this.quantity},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"overridenPriceWithQuantity",{get:function(){
|
|
1
|
+
import{IkasOrderLineDiscount as t}from"./discount/index.js";import{IkasOrderLineVariant as i}from"./variant/index.js";import{makeAutoObservable as e}from"mobx";import"../../../../storefront/index.js";import'../../../../ext/lodash/isArguments.js';import'../../../../ext/lodash/isBuffer.js';import'../../../../ext/lodash/isTypedArray.js';import'../../../../ext/lodash/_baseGetTag.js';import{getCurrencySymbol as n}from"../../../../utils/currency.js";import"../../../../utils/i18n.js";import{IkasOrderLineOptions as r}from"./options/index.js";var o,u=function(){function u(u){this.discount=null,this.discountPrice=null,this.originalOrderLineItemId=null,this.taxValue=null,this._refundQuantity=null,this.id=u.id||"",this.createdAt=u.createdAt||"",this.updatedAt=u.updatedAt||"",this.orderedAt=u.orderedAt||0,this.deleted=u.deleted||!1,this.currencyCode=u.currencyCode||"",this.currencySymbol=n(this.currencyCode),this.discount=u.discount?new t(u.discount):void 0,this.discountPrice=u.discountPrice,this.finalPrice=u.finalPrice||0,this.originalOrderLineItemId=u.originalOrderLineItemId,this.price=u.price||0,this.quantity=u.quantity||0,this.taxValue=u.taxValue,this.variant=u.variant?new i(u.variant):new i,this.status=u.status||o.FULFILLED,this.options=u.options?u.options.map((function(t){return new r(t)})):null,e(this)}return Object.defineProperty(u.prototype,"priceWithQuantity",{get:function(){return this.price*this.quantity},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"overridenPriceWithQuantity",{get:function(){return void 0!==this.discountPrice&&null!==this.discountPrice?this.price*this.quantity:null},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"finalPriceWithQuantity",{get:function(){return(void 0!==this.discountPrice&&null!==this.discountPrice?this.discountPrice:this.price)*this.quantity},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"tax",{get:function(){var t=this.taxValue||0;return this.finalPrice*this.quantity/(100+t)*t},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"refundQuantity",{get:function(){return this._refundQuantity},set:function(t){t?(t>this.quantity&&(t=this.quantity),t<=0&&(t=null),this._refundQuantity=t):this._refundQuantity=null},enumerable:!1,configurable:!0}),u}();!function(t){t.FULFILLED="FULFILLED",t.UNFULFILLED="UNFULFILLED",t.DELIVERED="DELIVERED",t.CANCELLED="CANCELLED",t.CANCEL_REQUESTED="CANCEL_REQUESTED",t.CANCEL_REJECTED="CANCEL_REJECTED",t.REFUND_REQUESTED="REFUND_REQUESTED",t.REFUND_REQUEST_ACCEPTED="REFUND_REQUEST_ACCEPTED",t.REFUNDED="REFUNDED",t.REFUND_REJECTED="REFUND_REJECTED"}(o||(o={}));export{u as IkasOrderLineItem,o as OrderLineItemStatusEnum};
|
|
@@ -9,7 +9,6 @@ export declare class IkasOrderLineVariant {
|
|
|
9
9
|
mainImageId?: string | null;
|
|
10
10
|
taxValue: number;
|
|
11
11
|
variantValues: IkasOrderLineVariantVariantValue[];
|
|
12
|
-
prices: IkasOrderLineVariantPrice[];
|
|
13
12
|
mainImage?: IkasImage | null;
|
|
14
13
|
constructor(data?: Partial<IkasOrderLineVariant>);
|
|
15
14
|
get href(): string | undefined;
|
|
@@ -24,9 +23,3 @@ export declare class IkasOrderLineVariantVariantValue {
|
|
|
24
23
|
get variantTypeSlug(): string;
|
|
25
24
|
get variantNameSlug(): string;
|
|
26
25
|
}
|
|
27
|
-
export declare type IkasOrderLineVariantPrice = {
|
|
28
|
-
buyPrice: number | null;
|
|
29
|
-
currency: string | null;
|
|
30
|
-
discountPrice: number | null;
|
|
31
|
-
sellPrice: number;
|
|
32
|
-
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeAutoObservable as t}from"mobx";import{IkasImage as a}from"../../../image/index.js";import{stringToSlug as i}from"../../../../../utils/helper.js";import"../../../../../storefront/index.js";import"../../../../../utils/i18n.js";var e=function(){function i(i){void 0===i&&(i={}),this.sku=null,this.slug=null,this.mainImageId=null,this.mainImage=null,this.id=i.id||"",this.name=i.name||"",this.productId=i.productId||"",this.sku=i.sku,this.slug=i.slug,this.barcodeList=i.barcodeList||[],this.mainImageId=i.mainImageId,this.taxValue=i.taxValue||0,this.variantValues=i.variantValues?i.variantValues.map((function(t){return new n(t)})):[],this.
|
|
1
|
+
import{makeAutoObservable as t}from"mobx";import{IkasImage as a}from"../../../image/index.js";import{stringToSlug as i}from"../../../../../utils/helper.js";import"../../../../../storefront/index.js";import"../../../../../utils/i18n.js";var e=function(){function i(i){void 0===i&&(i={}),this.sku=null,this.slug=null,this.mainImageId=null,this.mainImage=null,this.id=i.id||"",this.name=i.name||"",this.productId=i.productId||"",this.sku=i.sku,this.slug=i.slug,this.barcodeList=i.barcodeList||[],this.mainImageId=i.mainImageId,this.taxValue=i.taxValue||0,this.variantValues=i.variantValues?i.variantValues.map((function(t){return new n(t)})):[],this.mainImageId&&(this.mainImage=new a(this.mainImageId)),t(this)}return Object.defineProperty(i.prototype,"href",{get:function(){if(this.slug){var t=this.variantValues.map((function(t){return"".concat(t.variantTypeSlug,"=").concat(t.variantNameSlug)})).join("&");return t?"/".concat(this.slug,"?").concat(t):"/".concat(this.slug)}},enumerable:!1,configurable:!0}),i}(),n=function(){function a(a){this.order=a.order,this.variantTypeId=a.variantTypeId,this.variantTypeName=a.variantTypeName,this.variantValueId=a.variantValueId,this.variantValueName=a.variantValueName,t(this)}return Object.defineProperty(a.prototype,"variantTypeSlug",{get:function(){return i(this.variantTypeName)},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"variantNameSlug",{get:function(){return i(this.variantValueName)},enumerable:!1,configurable:!0}),a}();export{e as IkasOrderLineVariant,n as IkasOrderLineVariantVariantValue};
|
|
@@ -24,9 +24,9 @@ export declare class IkasProduct {
|
|
|
24
24
|
constructor(data?: Partial<IkasProduct>);
|
|
25
25
|
get hasVariant(): boolean;
|
|
26
26
|
get hasStock(): boolean;
|
|
27
|
+
get hasValidProductOptionValues(): boolean;
|
|
27
28
|
get mainVariantType(): import("..").IkasVariantType | undefined;
|
|
28
29
|
get href(): string;
|
|
29
|
-
get canAddToCart(): boolean;
|
|
30
30
|
private setOptionPrices;
|
|
31
31
|
}
|
|
32
32
|
export declare enum IkasProductType {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeAutoObservable as t}from"mobx";import{IkasCategory as e}from"../category/index.js";import{IkasProductVariant as
|
|
1
|
+
import{makeAutoObservable as t}from"mobx";import{IkasCategory as e}from"../category/index.js";import{IkasProductVariant as i}from"./variant/index.js";import{IkasProductAttributeValue as r}from"./attribute-value/index.js";import{IkasProductVariantType as n}from"./variant-type/index.js";import{IkasBrand as o}from"../brand/index.js";import{IkasHTMLMetaData as a}from"../html-meta-data/index.js";import{IkasProductTag as s}from"../product-tag/index.js";import{IkasProductOptionSet as p}from"../product-option-set/index.js";var c,u=function(){function u(u){void 0===u&&(u={}),this.id=u.id||Date.now()+"",this.name=u.name||"",this.type=u.type||c.PHYSICAL,this.description=u.description||"",this.shortDescription=u.shortDescription||"",this.metaData=u.metaData?new a(u.metaData):void 0,this.brand=u.brand?new o(u.brand):null,this.categories=u.categories?u.categories.map((function(t){return new e(t)})):[],this.tags=u.tags?u.tags.map((function(t){return new s(t)})):[],this.variants=u.variants?u.variants.map((function(t){return new i(t)})):[],this.attributes=u.attributes?u.attributes.map((function(t){return new r(t)})):[],this.variantTypes=u.variantTypes?u.variantTypes.map((function(t){return new n(t)})):[],this.productOptionSetId=u.productOptionSetId||null,this.productOptionSet=u.productOptionSet?new p(u.productOptionSet):null,this.setOptionPrices(),t(this)}return Object.defineProperty(u.prototype,"hasVariant",{get:function(){return!!this.variantTypes.length},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"hasStock",{get:function(){return this.variants.some((function(t){return t.stock>0}))},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"hasValidProductOptionValues",{get:function(){return!this.productOptionSetId||!!this.productOptionSet&&this.productOptionSet.displayedOptions.every((function(t){return t.hasValidValues}))},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"mainVariantType",{get:function(){if(this.hasVariant)return this.variantTypes[0].variantType},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"href",{get:function(){var t;return(null===(t=this.metaData)||void 0===t?void 0:t.slug)?"/".concat(this.metaData.slug):""},enumerable:!1,configurable:!0}),u.prototype.setOptionPrices=function(){var t,e=this.variants[0];if(e){var i=e.price.currency;null===(t=this.productOptionSet)||void 0===t||t.options.forEach((function(t){var e;t.selectSettings&&t.selectSettings.values.forEach((function(t){var e;t.otherPrices&&(t.price=(null===(e=t.otherPrices.find((function(t){return t.currencyCode===i})))||void 0===e?void 0:e.price)||t.price)})),t.otherPrices&&(t.price=(null===(e=t.otherPrices.find((function(t){return t.currencyCode===i})))||void 0===e?void 0:e.price)||t.price)}))}},u}();!function(t){t.PHYSICAL="PHYSICAL",t.DIGITAL="DIGITAL",t.MEMBERSHIP="MEMBERSHIP"}(c||(c={}));export{u as IkasProduct,c as IkasProductType};
|
|
@@ -15,6 +15,7 @@ export declare class IkasProductVariant {
|
|
|
15
15
|
isActive: boolean;
|
|
16
16
|
productId: string;
|
|
17
17
|
campaigns: IkasProductCampaign[];
|
|
18
|
+
sellIfOutOfStock: boolean;
|
|
18
19
|
private _backInStockReminderSaved;
|
|
19
20
|
constructor(data?: Partial<IkasProductVariant>);
|
|
20
21
|
get mainImage(): IkasImage | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as i,__generator as t}from'../../../../ext/tslib/tslib.es6.js';import{makeAutoObservable as e}from"mobx";import{IkasProductPrice as r}from"./price/index.js";import{IkasVariantValue as o}from"../../variant-type/variant-value/index.js";import{IkasProductAttributeValue as n}from"../attribute-value/index.js";import{IkasImage as s}from"../../image/index.js";import{IkasStorefrontConfig as a}from"../../../../storefront/index.js";import"../../../../api/blog/index.js";import"../../../../api/brand/index.js";import"../../../../api/cart/index.js";import"../../../../api/category/index.js";import"../../../../api/checkout/index.js";import"../../../../api/city/index.js";import"../../../../api/country/index.js";import"../../../../api/customer/index.js";import"../../../../api/customer-review/index.js";import"../../../../api/
|
|
1
|
+
import{__awaiter as i,__generator as t}from'../../../../ext/tslib/tslib.es6.js';import{makeAutoObservable as e}from"mobx";import{IkasProductPrice as r}from"./price/index.js";import{IkasVariantValue as o}from"../../variant-type/variant-value/index.js";import{IkasProductAttributeValue as n}from"../attribute-value/index.js";import{IkasImage as s}from"../../image/index.js";import{IkasStorefrontConfig as a}from"../../../../storefront/index.js";import"../../../../api/blog/index.js";import"../../../../api/brand/index.js";import"../../../../api/cart/index.js";import"../../../../api/category/index.js";import"../../../../api/checkout/index.js";import"../../../../api/city/index.js";import"../../../../api/country/index.js";import"../../../../api/customer/index.js";import"../../../../api/customer-review/index.js";import"../../../../api/district/index.js";import"../../../../api/html-meta-data/index.js";import"../../../../api/merchant/index.js";import"../../../../api/product-search/index.js";import"../../blog/index.js";import"../../brand/index.js";import"../../category/index.js";import"../../checkout/index.js";import"../../customer/address/index.js";import"../../customer/index.js";import"../../customer-review/index.js";import"../../html-meta-data/index.js";import"../../installment-info/index.js";import"../../order/index.js";import"../../order/line-item/index.js";import"../../../../api/product-option-file/index.js";import"../index.js";import"../../variant-type/index.js";import"../../product-attribute/index.js";import"../../product-filter/index.js";import"../../order-transaction/index.js";import"../../product-option-set/index.js";import"../../raffle/index.js";import"../../product-campaing/campaign/index.js";import"../../../theme/theme.js";import"../../../theme/page/index.js";import"../../../theme/component/prop/index.js";import"../../../theme/page/component/prop-value/link.js";import"../../../ui/brand-list/index.js";import"../../../ui/blog-list/index.js";import"../../../ui/blog-category-list/index.js";import"../../../ui/category-list/index.js";import"../../../ui/product-detail/index.js";import"../../../ui/product-list/index.js";import"../../../ui/product-attribute-detail/index.js";import"../../../ui/product-attribute-list/index.js";import"../../../ui/customer-review-list/index.js";import"../../../ui/validator/index.js";import"../../../ui/validator/rules/index.js";import"../../../ui/validator/form/login.js";import"../../../ui/validator/form/address.js";import"../../../ui/validator/form/register.js";import"../../../ui/validator/form/contact-form.js";import"../../../ui/validator/form/forgot-password.js";import"../../../ui/validator/form/recover-password.js";import"../../../ui/validator/form/account-info.js";import"../../../ui/validator/form/raffle-form.js";import"../../../ui/validator/form/customer-review.js";import"../../../ui/raffle-list/index.js";import"../../../theme/settings/index.js";import"../../../theme/custom-data/index.js";import"../../../../api/apollo.js";import"../../../../api/favorite-product/index.js";import"../../../../api/contact-form/index.js";import"../../../../api/state/index.js";import"../../../../api/product-option-set/index.js";import"../../../../api/raffle/index.js";import{IkasProductBackInStockReminderAPI as p}from"../../../../api/back-in-stock-reminder/index.js";import"../../../../api/product-campaign/index.js";var d=function(){function d(i){void 0===i&&(i={}),this.campaigns=[],this._backInStockReminderSaved=!1,this.id=i.id||Date.now()+"",this.productId=i.productId||"",this.sku=i.sku||null,this.barcodeList=i.barcodeList||[],this.variantValues=i.variantValues?i.variantValues.map((function(i){return new o(i)})):[],this.images=i.images?i.images.map((function(i){return new s(i.id)})):[],this.attributes=i.attributes?i.attributes.map((function(i){return new n(i)})):[],this.price=i.price?new r(i.price):new r,this.stock=i.stock||0,this.isActive=void 0===i.isActive||i.isActive,this.campaigns=i.campaigns||[],this.sellIfOutOfStock=i.sellIfOutOfStock||!1,e(this)}return Object.defineProperty(d.prototype,"mainImage",{get:function(){return this.images.length?this.images[0]:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"hasStock",{get:function(){return this.stock>0},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isBackInStockEnabled",{get:function(){return null!==a.productBackInStockSettings},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isBackInStockCustomerLoginRequired",{get:function(){return a.productBackInStockSettings&&a.productBackInStockSettings.customerLoginRequired},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isBackInStockReminderSaved",{get:function(){return this._backInStockReminderSaved},enumerable:!1,configurable:!0}),d.prototype.saveBackInStockReminder=function(e){return i(this,void 0,void 0,(function(){var i;return t(this,(function(t){switch(t.label){case 0:return[4,p.list({email:e,productId:this.productId,variantId:this.id})];case 1:return(i=t.sent())&&i.data.length?(this._backInStockReminderSaved=!0,[2,!1]):[3,2];case 2:return[4,p.save({email:e,productId:this.productId,variantId:this.id})];case 3:return t.sent()?(this._backInStockReminderSaved=!0,[2,!0]):(this._backInStockReminderSaved=!1,[2,!1]);case 4:return[2]}}))}))},d}();export{d as IkasProductVariant};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeAutoObservable as a}from"mobx";import{IkasVariantType as
|
|
1
|
+
import{makeAutoObservable as a}from"mobx";import{IkasVariantType as i}from"../../variant-type/index.js";var t=function(t){var r=this;this.variantType=t.variantType?new i(t.variantType):new i,this.variantValueIds=t.variantValueIds||[];var n=[];this.variantValueIds.forEach((function(a){var i=r.variantType.values.find((function(i){return i.id===a}));i&&n.push(i)})),this.variantType.values=n,a(this)};export{t as IkasProductVariantType};
|
|
@@ -60,7 +60,6 @@ export declare class IkasProductFilterSettings {
|
|
|
60
60
|
showCollapsedOnDesktop: boolean;
|
|
61
61
|
showCollapsedOnMobile: boolean;
|
|
62
62
|
sortType: IkasProductFilterSortType;
|
|
63
|
-
customSortedValues: string[] | null;
|
|
64
63
|
constructor(data: Partial<IkasProductFilterSettings>);
|
|
65
64
|
}
|
|
66
65
|
export declare type IkasProductFacetInput = {
|
|
@@ -89,8 +88,7 @@ export declare enum IkasProductFilterSortType {
|
|
|
89
88
|
ALPHABETICAL_ASC = "ALPHABETICAL_ASC",
|
|
90
89
|
ALPHABETICAL_DESC = "ALPHABETICAL_DESC",
|
|
91
90
|
PRODUCT_COUNT_ASC = "PRODUCT_COUNT_ASC",
|
|
92
|
-
PRODUCT_COUNT_DESC = "PRODUCT_COUNT_DESC"
|
|
93
|
-
CUSTOM_SORT = "CUSTOM_SORT"
|
|
91
|
+
PRODUCT_COUNT_DESC = "PRODUCT_COUNT_DESC"
|
|
94
92
|
}
|
|
95
93
|
export declare enum IkasProductStockFilterValue {
|
|
96
94
|
IN_STOCK = "in-stock",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as t}from'../../../ext/tslib/tslib.es6.js';import{makeAutoObservable as e}from"mobx";import{IkasImage as i}from"../image/index.js";import n from'../../../ext/lodash/sortBy.js';import s from'../../../ext/lodash/cloneDeep.js';var o,u,
|
|
1
|
+
import{__assign as t}from'../../../ext/tslib/tslib.es6.js';import{makeAutoObservable as e}from"mobx";import{IkasImage as i}from"../image/index.js";import n from'../../../ext/lodash/sortBy.js';import s from'../../../ext/lodash/cloneDeep.js';var o,r,u,l,a=function(){function i(i,n){if(void 0===i&&(i={}),this.values=null,this.customValues=null,this.settings=null,this._numberRange=null,this.numberRangeLimit=null,this.numberRangeListOptions=null,this.productList=null,this.id=i.id||"",this.key=i.key||"",this.name=i.name||"",this.order=i.order||0,this.type=i.type||o.BRAND,this.displayType=i.displayType||r.BOX,this.isMultiSelect=i.isMultiSelect||!1,this.isFacetFilter=i.isFacetFilter||!1,this.values=i.values?i.values.map((function(t){return new c(t)})):null,this.customValues=i.customValues||null,this.settings=i.settings?new d(i.settings):null,this.displayType===r.NUMBER_RANGE_LIST&&this.customValues&&this.customValues.length&&(this.numberRangeListOptions=this.customValues.map((function(e){return new m(t(t({key:e},f(e)),{isSelected:!1}))}))),this.displayType===r.NUMBER_RANGE&&this.customValues&&this.customValues.length){var s=this.customValues[0];this.numberRangeLimit=f(s)}this.productList=n,e(this)}return Object.defineProperty(i.prototype,"isCustomValueFilter",{get:function(){return[r.NUMBER_RANGE_LIST,r.NUMBER_RANGE].includes(this.displayType)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"isStockFilter",{get:function(){return this.type===o.STOCK_STATUS},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"valueList",{get:function(){var t,e=this;return this._numberRange?[this.rangeToId(this._numberRange)]:this.numberRangeListOptions?this.numberRangeListOptions.filter((function(t){return t.isSelected})).map((function(t){return e.rangeToId(t)})):(null===(t=this.values)||void 0===t?void 0:t.filter((function(t){return t.isSelected})).map((function(t){return t.id})))||[]},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"keyList",{get:function(){var t,e=this;return this._numberRange?[this.rangeToId(this._numberRange)]:this.numberRangeListOptions?this.numberRangeListOptions.filter((function(t){return t.isSelected})).map((function(t){return e.rangeToId(t)})):(null===(t=this.values)||void 0===t?void 0:t.filter((function(t){return t.isSelected})).map((function(t){return t.key})))||[]},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"displayedValues",{get:function(){var t,e,i=(null===(t=this.settings)||void 0===t?void 0:t.sortType)||u.ALPHABETICAL_ASC,s=[u.ALPHABETICAL_DESC,u.PRODUCT_COUNT_DESC].includes(i),o=[u.ALPHABETICAL_ASC,u.ALPHABETICAL_DESC].includes(i),r=null===(e=this.values)||void 0===e?void 0:e.filter((function(t){return 0!==t.resultCount||t.isSelected}));return r=n(r,o?"name":"resultCount"),s&&(r=null==r?void 0:r.reverse()),r},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"numberRange",{get:function(){return this._numberRange},enumerable:!1,configurable:!0}),i.prototype.onFilterValueClick=function(t){var e,i;if(this.isCustomValueFilter)throw new Error("onFilterValueClick cannot be used with NUMBER_RANGE | NUMBER_RANGE_LIST types!");t._isSelected=!t.isSelected,!this.isMultiSelect&&t.isSelected&&(null===(e=this.values)||void 0===e||e.forEach((function(e){e.id!==t.id&&(e._isSelected=!1)}))),null===(i=this.productList)||void 0===i||i.applyFilters()},i.prototype.onNumberRangeClick=function(t){var e,i;if(this.displayType!==r.NUMBER_RANGE_LIST)throw new Error("onNumberRangeClick can only be used with NUMBER_RANGE filters!");t._isSelected=!t.isSelected,!this.isMultiSelect&&t.isSelected&&(null===(e=this.numberRangeListOptions)||void 0===e||e.forEach((function(e){e.key!==t.key&&(e._isSelected=!1)}))),null===(i=this.productList)||void 0===i||i.applyFilters()},i.prototype.onNumberRangeChange=function(t){var e,i,n;if(this.displayType!==r.NUMBER_RANGE)throw new Error("onNumberRangeChange can only be used with NUMBER_RANGE filters!");if(!t)return this._numberRange=null,void(null===(e=this.productList)||void 0===e||e.applyFilters());var o=new p(s(t));o.from<this.numberRangeLimit.from&&(o.from=this._numberRange.from),o.to&&(null===(i=this.numberRangeLimit)||void 0===i?void 0:i.to)&&o.to>this.numberRangeLimit.to&&(o.to=this.numberRangeLimit.to),this._numberRange=o,null===(n=this.productList)||void 0===n||n.applyFilters()},i.prototype.clear=function(){var t,e;this._numberRange=null,null===(t=this.numberRangeListOptions)||void 0===t||t.forEach((function(t){return t._isSelected=!1})),null===(e=this.values)||void 0===e||e.forEach((function(t){return t._isSelected=!1}))},i.prototype.toInput=function(){var t;return{id:this.key,type:this.type,valueList:this.valueList,useAndFilter:null===(t=this.settings)||void 0===t?void 0:t.useAndFilter}},i.prototype.toJSON=function(){var e=t({},this);return delete e.productList,e},i.prototype.applyQueryParam=function(t){var e,i,n=t.split(",");this.displayType===r.NUMBER_RANGE?this._numberRange=new p(f(t)):this.displayType===r.NUMBER_RANGE_LIST?null===(e=this.numberRangeListOptions)||void 0===e||e.forEach((function(t){n.includes(t.key)&&(t._isSelected=!0)})):null===(i=this.values)||void 0===i||i.forEach((function(t){n.includes(t.key)&&0!==t.resultCount&&(t._isSelected=!0)}))},i.prototype.rangeToId=function(t){return"".concat(t.from,":").concat(t.to||"")},i}(),c=function(){function n(t){void 0===t&&(t={}),this.colorCode=null,this.thumbnailImageId=null,this.thumbnailImage=null,this.resultCount=null,this._isSelected=!1,this.id=t.id||"",this.key=t.key||"",this.name=t.name||"",this.colorCode=t.colorCode||null,this.thumbnailImageId=t.thumbnailImageId||null,this.thumbnailImageId&&(this.thumbnailImage=new i(this.thumbnailImageId)),this._isSelected=t.isSelected||!1,this.resultCount=void 0!==t.resultCount&&null!==t.resultCount?t.resultCount:null,e(this)}return Object.defineProperty(n.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),n.prototype.toJSON=function(){return t(t({},this),{isSelected:this._isSelected})},n}(),h=function(t){this.id=t.id,this.type=t.type,this.displayType=t.displayType,this.valueList=t.valueList,e(this)},d=function(t){this.useAndFilter=null,this.useAndFilter=t.useAndFilter||!1,this.showCollapsedOnDesktop=t.showCollapsedOnDesktop||!1,this.showCollapsedOnMobile=t.showCollapsedOnMobile||!1,this.sortType=t.sortType||u.ALPHABETICAL_ASC,e(this)};!function(t){t.ATTRIBUTE="ATTRIBUTE",t.BRAND="BRAND",t.DISCOUNT_RATIO="DISCOUNT_RATIO",t.PRICE="PRICE",t.STOCK_STATUS="STOCK_STATUS",t.TAG="TAG",t.VARIANT_TYPE="VARIANT_TYPE"}(o||(o={})),function(t){t.BOX="BOX",t.DATE_RANGE="DATE_RANGE",t.LIST="LIST",t.NUMBER_RANGE_LIST="NUMBER_RANGE_LIST",t.NUMBER_RANGE="NUMBER_RANGE",t.SWATCH="SWATCH"}(r||(r={})),function(t){t.ALPHABETICAL_ASC="ALPHABETICAL_ASC",t.ALPHABETICAL_DESC="ALPHABETICAL_DESC",t.PRODUCT_COUNT_ASC="PRODUCT_COUNT_ASC",t.PRODUCT_COUNT_DESC="PRODUCT_COUNT_DESC"}(u||(u={})),function(t){t.IN_STOCK="in-stock",t.OUT_OF_STOCK="out-of-stock"}(l||(l={}));var p=function(t){this.from=t.from||0,this.to=t.to||null,e(this)},m=function(){function i(t){this.from=t.from||0,this.to=t.to||null,this.key=t.key||"",this._isSelected=t.isSelected||!1,e(this)}return Object.defineProperty(i.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),i.prototype.toJSON=function(){return t(t({},this),{isSelected:this._isSelected})},i}();function f(t){try{var e=t.split(":").map((function(t){return parseInt(t)}));return new p({from:isNaN(e[0])?0:e[0],to:isNaN(e[1])?void 0:e[1]})}catch(t){return console.log(t),new p({from:0,to:0})}}export{c as IkasApplicableProductFilterValue,a as IkasProductFilter,r as IkasProductFilterDisplayType,d as IkasProductFilterSettings,u as IkasProductFilterSortType,o as IkasProductFilterType,h as IkasProductFilterValue,l as IkasProductStockFilterValue,p as RangeValue,f as parseRangeStr};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as e,__assign as i}from'../../../ext/tslib/tslib.es6.js';import{makeAutoObservable as n}from"mobx";import{IkasImage as l}from"../image/index.js";import{IkasStorefrontConfig as s}from"../../../storefront/index.js";import a from'../../../ext/lodash/sortBy.js';var o,u;!function(t){t.CHOICE="CHOICE",t.TEXT="TEXT",t.TEXT_AREA="TEXT_AREA",t.FILE="FILE",t.COLOR_PICKER="COLOR_PICKER",t.DATE_PICKER="DATE_PICKER",t.CHECKBOX="CHECKBOX"}(o||(o={})),function(t){t.SELECT="SELECT",t.BOX="BOX",t.SWATCH="SWATCH"}(u||(u={}));var r=function(t){this.id=t.id||"",this.value=t.value||null,n(this)},h=function(t){var e;this.id=t.id||"",this.name=t.name||null,this.optionalText=t.optionalText||null,this.values=(null===(e=t.values)||void 0===e?void 0:e.map((function(t){return new r(t)})))||[],n(this)},d=function(t){var e;this.locale=t.locale||"",this.options=(null===(e=t.options)||void 0===e?void 0:e.map((function(t){return new h(t)})))||[],n(this)},c=function(t){void 0===t&&(t={}),this.otherPrices=null,this.thumbnailImage=null,this.id=t.id||"",this.order=t.order||0,this.value=t.value||"",this.price=t.price||null,this.otherPrices=t.otherPrices||null,this.thumbnailImageId=t.thumbnailImageId||null,this.colorCode=t.colorCode||null,this.thumbnailImage=this.thumbnailImageId?new l(this.thumbnailImageId):null,n(this)},p=function(t){var e;void 0===t&&(t={}),this.type=t.type||u.BOX,this.minSelect=null!==t.minSelect&&void 0!==t.minSelect?t.minSelect:null,this.maxSelect=null!==t.maxSelect&&void 0!==t.maxSelect?t.maxSelect:null,this.values=a((null===(e=t.values)||void 0===e?void 0:e.map((function(t){return new c(t)})))||[],"order"),n(this)},
|
|
1
|
+
import{__awaiter as t,__generator as e,__assign as i}from'../../../ext/tslib/tslib.es6.js';import{makeAutoObservable as n}from"mobx";import{IkasImage as l}from"../image/index.js";import{IkasStorefrontConfig as s}from"../../../storefront/index.js";import a from'../../../ext/lodash/sortBy.js';var o,u;!function(t){t.CHOICE="CHOICE",t.TEXT="TEXT",t.TEXT_AREA="TEXT_AREA",t.FILE="FILE",t.COLOR_PICKER="COLOR_PICKER",t.DATE_PICKER="DATE_PICKER",t.CHECKBOX="CHECKBOX"}(o||(o={})),function(t){t.SELECT="SELECT",t.BOX="BOX",t.SWATCH="SWATCH"}(u||(u={}));var r=function(t){this.id=t.id||"",this.value=t.value||null,n(this)},h=function(t){var e;this.id=t.id||"",this.name=t.name||null,this.optionalText=t.optionalText||null,this.values=(null===(e=t.values)||void 0===e?void 0:e.map((function(t){return new r(t)})))||[],n(this)},d=function(t){var e;this.locale=t.locale||"",this.options=(null===(e=t.options)||void 0===e?void 0:e.map((function(t){return new h(t)})))||[],n(this)},c=function(t){void 0===t&&(t={}),this.otherPrices=null,this.thumbnailImage=null,this.id=t.id||"",this.order=t.order||0,this.value=t.value||"",this.price=t.price||null,this.otherPrices=t.otherPrices||null,this.thumbnailImageId=t.thumbnailImageId||null,this.colorCode=t.colorCode||null,this.thumbnailImage=this.thumbnailImageId?new l(this.thumbnailImageId):null,n(this)},p=function(t){var e;void 0===t&&(t={}),this.type=t.type||u.BOX,this.minSelect=null!==t.minSelect&&void 0!==t.minSelect?t.minSelect:null,this.maxSelect=null!==t.maxSelect&&void 0!==t.maxSelect?t.maxSelect:null,this.values=a((null===(e=t.values)||void 0===e?void 0:e.map((function(t){return new c(t)})))||[],"order"),n(this)},f=function(t){this.min=t.min||null,this.max=t.max||null,this.minRelativeNextDate=t.minRelativeNextDate||null,this.maxRelativeNextDate=t.maxRelativeNextDate||null,n(this)},m=function(t){void 0===t&&(t={}),this.min=null!==t.min&&void 0!==t.min?t.min:null,this.max=null!==t.max&&void 0!==t.max?t.max:null,n(this)},v=function(t){this.allowedExtensions=t.allowedExtensions||null,this.minQuantity=null!==t.minQuantity&&void 0!==t.minQuantity?t.minQuantity:null,this.maxQuantity=null!==t.maxQuantity&&void 0!==t.maxQuantity?t.maxQuantity:null,n(this)},g=function(){function i(i){var l=this;this._values=[],this.childOptions=[],this.productOptionFileUpload=function(i){return t(l,void 0,void 0,(function(){var n,l,a=this;return e(this,(function(o){switch(o.label){case 0:return 0===i.length||this.fileSettings&&this.fileSettings.maxQuantity&&this.fileSettings.maxQuantity<i.length?[2,[]]:(n="".concat(process.env.NEXT_PUBLIC_BASE_URL,"/admin/upload-product-option-file"),l=function(i){return t(a,void 0,void 0,(function(){var t,l,a,o,u,r,h;return e(this,(function(e){switch(e.label){case 0:return l=fetch,a=[n],r={method:"POST",headers:{"x-api-key":s.config.apiKey||"","x-sfid":s.storefrontId||"","x-sfrid":s.storefrontRoutingId||"","Content-Type":"application/json",Accept:"application/json"}},u=(o=JSON).stringify,h={productOptionSetId:this.productOptionSetId,productOptionId:this.id},[4,this.getBase64(i)];case 1:return[4,l.apply(void 0,a.concat([(r.body=u.apply(o,[(h.base64=e.sent(),h.fileName=i.name,h)]),r)]))];case 2:return(t=e.sent()).ok?[4,t.text()]:[2,null];case 3:return[2,e.sent()]}}))}))},[4,Promise.all(i.map((function(t){return l(t)})))]);case 1:return[2,o.sent().filter((function(t){return null!==t}))]}}))}))},this.initValues=function(){l.isOptional||(l.values=[],l.childOptions&&l.childOptions.forEach((function(t){return t.initValues()})))},this.isValidTextOptionValue=function(){var t=l.values[0];return t?!!l.textSettings&&(null===l.textSettings.min||t.length>=l.textSettings.min)&&(null===l.textSettings.max||t.length<=l.textSettings.max):!!l.isOptional},this.isValidChoiceOptionValue=function(){return l.values.length?!!l.selectSettings&&(null===l.selectSettings.minSelect||l.values.length>=l.selectSettings.minSelect)&&(null===l.selectSettings.maxSelect||l.values.length<=l.selectSettings.maxSelect):!!l.isOptional},this.isValidFileOptionValue=function(){return l.values.length?!!l.fileSettings&&(null===l.fileSettings.minQuantity||l.values.length>=l.fileSettings.minQuantity)&&(null===l.fileSettings.maxQuantity||l.values.length<=l.fileSettings.maxQuantity):!!l.isOptional},this.isValidDateOptionValue=function(){if(!l.values.length)return!!l.isOptional;if(l.dateSettings){var t=null,e=null;null!==l.dateSettings.minRelativeNextDate&&(t=new Date,t=l.dateSettings.minRelativeNextDate<0?new Date(t.setDate(t.getDate()-Math.abs(l.dateSettings.minRelativeNextDate))):new Date(t.setDate(t.getDate()+Math.abs(l.dateSettings.minRelativeNextDate))),t=new Date(t.setHours(23,59,59))),null!==l.dateSettings.maxRelativeNextDate&&(e=new Date,e=l.dateSettings.maxRelativeNextDate<0?new Date(e.setDate(e.getDate()-Math.abs(l.dateSettings.maxRelativeNextDate))):new Date(e.setDate(e.getDate()+Math.abs(l.dateSettings.maxRelativeNextDate))),e=new Date(e.setHours(23,59,59)));var i=new Date(new Date(l.values[0]).setHours(23,59,59));return(!t||i.getTime()>=t.getTime())&&(!e||i.getTime()<=e.getTime())}return!0},this.id=i.id||"",this.productOptionSetId=i.productOptionSetId||"",this.name=i.name||"",this.order=i.order||0,this.type=i.type||o.CHOICE,this.selectSettings=i.selectSettings?new p(i.selectSettings||{}):null,this.textSettings=i.textSettings?new m(i.textSettings||{}):null,this.fileSettings=i.fileSettings?new v(i.fileSettings||{}):null,this.dateSettings=i.dateSettings?new f(i.dateSettings||{}):null,this.price=i.price||null,this.otherPrices=i.otherPrices||null,this.isOptional=i.isOptional||!1,this.optionalText=i.optionalText||null,this.requiredOptionId=i.requiredOptionId||null,this.requiredOptionValueIds=i.requiredOptionValueIds||null,this.values=i.values||[],this.childOptions=i.childOptions||[],n(this)}return Object.defineProperty(i.prototype,"displayedChildOptions",{get:function(){var t=this;return a(this.childOptions.filter((function(e){var i;return(null===(i=e.requiredOptionValueIds)||void 0===i?void 0:i.length)?e.requiredOptionValueIds.every((function(e){return t.values.some((function(t){return t===e}))})):t.type===o.CHECKBOX?!!t.values.length&&"true"===t.values[0]:!!t.values.length})),"order")},enumerable:!1,configurable:!0}),i.prototype.getBase64=function(t){return new Promise((function(e){var i=new FileReader;i.addEventListener("load",(function(){return e(i.result)})),i.readAsDataURL(t)}))},Object.defineProperty(i.prototype,"hasValidValues",{get:function(){if(!this.values.length&&!this.isOptional)return!1;var t=!1;switch(this.type){case o.TEXT:case o.TEXT_AREA:t=this.isValidTextOptionValue();break;case o.CHECKBOX:case o.COLOR_PICKER:t=!0;break;case o.CHOICE:t=this.isValidChoiceOptionValue();break;case o.DATE_PICKER:t=this.isValidDateOptionValue();break;case o.FILE:t=this.isValidFileOptionValue()}return t&&this.displayedChildOptions.every((function(t){return t.hasValidValues}))},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"values",{get:function(){return this._values},set:function(t){this._values=t,t.length||this.childOptions.forEach((function(t){return t.values=[]}))},enumerable:!1,configurable:!0}),i}(),O=function(){function l(l){var s,a,o=this;this.initOptionValues=function(){return t(o,void 0,void 0,(function(){return e(this,(function(t){return this.options.forEach((function(t){return t.initValues()})),[2]}))}))},this.id=l.id||"",this.name=l.name||"",this.options=(null===(s=l.options)||void 0===s?void 0:s.map((function(t){return new g(i(i({},t),{productOptionSetId:o.id}))})))||[],this.translations=l.translations?null===(a=l.translations)||void 0===a?void 0:a.map((function(t){return new d(t)})):null,this.setChildOptions(),this.setTranslations(),this.initOptionValues(),n(this)}return Object.defineProperty(l.prototype,"displayedOptions",{get:function(){return a(this.options.filter((function(t){return!t.requiredOptionId})),"order")},enumerable:!1,configurable:!0}),l.prototype.setTranslations=function(){var t,e=this,i=s.getCurrentLocale();if(this.translations&&this.translations.some((function(t){return t.locale===i}))){var n=this.translations.find((function(t){return t.locale===i}));null===(t=null==n?void 0:n.options)||void 0===t||t.forEach((function(t){var i,n=e.options.find((function(e){return e.id===t.id}));n&&(n.name=t.name||n.name,n.optionalText=t.optionalText||n.optionalText,n.type===o.CHOICE&&(null===(i=t.values)||void 0===i||i.forEach((function(t){var e,i=null===(e=n.selectSettings)||void 0===e?void 0:e.values.find((function(e){return e.id===t.id}));i&&(i.value=t.value||i.value)}))))}))}},l.prototype.setChildOptions=function(){var t=this;this.options.forEach((function(e){var i=t.options.filter((function(t){return t.requiredOptionId===e.id}));i.length&&(e.childOptions=i)}))},l}();export{g as IkasProductOption,f as IkasProductOptionDateSettings,v as IkasProductOptionFileSettings,p as IkasProductOptionSelectSettings,u as IkasProductOptionSelectType,c as IkasProductOptionSelectValue,r as IkasProductOptionSelectValueTranslations,O as IkasProductOptionSet,d as IkasProductOptionSetTranslations,m as IkasProductOptionTextSettings,h as IkasProductOptionTranslations,o as IkasProductOptionType};
|
|
@@ -16,11 +16,13 @@ export declare class IkasRaffle {
|
|
|
16
16
|
dateRange: RaffleDateRangeField | null;
|
|
17
17
|
metadata: IkasRaffleMetaData | null;
|
|
18
18
|
name: string;
|
|
19
|
+
participantCount?: number | null;
|
|
19
20
|
requiredCustomerAccount: boolean;
|
|
20
21
|
status: boolean;
|
|
21
22
|
variants: IkasRaffleAppliedProduct[] | null;
|
|
22
23
|
products: IkasProductDetail[];
|
|
23
24
|
verificationType: IkasRaffleVerificationTypeEnum;
|
|
25
|
+
isCustomerWinner?: boolean;
|
|
24
26
|
constructor(data?: Partial<IkasRaffle>);
|
|
25
27
|
get isRaffleAvailable(): boolean | 0 | null | undefined;
|
|
26
28
|
}
|
|
@@ -37,16 +39,8 @@ export declare class IkasRaffleMetaData {
|
|
|
37
39
|
slug: string;
|
|
38
40
|
targetId: string | null;
|
|
39
41
|
targetType: IkasRaffleMetadataTargetType | null;
|
|
40
|
-
canonicals?: string[] | null;
|
|
41
|
-
disableIndex?: boolean | null;
|
|
42
42
|
constructor(data: Partial<IkasRaffleMetaData>);
|
|
43
43
|
}
|
|
44
|
-
export declare enum RaffleParticipantStatusEnum {
|
|
45
|
-
COMPLETED = "COMPLETED",
|
|
46
|
-
IN_PROGRESS = "IN_PROGRESS",
|
|
47
|
-
LOSER = "LOSER",
|
|
48
|
-
WINNER = "WINNER"
|
|
49
|
-
}
|
|
50
44
|
export declare class IkasRaffleParticipant {
|
|
51
45
|
id?: string | null;
|
|
52
46
|
createdAt?: number | null;
|
|
@@ -60,15 +54,13 @@ export declare class IkasRaffleParticipant {
|
|
|
60
54
|
email: string;
|
|
61
55
|
applicationDate?: number;
|
|
62
56
|
phone?: string | null;
|
|
63
|
-
|
|
64
|
-
status: RaffleParticipantStatusEnum | null;
|
|
65
|
-
isDeliveredCargo: boolean | null;
|
|
57
|
+
isWinner?: boolean | null;
|
|
66
58
|
extraData?: Record<string, any> | null;
|
|
67
59
|
appliedProduct: IkasRaffleAppliedProduct;
|
|
68
60
|
constructor(data: Partial<IkasRaffleParticipant>);
|
|
69
61
|
}
|
|
70
62
|
export declare class IkasRaffleAppliedProduct {
|
|
71
|
-
productId: string
|
|
63
|
+
productId: string;
|
|
72
64
|
variantId: string;
|
|
73
65
|
constructor(data: Partial<IkasRaffleAppliedProduct>);
|
|
74
66
|
}
|