@ikas/popup-renderer 1.0.120 → 1.0.122
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/components/image-column-element-renderer/index.js +1 -1
- package/build/popup-renderer/components/image-element-renderer/index.js +1 -1
- package/build/popup-renderer/components/social-element-renderer/index.js +1 -1
- package/build/popup-renderer/models/modal/step/elements/form/index.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as t}from'./../../../ext/tslib/tslib.es6.mjs.js';import o from"react";import{observer as e}from"mobx-react";import{getHorizontalAlignment as r,injectFontScript as n}from"../../helpers/index.js";var i=e((function(e){var i=e.element,a={display:"flex",alignItems:"center",justifyContent:r(i.horizontalAlignment),padding:"".concat(i.outerVerticalPadding,"px ").concat(i.outerHorizontalPadding,"px"),backgroundColor:i.bgColor},
|
|
1
|
+
import{__assign as t}from'./../../../ext/tslib/tslib.es6.mjs.js';import o from"react";import{observer as e}from"mobx-react";import{getHorizontalAlignment as r,injectFontScript as n}from"../../helpers/index.js";var i=e((function(e){var i=e.element,a={display:"flex",alignItems:"center",justifyContent:r(i.horizontalAlignment),padding:"".concat(i.outerVerticalPadding,"px ").concat(i.outerHorizontalPadding,"px"),backgroundColor:i.bgColor},l={color:i.color,backgroundColor:i.buttonBgColor,fontSize:i.fontSize,fontWeight:i.fontWeight,fontFamily:n(i.fontFamily),textAlign:"center",border:"".concat(i.borderWidth,"px ").concat(i.borderStyle," ").concat(i.borderColor),borderRadius:i.borderRadius,padding:"".concat(i.verticalPadding,"px ").concat(i.horizontalPadding,"px")},d={width:"".concat(i.width,"%"),minWidth:"fit-content",cursor:"pointer"};return o.createElement("div",{style:a},o.createElement("a",{href:i.link||void 0,style:d,target:"_blank"},o.createElement("div",{dangerouslySetInnerHTML:{__html:i.text},style:t({},l)})))}));export{i as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"react";import{observer as t}from"mobx-react";import{ImageFitEnum as r}from"../../models/modal/step/elements/image/index.js";var
|
|
1
|
+
import e from"react";import{observer as t}from"mobx-react";import{ImageFitEnum as r}from"../../models/modal/step/elements/image/index.js";var a=t((function(t){var a=t.element,d=t.popup,i=t.editModeChildren,o=a;o.cdnURL||(o.cdnURL=d.cdnURL),o.merchantId||(o.merchantId=d.merchantId);var n=d.modal.windowSettings,c={width:n.takeFullWidth?"100%":n.maxWidth,backgroundColor:o.bgColor,padding:"".concat(o.verticalPadding,"px ").concat(o.horizontalPadding,"px"),borderRadius:o.borderRadius};if(!o.src&&d.isPreviewMode&&i)return e.createElement("div",{style:c},i);var m={objectFit:o.objectFit===r.CONTAIN?"contain":"cover",height:"100%"};return e.createElement("a",{href:o.link||void 0,style:c,target:"_blank"},o.src&&e.createElement("img",{src:o.src||void 0,width:"100% !important",style:m}))}));export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"react";import{observer as t}from"mobx-react";import{ImagePositionEnum as
|
|
1
|
+
import e from"react";import{observer as t}from"mobx-react";import{ImagePositionEnum as r,ImageFitEnum as i}from"../../models/modal/step/elements/image/index.js";var o=t((function(t){var o=t.element,a=t.popup,n=t.editModeChildren,d=o;if(d.cdnURL||(d.cdnURL=a.cdnURL),d.merchantId||(d.merchantId=a.merchantId),!d.src&&a.isPreviewMode&&n)return n;var c={display:"flex",alignItems:"center",justifyContent:d.imagePosition===r.DISABLE_FLOAT?"center":d.imagePosition===r.FLOAT_LEFT?"flex-start":"flex-end",padding:"".concat(d.verticalPadding,"px ").concat(d.horizontalPadding,"px"),backgroundColor:d.bgColor,maxWidth:"100%"},m={borderRadius:"".concat(d.borderRadius,"px"),objectFit:d.objectFit===i.CONTAIN?"contain":"cover",width:"".concat(d.maxWidth,"%")};return e.createElement("a",{href:d.link||void 0,style:c,target:"_blank"},e.createElement("img",{src:d.src||void 0,width:100===d.maxWidth?"100% !important":void 0,style:m}))}));export{o as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"react";import{observer as t}from"mobx-react";import{getHorizontalAlignment as r}from"../../helpers/index.js";var n=t((function(t){var n=t.element,i=n.socialMediaLinks.filter((function(e){return!!e.link})).sort((function(e,t){return e.order-t.order}));if(!i.length&&t.editModeChildren&&t.popup.isPreviewMode)return t.editModeChildren;var o={display:"flex",alignItems:"center",justifyContent:r(n.horizontalAlignment),padding:"".concat(n.verticalPadding,"px ").concat(n.horizontalPadding,"px"),backgroundColor:n.bgColor,width:"100%"},a={display:"flex",alignItems:"center",gap:"".concat(n.gapBetweenLogos,"px")};return e.createElement("div",{style:o},e.createElement("div",{style:a},i.map((function(t,r){return e.createElement("a",{href:t.link||"",key:r},e.createElement("img",{src:t.iconUrlWithoutHash||"",width:24,height:24}))}))))}));export{n as default};
|
|
1
|
+
import e from"react";import{observer as t}from"mobx-react";import{getHorizontalAlignment as r}from"../../helpers/index.js";var n=t((function(t){var n=t.element,i=n.socialMediaLinks.filter((function(e){return!!e.link})).sort((function(e,t){return e.order-t.order}));if(!i.length&&t.editModeChildren&&t.popup.isPreviewMode)return t.editModeChildren;var o={display:"flex",alignItems:"center",justifyContent:r(n.horizontalAlignment),padding:"".concat(n.verticalPadding,"px ").concat(n.horizontalPadding,"px"),backgroundColor:n.bgColor,width:"100%"},a={display:"flex",alignItems:"center",gap:"".concat(n.gapBetweenLogos,"px")};return e.createElement("div",{style:o},e.createElement("div",{style:a},i.map((function(t,r){return e.createElement("a",{href:t.link||"",key:r,target:"_blank"},e.createElement("img",{src:t.iconUrlWithoutHash||"",width:24,height:24}))}))))}));export{n as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__extends as t,__assign as o}from'./../../../../../../ext/tslib/tslib.es6.mjs.js';import{makeObservable as r,observable as n,action as e}from"mobx";import{PopupElementTypeEnum as i,BaseElement as s}from"../base/index.js";import{ButtonElement as a}from"../button/index.js";import{FormSettings as l}from"./form-settings/index.js";import{CustomerNameFormItem as u}from"./customer-name/index.js";import{CustomerSurnameFormItem as d}from"./customer-surname/index.js";import{CustomerEmailFormItem as m}from"./customer-email/index.js";import{CustomerPhoneFormItem as p}from"./customer-phone/index.js";import{CustomerBirthdayFormItem as E}from"./customer-birthday/index.js";import{CustomerGenderFormItem as c}from"./customer-gender/index.js";import{CheckboxFormItem as h}from"./checkbox/index.js";import{CustomerAttributeFormItem as T}from"./customer-attribute/index.js";import{Popup as C}from"../../../../index.js";var M;!function(t){t.CUSTOMER_NAME="CUSTOMER_NAME",t.CUSTOMER_SURNAME="CUSTOMER_SURNAME",t.CUSTOMER_EMAIL="CUSTOMER_EMAIL",t.CUSTOMER_PHONE="CUSTOMER_PHONE",t.CUSTOMER_BIRTHDAY="CUSTOMER_BIRTHDAY",t.CUSTOMER_GENDER="CUSTOMER_GENDER",t.CHECKBOX_FORM_ITEM="CHECKBOX_FORM_ITEM",t.CUSTOMER_ATTRIBUTE="CUSTOMER_ATTRIBUTE"}(M||(M={}));var f=function(o){function s(t,s){void 0===t&&(t={});var u,d,m,p,E=this;return(E=o.call(this,t)||this).type=i.FORM,E.rows=t.rows?t.rows.map((function(t){return new R(t)})):[],E.formSettings=t.formSettings||new l,E.buttonSettings=t.buttonSettings||new a({outerHorizontalPadding:0,outerVerticalPadding:0,buttonBgColor:"#000000",borderColor:"#000000"}),E.bgColor=t.bgColor||"",E.outerVerticalPadding=null!==(u=t.outerVerticalPadding)&&void 0!==u?u:
|
|
1
|
+
import{__extends as t,__assign as o}from'./../../../../../../ext/tslib/tslib.es6.mjs.js';import{makeObservable as r,observable as n,action as e}from"mobx";import{PopupElementTypeEnum as i,BaseElement as s}from"../base/index.js";import{ButtonElement as a}from"../button/index.js";import{FormSettings as l}from"./form-settings/index.js";import{CustomerNameFormItem as u}from"./customer-name/index.js";import{CustomerSurnameFormItem as d}from"./customer-surname/index.js";import{CustomerEmailFormItem as m}from"./customer-email/index.js";import{CustomerPhoneFormItem as p}from"./customer-phone/index.js";import{CustomerBirthdayFormItem as E}from"./customer-birthday/index.js";import{CustomerGenderFormItem as c}from"./customer-gender/index.js";import{CheckboxFormItem as h}from"./checkbox/index.js";import{CustomerAttributeFormItem as T}from"./customer-attribute/index.js";import{Popup as C}from"../../../../index.js";var M;!function(t){t.CUSTOMER_NAME="CUSTOMER_NAME",t.CUSTOMER_SURNAME="CUSTOMER_SURNAME",t.CUSTOMER_EMAIL="CUSTOMER_EMAIL",t.CUSTOMER_PHONE="CUSTOMER_PHONE",t.CUSTOMER_BIRTHDAY="CUSTOMER_BIRTHDAY",t.CUSTOMER_GENDER="CUSTOMER_GENDER",t.CHECKBOX_FORM_ITEM="CHECKBOX_FORM_ITEM",t.CUSTOMER_ATTRIBUTE="CUSTOMER_ATTRIBUTE"}(M||(M={}));var f=function(o){function s(t,s){void 0===t&&(t={});var u,d,m,p,E=this;return(E=o.call(this,t)||this).type=i.FORM,E.rows=t.rows?t.rows.map((function(t){return new R(t)})):[],E.formSettings=t.formSettings||new l,E.buttonSettings=t.buttonSettings||new a({outerHorizontalPadding:0,outerVerticalPadding:0,buttonBgColor:"#000000",borderColor:"#000000"}),E.bgColor=t.bgColor||"",E.outerVerticalPadding=null!==(u=t.outerVerticalPadding)&&void 0!==u?u:10,E.outerHorizontalPadding=null!==(d=t.outerHorizontalPadding)&&void 0!==d?d:0,E.verticalPadding=null!==(m=t.verticalPadding)&&void 0!==m?m:0,E.horizontalPadding=null!==(p=t.horizontalPadding)&&void 0!==p?p:0,r(E,{rows:n,formSettings:n,buttonSettings:n,bgColor:n,addNewElement:e.bound}),0===E.rows.length&&1===s&&E.addNewElement(M.CUSTOMER_EMAIL),E}return t(s,o),s.prototype.addNewElement=function(t){var o=new R({order:this.rows.length,columns:[new w({type:t,order:0})]});this.rows.push(o)},s}(s),R=function(){function t(t){var o;void 0===t&&(t={}),this.id=t.id||Date.now().toString(),this.order=null!==(o=t.order)&&void 0!==o?o:0,this.columns=t.columns?t.columns.map((function(t){return new w(t)})):[],r(this,{id:n,order:n,columns:n,addNewElement:e.bound,changeColumnSort:e.bound})}return t.prototype.addNewElement=function(t){this.columns.push(new w({type:t,order:this.columns.length}))},t.prototype.changeColumnSort=function(){this.columns.forEach((function(t,o){0===o?t.order=t.order+1:1===o&&(t.order=t.order-1)})),this.columns=this.columns.sort((function(t,o){return t.order-o.order}))},t}(),w=function(){function t(t){var o;void 0===t&&(t={}),this.id=t.id||Date.now().toString(),this.order=null!==(o=t.order)&&void 0!==o?o:0,this.type=t.type||M.CUSTOMER_NAME,this.formItem=this.setFormItems(t.formItem),r(this,{id:n,order:n,type:n,formItem:n,setFormItems:e.bound})}return t.prototype.setFormItems=function(t){switch(this.type){case M.CUSTOMER_NAME:return new u(t?o({},t):{inputLabel:new S({text:C.t("popup:initialClassTranslations.firstName")})});case M.CUSTOMER_SURNAME:return new d(t?o({},t):{inputLabel:new S({text:C.t("popup:initialClassTranslations.lastName")})});case M.CUSTOMER_EMAIL:return new m(t?o({},t):{inputLabel:new S({text:C.t("popup:initialClassTranslations.email")})});case M.CUSTOMER_PHONE:return new p(t?o({},t):{inputLabel:new S({text:C.t("popup:initialClassTranslations.phone")})});case M.CUSTOMER_BIRTHDAY:return new E(t?o({},t):{inputLabel:new S({text:C.t("popup:initialClassTranslations.birthday")})});case M.CUSTOMER_GENDER:return new c(t?o({},t):{inputLabel:new S({text:C.t("popup:initialClassTranslations.gender")})});case M.CHECKBOX_FORM_ITEM:return new h(o({},t));case M.CUSTOMER_ATTRIBUTE:return new T(o({},t))}},t}(),S=function(t){void 0===t&&(t={}),this.text=t.text||C.t("popup:initialClassTranslations.inputLabel"),r(this,{text:n})},g=function(t){void 0===t&&(t={}),this.validationErrorMessage=t.validationErrorMessage||C.t("popup:initialClassTranslations.requiredFieldErrorMessage"),this.hasError=t.hasError||!1,r(this,{validationErrorMessage:n,hasError:n})},O=function(t){void 0===t&&(t={}),this.text=t.text||C.t("popup:initialClassTranslations.placeholder"),r(this,{text:n})};export{w as FormColumn,f as FormElement,M as FormItemTypeEnum,R as FormRow,S as InputLabel,O as InputPlaceholder,g as RequiredInput};
|