isobit-ui 0.1.102 → 0.1.103

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 +49 -28
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * isobit-ui v0.1.101
2
+ * isobit-ui v0.1.103
3
3
  * (c) Erik Alarcon Pinedo
4
4
  * Released under the MIT License.
5
5
  */
@@ -3608,6 +3608,11 @@ var __vue_component__$8 = /*#__PURE__*/__vue_normalize__({
3608
3608
  //
3609
3609
  //
3610
3610
  //
3611
+ //
3612
+ //
3613
+ //
3614
+ //
3615
+ //
3611
3616
  function _await$1(value, then, direct) {
3612
3617
  if (direct) {
3613
3618
  return then ? then(value) : value;
@@ -3846,8 +3851,11 @@ var script$7 = {
3846
3851
  mode: null
3847
3852
  },
3848
3853
  watch: {
3849
- data: function data(v, ov) {
3850
- if (this.$parent.$el && this.$parent.$el.id) console.log('data changed ' + this.$parent.$el.id);
3854
+ data: function data()
3855
+ /*nv,ov*/
3856
+ {
3857
+ // if (this.$parent.$el && this.$parent.$el.id)
3858
+ // console.log("data changed " + this.$parent.$el.id);
3851
3859
  this.$parent.uu();
3852
3860
  }
3853
3861
  },
@@ -3885,20 +3893,28 @@ var script$7 = {
3885
3893
  p.appendChild(me.$el.childNodes[0]);
3886
3894
  }
3887
3895
 
3888
- me.$parent.$emit('changed', p);
3896
+ me.$parent.$emit("changed", p);
3889
3897
  me.$parent.uu();
3890
3898
  },
3891
3899
  mounted: function mounted() {
3892
3900
  var me = this;
3893
- if (me.valueField) me.valueField_ = me.valueField.split('.');
3901
+ if (me.valueField) me.valueField_ = me.valueField.split(".");
3894
3902
  if (me.$parent) me.$parent.uu();
3895
3903
  },
3896
3904
  methods: {
3905
+ getParentE: function getParentE() {
3906
+ return this.$el.parentElement.parentElement;
3907
+ },
3897
3908
  getIndexByValue: function getIndexByValue(v, c) {
3898
- if (v && v.id) v = v.id;
3909
+ if (v && v.id) v = v.id;else if (v && v.code) v = v.code; // var ee=this.getParentE();
3910
+ // if(ee.id){
3911
+ // console.log('=============getIndexByValue.this.filterList.length='+this.filterList.length);
3912
+ // }
3899
3913
 
3900
3914
  for (var j = 0; j < this.filterList.length; j++) {
3901
- // console.log('compare '+this.getValueField(this.filterList[j])+' =? '+v);
3915
+ //if(ee.id){
3916
+ // console.log('compare '+this.getValueField(this.filterList[j])+' =? '+v);
3917
+ //}
3902
3918
  if (this.getValueField(this.filterList[j]) == v) {
3903
3919
  // console.log('se encontro '+v+' en index='+j);
3904
3920
  //console.log('c='+c);
@@ -3919,7 +3935,7 @@ var script$7 = {
3919
3935
  var vf = this.valueField_;
3920
3936
  if (vf && vf.length) for (var j = 0; j < vf.length; j++) {
3921
3937
  if (i) i = i[vf[j]];
3922
- } else if (i && !t) i = i.id ? i.id : i; //es necesario que el elemento tenga la propiedad id
3938
+ } else if (i && !t) i = i.id ? i.id : i.code ? i.code : i; //es necesario que el elemento tenga la propiedad id
3923
3939
 
3924
3940
  return i;
3925
3941
  },
@@ -3932,6 +3948,7 @@ var script$7 = {
3932
3948
  try {
3933
3949
  var _this2 = this;
3934
3950
 
3951
+ //console.log('================load');
3935
3952
  var me = _this2;
3936
3953
  if (!clearQueue) me.queue.push([p, nou]);
3937
3954
  if (me.queue.length > 1) return;
@@ -3942,6 +3959,10 @@ var script$7 = {
3942
3959
  if (me.store) {
3943
3960
  //console.log(JSON.stringify(me.data2));
3944
3961
  return _await$1(window._.getStoredList(me.store), function (storedList) {
3962
+ // if(this.getParentE().name){
3963
+ // console.log(this.$el.parentElement.parentElement);
3964
+ // console.log(storedList);
3965
+ // }
3945
3966
  var _ref = p ? Object.keys(p) : [],
3946
3967
  _ref2 = _slicedToArray(_ref, 1),
3947
3968
  key = _ref2[0];
@@ -3949,11 +3970,9 @@ var script$7 = {
3949
3970
  if (key) {
3950
3971
  me.data2 = me.data2.concat(storedList.filter(function (item) {
3951
3972
  return item[key].startsWith(p[key]);
3952
- }));
3953
- console.log('data filtrada');
3973
+ })); //console.log("data filtrada");
3954
3974
  } else {
3955
- me.data2 = me.data2.concat(storedList);
3956
- console.log('data no filtrada');
3975
+ me.data2 = me.data2.concat(storedList); //console.log("data no filtrada");
3957
3976
  }
3958
3977
 
3959
3978
  var displayField = me.displayField;
@@ -3967,34 +3986,34 @@ var script$7 = {
3967
3986
  return _invoke(function () {
3968
3987
  if ((me.url || me.src) && !pa.disabled) {
3969
3988
  if (!me.data2) me.data2 = [];
3970
- if (me.filters) p = Vue.mergeDeep(p ? p : {}, me.filters); //console.log(pa.name+'.options.load '+JSON.stringify(p));
3989
+ if (me.filters) p = window.Vue.mergeDeep(p ? p : {}, me.filters); //console.log(pa.name+'.options.load '+JSON.stringify(p));
3971
3990
 
3972
- return _awaitIgnored(axios.get(me.url ? me.url : me.src, {
3991
+ return _awaitIgnored(window.axios.get(me.url ? me.url : me.src, {
3973
3992
  params: p
3974
3993
  }).then(function (r) {
3975
3994
  var data = r.data.data ? r.data.data : r.data;
3976
- me.$emit('loaded', {
3995
+ me.$emit("loaded", {
3977
3996
  target: me,
3978
3997
  data: data
3979
3998
  });
3980
3999
  me.data2 = me.data2.concat(data);
3981
- me.loaded = 1;
3982
- if (me.store) localstore.setItem(me.store, JSON.stringify(data));
4000
+ me.loaded = 1; //if (me.store) localstore.setItem(me.store, JSON.stringify(data));
4001
+
3983
4002
  me.$parent.$forceUpdate();
3984
4003
  if (nou) nou();
3985
4004
  })["catch"](function () {//r = r.response;
3986
4005
  //var e = me.$parent.$el;
3987
4006
  //var error = document.createElement("div");
3988
4007
 
3989
- /*error.innerHTML = r.config.method + ' ' + r.config.url + ' ' + r.status + ' (' + r.statusText + ')';
3990
- error.classList.add("v-error");
3991
- e.parentNode.insertBefore(error, e);*/
4008
+ /*error.innerHTML = r.config.method + ' ' + r.config.url + ' ' + r.status + ' (' + r.statusText + ')';
4009
+ error.classList.add("v-error");
4010
+ e.parentNode.insertBefore(error, e);*/
3992
4011
  }));
3993
4012
  }
3994
4013
  }, function () {
3995
- /*else{
3996
- console.log('no se cargara aun '+pa.name);
3997
- }*/
4014
+ /*else{
4015
+ console.log('no se cargara aun '+pa.name);
4016
+ }*/
3998
4017
  if (!clearQueue) me.queue.shift();
3999
4018
  return _continueIgnored(_for(function () {
4000
4019
  return !!me.queue.length;
@@ -4026,12 +4045,13 @@ var __vue_render__$7 = function __vue_render__() {
4026
4045
  attrs: {
4027
4046
  "title": _vm.data ? _vm.data.length : 0
4028
4047
  }
4029
- }, _vm._l(_vm.filterList, function (item) {
4048
+ }, _vm._l(_vm.filterList, function (item, i) {
4030
4049
  return _c('option', {
4050
+ key: i,
4031
4051
  domProps: {
4032
4052
  "value": _vm.getValueField(item)
4033
4053
  }
4034
- }, [_vm._v(_vm._s(item[_vm.displayField]) + "\n "), _vm._t("default", null, {
4054
+ }, [_vm._v("\n " + _vm._s(item[_vm.displayField]) + "\n "), _vm._t("default", null, {
4035
4055
  "item": item
4036
4056
  })], 2);
4037
4057
  }), 0);
@@ -7497,7 +7517,7 @@ window.ui = _$1.ui = function (cfg) {
7497
7517
  });
7498
7518
  }
7499
7519
 
7500
- me.$emit('stored', o, storedList);
7520
+ me.$emit('stored', o, storedList, objectStore);
7501
7521
  if (me.$ionic) me.app.toast('El registro fue grabado exitosamente!');
7502
7522
  me.close({
7503
7523
  success: true,
@@ -7539,7 +7559,8 @@ window.ui = _$1.ui = function (cfg) {
7539
7559
 
7540
7560
  re.onerror = function (e) {
7541
7561
  console.error(e);
7542
- };
7562
+ }; //data es l valor recibiddo y o l nviao
7563
+
7543
7564
 
7544
7565
  me.$emit('sync', data, o);
7545
7566
  };
@@ -7594,7 +7615,7 @@ window.ui = _$1.ui = function (cfg) {
7594
7615
  }
7595
7616
  }
7596
7617
 
7597
- me.MsgBox('Verifique el formulario, aun tiene campos obligatorios sin completar.');
7618
+ me.MsgBox('Verifique el formulario, aun tiene campos obligatorio completar.');
7598
7619
  if (me.$el.parentNode.className == 'v-dialog') me.$el.parentNode.parentNode.scroll({
7599
7620
  top: 0,
7600
7621
  behavior: 'smooth'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isobit-ui",
3
- "version": "0.1.102",
3
+ "version": "0.1.103",
4
4
  "type": "module",
5
5
  "description": "Vue component to play videos",
6
6
  "keywords": [