ecotransac-shared-js 1.2.32 → 1.2.33

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,16 @@ 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
+ props: { options: APARTMENT_FLOOR_COUNT },
1252
1268
  requiredFor: ["DIFFUSION"]
1253
1269
  },
1254
1270
  {
@@ -1899,14 +1915,15 @@ var getTierInfo = (realizedRevenue) => {
1899
1915
  };
1900
1916
  // Annotate the CommonJS export names for ESM import in node:
1901
1917
  0 && (module.exports = {
1918
+ APARTMENT_FLOOR_COUNT,
1902
1919
  COMPANY_INFO,
1903
1920
  CONDITIONS,
1904
1921
  COUNTRIES,
1905
1922
  ESTATE_CONDITION,
1906
1923
  EXPOSURES,
1907
- FLOOR_COUNT,
1908
1924
  GENDER,
1909
1925
  HEATING_ENERGY,
1926
+ HOUSE_FLOOR_COUNT,
1910
1927
  INSULATION_LEVELS,
1911
1928
  KITCHEN_TYPE,
1912
1929
  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,16 @@ 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
+ props: { options: APARTMENT_FLOOR_COUNT },
1158
1173
  requiredFor: ["DIFFUSION"]
1159
1174
  },
1160
1175
  {
@@ -1804,14 +1819,15 @@ var getTierInfo = (realizedRevenue) => {
1804
1819
  return tierInfo;
1805
1820
  };
1806
1821
  export {
1822
+ APARTMENT_FLOOR_COUNT,
1807
1823
  COMPANY_INFO,
1808
1824
  CONDITIONS,
1809
1825
  COUNTRIES,
1810
1826
  ESTATE_CONDITION,
1811
1827
  EXPOSURES,
1812
- FLOOR_COUNT,
1813
1828
  GENDER,
1814
1829
  HEATING_ENERGY,
1830
+ HOUSE_FLOOR_COUNT,
1815
1831
  INSULATION_LEVELS,
1816
1832
  KITCHEN_TYPE,
1817
1833
  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.33",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "modules": "dist/index.mjs",