kui-crm_actions 0.0.65 → 0.0.66
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 +24 -0
- package/cjs/index.js.map +1 -1
- package/index.d.ts +10 -1
- package/index.js +23 -2
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
@@ -10,6 +10,13 @@ declare const getPartialMeterInfoSchema: (valuesFields: InputParams<any>[]) => y
|
|
10
10
|
[x: string]: any;
|
11
11
|
}, yup.AnyObject, {
|
12
12
|
[x: string]: any;
|
13
|
+
}, "">;
|
14
|
+
declare const WaterMeterFieldsSchema: yup.ObjectSchema<{
|
15
|
+
number: string;
|
16
|
+
value: number;
|
17
|
+
}, yup.AnyObject, {
|
18
|
+
number: undefined;
|
19
|
+
value: undefined;
|
13
20
|
}, "">;
|
14
21
|
|
15
22
|
type PartialMeterInfoStepProps = {
|
@@ -30,6 +37,8 @@ type PartialMeterInfoFields = {
|
|
30
37
|
images: FileStore[]
|
31
38
|
}
|
32
39
|
|
40
|
+
declare const getWaterMeterFields: (meters: PartialMeterInfoFields[], name?: string | undefined, settings?: any) => any[];
|
41
|
+
|
33
42
|
type InspectionMeterFields = {
|
34
43
|
id?: number
|
35
44
|
resource: ResourceTypes
|
@@ -805,4 +814,4 @@ type ApartmentOverlayProps = {
|
|
805
814
|
|
806
815
|
declare const ApartmentInspectionOverlay: (props: ApartmentOverlayProps) => JSX.Element;
|
807
816
|
|
808
|
-
export { AdditionalInfoFieldsSchema, AdditionalInfoStepFields, AdditionalInfoStepSchema, ApartmentInspectionModel, ApartmentInspectionOverlay, ApartmentInspectionParams, ApartmentLinkParams, ApartmentPaymentsFormFields, BasicApartmentInfoFieldsSchema, BasicApartmentInfoStepFields, BasicApartmentInfoStepSchema, CommonInspectionFields, CommonInspectionFormFields, DetailApartmentInfoFieldsSchema, DetailApartmentInfoStepFields, DetailApartmentInfoStepSchema, FillingInfoFieldsSchema, FillingInfoFormFields, FillingInfoStepFields, FillingListInfoStepFields, HouseServicesInfoFieldsSchema, HouseServicesInfoStepFields, HouseServicesInfoStepSchema, InitialInspectionFieldsBody, InitialInspectionFormFields, InitialInspectionInfoFields, InitialInspectionPostBody, InitialInspectionRoomParams, InspectionAppraisalLiteModel, InspectionFieldsSettings, InspectionFillingParams, InspectionImpairmentLiteModel, InspectionMeterCommonFields, InspectionMeterFields, InspectionMeterValueModel, InspectionMetersStepFields, InspectionPartialMetersStepFields, InspectionRoomImagesParams, InspectionRoomPhotoRequest, InspectionRoomsImagesFields, InventoryInspectionFieldsBody, InventoryInspectionFormFields, InventoryInspectionPostBody, InventoryMeterModel, MeterInfoStepProps, MeterValueModel, MeterValuesFields, MetersInfoFieldsSchema, MetersInfoStepFields, MetersInfoStepSchema, MetroStationParams, PartialMeterInfoFields, PartialMeterInfoStepProps, PartialMeterModel, PostApartmentInspectionRequest, RegularInspectionFormFields, RegularInspectionPostBody, RegularlyInspectionFieldsBody, RoomsApartmentInfoFieldsSchema, RoomsApartmentInfoStepFields, RoomsApartmentInfoStepSchema, SecurityApartmentInfoFieldsSchema, SecurityApartmentInfoStepFields, SecurityApartmentInfoStepSchema, TelecommunicationsInfoFieldsSchema, TelecommunicationsInfoStepFields, TelecommunicationsInfoStepSchema, TenantParams, TransferInspectionFieldsBody, TransferInspectionFormFields, TransferInspectionPostBody, TransferInspectionTypes, getAdditionalInfoStepFields, getBasicApartmentInfoFields, getDetailApartmentInfoFields, getFillingInfoFields, getHouseServicesInfoStep, getMetersInfoStepFields, getPartialMeterInfoSchema, getRoomsApartmentInfoFields, getRoomsImagesSteps, getSecurityApartmentInfoFields, getTelecommunicationsInfoStepFields, inspectionsRequestBody, inspectionsRequests, renderMetersSteps, useMetersValues };
|
817
|
+
export { AdditionalInfoFieldsSchema, AdditionalInfoStepFields, AdditionalInfoStepSchema, ApartmentInspectionModel, ApartmentInspectionOverlay, ApartmentInspectionParams, ApartmentLinkParams, ApartmentPaymentsFormFields, BasicApartmentInfoFieldsSchema, BasicApartmentInfoStepFields, BasicApartmentInfoStepSchema, CommonInspectionFields, CommonInspectionFormFields, DetailApartmentInfoFieldsSchema, DetailApartmentInfoStepFields, DetailApartmentInfoStepSchema, FillingInfoFieldsSchema, FillingInfoFormFields, FillingInfoStepFields, FillingListInfoStepFields, HouseServicesInfoFieldsSchema, HouseServicesInfoStepFields, HouseServicesInfoStepSchema, InitialInspectionFieldsBody, InitialInspectionFormFields, InitialInspectionInfoFields, InitialInspectionPostBody, InitialInspectionRoomParams, InspectionAppraisalLiteModel, InspectionFieldsSettings, InspectionFillingParams, InspectionImpairmentLiteModel, InspectionMeterCommonFields, InspectionMeterFields, InspectionMeterValueModel, InspectionMetersStepFields, InspectionPartialMetersStepFields, InspectionRoomImagesParams, InspectionRoomPhotoRequest, InspectionRoomsImagesFields, InventoryInspectionFieldsBody, InventoryInspectionFormFields, InventoryInspectionPostBody, InventoryMeterModel, MeterInfoStepProps, MeterValueModel, MeterValuesFields, MetersInfoFieldsSchema, MetersInfoStepFields, MetersInfoStepSchema, MetroStationParams, PartialMeterInfoFields, PartialMeterInfoStepProps, PartialMeterModel, PostApartmentInspectionRequest, RegularInspectionFormFields, RegularInspectionPostBody, RegularlyInspectionFieldsBody, RoomsApartmentInfoFieldsSchema, RoomsApartmentInfoStepFields, RoomsApartmentInfoStepSchema, SecurityApartmentInfoFieldsSchema, SecurityApartmentInfoStepFields, SecurityApartmentInfoStepSchema, TelecommunicationsInfoFieldsSchema, TelecommunicationsInfoStepFields, TelecommunicationsInfoStepSchema, TenantParams, TransferInspectionFieldsBody, TransferInspectionFormFields, TransferInspectionPostBody, TransferInspectionTypes, WaterMeterFieldsSchema, getAdditionalInfoStepFields, getBasicApartmentInfoFields, getDetailApartmentInfoFields, getFillingInfoFields, getHouseServicesInfoStep, getMetersInfoStepFields, getPartialMeterInfoSchema, getRoomsApartmentInfoFields, getRoomsImagesSteps, getSecurityApartmentInfoFields, getTelecommunicationsInfoStepFields, getWaterMeterFields, inspectionsRequestBody, inspectionsRequests, renderMetersSteps, useMetersValues };
|
package/index.js
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
import * as yup from 'yup';
|
2
|
-
import { requests, uploadFiles, CountryAutocomplete, RegionAutocomplete, CityAutocomplete, RenovationTypeValues, RenovationStyleValues, RoomTypeValues, RoomTypesValues, BooleanValues, ParkingTypesValues, fieldWithConditionSchema, defaultRequiredMessage, getApartmentPaymentFields, phoneWithConditionSchema, positiveNumberSchema, getNumbersValues, TVTypesValues, phoneNonRequiredSchema, InputFileWithVisibility, FillingTypeValues, FillingTagsAutocomplete, PreviewContent, Link, UserBadge, useMapCards, MapOverlay } from 'kui-crm';
|
2
|
+
import { NumberField, requests, uploadFiles, CountryAutocomplete, RegionAutocomplete, CityAutocomplete, RenovationTypeValues, RenovationStyleValues, RoomTypeValues, RoomTypesValues, BooleanValues, ParkingTypesValues, fieldWithConditionSchema, defaultRequiredMessage, getApartmentPaymentFields, phoneWithConditionSchema, positiveNumberSchema, getNumbersValues, TVTypesValues, phoneNonRequiredSchema, InputFileWithVisibility, FillingTypeValues, FillingTagsAutocomplete, PreviewContent, Link, UserBadge, useMapCards, MapOverlay } from 'kui-crm';
|
3
|
+
import _ from 'lodash';
|
3
4
|
import { clearNotValidFields, getPhoneNumberFromPhoneParams, resHandler, callPromises, addToArrayByCondition } from 'kui-utils';
|
4
5
|
import to from 'await-to-js';
|
5
6
|
import { DateTime } from 'luxon';
|
@@ -116,6 +117,26 @@ var getPartialMeterInfoSchema = function (valuesFields) {
|
|
116
117
|
_a);
|
117
118
|
});
|
118
119
|
return yup.object().shape(__assign({ number: yup.string().trim().required("This field is required") }, Object.assign.apply(Object, __spreadArray([{}], valuesSchema, false))));
|
120
|
+
};
|
121
|
+
var WaterMeterFieldsSchema = yup.object().shape({
|
122
|
+
number: yup.string().trim().required("This field is required"),
|
123
|
+
value: yup
|
124
|
+
.number()
|
125
|
+
.min(0)
|
126
|
+
.required("This field is required")
|
127
|
+
.transform(function (value) { return (Number.isNaN(value) ? undefined : value); }),
|
128
|
+
});
|
129
|
+
|
130
|
+
var getWaterMeterFields = function (meters, name, settings) {
|
131
|
+
var prefixName = name ? "".concat(name, ".") : "";
|
132
|
+
var meterOptions = meters.map(function (meter) { return ({
|
133
|
+
value: meter.number,
|
134
|
+
label: "#".concat(meter.number, " | ").concat(_.capitalize(meter.type || "")),
|
135
|
+
}); });
|
136
|
+
return [
|
137
|
+
__assign({ label: "Meter", name: "".concat(prefixName, "number"), variant: "select", options: meterOptions, size: 12 }, settings === null || settings === void 0 ? void 0 : settings.meter),
|
138
|
+
__assign({ label: "Value", name: "".concat(prefixName, "value"), variant: "custom", CustomInput: NumberField, maxIntegerPart: 7, maxDecimalPart: 3 }, settings === null || settings === void 0 ? void 0 : settings.value),
|
139
|
+
];
|
119
140
|
};
|
120
141
|
|
121
142
|
var inspectionsRequestBody = {
|
@@ -710,5 +731,5 @@ var ApartmentInspectionOverlay = function (props) {
|
|
710
731
|
var StyledWrapper = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n"], ["\n position: relative;\n"])));
|
711
732
|
var templateObject_1;
|
712
733
|
|
713
|
-
export { AdditionalInfoFieldsSchema, AdditionalInfoStepSchema, ApartmentInspectionOverlay, BasicApartmentInfoFieldsSchema, BasicApartmentInfoStepSchema, DetailApartmentInfoFieldsSchema, DetailApartmentInfoStepSchema, FillingInfoFieldsSchema, HouseServicesInfoFieldsSchema, HouseServicesInfoStepSchema, MetersInfoFieldsSchema, MetersInfoStepSchema, RoomsApartmentInfoFieldsSchema, RoomsApartmentInfoStepSchema, SecurityApartmentInfoFieldsSchema, SecurityApartmentInfoStepSchema, TelecommunicationsInfoFieldsSchema, TelecommunicationsInfoStepSchema, getAdditionalInfoStepFields, getBasicApartmentInfoFields, getDetailApartmentInfoFields, getFillingInfoFields, getHouseServicesInfoStep, getMetersInfoStepFields, getPartialMeterInfoSchema, getRoomsApartmentInfoFields, getRoomsImagesSteps, getSecurityApartmentInfoFields, getTelecommunicationsInfoStepFields, inspectionsRequestBody, inspectionsRequests, renderMetersSteps, useMetersValues };
|
734
|
+
export { AdditionalInfoFieldsSchema, AdditionalInfoStepSchema, ApartmentInspectionOverlay, BasicApartmentInfoFieldsSchema, BasicApartmentInfoStepSchema, DetailApartmentInfoFieldsSchema, DetailApartmentInfoStepSchema, FillingInfoFieldsSchema, HouseServicesInfoFieldsSchema, HouseServicesInfoStepSchema, MetersInfoFieldsSchema, MetersInfoStepSchema, RoomsApartmentInfoFieldsSchema, RoomsApartmentInfoStepSchema, SecurityApartmentInfoFieldsSchema, SecurityApartmentInfoStepSchema, TelecommunicationsInfoFieldsSchema, TelecommunicationsInfoStepSchema, WaterMeterFieldsSchema, getAdditionalInfoStepFields, getBasicApartmentInfoFields, getDetailApartmentInfoFields, getFillingInfoFields, getHouseServicesInfoStep, getMetersInfoStepFields, getPartialMeterInfoSchema, getRoomsApartmentInfoFields, getRoomsImagesSteps, getSecurityApartmentInfoFields, getTelecommunicationsInfoStepFields, getWaterMeterFields, inspectionsRequestBody, inspectionsRequests, renderMetersSteps, useMetersValues };
|
714
735
|
//# sourceMappingURL=index.js.map
|