isobit-ui 0.0.291 → 0.0.294
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 +104 -4
- 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.294
|
|
3
3
|
* (c) Erik Alarcon Pinedo
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
var __vue_normalize__ = require('vue-runtime-helpers/dist/normalize-component.mjs');
|
|
9
9
|
var __vue_create_injector__ = require('vue-runtime-helpers/dist/inject-style/browser.mjs');
|
|
10
|
+
var Vue$1 = require('vue');
|
|
10
11
|
var Observable = require('ol/Observable');
|
|
11
12
|
var __$_require_fs_images_triangle_down_svg__ = require('@/fs/images/triangle-down.svg');
|
|
12
13
|
|
|
@@ -14,6 +15,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
14
15
|
|
|
15
16
|
var __vue_normalize____default = /*#__PURE__*/_interopDefaultLegacy(__vue_normalize__);
|
|
16
17
|
var __vue_create_injector____default = /*#__PURE__*/_interopDefaultLegacy(__vue_create_injector__);
|
|
18
|
+
var Vue__default = /*#__PURE__*/_interopDefaultLegacy(Vue$1);
|
|
17
19
|
var __$_require_fs_images_triangle_down_svg____default = /*#__PURE__*/_interopDefaultLegacy(__$_require_fs_images_triangle_down_svg__);
|
|
18
20
|
|
|
19
21
|
function _typeof(obj) {
|
|
@@ -1312,7 +1314,7 @@ function _invoke$1(body, then) {
|
|
|
1312
1314
|
return then(result);
|
|
1313
1315
|
}
|
|
1314
1316
|
|
|
1315
|
-
var compiledTemplate =
|
|
1317
|
+
var compiledTemplate = Vue__default['default'].compile(template);
|
|
1316
1318
|
|
|
1317
1319
|
function _empty() {}
|
|
1318
1320
|
|
|
@@ -5154,6 +5156,22 @@ _ = Object.assign(_, {
|
|
|
5154
5156
|
_.getLocation = _.getCurrentPosition;
|
|
5155
5157
|
Vue.id = _.id;
|
|
5156
5158
|
|
|
5159
|
+
if (typeof ol !== 'undefined') {
|
|
5160
|
+
var getLayerById = function getLayerById(m, id) {
|
|
5161
|
+
var ly;
|
|
5162
|
+
m.getLayers().forEach(function (l) {
|
|
5163
|
+
if (l.get("id") === id) {
|
|
5164
|
+
ly = l;
|
|
5165
|
+
return;
|
|
5166
|
+
}
|
|
5167
|
+
});
|
|
5168
|
+
return ly;
|
|
5169
|
+
};
|
|
5170
|
+
|
|
5171
|
+
ol.getLayerById = getLayerById;
|
|
5172
|
+
window.ol = ol;
|
|
5173
|
+
}
|
|
5174
|
+
|
|
5157
5175
|
Vue.pad = function (num, size) {
|
|
5158
5176
|
var s = num + "";
|
|
5159
5177
|
|
|
@@ -5355,8 +5373,6 @@ _.MsgBox = function MsgBox(m, cb, b) {
|
|
|
5355
5373
|
Vue.resize();
|
|
5356
5374
|
};
|
|
5357
5375
|
|
|
5358
|
-
window._.baseURL = window.axios.defaults.baseURL;
|
|
5359
|
-
|
|
5360
5376
|
function isObject(item) {
|
|
5361
5377
|
return item && _typeof(item) === 'object' && !Array.isArray(item);
|
|
5362
5378
|
}
|
|
@@ -5436,6 +5452,37 @@ window.ui = _.ui = function (cfg) {
|
|
|
5436
5452
|
return window.app.session;
|
|
5437
5453
|
}
|
|
5438
5454
|
},
|
|
5455
|
+
bindLinks: function bindLinks(el, callback) {
|
|
5456
|
+
var me = this;
|
|
5457
|
+
el = el ? el : me.$el;
|
|
5458
|
+
|
|
5459
|
+
if (el.querySelectorAll) {
|
|
5460
|
+
var a = el.querySelectorAll('a:not(._)');
|
|
5461
|
+
|
|
5462
|
+
var f = function f(e) {
|
|
5463
|
+
if (me.cccc) {
|
|
5464
|
+
me.cccc();
|
|
5465
|
+
}
|
|
5466
|
+
|
|
5467
|
+
if (callback) callback();
|
|
5468
|
+
me.o(e);
|
|
5469
|
+
var el = this;
|
|
5470
|
+
|
|
5471
|
+
do {
|
|
5472
|
+
var event = new Event("close", {
|
|
5473
|
+
bubbles: true
|
|
5474
|
+
});
|
|
5475
|
+
el.dispatchEvent(event);
|
|
5476
|
+
el = el.parentNode;
|
|
5477
|
+
} while (el);
|
|
5478
|
+
};
|
|
5479
|
+
|
|
5480
|
+
for (var i = 0; i < a.length; i++) {
|
|
5481
|
+
a[i].onclick = f;
|
|
5482
|
+
a[i].classList ? a[i].classList.add('_') : a[i].className = '_';
|
|
5483
|
+
}
|
|
5484
|
+
}
|
|
5485
|
+
},
|
|
5439
5486
|
data: function data() {
|
|
5440
5487
|
var me = this;
|
|
5441
5488
|
return {
|
|
@@ -6468,6 +6515,59 @@ window.ui = _.ui = function (cfg) {
|
|
|
6468
6515
|
return window.isMobile ? cfg : new Vue(cfg);
|
|
6469
6516
|
};
|
|
6470
6517
|
|
|
6518
|
+
function configureAxios(a) {
|
|
6519
|
+
var mask;
|
|
6520
|
+
a.interceptors.request.use(function (config) {
|
|
6521
|
+
_.eeee = config;
|
|
6522
|
+
if (!mask) mask = _.mask();
|
|
6523
|
+
return config;
|
|
6524
|
+
}, function (e) {
|
|
6525
|
+
mask = _.unmask(mask);
|
|
6526
|
+
|
|
6527
|
+
_.MsgBox('request ' + _.id() + ' ' + e.message);
|
|
6528
|
+
|
|
6529
|
+
return Promise.reject(e);
|
|
6530
|
+
});
|
|
6531
|
+
a.interceptors.response.use(function (response) {
|
|
6532
|
+
mask = _.unmask(mask);
|
|
6533
|
+
return response;
|
|
6534
|
+
}, function (e) {
|
|
6535
|
+
if (axios.error && axios.error(e) == false) {
|
|
6536
|
+
mask = _.unmask(mask);
|
|
6537
|
+
} else {
|
|
6538
|
+
var r = e.response,
|
|
6539
|
+
msg = r && r.data && r.data.msg ? r.data.msg : e.message;
|
|
6540
|
+
|
|
6541
|
+
if (r) {
|
|
6542
|
+
if (r.data && r.data.message) msg = r.data.message;
|
|
6543
|
+
if (typeof r.data === 'string') msg = r.data;
|
|
6544
|
+
|
|
6545
|
+
if (!msg) {
|
|
6546
|
+
msg = r.status + ': ' + r.statusText;
|
|
6547
|
+
}
|
|
6548
|
+
}
|
|
6549
|
+
|
|
6550
|
+
mask = _.unmask(mask);
|
|
6551
|
+
|
|
6552
|
+
if (e.config.error) {
|
|
6553
|
+
e.config.error(e, msg);
|
|
6554
|
+
} else {
|
|
6555
|
+
_.MsgBox(
|
|
6556
|
+
/*'response '+_.id()+' '+*/
|
|
6557
|
+
msg);
|
|
6558
|
+
}
|
|
6559
|
+
}
|
|
6560
|
+
|
|
6561
|
+
delete axios.error;
|
|
6562
|
+
return Promise.reject(e);
|
|
6563
|
+
});
|
|
6564
|
+
}
|
|
6565
|
+
|
|
6566
|
+
window.axios = axios;
|
|
6567
|
+
window._ = _;
|
|
6568
|
+
window.Vue = Vue;
|
|
6569
|
+
Vue.configureAxios = configureAxios;
|
|
6570
|
+
configureAxios(axios);
|
|
6471
6571
|
var index = {
|
|
6472
6572
|
install: function install(Vue, options) {
|
|
6473
6573
|
Vue.component("v-autocomplete", __vue_component__$k);
|