isobit-ui 0.0.342 → 0.0.343
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 +27 -326
- 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.343
|
|
3
3
|
* (c) Erik Alarcon Pinedo
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -5676,28 +5676,6 @@ window.ui = _$1.ui = function (cfg) {
|
|
|
5676
5676
|
}
|
|
5677
5677
|
}
|
|
5678
5678
|
},
|
|
5679
|
-
o: function o(e) {
|
|
5680
|
-
var t = e.target;
|
|
5681
|
-
var me = this;
|
|
5682
|
-
|
|
5683
|
-
if (typeof e == 'string') {
|
|
5684
|
-
t = e;
|
|
5685
|
-
} else if (t.tagName == "ION-ITEM" && t.href) {
|
|
5686
|
-
e.preventDefault();
|
|
5687
|
-
t = t.href;
|
|
5688
|
-
} else {
|
|
5689
|
-
e.preventDefault();
|
|
5690
|
-
if (!t.pathname) t = t.parentNode;
|
|
5691
|
-
if (!t.pathname) t = t.parentNode;
|
|
5692
|
-
if (!t.pathname) t = t.parentNode;
|
|
5693
|
-
t = t.pathname;
|
|
5694
|
-
}
|
|
5695
|
-
|
|
5696
|
-
if (me.$route.path !== t) {
|
|
5697
|
-
console.log('path=' + t);
|
|
5698
|
-
me.$router.push(t);
|
|
5699
|
-
}
|
|
5700
|
-
},
|
|
5701
5679
|
MsgBox: _$1.MsgBox,
|
|
5702
5680
|
changeRoute: function changeRoute() {
|
|
5703
5681
|
/*console.log(v)*/
|
|
@@ -5762,8 +5740,8 @@ window.ui = _$1.ui = function (cfg) {
|
|
|
5762
5740
|
if (!action) action = window.location.pathname;
|
|
5763
5741
|
action = _$1.processURL(action);
|
|
5764
5742
|
|
|
5765
|
-
if (window.
|
|
5766
|
-
|
|
5743
|
+
if (window.app) {
|
|
5744
|
+
me.open(action + '/create');
|
|
5767
5745
|
} else {
|
|
5768
5746
|
instance.get(_$1.currentPath = (action + '/create').replace(/([^:]\/)\/+/g, "$1") + '?modal').then(_$1.open)["catch"](me.error);
|
|
5769
5747
|
}
|
|
@@ -5778,8 +5756,8 @@ window.ui = _$1.ui = function (cfg) {
|
|
|
5778
5756
|
if (t.data[t.selected[0]].tmpId) id = -t.data[t.selected[0]].tmpId;
|
|
5779
5757
|
if (me.getSelectedId) id = me.getSelectedId(t.data[t.selected[0]]);
|
|
5780
5758
|
|
|
5781
|
-
if (window.
|
|
5782
|
-
|
|
5759
|
+
if (window.app) {
|
|
5760
|
+
me.open(action + '/' + id + '/edit');
|
|
5783
5761
|
} else {
|
|
5784
5762
|
axios__default['default'].get((_$1.currentPath = (action + '/' + id + '/edit').replace(/([^:]\/)\/+/g, "$1")) + '?modal').then(me.open)["catch"](me.error);
|
|
5785
5763
|
}
|
|
@@ -5859,319 +5837,42 @@ window.ui = _$1.ui = function (cfg) {
|
|
|
5859
5837
|
return str.replace(_$1.contextPath, _$1.contextPath + '/api');
|
|
5860
5838
|
},
|
|
5861
5839
|
open: function open(response, path, o) {
|
|
5862
|
-
|
|
5863
|
-
|
|
5864
|
-
|
|
5865
|
-
|
|
5866
|
-
response = response.$el;
|
|
5867
|
-
path = {};
|
|
5868
|
-
} else if (response instanceof HTMLElement) {
|
|
5869
|
-
path = {};
|
|
5870
|
-
} else if (response.target) {
|
|
5871
|
-
el = response.target;
|
|
5872
|
-
return me.open(el.pathname ? el.pathname : el.href);
|
|
5873
|
-
} else if (response === 'GET') {
|
|
5874
|
-
if (typeof path == 'string') {
|
|
5875
|
-
var cfg = {
|
|
5876
|
-
path: _$1.currentPath = path + (typeof o == 'string' ? '/' + o : '')
|
|
5877
|
-
};
|
|
5878
|
-
|
|
5879
|
-
if (typeof o == 'function') {
|
|
5880
|
-
cfg.result = o;
|
|
5881
|
-
} else if (_typeof(o) == 'object') {
|
|
5882
|
-
cfg = Vue__default['default'].mergeDeep(cfg, o);
|
|
5883
|
-
}
|
|
5884
|
-
|
|
5885
|
-
return me.open(response, cfg);
|
|
5886
|
-
} else if (!path.data) {
|
|
5887
|
-
//Tiene q buscarse el elemt si existe
|
|
5888
|
-
//console.log('path='+path.path);
|
|
5889
|
-
el = document.querySelector('[path=\'' + path.path + '\']'); //console.log(el);
|
|
5890
|
-
|
|
5891
|
-
if (el) {
|
|
5892
|
-
var dd = document.querySelector('#layoutUnit-center > .ui-layout-unit-content,#page-content'); //console.log(dd);
|
|
5893
|
-
|
|
5894
|
-
for (var i = 0; i < dd.children.length; i++) {
|
|
5895
|
-
//Se ocultan todas las demas paginas
|
|
5896
|
-
if (dd.children[i].style) {
|
|
5897
|
-
if (dd.children[i].className == 'ui-panel' && dd.children[i].style.display != 'none') {
|
|
5898
|
-
backPanel = dd.children[i];
|
|
5899
|
-
}
|
|
5900
|
-
|
|
5901
|
-
dd.children[i].style.display = 'none';
|
|
5902
|
-
}
|
|
5903
|
-
}
|
|
5904
|
-
|
|
5905
|
-
el.style.removeProperty('display');
|
|
5906
|
-
return el;
|
|
5907
|
-
} else {
|
|
5908
|
-
return axios__default['default'].get((path.path + '/?modal').replace(/([^:]\/)\/+/g, "$1")).then(function (r) {
|
|
5909
|
-
r["class"] = path["class"] ? path["class"] : '';
|
|
5910
|
-
r.path = path.path;
|
|
5911
|
-
r.result = path.callback;
|
|
5912
|
-
r = Object.assign(r, path);
|
|
5913
|
-
me.open(response, r);
|
|
5914
|
-
})["catch"](me.error);
|
|
5915
|
-
}
|
|
5916
|
-
}
|
|
5917
|
-
} else if (!response.data) {
|
|
5918
|
-
return me.open('GET', response, path);
|
|
5919
|
-
} else if (response.data) {
|
|
5920
|
-
path = response;
|
|
5921
|
-
}
|
|
5922
|
-
|
|
5923
|
-
var dialog,
|
|
5924
|
-
nid = Vue__default['default'].id(),
|
|
5925
|
-
scriptDom = [],
|
|
5926
|
-
for_,
|
|
5927
|
-
ifor = 0;
|
|
5928
|
-
|
|
5929
|
-
if (response instanceof HTMLElement) {
|
|
5930
|
-
dialog = response;
|
|
5931
|
-
dialog.classList.add("v-dialog");
|
|
5932
|
-
} else {
|
|
5933
|
-
dialog = document.createElement("div");
|
|
5934
|
-
dialog.classList.add("v-dialog");
|
|
5935
|
-
dialog.innerHTML = path.data;
|
|
5936
|
-
var s = dialog.getElementsByTagName('script'); //console.log('patttt=' + _.currentPath);
|
|
5937
|
-
|
|
5938
|
-
dialog.setAttribute("path", _$1.currentPath);
|
|
5939
|
-
var ld = dialog.children; //console.log(s);
|
|
5940
|
-
|
|
5941
|
-
for (var k = 0; k < s.length; k++) {
|
|
5942
|
-
scriptDom.push(s[k]);
|
|
5943
|
-
}
|
|
5944
|
-
|
|
5945
|
-
for (k = 0; k < ld.length; k++) {
|
|
5946
|
-
//console.log(ld[k].tagName);
|
|
5947
|
-
if (ld[k].tagName == 'V-FORM' || ld[k].tagName == 'V-PANEL') {
|
|
5948
|
-
for_ = ld[k];
|
|
5949
|
-
ifor = k;
|
|
5950
|
-
}
|
|
5951
|
-
}
|
|
5952
|
-
}
|
|
5953
|
-
|
|
5954
|
-
var backPanel;
|
|
5955
|
-
|
|
5956
|
-
var close = function close() {
|
|
5957
|
-
dialog.style.display = "none";
|
|
5958
|
-
overlay = dialog.parentNode;
|
|
5959
|
-
|
|
5960
|
-
if (overlay.classList.contains('v-overlay')) {
|
|
5961
|
-
//para los dialog
|
|
5962
|
-
overlay.style.display = "none";
|
|
5963
|
-
dialog.parentNode.removeChild(dialog);
|
|
5964
|
-
overlay.parentNode.removeChild(overlay);
|
|
5965
|
-
}
|
|
5966
|
-
|
|
5967
|
-
if (backPanel) {
|
|
5968
|
-
dialog.parentNode.removeChild(dialog);
|
|
5969
|
-
backPanel.style.display = 'block';
|
|
5970
|
-
}
|
|
5971
|
-
|
|
5972
|
-
Vue__default['default'].resize();
|
|
5973
|
-
};
|
|
5840
|
+
{
|
|
5841
|
+
var e = response;
|
|
5842
|
+
var t = e.target;
|
|
5843
|
+
var me = this;
|
|
5974
5844
|
|
|
5975
|
-
|
|
5976
|
-
|
|
5977
|
-
if (
|
|
5978
|
-
|
|
5845
|
+
if (typeof e == 'string') {
|
|
5846
|
+
t = e;
|
|
5847
|
+
} else if (t.tagName == "ION-ITEM" && t.href) {
|
|
5848
|
+
e.preventDefault();
|
|
5849
|
+
t = t.href;
|
|
5979
5850
|
} else {
|
|
5980
|
-
|
|
5981
|
-
|
|
5982
|
-
|
|
5983
|
-
|
|
5984
|
-
|
|
5985
|
-
dd = document.querySelector('#layoutUnit-center > .ui-layout-unit-content,#page-content');
|
|
5986
|
-
|
|
5987
|
-
for (i = 0; i < dd.children.length; i++) {
|
|
5988
|
-
//Se ocultan todas las demas paginas
|
|
5989
|
-
if (dd.children[i].style) {
|
|
5990
|
-
if (dd.children[i].className == 'ui-panel' && dd.children[i].style.display != 'none') {
|
|
5991
|
-
backPanel = dd.children[i];
|
|
5992
|
-
}
|
|
5993
|
-
|
|
5994
|
-
dd.children[i].style.display = 'none';
|
|
5995
|
-
}
|
|
5996
|
-
} //se agrega el dialog recuperado y se genera
|
|
5997
|
-
|
|
5998
|
-
|
|
5999
|
-
dd.appendChild(dialog); //console.log(scriptDom);
|
|
6000
|
-
|
|
6001
|
-
for (var l2 = 0; scriptDom.length > l2; l2++) {
|
|
6002
|
-
//console.log(s[l2]);
|
|
6003
|
-
try {
|
|
6004
|
-
eval(scriptDom[l2].innerHTML);
|
|
6005
|
-
} catch (e) {
|
|
6006
|
-
console.error(e);
|
|
6007
|
-
}
|
|
5851
|
+
e.preventDefault();
|
|
5852
|
+
if (!t.pathname) t = t.parentNode;
|
|
5853
|
+
if (!t.pathname) t = t.parentNode;
|
|
5854
|
+
if (!t.pathname) t = t.parentNode;
|
|
5855
|
+
t = t.pathname;
|
|
6008
5856
|
}
|
|
6009
5857
|
|
|
6010
|
-
|
|
6011
|
-
|
|
6012
|
-
|
|
6013
|
-
|
|
6014
|
-
while (dialog.children.length > 0) {
|
|
6015
|
-
if (!td) td = dialog.children[0];
|
|
6016
|
-
dd.appendChild(dialog.children[0]);
|
|
6017
|
-
}
|
|
6018
|
-
|
|
6019
|
-
dialog.parentNode.removeChild(dialog);
|
|
6020
|
-
dialog = aux; //console.log(path);
|
|
6021
|
-
|
|
6022
|
-
dialog.setAttribute("path", path.path);
|
|
6023
|
-
} else {
|
|
6024
|
-
var overlay = document.createElement("div"); //console.log('create overlay');
|
|
6025
|
-
|
|
6026
|
-
overlay.classList.add("v-overlay");
|
|
6027
|
-
overlay.style.padding = "40px";
|
|
6028
|
-
document.body.appendChild(overlay);
|
|
6029
|
-
overlay.appendChild(dialog);
|
|
6030
|
-
|
|
6031
|
-
if (!(response instanceof HTMLElement)) {
|
|
6032
|
-
for (l2 = 0; s.length > l2; l2++) {
|
|
6033
|
-
//console.log(s[l2]);
|
|
6034
|
-
try {
|
|
6035
|
-
eval(s[l2].innerHTML);
|
|
6036
|
-
} catch (e) {
|
|
6037
|
-
console.error(e);
|
|
6038
|
-
}
|
|
6039
|
-
}
|
|
5858
|
+
if (me.$route.path !== t) {
|
|
5859
|
+
console.log('path=' + t);
|
|
5860
|
+
me.$router.push(t);
|
|
6040
5861
|
}
|
|
6041
5862
|
|
|
6042
|
-
|
|
6043
|
-
|
|
6044
|
-
|
|
6045
|
-
dialog.style.margin = "0 auto";
|
|
6046
|
-
dialog.style.position = "unset"; //console.log(dialog);
|
|
6047
|
-
|
|
6048
|
-
var resize = function resize(e) {
|
|
6049
|
-
dialog.style.left = (window.innerWidth - dialog.offsetWidth) / 2 + 'px';
|
|
6050
|
-
|
|
6051
|
-
if (window.innerWidth < 600) {
|
|
6052
|
-
//console.log(333333);
|
|
6053
|
-
var dc = dialog.querySelector('.v-dialog-content'); //console.log(dc);
|
|
6054
|
-
|
|
6055
|
-
var h = dialog.querySelector('.v-panel-titlebar'); //console.log(h.clientHeight);
|
|
5863
|
+
return;
|
|
5864
|
+
}
|
|
5865
|
+
var me = this;
|
|
6056
5866
|
|
|
6057
|
-
|
|
6058
|
-
dc.style.height = ih + "px";
|
|
6059
|
-
}
|
|
6060
|
-
};
|
|
5867
|
+
var dialog;
|
|
6061
5868
|
|
|
6062
|
-
|
|
5869
|
+
{
|
|
6063
5870
|
|
|
6064
5871
|
if (path["class"] === 'v-search') {
|
|
6065
5872
|
var d = dialog;
|
|
6066
|
-
d.className = d.className + ' ' + path["class"];
|
|
6067
|
-
d.style.width = "100%";
|
|
6068
|
-
d.style.height = "calc(100% - 2px)";
|
|
6069
|
-
var children = d.querySelector('div');
|
|
6070
|
-
var f = d.querySelector('form');
|
|
6071
5873
|
var t = d.querySelector('.v-datatable');
|
|
6072
|
-
var tb = d.querySelector('.v-datatable-scrollable-body');
|
|
6073
|
-
children.style.height = 'calc(100% - 2px)';
|
|
6074
|
-
children.style.overflowY = 'auto';
|
|
6075
|
-
children.children[1].style.padding = '0px';
|
|
6076
|
-
children.children[1].style.height = 'calc(100% - 33px)';
|
|
6077
|
-
f.style.height = '100%';
|
|
6078
|
-
f.style.overflowY = 'auto';
|
|
6079
|
-
t.style.height = 'calc(100% - 52px)';
|
|
6080
|
-
tb.style.height = 'calc(100% - 72px)';
|
|
6081
|
-
tb.style.overflowY = 'auto';
|
|
6082
|
-
var pag = d.querySelector('.v-paginator');
|
|
6083
|
-
pag.style.display = 'inline-block';
|
|
6084
|
-
f.appendChild(pag);
|
|
6085
|
-
tb = document.createElement("button");
|
|
6086
|
-
tb.innerHTML = 'Recuperar';
|
|
6087
|
-
tb.style.padding = '4px 16px';
|
|
6088
|
-
tb.className = "_ ui-widget v-state-default ui-corner-all v-button ui-button-text-only";
|
|
6089
|
-
|
|
6090
|
-
var vue = _$1.varMap[children.getAttribute("vueid")];
|
|
6091
|
-
|
|
6092
|
-
tb.onclick = function (e) {
|
|
6093
|
-
e.preventDefault();
|
|
6094
|
-
vue.refresh();
|
|
6095
|
-
};
|
|
6096
|
-
|
|
6097
|
-
f.appendChild(tb);
|
|
6098
|
-
tb = document.createElement("button");
|
|
6099
|
-
tb.innerHTML = 'Seleccionar';
|
|
6100
|
-
tb.style.padding = '4px 16px';
|
|
6101
|
-
tb.className = "_ ui-widget v-state-default ui-corner-all v-button ui-button-text-only";
|
|
6102
|
-
vue = _$1.varMap[children.getAttribute("vueid")];
|
|
6103
|
-
|
|
6104
|
-
tb.onclick = function (e) {
|
|
6105
|
-
e.preventDefault();
|
|
6106
|
-
var d = [];
|
|
6107
|
-
var t = vue.$children[0].$children[0];
|
|
6108
|
-
|
|
6109
|
-
for (i = 0; i < t.selected.length; i++) {
|
|
6110
|
-
d.push(t.filteredData[t.selected[i]]);
|
|
6111
|
-
}
|
|
6112
|
-
|
|
6113
|
-
path.result(d);
|
|
6114
|
-
delete path.result;
|
|
6115
|
-
vue.close(e);
|
|
6116
|
-
};
|
|
6117
|
-
|
|
6118
|
-
f.appendChild(tb);
|
|
6119
|
-
}
|
|
6120
|
-
|
|
6121
|
-
resize();
|
|
6122
|
-
}
|
|
6123
|
-
|
|
6124
|
-
_$1.storeFunction['PROPS=' + nid] = path;
|
|
6125
|
-
|
|
6126
|
-
_$1.storeFunction[nid] = function (o) {
|
|
6127
|
-
if (path.result) {
|
|
6128
|
-
path.result(o);
|
|
6129
|
-
}
|
|
6130
|
-
|
|
6131
|
-
if (o === true) me.refresh();
|
|
6132
|
-
};
|
|
6133
|
-
|
|
6134
|
-
var _vue_ = dialog.querySelector('[vueid]');
|
|
6135
|
-
|
|
6136
|
-
if (_vue_) {
|
|
6137
|
-
path.__vue__ = _vue_.__vue__;
|
|
6138
|
-
|
|
6139
|
-
_vue_.__vue__.$emit('opened', path);
|
|
6140
|
-
}
|
|
6141
|
-
|
|
6142
|
-
dialog.setAttribute("callback", nid);
|
|
6143
|
-
var h = dialog.querySelector('.v-panel-titlebar');
|
|
6144
|
-
|
|
6145
|
-
if (h) {
|
|
6146
|
-
var acl = h.querySelector('.ui-js-close');
|
|
6147
|
-
|
|
6148
|
-
window.onkeyup = function (event) {
|
|
6149
|
-
if (event.keyCode == 27) {
|
|
6150
|
-
close();
|
|
6151
|
-
}
|
|
6152
|
-
};
|
|
6153
|
-
|
|
6154
|
-
if (!acl) {
|
|
6155
|
-
var span = document.createElement("i");
|
|
6156
|
-
span.style.top = "6px";
|
|
6157
|
-
span.style.right = "6px";
|
|
6158
|
-
h.style.position = "relative";
|
|
6159
|
-
span.style.position = "absolute";
|
|
6160
|
-
span.style.color = "white";
|
|
6161
|
-
span.className = "fa fa-window-close v-dialog-close";
|
|
6162
|
-
acl = document.createElement("a");
|
|
6163
|
-
acl.className = "ui-js-close v-dialog-titlebar-icon v-dialog-titlebar-close ui-corner-all";
|
|
6164
|
-
acl.appendChild(span);
|
|
6165
|
-
h.appendChild(acl);
|
|
6166
|
-
acl.addEventListener("click", close);
|
|
6167
5874
|
}
|
|
6168
5875
|
}
|
|
6169
|
-
|
|
6170
|
-
dialog.style.display = 'block';
|
|
6171
|
-
Vue__default['default'].resize();
|
|
6172
|
-
document.documentElement.style.overflow = 'hidden'; // firefox, chrome
|
|
6173
|
-
|
|
6174
|
-
document.body.scroll = "no"; // ie only
|
|
6175
5876
|
},
|
|
6176
5877
|
close: function close(ok) {
|
|
6177
5878
|
if (ok.$el) ok = ok.$el;
|