kui-crm_actions 0.0.110 → 0.0.111
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/cjs/index.js +45 -43
- package/cjs/index.js.map +1 -1
- package/index.d.ts +15 -8
- package/index.js +45 -44
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as kui_crm from 'kui-crm';
|
2
|
-
import { InputParams, ResourceTypes, MeterTypes, FileStore, InputFileWithVisibilityFields, MeterFeaturesFormFields, InspectionTypes, InspectionRoomPhotoTypes, ParkingTypes as ParkingTypes$1, CityParams, RoomTypes, RenovationParams, RoomParams, HouseTypes as HouseTypes$1, WallMaterials as WallMaterials$1, OverlapTypes as OverlapTypes$1, GasTypes as GasTypes$1, ImageStore, ApartmentDescriptionParams, ApartmentMetroStationsParams, PhoneParams, WifiParams, InternetProviderParams, TVTypes, CompanyAutocompleteFields, CountryAutocompleteFields, TaxesTypes, MetersCountParams, FillingTagsAutocompleteFields, ApartmentFillingVariants, ImageBodyRequest, FillingInfoFormFields as FillingInfoFormFields$1, ContractLinkModel, FileBodyRequest, RoomType, ApartmentMainInfoModelFields, PostInspectionFillingListModel, ApartmentDetailInfoModelFields as ApartmentDetailInfoModelFields$1, ApartmentModel, ApartmentPartialDescriptionParams, MainObjectInfoInterface, ApartmentMainInfoParams, SecurityObjectInfoInterface, ApartmentSecurityInfoParams, DetailObjectInfoInterface, ApartmentDetailInfoParams, ApartmentTelecommunicationInfoParams, ApartmentHouseInfoParams, MaxMetersInfoParams, LatLonParams, InspectionRoomPhotoModel, InspectionFillingModel, ApartmentMetroParams, TransferInspectionMeterModel, InventoryInspectionMeterModel, InspectionPartialMetersInfoParams, ApartmentPaymentInfoParams, FullInspectionCommonFields, InspectionPaymentInfoParams, InspectionMeterCommonInfo, InspectionMeterInfoParams, InventoryInspectionFields, InspectionMetersInfoParams, BasicMeterFeaturesFormFields, InspectionFeedbackParams, FillingTypes, FillingListItemModel, GeolocationParams } from 'kui-crm';
|
2
|
+
import { InputParams, ResourceTypes, MeterTypes, FileStore, InputFileWithVisibilityFields, MeterFeaturesFormFields, InspectionTypes, InspectionRoomPhotoTypes, ParkingTypes as ParkingTypes$1, CityParams, RoomTypes, RenovationParams, RoomParams, HouseTypes as HouseTypes$1, WallMaterials as WallMaterials$1, OverlapTypes as OverlapTypes$1, GasTypes as GasTypes$1, ImageStore, ApartmentDescriptionParams, ApartmentMetroStationsParams, PhoneParams, WifiParams, InternetProviderParams, TVTypes, CompanyAutocompleteFields, CountryAutocompleteFields, TaxesTypes, MetersCountParams, FillingTagsAutocompleteFields, ApartmentFillingVariants, ImageBodyRequest, FillingInfoFormFields as FillingInfoFormFields$1, ContractLinkModel, FileBodyRequest, RoomType, ApartmentMainInfoModelFields, PostInspectionFillingListModel, ApartmentDetailInfoModelFields as ApartmentDetailInfoModelFields$1, ApartmentModel, ApartmentPartialDescriptionParams, MainObjectInfoInterface, ApartmentMainInfoParams, SecurityObjectInfoInterface, ApartmentSecurityInfoParams, DetailObjectInfoInterface, ApartmentDetailInfoParams, ApartmentTelecommunicationInfoParams, ApartmentHouseInfoParams, MaxMetersInfoParams, LatLonParams, InspectionRoomPhotoModel, InspectionFillingModel, ApartmentMetroParams, TransferInspectionMeterModel, InventoryInspectionMeterModel, InspectionPartialMetersInfoParams, ApartmentPaymentInfoParams, FullInspectionCommonFields, InspectionPaymentInfoParams, InspectionMeterCommonInfo, InspectionMeterInfoParams, InventoryInspectionFields, InspectionMetersInfoParams, BasicMeterFeaturesFormFields, BasicMeterFieldsSettings, InputByTypeProps, InspectionFeedbackParams, FillingTypes, FillingListItemModel, GeolocationParams } from 'kui-crm';
|
3
3
|
import { DateTime } from 'luxon';
|
4
4
|
import { Loader, MultistepForm, PhoneParams as PhoneParams$1 } from 'kui-utils';
|
5
5
|
import * as yup from 'yup';
|
@@ -620,7 +620,6 @@ declare const BasicApartmentInfoFieldsSchema: {
|
|
620
620
|
}, yup.AnyObject, {
|
621
621
|
name: undefined;
|
622
622
|
}, "">;
|
623
|
-
zipCode: yup.StringSchema<string, yup.AnyObject, undefined, "">;
|
624
623
|
};
|
625
624
|
declare const BasicApartmentInfoStepSchema: yup.ObjectSchema<{
|
626
625
|
apartment: {
|
@@ -630,7 +629,6 @@ declare const BasicApartmentInfoStepSchema: yup.ObjectSchema<{
|
|
630
629
|
city: {
|
631
630
|
name: string;
|
632
631
|
};
|
633
|
-
zipCode: string;
|
634
632
|
}, yup.AnyObject, {
|
635
633
|
apartment: {
|
636
634
|
address: undefined;
|
@@ -639,7 +637,6 @@ declare const BasicApartmentInfoStepSchema: yup.ObjectSchema<{
|
|
639
637
|
city: {
|
640
638
|
name: undefined;
|
641
639
|
};
|
642
|
-
zipCode: undefined;
|
643
640
|
}, "">;
|
644
641
|
|
645
642
|
declare const getHouseInfoStep: (settings?: InspectionFieldsSettings | undefined) => InputParams<HouseInfoStepFields>[];
|
@@ -781,17 +778,28 @@ declare const AdditionalInfoFieldsSchema: {
|
|
781
778
|
}, yup.AnyObject, {
|
782
779
|
name: undefined;
|
783
780
|
}, "">;
|
781
|
+
company: yup.ObjectSchema<{
|
782
|
+
name: string;
|
783
|
+
}, yup.AnyObject, {
|
784
|
+
name: undefined;
|
785
|
+
}, "">;
|
784
786
|
};
|
785
787
|
declare const AdditionalInfoStepSchema: yup.ObjectSchema<{
|
786
788
|
taxesType: string;
|
787
789
|
countryOfResidence: {
|
788
790
|
name: string;
|
789
791
|
};
|
792
|
+
company: {
|
793
|
+
name: string;
|
794
|
+
};
|
790
795
|
}, yup.AnyObject, {
|
791
796
|
taxesType: undefined;
|
792
797
|
countryOfResidence: {
|
793
798
|
name: undefined;
|
794
799
|
};
|
800
|
+
company: {
|
801
|
+
name: undefined;
|
802
|
+
};
|
795
803
|
}, "">;
|
796
804
|
|
797
805
|
declare const getHouseServicesInfoStep: (settings?: InspectionFieldsSettings | undefined) => InputParams<HouseServicesInfoStepFields>[];
|
@@ -892,7 +900,6 @@ declare const MetersInfoStepSchema: yup.ObjectSchema<{
|
|
892
900
|
declare const getTelecommunicationsInfoStepFields: (settings?: InspectionFieldsSettings | undefined) => InputParams<TelecommunicationsInfoStepFields>[];
|
893
901
|
|
894
902
|
declare const TelecommunicationsInfoFieldsSchema: {
|
895
|
-
tvType: yup.StringSchema<string, yup.AnyObject, undefined, "">;
|
896
903
|
homePhone: yup.ObjectSchema<{
|
897
904
|
phoneNumber: string | null | undefined;
|
898
905
|
} | null, yup.AnyObject, {
|
@@ -900,12 +907,10 @@ declare const TelecommunicationsInfoFieldsSchema: {
|
|
900
907
|
}, "">;
|
901
908
|
};
|
902
909
|
declare const TelecommunicationsInfoStepSchema: yup.ObjectSchema<{
|
903
|
-
tvType: string;
|
904
910
|
homePhone: {
|
905
911
|
phoneNumber?: string | null | undefined;
|
906
912
|
} | null;
|
907
913
|
}, yup.AnyObject, {
|
908
|
-
tvType: undefined;
|
909
914
|
homePhone: {
|
910
915
|
phoneNumber: undefined;
|
911
916
|
};
|
@@ -936,6 +941,8 @@ type InventoryMeterInfoFieldsProps = {
|
|
936
941
|
defaultValues?: Partial<BasicMeterFeaturesFormFields>
|
937
942
|
}
|
938
943
|
|
944
|
+
declare const getInventoryMeterFields: (settings: BasicMeterFieldsSettings, inputsSettings?: any) => InputByTypeProps<BasicMeterFeaturesFormFields>[];
|
945
|
+
|
939
946
|
declare function InventoryMeterInfoFields(props: InventoryMeterInfoFieldsProps): JSX.Element;
|
940
947
|
|
941
948
|
type MeterInfoStepProps = {
|
@@ -1048,4 +1055,4 @@ type ApartmentPointProps = {
|
|
1048
1055
|
|
1049
1056
|
declare const ObjectForMapPoint: (props: ApartmentPointProps) => JSX.Element;
|
1050
1057
|
|
1051
|
-
export { AdditionalInfoFieldsSchema, AdditionalInfoStepFields, AdditionalInfoStepSchema, ApartmentInspectionModel, ApartmentInspectionParams, ApartmentLinkParams, ApartmentPaymentsFormFields, BasicApartmentInfoFieldsSchema, BasicApartmentInfoStepFields, BasicApartmentInfoStepSchema, CommonInspectionFields, CommonInspectionFormFields, DetailApartmentInfoFieldsSchema, DetailApartmentInfoStepFields, DetailApartmentInfoStepSchema, FillingCheckParams, FillingInfoFieldsSchema, FillingInfoFormFields, FillingInfoStepFields, FillingListInfoStepFields, FillingListStore, HouseInfoFieldsSchema, HouseInfoStepFields, HouseInfoStepSchema, HouseServicesInfoFieldsSchema, HouseServicesInfoStepFields, HouseServicesInfoStepSchema, InitialInspectionFieldsBody, InitialInspectionFormFields, InitialInspectionInfoFields, InitialInspectionPostBody, InitialInspectionRoomParams, InspectionAppraisalLiteModel, _default as InspectionFeedback, InspectionFieldsSettings, InspectionFillingCard, InspectionFillingCardProps, InspectionFillingItemFields, InspectionFillingListFields, InspectionFillingParams, InspectionImpairmentLiteModel, InspectionMeterCommonFields, InspectionMeterFields, InspectionMeterValueModel, InspectionMetersStepFields, InspectionPartialMetersStepFields, InspectionRoomImagesParams, InspectionRoomPhotoRequest, InspectionRoomsImagesFields, InventoryInspectionFieldsBody, InventoryInspectionFormFields, InventoryInspectionPostBody, InventoryMeterInfoFields, InventoryMeterModel, MeterInfoStepProps, MeterValueModel, MeterValuesFields, MetersInfoFieldsSchema, MetersInfoStepFields, MetersInfoStepSchema, MetroStationParams, ObjectForMapCard, ObjectForMapOverlay, ObjectForMapParams, ObjectForMapPoint, PartialMeterInfoFields, PartialMeterInfoStepProps, PartialMeterModel, PostApartmentInspectionRequest, RegularInspectionFormFields, RegularInspectionPostBody, RegularlyInspectionFieldsBody, RoomImagesParams, RoomsApartmentInfoFieldsSchema, RoomsApartmentInfoStepFields, RoomsApartmentInfoStepSchema, SecurityApartmentInfoFieldsSchema, SecurityApartmentInfoStepFields, SecurityApartmentInfoStepSchema, TelecommunicationsInfoFieldsSchema, TelecommunicationsInfoStepFields, TelecommunicationsInfoStepSchema, TenantParams, TransferInspectionFieldsBody, TransferInspectionFormFields, TransferInspectionPostBody, TransferInspectionTypes, WaterMeterFieldsSchema, apartmentFields, getAdditionalInfoStepFields, getBasicApartmentInfoFields, getDetailApartmentInfoFields, getFillingInfoFields, getHouseInfoStep, getHouseServicesInfoStep, getMetersInfoStepFields, getPartialMeterInfoSchema, getRoomsApartmentInfoFields, getRoomsImagesSteps, getSecurityApartmentInfoFields, getTelecommunicationsInfoStepFields, getWaterMeterFields, inspectionsRequestBody, inspectionsRequests, renderMetersSteps, useFillingList, useMetersValues };
|
1058
|
+
export { AdditionalInfoFieldsSchema, AdditionalInfoStepFields, AdditionalInfoStepSchema, ApartmentInspectionModel, ApartmentInspectionParams, ApartmentLinkParams, ApartmentPaymentsFormFields, BasicApartmentInfoFieldsSchema, BasicApartmentInfoStepFields, BasicApartmentInfoStepSchema, CommonInspectionFields, CommonInspectionFormFields, DetailApartmentInfoFieldsSchema, DetailApartmentInfoStepFields, DetailApartmentInfoStepSchema, FillingCheckParams, FillingInfoFieldsSchema, FillingInfoFormFields, FillingInfoStepFields, FillingListInfoStepFields, FillingListStore, HouseInfoFieldsSchema, HouseInfoStepFields, HouseInfoStepSchema, HouseServicesInfoFieldsSchema, HouseServicesInfoStepFields, HouseServicesInfoStepSchema, InitialInspectionFieldsBody, InitialInspectionFormFields, InitialInspectionInfoFields, InitialInspectionPostBody, InitialInspectionRoomParams, InspectionAppraisalLiteModel, _default as InspectionFeedback, InspectionFieldsSettings, InspectionFillingCard, InspectionFillingCardProps, InspectionFillingItemFields, InspectionFillingListFields, InspectionFillingParams, InspectionImpairmentLiteModel, InspectionMeterCommonFields, InspectionMeterFields, InspectionMeterValueModel, InspectionMetersStepFields, InspectionPartialMetersStepFields, InspectionRoomImagesParams, InspectionRoomPhotoRequest, InspectionRoomsImagesFields, InventoryInspectionFieldsBody, InventoryInspectionFormFields, InventoryInspectionPostBody, InventoryMeterInfoFields, InventoryMeterModel, MeterInfoStepProps, MeterValueModel, MeterValuesFields, MetersInfoFieldsSchema, MetersInfoStepFields, MetersInfoStepSchema, MetroStationParams, ObjectForMapCard, ObjectForMapOverlay, ObjectForMapParams, ObjectForMapPoint, PartialMeterInfoFields, PartialMeterInfoStepProps, PartialMeterModel, PostApartmentInspectionRequest, RegularInspectionFormFields, RegularInspectionPostBody, RegularlyInspectionFieldsBody, RoomImagesParams, RoomsApartmentInfoFieldsSchema, RoomsApartmentInfoStepFields, RoomsApartmentInfoStepSchema, SecurityApartmentInfoFieldsSchema, SecurityApartmentInfoStepFields, SecurityApartmentInfoStepSchema, TelecommunicationsInfoFieldsSchema, TelecommunicationsInfoStepFields, TelecommunicationsInfoStepSchema, TenantParams, TransferInspectionFieldsBody, TransferInspectionFormFields, TransferInspectionPostBody, TransferInspectionTypes, WaterMeterFieldsSchema, apartmentFields, getAdditionalInfoStepFields, getBasicApartmentInfoFields, getDetailApartmentInfoFields, getFillingInfoFields, getHouseInfoStep, getHouseServicesInfoStep, getInventoryMeterFields, getMetersInfoStepFields, getPartialMeterInfoSchema, getRoomsApartmentInfoFields, getRoomsImagesSteps, getSecurityApartmentInfoFields, getTelecommunicationsInfoStepFields, getWaterMeterFields, inspectionsRequestBody, inspectionsRequests, renderMetersSteps, useFillingList, useMetersValues };
|
package/index.js
CHANGED
@@ -658,9 +658,9 @@ var apartmentFields = {
|
|
658
658
|
var getBasicApartmentInfoFields = function (handlePlaceSelect, settings) { return [
|
659
659
|
__assign({ name: "country", label: "Country", variant: "custom", CustomInput: CountryAutocomplete, size: 12 }, settings === null || settings === void 0 ? void 0 : settings.country),
|
660
660
|
__assign({ name: "region", label: "Region", variant: "custom", CustomInput: RegionAutocomplete }, settings === null || settings === void 0 ? void 0 : settings.region),
|
661
|
-
__assign({ name: "city", label: "City", variant: "custom", CustomInput: CityAutocomplete }, settings === null || settings === void 0 ? void 0 : settings.city),
|
662
|
-
__assign({ name: "apartment", variant: "custom", CustomInput: InputWithAddressAutocomplete, handlePlaceSelect: handlePlaceSelect, size: 12 }, settings === null || settings === void 0 ? void 0 : settings.apartment),
|
663
|
-
__assign({ label: "Apartment", name: "apartmentNumber", "data-testid": "apartment_number" }, settings === null || settings === void 0 ? void 0 : settings.apartmentNumber),
|
661
|
+
__assign({ name: "city", label: "City", variant: "custom", CustomInput: CityAutocomplete, isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.city),
|
662
|
+
__assign({ name: "apartment", variant: "custom", CustomInput: InputWithAddressAutocomplete, handlePlaceSelect: handlePlaceSelect, size: 12, isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.apartment),
|
663
|
+
__assign({ label: "Apartment", name: "apartmentNumber", "data-testid": "apartment_number", isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.apartmentNumber),
|
664
664
|
__assign({ label: "Zip code", name: "zipCode" }, settings === null || settings === void 0 ? void 0 : settings.zipCode),
|
665
665
|
]; };
|
666
666
|
|
@@ -672,20 +672,19 @@ var BasicApartmentInfoFieldsSchema = {
|
|
672
672
|
city: yup.object({
|
673
673
|
name: yup.string().required("This field is required"),
|
674
674
|
}),
|
675
|
-
zipCode: yup.string().required("This field is required"),
|
676
675
|
};
|
677
676
|
var BasicApartmentInfoStepSchema = yup.object(BasicApartmentInfoFieldsSchema);
|
678
677
|
|
679
678
|
var getHouseInfoStep = function (settings) { return [
|
680
|
-
__assign({ name: "typeOfHouse", label: "Type houses", variant: "select", options: HouseTypesValues }, settings === null || settings === void 0 ? void 0 : settings.typeOfHouse),
|
679
|
+
__assign({ name: "typeOfHouse", label: "Type houses", variant: "select", options: HouseTypesValues, isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.typeOfHouse),
|
681
680
|
__assign({ name: "houseNumber", label: "House series" }, settings === null || settings === void 0 ? void 0 : settings.houseNumber),
|
682
|
-
__assign({ name: "wallMaterial", label: "Wall material", variant: "select", options: WallMaterialsValues }, settings === null || settings === void 0 ? void 0 : settings.wallMaterial),
|
683
|
-
__assign({ name: "overlapType", label: "Overlap type", variant: "select", options: SlabsTypesValues }, settings === null || settings === void 0 ? void 0 : settings.overlapType),
|
684
|
-
__assign({ name: "gasLeads", label: "Gas", variant: "select", options: GasTypesValues }, settings === null || settings === void 0 ? void 0 : settings.gasLeads),
|
685
|
-
__assign({ name: "withHotWater", label: "Hot water", variant: "select", options: BooleanValues }, settings === null || settings === void 0 ? void 0 : settings.withHotWater),
|
686
|
-
__assign({ name: "passengerElevatorsCount", label: "Passenger elevators", type: "number" }, settings === null || settings === void 0 ? void 0 : settings.passengerElevatorsCount),
|
687
|
-
__assign({ name: "serviceElevatorsCount", label: "Service elevators", type: "number" }, settings === null || settings === void 0 ? void 0 : settings.serviceElevatorsCount),
|
688
|
-
__assign({ name: "buildingYear", label: "Builded" }, settings === null || settings === void 0 ? void 0 : settings.buildingYear),
|
681
|
+
__assign({ name: "wallMaterial", label: "Wall material", variant: "select", options: WallMaterialsValues, isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.wallMaterial),
|
682
|
+
__assign({ name: "overlapType", label: "Overlap type", variant: "select", options: SlabsTypesValues, isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.overlapType),
|
683
|
+
__assign({ name: "gasLeads", label: "Gas", variant: "select", options: GasTypesValues, isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.gasLeads),
|
684
|
+
__assign({ name: "withHotWater", label: "Hot water", variant: "select", options: BooleanValues, isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.withHotWater),
|
685
|
+
__assign({ name: "passengerElevatorsCount", label: "Passenger elevators", type: "number", isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.passengerElevatorsCount),
|
686
|
+
__assign({ name: "serviceElevatorsCount", label: "Service elevators", type: "number", isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.serviceElevatorsCount),
|
687
|
+
__assign({ name: "buildingYear", label: "Builded", isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.buildingYear),
|
689
688
|
]; };
|
690
689
|
|
691
690
|
var HouseInfoFieldsSchema = {
|
@@ -706,7 +705,7 @@ var inputProps = {
|
|
706
705
|
var getDetailApartmentInfoFields = function (roomsCount, bedroomsCount, settings) {
|
707
706
|
var _a, _b;
|
708
707
|
return __spreadArray(__spreadArray([
|
709
|
-
__assign(__assign({ label: "Total area", name: "area", type: "number" }, inputProps), settings === null || settings === void 0 ? void 0 : settings.area)
|
708
|
+
__assign(__assign({ label: "Total area", name: "area", type: "number", isRequired: true }, inputProps), settings === null || settings === void 0 ? void 0 : settings.area)
|
710
709
|
], (roomsCount
|
711
710
|
? new Array(Number(roomsCount))
|
712
711
|
.fill(0)
|
@@ -717,18 +716,18 @@ var getDetailApartmentInfoFields = function (roomsCount, bedroomsCount, settings
|
|
717
716
|
: "Room ".concat(key + 1);
|
718
717
|
var settingsKey = bedroomsCount && key < bedroomsCount ? "bedrooms" : "rooms";
|
719
718
|
return [
|
720
|
-
__assign({ name: "rooms.".concat(key, ".type"), label: "".concat(label, " type"), variant: "select", options: RoomTypeValues }, ((settings === null || settings === void 0 ? void 0 : settings[settingsKey])
|
719
|
+
__assign({ name: "rooms.".concat(key, ".type"), label: "".concat(label, " type"), variant: "select", options: RoomTypeValues, isRequired: true }, ((settings === null || settings === void 0 ? void 0 : settings[settingsKey])
|
721
720
|
? (_a = settings[settingsKey](key)) === null || _a === void 0 ? void 0 : _a.type
|
722
721
|
: {})),
|
723
722
|
];
|
724
723
|
})
|
725
724
|
.flat()
|
726
725
|
: []), true), [
|
727
|
-
__assign(__assign({ name: "ceilingHeight", label: "Ceiling height", type: "number", cornerLabel: "m." }, inputProps), settings === null || settings === void 0 ? void 0 : settings.ceilingHeight),
|
728
|
-
__assign({ name: "numberOfWindows", label: "Windows", type: "number" }, settings === null || settings === void 0 ? void 0 : settings.numberOfWindows),
|
729
|
-
__assign({ name: "renovation.year", label: "Year of last renovation", type: "number" }, settings === null || settings === void 0 ? void 0 : settings.renovation.year),
|
730
|
-
__assign({ name: "renovation.type", label: "Type of renovation", variant: "select", options: RenovationTypeValues }, (_a = settings === null || settings === void 0 ? void 0 : settings.renovation) === null || _a === void 0 ? void 0 : _a.type),
|
731
|
-
__assign({ name: "renovation.style", label: "Renovation style", variant: "select", options: RenovationStyleValues }, (_b = settings === null || settings === void 0 ? void 0 : settings.renovation) === null || _b === void 0 ? void 0 : _b.style),
|
726
|
+
__assign(__assign({ name: "ceilingHeight", label: "Ceiling height", type: "number", cornerLabel: "m.", isRequired: true }, inputProps), settings === null || settings === void 0 ? void 0 : settings.ceilingHeight),
|
727
|
+
__assign({ name: "numberOfWindows", label: "Windows", type: "number", isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.numberOfWindows),
|
728
|
+
__assign({ name: "renovation.year", label: "Year of last renovation", type: "number", isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.renovation.year),
|
729
|
+
__assign({ name: "renovation.type", label: "Type of renovation", variant: "select", options: RenovationTypeValues, isRequired: true }, (_a = settings === null || settings === void 0 ? void 0 : settings.renovation) === null || _a === void 0 ? void 0 : _a.type),
|
730
|
+
__assign({ name: "renovation.style", label: "Renovation style", variant: "select", options: RenovationStyleValues, isRequired: true }, (_b = settings === null || settings === void 0 ? void 0 : settings.renovation) === null || _b === void 0 ? void 0 : _b.style),
|
732
731
|
], false);
|
733
732
|
};
|
734
733
|
|
@@ -748,13 +747,13 @@ var DetailApartmentInfoFieldsSchema = {
|
|
748
747
|
var DetailApartmentInfoStepSchema = yup.object(DetailApartmentInfoFieldsSchema);
|
749
748
|
|
750
749
|
var getRoomsApartmentInfoFields = function (settings) { return [
|
751
|
-
__assign({ label: "Floor", name: "floor", type: "number" }, settings === null || settings === void 0 ? void 0 : settings.floor),
|
752
|
-
__assign({ label: "Floors", name: "floorCount", type: "number" }, settings === null || settings === void 0 ? void 0 : settings.floorCount),
|
753
|
-
__assign({ label: "Rooms", name: "roomsNumber", type: "number" }, settings === null || settings === void 0 ? void 0 : settings.roomsNumber),
|
754
|
-
__assign({ label: "Bedrooms", name: "bedroomsNumber", type: "number" }, settings === null || settings === void 0 ? void 0 : settings.bedroomsNumber),
|
755
|
-
__assign({ label: "Bathrooms", name: "bathroomsNumber", type: "number" }, settings === null || settings === void 0 ? void 0 : settings.bathroomsNumber),
|
756
|
-
__assign({ label: "Restrooms", name: "restroomsNumber", type: "number" }, settings === null || settings === void 0 ? void 0 : settings.restroomsNumber),
|
757
|
-
__assign({ label: "Combined bathroom", name: "combinedBathroomsNumber", type: "number" }, settings === null || settings === void 0 ? void 0 : settings.combinedBathroomsNumber),
|
750
|
+
__assign({ label: "Floor", name: "floor", type: "number", isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.floor),
|
751
|
+
__assign({ label: "Floors", name: "floorCount", type: "number", isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.floorCount),
|
752
|
+
__assign({ label: "Rooms", name: "roomsNumber", type: "number", isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.roomsNumber),
|
753
|
+
__assign({ label: "Bedrooms", name: "bedroomsNumber", type: "number", isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.bedroomsNumber),
|
754
|
+
__assign({ label: "Bathrooms", name: "bathroomsNumber", type: "number", isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.bathroomsNumber),
|
755
|
+
__assign({ label: "Restrooms", name: "restroomsNumber", type: "number", isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.restroomsNumber),
|
756
|
+
__assign({ label: "Combined bathroom", name: "combinedBathroomsNumber", type: "number", isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.combinedBathroomsNumber),
|
758
757
|
]; };
|
759
758
|
|
760
759
|
var RoomsApartmentInfoFieldsSchema = {
|
@@ -795,11 +794,11 @@ var RoomsApartmentInfoFieldsSchema = {
|
|
795
794
|
var RoomsApartmentInfoStepSchema = yup.object(RoomsApartmentInfoFieldsSchema);
|
796
795
|
|
797
796
|
var getSecurityApartmentInfoFields = function (settings) { return [
|
798
|
-
__assign({ label: "Object type", name: "typeOfObject", variant: "select", options: RoomTypesValues }, settings === null || settings === void 0 ? void 0 : settings.typeOfObject),
|
799
|
-
__assign({ label: "Entrance", name: "entrance" }, settings === null || settings === void 0 ? void 0 : settings.entrance),
|
800
|
-
__assign({ name: "hasIntercom", label: "Intercom", variant: "select", options: BooleanValues }, settings === null || settings === void 0 ? void 0 : settings.hasIntercom),
|
797
|
+
__assign({ label: "Object type", name: "typeOfObject", variant: "select", options: RoomTypesValues, isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.typeOfObject),
|
798
|
+
__assign({ label: "Entrance", name: "entrance", isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.entrance),
|
799
|
+
__assign({ name: "hasIntercom", label: "Intercom", variant: "select", options: BooleanValues, isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.hasIntercom),
|
801
800
|
__assign({ name: "intercomCode", label: "Intercom code", variant: "custom", CustomInput: DependentInput, dependentInputName: "hasIntercom" }, settings === null || settings === void 0 ? void 0 : settings.intercomCode),
|
802
|
-
__assign({ name: "hasGate", label: "Gate", variant: "select", options: BooleanValues }, settings === null || settings === void 0 ? void 0 : settings.hasGate),
|
801
|
+
__assign({ name: "hasGate", label: "Gate", variant: "select", options: BooleanValues, isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.hasGate),
|
803
802
|
__assign({ name: "gateCode", label: "Gate code", variant: "custom", CustomInput: DependentInput, dependentInputName: "hasGate" }, settings === null || settings === void 0 ? void 0 : settings.gateCode),
|
804
803
|
__assign({ name: "parkingType", label: "Parking", variant: "select", options: ParkingTypesValues }, settings === null || settings === void 0 ? void 0 : settings.parkingType),
|
805
804
|
__assign({ name: "parkingNumber", label: "Parking number", variant: "custom", CustomInput: DependentInput, dependentInputName: "parkingType" }, settings === null || settings === void 0 ? void 0 : settings.parkingNumber),
|
@@ -829,17 +828,20 @@ var AdditionalInfoFieldsSchema = {
|
|
829
828
|
countryOfResidence: yup.object({
|
830
829
|
name: yup.string().required(defaultRequiredMessage),
|
831
830
|
}),
|
831
|
+
company: yup.object({
|
832
|
+
name: yup.string().required(defaultRequiredMessage),
|
833
|
+
}),
|
832
834
|
};
|
833
835
|
var AdditionalInfoStepSchema = yup.object(AdditionalInfoFieldsSchema);
|
834
836
|
|
835
837
|
var getHouseServicesInfoStep = function (settings) { return [
|
836
|
-
__assign({ name: "hasBarrier", label: "Barrier", variant: "select", options: BooleanValues }, settings === null || settings === void 0 ? void 0 : settings.hasBarrier),
|
838
|
+
__assign({ name: "hasBarrier", label: "Barrier", variant: "select", options: BooleanValues, isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.hasBarrier),
|
837
839
|
__assign({ name: "barrierPhone", label: "Barrier code", variant: "custom", CustomInput: DependentInput, dependentInputName: "hasBarrier", Input: InputPhoneWithForm }, settings === null || settings === void 0 ? void 0 : settings.barrierPhone),
|
838
|
-
__assign({ name: "hasConcierge", label: "Concierge", variant: "select", options: BooleanValues }, settings === null || settings === void 0 ? void 0 : settings.hasConcierge),
|
840
|
+
__assign({ name: "hasConcierge", label: "Concierge", variant: "select", options: BooleanValues, isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.hasConcierge),
|
839
841
|
__assign({ name: "conciergePhone", label: "Concierge", variant: "custom", CustomInput: DependentInput, dependentInputName: "hasConcierge", Input: InputPhoneWithForm }, settings === null || settings === void 0 ? void 0 : settings.conciergePhone),
|
840
|
-
__assign({ name: "hasSecurity", label: "Security", variant: "select", options: BooleanValues }, settings === null || settings === void 0 ? void 0 : settings.hasSecurity),
|
842
|
+
__assign({ name: "hasSecurity", label: "Security", variant: "select", options: BooleanValues, isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.hasSecurity),
|
841
843
|
__assign({ name: "securityPhone", label: "Security", variant: "custom", CustomInput: DependentInput, dependentInputName: "hasSecurity", Input: InputPhoneWithForm }, settings === null || settings === void 0 ? void 0 : settings.securityPhone),
|
842
|
-
__assign({ name: "hasVideoControl", label: "Video surveillance", variant: "select", options: BooleanValues }, settings === null || settings === void 0 ? void 0 : settings.hasVideoControl),
|
844
|
+
__assign({ name: "hasVideoControl", label: "Video surveillance", variant: "select", options: BooleanValues, isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.hasVideoControl),
|
843
845
|
__assign({ name: "videoControlPhone", label: "Video surveillance", variant: "custom", CustomInput: DependentInput, dependentInputName: "hasVideoControl", Input: InputPhoneWithForm }, settings === null || settings === void 0 ? void 0 : settings.videoControlPhone),
|
844
846
|
]; };
|
845
847
|
|
@@ -859,10 +861,10 @@ var metersOptions = getNumbersValues(7);
|
|
859
861
|
var getMetersInfoStepFields = function (settings) {
|
860
862
|
var _a, _b, _c, _d;
|
861
863
|
return [
|
862
|
-
__assign({ name: "maxMeters.water", label: "Water", variant: "select", options: metersOptions }, (_a = settings === null || settings === void 0 ? void 0 : settings.maxMeters) === null || _a === void 0 ? void 0 : _a.water),
|
863
|
-
__assign({ name: "maxMeters.electricity", label: "Electricity", variant: "select", options: metersOptions }, (_b = settings === null || settings === void 0 ? void 0 : settings.maxMeters) === null || _b === void 0 ? void 0 : _b.electricity),
|
864
|
-
__assign({ name: "maxMeters.gas", label: "Gas", variant: "select", options: metersOptions }, (_c = settings === null || settings === void 0 ? void 0 : settings.maxMeters) === null || _c === void 0 ? void 0 : _c.gas),
|
865
|
-
__assign({ name: "maxMeters.heating", label: "Heating", variant: "select", options: metersOptions }, (_d = settings === null || settings === void 0 ? void 0 : settings.maxMeters) === null || _d === void 0 ? void 0 : _d.heating),
|
864
|
+
__assign({ name: "maxMeters.water", label: "Water", variant: "select", options: metersOptions, isRequired: true }, (_a = settings === null || settings === void 0 ? void 0 : settings.maxMeters) === null || _a === void 0 ? void 0 : _a.water),
|
865
|
+
__assign({ name: "maxMeters.electricity", label: "Electricity", variant: "select", options: metersOptions, isRequired: true }, (_b = settings === null || settings === void 0 ? void 0 : settings.maxMeters) === null || _b === void 0 ? void 0 : _b.electricity),
|
866
|
+
__assign({ name: "maxMeters.gas", label: "Gas", variant: "select", options: metersOptions, isRequired: true }, (_c = settings === null || settings === void 0 ? void 0 : settings.maxMeters) === null || _c === void 0 ? void 0 : _c.gas),
|
867
|
+
__assign({ name: "maxMeters.heating", label: "Heating", variant: "select", options: metersOptions, isRequired: true }, (_d = settings === null || settings === void 0 ? void 0 : settings.maxMeters) === null || _d === void 0 ? void 0 : _d.heating),
|
866
868
|
];
|
867
869
|
};
|
868
870
|
|
@@ -890,15 +892,14 @@ var getTelecommunicationsInfoStepFields = function (settings) {
|
|
890
892
|
};
|
891
893
|
|
892
894
|
var TelecommunicationsInfoFieldsSchema = {
|
893
|
-
tvType: yup.string().required(defaultRequiredMessage),
|
894
895
|
homePhone: phoneNonRequiredSchema("homePhone"),
|
895
896
|
};
|
896
897
|
var TelecommunicationsInfoStepSchema = yup
|
897
898
|
.object()
|
898
899
|
.shape(TelecommunicationsInfoFieldsSchema, [["homePhone", "homePhone"]]);
|
899
900
|
|
900
|
-
var getFillingInfoFields = function (withType, type, setType, settings) { return __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], addToArrayByCondition(withType, __assign({ label: "Filling type", name: "type", variant: "select", options: FillingTypeValues, handleChange: setType }, settings === null || settings === void 0 ? void 0 : settings.type)), true), [
|
901
|
-
__assign({ label: "Name (tag)", name: "tag", type: type, variant: "custom", CustomInput: FillingTagsAutocomplete }, settings === null || settings === void 0 ? void 0 : settings.tag)
|
901
|
+
var getFillingInfoFields = function (withType, type, setType, settings) { return __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], addToArrayByCondition(withType, __assign({ label: "Filling type", name: "type", variant: "select", options: FillingTypeValues, handleChange: setType, isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.type)), true), [
|
902
|
+
__assign({ label: "Name (tag)", name: "tag", type: type, variant: "custom", CustomInput: FillingTagsAutocomplete, isRequired: true }, settings === null || settings === void 0 ? void 0 : settings.tag)
|
902
903
|
], false), addToArrayByCondition(type !== "finish", __assign({ label: "Serial code", name: "serialNumber", size: 6 }, settings === null || settings === void 0 ? void 0 : settings.serialNumber)), true), addToArrayByCondition(type !== "finish", __assign({ label: "Amount", name: "numberOfSubjects", type: "number", size: 6 }, settings === null || settings === void 0 ? void 0 : settings.numberOfSubjects)), true), [
|
903
904
|
__assign({ label: "Description", name: "name", isTextArea: true }, settings === null || settings === void 0 ? void 0 : settings.name)
|
904
905
|
], false), addToArrayByCondition(type !== "finish", __assign({ label: "Instruction", name: "instruction", variant: "custom", CustomInput: InputFileWithVisibility }, settings === null || settings === void 0 ? void 0 : settings.instruction)), true); };
|
@@ -923,7 +924,7 @@ var getMeterFeaturesFieldsSchema = function (valuesFields) {
|
|
923
924
|
return yup.object().shape(__assign(__assign({}, meterFeaturesFieldsSchema), Object.assign.apply(Object, __spreadArray([{}], valuesSchema, false))));
|
924
925
|
};
|
925
926
|
|
926
|
-
var
|
927
|
+
var getInventoryMeterFields = function (settings, inputsSettings) { return __spreadArray(__spreadArray([], basicFieldsOfNewResourceMeter(settings, inputsSettings), true), [
|
927
928
|
__assign({ label: "Activation date", name: "startDate", variant: "date", max: DateTime.now() }, inputsSettings === null || inputsSettings === void 0 ? void 0 : inputsSettings.startDate),
|
928
929
|
__assign({ label: "Passport", name: "passportFile", variant: "custom", CustomInput: InputFile }, inputsSettings === null || inputsSettings === void 0 ? void 0 : inputsSettings.passportFile),
|
929
930
|
], false); };
|
@@ -934,7 +935,7 @@ function InventoryMeterInfoFields(props) {
|
|
934
935
|
var defaultType = resource === "water" ? "cold" : "T1";
|
935
936
|
var defaultMeterType = withMeterType ? defaultType : null;
|
936
937
|
var _a = useState((defaultValues === null || defaultValues === void 0 ? void 0 : defaultValues.type) || defaultMeterType), meterType = _a[0], setMeterType = _a[1];
|
937
|
-
var meterFields =
|
938
|
+
var meterFields = getInventoryMeterFields({
|
938
939
|
resource: resource,
|
939
940
|
meterType: meterType,
|
940
941
|
});
|
@@ -1154,5 +1155,5 @@ var ObjectForMapOverlay = function (props) {
|
|
1154
1155
|
var StyledWrapper = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n"], ["\n position: relative;\n"])));
|
1155
1156
|
var templateObject_1;
|
1156
1157
|
|
1157
|
-
export { AdditionalInfoFieldsSchema, AdditionalInfoStepSchema, BasicApartmentInfoFieldsSchema, BasicApartmentInfoStepSchema, DetailApartmentInfoFieldsSchema, DetailApartmentInfoStepSchema, FillingInfoFieldsSchema, FillingListStore, HouseInfoFieldsSchema, HouseInfoStepSchema, HouseServicesInfoFieldsSchema, HouseServicesInfoStepSchema, index as InspectionFeedback, InspectionFillingCard, InventoryMeterInfoFields, MetersInfoFieldsSchema, MetersInfoStepSchema, ObjectForMapCard, ObjectForMapOverlay, ObjectForMapPoint, RoomsApartmentInfoFieldsSchema, RoomsApartmentInfoStepSchema, SecurityApartmentInfoFieldsSchema, SecurityApartmentInfoStepSchema, TelecommunicationsInfoFieldsSchema, TelecommunicationsInfoStepSchema, WaterMeterFieldsSchema, apartmentFields, getAdditionalInfoStepFields, getBasicApartmentInfoFields, getDetailApartmentInfoFields, getFillingInfoFields, getHouseInfoStep, getHouseServicesInfoStep, getMetersInfoStepFields, getPartialMeterInfoSchema, getRoomsApartmentInfoFields, getRoomsImagesSteps, getSecurityApartmentInfoFields, getTelecommunicationsInfoStepFields, getWaterMeterFields, inspectionsRequestBody, inspectionsRequests, renderMetersSteps, useFillingList, useMetersValues };
|
1158
|
+
export { AdditionalInfoFieldsSchema, AdditionalInfoStepSchema, BasicApartmentInfoFieldsSchema, BasicApartmentInfoStepSchema, DetailApartmentInfoFieldsSchema, DetailApartmentInfoStepSchema, FillingInfoFieldsSchema, FillingListStore, HouseInfoFieldsSchema, HouseInfoStepSchema, HouseServicesInfoFieldsSchema, HouseServicesInfoStepSchema, index as InspectionFeedback, InspectionFillingCard, InventoryMeterInfoFields, MetersInfoFieldsSchema, MetersInfoStepSchema, ObjectForMapCard, ObjectForMapOverlay, ObjectForMapPoint, RoomsApartmentInfoFieldsSchema, RoomsApartmentInfoStepSchema, SecurityApartmentInfoFieldsSchema, SecurityApartmentInfoStepSchema, TelecommunicationsInfoFieldsSchema, TelecommunicationsInfoStepSchema, WaterMeterFieldsSchema, apartmentFields, getAdditionalInfoStepFields, getBasicApartmentInfoFields, getDetailApartmentInfoFields, getFillingInfoFields, getHouseInfoStep, getHouseServicesInfoStep, getInventoryMeterFields, getMetersInfoStepFields, getPartialMeterInfoSchema, getRoomsApartmentInfoFields, getRoomsImagesSteps, getSecurityApartmentInfoFields, getTelecommunicationsInfoStepFields, getWaterMeterFields, inspectionsRequestBody, inspectionsRequests, renderMetersSteps, useFillingList, useMetersValues };
|
1158
1159
|
//# sourceMappingURL=index.js.map
|