ecotransac-shared-js 1.1.12 → 1.1.14
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 +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +9 -5
- package/dist/index.mjs +5 -5
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -921,6 +921,11 @@ declare const formatAgentLegalData: (profile?: Pick<Profile, "legalStatus" | "re
|
|
|
921
921
|
declare const getPropertyTitle: (property: Pick<Property, "propertyType" | "roomCount" | "livingArea" | "isForProfessionalUse" | "floorLevel">) => string;
|
|
922
922
|
declare const formatNumber: (number?: number | null) => string;
|
|
923
923
|
|
|
924
|
+
declare const only: (condition: string | Condition) => Condition;
|
|
925
|
+
declare const not: (condition: string | Condition) => Condition;
|
|
926
|
+
declare const or: (...conditions: (string | Condition)[]) => Condition;
|
|
927
|
+
declare const and: (...conditions: (string | Condition)[]) => Condition;
|
|
928
|
+
|
|
924
929
|
declare const featuresFormFields: Field<Property>[];
|
|
925
930
|
declare const technicalFormFields: Field<Property>[];
|
|
926
931
|
declare const surfacesFormFields: Field<Property>[];
|
|
@@ -988,4 +993,4 @@ declare const MANDATE_EXCLUSIVITY: {
|
|
|
988
993
|
label: string;
|
|
989
994
|
}[];
|
|
990
995
|
|
|
991
|
-
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, featuresFormFields, formatAddress, formatAgentLegalData, formatDate, formatMandateNumber, formatNumber, formatPhone, formatPrice, formatSeconds, getAgencyFees, getFeesPercentage, getFieldValues, getLabel, getLowThreshold, getNetPrice, getPropertyState, getPropertyTitle, propertyFields, shouldRender, surfacesFormFields, technicalFormFields };
|
|
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -921,6 +921,11 @@ declare const formatAgentLegalData: (profile?: Pick<Profile, "legalStatus" | "re
|
|
|
921
921
|
declare const getPropertyTitle: (property: Pick<Property, "propertyType" | "roomCount" | "livingArea" | "isForProfessionalUse" | "floorLevel">) => string;
|
|
922
922
|
declare const formatNumber: (number?: number | null) => string;
|
|
923
923
|
|
|
924
|
+
declare const only: (condition: string | Condition) => Condition;
|
|
925
|
+
declare const not: (condition: string | Condition) => Condition;
|
|
926
|
+
declare const or: (...conditions: (string | Condition)[]) => Condition;
|
|
927
|
+
declare const and: (...conditions: (string | Condition)[]) => Condition;
|
|
928
|
+
|
|
924
929
|
declare const featuresFormFields: Field<Property>[];
|
|
925
930
|
declare const technicalFormFields: Field<Property>[];
|
|
926
931
|
declare const surfacesFormFields: Field<Property>[];
|
|
@@ -988,4 +993,4 @@ declare const MANDATE_EXCLUSIVITY: {
|
|
|
988
993
|
label: string;
|
|
989
994
|
}[];
|
|
990
995
|
|
|
991
|
-
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, featuresFormFields, formatAddress, formatAgentLegalData, formatDate, formatMandateNumber, formatNumber, formatPhone, formatPrice, formatSeconds, getAgencyFees, getFeesPercentage, getFieldValues, getLabel, getLowThreshold, getNetPrice, getPropertyState, getPropertyTitle, propertyFields, shouldRender, surfacesFormFields, technicalFormFields };
|
|
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 };
|
package/dist/index.js
CHANGED
|
@@ -48,6 +48,7 @@ __export(src_exports, {
|
|
|
48
48
|
SHARING_CONFIGURATION: () => SHARING_CONFIGURATION,
|
|
49
49
|
STANDINGS: () => STANDINGS,
|
|
50
50
|
VIEWS: () => VIEWS,
|
|
51
|
+
and: () => and,
|
|
51
52
|
featuresFormFields: () => featuresFormFields,
|
|
52
53
|
formatAddress: () => formatAddress,
|
|
53
54
|
formatAgentLegalData: () => formatAgentLegalData,
|
|
@@ -65,6 +66,9 @@ __export(src_exports, {
|
|
|
65
66
|
getNetPrice: () => getNetPrice,
|
|
66
67
|
getPropertyState: () => getPropertyState,
|
|
67
68
|
getPropertyTitle: () => getPropertyTitle,
|
|
69
|
+
not: () => not,
|
|
70
|
+
only: () => only,
|
|
71
|
+
or: () => or,
|
|
68
72
|
propertyFields: () => propertyFields,
|
|
69
73
|
shouldRender: () => shouldRender,
|
|
70
74
|
surfacesFormFields: () => surfacesFormFields,
|
|
@@ -488,7 +492,7 @@ var getValue = (params) => {
|
|
|
488
492
|
};
|
|
489
493
|
var isAddress = (value) => typeof value === "object" && value !== null && "address" in value && "postalCode" in value && "locality" in value;
|
|
490
494
|
|
|
491
|
-
// src/
|
|
495
|
+
// src/functions/render-logic.ts
|
|
492
496
|
var only = (condition) => (state) => typeof condition === "string" ? state[condition] || false : condition(state);
|
|
493
497
|
var not = (condition) => (state) => typeof condition === "string" ? !state[condition] : !condition(state);
|
|
494
498
|
var or = (...conditions) => (state) => conditions.some(
|
|
@@ -687,7 +691,6 @@ var featuresFormFields = [
|
|
|
687
691
|
name: "propertyType",
|
|
688
692
|
fieldType: "propertyType",
|
|
689
693
|
label: "Nature du bien",
|
|
690
|
-
props: { className: "md:col-span-2" },
|
|
691
694
|
requiredFor: []
|
|
692
695
|
},
|
|
693
696
|
{
|
|
@@ -818,7 +821,6 @@ var featuresFormFields = [
|
|
|
818
821
|
name: "isOccupied",
|
|
819
822
|
fieldType: "radio",
|
|
820
823
|
label: "Vendu occup\xE9",
|
|
821
|
-
props: { className: "md:col-span-2" },
|
|
822
824
|
requiredFor: ["MANDATE_CREATION" /* MandateCreation */, "DIFFUSION" /* Diffusion */]
|
|
823
825
|
},
|
|
824
826
|
{
|
|
@@ -925,7 +927,6 @@ var technicalFormFields = [
|
|
|
925
927
|
name: "isDpeCompleted",
|
|
926
928
|
fieldType: "radio",
|
|
927
929
|
label: "DPE r\xE9alis\xE9",
|
|
928
|
-
props: { className: "md:col-span-2" },
|
|
929
930
|
condition: and(not("isParking"), not("isLand")),
|
|
930
931
|
requiredFor: ["DIFFUSION" /* Diffusion */]
|
|
931
932
|
},
|
|
@@ -947,7 +948,6 @@ var technicalFormFields = [
|
|
|
947
948
|
name: "gesScore",
|
|
948
949
|
fieldType: "grade",
|
|
949
950
|
label: "Score GES",
|
|
950
|
-
props: { className: "md:col-span-2" },
|
|
951
951
|
condition: and(not("isParking"), not("isLand"), only("isDpeCompleted")),
|
|
952
952
|
requiredFor: ["DIFFUSION" /* Diffusion */]
|
|
953
953
|
},
|
|
@@ -1363,6 +1363,7 @@ var MANDATE_EXCLUSIVITY = [
|
|
|
1363
1363
|
SHARING_CONFIGURATION,
|
|
1364
1364
|
STANDINGS,
|
|
1365
1365
|
VIEWS,
|
|
1366
|
+
and,
|
|
1366
1367
|
featuresFormFields,
|
|
1367
1368
|
formatAddress,
|
|
1368
1369
|
formatAgentLegalData,
|
|
@@ -1380,6 +1381,9 @@ var MANDATE_EXCLUSIVITY = [
|
|
|
1380
1381
|
getNetPrice,
|
|
1381
1382
|
getPropertyState,
|
|
1382
1383
|
getPropertyTitle,
|
|
1384
|
+
not,
|
|
1385
|
+
only,
|
|
1386
|
+
or,
|
|
1383
1387
|
propertyFields,
|
|
1384
1388
|
shouldRender,
|
|
1385
1389
|
surfacesFormFields,
|
package/dist/index.mjs
CHANGED
|
@@ -414,7 +414,7 @@ var getValue = (params) => {
|
|
|
414
414
|
};
|
|
415
415
|
var isAddress = (value) => typeof value === "object" && value !== null && "address" in value && "postalCode" in value && "locality" in value;
|
|
416
416
|
|
|
417
|
-
// src/
|
|
417
|
+
// src/functions/render-logic.ts
|
|
418
418
|
var only = (condition) => (state) => typeof condition === "string" ? state[condition] || false : condition(state);
|
|
419
419
|
var not = (condition) => (state) => typeof condition === "string" ? !state[condition] : !condition(state);
|
|
420
420
|
var or = (...conditions) => (state) => conditions.some(
|
|
@@ -613,7 +613,6 @@ var featuresFormFields = [
|
|
|
613
613
|
name: "propertyType",
|
|
614
614
|
fieldType: "propertyType",
|
|
615
615
|
label: "Nature du bien",
|
|
616
|
-
props: { className: "md:col-span-2" },
|
|
617
616
|
requiredFor: []
|
|
618
617
|
},
|
|
619
618
|
{
|
|
@@ -744,7 +743,6 @@ var featuresFormFields = [
|
|
|
744
743
|
name: "isOccupied",
|
|
745
744
|
fieldType: "radio",
|
|
746
745
|
label: "Vendu occup\xE9",
|
|
747
|
-
props: { className: "md:col-span-2" },
|
|
748
746
|
requiredFor: ["MANDATE_CREATION" /* MandateCreation */, "DIFFUSION" /* Diffusion */]
|
|
749
747
|
},
|
|
750
748
|
{
|
|
@@ -851,7 +849,6 @@ var technicalFormFields = [
|
|
|
851
849
|
name: "isDpeCompleted",
|
|
852
850
|
fieldType: "radio",
|
|
853
851
|
label: "DPE r\xE9alis\xE9",
|
|
854
|
-
props: { className: "md:col-span-2" },
|
|
855
852
|
condition: and(not("isParking"), not("isLand")),
|
|
856
853
|
requiredFor: ["DIFFUSION" /* Diffusion */]
|
|
857
854
|
},
|
|
@@ -873,7 +870,6 @@ var technicalFormFields = [
|
|
|
873
870
|
name: "gesScore",
|
|
874
871
|
fieldType: "grade",
|
|
875
872
|
label: "Score GES",
|
|
876
|
-
props: { className: "md:col-span-2" },
|
|
877
873
|
condition: and(not("isParking"), not("isLand"), only("isDpeCompleted")),
|
|
878
874
|
requiredFor: ["DIFFUSION" /* Diffusion */]
|
|
879
875
|
},
|
|
@@ -1288,6 +1284,7 @@ export {
|
|
|
1288
1284
|
SHARING_CONFIGURATION,
|
|
1289
1285
|
STANDINGS,
|
|
1290
1286
|
VIEWS,
|
|
1287
|
+
and,
|
|
1291
1288
|
featuresFormFields,
|
|
1292
1289
|
formatAddress,
|
|
1293
1290
|
formatAgentLegalData,
|
|
@@ -1305,6 +1302,9 @@ export {
|
|
|
1305
1302
|
getNetPrice,
|
|
1306
1303
|
getPropertyState,
|
|
1307
1304
|
getPropertyTitle,
|
|
1305
|
+
not,
|
|
1306
|
+
only,
|
|
1307
|
+
or,
|
|
1308
1308
|
propertyFields,
|
|
1309
1309
|
shouldRender,
|
|
1310
1310
|
surfacesFormFields,
|