isobit-ui 0.0.418 → 0.0.421
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 +72 -95
- 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.421
|
|
3
3
|
* (c) Erik Alarcon Pinedo
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -1423,7 +1423,7 @@ function _await$2(value, then, direct) {
|
|
|
1423
1423
|
|
|
1424
1424
|
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>\n <tr>\n <th v-if=\"selectable0\" v-bind:width=\"getCheckColumnWidth\" >\n <span class=\"v-check\" v-on:click=\"rowSelect(null,-10)\" v-bind:data-icon=\"selected.length?'check-square':'square'\">\n <i class=\"fa fa-lg\" v-bind:class=\"selected.length?'fa-check-square':'fa-square'\"></i>\n </span>\n </th>\n <th v-bind:class=\"k['h-class']\" v-for=\"k in columns\" v-bind:width=\"k.width\" v-on:click=\"sortBy(k)\">\n <div v-html=\"k.header\"></div>\n </th>\n\t\t\t</tr>\n </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";
|
|
1425
1425
|
|
|
1426
|
-
function _invoke$
|
|
1426
|
+
function _invoke$1(body, then) {
|
|
1427
1427
|
var result = body();
|
|
1428
1428
|
|
|
1429
1429
|
if (result && result.then) {
|
|
@@ -1967,7 +1967,7 @@ var script$d = {
|
|
|
1967
1967
|
return _invokeIgnored(function () {
|
|
1968
1968
|
if (storage != null) {
|
|
1969
1969
|
var datj;
|
|
1970
|
-
return _invoke$
|
|
1970
|
+
return _invoke$1(function () {
|
|
1971
1971
|
if (window._.db) {
|
|
1972
1972
|
return _await$2(me.getStoredList(storage), function (_me$getStoredList) {
|
|
1973
1973
|
datj = _me$getStoredList;
|
|
@@ -2904,7 +2904,7 @@ function _await$1(value, then, direct) {
|
|
|
2904
2904
|
return then ? value.then(then) : value;
|
|
2905
2905
|
}
|
|
2906
2906
|
|
|
2907
|
-
function _invoke
|
|
2907
|
+
function _invoke(body, then) {
|
|
2908
2908
|
var result = body();
|
|
2909
2909
|
|
|
2910
2910
|
if (result && result.then) {
|
|
@@ -3012,7 +3012,7 @@ var script$8 = {
|
|
|
3012
3012
|
|
|
3013
3013
|
var me = _this2;
|
|
3014
3014
|
var pa = me.$el.parentElement;
|
|
3015
|
-
return _invoke
|
|
3015
|
+
return _invoke(function () {
|
|
3016
3016
|
if (me.store) {
|
|
3017
3017
|
return _await$1(window._.getStoredList(me.store), function (dd) {
|
|
3018
3018
|
var _ref = p ? Object.keys(p) : [],
|
|
@@ -4778,16 +4778,6 @@ function _await(value, then, direct) {
|
|
|
4778
4778
|
return then ? value.then(then) : value;
|
|
4779
4779
|
}
|
|
4780
4780
|
|
|
4781
|
-
function _invoke(body, then) {
|
|
4782
|
-
var result = body();
|
|
4783
|
-
|
|
4784
|
-
if (result && result.then) {
|
|
4785
|
-
return result.then(then);
|
|
4786
|
-
}
|
|
4787
|
-
|
|
4788
|
-
return then(result);
|
|
4789
|
-
}
|
|
4790
|
-
|
|
4791
4781
|
window.isMobile = 1;
|
|
4792
4782
|
if (typeof Window._ == 'undefined') Window._ = {};
|
|
4793
4783
|
var _$1 = Window._;
|
|
@@ -6225,8 +6215,6 @@ window.ui = _$1.ui = function (cfg) {
|
|
|
6225
6215
|
},
|
|
6226
6216
|
save: function save() {
|
|
6227
6217
|
try {
|
|
6228
|
-
var _exit2 = false;
|
|
6229
|
-
|
|
6230
6218
|
var _this4 = this;
|
|
6231
6219
|
|
|
6232
6220
|
var me = _this4;
|
|
@@ -6257,21 +6245,18 @@ window.ui = _$1.ui = function (cfg) {
|
|
|
6257
6245
|
if (me.process) o = me.process(o); //console.log('o2='+o);
|
|
6258
6246
|
|
|
6259
6247
|
if (!(_typeof(o) === 'object' && !Array.isArray(o) && o !== null)) return;
|
|
6260
|
-
|
|
6261
|
-
console.log('action=' + action);
|
|
6262
|
-
return _invoke(function () {
|
|
6248
|
+
return function () {
|
|
6263
6249
|
if (!action || !me.app.networkStatus.connected) {
|
|
6264
|
-
console.log('app.networkStatus.connected=' + me.app.networkStatus.connected);
|
|
6265
6250
|
var store = me.$children[0].store;
|
|
6266
6251
|
|
|
6267
6252
|
if (!store) {
|
|
6268
6253
|
me.MsgBox('Store in form is undefined!');
|
|
6269
|
-
_exit2 = true;
|
|
6270
6254
|
return;
|
|
6271
6255
|
}
|
|
6272
6256
|
|
|
6273
6257
|
return _await(me.getStoredList(store), function (storedList) {
|
|
6274
6258
|
if (!storedList) storedList = [];
|
|
6259
|
+
console.log(1111111);
|
|
6275
6260
|
|
|
6276
6261
|
if (o.id) {
|
|
6277
6262
|
for (var k = 0; k < storedList.length; k++) {
|
|
@@ -6283,6 +6268,7 @@ window.ui = _$1.ui = function (cfg) {
|
|
|
6283
6268
|
}
|
|
6284
6269
|
}
|
|
6285
6270
|
|
|
6271
|
+
console.log(22222);
|
|
6286
6272
|
var db = window._.db;
|
|
6287
6273
|
var objectStore = db.transaction([store], "readwrite").objectStore(store);
|
|
6288
6274
|
console.log('!o.id=' + !o.id);
|
|
@@ -6327,100 +6313,91 @@ window.ui = _$1.ui = function (cfg) {
|
|
|
6327
6313
|
me.MsgBox('Error getting temporal record ' + o.tmpId);
|
|
6328
6314
|
};
|
|
6329
6315
|
}
|
|
6330
|
-
|
|
6331
|
-
_exit2 = true;
|
|
6332
6316
|
});
|
|
6333
|
-
}
|
|
6334
|
-
|
|
6335
|
-
|
|
6336
|
-
|
|
6337
|
-
if (1 == 1) {
|
|
6338
|
-
console.log('XXXXX');
|
|
6339
|
-
return;
|
|
6340
|
-
}
|
|
6341
|
-
|
|
6342
|
-
axios$1.post(action, o).then(function (result) {
|
|
6343
|
-
var data = result.data;
|
|
6344
|
-
|
|
6345
|
-
if (o.tmpId) {
|
|
6346
|
-
var store = me.$children[0].store;
|
|
6317
|
+
} else {
|
|
6318
|
+
axios$1.post(action, o).then(function (result) {
|
|
6319
|
+
var data = result.data;
|
|
6347
6320
|
|
|
6348
|
-
|
|
6321
|
+
if (o.tmpId) {
|
|
6322
|
+
var store = me.$children[0].store;
|
|
6349
6323
|
|
|
6350
|
-
|
|
6351
|
-
o.tmpSynchronized = 1;
|
|
6324
|
+
var objectStore = window._.db.transaction([store], "readwrite").objectStore(store);
|
|
6352
6325
|
|
|
6353
|
-
|
|
6354
|
-
o.
|
|
6355
|
-
o0.id = o.id;
|
|
6356
|
-
}
|
|
6326
|
+
var item = objectStore.get(o.tmpId);
|
|
6327
|
+
o.tmpSynchronized = 1;
|
|
6357
6328
|
|
|
6358
|
-
|
|
6359
|
-
|
|
6360
|
-
|
|
6361
|
-
} else {
|
|
6362
|
-
objectStore.add(o);
|
|
6329
|
+
if (data.id) {
|
|
6330
|
+
o.id = data.id;
|
|
6331
|
+
o0.id = o.id;
|
|
6363
6332
|
}
|
|
6364
6333
|
|
|
6365
|
-
|
|
6366
|
-
|
|
6334
|
+
item.onsuccess = function () {
|
|
6335
|
+
if (item.result) {
|
|
6336
|
+
objectStore.put(o);
|
|
6337
|
+
} else {
|
|
6338
|
+
objectStore.add(o);
|
|
6339
|
+
}
|
|
6340
|
+
|
|
6341
|
+
me.$emit('sync', data, o);
|
|
6342
|
+
};
|
|
6367
6343
|
|
|
6368
|
-
|
|
6369
|
-
|
|
6370
|
-
|
|
6371
|
-
|
|
6344
|
+
item.onerror = function () {
|
|
6345
|
+
me.MsgBox('Error getting temporal record ' + o.tmpId);
|
|
6346
|
+
};
|
|
6347
|
+
}
|
|
6372
6348
|
|
|
6373
|
-
|
|
6374
|
-
|
|
6375
|
-
|
|
6376
|
-
|
|
6377
|
-
|
|
6378
|
-
|
|
6379
|
-
|
|
6380
|
-
|
|
6381
|
-
|
|
6349
|
+
if (me.app && me.app.toast) me.app.toast('El registro fue grabado correectamente!', function () {
|
|
6350
|
+
me.close({
|
|
6351
|
+
success: true,
|
|
6352
|
+
data: data
|
|
6353
|
+
});
|
|
6354
|
+
});else me.MsgBox('El registro fue grabado exitosamente!', function () {
|
|
6355
|
+
me.close({
|
|
6356
|
+
success: true,
|
|
6357
|
+
data: data
|
|
6358
|
+
});
|
|
6382
6359
|
});
|
|
6383
|
-
})
|
|
6384
|
-
|
|
6385
|
-
console.log(r);
|
|
6360
|
+
})["catch"](function (r) {
|
|
6361
|
+
console.log(r);
|
|
6386
6362
|
|
|
6387
|
-
|
|
6388
|
-
|
|
6363
|
+
if (r.response) {
|
|
6364
|
+
var l, e;
|
|
6389
6365
|
|
|
6390
|
-
|
|
6391
|
-
|
|
6392
|
-
|
|
6393
|
-
|
|
6366
|
+
if (typeof r.response.data === 'string') {
|
|
6367
|
+
me.MsgBox(r.response.data);
|
|
6368
|
+
} else {
|
|
6369
|
+
l = r.response.data.propertyViolations; //ec += l.length;
|
|
6394
6370
|
|
|
6395
|
-
|
|
6396
|
-
|
|
6397
|
-
|
|
6371
|
+
for (var i = 0; i < l.length; i++) {
|
|
6372
|
+
var t = l[i];
|
|
6373
|
+
e = f.querySelector('[name=' + t.path + ']');
|
|
6398
6374
|
|
|
6399
|
-
|
|
6400
|
-
|
|
6375
|
+
if (e) {
|
|
6376
|
+
me.showerror(e, t.message);
|
|
6377
|
+
}
|
|
6401
6378
|
}
|
|
6402
|
-
}
|
|
6403
6379
|
|
|
6404
|
-
|
|
6380
|
+
l = r.response.data.fieldViolations; //ec += l.length;
|
|
6405
6381
|
|
|
6406
|
-
|
|
6407
|
-
|
|
6408
|
-
|
|
6382
|
+
for (i = 0; i < l.length; i++) {
|
|
6383
|
+
t = l[i];
|
|
6384
|
+
e = f.querySelector('[name=' + t.path + ']');
|
|
6409
6385
|
|
|
6410
|
-
|
|
6411
|
-
|
|
6386
|
+
if (e) {
|
|
6387
|
+
me.showerror(e, t.message + ', valor=' + t.value);
|
|
6388
|
+
}
|
|
6412
6389
|
}
|
|
6413
|
-
}
|
|
6414
6390
|
|
|
6415
|
-
|
|
6416
|
-
|
|
6417
|
-
|
|
6418
|
-
|
|
6419
|
-
|
|
6391
|
+
me.MsgBox('Verifique el formulario, aun tiene campos obligatorios sin completar.');
|
|
6392
|
+
if (me.$el.parentNode.className == 'v-dialog') me.$el.parentNode.parentNode.scroll({
|
|
6393
|
+
top: 0,
|
|
6394
|
+
behavior: 'smooth'
|
|
6395
|
+
});
|
|
6396
|
+
}
|
|
6420
6397
|
}
|
|
6421
|
-
}
|
|
6422
|
-
}
|
|
6423
|
-
});
|
|
6398
|
+
});
|
|
6399
|
+
}
|
|
6400
|
+
}();
|
|
6424
6401
|
} else {
|
|
6425
6402
|
me.MsgBox('Verifique el formulario, aun tiene campos obligatorios sin completar.');
|
|
6426
6403
|
if (me.$el.parentNode.className == 'v-dialog') me.$el.parentNode.parentNode.scroll({
|