Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

modal-box-message

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

modal-box-message - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

2

dist/ModalBoxMessage.js

@@ -1,1 +0,1 @@

"use strict";var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();exports.__esModule=!0;var ElementoBase=function(){function t(t,e,n,i){this.nome=t,this.id=e,this.classe=n,this.parent="string"==typeof i?document.getElementById(i):i}return t.prototype.removeText=function(){for(;this.elementInstance.hasChildNodes();)this.elementInstance.removeChild(this.elementInstance.firstChild)},t.prototype.create=function(){var t=document.createElement(this.nome);return t.id=this.id,t.setAttribute("class",this.classe),this.parent.appendChild(t),this.elementInstance=t,t},t.prototype.attr=function(t,e){if(!e)return this.elementInstance.getAttribute(t);this.elementInstance.setAttribute(t,e)},t.prototype.removeAttr=function(t){this.elementInstance.removeAttribute(t)},t.prototype.removeClass=function(t){var e=[],n=this.elementInstance.getAttribute("class");if(null!=n&&void 0!=n&&n.length>0){var i=n.split(" ");if(null!=i&&void 0!=i&&i.length>0)if(-1!=t.indexOf("@")){var o=t.substring(1,t.length);e=i.filter(function(t){return-1==t.indexOf(o)})}else e=i.filter(function(e){return e!=t});var s=e.join(" ");this.elementInstance.setAttribute("class",s)}},t.prototype.setClass=function(t){var e=this.elementInstance.getAttribute("class");if(null!=e&&void 0!=e&&e.length>0){var n=e.split(" ");if(null!=n&&void 0!=n&&n.length>0){n.push(t);var i=n.join(" ");this.elementInstance.setAttribute("class",i)}else this.elementInstance.setAttribute("class",t)}else this.elementInstance.setAttribute("class",t)},t.prototype.setStyle=function(t){if(-1==t.indexOf(";"))throw new Error("Bad Format: 'name:value;' is correct.");var e=t.split(";");e.pop();var n=this.getStyle(null);if(null!=n){var i=n.split(";"),o=[];e.forEach(function(t,e,n){var s=t.split(":")[0],l=t.split(":")[1];i.forEach(function(e,n,i){var r=e.split(":")[0];e.split(":")[1];if(r==s)return e=[r,l].join(":"),i[n]=e,void o.push(t)})}),e.length!=o.length&&(o.forEach(function(t,n,i){var o=e.indexOf(t);e.splice(o,1)}),i=i.concat(e)),this.attr("style",i.join(";"))}else this.attr("style",t)},t.prototype.getStyle=function(t){if(null==t||void 0==t){var e=this.attr("style",null);return null!=e&&e.lastIndexOf(";")!=e.length-1&&(e+=";"),e}var n=this.attr("style",null);return null==n||void 0==n?null:(n.split(";").forEach(function(e,n,i){var o=e.split(":")[0];if(t==o)return e.split(":")[1]}),null)},t.prototype.removeStyle=function(t){if(null==t||void 0==t)return this.attr("style",null);var e=this.attr("style",null);if(null==e||void 0==e)return null;var n=e.split(";");n.pop();var i=[];n.forEach(function(e,n,o){var s=e.split(":")[0];t!=s&&i.push(e)}),this.attr("style",i.join(";"))},t.prototype.getInstance=function(){return this.elementInstance},t.prototype.on=function(t,e,n){void 0===n&&(n=!1),this.elementInstance.addEventListener(t,e,n)},t}(),ElementoInput=function(t){function e(e,n,i,o){var s=t.call(this,"input",n,i,o)||this;return s.name=n,s.tipo=e,s}return __extends(e,t),e.prototype.create=function(){return this.elementInstance=t.prototype.create.call(this),this.elementInstance.setAttribute("name",this.name),this.elementInstance.setAttribute("type",this.tipo),this.elementInstance},e.prototype.setValue=function(t){document.getElementById(this.id).value=t},e.prototype.getValue=function(){return document.getElementById(this.id).value},e}(ElementoBase),ElementoLabel=function(t){function e(e,n,i){var o=t.call(this,"label","","",i)||this;return o.forId=e,o.text=n,o}return __extends(e,t),e.prototype.create=function(){this.elementInstance=t.prototype.create.call(this),this.elementInstance.setAttribute("for",this.forId);var e=document.createTextNode(this.text);return this.elementInstance.appendChild(e),this.elementInstance},e}(ElementoBase),ElementoButton=function(t){function e(e,n,i,o){var s=t.call(this,"button",e,n,i)||this;return s.text=o,s}return __extends(e,t),e.prototype.create=function(){this.elementInstance=t.prototype.create.call(this);var e=document.createTextNode(this.text);return this.elementInstance.appendChild(e),this.elementInstance},e.prototype.setText=function(t){this.removeText();var e=document.createTextNode(t);this.elementInstance.appendChild(e)},e}(ElementoBase),ElementoText=function(t){function e(e,n,i,o){var s=t.call(this,"div",e,n,i)||this;return s.text=o,s}return __extends(e,t),e.prototype.create=function(){this.elementInstance=t.prototype.create.call(this);var e=document.createTextNode(this.text);return this.elementInstance.appendChild(e),this.elementInstance},e.prototype.setText=function(t){this.removeText();var e=document.createTextNode(t);this.elementInstance.appendChild(e)},e.prototype.getText=function(){return this.elementInstance.firstChild},e}(ElementoBase),ElementoInputForm=function(t){function e(e,n){var i=t.call(this,"div","MB-inlineInputBox","MBM-inlineInputBox",n)||this;return i.label=e,i}return __extends(e,t),e.prototype.create=function(){return this.elementInstance=t.prototype.create.call(this),this.labelElement=new ElementoLabel("id-"+this.label,this.label,this.elementInstance),this.inputElement=new ElementoInput("text","id-"+this.label,"MBM-inputElement",this.elementInstance),this.errorText=new ElementoText("ErrorText-"+this.label,"MBM-ErrorText",this.elementInstance,""),this.N_labelElement=this.labelElement.create(),this.N_inputElement=this.inputElement.create(),this.N_errorText=this.errorText.create(),this.errorText.setStyle("display:none;"),this.elementInstance},e.prototype.getValue=function(){return this.inputElement.getValue()},e.prototype.setValue=function(t){this.inputElement.setValue(t)},e.prototype.showErrorMessage=function(t){this.errorText.setText(t),this.errorText.setStyle("display:block;")},e.prototype.hideErrorMessage=function(){this.errorText.setText(""),this.errorText.setStyle("display:none;")},e}(ElementoBase),Overlay=function(t){function e(e){void 0===e&&(e=!1);var n=t.call(this,"div","MB-Overlay","MBM-Overlay",document.getElementsByTagName("body")[0])||this;n.visibility=!1,n.visibility=e;var i=n.visibility?"display:block;":"display:none;",o="width:"+window.innerWidth+"px;",s="height:"+window.innerHeight+"px;";return n.stileDefault=i+o+s+"position:fixed;top:0;left:0;z-index:1000;",n}return __extends(e,t),e.prototype.create=function(){return this.elementInstance=t.prototype.create.call(this),this.setStyle(this.stileDefault),this.elementInstance},e.prototype.setVisibility=function(t){this.visibility=t;var e=this.visibility?"display:block;":"display:none;",n="width:"+window.innerWidth+"px;",i="height:"+window.innerHeight+"px;";this.setStyle(e+n+i)},e}(ElementoBase),Box=function(t){function e(e,n,i){void 0===e&&(e=!1),void 0===n&&(n="400px"),void 0===i&&(i="auto");var o=t.call(this,"div","MB-Box","MBM-box",document.getElementsByTagName("body")[0])||this;o.visibility=!1,o.visibility=e;var s=o.visibility?"display:block;":"display:none;";return o.width="width:"+n+";",o.height="height:"+i+";",o.stileDefault=s+o.width+o.height+"top:0px;left:0px;position:fixed;z-index:1001;background-color:white;opacity:1;",o}return __extends(e,t),e.prototype.create=function(){return this.elementInstance=t.prototype.create.call(this),this.setStyle(this.stileDefault),this.elementInstance},e.prototype.setVisibility=function(t){this.visibility=t;var e=this.visibility?"display:block;":"display:none;";this.setStyle(e)},e}(ElementoBase),ModalBoxMessage=function(){function t(t,e,n){void 0===t&&(t=""),void 0===e&&(e=""),void 0===n&&(n="Ok"),this.overlay=new Overlay(!1),this.mainBox=new Box(!1);this.overlay.create();var i=this.mainBox.create();this.genTitolo(i,t),this.genTesto(i,e),this.genButtonBox(i,n),this.genCssReference()}return t.prototype.genTitolo=function(t,e){this.titleBox=new ElementoBase("div","MB-titleBox","MBM-titleBox",t);var n=this.titleBox.create();this.titleBox.setStyle("min-height:17px;"),this.titleText=new ElementoText("MB-Text","MBM-Text",n,e);this.titleText.create();this.titleText.setStyle("position:relative;max-width:90%;float:left;"),this.closeButton=new ElementoButton("MB-closeButton","MBM-closeButton",n,"X");this.closeButton.create();var i=this;this.closeButton.on("click",function(t){i.Close()})},t.prototype.genTesto=function(t,e){this.textBox=new ElementoBase("div","MB-TextBox","MBM-TextBox",t);var n=this.textBox.create();this.text=new ElementoText("MB-Text","MBM-Text",n,e);this.text.create()},t.prototype.genButtonBox=function(t,e){this.buttonBox=new ElementoBase("div","MB-buttonBox","MBM-buttonBox",t);var n=this.buttonBox.create();this.okButton=new ElementoButton("MB-okButton","MBM-okButton",n,e);this.okButton.create();var i=this;this.okButton.on("click",function(){i.Close()})},t.prototype.getComputed=function(t,e){var n;return n=window.getComputedStyle(t,null).getPropertyValue(e),parseInt(n.substring(0,n.length-2))},t.prototype.calculateTop=function(){var t=-1,e=window.innerHeight,n=this.getComputed(this.mainBox.getInstance(),"height");return e<=n?(this.mainBox.setStyle("overflow-y:scroll;height:"+e.toString()+"px;"),0):(this.mainBox.removeStyle("overflow-y"),t=(e-n)/2,t-=n)},t.prototype.calculateLeft=function(){var t=window.innerWidth,e=this.getComputed(this.mainBox.getInstance(),"width");return t<=e?(this.mainBox.setStyle("overflow-x:scroll;width:"+t.toString()+"px;"),0):(this.mainBox.removeStyle("overflow-x"),(t-e)/2)},t.prototype.genCssReference=function(){var t=document.getElementsByTagName("head")[0],e=document.createElement("link");e.setAttribute("rel","stylesheet"),e.setAttribute("href","node_modules/Modal-Box-Message/dist/ModalBoxMessage.css"),t.appendChild(e)},t.prototype.Open=function(){this.overlay.setVisibility(!0),this.mainBox.setVisibility(!0);var t=this.calculateTop(),e=this.calculateLeft();this.mainBox.setStyle("top:"+t+"px;left:"+e+"px;")},t.prototype.Close=function(){this.overlay.setVisibility(!1),this.mainBox.setVisibility(!1)},t.prototype.setTitle=function(t){this.titleText.setText(t)},t.prototype.setMessage=function(t){this.text.setText(t)},t.prototype.setOKButtonText=function(t){this.okButton.setText(t)},t}();exports.ModalBoxMessage=ModalBoxMessage;
"use strict";var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();exports.__esModule=!0;var ElementoBase=function(){function t(t,e,n,i){this.nome=t,this.id=e,this.classe=n,this.parent="string"==typeof i?document.getElementById(i):i}return t.prototype.removeText=function(){for(;this.elementInstance.hasChildNodes();)this.elementInstance.removeChild(this.elementInstance.firstChild)},t.prototype.create=function(){var t=document.createElement(this.nome);return t.id=this.id,t.setAttribute("class",this.classe),this.parent.appendChild(t),this.elementInstance=t,t},t.prototype.attr=function(t,e){if(!e)return this.elementInstance.getAttribute(t);this.elementInstance.setAttribute(t,e)},t.prototype.removeAttr=function(t){this.elementInstance.removeAttribute(t)},t.prototype.removeClass=function(t){var e=[],n=this.elementInstance.getAttribute("class");if(null!=n&&void 0!=n&&n.length>0){var i=n.split(" ");if(null!=i&&void 0!=i&&i.length>0)if(-1!=t.indexOf("@")){var s=t.substring(1,t.length);e=i.filter(function(t){return-1==t.indexOf(s)})}else e=i.filter(function(e){return e!=t});var o=e.join(" ");this.elementInstance.setAttribute("class",o)}},t.prototype.setClass=function(t){var e=this.elementInstance.getAttribute("class");if(null!=e&&void 0!=e&&e.length>0){var n=e.split(" ");if(null!=n&&void 0!=n&&n.length>0){n.push(t);var i=n.join(" ");this.elementInstance.setAttribute("class",i)}else this.elementInstance.setAttribute("class",t)}else this.elementInstance.setAttribute("class",t)},t.prototype.setStyle=function(t){if(-1==t.indexOf(";"))throw new Error("Bad Format: 'name:value;' is correct.");var e=t.split(";");e.pop();var n=this.getStyle(null);if(null!=n){var i=n.split(";"),s=[];e.forEach(function(t,e,n){var o=t.split(":")[0],l=t.split(":")[1];i.forEach(function(e,n,i){var r=e.split(":")[0];e.split(":")[1];if(r==o)return e=[r,l].join(":"),i[n]=e,void s.push(t)})}),e.length!=s.length&&(s.forEach(function(t,n,i){var s=e.indexOf(t);e.splice(s,1)}),i=i.concat(e)),this.attr("style",i.join(";"))}else this.attr("style",t)},t.prototype.getStyle=function(t){if(null==t||void 0==t){var e=this.attr("style",null);return null!=e&&e.lastIndexOf(";")!=e.length-1&&(e+=";"),e}var n=this.attr("style",null);return null==n||void 0==n?null:(n.split(";").forEach(function(e,n,i){var s=e.split(":")[0];if(t==s)return e.split(":")[1]}),null)},t.prototype.removeStyle=function(t){if(null==t||void 0==t)return this.attr("style",null);var e=this.attr("style",null);if(null==e||void 0==e)return null;var n=e.split(";");n.pop();var i=[];n.forEach(function(e,n,s){var o=e.split(":")[0];t!=o&&i.push(e)}),this.attr("style",i.join(";"))},t.prototype.getInstance=function(){return this.elementInstance},t.prototype.on=function(t,e,n){void 0===n&&(n=!1),this.elementInstance.addEventListener(t,e,n)},t}(),ElementoInput=function(t){function e(e,n,i,s){var o=t.call(this,"input",n,i,s)||this;return o.name=n,o.tipo=e,o}return __extends(e,t),e.prototype.create=function(){return this.elementInstance=t.prototype.create.call(this),this.elementInstance.setAttribute("name",this.name),this.elementInstance.setAttribute("type",this.tipo),this.elementInstance},e.prototype.setValue=function(t){document.getElementById(this.id).value=t},e.prototype.getValue=function(){return document.getElementById(this.id).value},e}(ElementoBase),ElementoLabel=function(t){function e(e,n,i){var s=t.call(this,"label","","",i)||this;return s.forId=e,s.text=n,s}return __extends(e,t),e.prototype.create=function(){this.elementInstance=t.prototype.create.call(this),this.elementInstance.setAttribute("for",this.forId);var e=document.createTextNode(this.text);return this.elementInstance.appendChild(e),this.elementInstance},e}(ElementoBase),ElementoButton=function(t){function e(e,n,i,s){var o=t.call(this,"button",e,n,i)||this;return o.text=s,o}return __extends(e,t),e.prototype.create=function(){this.elementInstance=t.prototype.create.call(this);var e=document.createTextNode(this.text);return this.elementInstance.appendChild(e),this.elementInstance},e.prototype.setText=function(t){this.removeText();var e=document.createTextNode(t);this.elementInstance.appendChild(e)},e}(ElementoBase),ElementoText=function(t){function e(e,n,i,s){var o=t.call(this,"div",e,n,i)||this;return o.text=s,o}return __extends(e,t),e.prototype.create=function(){this.elementInstance=t.prototype.create.call(this);var e=document.createTextNode(this.text);return this.elementInstance.appendChild(e),this.elementInstance},e.prototype.setText=function(t){this.removeText();var e=document.createTextNode(t);this.elementInstance.appendChild(e)},e.prototype.getText=function(){return this.elementInstance.firstChild},e}(ElementoBase),ElementoInputForm=function(t){function e(e,n){var i=t.call(this,"div","MB-inlineInputBox","MBM-inlineInputBox",n)||this;return i.label=e,i}return __extends(e,t),e.prototype.create=function(){return this.elementInstance=t.prototype.create.call(this),this.labelElement=new ElementoLabel("id-"+this.label,this.label,this.elementInstance),this.inputElement=new ElementoInput("text","id-"+this.label,"MBM-inputElement",this.elementInstance),this.errorText=new ElementoText("ErrorText-"+this.label,"MBM-ErrorText",this.elementInstance,""),this.N_labelElement=this.labelElement.create(),this.N_inputElement=this.inputElement.create(),this.N_errorText=this.errorText.create(),this.errorText.setStyle("display:none;"),this.elementInstance},e.prototype.getValue=function(){return this.inputElement.getValue()},e.prototype.setValue=function(t){this.inputElement.setValue(t)},e.prototype.showErrorMessage=function(t){this.errorText.setText(t),this.errorText.setStyle("display:block;")},e.prototype.hideErrorMessage=function(){this.errorText.setText(""),this.errorText.setStyle("display:none;")},e}(ElementoBase),Overlay=function(t){function e(e){void 0===e&&(e=!1);var n=t.call(this,"div","MB-Overlay","MBM-Overlay",document.getElementsByTagName("body")[0])||this;n.visibility=!1,n.visibility=e;var i=n.visibility?"display:block;":"display:none;",s="width:"+window.innerWidth+"px;",o="height:"+window.innerHeight+"px;";return n.stileDefault=i+s+o+"position:fixed;top:0;left:0;z-index:1000;",n}return __extends(e,t),e.prototype.create=function(){return this.elementInstance=t.prototype.create.call(this),this.setStyle(this.stileDefault),this.elementInstance},e.prototype.setVisibility=function(t){this.visibility=t;var e=this.visibility?"display:block;":"display:none;",n="width:"+window.innerWidth+"px;",i="height:"+window.innerHeight+"px;";this.setStyle(e+n+i)},e}(ElementoBase),Box=function(t){function e(e,n,i){void 0===e&&(e=!1),void 0===n&&(n="400px"),void 0===i&&(i="auto");var s=t.call(this,"div","MB-Box","MBM-box",document.getElementsByTagName("body")[0])||this;s.visibility=!1,s.visibility=e;var o=s.visibility?"display:block;":"display:none;";return s.width="width:"+n+";",s.height="height:"+i+";",s.stileDefault=o+s.width+s.height+"top:0px;left:0px;position:fixed;z-index:1001;background-color:white;opacity:1;",s}return __extends(e,t),e.prototype.create=function(){return this.elementInstance=t.prototype.create.call(this),this.setStyle(this.stileDefault),this.elementInstance},e.prototype.setVisibility=function(t){this.visibility=t;var e=this.visibility?"display:block;":"display:none;";this.setStyle(e)},e}(ElementoBase),ModalBoxMessage=function(){function t(t,e,n){void 0===t&&(t=""),void 0===e&&(e=""),void 0===n&&(n="Ok"),this.cssDefaultFileName="ModalBoxMessage.css",this.cssDefaultFilePath="node_modules/modal-box-message/dist/",this.cssDefaultBasePath="../",this.cssFileName="ModalBoxMessage.css",this.cssFilePath="node_modules/modal-box-message/dist/",this.cssBasePath="../",this.currentCssFile="",this.overlay=new Overlay(!1),this.mainBox=new Box(!1);this.overlay.create();var i=this.mainBox.create();this.genTitolo(i,t),this.genTesto(i,e),this.genButtonBox(i,n),this.genCssReference()}return t.prototype.updateCssLinkRef=function(){var t=document.querySelectorAll('link[data-module="cssPath"')[0];this.currentCssFile=this.cssBasePath+this.cssFilePath+this.cssFileName,t.setAttribute("href",this.currentCssFile)},t.prototype.genTitolo=function(t,e){this.titleBox=new ElementoBase("div","MB-titleBox","MBM-titleBox",t);var n=this.titleBox.create();this.titleBox.setStyle("min-height:17px;"),this.titleText=new ElementoText("MB-Text","MBM-Text",n,e);this.titleText.create();this.titleText.setStyle("position:relative;max-width:90%;float:left;"),this.closeButton=new ElementoButton("MB-closeButton","MBM-closeButton",n,"X");this.closeButton.create();var i=this;this.closeButton.on("click",function(t){i.Close()})},t.prototype.genTesto=function(t,e){this.textBox=new ElementoBase("div","MB-TextBox","MBM-TextBox",t);var n=this.textBox.create();this.text=new ElementoText("MB-Text","MBM-Text",n,e);this.text.create()},t.prototype.genButtonBox=function(t,e){this.buttonBox=new ElementoBase("div","MB-buttonBox","MBM-buttonBox",t);var n=this.buttonBox.create();this.okButton=new ElementoButton("MB-okButton","MBM-okButton",n,e);this.okButton.create();var i=this;this.okButton.on("click",function(){i.Close()})},t.prototype.getComputed=function(t,e){var n;return n=window.getComputedStyle(t,null).getPropertyValue(e),parseInt(n.substring(0,n.length-2))},t.prototype.calculateTop=function(){var t=-1,e=window.innerHeight,n=this.getComputed(this.mainBox.getInstance(),"height");return e<=n?(this.mainBox.setStyle("overflow-y:scroll;height:"+e.toString()+"px;"),0):(this.mainBox.removeStyle("overflow-y"),t=(e-n)/2,t-=n)},t.prototype.calculateLeft=function(){var t=window.innerWidth,e=this.getComputed(this.mainBox.getInstance(),"width");return t<=e?(this.mainBox.setStyle("overflow-x:scroll;width:"+t.toString()+"px;"),0):(this.mainBox.removeStyle("overflow-x"),(t-e)/2)},t.prototype.genCssReference=function(){var t=document.querySelectorAll('link[data-module="cssPath"');if(!(null!=t&&void 0!=t&&t.length>0)){var e=document.getElementsByTagName("head")[0],n=document.createElement("link");n.setAttribute("rel","stylesheet"),n.setAttribute("data-module","cssPath"),this.cssBasePath=this.cssDefaultBasePath,this.cssFileName=this.cssDefaultFileName,this.cssFilePath=this.cssDefaultFilePath,n.setAttribute("href",this.cssDefaultBasePath+this.cssDefaultFilePath+this.cssDefaultBasePath),e.appendChild(n)}},t.prototype.Open=function(){this.overlay.setVisibility(!0),this.mainBox.setVisibility(!0);var t=this.calculateTop(),e=this.calculateLeft();this.mainBox.setStyle("top:"+t+"px;left:"+e+"px;")},t.prototype.Close=function(){this.overlay.setVisibility(!1),this.mainBox.setVisibility(!1)},t.prototype.setTitle=function(t){this.titleText.setText(t)},t.prototype.setMessage=function(t){this.text.setText(t)},t.prototype.setOKButtonText=function(t){this.okButton.setText(t)},t.prototype.setCssFileName=function(t){this.cssFileName=t,this.updateCssLinkRef()},t.prototype.setCssFilePath=function(t){this.cssFilePath=t,this.updateCssLinkRef()},t.prototype.setCssBasePath=function(t){this.cssBasePath=t,this.updateCssLinkRef()},t.prototype.setCssFile=function(t){var e=document.querySelectorAll('link[data-module="cssPath"')[0];this.currentCssFile=t,e.setAttribute("href",t)},t}();exports.ModalBoxMessage=ModalBoxMessage;
{
"name": "modal-box-message",
"version": "2.1.0",
"version": "2.1.1",
"description": "[style debugged] A modal box for display a message",

@@ -5,0 +5,0 @@ "main": "./dist/ModalBoxMessage.js",

@@ -19,2 +19,21 @@ # Modal Box Input

## Styling
for styling Box class automatically insert a tag
```html
<link rel="stylesheet" href="../node_modules/Modal-Box-Input/dist/ModalBoxInput.css">
```
if your path is different you can use
```javascript
currentCssFile = "../node_modules/Modal-Box-Input/dist/ModalBoxInput.css";
public setCssFileName(filename:string)//currentCssFile ="../node_modules/Modal-Box-Input/dist/[filename]";
public setCssFilePath(filepath:string)//currentCssFile = "../[filepath]/ModalBoxInput.css";
public setCssBasePath(filebase:string)//currentCssFile = "[filebase]node_modules/Modal-Box-Input/dist/ModalBoxInput.css";
```
to set a different location for css stylesheet
or copy ModalBoxInput.css in your index folder and set css file so:
```javascript
public setCssFile(filepath:string)//currentCssFile = [filepath];
```
## Documentation

@@ -21,0 +40,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc