ecotransac-shared-js 1.1.10 → 1.1.12

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
@@ -878,20 +878,6 @@ declare const getAgencyFees: (mandate: GetNetPriceMandate & {
878
878
  agencyFeePercentage: number;
879
879
  }) => number;
880
880
 
881
- declare const getLabel: <T>(list: {
882
- value: T;
883
- label: string;
884
- }[], value: T) => string | null;
885
- declare const formatAddress: (address: Pick<Address, "address" | "postalCode" | "locality">) => string;
886
- declare const formatSeconds: (seconds: number) => string;
887
- declare const formatDate: (date?: Date | null, withTime?: boolean) => string | null;
888
- declare const formatPrice: (price: number) => string;
889
- declare const formatPhone: (phone?: string | null) => string | null;
890
- declare const formatMandateNumber: (number: number) => string;
891
- declare const formatAgentLegalData: (profile?: Pick<Profile, "legalStatus" | "registrationNumber" | "registrationPlace"> | null) => string | null;
892
- declare const getPropertyTitle: (property: Pick<Property, "propertyType" | "roomCount" | "livingArea" | "isForProfessionalUse" | "floorLevel">) => string;
893
- declare const formatNumber: (number?: number | null) => string;
894
-
895
881
  type Field<T> = {
896
882
  name: keyof T;
897
883
  fieldType: FieldType;
@@ -914,6 +900,27 @@ type SelectOption = {
914
900
  label: string;
915
901
  };
916
902
 
903
+ declare const shouldRender: (state: State, condition?: Condition) => boolean;
904
+ declare const getFieldValues: <D>(fields: Field<D>[], propertyState: State, data: Partial<D>) => ({
905
+ label: string;
906
+ value: string;
907
+ isNotDefined: boolean;
908
+ } | null)[];
909
+
910
+ declare const getLabel: <T>(list: {
911
+ value: T;
912
+ label: string;
913
+ }[], value: T) => string | null;
914
+ declare const formatAddress: (address: Pick<Address, "address" | "postalCode" | "locality">) => string;
915
+ declare const formatSeconds: (seconds: number) => string;
916
+ declare const formatDate: (date?: Date | null, withTime?: boolean) => string | null;
917
+ declare const formatPrice: (price: number) => string;
918
+ declare const formatPhone: (phone?: string | null) => string | null;
919
+ declare const formatMandateNumber: (number: number) => string;
920
+ declare const formatAgentLegalData: (profile?: Pick<Profile, "legalStatus" | "registrationNumber" | "registrationPlace"> | null) => string | null;
921
+ declare const getPropertyTitle: (property: Pick<Property, "propertyType" | "roomCount" | "livingArea" | "isForProfessionalUse" | "floorLevel">) => string;
922
+ declare const formatNumber: (number?: number | null) => string;
923
+
917
924
  declare const featuresFormFields: Field<Property>[];
918
925
  declare const technicalFormFields: Field<Property>[];
919
926
  declare const surfacesFormFields: Field<Property>[];
@@ -981,4 +988,4 @@ declare const MANDATE_EXCLUSIVITY: {
981
988
  label: string;
982
989
  }[];
983
990
 
984
- 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, getLabel, getLowThreshold, getNetPrice, getPropertyState, getPropertyTitle, propertyFields, surfacesFormFields, technicalFormFields };
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 };
package/dist/index.d.ts CHANGED
@@ -878,20 +878,6 @@ declare const getAgencyFees: (mandate: GetNetPriceMandate & {
878
878
  agencyFeePercentage: number;
879
879
  }) => number;
880
880
 
881
- declare const getLabel: <T>(list: {
882
- value: T;
883
- label: string;
884
- }[], value: T) => string | null;
885
- declare const formatAddress: (address: Pick<Address, "address" | "postalCode" | "locality">) => string;
886
- declare const formatSeconds: (seconds: number) => string;
887
- declare const formatDate: (date?: Date | null, withTime?: boolean) => string | null;
888
- declare const formatPrice: (price: number) => string;
889
- declare const formatPhone: (phone?: string | null) => string | null;
890
- declare const formatMandateNumber: (number: number) => string;
891
- declare const formatAgentLegalData: (profile?: Pick<Profile, "legalStatus" | "registrationNumber" | "registrationPlace"> | null) => string | null;
892
- declare const getPropertyTitle: (property: Pick<Property, "propertyType" | "roomCount" | "livingArea" | "isForProfessionalUse" | "floorLevel">) => string;
893
- declare const formatNumber: (number?: number | null) => string;
894
-
895
881
  type Field<T> = {
896
882
  name: keyof T;
897
883
  fieldType: FieldType;
@@ -914,6 +900,27 @@ type SelectOption = {
914
900
  label: string;
915
901
  };
916
902
 
903
+ declare const shouldRender: (state: State, condition?: Condition) => boolean;
904
+ declare const getFieldValues: <D>(fields: Field<D>[], propertyState: State, data: Partial<D>) => ({
905
+ label: string;
906
+ value: string;
907
+ isNotDefined: boolean;
908
+ } | null)[];
909
+
910
+ declare const getLabel: <T>(list: {
911
+ value: T;
912
+ label: string;
913
+ }[], value: T) => string | null;
914
+ declare const formatAddress: (address: Pick<Address, "address" | "postalCode" | "locality">) => string;
915
+ declare const formatSeconds: (seconds: number) => string;
916
+ declare const formatDate: (date?: Date | null, withTime?: boolean) => string | null;
917
+ declare const formatPrice: (price: number) => string;
918
+ declare const formatPhone: (phone?: string | null) => string | null;
919
+ declare const formatMandateNumber: (number: number) => string;
920
+ declare const formatAgentLegalData: (profile?: Pick<Profile, "legalStatus" | "registrationNumber" | "registrationPlace"> | null) => string | null;
921
+ declare const getPropertyTitle: (property: Pick<Property, "propertyType" | "roomCount" | "livingArea" | "isForProfessionalUse" | "floorLevel">) => string;
922
+ declare const formatNumber: (number?: number | null) => string;
923
+
917
924
  declare const featuresFormFields: Field<Property>[];
918
925
  declare const technicalFormFields: Field<Property>[];
919
926
  declare const surfacesFormFields: Field<Property>[];
@@ -981,4 +988,4 @@ declare const MANDATE_EXCLUSIVITY: {
981
988
  label: string;
982
989
  }[];
983
990
 
984
- 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, getLabel, getLowThreshold, getNetPrice, getPropertyState, getPropertyTitle, propertyFields, surfacesFormFields, technicalFormFields };
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 };