backend-plus 2.0.0-rc.14 → 2.0.0-rc.15
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/for-client/css/my-menu.styl +4 -0
- package/lib/backend-plus.d.ts +3 -0
- package/lib/backend-plus.js +10 -1
- package/package.json +5 -5
- package/unlogged/my-ajax.js +26 -13
package/lib/backend-plus.d.ts
CHANGED
package/lib/backend-plus.js
CHANGED
|
@@ -461,7 +461,13 @@ AppBackend.prototype.setStaticConfig = function setStaticConfig(defConfigYamlStr
|
|
|
461
461
|
}
|
|
462
462
|
|
|
463
463
|
AppBackend.prototype.configList = function configList(){
|
|
464
|
-
var list=[
|
|
464
|
+
var list=[
|
|
465
|
+
{
|
|
466
|
+
package:{
|
|
467
|
+
version: packagejson.version
|
|
468
|
+
}
|
|
469
|
+
},
|
|
470
|
+
this.staticConfig];
|
|
465
471
|
if(!this.staticConfig["client-setup"]?.title && fs.existsSync(this.rootPath+'/def-config.yaml')){
|
|
466
472
|
console.log('DEPRECATED!!!!!!')
|
|
467
473
|
console.error('ERROR el def-config hay que ponerlo dentro de staticConfig');
|
|
@@ -1929,6 +1935,9 @@ AppBackend.prototype.addUnloggedServices = function addUnloggedServices(mainApp,
|
|
|
1929
1935
|
// http://localhost:3033/img/login-logo-icon.png
|
|
1930
1936
|
mainApp.get(Path.posix.join(baseUrl,'/img/login-logo-icon.png'), async function(req,res,next){
|
|
1931
1937
|
var buscar = [
|
|
1938
|
+
'unlogged/img/login-logo-icon.svg',
|
|
1939
|
+
'dist/unlogged/img/login-logo-icon.svg',
|
|
1940
|
+
'dist/client/unlogged/img/login-logo-icon.svg',
|
|
1932
1941
|
'unlogged/img/login-logo-icon.png',
|
|
1933
1942
|
'dist/unlogged/img/login-logo-icon.png',
|
|
1934
1943
|
'dist/client/unlogged/img/login-logo-icon.png',
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "backend-plus",
|
|
3
3
|
"description": "Backend for the anti Pareto rule",
|
|
4
|
-
"version": "2.0.0-rc.
|
|
4
|
+
"version": "2.0.0-rc.15",
|
|
5
5
|
"author": "Codenautas <codenautas@googlegroups.com>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": "codenautas/backend-plus",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"js-yaml": "^4.1.0",
|
|
50
50
|
"json4all": "^1.3.0-beta.1",
|
|
51
51
|
"lazy-some": "^0.1.0",
|
|
52
|
-
"like-ar": "^0.4.
|
|
52
|
+
"like-ar": "^0.4.1",
|
|
53
53
|
"login-plus": "^1.7.1",
|
|
54
54
|
"memorystore": "^1.6.7",
|
|
55
55
|
"mini-tools": "^1.12.1",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"@types/js-yaml": "^4.0.9",
|
|
83
83
|
"@types/mocha": "^10.0.6",
|
|
84
84
|
"@types/multiparty": "~0.0.36",
|
|
85
|
-
"@types/node": "^20.12.
|
|
85
|
+
"@types/node": "^20.12.12",
|
|
86
86
|
"@types/nodemailer": "^6.4.15",
|
|
87
87
|
"@types/numeral": "~2.0.5",
|
|
88
88
|
"@types/session-file-store": "^1.2.5",
|
|
@@ -99,8 +99,8 @@
|
|
|
99
99
|
"kill-9": "~0.4.3",
|
|
100
100
|
"mocha": "^10.4.0",
|
|
101
101
|
"nyc": "^15.1.0",
|
|
102
|
-
"puppeteer": "^22.
|
|
103
|
-
"sinon": "^
|
|
102
|
+
"puppeteer": "^22.9.0",
|
|
103
|
+
"sinon": "^18.0.0",
|
|
104
104
|
"supertest": "^7.0.0",
|
|
105
105
|
"types.d.ts": "~0.6.21",
|
|
106
106
|
"typescript": "^5.4.5",
|
package/unlogged/my-ajax.js
CHANGED
|
@@ -495,13 +495,27 @@ function agregar_json_default_ubicaciones(div, o, a){
|
|
|
495
495
|
var table = div2.laTabla;
|
|
496
496
|
var row = table.insertRow(-1);
|
|
497
497
|
var cellName = row.insertCell(-1);
|
|
498
|
-
cellName
|
|
499
|
-
cellName.textContent = a;
|
|
498
|
+
agregar_class_textInDiv(cellName, 'attr-name', a)
|
|
500
499
|
var cell = row.insertCell(-1);
|
|
501
500
|
cell.colSpan=99;
|
|
502
501
|
return {title:cellName, data:cell, skip:o[a] == null}
|
|
503
502
|
}
|
|
504
503
|
|
|
504
|
+
/**
|
|
505
|
+
*
|
|
506
|
+
* @param {HTMLTableDataElement} td
|
|
507
|
+
* @param {string|number} text
|
|
508
|
+
* @param {string} className
|
|
509
|
+
*/
|
|
510
|
+
function agregar_class_textInDiv(td, className, text){
|
|
511
|
+
var div = document.createElement('div');
|
|
512
|
+
td.className = className;
|
|
513
|
+
div.className = 'json-container';
|
|
514
|
+
div.textContent = text;
|
|
515
|
+
td.innerHTML = '';
|
|
516
|
+
td.appendChild(div);
|
|
517
|
+
}
|
|
518
|
+
|
|
505
519
|
/**
|
|
506
520
|
*
|
|
507
521
|
* @param {HTMLElement} div
|
|
@@ -524,9 +538,7 @@ function agregar_json(div, o, ubicaciones=agregar_json_default_ubicaciones){
|
|
|
524
538
|
if(o[a]!=null){
|
|
525
539
|
var row = table.insertRow(-1);
|
|
526
540
|
var cellName = row.insertCell(-1);
|
|
527
|
-
cellName
|
|
528
|
-
// @ts-ignore numero y texto
|
|
529
|
-
cellName.textContent = isNaN(a)?a:Number(a)+1;
|
|
541
|
+
agregar_class_textInDiv(cellName, 'row-num', isNaN(a)?a:Number(a)+1);
|
|
530
542
|
agregar_json(row, o[a], function(div, _o, a){
|
|
531
543
|
// @ts-ignore sé que es Row
|
|
532
544
|
/** @type {HTMLTableRowElement} */
|
|
@@ -554,11 +566,9 @@ function agregar_json(div, o, ubicaciones=agregar_json_default_ubicaciones){
|
|
|
554
566
|
if(!cells.skip){
|
|
555
567
|
if(cells.title){
|
|
556
568
|
if(o instanceof Array && !isNaN(a)){
|
|
557
|
-
cells.title
|
|
558
|
-
cells.title.textContent = Number(a) + 1;
|
|
569
|
+
agregar_class_textInDiv(cells.title, 'row-num', Number(a) + 1);
|
|
559
570
|
}else{
|
|
560
|
-
cells.title
|
|
561
|
-
cells.title.textContent = a;
|
|
571
|
+
agregar_class_textInDiv(cells.title, 'attr-name', a);
|
|
562
572
|
}
|
|
563
573
|
}
|
|
564
574
|
agregar_json(cells.data, o[a]);
|
|
@@ -566,13 +576,16 @@ function agregar_json(div, o, ubicaciones=agregar_json_default_ubicaciones){
|
|
|
566
576
|
}
|
|
567
577
|
}
|
|
568
578
|
}else{
|
|
569
|
-
|
|
579
|
+
var textContent;
|
|
570
580
|
if(typeof o == "boolean"){
|
|
571
|
-
|
|
581
|
+
textContent = o ? 'Sí' : 'No'
|
|
572
582
|
}else if(o && o instanceof Date && o.isRealDate){
|
|
573
|
-
|
|
583
|
+
textContent = o.toDmy();
|
|
574
584
|
}else{
|
|
575
|
-
|
|
585
|
+
textContent = o.toLocaleString();
|
|
586
|
+
}
|
|
587
|
+
if (textContent) {
|
|
588
|
+
agregar_class_textInDiv(div, 'plain-content', textContent)
|
|
576
589
|
}
|
|
577
590
|
}
|
|
578
591
|
}
|