isobit-ui 0.0.313 → 0.0.314

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 +36 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * isobit-ui v0.0.313
2
+ * isobit-ui v0.0.314
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
 
@@ -3266,8 +3267,40 @@ var script$6 = {
3266
3267
  }
3267
3268
 
3268
3269
  var f = function f() {
3269
- if (this.required && !this.value) _.showerror(this);else {
3270
- _.showerror(this, false);
3270
+ var e = this;
3271
+ previousSibling = e.previousSibling;
3272
+
3273
+ if (previousSibling && previousSibling.classList && previousSibling.classList.contains('v-error')) {
3274
+ previousSibling.parentNode.removeChild(previousSibling);
3275
+ } // console.log('disabled='+e.getAttribute('disabled'));
3276
+
3277
+
3278
+ if (!(e.disabled || e.getAttribute('disabled')) && (e.required || e.tagName === 'DIV')) {
3279
+ //console.log([e]);
3280
+ //console.log(e.value);console.log(e.nodeValue);
3281
+ if (e.tagName != 'DIV' && !e.value
3282
+ /*||e.value == 0*/
3283
+ || e.tagName === 'DIV' && !e.attributes.value) {
3284
+ previousSibling = e.previousSibling;
3285
+
3286
+ while (previousSibling && previousSibling.nodeType != 1) {
3287
+ previousSibling = previousSibling.previousSibling;
3288
+ }
3289
+
3290
+ if (!previousSibling) {
3291
+ previousSibling = e.parentElement.previousSibling;
3292
+
3293
+ while (previousSibling && previousSibling.nodeType != 1) {
3294
+ previousSibling = previousSibling.previousSibling;
3295
+ }
3296
+ }
3297
+
3298
+ var error = document.createElement("div");
3299
+ error.innerHTML = "Este campo es requerido!";
3300
+ ok = false;
3301
+ error.classList.add("v-error");
3302
+ e.parentNode.insertBefore(error, e);
3303
+ }
3271
3304
  }
3272
3305
  };
3273
3306
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isobit-ui",
3
- "version": "0.0.313",
3
+ "version": "0.0.314",
4
4
  "description": "Vue component to play videos",
5
5
  "keywords": [
6
6
  "ui",