@ikas/popup-renderer 1.0.65 → 1.0.69

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.
@@ -42,4 +42,5 @@ export declare class Modal {
42
42
  NOTIFICATION_BAR: PopupPositonEnum[];
43
43
  DRAWER: PopupPositonEnum[];
44
44
  };
45
+ get totalStepCount(): number;
45
46
  }
@@ -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";var r,a;!function(t){t.POPUP="POPUP",t.NOTIFICATION_BAR="NOTIFICATION_BAR",t.DRAWER="DRAWER"}(r||(r={})),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"}(a||(a={}));var I=function(){function I(O){this.type=O.type||r.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:"TODO",isThankYouStep:!1})],this.isVisible=!1,this.selectedStep=this.steps[0],this.position=O.position?O.position:a.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,setInitialPosition:P,setInitialWindowSettings:P})}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 r.POPUP:this.position=t?a.POPUP_BOTTOM_RIGHT:a.POPUP_MIDDLE_CENTER;break;case r.NOTIFICATION_BAR:this.position=a.NOTIFICATION_BAR_UP;break;case r.DRAWER:this.position=a.DRAWER_RIGHT}},I.prototype.setInitialWindowSettings=function(t){switch(this.type){case r.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 r.NOTIFICATION_BAR:this.windowSettings=new o({outerHorizontalPadding:0,outerVerticalPadding:0,borderRadius:4,takeFullWidth:!0});break;case r.DRAWER:this.windowSettings=new o({borderRadius:4,outerHorizontalPadding:0,outerVerticalPadding:0,takeFullHeight:!0})}},Object.defineProperty(I.prototype,"availablePositions",{get:function(){var t;return(t={})[r.POPUP]=[a.POPUP_TOP_LEFT,a.POPUP_TOP_CENTER,a.POPUP_TOP_RIGHT,a.POPUP_MIDDLE_LEFT,a.POPUP_MIDDLE_CENTER,a.POPUP_MIDDLE_RIGHT,a.POPUP_BOTTOM_LEFT,a.POPUP_BOTTOM_CENTER,a.POPUP_BOTTOM_RIGHT],t[r.NOTIFICATION_BAR]=[a.NOTIFICATION_BAR_UP,a.NOTIFICATION_BAR_DOWN],t[r.DRAWER]=[a.DRAWER_RIGHT,a.DRAWER_LEFT],t},enumerable:!1,configurable:!0}),I}();export{I as Modal,a as PopupPositonEnum,r as PopupTypeEnum};
1
+ import{makeObservable as t,observable as e,computed as i,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 T}from"./background-settings/index.js";import{CloseSettings as r}from"./close-settings/index.js";var _,a;!function(t){t.POPUP="POPUP",t.NOTIFICATION_BAR="NOTIFICATION_BAR",t.DRAWER="DRAWER"}(_||(_={})),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"}(a||(a={}));var I=function(){function I(O){this.type=O.type||_.POPUP,this.teaser=O.teaser?new o(O.teaser):new o({backgroundSettings:new T({allowScrollingWhenPopupOpen:!0})}),this.windowSettings=O.windowSettings?new s(O.windowSettings):new s({borderRadius:4,outerVerticalPadding:12,outerHorizontalPadding:12}),this.backgroundSettings=new T(O.backgroundSettings||{}),this.closeSettings=new r(O.closeSettings||{}),this.steps=O.steps&&O.steps.length?O.steps.map((function(t){return new P(t)})):[new P({stepNumber:1,name:"TODO",isThankYouStep:!1})],this.isVisible=!1,this.selectedStep=this.steps[0],this.position=O.position?O.position:a.POPUP_MIDDLE_CENTER,t(this,{isVisible:e,type:e,position:e,teaser:e,windowSettings:e,backgroundSettings:e,closeSettings:e,steps:e,selectedStep:e,availablePositions:i,totalStepCount:i,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 _.POPUP:this.position=t?a.POPUP_BOTTOM_RIGHT:a.POPUP_MIDDLE_CENTER;break;case _.NOTIFICATION_BAR:this.position=a.NOTIFICATION_BAR_UP;break;case _.DRAWER:this.position=a.DRAWER_RIGHT}},I.prototype.setInitialWindowSettings=function(t){switch(this.type){case _.POPUP:this.windowSettings=new s({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 _.NOTIFICATION_BAR:this.windowSettings=new s({outerHorizontalPadding:0,outerVerticalPadding:0,borderRadius:4,takeFullWidth:!0});break;case _.DRAWER:this.windowSettings=new s({borderRadius:4,outerHorizontalPadding:0,outerVerticalPadding:0,takeFullHeight:!0})}},Object.defineProperty(I.prototype,"availablePositions",{get:function(){var t;return(t={})[_.POPUP]=[a.POPUP_TOP_LEFT,a.POPUP_TOP_CENTER,a.POPUP_TOP_RIGHT,a.POPUP_MIDDLE_LEFT,a.POPUP_MIDDLE_CENTER,a.POPUP_MIDDLE_RIGHT,a.POPUP_BOTTOM_LEFT,a.POPUP_BOTTOM_CENTER,a.POPUP_BOTTOM_RIGHT],t[_.NOTIFICATION_BAR]=[a.NOTIFICATION_BAR_UP,a.NOTIFICATION_BAR_DOWN],t[_.DRAWER]=[a.DRAWER_RIGHT,a.DRAWER_LEFT],t},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"totalStepCount",{get:function(){return this.steps.length},enumerable:!1,configurable:!0}),I}();export{I as Modal,a as PopupPositonEnum,_ as PopupTypeEnum};
@@ -1 +1 @@
1
- import{makeObservable as e,observable as r}from"mobx";import{FormItemTypeEnum as t,InputLabel as u,RequiredInput as i}from"../index.js";var l=function(l){void 0===l&&(l={}),this.type=t.CUSTOMER_EMAIL,this.value=l.value||null,this.placeholder=l.placeholder||"Enter your email",this.inputLabel=l.inputLabel?new u(l.inputLabel):null,this.required=l.required?new i(l.required):null,this.updateCurrentInfo=l.updateCurrentInfo||!1,e(this,{value:r,type:r,placeholder:r,inputLabel:r,required:r,updateCurrentInfo:r})};export{l as CustomerEmailFormItem};
1
+ import{makeObservable as e,observable as r}from"mobx";import{FormItemTypeEnum as t,InputLabel as i,RequiredInput as u}from"../index.js";var n=function(n){void 0===n&&(n={}),this.type=t.CUSTOMER_EMAIL,this.value=n.value||null,this.placeholder=n.placeholder||"Enter your email",this.inputLabel=n.inputLabel?new i(n.inputLabel):null,this.required=n.required?new u(n.required):new u,this.updateCurrentInfo=n.updateCurrentInfo||!1,e(this,{value:r,type:r,placeholder:r,inputLabel:r,required:r,updateCurrentInfo:r})};export{n as CustomerEmailFormItem};
@@ -35,7 +35,8 @@ export declare class FormElement extends BaseElement {
35
35
  formSettings: FormSettings;
36
36
  buttonSettings: ButtonElement;
37
37
  bgColor: string;
38
- constructor(data?: Partial<FormElement>);
38
+ totalStepCount: number;
39
+ constructor(data: Partial<FormElement> | undefined, totalStepCount: number);
39
40
  addNewElement(type: FormItemTypeEnum): void;
40
41
  }
41
42
  export declare class FormRow {
@@ -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 C(t)})):[],E.formSettings=t.formSettings||new m,E.buttonSettings=t.buttonSettings||new d({outerHorizontalPadding:0,outerVerticalPadding:0,buttonBgColor:"#000000",borderColor:"#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 C({order:this.rows.length,columns:[new S({type:t,order:0})]});this.rows.push(r)},s}(s),C=function(){function t(t){var r;void 0===t&&(t={}),this.id=t.id||Date.now().toString(),this.order=null!==(r=t.order)&&void 0!==r?r:0,this.columns=t.columns?t.columns.map((function(t){return new S(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 S({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}(),S=function(){function t(t){var r;void 0===t&&(t={}),this.id=t.id||Date.now().toString(),this.order=null!==(r=t.order)&&void 0!==r?r: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}(),p=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{S as FormColumn,T as FormElement,R as FormItemTypeEnum,C as FormRow,p as InputLabel,O as RequiredInput};
1
+ import{__extends as t,__assign as o}from'./../../../../../../ext/tslib/tslib.es6.mjs.js';import{makeObservable as r,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 u}from"./form-settings/index.js";import{CustomerNameFormItem as m}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 l}from"./customer-phone/index.js";import{CustomerBirthdayFormItem as c}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 C=function(o){function s(t,s){void 0===t&&(t={});var m,E,a=this;return(a=o.call(this,t)||this).type=i.FORM,a.rows=t.rows?t.rows.map((function(t){return new S(t)})):[],a.formSettings=t.formSettings||new u,a.buttonSettings=t.buttonSettings||new d({outerHorizontalPadding:0,outerVerticalPadding:0,buttonBgColor:"#000000",borderColor:"#000000"}),a.bgColor=t.bgColor||"",a.verticalPadding=null!==(m=t.verticalPadding)&&void 0!==m?m:12,a.horizontalPadding=null!==(E=t.horizontalPadding)&&void 0!==E?E:12,a.totalStepCount=s,r(a,{rows:e,formSettings:e,buttonSettings:e,bgColor:e,totalStepCount:e,addNewElement:n.bound}),0===a.rows.length&&s<2&&a.addNewElement(R.CUSTOMER_EMAIL),a}return t(s,o),s.prototype.addNewElement=function(t){var o=new S({order:this.rows.length,columns:[new T({type:t,order:0})]});this.rows.push(o)},s}(s),S=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 T(t)})):[],r(this,{id:e,order:e,columns:e,addNewElement:n.bound,changeColumnSort:n.bound})}return t.prototype.addNewElement=function(t){this.columns.push(new T({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}(),T=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||R.CUSTOMER_NAME,this.formItem=this.setFormItems(t.formItem),r(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 m(o({},t));case R.CUSTOMER_SURNAME:return new E(o({},t));case R.CUSTOMER_EMAIL:return new a(o({},t));case R.CUSTOMER_PHONE:return new l(o({},t));case R.CUSTOMER_BIRTHDAY:return new c(o({},t));case R.CUSTOMER_GENDER:return new h(o({},t));case R.CHECKBOX_FORM_ITEM:return new M(o({},t));case R.CUSTOMER_ATTRIBUTE:return new f(o({},t))}},t}(),p=function(t){void 0===t&&(t={}),this.text=t.text||"Input Label",r(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,r(this,{validationErrorMessage:e,hasError:e})};export{T as FormColumn,C as FormElement,R as FormItemTypeEnum,S as FormRow,p as InputLabel,O as RequiredInput};
@@ -16,6 +16,7 @@ export declare class PopupStep {
16
16
  isThankYouStep: boolean;
17
17
  isTeaser: boolean;
18
18
  elements: ElementType[];
19
+ totalStepCount: number;
19
20
  constructor(data: Partial<PopupStep>);
20
21
  setContent(content: ElementType): TextElement | FormElement | ImageElement | ImageColumnElement | ProductListElement | ButtonElement | SocialMediaElement | DividerElement | SpaceElement;
21
22
  addNewElement(type: PopupElementTypeEnum): void;
@@ -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 o}from"./elements/product/index.js";import{ButtonElement as m}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 l}from"./elements/base/index.js";import{ImageColumnElement as p}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 l.TEXT:return new n(e||{});case l.FORM:return new r(e||{});case l.IMAGE:return new i(e||{});case l.IMAGE_COLUMN:return new p(e||{});case l.PRODUCT_LIST:return new o(e||{});case l.BUTTON:return new m(e||{});case l.SOCIAL_MEDIA:return new a(e||{});case l.DIVIDER:return new h(e||{});case l.SPACE:return new u(e||{})}},d.prototype.addNewElement=function(e){var t=this.elements.length;switch(e){case l.TEXT:this.elements.push(new n({order:t}));break;case l.FORM:this.elements.push(new r({order:t}));break;case l.IMAGE:this.elements.push(new i({order:t}));break;case l.IMAGE_COLUMN:this.elements.push(new p({order:t}));break;case l.PRODUCT_LIST:this.elements.push(new o({order:t}));break;case l.BUTTON:this.elements.push(new m({order:t,buttonBgColor:"#000000",borderColor:"#000000"}));break;case l.SOCIAL_MEDIA:this.elements.push(new a({order:t}));break;case l.DIVIDER:this.elements.push(new h({order:t,borderColor:"#E3E8EF"}));break;case l.SPACE:this.elements.push(new u({order:t}))}},d}();export{d as PopupStep};
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 o}from"./elements/image/index.js";import{ProductListElement as i}from"./elements/product/index.js";import{ButtonElement as m}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 l}from"./elements/base/index.js";import{ImageColumnElement as p}from"./elements/image-column/index.js";var d=function(){function d(r){var o=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 o.setContent(e)})):[],this.totalStepCount=r.totalStepCount||0,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,totalStepCount:t,setContent:s.bound,addNewElement:s.bound})}return d.prototype.setContent=function(e){switch(e.type){case l.TEXT:return new n(e||{});case l.FORM:return new r(e||{},this.totalStepCount);case l.IMAGE:return new o(e||{});case l.IMAGE_COLUMN:return new p(e||{});case l.PRODUCT_LIST:return new i(e||{});case l.BUTTON:return new m(e||{});case l.SOCIAL_MEDIA:return new a(e||{});case l.DIVIDER:return new h(e||{});case l.SPACE:return new u(e||{})}},d.prototype.addNewElement=function(e){var t=this.elements.length;switch(e){case l.TEXT:this.elements.push(new n({order:t}));break;case l.FORM:this.elements.push(new r({order:t},this.totalStepCount));break;case l.IMAGE:this.elements.push(new o({order:t}));break;case l.IMAGE_COLUMN:this.elements.push(new p({order:t}));break;case l.PRODUCT_LIST:this.elements.push(new i({order:t}));break;case l.BUTTON:this.elements.push(new m({order:t,buttonBgColor:"#000000",borderColor:"#000000"}));break;case l.SOCIAL_MEDIA:this.elements.push(new a({order:t}));break;case l.DIVIDER:this.elements.push(new h({order:t,borderColor:"#E3E8EF"}));break;case l.SPACE:this.elements.push(new u({order:t}))}},d}();export{d as PopupStep};
@@ -1 +1 @@
1
- import{makeObservable as i,observable as t}from"mobx";var a=function(a){var d,n,r,e,l;this.maxHeight=a.maxHeight||435,this.maxWidth=a.maxWidth||400,this.borderRadius=null!==(d=a.borderRadius)&&void 0!==d?d:0,this.outerVerticalPadding=null!==(n=a.outerVerticalPadding)&&void 0!==n?n:0,this.outerHorizontalPadding=null!==(r=a.outerHorizontalPadding)&&void 0!==r?r:0,this.innerVerticalPadding=null!==(e=a.innerVerticalPadding)&&void 0!==e?e:0,this.innerHorizontalPadding=null!==(l=a.innerHorizontalPadding)&&void 0!==l?l:8,this.takeFullHeight=a.takeFullHeight||!1,this.takeFullWidth=a.takeFullWidth||!1,i(this,{maxHeight:t,maxWidth:t,borderRadius:t,outerVerticalPadding:t,outerHorizontalPadding:t,innerVerticalPadding:t,innerHorizontalPadding:t,takeFullHeight:t,takeFullWidth:t})};export{a as WindowSettings};
1
+ import{makeObservable as i,observable as t}from"mobx";var a=function(a){var d,n,r,e,l;this.maxHeight=a.maxHeight||435,this.maxWidth=a.maxWidth||400,this.borderRadius=null!==(d=a.borderRadius)&&void 0!==d?d:0,this.outerVerticalPadding=null!==(n=a.outerVerticalPadding)&&void 0!==n?n:0,this.outerHorizontalPadding=null!==(r=a.outerHorizontalPadding)&&void 0!==r?r:0,this.innerVerticalPadding=null!==(e=a.innerVerticalPadding)&&void 0!==e?e:8,this.innerHorizontalPadding=null!==(l=a.innerHorizontalPadding)&&void 0!==l?l:0,this.takeFullHeight=a.takeFullHeight||!1,this.takeFullWidth=a.takeFullWidth||!1,i(this,{maxHeight:t,maxWidth:t,borderRadius:t,outerVerticalPadding:t,outerHorizontalPadding:t,innerVerticalPadding:t,innerHorizontalPadding:t,takeFullHeight:t,takeFullWidth:t})};export{a as WindowSettings};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/popup-renderer",
3
- "version": "1.0.65",
3
+ "version": "1.0.69",
4
4
  "description": "",
5
5
  "author": "ucy",
6
6
  "license": "ISC",