ecotransac-shared-js 1.1.14 → 1.1.15

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
@@ -1,4 +1,5 @@
1
1
  type Maybe<T> = T | null;
2
+ type InputMaybe<T> = Maybe<T>;
2
3
  /** All built-in and custom scalars, mapped to their actual values */
3
4
  type Scalars = {
4
5
  ID: {
@@ -451,6 +452,28 @@ declare enum MandateExclusivity {
451
452
  SemiExclusive = "SEMI_EXCLUSIVE",
452
453
  Simple = "SIMPLE"
453
454
  }
455
+ type MandateInput = {
456
+ /** % d'honoraires agence */
457
+ agencyFeePercentage?: InputMaybe<Scalars['Float']['input']>;
458
+ /** Prix de cession du fonds de commerce */
459
+ businessAssetsPrice?: InputMaybe<Scalars['Float']['input']>;
460
+ escrowReceiver?: InputMaybe<Scalars['String']['input']>;
461
+ exclusivity: MandateExclusivity;
462
+ isFreeOfOccupationAndManagement?: InputMaybe<Scalars['Boolean']['input']>;
463
+ isFreeOfPledge?: InputMaybe<Scalars['Boolean']['input']>;
464
+ isFreeOfPrivilege?: InputMaybe<Scalars['Boolean']['input']>;
465
+ isStockIncluded?: InputMaybe<Scalars['Boolean']['input']>;
466
+ isVatApplicable?: InputMaybe<Scalars['Boolean']['input']>;
467
+ /** Prix de cession du bail */
468
+ leaseRightsPrice?: InputMaybe<Scalars['Float']['input']>;
469
+ /** Prix de vente vendeur */
470
+ netOwnerPrice?: InputMaybe<Scalars['Float']['input']>;
471
+ netOwnerRent?: InputMaybe<Scalars['Float']['input']>;
472
+ notaryNameAndCity: Scalars['String']['input'];
473
+ rentCharges?: InputMaybe<Scalars['Float']['input']>;
474
+ securityDeposit?: InputMaybe<Scalars['Float']['input']>;
475
+ specialConditions?: InputMaybe<Scalars['String']['input']>;
476
+ };
454
477
  declare enum MandateStatus {
455
478
  AwaitingSignatures = "AWAITING_SIGNATURES",
456
479
  AwaitingValidation = "AWAITING_VALIDATION",
@@ -988,9 +1011,11 @@ declare const PRENUP_TYPES: SelectOption[];
988
1011
 
989
1012
  declare const COUNTRIES: SelectOption[];
990
1013
 
1014
+ declare const mandateFormFields: Field<MandateInput>[];
1015
+
991
1016
  declare const MANDATE_EXCLUSIVITY: {
992
1017
  value: MandateExclusivity;
993
1018
  label: string;
994
1019
  }[];
995
1020
 
996
- export { COMPANY_INFO, CONDITIONS, COUNTRIES, type Condition, ESTATE_CONDITION, EXPOSURES, type Field, GENDER, HEATING_ENERGY, IDENTIFICATION_DOCUMENTS, KITCHEN_TYPE, LEASE_ESTABLISHMENT, LEASE_TRANSFERT_PERMISSIONS, LEGAL_NATURE, MANDATE_EXCLUSIVITY, MARITAL_STATUS, PRENUP_TYPES, SHARING_CONFIGURATION, STANDINGS, type SelectOption, type State, VIEWS, and, featuresFormFields, formatAddress, formatAgentLegalData, formatDate, formatMandateNumber, formatNumber, formatPhone, formatPrice, formatSeconds, getAgencyFees, getFeesPercentage, getFieldValues, getLabel, getLowThreshold, getNetPrice, getPropertyState, getPropertyTitle, not, only, or, propertyFields, shouldRender, surfacesFormFields, technicalFormFields };
1021
+ export { COMPANY_INFO, CONDITIONS, COUNTRIES, type Condition, ESTATE_CONDITION, EXPOSURES, type Field, GENDER, HEATING_ENERGY, IDENTIFICATION_DOCUMENTS, KITCHEN_TYPE, LEASE_ESTABLISHMENT, LEASE_TRANSFERT_PERMISSIONS, LEGAL_NATURE, MANDATE_EXCLUSIVITY, MARITAL_STATUS, PRENUP_TYPES, SHARING_CONFIGURATION, STANDINGS, type SelectOption, type State, VIEWS, and, featuresFormFields, formatAddress, formatAgentLegalData, formatDate, formatMandateNumber, formatNumber, formatPhone, formatPrice, formatSeconds, getAgencyFees, getFeesPercentage, getFieldValues, getLabel, getLowThreshold, getNetPrice, getPropertyState, getPropertyTitle, mandateFormFields, not, only, or, propertyFields, shouldRender, surfacesFormFields, technicalFormFields };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  type Maybe<T> = T | null;
2
+ type InputMaybe<T> = Maybe<T>;
2
3
  /** All built-in and custom scalars, mapped to their actual values */
3
4
  type Scalars = {
4
5
  ID: {
@@ -451,6 +452,28 @@ declare enum MandateExclusivity {
451
452
  SemiExclusive = "SEMI_EXCLUSIVE",
452
453
  Simple = "SIMPLE"
453
454
  }
455
+ type MandateInput = {
456
+ /** % d'honoraires agence */
457
+ agencyFeePercentage?: InputMaybe<Scalars['Float']['input']>;
458
+ /** Prix de cession du fonds de commerce */
459
+ businessAssetsPrice?: InputMaybe<Scalars['Float']['input']>;
460
+ escrowReceiver?: InputMaybe<Scalars['String']['input']>;
461
+ exclusivity: MandateExclusivity;
462
+ isFreeOfOccupationAndManagement?: InputMaybe<Scalars['Boolean']['input']>;
463
+ isFreeOfPledge?: InputMaybe<Scalars['Boolean']['input']>;
464
+ isFreeOfPrivilege?: InputMaybe<Scalars['Boolean']['input']>;
465
+ isStockIncluded?: InputMaybe<Scalars['Boolean']['input']>;
466
+ isVatApplicable?: InputMaybe<Scalars['Boolean']['input']>;
467
+ /** Prix de cession du bail */
468
+ leaseRightsPrice?: InputMaybe<Scalars['Float']['input']>;
469
+ /** Prix de vente vendeur */
470
+ netOwnerPrice?: InputMaybe<Scalars['Float']['input']>;
471
+ netOwnerRent?: InputMaybe<Scalars['Float']['input']>;
472
+ notaryNameAndCity: Scalars['String']['input'];
473
+ rentCharges?: InputMaybe<Scalars['Float']['input']>;
474
+ securityDeposit?: InputMaybe<Scalars['Float']['input']>;
475
+ specialConditions?: InputMaybe<Scalars['String']['input']>;
476
+ };
454
477
  declare enum MandateStatus {
455
478
  AwaitingSignatures = "AWAITING_SIGNATURES",
456
479
  AwaitingValidation = "AWAITING_VALIDATION",
@@ -988,9 +1011,11 @@ declare const PRENUP_TYPES: SelectOption[];
988
1011
 
989
1012
  declare const COUNTRIES: SelectOption[];
990
1013
 
1014
+ declare const mandateFormFields: Field<MandateInput>[];
1015
+
991
1016
  declare const MANDATE_EXCLUSIVITY: {
992
1017
  value: MandateExclusivity;
993
1018
  label: string;
994
1019
  }[];
995
1020
 
996
- export { COMPANY_INFO, CONDITIONS, COUNTRIES, type Condition, ESTATE_CONDITION, EXPOSURES, type Field, GENDER, HEATING_ENERGY, IDENTIFICATION_DOCUMENTS, KITCHEN_TYPE, LEASE_ESTABLISHMENT, LEASE_TRANSFERT_PERMISSIONS, LEGAL_NATURE, MANDATE_EXCLUSIVITY, MARITAL_STATUS, PRENUP_TYPES, SHARING_CONFIGURATION, STANDINGS, type SelectOption, type State, VIEWS, and, featuresFormFields, formatAddress, formatAgentLegalData, formatDate, formatMandateNumber, formatNumber, formatPhone, formatPrice, formatSeconds, getAgencyFees, getFeesPercentage, getFieldValues, getLabel, getLowThreshold, getNetPrice, getPropertyState, getPropertyTitle, not, only, or, propertyFields, shouldRender, surfacesFormFields, technicalFormFields };
1021
+ export { COMPANY_INFO, CONDITIONS, COUNTRIES, type Condition, ESTATE_CONDITION, EXPOSURES, type Field, GENDER, HEATING_ENERGY, IDENTIFICATION_DOCUMENTS, KITCHEN_TYPE, LEASE_ESTABLISHMENT, LEASE_TRANSFERT_PERMISSIONS, LEGAL_NATURE, MANDATE_EXCLUSIVITY, MARITAL_STATUS, PRENUP_TYPES, SHARING_CONFIGURATION, STANDINGS, type SelectOption, type State, VIEWS, and, featuresFormFields, formatAddress, formatAgentLegalData, formatDate, formatMandateNumber, formatNumber, formatPhone, formatPrice, formatSeconds, getAgencyFees, getFeesPercentage, getFieldValues, getLabel, getLowThreshold, getNetPrice, getPropertyState, getPropertyTitle, mandateFormFields, not, only, or, propertyFields, shouldRender, surfacesFormFields, technicalFormFields };
package/dist/index.js CHANGED
@@ -66,6 +66,7 @@ __export(src_exports, {
66
66
  getNetPrice: () => getNetPrice,
67
67
  getPropertyState: () => getPropertyState,
68
68
  getPropertyTitle: () => getPropertyTitle,
69
+ mandateFormFields: () => mandateFormFields,
69
70
  not: () => not,
70
71
  only: () => only,
71
72
  or: () => or,
@@ -1328,6 +1329,130 @@ var PRENUP_TYPES = [
1328
1329
  }
1329
1330
  ];
1330
1331
 
1332
+ // src/static/mandate-fields.ts
1333
+ var mandateFormFields = [
1334
+ {
1335
+ name: "businessAssetsPrice",
1336
+ fieldType: "number",
1337
+ label: "Prix de vente du fonds de commerce",
1338
+ requiredFor: ["MANDATE_CREATION" /* MandateCreation */],
1339
+ condition: and(
1340
+ only("isForProfessionalUse"),
1341
+ only("isBusinessAssetsTransfer")
1342
+ ),
1343
+ props: { suffix: "\u20AC net vendeur" }
1344
+ },
1345
+ {
1346
+ name: "leaseRightsPrice",
1347
+ fieldType: "number",
1348
+ label: "Prix de cession du droit au bail",
1349
+ requiredFor: ["MANDATE_CREATION" /* MandateCreation */],
1350
+ condition: and(only("isForProfessionalUse"), only("isLeaseRightsTransfer")),
1351
+ props: { suffix: "\u20AC net vendeur" }
1352
+ },
1353
+ {
1354
+ name: "netOwnerPrice",
1355
+ fieldType: "number",
1356
+ label: "Prix de vente",
1357
+ requiredFor: ["MANDATE_CREATION" /* MandateCreation */],
1358
+ props: { suffix: "\u20AC net vendeur" }
1359
+ },
1360
+ {
1361
+ name: "agencyFeePercentage",
1362
+ fieldType: "number",
1363
+ label: "Honoraires agence",
1364
+ requiredFor: ["MANDATE_CREATION" /* MandateCreation */],
1365
+ condition: void 0,
1366
+ // FIXME: required if not low price
1367
+ props: { suffix: "%" }
1368
+ },
1369
+ {
1370
+ name: "specialConditions",
1371
+ fieldType: "textarea",
1372
+ label: "Conditions particuli\xE8res du mandat",
1373
+ requiredFor: [],
1374
+ condition: void 0,
1375
+ props: { className: "md:col-span-2", placeholder: "Aucune" }
1376
+ },
1377
+ {
1378
+ name: "netOwnerRent",
1379
+ fieldType: "number",
1380
+ label: "Montant HT du loyer annuel",
1381
+ requiredFor: ["MANDATE_CREATION" /* MandateCreation */],
1382
+ condition: and(only("isForProfessionalUse"), only("isLeaseRightsTransfer")),
1383
+ props: { suffix: "\u20AC/an hors charges" }
1384
+ },
1385
+ {
1386
+ name: "rentCharges",
1387
+ fieldType: "number",
1388
+ label: "Montant des charges mensuelles HT",
1389
+ requiredFor: ["MANDATE_CREATION" /* MandateCreation */],
1390
+ condition: and(only("isForProfessionalUse"), only("isLeaseRightsTransfer")),
1391
+ props: { suffix: "\u20AC/mois" }
1392
+ },
1393
+ {
1394
+ name: "securityDeposit",
1395
+ label: "D\xE9p\xF4t de garantie",
1396
+ fieldType: "number",
1397
+ requiredFor: ["MANDATE_CREATION" /* MandateCreation */],
1398
+ condition: and(only("isForProfessionalUse"), only("isLeaseRightsTransfer"))
1399
+ },
1400
+ {
1401
+ name: "isVatApplicable",
1402
+ fieldType: "radio",
1403
+ label: "Op\xE9ration soumise \xE0 TVA",
1404
+ requiredFor: ["MANDATE_CREATION" /* MandateCreation */],
1405
+ condition: only("isForProfessionalUse"),
1406
+ props: {
1407
+ tooltip: "Oui: En sus TVA applicable au taux en vigueur du lieu de situation de l\u2019immeuble. Non: Op\xE9ration non assujettie \xE0 la TVA"
1408
+ }
1409
+ },
1410
+ {
1411
+ name: "isStockIncluded",
1412
+ fieldType: "radio",
1413
+ label: "Stock vendu avec la cession",
1414
+ requiredFor: ["MANDATE_CREATION" /* MandateCreation */],
1415
+ condition: only("isForProfessionalUse")
1416
+ },
1417
+ {
1418
+ name: "isFreeOfPrivilege",
1419
+ fieldType: "radio",
1420
+ label: "Libre de toute inscription de privil\xE8ge",
1421
+ requiredFor: ["MANDATE_CREATION" /* MandateCreation */],
1422
+ condition: and(
1423
+ only("isForProfessionalUse"),
1424
+ only("isBusinessAssetsTransfer")
1425
+ )
1426
+ },
1427
+ {
1428
+ name: "isFreeOfPledge",
1429
+ fieldType: "radio",
1430
+ label: "Libre de tout nantissement",
1431
+ requiredFor: ["MANDATE_CREATION" /* MandateCreation */],
1432
+ condition: and(
1433
+ only("isForProfessionalUse"),
1434
+ only("isBusinessAssetsTransfer")
1435
+ )
1436
+ },
1437
+ {
1438
+ name: "isFreeOfOccupationAndManagement",
1439
+ fieldType: "radio",
1440
+ label: "Libre de toute occupation et de toute g\xE9rance",
1441
+ requiredFor: ["MANDATE_CREATION" /* MandateCreation */],
1442
+ condition: and(
1443
+ only("isForProfessionalUse"),
1444
+ only("isBusinessAssetsTransfer")
1445
+ )
1446
+ },
1447
+ {
1448
+ name: "escrowReceiver",
1449
+ fieldType: "text",
1450
+ label: "Ordre du professionnel charg\xE9 de la pr\xE9sente cession qui re\xE7oit le s\xE9questre",
1451
+ requiredFor: ["MANDATE_CREATION" /* MandateCreation */],
1452
+ condition: only("isForProfessionalUse")
1453
+ }
1454
+ ];
1455
+
1331
1456
  // src/static/mandate-select-options.ts
1332
1457
  var MANDATE_EXCLUSIVITY = [
1333
1458
  {
@@ -1381,6 +1506,7 @@ var MANDATE_EXCLUSIVITY = [
1381
1506
  getNetPrice,
1382
1507
  getPropertyState,
1383
1508
  getPropertyTitle,
1509
+ mandateFormFields,
1384
1510
  not,
1385
1511
  only,
1386
1512
  or,
package/dist/index.mjs CHANGED
@@ -1250,6 +1250,130 @@ var PRENUP_TYPES = [
1250
1250
  }
1251
1251
  ];
1252
1252
 
1253
+ // src/static/mandate-fields.ts
1254
+ var mandateFormFields = [
1255
+ {
1256
+ name: "businessAssetsPrice",
1257
+ fieldType: "number",
1258
+ label: "Prix de vente du fonds de commerce",
1259
+ requiredFor: ["MANDATE_CREATION" /* MandateCreation */],
1260
+ condition: and(
1261
+ only("isForProfessionalUse"),
1262
+ only("isBusinessAssetsTransfer")
1263
+ ),
1264
+ props: { suffix: "\u20AC net vendeur" }
1265
+ },
1266
+ {
1267
+ name: "leaseRightsPrice",
1268
+ fieldType: "number",
1269
+ label: "Prix de cession du droit au bail",
1270
+ requiredFor: ["MANDATE_CREATION" /* MandateCreation */],
1271
+ condition: and(only("isForProfessionalUse"), only("isLeaseRightsTransfer")),
1272
+ props: { suffix: "\u20AC net vendeur" }
1273
+ },
1274
+ {
1275
+ name: "netOwnerPrice",
1276
+ fieldType: "number",
1277
+ label: "Prix de vente",
1278
+ requiredFor: ["MANDATE_CREATION" /* MandateCreation */],
1279
+ props: { suffix: "\u20AC net vendeur" }
1280
+ },
1281
+ {
1282
+ name: "agencyFeePercentage",
1283
+ fieldType: "number",
1284
+ label: "Honoraires agence",
1285
+ requiredFor: ["MANDATE_CREATION" /* MandateCreation */],
1286
+ condition: void 0,
1287
+ // FIXME: required if not low price
1288
+ props: { suffix: "%" }
1289
+ },
1290
+ {
1291
+ name: "specialConditions",
1292
+ fieldType: "textarea",
1293
+ label: "Conditions particuli\xE8res du mandat",
1294
+ requiredFor: [],
1295
+ condition: void 0,
1296
+ props: { className: "md:col-span-2", placeholder: "Aucune" }
1297
+ },
1298
+ {
1299
+ name: "netOwnerRent",
1300
+ fieldType: "number",
1301
+ label: "Montant HT du loyer annuel",
1302
+ requiredFor: ["MANDATE_CREATION" /* MandateCreation */],
1303
+ condition: and(only("isForProfessionalUse"), only("isLeaseRightsTransfer")),
1304
+ props: { suffix: "\u20AC/an hors charges" }
1305
+ },
1306
+ {
1307
+ name: "rentCharges",
1308
+ fieldType: "number",
1309
+ label: "Montant des charges mensuelles HT",
1310
+ requiredFor: ["MANDATE_CREATION" /* MandateCreation */],
1311
+ condition: and(only("isForProfessionalUse"), only("isLeaseRightsTransfer")),
1312
+ props: { suffix: "\u20AC/mois" }
1313
+ },
1314
+ {
1315
+ name: "securityDeposit",
1316
+ label: "D\xE9p\xF4t de garantie",
1317
+ fieldType: "number",
1318
+ requiredFor: ["MANDATE_CREATION" /* MandateCreation */],
1319
+ condition: and(only("isForProfessionalUse"), only("isLeaseRightsTransfer"))
1320
+ },
1321
+ {
1322
+ name: "isVatApplicable",
1323
+ fieldType: "radio",
1324
+ label: "Op\xE9ration soumise \xE0 TVA",
1325
+ requiredFor: ["MANDATE_CREATION" /* MandateCreation */],
1326
+ condition: only("isForProfessionalUse"),
1327
+ props: {
1328
+ tooltip: "Oui: En sus TVA applicable au taux en vigueur du lieu de situation de l\u2019immeuble. Non: Op\xE9ration non assujettie \xE0 la TVA"
1329
+ }
1330
+ },
1331
+ {
1332
+ name: "isStockIncluded",
1333
+ fieldType: "radio",
1334
+ label: "Stock vendu avec la cession",
1335
+ requiredFor: ["MANDATE_CREATION" /* MandateCreation */],
1336
+ condition: only("isForProfessionalUse")
1337
+ },
1338
+ {
1339
+ name: "isFreeOfPrivilege",
1340
+ fieldType: "radio",
1341
+ label: "Libre de toute inscription de privil\xE8ge",
1342
+ requiredFor: ["MANDATE_CREATION" /* MandateCreation */],
1343
+ condition: and(
1344
+ only("isForProfessionalUse"),
1345
+ only("isBusinessAssetsTransfer")
1346
+ )
1347
+ },
1348
+ {
1349
+ name: "isFreeOfPledge",
1350
+ fieldType: "radio",
1351
+ label: "Libre de tout nantissement",
1352
+ requiredFor: ["MANDATE_CREATION" /* MandateCreation */],
1353
+ condition: and(
1354
+ only("isForProfessionalUse"),
1355
+ only("isBusinessAssetsTransfer")
1356
+ )
1357
+ },
1358
+ {
1359
+ name: "isFreeOfOccupationAndManagement",
1360
+ fieldType: "radio",
1361
+ label: "Libre de toute occupation et de toute g\xE9rance",
1362
+ requiredFor: ["MANDATE_CREATION" /* MandateCreation */],
1363
+ condition: and(
1364
+ only("isForProfessionalUse"),
1365
+ only("isBusinessAssetsTransfer")
1366
+ )
1367
+ },
1368
+ {
1369
+ name: "escrowReceiver",
1370
+ fieldType: "text",
1371
+ label: "Ordre du professionnel charg\xE9 de la pr\xE9sente cession qui re\xE7oit le s\xE9questre",
1372
+ requiredFor: ["MANDATE_CREATION" /* MandateCreation */],
1373
+ condition: only("isForProfessionalUse")
1374
+ }
1375
+ ];
1376
+
1253
1377
  // src/static/mandate-select-options.ts
1254
1378
  var MANDATE_EXCLUSIVITY = [
1255
1379
  {
@@ -1302,6 +1426,7 @@ export {
1302
1426
  getNetPrice,
1303
1427
  getPropertyState,
1304
1428
  getPropertyTitle,
1429
+ mandateFormFields,
1305
1430
  not,
1306
1431
  only,
1307
1432
  or,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ecotransac-shared-js",
3
- "version": "1.1.14",
3
+ "version": "1.1.15",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "modules": "dist/index.mjs",