isobit-ui 0.0.358 → 0.0.361
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 +43 -17
- 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.361
|
|
3
3
|
* (c) Erik Alarcon Pinedo
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -3283,7 +3283,7 @@ var __vue_component__$7 = /*#__PURE__*/__vue_normalize____default['default']({
|
|
|
3283
3283
|
//
|
|
3284
3284
|
//
|
|
3285
3285
|
var script$6 = {
|
|
3286
|
-
props: ['header', '
|
|
3286
|
+
props: ['header', 'store', 'action'],
|
|
3287
3287
|
watch: {
|
|
3288
3288
|
header: function header(v) {
|
|
3289
3289
|
this.setTitle(v);
|
|
@@ -4849,9 +4849,9 @@ var resize = function resize() {
|
|
|
4849
4849
|
var pc = document.querySelectorAll("#page-content,.ui-layout-pane-center,.ion-page > ion-content");
|
|
4850
4850
|
|
|
4851
4851
|
if (pc && pc[0]) {
|
|
4852
|
-
console.log('cccccccccccc');
|
|
4852
|
+
//console.log('cccccccccccc');
|
|
4853
|
+
//console.log(ph.dataset);
|
|
4853
4854
|
//console.log(ph.offsetHeight);
|
|
4854
|
-
|
|
4855
4855
|
var p, i;
|
|
4856
4856
|
|
|
4857
4857
|
if (pc[0].nodeName == "ION-CONTENT") {
|
|
@@ -5469,21 +5469,47 @@ Vue__default['default'].filter('number', function (s
|
|
|
5469
5469
|
Vue__default['default'].filter('date', _$1.toDate = function (s, type) {
|
|
5470
5470
|
//s usa d|date('time')
|
|
5471
5471
|
if (s) {
|
|
5472
|
-
var pad = Vue__default['default'].pad
|
|
5473
|
-
|
|
5472
|
+
var pad = Vue__default['default'].pad,
|
|
5473
|
+
d;
|
|
5474
|
+
|
|
5475
|
+
if (s instanceof Date) {
|
|
5476
|
+
d = s;
|
|
5477
|
+
} else if (typeof s === 'string') {
|
|
5478
|
+
console.log(s);
|
|
5479
|
+
var t = s.split('T');
|
|
5480
|
+
d = t[0].split('-');
|
|
5481
|
+
|
|
5482
|
+
if (t.length > 1) {
|
|
5483
|
+
t = t[1].split(':');
|
|
5484
|
+
d = new Date(parseInt(d[0]), parseInt(d[1]) - 1, parseInt(d[2]), parseInt(t[0]), parseInt(t[1]), t.length > 2 ? parseInt(t[2]) : 0);
|
|
5485
|
+
} else if (d.length > 2) {
|
|
5486
|
+
d = new Date(parseInt(d[0]), parseInt(d[1]) - 1, parseInt(d[2]));
|
|
5487
|
+
} else {
|
|
5488
|
+
d = s.split(':');
|
|
5489
|
+
|
|
5490
|
+
if (d.length > 2) {
|
|
5491
|
+
d = new Date(1981, 0, 6, parseInt(d[0]), parseInt(d[1]), parseInt(d[2]));
|
|
5492
|
+
} else d = new Date(s);
|
|
5493
|
+
}
|
|
5494
|
+
} else {
|
|
5495
|
+
d = new Date(s);
|
|
5496
|
+
} //console.log(s);
|
|
5474
5497
|
|
|
5475
|
-
if (type == 'time a') {
|
|
5476
|
-
var h;
|
|
5477
5498
|
|
|
5499
|
+
if (type == 1) {
|
|
5500
|
+
s = d;
|
|
5501
|
+
} else if (type === 'time') {
|
|
5502
|
+
s = pad(d.getHours(), 2) + ":" + pad(d.getMinutes(), 2) + ':' + pad(d.setSeconds() ? d.setSeconds() : 0, 2);
|
|
5503
|
+
} else if (type == 'time a') {
|
|
5478
5504
|
if (typeof s === 'string' || s instanceof String) {
|
|
5479
5505
|
s = s.split(':');
|
|
5480
|
-
h = s[0];
|
|
5506
|
+
var h = s[0];
|
|
5481
5507
|
s = pad(h > 12 ? h - 12 : h, 2) + ':' + s[1] + ':' + s[2] + ' ' + (h > 12 ? 'PM' : 'AM');
|
|
5482
5508
|
} else {
|
|
5483
5509
|
h = d.getHours();
|
|
5484
5510
|
s = pad(h > 12 ? h - 12 : h, 2) + ":" + pad(d.getMinutes(), 2) + (d.setSeconds() ? ":" + pad(d.setSeconds(), 2) : '') + ' ' + (h > 12 ? 'PM' : 'AM');
|
|
5485
5511
|
}
|
|
5486
|
-
} else if (type == 'date-') s = pad(d.getFullYear(), 4) + "-" + pad(d.getMonth() + 1, 2) + "-" + pad(d.getDate(), 2);else if (type == 'dMY' || type == 'date') s = pad(d.getDate(), 2) + "/" + pad(d.getMonth() + 1, 2) + "/" + pad(d.getFullYear(), 4) + '';else s = pad(d.getDate(), 2) + "/" + pad(d.getMonth() + 1, 2) + "/" + pad(d.getFullYear(), 4) + ' ' + pad(d.getHours(), 2) + ":" + pad(d.getMinutes(), 2);
|
|
5512
|
+
} else if (type == 'date-') s = pad(d.getFullYear(), 4) + "-" + pad(d.getMonth() + 1, 2) + "-" + pad(d.getDate(), 2);else if (type == 'dMY' || type == 'date') s = pad(d.getDate(), 2) + "/" + pad(d.getMonth() + 1, 2) + "/" + pad(d.getFullYear(), 4) + '';else if (type == 'datetime') s = pad(d.getFullYear(), 4) + "-" + pad(d.getMonth() + 1, 2) + "-" + pad(d.getDate(), 2) + 'T' + pad(d.getHours(), 2) + ":" + pad(d.getMinutes(), 2) + ":" + pad(d.setSeconds() ? d.setSeconds() : 0, 2);else s = pad(d.getDate(), 2) + "/" + pad(d.getMonth() + 1, 2) + "/" + pad(d.getFullYear(), 4) + ' ' + pad(d.getHours(), 2) + ":" + pad(d.getMinutes(), 2);
|
|
5487
5513
|
}
|
|
5488
5514
|
|
|
5489
5515
|
return s;
|
|
@@ -6224,8 +6250,8 @@ window.ui = _$1.ui = function (cfg) {
|
|
|
6224
6250
|
if (!(_typeof(o) === 'object' && !Array.isArray(o) && o !== null)) return;
|
|
6225
6251
|
return _invoke(function () {
|
|
6226
6252
|
if (!action || !_this4.app.networkStatus.connected) {
|
|
6227
|
-
var
|
|
6228
|
-
return _await(me.getStoredList(
|
|
6253
|
+
var store = me.$children[0].store;
|
|
6254
|
+
return _await(me.getStoredList(store), function (storedList) {
|
|
6229
6255
|
if (!storedList) storedList = [];
|
|
6230
6256
|
|
|
6231
6257
|
if (o.id) {
|
|
@@ -6239,7 +6265,7 @@ window.ui = _$1.ui = function (cfg) {
|
|
|
6239
6265
|
}
|
|
6240
6266
|
|
|
6241
6267
|
var db = window._.db;
|
|
6242
|
-
var objectStore = db.transaction([
|
|
6268
|
+
var objectStore = db.transaction([store], "readwrite").objectStore(store);
|
|
6243
6269
|
|
|
6244
6270
|
if (!o.id) {
|
|
6245
6271
|
o.id = -new Date();
|
|
@@ -6247,7 +6273,7 @@ window.ui = _$1.ui = function (cfg) {
|
|
|
6247
6273
|
|
|
6248
6274
|
storedList.unshift(o);
|
|
6249
6275
|
objectStore.add(o);
|
|
6250
|
-
me.$emit('stored', o, storedList);
|
|
6276
|
+
me.$emit('stored', o, storedList, objectStore);
|
|
6251
6277
|
if (me.app && me.app.toast) me.app.toast('El rgistro fue grabado correctamente!');
|
|
6252
6278
|
me.close({
|
|
6253
6279
|
success: true,
|
|
@@ -6289,9 +6315,9 @@ window.ui = _$1.ui = function (cfg) {
|
|
|
6289
6315
|
var data = result.data;
|
|
6290
6316
|
|
|
6291
6317
|
if (o.tmpId) {
|
|
6292
|
-
var
|
|
6318
|
+
var store = me.$children[0].store;
|
|
6293
6319
|
|
|
6294
|
-
var objectStore = window._.db.transaction([
|
|
6320
|
+
var objectStore = window._.db.transaction([store], "readwrite").objectStore(store);
|
|
6295
6321
|
|
|
6296
6322
|
var item = objectStore.get(o.tmpId);
|
|
6297
6323
|
o.tmpSynchronized = 1;
|
|
@@ -6312,7 +6338,7 @@ window.ui = _$1.ui = function (cfg) {
|
|
|
6312
6338
|
};
|
|
6313
6339
|
}
|
|
6314
6340
|
|
|
6315
|
-
if (me.app && me.app.toast) me.app.toast('El
|
|
6341
|
+
if (me.app && me.app.toast) me.app.toast('El registro fue grabado correectamente!', function () {
|
|
6316
6342
|
me.close({
|
|
6317
6343
|
success: true,
|
|
6318
6344
|
data: data
|