isobit-ui 0.0.295 → 0.0.300

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 +64 -61
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,11 +1,12 @@
1
1
  /*!
2
- * isobit-ui v0.0.295
2
+ * isobit-ui v0.0.300
3
3
  * (c) Erik Alarcon Pinedo
4
4
  * Released under the MIT License.
5
5
  */
6
6
  'use strict';
7
7
 
8
8
  var Vue$1 = require('vue');
9
+ var axios$1 = require('axios');
9
10
  var __vue_normalize__ = require('vue-runtime-helpers/dist/normalize-component.mjs');
10
11
  var __vue_create_injector__ = require('vue-runtime-helpers/dist/inject-style/browser.mjs');
11
12
  var Observable = require('ol/Observable');
@@ -14,6 +15,7 @@ var __$_require_fs_images_triangle_down_svg__ = require('@/fs/images/triangle-do
14
15
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
15
16
 
16
17
  var Vue__default = /*#__PURE__*/_interopDefaultLegacy(Vue$1);
18
+ var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios$1);
17
19
  var __vue_normalize____default = /*#__PURE__*/_interopDefaultLegacy(__vue_normalize__);
18
20
  var __vue_create_injector____default = /*#__PURE__*/_interopDefaultLegacy(__vue_create_injector__);
19
21
  var __$_require_fs_images_triangle_down_svg____default = /*#__PURE__*/_interopDefaultLegacy(__$_require_fs_images_triangle_down_svg__);
@@ -4577,6 +4579,8 @@ function _invoke(body, then) {
4577
4579
  }
4578
4580
 
4579
4581
  window.isMobile = 1;
4582
+ if (typeof Window._ == 'undefined') Window._ = {};
4583
+ var _$1 = Window._;
4580
4584
  Vue__default['default'].config.ignoredElements = [].concat(_toConsumableArray(Vue__default['default'].config.ignoredElements || []), ['v-filter', 'v-footer']);
4581
4585
 
4582
4586
  Vue__default['default'].n = function (v) {
@@ -4703,8 +4707,8 @@ var resize = function resize() {
4703
4707
 
4704
4708
  if (p) {
4705
4709
  var pid = p.getAttribute("popup");
4706
- if (!pid) p.setAttribute("popup", pid = _.id());
4707
- var popup = _.storeFunction[pid];
4710
+ if (!pid) p.setAttribute("popup", pid = _$1.id());
4711
+ var popup = _$1.storeFunction[pid];
4708
4712
  var bu = p.querySelectorAll('.ui-datatable-header .v-button');
4709
4713
 
4710
4714
  if (bu && bu.length && !popup && window.innerWidth <= 700) {
@@ -4729,7 +4733,7 @@ var resize = function resize() {
4729
4733
  var cmd = document.querySelector('#' + id);
4730
4734
  if (cmd.tagName == 'BUTTON') cmd.click();else cmd.children[0].click(); //console.log(cmd);
4731
4735
 
4732
- _.unmask(mask);
4736
+ _$1.unmask(mask);
4733
4737
  };
4734
4738
 
4735
4739
  p.style.position = 'relative';
@@ -4757,7 +4761,7 @@ var resize = function resize() {
4757
4761
 
4758
4762
  for (i = 0; i < bu.length; i++) {
4759
4763
  var ite = document.createElement('li');
4760
- if (!bu[i].id) bu[i].id = 'c-' + _.id();
4764
+ if (!bu[i].id) bu[i].id = 'c-' + _$1.id();
4761
4765
  ite.setAttribute('commandId', bu[i].id);
4762
4766
 
4763
4767
  if (bu[i].tagName == 'BUTTON') {
@@ -4774,19 +4778,19 @@ var resize = function resize() {
4774
4778
  popup.appendChild(ite);
4775
4779
  }
4776
4780
 
4777
- mask = _.mask(popup); //popup.style.top=(parseInt(pbutton.style.top)+pbutton.offsetHeight)+'px';
4781
+ mask = _$1.mask(popup); //popup.style.top=(parseInt(pbutton.style.top)+pbutton.offsetHeight)+'px';
4778
4782
 
4779
4783
  popup.style.display = 'block';
4780
4784
 
4781
4785
  mask.onclick = function () {
4782
4786
  popup.style.display = 'none';
4783
4787
 
4784
- _.unmask(mask);
4788
+ _$1.unmask(mask);
4785
4789
  };
4786
4790
  };
4787
4791
 
4788
4792
  p.appendChild(pbutton);
4789
- _.storeFunction[pid] = popup;
4793
+ _$1.storeFunction[pid] = popup;
4790
4794
  }, 1000);
4791
4795
  }
4792
4796
  }
@@ -4877,7 +4881,7 @@ var f = {
4877
4881
  };
4878
4882
  if (![].contains) Object.defineProperty(Array.prototype, 'contains', f);
4879
4883
  if (!"".contains) Object.defineProperty(String.prototype, 'contains', f);
4880
- _ = Object.assign(_, {
4884
+ _$1 = Object.assign(_$1, {
4881
4885
  remoteServer: '',
4882
4886
  _id: 0,
4883
4887
  networkStatus: {
@@ -4886,13 +4890,13 @@ _ = Object.assign(_, {
4886
4890
  storeFunction: {},
4887
4891
  varMap: {},
4888
4892
  id: function id() {
4889
- return ++_._id;
4893
+ return ++_$1._id;
4890
4894
  },
4891
4895
  findForm: function findForm(e) {
4892
4896
  var parent = e.parentNode;
4893
4897
 
4894
4898
  if (parent && parent.tagName != 'FORM') {
4895
- parent = _.findForm(parent);
4899
+ parent = _$1.findForm(parent);
4896
4900
  }
4897
4901
 
4898
4902
  return parent;
@@ -4901,7 +4905,7 @@ _ = Object.assign(_, {
4901
4905
  return a && a.includes(b);
4902
4906
  },
4903
4907
  uiParent: function uiParent(e) {
4904
- return e.ui || !e ? e : _.uiParent(e.$parent);
4908
+ return e.ui || !e ? e : _$1.uiParent(e.$parent);
4905
4909
  },
4906
4910
  closest: function closest(el, sel) {
4907
4911
  while ((el = el.parentElement) && !(el.matches || el.matchesSelector).call(el, sel)) {
@@ -5053,18 +5057,18 @@ _ = Object.assign(_, {
5053
5057
  },
5054
5058
  getCurrentPosition: function getCurrentPosition() {
5055
5059
  return new Promise(function (res, rej) {
5056
- if (_.location) {
5057
- var id = 'result' + _.id();
5060
+ if (_$1.location) {
5061
+ var id = 'result' + _$1.id();
5058
5062
 
5059
- _[id] = function (r) {
5060
- delete _[id];
5063
+ _$1[id] = function (r) {
5064
+ delete _$1[id];
5061
5065
 
5062
5066
  if (r.coords) {
5063
5067
  res(r);
5064
5068
  } else rej(r);
5065
5069
  };
5066
5070
 
5067
- _.location(id);
5071
+ _$1.location(id);
5068
5072
  } else if (navigator.geolocation) {
5069
5073
  navigator.geolocation.getCurrentPosition(res, rej);
5070
5074
  }
@@ -5153,8 +5157,8 @@ _ = Object.assign(_, {
5153
5157
  }, 0);
5154
5158
  }
5155
5159
  });
5156
- _.getLocation = _.getCurrentPosition;
5157
- Vue__default['default'].id = _.id;
5160
+ _$1.getLocation = _$1.getCurrentPosition;
5161
+ Vue__default['default'].id = _$1.id;
5158
5162
 
5159
5163
  if (typeof ol !== 'undefined') {
5160
5164
  var getLayerById = function getLayerById(m, id) {
@@ -5194,7 +5198,7 @@ Vue__default['default'].filter('number', function (s
5194
5198
 
5195
5199
  return s;
5196
5200
  });
5197
- Vue__default['default'].filter('date', _.toDate = function (s, type) {
5201
+ Vue__default['default'].filter('date', _$1.toDate = function (s, type) {
5198
5202
  //s usa d|date('time')
5199
5203
  if (s) {
5200
5204
  var pad = Vue__default['default'].pad;
@@ -5216,7 +5220,7 @@ Vue__default['default'].filter('date', _.toDate = function (s, type) {
5216
5220
 
5217
5221
  return s;
5218
5222
  });
5219
- _.HTML2Canvas = HTML2Canvas;
5223
+ _$1.HTML2Canvas = HTML2Canvas;
5220
5224
 
5221
5225
  Vue__default['default'].dateDiff = function (fa, fb) {
5222
5226
  //fa y fb dos fechas
@@ -5299,13 +5303,13 @@ var f = {
5299
5303
  if (![].contains) Object.defineProperty(Array.prototype, 'contains', f);
5300
5304
  if (!"".contains) Object.defineProperty(String.prototype, 'contains', f);
5301
5305
 
5302
- _.contains = function (a, b) {
5306
+ _$1.contains = function (a, b) {
5303
5307
  // console.log(a);
5304
5308
  // console.log(a&&a.includes(b));
5305
5309
  return a && a.includes(b);
5306
5310
  };
5307
5311
 
5308
- _.MsgBox = function MsgBox(m, cb, b) {
5312
+ _$1.MsgBox = function MsgBox(m, cb, b) {
5309
5313
  if (!b) b = ['OK']; //si el elemento debe cargarse en un dialog
5310
5314
 
5311
5315
  if (!document.body) return;
@@ -5322,7 +5326,7 @@ _.MsgBox = function MsgBox(m, cb, b) {
5322
5326
  dialog.classList.add("v-dialog");
5323
5327
  dialog.classList.add("v-msgbox");
5324
5328
  msgContent.innerHTML = m;
5325
- dialog.setAttribute("path", _.currentPath);
5329
+ dialog.setAttribute("path", _$1.currentPath);
5326
5330
  dialog.setAttribute("callback", nid);
5327
5331
 
5328
5332
  var closeListener = function closeListener() {
@@ -5418,7 +5422,7 @@ Vue__default['default'].mergeDeep = function () {
5418
5422
  return Vue__default['default'].mergeDeep.apply(null, args); //return mergeDeep(target, ...sources);
5419
5423
  };
5420
5424
 
5421
- window.ui = _.ui = function (cfg) {
5425
+ window.ui = _$1.ui = function (cfg) {
5422
5426
  var defs = {
5423
5427
  watch: {
5424
5428
  $route: function $route(v) {
@@ -5446,7 +5450,7 @@ window.ui = _.ui = function (cfg) {
5446
5450
  return t ? t.selected.length : 0;
5447
5451
  },
5448
5452
  baseURL: function baseURL() {
5449
- return Vue__default['default'].baseURL ? Vue__default['default'].baseURL : axios.defaults.baseURL;
5453
+ return Vue__default['default'].baseURL ? Vue__default['default'].baseURL : axios__default['default'].defaults.baseURL;
5450
5454
  },
5451
5455
  session: function session() {
5452
5456
  return window.app.session;
@@ -5497,18 +5501,18 @@ window.ui = _.ui = function (cfg) {
5497
5501
  mounted: function mounted() {
5498
5502
  var me = this;
5499
5503
 
5500
- var vueid = _.id(); //error cuando se carga un mapa con v-panel el mapa de turismo es ejemplo
5504
+ var vueid = _$1.id(); //error cuando se carga un mapa con v-panel el mapa de turismo es ejemplo
5501
5505
 
5502
5506
 
5503
5507
  if (me.$el && me.$el.setAttribute) {
5504
5508
  me.$el.setAttribute("vueid", vueid);
5505
5509
  }
5506
5510
 
5507
- _.varMap[vueid] = me;
5511
+ _$1.varMap[vueid] = me;
5508
5512
  me.ddd(me.$root);
5509
5513
  },
5510
5514
  methods: {
5511
- MsgBox: _.MsgBox,
5515
+ MsgBox: _$1.MsgBox,
5512
5516
  changeRoute: function changeRoute() {
5513
5517
  /*console.log(v)*/
5514
5518
  },
@@ -5521,7 +5525,7 @@ window.ui = _.ui = function (cfg) {
5521
5525
  name = name ? name : f.name.replace(/[^\w\s.]/gi, '');
5522
5526
  formData.append('filename', name);
5523
5527
  formData.append('file', f, name);
5524
- axios.post('/api/file/upload', formData, {
5528
+ axios__default['default'].post('/api/file/upload', formData, {
5525
5529
  headers: {
5526
5530
  'Content-Type': 'multipart/form-data',
5527
5531
  filename: name
@@ -5570,12 +5574,12 @@ window.ui = _.ui = function (cfg) {
5570
5574
  var me = this;
5571
5575
  var action = me.$children[0].action;
5572
5576
  if (!action) action = window.location.pathname;
5573
- action = _.processURL(action);
5577
+ action = _$1.processURL(action);
5574
5578
 
5575
5579
  if (window.o) {
5576
5580
  window.o(action + '/create');
5577
5581
  } else {
5578
- instance.get(_.currentPath = (action + '/create').replace(/([^:]\/)\/+/g, "$1") + '?modal').then(_.open)["catch"](me.error);
5582
+ instance.get(_$1.currentPath = (action + '/create').replace(/([^:]\/)\/+/g, "$1") + '?modal').then(_$1.open)["catch"](me.error);
5579
5583
  }
5580
5584
  },
5581
5585
  edit: function edit() {
@@ -5591,7 +5595,7 @@ window.ui = _.ui = function (cfg) {
5591
5595
  if (window.o) {
5592
5596
  window.o(action + '/' + id + '/edit');
5593
5597
  } else {
5594
- axios.get((_.currentPath = (action + '/' + id + '/edit').replace(/([^:]\/)\/+/g, "$1")) + '?modal').then(me.open)["catch"](me.error);
5598
+ axios__default['default'].get((_$1.currentPath = (action + '/' + id + '/edit').replace(/([^:]\/)\/+/g, "$1")) + '?modal').then(me.open)["catch"](me.error);
5595
5599
  }
5596
5600
  },
5597
5601
  get: function get(part) {
@@ -5649,7 +5653,7 @@ window.ui = _.ui = function (cfg) {
5649
5653
  var id = dat[key];
5650
5654
  me.MsgBox('Esta seguro que desea eliminar el registro seleccionado?', function (r) {
5651
5655
  if (r == 0) {
5652
- axios["delete"](t.src + '/' + id).then(function () {
5656
+ axios__default['default']["delete"](t.src + '/' + id).then(function () {
5653
5657
  me.MsgBox('Registro eliminado');
5654
5658
  var id = dat.id;
5655
5659
 
@@ -5666,7 +5670,7 @@ window.ui = _.ui = function (cfg) {
5666
5670
  }
5667
5671
  },
5668
5672
  apiLink: function apiLink(str) {
5669
- return str.replace(_.contextPath, _.contextPath + '/api');
5673
+ return str.replace(_$1.contextPath, _$1.contextPath + '/api');
5670
5674
  },
5671
5675
  open: function open(response, path, o) {
5672
5676
  var me = this,
@@ -5683,7 +5687,7 @@ window.ui = _.ui = function (cfg) {
5683
5687
  } else if (response === 'GET') {
5684
5688
  if (typeof path == 'string') {
5685
5689
  var cfg = {
5686
- path: _.currentPath = path + (typeof o == 'string' ? '/' + o : '')
5690
+ path: _$1.currentPath = path + (typeof o == 'string' ? '/' + o : '')
5687
5691
  };
5688
5692
 
5689
5693
  if (typeof o == 'function') {
@@ -5715,7 +5719,7 @@ window.ui = _.ui = function (cfg) {
5715
5719
  el.style.removeProperty('display');
5716
5720
  return el;
5717
5721
  } else {
5718
- return axios.get((path.path + '/?modal').replace(/([^:]\/)\/+/g, "$1")).then(function (r) {
5722
+ return axios__default['default'].get((path.path + '/?modal').replace(/([^:]\/)\/+/g, "$1")).then(function (r) {
5719
5723
  r["class"] = path["class"] ? path["class"] : '';
5720
5724
  r.path = path.path;
5721
5725
  r.result = path.callback;
@@ -5745,7 +5749,7 @@ window.ui = _.ui = function (cfg) {
5745
5749
  dialog.innerHTML = path.data;
5746
5750
  var s = dialog.getElementsByTagName('script'); //console.log('patttt=' + _.currentPath);
5747
5751
 
5748
- dialog.setAttribute("path", _.currentPath);
5752
+ dialog.setAttribute("path", _$1.currentPath);
5749
5753
  var ld = dialog.children; //console.log(s);
5750
5754
 
5751
5755
  for (var k = 0; k < s.length; k++) {
@@ -5897,7 +5901,7 @@ window.ui = _.ui = function (cfg) {
5897
5901
  tb.style.padding = '4px 16px';
5898
5902
  tb.className = "_ ui-widget v-state-default ui-corner-all v-button ui-button-text-only";
5899
5903
 
5900
- var vue = _.varMap[children.getAttribute("vueid")];
5904
+ var vue = _$1.varMap[children.getAttribute("vueid")];
5901
5905
 
5902
5906
  tb.onclick = function (e) {
5903
5907
  e.preventDefault();
@@ -5909,7 +5913,7 @@ window.ui = _.ui = function (cfg) {
5909
5913
  tb.innerHTML = 'Seleccionar';
5910
5914
  tb.style.padding = '4px 16px';
5911
5915
  tb.className = "_ ui-widget v-state-default ui-corner-all v-button ui-button-text-only";
5912
- vue = _.varMap[children.getAttribute("vueid")];
5916
+ vue = _$1.varMap[children.getAttribute("vueid")];
5913
5917
 
5914
5918
  tb.onclick = function (e) {
5915
5919
  e.preventDefault();
@@ -5931,9 +5935,9 @@ window.ui = _.ui = function (cfg) {
5931
5935
  resize();
5932
5936
  }
5933
5937
 
5934
- _.storeFunction['PROPS=' + nid] = path;
5938
+ _$1.storeFunction['PROPS=' + nid] = path;
5935
5939
 
5936
- _.storeFunction[nid] = function (o) {
5940
+ _$1.storeFunction[nid] = function (o) {
5937
5941
  if (path.result) {
5938
5942
  path.result(o);
5939
5943
  }
@@ -5988,7 +5992,7 @@ window.ui = _.ui = function (cfg) {
5988
5992
  var dlg = ok instanceof HTMLElement ? ok : null;
5989
5993
 
5990
5994
  try {
5991
- if (!dlg && event.target instanceof HTMLElement) dlg = _.closest(event.target, '.v-dialog');
5995
+ if (!dlg && event.target instanceof HTMLElement) dlg = _$1.closest(event.target, '.v-dialog');
5992
5996
  } catch (e) {
5993
5997
  console.log(e);
5994
5998
  }
@@ -6005,7 +6009,7 @@ window.ui = _.ui = function (cfg) {
6005
6009
  if ((' ' + mask.className + ' ').indexOf(' v-overlay ') > -1) mask.style.display = "none";else mask = null;
6006
6010
  Vue__default['default'].resize();
6007
6011
 
6008
- var cb = _.storeFunction[dlg.getAttribute("callback")];
6012
+ var cb = _$1.storeFunction[dlg.getAttribute("callback")];
6009
6013
 
6010
6014
  if (cb) cb(ok);
6011
6015
  dlg.parentNode.removeChild(dlg);
@@ -6142,7 +6146,7 @@ window.ui = _.ui = function (cfg) {
6142
6146
 
6143
6147
 
6144
6148
  if (sel2.length > 0) {
6145
- axios.post(action + '/bulk', sel3).then(function (r) {
6149
+ axios__default['default'].post(action + '/bulk', sel3).then(function (r) {
6146
6150
  var d = r.data;
6147
6151
  console.log(d);
6148
6152
 
@@ -6289,7 +6293,7 @@ window.ui = _.ui = function (cfg) {
6289
6293
  }
6290
6294
  }, function (_result) {
6291
6295
  if (_exit2) return _result;
6292
- axios.post(action, o).then(function (r) {
6296
+ axios__default['default'].post(action, o).then(function (r) {
6293
6297
  me.MsgBox('El registro fue grabado exitosamente!', function () {
6294
6298
  if (me.close2) me.close2(r);else {
6295
6299
  me.close(true);
@@ -6489,12 +6493,12 @@ window.ui = _.ui = function (cfg) {
6489
6493
  var tv = el.querySelectorAll("v-tabview");
6490
6494
 
6491
6495
  for (var i = 0; i < tv.length; i++) {
6492
- var id = 'v-' + _.id();
6496
+ var id = 'v-' + _$1.id();
6493
6497
 
6494
6498
  tv[i].setAttribute("vid", id);
6495
6499
  var cn = tv[i].childNodes;
6496
6500
  var tabs = [];
6497
- _.varMap[id] = tabs;
6501
+ _$1.varMap[id] = tabs;
6498
6502
 
6499
6503
  for (var j = 0; j < cn.length; j++) {
6500
6504
  if (cn[j].tagName) {
@@ -6518,22 +6522,22 @@ window.ui = _.ui = function (cfg) {
6518
6522
  function configureAxios(a) {
6519
6523
  var mask;
6520
6524
  a.interceptors.request.use(function (config) {
6521
- _.eeee = config;
6522
- if (!mask) mask = _.mask();
6525
+ _$1.eeee = config;
6526
+ if (!mask) mask = _$1.mask();
6523
6527
  return config;
6524
6528
  }, function (e) {
6525
- mask = _.unmask(mask);
6529
+ mask = _$1.unmask(mask);
6526
6530
 
6527
- _.MsgBox('request ' + _.id() + ' ' + e.message);
6531
+ _$1.MsgBox('request ' + _$1.id() + ' ' + e.message);
6528
6532
 
6529
6533
  return Promise.reject(e);
6530
6534
  });
6531
6535
  a.interceptors.response.use(function (response) {
6532
- mask = _.unmask(mask);
6536
+ mask = _$1.unmask(mask);
6533
6537
  return response;
6534
6538
  }, function (e) {
6535
- if (axios.error && axios.error(e) == false) {
6536
- mask = _.unmask(mask);
6539
+ if (axios__default['default'].error && axios__default['default'].error(e) == false) {
6540
+ mask = _$1.unmask(mask);
6537
6541
  } else {
6538
6542
  var r = e.response,
6539
6543
  msg = r && r.data && r.data.msg ? r.data.msg : e.message;
@@ -6547,27 +6551,26 @@ function configureAxios(a) {
6547
6551
  }
6548
6552
  }
6549
6553
 
6550
- mask = _.unmask(mask);
6554
+ mask = _$1.unmask(mask);
6551
6555
 
6552
6556
  if (e.config.error) {
6553
6557
  e.config.error(e, msg);
6554
6558
  } else {
6555
- _.MsgBox(
6559
+ _$1.MsgBox(
6556
6560
  /*'response '+_.id()+' '+*/
6557
6561
  msg);
6558
6562
  }
6559
6563
  }
6560
6564
 
6561
- delete axios.error;
6565
+ delete axios__default['default'].error;
6562
6566
  return Promise.reject(e);
6563
6567
  });
6564
6568
  }
6565
6569
 
6566
- window.axios = axios;
6567
- window._ = _;
6570
+ window._ = _$1;
6568
6571
  window.Vue = Vue__default['default'];
6569
6572
  Vue__default['default'].configureAxios = configureAxios;
6570
- configureAxios(axios);
6573
+ configureAxios(axios__default['default']);
6571
6574
  var index = {
6572
6575
  install: function install(Vue, options) {
6573
6576
  Vue.component("v-autocomplete", __vue_component__$k);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isobit-ui",
3
- "version": "0.0.295",
3
+ "version": "0.0.300",
4
4
  "description": "Vue component to play videos",
5
5
  "keywords": [
6
6
  "ui",