@ikas/popup-renderer 1.0.105 → 1.0.107

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.
@@ -1 +1 @@
1
- import{__awaiter as e,__generator as r}from'./../../../ext/tslib/tslib.es6.mjs.js';import t from"react";import{observer as n}from"mobx-react";import{getHorizontalAlignment as o,injectFontScript as a,validateEmail as i,validatePhoneNumber as l}from"../../helpers/index.js";import{FormItemTypeEnum as s}from"../../models/modal/step/elements/form/index.js";import u from"../button-element-renderer/index.js";import m from"./input-item-view/index.js";import{CheckboxItemView as c}from"./checkbox-item-view/index.js";import d from"./date-item-view/index.js";import f from"./gender-item-view/index.js";var E=n((function(n){var E=n.element,p=n.popup,v=n.isPreviewMode,C=n.sfProps,M=t.useState(!1);M[0];var I=M[1],h=E,S=h.rows.slice().sort((function(e,r){return e.order-r.order})),g=h.formSettings,R=h.buttonSettings,O=h.bgColor,T={display:"flex",flexDirection:"column",alignItems:"center",justifyContent:o(h.horizontalAlignment),gap:"".concat(g.gapBetweenItems,"px"),padding:"".concat(h.verticalPadding,"px ").concat(h.horizontalPadding,"px"),backgroundColor:O,width:"100%"},_={display:"flex",flexDirection:"row",width:"100%",gap:"".concat(g.gapBetweenItems,"px")},U={flex:1,display:"flex",alignItems:"flex-end",fontFamily:a(g.fontFamily),fontSize:g.fontSize},b=function(){return e(void 0,void 0,void 0,(function(){var e,t,n;return r(this,(function(r){switch(r.label){case 0:return e=p.modal.steps.findIndex((function(e){return e.id===p.modal.selectedStep.id})),t=e===p.modal.steps.length-2,!v&&C&&t?(I(!0),function(){var e=!1;return h.rows.forEach((function(r){r.columns.forEach((function(r){switch(r.type){case s.CUSTOMER_BIRTHDAY:var t=r.formItem;t.required&&!t.value&&(t.required.hasError=!0,e=!0);break;case s.CUSTOMER_EMAIL:case s.CUSTOMER_PHONE:case s.CUSTOMER_NAME:case s.CUSTOMER_SURNAME:case s.CHECKBOX_FORM_ITEM:var n=r.formItem;if(n.required&&!n.value){if(n.type===s.CUSTOMER_EMAIL&&(null==C?void 0:C.isCustomerLoggedIn))return;n.required.hasError=!0,e=!0}else if(r.type===s.CUSTOMER_EMAIL){var o=i(n.value||"");n.validEmailError.hasError=!o,e=!o}else if(r.type===s.CUSTOMER_PHONE){var a=l(n.value||"");n.validPhoneError.hasError=!a,e=!a}break;case s.CUSTOMER_GENDER:var u=r.formItem,m=u.genders.find((function(e){return e.isSelected}));u.required&&!m&&(u.required.hasError=!0,e=!0);case s.CHECKBOX_FORM_ITEM:var c=r.formItem;c.requiredToBeChecked&&!c.isChecked&&(c.requiredToBeChecked.hasError=!0,e=!0)}}))})),e}()?(I(!1),[2]):(n={},h.rows.forEach((function(e){e.columns.forEach((function(e){var r;switch(e.type){case s.CUSTOMER_BIRTHDAY:n.birthday=e.formItem.value;break;case s.CUSTOMER_EMAIL:n.email=e.formItem.value;break;case s.CUSTOMER_GENDER:n.gender=(null===(r=e.formItem.genders.find((function(e){return e.isSelected})))||void 0===r?void 0:r.type)||"";break;case s.CUSTOMER_PHONE:n.phone=e.formItem.value;break;case s.CUSTOMER_NAME:n.firstName=e.formItem.value||"";break;case s.CUSTOMER_SURNAME:n.lastName=e.formItem.value||"";break;case s.CHECKBOX_FORM_ITEM:n.hasPermission=e.formItem.isChecked}}))})),[4,C.onCustomerSave(n)])):[3,2];case 1:r.sent(),I(!1),r.label=2;case 2:return-1!==e&&e<p.modal.steps.length&&(p.modal.selectedStep=p.modal.steps[e+1]),[2]}}))}))},x={width:"".concat(R.width,"%"),minWidth:"fit-content"};return t.createElement("div",{style:T},S.map((function(e,r){return t.createElement("div",{style:_,key:r},e.columns.slice().sort((function(e,r){return e.order-r.order})).map((function(e,r){return t.createElement("div",{style:U,key:r},function(e){switch(e.type){case s.CUSTOMER_EMAIL:case s.CUSTOMER_PHONE:case s.CUSTOMER_NAME:case s.CUSTOMER_SURNAME:var r=e.formItem;if(r.type===s.CUSTOMER_EMAIL&&(null==C?void 0:C.isCustomerLoggedIn)&&!v)return null;var n=void 0;if(e.type===s.CUSTOMER_EMAIL){var o=r;o.validEmailError.hasError&&(n=o.validEmailError.validationErrorMessage)}else if(e.type===s.CUSTOMER_PHONE){var a=r;a.validPhoneError.hasError&&(n=a.validPhoneError.validationErrorMessage)}return t.createElement(m,{formInputSettings:g.formInputSettings,inputLabel:r.inputLabel,isRequired:r.required,onValueChange:function(e){return v?null:r.value=e},placeholder:r.placeholder,updateCurrentInfo:r.updateCurrentInfo,value:r.value||"",validationErrorMessage:n});case s.CUSTOMER_BIRTHDAY:var i=e.formItem;return t.createElement(d,{formInputSettings:g.formInputSettings,inputLabel:i.inputLabel,isRequired:i.required,onValueChange:function(e){return v?null:i.value=e},placeholder:i.placeholder,updateCurrentInfo:i.updateCurrentInfo,value:i.value||""});case s.CUSTOMER_GENDER:var l=e.formItem;return t.createElement(f,{genderFormItem:l,formInputSettings:g.formInputSettings,onValueChange:function(e){return v?null:l.genders.forEach((function(r){r.isSelected=r.label===e}))}});case s.CHECKBOX_FORM_ITEM:return t.createElement(c,{checkboxItem:e.formItem})}}(e))})))})),t.createElement("div",{style:x,onClick:function(e){b(),e.preventDefault(),e.stopPropagation()}},t.createElement(u,{element:R})," "))}));export{E as default};
1
+ import{__awaiter as e,__generator as r}from'./../../../ext/tslib/tslib.es6.mjs.js';import t from"react";import{observer as n}from"mobx-react";import{getHorizontalAlignment as o,injectFontScript as a,validateEmail as i,validatePhoneNumber as l}from"../../helpers/index.js";import{FormItemTypeEnum as s}from"../../models/modal/step/elements/form/index.js";import u from"../button-element-renderer/index.js";import m from"./input-item-view/index.js";import{CheckboxItemView as c}from"./checkbox-item-view/index.js";import d from"./date-item-view/index.js";import f from"./gender-item-view/index.js";var E=n((function(n){var E=n.element,p=n.popup,v=n.isPreviewMode,C=n.sfProps,M=t.useState(!1);M[0];var I=M[1],h=E,S=h.rows.slice().sort((function(e,r){return e.order-r.order})),g=h.formSettings,R=h.buttonSettings,O=h.bgColor,T={display:"flex",flexDirection:"column",alignItems:"center",justifyContent:o(h.horizontalAlignment),gap:"".concat(g.gapBetweenItems,"px"),padding:"".concat(h.outerVerticalPadding,"px ").concat(h.outerHorizontalPadding,"px"),backgroundColor:O,width:"100%"},_={display:"flex",flexDirection:"row",width:"100%",gap:"".concat(g.gapBetweenItems,"px")},U={flex:1,display:"flex",alignItems:"flex-end",fontFamily:a(g.fontFamily),fontSize:g.fontSize},b=function(){return e(void 0,void 0,void 0,(function(){var e,t,n;return r(this,(function(r){switch(r.label){case 0:return e=p.modal.steps.findIndex((function(e){return e.id===p.modal.selectedStep.id})),t=e===p.modal.steps.length-2,!v&&C&&t?(I(!0),function(){var e=!1;return h.rows.forEach((function(r){r.columns.forEach((function(r){switch(r.type){case s.CUSTOMER_BIRTHDAY:var t=r.formItem;t.required&&!t.value&&(t.required.hasError=!0,e=!0);break;case s.CUSTOMER_EMAIL:case s.CUSTOMER_PHONE:case s.CUSTOMER_NAME:case s.CUSTOMER_SURNAME:case s.CHECKBOX_FORM_ITEM:var n=r.formItem;if(n.required&&!n.value){if(n.type===s.CUSTOMER_EMAIL&&(null==C?void 0:C.isCustomerLoggedIn))return;n.required.hasError=!0,e=!0}else if(r.type===s.CUSTOMER_EMAIL){var o=i(n.value||"");n.validEmailError.hasError=!o,e=!o}else if(r.type===s.CUSTOMER_PHONE){var a=l(n.value||"");n.validPhoneError.hasError=!a,e=!a}break;case s.CUSTOMER_GENDER:var u=r.formItem,m=u.genders.find((function(e){return e.isSelected}));u.required&&!m&&(u.required.hasError=!0,e=!0);case s.CHECKBOX_FORM_ITEM:var c=r.formItem;c.requiredToBeChecked&&!c.isChecked&&(c.requiredToBeChecked.hasError=!0,e=!0)}}))})),e}()?(I(!1),[2]):(n={},h.rows.forEach((function(e){e.columns.forEach((function(e){var r;switch(e.type){case s.CUSTOMER_BIRTHDAY:n.birthday=e.formItem.value;break;case s.CUSTOMER_EMAIL:n.email=e.formItem.value;break;case s.CUSTOMER_GENDER:n.gender=(null===(r=e.formItem.genders.find((function(e){return e.isSelected})))||void 0===r?void 0:r.type)||"";break;case s.CUSTOMER_PHONE:n.phone=e.formItem.value;break;case s.CUSTOMER_NAME:n.firstName=e.formItem.value||"";break;case s.CUSTOMER_SURNAME:n.lastName=e.formItem.value||"";break;case s.CHECKBOX_FORM_ITEM:n.hasPermission=e.formItem.isChecked}}))})),[4,C.onCustomerSave(n)])):[3,2];case 1:r.sent(),I(!1),r.label=2;case 2:return-1!==e&&e<p.modal.steps.length&&(p.modal.selectedStep=p.modal.steps[e+1]),[2]}}))}))},x={width:"".concat(R.width,"%"),minWidth:"fit-content"};return t.createElement("div",{style:T},S.map((function(e,r){return t.createElement("div",{style:_,key:r},e.columns.slice().sort((function(e,r){return e.order-r.order})).map((function(e,r){return t.createElement("div",{style:U,key:r},function(e){switch(e.type){case s.CUSTOMER_EMAIL:case s.CUSTOMER_PHONE:case s.CUSTOMER_NAME:case s.CUSTOMER_SURNAME:var r=e.formItem;if(r.type===s.CUSTOMER_EMAIL&&(null==C?void 0:C.isCustomerLoggedIn)&&!v)return null;var n=void 0;if(e.type===s.CUSTOMER_EMAIL){var o=r;o.validEmailError.hasError&&(n=o.validEmailError.validationErrorMessage)}else if(e.type===s.CUSTOMER_PHONE){var a=r;a.validPhoneError.hasError&&(n=a.validPhoneError.validationErrorMessage)}return t.createElement(m,{formInputSettings:g.formInputSettings,inputLabel:r.inputLabel,isRequired:r.required,onValueChange:function(e){return v?null:r.value=e},placeholder:r.placeholder,updateCurrentInfo:r.updateCurrentInfo,value:r.value||"",validationErrorMessage:n});case s.CUSTOMER_BIRTHDAY:var i=e.formItem;return t.createElement(d,{formInputSettings:g.formInputSettings,inputLabel:i.inputLabel,isRequired:i.required,onValueChange:function(e){return v?null:i.value=e},placeholder:i.placeholder,updateCurrentInfo:i.updateCurrentInfo,value:i.value||""});case s.CUSTOMER_GENDER:var l=e.formItem;return t.createElement(f,{genderFormItem:l,formInputSettings:g.formInputSettings,onValueChange:function(e){return v?null:l.genders.forEach((function(r){r.isSelected=r.label===e}))}});case s.CHECKBOX_FORM_ITEM:return t.createElement(c,{checkboxItem:e.formItem})}}(e))})))})),t.createElement("div",{style:x,onClick:function(e){b(),e.preventDefault(),e.stopPropagation()}},t.createElement(u,{element:R})," "))}));export{E as default};
@@ -1 +1 @@
1
- import e from"react";import{observer as r}from"mobx-react";var o=r((function(r){var o=e.useState(!1),t=o[0],l=o[1];e.useRef(null);var a=r.placeholder,n=r.isRequired,c=r.inputLabel;r.updateCurrentInfo;var i=r.validationErrorMessage,d=r.formInputSettings,u=r.value,p=r.onValueChange;d.bgColor&&"".concat(d.bgColor),"".concat(d.borderWidth,"px solid ").concat(t?d.focusBorderColor:d.borderColor),"".concat(d.borderRadius,"px"),"".concat(d.height,"px");return e.createElement("div",{style:{width:"100%",display:"flex",gap:2,flexDirection:"column"}},(c||n)&&e.createElement("div",{style:{display:"flex",flexDirection:"column",gap:4,marginBottom:"6px"}},e.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"}},c&&e.createElement("label",{style:{color:"black",fontSize:"14px"}},c.text),n&&e.createElement("label",{style:{color:"black",fontSize:"14px"}},"*")),n&&n.hasError&&e.createElement("div",{style:{color:"red",fontSize:"12px"}},n.validationErrorMessage),!!i&&e.createElement("div",{style:{color:"red",fontSize:"12px"}},i)),e.createElement("input",{type:"text",placeholder:(null==a?void 0:a.text)||"",value:u||"",onChange:function(e){return function(e){p(e),n&&n.hasError&&e.length>0&&(n.hasError=!1)}(e.target.value)},style:{width:"100%",backgroundColor:d.bgColor?"".concat(d.bgColor):"transparent",border:"".concat(d.borderWidth,"px solid ").concat(t?d.focusBorderColor:d.borderColor),borderRadius:"".concat(d.borderRadius,"px"),fontSize:"14px",padding:"10px 12px",height:"".concat(d.height,"px")},onFocus:function(){return l(!0)},onBlur:function(){return l(!1)}}))}));export{o as default};
1
+ import e from"react";import{observer as t}from"mobx-react";var r=t((function(t){var r=e.useState(!1),o=r[0],n=r[1];e.useRef(null);var l=t.placeholder,a=t.isRequired,i=t.inputLabel;t.updateCurrentInfo;var c=t.validationErrorMessage,d=t.formInputSettings,u=t.value,p=t.onValueChange,s={width:"100%",backgroundColor:d.bgColor?"".concat(d.bgColor):"transparent",border:"".concat(d.borderWidth,"px solid ").concat(o?d.focusBorderColor:d.borderColor),borderRadius:"".concat(d.borderRadius,"px"),fontSize:"14px",padding:"10px 12px",height:"".concat(d.height,"px"),outline:"none"};return e.createElement("div",{style:{width:"100%",display:"flex",gap:2,flexDirection:"column"}},(i||a)&&e.createElement("div",{style:{display:"flex",flexDirection:"column",gap:4,marginBottom:"6px"}},e.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"}},i&&e.createElement("label",{style:{color:"black",fontSize:"14px"}},i.text),a&&e.createElement("label",{style:{color:"black",fontSize:"14px"}},"*")),a&&a.hasError&&e.createElement("div",{style:{color:"red",fontSize:"12px"}},a.validationErrorMessage),!!c&&e.createElement("div",{style:{color:"red",fontSize:"12px"}},c)),e.createElement("input",{type:"text",placeholder:(null==l?void 0:l.text)||"",value:u||"",onChange:function(e){return function(e){p(e),a&&a.hasError&&e.length>0&&(a.hasError=!1)}(e.target.value)},style:s,onFocus:function(){return n(!0)},onBlur:function(){return n(!1)}}))}));export{r as default};
@@ -1 +1 @@
1
- import{__spreadArray as t,__assign as e}from'./../../../ext/tslib/tslib.es6.mjs.js';import o from"react";import{observer as n}from"mobx-react";import{getHorizontalAlignment as i,injectFontScript as l}from"../../helpers/index.js";import{ProductListTypeEnum as r,ProductListLayoutEnum as d}from"../../models/modal/step/elements/product/index.js";import a from"../button-element-renderer/index.js";import{Navigation as c,Scrollbar as u}from"swiper/modules";import{Swiper as s,SwiperSlide as v}from"swiper/react";import m from"../../assets/left-arrow.js";import g from"../../assets/right-arrow.js";var p=n((function(n){var p,f=n.element,b=n.products,h=n.popup,x=n.editModeChildren,y=n.isPreviewMode,E=o.useState(null),C=E[0],w=E[1],P=o.useState(!1),S=P[0],R=P[1],z=o.useState(!1),W=z[0],I=z[1],j=f,k=[];if(b&&(k=j.listType===r.SPECIFIC?(null===(p=j.variantPairs)||void 0===p?void 0:p.length)?b.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([],b,!0)),k.length>j.maxProductsToShow&&(k.length=j.maxProductsToShow),!(k&&k.length||!h.isPreviewMode)&&x)return x;if(!k||!k.length)return null;j.gapBetweenProductElements;var F=j.productDetailSettings.image,D=j.productDetailSettings.button,A=j.buttonSettings,N=j.productDetailSettings.discountRatio,B=j.productDetailSettings.finalPrice,M=j.productDetailSettings.originalPrice,L=j.productDetailSettings.name,O=i(j.horizontalAlignment),T=1;j.layout===d.ONE_COLUMN?T=1:j.layout===d.TWO_COLUMN?T=2:j.layout===d.THREE_COLUMN&&(T=3);var U={padding:"".concat(j.verticalPadding,"px ").concat(j.horizontalPadding,"px"),backgroundColor:j.productBgColor,width:"100%",height:"max-content"},_={display:"flex",flexDirection:"column",justifyContent:"space-between",alignItems:"center",height:"100%"},H={display:"flex",justifyContent:O,alignItems:"center",width:"100%",backgroundColor:null==F?void 0:F.bgColor,borderRadius:(null==F?void 0:F.borderRadius)?"".concat(F.borderRadius,"px"):void 0},V={width:"".concat(null==F?void 0:F.maxWidth,"%"),objectFit:"contain",borderRadius:(null==F?void 0:F.borderRadius)?"".concat(F.borderRadius,"px"):void 0},$={display:"flex",flexDirection:"column",width:"100%"},q={display:"flex",flexDirection:"column"},G={backgroundColor:null==L?void 0:L.bgColor,color:null==L?void 0:L.color,fontFamily:L?l(L.fontFamily):void 0,fontSize:null==L?void 0:L.fontSize,fontWeight:null==L?void 0:L.fontWeight,padding:"".concat(null==L?void 0:L.verticalPadding,"px ").concat(null==L?void 0:L.horizontalPadding,"px"),width:"100%",textAlign:null==L?void 0:L.horizontalAlignment,border:"".concat(null==L?void 0:L.borderWidth,"px ").concat(null==L?void 0:L.borderStyle," ").concat(null==L?void 0:L.borderColor),borderRadius:null==L?void 0:L.borderRadius},J={backgroundColor:null==N?void 0:N.bgColor,color:null==N?void 0:N.color,fontFamily:N?l(N.fontFamily):void 0,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},K={textDecoration:"line-through",backgroundColor:null==M?void 0:M.bgColor,color:null==M?void 0:M.color,fontFamily:M?l(M.fontFamily):void 0,fontSize:null==M?void 0:M.fontSize,fontWeight:null==M?void 0:M.fontWeight,padding:"".concat(null==M?void 0:M.verticalPadding,"px ").concat(null==M?void 0:M.horizontalPadding,"px"),width:"100%",textAlign:null==M?void 0:M.horizontalAlignment,border:"".concat(null==M?void 0:M.borderWidth,"px ").concat(null==M?void 0:M.borderStyle," ").concat(null==M?void 0:M.borderColor),borderRadius:null==M?void 0:M.borderRadius},Q={backgroundColor:null==B?void 0:B.bgColor,color:null==B?void 0:B.color,fontFamily:B?l(B.fontFamily):void 0,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},X={width:"".concat(A.width,"%"),minWidth:"fit-content"},Y=e({display:"flex",justifyContent:"center",width:"100%",gap:"10px"},1===T?{position:"absolute",top:0,left:0,right:0,bottom:0,alignItems:"center",justifyContent:"space-between",zIndex:10}:void 0),Z={padding:10,display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"100%",border:"1px solid #EEF2F6",cursor:"pointer"};return o.createElement("div",{style:U},o.createElement(s,{onSwiper:w,modules:[c,u],spaceBetween:j.gapBetweenProducts,slidesPerView:T,navigation:{nextEl:".custom-next-button",prevEl:".custom-prev-button"},scrollbar:void 0},k.map((function(t,e){return o.createElement(v,{style:{height:"auto"},key:t.variantId},o.createElement("div",{style:_,onClick:function(){return function(t){if(!y&&t.url){var e=document.createElement("a");e.href=t.url,e.target="_blank",e.click()}}(t)}},o.createElement("div",{style:$},!!F&&t.imageURL&&o.createElement("div",{style:H},o.createElement("img",{src:t.imageURL||void 0,alt:t.name||void 0,style:V})),(!!L||!!N)&&o.createElement("div",{style:q},!!L&&o.createElement("div",{style:G},t.name),!!N&&!!t.discountPrice&&o.createElement("div",{style:J},t.$discountRatio)),(!!M||!!B)&&o.createElement("div",null,!!M&&!!t.discountPrice&&o.createElement("div",{style:K},t.price),!!B&&o.createElement("div",{style:Q},t.discountPrice||t.price))),!!D&&o.createElement("div",{style:X}," ",o.createElement(a,{element:A})," ")))})),o.createElement("div",{style:Y},o.createElement("div",{className:"custom-prev-button",style:e(e({},Z),S?{opacity:.5,cursor:"not-allowed"}:{}),onClick:function(){C&&(C.slidePrev(),I(C.isEnd),R(C.isBeginning))}},o.createElement(m,null)),o.createElement("div",{className:"custom-next-button",style:e(e({},Z),W?{opacity:.5,cursor:"not-allowed"}:{}),onClick:function(){C&&(C.slideNext(),I(C.isEnd),R(C.isBeginning))}},o.createElement(g,null)))))}));export{p as default};
1
+ import{__spreadArray as t,__assign as e}from'./../../../ext/tslib/tslib.es6.mjs.js';import o from"react";import{observer as n}from"mobx-react";import{getHorizontalAlignment as i,injectFontScript as l}from"../../helpers/index.js";import{ProductListTypeEnum as r,ProductListLayoutEnum as d}from"../../models/modal/step/elements/product/index.js";import a from"../button-element-renderer/index.js";import{Navigation as c,Scrollbar as u}from"swiper/modules";import{Swiper as s,SwiperSlide as v}from"swiper/react";import m from"../../assets/left-arrow.js";import g from"../../assets/right-arrow.js";var p=n((function(n){var p,f=n.element,b=n.products,h=n.popup,x=n.editModeChildren,y=n.isPreviewMode,E=o.useState(null),C=E[0],w=E[1],P=o.useState(!1),S=P[0],R=P[1],z=o.useState(!1),W=z[0],I=z[1],j=f,k=[];if(b&&(k=j.listType===r.SPECIFIC?(null===(p=j.variantPairs)||void 0===p?void 0:p.length)?b.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([],b,!0)),k.length>j.maxProductsToShow&&(k.length=j.maxProductsToShow),!(k&&k.length||!h.isPreviewMode)&&x)return x;if(!k||!k.length)return null;j.gapBetweenProductElements;var F=j.productDetailSettings.image,D=j.productDetailSettings.button,A=j.buttonSettings,N=j.productDetailSettings.discountRatio,B=j.productDetailSettings.finalPrice,M=j.productDetailSettings.originalPrice,L=j.productDetailSettings.name,O=i(j.horizontalAlignment),T=1;j.layout===d.ONE_COLUMN?T=1:j.layout===d.TWO_COLUMN?T=2:j.layout===d.THREE_COLUMN&&(T=3);var U={padding:"".concat(j.outerVerticalPadding,"px ").concat(j.outerHorizontalPadding,"px"),backgroundColor:j.productBgColor,width:"100%",height:"max-content"},_={display:"flex",flexDirection:"column",justifyContent:"space-between",alignItems:"center",height:"100%"},H={display:"flex",justifyContent:O,alignItems:"center",width:"100%",backgroundColor:null==F?void 0:F.bgColor,borderRadius:(null==F?void 0:F.borderRadius)?"".concat(F.borderRadius,"px"):void 0},V={width:"".concat(null==F?void 0:F.maxWidth,"%"),objectFit:"contain",borderRadius:(null==F?void 0:F.borderRadius)?"".concat(F.borderRadius,"px"):void 0},$={display:"flex",flexDirection:"column",width:"100%"},q={display:"flex",flexDirection:"column"},G={backgroundColor:null==L?void 0:L.bgColor,color:null==L?void 0:L.color,fontFamily:L?l(L.fontFamily):void 0,fontSize:null==L?void 0:L.fontSize,fontWeight:null==L?void 0:L.fontWeight,padding:"".concat(null==L?void 0:L.verticalPadding,"px ").concat(null==L?void 0:L.horizontalPadding,"px"),width:"100%",textAlign:null==L?void 0:L.horizontalAlignment,border:"".concat(null==L?void 0:L.borderWidth,"px ").concat(null==L?void 0:L.borderStyle," ").concat(null==L?void 0:L.borderColor),borderRadius:null==L?void 0:L.borderRadius},J={backgroundColor:null==N?void 0:N.bgColor,color:null==N?void 0:N.color,fontFamily:N?l(N.fontFamily):void 0,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},K={textDecoration:"line-through",backgroundColor:null==M?void 0:M.bgColor,color:null==M?void 0:M.color,fontFamily:M?l(M.fontFamily):void 0,fontSize:null==M?void 0:M.fontSize,fontWeight:null==M?void 0:M.fontWeight,padding:"".concat(null==M?void 0:M.verticalPadding,"px ").concat(null==M?void 0:M.horizontalPadding,"px"),width:"100%",textAlign:null==M?void 0:M.horizontalAlignment,border:"".concat(null==M?void 0:M.borderWidth,"px ").concat(null==M?void 0:M.borderStyle," ").concat(null==M?void 0:M.borderColor),borderRadius:null==M?void 0:M.borderRadius},Q={backgroundColor:null==B?void 0:B.bgColor,color:null==B?void 0:B.color,fontFamily:B?l(B.fontFamily):void 0,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},X={width:"".concat(A.width,"%"),minWidth:"fit-content"},Y=e({display:"flex",justifyContent:"center",width:"100%",gap:"10px"},1===T?{position:"absolute",top:0,left:0,right:0,bottom:0,alignItems:"center",justifyContent:"space-between",zIndex:10}:void 0),Z={padding:10,display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"100%",border:"1px solid #EEF2F6",cursor:"pointer"};return o.createElement("div",{style:U},o.createElement(s,{onSwiper:w,modules:[c,u],spaceBetween:j.gapBetweenProducts,slidesPerView:T,navigation:{nextEl:".custom-next-button",prevEl:".custom-prev-button"},scrollbar:void 0},k.map((function(t,e){return o.createElement(v,{style:{height:"auto"},key:t.variantId},o.createElement("div",{style:_,onClick:function(){return function(t){if(!y&&t.url){var e=document.createElement("a");e.href=t.url,e.target="_blank",e.click()}}(t)}},o.createElement("div",{style:$},!!F&&t.imageURL&&o.createElement("div",{style:H},o.createElement("img",{src:t.imageURL||void 0,alt:t.name||void 0,style:V})),(!!L||!!N)&&o.createElement("div",{style:q},!!L&&o.createElement("div",{style:G},t.name),!!N&&!!t.discountPrice&&o.createElement("div",{style:J},t.$discountRatio)),(!!M||!!B)&&o.createElement("div",null,!!M&&!!t.discountPrice&&o.createElement("div",{style:K},t.price),!!B&&o.createElement("div",{style:Q},t.discountPrice||t.price))),!!D&&o.createElement("div",{style:X}," ",o.createElement(a,{element:A})," ")))})),o.createElement("div",{style:Y},o.createElement("div",{className:"custom-prev-button",style:e(e({},Z),S?{opacity:.5,cursor:"not-allowed"}:{}),onClick:function(){C&&(C.slidePrev(),I(C.isEnd),R(C.isBeginning))}},o.createElement(m,null)),o.createElement("div",{className:"custom-next-button",style:e(e({},Z),W?{opacity:.5,cursor:"not-allowed"}:{}),onClick:function(){C&&(C.slideNext(),I(C.isEnd),R(C.isBeginning))}},o.createElement(g,null)))))}));export{p as default};
@@ -1 +1 @@
1
- import{makeObservable as t,observable as i,computed as e,action as P}from"mobx";import{PopupStep as n}from"./step/index.js";import{Teaser as s}from"./teaser/index.js";import{WindowSettings as o}from"./window-settings/index.js";import{Border as O,BackgroundSettings as T}from"./background-settings/index.js";import{CloseSettings as _}from"./close-settings/index.js";import{Popup as r}from"../index.js";var a,I;!function(t){t.POPUP="POPUP",t.NOTIFICATION_BAR="NOTIFICATION_BAR",t.DRAWER="DRAWER"}(a||(a={})),function(t){t.POPUP_TOP_LEFT="POPUP_TOP_LEFT",t.POPUP_TOP_CENTER="POPUP_TOP_CENTER",t.POPUP_TOP_RIGHT="POPUP_TOP_RIGHT",t.POPUP_MIDDLE_LEFT="POPUP_MIDDLE_LEFT",t.POPUP_MIDDLE_CENTER="POPUP_MIDDLE_CENTER",t.POPUP_MIDDLE_RIGHT="POPUP_MIDDLE_RIGHT",t.POPUP_BOTTOM_LEFT="POPUP_BOTTOM_LEFT",t.POPUP_BOTTOM_CENTER="POPUP_BOTTOM_CENTER",t.POPUP_BOTTOM_RIGHT="POPUP_BOTTOM_RIGHT",t.NOTIFICATION_BAR_UP="NOTIFICATION_BAR_UP",t.NOTIFICATION_BAR_DOWN="NOTIFICATION_BAR_DOWN",t.DRAWER_RIGHT="DRAWER_RIGHT",t.DRAWER_LEFT="DRAWER_LEFT"}(I||(I={}));var R=function(){function R(O){this.type=O.type||a.POPUP,this.teaser=O.teaser?new s(O.teaser):new s({backgroundSettings:new T({allowScrollingWhenPopupOpen:!0})}),this.windowSettings=O.windowSettings?new o(O.windowSettings):new o({borderRadius:4,outerVerticalPadding:12,outerHorizontalPadding:12}),this.backgroundSettings=new T(O.backgroundSettings||{}),this.closeSettings=new _(O.closeSettings||{}),this.steps=O.steps&&O.steps.length?O.steps.map((function(t){return new n(t)})):[new n({stepNumber:1,name:r.t("popup:initialClassTranslations.welcome"),isThankYouStep:!1})],this.isVisible=!1,this.selectedStep=this.steps[0],this.position=O.position?O.position:I.POPUP_MIDDLE_CENTER,t(this,{isVisible:i,type:i,position:i,teaser:i,windowSettings:i,backgroundSettings:i,closeSettings:i,steps:i,selectedStep:i,availablePositions:e,setInitialSettings:P.bound,setInitialPosition:P.bound,setInitialWindowSettings:P.bound})}return R.prototype.setInitialSettings=function(t){void 0===t&&(t=!1),this.setInitialPosition(t),this.setInitialWindowSettings(t)},R.prototype.setInitialPosition=function(t){switch(this.type){case a.POPUP:this.position=t?I.POPUP_BOTTOM_RIGHT:I.POPUP_MIDDLE_CENTER;break;case a.NOTIFICATION_BAR:this.position=I.NOTIFICATION_BAR_UP;break;case a.DRAWER:this.position=I.DRAWER_RIGHT}},R.prototype.setInitialWindowSettings=function(t){switch(this.type){case a.POPUP:this.windowSettings=new o({borderRadius:4,outerVerticalPadding:12,outerHorizontalPadding:12}),t&&(this.backgroundSettings.allowScrollingWhenPopupOpen=!0,this.backgroundSettings.overlay=null,this.backgroundSettings.border=new O({borderWidth:1,borderColor:"#E3E8EF"}));break;case a.NOTIFICATION_BAR:this.windowSettings=new o({outerHorizontalPadding:0,outerVerticalPadding:0,borderRadius:4,takeFullWidth:!0});break;case a.DRAWER:this.windowSettings=new o({borderRadius:4,outerHorizontalPadding:0,outerVerticalPadding:0,takeFullHeight:!0})}},Object.defineProperty(R.prototype,"availablePositions",{get:function(){var t;return(t={})[a.POPUP]=[I.POPUP_TOP_LEFT,I.POPUP_TOP_CENTER,I.POPUP_TOP_RIGHT,I.POPUP_MIDDLE_LEFT,I.POPUP_MIDDLE_CENTER,I.POPUP_MIDDLE_RIGHT,I.POPUP_BOTTOM_LEFT,I.POPUP_BOTTOM_CENTER,I.POPUP_BOTTOM_RIGHT],t[a.NOTIFICATION_BAR]=[I.NOTIFICATION_BAR_UP,I.NOTIFICATION_BAR_DOWN],t[a.DRAWER]=[I.DRAWER_RIGHT,I.DRAWER_LEFT],t},enumerable:!1,configurable:!0}),R}();export{R as Modal,I as PopupPositonEnum,a as PopupTypeEnum};
1
+ import{makeObservable as t,observable as i,computed as e,action as n}from"mobx";import{PopupStep as P}from"./step/index.js";import{Teaser as o}from"./teaser/index.js";import{WindowSettings as s}from"./window-settings/index.js";import{Border as O,BackgroundSettings as r}from"./background-settings/index.js";import{CloseSettings as T}from"./close-settings/index.js";import{Popup as _}from"../index.js";var a,d;!function(t){t.POPUP="POPUP",t.NOTIFICATION_BAR="NOTIFICATION_BAR",t.DRAWER="DRAWER"}(a||(a={})),function(t){t.POPUP_TOP_LEFT="POPUP_TOP_LEFT",t.POPUP_TOP_CENTER="POPUP_TOP_CENTER",t.POPUP_TOP_RIGHT="POPUP_TOP_RIGHT",t.POPUP_MIDDLE_LEFT="POPUP_MIDDLE_LEFT",t.POPUP_MIDDLE_CENTER="POPUP_MIDDLE_CENTER",t.POPUP_MIDDLE_RIGHT="POPUP_MIDDLE_RIGHT",t.POPUP_BOTTOM_LEFT="POPUP_BOTTOM_LEFT",t.POPUP_BOTTOM_CENTER="POPUP_BOTTOM_CENTER",t.POPUP_BOTTOM_RIGHT="POPUP_BOTTOM_RIGHT",t.NOTIFICATION_BAR_UP="NOTIFICATION_BAR_UP",t.NOTIFICATION_BAR_DOWN="NOTIFICATION_BAR_DOWN",t.DRAWER_RIGHT="DRAWER_RIGHT",t.DRAWER_LEFT="DRAWER_LEFT"}(d||(d={}));var I=function(){function I(O){this.type=O.type||a.POPUP,this.teaser=O.teaser?new o(O.teaser):new o({backgroundSettings:new r({allowScrollingWhenPopupOpen:!0})}),this.windowSettings=O.windowSettings?new s(O.windowSettings):new s({borderRadius:4,outerVerticalPadding:20,outerHorizontalPadding:20,innerVerticalPadding:20,innerHorizontalPadding:20}),this.backgroundSettings=new r(O.backgroundSettings||{}),this.closeSettings=new T(O.closeSettings||{}),this.steps=O.steps&&O.steps.length?O.steps.map((function(t){return new P(t)})):[new P({stepNumber:1,name:_.t("popup:initialClassTranslations.welcome"),isThankYouStep:!1})],this.isVisible=!1,this.selectedStep=this.steps[0],this.position=O.position?O.position:d.POPUP_MIDDLE_CENTER,t(this,{isVisible:i,type:i,position:i,teaser:i,windowSettings:i,backgroundSettings:i,closeSettings:i,steps:i,selectedStep:i,availablePositions:e,setInitialSettings:n.bound,setInitialPosition:n.bound,setInitialWindowSettings:n.bound})}return I.prototype.setInitialSettings=function(t){void 0===t&&(t=!1),this.setInitialPosition(t),this.setInitialWindowSettings(t)},I.prototype.setInitialPosition=function(t){switch(this.type){case a.POPUP:this.position=t?d.POPUP_BOTTOM_RIGHT:d.POPUP_MIDDLE_CENTER;break;case a.NOTIFICATION_BAR:this.position=d.NOTIFICATION_BAR_UP;break;case a.DRAWER:this.position=d.DRAWER_RIGHT}},I.prototype.setInitialWindowSettings=function(t){switch(this.type){case a.POPUP:this.windowSettings=new s({borderRadius:4,outerVerticalPadding:20,outerHorizontalPadding:20,innerVerticalPadding:20,innerHorizontalPadding:20}),t&&(this.backgroundSettings.allowScrollingWhenPopupOpen=!0,this.backgroundSettings.overlay=null,this.backgroundSettings.border=new O({borderWidth:1,borderColor:"#E3E8EF"}));break;case a.NOTIFICATION_BAR:this.windowSettings=new s({outerHorizontalPadding:0,outerVerticalPadding:0,borderRadius:4,takeFullWidth:!0});break;case a.DRAWER:this.windowSettings=new s({borderRadius:4,outerHorizontalPadding:0,outerVerticalPadding:0,takeFullHeight:!0})}},Object.defineProperty(I.prototype,"availablePositions",{get:function(){var t;return(t={})[a.POPUP]=[d.POPUP_TOP_LEFT,d.POPUP_TOP_CENTER,d.POPUP_TOP_RIGHT,d.POPUP_MIDDLE_LEFT,d.POPUP_MIDDLE_CENTER,d.POPUP_MIDDLE_RIGHT,d.POPUP_BOTTOM_LEFT,d.POPUP_BOTTOM_CENTER,d.POPUP_BOTTOM_RIGHT],t[a.NOTIFICATION_BAR]=[d.NOTIFICATION_BAR_UP,d.NOTIFICATION_BAR_DOWN],t[a.DRAWER]=[d.DRAWER_RIGHT,d.DRAWER_LEFT],t},enumerable:!1,configurable:!0}),I}();export{I as Modal,d as PopupPositonEnum,a as PopupTypeEnum};
@@ -1 +1 @@
1
- import{__extends as o}from'./../../../../../../ext/tslib/tslib.es6.mjs.js';import{makeObservable as r,observable as t}from"mobx";import{PopupElementTypeEnum as i,IkasPopupRendererFontFamily as l,BaseElement as n}from"../base/index.js";import{ButtonBorderStyle as d}from"../../../background-settings/index.js";import{Popup as e}from"../../../../index.js";var a=function(n){function a(o){var a,u,b,s,g,f,m,v,c=this;return(c=n.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 l(o.fontFamily),c.fontSize=null!==(a=o.fontSize)&&void 0!==a?a:16,c.fontWeight=null!==(u=o.fontWeight)&&void 0!==u?u:400,c.borderRadius=null!==(b=o.borderRadius)&&void 0!==b?b:4,c.borderColor=o.borderColor||"",c.borderStyle=o.borderStyle||d.SOLID,c.borderWidth=null!==(s=o.borderWidth)&&void 0!==s?s:0,c.link=o.link||null,c.verticalPadding=null!==(g=o.verticalPadding)&&void 0!==g?g:12,c.horizontalPadding=null!==(f=o.horizontalPadding)&&void 0!==f?f:12,c.outerVerticalPadding=null!==(m=o.outerVerticalPadding)&&void 0!==m?m:12,c.outerHorizontalPadding=null!==(v=o.outerHorizontalPadding)&&void 0!==v?v:12,r(c,{text:t,color:t,buttonBgColor:t,bgColor:t,fontFamily:t,fontSize:t,fontWeight:t,borderRadius:t,borderColor:t,borderStyle:t,borderWidth:t,link:t}),c}return o(a,n),a}(n);export{a as ButtonElement};
1
+ import{__extends as o}from'./../../../../../../ext/tslib/tslib.es6.mjs.js';import{makeObservable as r,observable as t}from"mobx";import{PopupElementTypeEnum as i,IkasPopupRendererFontFamily as l,BaseElement as n}from"../base/index.js";import{ButtonBorderStyle as d}from"../../../background-settings/index.js";import{Popup as e}from"../../../../index.js";var a=function(n){function a(o){var a,u,b,s,g,f,m,v,c=this;return(c=n.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 l(o.fontFamily),c.fontSize=null!==(a=o.fontSize)&&void 0!==a?a:16,c.fontWeight=null!==(u=o.fontWeight)&&void 0!==u?u:400,c.borderRadius=null!==(b=o.borderRadius)&&void 0!==b?b:4,c.borderColor=o.borderColor||"",c.borderStyle=o.borderStyle||d.SOLID,c.borderWidth=null!==(s=o.borderWidth)&&void 0!==s?s:0,c.link=o.link||null,c.verticalPadding=null!==(g=o.verticalPadding)&&void 0!==g?g:12,c.horizontalPadding=null!==(f=o.horizontalPadding)&&void 0!==f?f:12,c.outerVerticalPadding=null!==(m=o.outerVerticalPadding)&&void 0!==m?m:10,c.outerHorizontalPadding=null!==(v=o.outerHorizontalPadding)&&void 0!==v?v:0,r(c,{text:t,color:t,buttonBgColor:t,bgColor:t,fontFamily:t,fontSize:t,fontWeight:t,borderRadius:t,borderColor:t,borderStyle:t,borderWidth:t,link:t}),c}return o(a,n),a}(n);export{a as ButtonElement};
@@ -1 +1 @@
1
- import{__extends as r}from'./../../../../../../ext/tslib/tslib.es6.mjs.js';import{makeObservable as o,observable as d}from"mobx";import{PopupElementTypeEnum as i,BaseElement as e}from"../base/index.js";import{ButtonBorderStyle as t}from"../../../background-settings/index.js";var l=function(e){function l(r){void 0===r&&(r={});var l,n,b,s,a=this;return(a=e.call(this,r)||this).type=i.DIVIDER,a.bgColor=r.bgColor||"",a.borderWidth=null!==(l=r.borderWidth)&&void 0!==l?l:1,a.borderRadius=null!==(n=r.borderRadius)&&void 0!==n?n:0,a.borderColor=r.borderColor||"",a.borderStyle=r.borderStyle||t.SOLID,a.verticalPadding=null!==(b=r.verticalPadding)&&void 0!==b?b:24,a.horizontalPadding=null!==(s=r.horizontalPadding)&&void 0!==s?s:24,o(a,{bgColor:d,borderWidth:d,borderRadius:d,borderColor:d,borderStyle:d}),a}return r(l,e),l}(e);export{l as DividerElement};
1
+ import{__extends as r}from'./../../../../../../ext/tslib/tslib.es6.mjs.js';import{makeObservable as o,observable as d}from"mobx";import{PopupElementTypeEnum as i,BaseElement as e}from"../base/index.js";import{ButtonBorderStyle as t}from"../../../background-settings/index.js";var l=function(e){function l(r){void 0===r&&(r={});var l,n,b,s,a=this;return(a=e.call(this,r)||this).type=i.DIVIDER,a.bgColor=r.bgColor||"",a.borderWidth=null!==(l=r.borderWidth)&&void 0!==l?l:1,a.borderRadius=null!==(n=r.borderRadius)&&void 0!==n?n:0,a.borderColor=r.borderColor||"",a.borderStyle=r.borderStyle||t.SOLID,a.verticalPadding=null!==(b=r.verticalPadding)&&void 0!==b?b:10,a.horizontalPadding=null!==(s=r.horizontalPadding)&&void 0!==s?s:0,o(a,{bgColor:d,borderWidth:d,borderRadius:d,borderColor:d,borderStyle:d}),a}return r(l,e),l}(e);export{l as DividerElement};
@@ -1 +1 @@
1
- import{__extends as t,__assign as o}from'./../../../../../../ext/tslib/tslib.es6.mjs.js';import{makeObservable as e,observable as r,action as n}from"mobx";import{PopupElementTypeEnum as i,BaseElement as s}from"../base/index.js";import{ButtonElement as a}from"../button/index.js";import{FormSettings as u}from"./form-settings/index.js";import{CustomerNameFormItem as l}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 l,d,m=this;return(m=o.call(this,t)||this).type=i.FORM,m.rows=t.rows?t.rows.map((function(t){return new R(t)})):[],m.formSettings=t.formSettings||new u,m.buttonSettings=t.buttonSettings||new a({outerHorizontalPadding:0,outerVerticalPadding:0,buttonBgColor:"#000000",borderColor:"#000000"}),m.bgColor=t.bgColor||"",m.verticalPadding=null!==(l=t.verticalPadding)&&void 0!==l?l:12,m.horizontalPadding=null!==(d=t.horizontalPadding)&&void 0!==d?d:12,e(m,{rows:r,formSettings:r,buttonSettings:r,bgColor:r,addNewElement:n.bound}),0===m.rows.length&&1===s&&m.addNewElement(M.CUSTOMER_EMAIL),m}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)})):[],e(this,{id:r,order:r,columns:r,addNewElement:n.bound,changeColumnSort:n.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),e(this,{id:r,order:r,type:r,formItem:r,setFormItems:n.bound})}return t.prototype.setFormItems=function(t){switch(this.type){case M.CUSTOMER_NAME:return new l(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"),e(this,{text:r})},O=function(t){void 0===t&&(t={}),this.validationErrorMessage=t.validationErrorMessage||C.t("popup:initialClassTranslations.requiredFieldErrorMessage"),this.hasError=t.hasError||!1,e(this,{validationErrorMessage:r,hasError:r})},g=function(t){void 0===t&&(t={}),this.text=t.text||C.t("popup:initialClassTranslations.placeholder"),e(this,{text:r})};export{w as FormColumn,f as FormElement,M as FormItemTypeEnum,R as FormRow,S as InputLabel,g as InputPlaceholder,O as RequiredInput};
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:12,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};
@@ -1 +1 @@
1
- import{__extends as i}from'./../../../../../../ext/tslib/tslib.es6.mjs.js';import{makeObservable as t,observable as o,computed as n}from"mobx";import{PopupElementTypeEnum as e,BaseElement as a}from"../base/index.js";var d,r,l=1080;!function(i){i.FLOAT_LEFT="FLOAT_LEFT",i.FLOAT_RIGHT="FLOAT_RIGHT",i.DISABLE_FLOAT="DISABLE_FLOAT"}(d||(d={})),function(i){i.CONTAIN="CONTAIN",i.COVER="COVER"}(r||(r={}));var c=function(a){function l(i){var l,c,m,s,u=this;return(u=a.call(this,i)||this).type=e.IMAGE,u.imagePosition=i.imagePosition||d.DISABLE_FLOAT,u.imageId=i.imageId||null,u.bgColor=i.bgColor||"",u.cdnURL=null,u.merchantId=null,u.objectFit=i.objectFit||r.CONTAIN,u.link=i.link||null,u.maxWidth=null!==(l=i.maxWidth)&&void 0!==l?l:100,u.verticalPadding=null!==(c=i.verticalPadding)&&void 0!==c?c:24,u.horizontalPadding=null!==(m=i.horizontalPadding)&&void 0!==m?m:24,u.borderRadius=null!==(s=i.borderRadius)&&void 0!==s?s:0,t(u,{imagePosition:o,imageId:o,bgColor:o,cdnURL:o,merchantId:o,objectFit:o,link:o,maxWidth:o,borderRadius:o,src:n}),u}return i(l,a),Object.defineProperty(l.prototype,"src",{get:function(){if(this.imageId)return this.imageId.includes("/")?"".concat(this.cdnURL,"images/").concat(this.merchantId,"/").concat(this.imageId,"/image_").concat(1080,".jpeg"):void 0},enumerable:!1,configurable:!0}),l}(a);export{l as IMAGE_SIZE,c as ImageElement,r as ImageFitEnum,d as ImagePositionEnum};
1
+ import{__extends as i}from'./../../../../../../ext/tslib/tslib.es6.mjs.js';import{makeObservable as t,observable as o,computed as n}from"mobx";import{PopupElementTypeEnum as e,BaseElement as a}from"../base/index.js";var d,r,l=1080;!function(i){i.FLOAT_LEFT="FLOAT_LEFT",i.FLOAT_RIGHT="FLOAT_RIGHT",i.DISABLE_FLOAT="DISABLE_FLOAT"}(d||(d={})),function(i){i.CONTAIN="CONTAIN",i.COVER="COVER"}(r||(r={}));var c=function(a){function l(i){var l,c,m,s,u=this;return(u=a.call(this,i)||this).type=e.IMAGE,u.imagePosition=i.imagePosition||d.DISABLE_FLOAT,u.imageId=i.imageId||null,u.bgColor=i.bgColor||"",u.cdnURL=null,u.merchantId=null,u.objectFit=i.objectFit||r.CONTAIN,u.link=i.link||null,u.maxWidth=null!==(l=i.maxWidth)&&void 0!==l?l:100,u.verticalPadding=null!==(c=i.verticalPadding)&&void 0!==c?c:0,u.horizontalPadding=null!==(m=i.horizontalPadding)&&void 0!==m?m:0,u.borderRadius=null!==(s=i.borderRadius)&&void 0!==s?s:0,t(u,{imagePosition:o,imageId:o,bgColor:o,cdnURL:o,merchantId:o,objectFit:o,link:o,maxWidth:o,borderRadius:o,src:n}),u}return i(l,a),Object.defineProperty(l.prototype,"src",{get:function(){if(this.imageId)return this.imageId.includes("/")?"".concat(this.cdnURL,"images/").concat(this.merchantId,"/").concat(this.imageId,"/image_").concat(1080,".jpeg"):void 0},enumerable:!1,configurable:!0}),l}(a);export{l as IMAGE_SIZE,c as ImageElement,r as ImageFitEnum,d as ImagePositionEnum};
@@ -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 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 l=10,s=function(e){function l(t){void 0===t&&(t={});var l,s,C,_,c,A,S,T,I=this;return(I=e.call(this,t)||this).type=n.PRODUCT_LIST,I.listType=t.listType||a.ALL,I.sortType=t.sortType||u.ASC_CREATED_AT,I.maxProductsToShow=null!==(l=t.maxProductsToShow)&&void 0!==l?l:10,I.categoryId=null!==(s=t.categoryId)&&void 0!==s?s:null,I.variantPairs=null!==(C=t.variantPairs)&&void 0!==C?C: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,buttonBgColor:"#000000",borderColor:"#000000"}),I.productBgColor=t.productBgColor||"",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,o(I,{type:i,listType:i,sortType:i,maxProductsToShow:i,categoryId:i,variantPairs:i,layout:i,productDetailSettings:i,buttonSettings:i,productBgColor:i,gapBetweenProductElements:i,gapBetweenProducts:i}),I}return t(l,e),l}(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})},_=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{l as MAX_PRODUCT_COUNT,_ as PopupProduct,C as PopupVariantPair,s as ProductListElement,E as ProductListLayoutEnum,u as ProductListSortTypeEnum,a as ProductListTypeEnum};
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};
@@ -1 +1 @@
1
- import{__extends as o}from'./../../../../../../ext/tslib/tslib.es6.mjs.js';import{makeObservable as i,observable as n,action as t,computed as r}from"mobx";import{PopupElementTypeEnum as c,BaseElement as e}from"../base/index.js";var a,l=function(r){function e(o){void 0===o&&(o={});var e,l,s,u,g,p=this;return(p=r.call(this,o)||this).type=c.SOCIAL_MEDIA,p.logoColor=o.logoColor||"#000000",p.borderRadius=null!==(e=o.borderRadius)&&void 0!==e?e:0,p.bgColor=o.bgColor||"",p.gapBetweenLogos=null!==(l=o.gapBetweenLogos)&&void 0!==l?l:8,p.verticalPadding=null!==(s=o.verticalPadding)&&void 0!==s?s:24,p.horizontalPadding=null!==(u=o.horizontalPadding)&&void 0!==u?u:24,p.socialMediaLinks=(null===(g=o.socialMediaLinks)||void 0===g?void 0:g.length)?o.socialMediaLinks.map((function(o){return new d(o)})):[new d({type:a.FACEBOOK,order:0,icon:"https://cdn.myikas.dev/social/facebook/1080/".concat(p.borderRadius,"/").concat(p.bgColor,"/").concat(p.logoColor)}),new d({type:a.TWITTER,order:1,icon:"https://cdn.myikas.dev/social/x/1080/".concat(p.borderRadius,"/").concat(p.bgColor,"/").concat(p.logoColor)}),new d({type:a.INSTAGRAM,order:2,icon:"https://cdn.myikas.dev/social/instagram/1080/".concat(p.borderRadius,"/").concat(p.bgColor,"/").concat(p.logoColor)}),new d({type:a.YOUTUBE,order:3,icon:"https://cdn.myikas.dev/social/youtube/1080/".concat(p.borderRadius,"/").concat(p.bgColor,"/").concat(p.logoColor)}),new d({type:a.TIKTOK,order:4,icon:"https://cdn.myikas.dev/social/tiktok/1080/".concat(p.borderRadius,"/").concat(p.bgColor,"/").concat(p.logoColor)}),new d({type:a.LINKEDIN,order:4,icon:"https://cdn.myikas.dev/social/linkedin/1080/".concat(p.borderRadius,"/").concat(p.bgColor,"/").concat(p.logoColor)})],i(p,{logoColor:n,borderRadius:n,bgColor:n,socialMediaLinks:n,gapBetweenLogos:n,updateIconLinks:t.bound}),p}return o(e,r),e.prototype.updateIconLinks=function(){var o=this;this.socialMediaLinks.forEach((function(i){i.icon="https://cdn.myikas.dev/social/".concat(i.type.toLowerCase(),"/1080/").concat(o.borderRadius,"/").concat(o.bgColor,"/").concat(o.logoColor)}))},e}(e),d=function(){function o(o){var t;void 0===o&&(o={}),this.id=o.id||Date.now().toString(),this.icon=o.icon||null,this.link=o.link||null,this.order=null!==(t=o.order)&&void 0!==t?t:0,this.type=o.type||a.FACEBOOK,i(this,{icon:n,link:n,order:n,type:n,iconUrlWithoutHash:r})}return Object.defineProperty(o.prototype,"iconUrlWithoutHash",{get:function(){var o;return null===(o=this.icon)||void 0===o?void 0:o.replace(/#/g,"")},enumerable:!1,configurable:!0}),o}();!function(o){o.FACEBOOK="FACEBOOK",o.TWITTER="TWITTER",o.INSTAGRAM="INSTAGRAM",o.YOUTUBE="YOUTUBE",o.TIKTOK="TIKTOK",o.LINKEDIN="LINKEDIN"}(a||(a={}));export{l as SocialMediaElement,d as SocialMediaLink,a as SocialMediaTypeEnum};
1
+ import{__extends as o}from'./../../../../../../ext/tslib/tslib.es6.mjs.js';import{makeObservable as n,observable as i,action as t,computed as r}from"mobx";import{PopupElementTypeEnum as c,BaseElement as e}from"../base/index.js";var a,l=function(r){function e(o){void 0===o&&(o={});var e,l,s,u,g,p=this;return(p=r.call(this,o)||this).type=c.SOCIAL_MEDIA,p.logoColor=o.logoColor||"#000000",p.borderRadius=null!==(e=o.borderRadius)&&void 0!==e?e:0,p.bgColor=o.bgColor||"",p.gapBetweenLogos=null!==(l=o.gapBetweenLogos)&&void 0!==l?l:8,p.verticalPadding=null!==(s=o.verticalPadding)&&void 0!==s?s:10,p.horizontalPadding=null!==(u=o.horizontalPadding)&&void 0!==u?u:0,p.socialMediaLinks=(null===(g=o.socialMediaLinks)||void 0===g?void 0:g.length)?o.socialMediaLinks.map((function(o){return new d(o)})):[new d({type:a.FACEBOOK,order:0,icon:"https://cdn.myikas.dev/social/facebook/1080/".concat(p.borderRadius,"/").concat(p.bgColor,"/").concat(p.logoColor)}),new d({type:a.TWITTER,order:1,icon:"https://cdn.myikas.dev/social/x/1080/".concat(p.borderRadius,"/").concat(p.bgColor,"/").concat(p.logoColor)}),new d({type:a.INSTAGRAM,order:2,icon:"https://cdn.myikas.dev/social/instagram/1080/".concat(p.borderRadius,"/").concat(p.bgColor,"/").concat(p.logoColor)}),new d({type:a.YOUTUBE,order:3,icon:"https://cdn.myikas.dev/social/youtube/1080/".concat(p.borderRadius,"/").concat(p.bgColor,"/").concat(p.logoColor)}),new d({type:a.TIKTOK,order:4,icon:"https://cdn.myikas.dev/social/tiktok/1080/".concat(p.borderRadius,"/").concat(p.bgColor,"/").concat(p.logoColor)}),new d({type:a.LINKEDIN,order:4,icon:"https://cdn.myikas.dev/social/linkedin/1080/".concat(p.borderRadius,"/").concat(p.bgColor,"/").concat(p.logoColor)})],n(p,{logoColor:i,borderRadius:i,bgColor:i,socialMediaLinks:i,gapBetweenLogos:i,updateIconLinks:t.bound}),p}return o(e,r),e.prototype.updateIconLinks=function(){var o=this;this.socialMediaLinks.forEach((function(n){n.icon="https://cdn.myikas.dev/social/".concat(n.type.toLowerCase(),"/1080/").concat(o.borderRadius,"/").concat(o.bgColor.length?o.bgColor:"ffffff","/").concat(o.logoColor)}))},e}(e),d=function(){function o(o){var t;void 0===o&&(o={}),this.id=o.id||Date.now().toString(),this.icon=o.icon||null,this.link=o.link||null,this.order=null!==(t=o.order)&&void 0!==t?t:0,this.type=o.type||a.FACEBOOK,n(this,{icon:i,link:i,order:i,type:i,iconUrlWithoutHash:r})}return Object.defineProperty(o.prototype,"iconUrlWithoutHash",{get:function(){var o;return null===(o=this.icon)||void 0===o?void 0:o.replace(/#/g,"")},enumerable:!1,configurable:!0}),o}();!function(o){o.FACEBOOK="FACEBOOK",o.TWITTER="TWITTER",o.INSTAGRAM="INSTAGRAM",o.YOUTUBE="YOUTUBE",o.TIKTOK="TIKTOK",o.LINKEDIN="LINKEDIN"}(a||(a={}));export{l as SocialMediaElement,d as SocialMediaLink,a as SocialMediaTypeEnum};
@@ -1 +1 @@
1
- import{__extends as o}from'./../../../../../../ext/tslib/tslib.es6.mjs.js';import{makeObservable as r,observable as i}from"mobx";import{PopupElementTypeEnum as t,IkasPopupRendererFontFamily as l,ComponentHorizontalAlignmentEnum as n,BaseElement as d}from"../base/index.js";import{ButtonBorderStyle as e}from"../../../background-settings/index.js";import{Popup as a}from"../../../../index.js";var s=function(d){function s(o){var s,u,b,g,m,f,h,v,c=this;return(c=d.call(this,o)||this).type=t.TEXT,c.text=o.text||a.t("popup:initialClassTranslations.text"),c.color=o.color||"#000000",c.bgColor=o.bgColor||"",c.fontFamily=new l(o.fontFamily),c.fontSize=null!==(s=o.fontSize)&&void 0!==s?s:16,c.fontWeight=null!==(u=o.fontWeight)&&void 0!==u?u:400,c.borderRadius=null!==(b=o.borderRadius)&&void 0!==b?b:4,c.borderColor=o.borderColor||"#000000",c.borderStyle=o.borderStyle||e.SOLID,c.borderWidth=null!==(g=o.borderWidth)&&void 0!==g?g:0,c.verticalPadding=null!==(m=o.verticalPadding)&&void 0!==m?m:12,c.horizontalPadding=null!==(f=o.horizontalPadding)&&void 0!==f?f:12,c.outerHorizontalPadding=null!==(h=o.outerHorizontalPadding)&&void 0!==h?h:0,c.outerVerticalPadding=null!==(v=o.outerVerticalPadding)&&void 0!==v?v:0,c.horizontalAlignment=o.horizontalAlignment||n.LEFT,r(c,{text:i,color:i,bgColor:i,fontFamily:i,fontSize:i,fontWeight:i,borderRadius:i,borderColor:i,borderStyle:i,borderWidth:i}),c}return o(s,d),s}(d);export{s as TextElement};
1
+ import{__extends as o}from'./../../../../../../ext/tslib/tslib.es6.mjs.js';import{makeObservable as r,observable as i}from"mobx";import{PopupElementTypeEnum as t,IkasPopupRendererFontFamily as l,ComponentHorizontalAlignmentEnum as n,BaseElement as d}from"../base/index.js";import{ButtonBorderStyle as e}from"../../../background-settings/index.js";import{Popup as a}from"../../../../index.js";var s=function(d){function s(o){var s,u,b,g,m,f,h,v,c=this;return(c=d.call(this,o)||this).type=t.TEXT,c.text=o.text||a.t("popup:initialClassTranslations.text"),c.color=o.color||"#000000",c.bgColor=o.bgColor||"",c.fontFamily=new l(o.fontFamily),c.fontSize=null!==(s=o.fontSize)&&void 0!==s?s:16,c.fontWeight=null!==(u=o.fontWeight)&&void 0!==u?u:400,c.borderRadius=null!==(b=o.borderRadius)&&void 0!==b?b:4,c.borderColor=o.borderColor||"#000000",c.borderStyle=o.borderStyle||e.SOLID,c.borderWidth=null!==(g=o.borderWidth)&&void 0!==g?g:0,c.verticalPadding=null!==(m=o.verticalPadding)&&void 0!==m?m:10,c.horizontalPadding=null!==(f=o.horizontalPadding)&&void 0!==f?f:0,c.outerHorizontalPadding=null!==(h=o.outerHorizontalPadding)&&void 0!==h?h:0,c.outerVerticalPadding=null!==(v=o.outerVerticalPadding)&&void 0!==v?v:0,c.horizontalAlignment=o.horizontalAlignment||n.LEFT,r(c,{text:i,color:i,bgColor:i,fontFamily:i,fontSize:i,fontWeight:i,borderRadius:i,borderColor:i,borderStyle:i,borderWidth:i}),c}return o(s,d),s}(d);export{s as TextElement};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/popup-renderer",
3
- "version": "1.0.105",
3
+ "version": "1.0.107",
4
4
  "description": "",
5
5
  "author": "ucy",
6
6
  "license": "ISC",