@rsuci/shared-form-components 1.0.21 → 1.0.23

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.
@@ -1 +1 @@
1
- {"version":3,"file":"interpolateVariableLabel.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/interpolateVariableLabel.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,MAAM,EACb,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,EAC5C,qBAAqB,CAAC,EAAE,MAAM,GAC7B,MAAM,CA6CR;AA2DD;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAG5D;AAED;;;;;;;;;GASG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAcjE;AAED,eAAe,wBAAwB,CAAC"}
1
+ {"version":3,"file":"interpolateVariableLabel.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/interpolateVariableLabel.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,MAAM,EACb,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,EAC5C,qBAAqB,CAAC,EAAE,MAAM,GAC7B,MAAM,CA0CR;AA2DD;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAG5D;AAED;;;;;;;;;GASG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAcjE;AAED,eAAe,wBAAwB,CAAC"}
@@ -43,16 +43,14 @@ export function interpolateVariableLabel(label, allResponses, currentInstanceNum
43
43
  // 1. Essayer avec le code exact tel quel
44
44
  // Cela couvre le cas ${CODE_N} où N est explicite
45
45
  response = allResponses[variableCode];
46
- // 2. Si pas trouvé et que le code ne contient pas déjà un numéro d'instance,
47
- // essayer avec l'instance courante
46
+ // 2. Si pas trouvé, essayer avec l'instance courante
47
+ // La stratégie de recherche en étapes garantit le bon fonctionnement :
48
+ // - Les références explicites (${CODE_1}) sont trouvées à l'étape 1
49
+ // - Les variables dans groupes multiples (${S0_1} -> S0_1_2) sont trouvées ici
48
50
  if (!response && currentInstanceNumber) {
49
- // Vérifier si le code se termine déjà par _N (numéro)
50
- const hasInstanceSuffix = /_\d+$/.test(variableCode);
51
- if (!hasInstanceSuffix) {
52
- // Essayer CODE_instanceNumber
53
- const keyWithInstance = `${variableCode}_${currentInstanceNumber}`;
54
- response = allResponses[keyWithInstance];
55
- }
51
+ // Essayer CODE_instanceNumber
52
+ const keyWithInstance = `${variableCode}_${currentInstanceNumber}`;
53
+ response = allResponses[keyWithInstance];
56
54
  }
57
55
  // 3. Si toujours pas trouvé, chercher dans les réponses par variableCode
58
56
  // (pour le cas où la clé est juste le code sans suffix)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsuci/shared-form-components",
3
- "version": "1.0.21",
3
+ "version": "1.0.23",
4
4
  "description": "Composants partagés de rendu de formulaires RSU v2 - Package local pour frontend Admin et Public",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -23,7 +23,7 @@
23
23
  "react": "^18.0.0 || ^19.0.0",
24
24
  "react-dom": "^18.0.0 || ^19.0.0",
25
25
  "next": "^14.0.0 || ^15.0.0",
26
- "lucide-react": "^0.263.0"
26
+ "lucide-react": "^0.263.0 || ^0.525.0"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@types/react": "^18.3.0",
@@ -37,6 +37,6 @@
37
37
  "dependencies": {
38
38
  "clsx": "^2.0.0",
39
39
  "tailwind-merge": "^2.0.0",
40
- "lucide-react": "^0.263.0"
40
+ "lucide-react": "^0.525.0"
41
41
  }
42
42
  }