ecotransac-shared-js 1.2.32 → 1.2.34

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/index.d.mts CHANGED
@@ -925,7 +925,8 @@ declare const LEASE_ESTABLISHMENT: SelectOption<LeaseEstablishment>[];
925
925
  declare const LEASE_TRANSFERT_PERMISSIONS: SelectOption<LeaseTransfertPermission>[];
926
926
  declare const KITCHEN_TYPE: SelectOption<KitchenType>[];
927
927
  declare const HEATING_ENERGY: SelectOption<HeatingEnergy>[];
928
- declare const FLOOR_COUNT: SelectOption<number>[];
928
+ declare const HOUSE_FLOOR_COUNT: SelectOption<number>[];
929
+ declare const APARTMENT_FLOOR_COUNT: SelectOption<number>[];
929
930
 
930
931
  type StateType$2 = Pick<Property, "isForProfessionalUse" | "propertyType" | "isOccupied" | "isCoOwnership" | "isHousingScheme" | "isBusinessAssetsTransfer" | "isLeaseRightsTransfer" | "isCommercialWallsSale" | "isDpeCompleted" | "isEnergyAuditCompleted" | "leaseEstablishedUnder" | "constructionYear">;
931
932
  declare const getPropertyState: (property: StateType$2) => State;
@@ -1011,4 +1012,4 @@ type TierStep = {
1011
1012
  declare const TIER_INFOS: TierStep[];
1012
1013
  declare const getTierInfo: (realizedRevenue: number) => TierStep;
1013
1014
 
1014
- export { COMPANY_INFO, CONDITIONS, COUNTRIES, type Condition, ESTATE_CONDITION, EXPOSURES, FLOOR_COUNT, type Field, GENDER, HEATING_ENERGY, INSULATION_LEVELS, KITCHEN_TYPE, LEASE_ESTABLISHMENT, LEASE_TRANSFERT_PERMISSIONS, LEGAL_NATURE, LEGAL_STATUS, MANDATE_EXCLUSIVITY, MARITAL_STATUS, PRENUP_TYPES, RENOVATION_TYPES, SHARING_CONFIGURATION, STANDINGS, type SelectOption, type State, TIER_INFOS, VIEWS, and, contactFormFields, featuresFormFields, formatAddress, formatAgentLegalData, formatDate, formatMandateNumber, formatNumber, formatPhone, formatPrice, formatReference, formatRegistrationNumber, formatSeconds, getAgencyFeesPercentage, getContactState, getDisplayedPrice, getFeesPercentage, getIsLowPrice, getLabel, getLowThreshold, getNetPrice, getPropertyState, getPropertyTitle, getRenovationState, getTierInfo, getValue, mandateFormFields, not, only, or, propertyFields, renovationFormFields, renovationProjectFormFields, renovationPropertyFormFields, shouldRender, surfacesFormFields, technicalFormFields };
1015
+ export { APARTMENT_FLOOR_COUNT, COMPANY_INFO, CONDITIONS, COUNTRIES, type Condition, ESTATE_CONDITION, EXPOSURES, type Field, GENDER, HEATING_ENERGY, HOUSE_FLOOR_COUNT, INSULATION_LEVELS, KITCHEN_TYPE, LEASE_ESTABLISHMENT, LEASE_TRANSFERT_PERMISSIONS, LEGAL_NATURE, LEGAL_STATUS, MANDATE_EXCLUSIVITY, MARITAL_STATUS, PRENUP_TYPES, RENOVATION_TYPES, SHARING_CONFIGURATION, STANDINGS, type SelectOption, type State, TIER_INFOS, VIEWS, and, contactFormFields, featuresFormFields, formatAddress, formatAgentLegalData, formatDate, formatMandateNumber, formatNumber, formatPhone, formatPrice, formatReference, formatRegistrationNumber, formatSeconds, getAgencyFeesPercentage, getContactState, getDisplayedPrice, getFeesPercentage, getIsLowPrice, getLabel, getLowThreshold, getNetPrice, getPropertyState, getPropertyTitle, getRenovationState, getTierInfo, getValue, mandateFormFields, not, only, or, propertyFields, renovationFormFields, renovationProjectFormFields, renovationPropertyFormFields, shouldRender, surfacesFormFields, technicalFormFields };
package/dist/index.d.ts CHANGED
@@ -925,7 +925,8 @@ declare const LEASE_ESTABLISHMENT: SelectOption<LeaseEstablishment>[];
925
925
  declare const LEASE_TRANSFERT_PERMISSIONS: SelectOption<LeaseTransfertPermission>[];
926
926
  declare const KITCHEN_TYPE: SelectOption<KitchenType>[];
927
927
  declare const HEATING_ENERGY: SelectOption<HeatingEnergy>[];
928
- declare const FLOOR_COUNT: SelectOption<number>[];
928
+ declare const HOUSE_FLOOR_COUNT: SelectOption<number>[];
929
+ declare const APARTMENT_FLOOR_COUNT: SelectOption<number>[];
929
930
 
930
931
  type StateType$2 = Pick<Property, "isForProfessionalUse" | "propertyType" | "isOccupied" | "isCoOwnership" | "isHousingScheme" | "isBusinessAssetsTransfer" | "isLeaseRightsTransfer" | "isCommercialWallsSale" | "isDpeCompleted" | "isEnergyAuditCompleted" | "leaseEstablishedUnder" | "constructionYear">;
931
932
  declare const getPropertyState: (property: StateType$2) => State;
@@ -1011,4 +1012,4 @@ type TierStep = {
1011
1012
  declare const TIER_INFOS: TierStep[];
1012
1013
  declare const getTierInfo: (realizedRevenue: number) => TierStep;
1013
1014
 
1014
- export { COMPANY_INFO, CONDITIONS, COUNTRIES, type Condition, ESTATE_CONDITION, EXPOSURES, FLOOR_COUNT, type Field, GENDER, HEATING_ENERGY, INSULATION_LEVELS, KITCHEN_TYPE, LEASE_ESTABLISHMENT, LEASE_TRANSFERT_PERMISSIONS, LEGAL_NATURE, LEGAL_STATUS, MANDATE_EXCLUSIVITY, MARITAL_STATUS, PRENUP_TYPES, RENOVATION_TYPES, SHARING_CONFIGURATION, STANDINGS, type SelectOption, type State, TIER_INFOS, VIEWS, and, contactFormFields, featuresFormFields, formatAddress, formatAgentLegalData, formatDate, formatMandateNumber, formatNumber, formatPhone, formatPrice, formatReference, formatRegistrationNumber, formatSeconds, getAgencyFeesPercentage, getContactState, getDisplayedPrice, getFeesPercentage, getIsLowPrice, getLabel, getLowThreshold, getNetPrice, getPropertyState, getPropertyTitle, getRenovationState, getTierInfo, getValue, mandateFormFields, not, only, or, propertyFields, renovationFormFields, renovationProjectFormFields, renovationPropertyFormFields, shouldRender, surfacesFormFields, technicalFormFields };
1015
+ export { APARTMENT_FLOOR_COUNT, COMPANY_INFO, CONDITIONS, COUNTRIES, type Condition, ESTATE_CONDITION, EXPOSURES, type Field, GENDER, HEATING_ENERGY, HOUSE_FLOOR_COUNT, INSULATION_LEVELS, KITCHEN_TYPE, LEASE_ESTABLISHMENT, LEASE_TRANSFERT_PERMISSIONS, LEGAL_NATURE, LEGAL_STATUS, MANDATE_EXCLUSIVITY, MARITAL_STATUS, PRENUP_TYPES, RENOVATION_TYPES, SHARING_CONFIGURATION, STANDINGS, type SelectOption, type State, TIER_INFOS, VIEWS, and, contactFormFields, featuresFormFields, formatAddress, formatAgentLegalData, formatDate, formatMandateNumber, formatNumber, formatPhone, formatPrice, formatReference, formatRegistrationNumber, formatSeconds, getAgencyFeesPercentage, getContactState, getDisplayedPrice, getFeesPercentage, getIsLowPrice, getLabel, getLowThreshold, getNetPrice, getPropertyState, getPropertyTitle, getRenovationState, getTierInfo, getValue, mandateFormFields, not, only, or, propertyFields, renovationFormFields, renovationProjectFormFields, renovationPropertyFormFields, shouldRender, surfacesFormFields, technicalFormFields };
package/dist/index.js CHANGED
@@ -30,14 +30,15 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  // src/index.ts
31
31
  var index_exports = {};
32
32
  __export(index_exports, {
33
+ APARTMENT_FLOOR_COUNT: () => APARTMENT_FLOOR_COUNT,
33
34
  COMPANY_INFO: () => COMPANY_INFO,
34
35
  CONDITIONS: () => CONDITIONS,
35
36
  COUNTRIES: () => COUNTRIES,
36
37
  ESTATE_CONDITION: () => ESTATE_CONDITION,
37
38
  EXPOSURES: () => EXPOSURES,
38
- FLOOR_COUNT: () => FLOOR_COUNT,
39
39
  GENDER: () => GENDER,
40
40
  HEATING_ENERGY: () => HEATING_ENERGY,
41
+ HOUSE_FLOOR_COUNT: () => HOUSE_FLOOR_COUNT,
41
42
  INSULATION_LEVELS: () => INSULATION_LEVELS,
42
43
  KITCHEN_TYPE: () => KITCHEN_TYPE,
43
44
  LEASE_ESTABLISHMENT: () => LEASE_ESTABLISHMENT,
@@ -578,13 +579,20 @@ var HEATING_ENERGY = [
578
579
  { label: "Fioul", value: "FUEL" },
579
580
  { label: "Autre", value: "OTHER" }
580
581
  ];
581
- var FLOOR_COUNT = [
582
+ var HOUSE_FLOOR_COUNT = [
582
583
  { value: 1, label: "RDC" },
583
584
  { value: 2, label: "RDC + 1 \xE9tage" },
584
585
  { value: 3, label: "RDC + 2 \xE9tages" },
585
586
  { value: 4, label: "RDC + 3 \xE9tages" },
586
587
  { value: 5, label: "RDC + 4 \xE9tages ou plus" }
587
588
  ];
589
+ var APARTMENT_FLOOR_COUNT = [
590
+ { value: 1, label: "1 niveau - Plain-pied" },
591
+ { value: 2, label: "2 niveaux - Duplex" },
592
+ { value: 3, label: "3 niveaux - Triplex" },
593
+ { value: 4, label: "4 niveaux - Quadruplex" },
594
+ { value: 5, label: "5 niveaux ou plus - Multiplex" }
595
+ ];
588
596
 
589
597
  // src/static/property/fields.ts
590
598
  var featuresFormFields = [
@@ -1231,8 +1239,8 @@ var surfacesFormFields = [
1231
1239
  {
1232
1240
  name: "floorLevel",
1233
1241
  fieldType: "number",
1234
- label: "\xC9tage du bien",
1235
- condition: and(not("isLand"), not("isHouse"), not("isBuilding")),
1242
+ label: "\xC0 quel \xE9tage se situe le logement ?",
1243
+ condition: only("isApartment"),
1236
1244
  requiredFor: ["DIFFUSION"]
1237
1245
  },
1238
1246
  {
@@ -1247,8 +1255,22 @@ var surfacesFormFields = [
1247
1255
  name: "floorCount",
1248
1256
  fieldType: "select-number",
1249
1257
  label: "Nombre de niveau(x) de la maison",
1250
- condition: and(not("isLand"), not("isParking")),
1251
- props: { options: FLOOR_COUNT },
1258
+ condition: only("isHouse"),
1259
+ props: { options: HOUSE_FLOOR_COUNT },
1260
+ requiredFor: ["DIFFUSION"]
1261
+ },
1262
+ {
1263
+ name: "floorCount",
1264
+ fieldType: "select-number",
1265
+ label: "Nombre de niveau(x) de l'appartement",
1266
+ // condition: only("isApartment"),
1267
+ condition: and(
1268
+ not("isLand"),
1269
+ not("isParking"),
1270
+ not("isHouse"),
1271
+ not("isBuilding")
1272
+ ),
1273
+ props: { options: APARTMENT_FLOOR_COUNT },
1252
1274
  requiredFor: ["DIFFUSION"]
1253
1275
  },
1254
1276
  {
@@ -1899,14 +1921,15 @@ var getTierInfo = (realizedRevenue) => {
1899
1921
  };
1900
1922
  // Annotate the CommonJS export names for ESM import in node:
1901
1923
  0 && (module.exports = {
1924
+ APARTMENT_FLOOR_COUNT,
1902
1925
  COMPANY_INFO,
1903
1926
  CONDITIONS,
1904
1927
  COUNTRIES,
1905
1928
  ESTATE_CONDITION,
1906
1929
  EXPOSURES,
1907
- FLOOR_COUNT,
1908
1930
  GENDER,
1909
1931
  HEATING_ENERGY,
1932
+ HOUSE_FLOOR_COUNT,
1910
1933
  INSULATION_LEVELS,
1911
1934
  KITCHEN_TYPE,
1912
1935
  LEASE_ESTABLISHMENT,
package/dist/index.mjs CHANGED
@@ -484,13 +484,20 @@ var HEATING_ENERGY = [
484
484
  { label: "Fioul", value: "FUEL" },
485
485
  { label: "Autre", value: "OTHER" }
486
486
  ];
487
- var FLOOR_COUNT = [
487
+ var HOUSE_FLOOR_COUNT = [
488
488
  { value: 1, label: "RDC" },
489
489
  { value: 2, label: "RDC + 1 \xE9tage" },
490
490
  { value: 3, label: "RDC + 2 \xE9tages" },
491
491
  { value: 4, label: "RDC + 3 \xE9tages" },
492
492
  { value: 5, label: "RDC + 4 \xE9tages ou plus" }
493
493
  ];
494
+ var APARTMENT_FLOOR_COUNT = [
495
+ { value: 1, label: "1 niveau - Plain-pied" },
496
+ { value: 2, label: "2 niveaux - Duplex" },
497
+ { value: 3, label: "3 niveaux - Triplex" },
498
+ { value: 4, label: "4 niveaux - Quadruplex" },
499
+ { value: 5, label: "5 niveaux ou plus - Multiplex" }
500
+ ];
494
501
 
495
502
  // src/static/property/fields.ts
496
503
  var featuresFormFields = [
@@ -1137,8 +1144,8 @@ var surfacesFormFields = [
1137
1144
  {
1138
1145
  name: "floorLevel",
1139
1146
  fieldType: "number",
1140
- label: "\xC9tage du bien",
1141
- condition: and(not("isLand"), not("isHouse"), not("isBuilding")),
1147
+ label: "\xC0 quel \xE9tage se situe le logement ?",
1148
+ condition: only("isApartment"),
1142
1149
  requiredFor: ["DIFFUSION"]
1143
1150
  },
1144
1151
  {
@@ -1153,8 +1160,22 @@ var surfacesFormFields = [
1153
1160
  name: "floorCount",
1154
1161
  fieldType: "select-number",
1155
1162
  label: "Nombre de niveau(x) de la maison",
1156
- condition: and(not("isLand"), not("isParking")),
1157
- props: { options: FLOOR_COUNT },
1163
+ condition: only("isHouse"),
1164
+ props: { options: HOUSE_FLOOR_COUNT },
1165
+ requiredFor: ["DIFFUSION"]
1166
+ },
1167
+ {
1168
+ name: "floorCount",
1169
+ fieldType: "select-number",
1170
+ label: "Nombre de niveau(x) de l'appartement",
1171
+ // condition: only("isApartment"),
1172
+ condition: and(
1173
+ not("isLand"),
1174
+ not("isParking"),
1175
+ not("isHouse"),
1176
+ not("isBuilding")
1177
+ ),
1178
+ props: { options: APARTMENT_FLOOR_COUNT },
1158
1179
  requiredFor: ["DIFFUSION"]
1159
1180
  },
1160
1181
  {
@@ -1804,14 +1825,15 @@ var getTierInfo = (realizedRevenue) => {
1804
1825
  return tierInfo;
1805
1826
  };
1806
1827
  export {
1828
+ APARTMENT_FLOOR_COUNT,
1807
1829
  COMPANY_INFO,
1808
1830
  CONDITIONS,
1809
1831
  COUNTRIES,
1810
1832
  ESTATE_CONDITION,
1811
1833
  EXPOSURES,
1812
- FLOOR_COUNT,
1813
1834
  GENDER,
1814
1835
  HEATING_ENERGY,
1836
+ HOUSE_FLOOR_COUNT,
1815
1837
  INSULATION_LEVELS,
1816
1838
  KITCHEN_TYPE,
1817
1839
  LEASE_ESTABLISHMENT,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ecotransac-shared-js",
3
- "version": "1.2.32",
3
+ "version": "1.2.34",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "modules": "dist/index.mjs",