@ikas/storefront 2.0.14 → 2.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/__generated__/global-types.d.ts +46 -1
- package/build/__generated__/global-types.js +1 -1
- package/build/_virtual/index.js_commonjs-proxy2.js +1 -1
- package/build/_virtual/index.js_commonjs-proxy3.js +1 -1
- package/build/_virtual/index.js_commonjs-proxy4.js +1 -1
- package/build/analytics/analytics.js +1 -1
- package/build/analytics/googleTagManager.js +1 -1
- package/build/analytics/ikas.js +1 -1
- package/build/api/brand/index.js +1 -1
- package/build/api/category/index.js +1 -1
- package/build/api/checkout/index.js +1 -1
- package/build/api/customer/__generated__/customerLogin.d.ts +4 -0
- package/build/api/customer/__generated__/customerSocialLogin.d.ts +4 -0
- package/build/api/customer/__generated__/getMyCustomer.d.ts +4 -0
- package/build/api/customer/__generated__/registerCustomer.d.ts +4 -0
- package/build/api/customer/__generated__/saveMyCustomer.d.ts +4 -0
- package/build/api/customer/index.js +1 -1
- package/build/api/customer-review/__generated__/listCustomerReviews.d.ts +1 -0
- package/build/api/customer-review/index.js +1 -1
- package/build/api/favorite-product/index.js +1 -1
- package/build/api/html-meta-data/index.js +1 -1
- package/build/api/index.d.ts +1 -0
- package/build/api/merchant/index.js +1 -1
- package/build/api/product-campanign/__generated__/getProductCampaigns.d.ts +91 -0
- package/build/api/product-campanign/index.d.ts +10 -0
- package/build/api/product-campanign/index.js +1 -0
- package/build/api/product-option-set/__generated__/ListProductOptionSet.d.ts +2 -0
- package/build/api/product-search/index.js +1 -1
- package/build/components/checkout/components/address-form/model.js +1 -1
- package/build/components/checkout/components/cart-summary/cart-item/index.js +1 -1
- package/build/components/checkout/components/credit-card-form/index.js +1 -1
- package/build/components/checkout/components/customer-addresses/model.js +1 -1
- package/build/components/checkout/index.js +1 -1
- package/build/components/checkout/model.js +1 -1
- package/build/components/checkout/steps/step-success/index.js +1 -1
- package/build/components/page/head.js +1 -1
- package/build/components/page/index.js +1 -1
- package/build/components/page-editor/ThemeComponentEditor.js +1 -1
- package/build/components/page-editor/model.js +1 -1
- package/build/ikas.js +7 -7
- package/build/index.js +1 -1
- package/build/models/data/customer/index.d.ts +1 -0
- package/build/models/data/customer/index.js +1 -1
- package/build/models/data/customer-review/index.d.ts +3 -0
- package/build/models/data/customer-review/index.js +1 -1
- package/build/models/data/index.d.ts +1 -0
- package/build/models/data/product/variant/index.d.ts +2 -0
- package/build/models/data/product/variant/index.js +1 -1
- package/build/models/data/product-campaing/campaign/index.d.ts +41 -0
- package/build/models/data/product-campaing/campaign/index.js +1 -0
- package/build/models/data/product-campaing/filter/index.d.ts +13 -0
- package/build/models/data/product-campaing/filter/index.js +1 -0
- package/build/models/data/product-campaing/index.d.ts +6 -0
- package/build/models/data/product-campaing/index.js +1 -0
- package/build/models/data/product-campaing/product-buyx-then-gety/index.d.ts +19 -0
- package/build/models/data/product-campaing/product-buyx-then-gety/index.js +1 -0
- package/build/models/data/product-campaing/product-campaign-date-range-field/index.d.ts +5 -0
- package/build/models/data/product-campaing/product-campaign-date-range-field/index.js +1 -0
- package/build/models/data/product-campaing/product-fixed-discount/index.d.ts +13 -0
- package/build/models/data/product-campaing/product-fixed-discount/index.js +1 -0
- package/build/models/data/product-option-set/index.d.ts +4 -0
- package/build/models/data/product-option-set/index.js +1 -1
- package/build/models/ui/blog-category-list/index.js +1 -1
- package/build/models/ui/blog-list/index.js +1 -1
- package/build/models/ui/brand-list/index.js +1 -1
- package/build/models/ui/category-list/index.js +1 -1
- package/build/models/ui/customer-review-list/index.js +1 -1
- package/build/models/ui/product-detail/index.d.ts +4 -2
- package/build/models/ui/product-detail/index.js +1 -1
- package/build/models/ui/product-list/index.js +1 -1
- package/build/models/ui/raffle-list/index.js +1 -1
- package/build/models/ui/validator/form/address.js +1 -1
- package/build/pages/404.js +1 -1
- package/build/pages/_slug_/index.js +1 -1
- package/build/pages/account/addresses.js +1 -1
- package/build/pages/account/favorite-products.js +1 -1
- package/build/pages/account/forgot-password.js +1 -1
- package/build/pages/account/index.js +1 -1
- package/build/pages/account/login.js +1 -1
- package/build/pages/account/orders/_id_.js +1 -1
- package/build/pages/account/orders/index.js +1 -1
- package/build/pages/account/raffles.js +1 -1
- package/build/pages/account/recover-password.js +1 -1
- package/build/pages/account/register.js +1 -1
- package/build/pages/blog/_slug_.js +1 -1
- package/build/pages/blog/index.js +1 -1
- package/build/pages/cart.js +1 -1
- package/build/pages/checkout.js +1 -1
- package/build/pages/home.js +1 -1
- package/build/pages/pages/_slug_.js +1 -1
- package/build/pages/raffle/_slug_.js +1 -1
- package/build/pages/raffle/index.js +1 -1
- package/build/pages/search.js +1 -1
- package/build/providers/helpers/raffles.js +1 -1
- package/build/providers/page-data-get.js +1 -1
- package/build/providers/page-data-init.js +1 -1
- package/build/providers/page-data-next.js +1 -1
- package/build/providers/placeholders.js +1 -1
- package/build/providers/prop-value/attribute-list.js +1 -1
- package/build/providers/prop-value/attribute.js +1 -1
- package/build/providers/prop-value/blog-category-list.js +1 -1
- package/build/providers/prop-value/blog-category.js +1 -1
- package/build/providers/prop-value/blog-list.js +1 -1
- package/build/providers/prop-value/blog.js +1 -1
- package/build/providers/prop-value/brand-list.js +1 -1
- package/build/providers/prop-value/brand.js +1 -1
- package/build/providers/prop-value/category-list.js +1 -1
- package/build/providers/prop-value/category.js +1 -1
- package/build/providers/prop-value/custom.js +1 -1
- package/build/providers/prop-value/image-list.js +1 -1
- package/build/providers/prop-value/image.js +1 -1
- package/build/providers/prop-value/link.js +1 -1
- package/build/providers/prop-value/product-detail.js +1 -1
- package/build/providers/prop-value/product-list.js +1 -1
- package/build/providers/prop-value/raffle-list.js +1 -1
- package/build/providers/prop-value/raffle.js +1 -1
- package/build/scripts/generators/config/content.d.ts +1 -1
- package/build/scripts/generators/config/content.js +1 -1
- package/build/scripts/generators/types/index.js +1 -1
- package/build/store/base.js +1 -1
- package/build/store/cart.js +1 -1
- package/build/store/customer.js +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{Image}from"./components/image/index.js";export{IkasEditorComponentLoader}from"./components/page-editor/loader/index.js";export{IkasBlog,IkasBlogCategory,IkasBlogContent,IkasBlogMetaData,IkasBlogMetadataTargetType,IkasBlogTag,IkasBlogWriter}from"./models/data/blog/index.js";export{IkasBrand}from"./models/data/brand/index.js";export{IkasCategory,IkasCategoryPath,IkasFilterCategory}from"./models/data/category/index.js";export{IkasCheckout,IkasCheckoutCustomer,IkasCheckoutRecoveryEmailStatus,IkasCheckoutRecoveryStatus,IkasCheckoutStatus,IkasPaymentMethod,IkasShippingMethod,IkasShippingMethodEnum}from"./models/data/checkout/index.js";export{IkasCustomerAddress}from"./models/data/customer/address/index.js";export{IkasCustomer}from"./models/data/customer/index.js";export{IkasCustomerReview}from"./models/data/customer-review/index.js";export{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,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{IkasTheme}from"./models/theme/theme.js";export{IkasThemePage,IkasThemePageType}from"./models/theme/page/index.js";export{IkasThemePageComponent}from"./models/theme/page/component/index.js";export{IkasThemeComponent}from"./models/theme/component/index.js";export{IkasThemeComponentProp,IkasThemeComponentPropType}from"./models/theme/component/prop/index.js";export{IkasLinkPropValue,IkasLinkType}from"./models/theme/page/component/prop-value/link.js";export{IkasBrandPropValue}from"./models/theme/page/component/prop-value/brand.js";export{IkasBrandListPropValue}from"./models/theme/page/component/prop-value/brand-list.js";export{IkasProductListPropValue}from"./models/theme/page/component/prop-value/product-list.js";export{IkasProductDetailPropValue}from"./models/theme/page/component/prop-value/product-detail.js";export{IkasCategoryPropValue}from"./models/theme/page/component/prop-value/category.js";export{IkasCategoryListPropValue}from"./models/theme/page/component/prop-value/category-list.js";export{IkasThemeSettings}from"./models/theme/settings/index.js";export{IkasThemeCustomData}from"./models/theme/custom-data/index.js";export{IkasBlogPropValue}from"./models/theme/page/component/prop-value/blog.js";export{IkasBlogListPropValue}from"./models/theme/page/component/prop-value/blog-list.js";export{IkasBlogCategoryPropValue}from"./models/theme/page/component/prop-value/blog-category.js";export{IkasBlogCategoryListPropValue}from"./models/theme/page/component/prop-value/blog-category-list.js";export{IkasRafflePropValue}from"./models/theme/page/component/prop-value/raffle.js";export{IkasRaffleListPropValue}from"./models/theme/page/component/prop-value/raffle-list.js";export{IkasBlogList,IkasBlogListType}from"./models/ui/blog-list/index.js";export{IkasBlogCategoryList,IkasBlogCategoryListType}from"./models/ui/blog-category-list/index.js";export{IkasBrandList,IkasBrandListSortType,IkasBrandListType}from"./models/ui/brand-list/index.js";export{IkasCategoryList,IkasCategoryListSortType,IkasCategoryListType}from"./models/ui/category-list/index.js";export{IkasNavigationLink}from"./models/ui/navigation-link/index.js";export{IkasProductDetail}from"./models/ui/product-detail/index.js";export{IkasProductList,IkasProductListSortType,IkasProductListType}from"./models/ui/product-list/index.js";export{IkasAttributeDetail}from"./models/ui/product-attribute-detail/index.js";export{IkasAttributeList}from"./models/ui/product-attribute-list/index.js";export{IkasCustomerReviewList}from"./models/ui/customer-review-list/index.js";export{Validator}from"./models/ui/validator/index.js";export{EmailRule,EqualsRule,IdentityNumberRule,LessThanRule,MaxRule,MinRule,PhoneRule,RequiredRule,ValidationRule,ValidatorErrorType}from"./models/ui/validator/rules/index.js";export{LoginForm}from"./models/ui/validator/form/login.js";export{AddressForm}from"./models/ui/validator/form/address.js";export{RegisterForm}from"./models/ui/validator/form/register.js";export{ContactForm}from"./models/ui/validator/form/contact-form.js";export{ForgotPasswordForm}from"./models/ui/validator/form/forgot-password.js";export{RecoverPasswordForm}from"./models/ui/validator/form/recover-password.js";export{AccountInfoForm}from"./models/ui/validator/form/account-info.js";export{RaffleForm}from"./models/ui/validator/form/raffle-form.js";export{CustomerReviewForm}from"./models/ui/validator/form/customer-review.js";export{IkasComponentRenderer}from"./models/ui/component-renderer/index.js";export{IkasRaffleList}from"./models/ui/raffle-list/index.js";import*as e from"./pages/home.js";export{e as IndexPage};import*as o from"./pages/_slug_/index.js";export{o as SlugPage};import*as t from"./pages/pages/_slug_.js";export{t as CustomPage};import*as r from"./pages/checkout.js";export{r as CheckoutPage};import*as a from"./pages/account/index.js";export{a as AccountPage};import*as s from"./pages/account/addresses.js";export{s as AddressesPage};import*as p from"./pages/account/orders/index.js";export{p as OrdersPage};import*as
|
|
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,RangeValue,parseRangeStr}from"./models/data/product-filter/index.js";export{IkasFavoriteProduct}from"./models/data/favorite-product/index.js";export{IkasContactForm}from"./models/data/contact-form/index.js";export{IkasVariantSelectionType,IkasVariantType}from"./models/data/variant-type/index.js";export{IkasVariantValue}from"./models/data/variant-type/variant-value/index.js";export{IkasOrderTransaction,IkasTransactionStatusEnum,IkasTransactionTypeEnum}from"./models/data/order-transaction/index.js";export{IkasProductOption,IkasProductOptionDateSettings,IkasProductOptionFileSettings,IkasProductOptionSelectSettings,IkasProductOptionSelectType,IkasProductOptionSelectValue,IkasProductOptionSelectValueTranslations,IkasProductOptionSet,IkasProductOptionSetTranslations,IkasProductOptionTextSettings,IkasProductOptionTranslations,IkasProductOptionType}from"./models/data/product-option-set/index.js";export{IkasRaffle,IkasRaffleMetaData,IkasRaffleParticipant}from"./models/data/raffle/index.js";export{IkasSlider}from"./models/data/slider/index.js";export{IkasProductCampaign}from"./models/data/product-campaing/index.js";export{IkasTheme}from"./models/theme/theme.js";export{IkasThemePage,IkasThemePageType}from"./models/theme/page/index.js";export{IkasThemePageComponent}from"./models/theme/page/component/index.js";export{IkasThemeComponent}from"./models/theme/component/index.js";export{IkasThemeComponentProp,IkasThemeComponentPropType}from"./models/theme/component/prop/index.js";export{IkasLinkPropValue,IkasLinkType}from"./models/theme/page/component/prop-value/link.js";export{IkasBrandPropValue}from"./models/theme/page/component/prop-value/brand.js";export{IkasBrandListPropValue}from"./models/theme/page/component/prop-value/brand-list.js";export{IkasProductListPropValue}from"./models/theme/page/component/prop-value/product-list.js";export{IkasProductDetailPropValue}from"./models/theme/page/component/prop-value/product-detail.js";export{IkasCategoryPropValue}from"./models/theme/page/component/prop-value/category.js";export{IkasCategoryListPropValue}from"./models/theme/page/component/prop-value/category-list.js";export{IkasThemeSettings}from"./models/theme/settings/index.js";export{IkasThemeCustomData}from"./models/theme/custom-data/index.js";export{IkasBlogPropValue}from"./models/theme/page/component/prop-value/blog.js";export{IkasBlogListPropValue}from"./models/theme/page/component/prop-value/blog-list.js";export{IkasBlogCategoryPropValue}from"./models/theme/page/component/prop-value/blog-category.js";export{IkasBlogCategoryListPropValue}from"./models/theme/page/component/prop-value/blog-category-list.js";export{IkasRafflePropValue}from"./models/theme/page/component/prop-value/raffle.js";export{IkasRaffleListPropValue}from"./models/theme/page/component/prop-value/raffle-list.js";export{IkasBlogList,IkasBlogListType}from"./models/ui/blog-list/index.js";export{IkasBlogCategoryList,IkasBlogCategoryListType}from"./models/ui/blog-category-list/index.js";export{IkasBrandList,IkasBrandListSortType,IkasBrandListType}from"./models/ui/brand-list/index.js";export{IkasCategoryList,IkasCategoryListSortType,IkasCategoryListType}from"./models/ui/category-list/index.js";export{IkasNavigationLink}from"./models/ui/navigation-link/index.js";export{IkasProductDetail}from"./models/ui/product-detail/index.js";export{IkasProductList,IkasProductListSortType,IkasProductListType}from"./models/ui/product-list/index.js";export{IkasAttributeDetail}from"./models/ui/product-attribute-detail/index.js";export{IkasAttributeList}from"./models/ui/product-attribute-list/index.js";export{IkasCustomerReviewList}from"./models/ui/customer-review-list/index.js";export{Validator}from"./models/ui/validator/index.js";export{EmailRule,EqualsRule,IdentityNumberRule,LessThanRule,MaxRule,MinRule,PhoneRule,RequiredRule,ValidationRule,ValidatorErrorType}from"./models/ui/validator/rules/index.js";export{LoginForm}from"./models/ui/validator/form/login.js";export{AddressForm}from"./models/ui/validator/form/address.js";export{RegisterForm}from"./models/ui/validator/form/register.js";export{ContactForm}from"./models/ui/validator/form/contact-form.js";export{ForgotPasswordForm}from"./models/ui/validator/form/forgot-password.js";export{RecoverPasswordForm}from"./models/ui/validator/form/recover-password.js";export{AccountInfoForm}from"./models/ui/validator/form/account-info.js";export{RaffleForm}from"./models/ui/validator/form/raffle-form.js";export{CustomerReviewForm}from"./models/ui/validator/form/customer-review.js";export{IkasComponentRenderer}from"./models/ui/component-renderer/index.js";export{IkasRaffleList}from"./models/ui/raffle-list/index.js";import*as e from"./pages/home.js";export{e as IndexPage};import*as o from"./pages/_slug_/index.js";export{o as SlugPage};import*as t from"./pages/pages/_slug_.js";export{t as CustomPage};import*as r from"./pages/checkout.js";export{r as CheckoutPage};import*as a from"./pages/account/index.js";export{a as AccountPage};import*as s from"./pages/account/addresses.js";export{s as AddressesPage};import*as p from"./pages/account/orders/index.js";export{p as OrdersPage};import*as m from"./pages/account/orders/_id_.js";export{m as OrderDetailPage};import*as i from"./pages/account/login.js";export{i 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}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";
|
|
@@ -10,6 +10,7 @@ export declare class IkasCustomer {
|
|
|
10
10
|
accountStatus: IkasCustomerAccountStatus;
|
|
11
11
|
addresses: IkasCustomerAddress[];
|
|
12
12
|
subscriptionStatus: IkasCustomerEmailSubscriptionStatus | null;
|
|
13
|
+
customerGroupIds: string[] | null;
|
|
13
14
|
constructor(data: Partial<IkasCustomer>);
|
|
14
15
|
get isSubscribed(): boolean;
|
|
15
16
|
get basicInfo(): {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{IkasCustomerAddress as
|
|
1
|
+
import{IkasCustomerAddress as t}from"./address/index.js";import{makeAutoObservable as i}from"mobx";var s,e,r=function(){function r(e){this.phone=null,this.id=e.id||"",this.firstName=e.firstName||"",this.lastName=e.lastName||"",this.email=e.email||"",this.phone=e.phone,this.isEmailVerified=e.isEmailVerified||!1,this.isPhoneVerified=e.isPhoneVerified||!1,this.accountStatus=e.accountStatus||s.ACTIVE_ACCOUNT,this.addresses=e.addresses?e.addresses.map((function(i){return new t(i)})):[],this.subscriptionStatus=e.subscriptionStatus||null,this.customerGroupIds=e.customerGroupIds||null,i(this)}return Object.defineProperty(r.prototype,"isSubscribed",{get:function(){return this.subscriptionStatus===e.SUBSCRIBED||this.subscriptionStatus===e.PENDING_CONFIRMATION},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"basicInfo",{get:function(){return{id:this.id,firstName:this.firstName,lastName:this.lastName,email:this.email,phone:this.phone}},enumerable:!1,configurable:!0}),r}();!function(t){t.ACTIVE_ACCOUNT="ACTIVE_ACCOUNT",t.DECLINED_ACCOUNT_INVITATION="DECLINED_ACCOUNT_INVITATION",t.DISABLED_ACCOUNT="DISABLED_ACCOUNT",t.INVITED_TO_CREATE_ACCOUNT="INVITED_TO_CREATE_ACCOUNT"}(s||(s={})),function(t){t.NOT_SUBSCRIBED="NOT_SUBSCRIBED",t.PENDING_CONFIRMATION="PENDING_CONFIRMATION",t.SUBSCRIBED="SUBSCRIBED"}(e||(e={}));export{r as IkasCustomer,s as IkasCustomerAccountStatus,e as IkasCustomerEmailSubscriptionStatus};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { IkasImage } from "../image";
|
|
1
2
|
export declare class IkasCustomerReview {
|
|
2
3
|
comment: string;
|
|
3
4
|
createdAt: string;
|
|
4
5
|
customerId: string;
|
|
5
6
|
deleted: boolean;
|
|
6
7
|
id: string;
|
|
8
|
+
imageIds: string[] | null;
|
|
7
9
|
orderId: string;
|
|
8
10
|
orderNumber: string;
|
|
9
11
|
productId: string;
|
|
@@ -13,6 +15,7 @@ export declare class IkasCustomerReview {
|
|
|
13
15
|
storefrontId: string;
|
|
14
16
|
title: string;
|
|
15
17
|
updatedAt: string;
|
|
18
|
+
images: IkasImage[] | null;
|
|
16
19
|
constructor(data: Partial<IkasCustomerReview>);
|
|
17
20
|
}
|
|
18
21
|
declare enum CustomerReviewStatusEnum {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeAutoObservable as t}from"mobx";var
|
|
1
|
+
import{makeAutoObservable as t}from"mobx";import{IkasImage as e}from"../image/index.js";var s,d=function(d){this.comment=d.comment||"",this.createdAt=d.createdAt||"",this.customerId=d.customerId||"",this.deleted=d.deleted||!1,this.id=d.id||"",this.imageIds=d.imageIds||[],this.orderId=d.orderId||"",this.orderNumber=d.orderNumber||"",this.productId=d.productId||"",this.salesChannelId=d.salesChannelId||"",this.star=d.star||0,this.status=d.status||s.APPROVED,this.storefrontId=d.storefrontId||"",this.title=d.title||"",this.updatedAt=d.updatedAt||"",this.images=d.imageIds?d.imageIds.map((function(t){return new e(t)})):null,t(this)};!function(t){t.APPROVED="APPROVED",t.REJECTED="REJECTED",t.WAITING="WAITING"}(s||(s={}));export{d as IkasCustomerReview};
|
|
@@ -36,3 +36,4 @@ export { IkasOrderTransaction, IkasTransactionStatusEnum, IkasTransactionTypeEnu
|
|
|
36
36
|
export * from "./product-option-set";
|
|
37
37
|
export { IkasRaffle, IkasRaffleParticipant, IkasRaffleMetaData, } from "./raffle";
|
|
38
38
|
export { IkasSlider } from "./slider";
|
|
39
|
+
export { IkasProductCampaign } from "./product-campaing";
|
|
@@ -2,6 +2,7 @@ import { IkasProductPrice } from "./price";
|
|
|
2
2
|
import { IkasVariantValue } from "../../variant-type/variant-value";
|
|
3
3
|
import { IkasProductAttributeValue } from "../attribute-value";
|
|
4
4
|
import { IkasImage } from "../../image";
|
|
5
|
+
import { IkasProductCampaign } from "../../product-campaing";
|
|
5
6
|
export declare class IkasProductVariant {
|
|
6
7
|
id: string;
|
|
7
8
|
sku: string | null;
|
|
@@ -13,6 +14,7 @@ export declare class IkasProductVariant {
|
|
|
13
14
|
stock: number;
|
|
14
15
|
isActive: boolean;
|
|
15
16
|
productId: string;
|
|
17
|
+
campaigns: IkasProductCampaign[];
|
|
16
18
|
private _backInStockReminderSaved;
|
|
17
19
|
constructor(data?: Partial<IkasProductVariant>);
|
|
18
20
|
get mainImage(): IkasImage | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as i,__generator as t}from'../../../../ext/tslib/tslib.es6.js';import{makeAutoObservable as e}from"mobx";import{IkasProductPrice as r}from"./price/index.js";import{IkasVariantValue as o}from"../../variant-type/variant-value/index.js";import{IkasProductAttributeValue as n}from"../attribute-value/index.js";import{IkasImage as s}from"../../image/index.js";import{IkasStorefrontConfig as a}from"../../../../storefront/index.js";import"../../../../api/blog/index.js";import"../../../../api/brand/index.js";import"../../../../api/cart/index.js";import"../../../../api/category/index.js";import"../../../../api/checkout/index.js";import"../../../../api/city/index.js";import"../../../../api/country/index.js";import"../../../../api/customer/index.js";import"../../../../api/customer-review/index.js";import"../../../../api/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"../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"../../../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
|
|
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"../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-campanign/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};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import IkasProductBuyXThenGetY from "../product-buyx-then-gety";
|
|
2
|
+
import IkasProductCampaignDateRangeField from "../product-campaign-date-range-field";
|
|
3
|
+
import IkasProductFixedDiscount from "../product-fixed-discount";
|
|
4
|
+
export declare class IkasProductCampaignData {
|
|
5
|
+
applicableCustomerGroupIds: string | null;
|
|
6
|
+
applicableCustomerIds: string[] | null;
|
|
7
|
+
applicablePrice: CampaignApplicablePriceEnum;
|
|
8
|
+
buyXThenGetY: IkasProductBuyXThenGetY;
|
|
9
|
+
canCombineWithOtherCampaigns: boolean;
|
|
10
|
+
createdFor: CampaignCreatedForEnum | null;
|
|
11
|
+
currencyCode: string | null;
|
|
12
|
+
dateRange: IkasProductCampaignDateRangeField | null;
|
|
13
|
+
deleted: boolean;
|
|
14
|
+
fixedDiscount: IkasProductFixedDiscount | null;
|
|
15
|
+
hasCoupon: boolean;
|
|
16
|
+
id: string;
|
|
17
|
+
includeDiscountedProducts: boolean | null;
|
|
18
|
+
salesChannelIds: string[] | null;
|
|
19
|
+
title: string;
|
|
20
|
+
type: CampaignTypeEnum;
|
|
21
|
+
usageCount: number;
|
|
22
|
+
usageLimit: number | null;
|
|
23
|
+
usageLimitPerCustomer: number | null;
|
|
24
|
+
constructor(data?: Partial<IkasProductCampaignData>);
|
|
25
|
+
}
|
|
26
|
+
declare enum CampaignApplicablePriceEnum {
|
|
27
|
+
DISCOUNT_PRICE = "DISCOUNT_PRICE",
|
|
28
|
+
SELL_PRICE = "SELL_PRICE"
|
|
29
|
+
}
|
|
30
|
+
declare enum CampaignCreatedForEnum {
|
|
31
|
+
ABANDONED_CHECKOUT = "ABANDONED_CHECKOUT",
|
|
32
|
+
CART = "CART",
|
|
33
|
+
CUSTOMER_REVIEW = "CUSTOMER_REVIEW"
|
|
34
|
+
}
|
|
35
|
+
declare enum CampaignTypeEnum {
|
|
36
|
+
BUY_X_THEN_GET_Y = "BUY_X_THEN_GET_Y",
|
|
37
|
+
FIXED_AMOUNT = "FIXED_AMOUNT",
|
|
38
|
+
FREE_SHIPPING = "FREE_SHIPPING",
|
|
39
|
+
RATIO = "FREE_SHIPPING"
|
|
40
|
+
}
|
|
41
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{makeAutoObservable as e}from"mobx";import t from"../product-buyx-then-gety/index.js";import i from"../product-campaign-date-range-field/index.js";import n from"../product-fixed-discount/index.js";var s,u,o,a=function(u){void 0===u&&(u={}),this.applicableCustomerGroupIds=u.applicableCustomerGroupIds||null,this.applicableCustomerIds=u.applicableCustomerIds||null,this.applicablePrice=u.applicablePrice||s.DISCOUNT_PRICE,this.buyXThenGetY=u.buyXThenGetY?new t(u.buyXThenGetY):new t,this.canCombineWithOtherCampaigns=u.canCombineWithOtherCampaigns||!1,this.createdFor=u.createdFor||null,this.currencyCode=u.currencyCode||null,this.dateRange=u.dateRange?new i(u.dateRange):null,this.deleted=u.deleted||!1,this.fixedDiscount=u.fixedDiscount?new n(u.fixedDiscount):null,this.hasCoupon=u.hasCoupon||!1,this.id=u.id||"",this.includeDiscountedProducts=u.includeDiscountedProducts||null,this.salesChannelIds=u.salesChannelIds||null,this.title=u.title||"",this.type=u.type||o.BUY_X_THEN_GET_Y,this.usageCount=u.usageCount||0,this.usageLimit=u.usageLimit||null,this.usageLimitPerCustomer=u.usageLimitPerCustomer||null,e(this)};!function(e){e.DISCOUNT_PRICE="DISCOUNT_PRICE",e.SELL_PRICE="SELL_PRICE"}(s||(s={})),function(e){e.ABANDONED_CHECKOUT="ABANDONED_CHECKOUT",e.CART="CART",e.CUSTOMER_REVIEW="CUSTOMER_REVIEW"}(u||(u={})),function(e){e.BUY_X_THEN_GET_Y="BUY_X_THEN_GET_Y",e.FIXED_AMOUNT="FIXED_AMOUNT",e.FREE_SHIPPING="FREE_SHIPPING",e.RATIO="FREE_SHIPPING"}(o||(o={}));export{a as IkasProductCampaignData};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export default class IkasProductCampaignFilter {
|
|
2
|
+
idList: string[];
|
|
3
|
+
type: CampaignFilterTypeEnum;
|
|
4
|
+
constructor(data?: Partial<IkasProductCampaignFilter>);
|
|
5
|
+
}
|
|
6
|
+
declare enum CampaignFilterTypeEnum {
|
|
7
|
+
CATEGORY = "CATEGORY",
|
|
8
|
+
PRODUCT = "PRODUCT",
|
|
9
|
+
PRODUCT_BRAND = "PRODUCT_BRAND",
|
|
10
|
+
PRODUCT_TAG = "PRODUCT_TAG",
|
|
11
|
+
VARIANT = "VARIANT"
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{makeAutoObservable as R}from"mobx";var T,t=function(t){void 0===t&&(t={}),this.idList=t.idList||[],this.type=t.type||T.PRODUCT,R(this)};!function(R){R.CATEGORY="CATEGORY",R.PRODUCT="PRODUCT",R.PRODUCT_BRAND="PRODUCT_BRAND",R.PRODUCT_TAG="PRODUCT_TAG",R.VARIANT="VARIANT"}(T||(T={}));export{t as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{makeAutoObservable as a}from"mobx";import{IkasProductCampaignData as i}from"./campaign/index.js";var n=function(n){this.campaign=n.campaign?new i(n.campaign):new i,this.variantIds=n.variantIds||[],a(this)};export{n as IkasProductCampaign};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import IkasProductCampaignFilter from "../filter";
|
|
2
|
+
export declare class IkasProductBuyX {
|
|
3
|
+
amount: number;
|
|
4
|
+
applyByQuantity: boolean;
|
|
5
|
+
filter: IkasProductCampaignFilter;
|
|
6
|
+
constructor(data?: Partial<IkasProductBuyX>);
|
|
7
|
+
}
|
|
8
|
+
export declare class IkasProductGetY {
|
|
9
|
+
amount: number;
|
|
10
|
+
discountRatio: number;
|
|
11
|
+
filter: IkasProductCampaignFilter;
|
|
12
|
+
constructor(data?: Partial<IkasProductGetY>);
|
|
13
|
+
}
|
|
14
|
+
export default class IkasProductBuyXThenGetY {
|
|
15
|
+
buyX: IkasProductBuyX;
|
|
16
|
+
getY: IkasProductGetY;
|
|
17
|
+
maxUsagePerOrder: number;
|
|
18
|
+
constructor(data?: Partial<IkasProductBuyXThenGetY>);
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{makeAutoObservable as t}from"mobx";import i from"../filter/index.js";var e=function(e){void 0===e&&(e={}),this.amount=e.amount||0,this.applyByQuantity=e.applyByQuantity||!1,this.filter=e.filter?new i(e.filter):new i,t(this)},n=function(e){void 0===e&&(e={}),this.amount=e.amount||0,this.discountRatio=e.discountRatio||0,this.filter=e.filter?new i(e.filter):new i,t(this)},o=function(i){void 0===i&&(i={}),this.buyX=i.buyX?new e(i.buyX):new e,this.getY=i.getY?new n(i.getY):new n,this.maxUsagePerOrder=i.maxUsagePerOrder||0,t(this)};export{e as IkasProductBuyX,n as IkasProductGetY,o as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{makeAutoObservable as t}from"mobx";var n=function(n){this.start=n.start||null,this.end=n.end||null,t(this)};export{n as default};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import IkasProductCampaignFilter from "../filter";
|
|
2
|
+
export declare class IkasCampaignMinMaxRangeField {
|
|
3
|
+
min: number | null;
|
|
4
|
+
max: number | null;
|
|
5
|
+
constructor(data: Partial<IkasCampaignMinMaxRangeField>);
|
|
6
|
+
}
|
|
7
|
+
export default class IkasProductFixedDiscount {
|
|
8
|
+
amount: number | null;
|
|
9
|
+
filters: IkasProductCampaignFilter | null;
|
|
10
|
+
lineItemQuantityRange: IkasCampaignMinMaxRangeField | null;
|
|
11
|
+
priceRange: IkasCampaignMinMaxRangeField | null;
|
|
12
|
+
constructor(data: Partial<IkasProductFixedDiscount>);
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{makeAutoObservable as n}from"mobx";import t from"../filter/index.js";var i=function(t){this.min=t.min||null,this.max=t.max||null,n(this)},e=function(e){this.amount=e.amount||null,this.filters=e.filters?new t(e.filters):null,this.lineItemQuantityRange=e.lineItemQuantityRange?new i(e.lineItemQuantityRange):null,this.priceRange=e.priceRange?new i(e.priceRange):null,n(this)};export{i as IkasCampaignMinMaxRangeField,e as default};
|
|
@@ -3,6 +3,7 @@ export declare enum IkasProductOptionType {
|
|
|
3
3
|
CHOICE = "CHOICE",
|
|
4
4
|
TEXT = "TEXT",
|
|
5
5
|
TEXT_AREA = "TEXT_AREA",
|
|
6
|
+
FILE = "FILE",
|
|
6
7
|
COLOR_PICKER = "COLOR_PICKER",
|
|
7
8
|
DATE_PICKER = "DATE_PICKER",
|
|
8
9
|
CHECKBOX = "CHECKBOX"
|
|
@@ -83,12 +84,15 @@ export declare class IkasProductOption {
|
|
|
83
84
|
private childOptions;
|
|
84
85
|
constructor(data: Partial<IkasProductOption>);
|
|
85
86
|
get displayedChildOptions(): IkasProductOption[];
|
|
87
|
+
private getBase64;
|
|
88
|
+
productOptionFileUpload: (files: File[]) => Promise<(string | null)[]>;
|
|
86
89
|
get hasValidValues(): boolean;
|
|
87
90
|
get values(): string[];
|
|
88
91
|
set values(values: string[]);
|
|
89
92
|
initValues: () => void;
|
|
90
93
|
private isValidTextOptionValue;
|
|
91
94
|
private isValidChoiceOptionValue;
|
|
95
|
+
private isValidFileOptionValue;
|
|
92
96
|
private isValidDateOptionValue;
|
|
93
97
|
}
|
|
94
98
|
export declare class IkasProductOptionSet {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as e,__assign as i}from'../../../ext/tslib/tslib.es6.js';import{makeAutoObservable as n}from"mobx";import{IkasImage as l}from"../image/index.js";import{IkasStorefrontConfig as s}from"../../../storefront/index.js";import a from'../../../ext/lodash/sortBy.js';var o,u;!function(t){t.CHOICE="CHOICE",t.TEXT="TEXT",t.TEXT_AREA="TEXT_AREA",t.COLOR_PICKER="COLOR_PICKER",t.DATE_PICKER="DATE_PICKER",t.CHECKBOX="CHECKBOX"}(o||(o={})),function(t){t.SELECT="SELECT",t.BOX="BOX",t.SWATCH="SWATCH"}(u||(u={}));var r=function(t){this.id=t.id||"",this.value=t.value||null,n(this)},
|
|
1
|
+
import{__awaiter as t,__generator as e,__assign as i}from'../../../ext/tslib/tslib.es6.js';import{makeAutoObservable as n}from"mobx";import{IkasImage as l}from"../image/index.js";import{IkasStorefrontConfig as s}from"../../../storefront/index.js";import a from'../../../ext/lodash/sortBy.js';var o,u;!function(t){t.CHOICE="CHOICE",t.TEXT="TEXT",t.TEXT_AREA="TEXT_AREA",t.FILE="FILE",t.COLOR_PICKER="COLOR_PICKER",t.DATE_PICKER="DATE_PICKER",t.CHECKBOX="CHECKBOX"}(o||(o={})),function(t){t.SELECT="SELECT",t.BOX="BOX",t.SWATCH="SWATCH"}(u||(u={}));var r=function(t){this.id=t.id||"",this.value=t.value||null,n(this)},d=function(t){var e;this.id=t.id||"",this.name=t.name||null,this.optionalText=t.optionalText||null,this.values=(null===(e=t.values)||void 0===e?void 0:e.map((function(t){return new r(t)})))||[],n(this)},h=function(t){var e;this.locale=t.locale||"",this.options=(null===(e=t.options)||void 0===e?void 0:e.map((function(t){return new d(t)})))||[],n(this)},c=function(t){void 0===t&&(t={}),this.thumbnailImage=null,this.id=t.id||"",this.order=t.order||0,this.value=t.value||"",this.price=t.price||null,this.thumbnailImageId=t.thumbnailImageId||null,this.colorCode=t.colorCode||null,this.thumbnailImage=this.thumbnailImageId?new l(this.thumbnailImageId):null,n(this)},p=function(t){var e;void 0===t&&(t={}),this.type=t.type||u.BOX,this.minSelect=null!==t.minSelect&&void 0!==t.minSelect?t.minSelect:null,this.maxSelect=null!==t.maxSelect&&void 0!==t.maxSelect?t.maxSelect:null,this.values=a((null===(e=t.values)||void 0===e?void 0:e.map((function(t){return new c(t)})))||[],"order"),n(this)},f=function(t){this.min=t.min||null,this.max=t.max||null,this.minRelativeNextDate=t.minRelativeNextDate||null,this.maxRelativeNextDate=t.maxRelativeNextDate||null,n(this)},m=function(t){void 0===t&&(t={}),this.min=null!==t.min&&void 0!==t.min?t.min:null,this.max=null!==t.max&&void 0!==t.max?t.max:null,n(this)},v=function(t){this.allowedExtensions=t.allowedExtensions||null,this.minQuantity=null!==t.minQuantity&&void 0!==t.minQuantity?t.minQuantity:null,this.maxQuantity=null!==t.maxQuantity&&void 0!==t.maxQuantity?t.maxQuantity:null,n(this)},g=function(){function i(i){var l=this;this._values=[],this.childOptions=[],this.productOptionFileUpload=function(i){return t(l,void 0,void 0,(function(){var n,l,a=this;return e(this,(function(o){switch(o.label){case 0:return 0===i.length||this.fileSettings&&this.fileSettings.maxQuantity&&this.fileSettings.maxQuantity<i.length?[2,[]]:(n="".concat(process.env.NEXT_PUBLIC_BASE_URL,"/admin/upload-product-option-file"),l=function(i){return t(a,void 0,void 0,(function(){var t,l,a,o,u,r,d;return e(this,(function(e){switch(e.label){case 0:return l=fetch,a=[n],r={method:"POST",headers:{"x-api-key":s.config.apiKey||"","x-sfid":s.storefrontId||"","x-sfrid":s.storefrontRoutingId||"","Content-Type":"application/json",Accept:"application/json"}},u=(o=JSON).stringify,d={productOptionSetId:this.productOptionSetId,productOptionId:this.id},[4,this.getBase64(i)];case 1:return[4,l.apply(void 0,a.concat([(r.body=u.apply(o,[(d.base64=e.sent(),d.fileName=i.name,d)]),r)]))];case 2:return(t=e.sent()).ok?[4,t.text()]:[2,null];case 3:return[2,e.sent()]}}))}))},[4,Promise.all(i.map((function(t){return l(t)})))]);case 1:return[2,o.sent().filter((function(t){return null!==t}))]}}))}))},this.initValues=function(){l.isOptional||(l.values=[],l.childOptions&&l.childOptions.forEach((function(t){return t.initValues()})))},this.isValidTextOptionValue=function(){var t=l.values[0];return t?!!l.textSettings&&(null===l.textSettings.min||t.length>=l.textSettings.min)&&(null===l.textSettings.max||t.length<=l.textSettings.max):!!l.isOptional},this.isValidChoiceOptionValue=function(){return l.values.length?!!l.selectSettings&&(null===l.selectSettings.minSelect||l.values.length>=l.selectSettings.minSelect)&&(null===l.selectSettings.maxSelect||l.values.length<=l.selectSettings.maxSelect):!!l.isOptional},this.isValidFileOptionValue=function(){return l.values.length?!!l.fileSettings&&(null===l.fileSettings.minQuantity||l.values.length>=l.fileSettings.minQuantity)&&(null===l.fileSettings.maxQuantity||l.values.length<=l.fileSettings.maxQuantity):!!l.isOptional},this.isValidDateOptionValue=function(){if(!l.values.length)return!!l.isOptional;if(l.dateSettings){var t=new Date,e=new Date;null!==l.dateSettings.minRelativeNextDate&&(t=l.dateSettings.minRelativeNextDate<0?new Date(t.setDate(t.getDate()-Math.abs(l.dateSettings.minRelativeNextDate))):new Date(t.setDate(t.getDate()+Math.abs(l.dateSettings.minRelativeNextDate)))),null!==l.dateSettings.maxRelativeNextDate&&(e=l.dateSettings.maxRelativeNextDate<0?new Date(e.setDate(e.getDate()-Math.abs(l.dateSettings.maxRelativeNextDate))):new Date(e.setDate(e.getDate()+Math.abs(l.dateSettings.maxRelativeNextDate))));var i=new Date(new Date(l.values[0]).setHours(23,59,59));return i.getTime()>=t.getTime()&&i.getTime()<=e.getTime()}return!0},this.id=i.id||"",this.productOptionSetId=i.productOptionSetId||"",this.name=i.name||"",this.order=i.order||0,this.type=i.type||o.CHOICE,this.selectSettings=i.selectSettings?new p(i.selectSettings||{}):null,this.textSettings=i.textSettings?new m(i.textSettings||{}):null,this.fileSettings=i.fileSettings?new v(i.fileSettings||{}):null,this.dateSettings=i.dateSettings?new f(i.dateSettings||{}):null,this.price=i.price||null,this.isOptional=i.isOptional||!1,this.optionalText=i.optionalText||null,this.requiredOptionId=i.requiredOptionId||null,this.requiredOptionValueIds=i.requiredOptionValueIds||null,this.values=i.values||[],this.childOptions=i.childOptions||[],n(this)}return Object.defineProperty(i.prototype,"displayedChildOptions",{get:function(){var t=this;return a(this.childOptions.filter((function(e){var i;return(null===(i=e.requiredOptionValueIds)||void 0===i?void 0:i.length)?e.requiredOptionValueIds.every((function(e){return t.values.some((function(t){return t===e}))})):t.type===o.CHECKBOX?!!t.values.length&&"true"===t.values[0]:!!t.values.length})),"order")},enumerable:!1,configurable:!0}),i.prototype.getBase64=function(t){return new Promise((function(e){var i=new FileReader;i.addEventListener("load",(function(){return e(i.result)})),i.readAsDataURL(t)}))},Object.defineProperty(i.prototype,"hasValidValues",{get:function(){if(!this.values.length&&!this.isOptional)return!1;var t=!1;switch(this.type){case o.TEXT:case o.TEXT_AREA:t=this.isValidTextOptionValue();break;case o.CHECKBOX:case o.COLOR_PICKER:t=!0;break;case o.CHOICE:t=this.isValidChoiceOptionValue();break;case o.DATE_PICKER:t=this.isValidDateOptionValue();break;case o.FILE:t=this.isValidFileOptionValue()}return t&&this.displayedChildOptions.every((function(t){return t.hasValidValues}))},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"values",{get:function(){return this._values},set:function(t){this._values=t,t.length||this.childOptions.forEach((function(t){return t.values=[]}))},enumerable:!1,configurable:!0}),i}(),O=function(){function l(l){var s,a,o=this;this.initOptionValues=function(){return t(o,void 0,void 0,(function(){return e(this,(function(t){return this.options.forEach((function(t){return t.initValues()})),[2]}))}))},this.id=l.id||"",this.name=l.name||"",this.options=(null===(s=l.options)||void 0===s?void 0:s.map((function(t){return new g(i(i({},t),{productOptionSetId:o.id}))})))||[],this.translations=l.translations?null===(a=l.translations)||void 0===a?void 0:a.map((function(t){return new h(t)})):null,this.setChildOptions(),this.setTranslations(),this.initOptionValues(),n(this)}return Object.defineProperty(l.prototype,"displayedOptions",{get:function(){return a(this.options.filter((function(t){return!t.requiredOptionId})),"order")},enumerable:!1,configurable:!0}),l.prototype.setTranslations=function(){var t,e=this,i=s.getCurrentLocale();if(this.translations&&this.translations.some((function(t){return t.locale===i}))){var n=this.translations.find((function(t){return t.locale===i}));null===(t=null==n?void 0:n.options)||void 0===t||t.forEach((function(t){var i,n=e.options.find((function(e){return e.id===t.id}));n&&(n.name=t.name||n.name,n.optionalText=t.optionalText||n.optionalText,n.type===o.CHOICE&&(null===(i=t.values)||void 0===i||i.forEach((function(t){var e,i=null===(e=n.selectSettings)||void 0===e?void 0:e.values.find((function(e){return e.id===t.id}));i&&(i.value=t.value||i.value)}))))}))}},l.prototype.setChildOptions=function(){var t=this;this.options.forEach((function(e){var i=t.options.filter((function(t){return t.requiredOptionId===e.id}));i.length&&(e.childOptions=i)}))},l}();export{g as IkasProductOption,f as IkasProductOptionDateSettings,v as IkasProductOptionFileSettings,p as IkasProductOptionSelectSettings,u as IkasProductOptionSelectType,c as IkasProductOptionSelectValue,r as IkasProductOptionSelectValueTranslations,O as IkasProductOptionSet,h as IkasProductOptionSetTranslations,m as IkasProductOptionTextSettings,d as IkasProductOptionTranslations,o as IkasProductOptionType};
|
|
@@ -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"../../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"../../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";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/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"../../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-campanign/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"../../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"../../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";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/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"../../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-campanign/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"../../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"../../../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";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"../../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"../../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-campanign/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 +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"../../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"../../../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";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"../../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"../../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-campanign/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};
|