@open3cl/engine 1.11.1 → 1.11.3
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/11_ecs.spec.js +17 -1
- package/11_rdim_ecs_individuelle_unique.js +78 -0
- package/11_rdim_ecs_individuelle_unique.spec.js +136 -0
- package/13.2_generateur_combustion.spec.js +24 -1
- package/13.2_generateur_combustion_bouilleur.spec.js +8 -0
- package/13.2_generateur_combustion_ch.spec.js +41 -0
- package/14_generateur_ecs.spec.js +72 -0
- package/15_conso_aux.spec.js +20 -0
- package/3.1_b.spec.js +23 -0
- package/3.2.1_mur.spec.js +99 -0
- package/3.2.3_plancher_haut.spec.js +29 -0
- package/3.3_baie_vitree.spec.js +10 -0
- package/3.4_pont_thermique.spec.js +27 -0
- package/4_ventilation.spec.js +12 -0
- package/7_inertie.spec.js +10 -0
- package/9_besoin_ch.spec.js +4 -0
- package/9_conso_ch.js +1 -1
- package/9_emetteur_ch.spec.js +3 -1
- package/9_generateur_ch.spec.js +11 -0
- package/README.md +13 -13
- package/apport_et_besoin.spec.js +5 -1
- package/core/assets/domain/add-additionnal-ue-values-tables.js +0 -19
- package/core/assets/domain/add-additionnal-ue-values-tables.spec.js +3 -4
- package/core/assets/domain/synchronize-dpe-ges-limit-values-tables.spec.js +25 -0
- package/core/assets/domain/synchronize-valeur-tables.spec.js +43 -0
- package/core/util/logger/log-service.spec.js +11 -0
- package/dpe-sanitizer.service.spec.js +9 -0
- package/engine.js +10 -2
- package/engine.spec.js +66 -5
- package/features/dpe/domain/models/baie-ets.model.ts +8 -11
- package/features/dpe/domain/models/baie-vitree.model.ts +24 -96
- package/features/dpe/domain/models/climatisation.model.ts +13 -23
- package/features/dpe/domain/models/dpe-xsd.generated.ts +2797 -0
- package/features/dpe/domain/models/dpe.model.ts +102 -171
- package/features/dpe/domain/models/ets.model.ts +10 -18
- package/features/dpe/domain/models/installation-chauffage.model.ts +49 -102
- package/features/dpe/domain/models/installation-ecs.model.ts +27 -77
- package/features/dpe/domain/models/mur.model.ts +10 -38
- package/features/dpe/domain/models/plancher.model.ts +22 -63
- package/features/dpe/domain/models/pont-thermique.model.ts +10 -20
- package/features/dpe/domain/models/porte.model.ts +10 -30
- package/features/dpe/domain/models/production-elec-enr.model.ts +13 -27
- package/features/dpe/domain/models/sortie.model.ts +32 -176
- package/features/dpe/domain/models/ventilation.model.ts +15 -25
- package/features/normalizer/domain/dpe-normalizer.service.spec.js +5 -3
- package/package.json +27 -45
- package/utils.js +1 -2
- package/utils.spec.js +16 -0
|
@@ -1,63 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
enum_type_isolation_id?: string; // ENUM type_isolation
|
|
24
|
-
enum_periode_isolation_id?: string; // ENUM periode_isolation
|
|
25
|
-
resistance_isolation?: number;
|
|
26
|
-
epaisseur_isolation?: number;
|
|
27
|
-
enum_methode_saisie_u_id?: string; // ENUM methode_saisie_u
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export interface PlancherDI {
|
|
31
|
-
b: number;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export interface PlancherBasDE extends PlancherDE {
|
|
35
|
-
upb0_saisi?: number;
|
|
36
|
-
tv_upb0_id?: string; // TV
|
|
37
|
-
enum_type_plancher_bas_id?: string; // ENUM type_plancher_bas
|
|
38
|
-
upb_saisi?: number;
|
|
39
|
-
tv_upb_id?: string; // TV
|
|
40
|
-
calcul_ue: number;
|
|
41
|
-
perimetre_ue?: number;
|
|
42
|
-
surface_ue?: number;
|
|
43
|
-
ue?: number;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export interface PlancherBasDI extends PlancherDI {
|
|
47
|
-
upb: number;
|
|
48
|
-
upb0: number;
|
|
49
|
-
upb_final: number;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export interface PlancherHautDE extends PlancherDE {
|
|
53
|
-
uph0_saisi?: number;
|
|
54
|
-
tv_uph0_id?: string; // TV
|
|
55
|
-
enum_type_plancher_haut_id?: string; // ENUM type_plancher_bas
|
|
56
|
-
uph_saisi?: number;
|
|
57
|
-
tv_uph_id?: string; // TV
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export interface PlancherHautDI extends PlancherDI {
|
|
61
|
-
uph: number;
|
|
62
|
-
uph0: number;
|
|
63
|
-
}
|
|
1
|
+
// Alias des types générés depuis le XSD DPE (voir dpe-xsd.generated.ts). Les extensions propres
|
|
2
|
+
// à Open3CL se déclarent ici (hors fichier généré) pour survivre à la régénération.
|
|
3
|
+
import type {
|
|
4
|
+
XsdLogementEnveloppePlancherBas,
|
|
5
|
+
XsdLogementEnveloppePlancherBasDonneeEntree,
|
|
6
|
+
XsdLogementEnveloppePlancherBasDonneeIntermediaire,
|
|
7
|
+
XsdLogementEnveloppePlancherHaut,
|
|
8
|
+
XsdLogementEnveloppePlancherHautDonneeEntree,
|
|
9
|
+
XsdLogementEnveloppePlancherHautDonneeIntermediaire
|
|
10
|
+
} from './dpe-xsd.generated';
|
|
11
|
+
|
|
12
|
+
export type PlancherBas = XsdLogementEnveloppePlancherBas;
|
|
13
|
+
export type PlancherBasDE = XsdLogementEnveloppePlancherBasDonneeEntree;
|
|
14
|
+
export type PlancherBasDI = XsdLogementEnveloppePlancherBasDonneeIntermediaire;
|
|
15
|
+
export type PlancherHaut = XsdLogementEnveloppePlancherHaut;
|
|
16
|
+
export type PlancherHautDE = XsdLogementEnveloppePlancherHautDonneeEntree;
|
|
17
|
+
export type PlancherHautDI = XsdLogementEnveloppePlancherHautDonneeIntermediaire;
|
|
18
|
+
|
|
19
|
+
/** @deprecated Les DE bas/haut sont désormais distincts dans le XSD. */
|
|
20
|
+
export type PlancherDE = PlancherBasDE | PlancherHautDE;
|
|
21
|
+
/** @deprecated */
|
|
22
|
+
export type PlancherDI = PlancherBasDI | PlancherHautDI;
|
|
@@ -1,21 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
// Alias des types générés depuis le XSD DPE (voir dpe-xsd.generated.ts). Les extensions propres
|
|
2
|
+
// à Open3CL se déclarent ici (hors fichier généré) pour survivre à la régénération.
|
|
3
|
+
import type {
|
|
4
|
+
XsdLogementEnveloppePontThermique,
|
|
5
|
+
XsdLogementEnveloppePontThermiqueDonneeEntree,
|
|
6
|
+
XsdLogementEnveloppePontThermiqueDonneeIntermediaire
|
|
7
|
+
} from './dpe-xsd.generated';
|
|
2
8
|
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export interface PontThermiqueDE extends DE {
|
|
9
|
-
reference_1?: string;
|
|
10
|
-
reference_2?: string;
|
|
11
|
-
tv_pont_thermique_id?: number; // TV
|
|
12
|
-
pourcentage_valeur_pont_thermique: number;
|
|
13
|
-
l: number;
|
|
14
|
-
enum_methode_saisie_pont_thermique_id: number; // ENUM methode_saisie_pont_thermique
|
|
15
|
-
enum_type_liaison_id: number; // ENUM type_liaison
|
|
16
|
-
k_saisi?: number;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export interface PontThermiqueDI {
|
|
20
|
-
k: number;
|
|
21
|
-
}
|
|
9
|
+
export type PontThermique = XsdLogementEnveloppePontThermique;
|
|
10
|
+
export type PontThermiqueDE = XsdLogementEnveloppePontThermiqueDonneeEntree;
|
|
11
|
+
export type PontThermiqueDI = XsdLogementEnveloppePontThermiqueDonneeIntermediaire;
|
|
@@ -1,31 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
// Alias des types générés depuis le XSD DPE (voir dpe-xsd.generated.ts). Les extensions propres
|
|
2
|
+
// à Open3CL se déclarent ici (hors fichier généré) pour survivre à la régénération.
|
|
3
|
+
import type {
|
|
4
|
+
XsdLogementEnveloppePorte,
|
|
5
|
+
XsdLogementEnveloppePorteDonneeEntree,
|
|
6
|
+
XsdLogementEnveloppePorteDonneeIntermediaire
|
|
7
|
+
} from './dpe-xsd.generated';
|
|
2
8
|
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export interface PorteDE extends DE {
|
|
9
|
-
reference_paroi?: string;
|
|
10
|
-
reference_lnc?: string;
|
|
11
|
-
enum_cfg_isolation_lnc_id?: number; // ENUM cfg_isolation_lnc
|
|
12
|
-
enum_type_adjacence_id?: number; // ENUM type_adjacence
|
|
13
|
-
tv_coef_reduction_deperdition_id?: number; // TV
|
|
14
|
-
surface_aiu?: number;
|
|
15
|
-
surface_aue?: number;
|
|
16
|
-
surface_porte?: number;
|
|
17
|
-
tv_uporte_id?: number; // TV
|
|
18
|
-
enum_methode_saisie_uporte_id?: number; // ENUM methode_saisie_uporte
|
|
19
|
-
enum_type_porte_id?: number; // ENUM type_porte
|
|
20
|
-
uporte_saisi?: number;
|
|
21
|
-
nb_porte?: number;
|
|
22
|
-
largeur_dormant?: number;
|
|
23
|
-
presence_retour_isolation?: boolean;
|
|
24
|
-
presence_joint?: boolean;
|
|
25
|
-
enum_type_pose_id?: number; // ENUM type_pose
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export interface PorteDI {
|
|
29
|
-
uporte: number;
|
|
30
|
-
b: number;
|
|
31
|
-
}
|
|
9
|
+
export type Porte = XsdLogementEnveloppePorte;
|
|
10
|
+
export type PorteDE = XsdLogementEnveloppePorteDonneeEntree;
|
|
11
|
+
export type PorteDI = XsdLogementEnveloppePorteDonneeIntermediaire;
|
|
@@ -1,27 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export interface ProductionElecEnrDI {
|
|
15
|
-
taux_autoproduction?: number;
|
|
16
|
-
production_pv: number;
|
|
17
|
-
conso_elec_ac: number;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export interface PanneauFv {
|
|
21
|
-
surface_totale_capteurs?: number;
|
|
22
|
-
ratio_virtualisation?: number;
|
|
23
|
-
nombre_module?: number;
|
|
24
|
-
tv_coef_orientation_pv_id?: number;
|
|
25
|
-
enum_orientation_pv_id?: number;
|
|
26
|
-
enum_inclinaison_pv_id?: number;
|
|
27
|
-
}
|
|
1
|
+
// Alias des types générés depuis le XSD DPE (voir dpe-xsd.generated.ts). Les extensions propres
|
|
2
|
+
// à Open3CL se déclarent ici (hors fichier généré) pour survivre à la régénération.
|
|
3
|
+
import type {
|
|
4
|
+
XsdLogementProductionElecEnr,
|
|
5
|
+
XsdLogementProductionElecEnrDonneeEntree,
|
|
6
|
+
XsdLogementProductionElecEnrDonneeIntermediaire,
|
|
7
|
+
XsdLogementProductionElecEnrPanneauxPv
|
|
8
|
+
} from './dpe-xsd.generated';
|
|
9
|
+
|
|
10
|
+
export type ProductionElecEnr = XsdLogementProductionElecEnr;
|
|
11
|
+
export type ProductionElecEnrDE = XsdLogementProductionElecEnrDonneeEntree;
|
|
12
|
+
export type ProductionElecEnrDI = XsdLogementProductionElecEnrDonneeIntermediaire;
|
|
13
|
+
export type PanneauFv = XsdLogementProductionElecEnrPanneauxPv;
|
|
@@ -1,178 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
// Alias des types générés depuis le XSD DPE (voir dpe-xsd.generated.ts). Les extensions propres
|
|
2
|
+
// à Open3CL se déclarent ici (hors fichier généré) pour survivre à la régénération.
|
|
3
|
+
import type {
|
|
4
|
+
XsdLogementSortie,
|
|
5
|
+
XsdLogementSortieApportEtBesoin,
|
|
6
|
+
XsdLogementSortieConfortEte,
|
|
7
|
+
XsdLogementSortieCout,
|
|
8
|
+
XsdLogementSortieDeperdition,
|
|
9
|
+
XsdLogementSortieEfConso,
|
|
10
|
+
XsdLogementSortieEmissionGes,
|
|
11
|
+
XsdLogementSortieEpConso,
|
|
12
|
+
XsdLogementSortieProductionElectricite,
|
|
13
|
+
XsdLogementSortieQualiteIsolation,
|
|
14
|
+
XsdLogementSortieSortieParEnergie
|
|
15
|
+
} from './dpe-xsd.generated';
|
|
16
|
+
|
|
17
|
+
export interface Sortie extends Omit<XsdLogementSortie, 'ep_conso'> {
|
|
5
18
|
ep_conso: EpConso;
|
|
6
|
-
emission_ges: EmissionGes;
|
|
7
|
-
cout: Cout;
|
|
8
|
-
production_electricite: ProductionElectricite;
|
|
9
|
-
sortie_par_energie_collection: { sortie_par_energie: SortieParEnergie[] };
|
|
10
|
-
confort_ete?: ConfortEte;
|
|
11
|
-
qualite_isolation: QualiteIsolation;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export interface Deperdition {
|
|
15
|
-
hvent: number;
|
|
16
|
-
hperm: number;
|
|
17
|
-
deperdition_renouvellement_air: number;
|
|
18
|
-
deperdition_mur: number;
|
|
19
|
-
deperdition_plancher_bas: number;
|
|
20
|
-
deperdition_plancher_haut: number;
|
|
21
|
-
deperdition_baie_vitree: number;
|
|
22
|
-
deperdition_porte: number;
|
|
23
|
-
deperdition_pont_thermique: number;
|
|
24
|
-
deperdition_enveloppe: number;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export interface ApportEtBesoin {
|
|
28
|
-
surface_sud_equivalente: number;
|
|
29
|
-
apport_solaire_fr: number;
|
|
30
|
-
apport_interne_fr: number;
|
|
31
|
-
apport_solaire_ch: number;
|
|
32
|
-
apport_interne_ch: number;
|
|
33
|
-
fraction_apport_gratuit_ch: number;
|
|
34
|
-
fraction_apport_gratuit_depensier_ch: number;
|
|
35
|
-
pertes_distribution_ecs_recup: number;
|
|
36
|
-
pertes_distribution_ecs_recup_depensier: number;
|
|
37
|
-
pertes_stockage_ecs_recup: number;
|
|
38
|
-
pertes_generateur_ch_recup: number;
|
|
39
|
-
pertes_generateur_ch_recup_depensier: number;
|
|
40
|
-
nadeq: number;
|
|
41
|
-
v40_ecs_journalier: number;
|
|
42
|
-
v40_ecs_journalier_depensier: number;
|
|
43
|
-
besoin_ch: number;
|
|
44
|
-
besoin_ch_depensier: number;
|
|
45
|
-
besoin_ecs: number;
|
|
46
|
-
besoin_ecs_depensier: number;
|
|
47
|
-
besoin_fr: number;
|
|
48
|
-
besoin_fr_depensier: number;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export interface EfConso {
|
|
52
|
-
conso_ch: number;
|
|
53
|
-
conso_ch_depensier: number;
|
|
54
|
-
conso_ecs: number;
|
|
55
|
-
conso_ecs_depensier: number;
|
|
56
|
-
conso_eclairage: number;
|
|
57
|
-
conso_auxiliaire_generation_ch: number;
|
|
58
|
-
conso_auxiliaire_generation_ch_depensier: number;
|
|
59
|
-
conso_auxiliaire_distribution_ch: number;
|
|
60
|
-
conso_auxiliaire_generation_ecs: number;
|
|
61
|
-
conso_auxiliaire_generation_ecs_depensier: number;
|
|
62
|
-
conso_auxiliaire_distribution_ecs: number;
|
|
63
|
-
conso_auxiliaire_distribution_fr?: number;
|
|
64
|
-
conso_auxiliaire_ventilation: number;
|
|
65
|
-
conso_totale_auxiliaire: number;
|
|
66
|
-
conso_fr: number;
|
|
67
|
-
conso_fr_depensier: number;
|
|
68
|
-
conso_5_usages: number;
|
|
69
|
-
conso_5_usages_m2: number;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export interface EpConso {
|
|
73
|
-
ep_conso_ch: number;
|
|
74
|
-
ep_conso_ch_depensier: number;
|
|
75
|
-
ep_conso_ecs: number;
|
|
76
|
-
ep_conso_ecs_depensier: number;
|
|
77
|
-
ep_conso_eclairage: number;
|
|
78
|
-
ep_conso_auxiliaire_generation_ch: number;
|
|
79
|
-
ep_conso_auxiliaire_generation_ch_depensier: number;
|
|
80
|
-
ep_conso_auxiliaire_distribution_ch: number;
|
|
81
|
-
ep_conso_auxiliaire_generation_ecs: number;
|
|
82
|
-
ep_conso_auxiliaire_generation_ecs_depensier: number;
|
|
83
|
-
ep_conso_auxiliaire_distribution_ecs: number;
|
|
84
|
-
ep_conso_auxiliaire_distribution_fr?: number;
|
|
85
|
-
ep_conso_auxiliaire_ventilation: number;
|
|
86
|
-
ep_conso_totale_auxiliaire: number;
|
|
87
|
-
ep_conso_fr: number;
|
|
88
|
-
ep_conso_fr_depensier: number;
|
|
89
|
-
ep_conso_5_usages: number;
|
|
90
|
-
ep_conso_5_usages_m2: number;
|
|
91
|
-
classe_bilan_dpe: string;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export interface EmissionGes {
|
|
95
|
-
emission_ges_ch: number;
|
|
96
|
-
emission_ges_ch_depensier: number;
|
|
97
|
-
emission_ges_ecs: number;
|
|
98
|
-
emission_ges_ecs_depensier: number;
|
|
99
|
-
emission_ges_eclairage: number;
|
|
100
|
-
emission_ges_auxiliaire_generation_ch: number;
|
|
101
|
-
emission_ges_auxiliaire_generation_ch_depensier: number;
|
|
102
|
-
emission_ges_auxiliaire_distribution_ch: number;
|
|
103
|
-
emission_ges_auxiliaire_generation_ecs: number;
|
|
104
|
-
emission_ges_auxiliaire_generation_ecs_depensier: number;
|
|
105
|
-
emission_ges_auxiliaire_distribution_ecs: number;
|
|
106
|
-
emission_ges_auxiliaire_distribution_fr?: number;
|
|
107
|
-
emission_ges_auxiliaire_ventilation: number;
|
|
108
|
-
emission_ges_totale_auxiliaire: number;
|
|
109
|
-
emission_ges_fr: number;
|
|
110
|
-
emission_ges_fr_depensier: number;
|
|
111
|
-
emission_ges_5_usages: number;
|
|
112
|
-
emission_ges_5_usages_m2: number;
|
|
113
|
-
classe_emission_ges: string;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
export interface Cout {
|
|
117
|
-
cout_ch: number;
|
|
118
|
-
cout_ch_depensier: number;
|
|
119
|
-
cout_ecs: number;
|
|
120
|
-
cout_ecs_depensier: number;
|
|
121
|
-
cout_eclairage: number;
|
|
122
|
-
cout_auxiliaire_generation_ch: number;
|
|
123
|
-
cout_auxiliaire_generation_ch_depensier: number;
|
|
124
|
-
cout_auxiliaire_distribution_ch: number;
|
|
125
|
-
cout_auxiliaire_generation_ecs: number;
|
|
126
|
-
cout_auxiliaire_generation_ecs_depensier: number;
|
|
127
|
-
cout_auxiliaire_distribution_ecs: number;
|
|
128
|
-
cout_auxiliaire_distribution_fr?: number;
|
|
129
|
-
cout_auxiliaire_ventilation: number;
|
|
130
|
-
cout_total_auxiliaire: number;
|
|
131
|
-
cout_fr: number;
|
|
132
|
-
cout_fr_depensier: number;
|
|
133
|
-
cout_5_usages: number;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
export interface ProductionElectricite {
|
|
137
|
-
production_pv: number;
|
|
138
|
-
conso_elec_ac: number;
|
|
139
|
-
conso_elec_ac_ch: number;
|
|
140
|
-
conso_elec_ac_ecs: number;
|
|
141
|
-
conso_elec_ac_fr: number;
|
|
142
|
-
conso_elec_ac_eclairage: number;
|
|
143
|
-
conso_elec_ac_auxiliaire: number;
|
|
144
|
-
conso_elec_ac_autre_usage: number;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
export interface SortieParEnergie {
|
|
148
|
-
enum_type_energie_id: number;
|
|
149
|
-
conso_ch: number;
|
|
150
|
-
conso_ecs: number;
|
|
151
|
-
conso_5_usages: number;
|
|
152
|
-
emission_ges_ch: number;
|
|
153
|
-
emission_ges_ecs: number;
|
|
154
|
-
emission_ges_5_usages: number;
|
|
155
|
-
cout_ch: number;
|
|
156
|
-
cout_ecs: number;
|
|
157
|
-
cout_5_usages: number;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
export interface ConfortEte {
|
|
161
|
-
isolation_toiture?: boolean;
|
|
162
|
-
protection_solaire_exterieure: boolean;
|
|
163
|
-
aspect_traversant?: boolean;
|
|
164
|
-
brasseur_air?: boolean;
|
|
165
|
-
inertie_lourde: boolean;
|
|
166
|
-
enum_indicateur_confort_ete_id: number;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
export interface QualiteIsolation {
|
|
170
|
-
ubat: number;
|
|
171
|
-
qualite_isol_enveloppe: number;
|
|
172
|
-
qualite_isol_mur?: number;
|
|
173
|
-
qualite_isol_plancher_haut_toit_terrasse?: number;
|
|
174
|
-
qualite_isol_plancher_haut_comble_perdu?: number;
|
|
175
|
-
qualite_isol_plancher_haut_comble_amenage?: number;
|
|
176
|
-
qualite_isol_plancher_bas?: number;
|
|
177
|
-
qualite_isol_menuiserie: number;
|
|
178
19
|
}
|
|
20
|
+
export type Deperdition = XsdLogementSortieDeperdition;
|
|
21
|
+
export type ApportEtBesoin = XsdLogementSortieApportEtBesoin;
|
|
22
|
+
export type EfConso = XsdLogementSortieEfConso;
|
|
23
|
+
/** + champs Open3CL hors XSD : indicateurs « 2027 ». */
|
|
24
|
+
export type EpConso = XsdLogementSortieEpConso & {
|
|
25
|
+
classe_bilan_dpe_2027?: string;
|
|
26
|
+
ep_conso_5_usages_2027?: number;
|
|
27
|
+
ep_conso_5_usages_2027_m2?: number;
|
|
28
|
+
};
|
|
29
|
+
export type EmissionGes = XsdLogementSortieEmissionGes;
|
|
30
|
+
export type Cout = XsdLogementSortieCout;
|
|
31
|
+
export type ProductionElectricite = XsdLogementSortieProductionElectricite;
|
|
32
|
+
export type SortieParEnergie = XsdLogementSortieSortieParEnergie;
|
|
33
|
+
export type ConfortEte = XsdLogementSortieConfortEte;
|
|
34
|
+
export type QualiteIsolation = XsdLogementSortieQualiteIsolation;
|
|
@@ -1,30 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
// Alias des types générés depuis le XSD DPE (voir dpe-xsd.generated.ts). Les extensions propres
|
|
2
|
+
// à Open3CL se déclarent ici (hors fichier généré) pour survivre à la régénération.
|
|
3
|
+
import type {
|
|
4
|
+
XsdLogementVentilation,
|
|
5
|
+
XsdLogementVentilationDonneeEntree,
|
|
6
|
+
XsdLogementVentilationDonneeIntermediaire
|
|
7
|
+
} from './dpe-xsd.generated';
|
|
2
8
|
|
|
3
|
-
export interface Ventilation {
|
|
4
|
-
donnee_entree
|
|
5
|
-
donnee_intermediaire?: VentilationDI;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export interface VentilationDE extends DE {
|
|
9
|
-
enum_type_ventilation_id: number;
|
|
10
|
-
surface_ventile: number;
|
|
11
|
-
plusieurs_facade_exposee: boolean;
|
|
12
|
-
tv_q4pa_conv_id?: number;
|
|
13
|
-
q4pa_conv_saisi?: number;
|
|
14
|
-
enum_methode_saisie_q4pa_conv_id: number;
|
|
15
|
-
tv_debits_ventilation_id: number;
|
|
16
|
-
ventilation_post_2012: boolean;
|
|
17
|
-
ref_produit_ventilation?: number;
|
|
18
|
-
cle_repartition_ventilation?: number;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export interface VentilationDI {
|
|
22
|
-
pvent_moy?: number;
|
|
23
|
-
q4pa_conv: number;
|
|
24
|
-
conso_auxiliaire_ventilation: number;
|
|
25
|
-
hperm: number;
|
|
26
|
-
hvent: number;
|
|
9
|
+
export interface Ventilation extends Omit<XsdLogementVentilation, 'donnee_entree'> {
|
|
10
|
+
donnee_entree: VentilationDE;
|
|
27
11
|
}
|
|
12
|
+
/** + champs Open3CL hors XSD issus des fiches techniques. */
|
|
13
|
+
export type VentilationDE = XsdLogementVentilationDonneeEntree & {
|
|
14
|
+
ficheTechniqueFacadesExposees?: any;
|
|
15
|
+
ficheTechniqueVentilationPost2012?: any;
|
|
16
|
+
};
|
|
17
|
+
export type VentilationDI = XsdLogementVentilationDonneeIntermediaire;
|
|
28
18
|
|
|
29
19
|
enum TypeVentilation {
|
|
30
20
|
SIMPLE_FLUX_AUTO = 'SIMPLE_FLUX_AUTO',
|
|
@@ -5,9 +5,11 @@ import { beforeEach, describe, expect, test, vi } from 'vitest';
|
|
|
5
5
|
// du comportement réel de `DpePreProcessor` (testé dans son propre spec).
|
|
6
6
|
const preprocessMock = vi.fn();
|
|
7
7
|
vi.mock('../../../preprocessor/index.js', () => ({
|
|
8
|
-
DpePreProcessor: vi.fn(
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
DpePreProcessor: vi.fn(function () {
|
|
9
|
+
return {
|
|
10
|
+
preprocess: preprocessMock
|
|
11
|
+
};
|
|
12
|
+
})
|
|
11
13
|
}));
|
|
12
14
|
|
|
13
15
|
const { DpeNormalizerService } = await import('./dpe-normalizer.service.js');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open3cl/engine",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.3",
|
|
4
4
|
"description": "Open Source 3CL-DPE engine",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"directories": {
|
|
@@ -26,7 +26,8 @@
|
|
|
26
26
|
"qa:format": "prettier --plugin-search-dir . --write .",
|
|
27
27
|
"release": "semantic-release",
|
|
28
28
|
"release:dry": "semantic-release --dry-run",
|
|
29
|
-
"prepare": "husky
|
|
29
|
+
"prepare": "husky",
|
|
30
|
+
"types:generate": "node scripts/generate_types_from_xsd.js && prettier --write src/features/dpe/domain/models/dpe-xsd.generated.ts",
|
|
30
31
|
"assets:sync": "node scripts/synchronize_assets.js",
|
|
31
32
|
"version:update": "node scripts/update_version.js",
|
|
32
33
|
"reports:preview": "npm run http-server dist/reports/corpus -o",
|
|
@@ -45,43 +46,40 @@
|
|
|
45
46
|
],
|
|
46
47
|
"dependencies": {
|
|
47
48
|
"dioma": "^0.4.6",
|
|
48
|
-
"fast-xml-parser": "^5.11.
|
|
49
|
+
"fast-xml-parser": "^5.11.2",
|
|
49
50
|
"lodash-es": "^4.18.1",
|
|
50
51
|
"winston": "^3.19.0"
|
|
51
52
|
},
|
|
52
53
|
"devDependencies": {
|
|
53
|
-
"@aws-sdk/client-s3": "^3.
|
|
54
|
-
"@commitlint/cli": "^
|
|
55
|
-
"@commitlint/config-conventional": "^
|
|
56
|
-
"@commitlint/cz-commitlint": "^
|
|
57
|
-
"@duckdb/node-api": "^
|
|
58
|
-
"@
|
|
54
|
+
"@aws-sdk/client-s3": "^3.1160.0",
|
|
55
|
+
"@commitlint/cli": "^21.2.4",
|
|
56
|
+
"@commitlint/config-conventional": "^21.2.4",
|
|
57
|
+
"@commitlint/cz-commitlint": "^21.2.4",
|
|
58
|
+
"@duckdb/node-api": "^2.0.0-r.1",
|
|
59
|
+
"@eslint/js": "^10.0.1",
|
|
60
|
+
"@semantic-release/changelog": "^7.0.0",
|
|
59
61
|
"@semantic-release/commit-analyzer": "^13.0.1",
|
|
60
62
|
"@semantic-release/exec": "^7.1.0",
|
|
61
|
-
"@semantic-release/git": "^
|
|
62
|
-
"@semantic-release/github": "^12.0.
|
|
63
|
-
"@types/node": "^
|
|
64
|
-
"@vitest/coverage-v8": "^
|
|
63
|
+
"@semantic-release/git": "^11.0.1",
|
|
64
|
+
"@semantic-release/github": "^12.0.10",
|
|
65
|
+
"@types/node": "^24.19.2",
|
|
66
|
+
"@vitest/coverage-v8": "^5.0.5",
|
|
65
67
|
"ansi-colors": "^4.1.3",
|
|
66
68
|
"cli-progress": "^3.12.0",
|
|
67
69
|
"deep-object-diff": "^1.1.9",
|
|
68
|
-
"eslint": "^
|
|
69
|
-
"eslint-config-prettier": "^
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"eslint-plugin-import": "^2.29.1",
|
|
73
|
-
"eslint-plugin-n": "^16.6.2",
|
|
74
|
-
"eslint-plugin-promise": "^6.1.1",
|
|
75
|
-
"fast-csv": "^5.0.2",
|
|
70
|
+
"eslint": "^10.14.0",
|
|
71
|
+
"eslint-config-prettier": "^10.1.8",
|
|
72
|
+
"fast-csv": "^5.0.8",
|
|
73
|
+
"globals": "^17.13.0",
|
|
76
74
|
"http-server": "^14.1.1",
|
|
77
|
-
"husky": "^9.
|
|
78
|
-
"js-yaml": "^
|
|
79
|
-
"jscpd": "^
|
|
80
|
-
"piscina": "^5.
|
|
81
|
-
"prettier": "^3.
|
|
75
|
+
"husky": "^9.1.7",
|
|
76
|
+
"js-yaml": "^5.5.0",
|
|
77
|
+
"jscpd": "^5.4.2",
|
|
78
|
+
"piscina": "^5.3.2",
|
|
79
|
+
"prettier": "^3.9.10",
|
|
82
80
|
"pretty-quick": "^4.0.0",
|
|
83
|
-
"semantic-release": "^25.0.
|
|
84
|
-
"vitest": "
|
|
81
|
+
"semantic-release": "^25.0.9",
|
|
82
|
+
"vitest": "^5.0.5",
|
|
85
83
|
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz"
|
|
86
84
|
},
|
|
87
85
|
"author": "Open3Cl",
|
|
@@ -92,21 +90,5 @@
|
|
|
92
90
|
"bugs": {
|
|
93
91
|
"url": "https://github.com/Open3CL/engine/issues"
|
|
94
92
|
},
|
|
95
|
-
"homepage": "https://github.com/Open3CL/engine#readme"
|
|
96
|
-
"jscpd": {
|
|
97
|
-
"threshold": 0.1,
|
|
98
|
-
"reporters": [
|
|
99
|
-
"console",
|
|
100
|
-
"html"
|
|
101
|
-
],
|
|
102
|
-
"ignore": [
|
|
103
|
-
"**/*.spec.js"
|
|
104
|
-
],
|
|
105
|
-
"path": [
|
|
106
|
-
"src"
|
|
107
|
-
],
|
|
108
|
-
"output": "./duplicate",
|
|
109
|
-
"absolute": true,
|
|
110
|
-
"gitignore": true
|
|
111
|
-
}
|
|
93
|
+
"homepage": "https://github.com/Open3CL/engine#readme"
|
|
112
94
|
}
|
package/utils.js
CHANGED
|
@@ -459,12 +459,11 @@ export function tv(filePath, matcher) {
|
|
|
459
459
|
function tvLookup(filePath, matcher) {
|
|
460
460
|
const list = tvs[filePath];
|
|
461
461
|
const matcher_size = Object.keys(matcher).length;
|
|
462
|
-
let match_count = 0;
|
|
463
462
|
let max_match_count = 0;
|
|
464
463
|
let match = null;
|
|
465
464
|
|
|
466
465
|
for (const row of list) {
|
|
467
|
-
match_count = 0;
|
|
466
|
+
let match_count = 0;
|
|
468
467
|
for (const key in matcher) {
|
|
469
468
|
if (tvMatchImpl(row, key, matcher)) match_count += 1;
|
|
470
469
|
}
|
package/utils.spec.js
CHANGED
|
@@ -215,6 +215,14 @@ describe('Utils unit tests', () => {
|
|
|
215
215
|
expect(obj.other).toBe(3);
|
|
216
216
|
expect(obj.nested.enum_c).toBe('7');
|
|
217
217
|
});
|
|
218
|
+
|
|
219
|
+
test('ignore les propriétés héritées du prototype', () => {
|
|
220
|
+
const obj = Object.create({ enum_herite: 5 });
|
|
221
|
+
obj.enum_propre = 6;
|
|
222
|
+
useEnumAsString(obj);
|
|
223
|
+
expect(obj.enum_propre).toBe('6');
|
|
224
|
+
expect(obj.enum_herite).toBe(5);
|
|
225
|
+
});
|
|
218
226
|
});
|
|
219
227
|
|
|
220
228
|
// -------------------------------------------------------------------------------------------
|
|
@@ -589,6 +597,14 @@ describe('Utils unit tests', () => {
|
|
|
589
597
|
expect(obj.nested.remove_me).toBeUndefined();
|
|
590
598
|
expect(obj.nested.b).toBe(5);
|
|
591
599
|
});
|
|
600
|
+
|
|
601
|
+
test('ignore les propriétés héritées du prototype', () => {
|
|
602
|
+
const obj = Object.create({ remove_me: 1, herite: { remove_me: 2 } });
|
|
603
|
+
obj.propre = 1;
|
|
604
|
+
removeKeyFromJSON(obj, 'remove_me', []);
|
|
605
|
+
expect(obj.remove_me).toBe(1);
|
|
606
|
+
expect(obj.herite.remove_me).toBe(2);
|
|
607
|
+
});
|
|
592
608
|
});
|
|
593
609
|
|
|
594
610
|
// -------------------------------------------------------------------------------------------
|