New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@ikas/popup-renderer

Package Overview
Dependencies
Maintainers
2
Versions
222
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ikas/popup-renderer - npm Package Compare versions

Comparing version 1.0.169 to 1.0.170

2

build/popup-renderer/components/button-element-renderer/index.js

@@ -1,1 +0,1 @@

import{__assign as t}from'./../../../ext/tslib/tslib.es6.mjs.js';import e 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=e.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=e.useCallback((function(){if(d.current){var t=s.link||void 0;if(!c&&t)d.current.href=t,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 e.createElement("div",{style:u},e.createElement("a",{onClick:p,style:f,target:"_blank",ref:d},e.createElement("div",{dangerouslySetInnerHTML:{__html:s.text},style:t({},m)})))}));export{l as default};
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};

@@ -23,2 +23,3 @@ import { BaseElement, IkasPopupRendererFontFamily, PopupElementTypeEnum } from "../base";

actionType: ButtonActionTypeEnum;
openLinkInNewWindow: boolean;
verticalPadding: number;

@@ -25,0 +26,0 @@ horizontalPadding: number;

@@ -1,1 +0,1 @@

import{__extends as o}from'./../../../../../../ext/tslib/tslib.es6.mjs.js';import{makeObservable as t,observable as r}from"mobx";import{PopupElementTypeEnum as i,IkasPopupRendererFontFamily as n,BaseElement as l}from"../base/index.js";import{ButtonBorderStyle as d}from"../../../background-settings/index.js";import{Popup as e}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(l){function u(o){var u,b,s,g,f,_,m,T,C=this;return(C=l.call(this,o)||this).text=o.text||e.t("popup:initialClassTranslations.buttonText"),C.type=i.BUTTON,C.color=o.color||"#FFFFFF",C.buttonBgColor=o.buttonBgColor||"",C.bgColor=o.bgColor||"",C.fontFamily=new n(o.fontFamily),C.fontSize=null!==(u=o.fontSize)&&void 0!==u?u:16,C.fontWeight=null!==(b=o.fontWeight)&&void 0!==b?b:400,C.borderRadius=null!==(s=o.borderRadius)&&void 0!==s?s:4,C.borderColor=o.borderColor||"",C.borderStyle=o.borderStyle||d.SOLID,C.borderWidth=null!==(g=o.borderWidth)&&void 0!==g?g:0,C.link=o.link||null,C.actionType=o.actionType||a.NAVIGATE_TO_LINK_AND_CLOSE,C.verticalPadding=null!==(f=o.verticalPadding)&&void 0!==f?f:12,C.horizontalPadding=null!==(_=o.horizontalPadding)&&void 0!==_?_:12,C.outerVerticalPadding=null!==(m=o.outerVerticalPadding)&&void 0!==m?m:10,C.outerHorizontalPadding=null!==(T=o.outerHorizontalPadding)&&void 0!==T?T:0,t(C,{text:r,color:r,buttonBgColor:r,bgColor:r,fontFamily:r,fontSize:r,fontWeight:r,borderRadius:r,borderColor:r,borderStyle:r,borderWidth:r,link:r}),C}return o(u,l),u}(l);export{a as ButtonActionTypeEnum,u as ButtonElement};
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 +0,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,r=function(n){void 0===n&&(n={}),this.image=n.image?new l(n.image):new l({}),this.name=n.name?new o(n.name):new o({horizontalPadding:0,verticalPadding:6}),this.discountRatio=n.discountRatio?new o(n.discountRatio):null,this.originalPrice=n.originalPrice?new o(n.originalPrice):new o({horizontalPadding:0,verticalPadding:2,fontSize:14,color:"#697586"}),this.finalPrice=n.finalPrice?new o(n.finalPrice):new o({horizontalPadding:0,verticalPadding:2}),this.button=n.button?new s(n.button):new s({}),this.discountRatioText=n.discountRatioText||null,i(this,{image:t,name:t,discountRatio:t,originalPrice:t,finalPrice:t,button:t,discountRatioText:t})},l=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})},d=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"}(e||(e={}));var s=function(o){void 0===o&&(o={}),this.text=o.text||a.t("popup:initialClassTranslations.productButtonText"),this.action=o.action||e.ADD_TO_CART,i(this,{text:t,action:t})};export{e as ProductActionTypeEnum,s as ProductButtonSettings,r as ProductDetailSettings,d as ProductDiscountRatioSettings,l as ProductImageSettings};
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 +0,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 d}from"../button/index.js";var a,u,l;!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"}(a||(a={})),function(t){t.ALL="ALL",t.SPECIFIC="SPECIFIC",t.CATEGORY="CATEGORY",t.LAST_VIEWED="LAST_VIEWED"}(u||(u={})),function(t){t.ONE_COLUMN="ONE_COLUMN",t.TWO_COLUMN="TWO_COLUMN",t.THREE_COLUMN="THREE_COLUMN"}(l||(l={}));var E=10,s=function(e){function E(t){void 0===t&&(t={});var E,s,C,c,_,A,S,T,I,p,g=this;return(g=e.call(this,t)||this).type=n.PRODUCT_LIST,g.listType=t.listType||u.ALL,g.sortType=t.sortType||a.ASC_CREATED_AT,g.maxProductsToShow=null!==(E=t.maxProductsToShow)&&void 0!==E?E:10,g.categoryId=null!==(s=t.categoryId)&&void 0!==s?s:null,g.variantPairs=null!==(C=t.variantPairs)&&void 0!==C?C:null,g.layout=null!==(c=t.layout)&&void 0!==c?c:l.TWO_COLUMN,g.productDetailSettings=t.productDetailSettings?new r(t.productDetailSettings):new r,g.buttonSettings=t.buttonSettings?new d(t.buttonSettings):new d({outerHorizontalPadding:0,buttonBgColor:"#000000",borderColor:"#000000"}),g.productBgColor=t.productBgColor||"",g.gapBetweenProductElements=null!==(_=t.gapBetweenProductElements)&&void 0!==_?_:12,g.gapBetweenProducts=null!==(A=t.gapBetweenProducts)&&void 0!==A?A:12,g.outerHorizontalPadding=null!==(S=t.outerHorizontalPadding)&&void 0!==S?S:0,g.outerVerticalPadding=null!==(T=t.outerVerticalPadding)&&void 0!==T?T:10,g.verticalPadding=null!==(I=t.verticalPadding)&&void 0!==I?I:0,g.horizontalPadding=null!==(p=t.horizontalPadding)&&void 0!==p?p:0,o(g,{type:i,listType:i,sortType:i,maxProductsToShow:i,categoryId:i,variantPairs:i,layout:i,productDetailSettings:i,buttonSettings:i,productBgColor:i,gapBetweenProductElements:i,gapBetweenProducts:i}),g}return t(E,e),E}(e),C=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})},c=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{E as MAX_PRODUCT_COUNT,c as PopupProduct,C as PopupVariantPair,s as ProductListElement,l as ProductListLayoutEnum,a as ProductListSortTypeEnum,u as ProductListTypeEnum};
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};
{
"name": "@ikas/popup-renderer",
"version": "1.0.169",
"version": "1.0.170",
"description": "",

@@ -5,0 +5,0 @@ "author": "ucy",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc