backend-plus 2.7.0-beta.8 → 2.7.0

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.
@@ -24,7 +24,7 @@
24
24
  var myAjax = {};
25
25
  /*jshint +W004 */
26
26
 
27
- /**
27
+ /**
28
28
  * @param {any} x
29
29
  * @returns {any}
30
30
  */
@@ -35,7 +35,7 @@ function requireIfExists(moduleName){
35
35
  return {}
36
36
  }
37
37
  try{
38
- // eslint-disable-next-line
38
+ // eslint-disable-next-line
39
39
  return require(moduleName);
40
40
  }catch(err){
41
41
  return {};
@@ -418,8 +418,8 @@ myAjax.ajaxPromise = function ajaxPromise(procedureDef,data,opts){
418
418
 
419
419
  myAjax.encoders = {
420
420
  JSON: { parse: JSON.parse, stringify: JSON.stringify },
421
- plain: {
422
- parse: function(x){return x;},
421
+ plain: {
422
+ parse: function(x){return x;},
423
423
  stringify: function(x){
424
424
  if(typeof x === "object" /* && !(x instanceof FileList)*/){
425
425
  throw new Error("Invalid plain type "+(x==null?value:typeof x)+" detected");
@@ -497,10 +497,10 @@ myAjax.path={
497
497
  }
498
498
 
499
499
  /**
500
- *
501
- * @param {HTMLElement} div
502
- * @param {any} o
503
- * @param {string} a
500
+ *
501
+ * @param {HTMLElement} div
502
+ * @param {any} o
503
+ * @param {string} a
504
504
  */
505
505
  function agregar_json_default_ubicaciones(div, o, a){
506
506
  //@ts-ignore
@@ -526,7 +526,7 @@ function agregar_json_default_ubicaciones(div, o, a){
526
526
  }
527
527
 
528
528
  /**
529
- *
529
+ *
530
530
  * @param {HTMLTableDataElement} td
531
531
  * @param {string|number} text
532
532
  * @param {string} className
@@ -545,25 +545,25 @@ function containsObjectsWithTheSameColumns(o){
545
545
  if (!keys.length) return false;
546
546
  var separator = Math.random();
547
547
  var colNamesFirstObject = Object.keys(o[keys[0]]).join(separator);
548
- return !keys.find(k =>
548
+ return !keys.find(k =>
549
549
  o[k] == null || !(o[k] instanceof Object) || Object.keys(o[k]).join(separator) != colNamesFirstObject
550
550
  );
551
551
  }
552
552
  /* test
553
553
  var cases = [
554
554
  [false, {}],
555
- [false, {a:"hola"}],
556
- [false, {a:{a:1, b:2, c:2}, b:{a:1, x:2, c:2}}],
555
+ [false, {a:"hola"}],
556
+ [false, {a:{a:1, b:2, c:2}, b:{a:1, x:2, c:2}}],
557
557
  [true , {a:{a:1, b:2, c:2}, b:{a:1, b:2, c:2}}]
558
558
  ];
559
559
  cases.forEach(([expected, param]) => console.log(param, containsObjectsWithTheSameColumns(param), containsObjectsWithTheSameColumns(param) == expected ? 'ok' : 'fail'))
560
560
  */
561
561
 
562
562
  /**
563
- *
564
- * @param {HTMLElement} div
565
- * @param {any} o
566
- * @param {(div:HTMLElement, o:any, a:string)=>{title:HTMLElement|null, data:HTMLElement, skip:boolean|null}=(div,o,a)} ubicaciones
563
+ *
564
+ * @param {HTMLElement} div
565
+ * @param {any} o
566
+ * @param {(div:HTMLElement, o:any, a:string)=>{title:HTMLElement|null, data:HTMLElement, skip:boolean|null}=(div,o,a)} ubicaciones
567
567
  */
568
568
  function agregar_json(div, o, ubicaciones=agregar_json_default_ubicaciones){
569
569
  if(o == null){
@@ -581,7 +581,7 @@ function agregar_json(div, o, ubicaciones=agregar_json_default_ubicaciones){
581
581
  if(o[a]!=null){
582
582
  var row = table.insertRow(-1);
583
583
  var cellName = row.insertCell(-1);
584
- agregar_class_textInDiv(cellName, 'row-num', Array.isArray(o) && !isNaN(a) ? Number(a)+1 : a);
584
+ agregar_class_textInDiv(cellName, 'row-num', Array.isArray(o) && !isNaN(a) ? Number(a)+1 : a);
585
585
  agregar_json(row, o[a], function(div, _o, a){
586
586
  // @ts-ignore sé que es Row
587
587
  /** @type {HTMLTableRowElement} */
@@ -609,9 +609,9 @@ function agregar_json(div, o, ubicaciones=agregar_json_default_ubicaciones){
609
609
  if(!cells.skip){
610
610
  if(cells.title){
611
611
  if(o instanceof Array && !isNaN(a)){
612
- agregar_class_textInDiv(cells.title, 'row-num', Number(a) + 1);
612
+ agregar_class_textInDiv(cells.title, 'row-num', Number(a) + 1);
613
613
  }else{
614
- agregar_class_textInDiv(cells.title, 'attr-name', a);
614
+ agregar_class_textInDiv(cells.title, 'attr-name', a);
615
615
  }
616
616
  }
617
617
  agregar_json(cells.data, o[a]);
@@ -728,7 +728,7 @@ myAjax.menuSeparator = '#';
728
728
  Object.defineProperty(myAjax, 'menup', {
729
729
  get:function(){
730
730
  var menuName = my.offline.mode?'ext':this.menuName;
731
- return menuName+this.menuSeparator;
731
+ return menuName+this.menuSeparator;
732
732
  }
733
733
  });
734
734
 
@@ -33,4 +33,4 @@ myOwn.ready = new Promise(function(result, reject){
33
33
  })
34
34
  })
35
35
 
36
- var myStart = true;
36
+ var myStart = true;