isobit-ui 0.0.312 → 0.0.315

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 +40 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * isobit-ui v0.0.312
2
+ * isobit-ui v0.0.315
3
3
  * (c) Erik Alarcon Pinedo
4
4
  * Released under the MIT License.
5
5
  */
@@ -537,6 +537,7 @@ var script$k = {
537
537
  span.innerHTML = me.$attrs.value ? me.$attrs.value : 'ui-button'; //me.$el.appendChild(span);
538
538
 
539
539
  me.$el.addEventListener('click', function (event) {
540
+ event.component = me;
540
541
  me.$emit('click', event);
541
542
  });
542
543
 
@@ -3265,13 +3266,47 @@ var script$6 = {
3265
3266
  if (t[i].classList) t[i].classList.add("_");else t[i].className = "_";
3266
3267
  }
3267
3268
 
3268
- var f = function f() {
3269
- if (this.required && !this.value) _.showerror(this);else {
3270
- _.showerror(this, false);
3269
+ var f = function f(ev) {
3270
+ var e = this.target;
3271
+ console.log(this);
3272
+ console.log(e);
3273
+ previousSibling = e.previousSibling;
3274
+
3275
+ if (previousSibling && previousSibling.classList && previousSibling.classList.contains('v-error')) {
3276
+ previousSibling.parentNode.removeChild(previousSibling);
3277
+ } // console.log('disabled='+e.getAttribute('disabled'));
3278
+
3279
+
3280
+ if (!(e.disabled || e.getAttribute('disabled')) && (e.required || e.tagName === 'DIV')) {
3281
+ //console.log([e]);
3282
+ //console.log(e.value);console.log(e.nodeValue);
3283
+ if (e.tagName != 'DIV' && !e.value
3284
+ /*||e.value == 0*/
3285
+ || e.tagName === 'DIV' && !e.attributes.value) {
3286
+ previousSibling = e.previousSibling;
3287
+
3288
+ while (previousSibling && previousSibling.nodeType != 1) {
3289
+ previousSibling = previousSibling.previousSibling;
3290
+ }
3291
+
3292
+ if (!previousSibling) {
3293
+ previousSibling = e.parentElement.previousSibling;
3294
+
3295
+ while (previousSibling && previousSibling.nodeType != 1) {
3296
+ previousSibling = previousSibling.previousSibling;
3297
+ }
3298
+ }
3299
+
3300
+ var error = document.createElement("div");
3301
+ error.innerHTML = "Este campo es requerido!";
3302
+ ok = false;
3303
+ error.classList.add("v-error");
3304
+ e.parentNode.insertBefore(error, e);
3305
+ }
3271
3306
  }
3272
3307
  };
3273
3308
 
3274
- me.$el.querySelectorAll("select,input[type=text]:not(.__),textarea:not(.__)").forEach(function (e) {
3309
+ me.$el.querySelectorAll("select,input[type=date]:not(.__),input[type=text]:not(.__),textarea:not(.__)").forEach(function (e) {
3275
3310
  e.addEventListener('focusout', f);
3276
3311
  if (e.classList) e.classList.add("__");else e.className = "__";
3277
3312
  }); //resize();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isobit-ui",
3
- "version": "0.0.312",
3
+ "version": "0.0.315",
4
4
  "description": "Vue component to play videos",
5
5
  "keywords": [
6
6
  "ui",