@ikas/popup-renderer 1.0.108 → 1.0.109
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/input-item-view/index.js +1 -1
- package/build/popup-renderer/models/modal/background-settings/index.js +1 -1
- package/build/popup-renderer/models/modal/close-settings/index.js +1 -1
- package/build/popup-renderer/models/modal/index.d.ts +1 -0
- package/build/popup-renderer/models/modal/index.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
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
|
+
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&&i&&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{makeObservable as o,observable as r}from"mobx";var t
|
|
1
|
+
import{makeObservable as o,observable as r}from"mobx";var l,t=function(l){this.bgColor=l.bgColor||"#FFFFFF",this.overlay=l.overlay?new i(l.overlay):null,this.shadow=l.shadow?new e(l.shadow):null,this.border=l.border?new h(l.border):null,this.allowScrollingWhenPopupOpen=l.allowScrollingWhenPopupOpen||!1,o(this,{bgColor:r,overlay:r,shadow:r,border:r,allowScrollingWhenPopupOpen:r})},i=function(l){this.bgColor=l.bgColor||"",this.bgOpacity=l.bgOpacity||0,o(this,{bgOpacity:r,bgColor:r})},e=function(l){this.color=l.color||"",this.bgOpacity=l.bgOpacity||0,o(this,{bgOpacity:r,color:r})};!function(o){o.SOLID="solid",o.DASHED="dashed",o.DOTTED="dotted"}(l||(l={}));var h=function(t){this.borderColor=t.borderColor||"",this.borderWidth=t.borderWidth||0,this.borderStyle=t.borderStyle||l.SOLID,o(this,{borderColor:r,borderWidth:r,borderStyle:r})};export{t as BackgroundSettings,h as Border,l as ButtonBorderStyle,i as Overlay,e as Shadow};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeObservable as o,observable as t}from"mobx";var n
|
|
1
|
+
import{makeObservable as o,observable as t}from"mobx";var i,n;!function(o){o.ALWAYS_VISIBLE="ALWAYS_VISIBLE",o.ALWAYS_HIDDEN="ALWAYS_HIDDEN",o.VISIBLE_ON_HOVER="VISIBLE_ON_HOVER"}(i||(i={})),function(o){o.SHOW_ON_CONTENT="SHOW_ON_CONTENT",o.TAKE_SPACE="TAKE_SPACE"}(n||(n={}));var s,e=function(s){this.closeButtonPositionType=s.closeButtonPositionType||n.SHOW_ON_CONTENT,this.closeButtonDisplayType=s.closeButtonDisplayType||i.ALWAYS_VISIBLE,this.iconSettings=s.iconSettings?new c(s.iconSettings):new c({}),o(this,{closeButtonPositionType:t,closeButtonDisplayType:t,iconSettings:t})};!function(o){o.WITH_BORDER="WITH_BORDER",o.WITHOUT_BORDER="WITHOUT_BORDER"}(s||(s={}));var c=function(i){this.type=i.type||s.WITHOUT_BORDER,this.color=i.color||"",this.backgroundColor=i.backgroundColor||"",0===Object.keys(i).length&&(this.type=s.WITHOUT_BORDER,this.color="#697586",this.backgroundColor="#FFFFFF"),o(this,{type:t,color:t,backgroundColor:t})};export{i as CloseButtonDisplayTypeEnum,n as CloseButtonPositionTypeEnum,c as CloseIconSettings,s as CloseIconTypeEnum,e as CloseSettings};
|
|
@@ -37,6 +37,7 @@ export declare class Modal {
|
|
|
37
37
|
setInitialSettings(isNotificationPopup?: boolean): void;
|
|
38
38
|
private setInitialPosition;
|
|
39
39
|
private setInitialWindowSettings;
|
|
40
|
+
private setInitialBackgroundSettings;
|
|
40
41
|
get availablePositions(): {
|
|
41
42
|
POPUP: PopupPositonEnum[];
|
|
42
43
|
NOTIFICATION_BAR: PopupPositonEnum[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeObservable as t,observable as i,computed as e,action as n}from"mobx";import{PopupStep as
|
|
1
|
+
import{makeObservable as t,observable as i,computed as e,action as n}from"mobx";import{PopupStep as o}from"./step/index.js";import{Teaser as P}from"./teaser/index.js";import{WindowSettings as s}from"./window-settings/index.js";import{Border as r,BackgroundSettings as O,Overlay as a}from"./background-settings/index.js";import{CloseSettings as T}from"./close-settings/index.js";import{Popup as _}from"../index.js";var d,l;!function(t){t.POPUP="POPUP",t.NOTIFICATION_BAR="NOTIFICATION_BAR",t.DRAWER="DRAWER"}(d||(d={})),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"}(l||(l={}));var I=function(){function I(r){this.type=r.type||d.POPUP,this.teaser=r.teaser?new P(r.teaser):new P({backgroundSettings:new O({allowScrollingWhenPopupOpen:!0})}),this.windowSettings=r.windowSettings?new s(r.windowSettings):new s({borderRadius:4,outerVerticalPadding:20,outerHorizontalPadding:20,innerVerticalPadding:20,innerHorizontalPadding:20}),this.backgroundSettings=new O(r.backgroundSettings||{}),this.closeSettings=new T(r.closeSettings||{}),this.steps=r.steps&&r.steps.length?r.steps.map((function(t){return new o(t)})):[new o({stepNumber:1,name:_.t("popup:initialClassTranslations.welcome"),isThankYouStep:!1})],this.isVisible=!1,this.selectedStep=this.steps[0],this.position=r.position?r.position:l.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),this.setInitialBackgroundSettings(t)},I.prototype.setInitialPosition=function(t){switch(this.type){case d.POPUP:this.position=t?l.POPUP_BOTTOM_RIGHT:l.POPUP_MIDDLE_CENTER;break;case d.NOTIFICATION_BAR:this.position=l.NOTIFICATION_BAR_UP;break;case d.DRAWER:this.position=l.DRAWER_RIGHT}},I.prototype.setInitialWindowSettings=function(t){switch(this.type){case d.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 r({borderWidth:1,borderColor:"#E3E8EF"}));break;case d.NOTIFICATION_BAR:this.windowSettings=new s({outerHorizontalPadding:0,outerVerticalPadding:0,borderRadius:4,takeFullWidth:!0});break;case d.DRAWER:this.windowSettings=new s({borderRadius:4,outerHorizontalPadding:0,outerVerticalPadding:0,takeFullHeight:!0})}},I.prototype.setInitialBackgroundSettings=function(t){switch(this.type){case d.POPUP:this.backgroundSettings=new O({allowScrollingWhenPopupOpen:!1,overlay:new a({bgColor:"#364152",bgOpacity:40})}),t&&(this.backgroundSettings.allowScrollingWhenPopupOpen=!0,this.backgroundSettings.overlay=null,this.backgroundSettings.border=new r({borderWidth:1,borderColor:"#E3E8EF"}));break;case d.NOTIFICATION_BAR:case d.DRAWER:this.backgroundSettings=new O({allowScrollingWhenPopupOpen:!0})}},Object.defineProperty(I.prototype,"availablePositions",{get:function(){var t;return(t={})[d.POPUP]=[l.POPUP_TOP_LEFT,l.POPUP_TOP_CENTER,l.POPUP_TOP_RIGHT,l.POPUP_MIDDLE_LEFT,l.POPUP_MIDDLE_CENTER,l.POPUP_MIDDLE_RIGHT,l.POPUP_BOTTOM_LEFT,l.POPUP_BOTTOM_CENTER,l.POPUP_BOTTOM_RIGHT],t[d.NOTIFICATION_BAR]=[l.NOTIFICATION_BAR_UP,l.NOTIFICATION_BAR_DOWN],t[d.DRAWER]=[l.DRAWER_RIGHT,l.DRAWER_LEFT],t},enumerable:!1,configurable:!0}),I}();export{I as Modal,l as PopupPositonEnum,d as PopupTypeEnum};
|