@rsuci/shared-form-components 1.0.54 → 1.0.55

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":"RosterPanel.d.ts","sourceRoot":"","sources":["../../../src/components/roster/RosterPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,EAAsB,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAM5D,UAAU,YAAY;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACrB;AAGD,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAGD,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,YAAY,CAAC;IACrB,eAAe,EAAE,cAAc,EAAE,CAAC;IAClC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3B,QAAQ,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;IACrD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAE3C,QA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AAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3B,QAAQ,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;IACrD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAE3C,QAAQ,CAAC,EAAE,oBAAoB,CAAC;IAChC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B,wBAAwB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,EAAE,YAAY,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;IACvH,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAC9C,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA+K3C,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -53,34 +53,8 @@ const RosterPanel = ({ option, rosterVariables, value, onChange, disabled, showC
53
53
  const uniqueCode = `${option.code}_${rosterVar.code}`;
54
54
  // Récupérer les options (format: "01#Option1|02#Option2|...")
55
55
  const optionsValue = rosterVar.valeurDefaut || rosterVar.valeur;
56
- // Déterminer le type de la variable avec fallback intelligent
57
- // Si typeCode est absent, on essaie de déduire le type
58
- let effectiveTypeCode = rosterVar.typeCode;
59
- if (!effectiveTypeCode) {
60
- const designation = (rosterVar.designation || '').toLowerCase();
61
- if (optionsValue && typeof optionsValue === 'string') {
62
- // Vérifier si c'est un format d'options : "01#Label1|02#Label2"
63
- if (optionsValue.includes('#') && optionsValue.includes('|')) {
64
- // Si peu d'options (2-4), probablement RADIO, sinon LISTE
65
- const optionsCount = optionsValue.split('|').length;
66
- effectiveTypeCode = optionsCount <= 4 ? 'RADIO' : 'LISTE';
67
- console.log(`[RosterPanel] Fallback typeCode pour ${rosterVar.code}: ${effectiveTypeCode} (${optionsCount} options)`);
68
- }
69
- }
70
- // Si toujours pas de type, essayer de déduire par le libellé
71
- if (!effectiveTypeCode) {
72
- // Patterns pour détecter les types numériques
73
- const numericPatterns = ['âge', 'age', 'nombre', 'quantité', 'montant', 'prix', 'taille', 'poids', 'année', 'annee', 'mois', 'jour', 'durée', 'duree', 'distance', 'superficie', 'effectif', 'score', 'note', 'pourcentage', '%'];
74
- const isNumeric = numericPatterns.some(pattern => designation.includes(pattern));
75
- if (isNumeric) {
76
- effectiveTypeCode = 'NUMERIQUE';
77
- console.log(`[RosterPanel] Fallback typeCode pour ${rosterVar.code}: NUMERIQUE (détecté par libellé)`);
78
- }
79
- else {
80
- effectiveTypeCode = 'STRING';
81
- }
82
- }
83
- }
56
+ // Utiliser typeCode s'il existe, sinon fallback vers STRING
57
+ const effectiveTypeCode = rosterVar.typeCode || 'STRING';
84
58
  const variable = {
85
59
  id: 0, // Pas d'ID propre pour les variables roster
86
60
  code: uniqueCode, // Code unique par panel
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsuci/shared-form-components",
3
- "version": "1.0.54",
3
+ "version": "1.0.55",
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",