isobit-ui 0.0.186 → 0.0.187

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.
Files changed (2) hide show
  1. package/dist/index.js +69 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * isobit-ui v0.0.185
2
+ * isobit-ui v0.0.187
3
3
  * (c) Erik Alarcon Pinedo
4
4
  * Released under the MIT License.
5
5
  */
@@ -5100,6 +5100,74 @@ _.contains = function (a, b) {
5100
5100
  return a && a.includes(b);
5101
5101
  };
5102
5102
 
5103
+ _.MsgBox = function MsgBox(m, cb, b) {
5104
+ if (!b) b = ['OK']; //si el elemento debe cargarse en un dialog
5105
+
5106
+ if (!document.body) return;
5107
+ var overlay = document.createElement("div");
5108
+ overlay.classList.add("v-overlay");
5109
+ overlay.style.padding = "40px";
5110
+ overlay.style.zIndex = "2000";
5111
+ document.body.appendChild(overlay);
5112
+ var dialog = document.createElement("div");
5113
+ var dialogContent = document.createElement("div");
5114
+ var msgContent = document.createElement("div");
5115
+ var buttons = document.createElement("div");
5116
+ buttons.className = "v-msgbox-buttons";
5117
+ dialog.classList.add("v-dialog");
5118
+ dialog.classList.add("v-msgbox");
5119
+ msgContent.innerHTML = m;
5120
+ dialog.setAttribute("path", _.currentPath);
5121
+ dialog.setAttribute("callback", nid);
5122
+
5123
+ var closeListener = function closeListener() {
5124
+ dialog.style.display = "none";
5125
+ overlay.style.display = "none";
5126
+ dialog.parentNode.removeChild(dialog);
5127
+ overlay.parentNode.removeChild(overlay);
5128
+ if (cb) cb(this.getAttribute("index")); //_.RSZ();
5129
+ };
5130
+
5131
+ for (var i = 0; i < b.length; i++) {
5132
+ var button = document.createElement("button");
5133
+ button.innerHTML = b[i];
5134
+ button.type = "button";
5135
+ button.setAttribute("index", i);
5136
+ button.className = "v-button ui-widget ui-state-default ui-corner-all";
5137
+ buttons.appendChild(button);
5138
+ button.addEventListener("click", closeListener);
5139
+ }
5140
+
5141
+ dialogContent.className = "v-dialog-content v-widget-content";
5142
+ dialogContent.appendChild(msgContent);
5143
+ dialogContent.appendChild(buttons);
5144
+ dialog.appendChild(dialogContent);
5145
+ overlay.appendChild(dialog);
5146
+ overlay.style.visibility = "unset";
5147
+ overlay.style.opacity = "unset";
5148
+ overlay.style.overflow = "auto";
5149
+ dialog.style.margin = "0 auto";
5150
+ dialog.style.position = "unset";
5151
+ var nid = 'v_' + 0; // _.id();
5152
+
5153
+ /*var acl=h.querySelector('.ui-js-close');
5154
+ if (!acl) {
5155
+ var span = document.createElement("span");
5156
+ span.style.top = "5px";
5157
+ span.style.right = "5px";
5158
+ h.style.position = "relative";
5159
+ span.style.position = "absolute";
5160
+ span.className = "ui-icon ui-icon-closethick";
5161
+ acl = document.createElement("a");
5162
+ acl.className = "ui-js-close ui-dialog-titlebar-icon ui-dialog-titlebar-close ui-corner-all";
5163
+ acl.appendChild(span);
5164
+ h.appendChild(acl);
5165
+ acl.addEventListener("click", closeListener);
5166
+ }*/
5167
+
5168
+ _.resize();
5169
+ };
5170
+
5103
5171
  window._.baseURL = window.axios.defaults.baseURL;
5104
5172
  var defs = {
5105
5173
  watch: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isobit-ui",
3
- "version": "0.0.186",
3
+ "version": "0.0.187",
4
4
  "description": "Vue component to play videos",
5
5
  "keywords": [
6
6
  "ui",