@ikas/storefront 5.0.12 → 5.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/build/analytics/analytics.js +1 -1
  2. package/build/analytics/googleAnalytics.js +1 -1
  3. package/build/analytics/googleTagManager.js +1 -1
  4. package/build/analytics/ikas.js +1 -1
  5. package/build/components/checkout/components/address-form/model.js +1 -1
  6. package/build/components/checkout/components/cart-summary/cart-item/index.js +1 -1
  7. package/build/components/checkout/components/customer-addresses/model.js +1 -1
  8. package/build/components/checkout/components/error/argument-validation-error/index.d.ts +8 -0
  9. package/build/components/checkout/components/error/argument-validation-error/index.js +1 -0
  10. package/build/components/checkout/components/error/index.js +1 -1
  11. package/build/components/checkout/components/master-pass/credit-card-form/index.js +1 -1
  12. package/build/components/checkout/components/master-pass/modal-otp/index.js +1 -1
  13. package/build/components/checkout/components/offer-product/index.js +1 -1
  14. package/build/components/checkout/components/quick-registration/model.js +1 -1
  15. package/build/components/checkout/index.js +1 -1
  16. package/build/components/checkout/model.d.ts +2 -2
  17. package/build/components/checkout/model.js +1 -1
  18. package/build/components/checkout/modelMasterPass.js +1 -1
  19. package/build/components/checkout/steps/step-payment/payment-gateways/index.js +1 -1
  20. package/build/components/checkout/steps/step-success/index.js +1 -1
  21. package/build/components/page/head.js +1 -1
  22. package/build/components/page/index.js +1 -1
  23. package/build/components/page-editor/ThemeComponentEditor.js +1 -1
  24. package/build/components/page-editor/model.js +1 -1
  25. package/build/components/popup/index.d.ts +2 -0
  26. package/build/components/popup/index.js +1 -0
  27. package/build/components/popup/renderer/index.d.ts +11 -0
  28. package/build/components/popup/renderer/index.js +1 -0
  29. package/build/components/popup/renderer/model.d.ts +21 -0
  30. package/build/components/popup/renderer/model.js +1 -0
  31. package/build/components/popup/utils/index.d.ts +8 -0
  32. package/build/components/popup/utils/index.js +1 -0
  33. package/build/ext/@ikas/popup-renderer/build/ext/tslib/tslib.es6.mjs.js +1 -0
  34. package/build/ext/@ikas/popup-renderer/build/popup-renderer/assets/left-arrow.js +1 -0
  35. package/build/ext/@ikas/popup-renderer/build/popup-renderer/assets/right-arrow.js +1 -0
  36. package/build/ext/@ikas/popup-renderer/build/popup-renderer/assets/x-close.js +1 -0
  37. package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/button-element-renderer/index.js +1 -0
  38. package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/divider-element-renderer/index.js +1 -0
  39. package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/form-element-renderer/checkbox-item-view/index.js +1 -0
  40. package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/form-element-renderer/date-item-view/index.js +1 -0
  41. package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/form-element-renderer/gender-item-view/index.js +1 -0
  42. package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/form-element-renderer/index.js +1 -0
  43. package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/form-element-renderer/input-item-view/index.js +1 -0
  44. package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/image-column-element-renderer/index.js +1 -0
  45. package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/image-element-renderer/index.js +1 -0
  46. package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/index.js +1 -0
  47. package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/product-list-renderer/index.js +1 -0
  48. package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/social-element-renderer/index.js +1 -0
  49. package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/space-element-renderer/index.js +1 -0
  50. package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/text-element-renderer/index.js +1 -0
  51. package/build/ext/@ikas/popup-renderer/build/popup-renderer/helpers/index.js +1 -0
  52. package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/index.js +1 -0
  53. package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/background-settings/index.js +1 -0
  54. package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/close-settings/index.js +1 -0
  55. package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/index.js +1 -0
  56. package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/base/index.js +1 -0
  57. package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/button/index.js +1 -0
  58. package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/divider/index.js +1 -0
  59. package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/form/checkbox/index.js +1 -0
  60. package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/form/customer-attribute/index.js +1 -0
  61. package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/form/customer-birthday/index.js +1 -0
  62. package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/form/customer-email/index.js +1 -0
  63. package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/form/customer-gender/index.js +1 -0
  64. package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/form/customer-name/index.js +1 -0
  65. package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/form/customer-phone/index.js +1 -0
  66. package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/form/customer-surname/index.js +1 -0
  67. package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/form/form-settings/index.js +1 -0
  68. package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/form/index.js +1 -0
  69. package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/image/index.js +1 -0
  70. package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/image-column/index.js +1 -0
  71. package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/product/detail-settings/index.js +1 -0
  72. package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/product/index.js +1 -0
  73. package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/social/index.js +1 -0
  74. package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/space/index.js +1 -0
  75. package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/text/index.js +1 -0
  76. package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/index.js +1 -0
  77. package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/teaser/index.js +1 -0
  78. package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/window-settings/index.js +1 -0
  79. package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/settings/index.js +1 -0
  80. package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/settings/visibility-condition/index.js +1 -0
  81. package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/settings/visibility-time/index.js +1 -0
  82. package/build/ext/mobx-react/dist/mobxreact.esm.js +1 -0
  83. package/build/ext/swiper/modules/navigation.css.js +1 -0
  84. package/build/ext/swiper/modules/navigation.mjs.js +1 -0
  85. package/build/ext/swiper/modules/pagination.css.js +1 -0
  86. package/build/ext/swiper/modules/scrollbar.mjs.js +1 -0
  87. package/build/ext/swiper/shared/classes-to-selector.mjs.js +1 -0
  88. package/build/ext/swiper/shared/create-element-if-not-defined.mjs.js +1 -0
  89. package/build/ext/swiper/shared/ssr-window.esm.mjs.js +1 -0
  90. package/build/ext/swiper/shared/swiper-core.mjs.js +1 -0
  91. package/build/ext/swiper/shared/update-on-virtual-data.mjs.js +1 -0
  92. package/build/ext/swiper/shared/update-swiper.mjs.js +1 -0
  93. package/build/ext/swiper/shared/utils.mjs.js +1 -0
  94. package/build/ext/swiper/swiper-react.mjs.js +1 -0
  95. package/build/ext/swiper/swiper.css.js +1 -0
  96. package/build/hooks/useCustomerReviews.js +1 -1
  97. package/build/hooks/useStore.js +1 -1
  98. package/build/index.js +1 -1
  99. package/build/models/data/customer/index.d.ts +8 -1
  100. package/build/models/data/customer/index.js +1 -1
  101. package/build/models/data/customer-form-data-input/customer-register-subscription-input/index.d.ts +7 -0
  102. package/build/models/data/customer-form-data-input/customer-register-subscription-input/index.js +1 -0
  103. package/build/models/data/customer-form-data-input/index.d.ts +19 -0
  104. package/build/models/data/customer-form-data-input/index.js +1 -0
  105. package/build/models/data/index.d.ts +2 -0
  106. package/build/models/data/product/index.js +1 -1
  107. package/build/models/data/storefront-popup/index.d.ts +40 -0
  108. package/build/models/data/storefront-popup/index.js +1 -0
  109. package/build/models/data/storefront-popup/storefront-popup-analytics/index.d.ts +7 -0
  110. package/build/models/data/storefront-popup/storefront-popup-analytics/index.js +1 -0
  111. package/build/models/data/storefront-popup/storefront-popup-date-f/304/261lter/index.d.ts +6 -0
  112. package/build/models/data/storefront-popup/storefront-popup-date-f/304/261lter/index.js +1 -0
  113. package/build/models/data/storefront-popup/storefront-popup-display-filter/index.d.ts +11 -0
  114. package/build/models/data/storefront-popup/storefront-popup-display-filter/index.js +1 -0
  115. package/build/models/data/storefront-popup/storefront-popup-display-settings/index.d.ts +16 -0
  116. package/build/models/data/storefront-popup/storefront-popup-display-settings/index.js +1 -0
  117. package/build/models/data/storefront-popup/storefront-popup-page-filter/index.d.ts +16 -0
  118. package/build/models/data/storefront-popup/storefront-popup-page-filter/index.js +1 -0
  119. package/build/models/data/storefront-popup/storefront-popup-page-filter/storefront-popup-page-filter-data/index.d.ts +12 -0
  120. package/build/models/data/storefront-popup/storefront-popup-page-filter/storefront-popup-page-filter-data/index.js +1 -0
  121. package/build/models/data/storefront-popup/storefront-popup-routing/index.d.ts +6 -0
  122. package/build/models/data/storefront-popup/storefront-popup-routing/index.js +1 -0
  123. package/build/models/ui/blog-category-list/index.js +1 -1
  124. package/build/models/ui/brand-list/index.js +1 -1
  125. package/build/models/ui/category-list/index.js +1 -1
  126. package/build/models/ui/customer-review-list/index.d.ts +3 -0
  127. package/build/models/ui/customer-review-list/index.js +1 -1
  128. package/build/models/ui/customer-review-summary-list/index.js +1 -1
  129. package/build/models/ui/product-list/index.js +1 -1
  130. package/build/models/ui/raffle-list/index.js +1 -1
  131. package/build/models/ui/validator/form/account-info.js +1 -1
  132. package/build/models/ui/validator/form/address.js +1 -1
  133. package/build/models/ui/validator/form/ikas-address.js +1 -1
  134. package/build/models/ui/validator/form/register.js +1 -1
  135. package/build/page-data-init/index.js +1 -1
  136. package/build/pages/checkout.js +1 -1
  137. package/build/store/blog/index.js +1 -1
  138. package/build/store/brand/index.js +1 -1
  139. package/build/store/cart/index.js +1 -1
  140. package/build/store/category/index.js +1 -1
  141. package/build/store/checkout/index.js +1 -1
  142. package/build/store/customer/api.d.ts +2 -1
  143. package/build/store/customer/api.js +1 -1
  144. package/build/store/customer/index.d.ts +2 -0
  145. package/build/store/customer/index.js +1 -1
  146. package/build/store/html-meta-data/index.js +1 -1
  147. package/build/store/location/index.js +1 -1
  148. package/build/store/product/index.js +1 -1
  149. package/build/store/storefront-popup/index.d.ts +74 -0
  150. package/build/store/storefront-popup/index.js +1 -0
  151. package/package.json +18 -12
  152. package/build/components/checkout/components/epaykolay-button/index.d.ts +0 -5
  153. package/build/components/checkout/components/epaykolay-button/index.js +0 -1
  154. package/build/components/checkout/components/epaykolay-button/style.module.scss.js +0 -1
  155. package/build/components/checkout/components/svg/epaykolay.js +0 -1
@@ -1,11 +1,13 @@
1
1
  import { IkasCustomerAddress } from "./address";
2
2
  import { IkasCustomerAttributeValue } from "./attribute/value";
3
3
  import { IkasBaseModel } from "../base";
4
- import { IkasCustomerAccountStatus, IkasCustomerEmailSubscriptionStatus, IkasCustomerRegistrationSource, IkasCustomer as ICustomer } from "@ikas/storefront-models";
4
+ import { IkasCustomerAccountStatus, IkasCustomerEmailSubscriptionStatus, IkasCustomerRegistrationSource, IkasCustomer as ICustomer, IkasCustomerGenderTypeEnum, IkasCustomerEmailSubscriptionStatusesEnum } from "@ikas/storefront-models";
5
5
  import { IkasCustomerPriceListRule } from "./price-list-rule";
6
6
  export declare class IkasCustomer extends IkasBaseModel implements ICustomer {
7
7
  accountStatusUpdatedAt: number | null;
8
+ birthDate: any | null;
8
9
  customerGroupIds: string[] | null;
10
+ customerSegmentIds: string[] | null;
9
11
  customerSequence: number | null;
10
12
  email: string | null;
11
13
  emailVerifiedDate: number | null;
@@ -28,6 +30,11 @@ export declare class IkasCustomer extends IkasBaseModel implements ICustomer {
28
30
  addresses: IkasCustomerAddress[] | null;
29
31
  subscriptionStatus: IkasCustomerEmailSubscriptionStatus | null;
30
32
  attributes: IkasCustomerAttributeValue[] | null;
33
+ gender: IkasCustomerGenderTypeEnum | null;
34
+ phoneSubscriptionStatus: IkasCustomerEmailSubscriptionStatusesEnum | null;
35
+ phoneSubscriptionStatusUpdatedAt: any | null;
36
+ smsSubscriptionStatus: IkasCustomerEmailSubscriptionStatusesEnum | null;
37
+ smsSubscriptionStatusUpdatedAt: any | null;
31
38
  constructor(data: ICustomer);
32
39
  get isSubscribed(): boolean;
33
40
  get basicInfo(): {
@@ -1 +1 @@
1
- import{__extends as e}from'./../../../ext/tslib/tslib.es6.js';import{IkasCustomerAddress as t}from"./address/index.js";import{IkasCustomerAttributeValue as i}from"./attribute/value/index.js";import{IkasBaseModel as r}from"../base/index.js";export{IkasCustomerAccountStatus,IkasCustomerEmailSubscriptionStatus,IkasCustomerRegistrationSource}from"@ikas/storefront-models";import{makeObservable as s,observable as u,computed as o}from"mobx";import{IkasCustomerFunctions as n}from"@ikas/storefront-model-functions";import{IkasCustomerPriceListRule as a}from"./price-list-rule/index.js";var l=function(r){function l(e){var n=r.call(this,e)||this;return n.accountStatus=e.accountStatus||null,n.accountStatusUpdatedAt=e.accountStatusUpdatedAt||null,n.addresses=e.addresses?e.addresses.map((function(e){return new t(e)})):null,n.attributes=e.attributes?e.attributes.map((function(e){return new i(e)})):null,n.customerGroupIds=e.customerGroupIds||null,n.customerSequence=void 0!==e.customerSequence&&null!==e.customerSequence?e.customerSequence:null,n.email=e.email||null,n.emailVerifiedDate=e.emailVerifiedDate||null,n.firstName=e.firstName||"",n.fullName=e.fullName||null,n.isEmailVerified=void 0!==e.isEmailVerified&&null!==e.isEmailVerified?e.isEmailVerified:null,n.isPhoneVerified=void 0!==e.isPhoneVerified&&null!==e.isPhoneVerified?e.isPhoneVerified:null,n.lastName=e.lastName||null,n.note=e.note||null,n.orderCount=void 0!==e.orderCount&&null!==e.orderCount?e.orderCount:null,n.passwordUpdateDate=e.passwordUpdateDate||null,n.phone=e.phone||null,n.phoneVerifiedDate=e.phoneVerifiedDate||null,n.registrationSource=e.registrationSource||null,n.subscriptionStatus=e.subscriptionStatus||null,n.subscriptionStatusUpdatedAt=e.subscriptionStatusUpdatedAt||null,n.tagIds=e.tagIds||null,n.priceListId=e.priceListId||null,n.priceListRules=e.priceListRules?e.priceListRules.map((function(e){return new a(e)})):null,s(n,{accountStatus:u,accountStatusUpdatedAt:u,addresses:u,attributes:u,customerGroupIds:u,customerSequence:u,email:u,emailVerifiedDate:u,firstName:u,fullName:u,isEmailVerified:u,isPhoneVerified:u,lastName:u,note:u,orderCount:u,passwordUpdateDate:u,phone:u,phoneVerifiedDate:u,registrationSource:u,subscriptionStatus:u,subscriptionStatusUpdatedAt:u,tagIds:u,isSubscribed:o,basicInfo:o}),n}return e(l,r),Object.defineProperty(l.prototype,"isSubscribed",{get:function(){return n.isSubscribed(this)},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"basicInfo",{get:function(){return n.getBasicInfo(this)},enumerable:!1,configurable:!0}),l}(r);export{l as IkasCustomer};
1
+ import{__extends as t}from'./../../../ext/tslib/tslib.es6.js';import{IkasCustomerAddress as e}from"./address/index.js";import{IkasCustomerAttributeValue as s}from"./attribute/value/index.js";import{IkasBaseModel as i}from"../base/index.js";export{IkasCustomerAccountStatus,IkasCustomerEmailSubscriptionStatus,IkasCustomerRegistrationSource}from"@ikas/storefront-models";import{makeObservable as u,observable as r,computed as n}from"mobx";import{IkasCustomerFunctions as o}from"@ikas/storefront-model-functions";import{IkasCustomerPriceListRule as a}from"./price-list-rule/index.js";var l=function(i){function l(t){var o=i.call(this,t)||this;return o.accountStatus=t.accountStatus||null,o.accountStatusUpdatedAt=t.accountStatusUpdatedAt||null,o.addresses=t.addresses?t.addresses.map((function(t){return new e(t)})):null,o.attributes=t.attributes?t.attributes.map((function(t){return new s(t)})):null,o.birthDate=t.birthDate||null,o.customerGroupIds=t.customerGroupIds||null,o.customerSegmentIds=t.customerSegmentIds||null,o.customerSequence=void 0!==t.customerSequence&&null!==t.customerSequence?t.customerSequence:null,o.email=t.email||null,o.emailVerifiedDate=t.emailVerifiedDate||null,o.firstName=t.firstName||"",o.fullName=t.fullName||null,o.isEmailVerified=void 0!==t.isEmailVerified&&null!==t.isEmailVerified?t.isEmailVerified:null,o.isPhoneVerified=void 0!==t.isPhoneVerified&&null!==t.isPhoneVerified?t.isPhoneVerified:null,o.lastName=t.lastName||null,o.note=t.note||null,o.orderCount=void 0!==t.orderCount&&null!==t.orderCount?t.orderCount:null,o.passwordUpdateDate=t.passwordUpdateDate||null,o.phone=t.phone||null,o.phoneVerifiedDate=t.phoneVerifiedDate||null,o.registrationSource=t.registrationSource||null,o.subscriptionStatus=t.subscriptionStatus||null,o.smsSubscriptionStatusUpdatedAt=t.smsSubscriptionStatusUpdatedAt||null,o.subscriptionStatusUpdatedAt=t.subscriptionStatusUpdatedAt||null,o.tagIds=t.tagIds||null,o.priceListId=t.priceListId||null,o.priceListRules=t.priceListRules?t.priceListRules.map((function(t){return new a(t)})):null,o.gender=t.gender||null,o.phoneSubscriptionStatus=t.phoneSubscriptionStatus||null,o.phoneSubscriptionStatusUpdatedAt=t.phoneSubscriptionStatusUpdatedAt||null,o.smsSubscriptionStatus=t.smsSubscriptionStatus||null,u(o,{accountStatus:r,accountStatusUpdatedAt:r,addresses:r,attributes:r,customerGroupIds:r,customerSequence:r,email:r,emailVerifiedDate:r,firstName:r,fullName:r,isEmailVerified:r,isPhoneVerified:r,lastName:r,note:r,orderCount:r,passwordUpdateDate:r,phone:r,phoneVerifiedDate:r,registrationSource:r,subscriptionStatus:r,subscriptionStatusUpdatedAt:r,tagIds:r,birthDate:r,customerSegmentIds:r,gender:r,phoneSubscriptionStatus:r,phoneSubscriptionStatusUpdatedAt:r,smsSubscriptionStatus:r,smsSubscriptionStatusUpdatedAt:r,isSubscribed:n,basicInfo:n}),o}return t(l,i),Object.defineProperty(l.prototype,"isSubscribed",{get:function(){return o.isSubscribed(this)},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"basicInfo",{get:function(){return o.getBasicInfo(this)},enumerable:!1,configurable:!0}),l}(i);export{l as IkasCustomer};
@@ -0,0 +1,7 @@
1
+ import { IkasCustomerRegisterSubscriptionInput as IIkasCustomerRegisterSubscriptionInput } from "@ikas/storefront-models";
2
+ export declare class IkasCustomerRegisterSubscriptionInput implements IIkasCustomerRegisterSubscriptionInput {
3
+ email: boolean;
4
+ phone: boolean;
5
+ sms: boolean;
6
+ constructor(data?: Partial<IIkasCustomerRegisterSubscriptionInput>);
7
+ }
@@ -0,0 +1 @@
1
+ var i=function(i){void 0===i&&(i={}),this.email=i.email||!1,this.phone=i.phone||!1,this.sms=i.sms||!1};export{i as IkasCustomerRegisterSubscriptionInput};
@@ -0,0 +1,19 @@
1
+ import { IkasCustomerRegisterSubscriptionInput } from "./customer-register-subscription-input";
2
+ import { IkasSaveCustomerFormDataInput as ISaveCustomerFormDataInputData } from "@ikas/storefront-models";
3
+ export declare class IkasSaveCustomerFormDataInput implements ISaveCustomerFormDataInputData {
4
+ birthDate: any | null;
5
+ captchaToken: string | null;
6
+ email: string;
7
+ firstName: string | null;
8
+ gender: IkasCustomerGenderTypeEnum | null;
9
+ lastName: string | null;
10
+ phone: string | null;
11
+ storefrontPopupId: string | null;
12
+ subscriptions: IkasCustomerRegisterSubscriptionInput | null;
13
+ constructor(data?: Partial<ISaveCustomerFormDataInputData>);
14
+ }
15
+ export declare enum IkasCustomerGenderTypeEnum {
16
+ FEMALE = "FEMALE",
17
+ MALE = "MALE",
18
+ OTHER = "OTHER"
19
+ }
@@ -0,0 +1 @@
1
+ import{IkasCustomerRegisterSubscriptionInput as t}from"./customer-register-subscription-input/index.js";var i,s=function(i){void 0===i&&(i={}),this.birthDate=i.birthDate||null,this.captchaToken=i.captchaToken||null,this.email=i.email||"",this.firstName=i.firstName||null,this.gender=i.gender||null,this.lastName=i.lastName||null,this.phone=i.phone||null,this.storefrontPopupId=i.storefrontPopupId||null,this.subscriptions=i.subscriptions?new t(i.subscriptions):null};!function(t){t.FEMALE="FEMALE",t.MALE="MALE",t.OTHER="OTHER"}(i||(i={}));export{i as IkasCustomerGenderTypeEnum,s as IkasSaveCustomerFormDataInput};
@@ -42,6 +42,8 @@ export * from "./customer/review/summary/star";
42
42
  export * from "./customer/review/summary";
43
43
  export * from "./customer/review";
44
44
  export * from "./customer";
45
+ export * from "./customer-form-data-input/customer-register-subscription-input";
46
+ export * from "./customer-form-data-input";
45
47
  export * from "./district";
46
48
  export * from "./favorite-product";
47
49
  export * from "./filter-category";
@@ -1 +1 @@
1
- import{__spreadArray as t,__assign as e,__awaiter as n,__generator as i}from'./../../../ext/tslib/tslib.es6.js';import r from"lodash/sortBy";import a from"lodash/cloneDeep";import{IkasCategory as o}from"../category/index.js";import{IkasProductVariant as u}from"./variant/index.js";import{IkasProductAttributeValue as s}from"./attribute-value/index.js";import{IkasProductVariantType as c}from"./variant-type/index.js";import{IkasBrand as d}from"../brand/index.js";import{IkasHTMLMetaData as l}from"../html-meta-data/index.js";import{IkasProductTag as p}from"./tag/index.js";import{IkasProductType as f}from"@ikas/storefront-models";export{IkasProductType}from"@ikas/storefront-models";import{IkasProductOptionSet as h}from"./option-set/index.js";import{makeObservable as v,observable as m,computed as g}from"mobx";import{IkasProductFunctions as b}from"@ikas/storefront-model-functions";import{IkasProductCampaign as V}from"./campaign/index.js";import{IkasStorefrontConfig as y}from"@ikas/storefront-config";import{IkasBaseStore as I}from"../../../store/base.js";import P from"lodash/groupBy";import{IkasProductBaseUnit as w}from"./base-unit/index.js";import{formatCurrency as O}from"../../../utils/currency.js";import"lodash/get";import S from"../../../store/product/index.js";import{IkasCustomerReviewList as j}from"../../ui/customer-review-list/index.js";import{IkasProductStar as T}from"./star/index.js";import{IkasProductCampaignOffer as C,IkasProductOffer as x}from"./campaign-offer/index.js";import{IkasProductGroup as G}from"./group/index.js";import{IkasImage as k}from"../image/index.js";import{IkasProductSalesChannel as E}from"./sales-channel/index.js";var A=function(){function A(b){void 0===b&&(b={});var P,k,L,R=this;this.metaData=null,this.brand=null,this.tags=null,this.productOptionSetId=null,this.productOptionSet=null,this.campaigns=null,this.selectedVariantValues=[],this.isFiltered=!1,this.isStatic=!1,this.bundleProductCache={},this.productGroupItems=[],this.showVariantsInGroup=!1,this.selectVariantValue=function(n,i){var r,a=R.metaData,o=R.selectedVariantValues.map((function(t){return t.variantTypeId===n.variantTypeId?n:t})),u=R.variants.find((function(t){return t.isActive&&o.every((function(e){return t.variantValues.some((function(t){return t.id===e.id}))}))}));if(u)R.selectedVariantValues=o;else{var s=R.variantTypes.findIndex((function(t){return t.variantType.id===n.variantTypeId}));if(s>0){var c=R.variantTypes.slice(0,s),d=R.selectedVariantValues.filter((function(t){return c.some((function(e){return e.variantType.id===t.variantTypeId}))})),l=t(t([],d,!0),[n],!1);u=R.variants.find((function(t){return t.isActive&&l.every((function(e){return t.variantValues.some((function(t){return t.id===e.id}))}))}))}else{var p=o.slice(0,o.length-1);(u=R.variants.find((function(t){return t.isActive&&p.every((function(e){return t.variantValues.some((function(t){return t.id===e.id}))}))})))||(u=R.variants.find((function(t){return t.isActive&&t.variantValues.some((function(t){return t.id===n.id}))})))}if(!u)return;R.selectedVariantValues=u.variantValues}var f={};new URLSearchParams(window.location.search).forEach((function(t,n){var i;"vid"!==n&&(f=e(e({},f),((i={})[n]=t,i)))})),R.variantTypes.map((function(t){delete f[t.variantType.slug]}));var h=t(t([],R.variantTypes.map((function(t){var e=t.variantType,n=e.values.find((function(t){return R.selectedVariantValues.some((function(e){return e.id===t.id}))}));if(n)return"".concat(e.slug,"=").concat(n.slug)})),!0),Object.entries(f).map((function(t){var e=t[0],n=t[1];return"".concat(e,"=").concat(n)})),!0).filter((function(t){return!!t})).join("&");if(!i){var v="/".concat(a.slug);if(h&&(v="/".concat(a.slug,"?").concat(h)),v===window.location.pathname)return;null===(r=I.getInstance().router)||void 0===r||r.replace(v,void 0,{shallow:!1,scroll:!1})}},this.getVariantUnitPriceText=function(t){var e,n,i=t.price;if(i.unitPrice&&R.baseUnit){var r=R.baseUnit.baseAmount,a=(null===(n=null===(e=R.baseUnit)||void 0===e?void 0:e.unit)||void 0===n?void 0:n.name)||"";return"".concat(O(i.unitPrice,i.currency||"",i.currencySymbol||"")," / ").concat(r&&1!==r?r:"").concat(a)}},this.getCampaigns=function(){return n(R,void 0,void 0,(function(){var t,e,n,r,a,o=this;return i(this,(function(i){switch(i.label){case 0:return t=I.getInstance(),e=t.customerStore.customer,n=e?e.customerGroupIds:null,r=this.variants.map((function(t){return t.id})),[4,S.getProductCampaigns({input:{customerGroupIds:n,salesChannelId:y.getSalesChannelId()||"",variantIds:r}})];case 1:return a=i.sent(),this.campaigns=a.data,this.campaigns?(this.campaigns.map((function(t){o.variants.map((function(e){var n;t.variantIds.some((function(t){return t===e.id}))&&(null===(n=e.campaigns)||void 0===n||n.push(t))}))})),[2,this.campaigns]):[2]}}))}))},this.getAvailableStockLocations=function(){return n(R,void 0,void 0,(function(){var t,e;return i(this,(function(n){switch(n.label){case 0:return t=this.variants.map((function(t){return t.id})),e=y.getPickupStockLocationIds(),[4,S.getVariantStockLocations({stockLocationIdList:e,variantIds:t})];case 1:return[2,n.sent().data||[]]}}))}))},this.getCustomerReviews=function(t){return n(R,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return[4,(e=new j({productId:this.id,limit:null==t?void 0:t.limit,page:null==t?void 0:t.page,hasImage:null==t?void 0:t.hasImage})).getInitial()];case 1:return n.sent(),[2,e]}}))}))},this.getProductOptionSet=function(){return n(R,void 0,void 0,(function(){var t,e;return i(this,(function(n){switch(n.label){case 0:return this.productOptionSet?[2,!0]:this.productOptionSetId?[4,S.listProductOptionSet({id:{eq:this.productOptionSetId}})]:[2,!1];case 1:return(t=n.sent()).isSuccess&&(null===(e=t.data)||void 0===e?void 0:e.length)?(this.productOptionSet=t.data[0],this.setOptionPrices(),[2,!0]):[2,!1]}}))}))},this.initBundleProducts=function(){return n(R,void 0,void 0,(function(){var t,e,n,r,a,o;return i(this,(function(i){switch(i.label){case 0:return t="","undefined"!=typeof window&&(e=new URLSearchParams(window.location.search),t=e.get("editLineID")||""),t?(n=null===(a=I.getInstance().cartStore.cart)||void 0===a?void 0:a.items.find((function(e){return e.id===t})))&&(r=this.variants.find((function(t){return t.id===n.variant.id})))?(this.selectedVariantValues=r.variantValues,[4,this.getBundleProductsOfVariant(r)]):[3,2]:[3,3];case 1:i.sent(),null===(o=r.bundleSettings)||void 0===o||o.products.forEach((function(t){var e,i,r;try{var a=null===(e=n.variant.bundleProducts)||void 0===e?void 0:e.find((function(e){return e.id===t.id})),o=t.product.variants.find((function(t){return t.id===(null==a?void 0:a.variant.id)}));t.product.selectedVariantValues=o.variantValues,t.quantity=(null===(r=null===(i=n.variant.bundleProducts)||void 0===i?void 0:i.find((function(t){return t.variant.id===o.id})))||void 0===r?void 0:r.quantity)||0}catch(t){console.error(t)}})),i.label=2;case 2:return[3,5];case 3:return[4,this.getBundleProductsOfVariant(this.selectedVariant)];case 4:i.sent(),i.label=5;case 5:return[2]}}))}))},this.setShowVariantsInGroup=function(t){R.showVariantsInGroup=t},this.getBundleProductsOfVariant=function(t){return n(R,void 0,void 0,(function(){var e,n,r,o,u,s,c=this;return i(this,(function(i){switch(i.label){case 0:return(null==(e=null===(r=t.bundleSettings)||void 0===r?void 0:r.products.map((function(t){return t.productId})).filter((function(t){return-1===Object.keys(c.bundleProductCache).indexOf(t)})))?void 0:e.length)?[4,S.searchProducts({input:{productIdList:e,perPage:200}})]:[3,2];case 1:(n=i.sent()).isSuccess&&(null===(u=null===(o=n.data)||void 0===o?void 0:o.data)||void 0===u||u.forEach((function(t){c.bundleProductCache[t.id]=t}))),i.label=2;case 2:return null===(s=t.bundleSettings)||void 0===s||s.products.forEach((function(t){var e=c.bundleProductCache[t.productId];t.setProduct(new A(a(e)))})),[2]}}))}))},this.setOptionPrices=function(){var t,e=R.variants[0];if(e){var n=e.price.currency;null===(t=R.productOptionSet)||void 0===t||t.options.forEach((function(t){var e;t.selectSettings&&t.selectSettings.values.forEach((function(t){var e;t.otherPrices&&(t.price=(null===(e=t.otherPrices.find((function(t){return t.currencyCode===n})))||void 0===e?void 0:e.price)||t.price)})),t.otherPrices&&(t.price=(null===(e=t.otherPrices.find((function(t){return t.currencyCode===n})))||void 0===e?void 0:e.price)||t.price)}))}},this.id=b.id||Date.now()+"",this.name=b.name||"",this.type=b.type||f.PHYSICAL,this.description=b.description||"",this.shortDescription=b.shortDescription||"",this.metaData=b.metaData?new l(b.metaData):null,this.brand=b.brand?new d(b.brand):null,this.categories=b.categories?b.categories.map((function(t){return new o(t)})):[],this.deleted=b.deleted||null,this.tags=b.tags?b.tags.map((function(t){return new p(t)})):[],this.variants=b.variants?b.variants.map((function(t){return new u(t)})):[],this.attributes=b.attributes?b.attributes.map((function(t){return new s(t)})):[],this.variantTypes=b.variantTypes?b.variantTypes.map((function(t){return new c(t)})):[],this.productOptionSetId=b.productOptionSetId||null,this.averageRating=null!==(P=b.averageRating)&&void 0!==P?P:null,this.reviewCount=null!==(k=b.reviewCount)&&void 0!==k?k:null,this.stars=b.stars?b.stars.map((function(t){return new T(t)})):null,this.baseUnit=b.baseUnit?new w(b.baseUnit):null,this.productOptionSet=b.productOptionSet?new h(b.productOptionSet):null,this.campaigns=(null===(L=b.campaigns)||void 0===L?void 0:L.map((function(t){return new V(t)})))||null,this.selectedVariantValues=b.selectedVariantValues||[],this.variantTypes=r(this.variantTypes,"order"),this.groupVariantsByVariantTypeId=b.groupVariantsByVariantTypeId||null,this.dynamicPriceListIds=b.dynamicPriceListIds||null,this.productVolumeDiscountId=b.productVolumeDiscountId||null,this.campaignOffers=b.campaignOffers?b.campaignOffers.map((function(t){return new C(t)})):null,this.appliedCampaignOffer=b.appliedCampaignOffer,this.offers=b.offers?b.offers.map((function(t){return new x(t)})):void 0,this.productGroup=b.productGroup?new G(b.productGroup):null,this.salesChannels=b.salesChannels?b.salesChannels.map((function(t){return new E(t)})):null,this.productGroupItems=b.productGroupItems,this.setOptionPrices(),this.variants.forEach((function(t){return t.product=R})),v(this,{selectedVariantValues:m,isFiltered:m,isStatic:m,showVariantsInGroup:m,hasVariant:g,hasStock:g,hasValidProductOptionValues:g,href:g,productHref:g,mainVariantType:g,mainVariantValue:g,selectedVariant:g,displayedVariantTypes:g,isCustomerReviewEnabled:g,isCustomerReviewLoginRequired:g,isAddToCartEnabled:g,groupedAttributeValues:g,selectedVariantUnitPriceText:g,displayedProductGroups:g})}return Object.defineProperty(A.prototype,"hasVariant",{get:function(){return b.hasVariant(this,this.showVariantsInGroup)},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"hasStock",{get:function(){return this.isStatic?this.selectedVariant.hasStock:b.hasStock(this)},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"hasValidProductOptionValues",{get:function(){return!this.productOptionSet||this.productOptionSet.hasValidValues},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"href",{get:function(){return b.getSelectedVariantHref(this,this.selectedVariantValues)},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"productHref",{get:function(){return this.groupVariantsByVariantTypeId||this.isFiltered?this.href:b.getProductHref(this)},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"mainVariantType",{get:function(){return b.getMainVariantType(this)},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"mainVariantValue",{get:function(){return b.getMainVariantValue(this.selectedVariantValues)},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"selectedVariant",{get:function(){if(!this.hasVariant)return this.variants[0];var t=this.selectedVariantValues.map((function(t){return t.id}));return this.variants.find((function(e){return e.variantValues.every((function(e){return t.includes(e.id)}))}))},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"displayedVariantTypes",{get:function(){return this.hasVariant?b.getDisplayedVariantTypes(this,this.selectedVariantValues):[]},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"isCustomerReviewEnabled",{get:function(){return y.isCustomerReviewEnabled()},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"isCustomerReviewLoginRequired",{get:function(){return y.isCustomerReviewLoginRequired()},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"isAddToCartEnabled",{get:function(){var t,e=!0;return null===(t=this.selectedVariant.bundleSettings)||void 0===t||t.products.forEach((function(t){0===t.quantity&&0!==t.minQuantity&&(e=!1)})),e&&this.hasValidProductOptionValues&&(this.selectedVariant.hasStock||this.selectedVariant.sellIfOutOfStock)},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"groupedAttributeValues",{get:function(){var t,e=P(this.attributes,"productAttributeId");return(null===(t=this.attributes)||void 0===t?void 0:t.map((function(t){var n=t.productAttributeId;if(n){var i=e[n];return(null==i?void 0:i.length)&&i[0].productAttribute?{attribute:i[0].productAttribute,values:i}:void 0}})).filter((function(t){return!!t})))||[]},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"selectedVariantUnitPriceText",{get:function(){return this.getVariantUnitPriceText(this.selectedVariant)},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"displayedProductGroups",{get:function(){var e,n=this,i=[],a=[];return null===(e=this.productGroupItems)||void 0===e||e.forEach((function(t){t.groupValues.forEach((function(t){i.includes(t.name)||i.push(t.name)}))})),i.forEach((function(e){var i,o={name:e,items:[]};n.productGroupItems=r(n.productGroupItems,(function(t){var e;return parseInt((null===(e=t.order)||void 0===e?void 0:e.value)||"999",10)})),null===(i=n.productGroupItems)||void 0===i||i.forEach((function(i){var r,a,u,s=i.groupValues.find((function(t){return t.name===e}));if(s&&!o.items.some((function(t){return t.value===s.value}))){var c="";if(i.productId===n.id)c=n.href;else{var d=(null===(r=n.productGroup)||void 0===r?void 0:r.values.filter((function(t){return t.name!==e})))||[],l=t(t([],d,!0),[s],!1),p=null===(a=n.productGroupItems)||void 0===a?void 0:a.find((function(t){return l.every((function(e){return t.groupValues.some((function(t){return e.name===t.name&&e.value===t.value}))}))}));c=p?p.href:i.href}o.items.push({image:i.image?new k(i.image):null,href:c,value:s.value,isSelected:(null===(u=n.productGroupItems)||void 0===u?void 0:u.some((function(t){return t.groupValues.some((function(t){return t.value===s.value}))&&t.productId===n.id})))||!1})}})),a.push(o)})),a},enumerable:!1,configurable:!0}),A}();export{A as IkasProduct};
1
+ import{__spreadArray as t,__assign as e,__awaiter as n,__generator as i}from'./../../../ext/tslib/tslib.es6.js';import r from"lodash/sortBy";import a from"lodash/cloneDeep";import{IkasCategory as o}from"../category/index.js";import{IkasProductVariant as u}from"./variant/index.js";import{IkasProductAttributeValue as s}from"./attribute-value/index.js";import{IkasProductVariantType as c}from"./variant-type/index.js";import{IkasBrand as d}from"../brand/index.js";import{IkasHTMLMetaData as l}from"../html-meta-data/index.js";import{IkasProductTag as p}from"./tag/index.js";import{IkasProductType as f}from"@ikas/storefront-models";export{IkasProductType}from"@ikas/storefront-models";import{IkasProductOptionSet as h}from"./option-set/index.js";import{makeObservable as v,observable as m,computed as g}from"mobx";import{IkasProductFunctions as b}from"@ikas/storefront-model-functions";import{IkasProductCampaign as V}from"./campaign/index.js";import{IkasStorefrontConfig as y}from"@ikas/storefront-config";import{IkasBaseStore as I}from"../../../store/base.js";import P from"lodash/groupBy";import{IkasProductBaseUnit as w}from"./base-unit/index.js";import{formatCurrency as O}from"../../../utils/currency.js";import"lodash/get";import S from"../../../store/product/index.js";import{IkasCustomerReviewList as j}from"../../ui/customer-review-list/index.js";import{IkasProductStar as T}from"./star/index.js";import{IkasProductCampaignOffer as C,IkasProductOffer as x}from"./campaign-offer/index.js";import{IkasProductGroup as G}from"./group/index.js";import{IkasImage as E}from"../image/index.js";import{IkasProductSalesChannel as k}from"./sales-channel/index.js";var A=function(){function A(b){void 0===b&&(b={});var P,E,L,R=this;this.metaData=null,this.brand=null,this.tags=null,this.productOptionSetId=null,this.productOptionSet=null,this.campaigns=null,this.selectedVariantValues=[],this.isFiltered=!1,this.isStatic=!1,this.bundleProductCache={},this.productGroupItems=[],this.showVariantsInGroup=!1,this.selectVariantValue=function(n,i){var r,a=R.metaData,o=R.selectedVariantValues.map((function(t){return t.variantTypeId===n.variantTypeId?n:t})),u=R.variants.find((function(t){return t.isActive&&o.every((function(e){return t.variantValues.some((function(t){return t.id===e.id}))}))}));if(u)R.selectedVariantValues=o;else{var s=R.variantTypes.findIndex((function(t){return t.variantType.id===n.variantTypeId}));if(s>0){var c=R.variantTypes.slice(0,s),d=R.selectedVariantValues.filter((function(t){return c.some((function(e){return e.variantType.id===t.variantTypeId}))})),l=t(t([],d,!0),[n],!1);u=R.variants.find((function(t){return t.isActive&&l.every((function(e){return t.variantValues.some((function(t){return t.id===e.id}))}))}))}else{var p=o.slice(0,o.length-1);(u=R.variants.find((function(t){return t.isActive&&p.every((function(e){return t.variantValues.some((function(t){return t.id===e.id}))}))})))||(u=R.variants.find((function(t){return t.isActive&&t.variantValues.some((function(t){return t.id===n.id}))})))}if(!u)return;R.selectedVariantValues=u.variantValues}var f={};new URLSearchParams(window.location.search).forEach((function(t,n){var i;"vid"!==n&&(f=e(e({},f),((i={})[n]=t,i)))})),R.variantTypes.map((function(t){delete f[t.variantType.slug]}));var h=t(t([],R.variantTypes.map((function(t){var e=t.variantType,n=e.values.find((function(t){return R.selectedVariantValues.some((function(e){return e.id===t.id}))}));if(n)return"".concat(e.slug,"=").concat(n.slug)})),!0),Object.entries(f).map((function(t){var e=t[0],n=t[1];return"".concat(e,"=").concat(n)})),!0).filter((function(t){return!!t})).join("&");if(!i){var v="/".concat(a.slug);if(h&&(v="/".concat(a.slug,"?").concat(h)),v===window.location.pathname)return;null===(r=I.getInstance().router)||void 0===r||r.replace(v,void 0,{shallow:!1,scroll:!1})}},this.getVariantUnitPriceText=function(t){var e,n,i=t.price;if(i.unitPrice&&R.baseUnit){var r=R.baseUnit.baseAmount,a=(null===(n=null===(e=R.baseUnit)||void 0===e?void 0:e.unit)||void 0===n?void 0:n.name)||"";return"".concat(O(i.unitPrice,i.currency||"",i.currencySymbol||"")," / ").concat(r&&1!==r?r:"").concat(a)}},this.getCampaigns=function(){return n(R,void 0,void 0,(function(){var t,e,n,r,a,o=this;return i(this,(function(i){switch(i.label){case 0:return t=I.getInstance(),e=t.customerStore.customer,n=e?e.customerGroupIds:null,r=this.variants.map((function(t){return t.id})),[4,S.getProductCampaigns({input:{customerGroupIds:n,salesChannelId:y.getSalesChannelId()||"",variantIds:r}})];case 1:return a=i.sent(),this.campaigns=a.data,this.campaigns?(this.campaigns.map((function(t){o.variants.map((function(e){var n;t.variantIds.some((function(t){return t===e.id}))&&(null===(n=e.campaigns)||void 0===n||n.push(t))}))})),[2,this.campaigns]):[2]}}))}))},this.getAvailableStockLocations=function(){return n(R,void 0,void 0,(function(){var t,e;return i(this,(function(n){switch(n.label){case 0:return t=this.variants.map((function(t){return t.id})),e=y.getPickupStockLocationIds(),[4,S.getVariantStockLocations({stockLocationIdList:e,variantIds:t})];case 1:return[2,n.sent().data||[]]}}))}))},this.getCustomerReviews=function(t){return n(R,void 0,void 0,(function(){var n,r,a,o,u;return i(this,(function(i){switch(i.label){case 0:return n=!!(null===(o=this.selectedVariant.bundleSettings)||void 0===o?void 0:o.products.length),r=[this.id],n&&(null===(u=this.selectedVariant.bundleSettings)||void 0===u||u.products.forEach((function(t){r.push(t.productId)}))),[4,(a=new j(e(e(e({},n?{}:{productId:this.id}),{limit:null==t?void 0:t.limit,page:null==t?void 0:t.page,hasImage:null==t?void 0:t.hasImage}),n?{productIds:r}:{}))).getInitial()];case 1:return i.sent(),[2,a]}}))}))},this.getProductOptionSet=function(){return n(R,void 0,void 0,(function(){var t,e;return i(this,(function(n){switch(n.label){case 0:return this.productOptionSet?[2,!0]:this.productOptionSetId?[4,S.listProductOptionSet({id:{eq:this.productOptionSetId}})]:[2,!1];case 1:return(t=n.sent()).isSuccess&&(null===(e=t.data)||void 0===e?void 0:e.length)?(this.productOptionSet=t.data[0],this.setOptionPrices(),[2,!0]):[2,!1]}}))}))},this.initBundleProducts=function(){return n(R,void 0,void 0,(function(){var t,e,n,r,a,o;return i(this,(function(i){switch(i.label){case 0:return t="","undefined"!=typeof window&&(e=new URLSearchParams(window.location.search),t=e.get("editLineID")||""),t?(n=null===(a=I.getInstance().cartStore.cart)||void 0===a?void 0:a.items.find((function(e){return e.id===t})))&&(r=this.variants.find((function(t){return t.id===n.variant.id})))?(this.selectedVariantValues=r.variantValues,[4,this.getBundleProductsOfVariant(r)]):[3,2]:[3,3];case 1:i.sent(),null===(o=r.bundleSettings)||void 0===o||o.products.forEach((function(t){var e,i,r;try{var a=null===(e=n.variant.bundleProducts)||void 0===e?void 0:e.find((function(e){return e.id===t.id})),o=t.product.variants.find((function(t){return t.id===(null==a?void 0:a.variant.id)}));t.product.selectedVariantValues=o.variantValues,t.quantity=(null===(r=null===(i=n.variant.bundleProducts)||void 0===i?void 0:i.find((function(t){return t.variant.id===o.id})))||void 0===r?void 0:r.quantity)||0}catch(t){console.error(t)}})),i.label=2;case 2:return[3,5];case 3:return[4,this.getBundleProductsOfVariant(this.selectedVariant)];case 4:i.sent(),i.label=5;case 5:return[2]}}))}))},this.setShowVariantsInGroup=function(t){R.showVariantsInGroup=t},this.getBundleProductsOfVariant=function(t){return n(R,void 0,void 0,(function(){var e,n,r,o,u,s,c=this;return i(this,(function(i){switch(i.label){case 0:return(null==(e=null===(r=t.bundleSettings)||void 0===r?void 0:r.products.map((function(t){return t.productId})).filter((function(t){return-1===Object.keys(c.bundleProductCache).indexOf(t)})))?void 0:e.length)?[4,S.searchProducts({input:{productIdList:e,perPage:200}})]:[3,2];case 1:(n=i.sent()).isSuccess&&(null===(u=null===(o=n.data)||void 0===o?void 0:o.data)||void 0===u||u.forEach((function(t){c.bundleProductCache[t.id]=t}))),i.label=2;case 2:return null===(s=t.bundleSettings)||void 0===s||s.products.forEach((function(t){var e=c.bundleProductCache[t.productId];t.setProduct(new A(a(e)))})),[2]}}))}))},this.setOptionPrices=function(){var t,e=R.variants[0];if(e){var n=e.price.currency;null===(t=R.productOptionSet)||void 0===t||t.options.forEach((function(t){var e;t.selectSettings&&t.selectSettings.values.forEach((function(t){var e;t.otherPrices&&(t.price=(null===(e=t.otherPrices.find((function(t){return t.currencyCode===n})))||void 0===e?void 0:e.price)||t.price)})),t.otherPrices&&(t.price=(null===(e=t.otherPrices.find((function(t){return t.currencyCode===n})))||void 0===e?void 0:e.price)||t.price)}))}},this.id=b.id||Date.now()+"",this.name=b.name||"",this.type=b.type||f.PHYSICAL,this.description=b.description||"",this.shortDescription=b.shortDescription||"",this.metaData=b.metaData?new l(b.metaData):null,this.brand=b.brand?new d(b.brand):null,this.categories=b.categories?b.categories.map((function(t){return new o(t)})):[],this.deleted=b.deleted||null,this.tags=b.tags?b.tags.map((function(t){return new p(t)})):[],this.variants=b.variants?b.variants.map((function(t){return new u(t)})):[],this.attributes=b.attributes?b.attributes.map((function(t){return new s(t)})):[],this.variantTypes=b.variantTypes?b.variantTypes.map((function(t){return new c(t)})):[],this.productOptionSetId=b.productOptionSetId||null,this.averageRating=null!==(P=b.averageRating)&&void 0!==P?P:null,this.reviewCount=null!==(E=b.reviewCount)&&void 0!==E?E:null,this.stars=b.stars?b.stars.map((function(t){return new T(t)})):null,this.baseUnit=b.baseUnit?new w(b.baseUnit):null,this.productOptionSet=b.productOptionSet?new h(b.productOptionSet):null,this.campaigns=(null===(L=b.campaigns)||void 0===L?void 0:L.map((function(t){return new V(t)})))||null,this.selectedVariantValues=b.selectedVariantValues||[],this.variantTypes=r(this.variantTypes,"order"),this.groupVariantsByVariantTypeId=b.groupVariantsByVariantTypeId||null,this.dynamicPriceListIds=b.dynamicPriceListIds||null,this.productVolumeDiscountId=b.productVolumeDiscountId||null,this.campaignOffers=b.campaignOffers?b.campaignOffers.map((function(t){return new C(t)})):null,this.appliedCampaignOffer=b.appliedCampaignOffer,this.offers=b.offers?b.offers.map((function(t){return new x(t)})):void 0,this.productGroup=b.productGroup?new G(b.productGroup):null,this.salesChannels=b.salesChannels?b.salesChannels.map((function(t){return new k(t)})):null,this.productGroupItems=b.productGroupItems,this.setOptionPrices(),this.variants.forEach((function(t){return t.product=R})),v(this,{selectedVariantValues:m,isFiltered:m,isStatic:m,showVariantsInGroup:m,hasVariant:g,hasStock:g,hasValidProductOptionValues:g,href:g,productHref:g,mainVariantType:g,mainVariantValue:g,selectedVariant:g,displayedVariantTypes:g,isCustomerReviewEnabled:g,isCustomerReviewLoginRequired:g,isAddToCartEnabled:g,groupedAttributeValues:g,selectedVariantUnitPriceText:g,displayedProductGroups:g})}return Object.defineProperty(A.prototype,"hasVariant",{get:function(){return b.hasVariant(this,this.showVariantsInGroup)},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"hasStock",{get:function(){return this.isStatic?this.selectedVariant.hasStock:b.hasStock(this)},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"hasValidProductOptionValues",{get:function(){return!this.productOptionSet||this.productOptionSet.hasValidValues},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"href",{get:function(){return b.getSelectedVariantHref(this,this.selectedVariantValues)},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"productHref",{get:function(){return this.groupVariantsByVariantTypeId||this.isFiltered?this.href:b.getProductHref(this)},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"mainVariantType",{get:function(){return b.getMainVariantType(this)},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"mainVariantValue",{get:function(){return b.getMainVariantValue(this.selectedVariantValues)},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"selectedVariant",{get:function(){if(!this.hasVariant)return this.variants[0];var t=this.selectedVariantValues.map((function(t){return t.id}));return this.variants.find((function(e){return e.variantValues.every((function(e){return t.includes(e.id)}))}))},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"displayedVariantTypes",{get:function(){return this.hasVariant?b.getDisplayedVariantTypes(this,this.selectedVariantValues):[]},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"isCustomerReviewEnabled",{get:function(){return y.isCustomerReviewEnabled()},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"isCustomerReviewLoginRequired",{get:function(){return y.isCustomerReviewLoginRequired()},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"isAddToCartEnabled",{get:function(){var t,e=!0;return null===(t=this.selectedVariant.bundleSettings)||void 0===t||t.products.forEach((function(t){0===t.quantity&&null!==t.minQuantity&&0!==t.minQuantity&&(e=!1)})),e&&this.hasValidProductOptionValues&&(this.selectedVariant.hasStock||this.selectedVariant.sellIfOutOfStock)},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"groupedAttributeValues",{get:function(){var t,e=P(this.attributes,"productAttributeId");return(null===(t=this.attributes)||void 0===t?void 0:t.map((function(t){var n=t.productAttributeId;if(n){var i=e[n];return(null==i?void 0:i.length)&&i[0].productAttribute?{attribute:i[0].productAttribute,values:i}:void 0}})).filter((function(t){return!!t})))||[]},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"selectedVariantUnitPriceText",{get:function(){return this.getVariantUnitPriceText(this.selectedVariant)},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"displayedProductGroups",{get:function(){var e,n=this,i=[],a=[];return null===(e=this.productGroupItems)||void 0===e||e.forEach((function(t){t.groupValues.forEach((function(t){i.includes(t.name)||i.push(t.name)}))})),i.forEach((function(e){var i,o={name:e,items:[]};n.productGroupItems=r(n.productGroupItems,(function(t){var e;return parseInt((null===(e=t.order)||void 0===e?void 0:e.value)||"999",10)})),null===(i=n.productGroupItems)||void 0===i||i.forEach((function(i){var r,a,u,s=i.groupValues.find((function(t){return t.name===e}));if(s&&!o.items.some((function(t){return t.value===s.value}))){var c="";if(i.productId===n.id)c=n.href;else{var d=(null===(r=n.productGroup)||void 0===r?void 0:r.values.filter((function(t){return t.name!==e})))||[],l=t(t([],d,!0),[s],!1),p=null===(a=n.productGroupItems)||void 0===a?void 0:a.find((function(t){return l.every((function(e){return t.groupValues.some((function(t){return e.name===t.name&&e.value===t.value}))}))}));c=p?p.href:i.href}o.items.push({image:i.image?new E(i.image):null,href:c,value:s.value,isSelected:(null===(u=n.productGroupItems)||void 0===u?void 0:u.some((function(t){return t.groupValues.some((function(t){return t.value===s.value}))&&t.productId===n.id})))||!1})}})),a.push(o)})),a},enumerable:!1,configurable:!0}),A}();export{A as IkasProduct};
@@ -0,0 +1,40 @@
1
+ import { IkasBaseModel } from "../base";
2
+ import { IkasStorefrontPopup as IStorefrontPopup } from "@ikas/storefront-models";
3
+ import { IkasStorefrontPopupAnalytics } from "./storefront-popup-analytics";
4
+ import { IkasStorefrontPopupDateFilter } from "./storefront-popup-date-fılter";
5
+ import { IkasStorefrontPopupDisplayFilter } from "./storefront-popup-display-filter";
6
+ import { IkasStorefrontPopupDisplaySettings } from "./storefront-popup-display-settings";
7
+ import { IkasStorefrontPopupPageFilter } from "./storefront-popup-page-filter";
8
+ import { IkasStorefrontPopupRouting } from "./storefront-popup-routing";
9
+ import { Popup } from "@ikas/popup-renderer";
10
+ export declare class IkasStorefrontPopup extends IkasBaseModel implements IStorefrontPopup {
11
+ analytics: IkasStorefrontPopupAnalytics | null;
12
+ contentJson: Popup | null;
13
+ dateFilter: IkasStorefrontPopupDateFilter | null;
14
+ displayFilters: IkasStorefrontPopupDisplayFilter[] | null;
15
+ displaySettings: IkasStorefrontPopupDisplaySettings;
16
+ name: string;
17
+ pageFilters: IkasStorefrontPopupPageFilter[] | null;
18
+ status: IkasStorefrontPopupStatusEnum;
19
+ storefrontRoutings: IkasStorefrontPopupRouting[];
20
+ type: IkasStorefrontPopupTypeEnum;
21
+ visibleDevice: IkasStorefrontPopupDeviceTypeEnum;
22
+ constructor(data: IStorefrontPopup);
23
+ }
24
+ export declare enum IkasStorefrontPopupStatusEnum {
25
+ ACTIVE = "ACTIVE",
26
+ DRAFT = "DRAFT",
27
+ PASSIVE = "PASSIVE"
28
+ }
29
+ export declare enum IkasStorefrontPopupTypeEnum {
30
+ FORM = "FORM",
31
+ NOTIFICATION = "NOTIFICATION",
32
+ NOTIFICATION_BAR = "NOTIFICATION_BAR",
33
+ PAGE_OVERLAY = "PAGE_OVERLAY",
34
+ POPUP = "POPUP"
35
+ }
36
+ export declare enum IkasStorefrontPopupDeviceTypeEnum {
37
+ ALL = "ALL",
38
+ DESKTOP = "DESKTOP",
39
+ MOBILE = "MOBILE"
40
+ }
@@ -0,0 +1 @@
1
+ import{__extends as e}from'./../../../ext/tslib/tslib.es6.js';import{IkasBaseModel as o}from"../base/index.js";import{IkasStorefrontPopupAnalytics as r}from"./storefront-popup-analytics/index.js";import{IkasStorefrontPopupDateFilter as p}from"./storefront-popup-date-fılter/index.js";import{IkasStorefrontPopupDisplayFilter as d}from"./storefront-popup-display-filter/index.js";import{IkasStorefrontPopupDisplaySettings as s}from"./storefront-popup-display-settings/index.js";import{IkasStorefrontPopupPageFilter as n}from"./storefront-popup-page-filter/index.js";import{IkasStorefrontPopupRouting as i}from"./storefront-popup-routing/index.js";import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/components/index.js';import'./../../../ext/@ikas/popup-renderer/build/ext/tslib/tslib.es6.mjs.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/base/index.js';import{Popup as t}from'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/settings/index.js';import"mobx";import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/settings/visibility-condition/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/teaser/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/button/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/divider/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/form/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/form/checkbox/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/form/customer-attribute/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/form/customer-gender/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/image/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/image-column/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/product/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/product/detail-settings/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/social/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/space/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/text/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/background-settings/index.js';import'./../../../ext/@ikas/popup-renderer/build/popup-renderer/models/modal/close-settings/index.js';import{IkasStorefrontConfig as l}from"@ikas/storefront-config";var m,u,a,b=function(o){function b(e){var b,f=this;(f=o.call(this,e)||this).analytics=e.analytics?new r(e.analytics):null,f.dateFilter=e.dateFilter?new p(e.dateFilter):null,f.displayFilters=e.displayFilters?e.displayFilters.map((function(e){return new d(e)})):null,f.displaySettings=e.displaySettings?new s(e.displaySettings):new s,f.name=e.name||"",f.pageFilters=e.pageFilters?e.pageFilters.map((function(e){return new n(e)})):null,f.status=e.status||m.ACTIVE,f.storefrontRoutings=e.storefrontRoutings?e.storefrontRoutings.map((function(e){return new i(e)})):[],f.type=e.type||u.FORM,f.visibleDevice=e.visibleDevice||a.ALL;var x=(null===(b=l.getMerchantSettings())||void 0===b?void 0:b.merchantId)||"",c=l.getCdnUrl()||"";return f.contentJson=e.contentJson?new t(e.contentJson,c,x):null,f}return e(b,o),b}(o);!function(e){e.ACTIVE="ACTIVE",e.DRAFT="DRAFT",e.PASSIVE="PASSIVE"}(m||(m={})),function(e){e.FORM="FORM",e.NOTIFICATION="NOTIFICATION",e.NOTIFICATION_BAR="NOTIFICATION_BAR",e.PAGE_OVERLAY="PAGE_OVERLAY",e.POPUP="POPUP"}(u||(u={})),function(e){e.ALL="ALL",e.DESKTOP="DESKTOP",e.MOBILE="MOBILE"}(a||(a={}));export{b as IkasStorefrontPopup,a as IkasStorefrontPopupDeviceTypeEnum,m as IkasStorefrontPopupStatusEnum,u as IkasStorefrontPopupTypeEnum};
@@ -0,0 +1,7 @@
1
+ import { IkasStorefrontPopupAnalytics as IStorefrontPopupAnalytics } from "@ikas/storefront-models";
2
+ export declare class IkasStorefrontPopupAnalytics implements IStorefrontPopupAnalytics {
3
+ click: number;
4
+ display: number;
5
+ submission: number;
6
+ constructor(data?: Partial<IkasStorefrontPopupAnalytics>);
7
+ }
@@ -0,0 +1 @@
1
+ var i=function(i){void 0===i&&(i={}),this.click=i.click||0,this.display=i.display||0,this.submission=i.submission||0};export{i as IkasStorefrontPopupAnalytics};
@@ -0,0 +1,6 @@
1
+ import { IkasStorefrontPopupDateFilter as IStorefrontPopupDateFilter } from "@ikas/storefront-models";
2
+ export declare class IkasStorefrontPopupDateFilter implements IStorefrontPopupDateFilter {
3
+ endDate: any | null;
4
+ startDate: any | null;
5
+ constructor(data?: Partial<IkasStorefrontPopupDateFilter>);
6
+ }
@@ -0,0 +1 @@
1
+ var t=function(t){void 0===t&&(t={}),this.endDate=t.endDate||null,this.startDate=t.startDate||null};export{t as IkasStorefrontPopupDateFilter};
@@ -0,0 +1,11 @@
1
+ import { IkasStorefrontPopupDisplayFilter as IStorefrontPopupDisplayFilter } from "@ikas/storefront-models";
2
+ export declare class IkasStorefrontPopupDisplayFilter implements IStorefrontPopupDisplayFilter {
3
+ operator: string;
4
+ type: IkasStorefrontPopupDisplayFilterTypeEnum;
5
+ value: string;
6
+ constructor(data?: Partial<IkasStorefrontPopupDisplayFilter>);
7
+ }
8
+ export declare enum IkasStorefrontPopupDisplayFilterTypeEnum {
9
+ CART_TOTAL = "CART_TOTAL",
10
+ CUSTOMER_SEGMENT = "CUSTOMER_SEGMENT"
11
+ }
@@ -0,0 +1 @@
1
+ var T,t=function(t){void 0===t&&(t={}),this.operator=t.operator||"",this.type=t.type||T.CART_TOTAL,this.value=t.value||""};!function(T){T.CART_TOTAL="CART_TOTAL",T.CUSTOMER_SEGMENT="CUSTOMER_SEGMENT"}(T||(T={}));export{t as IkasStorefrontPopupDisplayFilter,T as IkasStorefrontPopupDisplayFilterTypeEnum};
@@ -0,0 +1,16 @@
1
+ import { IkasStorefrontPopupDisplaySettings as IStorefrontPopupDisplaySettings } from "@ikas/storefront-models";
2
+ export declare class IkasStorefrontPopupDisplaySettings implements IStorefrontPopupDisplaySettings {
3
+ frequency: IkasStorefrontPopupDisplayFrequencyEnum;
4
+ triggerType: IkasStorefrontPopupDisplayTriggerTypeEnum;
5
+ triggerValue: number | null;
6
+ constructor(data?: Partial<IkasStorefrontPopupDisplaySettings>);
7
+ }
8
+ export declare enum IkasStorefrontPopupDisplayFrequencyEnum {
9
+ EVERY_TIME = "EVERY_TIME",
10
+ ONCE_PER_SESSION = "ONCE_PER_SESSION"
11
+ }
12
+ export declare enum IkasStorefrontPopupDisplayTriggerTypeEnum {
13
+ EXIT_INTENT = "EXIT_INTENT",
14
+ ON_PAGE_LOAD = "ON_PAGE_LOAD",
15
+ SCROLL_DOWN = "SCROLL_DOWN"
16
+ }
@@ -0,0 +1 @@
1
+ var E,e,r=function(r){void 0===r&&(r={}),this.frequency=r.frequency||E.EVERY_TIME,this.triggerType=r.triggerType||e.EXIT_INTENT,this.triggerValue=void 0!==r.triggerValue&&null!==r.triggerValue?r.triggerValue:null};!function(E){E.EVERY_TIME="EVERY_TIME",E.ONCE_PER_SESSION="ONCE_PER_SESSION"}(E||(E={})),function(E){E.EXIT_INTENT="EXIT_INTENT",E.ON_PAGE_LOAD="ON_PAGE_LOAD",E.SCROLL_DOWN="SCROLL_DOWN"}(e||(e={}));export{E as IkasStorefrontPopupDisplayFrequencyEnum,r as IkasStorefrontPopupDisplaySettings,e as IkasStorefrontPopupDisplayTriggerTypeEnum};
@@ -0,0 +1,16 @@
1
+ import { IkasStorefrontPopupPageFilter as IStorefrontPopupPageFilter } from "@ikas/storefront-models";
2
+ import { IkasStorefrontPopupPageFilterData } from "./storefront-popup-page-filter-data";
3
+ export declare class IkasStorefrontPopupPageFilter implements IStorefrontPopupPageFilter {
4
+ filters: IkasStorefrontPopupPageFilterData[] | null;
5
+ pageType: IkasStorefrontPopupPageFilterTypeEnum;
6
+ constructor(data?: Partial<IkasStorefrontPopupPageFilter>);
7
+ }
8
+ export declare enum IkasStorefrontPopupPageFilterTypeEnum {
9
+ ACCOUNT = "ACCOUNT",
10
+ CART = "CART",
11
+ CATEGORY = "CATEGORY",
12
+ CUSTOM = "CUSTOM",
13
+ HOME = "HOME",
14
+ PRODUCT = "PRODUCT",
15
+ PRODUCT_BRAND = "PRODUCT_BRAND"
16
+ }
@@ -0,0 +1 @@
1
+ import{IkasStorefrontPopupPageFilterData as C}from"./storefront-popup-page-filter-data/index.js";var t,T=function(T){void 0===T&&(T={}),this.filters=T.filters?T.filters.map((function(t){return new C(t)})):null,this.pageType=T.pageType||t.ACCOUNT};!function(C){C.ACCOUNT="ACCOUNT",C.CART="CART",C.CATEGORY="CATEGORY",C.CUSTOM="CUSTOM",C.HOME="HOME",C.PRODUCT="PRODUCT",C.PRODUCT_BRAND="PRODUCT_BRAND"}(t||(t={}));export{T as IkasStorefrontPopupPageFilter,t as IkasStorefrontPopupPageFilterTypeEnum};
@@ -0,0 +1,12 @@
1
+ import { IkasStorefrontPopupPageFilterData as IStorefrontPopupPageFilterData } from "@ikas/storefront-models";
2
+ export declare class IkasStorefrontPopupPageFilterData implements IStorefrontPopupPageFilterData {
3
+ type: IkasStorefrontPopupPageFilterDataTypeEnum;
4
+ value: string;
5
+ constructor(data?: Partial<IkasStorefrontPopupPageFilterData>);
6
+ }
7
+ export declare enum IkasStorefrontPopupPageFilterDataTypeEnum {
8
+ CONTAINS = "CONTAINS",
9
+ DOES_NOT_CONTAIN = "DOES_NOT_CONTAIN",
10
+ EXACT_MATCH = "EXACT_MATCH",
11
+ ID_LIST = "ID_LIST"
12
+ }
@@ -0,0 +1 @@
1
+ var T,N=function(N){void 0===N&&(N={}),this.type=N.type||T.CONTAINS,this.value=N.value||""};!function(T){T.CONTAINS="CONTAINS",T.DOES_NOT_CONTAIN="DOES_NOT_CONTAIN",T.EXACT_MATCH="EXACT_MATCH",T.ID_LIST="ID_LIST"}(T||(T={}));export{N as IkasStorefrontPopupPageFilterData,T as IkasStorefrontPopupPageFilterDataTypeEnum};
@@ -0,0 +1,6 @@
1
+ import { IkasStorefrontPopupRouting as IStorefrontPopupRouting } from "@ikas/storefront-models";
2
+ export declare class IkasStorefrontPopupRouting implements IStorefrontPopupRouting {
3
+ storefrontId: string;
4
+ storefrontRoutingId: string;
5
+ constructor(data?: Partial<IkasStorefrontPopupRouting>);
6
+ }
@@ -0,0 +1 @@
1
+ var t=function(t){void 0===t&&(t={}),this.storefrontId=t.storefrontId||"",this.storefrontRoutingId=t.storefrontRoutingId||""};export{t as IkasStorefrontPopupRouting};
@@ -1 +1 @@
1
- import{__awaiter as t,__generator as i}from'./../../../ext/tslib/tslib.es6.js';import{makeAutoObservable as e}from"mobx";import a from"../../../store/blog/index.js";import{IkasBlogCategory as o}from"../../data/blog/category/index.js";import"../../data/blog/content/index.js";import"../../data/blog/meta-data/index.js";import"../../data/blog/tag/index.js";import"../../data/blog/index.js";import"../../data/brand/index.js";import"@ikas/storefront-models";import"../../data/campaign-offer/index.js";import"../../data/cart/campaign-offer/index.js";import"../../data/cart/index.js";import"../../data/category/path-item/index.js";import"../../data/category/index.js";import"../../data/checkout/index.js";import"../../data/checkout-settings/index.js";import"../../data/city/index.js";import"../../data/country/index.js";import"../../data/customer/address/region/index.js";import"../../data/customer/address/index.js";import"../../data/customer/address/ikas-localized-customer-address.js";import"../../data/customer/attribute/index.js";import"../../data/customer/review/summary/index.js";import"../../data/customer/review/index.js";import"../../data/customer/index.js";import"../../data/district/index.js";import"../../data/favorite-product/index.js";import"../../data/filter-category/index.js";import"../../data/html-meta-data/index.js";import"../../data/image/index.js";import"../../data/order/address/region/index.js";import"../../data/order/address/index.js";import"../../data/order/line-item/option/value/index.js";import"../../data/order/line-item/variant/value/index.js";import"../../data/order/line-item/variant/index.js";import"../../data/order/line-item/index.js";import"../../data/order/package/index.js";import"../../data/order/transaction/index.js";import"../../data/order/index.js";import"../../data/payment-gateway/index.js";import"../../data/product/attribute-value/index.js";import"../../data/product/filter/index.js";import"../../data/product/campaign-offer/index.js";import"../../data/product/option-set/option/index.js";import"../../data/product/option-set/index.js";import"../../data/product/stock-location/index.js";import"../../data/product/variant/price/index.js";import"../../data/product/variant/index.js";import"../../data/variant-type/index.js";import"../../data/product/index.js";import"../../data/raffle/index.js";import"../../data/shipping-zone/state/city/district/region/index.js";import"../../data/state/index.js";import"../../data/theme-json/index.js";import"../../data/theme-json/component/index.js";import"../../data/theme-json/custom-data/index.js";import"../../data/variant-type/variant-value/index.js";import"@ikas/localized-address";var r,n=function(){function n(a){var n=this;this._initialized=!1,this._minPage=null,this._isLoading=!1,this.getPrev=function(){return t(n,void 0,void 0,(function(){var t,e,a,o,r,n;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=(null===(r=null===(o=e.data)||void 0===o?void 0:o.data)||void 0===r?void 0:r.concat(this.data))||this.data,this._count=(null===(n=e.data)||void 0===n?void 0:n.count)||this._count,this._minPage=t,[3,5];case 3:return a=i.sent(),console.log(a),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getNext=function(){return t(n,void 0,void 0,(function(){var t,e,a,o;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((null===(a=t.data)||void 0===a?void 0:a.data)||[]),this._count=(null===(o=t.data)||void 0===o?void 0:o.count)||this._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(n,void 0,void 0,(function(){var t,a,o,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=(null===(o=t.data)||void 0===o?void 0:o.data)||[],this._count=(null===(r=t.data)||void 0===r?void 0:r.count)||0,this._page=e,this._minPage=e,[3,5];case 3:return a=i.sent(),console.log(a),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.data=a.data?a.data.map((function(t){return new o(t)})):[],this._type=a.type||a.blogCategoryListPropValue.blogCategoryListType||r.ALL,this._limit=a.limit||a.blogCategoryListPropValue.initialLimit||20,this._page=a.page||1,this._count=a.count||0,this._initialized=a.initialized||!1,this._minPage=a.minPage,this._blogCategoryListPropValue=a.blogCategoryListPropValue,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,"isStatic",{get:function(){return this._type===r.STATIC},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"hasPrev",{get:function(){return!(this.isStatic||!this._minPage)&&this._minPage>1},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"hasNext",{get:function(){return!this.isStatic&&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.listBlogCategories=function(e,o){return t(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,a.listBlogCategory({id:this.isStatic&&this._blogCategoryListPropValue.blogCategoryIds?{in:this._blogCategoryListPropValue.blogCategoryIds}:void 0,pagination:{page:e,limit:o}})];case 1:return[2,t.sent()]}}))}))},n.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}},n}();!function(t){t.ALL="ALL",t.STATIC="STATIC"}(r||(r={}));export{n as IkasBlogCategoryList,r as IkasBlogCategoryListType};
1
+ import{__awaiter as t,__generator as i}from'./../../../ext/tslib/tslib.es6.js';import{makeAutoObservable as e}from"mobx";import a from"../../../store/blog/index.js";import{IkasBlogCategory as o}from"../../data/blog/category/index.js";import"../../data/blog/content/index.js";import"../../data/blog/meta-data/index.js";import"../../data/blog/tag/index.js";import"../../data/blog/index.js";import"../../data/brand/index.js";import"@ikas/storefront-models";import"../../data/campaign-offer/index.js";import"../../data/cart/campaign-offer/index.js";import"../../data/cart/index.js";import"../../data/category/path-item/index.js";import"../../data/category/index.js";import"../../data/checkout/index.js";import"../../data/checkout-settings/index.js";import"../../data/city/index.js";import"../../data/country/index.js";import"../../data/customer/address/region/index.js";import"../../data/customer/address/index.js";import"../../data/customer/address/ikas-localized-customer-address.js";import"../../data/customer/attribute/index.js";import"../../data/customer/review/summary/index.js";import"../../data/customer/review/index.js";import"../../data/customer/index.js";import"../../data/customer-form-data-input/index.js";import"../../data/district/index.js";import"../../data/favorite-product/index.js";import"../../data/filter-category/index.js";import"../../data/html-meta-data/index.js";import"../../data/image/index.js";import"../../data/order/address/region/index.js";import"../../data/order/address/index.js";import"../../data/order/line-item/option/value/index.js";import"../../data/order/line-item/variant/value/index.js";import"../../data/order/line-item/variant/index.js";import"../../data/order/line-item/index.js";import"../../data/order/package/index.js";import"../../data/order/transaction/index.js";import"../../data/order/index.js";import"../../data/payment-gateway/index.js";import"../../data/product/attribute-value/index.js";import"../../data/product/filter/index.js";import"../../data/product/campaign-offer/index.js";import"../../data/product/option-set/option/index.js";import"../../data/product/option-set/index.js";import"../../data/product/stock-location/index.js";import"../../data/product/variant/price/index.js";import"../../data/product/variant/index.js";import"../../data/variant-type/index.js";import"../../data/product/index.js";import"../../data/raffle/index.js";import"../../data/shipping-zone/state/city/district/region/index.js";import"../../data/state/index.js";import"../../data/theme-json/index.js";import"../../data/theme-json/component/index.js";import"../../data/theme-json/custom-data/index.js";import"../../data/variant-type/variant-value/index.js";import"@ikas/localized-address";var r,n=function(){function n(a){var n=this;this._initialized=!1,this._minPage=null,this._isLoading=!1,this.getPrev=function(){return t(n,void 0,void 0,(function(){var t,e,a,o,r,n;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=(null===(r=null===(o=e.data)||void 0===o?void 0:o.data)||void 0===r?void 0:r.concat(this.data))||this.data,this._count=(null===(n=e.data)||void 0===n?void 0:n.count)||this._count,this._minPage=t,[3,5];case 3:return a=i.sent(),console.log(a),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getNext=function(){return t(n,void 0,void 0,(function(){var t,e,a,o;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((null===(a=t.data)||void 0===a?void 0:a.data)||[]),this._count=(null===(o=t.data)||void 0===o?void 0:o.count)||this._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(n,void 0,void 0,(function(){var t,a,o,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=(null===(o=t.data)||void 0===o?void 0:o.data)||[],this._count=(null===(r=t.data)||void 0===r?void 0:r.count)||0,this._page=e,this._minPage=e,[3,5];case 3:return a=i.sent(),console.log(a),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.data=a.data?a.data.map((function(t){return new o(t)})):[],this._type=a.type||a.blogCategoryListPropValue.blogCategoryListType||r.ALL,this._limit=a.limit||a.blogCategoryListPropValue.initialLimit||20,this._page=a.page||1,this._count=a.count||0,this._initialized=a.initialized||!1,this._minPage=a.minPage,this._blogCategoryListPropValue=a.blogCategoryListPropValue,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,"isStatic",{get:function(){return this._type===r.STATIC},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"hasPrev",{get:function(){return!(this.isStatic||!this._minPage)&&this._minPage>1},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"hasNext",{get:function(){return!this.isStatic&&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.listBlogCategories=function(e,o){return t(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,a.listBlogCategory({id:this.isStatic&&this._blogCategoryListPropValue.blogCategoryIds?{in:this._blogCategoryListPropValue.blogCategoryIds}:void 0,pagination:{page:e,limit:o}})];case 1:return[2,t.sent()]}}))}))},n.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}},n}();!function(t){t.ALL="ALL",t.STATIC="STATIC"}(r||(r={}));export{n as IkasBlogCategoryList,r as IkasBlogCategoryListType};
@@ -1 +1 @@
1
- import{__awaiter as t,__generator as i}from'./../../../ext/tslib/tslib.es6.js';import"../../data/blog/category/index.js";import"../../data/blog/content/index.js";import"../../data/blog/meta-data/index.js";import"../../data/blog/tag/index.js";import"../../data/blog/index.js";import{IkasBrand as e}from"../../data/brand/index.js";import"@ikas/storefront-models";import{makeAutoObservable as a}from"mobx";import"../../data/campaign-offer/index.js";import"../../data/cart/campaign-offer/index.js";import"../../data/cart/index.js";import"../../data/category/path-item/index.js";import"../../data/category/index.js";import"../../data/checkout/index.js";import"../../data/checkout-settings/index.js";import"../../data/city/index.js";import"../../data/country/index.js";import"../../data/customer/address/region/index.js";import"../../data/customer/address/index.js";import"../../data/customer/address/ikas-localized-customer-address.js";import"../../data/customer/attribute/index.js";import"../../data/customer/review/summary/index.js";import"../../data/customer/review/index.js";import"../../data/customer/index.js";import"../../data/district/index.js";import"../../data/favorite-product/index.js";import"../../data/filter-category/index.js";import"../../data/html-meta-data/index.js";import"../../data/image/index.js";import"../../data/order/address/region/index.js";import"../../data/order/address/index.js";import"../../data/order/line-item/option/value/index.js";import"../../data/order/line-item/variant/value/index.js";import"../../data/order/line-item/variant/index.js";import"../../data/order/line-item/index.js";import"../../data/order/package/index.js";import"../../data/order/transaction/index.js";import"../../data/order/index.js";import"../../data/payment-gateway/index.js";import"../../data/product/attribute-value/index.js";import"../../data/product/filter/index.js";import"../../data/product/campaign-offer/index.js";import"../../data/product/option-set/option/index.js";import"../../data/product/option-set/index.js";import"../../data/product/stock-location/index.js";import"../../data/product/variant/price/index.js";import"../../data/product/variant/index.js";import"../../data/variant-type/index.js";import"../../data/product/index.js";import"../../data/raffle/index.js";import"../../data/shipping-zone/state/city/district/region/index.js";import"../../data/state/index.js";import"../../data/theme-json/index.js";import"../../data/theme-json/component/index.js";import"../../data/theme-json/custom-data/index.js";import"../../data/variant-type/variant-value/index.js";import"@ikas/localized-address";import r from"../../../store/brand/index.js";var n,o,s=function(){function s(s){var d=this;this._initialized=!1,this._minPage=null,this._isLoading=!1,this.getInitial=function(){return t(d,void 0,void 0,(function(){var t,e,a,n,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,r.listProductBrand({id:this.isStatic&&this._brandListPropValue.brandIds?{in:this._brandListPropValue.brandIds}:void 0,pagination:{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===(a=this._brandListPropValue.brandIds)||void 0===a?void 0:a.map((function(i){var e,a;return null===(a=null===(e=t.data)||void 0===e?void 0:e.data)||void 0===a?void 0:a.find((function(t){return t.id===i}))})).filter((function(t){return!!t})))||[]:this.data=(null===(n=t.data)||void 0===n?void 0:n.data)||[],this._count=(null===(o=t.data)||void 0===o?void 0:o.count)||0,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(d,void 0,void 0,(function(){var t,e,a,n,o,s;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,r.listProductBrand({pagination:{page:t,limit:this.limit},sort:this.getSortParams()})];case 2:return e=i.sent(),this.data=(null===(o=null===(n=e.data)||void 0===n?void 0:n.data)||void 0===o?void 0:o.concat(this.data))||this.data,this._count=(null===(s=e.data)||void 0===s?void 0:s.count)||0,this._minPage=t,[3,5];case 3:return a=i.sent(),console.log(a),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getNext=function(){return t(d,void 0,void 0,(function(){var t,e,a,n;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,r.listProductBrand({pagination:{page:this.page+1,limit:this.limit},sort:this.getSortParams()})];case 2:return t=i.sent(),this.data=this.data.concat((null===(a=t.data)||void 0===a?void 0:a.data)||[]),this._count=(null===(n=t.data)||void 0===n?void 0:n.count)||this.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(d,void 0,void 0,(function(){var t,a,n,o;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,r.listProductBrand({pagination:{page:e,limit:this.limit},sort:this.getSortParams()})];case 2:return t=i.sent(),this.data=(null===(n=t.data)||void 0===n?void 0:n.data)||[],this._count=(null===(o=t.data)||void 0===o?void 0:o.count)||0,this._page=e,this._minPage=e,[3,5];case 3:return a=i.sent(),console.log(a),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.data=s.data?s.data.map((function(t){return new e(t)})):[],this._type=s.type||s.brandListPropValue.brandListType||n.ALL,this._sort=s.sort||s.brandListPropValue.initialSort||o.A_Z,this._limit=s.limit||s.brandListPropValue.initialLimit||20,this._page=s.page||1,this._count=s.count||0,this._initialized=s.initialized||!1,this._minPage=s.minPage,this._brandListPropValue=s.brandListPropValue,a(this)}return Object.defineProperty(s.prototype,"sort",{get:function(){return this._sort},enumerable:!1,configurable:!0}),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===n.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.getSortParams=function(){return this._sort===o.A_Z?"name":"-name"},s.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]}}))}))},s.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}},s}();!function(t){t.ALL="ALL",t.STATIC="STATIC"}(n||(n={})),function(t){t.A_Z="A_Z",t.Z_A="Z_A"}(o||(o={}));export{s as IkasBrandList,o as IkasBrandListSortType,n as IkasBrandListType};
1
+ import{__awaiter as t,__generator as i}from'./../../../ext/tslib/tslib.es6.js';import"../../data/blog/category/index.js";import"../../data/blog/content/index.js";import"../../data/blog/meta-data/index.js";import"../../data/blog/tag/index.js";import"../../data/blog/index.js";import{IkasBrand as e}from"../../data/brand/index.js";import"@ikas/storefront-models";import{makeAutoObservable as a}from"mobx";import"../../data/campaign-offer/index.js";import"../../data/cart/campaign-offer/index.js";import"../../data/cart/index.js";import"../../data/category/path-item/index.js";import"../../data/category/index.js";import"../../data/checkout/index.js";import"../../data/checkout-settings/index.js";import"../../data/city/index.js";import"../../data/country/index.js";import"../../data/customer/address/region/index.js";import"../../data/customer/address/index.js";import"../../data/customer/address/ikas-localized-customer-address.js";import"../../data/customer/attribute/index.js";import"../../data/customer/review/summary/index.js";import"../../data/customer/review/index.js";import"../../data/customer/index.js";import"../../data/customer-form-data-input/index.js";import"../../data/district/index.js";import"../../data/favorite-product/index.js";import"../../data/filter-category/index.js";import"../../data/html-meta-data/index.js";import"../../data/image/index.js";import"../../data/order/address/region/index.js";import"../../data/order/address/index.js";import"../../data/order/line-item/option/value/index.js";import"../../data/order/line-item/variant/value/index.js";import"../../data/order/line-item/variant/index.js";import"../../data/order/line-item/index.js";import"../../data/order/package/index.js";import"../../data/order/transaction/index.js";import"../../data/order/index.js";import"../../data/payment-gateway/index.js";import"../../data/product/attribute-value/index.js";import"../../data/product/filter/index.js";import"../../data/product/campaign-offer/index.js";import"../../data/product/option-set/option/index.js";import"../../data/product/option-set/index.js";import"../../data/product/stock-location/index.js";import"../../data/product/variant/price/index.js";import"../../data/product/variant/index.js";import"../../data/variant-type/index.js";import"../../data/product/index.js";import"../../data/raffle/index.js";import"../../data/shipping-zone/state/city/district/region/index.js";import"../../data/state/index.js";import"../../data/theme-json/index.js";import"../../data/theme-json/component/index.js";import"../../data/theme-json/custom-data/index.js";import"../../data/variant-type/variant-value/index.js";import"@ikas/localized-address";import r from"../../../store/brand/index.js";var n,o,s=function(){function s(s){var d=this;this._initialized=!1,this._minPage=null,this._isLoading=!1,this.getInitial=function(){return t(d,void 0,void 0,(function(){var t,e,a,n,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,r.listProductBrand({id:this.isStatic&&this._brandListPropValue.brandIds?{in:this._brandListPropValue.brandIds}:void 0,pagination:{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===(a=this._brandListPropValue.brandIds)||void 0===a?void 0:a.map((function(i){var e,a;return null===(a=null===(e=t.data)||void 0===e?void 0:e.data)||void 0===a?void 0:a.find((function(t){return t.id===i}))})).filter((function(t){return!!t})))||[]:this.data=(null===(n=t.data)||void 0===n?void 0:n.data)||[],this._count=(null===(o=t.data)||void 0===o?void 0:o.count)||0,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(d,void 0,void 0,(function(){var t,e,a,n,o,s;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,r.listProductBrand({pagination:{page:t,limit:this.limit},sort:this.getSortParams()})];case 2:return e=i.sent(),this.data=(null===(o=null===(n=e.data)||void 0===n?void 0:n.data)||void 0===o?void 0:o.concat(this.data))||this.data,this._count=(null===(s=e.data)||void 0===s?void 0:s.count)||0,this._minPage=t,[3,5];case 3:return a=i.sent(),console.log(a),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getNext=function(){return t(d,void 0,void 0,(function(){var t,e,a,n;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,r.listProductBrand({pagination:{page:this.page+1,limit:this.limit},sort:this.getSortParams()})];case 2:return t=i.sent(),this.data=this.data.concat((null===(a=t.data)||void 0===a?void 0:a.data)||[]),this._count=(null===(n=t.data)||void 0===n?void 0:n.count)||this.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(d,void 0,void 0,(function(){var t,a,n,o;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,r.listProductBrand({pagination:{page:e,limit:this.limit},sort:this.getSortParams()})];case 2:return t=i.sent(),this.data=(null===(n=t.data)||void 0===n?void 0:n.data)||[],this._count=(null===(o=t.data)||void 0===o?void 0:o.count)||0,this._page=e,this._minPage=e,[3,5];case 3:return a=i.sent(),console.log(a),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.data=s.data?s.data.map((function(t){return new e(t)})):[],this._type=s.type||s.brandListPropValue.brandListType||n.ALL,this._sort=s.sort||s.brandListPropValue.initialSort||o.A_Z,this._limit=s.limit||s.brandListPropValue.initialLimit||20,this._page=s.page||1,this._count=s.count||0,this._initialized=s.initialized||!1,this._minPage=s.minPage,this._brandListPropValue=s.brandListPropValue,a(this)}return Object.defineProperty(s.prototype,"sort",{get:function(){return this._sort},enumerable:!1,configurable:!0}),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===n.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.getSortParams=function(){return this._sort===o.A_Z?"name":"-name"},s.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]}}))}))},s.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}},s}();!function(t){t.ALL="ALL",t.STATIC="STATIC"}(n||(n={})),function(t){t.A_Z="A_Z",t.Z_A="Z_A"}(o||(o={}));export{s as IkasBrandList,o as IkasBrandListSortType,n as IkasBrandListType};
@@ -1 +1 @@
1
- import{__awaiter as t,__generator as i}from'./../../../ext/tslib/tslib.es6.js';import"../../data/blog/category/index.js";import"../../data/blog/content/index.js";import"../../data/blog/meta-data/index.js";import"../../data/blog/tag/index.js";import"../../data/blog/index.js";import"../../data/brand/index.js";import"@ikas/storefront-models";import{makeAutoObservable as e}from"mobx";import"../../data/campaign-offer/index.js";import"../../data/cart/campaign-offer/index.js";import"../../data/cart/index.js";import"../../data/category/path-item/index.js";import{IkasCategory as a}from"../../data/category/index.js";import"../../data/checkout/index.js";import"../../data/checkout-settings/index.js";import"../../data/city/index.js";import"../../data/country/index.js";import"../../data/customer/address/region/index.js";import"../../data/customer/address/index.js";import"../../data/customer/address/ikas-localized-customer-address.js";import"../../data/customer/attribute/index.js";import"../../data/customer/review/summary/index.js";import"../../data/customer/review/index.js";import"../../data/customer/index.js";import"../../data/district/index.js";import"../../data/favorite-product/index.js";import"../../data/filter-category/index.js";import"../../data/html-meta-data/index.js";import"../../data/image/index.js";import"../../data/order/address/region/index.js";import"../../data/order/address/index.js";import"../../data/order/line-item/option/value/index.js";import"../../data/order/line-item/variant/value/index.js";import"../../data/order/line-item/variant/index.js";import"../../data/order/line-item/index.js";import"../../data/order/package/index.js";import"../../data/order/transaction/index.js";import"../../data/order/index.js";import"../../data/payment-gateway/index.js";import"../../data/product/attribute-value/index.js";import"../../data/product/filter/index.js";import"../../data/product/campaign-offer/index.js";import"../../data/product/option-set/option/index.js";import"../../data/product/option-set/index.js";import"../../data/product/stock-location/index.js";import"../../data/product/variant/price/index.js";import"../../data/product/variant/index.js";import"../../data/variant-type/index.js";import"../../data/product/index.js";import"../../data/raffle/index.js";import"../../data/shipping-zone/state/city/district/region/index.js";import"../../data/state/index.js";import"../../data/theme-json/index.js";import"../../data/theme-json/component/index.js";import"../../data/theme-json/custom-data/index.js";import"../../data/variant-type/variant-value/index.js";import"@ikas/localized-address";import r from"../../../store/category/index.js";var o,n,s=function(){function s(s){var d=this;this._initialized=!1,this._minPage=null,this._isLoading=!1,this.getInitial=function(){return t(d,void 0,void 0,(function(){var t,e,a,o,n;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,r.listCategory({id:this.isStatic&&this._categoryListPropValue.categoryIds?{in:this._categoryListPropValue.categoryIds}:void 0,pagination:{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===(a=this._categoryListPropValue.categoryIds)||void 0===a?void 0:a.map((function(i){var e,a;return null===(a=null===(e=t.data)||void 0===e?void 0:e.data)||void 0===a?void 0:a.find((function(t){return t.id===i}))})).filter((function(t){return!!t})))||[]:this.data=(null===(o=t.data)||void 0===o?void 0:o.data)||[],this._count=(null===(n=t.data)||void 0===n?void 0:n.count)||0,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(d,void 0,void 0,(function(){var t,e,a,o,n,s;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,r.listCategory({pagination:{page:t,limit:this.limit},sort:this.getSortParams()})];case 2:return e=i.sent(),this.data=(null===(n=null===(o=e.data)||void 0===o?void 0:o.data)||void 0===n?void 0:n.concat(this.data))||this.data,this._count=(null===(s=e.data)||void 0===s?void 0:s.count)||this._count,this._minPage=t,[3,5];case 3:return a=i.sent(),console.log(a),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getNext=function(){return t(d,void 0,void 0,(function(){var t,e,a,o;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,r.listCategory({pagination:{page:this.page+1,limit:this.limit},sort:this.getSortParams()})];case 2:return t=i.sent(),this.data=this.data.concat((null===(a=t.data)||void 0===a?void 0:a.data)||[]),this._count=(null===(o=t.data)||void 0===o?void 0:o.count)||this._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(d,void 0,void 0,(function(){var t,a,o,n;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,r.listCategory({pagination:{page:e,limit:this.limit},sort:this.getSortParams()})];case 2:return t=i.sent(),this.data=(null===(o=t.data)||void 0===o?void 0:o.data)||[],this._count=(null===(n=t.data)||void 0===n?void 0:n.count)||0,this._page=e,this._minPage=e,[3,5];case 3:return a=i.sent(),console.log(a),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.data=s.data?s.data.map((function(t){return new a(t)})):[],this._type=s.type||s.categoryListPropValue.categoryListType||o.ALL,this._sort=s.sort||s.categoryListPropValue.initialSort||n.A_Z,this._limit=s.limit||s.categoryListPropValue.initialLimit||20,this._page=s.page||1,this._count=s.count||0,this._initialized=s.initialized||!1,this._minPage=s.minPage,this._categoryListPropValue=s.categoryListPropValue,e(this)}return Object.defineProperty(s.prototype,"sort",{get:function(){return this._sort},enumerable:!1,configurable:!0}),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===o.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.getSortParams=function(){return this._sort===n.A_Z?"name":"-name"},s.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]}}))}))},s.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}},s}();!function(t){t.ALL="ALL",t.STATIC="STATIC"}(o||(o={})),function(t){t.A_Z="A_Z",t.Z_A="Z_A"}(n||(n={}));export{s as IkasCategoryList,n as IkasCategoryListSortType,o as IkasCategoryListType};
1
+ import{__awaiter as t,__generator as i}from'./../../../ext/tslib/tslib.es6.js';import"../../data/blog/category/index.js";import"../../data/blog/content/index.js";import"../../data/blog/meta-data/index.js";import"../../data/blog/tag/index.js";import"../../data/blog/index.js";import"../../data/brand/index.js";import"@ikas/storefront-models";import{makeAutoObservable as e}from"mobx";import"../../data/campaign-offer/index.js";import"../../data/cart/campaign-offer/index.js";import"../../data/cart/index.js";import"../../data/category/path-item/index.js";import{IkasCategory as a}from"../../data/category/index.js";import"../../data/checkout/index.js";import"../../data/checkout-settings/index.js";import"../../data/city/index.js";import"../../data/country/index.js";import"../../data/customer/address/region/index.js";import"../../data/customer/address/index.js";import"../../data/customer/address/ikas-localized-customer-address.js";import"../../data/customer/attribute/index.js";import"../../data/customer/review/summary/index.js";import"../../data/customer/review/index.js";import"../../data/customer/index.js";import"../../data/customer-form-data-input/index.js";import"../../data/district/index.js";import"../../data/favorite-product/index.js";import"../../data/filter-category/index.js";import"../../data/html-meta-data/index.js";import"../../data/image/index.js";import"../../data/order/address/region/index.js";import"../../data/order/address/index.js";import"../../data/order/line-item/option/value/index.js";import"../../data/order/line-item/variant/value/index.js";import"../../data/order/line-item/variant/index.js";import"../../data/order/line-item/index.js";import"../../data/order/package/index.js";import"../../data/order/transaction/index.js";import"../../data/order/index.js";import"../../data/payment-gateway/index.js";import"../../data/product/attribute-value/index.js";import"../../data/product/filter/index.js";import"../../data/product/campaign-offer/index.js";import"../../data/product/option-set/option/index.js";import"../../data/product/option-set/index.js";import"../../data/product/stock-location/index.js";import"../../data/product/variant/price/index.js";import"../../data/product/variant/index.js";import"../../data/variant-type/index.js";import"../../data/product/index.js";import"../../data/raffle/index.js";import"../../data/shipping-zone/state/city/district/region/index.js";import"../../data/state/index.js";import"../../data/theme-json/index.js";import"../../data/theme-json/component/index.js";import"../../data/theme-json/custom-data/index.js";import"../../data/variant-type/variant-value/index.js";import"@ikas/localized-address";import r from"../../../store/category/index.js";var o,n,s=function(){function s(s){var d=this;this._initialized=!1,this._minPage=null,this._isLoading=!1,this.getInitial=function(){return t(d,void 0,void 0,(function(){var t,e,a,o,n;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,r.listCategory({id:this.isStatic&&this._categoryListPropValue.categoryIds?{in:this._categoryListPropValue.categoryIds}:void 0,pagination:{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===(a=this._categoryListPropValue.categoryIds)||void 0===a?void 0:a.map((function(i){var e,a;return null===(a=null===(e=t.data)||void 0===e?void 0:e.data)||void 0===a?void 0:a.find((function(t){return t.id===i}))})).filter((function(t){return!!t})))||[]:this.data=(null===(o=t.data)||void 0===o?void 0:o.data)||[],this._count=(null===(n=t.data)||void 0===n?void 0:n.count)||0,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(d,void 0,void 0,(function(){var t,e,a,o,n,s;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,r.listCategory({pagination:{page:t,limit:this.limit},sort:this.getSortParams()})];case 2:return e=i.sent(),this.data=(null===(n=null===(o=e.data)||void 0===o?void 0:o.data)||void 0===n?void 0:n.concat(this.data))||this.data,this._count=(null===(s=e.data)||void 0===s?void 0:s.count)||this._count,this._minPage=t,[3,5];case 3:return a=i.sent(),console.log(a),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.getNext=function(){return t(d,void 0,void 0,(function(){var t,e,a,o;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,r.listCategory({pagination:{page:this.page+1,limit:this.limit},sort:this.getSortParams()})];case 2:return t=i.sent(),this.data=this.data.concat((null===(a=t.data)||void 0===a?void 0:a.data)||[]),this._count=(null===(o=t.data)||void 0===o?void 0:o.count)||this._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(d,void 0,void 0,(function(){var t,a,o,n;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,r.listCategory({pagination:{page:e,limit:this.limit},sort:this.getSortParams()})];case 2:return t=i.sent(),this.data=(null===(o=t.data)||void 0===o?void 0:o.data)||[],this._count=(null===(n=t.data)||void 0===n?void 0:n.count)||0,this._page=e,this._minPage=e,[3,5];case 3:return a=i.sent(),console.log(a),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.data=s.data?s.data.map((function(t){return new a(t)})):[],this._type=s.type||s.categoryListPropValue.categoryListType||o.ALL,this._sort=s.sort||s.categoryListPropValue.initialSort||n.A_Z,this._limit=s.limit||s.categoryListPropValue.initialLimit||20,this._page=s.page||1,this._count=s.count||0,this._initialized=s.initialized||!1,this._minPage=s.minPage,this._categoryListPropValue=s.categoryListPropValue,e(this)}return Object.defineProperty(s.prototype,"sort",{get:function(){return this._sort},enumerable:!1,configurable:!0}),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===o.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.getSortParams=function(){return this._sort===n.A_Z?"name":"-name"},s.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]}}))}))},s.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}},s}();!function(t){t.ALL="ALL",t.STATIC="STATIC"}(o||(o={})),function(t){t.A_Z="A_Z",t.Z_A="Z_A"}(n||(n={}));export{s as IkasCategoryList,n as IkasCategoryListSortType,o as IkasCategoryListType};
@@ -8,6 +8,7 @@ export declare class IkasCustomerReviewList {
8
8
  private _minPage?;
9
9
  private _productId?;
10
10
  private _hasImage?;
11
+ private _productIds?;
11
12
  private _isLoading;
12
13
  constructor(data: IkasCustomerReviewListParams);
13
14
  get limit(): number;
@@ -19,6 +20,7 @@ export declare class IkasCustomerReviewList {
19
20
  get hasNext(): boolean;
20
21
  get isLoading(): boolean;
21
22
  get hasImage(): boolean | undefined;
23
+ get productIds(): string[] | null | undefined;
22
24
  private listCustomerReviews;
23
25
  getInitial: () => Promise<void>;
24
26
  getPrev: () => Promise<void>;
@@ -42,5 +44,6 @@ export declare type IkasCustomerReviewListParams = {
42
44
  initialized?: boolean;
43
45
  minPage?: number;
44
46
  productId?: string;
47
+ productIds?: string[];
45
48
  hasImage?: boolean;
46
49
  };
@@ -1 +1 @@
1
- import{__awaiter as t,__generator as i,__assign as e}from'./../../../ext/tslib/tslib.es6.js';import{IkasStorefrontConfig as a}from"@ikas/storefront-config";import{makeAutoObservable as r}from"mobx";import n from"../../../store/customer/api.js";import o from"../../../store/product/index.js";import"../../data/blog/category/index.js";import"../../data/blog/content/index.js";import"../../data/blog/meta-data/index.js";import"../../data/blog/tag/index.js";import"../../data/blog/index.js";import"../../data/brand/index.js";import"@ikas/storefront-models";import"../../data/campaign-offer/index.js";import"../../data/cart/campaign-offer/index.js";import"../../data/cart/index.js";import"../../data/category/path-item/index.js";import"../../data/category/index.js";import"../../data/checkout/index.js";import"../../data/checkout-settings/index.js";import"../../data/city/index.js";import"../../data/country/index.js";import"../../data/customer/address/region/index.js";import"../../data/customer/address/index.js";import"../../data/customer/address/ikas-localized-customer-address.js";import"../../data/customer/attribute/index.js";import"../../data/customer/review/summary/index.js";import{IkasCustomerReview as s}from"../../data/customer/review/index.js";import"../../data/customer/index.js";import"../../data/district/index.js";import"../../data/favorite-product/index.js";import"../../data/filter-category/index.js";import"../../data/html-meta-data/index.js";import"../../data/image/index.js";import"../../data/order/address/region/index.js";import"../../data/order/address/index.js";import"../../data/order/line-item/option/value/index.js";import"../../data/order/line-item/variant/value/index.js";import"../../data/order/line-item/variant/index.js";import"../../data/order/line-item/index.js";import"../../data/order/package/index.js";import"../../data/order/transaction/index.js";import"../../data/order/index.js";import"../../data/payment-gateway/index.js";import"../../data/product/attribute-value/index.js";import"../../data/product/filter/index.js";import"../../data/product/campaign-offer/index.js";import"../../data/product/option-set/option/index.js";import"../../data/product/option-set/index.js";import"../../data/product/stock-location/index.js";import"../../data/product/variant/price/index.js";import"../../data/product/variant/index.js";import"../../data/variant-type/index.js";import"../../data/product/index.js";import"../../data/raffle/index.js";import"../../data/shipping-zone/state/city/district/region/index.js";import"../../data/state/index.js";import"../../data/theme-json/index.js";import"../../data/theme-json/component/index.js";import"../../data/theme-json/custom-data/index.js";import"../../data/variant-type/variant-value/index.js";import"@ikas/localized-address";var d=function(){function d(e){var a=this;this._initialized=!1,this._minPage=null,this._productId=null,this._hasImage=!1,this._isLoading=!1,this.getInitial=function(){return t(a,void 0,void 0,(function(){var t,e,a,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(this.page,this.limit,this.hasImage)];case 2:return t=i.sent(),this.data=(null===(a=t.data)||void 0===a?void 0:a.data)||[],this._count=(null===(r=t.data)||void 0===r?void 0:r.count)||0,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,a,r,n;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,this.hasImage)];case 2:return e=i.sent(),this.data=(null===(r=e.data)||void 0===r?void 0:r.data.concat(this.data))||this.data,this._count=(null===(n=e.data)||void 0===n?void 0:n.count)||this._count,this._minPage=t,[3,5];case 3:return a=i.sent(),console.log(a),[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,a,r;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,this.hasImage)];case 2:return t=i.sent(),this.data=this.data.concat((null===(a=t.data)||void 0===a?void 0:a.data)||[]),this._count=(null===(r=t.data)||void 0===r?void 0:r.count)||this._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,a,r,n;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,this.hasImage)];case 2:return t=i.sent(),this.data=(null===(r=t.data)||void 0===r?void 0:r.data)||[],this._count=(null===(n=t.data)||void 0===n?void 0:n.count)||0,this._page=e,this._minPage=e,[3,5];case 3:return a=i.sent(),console.log(a),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.data=e.data?e.data.map((function(t){return new s(t)})):[],this._limit=e.limit||5,this._page=e.page||1,this._count=e.count||0,this._initialized=e.initialized||!1,this._hasImage=e.hasImage||!1,this._minPage=e.minPage,this._productId=e.productId||null,r(this)}return 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,"hasPrev",{get:function(){return!!this._minPage&&this._minPage>1},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"hasNext",{get:function(){return this.page*this.limit<this.count},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isLoading",{get:function(){return this._isLoading},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"hasImage",{get:function(){return this._hasImage},enumerable:!1,configurable:!0}),d.prototype.listCustomerReviews=function(r,s,d){var u,c,p;return t(this,void 0,void 0,(function(){var t,m,l;return i(this,(function(i){switch(i.label){case 0:return[4,n.listCustomerReviews({productId:this._productId,input:{salesChannelId:a.getSalesChannelId()||""},pagination:{page:r,limit:s},hasImage:d})];case 1:return t=i.sent(),!(null===(u=t.data)||void 0===u?void 0:u.data)||this._productId?[3,3]:(m=null===(c=null==t?void 0:t.data)||void 0===c?void 0:c.data.map((function(t){return null==t?void 0:t.productId})),[4,o.searchProducts({input:{productIdList:m}})]);case 2:l=i.sent(),t.data.data=null===(p=null==t?void 0:t.data)||void 0===p?void 0:p.data.map((function(t){var i,a,r=null===(a=null===(i=null==l?void 0:l.data)||void 0===i?void 0:i.data)||void 0===a?void 0:a.find((function(i){return i.id===t.productId}));return e(e({},t),{product:r})})).filter((function(t){return t.product&&!t.product.deleted})),i.label=3;case 3:return[2,t]}}))}))},d.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}},d}();export{d as IkasCustomerReviewList};
1
+ import{__awaiter as t,__generator as i,__assign as e}from'./../../../ext/tslib/tslib.es6.js';import{IkasStorefrontConfig as a}from"@ikas/storefront-config";import{makeAutoObservable as r}from"mobx";import o from"../../../store/customer/api.js";import n from"../../../store/product/index.js";import"../../data/blog/category/index.js";import"../../data/blog/content/index.js";import"../../data/blog/meta-data/index.js";import"../../data/blog/tag/index.js";import"../../data/blog/index.js";import"../../data/brand/index.js";import"@ikas/storefront-models";import"../../data/campaign-offer/index.js";import"../../data/cart/campaign-offer/index.js";import"../../data/cart/index.js";import"../../data/category/path-item/index.js";import"../../data/category/index.js";import"../../data/checkout/index.js";import"../../data/checkout-settings/index.js";import"../../data/city/index.js";import"../../data/country/index.js";import"../../data/customer/address/region/index.js";import"../../data/customer/address/index.js";import"../../data/customer/address/ikas-localized-customer-address.js";import"../../data/customer/attribute/index.js";import"../../data/customer/review/summary/index.js";import{IkasCustomerReview as s}from"../../data/customer/review/index.js";import"../../data/customer/index.js";import"../../data/customer-form-data-input/index.js";import"../../data/district/index.js";import"../../data/favorite-product/index.js";import"../../data/filter-category/index.js";import"../../data/html-meta-data/index.js";import"../../data/image/index.js";import"../../data/order/address/region/index.js";import"../../data/order/address/index.js";import"../../data/order/line-item/option/value/index.js";import"../../data/order/line-item/variant/value/index.js";import"../../data/order/line-item/variant/index.js";import"../../data/order/line-item/index.js";import"../../data/order/package/index.js";import"../../data/order/transaction/index.js";import"../../data/order/index.js";import"../../data/payment-gateway/index.js";import"../../data/product/attribute-value/index.js";import"../../data/product/filter/index.js";import"../../data/product/campaign-offer/index.js";import"../../data/product/option-set/option/index.js";import"../../data/product/option-set/index.js";import"../../data/product/stock-location/index.js";import"../../data/product/variant/price/index.js";import"../../data/product/variant/index.js";import"../../data/variant-type/index.js";import"../../data/product/index.js";import"../../data/raffle/index.js";import"../../data/shipping-zone/state/city/district/region/index.js";import"../../data/state/index.js";import"../../data/theme-json/index.js";import"../../data/theme-json/component/index.js";import"../../data/theme-json/custom-data/index.js";import"../../data/variant-type/variant-value/index.js";import"@ikas/localized-address";var d=function(){function d(e){var a=this;this._initialized=!1,this._minPage=null,this._productId=null,this._hasImage=!1,this._productIds=null,this._isLoading=!1,this.getInitial=function(){return t(a,void 0,void 0,(function(){var t,e,a,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(this.page,this.limit,this.hasImage,this.productIds)];case 2:return t=i.sent(),this.data=(null===(a=t.data)||void 0===a?void 0:a.data)||[],this._count=(null===(r=t.data)||void 0===r?void 0:r.count)||0,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,a,r,o;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,this.hasImage,this.productIds)];case 2:return e=i.sent(),this.data=(null===(r=e.data)||void 0===r?void 0:r.data.concat(this.data))||this.data,this._count=(null===(o=e.data)||void 0===o?void 0:o.count)||this._count,this._minPage=t,[3,5];case 3:return a=i.sent(),console.log(a),[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,a,r;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,this.hasImage,this.productIds)];case 2:return t=i.sent(),this.data=this.data.concat((null===(a=t.data)||void 0===a?void 0:a.data)||[]),this._count=(null===(r=t.data)||void 0===r?void 0:r.count)||this._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,a,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.listCustomerReviews(e,this.limit,this.hasImage,this.productIds)];case 2:return t=i.sent(),this.data=(null===(r=t.data)||void 0===r?void 0:r.data)||[],this._count=(null===(o=t.data)||void 0===o?void 0:o.count)||0,this._page=e,this._minPage=e,[3,5];case 3:return a=i.sent(),console.log(a),[3,5];case 4:return this._isLoading=!1,[7];case 5:return[2]}}))}))},this.data=e.data?e.data.map((function(t){return new s(t)})):[],this._limit=e.limit||5,this._page=e.page||1,this._count=e.count||0,this._initialized=e.initialized||!1,this._hasImage=e.hasImage||!1,this._minPage=e.minPage,this._productId=e.productId||null,this._productIds=e.productIds||null,r(this)}return 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,"hasPrev",{get:function(){return!!this._minPage&&this._minPage>1},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"hasNext",{get:function(){return this.page*this.limit<this.count},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isLoading",{get:function(){return this._isLoading},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"hasImage",{get:function(){return this._hasImage},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"productIds",{get:function(){return this._productIds},enumerable:!1,configurable:!0}),d.prototype.listCustomerReviews=function(r,s,d,u){var c,p,m;return t(this,void 0,void 0,(function(){var t,l,h;return i(this,(function(i){switch(i.label){case 0:return[4,o.listCustomerReviews(e(e(e({},this._productId?{productId:this._productId}:{}),{input:{salesChannelId:a.getSalesChannelId()||""},pagination:{page:r,limit:s},hasImage:d}),u?{productIds:u}:{}))];case 1:return t=i.sent(),!(null===(c=t.data)||void 0===c?void 0:c.data)||this._productId?[3,3]:(l=null===(p=null==t?void 0:t.data)||void 0===p?void 0:p.data.map((function(t){return null==t?void 0:t.productId})),[4,n.searchProducts({input:{productIdList:l}})]);case 2:h=i.sent(),t.data.data=null===(m=null==t?void 0:t.data)||void 0===m?void 0:m.data.map((function(t){var i,a,r=null===(a=null===(i=null==h?void 0:h.data)||void 0===i?void 0:i.data)||void 0===a?void 0:a.find((function(i){return i.id===t.productId}));return e(e({},t),{product:r})})).filter((function(t){return t.product&&!t.product.deleted})),i.label=3;case 3:return[2,t]}}))}))},d.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}},d}();export{d as IkasCustomerReviewList};