kui-crm_actions 0.0.95 → 0.0.98
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 +10 -16
- package/cjs/index.js.map +1 -1
- package/index.d.ts +30 -9
- package/index.js +9 -17
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
@@ -668,8 +668,6 @@ declare const SecurityApartmentInfoFieldsSchema: {
|
|
668
668
|
intercomCode: yup.StringSchema<string | null | undefined, yup.AnyObject, undefined, "">;
|
669
669
|
hasGate: yup.StringSchema<string, yup.AnyObject, undefined, "">;
|
670
670
|
gateCode: yup.StringSchema<string | null | undefined, yup.AnyObject, undefined, "">;
|
671
|
-
parkingType: yup.StringSchema<string | null | undefined, yup.AnyObject, undefined, "">;
|
672
|
-
parkingNumber: yup.StringSchema<string | null | undefined, yup.AnyObject, undefined, "">;
|
673
671
|
};
|
674
672
|
declare const SecurityApartmentInfoStepSchema: yup.ObjectSchema<{
|
675
673
|
typeOfObject: string;
|
@@ -678,8 +676,6 @@ declare const SecurityApartmentInfoStepSchema: yup.ObjectSchema<{
|
|
678
676
|
intercomCode: string | null | undefined;
|
679
677
|
hasGate: string;
|
680
678
|
gateCode: string | null | undefined;
|
681
|
-
parkingType: string | null | undefined;
|
682
|
-
parkingNumber: string | null | undefined;
|
683
679
|
}, yup.AnyObject, {
|
684
680
|
typeOfObject: undefined;
|
685
681
|
entrance: undefined;
|
@@ -687,8 +683,6 @@ declare const SecurityApartmentInfoStepSchema: yup.ObjectSchema<{
|
|
687
683
|
intercomCode: undefined;
|
688
684
|
hasGate: undefined;
|
689
685
|
gateCode: undefined;
|
690
|
-
parkingType: undefined;
|
691
|
-
parkingNumber: undefined;
|
692
686
|
}, "">;
|
693
687
|
|
694
688
|
declare const getAdditionalInfoStepFields: (settings?: InspectionFieldsSettings | undefined) => InputParams<AdditionalInfoStepFields>[];
|
@@ -925,16 +919,43 @@ type ApartmentInspectionParams = {
|
|
925
919
|
isInspectionUpcoming?: boolean
|
926
920
|
}
|
927
921
|
|
922
|
+
type ObjectForMapParams = {
|
923
|
+
id: number
|
924
|
+
apartment: ApartmentInspectionLite
|
925
|
+
tenant: TenantParams | null
|
926
|
+
landlord: TenantParams | null
|
927
|
+
metroStations: MetroStationParams[]
|
928
|
+
location: GeolocationParams | null
|
929
|
+
}
|
930
|
+
|
928
931
|
/* global google */
|
929
932
|
|
930
933
|
|
931
934
|
type ApartmentOverlayProps = {
|
932
|
-
inspection:
|
935
|
+
inspection: ObjectForMapParams
|
936
|
+
label: string
|
933
937
|
map?: google.maps.Map
|
934
938
|
getClientLink?: (id: number) => string
|
935
939
|
getInspectionLink: (id: number, inspectionId: number) => string
|
936
940
|
}
|
937
941
|
|
938
|
-
declare const
|
942
|
+
declare const ObjectForMapOverlay: (props: ApartmentOverlayProps) => JSX.Element;
|
943
|
+
|
944
|
+
type ApartmentCardProps = {
|
945
|
+
inspection: ObjectForMapParams
|
946
|
+
onClose: () => void
|
947
|
+
getClientLink?: (id: number) => string
|
948
|
+
getInspectionLink: (id: number, inspectionId: number) => string
|
949
|
+
}
|
950
|
+
|
951
|
+
declare const ObjectForMapCard: (props: ApartmentCardProps) => JSX.Element;
|
952
|
+
|
953
|
+
type ApartmentPointProps = {
|
954
|
+
label: string
|
955
|
+
isActive: boolean
|
956
|
+
onClick: () => void
|
957
|
+
}
|
958
|
+
|
959
|
+
declare const ObjectForMapPoint: (props: ApartmentPointProps) => JSX.Element;
|
939
960
|
|
940
|
-
export { AdditionalInfoFieldsSchema, AdditionalInfoStepFields, AdditionalInfoStepSchema, ApartmentInspectionModel,
|
961
|
+
export { AdditionalInfoFieldsSchema, AdditionalInfoStepFields, AdditionalInfoStepSchema, ApartmentInspectionModel, ApartmentInspectionParams, ApartmentLinkParams, ApartmentPaymentsFormFields, BasicApartmentInfoFieldsSchema, BasicApartmentInfoStepFields, BasicApartmentInfoStepSchema, CommonInspectionFields, CommonInspectionFormFields, DetailApartmentInfoFieldsSchema, DetailApartmentInfoStepFields, DetailApartmentInfoStepSchema, FillingCheckParams, FillingInfoFieldsSchema, FillingInfoFormFields, FillingInfoStepFields, FillingListInfoStepFields, FillingListStore, 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, 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, getHouseServicesInfoStep, getMetersInfoStepFields, getPartialMeterInfoSchema, getRoomsApartmentInfoFields, getRoomsImagesSteps, getSecurityApartmentInfoFields, getTelecommunicationsInfoStepFields, getWaterMeterFields, inspectionsRequestBody, inspectionsRequests, renderMetersSteps, useFillingList, useMetersValues };
|
package/index.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as yup from 'yup';
|
2
|
-
import { NumberField, requests, uploadFiles, ImageStore, FileStore, matchesAPIFillingTypes, CountryAutocomplete, RegionAutocomplete, CityAutocomplete, RenovationTypeValues, RenovationStyleValues, RoomTypeValues, RoomTypesValues, BooleanValues, ParkingTypesValues, fieldWithConditionSchema,
|
2
|
+
import { NumberField, requests, uploadFiles, ImageStore, FileStore, matchesAPIFillingTypes, CountryAutocomplete, RegionAutocomplete, CityAutocomplete, RenovationTypeValues, RenovationStyleValues, RoomTypeValues, RoomTypesValues, BooleanValues, ParkingTypesValues, fieldWithConditionSchema, getApartmentPaymentFields, defaultRequiredMessage, phoneWithConditionSchema, positiveNumberSchema, getNumbersValues, TVTypesValues, phoneNonRequiredSchema, InputFileWithVisibility, FillingTypeValues, FillingTagsAutocomplete, Tooltip, ApartmentsAgent, PreviewContent, Link, UserBadge, useMapCards, MapOverlay } from 'kui-crm';
|
3
3
|
import _ from 'lodash';
|
4
4
|
import { clearNotValidFields, getPhoneNumberFromPhoneParams, resHandler, callPromises, getPhoneParamsFromString, addToArrayByCondition, Loader } from 'kui-utils';
|
5
5
|
import to from 'await-to-js';
|
@@ -775,14 +775,6 @@ var SecurityApartmentInfoFieldsSchema = {
|
|
775
775
|
intercomCode: fieldWithConditionSchema("hasIntercom"),
|
776
776
|
hasGate: yup.string().required("This field is required"),
|
777
777
|
gateCode: fieldWithConditionSchema("hasGate"),
|
778
|
-
parkingType: yup.string().nullable(),
|
779
|
-
parkingNumber: yup
|
780
|
-
.string()
|
781
|
-
.when("parkingType", {
|
782
|
-
is: function (value) { return !!value; },
|
783
|
-
then: function (rule) { return rule.required(defaultRequiredMessage); },
|
784
|
-
})
|
785
|
-
.nullable(),
|
786
778
|
};
|
787
779
|
var SecurityApartmentInfoStepSchema = yup.object(SecurityApartmentInfoFieldsSchema);
|
788
780
|
|
@@ -1042,9 +1034,9 @@ var useFillingList = function (apartmentId, formStore, fillingStore) {
|
|
1042
1034
|
}, [fillingStore.fillingList, fillingStore.loader.isLoading]);
|
1043
1035
|
};
|
1044
1036
|
|
1045
|
-
var
|
1046
|
-
var
|
1047
|
-
return (jsx(Button, __assign({ size: "xs", variant: isActive ? "primary" : "white", onClick: onClick }, { children:
|
1037
|
+
var ObjectForMapPoint = function (props) {
|
1038
|
+
var label = props.label, onClick = props.onClick, isActive = props.isActive;
|
1039
|
+
return (jsx(Button, __assign({ size: "xs", variant: isActive ? "primary" : "white", onClick: onClick }, { children: label })));
|
1048
1040
|
};
|
1049
1041
|
|
1050
1042
|
var MetroStation = function (props) {
|
@@ -1066,7 +1058,7 @@ var StyledWrapper$1 = styled(Grid)(templateObject_1$2 || (templateObject_1$2 = _
|
|
1066
1058
|
var StyledPhoneIcon = styled(PhoneIcon)(templateObject_2$1 || (templateObject_2$1 = __makeTemplateObject(["\n margin-right: 6px;\n transform: rotate(15deg);\n path {\n stroke: ", ";\n }\n"], ["\n margin-right: 6px;\n transform: rotate(15deg);\n path {\n stroke: ", ";\n }\n"])), theme.palette.grey.sixty);
|
1067
1059
|
var templateObject_1$2, templateObject_2$1;
|
1068
1060
|
|
1069
|
-
var
|
1061
|
+
var ObjectForMapCard = function (props) {
|
1070
1062
|
var inspection = props.inspection, onClose = props.onClose, getClientLink = props.getClientLink, getInspectionLink = props.getInspectionLink;
|
1071
1063
|
var apartment = inspection.apartment, tenant = inspection.tenant, landlord = inspection.landlord, metroStations = inspection.metroStations;
|
1072
1064
|
var client = tenant || landlord;
|
@@ -1081,13 +1073,13 @@ var StyledCloseButton = styled(Button)(templateObject_4 || (templateObject_4 = _
|
|
1081
1073
|
var StyledClientLink = styled(Link)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n max-width: calc(100% - 140px);\n"], ["\n max-width: calc(100% - 140px);\n"])));
|
1082
1074
|
var templateObject_1$1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
|
1083
1075
|
|
1084
|
-
var
|
1085
|
-
var inspection = props.inspection, map = props.map, other = __rest(props, ["inspection", "map"]);
|
1076
|
+
var ObjectForMapOverlay = function (props) {
|
1077
|
+
var inspection = props.inspection, map = props.map, label = props.label, other = __rest(props, ["inspection", "map", "label"]);
|
1086
1078
|
var _a = useMapCards(inspection.location, map), ref = _a.ref, isOpen = _a.isOpen, closeCard = _a.closeCard, toggleCard = _a.toggleCard;
|
1087
|
-
return (jsx(MapOverlay, __assign({ map: map, position: inspection.location }, { children: jsxs(StyledWrapper, __assign({ ref: ref }, { children: [jsx(
|
1079
|
+
return (jsx(MapOverlay, __assign({ map: map, position: inspection.location }, { children: jsxs(StyledWrapper, __assign({ ref: ref }, { children: [jsx(ObjectForMapPoint, { label: label, isActive: isOpen, onClick: toggleCard }), isOpen && (jsx(ObjectForMapCard, __assign({ inspection: inspection, onClose: closeCard }, other)))] })) })));
|
1088
1080
|
};
|
1089
1081
|
var StyledWrapper = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n"], ["\n position: relative;\n"])));
|
1090
1082
|
var templateObject_1;
|
1091
1083
|
|
1092
|
-
export { AdditionalInfoFieldsSchema, AdditionalInfoStepSchema,
|
1084
|
+
export { AdditionalInfoFieldsSchema, AdditionalInfoStepSchema, BasicApartmentInfoFieldsSchema, BasicApartmentInfoStepSchema, DetailApartmentInfoFieldsSchema, DetailApartmentInfoStepSchema, FillingInfoFieldsSchema, FillingListStore, HouseServicesInfoFieldsSchema, HouseServicesInfoStepSchema, index as InspectionFeedback, InspectionFillingCard, MetersInfoFieldsSchema, MetersInfoStepSchema, ObjectForMapCard, ObjectForMapOverlay, ObjectForMapPoint, RoomsApartmentInfoFieldsSchema, RoomsApartmentInfoStepSchema, SecurityApartmentInfoFieldsSchema, SecurityApartmentInfoStepSchema, TelecommunicationsInfoFieldsSchema, TelecommunicationsInfoStepSchema, WaterMeterFieldsSchema, apartmentFields, getAdditionalInfoStepFields, getBasicApartmentInfoFields, getDetailApartmentInfoFields, getFillingInfoFields, getHouseServicesInfoStep, getMetersInfoStepFields, getPartialMeterInfoSchema, getRoomsApartmentInfoFields, getRoomsImagesSteps, getSecurityApartmentInfoFields, getTelecommunicationsInfoStepFields, getWaterMeterFields, inspectionsRequestBody, inspectionsRequests, renderMetersSteps, useFillingList, useMetersValues };
|
1093
1085
|
//# sourceMappingURL=index.js.map
|