ecotransac-shared-js 1.1.18 → 1.1.20

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
@@ -913,7 +913,7 @@ type Field<T> = {
913
913
  className?: string;
914
914
  };
915
915
  };
916
- type FieldType = "text" | "number" | "select" | "textarea" | "radio" | "date" | "country" | "switch" | "propertyType" | "grade" | "year";
916
+ type FieldType = "text" | "number" | "select" | "textarea" | "radio" | "date" | "country" | "switch" | "propertyType" | "grade" | "year" | "exclusivity";
917
917
  type State = {
918
918
  [key: string]: boolean;
919
919
  };
package/dist/index.d.ts CHANGED
@@ -913,7 +913,7 @@ type Field<T> = {
913
913
  className?: string;
914
914
  };
915
915
  };
916
- type FieldType = "text" | "number" | "select" | "textarea" | "radio" | "date" | "country" | "switch" | "propertyType" | "grade" | "year";
916
+ type FieldType = "text" | "number" | "select" | "textarea" | "radio" | "date" | "country" | "switch" | "propertyType" | "grade" | "year" | "exclusivity";
917
917
  type State = {
918
918
  [key: string]: boolean;
919
919
  };
package/dist/index.js CHANGED
@@ -910,8 +910,15 @@ var technicalFormFields = [
910
910
  name: "isDpeCompleted",
911
911
  fieldType: "radio",
912
912
  label: "DPE r\xE9alis\xE9",
913
- condition: and(not("isParking"), not("isLand")),
914
- requiredFor: ["DIFFUSION" /* Diffusion */]
913
+ condition: and(not("isParking"), not("isLand"), not("isBuilding")),
914
+ requiredFor: ["MANDATE_CREATION" /* MandateCreation */]
915
+ },
916
+ {
917
+ name: "isDpeCompleted",
918
+ fieldType: "radio",
919
+ label: "DPE collectif r\xE9alis\xE9",
920
+ condition: only("isBuilding"),
921
+ requiredFor: ["MANDATE_CREATION" /* MandateCreation */]
915
922
  },
916
923
  {
917
924
  name: "dpeScore",
@@ -1065,11 +1072,20 @@ var surfacesFormFields = [
1065
1072
  condition: and(
1066
1073
  not("isLand"),
1067
1074
  not("isParking"),
1068
- not("isForProfessionalUse")
1075
+ not("isForProfessionalUse"),
1076
+ not("isBuilding")
1069
1077
  ),
1070
1078
  props: { suffix: "m\xB2" },
1071
1079
  requiredFor: ["MANDATE_CREATION" /* MandateCreation */]
1072
1080
  },
1081
+ {
1082
+ name: "carrezLawArea",
1083
+ fieldType: "number",
1084
+ label: "Surface loi Carrez totale de l'immeuble",
1085
+ condition: only("isBuilding"),
1086
+ props: { suffix: "m\xB2" },
1087
+ requiredFor: ["MANDATE_CREATION" /* MandateCreation */]
1088
+ },
1073
1089
  {
1074
1090
  name: "landArea",
1075
1091
  fieldType: "number",
@@ -1082,17 +1098,34 @@ var surfacesFormFields = [
1082
1098
  name: "roomCount",
1083
1099
  fieldType: "number",
1084
1100
  label: "Nombre de pi\xE8ce(s)",
1085
- condition: and(not("isLand"), not("isParking"), not("isBuilding")),
1101
+ condition: and(
1102
+ not("isLand"),
1103
+ not("isParking"),
1104
+ not("isBuilding"),
1105
+ not("isForProfessionalUse")
1106
+ ),
1086
1107
  props: {
1087
1108
  suffix: "pi\xE8ce(s)",
1088
1109
  tooltip: "Inclure seulement : la pi\xE8ce principale + les chambres. Exemple : appartement 3 pi\xE8ces : un s\xE9jour, 2 chambres."
1089
- // TODO: isForProfessionalUse
1090
- // Inclure les surfaces utiles.
1091
- // <br />
1092
- // Exemple : plateau de 10 bureaux, 1 salle de réunion, une cuisine = 12
1093
- // pièces.
1094
1110
  }
1095
1111
  },
1112
+ {
1113
+ name: "roomCount",
1114
+ fieldType: "number",
1115
+ label: "Nombre de pi\xE8ce(s)",
1116
+ condition: only("isForProfessionalUse"),
1117
+ props: {
1118
+ suffix: "pi\xE8ce(s)",
1119
+ tooltip: "Inclure les surfaces utiles. Exemple : plateau de 10 bureaux, 1 salle de r\xE9union, une cuisine = 12 pi\xE8ces."
1120
+ }
1121
+ },
1122
+ {
1123
+ name: "roomCount",
1124
+ fieldType: "number",
1125
+ label: "Nombre de logement(s)",
1126
+ condition: only("isBuilding"),
1127
+ props: { suffix: "logement(s)" }
1128
+ },
1096
1129
  {
1097
1130
  name: "bathroomsCount",
1098
1131
  fieldType: "number",
@@ -1340,8 +1373,30 @@ var PRENUP_TYPES = [
1340
1373
  }
1341
1374
  ];
1342
1375
 
1376
+ // src/static/mandate-select-options.ts
1377
+ var MANDATE_EXCLUSIVITY = [
1378
+ {
1379
+ value: "EXCLUSIVE" /* Exclusive */,
1380
+ label: "Mandat exclusif"
1381
+ },
1382
+ {
1383
+ value: "SEMI_EXCLUSIVE" /* SemiExclusive */,
1384
+ label: "Mandat semi-exclusif"
1385
+ },
1386
+ {
1387
+ value: "SIMPLE" /* Simple */,
1388
+ label: "Mandat simple"
1389
+ }
1390
+ ];
1391
+
1343
1392
  // src/static/mandate-fields.ts
1344
1393
  var mandateFormFields = [
1394
+ {
1395
+ name: "exclusivity",
1396
+ fieldType: "exclusivity",
1397
+ label: "Exclusivit\xE9",
1398
+ props: { options: MANDATE_EXCLUSIVITY }
1399
+ },
1345
1400
  {
1346
1401
  name: "businessAssetsPrice",
1347
1402
  fieldType: "number",
@@ -1458,6 +1513,20 @@ var mandateFormFields = [
1458
1513
  requiredFor: ["MANDATE_CREATION" /* MandateCreation */],
1459
1514
  condition: only("isForProfessionalUse")
1460
1515
  },
1516
+ {
1517
+ fieldType: "text",
1518
+ name: "notaryNameAndCity",
1519
+ label: "Nom et ville du notaire d\xE9tenteur du titre de propri\xE9t\xE9",
1520
+ condition: not("isForProfessionalUse"),
1521
+ requiredFor: ["MANDATE_CREATION" /* MandateCreation */]
1522
+ },
1523
+ {
1524
+ fieldType: "text",
1525
+ name: "notaryNameAndCity",
1526
+ label: "Coordonn\xE9es du professionnel en charge de la cession",
1527
+ condition: only("isForProfessionalUse"),
1528
+ requiredFor: ["MANDATE_CREATION" /* MandateCreation */]
1529
+ },
1461
1530
  {
1462
1531
  name: "specialConditions",
1463
1532
  fieldType: "textarea",
@@ -1467,22 +1536,6 @@ var mandateFormFields = [
1467
1536
  props: { className: "md:col-span-2", placeholder: "Aucune" }
1468
1537
  }
1469
1538
  ];
1470
-
1471
- // src/static/mandate-select-options.ts
1472
- var MANDATE_EXCLUSIVITY = [
1473
- {
1474
- value: "EXCLUSIVE" /* Exclusive */,
1475
- label: "Mandat exclusif"
1476
- },
1477
- {
1478
- value: "SEMI_EXCLUSIVE" /* SemiExclusive */,
1479
- label: "Mandat semi-exclusif"
1480
- },
1481
- {
1482
- value: "SIMPLE" /* Simple */,
1483
- label: "Mandat simple"
1484
- }
1485
- ];
1486
1539
  // Annotate the CommonJS export names for ESM import in node:
1487
1540
  0 && (module.exports = {
1488
1541
  COMPANY_INFO,
package/dist/index.mjs CHANGED
@@ -831,8 +831,15 @@ var technicalFormFields = [
831
831
  name: "isDpeCompleted",
832
832
  fieldType: "radio",
833
833
  label: "DPE r\xE9alis\xE9",
834
- condition: and(not("isParking"), not("isLand")),
835
- requiredFor: ["DIFFUSION" /* Diffusion */]
834
+ condition: and(not("isParking"), not("isLand"), not("isBuilding")),
835
+ requiredFor: ["MANDATE_CREATION" /* MandateCreation */]
836
+ },
837
+ {
838
+ name: "isDpeCompleted",
839
+ fieldType: "radio",
840
+ label: "DPE collectif r\xE9alis\xE9",
841
+ condition: only("isBuilding"),
842
+ requiredFor: ["MANDATE_CREATION" /* MandateCreation */]
836
843
  },
837
844
  {
838
845
  name: "dpeScore",
@@ -986,11 +993,20 @@ var surfacesFormFields = [
986
993
  condition: and(
987
994
  not("isLand"),
988
995
  not("isParking"),
989
- not("isForProfessionalUse")
996
+ not("isForProfessionalUse"),
997
+ not("isBuilding")
990
998
  ),
991
999
  props: { suffix: "m\xB2" },
992
1000
  requiredFor: ["MANDATE_CREATION" /* MandateCreation */]
993
1001
  },
1002
+ {
1003
+ name: "carrezLawArea",
1004
+ fieldType: "number",
1005
+ label: "Surface loi Carrez totale de l'immeuble",
1006
+ condition: only("isBuilding"),
1007
+ props: { suffix: "m\xB2" },
1008
+ requiredFor: ["MANDATE_CREATION" /* MandateCreation */]
1009
+ },
994
1010
  {
995
1011
  name: "landArea",
996
1012
  fieldType: "number",
@@ -1003,17 +1019,34 @@ var surfacesFormFields = [
1003
1019
  name: "roomCount",
1004
1020
  fieldType: "number",
1005
1021
  label: "Nombre de pi\xE8ce(s)",
1006
- condition: and(not("isLand"), not("isParking"), not("isBuilding")),
1022
+ condition: and(
1023
+ not("isLand"),
1024
+ not("isParking"),
1025
+ not("isBuilding"),
1026
+ not("isForProfessionalUse")
1027
+ ),
1007
1028
  props: {
1008
1029
  suffix: "pi\xE8ce(s)",
1009
1030
  tooltip: "Inclure seulement : la pi\xE8ce principale + les chambres. Exemple : appartement 3 pi\xE8ces : un s\xE9jour, 2 chambres."
1010
- // TODO: isForProfessionalUse
1011
- // Inclure les surfaces utiles.
1012
- // <br />
1013
- // Exemple : plateau de 10 bureaux, 1 salle de réunion, une cuisine = 12
1014
- // pièces.
1015
1031
  }
1016
1032
  },
1033
+ {
1034
+ name: "roomCount",
1035
+ fieldType: "number",
1036
+ label: "Nombre de pi\xE8ce(s)",
1037
+ condition: only("isForProfessionalUse"),
1038
+ props: {
1039
+ suffix: "pi\xE8ce(s)",
1040
+ tooltip: "Inclure les surfaces utiles. Exemple : plateau de 10 bureaux, 1 salle de r\xE9union, une cuisine = 12 pi\xE8ces."
1041
+ }
1042
+ },
1043
+ {
1044
+ name: "roomCount",
1045
+ fieldType: "number",
1046
+ label: "Nombre de logement(s)",
1047
+ condition: only("isBuilding"),
1048
+ props: { suffix: "logement(s)" }
1049
+ },
1017
1050
  {
1018
1051
  name: "bathroomsCount",
1019
1052
  fieldType: "number",
@@ -1261,8 +1294,30 @@ var PRENUP_TYPES = [
1261
1294
  }
1262
1295
  ];
1263
1296
 
1297
+ // src/static/mandate-select-options.ts
1298
+ var MANDATE_EXCLUSIVITY = [
1299
+ {
1300
+ value: "EXCLUSIVE" /* Exclusive */,
1301
+ label: "Mandat exclusif"
1302
+ },
1303
+ {
1304
+ value: "SEMI_EXCLUSIVE" /* SemiExclusive */,
1305
+ label: "Mandat semi-exclusif"
1306
+ },
1307
+ {
1308
+ value: "SIMPLE" /* Simple */,
1309
+ label: "Mandat simple"
1310
+ }
1311
+ ];
1312
+
1264
1313
  // src/static/mandate-fields.ts
1265
1314
  var mandateFormFields = [
1315
+ {
1316
+ name: "exclusivity",
1317
+ fieldType: "exclusivity",
1318
+ label: "Exclusivit\xE9",
1319
+ props: { options: MANDATE_EXCLUSIVITY }
1320
+ },
1266
1321
  {
1267
1322
  name: "businessAssetsPrice",
1268
1323
  fieldType: "number",
@@ -1379,6 +1434,20 @@ var mandateFormFields = [
1379
1434
  requiredFor: ["MANDATE_CREATION" /* MandateCreation */],
1380
1435
  condition: only("isForProfessionalUse")
1381
1436
  },
1437
+ {
1438
+ fieldType: "text",
1439
+ name: "notaryNameAndCity",
1440
+ label: "Nom et ville du notaire d\xE9tenteur du titre de propri\xE9t\xE9",
1441
+ condition: not("isForProfessionalUse"),
1442
+ requiredFor: ["MANDATE_CREATION" /* MandateCreation */]
1443
+ },
1444
+ {
1445
+ fieldType: "text",
1446
+ name: "notaryNameAndCity",
1447
+ label: "Coordonn\xE9es du professionnel en charge de la cession",
1448
+ condition: only("isForProfessionalUse"),
1449
+ requiredFor: ["MANDATE_CREATION" /* MandateCreation */]
1450
+ },
1382
1451
  {
1383
1452
  name: "specialConditions",
1384
1453
  fieldType: "textarea",
@@ -1388,22 +1457,6 @@ var mandateFormFields = [
1388
1457
  props: { className: "md:col-span-2", placeholder: "Aucune" }
1389
1458
  }
1390
1459
  ];
1391
-
1392
- // src/static/mandate-select-options.ts
1393
- var MANDATE_EXCLUSIVITY = [
1394
- {
1395
- value: "EXCLUSIVE" /* Exclusive */,
1396
- label: "Mandat exclusif"
1397
- },
1398
- {
1399
- value: "SEMI_EXCLUSIVE" /* SemiExclusive */,
1400
- label: "Mandat semi-exclusif"
1401
- },
1402
- {
1403
- value: "SIMPLE" /* Simple */,
1404
- label: "Mandat simple"
1405
- }
1406
- ];
1407
1460
  export {
1408
1461
  COMPANY_INFO,
1409
1462
  CONDITIONS,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ecotransac-shared-js",
3
- "version": "1.1.18",
3
+ "version": "1.1.20",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "modules": "dist/index.mjs",