isobit-ui 0.0.295 → 0.0.297
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.
- package/dist/index.js +53 -51
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* isobit-ui v0.0.
|
|
2
|
+
* isobit-ui v0.0.297
|
|
3
3
|
* (c) Erik Alarcon Pinedo
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -4577,6 +4577,8 @@ function _invoke(body, then) {
|
|
|
4577
4577
|
}
|
|
4578
4578
|
|
|
4579
4579
|
window.isMobile = 1;
|
|
4580
|
+
if (typeof Window._ == 'undefined') Window._ = {};
|
|
4581
|
+
var _$1 = Window._;
|
|
4580
4582
|
Vue__default['default'].config.ignoredElements = [].concat(_toConsumableArray(Vue__default['default'].config.ignoredElements || []), ['v-filter', 'v-footer']);
|
|
4581
4583
|
|
|
4582
4584
|
Vue__default['default'].n = function (v) {
|
|
@@ -4703,8 +4705,8 @@ var resize = function resize() {
|
|
|
4703
4705
|
|
|
4704
4706
|
if (p) {
|
|
4705
4707
|
var pid = p.getAttribute("popup");
|
|
4706
|
-
if (!pid) p.setAttribute("popup", pid = _.id());
|
|
4707
|
-
var popup = _.storeFunction[pid];
|
|
4708
|
+
if (!pid) p.setAttribute("popup", pid = _$1.id());
|
|
4709
|
+
var popup = _$1.storeFunction[pid];
|
|
4708
4710
|
var bu = p.querySelectorAll('.ui-datatable-header .v-button');
|
|
4709
4711
|
|
|
4710
4712
|
if (bu && bu.length && !popup && window.innerWidth <= 700) {
|
|
@@ -4729,7 +4731,7 @@ var resize = function resize() {
|
|
|
4729
4731
|
var cmd = document.querySelector('#' + id);
|
|
4730
4732
|
if (cmd.tagName == 'BUTTON') cmd.click();else cmd.children[0].click(); //console.log(cmd);
|
|
4731
4733
|
|
|
4732
|
-
_.unmask(mask);
|
|
4734
|
+
_$1.unmask(mask);
|
|
4733
4735
|
};
|
|
4734
4736
|
|
|
4735
4737
|
p.style.position = 'relative';
|
|
@@ -4757,7 +4759,7 @@ var resize = function resize() {
|
|
|
4757
4759
|
|
|
4758
4760
|
for (i = 0; i < bu.length; i++) {
|
|
4759
4761
|
var ite = document.createElement('li');
|
|
4760
|
-
if (!bu[i].id) bu[i].id = 'c-' + _.id();
|
|
4762
|
+
if (!bu[i].id) bu[i].id = 'c-' + _$1.id();
|
|
4761
4763
|
ite.setAttribute('commandId', bu[i].id);
|
|
4762
4764
|
|
|
4763
4765
|
if (bu[i].tagName == 'BUTTON') {
|
|
@@ -4774,19 +4776,19 @@ var resize = function resize() {
|
|
|
4774
4776
|
popup.appendChild(ite);
|
|
4775
4777
|
}
|
|
4776
4778
|
|
|
4777
|
-
mask = _.mask(popup); //popup.style.top=(parseInt(pbutton.style.top)+pbutton.offsetHeight)+'px';
|
|
4779
|
+
mask = _$1.mask(popup); //popup.style.top=(parseInt(pbutton.style.top)+pbutton.offsetHeight)+'px';
|
|
4778
4780
|
|
|
4779
4781
|
popup.style.display = 'block';
|
|
4780
4782
|
|
|
4781
4783
|
mask.onclick = function () {
|
|
4782
4784
|
popup.style.display = 'none';
|
|
4783
4785
|
|
|
4784
|
-
_.unmask(mask);
|
|
4786
|
+
_$1.unmask(mask);
|
|
4785
4787
|
};
|
|
4786
4788
|
};
|
|
4787
4789
|
|
|
4788
4790
|
p.appendChild(pbutton);
|
|
4789
|
-
_.storeFunction[pid] = popup;
|
|
4791
|
+
_$1.storeFunction[pid] = popup;
|
|
4790
4792
|
}, 1000);
|
|
4791
4793
|
}
|
|
4792
4794
|
}
|
|
@@ -4877,7 +4879,7 @@ var f = {
|
|
|
4877
4879
|
};
|
|
4878
4880
|
if (![].contains) Object.defineProperty(Array.prototype, 'contains', f);
|
|
4879
4881
|
if (!"".contains) Object.defineProperty(String.prototype, 'contains', f);
|
|
4880
|
-
_ = Object.assign(_, {
|
|
4882
|
+
_$1 = Object.assign(_$1, {
|
|
4881
4883
|
remoteServer: '',
|
|
4882
4884
|
_id: 0,
|
|
4883
4885
|
networkStatus: {
|
|
@@ -4886,13 +4888,13 @@ _ = Object.assign(_, {
|
|
|
4886
4888
|
storeFunction: {},
|
|
4887
4889
|
varMap: {},
|
|
4888
4890
|
id: function id() {
|
|
4889
|
-
return ++_._id;
|
|
4891
|
+
return ++_$1._id;
|
|
4890
4892
|
},
|
|
4891
4893
|
findForm: function findForm(e) {
|
|
4892
4894
|
var parent = e.parentNode;
|
|
4893
4895
|
|
|
4894
4896
|
if (parent && parent.tagName != 'FORM') {
|
|
4895
|
-
parent = _.findForm(parent);
|
|
4897
|
+
parent = _$1.findForm(parent);
|
|
4896
4898
|
}
|
|
4897
4899
|
|
|
4898
4900
|
return parent;
|
|
@@ -4901,7 +4903,7 @@ _ = Object.assign(_, {
|
|
|
4901
4903
|
return a && a.includes(b);
|
|
4902
4904
|
},
|
|
4903
4905
|
uiParent: function uiParent(e) {
|
|
4904
|
-
return e.ui || !e ? e : _.uiParent(e.$parent);
|
|
4906
|
+
return e.ui || !e ? e : _$1.uiParent(e.$parent);
|
|
4905
4907
|
},
|
|
4906
4908
|
closest: function closest(el, sel) {
|
|
4907
4909
|
while ((el = el.parentElement) && !(el.matches || el.matchesSelector).call(el, sel)) {
|
|
@@ -5053,18 +5055,18 @@ _ = Object.assign(_, {
|
|
|
5053
5055
|
},
|
|
5054
5056
|
getCurrentPosition: function getCurrentPosition() {
|
|
5055
5057
|
return new Promise(function (res, rej) {
|
|
5056
|
-
if (_.location) {
|
|
5057
|
-
var id = 'result' + _.id();
|
|
5058
|
+
if (_$1.location) {
|
|
5059
|
+
var id = 'result' + _$1.id();
|
|
5058
5060
|
|
|
5059
|
-
_[id] = function (r) {
|
|
5060
|
-
delete _[id];
|
|
5061
|
+
_$1[id] = function (r) {
|
|
5062
|
+
delete _$1[id];
|
|
5061
5063
|
|
|
5062
5064
|
if (r.coords) {
|
|
5063
5065
|
res(r);
|
|
5064
5066
|
} else rej(r);
|
|
5065
5067
|
};
|
|
5066
5068
|
|
|
5067
|
-
_.location(id);
|
|
5069
|
+
_$1.location(id);
|
|
5068
5070
|
} else if (navigator.geolocation) {
|
|
5069
5071
|
navigator.geolocation.getCurrentPosition(res, rej);
|
|
5070
5072
|
}
|
|
@@ -5153,8 +5155,8 @@ _ = Object.assign(_, {
|
|
|
5153
5155
|
}, 0);
|
|
5154
5156
|
}
|
|
5155
5157
|
});
|
|
5156
|
-
_.getLocation = _.getCurrentPosition;
|
|
5157
|
-
Vue__default['default'].id = _.id;
|
|
5158
|
+
_$1.getLocation = _$1.getCurrentPosition;
|
|
5159
|
+
Vue__default['default'].id = _$1.id;
|
|
5158
5160
|
|
|
5159
5161
|
if (typeof ol !== 'undefined') {
|
|
5160
5162
|
var getLayerById = function getLayerById(m, id) {
|
|
@@ -5194,7 +5196,7 @@ Vue__default['default'].filter('number', function (s
|
|
|
5194
5196
|
|
|
5195
5197
|
return s;
|
|
5196
5198
|
});
|
|
5197
|
-
Vue__default['default'].filter('date', _.toDate = function (s, type) {
|
|
5199
|
+
Vue__default['default'].filter('date', _$1.toDate = function (s, type) {
|
|
5198
5200
|
//s usa d|date('time')
|
|
5199
5201
|
if (s) {
|
|
5200
5202
|
var pad = Vue__default['default'].pad;
|
|
@@ -5216,7 +5218,7 @@ Vue__default['default'].filter('date', _.toDate = function (s, type) {
|
|
|
5216
5218
|
|
|
5217
5219
|
return s;
|
|
5218
5220
|
});
|
|
5219
|
-
_.HTML2Canvas = HTML2Canvas;
|
|
5221
|
+
_$1.HTML2Canvas = HTML2Canvas;
|
|
5220
5222
|
|
|
5221
5223
|
Vue__default['default'].dateDiff = function (fa, fb) {
|
|
5222
5224
|
//fa y fb dos fechas
|
|
@@ -5299,13 +5301,13 @@ var f = {
|
|
|
5299
5301
|
if (![].contains) Object.defineProperty(Array.prototype, 'contains', f);
|
|
5300
5302
|
if (!"".contains) Object.defineProperty(String.prototype, 'contains', f);
|
|
5301
5303
|
|
|
5302
|
-
_.contains = function (a, b) {
|
|
5304
|
+
_$1.contains = function (a, b) {
|
|
5303
5305
|
// console.log(a);
|
|
5304
5306
|
// console.log(a&&a.includes(b));
|
|
5305
5307
|
return a && a.includes(b);
|
|
5306
5308
|
};
|
|
5307
5309
|
|
|
5308
|
-
_.MsgBox = function MsgBox(m, cb, b) {
|
|
5310
|
+
_$1.MsgBox = function MsgBox(m, cb, b) {
|
|
5309
5311
|
if (!b) b = ['OK']; //si el elemento debe cargarse en un dialog
|
|
5310
5312
|
|
|
5311
5313
|
if (!document.body) return;
|
|
@@ -5322,7 +5324,7 @@ _.MsgBox = function MsgBox(m, cb, b) {
|
|
|
5322
5324
|
dialog.classList.add("v-dialog");
|
|
5323
5325
|
dialog.classList.add("v-msgbox");
|
|
5324
5326
|
msgContent.innerHTML = m;
|
|
5325
|
-
dialog.setAttribute("path", _.currentPath);
|
|
5327
|
+
dialog.setAttribute("path", _$1.currentPath);
|
|
5326
5328
|
dialog.setAttribute("callback", nid);
|
|
5327
5329
|
|
|
5328
5330
|
var closeListener = function closeListener() {
|
|
@@ -5418,7 +5420,7 @@ Vue__default['default'].mergeDeep = function () {
|
|
|
5418
5420
|
return Vue__default['default'].mergeDeep.apply(null, args); //return mergeDeep(target, ...sources);
|
|
5419
5421
|
};
|
|
5420
5422
|
|
|
5421
|
-
window.ui = _.ui = function (cfg) {
|
|
5423
|
+
window.ui = _$1.ui = function (cfg) {
|
|
5422
5424
|
var defs = {
|
|
5423
5425
|
watch: {
|
|
5424
5426
|
$route: function $route(v) {
|
|
@@ -5497,18 +5499,18 @@ window.ui = _.ui = function (cfg) {
|
|
|
5497
5499
|
mounted: function mounted() {
|
|
5498
5500
|
var me = this;
|
|
5499
5501
|
|
|
5500
|
-
var vueid = _.id(); //error cuando se carga un mapa con v-panel el mapa de turismo es ejemplo
|
|
5502
|
+
var vueid = _$1.id(); //error cuando se carga un mapa con v-panel el mapa de turismo es ejemplo
|
|
5501
5503
|
|
|
5502
5504
|
|
|
5503
5505
|
if (me.$el && me.$el.setAttribute) {
|
|
5504
5506
|
me.$el.setAttribute("vueid", vueid);
|
|
5505
5507
|
}
|
|
5506
5508
|
|
|
5507
|
-
_.varMap[vueid] = me;
|
|
5509
|
+
_$1.varMap[vueid] = me;
|
|
5508
5510
|
me.ddd(me.$root);
|
|
5509
5511
|
},
|
|
5510
5512
|
methods: {
|
|
5511
|
-
MsgBox: _.MsgBox,
|
|
5513
|
+
MsgBox: _$1.MsgBox,
|
|
5512
5514
|
changeRoute: function changeRoute() {
|
|
5513
5515
|
/*console.log(v)*/
|
|
5514
5516
|
},
|
|
@@ -5570,12 +5572,12 @@ window.ui = _.ui = function (cfg) {
|
|
|
5570
5572
|
var me = this;
|
|
5571
5573
|
var action = me.$children[0].action;
|
|
5572
5574
|
if (!action) action = window.location.pathname;
|
|
5573
|
-
action = _.processURL(action);
|
|
5575
|
+
action = _$1.processURL(action);
|
|
5574
5576
|
|
|
5575
5577
|
if (window.o) {
|
|
5576
5578
|
window.o(action + '/create');
|
|
5577
5579
|
} else {
|
|
5578
|
-
instance.get(_.currentPath = (action + '/create').replace(/([^:]\/)\/+/g, "$1") + '?modal').then(_.open)["catch"](me.error);
|
|
5580
|
+
instance.get(_$1.currentPath = (action + '/create').replace(/([^:]\/)\/+/g, "$1") + '?modal').then(_$1.open)["catch"](me.error);
|
|
5579
5581
|
}
|
|
5580
5582
|
},
|
|
5581
5583
|
edit: function edit() {
|
|
@@ -5591,7 +5593,7 @@ window.ui = _.ui = function (cfg) {
|
|
|
5591
5593
|
if (window.o) {
|
|
5592
5594
|
window.o(action + '/' + id + '/edit');
|
|
5593
5595
|
} else {
|
|
5594
|
-
axios.get((_.currentPath = (action + '/' + id + '/edit').replace(/([^:]\/)\/+/g, "$1")) + '?modal').then(me.open)["catch"](me.error);
|
|
5596
|
+
axios.get((_$1.currentPath = (action + '/' + id + '/edit').replace(/([^:]\/)\/+/g, "$1")) + '?modal').then(me.open)["catch"](me.error);
|
|
5595
5597
|
}
|
|
5596
5598
|
},
|
|
5597
5599
|
get: function get(part) {
|
|
@@ -5666,7 +5668,7 @@ window.ui = _.ui = function (cfg) {
|
|
|
5666
5668
|
}
|
|
5667
5669
|
},
|
|
5668
5670
|
apiLink: function apiLink(str) {
|
|
5669
|
-
return str.replace(_.contextPath, _.contextPath + '/api');
|
|
5671
|
+
return str.replace(_$1.contextPath, _$1.contextPath + '/api');
|
|
5670
5672
|
},
|
|
5671
5673
|
open: function open(response, path, o) {
|
|
5672
5674
|
var me = this,
|
|
@@ -5683,7 +5685,7 @@ window.ui = _.ui = function (cfg) {
|
|
|
5683
5685
|
} else if (response === 'GET') {
|
|
5684
5686
|
if (typeof path == 'string') {
|
|
5685
5687
|
var cfg = {
|
|
5686
|
-
path: _.currentPath = path + (typeof o == 'string' ? '/' + o : '')
|
|
5688
|
+
path: _$1.currentPath = path + (typeof o == 'string' ? '/' + o : '')
|
|
5687
5689
|
};
|
|
5688
5690
|
|
|
5689
5691
|
if (typeof o == 'function') {
|
|
@@ -5745,7 +5747,7 @@ window.ui = _.ui = function (cfg) {
|
|
|
5745
5747
|
dialog.innerHTML = path.data;
|
|
5746
5748
|
var s = dialog.getElementsByTagName('script'); //console.log('patttt=' + _.currentPath);
|
|
5747
5749
|
|
|
5748
|
-
dialog.setAttribute("path", _.currentPath);
|
|
5750
|
+
dialog.setAttribute("path", _$1.currentPath);
|
|
5749
5751
|
var ld = dialog.children; //console.log(s);
|
|
5750
5752
|
|
|
5751
5753
|
for (var k = 0; k < s.length; k++) {
|
|
@@ -5897,7 +5899,7 @@ window.ui = _.ui = function (cfg) {
|
|
|
5897
5899
|
tb.style.padding = '4px 16px';
|
|
5898
5900
|
tb.className = "_ ui-widget v-state-default ui-corner-all v-button ui-button-text-only";
|
|
5899
5901
|
|
|
5900
|
-
var vue = _.varMap[children.getAttribute("vueid")];
|
|
5902
|
+
var vue = _$1.varMap[children.getAttribute("vueid")];
|
|
5901
5903
|
|
|
5902
5904
|
tb.onclick = function (e) {
|
|
5903
5905
|
e.preventDefault();
|
|
@@ -5909,7 +5911,7 @@ window.ui = _.ui = function (cfg) {
|
|
|
5909
5911
|
tb.innerHTML = 'Seleccionar';
|
|
5910
5912
|
tb.style.padding = '4px 16px';
|
|
5911
5913
|
tb.className = "_ ui-widget v-state-default ui-corner-all v-button ui-button-text-only";
|
|
5912
|
-
vue = _.varMap[children.getAttribute("vueid")];
|
|
5914
|
+
vue = _$1.varMap[children.getAttribute("vueid")];
|
|
5913
5915
|
|
|
5914
5916
|
tb.onclick = function (e) {
|
|
5915
5917
|
e.preventDefault();
|
|
@@ -5931,9 +5933,9 @@ window.ui = _.ui = function (cfg) {
|
|
|
5931
5933
|
resize();
|
|
5932
5934
|
}
|
|
5933
5935
|
|
|
5934
|
-
_.storeFunction['PROPS=' + nid] = path;
|
|
5936
|
+
_$1.storeFunction['PROPS=' + nid] = path;
|
|
5935
5937
|
|
|
5936
|
-
_.storeFunction[nid] = function (o) {
|
|
5938
|
+
_$1.storeFunction[nid] = function (o) {
|
|
5937
5939
|
if (path.result) {
|
|
5938
5940
|
path.result(o);
|
|
5939
5941
|
}
|
|
@@ -5988,7 +5990,7 @@ window.ui = _.ui = function (cfg) {
|
|
|
5988
5990
|
var dlg = ok instanceof HTMLElement ? ok : null;
|
|
5989
5991
|
|
|
5990
5992
|
try {
|
|
5991
|
-
if (!dlg && event.target instanceof HTMLElement) dlg = _.closest(event.target, '.v-dialog');
|
|
5993
|
+
if (!dlg && event.target instanceof HTMLElement) dlg = _$1.closest(event.target, '.v-dialog');
|
|
5992
5994
|
} catch (e) {
|
|
5993
5995
|
console.log(e);
|
|
5994
5996
|
}
|
|
@@ -6005,7 +6007,7 @@ window.ui = _.ui = function (cfg) {
|
|
|
6005
6007
|
if ((' ' + mask.className + ' ').indexOf(' v-overlay ') > -1) mask.style.display = "none";else mask = null;
|
|
6006
6008
|
Vue__default['default'].resize();
|
|
6007
6009
|
|
|
6008
|
-
var cb = _.storeFunction[dlg.getAttribute("callback")];
|
|
6010
|
+
var cb = _$1.storeFunction[dlg.getAttribute("callback")];
|
|
6009
6011
|
|
|
6010
6012
|
if (cb) cb(ok);
|
|
6011
6013
|
dlg.parentNode.removeChild(dlg);
|
|
@@ -6489,12 +6491,12 @@ window.ui = _.ui = function (cfg) {
|
|
|
6489
6491
|
var tv = el.querySelectorAll("v-tabview");
|
|
6490
6492
|
|
|
6491
6493
|
for (var i = 0; i < tv.length; i++) {
|
|
6492
|
-
var id = 'v-' + _.id();
|
|
6494
|
+
var id = 'v-' + _$1.id();
|
|
6493
6495
|
|
|
6494
6496
|
tv[i].setAttribute("vid", id);
|
|
6495
6497
|
var cn = tv[i].childNodes;
|
|
6496
6498
|
var tabs = [];
|
|
6497
|
-
_.varMap[id] = tabs;
|
|
6499
|
+
_$1.varMap[id] = tabs;
|
|
6498
6500
|
|
|
6499
6501
|
for (var j = 0; j < cn.length; j++) {
|
|
6500
6502
|
if (cn[j].tagName) {
|
|
@@ -6518,22 +6520,22 @@ window.ui = _.ui = function (cfg) {
|
|
|
6518
6520
|
function configureAxios(a) {
|
|
6519
6521
|
var mask;
|
|
6520
6522
|
a.interceptors.request.use(function (config) {
|
|
6521
|
-
_.eeee = config;
|
|
6522
|
-
if (!mask) mask = _.mask();
|
|
6523
|
+
_$1.eeee = config;
|
|
6524
|
+
if (!mask) mask = _$1.mask();
|
|
6523
6525
|
return config;
|
|
6524
6526
|
}, function (e) {
|
|
6525
|
-
mask = _.unmask(mask);
|
|
6527
|
+
mask = _$1.unmask(mask);
|
|
6526
6528
|
|
|
6527
|
-
_.MsgBox('request ' + _.id() + ' ' + e.message);
|
|
6529
|
+
_$1.MsgBox('request ' + _$1.id() + ' ' + e.message);
|
|
6528
6530
|
|
|
6529
6531
|
return Promise.reject(e);
|
|
6530
6532
|
});
|
|
6531
6533
|
a.interceptors.response.use(function (response) {
|
|
6532
|
-
mask = _.unmask(mask);
|
|
6534
|
+
mask = _$1.unmask(mask);
|
|
6533
6535
|
return response;
|
|
6534
6536
|
}, function (e) {
|
|
6535
6537
|
if (axios.error && axios.error(e) == false) {
|
|
6536
|
-
mask = _.unmask(mask);
|
|
6538
|
+
mask = _$1.unmask(mask);
|
|
6537
6539
|
} else {
|
|
6538
6540
|
var r = e.response,
|
|
6539
6541
|
msg = r && r.data && r.data.msg ? r.data.msg : e.message;
|
|
@@ -6547,12 +6549,12 @@ function configureAxios(a) {
|
|
|
6547
6549
|
}
|
|
6548
6550
|
}
|
|
6549
6551
|
|
|
6550
|
-
mask = _.unmask(mask);
|
|
6552
|
+
mask = _$1.unmask(mask);
|
|
6551
6553
|
|
|
6552
6554
|
if (e.config.error) {
|
|
6553
6555
|
e.config.error(e, msg);
|
|
6554
6556
|
} else {
|
|
6555
|
-
_.MsgBox(
|
|
6557
|
+
_$1.MsgBox(
|
|
6556
6558
|
/*'response '+_.id()+' '+*/
|
|
6557
6559
|
msg);
|
|
6558
6560
|
}
|
|
@@ -6564,7 +6566,7 @@ function configureAxios(a) {
|
|
|
6564
6566
|
}
|
|
6565
6567
|
|
|
6566
6568
|
window.axios = axios;
|
|
6567
|
-
window._ = _;
|
|
6569
|
+
window._ = _$1;
|
|
6568
6570
|
window.Vue = Vue__default['default'];
|
|
6569
6571
|
Vue__default['default'].configureAxios = configureAxios;
|
|
6570
6572
|
configureAxios(axios);
|