isobit-ui 0.0.419 → 0.0.420
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 +70 -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.420
|
|
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,19 +6245,16 @@ 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
|
-
return
|
|
6248
|
+
return function () {
|
|
6261
6249
|
if (!action || !me.app.networkStatus.connected) {
|
|
6262
6250
|
var store = me.$children[0].store;
|
|
6263
6251
|
|
|
6264
6252
|
if (!store) {
|
|
6265
6253
|
me.MsgBox('Store in form is undefined!');
|
|
6266
|
-
_exit2 = true;
|
|
6267
6254
|
return;
|
|
6268
6255
|
}
|
|
6269
6256
|
|
|
6270
|
-
console.log(1111111);
|
|
6271
6257
|
return _await(me.getStoredList(store), function (storedList) {
|
|
6272
|
-
console.log(222222222);
|
|
6273
6258
|
if (!storedList) storedList = [];
|
|
6274
6259
|
|
|
6275
6260
|
if (o.id) {
|
|
@@ -6282,7 +6267,6 @@ window.ui = _$1.ui = function (cfg) {
|
|
|
6282
6267
|
}
|
|
6283
6268
|
}
|
|
6284
6269
|
|
|
6285
|
-
console.log(3333333);
|
|
6286
6270
|
var db = window._.db;
|
|
6287
6271
|
var objectStore = db.transaction([store], "readwrite").objectStore(store);
|
|
6288
6272
|
console.log('!o.id=' + !o.id);
|
|
@@ -6327,100 +6311,91 @@ window.ui = _$1.ui = function (cfg) {
|
|
|
6327
6311
|
me.MsgBox('Error getting temporal record ' + o.tmpId);
|
|
6328
6312
|
};
|
|
6329
6313
|
}
|
|
6330
|
-
|
|
6331
|
-
_exit2 = true;
|
|
6332
6314
|
});
|
|
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;
|
|
6315
|
+
} else {
|
|
6316
|
+
axios$1.post(action, o).then(function (result) {
|
|
6317
|
+
var data = result.data;
|
|
6347
6318
|
|
|
6348
|
-
|
|
6319
|
+
if (o.tmpId) {
|
|
6320
|
+
var store = me.$children[0].store;
|
|
6349
6321
|
|
|
6350
|
-
|
|
6351
|
-
o.tmpSynchronized = 1;
|
|
6322
|
+
var objectStore = window._.db.transaction([store], "readwrite").objectStore(store);
|
|
6352
6323
|
|
|
6353
|
-
|
|
6354
|
-
o.
|
|
6355
|
-
o0.id = o.id;
|
|
6356
|
-
}
|
|
6324
|
+
var item = objectStore.get(o.tmpId);
|
|
6325
|
+
o.tmpSynchronized = 1;
|
|
6357
6326
|
|
|
6358
|
-
|
|
6359
|
-
|
|
6360
|
-
|
|
6361
|
-
} else {
|
|
6362
|
-
objectStore.add(o);
|
|
6327
|
+
if (data.id) {
|
|
6328
|
+
o.id = data.id;
|
|
6329
|
+
o0.id = o.id;
|
|
6363
6330
|
}
|
|
6364
6331
|
|
|
6365
|
-
|
|
6366
|
-
|
|
6332
|
+
item.onsuccess = function () {
|
|
6333
|
+
if (item.result) {
|
|
6334
|
+
objectStore.put(o);
|
|
6335
|
+
} else {
|
|
6336
|
+
objectStore.add(o);
|
|
6337
|
+
}
|
|
6338
|
+
|
|
6339
|
+
me.$emit('sync', data, o);
|
|
6340
|
+
};
|
|
6367
6341
|
|
|
6368
|
-
|
|
6369
|
-
|
|
6370
|
-
|
|
6371
|
-
|
|
6342
|
+
item.onerror = function () {
|
|
6343
|
+
me.MsgBox('Error getting temporal record ' + o.tmpId);
|
|
6344
|
+
};
|
|
6345
|
+
}
|
|
6372
6346
|
|
|
6373
|
-
|
|
6374
|
-
|
|
6375
|
-
|
|
6376
|
-
|
|
6377
|
-
|
|
6378
|
-
|
|
6379
|
-
|
|
6380
|
-
|
|
6381
|
-
|
|
6347
|
+
if (me.app && me.app.toast) me.app.toast('El registro fue grabado correectamente!', function () {
|
|
6348
|
+
me.close({
|
|
6349
|
+
success: true,
|
|
6350
|
+
data: data
|
|
6351
|
+
});
|
|
6352
|
+
});else me.MsgBox('El registro fue grabado exitosamente!', function () {
|
|
6353
|
+
me.close({
|
|
6354
|
+
success: true,
|
|
6355
|
+
data: data
|
|
6356
|
+
});
|
|
6382
6357
|
});
|
|
6383
|
-
})
|
|
6384
|
-
|
|
6385
|
-
console.log(r);
|
|
6358
|
+
})["catch"](function (r) {
|
|
6359
|
+
console.log(r);
|
|
6386
6360
|
|
|
6387
|
-
|
|
6388
|
-
|
|
6361
|
+
if (r.response) {
|
|
6362
|
+
var l, e;
|
|
6389
6363
|
|
|
6390
|
-
|
|
6391
|
-
|
|
6392
|
-
|
|
6393
|
-
|
|
6364
|
+
if (typeof r.response.data === 'string') {
|
|
6365
|
+
me.MsgBox(r.response.data);
|
|
6366
|
+
} else {
|
|
6367
|
+
l = r.response.data.propertyViolations; //ec += l.length;
|
|
6394
6368
|
|
|
6395
|
-
|
|
6396
|
-
|
|
6397
|
-
|
|
6369
|
+
for (var i = 0; i < l.length; i++) {
|
|
6370
|
+
var t = l[i];
|
|
6371
|
+
e = f.querySelector('[name=' + t.path + ']');
|
|
6398
6372
|
|
|
6399
|
-
|
|
6400
|
-
|
|
6373
|
+
if (e) {
|
|
6374
|
+
me.showerror(e, t.message);
|
|
6375
|
+
}
|
|
6401
6376
|
}
|
|
6402
|
-
}
|
|
6403
6377
|
|
|
6404
|
-
|
|
6378
|
+
l = r.response.data.fieldViolations; //ec += l.length;
|
|
6405
6379
|
|
|
6406
|
-
|
|
6407
|
-
|
|
6408
|
-
|
|
6380
|
+
for (i = 0; i < l.length; i++) {
|
|
6381
|
+
t = l[i];
|
|
6382
|
+
e = f.querySelector('[name=' + t.path + ']');
|
|
6409
6383
|
|
|
6410
|
-
|
|
6411
|
-
|
|
6384
|
+
if (e) {
|
|
6385
|
+
me.showerror(e, t.message + ', valor=' + t.value);
|
|
6386
|
+
}
|
|
6412
6387
|
}
|
|
6413
|
-
}
|
|
6414
6388
|
|
|
6415
|
-
|
|
6416
|
-
|
|
6417
|
-
|
|
6418
|
-
|
|
6419
|
-
|
|
6389
|
+
me.MsgBox('Verifique el formulario, aun tiene campos obligatorios sin completar.');
|
|
6390
|
+
if (me.$el.parentNode.className == 'v-dialog') me.$el.parentNode.parentNode.scroll({
|
|
6391
|
+
top: 0,
|
|
6392
|
+
behavior: 'smooth'
|
|
6393
|
+
});
|
|
6394
|
+
}
|
|
6420
6395
|
}
|
|
6421
|
-
}
|
|
6422
|
-
}
|
|
6423
|
-
});
|
|
6396
|
+
});
|
|
6397
|
+
}
|
|
6398
|
+
}();
|
|
6424
6399
|
} else {
|
|
6425
6400
|
me.MsgBox('Verifique el formulario, aun tiene campos obligatorios sin completar.');
|
|
6426
6401
|
if (me.$el.parentNode.className == 'v-dialog') me.$el.parentNode.parentNode.scroll({
|