@ikas/storefront 2.0.32 → 2.0.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/build/_virtual/index.js_commonjs-proxy3.js +1 -1
  2. package/build/_virtual/index.js_commonjs-proxy4.js +1 -1
  3. package/build/analytics/analytics.js +1 -1
  4. package/build/analytics/googleTagManager.js +1 -1
  5. package/build/analytics/ikas.js +1 -1
  6. package/build/api/brand/index.js +1 -1
  7. package/build/api/category/index.js +1 -1
  8. package/build/api/checkout/index.js +1 -1
  9. package/build/api/customer/__generated__/createOrderRefundRequest.d.ts +1 -1
  10. package/build/api/customer/index.js +1 -1
  11. package/build/api/customer-review/index.js +1 -1
  12. package/build/api/customer-review-summary/__generated__/listCustomerReviewSummary.d.ts +56 -0
  13. package/build/api/customer-review-summary/index.d.ts +22 -0
  14. package/build/api/customer-review-summary/index.js +1 -0
  15. package/build/api/favorite-product/index.js +1 -1
  16. package/build/api/html-meta-data/index.js +1 -1
  17. package/build/api/index.d.ts +1 -0
  18. package/build/api/merchant/index.js +1 -1
  19. package/build/api/product-search/index.js +1 -1
  20. package/build/components/checkout/components/address-form/model.js +1 -1
  21. package/build/components/checkout/components/cart-summary/cart-item/index.js +1 -1
  22. package/build/components/checkout/components/credit-card-form/index.js +1 -1
  23. package/build/components/checkout/components/customer-addresses/model.js +1 -1
  24. package/build/components/checkout/index.js +1 -1
  25. package/build/components/checkout/model.js +1 -1
  26. package/build/components/checkout/steps/step-success/index.js +1 -1
  27. package/build/components/page/head.js +1 -1
  28. package/build/components/page/index.js +1 -1
  29. package/build/components/page-editor/ThemeComponentEditor.js +1 -1
  30. package/build/components/page-editor/model.js +1 -1
  31. package/build/ikas.js +7 -7
  32. package/build/index.js +1 -1
  33. package/build/models/data/customer-review-summary/index.d.ts +16 -0
  34. package/build/models/data/customer-review-summary/index.js +1 -0
  35. package/build/models/data/index.d.ts +1 -0
  36. package/build/models/data/product/variant/index.js +1 -1
  37. package/build/models/data/storefront/theme-localization/index.js +1 -1
  38. package/build/models/theme/page/component/prop-value/product-list.js +1 -1
  39. package/build/models/ui/blog-category-list/index.js +1 -1
  40. package/build/models/ui/blog-list/index.js +1 -1
  41. package/build/models/ui/brand-list/index.js +1 -1
  42. package/build/models/ui/category-list/index.js +1 -1
  43. package/build/models/ui/customer-review-list/index.js +1 -1
  44. package/build/models/ui/customer-review-summary-list/index.d.ts +43 -0
  45. package/build/models/ui/customer-review-summary-list/index.js +1 -0
  46. package/build/models/ui/index.d.ts +1 -0
  47. package/build/models/ui/product-detail/index.d.ts +2 -1
  48. package/build/models/ui/product-detail/index.js +1 -1
  49. package/build/models/ui/product-list/index.js +1 -1
  50. package/build/models/ui/raffle-list/index.js +1 -1
  51. package/build/models/ui/validator/form/address.js +1 -1
  52. package/build/pages/404.js +1 -1
  53. package/build/pages/_slug_/index.js +1 -1
  54. package/build/pages/account/addresses.js +1 -1
  55. package/build/pages/account/favorite-products.js +1 -1
  56. package/build/pages/account/forgot-password.js +1 -1
  57. package/build/pages/account/index.js +1 -1
  58. package/build/pages/account/login.js +1 -1
  59. package/build/pages/account/orders/_id_.js +1 -1
  60. package/build/pages/account/orders/index.js +1 -1
  61. package/build/pages/account/raffles.js +1 -1
  62. package/build/pages/account/recover-password.js +1 -1
  63. package/build/pages/account/register.js +1 -1
  64. package/build/pages/blog/_slug_.js +1 -1
  65. package/build/pages/blog/index.js +1 -1
  66. package/build/pages/cart.js +1 -1
  67. package/build/pages/checkout.js +1 -1
  68. package/build/pages/home.js +1 -1
  69. package/build/pages/pages/_slug_.js +1 -1
  70. package/build/pages/raffle/_slug_.js +1 -1
  71. package/build/pages/raffle/index.js +1 -1
  72. package/build/pages/search.js +1 -1
  73. package/build/providers/helpers/raffles.js +1 -1
  74. package/build/providers/page-data-get.js +1 -1
  75. package/build/providers/page-data-init.js +1 -1
  76. package/build/providers/page-data-next.js +1 -1
  77. package/build/providers/placeholders.js +1 -1
  78. package/build/providers/prop-value/attribute-list.js +1 -1
  79. package/build/providers/prop-value/attribute.js +1 -1
  80. package/build/providers/prop-value/blog-category-list.js +1 -1
  81. package/build/providers/prop-value/blog-category.js +1 -1
  82. package/build/providers/prop-value/blog-list.js +1 -1
  83. package/build/providers/prop-value/blog.js +1 -1
  84. package/build/providers/prop-value/brand-list.js +1 -1
  85. package/build/providers/prop-value/brand.js +1 -1
  86. package/build/providers/prop-value/category-list.js +1 -1
  87. package/build/providers/prop-value/category.js +1 -1
  88. package/build/providers/prop-value/custom.js +1 -1
  89. package/build/providers/prop-value/image-list.js +1 -1
  90. package/build/providers/prop-value/image.js +1 -1
  91. package/build/providers/prop-value/link.js +1 -1
  92. package/build/providers/prop-value/product-detail.js +1 -1
  93. package/build/providers/prop-value/product-list.js +1 -1
  94. package/build/providers/prop-value/raffle-list.js +1 -1
  95. package/build/providers/prop-value/raffle.js +1 -1
  96. package/build/scripts/generators/types/index.js +1 -1
  97. package/build/store/base.js +1 -1
  98. package/build/store/cart.js +1 -1
  99. package/build/store/customer.js +1 -1
  100. package/package.json +1 -1
package/build/index.js CHANGED
@@ -1 +1 @@
1
- export{Image}from"./components/image/index.js";export{IkasEditorComponentLoader}from"./components/page-editor/loader/index.js";export{IkasBlog,IkasBlogCategory,IkasBlogContent,IkasBlogMetaData,IkasBlogMetadataTargetType,IkasBlogTag,IkasBlogWriter}from"./models/data/blog/index.js";export{IkasBrand}from"./models/data/brand/index.js";export{IkasCategory,IkasCategoryPath,IkasFilterCategory}from"./models/data/category/index.js";export{IkasCheckout,IkasCheckoutCustomer,IkasCheckoutRecoveryEmailStatus,IkasCheckoutRecoveryStatus,IkasCheckoutStatus,IkasPaymentMethod,IkasShippingMethod,IkasShippingMethodEnum}from"./models/data/checkout/index.js";export{IkasCustomerAddress}from"./models/data/customer/address/index.js";export{IkasCustomer}from"./models/data/customer/index.js";export{IkasCustomerReview}from"./models/data/customer-review/index.js";export{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,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{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 c from"./pages/editor.js";export{c as EditorPage};import*as x from"./pages/account/favorite-products.js";export{x as FavoriteProductsPage};import*as f from"./pages/search.js";export{f as SearchPage};import*as g from"./pages/404.js";export{g as NotFoundPage};import*as k from"./pages/blog/index.js";export{k as BlogPage};import*as I from"./pages/blog/_slug_.js";export{I as BlogSlugPage};import*as j from"./pages/raffle/_slug_.js";export{j as RafflePage};import*as P from"./pages/raffle/index.js";export{P as RafflesPage};import*as y from"./pages/account/raffles.js";export{y as AccountRafflesPage};export{APIGenerator}from"./scripts/generators/api/index.js";export{ComponentImportsGenerator}from"./scripts/generators/components/index.js";export{ConfigGenerator}from"./scripts/generators/config/index.js";export{PageGenerator}from"./scripts/generators/pages/index.js";export{StoreGenerator}from"./scripts/generators/store/index.js";export{ThemeJsonGenerator}from"./scripts/generators/theme/index.js";export{CustomDataTypesGenerator,PropTypeGenarator}from"./scripts/generators/types/index.js";export{IkasBaseStore}from"./store/base.js";export{IkasStorefrontConfig}from"./storefront/index.js";export{decodeBase64,findAllByKey,findAllIndexes,formatDate,pascalCase,sortObject,stringSorter,stringToSlug,tryForEach,validatePhoneNumber}from"./utils/helper.js";export{formatMoney,getCurrencySymbol}from"./utils/currency.js";export{createTranslationInputData,useTranslation}from"./utils/i18n.js";export{Analytics}from"./analytics/analytics.js";export{AnalyticsBody,AnalyticsHead}from"./analytics/head/index.js";
1
+ export{Image}from"./components/image/index.js";export{IkasEditorComponentLoader}from"./components/page-editor/loader/index.js";export{IkasBlog,IkasBlogCategory,IkasBlogContent,IkasBlogMetaData,IkasBlogMetadataTargetType,IkasBlogTag,IkasBlogWriter}from"./models/data/blog/index.js";export{IkasBrand}from"./models/data/brand/index.js";export{IkasCategory,IkasCategoryPath,IkasFilterCategory}from"./models/data/category/index.js";export{IkasCheckout,IkasCheckoutCustomer,IkasCheckoutRecoveryEmailStatus,IkasCheckoutRecoveryStatus,IkasCheckoutStatus,IkasPaymentMethod,IkasShippingMethod,IkasShippingMethodEnum}from"./models/data/checkout/index.js";export{IkasCustomerAddress}from"./models/data/customer/address/index.js";export{IkasCustomer}from"./models/data/customer/index.js";export{IkasCustomerReview}from"./models/data/customer-review/index.js";export{IkasCustomerReviewSummary}from"./models/data/customer-review-summary/index.js";export{IkasHTMLMetaData,IkasHTMLMetaDataTargetType}from"./models/data/html-meta-data/index.js";export{IkasImage}from"./models/data/image/index.js";export{IkasCardAssociation,IkasCardType}from"./models/data/installment-info/index.js";export{IkasMerchantSettings}from"./models/data/merchant-settings/index.js";export{IkasAmountTypeEnum,IkasOrder,IkasOrderCancelledReason,IkasOrderPackageFulfillStatus,IkasOrderPackageStatus,IkasOrderPaymentStatus,IkasOrderShippingMethod,IkasOrderStatus,OrderLineItemStatusEnum}from"./models/data/order/index.js";export{IkasOrderLineItem}from"./models/data/order/line-item/index.js";export{IkasOrderRefundSettings}from"./models/data/order/refund/settings.js";export{IkasOrderLineOptions}from"./models/data/order/line-item/options/index.js";export{IkasOrderLineOptionsValue}from"./models/data/order/line-item/options/options-value/index.js";export{IkasProduct,IkasProductType}from"./models/data/product/index.js";export{IkasProductVariantType}from"./models/data/product/variant-type/index.js";export{IkasProductVariant}from"./models/data/product/variant/index.js";export{IkasProductPrice}from"./models/data/product/variant/price/index.js";export{IkasProductAttribute,IkasProductAttributeType}from"./models/data/product-attribute/index.js";export{IkasProductAttributeValue}from"./models/data/product/attribute-value/index.js";export{IkasApplicableProductFilterValue,IkasProductFilter,IkasProductFilterDisplayType,IkasProductFilterSettings,IkasProductFilterSortType,IkasProductFilterType,IkasProductFilterValue,IkasProductStockFilterValue,RangeValue,parseRangeStr}from"./models/data/product-filter/index.js";export{IkasFavoriteProduct}from"./models/data/favorite-product/index.js";export{IkasContactForm}from"./models/data/contact-form/index.js";export{IkasVariantSelectionType,IkasVariantType}from"./models/data/variant-type/index.js";export{IkasVariantValue}from"./models/data/variant-type/variant-value/index.js";export{IkasOrderTransaction,IkasTransactionStatusEnum,IkasTransactionTypeEnum}from"./models/data/order-transaction/index.js";export{IkasProductOption,IkasProductOptionDateSettings,IkasProductOptionFileSettings,IkasProductOptionSelectSettings,IkasProductOptionSelectType,IkasProductOptionSelectValue,IkasProductOptionSelectValueTranslations,IkasProductOptionSet,IkasProductOptionSetTranslations,IkasProductOptionTextSettings,IkasProductOptionTranslations,IkasProductOptionType}from"./models/data/product-option-set/index.js";export{IkasRaffle,IkasRaffleMetaData,IkasRaffleParticipant}from"./models/data/raffle/index.js";export{IkasSlider}from"./models/data/slider/index.js";export{IkasProductCampaign}from"./models/data/product-campaing/index.js";export{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 r from"./pages/pages/_slug_.js";export{r as CustomPage};import*as t from"./pages/checkout.js";export{t 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 p from"./pages/account/login.js";export{p 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";
@@ -0,0 +1,16 @@
1
+ export declare class IkasCustomerReviewSummary {
2
+ averageStar: number;
3
+ createdAt: string;
4
+ deleted: boolean;
5
+ id: string;
6
+ productId: string;
7
+ stars: CustomerReviewSummaryStar[];
8
+ totalReview: number;
9
+ updatedAt: string;
10
+ constructor(data: Partial<IkasCustomerReviewSummary>);
11
+ }
12
+ declare type CustomerReviewSummaryStar = {
13
+ count: number;
14
+ star: number;
15
+ };
16
+ export {};
@@ -0,0 +1 @@
1
+ import{makeAutoObservable as t}from"mobx";var e=function(e){this.averageStar=e.averageStar||0,this.createdAt=e.createdAt||"",this.updatedAt=e.updatedAt||"",this.deleted=e.deleted||!1,this.id=e.id||"",this.productId=e.productId||"",this.stars=e.stars||[],this.totalReview=e.totalReview||0,t(this)};export{e as IkasCustomerReviewSummary};
@@ -7,6 +7,7 @@ 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";
10
11
  export type { IkasCountry } from "./country";
11
12
  export type { IkasDistrict } from "./district";
12
13
  export { IkasHTMLMetaData, IkasHTMLMetaDataTargetType } from "./html-meta-data";
@@ -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/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||[],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
+ 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/customer-review-summary/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/customer-review-summary-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 m=function(){function m(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||[],e(this)}return Object.defineProperty(m.prototype,"mainImage",{get:function(){return this.images.length?this.images[0]:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"hasStock",{get:function(){return this.stock>0},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"isBackInStockEnabled",{get:function(){return null!==a.productBackInStockSettings},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"isBackInStockCustomerLoginRequired",{get:function(){return a.productBackInStockSettings&&a.productBackInStockSettings.customerLoginRequired},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"isBackInStockReminderSaved",{get:function(){return this._backInStockReminderSaved},enumerable:!1,configurable:!0}),m.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]}}))}))},m}();export{m as IkasProductVariant};
@@ -1 +1 @@
1
- import{IkasTheme as i}from"../../../theme/theme.js";import"../../../theme/page/index.js";import"mobx";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";var t=function(t){this.id=t.id||"",this.locale=t.locale||"",this.storefrontId=t.storefrontId||"",this.storefrontThemeId=t.storefrontThemeId||"",this.themeJson=t.themeJson?new i(t.themeJson):new i,this.privacyPolicy=t.privacyPolicy||null,this.returnPolicy=t.returnPolicy||null,this.termsOfService=t.termsOfService||null};export{t as IkasStorefrontThemeLocalization};
1
+ import{IkasTheme as i}from"../../../theme/theme.js";import"../../../theme/page/index.js";import"mobx";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/customer-review-summary-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";var t=function(t){this.id=t.id||"",this.locale=t.locale||"",this.storefrontId=t.storefrontId||"",this.storefrontThemeId=t.storefrontThemeId||"",this.themeJson=t.themeJson?new i(t.themeJson):new i,this.privacyPolicy=t.privacyPolicy||null,this.returnPolicy=t.returnPolicy||null,this.termsOfService=t.termsOfService||null};export{t as IkasStorefrontThemeLocalization};
@@ -1 +1 @@
1
- import"../../../../ui/blog-list/index.js";import"../../../../ui/blog-category-list/index.js";import"../../../../ui/brand-list/index.js";import"../../../../ui/category-list/index.js";import{makeAutoObservable as i}from"mobx";import"../../../../ui/product-detail/index.js";import{IkasProductListType as t,IkasProductListSortType as r}from"../../../../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";var o=function(o){this.initialSort=null,this.initialLimit=null,this.productCount=null,this.productIds=null,this.usePageFilter=null,this.category=null,this.id=o.id||"",this.productListType=o.productListType||t.ALL,this.initialSort=o.initialSort||r.LAST_ADDED,this.initialLimit=o.initialLimit||20,this.productCount=o.productCount,this.productIds=o.productIds,this.category=o.category,this.relatedProductsType=o.relatedProductsType,this.usePageFilter=o.usePageFilter,i(this)};export{o as IkasProductListPropValue};
1
+ import"../../../../ui/blog-list/index.js";import"../../../../ui/blog-category-list/index.js";import"../../../../ui/brand-list/index.js";import"../../../../ui/category-list/index.js";import{makeAutoObservable as i}from"mobx";import"../../../../ui/product-detail/index.js";import{IkasProductListType as t,IkasProductListSortType as r}from"../../../../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/customer-review-summary-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";var o=function(o){this.initialSort=null,this.initialLimit=null,this.productCount=null,this.productIds=null,this.usePageFilter=null,this.category=null,this.id=o.id||"",this.productListType=o.productListType||t.ALL,this.initialSort=o.initialSort||r.LAST_ADDED,this.initialLimit=o.initialLimit||20,this.productCount=o.productCount,this.productIds=o.productIds,this.category=o.category,this.relatedProductsType=o.relatedProductsType,this.usePageFilter=o.usePageFilter,i(this)};export{o as IkasProductListPropValue};
@@ -1 +1 @@
1
- import{__awaiter as t,__generator as i}from'../../../ext/tslib/tslib.es6.js';import{makeAutoObservable as e}from"mobx";import{IkasBlogCategory as r}from"../../data/blog/index.js";import{IkasBlogAPI as o}from"../../../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"../../data/brand/index.js";import"../../data/category/index.js";import"../../data/checkout/index.js";import"../../data/customer/address/index.js";import"../../data/customer/index.js";import"../../data/customer-review/index.js";import"../../data/html-meta-data/index.js";import"../../data/image/index.js";import"../../data/installment-info/index.js";import"../../data/order/index.js";import"../../data/order/line-item/index.js";import"../../../api/product-option-file/index.js";import"../../data/product/index.js";import"../../data/variant-type/index.js";import"../../data/product/variant/index.js";import"../../data/product/variant/price/index.js";import"../../data/product-attribute/index.js";import"../../data/product/attribute-value/index.js";import"../../data/product-filter/index.js";import"../../data/variant-type/variant-value/index.js";import"../../data/order-transaction/index.js";import"../../data/product-option-set/index.js";import"../../data/raffle/index.js";import"../../data/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"../brand-list/index.js";import"../blog-list/index.js";import"../category-list/index.js";import"../product-detail/index.js";import"../product-list/index.js";import"../product-attribute-detail/index.js";import"../product-attribute-list/index.js";import"../customer-review-list/index.js";import"../validator/index.js";import"../validator/rules/index.js";import"../validator/form/login.js";import"../validator/form/address.js";import"../validator/form/register.js";import"../validator/form/contact-form.js";import"../validator/form/forgot-password.js";import"../validator/form/recover-password.js";import"../validator/form/account-info.js";import"../validator/form/raffle-form.js";import"../validator/form/customer-review.js";import"../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"../../../api/back-in-stock-reminder/index.js";import"../../../api/product-campaign/index.js";var a,s=function(){function s(o){var s=this;this._initialized=!1,this._minPage=null,this._isLoading=!1,this.getInitial=function(){return t(s,void 0,void 0,(function(){var t,e,r,o;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,this.listBlogCategories(this.isStatic?1:this.page,this.isStatic?(null===(r=this._blogCategoryListPropValue.blogCategoryIds)||void 0===r?void 0:r.length)||10:this.limit)];case 2:return t=i.sent(),this.isStatic?this.data=(null===(o=this._blogCategoryListPropValue.blogCategoryIds)||void 0===o?void 0:o.map((function(i){return t.blogCategories.find((function(t){return t.id===i}))})).filter((function(t){return!!t})))||[]:this.data=t.blogCategories,this._count=t.count,this._initialized=!0,this._minPage=this.page,[3,5];case 3:return e=i.sent(),console.log(e),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getPrev=function(){return t(s,void 0,void 0,(function(){var t,e,r;return i(this,(function(i){switch(i.label){case 0:if(this.isStatic||this._isLoading||!this.hasPrev)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),t=this._minPage-1,[4,this.listBlogCategories(t,this.limit)];case 2:return e=i.sent(),this.data=e.blogCategories.concat(this.data),this._count=e.count,this._minPage=t,[3,5];case 3:return r=i.sent(),console.log(r),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getNext=function(){return t(s,void 0,void 0,(function(){var t,e;return i(this,(function(i){switch(i.label){case 0:if(this.isStatic||this._isLoading||!this.hasNext)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,this.listBlogCategories(this.page+1,this.limit)];case 2:return t=i.sent(),this.data=this.data.concat(t.blogCategories),this._count=t.count,this._page=this.page+1,[3,5];case 3:return e=i.sent(),console.log(e),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getPage=function(e){return t(s,void 0,void 0,(function(){var t,r;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading||this.isStatic)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,this.listBlogCategories(e,this.limit)];case 2:return t=i.sent(),this.data=t.blogCategories,this._count=t.count,this._page=e,this._minPage=e,[3,5];case 3:return r=i.sent(),console.log(r),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.data=o.data?o.data.map((function(t){return new r(t)})):[],this._type=o.type||o.blogCategoryListPropValue.blogCategoryListType||a.ALL,this._limit=o.limit||o.blogCategoryListPropValue.initialLimit||20,this._page=o.page||1,this._count=o.count||0,this._initialized=o.initialized||!1,this._minPage=o.minPage,this._blogCategoryListPropValue=o.blogCategoryListPropValue,e(this)}return Object.defineProperty(s.prototype,"limit",{get:function(){return this._limit},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"page",{get:function(){return this._page},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"count",{get:function(){return this._count},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"pageCount",{get:function(){return Math.ceil(this._count/this._limit)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"isInitialized",{get:function(){return this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"isStatic",{get:function(){return this._type===a.STATIC},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"hasPrev",{get:function(){return!(this.isStatic||!this._minPage)&&this._minPage>1},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"hasNext",{get:function(){return!this.isStatic&&this.page*this.limit<this.count},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"isLoading",{get:function(){return this._isLoading},enumerable:!1,configurable:!0}),s.prototype.listBlogCategories=function(e,r){return t(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,o.listBlogCategory({idList:this.isStatic&&this._blogCategoryListPropValue.blogCategoryIds||void 0,page:e,limit:r})];case 1:return[2,t.sent()]}}))}))},s.prototype.toJSON=function(){return{data:this.data,type:this._type,limit:this._limit,page:this._page,count:this._count,initialized:this._initialized,minPage:this._minPage,blogCategoryListPropValue:this._blogCategoryListPropValue}},s}();!function(t){t.ALL="ALL",t.STATIC="STATIC"}(a||(a={}));export{s as IkasBlogCategoryList,a as IkasBlogCategoryListType};
1
+ import{__awaiter as t,__generator as i}from'../../../ext/tslib/tslib.es6.js';import{makeAutoObservable as e}from"mobx";import{IkasBlogCategory as r}from"../../data/blog/index.js";import{IkasBlogAPI as o}from"../../../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/customer-review-summary/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"../../data/brand/index.js";import"../../data/category/index.js";import"../../data/checkout/index.js";import"../../data/customer/address/index.js";import"../../data/customer/index.js";import"../../data/customer-review/index.js";import"../../data/html-meta-data/index.js";import"../../data/image/index.js";import"../../data/installment-info/index.js";import"../../data/order/index.js";import"../../data/order/line-item/index.js";import"../../../api/product-option-file/index.js";import"../../data/product/index.js";import"../../data/variant-type/index.js";import"../../data/product/variant/index.js";import"../../data/product/variant/price/index.js";import"../../data/product-attribute/index.js";import"../../data/product/attribute-value/index.js";import"../../data/product-filter/index.js";import"../../data/variant-type/variant-value/index.js";import"../../data/order-transaction/index.js";import"../../data/product-option-set/index.js";import"../../data/raffle/index.js";import"../../data/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"../brand-list/index.js";import"../blog-list/index.js";import"../category-list/index.js";import"../product-detail/index.js";import"../product-list/index.js";import"../product-attribute-detail/index.js";import"../product-attribute-list/index.js";import"../customer-review-list/index.js";import"../customer-review-summary-list/index.js";import"../validator/index.js";import"../validator/rules/index.js";import"../validator/form/login.js";import"../validator/form/address.js";import"../validator/form/register.js";import"../validator/form/contact-form.js";import"../validator/form/forgot-password.js";import"../validator/form/recover-password.js";import"../validator/form/account-info.js";import"../validator/form/raffle-form.js";import"../validator/form/customer-review.js";import"../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"../../../api/back-in-stock-reminder/index.js";import"../../../api/product-campaign/index.js";var a,s=function(){function s(o){var s=this;this._initialized=!1,this._minPage=null,this._isLoading=!1,this.getInitial=function(){return t(s,void 0,void 0,(function(){var t,e,r,o;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,this.listBlogCategories(this.isStatic?1:this.page,this.isStatic?(null===(r=this._blogCategoryListPropValue.blogCategoryIds)||void 0===r?void 0:r.length)||10:this.limit)];case 2:return t=i.sent(),this.isStatic?this.data=(null===(o=this._blogCategoryListPropValue.blogCategoryIds)||void 0===o?void 0:o.map((function(i){return t.blogCategories.find((function(t){return t.id===i}))})).filter((function(t){return!!t})))||[]:this.data=t.blogCategories,this._count=t.count,this._initialized=!0,this._minPage=this.page,[3,5];case 3:return e=i.sent(),console.log(e),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getPrev=function(){return t(s,void 0,void 0,(function(){var t,e,r;return i(this,(function(i){switch(i.label){case 0:if(this.isStatic||this._isLoading||!this.hasPrev)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),t=this._minPage-1,[4,this.listBlogCategories(t,this.limit)];case 2:return e=i.sent(),this.data=e.blogCategories.concat(this.data),this._count=e.count,this._minPage=t,[3,5];case 3:return r=i.sent(),console.log(r),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getNext=function(){return t(s,void 0,void 0,(function(){var t,e;return i(this,(function(i){switch(i.label){case 0:if(this.isStatic||this._isLoading||!this.hasNext)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,this.listBlogCategories(this.page+1,this.limit)];case 2:return t=i.sent(),this.data=this.data.concat(t.blogCategories),this._count=t.count,this._page=this.page+1,[3,5];case 3:return e=i.sent(),console.log(e),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getPage=function(e){return t(s,void 0,void 0,(function(){var t,r;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading||this.isStatic)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,this.listBlogCategories(e,this.limit)];case 2:return t=i.sent(),this.data=t.blogCategories,this._count=t.count,this._page=e,this._minPage=e,[3,5];case 3:return r=i.sent(),console.log(r),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.data=o.data?o.data.map((function(t){return new r(t)})):[],this._type=o.type||o.blogCategoryListPropValue.blogCategoryListType||a.ALL,this._limit=o.limit||o.blogCategoryListPropValue.initialLimit||20,this._page=o.page||1,this._count=o.count||0,this._initialized=o.initialized||!1,this._minPage=o.minPage,this._blogCategoryListPropValue=o.blogCategoryListPropValue,e(this)}return Object.defineProperty(s.prototype,"limit",{get:function(){return this._limit},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"page",{get:function(){return this._page},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"count",{get:function(){return this._count},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"pageCount",{get:function(){return Math.ceil(this._count/this._limit)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"isInitialized",{get:function(){return this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"isStatic",{get:function(){return this._type===a.STATIC},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"hasPrev",{get:function(){return!(this.isStatic||!this._minPage)&&this._minPage>1},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"hasNext",{get:function(){return!this.isStatic&&this.page*this.limit<this.count},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"isLoading",{get:function(){return this._isLoading},enumerable:!1,configurable:!0}),s.prototype.listBlogCategories=function(e,r){return t(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,o.listBlogCategory({idList:this.isStatic&&this._blogCategoryListPropValue.blogCategoryIds||void 0,page:e,limit:r})];case 1:return[2,t.sent()]}}))}))},s.prototype.toJSON=function(){return{data:this.data,type:this._type,limit:this._limit,page:this._page,count:this._count,initialized:this._initialized,minPage:this._minPage,blogCategoryListPropValue:this._blogCategoryListPropValue}},s}();!function(t){t.ALL="ALL",t.STATIC="STATIC"}(a||(a={}));export{s as IkasBlogCategoryList,a as IkasBlogCategoryListType};
@@ -1 +1 @@
1
- import{__awaiter as t,__generator as i}from'../../../ext/tslib/tslib.es6.js';import{makeAutoObservable as e}from"mobx";import{IkasBlog as r}from"../../data/blog/index.js";import{IkasBlogAPI as o}from"../../../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"../../data/brand/index.js";import"../../data/category/index.js";import"../../data/checkout/index.js";import"../../data/customer/address/index.js";import"../../data/customer/index.js";import"../../data/customer-review/index.js";import"../../data/html-meta-data/index.js";import"../../data/image/index.js";import"../../data/installment-info/index.js";import"../../data/order/index.js";import"../../data/order/line-item/index.js";import"../../../api/product-option-file/index.js";import"../../data/product/index.js";import"../../data/variant-type/index.js";import"../../data/product/variant/index.js";import"../../data/product/variant/price/index.js";import"../../data/product-attribute/index.js";import"../../data/product/attribute-value/index.js";import"../../data/product-filter/index.js";import"../../data/variant-type/variant-value/index.js";import"../../data/order-transaction/index.js";import"../../data/product-option-set/index.js";import"../../data/raffle/index.js";import"../../data/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"../brand-list/index.js";import"../blog-category-list/index.js";import"../category-list/index.js";import"../product-detail/index.js";import"../product-list/index.js";import"../product-attribute-detail/index.js";import"../product-attribute-list/index.js";import"../customer-review-list/index.js";import"../validator/index.js";import"../validator/rules/index.js";import"../validator/form/login.js";import"../validator/form/address.js";import"../validator/form/register.js";import"../validator/form/contact-form.js";import"../validator/form/forgot-password.js";import"../validator/form/recover-password.js";import"../validator/form/account-info.js";import"../validator/form/raffle-form.js";import"../validator/form/customer-review.js";import"../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"../../../api/back-in-stock-reminder/index.js";import"../../../api/product-campaign/index.js";var s,a=function(){function a(o){var a=this;this._initialized=!1,this._minPage=null,this._filterCategoryId=null,this._isLoading=!1,this.getInitial=function(){return t(a,void 0,void 0,(function(){var t,e,r,o;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,this.listBlogs(this.isStatic?1:this.page,this.isStatic?(null===(r=this._blogListPropValue.blogIds)||void 0===r?void 0:r.length)||10:this.limit)];case 2:return t=i.sent(),this.isStatic?this.data=(null===(o=this._blogListPropValue.blogIds)||void 0===o?void 0:o.map((function(i){return t.blogs.find((function(t){return t.id===i}))})).filter((function(t){return!!t})))||[]:this.data=t.blogs,this._count=t.count,this._initialized=!0,this._minPage=this.page,[3,5];case 3:return e=i.sent(),console.log(e),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getPrev=function(){return t(a,void 0,void 0,(function(){var t,e,r;return i(this,(function(i){switch(i.label){case 0:if(this.isStatic||this._isLoading||!this.hasPrev)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),t=this._minPage-1,[4,this.listBlogs(t,this.limit)];case 2:return e=i.sent(),this.data=e.blogs.concat(this.data),this._count=e.count,this._minPage=t,[3,5];case 3:return r=i.sent(),console.log(r),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getNext=function(){return t(a,void 0,void 0,(function(){var t,e;return i(this,(function(i){switch(i.label){case 0:if(this.isStatic||this._isLoading||!this.hasNext)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,this.listBlogs(this.page+1,this.limit)];case 2:return t=i.sent(),this.data=this.data.concat(t.blogs),this._count=t.count,this._page=this.page+1,[3,5];case 3:return e=i.sent(),console.log(e),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getPage=function(e){return t(a,void 0,void 0,(function(){var t,r;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading||this.isStatic)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,this.listBlogs(e,this.limit)];case 2:return t=i.sent(),this.data=t.blogs,this._count=t.count,this._page=e,this._minPage=e,[3,5];case 3:return r=i.sent(),console.log(r),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.data=o.data?o.data.map((function(t){return new r(t)})):[],this._type=o.type||o.blogListPropValue.blogListType||s.ALL,this._limit=o.limit||o.blogListPropValue.initialLimit||20,this._page=o.page||1,this._count=o.count||0,this._initialized=o.initialized||!1,this._minPage=o.minPage,this._blogListPropValue=o.blogListPropValue,this._filterCategoryId=o.filterCategoryId||null,e(this)}return Object.defineProperty(a.prototype,"limit",{get:function(){return this._limit},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"page",{get:function(){return this._page},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"count",{get:function(){return this._count},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"pageCount",{get:function(){return Math.ceil(this._count/this._limit)},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"isInitialized",{get:function(){return this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"isStatic",{get:function(){return this._type===s.STATIC},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"hasPrev",{get:function(){return!(this.isStatic||!this._minPage)&&this._minPage>1},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"hasNext",{get:function(){return!this.isStatic&&this.page*this.limit<this.count},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"isLoading",{get:function(){return this._isLoading},enumerable:!1,configurable:!0}),a.prototype.listBlogs=function(e,r){return t(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,o.listBlog({idList:this.isStatic&&this._blogListPropValue.blogIds||void 0,page:e,limit:r,categoryId:this._filterCategoryId||void 0})];case 1:return[2,t.sent()]}}))}))},a.prototype.toJSON=function(){return{data:this.data,type:this._type,limit:this._limit,page:this._page,count:this._count,initialized:this._initialized,minPage:this._minPage,blogListPropValue:this._blogListPropValue,filterCategoryId:this._filterCategoryId}},a}();!function(t){t.ALL="ALL",t.STATIC="STATIC",t.CATEGORY="CATEGORY"}(s||(s={}));export{a as IkasBlogList,s as IkasBlogListType};
1
+ import{__awaiter as t,__generator as i}from'../../../ext/tslib/tslib.es6.js';import{makeAutoObservable as e}from"mobx";import{IkasBlog as r}from"../../data/blog/index.js";import{IkasBlogAPI as o}from"../../../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/customer-review-summary/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"../../data/brand/index.js";import"../../data/category/index.js";import"../../data/checkout/index.js";import"../../data/customer/address/index.js";import"../../data/customer/index.js";import"../../data/customer-review/index.js";import"../../data/html-meta-data/index.js";import"../../data/image/index.js";import"../../data/installment-info/index.js";import"../../data/order/index.js";import"../../data/order/line-item/index.js";import"../../../api/product-option-file/index.js";import"../../data/product/index.js";import"../../data/variant-type/index.js";import"../../data/product/variant/index.js";import"../../data/product/variant/price/index.js";import"../../data/product-attribute/index.js";import"../../data/product/attribute-value/index.js";import"../../data/product-filter/index.js";import"../../data/variant-type/variant-value/index.js";import"../../data/order-transaction/index.js";import"../../data/product-option-set/index.js";import"../../data/raffle/index.js";import"../../data/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"../brand-list/index.js";import"../blog-category-list/index.js";import"../category-list/index.js";import"../product-detail/index.js";import"../product-list/index.js";import"../product-attribute-detail/index.js";import"../product-attribute-list/index.js";import"../customer-review-list/index.js";import"../customer-review-summary-list/index.js";import"../validator/index.js";import"../validator/rules/index.js";import"../validator/form/login.js";import"../validator/form/address.js";import"../validator/form/register.js";import"../validator/form/contact-form.js";import"../validator/form/forgot-password.js";import"../validator/form/recover-password.js";import"../validator/form/account-info.js";import"../validator/form/raffle-form.js";import"../validator/form/customer-review.js";import"../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"../../../api/back-in-stock-reminder/index.js";import"../../../api/product-campaign/index.js";var s,a=function(){function a(o){var a=this;this._initialized=!1,this._minPage=null,this._filterCategoryId=null,this._isLoading=!1,this.getInitial=function(){return t(a,void 0,void 0,(function(){var t,e,r,o;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,this.listBlogs(this.isStatic?1:this.page,this.isStatic?(null===(r=this._blogListPropValue.blogIds)||void 0===r?void 0:r.length)||10:this.limit)];case 2:return t=i.sent(),this.isStatic?this.data=(null===(o=this._blogListPropValue.blogIds)||void 0===o?void 0:o.map((function(i){return t.blogs.find((function(t){return t.id===i}))})).filter((function(t){return!!t})))||[]:this.data=t.blogs,this._count=t.count,this._initialized=!0,this._minPage=this.page,[3,5];case 3:return e=i.sent(),console.log(e),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getPrev=function(){return t(a,void 0,void 0,(function(){var t,e,r;return i(this,(function(i){switch(i.label){case 0:if(this.isStatic||this._isLoading||!this.hasPrev)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),t=this._minPage-1,[4,this.listBlogs(t,this.limit)];case 2:return e=i.sent(),this.data=e.blogs.concat(this.data),this._count=e.count,this._minPage=t,[3,5];case 3:return r=i.sent(),console.log(r),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getNext=function(){return t(a,void 0,void 0,(function(){var t,e;return i(this,(function(i){switch(i.label){case 0:if(this.isStatic||this._isLoading||!this.hasNext)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,this.listBlogs(this.page+1,this.limit)];case 2:return t=i.sent(),this.data=this.data.concat(t.blogs),this._count=t.count,this._page=this.page+1,[3,5];case 3:return e=i.sent(),console.log(e),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getPage=function(e){return t(a,void 0,void 0,(function(){var t,r;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading||this.isStatic)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,this.listBlogs(e,this.limit)];case 2:return t=i.sent(),this.data=t.blogs,this._count=t.count,this._page=e,this._minPage=e,[3,5];case 3:return r=i.sent(),console.log(r),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.data=o.data?o.data.map((function(t){return new r(t)})):[],this._type=o.type||o.blogListPropValue.blogListType||s.ALL,this._limit=o.limit||o.blogListPropValue.initialLimit||20,this._page=o.page||1,this._count=o.count||0,this._initialized=o.initialized||!1,this._minPage=o.minPage,this._blogListPropValue=o.blogListPropValue,this._filterCategoryId=o.filterCategoryId||null,e(this)}return Object.defineProperty(a.prototype,"limit",{get:function(){return this._limit},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"page",{get:function(){return this._page},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"count",{get:function(){return this._count},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"pageCount",{get:function(){return Math.ceil(this._count/this._limit)},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"isInitialized",{get:function(){return this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"isStatic",{get:function(){return this._type===s.STATIC},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"hasPrev",{get:function(){return!(this.isStatic||!this._minPage)&&this._minPage>1},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"hasNext",{get:function(){return!this.isStatic&&this.page*this.limit<this.count},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"isLoading",{get:function(){return this._isLoading},enumerable:!1,configurable:!0}),a.prototype.listBlogs=function(e,r){return t(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,o.listBlog({idList:this.isStatic&&this._blogListPropValue.blogIds||void 0,page:e,limit:r,categoryId:this._filterCategoryId||void 0})];case 1:return[2,t.sent()]}}))}))},a.prototype.toJSON=function(){return{data:this.data,type:this._type,limit:this._limit,page:this._page,count:this._count,initialized:this._initialized,minPage:this._minPage,blogListPropValue:this._blogListPropValue,filterCategoryId:this._filterCategoryId}},a}();!function(t){t.ALL="ALL",t.STATIC="STATIC",t.CATEGORY="CATEGORY"}(s||(s={}));export{a as IkasBlogList,s as IkasBlogListType};
@@ -1 +1 @@
1
- import{__awaiter as t,__generator as i}from'../../../ext/tslib/tslib.es6.js';import"../../data/blog/index.js";import{IkasBrand as e}from"../../data/brand/index.js";import"../../data/category/index.js";import"../../data/checkout/index.js";import"../../data/customer/address/index.js";import"../../data/customer/index.js";import"../../data/customer-review/index.js";import"../../data/html-meta-data/index.js";import"../../data/image/index.js";import"../../data/installment-info/index.js";import"../../data/order/index.js";import"../../data/order/line-item/index.js";import{makeAutoObservable as r,runInAction as n}from"mobx";import"../../../api/product-option-file/index.js";import"../../data/product/index.js";import"../../data/variant-type/index.js";import"../../data/product/variant/index.js";import"../../data/product/variant/price/index.js";import"../../data/product-attribute/index.js";import"../../data/product/attribute-value/index.js";import"../../data/product-filter/index.js";import"../../data/variant-type/variant-value/index.js";import"../../data/order-transaction/index.js";import"../../data/product-option-set/index.js";import"../../data/raffle/index.js";import"../../data/product-campaing/campaign/index.js";import"../../../api/blog/index.js";import{IkasBrandAPI as a}from"../../../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"../../theme/theme.js";import"../../theme/page/index.js";import"../../theme/component/prop/index.js";import"../../theme/page/component/prop-value/link.js";import"../blog-list/index.js";import"../blog-category-list/index.js";import"../category-list/index.js";import"../product-detail/index.js";import"../product-list/index.js";import"../product-attribute-detail/index.js";import"../product-attribute-list/index.js";import"../customer-review-list/index.js";import"../validator/index.js";import"../validator/rules/index.js";import"../validator/form/login.js";import"../validator/form/address.js";import"../validator/form/register.js";import"../validator/form/contact-form.js";import"../validator/form/forgot-password.js";import"../validator/form/recover-password.js";import"../validator/form/account-info.js";import"../validator/form/raffle-form.js";import"../validator/form/customer-review.js";import"../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"../../../api/back-in-stock-reminder/index.js";import"../../../api/product-campaign/index.js";var o,s,d=function(){function d(d){var p=this;this._initialized=!1,this._minPage=null,this._isLoading=!1,this.getInitial=function(){return t(p,void 0,void 0,(function(){var t,e,r,o=this;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,a.listBrands({idList:this.isStatic&&this._brandListPropValue.brandIds||void 0,page:this.isStatic?void 0:this.page,limit:this.isStatic?void 0:this.limit,sort:this.getSortParams()})];case 2:return t=i.sent(),this.isStatic?this.data=(null===(r=this._brandListPropValue.brandIds)||void 0===r?void 0:r.map((function(i){return t.brands.find((function(t){return t.id===i}))})).filter((function(t){return!!t})))||[]:this.data=t.brands,this._count=t.count,this._initialized=!0,this._minPage=this.page,[3,5];case 3:return e=i.sent(),console.log(e),[3,5];case 4:return n((function(){o._isLoading=!1})),[7];case 5:return[2]}}))}))},this.getPrev=function(){return t(p,void 0,void 0,(function(){var t,e,r,o=this;return i(this,(function(i){switch(i.label){case 0:if(this.isStatic||this._isLoading||!this.hasPrev)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),t=this._minPage-1,[4,a.listBrands({page:t,limit:this.limit,sort:this.getSortParams()})];case 2:return e=i.sent(),n((function(){o.data=e.brands.concat(o.data),o._count=e.count,o._minPage=t})),[3,5];case 3:return r=i.sent(),console.log(r),[3,5];case 4:return n((function(){o._isLoading=!1})),[7];case 5:return[2]}}))}))},this.getNext=function(){return t(p,void 0,void 0,(function(){var t,e,r=this;return i(this,(function(i){switch(i.label){case 0:if(this.isStatic||this._isLoading||!this.hasNext)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,a.listBrands({page:this.page+1,limit:this.limit,sort:this.getSortParams()})];case 2:return t=i.sent(),n((function(){r.data=r.data.concat(t.brands),r._count=t.count,r._page=r.page+1})),[3,5];case 3:return e=i.sent(),console.log(e),[3,5];case 4:return n((function(){r._isLoading=!1})),[7];case 5:return[2]}}))}))},this.getPage=function(e){return t(p,void 0,void 0,(function(){var t,r,o=this;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading||this.isStatic)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,a.listBrands({page:e,limit:this.limit,sort:this.getSortParams()})];case 2:return t=i.sent(),n((function(){o.data=t.brands,o._count=t.count,o._page=e,o._minPage=e})),[3,5];case 3:return r=i.sent(),console.log(r),[3,5];case 4:return n((function(){o._isLoading=!1})),[7];case 5:return[2]}}))}))},this.data=d.data?d.data.map((function(t){return new e(t)})):[],this._type=d.type||d.brandListPropValue.brandListType||o.ALL,this._sort=d.sort||d.brandListPropValue.initialSort||s.A_Z,this._limit=d.limit||d.brandListPropValue.initialLimit||20,this._page=d.page||1,this._count=d.count||0,this._initialized=d.initialized||!1,this._minPage=d.minPage,this._brandListPropValue=d.brandListPropValue,r(this)}return Object.defineProperty(d.prototype,"sort",{get:function(){return this._sort},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"limit",{get:function(){return this._limit},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"page",{get:function(){return this._page},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"count",{get:function(){return this._count},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"pageCount",{get:function(){return Math.ceil(this._count/this._limit)},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isInitialized",{get:function(){return this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isStatic",{get:function(){return this._type===o.STATIC},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"hasPrev",{get:function(){return!(this.isStatic||!this._minPage)&&this._minPage>1},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"hasNext",{get:function(){return!this.isStatic&&this.page*this.limit<this.count},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isLoading",{get:function(){return this._isLoading},enumerable:!1,configurable:!0}),d.prototype.getSortParams=function(){return this._sort===s.A_Z?"name":"-name"},d.prototype.setSortType=function(e){return t(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return this._sort=e,[4,this.getInitial()];case 1:return t.sent(),[2]}}))}))},d.prototype.toJSON=function(){return{data:this.data,type:this._type,sort:this._sort,limit:this._limit,page:this._page,count:this._count,initialized:this._initialized,minPage:this._minPage,brandListPropValue:this._brandListPropValue}},d}();!function(t){t.ALL="ALL",t.STATIC="STATIC"}(o||(o={})),function(t){t.A_Z="A_Z",t.Z_A="Z_A"}(s||(s={}));export{d as IkasBrandList,s as IkasBrandListSortType,o as IkasBrandListType};
1
+ import{__awaiter as t,__generator as i}from'../../../ext/tslib/tslib.es6.js';import"../../data/blog/index.js";import{IkasBrand as e}from"../../data/brand/index.js";import"../../data/category/index.js";import"../../data/checkout/index.js";import"../../data/customer/address/index.js";import"../../data/customer/index.js";import"../../data/customer-review/index.js";import{makeAutoObservable as r,runInAction as a}from"mobx";import"../../data/html-meta-data/index.js";import"../../data/image/index.js";import"../../data/installment-info/index.js";import"../../data/order/index.js";import"../../data/order/line-item/index.js";import"../../../api/product-option-file/index.js";import"../../data/product/index.js";import"../../data/variant-type/index.js";import"../../data/product/variant/index.js";import"../../data/product/variant/price/index.js";import"../../data/product-attribute/index.js";import"../../data/product/attribute-value/index.js";import"../../data/product-filter/index.js";import"../../data/variant-type/variant-value/index.js";import"../../data/order-transaction/index.js";import"../../data/product-option-set/index.js";import"../../data/raffle/index.js";import"../../data/product-campaing/campaign/index.js";import"../../../api/blog/index.js";import{IkasBrandAPI as n}from"../../../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/customer-review-summary/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"../../theme/theme.js";import"../../theme/page/index.js";import"../../theme/component/prop/index.js";import"../../theme/page/component/prop-value/link.js";import"../blog-list/index.js";import"../blog-category-list/index.js";import"../category-list/index.js";import"../product-detail/index.js";import"../product-list/index.js";import"../product-attribute-detail/index.js";import"../product-attribute-list/index.js";import"../customer-review-list/index.js";import"../customer-review-summary-list/index.js";import"../validator/index.js";import"../validator/rules/index.js";import"../validator/form/login.js";import"../validator/form/address.js";import"../validator/form/register.js";import"../validator/form/contact-form.js";import"../validator/form/forgot-password.js";import"../validator/form/recover-password.js";import"../validator/form/account-info.js";import"../validator/form/raffle-form.js";import"../validator/form/customer-review.js";import"../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"../../../api/back-in-stock-reminder/index.js";import"../../../api/product-campaign/index.js";var o,s,d=function(){function d(d){var p=this;this._initialized=!1,this._minPage=null,this._isLoading=!1,this.getInitial=function(){return t(p,void 0,void 0,(function(){var t,e,r,o=this;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,n.listBrands({idList:this.isStatic&&this._brandListPropValue.brandIds||void 0,page:this.isStatic?void 0:this.page,limit:this.isStatic?void 0:this.limit,sort:this.getSortParams()})];case 2:return t=i.sent(),this.isStatic?this.data=(null===(r=this._brandListPropValue.brandIds)||void 0===r?void 0:r.map((function(i){return t.brands.find((function(t){return t.id===i}))})).filter((function(t){return!!t})))||[]:this.data=t.brands,this._count=t.count,this._initialized=!0,this._minPage=this.page,[3,5];case 3:return e=i.sent(),console.log(e),[3,5];case 4:return a((function(){o._isLoading=!1})),[7];case 5:return[2]}}))}))},this.getPrev=function(){return t(p,void 0,void 0,(function(){var t,e,r,o=this;return i(this,(function(i){switch(i.label){case 0:if(this.isStatic||this._isLoading||!this.hasPrev)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),t=this._minPage-1,[4,n.listBrands({page:t,limit:this.limit,sort:this.getSortParams()})];case 2:return e=i.sent(),a((function(){o.data=e.brands.concat(o.data),o._count=e.count,o._minPage=t})),[3,5];case 3:return r=i.sent(),console.log(r),[3,5];case 4:return a((function(){o._isLoading=!1})),[7];case 5:return[2]}}))}))},this.getNext=function(){return t(p,void 0,void 0,(function(){var t,e,r=this;return i(this,(function(i){switch(i.label){case 0:if(this.isStatic||this._isLoading||!this.hasNext)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,n.listBrands({page:this.page+1,limit:this.limit,sort:this.getSortParams()})];case 2:return t=i.sent(),a((function(){r.data=r.data.concat(t.brands),r._count=t.count,r._page=r.page+1})),[3,5];case 3:return e=i.sent(),console.log(e),[3,5];case 4:return a((function(){r._isLoading=!1})),[7];case 5:return[2]}}))}))},this.getPage=function(e){return t(p,void 0,void 0,(function(){var t,r,o=this;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading||this.isStatic)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,n.listBrands({page:e,limit:this.limit,sort:this.getSortParams()})];case 2:return t=i.sent(),a((function(){o.data=t.brands,o._count=t.count,o._page=e,o._minPage=e})),[3,5];case 3:return r=i.sent(),console.log(r),[3,5];case 4:return a((function(){o._isLoading=!1})),[7];case 5:return[2]}}))}))},this.data=d.data?d.data.map((function(t){return new e(t)})):[],this._type=d.type||d.brandListPropValue.brandListType||o.ALL,this._sort=d.sort||d.brandListPropValue.initialSort||s.A_Z,this._limit=d.limit||d.brandListPropValue.initialLimit||20,this._page=d.page||1,this._count=d.count||0,this._initialized=d.initialized||!1,this._minPage=d.minPage,this._brandListPropValue=d.brandListPropValue,r(this)}return Object.defineProperty(d.prototype,"sort",{get:function(){return this._sort},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"limit",{get:function(){return this._limit},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"page",{get:function(){return this._page},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"count",{get:function(){return this._count},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"pageCount",{get:function(){return Math.ceil(this._count/this._limit)},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isInitialized",{get:function(){return this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isStatic",{get:function(){return this._type===o.STATIC},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"hasPrev",{get:function(){return!(this.isStatic||!this._minPage)&&this._minPage>1},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"hasNext",{get:function(){return!this.isStatic&&this.page*this.limit<this.count},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isLoading",{get:function(){return this._isLoading},enumerable:!1,configurable:!0}),d.prototype.getSortParams=function(){return this._sort===s.A_Z?"name":"-name"},d.prototype.setSortType=function(e){return t(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return this._sort=e,[4,this.getInitial()];case 1:return t.sent(),[2]}}))}))},d.prototype.toJSON=function(){return{data:this.data,type:this._type,sort:this._sort,limit:this._limit,page:this._page,count:this._count,initialized:this._initialized,minPage:this._minPage,brandListPropValue:this._brandListPropValue}},d}();!function(t){t.ALL="ALL",t.STATIC="STATIC"}(o||(o={})),function(t){t.A_Z="A_Z",t.Z_A="Z_A"}(s||(s={}));export{d as IkasBrandList,s as IkasBrandListSortType,o as IkasBrandListType};
@@ -1 +1 @@
1
- import{__awaiter as t,__generator as i}from'../../../ext/tslib/tslib.es6.js';import"../../data/blog/index.js";import"../../data/brand/index.js";import{IkasCategory as e}from"../../data/category/index.js";import"../../data/checkout/index.js";import"../../data/customer/address/index.js";import"../../data/customer/index.js";import"../../data/customer-review/index.js";import"../../data/html-meta-data/index.js";import"../../data/image/index.js";import"../../data/installment-info/index.js";import"../../data/order/index.js";import"../../data/order/line-item/index.js";import{makeAutoObservable as r,runInAction as o}from"mobx";import"../../../api/product-option-file/index.js";import"../../data/product/index.js";import"../../data/variant-type/index.js";import"../../data/product/variant/index.js";import"../../data/product/variant/price/index.js";import"../../data/product-attribute/index.js";import"../../data/product/attribute-value/index.js";import"../../data/product-filter/index.js";import"../../data/variant-type/variant-value/index.js";import"../../data/order-transaction/index.js";import"../../data/product-option-set/index.js";import"../../data/raffle/index.js";import"../../data/product-campaing/campaign/index.js";import"../../../api/blog/index.js";import"../../../api/brand/index.js";import"../../../api/cart/index.js";import{IkasCategoryAPI as a}from"../../../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"../../theme/theme.js";import"../../theme/page/index.js";import"../../theme/component/prop/index.js";import"../../theme/page/component/prop-value/link.js";import"../brand-list/index.js";import"../blog-list/index.js";import"../blog-category-list/index.js";import"../product-detail/index.js";import"../product-list/index.js";import"../product-attribute-detail/index.js";import"../product-attribute-list/index.js";import"../customer-review-list/index.js";import"../validator/index.js";import"../validator/rules/index.js";import"../validator/form/login.js";import"../validator/form/address.js";import"../validator/form/register.js";import"../validator/form/contact-form.js";import"../validator/form/forgot-password.js";import"../validator/form/recover-password.js";import"../validator/form/account-info.js";import"../validator/form/raffle-form.js";import"../validator/form/customer-review.js";import"../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"../../../api/back-in-stock-reminder/index.js";import"../../../api/product-campaign/index.js";var n,s,p=function(){function p(p){var c=this;this._initialized=!1,this._minPage=null,this._isLoading=!1,this.getInitial=function(){return t(c,void 0,void 0,(function(){var t,e,r,n=this;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,a.listCategories({idList:this.isStatic&&this._categoryListPropValue.categoryIds||void 0,page:this.isStatic?void 0:this.page,limit:this.isStatic?void 0:this.limit,sort:this.getSortParams()})];case 2:return t=i.sent(),this.isStatic?this.data=(null===(r=this._categoryListPropValue.categoryIds)||void 0===r?void 0:r.map((function(i){return t.categories.find((function(t){return t.id===i}))})).filter((function(t){return!!t})))||[]:this.data=t.categories,this._count=t.count,this._initialized=!0,this._minPage=this.page,[3,5];case 3:return e=i.sent(),console.log(e),[3,5];case 4:return o((function(){n._isLoading=!1})),[7];case 5:return[2]}}))}))},this.getPrev=function(){return t(c,void 0,void 0,(function(){var t,e,r,n=this;return i(this,(function(i){switch(i.label){case 0:if(this.isStatic||this._isLoading||!this.hasPrev)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),t=this._minPage-1,[4,a.listCategories({page:t,limit:this.limit,sort:this.getSortParams()})];case 2:return e=i.sent(),o((function(){n.data=e.categories.concat(n.data),n._count=e.count,n._minPage=t})),[3,5];case 3:return r=i.sent(),console.log(r),[3,5];case 4:return o((function(){n._isLoading=!1})),[7];case 5:return[2]}}))}))},this.getNext=function(){return t(c,void 0,void 0,(function(){var t,e,r=this;return i(this,(function(i){switch(i.label){case 0:if(this.isStatic||this._isLoading||!this.hasNext)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,a.listCategories({page:this.page+1,limit:this.limit,sort:this.getSortParams()})];case 2:return t=i.sent(),o((function(){r.data=r.data.concat(t.categories),r._count=t.count,r._page=r.page+1})),[3,5];case 3:return e=i.sent(),console.log(e),[3,5];case 4:return o((function(){r._isLoading=!1})),[7];case 5:return[2]}}))}))},this.getPage=function(e){return t(c,void 0,void 0,(function(){var t,r,n=this;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading||this.isStatic)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,a.listCategories({page:e,limit:this.limit,sort:this.getSortParams()})];case 2:return t=i.sent(),o((function(){n.data=t.categories,n._count=t.count,n._page=e,n._minPage=e})),[3,5];case 3:return r=i.sent(),console.log(r),[3,5];case 4:return o((function(){n._isLoading=!1})),[7];case 5:return[2]}}))}))},this.data=p.data?p.data.map((function(t){return new e(t)})):[],this._type=p.type||p.categoryListPropValue.categoryListType||n.ALL,this._sort=p.sort||p.categoryListPropValue.initialSort||s.A_Z,this._limit=p.limit||p.categoryListPropValue.initialLimit||20,this._page=p.page||1,this._count=p.count||0,this._initialized=p.initialized||!1,this._minPage=p.minPage,this._categoryListPropValue=p.categoryListPropValue,r(this)}return Object.defineProperty(p.prototype,"sort",{get:function(){return this._sort},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"limit",{get:function(){return this._limit},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"page",{get:function(){return this._page},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"count",{get:function(){return this._count},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"pageCount",{get:function(){return Math.ceil(this._count/this._limit)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"isInitialized",{get:function(){return this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"isStatic",{get:function(){return this._type===n.STATIC},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"hasPrev",{get:function(){return!(this.isStatic||!this._minPage)&&this._minPage>1},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"hasNext",{get:function(){return!this.isStatic&&this.page*this.limit<this.count},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"isLoading",{get:function(){return this._isLoading},enumerable:!1,configurable:!0}),p.prototype.getSortParams=function(){return this._sort===s.A_Z?"name":"-name"},p.prototype.setSortType=function(e){return t(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return this._sort=e,[4,this.getInitial()];case 1:return t.sent(),[2]}}))}))},p.prototype.toJSON=function(){return{data:this.data,type:this._type,sort:this._sort,limit:this._limit,page:this._page,count:this._count,initialized:this._initialized,minPage:this._minPage,categoryListPropValue:this._categoryListPropValue}},p}();!function(t){t.ALL="ALL",t.STATIC="STATIC"}(n||(n={})),function(t){t.A_Z="A_Z",t.Z_A="Z_A"}(s||(s={}));export{p as IkasCategoryList,s as IkasCategoryListSortType,n as IkasCategoryListType};
1
+ import{__awaiter as t,__generator as i}from'../../../ext/tslib/tslib.es6.js';import"../../data/blog/index.js";import"../../data/brand/index.js";import{IkasCategory as e}from"../../data/category/index.js";import"../../data/checkout/index.js";import"../../data/customer/address/index.js";import"../../data/customer/index.js";import"../../data/customer-review/index.js";import{makeAutoObservable as r,runInAction as o}from"mobx";import"../../data/html-meta-data/index.js";import"../../data/image/index.js";import"../../data/installment-info/index.js";import"../../data/order/index.js";import"../../data/order/line-item/index.js";import"../../../api/product-option-file/index.js";import"../../data/product/index.js";import"../../data/variant-type/index.js";import"../../data/product/variant/index.js";import"../../data/product/variant/price/index.js";import"../../data/product-attribute/index.js";import"../../data/product/attribute-value/index.js";import"../../data/product-filter/index.js";import"../../data/variant-type/variant-value/index.js";import"../../data/order-transaction/index.js";import"../../data/product-option-set/index.js";import"../../data/raffle/index.js";import"../../data/product-campaing/campaign/index.js";import"../../../api/blog/index.js";import"../../../api/brand/index.js";import"../../../api/cart/index.js";import{IkasCategoryAPI as a}from"../../../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/customer-review-summary/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"../../theme/theme.js";import"../../theme/page/index.js";import"../../theme/component/prop/index.js";import"../../theme/page/component/prop-value/link.js";import"../brand-list/index.js";import"../blog-list/index.js";import"../blog-category-list/index.js";import"../product-detail/index.js";import"../product-list/index.js";import"../product-attribute-detail/index.js";import"../product-attribute-list/index.js";import"../customer-review-list/index.js";import"../customer-review-summary-list/index.js";import"../validator/index.js";import"../validator/rules/index.js";import"../validator/form/login.js";import"../validator/form/address.js";import"../validator/form/register.js";import"../validator/form/contact-form.js";import"../validator/form/forgot-password.js";import"../validator/form/recover-password.js";import"../validator/form/account-info.js";import"../validator/form/raffle-form.js";import"../validator/form/customer-review.js";import"../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"../../../api/back-in-stock-reminder/index.js";import"../../../api/product-campaign/index.js";var n,s,p=function(){function p(p){var c=this;this._initialized=!1,this._minPage=null,this._isLoading=!1,this.getInitial=function(){return t(c,void 0,void 0,(function(){var t,e,r,n=this;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,a.listCategories({idList:this.isStatic&&this._categoryListPropValue.categoryIds||void 0,page:this.isStatic?void 0:this.page,limit:this.isStatic?void 0:this.limit,sort:this.getSortParams()})];case 2:return t=i.sent(),this.isStatic?this.data=(null===(r=this._categoryListPropValue.categoryIds)||void 0===r?void 0:r.map((function(i){return t.categories.find((function(t){return t.id===i}))})).filter((function(t){return!!t})))||[]:this.data=t.categories,this._count=t.count,this._initialized=!0,this._minPage=this.page,[3,5];case 3:return e=i.sent(),console.log(e),[3,5];case 4:return o((function(){n._isLoading=!1})),[7];case 5:return[2]}}))}))},this.getPrev=function(){return t(c,void 0,void 0,(function(){var t,e,r,n=this;return i(this,(function(i){switch(i.label){case 0:if(this.isStatic||this._isLoading||!this.hasPrev)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),t=this._minPage-1,[4,a.listCategories({page:t,limit:this.limit,sort:this.getSortParams()})];case 2:return e=i.sent(),o((function(){n.data=e.categories.concat(n.data),n._count=e.count,n._minPage=t})),[3,5];case 3:return r=i.sent(),console.log(r),[3,5];case 4:return o((function(){n._isLoading=!1})),[7];case 5:return[2]}}))}))},this.getNext=function(){return t(c,void 0,void 0,(function(){var t,e,r=this;return i(this,(function(i){switch(i.label){case 0:if(this.isStatic||this._isLoading||!this.hasNext)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,a.listCategories({page:this.page+1,limit:this.limit,sort:this.getSortParams()})];case 2:return t=i.sent(),o((function(){r.data=r.data.concat(t.categories),r._count=t.count,r._page=r.page+1})),[3,5];case 3:return e=i.sent(),console.log(e),[3,5];case 4:return o((function(){r._isLoading=!1})),[7];case 5:return[2]}}))}))},this.getPage=function(e){return t(c,void 0,void 0,(function(){var t,r,n=this;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading||this.isStatic)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,a.listCategories({page:e,limit:this.limit,sort:this.getSortParams()})];case 2:return t=i.sent(),o((function(){n.data=t.categories,n._count=t.count,n._page=e,n._minPage=e})),[3,5];case 3:return r=i.sent(),console.log(r),[3,5];case 4:return o((function(){n._isLoading=!1})),[7];case 5:return[2]}}))}))},this.data=p.data?p.data.map((function(t){return new e(t)})):[],this._type=p.type||p.categoryListPropValue.categoryListType||n.ALL,this._sort=p.sort||p.categoryListPropValue.initialSort||s.A_Z,this._limit=p.limit||p.categoryListPropValue.initialLimit||20,this._page=p.page||1,this._count=p.count||0,this._initialized=p.initialized||!1,this._minPage=p.minPage,this._categoryListPropValue=p.categoryListPropValue,r(this)}return Object.defineProperty(p.prototype,"sort",{get:function(){return this._sort},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"limit",{get:function(){return this._limit},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"page",{get:function(){return this._page},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"count",{get:function(){return this._count},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"pageCount",{get:function(){return Math.ceil(this._count/this._limit)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"isInitialized",{get:function(){return this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"isStatic",{get:function(){return this._type===n.STATIC},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"hasPrev",{get:function(){return!(this.isStatic||!this._minPage)&&this._minPage>1},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"hasNext",{get:function(){return!this.isStatic&&this.page*this.limit<this.count},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"isLoading",{get:function(){return this._isLoading},enumerable:!1,configurable:!0}),p.prototype.getSortParams=function(){return this._sort===s.A_Z?"name":"-name"},p.prototype.setSortType=function(e){return t(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return this._sort=e,[4,this.getInitial()];case 1:return t.sent(),[2]}}))}))},p.prototype.toJSON=function(){return{data:this.data,type:this._type,sort:this._sort,limit:this._limit,page:this._page,count:this._count,initialized:this._initialized,minPage:this._minPage,categoryListPropValue:this._categoryListPropValue}},p}();!function(t){t.ALL="ALL",t.STATIC="STATIC"}(n||(n={})),function(t){t.A_Z="A_Z",t.Z_A="Z_A"}(s||(s={}));export{p as IkasCategoryList,s as IkasCategoryListSortType,n as IkasCategoryListType};
@@ -1 +1 @@
1
- import{__awaiter as t,__generator as i}from'../../../ext/tslib/tslib.es6.js';import{makeAutoObservable as e}from"mobx";import{IkasCustomerReview as r}from"../../data/customer-review/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{IkasCustomerReviewAPI as o}from"../../../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"../../data/blog/index.js";import"../../data/brand/index.js";import"../../data/category/index.js";import"../../data/checkout/index.js";import"../../data/customer/address/index.js";import"../../data/customer/index.js";import"../../data/html-meta-data/index.js";import"../../data/image/index.js";import"../../data/installment-info/index.js";import"../../data/order/index.js";import"../../data/order/line-item/index.js";import"../../../api/product-option-file/index.js";import"../../data/product/index.js";import"../../data/variant-type/index.js";import"../../data/product/variant/index.js";import"../../data/product/variant/price/index.js";import"../../data/product-attribute/index.js";import"../../data/product/attribute-value/index.js";import"../../data/product-filter/index.js";import"../../data/variant-type/variant-value/index.js";import"../../data/order-transaction/index.js";import"../../data/product-option-set/index.js";import"../../data/raffle/index.js";import"../../data/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"../brand-list/index.js";import"../blog-list/index.js";import"../blog-category-list/index.js";import"../category-list/index.js";import"../product-detail/index.js";import"../product-list/index.js";import"../product-attribute-detail/index.js";import"../product-attribute-list/index.js";import"../validator/index.js";import"../validator/rules/index.js";import"../validator/form/login.js";import"../validator/form/address.js";import"../validator/form/register.js";import"../validator/form/contact-form.js";import"../validator/form/forgot-password.js";import"../validator/form/recover-password.js";import"../validator/form/account-info.js";import"../validator/form/raffle-form.js";import"../validator/form/customer-review.js";import"../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"../../../api/back-in-stock-reminder/index.js";import"../../../api/product-campaign/index.js";import{IkasStorefrontConfig as a}from"../../../storefront/index.js";var n=function(){function n(o){var a=this;this._initialized=!1,this._minPage=null,this._isLoading=!1,this.getInitial=function(){return t(a,void 0,void 0,(function(){var t,e;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,this.listCustomerReviews(this.page,this.limit)];case 2:return t=i.sent(),this.data=t.data,this._count=t.count,this._initialized=!0,this._minPage=this.page,[3,5];case 3:return e=i.sent(),console.log(e),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getPrev=function(){return t(a,void 0,void 0,(function(){var t,e,r;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading||!this.hasPrev)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),t=this._minPage-1,[4,this.listCustomerReviews(t,this.limit)];case 2:return e=i.sent(),this.data=e.data.concat(this.data),this._count=e.count,this._minPage=t,[3,5];case 3:return r=i.sent(),console.log(r),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getNext=function(){return t(a,void 0,void 0,(function(){var t,e;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading||!this.hasNext)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,this.listCustomerReviews(this.page+1,this.limit)];case 2:return t=i.sent(),this.data=this.data.concat(t.data),this._count=t.count,this._page=this.page+1,[3,5];case 3:return e=i.sent(),console.log(e),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getPage=function(e){return t(a,void 0,void 0,(function(){var t,r;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,this.listCustomerReviews(e,this.limit)];case 2:return t=i.sent(),this.data=t.data,this._count=t.count,this._page=e,this._minPage=e,[3,5];case 3:return r=i.sent(),console.log(r),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.data=o.data?o.data.map((function(t){return new r(t)})):[],this._limit=o.limit||5,this._page=o.page||1,this._count=o.count||0,this._initialized=o.initialized||!1,this._minPage=o.minPage,this._productId=o.productId,e(this)}return Object.defineProperty(n.prototype,"limit",{get:function(){return this._limit},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"page",{get:function(){return this._page},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"count",{get:function(){return this._count},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"pageCount",{get:function(){return Math.ceil(this._count/this._limit)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isInitialized",{get:function(){return this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"hasPrev",{get:function(){return!!this._minPage&&this._minPage>1},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"hasNext",{get:function(){return this.page*this.limit<this.count},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isLoading",{get:function(){return this._isLoading},enumerable:!1,configurable:!0}),n.prototype.listCustomerReviews=function(e,r){return t(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,o.listCustomerReviews({productId:this._productId,salesChannelId:a.salesChannelId||"",page:e,limit:r})];case 1:return[2,t.sent()]}}))}))},n.prototype.toJSON=function(){return{data:this.data,limit:this._limit,page:this._page,count:this._count,initialized:this._initialized,minPage:this._minPage,productId:this._productId}},n}();export{n as IkasCustomerReviewList};
1
+ import{__awaiter as t,__generator as i}from'../../../ext/tslib/tslib.es6.js';import{makeAutoObservable as e}from"mobx";import{IkasCustomerReview as r}from"../../data/customer-review/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{IkasCustomerReviewAPI as o}from"../../../api/customer-review/index.js";import"../../../api/customer-review-summary/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"../../data/blog/index.js";import"../../data/brand/index.js";import"../../data/category/index.js";import"../../data/checkout/index.js";import"../../data/customer/address/index.js";import"../../data/customer/index.js";import"../../data/html-meta-data/index.js";import"../../data/image/index.js";import"../../data/installment-info/index.js";import"../../data/order/index.js";import"../../data/order/line-item/index.js";import"../../../api/product-option-file/index.js";import"../../data/product/index.js";import"../../data/variant-type/index.js";import"../../data/product/variant/index.js";import"../../data/product/variant/price/index.js";import"../../data/product-attribute/index.js";import"../../data/product/attribute-value/index.js";import"../../data/product-filter/index.js";import"../../data/variant-type/variant-value/index.js";import"../../data/order-transaction/index.js";import"../../data/product-option-set/index.js";import"../../data/raffle/index.js";import"../../data/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"../brand-list/index.js";import"../blog-list/index.js";import"../blog-category-list/index.js";import"../category-list/index.js";import"../product-detail/index.js";import"../product-list/index.js";import"../product-attribute-detail/index.js";import"../product-attribute-list/index.js";import"../customer-review-summary-list/index.js";import"../validator/index.js";import"../validator/rules/index.js";import"../validator/form/login.js";import"../validator/form/address.js";import"../validator/form/register.js";import"../validator/form/contact-form.js";import"../validator/form/forgot-password.js";import"../validator/form/recover-password.js";import"../validator/form/account-info.js";import"../validator/form/raffle-form.js";import"../validator/form/customer-review.js";import"../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"../../../api/back-in-stock-reminder/index.js";import"../../../api/product-campaign/index.js";import{IkasStorefrontConfig as a}from"../../../storefront/index.js";var s=function(){function s(o){var a=this;this._initialized=!1,this._minPage=null,this._isLoading=!1,this.getInitial=function(){return t(a,void 0,void 0,(function(){var t,e;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,this.listCustomerReviews(this.page,this.limit)];case 2:return t=i.sent(),this.data=t.data,this._count=t.count,this._initialized=!0,this._minPage=this.page,[3,5];case 3:return e=i.sent(),console.log(e),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getPrev=function(){return t(a,void 0,void 0,(function(){var t,e,r;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading||!this.hasPrev)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),t=this._minPage-1,[4,this.listCustomerReviews(t,this.limit)];case 2:return e=i.sent(),this.data=e.data.concat(this.data),this._count=e.count,this._minPage=t,[3,5];case 3:return r=i.sent(),console.log(r),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getNext=function(){return t(a,void 0,void 0,(function(){var t,e;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading||!this.hasNext)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,this.listCustomerReviews(this.page+1,this.limit)];case 2:return t=i.sent(),this.data=this.data.concat(t.data),this._count=t.count,this._page=this.page+1,[3,5];case 3:return e=i.sent(),console.log(e),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getPage=function(e){return t(a,void 0,void 0,(function(){var t,r;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,this.listCustomerReviews(e,this.limit)];case 2:return t=i.sent(),this.data=t.data,this._count=t.count,this._page=e,this._minPage=e,[3,5];case 3:return r=i.sent(),console.log(r),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.data=o.data?o.data.map((function(t){return new r(t)})):[],this._limit=o.limit||5,this._page=o.page||1,this._count=o.count||0,this._initialized=o.initialized||!1,this._minPage=o.minPage,this._productId=o.productId,e(this)}return Object.defineProperty(s.prototype,"limit",{get:function(){return this._limit},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"page",{get:function(){return this._page},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"count",{get:function(){return this._count},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"pageCount",{get:function(){return Math.ceil(this._count/this._limit)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"isInitialized",{get:function(){return this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"hasPrev",{get:function(){return!!this._minPage&&this._minPage>1},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"hasNext",{get:function(){return this.page*this.limit<this.count},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"isLoading",{get:function(){return this._isLoading},enumerable:!1,configurable:!0}),s.prototype.listCustomerReviews=function(e,r){return t(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,o.listCustomerReviews({productId:this._productId,salesChannelId:a.salesChannelId||"",page:e,limit:r})];case 1:return[2,t.sent()]}}))}))},s.prototype.toJSON=function(){return{data:this.data,limit:this._limit,page:this._page,count:this._count,initialized:this._initialized,minPage:this._minPage,productId:this._productId}},s}();export{s as IkasCustomerReviewList};
@@ -0,0 +1,43 @@
1
+ import { IkasCustomerReviewSummary } from "src/models/data/customer-review-summary";
2
+ export declare class IkasCustomerReviewSummaryList {
3
+ data: IkasCustomerReviewSummary[];
4
+ private _limit;
5
+ private _page;
6
+ private _count;
7
+ private _initialized;
8
+ private _minPage?;
9
+ private _productId;
10
+ private _isLoading;
11
+ constructor(data: IkasCustomerReviewSummaryParams);
12
+ get limit(): number;
13
+ get page(): number;
14
+ get count(): number;
15
+ get pageCount(): number;
16
+ get isInitialized(): boolean;
17
+ get hasPrev(): boolean;
18
+ get hasNext(): boolean;
19
+ get isLoading(): boolean;
20
+ private listCustomerReviewSummary;
21
+ private getInitial;
22
+ getPrev: () => Promise<void>;
23
+ getNext: () => Promise<void>;
24
+ getPage: (page: number) => Promise<void>;
25
+ toJSON(): {
26
+ data: IkasCustomerReviewSummary[];
27
+ limit: number;
28
+ page: number;
29
+ count: number;
30
+ initialized: boolean;
31
+ minPage: number | null | undefined;
32
+ productId: string;
33
+ };
34
+ }
35
+ export declare type IkasCustomerReviewSummaryParams = {
36
+ data?: IkasCustomerReviewSummary[];
37
+ limit?: number;
38
+ page?: number;
39
+ count?: number;
40
+ initialized?: boolean;
41
+ minPage?: number;
42
+ productId: string;
43
+ };
@@ -0,0 +1 @@
1
+ import{__awaiter as t,__generator as i}from'../../../ext/tslib/tslib.es6.js';import{makeAutoObservable as e}from"mobx";import{IkasCustomerReviewSummary as r}from"../../data/customer-review-summary/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{IkasCustomerReviewSummaryAPI as a}from"../../../api/customer-review-summary/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"../../data/blog/index.js";import"../../data/brand/index.js";import"../../data/category/index.js";import"../../data/checkout/index.js";import"../../data/customer/address/index.js";import"../../data/customer/index.js";import"../../data/customer-review/index.js";import"../../data/html-meta-data/index.js";import"../../data/image/index.js";import"../../data/installment-info/index.js";import"../../data/order/index.js";import"../../data/order/line-item/index.js";import"../../../api/product-option-file/index.js";import"../../data/product/index.js";import"../../data/variant-type/index.js";import"../../data/product/variant/index.js";import"../../data/product/variant/price/index.js";import"../../data/product-attribute/index.js";import"../../data/product/attribute-value/index.js";import"../../data/product-filter/index.js";import"../../data/variant-type/variant-value/index.js";import"../../data/order-transaction/index.js";import"../../data/product-option-set/index.js";import"../../data/raffle/index.js";import"../../data/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"../brand-list/index.js";import"../blog-list/index.js";import"../blog-category-list/index.js";import"../category-list/index.js";import"../product-detail/index.js";import"../product-list/index.js";import"../product-attribute-detail/index.js";import"../product-attribute-list/index.js";import"../customer-review-list/index.js";import"../validator/index.js";import"../validator/rules/index.js";import"../validator/form/login.js";import"../validator/form/address.js";import"../validator/form/register.js";import"../validator/form/contact-form.js";import"../validator/form/forgot-password.js";import"../validator/form/recover-password.js";import"../validator/form/account-info.js";import"../validator/form/raffle-form.js";import"../validator/form/customer-review.js";import"../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"../../../api/back-in-stock-reminder/index.js";import"../../../api/product-campaign/index.js";var o=function(){function o(a){var o=this;this._initialized=!1,this._minPage=null,this._isLoading=!1,this.getInitial=function(){return t(o,void 0,void 0,(function(){var t,e;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,this.listCustomerReviewSummary(this.page,this.limit)];case 2:return t=i.sent(),this.data=t.data,this._count=t.count,this._initialized=!0,this._minPage=this.page,[3,5];case 3:return e=i.sent(),console.log(e),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getPrev=function(){return t(o,void 0,void 0,(function(){var t,e,r;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading||!this.hasPrev)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),t=this._minPage-1,[4,this.listCustomerReviewSummary(t,this.limit)];case 2:return e=i.sent(),this.data=e.data.concat(this.data),this._count=e.count,this._minPage=t,[3,5];case 3:return r=i.sent(),console.log(r),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getNext=function(){return t(o,void 0,void 0,(function(){var t,e;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading||!this.hasNext)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,this.listCustomerReviewSummary(this.page+1,this.limit)];case 2:return t=i.sent(),this.data=this.data.concat(t.data),this._count=t.count,this._page=this.page+1,[3,5];case 3:return e=i.sent(),console.log(e),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getPage=function(e){return t(o,void 0,void 0,(function(){var t,r;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,this.listCustomerReviewSummary(e,this.limit)];case 2:return t=i.sent(),this.data=t.data,this._count=t.count,this._page=e,this._minPage=e,[3,5];case 3:return r=i.sent(),console.log(r),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.data=a.data?a.data.map((function(t){return new r(t)})):[],this._limit=a.limit||5,this._page=a.page||1,this._count=a.count||0,this._initialized=a.initialized||!1,this._minPage=a.minPage,this._productId=a.productId,e(this)}return Object.defineProperty(o.prototype,"limit",{get:function(){return this._limit},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"page",{get:function(){return this._page},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"count",{get:function(){return this._count},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"pageCount",{get:function(){return Math.ceil(this._count/this._limit)},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"isInitialized",{get:function(){return this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"hasPrev",{get:function(){return!!this._minPage&&this._minPage>1},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"hasNext",{get:function(){return this.page*this.limit<this.count},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"isLoading",{get:function(){return this._isLoading},enumerable:!1,configurable:!0}),o.prototype.listCustomerReviewSummary=function(e,r){return t(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,a.listCustomerReviewSummary({productId:{eq:this._productId},pagination:{page:e,limit:r}})];case 1:return[2,t.sent()]}}))}))},o.prototype.toJSON=function(){return{data:this.data,limit:this._limit,page:this._page,count:this._count,initialized:this._initialized,minPage:this._minPage,productId:this._productId}},o}();export{o as IkasCustomerReviewSummaryList};
@@ -10,6 +10,7 @@ export { IkasProductList, IkasProductListType, IkasProductListSortType, IkasRela
10
10
  export * from "./product-attribute-detail";
11
11
  export * from "./product-attribute-list";
12
12
  export * from "./customer-review-list";
13
+ export * from "./customer-review-summary-list";
13
14
  export { Validator } from "./validator";
14
15
  export type { ValidationStatus } from "./validator";
15
16
  export * from "./validator/rules";
@@ -1,4 +1,4 @@
1
- import { IkasProduct, IkasVariantValue, IkasCustomerReviewList } from "../../../models";
1
+ import { IkasProduct, IkasVariantValue, IkasCustomerReviewList, IkasCustomerReviewSummaryList } from "../../../models";
2
2
  import { NextRouter } from "next/router.js";
3
3
  import { IkasProductCampaign, IkasProductVariant, IkasVariantType } from "../../../models/data";
4
4
  export declare class IkasProductDetail {
@@ -15,6 +15,7 @@ export declare class IkasProductDetail {
15
15
  get isCustomerReviewEnabled(): boolean;
16
16
  get isCustomerReviewLoginRequired(): boolean;
17
17
  getCustomerReviews(): Promise<IkasCustomerReviewList>;
18
+ getCustomerReviewsSummary(): Promise<IkasCustomerReviewSummaryList>;
18
19
  getProductCampaigns(): Promise<void>;
19
20
  selectVariantValue(variantValue: IkasVariantValue): void;
20
21
  }
@@ -1 +1 @@
1
- import{__spreadArray as t,__awaiter as i,__generator as e}from'../../../ext/tslib/tslib.es6.js';import{makeAutoObservable as r}from"mobx";import"../../data/blog/index.js";import"../../data/brand/index.js";import"../../data/category/index.js";import"../../data/checkout/index.js";import"../../data/customer/address/index.js";import"../../data/customer/index.js";import"../../data/customer-review/index.js";import"../../data/html-meta-data/index.js";import"../../data/image/index.js";import"../../data/installment-info/index.js";import"../../data/order/index.js";import"../../data/order/line-item/index.js";import"../../../api/product-option-file/index.js";import{IkasProduct as n}from"../../data/product/index.js";import"../../data/variant-type/index.js";import"../../data/product/variant/index.js";import"../../data/product/variant/price/index.js";import"../../data/product-attribute/index.js";import"../../data/product/attribute-value/index.js";import"../../data/product-filter/index.js";import{IkasVariantValue as a}from"../../data/variant-type/variant-value/index.js";import"../../data/order-transaction/index.js";import"../../data/product-option-set/index.js";import"../../data/raffle/index.js";import"../../data/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"../brand-list/index.js";import"../blog-list/index.js";import"../blog-category-list/index.js";import"../category-list/index.js";import"../product-list/index.js";import"../product-attribute-detail/index.js";import"../product-attribute-list/index.js";import{IkasCustomerReviewList as o}from"../customer-review-list/index.js";import"../validator/index.js";import"../validator/rules/index.js";import"../validator/form/login.js";import"../validator/form/address.js";import"../validator/form/register.js";import"../validator/form/contact-form.js";import"../validator/form/forgot-password.js";import"../validator/form/recover-password.js";import"../validator/form/account-info.js";import"../validator/form/raffle-form.js";import"../validator/form/customer-review.js";import"../raffle-list/index.js";import"../../theme/settings/index.js";import"../../theme/custom-data/index.js";import{Analytics as s}from"../../../analytics/analytics.js";import"../../../analytics/head/index.js";import{IkasStorefrontConfig as u}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"../../../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"../../../api/back-in-stock-reminder/index.js";import{IkasProductCampaignAPI as d}from"../../../api/product-campaign/index.js";var c=function(){function c(t,i,e,o){this.router=null,this.campaings=null,this.product=new n(t),this.selectedVariantValues=i.map((function(t){return new a(t)})),this.router=e,this.campaings=o,r(this)}return Object.defineProperty(c.prototype,"mainVariantValue",{get:function(){return this.selectedVariantValues.length?this.selectedVariantValues[0]:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"selectedVariant",{get:function(){if(!this.product.hasVariant)return this.product.variants[0];var t=this.selectedVariantValues.map((function(t){return t.id}));return this.product.variants.find((function(i){return i.variantValues.every((function(i){return t.includes(i.id)}))}))},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"href",{get:function(){var t=this,i=this.product.metaData;if(!(null==i?void 0:i.slug))return"";var e=this.product.variantTypes.map((function(i){var e=i.variantType,r=e.values.find((function(i){return t.selectedVariantValues.some((function(t){return t.id===i.id}))}));if(r)return"".concat(e.slug,"=").concat(r.slug)})).filter((function(t){return!!t})).join("&");return e?"/".concat(i.slug,"?").concat(e):"/".concat(i.slug)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"hasStock",{get:function(){return this.product.hasStock},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"displayedVariantTypes",{get:function(){var i=this,e=this.product.variantTypes.map((function(e,r){var n=e.variantType,a=[],o=r>0?i.product.variantTypes.slice(0,r):null,s=[];return o&&(s=i.selectedVariantValues.filter((function(t){return o.some((function(i){return i.variantType.id===t.variantTypeId}))}))),n.values.forEach((function(e){var r=t(t([],s,!0),[e],!1),n=i.product.variants.find((function(t){return t.isActive&&r.every((function(i){return t.variantValues.some((function(t){return t.id===i.id}))}))})),o=i.product.variants.find((function(t){return t.isActive&&t.hasStock&&r.every((function(i){return t.variantValues.some((function(t){return t.id===i.id}))}))})),u=i.selectedVariant.variantValues.some((function(t){return t.id===e.id}));n&&a.push({variant:n,variantValue:e,hasStock:!!o,isSelected:u})})),{variantType:n,displayedVariantValues:a}}));return 1===e.length&&(e[0].displayedVariantValues=e[0].displayedVariantValues.filter((function(t){return t.variant.isActive}))),e},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isCustomerReviewEnabled",{get:function(){return!!u.customerReviewSettings&&!u.customerReviewSettings.customerPurchaseRequired},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isCustomerReviewLoginRequired",{get:function(){return!u.customerReviewSettings||u.customerReviewSettings.customerLoginRequired},enumerable:!1,configurable:!0}),c.prototype.getCustomerReviews=function(){return i(this,void 0,void 0,(function(){var t;return e(this,(function(i){switch(i.label){case 0:return[4,(t=new o({productId:this.product.id})).getInitial()];case 1:return i.sent(),[2,t]}}))}))},c.prototype.getProductCampaigns=function(){return i(this,void 0,void 0,(function(){var t,i,r,n,a,o=this;return e(this,(function(e){switch(e.label){case 0:return t=u.store,i=t.customerStore.customer,r=i?i.customerGroupIds:null,n=this.product.variants.map((function(t){return t.id})),a=this,[4,d.getProductCampaigns({customerGroupIds:r,salesChannelId:u.salesChannelId||"",variantIds:n})];case 1:return a.campaings=e.sent(),this.campaings&&this.campaings.map((function(t){o.product.variants.map((function(i){t.variantIds.some((function(t){return t===i.id}))&&i.campaigns.push(t)}))})),[2]}}))}))},c.prototype.selectVariantValue=function(i){var e,r=this,n=this.product.metaData,a=this.selectedVariantValues.map((function(t){return t.variantTypeId===i.variantTypeId?i:t})),o=this.product.variants.find((function(t){return t.isActive&&a.every((function(i){return t.variantValues.some((function(t){return t.id===i.id}))}))}));if(o)this.selectedVariantValues=a;else{var u=this.product.variantTypes.findIndex((function(t){return t.variantType.id===i.variantTypeId}));if(u>0){var d=this.product.variantTypes.slice(0,u),c=this.selectedVariantValues.filter((function(t){return d.some((function(i){return i.variantType.id===t.variantTypeId}))})),p=t(t([],c,!0),[i],!1);o=this.product.variants.find((function(t){return t.isActive&&p.every((function(i){return t.variantValues.some((function(t){return t.id===i.id}))}))}))}else{var m=a.slice(0,a.length-1);(o=this.product.variants.find((function(t){return t.isActive&&m.every((function(i){return t.variantValues.some((function(t){return t.id===i.id}))}))})))||(o=this.product.variants.find((function(t){return t.isActive&&t.variantValues.some((function(t){return t.id===i.id}))})))}if(!o)return;this.selectedVariantValues=o.variantValues}var l=this.product.variantTypes.map((function(t){var i=t.variantType,e=i.values.find((function(t){return r.selectedVariantValues.some((function(i){return i.id===t.id}))}));if(e)return"".concat(i.slug,"=").concat(e.slug)})).filter((function(t){return!!t})).join("&"),f="/".concat(n.slug);if(l&&(f="/".concat(n.slug,"?").concat(l)),f!==window.location.pathname){var v="production"!==process.env.NODE_ENV;null===(e=this.router)||void 0===e||e.replace(f,void 0,{shallow:v,scroll:!1}),s.productView(this)}},c}();export{c as IkasProductDetail};
1
+ import{__spreadArray as t,__awaiter as i,__generator as e}from'../../../ext/tslib/tslib.es6.js';import{makeAutoObservable as r}from"mobx";import"../../data/blog/index.js";import"../../data/brand/index.js";import"../../data/category/index.js";import"../../data/checkout/index.js";import"../../data/customer/address/index.js";import"../../data/customer/index.js";import"../../data/customer-review/index.js";import"../../data/html-meta-data/index.js";import"../../data/image/index.js";import"../../data/installment-info/index.js";import"../../data/order/index.js";import"../../data/order/line-item/index.js";import"../../../api/product-option-file/index.js";import{IkasProduct as n}from"../../data/product/index.js";import"../../data/variant-type/index.js";import"../../data/product/variant/index.js";import"../../data/product/variant/price/index.js";import"../../data/product-attribute/index.js";import"../../data/product/attribute-value/index.js";import"../../data/product-filter/index.js";import{IkasVariantValue as a}from"../../data/variant-type/variant-value/index.js";import"../../data/order-transaction/index.js";import"../../data/product-option-set/index.js";import"../../data/raffle/index.js";import"../../data/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"../brand-list/index.js";import"../blog-list/index.js";import"../blog-category-list/index.js";import"../category-list/index.js";import"../product-list/index.js";import"../product-attribute-detail/index.js";import"../product-attribute-list/index.js";import{IkasCustomerReviewList as o}from"../customer-review-list/index.js";import{IkasCustomerReviewSummaryList as s}from"../customer-review-summary-list/index.js";import"../validator/index.js";import"../validator/rules/index.js";import"../validator/form/login.js";import"../validator/form/address.js";import"../validator/form/register.js";import"../validator/form/contact-form.js";import"../validator/form/forgot-password.js";import"../validator/form/recover-password.js";import"../validator/form/account-info.js";import"../validator/form/raffle-form.js";import"../validator/form/customer-review.js";import"../raffle-list/index.js";import"../../theme/settings/index.js";import"../../theme/custom-data/index.js";import{Analytics as u}from"../../../analytics/analytics.js";import"../../../analytics/head/index.js";import{IkasStorefrontConfig as d}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/customer-review-summary/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"../../../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"../../../api/back-in-stock-reminder/index.js";import{IkasProductCampaignAPI as c}from"../../../api/product-campaign/index.js";var p=function(){function p(t,i,e,o){this.router=null,this.campaings=null,this.product=new n(t),this.selectedVariantValues=i.map((function(t){return new a(t)})),this.router=e,this.campaings=o,r(this)}return Object.defineProperty(p.prototype,"mainVariantValue",{get:function(){return this.selectedVariantValues.length?this.selectedVariantValues[0]:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"selectedVariant",{get:function(){if(!this.product.hasVariant)return this.product.variants[0];var t=this.selectedVariantValues.map((function(t){return t.id}));return this.product.variants.find((function(i){return i.variantValues.every((function(i){return t.includes(i.id)}))}))},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"href",{get:function(){var t=this,i=this.product.metaData;if(!(null==i?void 0:i.slug))return"";var e=this.product.variantTypes.map((function(i){var e=i.variantType,r=e.values.find((function(i){return t.selectedVariantValues.some((function(t){return t.id===i.id}))}));if(r)return"".concat(e.slug,"=").concat(r.slug)})).filter((function(t){return!!t})).join("&");return e?"/".concat(i.slug,"?").concat(e):"/".concat(i.slug)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"hasStock",{get:function(){return this.product.hasStock},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"displayedVariantTypes",{get:function(){var i=this,e=this.product.variantTypes.map((function(e,r){var n=e.variantType,a=[],o=r>0?i.product.variantTypes.slice(0,r):null,s=[];return o&&(s=i.selectedVariantValues.filter((function(t){return o.some((function(i){return i.variantType.id===t.variantTypeId}))}))),n.values.forEach((function(e){var r=t(t([],s,!0),[e],!1),n=i.product.variants.find((function(t){return t.isActive&&r.every((function(i){return t.variantValues.some((function(t){return t.id===i.id}))}))})),o=i.product.variants.find((function(t){return t.isActive&&t.hasStock&&r.every((function(i){return t.variantValues.some((function(t){return t.id===i.id}))}))})),u=i.selectedVariant.variantValues.some((function(t){return t.id===e.id}));n&&a.push({variant:n,variantValue:e,hasStock:!!o,isSelected:u})})),{variantType:n,displayedVariantValues:a}}));return 1===e.length&&(e[0].displayedVariantValues=e[0].displayedVariantValues.filter((function(t){return t.variant.isActive}))),e},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"isCustomerReviewEnabled",{get:function(){return!!d.customerReviewSettings&&!d.customerReviewSettings.customerPurchaseRequired},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"isCustomerReviewLoginRequired",{get:function(){return!d.customerReviewSettings||d.customerReviewSettings.customerLoginRequired},enumerable:!1,configurable:!0}),p.prototype.getCustomerReviews=function(){return i(this,void 0,void 0,(function(){var t;return e(this,(function(i){switch(i.label){case 0:return[4,(t=new o({productId:this.product.id})).getInitial()];case 1:return i.sent(),[2,t]}}))}))},p.prototype.getCustomerReviewsSummary=function(){return i(this,void 0,void 0,(function(){var t;return e(this,(function(i){switch(i.label){case 0:return[4,(t=new s({productId:this.product.id})).getInitial()];case 1:return i.sent(),[2,t]}}))}))},p.prototype.getProductCampaigns=function(){return i(this,void 0,void 0,(function(){var t,i,r,n,a,o=this;return e(this,(function(e){switch(e.label){case 0:return t=d.store,i=t.customerStore.customer,r=i?i.customerGroupIds:null,n=this.product.variants.map((function(t){return t.id})),a=this,[4,c.getProductCampaigns({customerGroupIds:r,salesChannelId:d.salesChannelId||"",variantIds:n})];case 1:return a.campaings=e.sent(),this.campaings&&this.campaings.map((function(t){o.product.variants.map((function(i){t.variantIds.some((function(t){return t===i.id}))&&i.campaigns.push(t)}))})),[2]}}))}))},p.prototype.selectVariantValue=function(i){var e,r=this,n=this.product.metaData,a=this.selectedVariantValues.map((function(t){return t.variantTypeId===i.variantTypeId?i:t})),o=this.product.variants.find((function(t){return t.isActive&&a.every((function(i){return t.variantValues.some((function(t){return t.id===i.id}))}))}));if(o)this.selectedVariantValues=a;else{var s=this.product.variantTypes.findIndex((function(t){return t.variantType.id===i.variantTypeId}));if(s>0){var d=this.product.variantTypes.slice(0,s),c=this.selectedVariantValues.filter((function(t){return d.some((function(i){return i.variantType.id===t.variantTypeId}))})),p=t(t([],c,!0),[i],!1);o=this.product.variants.find((function(t){return t.isActive&&p.every((function(i){return t.variantValues.some((function(t){return t.id===i.id}))}))}))}else{var m=a.slice(0,a.length-1);(o=this.product.variants.find((function(t){return t.isActive&&m.every((function(i){return t.variantValues.some((function(t){return t.id===i.id}))}))})))||(o=this.product.variants.find((function(t){return t.isActive&&t.variantValues.some((function(t){return t.id===i.id}))})))}if(!o)return;this.selectedVariantValues=o.variantValues}var l=this.product.variantTypes.map((function(t){var i=t.variantType,e=i.values.find((function(t){return r.selectedVariantValues.some((function(i){return i.id===t.id}))}));if(e)return"".concat(i.slug,"=").concat(e.slug)})).filter((function(t){return!!t})).join("&"),f="/".concat(n.slug);if(l&&(f="/".concat(n.slug,"?").concat(l)),f!==window.location.pathname){var v="production"!==process.env.NODE_ENV;null===(e=this.router)||void 0===e||e.replace(f,void 0,{shallow:v,scroll:!1}),u.productView(this)}},p}();export{p as IkasProductDetail};