@ikas/storefront 2.0.49 → 2.0.51-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/__generated__/global-types.d.ts +17 -2
- package/build/__generated__/global-types.js +1 -1
- package/build/api/checkout/__generated__/getOrder.d.ts +1 -1
- package/build/api/customer/__generated__/createOrderRefundRequest.d.ts +1 -1
- package/build/api/customer/__generated__/getCustomerOrders.d.ts +1 -1
- package/build/api/customer/__generated__/getOrderByEmail.d.ts +1 -1
- package/build/api/customer/__generated__/saveMyCustomer.d.ts +5 -1
- package/build/api/customer/index.js +1 -1
- package/build/api/product-search/index.js +1 -1
- package/build/components/checkout/components/address-form/model.js +1 -1
- package/build/components/checkout/components/cart-summary/index.js +1 -1
- package/build/components/checkout/components/cart-summary/style.module.scss.js +1 -1
- package/build/components/checkout/index.js +1 -1
- package/build/ikas.js +2 -2
- package/build/models/data/image/index.d.ts +2 -1
- package/build/models/data/image/index.js +1 -1
- package/build/models/data/simple-product/index.d.ts +1 -0
- package/build/models/ui/validator/form/account-info.d.ts +2 -0
- package/build/models/ui/validator/form/account-info.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeAutoObservable as e}from"mobx";import{decodeBase64 as t}from"../../../utils/helper.js";import{IkasStorefrontConfig as i}from"../../../storefront/index.js";import"../../../utils/i18n.js";var
|
|
1
|
+
import{makeAutoObservable as e}from"mobx";import{decodeBase64 as t}from"../../../utils/helper.js";import{IkasStorefrontConfig as i}from"../../../storefront/index.js";import"../../../utils/i18n.js";var o=function(){function o(t,i){this.id=t,this.isVideo=i||!1,e(this)}return Object.defineProperty(o.prototype,"editorApiKey",{get:function(){if("undefined"!=typeof window)return window.editorApiKey},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"src",{get:function(){return this.getSrc(1080)},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"thumbnailSrc",{get:function(){return this.getSrc(180)},enumerable:!1,configurable:!0}),o.prototype.getSrc=function(e){if(this.id.includes("/"))return this.isVideo?"".concat(process.env.NEXT_PUBLIC_VIDEO_BASE_URL,"videos/").concat(this.id,"/original.mp4"):"".concat(process.env.NEXT_PUBLIC_IMG_BASE_URL,"images/").concat(this.id,"/image_").concat(e,".webp");var o=t(this.editorApiKey||i.config.apiKey||"");return this.isVideo?"".concat(process.env.NEXT_PUBLIC_VIDEO_BASE_URL,"videos/").concat(o,"/").concat(this.id,"/original.mp4"):"".concat(process.env.NEXT_PUBLIC_IMG_BASE_URL,"images/").concat(o,"/").concat(this.id,"/image_").concat(e,".webp")},o}();export{o as IkasImage};
|
|
@@ -25,6 +25,8 @@ export declare class AccountInfoForm {
|
|
|
25
25
|
set lastName(value: string);
|
|
26
26
|
get phone(): string;
|
|
27
27
|
set phone(value: string);
|
|
28
|
+
get isMarketingAccepted(): boolean;
|
|
29
|
+
set isMarketingAccepted(value: boolean);
|
|
28
30
|
get firstNameErrorMessage(): string | undefined;
|
|
29
31
|
get lastNameErrorMessage(): string | undefined;
|
|
30
32
|
get phoneErrorMessage(): string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as e,__generator as t,__spreadArray as r}from'../../../../ext/tslib/tslib.es6.js';import{makeObservable as s,computed as o,action as i}from"mobx";import{Validator as a}from"../index.js";import{PhoneRule as n,RequiredRule as u}from"../rules/index.js";var
|
|
1
|
+
import{__awaiter as e,__generator as t,__spreadArray as r}from'../../../../ext/tslib/tslib.es6.js';import{makeObservable as s,computed as o,action as i}from"mobx";import{Validator as a}from"../index.js";import{PhoneRule as n,RequiredRule as u}from"../rules/index.js";import{IkasCustomerEmailSubscriptionStatus as l}from"../../../data/customer/index.js";var m=function(){function m(e){var t=this;this.validatorRules=function(e){return void 0===e&&(e=!1),r([new u({model:t.customer,fieldKey:"firstName",valuePath:"firstName",message:t.message.requiredRule}),new u({model:t.customer,fieldKey:"lastName",valuePath:"lastName",message:t.message.requiredRule})],e?[new n({model:t.customer,fieldKey:"phone",valuePath:"phone",message:t.message.phoneRule})]:[],!0)},this.onFirstNameChange=function(e){t.customer.firstName=e},this.onLastNameChange=function(e){t.customer.lastName=e},this.onPhoneChange=function(e){t.customer.phone=e||null,e||t.validator.setRules(t.validatorRules())},s(this,{firstNameErrorMessage:o,lastNameErrorMessage:o,phoneErrorMessage:o,isMarketingAccepted:o,hasError:o,firstName:o,lastName:o,phone:o,validateAll:i,submit:i}),this.customer=e.customer,this.store=e.store,this.message=e.message,this.validator=new a(this.customer,this.validatorRules())}return Object.defineProperty(m.prototype,"hasError",{get:function(){return this.validator.hasError},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"email",{get:function(){return this.customer.email},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"firstName",{get:function(){return this.customer.firstName},set:function(e){this.customer.firstName=e},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"lastName",{get:function(){return this.customer.lastName},set:function(e){this.customer.lastName=e},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"phone",{get:function(){return this.customer.phone||""},set:function(e){this.customer.phone=e},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"isMarketingAccepted",{get:function(){return this.customer.isSubscribed},set:function(e){this.customer.subscriptionStatus=e?l.SUBSCRIBED:l.NOT_SUBSCRIBED},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"firstNameErrorMessage",{get:function(){var e,t;return null===(t=null===(e=this.validator.results)||void 0===e?void 0:e.firstName)||void 0===t?void 0:t.errorMessage},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"lastNameErrorMessage",{get:function(){var e,t;return null===(t=null===(e=this.validator.results)||void 0===e?void 0:e.lastName)||void 0===t?void 0:t.errorMessage},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"phoneErrorMessage",{get:function(){var e,t;return null===(t=null===(e=this.validator.results)||void 0===e?void 0:e.phone)||void 0===t?void 0:t.errorMessage},enumerable:!1,configurable:!0}),m.prototype.validateAll=function(){return this.validator.validateAll()},m.prototype.submit=function(){return e(this,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return e={isFormError:!1,isSuccess:!1},this.phone&&this.validator.setRules(this.validatorRules(!0)),[4,this.validateAll()];case 1:if(t.sent())return e.isFormError=!0,[2,e];t.label=2;case 2:return t.trys.push([2,4,,5]),[4,this.store.customerStore.saveCustomer(this.customer)];case 3:return t.sent()&&(e.isSuccess=!0),[2,e];case 4:return t.sent(),[2,e];case 5:return[2]}}))}))},m}();export{m as AccountInfoForm};
|