@ikas/popup-renderer
Advanced tools
Comparing version 0.0.14 to 0.0.15
@@ -1,1 +0,1 @@ | ||
import{__spreadArray as t,__assign as e}from'./../../../ext/tslib/tslib.es6.mjs.js';import o from"react";import'./../../../ext/mobx-react-lite/es/index.js';import{getHorizontalAlignment as n}from"../../helpers/index.js";import{ProductListTypeEnum as i,ProductListLayoutEnum as l}from"../../models/modal/step/elements/product/index.js";import r from"../button-element-renderer/index.js";import{Navigation as d,Scrollbar as a}from"swiper/modules";import{Swiper as c,SwiperSlide as u}from"swiper/react";import s from"../../assets/left-arrow.js";import v from"../../assets/right-arrow.js";import{observer as m}from'./../../../ext/mobx-react-lite/es/observer.js';var g=m((function(m){var g,p=m.element,f=m.products,b=m.popup,h=m.editModeChildren,x=o.useState(null),y=x[0],E=x[1],C=o.useState(!1),w=C[0],P=C[1],S=o.useState(!1),R=S[0],z=S[1],j=p,W=[];if(f&&(W=j.listType===i.SPECIFIC?(null===(g=j.variantPairs)||void 0===g?void 0:g.length)?f.slice().sort((function(t,e){return j.variantPairs.findIndex((function(e){return e.variantId===t.variantId}))-j.variantPairs.findIndex((function(t){return t.variantId===e.variantId}))})):[]:t([],f,!0)),W.length>j.maxProductsToShow&&(W.length=j.maxProductsToShow),!(W&&W.length||!b.isPreviewMode)&&h)return h;if(!W||!W.length)return null;j.gapBetweenProductElements;var I=j.productDetailSettings.image,F=j.productDetailSettings.button,k=j.buttonSettings,D=j.productDetailSettings.discountRatio,A=j.productDetailSettings.finalPrice,N=j.productDetailSettings.originalPrice,B=j.productDetailSettings.name,_=n(j.horizontalAlignment),L=1;j.layout===l.ONE_COLUMN?L=1:j.layout===l.TWO_COLUMN?L=2:j.layout===l.THREE_COLUMN&&(L=3);var M={padding:"".concat(j.verticalPadding,"px ").concat(j.horizontalPadding,"px"),backgroundColor:j.productBgColor,width:"100%",height:"max-content"},O={display:"flex",flexDirection:"column",justifyContent:"space-between",alignItems:"center",height:"100%"},T={display:"flex",justifyContent:_,alignItems:"center",width:"100%",backgroundColor:null==I?void 0:I.bgColor,borderRadius:(null==I?void 0:I.borderRadius)?"".concat(I.borderRadius,"px"):void 0},U={width:"".concat(null==I?void 0:I.maxWidth,"%"),objectFit:"contain",borderRadius:(null==I?void 0:I.borderRadius)?"".concat(I.borderRadius,"px"):void 0},$={display:"flex",flexDirection:"column",width:"100%"},H={display:"flex",flexDirection:"column"},V={backgroundColor:null==B?void 0:B.bgColor,color:null==B?void 0:B.color,fontFamily:null==B?void 0:B.fontFamily,fontSize:null==B?void 0:B.fontSize,fontWeight:null==B?void 0:B.fontWeight,padding:"".concat(null==B?void 0:B.verticalPadding,"px ").concat(null==B?void 0:B.horizontalPadding,"px"),width:"100%",textAlign:null==B?void 0:B.horizontalAlignment,border:"".concat(null==B?void 0:B.borderWidth,"px ").concat(null==B?void 0:B.borderStyle," ").concat(null==B?void 0:B.borderColor),borderRadius:null==B?void 0:B.borderRadius},q={backgroundColor:null==D?void 0:D.bgColor,color:null==D?void 0:D.color,fontFamily:null==D?void 0:D.fontFamily,fontSize:null==D?void 0:D.fontSize,fontWeight:null==D?void 0:D.fontWeight,padding:"".concat(null==D?void 0:D.verticalPadding,"px ").concat(null==D?void 0:D.horizontalPadding,"px"),width:"100%",textAlign:null==D?void 0:D.horizontalAlignment,border:"".concat(null==D?void 0:D.borderWidth,"px ").concat(null==D?void 0:D.borderStyle," ").concat(null==D?void 0:D.borderColor),borderRadius:null==D?void 0:D.borderRadius},G={textDecoration:"line-through",backgroundColor:null==N?void 0:N.bgColor,color:null==N?void 0:N.color,fontFamily:null==N?void 0:N.fontFamily,fontSize:null==N?void 0:N.fontSize,fontWeight:null==N?void 0:N.fontWeight,padding:"".concat(null==N?void 0:N.verticalPadding,"px ").concat(null==N?void 0:N.horizontalPadding,"px"),width:"100%",textAlign:null==N?void 0:N.horizontalAlignment,border:"".concat(null==N?void 0:N.borderWidth,"px ").concat(null==N?void 0:N.borderStyle," ").concat(null==N?void 0:N.borderColor),borderRadius:null==N?void 0:N.borderRadius},J={backgroundColor:null==A?void 0:A.bgColor,color:null==A?void 0:A.color,fontFamily:null==A?void 0:A.fontFamily,fontSize:null==A?void 0:A.fontSize,fontWeight:null==A?void 0:A.fontWeight,padding:"".concat(null==A?void 0:A.verticalPadding,"px ").concat(null==A?void 0:A.horizontalPadding,"px"),width:"100%",textAlign:null==A?void 0:A.horizontalAlignment,border:"".concat(null==A?void 0:A.borderWidth,"px ").concat(null==A?void 0:A.borderStyle," ").concat(null==A?void 0:A.borderColor),borderRadius:null==A?void 0:A.borderRadius},K={width:"".concat(k.width,"%"),minWidth:"fit-content"},Q=e({display:"flex",justifyContent:"center",width:"100%",gap:"10px"},1===L?{position:"absolute",top:0,left:0,right:0,bottom:0,alignItems:"center",justifyContent:"space-between",zIndex:10}:void 0),X={padding:10,display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"100%",border:"1px solid #EEF2F6",cursor:"pointer"};return o.createElement("div",{style:M},o.createElement(c,{onSwiper:E,modules:[d,a],spaceBetween:j.gapBetweenProducts,slidesPerView:L,navigation:{nextEl:".custom-next-button",prevEl:".custom-prev-button"},scrollbar:void 0},W.map((function(t,e){return o.createElement(u,{style:{height:"auto"},key:t.variantId},o.createElement("div",{style:O},o.createElement("div",{style:$},!!I&&t.imageURL&&o.createElement("div",{style:T},o.createElement("img",{src:t.imageURL||void 0,alt:t.name||void 0,style:U})),(!!B||!!D)&&o.createElement("div",{style:H},!!B&&o.createElement("div",{style:V},t.name),!!D&&!!t.discountPrice&&o.createElement("div",{style:q},t.$discountRatio)),(!!N||!!A)&&o.createElement("div",null,!!N&&!!t.discountPrice&&o.createElement("div",{style:G},t.$price),!!A&&o.createElement("div",{style:J},t.$discountPrice||t.$price))),!!F&&o.createElement("div",{style:K,onClick:function(){}}," ",o.createElement(r,{element:k})," ")))})),o.createElement("div",{style:Q},o.createElement("div",{className:"custom-prev-button",style:e(e({},X),w?{opacity:.5,cursor:"not-allowed"}:{}),onClick:function(){y&&(y.slidePrev(),z(y.isEnd),P(y.isBeginning))}},o.createElement(s,null)),o.createElement("div",{className:"custom-next-button",style:e(e({},X),R?{opacity:.5,cursor:"not-allowed"}:{}),onClick:function(){y&&(y.slideNext(),z(y.isEnd),P(y.isBeginning))}},o.createElement(v,null)))))}));export{g as default}; | ||
import{__spreadArray as t,__assign as e}from'./../../../ext/tslib/tslib.es6.mjs.js';import o from"react";import'./../../../ext/mobx-react-lite/es/index.js';import{getHorizontalAlignment as n}from"../../helpers/index.js";import{ProductListTypeEnum as i,ProductListLayoutEnum as l}from"../../models/modal/step/elements/product/index.js";import r from"../button-element-renderer/index.js";import{Navigation as d,Scrollbar as a}from"swiper/modules";import{Swiper as c,SwiperSlide as u}from"swiper/react";import s from"../../assets/left-arrow.js";import v from"../../assets/right-arrow.js";import{observer as m}from'./../../../ext/mobx-react-lite/es/observer.js';var g=m((function(m){var g,p=m.element,f=m.products,b=m.popup,h=m.editModeChildren,x=o.useState(null),y=x[0],E=x[1],C=o.useState(!1),w=C[0],P=C[1],S=o.useState(!1),R=S[0],z=S[1],j=p,W=[];if(f&&(W=j.listType===i.SPECIFIC?(null===(g=j.variantPairs)||void 0===g?void 0:g.length)?f.slice().sort((function(t,e){return j.variantPairs.findIndex((function(e){return e.variantId===t.variantId}))-j.variantPairs.findIndex((function(t){return t.variantId===e.variantId}))})):[]:t([],f,!0)),W.length>j.maxProductsToShow&&(W.length=j.maxProductsToShow),!(W&&W.length||!b.isPreviewMode)&&h)return h;if(!W||!W.length)return null;j.gapBetweenProductElements;var I=j.productDetailSettings.image,F=j.productDetailSettings.button,k=j.buttonSettings,D=j.productDetailSettings.discountRatio,A=j.productDetailSettings.finalPrice,N=j.productDetailSettings.originalPrice,B=j.productDetailSettings.name,_=n(j.horizontalAlignment),L=1;j.layout===l.ONE_COLUMN?L=1:j.layout===l.TWO_COLUMN?L=2:j.layout===l.THREE_COLUMN&&(L=3);var M={padding:"".concat(j.verticalPadding,"px ").concat(j.horizontalPadding,"px"),backgroundColor:j.productBgColor,width:"100%",height:"max-content"},O={display:"flex",flexDirection:"column",justifyContent:"space-between",alignItems:"center",height:"100%"},T={display:"flex",justifyContent:_,alignItems:"center",width:"100%",backgroundColor:null==I?void 0:I.bgColor,borderRadius:(null==I?void 0:I.borderRadius)?"".concat(I.borderRadius,"px"):void 0},U={width:"".concat(null==I?void 0:I.maxWidth,"%"),objectFit:"contain",borderRadius:(null==I?void 0:I.borderRadius)?"".concat(I.borderRadius,"px"):void 0},H={display:"flex",flexDirection:"column",width:"100%"},V={display:"flex",flexDirection:"column"},$={backgroundColor:null==B?void 0:B.bgColor,color:null==B?void 0:B.color,fontFamily:null==B?void 0:B.fontFamily,fontSize:null==B?void 0:B.fontSize,fontWeight:null==B?void 0:B.fontWeight,padding:"".concat(null==B?void 0:B.verticalPadding,"px ").concat(null==B?void 0:B.horizontalPadding,"px"),width:"100%",textAlign:null==B?void 0:B.horizontalAlignment,border:"".concat(null==B?void 0:B.borderWidth,"px ").concat(null==B?void 0:B.borderStyle," ").concat(null==B?void 0:B.borderColor),borderRadius:null==B?void 0:B.borderRadius},q={backgroundColor:null==D?void 0:D.bgColor,color:null==D?void 0:D.color,fontFamily:null==D?void 0:D.fontFamily,fontSize:null==D?void 0:D.fontSize,fontWeight:null==D?void 0:D.fontWeight,padding:"".concat(null==D?void 0:D.verticalPadding,"px ").concat(null==D?void 0:D.horizontalPadding,"px"),width:"100%",textAlign:null==D?void 0:D.horizontalAlignment,border:"".concat(null==D?void 0:D.borderWidth,"px ").concat(null==D?void 0:D.borderStyle," ").concat(null==D?void 0:D.borderColor),borderRadius:null==D?void 0:D.borderRadius},G={textDecoration:"line-through",backgroundColor:null==N?void 0:N.bgColor,color:null==N?void 0:N.color,fontFamily:null==N?void 0:N.fontFamily,fontSize:null==N?void 0:N.fontSize,fontWeight:null==N?void 0:N.fontWeight,padding:"".concat(null==N?void 0:N.verticalPadding,"px ").concat(null==N?void 0:N.horizontalPadding,"px"),width:"100%",textAlign:null==N?void 0:N.horizontalAlignment,border:"".concat(null==N?void 0:N.borderWidth,"px ").concat(null==N?void 0:N.borderStyle," ").concat(null==N?void 0:N.borderColor),borderRadius:null==N?void 0:N.borderRadius},J={backgroundColor:null==A?void 0:A.bgColor,color:null==A?void 0:A.color,fontFamily:null==A?void 0:A.fontFamily,fontSize:null==A?void 0:A.fontSize,fontWeight:null==A?void 0:A.fontWeight,padding:"".concat(null==A?void 0:A.verticalPadding,"px ").concat(null==A?void 0:A.horizontalPadding,"px"),width:"100%",textAlign:null==A?void 0:A.horizontalAlignment,border:"".concat(null==A?void 0:A.borderWidth,"px ").concat(null==A?void 0:A.borderStyle," ").concat(null==A?void 0:A.borderColor),borderRadius:null==A?void 0:A.borderRadius},K={width:"".concat(k.width,"%"),minWidth:"fit-content"},Q=e({display:"flex",justifyContent:"center",width:"100%",gap:"10px"},1===L?{position:"absolute",top:0,left:0,right:0,bottom:0,alignItems:"center",justifyContent:"space-between",zIndex:10}:void 0),X={padding:10,display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"100%",border:"1px solid #EEF2F6",cursor:"pointer"};return o.createElement("div",{style:M},o.createElement(c,{onSwiper:E,modules:[d,a],spaceBetween:j.gapBetweenProducts,slidesPerView:L,navigation:{nextEl:".custom-next-button",prevEl:".custom-prev-button"},scrollbar:void 0},W.map((function(t,e){return o.createElement(u,{style:{height:"auto"},key:t.variantId},o.createElement("div",{style:O},o.createElement("div",{style:H},!!I&&t.imageURL&&o.createElement("div",{style:T},o.createElement("img",{src:t.imageURL||void 0,alt:t.name||void 0,style:U})),(!!B||!!D)&&o.createElement("div",{style:V},!!B&&o.createElement("div",{style:$},t.name),!!D&&!!t.discountPrice&&o.createElement("div",{style:q},t.$discountRatio)),(!!N||!!A)&&o.createElement("div",null,!!N&&!!t.discountPrice&&o.createElement("div",{style:G},t.price),!!A&&o.createElement("div",{style:J},t.discountPrice||t.price))),!!F&&o.createElement("div",{style:K,onClick:function(){}}," ",o.createElement(r,{element:k})," ")))})),o.createElement("div",{style:Q},o.createElement("div",{className:"custom-prev-button",style:e(e({},X),w?{opacity:.5,cursor:"not-allowed"}:{}),onClick:function(){y&&(y.slidePrev(),z(y.isEnd),P(y.isBeginning))}},o.createElement(s,null)),o.createElement("div",{className:"custom-next-button",style:e(e({},X),R?{opacity:.5,cursor:"not-allowed"}:{}),onClick:function(){y&&(y.slideNext(),z(y.isEnd),P(y.isBeginning))}},o.createElement(v,null)))))}));export{g as default}; |
@@ -58,11 +58,8 @@ import { BaseElement, PopupElementTypeEnum } from "../base"; | ||
name: string; | ||
price: number; | ||
discountPrice: number | null; | ||
price: string; | ||
discountPrice: string | null; | ||
imageURL: string | null; | ||
currencySymbol: string | null; | ||
url: string | null; | ||
constructor(data?: Partial<PopupProduct>); | ||
get $price(): string; | ||
get $discountPrice(): string | null; | ||
get $discountRatio(): string | null; | ||
} |
@@ -1,1 +0,1 @@ | ||
import{__extends as t}from'./../../../../../../ext/tslib/tslib.es6.mjs.js';import{makeObservable as i,observable as e,computed as o}from"mobx";import{PopupElementTypeEnum as r,BaseElement as n}from"../base/index.js";import{ProductDetailSettings as u}from"./detail-settings/index.js";import{ButtonElement as c}from"../button/index.js";var d,a,s;!function(t){t.ASC_AVERAGE_RATING="ASC_AVERAGE_RATING",t.DESC_AVERAGE_RATING="DESC_AVERAGE_RATING",t.ASC_CREATED_AT="ASC_CREATED_AT",t.DESC_CREATED_AT="DESC_CREATED_AT",t.ASC_DISCOUNT_RATIO="ASC_DISCOUNT_RATIO",t.DESC_DISCOUNT_RATIO="DESC_DISCOUNT_RATIO",t.ASC_NAME="ASC_NAME",t.DESC_NAME="DESC_NAME",t.ASC_PRICE="ASC_PRICE",t.DESC_PRICE="DESC_PRICE",t.ASC_REVIEW_COUNT="ASC_REVIEW_COUNT",t.DESC_REVIEW_COUNT="DESC_REVIEW_COUNT",t.ASC_SALE_COUNT="ASC_SALE_COUNT",t.DESC_SALE_COUNT="DESC_SALE_COUNT"}(d||(d={})),function(t){t.ALL="ALL",t.SPECIFIC="SPECIFIC",t.CATEGORY="CATEGORY",t.LAST_VIEWED="LAST_VIEWED"}(a||(a={})),function(t){t.ONE_COLUMN="ONE_COLUMN",t.TWO_COLUMN="TWO_COLUMN",t.THREE_COLUMN="THREE_COLUMN"}(s||(s={}));var l=10,E=function(o){function n(t){void 0===t&&(t={});var n,l,E,C,_,S,m,A,p=this;return(p=o.call(this,t)||this).type=r.PRODUCT_LIST,p.listType=t.listType||a.ALL,p.sortType=t.sortType||d.ASC_CREATED_AT,p.maxProductsToShow=null!==(n=t.maxProductsToShow)&&void 0!==n?n:10,p.categoryId=null!==(l=t.categoryId)&&void 0!==l?l:null,p.variantPairs=null!==(E=t.variantPairs)&&void 0!==E?E:null,p.layout=null!==(C=t.layout)&&void 0!==C?C:s.TWO_COLUMN,p.productDetailSettings=t.productDetailSettings?new u(t.productDetailSettings):new u,p.buttonSettings=t.buttonSettings?new c(t.buttonSettings):new c({outerHorizontalPadding:0}),p.productBgColor=t.productBgColor||"#FFFFFF",p.gapBetweenProductElements=null!==(_=t.gapBetweenProductElements)&&void 0!==_?_:12,p.gapBetweenProducts=null!==(S=t.gapBetweenProducts)&&void 0!==S?S:12,p.verticalPadding=null!==(m=t.verticalPadding)&&void 0!==m?m:12,p.horizontalPadding=null!==(A=t.horizontalPadding)&&void 0!==A?A:12,i(p,{type:e,listType:e,sortType:e,maxProductsToShow:e,categoryId:e,variantPairs:e,layout:e,productDetailSettings:e,buttonSettings:e,productBgColor:e,gapBetweenProductElements:e,gapBetweenProducts:e}),p}return t(n,o),n}(n),C=function(t){var o;this.productId=t.productId,this.variantId=t.variantId,this.order=null!==(o=t.order)&&void 0!==o?o:0,this.productListElementId=t.productListElementId,i(this,{productId:e,variantId:e,order:e,productListElementId:e})},_=function(){function t(t){void 0===t&&(t={}),this.productId=t.productId||Date.now().toString(),this.variantId=t.variantId||Date.now().toString(),this.name=t.name||"",this.price=t.price||0,this.discountPrice=t.discountPrice||null,this.imageURL=t.imageURL?"".concat(t.imageURL,"/image_").concat(1080,".jpeg"):null,this.currencySymbol=t.currencySymbol||null,this.url=t.url||null,i(this,{productId:e,variantId:e,name:e,price:e,discountPrice:e,imageURL:e,currencySymbol:e,url:e,$price:o,$discountPrice:o})}return Object.defineProperty(t.prototype,"$price",{get:function(){return this.currencySymbol+new Intl.NumberFormat(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}).format(this.price)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"$discountPrice",{get:function(){return this.discountPrice?this.currencySymbol+new Intl.NumberFormat(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}).format(this.discountPrice):null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"$discountRatio",{get:function(){return this.discountPrice?"%"+((this.price-this.discountPrice)/this.price*100).toFixed(2):null},enumerable:!1,configurable:!0}),t}();export{l as MAX_PRODUCT_COUNT,_ as PopupProduct,C as PopupVariantPair,E as ProductListElement,s as ProductListLayoutEnum,d as ProductListSortTypeEnum,a as ProductListTypeEnum}; | ||
import{__extends as t}from'./../../../../../../ext/tslib/tslib.es6.mjs.js';import{makeObservable as i,observable as o}from"mobx";import{PopupElementTypeEnum as e,BaseElement as n}from"../base/index.js";import{ProductDetailSettings as r}from"./detail-settings/index.js";import{ButtonElement as d}from"../button/index.js";var u,a,E;!function(t){t.ASC_AVERAGE_RATING="ASC_AVERAGE_RATING",t.DESC_AVERAGE_RATING="DESC_AVERAGE_RATING",t.ASC_CREATED_AT="ASC_CREATED_AT",t.DESC_CREATED_AT="DESC_CREATED_AT",t.ASC_DISCOUNT_RATIO="ASC_DISCOUNT_RATIO",t.DESC_DISCOUNT_RATIO="DESC_DISCOUNT_RATIO",t.ASC_NAME="ASC_NAME",t.DESC_NAME="DESC_NAME",t.ASC_PRICE="ASC_PRICE",t.DESC_PRICE="DESC_PRICE",t.ASC_REVIEW_COUNT="ASC_REVIEW_COUNT",t.DESC_REVIEW_COUNT="DESC_REVIEW_COUNT",t.ASC_SALE_COUNT="ASC_SALE_COUNT",t.DESC_SALE_COUNT="DESC_SALE_COUNT"}(u||(u={})),function(t){t.ALL="ALL",t.SPECIFIC="SPECIFIC",t.CATEGORY="CATEGORY",t.LAST_VIEWED="LAST_VIEWED"}(a||(a={})),function(t){t.ONE_COLUMN="ONE_COLUMN",t.TWO_COLUMN="TWO_COLUMN",t.THREE_COLUMN="THREE_COLUMN"}(E||(E={}));var C=10,l=function(n){function C(t){void 0===t&&(t={});var C,l,s,_,c,A,S,T,I=this;return(I=n.call(this,t)||this).type=e.PRODUCT_LIST,I.listType=t.listType||a.ALL,I.sortType=t.sortType||u.ASC_CREATED_AT,I.maxProductsToShow=null!==(C=t.maxProductsToShow)&&void 0!==C?C:10,I.categoryId=null!==(l=t.categoryId)&&void 0!==l?l:null,I.variantPairs=null!==(s=t.variantPairs)&&void 0!==s?s:null,I.layout=null!==(_=t.layout)&&void 0!==_?_:E.TWO_COLUMN,I.productDetailSettings=t.productDetailSettings?new r(t.productDetailSettings):new r,I.buttonSettings=t.buttonSettings?new d(t.buttonSettings):new d({outerHorizontalPadding:0}),I.productBgColor=t.productBgColor||"#FFFFFF",I.gapBetweenProductElements=null!==(c=t.gapBetweenProductElements)&&void 0!==c?c:12,I.gapBetweenProducts=null!==(A=t.gapBetweenProducts)&&void 0!==A?A:12,I.verticalPadding=null!==(S=t.verticalPadding)&&void 0!==S?S:12,I.horizontalPadding=null!==(T=t.horizontalPadding)&&void 0!==T?T:12,i(I,{type:o,listType:o,sortType:o,maxProductsToShow:o,categoryId:o,variantPairs:o,layout:o,productDetailSettings:o,buttonSettings:o,productBgColor:o,gapBetweenProductElements:o,gapBetweenProducts:o}),I}return t(C,n),C}(n),s=function(t){var e;this.productId=t.productId,this.variantId=t.variantId,this.order=null!==(e=t.order)&&void 0!==e?e:0,this.productListElementId=t.productListElementId,i(this,{productId:o,variantId:o,order:o,productListElementId:o})},_=function(){function t(t){void 0===t&&(t={}),this.productId=t.productId||Date.now().toString(),this.variantId=t.variantId||Date.now().toString(),this.name=t.name||"",this.price=t.price||"",this.discountPrice=t.discountPrice||null,this.imageURL=t.imageURL?"".concat(t.imageURL,"/image_").concat(1080,".jpeg"):null,this.url=t.url||null,i(this,{productId:o,variantId:o,name:o,price:o,discountPrice:o,imageURL:o,url:o})}return Object.defineProperty(t.prototype,"$discountRatio",{get:function(){return this.discountPrice?"%"+this.discountPrice:null},enumerable:!1,configurable:!0}),t}();export{C as MAX_PRODUCT_COUNT,_ as PopupProduct,s as PopupVariantPair,l as ProductListElement,E as ProductListLayoutEnum,u as ProductListSortTypeEnum,a as ProductListTypeEnum}; |
{ | ||
"name": "@ikas/popup-renderer", | ||
"version": "0.0.14", | ||
"version": "0.0.15", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "author": "ucy", |
104614
1204