isobit-ui 0.0.343 → 0.0.347

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 +77 -34
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * isobit-ui v0.0.343
2
+ * isobit-ui v0.0.347
3
3
  * (c) Erik Alarcon Pinedo
4
4
  * Released under the MIT License.
5
5
  */
@@ -1377,7 +1377,7 @@ var __vue_component__$e = /*#__PURE__*/__vue_normalize____default['default']({
1377
1377
  staticRenderFns: __vue_staticRenderFns__$d
1378
1378
  }, __vue_inject_styles__$e, __vue_script__$e, __vue_scope_id__$e, __vue_is_functional_template__$e, __vue_module_identifier__$e, false, undefined, undefined, undefined);
1379
1379
 
1380
- function _await$1(value, then, direct) {
1380
+ function _await$2(value, then, direct) {
1381
1381
  if (direct) {
1382
1382
  return then ? then(value) : value;
1383
1383
  }
@@ -1922,7 +1922,7 @@ var script$d = {
1922
1922
  }; //t.onerror = event => reject(event.target.error);
1923
1923
 
1924
1924
  });
1925
- return _await$1(p); //console.log(result);
1925
+ return _await$2(p); //console.log(result);
1926
1926
  } catch (e) {
1927
1927
  return Promise.reject(e);
1928
1928
  }
@@ -1937,7 +1937,7 @@ var script$d = {
1937
1937
  var datj;
1938
1938
  return _invoke$1(function () {
1939
1939
  if (window._.db) {
1940
- return _await$1(me.getStoredList(storage), function (_me$getStoredList) {
1940
+ return _await$2(me.getStoredList(storage), function (_me$getStoredList) {
1941
1941
  datj = _me$getStoredList;
1942
1942
  });
1943
1943
  } else {
@@ -2534,6 +2534,7 @@ var __vue_render__$b = function __vue_render__() {
2534
2534
  var _c = _vm._self._c || _h;
2535
2535
 
2536
2536
  return _c('div', {
2537
+ staticClass: "v-select",
2537
2538
  staticStyle: {
2538
2539
  "position": "relative"
2539
2540
  }
@@ -2859,15 +2860,28 @@ var __vue_component__$9 = /*#__PURE__*/__vue_normalize____default['default']({
2859
2860
  //
2860
2861
  //
2861
2862
  //
2863
+ function _await$1(value, then, direct) {
2864
+ if (direct) {
2865
+ return then ? then(value) : value;
2866
+ }
2867
+
2868
+ if (!value || !value.then) {
2869
+ value = Promise.resolve(value);
2870
+ }
2871
+
2872
+ return then ? value.then(then) : value;
2873
+ }
2874
+
2862
2875
  var script$8 = {
2863
2876
  props: {
2864
2877
  url: String,
2865
2878
  displayField: String,
2866
2879
  data: Array,
2867
- storage: null,
2880
+ store: null,
2868
2881
  valueField: String,
2869
2882
  filters: null,
2870
- filter: null
2883
+ filter: null,
2884
+ mode: null
2871
2885
  },
2872
2886
  watch: {
2873
2887
  data: function data(v, ov) {
@@ -2951,38 +2965,48 @@ var script$8 = {
2951
2965
  return me.filterList[p.selectedIndex - 1];
2952
2966
  },
2953
2967
  load: function load(p, nou) {
2954
- var me = this;
2955
- var pa = me.$el.parentElement; //console.log(pa.name+'.antes de preguntar disabled options.load '+JSON.stringify(p));
2968
+ try {
2969
+ var _this2 = this;
2956
2970
 
2957
- if (!pa.disabled) {
2958
- if (!me.data2) me.data2 = [];
2959
- if (me.filters) p = Vue.mergeDeep(p ? p : {}, me.filters); //console.log(pa.name+'.options.load '+JSON.stringify(p));
2971
+ var me = _this2;
2972
+ var pa = me.$el.parentElement;
2973
+ console.log(p);
2974
+ me.data2 = getStoredList(me.store); //console.log(pa.name+'.antes de preguntar disabled options.load '+JSON.stringify(p));
2960
2975
 
2961
- axios.get(me.url, {
2962
- params: p
2963
- }).then(function (r) {
2964
- var data = r.data.data ? r.data.data : r.data;
2965
- me.$emit('loaded', {
2966
- target: me,
2967
- data: data
2976
+ if (me.url && !pa.disabled) {
2977
+ if (!me.data2) me.data2 = [];
2978
+ if (me.filters) p = Vue.mergeDeep(p ? p : {}, me.filters); //console.log(pa.name+'.options.load '+JSON.stringify(p));
2979
+
2980
+ axios.get(me.url, {
2981
+ params: p
2982
+ }).then(function (r) {
2983
+ var data = r.data.data ? r.data.data : r.data;
2984
+ me.$emit('loaded', {
2985
+ target: me,
2986
+ data: data
2987
+ });
2988
+ me.data2 = data;
2989
+ if (me.store) localstore.setItem(me.store, JSON.stringify(data));
2990
+ me.$parent.$forceUpdate();
2991
+ if (nou) nou();
2992
+ })["catch"](function () {//r = r.response;
2993
+ //var e = me.$parent.$el;
2994
+ //var error = document.createElement("div");
2995
+
2996
+ /*error.innerHTML = r.config.method + ' ' + r.config.url + ' ' + r.status + ' (' + r.statusText + ')';
2997
+ error.classList.add("v-error");
2998
+ e.parentNode.insertBefore(error, e);*/
2968
2999
  });
2969
- me.data2 = data;
2970
- if (me.storage) localStorage.setItem(me.storage, JSON.stringify(data));
2971
- me.$parent.$forceUpdate();
2972
- if (nou) nou();
2973
- })["catch"](function () {//r = r.response;
2974
- //var e = me.$parent.$el;
2975
- //var error = document.createElement("div");
2976
-
2977
- /*error.innerHTML = r.config.method + ' ' + r.config.url + ' ' + r.status + ' (' + r.statusText + ')';
2978
- error.classList.add("v-error");
2979
- e.parentNode.insertBefore(error, e);*/
2980
- });
2981
- }
2982
- /*else{
2983
- console.log('no se cargara aun '+pa.name);
2984
- }*/
3000
+ }
3001
+ /*else{
3002
+ console.log('no se cargara aun '+pa.name);
3003
+ }*/
3004
+
2985
3005
 
3006
+ return _await$1();
3007
+ } catch (e) {
3008
+ return Promise.reject(e);
3009
+ }
2986
3010
  }
2987
3011
  }
2988
3012
  };
@@ -5014,6 +5038,25 @@ var f = {
5014
5038
  if (![].contains) Object.defineProperty(Array.prototype, 'contains', f);
5015
5039
  if (!"".contains) Object.defineProperty(String.prototype, 'contains', f);
5016
5040
  _$1 = Object.assign(_$1, {
5041
+ getStoredList: function getStoredList(store) {
5042
+ try {
5043
+ var p = new Promise(function (resolve) {
5044
+ var t = _$1.db.transaction(store),
5045
+ objectStore = t.objectStore(store); //,d=[];
5046
+
5047
+
5048
+ var r = objectStore.getAll();
5049
+
5050
+ r.onsuccess = function () {
5051
+ resolve(r.result);
5052
+ }; //t.onerror = event => reject(event.target.error);
5053
+
5054
+ });
5055
+ return _await(p); //console.log(result);
5056
+ } catch (e) {
5057
+ return Promise.reject(e);
5058
+ }
5059
+ },
5017
5060
  remoteServer: '',
5018
5061
  _id: 0,
5019
5062
  networkStatus: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isobit-ui",
3
- "version": "0.0.343",
3
+ "version": "0.0.347",
4
4
  "description": "Vue component to play videos",
5
5
  "keywords": [
6
6
  "ui",