@ikas/storefront 2.0.35-alpha.6 → 2.0.35
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 +0 -27
- package/build/__generated__/global-types.js +1 -1
- package/build/_virtual/index.js_commonjs-proxy2.js +1 -1
- package/build/_virtual/index.js_commonjs-proxy3.js +1 -1
- package/build/analytics/analytics.js +1 -1
- package/build/analytics/googleTagManager.d.ts +0 -2
- package/build/analytics/googleTagManager.js +1 -1
- package/build/analytics/head/index.js +1 -1
- package/build/analytics/ikas.js +1 -1
- package/build/api/brand/index.js +1 -1
- package/build/api/category/index.js +1 -1
- package/build/api/checkout/index.js +1 -1
- package/build/api/customer/__generated__/customerLogin.d.ts +0 -7
- package/build/api/customer/__generated__/customerSocialLogin.d.ts +0 -7
- package/build/api/customer/__generated__/getMyCustomer.d.ts +0 -7
- package/build/api/customer/__generated__/registerCustomer.d.ts +1 -9
- package/build/api/customer/__generated__/saveMyCustomer.d.ts +0 -7
- package/build/api/customer/index.d.ts +1 -3
- package/build/api/customer/index.js +1 -1
- package/build/api/customer-review/index.js +1 -1
- package/build/api/customer-review-summary/index.js +1 -1
- package/build/api/favorite-product/index.js +1 -1
- package/build/api/html-meta-data/index.js +1 -1
- package/build/api/merchant/index.js +1 -1
- package/build/api/product-search/index.js +1 -1
- package/build/api/storefront/__generated__/getStorefront.d.ts +0 -2
- package/build/api/storefront/index.js +1 -1
- package/build/components/checkout/components/address-form/model.js +1 -1
- package/build/components/checkout/components/cart-summary/cart-item/index.js +1 -1
- package/build/components/checkout/components/credit-card-form/index.js +1 -1
- package/build/components/checkout/components/customer-addresses/model.js +1 -1
- package/build/components/checkout/index.js +1 -1
- package/build/components/checkout/model.js +1 -1
- package/build/components/checkout/steps/step-success/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.js +1 -1
- package/build/ikas.js +5 -5
- package/build/index.js +1 -1
- package/build/models/data/customer/index.d.ts +0 -2
- package/build/models/data/customer/index.js +1 -1
- package/build/models/data/index.d.ts +0 -4
- package/build/models/data/product/variant/index.js +1 -1
- package/build/models/data/storefront/index.d.ts +0 -2
- package/build/models/data/storefront/index.js +1 -1
- package/build/models/ui/blog-category-list/index.js +1 -1
- package/build/models/ui/blog-list/index.js +1 -1
- package/build/models/ui/brand-list/index.js +1 -1
- package/build/models/ui/category-list/index.js +1 -1
- package/build/models/ui/customer-review-list/index.js +1 -1
- package/build/models/ui/customer-review-summary-list/index.js +1 -1
- package/build/models/ui/product-detail/index.js +1 -1
- 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/address.js +1 -1
- package/build/models/ui/validator/form/raffle-form.js +1 -1
- package/build/models/ui/validator/form/register.d.ts +0 -4
- package/build/models/ui/validator/form/register.js +1 -1
- package/build/pages/404.js +1 -1
- package/build/pages/_slug_/index.js +1 -1
- package/build/pages/account/addresses.js +1 -1
- package/build/pages/account/favorite-products.js +1 -1
- package/build/pages/account/forgot-password.js +1 -1
- package/build/pages/account/index.js +1 -1
- package/build/pages/account/login.js +1 -1
- package/build/pages/account/orders/_id_.js +1 -1
- package/build/pages/account/orders/index.js +1 -1
- package/build/pages/account/raffles.js +1 -1
- package/build/pages/account/recover-password.js +1 -1
- package/build/pages/account/register.js +1 -1
- package/build/pages/blog/_slug_.js +1 -1
- package/build/pages/blog/index.js +1 -1
- package/build/pages/cart.js +1 -1
- package/build/pages/checkout.js +1 -1
- package/build/pages/home.js +1 -1
- package/build/pages/pages/_slug_.js +1 -1
- package/build/pages/raffle/_slug_.js +1 -1
- package/build/pages/raffle/index.js +1 -1
- package/build/pages/search.js +1 -1
- package/build/providers/helpers/raffles.js +1 -1
- package/build/providers/page-data-get.d.ts +0 -2
- package/build/providers/page-data-get.js +1 -1
- package/build/providers/page-data-init.js +1 -1
- package/build/providers/page-data-next.d.ts +0 -12
- package/build/providers/page-data-next.js +1 -1
- package/build/providers/placeholders.js +1 -1
- package/build/providers/prop-value/attribute-list.js +1 -1
- package/build/providers/prop-value/attribute.js +1 -1
- package/build/providers/prop-value/blog-category-list.js +1 -1
- package/build/providers/prop-value/blog-category.js +1 -1
- package/build/providers/prop-value/blog-list.js +1 -1
- package/build/providers/prop-value/blog.js +1 -1
- package/build/providers/prop-value/brand-list.js +1 -1
- package/build/providers/prop-value/brand.js +1 -1
- package/build/providers/prop-value/category-list.js +1 -1
- package/build/providers/prop-value/category.js +1 -1
- package/build/providers/prop-value/custom.js +1 -1
- package/build/providers/prop-value/image-list.js +1 -1
- package/build/providers/prop-value/image.js +1 -1
- package/build/providers/prop-value/link.js +1 -1
- package/build/providers/prop-value/product-detail.js +1 -1
- package/build/providers/prop-value/product-list.js +1 -1
- package/build/providers/prop-value/raffle-list.js +1 -1
- package/build/providers/prop-value/raffle.js +1 -1
- package/build/scripts/generators/types/index.js +1 -1
- package/build/store/base.js +1 -1
- package/build/store/cart.js +1 -1
- package/build/store/customer.d.ts +1 -4
- package/build/store/customer.js +1 -1
- package/build/storefront/index.d.ts +0 -4
- package/build/storefront/index.js +1 -1
- package/package.json +1 -1
- package/build/analytics/googleAnalytics.d.ts +0 -13
- package/build/analytics/googleAnalytics.js +0 -1
- package/build/analytics/googleUniversal.d.ts +0 -8
- package/build/analytics/googleUniversal.js +0 -1
- package/build/api/customer/__generated__/getOrderByEmail.d.ts +0 -615
- package/build/api/customer-attribute/__generated__/listCustomerAttribute.d.ts +0 -44
- package/build/api/customer-attribute/index.d.ts +0 -4
- package/build/api/customer-attribute/index.js +0 -1
- package/build/models/data/customer/attribute-value/index.d.ts +0 -9
- package/build/models/data/customer/attribute-value/index.js +0 -1
- package/build/models/data/customer-attribute/customer-attribute-option/index.d.ts +0 -5
- package/build/models/data/customer-attribute/customer-attribute-option/index.js +0 -1
- package/build/models/data/customer-attribute/customer-attribute-sales-channel/index.d.ts +0 -17
- package/build/models/data/customer-attribute/customer-attribute-sales-channel/index.js +0 -1
- package/build/models/data/customer-attribute/index.d.ts +0 -35
- package/build/models/data/customer-attribute/index.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as e}from'../../ext/tslib/tslib.es6.js';import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-review/index.js";import"mobx";import"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/installment-info/index.js";import"../../models/data/order/index.js";import"../../models/data/order/line-item/index.js";import"../../api/product-option-file/index.js";import"../../models/data/product/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product-attribute/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product-filter/index.js";import"../../models/data/variant-type/variant-value/index.js";import"../../models/data/order-transaction/index.js";import"../../models/data/product-option-set/index.js";import"../../models/data/raffle/index.js";import"../../models/data/product-campaing/campaign/index.js";import"../../models/data/customer-attribute/index.js";import"../../models/data/customer-attribute/customer-attribute-sales-channel/index.js";import"../../models/theme/theme.js";import"../../models/theme/page/index.js";import{IkasThemePageComponent as r}from"../../models/theme/page/component/index.js";import{IkasThemeComponentPropType as s}from"../../models/theme/component/prop/index.js";import"../../models/theme/page/component/prop-value/link.js";import"../../models/ui/brand-list/index.js";import"../../models/ui/blog-list/index.js";import"../../models/ui/blog-category-list/index.js";import"../../models/ui/category-list/index.js";import"../../models/ui/product-detail/index.js";import"../../models/ui/product-list/index.js";import"../../models/ui/product-attribute-detail/index.js";import"../../models/ui/product-attribute-list/index.js";import"../../models/ui/customer-review-list/index.js";import"../../models/ui/customer-review-summary-list/index.js";import"../../models/ui/validator/index.js";import"../../models/ui/validator/rules/index.js";import"../../models/ui/validator/form/login.js";import"../../models/ui/validator/form/address.js";import"../../models/ui/validator/form/register.js";import"../../models/ui/validator/form/contact-form.js";import"../../models/ui/validator/form/forgot-password.js";import"../../models/ui/validator/form/recover-password.js";import"../../models/ui/validator/form/account-info.js";import"../../models/ui/validator/form/raffle-form.js";import"../../models/ui/validator/form/customer-review.js";import"../../models/ui/raffle-list/index.js";import"../../models/theme/settings/index.js";import{IkasThemeCustomData as a}from"../../models/theme/custom-data/index.js";import{IkasBrandListPropValueProvider as i}from"./brand-list.js";import{IkasBrandPropValueProvider as o}from"./brand.js";import{IkasCategoryListPropValueProvider as u}from"./category-list.js";import{IkasCategoryPropValueProvider as n}from"./category.js";import{IkasColorPropValueProvider as c}from"./color.js";import{IkasBooleanPropValueProvider as l}from"./boolean.js";import{IkasTextPropValueProvider as m}from"./text.js";import{IkasImageListPropValueProvider as d}from"./image-list.js";import{IkasImagePropValueProvider as p}from"./image.js";import{IkasLinkPropValueProvider as h}from"./link.js";import{IkasProductDetailPropValueProvider as f}from"./product-detail.js";import{IkasProductListPropValueProvider as v}from"./product-list.js";import{IkasRichTextPropValueProvider as g}from"./rich-text.js";import{IkasBlogPropValueProvider as D}from"./blog.js";import{IkasBlogListPropValueProvider as j}from"./blog-list.js";import{IkasAttributePropValueProvider as V}from"./attribute.js";import{IkasAttributeListPropValueProvider as w}from"./attribute-list.js";import y from'../../ext/lodash/cloneDeep.js';import{IkasBlogCategoryPropValueProvider as b}from"./blog-category.js";import{IkasBlogCategoryListPropValueProvider as x}from"./blog-category-list.js";import{IkasRaffleListPropValueProvider as T}from"./raffle-list.js";import{IkasRafflePropValueProvider as L}from"./raffle.js";import{IkasSliderPropValueProvider as P}from"./slider.js";var R=function(){function R(t,e,r,s,a,i,o){this.value=t,this.customData=e,this.theme=r,this.pageType=s,this.pageDataProvider=a,this.pageSpecificData=i,this.pageParams=o}return R.prototype.getValue=function(){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:if((void 0===this.value||null===this.value)&&this.customData.type!==s.RAFFLE_LIST)return[2,{value:null,customData:this.customData}];e.label=1;case 1:switch(e.trys.push([1,58,,59]),this.customData.type){case s.TEXT:return[3,2];case s.RICH_TEXT:return[3,4];case s.BOOLEAN:return[3,6];case s.BRAND_LIST:return[3,8];case s.BRAND:return[3,10];case s.CATEGORY_LIST:return[3,12];case s.CATEGORY:return[3,14];case s.COLOR:return[3,16];case s.IMAGE_LIST:return[3,18];case s.IMAGE:return[3,20];case s.LINK:case s.LIST_OF_LINK:return[3,22];case s.PRODUCT_DETAIL:return[3,24];case s.PRODUCT_LIST:return[3,26];case s.PRODUCT_ATTRIBUTE:return[3,28];case s.PRODUCT_ATTRIBUTE_LIST:return[3,30];case s.OBJECT:return[3,32];case s.DYNAMIC_LIST:case s.STATIC_LIST:return[3,34];case s.ENUM:return[3,36];case s.CUSTOM:return[3,38];case s.COMPONENT:case s.COMPONENT_LIST:return[3,40];case s.BLOG:return[3,42];case s.BLOG_LIST:return[3,44];case s.BLOG_CATEGORY:return[3,46];case s.BLOG_CATEGORY_LIST:return[3,48];case s.RAFFLE:return[3,50];case s.RAFFLE_LIST:return[3,52];case s.SLIDER:return[3,54]}return[3,56];case 2:return[4,this.getTextValue()];case 3:return t=e.sent(),[3,57];case 4:return[4,this.getRichTextPropValue()];case 5:return t=e.sent(),[3,57];case 6:return[4,this.getBooleanValue()];case 7:return t=e.sent(),[3,57];case 8:return[4,this.getBrandListPropValue()];case 9:return t=e.sent(),[3,57];case 10:return[4,this.getBrandPropValue()];case 11:return t=e.sent(),[3,57];case 12:return[4,this.getCategoryListPropValue()];case 13:return t=e.sent(),[3,57];case 14:return[4,this.getCategoryPropValue()];case 15:return t=e.sent(),[3,57];case 16:return[4,this.getColorPropValue()];case 17:return t=e.sent(),[3,57];case 18:return[4,this.getImageListPropValue()];case 19:return t=e.sent(),[3,57];case 20:return[4,this.getImagePropValue()];case 21:return t=e.sent(),[3,57];case 22:return[4,this.getLinkPropValue()];case 23:return t=e.sent(),[3,57];case 24:return[4,this.getProductDetailPropValue()];case 25:return t=e.sent(),[3,57];case 26:return[4,this.getProductListPropValue()];case 27:return t=e.sent(),[3,57];case 28:return[4,this.getProductAttributePropValue()];case 29:return t=e.sent(),[3,57];case 30:return[4,this.getProductAttributeListPropValue()];case 31:return t=e.sent(),[3,57];case 32:return[4,this.getObjectValue()];case 33:return t=e.sent(),[3,57];case 34:return[4,this.getArrayValue()];case 35:return t=e.sent(),[3,57];case 36:return[4,this.getEnumValue()];case 37:return t=e.sent(),[3,57];case 38:return[4,this.getCustomDataValue()];case 39:return t=e.sent(),[3,57];case 40:return[4,this.getComponentListValue()];case 41:return t=e.sent(),[3,57];case 42:return[4,this.getBlogValue()];case 43:return t=e.sent(),[3,57];case 44:return[4,this.getBlogListValue()];case 45:return t=e.sent(),[3,57];case 46:return[4,this.getBlogCategoryValue()];case 47:return t=e.sent(),[3,57];case 48:return[4,this.getBlogCategoryListValue()];case 49:return t=e.sent(),[3,57];case 50:return[4,this.getRaffleValue()];case 51:return t=e.sent(),[3,57];case 52:return[4,this.getRaffleListValue()];case 53:return t=e.sent(),[3,57];case 54:return[4,this.getSliderValue()];case 55:return t=e.sent(),[3,57];case 56:return[3,57];case 57:return[3,59];case 58:return e.sent(),[2];case 59:return!this.customData.isRequired||void 0!==(null==t?void 0:t.value)&&null!==(null==t?void 0:t.value)?[2,t]:[2]}}))}))},R.prototype.getBooleanValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new l(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},R.prototype.getBrandListPropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new i(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},R.prototype.getBrandPropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new o(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},R.prototype.getCategoryListPropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new u(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},R.prototype.getCategoryPropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new n(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},R.prototype.getColorPropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new c(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},R.prototype.getRichTextPropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new g(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},R.prototype.getImageListPropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new d(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},R.prototype.getImagePropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new p(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},R.prototype.getLinkPropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new h(this.value,this.theme,this.pageDataProvider.linkMetaDataTargetIds).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},R.prototype.getProductDetailPropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new f(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},R.prototype.getProductListPropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new v(this.pageType,this.value,this.pageSpecificData).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},R.prototype.getProductAttributePropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new V(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},R.prototype.getProductAttributeListPropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new w(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},R.prototype.getTextValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new m(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},R.prototype.getObjectValue=function(){return t(this,void 0,void 0,(function(){var t,r,a,i,o,u;return e(this,(function(e){switch(e.label){case 0:t={},r=0,a=this.customData.nestedData||[],e.label=1;case 1:if(!(r<a.length))return[3,4];if(!(i=a[r]).key)return[3,3];if(o=this.value[i.key],i.isRequired&&i.type!==s.RAFFLE_LIST&&null==o)throw new Error("Required data is missing");return[4,new R(o,i,this.theme,this.pageType,this.pageDataProvider,this.pageSpecificData).getValue()];case 2:if(u=e.sent(),i.isRequired&&null==u)throw new Error("Required data is missing");t[i.key]=u,e.label=3;case 3:return r++,[3,1];case 4:return[2,{value:t,customData:this.customData}]}}))}))},R.prototype.getArrayValue=function(){return t(this,void 0,void 0,(function(){var t,r,a,i,o,u;return e(this,(function(e){switch(e.label){case 0:if(!this.value||!Array.isArray(this.value))throw new Error("Incorrect data!");t=[],r=this.customData.nestedData[0],a=0,i=this.value,e.label=1;case 1:if(!(a<i.length))return[3,4];if(o=i[a],r.isRequired&&r.type!==s.RAFFLE_LIST&&null==o)throw new Error("Required data is missing");return[4,new R(o,r,this.theme,this.pageType,this.pageDataProvider,this.pageSpecificData).getValue()];case 2:if(u=e.sent(),r.isRequired&&null==u)throw new Error("Required data is missing");t.push(u),e.label=3;case 3:return a++,[3,1];case 4:return[2,{value:t,customData:this.customData}]}}))}))},R.prototype.getEnumValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){return[2,{value:this.value,customData:this.customData}]}))}))},R.prototype.getCustomDataValue=function(){return t(this,void 0,void 0,(function(){var t,r=this;return e(this,(function(e){switch(e.label){case 0:return(t=this.theme.customData.find((function(t){return t.id===r.customData.customDataId})))?((t=new a(y(t))).isRequired=this.customData.isRequired,[4,new R(this.value,t,this.theme,this.pageType,this.pageDataProvider,this.pageSpecificData).getValue()]):[2,{value:null,customData:this.customData}];case 1:return[2,e.sent()]}}))}))},R.prototype.getComponentListValue=function(){return t(this,void 0,void 0,(function(){var t,s,a=this;return e(this,(function(e){switch(e.label){case 0:return t=this.value?this.value.map((function(t){return new r(t)})):[],s={},[4,Promise.all(t.map((function(t){return a.pageDataProvider.getPageComponentPropValues(t)})))];case 1:return[2,(s.value=e.sent(),s.customData=this.customData,s)]}}))}))},R.prototype.getBlogValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new D(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},R.prototype.getBlogListValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new j(this.pageType,this.value,this.pageSpecificData).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},R.prototype.getBlogCategoryValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new b(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},R.prototype.getBlogCategoryListValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new x(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},R.prototype.getRaffleValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new L(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},R.prototype.getRaffleListValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,(new T).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},R.prototype.getSliderValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new P(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},R}();export{R as IkasCustomPropValueProvider};
|
|
1
|
+
import{__awaiter as t,__generator as e}from'../../ext/tslib/tslib.es6.js';import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-review/index.js";import"mobx";import"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/installment-info/index.js";import"../../models/data/order/index.js";import"../../models/data/order/line-item/index.js";import"../../api/product-option-file/index.js";import"../../models/data/product/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product-attribute/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product-filter/index.js";import"../../models/data/variant-type/variant-value/index.js";import"../../models/data/order-transaction/index.js";import"../../models/data/product-option-set/index.js";import"../../models/data/raffle/index.js";import"../../models/data/product-campaing/campaign/index.js";import"../../models/theme/theme.js";import"../../models/theme/page/index.js";import{IkasThemePageComponent as r}from"../../models/theme/page/component/index.js";import{IkasThemeComponentPropType as s}from"../../models/theme/component/prop/index.js";import"../../models/theme/page/component/prop-value/link.js";import"../../models/ui/brand-list/index.js";import"../../models/ui/blog-list/index.js";import"../../models/ui/blog-category-list/index.js";import"../../models/ui/category-list/index.js";import"../../models/ui/product-detail/index.js";import"../../models/ui/product-list/index.js";import"../../models/ui/product-attribute-detail/index.js";import"../../models/ui/product-attribute-list/index.js";import"../../models/ui/customer-review-list/index.js";import"../../models/ui/customer-review-summary-list/index.js";import"../../models/ui/validator/index.js";import"../../models/ui/validator/rules/index.js";import"../../models/ui/validator/form/login.js";import"../../models/ui/validator/form/address.js";import"../../models/ui/validator/form/register.js";import"../../models/ui/validator/form/contact-form.js";import"../../models/ui/validator/form/forgot-password.js";import"../../models/ui/validator/form/recover-password.js";import"../../models/ui/validator/form/account-info.js";import"../../models/ui/validator/form/raffle-form.js";import"../../models/ui/validator/form/customer-review.js";import"../../models/ui/raffle-list/index.js";import"../../models/theme/settings/index.js";import{IkasThemeCustomData as a}from"../../models/theme/custom-data/index.js";import{IkasBrandListPropValueProvider as i}from"./brand-list.js";import{IkasBrandPropValueProvider as o}from"./brand.js";import{IkasCategoryListPropValueProvider as u}from"./category-list.js";import{IkasCategoryPropValueProvider as n}from"./category.js";import{IkasColorPropValueProvider as c}from"./color.js";import{IkasBooleanPropValueProvider as l}from"./boolean.js";import{IkasTextPropValueProvider as m}from"./text.js";import{IkasImageListPropValueProvider as d}from"./image-list.js";import{IkasImagePropValueProvider as p}from"./image.js";import{IkasLinkPropValueProvider as h}from"./link.js";import{IkasProductDetailPropValueProvider as f}from"./product-detail.js";import{IkasProductListPropValueProvider as v}from"./product-list.js";import{IkasRichTextPropValueProvider as g}from"./rich-text.js";import{IkasBlogPropValueProvider as D}from"./blog.js";import{IkasBlogListPropValueProvider as V}from"./blog-list.js";import{IkasAttributePropValueProvider as j}from"./attribute.js";import{IkasAttributeListPropValueProvider as w}from"./attribute-list.js";import y from'../../ext/lodash/cloneDeep.js';import{IkasBlogCategoryPropValueProvider as b}from"./blog-category.js";import{IkasBlogCategoryListPropValueProvider as x}from"./blog-category-list.js";import{IkasRaffleListPropValueProvider as T}from"./raffle-list.js";import{IkasRafflePropValueProvider as L}from"./raffle.js";import{IkasSliderPropValueProvider as P}from"./slider.js";var R=function(){function R(t,e,r,s,a,i,o){this.value=t,this.customData=e,this.theme=r,this.pageType=s,this.pageDataProvider=a,this.pageSpecificData=i,this.pageParams=o}return R.prototype.getValue=function(){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:if((void 0===this.value||null===this.value)&&this.customData.type!==s.RAFFLE_LIST)return[2,{value:null,customData:this.customData}];e.label=1;case 1:switch(e.trys.push([1,58,,59]),this.customData.type){case s.TEXT:return[3,2];case s.RICH_TEXT:return[3,4];case s.BOOLEAN:return[3,6];case s.BRAND_LIST:return[3,8];case s.BRAND:return[3,10];case s.CATEGORY_LIST:return[3,12];case s.CATEGORY:return[3,14];case s.COLOR:return[3,16];case s.IMAGE_LIST:return[3,18];case s.IMAGE:return[3,20];case s.LINK:case s.LIST_OF_LINK:return[3,22];case s.PRODUCT_DETAIL:return[3,24];case s.PRODUCT_LIST:return[3,26];case s.PRODUCT_ATTRIBUTE:return[3,28];case s.PRODUCT_ATTRIBUTE_LIST:return[3,30];case s.OBJECT:return[3,32];case s.DYNAMIC_LIST:case s.STATIC_LIST:return[3,34];case s.ENUM:return[3,36];case s.CUSTOM:return[3,38];case s.COMPONENT:case s.COMPONENT_LIST:return[3,40];case s.BLOG:return[3,42];case s.BLOG_LIST:return[3,44];case s.BLOG_CATEGORY:return[3,46];case s.BLOG_CATEGORY_LIST:return[3,48];case s.RAFFLE:return[3,50];case s.RAFFLE_LIST:return[3,52];case s.SLIDER:return[3,54]}return[3,56];case 2:return[4,this.getTextValue()];case 3:return t=e.sent(),[3,57];case 4:return[4,this.getRichTextPropValue()];case 5:return t=e.sent(),[3,57];case 6:return[4,this.getBooleanValue()];case 7:return t=e.sent(),[3,57];case 8:return[4,this.getBrandListPropValue()];case 9:return t=e.sent(),[3,57];case 10:return[4,this.getBrandPropValue()];case 11:return t=e.sent(),[3,57];case 12:return[4,this.getCategoryListPropValue()];case 13:return t=e.sent(),[3,57];case 14:return[4,this.getCategoryPropValue()];case 15:return t=e.sent(),[3,57];case 16:return[4,this.getColorPropValue()];case 17:return t=e.sent(),[3,57];case 18:return[4,this.getImageListPropValue()];case 19:return t=e.sent(),[3,57];case 20:return[4,this.getImagePropValue()];case 21:return t=e.sent(),[3,57];case 22:return[4,this.getLinkPropValue()];case 23:return t=e.sent(),[3,57];case 24:return[4,this.getProductDetailPropValue()];case 25:return t=e.sent(),[3,57];case 26:return[4,this.getProductListPropValue()];case 27:return t=e.sent(),[3,57];case 28:return[4,this.getProductAttributePropValue()];case 29:return t=e.sent(),[3,57];case 30:return[4,this.getProductAttributeListPropValue()];case 31:return t=e.sent(),[3,57];case 32:return[4,this.getObjectValue()];case 33:return t=e.sent(),[3,57];case 34:return[4,this.getArrayValue()];case 35:return t=e.sent(),[3,57];case 36:return[4,this.getEnumValue()];case 37:return t=e.sent(),[3,57];case 38:return[4,this.getCustomDataValue()];case 39:return t=e.sent(),[3,57];case 40:return[4,this.getComponentListValue()];case 41:return t=e.sent(),[3,57];case 42:return[4,this.getBlogValue()];case 43:return t=e.sent(),[3,57];case 44:return[4,this.getBlogListValue()];case 45:return t=e.sent(),[3,57];case 46:return[4,this.getBlogCategoryValue()];case 47:return t=e.sent(),[3,57];case 48:return[4,this.getBlogCategoryListValue()];case 49:return t=e.sent(),[3,57];case 50:return[4,this.getRaffleValue()];case 51:return t=e.sent(),[3,57];case 52:return[4,this.getRaffleListValue()];case 53:return t=e.sent(),[3,57];case 54:return[4,this.getSliderValue()];case 55:return t=e.sent(),[3,57];case 56:return[3,57];case 57:return[3,59];case 58:return e.sent(),[2];case 59:return!this.customData.isRequired||void 0!==(null==t?void 0:t.value)&&null!==(null==t?void 0:t.value)?[2,t]:[2]}}))}))},R.prototype.getBooleanValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new l(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},R.prototype.getBrandListPropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new i(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},R.prototype.getBrandPropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new o(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},R.prototype.getCategoryListPropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new u(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},R.prototype.getCategoryPropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new n(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},R.prototype.getColorPropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new c(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},R.prototype.getRichTextPropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new g(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},R.prototype.getImageListPropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new d(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},R.prototype.getImagePropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new p(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},R.prototype.getLinkPropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new h(this.value,this.theme,this.pageDataProvider.linkMetaDataTargetIds).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},R.prototype.getProductDetailPropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new f(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},R.prototype.getProductListPropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new v(this.pageType,this.value,this.pageSpecificData).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},R.prototype.getProductAttributePropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new j(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},R.prototype.getProductAttributeListPropValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new w(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},R.prototype.getTextValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new m(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},R.prototype.getObjectValue=function(){return t(this,void 0,void 0,(function(){var t,r,a,i,o,u;return e(this,(function(e){switch(e.label){case 0:t={},r=0,a=this.customData.nestedData||[],e.label=1;case 1:if(!(r<a.length))return[3,4];if(!(i=a[r]).key)return[3,3];if(o=this.value[i.key],i.isRequired&&i.type!==s.RAFFLE_LIST&&null==o)throw new Error("Required data is missing");return[4,new R(o,i,this.theme,this.pageType,this.pageDataProvider,this.pageSpecificData).getValue()];case 2:if(u=e.sent(),i.isRequired&&null==u)throw new Error("Required data is missing");t[i.key]=u,e.label=3;case 3:return r++,[3,1];case 4:return[2,{value:t,customData:this.customData}]}}))}))},R.prototype.getArrayValue=function(){return t(this,void 0,void 0,(function(){var t,r,a,i,o,u;return e(this,(function(e){switch(e.label){case 0:if(!this.value||!Array.isArray(this.value))throw new Error("Incorrect data!");t=[],r=this.customData.nestedData[0],a=0,i=this.value,e.label=1;case 1:if(!(a<i.length))return[3,4];if(o=i[a],r.isRequired&&r.type!==s.RAFFLE_LIST&&null==o)throw new Error("Required data is missing");return[4,new R(o,r,this.theme,this.pageType,this.pageDataProvider,this.pageSpecificData).getValue()];case 2:if(u=e.sent(),r.isRequired&&null==u)throw new Error("Required data is missing");t.push(u),e.label=3;case 3:return a++,[3,1];case 4:return[2,{value:t,customData:this.customData}]}}))}))},R.prototype.getEnumValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){return[2,{value:this.value,customData:this.customData}]}))}))},R.prototype.getCustomDataValue=function(){return t(this,void 0,void 0,(function(){var t,r=this;return e(this,(function(e){switch(e.label){case 0:return(t=this.theme.customData.find((function(t){return t.id===r.customData.customDataId})))?((t=new a(y(t))).isRequired=this.customData.isRequired,[4,new R(this.value,t,this.theme,this.pageType,this.pageDataProvider,this.pageSpecificData).getValue()]):[2,{value:null,customData:this.customData}];case 1:return[2,e.sent()]}}))}))},R.prototype.getComponentListValue=function(){return t(this,void 0,void 0,(function(){var t,s,a=this;return e(this,(function(e){switch(e.label){case 0:return t=this.value?this.value.map((function(t){return new r(t)})):[],s={},[4,Promise.all(t.map((function(t){return a.pageDataProvider.getPageComponentPropValues(t)})))];case 1:return[2,(s.value=e.sent(),s.customData=this.customData,s)]}}))}))},R.prototype.getBlogValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new D(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},R.prototype.getBlogListValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new V(this.pageType,this.value,this.pageSpecificData).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},R.prototype.getBlogCategoryValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new b(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},R.prototype.getBlogCategoryListValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new x(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},R.prototype.getRaffleValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new L(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},R.prototype.getRaffleListValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,(new T).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},R.prototype.getSliderValue=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,new P(this.value).getValue()];case 1:return[2,{value:t.sent(),customData:this.customData}]}}))}))},R}();export{R as IkasCustomPropValueProvider};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as
|
|
1
|
+
import{__awaiter as o,__generator as t}from'../../ext/tslib/tslib.es6.js';import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-review/index.js";import"mobx";import"../../models/data/html-meta-data/index.js";import{IkasImage as i}from"../../models/data/image/index.js";import"../../models/data/installment-info/index.js";import"../../models/data/order/index.js";import"../../models/data/order/line-item/index.js";import"../../api/product-option-file/index.js";import"../../models/data/product/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product-attribute/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product-filter/index.js";import"../../models/data/variant-type/variant-value/index.js";import"../../models/data/order-transaction/index.js";import"../../models/data/product-option-set/index.js";import"../../models/data/raffle/index.js";import"../../models/data/product-campaing/campaign/index.js";import"../../models/theme/theme.js";import"../../models/theme/page/index.js";import"../../models/theme/component/prop/index.js";import"../../models/theme/page/component/prop-value/link.js";import"../../models/ui/brand-list/index.js";import"../../models/ui/blog-list/index.js";import"../../models/ui/blog-category-list/index.js";import"../../models/ui/category-list/index.js";import"../../models/ui/product-detail/index.js";import"../../models/ui/product-list/index.js";import"../../models/ui/product-attribute-detail/index.js";import"../../models/ui/product-attribute-list/index.js";import"../../models/ui/customer-review-list/index.js";import"../../models/ui/customer-review-summary-list/index.js";import"../../models/ui/validator/index.js";import"../../models/ui/validator/rules/index.js";import"../../models/ui/validator/form/login.js";import"../../models/ui/validator/form/address.js";import"../../models/ui/validator/form/register.js";import"../../models/ui/validator/form/contact-form.js";import"../../models/ui/validator/form/forgot-password.js";import"../../models/ui/validator/form/recover-password.js";import"../../models/ui/validator/form/account-info.js";import"../../models/ui/validator/form/raffle-form.js";import"../../models/ui/validator/form/customer-review.js";import"../../models/ui/raffle-list/index.js";import"../../models/theme/settings/index.js";import"../../models/theme/custom-data/index.js";var e=function(){function e(o){this.imageListPropValue=o}return e.prototype.getValue=function(){return o(this,void 0,void 0,(function(){return t(this,(function(o){return[2,this.imageListPropValue.map((function(o){return new i(o)}))]}))}))},e}();export{e as IkasImageListPropValueProvider};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as
|
|
1
|
+
import{__awaiter as o,__generator as t}from'../../ext/tslib/tslib.es6.js';import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-review/index.js";import"mobx";import"../../models/data/html-meta-data/index.js";import{IkasImage as i}from"../../models/data/image/index.js";import"../../models/data/installment-info/index.js";import"../../models/data/order/index.js";import"../../models/data/order/line-item/index.js";import"../../api/product-option-file/index.js";import"../../models/data/product/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product-attribute/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product-filter/index.js";import"../../models/data/variant-type/variant-value/index.js";import"../../models/data/order-transaction/index.js";import"../../models/data/product-option-set/index.js";import"../../models/data/raffle/index.js";import"../../models/data/product-campaing/campaign/index.js";import"../../models/theme/theme.js";import"../../models/theme/page/index.js";import"../../models/theme/component/prop/index.js";import"../../models/theme/page/component/prop-value/link.js";import"../../models/ui/brand-list/index.js";import"../../models/ui/blog-list/index.js";import"../../models/ui/blog-category-list/index.js";import"../../models/ui/category-list/index.js";import"../../models/ui/product-detail/index.js";import"../../models/ui/product-list/index.js";import"../../models/ui/product-attribute-detail/index.js";import"../../models/ui/product-attribute-list/index.js";import"../../models/ui/customer-review-list/index.js";import"../../models/ui/customer-review-summary-list/index.js";import"../../models/ui/validator/index.js";import"../../models/ui/validator/rules/index.js";import"../../models/ui/validator/form/login.js";import"../../models/ui/validator/form/address.js";import"../../models/ui/validator/form/register.js";import"../../models/ui/validator/form/contact-form.js";import"../../models/ui/validator/form/forgot-password.js";import"../../models/ui/validator/form/recover-password.js";import"../../models/ui/validator/form/account-info.js";import"../../models/ui/validator/form/raffle-form.js";import"../../models/ui/validator/form/customer-review.js";import"../../models/ui/raffle-list/index.js";import"../../models/theme/settings/index.js";import"../../models/theme/custom-data/index.js";var e=function(){function e(o){this.imagePropValue=o}return e.prototype.getValue=function(){return o(this,void 0,void 0,(function(){return t(this,(function(o){return[2,new i(this.imagePropValue)]}))}))},e}();export{e as IkasImagePropValueProvider};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as e,__generator as t}from'../../ext/tslib/tslib.es6.js';import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-review/index.js";import"mobx";import"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/installment-info/index.js";import"../../models/data/order/index.js";import"../../models/data/order/line-item/index.js";import"../../api/product-option-file/index.js";import"../../models/data/product/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product-attribute/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product-filter/index.js";import"../../models/data/variant-type/variant-value/index.js";import"../../models/data/order-transaction/index.js";import"../../models/data/product-option-set/index.js";import"../../models/data/raffle/index.js";import"../../models/data/product-campaing/campaign/index.js";import"../../models/
|
|
1
|
+
import{__awaiter as e,__generator as t}from'../../ext/tslib/tslib.es6.js';import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-review/index.js";import"mobx";import"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/installment-info/index.js";import"../../models/data/order/index.js";import"../../models/data/order/line-item/index.js";import"../../api/product-option-file/index.js";import"../../models/data/product/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product-attribute/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product-filter/index.js";import"../../models/data/variant-type/variant-value/index.js";import"../../models/data/order-transaction/index.js";import"../../models/data/product-option-set/index.js";import"../../models/data/raffle/index.js";import"../../models/data/product-campaing/campaign/index.js";import"../../models/theme/theme.js";import{IkasThemePageType as i}from"../../models/theme/page/index.js";import"../../models/theme/component/prop/index.js";import{IkasLinkType as o}from"../../models/theme/page/component/prop-value/link.js";import"../../models/ui/brand-list/index.js";import"../../models/ui/blog-list/index.js";import"../../models/ui/blog-category-list/index.js";import"../../models/ui/category-list/index.js";import{IkasNavigationLink as a}from"../../models/ui/navigation-link/index.js";import"../../models/ui/product-detail/index.js";import"../../models/ui/product-list/index.js";import"../../models/ui/product-attribute-detail/index.js";import"../../models/ui/product-attribute-list/index.js";import"../../models/ui/customer-review-list/index.js";import"../../models/ui/customer-review-summary-list/index.js";import"../../models/ui/validator/index.js";import"../../models/ui/validator/rules/index.js";import"../../models/ui/validator/form/login.js";import"../../models/ui/validator/form/address.js";import"../../models/ui/validator/form/register.js";import"../../models/ui/validator/form/contact-form.js";import"../../models/ui/validator/form/forgot-password.js";import"../../models/ui/validator/form/recover-password.js";import"../../models/ui/validator/form/account-info.js";import"../../models/ui/validator/form/raffle-form.js";import"../../models/ui/validator/form/customer-review.js";import"../../models/ui/raffle-list/index.js";import"../../models/theme/settings/index.js";import"../../models/theme/custom-data/index.js";var r=function(){function r(e,t,i){this.linkPropValue=e,this.theme=t,this.linkMetaDataTargetIds=i}return r.prototype.getNavigationLink=function(r){var d,s;return e(this,void 0,void 0,(function(){var e,n,m,l,p,u,c,g,j=this;return t(this,(function(t){switch(t.label){case 0:return r.linkType===o.PAGE?r.pageType===i.INDEX?e=new a("/",r.label||"",[]):r.pageType===i.ACCOUNT?e=new a("/account/info",r.label||"",[]):r.pageType===i.ADDRESSES?e=new a("/account/addresses",r.label||"",[]):r.pageType===i.ORDERS?e=new a("/account/orders",r.label||"",[]):r.pageType===i.FAVORITE_PRODUCTS?e=new a("/account/favorite-products",r.label||"",[]):r.pageType===i.LOGIN?e=new a("/account/login",r.label||"",[]):r.pageType===i.REGISTER?e=new a("/account/register",r.label||"",[]):r.pageType===i.FORGOT_PASSWORD?e=new a("/account/forgot-password",r.label||"",[]):r.pageType===i.RECOVER_PASSWORD?e=new a("/account/recover-password",r.label||"",[]):r.pageType===i.BLOG_INDEX?e=new a("/blog",r.label||"",[]):r.pageType===i.CART?e=new a("/cart",r.label||"",[]):r.pageType===i.SEARCH?e=new a("/search",r.label||"",[]):r.pageType===i.CUSTOM?(n=this.theme.pages.find((function(e){return e.id===r.pageId})))&&(e=new a("/pages/"+n.slug,r.label||"",[])):[i.PRODUCT,i.BRAND,i.CATEGORY].includes(r.pageType)?r.itemId&&(e=new a("/",r.label||"",[]),this.linkMetaDataTargetIds.push({type:"DEFAULT",id:r.itemId,navigationLink:e})):[i.BLOG,i.BLOG_CATEGORY].includes(r.pageType)?r.itemId&&(e=new a("/blog/",r.label||"",[]),this.linkMetaDataTargetIds.push({type:"BLOG",id:r.itemId,navigationLink:e})):r.pageType===i.RAFFLE_DETAIL&&r.itemId&&(e=new a("/raffle/",r.label||"",[]),this.linkMetaDataTargetIds.push({type:"RAFFLE",id:r.itemId,navigationLink:e})):r.linkType===o.EXTERNAL&&(e=new a(r.externalLink||"",r.label||"",[],!0)),e?(m=e,[4,Promise.all(r.subLinks.map((function(e){return j.getNavigationLink(e)})))]):[3,2];case 1:return m.subLinks=t.sent(),r.pageComponentId&&r.pageId&&(l=this.theme.pages.find((function(e){return e.id===r.pageId})),p=null===(d=this.theme.headerComponent)||void 0===d?void 0:d.id,u=null===(s=this.theme.footerComponent)||void 0===s?void 0:s.id,c=(null==l?void 0:l.components.filter((function(e){return e.componentId!==p&&e.componentId!==u})))||[],-1!==(g=c.findIndex((function(e){return e.id===r.pageComponentId})))&&(e.href+="#"+g)),[2,e];case 2:return[2,new a("","",[])]}}))}))},r.prototype.getValue=function(){return e(this,void 0,void 0,(function(){var e=this;return t(this,(function(t){switch(t.label){case 0:return Array.isArray(this.linkPropValue)?[4,Promise.all(this.linkPropValue.map((function(t){return e.getNavigationLink(t)})))]:[3,2];case 1:case 3:return[2,t.sent()];case 2:return[4,this.getNavigationLink(this.linkPropValue)]}}))}))},r}();export{r as IkasLinkPropValueProvider};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as i}from'../../ext/tslib/tslib.es6.js';import"../../api/blog/index.js";import"../../api/brand/index.js";import"../../api/cart/index.js";import"../../api/category/index.js";import"../../api/checkout/index.js";import"../../api/city/index.js";import"../../api/country/index.js";import"../../api/customer/index.js";import"../../api/customer-review/index.js";import"../../api/customer-review-summary/index.js";import"../../api/district/index.js";import"../../api/html-meta-data/index.js";import"../../api/merchant/index.js";import{IkasProductSearchAPI as o}from"../../api/product-search/index.js";import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-review/index.js";import"mobx";import"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/installment-info/index.js";import"../../models/data/order/index.js";import"../../models/data/order/line-item/index.js";import"../../api/product-option-file/index.js";import"../../models/data/product/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product-attribute/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product-filter/index.js";import"../../models/data/variant-type/variant-value/index.js";import"../../models/data/order-transaction/index.js";import"../../models/data/product-option-set/index.js";import"../../models/data/raffle/index.js";import"../../models/data/product-campaing/campaign/index.js";import"../../models/
|
|
1
|
+
import{__awaiter as t,__generator as i}from'../../ext/tslib/tslib.es6.js';import"../../api/blog/index.js";import"../../api/brand/index.js";import"../../api/cart/index.js";import"../../api/category/index.js";import"../../api/checkout/index.js";import"../../api/city/index.js";import"../../api/country/index.js";import"../../api/customer/index.js";import"../../api/customer-review/index.js";import"../../api/customer-review-summary/index.js";import"../../api/district/index.js";import"../../api/html-meta-data/index.js";import"../../api/merchant/index.js";import{IkasProductSearchAPI as o}from"../../api/product-search/index.js";import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-review/index.js";import"mobx";import"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/installment-info/index.js";import"../../models/data/order/index.js";import"../../models/data/order/line-item/index.js";import"../../api/product-option-file/index.js";import"../../models/data/product/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product-attribute/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product-filter/index.js";import"../../models/data/variant-type/variant-value/index.js";import"../../models/data/order-transaction/index.js";import"../../models/data/product-option-set/index.js";import"../../models/data/raffle/index.js";import"../../models/data/product-campaing/campaign/index.js";import"../../models/theme/theme.js";import"../../models/theme/page/index.js";import"../../models/theme/component/prop/index.js";import"../../models/theme/page/component/prop-value/link.js";import"../../models/ui/brand-list/index.js";import"../../models/ui/blog-list/index.js";import"../../models/ui/blog-category-list/index.js";import"../../models/ui/category-list/index.js";import{IkasProductDetail as e}from"../../models/ui/product-detail/index.js";import"../../models/ui/product-list/index.js";import"../../models/ui/product-attribute-detail/index.js";import"../../models/ui/product-attribute-list/index.js";import"../../models/ui/customer-review-list/index.js";import"../../models/ui/customer-review-summary-list/index.js";import"../../models/ui/validator/index.js";import"../../models/ui/validator/rules/index.js";import"../../models/ui/validator/form/login.js";import"../../models/ui/validator/form/address.js";import"../../models/ui/validator/form/register.js";import"../../models/ui/validator/form/contact-form.js";import"../../models/ui/validator/form/forgot-password.js";import"../../models/ui/validator/form/recover-password.js";import"../../models/ui/validator/form/account-info.js";import"../../models/ui/validator/form/raffle-form.js";import"../../models/ui/validator/form/customer-review.js";import"../../models/ui/raffle-list/index.js";import"../../models/theme/settings/index.js";import"../../models/theme/custom-data/index.js";import"../../api/apollo.js";import"../../api/favorite-product/index.js";import"../../api/contact-form/index.js";import"../../api/state/index.js";import{IkasProductOptionSetAPI as r}from"../../api/product-option-set/index.js";import"../../api/raffle/index.js";import"../../api/back-in-stock-reminder/index.js";import"../../api/product-campaign/index.js";import{IkasStorefrontConfig as d}from"../../storefront/index.js";import{getPlaceholderProduct as a}from"../placeholders.js";var s=function(){function s(t){this.productDetailPropValue=t}return s.prototype.getValue=function(){var s;return t(this,void 0,void 0,(function(){var t,m,p,l,n,u,c=this;return i(this,(function(i){switch(i.label){case 0:return(null===(s=this.productDetailPropValue)||void 0===s?void 0:s.usePageData)?[2,{productDetailPropValue:this.productDetailPropValue,productDetail:null}]:this.productDetailPropValue.productId?[4,o.searchProducts({productIdList:[this.productDetailPropValue.productId],priceListId:d.priceListId,salesChannelId:d.salesChannelId})]:[2,null];case 1:return(t=i.sent())?(m=t.data).length?(p=m[0]).productOptionSetId?[4,r.list([p.productOptionSetId])]:[3,3]:[3,4]:[3,5];case 2:(null==(l=i.sent())?void 0:l.length)&&(p.productOptionSet=l[0]),i.label=3;case 3:return(null==p?void 0:p.hasVariant)?(n=p.variants.find((function(t){return t.id===c.productDetailPropValue.variantId})))?[2,{productDetailPropValue:this.productDetailPropValue,productDetail:new e(p,n.variantValues)}]:[2,null]:(u=p.variants.find((function(t){return t.isActive})),[2,{productDetailPropValue:this.productDetailPropValue,productDetail:new e(p,(u||p.variants[0]).variantValues)}]);case 4:return[2,{productDetailPropValue:this.productDetailPropValue,productDetail:a()}];case 5:return[2,null]}}))}))},s}();export{s as IkasProductDetailPropValueProvider};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as
|
|
1
|
+
import{__awaiter as t,__generator as i}from'../../ext/tslib/tslib.es6.js';import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-review/index.js";import"mobx";import"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/installment-info/index.js";import"../../models/data/order/index.js";import"../../models/data/order/line-item/index.js";import"../../api/product-option-file/index.js";import"../../models/data/product/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product-attribute/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product-filter/index.js";import"../../models/data/variant-type/variant-value/index.js";import"../../models/data/order-transaction/index.js";import"../../models/data/product-option-set/index.js";import"../../models/data/raffle/index.js";import"../../models/data/product-campaing/campaign/index.js";import"../../models/theme/theme.js";import{IkasThemePageType as e}from"../../models/theme/page/index.js";import"../../models/theme/component/prop/index.js";import"../../models/theme/page/component/prop-value/link.js";import"../../models/ui/brand-list/index.js";import"../../models/ui/blog-list/index.js";import"../../models/ui/blog-category-list/index.js";import"../../models/ui/category-list/index.js";import"../../models/ui/product-detail/index.js";import{IkasProductListType as o,IkasRelatedProductsType as d,IkasProductList as r}from"../../models/ui/product-list/index.js";import"../../models/ui/product-attribute-detail/index.js";import"../../models/ui/product-attribute-list/index.js";import"../../models/ui/customer-review-list/index.js";import"../../models/ui/customer-review-summary-list/index.js";import"../../models/ui/validator/index.js";import"../../models/ui/validator/rules/index.js";import"../../models/ui/validator/form/login.js";import"../../models/ui/validator/form/address.js";import"../../models/ui/validator/form/register.js";import"../../models/ui/validator/form/contact-form.js";import"../../models/ui/validator/form/forgot-password.js";import"../../models/ui/validator/form/recover-password.js";import"../../models/ui/validator/form/account-info.js";import"../../models/ui/validator/form/raffle-form.js";import"../../models/ui/validator/form/customer-review.js";import"../../models/ui/raffle-list/index.js";import"../../models/theme/settings/index.js";import"../../models/theme/custom-data/index.js";var a=function(){function a(t,i,e){this.relatedProductData=null,this.pageType=t,this.productListPropValue=i,this.pageSpecificData=e,this.relatedProductData=null}return a.prototype.getValue=function(){var a,s;return t(this,void 0,void 0,(function(){var t,p,m,l,u;return i(this,(function(i){switch(i.label){case 0:return this.productListPropValue.productListType===o.ALL&&this.productListPropValue.usePageFilter&&(this.pageType===e.CATEGORY?(m=this.pageSpecificData,p=m.id):this.pageType===e.BRAND&&(l=this.pageSpecificData,t=l.id)),this.productListPropValue.productListType===o.CATEGORY&&this.productListPropValue.category&&(p=this.productListPropValue.category),this.pageType===e.PRODUCT&&this.productListPropValue.productListType===o.RELATED_PRODUCTS&&this.productListPropValue.relatedProductsType&&this.pageSpecificData&&(this.relatedProductData={brandIds:null,categoryIds:null,productId:""},this.productListPropValue.relatedProductsType===d.CATEGORY?this.relatedProductData.categoryIds=this.pageSpecificData.product.categories.map((function(t){return t.id})):this.relatedProductData.brandIds=[null===(s=null===(a=this.pageSpecificData.product)||void 0===a?void 0:a.brand)||void 0===s?void 0:s.id],this.relatedProductData.productId=this.pageSpecificData.product.id),[4,(u=new r({productListPropValue:this.productListPropValue,filterBrandId:t,filterCategoryId:p,pageType:this.pageType,pageSpecificData:[e.CATEGORY,e.BRAND].includes(this.pageType)?this.pageSpecificData:void 0,relatedProductData:this.relatedProductData})).getInitial()];case 1:return i.sent(),[2,u]}}))}))},a}();export{a as IkasProductListPropValueProvider};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as
|
|
1
|
+
import{__awaiter as o,__generator as t}from'../../ext/tslib/tslib.es6.js';import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-review/index.js";import"mobx";import"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/installment-info/index.js";import"../../models/data/order/index.js";import"../../models/data/order/line-item/index.js";import"../../api/product-option-file/index.js";import"../../models/data/product/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product-attribute/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product-filter/index.js";import"../../models/data/variant-type/variant-value/index.js";import"../../models/data/order-transaction/index.js";import"../../models/data/product-option-set/index.js";import"../../models/data/raffle/index.js";import"../../models/data/product-campaing/campaign/index.js";import"../../models/theme/theme.js";import"../../models/theme/page/index.js";import"../../models/theme/component/prop/index.js";import"../../models/theme/page/component/prop-value/link.js";import"../../models/ui/brand-list/index.js";import"../../models/ui/blog-list/index.js";import"../../models/ui/blog-category-list/index.js";import"../../models/ui/category-list/index.js";import"../../models/ui/product-detail/index.js";import"../../models/ui/product-list/index.js";import"../../models/ui/product-attribute-detail/index.js";import"../../models/ui/product-attribute-list/index.js";import"../../models/ui/customer-review-list/index.js";import"../../models/ui/customer-review-summary-list/index.js";import"../../models/ui/validator/index.js";import"../../models/ui/validator/rules/index.js";import"../../models/ui/validator/form/login.js";import"../../models/ui/validator/form/address.js";import"../../models/ui/validator/form/register.js";import"../../models/ui/validator/form/contact-form.js";import"../../models/ui/validator/form/forgot-password.js";import"../../models/ui/validator/form/recover-password.js";import"../../models/ui/validator/form/account-info.js";import"../../models/ui/validator/form/raffle-form.js";import"../../models/ui/validator/form/customer-review.js";import{IkasRaffleList as i}from"../../models/ui/raffle-list/index.js";import"../../models/theme/settings/index.js";import"../../models/theme/custom-data/index.js";var e=function(){function e(){}return e.prototype.getValue=function(){return o(this,void 0,void 0,(function(){var o;return t(this,(function(t){switch(t.label){case 0:return[4,(o=new i).getInitial()];case 1:return t.sent(),[2,o]}}))}))},e}();export{e as IkasRaffleListPropValueProvider};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as i,__generator as t}from'../../ext/tslib/tslib.es6.js';import"../../api/blog/index.js";import"../../api/brand/index.js";import"../../api/cart/index.js";import"../../api/category/index.js";import"../../api/checkout/index.js";import"../../api/city/index.js";import"../../api/country/index.js";import"../../api/customer/index.js";import"../../api/customer-review/index.js";import"../../api/customer-review-summary/index.js";import"../../api/district/index.js";import"../../api/html-meta-data/index.js";import"../../api/merchant/index.js";import"../../api/product-search/index.js";import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-review/index.js";import"mobx";import"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/installment-info/index.js";import"../../models/data/order/index.js";import"../../models/data/order/line-item/index.js";import"../../api/product-option-file/index.js";import"../../models/data/product/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product-attribute/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product-filter/index.js";import"../../models/data/variant-type/variant-value/index.js";import"../../models/data/order-transaction/index.js";import"../../models/data/product-option-set/index.js";import"../../models/data/raffle/index.js";import"../../models/data/product-campaing/campaign/index.js";import"../../models/
|
|
1
|
+
import{__awaiter as i,__generator as t}from'../../ext/tslib/tslib.es6.js';import"../../api/blog/index.js";import"../../api/brand/index.js";import"../../api/cart/index.js";import"../../api/category/index.js";import"../../api/checkout/index.js";import"../../api/city/index.js";import"../../api/country/index.js";import"../../api/customer/index.js";import"../../api/customer-review/index.js";import"../../api/customer-review-summary/index.js";import"../../api/district/index.js";import"../../api/html-meta-data/index.js";import"../../api/merchant/index.js";import"../../api/product-search/index.js";import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-review/index.js";import"mobx";import"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/installment-info/index.js";import"../../models/data/order/index.js";import"../../models/data/order/line-item/index.js";import"../../api/product-option-file/index.js";import"../../models/data/product/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product-attribute/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product-filter/index.js";import"../../models/data/variant-type/variant-value/index.js";import"../../models/data/order-transaction/index.js";import"../../models/data/product-option-set/index.js";import"../../models/data/raffle/index.js";import"../../models/data/product-campaing/campaign/index.js";import"../../models/theme/theme.js";import"../../models/theme/page/index.js";import"../../models/theme/component/prop/index.js";import"../../models/theme/page/component/prop-value/link.js";import"../../models/ui/brand-list/index.js";import"../../models/ui/blog-list/index.js";import"../../models/ui/blog-category-list/index.js";import"../../models/ui/category-list/index.js";import"../../models/ui/product-detail/index.js";import"../../models/ui/product-list/index.js";import"../../models/ui/product-attribute-detail/index.js";import"../../models/ui/product-attribute-list/index.js";import"../../models/ui/customer-review-list/index.js";import"../../models/ui/customer-review-summary-list/index.js";import"../../models/ui/validator/index.js";import"../../models/ui/validator/rules/index.js";import"../../models/ui/validator/form/login.js";import"../../models/ui/validator/form/address.js";import"../../models/ui/validator/form/register.js";import"../../models/ui/validator/form/contact-form.js";import"../../models/ui/validator/form/forgot-password.js";import"../../models/ui/validator/form/recover-password.js";import"../../models/ui/validator/form/account-info.js";import"../../models/ui/validator/form/raffle-form.js";import"../../models/ui/validator/form/customer-review.js";import"../../models/ui/raffle-list/index.js";import"../../models/theme/settings/index.js";import"../../models/theme/custom-data/index.js";import"../../api/apollo.js";import"../../api/favorite-product/index.js";import"../../api/contact-form/index.js";import"../../api/state/index.js";import"../../api/product-option-set/index.js";import{IkasRaffleAPI as e}from"../../api/raffle/index.js";import"../../api/back-in-stock-reminder/index.js";import"../../api/product-campaign/index.js";import{getPlaceholderRaffle as o}from"../placeholders.js";import{populateRaffleProducts as r}from"../helpers/raffles.js";var s=function(){function s(i){this.rafflePropValue=i}return s.prototype.getValue=function(){var s;return i(this,void 0,void 0,(function(){var i,d;return t(this,(function(t){switch(t.label){case 0:return(null===(s=this.rafflePropValue)||void 0===s?void 0:s.usePageData)?[2,{raffle:null,rafflePropValue:this.rafflePropValue}]:this.rafflePropValue.raffleId?[4,e.listRaffles({id:this.rafflePropValue.raffleId})]:[2,null];case 1:return(i=t.sent()).raffles.length?(d=i.raffles[0],[4,r([d])]):[2,null];case 2:return t.sent(),[2,{raffle:d||o(),rafflePropValue:this.rafflePropValue}]}}))}))},s}();export{s as IkasRafflePropValueProvider};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as e,__generator as t}from'../../../ext/tslib/tslib.es6.js';import a from"path";import{createFile as s,deleteDirContent as r}from"../../../utils/fs.js";import"../../../models/data/blog/index.js";import"../../../models/data/brand/index.js";import"../../../models/data/category/index.js";import"../../../models/data/checkout/index.js";import"../../../models/data/customer/address/index.js";import"../../../models/data/customer/index.js";import"../../../models/data/customer-review/index.js";import"mobx";import"../../../models/data/html-meta-data/index.js";import"../../../models/data/image/index.js";import"../../../models/data/installment-info/index.js";import"../../../models/data/order/index.js";import"../../../models/data/order/line-item/index.js";import"../../../api/product-option-file/index.js";import"../../../models/data/product/index.js";import"../../../models/data/variant-type/index.js";import"../../../models/data/product/variant/index.js";import"../../../models/data/product/variant/price/index.js";import"../../../models/data/product-attribute/index.js";import"../../../models/data/product/attribute-value/index.js";import"../../../models/data/product-filter/index.js";import"../../../models/data/variant-type/variant-value/index.js";import"../../../models/data/order-transaction/index.js";import"../../../models/data/product-option-set/index.js";import"../../../models/data/raffle/index.js";import"../../../models/data/product-campaing/campaign/index.js";import"../../../models/
|
|
1
|
+
import{__awaiter as e,__generator as t}from'../../../ext/tslib/tslib.es6.js';import a from"path";import{createFile as s,deleteDirContent as r}from"../../../utils/fs.js";import"../../../models/data/blog/index.js";import"../../../models/data/brand/index.js";import"../../../models/data/category/index.js";import"../../../models/data/checkout/index.js";import"../../../models/data/customer/address/index.js";import"../../../models/data/customer/index.js";import"../../../models/data/customer-review/index.js";import"mobx";import"../../../models/data/html-meta-data/index.js";import"../../../models/data/image/index.js";import"../../../models/data/installment-info/index.js";import"../../../models/data/order/index.js";import"../../../models/data/order/line-item/index.js";import"../../../api/product-option-file/index.js";import"../../../models/data/product/index.js";import"../../../models/data/variant-type/index.js";import"../../../models/data/product/variant/index.js";import"../../../models/data/product/variant/price/index.js";import"../../../models/data/product-attribute/index.js";import"../../../models/data/product/attribute-value/index.js";import"../../../models/data/product-filter/index.js";import"../../../models/data/variant-type/variant-value/index.js";import"../../../models/data/order-transaction/index.js";import"../../../models/data/product-option-set/index.js";import"../../../models/data/raffle/index.js";import"../../../models/data/product-campaing/campaign/index.js";import"../../../models/theme/theme.js";import"../../../models/theme/page/index.js";import{IkasThemeComponentPropType as o}from"../../../models/theme/component/prop/index.js";import"../../../models/theme/page/component/prop-value/link.js";import"../../../models/ui/brand-list/index.js";import"../../../models/ui/blog-list/index.js";import"../../../models/ui/blog-category-list/index.js";import"../../../models/ui/category-list/index.js";import"../../../models/ui/product-detail/index.js";import"../../../models/ui/product-list/index.js";import"../../../models/ui/product-attribute-detail/index.js";import"../../../models/ui/product-attribute-list/index.js";import"../../../models/ui/customer-review-list/index.js";import"../../../models/ui/customer-review-summary-list/index.js";import"../../../models/ui/validator/index.js";import"../../../models/ui/validator/rules/index.js";import"../../../models/ui/validator/form/login.js";import"../../../models/ui/validator/form/address.js";import"../../../models/ui/validator/form/register.js";import"../../../models/ui/validator/form/contact-form.js";import"../../../models/ui/validator/form/forgot-password.js";import"../../../models/ui/validator/form/recover-password.js";import"../../../models/ui/validator/form/account-info.js";import"../../../models/ui/validator/form/raffle-form.js";import"../../../models/ui/validator/form/customer-review.js";import"../../../models/ui/raffle-list/index.js";import"../../../models/theme/settings/index.js";import"../../../models/theme/custom-data/index.js";import i from'../../../ext/lodash/uniq.js';var n=function(){function n(){}return n.generate=function(o){return e(this,void 0,void 0,(function(){var e,p,c,d,u,l,k;return t(this,(function(t){switch(t.label){case 0:return[4,r(a.join(process.cwd(),"src","components","__generated__","types"))];case 1:t.sent(),e={content:"",imports:[],internalCustomDatas:[]},t.label=2;case 2:t.trys.push([2,5,,6]),o.customData.forEach((function(t){n.generateAllCustomDataTypes(t,e,o)})),p=0,c=0;do{p=e.internalCustomDatas.length,e.internalCustomDatas.forEach((function(t){n.generateAllCustomDataTypes(t,e,o)})),(c=e.internalCustomDatas.length)!==p&&(e.internalCustomDatas=e.internalCustomDatas.splice(p,c))}while(p!==c);return[4,m.generate(o,e)];case 3:return t.sent(),d=a.join(process.cwd(),"src","components","__generated__"),e.imports=i(e.imports),u="import {\r\n",e.imports.forEach((function(e){u+="\t".concat(e,",\r\n")})),l=(u+='} from "@ikas/storefront"\r\n\r\n')+e.content,[4,s(d,"types.ts",l)];case 4:return[2,t.sent()];case 5:return k=t.sent(),console.log(k),[2,!1];case 6:return[2]}}))}))},n.generateAllCustomDataTypes=function(e,t,a){var s=e.type===o.ENUM,r="export ".concat(s?"enum":"type"," ").concat(n.generateTypeName(e)).concat(s?"":" = ","{ \r\n"),i="};\r\n\r\n";e.type!==o.DYNAMIC_LIST&&e.type!==o.STATIC_LIST||!e.nestedData?e.type===o.ENUM&&e.enumOptions?(t.content+=r,e.enumOptions.forEach((function(e){var a=e.value;e.value&&!isNaN(parseInt(e.value))&&(a="_"+e.value),t.content+='\t"'.concat(a,'" = "').concat(null==e?void 0:e.value,'",'),t.content+="\r\n"})),t.content+=i):(t.content+=r,e.nestedData&&e.nestedData.forEach((function(e){n.genenateCustomDataType(e,t,a),t.content+="\r\n"})),t.content+=i):n.generateAllCustomDataTypes(e.nestedData[0],t,a)},n.genenateCustomDataType=function(e,t,a){var s=n.getType(e,t,a);e.key&&e.key[0].match(/^\d/)&&(e.key="_"+e.key),t.content+="\t".concat(e.key).concat(e.isRequired?"":"?",": ").concat(s).concat([o.DYNAMIC_LIST,o.STATIC_LIST].includes(e.type)?"[]":"").concat(e.type===o.ENUM?",":";")},n.getType=function(e,t,a){var s="";switch(e.type){case o.TEXT:case o.RICH_TEXT:case o.COLOR:s="string";break;case o.BOOLEAN:s="boolean";break;case o.IMAGE:s="IkasImage",t.imports.push(s);break;case o.IMAGE_LIST:s="IkasImage[]",t.imports.push("IkasImage");break;case o.LINK:s="IkasNavigationLink",t.imports.push(s);break;case o.LIST_OF_LINK:s="IkasNavigationLink[]",t.imports.push("IkasNavigationLink");break;case o.PRODUCT_DETAIL:s="IkasProductDetail",t.imports.push(s);break;case o.PRODUCT_LIST:s="IkasProductList",t.imports.push("IkasProductList");break;case o.PRODUCT_ATTRIBUTE:s="IkasProductAttribute",t.imports.push(s);break;case o.PRODUCT_ATTRIBUTE_LIST:s="IkasProductAttribute[]",t.imports.push("IkasProductAttribute");break;case o.BRAND:s="IkasBrand",t.imports.push(s);break;case o.BRAND_LIST:s="IkasBrandList",t.imports.push(s);break;case o.CATEGORY:s="IkasCategory",t.imports.push(s);break;case o.CATEGORY_LIST:s="IkasCategoryList",t.imports.push(s);break;case o.CUSTOM:var r=a.customData.find((function(t){return t.id===e.customDataId}));r&&(s=n.generateTypeName(r));break;case o.COMPONENT:s="IkasComponentRenderer",t.imports.push(s);break;case o.COMPONENT_LIST:s="IkasComponentRenderer[]",t.imports.push("IkasComponentRenderer");break;case o.BLOG:s="IkasBlog",t.imports.push(s);break;case o.BLOG_LIST:s="IkasBlogList",t.imports.push(s);break;case o.BLOG_CATEGORY:s="IkasBlogCategory",t.imports.push(s);break;case o.BLOG_CATEGORY_LIST:s="IkasBlogCategoryList",t.imports.push(s);break;case o.RAFFLE:s="IkasRaffle",t.imports.push(s);break;case o.RAFFLE_LIST:s="IkasRaffleList",t.imports.push(s);break;case o.SLIDER:s="IkasSlider",t.imports.push(s);break;case o.ENUM:s=n.generateTypeName(e),t.content.includes("export enum ".concat(s))||t.internalCustomDatas.push(e);break;case o.OBJECT:s=n.generateTypeName(e);break;case o.DYNAMIC_LIST:case o.STATIC_LIST:e.nestedData&&(e.nestedData[0].type===o.OBJECT||e.nestedData[0].type===o.ENUM?(s=n.generateTypeName(e.nestedData[0]),t.content.includes("export type ".concat(s))||t.internalCustomDatas.push(e.nestedData[0])):s=n.getType(e.nestedData[0],t,a))}return s},n.generateTypeName=function(e){if(e.typescriptName)return e.typescriptName;var t=e.name||"";return(t=(t=t.replace(/\s/g,"")).replace(/\W/g,""))[0].match(/^\d/)&&(t="_"+t),e.type===o.ENUM&&(t+="Enum"),t},n}(),m=function(){function a(){}return a.generate=function(s,r){return e(this,void 0,void 0,(function(){return t(this,(function(e){return s.components.forEach((function(e){e.props.length>0&&"checkout"!==e.id&&(r.content+="export type ".concat(a.generatePropTypeName(e),"Props = {\n"),e.props.forEach((function(e){r.content+="\t".concat(e.name,": ").concat(a.getType(e,s,r),";\n")})),r.content+="};\r\n\r\n")})),[2]}))}))},a.getType=function(e,t,a){var s="";switch(e.type){case o.TEXT:case o.RICH_TEXT:case o.COLOR:s="string";break;case o.BOOLEAN:s="boolean";break;case o.IMAGE:s="IkasImage",a.imports.push(s);break;case o.IMAGE_LIST:s="IkasImage[]",a.imports.push("IkasImage");break;case o.LINK:s="IkasNavigationLink",a.imports.push(s);break;case o.LIST_OF_LINK:s="IkasNavigationLink[]",a.imports.push("IkasNavigationLink");break;case o.PRODUCT_DETAIL:s="IkasProductDetail",a.imports.push(s);break;case o.PRODUCT_LIST:s="IkasProductList",a.imports.push("IkasProductList");break;case o.PRODUCT_ATTRIBUTE:s="IkasProductAttribute",a.imports.push(s);break;case o.PRODUCT_ATTRIBUTE_LIST:s="IkasProductAttribute[]",a.imports.push("IkasProductAttribute");break;case o.BRAND:s="IkasBrand",a.imports.push(s);break;case o.BRAND_LIST:s="IkasBrandList",a.imports.push(s);break;case o.CATEGORY:s="IkasCategory",a.imports.push(s);break;case o.CATEGORY_LIST:s="IkasCategoryList",a.imports.push(s);break;case o.CUSTOM:var r=t.customData.find((function(t){return t.id===e.customDataId}));r&&(s=n.getType(r,a,t),r.type!==o.DYNAMIC_LIST&&r.type!==o.STATIC_LIST||(s+="[]"));break;case o.COMPONENT:s="IkasComponentRenderer",a.imports.push(s);break;case o.COMPONENT_LIST:s="IkasComponentRenderer[]",a.imports.push("IkasComponentRenderer");break;case o.BLOG:s="IkasBlog",a.imports.push(s);break;case o.BLOG_LIST:s="IkasBlogList",a.imports.push(s);break;case o.BLOG_CATEGORY:s="IkasBlogCategory",a.imports.push(s);break;case o.BLOG_CATEGORY_LIST:s="IkasBlogCategoryList",a.imports.push(s);break;case o.RAFFLE:s="IkasRaffle",a.imports.push(s);break;case o.RAFFLE_LIST:s="IkasRaffleList",a.imports.push(s);break;case o.SLIDER:s="IkasSlider",a.imports.push(s)}return s},a.generatePropTypeName=function(e){if(""!==e.displayName){var t=(e.dir||"").split("-"),a="";return t.forEach((function(e,t){return a+=e.charAt(0).toUpperCase()+e.slice(1)})),a[0].match(/^\d/)&&(a="_"+a),a}},a}();export{n as CustomDataTypesGenerator,m as PropTypeGenarator};
|
package/build/store/base.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as o,__generator as
|
|
1
|
+
import{__awaiter as o,__generator as i}from'../ext/tslib/tslib.es6.js';import{configure as t,makeObservable as e,observable as r}from"mobx";import s from'../ext/lodash/sortBy.js';import d from'../ext/lodash/flatten.js';import{IkasCartStore as n}from"./cart.js";import{IkasCustomerStore as m}from"./customer.js";import"../models/data/blog/index.js";import"../models/data/brand/index.js";import"../models/data/category/index.js";import"../models/data/checkout/index.js";import"../models/data/customer/address/index.js";import"../models/data/customer/index.js";import"../models/data/customer-review/index.js";import"../models/data/html-meta-data/index.js";import"../models/data/image/index.js";import"../models/data/installment-info/index.js";import"../models/data/order/index.js";import"../models/data/order/line-item/index.js";import"../api/product-option-file/index.js";import"../models/data/product/index.js";import"../models/data/variant-type/index.js";import"../models/data/product/variant/index.js";import"../models/data/product/variant/price/index.js";import"../models/data/product-attribute/index.js";import"../models/data/product/attribute-value/index.js";import"../models/data/product-filter/index.js";import"../models/data/variant-type/variant-value/index.js";import"../models/data/order-transaction/index.js";import"../models/data/product-option-set/index.js";import"../models/data/raffle/index.js";import"../models/data/product-campaing/campaign/index.js";import"../models/theme/theme.js";import"../models/theme/page/index.js";import"../models/theme/component/prop/index.js";import"../models/theme/page/component/prop-value/link.js";import"../models/ui/brand-list/index.js";import"../models/ui/blog-list/index.js";import"../models/ui/blog-category-list/index.js";import"../models/ui/category-list/index.js";import"../models/ui/product-detail/index.js";import"../models/ui/product-list/index.js";import"../models/ui/product-attribute-detail/index.js";import"../models/ui/product-attribute-list/index.js";import"../models/ui/customer-review-list/index.js";import"../models/ui/customer-review-summary-list/index.js";import"../models/ui/validator/index.js";import"../models/ui/validator/rules/index.js";import"../models/ui/validator/form/login.js";import"../models/ui/validator/form/address.js";import"../models/ui/validator/form/register.js";import"../models/ui/validator/form/contact-form.js";import"../models/ui/validator/form/forgot-password.js";import"../models/ui/validator/form/recover-password.js";import"../models/ui/validator/form/account-info.js";import"../models/ui/validator/form/raffle-form.js";import"../models/ui/validator/form/customer-review.js";import"../models/ui/raffle-list/index.js";import{IkasThemeSettings as a}from"../models/theme/settings/index.js";import"../models/theme/custom-data/index.js";import"../api/blog/index.js";import"../api/brand/index.js";import"../api/cart/index.js";import"../api/category/index.js";import"../api/checkout/index.js";import"../api/city/index.js";import{IkasCountryAPI as p}from"../api/country/index.js";import"../api/customer/index.js";import"../api/customer-review/index.js";import"../api/customer-review-summary/index.js";import"../api/district/index.js";import"../api/html-meta-data/index.js";import"../api/merchant/index.js";import"../api/product-search/index.js";import"../api/apollo.js";import"../api/favorite-product/index.js";import"../api/contact-form/index.js";import"../api/state/index.js";import"../api/product-option-set/index.js";import"../api/raffle/index.js";import"../api/back-in-stock-reminder/index.js";import"../api/product-campaign/index.js";import{IkasStorefrontConfig as l}from"../storefront/index.js";import u from'../ext/uuid/dist/esm-browser/v4.js';t({enforceActions:"never"});var c=function(){function t(){this.currentPageType=null,this.localeOptions=[],this.showLocaleOptions=!1,this.currentCountryCode=null,this.localeChecked=!1,this.settingsSet=!1,this.customerStore=new m(this),this.cartStore=new n(this),e(this,{currentPageType:r,localeOptions:r,showLocaleOptions:r,currentCountryCode:r})}return t.prototype.checkLocalization=function(){return o(this,void 0,void 0,(function(){var o,t,e,r,n,m,a,c;return i(this,(function(i){switch(i.label){case 0:return this.localeChecked?[2]:void 0===typeof window?(console.warn("checkLocalization should be called on the client side!"),[2]):[4,p.getMyCountry()];case 1:return o=i.sent(),t=l.routings.find((function(o){return o.id===l.storefrontRoutingId})),this.currentCountryCode=o,t&&o?(e=!0,r=l.routings.find((function(i){var t;return null===(t=i.countryCodes)||void 0===t?void 0:t.includes(o)})),n=l.routings.find((function(o){var i;return!(null===(i=o.countryCodes)||void 0===i?void 0:i.length)})),r?t.id!==r.id&&(e=!1):n&&t.id!==n.id&&(e=!1),m=d(l.routings.map((function(o){return o.countryCodes||[]}))),[4,p.listCountries(m)]):[3,3];case 2:a=i.sent(),c=[],l.routings.map((function(i){var t;(null===(t=i.countryCodes)||void 0===t?void 0:t.length)?i.countryCodes.forEach((function(t){var e=a.find((function(o){return o.iso2===t}));c.push({id:u(),countryName:(null==e?void 0:e.native)||(null==e?void 0:e.name)||"",iso2:null==e?void 0:e.iso2,iso3:null==e?void 0:e.iso3,routing:i,isRecommended:t===o})})):c.push({id:u(),routing:i,isRecommended:!l.routings.some((function(i){var t;return null===(t=i.countryCodes)||void 0===t?void 0:t.includes(o)}))})})),this.localeOptions=s(c,"countryName"),e||(this.showLocaleOptions=!0),this.localeChecked=!0,i.label=3;case 3:return[2]}}))}))},t.prototype.setLocalization=function(o){o.routing.domain?window.location.replace("https://"+o.routing.domain):window.location.replace(window.location.origin+(o.routing.path?"/"+o.routing.path:""))},t.prototype.setSettings=function(o){this.settingsSet||new a(JSON.parse(o)).colors.map((function(o){return document.documentElement.style.setProperty(o.key,o.color)}))},t}();export{c as IkasBaseStore};
|
package/build/store/cart.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as e}from'../ext/tslib/tslib.es6.js';import"../api/blog/index.js";import"../api/brand/index.js";import{IkasCartAPI as i}from"../api/cart/index.js";import"../api/category/index.js";import{IkasCheckoutAPI as o}from"../api/checkout/index.js";import"../api/city/index.js";import"../api/country/index.js";import"../api/customer/index.js";import"../api/customer-review/index.js";import"../api/customer-review-summary/index.js";import"../api/district/index.js";import"../api/html-meta-data/index.js";import"../api/merchant/index.js";import"../api/product-search/index.js";import"../models/data/blog/index.js";import"../models/data/brand/index.js";import"../models/data/category/index.js";import"../models/data/checkout/index.js";import"../models/data/customer/address/index.js";import"../models/data/customer/index.js";import"../models/data/customer-review/index.js";import{makeAutoObservable as r}from"mobx";import"../models/data/html-meta-data/index.js";import"../models/data/image/index.js";import"../models/data/installment-info/index.js";import"../models/data/order/index.js";import"../models/data/order/line-item/index.js";import"../api/product-option-file/index.js";import"../models/data/product/index.js";import"../models/data/variant-type/index.js";import"../models/data/product/variant/index.js";import"../models/data/product/variant/price/index.js";import"../models/data/product-attribute/index.js";import"../models/data/product/attribute-value/index.js";import"../models/data/product-filter/index.js";import"../models/data/variant-type/variant-value/index.js";import"../models/data/order-transaction/index.js";import"../models/data/product-option-set/index.js";import"../models/data/raffle/index.js";import"../models/data/product-campaing/campaign/index.js";import"../models/data/customer-attribute/index.js";import"../models/data/customer-attribute/customer-attribute-sales-channel/index.js";import"../models/theme/theme.js";import"../models/theme/page/index.js";import"../models/theme/component/prop/index.js";import"../models/theme/page/component/prop-value/link.js";import"../models/ui/brand-list/index.js";import"../models/ui/blog-list/index.js";import"../models/ui/blog-category-list/index.js";import"../models/ui/category-list/index.js";import"../models/ui/product-detail/index.js";import"../models/ui/product-list/index.js";import"../models/ui/product-attribute-detail/index.js";import"../models/ui/product-attribute-list/index.js";import"../models/ui/customer-review-list/index.js";import"../models/ui/customer-review-summary-list/index.js";import"../models/ui/validator/index.js";import"../models/ui/validator/rules/index.js";import"../models/ui/validator/form/login.js";import"../models/ui/validator/form/address.js";import"../models/ui/validator/form/register.js";import"../models/ui/validator/form/contact-form.js";import"../models/ui/validator/form/forgot-password.js";import"../models/ui/validator/form/recover-password.js";import"../models/ui/validator/form/account-info.js";import"../models/ui/validator/form/raffle-form.js";import"../models/ui/validator/form/customer-review.js";import"../models/ui/raffle-list/index.js";import"../models/theme/settings/index.js";import"../models/theme/custom-data/index.js";import"../api/apollo.js";import"../api/favorite-product/index.js";import"../api/contact-form/index.js";import"../api/state/index.js";import"../api/product-option-set/index.js";import"../api/raffle/index.js";import"../api/back-in-stock-reminder/index.js";import"../api/product-campaign/index.js";import{Analytics as n}from"../analytics/analytics.js";import"../analytics/head/index.js";import{IkasStorefrontConfig as a}from"../storefront/index.js";import{IkasProductCartLineOption as s}from"../models/data/product-cart-item-options/index.js";var d="cartId",c="checkoutId",u=function(){function d(d){var c=this;this.cart=null,this._checkoutId=null,this._isLoadingCart=!1,this._cartLoadFinished=!1,this.addItem=function(o,r,s){return void 0===s&&(s=1),t(c,void 0,void 0,(function(){var t,d,c,u,l,m,p,h,v,f,j,I,g;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,5,,6]),r.canAddToCart?[4,this.beforeCartOperationCheck()]:[2,!1];case 1:return e.sent(),this.cart&&(t=this.findExistingItem(o,r))?(null===(v=r.productOptionSet)||void 0===v||v.initOptionValues(),[2,this.changeItemQuantity(t,t.quantity+1)]):(d=this.getOptionValues(r),c=(null===(f=this.cart)||void 0===f?void 0:f.id)||localStorage.getItem("cartId"),u={cartId:c,customerId:(null===(j=this.cart)||void 0===j?void 0:j.customerId)||(null===(I=this.baseStore.customerStore.customer)||void 0===I?void 0:I.id)||null,item:{id:null,quantity:s,variant:{id:o.id,name:r.name}},options:d.length?d:null,priceListId:a.priceListId||null,salesChannelId:a.salesChannelId,storefrontId:a.storefrontId,storefrontRoutingId:a.storefrontRoutingId,storefrontThemeId:a.storefrontThemeId},[4,i.saveItemToCart(u)]);case 2:return(l=e.sent())?[4,this.setCart(l)]:[3,4];case 3:e.sent(),e.label=4;case 4:return this.cart&&(m="".concat(this.cart.id,"-").concat(this.cart.updatedAt),(p=this.cart.items.find((function(t){return t.variant.id})))&&n.addToCart(p,s,m,this.cart)),null===(g=r.productOptionSet)||void 0===g||g.initOptionValues(),[2,!0];case 5:return h=e.sent(),console.log(h),[2,!1];case 6:return[2]}}))}))},this.changeItemQuantity=function(o,r){return t(c,void 0,void 0,(function(){var t,s,d,c,u,l,m,p;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,5,,6]),[4,this.beforeCartOperationCheck()];case 1:return e.sent(),t={cartId:(null===(l=this.cart)||void 0===l?void 0:l.id)||null,customerId:(null===(m=this.cart)||void 0===m?void 0:m.customerId)||(null===(p=this.baseStore.customerStore.customer)||void 0===p?void 0:p.id)||null,item:{id:o.id,quantity:r,variant:{id:o.variant.id,name:o.variant.name}},options:this.createCartLineOptions(o),priceListId:a.priceListId||null,salesChannelId:a.salesChannelId,storefrontId:a.storefrontId,storefrontRoutingId:a.storefrontRoutingId,storefrontThemeId:a.storefrontThemeId},[4,i.saveItemToCart(t)];case 2:return(s=e.sent())?[4,this.setCart(s)]:[3,4];case 3:e.sent(),e.label=4;case 4:return this.removeCardIfEmpty(),this.cart&&(d="".concat(this.cart.id,"-").concat(this.cart.updatedAt),(c=o.quantity)>r?n.removeFromCart(o,c-r,this.cart):n.addToCart(o,r-c,d,this.cart)),[2,!0];case 5:return u=e.sent(),console.log(u),[2,!1];case 6:return[2]}}))}))},this.removeItem=function(i){return t(c,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,this.changeItemQuantity(i,0)];case 1:return t.sent(),[2]}}))}))},this.removeCart=function(){localStorage.removeItem("cartId"),localStorage.removeItem("checkoutId"),c.cart=void 0,c._checkoutId=void 0},this.waitUntilInitialized=function(){return new Promise((function(t){var e=setInterval((function(){c.cartLoadFinished&&(clearInterval(e),t(null))}),100)}))},this.findExistingItem=function(t,e){var i,o,r,n,a;if(!e.productOptionSetId)return null===(i=c.cart)||void 0===i?void 0:i.items.find((function(e){return e.variant.id===t.id}));for(var s=c.getOptionValues(e),d=(null===(o=c.cart)||void 0===o?void 0:o.items.filter((function(e){var i;return e.variant.id===t.id&&(null===(i=e.options)||void 0===i?void 0:i.length)===s.length})))||[],u=0,l=d;u<l.length;u++){var m=l[u];if(m.options){for(var p=!0,h=function(t){var i=t.values.map((function(t){return t.value})),o=null===(a=null===(n=null===(r=e.productOptionSet)||void 0===r?void 0:r.options)||void 0===n?void 0:n.find((function(e){return e.id===t.productOptionId})))||void 0===a?void 0:a.values;if(!(p=p&&i.length===(null==o?void 0:o.length)&&i.every((function(t){return null==o?void 0:o.includes(t)}))))return"break"},v=0,f=m.options;v<f.length;v++){if("break"===h(f[v]))break}if(p)return m}}},this.removeCardIfEmpty=function(){var t;0===(null===(t=c.cart)||void 0===t?void 0:t.itemCount)&&c.removeCart()},this.getCart=function(){return t(c,void 0,void 0,(function(){var t,o,r,n,a,s;return e(this,(function(e){switch(e.label){case 0:if(!("undefined"!=typeof localStorage))return[2];e.label=1;case 1:return e.trys.push([1,6,7,8]),this._isLoadingCart=!0,t=null===(a=this.baseStore.customerStore.customer)||void 0===a?void 0:a.id,(o=(null===(s=this.cart)||void 0===s?void 0:s.id)||localStorage.getItem("cartId"))||t?[4,i.getCart(o||void 0)]:[2];case 2:return(r=e.sent())?[4,this.setCart(r)]:[3,4];case 3:return e.sent(),[3,5];case 4:this.removeCart(),e.label=5;case 5:return[3,8];case 6:return n=e.sent(),console.log(n),[3,8];case 7:return this._isLoadingCart=!1,this._cartLoadFinished=!0,[7];case 8:return[2]}}))}))},this.setCart=function(i){return t(c,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return localStorage.setItem("cartId",i.id),this.cart=i,this._checkoutId||(this._checkoutId=localStorage.getItem("checkoutId")||void 0),this._checkoutId?[3,2]:[4,o.getCheckoutId(i.id)];case 1:t=e.sent(),this._checkoutId=t,t&&localStorage.setItem("checkoutId",t),e.label=2;case 2:return[2]}}))}))},this.beforeCartOperationCheck=function(){return t(c,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return t=localStorage.getItem("cartId"),!this.cart||t?[3,1]:(this.removeCart(),[3,3]);case 1:return this.cart||!t?[3,3]:[4,this.getCart()];case 2:e.sent(),e.label=3;case 3:return[2]}}))}))},this.createCartLineOptions=function(t){if(t&&t.options){for(var e=[],i=0,o=t.options;i<o.length;i++){var r=o[i],n=new s({});n.productOptionId=r.productOptionId,n.productOptionsSetId=r.productOptionsSetId,n.values=r.values.map((function(t){return t.value})),e.push(n)}return e}return null},this.getOptionValues=function(t){var e,i=[];return null===(e=t.productOptionSet)||void 0===e||e.options.forEach((function(t){t.values.length&&i.push(new s({productOptionId:t.id,productOptionsSetId:t.productOptionSetId,values:t.values}))})),i},this.baseStore=d,r(this)}return Object.defineProperty(d.prototype,"isLoadingCart",{get:function(){return this._isLoadingCart},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"cartLoadFinished",{get:function(){return this._cartLoadFinished},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"checkoutId",{get:function(){return this._checkoutId},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"checkoutUrl",{get:function(){if(this._checkoutId)return"/checkout?id=".concat(this._checkoutId,"&step=info")},enumerable:!1,configurable:!0}),d}();export{d as CART_LS_KEY,c as CHECKOUT_LS_KEY,u as IkasCartStore};
|
|
1
|
+
import{__awaiter as t,__generator as e}from'../ext/tslib/tslib.es6.js';import"../api/blog/index.js";import"../api/brand/index.js";import{IkasCartAPI as i}from"../api/cart/index.js";import"../api/category/index.js";import{IkasCheckoutAPI as o}from"../api/checkout/index.js";import"../api/city/index.js";import"../api/country/index.js";import"../api/customer/index.js";import"../api/customer-review/index.js";import"../api/customer-review-summary/index.js";import"../api/district/index.js";import"../api/html-meta-data/index.js";import"../api/merchant/index.js";import"../api/product-search/index.js";import"../models/data/blog/index.js";import"../models/data/brand/index.js";import"../models/data/category/index.js";import"../models/data/checkout/index.js";import"../models/data/customer/address/index.js";import"../models/data/customer/index.js";import"../models/data/customer-review/index.js";import{makeAutoObservable as r}from"mobx";import"../models/data/html-meta-data/index.js";import"../models/data/image/index.js";import"../models/data/installment-info/index.js";import"../models/data/order/index.js";import"../models/data/order/line-item/index.js";import"../api/product-option-file/index.js";import"../models/data/product/index.js";import"../models/data/variant-type/index.js";import"../models/data/product/variant/index.js";import"../models/data/product/variant/price/index.js";import"../models/data/product-attribute/index.js";import"../models/data/product/attribute-value/index.js";import"../models/data/product-filter/index.js";import"../models/data/variant-type/variant-value/index.js";import"../models/data/order-transaction/index.js";import"../models/data/product-option-set/index.js";import"../models/data/raffle/index.js";import"../models/data/product-campaing/campaign/index.js";import"../models/theme/theme.js";import"../models/theme/page/index.js";import"../models/theme/component/prop/index.js";import"../models/theme/page/component/prop-value/link.js";import"../models/ui/brand-list/index.js";import"../models/ui/blog-list/index.js";import"../models/ui/blog-category-list/index.js";import"../models/ui/category-list/index.js";import"../models/ui/product-detail/index.js";import"../models/ui/product-list/index.js";import"../models/ui/product-attribute-detail/index.js";import"../models/ui/product-attribute-list/index.js";import"../models/ui/customer-review-list/index.js";import"../models/ui/customer-review-summary-list/index.js";import"../models/ui/validator/index.js";import"../models/ui/validator/rules/index.js";import"../models/ui/validator/form/login.js";import"../models/ui/validator/form/address.js";import"../models/ui/validator/form/register.js";import"../models/ui/validator/form/contact-form.js";import"../models/ui/validator/form/forgot-password.js";import"../models/ui/validator/form/recover-password.js";import"../models/ui/validator/form/account-info.js";import"../models/ui/validator/form/raffle-form.js";import"../models/ui/validator/form/customer-review.js";import"../models/ui/raffle-list/index.js";import"../models/theme/settings/index.js";import"../models/theme/custom-data/index.js";import"../api/apollo.js";import"../api/favorite-product/index.js";import"../api/contact-form/index.js";import"../api/state/index.js";import"../api/product-option-set/index.js";import"../api/raffle/index.js";import"../api/back-in-stock-reminder/index.js";import"../api/product-campaign/index.js";import{Analytics as n}from"../analytics/analytics.js";import"../analytics/head/index.js";import{IkasStorefrontConfig as a}from"../storefront/index.js";import{IkasProductCartLineOption as s}from"../models/data/product-cart-item-options/index.js";var d="cartId",c="checkoutId",u=function(){function d(d){var c=this;this.cart=null,this._checkoutId=null,this._isLoadingCart=!1,this._cartLoadFinished=!1,this.addItem=function(o,r,s){return void 0===s&&(s=1),t(c,void 0,void 0,(function(){var t,d,c,u,l,m,p,h,v,f,j,I,g;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,5,,6]),r.canAddToCart?[4,this.beforeCartOperationCheck()]:[2,!1];case 1:return e.sent(),this.cart&&(t=this.findExistingItem(o,r))?(null===(v=r.productOptionSet)||void 0===v||v.initOptionValues(),[2,this.changeItemQuantity(t,t.quantity+1)]):(d=this.getOptionValues(r),c=(null===(f=this.cart)||void 0===f?void 0:f.id)||localStorage.getItem("cartId"),u={cartId:c,customerId:(null===(j=this.cart)||void 0===j?void 0:j.customerId)||(null===(I=this.baseStore.customerStore.customer)||void 0===I?void 0:I.id)||null,item:{id:null,quantity:s,variant:{id:o.id,name:r.name}},options:d.length?d:null,priceListId:a.priceListId||null,salesChannelId:a.salesChannelId,storefrontId:a.storefrontId,storefrontRoutingId:a.storefrontRoutingId,storefrontThemeId:a.storefrontThemeId},[4,i.saveItemToCart(u)]);case 2:return(l=e.sent())?[4,this.setCart(l)]:[3,4];case 3:e.sent(),e.label=4;case 4:return this.cart&&(m="".concat(this.cart.id,"-").concat(this.cart.updatedAt),(p=this.cart.items.find((function(t){return t.variant.id})))&&n.addToCart(p,s,m,this.cart)),null===(g=r.productOptionSet)||void 0===g||g.initOptionValues(),[2,!0];case 5:return h=e.sent(),console.log(h),[2,!1];case 6:return[2]}}))}))},this.changeItemQuantity=function(o,r){return t(c,void 0,void 0,(function(){var t,s,d,c,u,l,m,p;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,5,,6]),[4,this.beforeCartOperationCheck()];case 1:return e.sent(),t={cartId:(null===(l=this.cart)||void 0===l?void 0:l.id)||null,customerId:(null===(m=this.cart)||void 0===m?void 0:m.customerId)||(null===(p=this.baseStore.customerStore.customer)||void 0===p?void 0:p.id)||null,item:{id:o.id,quantity:r,variant:{id:o.variant.id,name:o.variant.name}},options:this.createCartLineOptions(o),priceListId:a.priceListId||null,salesChannelId:a.salesChannelId,storefrontId:a.storefrontId,storefrontRoutingId:a.storefrontRoutingId,storefrontThemeId:a.storefrontThemeId},[4,i.saveItemToCart(t)];case 2:return(s=e.sent())?[4,this.setCart(s)]:[3,4];case 3:e.sent(),e.label=4;case 4:return this.removeCardIfEmpty(),this.cart&&(d="".concat(this.cart.id,"-").concat(this.cart.updatedAt),(c=o.quantity)>r?n.removeFromCart(o,c-r,this.cart):n.addToCart(o,r-c,d,this.cart)),[2,!0];case 5:return u=e.sent(),console.log(u),[2,!1];case 6:return[2]}}))}))},this.removeItem=function(i){return t(c,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,this.changeItemQuantity(i,0)];case 1:return t.sent(),[2]}}))}))},this.removeCart=function(){localStorage.removeItem("cartId"),localStorage.removeItem("checkoutId"),c.cart=void 0,c._checkoutId=void 0},this.waitUntilInitialized=function(){return new Promise((function(t){var e=setInterval((function(){c.cartLoadFinished&&(clearInterval(e),t(null))}),100)}))},this.findExistingItem=function(t,e){var i,o,r,n,a;if(!e.productOptionSetId)return null===(i=c.cart)||void 0===i?void 0:i.items.find((function(e){return e.variant.id===t.id}));for(var s=c.getOptionValues(e),d=(null===(o=c.cart)||void 0===o?void 0:o.items.filter((function(e){var i;return e.variant.id===t.id&&(null===(i=e.options)||void 0===i?void 0:i.length)===s.length})))||[],u=0,l=d;u<l.length;u++){var m=l[u];if(m.options){for(var p=!0,h=function(t){var i=t.values.map((function(t){return t.value})),o=null===(a=null===(n=null===(r=e.productOptionSet)||void 0===r?void 0:r.options)||void 0===n?void 0:n.find((function(e){return e.id===t.productOptionId})))||void 0===a?void 0:a.values;if(!(p=p&&i.length===(null==o?void 0:o.length)&&i.every((function(t){return null==o?void 0:o.includes(t)}))))return"break"},v=0,f=m.options;v<f.length;v++){if("break"===h(f[v]))break}if(p)return m}}},this.removeCardIfEmpty=function(){var t;0===(null===(t=c.cart)||void 0===t?void 0:t.itemCount)&&c.removeCart()},this.getCart=function(){return t(c,void 0,void 0,(function(){var t,o,r,n,a,s;return e(this,(function(e){switch(e.label){case 0:if(!("undefined"!=typeof localStorage))return[2];e.label=1;case 1:return e.trys.push([1,6,7,8]),this._isLoadingCart=!0,t=null===(a=this.baseStore.customerStore.customer)||void 0===a?void 0:a.id,(o=(null===(s=this.cart)||void 0===s?void 0:s.id)||localStorage.getItem("cartId"))||t?[4,i.getCart(o||void 0)]:[2];case 2:return(r=e.sent())?[4,this.setCart(r)]:[3,4];case 3:return e.sent(),[3,5];case 4:this.removeCart(),e.label=5;case 5:return[3,8];case 6:return n=e.sent(),console.log(n),[3,8];case 7:return this._isLoadingCart=!1,this._cartLoadFinished=!0,[7];case 8:return[2]}}))}))},this.setCart=function(i){return t(c,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return localStorage.setItem("cartId",i.id),this.cart=i,this._checkoutId||(this._checkoutId=localStorage.getItem("checkoutId")||void 0),this._checkoutId?[3,2]:[4,o.getCheckoutId(i.id)];case 1:t=e.sent(),this._checkoutId=t,t&&localStorage.setItem("checkoutId",t),e.label=2;case 2:return[2]}}))}))},this.beforeCartOperationCheck=function(){return t(c,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return t=localStorage.getItem("cartId"),!this.cart||t?[3,1]:(this.removeCart(),[3,3]);case 1:return this.cart||!t?[3,3]:[4,this.getCart()];case 2:e.sent(),e.label=3;case 3:return[2]}}))}))},this.createCartLineOptions=function(t){if(t&&t.options){for(var e=[],i=0,o=t.options;i<o.length;i++){var r=o[i],n=new s({});n.productOptionId=r.productOptionId,n.productOptionsSetId=r.productOptionsSetId,n.values=r.values.map((function(t){return t.value})),e.push(n)}return e}return null},this.getOptionValues=function(t){var e,i=[];return null===(e=t.productOptionSet)||void 0===e||e.options.forEach((function(t){t.values.length&&i.push(new s({productOptionId:t.id,productOptionsSetId:t.productOptionSetId,values:t.values}))})),i},this.baseStore=d,r(this)}return Object.defineProperty(d.prototype,"isLoadingCart",{get:function(){return this._isLoadingCart},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"cartLoadFinished",{get:function(){return this._cartLoadFinished},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"checkoutId",{get:function(){return this._checkoutId},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"checkoutUrl",{get:function(){if(this._checkoutId)return"/checkout?id=".concat(this._checkoutId,"&step=info")},enumerable:!1,configurable:!0}),d}();export{d as CART_LS_KEY,c as CHECKOUT_LS_KEY,u as IkasCartStore};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { IkasCustomer, IkasFavoriteProduct, IkasOrderTransaction, IkasProduct } from "../models";
|
|
2
2
|
import { IkasBaseStore } from "./base";
|
|
3
|
-
import { IkasCustomerAttributeValue } from "src/models/data/customer/attribute-value";
|
|
4
3
|
export declare class IkasCustomerStore {
|
|
5
4
|
customer?: IkasCustomer | null;
|
|
6
5
|
token?: string | null;
|
|
@@ -35,7 +34,7 @@ export declare class IkasCustomerStore {
|
|
|
35
34
|
* @returns boolean
|
|
36
35
|
*/
|
|
37
36
|
socialLoginToken(token: string): Promise<boolean>;
|
|
38
|
-
register: (firstName: string, lastName: string, email: string, password: string, isMarketingAccepted?: boolean | undefined
|
|
37
|
+
register: (firstName: string, lastName: string, email: string, password: string, isMarketingAccepted?: boolean | undefined) => Promise<boolean>;
|
|
39
38
|
saveContactForm: (input: IkasContactForm) => Promise<boolean>;
|
|
40
39
|
checkEmail: (email: string) => Promise<boolean>;
|
|
41
40
|
forgotPassword: (email: string) => Promise<boolean>;
|
|
@@ -60,8 +59,6 @@ export declare class IkasCustomerStore {
|
|
|
60
59
|
onCustomerConsentGrant: () => void;
|
|
61
60
|
waitUntilInitialized: () => Promise<unknown>;
|
|
62
61
|
getRaffles: () => Promise<import("../models").IkasRaffle[] | undefined>;
|
|
63
|
-
getCustomerAttributes: () => Promise<import("../models").IkasCustomerAttribute[]>;
|
|
64
|
-
getOrderByEmail: (email: string, orderNumber: string) => Promise<import("../models").IkasOrder | undefined>;
|
|
65
62
|
private init;
|
|
66
63
|
private routeChangeInit;
|
|
67
64
|
private getCustomer;
|