@ikas/popup-renderer 1.0.66 → 1.0.70
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{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 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.bound,setInitialPosition:P.bound,setInitialWindowSettings:P.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 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 +1 @@
|
|
|
1
|
-
import{makeObservable as e,observable as r}from"mobx";import{FormItemTypeEnum as t,InputLabel as
|
|
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};
|