@ikas/storefront 2.0.74-alpha.1 → 3.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/__generated__/global-types.d.ts +15 -72
- package/build/__generated__/global-types.js +1 -1
- package/build/_virtual/index.js_commonjs-proxy2.js +1 -1
- package/build/_virtual/index.js_commonjs-proxy4.js +1 -1
- package/build/analytics/analytics.d.ts +2 -3
- package/build/analytics/analytics.js +1 -1
- package/build/analytics/events.d.ts +1 -2
- package/build/analytics/events.js +1 -1
- package/build/analytics/googleTagManager.d.ts +0 -2
- package/build/analytics/googleTagManager.js +1 -1
- package/build/analytics/head/index.js +1 -1
- package/build/analytics/ikas.js +1 -1
- package/build/api/blog/__generated__/getBlog.d.ts +5 -1
- package/build/api/blog/__generated__/listBlog.d.ts +5 -1
- package/build/api/blog/__generated__/listBlogCategory.d.ts +5 -1
- package/build/api/blog/__generated__/listBlogMetaData.d.ts +5 -3
- package/build/api/blog/index.js +1 -1
- package/build/api/brand/index.js +1 -1
- package/build/api/cart/__generated__/getCart.d.ts +4 -2
- package/build/api/cart/__generated__/saveItemToCart.d.ts +4 -25
- package/build/api/cart/index.d.ts +1 -3
- package/build/api/cart/index.js +1 -1
- package/build/api/category/__generated__/listCategoryPaths.d.ts +0 -19
- package/build/api/category/index.js +1 -1
- package/build/api/checkout/__generated__/addCouponCodeToCheckout.d.ts +1 -1
- package/build/api/checkout/__generated__/getCheckoutById.d.ts +4 -2
- package/build/api/checkout/__generated__/getOrder.d.ts +12 -6
- package/build/api/checkout/index.d.ts +1 -7
- package/build/api/checkout/index.js +1 -1
- package/build/api/contact-form/__generated__/sendContactFormToMerchant.d.ts +0 -1
- package/build/api/contact-form/index.d.ts +1 -2
- package/build/api/contact-form/index.js +1 -1
- package/build/api/customer/__generated__/createOrderRefundRequest.d.ts +13 -7
- package/build/api/customer/__generated__/customerLogin.d.ts +2 -8
- package/build/api/customer/__generated__/customerSocialLogin.d.ts +2 -8
- package/build/api/customer/__generated__/getCustomerOrders.d.ts +12 -6
- package/build/api/customer/__generated__/getMyCustomer.d.ts +3 -13
- package/build/api/customer/__generated__/registerCustomer.d.ts +3 -14
- package/build/api/customer/__generated__/saveMyCustomer.d.ts +3 -13
- package/build/api/customer/index.d.ts +1 -3
- package/build/api/customer/index.js +1 -1
- package/build/api/customer-review/__generated__/listCustomerReviews.d.ts +5 -1
- package/build/api/customer-review/index.js +1 -1
- package/build/api/favorite-product/index.js +1 -1
- package/build/api/html-meta-data/__generated__/listHTMLMetaData.d.ts +0 -8
- package/build/api/html-meta-data/index.js +1 -1
- package/build/api/index.d.ts +0 -1
- package/build/api/merchant/__generated__/listMerchantSettings.d.ts +0 -11
- package/build/api/merchant/index.js +1 -1
- package/build/api/product-option-set/__generated__/ListProductOptionSet.d.ts +0 -6
- package/build/api/product-search/__generated__/getProductFilterData.d.ts +0 -1
- package/build/api/product-search/index.d.ts +1 -19
- package/build/api/product-search/index.js +1 -1
- package/build/api/raffle/__generated__/listRaffle.d.ts +5 -1
- package/build/api/raffle/__generated__/listRaffleMetaData.d.ts +0 -2
- package/build/api/raffle/__generated__/saveRaffleParticipant.d.ts +6 -46
- package/build/api/raffle/index.d.ts +3 -7
- package/build/api/raffle/index.js +1 -1
- package/build/api/storefront/__generated__/getStorefront.d.ts +0 -3
- package/build/api/storefront/index.js +1 -1
- package/build/api/variant-type/__generated__/listVariantType.d.ts +6 -2
- package/build/assets/translations/checkout/en.js +1 -1
- package/build/assets/translations/checkout/tr.js +1 -1
- package/build/components/checkout/components/address-form/index.js +1 -1
- package/build/components/checkout/components/address-form/model.d.ts +0 -3
- package/build/components/checkout/components/address-form/model.js +1 -1
- package/build/components/checkout/components/cart-summary/cart-item/index.js +1 -1
- package/build/components/checkout/components/cart-summary/index.js +1 -1
- package/build/components/checkout/components/cart-summary/style.module.scss.js +1 -1
- package/build/components/checkout/components/credit-card-form/index.js +1 -1
- package/build/components/checkout/components/customer-addresses/model.js +1 -1
- package/build/components/checkout/components/error/index.js +1 -1
- package/build/components/checkout/components/error/no-shipping-error/index.d.ts +5 -3
- package/build/components/checkout/components/error/no-shipping-error/index.js +1 -1
- package/build/components/checkout/components/form-item/index.js +1 -1
- package/build/components/checkout/components/form-item/model.js +1 -1
- package/build/components/checkout/components/form-item/style.module.scss.js +1 -1
- package/build/components/checkout/index.d.ts +0 -1
- package/build/components/checkout/index.js +1 -1
- package/build/components/checkout/model.d.ts +3 -5
- package/build/components/checkout/model.js +1 -1
- package/build/components/checkout/steps/step-info/index.js +1 -1
- package/build/components/checkout/steps/step-payment/index.js +1 -1
- package/build/components/checkout/steps/step-shipping/index.js +1 -1
- package/build/components/checkout/steps/step-success/index.js +1 -1
- package/build/components/image/index.d.ts +3 -29
- package/build/components/page/head.d.ts +0 -3
- package/build/components/page/head.js +1 -1
- package/build/components/page/index.d.ts +0 -3
- package/build/components/page/index.js +1 -1
- package/build/components/page-editor/ThemeComponentEditor.js +1 -1
- package/build/components/page-editor/model.js +1 -1
- package/build/ikas.js +7 -7
- package/build/index.js +1 -1
- package/build/models/data/blog/index.d.ts +0 -2
- package/build/models/data/blog/index.js +1 -1
- package/build/models/data/category/index.d.ts +0 -2
- package/build/models/data/category/index.js +1 -1
- package/build/models/data/checkout/index.d.ts +1 -1
- package/build/models/data/checkout/index.js +1 -1
- package/build/models/data/customer/index.d.ts +0 -2
- package/build/models/data/customer/index.js +1 -1
- package/build/models/data/html-meta-data/index.d.ts +0 -2
- package/build/models/data/html-meta-data/index.js +1 -1
- package/build/models/data/image/index.d.ts +12 -3
- package/build/models/data/image/index.js +1 -1
- package/build/models/data/index.d.ts +1 -6
- package/build/models/data/merchant-settings/index.d.ts +0 -14
- package/build/models/data/merchant-settings/index.js +1 -1
- package/build/models/data/order/line-item/index.js +1 -1
- package/build/models/data/order/line-item/variant/index.d.ts +0 -7
- package/build/models/data/order/line-item/variant/index.js +1 -1
- package/build/models/data/product/index.d.ts +1 -1
- package/build/models/data/product/index.js +1 -1
- package/build/models/data/product/variant/index.d.ts +1 -0
- package/build/models/data/product/variant/index.js +1 -1
- package/build/models/data/product/variant-type/index.d.ts +0 -1
- package/build/models/data/product/variant-type/index.js +1 -1
- package/build/models/data/product-filter/index.d.ts +1 -3
- package/build/models/data/product-filter/index.js +1 -1
- package/build/models/data/product-option-set/index.js +1 -1
- package/build/models/data/raffle/index.d.ts +4 -12
- package/build/models/data/raffle/index.js +1 -1
- package/build/models/data/simple-product/index.d.ts +1 -1
- package/build/models/data/storefront/index.d.ts +0 -3
- package/build/models/data/storefront/index.js +1 -1
- package/build/models/data/storefront/theme-localization/index.js +1 -1
- package/build/models/theme/page/component/prop-value/product-list.d.ts +1 -2
- package/build/models/theme/page/component/prop-value/product-list.js +1 -1
- package/build/models/theme/page/index.d.ts +0 -2
- package/build/models/theme/page/index.js +1 -1
- package/build/models/theme/theme.js +1 -1
- package/build/models/ui/blog-category-list/index.js +1 -1
- package/build/models/ui/blog-list/index.js +1 -1
- package/build/models/ui/brand-list/index.js +1 -1
- package/build/models/ui/category-list/index.js +1 -1
- package/build/models/ui/customer-review-list/index.js +1 -1
- package/build/models/ui/index.d.ts +1 -2
- package/build/models/ui/product-detail/index.d.ts +3 -10
- package/build/models/ui/product-detail/index.js +1 -1
- package/build/models/ui/product-list/index.d.ts +1 -47
- package/build/models/ui/product-list/index.js +1 -1
- package/build/models/ui/raffle-list/index.js +1 -1
- package/build/models/ui/validator/form/account-info.d.ts +0 -2
- package/build/models/ui/validator/form/account-info.js +1 -1
- package/build/models/ui/validator/form/address.d.ts +0 -3
- package/build/models/ui/validator/form/address.js +1 -1
- package/build/models/ui/validator/form/contact-form.js +1 -1
- package/build/models/ui/validator/form/raffle-form.d.ts +0 -2
- package/build/models/ui/validator/form/raffle-form.js +1 -1
- package/build/models/ui/validator/form/register.d.ts +0 -4
- package/build/models/ui/validator/form/register.js +1 -1
- package/build/models/ui/validator/rules/index.d.ts +0 -5
- package/build/models/ui/validator/rules/index.js +1 -1
- package/build/pages/404.js +1 -1
- package/build/pages/_slug_/index.js +1 -1
- package/build/pages/account/addresses.js +1 -1
- package/build/pages/account/favorite-products.js +1 -1
- package/build/pages/account/forgot-password.js +1 -1
- package/build/pages/account/index.js +1 -1
- package/build/pages/account/login.js +1 -1
- package/build/pages/account/orders/_id_.js +1 -1
- package/build/pages/account/orders/index.js +1 -1
- package/build/pages/account/raffles.js +1 -1
- package/build/pages/account/recover-password.js +1 -1
- package/build/pages/account/register.js +1 -1
- package/build/pages/blog/_slug_.js +1 -1
- package/build/pages/blog/index.js +1 -1
- package/build/pages/cart.js +1 -1
- package/build/pages/checkout.js +1 -1
- package/build/pages/editor.js +1 -1
- package/build/pages/home.js +1 -1
- package/build/pages/pages/_slug_.js +1 -1
- package/build/pages/raffle/_slug_.js +1 -1
- package/build/pages/raffle/index.js +1 -1
- package/build/pages/search.js +1 -1
- package/build/providers/helpers/raffles.d.ts +1 -2
- package/build/providers/helpers/raffles.js +1 -1
- package/build/providers/page-data-get.d.ts +1 -9
- package/build/providers/page-data-get.js +1 -1
- package/build/providers/page-data-init.js +1 -1
- package/build/providers/page-data-next.d.ts +0 -36
- package/build/providers/page-data-next.js +1 -1
- package/build/providers/placeholders.js +1 -1
- package/build/providers/prop-value/attribute-list.js +1 -1
- package/build/providers/prop-value/attribute.js +1 -1
- package/build/providers/prop-value/blog-category-list.js +1 -1
- package/build/providers/prop-value/blog-category.js +1 -1
- package/build/providers/prop-value/blog-list.js +1 -1
- package/build/providers/prop-value/blog.js +1 -1
- package/build/providers/prop-value/brand-list.js +1 -1
- package/build/providers/prop-value/brand.js +1 -1
- package/build/providers/prop-value/category-list.js +1 -1
- package/build/providers/prop-value/category.js +1 -1
- package/build/providers/prop-value/custom.js +1 -1
- package/build/providers/prop-value/image-list.js +1 -1
- package/build/providers/prop-value/image.js +1 -1
- package/build/providers/prop-value/link.js +1 -1
- package/build/providers/prop-value/product-detail.js +1 -1
- package/build/providers/prop-value/product-list.d.ts +0 -6
- package/build/providers/prop-value/product-list.js +1 -1
- package/build/providers/prop-value/raffle-list.js +1 -1
- package/build/providers/prop-value/raffle.js +1 -1
- package/build/scripts/generators/types/index.js +1 -1
- package/build/store/base.d.ts +0 -2
- package/build/store/base.js +1 -1
- package/build/store/cart.d.ts +2 -24
- package/build/store/cart.js +1 -1
- package/build/store/customer.d.ts +3 -7
- package/build/store/customer.js +1 -1
- package/build/storefront/index.d.ts +2 -9
- package/build/storefront/index.js +1 -1
- package/build/utils/currency.d.ts +2 -2
- package/build/utils/currency.js +1 -1
- package/build/utils/helper.d.ts +0 -1
- package/build/utils/helper.js +1 -1
- package/build/utils/i18n.js +1 -1
- package/package.json +3 -1
- package/build/analytics/googleAnalytics.d.ts +0 -13
- package/build/analytics/googleAnalytics.js +0 -1
- package/build/analytics/googleUniversal.d.ts +0 -9
- package/build/analytics/googleUniversal.js +0 -1
- package/build/analytics/tiktokPixel.d.ts +0 -13
- package/build/analytics/tiktokPixel.js +0 -1
- package/build/api/customer/__generated__/getOrderByEmail.d.ts +0 -615
- package/build/api/customer-attribute/__generated__/listCustomerAttribute.d.ts +0 -44
- package/build/api/customer-attribute/index.d.ts +0 -4
- package/build/api/customer-attribute/index.js +0 -1
- package/build/api/customer-review-summary/__generated__/listCustomerReviewSummary.d.ts +0 -55
- package/build/api/customer-review-summary/index.d.ts +0 -21
- package/build/api/customer-review-summary/index.js +0 -1
- package/build/api/product-search/__generated__/getRelatedProducts.d.ts +0 -14
- package/build/api/raffle/__generated__/listRaffleParticipants.d.ts +0 -67
- package/build/api/raffle/__generated__/listStorefrontRaffle.d.ts +0 -82
- package/build/assets/translations/checkout/de.js +0 -1
- package/build/models/data/customer/attribute-value/index.d.ts +0 -9
- package/build/models/data/customer/attribute-value/index.js +0 -1
- package/build/models/data/customer-attribute/customer-attribute-option/index.d.ts +0 -5
- package/build/models/data/customer-attribute/customer-attribute-option/index.js +0 -1
- package/build/models/data/customer-attribute/customer-attribute-sales-channel/index.d.ts +0 -17
- package/build/models/data/customer-attribute/customer-attribute-sales-channel/index.js +0 -1
- package/build/models/data/customer-attribute/index.d.ts +0 -35
- package/build/models/data/customer-attribute/index.js +0 -1
- package/build/models/data/customer-review-summary/index.d.ts +0 -16
- package/build/models/data/customer-review-summary/index.js +0 -1
- package/build/models/ui/customer-review-summary-list/index.d.ts +0 -43
- package/build/models/ui/customer-review-summary-list/index.js +0 -1
- package/build/utils/constants.d.ts +0 -2
- package/build/utils/constants.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeAutoObservable as t}from"mobx";import{IkasProductDetail as e}from"../../ui/product-detail/index.js";var i,a=function(e){this.start=e.start||null,this.end=e.end||null,t(this)};!function(t){t.EMAIL="EMAIL",t.MERSIS="MERSIS"}(i||(i={}));var n,
|
|
1
|
+
import{makeAutoObservable as t}from"mobx";import{IkasProductDetail as e}from"../../ui/product-detail/index.js";var i,a=function(e){this.start=e.start||null,this.end=e.end||null,t(this)};!function(t){t.EMAIL="EMAIL",t.MERSIS="MERSIS"}(i||(i={}));var n,d=function(){function t(t){var n,d;void 0===t&&(t={}),this.id=t.id||Date.now()+"",this.createdAt=t.createdAt||Date.now(),this.updatedAt=t.updatedAt||Date.now(),this.deleted=t.deleted||null,this.name=t.name||"",this.participantCount=t.participantCount||0,this.requiredCustomerAccount=t.requiredCustomerAccount||!1,this.status=t.status||!1,this.verificationType=t.verificationType||i.EMAIL,this.isCustomerWinner=t.isCustomerWinner||void 0,this.dateRange=t.dateRange?new a(t.dateRange):null,this.metadata=t.metadata?new s(t.metadata):null,this.variants=(null===(n=t.variants)||void 0===n?void 0:n.map((function(t){return new u(t)})))||[],this.products=(null===(d=t.products)||void 0===d?void 0:d.map((function(t){return new e(t.product,t.selectedVariantValues)})))||[]}return Object.defineProperty(t.prototype,"isRaffleAvailable",{get:function(){var t;if(!this.status)return!1;var e=Date.now();return(null===(t=this.dateRange)||void 0===t?void 0:t.start)&&e>this.dateRange.start&&this.dateRange.end&&e<this.dateRange.end},enumerable:!1,configurable:!0}),t}();!function(t){t.RAFFLE="RAFFLE"}(n||(n={}));var s=function(t){this.id=t.id||Date.now()+"",this.createdAt=t.createdAt||Date.now(),this.updatedAt=t.updatedAt||Date.now(),this.deleted=t.deleted||null,this.description=t.description||"",this.pageTitle=t.pageTitle||"",this.slug=t.slug||"",this.targetId=t.targetId||"",this.targetType=t.targetType||n.RAFFLE},r=function(e){this.id=e.id||null,this.createdAt=e.createdAt||Date.now(),this.updatedAt=e.updatedAt||Date.now(),this.deleted=e.deleted||!1,this.customerId=e.customerId||null,this.raffleId=e.raffleId||"",this.firstName=e.firstName||"",this.lastName=e.lastName||"",this.fullName=e.fullName||null,this.email=e.email||"",this.applicationDate=e.applicationDate||0,this.phone=e.phone||null,this.isWinner=e.isWinner||null,this.extraData=e.extraData||{},this.appliedProduct=new u(e.appliedProduct||{}),t(this)},u=function(e){this.productId=e.productId||"",this.variantId=e.variantId||"",t(this)};export{d as IkasRaffle,u as IkasRaffleAppliedProduct,s as IkasRaffleMetaData,n as IkasRaffleMetadataTargetType,r as IkasRaffleParticipant,i as IkasRaffleVerificationTypeEnum,a as RaffleDateRangeField};
|
|
@@ -42,6 +42,7 @@ export interface ISimpleVariant {
|
|
|
42
42
|
images?: ISimpleProductImage[] | null;
|
|
43
43
|
prices?: ISimpleProductPrice[];
|
|
44
44
|
stocks: ISimpleProductStockLocation[];
|
|
45
|
+
sellIfOutOfStock: boolean;
|
|
45
46
|
}
|
|
46
47
|
export interface ISimpleProductPrice {
|
|
47
48
|
sellPrice: number;
|
|
@@ -53,7 +54,6 @@ export interface ISimpleProductPrice {
|
|
|
53
54
|
export interface ISimpleProductImage {
|
|
54
55
|
order: number;
|
|
55
56
|
isMain: boolean;
|
|
56
|
-
isVideo?: boolean;
|
|
57
57
|
id: string;
|
|
58
58
|
}
|
|
59
59
|
export interface ISimpleVariationValueRelation {
|
|
@@ -15,9 +15,6 @@ export declare class IkasStorefront {
|
|
|
15
15
|
salesChannelId: string | null;
|
|
16
16
|
fbpId: string | null;
|
|
17
17
|
gtmId: string | null;
|
|
18
|
-
analytics4Id: string | null;
|
|
19
|
-
universalAnalyticsId: string | null;
|
|
20
|
-
tiktokPixelId: string | null;
|
|
21
18
|
localizations: IkasStorefrontLocalization[];
|
|
22
19
|
routings: IkasStorefrontRouting[];
|
|
23
20
|
domains: IkasStorefrontDomain[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{IkasStorefrontLocalization as
|
|
1
|
+
import{IkasStorefrontLocalization as n}from"./localization/index.js";import{IkasStorefrontDomain as t}from"./domain/index.js";import{IkasStorefrontRouting as i}from"./routing/index.js";import{IkasStorefrontTheme as s}from"./theme/index.js";var e;!function(n){n.WAITING="WAITING",n.READY="READY"}(e||(e={}));var o=function(o){void 0===o&&(o={}),this.id=o.id||"",this.name=o.name||"",this.status=o.status||e.WAITING,this.mainStorefrontThemeId=o.mainStorefrontThemeId||null,this.emailSettingsId=o.emailSettingsId||null,this.salesChannelId=o.salesChannelId||null,this.gtmId=o.gtmId||null,this.fbpId=o.fbpId||null,this.localizations=o.localizations?o.localizations.map((function(t){return new n(t)})):[],this.routings=o.routings?o.routings.map((function(n){return new i(n)})):[],this.domains=o.domains?o.domains.map((function(n){return new t(n)})):[],this.themes=o.themes?o.themes.map((function(n){return new s(n)})):[]};export{o as IkasStorefront,e as StorefrontStatus};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{IkasTheme as i}from"../../../theme/theme.js";import"../../../theme/page/index.js";import"mobx";import"../../../theme/component/prop/index.js";import"../../../theme/page/component/prop-value/link.js";import"../../../ui/brand-list/index.js";import"../../../ui/blog-list/index.js";import"../../../ui/blog-category-list/index.js";import"../../../ui/category-list/index.js";import"../../../ui/product-detail/index.js";import"../../../ui/product-list/index.js";import"../../../ui/product-attribute-detail/index.js";import"../../../ui/product-attribute-list/index.js";import"../../../ui/customer-review-list/index.js";import"../../../ui/
|
|
1
|
+
import{IkasTheme as i}from"../../../theme/theme.js";import"../../../theme/page/index.js";import"mobx";import"../../../theme/component/prop/index.js";import"../../../theme/page/component/prop-value/link.js";import"../../../ui/brand-list/index.js";import"../../../ui/blog-list/index.js";import"../../../ui/blog-category-list/index.js";import"../../../ui/category-list/index.js";import"../../../ui/product-detail/index.js";import"../../../ui/product-list/index.js";import"../../../ui/product-attribute-detail/index.js";import"../../../ui/product-attribute-list/index.js";import"../../../ui/customer-review-list/index.js";import"../../../ui/validator/index.js";import"../../../ui/validator/rules/index.js";import"../../../ui/validator/form/login.js";import"../../../ui/validator/form/address.js";import"../../../ui/validator/form/register.js";import"../../../ui/validator/form/contact-form.js";import"../../../ui/validator/form/forgot-password.js";import"../../../ui/validator/form/recover-password.js";import"../../../ui/validator/form/account-info.js";import"../../../ui/validator/form/raffle-form.js";import"../../../ui/validator/form/customer-review.js";import"../../../ui/raffle-list/index.js";import"../../../theme/settings/index.js";import"../../../theme/custom-data/index.js";var t=function(t){this.id=t.id||"",this.locale=t.locale||"",this.storefrontId=t.storefrontId||"",this.storefrontThemeId=t.storefrontThemeId||"",this.themeJson=t.themeJson?new i(t.themeJson):new i,this.privacyPolicy=t.privacyPolicy||null,this.returnPolicy=t.returnPolicy||null,this.termsOfService=t.termsOfService||null};export{t as IkasStorefrontThemeLocalization};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IkasProductListSortType, IkasProductListType
|
|
1
|
+
import { IkasProductListSortType, IkasProductListType } from "../../../../../models/ui";
|
|
2
2
|
export declare class IkasProductListPropValue {
|
|
3
3
|
id: string;
|
|
4
4
|
productListType: IkasProductListType;
|
|
@@ -8,7 +8,6 @@ export declare class IkasProductListPropValue {
|
|
|
8
8
|
productIds?: IkasProductVariantId[] | null;
|
|
9
9
|
usePageFilter?: boolean | null;
|
|
10
10
|
category?: string | null;
|
|
11
|
-
relatedProductsType?: IkasRelatedProductsType | null;
|
|
12
11
|
constructor(data: Partial<IkasProductListPropValue>);
|
|
13
12
|
}
|
|
14
13
|
declare type IkasProductVariantId = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../../../../ui/blog-list/index.js";import"../../../../ui/blog-category-list/index.js";import"../../../../ui/brand-list/index.js";import"../../../../ui/category-list/index.js";import{makeAutoObservable as i}from"mobx";import"../../../../ui/product-detail/index.js";import{IkasProductListType as t,IkasProductListSortType as r}from"../../../../ui/product-list/index.js";import"../../../../ui/product-attribute-detail/index.js";import"../../../../ui/product-attribute-list/index.js";import"../../../../ui/customer-review-list/index.js";import"../../../../ui/
|
|
1
|
+
import"../../../../ui/blog-list/index.js";import"../../../../ui/blog-category-list/index.js";import"../../../../ui/brand-list/index.js";import"../../../../ui/category-list/index.js";import{makeAutoObservable as i}from"mobx";import"../../../../ui/product-detail/index.js";import{IkasProductListType as t,IkasProductListSortType as r}from"../../../../ui/product-list/index.js";import"../../../../ui/product-attribute-detail/index.js";import"../../../../ui/product-attribute-list/index.js";import"../../../../ui/customer-review-list/index.js";import"../../../../ui/validator/index.js";import"../../../../ui/validator/rules/index.js";import"../../../../ui/validator/form/login.js";import"../../../../ui/validator/form/address.js";import"../../../../ui/validator/form/register.js";import"../../../../ui/validator/form/contact-form.js";import"../../../../ui/validator/form/forgot-password.js";import"../../../../ui/validator/form/recover-password.js";import"../../../../ui/validator/form/account-info.js";import"../../../../ui/validator/form/raffle-form.js";import"../../../../ui/validator/form/customer-review.js";import"../../../../ui/raffle-list/index.js";var o=function(o){this.initialSort=null,this.initialLimit=null,this.productCount=null,this.productIds=null,this.usePageFilter=null,this.category=null,this.id=o.id||"",this.productListType=o.productListType||t.ALL,this.initialSort=o.initialSort||r.LAST_ADDED,this.initialLimit=o.initialLimit||20,this.productCount=o.productCount,this.productIds=o.productIds,this.category=o.category,this.usePageFilter=o.usePageFilter,i(this)};export{o as IkasProductListPropValue};
|
|
@@ -8,8 +8,6 @@ export declare class IkasThemePage {
|
|
|
8
8
|
description: string | null;
|
|
9
9
|
components: IkasThemePageComponent[];
|
|
10
10
|
specifications: IkasThemePageSpecification[] | null;
|
|
11
|
-
canonicals: string[] | null;
|
|
12
|
-
disableIndex: boolean | null;
|
|
13
11
|
constructor(data: Partial<IkasThemePage>);
|
|
14
12
|
}
|
|
15
13
|
export declare class IkasThemePageSpecification {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeAutoObservable as n}from"mobx";import{IkasThemePageComponent as
|
|
1
|
+
import{makeAutoObservable as n}from"mobx";import{IkasThemePageComponent as R}from"./component/index.js";var O,t=function(t){this.id=t.id||Date.now()+"",this.name=t.name||null,this.type=t.type||O.INDEX,this.slug=t.slug||null,this.pageTitle=t.pageTitle||null,this.description=t.description||null,this.components=t.components?t.components.map((function(n){return new R(n)})):[],this.specifications=t.specifications?t.specifications.map((function(n){return new E(n)})):null,n(this)},E=function(O){this.id=O.id||"",this.components=O.components?O.components.map((function(n){return new R(n)})):[],n(this)};!function(n){n.INDEX="INDEX",n.CATEGORY="CATEGORY",n.BRAND="BRAND",n.PRODUCT="PRODUCT",n.CUSTOM="CUSTOM",n.ACCOUNT="ACCOUNT",n.ADDRESSES="ADDRESSES",n.ORDERS="ORDERS",n.ORDER_DETAIL="ORDER_DETAIL",n.LOGIN="LOGIN",n.REGISTER="REGISTER",n.FORGOT_PASSWORD="FORGOT_PASSWORD",n.RECOVER_PASSWORD="RECOVER_PASSWORD",n.CART="CART",n.FAVORITE_PRODUCTS="FAVORITE_PRODUCTS",n.SEARCH="SEARCH",n.NOT_FOUND="NOT_FOUND",n.BLOG="BLOG",n.BLOG_INDEX="BLOG_INDEX",n.BLOG_CATEGORY="BLOG_CATEGORY",n.CHECKOUT="CHECKOUT",n.RAFFLE="RAFFLE",n.RAFFLE_DETAIL="RAFFLE_DETAIL",n.RAFFLE_ACCOUNT="RAFFLE_ACCOUNT"}(O||(O={}));export{t as IkasThemePage,E as IkasThemePageSpecification,O as IkasThemePageType};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeAutoObservable as e}from"mobx";import{IkasThemeComponent as o}from"./component/index.js";import{IkasThemeComponentProp as n,IkasThemeComponentPropType as t}from"./component/prop/index.js";import{IkasThemeCustomData as r}from"./custom-data/index.js";import{IkasThemePage as i,IkasThemePageType as s}from"./page/index.js";import{IkasThemePageComponent as a}from"./page/component/index.js";import{IkasThemeSettings as p}from"./settings/index.js";var u="checkout",m=function(){function u(n){var t;void 0===n&&(n={}),this.name=n.name||"",this.components=n.components?n.components.map((function(e){return new o(e)})):[],this.pages=n.pages?n.pages.map((function(e){return new i(e)})):[],this.settings=n.settings?new p(n.settings):new p,this.customData=n.customData?null===(t=n.customData)||void 0===t?void 0:t.map((function(e){return new r(e)})):[],this.createCheckoutData(),e(this)}return Object.defineProperty(u.prototype,"headerComponent",{get:function(){return this.components.find((function(e){return e.isHeader}))},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"footerComponent",{get:function(){return this.components.find((function(e){return e.isFooter}))},enumerable:!1,configurable:!0}),u.prototype.createCheckoutData=function(){var e=this.components.find((function(e){return"checkout"===e.id})),r=this.pages.find((function(e){return"checkout"===e.id}));e||(e=new o({id:"checkout",dir:"",displayName:"",props:[new n({name:"
|
|
1
|
+
import{makeAutoObservable as e}from"mobx";import{IkasThemeComponent as o}from"./component/index.js";import{IkasThemeComponentProp as n,IkasThemeComponentPropType as t}from"./component/prop/index.js";import{IkasThemeCustomData as r}from"./custom-data/index.js";import{IkasThemePage as i,IkasThemePageType as s}from"./page/index.js";import{IkasThemePageComponent as a}from"./page/component/index.js";import{IkasThemeSettings as p}from"./settings/index.js";var u="checkout",m=function(){function u(n){var t;void 0===n&&(n={}),this.name=n.name||"",this.components=n.components?n.components.map((function(e){return new o(e)})):[],this.pages=n.pages?n.pages.map((function(e){return new i(e)})):[],this.settings=n.settings?new p(n.settings):new p,this.customData=n.customData?null===(t=n.customData)||void 0===t?void 0:t.map((function(e){return new r(e)})):[],this.createCheckoutData(),e(this)}return Object.defineProperty(u.prototype,"headerComponent",{get:function(){return this.components.find((function(e){return e.isHeader}))},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"footerComponent",{get:function(){return this.components.find((function(e){return e.isFooter}))},enumerable:!1,configurable:!0}),u.prototype.createCheckoutData=function(){var e=this.components.find((function(e){return"checkout"===e.id})),r=this.pages.find((function(e){return"checkout"===e.id}));e||(e=new o({id:"checkout",dir:"",displayName:"",props:[new n({name:"buttonBgColor",isRequired:!1,type:t.COLOR}),new n({name:"buttonTextColor",isRequired:!1,type:t.COLOR}),new n({name:"buttonDisabledBgColor",isRequired:!1,type:t.COLOR}),new n({name:"buttonDisabledTextColor",isRequired:!1,type:t.COLOR}),new n({name:"primaryTextColor",isRequired:!1,type:t.COLOR}),new n({name:"secondaryTextColor",isRequired:!1,type:t.COLOR}),new n({name:"primaryBgColor",isRequired:!1,type:t.COLOR}),new n({name:"secondaryBgColor",isRequired:!1,type:t.COLOR}),new n({name:"borderColor",isRequired:!1,type:t.COLOR}),new n({name:"cardBgColor",isRequired:!1,type:t.COLOR}),new n({name:"errorColor",isRequired:!1,type:t.COLOR}),new n({name:"errorLightColor",isRequired:!1,type:t.COLOR}),new n({name:"warningColor",isRequired:!1,type:t.COLOR}),new n({name:"warningLightColor",isRequired:!1,type:t.COLOR}),new n({name:"successColor",isRequired:!1,type:t.COLOR}),new n({name:"successLightColor",isRequired:!1,type:t.COLOR})]}),this.components.push(e)),r||this.pages.push(new i({id:"checkout",type:s.CHECKOUT,components:[new a({componentId:e.id,propValues:{buttonBgColor:c,buttonTextColor:C,buttonDisabledBgColor:d,buttonDisabledTextColor:l,primaryTextColor:g,secondaryTextColor:F,primaryBgColor:O,secondaryBgColor:R,borderColor:y,cardBgColor:h,errorColor:f,errorLightColor:w,warningColor:L,warningLightColor:b,successColor:q,successLightColor:x}})]}))},u}(),c="#272727",C="#FFFFFF",d="#F7F7F9",l="#8A8B94",g="#272727",F="#8A8B94",O="#FFFFFF",R="#F7F7F9",y="#E5E4E9",h="#F7F7F9",f="#FB4E4E",w="#FCF3F4",L="#FFBC1F",b="#FFFAEE",q="#2DCA73",x="#F6FFED";export{u as CHECKOUT_ID,m as IkasTheme};
|
|
@@ -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/
|
|
1
|
+
import{__awaiter as t,__generator as i}from'../../../ext/tslib/tslib.es6.js';import{makeAutoObservable as e}from"mobx";import{IkasBlogCategory as r}from"../../data/blog/index.js";import{IkasBlogAPI as o}from"../../../api/blog/index.js";import"../../../api/brand/index.js";import"../../../api/cart/index.js";import"../../../api/category/index.js";import"../../../api/checkout/index.js";import"../../../api/city/index.js";import"../../../api/country/index.js";import"../../../api/customer/index.js";import"../../../api/customer-review/index.js";import"../../../api/district/index.js";import"../../../api/html-meta-data/index.js";import"../../../api/merchant/index.js";import"../../../api/product-search/index.js";import"../../data/brand/index.js";import"../../data/category/index.js";import"../../data/checkout/index.js";import"../../data/customer/address/index.js";import"../../data/customer/index.js";import"../../data/customer-review/index.js";import"../../data/html-meta-data/index.js";import"../../data/image/index.js";import"../../data/installment-info/index.js";import"../../data/order/index.js";import"../../data/order/line-item/index.js";import"../../../api/product-option-file/index.js";import"../../data/product/index.js";import"../../data/variant-type/index.js";import"../../data/product/variant/index.js";import"../../data/product/variant/price/index.js";import"../../data/product-attribute/index.js";import"../../data/product/attribute-value/index.js";import"../../data/product-filter/index.js";import"../../data/variant-type/variant-value/index.js";import"../../data/order-transaction/index.js";import"../../data/product-option-set/index.js";import"../../data/raffle/index.js";import"../../data/product-campaing/campaign/index.js";import"../../theme/theme.js";import"../../theme/page/index.js";import"../../theme/component/prop/index.js";import"../../theme/page/component/prop-value/link.js";import"../brand-list/index.js";import"../blog-list/index.js";import"../category-list/index.js";import"../product-detail/index.js";import"../product-list/index.js";import"../product-attribute-detail/index.js";import"../product-attribute-list/index.js";import"../customer-review-list/index.js";import"../validator/index.js";import"../validator/rules/index.js";import"../validator/form/login.js";import"../validator/form/address.js";import"../validator/form/register.js";import"../validator/form/contact-form.js";import"../validator/form/forgot-password.js";import"../validator/form/recover-password.js";import"../validator/form/account-info.js";import"../validator/form/raffle-form.js";import"../validator/form/customer-review.js";import"../raffle-list/index.js";import"../../theme/settings/index.js";import"../../theme/custom-data/index.js";import"../../../api/apollo.js";import"../../../api/favorite-product/index.js";import"../../../api/contact-form/index.js";import"../../../api/state/index.js";import"../../../api/product-option-set/index.js";import"../../../api/raffle/index.js";import"../../../api/back-in-stock-reminder/index.js";import"../../../api/product-campaign/index.js";var a,s=function(){function s(o){var s=this;this._initialized=!1,this._minPage=null,this._isLoading=!1,this.getInitial=function(){return t(s,void 0,void 0,(function(){var t,e,r,o;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,this.listBlogCategories(this.isStatic?1:this.page,this.isStatic?(null===(r=this._blogCategoryListPropValue.blogCategoryIds)||void 0===r?void 0:r.length)||10:this.limit)];case 2:return t=i.sent(),this.isStatic?this.data=(null===(o=this._blogCategoryListPropValue.blogCategoryIds)||void 0===o?void 0:o.map((function(i){return t.blogCategories.find((function(t){return t.id===i}))})).filter((function(t){return!!t})))||[]:this.data=t.blogCategories,this._count=t.count,this._initialized=!0,this._minPage=this.page,[3,5];case 3:return e=i.sent(),console.log(e),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getPrev=function(){return t(s,void 0,void 0,(function(){var t,e,r;return i(this,(function(i){switch(i.label){case 0:if(this.isStatic||this._isLoading||!this.hasPrev)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),t=this._minPage-1,[4,this.listBlogCategories(t,this.limit)];case 2:return e=i.sent(),this.data=e.blogCategories.concat(this.data),this._count=e.count,this._minPage=t,[3,5];case 3:return r=i.sent(),console.log(r),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getNext=function(){return t(s,void 0,void 0,(function(){var t,e;return i(this,(function(i){switch(i.label){case 0:if(this.isStatic||this._isLoading||!this.hasNext)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,this.listBlogCategories(this.page+1,this.limit)];case 2:return t=i.sent(),this.data=this.data.concat(t.blogCategories),this._count=t.count,this._page=this.page+1,[3,5];case 3:return e=i.sent(),console.log(e),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getPage=function(e){return t(s,void 0,void 0,(function(){var t,r;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading||this.isStatic)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,this.listBlogCategories(e,this.limit)];case 2:return t=i.sent(),this.data=t.blogCategories,this._count=t.count,this._page=e,this._minPage=e,[3,5];case 3:return r=i.sent(),console.log(r),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.data=o.data?o.data.map((function(t){return new r(t)})):[],this._type=o.type||o.blogCategoryListPropValue.blogCategoryListType||a.ALL,this._limit=o.limit||o.blogCategoryListPropValue.initialLimit||20,this._page=o.page||1,this._count=o.count||0,this._initialized=o.initialized||!1,this._minPage=o.minPage,this._blogCategoryListPropValue=o.blogCategoryListPropValue,e(this)}return Object.defineProperty(s.prototype,"limit",{get:function(){return this._limit},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"page",{get:function(){return this._page},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"count",{get:function(){return this._count},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"pageCount",{get:function(){return Math.ceil(this._count/this._limit)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"isInitialized",{get:function(){return this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"isStatic",{get:function(){return this._type===a.STATIC},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"hasPrev",{get:function(){return!(this.isStatic||!this._minPage)&&this._minPage>1},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"hasNext",{get:function(){return!this.isStatic&&this.page*this.limit<this.count},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"isLoading",{get:function(){return this._isLoading},enumerable:!1,configurable:!0}),s.prototype.listBlogCategories=function(e,r){return t(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,o.listBlogCategory({idList:this.isStatic&&this._blogCategoryListPropValue.blogCategoryIds||void 0,page:e,limit:r})];case 1:return[2,t.sent()]}}))}))},s.prototype.toJSON=function(){return{data:this.data,type:this._type,limit:this._limit,page:this._page,count:this._count,initialized:this._initialized,minPage:this._minPage,blogCategoryListPropValue:this._blogCategoryListPropValue}},s}();!function(t){t.ALL="ALL",t.STATIC="STATIC"}(a||(a={}));export{s as IkasBlogCategoryList,a as IkasBlogCategoryListType};
|
|
@@ -1 +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/
|
|
1
|
+
import{__awaiter as t,__generator as i}from'../../../ext/tslib/tslib.es6.js';import{makeAutoObservable as e}from"mobx";import{IkasBlog as r}from"../../data/blog/index.js";import{IkasBlogAPI as o}from"../../../api/blog/index.js";import"../../../api/brand/index.js";import"../../../api/cart/index.js";import"../../../api/category/index.js";import"../../../api/checkout/index.js";import"../../../api/city/index.js";import"../../../api/country/index.js";import"../../../api/customer/index.js";import"../../../api/customer-review/index.js";import"../../../api/district/index.js";import"../../../api/html-meta-data/index.js";import"../../../api/merchant/index.js";import"../../../api/product-search/index.js";import"../../data/brand/index.js";import"../../data/category/index.js";import"../../data/checkout/index.js";import"../../data/customer/address/index.js";import"../../data/customer/index.js";import"../../data/customer-review/index.js";import"../../data/html-meta-data/index.js";import"../../data/image/index.js";import"../../data/installment-info/index.js";import"../../data/order/index.js";import"../../data/order/line-item/index.js";import"../../../api/product-option-file/index.js";import"../../data/product/index.js";import"../../data/variant-type/index.js";import"../../data/product/variant/index.js";import"../../data/product/variant/price/index.js";import"../../data/product-attribute/index.js";import"../../data/product/attribute-value/index.js";import"../../data/product-filter/index.js";import"../../data/variant-type/variant-value/index.js";import"../../data/order-transaction/index.js";import"../../data/product-option-set/index.js";import"../../data/raffle/index.js";import"../../data/product-campaing/campaign/index.js";import"../../theme/theme.js";import"../../theme/page/index.js";import"../../theme/component/prop/index.js";import"../../theme/page/component/prop-value/link.js";import"../brand-list/index.js";import"../blog-category-list/index.js";import"../category-list/index.js";import"../product-detail/index.js";import"../product-list/index.js";import"../product-attribute-detail/index.js";import"../product-attribute-list/index.js";import"../customer-review-list/index.js";import"../validator/index.js";import"../validator/rules/index.js";import"../validator/form/login.js";import"../validator/form/address.js";import"../validator/form/register.js";import"../validator/form/contact-form.js";import"../validator/form/forgot-password.js";import"../validator/form/recover-password.js";import"../validator/form/account-info.js";import"../validator/form/raffle-form.js";import"../validator/form/customer-review.js";import"../raffle-list/index.js";import"../../theme/settings/index.js";import"../../theme/custom-data/index.js";import"../../../api/apollo.js";import"../../../api/favorite-product/index.js";import"../../../api/contact-form/index.js";import"../../../api/state/index.js";import"../../../api/product-option-set/index.js";import"../../../api/raffle/index.js";import"../../../api/back-in-stock-reminder/index.js";import"../../../api/product-campaign/index.js";var s,a=function(){function a(o){var a=this;this._initialized=!1,this._minPage=null,this._filterCategoryId=null,this._isLoading=!1,this.getInitial=function(){return t(a,void 0,void 0,(function(){var t,e,r,o;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,this.listBlogs(this.isStatic?1:this.page,this.isStatic?(null===(r=this._blogListPropValue.blogIds)||void 0===r?void 0:r.length)||10:this.limit)];case 2:return t=i.sent(),this.isStatic?this.data=(null===(o=this._blogListPropValue.blogIds)||void 0===o?void 0:o.map((function(i){return t.blogs.find((function(t){return t.id===i}))})).filter((function(t){return!!t})))||[]:this.data=t.blogs,this._count=t.count,this._initialized=!0,this._minPage=this.page,[3,5];case 3:return e=i.sent(),console.log(e),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getPrev=function(){return t(a,void 0,void 0,(function(){var t,e,r;return i(this,(function(i){switch(i.label){case 0:if(this.isStatic||this._isLoading||!this.hasPrev)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),t=this._minPage-1,[4,this.listBlogs(t,this.limit)];case 2:return e=i.sent(),this.data=e.blogs.concat(this.data),this._count=e.count,this._minPage=t,[3,5];case 3:return r=i.sent(),console.log(r),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getNext=function(){return t(a,void 0,void 0,(function(){var t,e;return i(this,(function(i){switch(i.label){case 0:if(this.isStatic||this._isLoading||!this.hasNext)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,this.listBlogs(this.page+1,this.limit)];case 2:return t=i.sent(),this.data=this.data.concat(t.blogs),this._count=t.count,this._page=this.page+1,[3,5];case 3:return e=i.sent(),console.log(e),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getPage=function(e){return t(a,void 0,void 0,(function(){var t,r;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading||this.isStatic)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,this.listBlogs(e,this.limit)];case 2:return t=i.sent(),this.data=t.blogs,this._count=t.count,this._page=e,this._minPage=e,[3,5];case 3:return r=i.sent(),console.log(r),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.data=o.data?o.data.map((function(t){return new r(t)})):[],this._type=o.type||o.blogListPropValue.blogListType||s.ALL,this._limit=o.limit||o.blogListPropValue.initialLimit||20,this._page=o.page||1,this._count=o.count||0,this._initialized=o.initialized||!1,this._minPage=o.minPage,this._blogListPropValue=o.blogListPropValue,this._filterCategoryId=o.filterCategoryId||null,e(this)}return Object.defineProperty(a.prototype,"limit",{get:function(){return this._limit},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"page",{get:function(){return this._page},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"count",{get:function(){return this._count},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"pageCount",{get:function(){return Math.ceil(this._count/this._limit)},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"isInitialized",{get:function(){return this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"isStatic",{get:function(){return this._type===s.STATIC},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"hasPrev",{get:function(){return!(this.isStatic||!this._minPage)&&this._minPage>1},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"hasNext",{get:function(){return!this.isStatic&&this.page*this.limit<this.count},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"isLoading",{get:function(){return this._isLoading},enumerable:!1,configurable:!0}),a.prototype.listBlogs=function(e,r){return t(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,o.listBlog({idList:this.isStatic&&this._blogListPropValue.blogIds||void 0,page:e,limit:r,categoryId:this._filterCategoryId||void 0})];case 1:return[2,t.sent()]}}))}))},a.prototype.toJSON=function(){return{data:this.data,type:this._type,limit:this._limit,page:this._page,count:this._count,initialized:this._initialized,minPage:this._minPage,blogListPropValue:this._blogListPropValue,filterCategoryId:this._filterCategoryId}},a}();!function(t){t.ALL="ALL",t.STATIC="STATIC",t.CATEGORY="CATEGORY"}(s||(s={}));export{a as IkasBlogList,s as IkasBlogListType};
|
|
@@ -1 +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
|
|
1
|
+
import{__awaiter as t,__generator as i}from'../../../ext/tslib/tslib.es6.js';import"../../data/blog/index.js";import{IkasBrand as e}from"../../data/brand/index.js";import"../../data/category/index.js";import"../../data/checkout/index.js";import"../../data/customer/address/index.js";import"../../data/customer/index.js";import"../../data/customer-review/index.js";import"../../data/html-meta-data/index.js";import"../../data/image/index.js";import"../../data/installment-info/index.js";import"../../data/order/index.js";import"../../data/order/line-item/index.js";import{makeAutoObservable as r,runInAction as n}from"mobx";import"../../../api/product-option-file/index.js";import"../../data/product/index.js";import"../../data/variant-type/index.js";import"../../data/product/variant/index.js";import"../../data/product/variant/price/index.js";import"../../data/product-attribute/index.js";import"../../data/product/attribute-value/index.js";import"../../data/product-filter/index.js";import"../../data/variant-type/variant-value/index.js";import"../../data/order-transaction/index.js";import"../../data/product-option-set/index.js";import"../../data/raffle/index.js";import"../../data/product-campaing/campaign/index.js";import"../../../api/blog/index.js";import{IkasBrandAPI as a}from"../../../api/brand/index.js";import"../../../api/cart/index.js";import"../../../api/category/index.js";import"../../../api/checkout/index.js";import"../../../api/city/index.js";import"../../../api/country/index.js";import"../../../api/customer/index.js";import"../../../api/customer-review/index.js";import"../../../api/district/index.js";import"../../../api/html-meta-data/index.js";import"../../../api/merchant/index.js";import"../../../api/product-search/index.js";import"../../theme/theme.js";import"../../theme/page/index.js";import"../../theme/component/prop/index.js";import"../../theme/page/component/prop-value/link.js";import"../blog-list/index.js";import"../blog-category-list/index.js";import"../category-list/index.js";import"../product-detail/index.js";import"../product-list/index.js";import"../product-attribute-detail/index.js";import"../product-attribute-list/index.js";import"../customer-review-list/index.js";import"../validator/index.js";import"../validator/rules/index.js";import"../validator/form/login.js";import"../validator/form/address.js";import"../validator/form/register.js";import"../validator/form/contact-form.js";import"../validator/form/forgot-password.js";import"../validator/form/recover-password.js";import"../validator/form/account-info.js";import"../validator/form/raffle-form.js";import"../validator/form/customer-review.js";import"../raffle-list/index.js";import"../../theme/settings/index.js";import"../../theme/custom-data/index.js";import"../../../api/apollo.js";import"../../../api/favorite-product/index.js";import"../../../api/contact-form/index.js";import"../../../api/state/index.js";import"../../../api/product-option-set/index.js";import"../../../api/raffle/index.js";import"../../../api/back-in-stock-reminder/index.js";import"../../../api/product-campaign/index.js";var o,s,d=function(){function d(d){var p=this;this._initialized=!1,this._minPage=null,this._isLoading=!1,this.getInitial=function(){return t(p,void 0,void 0,(function(){var t,e,r,o=this;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,a.listBrands({idList:this.isStatic&&this._brandListPropValue.brandIds||void 0,page:this.isStatic?void 0:this.page,limit:this.isStatic?void 0:this.limit,sort:this.getSortParams()})];case 2:return t=i.sent(),this.isStatic?this.data=(null===(r=this._brandListPropValue.brandIds)||void 0===r?void 0:r.map((function(i){return t.brands.find((function(t){return t.id===i}))})).filter((function(t){return!!t})))||[]:this.data=t.brands,this._count=t.count,this._initialized=!0,this._minPage=this.page,[3,5];case 3:return e=i.sent(),console.log(e),[3,5];case 4:return n((function(){o._isLoading=!1})),[7];case 5:return[2]}}))}))},this.getPrev=function(){return t(p,void 0,void 0,(function(){var t,e,r,o=this;return i(this,(function(i){switch(i.label){case 0:if(this.isStatic||this._isLoading||!this.hasPrev)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),t=this._minPage-1,[4,a.listBrands({page:t,limit:this.limit,sort:this.getSortParams()})];case 2:return e=i.sent(),n((function(){o.data=e.brands.concat(o.data),o._count=e.count,o._minPage=t})),[3,5];case 3:return r=i.sent(),console.log(r),[3,5];case 4:return n((function(){o._isLoading=!1})),[7];case 5:return[2]}}))}))},this.getNext=function(){return t(p,void 0,void 0,(function(){var t,e,r=this;return i(this,(function(i){switch(i.label){case 0:if(this.isStatic||this._isLoading||!this.hasNext)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,a.listBrands({page:this.page+1,limit:this.limit,sort:this.getSortParams()})];case 2:return t=i.sent(),n((function(){r.data=r.data.concat(t.brands),r._count=t.count,r._page=r.page+1})),[3,5];case 3:return e=i.sent(),console.log(e),[3,5];case 4:return n((function(){r._isLoading=!1})),[7];case 5:return[2]}}))}))},this.getPage=function(e){return t(p,void 0,void 0,(function(){var t,r,o=this;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading||this.isStatic)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,a.listBrands({page:e,limit:this.limit,sort:this.getSortParams()})];case 2:return t=i.sent(),n((function(){o.data=t.brands,o._count=t.count,o._page=e,o._minPage=e})),[3,5];case 3:return r=i.sent(),console.log(r),[3,5];case 4:return n((function(){o._isLoading=!1})),[7];case 5:return[2]}}))}))},this.data=d.data?d.data.map((function(t){return new e(t)})):[],this._type=d.type||d.brandListPropValue.brandListType||o.ALL,this._sort=d.sort||d.brandListPropValue.initialSort||s.A_Z,this._limit=d.limit||d.brandListPropValue.initialLimit||20,this._page=d.page||1,this._count=d.count||0,this._initialized=d.initialized||!1,this._minPage=d.minPage,this._brandListPropValue=d.brandListPropValue,r(this)}return Object.defineProperty(d.prototype,"sort",{get:function(){return this._sort},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"limit",{get:function(){return this._limit},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"page",{get:function(){return this._page},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"count",{get:function(){return this._count},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"pageCount",{get:function(){return Math.ceil(this._count/this._limit)},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isInitialized",{get:function(){return this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isStatic",{get:function(){return this._type===o.STATIC},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"hasPrev",{get:function(){return!(this.isStatic||!this._minPage)&&this._minPage>1},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"hasNext",{get:function(){return!this.isStatic&&this.page*this.limit<this.count},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isLoading",{get:function(){return this._isLoading},enumerable:!1,configurable:!0}),d.prototype.getSortParams=function(){return this._sort===s.A_Z?"name":"-name"},d.prototype.setSortType=function(e){return t(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return this._sort=e,[4,this.getInitial()];case 1:return t.sent(),[2]}}))}))},d.prototype.toJSON=function(){return{data:this.data,type:this._type,sort:this._sort,limit:this._limit,page:this._page,count:this._count,initialized:this._initialized,minPage:this._minPage,brandListPropValue:this._brandListPropValue}},d}();!function(t){t.ALL="ALL",t.STATIC="STATIC"}(o||(o={})),function(t){t.A_Z="A_Z",t.Z_A="Z_A"}(s||(s={}));export{d as IkasBrandList,s as IkasBrandListSortType,o as IkasBrandListType};
|
|
@@ -1 +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
|
|
1
|
+
import{__awaiter as t,__generator as i}from'../../../ext/tslib/tslib.es6.js';import"../../data/blog/index.js";import"../../data/brand/index.js";import{IkasCategory as e}from"../../data/category/index.js";import"../../data/checkout/index.js";import"../../data/customer/address/index.js";import"../../data/customer/index.js";import"../../data/customer-review/index.js";import"../../data/html-meta-data/index.js";import"../../data/image/index.js";import"../../data/installment-info/index.js";import"../../data/order/index.js";import"../../data/order/line-item/index.js";import{makeAutoObservable as r,runInAction as o}from"mobx";import"../../../api/product-option-file/index.js";import"../../data/product/index.js";import"../../data/variant-type/index.js";import"../../data/product/variant/index.js";import"../../data/product/variant/price/index.js";import"../../data/product-attribute/index.js";import"../../data/product/attribute-value/index.js";import"../../data/product-filter/index.js";import"../../data/variant-type/variant-value/index.js";import"../../data/order-transaction/index.js";import"../../data/product-option-set/index.js";import"../../data/raffle/index.js";import"../../data/product-campaing/campaign/index.js";import"../../../api/blog/index.js";import"../../../api/brand/index.js";import"../../../api/cart/index.js";import{IkasCategoryAPI as a}from"../../../api/category/index.js";import"../../../api/checkout/index.js";import"../../../api/city/index.js";import"../../../api/country/index.js";import"../../../api/customer/index.js";import"../../../api/customer-review/index.js";import"../../../api/district/index.js";import"../../../api/html-meta-data/index.js";import"../../../api/merchant/index.js";import"../../../api/product-search/index.js";import"../../theme/theme.js";import"../../theme/page/index.js";import"../../theme/component/prop/index.js";import"../../theme/page/component/prop-value/link.js";import"../brand-list/index.js";import"../blog-list/index.js";import"../blog-category-list/index.js";import"../product-detail/index.js";import"../product-list/index.js";import"../product-attribute-detail/index.js";import"../product-attribute-list/index.js";import"../customer-review-list/index.js";import"../validator/index.js";import"../validator/rules/index.js";import"../validator/form/login.js";import"../validator/form/address.js";import"../validator/form/register.js";import"../validator/form/contact-form.js";import"../validator/form/forgot-password.js";import"../validator/form/recover-password.js";import"../validator/form/account-info.js";import"../validator/form/raffle-form.js";import"../validator/form/customer-review.js";import"../raffle-list/index.js";import"../../theme/settings/index.js";import"../../theme/custom-data/index.js";import"../../../api/apollo.js";import"../../../api/favorite-product/index.js";import"../../../api/contact-form/index.js";import"../../../api/state/index.js";import"../../../api/product-option-set/index.js";import"../../../api/raffle/index.js";import"../../../api/back-in-stock-reminder/index.js";import"../../../api/product-campaign/index.js";var n,s,p=function(){function p(p){var c=this;this._initialized=!1,this._minPage=null,this._isLoading=!1,this.getInitial=function(){return t(c,void 0,void 0,(function(){var t,e,r,n=this;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,a.listCategories({idList:this.isStatic&&this._categoryListPropValue.categoryIds||void 0,page:this.isStatic?void 0:this.page,limit:this.isStatic?void 0:this.limit,sort:this.getSortParams()})];case 2:return t=i.sent(),this.isStatic?this.data=(null===(r=this._categoryListPropValue.categoryIds)||void 0===r?void 0:r.map((function(i){return t.categories.find((function(t){return t.id===i}))})).filter((function(t){return!!t})))||[]:this.data=t.categories,this._count=t.count,this._initialized=!0,this._minPage=this.page,[3,5];case 3:return e=i.sent(),console.log(e),[3,5];case 4:return o((function(){n._isLoading=!1})),[7];case 5:return[2]}}))}))},this.getPrev=function(){return t(c,void 0,void 0,(function(){var t,e,r,n=this;return i(this,(function(i){switch(i.label){case 0:if(this.isStatic||this._isLoading||!this.hasPrev)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),t=this._minPage-1,[4,a.listCategories({page:t,limit:this.limit,sort:this.getSortParams()})];case 2:return e=i.sent(),o((function(){n.data=e.categories.concat(n.data),n._count=e.count,n._minPage=t})),[3,5];case 3:return r=i.sent(),console.log(r),[3,5];case 4:return o((function(){n._isLoading=!1})),[7];case 5:return[2]}}))}))},this.getNext=function(){return t(c,void 0,void 0,(function(){var t,e,r=this;return i(this,(function(i){switch(i.label){case 0:if(this.isStatic||this._isLoading||!this.hasNext)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,a.listCategories({page:this.page+1,limit:this.limit,sort:this.getSortParams()})];case 2:return t=i.sent(),o((function(){r.data=r.data.concat(t.categories),r._count=t.count,r._page=r.page+1})),[3,5];case 3:return e=i.sent(),console.log(e),[3,5];case 4:return o((function(){r._isLoading=!1})),[7];case 5:return[2]}}))}))},this.getPage=function(e){return t(c,void 0,void 0,(function(){var t,r,n=this;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading||this.isStatic)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,a.listCategories({page:e,limit:this.limit,sort:this.getSortParams()})];case 2:return t=i.sent(),o((function(){n.data=t.categories,n._count=t.count,n._page=e,n._minPage=e})),[3,5];case 3:return r=i.sent(),console.log(r),[3,5];case 4:return o((function(){n._isLoading=!1})),[7];case 5:return[2]}}))}))},this.data=p.data?p.data.map((function(t){return new e(t)})):[],this._type=p.type||p.categoryListPropValue.categoryListType||n.ALL,this._sort=p.sort||p.categoryListPropValue.initialSort||s.A_Z,this._limit=p.limit||p.categoryListPropValue.initialLimit||20,this._page=p.page||1,this._count=p.count||0,this._initialized=p.initialized||!1,this._minPage=p.minPage,this._categoryListPropValue=p.categoryListPropValue,r(this)}return Object.defineProperty(p.prototype,"sort",{get:function(){return this._sort},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"limit",{get:function(){return this._limit},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"page",{get:function(){return this._page},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"count",{get:function(){return this._count},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"pageCount",{get:function(){return Math.ceil(this._count/this._limit)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"isInitialized",{get:function(){return this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"isStatic",{get:function(){return this._type===n.STATIC},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"hasPrev",{get:function(){return!(this.isStatic||!this._minPage)&&this._minPage>1},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"hasNext",{get:function(){return!this.isStatic&&this.page*this.limit<this.count},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"isLoading",{get:function(){return this._isLoading},enumerable:!1,configurable:!0}),p.prototype.getSortParams=function(){return this._sort===s.A_Z?"name":"-name"},p.prototype.setSortType=function(e){return t(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return this._sort=e,[4,this.getInitial()];case 1:return t.sent(),[2]}}))}))},p.prototype.toJSON=function(){return{data:this.data,type:this._type,sort:this._sort,limit:this._limit,page:this._page,count:this._count,initialized:this._initialized,minPage:this._minPage,categoryListPropValue:this._categoryListPropValue}},p}();!function(t){t.ALL="ALL",t.STATIC="STATIC"}(n||(n={})),function(t){t.A_Z="A_Z",t.Z_A="Z_A"}(s||(s={}));export{p as IkasCategoryList,s as IkasCategoryListSortType,n as IkasCategoryListType};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as i}from'../../../ext/tslib/tslib.es6.js';import{makeAutoObservable as e}from"mobx";import{IkasCustomerReview as r}from"../../data/customer-review/index.js";import"../../../api/blog/index.js";import"../../../api/brand/index.js";import"../../../api/cart/index.js";import"../../../api/category/index.js";import"../../../api/checkout/index.js";import"../../../api/city/index.js";import"../../../api/country/index.js";import"../../../api/customer/index.js";import{IkasCustomerReviewAPI as
|
|
1
|
+
import{__awaiter as t,__generator as i}from'../../../ext/tslib/tslib.es6.js';import{makeAutoObservable as e}from"mobx";import{IkasCustomerReview as r}from"../../data/customer-review/index.js";import"../../../api/blog/index.js";import"../../../api/brand/index.js";import"../../../api/cart/index.js";import"../../../api/category/index.js";import"../../../api/checkout/index.js";import"../../../api/city/index.js";import"../../../api/country/index.js";import"../../../api/customer/index.js";import{IkasCustomerReviewAPI as o}from"../../../api/customer-review/index.js";import"../../../api/district/index.js";import"../../../api/html-meta-data/index.js";import"../../../api/merchant/index.js";import"../../../api/product-search/index.js";import"../../data/blog/index.js";import"../../data/brand/index.js";import"../../data/category/index.js";import"../../data/checkout/index.js";import"../../data/customer/address/index.js";import"../../data/customer/index.js";import"../../data/html-meta-data/index.js";import"../../data/image/index.js";import"../../data/installment-info/index.js";import"../../data/order/index.js";import"../../data/order/line-item/index.js";import"../../../api/product-option-file/index.js";import"../../data/product/index.js";import"../../data/variant-type/index.js";import"../../data/product/variant/index.js";import"../../data/product/variant/price/index.js";import"../../data/product-attribute/index.js";import"../../data/product/attribute-value/index.js";import"../../data/product-filter/index.js";import"../../data/variant-type/variant-value/index.js";import"../../data/order-transaction/index.js";import"../../data/product-option-set/index.js";import"../../data/raffle/index.js";import"../../data/product-campaing/campaign/index.js";import"../../theme/theme.js";import"../../theme/page/index.js";import"../../theme/component/prop/index.js";import"../../theme/page/component/prop-value/link.js";import"../brand-list/index.js";import"../blog-list/index.js";import"../blog-category-list/index.js";import"../category-list/index.js";import"../product-detail/index.js";import"../product-list/index.js";import"../product-attribute-detail/index.js";import"../product-attribute-list/index.js";import"../validator/index.js";import"../validator/rules/index.js";import"../validator/form/login.js";import"../validator/form/address.js";import"../validator/form/register.js";import"../validator/form/contact-form.js";import"../validator/form/forgot-password.js";import"../validator/form/recover-password.js";import"../validator/form/account-info.js";import"../validator/form/raffle-form.js";import"../validator/form/customer-review.js";import"../raffle-list/index.js";import"../../theme/settings/index.js";import"../../theme/custom-data/index.js";import"../../../api/apollo.js";import"../../../api/favorite-product/index.js";import"../../../api/contact-form/index.js";import"../../../api/state/index.js";import"../../../api/product-option-set/index.js";import"../../../api/raffle/index.js";import"../../../api/back-in-stock-reminder/index.js";import"../../../api/product-campaign/index.js";import{IkasStorefrontConfig as a}from"../../../storefront/index.js";var n=function(){function n(o){var a=this;this._initialized=!1,this._minPage=null,this._isLoading=!1,this.getInitial=function(){return t(a,void 0,void 0,(function(){var t,e;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,this.listCustomerReviews(this.page,this.limit)];case 2:return t=i.sent(),this.data=t.data,this._count=t.count,this._initialized=!0,this._minPage=this.page,[3,5];case 3:return e=i.sent(),console.log(e),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getPrev=function(){return t(a,void 0,void 0,(function(){var t,e,r;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading||!this.hasPrev)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),t=this._minPage-1,[4,this.listCustomerReviews(t,this.limit)];case 2:return e=i.sent(),this.data=e.data.concat(this.data),this._count=e.count,this._minPage=t,[3,5];case 3:return r=i.sent(),console.log(r),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getNext=function(){return t(a,void 0,void 0,(function(){var t,e;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading||!this.hasNext)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,this.listCustomerReviews(this.page+1,this.limit)];case 2:return t=i.sent(),this.data=this.data.concat(t.data),this._count=t.count,this._page=this.page+1,[3,5];case 3:return e=i.sent(),console.log(e),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getPage=function(e){return t(a,void 0,void 0,(function(){var t,r;return i(this,(function(i){switch(i.label){case 0:if(this._isLoading)return[2];this._isLoading=!0,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,this.listCustomerReviews(e,this.limit)];case 2:return t=i.sent(),this.data=t.data,this._count=t.count,this._page=e,this._minPage=e,[3,5];case 3:return r=i.sent(),console.log(r),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.data=o.data?o.data.map((function(t){return new r(t)})):[],this._limit=o.limit||5,this._page=o.page||1,this._count=o.count||0,this._initialized=o.initialized||!1,this._minPage=o.minPage,this._productId=o.productId,e(this)}return Object.defineProperty(n.prototype,"limit",{get:function(){return this._limit},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"page",{get:function(){return this._page},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"count",{get:function(){return this._count},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"pageCount",{get:function(){return Math.ceil(this._count/this._limit)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isInitialized",{get:function(){return this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"hasPrev",{get:function(){return!!this._minPage&&this._minPage>1},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"hasNext",{get:function(){return this.page*this.limit<this.count},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isLoading",{get:function(){return this._isLoading},enumerable:!1,configurable:!0}),n.prototype.listCustomerReviews=function(e,r){return t(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,o.listCustomerReviews({productId:this._productId,salesChannelId:a.salesChannelId||"",page:e,limit:r})];case 1:return[2,t.sent()]}}))}))},n.prototype.toJSON=function(){return{data:this.data,limit:this._limit,page:this._page,count:this._count,initialized:this._initialized,minPage:this._minPage,productId:this._productId}},n}();export{n as IkasCustomerReviewList};
|
|
@@ -6,11 +6,10 @@ export type { IkasBrandListParams } from "./brand-list";
|
|
|
6
6
|
export { IkasNavigationLink } from "./navigation-link";
|
|
7
7
|
export { IkasProductDetail } from "./product-detail";
|
|
8
8
|
export type { IkasDisplayedVariantType, IkasDisplayedVariantValue, } from "./product-detail";
|
|
9
|
-
export { IkasProductList, IkasProductListType, IkasProductListSortType,
|
|
9
|
+
export { IkasProductList, IkasProductListType, IkasProductListSortType, } from "./product-list";
|
|
10
10
|
export * from "./product-attribute-detail";
|
|
11
11
|
export * from "./product-attribute-list";
|
|
12
12
|
export * from "./customer-review-list";
|
|
13
|
-
export * from "./customer-review-summary-list";
|
|
14
13
|
export { Validator } from "./validator";
|
|
15
14
|
export type { ValidationStatus } from "./validator";
|
|
16
15
|
export * from "./validator/rules";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IkasProduct, IkasVariantValue, IkasCustomerReviewList
|
|
1
|
+
import { IkasProduct, IkasVariantValue, IkasCustomerReviewList } from "../../../models";
|
|
2
2
|
import { NextRouter } from "next/router.js";
|
|
3
3
|
import { IkasProductCampaign, IkasProductVariant, IkasVariantType } from "../../../models/data";
|
|
4
4
|
export declare class IkasProductDetail {
|
|
@@ -10,19 +10,12 @@ export declare class IkasProductDetail {
|
|
|
10
10
|
get mainVariantValue(): IkasVariantValue | undefined;
|
|
11
11
|
get selectedVariant(): IkasProductVariant;
|
|
12
12
|
get href(): string;
|
|
13
|
-
get productHref(): string;
|
|
14
13
|
get hasStock(): boolean;
|
|
15
14
|
get displayedVariantTypes(): IkasDisplayedVariantType[];
|
|
16
15
|
get isCustomerReviewEnabled(): boolean;
|
|
17
16
|
get isCustomerReviewLoginRequired(): boolean;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
page?: number;
|
|
21
|
-
}): Promise<IkasCustomerReviewList>;
|
|
22
|
-
getCustomerReviewsSummary(params?: {
|
|
23
|
-
limit?: number;
|
|
24
|
-
page?: number;
|
|
25
|
-
}): Promise<IkasCustomerReviewSummaryList>;
|
|
17
|
+
get isAddToCartEnabled(): boolean;
|
|
18
|
+
getCustomerReviews(): Promise<IkasCustomerReviewList>;
|
|
26
19
|
getProductCampaigns(): Promise<void>;
|
|
27
20
|
selectVariantValue(variantValue: IkasVariantValue): void;
|
|
28
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__spreadArray as t,__awaiter as i,__generator as e}from'../../../ext/tslib/tslib.es6.js';import{makeAutoObservable as r}from"mobx";import"../../data/blog/index.js";import"../../data/brand/index.js";import"../../data/category/index.js";import"../../data/checkout/index.js";import"../../data/customer/address/index.js";import"../../data/customer/index.js";import"../../data/customer-review/index.js";import"../../data/html-meta-data/index.js";import"../../data/image/index.js";import"../../data/installment-info/index.js";import"../../data/
|
|
1
|
+
import{__spreadArray as t,__awaiter as i,__generator as e}from'../../../ext/tslib/tslib.es6.js';import{makeAutoObservable as r}from"mobx";import"../../data/blog/index.js";import"../../data/brand/index.js";import"../../data/category/index.js";import"../../data/checkout/index.js";import"../../data/customer/address/index.js";import"../../data/customer/index.js";import"../../data/customer-review/index.js";import"../../data/html-meta-data/index.js";import"../../data/image/index.js";import"../../data/installment-info/index.js";import"../../data/order/index.js";import"../../data/order/line-item/index.js";import"../../../api/product-option-file/index.js";import{IkasProduct as n}from"../../data/product/index.js";import"../../data/variant-type/index.js";import"../../data/product/variant/index.js";import"../../data/product/variant/price/index.js";import"../../data/product-attribute/index.js";import"../../data/product/attribute-value/index.js";import"../../data/product-filter/index.js";import{IkasVariantValue as a}from"../../data/variant-type/variant-value/index.js";import"../../data/order-transaction/index.js";import"../../data/product-option-set/index.js";import"../../data/raffle/index.js";import"../../data/product-campaing/campaign/index.js";import"../../theme/theme.js";import"../../theme/page/index.js";import"../../theme/component/prop/index.js";import"../../theme/page/component/prop-value/link.js";import"../brand-list/index.js";import"../blog-list/index.js";import"../blog-category-list/index.js";import"../category-list/index.js";import"../product-list/index.js";import"../product-attribute-detail/index.js";import"../product-attribute-list/index.js";import{IkasCustomerReviewList as o}from"../customer-review-list/index.js";import"../validator/index.js";import"../validator/rules/index.js";import"../validator/form/login.js";import"../validator/form/address.js";import"../validator/form/register.js";import"../validator/form/contact-form.js";import"../validator/form/forgot-password.js";import"../validator/form/recover-password.js";import"../validator/form/account-info.js";import"../validator/form/raffle-form.js";import"../validator/form/customer-review.js";import"../raffle-list/index.js";import"../../theme/settings/index.js";import"../../theme/custom-data/index.js";import{Analytics as s}from"../../../analytics/analytics.js";import"../../../analytics/head/index.js";import{IkasStorefrontConfig as u}from"../../../storefront/index.js";import"../../../api/blog/index.js";import"../../../api/brand/index.js";import"../../../api/cart/index.js";import"../../../api/category/index.js";import"../../../api/checkout/index.js";import"../../../api/city/index.js";import"../../../api/country/index.js";import"../../../api/customer/index.js";import"../../../api/customer-review/index.js";import"../../../api/district/index.js";import"../../../api/html-meta-data/index.js";import"../../../api/merchant/index.js";import"../../../api/product-search/index.js";import"../../../api/apollo.js";import"../../../api/favorite-product/index.js";import"../../../api/contact-form/index.js";import"../../../api/state/index.js";import"../../../api/product-option-set/index.js";import"../../../api/raffle/index.js";import"../../../api/back-in-stock-reminder/index.js";import{IkasProductCampaignAPI as d}from"../../../api/product-campaign/index.js";var c=function(){function c(t,i,e,o){this.router=null,this.campaings=null,this.product=new n(t),this.selectedVariantValues=i.map((function(t){return new a(t)})),this.router=e,this.campaings=o,r(this)}return Object.defineProperty(c.prototype,"mainVariantValue",{get:function(){return this.selectedVariantValues.length?this.selectedVariantValues[0]:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"selectedVariant",{get:function(){if(!this.product.hasVariant)return this.product.variants[0];var t=this.selectedVariantValues.map((function(t){return t.id}));return this.product.variants.find((function(i){return i.variantValues.every((function(i){return t.includes(i.id)}))}))},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"href",{get:function(){var t=this,i=this.product.metaData;if(!(null==i?void 0:i.slug))return"";var e=this.product.variantTypes.map((function(i){var e=i.variantType,r=e.values.find((function(i){return t.selectedVariantValues.some((function(t){return t.id===i.id}))}));if(r)return"".concat(e.slug,"=").concat(r.slug)})).filter((function(t){return!!t})).join("&");return e?"/".concat(i.slug,"?").concat(e):"/".concat(i.slug)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"hasStock",{get:function(){return this.product.hasStock},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"displayedVariantTypes",{get:function(){var i=this,e=this.product.variantTypes.map((function(e,r){var n=e.variantType,a=[],o=r>0?i.product.variantTypes.slice(0,r):null,s=[];return o&&(s=i.selectedVariantValues.filter((function(t){return o.some((function(i){return i.variantType.id===t.variantTypeId}))}))),n.values.forEach((function(e){var r=t(t([],s,!0),[e],!1),n=i.product.variants.find((function(t){return t.isActive&&r.every((function(i){return t.variantValues.some((function(t){return t.id===i.id}))}))})),o=i.product.variants.find((function(t){return t.isActive&&t.hasStock&&r.every((function(i){return t.variantValues.some((function(t){return t.id===i.id}))}))})),u=i.selectedVariant.variantValues.some((function(t){return t.id===e.id}));n&&a.push({variant:n,variantValue:e,hasStock:!!o,isSelected:u})})),{variantType:n,displayedVariantValues:a}}));return 1===e.length&&(e[0].displayedVariantValues=e[0].displayedVariantValues.filter((function(t){return t.variant.isActive}))),e},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isCustomerReviewEnabled",{get:function(){return!!u.customerReviewSettings&&!u.customerReviewSettings.customerPurchaseRequired},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isCustomerReviewLoginRequired",{get:function(){return!u.customerReviewSettings||u.customerReviewSettings.customerLoginRequired},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isAddToCartEnabled",{get:function(){return this.product.hasValidProductOptionValues&&(this.selectedVariant.hasStock||this.selectedVariant.sellIfOutOfStock)},enumerable:!1,configurable:!0}),c.prototype.getCustomerReviews=function(){return i(this,void 0,void 0,(function(){var t;return e(this,(function(i){switch(i.label){case 0:return[4,(t=new o({productId:this.product.id})).getInitial()];case 1:return i.sent(),[2,t]}}))}))},c.prototype.getProductCampaigns=function(){return i(this,void 0,void 0,(function(){var t,i,r,n,a,o=this;return e(this,(function(e){switch(e.label){case 0:return t=u.store,i=t.customerStore.customer,r=i?i.customerGroupIds:null,n=this.product.variants.map((function(t){return t.id})),a=this,[4,d.getProductCampaigns({customerGroupIds:r,salesChannelId:u.salesChannelId||"",variantIds:n})];case 1:return a.campaings=e.sent(),this.campaings&&this.campaings.map((function(t){o.product.variants.map((function(i){t.variantIds.some((function(t){return t===i.id}))&&i.campaigns.push(t)}))})),[2]}}))}))},c.prototype.selectVariantValue=function(i){var e,r=this,n=this.product.metaData,a=this.selectedVariantValues.map((function(t){return t.variantTypeId===i.variantTypeId?i:t})),o=this.product.variants.find((function(t){return t.isActive&&a.every((function(i){return t.variantValues.some((function(t){return t.id===i.id}))}))}));if(o)this.selectedVariantValues=a;else{var u=this.product.variantTypes.findIndex((function(t){return t.variantType.id===i.variantTypeId}));if(u>0){var d=this.product.variantTypes.slice(0,u),c=this.selectedVariantValues.filter((function(t){return d.some((function(i){return i.variantType.id===t.variantTypeId}))})),p=t(t([],c,!0),[i],!1);o=this.product.variants.find((function(t){return t.isActive&&p.every((function(i){return t.variantValues.some((function(t){return t.id===i.id}))}))}))}else{var m=a.slice(0,a.length-1);(o=this.product.variants.find((function(t){return t.isActive&&m.every((function(i){return t.variantValues.some((function(t){return t.id===i.id}))}))})))||(o=this.product.variants.find((function(t){return t.isActive&&t.variantValues.some((function(t){return t.id===i.id}))})))}if(!o)return;this.selectedVariantValues=o.variantValues}var l=this.product.variantTypes.map((function(t){var i=t.variantType,e=i.values.find((function(t){return r.selectedVariantValues.some((function(i){return i.id===t.id}))}));if(e)return"".concat(i.slug,"=").concat(e.slug)})).filter((function(t){return!!t})).join("&"),f="/".concat(n.slug);if(l&&(f="/".concat(n.slug,"?").concat(l)),f!==window.location.pathname){var v="production"!==process.env.NODE_ENV;null===(e=this.router)||void 0===e||e.replace(f,void 0,{shallow:v,scroll:!1}),s.productView(this)}},c}();export{c as IkasProductDetail};
|
|
@@ -4,7 +4,6 @@ import { IkasProductFilter } from "../../../models/data/product-filter";
|
|
|
4
4
|
import { NextRouter } from "next/router.js";
|
|
5
5
|
import { IkasCategory, IkasFilterCategory } from "../../../models/data/category";
|
|
6
6
|
import { IkasBrand } from "../../../models/data";
|
|
7
|
-
import { IkasRelatedProductProps } from "src/providers/prop-value/product-list";
|
|
8
7
|
export declare class IkasProductList {
|
|
9
8
|
data: IkasProductDetail[];
|
|
10
9
|
filters?: IkasProductFilter[] | null;
|
|
@@ -22,7 +21,6 @@ export declare class IkasProductList {
|
|
|
22
21
|
private _productListPropValue;
|
|
23
22
|
private _filterBrandId?;
|
|
24
23
|
private _filterCategoryId?;
|
|
25
|
-
private _relatedProductData?;
|
|
26
24
|
private pageSpecificData?;
|
|
27
25
|
private _recommendFor?;
|
|
28
26
|
private _isLoading;
|
|
@@ -45,7 +43,6 @@ export declare class IkasProductList {
|
|
|
45
43
|
get isDiscounted(): boolean;
|
|
46
44
|
get isRecommended(): boolean;
|
|
47
45
|
get isLastViewed(): boolean;
|
|
48
|
-
get isRelatedProducts(): boolean;
|
|
49
46
|
get isSearch(): boolean;
|
|
50
47
|
get hasPrev(): boolean;
|
|
51
48
|
get hasNext(): boolean;
|
|
@@ -58,25 +55,6 @@ export declare class IkasProductList {
|
|
|
58
55
|
private getSortParams;
|
|
59
56
|
private searchProducts;
|
|
60
57
|
private getFilters;
|
|
61
|
-
/**
|
|
62
|
-
* In order to remember the sorting, we convert the sort value
|
|
63
|
-
* to a format and keep it in the queryparam.
|
|
64
|
-
* In this function we are converting queryparam to sortTypeEnum.
|
|
65
|
-
*
|
|
66
|
-
* e.g. sT1 -> IkasProductListSortType.INCREASING_PRICE
|
|
67
|
-
* @param numerableSortTypeQuery {string}
|
|
68
|
-
* @returns IkasProductListSortType | undefined
|
|
69
|
-
*/
|
|
70
|
-
getSortTypeEnumFromNumerableSortTypeString: (numerableSortTypeQuery: string) => IkasProductListSortType | undefined;
|
|
71
|
-
/**
|
|
72
|
-
* In order to remember the sorting, we convert the sort value
|
|
73
|
-
* to a format and keep it in the queryparam.
|
|
74
|
-
*
|
|
75
|
-
* e.g. IkasProductListSortType.INCREASING_PRICE -> sT1
|
|
76
|
-
* @param sortType {IkasProductListSortType}
|
|
77
|
-
* @returns IkasProductListSortTypeNumerable
|
|
78
|
-
*/
|
|
79
|
-
convertSortTypeEnumToStringForQueryParam: (sortType: IkasProductListSortType) => IkasProductListSortTypeNumerable;
|
|
80
58
|
private applyQueryParamFilters;
|
|
81
59
|
private applyFacets;
|
|
82
60
|
private applyFilters;
|
|
@@ -133,7 +111,6 @@ export declare type IkasProductListParams = {
|
|
|
133
111
|
recommendFor?: string;
|
|
134
112
|
productListPropValue: IkasProductListPropValue;
|
|
135
113
|
pageSpecificData?: IkasCategory | IkasBrand | null;
|
|
136
|
-
relatedProductData?: IkasRelatedProductProps | null;
|
|
137
114
|
};
|
|
138
115
|
export declare enum IkasProductListType {
|
|
139
116
|
ALL = "ALL",
|
|
@@ -142,8 +119,7 @@ export declare enum IkasProductListType {
|
|
|
142
119
|
RECOMMENDED = "RECOMMENDED",
|
|
143
120
|
CATEGORY = "CATEGORY",
|
|
144
121
|
SEARCH = "SEARCH",
|
|
145
|
-
LAST_VIEWED = "LAST_VIEWED"
|
|
146
|
-
RELATED_PRODUCTS = "RELATED_PRODUCTS"
|
|
122
|
+
LAST_VIEWED = "LAST_VIEWED"
|
|
147
123
|
}
|
|
148
124
|
export declare enum IkasProductListSortType {
|
|
149
125
|
INCREASING_PRICE = "INCREASING_PRICE",
|
|
@@ -154,25 +130,3 @@ export declare enum IkasProductListSortType {
|
|
|
154
130
|
DECRASING_DISCOUNT = "DECRASING_DISCOUNT",
|
|
155
131
|
FEATURED = "FEATURED"
|
|
156
132
|
}
|
|
157
|
-
export declare enum IkasProductListSortTypeNumerable {
|
|
158
|
-
INCREASING_PRICE = "0",
|
|
159
|
-
DECREASING_PRICE = "1",
|
|
160
|
-
LAST_ADDED = "2",
|
|
161
|
-
FIRST_ADDED = "3",
|
|
162
|
-
INCREASING_DISCOUNT = "4",
|
|
163
|
-
DECRASING_DISCOUNT = "5",
|
|
164
|
-
FEATURED = "6"
|
|
165
|
-
}
|
|
166
|
-
export declare const IkasProductListSortTypeNumerableMapToEnum: {
|
|
167
|
-
0: IkasProductListSortType;
|
|
168
|
-
1: IkasProductListSortType;
|
|
169
|
-
2: IkasProductListSortType;
|
|
170
|
-
3: IkasProductListSortType;
|
|
171
|
-
4: IkasProductListSortType;
|
|
172
|
-
5: IkasProductListSortType;
|
|
173
|
-
6: IkasProductListSortType;
|
|
174
|
-
};
|
|
175
|
-
export declare enum IkasRelatedProductsType {
|
|
176
|
-
CATEGORY = "CATEGORY",
|
|
177
|
-
BRAND = "BRAND"
|
|
178
|
-
}
|