@rsuci/shared-form-components 1.0.14 → 1.0.16
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/components/GroupRenderer.d.ts +9 -1
- package/dist/components/GroupRenderer.d.ts.map +1 -1
- package/dist/components/GroupRenderer.js +62 -36
- package/dist/components/VariableRenderer.d.ts.map +1 -1
- package/dist/components/VariableRenderer.js +6 -1
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +4 -0
- package/dist/components/inputs/EmailEnqueteurInput.d.ts +21 -0
- package/dist/components/inputs/EmailEnqueteurInput.d.ts.map +1 -0
- package/dist/components/inputs/EmailEnqueteurInput.js +23 -0
- package/dist/components/inputs/EmailInput.d.ts +19 -0
- package/dist/components/inputs/EmailInput.d.ts.map +1 -0
- package/dist/components/inputs/EmailInput.js +31 -0
- package/dist/components/inputs/EnqueteurInput.d.ts +21 -0
- package/dist/components/inputs/EnqueteurInput.d.ts.map +1 -0
- package/dist/components/inputs/EnqueteurInput.js +26 -0
- package/dist/components/inputs/TelephoneEnqueteurInput.d.ts +21 -0
- package/dist/components/inputs/TelephoneEnqueteurInput.d.ts.map +1 -0
- package/dist/components/inputs/TelephoneEnqueteurInput.js +23 -0
- package/dist/hooks/useFormTree.d.ts +69 -0
- package/dist/hooks/useFormTree.d.ts.map +1 -0
- package/dist/hooks/useFormTree.js +86 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -0
- package/dist/lib/form-tree.d.ts +76 -0
- package/dist/lib/form-tree.d.ts.map +1 -0
- package/dist/lib/form-tree.js +371 -0
- package/dist/types/enquete.d.ts +1 -1
- package/dist/types/enquete.d.ts.map +1 -1
- package/dist/types/form-tree.d.ts +164 -0
- package/dist/types/form-tree.d.ts.map +1 -0
- package/dist/types/form-tree.js +5 -0
- package/dist/types/services.d.ts +8 -0
- package/dist/types/services.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook React pour utiliser le FormTree
|
|
3
|
+
* RSU v2 - Gestion centralisée de l'état de visibilité et des jumps
|
|
4
|
+
*/
|
|
5
|
+
'use client';
|
|
6
|
+
import { useState, useEffect, useCallback, useMemo, useRef } from 'react';
|
|
7
|
+
import { FormTree } from '../lib/form-tree';
|
|
8
|
+
/**
|
|
9
|
+
* Hook pour utiliser le FormTree dans les composants React
|
|
10
|
+
*
|
|
11
|
+
* @param groupes Liste des groupes du formulaire
|
|
12
|
+
* @param responses Dictionnaire des réponses
|
|
13
|
+
* @param options Options de configuration
|
|
14
|
+
* @returns Objet avec les méthodes et états du FormTree
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```tsx
|
|
18
|
+
* const {
|
|
19
|
+
* getVisibleVariables,
|
|
20
|
+
* validateGroup,
|
|
21
|
+
* jumpErrors,
|
|
22
|
+
* activeJumps
|
|
23
|
+
* } = useFormTree(formulaire.groupes, responses, {
|
|
24
|
+
* onJumpError: (error) => toast.error(error.message)
|
|
25
|
+
* });
|
|
26
|
+
*
|
|
27
|
+
* // Obtenir les variables visibles d'un groupe
|
|
28
|
+
* const visibleVars = getVisibleVariables(groupe.code);
|
|
29
|
+
*
|
|
30
|
+
* // Valider avant navigation
|
|
31
|
+
* const { isValid, errors } = validateGroup(groupe.code);
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
export function useFormTree(groupes, responses, options = {}) {
|
|
35
|
+
// Compteur pour forcer les re-renders
|
|
36
|
+
const [updateCount, setUpdateCount] = useState(0);
|
|
37
|
+
// Référence stable pour les options
|
|
38
|
+
const optionsRef = useRef(options);
|
|
39
|
+
optionsRef.current = options;
|
|
40
|
+
// Créer l'instance FormTree (stable tant que groupes ne changent pas)
|
|
41
|
+
const formTree = useMemo(() => {
|
|
42
|
+
const tree = new FormTree(responses, {
|
|
43
|
+
debug: optionsRef.current.debug,
|
|
44
|
+
onJumpError: optionsRef.current.onJumpError
|
|
45
|
+
});
|
|
46
|
+
tree.buildFromFormulaire(groupes);
|
|
47
|
+
return tree;
|
|
48
|
+
}, [groupes]); // Reconstruire seulement si groupes changent
|
|
49
|
+
// Mettre à jour le callback d'erreur quand il change
|
|
50
|
+
useEffect(() => {
|
|
51
|
+
formTree.onJumpError = options.onJumpError;
|
|
52
|
+
}, [formTree, options.onJumpError]);
|
|
53
|
+
// Mettre à jour quand les réponses changent
|
|
54
|
+
useEffect(() => {
|
|
55
|
+
formTree.updateResponses(responses);
|
|
56
|
+
setUpdateCount(c => c + 1);
|
|
57
|
+
}, [formTree, responses]);
|
|
58
|
+
// Fonctions de requête memoizées
|
|
59
|
+
const getVisibleVariables = useCallback((groupeCode) => formTree.getVisibleVariables(groupeCode), [formTree, updateCount]);
|
|
60
|
+
const getJumpedVariableCodes = useCallback((groupeCode) => formTree.getJumpedVariableCodes(groupeCode), [formTree, updateCount]);
|
|
61
|
+
const validateGroup = useCallback((groupeCode) => formTree.validateGroup(groupeCode), [formTree, updateCount]);
|
|
62
|
+
const getVariablesToClearOnSave = useCallback(() => formTree.getVariablesToClearOnSave(), [formTree, updateCount]);
|
|
63
|
+
const getVariableState = useCallback((variableCode) => formTree.getVariableState(variableCode), [formTree, updateCount]);
|
|
64
|
+
const getGroupState = useCallback((groupeCode) => formTree.getGroupState(groupeCode), [formTree, updateCount]);
|
|
65
|
+
const forceEvaluate = useCallback(() => {
|
|
66
|
+
formTree.evaluateAll();
|
|
67
|
+
setUpdateCount(c => c + 1);
|
|
68
|
+
}, [formTree]);
|
|
69
|
+
// Valeurs dérivées
|
|
70
|
+
const jumpErrors = useMemo(() => formTree.getJumpErrors(), [formTree, updateCount]);
|
|
71
|
+
const activeJumps = useMemo(() => formTree.getActiveJumps(), [formTree, updateCount]);
|
|
72
|
+
return {
|
|
73
|
+
formTree,
|
|
74
|
+
getVisibleVariables,
|
|
75
|
+
getJumpedVariableCodes,
|
|
76
|
+
validateGroup,
|
|
77
|
+
getVariablesToClearOnSave,
|
|
78
|
+
getVariableState,
|
|
79
|
+
getGroupState,
|
|
80
|
+
jumpErrors,
|
|
81
|
+
activeJumps,
|
|
82
|
+
forceEvaluate,
|
|
83
|
+
updateCount
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
export default useFormTree;
|
package/dist/index.d.ts
CHANGED
|
@@ -34,8 +34,11 @@ export { default as EnqueteInput } from './components/selectors/EnqueteInput';
|
|
|
34
34
|
export type { EnqueteReponse, VariableFormulaire, GroupeFormulaire, FormulaireComplet, EnqueteInstance, GroupeInstance, VariableValue, VariableType, ValidationError, AutoAction, NavigationState } from './types/enquete';
|
|
35
35
|
export type { FormRendererServices, GeographicComponents, DistrictSelectorProps, RegionSelectorProps, DepartementSelectorProps, SousPrefectureSelectorProps, QuartierSelectorProps, VillageSelectorProps } from './types/services';
|
|
36
36
|
export type { FormRendererProps, GroupRendererProps, VariableRendererProps } from './types/form-renderer';
|
|
37
|
+
export type { VariableNodeState, GroupNodeState, JumpRange, JumpError, IFormTree, FormTreeOptions, JumpEvaluationResult } from './types/form-tree';
|
|
37
38
|
export { VariableValueConverter } from './lib/utils/variableValueConverter';
|
|
38
39
|
export { interpolateVariableLabel } from './lib/utils/interpolateVariableLabel';
|
|
39
40
|
export { ConditionEngine } from './lib/condition-engine';
|
|
41
|
+
export { FormTree } from './lib/form-tree';
|
|
42
|
+
export { useFormTree, type UseFormTreeOptions, type UseFormTreeReturn } from './hooks/useFormTree';
|
|
40
43
|
export { cn } from './lib/utils/cn';
|
|
41
44
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,gBA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BAAwB,CAAC;AAGzD,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAO3C,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,KAAK,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGnG,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -58,5 +58,12 @@ export { VariableValueConverter } from './lib/utils/variableValueConverter';
|
|
|
58
58
|
export { interpolateVariableLabel } from './lib/utils/interpolateVariableLabel';
|
|
59
59
|
// Moteur de conditions
|
|
60
60
|
export { ConditionEngine } from './lib/condition-engine';
|
|
61
|
+
// FormTree (arbre virtuel du formulaire)
|
|
62
|
+
export { FormTree } from './lib/form-tree';
|
|
63
|
+
// ========================================
|
|
64
|
+
// HOOKS
|
|
65
|
+
// ========================================
|
|
66
|
+
// Hook FormTree
|
|
67
|
+
export { useFormTree } from './hooks/useFormTree';
|
|
61
68
|
// Utilitaire CSS
|
|
62
69
|
export { cn } from './lib/utils/cn';
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FormTree - Arbre virtuel du formulaire
|
|
3
|
+
* RSU v2 - Gestion centralisée de l'état de visibilité et des jumps
|
|
4
|
+
*
|
|
5
|
+
* L'arbre virtuel (FormTree) est une représentation en mémoire de l'état du formulaire qui:
|
|
6
|
+
* 1. Connaît l'ordre de toutes les variables
|
|
7
|
+
* 2. Centralise l'évaluation des conditions
|
|
8
|
+
* 3. Stocke l'état de visibilité calculé
|
|
9
|
+
* 4. Gère nativement les jumps comme des "plages masquées"
|
|
10
|
+
*/
|
|
11
|
+
import { VariableFormulaire, GroupeFormulaire, EnqueteReponse, VariableValue } from '../types/enquete';
|
|
12
|
+
import { IFormTree, VariableNodeState, GroupNodeState, JumpRange, JumpError, FormTreeOptions } from '../types/form-tree';
|
|
13
|
+
import { ConditionEngine } from './condition-engine';
|
|
14
|
+
export declare class FormTree implements IFormTree {
|
|
15
|
+
private groupNodes;
|
|
16
|
+
private variableNodes;
|
|
17
|
+
private orderedVariables;
|
|
18
|
+
private jumpRanges;
|
|
19
|
+
private jumpErrors;
|
|
20
|
+
private conditionEngine;
|
|
21
|
+
private responses;
|
|
22
|
+
private debug;
|
|
23
|
+
onJumpError?: (error: JumpError) => void;
|
|
24
|
+
constructor(responses?: Record<string, EnqueteReponse>, options?: FormTreeOptions);
|
|
25
|
+
private log;
|
|
26
|
+
buildFromFormulaire(groupes: GroupeFormulaire[]): void;
|
|
27
|
+
updateResponses(responses: Record<string, EnqueteReponse>): void;
|
|
28
|
+
evaluateAll(): void;
|
|
29
|
+
private evaluateGroupConditions;
|
|
30
|
+
private containsJump;
|
|
31
|
+
/**
|
|
32
|
+
* Évalue la partie non-jump d'une condition mixte
|
|
33
|
+
* Ex: "showMe(${A} == '1') || jump(${B} == '2', ${Q10})" -> évalue seulement showMe(${A} == '1')
|
|
34
|
+
*/
|
|
35
|
+
private evaluateNonJumpPart;
|
|
36
|
+
private processJumpCondition;
|
|
37
|
+
private evaluateJump;
|
|
38
|
+
private applyJumpRanges;
|
|
39
|
+
private computeFinalVisibility;
|
|
40
|
+
getVisibleVariables(groupeCode: string): VariableFormulaire[];
|
|
41
|
+
getGroupState(groupeCode: string): GroupNodeState | undefined;
|
|
42
|
+
getVariableState(variableCode: string): VariableNodeState | undefined;
|
|
43
|
+
getJumpedVariableCodes(groupeCode: string): Set<string>;
|
|
44
|
+
getActiveJumps(): JumpRange[];
|
|
45
|
+
getJumpErrors(): JumpError[];
|
|
46
|
+
validateGroup(groupeCode: string): {
|
|
47
|
+
isValid: boolean;
|
|
48
|
+
errors: string[];
|
|
49
|
+
};
|
|
50
|
+
private isValueEmpty;
|
|
51
|
+
getVariablesToClearOnSave(): string[];
|
|
52
|
+
/**
|
|
53
|
+
* Expose le ConditionEngine pour les fonctionnalités existantes
|
|
54
|
+
* (showMe, hideMe, setValeur, etc.)
|
|
55
|
+
*/
|
|
56
|
+
getConditionEngine(): ConditionEngine;
|
|
57
|
+
/**
|
|
58
|
+
* Retourne un snapshot de l'état complet pour debug
|
|
59
|
+
*/
|
|
60
|
+
getDebugSnapshot(): {
|
|
61
|
+
groups: Array<{
|
|
62
|
+
code: string;
|
|
63
|
+
isVisible: boolean;
|
|
64
|
+
variableCount: number;
|
|
65
|
+
}>;
|
|
66
|
+
variables: Array<{
|
|
67
|
+
code: string;
|
|
68
|
+
isVisible: boolean;
|
|
69
|
+
isJumpedOver: boolean;
|
|
70
|
+
value: VariableValue;
|
|
71
|
+
}>;
|
|
72
|
+
activeJumps: JumpRange[];
|
|
73
|
+
errors: JumpError[];
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=form-tree.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-tree.d.ts","sourceRoot":"","sources":["../../src/lib/form-tree.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,EACd,aAAa,EACd,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,SAAS,EACT,iBAAiB,EACjB,cAAc,EACd,SAAS,EACT,SAAS,EACT,eAAe,EAEhB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,qBAAa,QAAS,YAAW,SAAS;IACxC,OAAO,CAAC,UAAU,CAA0C;IAC5D,OAAO,CAAC,aAAa,CAA6C;IAClE,OAAO,CAAC,gBAAgB,CAA4B;IACpD,OAAO,CAAC,UAAU,CAAmB;IACrC,OAAO,CAAC,UAAU,CAAmB;IACrC,OAAO,CAAC,eAAe,CAAkB;IACzC,OAAO,CAAC,SAAS,CAAiC;IAClD,OAAO,CAAC,KAAK,CAAU;IAEhB,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;gBAG9C,SAAS,GAAE,MAAM,CAAC,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E,OAAO,CAAC;YAAC,YAAY,EAAE,OAAO,CAAC;YAAC,KAAK,EAAE,aAAa,CAAA;SAAE,CAAC,CAAC;QACpG,WAAW,EAAE,SAAS,EAAE,CAAC;QACzB,MAAM,EAAE,SAAS,EAAE,CAAC;KACrB;CAiBF"}
|
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FormTree - Arbre virtuel du formulaire
|
|
3
|
+
* RSU v2 - Gestion centralisée de l'état de visibilité et des jumps
|
|
4
|
+
*
|
|
5
|
+
* L'arbre virtuel (FormTree) est une représentation en mémoire de l'état du formulaire qui:
|
|
6
|
+
* 1. Connaît l'ordre de toutes les variables
|
|
7
|
+
* 2. Centralise l'évaluation des conditions
|
|
8
|
+
* 3. Stocke l'état de visibilité calculé
|
|
9
|
+
* 4. Gère nativement les jumps comme des "plages masquées"
|
|
10
|
+
*/
|
|
11
|
+
import { ConditionEngine } from './condition-engine';
|
|
12
|
+
export class FormTree {
|
|
13
|
+
constructor(responses = {}, options = {}) {
|
|
14
|
+
this.groupNodes = new Map();
|
|
15
|
+
this.variableNodes = new Map();
|
|
16
|
+
this.orderedVariables = [];
|
|
17
|
+
this.jumpRanges = [];
|
|
18
|
+
this.jumpErrors = [];
|
|
19
|
+
this.responses = responses;
|
|
20
|
+
this.conditionEngine = new ConditionEngine(responses);
|
|
21
|
+
this.onJumpError = options.onJumpError;
|
|
22
|
+
this.debug = options.debug ?? false;
|
|
23
|
+
}
|
|
24
|
+
// ============ LOGGING ============
|
|
25
|
+
log(message, ...args) {
|
|
26
|
+
if (this.debug) {
|
|
27
|
+
console.log(`🌳 [FormTree] ${message}`, ...args);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
// ============ CONSTRUCTION ============
|
|
31
|
+
buildFromFormulaire(groupes) {
|
|
32
|
+
this.log('Building tree from', groupes.length, 'groups');
|
|
33
|
+
this.groupNodes.clear();
|
|
34
|
+
this.variableNodes.clear();
|
|
35
|
+
this.orderedVariables = [];
|
|
36
|
+
// Trier les groupes par ordre
|
|
37
|
+
const sortedGroupes = [...groupes].sort((a, b) => a.ordre - b.ordre);
|
|
38
|
+
for (const groupe of sortedGroupes) {
|
|
39
|
+
// Trier les variables par ordre dans le groupe
|
|
40
|
+
const sortedVariables = [...groupe.variables].sort((a, b) => a.ordre - b.ordre);
|
|
41
|
+
const variableStates = sortedVariables.map(variable => {
|
|
42
|
+
const state = {
|
|
43
|
+
variable,
|
|
44
|
+
isVisible: variable.estVisible,
|
|
45
|
+
isJumpedOver: false,
|
|
46
|
+
isConditionMet: true,
|
|
47
|
+
isValid: true,
|
|
48
|
+
skipValidation: false,
|
|
49
|
+
currentValue: this.responses[variable.code]?.valeur ?? null,
|
|
50
|
+
shouldClearOnSave: false
|
|
51
|
+
};
|
|
52
|
+
this.variableNodes.set(variable.code, state);
|
|
53
|
+
this.orderedVariables.push(variable);
|
|
54
|
+
return state;
|
|
55
|
+
});
|
|
56
|
+
const groupState = {
|
|
57
|
+
groupe,
|
|
58
|
+
variables: variableStates,
|
|
59
|
+
isVisible: true,
|
|
60
|
+
isComplete: false,
|
|
61
|
+
validationErrors: [],
|
|
62
|
+
iterations: new Map()
|
|
63
|
+
};
|
|
64
|
+
this.groupNodes.set(groupe.code, groupState);
|
|
65
|
+
this.log(`Group ${groupe.code} built with ${variableStates.length} variables`);
|
|
66
|
+
}
|
|
67
|
+
// Évaluer toutes les conditions initiales
|
|
68
|
+
this.evaluateAll();
|
|
69
|
+
}
|
|
70
|
+
// ============ MISE À JOUR ============
|
|
71
|
+
updateResponses(responses) {
|
|
72
|
+
this.log('Updating responses');
|
|
73
|
+
this.responses = responses;
|
|
74
|
+
this.conditionEngine.updateContext(responses);
|
|
75
|
+
// Mettre à jour les valeurs dans les noeuds
|
|
76
|
+
for (const [code, state] of this.variableNodes) {
|
|
77
|
+
state.currentValue = responses[code]?.valeur ?? null;
|
|
78
|
+
}
|
|
79
|
+
// Réévaluer toutes les conditions
|
|
80
|
+
this.evaluateAll();
|
|
81
|
+
}
|
|
82
|
+
evaluateAll() {
|
|
83
|
+
this.log('Evaluating all conditions');
|
|
84
|
+
// Reset des états
|
|
85
|
+
this.jumpRanges = [];
|
|
86
|
+
this.jumpErrors = [];
|
|
87
|
+
for (const state of this.variableNodes.values()) {
|
|
88
|
+
state.isJumpedOver = false;
|
|
89
|
+
state.isConditionMet = true;
|
|
90
|
+
state.skipValidation = false;
|
|
91
|
+
state.shouldClearOnSave = false;
|
|
92
|
+
}
|
|
93
|
+
// Premier passage: évaluer les conditions et détecter les jumps
|
|
94
|
+
for (const groupNode of this.groupNodes.values()) {
|
|
95
|
+
this.evaluateGroupConditions(groupNode);
|
|
96
|
+
}
|
|
97
|
+
// Deuxième passage: appliquer les jumps
|
|
98
|
+
this.applyJumpRanges();
|
|
99
|
+
// Troisième passage: calculer la visibilité finale
|
|
100
|
+
this.computeFinalVisibility();
|
|
101
|
+
this.log('Evaluation complete:', {
|
|
102
|
+
activeJumps: this.jumpRanges.filter(j => j.isActive).length,
|
|
103
|
+
jumpErrors: this.jumpErrors.length
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
evaluateGroupConditions(groupNode) {
|
|
107
|
+
const { groupe } = groupNode;
|
|
108
|
+
this.log(`Evaluating group ${groupe.code}`);
|
|
109
|
+
// Évaluer la condition du groupe
|
|
110
|
+
if (groupe.conditionsAffichage) {
|
|
111
|
+
groupNode.isVisible = this.conditionEngine.evaluate(groupe.conditionsAffichage);
|
|
112
|
+
this.log(`Group ${groupe.code} visibility:`, groupNode.isVisible);
|
|
113
|
+
}
|
|
114
|
+
if (!groupNode.isVisible)
|
|
115
|
+
return;
|
|
116
|
+
// Évaluer les conditions de chaque variable
|
|
117
|
+
for (const varState of groupNode.variables) {
|
|
118
|
+
const condition = varState.variable.conditionsAffichage;
|
|
119
|
+
if (!condition) {
|
|
120
|
+
varState.isConditionMet = true;
|
|
121
|
+
continue;
|
|
122
|
+
}
|
|
123
|
+
// Détecter et traiter les jumps
|
|
124
|
+
if (this.containsJump(condition)) {
|
|
125
|
+
this.processJumpCondition(varState, groupe.code, condition);
|
|
126
|
+
// La variable source du jump reste visible (sa condition propre est évaluée séparément)
|
|
127
|
+
varState.isConditionMet = this.evaluateNonJumpPart(condition);
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
varState.isConditionMet = this.conditionEngine.evaluate(condition);
|
|
131
|
+
}
|
|
132
|
+
this.log(`Variable ${varState.variable.code} conditionMet:`, varState.isConditionMet);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
containsJump(condition) {
|
|
136
|
+
return /jump\s*\(/.test(condition);
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Évalue la partie non-jump d'une condition mixte
|
|
140
|
+
* Ex: "showMe(${A} == '1') || jump(${B} == '2', ${Q10})" -> évalue seulement showMe(${A} == '1')
|
|
141
|
+
*/
|
|
142
|
+
evaluateNonJumpPart(condition) {
|
|
143
|
+
// Retirer les appels jump() de la condition
|
|
144
|
+
const withoutJumps = condition
|
|
145
|
+
.replace(/jump\s*\([^)]*\)/g, 'true')
|
|
146
|
+
.replace(/\|\|\s*true/g, '')
|
|
147
|
+
.replace(/true\s*\|\|/g, '')
|
|
148
|
+
.replace(/&&\s*true/g, '')
|
|
149
|
+
.replace(/true\s*&&/g, '')
|
|
150
|
+
.trim();
|
|
151
|
+
if (!withoutJumps || withoutJumps === 'true') {
|
|
152
|
+
return true;
|
|
153
|
+
}
|
|
154
|
+
return this.conditionEngine.evaluate(withoutJumps);
|
|
155
|
+
}
|
|
156
|
+
processJumpCondition(sourceState, groupeCode, condition) {
|
|
157
|
+
this.log(`Processing jump condition for ${sourceState.variable.code}:`, condition);
|
|
158
|
+
// Parser tous les jumps dans la condition
|
|
159
|
+
// Pattern: jump(condition, ${VARIABLE_CIBLE})
|
|
160
|
+
const jumpPattern = /jump\s*\(\s*(.+?)\s*,\s*\$\{([A-Z_][A-Z0-9_]*)\}\s*\)/g;
|
|
161
|
+
let match;
|
|
162
|
+
while ((match = jumpPattern.exec(condition)) !== null) {
|
|
163
|
+
const innerCondition = match[1].trim();
|
|
164
|
+
const targetCode = match[2];
|
|
165
|
+
this.log(`Found jump: condition="${innerCondition}", target="${targetCode}"`);
|
|
166
|
+
const result = this.evaluateJump(sourceState, groupeCode, innerCondition, targetCode);
|
|
167
|
+
if (result.error) {
|
|
168
|
+
this.jumpErrors.push(result.error);
|
|
169
|
+
this.onJumpError?.(result.error);
|
|
170
|
+
continue;
|
|
171
|
+
}
|
|
172
|
+
if (result.canExecute && result.targetCode) {
|
|
173
|
+
const targetState = this.variableNodes.get(result.targetCode);
|
|
174
|
+
const jumpRange = {
|
|
175
|
+
sourceCode: sourceState.variable.code,
|
|
176
|
+
sourceOrdre: sourceState.variable.ordre,
|
|
177
|
+
targetCode: result.targetCode,
|
|
178
|
+
targetOrdre: targetState.variable.ordre,
|
|
179
|
+
groupeCode,
|
|
180
|
+
condition: innerCondition,
|
|
181
|
+
isActive: result.shouldActivate
|
|
182
|
+
};
|
|
183
|
+
this.jumpRanges.push(jumpRange);
|
|
184
|
+
this.log(`Jump range created:`, jumpRange);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
evaluateJump(sourceState, groupeCode, innerCondition, targetCode) {
|
|
189
|
+
const result = {
|
|
190
|
+
isValidSyntax: true,
|
|
191
|
+
canExecute: false,
|
|
192
|
+
shouldActivate: false,
|
|
193
|
+
targetCode: null
|
|
194
|
+
};
|
|
195
|
+
// Validation: cible existe?
|
|
196
|
+
const targetState = this.variableNodes.get(targetCode);
|
|
197
|
+
if (!targetState) {
|
|
198
|
+
result.error = {
|
|
199
|
+
type: 'invalid_target',
|
|
200
|
+
sourceVariable: sourceState.variable.code,
|
|
201
|
+
targetVariable: targetCode,
|
|
202
|
+
message: `Variable cible "${targetCode}" non trouvée pour le jump depuis "${sourceState.variable.code}"`
|
|
203
|
+
};
|
|
204
|
+
return result;
|
|
205
|
+
}
|
|
206
|
+
// Validation: même groupe?
|
|
207
|
+
if (targetState.variable.groupeCode !== groupeCode) {
|
|
208
|
+
result.error = {
|
|
209
|
+
type: 'cross_group_jump',
|
|
210
|
+
sourceVariable: sourceState.variable.code,
|
|
211
|
+
targetVariable: targetCode,
|
|
212
|
+
message: `Jump inter-groupe non autorisé: "${sourceState.variable.code}" (${groupeCode}) → "${targetCode}" (${targetState.variable.groupeCode})`
|
|
213
|
+
};
|
|
214
|
+
return result;
|
|
215
|
+
}
|
|
216
|
+
// Validation: direction avant?
|
|
217
|
+
if (targetState.variable.ordre <= sourceState.variable.ordre) {
|
|
218
|
+
result.error = {
|
|
219
|
+
type: 'backward_jump',
|
|
220
|
+
sourceVariable: sourceState.variable.code,
|
|
221
|
+
targetVariable: targetCode,
|
|
222
|
+
message: `Jump arrière non autorisé: "${sourceState.variable.code}" (ordre ${sourceState.variable.ordre}) → "${targetCode}" (ordre ${targetState.variable.ordre})`
|
|
223
|
+
};
|
|
224
|
+
return result;
|
|
225
|
+
}
|
|
226
|
+
// Le jump est valide
|
|
227
|
+
result.canExecute = true;
|
|
228
|
+
result.targetCode = targetCode;
|
|
229
|
+
// Évaluer la condition du jump
|
|
230
|
+
try {
|
|
231
|
+
result.shouldActivate = this.conditionEngine.evaluate(innerCondition);
|
|
232
|
+
this.log(`Jump condition "${innerCondition}" evaluated to:`, result.shouldActivate);
|
|
233
|
+
}
|
|
234
|
+
catch (e) {
|
|
235
|
+
this.log(`Error evaluating jump condition:`, e);
|
|
236
|
+
result.shouldActivate = false;
|
|
237
|
+
}
|
|
238
|
+
return result;
|
|
239
|
+
}
|
|
240
|
+
applyJumpRanges() {
|
|
241
|
+
for (const jump of this.jumpRanges) {
|
|
242
|
+
if (!jump.isActive)
|
|
243
|
+
continue;
|
|
244
|
+
this.log(`Applying jump from ${jump.sourceCode} to ${jump.targetCode}`);
|
|
245
|
+
// Marquer toutes les variables entre source et cible comme "jumped over"
|
|
246
|
+
for (const [code, state] of this.variableNodes) {
|
|
247
|
+
if (state.variable.groupeCode !== jump.groupeCode)
|
|
248
|
+
continue;
|
|
249
|
+
const ordre = state.variable.ordre;
|
|
250
|
+
// Variables strictement entre source et cible (exclusif aux deux bornes)
|
|
251
|
+
if (ordre > jump.sourceOrdre && ordre < jump.targetOrdre) {
|
|
252
|
+
state.isJumpedOver = true;
|
|
253
|
+
state.skipValidation = true;
|
|
254
|
+
state.shouldClearOnSave = true;
|
|
255
|
+
this.log(`Variable ${code} marked as jumped over`);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
computeFinalVisibility() {
|
|
261
|
+
for (const state of this.variableNodes.values()) {
|
|
262
|
+
// Visible = base visible ET condition satisfaite ET pas sauté
|
|
263
|
+
state.isVisible =
|
|
264
|
+
state.variable.estVisible &&
|
|
265
|
+
state.isConditionMet &&
|
|
266
|
+
!state.isJumpedOver;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
// ============ REQUÊTES ============
|
|
270
|
+
getVisibleVariables(groupeCode) {
|
|
271
|
+
const groupNode = this.groupNodes.get(groupeCode);
|
|
272
|
+
if (!groupNode || !groupNode.isVisible)
|
|
273
|
+
return [];
|
|
274
|
+
return groupNode.variables
|
|
275
|
+
.filter(state => state.isVisible)
|
|
276
|
+
.map(state => state.variable);
|
|
277
|
+
}
|
|
278
|
+
getGroupState(groupeCode) {
|
|
279
|
+
return this.groupNodes.get(groupeCode);
|
|
280
|
+
}
|
|
281
|
+
getVariableState(variableCode) {
|
|
282
|
+
return this.variableNodes.get(variableCode);
|
|
283
|
+
}
|
|
284
|
+
getJumpedVariableCodes(groupeCode) {
|
|
285
|
+
const codes = new Set();
|
|
286
|
+
for (const [code, state] of this.variableNodes) {
|
|
287
|
+
if (state.variable.groupeCode === groupeCode && state.isJumpedOver) {
|
|
288
|
+
codes.add(code);
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
return codes;
|
|
292
|
+
}
|
|
293
|
+
getActiveJumps() {
|
|
294
|
+
return this.jumpRanges.filter(j => j.isActive);
|
|
295
|
+
}
|
|
296
|
+
getJumpErrors() {
|
|
297
|
+
return [...this.jumpErrors];
|
|
298
|
+
}
|
|
299
|
+
// ============ VALIDATION ============
|
|
300
|
+
validateGroup(groupeCode) {
|
|
301
|
+
const groupNode = this.groupNodes.get(groupeCode);
|
|
302
|
+
if (!groupNode)
|
|
303
|
+
return { isValid: true, errors: [] };
|
|
304
|
+
const errors = [];
|
|
305
|
+
for (const state of groupNode.variables) {
|
|
306
|
+
// Ignorer les variables masquées ou sautées
|
|
307
|
+
if (!state.isVisible || state.skipValidation)
|
|
308
|
+
continue;
|
|
309
|
+
// Vérifier les champs obligatoires
|
|
310
|
+
if (state.variable.estObligatoire) {
|
|
311
|
+
const isEmpty = this.isValueEmpty(state.currentValue);
|
|
312
|
+
if (isEmpty) {
|
|
313
|
+
errors.push(`${state.variable.designation} est obligatoire`);
|
|
314
|
+
state.isValid = false;
|
|
315
|
+
state.validationError = 'Champ obligatoire';
|
|
316
|
+
}
|
|
317
|
+
else {
|
|
318
|
+
state.isValid = true;
|
|
319
|
+
state.validationError = undefined;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
groupNode.validationErrors = errors;
|
|
324
|
+
groupNode.isComplete = errors.length === 0;
|
|
325
|
+
return { isValid: errors.length === 0, errors };
|
|
326
|
+
}
|
|
327
|
+
isValueEmpty(value) {
|
|
328
|
+
return value === null ||
|
|
329
|
+
value === undefined ||
|
|
330
|
+
value === '' ||
|
|
331
|
+
(Array.isArray(value) && value.length === 0);
|
|
332
|
+
}
|
|
333
|
+
getVariablesToClearOnSave() {
|
|
334
|
+
const codes = [];
|
|
335
|
+
for (const [code, state] of this.variableNodes) {
|
|
336
|
+
if (state.shouldClearOnSave && !this.isValueEmpty(state.currentValue)) {
|
|
337
|
+
codes.push(code);
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
return codes;
|
|
341
|
+
}
|
|
342
|
+
// ============ ACCÈS AU CONDITION ENGINE ============
|
|
343
|
+
/**
|
|
344
|
+
* Expose le ConditionEngine pour les fonctionnalités existantes
|
|
345
|
+
* (showMe, hideMe, setValeur, etc.)
|
|
346
|
+
*/
|
|
347
|
+
getConditionEngine() {
|
|
348
|
+
return this.conditionEngine;
|
|
349
|
+
}
|
|
350
|
+
// ============ DEBUG ============
|
|
351
|
+
/**
|
|
352
|
+
* Retourne un snapshot de l'état complet pour debug
|
|
353
|
+
*/
|
|
354
|
+
getDebugSnapshot() {
|
|
355
|
+
return {
|
|
356
|
+
groups: Array.from(this.groupNodes.values()).map(g => ({
|
|
357
|
+
code: g.groupe.code,
|
|
358
|
+
isVisible: g.isVisible,
|
|
359
|
+
variableCount: g.variables.length
|
|
360
|
+
})),
|
|
361
|
+
variables: Array.from(this.variableNodes.values()).map(v => ({
|
|
362
|
+
code: v.variable.code,
|
|
363
|
+
isVisible: v.isVisible,
|
|
364
|
+
isJumpedOver: v.isJumpedOver,
|
|
365
|
+
value: v.currentValue
|
|
366
|
+
})),
|
|
367
|
+
activeJumps: this.getActiveJumps(),
|
|
368
|
+
errors: this.jumpErrors
|
|
369
|
+
};
|
|
370
|
+
}
|
|
371
|
+
}
|
package/dist/types/enquete.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Types et interfaces pour le système d'enquêtes dynamiques
|
|
3
3
|
* RSU v2 - Moteur de Rendu des Formulaires d'Enquête
|
|
4
4
|
*/
|
|
5
|
-
export type VariableType = 'STRING' | 'TEXTE' | 'NUMERIQUE' | 'DATE' | 'DATEHEURE' | 'HOUR' | 'CHECKBOX' | 'LISTE' | 'COMBOBOX' | 'RADIO' | 'GPS' | 'PHOTO' | 'IMAGE' | 'PHONE' | 'LABEL' | 'PANEL' | 'DEPARTEMENT' | 'DISTRICT' | 'REGION' | 'QUARTIER' | 'VILLAGE' | 'SOUSPREFECTURE' | 'RSU' | 'PAYS' | 'MENAGE' | 'ENQUETE' | 'ROSTERCHECK' | 'ROSTERLIST' | 'IDDOC';
|
|
5
|
+
export type VariableType = 'STRING' | 'TEXTE' | 'NUMERIQUE' | 'DATE' | 'DATEHEURE' | 'HOUR' | 'CHECKBOX' | 'LISTE' | 'COMBOBOX' | 'RADIO' | 'GPS' | 'PHOTO' | 'IMAGE' | 'PHONE' | 'EMAIL' | 'LABEL' | 'PANEL' | 'DEPARTEMENT' | 'DISTRICT' | 'REGION' | 'QUARTIER' | 'VILLAGE' | 'SOUSPREFECTURE' | 'RSU' | 'PAYS' | 'MENAGE' | 'ENQUETE' | 'ROSTERCHECK' | 'ROSTERLIST' | 'IDDOC' | 'ENQUETEUR' | 'EMAIL_ENQUETEUR' | 'TELEPHONE_ENQUETEUR';
|
|
6
6
|
export type EnqueteStatut = 'BROUILLON' | 'VALIDE_ENQUETEUR' | 'REJETE_DR' | 'VALIDE_DR' | 'TERMINEE' | 'FINALISE';
|
|
7
7
|
export type VariableValue = string | number | boolean | Date | object | null;
|
|
8
8
|
export interface VariableProperties {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enquete.d.ts","sourceRoot":"","sources":["../../src/types/enquete.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,MAAM,MAAM,YAAY,GACpB,QAAQ,GAAG,OAAO,GAAG,WAAW,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,GAChE,UAAU,GAAG,OAAO,GAAG,UAAU,GAAG,OAAO,GAAG,KAAK,GAAG,OAAO,GAAG,OAAO,GACvE,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,aAAa,GAAG,UAAU,
|
|
1
|
+
{"version":3,"file":"enquete.d.ts","sourceRoot":"","sources":["../../src/types/enquete.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,MAAM,MAAM,YAAY,GACpB,QAAQ,GAAG,OAAO,GAAG,WAAW,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,GAChE,UAAU,GAAG,OAAO,GAAG,UAAU,GAAG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