ecotransac-shared-js 1.2.30 → 1.2.31

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
@@ -864,7 +864,7 @@ type Field = {
864
864
  condition?: Condition;
865
865
  requiredFor?: RequiredFor[];
866
866
  props?: Record<string, unknown> & {
867
- options?: SelectOption<string>[];
867
+ options?: SelectOption<string | number>[];
868
868
  suffix?: string;
869
869
  tooltip?: string;
870
870
  placeholder?: string;
@@ -875,7 +875,7 @@ type State = {
875
875
  [key: string]: boolean;
876
876
  };
877
877
  type Condition = (state: State) => boolean;
878
- type SelectOption<T extends string> = {
878
+ type SelectOption<T> = {
879
879
  value: T;
880
880
  label: string;
881
881
  };
@@ -925,6 +925,7 @@ 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
929
 
929
930
  type StateType$2 = Pick<Property, "isForProfessionalUse" | "propertyType" | "isOccupied" | "isCoOwnership" | "isHousingScheme" | "isBusinessAssetsTransfer" | "isLeaseRightsTransfer" | "isCommercialWallsSale" | "isDpeCompleted" | "isEnergyAuditCompleted" | "leaseEstablishedUnder" | "constructionYear">;
930
931
  declare const getPropertyState: (property: StateType$2) => State;
@@ -1010,4 +1011,4 @@ type TierStep = {
1010
1011
  declare const TIER_INFOS: TierStep[];
1011
1012
  declare const getTierInfo: (realizedRevenue: number) => TierStep;
1012
1013
 
1013
- export { COMPANY_INFO, CONDITIONS, COUNTRIES, type Condition, ESTATE_CONDITION, EXPOSURES, 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 };
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 };
package/dist/index.d.ts CHANGED
@@ -864,7 +864,7 @@ type Field = {
864
864
  condition?: Condition;
865
865
  requiredFor?: RequiredFor[];
866
866
  props?: Record<string, unknown> & {
867
- options?: SelectOption<string>[];
867
+ options?: SelectOption<string | number>[];
868
868
  suffix?: string;
869
869
  tooltip?: string;
870
870
  placeholder?: string;
@@ -875,7 +875,7 @@ type State = {
875
875
  [key: string]: boolean;
876
876
  };
877
877
  type Condition = (state: State) => boolean;
878
- type SelectOption<T extends string> = {
878
+ type SelectOption<T> = {
879
879
  value: T;
880
880
  label: string;
881
881
  };
@@ -925,6 +925,7 @@ 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
929
 
929
930
  type StateType$2 = Pick<Property, "isForProfessionalUse" | "propertyType" | "isOccupied" | "isCoOwnership" | "isHousingScheme" | "isBusinessAssetsTransfer" | "isLeaseRightsTransfer" | "isCommercialWallsSale" | "isDpeCompleted" | "isEnergyAuditCompleted" | "leaseEstablishedUnder" | "constructionYear">;
930
931
  declare const getPropertyState: (property: StateType$2) => State;
@@ -1010,4 +1011,4 @@ type TierStep = {
1010
1011
  declare const TIER_INFOS: TierStep[];
1011
1012
  declare const getTierInfo: (realizedRevenue: number) => TierStep;
1012
1013
 
1013
- export { COMPANY_INFO, CONDITIONS, COUNTRIES, type Condition, ESTATE_CONDITION, EXPOSURES, 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 };
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 };
package/dist/index.js CHANGED
@@ -35,6 +35,7 @@ __export(index_exports, {
35
35
  COUNTRIES: () => COUNTRIES,
36
36
  ESTATE_CONDITION: () => ESTATE_CONDITION,
37
37
  EXPOSURES: () => EXPOSURES,
38
+ FLOOR_COUNT: () => FLOOR_COUNT,
38
39
  GENDER: () => GENDER,
39
40
  HEATING_ENERGY: () => HEATING_ENERGY,
40
41
  INSULATION_LEVELS: () => INSULATION_LEVELS,
@@ -577,6 +578,13 @@ var HEATING_ENERGY = [
577
578
  { label: "Fioul", value: "FUEL" },
578
579
  { label: "Autre", value: "OTHER" }
579
580
  ];
581
+ var FLOOR_COUNT = [
582
+ { value: 1, label: "RDC" },
583
+ { value: 2, label: "RDC + 1 \xE9tage" },
584
+ { value: 3, label: "RDC + 2 \xE9tages" },
585
+ { value: 4, label: "RDC + 3 \xE9tages" },
586
+ { value: 5, label: "RDC + 4 \xE9tages ou plus" }
587
+ ];
580
588
 
581
589
  // src/static/property/fields.ts
582
590
  var featuresFormFields = [
@@ -1237,13 +1245,10 @@ var surfacesFormFields = [
1237
1245
  },
1238
1246
  {
1239
1247
  name: "floorCount",
1240
- fieldType: "number",
1241
- label: "Nombre de niveau(x)",
1248
+ fieldType: "select",
1249
+ label: "Nombre de niveau(x) de la maison",
1242
1250
  condition: and(not("isLand"), not("isParking")),
1243
- props: {
1244
- suffix: "niveau(x)",
1245
- tooltip: "Total des \xE9tages que compte une propri\xE9t\xE9, comme un duplex ou une maison de 3 niveaux comprenant un rez-de-chauss\xE9e, un \xE9tage, et un grenier am\xE9nag\xE9."
1246
- },
1251
+ props: { options: FLOOR_COUNT },
1247
1252
  requiredFor: ["DIFFUSION"]
1248
1253
  },
1249
1254
  {
@@ -1899,6 +1904,7 @@ var getTierInfo = (realizedRevenue) => {
1899
1904
  COUNTRIES,
1900
1905
  ESTATE_CONDITION,
1901
1906
  EXPOSURES,
1907
+ FLOOR_COUNT,
1902
1908
  GENDER,
1903
1909
  HEATING_ENERGY,
1904
1910
  INSULATION_LEVELS,
package/dist/index.mjs CHANGED
@@ -484,6 +484,13 @@ var HEATING_ENERGY = [
484
484
  { label: "Fioul", value: "FUEL" },
485
485
  { label: "Autre", value: "OTHER" }
486
486
  ];
487
+ var FLOOR_COUNT = [
488
+ { value: 1, label: "RDC" },
489
+ { value: 2, label: "RDC + 1 \xE9tage" },
490
+ { value: 3, label: "RDC + 2 \xE9tages" },
491
+ { value: 4, label: "RDC + 3 \xE9tages" },
492
+ { value: 5, label: "RDC + 4 \xE9tages ou plus" }
493
+ ];
487
494
 
488
495
  // src/static/property/fields.ts
489
496
  var featuresFormFields = [
@@ -1144,13 +1151,10 @@ var surfacesFormFields = [
1144
1151
  },
1145
1152
  {
1146
1153
  name: "floorCount",
1147
- fieldType: "number",
1148
- label: "Nombre de niveau(x)",
1154
+ fieldType: "select",
1155
+ label: "Nombre de niveau(x) de la maison",
1149
1156
  condition: and(not("isLand"), not("isParking")),
1150
- props: {
1151
- suffix: "niveau(x)",
1152
- tooltip: "Total des \xE9tages que compte une propri\xE9t\xE9, comme un duplex ou une maison de 3 niveaux comprenant un rez-de-chauss\xE9e, un \xE9tage, et un grenier am\xE9nag\xE9."
1153
- },
1157
+ props: { options: FLOOR_COUNT },
1154
1158
  requiredFor: ["DIFFUSION"]
1155
1159
  },
1156
1160
  {
@@ -1805,6 +1809,7 @@ export {
1805
1809
  COUNTRIES,
1806
1810
  ESTATE_CONDITION,
1807
1811
  EXPOSURES,
1812
+ FLOOR_COUNT,
1808
1813
  GENDER,
1809
1814
  HEATING_ENERGY,
1810
1815
  INSULATION_LEVELS,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ecotransac-shared-js",
3
- "version": "1.2.30",
3
+ "version": "1.2.31",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "modules": "dist/index.mjs",