isobit-ui 0.0.292 → 0.0.293
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 +101 -1
- 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.293
|
|
3
3
|
* (c) Erik Alarcon Pinedo
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -5154,6 +5154,22 @@ _ = Object.assign(_, {
|
|
|
5154
5154
|
_.getLocation = _.getCurrentPosition;
|
|
5155
5155
|
Vue.id = _.id;
|
|
5156
5156
|
|
|
5157
|
+
if (typeof ol !== 'undefined') {
|
|
5158
|
+
var getLayerById = function getLayerById(m, id) {
|
|
5159
|
+
var ly;
|
|
5160
|
+
m.getLayers().forEach(function (l) {
|
|
5161
|
+
if (l.get("id") === id) {
|
|
5162
|
+
ly = l;
|
|
5163
|
+
return;
|
|
5164
|
+
}
|
|
5165
|
+
});
|
|
5166
|
+
return ly;
|
|
5167
|
+
};
|
|
5168
|
+
|
|
5169
|
+
ol.getLayerById = getLayerById;
|
|
5170
|
+
window.ol = ol;
|
|
5171
|
+
}
|
|
5172
|
+
|
|
5157
5173
|
Vue.pad = function (num, size) {
|
|
5158
5174
|
var s = num + "";
|
|
5159
5175
|
|
|
@@ -5434,6 +5450,37 @@ window.ui = _.ui = function (cfg) {
|
|
|
5434
5450
|
return window.app.session;
|
|
5435
5451
|
}
|
|
5436
5452
|
},
|
|
5453
|
+
bindLinks: function bindLinks(el, callback) {
|
|
5454
|
+
var me = this;
|
|
5455
|
+
el = el ? el : me.$el;
|
|
5456
|
+
|
|
5457
|
+
if (el.querySelectorAll) {
|
|
5458
|
+
var a = el.querySelectorAll('a:not(._)');
|
|
5459
|
+
|
|
5460
|
+
var f = function f(e) {
|
|
5461
|
+
if (me.cccc) {
|
|
5462
|
+
me.cccc();
|
|
5463
|
+
}
|
|
5464
|
+
|
|
5465
|
+
if (callback) callback();
|
|
5466
|
+
me.o(e);
|
|
5467
|
+
var el = this;
|
|
5468
|
+
|
|
5469
|
+
do {
|
|
5470
|
+
var event = new Event("close", {
|
|
5471
|
+
bubbles: true
|
|
5472
|
+
});
|
|
5473
|
+
el.dispatchEvent(event);
|
|
5474
|
+
el = el.parentNode;
|
|
5475
|
+
} while (el);
|
|
5476
|
+
};
|
|
5477
|
+
|
|
5478
|
+
for (var i = 0; i < a.length; i++) {
|
|
5479
|
+
a[i].onclick = f;
|
|
5480
|
+
a[i].classList ? a[i].classList.add('_') : a[i].className = '_';
|
|
5481
|
+
}
|
|
5482
|
+
}
|
|
5483
|
+
},
|
|
5437
5484
|
data: function data() {
|
|
5438
5485
|
var me = this;
|
|
5439
5486
|
return {
|
|
@@ -6466,6 +6513,59 @@ window.ui = _.ui = function (cfg) {
|
|
|
6466
6513
|
return window.isMobile ? cfg : new Vue(cfg);
|
|
6467
6514
|
};
|
|
6468
6515
|
|
|
6516
|
+
function configureAxios(a) {
|
|
6517
|
+
var mask;
|
|
6518
|
+
a.interceptors.request.use(function (config) {
|
|
6519
|
+
_.eeee = config;
|
|
6520
|
+
if (!mask) mask = _.mask();
|
|
6521
|
+
return config;
|
|
6522
|
+
}, function (e) {
|
|
6523
|
+
mask = _.unmask(mask);
|
|
6524
|
+
|
|
6525
|
+
_.MsgBox('request ' + _.id() + ' ' + e.message);
|
|
6526
|
+
|
|
6527
|
+
return Promise.reject(e);
|
|
6528
|
+
});
|
|
6529
|
+
a.interceptors.response.use(function (response) {
|
|
6530
|
+
mask = _.unmask(mask);
|
|
6531
|
+
return response;
|
|
6532
|
+
}, function (e) {
|
|
6533
|
+
if (axios.error && axios.error(e) == false) {
|
|
6534
|
+
mask = _.unmask(mask);
|
|
6535
|
+
} else {
|
|
6536
|
+
var r = e.response,
|
|
6537
|
+
msg = r && r.data && r.data.msg ? r.data.msg : e.message;
|
|
6538
|
+
|
|
6539
|
+
if (r) {
|
|
6540
|
+
if (r.data && r.data.message) msg = r.data.message;
|
|
6541
|
+
if (typeof r.data === 'string') msg = r.data;
|
|
6542
|
+
|
|
6543
|
+
if (!msg) {
|
|
6544
|
+
msg = r.status + ': ' + r.statusText;
|
|
6545
|
+
}
|
|
6546
|
+
}
|
|
6547
|
+
|
|
6548
|
+
mask = _.unmask(mask);
|
|
6549
|
+
|
|
6550
|
+
if (e.config.error) {
|
|
6551
|
+
e.config.error(e, msg);
|
|
6552
|
+
} else {
|
|
6553
|
+
_.MsgBox(
|
|
6554
|
+
/*'response '+_.id()+' '+*/
|
|
6555
|
+
msg);
|
|
6556
|
+
}
|
|
6557
|
+
}
|
|
6558
|
+
|
|
6559
|
+
delete axios.error;
|
|
6560
|
+
return Promise.reject(e);
|
|
6561
|
+
});
|
|
6562
|
+
}
|
|
6563
|
+
|
|
6564
|
+
window.axios = axios;
|
|
6565
|
+
window._ = _;
|
|
6566
|
+
window.Vue = Vue;
|
|
6567
|
+
Vue.configureAxios = configureAxios;
|
|
6568
|
+
configureAxios(axios);
|
|
6469
6569
|
var index = {
|
|
6470
6570
|
install: function install(Vue, options) {
|
|
6471
6571
|
Vue.component("v-autocomplete", __vue_component__$k);
|