kui-crm_actions 0.0.1 → 0.0.3

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/index.js CHANGED
@@ -373,13 +373,13 @@ var inspectionsRequests = {
373
373
  },
374
374
  };
375
375
 
376
- var getBasicApartmentInfoFields = function (settings, handlePlaceSelect) { return [
377
- __assign({ name: "country", label: "Country", variant: "custom", CustomInput: CountryAutocomplete, size: 12 }, settings.country),
378
- __assign({ name: "region", label: "Region", variant: "custom", CustomInput: RegionAutocomplete }, settings.region),
379
- __assign({ name: "city", label: "City", variant: "custom", CustomInput: CityAutocomplete }, settings.city),
380
- __assign({ name: "apartment", variant: "custom", CustomInput: InputWithAddressAutocomplete, handlePlaceSelect: handlePlaceSelect, size: 12 }, settings.apartment),
381
- __assign({ label: "Apartment", name: "apartmentNumber", "data-testid": "apartment_number" }, settings.apartmentNumber),
382
- __assign({ label: "Zip code", name: "zipCode" }, settings.zipCode),
376
+ var getBasicApartmentInfoFields = function (handlePlaceSelect, settings) { return [
377
+ __assign({ name: "country", label: "Country", variant: "custom", CustomInput: CountryAutocomplete, size: 12 }, settings === null || settings === void 0 ? void 0 : settings.country),
378
+ __assign({ name: "region", label: "Region", variant: "custom", CustomInput: RegionAutocomplete }, settings === null || settings === void 0 ? void 0 : settings.region),
379
+ __assign({ name: "city", label: "City", variant: "custom", CustomInput: CityAutocomplete }, settings === null || settings === void 0 ? void 0 : settings.city),
380
+ __assign({ name: "apartment", variant: "custom", CustomInput: InputWithAddressAutocomplete, handlePlaceSelect: handlePlaceSelect, size: 12 }, settings === null || settings === void 0 ? void 0 : settings.apartment),
381
+ __assign({ label: "Apartment", name: "apartmentNumber", "data-testid": "apartment_number" }, settings === null || settings === void 0 ? void 0 : settings.apartmentNumber),
382
+ __assign({ label: "Zip code", name: "zipCode" }, settings === null || settings === void 0 ? void 0 : settings.zipCode),
383
383
  ]; };
384
384
 
385
385
  var BasicApartmentInfoFieldsSchema = {
@@ -397,29 +397,29 @@ var BasicApartmentInfoStepSchema = yup.object(BasicApartmentInfoFieldsSchema);
397
397
  var inputProps = {
398
398
  step: 0.1,
399
399
  };
400
- var getDetailApartmentInfoFields = function (settings, roomsCount) {
400
+ var getDetailApartmentInfoFields = function (roomsCount, settings) {
401
401
  var _a, _b;
402
402
  return __spreadArray(__spreadArray([
403
- __assign(__assign({ label: "Total area", name: "area", type: "number" }, inputProps), settings.area),
404
- __assign(__assign({ label: "Living area", name: "livingArea", type: "number" }, inputProps), settings.livingArea),
405
- __assign(__assign({ label: "Kitchen area", name: "kitchenArea", type: "number" }, inputProps), settings.kitchenArea)
403
+ __assign(__assign({ label: "Total area", name: "area", type: "number" }, inputProps), settings === null || settings === void 0 ? void 0 : settings.area),
404
+ __assign(__assign({ label: "Living area", name: "livingArea", type: "number" }, inputProps), settings === null || settings === void 0 ? void 0 : settings.livingArea),
405
+ __assign(__assign({ label: "Kitchen area", name: "kitchenArea", type: "number" }, inputProps), settings === null || settings === void 0 ? void 0 : settings.kitchenArea)
406
406
  ], (roomsCount
407
407
  ? new Array(Number(roomsCount))
408
408
  .fill(0)
409
409
  .map(function (_, key) {
410
410
  var _a, _b;
411
411
  return [
412
- __assign(__assign({ name: "rooms.".concat(key, ".area"), label: "Room ".concat(key + 1, " area"), type: "number" }, inputProps), (settings.rooms ? (_a = settings.rooms(key)) === null || _a === void 0 ? void 0 : _a.area : {})),
413
- __assign({ name: "rooms.".concat(key, ".type"), label: "Room ".concat(key + 1, " type"), variant: "select", options: RoomTypeValues }, (settings.rooms ? (_b = settings.rooms(key)) === null || _b === void 0 ? void 0 : _b.type : {})),
412
+ __assign(__assign({ name: "rooms.".concat(key, ".area"), label: "Room ".concat(key + 1, " area"), type: "number" }, inputProps), ((settings === null || settings === void 0 ? void 0 : settings.rooms) ? (_a = settings.rooms(key)) === null || _a === void 0 ? void 0 : _a.area : {})),
413
+ __assign({ name: "rooms.".concat(key, ".type"), label: "Room ".concat(key + 1, " type"), variant: "select", options: RoomTypeValues }, ((settings === null || settings === void 0 ? void 0 : settings.rooms) ? (_b = settings.rooms(key)) === null || _b === void 0 ? void 0 : _b.type : {})),
414
414
  ];
415
415
  })
416
416
  .flat()
417
417
  : []), true), [
418
- __assign(__assign({ name: "ceilingHeight", label: "Ceiling height", type: "number" }, inputProps), settings.ceilingHeight),
419
- __assign({ name: "numberOfWindows", label: "Windows", type: "number" }, settings.numberOfWindows),
420
- __assign({ name: "renovation.year", label: "Year of last renovation", type: "number" }, settings.renovation.year),
421
- __assign({ name: "renovation.type", label: "Type of renovation", variant: "select", options: RenovationTypeValues }, (_a = settings.renovation) === null || _a === void 0 ? void 0 : _a.type),
422
- __assign({ name: "renovation.style", label: "Renovation style", variant: "select", options: RenovationStyleValues }, (_b = settings.renovation) === null || _b === void 0 ? void 0 : _b.style),
418
+ __assign(__assign({ name: "ceilingHeight", label: "Ceiling height", type: "number" }, inputProps), settings === null || settings === void 0 ? void 0 : settings.ceilingHeight),
419
+ __assign({ name: "numberOfWindows", label: "Windows", type: "number" }, settings === null || settings === void 0 ? void 0 : settings.numberOfWindows),
420
+ __assign({ name: "renovation.year", label: "Year of last renovation", type: "number" }, settings === null || settings === void 0 ? void 0 : settings.renovation.year),
421
+ __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),
422
+ __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),
423
423
  ], false);
424
424
  };
425
425
 
@@ -442,13 +442,13 @@ var DetailApartmentInfoFieldsSchema = {
442
442
  var DetailApartmentInfoStepSchema = yup.object(DetailApartmentInfoFieldsSchema);
443
443
 
444
444
  var getRoomsApartmentInfoFields = function (settings) { return [
445
- __assign({ label: "Floor", name: "floor", type: "number" }, settings.floor),
446
- __assign({ label: "Floors", name: "floorCount", type: "number" }, settings.floorCount),
447
- __assign({ label: "Rooms", name: "roomsNumber", type: "number" }, settings.roomsNumber),
448
- __assign({ label: "Bedrooms", name: "bedroomsNumber", type: "number" }, settings.bedroomsNumber),
449
- __assign({ label: "Bathrooms", name: "bathroomsNumber", type: "number" }, settings.bathroomsNumber),
450
- __assign({ label: "Restrooms", name: "restroomsNumber", type: "number" }, settings.restroomsNumber),
451
- __assign({ label: "Combined bathroom", name: "combinedBathroomsNumber", type: "number" }, settings.combinedBathroomsNumber),
445
+ __assign({ label: "Floor", name: "floor", type: "number" }, settings === null || settings === void 0 ? void 0 : settings.floor),
446
+ __assign({ label: "Floors", name: "floorCount", type: "number" }, settings === null || settings === void 0 ? void 0 : settings.floorCount),
447
+ __assign({ label: "Rooms", name: "roomsNumber", type: "number" }, settings === null || settings === void 0 ? void 0 : settings.roomsNumber),
448
+ __assign({ label: "Bedrooms", name: "bedroomsNumber", type: "number" }, settings === null || settings === void 0 ? void 0 : settings.bedroomsNumber),
449
+ __assign({ label: "Bathrooms", name: "bathroomsNumber", type: "number" }, settings === null || settings === void 0 ? void 0 : settings.bathroomsNumber),
450
+ __assign({ label: "Restrooms", name: "restroomsNumber", type: "number" }, settings === null || settings === void 0 ? void 0 : settings.restroomsNumber),
451
+ __assign({ label: "Combined bathroom", name: "combinedBathroomsNumber", type: "number" }, settings === null || settings === void 0 ? void 0 : settings.combinedBathroomsNumber),
452
452
  ]; };
453
453
 
454
454
  var RoomsApartmentInfoFieldsSchema = {
@@ -489,12 +489,12 @@ var RoomsApartmentInfoFieldsSchema = {
489
489
  var RoomsApartmentInfoStepSchema = yup.object(RoomsApartmentInfoFieldsSchema);
490
490
 
491
491
  var getSecurityApartmentInfoFields = function (settings) { return [
492
- __assign({ label: "Object type", name: "typeOfRoom", variant: "select", options: RoomTypesValues }, settings.typeOfRoom),
493
- __assign({ label: "Entrance", name: "entrance" }, settings.entrance),
494
- __assign({ name: "hasIntercom", label: "Intercom", variant: "select", options: BooleanValues }, settings.hasIntercom),
495
- __assign({ name: "intercomCode", label: "Intercom code", variant: "custom", CustomInput: DependentInput, dependentInputName: "hasIntercom" }, settings.intercomCode),
496
- __assign({ name: "hasGate", label: "Gate", variant: "select", options: BooleanValues }, settings.hasGate),
497
- __assign({ name: "gateCode", label: "Gate code", variant: "custom", CustomInput: DependentInput, dependentInputName: "hasGate" }, settings.gateCode),
492
+ __assign({ label: "Object type", name: "typeOfRoom", variant: "select", options: RoomTypesValues }, settings === null || settings === void 0 ? void 0 : settings.typeOfRoom),
493
+ __assign({ label: "Entrance", name: "entrance" }, settings === null || settings === void 0 ? void 0 : settings.entrance),
494
+ __assign({ name: "hasIntercom", label: "Intercom", variant: "select", options: BooleanValues }, settings === null || settings === void 0 ? void 0 : settings.hasIntercom),
495
+ __assign({ name: "intercomCode", label: "Intercom code", variant: "custom", CustomInput: DependentInput, dependentInputName: "hasIntercom" }, settings === null || settings === void 0 ? void 0 : settings.intercomCode),
496
+ __assign({ name: "hasGate", label: "Gate", variant: "select", options: BooleanValues }, settings === null || settings === void 0 ? void 0 : settings.hasGate),
497
+ __assign({ name: "gateCode", label: "Gate code", variant: "custom", CustomInput: DependentInput, dependentInputName: "hasGate" }, settings === null || settings === void 0 ? void 0 : settings.gateCode),
498
498
  ]; };
499
499
 
500
500
  var SecurityApartmentInfoFieldsSchema = {
@@ -511,16 +511,16 @@ var checkboxLabelProps = {
511
511
  size: "s",
512
512
  };
513
513
  var getApartmentPaymentFields = function (settings) { return [
514
- __assign({ name: "payerCode", label: "Payer code" }, settings.payerCode),
515
- __assign({ name: "communalServicesAccount", label: "Operational account number" }, settings.communalServicesAccount),
516
- __assign({ name: "company", label: "Administrative company", variant: "custom", CustomInput: CompanyAutocomplete }, settings.company),
517
- __assign({ name: "countryOfResidence", label: "Country of Residence", variant: "custom", CustomInput: CountryAutocomplete }, settings.countryOfResidence),
518
- __assign({ label: "Tax type", name: "taxesType", variant: "select", options: TaxTypeValues }, settings.taxesType),
514
+ __assign({ name: "payerCode", label: "Payer code" }, settings === null || settings === void 0 ? void 0 : settings.payerCode),
515
+ __assign({ name: "communalServicesAccount", label: "Operational account number" }, settings === null || settings === void 0 ? void 0 : settings.communalServicesAccount),
516
+ __assign({ name: "company", label: "Administrative company", variant: "custom", CustomInput: CompanyAutocomplete }, settings === null || settings === void 0 ? void 0 : settings.company),
517
+ __assign({ name: "countryOfResidence", label: "Country of Residence", variant: "custom", CustomInput: CountryAutocomplete }, settings === null || settings === void 0 ? void 0 : settings.countryOfResidence),
518
+ __assign({ label: "Tax type", name: "taxesType", variant: "select", options: TaxTypeValues }, settings === null || settings === void 0 ? void 0 : settings.taxesType),
519
519
  ]; };
520
520
  var getAdditionalInfoStepFields = function (settings) { return __spreadArray([
521
- __assign({ label: "Pets", name: "withPets", variant: "custom", CustomInput: CheckboxWithController, labelProps: checkboxLabelProps }, settings.withPets),
522
- __assign({ label: "Children", name: "withChildren", variant: "custom", CustomInput: CheckboxWithController, labelProps: checkboxLabelProps }, settings.withChildren),
523
- __assign({ isTextArea: true, placeholder: "other terms", name: "additionalTerms" }, settings.additionalTerms)
521
+ __assign({ label: "Pets", name: "withPets", variant: "custom", CustomInput: CheckboxWithController, labelProps: checkboxLabelProps }, settings === null || settings === void 0 ? void 0 : settings.withPets),
522
+ __assign({ label: "Children", name: "withChildren", variant: "custom", CustomInput: CheckboxWithController, labelProps: checkboxLabelProps }, settings === null || settings === void 0 ? void 0 : settings.withChildren),
523
+ __assign({ isTextArea: true, placeholder: "other terms", name: "additionalTerms" }, settings === null || settings === void 0 ? void 0 : settings.additionalTerms)
524
524
  ], getApartmentPaymentFields(settings), true); };
525
525
 
526
526
  var AdditionalInfoFieldsSchema = {
@@ -529,18 +529,18 @@ var AdditionalInfoFieldsSchema = {
529
529
  var AdditionalInfoStepSchema = yup.object(AdditionalInfoFieldsSchema);
530
530
 
531
531
  var getHouseServicesInfoStep = function (settings) { return [
532
- __assign({ name: "hasBarrier", label: "Barrier", variant: "select", options: BooleanValues }, settings.hasBarrier),
533
- __assign({ name: "barrierPhone", label: "Barrier code", variant: "custom", CustomInput: DependentInput, dependentInputName: "hasBarrier", Input: InputPhoneWithForm }, settings.barrierPhone),
534
- __assign({ name: "hasConcierge", label: "Concierge", variant: "select", options: BooleanValues }, settings.hasConcierge),
535
- __assign({ name: "conciergePhone", label: "Concierge", variant: "custom", CustomInput: DependentInput, dependentInputName: "hasConcierge", Input: InputPhoneWithForm }, settings.conciergePhone),
536
- __assign({ name: "hasSecurity", label: "Security", variant: "select", options: BooleanValues }, settings.hasSecurity),
537
- __assign({ name: "securityPhone", label: "Security", variant: "custom", CustomInput: DependentInput, dependentInputName: "hasSecurity", Input: InputPhoneWithForm }, settings.securityPhone),
538
- __assign({ name: "hasVideoControl", label: "Video surveillance", variant: "select", options: BooleanValues }, settings.hasVideoControl),
539
- __assign({ name: "videoControlPhone", label: "Video surveillance", variant: "custom", CustomInput: DependentInput, dependentInputName: "hasVideoControl", Input: InputPhoneWithForm }, settings.videoControlPhone),
540
- __assign({ name: "parkingType", label: "Parking", variant: "select", options: ParkingTypesValues }, settings.parkingType),
541
- __assign({ name: "parkingNumber", label: "Parking number", variant: "custom", CustomInput: DependentInput, dependentInputName: "parkingType" }, settings.parkingNumber),
542
- __assign({ name: "passengerElevatorsCount", label: "Passenger elevators", type: "number" }, settings.passengerElevatorsCount),
543
- __assign({ name: "serviceElevatorsCount", label: "Service elevators", type: "number" }, settings.serviceElevatorsCount),
532
+ __assign({ name: "hasBarrier", label: "Barrier", variant: "select", options: BooleanValues }, settings === null || settings === void 0 ? void 0 : settings.hasBarrier),
533
+ __assign({ name: "barrierPhone", label: "Barrier code", variant: "custom", CustomInput: DependentInput, dependentInputName: "hasBarrier", Input: InputPhoneWithForm }, settings === null || settings === void 0 ? void 0 : settings.barrierPhone),
534
+ __assign({ name: "hasConcierge", label: "Concierge", variant: "select", options: BooleanValues }, settings === null || settings === void 0 ? void 0 : settings.hasConcierge),
535
+ __assign({ name: "conciergePhone", label: "Concierge", variant: "custom", CustomInput: DependentInput, dependentInputName: "hasConcierge", Input: InputPhoneWithForm }, settings === null || settings === void 0 ? void 0 : settings.conciergePhone),
536
+ __assign({ name: "hasSecurity", label: "Security", variant: "select", options: BooleanValues }, settings === null || settings === void 0 ? void 0 : settings.hasSecurity),
537
+ __assign({ name: "securityPhone", label: "Security", variant: "custom", CustomInput: DependentInput, dependentInputName: "hasSecurity", Input: InputPhoneWithForm }, settings === null || settings === void 0 ? void 0 : settings.securityPhone),
538
+ __assign({ name: "hasVideoControl", label: "Video surveillance", variant: "select", options: BooleanValues }, settings === null || settings === void 0 ? void 0 : settings.hasVideoControl),
539
+ __assign({ name: "videoControlPhone", label: "Video surveillance", variant: "custom", CustomInput: DependentInput, dependentInputName: "hasVideoControl", Input: InputPhoneWithForm }, settings === null || settings === void 0 ? void 0 : settings.videoControlPhone),
540
+ __assign({ name: "parkingType", label: "Parking", variant: "select", options: ParkingTypesValues }, settings === null || settings === void 0 ? void 0 : settings.parkingType),
541
+ __assign({ name: "parkingNumber", label: "Parking number", variant: "custom", CustomInput: DependentInput, dependentInputName: "parkingType" }, settings === null || settings === void 0 ? void 0 : settings.parkingNumber),
542
+ __assign({ name: "passengerElevatorsCount", label: "Passenger elevators", type: "number" }, settings === null || settings === void 0 ? void 0 : settings.passengerElevatorsCount),
543
+ __assign({ name: "serviceElevatorsCount", label: "Service elevators", type: "number" }, settings === null || settings === void 0 ? void 0 : settings.serviceElevatorsCount),
544
544
  ]; };
545
545
 
546
546
  var HouseServicesInfoFieldsSchema = {
@@ -569,10 +569,10 @@ var metersOptions = getNumbersValues(7);
569
569
  var getMetersInfoStepFields = function (settings) {
570
570
  var _a, _b, _c, _d;
571
571
  return [
572
- __assign({ name: "maxMeters.water", label: "Water", variant: "select", options: metersOptions }, (_a = settings.maxMeters) === null || _a === void 0 ? void 0 : _a.water),
573
- __assign({ name: "maxMeters.electricity", label: "Electricity", variant: "select", options: metersOptions }, (_b = settings.maxMeters) === null || _b === void 0 ? void 0 : _b.electricity),
574
- __assign({ name: "maxMeters.gas", label: "Gas", variant: "select", options: metersOptions }, (_c = settings.maxMeters) === null || _c === void 0 ? void 0 : _c.gas),
575
- __assign({ name: "maxMeters.heating", label: "Heating", variant: "select", options: metersOptions }, (_d = settings.maxMeters) === null || _d === void 0 ? void 0 : _d.heating),
572
+ __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),
573
+ __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),
574
+ __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),
575
+ __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),
576
576
  ];
577
577
  };
578
578
 
@@ -589,13 +589,13 @@ var MetersInfoStepSchema = yup.object(MetersInfoFieldsSchema);
589
589
  var getTelecommunicationsInfoStepFields = function (settings) {
590
590
  var _a, _b, _c, _d, _e;
591
591
  return [
592
- __assign({ name: "wifi.name", label: "Name of network" }, (_a = settings.wifi) === null || _a === void 0 ? void 0 : _a.name),
593
- __assign({ name: "wifi.password", label: "WiFi password" }, (_b = settings.wifi) === null || _b === void 0 ? void 0 : _b.password),
594
- __assign({ name: "internetProvider.link", label: "Link to provider", size: 12 }, (_c = settings.internetProvider) === null || _c === void 0 ? void 0 : _c.link),
595
- __assign({ name: "internetProvider.login", label: "Login" }, (_d = settings.internetProvider) === null || _d === void 0 ? void 0 : _d.login),
596
- __assign({ name: "internetProvider.password", label: "Password" }, (_e = settings.internetProvider) === null || _e === void 0 ? void 0 : _e.password),
597
- __assign({ name: "tvType", label: "Television", variant: "select", options: TVTypesValues }, settings.tvType),
598
- __assign({ name: "homePhone", label: "Home phone", variant: "phone" }, settings.homePhone),
592
+ __assign({ name: "wifi.name", label: "Name of network" }, (_a = settings === null || settings === void 0 ? void 0 : settings.wifi) === null || _a === void 0 ? void 0 : _a.name),
593
+ __assign({ name: "wifi.password", label: "WiFi password" }, (_b = settings === null || settings === void 0 ? void 0 : settings.wifi) === null || _b === void 0 ? void 0 : _b.password),
594
+ __assign({ name: "internetProvider.link", label: "Link to provider", size: 12 }, (_c = settings === null || settings === void 0 ? void 0 : settings.internetProvider) === null || _c === void 0 ? void 0 : _c.link),
595
+ __assign({ name: "internetProvider.login", label: "Login" }, (_d = settings === null || settings === void 0 ? void 0 : settings.internetProvider) === null || _d === void 0 ? void 0 : _d.login),
596
+ __assign({ name: "internetProvider.password", label: "Password" }, (_e = settings === null || settings === void 0 ? void 0 : settings.internetProvider) === null || _e === void 0 ? void 0 : _e.password),
597
+ __assign({ name: "tvType", label: "Television", variant: "select", options: TVTypesValues }, settings === null || settings === void 0 ? void 0 : settings.tvType),
598
+ __assign({ name: "homePhone", label: "Home phone", variant: "phone" }, settings === null || settings === void 0 ? void 0 : settings.homePhone),
599
599
  ];
600
600
  };
601
601