isobit-ui 0.0.359 → 0.0.362

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.
Files changed (2) hide show
  1. package/dist/index.js +40 -14
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * isobit-ui v0.0.359
2
+ * isobit-ui v0.0.362
3
3
  * (c) Erik Alarcon Pinedo
4
4
  * Released under the MIT License.
5
5
  */
@@ -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'); //console.log(ph.dataset);
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") {
@@ -4927,6 +4927,7 @@ var resize = function resize() {
4927
4927
  }
4928
4928
 
4929
4929
  if (p) {
4930
+ alert(12);
4930
4931
  var pid = p.getAttribute("popup");
4931
4932
  if (!pid) p.setAttribute("popup", pid = _$1.id());
4932
4933
  var popup = _$1.storeFunction[pid];
@@ -5469,21 +5470,47 @@ Vue__default['default'].filter('number', function (s
5469
5470
  Vue__default['default'].filter('date', _$1.toDate = function (s, type) {
5470
5471
  //s usa d|date('time')
5471
5472
  if (s) {
5472
- var pad = Vue__default['default'].pad;
5473
- var d = new Date(s);
5473
+ var pad = Vue__default['default'].pad,
5474
+ d;
5475
+
5476
+ if (s instanceof Date) {
5477
+ d = s;
5478
+ } else if (typeof s === 'string') {
5479
+ console.log(s);
5480
+ var t = s.split('T');
5481
+ d = t[0].split('-');
5482
+
5483
+ if (t.length > 1) {
5484
+ t = t[1].split(':');
5485
+ 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);
5486
+ } else if (d.length > 2) {
5487
+ d = new Date(parseInt(d[0]), parseInt(d[1]) - 1, parseInt(d[2]));
5488
+ } else {
5489
+ d = s.split(':');
5490
+
5491
+ if (d.length > 2) {
5492
+ d = new Date(1981, 0, 6, parseInt(d[0]), parseInt(d[1]), parseInt(d[2]));
5493
+ } else d = new Date(s);
5494
+ }
5495
+ } else {
5496
+ d = new Date(s);
5497
+ } //console.log(s);
5474
5498
 
5475
- if (type == 'time a') {
5476
- var h;
5477
5499
 
5500
+ if (type == 1) {
5501
+ s = d;
5502
+ } else if (type === 'time') {
5503
+ s = pad(d.getHours(), 2) + ":" + pad(d.getMinutes(), 2) + ':' + pad(d.setSeconds() ? d.setSeconds() : 0, 2);
5504
+ } else if (type == 'time a') {
5478
5505
  if (typeof s === 'string' || s instanceof String) {
5479
5506
  s = s.split(':');
5480
- h = s[0];
5507
+ var h = s[0];
5481
5508
  s = pad(h > 12 ? h - 12 : h, 2) + ':' + s[1] + ':' + s[2] + ' ' + (h > 12 ? 'PM' : 'AM');
5482
5509
  } else {
5483
5510
  h = d.getHours();
5484
5511
  s = pad(h > 12 ? h - 12 : h, 2) + ":" + pad(d.getMinutes(), 2) + (d.setSeconds() ? ":" + pad(d.setSeconds(), 2) : '') + ' ' + (h > 12 ? 'PM' : 'AM');
5485
5512
  }
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);
5513
+ } 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
5514
  }
5488
5515
 
5489
5516
  return s;
@@ -6191,7 +6218,6 @@ window.ui = _$1.ui = function (cfg) {
6191
6218
  save: function save() {
6192
6219
  try {
6193
6220
  var _exit2 = false;
6194
- var store;
6195
6221
 
6196
6222
  var _this4 = this;
6197
6223
 
@@ -6225,7 +6251,7 @@ window.ui = _$1.ui = function (cfg) {
6225
6251
  if (!(_typeof(o) === 'object' && !Array.isArray(o) && o !== null)) return;
6226
6252
  return _invoke(function () {
6227
6253
  if (!action || !_this4.app.networkStatus.connected) {
6228
- store = me.$children[0].store;
6254
+ var store = me.$children[0].store;
6229
6255
  return _await(me.getStoredList(store), function (storedList) {
6230
6256
  if (!storedList) storedList = [];
6231
6257
 
@@ -6248,7 +6274,7 @@ window.ui = _$1.ui = function (cfg) {
6248
6274
 
6249
6275
  storedList.unshift(o);
6250
6276
  objectStore.add(o);
6251
- me.$emit('stored', o, storedList);
6277
+ me.$emit('stored', o, storedList, objectStore);
6252
6278
  if (me.app && me.app.toast) me.app.toast('El rgistro fue grabado correctamente!');
6253
6279
  me.close({
6254
6280
  success: true,
@@ -6290,7 +6316,7 @@ window.ui = _$1.ui = function (cfg) {
6290
6316
  var data = result.data;
6291
6317
 
6292
6318
  if (o.tmpId) {
6293
- var storage = me.$children[0].storage;
6319
+ var store = me.$children[0].store;
6294
6320
 
6295
6321
  var objectStore = window._.db.transaction([store], "readwrite").objectStore(store);
6296
6322
 
@@ -6313,7 +6339,7 @@ window.ui = _$1.ui = function (cfg) {
6313
6339
  };
6314
6340
  }
6315
6341
 
6316
- if (me.app && me.app.toast) me.app.toast('El rgistro fue grabado correectamente!', function () {
6342
+ if (me.app && me.app.toast) me.app.toast('El registro fue grabado correectamente!', function () {
6317
6343
  me.close({
6318
6344
  success: true,
6319
6345
  data: data
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isobit-ui",
3
- "version": "0.0.359",
3
+ "version": "0.0.362",
4
4
  "description": "Vue component to play videos",
5
5
  "keywords": [
6
6
  "ui",