@ikas/popup-renderer
Advanced tools
Comparing version 0.0.10 to 0.0.11
@@ -1,1 +0,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 I,r;!function(t){t.POPUP="POPUP",t.NOTIFICATION_BAR="NOTIFICATION_BAR",t.DRAWER="DRAWER"}(I||(I={})),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"}(r||(r={}));var R=function(){function R(O){this.type=O.type||I.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({}),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:r.POPUP_MIDDLE_CENTER,t(this,{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 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 I.POPUP:this.position=t?r.POPUP_BOTTOM_RIGHT:r.POPUP_MIDDLE_CENTER;break;case I.NOTIFICATION_BAR:this.position=r.NOTIFICATION_BAR_UP;break;case I.DRAWER:this.position=r.DRAWER_RIGHT}},R.prototype.setInitialWindowSettings=function(t){switch(this.type){case I.POPUP:this.windowSettings=new o({}),t&&(this.backgroundSettings.allowScrollingWhenPopupOpen=!0,this.backgroundSettings.overlay=null,this.backgroundSettings.border=new O({}));break;case I.NOTIFICATION_BAR:this.windowSettings=new o({outerHorizontalPadding:0,outerVerticalPadding:0,takeFullWidth:!0});break;case I.DRAWER:this.windowSettings=new o({outerHorizontalPadding:0,outerVerticalPadding:0,takeFullHeight:!0})}},Object.defineProperty(R.prototype,"availablePositions",{get:function(){var t;return(t={})[I.POPUP]=[r.POPUP_TOP_LEFT,r.POPUP_TOP_CENTER,r.POPUP_TOP_RIGHT,r.POPUP_MIDDLE_LEFT,r.POPUP_MIDDLE_CENTER,r.POPUP_MIDDLE_RIGHT,r.POPUP_BOTTOM_LEFT,r.POPUP_BOTTOM_CENTER,r.POPUP_BOTTOM_RIGHT],t[I.NOTIFICATION_BAR]=[r.NOTIFICATION_BAR_UP,r.NOTIFICATION_BAR_DOWN],t[I.DRAWER]=[r.DRAWER_RIGHT,r.DRAWER_LEFT],t},enumerable:!1,configurable:!0}),R}();export{R as Modal,r as PopupPositonEnum,I as PopupTypeEnum}; | ||
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 I,r;!function(t){t.POPUP="POPUP",t.NOTIFICATION_BAR="NOTIFICATION_BAR",t.DRAWER="DRAWER"}(I||(I={})),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"}(r||(r={}));var R=function(){function R(O){this.type=O.type||I.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({}),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:r.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 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 I.POPUP:this.position=t?r.POPUP_BOTTOM_RIGHT:r.POPUP_MIDDLE_CENTER;break;case I.NOTIFICATION_BAR:this.position=r.NOTIFICATION_BAR_UP;break;case I.DRAWER:this.position=r.DRAWER_RIGHT}},R.prototype.setInitialWindowSettings=function(t){switch(this.type){case I.POPUP:this.windowSettings=new o({}),t&&(this.backgroundSettings.allowScrollingWhenPopupOpen=!0,this.backgroundSettings.overlay=null,this.backgroundSettings.border=new O({}));break;case I.NOTIFICATION_BAR:this.windowSettings=new o({outerHorizontalPadding:0,outerVerticalPadding:0,takeFullWidth:!0});break;case I.DRAWER:this.windowSettings=new o({outerHorizontalPadding:0,outerVerticalPadding:0,takeFullHeight:!0})}},Object.defineProperty(R.prototype,"availablePositions",{get:function(){var t;return(t={})[I.POPUP]=[r.POPUP_TOP_LEFT,r.POPUP_TOP_CENTER,r.POPUP_TOP_RIGHT,r.POPUP_MIDDLE_LEFT,r.POPUP_MIDDLE_CENTER,r.POPUP_MIDDLE_RIGHT,r.POPUP_BOTTOM_LEFT,r.POPUP_BOTTOM_CENTER,r.POPUP_BOTTOM_RIGHT],t[I.NOTIFICATION_BAR]=[r.NOTIFICATION_BAR_UP,r.NOTIFICATION_BAR_DOWN],t[I.DRAWER]=[r.DRAWER_RIGHT,r.DRAWER_LEFT],t},enumerable:!1,configurable:!0}),R}();export{R as Modal,r as PopupPositonEnum,I as PopupTypeEnum}; |
{ | ||
"name": "@ikas/popup-renderer", | ||
"version": "0.0.10", | ||
"version": "0.0.11", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "author": "ucy", |
105250