@ikas/popup-renderer 1.0.169 → 1.0.170
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/popup-renderer/components/button-element-renderer/index.js +1 -1
- package/build/popup-renderer/models/modal/step/elements/button/index.d.ts +1 -0
- package/build/popup-renderer/models/modal/step/elements/button/index.js +1 -1
- package/build/popup-renderer/models/modal/step/elements/product/detail-settings/index.js +1 -1
- package/build/popup-renderer/models/modal/step/elements/product/index.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as
|
|
1
|
+
import{__assign as e}from'./../../../ext/tslib/tslib.es6.mjs.js';import t from"react";import{observer as o}from"mobx-react";import{ButtonActionTypeEnum as n}from"../../models/modal/step/elements/button/index.js";import{getHorizontalAlignment as r,injectFontScript as i}from"../../helpers/index.js";var l=o((function(o){var l=o.element,c=o.isStandaloneButtonComponent,a=o.onClose,d=t.useRef(null),s=l,u={display:"flex",alignItems:"center",justifyContent:r(s.horizontalAlignment),padding:"".concat(s.outerVerticalPadding,"px ").concat(s.outerHorizontalPadding,"px"),backgroundColor:s.bgColor},m={color:s.color,backgroundColor:s.buttonBgColor,fontSize:s.fontSize,fontWeight:s.fontWeight,fontFamily:i(s.fontFamily),textAlign:"center",border:"".concat(s.borderWidth,"px ").concat(s.borderStyle," ").concat(s.borderColor),borderRadius:s.borderRadius,padding:"".concat(s.verticalPadding,"px ").concat(s.horizontalPadding,"px")},f={width:"".concat(s.width,"%"),minWidth:"fit-content",cursor:"pointer"},p=t.useCallback((function(){if(d.current){var e=s.link||void 0;if(!c&&e)d.current.href=e,d.current.click();else switch(s.actionType){case n.NAVIGATE_TO_LINK_AND_CLOSE:null==a||a(!0),d.current.click();case n.NAVIGATE_TO_LINK:d.current.click();case n.CLOSE:null==a||a(!0)}}}),[d,d.current]);return t.createElement("div",{style:u},t.createElement("a",{onClick:p,style:f,target:s.openLinkInNewWindow?"_blank":"_self",ref:d},t.createElement("div",{dangerouslySetInnerHTML:{__html:s.text},style:e({},m)})))}));export{l as default};
|
|
@@ -20,6 +20,7 @@ export declare class ButtonElement extends BaseElement {
|
|
|
20
20
|
borderWidth: number;
|
|
21
21
|
link: string | null;
|
|
22
22
|
actionType: ButtonActionTypeEnum;
|
|
23
|
+
openLinkInNewWindow: boolean;
|
|
23
24
|
verticalPadding: number;
|
|
24
25
|
horizontalPadding: number;
|
|
25
26
|
constructor(data: Partial<ButtonElement>);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__extends as o}from'./../../../../../../ext/tslib/tslib.es6.mjs.js';import{makeObservable as
|
|
1
|
+
import{__extends as o}from'./../../../../../../ext/tslib/tslib.es6.mjs.js';import{makeObservable as i,observable as n}from"mobx";import{PopupElementTypeEnum as t,IkasPopupRendererFontFamily as r,BaseElement as e}from"../base/index.js";import{ButtonBorderStyle as l}from"../../../background-settings/index.js";import{Popup as d}from"../../../../index.js";var a;!function(o){o.NAVIGATE_TO_LINK_AND_CLOSE="NAVIGATE_TO_LINK_AND_CLOSE",o.NAVIGATE_TO_LINK="NAVIGATE_TO_LINK",o.CLOSE="CLOSE"}(a||(a={}));var u=function(e){function u(o){var u,b,s,g,f,N,T,_,m=this;return(m=e.call(this,o)||this).text=o.text||d.t("popup:initialClassTranslations.buttonText"),m.type=t.BUTTON,m.color=o.color||"#FFFFFF",m.buttonBgColor=o.buttonBgColor||"",m.bgColor=o.bgColor||"",m.fontFamily=new r(o.fontFamily),m.fontSize=null!==(u=o.fontSize)&&void 0!==u?u:16,m.fontWeight=null!==(b=o.fontWeight)&&void 0!==b?b:400,m.borderRadius=null!==(s=o.borderRadius)&&void 0!==s?s:4,m.borderColor=o.borderColor||"",m.borderStyle=o.borderStyle||l.SOLID,m.borderWidth=null!==(g=o.borderWidth)&&void 0!==g?g:0,m.link=o.link||null,m.actionType=o.actionType||a.NAVIGATE_TO_LINK_AND_CLOSE,m.openLinkInNewWindow=o.openLinkInNewWindow||!0,m.verticalPadding=null!==(f=o.verticalPadding)&&void 0!==f?f:12,m.horizontalPadding=null!==(N=o.horizontalPadding)&&void 0!==N?N:12,m.outerVerticalPadding=null!==(T=o.outerVerticalPadding)&&void 0!==T?T:10,m.outerHorizontalPadding=null!==(_=o.outerHorizontalPadding)&&void 0!==_?_:0,i(m,{text:n,color:n,buttonBgColor:n,bgColor:n,fontFamily:n,fontSize:n,fontWeight:n,borderRadius:n,borderColor:n,borderStyle:n,borderWidth:n,link:n,actionType:n,openLinkInNewWindow:n}),m}return o(u,e),u}(e);export{a as ButtonActionTypeEnum,u as ButtonElement};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeObservable as i,observable as t}from"mobx";import{TextElement as o}from"../../text/index.js";import{IkasPopupRendererFontFamily as n}from"../../base/index.js";import{Popup as a}from"../../../../../index.js";var e
|
|
1
|
+
import{makeObservable as i,observable as t}from"mobx";import{TextElement as o}from"../../text/index.js";import{IkasPopupRendererFontFamily as n}from"../../base/index.js";import{Popup as a}from"../../../../../index.js";var l,e=function(n){void 0===n&&(n={}),this.image=n.image?new r(n.image):null,this.name=n.name?new o(n.name):null,this.discountRatio=n.discountRatio?new o(n.discountRatio):null,this.originalPrice=n.originalPrice?new o(n.originalPrice):null,this.finalPrice=n.finalPrice?new o(n.finalPrice):null,this.button=n.button?new u(n.button):null,this.discountRatioText=n.discountRatioText||null,i(this,{image:t,name:t,discountRatio:t,originalPrice:t,finalPrice:t,button:t,discountRatioText:t})},r=function(o){var n,a;this.bgColor=o.bgColor||"",this.maxWidth=null!==(n=o.maxWidth)&&void 0!==n?n:100,this.borderRadius=null!==(a=o.borderRadius)&&void 0!==a?a:0,i(this,{bgColor:t,maxWidth:t,borderRadius:t})},s=function(o){var a;void 0===o&&(o={}),this.color=o.color||"#000000",this.bgColor=o.bgColor||"",this.fontFamily=new n(o.fontFamily),this.fontSize=null!==(a=o.fontSize)&&void 0!==a?a:24,i(this,{color:t,bgColor:t,fontFamily:t,fontSize:t})};!function(i){i.ADD_TO_CART="ADD_TO_CART",i.NAVIGATE_TO_PRODUCT_DETAIL="NAVIGATE_TO_PRODUCT_DETAIL"}(l||(l={}));var u=function(o){void 0===o&&(o={}),this.text=o.text||a.t("popup:initialClassTranslations.productButtonText"),this.action=o.action||l.ADD_TO_CART,i(this,{text:t,action:t})};export{l as ProductActionTypeEnum,u as ProductButtonSettings,e as ProductDetailSettings,s as ProductDiscountRatioSettings,r as ProductImageSettings};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__extends as t}from'./../../../../../../ext/tslib/tslib.es6.mjs.js';import{makeObservable as o,observable as i}from"mobx";import{PopupElementTypeEnum as n,BaseElement as e}from"../base/index.js";import{ProductDetailSettings as r}from"./detail-settings/index.js";import{ButtonElement as
|
|
1
|
+
import{__extends as t}from'./../../../../../../ext/tslib/tslib.es6.mjs.js';import{makeObservable as o,observable as i}from"mobx";import{PopupElementTypeEnum as n,BaseElement as e}from"../base/index.js";import{ProductDetailSettings as r,ProductImageSettings as d,ProductButtonSettings as a}from"./detail-settings/index.js";import{ButtonElement as u}from"../button/index.js";import{TextElement as l}from"../text/index.js";var E,s,C;!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"}(E||(E={})),function(t){t.ALL="ALL",t.SPECIFIC="SPECIFIC",t.CATEGORY="CATEGORY",t.LAST_VIEWED="LAST_VIEWED"}(s||(s={})),function(t){t.ONE_COLUMN="ONE_COLUMN",t.TWO_COLUMN="TWO_COLUMN",t.THREE_COLUMN="THREE_COLUMN"}(C||(C={}));var c=10,_=function(e){function c(t){void 0===t&&(t={});var c,_,A,S,T,g,I,p,R,P,m=this;return(m=e.call(this,t)||this).type=n.PRODUCT_LIST,m.listType=t.listType||s.ALL,m.sortType=t.sortType||E.ASC_CREATED_AT,m.maxProductsToShow=null!==(c=t.maxProductsToShow)&&void 0!==c?c:10,m.categoryId=null!==(_=t.categoryId)&&void 0!==_?_:null,m.variantPairs=null!==(A=t.variantPairs)&&void 0!==A?A:null,m.layout=null!==(S=t.layout)&&void 0!==S?S:C.TWO_COLUMN,m.productDetailSettings=t.productDetailSettings?new r(t.productDetailSettings):new r({image:new d({}),name:new l({horizontalPadding:0,verticalPadding:6}),discountRatio:null,finalPrice:new l({horizontalPadding:0,verticalPadding:2,fontSize:14,color:"#697586"}),button:new a({})}),m.buttonSettings=t.buttonSettings?new u(t.buttonSettings):new u({outerHorizontalPadding:0,buttonBgColor:"#000000",borderColor:"#000000"}),m.productBgColor=t.productBgColor||"",m.gapBetweenProductElements=null!==(T=t.gapBetweenProductElements)&&void 0!==T?T:12,m.gapBetweenProducts=null!==(g=t.gapBetweenProducts)&&void 0!==g?g:12,m.outerHorizontalPadding=null!==(I=t.outerHorizontalPadding)&&void 0!==I?I:0,m.outerVerticalPadding=null!==(p=t.outerVerticalPadding)&&void 0!==p?p:10,m.verticalPadding=null!==(R=t.verticalPadding)&&void 0!==R?R:0,m.horizontalPadding=null!==(P=t.horizontalPadding)&&void 0!==P?P:0,o(m,{type:i,listType:i,sortType:i,maxProductsToShow:i,categoryId:i,variantPairs:i,layout:i,productDetailSettings:i,buttonSettings:i,productBgColor:i,gapBetweenProductElements:i,gapBetweenProducts:i}),m}return t(c,e),c}(e),A=function(t){var n;this.productId=t.productId,this.variantId=t.variantId,this.order=null!==(n=t.order)&&void 0!==n?n:0,this.productListElementId=t.productListElementId,o(this,{productId:i,variantId:i,order:i,productListElementId:i})},S=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.discountRatio=t.discountRatio||null,this.imageURL=t.imageURL?"".concat(t.imageURL,"/image_").concat(1080,".jpeg"):null,this.url=t.url||null,o(this,{productId:i,variantId:i,name:i,price:i,discountPrice:i,discountRatio:i,imageURL:i,url:i})}return Object.defineProperty(t.prototype,"$discountRatio",{get:function(){return this.discountRatio?"%"+this.discountRatio:null},enumerable:!1,configurable:!0}),t}();export{c as MAX_PRODUCT_COUNT,S as PopupProduct,A as PopupVariantPair,_ as ProductListElement,C as ProductListLayoutEnum,E as ProductListSortTypeEnum,s as ProductListTypeEnum};
|