@ikas/popup-renderer 1.0.35 → 1.0.37
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/form-element-renderer/date-item-view/index.js +1 -1
- package/build/popup-renderer/models/modal/step/elements/form/index.js +1 -1
- package/build/popup-renderer/models/modal/step/elements/product/index.js +1 -1
- package/build/popup-renderer/models/modal/step/index.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"react";import'./../../../../ext/mobx-react-lite/es/index.js';import
|
|
1
|
+
import e from"react";import'./../../../../ext/mobx-react-lite/es/index.js';import r from"react-date-picker";import{observer as t}from'./../../../../ext/mobx-react-lite/es/observer.js';var o=t((function(t){var o=e.useState(!1),a=o[0],l=o[1],n=e.useRef(null);t.placeholder;var i=t.isRequired,c=t.inputLabel;t.updateCurrentInfo;var s=t.formInputSettings,d=t.value,p=t.onValueChange;if(n.current){var u=n.current.getElementsByClassName("react-date-picker__wrapper");if(console.log("inputWrappers",u),u.length>0){var m=u[0];m.style.backgroundColor=s.bgColor,m.style.border="".concat(s.borderWidth,"px solid ").concat(a?s.focusBorderColor:s.borderColor),m.style.borderRadius="".concat(s.borderRadius,"px"),m.style.fontSize="14px",m.style.padding="10px 12px",m.style.height="".concat(s.height,"px")}}return e.createElement("div",{style:{width:"100%",display:"flex",gap:2,flexDirection:"column"},ref:n},(c||i)&&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),i&&e.createElement("label",{style:{color:"black",fontSize:"14px"}},"*")),i&&i.hasError&&e.createElement("div",{style:{color:"red",fontSize:"12px"}},i.validationErrorMessage)),e.createElement(r,{onChange:function(e){return function(e){var r=e?e.valueOf().toString():"";p(r),i&&i.hasError&&r.length>0&&(i.hasError=!1)}(e)},value:d?new Date(d):null,className:"ikas-popup-datepicker",disableCalendar:!0,format:"dd / MM / y",maxDate:new Date,clearIcon:null,onFocus:function(){return l(!0)},onBlur:function(){return l(!1)}}))}));export{o as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__extends as t,__assign as r}from'./../../../../../../ext/tslib/tslib.es6.mjs.js';import{makeObservable as o,observable as e,action as n}from"mobx";import{PopupElementTypeEnum as i,BaseElement as s}from"../base/index.js";import{ButtonElement as d}from"../button/index.js";import{FormSettings as m}from"./form-settings/index.js";import{CustomerNameFormItem as u}from"./customer-name/index.js";import{CustomerSurnameFormItem as E}from"./customer-surname/index.js";import{CustomerEmailFormItem as a}from"./customer-email/index.js";import{CustomerPhoneFormItem as c}from"./customer-phone/index.js";import{CustomerBirthdayFormItem as l}from"./customer-birthday/index.js";import{CustomerGenderFormItem as h}from"./customer-gender/index.js";import{CheckboxFormItem as M}from"./checkbox/index.js";import{CustomerAttributeFormItem as f}from"./customer-attribute/index.js";var R;!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"}(R||(R={}));var T=function(r){function s(t){void 0===t&&(t={});var s,u,E=this;return(E=r.call(this,t)||this).type=i.FORM,E.rows=t.rows?t.rows.map((function(t){return new S(t)})):[],E.formSettings=t.formSettings||new m,E.buttonSettings=t.buttonSettings||new d({outerHorizontalPadding:0,outerVerticalPadding:0,
|
|
1
|
+
import{__extends as t,__assign as r}from'./../../../../../../ext/tslib/tslib.es6.mjs.js';import{makeObservable as o,observable as e,action as n}from"mobx";import{PopupElementTypeEnum as i,BaseElement as s}from"../base/index.js";import{ButtonElement as d}from"../button/index.js";import{FormSettings as m}from"./form-settings/index.js";import{CustomerNameFormItem as u}from"./customer-name/index.js";import{CustomerSurnameFormItem as E}from"./customer-surname/index.js";import{CustomerEmailFormItem as a}from"./customer-email/index.js";import{CustomerPhoneFormItem as c}from"./customer-phone/index.js";import{CustomerBirthdayFormItem as l}from"./customer-birthday/index.js";import{CustomerGenderFormItem as h}from"./customer-gender/index.js";import{CheckboxFormItem as M}from"./checkbox/index.js";import{CustomerAttributeFormItem as f}from"./customer-attribute/index.js";var R;!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"}(R||(R={}));var T=function(r){function s(t){void 0===t&&(t={});var s,u,E=this;return(E=r.call(this,t)||this).type=i.FORM,E.rows=t.rows?t.rows.map((function(t){return new S(t)})):[],E.formSettings=t.formSettings||new m,E.buttonSettings=t.buttonSettings||new d({outerHorizontalPadding:0,outerVerticalPadding:0,buttonBgColor:"#000000"}),E.bgColor=t.bgColor||"",E.verticalPadding=null!==(s=t.verticalPadding)&&void 0!==s?s:12,E.horizontalPadding=null!==(u=t.horizontalPadding)&&void 0!==u?u:12,o(E,{rows:e,formSettings:e,buttonSettings:e,bgColor:e,addNewElement:n.bound}),0===E.rows.length&&E.addNewElement(R.CUSTOMER_EMAIL),E}return t(s,r),s.prototype.addNewElement=function(t){var r=new S({order:this.rows.length,columns:[new p({type:t,order:0})]});this.rows.push(r)},s}(s),S=function(){function t(t){void 0===t&&(t={}),this.id=t.id||Date.now().toString(),this.order=t.order||0,this.columns=t.columns?t.columns.map((function(t){return new p(t)})):[],o(this,{id:e,order:e,columns:e,addNewElement:n.bound,changeColumnSort:n.bound})}return t.prototype.addNewElement=function(t){this.columns.push(new p({type:t,order:this.columns.length}))},t.prototype.changeColumnSort=function(){this.columns.forEach((function(t,r){0===r?t.order=t.order+1:1===r&&(t.order=t.order-1)})),this.columns=this.columns.sort((function(t,r){return t.order-r.order}))},t}(),p=function(){function t(t){void 0===t&&(t={}),this.id=t.id||Date.now().toString(),this.order=t.order||0,this.type=t.type||R.CUSTOMER_NAME,this.formItem=this.setFormItems(t.formItem),o(this,{id:e,order:e,type:e,formItem:e,setFormItems:n.bound})}return t.prototype.setFormItems=function(t){switch(this.type){case R.CUSTOMER_NAME:return new u(r({},t));case R.CUSTOMER_SURNAME:return new E(r({},t));case R.CUSTOMER_EMAIL:return new a(r({},t));case R.CUSTOMER_PHONE:return new c(r({},t));case R.CUSTOMER_BIRTHDAY:return new l(r({},t));case R.CUSTOMER_GENDER:return new h(r({},t));case R.CHECKBOX_FORM_ITEM:return new M(r({},t));case R.CUSTOMER_ATTRIBUTE:return new f(r({},t))}},t}(),C=function(t){void 0===t&&(t={}),this.text=t.text||"Input Label",o(this,{text:e})},O=function(t){void 0===t&&(t={}),this.validationErrorMessage=t.validationErrorMessage||"It's required to fill this field",this.hasError=t.hasError||!1,o(this,{validationErrorMessage:e,hasError:e})};export{p as FormColumn,T as FormElement,R as FormItemTypeEnum,S as FormRow,C as InputLabel,O as RequiredInput};
|
|
@@ -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 s=10,l=function(e){function s(t){void 0===t&&(t={});var s,l,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!==(s=t.maxProductsToShow)&&void 0!==s?s:10,I.categoryId=null!==(l=t.categoryId)&&void 0!==l?l: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,
|
|
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 s=10,l=function(e){function s(t){void 0===t&&(t={});var s,l,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!==(s=t.maxProductsToShow)&&void 0!==s?s:10,I.categoryId=null!==(l=t.categoryId)&&void 0!==l?l: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"}),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(s,e),s}(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{s as MAX_PRODUCT_COUNT,_ as PopupProduct,C as PopupVariantPair,l as ProductListElement,E as ProductListLayoutEnum,u as ProductListSortTypeEnum,a as ProductListTypeEnum};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeObservable as e,observable as t,action as s}from"mobx";import{TextElement as n}from"./elements/text/index.js";import{FormElement as r}from"./elements/form/index.js";import{ImageElement as i}from"./elements/image/index.js";import{ProductListElement as m}from"./elements/product/index.js";import{ButtonElement as o}from"./elements/button/index.js";import{SocialMediaElement as a}from"./elements/social/index.js";import{DividerElement as h}from"./elements/divider/index.js";import{SpaceElement as u}from"./elements/space/index.js";import{PopupElementTypeEnum as p}from"./elements/base/index.js";import{ImageColumnElement as l}from"./elements/image-column/index.js";var d=function(){function d(r){var i=this;this.id=r.id||Date.now().toString(),this.stepNumber=r.stepNumber||0,this.name=r.name||"",this.isThankYouStep=r.isThankYouStep||!1,this.isTeaser=r.isTeaser||!1,this.elements=r.elements&&r.elements.length?r.elements.map((function(e){return i.setContent(e)})):[],this.isTeaser&&(this.id=this.id+"-teaser"),this.isTeaser&&!this.elements.length&&this.elements.push(new n({order:0})),e(this,{stepNumber:t,name:t,isThankYouStep:t,isTeaser:t,elements:t,setContent:s.bound,addNewElement:s.bound})}return d.prototype.setContent=function(e){switch(e.type){case p.TEXT:return new n(e||{});case p.FORM:return new r(e||{});case p.IMAGE:return new i(e||{});case p.IMAGE_COLUMN:return new l(e||{});case p.PRODUCT_LIST:return new m(e||{});case p.BUTTON:return new o(e||{});case p.SOCIAL_MEDIA:return new a(e||{});case p.DIVIDER:return new h(e||{});case p.SPACE:return new u(e||{})}},d.prototype.addNewElement=function(e){var t=this.elements.length;switch(e){case p.TEXT:this.elements.push(new n({order:t}));break;case p.FORM:this.elements.push(new r({order:t}));break;case p.IMAGE:this.elements.push(new i({order:t}));break;case p.IMAGE_COLUMN:this.elements.push(new l({order:t}));break;case p.PRODUCT_LIST:this.elements.push(new m({order:t}));break;case p.BUTTON:this.elements.push(new o({order:t,
|
|
1
|
+
import{makeObservable as e,observable as t,action as s}from"mobx";import{TextElement as n}from"./elements/text/index.js";import{FormElement as r}from"./elements/form/index.js";import{ImageElement as i}from"./elements/image/index.js";import{ProductListElement as m}from"./elements/product/index.js";import{ButtonElement as o}from"./elements/button/index.js";import{SocialMediaElement as a}from"./elements/social/index.js";import{DividerElement as h}from"./elements/divider/index.js";import{SpaceElement as u}from"./elements/space/index.js";import{PopupElementTypeEnum as p}from"./elements/base/index.js";import{ImageColumnElement as l}from"./elements/image-column/index.js";var d=function(){function d(r){var i=this;this.id=r.id||Date.now().toString(),this.stepNumber=r.stepNumber||0,this.name=r.name||"",this.isThankYouStep=r.isThankYouStep||!1,this.isTeaser=r.isTeaser||!1,this.elements=r.elements&&r.elements.length?r.elements.map((function(e){return i.setContent(e)})):[],this.isTeaser&&(this.id=this.id+"-teaser"),this.isTeaser&&!this.elements.length&&this.elements.push(new n({order:0})),e(this,{stepNumber:t,name:t,isThankYouStep:t,isTeaser:t,elements:t,setContent:s.bound,addNewElement:s.bound})}return d.prototype.setContent=function(e){switch(e.type){case p.TEXT:return new n(e||{});case p.FORM:return new r(e||{});case p.IMAGE:return new i(e||{});case p.IMAGE_COLUMN:return new l(e||{});case p.PRODUCT_LIST:return new m(e||{});case p.BUTTON:return new o(e||{});case p.SOCIAL_MEDIA:return new a(e||{});case p.DIVIDER:return new h(e||{});case p.SPACE:return new u(e||{})}},d.prototype.addNewElement=function(e){var t=this.elements.length;switch(e){case p.TEXT:this.elements.push(new n({order:t}));break;case p.FORM:this.elements.push(new r({order:t}));break;case p.IMAGE:this.elements.push(new i({order:t}));break;case p.IMAGE_COLUMN:this.elements.push(new l({order:t}));break;case p.PRODUCT_LIST:this.elements.push(new m({order:t}));break;case p.BUTTON:this.elements.push(new o({order:t,buttonBgColor:"#000000"}));break;case p.SOCIAL_MEDIA:this.elements.push(new a({order:t}));break;case p.DIVIDER:this.elements.push(new h({order:t}));break;case p.SPACE:this.elements.push(new u({order:t}))}},d}();export{d as PopupStep};
|