isobit-ui 0.0.210 → 0.0.214
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 -161
- 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.214
|
|
3
3
|
* (c) Erik Alarcon Pinedo
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -1210,49 +1210,6 @@ function _await$1(value, then, direct) {
|
|
|
1210
1210
|
return then ? value.then(then) : value;
|
|
1211
1211
|
}
|
|
1212
1212
|
|
|
1213
|
-
//
|
|
1214
|
-
//
|
|
1215
|
-
//
|
|
1216
|
-
//
|
|
1217
|
-
//
|
|
1218
|
-
//
|
|
1219
|
-
//
|
|
1220
|
-
//
|
|
1221
|
-
//
|
|
1222
|
-
//
|
|
1223
|
-
//
|
|
1224
|
-
//
|
|
1225
|
-
//
|
|
1226
|
-
//
|
|
1227
|
-
//
|
|
1228
|
-
//
|
|
1229
|
-
//
|
|
1230
|
-
//
|
|
1231
|
-
//
|
|
1232
|
-
//
|
|
1233
|
-
//
|
|
1234
|
-
//
|
|
1235
|
-
//
|
|
1236
|
-
//
|
|
1237
|
-
//
|
|
1238
|
-
//
|
|
1239
|
-
//
|
|
1240
|
-
//
|
|
1241
|
-
//
|
|
1242
|
-
//
|
|
1243
|
-
//
|
|
1244
|
-
//
|
|
1245
|
-
//
|
|
1246
|
-
//
|
|
1247
|
-
//
|
|
1248
|
-
//
|
|
1249
|
-
//
|
|
1250
|
-
//
|
|
1251
|
-
//
|
|
1252
|
-
//
|
|
1253
|
-
//
|
|
1254
|
-
//
|
|
1255
|
-
//
|
|
1256
1213
|
var template = "\n\t<div v-bind:class={reflow:reflow} v-bind:key=\"'v-table-'+keyBody\" class=\"v-datatable v-resize\" style=\"background-color:#dbdbdb\"><template v-if=\"active\">\n\t\t<div v-if=\"hasSlot('header')\" class=\"v-datatable-header v-widget-header ui-corner-top\"><slot name=\"header\"></slot>\n\t\t</div>\n\t\t<div v-if=\"pagination\" class=\"v-paginator v-paginator-top v-widget-header v-paginator-pages center\">\n\t\t\n\t\t<v-button value=\"|<\" v-bind:disabled=\"page<=1\" v-on:click.prevent=\"to(1)\"/><v-button value=\"<\" v-on:click.prevent=\"to(page-1)\" v-bind:disabled=\"page<=1\"/><div style=\"padding:3px 8px;display:inline-block\">\n\t\t<input type=\"number\" v-on:change=\"to(page,true)\" style=\"width:60px\" min=\"1\" v-bind:max=\"pages\" v-model=\"page\"/> / {{pages}}</div>\n\t\t<v-button value=\">\" v-on:click.prevent=\"to(page+1)\" v-bind:disabled=\"page==pages\"/><v-button v-on:click.prevent=\"to(pages)\" value=\">|\" v-bind:disabled=\"page==pages\"/>\n\t\t\t</div>\n\t\t<div v-if=\"scrollable0\" class=\"v-widget-header v-datatable-scrollable-header\" style=\"position:relative\">\n\t\t<div class=\"v-datatable-scrollable-header-box\" style=\"\"></div></div>\n\t\t<div v-bind:class=\"{'v-datatable-scrollable-body':scrollable0}\">\n\t\t<table class=\"v-table\" v-bind:style=\"{width:width}\" v-if=\"columns\">\n\t\t\t<thead><tr>\n\t\t\t<th v-if=\"selectable0\" v-bind:width=\"getCheckColumnWidth\" >\n\t\t\t<span class=\"v-check\" v-on:click=\"rowSelect(null,-10)\" v-bind:data-icon=\"selected.length?'check-square':'square'\"><i class=\"fa fa-lg\" v-bind:class=\"selected.length?'fa-check-square':'fa-square'\"></i></span></th>\n\t\t\t<th v-bind:class=\"k['h-class']\" v-for=\"k in columns\" v-bind:width=\"k.width\" v-on:click=\"sortBy(k)\">\n\t\t\t<div v-html=\"k.header\"></div>\n\t\t\t</th>\n\t\t\t</tr></thead>\n\t\t\t<tbody class=\"v-datatable-data\" v-bind:key=\"kc\">\n\t\t\t\t<tr v-for=\"(entry,r) in sortedData\" @row=\"rowCreated(entry)\" @click=\"_selectRow($event,entry,r)\" v-bind:class=\"getRowClass(r,entry)\">\n\t\t\t\t\t<td v-if=\"selectable0\" width=\"18\" >\n\t\t\t\t\t\t<span v-bind:data-index=\"r\" class=\"v-check\" v-on:click=\"rowSelect(entry,r)\"\n\t\t\t\t\t\tv-bind:data-icon=\"isSelected(r)?'check-square':'square'\"><i class=\"far fa-lg\" v-bind:class=\"isSelected(r)?'fa-check-square':'fa-square'\" ></i></span>\n\t\t\t\t\t</td>\n\t\t\t\t\t<slot v-bind:row=\"entry\" v-bind:index=\"r+(page-1)*paginatio_\"></slot>\n\t\t\t\t</tr>\n\t\t\t\t<tr v-if=\"!sortedData||sortedData.length==0\">\n\t\t\t\t\t<td v-bind:colspan=\"columns.length+(selectable0?1:0)\">{{emptyMessage}}</td>\n\t\t\t\t</tr>\n\t\t\t</tbody>\n\t\t</table>\n\t\t</div>\n\t\t<div v-if=\"summary||hasSlot('summary')\" class=\"v-table-summary\" v-bind:class=\"{'v-datatable-scrollable-body':scrollable}\">\n\t\t\t<table class=\"v-table v-table-summary\"><tr>\n\t\t\t<td v-if=\"selectable0\" v-bind:width=\"getCheckColumnWidth\" ></td>\n\t\t\t<slot name=\"summary\" v-bind:data=\"sortedData\"></slot>\n\t\t\t</tr></table>\n\t\t</div>\n\t\t<div class=\"hide filters\"><slot name=\"filters\"></slot><slot name=\"columns\"></slot></div></template></div>\n";
|
|
1257
1214
|
|
|
1258
1215
|
function _invoke$1(body, then) {
|
|
@@ -1330,29 +1287,36 @@ var script$d = {
|
|
|
1330
1287
|
},
|
|
1331
1288
|
render: function render(createElement) {
|
|
1332
1289
|
console.log('RENDER TABLE');
|
|
1333
|
-
var
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
}
|
|
1290
|
+
var me = this,
|
|
1291
|
+
columns = [];
|
|
1292
|
+
me.$slots["default"].forEach(function (e, i) {
|
|
1293
|
+
console.log(e);
|
|
1294
|
+
var column = e.data.attrs;
|
|
1295
|
+
|
|
1296
|
+
if (e.children) {
|
|
1297
|
+
e.children.filter(function (e) {
|
|
1298
|
+
return e.tag == 'v-filter';
|
|
1299
|
+
}).forEach(function (e2) {
|
|
1300
|
+
column.filter = e2;
|
|
1301
|
+
e.children.shift();
|
|
1346
1302
|
});
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1303
|
+
e.children.filter(function (e) {
|
|
1304
|
+
return e.tag == 'v-footer';
|
|
1305
|
+
}).forEach(function (e2) {
|
|
1306
|
+
column.footer = e2;
|
|
1307
|
+
e.children.shift();
|
|
1308
|
+
});
|
|
1309
|
+
}
|
|
1310
|
+
|
|
1311
|
+
columns.push(column);
|
|
1312
|
+
});
|
|
1313
|
+
console.log(columns);
|
|
1314
|
+
me.columns = columns;
|
|
1350
1315
|
/*return createElement(
|
|
1351
1316
|
'h' + this.level, // nombre de etiqueta
|
|
1352
1317
|
this.$slots.default // arreglo de hijos
|
|
1353
1318
|
)*/
|
|
1354
1319
|
|
|
1355
|
-
|
|
1356
1320
|
var el = new DOMParser().parseFromString(template, "text/xml");
|
|
1357
1321
|
/*
|
|
1358
1322
|
|
|
@@ -1681,6 +1645,7 @@ var script$d = {
|
|
|
1681
1645
|
}
|
|
1682
1646
|
},
|
|
1683
1647
|
methods: {
|
|
1648
|
+
buildColumns: function buildColumns() {},
|
|
1684
1649
|
getRowClass: function getRowClass(r, row) {
|
|
1685
1650
|
var cls = [];
|
|
1686
1651
|
var me = this;
|
|
@@ -1750,30 +1715,6 @@ var script$d = {
|
|
|
1750
1715
|
console.log(this.$parent.$parent.row);
|
|
1751
1716
|
this.$emit('row',r);*/
|
|
1752
1717
|
},
|
|
1753
|
-
buildColumns: function buildColumns(c) {
|
|
1754
|
-
var me = this;
|
|
1755
|
-
|
|
1756
|
-
if (!me.columns) {
|
|
1757
|
-
//console.log(_.vtable);
|
|
1758
|
-
//console.log('columns='+me.$el.getAttribute("columns"));
|
|
1759
|
-
if (!c) {
|
|
1760
|
-
if (_.vtable) {
|
|
1761
|
-
c = _.vtable[me.$el.getAttribute("columns")];
|
|
1762
|
-
} else {
|
|
1763
|
-
var cc = me.$slots.columns;
|
|
1764
|
-
c = [];
|
|
1765
|
-
if (!cc) console.log('No columns in table!');
|
|
1766
|
-
|
|
1767
|
-
for (var k = 0; k < cc.length; k++) {
|
|
1768
|
-
c.push(cc[k].data.attrs);
|
|
1769
|
-
}
|
|
1770
|
-
}
|
|
1771
|
-
} //console.log(c);
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
me.columns = c;
|
|
1775
|
-
}
|
|
1776
|
-
},
|
|
1777
1718
|
hasSlot: function hasSlot(s) {
|
|
1778
1719
|
return !!this.$slots[s];
|
|
1779
1720
|
},
|
|
@@ -4541,6 +4482,7 @@ function _invoke(body, then) {
|
|
|
4541
4482
|
}
|
|
4542
4483
|
|
|
4543
4484
|
window.isMobile = 1;
|
|
4485
|
+
Vue.config.ignoredElements = ['v-filter', 'v-footer'];
|
|
4544
4486
|
|
|
4545
4487
|
Vue.n = function (v) {
|
|
4546
4488
|
v = v ? v == '' ? null : Number('' + v) : 0;
|
|
@@ -5865,82 +5807,6 @@ window.ui = _.ui = function (cfg) {
|
|
|
5865
5807
|
}
|
|
5866
5808
|
}
|
|
5867
5809
|
|
|
5868
|
-
_.vtable = {}; //esto es util si se tienen listados
|
|
5869
|
-
|
|
5870
|
-
var ta = el.querySelectorAll("v-table");
|
|
5871
|
-
|
|
5872
|
-
for (i = 0; i < ta.length; i++) {
|
|
5873
|
-
var te = ta[i].querySelectorAll("template");
|
|
5874
|
-
|
|
5875
|
-
for (j = 0; j < te.length; j++) {
|
|
5876
|
-
var att = te[j].attributes,
|
|
5877
|
-
k,
|
|
5878
|
-
atts;
|
|
5879
|
-
|
|
5880
|
-
if ('v-slot:default' in att || 'v-slot' in att) {
|
|
5881
|
-
var columns = [],
|
|
5882
|
-
n;
|
|
5883
|
-
var filterTemplate = document.createElement("template");
|
|
5884
|
-
filterTemplate.setAttribute("v-slot:filters", ""); //var selectable=ta[i].getAttribute("v-bind:selectable");
|
|
5885
|
-
|
|
5886
|
-
ta[i].appendChild(filterTemplate);
|
|
5887
|
-
var td = te[j].content.children;
|
|
5888
|
-
var summary = []; //var hassumary=0;
|
|
5889
|
-
|
|
5890
|
-
for (var l = 0; l < td.length; l++) {
|
|
5891
|
-
var m = {};
|
|
5892
|
-
var su = td[l].querySelector("v-footer");
|
|
5893
|
-
if (su) summary[l] = su;
|
|
5894
|
-
var f = td[l].querySelector("v-filter");
|
|
5895
|
-
|
|
5896
|
-
if (f) {
|
|
5897
|
-
td[l].removeChild(f);
|
|
5898
|
-
|
|
5899
|
-
for (k = 0; k < f.children.length; k++) {
|
|
5900
|
-
f.children[k].setAttribute("index", l);
|
|
5901
|
-
filterTemplate.content.appendChild(f.children[k]);
|
|
5902
|
-
}
|
|
5903
|
-
|
|
5904
|
-
m['filter'] = f;
|
|
5905
|
-
}
|
|
5906
|
-
|
|
5907
|
-
for (k = 0, atts = td[l].attributes, n = atts.length; k < n; k++) {
|
|
5908
|
-
att = atts[k];
|
|
5909
|
-
m[att.nodeName] = att.nodeValue;
|
|
5910
|
-
}
|
|
5911
|
-
|
|
5912
|
-
columns.push(m);
|
|
5913
|
-
}
|
|
5914
|
-
|
|
5915
|
-
if (summary.length) {
|
|
5916
|
-
filterTemplate = document.createElement("template");
|
|
5917
|
-
filterTemplate.setAttribute("v-slot:summary", "");
|
|
5918
|
-
ta[i].appendChild(filterTemplate);
|
|
5919
|
-
td = te[j].content.children;
|
|
5920
|
-
|
|
5921
|
-
for (l = 0; l < td.length; l++) {
|
|
5922
|
-
var ell = summary[l];
|
|
5923
|
-
var t = document.createElement("td");
|
|
5924
|
-
|
|
5925
|
-
if (ell) {
|
|
5926
|
-
t.innerHTML = ell.innerHTML;
|
|
5927
|
-
ell.parentNode.removeChild(ell);
|
|
5928
|
-
} else t.innerHTML = ' ';
|
|
5929
|
-
|
|
5930
|
-
filterTemplate.content.appendChild(t);
|
|
5931
|
-
}
|
|
5932
|
-
}
|
|
5933
|
-
|
|
5934
|
-
var cid = _.id();
|
|
5935
|
-
|
|
5936
|
-
_.vtable[cid] = columns;
|
|
5937
|
-
ta[i].setAttribute("columns", cid);
|
|
5938
|
-
}
|
|
5939
|
-
|
|
5940
|
-
ta[i].setAttribute("v-bind:filters", "filters");
|
|
5941
|
-
}
|
|
5942
|
-
}
|
|
5943
|
-
|
|
5944
5810
|
cfg.el = el;
|
|
5945
5811
|
}
|
|
5946
5812
|
|