@ikas/storefront 5.0.0-beta.9 → 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.
- package/build/analytics/analytics.d.ts +4 -0
- package/build/analytics/analytics.js +1 -1
- package/build/analytics/facebookPixel.d.ts +1 -0
- package/build/analytics/facebookPixel.js +1 -1
- package/build/analytics/googleAnalytics.d.ts +1 -0
- package/build/analytics/googleAnalytics.js +1 -1
- package/build/analytics/googleTagManager.d.ts +12 -21
- package/build/analytics/googleTagManager.js +1 -1
- package/build/analytics/head/index.js +1 -1
- package/build/analytics/ikas.d.ts +2 -1
- package/build/analytics/ikas.js +1 -1
- package/build/analytics/tiktokPixel.d.ts +1 -0
- package/build/analytics/tiktokPixel.js +1 -1
- package/build/components/checkout/components/address-form/index.js +1 -1
- package/build/components/checkout/components/address-form/model.d.ts +13 -2
- package/build/components/checkout/components/address-form/model.js +1 -1
- package/build/components/checkout/components/cart-summary/cart-item/bundle-product-item/index.d.ts +7 -0
- package/build/components/checkout/components/cart-summary/cart-item/bundle-product-item/index.js +1 -0
- package/build/components/checkout/components/cart-summary/cart-item/bundle-product-item/style.module.scss.js +1 -0
- package/build/components/checkout/components/cart-summary/cart-item/index.d.ts +1 -0
- package/build/components/checkout/components/cart-summary/cart-item/index.js +1 -1
- package/build/components/checkout/components/cart-summary/cart-item/style.module.scss.js +1 -1
- package/build/components/checkout/components/cart-summary/cart-item/svg/arrow-down.d.ts +2 -0
- package/build/components/checkout/components/cart-summary/cart-item/svg/arrow-down.js +1 -0
- package/build/components/checkout/components/cart-summary/index.d.ts +11 -0
- package/build/components/checkout/components/cart-summary/index.js +1 -1
- package/build/components/checkout/components/cart-summary/style.module.scss.js +1 -1
- package/build/components/checkout/components/credit-card-form/model.js +1 -1
- package/build/components/checkout/components/customer-addresses/index.js +1 -1
- package/build/components/checkout/components/customer-addresses/model.js +1 -1
- package/build/components/checkout/components/customer-addresses/style.module.scss.js +1 -1
- package/build/components/checkout/components/epaykolay-button/index.d.ts +5 -0
- package/build/components/checkout/components/epaykolay-button/index.js +1 -0
- package/build/components/checkout/components/epaykolay-button/style.module.scss.js +1 -0
- package/build/components/checkout/components/error/customer-account-disabled-error/index.d.ts +8 -0
- package/build/components/checkout/components/error/customer-account-disabled-error/index.js +1 -0
- package/build/components/checkout/components/error/customer-login-required-error/index.js +1 -1
- package/build/components/checkout/components/error/index.js +1 -1
- package/build/components/checkout/components/form-item/index.js +1 -1
- package/build/components/checkout/components/form-item/model.js +1 -1
- package/build/components/checkout/components/notification-box/index.d.ts +2 -0
- package/build/components/checkout/components/notification-box/index.js +1 -1
- package/build/components/checkout/components/offer-product/index.js +1 -1
- package/build/components/checkout/components/paypal/index.d.ts +7 -0
- package/build/components/checkout/components/paypal/index.js +1 -0
- package/build/components/checkout/components/paypal/style.module.scss.js +1 -0
- package/build/components/checkout/components/product-files/index.d.ts +7 -0
- package/build/components/checkout/components/product-files/index.js +1 -0
- package/build/components/checkout/components/product-files/style.module.scss.js +1 -0
- package/build/components/checkout/components/quick-registration/model.js +1 -1
- package/build/components/checkout/components/select-box/index.d.ts +1 -0
- package/build/components/checkout/components/select-box/index.js +1 -1
- package/build/components/checkout/components/stripe/index.js +1 -1
- package/build/components/checkout/components/svg/epaykolay.d.ts +6 -0
- package/build/components/checkout/components/svg/epaykolay.js +1 -0
- package/build/components/checkout/components/toggle/index.d.ts +1 -0
- package/build/components/checkout/components/toggle/index.js +1 -1
- package/build/components/checkout/components/toggle/style.module.scss.js +1 -1
- package/build/components/checkout/index.d.ts +2 -0
- package/build/components/checkout/index.js +1 -1
- package/build/components/checkout/model.d.ts +44 -17
- package/build/components/checkout/model.js +1 -1
- package/build/components/checkout/steps/step-payment/index.js +1 -1
- package/build/components/checkout/steps/step-payment/payment-gateways/index.js +1 -1
- package/build/components/checkout/steps/step-payment/style.module.scss.js +1 -1
- package/build/components/checkout/steps/step-shipping/index.js +1 -1
- package/build/components/checkout/steps/step-success/index.js +1 -1
- package/build/components/checkout/steps/step-success/style.module.scss.js +1 -1
- package/build/components/checkout/style.module.scss.js +1 -1
- package/build/components/google-captcha/index.js +1 -1
- package/build/components/link/index.js +1 -1
- package/build/components/page/head.js +1 -1
- package/build/components/page/index.js +1 -1
- package/build/components/page-editor/ThemeComponentEditor.js +1 -1
- package/build/components/page-editor/model.d.ts +1 -0
- package/build/components/page-editor/model.js +1 -1
- package/build/hooks/useCustomerReviews.js +1 -1
- package/build/hooks/useStore.js +1 -1
- package/build/index.js +1 -1
- package/build/models/data/cart/available-shipping-method/estimated-delivery-time/index.d.ts +6 -0
- package/build/models/data/cart/available-shipping-method/estimated-delivery-time/index.js +1 -0
- package/build/models/data/cart/available-shipping-method/index.d.ts +2 -0
- package/build/models/data/cart/available-shipping-method/index.js +1 -1
- package/build/models/data/category/conditions/index.d.ts +21 -0
- package/build/models/data/category/conditions/index.js +1 -0
- package/build/models/data/category/index.d.ts +3 -0
- package/build/models/data/category/index.js +1 -1
- package/build/models/data/checkout/index.d.ts +2 -2
- package/build/models/data/checkout-settings/index.d.ts +2 -1
- package/build/models/data/checkout-settings/index.js +1 -1
- package/build/models/data/checkout-settings/price/index.d.ts +2 -1
- package/build/models/data/checkout-settings/price/index.js +1 -1
- package/build/models/data/contact-form/index.d.ts +1 -0
- package/build/models/data/contact-form/index.js +1 -1
- package/build/models/data/customer/address/ikas-localized-customer-address.d.ts +26 -12
- package/build/models/data/customer/address/ikas-localized-customer-address.js +1 -1
- package/build/models/data/customer/address/index.d.ts +5 -0
- package/build/models/data/customer/address/index.js +1 -1
- package/build/models/data/customer/address/region/index.d.ts +6 -0
- package/build/models/data/customer/address/region/index.js +1 -0
- package/build/models/data/customer/index.d.ts +7 -0
- package/build/models/data/customer/index.js +1 -1
- package/build/models/data/customer/price-list-rule/filter/index.d.ts +7 -0
- package/build/models/data/customer/price-list-rule/filter/index.js +1 -0
- package/build/models/data/customer/price-list-rule/index.d.ts +10 -0
- package/build/models/data/customer/price-list-rule/index.js +1 -0
- package/build/models/data/customer/review/index.d.ts +1 -0
- package/build/models/data/customer/review/index.js +1 -1
- package/build/models/data/favorite-product/index.d.ts +2 -0
- package/build/models/data/favorite-product/index.js +1 -1
- package/build/models/data/filter-category/index.d.ts +4 -0
- package/build/models/data/filter-category/index.js +1 -1
- package/build/models/data/html-meta-data/translations/index.d.ts +1 -0
- package/build/models/data/html-meta-data/translations/index.js +1 -1
- package/build/models/data/image/index.d.ts +1 -0
- package/build/models/data/image/index.js +1 -1
- package/build/models/data/index.d.ts +15 -1
- package/build/models/data/order/address/ikas-localized-order-address.d.ts +48 -18
- package/build/models/data/order/address/ikas-localized-order-address.js +1 -1
- package/build/models/data/order/address/index.d.ts +5 -0
- package/build/models/data/order/address/index.js +1 -1
- package/build/models/data/order/address/region/index.d.ts +6 -0
- package/build/models/data/order/address/region/index.js +1 -0
- package/build/models/data/order/index.d.ts +3 -0
- package/build/models/data/order/index.js +1 -1
- package/build/models/data/order/line-item/index.d.ts +5 -0
- package/build/models/data/order/line-item/index.js +1 -1
- package/build/models/data/order/line-item/variant/bundle-product/bundle-variant/index.d.ts +33 -0
- package/build/models/data/order/line-item/variant/bundle-product/bundle-variant/index.js +1 -0
- package/build/models/data/order/line-item/variant/bundle-product/index.d.ts +15 -0
- package/build/models/data/order/line-item/variant/bundle-product/index.js +1 -0
- package/build/models/data/order/line-item/variant/index.d.ts +4 -0
- package/build/models/data/order/line-item/variant/index.js +1 -1
- package/build/models/data/order/transaction/index.d.ts +1 -0
- package/build/models/data/order/transaction/index.js +1 -1
- package/build/models/data/order/transaction/payment-method-detail/index.d.ts +1 -0
- package/build/models/data/order/transaction/payment-method-detail/index.js +1 -1
- package/build/models/data/product/campaign-offer/index.d.ts +15 -0
- package/build/models/data/product/campaign-offer/index.js +1 -0
- package/build/models/data/product/filter/index.d.ts +2 -0
- package/build/models/data/product/filter/index.js +1 -1
- package/build/models/data/product/group/index.d.ts +11 -0
- package/build/models/data/product/group/index.js +1 -0
- package/build/models/data/product/group/translation/index.d.ts +13 -0
- package/build/models/data/product/group/translation/index.js +1 -0
- package/build/models/data/product/group/value/index.d.ts +7 -0
- package/build/models/data/product/group/value/index.js +1 -0
- package/build/models/data/product/image/index.d.ts +1 -0
- package/build/models/data/product/image/index.js +1 -1
- package/build/models/data/product/index.d.ts +34 -1
- package/build/models/data/product/index.js +1 -1
- package/build/models/data/product/variant/bundle-settings/bundle-product/index.d.ts +28 -0
- package/build/models/data/product/variant/bundle-settings/bundle-product/index.js +1 -0
- package/build/models/data/product/variant/bundle-settings/index.d.ts +8 -0
- package/build/models/data/product/variant/bundle-settings/index.js +1 -0
- package/build/models/data/product/variant/index.d.ts +35 -3
- package/build/models/data/product/variant/index.js +1 -1
- package/build/models/data/product/variant/price/index.d.ts +26 -0
- package/build/models/data/product/variant/price/index.js +1 -1
- package/build/models/data/product/variant/price/product-campaign-price/index.d.ts +6 -0
- package/build/models/data/product/variant/price/product-campaign-price/index.js +1 -0
- package/build/models/data/product-file/index.d.ts +8 -0
- package/build/models/data/product-file/index.js +1 -0
- package/build/models/data/shipping-zone/index.d.ts +9 -0
- package/build/models/data/shipping-zone/index.js +1 -0
- package/build/models/data/shipping-zone/state/city/district/index.d.ts +7 -0
- package/build/models/data/shipping-zone/state/city/district/index.js +1 -0
- package/build/models/data/shipping-zone/state/city/district/region/index.d.ts +6 -0
- package/build/models/data/shipping-zone/state/city/district/region/index.js +1 -0
- package/build/models/data/shipping-zone/state/city/index.d.ts +8 -0
- package/build/models/data/shipping-zone/state/city/index.js +1 -0
- package/build/models/data/shipping-zone/state/index.d.ts +9 -0
- package/build/models/data/shipping-zone/state/index.js +1 -0
- package/build/models/data/storefront/b2b-settings/index.d.ts +8 -0
- package/build/models/data/storefront/b2b-settings/index.js +1 -0
- package/build/models/data/storefront/index-page-seo-setting/index.d.ts +17 -0
- package/build/models/data/storefront/index-page-seo-setting/index.js +1 -0
- package/build/models/data/storefront/index.d.ts +6 -1
- package/build/models/data/storefront/index.js +1 -1
- package/build/models/data/theme-json/component/index.d.ts +2 -0
- package/build/models/data/theme-json/component/index.js +1 -1
- package/build/models/data/theme-json/component/prop/index.d.ts +2 -0
- package/build/models/data/theme-json/component/prop/index.js +1 -1
- package/build/models/data/theme-json/custom-data/index.d.ts +2 -0
- package/build/models/data/theme-json/custom-data/index.js +1 -1
- package/build/models/data/theme-json/index.js +1 -1
- package/build/models/data/video/index.d.ts +11 -0
- package/build/models/data/video/index.js +1 -0
- package/build/models/ui/blog-category-list/index.js +1 -1
- package/build/models/ui/brand-list/index.js +1 -1
- package/build/models/ui/category-list/index.js +1 -1
- package/build/models/ui/customer-review-list/index.js +1 -1
- package/build/models/ui/customer-review-summary-list/index.js +1 -1
- package/build/models/ui/index.d.ts +1 -1
- package/build/models/ui/product-attribute-list/index.js +1 -1
- package/build/models/ui/product-list/index.d.ts +25 -3
- package/build/models/ui/product-list/index.js +1 -1
- package/build/models/ui/raffle-list/index.js +1 -1
- package/build/models/ui/validator/form/account-info.js +1 -1
- package/build/models/ui/validator/form/address.js +1 -1
- package/build/models/ui/validator/form/contact-form.d.ts +6 -0
- package/build/models/ui/validator/form/contact-form.js +1 -1
- package/build/models/ui/validator/form/ikas-address.d.ts +46 -20
- package/build/models/ui/validator/form/ikas-address.js +1 -1
- package/build/models/ui/validator/form/login.d.ts +7 -4
- package/build/models/ui/validator/form/login.js +1 -1
- package/build/models/ui/validator/form/register.d.ts +10 -1
- package/build/models/ui/validator/form/register.js +1 -1
- package/build/page-data-init/index.d.ts +9 -1
- package/build/page-data-init/index.js +1 -1
- package/build/pages/account/activate.d.ts +4 -0
- package/build/pages/account/activate.js +1 -0
- package/build/pages/checkout.js +1 -1
- package/build/pages/home.js +1 -1
- package/build/pages/index.d.ts +1 -0
- package/build/store/base.d.ts +1 -0
- package/build/store/base.js +1 -1
- package/build/store/blog/index.js +1 -1
- package/build/store/brand/index.js +1 -1
- package/build/store/cart/index.d.ts +6 -2
- package/build/store/cart/index.js +1 -1
- package/build/store/category/index.js +1 -1
- package/build/store/checkout/index.d.ts +7 -2
- package/build/store/checkout/index.js +1 -1
- package/build/store/customer/api.d.ts +5 -1
- package/build/store/customer/api.js +1 -1
- package/build/store/customer/index.d.ts +25 -5
- package/build/store/customer/index.js +1 -1
- package/build/store/html-meta-data/index.js +1 -1
- package/build/store/index.d.ts +1 -1
- package/build/store/location/index.d.ts +2 -1
- package/build/store/location/index.js +1 -1
- package/build/store/product/index.d.ts +4 -1
- package/build/store/product/index.js +1 -1
- package/build/utils/constants.js +1 -1
- package/build/utils/helper.d.ts +1 -0
- package/build/utils/helper.js +1 -1
- package/package.json +18 -14
- package/build/analytics/googleUniversal.d.ts +0 -9
- package/build/analytics/googleUniversal.js +0 -1
- package/build/ext/@builder.io/partytown/integration/index.mjs.js +0 -1
- package/build/ext/@builder.io/partytown/react/index.mjs.js +0 -1
- package/build/models/data/checkout/country-settings-model.d.ts +0 -141
- 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
|
|
3
|
+
import { AddressFormItem, LocalizedAddressModel } from "@ikas/localized-address";
|
|
4
4
|
declare type IkasLocalizedOrderAddressConstructorData = {
|
|
5
|
-
countrySettings?:
|
|
5
|
+
countrySettings?: LocalizedAddressModel | null;
|
|
6
6
|
} & IOrderAddress;
|
|
7
7
|
export default class IkasLocalizedOrderAddress extends IkasOrderAddress {
|
|
8
|
-
countrySettings:
|
|
8
|
+
countrySettings: LocalizedAddressModel | null;
|
|
9
9
|
constructor(data?: Partial<IkasLocalizedOrderAddressConstructorData>);
|
|
10
|
-
get
|
|
11
|
-
|
|
12
|
-
|
|
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("
|
|
16
|
-
lastName: import("
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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("
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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 @@
|
|
|
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{
|
|
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
|
+
};
|