@ikas/storefront 5.0.0-beta.8 → 5.0.0

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 (244) hide show
  1. package/build/analytics/analytics.d.ts +4 -0
  2. package/build/analytics/analytics.js +1 -1
  3. package/build/analytics/facebookPixel.d.ts +1 -0
  4. package/build/analytics/facebookPixel.js +1 -1
  5. package/build/analytics/googleAnalytics.d.ts +1 -0
  6. package/build/analytics/googleAnalytics.js +1 -1
  7. package/build/analytics/googleTagManager.d.ts +12 -21
  8. package/build/analytics/googleTagManager.js +1 -1
  9. package/build/analytics/head/index.js +1 -1
  10. package/build/analytics/ikas.d.ts +2 -1
  11. package/build/analytics/ikas.js +1 -1
  12. package/build/analytics/tiktokPixel.d.ts +1 -0
  13. package/build/analytics/tiktokPixel.js +1 -1
  14. package/build/components/checkout/components/address-form/index.js +1 -1
  15. package/build/components/checkout/components/address-form/model.d.ts +13 -2
  16. package/build/components/checkout/components/address-form/model.js +1 -1
  17. package/build/components/checkout/components/cart-summary/cart-item/bundle-product-item/index.d.ts +7 -0
  18. package/build/components/checkout/components/cart-summary/cart-item/bundle-product-item/index.js +1 -0
  19. package/build/components/checkout/components/cart-summary/cart-item/bundle-product-item/style.module.scss.js +1 -0
  20. package/build/components/checkout/components/cart-summary/cart-item/index.d.ts +1 -0
  21. package/build/components/checkout/components/cart-summary/cart-item/index.js +1 -1
  22. package/build/components/checkout/components/cart-summary/cart-item/style.module.scss.js +1 -1
  23. package/build/components/checkout/components/cart-summary/cart-item/svg/arrow-down.d.ts +2 -0
  24. package/build/components/checkout/components/cart-summary/cart-item/svg/arrow-down.js +1 -0
  25. package/build/components/checkout/components/cart-summary/index.d.ts +11 -0
  26. package/build/components/checkout/components/cart-summary/index.js +1 -1
  27. package/build/components/checkout/components/cart-summary/style.module.scss.js +1 -1
  28. package/build/components/checkout/components/credit-card-form/model.js +1 -1
  29. package/build/components/checkout/components/customer-addresses/index.js +1 -1
  30. package/build/components/checkout/components/customer-addresses/model.js +1 -1
  31. package/build/components/checkout/components/customer-addresses/style.module.scss.js +1 -1
  32. package/build/components/checkout/components/epaykolay-button/index.d.ts +5 -0
  33. package/build/components/checkout/components/epaykolay-button/index.js +1 -0
  34. package/build/components/checkout/components/epaykolay-button/style.module.scss.js +1 -0
  35. package/build/components/checkout/components/error/customer-account-disabled-error/index.d.ts +8 -0
  36. package/build/components/checkout/components/error/customer-account-disabled-error/index.js +1 -0
  37. package/build/components/checkout/components/error/customer-login-required-error/index.js +1 -1
  38. package/build/components/checkout/components/error/index.js +1 -1
  39. package/build/components/checkout/components/form-item/index.js +1 -1
  40. package/build/components/checkout/components/form-item/model.js +1 -1
  41. package/build/components/checkout/components/notification-box/index.d.ts +2 -0
  42. package/build/components/checkout/components/notification-box/index.js +1 -1
  43. package/build/components/checkout/components/offer-product/index.js +1 -1
  44. package/build/components/checkout/components/paypal/index.d.ts +7 -0
  45. package/build/components/checkout/components/paypal/index.js +1 -0
  46. package/build/components/checkout/components/paypal/style.module.scss.js +1 -0
  47. package/build/components/checkout/components/product-files/index.d.ts +7 -0
  48. package/build/components/checkout/components/product-files/index.js +1 -0
  49. package/build/components/checkout/components/product-files/style.module.scss.js +1 -0
  50. package/build/components/checkout/components/quick-registration/model.js +1 -1
  51. package/build/components/checkout/components/select-box/index.d.ts +1 -0
  52. package/build/components/checkout/components/select-box/index.js +1 -1
  53. package/build/components/checkout/components/stripe/index.js +1 -1
  54. package/build/components/checkout/components/svg/epaykolay.d.ts +6 -0
  55. package/build/components/checkout/components/svg/epaykolay.js +1 -0
  56. package/build/components/checkout/components/toggle/index.d.ts +1 -0
  57. package/build/components/checkout/components/toggle/index.js +1 -1
  58. package/build/components/checkout/components/toggle/style.module.scss.js +1 -1
  59. package/build/components/checkout/index.d.ts +2 -0
  60. package/build/components/checkout/index.js +1 -1
  61. package/build/components/checkout/model.d.ts +44 -17
  62. package/build/components/checkout/model.js +1 -1
  63. package/build/components/checkout/steps/step-payment/index.js +1 -1
  64. package/build/components/checkout/steps/step-payment/payment-gateways/index.js +1 -1
  65. package/build/components/checkout/steps/step-payment/style.module.scss.js +1 -1
  66. package/build/components/checkout/steps/step-shipping/index.js +1 -1
  67. package/build/components/checkout/steps/step-success/index.js +1 -1
  68. package/build/components/checkout/steps/step-success/style.module.scss.js +1 -1
  69. package/build/components/checkout/style.module.scss.js +1 -1
  70. package/build/components/google-captcha/index.js +1 -1
  71. package/build/components/link/index.js +1 -1
  72. package/build/components/page/head.js +1 -1
  73. package/build/components/page/index.js +1 -1
  74. package/build/components/page-editor/ThemeComponentEditor.js +1 -1
  75. package/build/components/page-editor/model.d.ts +1 -0
  76. package/build/components/page-editor/model.js +1 -1
  77. package/build/hooks/useCustomerReviews.js +1 -1
  78. package/build/hooks/useStore.js +1 -1
  79. package/build/index.js +1 -1
  80. package/build/models/data/cart/available-shipping-method/estimated-delivery-time/index.d.ts +6 -0
  81. package/build/models/data/cart/available-shipping-method/estimated-delivery-time/index.js +1 -0
  82. package/build/models/data/cart/available-shipping-method/index.d.ts +2 -0
  83. package/build/models/data/cart/available-shipping-method/index.js +1 -1
  84. package/build/models/data/category/conditions/index.d.ts +21 -0
  85. package/build/models/data/category/conditions/index.js +1 -0
  86. package/build/models/data/category/index.d.ts +3 -0
  87. package/build/models/data/category/index.js +1 -1
  88. package/build/models/data/checkout/index.d.ts +2 -2
  89. package/build/models/data/checkout-settings/index.d.ts +2 -1
  90. package/build/models/data/checkout-settings/index.js +1 -1
  91. package/build/models/data/checkout-settings/price/index.d.ts +2 -1
  92. package/build/models/data/checkout-settings/price/index.js +1 -1
  93. package/build/models/data/contact-form/index.d.ts +1 -0
  94. package/build/models/data/contact-form/index.js +1 -1
  95. package/build/models/data/customer/address/ikas-localized-customer-address.d.ts +26 -12
  96. package/build/models/data/customer/address/ikas-localized-customer-address.js +1 -1
  97. package/build/models/data/customer/address/index.d.ts +5 -0
  98. package/build/models/data/customer/address/index.js +1 -1
  99. package/build/models/data/customer/address/region/index.d.ts +6 -0
  100. package/build/models/data/customer/address/region/index.js +1 -0
  101. package/build/models/data/customer/index.d.ts +7 -0
  102. package/build/models/data/customer/index.js +1 -1
  103. package/build/models/data/customer/price-list-rule/filter/index.d.ts +7 -0
  104. package/build/models/data/customer/price-list-rule/filter/index.js +1 -0
  105. package/build/models/data/customer/price-list-rule/index.d.ts +10 -0
  106. package/build/models/data/customer/price-list-rule/index.js +1 -0
  107. package/build/models/data/customer/review/index.d.ts +1 -0
  108. package/build/models/data/customer/review/index.js +1 -1
  109. package/build/models/data/favorite-product/index.d.ts +2 -0
  110. package/build/models/data/favorite-product/index.js +1 -1
  111. package/build/models/data/filter-category/index.d.ts +4 -0
  112. package/build/models/data/filter-category/index.js +1 -1
  113. package/build/models/data/html-meta-data/translations/index.d.ts +1 -0
  114. package/build/models/data/html-meta-data/translations/index.js +1 -1
  115. package/build/models/data/image/index.d.ts +1 -0
  116. package/build/models/data/image/index.js +1 -1
  117. package/build/models/data/index.d.ts +15 -1
  118. package/build/models/data/order/address/ikas-localized-order-address.d.ts +48 -18
  119. package/build/models/data/order/address/ikas-localized-order-address.js +1 -1
  120. package/build/models/data/order/address/index.d.ts +5 -0
  121. package/build/models/data/order/address/index.js +1 -1
  122. package/build/models/data/order/address/region/index.d.ts +6 -0
  123. package/build/models/data/order/address/region/index.js +1 -0
  124. package/build/models/data/order/index.d.ts +3 -0
  125. package/build/models/data/order/index.js +1 -1
  126. package/build/models/data/order/line-item/index.d.ts +5 -0
  127. package/build/models/data/order/line-item/index.js +1 -1
  128. package/build/models/data/order/line-item/variant/bundle-product/bundle-variant/index.d.ts +33 -0
  129. package/build/models/data/order/line-item/variant/bundle-product/bundle-variant/index.js +1 -0
  130. package/build/models/data/order/line-item/variant/bundle-product/index.d.ts +15 -0
  131. package/build/models/data/order/line-item/variant/bundle-product/index.js +1 -0
  132. package/build/models/data/order/line-item/variant/index.d.ts +4 -0
  133. package/build/models/data/order/line-item/variant/index.js +1 -1
  134. package/build/models/data/order/transaction/index.d.ts +1 -0
  135. package/build/models/data/order/transaction/index.js +1 -1
  136. package/build/models/data/order/transaction/payment-method-detail/index.d.ts +1 -0
  137. package/build/models/data/order/transaction/payment-method-detail/index.js +1 -1
  138. package/build/models/data/product/campaign-offer/index.d.ts +15 -0
  139. package/build/models/data/product/campaign-offer/index.js +1 -0
  140. package/build/models/data/product/filter/index.d.ts +2 -0
  141. package/build/models/data/product/filter/index.js +1 -1
  142. package/build/models/data/product/group/index.d.ts +11 -0
  143. package/build/models/data/product/group/index.js +1 -0
  144. package/build/models/data/product/group/translation/index.d.ts +13 -0
  145. package/build/models/data/product/group/translation/index.js +1 -0
  146. package/build/models/data/product/group/value/index.d.ts +7 -0
  147. package/build/models/data/product/group/value/index.js +1 -0
  148. package/build/models/data/product/image/index.d.ts +1 -0
  149. package/build/models/data/product/image/index.js +1 -1
  150. package/build/models/data/product/index.d.ts +34 -1
  151. package/build/models/data/product/index.js +1 -1
  152. package/build/models/data/product/variant/bundle-settings/bundle-product/index.d.ts +28 -0
  153. package/build/models/data/product/variant/bundle-settings/bundle-product/index.js +1 -0
  154. package/build/models/data/product/variant/bundle-settings/index.d.ts +8 -0
  155. package/build/models/data/product/variant/bundle-settings/index.js +1 -0
  156. package/build/models/data/product/variant/index.d.ts +35 -3
  157. package/build/models/data/product/variant/index.js +1 -1
  158. package/build/models/data/product/variant/price/index.d.ts +26 -0
  159. package/build/models/data/product/variant/price/index.js +1 -1
  160. package/build/models/data/product/variant/price/product-campaign-price/index.d.ts +6 -0
  161. package/build/models/data/product/variant/price/product-campaign-price/index.js +1 -0
  162. package/build/models/data/product-file/index.d.ts +8 -0
  163. package/build/models/data/product-file/index.js +1 -0
  164. package/build/models/data/shipping-zone/index.d.ts +9 -0
  165. package/build/models/data/shipping-zone/index.js +1 -0
  166. package/build/models/data/shipping-zone/state/city/district/index.d.ts +7 -0
  167. package/build/models/data/shipping-zone/state/city/district/index.js +1 -0
  168. package/build/models/data/shipping-zone/state/city/district/region/index.d.ts +6 -0
  169. package/build/models/data/shipping-zone/state/city/district/region/index.js +1 -0
  170. package/build/models/data/shipping-zone/state/city/index.d.ts +8 -0
  171. package/build/models/data/shipping-zone/state/city/index.js +1 -0
  172. package/build/models/data/shipping-zone/state/index.d.ts +9 -0
  173. package/build/models/data/shipping-zone/state/index.js +1 -0
  174. package/build/models/data/storefront/b2b-settings/index.d.ts +8 -0
  175. package/build/models/data/storefront/b2b-settings/index.js +1 -0
  176. package/build/models/data/storefront/index-page-seo-setting/index.d.ts +17 -0
  177. package/build/models/data/storefront/index-page-seo-setting/index.js +1 -0
  178. package/build/models/data/storefront/index.d.ts +6 -1
  179. package/build/models/data/storefront/index.js +1 -1
  180. package/build/models/data/theme-json/component/index.d.ts +2 -0
  181. package/build/models/data/theme-json/component/index.js +1 -1
  182. package/build/models/data/theme-json/component/prop/index.d.ts +2 -0
  183. package/build/models/data/theme-json/component/prop/index.js +1 -1
  184. package/build/models/data/theme-json/custom-data/index.d.ts +2 -0
  185. package/build/models/data/theme-json/custom-data/index.js +1 -1
  186. package/build/models/data/theme-json/index.js +1 -1
  187. package/build/models/data/video/index.d.ts +11 -0
  188. package/build/models/data/video/index.js +1 -0
  189. package/build/models/ui/blog-category-list/index.js +1 -1
  190. package/build/models/ui/brand-list/index.js +1 -1
  191. package/build/models/ui/category-list/index.js +1 -1
  192. package/build/models/ui/customer-review-list/index.js +1 -1
  193. package/build/models/ui/customer-review-summary-list/index.js +1 -1
  194. package/build/models/ui/index.d.ts +1 -1
  195. package/build/models/ui/product-attribute-list/index.js +1 -1
  196. package/build/models/ui/product-list/index.d.ts +25 -3
  197. package/build/models/ui/product-list/index.js +1 -1
  198. package/build/models/ui/raffle-list/index.js +1 -1
  199. package/build/models/ui/validator/form/account-info.js +1 -1
  200. package/build/models/ui/validator/form/address.js +1 -1
  201. package/build/models/ui/validator/form/contact-form.d.ts +6 -0
  202. package/build/models/ui/validator/form/contact-form.js +1 -1
  203. package/build/models/ui/validator/form/ikas-address.d.ts +46 -20
  204. package/build/models/ui/validator/form/ikas-address.js +1 -1
  205. package/build/models/ui/validator/form/login.d.ts +7 -4
  206. package/build/models/ui/validator/form/login.js +1 -1
  207. package/build/models/ui/validator/form/register.d.ts +10 -1
  208. package/build/models/ui/validator/form/register.js +1 -1
  209. package/build/page-data-init/index.d.ts +9 -1
  210. package/build/page-data-init/index.js +1 -1
  211. package/build/pages/account/activate.d.ts +4 -0
  212. package/build/pages/account/activate.js +1 -0
  213. package/build/pages/checkout.js +1 -1
  214. package/build/pages/home.js +1 -1
  215. package/build/pages/index.d.ts +1 -0
  216. package/build/store/base.d.ts +1 -0
  217. package/build/store/base.js +1 -1
  218. package/build/store/blog/index.js +1 -1
  219. package/build/store/brand/index.js +1 -1
  220. package/build/store/cart/index.d.ts +6 -2
  221. package/build/store/cart/index.js +1 -1
  222. package/build/store/category/index.js +1 -1
  223. package/build/store/checkout/index.d.ts +7 -2
  224. package/build/store/checkout/index.js +1 -1
  225. package/build/store/customer/api.d.ts +5 -1
  226. package/build/store/customer/api.js +1 -1
  227. package/build/store/customer/index.d.ts +25 -5
  228. package/build/store/customer/index.js +1 -1
  229. package/build/store/html-meta-data/index.js +1 -1
  230. package/build/store/index.d.ts +1 -1
  231. package/build/store/location/index.d.ts +2 -1
  232. package/build/store/location/index.js +1 -1
  233. package/build/store/product/index.d.ts +4 -1
  234. package/build/store/product/index.js +1 -1
  235. package/build/utils/constants.js +1 -1
  236. package/build/utils/helper.d.ts +1 -0
  237. package/build/utils/helper.js +1 -1
  238. package/package.json +18 -14
  239. package/build/analytics/googleUniversal.d.ts +0 -9
  240. package/build/analytics/googleUniversal.js +0 -1
  241. package/build/ext/@builder.io/partytown/integration/index.mjs.js +0 -1
  242. package/build/ext/@builder.io/partytown/react/index.mjs.js +0 -1
  243. package/build/models/data/checkout/country-settings-model.d.ts +0 -141
  244. package/build/models/data/checkout/country-settings-model.js +0 -1
@@ -1,32 +1,62 @@
1
1
  import { IkasOrderAddress } from ".";
2
2
  import { IkasOrderAddress as IOrderAddress } from "@ikas/storefront-models";
3
- import CountrySettingsModel from "../../checkout/country-settings-model";
3
+ import { AddressFormItem, LocalizedAddressModel } from "@ikas/localized-address";
4
4
  declare type IkasLocalizedOrderAddressConstructorData = {
5
- countrySettings?: CountrySettingsModel | null;
5
+ countrySettings?: LocalizedAddressModel | null;
6
6
  } & IOrderAddress;
7
7
  export default class IkasLocalizedOrderAddress extends IkasOrderAddress {
8
- countrySettings: CountrySettingsModel | null;
8
+ countrySettings: LocalizedAddressModel | null;
9
9
  constructor(data?: Partial<IkasLocalizedOrderAddressConstructorData>);
10
- get addressFormat(): import("../../checkout/country-settings-model").AddressFormItem[][] | undefined;
11
- get addressFormatIgnoreCountry(): import("../../checkout/country-settings-model").AddressFormItem[][] | undefined;
12
- get billingFormat(): import("../../checkout/country-settings-model").BillingAddressFormItem[][] | undefined;
10
+ get fieldSettings(): {
11
+ firstName: import("@ikas/localized-address").AddressFormField;
12
+ lastName: import("@ikas/localized-address").AddressFormField;
13
+ identityNumber: import("@ikas/localized-address").AddressFormField;
14
+ addressLine1: import("@ikas/localized-address").AddressFormField;
15
+ addressLine2: import("@ikas/localized-address").AddressFormField;
16
+ postalCode: import("@ikas/localized-address").AddressFormField;
17
+ country: import("@ikas/localized-address").AddressFormField;
18
+ state: import("@ikas/localized-address").AddressFormField;
19
+ city: import("@ikas/localized-address").AddressFormField;
20
+ district: import("@ikas/localized-address").AddressFormField;
21
+ region: import("@ikas/localized-address").AddressFormField;
22
+ phone: import("@ikas/localized-address").AddressFormField;
23
+ company: import("@ikas/localized-address").AddressFormField;
24
+ taxOffice: import("@ikas/localized-address").AddressFormField;
25
+ taxNumber: import("@ikas/localized-address").AddressFormField;
26
+ } | undefined;
27
+ get addressFormat(): AddressFormItem[][] | undefined;
28
+ get addressFormatIgnoreCountry(): AddressFormItem[][] | undefined;
29
+ get billingFormat(): import("@ikas/localized-address").BillingFormItem[][] | undefined;
13
30
  get countryCode(): string;
14
31
  get validationResults(): {
15
- firstName: import("../../checkout/country-settings-model").ErrorType;
16
- lastName: import("../../checkout/country-settings-model").ErrorType;
17
- addressLine1: import("../../checkout/country-settings-model").ErrorType;
18
- addressLine2: import("../../checkout/country-settings-model").ErrorType;
19
- country: import("../../checkout/country-settings-model").ErrorType;
20
- state: import("../../checkout/country-settings-model").ErrorType;
21
- city: import("../../checkout/country-settings-model").ErrorType;
22
- district: import("../../checkout/country-settings-model").ErrorType;
23
- phone: import("../../checkout/country-settings-model").ErrorType;
24
- postalCode: import("../../checkout/country-settings-model").ErrorType;
25
- identityNumber: import("../../checkout/country-settings-model").ErrorType;
32
+ firstName: import("@ikas/localized-address").ErrorType;
33
+ lastName: import("@ikas/localized-address").ErrorType;
34
+ identityNumber: import("@ikas/localized-address").ErrorType;
35
+ addressLine1: import("@ikas/localized-address").ErrorType;
36
+ addressLine2: import("@ikas/localized-address").ErrorType;
37
+ postalCode: import("@ikas/localized-address").ErrorType;
38
+ country: import("@ikas/localized-address").ErrorType;
39
+ state: import("@ikas/localized-address").ErrorType;
40
+ city: import("@ikas/localized-address").ErrorType;
41
+ district: import("@ikas/localized-address").ErrorType;
42
+ region: import("@ikas/localized-address").ErrorType;
43
+ phone: import("@ikas/localized-address").ErrorType;
44
+ company: import("@ikas/localized-address").ErrorType;
45
+ taxOffice: import("@ikas/localized-address").ErrorType;
46
+ taxNumber: import("@ikas/localized-address").ErrorType;
26
47
  } | undefined;
27
48
  get isValidAddress(): boolean | undefined;
28
- get fieldLabels(): import("../../checkout/country-settings-model").IkasAddressFormLabels | undefined;
49
+ get fieldLabels(): import("@ikas/localized-address").IkasAddressFormLabels | undefined;
29
50
  get isFreeTextCity(): boolean | undefined;
30
51
  get isFreeTextDistrict(): boolean | undefined;
52
+ private get shippingZone();
53
+ private get shippingZoneState();
54
+ private get shippingZoneCity();
55
+ private get shippingZoneDistrict();
56
+ private get shippingZoneRegion();
57
+ private get isRequiredRegion();
58
+ private get invisibleFields();
59
+ private get customAddressFormSettings();
60
+ private getValidatedCustomerAddress;
31
61
  }
32
62
  export {};
@@ -1 +1 @@
1
- import{__extends as t}from'./../../../../ext/tslib/tslib.es6.js';import{makeObservable as e,observable as r}from"mobx";import{IkasOrderAddress as n}from"./index.js";var i=function(n){function i(t){void 0===t&&(t={});var i=n.call(this,t)||this;return i.countrySettings=t.countrySettings||null,e(i,{countrySettings:r}),i}return t(i,n),Object.defineProperty(i.prototype,"addressFormat",{get:function(){if(this.countrySettings)return this.countrySettings.getAddressFormat(this.countryCode)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"addressFormatIgnoreCountry",{get:function(){if(this.countrySettings)return this.countrySettings.getAddressFormatIgnoreCountry(this.countryCode)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"billingFormat",{get:function(){if(this.countrySettings)return this.countrySettings.getBillingFormat(this.countryCode)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"countryCode",{get:function(){var t;return(null===(t=this.country)||void 0===t?void 0:t.iso2)||"TR"},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"validationResults",{get:function(){if(this.countrySettings)return this.countrySettings.getValidationResult(this)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"isValidAddress",{get:function(){if(this.countrySettings)return this.countrySettings.isValidAddress(this)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"fieldLabels",{get:function(){if(this.countrySettings)return this.countrySettings.getFieldLabels(this.countryCode)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"isFreeTextCity",{get:function(){if(this.countrySettings)return this.countrySettings.isFreeTextCity(this.countryCode)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"isFreeTextDistrict",{get:function(){if(this.countrySettings)return this.countrySettings.isFreeTextDistrict(this.countryCode)},enumerable:!1,configurable:!0}),i}(n);export{i as default};
1
+ import{__extends as t}from'./../../../../ext/tslib/tslib.es6.js';import{makeObservable as i,observable as e}from"mobx";import{IkasOrderAddress as n}from"./index.js";import{IkasCheckoutRequirement as o}from"@ikas/storefront-models";import{AddressFormItem as r}from"@ikas/localized-address";var s=function(n){function s(t){void 0===t&&(t={});var o=n.call(this,t)||this;return o.countrySettings=t.countrySettings||null,i(o,{countrySettings:e}),o}return t(s,n),Object.defineProperty(s.prototype,"fieldSettings",{get:function(){if(this.countrySettings)return this.countrySettings.getFieldSettings({country:this.countryCode,invisibleAddressFields:this.invisibleFields,customAddressFormSettings:this.customAddressFormSettings})},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"addressFormat",{get:function(){if(this.countrySettings)return this.countrySettings.getAddressFormat(this.countryCode,this.invisibleFields)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"addressFormatIgnoreCountry",{get:function(){if(this.countrySettings)return this.countrySettings.getAddressFormatIgnoreCountry(this.countryCode,this.invisibleFields)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"billingFormat",{get:function(){if(this.countrySettings)return this.countrySettings.getBillingFormat(this.countryCode)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"countryCode",{get:function(){var t;return(null===(t=this.country)||void 0===t?void 0:t.iso2)||"TR"},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"validationResults",{get:function(){if(this.countrySettings)return this.countrySettings.getValidationResult({address:u(this),country:this.countryCode,invisibleAddressFields:this.invisibleFields,customAddressFormSettings:this.customAddressFormSettings})},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"isValidAddress",{get:function(){if(this.countrySettings)return this.countrySettings.isValidAddress({address:u(this),country:this.countryCode,invisibleAddressFields:this.invisibleFields,customAddressFormSettings:this.customAddressFormSettings})},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"fieldLabels",{get:function(){if(this.countrySettings)return this.countrySettings.getFieldLabels(this.countryCode)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"isFreeTextCity",{get:function(){if(this.countrySettings)return this.countrySettings.isFreeTextCity(this.countryCode)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"isFreeTextDistrict",{get:function(){if(this.countrySettings)return this.countrySettings.isFreeTextDistrict(this.countryCode)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"shippingZone",{get:function(){var t,i=this;return null===(t=this.shippingZones)||void 0===t?void 0:t.find((function(t){var e;return t.countryId===(null===(e=i.country)||void 0===e?void 0:e.id)}))},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"shippingZoneState",{get:function(){var t,i,e=this;return null===(i=null===(t=this.shippingZone)||void 0===t?void 0:t.states)||void 0===i?void 0:i.find((function(t){var i;return t.id===(null===(i=e.state)||void 0===i?void 0:i.id)}))},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"shippingZoneCity",{get:function(){var t,i,e=this;return null===(i=null===(t=this.shippingZoneState)||void 0===t?void 0:t.cities)||void 0===i?void 0:i.find((function(t){var i;return t.id===(null===(i=e.city)||void 0===i?void 0:i.id)}))},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"shippingZoneDistrict",{get:function(){var t,i,e=this;return null===(i=null===(t=this.shippingZoneCity)||void 0===t?void 0:t.districts)||void 0===i?void 0:i.find((function(t){var i;return t.id===(null===(i=e.district)||void 0===i?void 0:i.id)}))},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"shippingZoneRegion",{get:function(){var t,i,e=this;return null===(i=null===(t=this.shippingZoneDistrict)||void 0===t?void 0:t.regions)||void 0===i?void 0:i.find((function(t){var i;return t.id===(null===(i=e.region)||void 0===i?void 0:i.id)}))},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"isRequiredRegion",{get:function(){var t,i;return!!this.district&&(null===(i=null===(t=this.shippingZoneDistrict)||void 0===t?void 0:t.regions)||void 0===i?void 0:i.length)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"invisibleFields",{get:function(){if(this.checkoutSettings){var t=[];return this.checkoutSettings.identityNumberRequirement===o.INVISIBLE&&t.push(r.IDENTITY_NUMBER),this.checkoutSettings.postalCodeRequirement===o.INVISIBLE&&t.push(r.POSTAL_CODE),this.checkoutSettings.phoneRequirement===o.INVISIBLE&&t.push(r.PHONE),this.isRequiredRegion||t.push(r.REGION),t}},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"customAddressFormSettings",{get:function(){if(this.checkoutSettings){var t={};return this.checkoutSettings.phoneRequirement&&(t.phone={required:this.checkoutSettings.phoneRequirement===o.MANDATORY}),this.checkoutSettings.postalCodeRequirement&&(t.postalCode={required:this.checkoutSettings.postalCodeRequirement===o.MANDATORY}),this.checkoutSettings.identityNumberRequirement&&(t.identityNumber={required:this.checkoutSettings.identityNumberRequirement===o.MANDATORY}),this.isRequiredRegion&&(t.region={required:!0}),t}},enumerable:!1,configurable:!0}),s.prototype.getValidatedCustomerAddress=function(){var t,i,e,n,o,r,s;(null===(t=this.shippingZones)||void 0===t?void 0:t.length)&&(this.shippingZone||(this.country=null,this.state=null,this.city=null,this.district=null,this.region=null),this.shippingZoneState||void 0===(null===(i=this.shippingZone)||void 0===i?void 0:i.showAllStates)||(null===(e=this.shippingZone)||void 0===e?void 0:e.showAllStates)||(this.state=null,this.city=null,this.district=null,this.region=null),this.shippingZoneCity||void 0===(null===(n=this.shippingZoneState)||void 0===n?void 0:n.showAllCities)||(null===(o=this.shippingZoneState)||void 0===o?void 0:o.showAllCities)||(this.city=null,this.district=null,this.region=null),this.shippingZoneDistrict||void 0===(null===(r=this.shippingZoneCity)||void 0===r?void 0:r.showAllDistricts)||(null===(s=this.shippingZoneCity)||void 0===s?void 0:s.showAllDistricts)||(this.district=null,this.region=null),this.shippingZoneRegion||(this.region=null))},s}(n),u=function(t){var i,e,n,o,r;return{firstName:t.firstName||"",lastName:t.lastName||"",identityNumber:t.identityNumber||"",addressLine1:t.addressLine1||"",addressLine2:t.addressLine2||"",postalCode:t.postalCode||"",country:(null===(i=t.country)||void 0===i?void 0:i.name)||"",state:(null===(e=t.state)||void 0===e?void 0:e.name)||"",city:(null===(n=t.city)||void 0===n?void 0:n.name)||"",district:(null===(o=t.district)||void 0===o?void 0:o.name)||"",region:(null===(r=t.region)||void 0===r?void 0:r.name)||"",phone:t.phone||"",company:t.company||"",taxOffice:t.taxOffice||"",taxNumber:t.taxNumber||""}};export{s as default};
@@ -1,12 +1,15 @@
1
1
  import { IkasOrderAddressFunctions } from "@ikas/storefront-model-functions";
2
2
  import { IkasOrderAddress as IOrderAddress } from "@ikas/storefront-models";
3
3
  import { IkasCheckoutSettings } from "../../checkout-settings";
4
+ import { IkasShippingZone } from "../../shipping-zone";
4
5
  import { IkasOrderAddressCity } from "./city";
5
6
  import { IkasOrderAddressCountry } from "./country";
6
7
  import { IkasOrderAddressDistrict } from "./district";
8
+ import { IkasOrderAddressRegion } from "./region";
7
9
  import { IkasOrderAddressState } from "./state";
8
10
  declare type IkasOrderAddressConstructorData = {
9
11
  checkoutSettings?: IkasCheckoutSettings | null;
12
+ shippingZones?: IkasShippingZone[] | null;
10
13
  isDistrictRequired?: boolean;
11
14
  } & IOrderAddress;
12
15
  export declare class IkasOrderAddress implements IOrderAddress {
@@ -26,7 +29,9 @@ export declare class IkasOrderAddress implements IOrderAddress {
26
29
  state: IkasOrderAddressState | null;
27
30
  city: IkasOrderAddressCity | null;
28
31
  district: IkasOrderAddressDistrict | null;
32
+ region: IkasOrderAddressRegion | null;
29
33
  checkoutSettings?: IkasCheckoutSettings | null;
34
+ shippingZones?: IkasShippingZone[] | null;
30
35
  isDistrictRequired?: boolean;
31
36
  constructor(data?: Partial<IkasOrderAddressConstructorData>);
32
37
  get addressText(): string;
@@ -1 +1 @@
1
- import{__assign as t}from'./../../../../ext/tslib/tslib.es6.js';import{IkasOrderAddressFunctions as i}from"@ikas/storefront-model-functions";import{makeObservable as e,observable as s,computed as n}from"mobx";import{IkasCheckoutSettings as l}from"../../checkout-settings/index.js";var r=function(){function r(t){void 0===t&&(t={}),this.addressLine2=null,this.company=null,this.id=null,this.identityNumber=null,this.phone=null,this.postalCode=null,this.taxNumber=null,this.taxOffice=null,this.country=null,this.state=null,this.city=null,this.district=null,this.checkoutSettings=null,this.addressLine1=t.addressLine1||"",this.addressLine2=t.addressLine2||null,this.company=t.company||null,this.firstName=t.firstName||"",this.id=t.id||null,this.identityNumber=t.identityNumber||null,this.isDefault=t.isDefault||!1,this.lastName=t.lastName||"",this.phone=t.phone||null,this.postalCode=t.postalCode||null,this.taxNumber=t.taxNumber||null,this.taxOffice=t.taxOffice||null,this.country=t.country||null,this.state=t.state||null,this.city=t.city||null,this.district=t.district||null,this.checkoutSettings=t.checkoutSettings?new l(t.checkoutSettings):null,this.isDistrictRequired=t.isDistrictRequired||!1,e(this,{addressLine1:s,addressLine2:s,company:s,firstName:s,id:s,identityNumber:s,isDefault:s,lastName:s,phone:s,postalCode:s,taxNumber:s,taxOffice:s,country:s,state:s,city:s,district:s,addressText:n,validationResult:n,isValid:n})}return Object.defineProperty(r.prototype,"addressText",{get:function(){return i.getAddressText(this)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"validationResult",{get:function(){if(this.checkoutSettings)return i.getValidationResult(this,this.checkoutSettings,this.isDistrictRequired||!1)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isValid",{get:function(){return!!this.checkoutSettings&&i.isValidAddress(this,this.checkoutSettings,this.isDistrictRequired||!1)},enumerable:!1,configurable:!0}),r.prototype.toJSON=function(){var i=t({},this);return delete i.checkoutSettings,delete i.isDistrictRequired,i},r}();export{r as IkasOrderAddress};
1
+ import{__assign as t}from'./../../../../ext/tslib/tslib.es6.js';import{IkasOrderAddressFunctions as i}from"@ikas/storefront-model-functions";import{makeObservable as e,observable as s,computed as n}from"mobx";import{IkasCheckoutSettings as l}from"../../checkout-settings/index.js";import{IkasShippingZone as r}from"../../shipping-zone/index.js";var o=function(){function o(t){void 0===t&&(t={}),this.addressLine2=null,this.company=null,this.id=null,this.identityNumber=null,this.phone=null,this.postalCode=null,this.taxNumber=null,this.taxOffice=null,this.country=null,this.state=null,this.city=null,this.district=null,this.region=null,this.checkoutSettings=null,this.shippingZones=null,this.addressLine1=t.addressLine1||"",this.addressLine2=t.addressLine2||null,this.company=t.company||null,this.firstName=t.firstName||"",this.id=t.id||null,this.identityNumber=t.identityNumber||null,this.isDefault=t.isDefault||!1,this.lastName=t.lastName||"",this.phone=t.phone||null,this.postalCode=t.postalCode||null,this.taxNumber=t.taxNumber||null,this.taxOffice=t.taxOffice||null,this.country=t.country||null,this.state=t.state||null,this.city=t.city||null,this.district=t.district||null,this.region=t.region||null,this.checkoutSettings=t.checkoutSettings?new l(t.checkoutSettings):null,this.shippingZones=t.shippingZones?t.shippingZones.map((function(t){return new r(t)})):null,this.isDistrictRequired=t.isDistrictRequired||!1,e(this,{addressLine1:s,addressLine2:s,company:s,firstName:s,id:s,identityNumber:s,isDefault:s,lastName:s,phone:s,postalCode:s,taxNumber:s,taxOffice:s,country:s,state:s,city:s,district:s,region:s,addressText:n,validationResult:n,isValid:n})}return Object.defineProperty(o.prototype,"addressText",{get:function(){return i.getAddressText(this)},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"validationResult",{get:function(){if(this.checkoutSettings)return i.getValidationResult(this,this.checkoutSettings,this.isDistrictRequired||!1)},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"isValid",{get:function(){return!!this.checkoutSettings&&i.isValidAddress(this,this.checkoutSettings,this.isDistrictRequired||!1)},enumerable:!1,configurable:!0}),o.prototype.toJSON=function(){var i=t({},this);return delete i.checkoutSettings,delete i.shippingZones,delete i.isDistrictRequired,i},o}();export{o as IkasOrderAddress};
@@ -0,0 +1,6 @@
1
+ import { IkasOrderAddressRegion as IOrderAddressRegion } from "@ikas/storefront-models";
2
+ import { IkasBaseModel } from "../../../base";
3
+ export declare class IkasOrderAddressRegion extends IkasBaseModel implements IOrderAddressRegion {
4
+ name: string;
5
+ constructor(data: Partial<IOrderAddressRegion>);
6
+ }
@@ -0,0 +1 @@
1
+ import{__extends as r}from'./../../../../../ext/tslib/tslib.es6.js';import{makeObservable as o,observable as t}from"mobx";import{IkasBaseModel as e}from"../../../base/index.js";var m=function(e){function m(r){var m=e.call(this,r)||this;return m.name=r.name||"",o(m,{name:t}),m}return r(m,e),m}(e);export{m as IkasOrderAddressRegion};
@@ -35,6 +35,7 @@ export declare class IkasOrder extends IkasBaseModel implements IOrder {
35
35
  orderPackages: IkasOrderPackage[] | null;
36
36
  orderPaymentStatus: IkasOrderPaymentStatus | null;
37
37
  orderedAt: number | null;
38
+ priceListId: string | null;
38
39
  paymentMethods: IkasOrderPaymentMethod[] | null;
39
40
  shippingAddress: IkasOrderAddress | null;
40
41
  shippingLines: IkasOrderShippingLine[] | null;
@@ -65,5 +66,7 @@ export declare class IkasOrder extends IkasBaseModel implements IOrder {
65
66
  get couponAdjustment(): IkasOrderAdjustment;
66
67
  get nonCouponAdjustments(): IkasOrderAdjustment[];
67
68
  get isRefundEnabled(): boolean;
69
+ get displayedOrderAdjustments(): IkasOrderAdjustment[] | undefined;
70
+ get orderProductFileIds(): string[];
68
71
  }
69
72
  export { IkasOrderCancelReason, IkasOrderPackageStatus, IkasOrderPaymentStatus, IkasOrderShippingMethod, IkasOrderStatus, };
@@ -1 +1 @@
1
- import{__extends as e}from'./../../../ext/tslib/tslib.es6.js';import{IkasOrderAddress as t}from"./address/index.js";import{IkasOrderShippingLine as n}from"./shipping-line/index.js";import{IkasOrderLineItem as r}from"./line-item/index.js";import{IkasOrderCustomer as o}from"./customer/index.js";import{IkasOrderGiftPackageLine as i}from"./gift-line/index.js";import{IkasInvoice as u}from"./invoice/index.js";import{IkasOrderPaymentMethod as l}from"./payment-method/index.js";import{IkasOrderAdjustment as a}from"./adjustment/index.js";import{IkasOrderPackage as s}from"./package/index.js";import{IkasOrderTaxLine as d}from"./tax-line/index.js";import{IkasBaseModel as c}from"../base/index.js";import{IkasOrderShippingMethod as m,IkasOrderStatus as p}from"@ikas/storefront-models";export{IkasOrderCancelReason,IkasOrderPackageStatus,IkasOrderPaymentStatus,IkasOrderShippingMethod,IkasOrderStatus}from"@ikas/storefront-models";import{makeObservable as f,observable as g,computed as b}from"mobx";import{IkasOrderFunctions as y}from"@ikas/storefront-model-functions";import{formatCurrency as h}from"../../../utils/currency.js";var P=function(c){function P(e,y){var h,P,j,k,A,v,S,x,O,I,C=this;(C=c.call(this,e)||this).billingAddress=null,C.cancelReason=null,C.cancelledAt=null,C.currencySymbol=null,C.customer=null,C.customerId=null,C.giftPackageLines=null,C.giftPackageNote=null,C.invoices=null,C.isGiftPackage=null,C.note=null,C.orderAdjustments=null,C.orderNumber=null,C.orderPackageStatus=null,C.orderPackages=null,C.orderPaymentStatus=null,C.orderedAt=null,C.paymentMethods=null,C.shippingAddress=null,C.shippingLines=null,C.taxLines=null,C.billingAddress=e.billingAddress?new t(e.billingAddress):null,C.cancelReason=e.cancelReason||null,C.cancelledAt=e.cancelledAt||null,C.currencyCode=e.currencyCode||"",C.currencySymbol=e.currencySymbol||null,C.customer=e.customer?new o(e.customer):null,C.customerId=e.customerId||null,C.giftPackageLines=(null===(h=e.giftPackageLines)||void 0===h?void 0:h.map((function(e){return new i(e)})))||null,C.giftPackageNote=e.giftPackageNote||null,C.invoices=(null===(P=e.invoices)||void 0===P?void 0:P.map((function(e){return new u(e)})))||null,C.isGiftPackage=e.isGiftPackage||null,C.note=e.note||null,C.orderAdjustments=(null===(j=e.orderAdjustments)||void 0===j?void 0:j.map((function(e){return new a(e)})))||null,C.orderLineItems=(null===(k=e.orderLineItems)||void 0===k?void 0:k.map((function(e){return new r(e)})).filter((function(e){return!e.deleted})))||[],C.orderNumber=e.orderNumber||null,C.orderPackageStatus=e.orderPackageStatus||null,C.orderPackages=(null===(A=e.orderPackages)||void 0===A?void 0:A.map((function(e){return new s(e)})))||null,C.orderPaymentStatus=e.orderPaymentStatus||null,C.orderedAt=e.orderedAt||null,C.paymentMethods=(null===(v=e.paymentMethods)||void 0===v?void 0:v.map((function(e){return new l(e)})))||null,C.shippingAddress=e.shippingAddress?new t(e.shippingAddress):null,C.shippingLines=(null===(S=e.shippingLines)||void 0===S?void 0:S.map((function(e){return new n(e)})))||null,C.shippingMethod=e.shippingMethod||m.SHIPMENT,C.status=e.status||p.CREATED,C.taxLines=(null===(x=e.taxLines)||void 0===x?void 0:x.map((function(e){return new d(e)})))||null,C.totalFinalPrice=null!==(O=e.totalFinalPrice)&&void 0!==O?O:0,C.totalPrice=null!==(I=e.totalPrice)&&void 0!==I?I:0,C.refundSettings=e.refundSettings;var T={billingAddress:g,cancelReason:g,cancelledAt:g,currencyCode:g,currencySymbol:g,customer:g,customerId:g,giftPackageLines:g,giftPackageNote:g,invoices:g,isGiftPackage:g,note:g,orderAdjustments:g,orderLineItems:g,orderNumber:g,orderPackageStatus:g,orderPackages:g,orderPaymentStatus:g,orderedAt:g,paymentMethods:g,shippingAddress:g,shippingLines:g,shippingMethod:g,status:g,taxLines:g,totalFinalPrice:g,totalPrice:g,refundSettings:g,items:b,itemCount:b,refundableItems:b,unfullfilledItems:b,refundedItems:b,totalTax:b,formattedTotalTax:b,shippingTotal:b,formattedShippingTotal:b,formattedTotalFinalPrice:b,formattedTotalPrice:b,hasCustomer:b,hasValidCustomerEmail:b,customerFullName:b,formattedDate:b,couponAdjustment:b,nonCouponAdjustments:b};return y&&(delete T.billingAddress,delete T.shippingAddress),f(C,T),C}return e(P,c),Object.defineProperty(P.prototype,"items",{get:function(){return this.orderLineItems},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"itemCount",{get:function(){var e;return(null===(e=this.items)||void 0===e?void 0:e.length)||0},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"itemQuantity",{get:function(){return this.items.reduce((function(e,t){return e+t.quantity}),0)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"refundableItems",{get:function(){return this.refundSettings?y.getRefundableItems(this,this.refundSettings):[]},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"displayedPackages",{get:function(){return y.getDisplayedPackages(this).map((function(e){return new s(e)}))},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"unfullfilledItems",{get:function(){return y.getUnfullfilledItems(this)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"refundedItems",{get:function(){return y.getRefundedItems(this)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"totalTax",{get:function(){return y.getTotalTax(this)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"formattedTotalTax",{get:function(){return h(this.totalTax,this.currencyCode,this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"shippingTotal",{get:function(){return y.getShippingTotal(this)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"formattedShippingTotal",{get:function(){return h(this.shippingTotal,this.currencyCode,this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"formattedTotalFinalPrice",{get:function(){return h(this.totalFinalPrice,this.currencyCode,this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"formattedTotalPrice",{get:function(){return h(this.totalPrice,this.currencyCode,this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"hasCustomer",{get:function(){return y.hasCustomer(this)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"hasValidCustomerEmail",{get:function(){return y.hasValidCustomerEmail(this)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"customerFullName",{get:function(){return y.getCustomerFullName(this)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"formattedDate",{get:function(){return y.getFormattedDate(this)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"couponAdjustment",{get:function(){return y.getCouponAdjustment(this)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"nonCouponAdjustments",{get:function(){return y.getNonCouponAdjustments(this)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"isRefundEnabled",{get:function(){return this.refundableItems.some((function(e){return null!==e.refundQuantity}))},enumerable:!1,configurable:!0}),P}(c);export{P as IkasOrder};
1
+ import{__extends as e}from'./../../../ext/tslib/tslib.es6.js';import{IkasOrderAddress as t}from"./address/index.js";import{IkasOrderShippingLine as n}from"./shipping-line/index.js";import{IkasOrderLineItem as r}from"./line-item/index.js";import{IkasOrderCustomer as o}from"./customer/index.js";import{IkasOrderGiftPackageLine as i}from"./gift-line/index.js";import{IkasInvoice as u}from"./invoice/index.js";import{IkasOrderPaymentMethod as l}from"./payment-method/index.js";import{IkasOrderAdjustment as s}from"./adjustment/index.js";import{IkasOrderPackage as a}from"./package/index.js";import{IkasOrderTaxLine as d}from"./tax-line/index.js";import{IkasBaseModel as c}from"../base/index.js";import{IkasCampaignType as m,IkasOrderShippingMethod as p,IkasOrderStatus as f}from"@ikas/storefront-models";export{IkasOrderCancelReason,IkasOrderPackageStatus,IkasOrderPaymentStatus,IkasOrderShippingMethod,IkasOrderStatus}from"@ikas/storefront-models";import{makeObservable as g,observable as b,computed as y}from"mobx";import{IkasOrderFunctions as h}from"@ikas/storefront-model-functions";import{formatCurrency as P}from"../../../utils/currency.js";var j=function(c){function j(e,m){var h,P,j,A,k,v,I,S,O,x,C=this;(C=c.call(this,e)||this).billingAddress=null,C.cancelReason=null,C.cancelledAt=null,C.currencySymbol=null,C.customer=null,C.customerId=null,C.giftPackageLines=null,C.giftPackageNote=null,C.invoices=null,C.isGiftPackage=null,C.note=null,C.orderAdjustments=null,C.orderNumber=null,C.orderPackageStatus=null,C.orderPackages=null,C.orderPaymentStatus=null,C.orderedAt=null,C.priceListId=null,C.paymentMethods=null,C.shippingAddress=null,C.shippingLines=null,C.taxLines=null,C.billingAddress=e.billingAddress?new t(e.billingAddress):null,C.cancelReason=e.cancelReason||null,C.cancelledAt=e.cancelledAt||null,C.currencyCode=e.currencyCode||"",C.currencySymbol=e.currencySymbol||null,C.customer=e.customer?new o(e.customer):null,C.customerId=e.customerId||null,C.giftPackageLines=(null===(h=e.giftPackageLines)||void 0===h?void 0:h.map((function(e){return new i(e)})))||null,C.giftPackageNote=e.giftPackageNote||null,C.invoices=(null===(P=e.invoices)||void 0===P?void 0:P.map((function(e){return new u(e)})))||null,C.isGiftPackage=e.isGiftPackage||null,C.note=e.note||null,C.orderAdjustments=(null===(j=e.orderAdjustments)||void 0===j?void 0:j.map((function(e){return new s(e)})))||null,C.orderLineItems=(null===(A=e.orderLineItems)||void 0===A?void 0:A.map((function(e){return new r(e)})).filter((function(e){return!e.deleted})))||[],C.orderNumber=e.orderNumber||null,C.orderPackageStatus=e.orderPackageStatus||null,C.orderPackages=(null===(k=e.orderPackages)||void 0===k?void 0:k.map((function(e){return new a(e)})))||null,C.orderPaymentStatus=e.orderPaymentStatus||null,C.orderedAt=e.orderedAt||null,C.priceListId=e.priceListId||null,C.paymentMethods=(null===(v=e.paymentMethods)||void 0===v?void 0:v.map((function(e){return new l(e)})))||null,C.shippingAddress=e.shippingAddress?new t(e.shippingAddress):null,C.shippingLines=(null===(I=e.shippingLines)||void 0===I?void 0:I.map((function(e){return new n(e)})))||null,C.shippingMethod=e.shippingMethod||p.SHIPMENT,C.status=e.status||f.CREATED,C.taxLines=(null===(S=e.taxLines)||void 0===S?void 0:S.map((function(e){return new d(e)})))||null,C.totalFinalPrice=null!==(O=e.totalFinalPrice)&&void 0!==O?O:0,C.totalPrice=null!==(x=e.totalPrice)&&void 0!==x?x:0,C.refundSettings=e.refundSettings;var T={billingAddress:b,cancelReason:b,cancelledAt:b,currencyCode:b,currencySymbol:b,customer:b,customerId:b,giftPackageLines:b,giftPackageNote:b,invoices:b,isGiftPackage:b,note:b,orderAdjustments:b,orderLineItems:b,orderNumber:b,orderPackageStatus:b,orderPackages:b,orderPaymentStatus:b,orderedAt:b,paymentMethods:b,shippingAddress:b,shippingLines:b,shippingMethod:b,status:b,taxLines:b,totalFinalPrice:b,totalPrice:b,refundSettings:b,items:y,itemCount:y,refundableItems:y,unfullfilledItems:y,refundedItems:y,totalTax:y,formattedTotalTax:y,shippingTotal:y,formattedShippingTotal:y,formattedTotalFinalPrice:y,formattedTotalPrice:y,hasCustomer:y,hasValidCustomerEmail:y,customerFullName:y,formattedDate:y,couponAdjustment:y,nonCouponAdjustments:y,orderProductFileIds:y};return m&&(delete T.billingAddress,delete T.shippingAddress),g(C,T),C}return e(j,c),Object.defineProperty(j.prototype,"items",{get:function(){return this.orderLineItems},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"itemCount",{get:function(){var e;return(null===(e=this.items)||void 0===e?void 0:e.length)||0},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"itemQuantity",{get:function(){return this.items.reduce((function(e,t){return e+t.quantity}),0)},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"refundableItems",{get:function(){return this.refundSettings?h.getRefundableItems(this,this.refundSettings):[]},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"displayedPackages",{get:function(){return h.getDisplayedPackages(this).map((function(e){return new a(e)}))},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"unfullfilledItems",{get:function(){return h.getUnfullfilledItems(this)},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"refundedItems",{get:function(){return h.getRefundedItems(this)},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"totalTax",{get:function(){return h.getTotalTax(this)},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"formattedTotalTax",{get:function(){return P(this.totalTax,this.currencyCode,this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"shippingTotal",{get:function(){return h.getShippingTotal(this)},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"formattedShippingTotal",{get:function(){return P(this.shippingTotal,this.currencyCode,this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"formattedTotalFinalPrice",{get:function(){return P(this.totalFinalPrice,this.currencyCode,this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"formattedTotalPrice",{get:function(){return P(this.totalPrice,this.currencyCode,this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"hasCustomer",{get:function(){return h.hasCustomer(this)},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"hasValidCustomerEmail",{get:function(){return h.hasValidCustomerEmail(this)},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"customerFullName",{get:function(){return h.getCustomerFullName(this)},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"formattedDate",{get:function(){return h.getFormattedDate(this)},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"couponAdjustment",{get:function(){return h.getCouponAdjustment(this)},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"nonCouponAdjustments",{get:function(){return h.getNonCouponAdjustments(this)},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"isRefundEnabled",{get:function(){return this.refundableItems.some((function(e){return null!==e.refundQuantity}))},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"displayedOrderAdjustments",{get:function(){var e;return null===(e=this.orderAdjustments)||void 0===e?void 0:e.filter((function(e){return e.campaignType!==m.FREE_SHIPPING}))},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"orderProductFileIds",{get:function(){return h.getOrderProductFiles(this)},enumerable:!1,configurable:!0}),j}(c);export{j as IkasOrder};
@@ -42,5 +42,10 @@ export declare class IkasOrderLineItem extends IkasBaseModel implements IOrderLi
42
42
  get hasDiscount(): boolean;
43
43
  get refundQuantity(): number | null | undefined;
44
44
  set refundQuantity(value: number | null | undefined);
45
+ /**
46
+ * Currently only supports editing of bundle products.
47
+ * Product options, attributes support will be added later
48
+ */
49
+ editLineItem(): void;
45
50
  }
46
51
  export { IkasOrderLineItemStatus };
@@ -1 +1 @@
1
- import{__extends as t}from'./../../../../ext/tslib/tslib.es6.js';export{IkasOrderLineItemStatus}from"@ikas/storefront-models";import{IkasOrderLineDiscount as e}from"./discount/index.js";import{IkasOrderLineVariant as i}from"./variant/index.js";import{IkasOrderLineItemOption as r}from"./option/index.js";import{IkasBaseModel as n}from"../../base/index.js";import{makeObservable as o,observable as u,computed as c}from"mobx";import{IkasOrderLineItemFunctions as a}from"@ikas/storefront-model-functions";import{formatCurrency as l}from"../../../../utils/currency.js";var d=function(n){function d(t){var a,l,d,s,f,y=this;return(y=n.call(this,t)||this).currencyCode=null,y.discount=null,y.discountPrice=null,y.finalPrice=null,y.options=null,y.originalOrderLineItemId=null,y.statusUpdatedAt=null,y.stockLocationId=null,y.taxValue=null,y._refundQuantity=null,y.currencyCode=t.currencyCode||null,y.currencySymbol=t.currencySymbol||null,y.discount=t.discount?new e(t.discount):null,y.discountPrice=null!==(a=t.discountPrice)&&void 0!==a?a:null,y.finalPrice=null!==(l=t.finalPrice)&&void 0!==l?l:null,y.finalUnitPrice=null!==(d=t.finalUnitPrice)&&void 0!==d?d:null,y.options=(null===(s=t.options)||void 0===s?void 0:s.map((function(t){return new r(t)})))||null,y.originalOrderLineItemId=t.originalOrderLineItemId||null,y.price=t.price,y.quantity=t.quantity,y.status=t.status,y.statusUpdatedAt=t.statusUpdatedAt,y.stockLocationId=t.stockLocationId,y.taxValue=t.taxValue,y.unitPrice=null!==(f=t.unitPrice)&&void 0!==f?f:null,y.variant=new i(t.variant),y.orderedAt=t.orderedAt,y.refundQuantity=t.refundQuantity,o(y,{currencyCode:u,currencySymbol:u,discount:u,discountPrice:u,finalPrice:u,finalUnitPrice:u,options:u,originalOrderLineItemId:u,price:u,quantity:u,status:u,statusUpdatedAt:u,stockLocationId:u,taxValue:u,unitPrice:u,variant:u,orderedAt:u,_refundQuantity:u,priceWithQuantity:c,formattedPriceWithQuantity:c,overridenPriceWithQuantity:c,formattedOverridenPriceWithQuantity:c,formattedFinalPrice:c,formattedUnitPrice:c,formattedFinalUnitPrice:c,formattedDiscountPrice:c,finalPriceWithQuantity:c,formattedFinalPriceWithQuantity:c,tax:c,formattedTax:c,refundQuantity:c}),y}return t(d,n),Object.defineProperty(d.prototype,"priceWithQuantity",{get:function(){return a.getPriceWithQuantity(this)},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"formattedPriceWithQuantity",{get:function(){return l(this.priceWithQuantity,this.currencyCode||"",this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"overridenPriceWithQuantity",{get:function(){return a.getOverridenPriceWithQuantity(this)},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"formattedOverridenPriceWithQuantity",{get:function(){return l(this.overridenPriceWithQuantity||0,this.currencyCode||"",this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"formattedFinalPrice",{get:function(){return l(this.finalPrice||0,this.currencyCode||"",this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"formattedUnitPrice",{get:function(){return l(this.unitPrice||0,this.currencyCode||"",this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"formattedFinalUnitPrice",{get:function(){return l(this.finalUnitPrice||0,this.currencyCode||"",this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"unitPriceText",{get:function(){var t,e,i;if(null!==this.finalUnitPrice)return"".concat(l(this.finalUnitPrice,this.currencyCode||"",this.currencySymbol||"")," / ").concat((null===(e=null===(t=this.variant.baseUnit)||void 0===t?void 0:t.unit)||void 0===e?void 0:e.name)||(null===(i=this.variant.baseUnit)||void 0===i?void 0:i.type))},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"formattedDiscountPrice",{get:function(){return l(this.discountPrice||0,this.currencyCode||"",this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"finalPriceWithQuantity",{get:function(){return a.getFinalPriceWithQuantity(this)},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"formattedFinalPriceWithQuantity",{get:function(){return l(this.finalPriceWithQuantity||0,this.currencyCode||"",this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"tax",{get:function(){return a.getTax(this)},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"formattedTax",{get:function(){return l(this.tax,this.currencyCode||"",this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"hasDiscount",{get:function(){return a.hasDiscount(this)},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"refundQuantity",{get:function(){return this._refundQuantity},set:function(t){t?(t>this.quantity&&(t=this.quantity),t<=0&&(t=null),this._refundQuantity=t):this._refundQuantity=null},enumerable:!1,configurable:!0}),d}(n);export{d as IkasOrderLineItem};
1
+ import{__extends as t}from'./../../../../ext/tslib/tslib.es6.js';export{IkasOrderLineItemStatus}from"@ikas/storefront-models";import{IkasOrderLineDiscount as e}from"./discount/index.js";import{IkasOrderLineVariant as i}from"./variant/index.js";import{IkasOrderLineItemOption as r}from"./option/index.js";import{IkasBaseModel as n}from"../../base/index.js";import{makeObservable as o,observable as u,computed as c,action as a}from"mobx";import{IkasOrderLineItemFunctions as l}from"@ikas/storefront-model-functions";import{formatCurrency as d}from"../../../../utils/currency.js";import{IkasBaseStore as s}from"../../../../store/base.js";import"../../../../store/customer/index.js";import"../../../../store/cart/index.js";var f=function(n){function f(t){var l,d,s,f,y,m=this;return(m=n.call(this,t)||this).currencyCode=null,m.discount=null,m.discountPrice=null,m.finalPrice=null,m.options=null,m.originalOrderLineItemId=null,m.statusUpdatedAt=null,m.stockLocationId=null,m.taxValue=null,m._refundQuantity=null,m.currencyCode=t.currencyCode||null,m.currencySymbol=t.currencySymbol||null,m.discount=t.discount?new e(t.discount):null,m.discountPrice=null!==(l=t.discountPrice)&&void 0!==l?l:null,m.finalPrice=null!==(d=t.finalPrice)&&void 0!==d?d:null,m.finalUnitPrice=null!==(s=t.finalUnitPrice)&&void 0!==s?s:null,m.options=(null===(f=t.options)||void 0===f?void 0:f.map((function(t){return new r(t)})))||null,m.originalOrderLineItemId=t.originalOrderLineItemId||null,m.price=t.price,m.quantity=t.quantity,m.status=t.status,m.statusUpdatedAt=t.statusUpdatedAt,m.stockLocationId=t.stockLocationId,m.taxValue=t.taxValue,m.unitPrice=null!==(y=t.unitPrice)&&void 0!==y?y:null,m.variant=new i(t.variant),m.orderedAt=t.orderedAt,m.refundQuantity=t.refundQuantity,o(m,{currencyCode:u,currencySymbol:u,discount:u,discountPrice:u,finalPrice:u,finalUnitPrice:u,options:u,originalOrderLineItemId:u,price:u,quantity:u,status:u,statusUpdatedAt:u,stockLocationId:u,taxValue:u,unitPrice:u,variant:u,orderedAt:u,_refundQuantity:u,priceWithQuantity:c,formattedPriceWithQuantity:c,overridenPriceWithQuantity:c,formattedOverridenPriceWithQuantity:c,formattedFinalPrice:c,formattedUnitPrice:c,formattedFinalUnitPrice:c,formattedDiscountPrice:c,finalPriceWithQuantity:c,formattedFinalPriceWithQuantity:c,tax:c,formattedTax:c,refundQuantity:c,editLineItem:a.bound}),m}return t(f,n),Object.defineProperty(f.prototype,"priceWithQuantity",{get:function(){return l.getPriceWithQuantity(this)},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"formattedPriceWithQuantity",{get:function(){return d(this.priceWithQuantity,this.currencyCode||"",this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"overridenPriceWithQuantity",{get:function(){return l.getOverridenPriceWithQuantity(this)},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"formattedOverridenPriceWithQuantity",{get:function(){return d(this.overridenPriceWithQuantity||0,this.currencyCode||"",this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"formattedFinalPrice",{get:function(){return d(this.finalPrice||0,this.currencyCode||"",this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"formattedUnitPrice",{get:function(){return d(this.unitPrice||0,this.currencyCode||"",this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"formattedFinalUnitPrice",{get:function(){return d(this.finalUnitPrice||0,this.currencyCode||"",this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"unitPriceText",{get:function(){var t,e,i;if(null!==this.finalUnitPrice)return"".concat(d(this.finalUnitPrice,this.currencyCode||"",this.currencySymbol||"")," / ").concat((null===(e=null===(t=this.variant.baseUnit)||void 0===t?void 0:t.unit)||void 0===e?void 0:e.name)||(null===(i=this.variant.baseUnit)||void 0===i?void 0:i.type))},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"formattedDiscountPrice",{get:function(){return d(this.discountPrice||0,this.currencyCode||"",this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"finalPriceWithQuantity",{get:function(){return l.getFinalPriceWithQuantity(this)},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"formattedFinalPriceWithQuantity",{get:function(){return d(this.finalPriceWithQuantity||0,this.currencyCode||"",this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"tax",{get:function(){return l.getTax(this)},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"formattedTax",{get:function(){return d(this.tax,this.currencyCode||"",this.currencySymbol||"")},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"hasDiscount",{get:function(){return l.hasDiscount(this)},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"refundQuantity",{get:function(){return this._refundQuantity},set:function(t){t?(t>this.quantity&&(t=this.quantity),t<=0&&(t=null),this._refundQuantity=t):this._refundQuantity=null},enumerable:!1,configurable:!0}),f.prototype.editLineItem=function(){var t,e=this.variant.href||"";e=e.includes("?")?e+"&editLineID="+this.id:e+"?editLineID="+this.id,null===(t=s.getInstance().router)||void 0===t||t.push(e)},f}(n);export{f as IkasOrderLineItem};
@@ -0,0 +1,33 @@
1
+ import { IkasOrderLineBundleVariant as IOrderLineBundleVariant } from "@ikas/storefront-models";
2
+ import { IkasImage } from "../../../../../image";
3
+ import { IkasOrderLineVariantVariantValue } from "../../value";
4
+ import { IkasOrderLineVariantBrand } from "../../brand";
5
+ import { IkasOrderLineVariantCategory } from "../../category";
6
+ import { IkasOrderLineVariantPrice } from "../../price";
7
+ import { IkasOrderLineVariantTag } from "../../tag";
8
+ import { IkasOrderLineVariantUnit } from "../../unit";
9
+ import { IkasOrderLineBaseUnit } from "../../../base-unit";
10
+ export declare class IkasOrderLineBundleVariant implements IOrderLineBundleVariant {
11
+ barcodeList: string[] | null;
12
+ baseUnit: IkasOrderLineBaseUnit | null;
13
+ brand: IkasOrderLineVariantBrand | null;
14
+ categories: IkasOrderLineVariantCategory[] | null;
15
+ fileId: string | null;
16
+ id: string | null;
17
+ mainImageId: string | null;
18
+ name: string;
19
+ prices: IkasOrderLineVariantPrice[] | null;
20
+ productId: string | null;
21
+ sku: string | null;
22
+ slug: string | null;
23
+ tagIds: string[] | null;
24
+ tags: IkasOrderLineVariantTag[] | null;
25
+ taxValue: number | null;
26
+ type: number | null;
27
+ unit: IkasOrderLineVariantUnit | null;
28
+ weight: number | null;
29
+ hsCode: string | null;
30
+ variantValues: IkasOrderLineVariantVariantValue[] | null;
31
+ mainImage?: IkasImage | null;
32
+ constructor(data: IOrderLineBundleVariant);
33
+ }
@@ -0,0 +1 @@
1
+ import{IkasImage as i}from"../../../../../image/index.js";import{IkasOrderLineVariantVariantValue as n}from"../../value/index.js";import{IkasOrderLineVariantBrand as t}from"../../brand/index.js";import{IkasOrderLineVariantCategory as e}from"../../category/index.js";import{IkasOrderLineVariantPrice as l}from"../../price/index.js";import{IkasOrderLineVariantTag as s}from"../../tag/index.js";import{makeAutoObservable as u}from"mobx";import{IkasOrderLineVariantUnit as a}from"../../unit/index.js";import{IkasOrderLineBaseUnit as r}from"../../../base-unit/index.js";var o=function(o){var d,m,h,p;this.barcodeList=o.barcodeList||null,this.baseUnit=o.baseUnit?new r(o.baseUnit):null,this.brand=o.brand?new t(o.brand):null,this.categories=(null===(d=o.categories)||void 0===d?void 0:d.map((function(i){return new e(i)})))||null,this.fileId=o.fileId||null,this.id=o.id||null,this.mainImageId=o.mainImageId||null,this.name=o.name,this.prices=(null===(m=o.prices)||void 0===m?void 0:m.map((function(i){return new l(i)})))||null,this.productId=o.productId||null,this.sku=o.sku||null,this.slug=o.slug||null,this.tagIds=o.tagIds||null,this.tags=(null===(h=o.tags)||void 0===h?void 0:h.map((function(i){return new s(i)})))||null,this.taxValue=o.taxValue||null,this.type=o.type||null,this.unit=o.unit?new a(o.unit):null,this.weight=o.weight||null,this.hsCode=o.hsCode||null,this.variantValues=(null===(p=o.variantValues)||void 0===p?void 0:p.map((function(i){return new n(i)})))||null,this.mainImage=o.mainImageId?new i({id:o.mainImageId,isVideo:!1}):null,u(this)};export{o as IkasOrderLineBundleVariant};
@@ -0,0 +1,15 @@
1
+ import { IkasOrderLineVariantBundleProduct as IOrderLineVariantBundleProduct } from "@ikas/storefront-models";
2
+ import { IkasOrderLineBundleVariant } from "./bundle-variant";
3
+ export declare class IkasOrderLineVariantBundleProduct implements IOrderLineVariantBundleProduct {
4
+ id: string;
5
+ deleted: boolean | null;
6
+ discountPrice: number | null;
7
+ discountRatio: number | null;
8
+ finalPrice: number | null;
9
+ order: number;
10
+ price: number;
11
+ quantity: number;
12
+ taxValue: number | null;
13
+ variant: IkasOrderLineBundleVariant;
14
+ constructor(data: IOrderLineVariantBundleProduct);
15
+ }
@@ -0,0 +1 @@
1
+ import{IkasOrderLineBundleVariant as i}from"./bundle-variant/index.js";var t=function(t){this.id=t.id,this.deleted=t.deleted||null,this.discountPrice=t.discountPrice||null,this.discountRatio=t.discountRatio||null,this.finalPrice=t.finalPrice||null,this.order=t.order,this.price=t.price,this.quantity=t.quantity,this.taxValue=t.taxValue||null,this.variant=new i(t.variant)};export{t as IkasOrderLineVariantBundleProduct};
@@ -7,11 +7,14 @@ import { IkasOrderLineVariantPrice } from "./price";
7
7
  import { IkasOrderLineVariantTag } from "./tag";
8
8
  import { IkasOrderLineVariantUnit } from "./unit";
9
9
  import { IkasOrderLineBaseUnit } from "../base-unit";
10
+ import { IkasOrderLineVariantBundleProduct } from "./bundle-product";
10
11
  export declare class IkasOrderLineVariant implements IOrderLineVariant {
11
12
  barcodeList: string[] | null;
12
13
  baseUnit: IkasOrderLineBaseUnit | null;
13
14
  brand: IkasOrderLineVariantBrand | null;
15
+ bundleProducts: IkasOrderLineVariantBundleProduct[] | null;
14
16
  categories: IkasOrderLineVariantCategory[] | null;
17
+ fileId: string | null;
15
18
  id: string | null;
16
19
  mainImageId: string | null;
17
20
  name: string;
@@ -25,6 +28,7 @@ export declare class IkasOrderLineVariant implements IOrderLineVariant {
25
28
  type: number | null;
26
29
  unit: IkasOrderLineVariantUnit | null;
27
30
  weight: number | null;
31
+ hsCode: string | null;
28
32
  variantValues: IkasOrderLineVariantVariantValue[] | null;
29
33
  mainImage?: IkasImage | null;
30
34
  constructor(data: IOrderLineVariant);
@@ -1 +1 @@
1
- import{IkasOrderLineItemVariantFunctions as i}from"@ikas/storefront-model-functions";import{IkasImage as n}from"../../../image/index.js";import{IkasOrderLineVariantVariantValue as t}from"./value/index.js";import{IkasOrderLineVariantBrand as l}from"./brand/index.js";import{IkasOrderLineVariantCategory as e}from"./category/index.js";import{IkasOrderLineVariantPrice as s}from"./price/index.js";import{IkasOrderLineVariantTag as u}from"./tag/index.js";import{makeAutoObservable as r}from"mobx";import{IkasOrderLineVariantUnit as a}from"./unit/index.js";import{IkasOrderLineBaseUnit as o}from"../base-unit/index.js";var d=function(){function d(i){var d,m,h,p;this.barcodeList=null,this.brand=null,this.categories=null,this.id=null,this.mainImageId=null,this.prices=null,this.productId=null,this.sku=null,this.slug=null,this.tagIds=null,this.taxValue=null,this.type=null,this.weight=null,this.variantValues=null,this.mainImage=null,this.barcodeList=i.barcodeList||null,this.baseUnit=i.baseUnit?new o(i.baseUnit):null,this.brand=i.brand?new l(i.brand):null,this.categories=(null===(d=i.categories)||void 0===d?void 0:d.map((function(i){return new e(i)})))||null,this.id=i.id||null,this.mainImageId=i.mainImageId||null,this.name=i.name,this.prices=(null===(m=i.prices)||void 0===m?void 0:m.map((function(i){return new s(i)})))||null,this.productId=i.productId||null,this.sku=i.sku||null,this.slug=i.slug||null,this.tagIds=i.tagIds||null,this.tags=(null===(h=i.tags)||void 0===h?void 0:h.map((function(i){return new u(i)})))||null,this.taxValue=i.taxValue||null,this.type=i.type||null,this.unit=i.unit?new a(i.unit):null,this.weight=i.weight||null,this.variantValues=(null===(p=i.variantValues)||void 0===p?void 0:p.map((function(i){return new t(i)})))||null,this.mainImage=i.mainImageId?new n({id:i.mainImageId,isVideo:!1}):null,r(this)}return Object.defineProperty(d.prototype,"href",{get:function(){return i.getIkasOrderLineVariantHref(this)},enumerable:!1,configurable:!0}),d}();export{d as IkasOrderLineVariant};
1
+ import{IkasOrderLineItemVariantFunctions as i}from"@ikas/storefront-model-functions";import{IkasImage as n}from"../../../image/index.js";import{IkasOrderLineVariantVariantValue as t}from"./value/index.js";import{IkasOrderLineVariantBrand as l}from"./brand/index.js";import{IkasOrderLineVariantCategory as e}from"./category/index.js";import{IkasOrderLineVariantPrice as u}from"./price/index.js";import{IkasOrderLineVariantTag as s}from"./tag/index.js";import{makeAutoObservable as r}from"mobx";import{IkasOrderLineVariantUnit as a}from"./unit/index.js";import{IkasOrderLineBaseUnit as o}from"../base-unit/index.js";import{IkasOrderLineVariantBundleProduct as d}from"./bundle-product/index.js";var h=function(){function h(i){var h,m,p,c,f;this.barcodeList=null,this.brand=null,this.categories=null,this.fileId=null,this.id=null,this.mainImageId=null,this.prices=null,this.productId=null,this.sku=null,this.slug=null,this.tagIds=null,this.taxValue=null,this.type=null,this.weight=null,this.hsCode=null,this.variantValues=null,this.mainImage=null,this.barcodeList=i.barcodeList||null,this.baseUnit=i.baseUnit?new o(i.baseUnit):null,this.brand=i.brand?new l(i.brand):null,this.bundleProducts=(null===(h=i.bundleProducts)||void 0===h?void 0:h.map((function(i){return new d(i)})))||null,this.categories=(null===(m=i.categories)||void 0===m?void 0:m.map((function(i){return new e(i)})))||null,this.fileId=i.fileId||null,this.id=i.id||null,this.mainImageId=i.mainImageId||null,this.name=i.name,this.prices=(null===(p=i.prices)||void 0===p?void 0:p.map((function(i){return new u(i)})))||null,this.productId=i.productId||null,this.sku=i.sku||null,this.slug=i.slug||null,this.tagIds=i.tagIds||null,this.tags=(null===(c=i.tags)||void 0===c?void 0:c.map((function(i){return new s(i)})))||null,this.taxValue=i.taxValue||null,this.type=i.type||null,this.unit=i.unit?new a(i.unit):null,this.weight=i.weight||null,this.hsCode=i.hsCode||null,this.variantValues=(null===(f=i.variantValues)||void 0===f?void 0:f.map((function(i){return new t(i)})))||null,this.mainImage=i.mainImageId?new n({id:i.mainImageId,isVideo:!1}):null,r(this)}return Object.defineProperty(h.prototype,"href",{get:function(){return i.getIkasOrderLineVariantHref(this)},enumerable:!1,configurable:!0}),h}();export{h as IkasOrderLineVariant};
@@ -11,6 +11,7 @@ export declare class IkasOrderTransaction implements IOrderTransaction {
11
11
  error: IkasTransactionError | null;
12
12
  id: string | null;
13
13
  orderId: string | null;
14
+ paymentGatewayCode: string | null;
14
15
  paymentGatewayId: string | null;
15
16
  paymentGatewayName: string | null;
16
17
  paymentMethod: IkasPaymentMethodType | null;
@@ -1 +1 @@
1
- export{IkasTransactionStatus,IkasTransactionType}from"@ikas/storefront-models";import{makeAutoObservable as t}from"mobx";import{formatCurrency as e}from"../../../../utils/currency.js";import{IkasTransactionError as r}from"./error/index.js";var o=function(){function o(e){this.amount=e.amount||null,this.checkoutId=e.checkoutId||null,this.createdAt=e.createdAt||null,this.currencyCode=e.currencyCode||null,this.currencySymbol=e.currencySymbol||null,this.customerId=e.customerId||null,this.error=e.error?new r(e.error):null,this.id=e.id,this.orderId=e.orderId,this.paymentGatewayId=e.paymentGatewayId,this.paymentGatewayName=e.paymentGatewayName,this.paymentMethod=e.paymentMethod,this.paymentMethodDetail=e.paymentMethodDetail,this.processedAt=e.processedAt,this.refundReason=e.refundReason,this.status=e.status,this.type=e.type,this.updatedAt=e.updatedAt,t(this)}return Object.defineProperty(o.prototype,"formattedAmount",{get:function(){return e(this.amount||0,this.currencyCode||"",this.currencySymbol||"")},enumerable:!1,configurable:!0}),o}();export{o as IkasOrderTransaction};
1
+ export{IkasTransactionStatus,IkasTransactionType}from"@ikas/storefront-models";import{makeAutoObservable as t}from"mobx";import{formatCurrency as e}from"../../../../utils/currency.js";import{IkasTransactionError as r}from"./error/index.js";var o=function(){function o(e){this.amount=e.amount||null,this.checkoutId=e.checkoutId||null,this.createdAt=e.createdAt||null,this.currencyCode=e.currencyCode||null,this.currencySymbol=e.currencySymbol||null,this.customerId=e.customerId||null,this.error=e.error?new r(e.error):null,this.id=e.id,this.orderId=e.orderId,this.paymentGatewayCode=e.paymentGatewayCode,this.paymentGatewayId=e.paymentGatewayId,this.paymentGatewayName=e.paymentGatewayName,this.paymentMethod=e.paymentMethod,this.paymentMethodDetail=e.paymentMethodDetail,this.processedAt=e.processedAt,this.refundReason=e.refundReason,this.status=e.status,this.type=e.type,this.updatedAt=e.updatedAt,t(this)}return Object.defineProperty(o.prototype,"formattedAmount",{get:function(){return e(this.amount||0,this.currencyCode||"",this.currencySymbol||"")},enumerable:!1,configurable:!0}),o}();export{o as IkasOrderTransaction};
@@ -8,6 +8,7 @@ export declare class IkasTransactionPaymentMethodDetail implements ITransactionP
8
8
  cardType: IkasTransactionCardType | null;
9
9
  installment: IkasTransactionInstallmentPrice | null;
10
10
  lastFourDigits: string;
11
+ paymentMethodName: string | null;
11
12
  threeDSecure: boolean | null;
12
13
  constructor(data: ITransactionPaymentMethodDetail);
13
14
  }
@@ -1 +1 @@
1
- import{makeAutoObservable as i}from"mobx";var l=function(l){this.bankName=null,this.cardAssociation=null,this.cardFamily=null,this.cardType=null,this.installment=null,this.threeDSecure=null,this.bankName=l.bankName||null,this.binNumber=l.binNumber,this.cardAssociation=l.cardAssociation||null,this.cardFamily=l.cardFamily||null,this.cardType=l.cardType||null,this.installment=l.installment||null,this.lastFourDigits=l.lastFourDigits,this.threeDSecure=l.threeDSecure||null,i(this)};export{l as IkasTransactionPaymentMethodDetail};
1
+ import{makeAutoObservable as t}from"mobx";var l=function(l){this.bankName=null,this.cardAssociation=null,this.cardFamily=null,this.cardType=null,this.installment=null,this.threeDSecure=null,this.bankName=l.bankName||null,this.binNumber=l.binNumber,this.cardAssociation=l.cardAssociation||null,this.cardFamily=l.cardFamily||null,this.cardType=l.cardType||null,this.installment=l.installment||null,this.lastFourDigits=l.lastFourDigits,this.paymentMethodName=l.paymentMethodName||null,this.threeDSecure=l.threeDSecure||null,t(this)};export{l as IkasTransactionPaymentMethodDetail};
@@ -0,0 +1,15 @@
1
+ import { IkasProductCampaignOffer as IProductCampaignOffer } from "@ikas/storefront-models";
2
+ import { IkasProduct } from "..";
3
+ export declare class IkasProductCampaignOffer implements IProductCampaignOffer {
4
+ id: string;
5
+ constructor(data: IProductCampaignOffer);
6
+ }
7
+ export declare class IkasProductOffer {
8
+ campaignOfferId: string;
9
+ campaignOfferProductId: string;
10
+ product: IkasProduct;
11
+ isSelected: boolean;
12
+ quantity: number;
13
+ constructor(data?: Partial<IkasProductOffer>);
14
+ get isAccepted(): boolean;
15
+ }
@@ -0,0 +1 @@
1
+ import{__assign as t}from'./../../../../ext/tslib/tslib.es6.js';import{makeAutoObservable as i}from"mobx";import{IkasCampaignOfferTargetPageType as e,IkasCartCampaignOfferStatus as r}from"@ikas/storefront-models";import{IkasProduct as o}from"../index.js";import{IkasBaseStore as n}from"../../../../store/base.js";import"../../../../store/customer/index.js";import"../../../../store/cart/index.js";var a=function(t){this.id=t.id||"",i(this)},s=function(){function a(e){var r,n,a;void 0===e&&(e={}),this.isSelected=!1,this.quantity=1,this.campaignOfferId=e.campaignOfferId||"",this.campaignOfferProductId=e.campaignOfferProductId||"",this.product=new o(t(t({},e.product),{selectedVariantValues:null===(a=(null===(r=e.product)||void 0===r?void 0:r.variants.find((function(t){return t.isActive})))||(null===(n=e.product)||void 0===n?void 0:n.variants[0]))||void 0===a?void 0:a.variantValues})),this.isSelected=e.isSelected||!1,this.quantity=e.quantity||1,i(this)}return Object.defineProperty(a.prototype,"isAccepted",{get:function(){var t,i,o=this;return(null===(i=null===(t=n.getInstance().cartStore.cart)||void 0===t?void 0:t.campaignOffers)||void 0===i?void 0:i.some((function(t){return o.campaignOfferId===t.campaignOfferId&&o.campaignOfferProductId===t.campaignOfferProductId&&t.targetPageTypes.some((function(t){return t===e.PRODUCT}))&&t.status===r.ACCEPTED})))||!1},enumerable:!1,configurable:!0}),a}();export{a as IkasProductCampaignOffer,s as IkasProductOffer};
@@ -40,8 +40,10 @@ export declare class IkasApplicableProductFilterValue implements IApplicableProd
40
40
  thumbnailImageId?: string | null;
41
41
  thumbnailImage?: IkasImage | null;
42
42
  resultCount?: number | null;
43
+ slug?: string | null;
43
44
  isSelected: boolean;
44
45
  constructor(data: IApplicableProductFilterValue);
46
+ get href(): string;
45
47
  }
46
48
  export declare class IkasProductFilterValue implements IProductFilterValue {
47
49
  id: string;
@@ -1 +1 @@
1
- import{__assign as t}from'./../../../../ext/tslib/tslib.es6.js';import{IkasImage as e}from"../../image/index.js";import{IkasProductFilterType as i,IkasProductFilterDisplayType as s,IkasProductFilterSortType as n}from"@ikas/storefront-models";export{IkasProductFilterDisplayType,IkasProductFilterSortType,IkasProductFilterType,IkasProductStockFilterValue}from"@ikas/storefront-models";import{makeAutoObservable as o}from"mobx";import{IkasProductFilterFunctions as l}from"@ikas/storefront-model-functions";var u=function(){function e(e,n){var u=this;if(this.productList=null,this.numberRange=null,this.numberRangeLimit=null,this.numberRangeListOptions=null,this.onFilterValueClick=function(t){var e;l.onFilterValueClick(u,t),null===(e=u.productList)||void 0===e||e.applyFilters()},this.onNumberRangeClick=function(t){var e;l.onNumberRangeClick(u,t),null===(e=u.productList)||void 0===e||e.applyFilters()},this.onNumberRangeChange=function(t){var e;l.onNumberRangeChange(u,t),null===(e=u.productList)||void 0===e||e.applyFilters()},this.clear=function(){l.clear(u)},this.toInput=function(){return l.toInput(u)},this.applyQueryParam=function(t){l.applyQueryParam(u,t)},this.id=e.id||"",this.key=e.key||"",this.name=e.name||"",this.order=e.order||0,this.type=e.type||i.BRAND,this.displayType=e.displayType||s.BOX,this.isMultiSelect=e.isMultiSelect||!1,this.isFacetFilter=e.isFacetFilter||!1,this.values=e.values?e.values.map((function(t){return new r(t)})):null,this.customValues=e.customValues||null,this.settings=e.settings?new h(e.settings):null,this.displayType===s.NUMBER_RANGE_LIST&&this.customValues&&this.customValues.length&&(this.numberRangeListOptions=this.customValues.map((function(e){return new c(t(t({key:e},m(e)),{isSelected:!1}))}))),this.displayType===s.NUMBER_RANGE&&this.customValues&&this.customValues.length){var a=this.customValues[0];this.numberRangeLimit=m(a)}this.productList=n,o(this)}return Object.defineProperty(e.prototype,"isCustomValueFilter",{get:function(){return l.isCustomValueFilter(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isStockFilter",{get:function(){return l.isStockFilter(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"valueList",{get:function(){return l.getValueList(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"keyList",{get:function(){return l.getKeyList(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"displayedValues",{get:function(){return l.getDisplayedValues(this)},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){var e=t({},this);return delete e.productList,e},e}(),r=function(t){this.thumbnailImageId=null,this.thumbnailImage=null,this.id=t.id||"",this.key=t.key||"",this.name=t.name||"",this.colorCode=t.colorCode||null,this.thumbnailImageId=t.thumbnailImageId||null,this.thumbnailImageId&&(this.thumbnailImage=new e({id:this.thumbnailImageId,isVideo:!1})),this.isSelected=t.isSelected||!1,this.resultCount=void 0!==t.resultCount&&null!==t.resultCount?t.resultCount:null,o(this)},a=function(t){this.id=t.id,this.type=t.type,this.displayType=t.displayType,this.valueList=t.valueList,o(this)},h=function(t){this.useAndFilter=t.useAndFilter||!1,this.showCollapsedOnDesktop=t.showCollapsedOnDesktop||!1,this.showCollapsedOnMobile=t.showCollapsedOnMobile||!1,this.sortType=t.sortType||n.ALPHABETICAL_ASC,this.customSortedValues=t.customSortedValues||null,o(this)},p=function(t){this.from=t.from||0,this.to=t.to||null,o(this)},c=function(){function e(t){this.from=t.from||0,this.to=t.to||null,this.key=t.key||"",this.isSelected=t.isSelected||!1,o(this)}return e.prototype.toJSON=function(){return t(t({},this),{isSelected:this.isSelected})},e}();function m(t){return l.parseRangeStr(t)}export{r as IkasApplicableProductFilterValue,p as IkasFilterRangeValue,u as IkasProductFilter,c as IkasProductFilterNumberRangeListOption,h as IkasProductFilterSettings,a as IkasProductFilterValue,m as parseRangeStr};
1
+ import{__assign as t}from'./../../../../ext/tslib/tslib.es6.js';import{IkasImage as e}from"../../image/index.js";import{IkasProductFilterType as i,IkasProductFilterDisplayType as s,IkasProductFilterSortType as n}from"@ikas/storefront-models";export{IkasProductFilterDisplayType,IkasProductFilterSortType,IkasProductFilterType,IkasProductStockFilterValue}from"@ikas/storefront-models";import{makeAutoObservable as l}from"mobx";import{IkasProductFilterFunctions as o}from"@ikas/storefront-model-functions";var u=function(){function e(e,n){var u=this;if(this.productList=null,this.numberRange=null,this.numberRangeLimit=null,this.numberRangeListOptions=null,this.onFilterValueClick=function(t){var e;o.onFilterValueClick(u,t),null===(e=u.productList)||void 0===e||e.applyFilters()},this.onNumberRangeClick=function(t){var e;o.onNumberRangeClick(u,t),null===(e=u.productList)||void 0===e||e.applyFilters()},this.onNumberRangeChange=function(t){var e;o.onNumberRangeChange(u,t),null===(e=u.productList)||void 0===e||e.applyFilters()},this.clear=function(){o.clear(u)},this.toInput=function(){return o.toInput(u)},this.applyQueryParam=function(t){o.applyQueryParam(u,t)},this.id=e.id||"",this.key=e.key||"",this.name=e.name||"",this.order=e.order||0,this.type=e.type||i.BRAND,this.displayType=e.displayType||s.BOX,this.isMultiSelect=e.isMultiSelect||!1,this.isFacetFilter=e.isFacetFilter||!1,this.values=e.values?e.values.map((function(t){return new r(t)})):null,this.customValues=e.customValues||null,this.settings=e.settings?new h(e.settings):null,this.displayType===s.NUMBER_RANGE_LIST&&this.customValues&&this.customValues.length&&(this.numberRangeListOptions=this.customValues.map((function(e){return new c(t(t({key:e},m(e)),{isSelected:!1}))}))),this.displayType===s.NUMBER_RANGE&&this.customValues&&this.customValues.length){var a=this.customValues[0];this.numberRangeLimit=m(a)}this.productList=n,l(this)}return Object.defineProperty(e.prototype,"isCustomValueFilter",{get:function(){return o.isCustomValueFilter(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isStockFilter",{get:function(){return o.isStockFilter(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"valueList",{get:function(){return o.getValueList(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"keyList",{get:function(){return o.getKeyList(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"displayedValues",{get:function(){return o.getDisplayedValues(this)},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){var e=t({},this);return delete e.productList,e},e}(),r=function(){function t(t){this.thumbnailImageId=null,this.thumbnailImage=null,this.id=t.id||"",this.key=t.key||"",this.name=t.name||"",this.colorCode=t.colorCode||null,this.thumbnailImageId=t.thumbnailImageId||null,this.thumbnailImageId&&(this.thumbnailImage=new e({id:this.thumbnailImageId,isVideo:!1})),this.isSelected=t.isSelected||!1,this.resultCount=void 0!==t.resultCount&&null!==t.resultCount?t.resultCount:null,this.slug=t.slug||null,l(this)}return Object.defineProperty(t.prototype,"href",{get:function(){return o.getIkasFilterHref(this)},enumerable:!1,configurable:!0}),t}(),a=function(t){this.id=t.id,this.type=t.type,this.displayType=t.displayType,this.valueList=t.valueList,l(this)},h=function(t){this.useAndFilter=t.useAndFilter||!1,this.showCollapsedOnDesktop=t.showCollapsedOnDesktop||!1,this.showCollapsedOnMobile=t.showCollapsedOnMobile||!1,this.sortType=t.sortType||n.ALPHABETICAL_ASC,this.customSortedValues=t.customSortedValues||null,l(this)},p=function(t){this.from=t.from||0,this.to=t.to||null,l(this)},c=function(){function e(t){this.from=t.from||0,this.to=t.to||null,this.key=t.key||"",this.isSelected=t.isSelected||!1,l(this)}return e.prototype.toJSON=function(){return t(t({},this),{isSelected:this.isSelected})},e}();function m(t){return o.parseRangeStr(t)}export{r as IkasApplicableProductFilterValue,p as IkasFilterRangeValue,u as IkasProductFilter,c as IkasProductFilterNumberRangeListOption,h as IkasProductFilterSettings,a as IkasProductFilterValue,m as parseRangeStr};
@@ -0,0 +1,11 @@
1
+ import { IkasProductGroup as IProductGroup } from "@ikas/storefront-models";
2
+ import { IkasProductGroupTranslation } from "./translation";
3
+ import { IkasProductGroupValue } from "./value";
4
+ export declare class IkasProductGroup implements IProductGroup {
5
+ groupKey: string;
6
+ id: string;
7
+ name: string;
8
+ translations?: IkasProductGroupTranslation[] | null;
9
+ values: IkasProductGroupValue[];
10
+ constructor(data: IProductGroup);
11
+ }
@@ -0,0 +1 @@
1
+ import{IkasProductGroupTranslation as n}from"./translation/index.js";import{IkasProductGroupValue as i}from"./value/index.js";var t=function(t){var r;this.groupKey=t.groupKey,this.id=t.id,this.name=t.name,this.translations=(null===(r=t.translations)||void 0===r?void 0:r.map((function(i){return new n(i)})))||null,this.values=t.values.map((function(n){return new i(n)}))};export{t as IkasProductGroup};
@@ -0,0 +1,13 @@
1
+ import { IkasProductGroupTranslation as IProductGroupTranslation } from "@ikas/storefront-models";
2
+ import { IkasProductGroupValueTranslation as IProductGroupValueTranslation } from "@ikas/storefront-models";
3
+ export declare class IkasProductGroupTranslation implements IkasProductGroupTranslation {
4
+ locale: string;
5
+ values: IkasProductGroupValueTranslation[] | null;
6
+ constructor(data: IProductGroupTranslation);
7
+ }
8
+ export declare class IkasProductGroupValueTranslation implements IkasProductGroupValueTranslation {
9
+ id: string;
10
+ name: string | null;
11
+ value: string | null;
12
+ constructor(data: IProductGroupValueTranslation);
13
+ }
@@ -0,0 +1 @@
1
+ var i=function(i){var n;this.locale=i.locale,this.values=(null===(n=i.values)||void 0===n?void 0:n.map((function(i){return new l(i)})))||null},l=function(i){this.id=i.id,this.name=i.name,this.value=i.value};export{i as IkasProductGroupTranslation,l as IkasProductGroupValueTranslation};
@@ -0,0 +1,7 @@
1
+ import { IkasProductGroupValue as IProductGroupValue } from "@ikas/storefront-models";
2
+ export declare class IkasProductGroupValue implements IProductGroupValue {
3
+ id: string;
4
+ name: string;
5
+ value: string;
6
+ constructor(data: IProductGroupValue);
7
+ }
@@ -0,0 +1 @@
1
+ var i=function(i){this.id=i.id,this.name=i.name,this.value=i.value};export{i as IkasProductGroupValue};
@@ -1,6 +1,7 @@
1
1
  import { IkasImage } from "../../image";
2
2
  import { IkasProductImage as IProductImage } from "@ikas/storefront-models";
3
3
  export declare class IkasProductImage implements IProductImage {
4
+ fileName: string | null;
4
5
  imageId: string | null;
5
6
  isMain: boolean;
6
7
  isVideo: boolean | null;
@@ -1 +1 @@
1
- import{IkasImage as i}from"../../image/index.js";var e=function(e){this.imageId=e.imageId||null,this.isMain=e.isMain||!1,this.isVideo=e.isVideo||!1,this.order=e.order,this.image=e.image?new i(e.image):null};export{e as IkasProductImage};
1
+ import{__assign as i}from'./../../../../ext/tslib/tslib.es6.js';import{IkasImage as e}from"../../image/index.js";var s=function(s){this.fileName=s.fileName||null,this.imageId=s.imageId||null,this.isMain=s.isMain||!1,this.isVideo=s.isVideo||!1,this.order=s.order,this.image=s.image?new e(i(i({},s.image),{fileName:s.fileName})):null};export{s as IkasProductImage};
@@ -5,7 +5,7 @@ import { IkasProductVariantType } from "./variant-type";
5
5
  import { IkasBrand } from "../brand";
6
6
  import { IkasHTMLMetaData } from "../html-meta-data";
7
7
  import { IkasProductTag } from "./tag";
8
- import { IkasProduct as IProduct, IkasProductType } from "@ikas/storefront-models";
8
+ import { IkasProduct as IProduct, IkasAppliedCampaignOffer, IkasProductType } from "@ikas/storefront-models";
9
9
  import { IkasProductOptionSet } from "./option-set";
10
10
  import { IkasVariantValue } from "../variant-type/variant-value";
11
11
  import { IkasProductCampaign } from "./campaign";
@@ -14,6 +14,11 @@ import { IkasProductAttributeMap } from "./attribute-value";
14
14
  import { IkasProductBaseUnit } from "./base-unit";
15
15
  import { IkasCustomerReviewList } from "../../ui/customer-review-list";
16
16
  import { IkasProductStar } from "./star";
17
+ import { IkasProductCampaignOffer } from "./campaign-offer";
18
+ import { IkasProductOffer } from "./campaign-offer";
19
+ import { IkasProductGroup } from "./group";
20
+ import { IkasProductGroupValue } from "./group/value";
21
+ import { IkasImage } from "../image";
17
22
  export declare class IkasProduct implements IProduct {
18
23
  id: string;
19
24
  name: string;
@@ -34,10 +39,19 @@ export declare class IkasProduct implements IProduct {
34
39
  reviewCount: number | null;
35
40
  stars: IkasProductStar[] | null;
36
41
  groupVariantsByVariantTypeId: string | null;
42
+ dynamicPriceListIds: string[] | null;
43
+ productVolumeDiscountId: string | null;
44
+ campaignOffers: IkasProductCampaignOffer[] | null;
45
+ productGroup: IkasProductGroup | null;
37
46
  productOptionSet?: IkasProductOptionSet | null;
38
47
  campaigns?: IkasProductCampaign[] | null;
39
48
  selectedVariantValues: IkasVariantValue[];
40
49
  isFiltered: boolean;
50
+ isStatic: boolean;
51
+ private bundleProductCache;
52
+ appliedCampaignOffer?: IkasAppliedCampaignOffer;
53
+ offers?: IkasProductOffer[];
54
+ private productGroupItems?;
41
55
  constructor(data?: Partial<IkasProduct>);
42
56
  get hasVariant(): boolean;
43
57
  get hasStock(): boolean;
@@ -53,6 +67,7 @@ export declare class IkasProduct implements IProduct {
53
67
  get isAddToCartEnabled(): boolean;
54
68
  get groupedAttributeValues(): IkasProductAttributeMap[];
55
69
  get selectedVariantUnitPriceText(): string | undefined;
70
+ get displayedProductGroups(): IkasDisplayedProductGroup[];
56
71
  selectVariantValue: (variantValue: IkasVariantValue, disableRoute?: boolean) => void;
57
72
  getVariantUnitPriceText: (variant: IkasProductVariant) => string | undefined;
58
73
  getCampaigns: () => Promise<IkasProductCampaign[] | undefined>;
@@ -62,6 +77,8 @@ export declare class IkasProduct implements IProduct {
62
77
  page?: number;
63
78
  }) => Promise<IkasCustomerReviewList>;
64
79
  getProductOptionSet: () => Promise<boolean>;
80
+ initBundleProducts: () => Promise<void>;
81
+ getBundleProductsOfVariant: (variant: IkasProductVariant) => Promise<void>;
65
82
  private setOptionPrices;
66
83
  }
67
84
  export { IkasProductType };
@@ -75,3 +92,19 @@ export declare type IkasDisplayedVariantType = {
75
92
  variantType: IkasVariantType;
76
93
  displayedVariantValues: IkasDisplayedVariantValue[];
77
94
  };
95
+ export declare type IkasProductGroupItem = {
96
+ productId: string;
97
+ image: IkasImage | null;
98
+ href: string;
99
+ groupValues: IkasProductGroupValue[];
100
+ };
101
+ export declare type IkasDisplayedProductGroup = {
102
+ name: string;
103
+ items: IkasDisplayedProductGroupItem[];
104
+ };
105
+ export declare type IkasDisplayedProductGroupItem = {
106
+ image: IkasImage | null;
107
+ href: string;
108
+ value: string;
109
+ isSelected: boolean;
110
+ };