dmencu 3.2.20 → 3.3.1
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/README.md +42 -42
- package/dist/client/client/client.js +3 -3
- package/dist/client/unlogged/abrir-formulario.js +1 -1
- package/dist/client/unlogged/bypass-formulario.d.ts +6 -42
- package/dist/client/unlogged/bypass-formulario.js +84 -219
- package/dist/client/unlogged/calculos-encuesta.d.ts +7 -0
- package/dist/client/unlogged/calculos-encuesta.js +213 -0
- package/dist/client/unlogged/helpers-casilleros.d.ts +14 -0
- package/dist/client/unlogged/helpers-casilleros.js +123 -0
- package/dist/client/unlogged/helpers-formulario.d.ts +16 -0
- package/dist/client/unlogged/helpers-formulario.js +88 -0
- package/dist/client/unlogged/redux-formulario.d.ts +1 -2
- package/dist/client/unlogged/redux-formulario.js +21 -31
- package/dist/client/unlogged/render-formulario.d.ts +2 -6
- package/dist/client/unlogged/render-formulario.js +29 -68
- package/dist/client/unlogged/render-formulario.tsx +29 -57
- package/dist/client/unlogged/render-general.js +1 -1
- package/dist/client/unlogged/render-general.tsx +1 -1
- package/dist/client/unlogged/tipos.d.ts +74 -40
- package/dist/client/unlogged/tipos.js +1 -1
- package/dist/server/app-dmencu.d.ts +1428 -0
- package/dist/server/app-dmencu.js +1054 -0
- package/dist/server/def-config.d.ts +1 -0
- package/dist/server/def-config.js +123 -0
- package/dist/server/procedures-dmencu.d.ts +43 -0
- package/dist/server/procedures-dmencu.js +2295 -0
- package/dist/server/server/app-dmencu.d.ts +42 -91
- package/dist/server/server/app-dmencu.js +114 -52
- package/dist/server/server/procedures-dmencu.d.ts +34 -2
- package/dist/server/server/procedures-dmencu.js +217 -78
- package/dist/server/server/setters-rea-no-rea.d.ts +13 -0
- package/dist/server/server/setters-rea-no-rea.js +35 -0
- package/dist/server/server/table-areas.js +4 -4
- package/dist/server/server/table-areas_asignacion_general.js +2 -1
- package/dist/server/server/table-control_campo.js +4 -4
- package/dist/server/server/table-no_rea.js +4 -2
- package/dist/server/server/table-no_rea_sup.js +7 -3
- package/dist/server/server/table-personal.js +1 -1
- package/dist/server/server/table-rea.js +9 -5
- package/dist/server/server/table-rea_sup.js +8 -4
- package/dist/server/server/table-tareas_tem.js +2 -2
- package/dist/server/server/table-tem.js +2 -2
- package/dist/server/server/types-dmencu.d.ts +34 -2
- package/dist/server/server/types-dmencu.js +2 -1
- package/dist/server/setters-rea-no-rea.d.ts +13 -0
- package/dist/server/setters-rea-no-rea.js +35 -0
- package/dist/server/table-acciones.d.ts +2 -0
- package/dist/server/table-acciones.js +45 -0
- package/dist/server/table-area_enc_proximas.d.ts +2 -0
- package/dist/server/table-area_enc_proximas.js +30 -0
- package/dist/server/table-areas.d.ts +4 -0
- package/dist/server/table-areas.js +112 -0
- package/dist/server/table-areas_asignacion_general.d.ts +2 -0
- package/dist/server/table-areas_asignacion_general.js +86 -0
- package/dist/server/table-barrios.d.ts +2 -0
- package/dist/server/table-barrios.js +35 -0
- package/dist/server/table-comunas.d.ts +2 -0
- package/dist/server/table-comunas.js +33 -0
- package/dist/server/table-control_campo.d.ts +12 -0
- package/dist/server/table-control_campo.js +119 -0
- package/dist/server/table-control_dias_carga.d.ts +2 -0
- package/dist/server/table-control_dias_carga.js +63 -0
- package/dist/server/table-control_resumen.d.ts +2 -0
- package/dist/server/table-control_resumen.js +19 -0
- package/dist/server/table-diccionario.d.ts +2 -0
- package/dist/server/table-diccionario.js +32 -0
- package/dist/server/table-dictra.d.ts +2 -0
- package/dist/server/table-dictra.js +46 -0
- package/dist/server/table-dicvar.d.ts +2 -0
- package/dist/server/table-dicvar.js +32 -0
- package/dist/server/table-encuestadores.d.ts +13 -0
- package/dist/server/table-encuestadores.js +75 -0
- package/dist/server/table-estados.d.ts +2 -0
- package/dist/server/table-estados.js +47 -0
- package/dist/server/table-estados_acciones.d.ts +2 -0
- package/dist/server/table-estados_acciones.js +40 -0
- package/dist/server/table-fracciones.d.ts +2 -0
- package/dist/server/table-fracciones.js +37 -0
- package/dist/server/table-grilla_hoja_ruta.d.ts +2 -0
- package/dist/server/table-grilla_hoja_ruta.js +93 -0
- package/dist/server/table-historial_tem.d.ts +2 -0
- package/dist/server/table-historial_tem.js +57 -0
- package/dist/server/table-hogares.d.ts +2 -0
- package/dist/server/table-hogares.js +156 -0
- package/dist/server/table-hogares_sup.d.ts +2 -0
- package/dist/server/table-hogares_sup.js +191 -0
- package/dist/server/table-inconsistencias_cumplen_condicion.d.ts +2 -0
- package/dist/server/table-inconsistencias_cumplen_condicion.js +33 -0
- package/dist/server/table-manzanas.d.ts +2 -0
- package/dist/server/table-manzanas.js +36 -0
- package/dist/server/table-mis_encuestadores.d.ts +2 -0
- package/dist/server/table-mis_encuestadores.js +77 -0
- package/dist/server/table-mis_tareas.d.ts +2 -0
- package/dist/server/table-mis_tareas.js +18 -0
- package/dist/server/table-mis_tareas_areas.d.ts +2 -0
- package/dist/server/table-mis_tareas_areas.js +20 -0
- package/dist/server/table-modos_dm.d.ts +2 -0
- package/dist/server/table-modos_dm.js +28 -0
- package/dist/server/table-no_rea.js +38 -0
- package/dist/server/table-no_rea_sup.js +36 -0
- package/dist/server/table-operaciones.d.ts +2 -0
- package/dist/server/table-operaciones.js +30 -0
- package/dist/server/table-parametros.d.ts +2 -0
- package/dist/server/table-parametros.js +40 -0
- package/dist/server/table-permisos.d.ts +2 -0
- package/dist/server/table-permisos.js +31 -0
- package/dist/server/table-personal.d.ts +5 -0
- package/dist/server/table-personal.js +62 -0
- package/dist/server/table-personal_rol.d.ts +2 -0
- package/dist/server/table-personal_rol.js +42 -0
- package/dist/server/table-personas.d.ts +2 -0
- package/dist/server/table-personas.js +448 -0
- package/dist/server/table-personas_sup.d.ts +2 -0
- package/dist/server/table-personas_sup.js +93 -0
- package/dist/server/table-radios.d.ts +2 -0
- package/dist/server/table-radios.js +37 -0
- package/dist/server/table-rea.d.ts +2 -0
- package/dist/server/table-rea.js +38 -0
- package/dist/server/table-rea_sup.d.ts +2 -0
- package/dist/server/table-rea_sup.js +38 -0
- package/dist/server/table-recepcionistas.d.ts +2 -0
- package/dist/server/table-recepcionistas.js +18 -0
- package/dist/server/table-recuperadores.d.ts +2 -0
- package/dist/server/table-recuperadores.js +18 -0
- package/dist/server/table-roles.d.ts +2 -0
- package/dist/server/table-roles.js +33 -0
- package/dist/server/table-roles_permisos.d.ts +2 -0
- package/dist/server/table-roles_permisos.js +36 -0
- package/dist/server/table-roles_subordinados.d.ts +2 -0
- package/dist/server/table-roles_subordinados.js +31 -0
- package/dist/server/table-semanas.d.ts +2 -0
- package/dist/server/table-semanas.js +42 -0
- package/dist/server/table-sincronizaciones.d.ts +2 -0
- package/dist/server/table-sincronizaciones.js +30 -0
- package/dist/server/table-supervisores.d.ts +2 -0
- package/dist/server/table-supervisores.js +18 -0
- package/dist/server/table-tareas.d.ts +2 -0
- package/dist/server/table-tareas.js +48 -0
- package/dist/server/table-tareas_areas.d.ts +7 -0
- package/dist/server/table-tareas_areas.js +112 -0
- package/dist/server/table-tareas_proximas.d.ts +2 -0
- package/dist/server/table-tareas_proximas.js +48 -0
- package/dist/server/table-tareas_tem.d.ts +14 -0
- package/dist/server/table-tareas_tem.js +206 -0
- package/dist/server/table-tareas_tem_analisis_campo.d.ts +2 -0
- package/dist/server/table-tareas_tem_analisis_campo.js +31 -0
- package/dist/server/table-tareas_tem_fin_campo.d.ts +3 -0
- package/dist/server/table-tareas_tem_fin_campo.js +56 -0
- package/dist/server/table-tareas_tem_ingreso.d.ts +2 -0
- package/dist/server/table-tareas_tem_ingreso.js +31 -0
- package/dist/server/table-tareas_tem_procesamiento.d.ts +2 -0
- package/dist/server/table-tareas_tem_procesamiento.js +34 -0
- package/dist/server/table-tareas_tem_recepcion.d.ts +6 -0
- package/dist/server/table-tareas_tem_recepcion.js +59 -0
- package/dist/server/table-tem.d.ts +3 -0
- package/dist/server/table-tem.js +247 -0
- package/dist/server/table-tem_asignacion.d.ts +2 -0
- package/dist/server/table-tem_asignacion.js +50 -0
- package/dist/server/table-tem_borradas.d.ts +2 -0
- package/dist/server/table-tem_borradas.js +35 -0
- package/dist/server/table-usuarios.d.ts +2 -0
- package/dist/server/table-usuarios.js +63 -0
- package/dist/server/table-visitas.d.ts +2 -0
- package/dist/server/table-visitas.js +91 -0
- package/dist/server/table-visitas_sup.d.ts +2 -0
- package/dist/server/table-visitas_sup.js +91 -0
- package/dist/server/table-viviendas.d.ts +2 -0
- package/dist/server/table-viviendas.js +299 -0
- package/dist/server/types-dmencu.d.ts +95 -0
- package/dist/server/types-dmencu.js +34 -0
- package/dist/server/unlogged/tipos.d.ts +74 -40
- package/dist/server/unlogged/tipos.js +1 -1
- package/dist/test/app-para-tests.d.ts +1115 -0
- package/dist/test/app-para-tests.js +95 -0
- package/dist/test/test-caches-rea.d.ts +1 -0
- package/dist/test/test-caches-rea.js +243 -0
- package/dist/test/test-ejemplo.d.ts +1 -0
- package/dist/test/test-ejemplo.js +29 -0
- package/dist/test/test-helpers-casilleros.d.ts +1 -0
- package/dist/test/test-helpers-casilleros.js +154 -0
- package/dist/test/test-helpers-formulario.d.ts +1 -0
- package/dist/test/test-helpers-formulario.js +95 -0
- package/dist/test/test-impacto-rea-no-rea-en-bd.d.ts +1 -0
- package/dist/test/test-impacto-rea-no-rea-en-bd.js +243 -0
- package/dist/test/test-menu-segun-rol.d.ts +1 -0
- package/dist/test/test-menu-segun-rol.js +170 -0
- package/dist/test/test-rea-no-rea.d.ts +1 -0
- package/dist/test/test-rea-no-rea.js +589 -0
- package/dist/test/test-setters-rea-no-rea.d.ts +1 -0
- package/dist/test/test-setters-rea-no-rea.js +95 -0
- package/dist/test/test.d.ts +8 -0
- package/dist/test/test.js +21 -0
- package/dist/unlogged/calculos-encuesta.d.ts +7 -0
- package/dist/unlogged/calculos-encuesta.js +213 -0
- package/dist/unlogged/helpers-casilleros.d.ts +14 -0
- package/dist/unlogged/helpers-casilleros.js +123 -0
- package/dist/unlogged/helpers-formulario.d.ts +16 -0
- package/dist/unlogged/helpers-formulario.js +88 -0
- package/dist/unlogged/tipos.d.ts +575 -0
- package/dist/unlogged/tipos.js +21 -0
- package/dist/unlogged/unlogged/abrir-formulario.js +1 -1
- package/dist/unlogged/unlogged/bypass-formulario.d.ts +6 -42
- package/dist/unlogged/unlogged/bypass-formulario.js +84 -219
- package/dist/unlogged/unlogged/calculos-encuesta.d.ts +7 -0
- package/dist/unlogged/unlogged/calculos-encuesta.js +213 -0
- package/dist/unlogged/unlogged/helpers-casilleros.d.ts +14 -0
- package/dist/unlogged/unlogged/helpers-casilleros.js +123 -0
- package/dist/unlogged/unlogged/helpers-formulario.d.ts +16 -0
- package/dist/unlogged/unlogged/helpers-formulario.js +88 -0
- package/dist/unlogged/unlogged/redux-formulario.d.ts +1 -2
- package/dist/unlogged/unlogged/redux-formulario.js +21 -31
- package/dist/unlogged/unlogged/render-formulario.d.ts +2 -6
- package/dist/unlogged/unlogged/render-formulario.js +29 -68
- package/dist/unlogged/unlogged/render-formulario.tsx +29 -57
- package/dist/unlogged/unlogged/render-general.js +1 -1
- package/dist/unlogged/unlogged/render-general.tsx +1 -1
- package/dist/unlogged/unlogged/tipos.d.ts +74 -40
- package/dist/unlogged/unlogged/tipos.js +1 -1
- package/dist/unlogged/unlogged/unlogged.js +2 -2
- package/install/accion_cumple_condicion.sql +1 -1
- package/install/generador_accion_cumple_condicion.sql +2 -2
- package/install/tarea_cumple_condicion.sql +1 -1
- package/install/xcalcular_resultado_trg.sql +1 -1
- package/package.json +20 -17
- package/dist/server/server/table-no_rea copy.js +0 -38
- package/dist/server/server/table-no_rea_sup copy.js +0 -36
- /package/dist/server/{server/table-no_rea copy.d.ts → table-no_rea.d.ts} +0 -0
- /package/dist/server/{server/table-no_rea_sup copy.d.ts → table-no_rea_sup.d.ts} +0 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
// Funciones puras del formulario, sin dependencias de React, Redux ni del navegador
|
|
2
|
+
// (para poder testearlas en node)
|
|
3
|
+
(function (factory) {
|
|
4
|
+
if (typeof module === "object" && typeof module.exports === "object") {
|
|
5
|
+
var v = factory(require, exports);
|
|
6
|
+
if (v !== undefined) module.exports = v;
|
|
7
|
+
}
|
|
8
|
+
else if (typeof define === "function" && define.amd) {
|
|
9
|
+
define(["require", "exports"], factory);
|
|
10
|
+
}
|
|
11
|
+
})(function (require, exports) {
|
|
12
|
+
"use strict";
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.IS_COMODIN_REDUX_PATTERN = exports.IS_VARIABLE_HASH_PATTERN = exports.IS_TEM_PATTERN = exports.REGEX_SPLIT_COMODINES = void 0;
|
|
15
|
+
exports.extraerComodinesRedux = extraerComodinesRedux;
|
|
16
|
+
exports.extraerVariablesInteres = extraerVariablesInteres;
|
|
17
|
+
exports.getBFVarNames = getBFVarNames;
|
|
18
|
+
exports.replaceSpecialWords = replaceSpecialWords;
|
|
19
|
+
exports.numberOrStringIncIfArray = numberOrStringIncIfArray;
|
|
20
|
+
// RegEx principal para dividir el texto conservando los tokens delimitados por @...@
|
|
21
|
+
exports.REGEX_SPLIT_COMODINES = /(@(?:#?[\w-]+|\$[tT][eE][mM][^@]*)@)/g;
|
|
22
|
+
// Sub-RegExs para identificar el tipo de comodín
|
|
23
|
+
exports.IS_TEM_PATTERN = /^@\$(tem[^@]*)@$/i;
|
|
24
|
+
exports.IS_VARIABLE_HASH_PATTERN = /^@#([\w-]+)@$/;
|
|
25
|
+
exports.IS_COMODIN_REDUX_PATTERN = /^@([\w-]+)@$/;
|
|
26
|
+
/** Extrae nombres de comodines estándar (@comodin@) */
|
|
27
|
+
function extraerComodinesRedux(text) {
|
|
28
|
+
if (!text || !text.includes('@'))
|
|
29
|
+
return [];
|
|
30
|
+
const matches = text.match(/@([a-zA-Z0-9_-]+)@/g);
|
|
31
|
+
if (!matches)
|
|
32
|
+
return [];
|
|
33
|
+
const ids = [];
|
|
34
|
+
for (const m of matches) {
|
|
35
|
+
if (!m.startsWith('@#') && !m.startsWith('@$')) {
|
|
36
|
+
const id = m.slice(1, -1);
|
|
37
|
+
if (!ids.includes(id))
|
|
38
|
+
ids.push(id);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return ids;
|
|
42
|
+
}
|
|
43
|
+
/** Extrae nombres de variables dinámicas (@#variable@) */
|
|
44
|
+
function extraerVariablesInteres(text) {
|
|
45
|
+
if (!text)
|
|
46
|
+
return [];
|
|
47
|
+
const matches = text.match(/@#([\w-]+)@/g);
|
|
48
|
+
if (!matches)
|
|
49
|
+
return [];
|
|
50
|
+
const vars = [];
|
|
51
|
+
for (const m of matches) {
|
|
52
|
+
const varName = m.slice(2, -1); // Remueve '@#' y '@'
|
|
53
|
+
if (!vars.includes(varName))
|
|
54
|
+
vars.push(varName);
|
|
55
|
+
}
|
|
56
|
+
return vars;
|
|
57
|
+
}
|
|
58
|
+
function getBFVarNames(salto) {
|
|
59
|
+
const armoNomSalto = (salto === null || salto === void 0 ? void 0 : salto.substring(0, 2)) == 'F:' ? salto.slice(2) : salto;
|
|
60
|
+
return {
|
|
61
|
+
listo: '$B.F:' + armoNomSalto,
|
|
62
|
+
agregar: '$B.F:' + armoNomSalto + '_agregar',
|
|
63
|
+
idFormulario: 'F:' + armoNomSalto
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
function replaceSpecialWords(text, nombre, apellido, resultado) {
|
|
67
|
+
function capitalizeFirstLetter(text) {
|
|
68
|
+
return text.charAt(0).toUpperCase() + text.slice(1);
|
|
69
|
+
}
|
|
70
|
+
var simplificatedChars = {
|
|
71
|
+
"#nombre": capitalizeFirstLetter(nombre),
|
|
72
|
+
"#apellido": capitalizeFirstLetter(apellido),
|
|
73
|
+
"#resultado": resultado,
|
|
74
|
+
};
|
|
75
|
+
var re = new RegExp(Object.keys(simplificatedChars).join("|"), "gi");
|
|
76
|
+
return text.replace(re, function (matched) {
|
|
77
|
+
return simplificatedChars[matched.toLowerCase()];
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
function numberOrStringIncIfArray(numberOrString, object) {
|
|
81
|
+
// @ts-expect-error estoy usando isNaN para ver si es o no un número sumable
|
|
82
|
+
if (isNaN(numberOrString)) {
|
|
83
|
+
return numberOrString;
|
|
84
|
+
}
|
|
85
|
+
return Number(numberOrString) + (object instanceof Array ? 1 : 0);
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGVscGVycy1mb3JtdWxhcmlvLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3VubG9nZ2VkL2hlbHBlcnMtZm9ybXVsYXJpby50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxvRkFBb0Y7QUFDcEYsa0NBQWtDOzs7Ozs7Ozs7Ozs7O0lBYWxDLHNEQWFDO0lBR0QsMERBV0M7SUFFRCxzQ0FPQztJQUVELGtEQWNDO0lBRUQsNERBTUM7SUFyRUQscUZBQXFGO0lBQ3hFLFFBQUEscUJBQXFCLEdBQUcsdUNBQXVDLENBQUM7SUFFN0UsaURBQWlEO0lBQ3BDLFFBQUEsY0FBYyxHQUFHLG1CQUFtQixDQUFDO0lBQ3JDLFFBQUEsd0JBQXdCLEdBQUcsZUFBZSxDQUFDO0lBQzNDLFFBQUEsd0JBQXdCLEdBQUcsY0FBYyxDQUFDO0lBRXZELHVEQUF1RDtJQUN2RCxTQUFnQixxQkFBcUIsQ0FBQyxJQUFZO1FBQzlDLElBQUksQ0FBQyxJQUFJLElBQUksQ0FBQyxJQUFJLENBQUMsUUFBUSxDQUFDLEdBQUcsQ0FBQztZQUFFLE9BQU8sRUFBRSxDQUFDO1FBQzVDLE1BQU0sT0FBTyxHQUFHLElBQUksQ0FBQyxLQUFLLENBQUMscUJBQXFCLENBQUMsQ0FBQztRQUNsRCxJQUFJLENBQUMsT0FBTztZQUFFLE9BQU8sRUFBRSxDQUFDO1FBRXhCLE1BQU0sR0FB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gICByZXR1cm4gTnVtYmVyKG51bWJlck9yU3RyaW5nKSArIChvYmplY3QgaW5zdGFuY2VvZiBBcnJheSA/IDEgOiAwKTtcbn1cbiJdfQ==
|
|
@@ -0,0 +1,575 @@
|
|
|
1
|
+
import { Structure, Feedback } from "row-validator";
|
|
2
|
+
export type ModoAlmacenamiento = 'session' | // cuando sea para una sola pestaña, se usa en modo directo,
|
|
3
|
+
'local';
|
|
4
|
+
export type IdOpcion = number;
|
|
5
|
+
export type IdOperativo = 'etoi211' | 'eah2022' | 'etc...';
|
|
6
|
+
export type IdVariable = 'v1' | 'v2' | 'v3' | 'etc...' | 'vdominio' | '$p0';
|
|
7
|
+
export type IdPregunta = 'P1' | 'P2' | 'etc...';
|
|
8
|
+
export type IdBloque = 'B1' | 'B2' | 'etc...';
|
|
9
|
+
export type IdFormulario = 'F1' | 'F2' | 'etc...';
|
|
10
|
+
export type IdUnidadAnalisis = 'viviendas' | 'hogares' | 'personas';
|
|
11
|
+
export type IdBotonFormulario = 'BF:F1' | 'BF:F2' | 'etc...';
|
|
12
|
+
export type IdConsistencia = 'CONS1' | 'CONS2' | 'etc...';
|
|
13
|
+
export type IdTexto = 'D30_REF' | 'MES_REF' | 'SEM_REF' | 'etc...';
|
|
14
|
+
export type IdComodin = 'D30_REF' | 'MES_REF' | 'SEM_REF' | 'SEM_NUM' | 'resps1' | 'parents1' | 'respi1' | 'parenti1' | 'njefe' | 'frealiz' | 'cant_hogares';
|
|
15
|
+
export type IdFiltro = 'FILTRO1' | 'FILTRO2' | 'etc...';
|
|
16
|
+
export type IdCasillero = IdVariable | IdPregunta | IdBloque | IdFormulario | IdFiltro | IdOpcion;
|
|
17
|
+
export type IdFin = 'fin';
|
|
18
|
+
export type IdDestino = IdPregunta | IdBloque | IdFin | IdFiltro;
|
|
19
|
+
export type Valor = string | number | null;
|
|
20
|
+
export type TipocDestinos = 'P' | 'CP' | 'B' | 'FILTRO' | 'BF';
|
|
21
|
+
export type Tipoc = TipocDestinos | 'F' | 'O' | 'OM' | 'CONS' | 'TEXTO' | 'LIBRE' | 'PMATRIZ';
|
|
22
|
+
export type Especial = {
|
|
23
|
+
gps?: boolean;
|
|
24
|
+
noScroll?: boolean;
|
|
25
|
+
scrollTo?: IdVariable | IdFin;
|
|
26
|
+
autoing?: string;
|
|
27
|
+
flexDirection?: 'row' | 'column' | 'row-reverse' | 'column-reverse';
|
|
28
|
+
camposResumen?: string[];
|
|
29
|
+
};
|
|
30
|
+
export type IdTarea = 'encu' | 'recu' | 'supe' | 'ingr';
|
|
31
|
+
export type FeedbackVariable = Feedback<IdVariable, IdFin>;
|
|
32
|
+
export type TipoVariables = 'texto' | 'numero' | 'fecha' | 'horas' | 'hora';
|
|
33
|
+
export type Despliegue = 'horizontal' | 'oculta';
|
|
34
|
+
export type CasilleroBase = {
|
|
35
|
+
id_casillero?: string;
|
|
36
|
+
tipoc: Tipoc;
|
|
37
|
+
casillero: IdCasillero;
|
|
38
|
+
nombre: string;
|
|
39
|
+
salto: IdDestino | IdFin | null;
|
|
40
|
+
salto_ns_nc?: IdDestino | IdFin | null;
|
|
41
|
+
ver_id: string | null;
|
|
42
|
+
despliegueEncabezado: 'lateral' | 'superior' | null;
|
|
43
|
+
despliegueContenido: 'vertical' | 'horizontal' | null;
|
|
44
|
+
despliegueTipoInput: 'tel' | null;
|
|
45
|
+
despliegueOculta: boolean | null;
|
|
46
|
+
leer: boolean | null;
|
|
47
|
+
aclaracion: string | null;
|
|
48
|
+
primera_variable?: IdVariable | null;
|
|
49
|
+
var_name?: IdVariable | null;
|
|
50
|
+
var_name_especial?: string | null;
|
|
51
|
+
tipovar?: TipoVariables | 'opciones' | 'si_no' | null;
|
|
52
|
+
casilleros?: CasillerosImplementados[] | null;
|
|
53
|
+
expresion_habilitar?: string;
|
|
54
|
+
expresion_habilitar_js?: string;
|
|
55
|
+
expresion_autoingresar?: string;
|
|
56
|
+
expresion_autoingresar_js?: string;
|
|
57
|
+
especial?: Especial;
|
|
58
|
+
calculada?: boolean | null;
|
|
59
|
+
optativo?: boolean | null;
|
|
60
|
+
libre?: boolean | null;
|
|
61
|
+
valor_ns_nc?: any;
|
|
62
|
+
despliegue?: string | null;
|
|
63
|
+
longitud?: string;
|
|
64
|
+
};
|
|
65
|
+
export type Opcion = CasilleroBase & {
|
|
66
|
+
tipoc: 'O';
|
|
67
|
+
casillero: IdOpcion;
|
|
68
|
+
casilleros: PreguntaSimple[];
|
|
69
|
+
var_name?: null;
|
|
70
|
+
tipovar?: null;
|
|
71
|
+
primera_variable?: null;
|
|
72
|
+
salto_ns_nc?: null;
|
|
73
|
+
};
|
|
74
|
+
export type OpcionSi = Opcion & {
|
|
75
|
+
casillero: 1;
|
|
76
|
+
nombre: 'Sí';
|
|
77
|
+
casilleros: PreguntaSimple[];
|
|
78
|
+
};
|
|
79
|
+
export type OpcionNo = Opcion & {
|
|
80
|
+
casillero: 2;
|
|
81
|
+
nombre: 'No';
|
|
82
|
+
casilleros: PreguntaSimple[];
|
|
83
|
+
};
|
|
84
|
+
export type OpcionMultiple = CasilleroBase & {
|
|
85
|
+
tipoc: 'OM';
|
|
86
|
+
tipovar: 'opciones';
|
|
87
|
+
var_name: IdVariable;
|
|
88
|
+
casilleros: [OpcionSi, OpcionNo];
|
|
89
|
+
calculada?: boolean;
|
|
90
|
+
libre?: boolean;
|
|
91
|
+
valor_ns_nc: any;
|
|
92
|
+
salto_ns_nc?: null;
|
|
93
|
+
};
|
|
94
|
+
export type PreguntaBase = CasilleroBase & {
|
|
95
|
+
tipoc: 'P';
|
|
96
|
+
optativo: boolean | null;
|
|
97
|
+
casillero: IdPregunta;
|
|
98
|
+
calculada: boolean | null;
|
|
99
|
+
libre: boolean | null;
|
|
100
|
+
valor_ns_nc: any;
|
|
101
|
+
};
|
|
102
|
+
export type PreguntaSimple = PreguntaBase & {
|
|
103
|
+
tipovar: TipoVariables;
|
|
104
|
+
var_name: IdVariable;
|
|
105
|
+
longitud: string;
|
|
106
|
+
salto_ns_nc: IdDestino | IdFin | null;
|
|
107
|
+
casilleros: PreguntaSimple[];
|
|
108
|
+
};
|
|
109
|
+
export type PreguntaConSiNo = PreguntaBase & {
|
|
110
|
+
tipovar: 'si_no';
|
|
111
|
+
var_name: IdVariable;
|
|
112
|
+
salto_ns_nc: IdDestino | IdFin | null;
|
|
113
|
+
casilleros: [OpcionSi, OpcionNo];
|
|
114
|
+
};
|
|
115
|
+
export type PreguntaConOpciones = PreguntaBase & {
|
|
116
|
+
tipovar: 'opciones';
|
|
117
|
+
var_name: IdVariable;
|
|
118
|
+
salto_ns_nc: IdDestino | IdFin | null;
|
|
119
|
+
casilleros: Opcion[];
|
|
120
|
+
};
|
|
121
|
+
export type PreguntaConOpcionesMultiples = PreguntaBase & {
|
|
122
|
+
var_name?: null;
|
|
123
|
+
tipovar?: null;
|
|
124
|
+
casilleros: OpcionMultiple[];
|
|
125
|
+
salto_ns_nc?: null;
|
|
126
|
+
};
|
|
127
|
+
export type Pregunta = PreguntaSimple | PreguntaConSiNo | PreguntaConOpciones | PreguntaConOpcionesMultiples;
|
|
128
|
+
export type ConjuntoPreguntas = CasilleroBase & {
|
|
129
|
+
tipoc: 'CP';
|
|
130
|
+
casillero: IdPregunta;
|
|
131
|
+
var_name?: null;
|
|
132
|
+
tipovar?: null;
|
|
133
|
+
casilleros: Pregunta[];
|
|
134
|
+
salto_ns_nc?: null;
|
|
135
|
+
};
|
|
136
|
+
export type Filtro = CasilleroBase & {
|
|
137
|
+
tipoc: 'FILTRO';
|
|
138
|
+
casillero: IdFiltro;
|
|
139
|
+
var_name?: null;
|
|
140
|
+
tipovar?: null;
|
|
141
|
+
primera_variable?: null;
|
|
142
|
+
calculada?: null;
|
|
143
|
+
libre?: null;
|
|
144
|
+
salto_ns_nc?: null;
|
|
145
|
+
};
|
|
146
|
+
export type ContenidoFormulario = Bloque | Pregunta | ConjuntoPreguntas | Filtro | BotonFormulario | Consistencia | Texto;
|
|
147
|
+
export type Bloque = CasilleroBase & {
|
|
148
|
+
tipoc: 'B';
|
|
149
|
+
casillero: IdBloque;
|
|
150
|
+
casilleros: ContenidoFormulario[];
|
|
151
|
+
var_name?: null;
|
|
152
|
+
tipovar?: null;
|
|
153
|
+
unidad_analisis?: IdUnidadAnalisis;
|
|
154
|
+
salto_ns_nc?: null;
|
|
155
|
+
};
|
|
156
|
+
export type Consistencia = CasilleroBase & {
|
|
157
|
+
tipoc: 'CONS';
|
|
158
|
+
casillero: IdConsistencia;
|
|
159
|
+
var_name?: null;
|
|
160
|
+
tipovar?: null;
|
|
161
|
+
primera_variable?: null;
|
|
162
|
+
salto_ns_nc?: null;
|
|
163
|
+
};
|
|
164
|
+
export type Texto = CasilleroBase & {
|
|
165
|
+
tipoc: 'TEXTO';
|
|
166
|
+
casillero: IdTexto;
|
|
167
|
+
var_name?: null;
|
|
168
|
+
tipovar?: null;
|
|
169
|
+
primera_variable?: null;
|
|
170
|
+
salto_ns_nc?: null;
|
|
171
|
+
};
|
|
172
|
+
export type Libre = CasilleroBase & {
|
|
173
|
+
tipoc: 'LIBRE';
|
|
174
|
+
casillero: IdTexto;
|
|
175
|
+
var_name?: null;
|
|
176
|
+
tipovar?: null;
|
|
177
|
+
primera_variable?: null;
|
|
178
|
+
salto_ns_nc?: null;
|
|
179
|
+
};
|
|
180
|
+
export type BotonFormulario = CasilleroBase & {
|
|
181
|
+
tipoc: 'BF';
|
|
182
|
+
casillero: IdBotonFormulario;
|
|
183
|
+
var_name?: null;
|
|
184
|
+
tipovar?: null;
|
|
185
|
+
primera_variable?: IdVariable | null;
|
|
186
|
+
var_names_BF?: IdVariable[];
|
|
187
|
+
longitud?: string;
|
|
188
|
+
unidad_analisis?: IdUnidadAnalisis;
|
|
189
|
+
salto_ns_nc?: null;
|
|
190
|
+
};
|
|
191
|
+
export type Formulario = CasilleroBase & {
|
|
192
|
+
tipoc: 'F';
|
|
193
|
+
casillero: IdFormulario;
|
|
194
|
+
formulario_principal: boolean;
|
|
195
|
+
casilleros: ContenidoFormulario[];
|
|
196
|
+
var_name?: null;
|
|
197
|
+
tipovar?: null;
|
|
198
|
+
hermano?: true;
|
|
199
|
+
unidad_analisis: IdUnidadAnalisis;
|
|
200
|
+
salto_ns_nc?: null;
|
|
201
|
+
};
|
|
202
|
+
export type PMatriz = CasilleroBase & {
|
|
203
|
+
tipoc: 'PMATRIZ';
|
|
204
|
+
salto_ns_nc?: null;
|
|
205
|
+
};
|
|
206
|
+
export type CasillerosImplementados = Formulario | Bloque | Filtro | ConjuntoPreguntas | Pregunta | OpcionMultiple | Opcion | BotonFormulario | Consistencia | Texto | Libre | PMatriz;
|
|
207
|
+
export type CampoPkRaiz = 'vivienda' | 'etc...';
|
|
208
|
+
export type ValuePkRaiz = IdEnc;
|
|
209
|
+
export type ForPkRaiz = {
|
|
210
|
+
formulario: IdFormulario;
|
|
211
|
+
} & {
|
|
212
|
+
[campo in CampoPkRaiz]: ValuePkRaiz;
|
|
213
|
+
};
|
|
214
|
+
export type CampoPk = 'vivienda' | 'hogar' | 'persona' | 'etc...';
|
|
215
|
+
export type ForPk = ForPkRaiz & {
|
|
216
|
+
[campo in CampoPk]?: number;
|
|
217
|
+
};
|
|
218
|
+
export type PlainForPk = '{"formulario":"F:F1","vivienda":"10202","persona":null}' | 'etc...';
|
|
219
|
+
export type ObjetoNumeradoOArray<T> = T[] | {
|
|
220
|
+
[n in number]: T;
|
|
221
|
+
};
|
|
222
|
+
export type RespuestasUnaUA = {
|
|
223
|
+
[pregunta in IdVariable]: Valor;
|
|
224
|
+
};
|
|
225
|
+
export type RespuestaLasUA = {
|
|
226
|
+
[ua in IdUnidadAnalisis]: ObjetoNumeradoOArray<Respuestas>;
|
|
227
|
+
};
|
|
228
|
+
export type CodReaNoRea = {
|
|
229
|
+
codRea: number | null;
|
|
230
|
+
codNoRea: number | null;
|
|
231
|
+
codReaSup: number | null;
|
|
232
|
+
codNoReaSup: number | null;
|
|
233
|
+
};
|
|
234
|
+
export type ResultadoResumen = CodReaNoRea & {
|
|
235
|
+
resumenEstado: ResumenEstado;
|
|
236
|
+
resumenEstadoSup: ResumenEstado;
|
|
237
|
+
};
|
|
238
|
+
export type Respuestas = RespuestasUnaUA & RespuestaLasUA;
|
|
239
|
+
export type RespuestasRaiz = Respuestas & ResultadoResumen & {
|
|
240
|
+
$dirty: boolean;
|
|
241
|
+
};
|
|
242
|
+
export type UnidadAnalisis = {
|
|
243
|
+
unidad_analisis: IdUnidadAnalisis;
|
|
244
|
+
padre?: IdUnidadAnalisis;
|
|
245
|
+
pk_agregada: CampoPk;
|
|
246
|
+
principal?: boolean;
|
|
247
|
+
hijas: {
|
|
248
|
+
[k in IdUnidadAnalisis]?: UnidadAnalisis;
|
|
249
|
+
};
|
|
250
|
+
};
|
|
251
|
+
export type TEM = {
|
|
252
|
+
nomcalle: string;
|
|
253
|
+
dominio: number;
|
|
254
|
+
sector: string;
|
|
255
|
+
edificio: string;
|
|
256
|
+
entrada: string;
|
|
257
|
+
nrocatastral: string;
|
|
258
|
+
piso: string;
|
|
259
|
+
departamento: string;
|
|
260
|
+
habitacion: string;
|
|
261
|
+
casa: string;
|
|
262
|
+
prioridad: 1 | 2 | 3;
|
|
263
|
+
observaciones: string;
|
|
264
|
+
seleccionado: number;
|
|
265
|
+
cita?: string;
|
|
266
|
+
carga: string;
|
|
267
|
+
semana?: number;
|
|
268
|
+
};
|
|
269
|
+
export type ResumenEstado = 'vacio' | 'con problemas' | 'incompleto' | 'ok' | 'no rea' | 'cita pactada';
|
|
270
|
+
export type InfoTarea = {
|
|
271
|
+
tarea: IdTarea;
|
|
272
|
+
notas?: string;
|
|
273
|
+
fecha_asignacion?: Date;
|
|
274
|
+
asignado?: string;
|
|
275
|
+
main_form: IdFormulario;
|
|
276
|
+
};
|
|
277
|
+
export type Visita = {
|
|
278
|
+
fecha: string | null;
|
|
279
|
+
hora: string | null;
|
|
280
|
+
idper: string | null;
|
|
281
|
+
observaciones: string | null;
|
|
282
|
+
};
|
|
283
|
+
export type DatosHdrUaPpal = {
|
|
284
|
+
tarea: InfoTarea;
|
|
285
|
+
tem: TEM;
|
|
286
|
+
};
|
|
287
|
+
export type IdCarga = "1" | "2" | "etc";
|
|
288
|
+
export type EstadoCarga = 'resumen' | 'relevamiento' | 'recibo';
|
|
289
|
+
export type Carga = {
|
|
290
|
+
fecha: Date;
|
|
291
|
+
estado_carga: EstadoCarga;
|
|
292
|
+
necesarias: number;
|
|
293
|
+
observaciones: string;
|
|
294
|
+
recepcionista: string;
|
|
295
|
+
puede_autogenerar: boolean;
|
|
296
|
+
};
|
|
297
|
+
export type Cargas = {
|
|
298
|
+
[idCarga in IdCarga]: Carga;
|
|
299
|
+
};
|
|
300
|
+
export type EstructuraRowValidator = Structure<IdVariable, Valor, IdFin>;
|
|
301
|
+
export type ModoDespliegue = 'metadatos' | 'relevamiento' | 'PDF';
|
|
302
|
+
export type PantallaNavegacion = 'hdr' | 'sincronizacion' | 'sincronizacion_requerida' | 'modo';
|
|
303
|
+
export type InfoFormulario = {
|
|
304
|
+
casilleros: Formulario;
|
|
305
|
+
estructuraRowValidator: EstructuraRowValidator;
|
|
306
|
+
};
|
|
307
|
+
export type IdResultado = 'AVERIGUAR' | 'TODO';
|
|
308
|
+
export type IdSemana = 1 | 2 | 'etc';
|
|
309
|
+
export type Semana = {
|
|
310
|
+
operativo: IdOperativo;
|
|
311
|
+
semana: number;
|
|
312
|
+
semana_referencia_desde?: string | null;
|
|
313
|
+
semana_referencia_hasta?: string | null;
|
|
314
|
+
'30dias_referencia_desde'?: string | null;
|
|
315
|
+
'30dias_referencia_hasta'?: string | null;
|
|
316
|
+
mes_referencia?: string | null;
|
|
317
|
+
carga_enc_desde?: string | null;
|
|
318
|
+
carga_enc_hasta?: string | null;
|
|
319
|
+
carga_recu_desde?: string | null;
|
|
320
|
+
carga_recu_hasta?: string | null;
|
|
321
|
+
};
|
|
322
|
+
export type TareasEstructura = {
|
|
323
|
+
[idTarea in IdTarea]: {
|
|
324
|
+
resultados: {
|
|
325
|
+
[idResultado in IdResultado]: {
|
|
326
|
+
descripcion: string;
|
|
327
|
+
};
|
|
328
|
+
};
|
|
329
|
+
};
|
|
330
|
+
};
|
|
331
|
+
export type TipoCondicion = 'no_rea' | 'no_rea_sup' | 'rea' | 'rea_sup';
|
|
332
|
+
export type NoRea = {
|
|
333
|
+
operativo: string;
|
|
334
|
+
no_rea: number;
|
|
335
|
+
descripcion: string;
|
|
336
|
+
grupo: string;
|
|
337
|
+
variable: string;
|
|
338
|
+
valor: string;
|
|
339
|
+
grupo0: string;
|
|
340
|
+
orden: number;
|
|
341
|
+
};
|
|
342
|
+
export type NoReaSup = {
|
|
343
|
+
operativo: string;
|
|
344
|
+
no_rea_sup: number;
|
|
345
|
+
desc_norea_sup: string;
|
|
346
|
+
grupo_sup: string;
|
|
347
|
+
variable_sup: string;
|
|
348
|
+
valor_sup: string;
|
|
349
|
+
grupo0_sup: string;
|
|
350
|
+
orden: number;
|
|
351
|
+
};
|
|
352
|
+
export type Rea = {
|
|
353
|
+
operativo: string;
|
|
354
|
+
rea: number;
|
|
355
|
+
descripcion: string;
|
|
356
|
+
condicion: string;
|
|
357
|
+
condicion_js: string;
|
|
358
|
+
orden: number;
|
|
359
|
+
es_positiva: boolean;
|
|
360
|
+
tarea: string | null;
|
|
361
|
+
};
|
|
362
|
+
export type ReaSup = {
|
|
363
|
+
operativo: string;
|
|
364
|
+
rea_sup: number;
|
|
365
|
+
descripcion: string;
|
|
366
|
+
condicion: string;
|
|
367
|
+
condicion_js: string;
|
|
368
|
+
orden: number;
|
|
369
|
+
es_positiva: boolean;
|
|
370
|
+
tarea: string | null;
|
|
371
|
+
};
|
|
372
|
+
export type MapeoTipoItem = {
|
|
373
|
+
'rea': Rea;
|
|
374
|
+
'no_rea': NoRea;
|
|
375
|
+
'rea_sup': ReaSup;
|
|
376
|
+
'no_rea_sup': NoReaSup;
|
|
377
|
+
};
|
|
378
|
+
export type Estructura = {
|
|
379
|
+
formularios: {
|
|
380
|
+
[nombreFormulario in IdFormulario]: InfoFormulario;
|
|
381
|
+
};
|
|
382
|
+
unidades_analisis: {
|
|
383
|
+
[idUnidadAnalisis in IdUnidadAnalisis]: UnidadAnalisis;
|
|
384
|
+
};
|
|
385
|
+
tareas: TareasEstructura;
|
|
386
|
+
uaPpal: IdUnidadAnalisis;
|
|
387
|
+
pkAgregadaUaPpal: CampoPkRaiz;
|
|
388
|
+
timestamp: number;
|
|
389
|
+
operativo: IdOperativo;
|
|
390
|
+
configSorteo: ConfiguracionSorteo;
|
|
391
|
+
habilitacionBotonFormulario: ConfiguracionHabilitarBotonFormulario;
|
|
392
|
+
conReaHogar: boolean;
|
|
393
|
+
noReas: NoRea[];
|
|
394
|
+
noReasSup: NoReaSup[];
|
|
395
|
+
reas: Rea[];
|
|
396
|
+
reasSup: ReaSup[];
|
|
397
|
+
semanas: {
|
|
398
|
+
[idSemana in IdSemana]: Semana;
|
|
399
|
+
};
|
|
400
|
+
defaultInformacionHdr: DatosHdrUaPpal;
|
|
401
|
+
};
|
|
402
|
+
export type IdEnc = 130031 | 130032;
|
|
403
|
+
export type InformacionHdr = {
|
|
404
|
+
[enc in IdEnc]: DatosHdrUaPpal;
|
|
405
|
+
};
|
|
406
|
+
export type CasoState = {
|
|
407
|
+
opciones: {
|
|
408
|
+
forPk: ForPk | null;
|
|
409
|
+
pilaForPk: ForPk[];
|
|
410
|
+
modoDespliegue: ModoDespliegue;
|
|
411
|
+
modoDirecto: boolean;
|
|
412
|
+
modoBorrarRespuesta: IdVariable | null;
|
|
413
|
+
conCampoOpciones: boolean;
|
|
414
|
+
saltoAutomatico: boolean;
|
|
415
|
+
pantallaActual: PantallaNavegacion;
|
|
416
|
+
avisoPersistente: {
|
|
417
|
+
tipo: 'info' | 'success' | 'error';
|
|
418
|
+
mensaje: string;
|
|
419
|
+
} | null;
|
|
420
|
+
comodines: {
|
|
421
|
+
[idComodin in IdComodin]?: string;
|
|
422
|
+
};
|
|
423
|
+
};
|
|
424
|
+
};
|
|
425
|
+
export type ResultadoReaNoRea<K extends keyof CodReaNoRea, B extends string> = {
|
|
426
|
+
[P in K]: CodReaNoRea[K];
|
|
427
|
+
} & {
|
|
428
|
+
[P in B]: boolean;
|
|
429
|
+
};
|
|
430
|
+
export type FuncionesCalculoReaNoRea = {
|
|
431
|
+
esNoRea: (respuestas: Respuestas, tarea: string) => ResultadoReaNoRea<'codNoRea', 'esNoRea'>;
|
|
432
|
+
esNoReaSup: (respuestas: Respuestas, tarea: string) => ResultadoReaNoRea<'codNoReaSup', 'esNoReaSup'>;
|
|
433
|
+
esRealizada: (respuestas: Respuestas, tarea: string) => ResultadoReaNoRea<'codRea', 'esRea'>;
|
|
434
|
+
esRealizadaSup: (respuestas: Respuestas, tarea: string) => ResultadoReaNoRea<'codReaSup', 'esReaSup'>;
|
|
435
|
+
};
|
|
436
|
+
export type DefOperativo = FuncionesCalculoReaNoRea & {
|
|
437
|
+
UAprincipal: IdUnidadAnalisis;
|
|
438
|
+
defUA: {
|
|
439
|
+
[i in IdUnidadAnalisis]: {
|
|
440
|
+
pk: IdVariable;
|
|
441
|
+
incluidas: IdUnidadAnalisis[];
|
|
442
|
+
idsFor: IdFormulario[];
|
|
443
|
+
};
|
|
444
|
+
};
|
|
445
|
+
defFor: {
|
|
446
|
+
[f in IdFormulario]: {
|
|
447
|
+
hermano?: true;
|
|
448
|
+
};
|
|
449
|
+
};
|
|
450
|
+
};
|
|
451
|
+
export type DatosByPassPersistibles = {
|
|
452
|
+
respuestas: {
|
|
453
|
+
[ua in IdUnidadAnalisis]: RespuestasRaiz[];
|
|
454
|
+
};
|
|
455
|
+
modoAlmacenamiento: ModoAlmacenamiento;
|
|
456
|
+
persona: string;
|
|
457
|
+
tarea: IdTarea;
|
|
458
|
+
idper: string;
|
|
459
|
+
cargas: Cargas;
|
|
460
|
+
informacionHdr: InformacionHdr;
|
|
461
|
+
soloLectura: boolean;
|
|
462
|
+
token?: string;
|
|
463
|
+
num_sincro?: number;
|
|
464
|
+
timestampEstructura?: number;
|
|
465
|
+
permiteBorrarElementosUA?: boolean;
|
|
466
|
+
};
|
|
467
|
+
type ConfiguracionSorteoTabla = {
|
|
468
|
+
metodo: "tabla";
|
|
469
|
+
param_metodo: {
|
|
470
|
+
tabla: string[];
|
|
471
|
+
var_letra: IdVariable;
|
|
472
|
+
};
|
|
473
|
+
};
|
|
474
|
+
type ConfiguracionSorteoHash = {
|
|
475
|
+
metodo: "hash";
|
|
476
|
+
param_metodo: {
|
|
477
|
+
var_coef: [
|
|
478
|
+
{
|
|
479
|
+
var: IdVariable;
|
|
480
|
+
coef: number;
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
var: IdVariable;
|
|
484
|
+
coef: number;
|
|
485
|
+
}
|
|
486
|
+
];
|
|
487
|
+
divisor: number;
|
|
488
|
+
};
|
|
489
|
+
};
|
|
490
|
+
export type ConfiguracionSorteo = {
|
|
491
|
+
[key in IdFormulario]: ConfiguracionSorteoFormulario;
|
|
492
|
+
};
|
|
493
|
+
export type ConfiguracionHabilitarBotonFormulario = {
|
|
494
|
+
[key in IdFormulario]: ConfiguracionHabilitarBotonFormularioForm;
|
|
495
|
+
};
|
|
496
|
+
export type ConfiguracionSorteoFormulario = {
|
|
497
|
+
unidad_analisis: IdUnidadAnalisis;
|
|
498
|
+
unidad_analisis_padre: IdUnidadAnalisis;
|
|
499
|
+
expr_incompletitud: {
|
|
500
|
+
[key in number]: {
|
|
501
|
+
dominio: number;
|
|
502
|
+
expr: string;
|
|
503
|
+
};
|
|
504
|
+
};
|
|
505
|
+
expr_incompletitud_js: {
|
|
506
|
+
[key in number]: {
|
|
507
|
+
dominio: number;
|
|
508
|
+
expr: string;
|
|
509
|
+
};
|
|
510
|
+
};
|
|
511
|
+
disparador: IdVariable;
|
|
512
|
+
filtro: {
|
|
513
|
+
[key in number]: {
|
|
514
|
+
dominio: number;
|
|
515
|
+
expr: string;
|
|
516
|
+
};
|
|
517
|
+
};
|
|
518
|
+
filtro_js: {
|
|
519
|
+
[key in number]: {
|
|
520
|
+
dominio: number;
|
|
521
|
+
expr: string;
|
|
522
|
+
};
|
|
523
|
+
};
|
|
524
|
+
orden: {
|
|
525
|
+
variable: IdVariable;
|
|
526
|
+
orden: 1 | -1;
|
|
527
|
+
}[];
|
|
528
|
+
parametros: IdVariable[];
|
|
529
|
+
cantidad_sorteables: IdVariable;
|
|
530
|
+
cantidad_total: IdVariable;
|
|
531
|
+
resultado: IdVariable;
|
|
532
|
+
resultado_manual: IdVariable;
|
|
533
|
+
sorteado_mostrar?: {
|
|
534
|
+
source: IdVariable;
|
|
535
|
+
target: IdVariable;
|
|
536
|
+
}[];
|
|
537
|
+
incompletas: IdVariable;
|
|
538
|
+
variableBotonFormularioUA: IdVariable;
|
|
539
|
+
variableBotonFormularioUAIndividual?: IdVariable;
|
|
540
|
+
id_formulario_individual?: IdFormulario;
|
|
541
|
+
id_formulario_padre?: IdFormulario;
|
|
542
|
+
} & (ConfiguracionSorteoHash | ConfiguracionSorteoTabla);
|
|
543
|
+
export type ConfiguracionHabilitarBotonFormularioForm = {
|
|
544
|
+
unidad_analisis: IdUnidadAnalisis;
|
|
545
|
+
expr_habilitar_boton: string;
|
|
546
|
+
expr_habilitar_boton_js: string;
|
|
547
|
+
habilitar_agregar_listo: boolean;
|
|
548
|
+
};
|
|
549
|
+
export declare function toPlainForPk(forPk: ForPk): PlainForPk;
|
|
550
|
+
export declare var iterator: <T>(o: ObjetoNumeradoOArray<T>) => Iterable<T>;
|
|
551
|
+
export declare var empty: <T>(o: ObjetoNumeradoOArray<T> | null | undefined) => boolean;
|
|
552
|
+
declare global {
|
|
553
|
+
namespace myOwn {
|
|
554
|
+
interface AddrParams {
|
|
555
|
+
state_forPk: string;
|
|
556
|
+
state_pilaForPk: string;
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
export type DireccionAccion = 'avance' | 'retroceso' | 'blanqueo';
|
|
561
|
+
export type EstadoAccion = {
|
|
562
|
+
operativo: string;
|
|
563
|
+
estado: string;
|
|
564
|
+
eaccion: string;
|
|
565
|
+
condicion: string;
|
|
566
|
+
estado_destino: string;
|
|
567
|
+
eaccion_direccion: DireccionAccion;
|
|
568
|
+
path_icono_svg: string;
|
|
569
|
+
nombre_procedure: string;
|
|
570
|
+
nombre_wscreen: string;
|
|
571
|
+
desactiva_boton: boolean;
|
|
572
|
+
confirma: boolean;
|
|
573
|
+
};
|
|
574
|
+
export type ModoDM = 'produc' | 'capa';
|
|
575
|
+
export {};
|