isobit-ui 0.0.211 → 0.0.215
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 +25 -156
- 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.215
|
|
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,27 +1287,37 @@ 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
|
-
|
|
1290
|
+
var me = this,
|
|
1291
|
+
columns = [];
|
|
1292
|
+
console.log(me.$slots);
|
|
1293
|
+
me.$slots["default"].forEach(function (e, i) {
|
|
1294
|
+
console.log(e);
|
|
1295
|
+
var column = e.data.attrs;
|
|
1296
|
+
|
|
1297
|
+
if (e.children) {
|
|
1298
|
+
e.children.filter(function (e) {
|
|
1340
1299
|
return e.tag == 'v-filter';
|
|
1341
1300
|
}).forEach(function (e2) {
|
|
1342
|
-
|
|
1301
|
+
column.filter = e2;
|
|
1343
1302
|
e.children.shift();
|
|
1344
1303
|
});
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1304
|
+
e.children.filter(function (e) {
|
|
1305
|
+
return e.tag == 'v-footer';
|
|
1306
|
+
}).forEach(function (e2) {
|
|
1307
|
+
column.footer = e2;
|
|
1308
|
+
e.children.shift();
|
|
1309
|
+
});
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
columns.push(column);
|
|
1313
|
+
});
|
|
1314
|
+
console.log(columns);
|
|
1315
|
+
me.columns = columns;
|
|
1348
1316
|
/*return createElement(
|
|
1349
1317
|
'h' + this.level, // nombre de etiqueta
|
|
1350
1318
|
this.$slots.default // arreglo de hijos
|
|
1351
1319
|
)*/
|
|
1352
1320
|
|
|
1353
|
-
|
|
1354
1321
|
var el = new DOMParser().parseFromString(template, "text/xml");
|
|
1355
1322
|
/*
|
|
1356
1323
|
|
|
@@ -1679,6 +1646,7 @@ var script$d = {
|
|
|
1679
1646
|
}
|
|
1680
1647
|
},
|
|
1681
1648
|
methods: {
|
|
1649
|
+
buildColumns: function buildColumns() {},
|
|
1682
1650
|
getRowClass: function getRowClass(r, row) {
|
|
1683
1651
|
var cls = [];
|
|
1684
1652
|
var me = this;
|
|
@@ -1748,30 +1716,6 @@ var script$d = {
|
|
|
1748
1716
|
console.log(this.$parent.$parent.row);
|
|
1749
1717
|
this.$emit('row',r);*/
|
|
1750
1718
|
},
|
|
1751
|
-
buildColumns: function buildColumns(c) {
|
|
1752
|
-
var me = this;
|
|
1753
|
-
|
|
1754
|
-
if (!me.columns) {
|
|
1755
|
-
//console.log(_.vtable);
|
|
1756
|
-
//console.log('columns='+me.$el.getAttribute("columns"));
|
|
1757
|
-
if (!c) {
|
|
1758
|
-
if (_.vtable) {
|
|
1759
|
-
c = _.vtable[me.$el.getAttribute("columns")];
|
|
1760
|
-
} else {
|
|
1761
|
-
var cc = me.$slots.columns;
|
|
1762
|
-
c = [];
|
|
1763
|
-
if (!cc) console.log('No columns in table!');
|
|
1764
|
-
|
|
1765
|
-
for (var k = 0; k < cc.length; k++) {
|
|
1766
|
-
c.push(cc[k].data.attrs);
|
|
1767
|
-
}
|
|
1768
|
-
}
|
|
1769
|
-
} //console.log(c);
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
me.columns = c;
|
|
1773
|
-
}
|
|
1774
|
-
},
|
|
1775
1719
|
hasSlot: function hasSlot(s) {
|
|
1776
1720
|
return !!this.$slots[s];
|
|
1777
1721
|
},
|
|
@@ -4539,6 +4483,7 @@ function _invoke(body, then) {
|
|
|
4539
4483
|
}
|
|
4540
4484
|
|
|
4541
4485
|
window.isMobile = 1;
|
|
4486
|
+
Vue.config.ignoredElements = ['v-filter', 'v-footer'];
|
|
4542
4487
|
|
|
4543
4488
|
Vue.n = function (v) {
|
|
4544
4489
|
v = v ? v == '' ? null : Number('' + v) : 0;
|
|
@@ -5863,82 +5808,6 @@ window.ui = _.ui = function (cfg) {
|
|
|
5863
5808
|
}
|
|
5864
5809
|
}
|
|
5865
5810
|
|
|
5866
|
-
_.vtable = {}; //esto es util si se tienen listados
|
|
5867
|
-
|
|
5868
|
-
var ta = el.querySelectorAll("v-table");
|
|
5869
|
-
|
|
5870
|
-
for (i = 0; i < ta.length; i++) {
|
|
5871
|
-
var te = ta[i].querySelectorAll("template");
|
|
5872
|
-
|
|
5873
|
-
for (j = 0; j < te.length; j++) {
|
|
5874
|
-
var att = te[j].attributes,
|
|
5875
|
-
k,
|
|
5876
|
-
atts;
|
|
5877
|
-
|
|
5878
|
-
if ('v-slot:default' in att || 'v-slot' in att) {
|
|
5879
|
-
var columns = [],
|
|
5880
|
-
n;
|
|
5881
|
-
var filterTemplate = document.createElement("template");
|
|
5882
|
-
filterTemplate.setAttribute("v-slot:filters", ""); //var selectable=ta[i].getAttribute("v-bind:selectable");
|
|
5883
|
-
|
|
5884
|
-
ta[i].appendChild(filterTemplate);
|
|
5885
|
-
var td = te[j].content.children;
|
|
5886
|
-
var summary = []; //var hassumary=0;
|
|
5887
|
-
|
|
5888
|
-
for (var l = 0; l < td.length; l++) {
|
|
5889
|
-
var m = {};
|
|
5890
|
-
var su = td[l].querySelector("v-footer");
|
|
5891
|
-
if (su) summary[l] = su;
|
|
5892
|
-
var f = td[l].querySelector("v-filter");
|
|
5893
|
-
|
|
5894
|
-
if (f) {
|
|
5895
|
-
td[l].removeChild(f);
|
|
5896
|
-
|
|
5897
|
-
for (k = 0; k < f.children.length; k++) {
|
|
5898
|
-
f.children[k].setAttribute("index", l);
|
|
5899
|
-
filterTemplate.content.appendChild(f.children[k]);
|
|
5900
|
-
}
|
|
5901
|
-
|
|
5902
|
-
m['filter'] = f;
|
|
5903
|
-
}
|
|
5904
|
-
|
|
5905
|
-
for (k = 0, atts = td[l].attributes, n = atts.length; k < n; k++) {
|
|
5906
|
-
att = atts[k];
|
|
5907
|
-
m[att.nodeName] = att.nodeValue;
|
|
5908
|
-
}
|
|
5909
|
-
|
|
5910
|
-
columns.push(m);
|
|
5911
|
-
}
|
|
5912
|
-
|
|
5913
|
-
if (summary.length) {
|
|
5914
|
-
filterTemplate = document.createElement("template");
|
|
5915
|
-
filterTemplate.setAttribute("v-slot:summary", "");
|
|
5916
|
-
ta[i].appendChild(filterTemplate);
|
|
5917
|
-
td = te[j].content.children;
|
|
5918
|
-
|
|
5919
|
-
for (l = 0; l < td.length; l++) {
|
|
5920
|
-
var ell = summary[l];
|
|
5921
|
-
var t = document.createElement("td");
|
|
5922
|
-
|
|
5923
|
-
if (ell) {
|
|
5924
|
-
t.innerHTML = ell.innerHTML;
|
|
5925
|
-
ell.parentNode.removeChild(ell);
|
|
5926
|
-
} else t.innerHTML = ' ';
|
|
5927
|
-
|
|
5928
|
-
filterTemplate.content.appendChild(t);
|
|
5929
|
-
}
|
|
5930
|
-
}
|
|
5931
|
-
|
|
5932
|
-
var cid = _.id();
|
|
5933
|
-
|
|
5934
|
-
_.vtable[cid] = columns;
|
|
5935
|
-
ta[i].setAttribute("columns", cid);
|
|
5936
|
-
}
|
|
5937
|
-
|
|
5938
|
-
ta[i].setAttribute("v-bind:filters", "filters");
|
|
5939
|
-
}
|
|
5940
|
-
}
|
|
5941
|
-
|
|
5942
5811
|
cfg.el = el;
|
|
5943
5812
|
}
|
|
5944
5813
|
|